From bff9b3ff3690fb865590abcfd9a79a1aa3e538c2 Mon Sep 17 00:00:00 2001 From: Li Jiang Date: Wed, 2 Aug 2023 17:16:44 +0800 Subject: [PATCH] [COMMIT DIST] --- dist/AgaveErrorUX/AgaveErrorUX.debug.js | 2187 + dist/AgaveErrorUX/AgaveErrorUX.js | 18 + .../images/AgaveDefaultIcon32x32.png | Bin 0 -> 522 bytes .../images/AgaveDefaultIcon96x96.png | Bin 0 -> 1115 bytes .../images/BusinessBarClose_16x16x32.png | Bin 0 -> 991 bytes .../images/DropDownArrow_16x16x32.png | Bin 0 -> 199 bytes .../AgaveErrorUX/images/Ellipsis_16x16x32.png | Bin 0 -> 255 bytes .../images/MiniInfoBlue_16x16x32.png | Bin 0 -> 454 bytes dist/AgaveErrorUX/images/Refresh_16x16x32.png | Bin 0 -> 367 bytes dist/AgaveErrorUX/images/moe_default_icon.png | Bin 0 -> 522 bytes dist/AgaveErrorUX/images/moe_status_icons.png | Bin 0 -> 6140 bytes dist/AgaveErrorUX/images/office.png | Bin 0 -> 257 bytes dist/AgaveErrorUX/index.html | 16 + dist/AgaveErrorUX/style/AgaveErrorUX.css | 613 + dist/custom-functions-runtime.debug.js | 8074 + dist/custom-functions-runtime.js | 52 + dist/excel-android-16.00.debug.js | 39526 +++++ dist/excel-android-16.00.js | 26 + dist/excel-ios-16.00.debug.js | 39975 +++++ dist/excel-ios-16.00.js | 26 + dist/excel-mac-16.00-core.debug.js | 9050 + dist/excel-mac-16.00-core.js | 22 + dist/excel-mac-16.00.debug.js | 43698 +++++ dist/excel-mac-16.00.js | 26 + dist/excel-web-16.00-core.debug.js | 10021 ++ dist/excel-web-16.00-core.js | 22 + dist/excel-web-16.00.debug.js | 44594 +++++ dist/excel-web-16.00.js | 26 + dist/excel-win32-16.01-core.debug.js | 8002 + dist/excel-win32-16.01-core.js | 22 + dist/excel-win32-16.01.debug.js | 43077 +++++ dist/excel-win32-16.01.js | 26 + dist/excel-winrt-16.00.debug.js | 39068 ++++ dist/excel-winrt-16.00.js | 26 + dist/excel.debug.js | 46529 +++++ dist/excel.js | 15 + dist/office-vsdoc.js | 33218 ++++ dist/office-with-first-party.d.ts | 137277 +++++++++++++++ dist/office.d.ts | 123005 +++++++++++++ dist/office.debug.js | 3038 + dist/office.js | 84 + dist/outlook-win32.debug-vsdoc.js | 1663 + dist/telemetry | 1 + embedded/visio-web-embedded.debug-vsdoc.js | 1534 + embedded/visio-web-embedded.debug.js | 16369 ++ embedded/visio-web-embedded.js | 26 + 46 files changed, 650952 insertions(+) create mode 100644 dist/AgaveErrorUX/AgaveErrorUX.debug.js create mode 100644 dist/AgaveErrorUX/AgaveErrorUX.js create mode 100644 dist/AgaveErrorUX/images/AgaveDefaultIcon32x32.png create mode 100644 dist/AgaveErrorUX/images/AgaveDefaultIcon96x96.png create mode 100644 dist/AgaveErrorUX/images/BusinessBarClose_16x16x32.png create mode 100644 dist/AgaveErrorUX/images/DropDownArrow_16x16x32.png create mode 100644 dist/AgaveErrorUX/images/Ellipsis_16x16x32.png create mode 100644 dist/AgaveErrorUX/images/MiniInfoBlue_16x16x32.png create mode 100644 dist/AgaveErrorUX/images/Refresh_16x16x32.png create mode 100644 dist/AgaveErrorUX/images/moe_default_icon.png create mode 100644 dist/AgaveErrorUX/images/moe_status_icons.png create mode 100644 dist/AgaveErrorUX/images/office.png create mode 100644 dist/AgaveErrorUX/index.html create mode 100644 dist/AgaveErrorUX/style/AgaveErrorUX.css create mode 100644 dist/custom-functions-runtime.debug.js create mode 100644 dist/custom-functions-runtime.js create mode 100644 dist/excel-android-16.00.debug.js create mode 100644 dist/excel-android-16.00.js create mode 100644 dist/excel-ios-16.00.debug.js create mode 100644 dist/excel-ios-16.00.js create mode 100644 dist/excel-mac-16.00-core.debug.js create mode 100644 dist/excel-mac-16.00-core.js create mode 100644 dist/excel-mac-16.00.debug.js create mode 100644 dist/excel-mac-16.00.js create mode 100644 dist/excel-web-16.00-core.debug.js create mode 100644 dist/excel-web-16.00-core.js create mode 100644 dist/excel-web-16.00.debug.js create mode 100644 dist/excel-web-16.00.js create mode 100644 dist/excel-win32-16.01-core.debug.js create mode 100644 dist/excel-win32-16.01-core.js create mode 100644 dist/excel-win32-16.01.debug.js create mode 100644 dist/excel-win32-16.01.js create mode 100644 dist/excel-winrt-16.00.debug.js create mode 100644 dist/excel-winrt-16.00.js create mode 100644 dist/excel.debug.js create mode 100644 dist/excel.js create mode 100644 dist/office-vsdoc.js create mode 100644 dist/office-with-first-party.d.ts create mode 100644 dist/office.d.ts create mode 100644 dist/office.debug.js create mode 100644 dist/office.js create mode 100644 dist/outlook-win32.debug-vsdoc.js create mode 100644 dist/telemetry create mode 100644 embedded/visio-web-embedded.debug-vsdoc.js create mode 100644 embedded/visio-web-embedded.debug.js create mode 100644 embedded/visio-web-embedded.js diff --git a/dist/AgaveErrorUX/AgaveErrorUX.debug.js b/dist/AgaveErrorUX/AgaveErrorUX.debug.js new file mode 100644 index 000000000..8c09d8549 --- /dev/null +++ b/dist/AgaveErrorUX/AgaveErrorUX.debug.js @@ -0,0 +1,2187 @@ +/* Agave error ux page javascript */ + +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + + This file also contains the following Promise implementation (with a few small modifications): + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 2.3.0 +*/ +var OfficeExt; +(function (OfficeExt) { + var MicrosoftAjaxFactory = (function () { + function MicrosoftAjaxFactory() { + } + MicrosoftAjaxFactory.prototype.isMsAjaxLoaded = function () { + if (typeof (Sys) !== 'undefined' && typeof (Type) !== 'undefined' && + Sys.StringBuilder && typeof (Sys.StringBuilder) === "function" && + Type.registerNamespace && typeof (Type.registerNamespace) === "function" && + Type.registerClass && typeof (Type.registerClass) === "function" && + typeof (Function._validateParams) === "function" && + Sys.Serialization && Sys.Serialization.JavaScriptSerializer && typeof (Sys.Serialization.JavaScriptSerializer.serialize) === "function") { + return true; + } + else { + return false; + } + }; + MicrosoftAjaxFactory.prototype.loadMsAjaxFull = function (callback) { + var msAjaxCDNPath = (window.location.protocol.toLowerCase() === 'https:' ? 'https:' : 'http:') + '//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js'; + OSF.OUtil.loadScript(msAjaxCDNPath, callback); + }; + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxError", { + get: function () { + if (this._msAjaxError == null && this.isMsAjaxLoaded()) { + this._msAjaxError = Error; + } + return this._msAjaxError; + }, + set: function (errorClass) { + this._msAjaxError = errorClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxString", { + get: function () { + if (this._msAjaxString == null && this.isMsAjaxLoaded()) { + this._msAjaxString = String; + } + return this._msAjaxString; + }, + set: function (stringClass) { + this._msAjaxString = stringClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxDebug", { + get: function () { + if (this._msAjaxDebug == null && this.isMsAjaxLoaded()) { + this._msAjaxDebug = Sys.Debug; + } + return this._msAjaxDebug; + }, + set: function (debugClass) { + this._msAjaxDebug = debugClass; + }, + enumerable: true, + configurable: true + }); + return MicrosoftAjaxFactory; + }()); + OfficeExt.MicrosoftAjaxFactory = MicrosoftAjaxFactory; +})(OfficeExt || (OfficeExt = {})); +var OsfMsAjaxFactory = new OfficeExt.MicrosoftAjaxFactory(); +var OSF = OSF || {}; +(function (OfficeExt) { + var SafeStorage = (function () { + function SafeStorage(_internalStorage) { + this._internalStorage = _internalStorage; + } + SafeStorage.prototype.getItem = function (key) { + try { + return this._internalStorage && this._internalStorage.getItem(key); + } + catch (e) { + return null; + } + }; + SafeStorage.prototype.setItem = function (key, data) { + try { + this._internalStorage && this._internalStorage.setItem(key, data); + } + catch (e) { + } + }; + SafeStorage.prototype.clear = function () { + try { + this._internalStorage && this._internalStorage.clear(); + } + catch (e) { + } + }; + SafeStorage.prototype.removeItem = function (key) { + try { + this._internalStorage && this._internalStorage.removeItem(key); + } + catch (e) { + } + }; + SafeStorage.prototype.getKeysWithPrefix = function (keyPrefix) { + var keyList = []; + try { + var len = this._internalStorage && this._internalStorage.length || 0; + for (var i = 0; i < len; i++) { + var key = this._internalStorage.key(i); + if (key.indexOf(keyPrefix) === 0) { + keyList.push(key); + } + } + } + catch (e) { + } + return keyList; + }; + SafeStorage.prototype.isLocalStorageAvailable = function () { + return (this._internalStorage != null); + }; + return SafeStorage; + }()); + OfficeExt.SafeStorage = SafeStorage; +})(OfficeExt || (OfficeExt = {})); +OSF.XdmFieldName = { + ConversationUrl: "ConversationUrl", + AppId: "AppId" +}; +OSF.TestFlightStart = 1000; +OSF.TestFlightEnd = 1009; +OSF.FlightNames = { + UseOriginNotUrl: 0, + AddinEnforceHttps: 2, + FirstPartyAnonymousProxyReadyCheckTimeout: 6, + AddinRibbonIdAllowUnknown: 9, + ManifestParserDevConsoleLog: 15, + AddinActionDefinitionHybridMode: 18, + UseActionIdForUILessCommand: 20, + RequirementSetRibbonApiOnePointTwo: 21, + SetFocusToTaskpaneIsEnabled: 22, + ShortcutInfoArrayInUserPreferenceData: 23, + OSFTestFlight1000: OSF.TestFlightStart, + OSFTestFlight1001: OSF.TestFlightStart + 1, + OSFTestFlight1002: OSF.TestFlightStart + 2, + OSFTestFlight1003: OSF.TestFlightStart + 3, + OSFTestFlight1004: OSF.TestFlightStart + 4, + OSFTestFlight1005: OSF.TestFlightStart + 5, + OSFTestFlight1006: OSF.TestFlightStart + 6, + OSFTestFlight1007: OSF.TestFlightStart + 7, + OSFTestFlight1008: OSF.TestFlightStart + 8, + OSFTestFlight1009: OSF.TestFlightEnd +}; +OSF.TrustUXFlightValues = { + TrustUXControlA: 0, + TrustUXExperimentB: 1, + TrustUXExperimentC: 2 +}; +OSF.FlightTreatmentNames = { + AddinTrustUXImprovement: "Microsoft.Office.SharedOnline.AddinTrustUXImprovement", + BlockAutoOpenAddInIfStoreDisabled: "Microsoft.Office.SharedOnline.BlockAutoOpenAddInIfStoreDisabled", + Bug7083046KillSwitch: "Microsoft.Office.SharedOnline.Bug7083046KillSwitch", + CheckProxyIsReadyRetry: "Microsoft.Office.SharedOnline.OEP.CheckProxyIsReadyRetry", + InsertionDialogFixesEnabled: "Microsoft.Office.SharedOnline.InsertionDialogFixesEnabled", + WopiPreinstalledAddInsEnabled: "Microsoft.Office.SharedOnline.WopiPreinstalledAddInsEnabled", + WopiUseNewActivate: "Microsoft.Office.SharedOnline.WopiUseNewActivate", + MosManifestEnabled: "Microsoft.Office.SharedOnline.OEP.MosManifest", + RemoveGetTrustNoPrompt: "Microsoft.Office.SharedOnline.removeGetTrustNoPrompt", + HostTrustDialog: "Microsoft.Office.SharedOnline.HostTrustDialog", + AddinDetailsServiceSupportEnabled: "Microsoft.Office.SharedOnline.AddinDetailsServiceSupportEnabled", + GetAddinFlyoutEnabled: "Microsoft.Office.SharedOnline.GetAddinFlyoutEnabled", + BackstageEnabled: "Microsoft.Office.SharedOnline.NewBackstageEnabled", + EnablingWindowOpenUsageLogging: "Microsoft.Office.SharedOnline.EnablingWindowOpenUsageLogging" +}; +OSF.Flights = []; +OSF.IntFlights = {}; +OSF.Settings = {}; +OSF.WindowNameItemKeys = { + BaseFrameName: "baseFrameName", + HostInfo: "hostInfo", + XdmInfo: "xdmInfo", + SerializerVersion: "serializerVersion", + AppContext: "appContext", + Flights: "flights" +}; +OSF.OUtil = (function () { + var _uniqueId = -1; + var _xdmInfoKey = '&_xdm_Info='; + var _serializerVersionKey = '&_serializer_version='; + var _flightsKey = '&_flights='; + var _xdmSessionKeyPrefix = '_xdm_'; + var _serializerVersionKeyPrefix = '_serializer_version='; + var _flightsKeyPrefix = '_flights='; + var _fragmentSeparator = '#'; + var _fragmentInfoDelimiter = '&'; + var _classN = "class"; + var _loadedScripts = {}; + var _defaultScriptLoadingTimeout = 30000; + var _safeSessionStorage = null; + var _safeLocalStorage = null; + var _rndentropy = new Date().getTime(); + function _random() { + var nextrand = 0x7fffffff * (Math.random()); + nextrand ^= _rndentropy ^ ((new Date().getMilliseconds()) << Math.floor(Math.random() * (31 - 10))); + return nextrand.toString(16); + } + ; + function _getSessionStorage() { + if (!_safeSessionStorage) { + try { + var sessionStorage = window.sessionStorage; + } + catch (ex) { + sessionStorage = null; + } + _safeSessionStorage = new OfficeExt.SafeStorage(sessionStorage); + } + return _safeSessionStorage; + } + ; + function _reOrderTabbableElements(elements) { + var bucket0 = []; + var bucketPositive = []; + var i; + var len = elements.length; + var ele; + for (i = 0; i < len; i++) { + ele = elements[i]; + if (ele.tabIndex) { + if (ele.tabIndex > 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex === 0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive = bucketPositive.sort(function (left, right) { + var diff = left.tabIndex - right.tabIndex; + if (diff === 0) { + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + return { + set_entropy: function OSF_OUtil$set_entropy(entropy) { + if (typeof entropy == "string") { + for (var i = 0; i < entropy.length; i += 4) { + var temp = 0; + for (var j = 0; j < 4 && i + j < entropy.length; j++) { + temp = (temp << 8) + entropy.charCodeAt(i + j); + } + _rndentropy ^= temp; + } + } + else if (typeof entropy == "number") { + _rndentropy ^= entropy; + } + else { + _rndentropy ^= 0x7fffffff * Math.random(); + } + _rndentropy &= 0x7fffffff; + }, + extend: function OSF_OUtil$extend(child, parent) { + var F = function () { }; + F.prototype = parent.prototype; + child.prototype = new F(); + child.prototype.constructor = child; + child.uber = parent.prototype; + if (parent.prototype.constructor === Object.prototype.constructor) { + parent.prototype.constructor = parent; + } + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name] = {}; + } + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { + if (parent && name && parent[name]) { + delete parent[name]; + } + }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret = {}; + for (var key in settingsCollection) { + var value = settingsCollection[key]; + try { + if (JSON) { + value = JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret = {}; + serializedSettings = serializedSettings || {}; + for (var key in serializedSettings) { + var value = serializedSettings[key]; + try { + if (JSON) { + value = JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if (!_loadedScriptEntry) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + var onLoadTimeOut = function OSF_OUtil_loadScript$onLoadTimeOut() { + if (window.navigator.userAgent.indexOf("Trident") > 0) { + onLoadError(null); + } + else { + onLoadError(new Event("Script load timed out")); + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError(errorEvent) { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(errorEvent); + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadTimeOut, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) { + if (url) { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link); + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { + var parsed = enumObject[str.trim()]; + if (typeof (parsed) == 'undefined') { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed; + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { + var obj = { calc: arguments[0] }; + return function () { + if (obj.calc) { + obj.val = obj.calc.apply(this, arguments); + delete obj.calc; + } + return obj.val; + }; + }, + getUniqueId: function OSF_OUtil$getUniqueId() { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString(); + }, + formatString: function OSF_OUtil$formatString() { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10) + 1; + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }, + generateConversationId: function OSF_OUtil$generateConversationId() { + return [_random(), _random(), (new Date()).getTime().toString()].join('_'); + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId(); + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { + return OSF.OUtil.addInfoAsHash(url, _xdmInfoKey, xdmInfoValue, false); + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) { + return OSF.OUtil.addInfoAsHash(url, _serializerVersionKey, serializerVersion, true); + }, + addFlightsAsHash: function OSF_OUtil$addFlightsAsHash(url, flights) { + return OSF.OUtil.addInfoAsHash(url, _flightsKey, flights, true); + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) { + url = url.trim() || ''; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if (encodeInfo) { + newFragment = [keyName, encodeURIComponent(infoValue), fragment].join(''); + } + else { + newFragment = [fragment, keyName, infoValue].join(''); + } + return [urlWithoutFragment, _fragmentSeparator, newFragment].join(''); + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.HostInfo); + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.XdmInfo); + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.SerializerVersion)); + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseFlights: function OSF_OUtil$parseFlights(skipSessionStorage) { + var flights = OSF.OUtil.parseFlightsWithGivenFragment(skipSessionStorage, window.location.hash); + if (flights.length == 0) { + flights = OSF.OUtil.parseFlightsFromWindowName(skipSessionStorage, window.name); + } + return flights; + }, + checkFlight: function OSF_OUtil$checkFlightEnabled(flight) { + return OSF.Flights && OSF.Flights.indexOf(flight) >= 0; + }, + pushFlight: function OSF_OUtil$pushFlight(flight) { + if (OSF.Flights.indexOf(flight) < 0) { + OSF.Flights.push(flight); + return true; + } + return false; + }, + getBooleanSetting: function OSF_OUtil$getSetting(settingName) { + return OSF.OUtil.getBooleanFromDictionary(OSF.Settings, settingName); + }, + getBooleanFromDictionary: function OSF_OUtil$getBooleanFromDictionary(settings, settingName) { + var result = (settings && settingName && settings[settingName] !== undefined && settings[settingName] && + ((typeof (settings[settingName]) === "string" && settings[settingName].toUpperCase() === 'TRUE') || + (typeof (settings[settingName]) === "boolean" && settings[settingName]))); + return result !== undefined ? result : false; + }, + getIntFromDictionary: function OSF_OUtil$getIntFromDictionary(settings, settingName) { + if (settings && settingName && settings[settingName] !== undefined && (typeof settings[settingName] === "string")) { + return parseInt(settings[settingName]); + } + else { + return NaN; + } + }, + pushIntFlight: function OSF_OUtil$pushIntFlight(flight, flightValue) { + if (!(flight in OSF.IntFlights)) { + OSF.IntFlights[flight] = flightValue; + return true; + } + return false; + }, + getIntFlight: function OSF_OUtil$getIntFlight(flight) { + if (OSF.IntFlights && (flight in OSF.IntFlights)) { + return OSF.IntFlights[flight]; + } + else { + return NaN; + } + }, + parseFlightsFromWindowName: function OSF_OUtil$parseFlightsFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.Flights)); + }, + parseFlightsWithGivenFragment: function OSF_OUtil$parseFlightsWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(_flightsKey, _flightsKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseArrayWithDefault: function OSF_OUtil$parseArrayWithDefault(jsonString) { + var array = []; + try { + array = JSON.parse(jsonString); + } + catch (ex) { } + if (!Array.isArray(array)) { + array = []; + } + return array; + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj != null) { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue != null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >= 0) { + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue = decodeURIComponent(infoValue); + } + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd = window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd == -1) { + sessionKeyEnd = window.name.length; + } + var sessionKey = window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString = window.location.search; + var conversationId = null; + if (searchString) { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1) === '=') { + conversationId = conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId = decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) { + var items = strInfo.split("$"); + if (typeof items[1] == "undefined") { + items = strInfo.split("|"); + } + if (typeof items[1] == "undefined") { + items = strInfo.split("%7C"); + } + return items; + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue = ''; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if (items != undefined && items.length >= 3) { + switch (xdmFieldName) { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break; + } + } + } + return fieldValue; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e = Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) + throw e; + for (var p in expectedProperties) { + e = Function._validateParameter(params[p], expectedProperties[p], p); + if (e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) { + if (typeof (OsfMsAjaxFactory) !== 'undefined' && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) { + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor = descriptor || {}; + for (var nd in attributes) { + var attribute = attributes[nd]; + if (descriptor[attribute] == undefined) { + descriptor[attribute] = true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors = descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for (var i = 0; i < propsLength; i++) { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable = descriptor.writable || false; + } + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret = []; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key == item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value == list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add = list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key] = value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2] = newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj) === "[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj) === "[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj) === "[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.attachEvent) { + element.attachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.detachEvent) { + element.detachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = null; + } + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) { + var xmlhttp; + try { + xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function () { + if (xmlhttp.readyState == 4) { + if (xmlhttp.status == 200) { + onSuccess(xmlhttp.responseText); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + if (!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, c2, c3, a, b, c; + var i; + var length = input.length; + do { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + if (!isNaN(c2)) { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + } + if (isNaN(c2)) { + temp[i - 1] = 64; + } + else if (isNaN(c3)) { + temp[i - 2] = 64; + temp[i - 1] = 64; + } + for (var t = 0; t < i; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getSessionStorage: function OSF_Outil$getSessionStorage() { + return _getSessionStorage(); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage = window.localStorage; + } + catch (ex) { + localStorage = null; + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage); + } + return _safeLocalStorage; + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) { + var hex = "#" + (Number(val) + 0x1000000).toString(16).slice(-6); + return hex; + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) { + element.onclick = function (e) { + handler(); + }; + element.ontouchend = function (e) { + handler(); + e.preventDefault(); + }; + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) { + var e = Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: false }, + { name: "paramName", type: String, mayBeNull: false } + ]); + if (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return ""; + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)", "i"); + if (!queryExp.test(queryString)) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return ""; + } + return queryExp.exec(queryString)[1]; + }, + getHostnamePortionForLogging: function OSF_Outil$getHostnamePortionForLogging(hostname) { + var e = Function._validateParams(arguments, [{ name: "hostname", type: String, mayBeNull: false } + ]); + if (e) { + return ""; + } + var hostnameSubstrings = hostname.split('.'); + var len = hostnameSubstrings.length; + if (len >= 2) { + return hostnameSubstrings[len - 2] + "." + hostnameSubstrings[len - 1]; + } + else if (len == 1) { + return hostnameSubstrings[0]; + } + }, + isiOS: function OSF_Outil$isiOS() { + return (window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false); + }, + isChrome: function OSF_Outil$isChrome() { + return (window.navigator.userAgent.indexOf("Chrome") > 0) && !OSF.OUtil.isEdge(); + }, + isEdge: function OSF_Outil$isEdge() { + return window.navigator.userAgent.indexOf("Edge") > 0; + }, + isIE: function OSF_Outil$isIE() { + return window.navigator.userAgent.indexOf("Trident") > 0; + }, + isFirefox: function OSF_Outil$isFirefox() { + return window.navigator.userAgent.indexOf("Firefox") > 0; + }, + startsWith: function OSF_Outil$startsWith(originalString, patternToCheck, browserIsIE) { + if (browserIsIE) { + return originalString.substr(0, patternToCheck.length) === patternToCheck; + } + else { + return originalString.startsWith(patternToCheck); + } + }, + containsPort: function OSF_Outil$containsPort(url, protocol, hostname, portNumber) { + return this.startsWith(url, protocol + "//" + hostname + ":" + portNumber, true) || this.startsWith(url, hostname + ":" + portNumber, true); + }, + getRedundandPortString: function OSF_Outil$getRedundandPortString(url, parser) { + if (!url || !parser) + return ""; + if (parser.protocol == "https:" && this.containsPort(url, "https:", parser.hostname, "443")) + return ":443"; + else if (parser.protocol == "http:" && this.containsPort(url, "http:", parser.hostname, "80")) + return ":80"; + return ""; + }, + removeChar: function OSF_Outil$removeChar(url, indexOfCharToRemove) { + if (indexOfCharToRemove < url.length - 1) + return url.substring(0, indexOfCharToRemove) + url.substring(indexOfCharToRemove + 1); + else if (indexOfCharToRemove == url.length - 1) + return url.substring(0, url.length - 1); + else + return url; + }, + cleanUrlOfChar: function OSF_Outil$cleanUrlOfChar(url, charToClean) { + var i; + for (i = 0; i < url.length; i++) { + if (url.charAt(i) === charToClean) { + if (i + 1 >= url.length) { + return this.removeChar(url, i); + } + else if (charToClean === '/') { + if (url.charAt(i + 1) === '?' || url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + else if (charToClean === '?') { + if (url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + } + } + return url; + }, + cleanUrl: function OSF_Outil$cleanUrl(url) { + url = this.cleanUrlOfChar(url, '/'); + url = this.cleanUrlOfChar(url, '?'); + url = this.cleanUrlOfChar(url, '#'); + if (url.substr(0, 8) == "https://") { + var portIndex = url.indexOf(":443"); + if (portIndex != -1) { + if (portIndex == url.length - 4 || url.charAt(portIndex + 4) == "/" || url.charAt(portIndex + 4) == "?" || url.charAt(portIndex + 4) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 4); + } + } + } + else if (url.substr(0, 7) == "http://") { + var portIndex = url.indexOf(":80"); + if (portIndex != -1) { + if (portIndex == url.length - 3 || url.charAt(portIndex + 3) == "/" || url.charAt(portIndex + 3) == "?" || url.charAt(portIndex + 3) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 3); + } + } + } + return url; + }, + parseUrl: function OSF_Outil$parseUrl(url, enforceHttps) { + if (enforceHttps === void 0) { enforceHttps = false; } + if (typeof url === "undefined" || !url) { + return undefined; + } + var notHttpsErrorMessage = "NotHttps"; + var invalidUrlErrorMessage = "InvalidUrl"; + var isIEBoolean = this.isIE(); + var parsedUrlObj = { + protocol: undefined, + hostname: undefined, + host: undefined, + port: undefined, + pathname: undefined, + search: undefined, + hash: undefined, + isPortPartOfUrl: undefined + }; + try { + if (isIEBoolean) { + var parser = document.createElement("a"); + parser.href = url; + if (!parser || !parser.protocol || !parser.host || !parser.hostname || !parser.href + || this.cleanUrl(parser.href).toLowerCase() !== this.cleanUrl(url).toLowerCase()) { + throw invalidUrlErrorMessage; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && parser.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + var redundandPortString = this.getRedundandPortString(url, parser); + parsedUrlObj.protocol = parser.protocol; + parsedUrlObj.hostname = parser.hostname; + parsedUrlObj.port = (redundandPortString == "") ? parser.port : ""; + parsedUrlObj.host = (redundandPortString != "") ? parser.hostname : parser.host; + parsedUrlObj.pathname = (isIEBoolean ? "/" : "") + parser.pathname; + parsedUrlObj.search = parser.search; + parsedUrlObj.hash = parser.hash; + parsedUrlObj.isPortPartOfUrl = this.containsPort(url, parser.protocol, parser.hostname, parser.port); + } + else { + var urlObj = new URL(url); + if (urlObj && urlObj.protocol && urlObj.host && urlObj.hostname) { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && urlObj.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + parsedUrlObj.protocol = urlObj.protocol; + parsedUrlObj.hostname = urlObj.hostname; + parsedUrlObj.port = urlObj.port; + parsedUrlObj.host = urlObj.host; + parsedUrlObj.pathname = urlObj.pathname; + parsedUrlObj.search = urlObj.search; + parsedUrlObj.hash = urlObj.hash; + parsedUrlObj.isPortPartOfUrl = urlObj.host.lastIndexOf(":" + urlObj.port) == (urlObj.host.length - urlObj.port.length - 1); + } + } + } + catch (err) { + if (err.message === notHttpsErrorMessage) + throw err; + } + return parsedUrlObj; + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) { + if (sourceObj == null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr = []; + for (var i = 0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj = sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property] = sourceObj[property]; + } + } + return copyObj; + } + }, + createObject: function OSF_Outil$createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + }, + addClass: function OSF_OUtil$addClass(elmt, val) { + if (!OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + if (className) { + elmt.setAttribute(_classN, className + " " + val); + } + else { + elmt.setAttribute(_classN, val); + } + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) { + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findNextPos = function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && backward) { + return -1; + } + else if (currPos === allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if (all.length === 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, backward); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findCurrPos = function (all, curr) { + var i = 0; + for (; i < all.length; i++) { + if (all[i] === curr) { + return i; + } + } + return -1; + }; + var findNextPos = function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && shift) { + return -1; + } + else if (currPos === allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all, curr); + next = findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, shift); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + isNullOrUndefined: function OSF_OUtil$isNullOrUndefined(value) { + if (typeof (value) === "undefined") { + return true; + } + if (value === null) { + return true; + } + return false; + }, + stringEndsWith: function OSF_OUtil$stringEndsWith(value, subString) { + if (!OSF.OUtil.isNullOrUndefined(value) && !OSF.OUtil.isNullOrUndefined(subString)) { + if (subString.length > value.length) { + return false; + } + if (value.substr(value.length - subString.length) === subString) { + return true; + } + } + return false; + }, + hashCode: function OSF_OUtil$hashCode(str) { + var hash = 0; + if (!OSF.OUtil.isNullOrUndefined(str)) { + var i = 0; + var len = str.length; + while (i < len) { + hash = (hash << 5) - hash + str.charCodeAt(i++) | 0; + } + } + return hash; + }, + getValue: function OSF_OUtil$getValue(value, defaultValue) { + if (OSF.OUtil.isNullOrUndefined(value)) { + return defaultValue; + } + return value; + }, + externalNativeFunctionExists: function OSF_OUtil$externalNativeFunctionExists(type) { + return type === 'unknown' || type !== 'undefined'; + } + }; +})(); +OSF.OUtil.Guid = (function () { + var hexCode = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result = ""; + var tick = (new Date()).getTime(); + var index = 0; + for (; index < 32 && tick > 0; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + }; +})(); +try { + (function () { + OSF.Flights = OSF.OUtil.parseFlights(true); + })(); +} +catch (ex) { } +window.OSF = OSF; +(function (OfficeExt) { + var loadMsAjax = false; + var MsAjaxTypeHelper = (function () { + function MsAjaxTypeHelper() { + } + MsAjaxTypeHelper.isInstanceOfType = function (type, instance) { + if (typeof (instance) === "undefined" || instance === null) + return false; + if (instance instanceof type) + return true; + var instanceType = instance.constructor; + if (!instanceType || (typeof (instanceType) !== "function") || !instanceType.__typeName || instanceType.__typeName === 'Object') { + instanceType = Object; + } + return !!(instanceType === type) || + (instanceType.__typeName && type.__typeName && instanceType.__typeName === type.__typeName); + }; + return MsAjaxTypeHelper; + }()); + OfficeExt.MsAjaxTypeHelper = MsAjaxTypeHelper; + var MsAjaxError = (function () { + function MsAjaxError() { + } + MsAjaxError.create = function (message, errorInfo) { + var err = new Error(message); + err.message = message; + if (errorInfo) { + for (var v in errorInfo) { + err[v] = errorInfo[v]; + } + } + err.popStackFrame(); + return err; + }; + MsAjaxError.parameterCount = function (message) { + var displayMessage = "Sys.ParameterCountException: " + (message ? message : "Parameter count mismatch."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.ParameterCountException' }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argument = function (paramName, message) { + var displayMessage = "Sys.ArgumentException: " + (message ? message : "Value does not fall within the expected range."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentNull = function (paramName, message) { + var displayMessage = "Sys.ArgumentNullException: " + (message ? message : "Value cannot be null."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentOutOfRange = function (paramName, actualValue, message) { + var displayMessage = "Sys.ArgumentOutOfRangeException: " + (message ? message : "Specified argument was out of the range of valid values."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + if (typeof (actualValue) !== "undefined" && actualValue !== null) { + displayMessage += "\n" + MsAjaxString.format("Actual value was {0}.", actualValue); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentType = function (paramName, actualType, expectedType, message) { + var displayMessage = "Sys.ArgumentTypeException: "; + if (message) { + displayMessage += message; + } + else if (actualType && expectedType) { + displayMessage += MsAjaxString.format("Object of type '{0}' cannot be converted to type '{1}'.", actualType.getName ? actualType.getName() : actualType, expectedType.getName ? expectedType.getName() : expectedType); + } + else { + displayMessage += "Object cannot be converted to the required type."; + } + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentUndefined = function (paramName, message) { + var displayMessage = "Sys.ArgumentUndefinedException: " + (message ? message : "Value cannot be undefined."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.invalidOperation = function (message) { + var displayMessage = "Sys.InvalidOperationException: " + (message ? message : "Operation is not valid due to the current state of the object."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.InvalidOperationException' }); + err.popStackFrame(); + return err; + }; + return MsAjaxError; + }()); + OfficeExt.MsAjaxError = MsAjaxError; + var MsAjaxString = (function () { + function MsAjaxString() { + } + MsAjaxString.format = function (format) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var source = format; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10); + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }; + MsAjaxString.startsWith = function (str, prefix) { + return (str.substr(0, prefix.length) === prefix); + }; + return MsAjaxString; + }()); + OfficeExt.MsAjaxString = MsAjaxString; + var MsAjaxDebug = (function () { + function MsAjaxDebug() { + } + MsAjaxDebug.trace = function (text) { + if (typeof Debug !== "undefined" && Debug.writeln) + Debug.writeln(text); + if (window.console && window.console.log) + window.console.log(text); + if (window.opera && window.opera.postError) + window.opera.postError(text); + if (window.debugService && window.debugService.trace) + window.debugService.trace(text); + var a = document.getElementById("TraceConsole"); + if (a && a.tagName.toUpperCase() === "TEXTAREA") { + a.appendChild(document.createTextNode(text + "\n")); + } + }; + return MsAjaxDebug; + }()); + OfficeExt.MsAjaxDebug = MsAjaxDebug; + if (!loadMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) { + var registerTypeInternal = function registerTypeInternal(type, name, isClass) { + if (type.__typeName === undefined || type.__typeName === null) { + type.__typeName = name; + } + if (type.__class === undefined || type.__class === null) { + type.__class = isClass; + } + }; + registerTypeInternal(Function, "Function", true); + registerTypeInternal(Error, "Error", true); + registerTypeInternal(Object, "Object", true); + registerTypeInternal(String, "String", true); + registerTypeInternal(Boolean, "Boolean", true); + registerTypeInternal(Date, "Date", true); + registerTypeInternal(Number, "Number", true); + registerTypeInternal(RegExp, "RegExp", true); + registerTypeInternal(Array, "Array", true); + if (!Function.createCallback) { + Function.createCallback = function Function$createCallback(method, context) { + var e = Function._validateParams(arguments, [ + { name: "method", type: Function }, + { name: "context", mayBeNull: true } + ]); + if (e) + throw e; + return function () { + var l = arguments.length; + if (l > 0) { + var args = []; + for (var i = 0; i < l; i++) { + args[i] = arguments[i]; + } + args[l] = context; + return method.apply(this, args); + } + return method.call(this, context); + }; + }; + } + if (!Function.createDelegate) { + Function.createDelegate = function Function$createDelegate(instance, method) { + var e = Function._validateParams(arguments, [ + { name: "instance", mayBeNull: true }, + { name: "method", type: Function } + ]); + if (e) + throw e; + return function () { + return method.apply(instance, arguments); + }; + }; + } + if (!Function._validateParams) { + Function._validateParams = function (params, expectedParams, validateParameterCount) { + var e, expectedLength = expectedParams.length; + validateParameterCount = validateParameterCount || (typeof (validateParameterCount) === "undefined"); + e = Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i = 0, l = params.length; i < l; i++) { + var expectedParam = expectedParams[Math.min(i, expectedLength - 1)], paramName = expectedParam.name; + if (expectedParam.parameterArray) { + paramName += "[" + (i - expectedLength + 1) + "]"; + } + else if (!validateParameterCount && (i >= expectedLength)) { + break; + } + e = Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; + }; + } + if (!Function._validateParameterCount) { + Function._validateParameterCount = function (params, expectedParams, validateParameterCount) { + var i, error, expectedLen = expectedParams.length, actualLen = params.length; + if (actualLen < expectedLen) { + var minParams = expectedLen; + for (i = 0; i < expectedLen; i++) { + var param = expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error = true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error = true; + for (i = 0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error = false; + break; + } + } + } + if (error) { + var e = MsAjaxError.parameterCount(); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!Function._validateParameter) { + Function._validateParameter = function (param, expectedParam, paramName) { + var e, expectedType = expectedParam.type, expectedInteger = !!expectedParam.integer, expectedDomElement = !!expectedParam.domElement, mayBeNull = !!expectedParam.mayBeNull; + e = Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType = expectedParam.elementType, elementMayBeNull = !!expectedParam.elementMayBeNull; + if (expectedType === Array && typeof (param) !== "undefined" && param !== null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger = !!expectedParam.elementInteger, expectedElementDomElement = !!expectedParam.elementDomElement; + for (var i = 0; i < param.length; i++) { + var elem = param[i]; + e = Function._validateParameterType(elem, expectedElementType, expectedElementInteger, expectedElementDomElement, elementMayBeNull, paramName + "[" + i + "]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; + }; + } + if (!Function._validateParameterType) { + Function._validateParameterType = function (param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof (param) === "undefined") { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param === null) { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && !OfficeExt.MsAjaxTypeHelper.isInstanceOfType(expectedType, param)) { + e = OfficeExt.MsAjaxError.argumentType(paramName, typeof (param), expectedType); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!window.Type) { + window.Type = Function; + } + if (!Type.registerNamespace) { + Type.registerNamespace = function (ns) { + var namespaceParts = ns.split('.'); + var currentNamespace = window; + for (var i = 0; i < namespaceParts.length; i++) { + currentNamespace[namespaceParts[i]] = currentNamespace[namespaceParts[i]] || {}; + currentNamespace = currentNamespace[namespaceParts[i]]; + } + }; + } + if (!Type.prototype.registerClass) { + Type.prototype.registerClass = function (cls) { cls = {}; }; + } + if (typeof (Sys) === "undefined") { + Type.registerNamespace('Sys'); + } + if (!Error.prototype.popStackFrame) { + Error.prototype.popStackFrame = function () { + if (arguments.length !== 0) + throw MsAjaxError.parameterCount(); + if (typeof (this.stack) === "undefined" || this.stack === null || + typeof (this.fileName) === "undefined" || this.fileName === null || + typeof (this.lineNumber) === "undefined" || this.lineNumber === null) { + return; + } + var stackFrames = this.stack.split("\n"); + var currentFrame = stackFrames[0]; + var pattern = this.fileName + ":" + this.lineNumber; + while (typeof (currentFrame) !== "undefined" && + currentFrame !== null && + currentFrame.indexOf(pattern) === -1) { + stackFrames.shift(); + currentFrame = stackFrames[0]; + } + var nextFrame = stackFrames[1]; + if (typeof (nextFrame) === "undefined" || nextFrame === null) { + return; + } + var nextFrameParts = nextFrame.match(/@(.*):(\d+)$/); + if (typeof (nextFrameParts) === "undefined" || nextFrameParts === null) { + return; + } + this.fileName = nextFrameParts[1]; + this.lineNumber = parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack = stackFrames.join("\n"); + }; + } + OsfMsAjaxFactory.msAjaxError = MsAjaxError; + OsfMsAjaxFactory.msAjaxString = MsAjaxString; + OsfMsAjaxFactory.msAjaxDebug = MsAjaxDebug; + } +})(OfficeExt || (OfficeExt = {})); +OSF.SupportedLocales = { + "ar-sa": true, + "bg-bg": true, + "bn-in": true, + "ca-es": true, + "cs-cz": true, + "da-dk": true, + "de-de": true, + "el-gr": true, + "en-us": true, + "es-es": true, + "et-ee": true, + "eu-es": true, + "fa-ir": true, + "fi-fi": true, + "fr-fr": true, + "gl-es": true, + "he-il": true, + "hi-in": true, + "hr-hr": true, + "hu-hu": true, + "id-id": true, + "it-it": true, + "ja-jp": true, + "kk-kz": true, + "ko-kr": true, + "lo-la": true, + "lt-lt": true, + "lv-lv": true, + "ms-my": true, + "nb-no": true, + "nl-nl": true, + "nn-no": true, + "pl-pl": true, + "pt-br": true, + "pt-pt": true, + "ro-ro": true, + "ru-ru": true, + "sk-sk": true, + "sl-si": true, + "sr-cyrl-cs": true, + "sr-cyrl-rs": true, + "sr-latn-cs": true, + "sr-latn-rs": true, + "sv-se": true, + "th-th": true, + "tr-tr": true, + "uk-ua": true, + "ur-pk": true, + "vi-vn": true, + "zh-cn": true, + "zh-tw": true +}; +OSF.AssociatedLocales = { + ar: "ar-sa", + bg: "bg-bg", + bn: "bn-in", + ca: "ca-es", + cs: "cs-cz", + da: "da-dk", + de: "de-de", + el: "el-gr", + en: "en-us", + es: "es-es", + et: "et-ee", + eu: "eu-es", + fa: "fa-ir", + fi: "fi-fi", + fr: "fr-fr", + gl: "gl-es", + he: "he-il", + hi: "hi-in", + hr: "hr-hr", + hu: "hu-hu", + id: "id-id", + it: "it-it", + ja: "ja-jp", + kk: "kk-kz", + ko: "ko-kr", + lo: "lo-la", + lt: "lt-lt", + lv: "lv-lv", + ms: "ms-my", + nb: "nb-no", + nl: "nl-nl", + nn: "nn-no", + pl: "pl-pl", + pt: "pt-br", + ro: "ro-ro", + ru: "ru-ru", + sk: "sk-sk", + sl: "sl-si", + sr: "sr-cyrl-cs", + sv: "sv-se", + th: "th-th", + tr: "tr-tr", + uk: "uk-ua", + ur: "ur-pk", + vi: "vi-vn", + zh: "zh-cn" +}; +OSF.SupportedRTLLocales = { + "ar-sa": true, + "he-il": true, + "fa-ir": true, + "ur-pk": true +}; +OSF.getSupportedLocale = function OSF$getSupportedLocale(locale, defaultLocale) { + if (defaultLocale === void 0) { defaultLocale = "en-us"; } + if (!locale) { + return defaultLocale; + } + var supportedLocale; + locale = locale.toLowerCase(); + if (locale in OSF.SupportedLocales) { + supportedLocale = locale; + } + else { + var localeParts = locale.split('-', 1); + if (localeParts && localeParts.length > 0) { + supportedLocale = OSF.AssociatedLocales[localeParts[0]]; + } + } + if (!supportedLocale) { + supportedLocale = defaultLocale; + } + return supportedLocale; +}; +OSF.isRTLLocale = function OSF$isRTLLocale(locale) { + if (!locale) { + return false; + } + return OSF.SupportedRTLLocales[locale.toLowerCase()] || false; +}; +var InfoType; +(function (InfoType) { + InfoType[InfoType["Error"] = 0] = "Error"; + InfoType[InfoType["Warning"] = 1] = "Warning"; + InfoType[InfoType["Information"] = 2] = "Information"; + InfoType[InfoType["SecurityInfo"] = 3] = "SecurityInfo"; +})(InfoType || (InfoType = {})); +; +var TrustResult; +(function (TrustResult) { + TrustResult[TrustResult["Unknown"] = 0] = "Unknown"; + TrustResult[TrustResult["Trusted"] = 1] = "Trusted"; + TrustResult[TrustResult["Prompting"] = 2] = "Prompting"; +})(TrustResult || (TrustResult = {})); +var SupportedError = { + "APICallFailed": true, + "NotTrustedWAC": true +}; +function _loadJs(url, callback) { + var scriptElement = document.createElement("script"); + scriptElement.src = url; + scriptElement.type = "text/javascript"; + scriptElement.addEventListener("load", callback); + document.getElementsByTagName("head")[0].appendChild(scriptElement); +} +var PathToStringFile = "../{locale}/office_strings.js"; +var Strings = {}; +function _getUrlParams() { + var urlHash = window.location.hash.replace('#', ''); + urlHash = decodeURIComponent(urlHash); + return JSON.parse(urlHash); +} +function _loadStrings(locale, callback) { + var localeOrDefault = OSF.getSupportedLocale(locale); + var url = PathToStringFile.replace("{locale}", localeOrDefault); + _loadJs(url, callback); +} +function _getConfirmedResultKey(hostname, noHttps) { + return "OfficeJSTrustKeyV2_" + (noHttps ? "http_" : "https_") + hostname; +} +function _hostTrustResult(hostname, noHttps) { + var _localStorage = OSF.OUtil.getLocalStorage(); + var trustResult = JSON.parse(_localStorage.getItem(_getConfirmedResultKey(hostname, noHttps))); + return (trustResult) ? trustResult.Result : TrustResult.Unknown; +} +function _confirmHost(hostname, noHttps, useHtmlPopup, callback) { + var keyResult = _getConfirmedResultKey(hostname, noHttps); + var keyResultTimeStamp = keyResult + "TimeStamp"; + var hostTrustResult = _hostTrustResult(hostname, noHttps); + if (hostTrustResult == TrustResult.Prompting) { + var _localStorage = OSF.OUtil.getLocalStorage(); + var promptStarted = JSON.parse(_localStorage.getItem(keyResultTimeStamp)); + var elapseTimeMs = Date.now() - promptStarted; + if (elapseTimeMs >= 30000) { + hostTrustResult = TrustResult.Unknown; + } + } + switch (+hostTrustResult) { + case TrustResult.Unknown: + function popUpConfirm() { + var _localStorage = OSF.OUtil.getLocalStorage(); + var value = { Result: TrustResult.Prompting }; + _localStorage.setItem(keyResult, JSON.stringify(value)); + _localStorage.setItem(keyResultTimeStamp, JSON.stringify(Date.now())); + var confirmMessage = Strings.OfficeOM["L_ConfirmDialog"].replace('{0}', hostname); + if (noHttps) { + confirmMessage += " " + Strings.OfficeOM["L_NoHttpsWAC"]; + } + var confirmed = confirm(confirmMessage); + value.Result = (confirmed) ? TrustResult.Trusted : TrustResult.Unknown; + _localStorage.setItem(keyResult, JSON.stringify(value)); + _localStorage.removeItem(keyResultTimeStamp); + return confirmed; + } + if (useHtmlPopup) { + var _localStorage = OSF.OUtil.getLocalStorage(); + var value = { Result: TrustResult.Prompting }; + _localStorage.setItem(keyResult, JSON.stringify(value)); + _localStorage.setItem(keyResultTimeStamp, JSON.stringify(Date.now())); + var hashObj = { + isConfirm: true, + useHtmlPopup: true, + error: "", + locale: "", + hostname: hostname, + noHttps: noHttps, + validate: false + }; + var confirmDialogURL = "./index.html#" + encodeURIComponent(JSON.stringify(hashObj)); + var confirmWindow_1 = open(confirmDialogURL, "ConfirmTrust", "popup=yes,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no,width=600,height=350,top=300,left=600"); + confirmWindow_1.addEventListener("load", function () { + confirmWindow_1._confirmMessageHostName(function (confirmed) { + value.Result = confirmed ? TrustResult.Trusted : TrustResult.Unknown; + _localStorage.setItem(keyResult, JSON.stringify(value)); + _localStorage.removeItem(keyResultTimeStamp); + callback(confirmed); + }, hostname, noHttps); + }); + } + else { + callback(popUpConfirm()); + } + break; + case TrustResult.Trusted: + callback(true); + break; + case TrustResult.Prompting: + function storageChanged(event) { + OSF.OUtil.removeEventListener(window, "storage", storageChanged); + var newTrustResult = _hostTrustResult(hostname, noHttps); + callback(newTrustResult == TrustResult.Trusted); + } + OSF.OUtil.addEventListener(window, "storage", storageChanged); + break; + } +} +function _showInfoBar(hostname, noHttps, useHtmlPopup, errorMessage, errorTitle) { + var tooltipString = errorMessage; + if (errorMessage.length > 255) { + errorMessage = errorMessage.substring(0, 254); + } + var infoBarDiv = document.createElement('div'); + infoBarDiv.setAttribute("class", "moe-infobar-body"); + var tooltipDiv = document.createElement("div"); + tooltipDiv.innerHTML = tooltipString; + infoBarDiv.setAttribute("title", tooltipDiv.textContent); + var infoTable = document.createElement('table'); + infoTable.setAttribute("class", "moe-infobar-infotable"); + infoTable.setAttribute("role", "presentation"); + var row, i; + for (i = 0; i < 3; i++) { + row = infoTable.insertRow(i); + row.setAttribute("role", "presentation"); + } + var infoTableRows = infoTable.rows; + infoTableRows[0].insertCell(0); + infoTableRows[0].insertCell(1); + infoTableRows[0].cells[1].setAttribute("rowSpan", "2"); + infoTableRows[1].insertCell(0); + infoTableRows[1].insertCell(1); + infoTableRows[2].insertCell(0); + infoTableRows[2].insertCell(1); + infoTableRows[0].cells[0].setAttribute("class", "moe-infobar-top-left-cell"); + infoTableRows[0].cells[1].setAttribute("class", "moe-infobar-message-cell"); + infoTableRows[2].cells[1].setAttribute("class", "moe-infobar-button-cell"); + var moeCommonImg = document.createElement("img"); + moeCommonImg.src = "images/moe_status_icons.png"; + var className; + var errorType = InfoType.Error; + if (errorType === InfoType.Error) { + className = "moe-infobar-error"; + } + else if (errorType === InfoType.Warning) { + className = "moe-infobar-warning"; + } + else if (errorType === InfoType.Information) { + className = "moe-infobar-info"; + } + else { + className = "moe-infobar-secinfo"; + } + if (_isRTLLocale()) { + className = className + "-rtl"; + } + moeCommonImg.setAttribute("class", className); + moeCommonImg.setAttribute("alt", tooltipString); + infoTableRows[0].cells[0].appendChild(moeCommonImg); + var msgDiv = document.createElement("a"); + msgDiv.setAttribute("class", "moe-infobar-message-div"); + msgDiv.setAttribute("tabindex", "1"); + if (errorTitle) { + var titleSpan = document.createElement("span"); + titleSpan.setAttribute("class", "moe-infobar-title"); + titleSpan.innerHTML = errorTitle; + msgDiv.appendChild(titleSpan); + } + var descSpan = document.createElement("span"); + descSpan.setAttribute("class", "moe-infobar-message"); + descSpan.innerHTML = errorMessage; + msgDiv.appendChild(descSpan); + if (noHttps) { + var httpsMessageSpan = document.createElement("span"); + httpsMessageSpan.setAttribute("class", "moe-infobar-message"); + httpsMessageSpan.innerHTML = Strings.OfficeOM["L_NoHttpsWAC"]; + msgDiv.appendChild(document.createElement("br")); + msgDiv.appendChild(document.createElement("br")); + msgDiv.appendChild(httpsMessageSpan); + msgDiv.appendChild(document.createElement("br")); + msgDiv.appendChild(document.createElement("br")); + } + infoTableRows[0].cells[1].appendChild(msgDiv); + var resultMessageSpan = document.createElement("span"); + resultMessageSpan.setAttribute("class", "moe-infobar-message"); + resultMessageSpan.setAttribute("style", "display:none"); + resultMessageSpan.innerHTML = Strings.OfficeOM["L_ConfirmCancelMessage"]; + var continueButton = document.createElement("button"); + continueButton.setAttribute("class", "moe-infobar-button"); + continueButton.setAttribute("type", "button"); + continueButton.innerHTML = Strings.OfficeOM["L_ContinueButton"]; + continueButton.onclick = function (event) { + _confirmHost(hostname, noHttps, useHtmlPopup, function (hostConfirmed) { + if (hostConfirmed) { + resultMessageSpan.innerHTML = Strings.OfficeOM["L_ConfirmRefreshMessage"]; + } + continueButton.setAttribute("style", "display:none"); + resultMessageSpan.removeAttribute("style"); + }); + }; + infoTableRows[2].cells[1].appendChild(continueButton); + infoTableRows[2].cells[1].appendChild(resultMessageSpan); + infoBarDiv.appendChild(infoTable); + var backgroundDiv = document.createElement('div'); + backgroundDiv.setAttribute("class", "moe-background"); + backgroundDiv.style.backgroundImage = "url(images/agavedefaulticon96x96.png)"; + backgroundDiv.style.backgroundColor = 'white'; + backgroundDiv.style.opacity = '1'; + backgroundDiv.style.filter = 'alpha(opacity=100)'; + backgroundDiv.style.backgroundRepeat = "no-repeat"; + backgroundDiv.style.backgroundPosition = "center"; + var infoBarOutDiv = document.createElement("div"); + infoBarOutDiv.setAttribute("class", "moe-infobar-out"); + infoBarOutDiv.appendChild(infoBarDiv); + backgroundDiv.appendChild(infoBarOutDiv); + var containerDiv = document.getElementById("container"); + if (containerDiv) { + containerDiv.appendChild(backgroundDiv); + } +} +; +try { + var urlParams_1 = _getUrlParams(); + var e = Function._validateParams(urlParams_1, [{ name: "error", type: String, mayBeNull: false }, + { name: "hostname", type: String, mayBeNull: false }, + { name: "noHttps", type: Boolean, mayBeNull: false }, + { name: "validate", type: Boolean, mayBeNull: false }, + { name: "useHtmlPopup", type: Boolean, mayBeNull: true }, + { name: "isConfirm", type: Boolean, mayBeNull: true } + ]); + if (!e) { + var locale_1 = window.navigator.language; + if (urlParams_1.useHtmlPopup && !urlParams_1.validate) { + if (OSF.isRTLLocale(OSF.getSupportedLocale(locale_1))) { + document.getElementById("container").style.direction = 'rtl'; + } + } + if (urlParams_1.isConfirm && urlParams_1.useHtmlPopup) { + } + else if (urlParams_1.validate) { + function validateHostnameTrust(event) { + var receivedObj = JSON.parse(event.data); + var e = Function._validateParams(receivedObj, [{ name: "hostname", type: String, mayBeNull: false }, + { name: "noHttps", type: Boolean, mayBeNull: false } + ]); + if (!e) { + var hostTrustResult = _hostTrustResult(receivedObj.hostname, receivedObj.noHttps); + var hostUserTrusted = hostTrustResult === TrustResult.Trusted; + if (urlParams_1.useHtmlPopup) { + var postingObj = { hostUserTrusted: hostUserTrusted }; + event.source.postMessage(JSON.stringify(postingObj), event.origin); + } + else { + if (!hostUserTrusted) { + _loadStrings(locale_1, function () { + _confirmHost(receivedObj.hostname, receivedObj.noHttps, false, function (hostConfirmed) { + var postingObj = { hostUserTrusted: hostConfirmed }; + event.source.postMessage(JSON.stringify(postingObj), event.origin); + }); + }); + } + else { + var postingObj = { hostUserTrusted: hostUserTrusted }; + event.source.postMessage(JSON.stringify(postingObj), event.origin); + } + } + } + } + ; + OSF.OUtil.addEventListener(window, "message", validateHostnameTrust); + } + else { + _loadStrings(locale_1, function () { + if (SupportedError[urlParams_1.error]) + _showInfoBar(urlParams_1.hostname, urlParams_1.noHttps, urlParams_1.useHtmlPopup, Strings.OfficeOM["L_" + urlParams_1.error]); + }); + } + } +} +catch (err) { +} +function _isRTLLocale() { + return document.getElementById("container").style.direction === 'rtl'; +} +function _confirmMessageHostName(callback, hostname, noHttps) { + if (self !== top) { + return; + } + var locale = navigator.language; + _loadStrings(locale, function () { + var rootDiv = document.getElementById("container"); + var contentContainer = document.createElement("div"); + if (_isRTLLocale()) { + contentContainer.setAttribute("class", "confirmContainerRTL"); + } + else { + contentContainer.setAttribute("class", "confirmContainer"); + } + rootDiv.appendChild(contentContainer); + document.title = Strings.OfficeOM["L_ConfirmDialogConsentTitle"]; + var consentTitle = document.createElement("h1"); + consentTitle.setAttribute("class", "consentTitle"); + consentTitle.textContent = Strings.OfficeOM["L_ConfirmDialogConsentTitle"]; + contentContainer.appendChild(consentTitle); + var message = document.createElement("div"); + message.setAttribute("class", "consentMessage"); + contentContainer.appendChild(message); + var confirmDialogSpan = document.createElement("span"); + confirmDialogSpan.textContent = Strings.OfficeOM["L_ConfirmDialog"].replace('{0}', hostname); + message.appendChild(confirmDialogSpan); + if (noHttps == true) { + var httpsMessageSpan = document.createElement("span"); + httpsMessageSpan.textContent = Strings.OfficeOM["L_NoHttpsWAC"]; + message.appendChild(httpsMessageSpan); + } + message.appendChild(document.createElement("br")); + message.appendChild(document.createElement("br")); + var confirmDialogConsentSpan = document.createElement("span"); + confirmDialogConsentSpan.textContent = Strings.OfficeOM["L_ConfirmDialogConsent"].replace('{0}', hostname); + message.appendChild(confirmDialogConsentSpan); + var footer = document.createElement("div"); + footer.setAttribute("class", "confirmFooter"); + contentContainer.appendChild(footer); + var buttonOK = document.createElement("button"); + buttonOK.textContent = Strings.OfficeOM["L_OKButton"]; + buttonOK.setAttribute("class", "confirmOK"); + buttonOK.addEventListener("click", function () { + if (top == self) { + callback(true); + window.close(); + } + }); + footer.appendChild(buttonOK); + var buttonCancel = document.createElement("button"); + buttonCancel.textContent = Strings.OfficeOM["L_CancelButton"]; + buttonCancel.setAttribute("class", "confirmCancel"); + buttonCancel.addEventListener("click", function () { + if (top == self) { + callback(false); + window.close(); + } + }); + footer.appendChild(buttonCancel); + buttonCancel.focus(); + }); +} diff --git a/dist/AgaveErrorUX/AgaveErrorUX.js b/dist/AgaveErrorUX/AgaveErrorUX.js new file mode 100644 index 000000000..802139d89 --- /dev/null +++ b/dist/AgaveErrorUX/AgaveErrorUX.js @@ -0,0 +1,18 @@ +/* Agave error ux page javascript */ + +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + + This file also contains the following Promise implementation (with a few small modifications): + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 2.3.0 +*/ +var OfficeExt;(function(b){var a=function(){var a=true;function b(){}b.prototype.isMsAjaxLoaded=function(){var b="function",c="undefined";if(typeof Sys!==c&&typeof Type!==c&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b&&typeof Function._validateParams===b&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===b)return a;else return false};b.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(b.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==null&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==null&&a.isMsAjaxLoaded())a._msAjaxString=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==null&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return b}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a==h)for(var b=0;b6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(d)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,d)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,b);f[e]=a}catch(g){}}return f},loadScript:function(f,g,i){if(f&&g){var k=window.document,d=v[f];if(!d){var e=k.createElement("script");e.type="text/javascript";d={loaded:c,pendingCallbacks:[g],timer:a};v[f]=d;var j=function(){if(d.timer!=a){clearTimeout(d.timer);delete d.timer}d.loaded=b;for(var e=d.pendingCallbacks.length,c=0;c0)h(a);else h(new Event("Script load timed out"))},h=function(g){delete v[f];if(d.timer!=a){clearTimeout(d.timer);delete d.timer}for(var c=d.pendingCallbacks.length,b=0;b=0},pushFlight:function(a){if(OSF.Flights.indexOf(a)<0){OSF.Flights.push(a);return b}return c},getBooleanSetting:function(a){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,a)},getBooleanFromDictionary:function(b,a){var d=b&&a&&b[a]!==undefined&&b[a]&&(typeof b[a]===h&&b[a].toUpperCase()==="TRUE"||typeof b[a]==="boolean"&&b[a]);return d!==undefined?d:c},getIntFromDictionary:function(b,a){if(b&&a&&b[a]!==undefined&&typeof b[a]===h)return parseInt(b[a]);else return NaN},pushIntFlight:function(a,d){if(!(a in OSF.IntFlights)){OSF.IntFlights[a]=d;return b}return c},getIntFlight:function(a){if(OSF.IntFlights&&a in OSF.IntFlights)return OSF.IntFlights[a];else return NaN},parseFlightsFromWindowName:function(a,b){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(a,b,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(a,c){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(B,G,b,a,c))},parseArrayWithDefault:function(b){var a=[];try{a=JSON.parse(b)}catch(c){}if(!Array.isArray(a))a=[];return a},parseInfoFromWindowName:function(g,h,f){try{var b=JSON.parse(h),c=b!=a?b[f]:a,d=t();if(!g&&d&&b!=a){var e=b[OSF.WindowNameItemKeys.BaseFrameName]+f;if(c)d.setItem(e,c);else c=d.getItem(e)}return c}catch(i){return a}},parseInfoWithGivenFragment:function(m,j,k,i,l){var f=l.split(m),b=f.length>1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(y)>=0)b=b.split(y)[0];b=decodeURIComponent(b)}var c=t();if(!i&&c){var e=window.name.indexOf(j);if(e>d){var g=window.name.indexOf(";",e);if(g==d)g=window.name.length;var h=window.name.substring(e,g);if(b)c.setItem(h,b);else b=c.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==f)a=b.split("|");if(typeof a[1]==f)a=b.split("%7C");return a},getXdmFieldValue:function(f,d){var b=e,c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(f){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:c},{name:"expectedProperties",type:Object,mayBeNull:c},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var d in e){a=Function._validateParameter(f[d],e[d],d);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==f&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[i])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[i])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[p,i,q])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[p,i,q])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;g=h&255;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63;if(!isNaN(h)){d=h>>8;f=j&255;g=j>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63}if(isNaN(h))b[a-1]=64;else if(isNaN(j)){b[a-2]=64;b[a-1]=64}for(var l=0;l=2)return a[b-2]+"."+a[b-1];else if(b==1)return a[0]},isiOS:function(){return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?b:c},isChrome:function(){return window.navigator.userAgent.indexOf("Chrome")>0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},startsWith:function(b,a,c){if(c)return b.substr(0,a.length)===a;else return b.startsWith(a)},containsPort:function(d,e,c,a){return this.startsWith(d,e+"//"+c+":"+a,b)||this.startsWith(d,c+":"+a,b)},getRedundandPortString:function(b,a){if(!b||!a)return e;if(a.protocol==k&&this.containsPort(b,k,a.hostname,"443"))return ":443";else if(a.protocol=="http:"&&this.containsPort(b,"http:",a.hostname,"80"))return ":80";return e},removeChar:function(a,b){if(b=a.length)return this.removeChar(a,b);else if(c==="/"){if(a.charAt(b+1)==="?"||a.charAt(b+1)===g)return this.removeChar(a,b)}else if(c==="?")if(a.charAt(b+1)===g)return this.removeChar(a,b);return a},cleanUrl:function(a){a=this.cleanUrlOfChar(a,"/");a=this.cleanUrlOfChar(a,"?");a=this.cleanUrlOfChar(a,g);if(a.substr(0,8)=="https://"){var b=a.indexOf(":443");if(b!=d)if(b==a.length-4||a.charAt(b+4)=="/"||a.charAt(b+4)=="?"||a.charAt(b+4)==g)a=a.substring(0,b)+a.substring(b+4)}else if(a.substr(0,7)=="http://"){var b=a.indexOf(":80");if(b!=d)if(b==a.length-3||a.charAt(b+3)=="/"||a.charAt(b+3)=="?"||a.charAt(b+3)==g)a=a.substring(0,b)+a.substring(b+3)}return a},parseUrl:function(g,i){var h=this;if(i===void 0)i=c;if(typeof g===f||!g)return undefined;var j="NotHttps",o="InvalidUrl",n=h.isIE(),b={protocol:undefined,hostname:undefined,host:undefined,port:undefined,pathname:undefined,search:undefined,hash:undefined,isPortPartOfUrl:undefined};try{if(n){var a=document.createElement("a");a.href=g;if(!a||!a.protocol||!a.host||!a.hostname||!a.href||h.cleanUrl(a.href).toLowerCase()!==h.cleanUrl(g).toLowerCase())throw o;if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps))if(i&&a.protocol!=k)throw new Error(j);var m=h.getRedundandPortString(g,a);b.protocol=a.protocol;b.hostname=a.hostname;b.port=m==e?a.port:e;b.host=m!=e?a.hostname:a.host;b.pathname=(n?"/":e)+a.pathname;b.search=a.search;b.hash=a.hash;b.isPortPartOfUrl=h.containsPort(g,a.protocol,a.hostname,a.port)}else{var d=new URL(g);if(d&&d.protocol&&d.host&&d.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps))if(i&&d.protocol!=k)throw new Error(j);b.protocol=d.protocol;b.hostname=d.hostname;b.port=d.port;b.host=d.host;b.pathname=d.pathname;b.search=d.search;b.hash=d.hash;b.isPortPartOfUrl=d.host.lastIndexOf(":"+d.port)==d.host.length-d.port.length-1}}}catch(l){if(l.message===j)throw l}return b},shallowCopy:function(b){if(b==a)return a;else if(!(b instanceof Object))return b;else if(Array.isArray(b)){for(var e=[],d=0;dc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};e=x(e);g=i?e.length-1:0;if(e.length===0)return a;while(!h&&g>=0&&gc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};f=x(f);j=n(f,o);e=i(f.length,j,m);if(e<0)return a;while(!h&&e>=0&&ed.length)return c;if(d.substr(d.length-a.length)===a)return b}return c},hashCode:function(b){var a=0;if(!OSF.OUtil.isNullOrUndefined(b)){var c=0,d=b.length;while(c0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();try{(function(){OSF.Flights=OSF.OUtil.parseFlights(true)})()}catch(ex){}window.OSF=OSF;(function(g){var c="\n",d=true,a=null,b="undefined",k=false,j=function(){function c(){}c.isInstanceOfType=function(f,e){if(typeof e===b||e===a)return false;if(e instanceof f)return d;var c=e.constructor;if(!c||typeof c!=="function"||!c.__typeName||c.__typeName==="Object")c=Object;return !!(c===f)||c.__typeName&&f.__typeName&&c.__typeName===f.__typeName};return c}();g.MsAjaxTypeHelper=j;var h=function(){var e="Parameter name: {0}";function d(){}d.create=function(c,b){var a=new Error(c);a.message=c;if(b)for(var d in b)a[d]=b[d];a.popStackFrame();return a};d.parameterCount=function(a){var c="Sys.ParameterCountException: "+(a?a:"Parameter count mismatch."),b=d.create(c,{name:"Sys.ParameterCountException"});b.popStackFrame();return b};d.argument=function(a,g){var b="Sys.ArgumentException: "+(g?g:"Value does not fall within the expected range.");if(a)b+=c+f.format(e,a);var h=d.create(b,{name:"Sys.ArgumentException",paramName:a});h.popStackFrame();return h};d.argumentNull=function(a,g){var b="Sys.ArgumentNullException: "+(g?g:"Value cannot be null.");if(a)b+=c+f.format(e,a);var h=d.create(b,{name:"Sys.ArgumentNullException",paramName:a});h.popStackFrame();return h};d.argumentOutOfRange=function(i,g,j){var h="Sys.ArgumentOutOfRangeException: "+(j?j:"Specified argument was out of the range of valid values.");if(i)h+=c+f.format(e,i);if(typeof g!==b&&g!==a)h+=c+f.format("Actual value was {0}.",g);var k=d.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:i,actualValue:g});k.popStackFrame();return k};d.argumentType=function(h,g,b,i){var a="Sys.ArgumentTypeException: ";if(i)a+=i;else if(g&&b)a+=f.format("Object of type '{0}' cannot be converted to type '{1}'.",g.getName?g.getName():g,b.getName?b.getName():b);else a+="Object cannot be converted to the required type.";if(h)a+=c+f.format(e,h);var j=d.create(a,{name:"Sys.ArgumentTypeException",paramName:h,actualType:g,expectedType:b});j.popStackFrame();return j};d.argumentUndefined=function(a,g){var b="Sys.ArgumentUndefinedException: "+(g?g:"Value cannot be undefined.");if(a)b+=c+f.format(e,a);var h=d.create(b,{name:"Sys.ArgumentUndefinedException",paramName:a});h.popStackFrame();return h};d.invalidOperation=function(a){var c="Sys.InvalidOperationException: "+(a?a:"Operation is not valid due to the current state of the object."),b=d.create(c,{name:"Sys.InvalidOperationException"});b.popStackFrame();return b};return d}();g.MsAjaxError=h;var f=function(){function a(){}a.format=function(c){for(var b=[],a=1;a0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0)b=OSF.AssociatedLocales[d[0]]}if(!b)b=c;return b};OSF.isRTLLocale=function(a){if(!a)return false;return OSF.SupportedRTLLocales[a.toLowerCase()]||false};var InfoType;(function(a){var c="SecurityInfo",b="Information";a[a["Error"]=0]="Error";a[a["Warning"]=1]="Warning";a[a[b]=2]=b;a[a[c]=3]=c})(InfoType||(InfoType={}));var TrustResult;(function(a){var b="Prompting";a[a["Unknown"]=0]="Unknown";a[a["Trusted"]=1]="Trusted";a[a[b]=2]=b})(TrustResult||(TrustResult={}));var SupportedError={APICallFailed:true,NotTrustedWAC:true};function _loadJs(c,b){var a=document.createElement("script");a.src=c;a.type="text/javascript";a.addEventListener("load",b);document.getElementsByTagName("head")[0].appendChild(a)}var PathToStringFile="../{locale}/office_strings.js",Strings={};function _getUrlParams(){var a=window.location.hash.replace("#","");a=decodeURIComponent(a);return JSON.parse(a)}function _loadStrings(c,b){var a=OSF.getSupportedLocale(c),d=PathToStringFile.replace("{locale}",a);_loadJs(d,b)}function _getConfirmedResultKey(a,b){return "OfficeJSTrustKeyV2_"+(b?"http_":"https_")+a}function _hostTrustResult(c,d){var b=OSF.OUtil.getLocalStorage(),a=JSON.parse(b.getItem(_getConfirmedResultKey(c,d)));return a?a.Result:TrustResult.Unknown}function _confirmHost(a,b,o,f){var e=_getConfirmedResultKey(a,b),c=e+"TimeStamp",g=_hostTrustResult(a,b);if(g==TrustResult.Prompting){var d=OSF.OUtil.getLocalStorage(),l=JSON.parse(d.getItem(c)),m=Date.now()-l;if(m>=3e4)g=TrustResult.Unknown}switch(+g){case TrustResult.Unknown:function n(){var d=OSF.OUtil.getLocalStorage(),f={Result:TrustResult.Prompting};d.setItem(e,JSON.stringify(f));d.setItem(c,JSON.stringify(Date.now()));var g=Strings.OfficeOM["L_ConfirmDialog"].replace("{0}",a);if(b)g+=" "+Strings.OfficeOM["L_NoHttpsWAC"];var h=confirm(g);f.Result=h?TrustResult.Trusted:TrustResult.Unknown;d.setItem(e,JSON.stringify(f));d.removeItem(c);return h}if(o){var d=OSF.OUtil.getLocalStorage(),h={Result:TrustResult.Prompting};d.setItem(e,JSON.stringify(h));d.setItem(c,JSON.stringify(Date.now()));var p={isConfirm:true,useHtmlPopup:true,error:"",locale:"",hostname:a,noHttps:b,validate:false},k="./index.html#"+encodeURIComponent(JSON.stringify(p)),i=open(k,"ConfirmTrust","popup=yes,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no,width=600,height=350,top=300,left=600");i.addEventListener("load",function(){i._confirmMessageHostName(function(a){h.Result=a?TrustResult.Trusted:TrustResult.Unknown;d.setItem(e,JSON.stringify(h));d.removeItem(c);f(a)},a,b)})}else f(n());break;case TrustResult.Trusted:f(true);break;case TrustResult.Prompting:function j(){OSF.OUtil.removeEventListener(window,"storage",j);var c=_hostTrustResult(a,b);f(c==TrustResult.Trusted)}OSF.OUtil.addEventListener(window,"storage",j)}}function _showInfoBar(F,C,E,i,A){var o="display:none",e="style",n="br",s="moe-infobar-message",m="span",z="presentation",b="class",l="div",x=i;if(i.length>255)i=i.substring(0,254);var p=document.createElement(l);p.setAttribute(b,"moe-infobar-body");var B=document.createElement(l);B.innerHTML=x;p.setAttribute("title",B.textContent);var j=document.createElement("table");j.setAttribute(b,"moe-infobar-infotable");j.setAttribute("role",z);for(var D,w=0;w<3;w++){D=j.insertRow(w);D.setAttribute("role",z)}var a=j.rows;a[0].insertCell(0);a[0].insertCell(1);a[0].cells[1].setAttribute("rowSpan","2");a[1].insertCell(0);a[1].insertCell(1);a[2].insertCell(0);a[2].insertCell(1);a[0].cells[0].setAttribute(b,"moe-infobar-top-left-cell");a[0].cells[1].setAttribute(b,"moe-infobar-message-cell");a[2].cells[1].setAttribute(b,"moe-infobar-button-cell");var k=document.createElement("img");k.src="images/moe_status_icons.png";var f,t=InfoType.Error;if(t===InfoType.Error)f="moe-infobar-error";else if(t===InfoType.Warning)f="moe-infobar-warning";else if(t===InfoType.Information)f="moe-infobar-info";else f="moe-infobar-secinfo";if(_isRTLLocale())f=f+"-rtl";k.setAttribute(b,f);k.setAttribute("alt",x);a[0].cells[0].appendChild(k);var c=document.createElement("a");c.setAttribute(b,"moe-infobar-message-div");c.setAttribute("tabindex","1");if(A){var u=document.createElement(m);u.setAttribute(b,"moe-infobar-title");u.innerHTML=A;c.appendChild(u)}var v=document.createElement(m);v.setAttribute(b,s);v.innerHTML=i;c.appendChild(v);if(C){var q=document.createElement(m);q.setAttribute(b,s);q.innerHTML=Strings.OfficeOM["L_NoHttpsWAC"];c.appendChild(document.createElement(n));c.appendChild(document.createElement(n));c.appendChild(q);c.appendChild(document.createElement(n));c.appendChild(document.createElement(n))}a[0].cells[1].appendChild(c);var g=document.createElement(m);g.setAttribute(b,s);g.setAttribute(e,o);g.innerHTML=Strings.OfficeOM["L_ConfirmCancelMessage"];var h=document.createElement("button");h.setAttribute(b,"moe-infobar-button");h.setAttribute("type","button");h.innerHTML=Strings.OfficeOM["L_ContinueButton"];h.onclick=function(){_confirmHost(F,C,E,function(a){if(a)g.innerHTML=Strings.OfficeOM["L_ConfirmRefreshMessage"];h.setAttribute(e,o);g.removeAttribute(e)})};a[2].cells[1].appendChild(h);a[2].cells[1].appendChild(g);p.appendChild(j);var d=document.createElement(l);d.setAttribute(b,"moe-background");d.style.backgroundImage="url(images/agavedefaulticon96x96.png)";d.style.backgroundColor="white";d.style.opacity="1";d.style.filter="alpha(opacity=100)";d.style.backgroundRepeat="no-repeat";d.style.backgroundPosition="center";var r=document.createElement(l);r.setAttribute(b,"moe-infobar-out");r.appendChild(p);d.appendChild(r);var y=document.getElementById("container");y&&y.appendChild(d)}try{var urlParams_1=_getUrlParams(),e=Function._validateParams(urlParams_1,[{name:"error",type:String,mayBeNull:false},{name:"hostname",type:String,mayBeNull:false},{name:"noHttps",type:Boolean,mayBeNull:false},{name:"validate",type:Boolean,mayBeNull:false},{name:"useHtmlPopup",type:Boolean,mayBeNull:true},{name:"isConfirm",type:Boolean,mayBeNull:true}]);if(!e){var locale_1=window.navigator.language;if(urlParams_1.useHtmlPopup&&!urlParams_1.validate)if(OSF.isRTLLocale(OSF.getSupportedLocale(locale_1)))document.getElementById("container").style.direction="rtl";if(!(urlParams_1.isConfirm&&urlParams_1.useHtmlPopup))if(urlParams_1.validate){function validateHostnameTrust(a){var b=JSON.parse(a.data),f=Function._validateParams(b,[{name:"hostname",type:String,mayBeNull:false},{name:"noHttps",type:Boolean,mayBeNull:false}]);if(!f){var e=_hostTrustResult(b.hostname,b.noHttps),c=e===TrustResult.Trusted;if(urlParams_1.useHtmlPopup){var d={hostUserTrusted:c};a.source.postMessage(JSON.stringify(d),a.origin)}else if(!c)_loadStrings(locale_1,function(){_confirmHost(b.hostname,b.noHttps,false,function(b){var c={hostUserTrusted:b};a.source.postMessage(JSON.stringify(c),a.origin)})});else{var d={hostUserTrusted:c};a.source.postMessage(JSON.stringify(d),a.origin)}}}OSF.OUtil.addEventListener(window,"message",validateHostnameTrust)}else _loadStrings(locale_1,function(){SupportedError[urlParams_1.error]&&_showInfoBar(urlParams_1.hostname,urlParams_1.noHttps,urlParams_1.useHtmlPopup,Strings.OfficeOM["L_"+urlParams_1.error])})}}catch(err){}function _isRTLLocale(){return document.getElementById("container").style.direction==="rtl"}function _confirmMessageHostName(a,b,c){if(self!==top)return;var d=navigator.language;_loadStrings(d,function(){var g="span",i="L_ConfirmDialogConsentTitle",d="class",p=document.getElementById("container"),f=document.createElement("div");if(_isRTLLocale())f.setAttribute(d,"confirmContainerRTL");else f.setAttribute(d,"confirmContainer");p.appendChild(f);document.title=Strings.OfficeOM[i];var l=document.createElement("h1");l.setAttribute(d,"consentTitle");l.textContent=Strings.OfficeOM[i];f.appendChild(l);var e=document.createElement("div");e.setAttribute(d,"consentMessage");f.appendChild(e);var n=document.createElement(g);n.textContent=Strings.OfficeOM["L_ConfirmDialog"].replace("{0}",b);e.appendChild(n);if(c==true){var o=document.createElement(g);o.textContent=Strings.OfficeOM["L_NoHttpsWAC"];e.appendChild(o)}e.appendChild(document.createElement("br"));e.appendChild(document.createElement("br"));var m=document.createElement(g);m.textContent=Strings.OfficeOM["L_ConfirmDialogConsent"].replace("{0}",b);e.appendChild(m);var k=document.createElement("div");k.setAttribute(d,"confirmFooter");f.appendChild(k);var j=document.createElement("button");j.textContent=Strings.OfficeOM["L_OKButton"];j.setAttribute(d,"confirmOK");j.addEventListener("click",function(){if(top==self){a(true);window.close()}});k.appendChild(j);var h=document.createElement("button");h.textContent=Strings.OfficeOM["L_CancelButton"];h.setAttribute(d,"confirmCancel");h.addEventListener("click",function(){if(top==self){a(false);window.close()}});k.appendChild(h);h.focus()})} \ No newline at end of file diff --git a/dist/AgaveErrorUX/images/AgaveDefaultIcon32x32.png b/dist/AgaveErrorUX/images/AgaveDefaultIcon32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..dc177eb55508e9710dc813e6054158699eaf1ba0 GIT binary patch literal 522 zcmV+l0`>igP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0iQ`kK~z{r?N?o^ zfLEdh9wP8T)5<`Cn#&Oi@uOWg!+W_6EH1jvIXk;MbG9W( z5;fTTR)gTl#Q!#dcDqfB#eznok?=AKM_@c2)A4wuhwb-!>i7GViBu*q7!1gD-6wFm zbGzNhaU4<bZEI;()D^}0%r#VLBQM} zFA2+0i@mCZdco( z;64Q?G$=U3;V@~su2UVkftx_D*Q4!r`Iq7<4|Lg(JcwAj@)T?nga9UFdeZ z$y3Cb1Wu69tUas(iwScWlWrvN7eN{aWwQ&g1bCdhGp2C@KZ9t%A(gvEH~;_u M07*qoM6N<$g3OlPrT_o{ literal 0 HcmV?d00001 diff --git a/dist/AgaveErrorUX/images/AgaveDefaultIcon96x96.png b/dist/AgaveErrorUX/images/AgaveDefaultIcon96x96.png new file mode 100644 index 0000000000000000000000000000000000000000..dfd28795f540b68538bc37d4cd4ccb0761973945 GIT binary patch literal 1115 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGojKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qt-49p)qT^vIy;@-~LpDp4ja-5&3(LrH?*#s?x zC;T4L94tXgxmcLOR<3DTnZv565OMQX6zip^n|vHiQxzgOfdogB!i(y2acSj~ci*o5 zo>q4Mjk&>-x;J}f{;j!x=FOQsvrn?rD=;wON5-5M`wa{K^;}}pc&hf`4{PIpr?9*krZLK3d>)2e& z{q7U;rX1Yfn((_?>Zw>Qu0)!Xbvn@?BveQb>NSUx|$y7KyWWjXmvUp~hk?60Uf zarwM=t42jlL0$K*+2T`*zJ3l8+))>EeytH(qpno_u;_!_*>N{)_X!zV$D^<;X=H zK5V2GxRSNQ>5YIv9p8HP%#Ydsa@5031NuJmbNncs%2j99eg%K#LY7Td`@kbP0l+XkKb93w7 literal 0 HcmV?d00001 diff --git a/dist/AgaveErrorUX/images/BusinessBarClose_16x16x32.png b/dist/AgaveErrorUX/images/BusinessBarClose_16x16x32.png new file mode 100644 index 0000000000000000000000000000000000000000..65005596f0b4fb1c6192b629c47b493e60266d1e GIT binary patch literal 991 zcmaJ=PiWIn9FBjP9m9cw=w;6g@t{p!lC?Eq*=Un?E0{8}j`e7kyse>2UQAwXx}z7_ z-GgJNiD!>P5%Ij6hzyj0^P+-+gPlCceCgWGgEjE-{_uU@@B97U@2$^OW=2xiQVhe4 zlxKC5&ZEf~I#2&&hesBju99Mn%;RO!vO>h<9lV4<*|S!Vi7cmme+Nx6%o*TTYoun} zRc!2WR)XPTFQ9COnVgOT%Wfb7me7jptL)ELZ&=_uD!Z65pb==O?#`}-Xnw6ywbvT9 z?6A{QU@}&yfQN_$VsF)tlvrgux(Zz<$24u>neAj@*1 zA&O~=NJnj-SaI5q#(N4nitNx0h>LxYC|XOnNmQ0PJx;+3`m%o1EfXymA6o%0a4<=! z2Q-ZTLp`sLj);j){QgrosX_iDjsu|0 zXTYNCJGd2f(1xLu{fJn;jmo;pQa-)f*E!)92Xd1}@B$iHN1^)wIi(PLpp&rT4)#(QsMqB>gS}`2xjZ$)C)fJd zHTRBa?&gCCHd;e{> zA~s)KpWVK)ubq-M&+h%$Uub^5G5U4O-(dFGi?0t(Uw-+vaKStn`vP`AcH?mx93FkY c_37y_WY#a;{QYhi=94E^E>`sCg?kVG05_F7-v9sr literal 0 HcmV?d00001 diff --git a/dist/AgaveErrorUX/images/DropDownArrow_16x16x32.png b/dist/AgaveErrorUX/images/DropDownArrow_16x16x32.png new file mode 100644 index 0000000000000000000000000000000000000000..92b13f4b4ffe435a07d51fef245d1841e4e25f96 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP*I4di(^Q|t)xHy|JyUGHgq;R z8DudqGjs29C@lQQqA<1J`R|c?_wF&JFuLVj8o31zh4nmwGO< qX6PjzSUPh7<6_QEKQ;yy35NV5^2z@%s}upvXYh3Ob6Mw<&;$UXb3F9` literal 0 HcmV?d00001 diff --git a/dist/AgaveErrorUX/images/Ellipsis_16x16x32.png b/dist/AgaveErrorUX/images/Ellipsis_16x16x32.png new file mode 100644 index 0000000000000000000000000000000000000000..bb07de4f3820453230590978015d2a0b89664e45 GIT binary patch literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0figD*u3fvWO6T^vI!{F5bEn^~t!ojO-vU;jVU8OP4PF8?f>F&!0cp6gED3 zl*BF|uM!s&G>IXMLx_d*fI$bpkh>VOl$pE=+m$_XYHUUvDsF2S|0)Ce= t1PO_TIebDa7XuU@?KR+HlQA%0V7Q>0t~s}@^Bd4+22WQ%mvv4FO#s5>O!xo* literal 0 HcmV?d00001 diff --git a/dist/AgaveErrorUX/images/MiniInfoBlue_16x16x32.png b/dist/AgaveErrorUX/images/MiniInfoBlue_16x16x32.png new file mode 100644 index 0000000000000000000000000000000000000000..33a5f7aa0d7392edd3832c84ae2b784390304eeb GIT binary patch literal 454 zcmV;%0XhDOP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0b5B#K~y+T-IB{n zLQxckeJUaFhGKb1>yVn|&?_ZUYMNcl(CjH1XPQkqVMtLCVWp{&nb@eB34xH1hW58k z17}B^)`m6P-?#s@))ol<=aIP%7?~@bkvY@vQs+Kb8L1=14Am{c+Zx{~j2mUl#A=w{ ztYR{hhthKli6a>sC?Qy@_MX5JufwwSjJtXZy>Gw}u7Fu7LOyp0u{|l}l~8Qf5H4Ys zU~{wvQ>04p1DLgYOoU2MEuKSc+q>i!IMWSt^r;WOHQMNW^$0FP7c4;IzvcuVyaF0l z!xX8&7Kml6+EhV^u$d+gh60rJUt`FBpF literal 0 HcmV?d00001 diff --git a/dist/AgaveErrorUX/images/Refresh_16x16x32.png b/dist/AgaveErrorUX/images/Refresh_16x16x32.png new file mode 100644 index 0000000000000000000000000000000000000000..31187fd135df007642cc359006e7b5ab34405d40 GIT binary patch literal 367 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc4J@86jv*f2$q5py&Pps@U0oK9H~2d)FOWF$ zti@99#5(2E$_~9}9AbEn$T$43mtyO@>Ug!`iN|J^SFd6tc-*#U==<<`?qkS`YDxK_ ztsu?9v%o^$!`^ZGoDA*;Dcy-C@l2aqFPJhPt!Vhcut{}E1Viy(`3c<2 z;hyKrYuV!~tmoaat>GD0Aq(TR6poN;iB{px5G*g5pS(Y zY+d#)n-25<`I4`71;QCN+KMcG{?5`xnlGs1$tvB7ChlpA9kXtDY-N~pZQ-=WBHa`0 zFI-tXbmprxUo;j8%H-7g64NLVHmm8znG|WeRfQF;3=GLHO%rE{HvR+#5`(9!pUXO@ GgeCwmae%h~ literal 0 HcmV?d00001 diff --git a/dist/AgaveErrorUX/images/moe_default_icon.png b/dist/AgaveErrorUX/images/moe_default_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..dc177eb55508e9710dc813e6054158699eaf1ba0 GIT binary patch literal 522 zcmV+l0`>igP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0iQ`kK~z{r?N?o^ zfLEdh9wP8T)5<`Cn#&Oi@uOWg!+W_6EH1jvIXk;MbG9W( z5;fTTR)gTl#Q!#dcDqfB#eznok?=AKM_@c2)A4wuhwb-!>i7GViBu*q7!1gD-6wFm zbGzNhaU4<bZEI;()D^}0%r#VLBQM} zFA2+0i@mCZdco( z;64Q?G$=U3;V@~su2UVkftx_D*Q4!r`Iq7<4|Lg(JcwAj@)T?nga9UFdeZ z$y3Cb1Wu69tUas(iwScWlWrvN7eN{aWwQ&g1bCdhGp2C@KZ9t%A(gvEH~;_u M07*qoM6N<$g3OlPrT_o{ literal 0 HcmV?d00001 diff --git a/dist/AgaveErrorUX/images/moe_status_icons.png b/dist/AgaveErrorUX/images/moe_status_icons.png new file mode 100644 index 0000000000000000000000000000000000000000..75114f0259a529b90f91eef1c2ff89063600fe8b GIT binary patch literal 6140 zcmbVQ2T)Vpwx)!RfP(ZALKBsegh($Tq4%OllNunjKoaRSv{0m}R6(Q&0xD8OML`6l z_bx?5K$_B|3Ub3=?t5?EoqK2QnOSr8-e-N^Dtqmdl@o7lsCAB>o1Tn}?3|7^(v);3 z2{{EVHEHBE8Zkk-ap5&?;>|EFcz*{hiVW_IaYO-iyc}FnrYHyJK;KT35*Zn#3)=i9 z{-%Mxf)mC|(&0=;GQi7+geD_XQVsBNaPmOmfsQCww6`*7qoD}|L^~^kEMNxG20jRs z8(KREi!uu`Gx8>bMU4Elptfiyl_mI49)P{DgB zgZ^~trhzdKfx)7HFiB|%C+TZo;58XZu#B|4jQmv~L>eqD1%^mT%SwQy6=1Ro(qQ0U z7l>pH>+GUniq!ne7HOsoa>L_&6r`m5{rx5Vp^_M^s}xvXUS3KXA_aj+kTfK4f!=tB z010oL(BBM56wV2Y_Q9hu-oP_P2S?0pyfTR7>7OBZ`4|}dlh_;gSE5KMlL~O~kpfFf zOL=*n#r20a4sVM3A2ok;uPBJ?+yl)Ha#=uDC1je-#tP1+O( zPb9|awin79uY*(uk)B98qn#BHvS1laby;Z{sGPb67z~z2YC<&SG>~8f0B=l?Q`0z;FaoLldb^B9d1}Xu#orV|Bc7cn5DM)Zcc|B)flM)&DJ4 z0f9w1;4xTp494^C3NUuV;4wHij1LfD29pE>EzsW17=PT^_WT(w5`{(kp`10b7%$)- z`Bgyw3;WXYnzB&191<#zlsk(Xt^t+TKtR-y5ZE<1R1*UF3+w#fjMQ0i{I6p9 zdx=zmXTyJ%K56pL!-MiBofs_XXjpD!Ta%HoUDZLt%>zEI=h59`8+{#dT0Z+Yc#n@W z%ORG$r~sI#(cN;|R`ylJGW8 z*oCML(1r6Z_Ac+avK;p6#>=Nq{dNcRt{Yw7&wKP{Z59{y_-OXjG_?A1$*XssHfKa+ZG~9(7X-4Ql z5}l&%%(8IvQQ2wHyt;g)dCAX}v2{57bMbw=O4<}rNq+$Wi`mu-@8B%H+G6a)s;wdb zpr(Gb83Gw%P!}CXilwPucp_Gv)L{eqO^5k3YsSY0qCQ>|fk9hxclhX$#=mE;eF-h* zWxSAD>e!sGr12HX=17;e@v-ehE&icgYLSWmN7~p|e8C`hgj>*RcVi8>EijsBAk_P~xQ1$F z<45G&fU&-fK}nphu)V@6inf)97$RyJc<(3AM5J(?!Bb{@gXbKUNEce>@)X95EVU9S zyTPx~-|4K*uRIf<4YiR~6ihaZBZl>jh`YpaX8#yj6;COQJ5trF(9{i64Vap`4)qNC zA?+D-WDE)@OgYr2f058JquEuoY*9jm{mBZMNfRDr>@AJ`(z-I(njf+3q{6CR{Fb=D zMdE3afBN|Q#vs2Ee}mJby*cFe;@D`;IZ*8AlY3g7`*ru=LGI;(1H%la+NWI_wUf;z zrk$!dzYRJTWKai?edXGWt(`8Q@${W~0b=VdhbgmZY7x(#=&208Sf0~@W znM&ag7g1mhE$HZ=vXsjAjpo|vMhWF^N~5%=)YTRKDD7upreR~Pc+HK(ogs>BRMCzC zQHgM0_{hRX&V#O&-#W}eivE_9O>J_zt8Evs#wTHz<#lQlx$Ce*#ZoNwFBKpR<9AXd zRaZ0z`{=;ETDAxSK=i)FgN>L`P5mt-c=y||z4f*_Z41&*?6yX67LSTf zVdr|BjNWD-1nbz{p#Vs?;Kzf}xeleZFRFaC9QP%K$x_m-CWzyl95DBaB?I~)3fR_t zs0cfvhX1HVMGL)nVTj}9wWoIXKjXV$F#&gcv)E~Hao(xyZhf!T83rjDux}lc+jVk$ ze+^on4qseXwv8l=bH`yYdigJxVGz4~&YTV0>t zlqt60QiqM)wf#c@YS~;<@6DJpU%DAlRTJGkf1SP zU3fpWQRE9f7UZO7-bhw23*Hp>F~4Ej?2(i>)~rN{`Tl|zX^=X2Qn;}DVes_ua&+t` zH6M1?2%|HV7MYRw=r7DXXGG3(cubEg+Kn^E+m`ZC8WYRRqWR|01fN|AdQfme(cXD7 z6Bc^`afL^IIq`MIh+n(=dTfUaF=tpH7=0d~@TPx2R0ucI{}2!ihjm1TO*5!J2mhGx z@^H$zwgls8y}#ecB7o``o?m=esryuO=@v^JPnUPx8#@*9j(;8IvCK3xQT_HjMy@PKRV?cOiutz%*^`bSSGO=;faQfZI!sF(5XZmlKsN z*OevKuMMVLD9KDOjd36L>n)2etdIoZI>Xhgo(tqOzT(t&2OXR z6xjE|MLqPbyJM|jqeShSN)7YxKi283n0>g@zwRE~^kRolwm>Xxi>;;3t%hBBUnJuT zSoBgzFNpFzPb{;3`KGy&rCmv)u%-O8Z0#c85gXO>>)Rz8=tz&H@{MU)lx!ssry2K> zFS+;;)2in48iQ*J54UQG^!;zQwqz_b8ca5=L>_t@CHg*9bsO!>3pbod+8YE9spgxH zO`0|1ZsnD8^+ucVUdO}>d4<+AZ5D9|3FzHjm`S~+{Yj72_~u$tCEk|yIEb?z%cBZdYIpd&HBssK*Wzw7%Iuhj;L z&S&3`fQyk|`Ei`XV#J`ger)jpGaRWL?~7 z&s;z2ddBBJGUx0o7<>7?1drXImwv7pQNckpzMhkYvASUH?$EW*%dv2}kv^AQuRfQu zgH;LAeOw)y0`SP3oXaV36oo%{+f3~rGJP7tvd5ozGKhWPV1Fxo!h)9^bLc_4C#&bP zpZPs?{^Ro+a+5Kl-pcQs(dBqqbvhOcNy!*5|IlRmTUsdqUvnsNBY-*){3Zr z!;{t-Itz&`3c_+RVSMXL+rF^epops}j{WA(lpKTLcA5*?mz7?AS0eW}cnJ366Od+J zdbe^p_lclrwpcZv=X@?+`1tDpS%`xZ)-~px7K#GWK*K%*R6H7iuln|^^UIv%W{CD3 zwLrA1cY*GNt5VwUk~+6tYG%wXE_|?jl8J*qwU;O60DULL9vj>A)Pyv;olQM118%

7Q|fAR((- z1l(IcO0)V|g7g+8Sj&YOEbzff(o0kg1&Xi6y#E}SuBJqVy|k`#k$0KW_0Syj%C+-} z-W3B5%#go42339IAoSj)DQwYkue85Gyp7yEp|N1KG<4Rq$xb*SN3$Lt9Y7eBnD(xN zHV_9%GxoYbtsLg41-|%r+yvFcu8Dw57=$r#iS2{@XyBY!L`l9OEz5bF(p-5Zg_g+^ zOON@7f+6Z*+Yl;|X>I&nP(aR#D5$?wW}+jqRW|ffr-8q~YMj{1dbrt?^x?&rXr*-j zk)GbbH-ixIz@^73?iDgdp45l@ifrGen(sOpO;ZyB85Q!4wwHOOZ65pZhpz&!SBRtO z7dUDXK@(nty;;*8L*Hn&F5zXAaJhx{XfR<|lyHY}hzVUUkl$MhMHEOG|DQO(+j+<*m0A zbeurf>g(ns#QTN#L>A}7a7f}&422*ad%hX%VvJ#y{HVcW71JKIua}-`f2uXGSDG!X zbX~%w$!4>XbNj0b68x$Od@7}4}*FK$?WG{<)BO1p^#}i+hWFe~ID#ThuMJ4l; zTGKjrIhZAMA+uqxTHNO_rbN1=RU^Y(kf2$tF!gp2zMCdqM%*7?`PG(pD2*VmD*~XjPU(L6R zzW`J7if};FolQa8-FHodE*{wkUPfb5*HFZ~*{4)7^c`qlKftC%Jic-#`Tg7v*+<7m z7!!YuPw=oG3Ucpu$7LkSN8a!O*4cB!jy_JL{(iCZ#BM0ZqVZ_S=QUkxU#S4a;C+O- z=U`xxBCYeGvtl!xjP%wkSaW=(!>|>&$6cPre)Gj#%kLN#{@h0)y+LIMT@nL3nV$!< z5}r@%(o3q1KMd!2sMQn|p^*{lKtpa>U1a9j?8;rR(aZ5=!D&A(_pzA3wvJ7|M}L$I zgg6XDFj24-YmD`gbm4E$=eebv9yC2MDlK?bj#v6kM$06|J|ITd@&Z08SIRL68fp)CrSK|GQ=DMlYCRQ+vA6~JArIp% zJfE6A&irobb7bTAEEQVr?TOPtl#ubX4;`EB3A(z&--^Fbv_s96`5m?e_*_W-DNQk@4stk>+d?rx++d`Kp_ydBO zFODbaUV6Pm-_hWfzX)_s{uG%XnbjYZRFKs^K8DsI{YJFsl#&ZwS~~A}O;3G<-?Q+R zNyQZHWkio8?G^Y4KwQq#ReM#2;K&ai_rgzR&TJf4UtAEmG2~045OZBJCxI%{eoT(e zd7uS6Ui?8U|MWvGi^c3Of>o`gQDSCz^<`KpRX6+K^(04n1eLbRiF%gb$fRu_m_iu%H@tu6Sv(<%W}>?#1UiypKsen2Q=Nd8;;6m}^>+ zX8LqD(c$Z-5`4vrdvc+ApN9#4!g@>UZFlU1SvOi6nZHV(yA5&1GnHw~vwv07Hp~#a zZIqZ5`K?-GgmduM_U9+$l$6|;6D)4g=fAFjpc7bkY^$h~k0>@L?3hfmCf>HS-eoo2 zuQg_%)n~Ax?qv<#IuYWh#_n|OtjL};XXF8jIm0Cryp0$XyD{$Doqn#Ks_~(PfQuUZ z3Kp7Wm*ZNC{n-%g>aA5~b*zj!EQ~sx+q^k4sa)0TQx}v4T1BslhYEQurSpES99B&b zWDs=JmP;T{v3nnN*LYJwl2aj}+50>(t?E3R5ySBueq!#hz6E-|ROn;ICyL5s#}3mg zOcdOT3C)Wv4r^0)WCTBdC1#mT3bdt`Jg&+r;@qBQLMb3m^`}i3Evdmla}KL$hwMDN z%h%d!aBP&HqdLfhB zsufK;dM=}Nmb-a&>bz=}LU%%ke=kQfPVMXdOhdKAfF8&qIu>#`$wkG;d)SM|nKw&q z1q0Ca0K}}%biOFvGfVfV>v~B0S6f$p`Gw`J-hH%E%=jz0v#QB5_F3d6Gly>%?>7DB zy0u`y?S}vccdA!ah7m_kDDH94{?*y7-BDW4*)yt-DX4?)skj?v(;n<(=y`A#8Bu2` zK8Yq*?#7!35EO!^soMKnru%U6bIU=)>@^EpHG5sU0coRK$zM=*W1PC?9?m9`D?8Lq z9>)QO*;%FD3HGE@2-}`sSw-nD-HQ)&xkrEYpK!Zor!DJnj-*r85E4n7&+DN+05>TOo2`ZJ$pc}$b3#WQZB$Iw(s|5S>fV6OOs2+wpG%t#bW}1pLZ&d zK9|dc46`o<7(}MajKFQLAb7{!wpNVdrROORdXrg_j>rr1ATx#$r&iuY3OC})x{snL zjpU#BhKI-^&v9}N7;lv%dP#?iK97F`cT}_Aam_iRYFPR%WJY(KXUAJ8uZA@`_q$ID z7qP&?_1{Y50?RNn;cEAT56(Oi0dqikZKm|71;P897;!lvI6<5JzX3_BHZ6j4diMz;A#8c!G3cw|33aNYPUUYCb(bJ-f@_tuumgoRd3It zjD6FyI)0d%XeM2nT2bqjRQYw%i7E-Tf*lMeyDlVtoM>uO|32BKg=LjGXx`##V5BFE+sIDi@&(IDyl%m zO**T9ZK91^a`AkdTiD{bVQ(ZD(5K;^rp*-Si%+dMwlh!;EqI-9}M)z4*}Q$iB} Dy7Xh2 literal 0 HcmV?d00001 diff --git a/dist/AgaveErrorUX/index.html b/dist/AgaveErrorUX/index.html new file mode 100644 index 000000000..740b137a4 --- /dev/null +++ b/dist/AgaveErrorUX/index.html @@ -0,0 +1,16 @@ + + + + + + + + + + +

+
+ + + diff --git a/dist/AgaveErrorUX/style/AgaveErrorUX.css b/dist/AgaveErrorUX/style/AgaveErrorUX.css new file mode 100644 index 000000000..ca5eef72e --- /dev/null +++ b/dist/AgaveErrorUX/style/AgaveErrorUX.css @@ -0,0 +1,613 @@ +html, body { + height: 100%; + margin: 0px; +} + +div#container { + height: 100%; +} + +.confirmContainer { + color: rgb(108, 108, 108); + max-width: 535px; + padding: 30px; + position: relative; + text-align: left; + font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; + font-size: 14px; + font-weight: 400; + background-color: transparent; + width: 100%; + opacity: 1; + pointer-events: auto; + margin: 0 auto; +} + +.confirmContainerRTL { + color: rgb(108, 108, 108); + max-width: 535px; + padding: 30px; + position: relative; + text-align: right; + font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; + font-size: 14px; + font-weight: 400; + background-color: transparent; + width: 100%; + opacity: 1; + pointer-events: auto; + margin: 0 auto; +} + +h1.consentTitle { + display: block; + font-size: 2em; + margin-block-start: 0.67em; + margin-block-end: 0.67em; + margin-inline-start: 0px; + margin-inline-end: 0px; + font-weight: bold; +} + +.consentTitle { + color: rgb(0, 0, 0); + font-family: "Segoe UI Regular WestEuropean", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; + font-size: 18px; + font-weight: 400; + margin-bottom: 20px; + margin-top: 0px; +} + +.consentMessage { + display: block +} + +.confirmFooter { + display: flex; + flex: 1 1 auto; + justify-content: flex-end; + margin-top: 30px; +} + +button.confirmCancel button.confirmOK { + appearance: auto; + text-rendering: auto; + letter-spacing: normal; + word-spacing: normal; + line-height: normal; + text-transform: none; + text-indent: 0px; + text-shadow: none; + display: inline-block; + text-align: center; + align-items: flex-start; + cursor: default; + box-sizing: border-box; + margin: 0em; + padding: 1px 6px; + border-width: 2px; + border-style: outset; + border-image: initial; +} + +.confirmCancel { + position: relative; + font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; + font-size: 14px; + font-weight: 500; + box-sizing: border-box; + border: 1px solid rgb(244, 244, 244); + display: inline-block; + text-decoration: none; + text-align: center; + cursor: pointer; + padding: 0px 16px; + border-radius: 0px; + min-width: 94px; + height: 34px; + background-color: rgb(0, 108, 190); + color: rgb(255, 255, 255); + user-select: none; +} + +.confirmOK { + position: relative; + font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; + font-size: 14px; + font-weight: 400; + box-sizing: border-box; + border: 1px solid rgb(84, 84, 84); + display: inline-block; + text-decoration: none; + text-align: center; + cursor: pointer; + padding: 0px 16px; + border-radius: 0px; + min-width: 94px; + height: 32px; + background-color: rgb(255, 255, 255); + color: rgb(108, 108, 108); + margin-right: 16px; + user-select: none; +} + +.moe-infobar-out { + padding: 8px; +} + +.moe-infobar-body { + background-color:#FCF7B6; + border:1px solid #D9D98B; + position:relative; + max-height:250px; + overflow:hidden; + white-space: normal; + font-family: "Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif; + line-height: 1; +} + +.moe-infobar-body:hover { + background-color:#FEF294; +} + +.moe-hovered { + background-color:#FEF294; +} + +.moe-infobar-infotable { + width:100%; + height:100%; + max-height:110px; +} + +.moe-infobar-top-left-cell { + width:30px; + min-width:30px; + max-width:30px; + vertical-align:top; + padding:1px; +} + +.moe-infobar-message-cell { + padding:7px 7px 3px 0px; + vertical-align:top; +} + +.moe-infobar-top-right-cell { + width:20px; + min-width:20px; + max-width:20px; + vertical-align:top; +} + +.moe-infobar-button-cell { + padding:0px 10px 6px 0px; +} + +.moe-status-warning-icon{ + position:absolute; + clip:rect(0px 42px 41px 0px); + top:0px; + left:0px; + +} + +.moe-status-warning-icon_ie{ + position:absolute; + clip:rect(0px 42px 41px 0px); + top:0px; + left:0px; + +} + +.moe-status-warning-icon:hover { + cursor:default; +} + +.moe-status-error-icon{ + position:absolute; + clip:rect(42px 42px 83px 0px); + top:-42px; + left:0px; + +} + +.moe-status-error-icon_ie{ + position:absolute; + clip:rect(42px 42px 83px 0px); + top:-42px; + left:0px; + +} + +.moe-status-error-icon:hover { + cursor:default; +} + +.moe-status-info-icon{ + position:absolute; + clip:rect(84px 42px 125px 0px); + top:-84px; + left:0px; + +} + +.moe-status-info-icon_ie{ + position:absolute; + clip:rect(84px 42px 125px 0px); + top:-84px; + left:0px; + +} + +.moe-status-info-icon:hover{ + cursor:default; +} + +.moe-status-secinfo-icon{ + position:absolute; + clip:rect(210px 42px 251px 0px); + top:-210px; + left:0px; + +} + +.moe-status-secinfo-icon_ie{ + position:absolute; + clip:rect(210px 42px 251px 0px); + top:-210px; + left:0px; + +} + +.moe-status-secinfo-icon:hover{ + cursor:default; +} + +.moe-infobar-warning { + position:absolute; + clip:rect(0px 75px 23px 50px); + top:0px; + left:-50px; + margin:7px 2px 1px 2px; +} + +.moe-infobar-error { + position:absolute; + clip:rect(26px 75px 47px 50px); + top:-26px; + left:-50px; + margin:7px 2px 1px 2px; +} + +.moe-infobar-error-rtl { + position:absolute; + clip:rect(26px 75px 47px 50px); + top:-26px; + margin:7px 2px 1px 2px; +} + +.moe-infobar-info { + position:absolute; + clip:rect(52px 75px 75px 50px); + top:-52px; + left:-50px; + margin:7px 2px 1px 2px; +} + +.moe-infobar-secinfo{ + position:absolute; + clip:rect(175px 75px 199px 50px); + top:-178px; + left:-50px; + margin:7px 2px 1px 2px; +} + +.moe-infobar-dismiss { + position:absolute; + clip:rect(83px 71px 98px 55px); + top:-83px; + right:0px; + margin:2px 1px 1px 2px; +} + +.moe-infobar-dismiss:hover { + cursor:default; +} + +.moe-infobar-dismiss:focus { + -webkit-filter: brightness(50%); + filter: brightness(50%); +} + +.moe-infobar-message-div { + overflow:hidden; + height:100%; + width:100%; + max-height:68px; +} + +.moe-infobar-title { + font-style:Normal; + font-size:8pt; + color:#444444; + font-weight:bold; + word-wrap:break-word; + overflow:hidden; +} + +.moe-infobar-message { + font-style:normal; + font-size:8pt; + color:#444444; + margin:7px 10px 0px 6px; + text-overflow:ellipsis; + overflow:hidden; +} + +.moe-infobar-message-with-url { + color:#0000FF; +} + +button.moe-infobar-button { + text-transform:uppercase; + font-size:8pt; + background-color:#FFF19D; + border:1px solid #B4A555; + color:#444444; + text-align:center; + vertical-align:middle; + margin:3px 3px 3px 0px; + padding:3px 15px; + display:inline; + overflow:visible; +} + +button.moe-infobar-button:hover { + background-color:#FEF8D8; + border-color:#B4A555; + cursor:default; +} + +button.moe-infobar-button:active { + background-color:#F3E282; + border-color:#B4A555; +} + +.moe-background { + height: 100%; + width:100%; +} + +.moe-trust-prompt { + background-color: #ffffff; +} + +.moe-trust-prompt-collapse { + position: absolute; + top: 15px; + right: 15px; +} +.moe-trust-prompt-collapse:hover { + cursor: pointer; +} +.collapsed .moe-trust-prompt-collapse { + transform: rotate(180deg); +} +.taskpane-add-in .moe-trust-prompt-collapse { + display: none; +} + +.moe-trust-prompt-button { + box-sizing: border-box; + margin: 0; + padding: 0; + box-shadow: none; + color: #333; + font-size: 14px; + font-weight: 400; + background-color: #d2d2d2; + border: 1px solid #d2d2d2; + cursor: pointer; + display: inline-block; + height: 32px; + min-width: 80px; + padding: 4px 20px 6px; + border-radius: 2px; +} +.moe-trust-prompt-button:hover { + background-color: #e6e6e6; + border-color: #e6e6e6; + outline: none; +} +.moe-trust-prompt-button:active { + background-color: #969696; + border-color: #969696; +} +.WAC_Word .moe-trust-prompt-button-primary { + color: #ffffff; + background-color: #2b579a; + border-color: #2b579a; +} +.WAC_Word .moe-trust-prompt-button-primary:hover { + background-color: #4a78b0; + border-color: #4a78b0; +} +.WAC_Word .moe-trust-prompt-button-primary:active { + background-color: #124078; + border-color: #124078; +} +.WAC_Powerpoint .moe-trust-prompt-button-primary { + color: #ffffff; + background-color: #b7472a; + border-color: #b7472a; +} +.WAC_Powerpoint .moe-trust-prompt-button-primary:hover { + background-color: #e86e58; + border-color: #e86e58; +} +.WAC_Powerpoint .moe-trust-prompt-button-primary:active { + background-color: #a92b1a; + border-color: #a92b1a; +} +.WAC_Excel .moe-trust-prompt-button-primary { + color: #ffffff; + background-color: #217346; + border-color: #217346; +} +.WAC_Excel .moe-trust-prompt-button-primary:hover { + background-color: #4e9668; + border-color: #4e9668; +} +.WAC_Excel .moe-trust-prompt-button-primary:active { + background-color: #0e5c2f; + border-color: #0e5c2f; +} + +.moe-trust-prompt-table { + width: 100%; +} +.moe-trust-prompt-row {} +.moe-trust-prompt-cell { + padding: 0px 15px; + margin: 0px; +} +.moe-trust-prompt-cell p { + margin: 0; +} + +.moe-trust-prompt-header .moe-trust-prompt-cell { + max-width: 0px; +} +.moe-trust-prompt-header-title { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + padding-right: 0px; + font-size: 16pt; +} +.WAC_Word .moe-trust-prompt-header-title { + color: #2b579a; +} +.WAC_Powerpoint .moe-trust-prompt-header-title { + color: #b7472a; +} +.WAC_Excel .moe-trust-prompt-header-title { + color: #217346; +} + +.moe-trust-prompt-preview .moe-trust-prompt-cell { + padding-top: 5px; + max-width: 0px; +} +.moe-trust-prompt-preview-img { + width: 48px; + height:48px; + float: left; + background-color: #f4f4f4; + border: 1px solid #f4f4f4; +} +.moe-trust-prompt-preview-title { + padding-left: 15px; + font-size: 14px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.moe-trust-prompt-preview-sub { + padding-left: 15px; + margin-top: 3px; + font-size: 12px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.moe-trust-prompt-description .moe-trust-prompt-cell { + padding-top: 15px; +} +.WAC_Powerpoint .moe-trust-prompt-description .moe-trust-prompt-cell, +.WAC_Excel .moe-trust-prompt-description .moe-trust-prompt-cell { + padding-top: 10px; +} +.moe-trust-prompt-description-text { + font-size: 12px; + white-space: normal; + max-width: 450px; +} + +.moe-trust-prompt-footer .moe-trust-prompt-cell { + padding-top: 15px; +} +.moe-trust-prompt-buttons-action { } +.moe-trust-prompt-buttons-url { + margin-left: 15px; +} + +.taskpane-add-in thead { + display: none; +} +.content-add-in .moe-trust-prompt-preview { + display: none; +} +.content-add-in .moe-trust-prompt-header .moe-trust-prompt-cell { + padding-top: 15px; +} +.content-add-in .moe-trust-prompt-footer .moe-trust-prompt-cell { + padding-bottom: 15px; +} +.content-add-in .moe-trust-prompt-table thead, +.moe-trust-prompt-table tbody { + transition: visibility 0.1s ease-out, + opacity 0.3s ease-out; +} +.content-add-in.collapsed .moe-trust-prompt-table thead, +.collapsed .moe-trust-prompt-table tbody { + visibility: collapse; + opacity: 0; + transition: visibility 0.3s ease-in, + opacity 0.1s ease-in; +} +.content-add-in .moe-trust-prompt-table thead td, +.moe-trust-prompt-table tbody td { + transition: margin 0.1s ease-out, + padding 0.1s ease-out; +} +.content-add-in.collapsed .moe-trust-prompt-table thead td, +.collapsed .moe-trust-prompt-table tbody td { + margin: 0; + padding: 0; + transition: margin 0.3s ease-in, + padding 0.3s ease-in; +} +.content-add-in .moe-trust-prompt-table thead td > *, +.moe-trust-prompt-table tbody td > * { + transition: height 0.1s ease-out, + opacity 0.3s ease-out; +} +.content-add-in.collapsed .moe-trust-prompt-table thead td > *, +.collapsed .moe-trust-prompt-table tbody td > * { + height: 0; + opacity: 0; + transition: height 0.3s ease-in, + opacity 0.1s ease-in; +} +.content-add-in .moe-trust-prompt-buttons-url { + transition: visibility 0.1s ease-out, + height 0.1s ease-out, + opacity 0.3s ease-out, + margin 0.1s ease-out, + padding 0.1s ease-out; +} +.content-add-in.collapsed .moe-trust-prompt-buttons-url { + visibility: collapse; + height: 0; + opacity: 0; + margin: 0; + padding: 0; + transition: visibility 0.3s ease-in, + height 0.3s ease-in, + opacity 0.1s ease-in, + margin 0.3s ease-in, + padding 0.3s ease-in; +} diff --git a/dist/custom-functions-runtime.debug.js b/dist/custom-functions-runtime.debug.js new file mode 100644 index 000000000..993fd8733 --- /dev/null +++ b/dist/custom-functions-runtime.debug.js @@ -0,0 +1,8074 @@ +/* Office JavaScript API library - Custom Functions */ + +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + This file incorporates the "whatwg-fetch" implementation, version 2.0.3, licensed under MIT with the following licensing notice: + (See github.com/github/fetch/blob/master/LICENSE) + + Copyright (c) 2014-2016 GitHub, Inc. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +*/ + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + + This file also contains the following Promise implementation (with a few small modifications): + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 2.3.0 +*/ +var OSF = OSF || {}; +OSF.ConstantNames = { + FileVersion: "0.0.0.0", + OfficeJS: "custom-functions-runtime.js", + OfficeDebugJS: "custom-functions-runtime.debug.js", + HostFileScriptSuffix: "core", + IsCustomFunctionsRuntime: true +}; +var OSF = OSF || {}; +OSF.HostSpecificFileVersionDefault = "16.00"; +OSF.HostSpecificFileVersionMap = { + "access": { + "web": "16.00" + }, + "agavito": { + "winrt": "16.00" + }, + "excel": { + "android": "16.00", + "ios": "16.00", + "mac": "16.00", + "web": "16.00", + "win32": "16.01", + "winrt": "16.00" + }, + "onenote": { + "android": "16.00", + "ios": "16.00", + "mac": "16.00", + "web": "16.00", + "win32": "16.00", + "winrt": "16.00" + }, + "outlook": { + "android": "16.00", + "ios": "16.00", + "mac": "16.00", + "web": "16.01", + "win32": "16.02" + }, + "powerpoint": { + "ios": "16.00", + "mac": "16.00", + "web": "16.00", + "win32": "16.01", + "winrt": "16.00" + }, + "project": { + "win32": "16.00" + }, + "sway": { + "web": "16.00" + }, + "word": { + "ios": "16.00", + "mac": "16.00", + "web": "16.00", + "win32": "16.01", + "winrt": "16.00" + }, + "visio": { + "web": "16.00", + "win32": "16.00" + } +}; +OSF.SupportedLocales = { + "ar-sa": true, + "bg-bg": true, + "bn-in": true, + "ca-es": true, + "cs-cz": true, + "da-dk": true, + "de-de": true, + "el-gr": true, + "en-us": true, + "es-es": true, + "et-ee": true, + "eu-es": true, + "fa-ir": true, + "fi-fi": true, + "fr-fr": true, + "gl-es": true, + "he-il": true, + "hi-in": true, + "hr-hr": true, + "hu-hu": true, + "id-id": true, + "it-it": true, + "ja-jp": true, + "kk-kz": true, + "ko-kr": true, + "lo-la": true, + "lt-lt": true, + "lv-lv": true, + "ms-my": true, + "nb-no": true, + "nl-nl": true, + "nn-no": true, + "pl-pl": true, + "pt-br": true, + "pt-pt": true, + "ro-ro": true, + "ru-ru": true, + "sk-sk": true, + "sl-si": true, + "sr-cyrl-cs": true, + "sr-cyrl-rs": true, + "sr-latn-cs": true, + "sr-latn-rs": true, + "sv-se": true, + "th-th": true, + "tr-tr": true, + "uk-ua": true, + "ur-pk": true, + "vi-vn": true, + "zh-cn": true, + "zh-tw": true +}; +OSF.AssociatedLocales = { + ar: "ar-sa", + bg: "bg-bg", + bn: "bn-in", + ca: "ca-es", + cs: "cs-cz", + da: "da-dk", + de: "de-de", + el: "el-gr", + en: "en-us", + es: "es-es", + et: "et-ee", + eu: "eu-es", + fa: "fa-ir", + fi: "fi-fi", + fr: "fr-fr", + gl: "gl-es", + he: "he-il", + hi: "hi-in", + hr: "hr-hr", + hu: "hu-hu", + id: "id-id", + it: "it-it", + ja: "ja-jp", + kk: "kk-kz", + ko: "ko-kr", + lo: "lo-la", + lt: "lt-lt", + lv: "lv-lv", + ms: "ms-my", + nb: "nb-no", + nl: "nl-nl", + nn: "nn-no", + pl: "pl-pl", + pt: "pt-br", + ro: "ro-ro", + ru: "ru-ru", + sk: "sk-sk", + sl: "sl-si", + sr: "sr-cyrl-cs", + sv: "sv-se", + th: "th-th", + tr: "tr-tr", + uk: "uk-ua", + ur: "ur-pk", + vi: "vi-vn", + zh: "zh-cn" +}; +OSF.SupportedRTLLocales = { + "ar-sa": true, + "he-il": true, + "fa-ir": true, + "ur-pk": true +}; +OSF.getSupportedLocale = function OSF$getSupportedLocale(locale, defaultLocale) { + if (defaultLocale === void 0) { defaultLocale = "en-us"; } + if (!locale) { + return defaultLocale; + } + var supportedLocale; + locale = locale.toLowerCase(); + if (locale in OSF.SupportedLocales) { + supportedLocale = locale; + } + else { + var localeParts = locale.split('-', 1); + if (localeParts && localeParts.length > 0) { + supportedLocale = OSF.AssociatedLocales[localeParts[0]]; + } + } + if (!supportedLocale) { + supportedLocale = defaultLocale; + } + return supportedLocale; +}; +OSF.isRTLLocale = function OSF$isRTLLocale(locale) { + if (!locale) { + return false; + } + return OSF.SupportedRTLLocales[locale.toLowerCase()] || false; +}; +var ScriptLoading; +(function (ScriptLoading) { + var ScriptInfo = (function () { + function ScriptInfo(url, isReady, hasStarted, timer, pendingCallback) { + this.url = url; + this.isReady = isReady; + this.hasStarted = hasStarted; + this.timer = timer; + this.hasError = false; + this.pendingCallbacks = []; + this.pendingCallbacks.push(pendingCallback); + } + return ScriptInfo; + }()); + var ScriptTelemetry = (function () { + function ScriptTelemetry(scriptId, startTime, msResponseTime) { + this.scriptId = scriptId; + this.startTime = startTime; + this.msResponseTime = msResponseTime; + } + return ScriptTelemetry; + }()); + var LoadScriptHelper = (function () { + function LoadScriptHelper(constantNames) { + if (constantNames === void 0) { constantNames = { + OfficeJS: "office.js", + OfficeDebugJS: "office.debug.js" + }; } + this.constantNames = constantNames; + this.defaultScriptLoadingTimeout = 10000; + this.loadedScriptByIds = {}; + this.scriptTelemetryBuffer = []; + this.osfControlAppCorrelationId = ""; + this.basePath = null; + this.getUseAssociatedActionsOnly = null; + } + LoadScriptHelper.prototype.isScriptLoading = function (id) { + return !!(this.loadedScriptByIds[id] && this.loadedScriptByIds[id].hasStarted); + }; + LoadScriptHelper.prototype.getOfficeJsBasePath = function () { + if (this.basePath) { + return this.basePath; + } + else { + var getScriptBase = function (scriptSrc, scriptNameToCheck) { + var scriptBase, indexOfJS, scriptSrcLowerCase; + scriptSrcLowerCase = scriptSrc.toLowerCase(); + indexOfJS = scriptSrcLowerCase.indexOf(scriptNameToCheck); + if (indexOfJS >= 0 && indexOfJS === (scriptSrc.length - scriptNameToCheck.length) && (indexOfJS === 0 || scriptSrc.charAt(indexOfJS - 1) === '/' || scriptSrc.charAt(indexOfJS - 1) === '\\')) { + scriptBase = scriptSrc.substring(0, indexOfJS); + } + else if (indexOfJS >= 0 + && indexOfJS < (scriptSrc.length - scriptNameToCheck.length) + && scriptSrc.charAt(indexOfJS + scriptNameToCheck.length) === '?' + && (indexOfJS === 0 || scriptSrc.charAt(indexOfJS - 1) === '/' || scriptSrc.charAt(indexOfJS - 1) === '\\')) { + scriptBase = scriptSrc.substring(0, indexOfJS); + } + return scriptBase; + }; + var scripts = document.getElementsByTagName("script"); + var scriptsCount = scripts.length; + var officeScripts = [this.constantNames.OfficeJS, this.constantNames.OfficeDebugJS]; + var officeScriptsCount = officeScripts.length; + this.getUseAssociatedActionsOnly = false; + var i, j; + for (i = 0; !this.basePath && i < scriptsCount; i++) { + if (scripts[i].src) { + for (j = 0; !this.basePath && j < officeScriptsCount; j++) { + this.basePath = getScriptBase(scripts[i].src, officeScripts[j]); + if (this.basePath) { + try { + var attr = scripts[i].getAttribute("data-use-associated-actions-only"); + this.getUseAssociatedActionsOnly = attr === "1"; + } + catch (ex) { + } + } + } + } + } + return this.basePath; + } + }; + LoadScriptHelper.prototype.getUseAssociatedActionsOnlyDefined = function () { + this.getOfficeJsBasePath(); + return this.getUseAssociatedActionsOnly; + }; + LoadScriptHelper.prototype.loadScript = function (url, scriptId, callback, highPriority, timeoutInMs) { + this.loadScriptInternal(url, scriptId, callback, highPriority, timeoutInMs); + }; + LoadScriptHelper.prototype.loadScriptParallel = function (url, scriptId, timeoutInMs) { + this.loadScriptInternal(url, scriptId, null, false, timeoutInMs); + }; + LoadScriptHelper.prototype.waitForFunction = function (scriptLoadTest, callback, numberOfTries, delay) { + var attemptsRemaining = numberOfTries; + var timerId; + var validateFunction = function () { + attemptsRemaining--; + if (scriptLoadTest()) { + callback(true); + return; + } + else if (attemptsRemaining > 0) { + timerId = window.setTimeout(validateFunction, delay); + attemptsRemaining--; + } + else { + window.clearTimeout(timerId); + callback(false); + } + }; + validateFunction(); + }; + LoadScriptHelper.prototype.waitForScripts = function (ids, callback) { + var _this = this; + if (this.invokeCallbackIfScriptsReady(ids, callback) == false) { + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var loadedScriptEntry = this.loadedScriptByIds[id]; + if (loadedScriptEntry) { + loadedScriptEntry.pendingCallbacks.push(function () { + _this.invokeCallbackIfScriptsReady(ids, callback); + }); + } + } + } + }; + LoadScriptHelper.prototype.logScriptLoading = function (scriptId, startTime, msResponseTime) { + startTime = Math.floor(startTime); + if (OSF.AppTelemetry && OSF.AppTelemetry.onScriptDone) { + if (OSF.AppTelemetry.onScriptDone.length == 3) { + OSF.AppTelemetry.onScriptDone(scriptId, startTime, msResponseTime); + } + else { + OSF.AppTelemetry.onScriptDone(scriptId, startTime, msResponseTime, this.osfControlAppCorrelationId); + } + } + else { + var scriptTelemetry = new ScriptTelemetry(scriptId, startTime, msResponseTime); + this.scriptTelemetryBuffer.push(scriptTelemetry); + } + }; + LoadScriptHelper.prototype.setAppCorrelationId = function (appCorrelationId) { + this.osfControlAppCorrelationId = appCorrelationId; + }; + LoadScriptHelper.prototype.invokeCallbackIfScriptsReady = function (ids, callback) { + var hasError = false; + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var loadedScriptEntry = this.loadedScriptByIds[id]; + if (!loadedScriptEntry) { + loadedScriptEntry = new ScriptInfo("", false, false, null, null); + this.loadedScriptByIds[id] = loadedScriptEntry; + } + if (loadedScriptEntry.isReady == false) { + return false; + } + else if (loadedScriptEntry.hasError) { + hasError = true; + } + } + callback(!hasError); + return true; + }; + LoadScriptHelper.prototype.getScriptEntryByUrl = function (url) { + for (var key in this.loadedScriptByIds) { + var scriptEntry = this.loadedScriptByIds[key]; + if (this.loadedScriptByIds.hasOwnProperty(key) && scriptEntry.url === url) { + return scriptEntry; + } + } + return null; + }; + LoadScriptHelper.prototype.loadScriptInternal = function (url, scriptId, callback, highPriority, timeoutInMs) { + if (url) { + var self = this; + var doc = window.document; + var loadedScriptEntry = (scriptId && this.loadedScriptByIds[scriptId]) ? this.loadedScriptByIds[scriptId] : this.getScriptEntryByUrl(url); + if (!loadedScriptEntry || loadedScriptEntry.hasError || loadedScriptEntry.url.toLowerCase() != url.toLowerCase()) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + if (scriptId) { + script.id = scriptId; + } + if (!loadedScriptEntry) { + loadedScriptEntry = new ScriptInfo(url, false, false, null, null); + this.loadedScriptByIds[(scriptId ? scriptId : url)] = loadedScriptEntry; + } + else { + loadedScriptEntry.url = url; + loadedScriptEntry.hasError = false; + loadedScriptEntry.isReady = false; + } + if (callback) { + if (highPriority) { + loadedScriptEntry.pendingCallbacks.unshift(callback); + } + else { + loadedScriptEntry.pendingCallbacks.push(callback); + } + } + var timeFromPageInit = -1; + if (window.performance && window.performance.now) { + timeFromPageInit = window.performance.now(); + } + var startTime = (new Date()).getTime(); + var logTelemetry = function (succeeded) { + if (scriptId) { + var totalTime = (new Date()).getTime() - startTime; + if (!succeeded) { + totalTime = -totalTime; + } + self.logScriptLoading(scriptId, timeFromPageInit, totalTime); + } + self.flushTelemetryBuffer(); + }; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (!OSF._OfficeAppFactory.getLoggingAllowed() && (typeof OSF.AppTelemetry !== 'undefined')) { + OSF.AppTelemetry.enableTelemetry = false; + } + logTelemetry(true); + loadedScriptEntry.isReady = true; + if (loadedScriptEntry.timer != null) { + clearTimeout(loadedScriptEntry.timer); + delete loadedScriptEntry.timer; + } + var pendingCallbackCount = loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = loadedScriptEntry.pendingCallbacks.shift(); + if (currentCallback) { + var result = currentCallback(true); + if (result === false) { + break; + } + } + } + }; + var onLoadError = function () { + logTelemetry(false); + loadedScriptEntry.hasError = true; + loadedScriptEntry.isReady = true; + if (loadedScriptEntry.timer != null) { + clearTimeout(loadedScriptEntry.timer); + delete loadedScriptEntry.timer; + } + var pendingCallbackCount = loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = loadedScriptEntry.pendingCallbacks.shift(); + if (currentCallback) { + var result = currentCallback(false); + if (result === false) { + break; + } + } + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || this.defaultScriptLoadingTimeout; + loadedScriptEntry.timer = setTimeout(onLoadError, timeoutInMs); + loadedScriptEntry.hasStarted = true; + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (loadedScriptEntry.isReady) { + callback(true); + } + else { + if (highPriority) { + loadedScriptEntry.pendingCallbacks.unshift(callback); + } + else { + loadedScriptEntry.pendingCallbacks.push(callback); + } + } + } + }; + LoadScriptHelper.prototype.flushTelemetryBuffer = function () { + if (OSF.AppTelemetry && OSF.AppTelemetry.onScriptDone) { + for (var i = 0; i < this.scriptTelemetryBuffer.length; i++) { + var scriptTelemetry = this.scriptTelemetryBuffer[i]; + if (OSF.AppTelemetry.onScriptDone.length == 3) { + OSF.AppTelemetry.onScriptDone(scriptTelemetry.scriptId, scriptTelemetry.startTime, scriptTelemetry.msResponseTime); + } + else { + OSF.AppTelemetry.onScriptDone(scriptTelemetry.scriptId, scriptTelemetry.startTime, scriptTelemetry.msResponseTime, this.osfControlAppCorrelationId); + } + } + this.scriptTelemetryBuffer = []; + } + }; + return LoadScriptHelper; + }()); + ScriptLoading.LoadScriptHelper = LoadScriptHelper; +})(ScriptLoading || (ScriptLoading = {})); +var OfficeExt; +(function (OfficeExt) { + var HostName; + (function (HostName) { + var Host = (function () { + function Host() { + this.getDiagnostics = function _getDiagnostics(version) { + var diagnostics = { + host: this.getHost(), + version: (version || this.getDefaultVersion()), + platform: this.getPlatform() + }; + return diagnostics; + }; + this.platformRemappings = { + web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, + winrt: Microsoft.Office.WebExtension.PlatformType.Universal, + win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, + ios: Microsoft.Office.WebExtension.PlatformType.iOS, + android: Microsoft.Office.WebExtension.PlatformType.Android + }; + this.camelCaseMappings = { + powerpoint: Microsoft.Office.WebExtension.HostType.PowerPoint, + onenote: Microsoft.Office.WebExtension.HostType.OneNote + }; + this.hostInfo = OSF._OfficeAppFactory.getHostInfo(); + this.getHost = this.getHost.bind(this); + this.getPlatform = this.getPlatform.bind(this); + this.getDiagnostics = this.getDiagnostics.bind(this); + } + Host.prototype.capitalizeFirstLetter = function (input) { + if (input) { + return (input[0].toUpperCase() + input.slice(1).toLowerCase()); + } + return input; + }; + Host.getInstance = function () { + if (Host.hostObj === undefined) { + Host.hostObj = new Host(); + } + return Host.hostObj; + }; + Host.prototype.getPlatform = function (appNumber) { + if (this.hostInfo.hostPlatform) { + var hostPlatform = this.hostInfo.hostPlatform.toLowerCase(); + if (this.platformRemappings[hostPlatform]) { + return this.platformRemappings[hostPlatform]; + } + } + return null; + }; + Host.prototype.getHost = function (appNumber) { + if (this.hostInfo.hostType) { + var hostType = this.hostInfo.hostType.toLowerCase(); + if (this.camelCaseMappings[hostType]) { + return this.camelCaseMappings[hostType]; + } + hostType = this.capitalizeFirstLetter(this.hostInfo.hostType); + if (Microsoft.Office.WebExtension.HostType[hostType]) { + return Microsoft.Office.WebExtension.HostType[hostType]; + } + } + return null; + }; + Host.prototype.getDefaultVersion = function () { + if (this.getHost()) { + return "16.0.0000.0000"; + } + return null; + }; + return Host; + }()); + HostName.Host = Host; + })(HostName = OfficeExt.HostName || (OfficeExt.HostName = {})); +})(OfficeExt || (OfficeExt = {})); +var Office; +(function (Office) { + var _Internal; + (function (_Internal) { + var PromiseImpl; + (function (PromiseImpl) { + function Init() { + return (function () { + "use strict"; + function lib$es6$promise$utils$$objectOrFunction(x) { + return typeof x === 'function' || (typeof x === 'object' && x !== null); + } + function lib$es6$promise$utils$$isFunction(x) { + return typeof x === 'function'; + } + function lib$es6$promise$utils$$isMaybeThenable(x) { + return typeof x === 'object' && x !== null; + } + var lib$es6$promise$utils$$_isArray; + if (!Array.isArray) { + lib$es6$promise$utils$$_isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; + } + else { + lib$es6$promise$utils$$_isArray = Array.isArray; + } + var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray; + var lib$es6$promise$asap$$len = 0; + var lib$es6$promise$asap$$toString = {}.toString; + var lib$es6$promise$asap$$vertxNext; + var lib$es6$promise$asap$$customSchedulerFn; + var lib$es6$promise$asap$$asap = function asap(callback, arg) { + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback; + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg; + lib$es6$promise$asap$$len += 2; + if (lib$es6$promise$asap$$len === 2) { + if (lib$es6$promise$asap$$customSchedulerFn) { + lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush); + } + else { + lib$es6$promise$asap$$scheduleFlush(); + } + } + }; + function lib$es6$promise$asap$$setScheduler(scheduleFn) { + lib$es6$promise$asap$$customSchedulerFn = scheduleFn; + } + function lib$es6$promise$asap$$setAsap(asapFn) { + lib$es6$promise$asap$$asap = asapFn; + } + var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined; + var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {}; + var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver; + var lib$es6$promise$asap$$isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && + typeof importScripts !== 'undefined' && + typeof MessageChannel !== 'undefined'; + function lib$es6$promise$asap$$useNextTick() { + var nextTick = process.nextTick; + var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); + if (Array.isArray(version) && version[1] === '0' && version[2] === '10') { + nextTick = setImmediate; + } + return function () { + nextTick(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useVertxTimer() { + return function () { + lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useMutationObserver() { + var iterations = 0; + var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + return function () { + node.data = (iterations = ++iterations % 2); + }; + } + function lib$es6$promise$asap$$useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = lib$es6$promise$asap$$flush; + return function () { + channel.port2.postMessage(0); + }; + } + function lib$es6$promise$asap$$useSetTimeout() { + return function () { + setTimeout(lib$es6$promise$asap$$flush, 1); + }; + } + var lib$es6$promise$asap$$queue = new Array(1000); + function lib$es6$promise$asap$$flush() { + for (var i = 0; i < lib$es6$promise$asap$$len; i += 2) { + var callback = lib$es6$promise$asap$$queue[i]; + var arg = lib$es6$promise$asap$$queue[i + 1]; + callback(arg); + lib$es6$promise$asap$$queue[i] = undefined; + lib$es6$promise$asap$$queue[i + 1] = undefined; + } + lib$es6$promise$asap$$len = 0; + } + var lib$es6$promise$asap$$scheduleFlush; + if (lib$es6$promise$asap$$isNode) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick(); + } + else if (lib$es6$promise$asap$$isWorker) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel(); + } + else { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout(); + } + function lib$es6$promise$$internal$$noop() { } + var lib$es6$promise$$internal$$PENDING = void 0; + var lib$es6$promise$$internal$$FULFILLED = 1; + var lib$es6$promise$$internal$$REJECTED = 2; + var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$selfFullfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function lib$es6$promise$$internal$$cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); + } + function lib$es6$promise$$internal$$getThen(promise) { + try { + return promise.then; + } + catch (error) { + lib$es6$promise$$internal$$GET_THEN_ERROR.error = error; + return lib$es6$promise$$internal$$GET_THEN_ERROR; + } + } + function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } + catch (e) { + return e; + } + } + function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) { + lib$es6$promise$asap$$asap(function (promise) { + var sealed = false; + var error = lib$es6$promise$$internal$$tryThen(then, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + lib$es6$promise$$internal$$reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + if (!sealed && error) { + sealed = true; + lib$es6$promise$$internal$$reject(promise, error); + } + }, promise); + } + function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) { + if (thenable._state === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, thenable._result); + } + else if (thenable._state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, thenable._result); + } + else { + lib$es6$promise$$internal$$subscribe(thenable, undefined, function (value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function (reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + } + function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable) { + if (maybeThenable.constructor === promise.constructor) { + lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable); + } + else { + var then = lib$es6$promise$$internal$$getThen(maybeThenable); + if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error); + } + else if (then === undefined) { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + else if (lib$es6$promise$utils$$isFunction(then)) { + lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then); + } + else { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + } + } + function lib$es6$promise$$internal$$resolve(promise, value) { + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFullfillment()); + } + else if (lib$es6$promise$utils$$objectOrFunction(value)) { + lib$es6$promise$$internal$$handleMaybeThenable(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + } + function lib$es6$promise$$internal$$publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + lib$es6$promise$$internal$$publish(promise); + } + function lib$es6$promise$$internal$$fulfill(promise, value) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._result = value; + promise._state = lib$es6$promise$$internal$$FULFILLED; + if (promise._subscribers.length !== 0) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise); + } + } + function lib$es6$promise$$internal$$reject(promise, reason) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._state = lib$es6$promise$$internal$$REJECTED; + promise._result = reason; + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise); + } + function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) { + var subscribers = parent._subscribers; + var length = subscribers.length; + parent._onerror = null; + subscribers[length] = child; + subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment; + subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection; + if (length === 0 && parent._state) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent); + } + } + function lib$es6$promise$$internal$$publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + if (subscribers.length === 0) { + return; + } + var child, callback, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + if (child) { + lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail); + } + else { + callback(detail); + } + } + promise._subscribers.length = 0; + } + function lib$es6$promise$$internal$$ErrorObject() { + this.error = null; + } + var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$tryCatch(callback, detail) { + try { + return callback(detail); + } + catch (e) { + lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e; + return lib$es6$promise$$internal$$TRY_CATCH_ERROR; + } + } + function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) { + var hasCallback = lib$es6$promise$utils$$isFunction(callback), value, error, succeeded, failed; + if (hasCallback) { + value = lib$es6$promise$$internal$$tryCatch(callback, detail); + if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value = null; + } + else { + succeeded = true; + } + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn()); + return; + } + } + else { + value = detail; + succeeded = true; + } + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + } + else if (hasCallback && succeeded) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else if (failed) { + lib$es6$promise$$internal$$reject(promise, error); + } + else if (settled === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, value); + } + else if (settled === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + } + function lib$es6$promise$$internal$$initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function rejectPromise(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + catch (e) { + lib$es6$promise$$internal$$reject(promise, e); + } + } + function lib$es6$promise$enumerator$$Enumerator(Constructor, input) { + var enumerator = this; + enumerator._instanceConstructor = Constructor; + enumerator.promise = new Constructor(lib$es6$promise$$internal$$noop); + if (enumerator._validateInput(input)) { + enumerator._input = input; + enumerator.length = input.length; + enumerator._remaining = input.length; + enumerator._init(); + if (enumerator.length === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + else { + enumerator.length = enumerator.length || 0; + enumerator._enumerate(); + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + } + } + else { + lib$es6$promise$$internal$$reject(enumerator.promise, enumerator._validationError()); + } + } + lib$es6$promise$enumerator$$Enumerator.prototype._validateInput = function (input) { + return lib$es6$promise$utils$$isArray(input); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._validationError = function () { + return new Error('Array Methods must be provided an Array'); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._init = function () { + this._result = new Array(this.length); + }; + var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator; + lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function () { + var enumerator = this; + var length = enumerator.length; + var promise = enumerator.promise; + var input = enumerator._input; + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + enumerator._eachEntry(input[i], i); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function (entry, i) { + var enumerator = this; + var c = enumerator._instanceConstructor; + if (lib$es6$promise$utils$$isMaybeThenable(entry)) { + if (entry.constructor === c && entry._state !== lib$es6$promise$$internal$$PENDING) { + entry._onerror = null; + enumerator._settledAt(entry._state, i, entry._result); + } + else { + enumerator._willSettleAt(c.resolve(entry), i); + } + } + else { + enumerator._remaining--; + enumerator._result[i] = entry; + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function (state, i, value) { + var enumerator = this; + var promise = enumerator.promise; + if (promise._state === lib$es6$promise$$internal$$PENDING) { + enumerator._remaining--; + if (state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + else { + enumerator._result[i] = value; + } + } + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(promise, enumerator._result); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function (promise, i) { + var enumerator = this; + lib$es6$promise$$internal$$subscribe(promise, undefined, function (value) { + enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value); + }, function (reason) { + enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason); + }); + }; + function lib$es6$promise$promise$all$$all(entries) { + return new lib$es6$promise$enumerator$$default(this, entries).promise; + } + var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all; + function lib$es6$promise$promise$race$$race(entries) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + if (!lib$es6$promise$utils$$isArray(entries)) { + lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.')); + return promise; + } + var length = entries.length; + function onFulfillment(value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + function onRejection(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + } + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); + } + return promise; + } + var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race; + function lib$es6$promise$promise$resolve$$resolve(object) { + var Constructor = this; + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$resolve(promise, object); + return promise; + } + var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve; + function lib$es6$promise$promise$reject$$reject(reason) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$reject(promise, reason); + return promise; + } + var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject; + var lib$es6$promise$promise$$counter = 0; + function lib$es6$promise$promise$$needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); + } + function lib$es6$promise$promise$$needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise; + function lib$es6$promise$promise$$Promise(resolver) { + this._id = lib$es6$promise$promise$$counter++; + this._state = undefined; + this._result = undefined; + this._subscribers = []; + if (lib$es6$promise$$internal$$noop !== resolver) { + if (!lib$es6$promise$utils$$isFunction(resolver)) { + lib$es6$promise$promise$$needsResolver(); + } + if (!(this instanceof lib$es6$promise$promise$$Promise)) { + lib$es6$promise$promise$$needsNew(); + } + lib$es6$promise$$internal$$initializePromise(this, resolver); + } + } + lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default; + lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default; + lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default; + lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default; + lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler; + lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap; + lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap; + lib$es6$promise$promise$$Promise.prototype = { + constructor: lib$es6$promise$promise$$Promise, + then: function (onFulfillment, onRejection) { + var parent = this; + var state = parent._state; + if (state === lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state === lib$es6$promise$$internal$$REJECTED && !onRejection) { + return this; + } + var child = new this.constructor(lib$es6$promise$$internal$$noop); + var result = parent._result; + if (state) { + var callback = arguments[state - 1]; + lib$es6$promise$asap$$asap(function () { + lib$es6$promise$$internal$$invokeCallback(state, child, callback, result); + }); + } + else { + lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection); + } + return child; + }, + 'catch': function (onRejection) { + return this.then(null, onRejection); + } + }; + return lib$es6$promise$promise$$default; + }).call(this); + } + PromiseImpl.Init = Init; + })(PromiseImpl = _Internal.PromiseImpl || (_Internal.PromiseImpl = {})); + })(_Internal = Office._Internal || (Office._Internal = {})); + (function (_Internal) { + function isEdgeLessThan14() { + var userAgent = window.navigator.userAgent; + var versionIdx = userAgent.indexOf("Edge/"); + if (versionIdx >= 0) { + userAgent = userAgent.substring(versionIdx + 5, userAgent.length); + if (userAgent < "14.14393") + return true; + else + return false; + } + return false; + } + function determinePromise() { + if (typeof (window) === "undefined" && typeof (Promise) === "function") { + return Promise; + } + if (typeof (window) !== "undefined" && window.Promise) { + if (isEdgeLessThan14()) { + return _Internal.PromiseImpl.Init(); + } + else { + return window.Promise; + } + } + else { + return _Internal.PromiseImpl.Init(); + } + } + _Internal.OfficePromise = determinePromise(); + })(_Internal = Office._Internal || (Office._Internal = {})); + var OfficePromise = _Internal.OfficePromise; + Office.Promise = OfficePromise; +})(Office || (Office = {})); +var OTel; +(function (OTel) { + var CDN_PATH_OTELJS_AGAVE = 'telemetry/oteljs_agave.js'; + var OTelLogger = (function () { + function OTelLogger() { + } + OTelLogger.loaded = function () { + return !(OTelLogger.logger === undefined || OTelLogger.sink === undefined); + }; + OTelLogger.getOtelSinkCDNLocation = function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + CDN_PATH_OTELJS_AGAVE); + }; + OTelLogger.getMapName = function (map, name) { + if (name !== undefined && map.hasOwnProperty(name)) { + return map[name]; + } + return name; + }; + OTelLogger.getHost = function () { + var host = OSF._OfficeAppFactory.getHostInfo()["hostType"]; + var map = { + "excel": "Excel", + "onenote": "OneNote", + "outlook": "Outlook", + "powerpoint": "PowerPoint", + "project": "Project", + "visio": "Visio", + "word": "Word" + }; + var mappedName = OTelLogger.getMapName(map, host); + return mappedName; + }; + OTelLogger.getFlavor = function () { + var flavor = OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]; + var map = { + "android": "Android", + "ios": "iOS", + "mac": "Mac", + "universal": "Universal", + "web": "Web", + "win32": "Win32" + }; + var mappedName = OTelLogger.getMapName(map, flavor); + return mappedName; + }; + OTelLogger.ensureValue = function (value, alternative) { + if (!value) { + return alternative; + } + return value; + }; + OTelLogger.create = function (info) { + var contract = { + id: info.appId, + marketplaceType: info.marketplaceType, + assetId: info.assetId, + officeJsVersion: info.officeJSVersion, + hostJsVersion: info.hostJSVersion, + browserToken: info.clientId, + instanceId: info.appInstanceId, + sessionId: info.sessionId + }; + var fields = oteljs.Contracts.Office.System.SDX.getFields("SDX", contract); + var host = OTelLogger.getHost(); + var flavor = OTelLogger.getFlavor(); + var version = (flavor === "Web" && info.hostVersion.slice(0, 2) === "0.") ? "16.0.0.0" : info.hostVersion; + var context = { + 'App.Name': host, + 'App.Platform': flavor, + 'App.Version': version, + 'Session.Id': OTelLogger.ensureValue(info.correlationId, "00000000-0000-0000-0000-000000000000") + }; + var namespace = "Office.Extensibility.OfficeJs"; + var ariaTenantToken = 'db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439'; + var nexusTenantToken = 1755; + var logger = new oteljs.SimpleTelemetryLogger(undefined, fields); + logger.setTenantToken(namespace, ariaTenantToken, nexusTenantToken); + if (oteljs.AgaveSink) { + OTelLogger.sink = oteljs.AgaveSink.createInstance(context); + } + if (OTelLogger.sink === undefined) { + OTelLogger.attachLegacyAgaveSink(context); + } + else { + logger.addSink(OTelLogger.sink); + } + return logger; + }; + OTelLogger.attachLegacyAgaveSink = function (context) { + var afterLoadOtelSink = function () { + if (typeof oteljs_agave !== "undefined") { + OTelLogger.sink = oteljs_agave.AgaveSink.createInstance(context); + } + if (OTelLogger.sink === undefined || OTelLogger.logger === undefined) { + OTelLogger.Enabled = false; + OTelLogger.promises = []; + OTelLogger.logger = undefined; + OTelLogger.sink = undefined; + return; + } + OTelLogger.logger.addSink(OTelLogger.sink); + OTelLogger.promises.forEach(function (resolve) { + resolve(); + }); + }; + var timeoutAfterFiveSeconds = 5000; + OSF.OUtil.loadScript(OTelLogger.getOtelSinkCDNLocation(), afterLoadOtelSink, timeoutAfterFiveSeconds); + }; + OTelLogger.initialize = function (info) { + if (!OTelLogger.Enabled) { + OTelLogger.promises = []; + return; + } + var afterOnReady = function () { + if ((typeof oteljs === "undefined")) { + return; + } + if (!OTelLogger.loaded()) { + OTelLogger.logger = OTelLogger.create(info); + } + if (OTelLogger.loaded()) { + OTelLogger.promises.forEach(function (resolve) { + resolve(); + }); + } + }; + Microsoft.Office.WebExtension.onReadyInternal().then(function () { return afterOnReady(); }); + }; + OTelLogger.sendTelemetryEvent = function (telemetryEvent) { + OTelLogger.onTelemetryLoaded(function () { + try { + OTelLogger.logger.sendTelemetryEvent(telemetryEvent); + } + catch (e) { + } + }); + }; + OTelLogger.sendCustomerContent = function (customerContentEvent) { + OTelLogger.onTelemetryLoaded(function () { + try { + OTelLogger.logger.sendCustomerContent(customerContentEvent); + } + catch (e) { + } + }); + }; + OTelLogger.onTelemetryLoaded = function (resolve) { + if (!OTelLogger.Enabled) { + return; + } + if (OTelLogger.loaded()) { + resolve(); + } + else { + OTelLogger.promises.push(resolve); + } + }; + OTelLogger.promises = []; + OTelLogger.Enabled = true; + return OTelLogger; + }()); + OTel.OTelLogger = OTelLogger; +})(OTel || (OTel = {})); +(function (OfficeExt) { + var Association = (function () { + function Association() { + this.m_mappings = {}; + this.m_onchangeHandlers = []; + } + Association.prototype.associate = function (arg1, arg2) { + function consoleWarn(message) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + } + if (arguments.length == 1 && typeof arguments[0] === 'object' && arguments[0]) { + var mappings = arguments[0]; + for (var key in mappings) { + this.associate(key, mappings[key]); + } + } + else if (arguments.length == 2) { + var name_1 = arguments[0]; + var func = arguments[1]; + if (typeof name_1 !== 'string') { + consoleWarn('[InvalidArg] Function=associate'); + return; + } + if (typeof func !== 'function') { + consoleWarn('[InvalidArg] Function=associate'); + return; + } + var nameUpperCase = name_1.toUpperCase(); + if (this.m_mappings[nameUpperCase]) { + consoleWarn('[DuplicatedName] Function=' + name_1); + } + this.m_mappings[nameUpperCase] = func; + for (var i = 0; i < this.m_onchangeHandlers.length; i++) { + this.m_onchangeHandlers[i](); + } + } + else { + consoleWarn('[InvalidArg] Function=associate'); + } + }; + Association.prototype.onchange = function (handler) { + if (handler) { + this.m_onchangeHandlers.push(handler); + } + }; + Object.defineProperty(Association.prototype, "mappings", { + get: function () { + return this.m_mappings; + }, + enumerable: true, + configurable: true + }); + return Association; + }()); + OfficeExt.Association = Association; +})(OfficeExt || (OfficeExt = {})); +var CustomFunctionMappings = window.CustomFunctionMappings || {}; +var CustomFunctions; +(function (CustomFunctions) { + function delayInitialization() { + CustomFunctionMappings['__delay__'] = true; + } + CustomFunctions.delayInitialization = delayInitialization; + ; + CustomFunctions._association = new OfficeExt.Association(); + function associate() { + CustomFunctions._association.associate.apply(CustomFunctions._association, arguments); + delete CustomFunctionMappings['__delay__']; + } + CustomFunctions.associate = associate; + ; +})(CustomFunctions || (CustomFunctions = {})); +(function (Office) { + var actions; + (function (actions) { + actions._association = new OfficeExt.Association(); + function associate() { + actions._association.associate.apply(actions._association, arguments); + } + actions.associate = associate; + ; + })(actions = Office.actions || (Office.actions = {})); +})(Office || (Office = {})); +var g_isExpEnabled = g_isExpEnabled || false; +var g_isOfflineLibrary = g_isOfflineLibrary || false; +(function () { + var previousConstantNames = OSF.ConstantNames || {}; + OSF.ConstantNames = { + FileVersion: "0.0.0.0", + OfficeJS: "office.js", + OfficeDebugJS: "office.debug.js", + DefaultLocale: "en-us", + LocaleStringLoadingTimeout: 5000, + MicrosoftAjaxId: "MSAJAX", + OfficeStringsId: "OFFICESTRINGS", + OfficeJsId: "OFFICEJS", + HostFileId: "HOST", + O15MappingId: "O15Mapping", + OfficeStringJS: "office_strings.debug.js", + O15InitHelper: "o15apptofilemappingtable.debug.js", + SupportedLocales: OSF.SupportedLocales, + AssociatedLocales: OSF.AssociatedLocales, + ExperimentScriptSuffix: "experiment" + }; + for (var key in previousConstantNames) { + OSF.ConstantNames[key] = previousConstantNames[key]; + } +})(); +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { +}; +OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication() { +}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { +}; +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { +}; +OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() { +}; +OSF.HostInfoFlags = { + SharedApp: 1, + CustomFunction: 2, + ProtectedDocDisable: 4, + ExperimentJsEnabled: 8, + PublicAddin: 0x10, + IsMos: 0x40, + IsMonarch: 0x80 +}; +OSF._OfficeAppFactory = (function OSF__OfficeAppFactory() { + var _setNamespace = function OSF_OUtil$_setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name] = {}; + } + }; + _setNamespace("Office", window); + _setNamespace("Microsoft", window); + _setNamespace("Office", Microsoft); + _setNamespace("WebExtension", Microsoft.Office); + if (typeof (window.Office) === 'object') { + for (var p in window.Office) { + if (window.Office.hasOwnProperty(p)) { + Microsoft.Office.WebExtension[p] = window.Office[p]; + } + } + } + window.Office = Microsoft.Office.WebExtension; + var initialDisplayModeMappings = { + 0: "Unknown", + 1: "Hidden", + 2: "Taskpane", + 3: "Dialog" + }; + Microsoft.Office.WebExtension.PlatformType = { + PC: "PC", + OfficeOnline: "OfficeOnline", + Mac: "Mac", + iOS: "iOS", + Android: "Android", + Universal: "Universal" + }; + Microsoft.Office.WebExtension.HostType = { + Word: "Word", + Excel: "Excel", + PowerPoint: "PowerPoint", + Outlook: "Outlook", + OneNote: "OneNote", + Project: "Project", + Access: "Access", + Visio: "Visio" + }; + var _context = {}; + var _settings = {}; + var _hostFacade = {}; + var _WebAppState = { id: null, webAppUrl: null, conversationID: null, clientEndPoint: null, wnd: window.parent, focused: false }; + var _hostInfo = { isO15: true, isRichClient: true, hostType: "", hostPlatform: "", hostSpecificFileVersion: "", hostLocale: "", osfControlAppCorrelationId: "", isDialog: false, disableLogging: false, flags: 0 }; + var _isLoggingAllowed = true; + var _initializationHelper = {}; + var _appInstanceId = null; + var _isOfficeJsLoaded = false; + var _officeOnReadyPendingResolves = []; + var _isOfficeOnReadyCalled = false; + var _officeOnReadyHostAndPlatformInfo = { host: null, platform: null, addin: null }; + var _loadScriptHelper = new ScriptLoading.LoadScriptHelper({ + OfficeJS: OSF.ConstantNames.OfficeJS, + OfficeDebugJS: OSF.ConstantNames.OfficeDebugJS + }); + if (window.performance && window.performance.now) { + _loadScriptHelper.logScriptLoading(OSF.ConstantNames.OfficeJsId, -1, window.performance.now()); + } + var _windowLocationHash = window.location.hash; + var _windowLocationSearch = window.location.search; + var _windowName = window.name; + var setOfficeJsAsLoadedAndDispatchPendingOnReadyCallbacks = function (_a) { + var host = _a.host, platform = _a.platform, addin = _a.addin; + _isOfficeJsLoaded = true; + if (typeof OSFPerformance !== "undefined") { + OSFPerformance.officeOnReady = OSFPerformance.now(); + } + _officeOnReadyHostAndPlatformInfo = { host: host, platform: platform, addin: addin }; + while (_officeOnReadyPendingResolves.length > 0) { + _officeOnReadyPendingResolves.shift()(_officeOnReadyHostAndPlatformInfo); + } + }; + Microsoft.Office.WebExtension.FeatureGates = {}; + Microsoft.Office.WebExtension.sendTelemetryEvent = function Microsoft_Office_WebExtension_sendTelemetryEvent(telemetryEvent) { + OTel.OTelLogger.sendTelemetryEvent(telemetryEvent); + }; + Microsoft.Office.WebExtension.telemetrySink = OTel.OTelLogger; + Microsoft.Office.WebExtension.onReadyInternal = function Microsoft_Office_WebExtension_onReadyInternal(callback) { + if (_isOfficeJsLoaded) { + var host_1 = _officeOnReadyHostAndPlatformInfo.host, platform_1 = _officeOnReadyHostAndPlatformInfo.platform, addin_1 = _officeOnReadyHostAndPlatformInfo.addin; + if (callback) { + var result = callback({ host: host_1, platform: platform_1, addin: addin_1 }); + if (result && result.then && typeof result.then === "function") { + return result.then(function () { return Office.Promise.resolve({ host: host_1, platform: platform_1, addin: addin_1 }); }); + } + } + return Office.Promise.resolve({ host: host_1, platform: platform_1, addin: addin_1 }); + } + if (callback) { + return new Office.Promise(function (resolve) { + _officeOnReadyPendingResolves.push(function (receivedHostAndPlatform) { + var result = callback(receivedHostAndPlatform); + if (result && result.then && typeof result.then === "function") { + return result.then(function () { return resolve(receivedHostAndPlatform); }); + } + resolve(receivedHostAndPlatform); + }); + }); + } + return new Office.Promise(function (resolve) { + _officeOnReadyPendingResolves.push(resolve); + }); + }; + Microsoft.Office.WebExtension.onReady = function Microsoft_Office_WebExtension_onReady(callback) { + _isOfficeOnReadyCalled = true; + return Microsoft.Office.WebExtension.onReadyInternal(callback); + }; + var getQueryStringValue = function OSF__OfficeAppFactory$getQueryStringValue(paramName) { + var hostInfoValue; + var searchString = window.location.search; + if (searchString) { + var hostInfoParts = searchString.split(paramName + "="); + if (hostInfoParts.length > 1) { + var hostInfoValueRestString = hostInfoParts[1]; + var separatorRegex = new RegExp("[&#]", "g"); + var hostInfoValueParts = hostInfoValueRestString.split(separatorRegex); + if (hostInfoValueParts.length > 0) { + hostInfoValue = hostInfoValueParts[0]; + } + } + } + return hostInfoValue; + }; + var compareVersions = function _compareVersions(version1, version2) { + var splitVersion1 = version1.split("."); + var splitVersion2 = version2.split("."); + var iter; + for (iter in splitVersion1) { + if (parseInt(splitVersion1[iter]) < parseInt(splitVersion2[iter])) { + return false; + } + else if (parseInt(splitVersion1[iter]) > parseInt(splitVersion2[iter])) { + return true; + } + } + return false; + }; + var shouldLoadOldOutlookMacJs = function _shouldLoadOldOutlookMacJs() { + try { + var versionToUseNewJS = "15.30.1128.0"; + var currentHostVersion = window.external.GetContext().GetHostFullVersion(); + } + catch (ex) { + return false; + } + return !!compareVersions(versionToUseNewJS, currentHostVersion); + }; + var _retrieveLoggingAllowed = function OSF__OfficeAppFactory$_retrieveLoggingAllowed() { + _isLoggingAllowed = true; + try { + if (_hostInfo.disableLogging) { + _isLoggingAllowed = false; + return; + } + window.external = window.external || {}; + if (typeof window.external.GetLoggingAllowed === 'undefined') { + _isLoggingAllowed = true; + } + else { + _isLoggingAllowed = window.external.GetLoggingAllowed(); + } + } + catch (Exception) { + } + }; + var _retrieveHostInfo = function OSF__OfficeAppFactory$_retrieveHostInfo() { + var hostInfoParaName = "_host_Info"; + var hostInfoValue = null; + try { + window.external = window.external || {}; + if (typeof agaveHost !== "undefined" && agaveHost.GetHostInfo) { + window.external.GetHostInfo = function () { + return agaveHost.GetHostInfo(); + }; + } + var sandboxHostInfo = window.external.GetHostInfo(); + if (sandboxHostInfo == "isDialog") { + _hostInfo.isO15 = true; + _hostInfo.isDialog = true; + } + else if (sandboxHostInfo.toLowerCase().indexOf("mac") !== -1 && sandboxHostInfo.toLowerCase().indexOf("outlook") !== -1 && shouldLoadOldOutlookMacJs()) { + _hostInfo.isO15 = true; + } + else { + var hostInfoParts = sandboxHostInfo.split(hostInfoParaName + "="); + if (hostInfoParts.length > 1) { + hostInfoValue = hostInfoParts[1]; + } + else { + hostInfoValue = sandboxHostInfo; + } + } + } + catch (Exception) { + } + if (!hostInfoValue) { + hostInfoValue = getQueryStringValue(hostInfoParaName); + if (!hostInfoValue) { + try { + var windowNameObj = JSON.parse(_windowName); + hostInfoValue = windowNameObj ? windowNameObj["hostInfo"] : null; + } + catch (Exception) { + } + } + } + var getSessionStorage = function OSF__OfficeAppFactory$_retrieveHostInfo$getSessionStorage() { + var osfSessionStorage = null; + try { + if (window.sessionStorage) { + osfSessionStorage = window.sessionStorage; + } + } + catch (ex) { + } + return osfSessionStorage; + }; + var osfSessionStorage = getSessionStorage(); + if (!hostInfoValue && osfSessionStorage && osfSessionStorage.getItem("hostInfoValue")) { + hostInfoValue = osfSessionStorage.getItem("hostInfoValue"); + } + if (hostInfoValue) { + hostInfoValue = decodeURIComponent(hostInfoValue); + _hostInfo.isO15 = false; + var items = hostInfoValue.split("$"); + if (typeof items[2] == "undefined") { + items = hostInfoValue.split("|"); + } + _hostInfo.hostType = (typeof items[0] == "undefined") ? "" : items[0].toLowerCase(); + _hostInfo.hostPlatform = (typeof items[1] == "undefined") ? "" : items[1].toLowerCase(); + ; + _hostInfo.hostSpecificFileVersion = (typeof items[2] == "undefined") ? "" : items[2].toLowerCase(); + _hostInfo.hostLocale = (typeof items[3] == "undefined") ? "" : items[3].toLowerCase(); + _hostInfo.osfControlAppCorrelationId = (typeof items[4] == "undefined") ? "" : items[4]; + if (_hostInfo.osfControlAppCorrelationId == "telemetry") { + _hostInfo.osfControlAppCorrelationId = ""; + } + _hostInfo.isDialog = (((typeof items[5]) != "undefined") && items[5] == "isDialog") ? true : false; + _hostInfo.disableLogging = (((typeof items[6]) != "undefined") && items[6] == "disableLogging") ? true : false; + _hostInfo.flags = (((typeof items[7]) === "string") && items[7].length > 0) ? parseInt(items[7]) : 0; + if (g_isOfflineLibrary) { + g_isExpEnabled = false; + } + else { + g_isExpEnabled = g_isExpEnabled || !!(_hostInfo.flags & OSF.HostInfoFlags.ExperimentJsEnabled); + } + var hostSpecificFileVersionValue = parseFloat(_hostInfo.hostSpecificFileVersion); + var fallbackVersion = OSF.HostSpecificFileVersionDefault; + if (OSF.HostSpecificFileVersionMap[_hostInfo.hostType] && OSF.HostSpecificFileVersionMap[_hostInfo.hostType][_hostInfo.hostPlatform]) { + fallbackVersion = OSF.HostSpecificFileVersionMap[_hostInfo.hostType][_hostInfo.hostPlatform]; + } + if (hostSpecificFileVersionValue > parseFloat(fallbackVersion)) { + _hostInfo.hostSpecificFileVersion = fallbackVersion; + } + if (osfSessionStorage) { + try { + osfSessionStorage.setItem("hostInfoValue", hostInfoValue); + } + catch (e) { + } + } + } + else { + _hostInfo.isO15 = true; + _hostInfo.hostLocale = getQueryStringValue("locale"); + } + }; + var getAppContextAsync = function OSF__OfficeAppFactory$getAppContextAsync(wnd, gotAppContext) { + if (OSF.AppTelemetry && OSF.AppTelemetry.logAppCommonMessage) { + OSF.AppTelemetry.logAppCommonMessage("getAppContextAsync starts"); + } + _initializationHelper.getAppContext(wnd, gotAppContext); + }; + var initialize = function OSF__OfficeAppFactory$initialize() { + _retrieveHostInfo(); + _retrieveLoggingAllowed(); + if (_hostInfo.hostPlatform == "web" && _hostInfo.isDialog && window == window.top && window.opener == null) { + window.open('', '_self', ''); + window.close(); + } + if ((_hostInfo.flags & (OSF.HostInfoFlags.SharedApp | OSF.HostInfoFlags.CustomFunction)) !== 0) { + if (typeof (window.Promise) === 'undefined') { + window.Promise = window.Office.Promise; + } + } + _loadScriptHelper.setAppCorrelationId(_hostInfo.osfControlAppCorrelationId); + var basePath = _loadScriptHelper.getOfficeJsBasePath(); + var requiresMsAjax = false; + if (!basePath) + throw "Office Web Extension script library file name should be " + OSF.ConstantNames.OfficeJS + " or " + OSF.ConstantNames.OfficeDebugJS + "."; + var isMicrosftAjaxLoaded = function OSF$isMicrosftAjaxLoaded() { + if ((typeof (Sys) !== 'undefined' && typeof (Type) !== 'undefined' && + Sys.StringBuilder && typeof (Sys.StringBuilder) === "function" && + Type.registerNamespace && typeof (Type.registerNamespace) === "function" && + Type.registerClass && typeof (Type.registerClass) === "function") || + (typeof (OfficeExt) !== "undefined" && OfficeExt.MsAjaxError)) { + return true; + } + else { + return false; + } + }; + var officeStrings = null; + var loadLocaleStrings = function OSF__OfficeAppFactory_initialize$loadLocaleStrings(appLocale) { + var fallbackLocaleTried = false; + var loadLocaleStringCallback = function OSF__OfficeAppFactory_initialize$loadLocaleStringCallback() { + if (typeof Strings == 'undefined' || typeof Strings.OfficeOM == 'undefined') { + if (!fallbackLocaleTried) { + fallbackLocaleTried = true; + var fallbackLocaleStringFile = basePath + OSF.ConstantNames.DefaultLocale + "/" + OSF.ConstantNames.OfficeStringJS; + _loadScriptHelper.loadScript(fallbackLocaleStringFile, OSF.ConstantNames.OfficeStringsId, loadLocaleStringCallback, true, OSF.ConstantNames.LocaleStringLoadingTimeout); + return false; + } + else { + throw "Neither the locale, " + appLocale.toLowerCase() + ", provided by the host app nor the fallback locale " + OSF.ConstantNames.DefaultLocale + " are supported."; + } + } + else { + fallbackLocaleTried = false; + officeStrings = Strings.OfficeOM; + } + }; + if (!isMicrosftAjaxLoaded()) { + window.Type = Function; + Type.registerNamespace = function (ns) { + window[ns] = window[ns] || {}; + }; + Type.prototype.registerClass = function (cls) { + cls = {}; + }; + } + var localeStringFile = basePath + OSF.getSupportedLocale(appLocale, OSF.ConstantNames.DefaultLocale) + "/" + OSF.ConstantNames.OfficeStringJS; + _loadScriptHelper.loadScript(localeStringFile, OSF.ConstantNames.OfficeStringsId, loadLocaleStringCallback, true, OSF.ConstantNames.LocaleStringLoadingTimeout); + }; + var onAppCodeAndMSAjaxReady = function OSF__OfficeAppFactory_initialize$onAppCodeAndMSAjaxReady(loadSuccess) { + if (loadSuccess) { + _initializationHelper = new OSF.InitializationHelper(_hostInfo, _WebAppState, _context, _settings, _hostFacade); + if (_hostInfo.hostPlatform == "web" && _initializationHelper.saveAndSetDialogInfo) { + _initializationHelper.saveAndSetDialogInfo(getQueryStringValue("_host_Info")); + } + _initializationHelper.setAgaveHostCommunication(); + if (typeof OSFPerformance !== "undefined") { + OSFPerformance.getAppContextStart = OSFPerformance.now(); + } + getAppContextAsync(_WebAppState.wnd, function (appContext) { + if (typeof OSFPerformance !== "undefined") { + OSFPerformance.getAppContextEnd = OSFPerformance.now(); + } + if (OSF.AppTelemetry && OSF.AppTelemetry.logAppCommonMessage) { + OSF.AppTelemetry.logAppCommonMessage("getAppContextAsync callback start"); + } + _appInstanceId = appContext._appInstanceId; + if (appContext.get_featureGates) { + var featureGates = appContext.get_featureGates(); + if (featureGates) { + Microsoft.Office.WebExtension.FeatureGates = featureGates; + } + } + var updateVersionInfo = function updateVersionInfo() { + var hostVersionItems = _hostInfo.hostSpecificFileVersion.split("."); + if (appContext.get_appMinorVersion) { + var isIOS = _hostInfo.hostPlatform == "ios"; + if (!isIOS) { + if (isNaN(appContext.get_appMinorVersion())) { + appContext._appMinorVersion = parseInt(hostVersionItems[1]); + } + else if (hostVersionItems.length > 1 && !isNaN(Number(hostVersionItems[1]))) { + appContext._appMinorVersion = parseInt(hostVersionItems[1]); + } + } + } + if (_hostInfo.isDialog) { + appContext._isDialog = _hostInfo.isDialog; + } + }; + updateVersionInfo(); + var appReady = function appReady() { + _initializationHelper.prepareApiSurface && _initializationHelper.prepareApiSurface(appContext); + _loadScriptHelper.waitForFunction(function () { return (Microsoft.Office.WebExtension.initialize != undefined || _isOfficeOnReadyCalled); }, function (initializedDeclaredOrOfficeOnReadyCalled) { + if (initializedDeclaredOrOfficeOnReadyCalled) { + if (_initializationHelper.prepareApiSurface) { + if (Microsoft.Office.WebExtension.initialize) { + Microsoft.Office.WebExtension.initialize(_initializationHelper.getInitializationReason(appContext)); + } + } + else { + if (!Microsoft.Office.WebExtension.initialize) { + Microsoft.Office.WebExtension.initialize = function () { }; + } + _initializationHelper.prepareRightBeforeWebExtensionInitialize(appContext); + } + _initializationHelper.prepareRightAfterWebExtensionInitialize && _initializationHelper.prepareRightAfterWebExtensionInitialize(appContext); + var appNumber = appContext.get_appName(); + var addinInfo = null; + if ((_hostInfo.flags & OSF.HostInfoFlags.SharedApp) !== 0) { + addinInfo = { + visibilityMode: initialDisplayModeMappings[(appContext.get_initialDisplayMode && typeof appContext.get_initialDisplayMode === 'function') ? appContext.get_initialDisplayMode() : 0] + }; + } + setOfficeJsAsLoadedAndDispatchPendingOnReadyCallbacks({ + host: OfficeExt.HostName.Host.getInstance().getHost(appNumber), + platform: OfficeExt.HostName.Host.getInstance().getPlatform(appNumber), + addin: addinInfo + }); + } + else { + throw new Error("Office.js has not fully loaded. Your app must call \"Office.onReady()\" as part of it's loading sequence (or set the \"Office.initialize\" function). If your app has this functionality, try reloading this page."); + } + }, 400, 50); + }; + if (!_loadScriptHelper.isScriptLoading(OSF.ConstantNames.OfficeStringsId)) { + loadLocaleStrings(appContext.get_appUILocale()); + } + _loadScriptHelper.waitForScripts([OSF.ConstantNames.OfficeStringsId], function () { + if (officeStrings && !Strings.OfficeOM) { + Strings.OfficeOM = officeStrings; + } + _initializationHelper.loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath); + if (typeof OSFPerformance !== "undefined") { + OSFPerformance.createOMEnd = OSFPerformance.now(); + } + }); + }); + if (_hostInfo.isO15) { + var wacXdmInfoIsMissing = (OSF.OUtil.parseXdmInfo() == null); + if (wacXdmInfoIsMissing) { + var isPlainBrowser = true; + if (window.external && typeof window.external.GetContext !== 'undefined') { + try { + window.external.GetContext(); + isPlainBrowser = false; + } + catch (e) { + } + } + if (typeof OsfOptOut === "undefined" && isPlainBrowser && window.top !== window.self) { + if (window.console && window.console.log) { + window.console.log("The add-in is not hosted in plain browser top window."); + } + window.location.href = "about:blank"; + } + if (isPlainBrowser) { + setOfficeJsAsLoadedAndDispatchPendingOnReadyCallbacks({ + host: null, + platform: null, + addin: null + }); + } + } + } + } + else { + var errorMsg = "MicrosoftAjax.js is not loaded successfully."; + if (OSF.AppTelemetry && OSF.AppTelemetry.logAppException) { + OSF.AppTelemetry.logAppException(errorMsg); + } + throw errorMsg; + } + }; + var onAppCodeReady = function OSF__OfficeAppFactory_initialize$onAppCodeReady() { + if (OSF.AppTelemetry && OSF.AppTelemetry.setOsfControlAppCorrelationId) { + OSF.AppTelemetry.setOsfControlAppCorrelationId(_hostInfo.osfControlAppCorrelationId); + } + if (_loadScriptHelper.isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId)) { + _loadScriptHelper.waitForScripts([OSF.ConstantNames.MicrosoftAjaxId], onAppCodeAndMSAjaxReady); + } + else { + _loadScriptHelper.waitForFunction(isMicrosftAjaxLoaded, onAppCodeAndMSAjaxReady, 500, 100); + } + }; + if (_hostInfo.isO15) { + _loadScriptHelper.loadScript(basePath + OSF.ConstantNames.O15InitHelper, OSF.ConstantNames.O15MappingId, onAppCodeReady); + } + else { + var hostTypeLowerCase = _hostInfo.hostType.toLowerCase(); + var hostPlatformLowerCase = _hostInfo.hostPlatform.toLowerCase(); + var versionRegExp = new RegExp("^\\d\\d\[.\]\\d\\d$"); + if ((OSF.HostSpecificFileVersionMap[hostTypeLowerCase]) == null || + (OSF.HostSpecificFileVersionMap[hostTypeLowerCase][hostPlatformLowerCase]) == null || + (!versionRegExp.test(_hostInfo.hostSpecificFileVersion))) { + throw "hostInfo validation failed"; + } + var hostSpecificFileName; + hostSpecificFileName = ([ + _hostInfo.hostType, + _hostInfo.hostPlatform, + _hostInfo.hostSpecificFileVersion, + OSF.ConstantNames.HostFileScriptSuffix || null, + ] + .filter(function (part) { return part != null; }) + .join("-")) + + + ".debug.js"; + _loadScriptHelper.loadScript(basePath + hostSpecificFileName.toLowerCase(), OSF.ConstantNames.HostFileId, onAppCodeReady); + if (typeof OSFPerformance !== "undefined") { + OSFPerformance.hostSpecificFileName = hostSpecificFileName.toLowerCase(); + } + } + if (_hostInfo.hostLocale) { + loadLocaleStrings(_hostInfo.hostLocale); + } + if (requiresMsAjax && !isMicrosftAjaxLoaded()) { + var msAjaxCDNPath = (window.location.protocol.toLowerCase() === 'https:' ? 'https:' : 'http:') + '//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js'; + _loadScriptHelper.loadScriptParallel(msAjaxCDNPath, OSF.ConstantNames.MicrosoftAjaxId); + } + window.confirm = function OSF__OfficeAppFactory_initialize$confirm(message) { + throw new Error('Function window.confirm is not supported.'); + }; + window.alert = function OSF__OfficeAppFactory_initialize$alert(message) { + throw new Error('Function window.alert is not supported.'); + }; + window.prompt = function OSF__OfficeAppFactory_initialize$prompt(message, defaultvalue) { + throw new Error('Function window.prompt is not supported.'); + }; + var isOutlookAndroid = _hostInfo.hostType == "outlook" && _hostInfo.hostPlatform == "android"; + if (!isOutlookAndroid) { + window.history.replaceState = null; + window.history.pushState = null; + } + }; + initialize(); + if (window.addEventListener) { + window.addEventListener('DOMContentLoaded', function (event) { + Microsoft.Office.WebExtension.onReadyInternal(function () { + if (typeof OSFPerfUtil !== 'undefined') { + OSFPerfUtil.sendPerformanceTelemetry(); + } + }); + }); + } + return { + getId: function OSF__OfficeAppFactory$getId() { return _WebAppState.id; }, + getClientEndPoint: function OSF__OfficeAppFactory$getClientEndPoint() { return _WebAppState.clientEndPoint; }, + getContext: function OSF__OfficeAppFactory$getContext() { return _context; }, + setContext: function OSF__OfficeAppFactory$setContext(context) { _context = context; }, + getHostInfo: function OSF_OfficeAppFactory$getHostInfo() { return _hostInfo; }, + getLoggingAllowed: function OSF_OfficeAppFactory$getLoggingAllowed() { return _isLoggingAllowed; }, + getHostFacade: function OSF__OfficeAppFactory$getHostFacade() { return _hostFacade; }, + setHostFacade: function setHostFacade(hostFacade) { _hostFacade = hostFacade; }, + getInitializationHelper: function OSF__OfficeAppFactory$getInitializationHelper() { return _initializationHelper; }, + getCachedSessionSettingsKey: function OSF__OfficeAppFactory$getCachedSessionSettingsKey() { + return (_WebAppState.conversationID != null ? _WebAppState.conversationID : _appInstanceId) + "CachedSessionSettings"; + }, + getWebAppState: function OSF__OfficeAppFactory$getWebAppState() { return _WebAppState; }, + getWindowLocationHash: function OSF__OfficeAppFactory$getHash() { return _windowLocationHash; }, + getWindowLocationSearch: function OSF__OfficeAppFactory$getSearch() { return _windowLocationSearch; }, + getLoadScriptHelper: function OSF__OfficeAppFactory$getLoadScriptHelper() { return _loadScriptHelper; }, + getWindowName: function OSF__OfficeAppFactory$getWindowName() { return _windowName; } + }; +})(); + + + +!function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + i: moduleId, + l: !1, + exports: {} + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.l = !0, module.exports; + } + __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function(exports, name, getter) { + __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { + enumerable: !0, + get: getter + }); + }, __webpack_require__.r = function(exports) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(exports, "__esModule", { + value: !0 + }); + }, __webpack_require__.t = function(value, mode) { + if (1 & mode && (value = __webpack_require__(value)), 8 & mode) return value; + if (4 & mode && "object" == typeof value && value && value.__esModule) return value; + var ns = Object.create(null); + if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { + enumerable: !0, + value: value + }), 2 & mode && "string" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }, __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function() { + return module.default; + } : function() { + return module; + }; + return __webpack_require__.d(getter, "a", getter), getter; + }, __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 3); +}([ function(module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function(d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function(d, b) { + if ("function" != typeof b && null !== b) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }); + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.TestUtility = exports.CoreUtility = exports.RichApiMessageUtility = exports.CoreConstants = exports.CoreResourceStrings = exports.CoreErrorCodes = exports.Provider = exports.Attribution = exports.WebImage = exports.Entity = exports.FormattedNumber = exports.Error = exports._Internal = exports.HostBridge = exports.HttpUtility = exports.SessionBase = void 0; + var SessionBase = function() { + function SessionBase() {} + return SessionBase.prototype._resolveRequestUrlAndHeaderInfo = function() { + return CoreUtility._createPromiseFromResult(null); + }, SessionBase.prototype._createRequestExecutorOrNull = function() { + return null; + }, Object.defineProperty(SessionBase.prototype, "eventRegistration", { + get: function() { + return null; + }, + enumerable: !1, + configurable: !0 + }), SessionBase; + }(); + exports.SessionBase = SessionBase; + var HttpUtility = function() { + function HttpUtility() {} + return HttpUtility.setCustomSendRequestFunc = function(func) { + HttpUtility.s_customSendRequestFunc = func; + }, HttpUtility.xhrSendRequestFunc = function(request) { + return CoreUtility.createPromise((function(resolve, reject) { + var xhr = new XMLHttpRequest; + if (xhr.open(request.method, request.url), xhr.onload = function() { + var resp = { + statusCode: xhr.status, + headers: CoreUtility._parseHttpResponseHeaders(xhr.getAllResponseHeaders()), + body: xhr.responseText + }; + resolve(resp); + }, xhr.onerror = function() { + reject(new _Internal.RuntimeError({ + code: CoreErrorCodes.connectionFailure, + httpStatusCode: xhr.status, + message: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, xhr.statusText) + })); + }, request.headers) for (var key in request.headers) xhr.setRequestHeader(key, request.headers[key]); + xhr.send(CoreUtility._getRequestBodyText(request)); + })); + }, HttpUtility.fetchSendRequestFunc = function(request) { + var requestBodyText = CoreUtility._getRequestBodyText(request); + return "" === requestBodyText && (requestBodyText = void 0), fetch(request.url, { + method: request.method, + headers: request.headers, + body: requestBodyText + }).then((function(resp) { + return resp.text().then((function(body) { + var statusCode = resp.status, headers = {}; + return resp.headers.forEach((function(value, name) { + headers[name] = value; + })), { + statusCode: statusCode, + headers: headers, + body: body + }; + })); + })); + }, HttpUtility.sendRequest = function(request) { + HttpUtility.validateAndNormalizeRequest(request); + var func = HttpUtility.s_customSendRequestFunc; + return func || (func = "undefined" != typeof fetch ? HttpUtility.fetchSendRequestFunc : HttpUtility.xhrSendRequestFunc), + func(request); + }, HttpUtility.setCustomSendLocalDocumentRequestFunc = function(func) { + HttpUtility.s_customSendLocalDocumentRequestFunc = func; + }, HttpUtility.sendLocalDocumentRequest = function(request) { + return HttpUtility.validateAndNormalizeRequest(request), (HttpUtility.s_customSendLocalDocumentRequestFunc || HttpUtility.officeJsSendLocalDocumentRequestFunc)(request); + }, HttpUtility.officeJsSendLocalDocumentRequestFunc = function(request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestSafeArray = CoreUtility._buildRequestMessageSafeArray(request); + return CoreUtility.createPromise((function(resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, (function(asyncResult) { + var response; + response = "succeeded" == asyncResult.status ? { + statusCode: RichApiMessageUtility.getResponseStatusCode(asyncResult), + headers: RichApiMessageUtility.getResponseHeaders(asyncResult), + body: RichApiMessageUtility.getResponseBody(asyncResult) + } : RichApiMessageUtility.buildHttpResponseFromOfficeJsError(asyncResult.error.code, asyncResult.error.message), + CoreUtility.log("Response:"), CoreUtility.log(JSON.stringify(response)), resolve(response); + })); + })); + }, HttpUtility.validateAndNormalizeRequest = function(request) { + if (CoreUtility.isNullOrUndefined(request)) throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: "request" + }); + CoreUtility.isNullOrEmptyString(request.method) && (request.method = "GET"), request.method = request.method.toUpperCase(); + }, HttpUtility.logRequest = function(request) { + if (CoreUtility._logEnabled) { + if (CoreUtility.log("---HTTP Request---"), CoreUtility.log(request.method + " " + request.url), + request.headers) for (var key in request.headers) CoreUtility.log(key + ": " + request.headers[key]); + HttpUtility._logBodyEnabled && CoreUtility.log(CoreUtility._getRequestBodyText(request)); + } + }, HttpUtility.logResponse = function(response) { + if (CoreUtility._logEnabled) { + if (CoreUtility.log("---HTTP Response---"), CoreUtility.log("" + response.statusCode), + response.headers) for (var key in response.headers) CoreUtility.log(key + ": " + response.headers[key]); + HttpUtility._logBodyEnabled && CoreUtility.log(response.body); + } + }, HttpUtility._logBodyEnabled = !1, HttpUtility; + }(); + exports.HttpUtility = HttpUtility; + var _Internal, HostBridge = function() { + function HostBridge(m_bridge) { + var _this = this; + this.m_bridge = m_bridge, this.m_promiseResolver = {}, this.m_handlers = [], this.m_bridge.onMessageFromHost = function(messageText) { + var message = JSON.parse(messageText); + if (3 == message.type) { + var genericMessageBody = message.message; + if (genericMessageBody && genericMessageBody.entries) for (var i = 0; i < genericMessageBody.entries.length; i++) { + var entryObjectOrArray = genericMessageBody.entries[i]; + if (Array.isArray(entryObjectOrArray)) { + var entry = { + messageCategory: entryObjectOrArray[0], + messageType: entryObjectOrArray[1], + targetId: entryObjectOrArray[2], + message: entryObjectOrArray[3], + id: entryObjectOrArray[4] + }; + genericMessageBody.entries[i] = entry; + } + } + } + _this.dispatchMessage(message); + }; + } + return HostBridge.init = function(bridge) { + if ("object" == typeof bridge && bridge) { + var instance = new HostBridge(bridge); + HostBridge.s_instance = instance, HttpUtility.setCustomSendLocalDocumentRequestFunc((function(request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestFlags = 0; + CoreUtility.isReadonlyRestRequest(request.method) || (requestFlags = 1); + var index = request.url.indexOf("?"); + if (index >= 0) { + var query = request.url.substr(index + 1), flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(query); + flagsAndCustomData.flags >= 0 && (requestFlags = flagsAndCustomData.flags); + } + var bridgeMessage = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + message: request + }; + return instance.sendMessageToHostAndExpectResponse(bridgeMessage).then((function(bridgeResponse) { + return bridgeResponse.message; + })); + })); + for (var i = 0; i < HostBridge.s_onInitedHandlers.length; i++) HostBridge.s_onInitedHandlers[i](instance); + } + }, Object.defineProperty(HostBridge, "instance", { + get: function() { + return HostBridge.s_instance; + }, + enumerable: !1, + configurable: !0 + }), HostBridge.prototype.sendMessageToHost = function(message) { + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + }, HostBridge.prototype.sendMessageToHostAndExpectResponse = function(message) { + var _this = this, ret = CoreUtility.createPromise((function(resolve, reject) { + _this.m_promiseResolver[message.id] = resolve; + })); + return this.m_bridge.sendMessageToHost(JSON.stringify(message)), ret; + }, HostBridge.prototype.addHostMessageHandler = function(handler) { + this.m_handlers.push(handler); + }, HostBridge.prototype.removeHostMessageHandler = function(handler) { + var index = this.m_handlers.indexOf(handler); + index >= 0 && this.m_handlers.splice(index, 1); + }, HostBridge.onInited = function(handler) { + HostBridge.s_onInitedHandlers.push(handler), HostBridge.s_instance && handler(HostBridge.s_instance); + }, HostBridge.prototype.dispatchMessage = function(message) { + if ("number" == typeof message.id) { + var resolve = this.m_promiseResolver[message.id]; + if (resolve) return resolve(message), void delete this.m_promiseResolver[message.id]; + } + for (var i = 0; i < this.m_handlers.length; i++) this.m_handlers[i](message); + }, HostBridge.nextId = function() { + return HostBridge.s_nextId++; + }, HostBridge.s_onInitedHandlers = [], HostBridge.s_nextId = 1, HostBridge; + }(); + exports.HostBridge = HostBridge, "object" == typeof _richApiNativeBridge && _richApiNativeBridge && HostBridge.init(_richApiNativeBridge), + function(_Internal) { + var RuntimeError = function(_super) { + function RuntimeError(error) { + var _this = _super.call(this, "string" == typeof error ? error : error.message) || this; + if (Object.setPrototypeOf(_this, RuntimeError.prototype), _this.name = "RichApi.Error", + "string" == typeof error ? _this.message = error : (_this.code = error.code, _this.message = error.message, + _this.traceMessages = error.traceMessages || [], _this.innerError = error.innerError || null, + _this.debugInfo = _this._createDebugInfo(error.debugInfo || {}), _this.httpStatusCode = error.httpStatusCode, + _this.data = error.data), CoreUtility.isNullOrUndefined(_this.httpStatusCode) || 200 === _this.httpStatusCode) { + var mapping = {}; + mapping[CoreErrorCodes.accessDenied] = 401, mapping[CoreErrorCodes.connectionFailure] = 500, + mapping[CoreErrorCodes.generalException] = 500, mapping[CoreErrorCodes.invalidArgument] = 400, + mapping[CoreErrorCodes.invalidObjectPath] = 400, mapping[CoreErrorCodes.invalidOrTimedOutSession] = 408, + mapping[CoreErrorCodes.invalidRequestContext] = 400, mapping[CoreErrorCodes.timeout] = 408, + mapping[CoreErrorCodes.valueNotLoaded] = 400, _this.httpStatusCode = mapping[_this.code]; + } + return CoreUtility.isNullOrUndefined(_this.httpStatusCode) && (_this.httpStatusCode = 500), + _this; + } + return __extends(RuntimeError, _super), RuntimeError.prototype.toString = function() { + return this.code + ": " + this.message; + }, RuntimeError.prototype._createDebugInfo = function(partialDebugInfo) { + var debugInfo = { + code: this.code, + message: this.message, + toString: function() { + return JSON.stringify(this); + } + }; + for (var key in partialDebugInfo) debugInfo[key] = partialDebugInfo[key]; + return this.innerError && (this.innerError instanceof _Internal.RuntimeError ? debugInfo.innerError = this.innerError.debugInfo : debugInfo.innerError = this.innerError), + debugInfo; + }, RuntimeError._createInvalidArgError = function(error) { + return new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility.isNullOrEmptyString(error.argumentName) ? CoreUtility._getResourceString(CoreResourceStrings.invalidArgumentGeneric) : CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, error.argumentName), + debugInfo: error.errorLocation ? { + errorLocation: error.errorLocation + } : {}, + innerError: error.innerError + }); + }, RuntimeError; + }(Error); + _Internal.RuntimeError = RuntimeError; + }(_Internal = exports._Internal || (exports._Internal = {})), exports.Error = _Internal.RuntimeError, + exports.FormattedNumber = _Internal.FormattedNumber, exports.Entity = _Internal.Entity, + exports.WebImage = _Internal.WebImage, exports.Attribution = _Internal.Attribution, + exports.Provider = _Internal.Provider; + var CoreErrorCodes = function() { + function CoreErrorCodes() {} + return CoreErrorCodes.apiNotFound = "ApiNotFound", CoreErrorCodes.accessDenied = "AccessDenied", + CoreErrorCodes.generalException = "GeneralException", CoreErrorCodes.activityLimitReached = "ActivityLimitReached", + CoreErrorCodes.invalidArgument = "InvalidArgument", CoreErrorCodes.connectionFailure = "ConnectionFailure", + CoreErrorCodes.timeout = "Timeout", CoreErrorCodes.invalidOrTimedOutSession = "InvalidOrTimedOutSession", + CoreErrorCodes.invalidObjectPath = "InvalidObjectPath", CoreErrorCodes.invalidRequestContext = "InvalidRequestContext", + CoreErrorCodes.valueNotLoaded = "ValueNotLoaded", CoreErrorCodes.requestPayloadSizeLimitExceeded = "RequestPayloadSizeLimitExceeded", + CoreErrorCodes; + }(); + exports.CoreErrorCodes = CoreErrorCodes; + var CoreResourceStrings = function() { + function CoreResourceStrings() {} + return CoreResourceStrings.apiNotFoundDetails = "ApiNotFoundDetails", CoreResourceStrings.connectionFailureWithStatus = "ConnectionFailureWithStatus", + CoreResourceStrings.connectionFailureWithDetails = "ConnectionFailureWithDetails", + CoreResourceStrings.invalidArgument = "InvalidArgument", CoreResourceStrings.invalidArgumentGeneric = "InvalidArgumentGeneric", + CoreResourceStrings.timeout = "Timeout", CoreResourceStrings.invalidOrTimedOutSessionMessage = "InvalidOrTimedOutSessionMessage", + CoreResourceStrings.invalidObjectPath = "InvalidObjectPath", CoreResourceStrings.invalidRequestContext = "InvalidRequestContext", + CoreResourceStrings.valueNotLoaded = "ValueNotLoaded", CoreResourceStrings; + }(); + exports.CoreResourceStrings = CoreResourceStrings; + var CoreConstants = function() { + function CoreConstants() {} + return CoreConstants.flags = "flags", CoreConstants.sourceLibHeader = "SdkVersion", + CoreConstants.processQuery = "ProcessQuery", CoreConstants.localDocument = "http://document.localhost/", + CoreConstants.localDocumentApiPrefix = "http://document.localhost/_api/", CoreConstants.customData = "customdata", + CoreConstants; + }(); + exports.CoreConstants = CoreConstants; + var RichApiMessageUtility = function() { + function RichApiMessageUtility() {} + return RichApiMessageUtility.buildMessageArrayForIRequestExecutor = function(customData, requestFlags, requestMessage, sourceLibHeaderValue) { + var requestMessageText = JSON.stringify(requestMessage.Body); + CoreUtility.log("Request:"), CoreUtility.log(requestMessageText); + var headers = {}; + return CoreUtility._copyHeaders(requestMessage.Headers, headers), headers[CoreConstants.sourceLibHeader] = sourceLibHeaderValue, + RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, "POST", CoreConstants.processQuery, headers, requestMessageText); + }, RichApiMessageUtility.buildResponseOnSuccess = function(responseBody, responseHeaders) { + var response = { + HttpStatusCode: 200, + ErrorCode: "", + ErrorMessage: "", + Headers: null, + Body: null + }; + return response.Body = JSON.parse(responseBody), response.Headers = responseHeaders, + response; + }, RichApiMessageUtility.buildResponseOnError = function(errorCode, message) { + var response = { + HttpStatusCode: 500, + ErrorCode: "", + ErrorMessage: "", + Headers: null, + Body: null + }; + return response.ErrorCode = CoreErrorCodes.generalException, response.ErrorMessage = message, + errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability ? (response.ErrorCode = CoreErrorCodes.accessDenied, + response.HttpStatusCode = 401) : errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached ? (response.ErrorCode = CoreErrorCodes.activityLimitReached, + response.HttpStatusCode = 429) : errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession ? (response.ErrorCode = CoreErrorCodes.invalidOrTimedOutSession, + response.HttpStatusCode = 408, response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidOrTimedOutSessionMessage)) : errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded && (response.ErrorCode = CoreErrorCodes.requestPayloadSizeLimitExceeded, + response.HttpStatusCode = 400), response; + }, RichApiMessageUtility.buildHttpResponseFromOfficeJsError = function(errorCode, message) { + var statusCode = 500, errorBody = { + error: {} + }; + return errorBody.error.code = CoreErrorCodes.generalException, errorBody.error.message = message, + errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability ? (statusCode = 403, + errorBody.error.code = CoreErrorCodes.accessDenied) : errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached && (statusCode = 429, + errorBody.error.code = CoreErrorCodes.activityLimitReached), { + statusCode: statusCode, + headers: {}, + body: JSON.stringify(errorBody) + }; + }, RichApiMessageUtility.buildRequestMessageSafeArray = function(customData, requestFlags, method, path, headers, body) { + var headerArray = []; + if (headers) for (var headerName in headers) headerArray.push(headerName), headerArray.push(headers[headerName]); + return [ customData, method, path, headerArray, body, 0, requestFlags, "", "", "" ]; + }, RichApiMessageUtility.getResponseBody = function(result) { + return RichApiMessageUtility.getResponseBodyFromSafeArray(result.value.data); + }, RichApiMessageUtility.getResponseHeaders = function(result) { + return RichApiMessageUtility.getResponseHeadersFromSafeArray(result.value.data); + }, RichApiMessageUtility.getResponseBodyFromSafeArray = function(data) { + var ret = data[2]; + return "string" == typeof ret ? ret : ret.join(""); + }, RichApiMessageUtility.getResponseHeadersFromSafeArray = function(data) { + var arrayHeader = data[1]; + if (!arrayHeader) return null; + for (var headers = {}, i = 0; i < arrayHeader.length - 1; i += 2) headers[arrayHeader[i]] = arrayHeader[i + 1]; + return headers; + }, RichApiMessageUtility.getResponseStatusCode = function(result) { + return RichApiMessageUtility.getResponseStatusCodeFromSafeArray(result.value.data); + }, RichApiMessageUtility.getResponseStatusCodeFromSafeArray = function(data) { + return data[0]; + }, RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession = 5012, RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached = 5102, + RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability = 7e3, RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded = 5103, + RichApiMessageUtility; + }(); + exports.RichApiMessageUtility = RichApiMessageUtility, function(_Internal) { + _Internal.getPromiseType = function() { + if ("undefined" != typeof Promise) return Promise; + if ("undefined" != typeof Office && Office.Promise) return Office.Promise; + if ("undefined" != typeof OfficeExtension && OfficeExtension.Promise) return OfficeExtension.Promise; + throw new _Internal.Error("No Promise implementation found"); + }; + }(_Internal = exports._Internal || (exports._Internal = {})); + var CoreUtility = function() { + function CoreUtility() {} + return CoreUtility.log = function(message) { + CoreUtility._logEnabled && "undefined" != typeof console && console.log && console.log(message); + }, CoreUtility.checkArgumentNull = function(value, name) { + if (CoreUtility.isNullOrUndefined(value)) throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: name + }); + }, CoreUtility.isNullOrUndefined = function(value) { + return null === value || void 0 === value; + }, CoreUtility.isUndefined = function(value) { + return void 0 === value; + }, CoreUtility.isNullOrEmptyString = function(value) { + return null === value || (void 0 === value || 0 == value.length); + }, CoreUtility.isPlainJsonObject = function(value) { + if (CoreUtility.isNullOrUndefined(value)) return !1; + if ("object" != typeof value) return !1; + if ("[object Object]" !== Object.prototype.toString.apply(value)) return !1; + if (value.constructor && !Object.prototype.hasOwnProperty.call(value, "constructor") && !Object.prototype.hasOwnProperty.call(value.constructor.prototype, "hasOwnProperty")) return !1; + for (var key in value) if (!Object.prototype.hasOwnProperty.call(value, key)) return !1; + return !0; + }, CoreUtility.trim = function(str) { + return str.replace(new RegExp("^\\s+|\\s+$", "g"), ""); + }, CoreUtility.caseInsensitiveCompareString = function(str1, str2) { + return CoreUtility.isNullOrUndefined(str1) ? CoreUtility.isNullOrUndefined(str2) : !CoreUtility.isNullOrUndefined(str2) && str1.toUpperCase() == str2.toUpperCase(); + }, CoreUtility.isReadonlyRestRequest = function(method) { + return CoreUtility.caseInsensitiveCompareString(method, "GET"); + }, CoreUtility._getResourceString = function(resourceId, arg) { + var ret; + if ("undefined" != typeof window && window.Strings && window.Strings.OfficeOM) { + var stringName = "L_" + resourceId, stringValue = window.Strings.OfficeOM[stringName]; + stringValue && (ret = stringValue); + } + if (ret || (ret = CoreUtility.s_resourceStringValues[resourceId]), ret || (ret = resourceId), + !CoreUtility.isNullOrUndefined(arg)) if (Array.isArray(arg)) { + var arrArg = arg; + ret = CoreUtility._formatString(ret, arrArg); + } else ret = ret.replace("{0}", arg); + return ret; + }, CoreUtility._formatString = function(format, arrArg) { + return format.replace(/\{\d\}/g, (function(v) { + var position = parseInt(v.substr(1, v.length - 2)); + if (position < arrArg.length) return arrArg[position]; + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: "format" + }); + })); + }, Object.defineProperty(CoreUtility, "Promise", { + get: function() { + return _Internal.getPromiseType(); + }, + enumerable: !1, + configurable: !0 + }), CoreUtility.createPromise = function(executor) { + return new CoreUtility.Promise(executor); + }, CoreUtility._createPromiseFromResult = function(value) { + return CoreUtility.createPromise((function(resolve, reject) { + resolve(value); + })); + }, CoreUtility._createPromiseFromException = function(reason) { + return CoreUtility.createPromise((function(resolve, reject) { + reject(reason); + })); + }, CoreUtility._createTimeoutPromise = function(timeout) { + return CoreUtility.createPromise((function(resolve, reject) { + setTimeout((function() { + resolve(null); + }), timeout); + })); + }, CoreUtility._createInvalidArgError = function(error) { + return _Internal.RuntimeError._createInvalidArgError(error); + }, CoreUtility._isLocalDocumentUrl = function(url) { + return CoreUtility._getLocalDocumentUrlPrefixLength(url) > 0; + }, CoreUtility._getLocalDocumentUrlPrefixLength = function(url) { + for (var localDocumentPrefixes = [ "http://document.localhost", "https://document.localhost", "//document.localhost" ], urlLower = url.toLowerCase().trim(), i = 0; i < localDocumentPrefixes.length; i++) { + if (urlLower === localDocumentPrefixes[i]) return localDocumentPrefixes[i].length; + if (urlLower.substr(0, localDocumentPrefixes[i].length + 1) === localDocumentPrefixes[i] + "/") return localDocumentPrefixes[i].length + 1; + } + return 0; + }, CoreUtility._validateLocalDocumentRequest = function(request) { + var index = CoreUtility._getLocalDocumentUrlPrefixLength(request.url); + if (index <= 0) throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: "request" + }); + var path = request.url.substr(index), pathLower = path.toLowerCase(); + return "_api" === pathLower ? path = "" : "_api/" === pathLower.substr(0, "_api/".length) && (path = path.substr("_api/".length)), + { + method: request.method, + url: path, + headers: request.headers, + body: request.body + }; + }, CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny = function(queryString) { + for (var ret = { + flags: -1, + customData: "" + }, parts = queryString.split("&"), i = 0; i < parts.length; i++) { + var keyvalue = parts[i].split("="); + if (keyvalue[0].toLowerCase() === CoreConstants.flags) { + var flags = parseInt(keyvalue[1]); + flags &= 4095, ret.flags = flags; + } else keyvalue[0].toLowerCase() === CoreConstants.customData && (ret.customData = decodeURIComponent(keyvalue[1])); + } + return ret; + }, CoreUtility._getRequestBodyText = function(request) { + var body = ""; + return "string" == typeof request.body ? body = request.body : request.body && "object" == typeof request.body && (body = JSON.stringify(request.body)), + body; + }, CoreUtility._parseResponseBody = function(response) { + if ("string" == typeof response.body) { + var bodyText = CoreUtility.trim(response.body); + return JSON.parse(bodyText); + } + return response.body; + }, CoreUtility._buildRequestMessageSafeArray = function(request) { + var requestFlags = 0; + CoreUtility.isReadonlyRestRequest(request.method) || (requestFlags = 1); + var customData = ""; + if (request.url.substr(0, CoreConstants.processQuery.length).toLowerCase() === CoreConstants.processQuery.toLowerCase()) { + var index = request.url.indexOf("?"); + if (index > 0) { + var queryString = request.url.substr(index + 1), flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(queryString); + flagsAndCustomData.flags >= 0 && (requestFlags = flagsAndCustomData.flags), customData = flagsAndCustomData.customData; + } + } + return RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, request.method, request.url, request.headers, CoreUtility._getRequestBodyText(request)); + }, CoreUtility._parseHttpResponseHeaders = function(allResponseHeaders) { + var responseHeaders = {}; + if (!CoreUtility.isNullOrEmptyString(allResponseHeaders)) for (var regex = new RegExp("\r?\n"), entries = allResponseHeaders.split(regex), i = 0; i < entries.length; i++) { + var entry = entries[i]; + if (null != entry) { + var index = entry.indexOf(":"); + if (index > 0) { + var key = entry.substr(0, index), value = entry.substr(index + 1); + key = CoreUtility.trim(key), value = CoreUtility.trim(value), responseHeaders[key.toUpperCase()] = value; + } + } + } + return responseHeaders; + }, CoreUtility._parseErrorResponse = function(responseInfo) { + var errorObj = null; + if (CoreUtility.isPlainJsonObject(responseInfo.body)) errorObj = responseInfo.body; else if (!CoreUtility.isNullOrEmptyString(responseInfo.body)) { + var errorResponseBody = CoreUtility.trim(responseInfo.body); + try { + errorObj = JSON.parse(errorResponseBody); + } catch (e) { + CoreUtility.log("Error when parse " + errorResponseBody); + } + } + var statusCode = responseInfo.statusCode.toString(); + if (CoreUtility.isNullOrUndefined(errorObj) || "object" != typeof errorObj || !errorObj.error) return CoreUtility._createDefaultErrorResponse(statusCode); + var error = errorObj.error, innerError = error.innerError; + return innerError && innerError.code ? CoreUtility._createErrorResponse(innerError.code, statusCode, innerError.message) : error.code ? CoreUtility._createErrorResponse(error.code, statusCode, error.message) : CoreUtility._createDefaultErrorResponse(statusCode); + }, CoreUtility._createDefaultErrorResponse = function(statusCode) { + return { + errorCode: CoreErrorCodes.connectionFailure, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, statusCode) + }; + }, CoreUtility._createErrorResponse = function(code, statusCode, message) { + return { + errorCode: code, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithDetails, [ statusCode, code, message ]) + }; + }, CoreUtility._copyHeaders = function(src, dest) { + if (src && dest) for (var key in src) dest[key] = src[key]; + }, CoreUtility.addResourceStringValues = function(values) { + for (var key in values) CoreUtility.s_resourceStringValues[key] = values[key]; + }, CoreUtility._logEnabled = !1, CoreUtility.s_resourceStringValues = { + ApiNotFoundDetails: "The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.", + ConnectionFailureWithStatus: "The request failed with status code of {0}.", + ConnectionFailureWithDetails: "The request failed with status code of {0}, error code {1} and the following error message: {2}", + InvalidArgument: "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.", + InvalidObjectPath: 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.', + InvalidRequestContext: "Cannot use the object across different request contexts.", + Timeout: "The operation has timed out.", + ValueNotLoaded: 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.' + }, CoreUtility; + }(); + exports.CoreUtility = CoreUtility; + var TestUtility = function() { + function TestUtility() {} + return TestUtility.setMock = function(value) { + TestUtility.s_isMock = value; + }, TestUtility.isMock = function() { + return TestUtility.s_isMock; + }, TestUtility; + }(); + exports.TestUtility = TestUtility; +}, function(module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function(d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function(d, b) { + if ("function" != typeof b && null !== b) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }), __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { + void 0 === k2 && (k2 = k); + var desc = Object.getOwnPropertyDescriptor(m, k); + desc && !("get" in desc ? !m.__esModule : desc.writable || desc.configurable) || (desc = { + enumerable: !0, + get: function() { + return m[k]; + } + }), Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + void 0 === k2 && (k2 = k), o[k2] = m[k]; + }), __exportStar = this && this.__exportStar || function(m, exports) { + for (var p in m) "default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p); + }; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.CommonResourceStrings = exports.CommonUtility = exports.CommonConstants = exports.HttpRequestExecutor = exports.ClientResult = exports.ClientRequestBase = exports.ClientRequestContextBase = exports.ObjectPath = exports.Action = exports.ClientObjectBase = exports.CommonActionFactory = exports.config = exports._internalConfig = void 0; + var Core = __webpack_require__(0); + __exportStar(__webpack_require__(0), exports), exports._internalConfig = { + showDisposeInfoInDebugInfo: !1, + showInternalApiInDebugInfo: !1, + enableEarlyDispose: !0, + alwaysPolyfillClientObjectUpdateMethod: !1, + alwaysPolyfillClientObjectRetrieveMethod: !1, + enableConcurrentFlag: !0, + enableUndoableFlag: !0, + appendTypeNameToObjectPathInfo: !1 + }, exports.config = { + extendedErrorLogging: !1 + }; + var CommonActionFactory = function() { + function CommonActionFactory() {} + return CommonActionFactory.createSetPropertyAction = function(context, parent, propertyName, value, flags) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }, args = [ value ], referencedArgumentObjectPaths = CommonUtility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + CommonUtility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var action = new Action(actionInfo, 0, flags); + return action.referencedObjectPath = parent._objectPath, action.referencedArgumentObjectPaths = referencedArgumentObjectPaths, + parent._addAction(action); + }, CommonActionFactory.createQueryAction = function(context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 2, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }, action = new Action(actionInfo, 1, 4); + return action.referencedObjectPath = parent._objectPath, parent._addAction(action, resultHandler); + }, CommonActionFactory.createQueryAsJsonAction = function(context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }, action = new Action(actionInfo, 1, 4); + return action.referencedObjectPath = parent._objectPath, parent._addAction(action, resultHandler); + }, CommonActionFactory.createUpdateAction = function(context, parent, objectState) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 9, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }, action = new Action(actionInfo, 0, 0); + return action.referencedObjectPath = parent._objectPath, parent._addAction(action); + }, CommonActionFactory; + }(); + exports.CommonActionFactory = CommonActionFactory; + var ClientObjectBase = function() { + function ClientObjectBase(contextBase, objectPath) { + this.m_contextBase = contextBase, this.m_objectPath = objectPath; + } + return Object.defineProperty(ClientObjectBase.prototype, "_objectPath", { + get: function() { + return this.m_objectPath; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientObjectBase.prototype, "_context", { + get: function() { + return this.m_contextBase; + }, + enumerable: !1, + configurable: !0 + }), ClientObjectBase.prototype._addAction = function(action, resultHandler) { + var _this = this; + return void 0 === resultHandler && (resultHandler = null), Core.CoreUtility.createPromise((function(resolve, reject) { + _this._context._addServiceApiAction(action, resultHandler, resolve, reject); + })); + }, ClientObjectBase.prototype._retrieve = function(option, resultHandler) { + var shouldPolyfill = exports._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + shouldPolyfill || (shouldPolyfill = !CommonUtility.isSetSupported("RichApiRuntime", "1.1")); + var queryOption = ClientRequestContextBase._parseQueryOption(option); + return shouldPolyfill ? CommonActionFactory.createQueryAction(this._context, this, queryOption, resultHandler) : CommonActionFactory.createQueryAsJsonAction(this._context, this, queryOption, resultHandler); + }, ClientObjectBase.prototype._recursivelyUpdate = function(properties) { + var shouldPolyfill = exports._internalConfig.alwaysPolyfillClientObjectUpdateMethod; + shouldPolyfill || (shouldPolyfill = !CommonUtility.isSetSupported("RichApiRuntime", "1.2")); + try { + var scalarPropNames = this[CommonConstants.scalarPropertyNames]; + scalarPropNames || (scalarPropNames = []); + var scalarPropUpdatable = this[CommonConstants.scalarPropertyUpdateable]; + if (!scalarPropUpdatable) { + scalarPropUpdatable = []; + for (var i = 0; i < scalarPropNames.length; i++) scalarPropUpdatable.push(!1); + } + var navigationPropNames = this[CommonConstants.navigationPropertyNames]; + navigationPropNames || (navigationPropNames = []); + var scalarProps = {}, navigationProps = {}, scalarPropCount = 0; + for (var propName in properties) { + var index = scalarPropNames.indexOf(propName); + if (index >= 0) { + if (!scalarPropUpdatable[index]) throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, propName), + debugInfo: { + errorLocation: propName + } + }); + scalarProps[propName] = properties[propName], ++scalarPropCount; + } else { + if (!(navigationPropNames.indexOf(propName) >= 0)) throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, propName), + debugInfo: { + errorLocation: propName + } + }); + navigationProps[propName] = properties[propName]; + } + } + if (scalarPropCount > 0) if (shouldPolyfill) for (i = 0; i < scalarPropNames.length; i++) { + var propValue = scalarProps[propName = scalarPropNames[i]]; + CommonUtility.isUndefined(propValue) || CommonActionFactory.createSetPropertyAction(this._context, this, propName, propValue); + } else CommonActionFactory.createUpdateAction(this._context, this, scalarProps); + for (var propName in navigationProps) { + var navigationPropProxy = this[propName], navigationPropValue = navigationProps[propName]; + navigationPropProxy._recursivelyUpdate(navigationPropValue); + } + } catch (innerError) { + throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(Core.CoreResourceStrings.invalidArgument, "properties"), + debugInfo: { + errorLocation: this._className + ".update" + }, + innerError: innerError + }); + } + }, ClientObjectBase; + }(); + exports.ClientObjectBase = ClientObjectBase; + var Action = function() { + function Action(actionInfo, operationType, flags) { + this.m_actionInfo = actionInfo, this.m_operationType = operationType, this.m_flags = flags; + } + return Object.defineProperty(Action.prototype, "actionInfo", { + get: function() { + return this.m_actionInfo; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(Action.prototype, "operationType", { + get: function() { + return this.m_operationType; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(Action.prototype, "flags", { + get: function() { + return this.m_flags; + }, + enumerable: !1, + configurable: !0 + }), Action; + }(); + exports.Action = Action; + var ObjectPath = function() { + function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest, operationType, flags) { + this.m_objectPathInfo = objectPathInfo, this.m_parentObjectPath = parentObjectPath, + this.m_isCollection = isCollection, this.m_isInvalidAfterRequest = isInvalidAfterRequest, + this.m_isValid = !0, this.m_operationType = operationType, this.m_flags = flags; + } + return Object.defineProperty(ObjectPath.prototype, "id", { + get: function() { + var argumentInfo = this.m_objectPathInfo.ArgumentInfo; + if (argumentInfo) { + var argument = argumentInfo.Arguments; + if (argument) return argument[0]; + } + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ObjectPath.prototype, "parent", { + get: function() { + var parent = this.m_parentObjectPath; + if (parent) return parent; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ObjectPath.prototype, "parentId", { + get: function() { + return this.parent ? this.parent.id : void 0; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ObjectPath.prototype, "objectPathInfo", { + get: function() { + return this.m_objectPathInfo; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ObjectPath.prototype, "operationType", { + get: function() { + return this.m_operationType; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ObjectPath.prototype, "flags", { + get: function() { + return this.m_flags; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ObjectPath.prototype, "isCollection", { + get: function() { + return this.m_isCollection; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ObjectPath.prototype, "isInvalidAfterRequest", { + get: function() { + return this.m_isInvalidAfterRequest; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ObjectPath.prototype, "parentObjectPath", { + get: function() { + return this.m_parentObjectPath; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ObjectPath.prototype, "argumentObjectPaths", { + get: function() { + return this.m_argumentObjectPaths; + }, + set: function(value) { + this.m_argumentObjectPaths = value; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ObjectPath.prototype, "isValid", { + get: function() { + return this.m_isValid; + }, + set: function(value) { + this.m_isValid = value, !value && 6 === this.m_objectPathInfo.ObjectPathType && this.m_savedObjectPathInfo && (ObjectPath.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo, this.m_objectPathInfo), + this.m_parentObjectPath = this.m_savedObjectPathInfo.parent, this.m_isValid = !0, + this.m_savedObjectPathInfo = null); + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ObjectPath.prototype, "originalObjectPathInfo", { + get: function() { + return this.m_originalObjectPathInfo; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ObjectPath.prototype, "getByIdMethodName", { + get: function() { + return this.m_getByIdMethodName; + }, + set: function(value) { + this.m_getByIdMethodName = value; + }, + enumerable: !1, + configurable: !0 + }), ObjectPath.prototype._updateAsNullObject = function() { + this.resetForUpdateUsingObjectData(), this.m_objectPathInfo.ObjectPathType = 7, + this.m_objectPathInfo.Name = "", this.m_parentObjectPath = null; + }, ObjectPath.prototype.saveOriginalObjectPathInfo = function() { + exports.config.extendedErrorLogging && !this.m_originalObjectPathInfo && (this.m_originalObjectPathInfo = {}, + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, this.m_originalObjectPathInfo)); + }, ObjectPath.prototype.updateUsingObjectData = function(value, clientObject) { + var referenceId = value[CommonConstants.referenceId]; + if (!Core.CoreUtility.isNullOrEmptyString(referenceId)) { + if (!this.m_savedObjectPathInfo && !this.isInvalidAfterRequest && ObjectPath.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)) { + var pathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, pathInfo), this.m_savedObjectPathInfo = { + pathInfo: pathInfo, + parent: this.m_parentObjectPath + }; + } + return this.saveOriginalObjectPathInfo(), this.resetForUpdateUsingObjectData(), + this.m_objectPathInfo.ObjectPathType = 6, this.m_objectPathInfo.Name = referenceId, + delete this.m_objectPathInfo.ParentObjectPathId, void (this.m_parentObjectPath = null); + } + if (clientObject) { + var collectionPropertyPath = clientObject[CommonConstants.collectionPropertyPath]; + if (!Core.CoreUtility.isNullOrEmptyString(collectionPropertyPath) && clientObject.context) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!Core.CoreUtility.isNullOrUndefined(id)) { + for (var propNames = collectionPropertyPath.split("."), parent_1 = clientObject.context[propNames[0]], i = 1; i < propNames.length; i++) parent_1 = parent_1[propNames[i]]; + return this.saveOriginalObjectPathInfo(), this.resetForUpdateUsingObjectData(), + this.m_parentObjectPath = parent_1._objectPath, this.m_objectPathInfo.ParentObjectPathId = this.m_parentObjectPath.objectPathInfo.Id, + this.m_objectPathInfo.ObjectPathType = 5, this.m_objectPathInfo.Name = "", void (this.m_objectPathInfo.ArgumentInfo.Arguments = [ id ]); + } + } + } + var parentIsCollection = this.parentObjectPath && this.parentObjectPath.isCollection, getByIdMethodName = this.getByIdMethodName; + if (parentIsCollection || !Core.CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!Core.CoreUtility.isNullOrUndefined(id)) return this.saveOriginalObjectPathInfo(), + this.resetForUpdateUsingObjectData(), Core.CoreUtility.isNullOrEmptyString(getByIdMethodName) ? (this.m_objectPathInfo.ObjectPathType = 5, + this.m_objectPathInfo.Name = "") : (this.m_objectPathInfo.ObjectPathType = 3, this.m_objectPathInfo.Name = getByIdMethodName), + void (this.m_objectPathInfo.ArgumentInfo.Arguments = [ id ]); + } + }, ObjectPath.prototype.resetForUpdateUsingObjectData = function() { + this.m_isInvalidAfterRequest = !1, this.m_isValid = !0, this.m_operationType = 1, + this.m_flags = 4, this.m_objectPathInfo.ArgumentInfo = {}, this.m_argumentObjectPaths = null, + this.m_getByIdMethodName = null; + }, ObjectPath.isRestorableObjectPath = function(objectPathType) { + return 1 === objectPathType || 5 === objectPathType || 3 === objectPathType || 4 === objectPathType; + }, ObjectPath.copyObjectPathInfo = function(src, dest) { + dest.Id = src.Id, dest.ArgumentInfo = src.ArgumentInfo, dest.Name = src.Name, dest.ObjectPathType = src.ObjectPathType, + dest.ParentObjectPathId = src.ParentObjectPathId; + }, ObjectPath; + }(); + exports.ObjectPath = ObjectPath; + var ClientRequestContextBase = function() { + function ClientRequestContextBase() { + this.m_nextId = 0; + } + return ClientRequestContextBase.prototype._nextId = function() { + return ++this.m_nextId; + }, ClientRequestContextBase.prototype._addServiceApiAction = function(action, resultHandler, resolve, reject) { + this.m_serviceApiQueue || (this.m_serviceApiQueue = new ServiceApiQueue(this)), + this.m_serviceApiQueue.add(action, resultHandler, resolve, reject); + }, ClientRequestContextBase._parseQueryOption = function(option) { + var queryOption = {}; + if ("string" == typeof option) { + var select = option; + queryOption.Select = CommonUtility._parseSelectExpand(select); + } else if (Array.isArray(option)) queryOption.Select = option; else if ("object" == typeof option) { + var loadOption = option; + if (ClientRequestContextBase.isLoadOption(loadOption)) { + if ("string" == typeof loadOption.select) queryOption.Select = CommonUtility._parseSelectExpand(loadOption.select); else if (Array.isArray(loadOption.select)) queryOption.Select = loadOption.select; else if (!CommonUtility.isNullOrUndefined(loadOption.select)) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: "option.select" + }); + if ("string" == typeof loadOption.expand) queryOption.Expand = CommonUtility._parseSelectExpand(loadOption.expand); else if (Array.isArray(loadOption.expand)) queryOption.Expand = loadOption.expand; else if (!CommonUtility.isNullOrUndefined(loadOption.expand)) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: "option.expand" + }); + if ("number" == typeof loadOption.top) queryOption.Top = loadOption.top; else if (!CommonUtility.isNullOrUndefined(loadOption.top)) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: "option.top" + }); + if ("number" == typeof loadOption.skip) queryOption.Skip = loadOption.skip; else if (!CommonUtility.isNullOrUndefined(loadOption.skip)) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: "option.skip" + }); + } else queryOption = ClientRequestContextBase.parseStrictLoadOption(option); + } else if (!CommonUtility.isNullOrUndefined(option)) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: "option" + }); + return queryOption; + }, ClientRequestContextBase.isLoadOption = function(loadOption) { + if (!CommonUtility.isUndefined(loadOption.select) && ("string" == typeof loadOption.select || Array.isArray(loadOption.select))) return !0; + if (!CommonUtility.isUndefined(loadOption.expand) && ("string" == typeof loadOption.expand || Array.isArray(loadOption.expand))) return !0; + if (!CommonUtility.isUndefined(loadOption.top) && "number" == typeof loadOption.top) return !0; + if (!CommonUtility.isUndefined(loadOption.skip) && "number" == typeof loadOption.skip) return !0; + for (var i in loadOption) return !1; + return !0; + }, ClientRequestContextBase.parseStrictLoadOption = function(option) { + var ret = { + Select: [] + }; + return ClientRequestContextBase.parseStrictLoadOptionHelper(ret, "", "option", option), + ret; + }, ClientRequestContextBase.combineQueryPath = function(pathPrefix, key, separator) { + return 0 === pathPrefix.length ? key : pathPrefix + separator + key; + }, ClientRequestContextBase.parseStrictLoadOptionHelper = function(queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value = option[key]; + if ("$all" === key) { + if ("boolean" != typeof value) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, ".") + }); + value && queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, "*", "/")); + } else if ("$top" === key) { + if ("number" != typeof value || pathPrefix.length > 0) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, ".") + }); + queryInfo.Top = value; + } else if ("$skip" === key) { + if ("number" != typeof value || pathPrefix.length > 0) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, ".") + }); + queryInfo.Skip = value; + } else if ("boolean" == typeof value) value && queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, key, "/")); else { + if ("object" != typeof value) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, ".") + }); + ClientRequestContextBase.parseStrictLoadOptionHelper(queryInfo, ClientRequestContextBase.combineQueryPath(pathPrefix, key, "/"), ClientRequestContextBase.combineQueryPath(argPrefix, key, "."), value); + } + } + }, ClientRequestContextBase; + }(); + exports.ClientRequestContextBase = ClientRequestContextBase; + var InstantiateActionUpdateObjectPathHandler = function() { + function InstantiateActionUpdateObjectPathHandler(m_objectPath) { + this.m_objectPath = m_objectPath; + } + return InstantiateActionUpdateObjectPathHandler.prototype._handleResult = function(value) { + Core.CoreUtility.isNullOrUndefined(value) ? this.m_objectPath._updateAsNullObject() : this.m_objectPath.updateUsingObjectData(value, null); + }, InstantiateActionUpdateObjectPathHandler; + }(), ClientRequestBase = function() { + function ClientRequestBase(context) { + this.m_contextBase = context, this.m_actions = [], this.m_actionResultHandler = {}, + this.m_referencedObjectPaths = {}, this.m_instantiatedObjectPaths = {}, this.m_preSyncPromises = []; + } + return ClientRequestBase.prototype.addAction = function(action) { + this.m_actions.push(action), 1 == action.actionInfo.ActionType && (this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId] = action); + }, Object.defineProperty(ClientRequestBase.prototype, "hasActions", { + get: function() { + return this.m_actions.length > 0; + }, + enumerable: !1, + configurable: !0 + }), ClientRequestBase.prototype._getLastAction = function() { + return this.m_actions[this.m_actions.length - 1]; + }, ClientRequestBase.prototype.ensureInstantiateObjectPath = function(objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) return; + if (this.ensureInstantiateObjectPath(objectPath.parentObjectPath), this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths), + !this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo = { + Id: this.m_contextBase._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }, instantiateAction = new Action(actionInfo, 1, 4); + instantiateAction.referencedObjectPath = objectPath, this.addReferencedObjectPath(objectPath), + this.addAction(instantiateAction); + var resultHandler = new InstantiateActionUpdateObjectPathHandler(objectPath); + this.addActionResultHandler(instantiateAction, resultHandler); + } + } + }, ClientRequestBase.prototype.ensureInstantiateObjectPaths = function(objectPaths) { + if (objectPaths) for (var i = 0; i < objectPaths.length; i++) this.ensureInstantiateObjectPath(objectPaths[i]); + }, ClientRequestBase.prototype.addReferencedObjectPath = function(objectPath) { + if (objectPath && !this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { + if (!objectPath.isValid) throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(Core.CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + for (;objectPath; ) this.m_referencedObjectPaths[objectPath.objectPathInfo.Id] = objectPath, + 3 == objectPath.objectPathInfo.ObjectPathType && this.addReferencedObjectPaths(objectPath.argumentObjectPaths), + objectPath = objectPath.parentObjectPath; + } + }, ClientRequestBase.prototype.addReferencedObjectPaths = function(objectPaths) { + if (objectPaths) for (var i = 0; i < objectPaths.length; i++) this.addReferencedObjectPath(objectPaths[i]); + }, ClientRequestBase.prototype.addActionResultHandler = function(action, resultHandler) { + this.m_actionResultHandler[action.actionInfo.Id] = resultHandler; + }, ClientRequestBase.prototype.aggregrateRequestFlags = function(requestFlags, operationType, flags) { + return 0 === operationType && (requestFlags |= 1, 0 == (2 & flags) && (requestFlags &= -17), + 0 == (8 & flags) && (requestFlags &= -257), requestFlags &= -5), 1 & flags && (requestFlags |= 2), + 0 == (4 & flags) && (requestFlags &= -5), requestFlags; + }, ClientRequestBase.prototype.finallyNormalizeFlags = function(requestFlags) { + return 0 == (1 & requestFlags) && (requestFlags &= -17, requestFlags &= -257), exports._internalConfig.enableConcurrentFlag || (requestFlags &= -5), + exports._internalConfig.enableUndoableFlag || (requestFlags &= -17), CommonUtility.isSetSupported("RichApiRuntimeFlag", "1.1") || (requestFlags &= -5, + requestFlags &= -17), CommonUtility.isSetSupported("RichApiRuntimeFlag", "1.2") || (requestFlags &= -257), + "number" == typeof this.m_flagsForTesting && (requestFlags = this.m_flagsForTesting), + requestFlags; + }, ClientRequestBase.prototype.buildRequestMessageBodyAndRequestFlags = function() { + exports._internalConfig.enableEarlyDispose && ClientRequestBase._calculateLastUsedObjectPathIds(this.m_actions); + var requestFlags = 276, objectPaths = {}; + for (var i in this.m_referencedObjectPaths) requestFlags = this.aggregrateRequestFlags(requestFlags, this.m_referencedObjectPaths[i].operationType, this.m_referencedObjectPaths[i].flags), + objectPaths[i] = this.m_referencedObjectPaths[i].objectPathInfo; + for (var actions = [], hasKeepReference = !1, index = 0; index < this.m_actions.length; index++) { + var action = this.m_actions[index]; + 3 === action.actionInfo.ActionType && action.actionInfo.Name === CommonConstants.keepReference && (hasKeepReference = !0), + requestFlags = this.aggregrateRequestFlags(requestFlags, action.operationType, action.flags), + actions.push(action.actionInfo); + } + return requestFlags = this.finallyNormalizeFlags(requestFlags), { + body: { + AutoKeepReference: this.m_contextBase._autoCleanup && hasKeepReference, + Actions: actions, + ObjectPaths: objectPaths + }, + flags: requestFlags + }; + }, ClientRequestBase.prototype.processResponse = function(actionResults) { + if (actionResults) for (var i = 0; i < actionResults.length; i++) { + var actionResult = actionResults[i], handler = this.m_actionResultHandler[actionResult.ActionId]; + handler && handler._handleResult(actionResult.Value); + } + }, ClientRequestBase.prototype.invalidatePendingInvalidObjectPaths = function() { + for (var i in this.m_referencedObjectPaths) this.m_referencedObjectPaths[i].isInvalidAfterRequest && (this.m_referencedObjectPaths[i].isValid = !1); + }, ClientRequestBase.prototype._addPreSyncPromise = function(value) { + this.m_preSyncPromises.push(value); + }, Object.defineProperty(ClientRequestBase.prototype, "_preSyncPromises", { + get: function() { + return this.m_preSyncPromises; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientRequestBase.prototype, "_actions", { + get: function() { + return this.m_actions; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientRequestBase.prototype, "_objectPaths", { + get: function() { + return this.m_referencedObjectPaths; + }, + enumerable: !1, + configurable: !0 + }), ClientRequestBase.prototype._removeKeepReferenceAction = function(objectPathId) { + for (var i = this.m_actions.length - 1; i >= 0; i--) { + var actionInfo = this.m_actions[i].actionInfo; + if (actionInfo.ObjectPathId === objectPathId && 3 === actionInfo.ActionType && actionInfo.Name === CommonConstants.keepReference) { + this.m_actions.splice(i, 1); + break; + } + } + }, ClientRequestBase._updateLastUsedActionIdOfObjectPathId = function(lastUsedActionIdOfObjectPathId, objectPath, actionId) { + for (;objectPath; ) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) return; + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id] = actionId; + var argumentObjectPaths = objectPath.argumentObjectPaths; + if (argumentObjectPaths) for (var argumentObjectPathsLength = argumentObjectPaths.length, i = 0; i < argumentObjectPathsLength; i++) ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + objectPath = objectPath.parentObjectPath; + } + }, ClientRequestBase._calculateLastUsedObjectPathIds = function(actions) { + for (var lastUsedActionIdOfObjectPathId = {}, actionsLength = actions.length, index = actionsLength - 1; index >= 0; --index) { + var actionId = (action = actions[index]).actionInfo.Id; + action.referencedObjectPath && ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + var referencedObjectPaths = action.referencedArgumentObjectPaths; + if (referencedObjectPaths) for (var referencedObjectPathsLength = referencedObjectPaths.length, refIndex = 0; refIndex < referencedObjectPathsLength; refIndex++) ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + var lastUsedObjectPathIdsOfAction = {}; + for (var key in lastUsedActionIdOfObjectPathId) { + var objectPathIds = lastUsedObjectPathIdsOfAction[actionId = lastUsedActionIdOfObjectPathId[key]]; + objectPathIds || (objectPathIds = [], lastUsedObjectPathIdsOfAction[actionId] = objectPathIds), + objectPathIds.push(parseInt(key)); + } + for (index = 0; index < actionsLength; index++) { + var action, lastUsedObjectPathIds = lastUsedObjectPathIdsOfAction[(action = actions[index]).actionInfo.Id]; + lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0 ? action.actionInfo.L = lastUsedObjectPathIds : action.actionInfo.L && delete action.actionInfo.L; + } + }, ClientRequestBase; + }(); + exports.ClientRequestBase = ClientRequestBase; + var ClientResult = function() { + function ClientResult(m_type) { + this.m_type = m_type; + } + return Object.defineProperty(ClientResult.prototype, "value", { + get: function() { + if (!this.m_isLoaded) throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(Core.CoreResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "clientResult.value" + } + }); + return this.m_value; + }, + enumerable: !1, + configurable: !0 + }), ClientResult.prototype._handleResult = function(value) { + this.m_isLoaded = !0, "object" == typeof value && value && value._IsNull || (1 === this.m_type ? this.m_value = CommonUtility.adjustToDateTime(value) : this.m_value = value); + }, ClientResult; + }(); + exports.ClientResult = ClientResult; + var ServiceApiQueue = function() { + function ServiceApiQueue(m_context) { + this.m_context = m_context, this.m_actions = []; + } + return ServiceApiQueue.prototype.add = function(action, resultHandler, resolve, reject) { + var _this = this; + this.m_actions.push({ + action: action, + resultHandler: resultHandler, + resolve: resolve, + reject: reject + }), 1 === this.m_actions.length && setTimeout((function() { + return _this.processActions(); + }), 0); + }, ServiceApiQueue.prototype.processActions = function() { + var _this = this; + if (0 !== this.m_actions.length) { + var actions = this.m_actions; + this.m_actions = []; + for (var request = new ClientRequestBase(this.m_context), i = 0; i < actions.length; i++) { + var action = actions[i]; + request.ensureInstantiateObjectPath(action.action.referencedObjectPath), request.ensureInstantiateObjectPaths(action.action.referencedArgumentObjectPaths), + request.addAction(action.action), request.addReferencedObjectPath(action.action.referencedObjectPath), + request.addReferencedObjectPaths(action.action.referencedArgumentObjectPaths); + } + var _a = request.buildRequestMessageBodyAndRequestFlags(), body = _a.body, flags = _a.flags, requestMessage = { + Url: Core.CoreConstants.localDocumentApiPrefix, + Headers: null, + Body: body + }; + Core.CoreUtility.log("Request:"), Core.CoreUtility.log(JSON.stringify(body)), (new HttpRequestExecutor).executeAsync(this.m_context._customData, flags, requestMessage).then((function(response) { + _this.processResponse(request, actions, response); + })).catch((function(ex) { + for (var i = 0; i < actions.length; i++) { + actions[i].reject(ex); + } + })); + } + }, ServiceApiQueue.prototype.processResponse = function(request, actions, response) { + var error = this.getErrorFromResponse(response), actionResults = null; + response.Body.Results ? actionResults = response.Body.Results : response.Body.ProcessedResults && response.Body.ProcessedResults.Results && (actionResults = response.Body.ProcessedResults.Results), + actionResults || (actionResults = []), this.processActionResults(request, actions, actionResults, error); + }, ServiceApiQueue.prototype.getErrorFromResponse = function(response) { + return Core.CoreUtility.isNullOrEmptyString(response.ErrorCode) ? response.Body && response.Body.Error ? new Core._Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message + }) : null : new Core._Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage + }); + }, ServiceApiQueue.prototype.processActionResults = function(request, actions, actionResults, err) { + request.processResponse(actionResults); + for (var i = 0; i < actions.length; i++) { + for (var action = actions[i], actionId = action.action.actionInfo.Id, hasResult = !1, j = 0; j < actionResults.length; j++) if (actionId == actionResults[j].ActionId) { + var resultValue = actionResults[j].Value; + action.resultHandler && (action.resultHandler._handleResult(resultValue), resultValue = action.resultHandler.value), + action.resolve && action.resolve(resultValue), hasResult = !0; + break; + } + !hasResult && action.reject && (err ? action.reject(err) : action.reject("No response for the action.")); + } + }, ServiceApiQueue; + }(), HttpRequestExecutor = function() { + function HttpRequestExecutor() {} + return HttpRequestExecutor.prototype.getRequestUrl = function(baseUrl, requestFlags) { + return "/" != baseUrl.charAt(baseUrl.length - 1) && (baseUrl += "/"), baseUrl = (baseUrl += Core.CoreConstants.processQuery) + "?" + Core.CoreConstants.flags + "=" + requestFlags.toString(); + }, HttpRequestExecutor.prototype.executeAsync = function(customData, requestFlags, requestMessage) { + var requestInfo = { + method: "POST", + url: this.getRequestUrl(requestMessage.Url, requestFlags), + headers: {}, + body: requestMessage.Body + }; + if (requestInfo.headers[Core.CoreConstants.sourceLibHeader] = HttpRequestExecutor.SourceLibHeaderValue, + requestInfo.headers["CONTENT-TYPE"] = "application/json", requestMessage.Headers) for (var key in requestMessage.Headers) requestInfo.headers[key] = requestMessage.Headers[key]; + return (Core.CoreUtility._isLocalDocumentUrl(requestInfo.url) ? Core.HttpUtility.sendLocalDocumentRequest : Core.HttpUtility.sendRequest)(requestInfo).then((function(responseInfo) { + var response; + if (200 === responseInfo.statusCode) response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: Core.CoreUtility._parseResponseBody(responseInfo) + }; else { + Core.CoreUtility.log("Error Response:" + responseInfo.body); + var error = Core.CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + })); + }, HttpRequestExecutor.SourceLibHeaderValue = "officejs-rest", HttpRequestExecutor; + }(); + exports.HttpRequestExecutor = HttpRequestExecutor; + var CommonConstants = function(_super) { + function CommonConstants() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(CommonConstants, _super), CommonConstants.collectionPropertyPath = "_collectionPropertyPath", + CommonConstants.id = "Id", CommonConstants.idLowerCase = "id", CommonConstants.idPrivate = "_Id", + CommonConstants.keepReference = "_KeepReference", CommonConstants.objectPathIdPrivate = "_ObjectPathId", + CommonConstants.referenceId = "_ReferenceId", CommonConstants.items = "_Items", + CommonConstants.itemsLowerCase = "items", CommonConstants.scalarPropertyNames = "_scalarPropertyNames", + CommonConstants.scalarPropertyOriginalNames = "_scalarPropertyOriginalNames", CommonConstants.navigationPropertyNames = "_navigationPropertyNames", + CommonConstants.scalarPropertyUpdateable = "_scalarPropertyUpdateable", CommonConstants; + }(Core.CoreConstants); + exports.CommonConstants = CommonConstants; + var CommonUtility = function(_super) { + function CommonUtility() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(CommonUtility, _super), CommonUtility.validateObjectPath = function(clientObject) { + for (var objectPath = clientObject._objectPath; objectPath; ) { + if (!objectPath.isValid) throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(Core.CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + objectPath = objectPath.parentObjectPath; + } + }, CommonUtility.validateReferencedObjectPaths = function(objectPaths) { + if (objectPaths) for (var i = 0; i < objectPaths.length; i++) for (var objectPath = objectPaths[i]; objectPath; ) { + if (!objectPath.isValid) throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(Core.CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)) + }); + objectPath = objectPath.parentObjectPath; + } + }, CommonUtility._toCamelLowerCase = function(name) { + if (Core.CoreUtility.isNullOrEmptyString(name)) return name; + for (var index = 0; index < name.length && name.charCodeAt(index) >= 65 && name.charCodeAt(index) <= 90; ) index++; + return index < name.length ? name.substr(0, index).toLowerCase() + name.substr(index) : name.toLowerCase(); + }, CommonUtility.adjustToDateTime = function(value) { + if (Core.CoreUtility.isNullOrUndefined(value)) return null; + if ("string" == typeof value) return new Date(value); + if (Array.isArray(value)) { + for (var arr = value, i = 0; i < arr.length; i++) arr[i] = CommonUtility.adjustToDateTime(arr[i]); + return arr; + } + throw Core.CoreUtility._createInvalidArgError({ + argumentName: "date" + }); + }, CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult = function(value) { + var id = value[CommonConstants.id]; + return Core.CoreUtility.isNullOrUndefined(id) && (id = value[CommonConstants.idLowerCase]), + Core.CoreUtility.isNullOrUndefined(id) && (id = value[CommonConstants.idPrivate]), + id; + }, CommonUtility.getObjectPathExpression = function(objectPath) { + for (var ret = ""; objectPath; ) { + switch (objectPath.objectPathInfo.ObjectPathType) { + case 1: + ret = ret; + break; + + case 2: + ret = "new()" + (ret.length > 0 ? "." : "") + ret; + break; + + case 3: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + "()" + (ret.length > 0 ? "." : "") + ret; + break; + + case 4: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + (ret.length > 0 ? "." : "") + ret; + break; + + case 5: + ret = "getItem()" + (ret.length > 0 ? "." : "") + ret; + break; + + case 6: + ret = "_reference()" + (ret.length > 0 ? "." : "") + ret; + } + objectPath = objectPath.parentObjectPath; + } + return ret; + }, CommonUtility.setMethodArguments = function(context, argumentInfo, args) { + if (Core.CoreUtility.isNullOrUndefined(args)) return null; + var referencedObjectPaths = new Array, referencedObjectPathIds = new Array, hasOne = CommonUtility.collectObjectPathInfos(context, args, referencedObjectPaths, referencedObjectPathIds); + return argumentInfo.Arguments = args, hasOne && (argumentInfo.ReferencedObjectPathIds = referencedObjectPathIds), + referencedObjectPaths; + }, CommonUtility.validateContext = function(context, obj) { + if (context && obj && obj._context !== context) throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.invalidRequestContext, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(Core.CoreResourceStrings.invalidRequestContext) + }); + }, CommonUtility.isSetSupported = function(apiSetName, apiSetVersion) { + return !("undefined" != typeof window && window.Office && window.Office.context && window.Office.context.requirements) || window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion); + }, CommonUtility.throwIfApiNotSupported = function(apiFullName, apiSetName, apiSetVersion, hostName) { + if (CommonUtility._doApiNotSupportedCheck && !CommonUtility.isSetSupported(apiSetName, apiSetVersion)) { + var message = Core.CoreUtility._getResourceString(Core.CoreResourceStrings.apiNotFoundDetails, [ apiFullName, apiSetName + " " + apiSetVersion, hostName ]); + throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.apiNotFound, + httpStatusCode: 404, + message: message, + debugInfo: { + errorLocation: apiFullName + } + }); + } + }, CommonUtility.calculateApiFlags = function(apiFlags, undoableApiSetName, undoableApiSetVersion) { + return CommonUtility.isSetSupported(undoableApiSetName, undoableApiSetVersion) || (apiFlags &= -3), + apiFlags; + }, CommonUtility._parseSelectExpand = function(select) { + var args = []; + if (!Core.CoreUtility.isNullOrEmptyString(select)) for (var propertyNames = select.split(","), i = 0; i < propertyNames.length; i++) { + var propertyName = propertyNames[i]; + (propertyName = sanitizeForAnyItemsSlash(propertyName.trim())).length > 0 && args.push(propertyName); + } + return args; + function sanitizeForAnyItemsSlash(propertyName) { + var propertyNameLower = propertyName.toLowerCase(); + if ("items" === propertyNameLower || "items/" === propertyNameLower) return "*"; + return ("items/" === propertyNameLower.substr(0, 6) || "items." === propertyNameLower.substr(0, 6)) && (propertyName = propertyName.substr(6)), + propertyName.replace(new RegExp("[/.]items[/.]", "gi"), "/"); + } + }, CommonUtility.changePropertyNameToCamelLowerCase = function(value) { + if (Array.isArray(value)) { + for (var ret = [], i = 0; i < value.length; i++) ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + return ret; + } + if ("object" == typeof value && null !== value) { + ret = {}; + for (var key in value) { + var propValue = value[key]; + if (key === CommonConstants.items) { + (ret = {})[CommonConstants.itemsLowerCase] = this.changePropertyNameToCamelLowerCase(propValue); + break; + } + ret[CommonUtility._toCamelLowerCase(key)] = this.changePropertyNameToCamelLowerCase(propValue); + } + return ret; + } + return value; + }, CommonUtility.purifyJson = function(value) { + if (Array.isArray(value)) { + for (var ret = [], i = 0; i < value.length; i++) ret.push(this.purifyJson(value[i])); + return ret; + } + if ("object" == typeof value && null !== value) { + ret = {}; + for (var key in value) if (95 !== key.charCodeAt(0)) { + var propValue = value[key]; + "object" == typeof propValue && null !== propValue && Array.isArray(propValue.items) && (propValue = propValue.items), + ret[key] = this.purifyJson(propValue); + } + return ret; + } + return value; + }, CommonUtility.collectObjectPathInfos = function(context, args, referencedObjectPaths, referencedObjectPathIds) { + for (var hasOne = !1, i = 0; i < args.length; i++) if (args[i] instanceof ClientObjectBase) { + var clientObject = args[i]; + CommonUtility.validateContext(context, clientObject), args[i] = clientObject._objectPath.objectPathInfo.Id, + referencedObjectPathIds.push(clientObject._objectPath.objectPathInfo.Id), referencedObjectPaths.push(clientObject._objectPath), + hasOne = !0; + } else if (Array.isArray(args[i])) { + var childArrayObjectPathIds = new Array; + CommonUtility.collectObjectPathInfos(context, args[i], referencedObjectPaths, childArrayObjectPathIds) ? (referencedObjectPathIds.push(childArrayObjectPathIds), + hasOne = !0) : referencedObjectPathIds.push(0); + } else Core.CoreUtility.isPlainJsonObject(args[i]) ? (referencedObjectPathIds.push(0), + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(args[i], referencedObjectPaths)) : referencedObjectPathIds.push(0); + return hasOne; + }, CommonUtility.replaceClientObjectPropertiesWithObjectPathIds = function(value, referencedObjectPaths) { + var _a, _b; + for (var key in value) { + var propValue = value[key]; + if (propValue instanceof ClientObjectBase) referencedObjectPaths.push(propValue._objectPath), + value[key] = ((_a = {})[CommonConstants.objectPathIdPrivate] = propValue._objectPath.objectPathInfo.Id, + _a); else if (Array.isArray(propValue)) for (var i = 0; i < propValue.length; i++) if (propValue[i] instanceof ClientObjectBase) { + var elem = propValue[i]; + referencedObjectPaths.push(elem._objectPath), propValue[i] = ((_b = {})[CommonConstants.objectPathIdPrivate] = elem._objectPath.objectPathInfo.Id, + _b); + } else Core.CoreUtility.isPlainJsonObject(propValue[i]) && CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue[i], referencedObjectPaths); else Core.CoreUtility.isPlainJsonObject(propValue) && CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue, referencedObjectPaths); + } + }, CommonUtility.normalizeName = function(name) { + return name.substr(0, 1).toLowerCase() + name.substr(1); + }, CommonUtility._doApiNotSupportedCheck = !1, CommonUtility; + }(Core.CoreUtility); + exports.CommonUtility = CommonUtility; + var CommonResourceStrings = function(_super) { + function CommonResourceStrings() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(CommonResourceStrings, _super), CommonResourceStrings.propertyDoesNotExist = "PropertyDoesNotExist", + CommonResourceStrings.attemptingToSetReadOnlyProperty = "AttemptingToSetReadOnlyProperty", + CommonResourceStrings; + }(Core.CoreResourceStrings); + exports.CommonResourceStrings = CommonResourceStrings; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.LibraryBuilder = exports.BatchApiHelper = exports._internalConfig = exports.WebImage = exports.Utility = exports.SessionBase = exports.ResourceStrings = exports.Provider = exports.HttpUtility = exports.GenericEventHandlers = exports.FormattedNumber = exports.EventHandlers = exports.ErrorCodes = exports.Error = exports.Entity = exports.CoreUtility = exports.Constants = exports.config = exports.CommonUtility = exports.ClientObject = exports.ClientResult = exports.ClientRequestContext = exports.Attribution = void 0; + var core_1 = __webpack_require__(0); + Object.defineProperty(exports, "Attribution", { + enumerable: !0, + get: function() { + return core_1.Attribution; + } + }), Object.defineProperty(exports, "CoreUtility", { + enumerable: !0, + get: function() { + return core_1.CoreUtility; + } + }), Object.defineProperty(exports, "Entity", { + enumerable: !0, + get: function() { + return core_1.Entity; + } + }), Object.defineProperty(exports, "Error", { + enumerable: !0, + get: function() { + return core_1.Error; + } + }), Object.defineProperty(exports, "FormattedNumber", { + enumerable: !0, + get: function() { + return core_1.FormattedNumber; + } + }), Object.defineProperty(exports, "HttpUtility", { + enumerable: !0, + get: function() { + return core_1.HttpUtility; + } + }), Object.defineProperty(exports, "Provider", { + enumerable: !0, + get: function() { + return core_1.Provider; + } + }), Object.defineProperty(exports, "SessionBase", { + enumerable: !0, + get: function() { + return core_1.SessionBase; + } + }), Object.defineProperty(exports, "WebImage", { + enumerable: !0, + get: function() { + return core_1.WebImage; + } + }); + var common_1 = __webpack_require__(1); + Object.defineProperty(exports, "CommonUtility", { + enumerable: !0, + get: function() { + return common_1.CommonUtility; + } + }), Object.defineProperty(exports, "ClientResult", { + enumerable: !0, + get: function() { + return common_1.ClientResult; + } + }); + var batch_runtime_1 = __webpack_require__(4); + Object.defineProperty(exports, "ClientRequestContext", { + enumerable: !0, + get: function() { + return batch_runtime_1.ClientRequestContext; + } + }), Object.defineProperty(exports, "ClientObject", { + enumerable: !0, + get: function() { + return batch_runtime_1.ClientObject; + } + }), Object.defineProperty(exports, "config", { + enumerable: !0, + get: function() { + return batch_runtime_1.config; + } + }), Object.defineProperty(exports, "Constants", { + enumerable: !0, + get: function() { + return batch_runtime_1.Constants; + } + }), Object.defineProperty(exports, "ErrorCodes", { + enumerable: !0, + get: function() { + return batch_runtime_1.ErrorCodes; + } + }), Object.defineProperty(exports, "EventHandlers", { + enumerable: !0, + get: function() { + return batch_runtime_1.EventHandlers; + } + }), Object.defineProperty(exports, "GenericEventHandlers", { + enumerable: !0, + get: function() { + return batch_runtime_1.GenericEventHandlers; + } + }), Object.defineProperty(exports, "ResourceStrings", { + enumerable: !0, + get: function() { + return batch_runtime_1.ResourceStrings; + } + }), Object.defineProperty(exports, "Utility", { + enumerable: !0, + get: function() { + return batch_runtime_1.Utility; + } + }), Object.defineProperty(exports, "_internalConfig", { + enumerable: !0, + get: function() { + return batch_runtime_1._internalConfig; + } + }); + var BatchApiHelper = function() { + function BatchApiHelper() {} + return BatchApiHelper.invokeMethod = function(obj, methodName, operationType, args, flags, resultProcessType) { + var action = batch_runtime_1.ActionFactory.createMethodAction(obj.context, obj, methodName, operationType, args, flags), result = new common_1.ClientResult(resultProcessType); + return batch_runtime_1.Utility._addActionResultHandler(obj, action, result), result; + }, BatchApiHelper.invokeEnsureUnchanged = function(obj, objectState) { + batch_runtime_1.ActionFactory.createEnsureUnchangedAction(obj.context, obj, objectState); + }, BatchApiHelper.invokeSetProperty = function(obj, propName, propValue, flags) { + batch_runtime_1.ActionFactory.createSetPropertyAction(obj.context, obj, propName, propValue, flags); + }, BatchApiHelper.createRootServiceObject = function(type, context) { + return new type(context, batch_runtime_1.ObjectPathFactory.createGlobalObjectObjectPath(context)); + }, BatchApiHelper.createObjectFromReferenceId = function(type, context, referenceId) { + return new type(context, batch_runtime_1.ObjectPathFactory.createReferenceIdObjectPath(context, referenceId)); + }, BatchApiHelper.createTopLevelServiceObject = function(type, context, typeName, isCollection, flags) { + return new type(context, batch_runtime_1.ObjectPathFactory.createNewObjectObjectPath(context, typeName, isCollection, flags)); + }, BatchApiHelper.createPropertyObject = function(type, parent, propertyName, isCollection, flags) { + var objectPath = batch_runtime_1.ObjectPathFactory.createPropertyObjectPath(parent.context, parent, propertyName, isCollection, !1, flags); + return new type(parent.context, objectPath); + }, BatchApiHelper.createIndexerObject = function(type, parent, args) { + var objectPath = batch_runtime_1.ObjectPathFactory.createIndexerObjectPath(parent.context, parent, args); + return new type(parent.context, objectPath); + }, BatchApiHelper.createMethodObject = function(type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPath = batch_runtime_1.ObjectPathFactory.createMethodObjectPath(parent.context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags); + return new type(parent.context, objectPath); + }, BatchApiHelper.createChildItemObject = function(type, hasIndexerMethod, parent, chileItem, index) { + var objectPath = batch_runtime_1.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt(hasIndexerMethod, parent.context, parent, chileItem, index); + return new type(parent.context, objectPath); + }, BatchApiHelper; + }(); + exports.BatchApiHelper = BatchApiHelper; + var LibraryBuilder = function() { + function LibraryBuilder(options) { + if (this.m_namespaceMap = {}, this.m_namespace = options.metadata.name, this.m_targetNamespaceObject = options.targetNamespaceObject, + this.m_namespaceMap[this.m_namespace] = options.targetNamespaceObject, options.namespaceMap) for (var ns in options.namespaceMap) this.m_namespaceMap[ns] = options.namespaceMap[ns]; + this.m_defaultApiSetName = options.metadata.defaultApiSetName, this.m_hostName = options.metadata.hostName; + var metadata = options.metadata; + if (metadata.enumTypes) for (var i = 0; i < metadata.enumTypes.length; i++) this.buildEnumType(metadata.enumTypes[i]); + if (metadata.apiSets) { + for (i = 0; i < metadata.apiSets.length; i++) { + var elem = metadata.apiSets[i]; + Array.isArray(elem) && (metadata.apiSets[i] = { + version: elem[0], + name: elem[1] || this.m_defaultApiSetName + }); + } + this.m_apiSets = metadata.apiSets; + } + if (this.m_strings = metadata.strings, metadata.clientObjectTypes) for (i = 0; i < metadata.clientObjectTypes.length; i++) { + elem = metadata.clientObjectTypes[i]; + Array.isArray(elem) && (this.ensureArraySize(elem, 11), metadata.clientObjectTypes[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + collectionPropertyPath: this.getString(elem[6]), + newObjectServerTypeFullName: this.getString(elem[9]), + newObjectApiFlags: elem[10], + childItemTypeFullName: this.getString(elem[7]), + scalarProperties: elem[2], + navigationProperties: elem[3], + scalarMethods: elem[4], + navigationMethods: elem[5], + events: elem[8] + }), this.buildClientObjectType(metadata.clientObjectTypes[i], options.fullyInitialize); + } + } + return LibraryBuilder.prototype.ensureArraySize = function(value, size) { + for (var count = size - value.length; count > 0; ) value.push(0), count--; + }, LibraryBuilder.prototype.getString = function(ordinalOrValue) { + return "number" == typeof ordinalOrValue ? ordinalOrValue > 0 ? this.m_strings[ordinalOrValue - 1] : null : ordinalOrValue; + }, LibraryBuilder.prototype.buildEnumType = function(elem) { + var enumType; + if (Array.isArray(elem)) { + (enumType = { + name: elem[0], + fields: elem[2] + }).fields || (enumType.fields = {}); + var fieldsWithCamelUpperCaseValue = elem[1]; + if (Array.isArray(fieldsWithCamelUpperCaseValue)) for (var index = 0; index < fieldsWithCamelUpperCaseValue.length; index++) enumType.fields[fieldsWithCamelUpperCaseValue[index]] = this.toSimpleCamelUpperCase(fieldsWithCamelUpperCaseValue[index]); + } else enumType = elem; + this.m_targetNamespaceObject[enumType.name] = enumType.fields; + }, LibraryBuilder.prototype.buildClientObjectType = function(typeInfo, fullyInitialize) { + var thisBuilder = this, type = function(context, objectPath) { + batch_runtime_1.ClientObject.apply(this, arguments), thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited || (thisBuilder.buildPrototype(thisBuilder.m_targetNamespaceObject[typeInfo.name], typeInfo), + thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited = !0), batch_runtime_1._internalConfig.appendTypeNameToObjectPathInfo && this._objectPath && this._objectPath.objectPathInfo && this._className && (this._objectPath.objectPathInfo.T = this._className); + }; + (this.m_targetNamespaceObject[typeInfo.name] = type, this.extendsType(type, batch_runtime_1.ClientObject), + this.buildNewObject(type, typeInfo), 0 != (2 & typeInfo.behaviorFlags) && (type.prototype._KeepReference = function() { + BatchApiHelper.invokeMethod(this, "_KeepReference", 1, [], 0, 0); + }), 0 != (32 & typeInfo.behaviorFlags)) && this.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_StaticCustomize").call(null, type); + fullyInitialize && (this.buildPrototype(type, typeInfo), type._typeInited = !0); + }, LibraryBuilder.prototype.extendsType = function(d, b) { + function __() { + this.constructor = d; + } + d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __); + }, LibraryBuilder.prototype.findObjectUnderPath = function(top, paths, pathStartIndex) { + for (var obj = top, i = pathStartIndex; i < paths.length; i++) { + if ("object" != typeof obj) throw new core_1.Error("Cannot find " + paths.join(".")); + obj = obj[paths[i]]; + } + return obj; + }, LibraryBuilder.prototype.getFunction = function(fullName) { + var ret = this.resolveObjectByFullName(fullName); + if ("function" != typeof ret) throw new core_1.Error("Cannot find function or type: " + fullName); + return ret; + }, LibraryBuilder.prototype.resolveObjectByFullName = function(fullName) { + var parts = fullName.split("."); + if (1 === parts.length) return this.m_targetNamespaceObject[parts[0]]; + var rootName = parts[0]; + return rootName === this.m_namespace ? this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 1) : this.m_namespaceMap[rootName] ? this.findObjectUnderPath(this.m_namespaceMap[rootName], parts, 1) : this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 0); + }, LibraryBuilder.prototype.evaluateSimpleExpression = function(expression, thisObj) { + if (batch_runtime_1.Utility.isNullOrUndefined(expression)) return null; + var paths = expression.split("."); + if (3 === paths.length && "OfficeExtension" === paths[0] && "Constants" === paths[1]) return batch_runtime_1.Constants[paths[2]]; + if ("this" === paths[0]) { + for (var obj = thisObj, i = 1; i < paths.length; i++) obj = "toString()" == paths[i] ? obj.toString() : "()" === paths[i].substr(paths[i].length - 2) ? obj[paths[i].substr(0, paths[i].length - 2)]() : obj[paths[i]]; + return obj; + } + throw new core_1.Error("Cannot evaluate: " + expression); + }, LibraryBuilder.prototype.evaluateEventTargetId = function(targetIdExpression, thisObj) { + return batch_runtime_1.Utility.isNullOrEmptyString(targetIdExpression) ? "" : this.evaluateSimpleExpression(targetIdExpression, thisObj); + }, LibraryBuilder.prototype.isAllDigits = function(expression) { + for (var charZero = "0".charCodeAt(0), charNine = "9".charCodeAt(0), i = 0; i < expression.length; i++) if (expression.charCodeAt(i) < charZero || expression.charCodeAt(i) > charNine) return !1; + return !0; + }, LibraryBuilder.prototype.evaluateEventType = function(eventTypeExpression) { + if (batch_runtime_1.Utility.isNullOrEmptyString(eventTypeExpression)) return 0; + if (this.isAllDigits(eventTypeExpression)) return parseInt(eventTypeExpression); + var ret = this.resolveObjectByFullName(eventTypeExpression); + if ("number" != typeof ret) throw new core_1.Error("Invalid event type: " + eventTypeExpression); + return ret; + }, LibraryBuilder.prototype.buildPrototype = function(type, typeInfo) { + this.buildScalarProperties(type, typeInfo), this.buildNavigationProperties(type, typeInfo), + this.buildScalarMethods(type, typeInfo), this.buildNavigationMethods(type, typeInfo), + this.buildEvents(type, typeInfo), this.buildHandleResult(type, typeInfo), this.buildHandleIdResult(type, typeInfo), + this.buildHandleRetrieveResult(type, typeInfo), this.buildLoad(type, typeInfo), + this.buildRetrieve(type, typeInfo), this.buildSetMockData(type, typeInfo), this.buildEnsureUnchanged(type, typeInfo), + this.buildUpdate(type, typeInfo), this.buildSet(type, typeInfo), this.buildToJSON(type, typeInfo), + this.buildItems(type, typeInfo), this.buildTypeMetadataInfo(type, typeInfo), this.buildTrackUntrack(type, typeInfo), + this.buildMixin(type, typeInfo); + }, LibraryBuilder.prototype.toSimpleCamelUpperCase = function(name) { + return name.substr(0, 1).toUpperCase() + name.substr(1); + }, LibraryBuilder.prototype.ensureOriginalName = function(member) { + null === member.originalName && (member.originalName = this.toSimpleCamelUpperCase(member.name)); + }, LibraryBuilder.prototype.getFieldName = function(member) { + return "m_" + member.name; + }, LibraryBuilder.prototype.throwIfApiNotSupported = function(typeInfo, member) { + if (this.m_apiSets && member.apiSetInfoOrdinal > 0) { + var apiSetInfo = this.m_apiSets[member.apiSetInfoOrdinal - 1]; + apiSetInfo && batch_runtime_1.Utility.throwIfApiNotSupported(typeInfo.name + "." + member.name, apiSetInfo.name, apiSetInfo.version, this.m_hostName); + } + }, LibraryBuilder.prototype.buildScalarProperties = function(type, typeInfo) { + if (Array.isArray(typeInfo.scalarProperties)) for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var elem = typeInfo.scalarProperties[i]; + Array.isArray(elem) && (this.ensureArraySize(elem, 6), typeInfo.scalarProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + originalName: this.getString(elem[3]), + setMethodApiFlags: elem[4], + undoableApiSetInfoOrdinal: elem[5] + }), this.buildScalarProperty(type, typeInfo, typeInfo.scalarProperties[i]); + } + }, LibraryBuilder.prototype.calculateApiFlags = function(apiFlags, undoableApiSetInfoOrdinal) { + if (undoableApiSetInfoOrdinal > 0) { + var undoableApiSetInfo = this.m_apiSets[undoableApiSetInfoOrdinal - 1]; + undoableApiSetInfo && (apiFlags = common_1.CommonUtility.calculateApiFlags(apiFlags, undoableApiSetInfo.name, undoableApiSetInfo.version)); + } + return apiFlags; + }, LibraryBuilder.prototype.buildScalarProperty = function(type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this, fieldName = this.getFieldName(propInfo), descriptor = { + get: function() { + return batch_runtime_1.Utility.throwIfNotLoaded(propInfo.name, this[fieldName], typeInfo.name, this._isNull), + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo), this[fieldName]; + }, + enumerable: !0, + configurable: !0 + }; + 0 == (2 & propInfo.behaviorFlags) && (descriptor.set = function(value) { + if (4 & propInfo.behaviorFlags && thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set").call(this, this, value).handled) return; + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }), Object.defineProperty(type.prototype, propInfo.name, descriptor); + }, LibraryBuilder.prototype.buildNavigationProperties = function(type, typeInfo) { + if (Array.isArray(typeInfo.navigationProperties)) for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + var elem = typeInfo.navigationProperties[i]; + Array.isArray(elem) && (this.ensureArraySize(elem, 8), typeInfo.navigationProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[4]), + getMethodApiFlags: elem[5], + setMethodApiFlags: elem[6], + propertyTypeFullName: this.getString(elem[1]), + undoableApiSetInfoOrdinal: elem[7] + }), this.buildNavigationProperty(type, typeInfo, typeInfo.navigationProperties[i]); + } + }, LibraryBuilder.prototype.buildNavigationProperty = function(type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this, fieldName = this.getFieldName(propInfo), descriptor = { + get: function() { + (this[thisBuilder.getFieldName(propInfo)] || (thisBuilder.throwIfApiNotSupported(typeInfo, propInfo), + this[fieldName] = BatchApiHelper.createPropertyObject(thisBuilder.getFunction(propInfo.propertyTypeFullName), this, propInfo.originalName, 0 != (16 & propInfo.behaviorFlags), propInfo.getMethodApiFlags)), + 64 & propInfo.behaviorFlags) && thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Get").call(this, this, this[fieldName]); + return this[fieldName]; + }, + enumerable: !0, + configurable: !0 + }; + 0 == (2 & propInfo.behaviorFlags) && (descriptor.set = function(value) { + if (4 & propInfo.behaviorFlags && thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set").call(this, this, value).handled) return; + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }), Object.defineProperty(type.prototype, propInfo.name, descriptor); + }, LibraryBuilder.prototype.buildScalarMethods = function(type, typeInfo) { + if (Array.isArray(typeInfo.scalarMethods)) for (var i = 0; i < typeInfo.scalarMethods.length; i++) { + var elem = typeInfo.scalarMethods[i]; + Array.isArray(elem) && (this.ensureArraySize(elem, 7), typeInfo.scalarMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[5]), + apiFlags: elem[4], + parameterCount: elem[1], + undoableApiSetInfoOrdinal: elem[6] + }), this.buildScalarMethod(type, typeInfo, typeInfo.scalarMethods[i]); + } + }, LibraryBuilder.prototype.buildScalarMethod = function(type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function() { + var args = []; + if (64 & methodInfo.behaviorFlags && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) args.push(arguments[i]); + var rest = []; + for (i = methodInfo.parameterCount - 1; i < arguments.length; i++) rest.push(arguments[i]); + args.push(rest); + } else for (i = 0; i < arguments.length; i++) args.push(arguments[i]); + if (1 & methodInfo.behaviorFlags) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName), applyArgs = [ this ]; + for (i = 0; i < args.length; i++) applyArgs.push(args[i]); + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) return result; + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + var resultProcessType = 0; + 32 & methodInfo.behaviorFlags && (resultProcessType = 1); + var operationType = 0; + 2 & methodInfo.behaviorFlags && (operationType = 1); + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.invokeMethod(this, methodInfo.originalName, operationType, args, apiFlags, resultProcessType); + }; + }, LibraryBuilder.prototype.buildNavigationMethods = function(type, typeInfo) { + if (Array.isArray(typeInfo.navigationMethods)) for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + var elem = typeInfo.navigationMethods[i]; + Array.isArray(elem) && (this.ensureArraySize(elem, 9), typeInfo.navigationMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[3], + apiSetInfoOrdinal: elem[4], + originalName: this.getString(elem[6]), + apiFlags: elem[5], + parameterCount: elem[2], + returnTypeFullName: this.getString(elem[1]), + returnObjectGetByIdMethodName: this.getString(elem[7]), + undoableApiSetInfoOrdinal: elem[8] + }), this.buildNavigationMethod(type, typeInfo, typeInfo.navigationMethods[i]); + } + }, LibraryBuilder.prototype.buildNavigationMethod = function(type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function() { + var args = []; + if (64 & methodInfo.behaviorFlags && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) args.push(arguments[i]); + var rest = []; + for (i = methodInfo.parameterCount - 1; i < arguments.length; i++) rest.push(arguments[i]); + args.push(rest); + } else for (i = 0; i < arguments.length; i++) args.push(arguments[i]); + if (1 & methodInfo.behaviorFlags) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName), applyArgs = [ this ]; + for (i = 0; i < args.length; i++) applyArgs.push(args[i]); + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) return result; + } + if (thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo), 0 != (16 & methodInfo.behaviorFlags)) return BatchApiHelper.createIndexerObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, args); + var operationType = 0; + 2 & methodInfo.behaviorFlags && (operationType = 1); + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.createMethodObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, methodInfo.originalName, operationType, args, 0 != (4 & methodInfo.behaviorFlags), 0 != (8 & methodInfo.behaviorFlags), methodInfo.returnObjectGetByIdMethodName, apiFlags); + }; + }, LibraryBuilder.prototype.buildHandleResult = function(type, typeInfo) { + var thisBuilder = this; + type.prototype._handleResult = function(value) { + if (batch_runtime_1.ClientObject.prototype._handleResult.call(this, value), !batch_runtime_1.Utility.isNullOrUndefined(value)) { + if (batch_runtime_1.Utility.fixObjectPathIfNecessary(this, value), 8 & typeInfo.behaviorFlags) thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleResult").call(this, this, value); + if (typeInfo.scalarProperties) for (var i_1 = 0; i_1 < typeInfo.scalarProperties.length; i_1++) batch_runtime_1.Utility.isUndefined(value[typeInfo.scalarProperties[i_1].originalName]) || (0 != (8 & typeInfo.scalarProperties[i_1].behaviorFlags) ? this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_1])] = batch_runtime_1.Utility.adjustToDateTime(value[typeInfo.scalarProperties[i_1].originalName]) : this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_1])] = value[typeInfo.scalarProperties[i_1].originalName]); + if (typeInfo.navigationProperties) { + for (var propNames = [], i_2 = 0; i_2 < typeInfo.navigationProperties.length; i_2++) propNames.push(typeInfo.navigationProperties[i_2].name), + propNames.push(typeInfo.navigationProperties[i_2].originalName); + batch_runtime_1.Utility._handleNavigationPropertyResults(this, value, propNames); + } + if (0 != (1 & typeInfo.behaviorFlags)) { + var hasIndexerMethod = thisBuilder.hasIndexMethod(typeInfo); + if (!batch_runtime_1.Utility.isNullOrUndefined(value[batch_runtime_1.Constants.items])) { + this.m__items = []; + for (var _data = value[batch_runtime_1.Constants.items], childItemType = thisBuilder.getFunction(typeInfo.childItemTypeFullName), i = 0; i < _data.length; i++) { + var _item = BatchApiHelper.createChildItemObject(childItemType, hasIndexerMethod, this, _data[i], i); + _item._handleResult(_data[i]), this.m__items.push(_item); + } + } + } + } + }; + }, LibraryBuilder.prototype.buildHandleRetrieveResult = function(type, typeInfo) { + var thisBuilder = this; + type.prototype._handleRetrieveResult = function(value, result) { + if (batch_runtime_1.ClientObject.prototype._handleRetrieveResult.call(this, value, result), + !batch_runtime_1.Utility.isNullOrUndefined(value)) { + if (typeInfo.scalarProperties) for (var i = 0; i < typeInfo.scalarProperties.length; i++) 8 & typeInfo.scalarProperties[i].behaviorFlags && (batch_runtime_1.Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].name]) || (value[typeInfo.scalarProperties[i].name] = batch_runtime_1.Utility.adjustToDateTime(value[typeInfo.scalarProperties[i].name]))); + if (1 & typeInfo.behaviorFlags) { + var hasIndexerMethod_1 = thisBuilder.hasIndexMethod(typeInfo), childItemType_1 = thisBuilder.getFunction(typeInfo.childItemTypeFullName), thisObj_1 = this; + batch_runtime_1.Utility.processRetrieveResult(thisObj_1, value, result, (function(childItemData, index) { + return BatchApiHelper.createChildItemObject(childItemType_1, hasIndexerMethod_1, thisObj_1, childItemData, index); + })); + } else batch_runtime_1.Utility.processRetrieveResult(this, value, result); + } + }; + }, LibraryBuilder.prototype.buildHandleIdResult = function(type, typeInfo) { + var thisBuilder = this; + type.prototype._handleIdResult = function(value) { + if (batch_runtime_1.ClientObject.prototype._handleIdResult.call(this, value), !batch_runtime_1.Utility.isNullOrUndefined(value)) { + if (16 & typeInfo.behaviorFlags) thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleIdResult").call(this, this, value); + if (typeInfo.scalarProperties) for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var propName = typeInfo.scalarProperties[i].originalName; + "Id" !== propName && "_Id" !== propName && "_ReferenceId" !== propName || batch_runtime_1.Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].originalName]) || (this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])] = value[typeInfo.scalarProperties[i].originalName]); + } + } + }; + }, LibraryBuilder.prototype.buildLoad = function(type, typeInfo) { + type.prototype.load = function(options) { + return batch_runtime_1.Utility.load(this, options); + }; + }, LibraryBuilder.prototype.buildRetrieve = function(type, typeInfo) { + type.prototype.retrieve = function(options) { + return batch_runtime_1.Utility.retrieve(this, options); + }; + }, LibraryBuilder.prototype.buildNewObject = function(type, typeInfo) { + batch_runtime_1.Utility.isNullOrEmptyString(typeInfo.newObjectServerTypeFullName) || (type.newObject = function(context) { + return BatchApiHelper.createTopLevelServiceObject(type, context, typeInfo.newObjectServerTypeFullName, 0 != (1 & typeInfo.behaviorFlags), typeInfo.newObjectApiFlags); + }); + }, LibraryBuilder.prototype.buildSetMockData = function(type, typeInfo) { + var thisBuilder = this; + if (1 & typeInfo.behaviorFlags) { + var hasIndexMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + type.prototype.setMockData = function(data) { + var thisObj = this; + batch_runtime_1.Utility.setMockData(thisObj, data, (function(childItemData, index) { + return BatchApiHelper.createChildItemObject(thisBuilder.getFunction(typeInfo.childItemTypeFullName), hasIndexMethod_1, thisObj, childItemData, index); + }), (function(items) { + thisObj.m__items = items; + })); + }; + } else type.prototype.setMockData = function(data) { + batch_runtime_1.Utility.setMockData(this, data); + }; + }, LibraryBuilder.prototype.buildEnsureUnchanged = function(type, typeInfo) { + type.prototype.ensureUnchanged = function(data) { + BatchApiHelper.invokeEnsureUnchanged(this, data); + }; + }, LibraryBuilder.prototype.buildUpdate = function(type, typeInfo) { + type.prototype.update = function(properties) { + this._recursivelyUpdate(properties); + }; + }, LibraryBuilder.prototype.buildSet = function(type, typeInfo) { + if (0 == (1 & typeInfo.behaviorFlags)) { + var notAllowedToBeSetPropertyNames = [], allowedScalarPropertyNames = []; + if (typeInfo.scalarProperties) for (var i = 0; i < typeInfo.scalarProperties.length; i++) 0 == (2 & typeInfo.scalarProperties[i].behaviorFlags) && 0 != (1 & typeInfo.scalarProperties[i].behaviorFlags) ? allowedScalarPropertyNames.push(typeInfo.scalarProperties[i].name) : notAllowedToBeSetPropertyNames.push(typeInfo.scalarProperties[i].name); + var allowedNavigationPropertyNames = []; + if (typeInfo.navigationProperties) for (i = 0; i < typeInfo.navigationProperties.length; i++) 0 != (16 & typeInfo.navigationProperties[i].behaviorFlags) || 0 == (1 & typeInfo.navigationProperties[i].behaviorFlags) || 0 == (32 & typeInfo.navigationProperties[i].behaviorFlags) ? notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name) : allowedNavigationPropertyNames.push(typeInfo.navigationProperties[i].name); + 0 === allowedNavigationPropertyNames.length && 0 === allowedScalarPropertyNames.length || (type.prototype.set = function(properties, options) { + this._recursivelySet(properties, options, allowedScalarPropertyNames, allowedNavigationPropertyNames, notAllowedToBeSetPropertyNames); + }); + } + }, LibraryBuilder.prototype.buildItems = function(type, typeInfo) { + 0 != (1 & typeInfo.behaviorFlags) && Object.defineProperty(type.prototype, "items", { + get: function() { + return batch_runtime_1.Utility.throwIfNotLoaded("items", this.m__items, typeInfo.name, this._isNull), + this.m__items; + }, + enumerable: !0, + configurable: !0 + }); + }, LibraryBuilder.prototype.buildToJSON = function(type, typeInfo) { + var thisBuilder = this; + 0 == (1 & typeInfo.behaviorFlags) ? type.prototype.toJSON = function() { + var scalarProperties = {}; + if (typeInfo.scalarProperties) for (var i = 0; i < typeInfo.scalarProperties.length; i++) 0 != (1 & typeInfo.scalarProperties[i].behaviorFlags) && (scalarProperties[typeInfo.scalarProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])]); + var navProperties = {}; + if (typeInfo.navigationProperties) for (i = 0; i < typeInfo.navigationProperties.length; i++) 0 != (1 & typeInfo.navigationProperties[i].behaviorFlags) && (navProperties[typeInfo.navigationProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.navigationProperties[i])]); + return batch_runtime_1.Utility.toJson(this, scalarProperties, navProperties); + } : type.prototype.toJSON = function() { + return batch_runtime_1.Utility.toJson(this, {}, {}, this.m__items); + }; + }, LibraryBuilder.prototype.buildTypeMetadataInfo = function(type, typeInfo) { + Object.defineProperty(type.prototype, "_className", { + get: function() { + return typeInfo.name; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(type.prototype, "_isCollection", { + get: function() { + return 0 != (1 & typeInfo.behaviorFlags); + }, + enumerable: !0, + configurable: !0 + }), batch_runtime_1.Utility.isNullOrEmptyString(typeInfo.collectionPropertyPath) || Object.defineProperty(type.prototype, "_collectionPropertyPath", { + get: function() { + return typeInfo.collectionPropertyPath; + }, + enumerable: !0, + configurable: !0 + }), typeInfo.scalarProperties && typeInfo.scalarProperties.length > 0 && (Object.defineProperty(type.prototype, "_scalarPropertyNames", { + get: function() { + return this.m__scalarPropertyNames || (this.m__scalarPropertyNames = typeInfo.scalarProperties.map((function(p) { + return p.name; + }))), this.m__scalarPropertyNames; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(type.prototype, "_scalarPropertyOriginalNames", { + get: function() { + return this.m__scalarPropertyOriginalNames || (this.m__scalarPropertyOriginalNames = typeInfo.scalarProperties.map((function(p) { + return p.originalName; + }))), this.m__scalarPropertyOriginalNames; + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(type.prototype, "_scalarPropertyUpdateable", { + get: function() { + return this.m__scalarPropertyUpdateable || (this.m__scalarPropertyUpdateable = typeInfo.scalarProperties.map((function(p) { + return 0 == (2 & p.behaviorFlags); + }))), this.m__scalarPropertyUpdateable; + }, + enumerable: !0, + configurable: !0 + })), typeInfo.navigationProperties && typeInfo.navigationProperties.length > 0 && Object.defineProperty(type.prototype, "_navigationPropertyNames", { + get: function() { + return this.m__navigationPropertyNames || (this.m__navigationPropertyNames = typeInfo.navigationProperties.map((function(p) { + return p.name; + }))), this.m__navigationPropertyNames; + }, + enumerable: !0, + configurable: !0 + }); + }, LibraryBuilder.prototype.buildTrackUntrack = function(type, typeInfo) { + 2 & typeInfo.behaviorFlags && (type.prototype.track = function() { + return this.context.trackedObjects.add(this), this; + }, type.prototype.untrack = function() { + return this.context.trackedObjects.remove(this), this; + }); + }, LibraryBuilder.prototype.buildMixin = function(type, typeInfo) { + if (4 & typeInfo.behaviorFlags) { + var mixinType = this.getFunction(typeInfo.name + "Custom"); + batch_runtime_1.Utility.applyMixin(type, mixinType); + } + }, LibraryBuilder.prototype.getOnEventName = function(name) { + return "_" === name[0] ? "_on" + name.substr(1) : "on" + name; + }, LibraryBuilder.prototype.buildEvents = function(type, typeInfo) { + if (typeInfo.events) for (var i = 0; i < typeInfo.events.length; i++) { + var elem = typeInfo.events[i]; + Array.isArray(elem) && (this.ensureArraySize(elem, 7), typeInfo.events[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + typeExpression: this.getString(elem[3]), + targetIdExpression: this.getString(elem[4]), + register: this.getString(elem[5]), + unregister: this.getString(elem[6]) + }), this.buildEvent(type, typeInfo, typeInfo.events[i]); + } + }, LibraryBuilder.prototype.buildEvent = function(type, typeInfo, evt) { + 1 & evt.behaviorFlags ? this.buildV0Event(type, typeInfo, evt) : this.buildV2Event(type, typeInfo, evt); + }, LibraryBuilder.prototype.buildV2Event = function(type, typeInfo, evt) { + var thisBuilder = this, eventName = this.getOnEventName(evt.name), fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function() { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this, registerFunc = null; + "null" !== evt.register && (registerFunc = this[evt.register].bind(this)); + var unregisterFunc = null; + "null" !== evt.unregister && (unregisterFunc = this[evt.unregister].bind(this)); + var func = null; + 2 & evt.behaviorFlags && (func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform")); + var eventType = thisBuilder.evaluateEventType(evt.typeExpression); + this[fieldName] = new batch_runtime_1.GenericEventHandlers(this.context, this, evt.name, { + eventType: eventType, + getTargetIdFunc: function() { + return thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + }, + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: function(value) { + return func && (value = func.call(thisObj, thisObj, value)), batch_runtime_1.Utility._createPromiseFromResult(value); + } + }); + } + return this[fieldName]; + }, + enumerable: !0, + configurable: !0 + }); + }, LibraryBuilder.prototype.buildV0Event = function(type, typeInfo, evt) { + var thisBuilder = this, eventName = this.getOnEventName(evt.name), fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function() { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this, registerFunc = null; + if (batch_runtime_1.Utility.isNullOrEmptyString(evt.register)) { + var eventType_1 = thisBuilder.evaluateEventType(evt.typeExpression); + registerFunc = function(handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.register(eventType_1, targetId, handlerCallback); + }; + } else if ("null" !== evt.register) { + var func_1 = thisBuilder.getFunction(evt.register); + registerFunc = function(handlerCallback) { + return func_1.call(thisObj, thisObj, handlerCallback); + }; + } + var unregisterFunc = null; + if (batch_runtime_1.Utility.isNullOrEmptyString(evt.unregister)) { + var eventType_2 = thisBuilder.evaluateEventType(evt.typeExpression); + unregisterFunc = function(handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.unregister(eventType_2, targetId, handlerCallback); + }; + } else if ("null" !== evt.unregister) { + var func_2 = thisBuilder.getFunction(evt.unregister); + unregisterFunc = function(handlerCallback) { + return func_2.call(thisObj, thisObj, handlerCallback); + }; + } + var func = null; + 2 & evt.behaviorFlags && (func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform")); + this[fieldName] = new batch_runtime_1.EventHandlers(this.context, this, evt.name, { + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: function(value) { + return func && (value = func.call(thisObj, thisObj, value)), batch_runtime_1.Utility._createPromiseFromResult(value); + } + }); + } + return this[fieldName]; + }, + enumerable: !0, + configurable: !0 + }); + }, LibraryBuilder.prototype.hasIndexMethod = function(typeInfo) { + var ret = !1; + if (typeInfo.navigationMethods) for (var i = 0; i < typeInfo.navigationMethods.length; i++) if (0 != (16 & typeInfo.navigationMethods[i].behaviorFlags)) { + ret = !0; + break; + } + return ret; + }, LibraryBuilder.CustomizationCodeNamespace = "_CC", LibraryBuilder; + }(); + exports.LibraryBuilder = LibraryBuilder; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var OfficeExtensionBatch = __webpack_require__(2); + __webpack_require__(5), __webpack_require__(6), window.OfficeExtensionBatch = OfficeExtensionBatch, + "undefined" == typeof CustomFunctionMappings && (window.CustomFunctionMappings = {}), + "undefined" == typeof Promise && (window.Promise = Office.Promise), window.OfficeExtension = { + Promise: Promise, + Error: OfficeExtensionBatch.Error, + ErrorCodes: OfficeExtensionBatch.ErrorCodes, + FormattedNumber: OfficeExtensionBatch.FormattedNumber, + Entity: OfficeExtensionBatch.Entity, + WebImage: OfficeExtensionBatch.WebImage, + Attribution: OfficeExtensionBatch.Attribution, + Provider: OfficeExtensionBatch.Provider + }, (0, __webpack_require__(7).default)(!0); +}, function(module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function(d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function(d, b) { + if ("function" != typeof b && null !== b) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }), __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { + void 0 === k2 && (k2 = k); + var desc = Object.getOwnPropertyDescriptor(m, k); + desc && !("get" in desc ? !m.__esModule : desc.writable || desc.configurable) || (desc = { + enumerable: !0, + get: function() { + return m[k]; + } + }), Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + void 0 === k2 && (k2 = k), o[k2] = m[k]; + }), __exportStar = this && this.__exportStar || function(m, exports) { + for (var p in m) "default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p); + }; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Utility = exports.ResourceStrings = exports.TrackedObjects = exports.ObjectPathFactory = exports.GenericEventHandlers = exports._testTriggerRichApiMessageEvent = exports._testSetRichApiMessageReadyImpl = exports.GenericEventRegistration = exports.EventRegistration = exports._Internal = exports.EventHandlerResult = exports.EventHandlers = exports.ClientRequest = exports.Constants = exports.ClientRequestContext = exports.HostBridgeSession = exports.ClientObject = exports.ActionFactory = exports.ErrorCodes = void 0; + var Core = __webpack_require__(0), Common = __webpack_require__(1); + __exportStar(__webpack_require__(1), exports); + var ErrorCodes = function(_super) { + function ErrorCodes() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(ErrorCodes, _super), ErrorCodes.propertyNotLoaded = "PropertyNotLoaded", + ErrorCodes.runMustReturnPromise = "RunMustReturnPromise", ErrorCodes.cannotRegisterEvent = "CannotRegisterEvent", + ErrorCodes.invalidOrTimedOutSession = "InvalidOrTimedOutSession", ErrorCodes.cannotUpdateReadOnlyProperty = "CannotUpdateReadOnlyProperty", + ErrorCodes; + }(Core.CoreErrorCodes); + exports.ErrorCodes = ErrorCodes; + var TraceMarkerActionResultHandler = function() { + function TraceMarkerActionResultHandler(callback) { + this.m_callback = callback; + } + return TraceMarkerActionResultHandler.prototype._handleResult = function(value) { + this.m_callback && this.m_callback(); + }, TraceMarkerActionResultHandler; + }(), ActionFactory = function(_super) { + function ActionFactory() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(ActionFactory, _super), ActionFactory.createMethodAction = function(context, parent, methodName, operationType, args, flags) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }, referencedArgumentObjectPaths = Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var action = new Common.Action(actionInfo, operationType, Utility._fixupApiFlags(flags)); + return action.referencedObjectPath = parent._objectPath, action.referencedArgumentObjectPaths = referencedArgumentObjectPaths, + parent._addAction(action), action; + }, ActionFactory.createRecursiveQueryAction = function(context, parent, query) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 6, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + RecursiveQueryInfo: query + }, action = new Common.Action(actionInfo, 1, 4); + return action.referencedObjectPath = parent._objectPath, parent._addAction(action), + action; + }, ActionFactory.createEnsureUnchangedAction = function(context, parent, objectState) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }, action = new Common.Action(actionInfo, 1, 4); + return action.referencedObjectPath = parent._objectPath, parent._addAction(action), + action; + }, ActionFactory.createInstantiateAction = function(context, obj) { + Utility.validateObjectPath(obj), context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath), + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); + var actionInfo = { + Id: context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: obj._objectPath.objectPathInfo.Id + }, action = new Common.Action(actionInfo, 1, 4); + return action.referencedObjectPath = obj._objectPath, obj._addAction(action, new InstantiateActionResultHandler(obj), !0), + action; + }, ActionFactory.createTraceAction = function(context, message, addTraceMessage) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: "Trace", + ObjectPathId: 0 + }, ret = new Common.Action(actionInfo, 1, 4); + return context._pendingRequest.addAction(ret), addTraceMessage && context._pendingRequest.addTrace(actionInfo.Id, message), + ret; + }, ActionFactory.createTraceMarkerForCallback = function(context, callback) { + var action = ActionFactory.createTraceAction(context, null, !1); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }, ActionFactory; + }(Common.CommonActionFactory); + exports.ActionFactory = ActionFactory; + var ClientObject = function(_super) { + function ClientObject(context, objectPath) { + var _this = _super.call(this, context, objectPath) || this; + return Utility.checkArgumentNull(context, "context"), _this.m_context = context, + _this._objectPath && (!context._processingResult && context._pendingRequest && (ActionFactory.createInstantiateAction(context, _this), + context._autoCleanup && _this._KeepReference && context.trackedObjects._autoAdd(_this)), + Common._internalConfig.appendTypeNameToObjectPathInfo && _this._objectPath.objectPathInfo && _this._className && (_this._objectPath.objectPathInfo.T = _this._className)), + _this; + } + return __extends(ClientObject, _super), Object.defineProperty(ClientObject.prototype, "context", { + get: function() { + return this.m_context; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientObject.prototype, "isNull", { + get: function() { + return (void 0 !== this.m_isNull || !Core.TestUtility.isMock()) && (Utility.throwIfNotLoaded("isNull", this._isNull, null, this._isNull), + this._isNull); + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientObject.prototype, "isNullObject", { + get: function() { + return (void 0 !== this.m_isNull || !Core.TestUtility.isMock()) && (Utility.throwIfNotLoaded("isNullObject", this._isNull, null, this._isNull), + this._isNull); + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientObject.prototype, "_isNull", { + get: function() { + return this.m_isNull; + }, + set: function(value) { + this.m_isNull = value, value && this._objectPath && this._objectPath._updateAsNullObject(); + }, + enumerable: !1, + configurable: !0 + }), ClientObject.prototype._addAction = function(action, resultHandler, isInstantiationEnsured) { + return void 0 === resultHandler && (resultHandler = null), isInstantiationEnsured || (this.context._pendingRequest.ensureInstantiateObjectPath(this._objectPath), + this.context._pendingRequest.ensureInstantiateObjectPaths(action.referencedArgumentObjectPaths)), + this.context._pendingRequest.addAction(action), this.context._pendingRequest.addReferencedObjectPath(this._objectPath), + this.context._pendingRequest.addReferencedObjectPaths(action.referencedArgumentObjectPaths), + this.context._pendingRequest.addActionResultHandler(action, resultHandler), Core.CoreUtility._createPromiseFromResult(null); + }, ClientObject.prototype._handleResult = function(value) { + this._isNull = Utility.isNullOrUndefined(value), this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }, ClientObject.prototype._handleIdResult = function(value) { + this._isNull = Utility.isNullOrUndefined(value), Utility.fixObjectPathIfNecessary(this, value), + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }, ClientObject.prototype._handleRetrieveResult = function(value, result) { + this._handleIdResult(value); + }, ClientObject.prototype._recursivelySet = function(input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { + var isClientObject = input instanceof ClientObject, originalInput = input; + if (isClientObject) { + if (Object.getPrototypeOf(this) !== Object.getPrototypeOf(input)) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: "properties", + errorLocation: this._className + ".set" + }); + input = JSON.parse(JSON.stringify(input)); + } + try { + for (var prop, i = 0; i < scalarWriteablePropertyNames.length; i++) prop = scalarWriteablePropertyNames[i], + input.hasOwnProperty(prop) && void 0 !== input[prop] && (this[prop] = input[prop]); + for (i = 0; i < objectPropertyNames.length; i++) if (prop = objectPropertyNames[i], + input.hasOwnProperty(prop) && void 0 !== input[prop]) { + var dataToPassToSet = isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } + var throwOnReadOnly = !isClientObject; + options && !Utility.isNullOrUndefined(throwOnReadOnly) && (throwOnReadOnly = options.throwOnReadOnly); + for (i = 0; i < notAllowedToBeSetPropertyNames.length; i++) if (prop = notAllowedToBeSetPropertyNames[i], + input.hasOwnProperty(prop) && void 0 !== input[prop] && throwOnReadOnly) throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + for (prop in input) if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); + if (!propertyDescriptor) throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(Common.CommonResourceStrings.propertyDoesNotExist, prop), + debugInfo: { + errorLocation: prop + } + }); + if (throwOnReadOnly && !propertyDescriptor.set) throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(Common.CommonResourceStrings.attemptingToSetReadOnlyProperty, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } catch (innerError) { + throw new Core._Internal.RuntimeError({ + code: Core.CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(Core.CoreResourceStrings.invalidArgument, "properties"), + debugInfo: { + errorLocation: this._className + ".set" + }, + innerError: innerError + }); + } + }, ClientObject; + }(Common.ClientObjectBase); + exports.ClientObject = ClientObject; + var HostBridgeRequestExecutor = function() { + function HostBridgeRequestExecutor(session) { + this.m_session = session; + } + return HostBridgeRequestExecutor.prototype.executeAsync = function(customData, requestFlags, requestMessage) { + var httpRequestInfo = { + url: Core.CoreConstants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }, message = { + id: Core.HostBridge.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + return Core.CoreUtility.log(JSON.stringify(message)), this.m_session.sendMessageToHost(message).then((function(nativeBridgeResponse) { + Core.CoreUtility.log("Received response: " + JSON.stringify(nativeBridgeResponse)); + var response, responseInfo = nativeBridgeResponse.message; + if (200 === responseInfo.statusCode) response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: Core.CoreUtility._parseResponseBody(responseInfo) + }; else { + Core.CoreUtility.log("Error Response:" + responseInfo.body); + var error = Core.CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + })); + }, HostBridgeRequestExecutor; + }(), HostBridgeSession = function(_super) { + function HostBridgeSession(m_bridge) { + var _this = _super.call(this) || this; + return _this.m_bridge = m_bridge, _this.m_bridge.addHostMessageHandler((function(message) { + 3 === message.type && GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(message.message); + })), _this; + } + return __extends(HostBridgeSession, _super), HostBridgeSession.getInstanceIfHostBridgeInited = function() { + return Core.HostBridge.instance ? ((Core.CoreUtility.isNullOrUndefined(HostBridgeSession.s_instance) || HostBridgeSession.s_instance.m_bridge !== Core.HostBridge.instance) && (HostBridgeSession.s_instance = new HostBridgeSession(Core.HostBridge.instance)), + HostBridgeSession.s_instance) : null; + }, HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo = function() { + return Core.CoreUtility._createPromiseFromResult(null); + }, HostBridgeSession.prototype._createRequestExecutorOrNull = function() { + return Core.CoreUtility.log("NativeBridgeSession::CreateRequestExecutor"), new HostBridgeRequestExecutor(this); + }, Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function() { + return GenericEventRegistration.getGenericEventRegistration(); + }, + enumerable: !1, + configurable: !0 + }), HostBridgeSession.prototype.sendMessageToHost = function(message) { + return this.m_bridge.sendMessageToHostAndExpectResponse(message); + }, HostBridgeSession; + }(Core.SessionBase); + exports.HostBridgeSession = HostBridgeSession; + var ClientRequestContext = function(_super) { + function ClientRequestContext(url) { + var _this = _super.call(this) || this; + if (_this.m_customRequestHeaders = {}, _this.m_batchMode = 0, _this._onRunFinishedNotifiers = [], + Core.SessionBase._overrideSession) _this.m_requestUrlAndHeaderInfoResolver = Core.SessionBase._overrideSession; else if ((Utility.isNullOrUndefined(url) || "string" == typeof url && 0 === url.length) && ((url = ClientRequestContext.defaultRequestUrlAndHeaders) || (url = { + url: Core.CoreConstants.localDocument, + headers: {} + })), "string" == typeof url) _this.m_requestUrlAndHeaderInfo = { + url: url, + headers: {} + }; else if (ClientRequestContext.isRequestUrlAndHeaderInfoResolver(url)) _this.m_requestUrlAndHeaderInfoResolver = url; else { + if (!ClientRequestContext.isRequestUrlAndHeaderInfo(url)) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: "url" + }); + var requestInfo = url; + _this.m_requestUrlAndHeaderInfo = { + url: requestInfo.url, + headers: {} + }, Core.CoreUtility._copyHeaders(requestInfo.headers, _this.m_requestUrlAndHeaderInfo.headers); + } + return !_this.m_requestUrlAndHeaderInfoResolver && _this.m_requestUrlAndHeaderInfo && Core.CoreUtility._isLocalDocumentUrl(_this.m_requestUrlAndHeaderInfo.url) && HostBridgeSession.getInstanceIfHostBridgeInited() && (_this.m_requestUrlAndHeaderInfo = null, + _this.m_requestUrlAndHeaderInfoResolver = HostBridgeSession.getInstanceIfHostBridgeInited()), + _this.m_requestUrlAndHeaderInfoResolver instanceof Core.SessionBase && (_this.m_session = _this.m_requestUrlAndHeaderInfoResolver), + _this._processingResult = !1, _this._customData = Constants.iterativeExecutor, _this.sync = _this.sync.bind(_this), + _this; + } + return __extends(ClientRequestContext, _super), Object.defineProperty(ClientRequestContext.prototype, "session", { + get: function() { + return this.m_session; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientRequestContext.prototype, "eventRegistration", { + get: function() { + return this.m_session ? this.m_session.eventRegistration : _Internal.officeJsEventRegistration; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientRequestContext.prototype, "_url", { + get: function() { + return this.m_requestUrlAndHeaderInfo ? this.m_requestUrlAndHeaderInfo.url : null; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientRequestContext.prototype, "_pendingRequest", { + get: function() { + return null == this.m_pendingRequest && (this.m_pendingRequest = new ClientRequest(this)), + this.m_pendingRequest; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function() { + return { + pendingStatements: new RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, Common._internalConfig.showDisposeInfoInDebugInfo).process() + }; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { + get: function() { + return this.m_trackedObjects || (this.m_trackedObjects = new TrackedObjects(this)), + this.m_trackedObjects; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientRequestContext.prototype, "requestHeaders", { + get: function() { + return this.m_customRequestHeaders; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientRequestContext.prototype, "batchMode", { + get: function() { + return this.m_batchMode; + }, + enumerable: !1, + configurable: !0 + }), ClientRequestContext.prototype.ensureInProgressBatchIfBatchMode = function() { + if (1 === this.m_batchMode && !this.m_explicitBatchInProgress) throw Utility.createRuntimeError(Core.CoreErrorCodes.generalException, Core.CoreUtility._getResourceString(ResourceStrings.notInsideBatch), null); + }, ClientRequestContext.prototype.load = function(clientObj, option) { + Utility.validateContext(this, clientObj); + var queryOption = ClientRequestContext._parseQueryOption(option); + Common.CommonActionFactory.createQueryAction(this, clientObj, queryOption, clientObj); + }, ClientRequestContext.prototype.loadRecursive = function(clientObj, options, maxDepth) { + if (!Utility.isPlainJsonObject(options)) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: "options" + }); + var quries = {}; + for (var key in options) quries[key] = ClientRequestContext._parseQueryOption(options[key]); + var action = ActionFactory.createRecursiveQueryAction(this, clientObj, { + Queries: quries, + MaxDepth: maxDepth + }); + this._pendingRequest.addActionResultHandler(action, clientObj); + }, ClientRequestContext.prototype.trace = function(message) { + ActionFactory.createTraceAction(this, message, !0); + }, ClientRequestContext.prototype._processOfficeJsErrorResponse = function(officeJsErrorCode, response) {}, + ClientRequestContext.prototype.ensureRequestUrlAndHeaderInfo = function() { + var _this = this; + return Utility._createPromiseFromResult(null).then((function() { + if (!_this.m_requestUrlAndHeaderInfo) return _this.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then((function(value) { + if (_this.m_requestUrlAndHeaderInfo = value, _this.m_requestUrlAndHeaderInfo || (_this.m_requestUrlAndHeaderInfo = { + url: Core.CoreConstants.localDocument, + headers: {} + }), Utility.isNullOrEmptyString(_this.m_requestUrlAndHeaderInfo.url) && (_this.m_requestUrlAndHeaderInfo.url = Core.CoreConstants.localDocument), + _this.m_requestUrlAndHeaderInfo.headers || (_this.m_requestUrlAndHeaderInfo.headers = {}), + "function" == typeof _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull) { + var executor = _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull(); + executor && (_this._requestExecutor = executor); + } + })); + })); + }, ClientRequestContext.prototype.syncPrivateMain = function() { + var _this = this; + return this.ensureRequestUrlAndHeaderInfo().then((function() { + var req = _this._pendingRequest; + return _this.m_pendingRequest = null, _this.processPreSyncPromises(req).then((function() { + return _this.syncPrivate(req); + })); + })); + }, ClientRequestContext.prototype.syncPrivate = function(req) { + var _this = this; + if (Core.TestUtility.isMock()) return Core.CoreUtility._createPromiseFromResult(null); + if (!req.hasActions) return this.processPendingEventHandlers(req); + var _a = req.buildRequestMessageBodyAndRequestFlags(), msgBody = _a.body, requestFlags = _a.flags; + this._requestFlagModifier && (requestFlags |= this._requestFlagModifier), this._requestExecutor || (Core.CoreUtility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url) ? this._requestExecutor = new OfficeJsRequestExecutor(this) : this._requestExecutor = new Common.HttpRequestExecutor); + var requestExecutor = this._requestExecutor, headers = {}; + Core.CoreUtility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers), + Core.CoreUtility._copyHeaders(this.m_customRequestHeaders, headers), delete this.m_customRequestHeaders[Constants.officeScriptEventId]; + var requestExecutorRequestMessage = { + Url: this.m_requestUrlAndHeaderInfo.url, + Headers: headers, + Body: msgBody + }; + req.invalidatePendingInvalidObjectPaths(); + var errorFromResponse = null, errorFromProcessEventHandlers = null; + return this._lastSyncStart = "undefined" == typeof performance ? Date.now() : performance.now(), + this._lastRequestFlags = requestFlags, requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage).then((function(response) { + return _this._lastSyncEnd = "undefined" == typeof performance ? Date.now() : performance.now(), + Common.config.executePerfLogFunc && Common.config.executePerfLogFunc({ + syncStart: _this._lastSyncStart, + syncEnd: _this._lastSyncEnd + }), errorFromResponse = _this.processRequestExecutorResponseMessage(req, response), + _this.processPendingEventHandlers(req).catch((function(ex) { + Core.CoreUtility.log("Error in processPendingEventHandlers"), Core.CoreUtility.log(JSON.stringify(ex)), + errorFromProcessEventHandlers = ex; + })); + })).then((function() { + if (errorFromResponse) throw Core.CoreUtility.log("Throw error from response: " + JSON.stringify(errorFromResponse)), + errorFromResponse; + if (errorFromProcessEventHandlers) { + Core.CoreUtility.log("Throw error from ProcessEventHandler: " + JSON.stringify(errorFromProcessEventHandlers)); + var transformedError = null; + if (errorFromProcessEventHandlers instanceof Core._Internal.RuntimeError) (transformedError = errorFromProcessEventHandlers).traceMessages = req._responseTraceMessages; else { + var message = null; + message = "string" == typeof errorFromProcessEventHandlers ? errorFromProcessEventHandlers : errorFromProcessEventHandlers.message, + Utility.isNullOrEmptyString(message) && (message = Core.CoreUtility._getResourceString(ResourceStrings.cannotRegisterEvent)), + transformedError = new Core._Internal.RuntimeError({ + code: ErrorCodes.cannotRegisterEvent, + httpStatusCode: 400, + message: message, + traceMessages: req._responseTraceMessages + }); + } + throw transformedError; + } + })); + }, ClientRequestContext.prototype.processRequestExecutorResponseMessage = function(req, response) { + response.Body && response.Body.TraceIds && req._setResponseTraceIds(response.Body.TraceIds); + var traceMessages = req._responseTraceMessages, errorStatementInfo = null; + if (response.Body) { + if (response.Body.Error && response.Body.Error.ActionIndex >= 0) { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, !1, !0), debugInfoStatementInfo = prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + errorStatementInfo = { + statement: debugInfoStatementInfo.statement, + surroundingStatements: debugInfoStatementInfo.surroundingStatements, + fullStatements: [ "Please enable config.extendedErrorLogging to see full statements." ] + }, Common.config.extendedErrorLogging && (prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, !1, !1), + errorStatementInfo.fullStatements = prettyPrinter.process()); + } + var actionResults = null; + if (response.Body.Results ? actionResults = response.Body.Results : response.Body.ProcessedResults && response.Body.ProcessedResults.Results && (actionResults = response.Body.ProcessedResults.Results), + actionResults) { + this._processingResult = !0; + try { + req.processResponse(actionResults); + } finally { + this._processingResult = !1; + } + } + } + if (!Utility.isNullOrEmptyString(response.ErrorCode)) return new Core._Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage, + traceMessages: traceMessages + }); + if (response.Body && response.Body.Error) { + var debugInfo = { + errorLocation: response.Body.Error.Location + }; + return errorStatementInfo && (debugInfo.statement = errorStatementInfo.statement, + debugInfo.surroundingStatements = errorStatementInfo.surroundingStatements, debugInfo.fullStatements = errorStatementInfo.fullStatements), + new Core._Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message, + traceMessages: traceMessages, + debugInfo: debugInfo + }); + } + return null; + }, ClientRequestContext.prototype.processPendingEventHandlers = function(req) { + for (var ret = Utility._createPromiseFromResult(null), i = 0; i < req._pendingProcessEventHandlers.length; i++) { + var eventHandlers = req._pendingProcessEventHandlers[i]; + ret = ret.then(this.createProcessOneEventHandlersFunc(eventHandlers, req)); + } + return ret; + }, ClientRequestContext.prototype.createProcessOneEventHandlersFunc = function(eventHandlers, req) { + return function() { + return eventHandlers._processRegistration(req); + }; + }, ClientRequestContext.prototype.processPreSyncPromises = function(req) { + for (var ret = Utility._createPromiseFromResult(null), i = 0; i < req._preSyncPromises.length; i++) { + var p = req._preSyncPromises[i]; + ret = ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }, ClientRequestContext.prototype.createProcessOneProSyncFunc = function(p) { + return function() { + return p; + }; + }, ClientRequestContext.prototype.sync = function(passThroughValue) { + return Core.TestUtility.isMock() ? Core.CoreUtility._createPromiseFromResult(passThroughValue) : this.syncPrivateMain().then((function() { + return passThroughValue; + })); + }, ClientRequestContext.prototype.batch = function(batchBody) { + var _this = this; + if (1 !== this.m_batchMode) return Core.CoreUtility._createPromiseFromException(Utility.createRuntimeError(Core.CoreErrorCodes.generalException, null, null)); + if (this.m_explicitBatchInProgress) return Core.CoreUtility._createPromiseFromException(Utility.createRuntimeError(Core.CoreErrorCodes.generalException, Core.CoreUtility._getResourceString(ResourceStrings.pendingBatchInProgress), null)); + if (Utility.isNullOrUndefined(batchBody)) return Utility._createPromiseFromResult(null); + this.m_explicitBatchInProgress = !0; + var batchBodyResult, request, batchBodyResultPromise, previousRequest = this.m_pendingRequest; + this.m_pendingRequest = new ClientRequest(this); + try { + batchBodyResult = batchBody(this._rootObject, this); + } catch (ex) { + return this.m_explicitBatchInProgress = !1, this.m_pendingRequest = previousRequest, + Core.CoreUtility._createPromiseFromException(ex); + } + return "object" == typeof batchBodyResult && batchBodyResult && "function" == typeof batchBodyResult.then ? batchBodyResultPromise = Utility._createPromiseFromResult(null).then((function() { + return batchBodyResult; + })).then((function(result) { + return _this.m_explicitBatchInProgress = !1, request = _this.m_pendingRequest, _this.m_pendingRequest = previousRequest, + result; + })).catch((function(ex) { + return _this.m_explicitBatchInProgress = !1, request = _this.m_pendingRequest, _this.m_pendingRequest = previousRequest, + Core.CoreUtility._createPromiseFromException(ex); + })) : (this.m_explicitBatchInProgress = !1, request = this.m_pendingRequest, this.m_pendingRequest = previousRequest, + batchBodyResultPromise = Utility._createPromiseFromResult(batchBodyResult)), batchBodyResultPromise.then((function(result) { + return _this.ensureRequestUrlAndHeaderInfo().then((function() { + return _this.syncPrivate(request); + })).then((function() { + return result; + })); + })); + }, ClientRequestContext._run = function(ctxInitializer, runBody, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + return void 0 === numCleanupAttempts && (numCleanupAttempts = 3), void 0 === retryDelay && (retryDelay = 5e3), + ClientRequestContext._runCommon("run", null, ctxInitializer, 0, runBody, numCleanupAttempts, retryDelay, null, onCleanupSuccess, onCleanupFailure); + }, ClientRequestContext.isValidRequestInfo = function(value) { + return "string" == typeof value || ClientRequestContext.isRequestUrlAndHeaderInfo(value) || ClientRequestContext.isRequestUrlAndHeaderInfoResolver(value); + }, ClientRequestContext.isRequestUrlAndHeaderInfo = function(value) { + return "object" == typeof value && null !== value && Object.getPrototypeOf(value) === Object.getPrototypeOf({}) && !Utility.isNullOrUndefined(value.url); + }, ClientRequestContext.isRequestUrlAndHeaderInfoResolver = function(value) { + return "object" == typeof value && null !== value && "function" == typeof value._resolveRequestUrlAndHeaderInfo; + }, ClientRequestContext._runBatch = function(functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + return void 0 === numCleanupAttempts && (numCleanupAttempts = 3), void 0 === retryDelay && (retryDelay = 5e3), + ClientRequestContext._runBatchCommon(0, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }, ClientRequestContext._runExplicitBatch = function(functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + return void 0 === numCleanupAttempts && (numCleanupAttempts = 3), void 0 === retryDelay && (retryDelay = 5e3), + ClientRequestContext._runBatchCommon(1, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }, ClientRequestContext._runBatchCommon = function(batchMode, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + var ctxRetriever, batch; + void 0 === numCleanupAttempts && (numCleanupAttempts = 3), void 0 === retryDelay && (retryDelay = 5e3); + var requestInfo = null, previousObjects = null, argOffset = 0, options = null; + if (receivedRunArgs.length > 0) if (ClientRequestContext.isValidRequestInfo(receivedRunArgs[0])) requestInfo = receivedRunArgs[0], + argOffset = 1; else if (Utility.isPlainJsonObject(receivedRunArgs[0])) { + if (null != (requestInfo = (options = receivedRunArgs[0]).session) && !ClientRequestContext.isValidRequestInfo(requestInfo)) return ClientRequestContext.createErrorPromise(functionName); + previousObjects = options.previousObjects, argOffset = 1; + } + if (receivedRunArgs.length == argOffset + 1) batch = receivedRunArgs[argOffset + 0]; else { + if (null != options || receivedRunArgs.length != argOffset + 2) return ClientRequestContext.createErrorPromise(functionName); + previousObjects = receivedRunArgs[argOffset + 0], batch = receivedRunArgs[argOffset + 1]; + } + if (null != previousObjects) if (previousObjects instanceof ClientObject) ctxRetriever = function() { + return previousObjects.context; + }; else if (previousObjects instanceof ClientRequestContext) ctxRetriever = function() { + return previousObjects; + }; else { + if (!Array.isArray(previousObjects)) return ClientRequestContext.createErrorPromise(functionName); + var array = previousObjects; + if (0 == array.length) return ClientRequestContext.createErrorPromise(functionName); + for (var i = 0; i < array.length; i++) { + if (!(array[i] instanceof ClientObject)) return ClientRequestContext.createErrorPromise(functionName); + if (array[i].context != array[0].context) return ClientRequestContext.createErrorPromise(functionName, ResourceStrings.invalidRequestContext); + } + ctxRetriever = function() { + return array[0].context; + }; + } else ctxRetriever = ctxInitializer; + var onBeforeRunWithOptions = null; + return onBeforeRun && (onBeforeRunWithOptions = function(context) { + return onBeforeRun(options || {}, context); + }), ClientRequestContext._runCommon(functionName, requestInfo, ctxRetriever, batchMode, batch, numCleanupAttempts, retryDelay, onBeforeRunWithOptions, onCleanupSuccess, onCleanupFailure); + }, ClientRequestContext.createErrorPromise = function(functionName, code) { + return void 0 === code && (code = Core.CoreResourceStrings.invalidArgument), Core.CoreUtility._createPromiseFromException(Utility.createRuntimeError(code, Core.CoreUtility._getResourceString(code), functionName)); + }, ClientRequestContext._runCommon = function(functionName, requestInfo, ctxRetriever, batchMode, runBody, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + Core.SessionBase._overrideSession && (requestInfo = Core.SessionBase._overrideSession); + var ctx, resultOrError, previousBatchMode, starterPromise = Core.CoreUtility.createPromise((function(resolve, reject) { + resolve(); + })), succeeded = !1; + return starterPromise.then((function() { + if ((ctx = ctxRetriever(requestInfo))._autoCleanup) return new Promise((function(resolve, reject) { + ctx._onRunFinishedNotifiers.push((function() { + ctx._autoCleanup = !0, resolve(); + })); + })); + ctx._autoCleanup = !0; + })).then((function() { + return "function" != typeof runBody ? ClientRequestContext.createErrorPromise(functionName) : (previousBatchMode = ctx.m_batchMode, + ctx.m_batchMode = batchMode, onBeforeRun && onBeforeRun(ctx), runBodyResult = runBody(1 == batchMode ? ctx.batch.bind(ctx) : ctx), + (Utility.isNullOrUndefined(runBodyResult) || "function" != typeof runBodyResult.then) && Utility.throwError(ResourceStrings.runMustReturnPromise), + runBodyResult); + var runBodyResult; + })).then((function(runBodyResult) { + return 1 === batchMode ? runBodyResult : ctx.sync(runBodyResult); + })).then((function(result) { + succeeded = !0, resultOrError = result; + })).catch((function(error) { + resultOrError = error; + })).then((function() { + var itemsToRemove = ctx.trackedObjects._retrieveAndClearAutoCleanupList(); + for (var key in ctx._autoCleanup = !1, ctx.m_batchMode = previousBatchMode, itemsToRemove) itemsToRemove[key]._objectPath.isValid = !1; + var cleanupCounter = 0; + if (Utility._synchronousCleanup || ClientRequestContext.isRequestUrlAndHeaderInfoResolver(requestInfo)) return attemptCleanup(); + function attemptCleanup() { + cleanupCounter++; + var savedPendingRequest = ctx.m_pendingRequest, savedBatchMode = ctx.m_batchMode, request = new ClientRequest(ctx); + ctx.m_pendingRequest = request, ctx.m_batchMode = 0; + try { + for (var key in itemsToRemove) ctx.trackedObjects.remove(itemsToRemove[key]); + } finally { + ctx.m_batchMode = savedBatchMode, ctx.m_pendingRequest = savedPendingRequest; + } + return ctx.syncPrivate(request).then((function() { + onCleanupSuccess && onCleanupSuccess(cleanupCounter); + })).catch((function() { + onCleanupFailure && onCleanupFailure(cleanupCounter), cleanupCounter < numCleanupAttempts && setTimeout((function() { + attemptCleanup(); + }), retryDelay); + })); + } + attemptCleanup(); + })).then((function() { + ctx._onRunFinishedNotifiers && ctx._onRunFinishedNotifiers.length > 0 && ctx._onRunFinishedNotifiers.shift()(); + if (succeeded) return resultOrError; + throw resultOrError; + })); + }, ClientRequestContext; + }(Common.ClientRequestContextBase); + exports.ClientRequestContext = ClientRequestContext; + var RetrieveResultImpl = function() { + function RetrieveResultImpl(m_proxy, m_shouldPolyfill) { + this.m_proxy = m_proxy, this.m_shouldPolyfill = m_shouldPolyfill; + var scalarPropertyNames = m_proxy[Constants.scalarPropertyNames], navigationPropertyNames = m_proxy[Constants.navigationPropertyNames], typeName = m_proxy[Constants.className], isCollection = m_proxy[Constants.isCollection]; + if (scalarPropertyNames) for (var i = 0; i < scalarPropertyNames.length; i++) Utility.definePropertyThrowUnloadedException(this, typeName, scalarPropertyNames[i]); + if (navigationPropertyNames) for (i = 0; i < navigationPropertyNames.length; i++) Utility.definePropertyThrowUnloadedException(this, typeName, navigationPropertyNames[i]); + isCollection && Utility.definePropertyThrowUnloadedException(this, typeName, Constants.itemsLowerCase); + } + return Object.defineProperty(RetrieveResultImpl.prototype, "$proxy", { + get: function() { + return this.m_proxy; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(RetrieveResultImpl.prototype, "$isNullObject", { + get: function() { + if (!this.m_isLoaded) throw new Core._Internal.RuntimeError({ + code: ErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.$isNullObject" + } + }); + return this.m_isNullObject; + }, + enumerable: !1, + configurable: !0 + }), RetrieveResultImpl.prototype.toJSON = function() { + if (this.m_isLoaded) return this.m_isNullObject ? null : (Utility.isUndefined(this.m_json) && (this.m_json = Utility.purifyJson(this.m_value)), + this.m_json); + }, RetrieveResultImpl.prototype.toString = function() { + return JSON.stringify(this.toJSON()); + }, RetrieveResultImpl.prototype._handleResult = function(value) { + this.m_isLoaded = !0, null === value || "object" == typeof value && value && value._IsNull ? (this.m_isNullObject = !0, + value = null) : this.m_isNullObject = !1, this.m_shouldPolyfill && (value = Utility.changePropertyNameToCamelLowerCase(value)), + this.m_value = value, this.m_proxy._handleRetrieveResult(value, this); + }, RetrieveResultImpl; + }(), Constants = function(_super) { + function Constants() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(Constants, _super), Constants.getItemAt = "GetItemAt", Constants.index = "_Index", + Constants.iterativeExecutor = "IterativeExecutor", Constants.isTracked = "_IsTracked", + Constants.eventMessageCategory = 65536, Constants.eventWorkbookId = "Workbook", + Constants.eventSourceRemote = "Remote", Constants.proxy = "$proxy", Constants.className = "_className", + Constants.isCollection = "_isCollection", Constants.collectionPropertyPath = "_collectionPropertyPath", + Constants.objectPathInfoDoNotKeepReferenceFieldName = "D", Constants.officeScriptEventId = "X-OfficeScriptEventId", + Constants.officeScriptFireRecordingEvent = "X-OfficeScriptFireRecordingEvent", Constants; + }(Common.CommonConstants); + exports.Constants = Constants; + var ClientRequest = function(_super) { + function ClientRequest(context) { + var _this = _super.call(this, context) || this; + return _this.m_context = context, _this.m_pendingProcessEventHandlers = [], _this.m_pendingEventHandlerActions = {}, + _this.m_traceInfos = {}, _this.m_responseTraceIds = {}, _this.m_responseTraceMessages = [], + _this; + } + return __extends(ClientRequest, _super), Object.defineProperty(ClientRequest.prototype, "traceInfos", { + get: function() { + return this.m_traceInfos; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientRequest.prototype, "_responseTraceMessages", { + get: function() { + return this.m_responseTraceMessages; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(ClientRequest.prototype, "_responseTraceIds", { + get: function() { + return this.m_responseTraceIds; + }, + enumerable: !1, + configurable: !0 + }), ClientRequest.prototype._setResponseTraceIds = function(value) { + if (value) for (var i = 0; i < value.length; i++) { + var traceId = value[i]; + this.m_responseTraceIds[traceId] = traceId; + var message = this.m_traceInfos[traceId]; + Core.CoreUtility.isNullOrUndefined(message) || this.m_responseTraceMessages.push(message); + } + }, ClientRequest.prototype.addTrace = function(actionId, message) { + this.m_traceInfos[actionId] = message; + }, ClientRequest.prototype._addPendingEventHandlerAction = function(eventHandlers, action) { + this.m_pendingEventHandlerActions[eventHandlers._id] || (this.m_pendingEventHandlerActions[eventHandlers._id] = [], + this.m_pendingProcessEventHandlers.push(eventHandlers)), this.m_pendingEventHandlerActions[eventHandlers._id].push(action); + }, Object.defineProperty(ClientRequest.prototype, "_pendingProcessEventHandlers", { + get: function() { + return this.m_pendingProcessEventHandlers; + }, + enumerable: !1, + configurable: !0 + }), ClientRequest.prototype._getPendingEventHandlerActions = function(eventHandlers) { + return this.m_pendingEventHandlerActions[eventHandlers._id]; + }, ClientRequest; + }(Common.ClientRequestBase); + exports.ClientRequest = ClientRequest; + var EventHandlers = function() { + function EventHandlers(context, parentObject, name, eventInfo) { + var _this = this; + this.m_id = context._nextId(), this.m_context = context, this.m_name = name, this.m_handlers = [], + this.m_registered = !1, this.m_eventInfo = eventInfo, this.m_callback = function(args) { + _this.m_eventInfo.eventArgsTransformFunc(args).then((function(newArgs) { + return _this.fireEvent(newArgs); + })); + }; + } + return Object.defineProperty(EventHandlers.prototype, "_registered", { + get: function() { + return this.m_registered; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(EventHandlers.prototype, "_id", { + get: function() { + return this.m_id; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(EventHandlers.prototype, "_handlers", { + get: function() { + return this.m_handlers; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(EventHandlers.prototype, "_context", { + get: function() { + return this.m_context; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function() { + return this.m_callback; + }, + enumerable: !1, + configurable: !0 + }), EventHandlers.prototype.add = function(handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, !1); + return this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 0 + }), new EventHandlerResult(this.m_context, this, handler); + }, EventHandlers.prototype.remove = function(handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, !1); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 1 + }); + }, EventHandlers.prototype.removeAll = function() { + var action = ActionFactory.createTraceAction(this.m_context, null, !1); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: null, + operation: 2 + }); + }, EventHandlers.prototype._processRegistration = function(req) { + var _this = this, ret = Core.CoreUtility._createPromiseFromResult(null), actions = req._getPendingEventHandlerActions(this); + if (!actions) return ret; + for (var handlersResult = [], i = 0; i < this.m_handlers.length; i++) handlersResult.push(this.m_handlers[i]); + var hasChange = !1; + for (i = 0; i < actions.length; i++) if (req._responseTraceIds[actions[i].id]) switch (hasChange = !0, + actions[i].operation) { + case 0: + handlersResult.push(actions[i].handler); + break; + + case 1: + for (var index = handlersResult.length - 1; index >= 0; index--) if (handlersResult[index] === actions[i].handler) { + handlersResult.splice(index, 1); + break; + } + break; + + case 2: + handlersResult = []; + } + return hasChange && (!this.m_registered && handlersResult.length > 0 ? ret = ret.then((function() { + return _this.m_eventInfo.registerFunc(_this.m_callback); + })).then((function() { + return _this.m_registered = !0; + })) : this.m_registered && 0 == handlersResult.length && (ret = ret.then((function() { + return _this.m_eventInfo.unregisterFunc(_this.m_callback); + })).catch((function(ex) { + Core.CoreUtility.log("Error when unregister event: " + JSON.stringify(ex)); + })).then((function() { + return _this.m_registered = !1; + }))), ret = ret.then((function() { + return _this.m_handlers = handlersResult; + }))), ret; + }, EventHandlers.prototype.fireEvent = function(args) { + for (var promises = [], i = 0; i < this.m_handlers.length; i++) { + var handler = this.m_handlers[i], p = Core.CoreUtility._createPromiseFromResult(null).then(this.createFireOneEventHandlerFunc(handler, args)).catch((function(ex) { + Core.CoreUtility.log("Error when invoke handler: " + JSON.stringify(ex)); + })); + promises.push(p); + } + Core.CoreUtility.Promise.all(promises); + }, EventHandlers.prototype.createFireOneEventHandlerFunc = function(handler, args) { + return function() { + return handler(args); + }; + }, EventHandlers; + }(); + exports.EventHandlers = EventHandlers; + var _Internal, EventHandlerResult = function() { + function EventHandlerResult(context, handlers, handler) { + this.m_context = context, this.m_allHandlers = handlers, this.m_handler = handler; + } + return Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function() { + return this.m_context; + }, + enumerable: !1, + configurable: !0 + }), EventHandlerResult.prototype.remove = function() { + this.m_allHandlers && this.m_handler && (this.m_allHandlers.remove(this.m_handler), + this.m_allHandlers = null, this.m_handler = null); + }, EventHandlerResult; + }(); + exports.EventHandlerResult = EventHandlerResult, function(_Internal) { + var OfficeJsEventRegistration = function() { + function OfficeJsEventRegistration() {} + return OfficeJsEventRegistration.prototype.register = function(eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify((function(callback) { + return Office.context.document.bindings.getByIdAsync(targetId, callback); + })).then((function(officeBinding) { + return Utility.promisify((function(callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingDataChanged, handler, callback); + })); + })); + + case 3: + return Utility.promisify((function(callback) { + return Office.context.document.bindings.getByIdAsync(targetId, callback); + })).then((function(officeBinding) { + return Utility.promisify((function(callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingSelectionChanged, handler, callback); + })); + })); + + case 2: + return Utility.promisify((function(callback) { + return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); + })); + + case 1: + return Utility.promisify((function(callback) { + return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); + })); + + case 5: + return Utility.promisify((function(callback) { + return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); + })); + + case 13: + return Utility.promisify((function(callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { + id: targetId + }, callback); + })); + + case 14: + return Utility.promisify((function(callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { + id: targetId + }, callback); + })); + + case 15: + return Utility.promisify((function(callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { + id: targetId + }, callback); + })); + + case 16: + return Utility.promisify((function(callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { + id: targetId + }, callback); + })); + + default: + throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: "eventId" + }); + } + }, OfficeJsEventRegistration.prototype.unregister = function(eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify((function(callback) { + return Office.context.document.bindings.getByIdAsync(targetId, callback); + })).then((function(officeBinding) { + return Utility.promisify((function(callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingDataChanged, { + handler: handler + }, callback); + })); + })); + + case 3: + return Utility.promisify((function(callback) { + return Office.context.document.bindings.getByIdAsync(targetId, callback); + })).then((function(officeBinding) { + return Utility.promisify((function(callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingSelectionChanged, { + handler: handler + }, callback); + })); + })); + + case 2: + return Utility.promisify((function(callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { + handler: handler + }, callback); + })); + + case 1: + return Utility.promisify((function(callback) { + return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { + handler: handler + }, callback); + })); + + case 5: + return Utility.promisify((function(callback) { + return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { + handler: handler + }, callback); + })); + + case 13: + return Utility.promisify((function(callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { + id: targetId, + handler: handler + }, callback); + })); + + case 14: + return Utility.promisify((function(callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { + id: targetId, + handler: handler + }, callback); + })); + + case 15: + return Utility.promisify((function(callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { + id: targetId, + handler: handler + }, callback); + })); + + case 16: + return Utility.promisify((function(callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { + id: targetId, + handler: handler + }, callback); + })); + + default: + throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: "eventId" + }); + } + }, OfficeJsEventRegistration; + }(); + _Internal.officeJsEventRegistration = new OfficeJsEventRegistration; + }(_Internal = exports._Internal || (exports._Internal = {})); + var EventRegistration = function() { + function EventRegistration(registerEventImpl, unregisterEventImpl) { + this.m_handlersByEventByTarget = {}, this.m_registerEventImpl = registerEventImpl, + this.m_unregisterEventImpl = unregisterEventImpl; + } + return EventRegistration.getTargetIdOrDefault = function(targetId) { + return Utility.isNullOrUndefined(targetId) ? "" : targetId; + }, EventRegistration.prototype.getHandlers = function(eventId, targetId) { + targetId = EventRegistration.getTargetIdOrDefault(targetId); + var handlersById = this.m_handlersByEventByTarget[eventId]; + handlersById || (handlersById = {}, this.m_handlersByEventByTarget[eventId] = handlersById); + var handlers = handlersById[targetId]; + return handlers || (handlers = [], handlersById[targetId] = handlers), handlers; + }, EventRegistration.prototype.callHandlers = function(eventId, targetId, argument) { + for (var funcs = this.getHandlers(eventId, targetId), i = 0; i < funcs.length; i++) funcs[i](argument); + }, EventRegistration.prototype.hasHandlers = function(eventId, targetId) { + return this.getHandlers(eventId, targetId).length > 0; + }, EventRegistration.prototype.register = function(eventId, targetId, handler) { + if (!handler) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: "handler" + }); + var handlers = this.getHandlers(eventId, targetId); + return handlers.push(handler), 1 === handlers.length ? this.m_registerEventImpl(eventId, targetId) : Utility._createPromiseFromResult(null); + }, EventRegistration.prototype.unregister = function(eventId, targetId, handler) { + if (!handler) throw Core._Internal.RuntimeError._createInvalidArgError({ + argumentName: "handler" + }); + for (var handlers = this.getHandlers(eventId, targetId), index = handlers.length - 1; index >= 0; index--) if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + return 0 === handlers.length ? this.m_unregisterEventImpl(eventId, targetId) : Utility._createPromiseFromResult(null); + }, EventRegistration; + }(); + exports.EventRegistration = EventRegistration; + var GenericEventRegistration = function() { + function GenericEventRegistration() { + this.m_eventRegistration = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)), + this.m_richApiMessageHandler = this._handleRichApiMessage.bind(this); + } + return GenericEventRegistration.prototype.ready = function() { + var _this = this; + return this.m_ready || (GenericEventRegistration._testReadyImpl ? this.m_ready = GenericEventRegistration._testReadyImpl().then((function() { + _this.m_isReady = !0; + })) : Core.HostBridge.instance ? this.m_ready = Utility._createPromiseFromResult(null).then((function() { + _this.m_isReady = !0; + })) : this.m_ready = _Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler).then((function() { + _this.m_isReady = !0; + }))), this.m_ready; + }, Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function() { + return this.m_isReady; + }, + enumerable: !1, + configurable: !0 + }), GenericEventRegistration.prototype.register = function(eventId, targetId, handler) { + var _this = this; + return this.ready().then((function() { + return _this.m_eventRegistration.register(eventId, targetId, handler); + })); + }, GenericEventRegistration.prototype.unregister = function(eventId, targetId, handler) { + var _this = this; + return this.ready().then((function() { + return _this.m_eventRegistration.unregister(eventId, targetId, handler); + })); + }, GenericEventRegistration.prototype._registerEventImpl = function(eventId, targetId) { + return Utility._createPromiseFromResult(null); + }, GenericEventRegistration.prototype._unregisterEventImpl = function(eventId, targetId) { + return Utility._createPromiseFromResult(null); + }, GenericEventRegistration.prototype._handleRichApiMessage = function(msg) { + if (msg && msg.entries) for (var entryIndex = 0; entryIndex < msg.entries.length; entryIndex++) { + var entry = msg.entries[entryIndex]; + if (entry.messageCategory == Constants.eventMessageCategory) { + Core.CoreUtility._logEnabled && Core.CoreUtility.log(JSON.stringify(entry)); + var eventId = entry.messageType, targetId = entry.targetId; + if (this.m_eventRegistration.hasHandlers(eventId, targetId)) { + var arg = JSON.parse(entry.message); + entry.isRemoteOverride && (arg.source = Constants.eventSourceRemote), this.m_eventRegistration.callHandlers(eventId, targetId, arg); + } + } + } + }, GenericEventRegistration.getGenericEventRegistration = function() { + return GenericEventRegistration.s_genericEventRegistration || (GenericEventRegistration.s_genericEventRegistration = new GenericEventRegistration), + GenericEventRegistration.s_genericEventRegistration; + }, GenericEventRegistration.richApiMessageEventCategory = 65536, GenericEventRegistration; + }(); + exports.GenericEventRegistration = GenericEventRegistration, exports._testSetRichApiMessageReadyImpl = function(impl) { + GenericEventRegistration._testReadyImpl = impl; + }, exports._testTriggerRichApiMessageEvent = function(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + }; + var GenericEventHandlers = function(_super) { + function GenericEventHandlers(context, parentObject, name, eventInfo) { + var _this = _super.call(this, context, parentObject, name, eventInfo) || this; + return _this.m_genericEventInfo = eventInfo, _this; + } + return __extends(GenericEventHandlers, _super), GenericEventHandlers.prototype.add = function(handler) { + var _this = this; + return 0 == this._handlers.length && this.m_genericEventInfo.registerFunc && this.m_genericEventInfo.registerFunc(), + GenericEventRegistration.getGenericEventRegistration().isReady || this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()), + ActionFactory.createTraceMarkerForCallback(this._context, (function() { + _this._handlers.push(handler), 1 == _this._handlers.length && GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + })), new EventHandlerResult(this._context, this, handler); + }, GenericEventHandlers.prototype.remove = function(handler) { + var _this = this; + 1 == this._handlers.length && this.m_genericEventInfo.unregisterFunc && this.m_genericEventInfo.unregisterFunc(), + ActionFactory.createTraceMarkerForCallback(this._context, (function() { + for (var handlers = _this._handlers, index = handlers.length - 1; index >= 0; index--) if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + 0 == handlers.length && GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + })); + }, GenericEventHandlers.prototype.removeAll = function() {}, GenericEventHandlers; + }(EventHandlers); + exports.GenericEventHandlers = GenericEventHandlers; + var InstantiateActionResultHandler = function() { + function InstantiateActionResultHandler(clientObject) { + this.m_clientObject = clientObject; + } + return InstantiateActionResultHandler.prototype._handleResult = function(value) { + this.m_clientObject._handleIdResult(value); + }, InstantiateActionResultHandler; + }(), ObjectPathFactory = function() { + function ObjectPathFactory() {} + return ObjectPathFactory.createGlobalObjectObjectPath = function(context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: "" + }; + return new Common.ObjectPath(objectPathInfo, null, !1, !1, 1, 4); + }, ObjectPathFactory.createNewObjectObjectPath = function(context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + return new Common.ObjectPath(objectPathInfo, null, isCollection, !1, 1, Utility._fixupApiFlags(flags)); + }, ObjectPathFactory.createPropertyObjectPath = function(context, parent, propertyName, isCollection, isInvalidAfterRequest, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + return new Common.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, 1, Utility._fixupApiFlags(flags)); + }, ObjectPathFactory.createIndexerObjectPath = function(context, parent, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: "", + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + return objectPathInfo.ArgumentInfo.Arguments = args, new Common.ObjectPath(objectPathInfo, parent._objectPath, !1, !1, 1, 4); + }, ObjectPathFactory.createIndexerObjectPathUsingParentPath = function(context, parentObjectPath, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: "", + ParentObjectPathId: parentObjectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + return objectPathInfo.ArgumentInfo.Arguments = args, new Common.ObjectPath(objectPathInfo, parentObjectPath, !1, !1, 1, 4); + }, ObjectPathFactory.createMethodObjectPath = function(context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }, argumentObjectPaths = Utility.setMethodArguments(context, objectPathInfo.ArgumentInfo, args), ret = new Common.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, Utility._fixupApiFlags(flags)); + return ret.argumentObjectPaths = argumentObjectPaths, ret.getByIdMethodName = getByIdMethodName, + ret; + }, ObjectPathFactory.createReferenceIdObjectPath = function(context, referenceId) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + return new Common.ObjectPath(objectPathInfo, null, !1, !1, 1, 4); + }, ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt = function(hasIndexerMethod, context, parent, childItem, index) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + return hasIndexerMethod && !Utility.isNullOrUndefined(id) ? ObjectPathFactory.createChildItemObjectPathUsingIndexer(context, parent, childItem) : ObjectPathFactory.createChildItemObjectPathUsingGetItemAt(context, parent, childItem, index); + }, ObjectPathFactory.createChildItemObjectPathUsingIndexer = function(context, parent, childItem) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem), objectPathInfo = objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: "", + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + return objectPathInfo.ArgumentInfo.Arguments = [ id ], new Common.ObjectPath(objectPathInfo, parent._objectPath, !1, !1, 1, 4); + }, ObjectPathFactory.createChildItemObjectPathUsingGetItemAt = function(context, parent, childItem, index) { + var indexFromServer = childItem[Constants.index]; + indexFromServer && (index = indexFromServer); + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: Constants.getItemAt, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + return objectPathInfo.ArgumentInfo.Arguments = [ index ], new Common.ObjectPath(objectPathInfo, parent._objectPath, !1, !1, 1, 4); + }, ObjectPathFactory; + }(); + exports.ObjectPathFactory = ObjectPathFactory; + var OfficeJsRequestExecutor = function() { + function OfficeJsRequestExecutor(context) { + this.m_context = context; + } + return OfficeJsRequestExecutor.prototype.executeAsync = function(customData, requestFlags, requestMessage) { + var _this = this, messageSafearray = Core.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); + return new Promise((function(resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, (function(result) { + var response; + Core.CoreUtility.log("Response:"), Core.CoreUtility.log(JSON.stringify(result)), + "succeeded" == result.status ? response = Core.RichApiMessageUtility.buildResponseOnSuccess(Core.RichApiMessageUtility.getResponseBody(result), Core.RichApiMessageUtility.getResponseHeaders(result)) : (response = Core.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message), + _this.m_context._processOfficeJsErrorResponse(result.error.code, response)), resolve(response); + })); + })); + }, OfficeJsRequestExecutor.SourceLibHeaderValue = "officejs", OfficeJsRequestExecutor; + }(), TrackedObjects = function() { + function TrackedObjects(context) { + this._autoCleanupList = {}, this.m_context = context; + } + return TrackedObjects.prototype.add = function(param) { + var _this = this; + Array.isArray(param) ? param.forEach((function(item) { + return _this._addCommon(item, !0); + })) : this._addCommon(param, !0); + }, TrackedObjects.prototype._autoAdd = function(object) { + this._addCommon(object, !1), this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + }, TrackedObjects.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue = function(object, resultValue) { + this.m_context._autoCleanup && !object[Constants.isTracked] && object !== this.m_context._rootObject && resultValue && !Utility.isNullOrEmptyString(resultValue[Constants.referenceId]) && (this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object, + object[Constants.isTracked] = !0); + }, TrackedObjects.prototype._addCommon = function(object, isExplicitlyAdded) { + if (object[Constants.isTracked]) isExplicitlyAdded && this.m_context._autoCleanup && delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; else { + var referenceId = object[Constants.referenceId]; + if (object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName]) throw Utility.createRuntimeError(Core.CoreErrorCodes.generalException, Core.CoreUtility._getResourceString(ResourceStrings.objectIsUntracked), null); + Utility.isNullOrEmptyString(referenceId) && object._KeepReference && (object._KeepReference(), + ActionFactory.createInstantiateAction(this.m_context, object), isExplicitlyAdded && this.m_context._autoCleanup && delete this._autoCleanupList[object._objectPath.objectPathInfo.Id], + object[Constants.isTracked] = !0); + } + }, TrackedObjects.prototype.remove = function(param) { + var _this = this; + Array.isArray(param) ? param.forEach((function(item) { + return _this._removeCommon(item); + })) : this._removeCommon(param); + }, TrackedObjects.prototype._removeCommon = function(object) { + object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName] = !0, + object.context._pendingRequest._removeKeepReferenceAction(object._objectPath.objectPathInfo.Id); + var referenceId = object[Constants.referenceId]; + if (!Utility.isNullOrEmptyString(referenceId)) { + var rootObject = this.m_context._rootObject; + rootObject._RemoveReference && rootObject._RemoveReference(referenceId); + } + delete object[Constants.isTracked]; + }, TrackedObjects.prototype._retrieveAndClearAutoCleanupList = function() { + var list = this._autoCleanupList; + return this._autoCleanupList = {}, list; + }, TrackedObjects; + }(); + exports.TrackedObjects = TrackedObjects; + var RequestPrettyPrinter = function() { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose, removePII) { + globalObjName || (globalObjName = "root"), this.m_globalObjName = globalObjName, + this.m_referencedObjectPaths = referencedObjectPaths, this.m_actions = actions, + this.m_statements = [], this.m_variableNameForObjectPathMap = {}, this.m_variableNameToObjectPathMap = {}, + this.m_declaredObjectPathMap = {}, this.m_showDispose = showDispose, this.m_removePII = removePII; + } + return RequestPrettyPrinter.prototype.process = function() { + this.m_showDispose && ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + for (var i = 0; i < this.m_actions.length; i++) this.processOneAction(this.m_actions[i]); + return this.m_statements; + }, RequestPrettyPrinter.prototype.processForDebugStatementInfo = function(actionIndex) { + this.m_showDispose && ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + this.m_statements = []; + for (var statementIndex = -1, i = 0; i < this.m_actions.length && (this.processOneAction(this.m_actions[i]), + actionIndex == i && (statementIndex = this.m_statements.length - 1), !(statementIndex >= 0 && this.m_statements.length > statementIndex + 5 + 1)); i++) ; + if (statementIndex < 0) return null; + var startIndex = statementIndex - 5; + startIndex < 0 && (startIndex = 0); + var endIndex = statementIndex + 1 + 5; + endIndex > this.m_statements.length && (endIndex = this.m_statements.length); + var surroundingStatements = []; + 0 != startIndex && surroundingStatements.push("..."); + for (var i_1 = startIndex; i_1 < statementIndex; i_1++) surroundingStatements.push(this.m_statements[i_1]); + surroundingStatements.push("// >>>>>"), surroundingStatements.push(this.m_statements[statementIndex]), + surroundingStatements.push("// <<<<<"); + for (var i_2 = statementIndex + 1; i_2 < endIndex; i_2++) surroundingStatements.push(this.m_statements[i_2]); + return endIndex < this.m_statements.length && surroundingStatements.push("..."), + { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }, RequestPrettyPrinter.prototype.processOneAction = function(action) { + switch (action.actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + + case 3: + this.processMethodAction(action); + break; + + case 2: + this.processQueryAction(action); + break; + + case 7: + this.processQueryAsJsonAction(action); + break; + + case 6: + this.processRecursiveQueryAction(action); + break; + + case 4: + this.processSetPropertyAction(action); + break; + + case 5: + this.processTraceAction(action); + break; + + case 8: + this.processEnsureUnchangedAction(action); + break; + + case 9: + this.processUpdateAction(action); + } + }, RequestPrettyPrinter.prototype.processInstantiateAction = function(action) { + var objId = action.actionInfo.ObjectPathId, objPath = this.m_referencedObjectPaths[objId], varName = this.getObjVarName(objId); + if (this.m_declaredObjectPathMap[objId]) { + statement = "// Instantiate {" + varName + "}"; + statement = this.appendDisposeCommentIfRelevant(statement, action), this.m_statements.push(statement); + } else { + var statement = "var " + varName + " = " + this.buildObjectPathExpressionWithParent(objPath) + ";"; + statement = this.appendDisposeCommentIfRelevant(statement, action), this.m_statements.push(statement), + this.m_declaredObjectPathMap[objId] = varName; + } + }, RequestPrettyPrinter.prototype.processMethodAction = function(action) { + var methodName = action.actionInfo.Name; + if ("_KeepReference" === methodName) { + if (!Common._internalConfig.showInternalApiInDebugInfo) return; + methodName = "track"; + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + "." + Utility._toCamelLowerCase(methodName) + "(" + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + ");"; + statement = this.appendDisposeCommentIfRelevant(statement, action), this.m_statements.push(statement); + }, RequestPrettyPrinter.prototype.processQueryAction = function(action) { + var queryExp = this.buildQueryExpression(action), statement = this.getObjVarName(action.actionInfo.ObjectPathId) + ".load(" + queryExp + ");"; + statement = this.appendDisposeCommentIfRelevant(statement, action), this.m_statements.push(statement); + }, RequestPrettyPrinter.prototype.processQueryAsJsonAction = function(action) { + var queryExp = this.buildQueryExpression(action), statement = this.getObjVarName(action.actionInfo.ObjectPathId) + ".retrieve(" + queryExp + ");"; + statement = this.appendDisposeCommentIfRelevant(statement, action), this.m_statements.push(statement); + }, RequestPrettyPrinter.prototype.processRecursiveQueryAction = function(action) { + var queryExp = ""; + action.actionInfo.RecursiveQueryInfo && (queryExp = JSON.stringify(action.actionInfo.RecursiveQueryInfo)); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + ".loadRecursive(" + queryExp + ");"; + statement = this.appendDisposeCommentIfRelevant(statement, action), this.m_statements.push(statement); + }, RequestPrettyPrinter.prototype.processSetPropertyAction = function(action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + "." + Utility._toCamelLowerCase(action.actionInfo.Name) + " = " + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + ";"; + statement = this.appendDisposeCommentIfRelevant(statement, action), this.m_statements.push(statement); + }, RequestPrettyPrinter.prototype.processTraceAction = function(action) { + var statement = "context.trace();"; + statement = this.appendDisposeCommentIfRelevant(statement, action), this.m_statements.push(statement); + }, RequestPrettyPrinter.prototype.processEnsureUnchangedAction = function(action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + ".ensureUnchanged(" + JSON.stringify(action.actionInfo.ObjectState) + ");"; + statement = this.appendDisposeCommentIfRelevant(statement, action), this.m_statements.push(statement); + }, RequestPrettyPrinter.prototype.processUpdateAction = function(action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + ".update(" + JSON.stringify(action.actionInfo.ObjectState) + ");"; + statement = this.appendDisposeCommentIfRelevant(statement, action), this.m_statements.push(statement); + }, RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant = function(statement, action) { + var _this = this; + if (this.m_showDispose) { + var lastUsedObjectPathIds = action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) return statement + " // And then dispose {" + lastUsedObjectPathIds.map((function(item) { + return _this.getObjVarName(item); + })).join(", ") + "}"; + } + return statement; + }, RequestPrettyPrinter.prototype.buildQueryExpression = function(action) { + if (action.actionInfo.QueryInfo) { + var option = {}; + return option.select = action.actionInfo.QueryInfo.Select, option.expand = action.actionInfo.QueryInfo.Expand, + option.skip = action.actionInfo.QueryInfo.Skip, option.top = action.actionInfo.QueryInfo.Top, + void 0 === option.top && void 0 === option.skip && void 0 === option.expand ? void 0 === option.select ? "" : JSON.stringify(option.select) : JSON.stringify(option); + } + return ""; + }, RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent = function(objPath) { + return (5 == objPath.objectPathInfo.ObjectPathType || 3 == objPath.objectPathInfo.ObjectPathType || 4 == objPath.objectPathInfo.ObjectPathType) && objPath.objectPathInfo.ParentObjectPathId ? this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId) + "." + this.buildObjectPathExpression(objPath) : this.buildObjectPathExpression(objPath); + }, RequestPrettyPrinter.prototype.buildObjectPathExpression = function(objPath) { + var expr = this.buildObjectPathInfoExpression(objPath.objectPathInfo), originalObjectPathInfo = objPath.originalObjectPathInfo; + return originalObjectPathInfo && (expr = expr + " /* originally " + this.buildObjectPathInfoExpression(originalObjectPathInfo) + " */"), + expr; + }, RequestPrettyPrinter.prototype.buildObjectPathInfoExpression = function(objectPathInfo) { + switch (objectPathInfo.ObjectPathType) { + case 1: + return "context." + this.m_globalObjName; + + case 5: + return "getItem(" + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + ")"; + + case 3: + return Utility._toCamelLowerCase(objectPathInfo.Name) + "(" + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + ")"; + + case 2: + return objectPathInfo.Name + ".newObject()"; + + case 7: + return "null"; + + case 4: + return Utility._toCamelLowerCase(objectPathInfo.Name); + + case 6: + return "context." + this.m_globalObjName + "._getObjectByReferenceId(" + JSON.stringify(objectPathInfo.Name) + ")"; + } + }, RequestPrettyPrinter.prototype.buildArgumentsExpression = function(args) { + var ret = ""; + if (!args.Arguments || 0 === args.Arguments.length) return ret; + if (this.m_removePII) return void 0 === args.Arguments[0] ? ret : "..."; + for (var i = 0; i < args.Arguments.length; i++) i > 0 && (ret += ", "), ret += this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + return "undefined" === ret && (ret = ""), ret; + }, RequestPrettyPrinter.prototype.buildArgumentLiteral = function(value, objectPathId) { + return "number" == typeof value && value === objectPathId ? this.getObjVarName(objectPathId) : JSON.stringify(value); + }, RequestPrettyPrinter.prototype.getObjVarNameBase = function(objectPathId) { + var ret = "v", objPath = this.m_referencedObjectPaths[objectPathId]; + if (objPath) switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret = this.m_globalObjName; + break; + + case 4: + ret = Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + + case 3: + var methodName = objPath.objectPathInfo.Name; + methodName.length > 3 && "Get" === methodName.substr(0, 3) && (methodName = methodName.substr(3)), + ret = Utility._toCamelLowerCase(methodName); + break; + + case 5: + var parentName = this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + ret = "s" === parentName.charAt(parentName.length - 1) ? parentName.substr(0, parentName.length - 1) : parentName + "Item"; + } + return ret; + }, RequestPrettyPrinter.prototype.getObjVarName = function(objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) return this.m_variableNameForObjectPathMap[objectPathId]; + var ret = this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) return this.m_variableNameForObjectPathMap[objectPathId] = ret, + this.m_variableNameToObjectPathMap[ret] = objectPathId, ret; + for (var i = 1; this.m_variableNameToObjectPathMap[ret + i.toString()]; ) i++; + return ret += i.toString(), this.m_variableNameForObjectPathMap[objectPathId] = ret, + this.m_variableNameToObjectPathMap[ret] = objectPathId, ret; + }, RequestPrettyPrinter; + }(), ResourceStrings = function(_super) { + function ResourceStrings() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(ResourceStrings, _super), ResourceStrings.cannotRegisterEvent = "CannotRegisterEvent", + ResourceStrings.connectionFailureWithStatus = "ConnectionFailureWithStatus", ResourceStrings.connectionFailureWithDetails = "ConnectionFailureWithDetails", + ResourceStrings.propertyNotLoaded = "PropertyNotLoaded", ResourceStrings.runMustReturnPromise = "RunMustReturnPromise", + ResourceStrings.moreInfoInnerError = "MoreInfoInnerError", ResourceStrings.cannotApplyPropertyThroughSetMethod = "CannotApplyPropertyThroughSetMethod", + ResourceStrings.invalidOperationInCellEditMode = "InvalidOperationInCellEditMode", + ResourceStrings.objectIsUntracked = "ObjectIsUntracked", ResourceStrings.customFunctionDefintionMissing = "CustomFunctionDefintionMissing", + ResourceStrings.customFunctionImplementationMissing = "CustomFunctionImplementationMissing", + ResourceStrings.customFunctionNameContainsBadChars = "CustomFunctionNameContainsBadChars", + ResourceStrings.customFunctionNameCannotSplit = "CustomFunctionNameCannotSplit", + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch = "CustomFunctionUnexpectedNumberOfEntriesInResultBatch", + ResourceStrings.customFunctionCancellationHandlerMissing = "CustomFunctionCancellationHandlerMissing", + ResourceStrings.customFunctionInvalidFunction = "CustomFunctionInvalidFunction", + ResourceStrings.customFunctionInvalidFunctionMapping = "CustomFunctionInvalidFunctionMapping", + ResourceStrings.customFunctionWindowMissing = "CustomFunctionWindowMissing", ResourceStrings.customFunctionDefintionMissingOnWindow = "CustomFunctionDefintionMissingOnWindow", + ResourceStrings.pendingBatchInProgress = "PendingBatchInProgress", ResourceStrings.notInsideBatch = "NotInsideBatch", + ResourceStrings.cannotUpdateReadOnlyProperty = "CannotUpdateReadOnlyProperty", ResourceStrings; + }(Common.CommonResourceStrings); + exports.ResourceStrings = ResourceStrings, Core.CoreUtility.addResourceStringValues({ + CannotRegisterEvent: "The event handler cannot be registered.", + PropertyNotLoaded: "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.", + RunMustReturnPromise: 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".', + InvalidOrTimedOutSessionMessage: "Your Office Online session has expired or is invalid. To continue, refresh the page.", + InvalidOperationInCellEditMode: "Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.", + CustomFunctionDefintionMissing: "A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.", + CustomFunctionDefintionMissingOnWindow: "A property with the name '{0}' that represents the function's definition must exist on the window object.", + CustomFunctionImplementationMissing: "The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.", + CustomFunctionNameContainsBadChars: "The function name may only contain letters, digits, underscores, and periods.", + CustomFunctionNameCannotSplit: "The function name must contain a non-empty namespace and a non-empty short name.", + CustomFunctionUnexpectedNumberOfEntriesInResultBatch: "The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.", + CustomFunctionCancellationHandlerMissing: "The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.", + CustomFunctionInvalidFunction: "The property with the name '{0}' that represents the function's definition is not a valid function.", + CustomFunctionInvalidFunctionMapping: "The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.", + CustomFunctionWindowMissing: "The window object was not found.", + PendingBatchInProgress: "There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.", + NotInsideBatch: "Operations may not be invoked outside of a batch method.", + CannotUpdateReadOnlyProperty: "The property '{0}' is read-only and it cannot be updated.", + ObjectIsUntracked: "The object is untracked." + }); + var Utility = function(_super) { + function Utility() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(Utility, _super), Utility.fixObjectPathIfNecessary = function(clientObject, value) { + clientObject && clientObject._objectPath && value && clientObject._objectPath.updateUsingObjectData(value, clientObject); + }, Utility.load = function(clientObj, option) { + return clientObj.context.load(clientObj, option), clientObj; + }, Utility.loadAndSync = function(clientObj, option) { + return clientObj.context.load(clientObj, option), clientObj.context.sync().then((function() { + return clientObj; + })); + }, Utility.retrieve = function(clientObj, option) { + var shouldPolyfill = Common._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + shouldPolyfill || (shouldPolyfill = !Utility.isSetSupported("RichApiRuntime", "1.1")); + var result = new RetrieveResultImpl(clientObj, shouldPolyfill); + return clientObj._retrieve(option, result), result; + }, Utility.retrieveAndSync = function(clientObj, option) { + var result = Utility.retrieve(clientObj, option); + return clientObj.context.sync().then((function() { + return result; + })); + }, Utility.toJson = function(clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result = {}; + for (var prop in scalarProperties) { + void 0 !== (value = scalarProperties[prop]) && (result[prop] = value); + } + for (var prop in navigationProperties) { + var value; + void 0 !== (value = navigationProperties[prop]) && (value[Utility.fieldName_isCollection] && void 0 !== value[Utility.fieldName_m__items] ? result[prop] = value.toJSON().items : result[prop] = value.toJSON()); + } + return collectionItemsIfAny && (result.items = collectionItemsIfAny.map((function(item) { + return item.toJSON(); + }))), result; + }, Utility.throwError = function(resourceId, arg, errorLocation) { + throw new Core._Internal.RuntimeError({ + code: resourceId, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(resourceId, arg), + debugInfo: errorLocation ? { + errorLocation: errorLocation + } : void 0 + }); + }, Utility.createRuntimeError = function(code, message, location, httpStatusCode, data) { + return new Core._Internal.RuntimeError({ + code: code, + httpStatusCode: httpStatusCode, + message: message, + debugInfo: { + errorLocation: location + }, + data: data + }); + }, Utility.throwIfNotLoaded = function(propertyName, fieldValue, entityName, isNull) { + if (!isNull && Core.CoreUtility.isUndefined(fieldValue) && propertyName.charCodeAt(0) != Utility.s_underscoreCharCode) throw Utility.createPropertyNotLoadedException(entityName, propertyName); + }, Utility.createPropertyNotLoadedException = function(entityName, propertyName) { + return new Core._Internal.RuntimeError({ + code: ErrorCodes.propertyNotLoaded, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(ResourceStrings.propertyNotLoaded, propertyName), + debugInfo: entityName ? { + errorLocation: entityName + "." + propertyName + } : void 0 + }); + }, Utility.createCannotUpdateReadOnlyPropertyException = function(entityName, propertyName) { + return new Core._Internal.RuntimeError({ + code: ErrorCodes.cannotUpdateReadOnlyProperty, + httpStatusCode: 400, + message: Core.CoreUtility._getResourceString(ResourceStrings.cannotUpdateReadOnlyProperty, propertyName), + debugInfo: entityName ? { + errorLocation: entityName + "." + propertyName + } : void 0 + }); + }, Utility.promisify = function(action) { + return new Promise((function(resolve, reject) { + action((function(result) { + "failed" == result.status ? reject(result.error) : resolve(result.value); + })); + })); + }, Utility._addActionResultHandler = function(clientObj, action, resultHandler) { + clientObj.context._pendingRequest.addActionResultHandler(action, resultHandler); + }, Utility._handleNavigationPropertyResults = function(clientObj, objectValue, propertyNames) { + for (var i = 0; i < propertyNames.length - 1; i += 2) Core.CoreUtility.isUndefined(objectValue[propertyNames[i + 1]]) || clientObj[propertyNames[i]]._handleResult(objectValue[propertyNames[i + 1]]); + }, Utility._fixupApiFlags = function(flags) { + return "boolean" == typeof flags && (flags = flags ? 1 : 0), flags; + }, Utility.definePropertyThrowUnloadedException = function(obj, typeName, propertyName) { + Object.defineProperty(obj, propertyName, { + configurable: !0, + enumerable: !0, + get: function() { + throw Utility.createPropertyNotLoadedException(typeName, propertyName); + }, + set: function() { + throw Utility.createCannotUpdateReadOnlyPropertyException(typeName, propertyName); + } + }); + }, Utility.defineReadOnlyPropertyWithValue = function(obj, propertyName, value) { + Object.defineProperty(obj, propertyName, { + configurable: !0, + enumerable: !0, + get: function() { + return value; + }, + set: function() { + throw Utility.createCannotUpdateReadOnlyPropertyException(null, propertyName); + } + }); + }, Utility.processRetrieveResult = function(proxy, value, result, childItemCreateFunc) { + if (!Core.CoreUtility.isNullOrUndefined(value)) if (childItemCreateFunc) { + var data = value[Constants.itemsLowerCase]; + if (Array.isArray(data)) { + for (var itemsResult = [], i = 0; i < data.length; i++) { + var itemProxy = childItemCreateFunc(data[i], i), itemResult = {}; + itemResult[Constants.proxy] = itemProxy, itemProxy._handleRetrieveResult(data[i], itemResult), + itemsResult.push(itemResult); + } + Utility.defineReadOnlyPropertyWithValue(result, Constants.itemsLowerCase, itemsResult); + } + } else { + var scalarPropertyNames = proxy[Constants.scalarPropertyNames], navigationPropertyNames = proxy[Constants.navigationPropertyNames], typeName = proxy[Constants.className]; + if (scalarPropertyNames) for (i = 0; i < scalarPropertyNames.length; i++) { + var propValue = value[propName = scalarPropertyNames[i]]; + Core.CoreUtility.isUndefined(propValue) ? Utility.definePropertyThrowUnloadedException(result, typeName, propName) : Utility.defineReadOnlyPropertyWithValue(result, propName, propValue); + } + if (navigationPropertyNames) for (i = 0; i < navigationPropertyNames.length; i++) { + var propName; + propValue = value[propName = navigationPropertyNames[i]]; + if (Core.CoreUtility.isUndefined(propValue)) Utility.definePropertyThrowUnloadedException(result, typeName, propName); else { + var propProxy = proxy[propName], propResult = {}; + propProxy._handleRetrieveResult(propValue, propResult), propResult[Constants.proxy] = propProxy, + Array.isArray(propResult[Constants.itemsLowerCase]) && (propResult = propResult[Constants.itemsLowerCase]), + Utility.defineReadOnlyPropertyWithValue(result, propName, propResult); + } + } + } + }, Utility.setMockData = function(clientObj, value, childItemCreateFunc, setItemsFunc) { + if (Core.CoreUtility.isNullOrUndefined(value)) clientObj._handleResult(value); else { + if (clientObj[Constants.scalarPropertyOriginalNames]) { + for (var result = {}, scalarPropertyOriginalNames = clientObj[Constants.scalarPropertyOriginalNames], scalarPropertyNames = clientObj[Constants.scalarPropertyNames], i = 0; i < scalarPropertyNames.length; i++) void 0 !== value[scalarPropertyNames[i]] && (result[scalarPropertyOriginalNames[i]] = value[scalarPropertyNames[i]]); + clientObj._handleResult(result); + } + if (clientObj[Constants.navigationPropertyNames]) { + var navigationPropertyNames = clientObj[Constants.navigationPropertyNames]; + for (i = 0; i < navigationPropertyNames.length; i++) if (void 0 !== value[navigationPropertyNames[i]]) { + var navigationPropValue = clientObj[navigationPropertyNames[i]]; + navigationPropValue.setMockData && navigationPropValue.setMockData(value[navigationPropertyNames[i]]); + } + } + if (clientObj[Constants.isCollection] && childItemCreateFunc) { + var itemsData = Array.isArray(value) ? value : value[Constants.itemsLowerCase]; + if (Array.isArray(itemsData)) { + var items = []; + for (i = 0; i < itemsData.length; i++) { + var item = childItemCreateFunc(itemsData, i); + Utility.setMockData(item, itemsData[i]), items.push(item); + } + setItemsFunc(items); + } + } + } + }, Utility.applyMixin = function(derived, base) { + Object.getOwnPropertyNames(base.prototype).forEach((function(name) { + "constructor" !== name && Object.defineProperty(derived.prototype, name, Object.getOwnPropertyDescriptor(base.prototype, name)); + })); + }, Utility.fieldName_m__items = "m__items", Utility.fieldName_isCollection = "_isCollection", + Utility._synchronousCleanup = !1, Utility.s_underscoreCharCode = "_".charCodeAt(0), + Utility; + }(Common.CommonUtility); + exports.Utility = Utility; +}, function(module, exports) { + var wrap, __assign = this && this.__assign || function() { + return (__assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) for (var p in s = arguments[i]) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]); + return t; + }).apply(this, arguments); + }; + function getOfficeRuntimeImplementation(info) { + return window[info.platform === Office.PlatformType.OfficeOnline ? "_OfficeRuntimeWeb" : "_OfficeRuntimeNative"]; + } + function getWrapMethod(property) { + return function(name) { + return function(property, method) { + return wrapMethod((function(impl) { + return impl[property][method]; + })); + }(property, name); + }; + } + function wrapMethod(methodFetcher) { + return function() { + var _this = this, args = arguments; + return Office.onReady().then((function(info) { + return methodFetcher(getOfficeRuntimeImplementation(info)).apply(_this, args); + })); + }; + } + Office.onReady((function(info) { + window.OfficeRuntime = __assign(__assign({}, window.OfficeRuntime), getOfficeRuntimeImplementation(info)); + })), window.OfficeRuntime = { + AsyncStorage: function() { + return { + getItem: wrapStorageMethod("getItem"), + setItem: wrapStorageMethod("setItem"), + removeItem: wrapStorageMethod("removeItem"), + getAllKeys: wrapStorageMethod("getAllKeys"), + multiSet: wrapStorageMethod("multiSet"), + multiRemove: wrapStorageMethod("multiRemove"), + multiGet: wrapStorageMethod("multiGet") + }; + function wrapStorageMethod(methodName) { + return wrapMethod((function(impl) { + return impl.storage[methodName]; + })); + } + }(), + displayWebDialog: wrapMethod((function(impl) { + return impl.displayWebDialog; + })), + storage: function() { + return { + getItem: wrapStorageMethod("getItem"), + setItem: wrapStorageMethod("setItem"), + removeItem: wrapStorageMethod("removeItem"), + getKeys: wrapStorageMethod("getKeys"), + setItems: wrapStorageMethod("setItems"), + removeItems: wrapStorageMethod("removeItems"), + getItems: wrapStorageMethod("getItems") + }; + function wrapStorageMethod(methodName) { + return wrapMethod((function(impl) { + return impl.storage[methodName]; + })); + } + }(), + experimentation: function() { + return { + getBooleanFeatureGateAsync: wrapExperimentationMethod("getBooleanFeatureGateAsync"), + getIntFeatureGateAsync: wrapExperimentationMethod("getIntFeatureGateAsync"), + getStringFeatureGateAsync: wrapExperimentationMethod("getStringFeatureGateAsync") + }; + function wrapExperimentationMethod(methodName) { + return wrapMethod((function(impl) { + return impl.experimentation[methodName]; + })); + } + }(), + apiInformation: { + isSetSupported: function(capability, semVer) { + return Office.context.requirements.isSetSupported(capability, Number(semVer)); + } + }, + message: (wrap = getWrapMethod("message"), { + on: wrap("on"), + off: wrap("off"), + emit: wrap("emit") + }), + auth: { + getAccessToken: getWrapMethod("auth")("getAccessToken") + }, + ui: { + getRibbon: getWrapMethod("ui")("getRibbon") + } + }; +}, function(module, exports) { + !function(self) { + "use strict"; + if (!self.fetch) { + var support_searchParams = "URLSearchParams" in self, support_iterable = "Symbol" in self && "iterator" in Symbol, support_blob = "FileReader" in self && "Blob" in self && function() { + try { + return new Blob, !0; + } catch (e) { + return !1; + } + }(), support_formData = "FormData" in self, support_arrayBuffer = "ArrayBuffer" in self; + if (support_arrayBuffer) var viewClasses = [ "[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]" ], isDataView = function(obj) { + return obj && DataView.prototype.isPrototypeOf(obj); + }, isArrayBufferView = ArrayBuffer.isView || function(obj) { + return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1; + }; + Headers.prototype.append = function(name, value) { + name = normalizeName(name), value = normalizeValue(value); + var oldValue = this.map[name]; + this.map[name] = oldValue ? oldValue + "," + value : value; + }, Headers.prototype.delete = function(name) { + delete this.map[normalizeName(name)]; + }, Headers.prototype.get = function(name) { + return name = normalizeName(name), this.has(name) ? this.map[name] : null; + }, Headers.prototype.has = function(name) { + return this.map.hasOwnProperty(normalizeName(name)); + }, Headers.prototype.set = function(name, value) { + this.map[normalizeName(name)] = normalizeValue(value); + }, Headers.prototype.forEach = function(callback, thisArg) { + for (var name in this.map) this.map.hasOwnProperty(name) && callback.call(thisArg, this.map[name], name, this); + }, Headers.prototype.keys = function() { + var items = []; + return this.forEach((function(value, name) { + items.push(name); + })), iteratorFor(items); + }, Headers.prototype.values = function() { + var items = []; + return this.forEach((function(value) { + items.push(value); + })), iteratorFor(items); + }, Headers.prototype.entries = function() { + var items = []; + return this.forEach((function(value, name) { + items.push([ name, value ]); + })), iteratorFor(items); + }, support_iterable && (Headers.prototype[Symbol.iterator] = Headers.prototype.entries); + var methods = [ "DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT" ]; + Request.prototype.clone = function() { + return new Request(this, { + body: this._bodyInit + }); + }, Body.call(Request.prototype), Body.call(Response.prototype), Response.prototype.clone = function() { + return new Response(this._bodyInit, { + status: this.status, + statusText: this.statusText, + headers: new Headers(this.headers), + url: this.url + }); + }, Response.error = function() { + var response = new Response(null, { + status: 0, + statusText: "" + }); + return response.type = "error", response; + }; + var redirectStatuses = [ 301, 302, 303, 307, 308 ]; + Response.redirect = function(url, status) { + if (-1 === redirectStatuses.indexOf(status)) throw new RangeError("Invalid status code"); + return new Response(null, { + status: status, + headers: { + location: url + } + }); + }, self.Headers = Headers, self.Request = Request, self.Response = Response, self.fetch = function(input, init) { + return new Promise((function(resolve, reject) { + var request = new Request(input, init), xhr = new XMLHttpRequest; + xhr.onload = function() { + var rawHeaders, headers, options = { + status: xhr.status, + statusText: xhr.statusText, + headers: (rawHeaders = xhr.getAllResponseHeaders() || "", headers = new Headers, + rawHeaders.split(/\r?\n/).forEach((function(line) { + var parts = line.split(":"), key = parts.shift().trim(); + if (key) { + var value = parts.join(":").trim(); + headers.append(key, value); + } + })), headers) + }; + options.url = "responseURL" in xhr ? xhr.responseURL : options.headers.get("X-Request-URL"); + var body = "response" in xhr ? xhr.response : xhr.responseText; + resolve(new Response(body, options)); + }, xhr.onerror = function() { + reject(new TypeError("Network request failed")); + }, xhr.ontimeout = function() { + reject(new TypeError("Network request failed")); + }, xhr.open(request.method, request.url, !0), "include" === request.credentials && (xhr.withCredentials = !0), + "responseType" in xhr && support_blob && (xhr.responseType = "blob"), request.headers.forEach((function(value, name) { + xhr.setRequestHeader(name, value); + })), xhr.send(void 0 === request._bodyInit ? null : request._bodyInit); + })); + }, self.fetch.polyfill = !0; + } + function normalizeName(name) { + if ("string" != typeof name && (name = String(name)), /[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) throw new TypeError("Invalid character in header field name"); + return name.toLowerCase(); + } + function normalizeValue(value) { + return "string" != typeof value && (value = String(value)), value; + } + function iteratorFor(items) { + var iterator = { + next: function() { + var value = items.shift(); + return { + done: void 0 === value, + value: value + }; + } + }; + return support_iterable && (iterator[Symbol.iterator] = function() { + return iterator; + }), iterator; + } + function Headers(headers) { + this.map = {}, headers instanceof Headers ? headers.forEach((function(value, name) { + this.append(name, value); + }), this) : Array.isArray(headers) ? headers.forEach((function(header) { + this.append(header[0], header[1]); + }), this) : headers && Object.getOwnPropertyNames(headers).forEach((function(name) { + this.append(name, headers[name]); + }), this); + } + function consumed(body) { + if (body.bodyUsed) return Promise.reject(new TypeError("Already read")); + body.bodyUsed = !0; + } + function fileReaderReady(reader) { + return new Promise((function(resolve, reject) { + reader.onload = function() { + resolve(reader.result); + }, reader.onerror = function() { + reject(reader.error); + }; + })); + } + function readBlobAsArrayBuffer(blob) { + var reader = new FileReader, promise = fileReaderReady(reader); + return reader.readAsArrayBuffer(blob), promise; + } + function bufferClone(buf) { + if (buf.slice) return buf.slice(0); + var view = new Uint8Array(buf.byteLength); + return view.set(new Uint8Array(buf)), view.buffer; + } + function Body() { + return this.bodyUsed = !1, this._initBody = function(body) { + if (this._bodyInit = body, body) if ("string" == typeof body) this._bodyText = body; else if (support_blob && Blob.prototype.isPrototypeOf(body)) this._bodyBlob = body; else if (support_formData && FormData.prototype.isPrototypeOf(body)) this._bodyFormData = body; else if (support_searchParams && URLSearchParams.prototype.isPrototypeOf(body)) this._bodyText = body.toString(); else if (support_arrayBuffer && support_blob && isDataView(body)) this._bodyArrayBuffer = bufferClone(body.buffer), + this._bodyInit = new Blob([ this._bodyArrayBuffer ]); else { + if (!support_arrayBuffer || !ArrayBuffer.prototype.isPrototypeOf(body) && !isArrayBufferView(body)) throw new Error("unsupported BodyInit type"); + this._bodyArrayBuffer = bufferClone(body); + } else this._bodyText = ""; + this.headers.get("content-type") || ("string" == typeof body ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : support_searchParams && URLSearchParams.prototype.isPrototypeOf(body) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8")); + }, support_blob && (this.blob = function() { + var rejected = consumed(this); + if (rejected) return rejected; + if (this._bodyBlob) return Promise.resolve(this._bodyBlob); + if (this._bodyArrayBuffer) return Promise.resolve(new Blob([ this._bodyArrayBuffer ])); + if (this._bodyFormData) throw new Error("could not read FormData body as blob"); + return Promise.resolve(new Blob([ this._bodyText ])); + }, this.arrayBuffer = function() { + return this._bodyArrayBuffer ? consumed(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(readBlobAsArrayBuffer); + }), this.text = function() { + var blob, reader, promise, rejected = consumed(this); + if (rejected) return rejected; + if (this._bodyBlob) return blob = this._bodyBlob, reader = new FileReader, promise = fileReaderReady(reader), + reader.readAsText(blob), promise; + if (this._bodyArrayBuffer) return Promise.resolve(function(buf) { + for (var view = new Uint8Array(buf), chars = new Array(view.length), i = 0; i < view.length; i++) chars[i] = String.fromCharCode(view[i]); + return chars.join(""); + }(this._bodyArrayBuffer)); + if (this._bodyFormData) throw new Error("could not read FormData body as text"); + return Promise.resolve(this._bodyText); + }, support_formData && (this.formData = function() { + return this.text().then(decode); + }), this.json = function() { + return this.text().then(JSON.parse); + }, this; + } + function Request(input, options) { + var method, upcased, body = (options = options || {}).body; + if (input instanceof Request) { + if (input.bodyUsed) throw new TypeError("Already read"); + this.url = input.url, this.credentials = input.credentials, options.headers || (this.headers = new Headers(input.headers)), + this.method = input.method, this.mode = input.mode, body || null == input._bodyInit || (body = input._bodyInit, + input.bodyUsed = !0); + } else this.url = String(input); + if (this.credentials = options.credentials || this.credentials || "omit", !options.headers && this.headers || (this.headers = new Headers(options.headers)), + this.method = (method = options.method || this.method || "GET", upcased = method.toUpperCase(), + methods.indexOf(upcased) > -1 ? upcased : method), this.mode = options.mode || this.mode || null, + this.referrer = null, ("GET" === this.method || "HEAD" === this.method) && body) throw new TypeError("Body not allowed for GET or HEAD requests"); + this._initBody(body); + } + function decode(body) { + var form = new FormData; + return body.trim().split("&").forEach((function(bytes) { + if (bytes) { + var split = bytes.split("="), name = split.shift().replace(/\+/g, " "), value = split.join("=").replace(/\+/g, " "); + form.append(decodeURIComponent(name), decodeURIComponent(value)); + } + })), form; + } + function Response(bodyInit, options) { + options || (options = {}), this.type = "default", this.status = "status" in options ? options.status : 200, + this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in options ? options.statusText : "OK", + this.headers = new Headers(options.headers), this.url = options.url || "", this._initBody(bodyInit); + } + }("undefined" != typeof self ? self : this); +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var CFRuntime = __webpack_require__(8); + exports.default = function(shouldInitRuntime) { + function documentReadyCallback() { + Office.onReady((function(hostInfo) { + hostInfo.host === Office.HostType.Excel ? function initializeCustomFunctionsOrDelay() { + CustomFunctionMappings && CustomFunctionMappings.__delay__ ? setTimeout(initializeCustomFunctionsOrDelay, 50) : CFRuntime.CustomFunctions.initialize(); + }() : console.warn("Warning: Expected to be loaded inside of an Excel add-in."); + })); + } + window.CustomFunctions = window.CustomFunctions || {}, window.CustomFunctions.setCustomFunctionInvoker = CFRuntime.setCustomFunctionInvoker, + window.CustomFunctions.Error = CFRuntime.CustomFunctionError, window.CustomFunctions.ErrorCode = CFRuntime.ErrorCode, + window.CustomFunctions.FormattedNumber = CFRuntime.CustomFunctionFormattedNumber, + window.CustomFunctions.Entity = CFRuntime.CustomFunctionEntity, window.CustomFunctions.WebImage = CFRuntime.CustomFunctionWebImage, + window.CustomFunctions.Attribution = CFRuntime.CustomFunctionAttribution, window.CustomFunctions.Provider = CFRuntime.CustomFunctionProvider, + CFRuntime.setCustomFunctionAssociation(window.CustomFunctions._association), shouldInitRuntime && ("loading" === document.readyState ? document.addEventListener("DOMContentLoaded", documentReadyCallback) : documentReadyCallback()); + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function(d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function(d, b) { + if ("function" != typeof b && null !== b) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }); + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.CustomFunctionsContainer = exports.CustomFunctions = exports.setCustomFunctionInvoker = exports.setCustomFunctionAssociation = exports.customFunctionProxy = exports.CustomFunctionProxy = exports.CreateCustomFunctionInstance = exports.CustomFunctionProvider = exports.CustomFunctionAttribution = exports.CustomFunctionWebImage = exports.CustomFunctionFormattedNumber = exports.CustomFunctionEntity = exports.CustomFunctionError = exports.ErrorCode = exports.InvocationContext = exports.Script = void 0; + var OfficeExtension = __webpack_require__(2), Core = __webpack_require__(0), _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject, _createRootServiceObject = (OfficeExtension.BatchApiHelper.createMethodObject, + OfficeExtension.BatchApiHelper.createIndexerObject, OfficeExtension.BatchApiHelper.createRootServiceObject), _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject, _invokeMethod = (OfficeExtension.BatchApiHelper.createChildItemObject, + OfficeExtension.BatchApiHelper.invokeMethod), _isNullOrUndefined = (OfficeExtension.BatchApiHelper.invokeEnsureUnchanged, + OfficeExtension.BatchApiHelper.invokeSetProperty, OfficeExtension.Utility.isNullOrUndefined), _throwIfApiNotSupported = (OfficeExtension.Utility.isUndefined, + OfficeExtension.Utility.throwIfNotLoaded, OfficeExtension.Utility.throwIfApiNotSupported), _load = OfficeExtension.Utility.load, _toJson = (OfficeExtension.Utility.retrieve, + OfficeExtension.Utility.toJson), _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary, _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults, _processRetrieveResult = (OfficeExtension.Utility.adjustToDateTime, + OfficeExtension.Utility.processRetrieveResult), CustomFunctionRequestContext = (OfficeExtension.Utility.setMockData, + OfficeExtension.CommonUtility.calculateApiFlags, function(_super) { + function CustomFunctionRequestContext(requestInfo) { + var _this = _super.call(this, requestInfo) || this; + return _this.m_customFunctions = CustomFunctions.newObject(_this), _this.m_container = _createRootServiceObject(CustomFunctionsContainer, _this), + _this._rootObject = _this.m_container, _this._rootObjectPropertyName = "customFunctionsContainer", + _this._requestFlagModifier = 2176, _this; + } + return __extends(CustomFunctionRequestContext, _super), Object.defineProperty(CustomFunctionRequestContext.prototype, "customFunctions", { + get: function() { + return this.m_customFunctions; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(CustomFunctionRequestContext.prototype, "customFunctionsContainer", { + get: function() { + return this.m_container; + }, + enumerable: !1, + configurable: !0 + }), CustomFunctionRequestContext.prototype._processOfficeJsErrorResponse = function(officeJsErrorCode, response) { + 5004 === officeJsErrorCode && (response.ErrorCode = CustomFunctionRuntimeErrorCode.invalidOperationInCellEditMode, + response.ErrorMessage = OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode)); + }, CustomFunctionRequestContext; + }(OfficeExtension.ClientRequestContext)); + exports.Script = { + _CustomFunctionMetadata: {} + }; + var CustomFunctionLoggingSeverity, InvocationContext = function() { + function InvocationContext(functionName, address, parameterAddresses, setResultHandler, setErrorHandler) { + this._functionName = functionName, _isNullOrUndefined(address) || (this._address = address), + _isNullOrUndefined(parameterAddresses) || (this._parameterAddresses = parameterAddresses), + this.setResult = setResultHandler, this.setError = setErrorHandler; + } + return Object.defineProperty(InvocationContext.prototype, "onCanceled", { + get: function() { + if (!_isNullOrUndefined(this._onCanceled) && "function" == typeof this._onCanceled) return this._onCanceled; + }, + set: function(handler) { + this._onCanceled = handler; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(InvocationContext.prototype, "functionName", { + get: function() { + return this._functionName; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(InvocationContext.prototype, "address", { + get: function() { + return this._address; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(InvocationContext.prototype, "parameterAddresses", { + get: function() { + return this._parameterAddresses; + }, + enumerable: !1, + configurable: !0 + }), InvocationContext; + }(); + exports.InvocationContext = InvocationContext, function(CustomFunctionLoggingSeverity) { + CustomFunctionLoggingSeverity.Info = "Medium", CustomFunctionLoggingSeverity.Error = "Unexpected", + CustomFunctionLoggingSeverity.Verbose = "Verbose"; + }(CustomFunctionLoggingSeverity || (CustomFunctionLoggingSeverity = {})); + var ErrorCode, CustomFunctionLog = function(Severity, Message) { + this.Severity = Severity, this.Message = Message; + }, CustomFunctionsLogger = function() { + function CustomFunctionsLogger() {} + return CustomFunctionsLogger.logEvent = function(log, data, data2) { + if (CustomFunctionsLogger.s_shouldLog || OfficeExtension.CoreUtility._logEnabled) { + var logMessage = log.Severity + " " + log.Message + data; + if (data2 && (logMessage = logMessage + " " + data2), OfficeExtension.Utility.log(logMessage), + CustomFunctionsLogger.s_shouldLog) switch (log.Severity) { + case CustomFunctionLoggingSeverity.Verbose: + null !== console.log && console.log(logMessage); + break; + + case CustomFunctionLoggingSeverity.Info: + null !== console.info && console.info(logMessage); + break; + + case CustomFunctionLoggingSeverity.Error: + null !== console.error && console.error(logMessage); + } + } + }, CustomFunctionsLogger.shouldLog = function() { + try { + return !_isNullOrUndefined(console) && !_isNullOrUndefined(window) && window.name && "string" == typeof window.name && JSON.parse(window.name)[CustomFunctionsLogger.CustomFunctionLoggingFlag]; + } catch (ex) { + return OfficeExtension.Utility.log(JSON.stringify(ex)), !1; + } + }, CustomFunctionsLogger.CustomFunctionLoggingFlag = "CustomFunctionsRuntimeLogging", + CustomFunctionsLogger.s_shouldLog = CustomFunctionsLogger.shouldLog(), CustomFunctionsLogger; + }(); + !function(ErrorCode) { + ErrorCode.invalidValue = "#VALUE!", ErrorCode.notAvailable = "#N/A", ErrorCode.divisionByZero = "#DIV/0!", + ErrorCode.invalidNumber = "#NUM!", ErrorCode.nullReference = "#NULL!", ErrorCode.invalidName = "#NAME?", + ErrorCode.invalidReference = "#REF!"; + }(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {})); + var CustomFunctionError = function(_super) { + function CustomFunctionError(errorCode, errorMessage, errorSubType) { + var _this = _super.call(this, errorMessage || "") || this; + return _this.type = CustomFunctionError.valueType, _this.basicType = CustomFunctionError.valueType, + Object.setPrototypeOf(_this, CustomFunctionError.prototype), _this.code = errorCode || ErrorCode.invalidValue, + _this.basicValue = errorCode || ErrorCode.invalidValue, _this.errorSubType = errorSubType, + _this.stack = void 0, _this; + } + return __extends(CustomFunctionError, _super), CustomFunctionError.prototype.toJSON = function() { + return { + valueType: "CustomFunctionError", + code: this.code, + type: this.type, + basicValue: this.basicValue, + basicType: this.type, + errorSubType: this.errorSubType, + message: this._getMessage(), + errorType: this._getErrorType() + }; + }, CustomFunctionError.prototype._getErrorType = function() { + switch (this.basicValue) { + case ErrorCode.invalidValue: + return "Value"; + + case ErrorCode.divisionByZero: + return "Div0"; + + case ErrorCode.notAvailable: + return "NotAvailable"; + + case ErrorCode.invalidNumber: + return "Num"; + + case ErrorCode.invalidName: + return "Name"; + + case ErrorCode.invalidReference: + return "Ref"; + + case ErrorCode.nullReference: + return "Null"; + + default: + return; + } + }, CustomFunctionError.prototype._getMessage = function() { + switch (this.basicValue) { + case ErrorCode.invalidValue: + case ErrorCode.notAvailable: + return "" == this.message ? void 0 : this.message; + + case ErrorCode.divisionByZero: + case ErrorCode.invalidNumber: + case ErrorCode.invalidName: + case ErrorCode.invalidReference: + case ErrorCode.nullReference: + default: + return; + } + }, CustomFunctionError.valueType = "Error", CustomFunctionError; + }(Error); + exports.CustomFunctionError = CustomFunctionError; + var CustomFunctionEntity = function() { + function CustomFunctionEntity(text, properties) { + this.type = CustomFunctionEntity.valueType, this.basicValue = "#VALUE!", this.basicType = "Error", + Object.setPrototypeOf(this, CustomFunctionEntity.prototype), this.text = text, this.properties = properties; + } + return CustomFunctionEntity.prototype.toJSON = function() { + return { + type: this.type, + text: this.text, + basicValue: this.basicValue, + basicType: this.basicType, + properties: this.properties + }; + }, CustomFunctionEntity.valueType = "Entity", CustomFunctionEntity; + }(); + exports.CustomFunctionEntity = CustomFunctionEntity; + var CustomFunctionFormattedNumber = function() { + function CustomFunctionFormattedNumber(basicValue, numberFormat) { + this.type = CustomFunctionFormattedNumber.valueType, this.basicValue = basicValue, + this.numberFormat = numberFormat; + } + return CustomFunctionFormattedNumber.prototype.toJSON = function() { + return { + type: this.type, + basicValue: this.basicValue, + numberFormat: this.numberFormat + }; + }, CustomFunctionFormattedNumber.valueType = "FormattedNumber", CustomFunctionFormattedNumber; + }(); + exports.CustomFunctionFormattedNumber = CustomFunctionFormattedNumber; + var CustomFunctionWebImage = function() { + function CustomFunctionWebImage(address, altText, relatedImagesAddress, attribution, provider) { + this.type = CustomFunctionWebImage.valueType, this.basicValue = "#VALUE!", this.basicType = "Error", + this.address = address, null != attribution && (this.attribution = attribution), + null != provider && (this.provider = provider), null != altText && (this.altText = altText), + null != relatedImagesAddress && (this.relatedImagesAddress = relatedImagesAddress); + } + return CustomFunctionWebImage.prototype.toJSON = function() { + return { + type: this.type, + basicValue: this.basicValue, + basicType: this.basicType, + address: this.address, + altText: this.altText, + relatedImagesAddress: this.relatedImagesAddress, + attribution: null == this.attribution ? void 0 : this.attribution.map((function(attr) { + return attr.toJSON(); + })), + provider: null == this.provider ? void 0 : this.provider.toJSON() + }; + }, CustomFunctionWebImage.valueType = "WebImage", CustomFunctionWebImage; + }(); + exports.CustomFunctionWebImage = CustomFunctionWebImage; + var CustomFunctionAttribution = function() { + function CustomFunctionAttribution(licenseAddress, licenseText, sourceAddress, sourceText) { + null != licenseAddress && (this.licenseAddress = licenseAddress), null != licenseText && (this.licenseText = licenseText), + null != sourceAddress && (this.sourceAddress = sourceAddress), null != sourceText && (this.sourceText = sourceText); + } + return CustomFunctionAttribution.prototype.toJSON = function() { + return { + licenseAddress: this.licenseAddress, + licenseText: this.licenseText, + sourceAddress: this.sourceAddress, + sourceText: this.sourceText + }; + }, CustomFunctionAttribution; + }(); + exports.CustomFunctionAttribution = CustomFunctionAttribution; + var CustomFunctionProvider = function() { + function CustomFunctionProvider(description, logoSourceAddress, logoTargetAddress) { + this.description = description, null != logoSourceAddress && (this.logoSourceAddress = logoSourceAddress), + null != logoTargetAddress && (this.logoTargetAddress = logoTargetAddress); + } + return CustomFunctionProvider.prototype.toJSON = function() { + return { + description: this.description, + logoSourceAddress: this.logoSourceAddress, + logoTargetAddress: this.logoTargetAddress + }; + }, CustomFunctionProvider; + }(); + exports.CustomFunctionProvider = CustomFunctionProvider, exports.CreateCustomFunctionInstance = function CreateCustomFunctionInstance(parameterValues) { + if (parameterValues instanceof Array) return parameterValues.map((function(item) { + return CreateCustomFunctionInstance(item); + })); + if (!(parameterValues instanceof Object)) return parameterValues; + var obj = JSON.parse(parameterValues.value); + switch (obj.type) { + case CustomFunctionEntity.valueType: + return new CustomFunctionEntity(obj.text, obj.properties); + + case CustomFunctionFormattedNumber.valueType: + return new CustomFunctionFormattedNumber(obj.primitive, obj.numberFormat); + + case CustomFunctionError.valueType: + return new CustomFunctionError(obj.primitive, void 0, obj.errorSubCode); + + case CustomFunctionWebImage.valueType: + return new CustomFunctionWebImage(obj.address, obj.altText, obj.relatedImagesAddress, obj.attribution, obj.provider); + + case "Double": + case "String": + case "Boolean": + return obj.primitive; + + default: + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy.createRichDataFromJsonString"); + } + }; + var CustomFunctionProxy = function() { + function CustomFunctionProxy() { + this._whenInit = void 0, this._isInit = !1, this._setResultsDelayMillis = 50, this._setResultsOverdueDelayMillis = 2e3, + this._maxContextSyncExecutionDurationMills = 15e3, this._minContextSyncIntervalMills = 500, + this._smallerMinContextSyncIntervalMills = 200, this._maxContextSyncIntervalMills = 2e3, + this._setResultsLifeMillis = 6e4, this._ensureInitRetryDelayMillis = 500, this._resultEntryBuffer = {}, + this._resultEntryRetryBuffer = {}, this._retryBufferBodySize = 0, this._isSetResultsTaskScheduled = !1, + this._setResultsTaskOverdueTime = 0, this._inProgressContextSyncExpectedFinishTime = 0, + this._batchQuotaMillis = 1e3, this._invocationContextMap = {}, this._maxResultSize = 2e6; + } + return CustomFunctionProxy.prototype._initSettings = function() { + if ("object" == typeof exports.Script && "object" == typeof exports.Script._CustomFunctionSettings) { + if ("number" == typeof exports.Script._CustomFunctionSettings.setResultsDelayMillis) { + var setResultsDelayMillis = exports.Script._CustomFunctionSettings.setResultsDelayMillis; + setResultsDelayMillis = Math.max(0, setResultsDelayMillis), setResultsDelayMillis = Math.min(1e3, setResultsDelayMillis), + this._setResultsDelayMillis = setResultsDelayMillis; + } + if ("number" == typeof exports.Script._CustomFunctionSettings.ensureInitRetryDelayMillis) { + var ensureInitRetryDelayMillis = exports.Script._CustomFunctionSettings.ensureInitRetryDelayMillis; + ensureInitRetryDelayMillis = Math.max(0, ensureInitRetryDelayMillis), ensureInitRetryDelayMillis = Math.min(2e3, ensureInitRetryDelayMillis), + this._ensureInitRetryDelayMillis = ensureInitRetryDelayMillis; + } + if ("number" == typeof exports.Script._CustomFunctionSettings.setResultsLifeMillis) { + var setResultsLifeMillis = exports.Script._CustomFunctionSettings.setResultsLifeMillis; + setResultsLifeMillis = Math.max(0, setResultsLifeMillis), setResultsLifeMillis = Math.min(6e5, setResultsLifeMillis), + this._setResultsLifeMillis = setResultsLifeMillis; + } + if ("number" == typeof exports.Script._CustomFunctionSettings.batchQuotaMillis) { + var batchQuotaMillis = exports.Script._CustomFunctionSettings.batchQuotaMillis; + batchQuotaMillis = Math.max(0, batchQuotaMillis), batchQuotaMillis = Math.min(1e3, batchQuotaMillis), + this._batchQuotaMillis = batchQuotaMillis; + } + } + }, CustomFunctionProxy.prototype.ensureInit = function(context) { + var _this = this; + return this._initSettings(), void 0 === this._whenInit && (this._whenInit = OfficeExtension.Utility._createPromiseFromResult(null).then((function() { + if (!_this._isInit) return context.eventRegistration.register(5, "", _this._handleMessage.bind(_this)); + })).then((function() { + _this._isInit = !0; + }))), this._isInit || context._pendingRequest._addPreSyncPromise(this._whenInit), + this._whenInit; + }, CustomFunctionProxy.prototype.setCustomFunctionInvoker = function(invoker) { + "object" == typeof CustomFunctionMappings && delete CustomFunctionMappings.__delay__, + this._invoker = invoker; + }, CustomFunctionProxy.prototype.setCustomFunctionAssociation = function(association) { + var _this = this; + this._customFunctionMappingsUpperCase = void 0, this._association = association, + this._association && this._association.onchange((function() { + _this._customFunctionMappingsUpperCase = void 0; + })); + }, CustomFunctionProxy.prototype._initFromHostBridge = function(hostBridge) { + var _this = this; + this._initSettings(), hostBridge.addHostMessageHandler((function(bridgeMessage) { + 3 === bridgeMessage.type ? _this._handleMessage(bridgeMessage.message) : 4 === bridgeMessage.type && _this._handleSettings(bridgeMessage.message); + })), this._isInit = !0, this._whenInit = OfficeExtension.CoreUtility.Promise.resolve(); + }, CustomFunctionProxy.prototype._handleSettings = function(args) { + OfficeExtension.Utility.log("CustomFunctionProxy._handleSettings:" + JSON.stringify(args)), + args && "object" == typeof args && (CustomFunctionsLogger.s_shouldLog = args[CustomFunctionsLogger.CustomFunctionLoggingFlag]); + }, CustomFunctionProxy.prototype._handleMessage = function(args) { + try { + OfficeExtension.Utility.log("CustomFunctionProxy._handleMessage"), OfficeExtension.Utility.checkArgumentNull(args, "args"); + for (var entryArray = args.entries, invocationArray = [], cancellationArray = [], metadataArray = [], i = 0; i < entryArray.length; i++) 1 === entryArray[i].messageCategory && ("string" == typeof entryArray[i].message && (entryArray[i].message = JSON.parse(entryArray[i].message)), + 1e3 === entryArray[i].messageType ? invocationArray.push(entryArray[i]) : 1001 === entryArray[i].messageType ? cancellationArray.push(entryArray[i]) : 1002 === entryArray[i].messageType ? metadataArray.push(entryArray[i]) : OfficeExtension.Utility.log("CustomFunctionProxy._handleMessage unknown message type " + entryArray[i].messageType)); + if (metadataArray.length > 0 && this._handleMetadataEntries(metadataArray), invocationArray.length > 0) { + var batchArray = this._batchInvocationEntries(invocationArray); + batchArray.length > 0 && this._invokeRemainingBatchEntries(batchArray, 0); + } + cancellationArray.length > 0 && this._handleCancellationEntries(cancellationArray); + } catch (ex) { + throw CustomFunctionProxy._tryLog(ex), ex; + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }, CustomFunctionProxy.toLogMessage = function(ex) { + var ret = "Unknown Error"; + if (ex) try { + ex.toString && (ret = ex.toString()), ret = ret + " " + JSON.stringify(ex); + } catch (otherEx) { + ret = "Unexpected Error"; + } + return ret; + }, CustomFunctionProxy._tryLog = function(ex) { + var message = CustomFunctionProxy.toLogMessage(ex); + OfficeExtension.Utility.log(message); + }, CustomFunctionProxy.prototype._handleMetadataEntries = function(entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var message = entryArray[i].message; + if (_isNullOrUndefined(message)) throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy._handleMetadataEntries"); + exports.Script._CustomFunctionMetadata[message.functionName] = { + options: { + stream: message.isStream, + cancelable: message.isCancelable + } + }; + } + }, CustomFunctionProxy.prototype._handleCancellationEntries = function(entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var message = entryArray[i].message; + if (_isNullOrUndefined(message)) throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy._handleCancellationEntries"); + var invocationId = message.invocationId, invocationContext = this._invocationContextMap[invocationId]; + _isNullOrUndefined(invocationContext) || (delete this._invocationContextMap[invocationId], + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionCancellation, invocationContext.functionName), + _isNullOrUndefined(invocationContext.onCanceled) || invocationContext.onCanceled()); + } + }, CustomFunctionProxy.prototype._transferCustomFunctionError = function(entryArray) { + var _this = this; + return entryArray.map((function(value, index) { + return null === value ? value : null != value.code && "CustomFunctionError" == value.type ? new CustomFunctionError(value.code) : value instanceof Array ? _this._transferCustomFunctionError(value) : value; + })); + }, CustomFunctionProxy.prototype._transferCustomFunctionRichData = function(entryArray) { + var _this = this; + return entryArray.map((function(element, index) { + return element instanceof Array ? _this._transferCustomFunctionRichData(element) : element instanceof Object ? JSON.parse(element.value) : element; + })); + }, CustomFunctionProxy.prototype._batchInvocationEntries = function(entryArray) { + for (var _this = this, batchArray = [], _loop_1 = function(i) { + var message, arrayOrObjectMessage = entryArray[i].message; + if (Array.isArray(arrayOrObjectMessage) ? (message = { + invocationId: arrayOrObjectMessage[0], + functionName: arrayOrObjectMessage[1], + parameterValues: arrayOrObjectMessage[2], + address: arrayOrObjectMessage[3], + flags: arrayOrObjectMessage[4], + parameterAddresses: null + }, _isNullOrUndefined(arrayOrObjectMessage[5]) || (message.parameterAddresses = arrayOrObjectMessage[5])) : message = arrayOrObjectMessage, + _isNullOrUndefined(message)) throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy._batchInvocationEntries"); + if (_isNullOrUndefined(message.invocationId) || message.invocationId < 0) throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "invocationId", "CustomFunctionProxy._batchInvocationEntries"); + if (_isNullOrUndefined(message.functionName)) throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "functionName", "CustomFunctionProxy._batchInvocationEntries"); + var call = null, isCancelable = !1, isStreaming = !1, isAllowError = !1; + if ("number" == typeof message.flags) isCancelable = 0 != (1 & message.flags), isStreaming = 0 != (2 & message.flags), + isAllowError = 0 != (4 & message.flags), 0 != (8 & message.flags) && (message.parameterValues = this_1._transferCustomFunctionRichData(message.parameterValues)), + isAllowError && (message.parameterValues = this_1._transferCustomFunctionError(message.parameterValues)); else { + var metadata = exports.Script._CustomFunctionMetadata[message.functionName]; + if (_isNullOrUndefined(metadata)) return CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionNotFoundLog, message.functionName), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.8") ? this_1._setError(message.invocationId, null, 9) : this_1._setError(message.invocationId, "N/A", 1), + "continue"; + isCancelable = metadata.options.cancelable, isStreaming = metadata.options.stream; + } + if (this_1._invoker && !this_1._customFunctionMappingsContains(message.functionName)) return this_1._invokeFunctionUsingInvoker(message), + "continue"; + try { + call = this_1._getFunction(message.functionName); + } catch (ex) { + return CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionNotFoundLog, message.functionName), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.8") ? this_1._setError(message.invocationId, ex, 10) : this_1._setError(message.invocationId, ex, 1), + "continue"; + } + var invocationContext = void 0; + if (isStreaming || isCancelable) { + var setResult = void 0, setError = void 0; + isStreaming && (setResult = function(result) { + _this._invocationContextMap[message.invocationId] ? _this._setResult(message.invocationId, result) : CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionAlreadyCancelled, message.functionName); + }, setError = function(error) { + _this._invocationContextMap[message.invocationId] ? _this._setError(message.invocationId, error.message, _this._getCustomFunctionResultErrorCodeFromErrorCode(error.code)) : CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionAlreadyCancelled, message.functionName); + }), invocationContext = new InvocationContext(message.functionName, message.address, message.parameterAddresses, setResult, setError), + this_1._invocationContextMap[message.invocationId] = invocationContext; + } else invocationContext = new InvocationContext(message.functionName, message.address, message.parameterAddresses); + message.parameterValues.push(invocationContext), batchArray.push({ + call: call, + isBatching: !1, + isStreaming: isStreaming, + invocationIds: [ message.invocationId ], + parameterValueSets: [ message.parameterValues ], + functionName: message.functionName + }); + }, this_1 = this, i = 0; i < entryArray.length; i++) _loop_1(i); + return batchArray; + }, CustomFunctionProxy.prototype._invokeFunctionUsingInvoker = function(message) { + var _this = this, isCancelable = 0 != (1 & message.flags), isStreaming = 0 != (2 & message.flags), invocationId = message.invocationId, setResult = void 0, setError = void 0; + if (isStreaming) setResult = function(result) { + _this._invocationContextMap[invocationId] && _this._setResult(invocationId, result); + }, setError = function(error) { + _this._invocationContextMap[invocationId] && _this._setError(invocationId, error.message, _this._getCustomFunctionResultErrorCodeFromErrorCode(error.code)); + }; else { + var setResultCalled_1 = !1; + setResult = function(result) { + setResultCalled_1 || _this._setResult(invocationId, result), setResultCalled_1 = !0; + }, setError = function(error) { + setResultCalled_1 || _this._setError(invocationId, error.message, _this._getCustomFunctionResultErrorCodeFromErrorCode(error.code)), + setResultCalled_1 = !0; + }; + } + var invocationContext = new InvocationContext(message.functionName, message.address, message.parameterAddresses, setResult, setError); + (isStreaming || isCancelable) && (this._invocationContextMap[invocationId] = invocationContext), + this._invoker.invoke(message.functionName, message.parameterValues, invocationContext); + }, CustomFunctionProxy.prototype._ensureCustomFunctionMappingsUpperCase = function() { + if (_isNullOrUndefined(this._customFunctionMappingsUpperCase)) { + if (this._customFunctionMappingsUpperCase = {}, "object" == typeof CustomFunctionMappings) for (var key in OfficeExtension.CoreUtility.log("CustomFunctionMappings.Keys=" + JSON.stringify(Object.keys(CustomFunctionMappings))), + CustomFunctionMappings) this._customFunctionMappingsUpperCase[key.toUpperCase()] && CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionDuplicatedName, key), + this._customFunctionMappingsUpperCase[key.toUpperCase()] = CustomFunctionMappings[key]; + if (this._association) for (var key in OfficeExtension.CoreUtility.log("CustomFunctionAssociateMappings.Keys=" + JSON.stringify(Object.keys(this._association.mappings))), + this._association.mappings) this._customFunctionMappingsUpperCase[key.toUpperCase()] && CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionDuplicatedName, key), + this._customFunctionMappingsUpperCase[key.toUpperCase()] = this._association.mappings[key]; + } + }, CustomFunctionProxy.prototype._customFunctionMappingsContains = function(functionName) { + this._ensureCustomFunctionMappingsUpperCase(); + var functionNameUpperCase = functionName.toUpperCase(); + if (!_isNullOrUndefined(this._customFunctionMappingsUpperCase[functionNameUpperCase])) return !0; + if ("undefined" != typeof window) { + for (var functionParent = window, functionNameSegments = functionName.split("."), i = 0; i < functionNameSegments.length - 1; i++) if (functionParent = functionParent[functionNameSegments[i]], + _isNullOrUndefined(functionParent) || "object" != typeof functionParent) return !1; + if ("function" == typeof functionParent[functionNameSegments[functionNameSegments.length - 1]]) return !0; + } + return !1; + }, CustomFunctionProxy.prototype._getCustomFunctionMappings = function(functionName) { + this._ensureCustomFunctionMappingsUpperCase(); + var functionNameUpperCase = functionName.toUpperCase(); + if (!_isNullOrUndefined(this._customFunctionMappingsUpperCase[functionNameUpperCase])) { + if ("function" == typeof this._customFunctionMappingsUpperCase[functionNameUpperCase]) return this._customFunctionMappingsUpperCase[functionNameUpperCase]; + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.invalidOperation, OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.customFunctionInvalidFunctionMapping, functionName), "CustomFunctionProxy._getCustomFunctionMappings"); + } + }, CustomFunctionProxy.prototype._getFunction = function(functionName) { + return this._getCustomFunctionMappings(functionName); + }, CustomFunctionProxy.prototype._invokeRemainingBatchEntries = function(batchArray, startIndex) { + OfficeExtension.Utility.log("CustomFunctionProxy._invokeRemainingBatchEntries"); + for (var startTimeMillis = Date.now(), i = startIndex; i < batchArray.length; i++) { + if (!(Date.now() - startTimeMillis < this._batchQuotaMillis)) { + OfficeExtension.Utility.log("setTimeout(CustomFunctionProxy._invokeRemainingBatchEntries)"), + setTimeout(this._invokeRemainingBatchEntries.bind(this), 0, batchArray, i); + break; + } + this._invokeFunctionAndSetResult(batchArray[i]); + } + }, CustomFunctionProxy.prototype._invokeFunctionAndSetResult = function(batch) { + var results, _this = this; + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionStartLog, batch.functionName); + var startTime = Date.now(); + try { + results = batch.isBatching ? batch.call.call(null, batch.parameterValueSets) : [ batch.call.apply(null, batch.parameterValueSets[0]) ]; + } catch (ex) { + var outboundData_1 = []; + outboundData_1.push(Date.now() - startTime); + for (var i = 0; i < batch.invocationIds.length; i++) ex instanceof CustomFunctionError ? this._setErrorWithOutboundData(batch.invocationIds[i], ex.message, this._getCustomFunctionResultErrorCodeFromErrorCode(ex.code), outboundData_1) : this._setErrorWithOutboundData(batch.invocationIds[i], ex, 2, outboundData_1); + return void CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionExceptionThrownLog, batch.functionName, CustomFunctionProxy.toLogMessage(ex)); + } + var outboundData = []; + if (CustomFunctions.isFeatureEnabled(3) || outboundData.push(Date.now() - startTime), + batch.isStreaming) ; else if (results.length === batch.parameterValueSets.length) { + var _loop_2 = function(i) { + _isNullOrUndefined(results[i]) || "object" != typeof results[i] || "function" != typeof results[i].then ? (CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionFinishLog, batch.functionName), + this_2._setResultWithOutboundData(batch.invocationIds[i], results[i], outboundData)) : results[i].then((function(value) { + CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionFinishLog, batch.functionName), + _this._setResultWithOutboundData(batch.invocationIds[i], value, outboundData); + }), (function(reason) { + CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionRejectedPromoseLog, batch.functionName, CustomFunctionProxy.toLogMessage(reason)), + reason instanceof CustomFunctionError ? _this._setErrorWithOutboundData(batch.invocationIds[i], reason, _this._getCustomFunctionResultErrorCodeFromErrorCode(reason.code), outboundData) : _this._setErrorWithOutboundData(batch.invocationIds[i], reason, 3, outboundData); + })); + }, this_2 = this; + for (i = 0; i < results.length; i++) _loop_2(i); + } else { + CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionBatchMismatchLog, batch.functionName); + for (i = 0; i < batch.invocationIds.length; i++) this._setErrorWithOutboundData(batch.invocationIds[i], OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch), 4, outboundData); + } + }, CustomFunctionProxy.prototype._setResult = function(invocationId, result) { + var outboundData = []; + outboundData.push(0), this._setResultWithOutboundData(invocationId, result, outboundData); + }, CustomFunctionProxy.prototype._setResultWithOutboundData = function(invocationId, result, outboundData) { + var invocationResult = { + id: invocationId, + value: result, + outboundData: outboundData + }; + "number" == typeof result ? isNaN(result) ? (invocationResult.failed = !0, invocationResult.value = "NaN") : isFinite(result) || (invocationResult.failed = !0, + invocationResult.value = "Infinity", invocationResult.errorCode = 6) : result instanceof CustomFunctionError || result instanceof CustomFunctionEntity || result instanceof CustomFunctionFormattedNumber || result instanceof CustomFunctionWebImage ? (invocationResult.failed = !1, + invocationResult.value = result.toJSON()) : result instanceof Error && (invocationResult.failed = !0, + invocationResult.value = CustomFunctionProxy.toLogMessage(result), invocationResult.errorCode = 0); + var timeNow = Date.now(); + this._resultEntryBuffer[invocationId] = { + timeCreated: timeNow, + result: invocationResult + }, this._ensureSetResultsTaskIsScheduled(timeNow); + }, CustomFunctionProxy.prototype._setError = function(invocationId, error, errorCode) { + var outboundData = []; + outboundData.push(0), this._setErrorWithOutboundData(invocationId, error, errorCode, outboundData); + }, CustomFunctionProxy.prototype._setErrorWithOutboundData = function(invocationId, error, errorCode, outboundData) { + var message = ""; + _isNullOrUndefined(error) || (error instanceof CustomFunctionError && !_isNullOrUndefined(error.message) ? message = error.message : "string" == typeof error && (message = error)); + var result = { + id: invocationId, + failed: !0, + value: message, + errorCode: errorCode, + outboundData: outboundData + }, timeNow = Date.now(); + this._resultEntryBuffer[invocationId] = { + timeCreated: timeNow, + result: result + }, this._ensureSetResultsTaskIsScheduled(timeNow); + }, CustomFunctionProxy.prototype._getCustomFunctionResultErrorCodeFromErrorCode = function(errorCode) { + var internalCode; + switch (errorCode) { + case ErrorCode.notAvailable: + internalCode = 1; + break; + + case ErrorCode.divisionByZero: + internalCode = 5; + break; + + case ErrorCode.invalidValue: + internalCode = 7; + break; + + case ErrorCode.invalidNumber: + internalCode = 6; + break; + + case ErrorCode.nullReference: + internalCode = 8; + break; + + default: + internalCode = 7; + } + return internalCode; + }, CustomFunctionProxy.prototype._ensureSetResultsTaskIsScheduled = function(timeNow) { + if (this._setResultsTaskOverdueTime > 0 && timeNow > this._setResultsTaskOverdueTime) return OfficeExtension.Utility.log("SetResultsTask overdue"), + void this._executeSetResultsTask(); + this._isSetResultsTaskScheduled || (OfficeExtension.Utility.log("setTimeout(CustomFunctionProxy._executeSetResultsTask)"), + setTimeout(this._executeSetResultsTask.bind(this), this._setResultsDelayMillis), + this._isSetResultsTaskScheduled = !0, this._setResultsTaskOverdueTime = timeNow + this._setResultsDelayMillis + this._setResultsOverdueDelayMillis); + }, CustomFunctionProxy.prototype._convertCustomFunctionInvocationResultToArray = function(result) { + var ret = []; + return ret.push(result.id), ret.push(!result.failed), OfficeExtension.CoreUtility.isUndefined(result.value) ? ret.push(null) : ret.push(result.value), + result.failed && (OfficeExtension.CoreUtility.isUndefined(result.errorCode) ? ret.push(0) : ret.push(result.errorCode)), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.9") && ret.push(result.outboundData), + ret; + }, CustomFunctionProxy.prototype._executeSetResultsTask = function() { + var _this = this; + OfficeExtension.Utility.log("CustomFunctionProxy._executeSetResultsTask"); + var timeNow = Date.now(); + if (this._inProgressContextSyncExpectedFinishTime > 0 && this._inProgressContextSyncExpectedFinishTime > timeNow) return OfficeExtension.Utility.log("context.sync() is in progress. setTimeout(CustomFunctionProxy._executeSetResultsTask)"), + setTimeout(this._executeSetResultsTask.bind(this), this._setResultsDelayMillis), + void (this._setResultsTaskOverdueTime = timeNow + this._setResultsDelayMillis + this._setResultsOverdueDelayMillis); + this._isSetResultsTaskScheduled = !1, this._setResultsTaskOverdueTime = 0; + var resultEntryBufferCopy = {}, isSizeRetry = !1; + CustomFunctions.isFeatureEnabled(1) && Object.keys(this._resultEntryRetryBuffer).length > 0 ? (resultEntryBufferCopy = this._resultEntryRetryBuffer, + this._resultEntryRetryBuffer = {}, this._retryBufferBodySize = 2, isSizeRetry = !0) : (resultEntryBufferCopy = this._resultEntryBuffer, + this._resultEntryBuffer = {}); + var useArrayResult = OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.7"), invocationResults = []; + for (var key in resultEntryBufferCopy) useArrayResult ? invocationResults.push(this._convertCustomFunctionInvocationResultToArray(resultEntryBufferCopy[key].result)) : invocationResults.push(resultEntryBufferCopy[key].result); + if (0 !== invocationResults.length) { + var context = new CustomFunctionRequestContext; + useArrayResult ? context.customFunctions.setInvocationArrayResults(invocationResults) : context.customFunctions.setInvocationResults(invocationResults); + var contextSyncStartTime = Date.now(); + this._inProgressContextSyncExpectedFinishTime = contextSyncStartTime + this._maxContextSyncExecutionDurationMills, + context.sync().then((function(value) { + var timeNow = Date.now(); + _this._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(timeNow - contextSyncStartTime), + isSizeRetry && _this._ensureSetResultsTaskIsScheduled(timeNow); + }), (function(reason) { + var timeNow = Date.now(); + _this._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(timeNow - contextSyncStartTime), + CustomFunctions.isFeatureEnabled(1) && reason.code == OfficeExtension.ErrorCodes.requestPayloadSizeLimitExceeded ? _this._restoreAndSliceResultEntries(timeNow, resultEntryBufferCopy) : _this._restoreResultEntries(timeNow, resultEntryBufferCopy), + _this._ensureSetResultsTaskIsScheduled(timeNow); + })); + } + }, CustomFunctionProxy.prototype._restoreResultEntries = function(timeNow, resultEntryBufferCopy) { + for (var key in resultEntryBufferCopy) { + var resultSetter = resultEntryBufferCopy[key]; + timeNow - resultSetter.timeCreated <= this._setResultsLifeMillis && (this._resultEntryBuffer[key] || (this._resultEntryBuffer[key] = resultSetter)); + } + }, CustomFunctionProxy.prototype._restoreAndSliceResultEntries = function(timeNow, resultEntryBufferCopy) { + for (var key in resultEntryBufferCopy) { + var resultSetter = resultEntryBufferCopy[key], resultSize = void 0; + if (timeNow - resultSetter.timeCreated <= this._setResultsLifeMillis && !this._resultEntryBuffer[key]) { + try { + resultSize = JSON.stringify(this._convertCustomFunctionInvocationResultToArray(resultSetter.result)).length + 1; + } catch (ex) { + this._resultEntryBuffer[key] = resultSetter, OfficeExtension.Utility.log("Result can't pass in JSON.stringify"); + continue; + } + this._retryBufferBodySize + resultSize < this._maxResultSize ? (this._resultEntryRetryBuffer[key] = resultSetter, + this._retryBufferBodySize += resultSize) : this._resultEntryBuffer[key] = resultSetter; + } + } + }, CustomFunctionProxy.prototype._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval = function(lastContextSyncDurationMills) { + var _this = this, contextSyncInterval = CustomFunctions.isFeatureEnabled(2) ? this._smallerMinContextSyncIntervalMills : this._minContextSyncIntervalMills, interval = Math.max(contextSyncInterval, 2 * lastContextSyncDurationMills), intervalMax = CustomFunctions.isFeatureEnabled(4) ? Math.min(this._maxContextSyncIntervalMills, interval) : interval; + OfficeExtension.Utility.log("setTimeout(clearInProgressContestSyncExpectedFinishedTime," + interval + ")"), + setTimeout((function() { + OfficeExtension.Utility.log("clearInProgressContestSyncExpectedFinishedTime"), _this._inProgressContextSyncExpectedFinishTime = 0; + }), intervalMax); + }, CustomFunctionProxy.CustomFunctionExecutionStartLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Verbose, "CustomFunctions [Execution] [Begin] Function="), + CustomFunctionProxy.CustomFunctionExecutionFailureLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] Function="), + CustomFunctionProxy.CustomFunctionExecutionRejectedPromoseLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] [RejectedPromise] Function="), + CustomFunctionProxy.CustomFunctionExecutionExceptionThrownLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] [ExceptionThrown] Function="), + CustomFunctionProxy.CustomFunctionExecutionBatchMismatchLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] [BatchMismatch] Function="), + CustomFunctionProxy.CustomFunctionExecutionFinishLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Info, "CustomFunctions [Execution] [End] [Success] Function="), + CustomFunctionProxy.CustomFunctionExecutionNotFoundLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [NotFound] Function="), + CustomFunctionProxy.CustomFunctionCancellation = new CustomFunctionLog(CustomFunctionLoggingSeverity.Info, "CustomFunctions [Cancellation] Function="), + CustomFunctionProxy.CustomFunctionAlreadyCancelled = new CustomFunctionLog(CustomFunctionLoggingSeverity.Info, "CustomFunctions [AlreadyCancelled] Function="), + CustomFunctionProxy.CustomFunctionDuplicatedName = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [DuplicatedName] Function="), + CustomFunctionProxy.CustomFunctionInvalidArg = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [InvalidArg] Name="), + CustomFunctionProxy; + }(); + exports.CustomFunctionProxy = CustomFunctionProxy, exports.customFunctionProxy = new CustomFunctionProxy, + exports.setCustomFunctionAssociation = exports.customFunctionProxy.setCustomFunctionAssociation.bind(exports.customFunctionProxy), + exports.setCustomFunctionInvoker = exports.customFunctionProxy.setCustomFunctionInvoker.bind(exports.customFunctionProxy), + Core.HostBridge.onInited((function(hostBridge) { + exports.customFunctionProxy._initFromHostBridge(hostBridge); + })); + var CustomFunctions = function(_super) { + function CustomFunctions() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(CustomFunctions, _super), Object.defineProperty(CustomFunctions.prototype, "_className", { + get: function() { + return "CustomFunctions"; + }, + enumerable: !1, + configurable: !0 + }), CustomFunctions.isFeatureEnabled = function(args) { + return this._enabledFeature instanceof Array && this._enabledFeature.indexOf(args) >= 0; + }, CustomFunctions.initialize = function() { + var _this = this, context = new CustomFunctionRequestContext; + return exports.customFunctionProxy.ensureInit(context).then((function() { + var enabledFeature; + return context.customFunctions._SetOsfControlContainerReadyForCustomFunctions(), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.9") && (enabledFeature = context.customFunctions._GetEnabledFeatures()), + OfficeExtension.Utility.log("OsfControl activation lifecycle: Set OsfControlContainer ready for CustomFunctions"), + context._customData = "SetOsfControlContainerReadyForCustomFunctions", context.sync().then((function() { + _isNullOrUndefined(enabledFeature) || (_this._enabledFeature = enabledFeature.value); + })).catch((function(error) { + !function(error, rethrowOtherError) { + var isCellEditModeError = error instanceof OfficeExtension.Error && error.code === CustomFunctionRuntimeErrorCode.invalidOperationInCellEditMode; + if (OfficeExtension.CoreUtility.log("Error on starting custom functions: " + error), + isCellEditModeError) { + OfficeExtension.CoreUtility.log("Was in cell-edit mode, will try again"); + var delay_1 = exports.customFunctionProxy._ensureInitRetryDelayMillis; + return new OfficeExtension.CoreUtility.Promise((function(resolve) { + return setTimeout(resolve, delay_1); + })).then((function() { + return CustomFunctions.initialize(); + })); + } + if (rethrowOtherError) throw error; + }(error, !0); + })); + })); + }, CustomFunctions.prototype.setInvocationArrayResults = function(results) { + _throwIfApiNotSupported("CustomFunctions.setInvocationArrayResults", "CustomFunctions", "1.4", "Excel"), + _invokeMethod(this, "SetInvocationArrayResults", 0, [ results ], 2, 0); + }, CustomFunctions.prototype.setInvocationResults = function(results) { + _invokeMethod(this, "SetInvocationResults", 0, [ results ], 2, 0); + }, CustomFunctions.prototype._GetEnabledFeatures = function() { + return _throwIfApiNotSupported("CustomFunctions._GetEnabledFeatures", "CustomFunctions", "1.4", "Excel"), + _invokeMethod(this, "_GetEnabledFeatures", 1, [], 4, 0); + }, CustomFunctions.prototype._SetInvocationError = function(invocationId, message) { + _invokeMethod(this, "_SetInvocationError", 0, [ invocationId, message ], 2, 0); + }, CustomFunctions.prototype._SetInvocationResult = function(invocationId, result) { + _invokeMethod(this, "_SetInvocationResult", 0, [ invocationId, result ], 2, 0); + }, CustomFunctions.prototype._SetOsfControlContainerReadyForCustomFunctions = function() { + _invokeMethod(this, "_SetOsfControlContainerReadyForCustomFunctions", 0, [], 10, 0); + }, CustomFunctions.prototype._handleResult = function(value) { + (_super.prototype._handleResult.call(this, value), _isNullOrUndefined(value)) || _fixObjectPathIfNecessary(this, value); + }, CustomFunctions.prototype._handleRetrieveResult = function(value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, CustomFunctions.newObject = function(context) { + return _createTopLevelServiceObject(CustomFunctions, context, "Microsoft.ExcelServices.CustomFunctions", !1, 4); + }, CustomFunctions.prototype.toJSON = function() { + return _toJson(this, {}, {}); + }, CustomFunctions; + }(OfficeExtension.ClientObject); + exports.CustomFunctions = CustomFunctions; + var CustomFunctionRuntimeErrorCode, CustomFunctionsContainer = function(_super) { + function CustomFunctionsContainer() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(CustomFunctionsContainer, _super), Object.defineProperty(CustomFunctionsContainer.prototype, "_className", { + get: function() { + return "CustomFunctionsContainer"; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(CustomFunctionsContainer.prototype, "_navigationPropertyNames", { + get: function() { + return [ "customFunctions" ]; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(CustomFunctionsContainer.prototype, "customFunctions", { + get: function() { + return _throwIfApiNotSupported("CustomFunctionsContainer.customFunctions", "CustomFunctions", "1.2", "Excel"), + this._C || (this._C = _createPropertyObject(CustomFunctions, this, "CustomFunctions", !1, 4)), + this._C; + }, + enumerable: !1, + configurable: !0 + }), CustomFunctionsContainer.prototype._handleResult = function(value) { + if (_super.prototype._handleResult.call(this, value), !_isNullOrUndefined(value)) { + var obj = value; + _fixObjectPathIfNecessary(this, obj), _handleNavigationPropertyResults(this, obj, [ "customFunctions", "CustomFunctions" ]); + } + }, CustomFunctionsContainer.prototype.load = function(options) { + return _load(this, options); + }, CustomFunctionsContainer.prototype._handleRetrieveResult = function(value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, CustomFunctionsContainer.prototype.toJSON = function() { + return _toJson(this, {}, {}); + }, CustomFunctionsContainer; + }(OfficeExtension.ClientObject); + exports.CustomFunctionsContainer = CustomFunctionsContainer, function(CustomFunctionRuntimeErrorCode) { + CustomFunctionRuntimeErrorCode.generalException = "GeneralException", CustomFunctionRuntimeErrorCode.invalidOperation = "InvalidOperation", + CustomFunctionRuntimeErrorCode.invalidOperationInCellEditMode = "InvalidOperationInCellEditMode"; + }(CustomFunctionRuntimeErrorCode || (CustomFunctionRuntimeErrorCode = {})); +} ]); + + + +var oteljs = function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + i: moduleId, + l: !1, + exports: {} + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.l = !0, module.exports; + } + return __webpack_require__.m = modules, __webpack_require__.c = installedModules, + __webpack_require__.d = function(exports, name, getter) { + __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { + enumerable: !0, + get: getter + }); + }, __webpack_require__.r = function(exports) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(exports, "__esModule", { + value: !0 + }); + }, __webpack_require__.t = function(value, mode) { + if (1 & mode && (value = __webpack_require__(value)), 8 & mode) return value; + if (4 & mode && "object" == typeof value && value && value.__esModule) return value; + var ns = Object.create(null); + if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { + enumerable: !0, + value: value + }), 2 & mode && "string" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }, __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function() { + return module.default; + } : function() { + return module; + }; + return __webpack_require__.d(getter, "a", getter), getter; + }, __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 19); +}([ function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return makeBooleanDataField; + })), __webpack_require__.d(__webpack_exports__, "d", (function() { + return makeInt64DataField; + })), __webpack_require__.d(__webpack_exports__, "b", (function() { + return makeDoubleDataField; + })), __webpack_require__.d(__webpack_exports__, "e", (function() { + return makeStringDataField; + })), __webpack_require__.d(__webpack_exports__, "c", (function() { + return makeGuidDataField; + })); + var _DataFieldType__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3), _DataClassification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); + function makeBooleanDataField(name, value) { + return { + name: name, + dataType: _DataFieldType__WEBPACK_IMPORTED_MODULE_0__.a.Boolean, + value: value, + classification: _DataClassification__WEBPACK_IMPORTED_MODULE_1__.a.SystemMetadata + }; + } + function makeInt64DataField(name, value) { + return { + name: name, + dataType: _DataFieldType__WEBPACK_IMPORTED_MODULE_0__.a.Int64, + value: value, + classification: _DataClassification__WEBPACK_IMPORTED_MODULE_1__.a.SystemMetadata + }; + } + function makeDoubleDataField(name, value) { + return { + name: name, + dataType: _DataFieldType__WEBPACK_IMPORTED_MODULE_0__.a.Double, + value: value, + classification: _DataClassification__WEBPACK_IMPORTED_MODULE_1__.a.SystemMetadata + }; + } + function makeStringDataField(name, value) { + return { + name: name, + dataType: _DataFieldType__WEBPACK_IMPORTED_MODULE_0__.a.String, + value: value, + classification: _DataClassification__WEBPACK_IMPORTED_MODULE_1__.a.SystemMetadata + }; + } + function makeGuidDataField(name, value) { + return { + name: name, + dataType: _DataFieldType__WEBPACK_IMPORTED_MODULE_0__.a.Guid, + value: value, + classification: _DataClassification__WEBPACK_IMPORTED_MODULE_1__.a.SystemMetadata + }; + } +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "b", (function() { + return LogLevel; + })), __webpack_require__.d(__webpack_exports__, "a", (function() { + return Category; + })), __webpack_require__.d(__webpack_exports__, "e", (function() { + return onNotification; + })), __webpack_require__.d(__webpack_exports__, "d", (function() { + return logNotification; + })), __webpack_require__.d(__webpack_exports__, "c", (function() { + return logError; + })); + var LogLevel, Category, onNotificationEvent = new (__webpack_require__(10).a); + function onNotification() { + return onNotificationEvent; + } + function logNotification(level, category, message) { + onNotificationEvent.fireEvent({ + level: level, + category: category, + message: message + }); + } + function logError(category, message, error) { + logNotification(LogLevel.Error, category, (function() { + var errorMessage = error instanceof Error ? error.message : ""; + return message + ": " + errorMessage; + })); + } + !function(LogLevel) { + LogLevel[LogLevel.Error = 0] = "Error", LogLevel[LogLevel.Warning = 1] = "Warning", + LogLevel[LogLevel.Info = 2] = "Info", LogLevel[LogLevel.Verbose = 3] = "Verbose"; + }(LogLevel || (LogLevel = {})), function(Category) { + Category[Category.Core = 0] = "Core", Category[Category.Sink = 1] = "Sink", Category[Category.Transport = 2] = "Transport"; + }(Category || (Category = {})); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return addContractField; + })); + var _DataFieldHelper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); + function addContractField(dataFields, instanceName, contractName) { + dataFields.push(Object(_DataFieldHelper__WEBPACK_IMPORTED_MODULE_0__.e)("zC." + instanceName, contractName)); + } +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + var DataFieldType; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return DataFieldType; + })), function(DataFieldType) { + DataFieldType[DataFieldType.String = 0] = "String", DataFieldType[DataFieldType.Boolean = 1] = "Boolean", + DataFieldType[DataFieldType.Int64 = 2] = "Int64", DataFieldType[DataFieldType.Double = 3] = "Double", + DataFieldType[DataFieldType.Guid = 4] = "Guid"; + }(DataFieldType || (DataFieldType = {})); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + var DataClassification; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return DataClassification; + })), function(DataClassification) { + DataClassification[DataClassification.EssentialServiceMetadata = 1] = "EssentialServiceMetadata", + DataClassification[DataClassification.AccountData = 2] = "AccountData", DataClassification[DataClassification.SystemMetadata = 4] = "SystemMetadata", + DataClassification[DataClassification.OrganizationIdentifiableInformation = 8] = "OrganizationIdentifiableInformation", + DataClassification[DataClassification.EndUserIdentifiableInformation = 16] = "EndUserIdentifiableInformation", + DataClassification[DataClassification.CustomerContent = 32] = "CustomerContent", + DataClassification[DataClassification.AccessControl = 64] = "AccessControl"; + }(DataClassification || (DataClassification = {})); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + var SamplingPolicy, PersistencePriority, CostPriority, DataCategories, DiagnosticLevel; + __webpack_require__.d(__webpack_exports__, "e", (function() { + return SamplingPolicy; + })), __webpack_require__.d(__webpack_exports__, "d", (function() { + return PersistencePriority; + })), __webpack_require__.d(__webpack_exports__, "a", (function() { + return CostPriority; + })), __webpack_require__.d(__webpack_exports__, "b", (function() { + return DataCategories; + })), __webpack_require__.d(__webpack_exports__, "c", (function() { + return DiagnosticLevel; + })), function(SamplingPolicy) { + SamplingPolicy[SamplingPolicy.NotSet = 0] = "NotSet", SamplingPolicy[SamplingPolicy.Measure = 1] = "Measure", + SamplingPolicy[SamplingPolicy.Diagnostics = 2] = "Diagnostics", SamplingPolicy[SamplingPolicy.CriticalBusinessImpact = 191] = "CriticalBusinessImpact", + SamplingPolicy[SamplingPolicy.CriticalCensus = 192] = "CriticalCensus", SamplingPolicy[SamplingPolicy.CriticalExperimentation = 193] = "CriticalExperimentation", + SamplingPolicy[SamplingPolicy.CriticalUsage = 194] = "CriticalUsage"; + }(SamplingPolicy || (SamplingPolicy = {})), function(PersistencePriority) { + PersistencePriority[PersistencePriority.NotSet = 0] = "NotSet", PersistencePriority[PersistencePriority.Normal = 1] = "Normal", + PersistencePriority[PersistencePriority.High = 2] = "High"; + }(PersistencePriority || (PersistencePriority = {})), function(CostPriority) { + CostPriority[CostPriority.NotSet = 0] = "NotSet", CostPriority[CostPriority.Normal = 1] = "Normal", + CostPriority[CostPriority.High = 2] = "High"; + }(CostPriority || (CostPriority = {})), function(DataCategories) { + DataCategories[DataCategories.NotSet = 0] = "NotSet", DataCategories[DataCategories.SoftwareSetup = 1] = "SoftwareSetup", + DataCategories[DataCategories.ProductServiceUsage = 2] = "ProductServiceUsage", + DataCategories[DataCategories.ProductServicePerformance = 4] = "ProductServicePerformance", + DataCategories[DataCategories.DeviceConfiguration = 8] = "DeviceConfiguration", + DataCategories[DataCategories.InkingTypingSpeech = 16] = "InkingTypingSpeech"; + }(DataCategories || (DataCategories = {})), function(DiagnosticLevel) { + DiagnosticLevel[DiagnosticLevel.ReservedDoNotUse = 0] = "ReservedDoNotUse", DiagnosticLevel[DiagnosticLevel.BasicEvent = 10] = "BasicEvent", + DiagnosticLevel[DiagnosticLevel.FullEvent = 100] = "FullEvent", DiagnosticLevel[DiagnosticLevel.NecessaryServiceDataEvent = 110] = "NecessaryServiceDataEvent", + DiagnosticLevel[DiagnosticLevel.AlwaysOnNecessaryServiceDataEvent = 120] = "AlwaysOnNecessaryServiceDataEvent"; + }(DiagnosticLevel || (DiagnosticLevel = {})); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return Contracts; + })); + var officeeventschema_tml_Result, officeeventschema_tml_Activity, Activity, officeeventschema_tml_Host, officeeventschema_tml_User, officeeventschema_tml_SDX, officeeventschema_tml_Funnel, officeeventschema_tml_UserAction, Office_System_Error_Error, DataFieldHelper = __webpack_require__(0), Contract = __webpack_require__(2); + (officeeventschema_tml_Result || (officeeventschema_tml_Result = {})).getFields = function(instanceName, contract) { + var dataFields = []; + return dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Code", contract.code)), + void 0 !== contract.type && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Type", contract.type)), + void 0 !== contract.tag && dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Tag", contract.tag)), + void 0 !== contract.isExpected && dataFields.push(Object(DataFieldHelper.a)(instanceName + ".IsExpected", contract.isExpected)), + Object(Contract.a)(dataFields, instanceName, "Office.System.Result"), dataFields; + }, (Activity = officeeventschema_tml_Activity || (officeeventschema_tml_Activity = {})).contractName = "Office.System.Activity", + Activity.getFields = function(contract) { + var dataFields = []; + return void 0 !== contract.cV && dataFields.push(Object(DataFieldHelper.e)("Activity.CV", contract.cV)), + dataFields.push(Object(DataFieldHelper.d)("Activity.Duration", contract.duration)), + dataFields.push(Object(DataFieldHelper.d)("Activity.Count", contract.count)), dataFields.push(Object(DataFieldHelper.d)("Activity.AggMode", contract.aggMode)), + void 0 !== contract.success && dataFields.push(Object(DataFieldHelper.a)("Activity.Success", contract.success)), + void 0 !== contract.result && dataFields.push.apply(dataFields, officeeventschema_tml_Result.getFields("Activity.Result", contract.result)), + Object(Contract.a)(dataFields, "Activity", Activity.contractName), dataFields; + }, (officeeventschema_tml_Host || (officeeventschema_tml_Host = {})).getFields = function(instanceName, contract) { + var dataFields = []; + return void 0 !== contract.id && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Id", contract.id)), + void 0 !== contract.version && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Version", contract.version)), + void 0 !== contract.sessionId && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".SessionId", contract.sessionId)), + Object(Contract.a)(dataFields, instanceName, "Office.System.Host"), dataFields; + }, (officeeventschema_tml_User || (officeeventschema_tml_User = {})).getFields = function(instanceName, contract) { + var dataFields = []; + return void 0 !== contract.alias && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Alias", contract.alias)), + void 0 !== contract.primaryIdentityHash && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".PrimaryIdentityHash", contract.primaryIdentityHash)), + void 0 !== contract.primaryIdentitySpace && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".PrimaryIdentitySpace", contract.primaryIdentitySpace)), + void 0 !== contract.tenantId && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".TenantId", contract.tenantId)), + void 0 !== contract.tenantGroup && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".TenantGroup", contract.tenantGroup)), + void 0 !== contract.isAnonymous && dataFields.push(Object(DataFieldHelper.a)(instanceName + ".IsAnonymous", contract.isAnonymous)), + Object(Contract.a)(dataFields, instanceName, "Office.System.User"), dataFields; + }, (officeeventschema_tml_SDX || (officeeventschema_tml_SDX = {})).getFields = function(instanceName, contract) { + var dataFields = []; + return void 0 !== contract.id && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Id", contract.id)), + void 0 !== contract.version && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Version", contract.version)), + void 0 !== contract.instanceId && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".InstanceId", contract.instanceId)), + void 0 !== contract.name && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Name", contract.name)), + void 0 !== contract.marketplaceType && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".MarketplaceType", contract.marketplaceType)), + void 0 !== contract.sessionId && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".SessionId", contract.sessionId)), + void 0 !== contract.browserToken && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".BrowserToken", contract.browserToken)), + void 0 !== contract.osfRuntimeVersion && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".OsfRuntimeVersion", contract.osfRuntimeVersion)), + void 0 !== contract.officeJsVersion && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".OfficeJsVersion", contract.officeJsVersion)), + void 0 !== contract.hostJsVersion && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".HostJsVersion", contract.hostJsVersion)), + void 0 !== contract.assetId && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".AssetId", contract.assetId)), + void 0 !== contract.providerName && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".ProviderName", contract.providerName)), + void 0 !== contract.type && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Type", contract.type)), + Object(Contract.a)(dataFields, instanceName, "Office.System.SDX"), dataFields; + }, (officeeventschema_tml_Funnel || (officeeventschema_tml_Funnel = {})).getFields = function(instanceName, contract) { + var dataFields = []; + return void 0 !== contract.name && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Name", contract.name)), + void 0 !== contract.state && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".State", contract.state)), + Object(Contract.a)(dataFields, instanceName, "Office.System.Funnel"), dataFields; + }, (officeeventschema_tml_UserAction || (officeeventschema_tml_UserAction = {})).getFields = function(instanceName, contract) { + var dataFields = []; + return void 0 !== contract.id && dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Id", contract.id)), + void 0 !== contract.name && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Name", contract.name)), + void 0 !== contract.commandSurface && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".CommandSurface", contract.commandSurface)), + void 0 !== contract.parentName && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".ParentName", contract.parentName)), + void 0 !== contract.triggerMethod && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".TriggerMethod", contract.triggerMethod)), + void 0 !== contract.timeOffsetMs && dataFields.push(Object(DataFieldHelper.d)(instanceName + ".TimeOffsetMs", contract.timeOffsetMs)), + Object(Contract.a)(dataFields, instanceName, "Office.System.UserAction"), dataFields; + }, function(Error) { + Error.getFields = function(instanceName, contract) { + var dataFields = []; + return dataFields.push(Object(DataFieldHelper.e)(instanceName + ".ErrorGroup", contract.errorGroup)), + dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Tag", contract.tag)), + void 0 !== contract.code && dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Code", contract.code)), + void 0 !== contract.id && dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Id", contract.id)), + void 0 !== contract.count && dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Count", contract.count)), + Object(Contract.a)(dataFields, instanceName, "Office.System.Error"), dataFields; + }; + }(Office_System_Error_Error || (Office_System_Error_Error = {})); + var Contracts, _Activity = officeeventschema_tml_Activity, _Result = officeeventschema_tml_Result, _Error = Office_System_Error_Error, _Funnel = officeeventschema_tml_Funnel, _Host = officeeventschema_tml_Host, _SDX = officeeventschema_tml_SDX, _UserAction = officeeventschema_tml_UserAction, _User = officeeventschema_tml_User; + !function(Contracts) { + !function(Office) { + !function(System) { + System.Activity = _Activity, System.Result = _Result, System.Error = _Error, System.Funnel = _Funnel, + System.Host = _Host, System.SDX = _SDX, System.User = _User, System.UserAction = _UserAction; + }(Office.System || (Office.System = {})); + }(Contracts.Office || (Contracts.Office = {})); + }(Contracts || (Contracts = {})); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + function cloneEvent(event) { + var localEvent = { + eventName: event.eventName, + eventFlags: event.eventFlags + }; + return event.telemetryProperties && (localEvent.telemetryProperties = { + ariaTenantToken: event.telemetryProperties.ariaTenantToken, + nexusTenantToken: event.telemetryProperties.nexusTenantToken + }), event.eventContract && (localEvent.eventContract = { + name: event.eventContract.name, + dataFields: event.eventContract.dataFields.slice() + }), localEvent.dataFields = event.dataFields ? event.dataFields.slice() : [], localEvent; + } + __webpack_require__.d(__webpack_exports__, "a", (function() { + return cloneEvent; + })); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "b", (function() { + return SuppressNexus; + })), __webpack_require__.d(__webpack_exports__, "a", (function() { + return SimpleTelemetryLogger_SimpleTelemetryLogger; + })); + var TokenType, TenantTokenManager_TenantTokenManager, TelemetryEvent = __webpack_require__(7), OTelNotifications = __webpack_require__(1); + !function(TokenType) { + TokenType[TokenType.Aria = 0] = "Aria", TokenType[TokenType.Nexus = 1] = "Nexus"; + }(TokenType || (TokenType = {})), function(TenantTokenManager) { + var ariaTokenMap = {}, nexusTokenMap = {}, tenantTokens = {}; + function setTenantTokens(tokenTree) { + if ("object" != typeof tokenTree) throw new Error("tokenTree must be an object"); + tenantTokens = function mergeTenantTokens(existingTokenTree, newTokenTree) { + if ("object" != typeof newTokenTree) return newTokenTree; + for (var _i = 0, _a = Object.keys(newTokenTree); _i < _a.length; _i++) { + var key = _a[_i]; + key in existingTokenTree && (existingTokenTree[key], 1) ? existingTokenTree[key] = mergeTenantTokens(existingTokenTree[key], newTokenTree[key]) : existingTokenTree[key] = newTokenTree[key]; + } + return existingTokenTree; + }(tenantTokens, tokenTree); + } + function getAriaTenantToken(eventName) { + if (ariaTokenMap[eventName]) return ariaTokenMap[eventName]; + var ariaToken = getTenantToken(eventName, TokenType.Aria); + return "string" == typeof ariaToken ? (ariaTokenMap[eventName] = ariaToken, ariaToken) : void 0; + } + function getNexusTenantToken(eventName) { + if (nexusTokenMap[eventName]) return nexusTokenMap[eventName]; + var nexusToken = getTenantToken(eventName, TokenType.Nexus); + return "number" == typeof nexusToken ? (nexusTokenMap[eventName] = nexusToken, nexusToken) : void 0; + } + function getTenantToken(eventName, tokenType) { + var pieces = eventName.split("."), node = tenantTokens, token = void 0; + if (node) { + for (var i = 0; i < pieces.length - 1; i++) node[pieces[i]] && (node = node[pieces[i]], + tokenType === TokenType.Aria && "string" == typeof node.ariaTenantToken ? token = node.ariaTenantToken : tokenType === TokenType.Nexus && "number" == typeof node.nexusTenantToken && (token = node.nexusTenantToken)); + return token; + } + } + TenantTokenManager.setTenantToken = function(namespace, ariaTenantToken, nexusTenantToken) { + var parts = namespace.split("."); + if (parts.length < 2 || "Office" !== parts[0]) Object(OTelNotifications.d)(OTelNotifications.b.Error, OTelNotifications.a.Core, (function() { + return "Invalid namespace: " + namespace; + })); else { + var leaf = Object.create(Object.prototype); + ariaTenantToken && (leaf.ariaTenantToken = ariaTenantToken), nexusTenantToken && (leaf.nexusTenantToken = nexusTenantToken); + var index, node = leaf; + for (index = parts.length - 1; index >= 0; --index) { + var parentNode = Object.create(Object.prototype); + parentNode[parts[index]] = node, node = parentNode; + } + setTenantTokens(node); + } + }, TenantTokenManager.setTenantTokens = setTenantTokens, TenantTokenManager.getTenantTokens = function(eventName) { + var ariaTenantToken = getAriaTenantToken(eventName), nexusTenantToken = getNexusTenantToken(eventName); + if (!nexusTenantToken || !ariaTenantToken) throw new Error("Could not find tenant token for " + eventName); + return { + ariaTenantToken: ariaTenantToken, + nexusTenantToken: nexusTenantToken + }; + }, TenantTokenManager.getAriaTenantToken = getAriaTenantToken, TenantTokenManager.getNexusTenantToken = getNexusTenantToken, + TenantTokenManager.clear = function() { + ariaTokenMap = {}, nexusTokenMap = {}, tenantTokens = {}; + }; + }(TenantTokenManager_TenantTokenManager || (TenantTokenManager_TenantTokenManager = {})); + var TelemetryEventValidator_TelemetryEventValidator, DataFieldType = __webpack_require__(3); + !function(TelemetryEventValidator) { + var StartsWithCapitalRegex = /^[A-Z][a-zA-Z0-9]*$/, AlphanumericRegex = /^[a-zA-Z0-9_\.]*$/; + function isNameValid(name) { + return void 0 !== name && AlphanumericRegex.test(name); + } + function validateDataField(dataField) { + if (!((dataFieldName = dataField.name) && isNameValid(dataFieldName) && dataFieldName.length + 5 < 100)) throw new Error("Invalid dataField name"); + var dataFieldName; + dataField.dataType === DataFieldType.a.Int64 && validateInt(dataField.value); + } + function validateInt(value) { + if ("number" != typeof value || !isFinite(value) || Math.floor(value) !== value || value < -9007199254740991 || value > 9007199254740991) throw new Error("Invalid integer " + JSON.stringify(value)); + } + TelemetryEventValidator.validateTelemetryEvent = function(event) { + if (!function(eventName) { + if (!eventName || eventName.length > 98) return !1; + var eventNamePieces = eventName.split("."), eventNodeName = eventNamePieces[eventNamePieces.length - 1]; + return function(eventNamePieces) { + return !!eventNamePieces && eventNamePieces.length >= 3 && "Office" === eventNamePieces[0]; + }(eventNamePieces) && (eventNode = eventNodeName, void 0 !== eventNode && StartsWithCapitalRegex.test(eventNode)); + var eventNode; + }(event.eventName)) throw new Error("Invalid eventName"); + if (event.eventContract && !isNameValid(event.eventContract.name)) throw new Error("Invalid eventContract"); + if (null != event.dataFields) for (var i = 0; i < event.dataFields.length; i++) validateDataField(event.dataFields[i]); + }, TelemetryEventValidator.validateInt = validateInt; + }(TelemetryEventValidator_TelemetryEventValidator || (TelemetryEventValidator_TelemetryEventValidator = {})); + var Event = __webpack_require__(10), DataFieldHelper = __webpack_require__(0), __assign = function() { + return (__assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) for (var p in s = arguments[i]) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]); + return t; + }).apply(this, arguments); + }, SuppressNexus = -1, SimpleTelemetryLogger_SimpleTelemetryLogger = function() { + function SimpleTelemetryLogger(parent, persistentDataFields, config) { + var _a, _b; + this.onSendEvent = new Event.a, this.persistentDataFields = [], this.config = config || {}, + parent && (this.onSendEvent = parent.onSendEvent, (_a = this.persistentDataFields).push.apply(_a, parent.persistentDataFields), + this.config = __assign(__assign({}, parent.getConfig()), this.config)), persistentDataFields && (_b = this.persistentDataFields).push.apply(_b, persistentDataFields); + } + return SimpleTelemetryLogger.prototype.sendTelemetryEvent = function(event) { + var localEvent; + try { + if (0 === this.onSendEvent.getListenerCount()) return void Object(OTelNotifications.d)(OTelNotifications.b.Warning, OTelNotifications.a.Core, (function() { + return "No telemetry sinks are attached."; + })); + localEvent = this.cloneEvent(event), this.processTelemetryEvent(localEvent); + } catch (error) { + return void Object(OTelNotifications.c)(OTelNotifications.a.Core, "SendTelemetryEvent", error); + } + try { + this.onSendEvent.fireEvent(localEvent); + } catch (_e) {} + }, SimpleTelemetryLogger.prototype.processTelemetryEvent = function(event) { + var _a; + event.telemetryProperties || (event.telemetryProperties = TenantTokenManager_TenantTokenManager.getTenantTokens(event.eventName)), + event.dataFields && (event.dataFields.unshift(Object(DataFieldHelper.e)("OTelJS.Version", "3.1.74")), + this.persistentDataFields && (_a = event.dataFields).unshift.apply(_a, this.persistentDataFields)), + this.config.disableValidation || TelemetryEventValidator_TelemetryEventValidator.validateTelemetryEvent(event); + }, SimpleTelemetryLogger.prototype.addSink = function(sink) { + this.onSendEvent.addListener((function(event) { + return sink.sendTelemetryEvent(event); + })); + }, SimpleTelemetryLogger.prototype.setTenantToken = function(namespace, ariaTenantToken, nexusTenantToken) { + TenantTokenManager_TenantTokenManager.setTenantToken(namespace, ariaTenantToken, nexusTenantToken); + }, SimpleTelemetryLogger.prototype.setTenantTokens = function(tokenTree) { + TenantTokenManager_TenantTokenManager.setTenantTokens(tokenTree); + }, SimpleTelemetryLogger.prototype.cloneEvent = function(event) { + return Object(TelemetryEvent.a)(event); + }, SimpleTelemetryLogger.prototype.getConfig = function() { + return this.config; + }, SimpleTelemetryLogger; + }(); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + var CorrelationVector; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return Activity_ActivityScope; + })), function(CorrelationVector) { + var baseHash, baseId = 0; + CorrelationVector.getNext = function() { + return void 0 === baseHash && (baseHash = function() { + for (var characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", result = [], i = 0; i < 22; i++) result.push(characters.charAt(Math.floor(Math.random() * characters.length))); + return result.join(""); + }()), new CV(baseHash, ++baseId); + }, CorrelationVector.getNextChild = function(parent) { + return new CV(parent.getString(), ++parent.nextChild); + }; + var CV = function() { + function CV(base, id) { + this.base = base, this.id = id, this.nextChild = 0; + } + return CV.prototype.getString = function() { + return this.base + "." + this.id; + }, CV; + }(); + CorrelationVector.CV = CV; + }(CorrelationVector || (CorrelationVector = {})); + var OTelNotifications = __webpack_require__(1), __awaiter = function(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))((function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + } + function step(result) { + var value; + result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P((function(resolve) { + resolve(value); + }))).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + })); + }, __generator = function(thisArg, body) { + var f, y, t, g, _ = { + label: 0, + sent: function() { + if (1 & t[0]) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }; + return g = { + next: verb(0), + throw: verb(1), + return: verb(2) + }, "function" == typeof Symbol && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return function(op) { + if (f) throw new TypeError("Generator is already executing."); + for (;_; ) try { + if (f = 1, y && (t = 2 & op[0] ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), + 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + switch (y = 0, t && (op = [ 2 & op[0], t.value ]), op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + return _.label++, { + value: op[1], + done: !1 + }; + + case 5: + _.label++, y = op[1], op = [ 0 ]; + continue; + + case 7: + op = _.ops.pop(), _.trys.pop(); + continue; + + default: + if (!(t = _.trys, (t = t.length > 0 && t[t.length - 1]) || 6 !== op[0] && 2 !== op[0])) { + _ = 0; + continue; + } + if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (6 === op[0] && _.label < t[1]) { + _.label = t[1], t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2], _.ops.push(op); + break; + } + t[2] && _.ops.pop(), _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [ 6, e ], y = 0; + } finally { + f = t = 0; + } + if (5 & op[0]) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: !0 + }; + }([ n, v ]); + }; + } + }, getCurrentMicroseconds = function() { + return 1e3 * Date.now(); + }; + "object" == typeof window && "object" == typeof window.performance && "now" in window.performance && (getCurrentMicroseconds = function() { + return 1e3 * Math.floor(window.performance.now()); + }); + var Activity_ActivityScope = function() { + function ActivityScope(telemetryLogger, activityName, parent) { + this._optionalEventFlags = {}, this._ended = !1, this._telemetryLogger = telemetryLogger, + this._activityName = activityName, this._cv = parent ? CorrelationVector.getNextChild(parent._cv) : CorrelationVector.getNext(), + this._dataFields = [], this._success = void 0, this._startTime = getCurrentMicroseconds(); + } + return ActivityScope.createNew = function(telemetryLogger, activityName) { + return new ActivityScope(telemetryLogger, activityName); + }, ActivityScope.prototype.createChildActivity = function(activityName) { + return new ActivityScope(this._telemetryLogger, activityName, this); + }, ActivityScope.prototype.setEventFlags = function(eventFlags) { + this._optionalEventFlags = eventFlags; + }, ActivityScope.prototype.addDataField = function(dataField) { + this._dataFields.push(dataField); + }, ActivityScope.prototype.addDataFields = function(dataFields) { + var _a; + (_a = this._dataFields).push.apply(_a, dataFields); + }, ActivityScope.prototype.setSuccess = function(success) { + this._success = success; + }, ActivityScope.prototype.setResult = function(code, type, tag) { + this._result = { + code: code, + type: type, + tag: tag + }; + }, ActivityScope.prototype.endNow = function() { + if (!this._ended) { + void 0 === this._success && void 0 === this._result && Object(OTelNotifications.d)(OTelNotifications.b.Warning, OTelNotifications.a.Core, (function() { + return "Activity does not have success or result set"; + })); + var duration = getCurrentMicroseconds() - this._startTime; + this._ended = !0; + var activity = { + duration: duration, + count: 1, + aggMode: 0, + cV: this._cv.getString(), + success: this._success, + result: this._result + }; + return this._telemetryLogger.sendActivity(this._activityName, activity, this._dataFields, this._optionalEventFlags); + } + Object(OTelNotifications.d)(OTelNotifications.b.Error, OTelNotifications.a.Core, (function() { + return "Activity has already ended"; + })); + }, ActivityScope.prototype.executeAsync = function(activityBody) { + return __awaiter(this, void 0, void 0, (function() { + var _this = this; + return __generator(this, (function(_a) { + return [ 2, activityBody(this).then((function(result) { + return _this.endNow(), result; + })).catch((function(e) { + throw _this.endNow(), e; + })) ]; + })); + })); + }, ActivityScope.prototype.executeSync = function(activityBody) { + try { + var ret = activityBody(this); + return this.endNow(), ret; + } catch (e) { + throw this.endNow(), e; + } + }, ActivityScope.prototype.executeChildActivityAsync = function(activityName, activityBody) { + return __awaiter(this, void 0, void 0, (function() { + return __generator(this, (function(_a) { + return [ 2, this.createChildActivity(activityName).executeAsync(activityBody) ]; + })); + })); + }, ActivityScope.prototype.executeChildActivitySync = function(activityName, activityBody) { + return this.createChildActivity(activityName).executeSync(activityBody); + }, ActivityScope; + }(); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return Event; + })); + var Event = function() { + function Event() { + this._listeners = []; + } + return Event.prototype.fireEvent = function(args) { + this._listeners.forEach((function(listener) { + return listener(args); + })); + }, Event.prototype.addListener = function(listener) { + listener && this._listeners.push(listener); + }, Event.prototype.removeListener = function(listener) { + this._listeners = this._listeners.filter((function(h) { + return h !== listener; + })); + }, Event.prototype.getListenerCount = function() { + return this._listeners.length; + }, Event; + }(); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.r(__webpack_exports__); + var _contracts_Contracts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6); + __webpack_require__.d(__webpack_exports__, "Contracts", (function() { + return _contracts_Contracts__WEBPACK_IMPORTED_MODULE_0__.a; + })); + var _Activity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); + __webpack_require__.d(__webpack_exports__, "ActivityScope", (function() { + return _Activity__WEBPACK_IMPORTED_MODULE_1__.a; + })); + var _Contract__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2); + __webpack_require__.d(__webpack_exports__, "addContractField", (function() { + return _Contract__WEBPACK_IMPORTED_MODULE_2__.a; + })); + var _CustomContract__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12); + __webpack_require__.d(__webpack_exports__, "getFieldsForContract", (function() { + return _CustomContract__WEBPACK_IMPORTED_MODULE_3__.a; + })); + var _DataClassification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4); + __webpack_require__.d(__webpack_exports__, "DataClassification", (function() { + return _DataClassification__WEBPACK_IMPORTED_MODULE_4__.a; + })); + var _DataField__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(13); + for (var __WEBPACK_IMPORT_KEY__ in _DataField__WEBPACK_IMPORTED_MODULE_5__) [ "default", "Contracts", "ActivityScope", "addContractField", "getFieldsForContract", "DataClassification" ].indexOf(__WEBPACK_IMPORT_KEY__) < 0 && function(key) { + __webpack_require__.d(__webpack_exports__, key, (function() { + return _DataField__WEBPACK_IMPORTED_MODULE_5__[key]; + })); + }(__WEBPACK_IMPORT_KEY__); + var _DataFieldHelper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(0); + __webpack_require__.d(__webpack_exports__, "makeBooleanDataField", (function() { + return _DataFieldHelper__WEBPACK_IMPORTED_MODULE_6__.a; + })), __webpack_require__.d(__webpack_exports__, "makeInt64DataField", (function() { + return _DataFieldHelper__WEBPACK_IMPORTED_MODULE_6__.d; + })), __webpack_require__.d(__webpack_exports__, "makeDoubleDataField", (function() { + return _DataFieldHelper__WEBPACK_IMPORTED_MODULE_6__.b; + })), __webpack_require__.d(__webpack_exports__, "makeStringDataField", (function() { + return _DataFieldHelper__WEBPACK_IMPORTED_MODULE_6__.e; + })), __webpack_require__.d(__webpack_exports__, "makeGuidDataField", (function() { + return _DataFieldHelper__WEBPACK_IMPORTED_MODULE_6__.c; + })); + var _DataFieldType__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3); + __webpack_require__.d(__webpack_exports__, "DataFieldType", (function() { + return _DataFieldType__WEBPACK_IMPORTED_MODULE_7__.a; + })); + var _EventFlagFiller__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14); + __webpack_require__.d(__webpack_exports__, "getEffectiveEventFlags", (function() { + return _EventFlagFiller__WEBPACK_IMPORTED_MODULE_8__.a; + })); + var _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(5); + __webpack_require__.d(__webpack_exports__, "SamplingPolicy", (function() { + return _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_9__.e; + })), __webpack_require__.d(__webpack_exports__, "PersistencePriority", (function() { + return _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_9__.d; + })), __webpack_require__.d(__webpack_exports__, "CostPriority", (function() { + return _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_9__.a; + })), __webpack_require__.d(__webpack_exports__, "DataCategories", (function() { + return _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_9__.b; + })), __webpack_require__.d(__webpack_exports__, "DiagnosticLevel", (function() { + return _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_9__.c; + })); + var _OptionalEventFlags__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(15); + for (var __WEBPACK_IMPORT_KEY__ in _OptionalEventFlags__WEBPACK_IMPORTED_MODULE_10__) [ "default", "Contracts", "ActivityScope", "addContractField", "getFieldsForContract", "DataClassification", "makeBooleanDataField", "makeInt64DataField", "makeDoubleDataField", "makeStringDataField", "makeGuidDataField", "DataFieldType", "getEffectiveEventFlags", "SamplingPolicy", "PersistencePriority", "CostPriority", "DataCategories", "DiagnosticLevel" ].indexOf(__WEBPACK_IMPORT_KEY__) < 0 && function(key) { + __webpack_require__.d(__webpack_exports__, key, (function() { + return _OptionalEventFlags__WEBPACK_IMPORTED_MODULE_10__[key]; + })); + }(__WEBPACK_IMPORT_KEY__); + var _OTelNotifications__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(1); + __webpack_require__.d(__webpack_exports__, "LogLevel", (function() { + return _OTelNotifications__WEBPACK_IMPORTED_MODULE_11__.b; + })), __webpack_require__.d(__webpack_exports__, "Category", (function() { + return _OTelNotifications__WEBPACK_IMPORTED_MODULE_11__.a; + })), __webpack_require__.d(__webpack_exports__, "onNotification", (function() { + return _OTelNotifications__WEBPACK_IMPORTED_MODULE_11__.e; + })), __webpack_require__.d(__webpack_exports__, "logNotification", (function() { + return _OTelNotifications__WEBPACK_IMPORTED_MODULE_11__.d; + })), __webpack_require__.d(__webpack_exports__, "logError", (function() { + return _OTelNotifications__WEBPACK_IMPORTED_MODULE_11__.c; + })); + var _SimpleTelemetryLogger__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(8); + __webpack_require__.d(__webpack_exports__, "SuppressNexus", (function() { + return _SimpleTelemetryLogger__WEBPACK_IMPORTED_MODULE_12__.b; + })), __webpack_require__.d(__webpack_exports__, "SimpleTelemetryLogger", (function() { + return _SimpleTelemetryLogger__WEBPACK_IMPORTED_MODULE_12__.a; + })); + var _TelemetryLogger__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(16); + __webpack_require__.d(__webpack_exports__, "TelemetryLogger", (function() { + return _TelemetryLogger__WEBPACK_IMPORTED_MODULE_13__.a; + })); + var _TelemetryEvent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(7); + __webpack_require__.d(__webpack_exports__, "cloneEvent", (function() { + return _TelemetryEvent__WEBPACK_IMPORTED_MODULE_14__.a; + })); + var _TelemetryProperties__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(17); + for (var __WEBPACK_IMPORT_KEY__ in _TelemetryProperties__WEBPACK_IMPORTED_MODULE_15__) [ "default", "Contracts", "ActivityScope", "addContractField", "getFieldsForContract", "DataClassification", "makeBooleanDataField", "makeInt64DataField", "makeDoubleDataField", "makeStringDataField", "makeGuidDataField", "DataFieldType", "getEffectiveEventFlags", "SamplingPolicy", "PersistencePriority", "CostPriority", "DataCategories", "DiagnosticLevel", "LogLevel", "Category", "onNotification", "logNotification", "logError", "SuppressNexus", "SimpleTelemetryLogger", "TelemetryLogger", "cloneEvent" ].indexOf(__WEBPACK_IMPORT_KEY__) < 0 && function(key) { + __webpack_require__.d(__webpack_exports__, key, (function() { + return _TelemetryProperties__WEBPACK_IMPORTED_MODULE_15__[key]; + })); + }(__WEBPACK_IMPORT_KEY__); + var _TelemetrySink__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(18); + for (var __WEBPACK_IMPORT_KEY__ in _TelemetrySink__WEBPACK_IMPORTED_MODULE_16__) [ "default", "Contracts", "ActivityScope", "addContractField", "getFieldsForContract", "DataClassification", "makeBooleanDataField", "makeInt64DataField", "makeDoubleDataField", "makeStringDataField", "makeGuidDataField", "DataFieldType", "getEffectiveEventFlags", "SamplingPolicy", "PersistencePriority", "CostPriority", "DataCategories", "DiagnosticLevel", "LogLevel", "Category", "onNotification", "logNotification", "logError", "SuppressNexus", "SimpleTelemetryLogger", "TelemetryLogger", "cloneEvent" ].indexOf(__WEBPACK_IMPORT_KEY__) < 0 && function(key) { + __webpack_require__.d(__webpack_exports__, key, (function() { + return _TelemetrySink__WEBPACK_IMPORTED_MODULE_16__[key]; + })); + }(__WEBPACK_IMPORT_KEY__); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return getFieldsForContract; + })); + var _Contract__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); + function getFieldsForContract(instanceName, contractName, contractFields) { + var dataFields = contractFields.map((function(contractField) { + return { + name: instanceName + "." + contractField.name, + value: contractField.value, + dataType: contractField.dataType + }; + })); + return Object(_Contract__WEBPACK_IMPORTED_MODULE_0__.a)(dataFields, instanceName, contractName), + dataFields; + } +}, function(module, exports) {}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return getEffectiveEventFlags; + })); + var _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5), ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); + function getEffectiveEventFlags(telemetryEvent) { + var eventFlags = { + costPriority: _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_0__.a.Normal, + samplingPolicy: _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_0__.e.Measure, + persistencePriority: _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_0__.d.Normal, + dataCategories: _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_0__.b.NotSet, + diagnosticLevel: _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_0__.c.FullEvent + }; + return telemetryEvent.eventFlags && telemetryEvent.eventFlags.dataCategories || Object(___WEBPACK_IMPORTED_MODULE_1__.d)(___WEBPACK_IMPORTED_MODULE_1__.b.Error, ___WEBPACK_IMPORTED_MODULE_1__.a.Core, (function() { + return "Event is missing DataCategories event flag"; + })), telemetryEvent.eventFlags ? (telemetryEvent.eventFlags.costPriority && (eventFlags.costPriority = telemetryEvent.eventFlags.costPriority), + telemetryEvent.eventFlags.samplingPolicy && (eventFlags.samplingPolicy = telemetryEvent.eventFlags.samplingPolicy), + telemetryEvent.eventFlags.persistencePriority && (eventFlags.persistencePriority = telemetryEvent.eventFlags.persistencePriority), + telemetryEvent.eventFlags.dataCategories && (eventFlags.dataCategories = telemetryEvent.eventFlags.dataCategories), + telemetryEvent.eventFlags.diagnosticLevel && (eventFlags.diagnosticLevel = telemetryEvent.eventFlags.diagnosticLevel), + eventFlags) : eventFlags; + } +}, function(module, exports) {}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return TelemetryLogger; + })); + var extendStatics, _SimpleTelemetryLogger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8), _Activity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9), _contracts_Contracts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6), __extends = (extendStatics = function(d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]); + })(d, b); + }, function(d, b) { + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }), __awaiter = function(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))((function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + } + function step(result) { + var value; + result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P((function(resolve) { + resolve(value); + }))).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + })); + }, __generator = function(thisArg, body) { + var f, y, t, g, _ = { + label: 0, + sent: function() { + if (1 & t[0]) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }; + return g = { + next: verb(0), + throw: verb(1), + return: verb(2) + }, "function" == typeof Symbol && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return function(op) { + if (f) throw new TypeError("Generator is already executing."); + for (;_; ) try { + if (f = 1, y && (t = 2 & op[0] ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), + 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + switch (y = 0, t && (op = [ 2 & op[0], t.value ]), op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + return _.label++, { + value: op[1], + done: !1 + }; + + case 5: + _.label++, y = op[1], op = [ 0 ]; + continue; + + case 7: + op = _.ops.pop(), _.trys.pop(); + continue; + + default: + if (!(t = _.trys, (t = t.length > 0 && t[t.length - 1]) || 6 !== op[0] && 2 !== op[0])) { + _ = 0; + continue; + } + if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (6 === op[0] && _.label < t[1]) { + _.label = t[1], t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2], _.ops.push(op); + break; + } + t[2] && _.ops.pop(), _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [ 6, e ], y = 0; + } finally { + f = t = 0; + } + if (5 & op[0]) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: !0 + }; + }([ n, v ]); + }; + } + }, TelemetryLogger = function(_super) { + function TelemetryLogger() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(TelemetryLogger, _super), TelemetryLogger.prototype.executeActivityAsync = function(activityName, activityBody) { + return __awaiter(this, void 0, void 0, (function() { + return __generator(this, (function(_a) { + return [ 2, this.createNewActivity(activityName).executeAsync(activityBody) ]; + })); + })); + }, TelemetryLogger.prototype.executeActivitySync = function(activityName, activityBody) { + return this.createNewActivity(activityName).executeSync(activityBody); + }, TelemetryLogger.prototype.createNewActivity = function(activityName) { + return _Activity__WEBPACK_IMPORTED_MODULE_1__.a.createNew(this, activityName); + }, TelemetryLogger.prototype.sendActivity = function(activityName, activity, dataFields, optionalEventFlags) { + return this.sendTelemetryEvent({ + eventName: activityName, + eventContract: { + name: _contracts_Contracts__WEBPACK_IMPORTED_MODULE_2__.a.Office.System.Activity.contractName, + dataFields: _contracts_Contracts__WEBPACK_IMPORTED_MODULE_2__.a.Office.System.Activity.getFields(activity) + }, + dataFields: dataFields, + eventFlags: optionalEventFlags + }); + }, TelemetryLogger.prototype.sendError = function(error) { + var dataFields = _contracts_Contracts__WEBPACK_IMPORTED_MODULE_2__.a.Office.System.Error.getFields("Error", error.error); + return null != error.dataFields && dataFields.push.apply(dataFields, error.dataFields), + this.sendTelemetryEvent({ + eventName: error.eventName, + dataFields: dataFields, + eventFlags: error.eventFlags + }); + }, TelemetryLogger; + }(_SimpleTelemetryLogger__WEBPACK_IMPORTED_MODULE_0__.a); +}, function(module, exports) {}, function(module, exports) {}, function(module, exports, __webpack_require__) { + module.exports = __webpack_require__(11); +} ]); \ No newline at end of file diff --git a/dist/custom-functions-runtime.js b/dist/custom-functions-runtime.js new file mode 100644 index 000000000..0b32097dd --- /dev/null +++ b/dist/custom-functions-runtime.js @@ -0,0 +1,52 @@ +/* Office JavaScript API library - Custom Functions */ + +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + This file incorporates the "whatwg-fetch" implementation, version 2.0.3, licensed under MIT with the following licensing notice: + (See github.com/github/fetch/blob/master/LICENSE) + + Copyright (c) 2014-2016 GitHub, Inc. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +*/ + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + + This file also contains the following Promise implementation (with a few small modifications): + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 2.3.0 +*/ +var OSF=OSF||{};OSF.ConstantNames={FileVersion:"0.0.0.0",OfficeJS:"custom-functions-runtime.js",OfficeDebugJS:"custom-functions-runtime.debug.js",HostFileScriptSuffix:"core",IsCustomFunctionsRuntime:true};var OSF=OSF||{};OSF.HostSpecificFileVersionDefault="16.00";OSF.HostSpecificFileVersionMap={access:{web:"16.00"},agavito:{winrt:"16.00"},excel:{android:"16.00",ios:"16.00",mac:"16.00",web:"16.00",win32:"16.01",winrt:"16.00"},onenote:{android:"16.00",ios:"16.00",mac:"16.00",web:"16.00",win32:"16.00",winrt:"16.00"},outlook:{android:"16.00",ios:"16.00",mac:"16.00",web:"16.01",win32:"16.02"},powerpoint:{ios:"16.00",mac:"16.00",web:"16.00",win32:"16.01",winrt:"16.00"},project:{win32:"16.00"},sway:{web:"16.00"},word:{ios:"16.00",mac:"16.00",web:"16.00",win32:"16.01",winrt:"16.00"},visio:{web:"16.00",win32:"16.00"}};OSF.SupportedLocales={"ar-sa":true,"bg-bg":true,"bn-in":true,"ca-es":true,"cs-cz":true,"da-dk":true,"de-de":true,"el-gr":true,"en-us":true,"es-es":true,"et-ee":true,"eu-es":true,"fa-ir":true,"fi-fi":true,"fr-fr":true,"gl-es":true,"he-il":true,"hi-in":true,"hr-hr":true,"hu-hu":true,"id-id":true,"it-it":true,"ja-jp":true,"kk-kz":true,"ko-kr":true,"lo-la":true,"lt-lt":true,"lv-lv":true,"ms-my":true,"nb-no":true,"nl-nl":true,"nn-no":true,"pl-pl":true,"pt-br":true,"pt-pt":true,"ro-ro":true,"ru-ru":true,"sk-sk":true,"sl-si":true,"sr-cyrl-cs":true,"sr-cyrl-rs":true,"sr-latn-cs":true,"sr-latn-rs":true,"sv-se":true,"th-th":true,"tr-tr":true,"uk-ua":true,"ur-pk":true,"vi-vn":true,"zh-cn":true,"zh-tw":true};OSF.AssociatedLocales={ar:"ar-sa",bg:"bg-bg",bn:"bn-in",ca:"ca-es",cs:"cs-cz",da:"da-dk",de:"de-de",el:"el-gr",en:"en-us",es:"es-es",et:"et-ee",eu:"eu-es",fa:"fa-ir",fi:"fi-fi",fr:"fr-fr",gl:"gl-es",he:"he-il",hi:"hi-in",hr:"hr-hr",hu:"hu-hu",id:"id-id",it:"it-it",ja:"ja-jp",kk:"kk-kz",ko:"ko-kr",lo:"lo-la",lt:"lt-lt",lv:"lv-lv",ms:"ms-my",nb:"nb-no",nl:"nl-nl",nn:"nn-no",pl:"pl-pl",pt:"pt-br",ro:"ro-ro",ru:"ru-ru",sk:"sk-sk",sl:"sl-si",sr:"sr-cyrl-cs",sv:"sv-se",th:"th-th",tr:"tr-tr",uk:"uk-ua",ur:"ur-pk",vi:"vi-vn",zh:"zh-cn"};OSF.SupportedRTLLocales={"ar-sa":true,"he-il":true,"fa-ir":true,"ur-pk":true};OSF.getSupportedLocale=function(a,c){if(c===void 0)c="en-us";if(!a)return c;var b;a=a.toLowerCase();if(a in OSF.SupportedLocales)b=a;else{var d=a.split("-",1);if(d&&d.length>0)b=OSF.AssociatedLocales[d[0]]}if(!b)b=c;return b};OSF.isRTLLocale=function(a){if(!a)return false;return OSF.SupportedRTLLocales[a.toLowerCase()]||false};var ScriptLoading;(function(e){var a=false,b=function(){function b(g,e,d,f,c){var b=this;b.url=g;b.isReady=e;b.hasStarted=d;b.timer=f;b.hasError=a;b.pendingCallbacks=[];b.pendingCallbacks.push(c)}return b}(),d=function(){function a(c,b,a){this.scriptId=c;this.startTime=b;this.msResponseTime=a}return a}(),c=function(){var e=true,c=null;function f(b){var a=this;if(b===void 0)b={OfficeJS:"office.js",OfficeDebugJS:"office.debug.js"};a.constantNames=b;a.defaultScriptLoadingTimeout=1e4;a.loadedScriptByIds={};a.scriptTelemetryBuffer=[];a.osfControlAppCorrelationId="";a.basePath=c;a.getUseAssociatedActionsOnly=c}f.prototype.isScriptLoading=function(a){return !!(this.loadedScriptByIds[a]&&this.loadedScriptByIds[a].hasStarted)};f.prototype.getOfficeJsBasePath=function(){var b=this;if(b.basePath)return b.basePath;else{var h=function(b,c){var d,a,e;e=b.toLowerCase();a=e.indexOf(c);if(a>=0&&a===b.length-c.length&&(a===0||b.charAt(a-1)==="/"||b.charAt(a-1)==="\\"))d=b.substring(0,a);else if(a>=0&&a0){f=window.setTimeout(c,i);b--}else{window.clearTimeout(f);d(a)}};c()};f.prototype.waitForScripts=function(b,e){var f=this;if(this.invokeCallbackIfScriptsReady(b,e)==a)for(var c=0;c=0){b=b.substring(c+5,b.length);if(b<"14.14393")return a;else return false}return false}function e(){if(typeof window===b&&typeof Promise===c)return Promise;if(typeof window!==b&&window.Promise)if(f())return d.PromiseImpl.Init();else return window.Promise;else return d.PromiseImpl.Init()}d.OfficePromise=e()})(e=d._Internal||(d._Internal={}));var f=e.OfficePromise;d.Promise=f})(Office||(Office={}));var OTel;(function(c){var a="telemetry/oteljs_agave.js",b=function(){var c="undefined";function b(){}b.loaded=function(){return !(b.logger===undefined||b.sink===undefined)};b.getOtelSinkCDNLocation=function(){return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+a};b.getMapName=function(b,a){if(a!==undefined&&b.hasOwnProperty(a))return b[a];return a};b.getHost=function(){var c=OSF._OfficeAppFactory.getHostInfo()["hostType"],d={excel:"Excel",onenote:"OneNote",outlook:"Outlook",powerpoint:"PowerPoint",project:"Project",visio:"Visio",word:"Word"},a=b.getMapName(d,c);return a};b.getFlavor=function(){var c=OSF._OfficeAppFactory.getHostInfo()["hostPlatform"],d={android:"Android",ios:"iOS",mac:"Mac",universal:"Universal",web:"Web",win32:"Win32"},a=b.getMapName(d,c);return a};b.ensureValue=function(a,b){if(!a)return b;return a};b.create=function(a){var i={id:a.appId,marketplaceType:a.marketplaceType,assetId:a.assetId,officeJsVersion:a.officeJSVersion,hostJsVersion:a.hostJSVersion,browserToken:a.clientId,instanceId:a.appInstanceId,sessionId:a.sessionId},k=oteljs.Contracts.Office.System.SDX.getFields("SDX",i),l=b.getHost(),e=b.getFlavor(),j=e==="Web"&&a.hostVersion.slice(0,2)==="0."?"16.0.0.0":a.hostVersion,d={"App.Name":l,"App.Platform":e,"App.Version":j,"Session.Id":b.ensureValue(a.correlationId,"00000000-0000-0000-0000-000000000000")},h="Office.Extensibility.OfficeJs",g="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439",f=1755,c=new oteljs.SimpleTelemetryLogger(undefined,k);c.setTenantToken(h,g,f);if(oteljs.AgaveSink)b.sink=oteljs.AgaveSink.createInstance(d);if(b.sink===undefined)b.attachLegacyAgaveSink(d);else c.addSink(b.sink);return c};b.attachLegacyAgaveSink=function(e){var d=function(){if(typeof oteljs_agave!==c)b.sink=oteljs_agave.AgaveSink.createInstance(e);if(b.sink===undefined||b.logger===undefined){b.Enabled=false;b.promises=[];b.logger=undefined;b.sink=undefined;return}b.logger.addSink(b.sink);b.promises.forEach(function(a){a()})},a=5e3;OSF.OUtil.loadScript(b.getOtelSinkCDNLocation(),d,a)};b.initialize=function(d){if(!b.Enabled){b.promises=[];return}var a=function(){if(typeof oteljs===c)return;if(!b.loaded())b.logger=b.create(d);b.loaded()&&b.promises.forEach(function(a){a()})};Microsoft.Office.WebExtension.onReadyInternal().then(function(){return a()})};b.sendTelemetryEvent=function(a){b.onTelemetryLoaded(function(){try{b.logger.sendTelemetryEvent(a)}catch(c){}})};b.sendCustomerContent=function(a){b.onTelemetryLoaded(function(){try{b.logger.sendCustomerContent(a)}catch(c){}})};b.onTelemetryLoaded=function(a){if(!b.Enabled)return;if(b.loaded())a();else b.promises.push(a)};b.promises=[];b.Enabled=true;return b}();c.OTelLogger=b})(OTel||(OTel={}));(function(b){var a=function(){function a(){this.m_mappings={};this.m_onchangeHandlers=[]}a.prototype.associate=function(){var a="[InvalidArg] Function=associate",b=this;function c(a){typeof console!=="undefined"&&console.warn&&console.warn(a)}if(arguments.length==1&&typeof arguments[0]==="object"&&arguments[0]){var g=arguments[0];for(var i in g)b.associate(i,g[i])}else if(arguments.length==2){var d=arguments[0],h=arguments[1];if(typeof d!=="string"){c(a);return}if(typeof h!=="function"){c(a);return}var f=d.toUpperCase();b.m_mappings[f]&&c("[DuplicatedName] Function="+d);b.m_mappings[f]=h;for(var e=0;e0)n.shift()(k)};Microsoft.Office.WebExtension.FeatureGates={};Microsoft.Office.WebExtension.sendTelemetryEvent=function(a){OTel.OTelLogger.sendTelemetryEvent(a)};Microsoft.Office.WebExtension.telemetrySink=OTel.OTelLogger;Microsoft.Office.WebExtension.onReadyInternal=function(a){if(v){var e=k.host,c=k.platform,d=k.addin;if(a){var b=a({host:e,platform:c,addin:d});if(b&&b.then&&typeof b.then===g)return b.then(function(){return Office.Promise.resolve({host:e,platform:c,addin:d})})}return Office.Promise.resolve({host:e,platform:c,addin:d})}if(a)return new Office.Promise(function(b){n.push(function(d){var c=a(d);if(c&&c.then&&typeof c.then===g)return c.then(function(){return b(d)});b(d)})});return new Office.Promise(function(a){n.push(a)})};Microsoft.Office.WebExtension.onReady=function(a){u=d;return Microsoft.Office.WebExtension.onReadyInternal(a)};var p=function(g){var c,d=window.location.search;if(d){var b=d.split(g+"=");if(b.length>1){var e=b[1],f=new RegExp("[&#]","g"),a=e.split(f);if(a.length>0)c=a[0]}}return c},F=function(f,g){var b=f.split("."),c=g.split("."),a;for(a in b)if(parseInt(b[a])parseInt(c[a]))return d;return e},z=function(){try{var b="15.30.1128.0",a=window.external.GetContext().GetHostFullVersion()}catch(c){return e}return !!F(b,a)},A=function(){l=d;try{if(c.disableLogging){l=e;return}window.external=window.external||{};if(typeof window.external.GetLoggingAllowed===a)l=d;else l=window.external.GetLoggingAllowed()}catch(b){}},E=function(){var i="hostInfoValue",l="isDialog",o=m,h=b;try{window.external=window.external||{};if(typeof agaveHost!==a&&agaveHost.GetHostInfo)window.external.GetHostInfo=function(){return agaveHost.GetHostInfo()};var k=window.external.GetHostInfo();if(k==l){c.isO15=d;c.isDialog=d}else if(k.toLowerCase().indexOf("mac")!==-1&&k.toLowerCase().indexOf("outlook")!==-1&&z())c.isO15=d;else{var q=k.split(o+"=");if(q.length>1)h=q[1];else h=k}}catch(s){}if(!h){h=p(o);if(!h)try{var r=JSON.parse(x);h=r?r["hostInfo"]:b}catch(s){}}var u=function(){var a=b;try{if(window.sessionStorage)a=window.sessionStorage}catch(c){}return a},j=u();if(!h&&j&&j.getItem(i))h=j.getItem(i);if(h){h=decodeURIComponent(h);c.isO15=e;var g=h.split("$");if(typeof g[2]==a)g=h.split("|");c.hostType=typeof g[0]==a?f:g[0].toLowerCase();c.hostPlatform=typeof g[1]==a?f:g[1].toLowerCase();c.hostSpecificFileVersion=typeof g[2]==a?f:g[2].toLowerCase();c.hostLocale=typeof g[3]==a?f:g[3].toLowerCase();c.osfControlAppCorrelationId=typeof g[4]==a?f:g[4];if(c.osfControlAppCorrelationId=="telemetry")c.osfControlAppCorrelationId=f;c.isDialog=typeof g[5]!=a&&g[5]==l?d:e;c.disableLogging=typeof g[6]!=a&&g[6]=="disableLogging"?d:e;c.flags=typeof g[7]==="string"&&g[7].length>0?parseInt(g[7]):0;if(g_isOfflineLibrary)g_isExpEnabled=e;else g_isExpEnabled=g_isExpEnabled||!!(c.flags&OSF.HostInfoFlags.ExperimentJsEnabled);var t=parseFloat(c.hostSpecificFileVersion),n=OSF.HostSpecificFileVersionDefault;if(OSF.HostSpecificFileVersionMap[c.hostType]&&OSF.HostSpecificFileVersionMap[c.hostType][c.hostPlatform])n=OSF.HostSpecificFileVersionMap[c.hostType][c.hostPlatform];if(t>parseFloat(n))c.hostSpecificFileVersion=n;if(j)try{j.setItem(i,h)}catch(v){}}else{c.isO15=d;c.hostLocale=p("locale")}},D=function(b,a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage&&OSF.AppTelemetry.logAppCommonMessage("getAppContextAsync starts");i.getAppContext(b,a)},G=function(){E();A();if(c.hostPlatform=="web"&&c.isDialog&&window==window.top&&window.opener==b){window.open(f,"_self",f);window.close()}if((c.flags&(OSF.HostInfoFlags.SharedApp|OSF.HostInfoFlags.CustomFunction))!==0)if(typeof window.Promise===a)window.Promise=window.Office.Promise;h.setAppCorrelationId(c.osfControlAppCorrelationId);var k=h.getOfficeJsBasePath(),F=e;if(!k)throw"Office Web Extension script library file name should be "+OSF.ConstantNames.OfficeJS+" or "+OSF.ConstantNames.OfficeDebugJS+".";var n=function(){if(typeof Sys!==a&&typeof Type!==a&&Sys.StringBuilder&&typeof Sys.StringBuilder===g&&Type.registerNamespace&&typeof Type.registerNamespace===g&&Type.registerClass&&typeof Type.registerClass===g||typeof OfficeExt!==a&&OfficeExt.MsAjaxError)return d;else return e},o=b,x=function(f){var b=e,c=function(){if(typeof Strings==a||typeof Strings.OfficeOM==a)if(!b){b=d;var g=k+OSF.ConstantNames.DefaultLocale+"/"+OSF.ConstantNames.OfficeStringJS;h.loadScript(g,OSF.ConstantNames.OfficeStringsId,c,d,OSF.ConstantNames.LocaleStringLoadingTimeout);return e}else throw"Neither the locale, "+f.toLowerCase()+", provided by the host app nor the fallback locale "+OSF.ConstantNames.DefaultLocale+" are supported.";else{b=e;o=Strings.OfficeOM}};if(!n()){window.Type=Function;Type.registerNamespace=function(a){window[a]=window[a]||{}};Type.prototype.registerClass=function(a){a={}}}var g=k+OSF.getSupportedLocale(f,OSF.ConstantNames.DefaultLocale)+"/"+OSF.ConstantNames.OfficeStringJS;h.loadScript(g,OSF.ConstantNames.OfficeStringsId,c,d,OSF.ConstantNames.LocaleStringLoadingTimeout)},s=function(s){if(s){i=new OSF.InitializationHelper(c,j,r,H,q);c.hostPlatform=="web"&&i.saveAndSetDialogInfo&&i.saveAndSetDialogInfo(p(m));i.setAgaveHostCommunication();if(typeof OSFPerformance!==a)OSFPerformance.getAppContextStart=OSFPerformance.now();D(j.wnd,function(d){if(typeof OSFPerformance!==a)OSFPerformance.getAppContextEnd=OSFPerformance.now();OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage&&OSF.AppTelemetry.logAppCommonMessage("getAppContextAsync callback start");w=d._appInstanceId;if(d.get_featureGates){var e=d.get_featureGates();if(e)Microsoft.Office.WebExtension.FeatureGates=e}var f=function(){var a=c.hostSpecificFileVersion.split(".");if(d.get_appMinorVersion){var b=c.hostPlatform=="ios";if(!b)if(isNaN(d.get_appMinorVersion()))d._appMinorVersion=parseInt(a[1]);else if(a.length>1&&!isNaN(Number(a[1])))d._appMinorVersion=parseInt(a[1])}if(c.isDialog)d._isDialog=c.isDialog};f();var j=function(){i.prepareApiSurface&&i.prepareApiSurface(d);h.waitForFunction(function(){return Microsoft.Office.WebExtension.initialize!=undefined||u},function(f){if(f){if(i.prepareApiSurface)Microsoft.Office.WebExtension.initialize&&Microsoft.Office.WebExtension.initialize(i.getInitializationReason(d));else{if(!Microsoft.Office.WebExtension.initialize)Microsoft.Office.WebExtension.initialize=function(){};i.prepareRightBeforeWebExtensionInitialize(d)}i.prepareRightAfterWebExtensionInitialize&&i.prepareRightAfterWebExtensionInitialize(d);var e=d.get_appName(),a=b;if((c.flags&OSF.HostInfoFlags.SharedApp)!==0)a={visibilityMode:y[d.get_initialDisplayMode&&typeof d.get_initialDisplayMode===g?d.get_initialDisplayMode():0]};t({host:OfficeExt.HostName.Host.getInstance().getHost(e),platform:OfficeExt.HostName.Host.getInstance().getPlatform(e),addin:a})}else throw new Error('Office.js has not fully loaded. Your app must call "Office.onReady()" as part of it\'s loading sequence (or set the "Office.initialize" function). If your app has this functionality, try reloading this page.')},400,50)};!h.isScriptLoading(OSF.ConstantNames.OfficeStringsId)&&x(d.get_appUILocale());h.waitForScripts([OSF.ConstantNames.OfficeStringsId],function(){if(o&&!Strings.OfficeOM)Strings.OfficeOM=o;i.loadAppSpecificScriptAndCreateOM(d,j,k);if(typeof OSFPerformance!==a)OSFPerformance.createOMEnd=OSFPerformance.now()})});if(c.isO15){var n=OSF.OUtil.parseXdmInfo()==b;if(n){var f=d;if(window.external&&typeof window.external.GetContext!==a)try{window.external.GetContext();f=e}catch(v){}if(typeof OsfOptOut===a&&f&&window.top!==window.self){window.console&&window.console.log&&window.console.log("The add-in is not hosted in plain browser top window.");window.location.href="about:blank"}f&&t({host:b,platform:b,addin:b})}}}else{var l="MicrosoftAjax.js is not loaded successfully.";OSF.AppTelemetry&&OSF.AppTelemetry.logAppException&&OSF.AppTelemetry.logAppException(l);throw l}},z=function(){OSF.AppTelemetry&&OSF.AppTelemetry.setOsfControlAppCorrelationId&&OSF.AppTelemetry.setOsfControlAppCorrelationId(c.osfControlAppCorrelationId);if(h.isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId))h.waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],s);else h.waitForFunction(n,s,500,100)};if(c.isO15)h.loadScript(k+OSF.ConstantNames.O15InitHelper,OSF.ConstantNames.O15MappingId,z);else{var v=c.hostType.toLowerCase(),B=c.hostPlatform.toLowerCase(),I=new RegExp("^\\d\\d[.]\\d\\d$");if(OSF.HostSpecificFileVersionMap[v]==b||OSF.HostSpecificFileVersionMap[v][B]==b||!I.test(c.hostSpecificFileVersion))throw"hostInfo validation failed";var l;l=[c.hostType,c.hostPlatform,c.hostSpecificFileVersion,OSF.ConstantNames.HostFileScriptSuffix||b].filter(function(a){return a!=b}).join("-")+".js";h.loadScript(k+l.toLowerCase(),OSF.ConstantNames.HostFileId,z);if(typeof OSFPerformance!==a)OSFPerformance.hostSpecificFileName=l.toLowerCase()}c.hostLocale&&x(c.hostLocale);if(F&&!n()){var G=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";h.loadScriptParallel(G,OSF.ConstantNames.MicrosoftAjaxId)}window.confirm=function(){throw new Error("Function window.confirm is not supported.")};window.alert=function(){throw new Error("Function window.alert is not supported.")};window.prompt=function(){throw new Error("Function window.prompt is not supported.")};var C=c.hostType=="outlook"&&c.hostPlatform=="android";if(!C){window.history.replaceState=b;window.history.pushState=b}};G();window.addEventListener&&window.addEventListener("DOMContentLoaded",function(){Microsoft.Office.WebExtension.onReadyInternal(function(){typeof OSFPerfUtil!==a&&OSFPerfUtil.sendPerformanceTelemetry()})});return {getId:function(){return j.id},getClientEndPoint:function(){return j.clientEndPoint},getContext:function(){return r},setContext:function(a){r=a},getHostInfo:function(){return c},getLoggingAllowed:function(){return l},getHostFacade:function(){return q},setHostFacade:function(a){q=a},getInitializationHelper:function(){return i},getCachedSessionSettingsKey:function(){return (j.conversationID!=b?j.conversationID:w)+"CachedSessionSettings"},getWebAppState:function(){return j},getWindowLocationHash:function(){return C},getWindowLocationSearch:function(){return B},getLoadScriptHelper:function(){return h},getWindowName:function(){return x}}}() + + + +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TestUtility=t.CoreUtility=t.RichApiMessageUtility=t.CoreConstants=t.CoreResourceStrings=t.CoreErrorCodes=t.Provider=t.Attribution=t.WebImage=t.Entity=t.FormattedNumber=t.Error=t._Internal=t.HostBridge=t.HttpUtility=t.SessionBase=void 0;var i=function(){function e(){}return e.prototype._resolveRequestUrlAndHeaderInfo=function(){return f._createPromiseFromResult(null)},e.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(e.prototype,"eventRegistration",{get:function(){return null},enumerable:!1,configurable:!0}),e}();t.SessionBase=i;var s=function(){function e(){}return e.setCustomSendRequestFunc=function(t){e.s_customSendRequestFunc=t},e.xhrSendRequestFunc=function(e){return f.createPromise((function(t,n){var r=new XMLHttpRequest;if(r.open(e.method,e.url),r.onload=function(){var e={statusCode:r.status,headers:f._parseHttpResponseHeaders(r.getAllResponseHeaders()),body:r.responseText};t(e)},r.onerror=function(){n(new a.RuntimeError({code:c.connectionFailure,httpStatusCode:r.status,message:f._getResourceString(l.connectionFailureWithStatus,r.statusText)}))},e.headers)for(var o in e.headers)r.setRequestHeader(o,e.headers[o]);r.send(f._getRequestBodyText(e))}))},e.fetchSendRequestFunc=function(e){var t=f._getRequestBodyText(e);return""===t&&(t=void 0),fetch(e.url,{method:e.method,headers:e.headers,body:t}).then((function(e){return e.text().then((function(t){var n=e.status,r={};return e.headers.forEach((function(e,t){r[t]=e})),{statusCode:n,headers:r,body:t}}))}))},e.sendRequest=function(t){e.validateAndNormalizeRequest(t);var n=e.s_customSendRequestFunc;return n||(n="undefined"!=typeof fetch?e.fetchSendRequestFunc:e.xhrSendRequestFunc),n(t)},e.setCustomSendLocalDocumentRequestFunc=function(t){e.s_customSendLocalDocumentRequestFunc=t},e.sendLocalDocumentRequest=function(t){return e.validateAndNormalizeRequest(t),(e.s_customSendLocalDocumentRequestFunc||e.officeJsSendLocalDocumentRequestFunc)(t)},e.officeJsSendLocalDocumentRequestFunc=function(e){e=f._validateLocalDocumentRequest(e);var t=f._buildRequestMessageSafeArray(e);return f.createPromise((function(e,n){OSF.DDA.RichApi.executeRichApiRequestAsync(t,(function(t){var n;n="succeeded"==t.status?{statusCode:p.getResponseStatusCode(t),headers:p.getResponseHeaders(t),body:p.getResponseBody(t)}:p.buildHttpResponseFromOfficeJsError(t.error.code,t.error.message),f.log("Response:"),f.log(JSON.stringify(n)),e(n)}))}))},e.validateAndNormalizeRequest=function(e){if(f.isNullOrUndefined(e))throw a.RuntimeError._createInvalidArgError({argumentName:"request"});f.isNullOrEmptyString(e.method)&&(e.method="GET"),e.method=e.method.toUpperCase()},e.logRequest=function(t){if(f._logEnabled){if(f.log("---HTTP Request---"),f.log(t.method+" "+t.url),t.headers)for(var n in t.headers)f.log(n+": "+t.headers[n]);e._logBodyEnabled&&f.log(f._getRequestBodyText(t))}},e.logResponse=function(t){if(f._logEnabled){if(f.log("---HTTP Response---"),f.log(""+t.statusCode),t.headers)for(var n in t.headers)f.log(n+": "+t.headers[n]);e._logBodyEnabled&&f.log(t.body)}},e._logBodyEnabled=!1,e}();t.HttpUtility=s;var a,u=function(){function e(e){var t=this;this.m_bridge=e,this.m_promiseResolver={},this.m_handlers=[],this.m_bridge.onMessageFromHost=function(e){var n=JSON.parse(e);if(3==n.type){var r=n.message;if(r&&r.entries)for(var o=0;o=0){var i=t.url.substr(o+1),s=f._parseRequestFlagsAndCustomDataFromQueryStringIfAny(i);s.flags>=0&&(r=s.flags)}var a={id:e.nextId(),type:1,flags:r,message:t};return n.sendMessageToHostAndExpectResponse(a).then((function(e){return e.message}))}));for(var r=0;r=0&&this.m_handlers.splice(t,1)},e.onInited=function(t){e.s_onInitedHandlers.push(t),e.s_instance&&t(e.s_instance)},e.prototype.dispatchMessage=function(e){if("number"==typeof e.id){var t=this.m_promiseResolver[e.id];if(t)return t(e),void delete this.m_promiseResolver[e.id]}for(var n=0;n0},e._getLocalDocumentUrlPrefixLength=function(e){for(var t=["http://document.localhost","https://document.localhost","//document.localhost"],n=e.toLowerCase().trim(),r=0;r0){var i=t.url.substr(o+1),s=e._parseRequestFlagsAndCustomDataFromQueryStringIfAny(i);s.flags>=0&&(n=s.flags),r=s.customData}}return p.buildRequestMessageSafeArray(r,n,t.method,t.url,t.headers,e._getRequestBodyText(t))},e._parseHttpResponseHeaders=function(t){var n={};if(!e.isNullOrEmptyString(t))for(var r=new RegExp("\r?\n"),o=t.split(r),i=0;i0){var u=s.substr(0,a),c=s.substr(a+1);u=e.trim(u),c=e.trim(c),n[u.toUpperCase()]=c}}}return n},e._parseErrorResponse=function(t){var n=null;if(e.isPlainJsonObject(t.body))n=t.body;else if(!e.isNullOrEmptyString(t.body)){var r=e.trim(t.body);try{n=JSON.parse(r)}catch(t){e.log("Error when parse "+r)}}var o=t.statusCode.toString();if(e.isNullOrUndefined(n)||"object"!=typeof n||!n.error)return e._createDefaultErrorResponse(o);var i=n.error,s=i.innerError;return s&&s.code?e._createErrorResponse(s.code,o,s.message):i.code?e._createErrorResponse(i.code,o,i.message):e._createDefaultErrorResponse(o)},e._createDefaultErrorResponse=function(t){return{errorCode:c.connectionFailure,errorMessage:e._getResourceString(l.connectionFailureWithStatus,t)}},e._createErrorResponse=function(t,n,r){return{errorCode:t,errorMessage:e._getResourceString(l.connectionFailureWithDetails,[n,t,r])}},e._copyHeaders=function(e,t){if(e&&t)for(var n in e)t[n]=e[n]},e.addResourceStringValues=function(t){for(var n in t)e.s_resourceStringValues[n]=t[n]},e._logEnabled=!1,e.s_resourceStringValues={ApiNotFoundDetails:"The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",ConnectionFailureWithStatus:"The request failed with status code of {0}.",ConnectionFailureWithDetails:"The request failed with status code of {0}, error code {1} and the following error message: {2}",InvalidArgument:"The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",InvalidObjectPath:'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',InvalidRequestContext:"Cannot use the object across different request contexts.",Timeout:"The operation has timed out.",ValueNotLoaded:'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'},e}();t.CoreUtility=f;var h=function(){function e(){}return e.setMock=function(t){e.s_isMock=t},e.isMock=function(){return e.s_isMock},e}();t.TestUtility=h},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.CommonResourceStrings=t.CommonUtility=t.CommonConstants=t.HttpRequestExecutor=t.ClientResult=t.ClientRequestBase=t.ClientRequestContextBase=t.ObjectPath=t.Action=t.ClientObjectBase=t.CommonActionFactory=t.config=t._internalConfig=void 0;var a=n(0);s(n(0),t),t._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!0,enableUndoableFlag:!0,appendTypeNameToObjectPathInfo:!1},t.config={extendedErrorLogging:!1};var u=function(){function e(){}return e.createSetPropertyAction=function(e,t,n,r,o){_.validateObjectPath(t);var i={Id:e._nextId(),ActionType:4,Name:n,ObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[r],a=_.setMethodArguments(e,i.ArgumentInfo,s);_.validateReferencedObjectPaths(a);var u=new l(i,0,o);return u.referencedObjectPath=t._objectPath,u.referencedArgumentObjectPaths=a,t._addAction(u)},e.createQueryAction=function(e,t,n,r){_.validateObjectPath(t);var o={Id:e._nextId(),ActionType:2,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},i=new l(o,1,4);return i.referencedObjectPath=t._objectPath,t._addAction(i,r)},e.createQueryAsJsonAction=function(e,t,n,r){_.validateObjectPath(t);var o={Id:e._nextId(),ActionType:7,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},i=new l(o,1,4);return i.referencedObjectPath=t._objectPath,t._addAction(i,r)},e.createUpdateAction=function(e,t,n){_.validateObjectPath(t);var r={Id:e._nextId(),ActionType:9,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},o=new l(r,0,0);return o.referencedObjectPath=t._objectPath,t._addAction(o)},e}();t.CommonActionFactory=u;var c=function(){function e(e,t){this.m_contextBase=e,this.m_objectPath=t}return Object.defineProperty(e.prototype,"_objectPath",{get:function(){return this.m_objectPath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_context",{get:function(){return this.m_contextBase},enumerable:!1,configurable:!0}),e.prototype._addAction=function(e,t){var n=this;return void 0===t&&(t=null),a.CoreUtility.createPromise((function(r,o){n._context._addServiceApiAction(e,t,r,o)}))},e.prototype._retrieve=function(e,n){var r=t._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;r||(r=!_.isSetSupported("RichApiRuntime","1.1"));var o=p._parseQueryOption(e);return r?u.createQueryAction(this._context,this,o,n):u.createQueryAsJsonAction(this._context,this,o,n)},e.prototype._recursivelyUpdate=function(e){var n=t._internalConfig.alwaysPolyfillClientObjectUpdateMethod;n||(n=!_.isSetSupported("RichApiRuntime","1.2"));try{var r=this[b.scalarPropertyNames];r||(r=[]);var o=this[b.scalarPropertyUpdateable];if(!o){o=[];for(var i=0;i=0){if(!o[f])throw new a._Internal.RuntimeError({code:a.CoreErrorCodes.invalidArgument,httpStatusCode:400,message:a.CoreUtility._getResourceString(v.attemptingToSetReadOnlyProperty,p),debugInfo:{errorLocation:p}});c[p]=e[p],++d}else{if(!(s.indexOf(p)>=0))throw new a._Internal.RuntimeError({code:a.CoreErrorCodes.invalidArgument,httpStatusCode:400,message:a.CoreUtility._getResourceString(v.propertyDoesNotExist,p),debugInfo:{errorLocation:p}});l[p]=e[p]}}if(d>0)if(n)for(i=0;i0)throw a._Internal.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(r,i,".")});t.Top=s}else if("$skip"===i){if("number"!=typeof s||n.length>0)throw a._Internal.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(r,i,".")});t.Skip=s}else if("boolean"==typeof s)s&&t.Select.push(e.combineQueryPath(n,i,"/"));else{if("object"!=typeof s)throw a._Internal.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(r,i,".")});e.parseStrictLoadOptionHelper(t,e.combineQueryPath(n,i,"/"),e.combineQueryPath(r,i,"."),s)}}},e}();t.ClientRequestContextBase=p;var f=function(){function e(e){this.m_objectPath=e}return e.prototype._handleResult=function(e){a.CoreUtility.isNullOrUndefined(e)?this.m_objectPath._updateAsNullObject():this.m_objectPath.updateUsingObjectData(e,null)},e}(),h=function(){function e(e){this.m_contextBase=e,this.m_actions=[],this.m_actionResultHandler={},this.m_referencedObjectPaths={},this.m_instantiatedObjectPaths={},this.m_preSyncPromises=[]}return e.prototype.addAction=function(e){this.m_actions.push(e),1==e.actionInfo.ActionType&&(this.m_instantiatedObjectPaths[e.actionInfo.ObjectPathId]=e)},Object.defineProperty(e.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!1,configurable:!0}),e.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},e.prototype.ensureInstantiateObjectPath=function(e){if(e){if(this.m_instantiatedObjectPaths[e.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(e.parentObjectPath),this.ensureInstantiateObjectPaths(e.argumentObjectPaths),!this.m_instantiatedObjectPaths[e.objectPathInfo.Id]){var t={Id:this.m_contextBase._nextId(),ActionType:1,Name:"",ObjectPathId:e.objectPathInfo.Id},n=new l(t,1,4);n.referencedObjectPath=e,this.addReferencedObjectPath(e),this.addAction(n);var r=new f(e);this.addActionResultHandler(n,r)}}},e.prototype.ensureInstantiateObjectPaths=function(e){if(e)for(var t=0;t=0;t--){var n=this.m_actions[t].actionInfo;if(n.ObjectPathId===e&&3===n.ActionType&&n.Name===b.keepReference){this.m_actions.splice(t,1);break}}},e._updateLastUsedActionIdOfObjectPathId=function(t,n,r){for(;n;){if(t[n.objectPathInfo.Id])return;t[n.objectPathInfo.Id]=r;var o=n.argumentObjectPaths;if(o)for(var i=o.length,s=0;s=0;--o){var i=(p=t[o]).actionInfo.Id;p.referencedObjectPath&&e._updateLastUsedActionIdOfObjectPathId(n,p.referencedObjectPath,i);var s=p.referencedArgumentObjectPaths;if(s)for(var a=s.length,u=0;u0?p.actionInfo.L=f:p.actionInfo.L&&delete p.actionInfo.L}},e}();t.ClientRequestBase=h;var m=function(){function e(e){this.m_type=e}return Object.defineProperty(e.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new a._Internal.RuntimeError({code:a.CoreErrorCodes.valueNotLoaded,httpStatusCode:400,message:a.CoreUtility._getResourceString(a.CoreResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!1,configurable:!0}),e.prototype._handleResult=function(e){this.m_isLoaded=!0,"object"==typeof e&&e&&e._IsNull||(1===this.m_type?this.m_value=_.adjustToDateTime(e):this.m_value=e)},e}();t.ClientResult=m;var g=function(){function e(e){this.m_context=e,this.m_actions=[]}return e.prototype.add=function(e,t,n,r){var o=this;this.m_actions.push({action:e,resultHandler:t,resolve:n,reject:r}),1===this.m_actions.length&&setTimeout((function(){return o.processActions()}),0)},e.prototype.processActions=function(){var e=this;if(0!==this.m_actions.length){var t=this.m_actions;this.m_actions=[];for(var n=new h(this.m_context),r=0;r=65&&e.charCodeAt(t)<=90;)t++;return t0?".":"")+n;break;case 3:n=t.normalizeName(e.objectPathInfo.Name)+"()"+(n.length>0?".":"")+n;break;case 4:n=t.normalizeName(e.objectPathInfo.Name)+(n.length>0?".":"")+n;break;case 5:n="getItem()"+(n.length>0?".":"")+n;break;case 6:n="_reference()"+(n.length>0?".":"")+n}e=e.parentObjectPath}return n},t.setMethodArguments=function(e,n,r){if(a.CoreUtility.isNullOrUndefined(r))return null;var o=new Array,i=new Array,s=t.collectObjectPathInfos(e,r,o,i);return n.Arguments=r,s&&(n.ReferencedObjectPathIds=i),o},t.validateContext=function(e,t){if(e&&t&&t._context!==e)throw new a._Internal.RuntimeError({code:a.CoreErrorCodes.invalidRequestContext,httpStatusCode:400,message:a.CoreUtility._getResourceString(a.CoreResourceStrings.invalidRequestContext)})},t.isSetSupported=function(e,t){return!("undefined"!=typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)||window.Office.context.requirements.isSetSupported(e,t)},t.throwIfApiNotSupported=function(e,n,r,o){if(t._doApiNotSupportedCheck&&!t.isSetSupported(n,r)){var i=a.CoreUtility._getResourceString(a.CoreResourceStrings.apiNotFoundDetails,[e,n+" "+r,o]);throw new a._Internal.RuntimeError({code:a.CoreErrorCodes.apiNotFound,httpStatusCode:404,message:i,debugInfo:{errorLocation:e}})}},t.calculateApiFlags=function(e,n,r){return t.isSetSupported(n,r)||(e&=-3),e},t._parseSelectExpand=function(e){var t=[];if(!a.CoreUtility.isNullOrEmptyString(e))for(var n=e.split(","),r=0;r0&&t.push(o)}return t;function i(e){var t=e.toLowerCase();return"items"===t||"items/"===t?"*":(("items/"===t.substr(0,6)||"items."===t.substr(0,6))&&(e=e.substr(6)),e.replace(new RegExp("[/.]items[/.]","gi"),"/"))}},t.changePropertyNameToCamelLowerCase=function(e){if(Array.isArray(e)){for(var n=[],r=0;r0;)e.push(0),n--},e.prototype.getString=function(e){return"number"==typeof e?e>0?this.m_strings[e-1]:null:e},e.prototype.buildEnumType=function(e){var t;if(Array.isArray(e)){(t={name:e[0],fields:e[2]}).fields||(t.fields={});var n=e[1];if(Array.isArray(n))for(var r=0;rn)return!1;return!0},e.prototype.evaluateEventType=function(e){if(i.Utility.isNullOrEmptyString(e))return 0;if(this.isAllDigits(e))return parseInt(e);var t=this.resolveObjectByFullName(e);if("number"!=typeof t)throw new r.Error("Invalid event type: "+e);return t},e.prototype.buildPrototype=function(e,t){this.buildScalarProperties(e,t),this.buildNavigationProperties(e,t),this.buildScalarMethods(e,t),this.buildNavigationMethods(e,t),this.buildEvents(e,t),this.buildHandleResult(e,t),this.buildHandleIdResult(e,t),this.buildHandleRetrieveResult(e,t),this.buildLoad(e,t),this.buildRetrieve(e,t),this.buildSetMockData(e,t),this.buildEnsureUnchanged(e,t),this.buildUpdate(e,t),this.buildSet(e,t),this.buildToJSON(e,t),this.buildItems(e,t),this.buildTypeMetadataInfo(e,t),this.buildTrackUntrack(e,t),this.buildMixin(e,t)},e.prototype.toSimpleCamelUpperCase=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)},e.prototype.ensureOriginalName=function(e){null===e.originalName&&(e.originalName=this.toSimpleCamelUpperCase(e.name))},e.prototype.getFieldName=function(e){return"m_"+e.name},e.prototype.throwIfApiNotSupported=function(e,t){if(this.m_apiSets&&t.apiSetInfoOrdinal>0){var n=this.m_apiSets[t.apiSetInfoOrdinal-1];n&&i.Utility.throwIfApiNotSupported(e.name+"."+t.name,n.name,n.version,this.m_hostName)}},e.prototype.buildScalarProperties=function(e,t){if(Array.isArray(t.scalarProperties))for(var n=0;n0){var n=this.m_apiSets[t-1];n&&(e=o.CommonUtility.calculateApiFlags(e,n.name,n.version))}return e},e.prototype.buildScalarProperty=function(t,n,r){this.ensureOriginalName(r);var o=this,a=this.getFieldName(r),u={get:function(){return i.Utility.throwIfNotLoaded(r.name,this[a],n.name,this._isNull),o.throwIfApiNotSupported(n,r),this[a]},enumerable:!0,configurable:!0};0==(2&r.behaviorFlags)&&(u.set=function(t){if(!(4&r.behaviorFlags&&o.getFunction(e.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName+"_Set").call(this,this,t).handled)){this[a]=t;var i=o.calculateApiFlags(r.setMethodApiFlags,r.undoableApiSetInfoOrdinal);s.invokeSetProperty(this,r.originalName,t,i)}}),Object.defineProperty(t.prototype,r.name,u)},e.prototype.buildNavigationProperties=function(e,t){if(Array.isArray(t.navigationProperties))for(var n=0;n0){for(var i=0;i0){for(var i=0;i0&&(Object.defineProperty(e.prototype,"_scalarPropertyNames",{get:function(){return this.m__scalarPropertyNames||(this.m__scalarPropertyNames=t.scalarProperties.map((function(e){return e.name}))),this.m__scalarPropertyNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyOriginalNames",{get:function(){return this.m__scalarPropertyOriginalNames||(this.m__scalarPropertyOriginalNames=t.scalarProperties.map((function(e){return e.originalName}))),this.m__scalarPropertyOriginalNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyUpdateable",{get:function(){return this.m__scalarPropertyUpdateable||(this.m__scalarPropertyUpdateable=t.scalarProperties.map((function(e){return 0==(2&e.behaviorFlags)}))),this.m__scalarPropertyUpdateable},enumerable:!0,configurable:!0})),t.navigationProperties&&t.navigationProperties.length>0&&Object.defineProperty(e.prototype,"_navigationPropertyNames",{get:function(){return this.m__navigationPropertyNames||(this.m__navigationPropertyNames=t.navigationProperties.map((function(e){return e.name}))),this.m__navigationPropertyNames},enumerable:!0,configurable:!0})},e.prototype.buildTrackUntrack=function(e,t){2&t.behaviorFlags&&(e.prototype.track=function(){return this.context.trackedObjects.add(this),this},e.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this})},e.prototype.buildMixin=function(e,t){if(4&t.behaviorFlags){var n=this.getFunction(t.name+"Custom");i.Utility.applyMixin(e,n)}},e.prototype.getOnEventName=function(e){return"_"===e[0]?"_on"+e.substr(1):"on"+e},e.prototype.buildEvents=function(e,t){if(t.events)for(var n=0;n=0){var o=new S(this._rootObjectPropertyName,e._objectPaths,e._actions,!1,!0),i=o.processForDebugStatementInfo(t.Body.Error.ActionIndex);r={statement:i.statement,surroundingStatements:i.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},u.config.extendedErrorLogging&&(o=new S(this._rootObjectPropertyName,e._objectPaths,e._actions,!1,!1),r.fullStatements=o.process())}var s=null;if(t.Body.Results?s=t.Body.Results:t.Body.ProcessedResults&&t.Body.ProcessedResults.Results&&(s=t.Body.ProcessedResults.Results),s){this._processingResult=!0;try{e.processResponse(s)}finally{this._processingResult=!1}}}if(!N.isNullOrEmptyString(t.ErrorCode))return new a._Internal.RuntimeError({code:t.ErrorCode,httpStatusCode:t.HttpStatusCode,message:t.ErrorMessage,traceMessages:n});if(t.Body&&t.Body.Error){var c={errorLocation:t.Body.Error.Location};return r&&(c.statement=r.statement,c.surroundingStatements=r.surroundingStatements,c.fullStatements=r.fullStatements),new a._Internal.RuntimeError({code:t.Body.Error.Code,httpStatusCode:t.Body.Error.HttpStatusCode,message:t.Body.Error.Message,traceMessages:n,debugInfo:c})}return null},t.prototype.processPendingEventHandlers=function(e){for(var t=N._createPromiseFromResult(null),n=0;n0)if(t.isValidRequestInfo(r[0]))f=r[0],m=1;else if(N.isPlainJsonObject(r[0])){if(null!=(f=(g=r[0]).session)&&!t.isValidRequestInfo(f))return t.createErrorPromise(n);h=g.previousObjects,m=1}if(r.length==m+1)d=r[m+0];else{if(null!=g||r.length!=m+2)return t.createErrorPromise(n);h=r[m+0],d=r[m+1]}if(null!=h)if(h instanceof p)l=function(){return h.context};else if(h instanceof t)l=function(){return h};else{if(!Array.isArray(h))return t.createErrorPromise(n);var y=h;if(0==y.length)return t.createErrorPromise(n);for(var b=0;b0&&p._onRunFinishedNotifiers.shift()(),g)return f;throw f}))},t}(u.ClientRequestContextBase);t.ClientRequestContext=m;var g=function(){function e(e,t){this.m_proxy=e,this.m_shouldPolyfill=t;var n=e[y.scalarPropertyNames],r=e[y.navigationPropertyNames],o=e[y.className],i=e[y.isCollection];if(n)for(var s=0;s=0;u--)if(o[u]===r[i].handler){o.splice(u,1);break}break;case 2:o=[]}return s&&(!this.m_registered&&o.length>0?n=n.then((function(){return t.m_eventInfo.registerFunc(t.m_callback)})).then((function(){return t.m_registered=!0})):this.m_registered&&0==o.length&&(n=n.then((function(){return t.m_eventInfo.unregisterFunc(t.m_callback)})).catch((function(e){a.CoreUtility.log("Error when unregister event: "+JSON.stringify(e))})).then((function(){return t.m_registered=!1}))),n=n.then((function(){return t.m_handlers=o}))),n},e.prototype.fireEvent=function(e){for(var t=[],n=0;n0},e.prototype.register=function(e,t,n){if(!n)throw a._Internal.RuntimeError._createInvalidArgError({argumentName:"handler"});var r=this.getHandlers(e,t);return r.push(n),1===r.length?this.m_registerEventImpl(e,t):N._createPromiseFromResult(null)},e.prototype.unregister=function(e,t,n){if(!n)throw a._Internal.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var r=this.getHandlers(e,t),o=r.length-1;o>=0;o--)if(r[o]===n){r.splice(o,1);break}return 0===r.length?this.m_unregisterEventImpl(e,t):N._createPromiseFromResult(null)},e}();t.EventRegistration=P;var C=function(){function e(){this.m_eventRegistration=new P(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this)),this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return e.prototype.ready=function(){var t=this;return this.m_ready||(e._testReadyImpl?this.m_ready=e._testReadyImpl().then((function(){t.m_isReady=!0})):a.HostBridge.instance?this.m_ready=N._createPromiseFromResult(null).then((function(){t.m_isReady=!0})):this.m_ready=v.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then((function(){t.m_isReady=!0}))),this.m_ready},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!1,configurable:!0}),e.prototype.register=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.register(e,t,n)}))},e.prototype.unregister=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.unregister(e,t,n)}))},e.prototype._registerEventImpl=function(e,t){return N._createPromiseFromResult(null)},e.prototype._unregisterEventImpl=function(e,t){return N._createPromiseFromResult(null)},e.prototype._handleRichApiMessage=function(e){if(e&&e.entries)for(var t=0;t=0;r--)if(n[r]===e){n.splice(r,1);break}0==n.length&&C.getGenericEventRegistration().unregister(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)}))},t.prototype.removeAll=function(){},t}(_);t.GenericEventHandlers=I;var R=function(){function e(e){this.m_clientObject=e}return e.prototype._handleResult=function(e){this.m_clientObject._handleIdResult(e)},e}(),j=function(){function e(){}return e.createGlobalObjectObjectPath=function(e){var t={Id:e._nextId(),ObjectPathType:1,Name:""};return new u.ObjectPath(t,null,!1,!1,1,4)},e.createNewObjectObjectPath=function(e,t,n,r){var o={Id:e._nextId(),ObjectPathType:2,Name:t};return new u.ObjectPath(o,null,n,!1,1,N._fixupApiFlags(r))},e.createPropertyObjectPath=function(e,t,n,r,o,i){var s={Id:e._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id};return new u.ObjectPath(s,t._objectPath,r,o,1,N._fixupApiFlags(i))},e.createIndexerObjectPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new u.ObjectPath(r,t._objectPath,!1,!1,1,4)},e.createIndexerObjectPathUsingParentPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new u.ObjectPath(r,t,!1,!1,1,4)},e.createMethodObjectPath=function(e,t,n,r,o,i,s,a,c){var l={Id:e._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},d=N.setMethodArguments(e,l.ArgumentInfo,o),p=new u.ObjectPath(l,t._objectPath,i,s,r,N._fixupApiFlags(c));return p.argumentObjectPaths=d,p.getByIdMethodName=a,p},e.createReferenceIdObjectPath=function(e,t){var n={Id:e._nextId(),ObjectPathType:6,Name:t,ArgumentInfo:{}};return new u.ObjectPath(n,null,!1,!1,1,4)},e.createChildItemObjectPathUsingIndexerOrGetItemAt=function(t,n,r,o,i){var s=N.tryGetObjectIdFromLoadOrRetrieveResult(o);return t&&!N.isNullOrUndefined(s)?e.createChildItemObjectPathUsingIndexer(n,r,o):e.createChildItemObjectPathUsingGetItemAt(n,r,o,i)},e.createChildItemObjectPathUsingIndexer=function(e,t,n){var r=N.tryGetObjectIdFromLoadOrRetrieveResult(n),o=o={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=[r],new u.ObjectPath(o,t._objectPath,!1,!1,1,4)},e.createChildItemObjectPathUsingGetItemAt=function(e,t,n,r){var o=n[y.index];o&&(r=o);var i={Id:e._nextId(),ObjectPathType:3,Name:y.getItemAt,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return i.ArgumentInfo.Arguments=[r],new u.ObjectPath(i,t._objectPath,!1,!1,1,4)},e}();t.ObjectPathFactory=j;var E=function(){function e(e){this.m_context=e}return e.prototype.executeAsync=function(t,n,r){var o=this,i=a.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(t,n,r,e.SourceLibHeaderValue);return new Promise((function(e,t){OSF.DDA.RichApi.executeRichApiRequestAsync(i,(function(t){var n;a.CoreUtility.log("Response:"),a.CoreUtility.log(JSON.stringify(t)),"succeeded"==t.status?n=a.RichApiMessageUtility.buildResponseOnSuccess(a.RichApiMessageUtility.getResponseBody(t),a.RichApiMessageUtility.getResponseHeaders(t)):(n=a.RichApiMessageUtility.buildResponseOnError(t.error.code,t.error.message),o.m_context._processOfficeJsErrorResponse(t.error.code,n)),e(n)}))}))},e.SourceLibHeaderValue="officejs",e}(),A=function(){function e(e){this._autoCleanupList={},this.m_context=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._addCommon(e,!0)})):this._addCommon(e,!0)},e.prototype._autoAdd=function(e){this._addCommon(e,!1),this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e},e.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(e,t){this.m_context._autoCleanup&&!e[y.isTracked]&&e!==this.m_context._rootObject&&t&&!N.isNullOrEmptyString(t[y.referenceId])&&(this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e,e[y.isTracked]=!0)},e.prototype._addCommon=function(e,t){if(e[y.isTracked])t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id];else{var n=e[y.referenceId];if(e._objectPath.objectPathInfo[y.objectPathInfoDoNotKeepReferenceFieldName])throw N.createRuntimeError(a.CoreErrorCodes.generalException,a.CoreUtility._getResourceString(F.objectIsUntracked),null);N.isNullOrEmptyString(n)&&e._KeepReference&&(e._KeepReference(),d.createInstantiateAction(this.m_context,e),t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id],e[y.isTracked]=!0)}},e.prototype.remove=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._removeCommon(e)})):this._removeCommon(e)},e.prototype._removeCommon=function(e){e._objectPath.objectPathInfo[y.objectPathInfoDoNotKeepReferenceFieldName]=!0,e.context._pendingRequest._removeKeepReferenceAction(e._objectPath.objectPathInfo.Id);var t=e[y.referenceId];if(!N.isNullOrEmptyString(t)){var n=this.m_context._rootObject;n._RemoveReference&&n._RemoveReference(t)}delete e[y.isTracked]},e.prototype._retrieveAndClearAutoCleanupList=function(){var e=this._autoCleanupList;return this._autoCleanupList={},e},e}();t.TrackedObjects=A;var S=function(){function e(e,t,n,r,o){e||(e="root"),this.m_globalObjName=e,this.m_referencedObjectPaths=t,this.m_actions=n,this.m_statements=[],this.m_variableNameForObjectPathMap={},this.m_variableNameToObjectPathMap={},this.m_declaredObjectPathMap={},this.m_showDispose=r,this.m_removePII=o}return e.prototype.process=function(){this.m_showDispose&&b._calculateLastUsedObjectPathIds(this.m_actions);for(var e=0;e=0&&this.m_statements.length>t+5+1));n++);if(t<0)return null;var r=t-5;r<0&&(r=0);var o=t+1+5;o>this.m_statements.length&&(o=this.m_statements.length);var i=[];0!=r&&i.push("...");for(var s=r;s>>>>"),i.push(this.m_statements[t]),i.push("// <<<<<");for(var a=t+1;a0)return e+" // And then dispose {"+r.map((function(e){return n.getObjVarName(e)})).join(", ")+"}"}return e},e.prototype.buildQueryExpression=function(e){if(e.actionInfo.QueryInfo){var t={};return t.select=e.actionInfo.QueryInfo.Select,t.expand=e.actionInfo.QueryInfo.Expand,t.skip=e.actionInfo.QueryInfo.Skip,t.top=e.actionInfo.QueryInfo.Top,void 0===t.top&&void 0===t.skip&&void 0===t.expand?void 0===t.select?"":JSON.stringify(t.select):JSON.stringify(t)}return""},e.prototype.buildObjectPathExpressionWithParent=function(e){return 5!=e.objectPathInfo.ObjectPathType&&3!=e.objectPathInfo.ObjectPathType&&4!=e.objectPathInfo.ObjectPathType||!e.objectPathInfo.ParentObjectPathId?this.buildObjectPathExpression(e):this.getObjVarName(e.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(e)},e.prototype.buildObjectPathExpression=function(e){var t=this.buildObjectPathInfoExpression(e.objectPathInfo),n=e.originalObjectPathInfo;return n&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(n)+" */"),t},e.prototype.buildObjectPathInfoExpression=function(e){switch(e.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 3:return N._toCamelLowerCase(e.Name)+"("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 2:return e.Name+".newObject()";case 7:return"null";case 4:return N._toCamelLowerCase(e.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(e.Name)+")"}},e.prototype.buildArgumentsExpression=function(e){var t="";if(!e.Arguments||0===e.Arguments.length)return t;if(this.m_removePII)return void 0===e.Arguments[0]?t:"...";for(var n=0;n0&&(t+=", "),t+=this.buildArgumentLiteral(e.Arguments[n],e.ReferencedObjectPathIds?e.ReferencedObjectPathIds[n]:null);return"undefined"===t&&(t=""),t},e.prototype.buildArgumentLiteral=function(e,t){return"number"==typeof e&&e===t?this.getObjVarName(t):JSON.stringify(e)},e.prototype.getObjVarNameBase=function(e){var t="v",n=this.m_referencedObjectPaths[e];if(n)switch(n.objectPathInfo.ObjectPathType){case 1:t=this.m_globalObjName;break;case 4:t=N._toCamelLowerCase(n.objectPathInfo.Name);break;case 3:var r=n.objectPathInfo.Name;r.length>3&&"Get"===r.substr(0,3)&&(r=r.substr(3)),t=N._toCamelLowerCase(r);break;case 5:var o=this.getObjVarNameBase(n.objectPathInfo.ParentObjectPathId);t="s"===o.charAt(o.length-1)?o.substr(0,o.length-1):o+"Item"}return t},e.prototype.getObjVarName=function(e){if(this.m_variableNameForObjectPathMap[e])return this.m_variableNameForObjectPathMap[e];var t=this.getObjVarNameBase(e);if(!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t;for(var n=1;this.m_variableNameToObjectPathMap[t+n.toString()];)n++;return t+=n.toString(),this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t},e}(),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.cannotRegisterEvent="CannotRegisterEvent",t.connectionFailureWithStatus="ConnectionFailureWithStatus",t.connectionFailureWithDetails="ConnectionFailureWithDetails",t.propertyNotLoaded="PropertyNotLoaded",t.runMustReturnPromise="RunMustReturnPromise",t.moreInfoInnerError="MoreInfoInnerError",t.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",t.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",t.objectIsUntracked="ObjectIsUntracked",t.customFunctionDefintionMissing="CustomFunctionDefintionMissing",t.customFunctionImplementationMissing="CustomFunctionImplementationMissing",t.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",t.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",t.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",t.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",t.customFunctionInvalidFunction="CustomFunctionInvalidFunction",t.customFunctionInvalidFunctionMapping="CustomFunctionInvalidFunctionMapping",t.customFunctionWindowMissing="CustomFunctionWindowMissing",t.customFunctionDefintionMissingOnWindow="CustomFunctionDefintionMissingOnWindow",t.pendingBatchInProgress="PendingBatchInProgress",t.notInsideBatch="NotInsideBatch",t.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",t}(u.CommonResourceStrings);t.ResourceStrings=F,a.CoreUtility.addResourceStringValues({CannotRegisterEvent:"The event handler cannot be registered.",PropertyNotLoaded:"The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",RunMustReturnPromise:'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',InvalidOrTimedOutSessionMessage:"Your Office Online session has expired or is invalid. To continue, refresh the page.",InvalidOperationInCellEditMode:"Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",CustomFunctionDefintionMissing:"A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.",CustomFunctionDefintionMissingOnWindow:"A property with the name '{0}' that represents the function's definition must exist on the window object.",CustomFunctionImplementationMissing:"The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",CustomFunctionNameContainsBadChars:"The function name may only contain letters, digits, underscores, and periods.",CustomFunctionNameCannotSplit:"The function name must contain a non-empty namespace and a non-empty short name.",CustomFunctionUnexpectedNumberOfEntriesInResultBatch:"The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",CustomFunctionCancellationHandlerMissing:"The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",CustomFunctionInvalidFunction:"The property with the name '{0}' that represents the function's definition is not a valid function.",CustomFunctionInvalidFunctionMapping:"The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.",CustomFunctionWindowMissing:"The window object was not found.",PendingBatchInProgress:"There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",NotInsideBatch:"Operations may not be invoked outside of a batch method.",CannotUpdateReadOnlyProperty:"The property '{0}' is read-only and it cannot be updated.",ObjectIsUntracked:"The object is untracked."});var N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.fixObjectPathIfNecessary=function(e,t){e&&e._objectPath&&t&&e._objectPath.updateUsingObjectData(t,e)},t.load=function(e,t){return e.context.load(e,t),e},t.loadAndSync=function(e,t){return e.context.load(e,t),e.context.sync().then((function(){return e}))},t.retrieve=function(e,n){var r=u._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;r||(r=!t.isSetSupported("RichApiRuntime","1.1"));var o=new g(e,r);return e._retrieve(n,o),o},t.retrieveAndSync=function(e,n){var r=t.retrieve(e,n);return e.context.sync().then((function(){return r}))},t.toJson=function(e,n,r,o){var i={};for(var s in n)void 0!==(a=n[s])&&(i[s]=a);for(var s in r){var a;void 0!==(a=r[s])&&(a[t.fieldName_isCollection]&&void 0!==a[t.fieldName_m__items]?i[s]=a.toJSON().items:i[s]=a.toJSON())}return o&&(i.items=o.map((function(e){return e.toJSON()}))),i},t.throwError=function(e,t,n){throw new a._Internal.RuntimeError({code:e,httpStatusCode:400,message:a.CoreUtility._getResourceString(e,t),debugInfo:n?{errorLocation:n}:void 0})},t.createRuntimeError=function(e,t,n,r,o){return new a._Internal.RuntimeError({code:e,httpStatusCode:r,message:t,debugInfo:{errorLocation:n},data:o})},t.throwIfNotLoaded=function(e,n,r,o){if(!o&&a.CoreUtility.isUndefined(n)&&e.charCodeAt(0)!=t.s_underscoreCharCode)throw t.createPropertyNotLoadedException(r,e)},t.createPropertyNotLoadedException=function(e,t){return new a._Internal.RuntimeError({code:c.propertyNotLoaded,httpStatusCode:400,message:a.CoreUtility._getResourceString(F.propertyNotLoaded,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},t.createCannotUpdateReadOnlyPropertyException=function(e,t){return new a._Internal.RuntimeError({code:c.cannotUpdateReadOnlyProperty,httpStatusCode:400,message:a.CoreUtility._getResourceString(F.cannotUpdateReadOnlyProperty,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},t.promisify=function(e){return new Promise((function(t,n){e((function(e){"failed"==e.status?n(e.error):t(e.value)}))}))},t._addActionResultHandler=function(e,t,n){e.context._pendingRequest.addActionResultHandler(t,n)},t._handleNavigationPropertyResults=function(e,t,n){for(var r=0;r-1};h.prototype.append=function(e,t){e=d(e),t=p(t);var n=this.map[e];this.map[e]=n?n+","+t:t},h.prototype.delete=function(e){delete this.map[d(e)]},h.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},h.prototype.set=function(e,t){this.map[d(e)]=p(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var c=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},_.call(v.prototype),_.call(P.prototype),P.prototype.clone=function(){return new P(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},P.error=function(){var e=new P(null,{status:0,statusText:""});return e.type="error",e};var l=[301,302,303,307,308];P.redirect=function(e,t){if(-1===l.indexOf(t))throw new RangeError("Invalid status code");return new P(null,{status:t,headers:{location:e}})},e.Headers=h,e.Request=v,e.Response=P,e.fetch=function(e,t){return new Promise((function(n,o){var i=new v(e,t),s=new XMLHttpRequest;s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;n(new P(o,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.open(i.method,i.url,!0),"include"===i.credentials&&(s.withCredentials=!0),"responseType"in s&&r&&(s.responseType="blob"),i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),s.send(void 0===i._bodyInit?null:i._bodyInit)}))},e.fetch.polyfill=!0}function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function m(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function y(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function _(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(r&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(o&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(i&&r&&a(e))this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!i||!ArrayBuffer.prototype.isPrototypeOf(e)&&!u(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=b(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,n,r=m(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=g(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function O(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function P(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8);t.default=function(e){function t(){Office.onReady((function(e){e.host===Office.HostType.Excel?function e(){CustomFunctionMappings&&CustomFunctionMappings.__delay__?setTimeout(e,50):r.CustomFunctions.initialize()}():console.warn("Warning: Expected to be loaded inside of an Excel add-in.")}))}window.CustomFunctions=window.CustomFunctions||{},window.CustomFunctions.setCustomFunctionInvoker=r.setCustomFunctionInvoker,window.CustomFunctions.Error=r.CustomFunctionError,window.CustomFunctions.ErrorCode=r.ErrorCode,window.CustomFunctions.FormattedNumber=r.CustomFunctionFormattedNumber,window.CustomFunctions.Entity=r.CustomFunctionEntity,window.CustomFunctions.WebImage=r.CustomFunctionWebImage,window.CustomFunctions.Attribution=r.CustomFunctionAttribution,window.CustomFunctions.Provider=r.CustomFunctionProvider,r.setCustomFunctionAssociation(window.CustomFunctions._association),e&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t())}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CustomFunctionsContainer=t.CustomFunctions=t.setCustomFunctionInvoker=t.setCustomFunctionAssociation=t.customFunctionProxy=t.CustomFunctionProxy=t.CreateCustomFunctionInstance=t.CustomFunctionProvider=t.CustomFunctionAttribution=t.CustomFunctionWebImage=t.CustomFunctionFormattedNumber=t.CustomFunctionEntity=t.CustomFunctionError=t.ErrorCode=t.InvocationContext=t.Script=void 0;var i=n(2),s=n(0),a=i.BatchApiHelper.createPropertyObject,u=(i.BatchApiHelper.createMethodObject,i.BatchApiHelper.createIndexerObject,i.BatchApiHelper.createRootServiceObject),c=i.BatchApiHelper.createTopLevelServiceObject,l=(i.BatchApiHelper.createChildItemObject,i.BatchApiHelper.invokeMethod),d=(i.BatchApiHelper.invokeEnsureUnchanged,i.BatchApiHelper.invokeSetProperty,i.Utility.isNullOrUndefined),p=(i.Utility.isUndefined,i.Utility.throwIfNotLoaded,i.Utility.throwIfApiNotSupported),f=i.Utility.load,h=(i.Utility.retrieve,i.Utility.toJson),m=i.Utility.fixObjectPathIfNecessary,g=i.Utility._handleNavigationPropertyResults,y=(i.Utility.adjustToDateTime,i.Utility.processRetrieveResult),b=(i.Utility.setMockData,i.CommonUtility.calculateApiFlags,function(e){function t(t){var n=e.call(this,t)||this;return n.m_customFunctions=N.newObject(n),n.m_container=u(w,n),n._rootObject=n.m_container,n._rootObjectPropertyName="customFunctionsContainer",n._requestFlagModifier=2176,n}return o(t,e),Object.defineProperty(t.prototype,"customFunctions",{get:function(){return this.m_customFunctions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customFunctionsContainer",{get:function(){return this.m_container},enumerable:!1,configurable:!0}),t.prototype._processOfficeJsErrorResponse=function(e,t){5004===e&&(t.ErrorCode=x.invalidOperationInCellEditMode,t.ErrorMessage=i.Utility._getResourceString(i.ResourceStrings.invalidOperationInCellEditMode))},t}(i.ClientRequestContext));t.Script={_CustomFunctionMetadata:{}};var _,v=function(){function e(e,t,n,r,o){this._functionName=e,d(t)||(this._address=t),d(n)||(this._parameterAddresses=n),this.setResult=r,this.setError=o}return Object.defineProperty(e.prototype,"onCanceled",{get:function(){if(!d(this._onCanceled)&&"function"==typeof this._onCanceled)return this._onCanceled},set:function(e){this._onCanceled=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"functionName",{get:function(){return this._functionName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parameterAddresses",{get:function(){return this._parameterAddresses},enumerable:!1,configurable:!0}),e}();t.InvocationContext=v,function(e){e.Info="Medium",e.Error="Unexpected",e.Verbose="Verbose"}(_||(_={}));var O,P=function(e,t){this.Severity=e,this.Message=t},C=function(){function e(){}return e.logEvent=function(t,n,r){if(e.s_shouldLog||i.CoreUtility._logEnabled){var o=t.Severity+" "+t.Message+n;if(r&&(o=o+" "+r),i.Utility.log(o),e.s_shouldLog)switch(t.Severity){case _.Verbose:null!==console.log&&console.log(o);break;case _.Info:null!==console.info&&console.info(o);break;case _.Error:null!==console.error&&console.error(o)}}},e.shouldLog=function(){try{return!d(console)&&!d(window)&&window.name&&"string"==typeof window.name&&JSON.parse(window.name)[e.CustomFunctionLoggingFlag]}catch(e){return i.Utility.log(JSON.stringify(e)),!1}},e.CustomFunctionLoggingFlag="CustomFunctionsRuntimeLogging",e.s_shouldLog=e.shouldLog(),e}();!function(e){e.invalidValue="#VALUE!",e.notAvailable="#N/A",e.divisionByZero="#DIV/0!",e.invalidNumber="#NUM!",e.nullReference="#NULL!",e.invalidName="#NAME?",e.invalidReference="#REF!"}(O=t.ErrorCode||(t.ErrorCode={}));var I=function(e){function t(n,r,o){var i=e.call(this,r||"")||this;return i.type=t.valueType,i.basicType=t.valueType,Object.setPrototypeOf(i,t.prototype),i.code=n||O.invalidValue,i.basicValue=n||O.invalidValue,i.errorSubType=o,i.stack=void 0,i}return o(t,e),t.prototype.toJSON=function(){return{valueType:"CustomFunctionError",code:this.code,type:this.type,basicValue:this.basicValue,basicType:this.type,errorSubType:this.errorSubType,message:this._getMessage(),errorType:this._getErrorType()}},t.prototype._getErrorType=function(){switch(this.basicValue){case O.invalidValue:return"Value";case O.divisionByZero:return"Div0";case O.notAvailable:return"NotAvailable";case O.invalidNumber:return"Num";case O.invalidName:return"Name";case O.invalidReference:return"Ref";case O.nullReference:return"Null";default:return}},t.prototype._getMessage=function(){switch(this.basicValue){case O.invalidValue:case O.notAvailable:return""==this.message?void 0:this.message;case O.divisionByZero:case O.invalidNumber:case O.invalidName:case O.invalidReference:case O.nullReference:default:return}},t.valueType="Error",t}(Error);t.CustomFunctionError=I;var R=function(){function e(t,n){this.type=e.valueType,this.basicValue="#VALUE!",this.basicType="Error",Object.setPrototypeOf(this,e.prototype),this.text=t,this.properties=n}return e.prototype.toJSON=function(){return{type:this.type,text:this.text,basicValue:this.basicValue,basicType:this.basicType,properties:this.properties}},e.valueType="Entity",e}();t.CustomFunctionEntity=R;var j=function(){function e(t,n){this.type=e.valueType,this.basicValue=t,this.numberFormat=n}return e.prototype.toJSON=function(){return{type:this.type,basicValue:this.basicValue,numberFormat:this.numberFormat}},e.valueType="FormattedNumber",e}();t.CustomFunctionFormattedNumber=j;var E=function(){function e(t,n,r,o,i){this.type=e.valueType,this.basicValue="#VALUE!",this.basicType="Error",this.address=t,null!=o&&(this.attribution=o),null!=i&&(this.provider=i),null!=n&&(this.altText=n),null!=r&&(this.relatedImagesAddress=r)}return e.prototype.toJSON=function(){return{type:this.type,basicValue:this.basicValue,basicType:this.basicType,address:this.address,altText:this.altText,relatedImagesAddress:this.relatedImagesAddress,attribution:null==this.attribution?void 0:this.attribution.map((function(e){return e.toJSON()})),provider:null==this.provider?void 0:this.provider.toJSON()}},e.valueType="WebImage",e}();t.CustomFunctionWebImage=E;var A=function(){function e(e,t,n,r){null!=e&&(this.licenseAddress=e),null!=t&&(this.licenseText=t),null!=n&&(this.sourceAddress=n),null!=r&&(this.sourceText=r)}return e.prototype.toJSON=function(){return{licenseAddress:this.licenseAddress,licenseText:this.licenseText,sourceAddress:this.sourceAddress,sourceText:this.sourceText}},e}();t.CustomFunctionAttribution=A;var S=function(){function e(e,t,n){this.description=e,null!=t&&(this.logoSourceAddress=t),null!=n&&(this.logoTargetAddress=n)}return e.prototype.toJSON=function(){return{description:this.description,logoSourceAddress:this.logoSourceAddress,logoTargetAddress:this.logoTargetAddress}},e}();t.CustomFunctionProvider=S,t.CreateCustomFunctionInstance=function e(t){if(t instanceof Array)return t.map((function(t){return e(t)}));if(!(t instanceof Object))return t;var n=JSON.parse(t.value);switch(n.type){case R.valueType:return new R(n.text,n.properties);case j.valueType:return new j(n.primitive,n.numberFormat);case I.valueType:return new I(n.primitive,void 0,n.errorSubCode);case E.valueType:return new E(n.address,n.altText,n.relatedImagesAddress,n.attribution,n.provider);case"Double":case"String":case"Boolean":return n.primitive;default:throw i.Utility.createRuntimeError(x.generalException,"message","CustomFunctionProxy.createRichDataFromJsonString")}};var F=function(){function e(){this._whenInit=void 0,this._isInit=!1,this._setResultsDelayMillis=50,this._setResultsOverdueDelayMillis=2e3,this._maxContextSyncExecutionDurationMills=15e3,this._minContextSyncIntervalMills=500,this._smallerMinContextSyncIntervalMills=200,this._maxContextSyncIntervalMills=2e3,this._setResultsLifeMillis=6e4,this._ensureInitRetryDelayMillis=500,this._resultEntryBuffer={},this._resultEntryRetryBuffer={},this._retryBufferBodySize=0,this._isSetResultsTaskScheduled=!1,this._setResultsTaskOverdueTime=0,this._inProgressContextSyncExpectedFinishTime=0,this._batchQuotaMillis=1e3,this._invocationContextMap={},this._maxResultSize=2e6}return e.prototype._initSettings=function(){if("object"==typeof t.Script&&"object"==typeof t.Script._CustomFunctionSettings){if("number"==typeof t.Script._CustomFunctionSettings.setResultsDelayMillis){var e=t.Script._CustomFunctionSettings.setResultsDelayMillis;e=Math.max(0,e),e=Math.min(1e3,e),this._setResultsDelayMillis=e}if("number"==typeof t.Script._CustomFunctionSettings.ensureInitRetryDelayMillis){var n=t.Script._CustomFunctionSettings.ensureInitRetryDelayMillis;n=Math.max(0,n),n=Math.min(2e3,n),this._ensureInitRetryDelayMillis=n}if("number"==typeof t.Script._CustomFunctionSettings.setResultsLifeMillis){var r=t.Script._CustomFunctionSettings.setResultsLifeMillis;r=Math.max(0,r),r=Math.min(6e5,r),this._setResultsLifeMillis=r}if("number"==typeof t.Script._CustomFunctionSettings.batchQuotaMillis){var o=t.Script._CustomFunctionSettings.batchQuotaMillis;o=Math.max(0,o),o=Math.min(1e3,o),this._batchQuotaMillis=o}}},e.prototype.ensureInit=function(e){var t=this;return this._initSettings(),void 0===this._whenInit&&(this._whenInit=i.Utility._createPromiseFromResult(null).then((function(){if(!t._isInit)return e.eventRegistration.register(5,"",t._handleMessage.bind(t))})).then((function(){t._isInit=!0}))),this._isInit||e._pendingRequest._addPreSyncPromise(this._whenInit),this._whenInit},e.prototype.setCustomFunctionInvoker=function(e){"object"==typeof CustomFunctionMappings&&delete CustomFunctionMappings.__delay__,this._invoker=e},e.prototype.setCustomFunctionAssociation=function(e){var t=this;this._customFunctionMappingsUpperCase=void 0,this._association=e,this._association&&this._association.onchange((function(){t._customFunctionMappingsUpperCase=void 0}))},e.prototype._initFromHostBridge=function(e){var t=this;this._initSettings(),e.addHostMessageHandler((function(e){3===e.type?t._handleMessage(e.message):4===e.type&&t._handleSettings(e.message)})),this._isInit=!0,this._whenInit=i.CoreUtility.Promise.resolve()},e.prototype._handleSettings=function(e){i.Utility.log("CustomFunctionProxy._handleSettings:"+JSON.stringify(e)),e&&"object"==typeof e&&(C.s_shouldLog=e[C.CustomFunctionLoggingFlag])},e.prototype._handleMessage=function(t){try{i.Utility.log("CustomFunctionProxy._handleMessage"),i.Utility.checkArgumentNull(t,"args");for(var n=t.entries,r=[],o=[],s=[],a=0;a0&&this._handleMetadataEntries(s),r.length>0){var u=this._batchInvocationEntries(r);u.length>0&&this._invokeRemainingBatchEntries(u,0)}o.length>0&&this._handleCancellationEntries(o)}catch(t){throw e._tryLog(t),t}return i.Utility._createPromiseFromResult(null)},e.toLogMessage=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t},e._tryLog=function(t){var n=e.toLogMessage(t);i.Utility.log(n)},e.prototype._handleMetadataEntries=function(e){for(var n=0;n0&&e>this._setResultsTaskOverdueTime)return i.Utility.log("SetResultsTask overdue"),void this._executeSetResultsTask();this._isSetResultsTaskScheduled||(i.Utility.log("setTimeout(CustomFunctionProxy._executeSetResultsTask)"),setTimeout(this._executeSetResultsTask.bind(this),this._setResultsDelayMillis),this._isSetResultsTaskScheduled=!0,this._setResultsTaskOverdueTime=e+this._setResultsDelayMillis+this._setResultsOverdueDelayMillis)},e.prototype._convertCustomFunctionInvocationResultToArray=function(e){var t=[];return t.push(e.id),t.push(!e.failed),i.CoreUtility.isUndefined(e.value)?t.push(null):t.push(e.value),e.failed&&(i.CoreUtility.isUndefined(e.errorCode)?t.push(0):t.push(e.errorCode)),i.Utility.isSetSupported("CustomFunctions","1.9")&&t.push(e.outboundData),t},e.prototype._executeSetResultsTask=function(){var e=this;i.Utility.log("CustomFunctionProxy._executeSetResultsTask");var t=Date.now();if(this._inProgressContextSyncExpectedFinishTime>0&&this._inProgressContextSyncExpectedFinishTime>t)return i.Utility.log("context.sync() is in progress. setTimeout(CustomFunctionProxy._executeSetResultsTask)"),setTimeout(this._executeSetResultsTask.bind(this),this._setResultsDelayMillis),void(this._setResultsTaskOverdueTime=t+this._setResultsDelayMillis+this._setResultsOverdueDelayMillis);this._isSetResultsTaskScheduled=!1,this._setResultsTaskOverdueTime=0;var n={},r=!1;N.isFeatureEnabled(1)&&Object.keys(this._resultEntryRetryBuffer).length>0?(n=this._resultEntryRetryBuffer,this._resultEntryRetryBuffer={},this._retryBufferBodySize=2,r=!0):(n=this._resultEntryBuffer,this._resultEntryBuffer={});var o=i.Utility.isSetSupported("CustomFunctions","1.7"),s=[];for(var a in n)o?s.push(this._convertCustomFunctionInvocationResultToArray(n[a].result)):s.push(n[a].result);if(0!==s.length){var u=new b;o?u.customFunctions.setInvocationArrayResults(s):u.customFunctions.setInvocationResults(s);var c=Date.now();this._inProgressContextSyncExpectedFinishTime=c+this._maxContextSyncExecutionDurationMills,u.sync().then((function(t){var n=Date.now();e._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(n-c),r&&e._ensureSetResultsTaskIsScheduled(n)}),(function(t){var r=Date.now();e._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(r-c),N.isFeatureEnabled(1)&&t.code==i.ErrorCodes.requestPayloadSizeLimitExceeded?e._restoreAndSliceResultEntries(r,n):e._restoreResultEntries(r,n),e._ensureSetResultsTaskIsScheduled(r)}))}},e.prototype._restoreResultEntries=function(e,t){for(var n in t){var r=t[n];e-r.timeCreated<=this._setResultsLifeMillis&&(this._resultEntryBuffer[n]||(this._resultEntryBuffer[n]=r))}},e.prototype._restoreAndSliceResultEntries=function(e,t){for(var n in t){var r=t[n],o=void 0;if(e-r.timeCreated<=this._setResultsLifeMillis&&!this._resultEntryBuffer[n]){try{o=JSON.stringify(this._convertCustomFunctionInvocationResultToArray(r.result)).length+1}catch(e){this._resultEntryBuffer[n]=r,i.Utility.log("Result can't pass in JSON.stringify");continue}this._retryBufferBodySize+o=0},n.initialize=function(){var e=this,r=new b;return t.customFunctionProxy.ensureInit(r).then((function(){var o;return r.customFunctions._SetOsfControlContainerReadyForCustomFunctions(),i.Utility.isSetSupported("CustomFunctions","1.9")&&(o=r.customFunctions._GetEnabledFeatures()),i.Utility.log("OsfControl activation lifecycle: Set OsfControlContainer ready for CustomFunctions"),r._customData="SetOsfControlContainerReadyForCustomFunctions",r.sync().then((function(){d(o)||(e._enabledFeature=o.value)})).catch((function(e){!function(e,r){var o=e instanceof i.Error&&e.code===x.invalidOperationInCellEditMode;if(i.CoreUtility.log("Error on starting custom functions: "+e),o){i.CoreUtility.log("Was in cell-edit mode, will try again");var s=t.customFunctionProxy._ensureInitRetryDelayMillis;return new i.CoreUtility.Promise((function(e){return setTimeout(e,s)})).then((function(){return n.initialize()}))}throw e}(e)}))}))},n.prototype.setInvocationArrayResults=function(e){p("CustomFunctions.setInvocationArrayResults","CustomFunctions","1.4","Excel"),l(this,"SetInvocationArrayResults",0,[e],2,0)},n.prototype.setInvocationResults=function(e){l(this,"SetInvocationResults",0,[e],2,0)},n.prototype._GetEnabledFeatures=function(){return p("CustomFunctions._GetEnabledFeatures","CustomFunctions","1.4","Excel"),l(this,"_GetEnabledFeatures",1,[],4,0)},n.prototype._SetInvocationError=function(e,t){l(this,"_SetInvocationError",0,[e,t],2,0)},n.prototype._SetInvocationResult=function(e,t){l(this,"_SetInvocationResult",0,[e,t],2,0)},n.prototype._SetOsfControlContainerReadyForCustomFunctions=function(){l(this,"_SetOsfControlContainerReadyForCustomFunctions",0,[],10,0)},n.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),d(t)||m(this,t)},n.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),y(this,t,n)},n.newObject=function(e){return c(n,e,"Microsoft.ExcelServices.CustomFunctions",!1,4)},n.prototype.toJSON=function(){return h(this,{},{})},n}(i.ClientObject);t.CustomFunctions=N;var x,w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"CustomFunctionsContainer"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_navigationPropertyNames",{get:function(){return["customFunctions"]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customFunctions",{get:function(){return p("CustomFunctionsContainer.customFunctions","CustomFunctions","1.2","Excel"),this._C||(this._C=a(N,this,"CustomFunctions",!1,4)),this._C},enumerable:!1,configurable:!0}),t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!d(t)){var n=t;m(this,n),g(this,n,["customFunctions","CustomFunctions"])}},t.prototype.load=function(e){return f(this,e)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),y(this,t,n)},t.prototype.toJSON=function(){return h(this,{},{})},t}(i.ClientObject);t.CustomFunctionsContainer=w,function(e){e.generalException="GeneralException",e.invalidOperation="InvalidOperation",e.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"}(x||(x={}))}]); + + + +var oteljs=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=19)}([function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"b",(function(){return c})),n.d(e,"e",(function(){return s})),n.d(e,"c",(function(){return u}));var r=n(3),i=n(4);function o(t,e){return{name:t,dataType:r.a.Boolean,value:e,classification:i.a.SystemMetadata}}function a(t,e){return{name:t,dataType:r.a.Int64,value:e,classification:i.a.SystemMetadata}}function c(t,e){return{name:t,dataType:r.a.Double,value:e,classification:i.a.SystemMetadata}}function s(t,e){return{name:t,dataType:r.a.String,value:e,classification:i.a.SystemMetadata}}function u(t,e){return{name:t,dataType:r.a.Guid,value:e,classification:i.a.SystemMetadata}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"d",(function(){return c})),n.d(e,"c",(function(){return s}));var r,i,o=new(n(10).a);function a(){return o}function c(t,e,n){o.fireEvent({level:t,category:e,message:n})}function s(t,e,n){c(r.Error,t,(function(){var t=n instanceof Error?n.message:"";return e+": "+t}))}!function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Info=2]="Info",t[t.Verbose=3]="Verbose"}(r||(r={})),function(t){t[t.Core=0]="Core",t[t.Sink=1]="Sink",t[t.Transport=2]="Transport"}(i||(i={}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0);function i(t,e,n){t.push(Object(r.e)("zC."+e,n))}},function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t[t.String=0]="String",t[t.Boolean=1]="Boolean",t[t.Int64=2]="Int64",t[t.Double=3]="Double",t[t.Guid=4]="Guid"}(r||(r={}))},function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t[t.EssentialServiceMetadata=1]="EssentialServiceMetadata",t[t.AccountData=2]="AccountData",t[t.SystemMetadata=4]="SystemMetadata",t[t.OrganizationIdentifiableInformation=8]="OrganizationIdentifiableInformation",t[t.EndUserIdentifiableInformation=16]="EndUserIdentifiableInformation",t[t.CustomerContent=32]="CustomerContent",t[t.AccessControl=64]="AccessControl"}(r||(r={}))},function(t,e,n){"use strict";var r,i,o,a,c;n.d(e,"e",(function(){return r})),n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return c})),function(t){t[t.NotSet=0]="NotSet",t[t.Measure=1]="Measure",t[t.Diagnostics=2]="Diagnostics",t[t.CriticalBusinessImpact=191]="CriticalBusinessImpact",t[t.CriticalCensus=192]="CriticalCensus",t[t.CriticalExperimentation=193]="CriticalExperimentation",t[t.CriticalUsage=194]="CriticalUsage"}(r||(r={})),function(t){t[t.NotSet=0]="NotSet",t[t.Normal=1]="Normal",t[t.High=2]="High"}(i||(i={})),function(t){t[t.NotSet=0]="NotSet",t[t.Normal=1]="Normal",t[t.High=2]="High"}(o||(o={})),function(t){t[t.NotSet=0]="NotSet",t[t.SoftwareSetup=1]="SoftwareSetup",t[t.ProductServiceUsage=2]="ProductServiceUsage",t[t.ProductServicePerformance=4]="ProductServicePerformance",t[t.DeviceConfiguration=8]="DeviceConfiguration",t[t.InkingTypingSpeech=16]="InkingTypingSpeech"}(a||(a={})),function(t){t[t.ReservedDoNotUse=0]="ReservedDoNotUse",t[t.BasicEvent=10]="BasicEvent",t[t.FullEvent=100]="FullEvent",t[t.NecessaryServiceDataEvent=110]="NecessaryServiceDataEvent",t[t.AlwaysOnNecessaryServiceDataEvent=120]="AlwaysOnNecessaryServiceDataEvent"}(c||(c={}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var r,i,o,a,c,s,u,d,f,l=n(0),v=n(2);(r||(r={})).getFields=function(t,e){var n=[];return n.push(Object(l.d)(t+".Code",e.code)),void 0!==e.type&&n.push(Object(l.e)(t+".Type",e.type)),void 0!==e.tag&&n.push(Object(l.d)(t+".Tag",e.tag)),void 0!==e.isExpected&&n.push(Object(l.a)(t+".IsExpected",e.isExpected)),Object(v.a)(n,t,"Office.System.Result"),n},(o=i||(i={})).contractName="Office.System.Activity",o.getFields=function(t){var e=[];return void 0!==t.cV&&e.push(Object(l.e)("Activity.CV",t.cV)),e.push(Object(l.d)("Activity.Duration",t.duration)),e.push(Object(l.d)("Activity.Count",t.count)),e.push(Object(l.d)("Activity.AggMode",t.aggMode)),void 0!==t.success&&e.push(Object(l.a)("Activity.Success",t.success)),void 0!==t.result&&e.push.apply(e,r.getFields("Activity.Result",t.result)),Object(v.a)(e,"Activity",o.contractName),e},(a||(a={})).getFields=function(t,e){var n=[];return void 0!==e.id&&n.push(Object(l.e)(t+".Id",e.id)),void 0!==e.version&&n.push(Object(l.e)(t+".Version",e.version)),void 0!==e.sessionId&&n.push(Object(l.e)(t+".SessionId",e.sessionId)),Object(v.a)(n,t,"Office.System.Host"),n},(c||(c={})).getFields=function(t,e){var n=[];return void 0!==e.alias&&n.push(Object(l.e)(t+".Alias",e.alias)),void 0!==e.primaryIdentityHash&&n.push(Object(l.e)(t+".PrimaryIdentityHash",e.primaryIdentityHash)),void 0!==e.primaryIdentitySpace&&n.push(Object(l.e)(t+".PrimaryIdentitySpace",e.primaryIdentitySpace)),void 0!==e.tenantId&&n.push(Object(l.e)(t+".TenantId",e.tenantId)),void 0!==e.tenantGroup&&n.push(Object(l.e)(t+".TenantGroup",e.tenantGroup)),void 0!==e.isAnonymous&&n.push(Object(l.a)(t+".IsAnonymous",e.isAnonymous)),Object(v.a)(n,t,"Office.System.User"),n},(s||(s={})).getFields=function(t,e){var n=[];return void 0!==e.id&&n.push(Object(l.e)(t+".Id",e.id)),void 0!==e.version&&n.push(Object(l.e)(t+".Version",e.version)),void 0!==e.instanceId&&n.push(Object(l.e)(t+".InstanceId",e.instanceId)),void 0!==e.name&&n.push(Object(l.e)(t+".Name",e.name)),void 0!==e.marketplaceType&&n.push(Object(l.e)(t+".MarketplaceType",e.marketplaceType)),void 0!==e.sessionId&&n.push(Object(l.e)(t+".SessionId",e.sessionId)),void 0!==e.browserToken&&n.push(Object(l.e)(t+".BrowserToken",e.browserToken)),void 0!==e.osfRuntimeVersion&&n.push(Object(l.e)(t+".OsfRuntimeVersion",e.osfRuntimeVersion)),void 0!==e.officeJsVersion&&n.push(Object(l.e)(t+".OfficeJsVersion",e.officeJsVersion)),void 0!==e.hostJsVersion&&n.push(Object(l.e)(t+".HostJsVersion",e.hostJsVersion)),void 0!==e.assetId&&n.push(Object(l.e)(t+".AssetId",e.assetId)),void 0!==e.providerName&&n.push(Object(l.e)(t+".ProviderName",e.providerName)),void 0!==e.type&&n.push(Object(l.e)(t+".Type",e.type)),Object(v.a)(n,t,"Office.System.SDX"),n},(u||(u={})).getFields=function(t,e){var n=[];return void 0!==e.name&&n.push(Object(l.e)(t+".Name",e.name)),void 0!==e.state&&n.push(Object(l.e)(t+".State",e.state)),Object(v.a)(n,t,"Office.System.Funnel"),n},(d||(d={})).getFields=function(t,e){var n=[];return void 0!==e.id&&n.push(Object(l.d)(t+".Id",e.id)),void 0!==e.name&&n.push(Object(l.e)(t+".Name",e.name)),void 0!==e.commandSurface&&n.push(Object(l.e)(t+".CommandSurface",e.commandSurface)),void 0!==e.parentName&&n.push(Object(l.e)(t+".ParentName",e.parentName)),void 0!==e.triggerMethod&&n.push(Object(l.e)(t+".TriggerMethod",e.triggerMethod)),void 0!==e.timeOffsetMs&&n.push(Object(l.d)(t+".TimeOffsetMs",e.timeOffsetMs)),Object(v.a)(n,t,"Office.System.UserAction"),n},function(t){t.getFields=function(t,e){var n=[];return n.push(Object(l.e)(t+".ErrorGroup",e.errorGroup)),n.push(Object(l.d)(t+".Tag",e.tag)),void 0!==e.code&&n.push(Object(l.d)(t+".Code",e.code)),void 0!==e.id&&n.push(Object(l.d)(t+".Id",e.id)),void 0!==e.count&&n.push(Object(l.d)(t+".Count",e.count)),Object(v.a)(n,t,"Office.System.Error"),n}}(f||(f={}));var p,y=i,h=r,g=f,m=u,b=a,F=s,O=d,S=c;!function(t){!function(t){!function(t){t.Activity=y,t.Result=h,t.Error=g,t.Funnel=m,t.Host=b,t.SDX=F,t.User=S,t.UserAction=O}(t.System||(t.System={}))}(t.Office||(t.Office={}))}(p||(p={}))},function(t,e,n){"use strict";function r(t){var e={eventName:t.eventName,eventFlags:t.eventFlags};return t.telemetryProperties&&(e.telemetryProperties={ariaTenantToken:t.telemetryProperties.ariaTenantToken,nexusTenantToken:t.telemetryProperties.nexusTenantToken}),t.eventContract&&(e.eventContract={name:t.eventContract.name,dataFields:t.eventContract.dataFields.slice()}),e.dataFields=t.dataFields?t.dataFields.slice():[],e}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return v}));var r,i,o=n(7),a=n(1);!function(t){t[t.Aria=0]="Aria",t[t.Nexus=1]="Nexus"}(r||(r={})),function(t){var e={},n={},i={};function o(t){if("object"!=typeof t)throw new Error("tokenTree must be an object");i=function t(e,n){if("object"!=typeof n)return n;for(var r=0,i=Object.keys(n);r=0;--c){var u=Object.create(Object.prototype);u[r[c]]=s,s=u}o(s)}},t.setTenantTokens=o,t.getTenantTokens=function(t){var e=c(t),n=s(t);if(!n||!e)throw new Error("Could not find tenant token for "+t);return{ariaTenantToken:e,nexusTenantToken:n}},t.getAriaTenantToken=c,t.getNexusTenantToken=s,t.clear=function(){e={},n={},i={}}}(i||(i={}));var c,s=n(3);!function(t){var e=/^[A-Z][a-zA-Z0-9]*$/,n=/^[a-zA-Z0-9_\.]*$/;function r(t){return void 0!==t&&n.test(t)}function i(t){if(!((e=t.name)&&r(e)&&e.length+5<100))throw new Error("Invalid dataField name");var e;t.dataType===s.a.Int64&&o(t.value)}function o(t){if("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t<-9007199254740991||t>9007199254740991)throw new Error("Invalid integer "+JSON.stringify(t))}t.validateTelemetryEvent=function(t){if(!function(t){if(!t||t.length>98)return!1;var n=t.split("."),r=n[n.length-1];return function(t){return!!t&&t.length>=3&&"Office"===t[0]}(n)&&(i=r,void 0!==i&&e.test(i));var i}(t.eventName))throw new Error("Invalid eventName");if(t.eventContract&&!r(t.eventContract.name))throw new Error("Invalid eventContract");if(null!=t.dataFields)for(var n=0;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1] 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex === 0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive = bucketPositive.sort(function (left, right) { + var diff = left.tabIndex - right.tabIndex; + if (diff === 0) { + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + return { + set_entropy: function OSF_OUtil$set_entropy(entropy) { + if (typeof entropy == "string") { + for (var i = 0; i < entropy.length; i += 4) { + var temp = 0; + for (var j = 0; j < 4 && i + j < entropy.length; j++) { + temp = (temp << 8) + entropy.charCodeAt(i + j); + } + _rndentropy ^= temp; + } + } + else if (typeof entropy == "number") { + _rndentropy ^= entropy; + } + else { + _rndentropy ^= 0x7fffffff * Math.random(); + } + _rndentropy &= 0x7fffffff; + }, + extend: function OSF_OUtil$extend(child, parent) { + var F = function () { }; + F.prototype = parent.prototype; + child.prototype = new F(); + child.prototype.constructor = child; + child.uber = parent.prototype; + if (parent.prototype.constructor === Object.prototype.constructor) { + parent.prototype.constructor = parent; + } + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name] = {}; + } + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { + if (parent && name && parent[name]) { + delete parent[name]; + } + }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret = {}; + for (var key in settingsCollection) { + var value = settingsCollection[key]; + try { + if (JSON) { + value = JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret = {}; + serializedSettings = serializedSettings || {}; + for (var key in serializedSettings) { + var value = serializedSettings[key]; + try { + if (JSON) { + value = JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if (!_loadedScriptEntry) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + var onLoadTimeOut = function OSF_OUtil_loadScript$onLoadTimeOut() { + if (window.navigator.userAgent.indexOf("Trident") > 0) { + onLoadError(null); + } + else { + onLoadError(new Event("Script load timed out")); + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError(errorEvent) { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(errorEvent); + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadTimeOut, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) { + if (url) { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link); + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { + var parsed = enumObject[str.trim()]; + if (typeof (parsed) == 'undefined') { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed; + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { + var obj = { calc: arguments[0] }; + return function () { + if (obj.calc) { + obj.val = obj.calc.apply(this, arguments); + delete obj.calc; + } + return obj.val; + }; + }, + getUniqueId: function OSF_OUtil$getUniqueId() { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString(); + }, + formatString: function OSF_OUtil$formatString() { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10) + 1; + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }, + generateConversationId: function OSF_OUtil$generateConversationId() { + return [_random(), _random(), (new Date()).getTime().toString()].join('_'); + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId(); + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { + return OSF.OUtil.addInfoAsHash(url, _xdmInfoKey, xdmInfoValue, false); + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) { + return OSF.OUtil.addInfoAsHash(url, _serializerVersionKey, serializerVersion, true); + }, + addFlightsAsHash: function OSF_OUtil$addFlightsAsHash(url, flights) { + return OSF.OUtil.addInfoAsHash(url, _flightsKey, flights, true); + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) { + url = url.trim() || ''; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if (encodeInfo) { + newFragment = [keyName, encodeURIComponent(infoValue), fragment].join(''); + } + else { + newFragment = [fragment, keyName, infoValue].join(''); + } + return [urlWithoutFragment, _fragmentSeparator, newFragment].join(''); + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.HostInfo); + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.XdmInfo); + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.SerializerVersion)); + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseFlights: function OSF_OUtil$parseFlights(skipSessionStorage) { + var flights = OSF.OUtil.parseFlightsWithGivenFragment(skipSessionStorage, window.location.hash); + if (flights.length == 0) { + flights = OSF.OUtil.parseFlightsFromWindowName(skipSessionStorage, window.name); + } + return flights; + }, + checkFlight: function OSF_OUtil$checkFlightEnabled(flight) { + return OSF.Flights && OSF.Flights.indexOf(flight) >= 0; + }, + pushFlight: function OSF_OUtil$pushFlight(flight) { + if (OSF.Flights.indexOf(flight) < 0) { + OSF.Flights.push(flight); + return true; + } + return false; + }, + getBooleanSetting: function OSF_OUtil$getSetting(settingName) { + return OSF.OUtil.getBooleanFromDictionary(OSF.Settings, settingName); + }, + getBooleanFromDictionary: function OSF_OUtil$getBooleanFromDictionary(settings, settingName) { + var result = (settings && settingName && settings[settingName] !== undefined && settings[settingName] && + ((typeof (settings[settingName]) === "string" && settings[settingName].toUpperCase() === 'TRUE') || + (typeof (settings[settingName]) === "boolean" && settings[settingName]))); + return result !== undefined ? result : false; + }, + getIntFromDictionary: function OSF_OUtil$getIntFromDictionary(settings, settingName) { + if (settings && settingName && settings[settingName] !== undefined && (typeof settings[settingName] === "string")) { + return parseInt(settings[settingName]); + } + else { + return NaN; + } + }, + pushIntFlight: function OSF_OUtil$pushIntFlight(flight, flightValue) { + if (!(flight in OSF.IntFlights)) { + OSF.IntFlights[flight] = flightValue; + return true; + } + return false; + }, + getIntFlight: function OSF_OUtil$getIntFlight(flight) { + if (OSF.IntFlights && (flight in OSF.IntFlights)) { + return OSF.IntFlights[flight]; + } + else { + return NaN; + } + }, + parseFlightsFromWindowName: function OSF_OUtil$parseFlightsFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.Flights)); + }, + parseFlightsWithGivenFragment: function OSF_OUtil$parseFlightsWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(_flightsKey, _flightsKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseArrayWithDefault: function OSF_OUtil$parseArrayWithDefault(jsonString) { + var array = []; + try { + array = JSON.parse(jsonString); + } + catch (ex) { } + if (!Array.isArray(array)) { + array = []; + } + return array; + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj != null) { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue != null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >= 0) { + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue = decodeURIComponent(infoValue); + } + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd = window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd == -1) { + sessionKeyEnd = window.name.length; + } + var sessionKey = window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString = window.location.search; + var conversationId = null; + if (searchString) { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1) === '=') { + conversationId = conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId = decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) { + var items = strInfo.split("$"); + if (typeof items[1] == "undefined") { + items = strInfo.split("|"); + } + if (typeof items[1] == "undefined") { + items = strInfo.split("%7C"); + } + return items; + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue = ''; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if (items != undefined && items.length >= 3) { + switch (xdmFieldName) { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break; + } + } + } + return fieldValue; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e = Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) + throw e; + for (var p in expectedProperties) { + e = Function._validateParameter(params[p], expectedProperties[p], p); + if (e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) { + if (typeof (OsfMsAjaxFactory) !== 'undefined' && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) { + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor = descriptor || {}; + for (var nd in attributes) { + var attribute = attributes[nd]; + if (descriptor[attribute] == undefined) { + descriptor[attribute] = true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors = descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for (var i = 0; i < propsLength; i++) { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable = descriptor.writable || false; + } + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret = []; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key == item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value == list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add = list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key] = value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2] = newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj) === "[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj) === "[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj) === "[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.attachEvent) { + element.attachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.detachEvent) { + element.detachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = null; + } + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) { + var xmlhttp; + try { + xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function () { + if (xmlhttp.readyState == 4) { + if (xmlhttp.status == 200) { + onSuccess(xmlhttp.responseText); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + if (!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, c2, c3, a, b, c; + var i; + var length = input.length; + do { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + if (!isNaN(c2)) { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + } + if (isNaN(c2)) { + temp[i - 1] = 64; + } + else if (isNaN(c3)) { + temp[i - 2] = 64; + temp[i - 1] = 64; + } + for (var t = 0; t < i; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getSessionStorage: function OSF_Outil$getSessionStorage() { + return _getSessionStorage(); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage = window.localStorage; + } + catch (ex) { + localStorage = null; + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage); + } + return _safeLocalStorage; + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) { + var hex = "#" + (Number(val) + 0x1000000).toString(16).slice(-6); + return hex; + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) { + element.onclick = function (e) { + handler(); + }; + element.ontouchend = function (e) { + handler(); + e.preventDefault(); + }; + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) { + var e = Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: false }, + { name: "paramName", type: String, mayBeNull: false } + ]); + if (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return ""; + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)", "i"); + if (!queryExp.test(queryString)) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return ""; + } + return queryExp.exec(queryString)[1]; + }, + getHostnamePortionForLogging: function OSF_Outil$getHostnamePortionForLogging(hostname) { + var e = Function._validateParams(arguments, [{ name: "hostname", type: String, mayBeNull: false } + ]); + if (e) { + return ""; + } + var hostnameSubstrings = hostname.split('.'); + var len = hostnameSubstrings.length; + if (len >= 2) { + return hostnameSubstrings[len - 2] + "." + hostnameSubstrings[len - 1]; + } + else if (len == 1) { + return hostnameSubstrings[0]; + } + }, + isiOS: function OSF_Outil$isiOS() { + return (window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false); + }, + isChrome: function OSF_Outil$isChrome() { + return (window.navigator.userAgent.indexOf("Chrome") > 0) && !OSF.OUtil.isEdge(); + }, + isEdge: function OSF_Outil$isEdge() { + return window.navigator.userAgent.indexOf("Edge") > 0; + }, + isIE: function OSF_Outil$isIE() { + return window.navigator.userAgent.indexOf("Trident") > 0; + }, + isFirefox: function OSF_Outil$isFirefox() { + return window.navigator.userAgent.indexOf("Firefox") > 0; + }, + startsWith: function OSF_Outil$startsWith(originalString, patternToCheck, browserIsIE) { + if (browserIsIE) { + return originalString.substr(0, patternToCheck.length) === patternToCheck; + } + else { + return originalString.startsWith(patternToCheck); + } + }, + containsPort: function OSF_Outil$containsPort(url, protocol, hostname, portNumber) { + return this.startsWith(url, protocol + "//" + hostname + ":" + portNumber, true) || this.startsWith(url, hostname + ":" + portNumber, true); + }, + getRedundandPortString: function OSF_Outil$getRedundandPortString(url, parser) { + if (!url || !parser) + return ""; + if (parser.protocol == "https:" && this.containsPort(url, "https:", parser.hostname, "443")) + return ":443"; + else if (parser.protocol == "http:" && this.containsPort(url, "http:", parser.hostname, "80")) + return ":80"; + return ""; + }, + removeChar: function OSF_Outil$removeChar(url, indexOfCharToRemove) { + if (indexOfCharToRemove < url.length - 1) + return url.substring(0, indexOfCharToRemove) + url.substring(indexOfCharToRemove + 1); + else if (indexOfCharToRemove == url.length - 1) + return url.substring(0, url.length - 1); + else + return url; + }, + cleanUrlOfChar: function OSF_Outil$cleanUrlOfChar(url, charToClean) { + var i; + for (i = 0; i < url.length; i++) { + if (url.charAt(i) === charToClean) { + if (i + 1 >= url.length) { + return this.removeChar(url, i); + } + else if (charToClean === '/') { + if (url.charAt(i + 1) === '?' || url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + else if (charToClean === '?') { + if (url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + } + } + return url; + }, + cleanUrl: function OSF_Outil$cleanUrl(url) { + url = this.cleanUrlOfChar(url, '/'); + url = this.cleanUrlOfChar(url, '?'); + url = this.cleanUrlOfChar(url, '#'); + if (url.substr(0, 8) == "https://") { + var portIndex = url.indexOf(":443"); + if (portIndex != -1) { + if (portIndex == url.length - 4 || url.charAt(portIndex + 4) == "/" || url.charAt(portIndex + 4) == "?" || url.charAt(portIndex + 4) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 4); + } + } + } + else if (url.substr(0, 7) == "http://") { + var portIndex = url.indexOf(":80"); + if (portIndex != -1) { + if (portIndex == url.length - 3 || url.charAt(portIndex + 3) == "/" || url.charAt(portIndex + 3) == "?" || url.charAt(portIndex + 3) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 3); + } + } + } + return url; + }, + parseUrl: function OSF_Outil$parseUrl(url, enforceHttps) { + if (enforceHttps === void 0) { + enforceHttps = false; + } + if (typeof url === "undefined" || !url) { + return undefined; + } + var notHttpsErrorMessage = "NotHttps"; + var invalidUrlErrorMessage = "InvalidUrl"; + var isIEBoolean = this.isIE(); + var parsedUrlObj = { + protocol: undefined, + hostname: undefined, + host: undefined, + port: undefined, + pathname: undefined, + search: undefined, + hash: undefined, + isPortPartOfUrl: undefined + }; + try { + if (isIEBoolean) { + var parser = document.createElement("a"); + parser.href = url; + if (!parser || !parser.protocol || !parser.host || !parser.hostname || !parser.href + || this.cleanUrl(parser.href).toLowerCase() !== this.cleanUrl(url).toLowerCase()) { + throw invalidUrlErrorMessage; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && parser.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + var redundandPortString = this.getRedundandPortString(url, parser); + parsedUrlObj.protocol = parser.protocol; + parsedUrlObj.hostname = parser.hostname; + parsedUrlObj.port = (redundandPortString == "") ? parser.port : ""; + parsedUrlObj.host = (redundandPortString != "") ? parser.hostname : parser.host; + parsedUrlObj.pathname = (isIEBoolean ? "/" : "") + parser.pathname; + parsedUrlObj.search = parser.search; + parsedUrlObj.hash = parser.hash; + parsedUrlObj.isPortPartOfUrl = this.containsPort(url, parser.protocol, parser.hostname, parser.port); + } + else { + var urlObj = new URL(url); + if (urlObj && urlObj.protocol && urlObj.host && urlObj.hostname) { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && urlObj.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + parsedUrlObj.protocol = urlObj.protocol; + parsedUrlObj.hostname = urlObj.hostname; + parsedUrlObj.port = urlObj.port; + parsedUrlObj.host = urlObj.host; + parsedUrlObj.pathname = urlObj.pathname; + parsedUrlObj.search = urlObj.search; + parsedUrlObj.hash = urlObj.hash; + parsedUrlObj.isPortPartOfUrl = urlObj.host.lastIndexOf(":" + urlObj.port) == (urlObj.host.length - urlObj.port.length - 1); + } + } + } + catch (err) { + if (err.message === notHttpsErrorMessage) + throw err; + } + return parsedUrlObj; + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) { + if (sourceObj == null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr = []; + for (var i = 0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj = sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property] = sourceObj[property]; + } + } + return copyObj; + } + }, + createObject: function OSF_Outil$createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + }, + addClass: function OSF_OUtil$addClass(elmt, val) { + if (!OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + if (className) { + elmt.setAttribute(_classN, className + " " + val); + } + else { + elmt.setAttribute(_classN, val); + } + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) { + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findNextPos = function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && backward) { + return -1; + } + else if (currPos === allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if (all.length === 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, backward); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findCurrPos = function (all, curr) { + var i = 0; + for (; i < all.length; i++) { + if (all[i] === curr) { + return i; + } + } + return -1; + }; + var findNextPos = function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && shift) { + return -1; + } + else if (currPos === allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all, curr); + next = findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, shift); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + isNullOrUndefined: function OSF_OUtil$isNullOrUndefined(value) { + if (typeof (value) === "undefined") { + return true; + } + if (value === null) { + return true; + } + return false; + }, + stringEndsWith: function OSF_OUtil$stringEndsWith(value, subString) { + if (!OSF.OUtil.isNullOrUndefined(value) && !OSF.OUtil.isNullOrUndefined(subString)) { + if (subString.length > value.length) { + return false; + } + if (value.substr(value.length - subString.length) === subString) { + return true; + } + } + return false; + }, + hashCode: function OSF_OUtil$hashCode(str) { + var hash = 0; + if (!OSF.OUtil.isNullOrUndefined(str)) { + var i = 0; + var len = str.length; + while (i < len) { + hash = (hash << 5) - hash + str.charCodeAt(i++) | 0; + } + } + return hash; + }, + getValue: function OSF_OUtil$getValue(value, defaultValue) { + if (OSF.OUtil.isNullOrUndefined(value)) { + return defaultValue; + } + return value; + }, + externalNativeFunctionExists: function OSF_OUtil$externalNativeFunctionExists(type) { + return type === 'unknown' || type !== 'undefined'; + } + }; +})(); +OSF.OUtil.Guid = (function () { + var hexCode = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result = ""; + var tick = (new Date()).getTime(); + var index = 0; + for (; index < 32 && tick > 0; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + }; +})(); +try { + (function () { + OSF.Flights = OSF.OUtil.parseFlights(true); + })(); +} +catch (ex) { } +window.OSF = OSF; +OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614, + Visio: 8388615, + OneNoteAndroid: 4194305 +}; +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +}; +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +}; +OSF.AgaveHostAction = { + "Select": 0, + "UnSelect": 1, + "CancelDialog": 2, + "InsertAgave": 3, + "CtrlF6In": 4, + "CtrlF6Exit": 5, + "CtrlF6ExitShift": 6, + "SelectWithError": 7, + "NotifyHostError": 8, + "RefreshAddinCommands": 9, + "PageIsReady": 10, + "TabIn": 11, + "TabInShift": 12, + "TabExit": 13, + "TabExitShift": 14, + "EscExit": 15, + "F2Exit": 16, + "ExitNoFocusable": 17, + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20, + "UpdateTargetUrl": 21, + "InstallCustomFunctions": 22, + "SendTelemetryEvent": 23, + "UninstallCustomFunctions": 24, + "SendMessage": 25, + "LaunchExtensionComponent": 26, + "StopExtensionComponent": 27, + "RestartExtensionComponent": 28, + "EnableTaskPaneHeaderButton": 29, + "DisableTaskPaneHeaderButton": 30, + "TaskPaneHeaderButtonClicked": 31, + "RemoveAppCommandsAddin": 32, + "RefreshRibbonGallery": 33, + "GetOriginalControlId": 34, + "OfficeJsReady": 35, + "InsertDevManifest": 36, + "InsertDevManifestError": 37, + "SendCustomerContent": 38, + "KeyboardShortcuts": 39 +}; +OSF.SharedConstants = { + "NotificationConversationIdSuffix": '_ntf' +}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix, featureGates, officeTheme, initialDisplayMode) { + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this._featureGates = featureGates; + this._officeTheme = officeTheme; + this._initialDisplayMode = initialDisplayMode; + this.get_id = function get_id() { return this._id; }; + this.get_appName = function get_appName() { return this._appName; }; + this.get_appVersion = function get_appVersion() { return this._appVersion; }; + this.get_appUILocale = function get_appUILocale() { return this._appUILocale; }; + this.get_dataLocale = function get_dataLocale() { return this._dataLocale; }; + this.get_docUrl = function get_docUrl() { return this._docUrl; }; + this.get_clientMode = function get_clientMode() { return this._clientMode; }; + this.get_bindings = function get_bindings() { return this._bindings; }; + this.get_settings = function get_settings() { return this._settings; }; + this.get_reason = function get_reason() { return this._reason; }; + this.get_osfControlType = function get_osfControlType() { return this._osfControlType; }; + this.get_eToken = function get_eToken() { return this._eToken; }; + this.get_correlationId = function get_correlationId() { return this._correlationId; }; + this.get_appInstanceId = function get_appInstanceId() { return this._appInstanceId; }; + this.get_touchEnabled = function get_touchEnabled() { return this._touchEnabled; }; + this.get_commerceAllowed = function get_commerceAllowed() { return this._commerceAllowed; }; + this.get_appMinorVersion = function get_appMinorVersion() { return this._appMinorVersion; }; + this.get_requirementMatrix = function get_requirementMatrix() { return this._requirementMatrix; }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() { return this._dialogRequirementMatrix; }; + this.get_hostCustomMessage = function get_hostCustomMessage() { return this._hostCustomMessage; }; + this.get_hostFullVersion = function get_hostFullVersion() { return this._hostFullVersion; }; + this.get_isDialog = function get_isDialog() { return this._isDialog; }; + this.get_clientWindowHeight = function get_clientWindowHeight() { return this._clientWindowHeight; }; + this.get_clientWindowWidth = function get_clientWindowWidth() { return this._clientWindowWidth; }; + this.get_addinName = function get_addinName() { return this._addinName; }; + this.get_appDomains = function get_appDomains() { return this._appDomains; }; + this.get_featureGates = function get_featureGates() { return this._featureGates; }; + this.get_officeTheme = function get_officeTheme() { return this._officeTheme; }; + this.get_initialDisplayMode = function get_initialDisplayMode() { return this._initialDisplayMode ? this._initialDisplayMode : 0; }; +}; +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 +}; +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 +}; +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Client", Microsoft.Office); +OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened", + ControlActivation: "controlActivation" +}; +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType = { + All: "all" +}; +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + JsonData: "jsonData", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + AllowConsentPrompt: "allowConsentPrompt", + ForMSGraphAccess: "forMSGraphAccess", + AllowSignInPrompt: "allowSignInPrompt", + JsonPayload: "jsonPayload", + EnableNewHosts: "enableNewHosts", + AccountTypeFilter: "accountTypeFilter", + AddinTrustId: "addinTrustId", + Reserved: "reserved", + Tcid: "tcid", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + PromptBeforeOpen: "promptBeforeOpen", + EnforceAppDomain: "enforceAppDomain", + UrlNoHostInfo: "urlNoHostInfo", + TargetOrigin: "targetOrigin", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64", + FormId: "formId" +}; +OSF.OUtil.setNamespace("DDA", OSF); +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 +}; +OSF.DDA.PropertyDescriptors = { + AsyncResultStatus: "AsyncResultStatus" +}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { + if (eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || + eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) { + return id + "_" + eventType; + } + else { + return eventType; + } +}; +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidGetAuthContextMethod: 99, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, + dispidInsertFormMethod: 106, + dispidDisplayRibbonCalloutAsyncMethod: 109, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidExecuteFeature: 146, + dispidQueryFeature: 147, + dispidGetNestedAppAuthContextMethod: 205, + dispidMethodMax: 205 +}; +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidOlkRecurrenceChangedEvent: 49, + dispidOlkAttachmentsChangedEvent: 50, + dispidOlkEnhancedLocationsChangedEvent: 51, + dispidOlkInfobarClickedEvent: 52, + dispidOlkSelectedItemsChangedEvent: 53, + dispidOlkSensitivityLabelChangedEvent: 54, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 +}; +OSF.DDA.ErrorCodeManager = (function () { + var _errorMappings = {}; + return { + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) { + var errorArgs = _errorMappings[errorCode]; + if (!errorArgs) { + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + } + else { + if (!errorArgs.name) { + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + } + if (!errorArgs.message) { + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message; + } + } + return errorArgs; + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) { + _errorMappings[errorCode] = errorNameMessage; + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1000, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2000, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3000, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4000, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5000, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeOperationCancelled: 5014, + ooeWorkbookHidden: 5015, + ooeWriteNotSupportedWhenModalDialogOpen: 5016, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeRequestPayloadSizeLimitExceeded: 5103, + ooeResponsePayloadSizeLimitExceeded: 5104, + ooeCustomXmlNodeNotFound: 6000, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7000, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8000, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11000, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12000, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeModalDialogOpen: 12012, + ooeDocumentIsInactive: 12013, + ooeDialogParentIsMinimized: 12014, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010, + ooeResourceNotAllowed: 13011, + ooeSSOUnsupportedPlatform: 13012, + ooeSSOCallThrottled: 13013, + ooeAccessDenied: 13990, + ooeGeneralException: 13991 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidReadForBlankRow }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnMatrixData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { name: stringNS.L_InvalidBinding, message: stringNS.L_InvalidColumnsForBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { name: stringNS.L_SaveSettingsError, message: stringNS.L_SettingsCannotSave }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { name: stringNS.L_SettingsStaleError, message: stringNS.L_SettingsAreStale }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { name: stringNS.L_HostError, message: stringNS.L_OperationNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { name: stringNS.L_InternalError, message: stringNS.L_InternalErrorDescription }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { name: stringNS.L_PermissionDenied, message: stringNS.L_DocumentReadOnly }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { name: stringNS.L_EventRegistrationError, message: stringNS.L_EventHandlerNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { name: stringNS.L_InvalidAPICall, message: stringNS.L_InvalidApiCallInContext }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { name: stringNS.L_ShuttingDown, message: stringNS.L_ShuttingDown }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { name: stringNS.L_UnsupportedEnumeration, message: stringNS.L_UnsupportedEnumerationMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden] = { name: stringNS.L_APICallFailed, message: stringNS.L_WorkbookHiddenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen] = { name: stringNS.L_APICallFailed, message: stringNS.L_WriteNotSupportedWhenModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestPayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_ResponsePayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { name: stringNS.L_CustomXmlOutOfDateName, message: stringNS.L_CustomXmlOutOfDateMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { name: stringNS.L_CannotNavigateTo, message: stringNS.L_CannotNavigateTo }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { name: stringNS.L_SpecifiedIdNotExist, message: stringNS.L_SpecifiedIdNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { name: stringNS.L_NavOutOfBound, message: stringNS.L_NavOutOfBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { name: stringNS.L_DataWriteReminder, message: stringNS.L_CellDataAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { name: stringNS.L_MissingParameter, message: stringNS.L_ElementMissing }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidCellsValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidTableOptionValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidFormatValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_RowIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_ColIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_FormatValueOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { name: stringNS.L_FormattingReminder, message: stringNS.L_CellFormatAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { name: stringNS.L_MemoryLimit, message: stringNS.L_CloseFileBeforeRetrieve }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { name: stringNS.L_NetworkProblem, message: stringNS.L_NetworkProblemRetrieveFile }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { name: stringNS.L_InvalidValue, message: stringNS.L_SliceSizeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAlreadyOpened }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NetworkProblem }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { name: stringNS.L_DialogNavigateError, message: stringNS.L_DialogInvalidScheme }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAddressNotTrusted }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_ModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DocumentIsInactive }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogParentIsMinimized }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform] = { name: stringNS.L_APINotSupported, message: stringNS.L_SSOUnsupportedPlatform }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled] = { name: stringNS.L_OperationCancelledError, message: stringNS.L_OperationCancelledErrorMessage }; + } + }; +})(); +(function (OfficeExt) { + var Requirement; + (function (Requirement) { + var RequirementVersion = (function () { + function RequirementVersion() { + } + return RequirementVersion; + }()); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = (function () { + function RequirementMatrix(_setMap) { + this.isSetSupported = function _isSetSupported(name, minVersion) { + if (name == undefined) { + return false; + } + if (minVersion == undefined) { + minVersion = 0; + } + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if (sets.hasOwnProperty(name.toLowerCase())) { + var setMaxVersion = sets[name.toLowerCase()]; + try { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.major > 0 && + setMaxVersionNum.minor >= 0 && + setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor >= minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion = function (version) { + version = version + ""; + var temp = version.split("."); + var major = 0; + var minor = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } + } + var result = { "minor": minor, "major": major }; + return result; + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this); + } + return RequirementMatrix; + }()); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = (function () { + function DefaultSetRequirement(setMap) { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) { + for (var name in addedSet) { + this._sets[name] = addedSet[name]; + } + }; + this._sets = setMap; + } + return DefaultSetRequirement; + }()); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultRequiredDialogSetRequirement = (function (_super) { + __extends(DefaultRequiredDialogSetRequirement, _super); + function DefaultRequiredDialogSetRequirement() { + return _super.call(this, { + "dialogapi": 1.1 + }) || this; + } + return DefaultRequiredDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultRequiredDialogSetRequirement = DefaultRequiredDialogSetRequirement; + var DefaultOptionalDialogSetRequirement = (function (_super) { + __extends(DefaultOptionalDialogSetRequirement, _super); + function DefaultOptionalDialogSetRequirement() { + return _super.call(this, { + "dialogorigin": 1.1 + }) || this; + } + return DefaultOptionalDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultOptionalDialogSetRequirement = DefaultOptionalDialogSetRequirement; + var ExcelClientDefaultSetRequirement = (function (_super) { + __extends(ExcelClientDefaultSetRequirement, _super); + function ExcelClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "excelapi": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = (function (_super) { + __extends(ExcelClientV1DefaultSetRequirement, _super); + function ExcelClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return ExcelClientV1DefaultSetRequirement; + }(ExcelClientDefaultSetRequirement)); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = (function (_super) { + __extends(OutlookClientDefaultSetRequirement, _super); + function OutlookClientDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = (function (_super) { + __extends(WordClientDefaultSetRequirement, _super); + function WordClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1, + "wordapi": 1.1 + }) || this; + } + return WordClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = (function (_super) { + __extends(WordClientV1DefaultSetRequirement, _super); + function WordClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2, + "imagecoercion": 1.1 + }); + return _this; + } + return WordClientV1DefaultSetRequirement; + }(WordClientDefaultSetRequirement)); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = (function (_super) { + __extends(PowerpointClientDefaultSetRequirement, _super); + function PowerpointClientDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = (function (_super) { + __extends(PowerpointClientV1DefaultSetRequirement, _super); + function PowerpointClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return PowerpointClientV1DefaultSetRequirement; + }(PowerpointClientDefaultSetRequirement)); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = (function (_super) { + __extends(ProjectClientDefaultSetRequirement, _super); + function ProjectClientDefaultSetRequirement() { + return _super.call(this, { + "selection": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ProjectClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = (function (_super) { + __extends(ExcelWebDefaultSetRequirement, _super); + function ExcelWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "file": 1.1 + }) || this; + } + return ExcelWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = (function (_super) { + __extends(WordWebDefaultSetRequirement, _super); + function WordWebDefaultSetRequirement() { + return _super.call(this, { + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "imagecoercion": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablecoercion": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = (function (_super) { + __extends(PowerpointWebDefaultSetRequirement, _super); + function PowerpointWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "settings": 1.1 + }) || this; + } + return PowerpointWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = (function (_super) { + __extends(OutlookWebDefaultSetRequirement, _super); + function OutlookWebDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = (function (_super) { + __extends(SwayWebDefaultSetRequirement, _super); + function SwayWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "documentevents": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return SwayWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = (function (_super) { + __extends(AccessWebDefaultSetRequirement, _super); + function AccessWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "partialtablebindings": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1 + }) || this; + } + return AccessWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = (function (_super) { + __extends(ExcelIOSDefaultSetRequirement, _super); + function ExcelIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = (function (_super) { + __extends(WordIOSDefaultSetRequirement, _super); + function WordIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = (function (_super) { + __extends(WordIOSV1DefaultSetRequirement, _super); + function WordIOSV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2 + }); + return _this; + } + return WordIOSV1DefaultSetRequirement; + }(WordIOSDefaultSetRequirement)); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = (function (_super) { + __extends(PowerpointIOSDefaultSetRequirement, _super); + function PowerpointIOSDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = (function (_super) { + __extends(OutlookIOSDefaultSetRequirement, _super); + function OutlookIOSDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.1 + }) || this; + } + return OutlookIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = (function () { + function RequirementsMatrixFactory() { + } + RequirementsMatrixFactory.initializeOsfDda = function () { + OSF.OUtil.setNamespace("Requirement", OSF.DDA); + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function (appContext) { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if (RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) { + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + } + else { + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})); + } + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function (appContext) { + var setRequirements = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + setRequirements = new DefaultSetRequirement(matrixItem); + } + else { + setRequirements = new DefaultRequiredDialogSetRequirement(); + var mainRequirement = appContext.get_requirementMatrix(); + if (mainRequirement != undefined && mainRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(mainRequirement.toLowerCase()); + for (var name in setRequirements._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + var dialogOptionalSetRequirement = new DefaultOptionalDialogSetRequirement(); + for (var name in dialogOptionalSetRequirement._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + } + } + return new RequirementMatrix(setRequirements); + }; + RequirementsMatrixFactory.getClientFullVersionString = function (appContext) { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || + appName == 4096 || + appName == 8192 || + appName == 65536; + if (isIOSClient && appContext.get_appVersion() == 1) { + if (appName == 4096 && appMinorVersion >= 15) { + appFullVersion = "16.00.01"; + } + else { + appFullVersion = "16.00"; + } + } + else if (appContext.get_appName() == 64) { + appFullVersion = appContext.get_appVersion(); + } + else { + if (appMinorVersion < 10) { + appMinorVersionString = "0" + appMinorVersion; + } + else { + appMinorVersionString = "" + appMinorVersion; + } + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString; + } + return appContext.get_appName() + "-" + appFullVersion; + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function () { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement(); + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory; + }()); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory; + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})); +})(OfficeExt || (OfficeExt = {})); +OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" +}; +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" +}; +OSF.NamespaceManager = (function OSF_NamespaceManager() { + var _userOffice; + var _useShortcut = false; + return { + enableShortcut: function OSF_NamespaceManager$enableShortcut() { + if (!_useShortcut) { + if (window.Office) { + _userOffice = window.Office; + } + else { + OSF.OUtil.setNamespace("Office", window); + } + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true; + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() { + if (_useShortcut) { + if (_userOffice) { + window.Office = _userOffice; + } + else { + OSF.OUtil.unsetNamespace("Office", window); + } + _useShortcut = false; + } + } + }; +})(); +OSF.NamespaceManager.enableShortcut(); +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { + if (useShortcut) { + OSF.NamespaceManager.enableShortcut(); + } + else { + OSF.NamespaceManager.disableShortcut(); + } +}; +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { + var promise; + if (str && typeof str == "string") { + var index = str.indexOf("#"); + if (index != -1) { + var op = str.substring(0, index); + var target = str.substring(index + 1); + switch (op) { + case "binding": + case "bindings": + if (target) { + promise = new OSF.DDA.BindingPromise(target); + } + break; + } + } + } + if (!promise) { + if (errorCallback) { + var callbackType = typeof errorCallback; + if (callbackType == "function") { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext, OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)); + } + else { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, callbackType); + } + } + } + else { + promise.onFail = errorCallback; + return promise; + } +}; +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { + OSF.OUtil.defineEnumerableProperties(this, { + "contentLanguage": { + value: officeAppContext.get_dataLocale() + }, + "displayLanguage": { + value: officeAppContext.get_appUILocale() + }, + "touchEnabled": { + value: officeAppContext.get_touchEnabled() + }, + "commerceAllowed": { + value: officeAppContext.get_commerceAllowed() + }, + "host": { + value: OfficeExt.HostName.Host.getInstance().getHost() + }, + "platform": { + value: OfficeExt.HostName.Host.getInstance().getPlatform() + }, + "isDialog": { + value: OSF._OfficeAppFactory.getHostInfo().isDialog + }, + "diagnostics": { + value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion()) + } + }); + if (license) { + OSF.OUtil.defineEnumerableProperty(this, "license", { + value: license + }); + } + if (officeAppContext.ui) { + OSF.OUtil.defineEnumerableProperty(this, "ui", { + value: officeAppContext.ui + }); + } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.webAuth) { + OSF.OUtil.defineEnumerableProperty(this, "webAuth", { + value: officeAppContext.webAuth + }); + } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } + if (officeAppContext.extensionLifeCycle) { + OSF.OUtil.defineEnumerableProperty(this, "extensionLifeCycle", { + value: officeAppContext.extensionLifeCycle + }); + } + if (officeAppContext.messaging) { + OSF.OUtil.defineEnumerableProperty(this, "messaging", { + value: officeAppContext.messaging + }); + } + if (officeAppContext.ui && officeAppContext.ui.taskPaneAction) { + OSF.OUtil.defineEnumerableProperty(this, "taskPaneAction", { + value: officeAppContext.ui.taskPaneAction + }); + } + if (officeAppContext.ui && officeAppContext.ui.ribbonGallery) { + OSF.OUtil.defineEnumerableProperty(this, "ribbonGallery", { + value: officeAppContext.ui.ribbonGallery + }); + } + if (officeAppContext.get_isDialog()) { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } + else { + if (document) { + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: document + }); + } + if (appOM) { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this, displayName, { + value: appOM + }); + } + if (officeAppContext.get_officeTheme()) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return officeAppContext.get_officeTheme(); + } + }); + } + else if (getOfficeTheme) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return getOfficeTheme(); + } + }); + } + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + if (officeAppContext.get_featureGates) { + var featureGates = officeAppContext.get_featureGates(); + if (featureGates && featureGates["EnablePublicThemeManager"]) { + var themeManager = new OSF.DDA.Theming.InternalThemeHandler(); + themeManager.InitializeThemeManager(); + OSF.OUtil.defineEnumerableProperty(this, "themeManager", { + value: themeManager + }); + } + } + } +}; +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { + OSF.DDA.OutlookContext.uber.constructor.call(this, appContext, null, license, appOM, getOfficeTheme); + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "roamingSettings", { + value: settings + }); + } + if (appContext.sensitivityLabelsCatalog) { + OSF.OUtil.defineEnumerableProperty(this, "sensitivityLabelsCatalog", { + value: appContext.sensitivityLabelsCatalog() + }); + } +}; +OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { + var mode; + switch (officeAppContext.get_clientMode()) { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break; + } + ; + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "settings", { + value: settings + }); + } + ; + OSF.OUtil.defineMutableProperties(this, { + "mode": { + value: mode + }, + "url": { + value: officeAppContext.get_docUrl() + } + }); +}; +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { + OSF.DDA.JsomDocument.uber.constructor.call(this, officeAppContext, settings); + if (bindingFacade) { + OSF.OUtil.defineEnumerableProperty(this, "bindings", { + get: function OSF_DDA_Document$GetBindings() { return bindingFacade; } + }); + } + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetSelectedDataAsync, + am.SetSelectedDataAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])); +}; +OSF.OUtil.extend(OSF.DDA.JsomDocument, OSF.DDA.Document); +OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension, "context", { + get: function Microsoft_Office_WebExtension$GetContext() { + var context; + if (OSF && OSF._OfficeAppFactory) { + context = OSF._OfficeAppFactory.getContext(); + } + return context; + } +}); +OSF.DDA.License = function OSF_DDA_License(eToken) { + OSF.OUtil.defineEnumerableProperty(this, "value", { + value: eToken + }); +}; +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function () { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, displayName); + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) { + for (var name in params) { + var param = params[name]; + var arg = args[name]; + if (param["enum"]) { + switch (typeof arg) { + case "string": + if (OSF.OUtil.listContainsValue(param["enum"], arg)) { + break; + } + case "undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + } + if (param["types"]) { + if (!OSF.OUtil.listContainsValue(param["types"], typeof arg)) { + throw getInvalidParameterString(); + } + } + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) { + if (userArgs.length < requiredCount) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + } + var requiredArgs = []; + var index; + for (index = 0; index < requiredCount; index++) { + requiredArgs.push(userArgs[index]); + } + this.verifyArguments(requiredParameters, requiredArgs); + var ret = {}; + for (index = 0; index < requiredCount; index++) { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if (param.verify) { + var isValid = param.verify(arg, caller, stateInfo); + if (!isValid) { + throw getInvalidParameterString(); + } + } + ret[param.name] = arg; + } + return ret; + }, + this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) { + options = options || {}; + for (var optionName in supportedOptions) { + if (!OSF.OUtil.listContainsKey(options, optionName)) { + var value = undefined; + var option = supportedOptions[optionName]; + if (option.calculate && requiredArgs) { + value = option.calculate(requiredArgs, caller, stateInfo); + } + if (!value && option.defaultValue !== undefined) { + value = option.defaultValue; + } + options[optionName] = value; + } + } + return options; + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) { + var callArgs = {}; + for (var r in required) { + callArgs[r] = required[r]; + } + for (var o in options) { + callArgs[o] = options[o]; + } + for (var s in privateStateCallbacks) { + callArgs[s] = privateStateCallbacks[s](caller, stateInfo); + } + if (checkCallArgs) { + callArgs = checkCallArgs(callArgs, caller, stateInfo); + } + return callArgs; + }; +}; +OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" +}; +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" +}; +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 +}; +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" +}; +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.AsyncMethodNames[entry] = am; + } +}; +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 2) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + case "function": + if (parameterCallback) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + } + else { + parameterCallback = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + if (parameterCallback) { + if (options[Microsoft.Office.WebExtension.Parameters.Callback]) { + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + } + else { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + } + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (onSucceeded) { + payload = onSucceeded(response, caller, callArgs); + } + else { + payload = response; + } + } + else { + if (onFailed) { + payload = onFailed(status, response); + } + else { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + } + return payload; + }; + this.getCallArgs = function (suppliedArgs) { + var options, parameterCallback; + for (var i = suppliedArgs.length - 1; i >= requiredCount; i--) { + var argument = suppliedArgs[i]; + switch (typeof argument) { + case "object": + options = argument; + break; + case "function": + parameterCallback = argument; + break; + } + } + options = options || {}; + if (parameterCallback) { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + return options; + }; +}; +OSF.DDA.AsyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [], supportedOptions, privateStateCallbacks, params.onSucceeded, params.onFailed, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function (callDefinition) { + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { + OSF.OUtil.defineEnumerableProperties(this, { + "name": { + value: name + }, + "message": { + value: message + }, + "code": { + value: code + } + }); +}; +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { + OSF.OUtil.defineEnumerableProperties(this, { + "value": { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value] + }, + "status": { + value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded + } + }); + if (initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) { + OSF.OUtil.defineEnumerableProperty(this, "asyncContext", { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context] + }); + } + if (errorArgs) { + OSF.OUtil.defineEnumerableProperty(this, "error", { + value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + }); + } +}; +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if (callback) { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + } + else { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs, errorArgs)); + } +}; +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.SyncMethodNames[entry] = am; + } +}; +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 1) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; +}; +OSF.DDA.SyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [], supportedOptions, params.privateStateCallbacks, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function (callDefinition) { + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.ListType = (function () { + var listTypes = {}; + return { + setListType: function OSF_DDA_ListType$AddListType(t, prop) { listTypes[t] = prop; }, + isListType: function OSF_DDA_ListType$IsListType(t) { return OSF.OUtil.listContainsKey(listTypes, t); }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) { return listTypes[t]; } + }; +})(); +OSF.DDA.HostParameterMap = function (specialProcessor, mappings) { + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function (data) { + if (data != null && data.rows !== undefined) { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData; + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.JsonData] = { + toHost: function (data) { return data; }, + fromHost: function (data) { return typeof data === "string" ? JSON.parse(data) : data; } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) { + var ret = preimageSet ? {} : undefined; + for (var entry in preimageSet) { + var preimage = preimageSet[entry]; + var image; + if (OSF.DDA.ListType.isListType(entry)) { + image = []; + for (var subEntry in preimage) { + image.push(mapValues(preimage[subEntry], mapping)); + } + } + else if (OSF.OUtil.listContainsKey(dynamicTypes, entry)) { + image = dynamicTypes[entry][mapping](preimage); + } + else if (mapping == fromHostMap && specialProcessor.preserveNesting(entry)) { + image = mapValues(preimage, mapping); + } + else { + var maps = mappings[entry]; + if (maps) { + var map = maps[mapping]; + if (map) { + image = map[preimage]; + if (image === undefined) { + image = preimage; + } + } + } + else { + image = preimage; + } + } + ret[entry] = image; + } + return ret; + } + ; + function generateArguments(imageSet, parameters) { + var ret; + for (var param in parameters) { + var arg; + if (specialProcessor.isComplexType(param)) { + arg = generateArguments(imageSet, mappings[param][toHostMap]); + } + else { + arg = imageSet[param]; + } + if (arg != undefined) { + if (!ret) { + ret = {}; + } + var index = parameters[param]; + if (index == self) { + index = param; + } + ret[index] = specialProcessor.pack(param, arg); + } + } + return ret; + } + ; + function extractArguments(source, parameters, extracted) { + if (!extracted) { + extracted = {}; + } + for (var param in parameters) { + var index = parameters[param]; + var value; + if (index == self) { + value = source; + } + else if (index == sourceData) { + extracted[param] = source.toArray(); + continue; + } + else { + value = source[index]; + } + if (value === null || value === undefined) { + extracted[param] = undefined; + } + else { + value = specialProcessor.unpack(param, value); + var map; + if (specialProcessor.isComplexType(param)) { + map = mappings[param][fromHostMap]; + if (specialProcessor.preserveNesting(param)) { + extracted[param] = extractArguments(value, map); + } + else { + extractArguments(value, map, extracted); + } + } + else { + if (OSF.DDA.ListType.isListType(param)) { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for (var item in value) { + extractedValues[item] = extractArguments(value[item], map); + } + extracted[param] = extractedValues; + } + else { + extracted[param] = value; + } + } + } + } + return extracted; + } + ; + function applyMap(mapName, preimage, mapping) { + var parameters = mappings[mapName][mapping]; + var image; + if (mapping == "toHost") { + var imageSet = mapValues(preimage, mapping); + image = generateArguments(imageSet, parameters); + } + else if (mapping == "fromHost") { + var argumentSet = extractArguments(preimage, parameters); + image = mapValues(argumentSet, mapping); + } + return image; + } + ; + if (!mappings) { + mappings = {}; + } + this.addMapping = function (mapName, description) { + var toHost, fromHost; + if (description.map) { + toHost = description.map; + fromHost = {}; + for (var preimage in toHost) { + var image = toHost[preimage]; + if (image == self) { + image = preimage; + } + fromHost[image] = preimage; + } + } + else { + toHost = description.toHost; + fromHost = description.fromHost; + } + var pair = mappings[mapName]; + if (pair) { + var currMap = pair[toHostMap]; + for (var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for (var fh in currMap) + fromHost[fh] = currMap[fh]; + } + else { + pair = mappings[mapName] = {}; + } + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost; + }; + this.toHost = function (mapName, preimage) { return applyMap(mapName, preimage, toHostMap); }; + this.fromHost = function (mapName, image) { return applyMap(mapName, image, fromHostMap); }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function (ct) { specialProcessor.addComplexType(ct); }; + this.getDynamicType = function (dt) { return specialProcessor.getDynamicType(dt); }; + this.setDynamicType = function (dt, handler) { specialProcessor.setDynamicType(dt, handler); }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function (preimageSet, mapping) { return mapValues(preimageSet, mapping); }; +}; +OSF.DDA.SpecialProcessor = function (complexTypes, dynamicTypes) { + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) { + complexTypes.push(ct); + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) { + return dynamicTypes[dt]; + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) { + dynamicTypes[dt] = handler; + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) { + return OSF.OUtil.listContainsValue(complexTypes, t); + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) { + return OSF.OUtil.listContainsKey(dynamicTypes, p); + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) { + var pn = []; + if (OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if (OSF.DDA.DataNodeEventProperties) { + pn = pn.concat([ + OSF.DDA.DataNodeEventProperties.OldNode, + OSF.DDA.DataNodeEventProperties.NewNode, + OSF.DDA.DataNodeEventProperties.NextSiblingNode + ]); + } + return OSF.OUtil.listContainsValue(pn, p); + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].toHost(arg); + } + else { + value = arg; + } + return value; + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.DDA.getDecoratedParameterMap = function (specialProcessor, initialDefs) { + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + } + parameterMap.define = function define(definition) { + var args = {}; + var toHost = createObject(definition.toHost); + if (definition.invertible) { + args.map = toHost; + } + else if (definition.canonical) { + args.toHost = args.fromHost = toHost; + } + else { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost); + } + parameterMap.addMapping(definition.type, args); + if (definition.isComplexType) + parameterMap.addComplexType(definition.type); + }; + for (var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap; +}; +OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + "GoToByIdAsync": did.dispidNavigateToMethod, + "GetSelectedDataAsync": did.dispidGetSelectedDataMethod, + "SetSelectedDataAsync": did.dispidSetSelectedDataMethod, + "GetDocumentCopyChunkAsync": did.dispidGetDocumentCopyChunkMethod, + "ReleaseDocumentCopyAsync": did.dispidReleaseDocumentCopyMethod, + "GetDocumentCopyAsync": did.dispidGetDocumentCopyMethod, + "AddFromSelectionAsync": did.dispidAddBindingFromSelectionMethod, + "AddFromPromptAsync": did.dispidAddBindingFromPromptMethod, + "AddFromNamedItemAsync": did.dispidAddBindingFromNamedItemMethod, + "GetAllAsync": did.dispidGetAllBindingsMethod, + "GetByIdAsync": did.dispidGetBindingMethod, + "ReleaseByIdAsync": did.dispidReleaseBindingMethod, + "GetDataAsync": did.dispidGetBindingDataMethod, + "SetDataAsync": did.dispidSetBindingDataMethod, + "AddRowsAsync": did.dispidAddRowsMethod, + "AddColumnsAsync": did.dispidAddColumnsMethod, + "DeleteAllDataValuesAsync": did.dispidClearAllRowsMethod, + "RefreshAsync": did.dispidLoadSettingsMethod, + "SaveAsync": did.dispidSaveSettingsMethod, + "GetActiveViewAsync": did.dispidGetActiveViewMethod, + "GetFilePropertiesAsync": did.dispidGetFilePropertiesMethod, + "GetOfficeThemeAsync": did.dispidGetOfficeThemeMethod, + "GetDocumentThemeAsync": did.dispidGetDocumentThemeMethod, + "ClearFormatsAsync": did.dispidClearFormatsMethod, + "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, + "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, + "GetAuthContextAsync": did.dispidGetAuthContextMethod, + "GetNestedAppAuthContextAsync": did.dispidGetNestedAppAuthContextMethod, + "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, + "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, + "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, + "InsertFormAsync": did.dispidInsertFormMethod, + "ExecuteFeature": did.dispidExecuteFeature, + "QueryFeature": did.dispidQueryFeature, + "AddDataPartAsync": did.dispidAddDataPartMethod, + "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, + "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, + "GetPartXmlAsync": did.dispidGetDataPartXmlMethod, + "GetPartNodesAsync": did.dispidGetDataPartNodesMethod, + "DeleteDataPartAsync": did.dispidDeleteDataPartMethod, + "GetNodeValueAsync": did.dispidGetDataNodeValueMethod, + "GetNodeXmlAsync": did.dispidGetDataNodeXmlMethod, + "GetRelativeNodesAsync": did.dispidGetDataNodesMethod, + "SetNodeValueAsync": did.dispidSetDataNodeValueMethod, + "SetNodeXmlAsync": did.dispidSetDataNodeXmlMethod, + "AddDataPartNamespaceAsync": did.dispidAddDataNamespaceMethod, + "GetDataPartNamespaceAsync": did.dispidGetDataUriByPrefixMethod, + "GetDataPartPrefixAsync": did.dispidGetDataPrefixByUriMethod, + "GetNodeTextAsync": did.dispidGetDataNodeTextMethod, + "SetNodeTextAsync": did.dispidSetDataNodeTextMethod, + "GetSelectedTask": did.dispidGetSelectedTaskMethod, + "GetTask": did.dispidGetTaskMethod, + "GetWSSUrl": did.dispidGetWSSUrlMethod, + "GetTaskField": did.dispidGetTaskFieldMethod, + "GetSelectedResource": did.dispidGetSelectedResourceMethod, + "GetResourceField": did.dispidGetResourceFieldMethod, + "GetProjectField": did.dispidGetProjectFieldMethod, + "GetSelectedView": did.dispidGetSelectedViewMethod, + "GetTaskByIndex": did.dispidGetTaskByIndexMethod, + "GetResourceByIndex": did.dispidGetResourceByIndexMethod, + "SetTaskField": did.dispidSetTaskFieldMethod, + "SetResourceField": did.dispidSetResourceFieldMethod, + "GetMaxTaskIndex": did.dispidGetMaxTaskIndexMethod, + "GetMaxResourceIndex": did.dispidGetMaxResourceIndexMethod, + "CreateTask": did.dispidCreateTaskMethod + }; + for (var method in methodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = methodMap[method]; + } + } + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var syncMethodMap = { + "MessageParent": did.dispidMessageParentMethod, + "SendMessage": did.dispidSendMessageMethod + }; + for (var method in syncMethodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = syncMethodMap[method]; + } + } + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + "SettingsChanged": did.dispidSettingsChangedEvent, + "DocumentSelectionChanged": did.dispidDocumentSelectionChangedEvent, + "BindingSelectionChanged": did.dispidBindingSelectionChangedEvent, + "BindingDataChanged": did.dispidBindingDataChangedEvent, + "ActiveViewChanged": did.dispidActiveViewChangedEvent, + "OfficeThemeChanged": did.dispidOfficeThemeChangedEvent, + "DocumentThemeChanged": did.dispidDocumentThemeChangedEvent, + "AppCommandInvoked": did.dispidAppCommandInvokedEvent, + "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, + "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, + "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, + "RecurrenceChanged": did.dispidOlkRecurrenceChangedEvent, + "AttachmentsChanged": did.dispidOlkAttachmentsChangedEvent, + "EnhancedLocationsChanged": did.dispidOlkEnhancedLocationsChangedEvent, + "InfobarClicked": did.dispidOlkInfobarClickedEvent, + "SelectedItemsChanged": did.dispidOlkSelectedItemsChangedEvent, + "SensitivityLabelChanged": did.dispidOlkSensitivityLabelChangedEvent, + "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, + "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, + "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, + "DataNodeInserted": did.dispidDataNodeAddedEvent, + "DataNodeReplaced": did.dispidDataNodeReplacedEvent, + "DataNodeDeleted": did.dispidDataNodeDeletedEvent + }; + for (var event in eventMap) { + if (jsom[event]) { + dispIdMap[jsom[event]] = eventMap[event]; + } + } + function IsObjectEvent(dispId) { + return (dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { + if (typeof ex == "number") { + if (!callArgs) { + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + } + OSF.DDA.issueAsyncResult(callArgs, ex, OSF.DDA.ErrorCodeManager.getErrorArgs(ex)); + } + else { + throw ex; + } + } + ; + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) { + var callArgs; + try { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) { + window.Excel._RedirectV1APIs = true; + } + if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if (richApiInExcelMethodSubstitution.preprocess) { + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + } + var ctx = new window.Excel.RequestContext(); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); + ctx.sync() + .then(function () { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if (richApiInExcelMethodSubstitution.postprocess) { + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); + } + if (status != 0) { + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, response); + })["catch"](function (error) { + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure, null); + }); + } + else { + var hostCallArgs; + if (parameterMap.toHost) { + hostCallArgs = parameterMap.toHost(dispId, callArgs); + } + else { + hostCallArgs = callArgs; + } + var startTime = (new Date()).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + "dispId": dispId, + "hostCallArgs": hostCallArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": function (status, hostResponseArgs) { + var responseArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (parameterMap.fromHost) { + responseArgs = parameterMap.fromHost(dispId, hostResponseArgs); + } + else { + responseArgs = hostResponseArgs; + } + } + else { + responseArgs = hostResponseArgs; + } + var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); + OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry && !(OSF.ConstantNames && OSF.ConstantNames.IsCustomFunctionsRuntime)) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } + } + }); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); + if (!added) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; + } + } + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if (isPopupWindow) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return; + } + var dispId_1 = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId_1); + var targetId_1 = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId_1) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId_1, + "targetId": targetId_1, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = null; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web" && dispId_1 == OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent) { + args = hostArgs; + } + else { + args = parameterMap.fromHost(dispId_1, hostArgs); + } + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId_1, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId_1, args)); + } + }); + } + else { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var status, removeSuccess; + if (handler === null) { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + else { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration + }); + } + else { + onEnsureRegistration(status); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller, isModal) { + var callArgs; + var targetId; + var asyncMethodCall = null; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) { + var payload; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + else { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status, onSucceedArgs, caller, callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + } + OSF.DDA.issueAsyncResult(callArgs, status, payload); + } + try { + if (dialogMessageEvent == undefined || dialogOtherEvent == undefined) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + } + if (!isModal) { + if (OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + } + else { + if (OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.id]; + } + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + callArgs["isModal"] = isModal; + targetId = JSON.stringify(callArgs); + if (!OSF.DialogShownStatus.hasDialogShown) { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + } + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = parameterMap.fromHost(dispId, hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent, caller, args); + if (event.type == dialogOtherEvent) { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]); + } + eventDispatch.fireOrQueueEvent(event); + if (args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false; + } + } + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) { + var callArgs; + var dialogMessageEvent, dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false; + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": closeCallback + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + if (closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed, OSF.DDA.AsyncMethodNames.CloseAsync.displayName, closeStatus); + } + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; +}; +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { + for (var entry in asyncMethodNames) { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if (!target[name]) { + OSF.OUtil.defineEnumerableProperty(target, name, { + value: (function (asyncMethod) { + return function () { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod, arguments, target, privateState); + }; + })(method) + }); + } + } +}; +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if (!target[add]) { + OSF.OUtil.defineEnumerableProperty(target, add, { + value: function () { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments, eventDispatch, target, isPopupWindow); + } + }); + } + if (!target[remove]) { + OSF.OUtil.defineEnumerableProperty(target, remove, { + value: function () { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments, eventDispatch, target); + } + }); + } +}; +(function (OfficeExt) { + var loadMsAjax = false; + var MsAjaxTypeHelper = (function () { + function MsAjaxTypeHelper() { + } + MsAjaxTypeHelper.isInstanceOfType = function (type, instance) { + if (typeof (instance) === "undefined" || instance === null) + return false; + if (instance instanceof type) + return true; + var instanceType = instance.constructor; + if (!instanceType || (typeof (instanceType) !== "function") || !instanceType.__typeName || instanceType.__typeName === 'Object') { + instanceType = Object; + } + return !!(instanceType === type) || + (instanceType.__typeName && type.__typeName && instanceType.__typeName === type.__typeName); + }; + return MsAjaxTypeHelper; + }()); + OfficeExt.MsAjaxTypeHelper = MsAjaxTypeHelper; + var MsAjaxError = (function () { + function MsAjaxError() { + } + MsAjaxError.create = function (message, errorInfo) { + var err = new Error(message); + err.message = message; + if (errorInfo) { + for (var v in errorInfo) { + err[v] = errorInfo[v]; + } + } + err.popStackFrame(); + return err; + }; + MsAjaxError.parameterCount = function (message) { + var displayMessage = "Sys.ParameterCountException: " + (message ? message : "Parameter count mismatch."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.ParameterCountException' }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argument = function (paramName, message) { + var displayMessage = "Sys.ArgumentException: " + (message ? message : "Value does not fall within the expected range."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentNull = function (paramName, message) { + var displayMessage = "Sys.ArgumentNullException: " + (message ? message : "Value cannot be null."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentOutOfRange = function (paramName, actualValue, message) { + var displayMessage = "Sys.ArgumentOutOfRangeException: " + (message ? message : "Specified argument was out of the range of valid values."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + if (typeof (actualValue) !== "undefined" && actualValue !== null) { + displayMessage += "\n" + MsAjaxString.format("Actual value was {0}.", actualValue); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentType = function (paramName, actualType, expectedType, message) { + var displayMessage = "Sys.ArgumentTypeException: "; + if (message) { + displayMessage += message; + } + else if (actualType && expectedType) { + displayMessage += MsAjaxString.format("Object of type '{0}' cannot be converted to type '{1}'.", actualType.getName ? actualType.getName() : actualType, expectedType.getName ? expectedType.getName() : expectedType); + } + else { + displayMessage += "Object cannot be converted to the required type."; + } + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentUndefined = function (paramName, message) { + var displayMessage = "Sys.ArgumentUndefinedException: " + (message ? message : "Value cannot be undefined."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.invalidOperation = function (message) { + var displayMessage = "Sys.InvalidOperationException: " + (message ? message : "Operation is not valid due to the current state of the object."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.InvalidOperationException' }); + err.popStackFrame(); + return err; + }; + return MsAjaxError; + }()); + OfficeExt.MsAjaxError = MsAjaxError; + var MsAjaxString = (function () { + function MsAjaxString() { + } + MsAjaxString.format = function (format) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var source = format; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10); + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }; + MsAjaxString.startsWith = function (str, prefix) { + return (str.substr(0, prefix.length) === prefix); + }; + return MsAjaxString; + }()); + OfficeExt.MsAjaxString = MsAjaxString; + var MsAjaxDebug = (function () { + function MsAjaxDebug() { + } + MsAjaxDebug.trace = function (text) { + if (typeof Debug !== "undefined" && Debug.writeln) + Debug.writeln(text); + if (window.console && window.console.log) + window.console.log(text); + if (window.opera && window.opera.postError) + window.opera.postError(text); + if (window.debugService && window.debugService.trace) + window.debugService.trace(text); + var a = document.getElementById("TraceConsole"); + if (a && a.tagName.toUpperCase() === "TEXTAREA") { + a.appendChild(document.createTextNode(text + "\n")); + } + }; + return MsAjaxDebug; + }()); + OfficeExt.MsAjaxDebug = MsAjaxDebug; + if (!loadMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) { + var registerTypeInternal = function registerTypeInternal(type, name, isClass) { + if (type.__typeName === undefined || type.__typeName === null) { + type.__typeName = name; + } + if (type.__class === undefined || type.__class === null) { + type.__class = isClass; + } + }; + registerTypeInternal(Function, "Function", true); + registerTypeInternal(Error, "Error", true); + registerTypeInternal(Object, "Object", true); + registerTypeInternal(String, "String", true); + registerTypeInternal(Boolean, "Boolean", true); + registerTypeInternal(Date, "Date", true); + registerTypeInternal(Number, "Number", true); + registerTypeInternal(RegExp, "RegExp", true); + registerTypeInternal(Array, "Array", true); + if (!Function.createCallback) { + Function.createCallback = function Function$createCallback(method, context) { + var e = Function._validateParams(arguments, [ + { name: "method", type: Function }, + { name: "context", mayBeNull: true } + ]); + if (e) + throw e; + return function () { + var l = arguments.length; + if (l > 0) { + var args = []; + for (var i = 0; i < l; i++) { + args[i] = arguments[i]; + } + args[l] = context; + return method.apply(this, args); + } + return method.call(this, context); + }; + }; + } + if (!Function.createDelegate) { + Function.createDelegate = function Function$createDelegate(instance, method) { + var e = Function._validateParams(arguments, [ + { name: "instance", mayBeNull: true }, + { name: "method", type: Function } + ]); + if (e) + throw e; + return function () { + return method.apply(instance, arguments); + }; + }; + } + if (!Function._validateParams) { + Function._validateParams = function (params, expectedParams, validateParameterCount) { + var e, expectedLength = expectedParams.length; + validateParameterCount = validateParameterCount || (typeof (validateParameterCount) === "undefined"); + e = Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i = 0, l = params.length; i < l; i++) { + var expectedParam = expectedParams[Math.min(i, expectedLength - 1)], paramName = expectedParam.name; + if (expectedParam.parameterArray) { + paramName += "[" + (i - expectedLength + 1) + "]"; + } + else if (!validateParameterCount && (i >= expectedLength)) { + break; + } + e = Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; + }; + } + if (!Function._validateParameterCount) { + Function._validateParameterCount = function (params, expectedParams, validateParameterCount) { + var i, error, expectedLen = expectedParams.length, actualLen = params.length; + if (actualLen < expectedLen) { + var minParams = expectedLen; + for (i = 0; i < expectedLen; i++) { + var param = expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error = true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error = true; + for (i = 0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error = false; + break; + } + } + } + if (error) { + var e = MsAjaxError.parameterCount(); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!Function._validateParameter) { + Function._validateParameter = function (param, expectedParam, paramName) { + var e, expectedType = expectedParam.type, expectedInteger = !!expectedParam.integer, expectedDomElement = !!expectedParam.domElement, mayBeNull = !!expectedParam.mayBeNull; + e = Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType = expectedParam.elementType, elementMayBeNull = !!expectedParam.elementMayBeNull; + if (expectedType === Array && typeof (param) !== "undefined" && param !== null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger = !!expectedParam.elementInteger, expectedElementDomElement = !!expectedParam.elementDomElement; + for (var i = 0; i < param.length; i++) { + var elem = param[i]; + e = Function._validateParameterType(elem, expectedElementType, expectedElementInteger, expectedElementDomElement, elementMayBeNull, paramName + "[" + i + "]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; + }; + } + if (!Function._validateParameterType) { + Function._validateParameterType = function (param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof (param) === "undefined") { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param === null) { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && !OfficeExt.MsAjaxTypeHelper.isInstanceOfType(expectedType, param)) { + e = OfficeExt.MsAjaxError.argumentType(paramName, typeof (param), expectedType); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!window.Type) { + window.Type = Function; + } + if (!Type.registerNamespace) { + Type.registerNamespace = function (ns) { + var namespaceParts = ns.split('.'); + var currentNamespace = window; + for (var i = 0; i < namespaceParts.length; i++) { + currentNamespace[namespaceParts[i]] = currentNamespace[namespaceParts[i]] || {}; + currentNamespace = currentNamespace[namespaceParts[i]]; + } + }; + } + if (!Type.prototype.registerClass) { + Type.prototype.registerClass = function (cls) { cls = {}; }; + } + if (typeof (Sys) === "undefined") { + Type.registerNamespace('Sys'); + } + if (!Error.prototype.popStackFrame) { + Error.prototype.popStackFrame = function () { + if (arguments.length !== 0) + throw MsAjaxError.parameterCount(); + if (typeof (this.stack) === "undefined" || this.stack === null || + typeof (this.fileName) === "undefined" || this.fileName === null || + typeof (this.lineNumber) === "undefined" || this.lineNumber === null) { + return; + } + var stackFrames = this.stack.split("\n"); + var currentFrame = stackFrames[0]; + var pattern = this.fileName + ":" + this.lineNumber; + while (typeof (currentFrame) !== "undefined" && + currentFrame !== null && + currentFrame.indexOf(pattern) === -1) { + stackFrames.shift(); + currentFrame = stackFrames[0]; + } + var nextFrame = stackFrames[1]; + if (typeof (nextFrame) === "undefined" || nextFrame === null) { + return; + } + var nextFrameParts = nextFrame.match(/@(.*):(\d+)$/); + if (typeof (nextFrameParts) === "undefined" || nextFrameParts === null) { + return; + } + this.fileName = nextFrameParts[1]; + this.lineNumber = parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack = stackFrames.join("\n"); + }; + } + OsfMsAjaxFactory.msAjaxError = MsAjaxError; + OsfMsAjaxFactory.msAjaxString = MsAjaxString; + OsfMsAjaxFactory.msAjaxDebug = MsAjaxDebug; + } +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.setNamespace("SafeArray", OSF.DDA); +OSF.DDA.SafeArray.Response = { + Status: 0, + Payload: 1 +}; +OSF.DDA.SafeArray.UniqueArguments = { + Offset: "offset", + Run: "run", + BindingSpecificData: "bindingSpecificData", + MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" +}; +OSF.OUtil.setNamespace("Delegate", OSF.DDA.SafeArray); +OSF.DDA.SafeArray.Delegate._onException = function OSF_DDA_SafeArray_Delegate$OnException(ex, args) { + var status; + var statusNumber = ex.number; + if (statusNumber) { + switch (statusNumber) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2147467259: + if (args.dispId == OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + break; + case -2146828283: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147209089: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147208704: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + if (args.onComplete) { + args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } +}; +OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod = function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) { + var status; + var number = ex.number; + if (number) { + switch (number) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; +}; +OSF.DDA.SafeArray.Delegate.SpecialProcessor = function OSF_DDA_SafeArray_Delegate_SpecialProcessor() { + function _2DVBArrayToJaggedArray(vbArr) { + var ret; + try { + var rows = vbArr.ubound(1); + var cols = vbArr.ubound(2); + vbArr = vbArr.toArray(); + if (rows == 1 && cols == 1) { + ret = [vbArr]; + } + else { + ret = []; + for (var row = 0; row < rows; row++) { + var rowArr = []; + for (var col = 0; col < cols; col++) { + var datum = vbArr[row * cols + col]; + if (datum != OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) { + rowArr.push(datum); + } + } + if (rowArr.length > 0) { + ret.push(rowArr); + } + } + } + } + catch (ex) { + } + return ret; + } + var complexTypes = []; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = (function () { + var tableRows = 0; + var tableHeaders = 1; + return { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) { + if (OSF.DDA.TableDataProperties && typeof data != "string" && data[OSF.DDA.TableDataProperties.TableRows] !== undefined) { + var tableData = []; + tableData[tableRows] = data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.DDA.TableDataProperties.TableHeaders]; + data = tableData; + } + return data; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) { + var ret; + if (hostArgs.toArray) { + var dimensions = hostArgs.dimensions(); + if (dimensions === 2) { + ret = _2DVBArrayToJaggedArray(hostArgs); + } + else { + var array = hostArgs.toArray(); + if (array.length === 2 && ((array[0] != null && array[0].toArray) || (array[1] != null && array[1].toArray))) { + ret = {}; + ret[OSF.DDA.TableDataProperties.TableRows] = _2DVBArrayToJaggedArray(array[tableRows]); + ret[OSF.DDA.TableDataProperties.TableHeaders] = _2DVBArrayToJaggedArray(array[tableHeaders]); + } + else { + ret = array; + } + } + } + else { + ret = hostArgs; + } + return ret; + } + }; + })(); + OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes); + this.unpack = function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) { + var toArraySupported = arg !== undefined && arg.toArray !== undefined; + value = toArraySupported ? arg.toArray() : arg || {}; + } + else if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor); +OSF.DDA.SafeArray.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor(), [ + { + type: Microsoft.Office.WebExtension.Parameters.ValueFormat, + toHost: [ + { name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, value: 0 }, + { name: Microsoft.Office.WebExtension.ValueFormat.Formatted, value: 1 } + ] + }, + { + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [ + { name: Microsoft.Office.WebExtension.FilterType.All, value: 0 } + ] + } +]); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, + fromHost: [ + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, value: 0 }, + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) { + function toArray(args) { + var arrArgs = args; + if (OSF.OUtil.isArray(args)) { + var len = arrArgs.length; + for (var i = 0; i < len; i++) { + arrArgs[i] = toArray(arrArgs[i]); + } + } + else if (OSF.OUtil.isDate(args)) { + arrArgs = args.getVarDate(); + } + else if (typeof args === "object" && !OSF.OUtil.isArray(args)) { + arrArgs = []; + for (var index in args) { + if (!OSF.OUtil.isFunction(args[index])) { + arrArgs[index] = toArray(args[index]); + } + } + } + return arrArgs; + } + function fromSafeArray(value) { + var ret = value; + if (value != null && value.toArray) { + var arrayResult = value.toArray(); + ret = new Array(arrayResult.length); + for (var i = 0; i < arrayResult.length; i++) { + ret[i] = fromSafeArray(arrayResult[i]); + } + } + return ret; + } + try { + if (args.onCalling) { + args.onCalling(); + } + OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { + var result; + var status; + if (typeof hostResponseArgs === "number") { + result = []; + status = hostResponseArgs; + } + else { + result = hostResponseArgs.toArray(); + status = result[OSF.DDA.SafeArray.Response.Status]; + } + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) { + var payload = result[OSF.DDA.SafeArray.Response.Payload]; + payload = fromSafeArray(payload); + if (payload != null) { + if (!args._chunkResultData) { + args._chunkResultData = new Array(); + } + args._chunkResultData[payload[0]] = payload[1]; + } + return false; + } + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (result.length > 2) { + payload = []; + for (var i = 1; i < result.length; i++) + payload[i - 1] = result[i]; + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + if (args._chunkResultData) { + payload = fromSafeArray(payload); + if (payload != null) { + var expectedChunkCount = payload[payload.length - 1]; + if (args._chunkResultData.length == expectedChunkCount) { + payload[payload.length - 1] = args._chunkResultData; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + } + } + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + args.onComplete(status, payload); + } + return true; + }); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent = function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) { + var startTime = (new Date()).getTime(); + return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) { + if (args.onReceiving) { + args.onReceiving(); + } + var status = hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + }; +}; +OSF.DDA.SafeArray.Delegate.registerEventAsync = function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + try { + OSF.ClientHostController.registerEvent(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.unregisterEventAsync = function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.unregisterEvent(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.ClientMode = { + ReadWrite: 0, + ReadOnly: 1 +}; +OSF.DDA.RichInitializationReason = { + 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, + 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened +}; +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._initializeSettings = this.initializeSettings; +}; +OSF.InitializationHelper.prototype.deserializeSettings = function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) { + var settings; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if (storageSettings) { + serializedSettings = JSON.parse(storageSettings); + } + else { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if (refreshSupported) { + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + } + else { + settings = new OSF.DDA.Settings(deserializedSettings); + } + return settings; +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication() { +}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)); +}; +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { + var license = new OSF.DDA.License(appContext.get_eToken()); + var getOfficeThemeHandler = (OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme) ? OSF.DDA.OfficeTheme.getOfficeTheme : null; + if (appContext.get_isDialog()) { + if (OSF.DDA.UI.ChildUI) { + appContext.ui = new OSF.DDA.UI.ChildUI(); + } + } + else { + if (OSF.DDA.UI.ParentUI) { + appContext.ui = new OSF.DDA.UI.ParentUI(); + if (OfficeExt.Container) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.CloseContainerAsync]); + } + } + } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } + if (OSF.DDA.ExecuteFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.ExecuteFeature]); + } + if (OSF.DDA.QueryFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.QueryFeature]); + } + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + var asyncMethods = []; + var getAccessTokenMethod = OSF.DDA.AsyncMethodNames.GetAccessTokenAsync; + if (getAccessTokenMethod) { + asyncMethods.push(getAccessTokenMethod); + } + var authContextMethod = OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync; + if (authContextMethod) { + asyncMethods.push(authContextMethod); + } + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, asyncMethods); + } + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); + var getDelegateMethods, parameterMap; + getDelegateMethods = OSF.DDA.DispIdHost.getClientDelegateMethods; + parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods, parameterMap)); +}; +OSF.InitializationHelper.prototype.getInitializationReason = function (appContext) { return OSF.DDA.RichInitializationReason[appContext.get_reason()]; }; +OSF.DDA.DispIdHost.getClientDelegateMethods = function (actionId) { + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.SafeArray.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.SafeArray.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.SafeArray.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.SafeArray.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.SafeArray.Delegate.closeDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.SafeArray.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.SafeArray.Delegate.sendMessage; + if (OSF.DDA.AsyncMethodNames.RefreshAsync && actionId == OSF.DDA.AsyncMethodNames.RefreshAsync.id) { + var readSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + if (typeof (OSF.DDA.ClientSettingsManager.refresh) === "function") { + return OSF.DDA.ClientSettingsManager.refresh(onCalling, onReceiving); + } + else { + return OSF.DDA.ClientSettingsManager.read(onCalling, onReceiving); + } + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings); + } + if (OSF.DDA.AsyncMethodNames.SaveAsync && actionId == OSF.DDA.AsyncMethodNames.SaveAsync.id) { + var writeSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings], hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale], onCalling, onReceiving); + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings); + } + return delegateMethods; +}; +var OSF = OSF || {}; +var OSFWebView; +(function (OSFWebView) { + var WebViewSafeArray = (function () { + function WebViewSafeArray(data) { + this.data = data; + this.safeArrayFlag = this.isSafeArray(data); + } + WebViewSafeArray.prototype.dimensions = function () { + var dimensions = 0; + if (this.safeArrayFlag) { + dimensions = this.data[0][0]; + } + else if (this.isArray()) { + dimensions = 2; + } + return dimensions; + }; + WebViewSafeArray.prototype.getItem = function () { + var array = []; + var element = null; + if (this.safeArrayFlag) { + array = this.toArray(); + } + else { + array = this.data; + } + element = array; + for (var i = 0; i < arguments.length; i++) { + element = element[arguments[i]]; + } + return element; + }; + WebViewSafeArray.prototype.lbound = function (dimension) { + return 0; + }; + WebViewSafeArray.prototype.ubound = function (dimension) { + var ubound = 0; + if (this.safeArrayFlag) { + ubound = this.data[0][dimension]; + } + else if (this.isArray()) { + if (dimension == 1) { + return this.data.length; + } + else if (dimension == 2) { + if (OSF.OUtil.isArray(this.data[0])) { + return this.data[0].length; + } + else if (this.data[0] != null) { + return 1; + } + } + } + return ubound; + }; + WebViewSafeArray.prototype.toArray = function () { + if (this.isArray() == false) { + return this.data; + } + var arr = []; + var startingIndex = this.safeArrayFlag ? 1 : 0; + for (var i = startingIndex; i < this.data.length; i++) { + var element = this.data[i]; + if (this.isSafeArray(element)) { + arr.push(new WebViewSafeArray(element)); + } + else { + arr.push(element); + } + } + return arr; + }; + WebViewSafeArray.prototype.isArray = function () { + return OSF.OUtil.isArray(this.data); + }; + WebViewSafeArray.prototype.isSafeArray = function (obj) { + var isSafeArray = false; + if (OSF.OUtil.isArray(obj) && OSF.OUtil.isArray(obj[0])) { + var bounds = obj[0]; + var dimensions = bounds[0]; + if (bounds.length != dimensions + 1) { + return false; + } + var expectedArraySize = 1; + for (var i = 1; i < bounds.length; i++) { + var dimension = bounds[i]; + if (isFinite(dimension) == false) { + return false; + } + expectedArraySize = expectedArraySize * dimension; + } + expectedArraySize++; + isSafeArray = (expectedArraySize == obj.length); + } + return isSafeArray; + }; + return WebViewSafeArray; + }()); + OSFWebView.WebViewSafeArray = WebViewSafeArray; +})(OSFWebView || (OSFWebView = {})); +(function (OSFWebView) { + var ScriptMessaging; + (function (ScriptMessaging) { + var scriptMessenger = null; + function agaveHostCallback(callbackId, params) { + scriptMessenger.agaveHostCallback(callbackId, params); + } + ScriptMessaging.agaveHostCallback = agaveHostCallback; + function agaveHostEventCallback(callbackId, params) { + scriptMessenger.agaveHostEventCallback(callbackId, params); + } + ScriptMessaging.agaveHostEventCallback = agaveHostEventCallback; + function GetScriptMessenger(agaveHostCallbackName, agaveHostEventCallbackName, poster) { + if (scriptMessenger == null) { + scriptMessenger = new Messenger(agaveHostCallbackName, agaveHostEventCallbackName, poster); + } + return scriptMessenger; + } + ScriptMessaging.GetScriptMessenger = GetScriptMessenger; + var EventHandlerCallback = (function () { + function EventHandlerCallback(id, targetId, handler) { + this.id = id; + this.targetId = targetId; + this.handler = handler; + } + return EventHandlerCallback; + }()); + var Messenger = (function () { + function Messenger(methodCallbackName, eventCallbackName, messagePoster) { + this.callingIndex = 0; + this.callbackList = {}; + this.eventHandlerList = {}; + this.asyncMethodCallbackFunctionName = methodCallbackName; + this.eventCallbackFunctionName = eventCallbackName; + this.poster = messagePoster; + this.conversationId = Messenger.getCurrentTimeMS().toString(); + } + Messenger.prototype.invokeMethod = function (handlerName, methodId, params, callback) { + var messagingArgs = {}; + this.postMessage(messagingArgs, handlerName, methodId, params, callback); + }; + Messenger.prototype.registerEvent = function (handlerName, methodId, dispId, targetId, handler, callback) { + var messagingArgs = { + eventCallbackFunction: this.eventCallbackFunctionName + }; + var hostArgs = { + id: dispId, + targetId: targetId + }; + var correlationId = this.postMessage(messagingArgs, handlerName, methodId, hostArgs, callback); + this.eventHandlerList[correlationId] = new EventHandlerCallback(dispId, targetId, handler); + }; + Messenger.prototype.unregisterEvent = function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + for (var key in this.eventHandlerList) { + if (this.eventHandlerList.hasOwnProperty(key)) { + var eventCallback = this.eventHandlerList[key]; + if (eventCallback.id == dispId && eventCallback.targetId == targetId) { + delete this.eventHandlerList[key]; + } + } + } + this.invokeMethod(handlerName, methodId, hostArgs, callback); + }; + Messenger.prototype.agaveHostCallback = function (callbackId, params) { + var callbackFunction = this.callbackList[callbackId]; + if (callbackFunction) { + var callbacksDone = callbackFunction(params); + if (callbacksDone === undefined || callbacksDone === true) { + delete this.callbackList[callbackId]; + } + } + }; + Messenger.prototype.agaveHostEventCallback = function (callbackId, params) { + var eventCallback = this.eventHandlerList[callbackId]; + if (eventCallback) { + eventCallback.handler(params); + } + }; + Messenger.prototype.postMessage = function (messagingArgs, handlerName, methodId, params, callback) { + var correlationId = this.generateCorrelationId(); + this.callbackList[correlationId] = callback; + messagingArgs.methodId = methodId; + messagingArgs.params = params; + messagingArgs.callbackId = correlationId; + messagingArgs.callbackFunction = this.asyncMethodCallbackFunctionName; + this.poster.postMessage(handlerName, JSON.stringify(messagingArgs)); + return correlationId; + }; + Messenger.prototype.generateCorrelationId = function () { + ++this.callingIndex; + return this.conversationId + this.callingIndex; + }; + Messenger.getCurrentTimeMS = function () { + return (new Date).getTime(); + }; + Messenger.MESSAGE_TIME_DELTA = 10; + return Messenger; + }()); + ScriptMessaging.Messenger = Messenger; + })(ScriptMessaging = OSFWebView.ScriptMessaging || (OSFWebView.ScriptMessaging = {})); +})(OSFWebView || (OSFWebView = {})); +OSF.ScriptMessaging = OSFWebView.ScriptMessaging; +(function (OSFWebView) { + OSFWebView.MessageHandlerName = "Agave"; + OSFWebView.PopupMessageHandlerName = "WefPopupHandler"; + var AppContextProperties; + (function (AppContextProperties) { + AppContextProperties[AppContextProperties["Settings"] = 0] = "Settings"; + AppContextProperties[AppContextProperties["SolutionReferenceId"] = 1] = "SolutionReferenceId"; + AppContextProperties[AppContextProperties["AppType"] = 2] = "AppType"; + AppContextProperties[AppContextProperties["MajorVersion"] = 3] = "MajorVersion"; + AppContextProperties[AppContextProperties["MinorVersion"] = 4] = "MinorVersion"; + AppContextProperties[AppContextProperties["RevisionVersion"] = 5] = "RevisionVersion"; + AppContextProperties[AppContextProperties["APIVersionSequence"] = 6] = "APIVersionSequence"; + AppContextProperties[AppContextProperties["AppCapabilities"] = 7] = "AppCapabilities"; + AppContextProperties[AppContextProperties["APPUILocale"] = 8] = "APPUILocale"; + AppContextProperties[AppContextProperties["AppDataLocale"] = 9] = "AppDataLocale"; + AppContextProperties[AppContextProperties["BindingCount"] = 10] = "BindingCount"; + AppContextProperties[AppContextProperties["DocumentUrl"] = 11] = "DocumentUrl"; + AppContextProperties[AppContextProperties["ActivationMode"] = 12] = "ActivationMode"; + AppContextProperties[AppContextProperties["ControlIntegrationLevel"] = 13] = "ControlIntegrationLevel"; + AppContextProperties[AppContextProperties["SolutionToken"] = 14] = "SolutionToken"; + AppContextProperties[AppContextProperties["APISetVersion"] = 15] = "APISetVersion"; + AppContextProperties[AppContextProperties["CorrelationId"] = 16] = "CorrelationId"; + AppContextProperties[AppContextProperties["InstanceId"] = 17] = "InstanceId"; + AppContextProperties[AppContextProperties["TouchEnabled"] = 18] = "TouchEnabled"; + AppContextProperties[AppContextProperties["CommerceAllowed"] = 19] = "CommerceAllowed"; + AppContextProperties[AppContextProperties["RequirementMatrix"] = 20] = "RequirementMatrix"; + AppContextProperties[AppContextProperties["OfficeThemeInfo"] = 21] = "OfficeThemeInfo"; + })(AppContextProperties = OSFWebView.AppContextProperties || (OSFWebView.AppContextProperties = {})); + var MethodId; + (function (MethodId) { + MethodId[MethodId["Execute"] = 1] = "Execute"; + MethodId[MethodId["RegisterEvent"] = 2] = "RegisterEvent"; + MethodId[MethodId["UnregisterEvent"] = 3] = "UnregisterEvent"; + MethodId[MethodId["WriteSettings"] = 4] = "WriteSettings"; + MethodId[MethodId["GetContext"] = 5] = "GetContext"; + MethodId[MethodId["OnKeydown"] = 6] = "OnKeydown"; + MethodId[MethodId["AddinInitialized"] = 7] = "AddinInitialized"; + MethodId[MethodId["OpenWindow"] = 8] = "OpenWindow"; + MethodId[MethodId["MessageParent"] = 9] = "MessageParent"; + MethodId[MethodId["SendMessage"] = 10] = "SendMessage"; + })(MethodId = OSFWebView.MethodId || (OSFWebView.MethodId = {})); + var WebViewHostController = (function () { + function WebViewHostController(hostScriptProxy) { + this.hostScriptProxy = hostScriptProxy; + } + WebViewHostController.prototype.execute = function (id, params, callback) { + var args = params; + if (args == null) { + args = []; + } + var hostParams = { + id: id, + apiArgs: args + }; + var agaveResponseCallback = function (payload) { + var safeArraySource = payload; + if (OSF.OUtil.isArray(payload) && payload.length >= 2) { + var hrStatus = payload[0]; + safeArraySource = payload[1]; + } + if (callback) { + return callback(new OSFWebView.WebViewSafeArray(safeArraySource)); + } + }; + this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.Execute, hostParams, agaveResponseCallback); + }; + WebViewHostController.prototype.registerEvent = function (id, targetId, handler, callback) { + var agaveEventHandlerCallback = function (payload) { + var safeArraySource = payload; + var eventId = 0; + if (OSF.OUtil.isArray(payload) && payload.length >= 2) { + eventId = payload[0]; + safeArraySource = payload[1]; + } + if (handler) { + handler(eventId, new OSFWebView.WebViewSafeArray(safeArraySource)); + } + }; + var agaveResponseCallback = function (payload) { + if (callback) { + return callback(new OSFWebView.WebViewSafeArray(payload)); + } + }; + this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.RegisterEvent, id, targetId, agaveEventHandlerCallback, agaveResponseCallback); + }; + WebViewHostController.prototype.unregisterEvent = function (id, targetId, callback) { + var agaveResponseCallback = function (response) { + return callback(new OSFWebView.WebViewSafeArray(response)); + }; + this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.UnregisterEvent, id, targetId, agaveResponseCallback); + }; + WebViewHostController.prototype.messageParent = function (params) { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + var targetOrigin = params[Microsoft.Office.WebExtension.Parameters.TargetOrigin]; + if (!targetOrigin) { + targetOrigin = window.location.origin; + } + var messageObj = { dialogMessage: { messageType: OSF.DialogMessageType.DialogMessageReceived, messageContent: message } }; + window.opener.postMessage(JSON.stringify(messageObj), targetOrigin); + }; + WebViewHostController.prototype.openDialog = function (id, targetId, handler, callback) { + var magicWord = "action=displayDialog"; + var callArgs = JSON.parse(targetId); + var callUrl = callArgs.url; + if (!callUrl) { + return; + } + var fragmentSeparator = '#'; + var urlParts = callUrl.split(fragmentSeparator); + var seperator = "?"; + if (callUrl.indexOf("?") > -1) { + seperator = "&"; + } + var width = screen.width * callArgs.width / 100; + var height = screen.height * callArgs.height / 100; + var params = "width=" + width + ", height=" + height; + urlParts[0] = urlParts[0].concat(seperator).concat(magicWord); + var openUrl = urlParts.join(fragmentSeparator); + WebViewHostController.popup = window.open(openUrl, "", params); + function receiveMessage(event) { + if (event.source == WebViewHostController.popup) { + try { + var messageObj = JSON.parse(event.data); + if (messageObj.dialogMessage) { + handler(id, [OSF.DialogMessageType.DialogMessageReceived, messageObj.dialogMessage.messageContent, event.origin]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handled. Message:" + event.data); + } + } + } + window.addEventListener("message", receiveMessage); + var interval; + function checkWindowClose() { + try { + if (WebViewHostController.popup == null || WebViewHostController.popup.closed) { + window.clearInterval(interval); + handler(id, [OSF.DialogMessageType.DialogClosed]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed."); + } + } + interval = window.setInterval(checkWindowClose, 1000); + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + }; + WebViewHostController.prototype.closeDialog = function (id, targetId, callback) { + if (WebViewHostController.popup) { + WebViewHostController.popup.close(); + WebViewHostController.popup = null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + }; + WebViewHostController.prototype.sendMessage = function (params) { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageContent]; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message = message.toString(); + } + this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.SendMessage, message, null); + }; + WebViewHostController.prototype.closeSdxDialog = function (context) { + }; + WebViewHostController.prototype.resizeSdxDialog = function (width, height) { + }; + return WebViewHostController; + }()); + OSFWebView.WebViewHostController = WebViewHostController; +})(OSFWebView || (OSFWebView = {})); +var CrossIFrameCommon; +(function (CrossIFrameCommon) { + var CallbackType; + (function (CallbackType) { + CallbackType[CallbackType["MethodCallback"] = 0] = "MethodCallback"; + CallbackType[CallbackType["EventCallback"] = 1] = "EventCallback"; + })(CallbackType = CrossIFrameCommon.CallbackType || (CrossIFrameCommon.CallbackType = {})); + var CallbackData = (function () { + function CallbackData(callbackType, callbackId, params) { + this.callbackType = callbackType; + this.callbackId = callbackId; + this.params = params; + } + return CallbackData; + }()); + CrossIFrameCommon.CallbackData = CallbackData; +})(CrossIFrameCommon || (CrossIFrameCommon = {})); +var Android; +(function (Android) { + var Poster = (function () { + function Poster() { + } + Poster.getInstance = function () { + if (Poster.uniqueInstance == null) { + Poster.uniqueInstance = new Poster(); + } + return Poster.uniqueInstance; + }; + Poster.prototype.postMessage = function (handlerName, message) { + agaveHost.postMessage(message); + }; + Poster.prototype.ReceiveMessage = function (cbData) { + switch (cbData.callbackType) { + case CrossIFrameCommon.CallbackType.MethodCallback: + OSFWebView.ScriptMessaging.agaveHostCallback(cbData.callbackId, cbData.params); + break; + case CrossIFrameCommon.CallbackType.EventCallback: + OSFWebView.ScriptMessaging.agaveHostEventCallback(cbData.callbackId, cbData.params); + break; + default: + break; + } + }; + return Poster; + }()); + Android.Poster = Poster; +})(Android || (Android = {})); +function agaveHostCallback(callbackId, params) { + var cbData = new CrossIFrameCommon.CallbackData(CrossIFrameCommon.CallbackType.MethodCallback, callbackId, params); + var posterInstance = Android.Poster.getInstance(); + posterInstance.ReceiveMessage(cbData); +} +function agaveHostEventCallback(callbackId, params) { + var cbData = new CrossIFrameCommon.CallbackData(CrossIFrameCommon.CallbackType.EventCallback, callbackId, params); + var posterInstance = Android.Poster.getInstance(); + posterInstance.ReceiveMessage(cbData); +} +OSF.DDA.ClientSettingsManager = { + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) { + return function (args) { + var status, response; + var onComplete = function onComplete(status, response) { + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + args.onComplete(status, response); + } + }; + try { + hostDelegateMethod(args.hostCallArgs, args.onCalling, onComplete); + } + catch (ex) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response = { name: Strings.OfficeOM.L_InternalError, message: ex }; + onComplete(status, response); + } + }; + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + var initializationHelper = OSF._OfficeAppFactory.getInitializationHelper(); + var onReceivedContext = function onReceivedContext(appContext) { + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, appContext.get_settings()); + } + }; + initializationHelper.getAppContext(null, onReceivedContext); + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) { + var hostParams = {}; + var keys = []; + var values = []; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + hostParams["keys"] = keys; + hostParams["values"] = values; + if (onCalling) { + onCalling(); + } + var onWriteCompleted = function onWriteCompleted(status) { + if (onComplete) { + onComplete(status[0], null); + } + }; + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.WriteSettings, hostParams, onWriteCompleted); + } +}; +OSF.InitializationHelper.prototype.initializeSettings = function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) { + var serializedSettings = appContext.get_settings(); + var settings = this.deserializeSettings(serializedSettings, refreshSupported); + return settings; +}; +OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + var getInvocationCallback = function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(appContext) { + var returnedContext; + var appContextProperties = OSF.WebView.AppContextProperties; + var appType = appContext[appContextProperties.AppType]; + var appTypeSupported = false; + for (var appEntry in OSF.AppName) { + if (OSF.AppName[appEntry] == appType) { + appTypeSupported = true; + break; + } + } + if (!appTypeSupported) { + throw "Unsupported client type " + appType; + } + var hostSettings = appContext[appContextProperties.Settings]; + var serializedSettings = {}; + var keys = hostSettings[0]; + var values = hostSettings[1]; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + var id = appContext[appContextProperties.SolutionReferenceId]; + var version = appContext[appContextProperties.MajorVersion]; + var clientMode = appContext[appContextProperties.AppCapabilities]; + var UILocale = appContext[appContextProperties.APPUILocale]; + var dataLocale = appContext[appContextProperties.AppDataLocale]; + var docUrl = appContext[appContextProperties.DocumentUrl]; + var reason = appContext[appContextProperties.ActivationMode]; + var osfControlType = appContext[appContextProperties.ControlIntegrationLevel]; + var eToken = appContext[appContextProperties.SolutionToken]; + eToken = eToken ? eToken.toString() : ""; + var correlationId = appContext[appContextProperties.CorrelationId]; + var appInstanceId = appContext[appContextProperties.InstanceId]; + var touchEnabled = appContext[appContextProperties.TouchEnabled]; + var commerceAllowed = appContext[appContextProperties.CommerceAllowed]; + var minorVersion = appContext[appContextProperties.MinorVersion]; + var requirementMatrix = appContext[appContextProperties.RequirementMatrix]; + var revisionVersion = appContext[appContextProperties.RevisionVersion]; + var revisionSequence = appContext[appContextProperties.APIVersionSequence]; + var hostFullVersion = version + "." + minorVersion + "." + revisionVersion + "." + revisionSequence; + var officeThemeInfo = appContext[appContextProperties.OfficeThemeInfo]; + if (officeThemeInfo) { + officeThemeInfo = JSON.parse(officeThemeInfo); + for (var color in officeThemeInfo) { + officeThemeInfo[color] = OSF.OUtil.convertIntToCssHexColor(officeThemeInfo[color]); + } + } + returnedContext = new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, serializedSettings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, undefined, hostFullVersion, undefined, undefined, undefined, undefined, undefined, undefined, officeThemeInfo); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + }; + var handler; + if (this._hostInfo.isDialog) { + handler = OSF.WebView.PopupMessageHandlerName; + } + else { + handler = OSF.WebView.MessageHandlerName; + } + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler, OSF.WebView.MethodId.GetContext, [], getInvocationCallback); +}; +OSF.WebView = OSFWebView; +OSF.ClientHostController = new OSFWebView.WebViewHostController(OSF.ScriptMessaging.GetScriptMessenger("agaveHostCallback", "agaveHostEventCallback", Android.Poster.getInstance())); +var OSFLog; +(function (OSFLog) { + var BaseUsageData = (function () { + function BaseUsageData(table) { + this._table = table; + this._fields = {}; + } + Object.defineProperty(BaseUsageData.prototype, "Fields", { + get: function () { + return this._fields; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype, "Table", { + get: function () { + return this._table; + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function () { + }; + BaseUsageData.prototype.SetSerializedField = function (key, value) { + if (typeof (value) !== "undefined" && value !== null) { + this._serializedFields[key] = value.toString(); + } + }; + BaseUsageData.prototype.SerializeRow = function () { + this._serializedFields = {}; + this.SetSerializedField("Table", this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields); + }; + return BaseUsageData; + }()); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = (function (_super) { + __extends(AppActivatedUsageData, _super); + function AppActivatedUsageData() { + return _super.call(this, "AppActivated") || this; + } + Object.defineProperty(AppActivatedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppId", { + get: function () { return this.Fields["AppId"]; }, + set: function (value) { this.Fields["AppId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppInstanceId", { + get: function () { return this.Fields["AppInstanceId"]; }, + set: function (value) { this.Fields["AppInstanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppURL", { + get: function () { return this.Fields["AppURL"]; }, + set: function (value) { this.Fields["AppURL"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AssetId", { + get: function () { return this.Fields["AssetId"]; }, + set: function (value) { this.Fields["AssetId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Browser", { + get: function () { return this.Fields["Browser"]; }, + set: function (value) { this.Fields["Browser"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "UserId", { + get: function () { return this.Fields["UserId"]; }, + set: function (value) { this.Fields["UserId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Host", { + get: function () { return this.Fields["Host"]; }, + set: function (value) { this.Fields["Host"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostVersion", { + get: function () { return this.Fields["HostVersion"]; }, + set: function (value) { this.Fields["HostVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "ClientId", { + get: function () { return this.Fields["ClientId"]; }, + set: function (value) { this.Fields["ClientId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeWidth", { + get: function () { return this.Fields["AppSizeWidth"]; }, + set: function (value) { this.Fields["AppSizeWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeHeight", { + get: function () { return this.Fields["AppSizeHeight"]; }, + set: function (value) { this.Fields["AppSizeHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "DocUrl", { + get: function () { return this.Fields["DocUrl"]; }, + set: function (value) { this.Fields["DocUrl"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "OfficeJSVersion", { + get: function () { return this.Fields["OfficeJSVersion"]; }, + set: function (value) { this.Fields["OfficeJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostJSVersion", { + get: function () { return this.Fields["HostJSVersion"]; }, + set: function (value) { this.Fields["HostJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "WacHostEnvironment", { + get: function () { return this.Fields["WacHostEnvironment"]; }, + set: function (value) { this.Fields["WacHostEnvironment"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsFromWacAutomation", { + get: function () { return this.Fields["IsFromWacAutomation"]; }, + set: function (value) { this.Fields["IsFromWacAutomation"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsMOS", { + get: function () { return this.Fields["IsMOS"]; }, + set: function (value) { this.Fields["IsMOS"] = value; }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("AppId", this.AppId); + this.SetSerializedField("AppInstanceId", this.AppInstanceId); + this.SetSerializedField("AppURL", this.AppURL); + this.SetSerializedField("AssetId", this.AssetId); + this.SetSerializedField("Browser", this.Browser); + this.SetSerializedField("UserId", this.UserId); + this.SetSerializedField("Host", this.Host); + this.SetSerializedField("HostVersion", this.HostVersion); + this.SetSerializedField("ClientId", this.ClientId); + this.SetSerializedField("AppSizeWidth", this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight", this.AppSizeHeight); + this.SetSerializedField("Message", this.Message); + this.SetSerializedField("DocUrl", this.DocUrl); + this.SetSerializedField("OfficeJSVersion", this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion", this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment", this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation", this.IsFromWacAutomation); + this.SetSerializedField("IsMOS", this.IsMOS); + }; + return AppActivatedUsageData; + }(BaseUsageData)); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = (function (_super) { + __extends(ScriptLoadUsageData, _super); + function ScriptLoadUsageData() { + return _super.call(this, "ScriptLoad") || this; + } + Object.defineProperty(ScriptLoadUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ScriptId", { + get: function () { return this.Fields["ScriptId"]; }, + set: function (value) { this.Fields["ScriptId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "StartTime", { + get: function () { return this.Fields["StartTime"]; }, + set: function (value) { this.Fields["StartTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("ScriptId", this.ScriptId); + this.SetSerializedField("StartTime", this.StartTime); + this.SetSerializedField("ResponseTime", this.ResponseTime); + }; + return ScriptLoadUsageData; + }(BaseUsageData)); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = (function (_super) { + __extends(AppClosedUsageData, _super); + function AppClosedUsageData() { + return _super.call(this, "AppClosed") || this; + } + Object.defineProperty(AppClosedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "FocusTime", { + get: function () { return this.Fields["FocusTime"]; }, + set: function (value) { this.Fields["FocusTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalWidth", { + get: function () { return this.Fields["AppSizeFinalWidth"]; }, + set: function (value) { this.Fields["AppSizeFinalWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalHeight", { + get: function () { return this.Fields["AppSizeFinalHeight"]; }, + set: function (value) { this.Fields["AppSizeFinalHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "OpenTime", { + get: function () { return this.Fields["OpenTime"]; }, + set: function (value) { this.Fields["OpenTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "CloseMethod", { + get: function () { return this.Fields["CloseMethod"]; }, + set: function (value) { this.Fields["CloseMethod"] = value; }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("FocusTime", this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth", this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight", this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime", this.OpenTime); + this.SetSerializedField("CloseMethod", this.CloseMethod); + }; + return AppClosedUsageData; + }(BaseUsageData)); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = (function (_super) { + __extends(APIUsageUsageData, _super); + function APIUsageUsageData() { + return _super.call(this, "APIUsage") || this; + } + Object.defineProperty(APIUsageUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIType", { + get: function () { return this.Fields["APIType"]; }, + set: function (value) { this.Fields["APIType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIID", { + get: function () { return this.Fields["APIID"]; }, + set: function (value) { this.Fields["APIID"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "Parameters", { + get: function () { return this.Fields["Parameters"]; }, + set: function (value) { this.Fields["Parameters"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ErrorType", { + get: function () { return this.Fields["ErrorType"]; }, + set: function (value) { this.Fields["ErrorType"] = value; }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("APIType", this.APIType); + this.SetSerializedField("APIID", this.APIID); + this.SetSerializedField("Parameters", this.Parameters); + this.SetSerializedField("ResponseTime", this.ResponseTime); + this.SetSerializedField("ErrorType", this.ErrorType); + }; + return APIUsageUsageData; + }(BaseUsageData)); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = (function (_super) { + __extends(AppInitializationUsageData, _super); + function AppInitializationUsageData() { + return _super.call(this, "AppInitialization") || this; + } + Object.defineProperty(AppInitializationUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SuccessCode", { + get: function () { return this.Fields["SuccessCode"]; }, + set: function (value) { this.Fields["SuccessCode"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("SuccessCode", this.SuccessCode); + this.SetSerializedField("Message", this.Message); + }; + return AppInitializationUsageData; + }(BaseUsageData)); + OSFLog.AppInitializationUsageData = AppInitializationUsageData; + var CheckWACHostUsageData = (function (_super) { + __extends(CheckWACHostUsageData, _super); + function CheckWACHostUsageData() { + return _super.call(this, "CheckWACHost") || this; + } + Object.defineProperty(CheckWACHostUsageData.prototype, "isWacKnownHost", { + get: function () { return this.Fields["isWacKnownHost"]; }, + set: function (value) { this.Fields["isWacKnownHost"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "instanceId", { + get: function () { return this.Fields["instanceId"]; }, + set: function (value) { this.Fields["instanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostType", { + get: function () { return this.Fields["hostType"]; }, + set: function (value) { this.Fields["hostType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostPlatform", { + get: function () { return this.Fields["hostPlatform"]; }, + set: function (value) { this.Fields["hostPlatform"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "wacDomain", { + get: function () { return this.Fields["wacDomain"]; }, + set: function (value) { this.Fields["wacDomain"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "isLocalStorageAvailable", { + get: function () { return this.Fields["isLocalStorageAvailable"]; }, + set: function (value) { this.Fields["isLocalStorageAvailable"] = value; }, + enumerable: true, + configurable: true + }); + CheckWACHostUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("isWacKnownHost", this.isWacKnownHost); + this.SetSerializedField("instanceId", this.instanceId); + this.SetSerializedField("hostType", this.hostType); + this.SetSerializedField("hostPlatform", this.hostPlatform); + this.SetSerializedField("wacDomain", this.wacDomain); + this.SetSerializedField("isLocalStorageAvailable", this.isLocalStorageAvailable); + }; + return CheckWACHostUsageData; + }(BaseUsageData)); + OSFLog.CheckWACHostUsageData = CheckWACHostUsageData; +})(OSFLog || (OSFLog = {})); +var Logger; +(function (Logger) { + "use strict"; + var TraceLevel; + (function (TraceLevel) { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error"; + })(TraceLevel = Logger.TraceLevel || (Logger.TraceLevel = {})); + var SendFlag; + (function (SendFlag) { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush"; + })(SendFlag = Logger.SendFlag || (Logger.SendFlag = {})); + function allowUploadingData() { + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) { + } + Logger.sendLog = sendLog; + function creatULSEndpoint() { + try { + return new ULSEndpointProxy(); + } + catch (e) { + return null; + } + } + var ULSEndpointProxy = (function () { + function ULSEndpointProxy() { + } + ULSEndpointProxy.prototype.writeLog = function (log) { + }; + ULSEndpointProxy.prototype.loadProxyFrame = function () { + }; + return ULSEndpointProxy; + }()); + if (!OSF.Logger) { + OSF.Logger = Logger; + } + Logger.ulsEndpoint = creatULSEndpoint(); +})(Logger || (Logger = {})); +var OSFAriaLogger; +(function (OSFAriaLogger) { + var TelemetryEventAppActivated = { name: "AppActivated", enabled: true, critical: true, points: [ + { name: "Browser", type: "string" }, + { name: "Message", type: "string" }, + { name: "Host", type: "string" }, + { name: "AppSizeWidth", type: "int64" }, + { name: "AppSizeHeight", type: "int64" }, + { name: "IsFromWacAutomation", type: "string" }, + { name: "IsMOS", type: "int64" }, + ] }; + var TelemetryEventScriptLoad = { name: "ScriptLoad", enabled: true, critical: false, points: [ + { name: "ScriptId", type: "string" }, + { name: "StartTime", type: "double" }, + { name: "ResponseTime", type: "double" }, + ] }; + var enableAPIUsage = shouldAPIUsageBeEnabled(); + var TelemetryEventApiUsage = { name: "APIUsage", enabled: enableAPIUsage, critical: false, points: [ + { name: "APIType", type: "string" }, + { name: "APIID", type: "int64" }, + { name: "Parameters", type: "string" }, + { name: "ResponseTime", type: "int64" }, + { name: "ErrorType", type: "int64" }, + ] }; + var TelemetryEventAppInitialization = { name: "AppInitialization", enabled: true, critical: false, points: [ + { name: "SuccessCode", type: "int64" }, + { name: "Message", type: "string" }, + ] }; + var TelemetryEventAppClosed = { name: "AppClosed", enabled: true, critical: false, points: [ + { name: "FocusTime", type: "int64" }, + { name: "AppSizeFinalWidth", type: "int64" }, + { name: "AppSizeFinalHeight", type: "int64" }, + { name: "OpenTime", type: "int64" }, + ] }; + var TelemetryEventCheckWACHost = { name: "CheckWACHost", enabled: true, critical: false, points: [ + { name: "isWacKnownHost", type: "int64" }, + { name: "solutionId", type: "string" }, + { name: "hostType", type: "string" }, + { name: "hostPlatform", type: "string" }, + { name: "correlationId", type: "string" }, + { name: "isLocalStorageAvailable", type: "boolean" }, + ] }; + var TelemetryEvents = [ + TelemetryEventAppActivated, + TelemetryEventScriptLoad, + TelemetryEventApiUsage, + TelemetryEventAppInitialization, + TelemetryEventAppClosed, + TelemetryEventCheckWACHost, + ]; + function createDataField(value, point) { + var key = point.rename === undefined ? point.name : point.rename; + var type = point.type; + var field = undefined; + switch (type) { + case "string": + field = oteljs.makeStringDataField(key, value); + break; + case "double": + if (typeof value === "string") { + value = parseFloat(value); + } + field = oteljs.makeDoubleDataField(key, value); + break; + case "int64": + if (typeof value === "string") { + value = parseInt(value); + } + field = oteljs.makeInt64DataField(key, value); + break; + case "boolean": + if (typeof value === "string") { + value = value === "true"; + } + field = oteljs.makeBooleanDataField(key, value); + break; + } + return field; + } + function getEventDefinition(eventName) { + for (var _i = 0, TelemetryEvents_1 = TelemetryEvents; _i < TelemetryEvents_1.length; _i++) { + var event_1 = TelemetryEvents_1[_i]; + if (event_1.name === eventName) { + return event_1; + } + } + return undefined; + } + function eventEnabled(eventName) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return false; + } + return eventDefinition.enabled; + } + function shouldAPIUsageBeEnabled() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function generateTelemetryEvent(eventName, telemetryData) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return undefined; + } + var dataFields = []; + for (var _i = 0, _a = eventDefinition.points; _i < _a.length; _i++) { + var point = _a[_i]; + var key = point.name; + var value = telemetryData[key]; + if (value === undefined) { + continue; + } + var field = createDataField(value, point); + if (field !== undefined) { + dataFields.push(field); + } + } + var flags = { dataCategories: oteljs.DataCategories.ProductServiceUsage }; + if (eventDefinition.critical) { + flags.samplingPolicy = oteljs.SamplingPolicy.CriticalBusinessImpact; + } + flags.diagnosticLevel = oteljs.DiagnosticLevel.NecessaryServiceDataEvent; + var eventNameFull = "Office.Extensibility.OfficeJs." + eventName + "X"; + var event = { eventName: eventNameFull, dataFields: dataFields, eventFlags: flags }; + return event; + } + function sendOtelTelemetryEvent(eventName, telemetryData) { + if (eventEnabled(eventName)) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var event = generateTelemetryEvent(eventName, telemetryData); + if (event === undefined) { + return; + } + Microsoft.Office.WebExtension.sendTelemetryEvent(event); + }); + } + } + } + var AriaLogger = (function () { + function AriaLogger() { + } + AriaLogger.prototype.getAriaCDNLocation = function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "ariatelemetry/aria-web-telemetry.js"); + }; + AriaLogger.getInstance = function () { + if (AriaLogger.AriaLoggerObj === undefined) { + AriaLogger.AriaLoggerObj = new AriaLogger(); + } + return AriaLogger.AriaLoggerObj; + }; + AriaLogger.prototype.isIUsageData = function (arg) { + return arg["Fields"] !== undefined; + }; + AriaLogger.prototype.shouldSendDirectToAria = function (flavor, version) { + var BASE10 = 10; + var MAX_VERSION_WIN32 = [16, 0, 11601]; + var MAX_VERSION_MAC = [16, 28]; + var max_version; + if (!flavor) { + return false; + } + else if (flavor.toLowerCase() === "win32") { + max_version = MAX_VERSION_WIN32; + } + else if (flavor.toLowerCase() === "mac") { + max_version = MAX_VERSION_MAC; + } + else { + return true; + } + if (!version) { + return false; + } + var versionTokens = version.split('.'); + for (var i = 0; i < max_version.length && i < versionTokens.length; i++) { + var versionToken = parseInt(versionTokens[i], BASE10); + if (isNaN(versionToken)) { + return false; + } + if (versionToken < max_version[i]) { + return true; + } + if (versionToken > max_version[i]) { + return false; + } + } + return false; + }; + AriaLogger.prototype.isDirectToAriaEnabled = function () { + if (this.EnableDirectToAria === undefined || this.EnableDirectToAria === null) { + var flavor = void 0; + var version = void 0; + if (OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo) { + flavor = OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]; + } + if (window.external && typeof window.external.GetContext !== "undefined" && typeof window.external.GetContext().GetHostFullVersion !== "undefined") { + version = window.external.GetContext().GetHostFullVersion(); + } + this.EnableDirectToAria = this.shouldSendDirectToAria(flavor, version); + } + return this.EnableDirectToAria; + }; + AriaLogger.prototype.sendTelemetry = function (tableName, telemetryData) { + var startAfterMs = 1000; + var sendAriaEnabled = AriaLogger.EnableSendingTelemetryWithLegacyAria && this.isDirectToAriaEnabled(); + if (sendAriaEnabled) { + OSF.OUtil.loadScript(this.getAriaCDNLocation(), function () { + try { + if (!this.ALogger) { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); + } + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for (var key in telemetryData) { + if (key.toLowerCase() !== "table") { + eventProperties.setProperty(key, telemetryData[key]); + } + } + var today = new Date(); + eventProperties.setProperty("Date", today.toISOString()); + this.ALogger.logEvent(eventProperties); + } + catch (e) { + } + }, startAfterMs); + } + if (AriaLogger.EnableSendingTelemetryWithOTel) { + sendOtelTelemetryEvent(tableName, telemetryData); + } + }; + AriaLogger.prototype.logData = function (data) { + if (this.isIUsageData(data)) { + this.sendTelemetry(data["Table"], data["Fields"]); + } + else { + this.sendTelemetry(data["Table"], data); + } + }; + AriaLogger.EnableSendingTelemetryWithOTel = true; + AriaLogger.EnableSendingTelemetryWithLegacyAria = false; + return AriaLogger; + }()); + OSFAriaLogger.AriaLogger = AriaLogger; +})(OSFAriaLogger || (OSFAriaLogger = {})); +var OSFAppTelemetry; +(function (OSFAppTelemetry) { + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + var privateAddinId = "PRIVATE"; + OSFAppTelemetry.enableTelemetry = true; + ; + var AppInfo = (function () { + function AppInfo() { + } + return AppInfo; + }()); + OSFAppTelemetry.AppInfo = AppInfo; + var Event = (function () { + function Event(name, handler) { + this.name = name; + this.handler = handler; + } + return Event; + }()); + var AppStorage = (function () { + function AppStorage() { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set"; + } + AppStorage.prototype.getClientId = function () { + var clientId = this.getValue(this.clientIDKey); + if (!clientId || clientId.length <= 0 || clientId.length > 40) { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey, clientId); + } + return clientId; + }; + AppStorage.prototype.saveLog = function (logId, log) { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = ((logIdSet && logIdSet.length > 0) ? (logIdSet + ";") : "") + logId; + this.setValue(this.logIdSetKey, logIdSet); + this.setValue(logId, log); + }; + AppStorage.prototype.enumerateLog = function (callback, clean) { + var logIdSet = this.getValue(this.logIdSetKey); + if (logIdSet) { + var ids = logIdSet.split(";"); + for (var id in ids) { + var logId = ids[id]; + var log = this.getValue(logId); + if (log) { + if (callback) { + callback(logId, log); + } + if (clean) { + this.remove(logId); + } + } + } + if (clean) { + this.remove(this.logIdSetKey); + } + } + }; + AppStorage.prototype.getValue = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if (osfLocalStorage) { + value = osfLocalStorage.getItem(key); + } + return value; + }; + AppStorage.prototype.setValue = function (key, value) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + osfLocalStorage.setItem(key, value); + } + }; + AppStorage.prototype.remove = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + try { + osfLocalStorage.removeItem(key); + } + catch (ex) { + } + } + }; + return AppStorage; + }()); + var AppLogger = (function () { + function AppLogger() { + } + AppLogger.prototype.LogData = function (data) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } + }; + AppLogger.prototype.LogRawData = function (log) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); + } + catch (e) { + } + }; + return AppLogger; + }()); + function trimStringToLowerCase(input) { + if (input) { + input = input.replace(/[{}]/g, "").toLowerCase(); + } + return (input || ""); + } + function initialize(context) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + if (appInfo) { + return; + } + appInfo = new AppInfo(); + if (context.get_hostFullVersion()) { + appInfo.hostVersion = context.get_hostFullVersion(); + } + else { + appInfo.hostVersion = context.get_appVersion(); + } + appInfo.appId = canSendAddinId() ? context.get_id() : privateAddinId; + appInfo.marketplaceType = context._marketplaceType; + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage()).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if (appInfo.appInstanceId) { + appInfo.appInstanceId = trimStringToLowerCase(appInfo.appInstanceId); + appInfo.appInstanceId = getCompliantAppInstanceId(context.get_id(), appInfo.appInstanceId); + } + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "0.0.0.0"; + if (context._wacHostEnvironment) { + appInfo.wacHostEnvironment = context._wacHostEnvironment; + } + if (context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) { + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + } + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if (url) { + url = url.split("?")[0].split("#")[0]; + } + appInfo.isMos = isMos(); + appInfo.appURL = ""; + (function getUserIdAndAssetIdFromToken(token, appInfo) { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try { + xmlContent = decodeURIComponent(token); + parser = new DOMParser(); + xmlDoc = parser.parseFromString(xmlContent, "text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if (cidNode && cidNode.nodeValue) { + appInfo.userId = cidNode.nodeValue; + } + else if (oidNode && oidNode.nodeValue) { + appInfo.userId = oidNode.nodeValue; + } + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue; + } + catch (e) { + } + finally { + xmlContent = null; + xmlDoc = null; + parser = null; + } + })(context.get_eToken(), appInfo); + appInfo.sessionId = sessionId; + if (typeof OTel !== "undefined") { + OTel.OTelLogger.initialize(appInfo); + } + (function handleLifecycle() { + var startTime = new Date(); + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function () { + if (document.hasFocus()) { + if (lastFocus == null) { + lastFocus = new Date(); + } + } + else if (lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + }; + var eventList = []; + eventList.push(new Event("focus", adjustFocusTime)); + eventList.push(new Event("blur", adjustFocusTime)); + eventList.push(new Event("focusout", adjustFocusTime)); + eventList.push(new Event("focusin", adjustFocusTime)); + var exitFunction = function () { + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.removeEventListener(window, eventList[i].name, eventList[i].handler); + } + eventList.length = 0; + if (!finished) { + if (document.hasFocus() && lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date()).getTime() - startTime.getTime()), focusTime); + finished = true; + } + }; + eventList.push(new Event("beforeunload", exitFunction)); + eventList.push(new Event("unload", exitFunction)); + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.addEventListener(window, eventList[i].name, eventList[i].handler); + } + adjustFocusTime(); + })(); + OSFAppTelemetry.onAppActivated(); + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() { + if (!appInfo) { + return; + } + (new AppStorage()).enumerateLog(function (id, log) { return (new AppLogger()).LogRawData(log); }, true); + var data = new OSFLog.AppActivatedUsageData(); + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = ""; + data.UserId = ""; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if (appInfo.wacHostEnvironment) { + data.WacHostEnvironment = appInfo.wacHostEnvironment; + } + if (appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) { + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + } + data.IsMOS = appInfo.isMos ? 1 : 0; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) { + var data = new OSFLog.ScriptLoadUsageData(); + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) { + if (!appInfo) { + return; + } + if (!isAllowedHost() || !isAPIUsageEnabledDispId(id, apiType)) { + return; + } + var data = new OSFLog.APIUsageUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCallDone = onCallDone; + ; + function onMethodDone(id, args, msResponseTime, errorType) { + var parameters = null; + if (args) { + if (typeof args == "number") { + parameters = String(args); + } + else if (typeof args === "object") { + for (var index in args) { + if (parameters !== null) { + parameters += ","; + } + else { + parameters = ""; + } + if (typeof args[index] == "number") { + parameters += String(args[index]); + } + } + } + else { + parameters = ""; + } + } + OSF.AppTelemetry.onCallDone("method", id, parameters, msResponseTime, errorType); + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) { + OSF.AppTelemetry.onCallDone("property", -1, propertyName, msResponseTime); + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onCheckWACHost(isWacKnownHost, instanceId, hostType, hostPlatform, wacDomain, isLocalStorageAvailable) { + var data = new OSFLog.CheckWACHostUsageData(); + data.isWacKnownHost = isWacKnownHost; + data.instanceId = instanceId; + data.hostType = hostType; + data.hostPlatform = hostPlatform; + data.isLocalStorageAvailable = isLocalStorageAvailable; + data.wacDomain = ""; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCheckWACHost = onCheckWACHost; + function onEventDone(id, errorType) { + OSF.AppTelemetry.onCallDone("event", id, null, 0, errorType); + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent", id, null, msResponseTime, errorType); + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) { + if (!appInfo) { + return; + } + var data = new OSFLog.AppClosedUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage()).saveLog(sessionId, data.SerializeRow()); + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId); + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) { + var data = new OSFLog.AppInitializationUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) { + doAppInitializationLogging(false, message); + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) { + doAppInitializationLogging(true, errorMessage); + } + OSFAppTelemetry.logAppException = logAppException; + function isAllowedHost() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function isAPIUsageEnabledDispId(dispId, apiType) { + if (apiType === "method") { + switch (dispId) { + case 4: + case 38: + case 37: + case 10: + case 12: + case -10: + return true; + default: + return false; + } + } + return false; + } + function canSendAddinId() { + var isPublic = (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.PublicAddin) != 0; + if (isPublic) { + return isPublic; + } + if (!appInfo) { + return false; + } + var hostPlatform = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + var hostVersion = appInfo.hostVersion; + return _isComplianceExceptedHost(hostPlatform, hostVersion); + } + OSFAppTelemetry.canSendAddinId = canSendAddinId; + function getCompliantAppInstanceId(addinId, appInstanceId) { + if (!canSendAddinId() && appInstanceId === addinId) { + return privateAddinId; + } + return appInstanceId; + } + OSFAppTelemetry.getCompliantAppInstanceId = getCompliantAppInstanceId; + function _isComplianceExceptedHost(hostPlatform, hostVersion) { + var excepted = false; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(hostVersion); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (hostPlatform == "win32") { + if (major < 16 || major == 16 && build < 14225) { + excepted = true; + } + } + else if (hostPlatform == "mac") { + if (major < 16 || (major == 16 && (minor < 52 || minor == 52 && build < 808))) { + excepted = true; + } + } + } + return excepted; + } + OSFAppTelemetry._isComplianceExceptedHost = _isComplianceExceptedHost; + function isMos() { + return (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.IsMos) != 0; + } + OSFAppTelemetry.isMos = isMos; + OSF.AppTelemetry = OSFAppTelemetry; +})(OSFAppTelemetry || (OSFAppTelemetry = {})); +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } + } +}; +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() { + var events = []; + for (var eventName in this._eventHandlers) + events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); + return events; + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) { + for (var eventName in this._eventHandlers) { + if (event == eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event == eventName) + return true; + } + return false; + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) + return true; + } + } + return false; + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._eventHandlers[eventType]; + if (handlers && !this.hasEventHandler(eventType, handler)) { + handlers.push(handler); + return true; + } + else { + return false; + } + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true; + } + return false; + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType, handler); + if (isFirstHandler && succeed) { + this.fireQueuedEvent(eventType); + } + return succeed; + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var index = 0; index < handlers.length; index++) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + return true; + } + } + } + return false; + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { + if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { + this._eventHandlers[eventType] = []; + return true; + } + return false; + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) { + this._objectEventHandlers[eventType][objectId] = []; + return true; + } + return false; + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } + return true; + } + else { + return false; + } + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if (_handlers != null) { + for (var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length == 0) { + queuedEvents.push(eventArgs); + } + else { + this.fireEvent(eventArgs); + } + return true; + } + else { + return false; + } + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length > 0) { + var eventHandler = eventHandlers[0]; + while (queuedEvents.length > 0) { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs); + } + return true; + } + } + return false; + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var queuedEvents = this._queuedEventsArgs[eventType]; + if (queuedEvents) { + this._queuedEventsArgs[eventType] = []; + } + } + } +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { + var args; + switch (eventType) { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties, target.document), eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties, target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" && OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + OSF.DDA.convertOlkAppointmentTimeToDateFormat(args); + } + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecurrenceChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecurrenceChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AttachmentsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAttachmentsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.InfobarClicked: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkInfobarClickedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSelectedItemsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSensitivityLabelChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + return args; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + "types": ["function", "object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [] +}); +OSF.DialogShownStatus = { hasDialogShown: false, isWindowDialog: false }; +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogMessageReceivedEvent: "DialogMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + MessageType: "messageType", + MessageContent: "messageContent", + MessageOrigin: "messageOrigin" +}); +OSF.DDA.DialogEventType = {}; +OSF.OUtil.augmentList(OSF.DDA.DialogEventType, { + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" +}); +OSF.DDA.AsyncMethodNames.addNames({ + DisplayDialogAsync: "displayDialogAsync", + DisplayModalDialogAsync: "displayModalDialogAsync", + CloseAsync: "close" +}); +OSF.DDA.SyncMethodNames.addNames({ + MessageParent: "messageParent", + MessageChild: "messageChild", + SendMessage: "sendMessage", + AddMessageHandler: "addEventHandler" +}); +OSF.DDA.UI.ParentUI = function OSF_DDA_ParentUI() { + var eventDispatch; + if (Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived != null) { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived, + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + ]); + } + else { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived + ]); + } + var target = this; + var defineDialogApi = function (apiName, isModalApi) { + if (!target[apiName]) { + OSF.OUtil.defineEnumerableProperty(target, apiName, { + value: function () { + var openDialog = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments, eventDispatch, target, isModalApi); + } + }); + } + }; + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName, false); + if (Microsoft.Office.WebExtension.FeatureGates["ModalWebDialogAPI"]) { + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName, true); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DDA.UI.ChildUI = function OSF_DDA_ChildUI(isPopupWindow) { + var messageParentName = OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target = this; + if (!target[messageParentName]) { + OSF.OUtil.defineEnumerableProperty(target, messageParentName, { + value: function () { + var messageParent = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments, target); + } + }); + } + var addEventHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if (!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch != "undefined") { + OSF.DDA.DispIdHost.addEventSupport(target, OSF.DialogParentMessageEventDispatch, isPopupWindow); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DialogHandler = function OSF_DialogHandler() { }; +OSF.DDA.DialogEventArgs = function OSF_DDA_DialogEventArgs(message) { + if (message[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogMessageReceived) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); + } + else { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogEventReceived + }, + "error": { + value: message[OSF.DDA.PropertyDescriptors.MessageType] + } + }); + } +}; +OSF.DDA.DialogParentEventArgs = function OSF_DDA_DialogParentEventArgs(message) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); +}; +var DialogApiManager = (function () { + function DialogApiManager() { + } + DialogApiManager.defineApi = function (apiName, supportedOptions) { + var asyncMethodCalls = OSF.DDA.AsyncMethodCalls; + asyncMethodCalls.define({ + method: apiName, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: supportedOptions, + privateStateCallbacks: [], + onSucceeded: function (args, caller, callArgs) { + var targetId = args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch = args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog = new OSF.DialogHandler(); + var closeDialog = OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, closeDialog, { + value: function () { + var closeDialogfunction = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments, targetId, eventDispatch, dialog); + } + }); + var addHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, addHandler, { + value: function () { + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(arguments, dialog, eventDispatch); + var eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType, handler); + } + }); + if (OSF.DDA.UI.EnableSendMessageDialogAPI === true) { + var sendMessage = OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, sendMessage, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var messageChild = OSF.DDA.SyncMethodNames.MessageChild.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, messageChild, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + return dialog; + }, + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs] = true; + } + return callArgs; + } + }); + }; + DialogApiManager.messageChildRichApiBridge = function () { + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, null, null); + } + }; + DialogApiManager.initOnce = function () { + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync, DialogApiManager.displayDialogAsyncApiSupportedOptions); + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync, DialogApiManager.displayModalDialogAsyncApiSupportedOptions); + }; + DialogApiManager.displayDialogAsyncApiSupportedOptions = [ + { + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.EnforceAppDomain, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]; + DialogApiManager.displayModalDialogAsyncApiSupportedOptions = DialogApiManager.displayDialogAsyncApiSupportedOptions.concat([ + { + name: "abortWhenParentIsMinimized", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: "abortWhenDocIsInactive", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]); + return DialogApiManager; +}()); +DialogApiManager.initOnce(); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageToParent, + "types": ["string", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageContent, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.openDialog = function OSF_DDA_SafeArray_Delegate$OpenDialog(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + OSF.ClientHostController.openDialog(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.closeDialog = function OSF_DDA_SafeArray_Delegate$CloseDialog(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.closeDialog(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.messageParent = function OSF_DDA_SafeArray_Delegate$MessageParent(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime = (new Date()).getTime(); + var result = OSF.ClientHostController.messageParent(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), result); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: 1 }, + { name: OSF.DDA.PropertyDescriptors.MessageOrigin, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.sendMessage = function OSF_DDA_SafeArray_Delegate$SendMessage(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime = (new Date()).getTime(); + var result = OSF.ClientHostController.sendMessage(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +Microsoft.Office.WebExtension.TableData = function Microsoft_Office_WebExtension_TableData(rows, headers) { + function fixData(data) { + if (data == null || data == undefined) { + return null; + } + try { + for (var dim = OSF.DDA.DataCoercion.findArrayDimensionality(data, 2); dim < 2; dim++) { + data = [data]; + } + return data; + } + catch (ex) { + } + } + ; + OSF.OUtil.defineEnumerableProperties(this, { + "headers": { + get: function () { return headers; }, + set: function (value) { + headers = fixData(value); + } + }, + "rows": { + get: function () { return rows; }, + set: function (value) { + rows = (value == null || (OSF.OUtil.isArray(value) && (value.length == 0))) ? + [] : + fixData(value); + } + } + }); + this.headers = headers; + this.rows = rows; +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureTableData = function OSF_DDA_OMFactory$manufactureTableData(tableDataProperties) { + return new Microsoft.Office.WebExtension.TableData(tableDataProperties[OSF.DDA.TableDataProperties.TableRows], tableDataProperties[OSF.DDA.TableDataProperties.TableHeaders]); +}; +Microsoft.Office.WebExtension.CoercionType = { + Text: "text", + Matrix: "matrix", + Table: "table" +}; +OSF.DDA.DataCoercion = (function OSF_DDA_DataCoercion() { + return { + findArrayDimensionality: function OSF_DDA_DataCoercion$findArrayDimensionality(obj) { + if (OSF.OUtil.isArray(obj)) { + var dim = 0; + for (var index = 0; index < obj.length; index++) { + dim = Math.max(dim, OSF.DDA.DataCoercion.findArrayDimensionality(obj[index])); + } + return dim + 1; + } + else { + return 0; + } + }, + getCoercionDefaultForBinding: function OSF_DDA_DataCoercion$getCoercionDefaultForBinding(bindingType) { + switch (bindingType) { + case Microsoft.Office.WebExtension.BindingType.Matrix: return Microsoft.Office.WebExtension.CoercionType.Matrix; + case Microsoft.Office.WebExtension.BindingType.Table: return Microsoft.Office.WebExtension.CoercionType.Table; + case Microsoft.Office.WebExtension.BindingType.Text: + default: + return Microsoft.Office.WebExtension.CoercionType.Text; + } + }, + getBindingDefaultForCoercion: function OSF_DDA_DataCoercion$getBindingDefaultForCoercion(coercionType) { + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Matrix: return Microsoft.Office.WebExtension.BindingType.Matrix; + case Microsoft.Office.WebExtension.CoercionType.Table: return Microsoft.Office.WebExtension.BindingType.Table; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + return Microsoft.Office.WebExtension.BindingType.Text; + } + }, + determineCoercionType: function OSF_DDA_DataCoercion$determineCoercionType(data) { + if (data == null || data == undefined) + return null; + var sourceType = null; + var runtimeType = typeof data; + if (data.rows !== undefined) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Table; + } + else if (OSF.OUtil.isArray(data)) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Matrix; + } + else if (runtimeType == "string" || runtimeType == "number" || runtimeType == "boolean" || OSF.OUtil.isDate(data)) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Text; + } + else { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject; + } + return sourceType; + }, + coerceData: function OSF_DDA_DataCoercion$coerceData(data, destinationType, sourceType) { + sourceType = sourceType || OSF.DDA.DataCoercion.determineCoercionType(data); + if (sourceType && sourceType != destinationType) { + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin); + data = OSF.DDA.DataCoercion._coerceDataFromTable(destinationType, OSF.DDA.DataCoercion._coerceDataToTable(data, sourceType)); + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd); + } + return data; + }, + _matrixToText: function OSF_DDA_DataCoercion$_matrixToText(matrix) { + if (matrix.length == 1 && matrix[0].length == 1) + return "" + matrix[0][0]; + var val = ""; + for (var i = 0; i < matrix.length; i++) { + val += matrix[i].join("\t") + "\n"; + } + return val.substring(0, val.length - 1); + }, + _textToMatrix: function OSF_DDA_DataCoercion$_textToMatrix(text) { + var ret = text.split("\n"); + for (var i = 0; i < ret.length; i++) + ret[i] = ret[i].split("\t"); + return ret; + }, + _tableToText: function OSF_DDA_DataCoercion$_tableToText(table) { + var headers = ""; + if (table.headers != null) { + headers = OSF.DDA.DataCoercion._matrixToText([table.headers]) + "\n"; + } + var rows = OSF.DDA.DataCoercion._matrixToText(table.rows); + if (rows == "") { + headers = headers.substring(0, headers.length - 1); + } + return headers + rows; + }, + _tableToMatrix: function OSF_DDA_DataCoercion$_tableToMatrix(table) { + var matrix = table.rows; + if (table.headers != null) { + matrix.unshift(table.headers); + } + return matrix; + }, + _coerceDataFromTable: function OSF_DDA_DataCoercion$_coerceDataFromTable(coercionType, table) { + var value; + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value = table; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value = OSF.DDA.DataCoercion._tableToMatrix(table); + break; + case Microsoft.Office.WebExtension.CoercionType.SlideRange: + value = null; + if (OSF.DDA.OMFactory.manufactureSlideRange) { + value = OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(table)); + } + if (value == null) { + value = OSF.DDA.DataCoercion._tableToText(table); + } + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value = OSF.DDA.DataCoercion._tableToText(table); + break; + } + return value; + }, + _coerceDataToTable: function OSF_DDA_DataCoercion$_coerceDataToTable(data, sourceType) { + if (sourceType == undefined) { + sourceType = OSF.DDA.DataCoercion.determineCoercionType(data); + } + var value; + switch (sourceType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value = data; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value = new Microsoft.Office.WebExtension.TableData(data); + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value = new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(data)); + break; + } + return value; + } + }; +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.CoercionType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.CoercionType.Table, value: 2 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + GetSelectedDataAsync: "getSelectedDataAsync", + SetSelectedDataAsync: "setSelectedDataAsync" +}); +(function () { + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] != undefined || data[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) { + data = OSF.DDA.OMFactory.manufactureTableData(data); + } + data = OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data == undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CoercionType, + "enum": Microsoft.Office.WebExtension.CoercionType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + } + ], + privateStateCallbacks: [], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageLeft, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageTop, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetSelectedDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageLeft, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageTop, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageWidth, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageHeight, value: 5 }, + ] +}); +OSF.DDA.SettingsManager = { + SerializedSettings: "serializedSettings", + RefreshingSettings: "refreshingSettings", + DateJSONPrefix: "Date(", + DataJSONSuffix: ")", + serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { + return OSF.OUtil.serializeSettings(settingsCollection); + }, + deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { + return OSF.OUtil.deserializeSettings(serializedSettings); + } +}; +OSF.DDA.Settings = function OSF_DDA_Settings(settings) { + settings = settings || {}; + var cacheSessionSettings = function (settings) { + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var serializedSettings = OSF.DDA.SettingsManager.serializeSettings(settings); + var storageSettings = JSON ? JSON.stringify(serializedSettings) : Sys.Serialization.JavaScriptSerializer.serialize(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + }; + OSF.OUtil.defineEnumerableProperties(this, { + "get": { + value: function OSF_DDA_Settings$get(name) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + var setting = settings[name]; + return typeof (setting) === 'undefined' ? null : setting; + } + }, + "set": { + value: function OSF_DDA_Settings$set(name, value) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false }, + { name: "value", mayBeNull: true } + ]); + if (e) + throw e; + settings[name] = value; + cacheSessionSettings(settings); + } + }, + "remove": { + value: function OSF_DDA_Settings$remove(name) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete settings[name]; + cacheSessionSettings(settings); + } + } + }); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.SaveAsync], settings); +}; +OSF.DDA.RefreshableSettings = function OSF_DDA_RefreshableSettings(settings) { + OSF.DDA.RefreshableSettings.uber.constructor.call(this, settings); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.RefreshAsync], settings); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged])); +}; +OSF.OUtil.extend(OSF.DDA.RefreshableSettings, OSF.DDA.Settings); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + SettingsChanged: "settingsChanged" +}); +OSF.DDA.SettingsChangedEventArgs = function OSF_DDA_SettingsChangedEventArgs(settingsInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.SettingsChanged + }, + "settings": { + value: settingsInstance + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ + RefreshAsync: "refreshAsync", + SaveAsync: "saveAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RefreshAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.RefreshingSettings, + value: function getRefreshingSettings(settingsInstance, settingsCollection) { + return settingsCollection; + } + } + ], + onSucceeded: function deserializeSettings(serializedSettingsDescriptor, refreshingSettings, refreshingSettingsArgs) { + var serializedSettings = serializedSettingsDescriptor[OSF.DDA.SettingsManager.SerializedSettings]; + var newSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + var oldSettings = refreshingSettingsArgs[OSF.DDA.SettingsManager.RefreshingSettings]; + for (var setting in oldSettings) { + refreshingSettings.remove(setting); + } + for (var setting in newSettings) { + refreshingSettings.set(setting, newSettings[setting]); + } + return refreshingSettings; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SaveAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, + value: { + "types": ["boolean"], + "defaultValue": true + } + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.SerializedSettings, + value: function serializeSettings(settingsInstance, settingsCollection) { + return OSF.DDA.SettingsManager.serializeSettings(settingsCollection); + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidLoadSettingsMethod, + fromHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSaveSettingsMethod, + toHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SettingsManager.SerializedSettings }, + { name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, value: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidSettingsChangedEvent }); +Microsoft.Office.WebExtension.BindingType = { + Table: "table", + Text: "text", + Matrix: "matrix" +}; +OSF.DDA.BindingProperties = { + Id: "BindingId", + Type: Microsoft.Office.WebExtension.Parameters.BindingType +}; +OSF.OUtil.augmentList(OSF.DDA.ListDescriptors, { BindingList: "BindingList" }); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + Subset: "subset", + BindingProperties: "BindingProperties" +}); +OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList, OSF.DDA.PropertyDescriptors.BindingProperties); +OSF.DDA.BindingPromise = function OSF_DDA_BindingPromise(bindingId, errorCallback) { + this._id = bindingId; + OSF.OUtil.defineEnumerableProperty(this, "onFail", { + get: function () { + return errorCallback; + }, + set: function (onError) { + var t = typeof onError; + if (t != "undefined" && t != "function") { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, t); + } + errorCallback = onError; + } + }); +}; +OSF.DDA.BindingPromise.prototype = { + _fetch: function OSF_DDA_BindingPromise$_fetch(onComplete) { + if (this.binding) { + if (onComplete) + onComplete(this.binding); + } + else { + if (!this._binding) { + var me = this; + Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(this._id, function (asyncResult) { + if (asyncResult.status == Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded) { + OSF.OUtil.defineEnumerableProperty(me, "binding", { + value: asyncResult.value + }); + if (onComplete) + onComplete(me.binding); + } + else { + if (me.onFail) + me.onFail(asyncResult); + } + }); + } + } + return this; + }, + getDataAsync: function OSF_DDA_BindingPromise$getDataAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.getDataAsync.apply(binding, args); }); + return this; + }, + setDataAsync: function OSF_DDA_BindingPromise$setDataAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setDataAsync.apply(binding, args); }); + return this; + }, + addHandlerAsync: function OSF_DDA_BindingPromise$addHandlerAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.addHandlerAsync.apply(binding, args); }); + return this; + }, + removeHandlerAsync: function OSF_DDA_BindingPromise$removeHandlerAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.removeHandlerAsync.apply(binding, args); }); + return this; + } +}; +OSF.DDA.BindingFacade = function OSF_DDA_BindingFacade(docInstance) { + this._eventDispatches = []; + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: docInstance + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddFromSelectionAsync, + am.AddFromNamedItemAsync, + am.GetAllAsync, + am.GetByIdAsync, + am.ReleaseByIdAsync + ]); +}; +OSF.DDA.UnknownBinding = function OSF_DDA_UknonwnBinding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { value: docInstance }, + "id": { value: id } + }); +}; +OSF.DDA.Binding = function OSF_DDA_Binding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { + value: docInstance + }, + "id": { + value: id + } + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDataAsync, + am.SetDataAsync + ]); + var et = Microsoft.Office.WebExtension.EventType; + var bindingEventDispatches = docInstance.bindings._eventDispatches; + if (!bindingEventDispatches[id]) { + bindingEventDispatches[id] = new OSF.EventDispatch([ + et.BindingSelectionChanged, + et.BindingDataChanged + ]); + } + var eventDispatch = bindingEventDispatches[id]; + OSF.DDA.DispIdHost.addEventSupport(this, eventDispatch); +}; +OSF.DDA.generateBindingId = function OSF_DDA$GenerateBindingId() { + return "UnnamedBinding_" + OSF.OUtil.getUniqueId() + "_" + new Date().getTime(); +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureBinding = function OSF_DDA_OMFactory$manufactureBinding(bindingProperties, containingDocument) { + var id = bindingProperties[OSF.DDA.BindingProperties.Id]; + var rows = bindingProperties[OSF.DDA.BindingProperties.RowCount]; + var cols = bindingProperties[OSF.DDA.BindingProperties.ColumnCount]; + var hasHeaders = bindingProperties[OSF.DDA.BindingProperties.HasHeaders]; + var binding; + switch (bindingProperties[OSF.DDA.BindingProperties.Type]) { + case Microsoft.Office.WebExtension.BindingType.Text: + binding = new OSF.DDA.TextBinding(id, containingDocument); + break; + case Microsoft.Office.WebExtension.BindingType.Matrix: + binding = new OSF.DDA.MatrixBinding(id, containingDocument, rows, cols); + break; + case Microsoft.Office.WebExtension.BindingType.Table: + var isExcelApp = function () { + return (OSF.DDA.ExcelDocument) + && (Microsoft.Office.WebExtension.context.document) + && (Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument); + }; + var tableBindingObject; + if (isExcelApp() && OSF.DDA.ExcelTableBinding) { + tableBindingObject = OSF.DDA.ExcelTableBinding; + } + else { + tableBindingObject = OSF.DDA.TableBinding; + } + binding = new tableBindingObject(id, containingDocument, rows, cols, hasHeaders); + break; + default: + binding = new OSF.DDA.UnknownBinding(id, containingDocument); + } + return binding; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddFromSelectionAsync: "addFromSelectionAsync", + AddFromNamedItemAsync: "addFromNamedItemAsync", + GetAllAsync: "getAllAsync", + GetByIdAsync: "getByIdAsync", + ReleaseByIdAsync: "releaseByIdAsync", + GetDataAsync: "getDataAsync", + SetDataAsync: "setDataAsync" +}); +(function () { + function processBinding(bindingDescriptor) { + return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); + } + function getObjectId(obj) { return obj.id; } + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] != undefined || data[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) { + data = OSF.DDA.OMFactory.manufactureTableData(data); + } + data = OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data == undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromSelectionAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.ItemName, + "types": ["string"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, + value: function () { return true; } + } + ], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAllAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response) { return OSF.OUtil.mapList(response[OSF.DDA.ListDescriptors.BindingList], processBinding); } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response, caller, callArgs) { + var id = callArgs[Microsoft.Office.WebExtension.Parameters.Id]; + delete caller._eventDispatches[id]; + } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDataAsync, + requiredArguments: [], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs, binding) { return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(binding.type); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RowCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ColumnCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount] == 0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.RowCount]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] || + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] || + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.MatrixBinding = function OSF_DDA_MatrixBinding(id, docInstance, rows, cols) { + OSF.DDA.MatrixBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Matrix + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + } + }); +}; +OSF.OUtil.extend(OSF.DDA.MatrixBinding, OSF.DDA.Binding); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.BindingProperties, + fromHost: [ + { name: OSF.DDA.BindingProperties.Id, value: 0 }, + { name: OSF.DDA.BindingProperties.Type, value: 1 }, + { name: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.BindingType, + toHost: [ + { name: Microsoft.Office.WebExtension.BindingType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.BindingType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.BindingType.Table, value: 2 } + ], + invertible: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ItemName, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseBindingMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAllBindingsMethod, + fromHost: [ + { name: OSF.DDA.ListDescriptors.BindingList, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 3 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 4 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, + fromHost: [ + { name: OSF.DDA.BindingProperties.RowCount, value: 0 }, + { name: OSF.DDA.BindingProperties.ColumnCount, value: 1 }, + { name: OSF.DDA.BindingProperties.HasHeaders, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.Subset, + toHost: [ + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 0 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Run, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Offset, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Run, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.RowCount, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ColumnCount, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddColumnsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearAllRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { TableDataProperties: "TableDataProperties" }); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.TableDataProperties = { + TableRows: "TableRows", + TableHeaders: "TableHeaders" +}; +OSF.DDA.TableBinding = function OSF_DDA_TableBinding(id, docInstance, rows, cols, hasHeaders) { + OSF.DDA.TableBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Table + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + }, + "hasHeaders": { + value: hasHeaders ? hasHeaders : false + } + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddRowsAsync, + am.AddColumnsAsync, + am.DeleteAllDataValuesAsync + ]); +}; +OSF.OUtil.extend(OSF.DDA.TableBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ + AddRowsAsync: "addRowsAsync", + AddColumnsAsync: "addColumnsAsync", + DeleteAllDataValuesAsync: "deleteAllDataValuesAsync" +}); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddRowsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddColumnsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.DDA.TextBinding = function OSF_DDA_TextBinding(id, docInstance) { + OSF.DDA.TextBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperty(this, "type", { + value: Microsoft.Office.WebExtension.BindingType.Text + }); +}; +OSF.OUtil.extend(OSF.DDA.TextBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ AddFromPromptAsync: "addFromPromptAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromPromptAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptText, + value: { + "types": ["string"], + "calculate": function () { return Strings.OfficeOM.L_AddBindingFromPromptDefaultText; } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.SampleData, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: function (bindingDescriptor) { return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.PromptText, value: 2 } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DocumentSelectionChanged: "documentSelectionChanged" }); +OSF.DDA.DocumentSelectionChangedEventArgs = function OSF_DDA_DocumentSelectionChangedEventArgs(docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged + }, + "document": { + value: docInstance + } + }); +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs = function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDeletedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDataChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidContentControlAddedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + BindingSelectionChanged: "bindingSelectionChanged", + BindingDataChanged: "bindingDataChanged" +}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { BindingSelectionChangedEvent: "BindingSelectionChangedEvent" }); +OSF.DDA.BindingSelectionChangedEventArgs = function OSF_DDA_BindingSelectionChangedEventArgs(bindingInstance, subset) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingSelectionChanged + }, + "binding": { + value: bindingInstance + } + }); + for (var prop in subset) { + OSF.OUtil.defineEnumerableProperty(this, prop, { + value: subset[prop] + }); + } +}; +OSF.DDA.BindingDataChangedEventArgs = function OSF_DDA_BindingDataChangedEventArgs(bindingInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingDataChanged + }, + "binding": { + value: bindingInstance + } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingDataChangedEvent, + fromHost: [{ name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self }] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType, { OnlyVisible: "onlyVisible" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [{ name: Microsoft.Office.WebExtension.FilterType.OnlyVisible, value: 1 }] +}); +Microsoft.Office.WebExtension.GoToType = { + Binding: "binding", + NamedItem: "namedItem", + Slide: "slide", + Index: "index" +}; +Microsoft.Office.WebExtension.SelectionMode = { + Default: "default", + Selected: "selected", + None: "none" +}; +Microsoft.Office.WebExtension.Index = { + First: "first", + Last: "last", + Next: "next", + Previous: "previous" +}; +OSF.DDA.AsyncMethodNames.addNames({ GoToByIdAsync: "goToByIdAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GoToByIdAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string", "number"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.GoToType, + "enum": Microsoft.Office.WebExtension.GoToType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SelectionMode, + value: { + "enum": Microsoft.Office.WebExtension.SelectionMode, + "defaultValue": Microsoft.Office.WebExtension.SelectionMode.Default + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.GoToType, + toHost: [ + { name: Microsoft.Office.WebExtension.GoToType.Binding, value: 0 }, + { name: Microsoft.Office.WebExtension.GoToType.NamedItem, value: 1 }, + { name: Microsoft.Office.WebExtension.GoToType.Slide, value: 2 }, + { name: Microsoft.Office.WebExtension.GoToType.Index, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.SelectionMode, + toHost: [ + { name: Microsoft.Office.WebExtension.SelectionMode.Default, value: 0 }, + { name: Microsoft.Office.WebExtension.SelectionMode.Selected, value: 1 }, + { name: Microsoft.Office.WebExtension.SelectionMode.None, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidNavigateToMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.GoToType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.SelectionMode, value: 2 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync, + requiredArguments: [ + { + name: Microsoft.Office.WebExtension.Parameters.Data, + types: ["object"] + } + ], + supportedOptions: [] +}); +OSF.OUtil.setNamespace("RichApi", OSF.DDA); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.FilePropertiesDescriptor = { + Url: "Url" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FilePropertiesDescriptor: "FilePropertiesDescriptor" +}); +Microsoft.Office.WebExtension.FileProperties = function Microsoft_Office_WebExtension_FileProperties(filePropertiesDescriptor) { + OSF.OUtil.defineEnumerableProperties(this, { + "url": { + value: filePropertiesDescriptor[OSF.DDA.FilePropertiesDescriptor.Url] + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ GetFilePropertiesAsync: "getFilePropertiesAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: 0 } + ], + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (filePropertiesDescriptor, caller, callArgs) { + return new Microsoft.Office.WebExtension.FileProperties(filePropertiesDescriptor); + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, + fromHost: [ + { name: OSF.DDA.FilePropertiesDescriptor.Url, value: 0 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.ExcelTableBinding = function OSF_DDA_ExcelTableBinding(id, docInstance, rows, cols, hasHeaders) { + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.ClearFormatsAsync, + am.SetTableOptionsAsync, + am.SetFormatsAsync + ]); + OSF.DDA.ExcelTableBinding.uber.constructor.call(this, id, docInstance, rows, cols, hasHeaders); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelTableBinding, OSF.DDA.TableBinding); +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + privateStateCallbacks: [] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var Parameters = Microsoft.Office.WebExtension.Parameters; + if (callArgs[Parameters.StartRow] == 0 && + callArgs[Parameters.StartColumn] == 0 && + OSF.OUtil.isArray(callArgs[Parameters.CellFormat]) && callArgs[Parameters.CellFormat].length === 0 && + OSF.OUtil.isArray(callArgs[Parameters.TableOptions]) && callArgs[Parameters.TableOptions].length === 0) { + delete callArgs[Parameters.StartRow]; + delete callArgs[Parameters.StartColumn]; + delete callArgs[Parameters.CellFormat]; + delete callArgs[Parameters.TableOptions]; + } + if (callArgs[Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + ((callArgs[Parameters.StartRow] && callArgs[Parameters.StartRow] != 0) || + (callArgs[Parameters.StartColumn] && callArgs[Parameters.StartColumn] != 0) || + callArgs[Parameters.CellFormat] || + callArgs[Parameters.TableOptions])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: function (obj) { return obj.id; } + } + ] + }); + OSF.DDA.BindingPromise.prototype.setTableOptionsAsync = function OSF_DDA_BindingPromise$setTableOptionsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setTableOptionsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.setFormatsAsync = function OSF_DDA_BindingPromise$setFormatsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setFormatsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.clearFormatsAsync = function OSF_DDA_BindingPromise$clearFormatsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.clearFormatsAsync.apply(binding, args); }); + return this; + }; +})(); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodNames.addNames({ + ClearFormatsAsync: "clearFormatsAsync", + SetTableOptionsAsync: "setTableOptionsAsync", + SetFormatsAsync: "setFormatsAsync" + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ClearFormatsAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetTableOptionsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.TableOptions, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetFormatsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CellFormat, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +Microsoft.Office.WebExtension.Table = { + All: 0, + Data: 1, + Headers: 2 +}; +(function () { + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetTableOptionsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 3 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 5 } + ] + }); + var tableOptionProperties = { + headerRow: 0, + bandedRows: 1, + firstColumn: 2, + lastColumn: 3, + bandedColumns: 4, + filterButton: 5, + style: 6, + totalRow: 7 + }; + var cellProperties = { + row: 0, + column: 1 + }; + var formatProperties = { + alignHorizontal: { text: "alignHorizontal", type: 1 }, + alignVertical: { text: "alignVertical", type: 2 }, + backgroundColor: { text: "backgroundColor", type: 101 }, + borderStyle: { text: "borderStyle", type: 201 }, + borderColor: { text: "borderColor", type: 202 }, + borderTopStyle: { text: "borderTopStyle", type: 203 }, + borderTopColor: { text: "borderTopColor", type: 204 }, + borderBottomStyle: { text: "borderBottomStyle", type: 205 }, + borderBottomColor: { text: "borderBottomColor", type: 206 }, + borderLeftStyle: { text: "borderLeftStyle", type: 207 }, + borderLeftColor: { text: "borderLeftColor", type: 208 }, + borderRightStyle: { text: "borderRightStyle", type: 209 }, + borderRightColor: { text: "borderRightColor", type: 210 }, + borderOutlineStyle: { text: "borderOutlineStyle", type: 211 }, + borderOutlineColor: { text: "borderOutlineColor", type: 212 }, + borderInlineStyle: { text: "borderInlineStyle", type: 213 }, + borderInlineColor: { text: "borderInlineColor", type: 214 }, + fontFamily: { text: "fontFamily", type: 301 }, + fontStyle: { text: "fontStyle", type: 302 }, + fontSize: { text: "fontSize", type: 303 }, + fontUnderlineStyle: { text: "fontUnderlineStyle", type: 304 }, + fontColor: { text: "fontColor", type: 305 }, + fontDirection: { text: "fontDirection", type: 306 }, + fontStrikethrough: { text: "fontStrikethrough", type: 307 }, + fontSuperscript: { text: "fontSuperscript", type: 308 }, + fontSubscript: { text: "fontSubscript", type: 309 }, + fontNormal: { text: "fontNormal", type: 310 }, + indentLeft: { text: "indentLeft", type: 401 }, + indentRight: { text: "indentRight", type: 402 }, + numberFormat: { text: "numberFormat", type: 501 }, + width: { text: "width", type: 701 }, + height: { text: "height", type: 702 }, + wrapping: { text: "wrapping", type: 703 } + }; + var borderStyleSet = [ + { name: "none", value: 0 }, + { name: "thin", value: 1 }, + { name: "medium", value: 2 }, + { name: "dashed", value: 3 }, + { name: "dotted", value: 4 }, + { name: "thick", value: 5 }, + { name: "double", value: 6 }, + { name: "hair", value: 7 }, + { name: "medium dashed", value: 8 }, + { name: "dash dot", value: 9 }, + { name: "medium dash dot", value: 10 }, + { name: "dash dot dot", value: 11 }, + { name: "medium dash dot dot", value: 12 }, + { name: "slant dash dot", value: 13 }, + ]; + var colorSet = [ + { name: "none", value: 0 }, + { name: "black", value: 1 }, + { name: "blue", value: 2 }, + { name: "gray", value: 3 }, + { name: "green", value: 4 }, + { name: "orange", value: 5 }, + { name: "pink", value: 6 }, + { name: "purple", value: 7 }, + { name: "red", value: 8 }, + { name: "teal", value: 9 }, + { name: "turquoise", value: 10 }, + { name: "violet", value: 11 }, + { name: "white", value: 12 }, + { name: "yellow", value: 13 }, + { name: "automatic", value: 14 }, + ]; + var ns = OSF.DDA.SafeArray.Delegate.ParameterMap; + ns.define({ + type: formatProperties.alignHorizontal.text, + toHost: [ + { name: "general", value: 0 }, + { name: "left", value: 1 }, + { name: "center", value: 2 }, + { name: "right", value: 3 }, + { name: "fill", value: 4 }, + { name: "justify", value: 5 }, + { name: "center across selection", value: 6 }, + { name: "distributed", value: 7 }, + ] + }); + ns.define({ + type: formatProperties.alignVertical.text, + toHost: [ + { name: "top", value: 0 }, + { name: "center", value: 1 }, + { name: "bottom", value: 2 }, + { name: "justify", value: 3 }, + { name: "distributed", value: 4 }, + ] + }); + ns.define({ + type: formatProperties.backgroundColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderTopStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderTopColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderBottomStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderBottomColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderLeftStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderLeftColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderRightStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderRightColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderOutlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderOutlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderInlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderInlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontStyle.text, + toHost: [ + { name: "regular", value: 0 }, + { name: "italic", value: 1 }, + { name: "bold", value: 2 }, + { name: "bold italic", value: 3 }, + ] + }); + ns.define({ + type: formatProperties.fontUnderlineStyle.text, + toHost: [ + { name: "none", value: 0 }, + { name: "single", value: 1 }, + { name: "double", value: 2 }, + { name: "single accounting", value: 3 }, + { name: "double accounting", value: 4 }, + ] + }); + ns.define({ + type: formatProperties.fontColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontDirection.text, + toHost: [ + { name: "context", value: 0 }, + { name: "left-to-right", value: 1 }, + { name: "right-to-left", value: 2 }, + ] + }); + ns.define({ + type: formatProperties.width.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] + }); + ns.define({ + type: formatProperties.height.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] + }); + ns.define({ + type: Microsoft.Office.WebExtension.Parameters.TableOptions, + toHost: [ + { name: "headerRow", value: 0 }, + { name: "bandedRows", value: 1 }, + { name: "firstColumn", value: 2 }, + { name: "lastColumn", value: 3 }, + { name: "bandedColumns", value: 4 }, + { name: "filterButton", value: 5 }, + { name: "style", value: 6 }, + { name: "totalRow", value: 7 } + ] + }); + ns.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat] = { + toHost: function (data) { + for (var entry in data) { + if (data[entry].format) { + data[entry].format = ns.doMapValues(data[entry].format, "toHost"); + } + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$toHost(cellFormats) { + var textCells = "cells"; + var textFormat = "format"; + var posCells = 0; + var posFormat = 1; + var ret = []; + for (var index in cellFormats) { + var cfOld = cellFormats[index]; + var cfNew = []; + if (typeof (cfOld[textCells]) !== 'undefined') { + var cellsOld = cfOld[textCells]; + var cellsNew; + if (typeof cfOld[textCells] === "object") { + cellsNew = []; + for (var entry in cellsOld) { + if (typeof (cellProperties[entry]) !== 'undefined') { + cellsNew[cellProperties[entry]] = cellsOld[entry]; + } + } + } + else { + cellsNew = cellsOld; + } + cfNew[posCells] = cellsNew; + } + if (cfOld[textFormat]) { + var formatOld = cfOld[textFormat]; + var formatNew = []; + for (var entry2 in formatOld) { + if (typeof (formatProperties[entry2]) !== 'undefined') { + formatNew.push([ + formatProperties[entry2].type, + formatOld[entry2] + ]); + } + } + cfNew[posFormat] = formatNew; + } + ret[index] = cfNew; + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$fromHost(hostArgs) { + return hostArgs; + } + }); + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$toHost(tableOptions) { + var ret = []; + for (var entry in tableOptions) { + if (typeof (tableOptionProperties[entry]) !== 'undefined') { + ret[tableOptionProperties[entry]] = tableOptions[entry]; + } + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$fromHost(hostArgs) { + return hostArgs; + } + }); +})(); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType, { Image: "image" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType, { XmlSvg: "xmlSvg" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Image, value: 8 }, + { name: Microsoft.Office.WebExtension.CoercionType.XmlSvg, value: 9 } + ] +}); +OSF.DDA.ExcelDocument = function OSF_DDA_ExcelDocument(officeAppContext, settings) { + var bf = new OSF.DDA.BindingFacade(this); + OSF.DDA.DispIdHost.addAsyncMethods(bf, [OSF.DDA.AsyncMethodNames.AddFromPromptAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GoToByIdAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]); + OSF.DDA.ExcelDocument.uber.constructor.call(this, officeAppContext, bf, settings); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelDocument, OSF.DDA.JsomDocument); +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + appContext.doc = new OSF.DDA.ExcelDocument(appContext, this._initializeSettings(appContext, false)); + OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + appReady(); +}; +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["number", "object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["number", "object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExtension; +(function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire = function () { + return null; + }(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + var PromiseImpl; + (function (PromiseImpl) { + function Init() { + return (function () { + "use strict"; + function lib$es6$promise$utils$$objectOrFunction(x) { + return typeof x === 'function' || (typeof x === 'object' && x !== null); + } + function lib$es6$promise$utils$$isFunction(x) { + return typeof x === 'function'; + } + function lib$es6$promise$utils$$isMaybeThenable(x) { + return typeof x === 'object' && x !== null; + } + var lib$es6$promise$utils$$_isArray; + if (!Array.isArray) { + lib$es6$promise$utils$$_isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; + } + else { + lib$es6$promise$utils$$_isArray = Array.isArray; + } + var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray; + var lib$es6$promise$asap$$len = 0; + var lib$es6$promise$asap$$toString = {}.toString; + var lib$es6$promise$asap$$vertxNext; + var lib$es6$promise$asap$$customSchedulerFn; + var lib$es6$promise$asap$$asap = function asap(callback, arg) { + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback; + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg; + lib$es6$promise$asap$$len += 2; + if (lib$es6$promise$asap$$len === 2) { + if (lib$es6$promise$asap$$customSchedulerFn) { + lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush); + } + else { + lib$es6$promise$asap$$scheduleFlush(); + } + } + }; + function lib$es6$promise$asap$$setScheduler(scheduleFn) { + lib$es6$promise$asap$$customSchedulerFn = scheduleFn; + } + function lib$es6$promise$asap$$setAsap(asapFn) { + lib$es6$promise$asap$$asap = asapFn; + } + var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined; + var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {}; + var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver; + var lib$es6$promise$asap$$isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && + typeof importScripts !== 'undefined' && + typeof MessageChannel !== 'undefined'; + function lib$es6$promise$asap$$useNextTick() { + var nextTick = process.nextTick; + var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); + if (Array.isArray(version) && version[1] === '0' && version[2] === '10') { + nextTick = window.setImmediate; + } + return function () { + nextTick(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useVertxTimer() { + return function () { + lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useMutationObserver() { + var iterations = 0; + var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + return function () { + node.data = (iterations = ++iterations % 2); + }; + } + function lib$es6$promise$asap$$useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = lib$es6$promise$asap$$flush; + return function () { + channel.port2.postMessage(0); + }; + } + function lib$es6$promise$asap$$useSetTimeout() { + return function () { + setTimeout(lib$es6$promise$asap$$flush, 1); + }; + } + var lib$es6$promise$asap$$queue = new Array(1000); + function lib$es6$promise$asap$$flush() { + for (var i = 0; i < lib$es6$promise$asap$$len; i += 2) { + var callback = lib$es6$promise$asap$$queue[i]; + var arg = lib$es6$promise$asap$$queue[i + 1]; + callback(arg); + lib$es6$promise$asap$$queue[i] = undefined; + lib$es6$promise$asap$$queue[i + 1] = undefined; + } + lib$es6$promise$asap$$len = 0; + } + var lib$es6$promise$asap$$scheduleFlush; + if (lib$es6$promise$asap$$isNode) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick(); + } + else if (lib$es6$promise$asap$$isWorker) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel(); + } + else { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout(); + } + function lib$es6$promise$$internal$$noop() { } + var lib$es6$promise$$internal$$PENDING = void 0; + var lib$es6$promise$$internal$$FULFILLED = 1; + var lib$es6$promise$$internal$$REJECTED = 2; + var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$selfFullfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function lib$es6$promise$$internal$$cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); + } + function lib$es6$promise$$internal$$getThen(promise) { + try { + return promise.then; + } + catch (error) { + lib$es6$promise$$internal$$GET_THEN_ERROR.error = error; + return lib$es6$promise$$internal$$GET_THEN_ERROR; + } + } + function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } + catch (e) { + return e; + } + } + function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) { + lib$es6$promise$asap$$asap(function (promise) { + var sealed = false; + var error = lib$es6$promise$$internal$$tryThen(then, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + lib$es6$promise$$internal$$reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + if (!sealed && error) { + sealed = true; + lib$es6$promise$$internal$$reject(promise, error); + } + }, promise); + } + function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) { + if (thenable._state === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, thenable._result); + } + else if (thenable._state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, thenable._result); + } + else { + lib$es6$promise$$internal$$subscribe(thenable, undefined, function (value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function (reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + } + function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable) { + if (maybeThenable.constructor === promise.constructor) { + lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable); + } + else { + var then = lib$es6$promise$$internal$$getThen(maybeThenable); + if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error); + } + else if (then === undefined) { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + else if (lib$es6$promise$utils$$isFunction(then)) { + lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then); + } + else { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + } + } + function lib$es6$promise$$internal$$resolve(promise, value) { + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFullfillment()); + } + else if (lib$es6$promise$utils$$objectOrFunction(value)) { + lib$es6$promise$$internal$$handleMaybeThenable(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + } + function lib$es6$promise$$internal$$publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + lib$es6$promise$$internal$$publish(promise); + } + function lib$es6$promise$$internal$$fulfill(promise, value) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._result = value; + promise._state = lib$es6$promise$$internal$$FULFILLED; + if (promise._subscribers.length !== 0) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise); + } + } + function lib$es6$promise$$internal$$reject(promise, reason) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._state = lib$es6$promise$$internal$$REJECTED; + promise._result = reason; + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise); + } + function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) { + var subscribers = parent._subscribers; + var length = subscribers.length; + parent._onerror = null; + subscribers[length] = child; + subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment; + subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection; + if (length === 0 && parent._state) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent); + } + } + function lib$es6$promise$$internal$$publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + if (subscribers.length === 0) { + return; + } + var child, callback, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + if (child) { + lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail); + } + else { + callback(detail); + } + } + promise._subscribers.length = 0; + } + function lib$es6$promise$$internal$$ErrorObject() { + this.error = null; + } + var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$tryCatch(callback, detail) { + try { + return callback(detail); + } + catch (e) { + lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e; + return lib$es6$promise$$internal$$TRY_CATCH_ERROR; + } + } + function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) { + var hasCallback = lib$es6$promise$utils$$isFunction(callback), value, error, succeeded, failed; + if (hasCallback) { + value = lib$es6$promise$$internal$$tryCatch(callback, detail); + if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value = null; + } + else { + succeeded = true; + } + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn()); + return; + } + } + else { + value = detail; + succeeded = true; + } + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + } + else if (hasCallback && succeeded) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else if (failed) { + lib$es6$promise$$internal$$reject(promise, error); + } + else if (settled === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, value); + } + else if (settled === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + } + function lib$es6$promise$$internal$$initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function rejectPromise(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + catch (e) { + lib$es6$promise$$internal$$reject(promise, e); + } + } + function lib$es6$promise$enumerator$$Enumerator(Constructor, input) { + var enumerator = this; + enumerator._instanceConstructor = Constructor; + enumerator.promise = new Constructor(lib$es6$promise$$internal$$noop); + if (enumerator._validateInput(input)) { + enumerator._input = input; + enumerator.length = input.length; + enumerator._remaining = input.length; + enumerator._init(); + if (enumerator.length === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + else { + enumerator.length = enumerator.length || 0; + enumerator._enumerate(); + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + } + } + else { + lib$es6$promise$$internal$$reject(enumerator.promise, enumerator._validationError()); + } + } + lib$es6$promise$enumerator$$Enumerator.prototype._validateInput = function (input) { + return lib$es6$promise$utils$$isArray(input); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._validationError = function () { + return new _Internal.Error('Array Methods must be provided an Array'); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._init = function () { + this._result = new Array(this.length); + }; + var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator; + lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function () { + var enumerator = this; + var length = enumerator.length; + var promise = enumerator.promise; + var input = enumerator._input; + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + enumerator._eachEntry(input[i], i); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function (entry, i) { + var enumerator = this; + var c = enumerator._instanceConstructor; + if (lib$es6$promise$utils$$isMaybeThenable(entry)) { + if (entry.constructor === c && entry._state !== lib$es6$promise$$internal$$PENDING) { + entry._onerror = null; + enumerator._settledAt(entry._state, i, entry._result); + } + else { + enumerator._willSettleAt(c.resolve(entry), i); + } + } + else { + enumerator._remaining--; + enumerator._result[i] = entry; + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function (state, i, value) { + var enumerator = this; + var promise = enumerator.promise; + if (promise._state === lib$es6$promise$$internal$$PENDING) { + enumerator._remaining--; + if (state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + else { + enumerator._result[i] = value; + } + } + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(promise, enumerator._result); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function (promise, i) { + var enumerator = this; + lib$es6$promise$$internal$$subscribe(promise, undefined, function (value) { + enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value); + }, function (reason) { + enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason); + }); + }; + function lib$es6$promise$promise$all$$all(entries) { + return new lib$es6$promise$enumerator$$default(this, entries).promise; + } + var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all; + function lib$es6$promise$promise$race$$race(entries) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + if (!lib$es6$promise$utils$$isArray(entries)) { + lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.')); + return promise; + } + var length = entries.length; + function onFulfillment(value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + function onRejection(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + } + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); + } + return promise; + } + var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race; + function lib$es6$promise$promise$resolve$$resolve(object) { + var Constructor = this; + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$resolve(promise, object); + return promise; + } + var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve; + function lib$es6$promise$promise$reject$$reject(reason) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$reject(promise, reason); + return promise; + } + var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject; + var lib$es6$promise$promise$$counter = 0; + function lib$es6$promise$promise$$needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); + } + function lib$es6$promise$promise$$needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise; + function lib$es6$promise$promise$$Promise(resolver) { + this._id = lib$es6$promise$promise$$counter++; + this._state = undefined; + this._result = undefined; + this._subscribers = []; + if (lib$es6$promise$$internal$$noop !== resolver) { + if (!lib$es6$promise$utils$$isFunction(resolver)) { + lib$es6$promise$promise$$needsResolver(); + } + if (!(this instanceof lib$es6$promise$promise$$Promise)) { + lib$es6$promise$promise$$needsNew(); + } + lib$es6$promise$$internal$$initializePromise(this, resolver); + } + } + lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default; + lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default; + lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default; + lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default; + lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler; + lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap; + lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap; + lib$es6$promise$promise$$Promise.prototype = { + constructor: lib$es6$promise$promise$$Promise, + then: function (onFulfillment, onRejection) { + var parent = this; + var state = parent._state; + if (state === lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state === lib$es6$promise$$internal$$REJECTED && !onRejection) { + return this; + } + var child = new this.constructor(lib$es6$promise$$internal$$noop); + var result = parent._result; + if (state) { + var callback = arguments[state - 1]; + lib$es6$promise$asap$$asap(function () { + lib$es6$promise$$internal$$invokeCallback(state, child, callback, result); + }); + } + else { + lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection); + } + return child; + }, + 'catch': function (onRejection) { + return this.then(null, onRejection); + } + }; + return lib$es6$promise$promise$$default; + }).call(this); + } + PromiseImpl.Init = Init; + })(PromiseImpl = _Internal.PromiseImpl || (_Internal.PromiseImpl = {})); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + function isEdgeLessThan14() { + var userAgent = window.navigator.userAgent; + var versionIdx = userAgent.indexOf("Edge/"); + if (versionIdx >= 0) { + userAgent = userAgent.substring(versionIdx + 5, userAgent.length); + if (userAgent < "14.14393") + return true; + else + return false; + } + return false; + } + function determinePromise() { + if (typeof (window) === "undefined" && typeof (Promise) === "function") { + return Promise; + } + if (typeof (window) !== "undefined" && window.Promise) { + if (isEdgeLessThan14()) { + return _Internal.PromiseImpl.Init(); + } + else { + return window.Promise; + } + } + else { + return _Internal.PromiseImpl.Init(); + } + } + _Internal.OfficePromise = determinePromise(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + var OfficePromise = _Internal.OfficePromise; + OfficeExtension.Promise = OfficePromise; +})(OfficeExtension || (OfficeExtension = {})); +var OfficeExtension; +(function (OfficeExtension_1) { + var SessionBase = (function () { + function SessionBase() { + } + SessionBase.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + SessionBase.prototype._createRequestExecutorOrNull = function () { + return null; + }; + SessionBase.prototype.getEventRegistration = function (controlId) { + return null; + }; + return SessionBase; + }()); + OfficeExtension_1.SessionBase = SessionBase; + var HttpUtility = (function () { + function HttpUtility() { + } + HttpUtility.setCustomSendRequestFunc = function (func) { + HttpUtility.s_customSendRequestFunc = func; + }; + HttpUtility.xhrSendRequestFunc = function (request) { + return CoreUtility.createPromise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open(request.method, request.url); + xhr.onload = function () { + var resp = { + statusCode: xhr.status, + headers: CoreUtility._parseHttpResponseHeaders(xhr.getAllResponseHeaders()), + body: xhr.responseText + }; + resolve(resp); + }; + xhr.onerror = function () { + reject(new _Internal.RuntimeError({ + code: CoreErrorCodes.connectionFailure, + httpStatusCode: xhr.status, + message: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, xhr.statusText) + })); + }; + if (request.headers) { + for (var key in request.headers) { + xhr.setRequestHeader(key, request.headers[key]); + } + } + xhr.send(CoreUtility._getRequestBodyText(request)); + }); + }; + HttpUtility.fetchSendRequestFunc = function (request) { + var requestBodyText = CoreUtility._getRequestBodyText(request); + if (requestBodyText === '') { + requestBodyText = undefined; + } + return fetch(request.url, { + method: request.method, + headers: request.headers, + body: requestBodyText + }) + .then(function (resp) { + return resp.text() + .then(function (body) { + var statusCode = resp.status; + var headers = {}; + resp.headers.forEach(function (value, name) { + headers[name] = value; + }); + var ret = { statusCode: statusCode, headers: headers, body: body }; + return ret; + }); + }); + }; + HttpUtility.sendRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func = HttpUtility.s_customSendRequestFunc; + if (!func) { + if (typeof (fetch) !== 'undefined') { + func = HttpUtility.fetchSendRequestFunc; + } + else { + func = HttpUtility.xhrSendRequestFunc; + } + } + return func(request); + }; + HttpUtility.setCustomSendLocalDocumentRequestFunc = function (func) { + HttpUtility.s_customSendLocalDocumentRequestFunc = func; + }; + HttpUtility.sendLocalDocumentRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func; + func = HttpUtility.s_customSendLocalDocumentRequestFunc || HttpUtility.officeJsSendLocalDocumentRequestFunc; + return func(request); + }; + HttpUtility.officeJsSendLocalDocumentRequestFunc = function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestSafeArray = CoreUtility._buildRequestMessageSafeArray(request); + return CoreUtility.createPromise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { + var response; + if (asyncResult.status == 'succeeded') { + response = { + statusCode: RichApiMessageUtility.getResponseStatusCode(asyncResult), + headers: RichApiMessageUtility.getResponseHeaders(asyncResult), + body: RichApiMessageUtility.getResponseBody(asyncResult) + }; + } + else { + response = RichApiMessageUtility.buildHttpResponseFromOfficeJsError(asyncResult.error.code, asyncResult.error.message); + } + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(response)); + resolve(response); + }); + }); + }; + HttpUtility.validateAndNormalizeRequest = function (request) { + if (CoreUtility.isNullOrUndefined(request)) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + if (CoreUtility.isNullOrEmptyString(request.method)) { + request.method = 'GET'; + } + request.method = request.method.toUpperCase(); + var alreadyHasTestName = false; + if (typeof (request.headers) === 'object' && request.headers[CoreConstants.testRequestNameHeader]) { + alreadyHasTestName = true; + } + if (!alreadyHasTestName) { + var currentTestName = TestUtility._getCurrentTestNameWithSequenceId(); + if (currentTestName) { + if (!request.headers) { + request.headers = {}; + } + request.headers[CoreConstants.testRequestNameHeader] = currentTestName; + } + } + }; + HttpUtility.logRequest = function (request) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Request---'); + CoreUtility.log(request.method + ' ' + request.url); + if (request.headers) { + for (var key in request.headers) { + CoreUtility.log(key + ': ' + request.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(CoreUtility._getRequestBodyText(request)); + } + } + }; + HttpUtility.logResponse = function (response) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Response---'); + CoreUtility.log('' + response.statusCode); + if (response.headers) { + for (var key in response.headers) { + CoreUtility.log(key + ': ' + response.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(response.body); + } + } + }; + HttpUtility._logBodyEnabled = false; + return HttpUtility; + }()); + OfficeExtension_1.HttpUtility = HttpUtility; + var HostBridge = (function () { + function HostBridge(m_bridge) { + var _this = this; + this.m_bridge = m_bridge; + this.m_promiseResolver = {}; + this.m_handlers = []; + this.m_bridge.onMessageFromHost = function (messageText) { + var message = JSON.parse(messageText); + if (message.type == 3) { + var genericMessageBody = message.message; + if (genericMessageBody && genericMessageBody.entries) { + for (var i = 0; i < genericMessageBody.entries.length; i++) { + var entryObjectOrArray = genericMessageBody.entries[i]; + if (Array.isArray(entryObjectOrArray)) { + var entry = { + messageCategory: entryObjectOrArray[0], + messageType: entryObjectOrArray[1], + targetId: entryObjectOrArray[2], + message: entryObjectOrArray[3], + id: entryObjectOrArray[4] + }; + genericMessageBody.entries[i] = entry; + } + } + } + } + _this.dispatchMessage(message); + }; + } + HostBridge.init = function (bridge) { + if (typeof bridge !== 'object' || !bridge) { + return; + } + var instance = new HostBridge(bridge); + HostBridge.s_instance = instance; + HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var index = request.url.indexOf('?'); + if (index >= 0) { + var query = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(query); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + } + if (typeof (request.body) === "string") { + request.body = JSON.parse(request.body); + } + var bridgeMessage = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + message: request + }; + return instance.sendMessageToHostAndExpectResponse(bridgeMessage).then(function (bridgeResponse) { + var responseInfo = bridgeResponse.message; + return responseInfo; + }); + }); + for (var i = 0; i < HostBridge.s_onInitedHandlers.length; i++) { + HostBridge.s_onInitedHandlers[i](instance); + } + }; + Object.defineProperty(HostBridge, "instance", { + get: function () { + return HostBridge.s_instance; + }, + enumerable: true, + configurable: true + }); + HostBridge.prototype.sendMessageToHost = function (message) { + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + }; + HostBridge.prototype.sendMessageToHostAndExpectResponse = function (message) { + var _this = this; + var ret = CoreUtility.createPromise(function (resolve, reject) { + _this.m_promiseResolver[message.id] = resolve; + }); + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + return ret; + }; + HostBridge.prototype.addHostMessageHandler = function (handler) { + this.m_handlers.push(handler); + }; + HostBridge.prototype.removeHostMessageHandler = function (handler) { + var index = this.m_handlers.indexOf(handler); + if (index >= 0) { + this.m_handlers.splice(index, 1); + } + }; + HostBridge.onInited = function (handler) { + HostBridge.s_onInitedHandlers.push(handler); + if (HostBridge.s_instance) { + handler(HostBridge.s_instance); + } + }; + HostBridge.prototype.dispatchMessage = function (message) { + if (typeof message.id === 'number') { + var resolve = this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + delete this.m_promiseResolver[message.id]; + return; + } + } + for (var i = 0; i < this.m_handlers.length; i++) { + this.m_handlers[i](message); + } + }; + HostBridge.nextId = function () { + return HostBridge.s_nextId++; + }; + HostBridge.s_onInitedHandlers = []; + HostBridge.s_nextId = 1; + return HostBridge; + }()); + OfficeExtension_1.HostBridge = HostBridge; + if (typeof _richApiNativeBridge === 'object' && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var _Internal; + (function (_Internal) { + var RuntimeError = (function (_super) { + __extends(RuntimeError, _super); + function RuntimeError(error) { + var _this = _super.call(this, typeof error === 'string' ? error : error.message) || this; + Object.setPrototypeOf(_this, RuntimeError.prototype); + _this.name = 'RichApi.Error'; + if (typeof error === 'string') { + _this.message = error; + } + else { + _this.code = error.code; + _this.message = error.message; + _this.traceMessages = error.traceMessages || []; + _this.innerError = error.innerError || null; + _this.debugInfo = _this._createDebugInfo(error.debugInfo || {}); + _this.httpStatusCode = error.httpStatusCode; + _this.data = error.data; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode) || _this.httpStatusCode === 200) { + var mapping = {}; + mapping[CoreErrorCodes.accessDenied] = 401; + mapping[CoreErrorCodes.connectionFailure] = 500; + mapping[CoreErrorCodes.generalException] = 500; + mapping[CoreErrorCodes.invalidArgument] = 400; + mapping[CoreErrorCodes.invalidObjectPath] = 400; + mapping[CoreErrorCodes.invalidOrTimedOutSession] = 408; + mapping[CoreErrorCodes.invalidRequestContext] = 400; + mapping[CoreErrorCodes.timeout] = 408; + mapping[CoreErrorCodes.valueNotLoaded] = 400; + _this.httpStatusCode = mapping[_this.code]; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode)) { + _this.httpStatusCode = 500; + } + return _this; + } + RuntimeError.prototype.toString = function () { + return this.code + ': ' + this.message; + }; + RuntimeError.prototype._createDebugInfo = function (partialDebugInfo) { + var debugInfo = { + code: this.code, + message: this.message + }; + debugInfo.toString = function () { + return JSON.stringify(this); + }; + for (var key in partialDebugInfo) { + debugInfo[key] = partialDebugInfo[key]; + } + if (this.innerError) { + if (this.innerError instanceof _Internal.RuntimeError) { + debugInfo.innerError = this.innerError.debugInfo; + } + else { + debugInfo.innerError = this.innerError; + } + } + return debugInfo; + }; + RuntimeError._createInvalidArgError = function (error) { + return new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility.isNullOrEmptyString(error.argumentName) + ? CoreUtility._getResourceString(CoreResourceStrings.invalidArgumentGeneric) + : CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, error.argumentName), + debugInfo: error.errorLocation ? { errorLocation: error.errorLocation } : {}, + innerError: error.innerError + }); + }; + return RuntimeError; + }(Error)); + _Internal.RuntimeError = RuntimeError; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + OfficeExtension_1.Error = _Internal.RuntimeError; + var CoreErrorCodes = (function () { + function CoreErrorCodes() { + } + CoreErrorCodes.apiNotFound = 'ApiNotFound'; + CoreErrorCodes.accessDenied = 'AccessDenied'; + CoreErrorCodes.generalException = 'GeneralException'; + CoreErrorCodes.activityLimitReached = 'ActivityLimitReached'; + CoreErrorCodes.invalidArgument = 'InvalidArgument'; + CoreErrorCodes.connectionFailure = 'ConnectionFailure'; + CoreErrorCodes.timeout = 'Timeout'; + CoreErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + CoreErrorCodes.invalidObjectPath = 'InvalidObjectPath'; + CoreErrorCodes.invalidRequestContext = 'InvalidRequestContext'; + CoreErrorCodes.valueNotLoaded = 'ValueNotLoaded'; + CoreErrorCodes.requestPayloadSizeLimitExceeded = 'RequestPayloadSizeLimitExceeded'; + CoreErrorCodes.responsePayloadSizeLimitExceeded = 'ResponsePayloadSizeLimitExceeded'; + CoreErrorCodes.writeNotSupportedWhenModalDialogOpen = 'WriteNotSupportedWhenModalDialogOpen'; + return CoreErrorCodes; + }()); + OfficeExtension_1.CoreErrorCodes = CoreErrorCodes; + var CoreResourceStrings = (function () { + function CoreResourceStrings() { + } + CoreResourceStrings.apiNotFoundDetails = 'ApiNotFoundDetails'; + CoreResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + CoreResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + CoreResourceStrings.invalidArgument = 'InvalidArgument'; + CoreResourceStrings.invalidArgumentGeneric = 'InvalidArgumentGeneric'; + CoreResourceStrings.timeout = 'Timeout'; + CoreResourceStrings.invalidOrTimedOutSessionMessage = 'InvalidOrTimedOutSessionMessage'; + CoreResourceStrings.invalidSheetName = 'InvalidSheetName'; + CoreResourceStrings.invalidObjectPath = 'InvalidObjectPath'; + CoreResourceStrings.invalidRequestContext = 'InvalidRequestContext'; + CoreResourceStrings.valueNotLoaded = 'ValueNotLoaded'; + return CoreResourceStrings; + }()); + OfficeExtension_1.CoreResourceStrings = CoreResourceStrings; + var CoreConstants = (function () { + function CoreConstants() { + } + CoreConstants.flags = 'flags'; + CoreConstants.sourceLibHeader = 'SdkVersion'; + CoreConstants.processQuery = 'ProcessQuery'; + CoreConstants.localDocument = 'http://document.localhost/'; + CoreConstants.localDocumentApiPrefix = 'http://document.localhost/_api/'; + CoreConstants.customData = 'customdata'; + CoreConstants.testRequestNameHeader = 'x-test-request-name'; + return CoreConstants; + }()); + OfficeExtension_1.CoreConstants = CoreConstants; + var RichApiMessageUtility = (function () { + function RichApiMessageUtility() { + } + RichApiMessageUtility.buildMessageArrayForIRequestExecutor = function (customData, requestFlags, requestMessage, sourceLibHeaderValue) { + var requestMessageText = JSON.stringify(requestMessage.Body); + CoreUtility.log('Request:'); + CoreUtility.log(requestMessageText); + var headers = {}; + CoreUtility._copyHeaders(requestMessage.Headers, headers); + headers[CoreConstants.sourceLibHeader] = sourceLibHeaderValue; + var messageSafearray = RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, 'POST', CoreConstants.processQuery, headers, requestMessageText); + return messageSafearray; + }; + RichApiMessageUtility.buildResponseOnSuccess = function (responseBody, responseHeaders) { + var response = { HttpStatusCode: 200, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.Body = JSON.parse(responseBody); + response.Headers = responseHeaders; + return response; + }; + RichApiMessageUtility.buildResponseOnError = function (errorCode, message) { + var response = { HttpStatusCode: 500, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.ErrorCode = CoreErrorCodes.generalException; + response.ErrorMessage = message; + if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + response.ErrorCode = CoreErrorCodes.accessDenied; + response.HttpStatusCode = 401; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + response.ErrorCode = CoreErrorCodes.activityLimitReached; + response.HttpStatusCode = 429; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession) { + response.ErrorCode = CoreErrorCodes.invalidOrTimedOutSession; + response.HttpStatusCode = 408; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidOrTimedOutSessionMessage); + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.requestPayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.responsePayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen) { + response.ErrorCode = CoreErrorCodes.writeNotSupportedWhenModalDialogOpen; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName) { + response.ErrorCode = CoreErrorCodes.invalidRequestContext; + response.HttpStatusCode = 400; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidSheetName); + } + return response; + }; + RichApiMessageUtility.buildHttpResponseFromOfficeJsError = function (errorCode, message) { + var statusCode = 500; + var errorBody = {}; + errorBody['error'] = {}; + errorBody['error']['code'] = CoreErrorCodes.generalException; + errorBody['error']['message'] = message; + if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + statusCode = 403; + errorBody['error']['code'] = CoreErrorCodes.accessDenied; + } + else if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + statusCode = 429; + errorBody['error']['code'] = CoreErrorCodes.activityLimitReached; + } + return { statusCode: statusCode, headers: {}, body: JSON.stringify(errorBody) }; + }; + RichApiMessageUtility.buildRequestMessageSafeArray = function (customData, requestFlags, method, path, headers, body) { + var headerArray = []; + if (headers) { + for (var headerName in headers) { + headerArray.push(headerName); + headerArray.push(headers[headerName]); + } + } + var appPermission = 0; + var solutionId = ''; + var instanceId = ''; + var marketplaceType = ''; + var solutionVersion = ''; + var storeLocation = ''; + var compliantSolutionId = ''; + return [ + customData, + method, + path, + headerArray, + body, + appPermission, + requestFlags, + solutionId, + instanceId, + marketplaceType, + solutionVersion, + storeLocation, + compliantSolutionId + ]; + }; + RichApiMessageUtility.getResponseBody = function (result) { + return RichApiMessageUtility.getResponseBodyFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseHeaders = function (result) { + return RichApiMessageUtility.getResponseHeadersFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseBodyFromSafeArray = function (data) { + var ret = data[2]; + if (typeof ret === 'string') { + return ret; + } + var arr = ret; + return arr.join(''); + }; + RichApiMessageUtility.getResponseHeadersFromSafeArray = function (data) { + var arrayHeader = data[1]; + if (!arrayHeader) { + return null; + } + var headers = {}; + for (var i = 0; i < arrayHeader.length - 1; i += 2) { + headers[arrayHeader[i]] = arrayHeader[i + 1]; + } + return headers; + }; + RichApiMessageUtility.getResponseStatusCode = function (result) { + return RichApiMessageUtility.getResponseStatusCodeFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseStatusCodeFromSafeArray = function (data) { + return data[0]; + }; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession = 5012; + RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached = 5102; + RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability = 7000; + RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded = 5103; + RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded = 5104; + RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen = 5016; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName = 1014; + return RichApiMessageUtility; + }()); + OfficeExtension_1.RichApiMessageUtility = RichApiMessageUtility; + (function (_Internal) { + function getPromiseType() { + if (typeof Promise !== 'undefined') { + return Promise; + } + if (typeof Office !== 'undefined') { + if (Office.Promise) { + return Office.Promise; + } + } + if (typeof OfficeExtension !== 'undefined') { + if (OfficeExtension.Promise) { + return OfficeExtension.Promise; + } + } + throw new _Internal.Error('No Promise implementation found'); + } + _Internal.getPromiseType = getPromiseType; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var CoreUtility = (function () { + function CoreUtility() { + } + CoreUtility.log = function (message) { + if (CoreUtility._logEnabled && typeof console !== 'undefined' && console.log) { + console.log(message); + } + }; + CoreUtility.checkArgumentNull = function (value, name) { + if (CoreUtility.isNullOrUndefined(value)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: name }); + } + }; + CoreUtility.isNullOrUndefined = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isUndefined = function (value) { + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isNullOrEmptyString = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + if (value.length == 0) { + return true; + } + return false; + }; + CoreUtility.isPlainJsonObject = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return false; + } + if (typeof value !== 'object') { + return false; + } + if (Object.prototype.toString.apply(value) !== '[object Object]') { + return false; + } + if (value.constructor && + !Object.prototype.hasOwnProperty.call(value, 'constructor') && + !Object.prototype.hasOwnProperty.call(value.constructor.prototype, 'hasOwnProperty')) { + return false; + } + for (var key in value) { + if (!Object.prototype.hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + }; + CoreUtility.trim = function (str) { + return str.replace(new RegExp('^\\s+|\\s+$', 'g'), ''); + }; + CoreUtility.caseInsensitiveCompareString = function (str1, str2) { + if (CoreUtility.isNullOrUndefined(str1)) { + return CoreUtility.isNullOrUndefined(str2); + } + else { + if (CoreUtility.isNullOrUndefined(str2)) { + return false; + } + else { + return str1.toUpperCase() == str2.toUpperCase(); + } + } + }; + CoreUtility.isReadonlyRestRequest = function (method) { + return CoreUtility.caseInsensitiveCompareString(method, 'GET'); + }; + CoreUtility._getResourceString = function (resourceId, arg) { + var ret; + if (typeof window !== 'undefined' && window.Strings && window.Strings.OfficeOM) { + var stringName = 'L_' + resourceId; + var stringValue = window.Strings.OfficeOM[stringName]; + if (stringValue) { + ret = stringValue; + } + } + if (!ret) { + ret = CoreUtility.s_resourceStringValues[resourceId]; + } + if (!ret) { + ret = resourceId; + } + if (!CoreUtility.isNullOrUndefined(arg)) { + if (Array.isArray(arg)) { + var arrArg = arg; + ret = CoreUtility._formatString(ret, arrArg); + } + else { + ret = ret.replace('{0}', arg); + } + } + return ret; + }; + CoreUtility._formatString = function (format, arrArg) { + return format.replace(/\{\d\}/g, function (v) { + var position = parseInt(v.substr(1, v.length - 2)); + if (position < arrArg.length) { + return arrArg[position]; + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'format' }); + } + }); + }; + Object.defineProperty(CoreUtility, "Promise", { + get: function () { + return _Internal.getPromiseType(); + }, + enumerable: true, + configurable: true + }); + CoreUtility.createPromise = function (executor) { + var ret = new CoreUtility.Promise(executor); + return ret; + }; + CoreUtility._createPromiseFromResult = function (value) { + return CoreUtility.createPromise(function (resolve, reject) { + resolve(value); + }); + }; + CoreUtility._createPromiseFromException = function (reason) { + return CoreUtility.createPromise(function (resolve, reject) { + reject(reason); + }); + }; + CoreUtility._createTimeoutPromise = function (timeout) { + return CoreUtility.createPromise(function (resolve, reject) { + setTimeout(function () { + resolve(null); + }, timeout); + }); + }; + CoreUtility._createInvalidArgError = function (error) { + return _Internal.RuntimeError._createInvalidArgError(error); + }; + CoreUtility._isLocalDocumentUrl = function (url) { + return CoreUtility._getLocalDocumentUrlPrefixLength(url) > 0; + }; + CoreUtility._getLocalDocumentUrlPrefixLength = function (url) { + var localDocumentPrefixes = [ + 'http://document.localhost', + 'https://document.localhost', + '//document.localhost' + ]; + var urlLower = url.toLowerCase().trim(); + for (var i = 0; i < localDocumentPrefixes.length; i++) { + if (urlLower === localDocumentPrefixes[i]) { + return localDocumentPrefixes[i].length; + } + else if (urlLower.substr(0, localDocumentPrefixes[i].length + 1) === localDocumentPrefixes[i] + '/') { + return localDocumentPrefixes[i].length + 1; + } + } + return 0; + }; + CoreUtility._validateLocalDocumentRequest = function (request) { + var index = CoreUtility._getLocalDocumentUrlPrefixLength(request.url); + if (index <= 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + var path = request.url.substr(index); + var pathLower = path.toLowerCase(); + if (pathLower === '_api') { + path = ''; + } + else if (pathLower.substr(0, '_api/'.length) === '_api/') { + path = path.substr('_api/'.length); + } + return { + method: request.method, + url: path, + headers: request.headers, + body: request.body + }; + }; + CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny = function (queryString) { + var ret = { flags: -1, customData: '' }; + var parts = queryString.split('&'); + for (var i = 0; i < parts.length; i++) { + var keyvalue = parts[i].split('='); + if (keyvalue[0].toLowerCase() === CoreConstants.flags) { + var flags = parseInt(keyvalue[1]); + flags = flags & 8191; + ret.flags = flags; + } + else if (keyvalue[0].toLowerCase() === CoreConstants.customData) { + ret.customData = decodeURIComponent(keyvalue[1]); + } + } + return ret; + }; + CoreUtility._getRequestBodyText = function (request) { + var body = ''; + if (typeof request.body === 'string') { + body = request.body; + } + else if (request.body && typeof request.body === 'object') { + body = JSON.stringify(request.body); + } + return body; + }; + CoreUtility._parseResponseBody = function (response) { + if (typeof response.body === 'string') { + var bodyText = CoreUtility.trim(response.body); + return JSON.parse(bodyText); + } + else { + return response.body; + } + }; + CoreUtility._buildRequestMessageSafeArray = function (request) { + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var customData = ''; + if (request.url.substr(0, CoreConstants.processQuery.length).toLowerCase() === + CoreConstants.processQuery.toLowerCase()) { + var index = request.url.indexOf('?'); + if (index > 0) { + var queryString = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(queryString); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + customData = flagsAndCustomData.customData; + } + } + return RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, request.method, request.url, request.headers, CoreUtility._getRequestBodyText(request)); + }; + CoreUtility._parseHttpResponseHeaders = function (allResponseHeaders) { + var responseHeaders = {}; + if (!CoreUtility.isNullOrEmptyString(allResponseHeaders)) { + var regex = new RegExp('\r?\n'); + var entries = allResponseHeaders.split(regex); + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + if (entry != null) { + var index = entry.indexOf(':'); + if (index > 0) { + var key = entry.substr(0, index); + var value = entry.substr(index + 1); + key = CoreUtility.trim(key); + value = CoreUtility.trim(value); + responseHeaders[key.toUpperCase()] = value; + } + } + } + } + return responseHeaders; + }; + CoreUtility._parseErrorResponse = function (responseInfo) { + var errorObj = CoreUtility._parseErrorResponseBody(responseInfo); + var statusCode = responseInfo.statusCode.toString(); + if (CoreUtility.isNullOrUndefined(errorObj) || typeof errorObj !== 'object' || !errorObj.error) { + return CoreUtility._createDefaultErrorResponse(statusCode); + } + var error = errorObj.error; + var innerError = error.innerError; + if (innerError && innerError.code) { + return CoreUtility._createErrorResponse(innerError.code, statusCode, innerError.message); + } + if (error.code) { + return CoreUtility._createErrorResponse(error.code, statusCode, error.message); + } + return CoreUtility._createDefaultErrorResponse(statusCode); + }; + CoreUtility._parseErrorResponseBody = function (responseInfo) { + if (CoreUtility.isPlainJsonObject(responseInfo.body)) { + return responseInfo.body; + } + else if (!CoreUtility.isNullOrEmptyString(responseInfo.body)) { + var errorResponseBody = CoreUtility.trim(responseInfo.body); + try { + return JSON.parse(errorResponseBody); + } + catch (e) { + CoreUtility.log('Error when parse ' + errorResponseBody); + } + } + }; + CoreUtility._createDefaultErrorResponse = function (statusCode) { + return { + errorCode: CoreErrorCodes.connectionFailure, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, statusCode) + }; + }; + CoreUtility._createErrorResponse = function (code, statusCode, message) { + return { + errorCode: code, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithDetails, [ + statusCode, + code, + message + ]) + }; + }; + CoreUtility._copyHeaders = function (src, dest) { + if (src && dest) { + for (var key in src) { + dest[key] = src[key]; + } + } + }; + CoreUtility.addResourceStringValues = function (values) { + for (var key in values) { + CoreUtility.s_resourceStringValues[key] = values[key]; + } + }; + CoreUtility._logEnabled = false; + CoreUtility.s_resourceStringValues = { + ApiNotFoundDetails: 'The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.', + ConnectionFailureWithStatus: 'The request failed with status code of {0}.', + ConnectionFailureWithDetails: 'The request failed with status code of {0}, error code {1} and the following error message: {2}', + InvalidArgument: "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.", + InvalidObjectPath: 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.', + InvalidRequestContext: 'Cannot use the object across different request contexts.', + Timeout: 'The operation has timed out.', + ValueNotLoaded: 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.' + }; + return CoreUtility; + }()); + OfficeExtension_1.CoreUtility = CoreUtility; + var TestUtility = (function () { + function TestUtility() { + } + TestUtility.setMock = function (value) { + TestUtility.s_isMock = value; + }; + TestUtility.isMock = function () { + return TestUtility.s_isMock; + }; + TestUtility._setCurrentTestName = function (value) { + TestUtility.s_currentTestName = value; + TestUtility.s_currentTestSequenceId = 0; + }; + TestUtility._getCurrentTestNameWithSequenceId = function () { + if (TestUtility.s_currentTestName) { + TestUtility.s_currentTestSequenceId++; + return TestUtility.s_currentTestName + "." + TestUtility.s_currentTestSequenceId; + } + return null; + }; + return TestUtility; + }()); + OfficeExtension_1.TestUtility = TestUtility; + OfficeExtension_1._internalConfig = { + showDisposeInfoInDebugInfo: false, + showInternalApiInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectUpdateMethod: false, + alwaysPolyfillClientObjectRetrieveMethod: false, + enableConcurrentFlag: true, + enableUndoableFlag: true, + appendTypeNameToObjectPathInfo: false, + enablePreviewExecution: false + }; + OfficeExtension_1.config = { + extendedErrorLogging: false + }; + var CommonActionFactory = (function () { + function CommonActionFactory() { + } + CommonActionFactory.createSetPropertyAction = function (context, parent, propertyName, value, flags) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var args = [value]; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + CommonUtility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var action = new Action(actionInfo, 0, flags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (flags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectId: '', + ObjectType: '', + Arguments: [value] + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return parent._addAction(action); + }; + CommonActionFactory.createQueryAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 2, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createQueryAsJsonAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 7, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createUpdateAction = function (context, parent, objectState) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 9, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 0, 0); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action); + }; + return CommonActionFactory; + }()); + OfficeExtension_1.CommonActionFactory = CommonActionFactory; + var ClientObjectBase = (function () { + function ClientObjectBase(contextBase, objectPath) { + this.m_contextBase = contextBase; + this.m_objectPath = objectPath; + } + Object.defineProperty(ClientObjectBase.prototype, "_objectPath", { + get: function () { + return this.m_objectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObjectBase.prototype, "_context", { + get: function () { + return this.m_contextBase; + }, + enumerable: true, + configurable: true + }); + ClientObjectBase.prototype._addAction = function (action, resultHandler) { + var _this = this; + if (resultHandler === void 0) { + resultHandler = null; + } + return CoreUtility.createPromise(function (resolve, reject) { + _this._context._addServiceApiAction(action, resultHandler, resolve, reject); + }); + }; + ClientObjectBase.prototype._addPreviewExecutionAction = function (action) { + }; + ClientObjectBase.prototype._retrieve = function (option, resultHandler) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var queryOption = ClientRequestContextBase._parseQueryOption(option); + if (shouldPolyfill) { + return CommonActionFactory.createQueryAction(this._context, this, queryOption, resultHandler); + } + return CommonActionFactory.createQueryAsJsonAction(this._context, this, queryOption, resultHandler); + }; + ClientObjectBase.prototype._recursivelyUpdate = function (properties) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectUpdateMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.2'); + } + try { + var scalarPropNames = this[CommonConstants.scalarPropertyNames]; + if (!scalarPropNames) { + scalarPropNames = []; + } + var scalarPropUpdatable = this[CommonConstants.scalarPropertyUpdateable]; + if (!scalarPropUpdatable) { + scalarPropUpdatable = []; + for (var i = 0; i < scalarPropNames.length; i++) { + scalarPropUpdatable.push(false); + } + } + var navigationPropNames = this[CommonConstants.navigationPropertyNames]; + if (!navigationPropNames) { + navigationPropNames = []; + } + var scalarProps = {}; + var navigationProps = {}; + var scalarPropCount = 0; + for (var propName in properties) { + var index = scalarPropNames.indexOf(propName); + if (index >= 0) { + if (!scalarPropUpdatable[index]) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, propName), + debugInfo: { + errorLocation: propName + } + }); + } + scalarProps[propName] = properties[propName]; + ++scalarPropCount; + } + else if (navigationPropNames.indexOf(propName) >= 0) { + navigationProps[propName] = properties[propName]; + } + else { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, propName), + debugInfo: { + errorLocation: propName + } + }); + } + } + if (scalarPropCount > 0) { + if (shouldPolyfill) { + for (var i = 0; i < scalarPropNames.length; i++) { + var propName = scalarPropNames[i]; + var propValue = scalarProps[propName]; + if (!CommonUtility.isUndefined(propValue)) { + CommonActionFactory.createSetPropertyAction(this._context, this, propName, propValue); + } + } + } + else { + CommonActionFactory.createUpdateAction(this._context, this, scalarProps); + } + } + for (var propName in navigationProps) { + var navigationPropProxy = this[propName]; + var navigationPropValue = navigationProps[propName]; + navigationPropProxy._recursivelyUpdate(navigationPropValue); + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.update' + }, + innerError: innerError + }); + } + }; + return ClientObjectBase; + }()); + OfficeExtension_1.ClientObjectBase = ClientObjectBase; + var Action = (function () { + function Action(actionInfo, operationType, flags) { + this.m_actionInfo = actionInfo; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(Action.prototype, "actionInfo", { + get: function () { + return this.m_actionInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + return Action; + }()); + OfficeExtension_1.Action = Action; + var ObjectPath = (function () { + function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest, operationType, flags) { + this.m_objectPathInfo = objectPathInfo; + this.m_parentObjectPath = parentObjectPath; + this.m_isCollection = isCollection; + this.m_isInvalidAfterRequest = isInvalidAfterRequest; + this.m_isValid = true; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(ObjectPath.prototype, "id", { + get: function () { + var argumentInfo = this.m_objectPathInfo.ArgumentInfo; + if (!argumentInfo) { + return undefined; + } + var argument = argumentInfo.Arguments; + if (!argument) { + return undefined; + } + return argument[0]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parent", { + get: function () { + var parent = this.m_parentObjectPath; + if (!parent) { + return undefined; + } + return parent; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentId", { + get: function () { + return this.parent ? this.parent.id : undefined; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "objectPathInfo", { + get: function () { + return this.m_objectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isCollection", { + get: function () { + return this.m_isCollection; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isInvalidAfterRequest", { + get: function () { + return this.m_isInvalidAfterRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentObjectPath", { + get: function () { + return this.m_parentObjectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "argumentObjectPaths", { + get: function () { + return this.m_argumentObjectPaths; + }, + set: function (value) { + this.m_argumentObjectPaths = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isValid", { + get: function () { + return this.m_isValid; + }, + set: function (value) { + this.m_isValid = value; + if (!value && + this.m_objectPathInfo.ObjectPathType === 6 && + this.m_savedObjectPathInfo) { + ObjectPath.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo, this.m_objectPathInfo); + this.m_parentObjectPath = this.m_savedObjectPathInfo.parent; + this.m_isValid = true; + this.m_savedObjectPathInfo = null; + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "originalObjectPathInfo", { + get: function () { + return this.m_originalObjectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "getByIdMethodName", { + get: function () { + return this.m_getByIdMethodName; + }, + set: function (value) { + this.m_getByIdMethodName = value; + }, + enumerable: true, + configurable: true + }); + ObjectPath.prototype._updateAsNullObject = function () { + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 7; + this.m_objectPathInfo.Name = ''; + this.m_parentObjectPath = null; + }; + ObjectPath.prototype.saveOriginalObjectPathInfo = function () { + if (OfficeExtension_1.config.extendedErrorLogging && !this.m_originalObjectPathInfo) { + this.m_originalObjectPathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, this.m_originalObjectPathInfo); + } + }; + ObjectPath.prototype.updateUsingObjectData = function (value, clientObject) { + var referenceId = value[CommonConstants.referenceId]; + if (!CoreUtility.isNullOrEmptyString(referenceId)) { + if (!this.m_savedObjectPathInfo && + !this.isInvalidAfterRequest && + ObjectPath.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)) { + var pathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, pathInfo); + this.m_savedObjectPathInfo = { + pathInfo: pathInfo, + parent: this.m_parentObjectPath + }; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 6; + this.m_objectPathInfo.Name = referenceId; + delete this.m_objectPathInfo.ParentObjectPathId; + this.m_parentObjectPath = null; + return; + } + if (clientObject) { + var collectionPropertyPath = clientObject[CommonConstants.collectionPropertyPath]; + if (!CoreUtility.isNullOrEmptyString(collectionPropertyPath) && clientObject.context) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + var propNames = collectionPropertyPath.split('.'); + var parent_1 = clientObject.context[propNames[0]]; + for (var i = 1; i < propNames.length; i++) { + parent_1 = parent_1[propNames[i]]; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_parentObjectPath = parent_1._objectPath; + this.m_objectPathInfo.ParentObjectPathId = this.m_parentObjectPath.objectPathInfo.Id; + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + } + var parentIsCollection = this.parentObjectPath && this.parentObjectPath.isCollection; + var getByIdMethodName = this.getByIdMethodName; + if (parentIsCollection || !CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + if (!CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + this.m_objectPathInfo.ObjectPathType = 3; + this.m_objectPathInfo.Name = getByIdMethodName; + } + else { + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + } + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + }; + ObjectPath.prototype.resetForUpdateUsingObjectData = function () { + this.m_isInvalidAfterRequest = false; + this.m_isValid = true; + this.m_operationType = 1; + this.m_flags = 4; + this.m_objectPathInfo.ArgumentInfo = {}; + this.m_argumentObjectPaths = null; + this.m_getByIdMethodName = null; + }; + ObjectPath.isRestorableObjectPath = function (objectPathType) { + return (objectPathType === 1 || + objectPathType === 5 || + objectPathType === 3 || + objectPathType === 4); + }; + ObjectPath.copyObjectPathInfo = function (src, dest) { + dest.Id = src.Id; + dest.ArgumentInfo = src.ArgumentInfo; + dest.Name = src.Name; + dest.ObjectPathType = src.ObjectPathType; + dest.ParentObjectPathId = src.ParentObjectPathId; + }; + return ObjectPath; + }()); + OfficeExtension_1.ObjectPath = ObjectPath; + var ClientRequestContextBase = (function () { + function ClientRequestContextBase() { + this.m_nextId = 0; + } + ClientRequestContextBase.prototype._nextId = function () { + return ++this.m_nextId; + }; + ClientRequestContextBase.prototype._addServiceApiAction = function (action, resultHandler, resolve, reject) { + if (!this.m_serviceApiQueue) { + this.m_serviceApiQueue = new ServiceApiQueue(this); + } + this.m_serviceApiQueue.add(action, resultHandler, resolve, reject); + }; + ClientRequestContextBase._parseQueryOption = function (option) { + var queryOption = {}; + if (typeof option === 'string') { + var select = option; + queryOption.Select = CommonUtility._parseSelectExpand(select); + } + else if (Array.isArray(option)) { + queryOption.Select = option; + } + else if (typeof option === 'object') { + var loadOption = option; + if (ClientRequestContextBase.isLoadOption(loadOption)) { + if (typeof loadOption.select === 'string') { + queryOption.Select = CommonUtility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select = loadOption.select; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.select)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.select' }); + } + if (typeof loadOption.expand === 'string') { + queryOption.Expand = CommonUtility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand = loadOption.expand; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.expand)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.expand' }); + } + if (typeof loadOption.top === 'number') { + queryOption.Top = loadOption.top; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.top)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.top' }); + } + if (typeof loadOption.skip === 'number') { + queryOption.Skip = loadOption.skip; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.skip)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.skip' }); + } + } + else { + queryOption = ClientRequestContextBase.parseStrictLoadOption(option); + } + } + else if (!CommonUtility.isNullOrUndefined(option)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option' }); + } + return queryOption; + }; + ClientRequestContextBase.isLoadOption = function (loadOption) { + if (!CommonUtility.isUndefined(loadOption.select) && + (typeof loadOption.select === 'string' || Array.isArray(loadOption.select))) + return true; + if (!CommonUtility.isUndefined(loadOption.expand) && + (typeof loadOption.expand === 'string' || Array.isArray(loadOption.expand))) + return true; + if (!CommonUtility.isUndefined(loadOption.top) && typeof loadOption.top === 'number') + return true; + if (!CommonUtility.isUndefined(loadOption.skip) && typeof loadOption.skip === 'number') + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContextBase.parseStrictLoadOption = function (option) { + var ret = { Select: [] }; + ClientRequestContextBase.parseStrictLoadOptionHelper(ret, '', 'option', option); + return ret; + }; + ClientRequestContextBase.combineQueryPath = function (pathPrefix, key, separator) { + if (pathPrefix.length === 0) { + return key; + } + else { + return pathPrefix + separator + key; + } + }; + ClientRequestContextBase.parseStrictLoadOptionHelper = function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value = option[key]; + if (key === '$all') { + if (typeof value !== 'boolean') { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, '*', '/')); + } + } + else if (key === '$top') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Top = value; + } + else if (key === '$skip') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Skip = value; + } + else { + if (typeof value === 'boolean') { + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/')); + } + } + else if (typeof value === 'object') { + ClientRequestContextBase.parseStrictLoadOptionHelper(queryInfo, ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/'), ClientRequestContextBase.combineQueryPath(argPrefix, key, '.'), value); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + } + } + }; + return ClientRequestContextBase; + }()); + OfficeExtension_1.ClientRequestContextBase = ClientRequestContextBase; + var InstantiateActionUpdateObjectPathHandler = (function () { + function InstantiateActionUpdateObjectPathHandler(m_objectPath) { + this.m_objectPath = m_objectPath; + } + InstantiateActionUpdateObjectPathHandler.prototype._handleResult = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + this.m_objectPath._updateAsNullObject(); + } + else { + this.m_objectPath.updateUsingObjectData(value, null); + } + }; + return InstantiateActionUpdateObjectPathHandler; + }()); + var ClientRequestBase = (function () { + function ClientRequestBase(context) { + this.m_contextBase = context; + this.m_actions = []; + this.m_actionResultHandler = {}; + this.m_referencedObjectPaths = {}; + this.m_instantiatedObjectPaths = {}; + this.m_preSyncPromises = []; + this.m_previewExecutionActions = []; + } + ClientRequestBase.prototype.addAction = function (action) { + this.m_actions.push(action); + if (action.actionInfo.ActionType == 1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId] = action; + } + }; + ClientRequestBase.prototype.addPreviewExecutionAction = function (action) { + this.m_previewExecutionActions.push(action); + }; + Object.defineProperty(ClientRequestBase.prototype, "hasActions", { + get: function () { + return this.m_actions.length > 0; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._getLastAction = function () { + return this.m_actions[this.m_actions.length - 1]; + }; + ClientRequestBase.prototype.ensureInstantiateObjectPath = function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo = { + Id: this.m_contextBase._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction = new Action(actionInfo, 1, 4); + instantiateAction.referencedObjectPath = objectPath; + this.addReferencedObjectPath(objectPath); + this.addAction(instantiateAction); + var resultHandler = new InstantiateActionUpdateObjectPathHandler(objectPath); + this.addActionResultHandler(instantiateAction, resultHandler); + } + } + }; + ClientRequestBase.prototype.ensureInstantiateObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addReferencedObjectPath = function (objectPath) { + if (!objectPath || this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + while (objectPath) { + this.m_referencedObjectPaths[objectPath.objectPathInfo.Id] = objectPath; + if (objectPath.objectPathInfo.ObjectPathType == 3) { + this.addReferencedObjectPaths(objectPath.argumentObjectPaths); + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase.prototype.addReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.addReferencedObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addActionResultHandler = function (action, resultHandler) { + this.m_actionResultHandler[action.actionInfo.Id] = resultHandler; + }; + ClientRequestBase.prototype.aggregrateRequestFlags = function (requestFlags, operationType, flags) { + if (operationType === 0) { + requestFlags = requestFlags | 1; + if ((flags & 2) === 0) { + requestFlags = requestFlags & ~16; + } + if ((flags & 8) === 0) { + requestFlags = requestFlags & ~256; + } + requestFlags = requestFlags & ~4; + } + if (flags & 1) { + requestFlags = requestFlags | 2; + } + if ((flags & 4) === 0) { + requestFlags = requestFlags & ~4; + } + return requestFlags; + }; + ClientRequestBase.prototype.finallyNormalizeFlags = function (requestFlags) { + if ((requestFlags & 1) === 0) { + requestFlags = requestFlags & ~16; + requestFlags = requestFlags & ~256; + } + if (!OfficeExtension_1._internalConfig.enableConcurrentFlag) { + requestFlags = requestFlags & ~4; + } + if (!OfficeExtension_1._internalConfig.enableUndoableFlag) { + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.1')) { + requestFlags = requestFlags & ~4; + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.2')) { + requestFlags = requestFlags & ~256; + } + if (typeof this.m_flagsForTesting === 'number') { + requestFlags = this.m_flagsForTesting; + } + return requestFlags; + }; + ClientRequestBase.prototype.buildRequestMessageBodyAndRequestFlags = function () { + if (OfficeExtension_1._internalConfig.enableEarlyDispose) { + ClientRequestBase._calculateLastUsedObjectPathIds(this.m_actions); + } + var requestFlags = 4 | + 16 | + 256; + var objectPaths = {}; + for (var i in this.m_referencedObjectPaths) { + requestFlags = this.aggregrateRequestFlags(requestFlags, this.m_referencedObjectPaths[i].operationType, this.m_referencedObjectPaths[i].flags); + objectPaths[i] = this.m_referencedObjectPaths[i].objectPathInfo; + } + var actions = []; + var hasKeepReference = false; + for (var index = 0; index < this.m_actions.length; index++) { + var action = this.m_actions[index]; + if (action.actionInfo.ActionType === 3 && + action.actionInfo.Name === CommonConstants.keepReference) { + hasKeepReference = true; + } + requestFlags = this.aggregrateRequestFlags(requestFlags, action.operationType, action.flags); + actions.push(action.actionInfo); + } + requestFlags = this.finallyNormalizeFlags(requestFlags); + var body = { + AutoKeepReference: this.m_contextBase._autoCleanup && hasKeepReference, + Actions: actions, + ObjectPaths: objectPaths + }; + if (this.m_previewExecutionActions.length > 0) { + body.PreviewExecutionActions = this.m_previewExecutionActions; + requestFlags = requestFlags | 4096; + } + return { + body: body, + flags: requestFlags + }; + }; + ClientRequestBase.prototype.processResponse = function (actionResults) { + if (actionResults) { + for (var i = 0; i < actionResults.length; i++) { + var actionResult = actionResults[i]; + var handler = this.m_actionResultHandler[actionResult.ActionId]; + if (handler) { + handler._handleResult(actionResult.Value); + } + } + } + }; + ClientRequestBase.prototype.invalidatePendingInvalidObjectPaths = function () { + for (var i in this.m_referencedObjectPaths) { + if (this.m_referencedObjectPaths[i].isInvalidAfterRequest) { + this.m_referencedObjectPaths[i].isValid = false; + } + } + }; + ClientRequestBase.prototype._addPreSyncPromise = function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequestBase.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._removeKeepReferenceAction = function (objectPathId) { + for (var i = this.m_actions.length - 1; i >= 0; i--) { + var actionInfo = this.m_actions[i].actionInfo; + if (actionInfo.ObjectPathId === objectPathId && + actionInfo.ActionType === 3 && + actionInfo.Name === CommonConstants.keepReference) { + this.m_actions.splice(i, 1); + break; + } + } + }; + ClientRequestBase._updateLastUsedActionIdOfObjectPathId = function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id] = actionId; + var argumentObjectPaths = objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength = argumentObjectPaths.length; + for (var i = 0; i < argumentObjectPathsLength; i++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase._calculateLastUsedObjectPathIds = function (actions) { + var lastUsedActionIdOfObjectPathId = {}; + var actionsLength = actions.length; + for (var index = actionsLength - 1; index >= 0; --index) { + var action = actions[index]; + var actionId = action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths = action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength = referencedObjectPaths.length; + for (var refIndex = 0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction = {}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId = lastUsedActionIdOfObjectPathId[key]; + var objectPathIds = lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds = []; + lastUsedObjectPathIdsOfAction[actionId] = objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index = 0; index < actionsLength; index++) { + var action = actions[index]; + var lastUsedObjectPathIds = lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L = lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; + return ClientRequestBase; + }()); + OfficeExtension_1.ClientRequestBase = ClientRequestBase; + var ClientResult = (function () { + function ClientResult(m_type) { + this.m_type = m_type; + } + Object.defineProperty(ClientResult.prototype, "value", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'clientResult.value' + } + }); + } + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ClientResult.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (typeof value === 'object' && value && value._IsNull) { + return; + } + if (this.m_type === 1) { + this.m_value = CommonUtility.adjustToDateTime(value); + } + else { + this.m_value = value; + } + }; + return ClientResult; + }()); + OfficeExtension_1.ClientResult = ClientResult; + var ServiceApiQueue = (function () { + function ServiceApiQueue(m_context) { + this.m_context = m_context; + this.m_actions = []; + } + ServiceApiQueue.prototype.add = function (action, resultHandler, resolve, reject) { + var _this = this; + this.m_actions.push({ action: action, resultHandler: resultHandler, resolve: resolve, reject: reject }); + if (this.m_actions.length === 1) { + setTimeout(function () { return _this.processActions(); }, 0); + } + }; + ServiceApiQueue.prototype.processActions = function () { + var _this = this; + if (this.m_actions.length === 0) { + return; + } + var actions = this.m_actions; + this.m_actions = []; + var request = new ClientRequestBase(this.m_context); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + request.ensureInstantiateObjectPath(action.action.referencedObjectPath); + request.ensureInstantiateObjectPaths(action.action.referencedArgumentObjectPaths); + request.addAction(action.action); + request.addReferencedObjectPath(action.action.referencedObjectPath); + request.addReferencedObjectPaths(action.action.referencedArgumentObjectPaths); + } + var _a = request.buildRequestMessageBodyAndRequestFlags(), body = _a.body, flags = _a.flags; + var requestMessage = { + Url: CoreConstants.localDocumentApiPrefix, + Headers: null, + Body: body + }; + CoreUtility.log('Request:'); + CoreUtility.log(JSON.stringify(body)); + var executor = new HttpRequestExecutor(); + executor + .executeAsync(this.m_context._customData, flags, requestMessage) + .then(function (response) { + _this.processResponse(request, actions, response); + })["catch"](function (ex) { + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + action.reject(ex); + } + }); + }; + ServiceApiQueue.prototype.processResponse = function (request, actions, response) { + var error = this.getErrorFromResponse(response); + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (!actionResults) { + actionResults = []; + } + this.processActionResults(request, actions, actionResults, error); + }; + ServiceApiQueue.prototype.getErrorFromResponse = function (response) { + if (!CoreUtility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage + }); + } + if (response.Body && response.Body.Error) { + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message + }); + } + return null; + }; + ServiceApiQueue.prototype.processActionResults = function (request, actions, actionResults, err) { + request.processResponse(actionResults); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + var actionId = action.action.actionInfo.Id; + var hasResult = false; + for (var j = 0; j < actionResults.length; j++) { + if (actionId == actionResults[j].ActionId) { + var resultValue = actionResults[j].Value; + if (action.resultHandler) { + action.resultHandler._handleResult(resultValue); + resultValue = action.resultHandler.value; + } + if (action.resolve) { + action.resolve(resultValue); + } + hasResult = true; + break; + } + } + if (!hasResult && action.reject) { + if (err) { + action.reject(err); + } + else { + action.reject('No response for the action.'); + } + } + } + }; + return ServiceApiQueue; + }()); + var HttpRequestExecutor = (function () { + function HttpRequestExecutor() { + } + HttpRequestExecutor.prototype.getRequestUrl = function (baseUrl, requestFlags) { + if (baseUrl.charAt(baseUrl.length - 1) != '/') { + baseUrl = baseUrl + '/'; + } + baseUrl = baseUrl + CoreConstants.processQuery; + baseUrl = baseUrl + '?' + CoreConstants.flags + '=' + requestFlags.toString(); + return baseUrl; + }; + HttpRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var url = this.getRequestUrl(requestMessage.Url, requestFlags); + var requestInfo = { + method: 'POST', + url: url, + headers: {}, + body: requestMessage.Body + }; + requestInfo.headers[CoreConstants.sourceLibHeader] = HttpRequestExecutor.SourceLibHeaderValue; + requestInfo.headers['CONTENT-TYPE'] = 'application/json'; + if (requestMessage.Headers) { + for (var key in requestMessage.Headers) { + requestInfo.headers[key] = requestMessage.Headers[key]; + } + } + var sendRequestFunc = CoreUtility._isLocalDocumentUrl(requestInfo.url) + ? HttpUtility.sendLocalDocumentRequest + : HttpUtility.sendRequest; + return sendRequestFunc(requestInfo).then(function (responseInfo) { + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null, + RawErrorResponseBody: CoreUtility._parseErrorResponseBody(responseInfo) + }; + } + return response; + }); + }; + HttpRequestExecutor.SourceLibHeaderValue = 'officejs-rest'; + return HttpRequestExecutor; + }()); + OfficeExtension_1.HttpRequestExecutor = HttpRequestExecutor; + var CommonConstants = (function (_super) { + __extends(CommonConstants, _super); + function CommonConstants() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonConstants.collectionPropertyPath = '_collectionPropertyPath'; + CommonConstants.id = 'Id'; + CommonConstants.idLowerCase = 'id'; + CommonConstants.idPrivate = '_Id'; + CommonConstants.keepReference = '_KeepReference'; + CommonConstants.objectPathIdPrivate = '_ObjectPathId'; + CommonConstants.referenceId = '_ReferenceId'; + CommonConstants.items = '_Items'; + CommonConstants.itemsLowerCase = 'items'; + CommonConstants.scalarPropertyNames = '_scalarPropertyNames'; + CommonConstants.scalarPropertyOriginalNames = '_scalarPropertyOriginalNames'; + CommonConstants.navigationPropertyNames = '_navigationPropertyNames'; + CommonConstants.scalarPropertyUpdateable = '_scalarPropertyUpdateable'; + CommonConstants.previewExecutionObjectId = '_previewExecutionObjectId'; + return CommonConstants; + }(CoreConstants)); + OfficeExtension_1.CommonConstants = CommonConstants; + var CommonUtility = (function (_super) { + __extends(CommonUtility, _super); + function CommonUtility() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonUtility.validateObjectPath = function (clientObject) { + var objectPath = clientObject._objectPath; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + objectPath = objectPath.parentObjectPath; + } + }; + CommonUtility.validateReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + var objectPath = objectPaths[i]; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)) + }); + } + objectPath = objectPath.parentObjectPath; + } + } + } + }; + CommonUtility._toCamelLowerCase = function (name) { + if (CoreUtility.isNullOrEmptyString(name)) { + return name; + } + var index = 0; + while (index < name.length && name.charCodeAt(index) >= 65 && name.charCodeAt(index) <= 90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase() + name.substr(index); + } + else { + return name.toLowerCase(); + } + }; + CommonUtility.adjustToDateTime = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return null; + } + if (typeof value === 'string') { + return new Date(value); + } + if (Array.isArray(value)) { + var arr = value; + for (var i = 0; i < arr.length; i++) { + arr[i] = CommonUtility.adjustToDateTime(arr[i]); + } + return arr; + } + throw CoreUtility._createInvalidArgError({ argumentName: 'date' }); + }; + CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult = function (value) { + var id = value[CommonConstants.id]; + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idLowerCase]; + } + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idPrivate]; + } + return id; + }; + CommonUtility.getObjectPathExpression = function (objectPath) { + var ret = ''; + while (objectPath) { + switch (objectPath.objectPathInfo.ObjectPathType) { + case 1: + ret = ret; + break; + case 2: + ret = 'new()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 3: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + '()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 4: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + (ret.length > 0 ? '.' : '') + ret; + break; + case 5: + ret = 'getItem()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 6: + ret = '_reference()' + (ret.length > 0 ? '.' : '') + ret; + break; + } + objectPath = objectPath.parentObjectPath; + } + return ret; + }; + CommonUtility.setMethodArguments = function (context, argumentInfo, args) { + if (CoreUtility.isNullOrUndefined(args)) { + return null; + } + var referencedObjectPaths = new Array(); + var referencedObjectPathIds = new Array(); + var hasOne = CommonUtility.collectObjectPathInfos(context, args, referencedObjectPaths, referencedObjectPathIds); + argumentInfo.Arguments = args; + if (hasOne) { + argumentInfo.ReferencedObjectPathIds = referencedObjectPathIds; + } + return referencedObjectPaths; + }; + CommonUtility.validateContext = function (context, obj) { + if (context && obj && obj._context !== context) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidRequestContext, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidRequestContext) + }); + } + }; + CommonUtility.isSetSupported = function (apiSetName, apiSetVersion) { + if (typeof CommonUtility.isSetSupportedOverride === "function") { + return CommonUtility.isSetSupportedOverride(apiSetName, apiSetVersion); + } + if (typeof window !== 'undefined' && + window.Office && + window.Office.context && + window.Office.context.requirements) { + return window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion); + } + return true; + }; + CommonUtility.throwIfApiNotSupported = function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!CommonUtility._doApiNotSupportedCheck) { + return; + } + if (!CommonUtility.isSetSupported(apiSetName, apiSetVersion)) { + var message = CoreUtility._getResourceString(CoreResourceStrings.apiNotFoundDetails, [ + apiFullName, + apiSetName + ' ' + apiSetVersion, + hostName + ]); + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.apiNotFound, + httpStatusCode: 404, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + }; + CommonUtility.calculateApiFlags = function (apiFlags, undoableApiSetName, undoableApiSetVersion) { + var undoable = false; + var inMakerRuntime = (window + && window.location + && window.location.href + && window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc") !== -1); + if (typeof CommonUtility.isSetSupportedOverride === "function") { + undoable = CommonUtility.isSetSupportedOverride(undoableApiSetName, undoableApiSetVersion); + } + else if (inMakerRuntime) { + undoable = false; + } + else { + undoable = CommonUtility.isSetSupported(undoableApiSetName, undoableApiSetVersion); + } + if (!undoable) { + apiFlags = apiFlags & (~2); + } + return apiFlags; + }; + CommonUtility._parseSelectExpand = function (select) { + var args = []; + if (!CoreUtility.isNullOrEmptyString(select)) { + var propertyNames = select.split(','); + for (var i = 0; i < propertyNames.length; i++) { + var propertyName = propertyNames[i]; + propertyName = sanitizeForAnyItemsSlash(propertyName.trim()); + if (propertyName.length > 0) { + args.push(propertyName); + } + } + } + return args; + function sanitizeForAnyItemsSlash(propertyName) { + var propertyNameLower = propertyName.toLowerCase(); + if (propertyNameLower === 'items' || propertyNameLower === 'items/') { + return '*'; + } + var itemsSlashLength = 6; + var isItemsSlashOrItemsDot = propertyNameLower.substr(0, itemsSlashLength) === 'items/' || + propertyNameLower.substr(0, itemsSlashLength) === 'items.'; + if (isItemsSlashOrItemsDot) { + propertyName = propertyName.substr(itemsSlashLength); + } + return propertyName.replace(new RegExp('[/.]items[/.]', 'gi'), '/'); + } + }; + CommonUtility.changePropertyNameToCamelLowerCase = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + var propValue = value[key]; + if (key === CommonConstants.items) { + ret = {}; + ret[CommonConstants.itemsLowerCase] = this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else { + var propName = CommonUtility._toCamelLowerCase(key); + ret[propName] = this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.purifyJson = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.purifyJson(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + if (key.charCodeAt(0) !== charCodeUnderscore) { + var propValue = value[key]; + if (typeof propValue === 'object' && propValue !== null && Array.isArray(propValue['items'])) { + propValue = propValue['items']; + } + ret[key] = this.purifyJson(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.collectObjectPathInfos = function (context, args, referencedObjectPaths, referencedObjectPathIds) { + var hasOne = false; + for (var i = 0; i < args.length; i++) { + if (args[i] instanceof ClientObjectBase) { + var clientObject = args[i]; + CommonUtility.validateContext(context, clientObject); + args[i] = clientObject._objectPath.objectPathInfo.Id; + referencedObjectPathIds.push(clientObject._objectPath.objectPathInfo.Id); + referencedObjectPaths.push(clientObject._objectPath); + hasOne = true; + } + else if (Array.isArray(args[i])) { + var childArrayObjectPathIds = new Array(); + var childArrayHasOne = CommonUtility.collectObjectPathInfos(context, args[i], referencedObjectPaths, childArrayObjectPathIds); + if (childArrayHasOne) { + referencedObjectPathIds.push(childArrayObjectPathIds); + hasOne = true; + } + else { + referencedObjectPathIds.push(0); + } + } + else if (CoreUtility.isPlainJsonObject(args[i])) { + referencedObjectPathIds.push(0); + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(args[i], referencedObjectPaths); + } + else { + referencedObjectPathIds.push(0); + } + } + return hasOne; + }; + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds = function (value, referencedObjectPaths) { + var _a, _b; + for (var key in value) { + var propValue = value[key]; + if (propValue instanceof ClientObjectBase) { + referencedObjectPaths.push(propValue._objectPath); + value[key] = (_a = {}, _a[CommonConstants.objectPathIdPrivate] = propValue._objectPath.objectPathInfo.Id, _a); + } + else if (Array.isArray(propValue)) { + for (var i = 0; i < propValue.length; i++) { + if (propValue[i] instanceof ClientObjectBase) { + var elem = propValue[i]; + referencedObjectPaths.push(elem._objectPath); + propValue[i] = (_b = {}, _b[CommonConstants.objectPathIdPrivate] = elem._objectPath.objectPathInfo.Id, _b); + } + else if (CoreUtility.isPlainJsonObject(propValue[i])) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue[i], referencedObjectPaths); + } + } + } + else if (CoreUtility.isPlainJsonObject(propValue)) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue, referencedObjectPaths); + } + else { + } + } + }; + CommonUtility.normalizeName = function (name) { + return name.substr(0, 1).toLowerCase() + name.substr(1); + }; + CommonUtility._doApiNotSupportedCheck = false; + return CommonUtility; + }(CoreUtility)); + OfficeExtension_1.CommonUtility = CommonUtility; + var CommonResourceStrings = (function (_super) { + __extends(CommonResourceStrings, _super); + function CommonResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonResourceStrings.propertyDoesNotExist = 'PropertyDoesNotExist'; + CommonResourceStrings.attemptingToSetReadOnlyProperty = 'AttemptingToSetReadOnlyProperty'; + return CommonResourceStrings; + }(CoreResourceStrings)); + OfficeExtension_1.CommonResourceStrings = CommonResourceStrings; + var ClientRetrieveResult = (function (_super) { + __extends(ClientRetrieveResult, _super); + function ClientRetrieveResult(m_shouldPolyfill) { + var _this = _super.call(this) || this; + _this.m_shouldPolyfill = m_shouldPolyfill; + return _this; + } + ClientRetrieveResult.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (this.m_shouldPolyfill) { + this.m_value = CommonUtility.changePropertyNameToCamelLowerCase(this.m_value); + } + this.m_value = this.removeItemNodes(this.m_value); + }; + ClientRetrieveResult.prototype.removeItemNodes = function (value) { + if (typeof value === 'object' && value !== null && value[CommonConstants.itemsLowerCase]) { + value = value[CommonConstants.itemsLowerCase]; + } + return CommonUtility.purifyJson(value); + }; + return ClientRetrieveResult; + }(ClientResult)); + OfficeExtension_1.ClientRetrieveResult = ClientRetrieveResult; + var TraceActionResultHandler = (function () { + function TraceActionResultHandler(callback) { + this.callback = callback; + } + TraceActionResultHandler.prototype._handleResult = function (value) { + if (this.callback) { + this.callback(); + } + }; + return TraceActionResultHandler; + }()); + var ClientResultCallback = (function (_super) { + __extends(ClientResultCallback, _super); + function ClientResultCallback(callback) { + var _this = _super.call(this) || this; + _this.callback = callback; + return _this; + } + ClientResultCallback.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + this.callback(); + }; + return ClientResultCallback; + }(ClientResult)); + OfficeExtension_1.ClientResultCallback = ClientResultCallback; + var OperationalApiHelper = (function () { + function OperationalApiHelper() { + } + OperationalApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + if (operationType === void 0) { + operationType = 0; + } + if (args === void 0) { + args = []; + } + if (flags === void 0) { + flags = 0; + } + if (resultProcessType === void 0) { + resultProcessType = 0; + } + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResult(); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeMethodWithClientResultCallback = function (callback, obj, methodName) { + var operationType = 0; + var args = []; + var flags = 0; + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResultCallback(callback); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeRetrieve = function (obj, select) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var option; + if (typeof select[0] === 'object' && select[0].hasOwnProperty('$all')) { + if (!select[0]['$all']) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + option = select[0]; + } + else { + option = OperationalApiHelper._parseSelectOption(select); + } + return obj._retrieve(option, new ClientRetrieveResult(shouldPolyfill)); + }; + OperationalApiHelper._parseSelectOption = function (select) { + if (!select || !select[0]) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + var parsedSelect = select[0] && typeof select[0] !== 'string' ? select[0] : select; + return Array.isArray(parsedSelect) ? parsedSelect : OperationalApiHelper.parseRecursiveSelect(parsedSelect); + }; + OperationalApiHelper.parseRecursiveSelect = function (select) { + var deconstruct = function (selectObj) { + return Object.keys(selectObj).reduce(function (scalars, name) { + var value = selectObj[name]; + if (typeof value === 'object') { + return scalars.concat(deconstruct(value).map(function (postfix) { return name + "/" + postfix; })); + } + if (value) { + return scalars.concat(name); + } + return scalars; + }, []); + }; + return deconstruct(select); + }; + OperationalApiHelper.invokeRecursiveUpdate = function (obj, properties) { + return CoreUtility.createPromise(function (resolve, reject) { + obj._recursivelyUpdate(properties); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + obj._context._addServiceApiAction(action, null, resolve, reject); + }); + }; + OperationalApiHelper.createRootServiceObject = function (type, context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + var objectPath = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var objectPath = new ObjectPath(objectPathInfo, null, isCollection, false, 1, flags | 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, false, 1, flags | 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createIndexerObject = function (type, parent, args) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var id = parent._context._nextId(); + var objectPathInfo = { + Id: id, + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var o = new type(parent._context, objectPath); + return o; + }; + OperationalApiHelper.createAndInstantiateMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + return CoreUtility.createPromise(function (resolve, reject) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var result = new ClientResult(); + var actionInfo = { + Id: parent._context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id, + QueryInfo: {} + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = objectPath; + parent._context._addServiceApiAction(action, result, function () { return resolve(new type(parent._context, objectPath)); }, reject); + }); + }; + OperationalApiHelper.createTraceAction = function (context, callback) { + return CoreUtility.createPromise(function (resolve, reject) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + var result = new TraceActionResultHandler(callback); + context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.localDocumentContext = new ClientRequestContextBase(); + return OperationalApiHelper; + }()); + OfficeExtension_1.OperationalApiHelper = OperationalApiHelper; + var GenericEventRegistryOperational = (function () { + function GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform) { + this.eventId = eventId; + this.targetId = targetId; + this.eventArgumentTransform = eventArgumentTransform; + this.registeredCallbacks = []; + } + GenericEventRegistryOperational.prototype.add = function (callback) { + if (this.hasZero()) { + GenericEventRegistration.getGenericEventRegistration('').register(this.eventId, this.targetId, this.registerCallback); + } + this.registeredCallbacks.push(callback); + }; + GenericEventRegistryOperational.prototype.remove = function (callback) { + var index = this.registeredCallbacks.lastIndexOf(callback); + if (index !== -1) { + this.registeredCallbacks.splice(index, 1); + } + }; + GenericEventRegistryOperational.prototype.removeAll = function () { + this.registeredCallbacks = []; + GenericEventRegistration.getGenericEventRegistration('').unregister(this.eventId, this.targetId, this.registerCallback); + }; + GenericEventRegistryOperational.prototype.hasZero = function () { + return this.registeredCallbacks.length === 0; + }; + Object.defineProperty(GenericEventRegistryOperational.prototype, "registerCallback", { + get: function () { + var i = this; + if (!this.outsideCallback) { + this.outsideCallback = function (argument) { + i.call(argument); + }; + } + return this.outsideCallback; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistryOperational.prototype.call = function (rawEventArguments) { + var _this = this; + this.eventArgumentTransform(rawEventArguments).then(function (eventArguments) { + var promises = _this.registeredCallbacks.map(function (callback) { return GenericEventRegistryOperational.callCallback(callback, eventArguments); }); + CoreUtility.Promise.all(promises); + }); + }; + GenericEventRegistryOperational.callCallback = function (callback, eventArguments) { + return CoreUtility._createPromiseFromResult(null) + .then(GenericEventRegistryOperational.wrapCallbackInFunction(callback, eventArguments))["catch"](function (e) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(e)); + }); + }; + GenericEventRegistryOperational.wrapCallbackInFunction = function (callback, args) { + return function () { return callback(args); }; + }; + return GenericEventRegistryOperational; + }()); + OfficeExtension_1.GenericEventRegistryOperational = GenericEventRegistryOperational; + var GlobalEventRegistryOperational = (function () { + function GlobalEventRegistryOperational() { + this.eventToTargetToHandlerMap = {}; + } + Object.defineProperty(GlobalEventRegistryOperational, "globalEventRegistry", { + get: function () { + if (!GlobalEventRegistryOperational.singleton) { + GlobalEventRegistryOperational.singleton = new GlobalEventRegistryOperational(); + } + return GlobalEventRegistryOperational.singleton; + }, + enumerable: true, + configurable: true + }); + GlobalEventRegistryOperational.getGlobalEventRegistry = function (eventId, targetId, eventArgumentTransform) { + var global = GlobalEventRegistryOperational.globalEventRegistry; + var mapGlobal = global.eventToTargetToHandlerMap; + if (!mapGlobal.hasOwnProperty(eventId)) { + mapGlobal[eventId] = {}; + } + var mapEvent = mapGlobal[eventId]; + if (!mapEvent.hasOwnProperty(targetId)) { + mapEvent[targetId] = new GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform); + } + var target = mapEvent[targetId]; + return target; + }; + GlobalEventRegistryOperational.singleton = undefined; + return GlobalEventRegistryOperational; + }()); + OfficeExtension_1.GlobalEventRegistryOperational = GlobalEventRegistryOperational; + var GenericEventHandlerOperational = (function () { + function GenericEventHandlerOperational(genericEventInfo) { + this.genericEventInfo = genericEventInfo; + } + GenericEventHandlerOperational.prototype.add = function (callback) { + var _this = this; + var eventRegistered = undefined; + var promise = CoreUtility.createPromise(function (resolve) { + eventRegistered = resolve; + }); + var addCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.add(callback); + eventRegistered(); + }; + this.register(); + this.createTrace(addCallback); + return promise; + }; + GenericEventHandlerOperational.prototype.remove = function (callback) { + var _this = this; + var removeCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.remove(callback); + }; + this.register(); + this.createTrace(removeCallback); + }; + GenericEventHandlerOperational.prototype.removeAll = function () { + var _this = this; + var removeAllCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.removeAll(); + }; + this.unregister(); + this.createTrace(removeAllCallback); + }; + GenericEventHandlerOperational.prototype.createTrace = function (callback) { + OperationalApiHelper.createTraceAction(this.genericEventInfo.object._context, callback); + }; + GenericEventHandlerOperational.prototype.register = function () { + var operationType = 0; + var args = []; + var flags = 0; + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.register, operationType, args, flags); + if (!GenericEventRegistration.getGenericEventRegistration('').isReady) { + GenericEventRegistration.getGenericEventRegistration('').ready(); + } + }; + GenericEventHandlerOperational.prototype.unregister = function () { + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.unregister); + }; + return GenericEventHandlerOperational; + }()); + OfficeExtension_1.GenericEventHandlerOperational = GenericEventHandlerOperational; + var EventHelper = (function () { + function EventHelper() { + } + EventHelper.invokeOn = function (eventHandler, callback, options) { + var promiseResolve = undefined; + var promise = CoreUtility.createPromise(function (resolve, reject) { + promiseResolve = resolve; + }); + eventHandler.add(callback).then(function () { + promiseResolve({}); + }); + return promise; + }; + EventHelper.invokeOff = function (genericEventHandlersOpObj, eventHandler, eventName, callback) { + if (!eventName && !callback) { + var allGenericEventHandlersOp = Object.keys(genericEventHandlersOpObj).map(function (eventName) { return genericEventHandlersOpObj[eventName]; }); + return EventHelper.invokeAllOff(allGenericEventHandlersOp); + } + if (!eventName) { + return CoreUtility._createPromiseFromException(eventName + " must be supplied if handler is supplied."); + } + if (callback) { + eventHandler.remove(callback); + } + else { + eventHandler.removeAll(); + } + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + EventHelper.invokeAllOff = function (allGenericEventHandlersOperational) { + allGenericEventHandlersOperational.forEach(function (genericEventHandlerOperational) { + genericEventHandlerOperational.removeAll(); + }); + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + return EventHelper; + }()); + OfficeExtension_1.EventHelper = EventHelper; + var ErrorCodes = (function (_super) { + __extends(ErrorCodes, _super); + function ErrorCodes() { + return _super !== null && _super.apply(this, arguments) || this; + } + ErrorCodes.propertyNotLoaded = 'PropertyNotLoaded'; + ErrorCodes.runMustReturnPromise = 'RunMustReturnPromise'; + ErrorCodes.cannotRegisterEvent = 'CannotRegisterEvent'; + ErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + ErrorCodes.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ErrorCodes; + }(CoreErrorCodes)); + OfficeExtension_1.ErrorCodes = ErrorCodes; + var TraceMarkerActionResultHandler = (function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback = callback; + } + TraceMarkerActionResultHandler.prototype._handleResult = function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); + var ActionFactory = (function (_super) { + __extends(ActionFactory, _super); + function ActionFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + ActionFactory.createMethodAction = function (context, parent, methodName, operationType, args, flags) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var fixedFlags = Utility._fixupApiFlags(flags); + var action = new Action(actionInfo, operationType, fixedFlags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + parent._addAction(action); + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (fixedFlags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + Arguments: args, + ObjectId: '', + ObjectType: '' + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return action; + }; + ActionFactory.createRecursiveQueryAction = function (context, parent, query) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 6, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + RecursiveQueryInfo: query + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createEnsureUnchangedAction = function (context, parent, objectState) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 8, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createInstantiateAction = function (context, obj) { + Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); + var actionInfo = { + Id: context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: obj._objectPath.objectPathInfo.Id + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = obj._objectPath; + obj._addAction(action, new InstantiateActionResultHandler(obj), true); + return action; + }; + ActionFactory.createTraceAction = function (context, message, addTraceMessage) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var ret = new Action(actionInfo, 1, 4); + context._pendingRequest.addAction(ret); + if (addTraceMessage) { + context._pendingRequest.addTrace(actionInfo.Id, message); + } + return ret; + }; + ActionFactory.createTraceMarkerForCallback = function (context, callback) { + var action = ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; + return ActionFactory; + }(CommonActionFactory)); + OfficeExtension_1.ActionFactory = ActionFactory; + var ClientObject = (function (_super) { + __extends(ClientObject, _super); + function ClientObject(context, objectPath) { + var _this = _super.call(this, context, objectPath) || this; + Utility.checkArgumentNull(context, 'context'); + _this.m_context = context; + if (_this._objectPath) { + if (!context._processingResult && context._pendingRequest) { + ActionFactory.createInstantiateAction(context, _this); + if (context._autoCleanup && _this._KeepReference) { + context.trackedObjects._autoAdd(_this); + } + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo && _this._objectPath.objectPathInfo && _this._className) { + _this._objectPath.objectPathInfo.T = _this._className; + } + } + return _this; + } + Object.defineProperty(ClientObject.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNull", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNull', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNullObject", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNullObject', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "_isNull", { + get: function () { + return this.m_isNull; + }, + set: function (value) { + this.m_isNull = value; + if (value && this._objectPath) { + this._objectPath._updateAsNullObject(); + } + }, + enumerable: true, + configurable: true + }); + ClientObject.prototype._addAction = function (action, resultHandler, isInstantiationEnsured) { + if (resultHandler === void 0) { + resultHandler = null; + } + if (!isInstantiationEnsured) { + this.context._pendingRequest.ensureInstantiateObjectPath(this._objectPath); + this.context._pendingRequest.ensureInstantiateObjectPaths(action.referencedArgumentObjectPaths); + } + this.context._pendingRequest.addAction(action); + this.context._pendingRequest.addReferencedObjectPath(this._objectPath); + this.context._pendingRequest.addReferencedObjectPaths(action.referencedArgumentObjectPaths); + this.context._pendingRequest.addActionResultHandler(action, resultHandler); + return CoreUtility._createPromiseFromResult(null); + }; + ClientObject.prototype._addPreviewExecutionAction = function (action) { + if (!Utility.isUndefined(this._className)) { + action.ObjectType = this._className; + var objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idLowerCase); + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idPrivate); + } + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.previewExecutionObjectId); + } + action.ObjectId = objectId; + this.context._pendingRequest.addPreviewExecutionAction(action); + } + }; + ClientObject.prototype._handleResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleIdResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + Utility.fixObjectPathIfNecessary(this, value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleRetrieveResult = function (value, result) { + this._handleIdResult(value); + }; + ClientObject.prototype._recursivelySet = function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { + var isClientObject = input instanceof ClientObject; + var originalInput = input; + if (isClientObject) { + if (Object.getPrototypeOf(this) === Object.getPrototypeOf(input)) { + input = JSON.parse(JSON.stringify(input)); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'properties', + errorLocation: this._className + '.set' + }); + } + } + try { + var prop; + for (var i = 0; i < scalarWriteablePropertyNames.length; i++) { + prop = scalarWriteablePropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + this[prop] = input[prop]; + } + } + } + for (var i = 0; i < objectPropertyNames.length; i++) { + prop = objectPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + var dataToPassToSet = isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } + } + } + var throwOnReadOnly = !isClientObject; + if (options && !Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly = options.throwOnReadOnly; + } + for (var i = 0; i < notAllowedToBeSetPropertyNames.length; i++) { + prop = notAllowedToBeSetPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined' && throwOnReadOnly) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + for (prop in input) { + if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); + if (!propertyDescriptor) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, prop), + debugInfo: { + errorLocation: prop + } + }); + } + if (throwOnReadOnly && !propertyDescriptor.set) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.set' + }, + innerError: innerError + }); + } + }; + return ClientObject; + }(ClientObjectBase)); + OfficeExtension_1.ClientObject = ClientObject; + var HostBridgeRequestExecutor = (function () { + function HostBridgeRequestExecutor(session) { + this.m_session = session; + } + HostBridgeRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var httpRequestInfo = { + url: CoreConstants.processQuery, + method: 'POST', + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var controlId = ''; + if (requestMessage.Headers) { + controlId = requestMessage.Headers[Constants.officeControlId]; + } + var message = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + controlId: controlId, + message: httpRequestInfo + }; + CoreUtility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message).then(function (nativeBridgeResponse) { + CoreUtility.log('Received response: ' + JSON.stringify(nativeBridgeResponse)); + var responseInfo = nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession = (function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(m_bridge) { + var _this = _super.call(this) || this; + _this.m_bridge = m_bridge; + _this.m_bridge.addHostMessageHandler(function (message) { + if (message.type === 3) { + var controlId = message.controlId; + if (CoreUtility.isNullOrEmptyString(controlId)) { + GenericEventRegistration.getGenericEventRegistration(controlId)._handleRichApiMessage(message.message); + } + else { + var eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(controlId); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(''); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + } + } + }); + return _this; + } + HostBridgeSession.getInstanceIfHostBridgeInited = function () { + if (HostBridge.instance) { + if (CoreUtility.isNullOrUndefined(HostBridgeSession.s_instance) || + HostBridgeSession.s_instance.m_bridge !== HostBridge.instance) { + HostBridgeSession.s_instance = new HostBridgeSession(HostBridge.instance); + } + return HostBridgeSession.s_instance; + } + return null; + }; + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull = function () { + CoreUtility.log('NativeBridgeSession::CreateRequestExecutor'); + return new HostBridgeRequestExecutor(this); + }; + HostBridgeSession.prototype.getEventRegistration = function (controlId) { + return GenericEventRegistration.getGenericEventRegistration(controlId); + }; + HostBridgeSession.prototype.sendMessageToHost = function (message) { + return this.m_bridge.sendMessageToHostAndExpectResponse(message); + }; + return HostBridgeSession; + }(SessionBase)); + OfficeExtension_1.HostBridgeSession = HostBridgeSession; + var ClientRequestContext = (function (_super) { + __extends(ClientRequestContext, _super); + function ClientRequestContext(url) { + var _this = _super.call(this) || this; + _this.m_customRequestHeaders = {}; + _this.m_batchMode = 0; + _this._onRunFinishedNotifiers = []; + if (SessionBase._overrideSession) { + _this.m_requestUrlAndHeaderInfoResolver = SessionBase._overrideSession; + } + else { + if (Utility.isNullOrUndefined(url) || (typeof url === 'string' && url.length === 0)) { + url = ClientRequestContext.defaultRequestUrlAndHeaders; + if (!url) { + url = { url: CoreConstants.localDocument, headers: {} }; + } + } + if (typeof url === 'string') { + _this.m_requestUrlAndHeaderInfo = { url: url, headers: {} }; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfoResolver(url)) { + _this.m_requestUrlAndHeaderInfoResolver = url; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfo(url)) { + var requestInfo = url; + _this.m_requestUrlAndHeaderInfo = { url: requestInfo.url, headers: {} }; + CoreUtility._copyHeaders(requestInfo.headers, _this.m_requestUrlAndHeaderInfo.headers); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'url' }); + } + } + if (!_this.m_requestUrlAndHeaderInfoResolver && + _this.m_requestUrlAndHeaderInfo && + CoreUtility._isLocalDocumentUrl(_this.m_requestUrlAndHeaderInfo.url) && + HostBridgeSession.getInstanceIfHostBridgeInited()) { + _this.m_requestUrlAndHeaderInfo = null; + _this.m_requestUrlAndHeaderInfoResolver = HostBridgeSession.getInstanceIfHostBridgeInited(); + } + if (_this.m_requestUrlAndHeaderInfoResolver instanceof SessionBase) { + _this.m_session = _this.m_requestUrlAndHeaderInfoResolver; + } + _this._processingResult = false; + _this._customData = Constants.iterativeExecutor; + _this.sync = _this.sync.bind(_this); + return _this; + } + Object.defineProperty(ClientRequestContext.prototype, "session", { + get: function () { + return this.m_session; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "eventRegistration", { + get: function () { + if (this.m_session) { + return this.m_session.getEventRegistration(this._controlId); + } + return _Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_url", { + get: function () { + if (this.m_requestUrlAndHeaderInfo) { + return this.m_requestUrlAndHeaderInfo.url; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_pendingRequest", { + get: function () { + if (this.m_pendingRequest == null) { + this.m_pendingRequest = new ClientRequest(this); + } + return this.m_pendingRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_controlId", { + get: function () { + var ret = this.m_customRequestHeaders[Constants.officeControlId]; + if (CoreUtility.isNullOrUndefined(ret)) { + ret = ''; + } + return ret; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension_1._internalConfig.showDisposeInfoInDebugInfo); + var statements = prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { + get: function () { + if (!this.m_trackedObjects) { + this.m_trackedObjects = new TrackedObjects(this); + } + return this.m_trackedObjects; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "requestHeaders", { + get: function () { + return this.m_customRequestHeaders; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "batchMode", { + get: function () { + return this.m_batchMode; + }, + enumerable: true, + configurable: true + }); + ClientRequestContext.prototype.ensureInProgressBatchIfBatchMode = function () { + if (this.m_batchMode === 1 && !this.m_explicitBatchInProgress) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.notInsideBatch), null); + } + }; + ClientRequestContext.prototype.load = function (clientObj, option) { + Utility.validateContext(this, clientObj); + var queryOption = ClientRequestContext._parseQueryOption(option); + CommonActionFactory.createQueryAction(this, clientObj, queryOption, clientObj); + }; + ClientRequestContext.prototype.loadRecursive = function (clientObj, options, maxDepth) { + if (!Utility.isPlainJsonObject(options)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'options' }); + } + var quries = {}; + for (var key in options) { + quries[key] = ClientRequestContext._parseQueryOption(options[key]); + } + var action = ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); + this._pendingRequest.addActionResultHandler(action, clientObj); + }; + ClientRequestContext.prototype.trace = function (message) { + ActionFactory.createTraceAction(this, message, true); + }; + ClientRequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { }; + ClientRequestContext.prototype.ensureRequestUrlAndHeaderInfo = function () { + var _this = this; + return Utility._createPromiseFromResult(null).then(function () { + if (!_this.m_requestUrlAndHeaderInfo) { + return _this.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function (value) { + _this.m_requestUrlAndHeaderInfo = value; + if (!_this.m_requestUrlAndHeaderInfo) { + _this.m_requestUrlAndHeaderInfo = { url: CoreConstants.localDocument, headers: {} }; + } + if (Utility.isNullOrEmptyString(_this.m_requestUrlAndHeaderInfo.url)) { + _this.m_requestUrlAndHeaderInfo.url = CoreConstants.localDocument; + } + if (!_this.m_requestUrlAndHeaderInfo.headers) { + _this.m_requestUrlAndHeaderInfo.headers = {}; + } + if (typeof _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull === 'function') { + var executor = _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull(); + if (executor) { + _this._requestExecutor = executor; + } + } + }); + } + }); + }; + ClientRequestContext.prototype.syncPrivateMain = function () { + var _this = this; + return this.ensureRequestUrlAndHeaderInfo().then(function () { + var req = _this._pendingRequest; + _this.m_pendingRequest = null; + return _this.processPreSyncPromises(req).then(function () { return _this.syncPrivate(req); }); + }); + }; + ClientRequestContext.prototype.syncPrivate = function (req) { + var _this = this; + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(null); + } + if (!req.hasActions) { + return this.processPendingEventHandlers(req); + } + var _a = req.buildRequestMessageBodyAndRequestFlags(), msgBody = _a.body, requestFlags = _a.flags; + if (this._requestFlagModifier) { + requestFlags |= this._requestFlagModifier; + } + if (!this._requestExecutor) { + if (CoreUtility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + this._requestExecutor = new OfficeJsRequestExecutor(this); + } + else { + this._requestExecutor = new HttpRequestExecutor(); + } + } + var requestExecutor = this._requestExecutor; + var headers = {}; + CoreUtility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + CoreUtility._copyHeaders(this.m_customRequestHeaders, headers); + delete this.m_customRequestHeaders[Constants.officeScriptEventId]; + var testNameWithSequenceId = TestUtility._getCurrentTestNameWithSequenceId(); + if (testNameWithSequenceId) { + headers[CoreConstants.testRequestNameHeader] = testNameWithSequenceId; + } + var requestExecutorRequestMessage = { + Url: this.m_requestUrlAndHeaderInfo.url, + Headers: headers, + Body: msgBody + }; + req.invalidatePendingInvalidObjectPaths(); + var errorFromResponse = null; + var errorFromProcessEventHandlers = null; + this._lastSyncStart = typeof performance === 'undefined' ? Date.now() : performance.now(); + this._lastRequestFlags = requestFlags; + return requestExecutor + .executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) + .then(function (response) { + _this._lastSyncEnd = typeof performance === 'undefined' ? Date.now() : performance.now(); + if (OfficeExtension_1.config.executePerfLogFunc) { + OfficeExtension_1.config.executePerfLogFunc({ syncStart: _this._lastSyncStart, + syncEnd: _this._lastSyncEnd + }); + } + errorFromResponse = _this.processRequestExecutorResponseMessage(req, response); + return _this.processPendingEventHandlers(req)["catch"](function (ex) { + CoreUtility.log('Error in processPendingEventHandlers'); + CoreUtility.log(JSON.stringify(ex)); + errorFromProcessEventHandlers = ex; + }); + }) + .then(function () { + if (errorFromResponse) { + CoreUtility.log('Throw error from response: ' + JSON.stringify(errorFromResponse)); + throw errorFromResponse; + } + if (errorFromProcessEventHandlers) { + CoreUtility.log('Throw error from ProcessEventHandler: ' + JSON.stringify(errorFromProcessEventHandlers)); + var transformedError = null; + if (errorFromProcessEventHandlers instanceof _Internal.RuntimeError) { + transformedError = errorFromProcessEventHandlers; + transformedError.traceMessages = req._responseTraceMessages; + } + else { + var message = null; + if (typeof errorFromProcessEventHandlers === 'string') { + message = errorFromProcessEventHandlers; + } + else { + message = errorFromProcessEventHandlers.message; + } + if (Utility.isNullOrEmptyString(message)) { + message = CoreUtility._getResourceString(ResourceStrings.cannotRegisterEvent); + } + transformedError = new _Internal.RuntimeError({ + code: ErrorCodes.cannotRegisterEvent, + httpStatusCode: 400, + message: message, + traceMessages: req._responseTraceMessages + }); + } + throw transformedError; + } + }); + }; + ClientRequestContext.prototype.processRequestExecutorResponseMessage = function (req, response) { + if (response.Body && response.Body.TraceIds) { + req._setResponseTraceIds(response.Body.TraceIds); + } + var traceMessages = req._responseTraceMessages; + var errorStatementInfo = null; + if (response.Body) { + if (response.Body.Error && response.Body.Error.ActionIndex >= 0) { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, true); + var debugInfoStatementInfo = prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + errorStatementInfo = { + statement: debugInfoStatementInfo.statement, + surroundingStatements: debugInfoStatementInfo.surroundingStatements, + fullStatements: ['Please enable config.extendedErrorLogging to see full statements.'] + }; + if (OfficeExtension_1.config.extendedErrorLogging) { + prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, false); + errorStatementInfo.fullStatements = prettyPrinter.process(); + } + } + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (actionResults) { + this._processingResult = true; + try { + req.processResponse(actionResults); + } + finally { + this._processingResult = false; + } + } + } + if (!Utility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage, + traceMessages: traceMessages, + data: { responseBody: response.RawErrorResponseBody } + }); + } + else if (response.Body && response.Body.Error) { + var debugInfo = { + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement = errorStatementInfo.statement; + debugInfo.surroundingStatements = errorStatementInfo.surroundingStatements; + debugInfo.fullStatements = errorStatementInfo.fullStatements; + } + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message, + traceMessages: traceMessages, + debugInfo: debugInfo + }); + } + return null; + }; + ClientRequestContext.prototype.processPendingEventHandlers = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._pendingProcessEventHandlers.length; i++) { + var eventHandlers = req._pendingProcessEventHandlers[i]; + ret = ret.then(this.createProcessOneEventHandlersFunc(eventHandlers, req)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneEventHandlersFunc = function (eventHandlers, req) { + return function () { return eventHandlers._processRegistration(req); }; + }; + ClientRequestContext.prototype.processPreSyncPromises = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._preSyncPromises.length; i++) { + var p = req._preSyncPromises[i]; + ret = ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc = function (p) { + return function () { return p; }; + }; + ClientRequestContext.prototype.sync = function (passThroughValue) { + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(passThroughValue); + } + return this.syncPrivateMain().then(function () { return passThroughValue; }); + }; + ClientRequestContext.prototype.batch = function (batchBody) { + var _this = this; + if (this.m_batchMode !== 1) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, null, null)); + } + if (this.m_explicitBatchInProgress) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.pendingBatchInProgress), null)); + } + if (Utility.isNullOrUndefined(batchBody)) { + return Utility._createPromiseFromResult(null); + } + this.m_explicitBatchInProgress = true; + var previousRequest = this.m_pendingRequest; + this.m_pendingRequest = new ClientRequest(this); + var batchBodyResult; + try { + batchBodyResult = batchBody(this._rootObject, this); + } + catch (ex) { + this.m_explicitBatchInProgress = false; + this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + } + var request; + var batchBodyResultPromise; + if (typeof batchBodyResult === 'object' && batchBodyResult && typeof batchBodyResult.then === 'function') { + batchBodyResultPromise = Utility._createPromiseFromResult(null) + .then(function () { + return batchBodyResult; + }) + .then(function (result) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return result; + })["catch"](function (ex) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + }); + } + else { + this.m_explicitBatchInProgress = false; + request = this.m_pendingRequest; + this.m_pendingRequest = previousRequest; + batchBodyResultPromise = Utility._createPromiseFromResult(batchBodyResult); + } + return batchBodyResultPromise.then(function (result) { + return _this.ensureRequestUrlAndHeaderInfo() + .then(function () { + return _this.syncPrivate(request); + }) + .then(function () { + return result; + }); + }); + }; + ClientRequestContext._run = function (ctxInitializer, runBody, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runCommon('run', null, ctxInitializer, 0, runBody, numCleanupAttempts, retryDelay, null, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.isValidRequestInfo = function (value) { + return (typeof value === 'string' || + ClientRequestContext.isRequestUrlAndHeaderInfo(value) || + ClientRequestContext.isRequestUrlAndHeaderInfoResolver(value)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfo = function (value) { + return (typeof value === 'object' && + value !== null && + Object.getPrototypeOf(value) === Object.getPrototypeOf({}) && + !Utility.isNullOrUndefined(value.url)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfoResolver = function (value) { + return typeof value === 'object' && value !== null && typeof value._resolveRequestUrlAndHeaderInfo === 'function'; + }; + ClientRequestContext._runBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(0, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runExplicitBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(1, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runBatchCommon = function (batchMode, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + var ctxRetriever; + var batch; + var requestInfo = null; + var previousObjects = null; + var argOffset = 0; + var options = null; + if (receivedRunArgs.length > 0) { + if (ClientRequestContext.isValidRequestInfo(receivedRunArgs[0])) { + requestInfo = receivedRunArgs[0]; + argOffset = 1; + } + else if (Utility.isPlainJsonObject(receivedRunArgs[0])) { + options = receivedRunArgs[0]; + requestInfo = options.session; + if (requestInfo != null && !ClientRequestContext.isValidRequestInfo(requestInfo)) { + return ClientRequestContext.createErrorPromise(functionName); + } + previousObjects = options.previousObjects; + argOffset = 1; + } + } + if (receivedRunArgs.length == argOffset + 1) { + batch = receivedRunArgs[argOffset + 0]; + } + else if (options == null && receivedRunArgs.length == argOffset + 2) { + previousObjects = receivedRunArgs[argOffset + 0]; + batch = receivedRunArgs[argOffset + 1]; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + if (previousObjects != null) { + if (previousObjects instanceof ClientObject) { + ctxRetriever = function () { return previousObjects.context; }; + } + else if (previousObjects instanceof ClientRequestContext) { + ctxRetriever = function () { return previousObjects; }; + } + else if (Array.isArray(previousObjects)) { + var array = previousObjects; + if (array.length == 0) { + return ClientRequestContext.createErrorPromise(functionName); + } + for (var i = 0; i < array.length; i++) { + if (!(array[i] instanceof ClientObject)) { + return ClientRequestContext.createErrorPromise(functionName); + } + if (array[i].context != array[0].context) { + return ClientRequestContext.createErrorPromise(functionName, ResourceStrings.invalidRequestContext); + } + } + ctxRetriever = function () { return array[0].context; }; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + } + else { + ctxRetriever = ctxInitializer; + } + var onBeforeRunWithOptions = null; + if (onBeforeRun) { + onBeforeRunWithOptions = function (context) { return onBeforeRun(options || {}, context); }; + } + return ClientRequestContext._runCommon(functionName, requestInfo, ctxRetriever, batchMode, batch, numCleanupAttempts, retryDelay, onBeforeRunWithOptions, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.createErrorPromise = function (functionName, code) { + if (code === void 0) { + code = CoreResourceStrings.invalidArgument; + } + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(code, CoreUtility._getResourceString(code), functionName)); + }; + ClientRequestContext._runCommon = function (functionName, requestInfo, ctxRetriever, batchMode, runBody, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (SessionBase._overrideSession) { + requestInfo = SessionBase._overrideSession; + } + var starterPromise = CoreUtility.createPromise(function (resolve, reject) { + resolve(); + }); + var ctx; + var succeeded = false; + var resultOrError; + var previousBatchMode; + return starterPromise + .then(function () { + ctx = ctxRetriever(requestInfo); + if (ctx._autoCleanup) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + ctx._onRunFinishedNotifiers.push(function () { + ctx._autoCleanup = true; + resolve(); + }); + }); + } + else { + ctx._autoCleanup = true; + } + }) + .then(function () { + if (typeof runBody !== 'function') { + return ClientRequestContext.createErrorPromise(functionName); + } + previousBatchMode = ctx.m_batchMode; + ctx.m_batchMode = batchMode; + if (onBeforeRun) { + onBeforeRun(ctx); + } + var runBodyResult; + if (batchMode == 1) { + runBodyResult = runBody(ctx.batch.bind(ctx)); + } + else { + runBodyResult = runBody(ctx); + } + if (Utility.isNullOrUndefined(runBodyResult) || typeof runBodyResult.then !== 'function') { + Utility.throwError(ResourceStrings.runMustReturnPromise); + } + return runBodyResult; + }) + .then(function (runBodyResult) { + if (batchMode === 1) { + return runBodyResult; + } + else { + return ctx.sync(runBodyResult); + } + }) + .then(function (result) { + succeeded = true; + resultOrError = result; + })["catch"](function (error) { + resultOrError = error; + }) + .then(function () { + var itemsToRemove = ctx.trackedObjects._retrieveAndClearAutoCleanupList(); + ctx._autoCleanup = false; + ctx.m_batchMode = previousBatchMode; + for (var key in itemsToRemove) { + itemsToRemove[key]._objectPath.isValid = false; + } + var cleanupCounter = 0; + if (Utility._synchronousCleanup || ClientRequestContext.isRequestUrlAndHeaderInfoResolver(requestInfo)) { + return attemptCleanup(); + } + else { + attemptCleanup(); + } + function attemptCleanup() { + cleanupCounter++; + var savedPendingRequest = ctx.m_pendingRequest; + var savedBatchMode = ctx.m_batchMode; + var request = new ClientRequest(ctx); + ctx.m_pendingRequest = request; + ctx.m_batchMode = 0; + try { + for (var key in itemsToRemove) { + ctx.trackedObjects.remove(itemsToRemove[key]); + } + } + finally { + ctx.m_batchMode = savedBatchMode; + ctx.m_pendingRequest = savedPendingRequest; + } + return ctx + .syncPrivate(request) + .then(function () { + if (onCleanupSuccess) { + onCleanupSuccess(cleanupCounter); + } + })["catch"](function () { + if (onCleanupFailure) { + onCleanupFailure(cleanupCounter); + } + if (cleanupCounter < numCleanupAttempts) { + setTimeout(function () { + attemptCleanup(); + }, retryDelay); + } + }); + } + }) + .then(function () { + if (ctx._onRunFinishedNotifiers && ctx._onRunFinishedNotifiers.length > 0) { + var func = ctx._onRunFinishedNotifiers.shift(); + func(); + } + if (succeeded) { + return resultOrError; + } + else { + throw resultOrError; + } + }); + }; + return ClientRequestContext; + }(ClientRequestContextBase)); + OfficeExtension_1.ClientRequestContext = ClientRequestContext; + var RetrieveResultImpl = (function () { + function RetrieveResultImpl(m_proxy, m_shouldPolyfill) { + this.m_proxy = m_proxy; + this.m_shouldPolyfill = m_shouldPolyfill; + var scalarPropertyNames = m_proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = m_proxy[Constants.navigationPropertyNames]; + var typeName = m_proxy[Constants.className]; + var isCollection = m_proxy[Constants.isCollection]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, scalarPropertyNames[i]); + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, navigationPropertyNames[i]); + } + } + if (isCollection) { + Utility.definePropertyThrowUnloadedException(this, typeName, Constants.itemsLowerCase); + } + } + Object.defineProperty(RetrieveResultImpl.prototype, "$proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResultImpl.prototype, "$isNullObject", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: ErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'retrieveResult.$isNullObject' + } + }); + } + return this.m_isNullObject; + }, + enumerable: true, + configurable: true + }); + RetrieveResultImpl.prototype.toJSON = function () { + if (!this.m_isLoaded) { + return undefined; + } + if (this.m_isNullObject) { + return null; + } + if (Utility.isUndefined(this.m_json)) { + this.m_json = Utility.purifyJson(this.m_value); + } + return this.m_json; + }; + RetrieveResultImpl.prototype.toString = function () { + return JSON.stringify(this.toJSON()); + }; + RetrieveResultImpl.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (value === null || (typeof value === 'object' && value && value._IsNull)) { + this.m_isNullObject = true; + value = null; + } + else { + this.m_isNullObject = false; + } + if (this.m_shouldPolyfill) { + value = Utility.changePropertyNameToCamelLowerCase(value); + } + this.m_value = value; + this.m_proxy._handleRetrieveResult(value, this); + }; + return RetrieveResultImpl; + }()); + var Constants = (function (_super) { + __extends(Constants, _super); + function Constants() { + return _super !== null && _super.apply(this, arguments) || this; + } + Constants.getItemAt = 'GetItemAt'; + Constants.index = '_Index'; + Constants.iterativeExecutor = 'IterativeExecutor'; + Constants.isTracked = '_IsTracked'; + Constants.eventMessageCategory = 65536; + Constants.eventWorkbookId = 'Workbook'; + Constants.eventSourceRemote = 'Remote'; + Constants.proxy = '$proxy'; + Constants.className = '_className'; + Constants.isCollection = '_isCollection'; + Constants.collectionPropertyPath = '_collectionPropertyPath'; + Constants.objectPathInfoDoNotKeepReferenceFieldName = 'D'; + Constants.officeScriptEventId = 'X-OfficeScriptEventId'; + Constants.officeScriptFireRecordingEvent = 'X-OfficeScriptFireRecordingEvent'; + Constants.officeControlId = 'X-OfficeControlId'; + return Constants; + }(CommonConstants)); + OfficeExtension_1.Constants = Constants; + var ClientRequest = (function (_super) { + __extends(ClientRequest, _super); + function ClientRequest(context) { + var _this = _super.call(this, context) || this; + _this.m_context = context; + _this.m_pendingProcessEventHandlers = []; + _this.m_pendingEventHandlerActions = {}; + _this.m_traceInfos = {}; + _this.m_responseTraceIds = {}; + _this.m_responseTraceMessages = []; + return _this; + } + Object.defineProperty(ClientRequest.prototype, "traceInfos", { + get: function () { + return this.m_traceInfos; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceMessages", { + get: function () { + return this.m_responseTraceMessages; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceIds", { + get: function () { + return this.m_responseTraceIds; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._setResponseTraceIds = function (value) { + if (value) { + for (var i = 0; i < value.length; i++) { + var traceId = value[i]; + this.m_responseTraceIds[traceId] = traceId; + var message = this.m_traceInfos[traceId]; + if (!CoreUtility.isNullOrUndefined(message)) { + this.m_responseTraceMessages.push(message); + } + } + } + }; + ClientRequest.prototype.addTrace = function (actionId, message) { + this.m_traceInfos[actionId] = message; + }; + ClientRequest.prototype._addPendingEventHandlerAction = function (eventHandlers, action) { + if (!this.m_pendingEventHandlerActions[eventHandlers._id]) { + this.m_pendingEventHandlerActions[eventHandlers._id] = []; + this.m_pendingProcessEventHandlers.push(eventHandlers); + } + this.m_pendingEventHandlerActions[eventHandlers._id].push(action); + }; + Object.defineProperty(ClientRequest.prototype, "_pendingProcessEventHandlers", { + get: function () { + return this.m_pendingProcessEventHandlers; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._getPendingEventHandlerActions = function (eventHandlers) { + return this.m_pendingEventHandlerActions[eventHandlers._id]; + }; + return ClientRequest; + }(ClientRequestBase)); + OfficeExtension_1.ClientRequest = ClientRequest; + var EventHandlers = (function () { + function EventHandlers(context, parentObject, name, eventInfo) { + var _this = this; + this.m_id = context._nextId(); + this.m_context = context; + this.m_name = name; + this.m_handlers = []; + this.m_registered = false; + this.m_eventInfo = eventInfo; + this.m_callback = function (args) { + _this.m_eventInfo.eventArgsTransformFunc(args).then(function (newArgs) { return _this.fireEvent(newArgs); }); + }; + } + Object.defineProperty(EventHandlers.prototype, "_registered", { + get: function () { + return this.m_registered; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_id", { + get: function () { + return this.m_id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_handlers", { + get: function () { + return this.m_handlers; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); + EventHandlers.prototype.add = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 0 + }); + return new EventHandlerResult(this.m_context, this, handler); + }; + EventHandlers.prototype.remove = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 1 + }); + }; + EventHandlers.prototype.removeAll = function () { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: null, + operation: 2 + }); + }; + EventHandlers.prototype._processRegistration = function (req) { + var _this = this; + var ret = CoreUtility._createPromiseFromResult(null); + var actions = req._getPendingEventHandlerActions(this); + if (!actions) { + return ret; + } + var handlersResult = []; + for (var i = 0; i < this.m_handlers.length; i++) { + handlersResult.push(this.m_handlers[i]); + } + var hasChange = false; + for (var i = 0; i < actions.length; i++) { + if (req._responseTraceIds[actions[i].id]) { + hasChange = true; + switch (actions[i].operation) { + case 0: + handlersResult.push(actions[i].handler); + break; + case 1: + for (var index = handlersResult.length - 1; index >= 0; index--) { + if (handlersResult[index] === actions[i].handler) { + handlersResult.splice(index, 1); + break; + } + } + break; + case 2: + handlersResult = []; + break; + } + } + } + if (hasChange) { + if (!this.m_registered && handlersResult.length > 0) { + ret = ret.then(function () { return _this.m_eventInfo.registerFunc(_this.m_callback); }).then(function () { return (_this.m_registered = true); }); + } + else if (this.m_registered && handlersResult.length == 0) { + ret = ret + .then(function () { return _this.m_eventInfo.unregisterFunc(_this.m_callback); })["catch"](function (ex) { + CoreUtility.log('Error when unregister event: ' + JSON.stringify(ex)); + }) + .then(function () { return (_this.m_registered = false); }); + } + ret = ret.then(function () { return (_this.m_handlers = handlersResult); }); + } + return ret; + }; + EventHandlers.prototype.fireEvent = function (args) { + var promises = []; + for (var i = 0; i < this.m_handlers.length; i++) { + var handler = this.m_handlers[i]; + var p = CoreUtility._createPromiseFromResult(null) + .then(this.createFireOneEventHandlerFunc(handler, args))["catch"](function (ex) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(ex)); + }); + promises.push(p); + } + CoreUtility.Promise.all(promises); + }; + EventHandlers.prototype.createFireOneEventHandlerFunc = function (handler, args) { + return function () { return handler(args); }; + }; + return EventHandlers; + }()); + OfficeExtension_1.EventHandlers = EventHandlers; + var EventHandlerResult = (function () { + function EventHandlerResult(context, handlers, handler) { + this.m_context = context; + this.m_allHandlers = handlers; + this.m_handler = handler; + } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + EventHandlerResult.prototype.remove = function () { + if (this.m_allHandlers && this.m_handler) { + this.m_allHandlers.remove(this.m_handler); + this.m_allHandlers = null; + this.m_handler = null; + } + }; + return EventHandlerResult; + }()); + OfficeExtension_1.EventHandlerResult = EventHandlerResult; + (function (_Internal) { + var OfficeJsEventRegistration = (function () { + function OfficeJsEventRegistration() { + } + OfficeJsEventRegistration.prototype.register = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingDataChanged, handler, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingSelectionChanged, handler, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); + }); + case 5: + return OSF.DDA.RichApi.richApiMessageManager.register(handler); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { id: targetId }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { id: targetId }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { id: targetId }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + OfficeJsEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingDataChanged, { handler: handler }, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingSelectionChanged, { handler: handler }, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); + }); + case 5: + return Utility.promisify(function (callback) { + return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync('richApiMessage', { handler: handler }, callback); + }); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { id: targetId, handler: handler }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { id: targetId, handler: handler }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { id: targetId, handler: handler }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + return OfficeJsEventRegistration; + }()); + _Internal.officeJsEventRegistration = new OfficeJsEventRegistration(); + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var EventRegistration = (function () { + function EventRegistration(registerEventImpl, unregisterEventImpl) { + this.m_handlersByEventByTarget = {}; + this.m_registerEventImpl = registerEventImpl; + this.m_unregisterEventImpl = unregisterEventImpl; + } + EventRegistration.getTargetIdOrDefault = function (targetId) { + if (Utility.isNullOrUndefined(targetId)) { + return ''; + } + return targetId; + }; + EventRegistration.prototype.getHandlers = function (eventId, targetId) { + targetId = EventRegistration.getTargetIdOrDefault(targetId); + var handlersById = this.m_handlersByEventByTarget[eventId]; + if (!handlersById) { + handlersById = {}; + this.m_handlersByEventByTarget[eventId] = handlersById; + } + var handlers = handlersById[targetId]; + if (!handlers) { + handlers = []; + handlersById[targetId] = handlers; + } + return handlers; + }; + EventRegistration.prototype.callHandlers = function (eventId, targetId, argument) { + var funcs = this.getHandlers(eventId, targetId); + for (var i = 0; i < funcs.length; i++) { + funcs[i](argument); + } + }; + EventRegistration.prototype.hasHandlers = function (eventId, targetId) { + return this.getHandlers(eventId, targetId).length > 0; + }; + EventRegistration.prototype.register = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + handlers.push(handler); + if (handlers.length === 1) { + return this.m_registerEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + EventRegistration.prototype.unregister = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length === 0) { + return this.m_unregisterEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + return EventRegistration; + }()); + OfficeExtension_1.EventRegistration = EventRegistration; + var GenericEventRegistration = (function () { + function GenericEventRegistration() { + this.m_eventRegistration = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler = this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready = function () { + var _this = this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready = GenericEventRegistration._testReadyImpl().then(function () { + _this.m_isReady = true; + }); + } + else if (HostBridge.instance) { + this.m_ready = Utility._createPromiseFromResult(null).then(function () { + _this.m_isReady = true; + }); + } + else { + this.m_ready = _Internal.officeJsEventRegistration + .register(5, '', this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady = true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage = function (msg) { + if (msg && msg.entries) { + for (var entryIndex = 0; entryIndex < msg.entries.length; entryIndex++) { + var entry = msg.entries[entryIndex]; + if (entry.messageCategory == Constants.eventMessageCategory) { + if (CoreUtility._logEnabled) { + CoreUtility.log(JSON.stringify(entry)); + } + var eventId = entry.messageType; + var targetId = entry.targetId; + var hasHandlers = this.m_eventRegistration.hasHandlers(eventId, targetId); + if (hasHandlers) { + var arg = JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source = Constants.eventSourceRemote; + } + this.m_eventRegistration.callHandlers(eventId, targetId, arg); + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + if (!ret) { + ret = new GenericEventRegistration(); + GenericEventRegistration.s_genericEventRegistrations[controlId] = ret; + } + return ret; + }; + GenericEventRegistration.peekGenericEventRegistrationOrNull = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + return ret; + }; + GenericEventRegistration.richApiMessageEventCategory = 65536; + GenericEventRegistration.s_genericEventRegistrations = {}; + return GenericEventRegistration; + }()); + OfficeExtension_1.GenericEventRegistration = GenericEventRegistration; + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl = impl; + } + OfficeExtension_1._testSetRichApiMessageReadyImpl = _testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration('')._handleRichApiMessage(msg); + } + OfficeExtension_1._testTriggerRichApiMessageEvent = _testTriggerRichApiMessageEvent; + var GenericEventHandlers = (function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + var _this = _super.call(this, context, parentObject, name, eventInfo) || this; + _this.m_genericEventInfo = eventInfo; + return _this; + } + GenericEventHandlers.prototype.add = function (handler) { + var _this = this; + if (this._handlers.length == 0 && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + var controlId = this._context._controlId; + if (!GenericEventRegistration.getGenericEventRegistration(controlId).isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration(controlId).ready()); + } + ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length == 1) { + GenericEventRegistration.getGenericEventRegistration(controlId).register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove = function (handler) { + var _this = this; + if (this._handlers.length == 1 && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + var controlId = this._context._controlId; + ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers = _this._handlers; + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length == 0) { + GenericEventRegistration.getGenericEventRegistration(controlId).unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll = function () { }; + return GenericEventHandlers; + }(EventHandlers)); + OfficeExtension_1.GenericEventHandlers = GenericEventHandlers; + var InstantiateActionResultHandler = (function () { + function InstantiateActionResultHandler(clientObject) { + this.m_clientObject = clientObject; + } + InstantiateActionResultHandler.prototype._handleResult = function (value) { + this.m_clientObject._handleIdResult(value); + }; + return InstantiateActionResultHandler; + }()); + var ObjectPathFactory = (function () { + function ObjectPathFactory() { + } + ObjectPathFactory.createGlobalObjectObjectPath = function (context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + return new ObjectPath(objectPathInfo, null, false, false, 1, 4); + }; + ObjectPathFactory.createNewObjectObjectPath = function (context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var ret = new ObjectPath(objectPathInfo, null, isCollection, false, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createPropertyObjectPath = function (context, parent, propertyName, isCollection, isInvalidAfterRequest, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createIndexerObjectPath = function (context, parent, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createIndexerObjectPathUsingParentPath = function (context, parentObjectPath, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parentObjectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parentObjectPath, false, false, 1, 4); + }; + ObjectPathFactory.createMethodObjectPath = function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = Utility.setMethodArguments(context, objectPathInfo.ArgumentInfo, args); + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, Utility._fixupApiFlags(flags)); + ret.argumentObjectPaths = argumentObjectPaths; + ret.getByIdMethodName = getByIdMethodName; + return ret; + }; + ObjectPathFactory.createReferenceIdObjectPath = function (context, referenceId) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + var ret = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return ret; + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt = function (hasIndexerMethod, context, parent, childItem, index) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + if (hasIndexerMethod && !Utility.isNullOrUndefined(id)) { + return ObjectPathFactory.createChildItemObjectPathUsingIndexer(context, parent, childItem); + } + else { + return ObjectPathFactory.createChildItemObjectPathUsingGetItemAt(context, parent, childItem, index); + } + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexer = function (context, parent, childItem) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + var objectPathInfo = (objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }); + objectPathInfo.ArgumentInfo.Arguments = [id]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createChildItemObjectPathUsingGetItemAt = function (context, parent, childItem, index) { + var indexFromServer = childItem[Constants.index]; + if (indexFromServer) { + index = indexFromServer; + } + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: Constants.getItemAt, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = [index]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + return ObjectPathFactory; + }()); + OfficeExtension_1.ObjectPathFactory = ObjectPathFactory; + var OfficeJsRequestExecutor = (function () { + function OfficeJsRequestExecutor(context) { + this.m_context = context; + } + OfficeJsRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); + return new OfficeExtension_1.Promise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (result.status == 'succeeded') { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBody(result), RichApiMessageUtility.getResponseHeaders(result)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); + } + resolve(response); + }); + }); + }; + OfficeJsRequestExecutor.SourceLibHeaderValue = 'officejs'; + return OfficeJsRequestExecutor; + }()); + var TrackedObjects = (function () { + function TrackedObjects(context) { + this._autoCleanupList = {}; + this.m_context = context; + } + TrackedObjects.prototype.add = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._addCommon(item, true); }); + } + else { + this._addCommon(param, true); + } + }; + TrackedObjects.prototype._autoAdd = function (object) { + this._addCommon(object, false); + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + }; + TrackedObjects.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue = function (object, resultValue) { + var shouldAutoTrack = this.m_context._autoCleanup && + !object[Constants.isTracked] && + object !== this.m_context._rootObject && + resultValue && + !Utility.isNullOrEmptyString(resultValue[Constants.referenceId]); + if (shouldAutoTrack) { + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype._addCommon = function (object, isExplicitlyAdded) { + if (object[Constants.isTracked]) { + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + return; + } + var referenceId = object[Constants.referenceId]; + var donotKeepReference = object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName]; + if (donotKeepReference) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.objectIsUntracked), null); + } + if (Utility.isNullOrEmptyString(referenceId) && object._KeepReference) { + object._KeepReference(); + ActionFactory.createInstantiateAction(this.m_context, object); + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype.remove = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._removeCommon(item); }); + } + else { + this._removeCommon(param); + } + }; + TrackedObjects.prototype._removeCommon = function (object) { + object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName] = true; + object.context._pendingRequest._removeKeepReferenceAction(object._objectPath.objectPathInfo.Id); + var referenceId = object[Constants.referenceId]; + if (!Utility.isNullOrEmptyString(referenceId)) { + var rootObject = this.m_context._rootObject; + if (rootObject._RemoveReference) { + rootObject._RemoveReference(referenceId); + } + } + delete object[Constants.isTracked]; + }; + TrackedObjects.prototype._retrieveAndClearAutoCleanupList = function () { + var list = this._autoCleanupList; + this._autoCleanupList = {}; + return list; + }; + return TrackedObjects; + }()); + OfficeExtension_1.TrackedObjects = TrackedObjects; + var RequestPrettyPrinter = (function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose, removePII) { + if (!globalObjName) { + globalObjName = 'root'; + } + this.m_globalObjName = globalObjName; + this.m_referencedObjectPaths = referencedObjectPaths; + this.m_actions = actions; + this.m_statements = []; + this.m_variableNameForObjectPathMap = {}; + this.m_variableNameToObjectPathMap = {}; + this.m_declaredObjectPathMap = {}; + this.m_showDispose = showDispose; + this.m_removePII = removePII; + } + RequestPrettyPrinter.prototype.process = function () { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo = function (actionIndex) { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount = 5; + this.m_statements = []; + var oneStatement = ''; + var statementIndex = -1; + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex == i) { + statementIndex = this.m_statements.length - 1; + } + if (statementIndex >= 0 && this.m_statements.length > statementIndex + surroundingCount + 1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex = statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex = 0; + } + var endIndex = statementIndex + 1 + surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex = this.m_statements.length; + } + var surroundingStatements = []; + if (startIndex != 0) { + surroundingStatements.push('...'); + } + for (var i_1 = startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push('// >>>>>'); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push('// <<<<<'); + for (var i_2 = statementIndex + 1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push('...'); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction = function (action) { + var actionInfo = action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + case 9: + this.processUpdateAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction = function (action) { + var objId = action.actionInfo.ObjectPathId; + var objPath = this.m_referencedObjectPaths[objId]; + var varName = this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement = 'var ' + varName + ' = ' + this.buildObjectPathExpressionWithParent(objPath) + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId] = varName; + } + else { + var statement = '// Instantiate {' + varName + '}'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction = function (action) { + var methodName = action.actionInfo.Name; + if (methodName === '_KeepReference') { + if (!OfficeExtension_1._internalConfig.showInternalApiInDebugInfo) { + return; + } + methodName = 'track'; + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(methodName) + + '(' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.load(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.retrieve(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction = function (action) { + var queryExp = ''; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp = JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.loadRecursive(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(action.actionInfo.Name) + + ' = ' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction = function (action) { + var statement = 'context.trace();'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.ensureUnchanged(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processUpdateAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.update(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant = function (statement, action) { + var _this = this; + if (this.m_showDispose) { + var lastUsedObjectPathIds = action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose = lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(', '); + return statement + ' // And then dispose {' + objectNamesToDispose + '}'; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression = function (action) { + if (action.actionInfo.QueryInfo) { + var option = {}; + option.select = action.actionInfo.QueryInfo.Select; + option.expand = action.actionInfo.QueryInfo.Expand; + option.skip = action.actionInfo.QueryInfo.Skip; + option.top = action.actionInfo.QueryInfo.Top; + if (typeof option.top === 'undefined' && + typeof option.skip === 'undefined' && + typeof option.expand === 'undefined') { + if (typeof option.select === 'undefined') { + return ''; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ''; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent = function (objPath) { + var hasParent = objPath.objectPathInfo.ObjectPathType == 5 || + objPath.objectPathInfo.ObjectPathType == 3 || + objPath.objectPathInfo.ObjectPathType == 4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return (this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId) + '.' + this.buildObjectPathExpression(objPath)); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression = function (objPath) { + var expr = this.buildObjectPathInfoExpression(objPath.objectPathInfo); + var originalObjectPathInfo = objPath.originalObjectPathInfo; + if (originalObjectPathInfo) { + expr = expr + ' /* originally ' + this.buildObjectPathInfoExpression(originalObjectPathInfo) + ' */'; + } + return expr; + }; + RequestPrettyPrinter.prototype.buildObjectPathInfoExpression = function (objectPathInfo) { + switch (objectPathInfo.ObjectPathType) { + case 1: + return 'context.' + this.m_globalObjName; + case 5: + return 'getItem(' + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + ')'; + case 3: + return (Utility._toCamelLowerCase(objectPathInfo.Name) + + '(' + + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + + ')'); + case 2: + return objectPathInfo.Name + '.newObject()'; + case 7: + return 'null'; + case 4: + return Utility._toCamelLowerCase(objectPathInfo.Name); + case 6: + return ('context.' + this.m_globalObjName + '._getObjectByReferenceId(' + JSON.stringify(objectPathInfo.Name) + ')'); + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression = function (args) { + var ret = ''; + if (!args.Arguments || args.Arguments.length === 0) { + return ret; + } + if (this.m_removePII) { + if (typeof args.Arguments[0] === 'undefined') { + return ret; + } + return '...'; + } + for (var i = 0; i < args.Arguments.length; i++) { + if (i > 0) { + ret = ret + ', '; + } + ret = + ret + + this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret === 'undefined') { + ret = ''; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral = function (value, objectPathId) { + if (typeof value == 'number' && value === objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase = function (objectPathId) { + var ret = 'v'; + var objPath = this.m_referencedObjectPaths[objectPathId]; + if (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret = this.m_globalObjName; + break; + case 4: + ret = Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName = objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3) === 'Get') { + methodName = methodName.substr(3); + } + ret = Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName = this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1) === 's') { + ret = parentName.substr(0, parentName.length - 1); + } + else { + ret = parentName + 'Item'; + } + break; + } + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName = function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret = this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + } + var i = 1; + while (this.m_variableNameToObjectPathMap[ret + i.toString()]) { + i++; + } + ret = ret + i.toString(); + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + var ResourceStrings = (function (_super) { + __extends(ResourceStrings, _super); + function ResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + ResourceStrings.cannotRegisterEvent = 'CannotRegisterEvent'; + ResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + ResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + ResourceStrings.propertyNotLoaded = 'PropertyNotLoaded'; + ResourceStrings.runMustReturnPromise = 'RunMustReturnPromise'; + ResourceStrings.moreInfoInnerError = 'MoreInfoInnerError'; + ResourceStrings.cannotApplyPropertyThroughSetMethod = 'CannotApplyPropertyThroughSetMethod'; + ResourceStrings.invalidOperationInCellEditMode = 'InvalidOperationInCellEditMode'; + ResourceStrings.objectIsUntracked = 'ObjectIsUntracked'; + ResourceStrings.customFunctionDefintionMissing = 'CustomFunctionDefintionMissing'; + ResourceStrings.customFunctionImplementationMissing = 'CustomFunctionImplementationMissing'; + ResourceStrings.customFunctionNameContainsBadChars = 'CustomFunctionNameContainsBadChars'; + ResourceStrings.customFunctionNameCannotSplit = 'CustomFunctionNameCannotSplit'; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch = 'CustomFunctionUnexpectedNumberOfEntriesInResultBatch'; + ResourceStrings.customFunctionCancellationHandlerMissing = 'CustomFunctionCancellationHandlerMissing'; + ResourceStrings.customFunctionInvalidFunction = 'CustomFunctionInvalidFunction'; + ResourceStrings.customFunctionInvalidFunctionMapping = 'CustomFunctionInvalidFunctionMapping'; + ResourceStrings.customFunctionWindowMissing = 'CustomFunctionWindowMissing'; + ResourceStrings.customFunctionDefintionMissingOnWindow = 'CustomFunctionDefintionMissingOnWindow'; + ResourceStrings.pendingBatchInProgress = 'PendingBatchInProgress'; + ResourceStrings.notInsideBatch = 'NotInsideBatch'; + ResourceStrings.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ResourceStrings; + }(CommonResourceStrings)); + OfficeExtension_1.ResourceStrings = ResourceStrings; + CoreUtility.addResourceStringValues({ + CannotRegisterEvent: 'The event handler cannot be registered.', + PropertyNotLoaded: "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.", + RunMustReturnPromise: 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".', + InvalidOrTimedOutSessionMessage: 'Your Office Online session has expired or is invalid. To continue, refresh the page.', + InvalidOperationInCellEditMode: 'Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.', + InvalidSheetName: 'The request cannot be processed because the specified worksheet cannot be found. Please try again.', + CustomFunctionDefintionMissing: "A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.", + CustomFunctionDefintionMissingOnWindow: "A property with the name '{0}' that represents the function's definition must exist on the window object.", + CustomFunctionImplementationMissing: "The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.", + CustomFunctionNameContainsBadChars: 'The function name may only contain letters, digits, underscores, and periods.', + CustomFunctionNameCannotSplit: 'The function name must contain a non-empty namespace and a non-empty short name.', + CustomFunctionUnexpectedNumberOfEntriesInResultBatch: "The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.", + CustomFunctionCancellationHandlerMissing: 'The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.', + CustomFunctionInvalidFunction: "The property with the name '{0}' that represents the function's definition is not a valid function.", + CustomFunctionInvalidFunctionMapping: "The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.", + CustomFunctionWindowMissing: 'The window object was not found.', + PendingBatchInProgress: 'There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.', + NotInsideBatch: 'Operations may not be invoked outside of a batch method.', + CannotUpdateReadOnlyProperty: "The property '{0}' is read-only and it cannot be updated.", + ObjectIsUntracked: 'The object is untracked.' + }); + var Utility = (function (_super) { + __extends(Utility, _super); + function Utility() { + return _super !== null && _super.apply(this, arguments) || this; + } + Utility.fixObjectPathIfNecessary = function (clientObject, value) { + if (clientObject && clientObject._objectPath && value) { + clientObject._objectPath.updateUsingObjectData(value, clientObject); + } + }; + Utility.load = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve = function (clientObj, option) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !Utility.isSetSupported('RichApiRuntime', '1.1'); + } + var result = new RetrieveResultImpl(clientObj, shouldPolyfill); + clientObj._retrieve(option, result); + return result; + }; + Utility.retrieveAndSync = function (clientObj, option) { + var result = Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); + }; + Utility.toJson = function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result = {}; + for (var prop in scalarProperties) { + var value = scalarProperties[prop]; + if (typeof value !== 'undefined') { + result[prop] = value; + } + } + for (var prop in navigationProperties) { + var value = navigationProperties[prop]; + if (typeof value !== 'undefined') { + if (value[Utility.fieldName_isCollection] && typeof value[Utility.fieldName_m__items] !== 'undefined') { + result[prop] = value.toJSON()['items']; + } + else { + result[prop] = value.toJSON(); + } + } + } + if (collectionItemsIfAny) { + result['items'] = collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; + }; + Utility.throwError = function (resourceId, arg, errorLocation) { + throw new _Internal.RuntimeError({ + code: resourceId, + httpStatusCode: 400, + message: CoreUtility._getResourceString(resourceId, arg), + debugInfo: errorLocation ? { errorLocation: errorLocation } : undefined + }); + }; + Utility.createRuntimeError = function (code, message, location, httpStatusCode, data) { + return new _Internal.RuntimeError({ + code: code, + httpStatusCode: httpStatusCode, + message: message, + debugInfo: { errorLocation: location }, + data: data + }); + }; + Utility.throwIfNotLoaded = function (propertyName, fieldValue, entityName, isNull) { + if (!isNull && + CoreUtility.isUndefined(fieldValue) && + propertyName.charCodeAt(0) != Utility.s_underscoreCharCode && + !Utility.s_suppressPropertyNotLoadedException) { + throw Utility.createPropertyNotLoadedException(entityName, propertyName); + } + }; + Utility._getPropertyValueWithoutCheckLoaded = function (object, propertyName) { + Utility.s_suppressPropertyNotLoadedException = true; + try { + return object[propertyName]; + } + finally { + Utility.s_suppressPropertyNotLoadedException = false; + } + }; + Utility.createPropertyNotLoadedException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.propertyNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.propertyNotLoaded, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.createCannotUpdateReadOnlyPropertyException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.cannotUpdateReadOnlyProperty, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotUpdateReadOnlyProperty, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.promisify = function (action) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + var callback = function (result) { + if (result.status == 'failed') { + reject(result.error); + } + else { + resolve(result.value); + } + }; + action(callback); + }); + }; + Utility._addActionResultHandler = function (clientObj, action, resultHandler) { + clientObj.context._pendingRequest.addActionResultHandler(action, resultHandler); + }; + Utility._handleNavigationPropertyResults = function (clientObj, objectValue, propertyNames) { + for (var i = 0; i < propertyNames.length - 1; i += 2) { + if (!CoreUtility.isUndefined(objectValue[propertyNames[i + 1]])) { + clientObj[propertyNames[i]]._handleResult(objectValue[propertyNames[i + 1]]); + } + } + }; + Utility._fixupApiFlags = function (flags) { + if (typeof flags === 'boolean') { + if (flags) { + flags = 1; + } + else { + flags = 0; + } + } + return flags; + }; + Utility.definePropertyThrowUnloadedException = function (obj, typeName, propertyName) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + throw Utility.createPropertyNotLoadedException(typeName, propertyName); + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(typeName, propertyName); + } + }); + }; + Utility.defineReadOnlyPropertyWithValue = function (obj, propertyName, value) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + return value; + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(null, propertyName); + } + }); + }; + Utility.processRetrieveResult = function (proxy, value, result, childItemCreateFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + return; + } + if (childItemCreateFunc) { + var data = value[Constants.itemsLowerCase]; + if (Array.isArray(data)) { + var itemsResult = []; + for (var i = 0; i < data.length; i++) { + var itemProxy = childItemCreateFunc(data[i], i); + var itemResult = {}; + itemResult[Constants.proxy] = itemProxy; + itemProxy._handleRetrieveResult(data[i], itemResult); + itemsResult.push(itemResult); + } + Utility.defineReadOnlyPropertyWithValue(result, Constants.itemsLowerCase, itemsResult); + } + } + else { + var scalarPropertyNames = proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = proxy[Constants.navigationPropertyNames]; + var typeName = proxy[Constants.className]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + var propName = scalarPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + Utility.defineReadOnlyPropertyWithValue(result, propName, propValue); + } + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + var propName = navigationPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + var propProxy = proxy[propName]; + var propResult = {}; + propProxy._handleRetrieveResult(propValue, propResult); + propResult[Constants.proxy] = propProxy; + if (Array.isArray(propResult[Constants.itemsLowerCase])) { + propResult = propResult[Constants.itemsLowerCase]; + } + Utility.defineReadOnlyPropertyWithValue(result, propName, propResult); + } + } + } + } + }; + Utility.setMockData = function (clientObj, value, childItemCreateFunc, setItemsFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + clientObj._handleResult(value); + return; + } + if (clientObj[Constants.scalarPropertyOriginalNames]) { + var result = {}; + var scalarPropertyOriginalNames = clientObj[Constants.scalarPropertyOriginalNames]; + var scalarPropertyNames = clientObj[Constants.scalarPropertyNames]; + for (var i = 0; i < scalarPropertyNames.length; i++) { + if (typeof (value[scalarPropertyNames[i]]) !== 'undefined') { + result[scalarPropertyOriginalNames[i]] = value[scalarPropertyNames[i]]; + } + } + clientObj._handleResult(result); + } + if (clientObj[Constants.navigationPropertyNames]) { + var navigationPropertyNames = clientObj[Constants.navigationPropertyNames]; + for (var i = 0; i < navigationPropertyNames.length; i++) { + if (typeof (value[navigationPropertyNames[i]]) !== 'undefined') { + var navigationPropValue = clientObj[navigationPropertyNames[i]]; + if (navigationPropValue.setMockData) { + navigationPropValue.setMockData(value[navigationPropertyNames[i]]); + } + } + } + } + if (clientObj[Constants.isCollection] && childItemCreateFunc) { + var itemsData = Array.isArray(value) ? value : value[Constants.itemsLowerCase]; + if (Array.isArray(itemsData)) { + var items = []; + for (var i = 0; i < itemsData.length; i++) { + var item = childItemCreateFunc(itemsData, i); + Utility.setMockData(item, itemsData[i]); + items.push(item); + } + setItemsFunc(items); + } + } + }; + Utility.applyMixin = function (derived, base) { + Object.getOwnPropertyNames(base.prototype).forEach(function (name) { + if (name !== 'constructor') { + Object.defineProperty(derived.prototype, name, Object.getOwnPropertyDescriptor(base.prototype, name)); + } + }); + }; + Utility.ensureTypeInitialized = function (type) { + var context = new ClientRequestContext(); + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, "Temp", false, 0); + new type(context, objectPath); + }; + Utility.fieldName_m__items = 'm__items'; + Utility.fieldName_isCollection = '_isCollection'; + Utility._synchronousCleanup = false; + Utility.s_underscoreCharCode = '_'.charCodeAt(0); + Utility.s_suppressPropertyNotLoadedException = false; + return Utility; + }(CommonUtility)); + OfficeExtension_1.Utility = Utility; + var BatchApiHelper = (function () { + function BatchApiHelper() { + } + BatchApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + var action = ActionFactory.createMethodAction(obj.context, obj, methodName, operationType, args, flags); + var result = new ClientResult(resultProcessType); + Utility._addActionResultHandler(obj, action, result); + return result; + }; + BatchApiHelper.invokeEnsureUnchanged = function (obj, objectState) { + ActionFactory.createEnsureUnchangedAction(obj.context, obj, objectState); + }; + BatchApiHelper.invokeSetProperty = function (obj, propName, propValue, flags) { + ActionFactory.createSetPropertyAction(obj.context, obj, propName, propValue, flags); + }; + BatchApiHelper.createRootServiceObject = function (type, context) { + var objectPath = ObjectPathFactory.createGlobalObjectObjectPath(context); + return new type(context, objectPath); + }; + BatchApiHelper.createObjectFromReferenceId = function (type, context, referenceId) { + var objectPath = ObjectPathFactory.createReferenceIdObjectPath(context, referenceId); + return new type(context, objectPath); + }; + BatchApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, typeName, isCollection, flags); + return new type(context, objectPath); + }; + BatchApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPath = ObjectPathFactory.createPropertyObjectPath(parent.context, parent, propertyName, isCollection, false, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createIndexerObject = function (type, parent, args) { + var objectPath = ObjectPathFactory.createIndexerObjectPath(parent.context, parent, args); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPath = ObjectPathFactory.createMethodObjectPath(parent.context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createChildItemObject = function (type, hasIndexerMethod, parent, chileItem, index) { + var objectPath = ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt(hasIndexerMethod, parent.context, parent, chileItem, index); + return new type(parent.context, objectPath); + }; + return BatchApiHelper; + }()); + OfficeExtension_1.BatchApiHelper = BatchApiHelper; + var LibraryBuilder = (function () { + function LibraryBuilder(options) { + this.m_namespaceMap = {}; + this.m_namespace = options.metadata.name; + this.m_targetNamespaceObject = options.targetNamespaceObject; + this.m_namespaceMap[this.m_namespace] = options.targetNamespaceObject; + if (options.namespaceMap) { + for (var ns in options.namespaceMap) { + this.m_namespaceMap[ns] = options.namespaceMap[ns]; + } + } + this.m_defaultApiSetName = options.metadata.defaultApiSetName; + this.m_hostName = options.metadata.hostName; + var metadata = options.metadata; + if (metadata.enumTypes) { + for (var i = 0; i < metadata.enumTypes.length; i++) { + this.buildEnumType(metadata.enumTypes[i]); + } + } + if (metadata.apiSets) { + for (var i = 0; i < metadata.apiSets.length; i++) { + var elem = metadata.apiSets[i]; + if (Array.isArray(elem)) { + metadata.apiSets[i] = { + version: elem[0], + name: elem[1] || this.m_defaultApiSetName + }; + } + } + this.m_apiSets = metadata.apiSets; + } + this.m_strings = metadata.strings; + if (metadata.clientObjectTypes) { + for (var i = 0; i < metadata.clientObjectTypes.length; i++) { + var elem = metadata.clientObjectTypes[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 11); + metadata.clientObjectTypes[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + collectionPropertyPath: this.getString(elem[6]), + newObjectServerTypeFullName: this.getString(elem[9]), + newObjectApiFlags: elem[10], + childItemTypeFullName: this.getString(elem[7]), + scalarProperties: elem[2], + navigationProperties: elem[3], + scalarMethods: elem[4], + navigationMethods: elem[5], + events: elem[8] + }; + } + this.buildClientObjectType(metadata.clientObjectTypes[i], options.fullyInitialize); + } + } + } + LibraryBuilder.prototype.ensureArraySize = function (value, size) { + var count = size - value.length; + while (count > 0) { + value.push(0); + count--; + } + }; + LibraryBuilder.prototype.getString = function (ordinalOrValue) { + if (typeof (ordinalOrValue) === "number") { + if (ordinalOrValue > 0) { + return this.m_strings[ordinalOrValue - 1]; + } + return null; + } + return ordinalOrValue; + }; + LibraryBuilder.prototype.buildEnumType = function (elem) { + var enumType; + if (Array.isArray(elem)) { + enumType = { + name: elem[0], + fields: elem[2] + }; + if (!enumType.fields) { + enumType.fields = {}; + } + var fieldsWithCamelUpperCaseValue = elem[1]; + if (Array.isArray(fieldsWithCamelUpperCaseValue)) { + for (var index = 0; index < fieldsWithCamelUpperCaseValue.length; index++) { + enumType.fields[fieldsWithCamelUpperCaseValue[index]] = this.toSimpleCamelUpperCase(fieldsWithCamelUpperCaseValue[index]); + } + } + } + else { + enumType = elem; + } + this.m_targetNamespaceObject[enumType.name] = enumType.fields; + }; + LibraryBuilder.prototype.buildClientObjectType = function (typeInfo, fullyInitialize) { + var thisBuilder = this; + var type = function (context, objectPath) { + ClientObject.apply(this, arguments); + if (!thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited) { + thisBuilder.buildPrototype(thisBuilder.m_targetNamespaceObject[typeInfo.name], typeInfo); + thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited = true; + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo) { + if (this._objectPath && this._objectPath.objectPathInfo && this._className) { + this._objectPath.objectPathInfo.T = this._className; + } + } + }; + this.m_targetNamespaceObject[typeInfo.name] = type; + this.extendsType(type, ClientObject); + this.buildNewObject(type, typeInfo); + if ((typeInfo.behaviorFlags & 2) !== 0) { + type.prototype._KeepReference = function () { + BatchApiHelper.invokeMethod(this, "_KeepReference", 1, [], 0, 0); + }; + } + if ((typeInfo.behaviorFlags & 32) !== 0) { + var func = this.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_StaticCustomize"); + func.call(null, type); + } + if (fullyInitialize) { + this.buildPrototype(type, typeInfo); + type._typeInited = true; + } + }; + LibraryBuilder.prototype.extendsType = function (d, b) { + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + LibraryBuilder.prototype.findObjectUnderPath = function (top, paths, pathStartIndex) { + var obj = top; + for (var i = pathStartIndex; i < paths.length; i++) { + if (typeof (obj) !== 'object') { + throw new OfficeExtension_1.Error("Cannot find " + paths.join(".")); + } + obj = obj[paths[i]]; + } + return obj; + }; + LibraryBuilder.prototype.getFunction = function (fullName) { + var ret = this.resolveObjectByFullName(fullName); + if (typeof (ret) !== 'function') { + throw new OfficeExtension_1.Error("Cannot find function or type: " + fullName); + } + return ret; + }; + LibraryBuilder.prototype.resolveObjectByFullName = function (fullName) { + var parts = fullName.split('.'); + if (parts.length === 1) { + return this.m_targetNamespaceObject[parts[0]]; + } + var rootName = parts[0]; + if (rootName === this.m_namespace) { + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 1); + } + if (this.m_namespaceMap[rootName]) { + return this.findObjectUnderPath(this.m_namespaceMap[rootName], parts, 1); + } + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 0); + }; + LibraryBuilder.prototype.evaluateSimpleExpression = function (expression, thisObj) { + if (Utility.isNullOrUndefined(expression)) { + return null; + } + var paths = expression.split('.'); + if (paths.length === 3 && paths[0] === 'OfficeExtension' && paths[1] === 'Constants') { + return Constants[paths[2]]; + } + if (paths[0] === 'this') { + var obj = thisObj; + for (var i = 1; i < paths.length; i++) { + if (paths[i] == 'toString()') { + obj = obj.toString(); + } + else if (paths[i].substr(paths[i].length - 2) === "()") { + obj = obj[paths[i].substr(0, paths[i].length - 2)](); + } + else { + obj = obj[paths[i]]; + } + } + return obj; + } + throw new OfficeExtension_1.Error("Cannot evaluate: " + expression); + }; + LibraryBuilder.prototype.evaluateEventTargetId = function (targetIdExpression, thisObj) { + if (Utility.isNullOrEmptyString(targetIdExpression)) { + return ''; + } + return this.evaluateSimpleExpression(targetIdExpression, thisObj); + }; + LibraryBuilder.prototype.isAllDigits = function (expression) { + var charZero = '0'.charCodeAt(0); + var charNine = '9'.charCodeAt(0); + for (var i = 0; i < expression.length; i++) { + if (expression.charCodeAt(i) < charZero || + expression.charCodeAt(i) > charNine) { + return false; + } + } + return true; + }; + LibraryBuilder.prototype.evaluateEventType = function (eventTypeExpression) { + if (Utility.isNullOrEmptyString(eventTypeExpression)) { + return 0; + } + if (this.isAllDigits(eventTypeExpression)) { + return parseInt(eventTypeExpression); + } + var ret = this.resolveObjectByFullName(eventTypeExpression); + if (typeof (ret) !== 'number') { + throw new OfficeExtension_1.Error("Invalid event type: " + eventTypeExpression); + } + return ret; + }; + LibraryBuilder.prototype.buildPrototype = function (type, typeInfo) { + this.buildScalarProperties(type, typeInfo); + this.buildNavigationProperties(type, typeInfo); + this.buildScalarMethods(type, typeInfo); + this.buildNavigationMethods(type, typeInfo); + this.buildEvents(type, typeInfo); + this.buildHandleResult(type, typeInfo); + this.buildHandleIdResult(type, typeInfo); + this.buildHandleRetrieveResult(type, typeInfo); + this.buildLoad(type, typeInfo); + this.buildRetrieve(type, typeInfo); + this.buildSetMockData(type, typeInfo); + this.buildEnsureUnchanged(type, typeInfo); + this.buildUpdate(type, typeInfo); + this.buildSet(type, typeInfo); + this.buildToJSON(type, typeInfo); + this.buildItems(type, typeInfo); + this.buildTypeMetadataInfo(type, typeInfo); + this.buildTrackUntrack(type, typeInfo); + this.buildMixin(type, typeInfo); + }; + LibraryBuilder.prototype.toSimpleCamelUpperCase = function (name) { + return name.substr(0, 1).toUpperCase() + name.substr(1); + }; + LibraryBuilder.prototype.ensureOriginalName = function (member) { + if (member.originalName === null) { + member.originalName = this.toSimpleCamelUpperCase(member.name); + } + }; + LibraryBuilder.prototype.getFieldName = function (member) { + return "m_" + member.name; + }; + LibraryBuilder.prototype.throwIfApiNotSupported = function (typeInfo, member) { + if (this.m_apiSets && member.apiSetInfoOrdinal > 0) { + var apiSetInfo = this.m_apiSets[member.apiSetInfoOrdinal - 1]; + if (apiSetInfo) { + Utility.throwIfApiNotSupported(typeInfo.name + "." + member.name, apiSetInfo.name, apiSetInfo.version, this.m_hostName); + } + } + }; + LibraryBuilder.prototype.buildScalarProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarProperties)) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var elem = typeInfo.scalarProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 6); + typeInfo.scalarProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + originalName: this.getString(elem[3]), + setMethodApiFlags: elem[4], + undoableApiSetInfoOrdinal: elem[5] + }; + } + this.buildScalarProperty(type, typeInfo, typeInfo.scalarProperties[i]); + } + } + }; + LibraryBuilder.prototype.calculateApiFlags = function (apiFlags, undoableApiSetInfoOrdinal) { + if (undoableApiSetInfoOrdinal > 0) { + var undoableApiSetInfo = this.m_apiSets[undoableApiSetInfoOrdinal - 1]; + if (undoableApiSetInfo) { + apiFlags = CommonUtility.calculateApiFlags(apiFlags, undoableApiSetInfo.name, undoableApiSetInfo.version); + } + } + return apiFlags; + }; + LibraryBuilder.prototype.buildScalarProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + Utility.throwIfNotLoaded(propInfo.name, this[fieldName], typeInfo.name, this._isNull); + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildNavigationProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationProperties)) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + var elem = typeInfo.navigationProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 8); + typeInfo.navigationProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[4]), + getMethodApiFlags: elem[5], + setMethodApiFlags: elem[6], + propertyTypeFullName: this.getString(elem[1]), + undoableApiSetInfoOrdinal: elem[7] + }; + } + this.buildNavigationProperty(type, typeInfo, typeInfo.navigationProperties[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + if (!this[thisBuilder.getFieldName(propInfo)]) { + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + this[fieldName] = BatchApiHelper.createPropertyObject(thisBuilder.getFunction(propInfo.propertyTypeFullName), this, propInfo.originalName, (propInfo.behaviorFlags & 16) !== 0, propInfo.getMethodApiFlags); + } + if (propInfo.behaviorFlags & 64) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Get"); + customizationFunc.call(this, this, this[fieldName]); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildScalarMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarMethods)) { + for (var i = 0; i < typeInfo.scalarMethods.length; i++) { + var elem = typeInfo.scalarMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.scalarMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[5]), + apiFlags: elem[4], + parameterCount: elem[1], + undoableApiSetInfoOrdinal: elem[6] + }; + } + this.buildScalarMethod(type, typeInfo, typeInfo.scalarMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildScalarMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + var resultProcessType = 0; + if (methodInfo.behaviorFlags & 32) { + resultProcessType = 1; + } + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.invokeMethod(this, methodInfo.originalName, operationType, args, apiFlags, resultProcessType); + }; + }; + LibraryBuilder.prototype.buildNavigationMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationMethods)) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + var elem = typeInfo.navigationMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 9); + typeInfo.navigationMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[3], + apiSetInfoOrdinal: elem[4], + originalName: this.getString(elem[6]), + apiFlags: elem[5], + parameterCount: elem[2], + returnTypeFullName: this.getString(elem[1]), + returnObjectGetByIdMethodName: this.getString(elem[7]), + undoableApiSetInfoOrdinal: elem[8] + }; + } + this.buildNavigationMethod(type, typeInfo, typeInfo.navigationMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + if ((methodInfo.behaviorFlags & 16) !== 0) { + return BatchApiHelper.createIndexerObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, args); + } + else { + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.createMethodObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, methodInfo.originalName, operationType, args, (methodInfo.behaviorFlags & 4) !== 0, (methodInfo.behaviorFlags & 8) !== 0, methodInfo.returnObjectGetByIdMethodName, apiFlags); + } + }; + }; + LibraryBuilder.prototype.buildHandleResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleResult = function (value) { + ClientObject.prototype._handleResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + Utility.fixObjectPathIfNecessary(this, value); + if (typeInfo.behaviorFlags & 8) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i_3 = 0; i_3 < typeInfo.scalarProperties.length; i_3++) { + if (!Utility.isUndefined(value[typeInfo.scalarProperties[i_3].originalName])) { + if ((typeInfo.scalarProperties[i_3].behaviorFlags & 8) !== 0) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i_3].originalName]); + } + else { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = value[typeInfo.scalarProperties[i_3].originalName]; + } + } + } + } + if (typeInfo.navigationProperties) { + var propNames = []; + for (var i_4 = 0; i_4 < typeInfo.navigationProperties.length; i_4++) { + propNames.push(typeInfo.navigationProperties[i_4].name); + propNames.push(typeInfo.navigationProperties[i_4].originalName); + } + Utility._handleNavigationPropertyResults(this, value, propNames); + } + if ((typeInfo.behaviorFlags & 1) !== 0) { + var hasIndexerMethod = thisBuilder.hasIndexMethod(typeInfo); + if (!Utility.isNullOrUndefined(value[Constants.items])) { + this.m__items = []; + var _data = value[Constants.items]; + var childItemType = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + for (var i = 0; i < _data.length; i++) { + var _item = BatchApiHelper.createChildItemObject(childItemType, hasIndexerMethod, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + } + }; + }; + LibraryBuilder.prototype.buildHandleRetrieveResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleRetrieveResult = function (value, result) { + ClientObject.prototype._handleRetrieveResult.call(this, value, result); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if (typeInfo.scalarProperties[i].behaviorFlags & 8) { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].name])) { + value[typeInfo.scalarProperties[i].name] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i].name]); + } + } + } + } + if (typeInfo.behaviorFlags & 1) { + var hasIndexerMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + var childItemType_1 = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + var thisObj_1 = this; + Utility.processRetrieveResult(thisObj_1, value, result, function (childItemData, index) { return BatchApiHelper.createChildItemObject(childItemType_1, hasIndexerMethod_1, thisObj_1, childItemData, index); }); + } + else { + Utility.processRetrieveResult(this, value, result); + } + }; + }; + LibraryBuilder.prototype.buildHandleIdResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleIdResult = function (value) { + ClientObject.prototype._handleIdResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.behaviorFlags & 16) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleIdResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var propName = typeInfo.scalarProperties[i].originalName; + if (propName === "Id" || propName === "_Id" || propName === "_ReferenceId") { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].originalName])) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])] = value[typeInfo.scalarProperties[i].originalName]; + } + } + } + } + }; + }; + LibraryBuilder.prototype.buildLoad = function (type, typeInfo) { + type.prototype.load = function (options) { + return Utility.load(this, options); + }; + }; + LibraryBuilder.prototype.buildRetrieve = function (type, typeInfo) { + type.prototype.retrieve = function (options) { + return Utility.retrieve(this, options); + }; + }; + LibraryBuilder.prototype.buildNewObject = function (type, typeInfo) { + if (!Utility.isNullOrEmptyString(typeInfo.newObjectServerTypeFullName)) { + type.newObject = function (context) { + return BatchApiHelper.createTopLevelServiceObject(type, context, typeInfo.newObjectServerTypeFullName, (typeInfo.behaviorFlags & 1) !== 0, typeInfo.newObjectApiFlags); + }; + } + }; + LibraryBuilder.prototype.buildSetMockData = function (type, typeInfo) { + var thisBuilder = this; + if (typeInfo.behaviorFlags & 1) { + var hasIndexMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + type.prototype.setMockData = function (data) { + var thisObj = this; + Utility.setMockData(thisObj, data, function (childItemData, index) { + return BatchApiHelper.createChildItemObject(thisBuilder.getFunction(typeInfo.childItemTypeFullName), hasIndexMethod_1, thisObj, childItemData, index); + }, function (items) { + thisObj.m__items = items; + }); + }; + } + else { + type.prototype.setMockData = function (data) { + Utility.setMockData(this, data); + }; + } + }; + LibraryBuilder.prototype.buildEnsureUnchanged = function (type, typeInfo) { + type.prototype.ensureUnchanged = function (data) { + BatchApiHelper.invokeEnsureUnchanged(this, data); + }; + }; + LibraryBuilder.prototype.buildUpdate = function (type, typeInfo) { + type.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + }; + LibraryBuilder.prototype.buildSet = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) !== 0) { + return; + } + var notAllowedToBeSetPropertyNames = []; + var allowedScalarPropertyNames = []; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 2) === 0 && + (typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + allowedScalarPropertyNames.push(typeInfo.scalarProperties[i].name); + } + else { + notAllowedToBeSetPropertyNames.push(typeInfo.scalarProperties[i].name); + } + } + } + var allowedNavigationPropertyNames = []; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 16) !== 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 1) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 32) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else { + allowedNavigationPropertyNames.push(typeInfo.navigationProperties[i].name); + } + } + } + if (allowedNavigationPropertyNames.length === 0 && allowedScalarPropertyNames.length === 0) { + return; + } + type.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, allowedScalarPropertyNames, allowedNavigationPropertyNames, notAllowedToBeSetPropertyNames); + }; + }; + LibraryBuilder.prototype.buildItems = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) === 0) { + return; + } + Object.defineProperty(type.prototype, "items", { + get: function () { + Utility.throwIfNotLoaded("items", this.m__items, typeInfo.name, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildToJSON = function (type, typeInfo) { + var thisBuilder = this; + if ((typeInfo.behaviorFlags & 1) !== 0) { + type.prototype.toJSON = function () { + return Utility.toJson(this, {}, {}, this.m__items); + }; + return; + } + else { + type.prototype.toJSON = function () { + var scalarProperties = {}; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + scalarProperties[typeInfo.scalarProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])]; + } + } + } + var navProperties = {}; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 1) !== 0) { + navProperties[typeInfo.navigationProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.navigationProperties[i])]; + } + } + } + return Utility.toJson(this, scalarProperties, navProperties); + }; + } + }; + LibraryBuilder.prototype.buildTypeMetadataInfo = function (type, typeInfo) { + Object.defineProperty(type.prototype, "_className", { + get: function () { + return typeInfo.name; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_isCollection", { + get: function () { + return (typeInfo.behaviorFlags & 1) !== 0; + }, + enumerable: true, + configurable: true + }); + if (!Utility.isNullOrEmptyString(typeInfo.collectionPropertyPath)) { + Object.defineProperty(type.prototype, "_collectionPropertyPath", { + get: function () { + return typeInfo.collectionPropertyPath; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.scalarProperties && typeInfo.scalarProperties.length > 0) { + Object.defineProperty(type.prototype, "_scalarPropertyNames", { + get: function () { + if (!this.m__scalarPropertyNames) { + this.m__scalarPropertyNames = typeInfo.scalarProperties.map(function (p) { return p.name; }); + } + return this.m__scalarPropertyNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyOriginalNames", { + get: function () { + if (!this.m__scalarPropertyOriginalNames) { + this.m__scalarPropertyOriginalNames = typeInfo.scalarProperties.map(function (p) { return p.originalName; }); + } + return this.m__scalarPropertyOriginalNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyUpdateable", { + get: function () { + if (!this.m__scalarPropertyUpdateable) { + this.m__scalarPropertyUpdateable = typeInfo.scalarProperties.map(function (p) { return (p.behaviorFlags & 2) === 0; }); + } + return this.m__scalarPropertyUpdateable; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.navigationProperties && typeInfo.navigationProperties.length > 0) { + Object.defineProperty(type.prototype, "_navigationPropertyNames", { + get: function () { + if (!this.m__navigationPropertyNames) { + this.m__navigationPropertyNames = typeInfo.navigationProperties.map(function (p) { return p.name; }); + } + return this.m__navigationPropertyNames; + }, + enumerable: true, + configurable: true + }); + } + }; + LibraryBuilder.prototype.buildTrackUntrack = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 2) { + type.prototype.track = function () { + this.context.trackedObjects.add(this); + return this; + }; + type.prototype.untrack = function () { + this.context.trackedObjects.remove(this); + return this; + }; + } + }; + LibraryBuilder.prototype.buildMixin = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 4) { + var mixinType = this.getFunction(typeInfo.name + 'Custom'); + Utility.applyMixin(type, mixinType); + } + }; + LibraryBuilder.prototype.getOnEventName = function (name) { + if (name[0] === '_') { + return '_on' + name.substr(1); + } + return 'on' + name; + }; + LibraryBuilder.prototype.buildEvents = function (type, typeInfo) { + if (typeInfo.events) { + for (var i = 0; i < typeInfo.events.length; i++) { + var elem = typeInfo.events[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.events[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + typeExpression: this.getString(elem[3]), + targetIdExpression: this.getString(elem[4]), + register: this.getString(elem[5]), + unregister: this.getString(elem[6]) + }; + } + this.buildEvent(type, typeInfo, typeInfo.events[i]); + } + } + }; + LibraryBuilder.prototype.buildEvent = function (type, typeInfo, evt) { + if (evt.behaviorFlags & 1) { + this.buildV0Event(type, typeInfo, evt); + } + else { + this.buildV2Event(type, typeInfo, evt); + } + }; + LibraryBuilder.prototype.buildV2Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (evt.register !== 'null') { + registerFunc = this[evt.register].bind(this); + } + var unregisterFunc = null; + if (evt.unregister !== 'null') { + unregisterFunc = this[evt.unregister].bind(this); + } + var getTargetIdFunc = function () { + return thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + }; + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + var eventType = thisBuilder.evaluateEventType(evt.typeExpression); + this[fieldName] = new GenericEventHandlers(this.context, this, evt.name, { + eventType: eventType, + getTargetIdFunc: getTargetIdFunc, + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildV0Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (Utility.isNullOrEmptyString(evt.register)) { + var eventType_1 = thisBuilder.evaluateEventType(evt.typeExpression); + registerFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.register(eventType_1, targetId, handlerCallback); + }; + } + else if (evt.register !== 'null') { + var func_1 = thisBuilder.getFunction(evt.register); + registerFunc = + function (handlerCallback) { + return func_1.call(thisObj, thisObj, handlerCallback); + }; + } + var unregisterFunc = null; + if (Utility.isNullOrEmptyString(evt.unregister)) { + var eventType_2 = thisBuilder.evaluateEventType(evt.typeExpression); + unregisterFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.unregister(eventType_2, targetId, handlerCallback); + }; + } + else if (evt.unregister !== 'null') { + var func_2 = thisBuilder.getFunction(evt.unregister); + unregisterFunc = + function (handlerCallback) { + return func_2.call(thisObj, thisObj, handlerCallback); + }; + } + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + this[fieldName] = new EventHandlers(this.context, this, evt.name, { + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.hasIndexMethod = function (typeInfo) { + var ret = false; + if (typeInfo.navigationMethods) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + if ((typeInfo.navigationMethods[i].behaviorFlags & 16) !== 0) { + ret = true; + break; + } + } + } + return ret; + }; + LibraryBuilder.CustomizationCodeNamespace = "_CC"; + return LibraryBuilder; + }()); + OfficeExtension_1.LibraryBuilder = LibraryBuilder; + var versionToken = 1; + var internalConfiguration = { + invokeRequestModifier: function (request) { + request.DdaMethod.Version = versionToken; + return request; + }, + invokeResponseModifier: function (args) { + versionToken = args.Version; + if (args.Error) { + args.error = {}; + args.error.Code = args.Error; + } + return args; + } + }; + var CommunicationConstants; + (function (CommunicationConstants) { + CommunicationConstants["SendingId"] = "sId"; + CommunicationConstants["RespondingId"] = "rId"; + CommunicationConstants["CommandKey"] = "command"; + CommunicationConstants["SessionInfoKey"] = "sessionInfo"; + CommunicationConstants["ParamsKey"] = "params"; + CommunicationConstants["ApiReadyCommand"] = "apiready"; + CommunicationConstants["ExecuteMethodCommand"] = "executeMethod"; + CommunicationConstants["GetAppContextCommand"] = "getAppContext"; + CommunicationConstants["RegisterEventCommand"] = "registerEvent"; + CommunicationConstants["UnregisterEventCommand"] = "unregisterEvent"; + CommunicationConstants["FireEventCommand"] = "fireEvent"; + })(CommunicationConstants || (CommunicationConstants = {})); + var EmbeddedConstants = (function () { + function EmbeddedConstants() { + } + EmbeddedConstants.sessionContext = 'sc'; + EmbeddedConstants.embeddingPageOrigin = 'EmbeddingPageOrigin'; + EmbeddedConstants.embeddingPageSessionInfo = 'EmbeddingPageSessionInfo'; + return EmbeddedConstants; + }()); + OfficeExtension_1.EmbeddedConstants = EmbeddedConstants; + var EmbeddedSession = (function (_super) { + __extends(EmbeddedSession, _super); + function EmbeddedSession(url, options) { + var _this = _super.call(this) || this; + _this.m_chosenWindow = null; + _this.m_chosenOrigin = null; + _this.m_enabled = true; + _this.m_onMessageHandler = _this._onMessage.bind(_this); + _this.m_callbackList = {}; + _this.m_id = 0; + _this.m_timeoutId = -1; + _this.m_appContext = null; + _this.m_url = url; + _this.m_options = options; + if (!_this.m_options) { + _this.m_options = { sessionKey: Math.random().toString() }; + } + if (!_this.m_options.sessionKey) { + _this.m_options.sessionKey = Math.random().toString(); + } + if (!_this.m_options.container) { + _this.m_options.container = document.body; + } + if (!_this.m_options.timeoutInMilliseconds) { + _this.m_options.timeoutInMilliseconds = 60000; + } + if (!_this.m_options.height) { + _this.m_options.height = '400px'; + } + if (!_this.m_options.width) { + _this.m_options.width = '100%'; + } + if (!(_this.m_options.webApplication && + _this.m_options.webApplication.accessToken && + _this.m_options.webApplication.accessTokenTtl)) { + _this.m_options.webApplication = null; + } + return _this; + } + EmbeddedSession.prototype._getIFrameSrc = function () { + var origin = window.location.protocol + '//' + window.location.host; + var toAppend = EmbeddedConstants.embeddingPageOrigin + + '=' + + encodeURIComponent(origin) + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + encodeURIComponent(this.m_options.sessionKey); + var useHash = false; + if (this.m_url.toLowerCase().indexOf('/_layouts/preauth.aspx') > 0 || + this.m_url.toLowerCase().indexOf('/_layouts/15/preauth.aspx') > 0) { + useHash = true; + } + var a = document.createElement('a'); + a.href = this.m_url; + if (this.m_options.webApplication) { + var toAppendWAC = EmbeddedConstants.embeddingPageOrigin + + '=' + + origin + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + this.m_options.sessionKey; + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + else { + a.search = a.search + '&' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + } + else if (useHash) { + if (a.hash.length === 0 || a.hash === '#') { + a.hash = '#' + toAppend; + } + else { + a.hash = a.hash + '&' + toAppend; + } + } + else { + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + toAppend; + } + else { + a.search = a.search + '&' + toAppend; + } + } + var iframeSrc = a.href; + return iframeSrc; + }; + EmbeddedSession.prototype.init = function () { + var _this = this; + window.addEventListener('message', this.m_onMessageHandler); + var iframeSrc = this._getIFrameSrc(); + return CoreUtility.createPromise(function (resolve, reject) { + var iframeElement = document.createElement('iframe'); + if (_this.m_options.id) { + iframeElement.id = _this.m_options.id; + iframeElement.name = _this.m_options.id; + } + iframeElement.style.height = _this.m_options.height; + iframeElement.style.width = _this.m_options.width; + if (!_this.m_options.webApplication) { + iframeElement.src = iframeSrc; + _this.m_options.container.appendChild(iframeElement); + } + else { + var webApplicationForm = document.createElement('form'); + webApplicationForm.setAttribute('action', iframeSrc); + webApplicationForm.setAttribute('method', 'post'); + webApplicationForm.setAttribute('target', iframeElement.name); + _this.m_options.container.appendChild(webApplicationForm); + var token_input = document.createElement('input'); + token_input.setAttribute('type', 'hidden'); + token_input.setAttribute('name', 'access_token'); + token_input.setAttribute('value', _this.m_options.webApplication.accessToken); + webApplicationForm.appendChild(token_input); + var token_ttl_input = document.createElement('input'); + token_ttl_input.setAttribute('type', 'hidden'); + token_ttl_input.setAttribute('name', 'access_token_ttl'); + token_ttl_input.setAttribute('value', _this.m_options.webApplication.accessTokenTtl); + webApplicationForm.appendChild(token_ttl_input); + _this.m_options.container.appendChild(iframeElement); + webApplicationForm.submit(); + } + _this.m_timeoutId = window.setTimeout(function () { + _this.close(); + var err = Utility.createRuntimeError(CoreErrorCodes.timeout, CoreUtility._getResourceString(CoreResourceStrings.timeout), 'EmbeddedSession.init'); + reject(err); + }, _this.m_options.timeoutInMilliseconds); + _this.m_promiseResolver = resolve; + }); + }; + EmbeddedSession.prototype._invoke = function (method, callback, params) { + if (!this.m_enabled) { + callback(5001, null); + return; + } + if (internalConfiguration.invokeRequestModifier) { + params = internalConfiguration.invokeRequestModifier(params); + } + this._sendMessageWithCallback(this.m_id++, method, params, function (args) { + if (internalConfiguration.invokeResponseModifier) { + args = internalConfiguration.invokeResponseModifier(args); + } + var errorCode = args['Error']; + delete args['Error']; + callback(errorCode || 0, args); + }); + }; + EmbeddedSession.prototype.close = function () { + window.removeEventListener('message', this.m_onMessageHandler); + window.clearTimeout(this.m_timeoutId); + this.m_enabled = false; + }; + EmbeddedSession.prototype.getEventRegistration = function (controlId) { + if (!this.m_sessionEventManager) { + this.m_sessionEventManager = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + } + return this.m_sessionEventManager; + }; + EmbeddedSession.prototype._createRequestExecutorOrNull = function () { + return new EmbeddedRequestExecutor(this); + }; + EmbeddedSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + EmbeddedSession.prototype._registerEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.RegisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(null); + }); + }); + }; + EmbeddedSession.prototype._unregisterEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.UnregisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(); + }); + }); + }; + EmbeddedSession.prototype._onMessage = function (event) { + var _this = this; + if (!this.m_enabled) { + return; + } + if (this.m_chosenWindow && (this.m_chosenWindow !== event.source || this.m_chosenOrigin !== event.origin)) { + return; + } + var eventData = event.data; + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.ApiReadyCommand) { + if (!this.m_chosenWindow && + this._isValidDescendant(event.source) && + eventData[CommunicationConstants.SessionInfoKey] === this.m_options.sessionKey) { + this.m_chosenWindow = event.source; + this.m_chosenOrigin = event.origin; + this._sendMessageWithCallback(this.m_id++, CommunicationConstants.GetAppContextCommand, null, function (appContext) { + _this._setupContext(appContext); + window.clearTimeout(_this.m_timeoutId); + _this.m_promiseResolver(); + }); + } + return; + } + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.FireEventCommand) { + var msg = eventData[CommunicationConstants.ParamsKey]; + var eventId = msg['EventId']; + var targetId = msg['TargetId']; + var data = msg['Data']; + if (this.m_sessionEventManager) { + var handlers = this.m_sessionEventManager.getHandlers(eventId, targetId); + for (var i = 0; i < handlers.length; i++) { + handlers[i](data); + } + } + return; + } + if (eventData && eventData.hasOwnProperty(CommunicationConstants.RespondingId)) { + var rId = eventData[CommunicationConstants.RespondingId]; + if (this.m_callbackList.hasOwnProperty(rId)) { + var callback = this.m_callbackList[rId]; + if (typeof callback === 'function') { + callback(eventData[CommunicationConstants.ParamsKey]); + } + delete this.m_callbackList[rId]; + } + } + }; + EmbeddedSession.prototype._sendMessageWithCallback = function (id, command, data, callback) { + this.m_callbackList[id] = callback; + var message = {}; + message[CommunicationConstants.SendingId] = id; + message[CommunicationConstants.CommandKey] = command; + message[CommunicationConstants.ParamsKey] = data; + this.m_chosenWindow.postMessage(JSON.stringify(message), this.m_chosenOrigin); + }; + EmbeddedSession.prototype._isValidDescendant = function (wnd) { + var container = this.m_options.container || document.body; + function doesFrameWindow(containerWindow) { + if (containerWindow === wnd) { + return true; + } + for (var i = 0, len = containerWindow.frames.length; i < len; i++) { + if (doesFrameWindow(containerWindow.frames[i])) { + return true; + } + } + return false; + } + var iframes = container.getElementsByTagName('iframe'); + for (var i = 0, len = iframes.length; i < len; i++) { + if (doesFrameWindow(iframes[i].contentWindow)) { + return true; + } + } + return false; + }; + EmbeddedSession.prototype._setupContext = function (appContext) { + if (!(this.m_appContext = appContext)) { + return; + } + }; + return EmbeddedSession; + }(SessionBase)); + OfficeExtension_1.EmbeddedSession = EmbeddedSession; + var EmbeddedRequestExecutor = (function () { + function EmbeddedRequestExecutor(session) { + this.m_session = session; + } + EmbeddedRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, EmbeddedRequestExecutor.SourceLibHeaderValue); + return CoreUtility.createPromise(function (resolve, reject) { + _this.m_session._invoke(CommunicationConstants.ExecuteMethodCommand, function (status, result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (status == 0) { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBodyFromSafeArray(result.Data), RichApiMessageUtility.getResponseHeadersFromSafeArray(result.Data)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.Code, result.error.Message); + } + resolve(response); + }, EmbeddedRequestExecutor._transformMessageArrayIntoParams(messageSafearray)); + }); + }; + EmbeddedRequestExecutor._transformMessageArrayIntoParams = function (msgArray) { + return { + ArrayData: msgArray, + DdaMethod: { + DispatchId: EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod + } + }; + }; + EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod = 93; + EmbeddedRequestExecutor.SourceLibHeaderValue = 'Embedded'; + return EmbeddedRequestExecutor; + }()); +})(OfficeExtension || (OfficeExtension = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { + step(generator.next(value)); + } + catch (e) { + reject(e); + } } + function rejected(value) { try { + step(generator["throw"](value)); + } + catch (e) { + reject(e); + } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function () { if (t[0] & 1) + throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } + catch (e) { + op = [6, e]; + y = 0; + } + finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "AgaveVisualApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeBiShim = "BiShim"; + var BiShim = (function (_super) { + __extends(BiShim, _super); + function BiShim() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BiShim.prototype, "_className", { + get: function () { + return "BiShim"; + }, + enumerable: true, + configurable: true + }); + BiShim.prototype.initialize = function (capabilities) { + _invokeMethod(this, "Initialize", 0, [capabilities], 0, 0); + }; + BiShim.prototype.getData = function () { + return _invokeMethod(this, "getData", 1, [], 4, 0); + }; + BiShim.prototype.setVisualObjects = function (visualObjects) { + _invokeMethod(this, "setVisualObjects", 0, [visualObjects], 2, 0); + }; + BiShim.prototype.setVisualObjectsToPersist = function (visualObjectsToPersist) { + _invokeMethod(this, "setVisualObjectsToPersist", 0, [visualObjectsToPersist], 2, 0); + }; + BiShim.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BiShim.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BiShim.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BiShim, context, "Microsoft.AgaveVisual.BiShim", false, 4); + }; + BiShim.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BiShim; + }(OfficeExtension.ClientObject)); + OfficeCore.BiShim = BiShim; + var AgaveVisualErrorCodes; + (function (AgaveVisualErrorCodes) { + AgaveVisualErrorCodes["generalException1"] = "GeneralException"; + })(AgaveVisualErrorCodes = OfficeCore.AgaveVisualErrorCodes || (OfficeCore.AgaveVisualErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "ExperimentApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeFlightingService = "FlightingService"; + var FlightingService = (function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId = function () { + return _invokeMethod(this, "GetClientSessionId", 1, [], 4, 0); + }; + FlightingService.prototype.getDeferredFlights = function () { + return _invokeMethod(this, "GetDeferredFlights", 1, [], 4, 0); + }; + FlightingService.prototype.getFeature = function (featureName, type, defaultValue, possibleValues) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null, 4); + }; + FlightingService.prototype.getFeatureGate = function (featureName, scope) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeatureGate", 1, [featureName, scope], false, false, null, 4); + }; + FlightingService.prototype.resetOverride = function (featureName) { + _invokeMethod(this, "ResetOverride", 0, [featureName], 0, 0); + }; + FlightingService.prototype.setOverride = function (featureName, type, value) { + _invokeMethod(this, "SetOverride", 0, [featureName, type, value], 0, 0); + }; + FlightingService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FlightingService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FlightingService, context, "Microsoft.Experiment.FlightingService", false, 4); + }; + FlightingService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService = FlightingService; + var _typeABType = "ABType"; + var ABType = (function (_super) { + __extends(ABType, _super); + function ABType() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeABType, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + ABType.prototype.load = function (option) { + return _load(this, option); + }; + ABType.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + ABType.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ABType.prototype.toJSON = function () { + return _toJson(this, { + "value": this._V + }, {}); + }; + ABType.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType = ABType; + var FeatureType; + (function (FeatureType) { + FeatureType["boolean"] = "Boolean"; + FeatureType["integer"] = "Integer"; + FeatureType["string"] = "String"; + })(FeatureType = OfficeCore.FeatureType || (OfficeCore.FeatureType = {})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes["generalException"] = "GeneralException"; + })(ExperimentErrorCodes = OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyDialog; +(function (OfficeFirstPartyDialog) { + var Dialog = (function () { + function Dialog(_dialogService) { + this._dialogService = _dialogService; + } + Dialog.prototype.close = function () { + this._dialogService.close(); + return this._dialogService.context.sync(); + }; + Dialog.prototype.messageChild = function (message, options) { + if (DialogApiManager && DialogApiManager.messageChildRichApiBridge) { + DialogApiManager.messageChildRichApiBridge(message, options); + } + }; + return Dialog; + }()); + OfficeFirstPartyDialog.Dialog = Dialog; + function lookupErrorCodeAndMessage(internalCode) { + var _a; + var table = (_a = {}, + _a[12002] = { code: "InvalidUrl", message: "Cannot load URL, no such page or bad URL syntax." }, + _a[12003] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12004] = { code: "Untrusted", message: "Domain is not trusted." }, + _a[12005] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12007] = { code: "FailedToOpen", message: "Another dialog is already opened." }, + _a); + if (table[internalCode]) { + return table[internalCode]; + } + else { + return { code: "Unknown", message: "An unknown error has occured with code: " + internalCode }; + } + } + function displayWebDialog(url, options) { + if (options === void 0) { + options = {}; + } + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) { + throw new OfficeExtension.Error({ code: "InvalidArgument", message: 'Dimensions must be "number%" or number.' }); + } + var ctx = new OfficeExtension.ClientRequestContext(); + var dialogService = OfficeCore.FirstPartyDialogService.newObject(ctx); + var dialog = new OfficeFirstPartyDialog.Dialog(dialogService); + var eventResult = dialogService.onDialogMessage.add(function (args) { + OfficeExtension.Utility.log("dialogMessageHandler:" + JSON.stringify(args)); + var parsedMessage = JSON.parse(args.message); + var eventError = parsedMessage.errorCode + ? new OfficeExtension.Error(lookupErrorCodeAndMessage(parsedMessage.errorCode)) + : null; + var messageType = parsedMessage.type; + var origin = parsedMessage.origin; + var messageContent = parsedMessage.message; + switch (messageType) { + case 17: + if (eventError) { + reject(eventError); + } + else { + resolve(dialog); + } + break; + case 12: + if (options.onMessage) { + options.onMessage(messageContent, dialog, origin); + } + break; + case 10: + default: + if (parsedMessage.errorCode === 12006) { + if (eventResult) { + eventResult.remove(); + ctx.sync(); + } + if (options.onClose) { + options.onClose(); + } + } + else { + if (options.onRuntimeError) { + options.onRuntimeError(eventError, dialog); + reject(eventError); + } + } + } + return OfficeExtension.CoreUtility.Promise.resolve(); + }); + return ctx.sync() + .then(function () { + var dialogOptions = { + width: options.width ? parseInt(options.width) : 50, + height: options.height ? parseInt(options.height) : 50, + displayInIFrame: options.displayInIFrame, + dialogTitle: options.dialogTitle + }; + dialogService.displayDialog(url, dialogOptions); + return ctx.sync(); + })["catch"](function (e) { + reject(e); + }); + }); + function isInt(value) { + return (/^(\-|\+)?([0-9]+)%?$/.test(value)); + } + } + OfficeFirstPartyDialog.displayWebDialog = displayWebDialog; + var DialogEventType; + (function (DialogEventType) { + DialogEventType[DialogEventType["dialogMessageReceived"] = 0] = "dialogMessageReceived"; + DialogEventType[DialogEventType["dialogEventReceived"] = 1] = "dialogEventReceived"; + })(DialogEventType || (DialogEventType = {})); +})(OfficeFirstPartyDialog || (OfficeFirstPartyDialog = {})); +var OfficeCore; +(function (OfficeCore) { + OfficeCore.OfficeOnlineDomainList = [ + "*.dod.online.office365.us", + "*.gov.online.office365.us", + "*.officeapps-df.live.com", + "*.officeapps.live.com", + "*.online.office.de", + "*.partner.officewebapps.cn" + ]; + function isHostOriginTrusted() { + if (typeof window.external === 'undefined' || + typeof window.external.GetContext === 'undefined') { + var hostUrl = OSF.getClientEndPoint()._targetUrl; + var hostname_1 = getHostNameFromUrl(hostUrl); + if (hostUrl.indexOf("https:") != 0) { + return false; + } + OfficeCore.OfficeOnlineDomainList.forEach(function (domain) { + if (domain.indexOf("*.") == 0) { + domain = domain.substring(2); + } + if (hostname_1.indexOf(domain) == hostname_1.length - domain.length) { + return true; + } + }); + return false; + } + return true; + } + OfficeCore.isHostOriginTrusted = isHostOriginTrusted; + function getHostNameFromUrl(url) { + var hostName = ""; + hostName = url.split("/")[2]; + hostName = hostName.split(":")[0]; + hostName = hostName.split("?")[0]; + return hostName; + } +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var FirstPartyApis = (function () { + function FirstPartyApis(context) { + this.context = context; + } + Object.defineProperty(FirstPartyApis.prototype, "roamingSettings", { + get: function () { + if (!this.m_roamingSettings) { + this.m_roamingSettings = OfficeCore.AuthenticationService.newObject(this.context).roamingSettings; + } + return this.m_roamingSettings; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "tap", { + get: function () { + if (!this.m_tap) { + this.m_tap = OfficeCore.Tap.newObject(this.context); + } + return this.m_tap; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "skill", { + get: function () { + if (!this.m_skill) { + this.m_skill = OfficeCore.Skill.newObject(this.context); + } + return this.m_skill; + }, + enumerable: true, + configurable: true + }); + return FirstPartyApis; + }()); + OfficeCore.FirstPartyApis = FirstPartyApis; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + return _super.call(this, url) || this; + } + Object.defineProperty(RequestContext.prototype, "firstParty", { + get: function () { + if (!this.m_firstPartyApis) { + this.m_firstPartyApis = new FirstPartyApis(this); + } + return this.m_firstPartyApis; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry = OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "ribbon", { + get: function () { + if (!this.m_ribbon) { + this.m_ribbon = OfficeCore.DynamicRibbon.newObject(this); + } + return this.m_ribbon; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "bi", { + get: function () { + if (!this.m_biShim) { + this.m_biShim = OfficeCore.BiShim.newObject(this); + } + return this.m_biShim; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService = OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext = RequestContext; + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("OfficeCore.run", arguments, function (requestInfo) { return new OfficeCore.RequestContext(requestInfo); }); + } + OfficeCore.run = run; +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var license; + (function (license_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function isFeatureEnabled(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, isEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isEnabled = license.isFeatureEnabled(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isEnabled.value]; + } + }); + }); + } + license_1.isFeatureEnabled = isFeatureEnabled; + function getFeatureTier(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, tier; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + tier = license.getFeatureTier(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, tier.value]; + } + }); + }); + } + license_1.getFeatureTier = getFeatureTier; + function isFreemiumUpsellEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, license, isFreemiumUpsellEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isFreemiumUpsellEnabled = license.isFreemiumUpsellEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isFreemiumUpsellEnabled.value]; + } + }); + }); + } + license_1.isFreemiumUpsellEnabled = isFreemiumUpsellEnabled; + function launchUpsellExperience(experienceId) { + return __awaiter(this, void 0, void 0, function () { + var context, license; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + license.launchUpsellExperience(experienceId); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + license_1.launchUpsellExperience = launchUpsellExperience; + function onFeatureStateChanged(feature, listener) { + return __awaiter(this, void 0, void 0, function () { + var context, license, licenseFeature, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + licenseFeature = license.getLicenseFeature(feature); + licenseFeature.onStateChanged.add(listener); + removeListener = function () { + licenseFeature.onStateChanged.remove(listener); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + license_1.onFeatureStateChanged = onFeatureStateChanged; + function getMsaDeviceTicket(resource, policy, options) { + return __awaiter(this, void 0, void 0, function () { + var context, license, msaDeviceTicket; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + msaDeviceTicket = license.getMsaDeviceTicket(resource, policy, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, msaDeviceTicket.value]; + } + }); + }); + } + license_1.getMsaDeviceTicket = getMsaDeviceTicket; + })(license = Office.license || (Office.license = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeSkill = "Skill"; + var Skill = (function (_super) { + __extends(Skill, _super); + function Skill() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Skill.prototype, "_className", { + get: function () { + return "Skill"; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.executeAction = function (paneId, actionId, actionDescriptor) { + return _invokeMethod(this, "ExecuteAction", 1, [paneId, actionId, actionDescriptor], 4 | 1, 0); + }; + Skill.prototype.notifyPaneEvent = function (paneId, eventDescriptor) { + _invokeMethod(this, "NotifyPaneEvent", 1, [paneId, eventDescriptor], 4 | 1, 0); + }; + Skill.prototype.registerHostSkillEvent = function () { + _invokeMethod(this, "RegisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype.testFireEvent = function () { + _invokeMethod(this, "TestFireEvent", 0, [], 1, 0); + }; + Skill.prototype.unregisterHostSkillEvent = function () { + _invokeMethod(this, "UnregisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Skill.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Skill.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Skill, context, "Microsoft.SkillApi.Skill", false, 4); + }; + Object.defineProperty(Skill.prototype, "onHostSkillEvent", { + get: function () { + var _this = this; + if (!this.m_hostSkillEvent) { + this.m_hostSkillEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "HostSkillEvent", { + eventType: 65538, + registerFunc: function () { return _this.registerHostSkillEvent(); }, + unregisterFunc: function () { return _this.unregisterHostSkillEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.Skill_HostSkillEvent_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostSkillEvent; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Skill; + }(OfficeExtension.ClientObject)); + OfficeCore.Skill = Skill; + var _CC; + (function (_CC) { + function Skill_HostSkillEvent_EventArgsTransform(thisObj, args) { + var transformedArgs = { + type: args.type, + data: args.data + }; + return transformedArgs; + } + _CC.Skill_HostSkillEvent_EventArgsTransform = Skill_HostSkillEvent_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var SkillErrorCodes; + (function (SkillErrorCodes) { + SkillErrorCodes["generalException"] = "GeneralException"; + })(SkillErrorCodes = OfficeCore.SkillErrorCodes || (OfficeCore.SkillErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "TelemetryApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeTelemetryService = "TelemetryService"; + var TelemetryService = (function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendCustomerContent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _throwIfApiNotSupported("TelemetryService.sendCustomerContent", "Telemetry", "1.3", _hostName); + _invokeMethod(this, "SendCustomerContent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype.sendTelemetryEvent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _invokeMethod(this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + TelemetryService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.TelemetryService, context, "Microsoft.Telemetry.TelemetryService", false, 4); + }; + TelemetryService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService = TelemetryService; + var DataFieldType; + (function (DataFieldType) { + DataFieldType["unset"] = "Unset"; + DataFieldType["string"] = "String"; + DataFieldType["boolean"] = "Boolean"; + DataFieldType["int64"] = "Int64"; + DataFieldType["double"] = "Double"; + })(DataFieldType = OfficeCore.DataFieldType || (OfficeCore.DataFieldType = {})); + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes["generalException"] = "GeneralException"; + })(TelemetryErrorCodes = OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyAuth; +(function (OfficeFirstPartyAuth) { + var WebAuthReplyUrlsStorageKey = "officeWebAuthReplyUrls"; + var loaded = false; + OfficeFirstPartyAuth.authFlow = "authcode"; + OfficeFirstPartyAuth.autoPopup = false; + OfficeFirstPartyAuth.upnCheck = true; + OfficeFirstPartyAuth.msal = "https://alcdn.msauth.net/browser-1p/2.28.1/js/msal-browser-1p.min.js"; + OfficeFirstPartyAuth.debugging = false; + OfficeFirstPartyAuth.delay = 0; + OfficeFirstPartyAuth.delayMsal = 0; + function load(replyUrl, prefetch) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF.WebAuth && OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + var retrievedAuthContext = false; + try { + if (!Office || !Office.context || !Office.context.webAuth) { + reject({ + code: "GetAuthContextAsyncMissing", + message: "Office:[" + !Office + "],Office.context:[" + !Office.context + "],Office.context.webAuth:[" + !Office.context.webAuth + "]" + }); + return; + } + Office.context.webAuth.getAuthContextAsync(function (result) { + if (result.status === "succeeded") { + retrievedAuthContext = true; + var authContext = result.value; + if (!authContext || authContext.isAnonymous) { + reject({ + code: "CannotGetAuthContext", + message: authContext.Error + }); + return; + } + var isMsa = authContext.authorityType.toLowerCase() === 'msa'; + OSF.WebAuth.config = { + authFlow: OfficeFirstPartyAuth.authFlow, + authVersion: (OfficeFirstPartyAuth.authVersion) ? OfficeFirstPartyAuth.authVersion : null, + msal: OfficeFirstPartyAuth.msal, + delayWebAuth: OfficeFirstPartyAuth.delay, + delayMsal: OfficeFirstPartyAuth.delayMsal, + debugging: OfficeFirstPartyAuth.debugging, + authority: (OfficeFirstPartyAuth.authorityOverride) ? OfficeFirstPartyAuth.authorityOverride : authContext.authority, + idp: authContext.authorityType.toLowerCase(), + appIds: [isMsa ? (authContext.msaAppId) ? authContext.msaAppId : authContext.appId : authContext.appId], + redirectUri: (replyUrl) ? replyUrl : null, + upn: authContext.upn, + puid: authContext.userId, + prefetch: prefetch, + telemetryInstance: 'otel', + autoPopup: OfficeFirstPartyAuth.autoPopup, + enableUpnCheck: OfficeFirstPartyAuth.upnCheck, + enableConsoleLogging: OfficeFirstPartyAuth.debugging + }; + OSF.WebAuth.load().then(function (result) { + loaded = true; + logLoadEvent(result, loaded); + resolve(); + })["catch"](function (result) { + logLoadEvent(result, loaded); + reject({ + code: "PackageNotLoaded", + message: (result instanceof Event) ? result.type : result + }); + }); + if (OfficeFirstPartyAuth.authFlow === "implicit") { + var finalReplyUrl = (replyUrl) ? replyUrl : window.location.href.split("?")[0]; + var replyUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (replyUrls || replyUrls === "") { + replyUrls = finalReplyUrl; + } + else { + replyUrls += ", " + finalReplyUrl; + } + if (replyUrls) + sessionStorage.setItem(WebAuthReplyUrlsStorageKey, replyUrls); + } + } + else { + OSF.WebAuth.config = null; + reject({ + code: "CannotGetAuthContext", + message: result.status + }); + } + }); + } + catch (e) { + OSF.WebAuth.config = null; + OSF.WebAuth.load().then(function () { + resolve(); + })["catch"](function () { + reject({ + code: retrievedAuthContext ? "CannotGetAuthContext" : "FailedToLoad", + message: e + }); + }); + } + } + else { + resolve(); + } + }); + } + OfficeFirstPartyAuth.load = load; + function getAccessToken(options, behaviorOption) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + Office.context.webAuth.getAuthContextAsync(function (result) { + var supportsAuthToken = false; + if (result.status === "succeeded") { + var authContext = result.value; + if (authContext.supportsAuthToken) { + supportsAuthToken = true; + } + } + if (!supportsAuthToken) { + if (OSF.WebAuth && loaded) { + if (OSF.WebAuth.config.appIds[0]) { + OSF.WebAuth.getToken(options.resource, OSF.WebAuth.config.appIds[0], OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : null, (options && options.authChallenge) ? options.authChallenge : null).then(function (result) { + logAcquireEvent(result, true, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + resolve({ + accessToken: result.Token, + tokenIdenityType: (OSF.WebAuth.config.idp.toLowerCase() == "msa") + ? OfficeCore.IdentityType.microsoftAccount + : OfficeCore.IdentityType.organizationAccount + }); + })["catch"](function (result) { + logAcquireEvent(result, false, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + reject({ + code: result.ErrorCode, + message: (result instanceof Event) ? result.type : result.ErrorMessage + }); + }); + } + } + else { + logUnexpectedAcquire(loaded, OSF.WebAuth.loadAttempts); + } + } + else { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result_1 = auth.getAccessToken(options, null); + context.sync().then(function () { + resolve(result_1.value); + }); + } + }); + } + else { + var context_1 = new OfficeCore.RequestContext(); + var auth_1 = OfficeCore.AuthenticationService.newObject(context_1); + var handler_1 = auth_1.onTokenReceived.add(function (arg) { + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + handler_1.remove(); + context_1.sync()["catch"](function () { + }); + if (arg.code == 0) { + resolve(arg.tokenValue); + } + else { + if (OfficeExtension.CoreUtility.isNullOrUndefined(arg.errorInfo)) { + reject({ code: arg.code }); + } + else { + try { + reject(JSON.parse(arg.errorInfo)); + } + catch (e) { + reject({ code: arg.code, message: arg.errorInfo }); + } + } + } + } + return null; + }); + context_1.sync() + .then(function () { + var apiResult = auth_1.getAccessToken(options, auth_1._targetId); + return context_1.sync() + .then(function () { + if (OfficeExtension.CoreUtility.isNullOrUndefined(apiResult.value)) { + return null; + } + var tokenValue = apiResult.value.accessToken; + if (!OfficeExtension.CoreUtility.isNullOrUndefined(tokenValue)) { + resolve(apiResult.value); + } + }); + })["catch"](function (e) { + reject(e); + }); + } + }); + } + OfficeFirstPartyAuth.getAccessToken = getAccessToken; + function getPrimaryIdentityInfo() { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result = auth.getPrimaryIdentityInfo(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getPrimaryIdentityInfo = getPrimaryIdentityInfo; + function getIdentities() { + var context = new OfficeCore.RequestContext(); + var auth_service = OfficeCore.AuthenticationService.newObject(context); + var result = auth_service.getIdentities(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getIdentities = getIdentities; + function logLoadEvent(result, succeeded) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : "") + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'loadedApplicationCount': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + case 'timeToLoad': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.Load", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logAcquireEvent(result, succeeded, popup) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Popup', (typeof popup === "boolean") ? popup : false), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : result.ErrorCode), + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'timeToGetToken': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.GetAccessToken", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logUnexpectedAcquire(loadResult, loadAttempts) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeBooleanDataField('Loaded', loadResult), + oteljs.makeInt64DataField('LoadAttempts', (typeof loadAttempts === "number") ? loadAttempts : 0) + ]; + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.UnexpectedAcquire", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function loadWebAuthForReplyPage() { + try { + if (typeof (window) === "undefined" || !window.sessionStorage) { + return; + } + var webAuthRedirectUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (webAuthRedirectUrls !== null && webAuthRedirectUrls.indexOf(window.location.origin + window.location.pathname) !== -1) { + load(); + } + } + catch (ex) { + console.error(ex); + } + } + if (typeof (window) !== "undefined" && window.OSF) { + loadWebAuthForReplyPage(); + } +})(OfficeFirstPartyAuth || (OfficeFirstPartyAuth = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var IdentityType; + (function (IdentityType) { + IdentityType["organizationAccount"] = "OrganizationAccount"; + IdentityType["microsoftAccount"] = "MicrosoftAccount"; + IdentityType["unsupported"] = "Unsupported"; + })(IdentityType = OfficeCore.IdentityType || (OfficeCore.IdentityType = {})); + var _typeAuthenticationService = "AuthenticationService"; + var AuthenticationService = (function (_super) { + __extends(AuthenticationService, _super); + function AuthenticationService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AuthenticationService.prototype, "_className", { + get: function () { + return "AuthenticationService"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "_navigationPropertyNames", { + get: function () { + return ["roamingSettings"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "roamingSettings", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.RoamingSettingCollection, this, "RoamingSettings", false, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.getAccessToken = function (tokenParameters, targetId) { + return _invokeMethod(this, "GetAccessToken", 1, [tokenParameters, targetId], 4 | 1, 0); + }; + AuthenticationService.prototype.getIdentities = function () { + _throwIfApiNotSupported("AuthenticationService.getIdentities", "FirstPartyAuthentication", "1.3", _hostName); + return _invokeMethod(this, "GetIdentities", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.getPrimaryIdentityInfo = function () { + _throwIfApiNotSupported("AuthenticationService.getPrimaryIdentityInfo", "FirstPartyAuthentication", "1.2", _hostName); + return _invokeMethod(this, "GetPrimaryIdentityInfo", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.registerIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.registerIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "RegisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype.unregisterIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.unregisterIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "UnregisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["roamingSettings", "RoamingSettings"]); + }; + AuthenticationService.prototype.load = function (options) { + return _load(this, options); + }; + AuthenticationService.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + AuthenticationService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AuthenticationService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AuthenticationService, context, "Microsoft.Authentication.AuthenticationService", false, 4); + }; + Object.defineProperty(AuthenticationService.prototype, "onIdentityChanged", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onIdentityChanged", "FirstPartyAuthentication", "1.5", _hostName); + if (!this.m_identityChanged) { + this.m_identityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityChanged", { + eventType: 65545, + registerFunc: function () { return _this.registerIdentityChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterIdentityChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + email: value.email, + environment: value.environment, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "onTokenReceived", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onTokenReceived", "FirstPartyAuthentication", "1.2", _hostName); + if (!this.m_tokenReceived) { + this.m_tokenReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "TokenReceived", { + eventType: 3001, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return _this._targetId; }, + eventArgsTransformFunc: function (value) { + var event = _CC.AuthenticationService_TokenReceived_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_tokenReceived; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AuthenticationService; + }(OfficeExtension.ClientObject)); + OfficeCore.AuthenticationService = AuthenticationService; + var AuthenticationServiceCustom = (function () { + function AuthenticationServiceCustom() { + } + Object.defineProperty(AuthenticationServiceCustom.prototype, "_targetId", { + get: function () { + if (this.m_targetId == undefined) { + if (typeof (OSF) !== 'undefined' && OSF.OUtil) { + this.m_targetId = OSF.OUtil.Guid.generateNewGuid(); + } + else { + this.m_targetId = "" + this.context._nextId(); + } + } + return this.m_targetId; + }, + enumerable: true, + configurable: true + }); + return AuthenticationServiceCustom; + }()); + OfficeCore.AuthenticationServiceCustom = AuthenticationServiceCustom; + OfficeExtension.Utility.applyMixin(AuthenticationService, AuthenticationServiceCustom); + var _CC; + (function (_CC) { + function AuthenticationService_TokenReceived_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + tokenValue: value.tokenValue, + code: value.code, + errorInfo: value.errorInfo + }; + return newArgs; + } + _CC.AuthenticationService_TokenReceived_EventArgsTransform = AuthenticationService_TokenReceived_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeRoamingSetting = "RoamingSetting"; + var RoamingSetting = (function (_super) { + __extends(RoamingSetting, _super); + function RoamingSetting() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSetting.prototype, "_className", { + get: function () { + return "RoamingSetting"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRoamingSetting, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeRoamingSetting, this._isNull); + return this._V; + }, + set: function (value) { + this._V = value; + _invokeSetProperty(this, "Value", value, 0); + }, + enumerable: true, + configurable: true + }); + RoamingSetting.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["value"], [], []); + }; + RoamingSetting.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RoamingSetting.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + RoamingSetting.prototype.load = function (options) { + return _load(this, options); + }; + RoamingSetting.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RoamingSetting.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RoamingSetting.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSetting.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I, + "value": this._V + }, {}); + }; + RoamingSetting.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RoamingSetting.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RoamingSetting; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSetting = RoamingSetting; + var _typeRoamingSettingCollection = "RoamingSettingCollection"; + var RoamingSettingCollection = (function (_super) { + __extends(RoamingSettingCollection, _super); + function RoamingSettingCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSettingCollection.prototype, "_className", { + get: function () { + return "RoamingSettingCollection"; + }, + enumerable: true, + configurable: true + }); + RoamingSettingCollection.prototype.getItem = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItem", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype.getItemOrNullObject = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItemOrNullObject", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RoamingSettingCollection.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSettingCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RoamingSettingCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSettingCollection = RoamingSettingCollection; + var _typeBeforeDocumentCloseNotification = "BeforeDocumentCloseNotification"; + var BeforeDocumentCloseNotification = (function (_super) { + __extends(BeforeDocumentCloseNotification, _super); + function BeforeDocumentCloseNotification() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "_className", { + get: function () { + return "BeforeDocumentCloseNotification"; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.disable = function () { + _invokeMethod(this, "Disable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype.enable = function () { + _invokeMethod(this, "Enable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BeforeDocumentCloseNotification.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BeforeDocumentCloseNotification.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BeforeDocumentCloseNotification, context, "Microsoft.BeforeDocumentCloseNotification.BeforeDocumentCloseNotification", false, 4); + }; + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "onBeforeCloseNotificationCancelled", { + get: function () { + if (!this.m_beforeCloseNotificationCancelled) { + this.m_beforeCloseNotificationCancelled = new OfficeExtension.GenericEventHandlers(this.context, this, "BeforeCloseNotificationCancelled", { + eventType: 65540, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_beforeCloseNotificationCancelled; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BeforeDocumentCloseNotification; + }(OfficeExtension.ClientObject)); + OfficeCore.BeforeDocumentCloseNotification = BeforeDocumentCloseNotification; + var ServiceProvider; + (function (ServiceProvider) { + ServiceProvider["ariaBrowserPipeUrl"] = "AriaBrowserPipeUrl"; + ServiceProvider["ariaUploadUrl"] = "AriaUploadUrl"; + ServiceProvider["ariaVNextUploadUrl"] = "AriaVNextUploadUrl"; + ServiceProvider["lokiAutoDiscoverUrl"] = "LokiAutoDiscoverUrl"; + })(ServiceProvider = OfficeCore.ServiceProvider || (OfficeCore.ServiceProvider = {})); + var _typeServiceUrlProvider = "ServiceUrlProvider"; + var ServiceUrlProvider = (function (_super) { + __extends(ServiceUrlProvider, _super); + function ServiceUrlProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceUrlProvider.prototype, "_className", { + get: function () { + return "ServiceUrlProvider"; + }, + enumerable: true, + configurable: true + }); + ServiceUrlProvider.prototype.getServiceUrl = function (emailAddress, provider) { + return _invokeMethod(this, "GetServiceUrl", 1, [emailAddress, provider], 4, 0); + }; + ServiceUrlProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceUrlProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceUrlProvider.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceUrlProvider, context, "Microsoft.DesktopCompliance.ServiceUrlProvider", false, 4); + }; + ServiceUrlProvider.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceUrlProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceUrlProvider = ServiceUrlProvider; + var _typeLinkedIn = "LinkedIn"; + var LinkedIn = (function (_super) { + __extends(LinkedIn, _super); + function LinkedIn() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LinkedIn.prototype, "_className", { + get: function () { + return "LinkedIn"; + }, + enumerable: true, + configurable: true + }); + LinkedIn.prototype.isEnabledForOffice = function () { + return _invokeMethod(this, "IsEnabledForOffice", 1, [], 4, 0); + }; + LinkedIn.prototype.recordLinkedInSettingsCompliance = function (featureName, isEnabled) { + _invokeMethod(this, "RecordLinkedInSettingsCompliance", 0, [featureName, isEnabled], 0, 0); + }; + LinkedIn.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LinkedIn.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LinkedIn.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LinkedIn, context, "Microsoft.DesktopCompliance.LinkedIn", false, 4); + }; + LinkedIn.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LinkedIn; + }(OfficeExtension.ClientObject)); + OfficeCore.LinkedIn = LinkedIn; + var _typeNetworkUsage = "NetworkUsage"; + var NetworkUsage = (function (_super) { + __extends(NetworkUsage, _super); + function NetworkUsage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(NetworkUsage.prototype, "_className", { + get: function () { + return "NetworkUsage"; + }, + enumerable: true, + configurable: true + }); + NetworkUsage.prototype.isInDisconnectedMode = function () { + return _invokeMethod(this, "IsInDisconnectedMode", 1, [], 4, 0); + }; + NetworkUsage.prototype.isInOnlineMode = function () { + return _invokeMethod(this, "IsInOnlineMode", 1, [], 4, 0); + }; + NetworkUsage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + NetworkUsage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + NetworkUsage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.NetworkUsage, context, "Microsoft.DesktopCompliance.NetworkUsage", false, 4); + }; + NetworkUsage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return NetworkUsage; + }(OfficeExtension.ClientObject)); + OfficeCore.NetworkUsage = NetworkUsage; + var _typeDynamicRibbon = "DynamicRibbon"; + var DynamicRibbon = (function (_super) { + __extends(DynamicRibbon, _super); + function DynamicRibbon() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DynamicRibbon.prototype, "_className", { + get: function () { + return "DynamicRibbon"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "_navigationPropertyNames", { + get: function () { + return ["buttons"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "buttons", { + get: function () { + if (!this._B) { + this._B = _createPropertyObject(OfficeCore.RibbonButtonCollection, this, "Buttons", true, 4); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + DynamicRibbon.prototype.executeRequestCreate = function (jsonCreate) { + _throwIfApiNotSupported("DynamicRibbon.executeRequestCreate", "DynamicRibbon", "1.2", _hostName); + _invokeMethod(this, "ExecuteRequestCreate", 1, [jsonCreate], 4, 0); + }; + DynamicRibbon.prototype.executeRequestUpdate = function (jsonUpdate) { + _invokeMethod(this, "ExecuteRequestUpdate", 1, [jsonUpdate], 4, 0); + }; + DynamicRibbon.prototype.getButton = function (id) { + return _createMethodObject(OfficeCore.RibbonButton, this, "GetButton", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype.getTab = function (id) { + return _createMethodObject(OfficeCore.RibbonTab, this, "GetTab", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["buttons", "Buttons"]); + }; + DynamicRibbon.prototype.load = function (options) { + return _load(this, options); + }; + DynamicRibbon.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + DynamicRibbon.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DynamicRibbon.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DynamicRibbon, context, "Microsoft.DynamicRibbon.DynamicRibbon", false, 4); + }; + DynamicRibbon.prototype.toJSON = function () { + return _toJson(this, {}, { + "buttons": this._B + }); + }; + return DynamicRibbon; + }(OfficeExtension.ClientObject)); + OfficeCore.DynamicRibbon = DynamicRibbon; + var _typeRibbonTab = "RibbonTab"; + var RibbonTab = (function (_super) { + __extends(RibbonTab, _super); + function RibbonTab() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonTab.prototype, "_className", { + get: function () { + return "RibbonTab"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonTab, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + RibbonTab.prototype.setVisibility = function (visibility) { + _invokeMethod(this, "SetVisibility", 0, [visibility], 0, 0); + }; + RibbonTab.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + RibbonTab.prototype.load = function (options) { + return _load(this, options); + }; + RibbonTab.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonTab.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonTab.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonTab.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + RibbonTab.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonTab.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonTab; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonTab = RibbonTab; + var _typeRibbonButton = "RibbonButton"; + var RibbonButton = (function (_super) { + __extends(RibbonButton, _super); + function RibbonButton() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButton.prototype, "_className", { + get: function () { + return "RibbonButton"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "enabled", "label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Enabled", "Label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "enabled", { + get: function () { + _throwIfNotLoaded("enabled", this._E, _typeRibbonButton, this._isNull); + return this._E; + }, + set: function (value) { + this._E = value; + _invokeSetProperty(this, "Enabled", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonButton, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "label", { + get: function () { + _throwIfNotLoaded("label", this._L, _typeRibbonButton, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + RibbonButton.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["enabled"], [], []); + }; + RibbonButton.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RibbonButton.prototype.setEnabled = function (enabled) { + _invokeMethod(this, "SetEnabled", 0, [enabled], 0, 0); + }; + RibbonButton.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Enabled"])) { + this._E = obj["Enabled"]; + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Label"])) { + this._L = obj["Label"]; + } + }; + RibbonButton.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButton.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButton.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonButton.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonButton.prototype.toJSON = function () { + return _toJson(this, { + "enabled": this._E, + "id": this._I, + "label": this._L + }, {}); + }; + RibbonButton.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonButton.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonButton; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButton = RibbonButton; + var _typeRibbonButtonCollection = "RibbonButtonCollection"; + var RibbonButtonCollection = (function (_super) { + __extends(RibbonButtonCollection, _super); + function RibbonButtonCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButtonCollection.prototype, "_className", { + get: function () { + return "RibbonButtonCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeRibbonButtonCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + RibbonButtonCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + RibbonButtonCollection.prototype.getItem = function (key) { + return _createIndexerObject(OfficeCore.RibbonButton, this, [key]); + }; + RibbonButtonCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.RibbonButton, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + RibbonButtonCollection.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButtonCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButtonCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }); + }; + RibbonButtonCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + RibbonButtonCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return RibbonButtonCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButtonCollection = RibbonButtonCollection; + var _typeFirstPartyDialogService = "FirstPartyDialogService"; + var FirstPartyDialogService = (function (_super) { + __extends(FirstPartyDialogService, _super); + function FirstPartyDialogService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FirstPartyDialogService.prototype, "_className", { + get: function () { + return "FirstPartyDialogService"; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4 | 1, 0); + }; + FirstPartyDialogService.prototype.displayDialog = function (url, options) { + _invokeMethod(this, "DisplayDialog", 1, [url, options], 4 | 1, 0); + }; + FirstPartyDialogService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FirstPartyDialogService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FirstPartyDialogService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FirstPartyDialogService, context, "Microsoft.FirstPartyDialog.FirstPartyDialogService", false, 4); + }; + Object.defineProperty(FirstPartyDialogService.prototype, "onDialogMessage", { + get: function () { + var _this = this; + if (!this.m_dialogMessage) { + this.m_dialogMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "DialogMessage", { + eventType: 65536, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_dialogMessage; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FirstPartyDialogService; + }(OfficeExtension.ClientObject)); + OfficeCore.FirstPartyDialogService = FirstPartyDialogService; + (function (_CC) { + function FirstPartyDialogService_DialogMessage_EventArgsTransform(thisObj, args) { + return { + message: args.message + }; + } + _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform = FirstPartyDialogService_DialogMessage_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var TimeStringFormat; + (function (TimeStringFormat) { + TimeStringFormat["shortTime"] = "ShortTime"; + TimeStringFormat["longTime"] = "LongTime"; + TimeStringFormat["shortDate"] = "ShortDate"; + TimeStringFormat["longDate"] = "LongDate"; + })(TimeStringFormat = OfficeCore.TimeStringFormat || (OfficeCore.TimeStringFormat = {})); + var _typeLocaleApi = "LocaleApi"; + var LocaleApi = (function (_super) { + __extends(LocaleApi, _super); + function LocaleApi() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LocaleApi.prototype, "_className", { + get: function () { + return "LocaleApi"; + }, + enumerable: true, + configurable: true + }); + LocaleApi.prototype.formatDateTimeString = function (localeName, value, format) { + return _invokeMethod(this, "FormatDateTimeString", 1, [localeName, value, format], 4, 0); + }; + LocaleApi.prototype.getLocaleDateTimeFormattingInfo = function (localeName) { + return _invokeMethod(this, "GetLocaleDateTimeFormattingInfo", 1, [localeName], 4, 0); + }; + LocaleApi.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LocaleApi.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LocaleApi.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LocaleApi, context, "Microsoft.LocaleApi.LocaleApi", false, 4); + }; + LocaleApi.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LocaleApi; + }(OfficeExtension.ClientObject)); + OfficeCore.LocaleApi = LocaleApi; + var _typeComment = "Comment"; + var Comment = (function (_super) { + __extends(Comment, _super); + function Comment() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Comment.prototype, "_className", { + get: function () { + return "Comment"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "text", "created", "level", "resolved", "author", "mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Text", "Created", "Level", "Resolved", "Author", "Mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false, false, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_navigationPropertyNames", { + get: function () { + return ["parent", "parentOrNullObject", "replies"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parent", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.Comment, this, "Parent", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parentOrNullObject", { + get: function () { + if (!this._Pa) { + this._Pa = _createPropertyObject(OfficeCore.Comment, this, "ParentOrNullObject", false, 4); + } + return this._Pa; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "replies", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.CommentCollection, this, "Replies", true, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "author", { + get: function () { + _throwIfNotLoaded("author", this._A, _typeComment, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "created", { + get: function () { + _throwIfNotLoaded("created", this._C, _typeComment, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeComment, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "level", { + get: function () { + _throwIfNotLoaded("level", this._L, _typeComment, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "mentions", { + get: function () { + _throwIfNotLoaded("mentions", this._M, _typeComment, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "resolved", { + get: function () { + _throwIfNotLoaded("resolved", this._Re, _typeComment, this._isNull); + return this._Re; + }, + set: function (value) { + this._Re = value; + _invokeSetProperty(this, "Resolved", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeComment, this._isNull); + return this._T; + }, + set: function (value) { + this._T = value; + _invokeSetProperty(this, "Text", value, 0); + }, + enumerable: true, + configurable: true + }); + Comment.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["text", "resolved"], [], [ + "parent", + "parentOrNullObject", + "replies" + ]); + }; + Comment.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Comment.prototype["delete"] = function () { + _invokeMethod(this, "Delete", 0, [], 0, 0); + }; + Comment.prototype.getParentOrSelf = function () { + return _createMethodObject(OfficeCore.Comment, this, "GetParentOrSelf", 1, [], false, false, null, 4); + }; + Comment.prototype.getRichText = function (format) { + return _invokeMethod(this, "GetRichText", 1, [format], 4, 0); + }; + Comment.prototype.reply = function (text, format) { + return _createMethodObject(OfficeCore.Comment, this, "Reply", 0, [text, format], false, false, null, 0); + }; + Comment.prototype.setRichText = function (text, format) { + return _invokeMethod(this, "SetRichText", 0, [text, format], 0, 0); + }; + Comment.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Author"])) { + this._A = obj["Author"]; + } + if (!_isUndefined(obj["Created"])) { + this._C = _adjustToDateTime(obj["Created"]); + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Level"])) { + this._L = obj["Level"]; + } + if (!_isUndefined(obj["Mentions"])) { + this._M = obj["Mentions"]; + } + if (!_isUndefined(obj["Resolved"])) { + this._Re = obj["Resolved"]; + } + if (!_isUndefined(obj["Text"])) { + this._T = obj["Text"]; + } + _handleNavigationPropertyResults(this, obj, ["parent", "Parent", "parentOrNullObject", "ParentOrNullObject", "replies", "Replies"]); + }; + Comment.prototype.load = function (options) { + return _load(this, options); + }; + Comment.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Comment.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + Comment.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Created"])) { + obj["created"] = _adjustToDateTime(obj["created"]); + } + _processRetrieveResult(this, value, result); + }; + Comment.prototype.toJSON = function () { + return _toJson(this, { + "author": this._A, + "created": this._C, + "id": this._I, + "level": this._L, + "mentions": this._M, + "resolved": this._Re, + "text": this._T + }, { + "replies": this._R + }); + }; + Comment.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Comment.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Comment; + }(OfficeExtension.ClientObject)); + OfficeCore.Comment = Comment; + var _typeCommentCollection = "CommentCollection"; + var CommentCollection = (function (_super) { + __extends(CommentCollection, _super); + function CommentCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CommentCollection.prototype, "_className", { + get: function () { + return "CommentCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeCommentCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + CommentCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + CommentCollection.prototype.getItem = function (id) { + return _createIndexerObject(OfficeCore.Comment, this, [id]); + }; + CommentCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Comment, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + CommentCollection.prototype.load = function (options) { + return _load(this, options); + }; + CommentCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + CommentCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }); + }; + CommentCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + CommentCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return CommentCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.CommentCollection = CommentCollection; + var _typeExtensionLifeCycle = "ExtensionLifeCycle"; + var ExtensionLifeCycle = (function (_super) { + __extends(ExtensionLifeCycle, _super); + function ExtensionLifeCycle() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ExtensionLifeCycle.prototype, "_className", { + get: function () { + return "ExtensionLifeCycle"; + }, + enumerable: true, + configurable: true + }); + ExtensionLifeCycle.prototype.launchExtensionComponent = function (componentId, componentType, launchProperties) { + _invokeMethod(this, "LaunchExtensionComponent", 1, [componentId, componentType, launchProperties], 4 | 1, 0); + }; + ExtensionLifeCycle.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ExtensionLifeCycle.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ExtensionLifeCycle.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ExtensionLifeCycle, context, "Microsoft.OfficeSharedApi.ExtensionLifeCycle", false, 4); + }; + ExtensionLifeCycle.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ExtensionLifeCycle; + }(OfficeExtension.ClientObject)); + OfficeCore.ExtensionLifeCycle = ExtensionLifeCycle; + var CommentTextFormat; + (function (CommentTextFormat) { + CommentTextFormat["plain"] = "Plain"; + CommentTextFormat["markdown"] = "Markdown"; + CommentTextFormat["delta"] = "Delta"; + })(CommentTextFormat = OfficeCore.CommentTextFormat || (OfficeCore.CommentTextFormat = {})); + var PersonaCardPerfPoint; + (function (PersonaCardPerfPoint) { + PersonaCardPerfPoint["placeHolderRendered"] = "PlaceHolderRendered"; + PersonaCardPerfPoint["initialCardRendered"] = "InitialCardRendered"; + })(PersonaCardPerfPoint = OfficeCore.PersonaCardPerfPoint || (OfficeCore.PersonaCardPerfPoint = {})); + var UnifiedCommunicationAvailability; + (function (UnifiedCommunicationAvailability) { + UnifiedCommunicationAvailability["notSet"] = "NotSet"; + UnifiedCommunicationAvailability["free"] = "Free"; + UnifiedCommunicationAvailability["idle"] = "Idle"; + UnifiedCommunicationAvailability["busy"] = "Busy"; + UnifiedCommunicationAvailability["idleBusy"] = "IdleBusy"; + UnifiedCommunicationAvailability["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationAvailability["unalertable"] = "Unalertable"; + UnifiedCommunicationAvailability["unavailable"] = "Unavailable"; + })(UnifiedCommunicationAvailability = OfficeCore.UnifiedCommunicationAvailability || (OfficeCore.UnifiedCommunicationAvailability = {})); + var UnifiedCommunicationStatus; + (function (UnifiedCommunicationStatus) { + UnifiedCommunicationStatus["online"] = "Online"; + UnifiedCommunicationStatus["notOnline"] = "NotOnline"; + UnifiedCommunicationStatus["away"] = "Away"; + UnifiedCommunicationStatus["busy"] = "Busy"; + UnifiedCommunicationStatus["beRightBack"] = "BeRightBack"; + UnifiedCommunicationStatus["onThePhone"] = "OnThePhone"; + UnifiedCommunicationStatus["outToLunch"] = "OutToLunch"; + UnifiedCommunicationStatus["inAMeeting"] = "InAMeeting"; + UnifiedCommunicationStatus["outOfOffice"] = "OutOfOffice"; + UnifiedCommunicationStatus["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationStatus["inAConference"] = "InAConference"; + UnifiedCommunicationStatus["getting"] = "Getting"; + UnifiedCommunicationStatus["notABuddy"] = "NotABuddy"; + UnifiedCommunicationStatus["disconnected"] = "Disconnected"; + UnifiedCommunicationStatus["notInstalled"] = "NotInstalled"; + UnifiedCommunicationStatus["urgentInterruptionsOnly"] = "UrgentInterruptionsOnly"; + UnifiedCommunicationStatus["mayBeAvailable"] = "MayBeAvailable"; + UnifiedCommunicationStatus["idle"] = "Idle"; + UnifiedCommunicationStatus["inPresentation"] = "InPresentation"; + })(UnifiedCommunicationStatus = OfficeCore.UnifiedCommunicationStatus || (OfficeCore.UnifiedCommunicationStatus = {})); + var UnifiedCommunicationPresence; + (function (UnifiedCommunicationPresence) { + UnifiedCommunicationPresence["free"] = "Free"; + UnifiedCommunicationPresence["busy"] = "Busy"; + UnifiedCommunicationPresence["idle"] = "Idle"; + UnifiedCommunicationPresence["doNotDistrub"] = "DoNotDistrub"; + UnifiedCommunicationPresence["blocked"] = "Blocked"; + UnifiedCommunicationPresence["notSet"] = "NotSet"; + UnifiedCommunicationPresence["outOfOffice"] = "OutOfOffice"; + })(UnifiedCommunicationPresence = OfficeCore.UnifiedCommunicationPresence || (OfficeCore.UnifiedCommunicationPresence = {})); + var FreeBusyCalendarState; + (function (FreeBusyCalendarState) { + FreeBusyCalendarState["unknown"] = "Unknown"; + FreeBusyCalendarState["free"] = "Free"; + FreeBusyCalendarState["busy"] = "Busy"; + FreeBusyCalendarState["elsewhere"] = "Elsewhere"; + FreeBusyCalendarState["tentative"] = "Tentative"; + FreeBusyCalendarState["outOfOffice"] = "OutOfOffice"; + })(FreeBusyCalendarState = OfficeCore.FreeBusyCalendarState || (OfficeCore.FreeBusyCalendarState = {})); + var PersonaType; + (function (PersonaType) { + PersonaType["unknown"] = "Unknown"; + PersonaType["enterprise"] = "Enterprise"; + PersonaType["contact"] = "Contact"; + PersonaType["bot"] = "Bot"; + PersonaType["phoneOnly"] = "PhoneOnly"; + PersonaType["oneOff"] = "OneOff"; + PersonaType["distributionList"] = "DistributionList"; + PersonaType["personalDistributionList"] = "PersonalDistributionList"; + PersonaType["anonymous"] = "Anonymous"; + PersonaType["unifiedGroup"] = "UnifiedGroup"; + })(PersonaType = OfficeCore.PersonaType || (OfficeCore.PersonaType = {})); + var PhoneType; + (function (PhoneType) { + PhoneType["workPhone"] = "WorkPhone"; + PhoneType["homePhone"] = "HomePhone"; + PhoneType["mobilePhone"] = "MobilePhone"; + PhoneType["businessFax"] = "BusinessFax"; + PhoneType["otherPhone"] = "OtherPhone"; + })(PhoneType = OfficeCore.PhoneType || (OfficeCore.PhoneType = {})); + var AddressType; + (function (AddressType) { + AddressType["workAddress"] = "WorkAddress"; + AddressType["homeAddress"] = "HomeAddress"; + AddressType["otherAddress"] = "OtherAddress"; + })(AddressType = OfficeCore.AddressType || (OfficeCore.AddressType = {})); + var MemberType; + (function (MemberType) { + MemberType["unknown"] = "Unknown"; + MemberType["individual"] = "Individual"; + MemberType["group"] = "Group"; + })(MemberType = OfficeCore.MemberType || (OfficeCore.MemberType = {})); + var _typeMemberInfoList = "MemberInfoList"; + var MemberInfoList = (function (_super) { + __extends(MemberInfoList, _super); + function MemberInfoList() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MemberInfoList.prototype, "_className", { + get: function () { + return "MemberInfoList"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typeMemberInfoList, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typeMemberInfoList, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + MemberInfoList.prototype.getPersonaForMember = function (memberCookie) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForMember", 1, [memberCookie], false, false, null, 4); + }; + MemberInfoList.prototype.items = function () { + return _invokeMethod(this, "Items", 1, [], 4, 0); + }; + MemberInfoList.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + }; + MemberInfoList.prototype.load = function (options) { + return _load(this, options); + }; + MemberInfoList.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MemberInfoList.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MemberInfoList.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + MemberInfoList.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MemberInfoList.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MemberInfoList; + }(OfficeExtension.ClientObject)); + OfficeCore.MemberInfoList = MemberInfoList; + var PersonaDataUpdated; + (function (PersonaDataUpdated) { + PersonaDataUpdated["hostId"] = "HostId"; + PersonaDataUpdated["type"] = "Type"; + PersonaDataUpdated["photo"] = "Photo"; + PersonaDataUpdated["personaInfo"] = "PersonaInfo"; + PersonaDataUpdated["unifiedCommunicationInfo"] = "UnifiedCommunicationInfo"; + PersonaDataUpdated["organization"] = "Organization"; + PersonaDataUpdated["unifiedGroupInfo"] = "UnifiedGroupInfo"; + PersonaDataUpdated["members"] = "Members"; + PersonaDataUpdated["membership"] = "Membership"; + PersonaDataUpdated["capabilities"] = "Capabilities"; + PersonaDataUpdated["customizations"] = "Customizations"; + PersonaDataUpdated["viewableSources"] = "ViewableSources"; + PersonaDataUpdated["placeholder"] = "Placeholder"; + })(PersonaDataUpdated = OfficeCore.PersonaDataUpdated || (OfficeCore.PersonaDataUpdated = {})); + var _typePersonaActions = "PersonaActions"; + var PersonaActions = (function (_super) { + __extends(PersonaActions, _super); + function PersonaActions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaActions.prototype, "_className", { + get: function () { + return "PersonaActions"; + }, + enumerable: true, + configurable: true + }); + PersonaActions.prototype.addContact = function () { + _invokeMethod(this, "AddContact", 0, [], 0, 0); + }; + PersonaActions.prototype.callPhoneNumber = function (contactNumber) { + _invokeMethod(this, "CallPhoneNumber", 0, [contactNumber], 0, 0); + }; + PersonaActions.prototype.composeEmail = function (emailAddress) { + _invokeMethod(this, "ComposeEmail", 0, [emailAddress], 0, 0); + }; + PersonaActions.prototype.composeInstantMessage = function (sipAddress) { + _invokeMethod(this, "ComposeInstantMessage", 0, [sipAddress], 0, 0); + }; + PersonaActions.prototype.editContact = function () { + _invokeMethod(this, "EditContact", 0, [], 0, 0); + }; + PersonaActions.prototype.editContactByIdentifier = function (identifier) { + _invokeMethod(this, "EditContactByIdentifier", 0, [identifier], 0, 0); + }; + PersonaActions.prototype.editUnifiedGroup = function () { + _invokeMethod(this, "EditUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.getChangePhotoUrlAndOpenInBrowser = function () { + _invokeMethod(this, "GetChangePhotoUrlAndOpenInBrowser", 0, [], 0, 0); + }; + PersonaActions.prototype.hideHoverCardForPersona = function () { + _invokeMethod(this, "HideHoverCardForPersona", 0, [], 0, 0); + }; + PersonaActions.prototype.joinUnifiedGroup = function () { + _invokeMethod(this, "JoinUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.leaveUnifiedGroup = function () { + _invokeMethod(this, "LeaveUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.openGroupCalendar = function () { + _invokeMethod(this, "OpenGroupCalendar", 0, [], 0, 0); + }; + PersonaActions.prototype.openLinkContactUx = function () { + _invokeMethod(this, "OpenLinkContactUx", 0, [], 0, 0); + }; + PersonaActions.prototype.openOutlookProperties = function () { + _invokeMethod(this, "OpenOutlookProperties", 0, [], 0, 0); + }; + PersonaActions.prototype.pinPersonaToQuickContacts = function () { + _invokeMethod(this, "PinPersonaToQuickContacts", 0, [], 0, 0); + }; + PersonaActions.prototype.scheduleMeeting = function () { + _invokeMethod(this, "ScheduleMeeting", 0, [], 0, 0); + }; + PersonaActions.prototype.showContactCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContactCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showContextMenu = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContextMenu", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showExpandedCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowExpandedCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showHoverCardForPersona = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowHoverCardForPersona", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.startAudioCall = function () { + _invokeMethod(this, "StartAudioCall", 0, [], 0, 0); + }; + PersonaActions.prototype.startVideoCall = function () { + _invokeMethod(this, "StartVideoCall", 0, [], 0, 0); + }; + PersonaActions.prototype.subscribeToGroup = function () { + _invokeMethod(this, "SubscribeToGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.toggleTagForAlerts = function () { + _invokeMethod(this, "ToggleTagForAlerts", 0, [], 0, 0); + }; + PersonaActions.prototype.unsubscribeFromGroup = function () { + _invokeMethod(this, "UnsubscribeFromGroup", 0, [], 0, 0); + }; + PersonaActions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaActions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaActions.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaActions; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaActions = PersonaActions; + var _typePersonaInfoSource = "PersonaInfoSource"; + var PersonaInfoSource = (function (_super) { + __extends(PersonaInfoSource, _super); + function PersonaInfoSource() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfoSource.prototype, "_className", { + get: function () { + return "PersonaInfoSource"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "phones", "addresses", "webSites", "notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "Phones", "Addresses", "WebSites", "Notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "addresses", { + get: function () { + _throwIfNotLoaded("addresses", this._A, _typePersonaInfoSource, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfoSource, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfoSource, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfoSource, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfoSource, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfoSource, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfoSource, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfoSource, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfoSource, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfoSource, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfoSource, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfoSource, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfoSource, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfoSource, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "phones", { + get: function () { + _throwIfNotLoaded("phones", this._P, _typePersonaInfoSource, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfoSource, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfoSource, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfoSource, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfoSource.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Addresses"])) { + this._A = obj["Addresses"]; + } + if (!_isUndefined(obj["Birthday"])) { + this._B = obj["Birthday"]; + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = obj["Birthdays"]; + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["Phones"])) { + this._P = obj["Phones"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + }; + PersonaInfoSource.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfoSource.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfoSource.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaInfoSource.prototype.toJSON = function () { + return _toJson(this, { + "addresses": this._A, + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "phones": this._P, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, {}); + }; + PersonaInfoSource.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfoSource.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfoSource; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfoSource = PersonaInfoSource; + var _typePersonaInfo = "PersonaInfo"; + var PersonaInfo = (function (_super) { + __extends(PersonaInfo, _super); + function PersonaInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfo.prototype, "_className", { + get: function () { + return "PersonaInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "webSites", "notes", "isPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "WebSites", "Notes", "IsPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["sources"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sources", { + get: function () { + if (!this._So) { + this._So = _createPropertyObject(OfficeCore.PersonaInfoSource, this, "Sources", false, 4); + } + return this._So; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfo, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfo, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfo, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfo, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfo, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "isPersonResolved", { + get: function () { + _throwIfNotLoaded("isPersonResolved", this._I, _typePersonaInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfo, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfo, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfo, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfo, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfo, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfo, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfo, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfo.prototype.getAddresses = function () { + return _invokeMethod(this, "GetAddresses", 1, [], 4, 0); + }; + PersonaInfo.prototype.getPhones = function () { + return _invokeMethod(this, "GetPhones", 1, [], 4, 0); + }; + PersonaInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Birthday"])) { + this._B = _adjustToDateTime(obj["Birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = _adjustToDateTime(obj["Birthdays"]); + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["IsPersonResolved"])) { + this._I = obj["IsPersonResolved"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + _handleNavigationPropertyResults(this, obj, ["sources", "Sources"]); + }; + PersonaInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Birthday"])) { + obj["birthday"] = _adjustToDateTime(obj["birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + obj["birthdays"] = _adjustToDateTime(obj["birthdays"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaInfo.prototype.toJSON = function () { + return _toJson(this, { + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "isPersonResolved": this._I, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, { + "sources": this._So + }); + }; + PersonaInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfo = PersonaInfo; + var _typePersonaUnifiedCommunicationInfo = "PersonaUnifiedCommunicationInfo"; + var PersonaUnifiedCommunicationInfo = (function (_super) { + __extends(PersonaUnifiedCommunicationInfo, _super); + function PersonaUnifiedCommunicationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_className", { + get: function () { + return "PersonaUnifiedCommunicationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["availability", "status", "isSelf", "isTagged", "customStatusString", "isBlocked", "presenceTooltip", "isOutOfOffice", "outOfOfficeNote", "timezone", "meetingLocation", "meetingSubject", "timezoneBias", "idleStartTime", "overallCapability", "isOnBuddyList", "presenceNote", "voiceMailUri", "availabilityText", "availabilityTooltip", "isDurationInAvailabilityText", "freeBusyStatus", "calendarState", "presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Availability", "Status", "IsSelf", "IsTagged", "CustomStatusString", "IsBlocked", "PresenceTooltip", "IsOutOfOffice", "OutOfOfficeNote", "Timezone", "MeetingLocation", "MeetingSubject", "TimezoneBias", "IdleStartTime", "OverallCapability", "IsOnBuddyList", "PresenceNote", "VoiceMailUri", "AvailabilityText", "AvailabilityTooltip", "IsDurationInAvailabilityText", "FreeBusyStatus", "CalendarState", "Presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availability", { + get: function () { + _throwIfNotLoaded("availability", this._A, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityText", { + get: function () { + _throwIfNotLoaded("availabilityText", this._Av, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Av; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityTooltip", { + get: function () { + _throwIfNotLoaded("availabilityTooltip", this._Ava, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ava; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "calendarState", { + get: function () { + _throwIfNotLoaded("calendarState", this._C, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "customStatusString", { + get: function () { + _throwIfNotLoaded("customStatusString", this._Cu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Cu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "freeBusyStatus", { + get: function () { + _throwIfNotLoaded("freeBusyStatus", this._F, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "idleStartTime", { + get: function () { + _throwIfNotLoaded("idleStartTime", this._I, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isBlocked", { + get: function () { + _throwIfNotLoaded("isBlocked", this._Is, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isDurationInAvailabilityText", { + get: function () { + _throwIfNotLoaded("isDurationInAvailabilityText", this._IsD, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsD; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOnBuddyList", { + get: function () { + _throwIfNotLoaded("isOnBuddyList", this._IsO, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsO; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOutOfOffice", { + get: function () { + _throwIfNotLoaded("isOutOfOffice", this._IsOu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsOu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isSelf", { + get: function () { + _throwIfNotLoaded("isSelf", this._IsS, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsS; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isTagged", { + get: function () { + _throwIfNotLoaded("isTagged", this._IsT, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsT; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingLocation", { + get: function () { + _throwIfNotLoaded("meetingLocation", this._M, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingSubject", { + get: function () { + _throwIfNotLoaded("meetingSubject", this._Me, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Me; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "outOfOfficeNote", { + get: function () { + _throwIfNotLoaded("outOfOfficeNote", this._O, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "overallCapability", { + get: function () { + _throwIfNotLoaded("overallCapability", this._Ov, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ov; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presence", { + get: function () { + _throwIfNotLoaded("presence", this._P, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceNote", { + get: function () { + _throwIfNotLoaded("presenceNote", this._Pr, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pr; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceTooltip", { + get: function () { + _throwIfNotLoaded("presenceTooltip", this._Pre, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pre; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "status", { + get: function () { + _throwIfNotLoaded("status", this._S, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezone", { + get: function () { + _throwIfNotLoaded("timezone", this._T, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezoneBias", { + get: function () { + _throwIfNotLoaded("timezoneBias", this._Ti, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ti; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "voiceMailUri", { + get: function () { + _throwIfNotLoaded("voiceMailUri", this._V, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + PersonaUnifiedCommunicationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Availability"])) { + this._A = obj["Availability"]; + } + if (!_isUndefined(obj["AvailabilityText"])) { + this._Av = obj["AvailabilityText"]; + } + if (!_isUndefined(obj["AvailabilityTooltip"])) { + this._Ava = obj["AvailabilityTooltip"]; + } + if (!_isUndefined(obj["CalendarState"])) { + this._C = obj["CalendarState"]; + } + if (!_isUndefined(obj["CustomStatusString"])) { + this._Cu = obj["CustomStatusString"]; + } + if (!_isUndefined(obj["FreeBusyStatus"])) { + this._F = obj["FreeBusyStatus"]; + } + if (!_isUndefined(obj["IdleStartTime"])) { + this._I = _adjustToDateTime(obj["IdleStartTime"]); + } + if (!_isUndefined(obj["IsBlocked"])) { + this._Is = obj["IsBlocked"]; + } + if (!_isUndefined(obj["IsDurationInAvailabilityText"])) { + this._IsD = obj["IsDurationInAvailabilityText"]; + } + if (!_isUndefined(obj["IsOnBuddyList"])) { + this._IsO = obj["IsOnBuddyList"]; + } + if (!_isUndefined(obj["IsOutOfOffice"])) { + this._IsOu = obj["IsOutOfOffice"]; + } + if (!_isUndefined(obj["IsSelf"])) { + this._IsS = obj["IsSelf"]; + } + if (!_isUndefined(obj["IsTagged"])) { + this._IsT = obj["IsTagged"]; + } + if (!_isUndefined(obj["MeetingLocation"])) { + this._M = obj["MeetingLocation"]; + } + if (!_isUndefined(obj["MeetingSubject"])) { + this._Me = obj["MeetingSubject"]; + } + if (!_isUndefined(obj["OutOfOfficeNote"])) { + this._O = obj["OutOfOfficeNote"]; + } + if (!_isUndefined(obj["OverallCapability"])) { + this._Ov = obj["OverallCapability"]; + } + if (!_isUndefined(obj["Presence"])) { + this._P = obj["Presence"]; + } + if (!_isUndefined(obj["PresenceNote"])) { + this._Pr = obj["PresenceNote"]; + } + if (!_isUndefined(obj["PresenceTooltip"])) { + this._Pre = obj["PresenceTooltip"]; + } + if (!_isUndefined(obj["Status"])) { + this._S = obj["Status"]; + } + if (!_isUndefined(obj["Timezone"])) { + this._T = obj["Timezone"]; + } + if (!_isUndefined(obj["TimezoneBias"])) { + this._Ti = obj["TimezoneBias"]; + } + if (!_isUndefined(obj["VoiceMailUri"])) { + this._V = obj["VoiceMailUri"]; + } + }; + PersonaUnifiedCommunicationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaUnifiedCommunicationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaUnifiedCommunicationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["IdleStartTime"])) { + obj["idleStartTime"] = _adjustToDateTime(obj["idleStartTime"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaUnifiedCommunicationInfo.prototype.toJSON = function () { + return _toJson(this, { + "availability": this._A, + "availabilityText": this._Av, + "availabilityTooltip": this._Ava, + "calendarState": this._C, + "customStatusString": this._Cu, + "freeBusyStatus": this._F, + "idleStartTime": this._I, + "isBlocked": this._Is, + "isDurationInAvailabilityText": this._IsD, + "isOnBuddyList": this._IsO, + "isOutOfOffice": this._IsOu, + "isSelf": this._IsS, + "isTagged": this._IsT, + "meetingLocation": this._M, + "meetingSubject": this._Me, + "outOfOfficeNote": this._O, + "overallCapability": this._Ov, + "presence": this._P, + "presenceNote": this._Pr, + "presenceTooltip": this._Pre, + "status": this._S, + "timezone": this._T, + "timezoneBias": this._Ti, + "voiceMailUri": this._V + }, {}); + }; + PersonaUnifiedCommunicationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaUnifiedCommunicationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaUnifiedCommunicationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaUnifiedCommunicationInfo = PersonaUnifiedCommunicationInfo; + var _typePersonaPhotoInfo = "PersonaPhotoInfo"; + var PersonaPhotoInfo = (function (_super) { + __extends(PersonaPhotoInfo, _super); + function PersonaPhotoInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaPhotoInfo.prototype, "_className", { + get: function () { + return "PersonaPhotoInfo"; + }, + enumerable: true, + configurable: true + }); + PersonaPhotoInfo.prototype.getImageUri = function (uriScheme) { + return _invokeMethod(this, "getImageUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getImageUriWithMetadata = function (uriScheme) { + return _invokeMethod(this, "getImageUriWithMetadata", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getPlaceholderUri = function (uriScheme) { + return _invokeMethod(this, "getPlaceholderUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.setPlaceholderColor = function (color) { + _invokeMethod(this, "setPlaceholderColor", 0, [color], 0, 0); + }; + PersonaPhotoInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaPhotoInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaPhotoInfo.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaPhotoInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaPhotoInfo = PersonaPhotoInfo; + var _typePersonaCollection = "PersonaCollection"; + var PersonaCollection = (function (_super) { + __extends(PersonaCollection, _super); + function PersonaCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaCollection.prototype, "_className", { + get: function () { + return "PersonaCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typePersonaCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + PersonaCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + PersonaCollection.prototype.getItem = function (index) { + return _createIndexerObject(OfficeCore.Persona, this, [index]); + }; + PersonaCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Persona, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + PersonaCollection.prototype.load = function (options) { + return _load(this, options); + }; + PersonaCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }); + }; + PersonaCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + PersonaCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return PersonaCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaCollection = PersonaCollection; + var _typePersonaOrganizationInfo = "PersonaOrganizationInfo"; + var PersonaOrganizationInfo = (function (_super) { + __extends(PersonaOrganizationInfo, _super); + function PersonaOrganizationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaOrganizationInfo.prototype, "_className", { + get: function () { + return "PersonaOrganizationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["hierarchy", "manager", "directReports"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "directReports", { + get: function () { + if (!this._D) { + this._D = _createPropertyObject(OfficeCore.PersonaCollection, this, "DirectReports", true, 4); + } + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "hierarchy", { + get: function () { + if (!this._H) { + this._H = _createPropertyObject(OfficeCore.PersonaCollection, this, "Hierarchy", true, 4); + } + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "manager", { + get: function () { + if (!this._M) { + this._M = _createPropertyObject(OfficeCore.Persona, this, "Manager", false, 4); + } + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typePersonaOrganizationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typePersonaOrganizationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + PersonaOrganizationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + _handleNavigationPropertyResults(this, obj, ["directReports", "DirectReports", "hierarchy", "Hierarchy", "manager", "Manager"]); + }; + PersonaOrganizationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaOrganizationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaOrganizationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaOrganizationInfo.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + PersonaOrganizationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaOrganizationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaOrganizationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaOrganizationInfo = PersonaOrganizationInfo; + var CustomizedData; + (function (CustomizedData) { + CustomizedData["email"] = "Email"; + CustomizedData["workPhone"] = "WorkPhone"; + CustomizedData["workPhone2"] = "WorkPhone2"; + CustomizedData["workFax"] = "WorkFax"; + CustomizedData["mobilePhone"] = "MobilePhone"; + CustomizedData["homePhone"] = "HomePhone"; + CustomizedData["homePhone2"] = "HomePhone2"; + CustomizedData["otherPhone"] = "OtherPhone"; + CustomizedData["sipAddress"] = "SipAddress"; + CustomizedData["profile"] = "Profile"; + CustomizedData["office"] = "Office"; + CustomizedData["company"] = "Company"; + CustomizedData["workAddress"] = "WorkAddress"; + CustomizedData["homeAddress"] = "HomeAddress"; + CustomizedData["otherAddress"] = "OtherAddress"; + CustomizedData["birthday"] = "Birthday"; + })(CustomizedData = OfficeCore.CustomizedData || (OfficeCore.CustomizedData = {})); + var _typeUnifiedGroupInfo = "UnifiedGroupInfo"; + var UnifiedGroupInfo = (function (_super) { + __extends(UnifiedGroupInfo, _super); + function UnifiedGroupInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UnifiedGroupInfo.prototype, "_className", { + get: function () { + return "UnifiedGroupInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Description", "OneDrive", "OneNote", "IsPublic", "AmIOwner", "AmIMember", "AmISubscribed", "MemberCount", "OwnerCount", "HasGuests", "Site", "Planner", "Classification", "SubscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIMember", { + get: function () { + _throwIfNotLoaded("amIMember", this._A, _typeUnifiedGroupInfo, this._isNull); + return this._A; + }, + set: function (value) { + this._A = value; + _invokeSetProperty(this, "AmIMember", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIOwner", { + get: function () { + _throwIfNotLoaded("amIOwner", this._Am, _typeUnifiedGroupInfo, this._isNull); + return this._Am; + }, + set: function (value) { + this._Am = value; + _invokeSetProperty(this, "AmIOwner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amISubscribed", { + get: function () { + _throwIfNotLoaded("amISubscribed", this._AmI, _typeUnifiedGroupInfo, this._isNull); + return this._AmI; + }, + set: function (value) { + this._AmI = value; + _invokeSetProperty(this, "AmISubscribed", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "classification", { + get: function () { + _throwIfNotLoaded("classification", this._C, _typeUnifiedGroupInfo, this._isNull); + return this._C; + }, + set: function (value) { + this._C = value; + _invokeSetProperty(this, "Classification", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "description", { + get: function () { + _throwIfNotLoaded("description", this._D, _typeUnifiedGroupInfo, this._isNull); + return this._D; + }, + set: function (value) { + this._D = value; + _invokeSetProperty(this, "Description", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "hasGuests", { + get: function () { + _throwIfNotLoaded("hasGuests", this._H, _typeUnifiedGroupInfo, this._isNull); + return this._H; + }, + set: function (value) { + this._H = value; + _invokeSetProperty(this, "HasGuests", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "isPublic", { + get: function () { + _throwIfNotLoaded("isPublic", this._I, _typeUnifiedGroupInfo, this._isNull); + return this._I; + }, + set: function (value) { + this._I = value; + _invokeSetProperty(this, "IsPublic", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "memberCount", { + get: function () { + _throwIfNotLoaded("memberCount", this._M, _typeUnifiedGroupInfo, this._isNull); + return this._M; + }, + set: function (value) { + this._M = value; + _invokeSetProperty(this, "MemberCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneDrive", { + get: function () { + _throwIfNotLoaded("oneDrive", this._O, _typeUnifiedGroupInfo, this._isNull); + return this._O; + }, + set: function (value) { + this._O = value; + _invokeSetProperty(this, "OneDrive", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneNote", { + get: function () { + _throwIfNotLoaded("oneNote", this._On, _typeUnifiedGroupInfo, this._isNull); + return this._On; + }, + set: function (value) { + this._On = value; + _invokeSetProperty(this, "OneNote", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "ownerCount", { + get: function () { + _throwIfNotLoaded("ownerCount", this._Ow, _typeUnifiedGroupInfo, this._isNull); + return this._Ow; + }, + set: function (value) { + this._Ow = value; + _invokeSetProperty(this, "OwnerCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "planner", { + get: function () { + _throwIfNotLoaded("planner", this._P, _typeUnifiedGroupInfo, this._isNull); + return this._P; + }, + set: function (value) { + this._P = value; + _invokeSetProperty(this, "Planner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "site", { + get: function () { + _throwIfNotLoaded("site", this._S, _typeUnifiedGroupInfo, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Site", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "subscriptionEnabled", { + get: function () { + _throwIfNotLoaded("subscriptionEnabled", this._Su, _typeUnifiedGroupInfo, this._isNull); + return this._Su; + }, + set: function (value) { + this._Su = value; + _invokeSetProperty(this, "SubscriptionEnabled", value, 0); + }, + enumerable: true, + configurable: true + }); + UnifiedGroupInfo.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"], [], []); + }; + UnifiedGroupInfo.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + UnifiedGroupInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["AmIMember"])) { + this._A = obj["AmIMember"]; + } + if (!_isUndefined(obj["AmIOwner"])) { + this._Am = obj["AmIOwner"]; + } + if (!_isUndefined(obj["AmISubscribed"])) { + this._AmI = obj["AmISubscribed"]; + } + if (!_isUndefined(obj["Classification"])) { + this._C = obj["Classification"]; + } + if (!_isUndefined(obj["Description"])) { + this._D = obj["Description"]; + } + if (!_isUndefined(obj["HasGuests"])) { + this._H = obj["HasGuests"]; + } + if (!_isUndefined(obj["IsPublic"])) { + this._I = obj["IsPublic"]; + } + if (!_isUndefined(obj["MemberCount"])) { + this._M = obj["MemberCount"]; + } + if (!_isUndefined(obj["OneDrive"])) { + this._O = obj["OneDrive"]; + } + if (!_isUndefined(obj["OneNote"])) { + this._On = obj["OneNote"]; + } + if (!_isUndefined(obj["OwnerCount"])) { + this._Ow = obj["OwnerCount"]; + } + if (!_isUndefined(obj["Planner"])) { + this._P = obj["Planner"]; + } + if (!_isUndefined(obj["Site"])) { + this._S = obj["Site"]; + } + if (!_isUndefined(obj["SubscriptionEnabled"])) { + this._Su = obj["SubscriptionEnabled"]; + } + }; + UnifiedGroupInfo.prototype.load = function (options) { + return _load(this, options); + }; + UnifiedGroupInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + UnifiedGroupInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UnifiedGroupInfo.prototype.toJSON = function () { + return _toJson(this, { + "amIMember": this._A, + "amIOwner": this._Am, + "amISubscribed": this._AmI, + "classification": this._C, + "description": this._D, + "hasGuests": this._H, + "isPublic": this._I, + "memberCount": this._M, + "oneDrive": this._O, + "oneNote": this._On, + "ownerCount": this._Ow, + "planner": this._P, + "site": this._S, + "subscriptionEnabled": this._Su + }, {}); + }; + UnifiedGroupInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + UnifiedGroupInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return UnifiedGroupInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.UnifiedGroupInfo = UnifiedGroupInfo; + var _typePersona = "Persona"; + var PersonaPromiseType; + (function (PersonaPromiseType) { + PersonaPromiseType[PersonaPromiseType["immediate"] = 0] = "immediate"; + PersonaPromiseType[PersonaPromiseType["load"] = 3] = "load"; + })(PersonaPromiseType = OfficeCore.PersonaPromiseType || (OfficeCore.PersonaPromiseType = {})); + var PersonaInfoAndSource = (function () { + function PersonaInfoAndSource() { + } + return PersonaInfoAndSource; + }()); + OfficeCore.PersonaInfoAndSource = PersonaInfoAndSource; + ; + var Persona = (function (_super) { + __extends(Persona, _super); + function Persona() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Persona.prototype, "_className", { + get: function () { + return "Persona"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyNames", { + get: function () { + return ["hostId", "type", "capabilities", "diagnosticId", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["HostId", "Type", "Capabilities", "DiagnosticId", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_navigationPropertyNames", { + get: function () { + return ["photo", "personaInfo", "unifiedCommunicationInfo", "organization", "unifiedGroupInfo", "actions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "actions", { + get: function () { + if (!this._A) { + this._A = _createPropertyObject(OfficeCore.PersonaActions, this, "Actions", false, 4); + } + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "organization", { + get: function () { + if (!this._O) { + this._O = _createPropertyObject(OfficeCore.PersonaOrganizationInfo, this, "Organization", false, 4); + } + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "personaInfo", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.PersonaInfo, this, "PersonaInfo", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "photo", { + get: function () { + if (!this._Ph) { + this._Ph = _createPropertyObject(OfficeCore.PersonaPhotoInfo, this, "Photo", false, 4); + } + return this._Ph; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedCommunicationInfo", { + get: function () { + if (!this._U) { + this._U = _createPropertyObject(OfficeCore.PersonaUnifiedCommunicationInfo, this, "UnifiedCommunicationInfo", false, 4); + } + return this._U; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedGroupInfo", { + get: function () { + if (!this._Un) { + this._Un = _createPropertyObject(OfficeCore.UnifiedGroupInfo, this, "UnifiedGroupInfo", false, 4); + } + return this._Un; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "capabilities", { + get: function () { + _throwIfNotLoaded("capabilities", this._C, _typePersona, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "diagnosticId", { + get: function () { + _throwIfNotLoaded("diagnosticId", this._D, _typePersona, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "hostId", { + get: function () { + _throwIfNotLoaded("hostId", this._H, _typePersona, this._isNull); + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersona, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typePersona, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Persona.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, [], ["unifiedGroupInfo"], [ + "actions", + "organization", + "personaInfo", + "photo", + "unifiedCommunicationInfo" + ]); + }; + Persona.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Persona.prototype.dispose = function () { + _invokeMethod(this, "Dispose", 0, [], 0, 0); + }; + Persona.prototype.getCustomizations = function () { + return _invokeMethod(this, "GetCustomizations", 1, [], 4, 0); + }; + Persona.prototype.getMembers = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembers", 1, [], false, false, null, 4); + }; + Persona.prototype.getMembership = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembership", 1, [], false, false, null, 4); + }; + Persona.prototype.getViewableSources = function () { + return _invokeMethod(this, "GetViewableSources", 1, [], 4, 0); + }; + Persona.prototype.reportTimeForRender = function (perfpoint, millisecUTC) { + _invokeMethod(this, "ReportTimeForRender", 0, [perfpoint, millisecUTC], 0, 0); + }; + Persona.prototype.warmup = function (dataToWarmUp) { + _invokeMethod(this, "Warmup", 0, [dataToWarmUp], 0, 0); + }; + Persona.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Capabilities"])) { + this._C = obj["Capabilities"]; + } + if (!_isUndefined(obj["DiagnosticId"])) { + this._D = obj["DiagnosticId"]; + } + if (!_isUndefined(obj["HostId"])) { + this._H = obj["HostId"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + if (!_isUndefined(obj["Type"])) { + this._T = obj["Type"]; + } + _handleNavigationPropertyResults(this, obj, ["actions", "Actions", "organization", "Organization", "personaInfo", "PersonaInfo", "photo", "Photo", "unifiedCommunicationInfo", "UnifiedCommunicationInfo", "unifiedGroupInfo", "UnifiedGroupInfo"]); + }; + Persona.prototype.load = function (options) { + return _load(this, options); + }; + Persona.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Persona.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Persona.prototype.toJSON = function () { + return _toJson(this, { + "capabilities": this._C, + "diagnosticId": this._D, + "hostId": this._H, + "instanceId": this._I, + "type": this._T + }, { + "organization": this._O, + "personaInfo": this._P, + "unifiedCommunicationInfo": this._U, + "unifiedGroupInfo": this._Un + }); + }; + Persona.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Persona.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Persona; + }(OfficeExtension.ClientObject)); + OfficeCore.Persona = Persona; + var PersonaCustom = (function () { + function PersonaCustom() { + } + PersonaCustom.prototype.performAsyncOperation = function (type, waitFor, action, check) { + var _this = this; + if (type == PersonaPromiseType.immediate) { + action(); + return; + } + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + } + else { + var persona = _this; + persona.load("hostId"); + persona.context.sync().then(function () { + var hostId = persona.hostId; + _this.getPersonaLifetime().then(function (personaLifetime) { + var eventHandler = function (args) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (args.sendingPersonaHostId == hostId) { + for (var index = 0; index < args.dataUpdated.length; ++index) { + var updated = args.dataUpdated[index]; + if (waitFor == updated) { + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + personaLifetime.onPersonaUpdated.remove(eventHandler); + persona.context.sync(); + } + resolve(isWarmedUp); + }); + return; + } + } + } + resolve(false); + }); + }; + personaLifetime.onPersonaUpdated.add(eventHandler); + persona.context.sync(); + }); + }); + } + }); + }; + PersonaCustom.prototype.getOrganizationAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var organization = persona.organization; + organization.load("*"); + persona.context.sync().then(function () { + resolve(organization); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var organization = persona.organization; + organization.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(organization.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.organization, action, check); + }); + }; + PersonaCustom.prototype.getIsPersonaInfoResolvedCheck = function () { + var persona = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var info = persona.personaInfo; + info.load("isPersonResolved"); + persona.context.sync().then(function () { + resolve(info.isPersonResolved); + }); + }); + }; + PersonaCustom.prototype.getPersonaInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var info = persona.personaInfo; + info.load(); + persona.context.sync().then(function () { + resolve(info); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getPersonaInfoWithSourceAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var result = new PersonaInfoAndSource(); + result.info = persona.personaInfo; + result.info.load(); + result.source = persona.personaInfo.sources; + result.source.load(); + persona.context.sync().then(function () { + resolve(result); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedCommunicationInfo = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var ucInfo = persona.unifiedCommunicationInfo; + ucInfo.load("*"); + persona.context.sync().then(function () { + resolve(ucInfo); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedGroupInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var group = persona.unifiedGroupInfo; + group.load("*"); + persona.context.sync().then(function () { + resolve(group); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getTypeAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + persona.load("type"); + persona.context.sync().then(function () { + resolve(OfficeCore.PersonaType[persona.type.valueOf()]); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getCustomizationsAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var customizations = persona.getCustomizations(); + persona.context.sync().then(function () { + resolve(customizations.value); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getMembersAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, rejcet) { + var persona = _this; + var action = function () { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + resolve(members); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(members.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.members, action, check); + }); + }; + PersonaCustom.prototype.getMembershipAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var membership = persona.getMembership(); + membership.load("*"); + persona.context.sync().then(function () { + resolve(membership); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve) { + var membership = persona.getMembership(); + membership.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(membership.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.membership, action, check); + }); + }; + PersonaCustom.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + persona.load("instanceId"); + persona.context.sync().then(function () { + var peopleApi = new PeopleApiContext(persona.context, persona.instanceId); + peopleApi.getPersonaLifetime().then(function (lifetime) { + resolve(lifetime); + }); + }); + }); + }; + return PersonaCustom; + }()); + OfficeCore.PersonaCustom = PersonaCustom; + OfficeExtension.Utility.applyMixin(Persona, PersonaCustom); + var _typePersonaLifetime = "PersonaLifetime"; + var PersonaLifetime = (function (_super) { + __extends(PersonaLifetime, _super); + function PersonaLifetime() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaLifetime.prototype, "_className", { + get: function () { + return "PersonaLifetime"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyNames", { + get: function () { + return ["instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersonaLifetime, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.getPersona = function (hostId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersona", 1, [hostId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgByEntryId = function (entryId, name, sip, smtp) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgByEntryId", 1, [entryId, name, sip, smtp], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgEntry = function (name, sip, smtp, entryId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgEntry", 1, [name, sip, smtp, entryId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPolicies = function () { + return _invokeMethod(this, "GetPolicies", 1, [], 4, 0); + }; + PersonaLifetime.prototype.getTextScaleFactor = function () { + return _invokeMethod(this, "GetTextScaleFactor", 1, [], 4, 0); + }; + PersonaLifetime.prototype._RegisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_RegisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._UnregisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_UnregisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + PersonaLifetime.prototype.load = function (options) { + return _load(this, options); + }; + PersonaLifetime.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaLifetime.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(PersonaLifetime.prototype, "onPersonaUpdated", { + get: function () { + var _this = this; + if (!this.m_personaUpdated) { + this.m_personaUpdated = new OfficeExtension.GenericEventHandlers(this.context, this, "PersonaUpdated", { + eventType: 3502, + registerFunc: function () { return _this._RegisterPersonaUpdatedEvent(); }, + unregisterFunc: function () { return _this._UnregisterPersonaUpdatedEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + dataUpdated: value.dataUpdated, + sendingPersonaHostId: value.sendingPersonaHostId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_personaUpdated; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.toJSON = function () { + return _toJson(this, { + "instanceId": this._I + }, {}); + }; + PersonaLifetime.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaLifetime.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaLifetime; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaLifetime = PersonaLifetime; + var _typeLokiTokenProvider = "LokiTokenProvider"; + var LokiTokenProvider = (function (_super) { + __extends(LokiTokenProvider, _super); + function LokiTokenProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProvider.prototype, "_className", { + get: function () { + return "LokiTokenProvider"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyNames", { + get: function () { + return ["emailOrUpn", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["EmailOrUpn", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "emailOrUpn", { + get: function () { + _throwIfNotLoaded("emailOrUpn", this._E, _typeLokiTokenProvider, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typeLokiTokenProvider, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.requestClientAccessToken = function () { + _invokeMethod(this, "RequestClientAccessToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestIdentityUniqueId = function () { + _invokeMethod(this, "RequestIdentityUniqueId", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestToken = function () { + _invokeMethod(this, "RequestToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_RegisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_UnregisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["EmailOrUpn"])) { + this._E = obj["EmailOrUpn"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + LokiTokenProvider.prototype.load = function (options) { + return _load(this, options); + }; + LokiTokenProvider.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LokiTokenProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LokiTokenProvider.prototype, "onClientAccessTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_clientAccessTokenAvailable) { + this.m_clientAccessTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "ClientAccessTokenAvailable", { + eventType: 3505, + registerFunc: function () { return _this._RegisterClientAccessTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterClientAccessTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + clientAccessToken: value.clientAccessToken, + isAvailable: value.isAvailable, + tokenTTLInSeconds: value.tokenTTLInSeconds + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_clientAccessTokenAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onIdentityUniqueIdAvailable", { + get: function () { + var _this = this; + if (!this.m_identityUniqueIdAvailable) { + this.m_identityUniqueIdAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityUniqueIdAvailable", { + eventType: 3504, + registerFunc: function () { return _this._RegisterIdentityUniqueIdAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterIdentityUniqueIdAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityUniqueIdAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onLokiTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_lokiTokenAvailable) { + this.m_lokiTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "LokiTokenAvailable", { + eventType: 3503, + registerFunc: function () { return _this._RegisterLokiTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterLokiTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + lokiAutoDiscoverUrl: value.lokiAutoDiscoverUrl, + lokiToken: value.lokiToken + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_lokiTokenAvailable; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.toJSON = function () { + return _toJson(this, { + "emailOrUpn": this._E, + "instanceId": this._I + }, {}); + }; + LokiTokenProvider.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LokiTokenProvider.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LokiTokenProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProvider = LokiTokenProvider; + var _typeLokiTokenProviderFactory = "LokiTokenProviderFactory"; + var LokiTokenProviderFactory = (function (_super) { + __extends(LokiTokenProviderFactory, _super); + function LokiTokenProviderFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProviderFactory.prototype, "_className", { + get: function () { + return "LokiTokenProviderFactory"; + }, + enumerable: true, + configurable: true + }); + LokiTokenProviderFactory.prototype.getLokiTokenProvider = function (accountName) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [accountName], false, false, null, 4); + }; + LokiTokenProviderFactory.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LokiTokenProviderFactory.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LokiTokenProviderFactory.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LokiTokenProviderFactory, context, "Microsoft.People.LokiTokenProviderFactory", false, 4); + }; + LokiTokenProviderFactory.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LokiTokenProviderFactory; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProviderFactory = LokiTokenProviderFactory; + var _typeServiceContext = "ServiceContext"; + var PeopleApiContext = (function () { + function PeopleApiContext(context, instanceId) { + this.context = context; + this.instanceId = instanceId; + } + Object.defineProperty(PeopleApiContext.prototype, "serviceContext", { + get: function () { + if (!this.m_serviceConext) { + this.m_serviceConext = OfficeCore.ServiceContext.newObject(this.context); + } + return this.m_serviceConext; + }, + enumerable: true, + configurable: true + }); + PeopleApiContext.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var lifetime = _this.serviceContext.getPersonaLifetime(_this.instanceId); + _this.context.sync().then(function () { + lifetime.load("instanceId"); + _this.context.sync().then(function () { + resolve(lifetime); + }); + }); + }); + }; + PeopleApiContext.prototype.getInitialPersona = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this.serviceContext.getInitialPersona(_this.instanceId); + _this.context.sync().then(function () { + resolve(persona); + }); + }); + }; + PeopleApiContext.prototype.getLokiTokenProvider = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var provider = _this.serviceContext.getLokiTokenProvider(_this.instanceId); + _this.context.sync().then(function () { + provider.load("instanceId"); + _this.context.sync().then(function () { + resolve(provider); + }); + }); + }); + }; + return PeopleApiContext; + }()); + OfficeCore.PeopleApiContext = PeopleApiContext; + var ServiceContext = (function (_super) { + __extends(ServiceContext, _super); + function ServiceContext() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceContext.prototype, "_className", { + get: function () { + return "ServiceContext"; + }, + enumerable: true, + configurable: true + }); + ServiceContext.prototype.accountEmailOrUpn = function (instanceId) { + return _invokeMethod(this, "AccountEmailOrUpn", 1, [instanceId], 4, 0); + }; + ServiceContext.prototype.dispose = function (instance) { + _invokeMethod(this, "Dispose", 0, [instance], 0, 0); + }; + ServiceContext.prototype.getInitialPersona = function (instanceId) { + return _createMethodObject(OfficeCore.Persona, this, "GetInitialPersona", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getLokiTokenProvider = function (instanceId) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaLifetime = function (instanceId) { + return _createMethodObject(OfficeCore.PersonaLifetime, this, "GetPersonaLifetime", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaPolicies = function () { + return _invokeMethod(this, "GetPersonaPolicies", 1, [], 4, 0); + }; + ServiceContext.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceContext.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceContext.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceContext, context, "Microsoft.People.ServiceContext", false, 4); + }; + ServiceContext.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceContext; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceContext = ServiceContext; + var _typeRichapiPcxFeatureChecks = "RichapiPcxFeatureChecks"; + var RichapiPcxFeatureChecks = (function (_super) { + __extends(RichapiPcxFeatureChecks, _super); + function RichapiPcxFeatureChecks() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RichapiPcxFeatureChecks.prototype, "_className", { + get: function () { + return "RichapiPcxFeatureChecks"; + }, + enumerable: true, + configurable: true + }); + RichapiPcxFeatureChecks.prototype.isAddChangePhotoLinkOnLpcPersonaImageFlightEnabled = function () { + return _invokeMethod(this, "IsAddChangePhotoLinkOnLpcPersonaImageFlightEnabled", 1, [], 4, 0); + }; + RichapiPcxFeatureChecks.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RichapiPcxFeatureChecks.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RichapiPcxFeatureChecks.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.RichapiPcxFeatureChecks, context, "Microsoft.People.RichapiPcxFeatureChecks", false, 4); + }; + RichapiPcxFeatureChecks.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RichapiPcxFeatureChecks; + }(OfficeExtension.ClientObject)); + OfficeCore.RichapiPcxFeatureChecks = RichapiPcxFeatureChecks; + var _typeTap = "Tap"; + var Tap = (function (_super) { + __extends(Tap, _super); + function Tap() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Tap.prototype, "_className", { + get: function () { + return "Tap"; + }, + enumerable: true, + configurable: true + }); + Tap.prototype.getEnterpriseUserInfo = function () { + return _invokeMethod(this, "GetEnterpriseUserInfo", 1, [], 4 | 1, 0); + }; + Tap.prototype.getMruFriendlyPath = function (documentUrl) { + return _invokeMethod(this, "GetMruFriendlyPath", 1, [documentUrl], 4 | 1, 0); + }; + Tap.prototype.launchFileUrlInOfficeApp = function (documentUrl, useUniversalAsBackup) { + return _invokeMethod(this, "LaunchFileUrlInOfficeApp", 1, [documentUrl, useUniversalAsBackup], 4 | 1, 0); + }; + Tap.prototype.performLocalSearch = function (query, numResultsRequested, supportedFileExtensions, documentUrlToExclude) { + return _invokeMethod(this, "PerformLocalSearch", 1, [query, numResultsRequested, supportedFileExtensions, documentUrlToExclude], 4 | 1, 0); + }; + Tap.prototype.readSearchCache = function (keyword, expiredHours, filterObjectType) { + return _invokeMethod(this, "ReadSearchCache", 1, [keyword, expiredHours, filterObjectType], 4 | 1, 0); + }; + Tap.prototype.writeSearchCache = function (fileContent, keyword, filterObjectType) { + return _invokeMethod(this, "WriteSearchCache", 1, [fileContent, keyword, filterObjectType], 4 | 1, 0); + }; + Tap.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Tap.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Tap.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Tap, context, "Microsoft.TapRichApi.Tap", false, 4); + }; + Tap.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Tap; + }(OfficeExtension.ClientObject)); + OfficeCore.Tap = Tap; + var ObjectType; + (function (ObjectType) { + ObjectType["unknown"] = "Unknown"; + ObjectType["chart"] = "Chart"; + ObjectType["smartArt"] = "SmartArt"; + ObjectType["table"] = "Table"; + ObjectType["image"] = "Image"; + ObjectType["slide"] = "Slide"; + ObjectType["ole"] = "OLE"; + ObjectType["text"] = "Text"; + })(ObjectType = OfficeCore.ObjectType || (OfficeCore.ObjectType = {})); + var _typeThemeService = "ThemeService"; + var ThemeService = (function (_super) { + __extends(ThemeService, _super); + function ThemeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ThemeService.prototype, "_className", { + get: function () { + return "ThemeService"; + }, + enumerable: true, + configurable: true + }); + ThemeService.prototype.registerOfficeThemeChangedEvent = function () { + _invokeMethod(this, "RegisterOfficeThemeChangedEvent", 0, [], 0, 0); + }; + ThemeService.prototype.unregisterOfficeThemeChangedEvent = function () { + _invokeMethod(this, "UnregisterOfficeThemeChangedEvent", 0, [], 0, 0); + }; + ThemeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ThemeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ThemeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ThemeService, context, "Microsoft.Theme.ThemeService", false, 4); + }; + Object.defineProperty(ThemeService.prototype, "onOfficeThemeChanged", { + get: function () { + var _this = this; + if (!this.m_officeThemeChanged) { + this.m_officeThemeChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "OfficeThemeChanged", { + eventType: 65548, + registerFunc: function () { return _this.registerOfficeThemeChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterOfficeThemeChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.ThemeService_OfficeThemeChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_officeThemeChanged; + }, + enumerable: true, + configurable: true + }); + ThemeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ThemeService; + }(OfficeExtension.ClientObject)); + OfficeCore.ThemeService = ThemeService; + (function (_CC) { + function ThemeService_OfficeThemeChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + bodyBackgroundColor: args.bodyBackgroundColor, + bodyForegroundColor: args.bodyForegroundColor, + controlBackgroundColor: args.controlBackgroundColor, + controlForegroundColor: args.controlForegroundColor + }; + return newArgs; + } + _CC.ThemeService_OfficeThemeChanged_EventArgsTransform = ThemeService_OfficeThemeChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeAppRuntimePersistenceService = "AppRuntimePersistenceService"; + var AppRuntimePersistenceService = (function (_super) { + __extends(AppRuntimePersistenceService, _super); + function AppRuntimePersistenceService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimePersistenceService.prototype, "_className", { + get: function () { + return "AppRuntimePersistenceService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimePersistenceService.prototype.getAppRuntimeStartState = function () { + return _invokeMethod(this, "GetAppRuntimeStartState", 1, [], 4, 0); + }; + AppRuntimePersistenceService.prototype.setAppRuntimeStartState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeStartState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimePersistenceService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimePersistenceService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimePersistenceService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimePersistenceService, context, "Microsoft.AppRuntime.AppRuntimePersistenceService", false, 4); + }; + AppRuntimePersistenceService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimePersistenceService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimePersistenceService = AppRuntimePersistenceService; + var _typeAppRuntimeService = "AppRuntimeService"; + var AppRuntimeService = (function (_super) { + __extends(AppRuntimeService, _super); + function AppRuntimeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimeService.prototype, "_className", { + get: function () { + return "AppRuntimeService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.getAppRuntimeState = function () { + return _invokeMethod(this, "GetAppRuntimeState", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getContentSnapshotAsBase64 = function () { + _throwIfApiNotSupported("AppRuntimeService.getContentSnapshotAsBase64", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetContentSnapshotAsBase64", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getSnapshotEnabled = function () { + _throwIfApiNotSupported("AppRuntimeService.getSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetSnapshotEnabled", 1, [], 4, 0); + }; + AppRuntimeService.prototype.setAppRuntimeState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimeService.prototype.setSnapshotEnabled = function (enabled) { + _throwIfApiNotSupported("AppRuntimeService.setSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + _invokeMethod(this, "SetSnapshotEnabled", 1, [enabled], 4, 0); + }; + AppRuntimeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimeService, context, "Microsoft.AppRuntime.AppRuntimeService", false, 4); + }; + Object.defineProperty(AppRuntimeService.prototype, "onSnapshotImageReady", { + get: function () { + _throwIfApiNotSupported("AppRuntimeService.onSnapshotImageReady", "SnapshotControl", "1.1", _hostName); + if (!this.m_snapshotImageReady) { + this.m_snapshotImageReady = new OfficeExtension.GenericEventHandlers(this.context, this, "SnapshotImageReady", { + eventType: 65547, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + imageBase64: value.imageBase64 + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_snapshotImageReady; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppRuntimeService.prototype, "onVisibilityChanged", { + get: function () { + if (!this.m_visibilityChanged) { + this.m_visibilityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "VisibilityChanged", { + eventType: 65539, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + visibility: value.visibility + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_visibilityChanged; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimeService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimeService = AppRuntimeService; + var AppRuntimeState; + (function (AppRuntimeState) { + AppRuntimeState["inactive"] = "Inactive"; + AppRuntimeState["background"] = "Background"; + AppRuntimeState["visible"] = "Visible"; + })(AppRuntimeState = OfficeCore.AppRuntimeState || (OfficeCore.AppRuntimeState = {})); + var Visibility; + (function (Visibility) { + Visibility["hidden"] = "Hidden"; + Visibility["visible"] = "Visible"; + })(Visibility = OfficeCore.Visibility || (OfficeCore.Visibility = {})); + var LicenseFeatureTier; + (function (LicenseFeatureTier) { + LicenseFeatureTier["unknown"] = "Unknown"; + LicenseFeatureTier["basic"] = "Basic"; + LicenseFeatureTier["premium"] = "Premium"; + })(LicenseFeatureTier = OfficeCore.LicenseFeatureTier || (OfficeCore.LicenseFeatureTier = {})); + var _typeLicense = "License"; + var License = (function (_super) { + __extends(License, _super); + function License() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(License.prototype, "_className", { + get: function () { + return "License"; + }, + enumerable: true, + configurable: true + }); + License.prototype.getFeatureTier = function (feature, fallbackValue) { + return _invokeMethod(this, "GetFeatureTier", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.getLicenseFeature = function (feature) { + return _createMethodObject(OfficeCore.LicenseFeature, this, "GetLicenseFeature", 1, [feature], false, false, null, 4); + }; + License.prototype.getMsaDeviceTicket = function (resource, policy, options) { + return _invokeMethod(this, "GetMsaDeviceTicket", 1, [resource, policy, options], 4 | 1, 0); + }; + License.prototype.isFeatureEnabled = function (feature, fallbackValue) { + return _invokeMethod(this, "IsFeatureEnabled", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.isFreemiumUpsellEnabled = function () { + return _invokeMethod(this, "IsFreemiumUpsellEnabled", 1, [], 4, 0); + }; + License.prototype.launchUpsellExperience = function (experienceId) { + _invokeMethod(this, "LaunchUpsellExperience", 1, [experienceId], 4, 0); + }; + License.prototype._TestFireStateChangedEvent = function (feature) { + _invokeMethod(this, "_TestFireStateChangedEvent", 0, [feature], 1, 0); + }; + License.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + License.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + License.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.License, context, "Microsoft.Office.Licensing.License", false, 4); + }; + License.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return License; + }(OfficeExtension.ClientObject)); + OfficeCore.License = License; + var _typeLicenseFeature = "LicenseFeature"; + var LicenseFeature = (function (_super) { + __extends(LicenseFeature, _super); + function LicenseFeature() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LicenseFeature.prototype, "_className", { + get: function () { + return "LicenseFeature"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeLicenseFeature, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype._RegisterStateChange = function () { + _invokeMethod(this, "_RegisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._UnregisterStateChange = function () { + _invokeMethod(this, "_UnregisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + LicenseFeature.prototype.load = function (options) { + return _load(this, options); + }; + LicenseFeature.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LicenseFeature.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + LicenseFeature.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LicenseFeature.prototype, "onStateChanged", { + get: function () { + var _this = this; + if (!this.m_stateChanged) { + this.m_stateChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "StateChanged", { + eventType: 1, + registerFunc: function () { return _this._RegisterStateChange(); }, + unregisterFunc: function () { return _this._UnregisterStateChange(); }, + getTargetIdFunc: function () { return _this.id; }, + eventArgsTransformFunc: function (value) { + var event = _CC.LicenseFeature_StateChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_stateChanged; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + LicenseFeature.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LicenseFeature.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LicenseFeature; + }(OfficeExtension.ClientObject)); + OfficeCore.LicenseFeature = LicenseFeature; + (function (_CC) { + function LicenseFeature_StateChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + feature: args.featureName, + isEnabled: args.isEnabled, + tier: args.tierName + }; + if (args.tierName) { + newArgs.tier = args.tierName == 0 ? LicenseFeatureTier.unknown : + args.tierName == 1 ? LicenseFeatureTier.basic : + args.tierName == 2 ? LicenseFeatureTier.premium : + args.tierName; + } + return newArgs; + } + _CC.LicenseFeature_StateChanged_EventArgsTransform = LicenseFeature_StateChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeMsaDeviceTicketOptions = "MsaDeviceTicketOptions"; + var MsaDeviceTicketOptions = (function (_super) { + __extends(MsaDeviceTicketOptions, _super); + function MsaDeviceTicketOptions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_className", { + get: function () { + return "MsaDeviceTicketOptions"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyNames", { + get: function () { + return ["scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "scopes", { + get: function () { + _throwIfNotLoaded("scopes", this._S, _typeMsaDeviceTicketOptions, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Scopes", value, 0); + }, + enumerable: true, + configurable: true + }); + MsaDeviceTicketOptions.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["scopes"], [], []); + }; + MsaDeviceTicketOptions.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + MsaDeviceTicketOptions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Scopes"])) { + this._S = obj["Scopes"]; + } + }; + MsaDeviceTicketOptions.prototype.load = function (options) { + return _load(this, options); + }; + MsaDeviceTicketOptions.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MsaDeviceTicketOptions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MsaDeviceTicketOptions.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.MsaDeviceTicketOptions, context, "Microsoft.Office.Licensing.MsaDeviceTicketOptions", false, 4); + }; + MsaDeviceTicketOptions.prototype.toJSON = function () { + return _toJson(this, { + "scopes": this._S + }, {}); + }; + MsaDeviceTicketOptions.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MsaDeviceTicketOptions.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MsaDeviceTicketOptions; + }(OfficeExtension.ClientObject)); + OfficeCore.MsaDeviceTicketOptions = MsaDeviceTicketOptions; + var _typeDialogPage = "DialogPage"; + var DialogPage = (function (_super) { + __extends(DialogPage, _super); + function DialogPage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DialogPage.prototype, "_className", { + get: function () { + return "DialogPage"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_Id", { + get: function () { + _throwIfNotLoaded("_Id", this.__I, _typeDialogPage, this._isNull); + return this.__I; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4, 0); + }; + DialogPage.prototype.readyToShow = function () { + _invokeMethod(this, "ReadyToShow", 1, [], 4, 0); + }; + DialogPage.prototype.registerOnShow = function () { + _invokeMethod(this, "RegisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype.sendMessageToHost = function (message) { + _invokeMethod(this, "SendMessageToHost", 1, [message], 4, 0); + }; + DialogPage.prototype.unregisterOnShow = function () { + _invokeMethod(this, "UnregisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["_Id"])) { + this.__I = obj["_Id"]; + } + }; + DialogPage.prototype.load = function (options) { + return _load(this, options); + }; + DialogPage.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_Id"])) { + this.__I = value["_Id"]; + } + }; + DialogPage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DialogPage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DialogPage, context, "Microsoft.Office.DialogPage.DialogPage", false, 4); + }; + Object.defineProperty(DialogPage.prototype, "onOnShowEvent", { + get: function () { + var _this = this; + if (!this.m_onShowEvent) { + this.m_onShowEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "OnShowEvent", { + eventType: 1, + registerFunc: function () { return _this.registerOnShow(); }, + unregisterFunc: function () { return _this.unregisterOnShow(); }, + getTargetIdFunc: function () { return _this._Id; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_onShowEvent; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return DialogPage; + }(OfficeExtension.ClientObject)); + OfficeCore.DialogPage = DialogPage; + var _typeSharedFilePicker = "SharedFilePicker"; + var SharedFilePicker = (function (_super) { + __extends(SharedFilePicker, _super); + function SharedFilePicker() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(SharedFilePicker.prototype, "_className", { + get: function () { + return "SharedFilePicker"; + }, + enumerable: true, + configurable: true + }); + SharedFilePicker.prototype.getSharedFilePickerResponse = function (pickerCustomizationJsonString) { + return _invokeMethod(this, "GetSharedFilePickerResponse", 1, [pickerCustomizationJsonString], 4, 0); + }; + SharedFilePicker.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + SharedFilePicker.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + SharedFilePicker.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.SharedFilePicker, context, "Microsoft.Office.SharedFilePicker", false, 4); + }; + SharedFilePicker.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return SharedFilePicker; + }(OfficeExtension.ClientObject)); + OfficeCore.SharedFilePicker = SharedFilePicker; + var _typeActionService = "ActionService"; + var ActionService = (function (_super) { + __extends(ActionService, _super); + function ActionService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ActionService.prototype, "_className", { + get: function () { + return "ActionService"; + }, + enumerable: true, + configurable: true + }); + ActionService.prototype.areShortcutsInUse = function (shortcuts) { + return _invokeMethod(this, "AreShortcutsInUse", 0, [shortcuts], 0, 0); + }; + ActionService.prototype.getShortcuts = function () { + return _invokeMethod(this, "GetShortcuts", 1, [], 4, 0); + }; + ActionService.prototype.replaceShortcuts = function (shortcuts) { + _invokeMethod(this, "ReplaceShortcuts", 0, [shortcuts], 0, 0); + }; + ActionService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ActionService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ActionService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ActionService, context, "Microsoft.Office.ActionService", false, 4); + }; + ActionService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ActionService; + }(OfficeExtension.ClientObject)); + OfficeCore.ActionService = ActionService; + var _typeAuth = "Auth"; + var Auth = (function (_super) { + __extends(Auth, _super); + function Auth() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Auth.prototype, "_className", { + get: function () { + return "Auth"; + }, + enumerable: true, + configurable: true + }); + Auth.prototype.getAccessTokenFirstPartyOAuth = function (appName, target) { + return _invokeMethod(this, "GetAccessTokenFirstPartyOAuth", 1, [appName, target], 4 | 1, 0); + }; + Auth.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Auth.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Auth.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Auth, context, "Microsoft.Office.Auth", false, 1 | 4); + }; + Auth.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Auth; + }(OfficeExtension.ClientObject)); + OfficeCore.Auth = Auth; + var _typeAugLoopEventService = "AugLoopEventService"; + var AugLoopEventService = (function (_super) { + __extends(AugLoopEventService, _super); + function AugLoopEventService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AugLoopEventService.prototype, "_className", { + get: function () { + return "AugLoopEventService"; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.sendMessage = function (data) { + _invokeMethod(this, "SendMessage", 1, [data], 4 | 1, 0); + }; + AugLoopEventService.prototype._RegisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_RegisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._UnregisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_UnregisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AugLoopEventService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AugLoopEventService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AugLoopEventService, context, "Microsoft.Office.AugLoopEventService", false, 1 | 4); + }; + Object.defineProperty(AugLoopEventService.prototype, "onHostMessageReceived", { + get: function () { + var _this = this; + if (!this.m_hostMessageReceived) { + this.m_hostMessageReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "HostMessageReceived", { + eventType: 65542, + registerFunc: function () { return _this._RegisterHostMessageReceivedEvent(); }, + unregisterFunc: function () { return _this._UnregisterHostMessageReceivedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + data: value.data + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostMessageReceived; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AugLoopEventService; + }(OfficeExtension.ClientObject)); + OfficeCore.AugLoopEventService = AugLoopEventService; + var _typeUndoService = "UndoService"; + var UndoService = (function (_super) { + __extends(UndoService, _super); + function UndoService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UndoService.prototype, "_className", { + get: function () { + return "UndoService"; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.endCopilotOperation = function (batchId) { + _invokeMethod(this, "EndCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.startCopilotOperation = function (batchId) { + return _invokeMethod(this, "StartCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.undo = function () { + return _invokeMethod(this, "Undo", 0, [], 1, 0); + }; + UndoService.prototype._RegisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_RegisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._UnregisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_UnregisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UndoService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UndoService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UndoService, context, "Microsoft.Office.UndoService", false, 1 | 4); + }; + Object.defineProperty(UndoService.prototype, "onCopilotOperationStarted", { + get: function () { + if (!this.m_copilotOperationStarted) { + this.m_copilotOperationStarted = new OfficeExtension.GenericEventHandlers(this.context, this, "CopilotOperationStarted", { + eventType: 65544, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + batchId: value.batchId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_copilotOperationStarted; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UndoService.prototype, "onUndoStackChanged", { + get: function () { + var _this = this; + if (!this.m_undoStackChanged) { + this.m_undoStackChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "UndoStackChanged", { + eventType: 65543, + registerFunc: function () { return _this._RegisterUndoStackChangedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUndoStackChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_undoStackChanged; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UndoService; + }(OfficeExtension.ClientObject)); + OfficeCore.UndoService = UndoService; + var TriStateOption; + (function (TriStateOption) { + TriStateOption["notSet"] = "NotSet"; + TriStateOption["true"] = "True"; + TriStateOption["false"] = "False"; + })(TriStateOption = OfficeCore.TriStateOption || (OfficeCore.TriStateOption = {})); + var UserFeedbackType; + (function (UserFeedbackType) { + UserFeedbackType["like"] = "Like"; + UserFeedbackType["dislike"] = "Dislike"; + UserFeedbackType["idea"] = "Idea"; + UserFeedbackType["unclassified"] = "Unclassified"; + })(UserFeedbackType = OfficeCore.UserFeedbackType || (OfficeCore.UserFeedbackType = {})); + var UserFeedbackUIType; + (function (UserFeedbackUIType) { + UserFeedbackUIType["modalDialog"] = "ModalDialog"; + UserFeedbackUIType["taskpane"] = "Taskpane"; + })(UserFeedbackUIType = OfficeCore.UserFeedbackUIType || (OfficeCore.UserFeedbackUIType = {})); + var _typeUserFeedbackService = "UserFeedbackService"; + var UserFeedbackService = (function (_super) { + __extends(UserFeedbackService, _super); + function UserFeedbackService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UserFeedbackService.prototype, "_className", { + get: function () { + return "UserFeedbackService"; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.collectUserFeedback = function (feedbacktype, UIType, featureArea, options) { + _invokeMethod(this, "CollectUserFeedback", 1, [feedbacktype, UIType, featureArea, options], 4 | 1, 0); + }; + UserFeedbackService.prototype._RegisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_RegisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._UnregisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_UnregisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UserFeedbackService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UserFeedbackService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UserFeedbackService, context, "Microsoft.Office.UserFeedbackService", false, 1 | 4); + }; + Object.defineProperty(UserFeedbackService.prototype, "onUserFeedbackUIDismissed", { + get: function () { + var _this = this; + if (!this.m_userFeedbackUIDismissed) { + this.m_userFeedbackUIDismissed = new OfficeExtension.GenericEventHandlers(this.context, this, "UserFeedbackUIDismissed", { + eventType: 65546, + registerFunc: function () { return _this._RegisterUserFeedbackUIDismissedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUserFeedbackUIDismissedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + isFeedbackSent: value.isFeedbackSent + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_userFeedbackUIDismissed; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UserFeedbackService; + }(OfficeExtension.ClientObject)); + OfficeCore.UserFeedbackService = UserFeedbackService; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["apiNotAvailable"] = "ApiNotAvailable"; + ErrorCodes["clientError"] = "ClientError"; + ErrorCodes["controlIdNotFound"] = "ControlIdNotFound"; + ErrorCodes["entryIdRequired"] = "EntryIdRequired"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["hostRestartNeeded"] = "HostRestartNeeded"; + ErrorCodes["instanceNotFound"] = "InstanceNotFound"; + ErrorCodes["interactiveFlowAborted"] = "InteractiveFlowAborted"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidGrant"] = "InvalidGrant"; + ErrorCodes["invalidResourceUrl"] = "InvalidResourceUrl"; + ErrorCodes["invalidRibbonDefinition"] = "InvalidRibbonDefinition"; + ErrorCodes["objectNotFound"] = "ObjectNotFound"; + ErrorCodes["resourceNotSupported"] = "ResourceNotSupported"; + ErrorCodes["serverError"] = "ServerError"; + ErrorCodes["serviceUrlNotFound"] = "ServiceUrlNotFound"; + ErrorCodes["sharedRuntimeNotAvailable"] = "SharedRuntimeNotAvailable"; + ErrorCodes["ticketInvalidParams"] = "TicketInvalidParams"; + ErrorCodes["ticketNetworkError"] = "TicketNetworkError"; + ErrorCodes["ticketUnauthorized"] = "TicketUnauthorized"; + ErrorCodes["ticketUninitialized"] = "TicketUninitialized"; + ErrorCodes["ticketUnknownError"] = "TicketUnknownError"; + ErrorCodes["unexpectedError"] = "UnexpectedError"; + ErrorCodes["unsupportedUserIdentity"] = "UnsupportedUserIdentity"; + ErrorCodes["userNotSignedIn"] = "UserNotSignedIn"; + })(ErrorCodes = OfficeCore.ErrorCodes || (OfficeCore.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = OfficeCore.Interfaces || (OfficeCore.Interfaces = {})); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var VisibilityMode; + (function (VisibilityMode) { + VisibilityMode["hidden"] = "Hidden"; + VisibilityMode["taskpane"] = "Taskpane"; + })(VisibilityMode = Office.VisibilityMode || (Office.VisibilityMode = {})); + var StartupBehavior; + (function (StartupBehavior) { + StartupBehavior["none"] = "None"; + StartupBehavior["load"] = "Load"; + })(StartupBehavior = Office.StartupBehavior || (Office.StartupBehavior = {})); + var addin; + (function (addin) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function setStartupBehavior(behavior) { + return __awaiter(this, void 0, void 0, function () { + var state, context, appRuntimePersistenceService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (behavior !== StartupBehavior.load && behavior !== StartupBehavior.none) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.invalidArgument, null, null); + } + state = (behavior == StartupBehavior.load ? OfficeCore.AppRuntimeState.background : OfficeCore.AppRuntimeState.inactive); + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + appRuntimePersistenceService.setAppRuntimeStartState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + addin.setStartupBehavior = setStartupBehavior; + function getStartupBehavior() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimePersistenceService, stateResult, state, ret; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + stateResult = appRuntimePersistenceService.getAppRuntimeStartState(); + return [4, context.sync()]; + case 1: + _a.sent(); + state = stateResult.value; + ret = (state == OfficeCore.AppRuntimeState.inactive ? StartupBehavior.none : StartupBehavior.load); + return [2, ret]; + } + }); + }); + } + addin.getStartupBehavior = getStartupBehavior; + function setSnapshotEnabled(enabled) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setSnapshotEnabled(enabled); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, Promise.resolve()]; + } + }); + }); + } + addin.setSnapshotEnabled = setSnapshotEnabled; + function getSnapshotEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + result = appRuntimeService.getSnapshotEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + addin.getSnapshotEnabled = getSnapshotEnabled; + function getContentSnapshotAsBase64() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2, new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var context = _createRequestContext(true); + var appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + var timeoutId = setTimeout(function () { + handler.remove(); + context.sync()["catch"](function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "timeout", "getContentSnapshotAsBase64")); + }, 7000); + var handler = appRuntimeService.onSnapshotImageReady.add(function (arg) { + clearTimeout(timeoutId); + handler.remove(); + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + context.sync()["catch"](function () { }); + resolve(arg.imageBase64); + } + else { + context.sync()["catch"](function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "execution failed", "getContentSnapshotAsBase64")); + } + return null; + }); + context.sync().then(function () { + var apiResult = appRuntimeService.getContentSnapshotAsBase64(); + return context.sync().then(function () { return null; }); + })["catch"](function (e) { reject(e); }); + })]; + }); + }); + } + addin.getContentSnapshotAsBase64 = getContentSnapshotAsBase64; + function _setState(state) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setAppRuntimeState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + function _getState() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, stateResult; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + stateResult = appRuntimeService.getAppRuntimeState(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, stateResult.value]; + } + }); + }); + } + addin._getState = _getState; + function showAsTaskpane() { + return _setState(OfficeCore.AppRuntimeState.visible); + } + addin.showAsTaskpane = showAsTaskpane; + function hide() { + return _setState(OfficeCore.AppRuntimeState.background); + } + addin.hide = hide; + var _appRuntimeEvent; + function _getAppRuntimeEventService() { + if (!_appRuntimeEvent) { + var context = _createRequestContext(true); + _appRuntimeEvent = OfficeCore.AppRuntimeService.newObject(context); + } + return _appRuntimeEvent; + } + function _convertVisibilityToVisibilityMode(visibility) { + if (visibility === OfficeCore.Visibility.visible) { + return VisibilityMode.taskpane; + } + return VisibilityMode.hidden; + } + function onVisibilityModeChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var eventService, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + eventService = _getAppRuntimeEventService(); + registrationToken = eventService.onVisibilityChanged.add(function (args) { + if (listener) { + var msg = { + visibilityMode: _convertVisibilityToVisibilityMode(args.visibility) + }; + listener(msg); + } + return null; + }); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + addin.onVisibilityModeChanged = onVisibilityModeChanged; + var beforeDocumentCloseNotification; + (function (beforeDocumentCloseNotification) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function enable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.enable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.enable = enable; + function disable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.disable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.disable = disable; + function onCloseActionCancelled(listener) { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + registrationToken = beforeCloseNotification.onBeforeCloseNotificationCancelled.add(function (args) { + if (listener) { + listener(); + } + return null; + }); + return [4, context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + beforeDocumentCloseNotification.onCloseActionCancelled = onCloseActionCancelled; + })(beforeDocumentCloseNotification = addin.beforeDocumentCloseNotification || (addin.beforeDocumentCloseNotification = {})); + })(addin = Office.addin || (Office.addin = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ExtensionComponentType; + (function (ExtensionComponentType) { + ExtensionComponentType["taskpane"] = "Taskpane"; + })(ExtensionComponentType || (ExtensionComponentType = {})); + var extensionLifeCycle; + (function (extensionLifeCycle) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + return context; + } + function launchTaskpane(launchOptions) { + return __awaiter(this, void 0, void 0, function () { + var context, extensionLifecycle, settings; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + extensionLifecycle = OfficeCore.ExtensionLifeCycle.newObject(context); + settings = launchOptions.settings; + if (settings != undefined) { + launchOptions.settings = OSF.OUtil.serializeSettings(settings); + } + extensionLifecycle.launchExtensionComponent("", ExtensionComponentType.taskpane, launchOptions); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + extensionLifeCycle.launchTaskpane = launchTaskpane; + })(extensionLifeCycle = Office.extensionLifeCycle || (Office.extensionLifeCycle = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ribbon; + (function (ribbon_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function requestUpdate(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + function processControls(parent) { + if (parent.controls !== undefined + && parent.controls.length !== undefined + && !!parent.controls.length) { + parent.controls + .filter(function (control) { return !(!control.id); }) + .forEach(function (control) { + var ribbonControl = ribbon.getButton(control.id); + if (control.enabled !== undefined && control.enabled !== null) { + ribbonControl.enabled = control.enabled; + } + }); + } + } + input.tabs + .filter(function (tab) { return !(!tab.id); }) + .forEach(function (tab) { + var ribbonTab = ribbon.getTab(tab.id); + if (tab.visible !== undefined && tab.visible !== null) { + ribbonTab.setVisibility(tab.visible); + } + if (!!tab.groups && !!tab.groups.length) { + tab.groups + .filter(function (group) { return !(!group.id); }) + .forEach(function (group) { + processControls(group); + }); + } + else { + processControls(tab); + } + }); + return requestContext.sync(); + } + ribbon_1.requestUpdate = requestUpdate; + function requestCreateControls(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + var delay = function (milliseconds) { + return new Promise(function (resolve, _) { return setTimeout(function () { return resolve(); }, milliseconds); }); + }; + ribbon.executeRequestCreate(JSON.stringify(input)); + return delay(250) + .then(function () { return requestContext.sync(); }); + } + ribbon_1.requestCreateControls = requestCreateControls; + })(ribbon = Office.ribbon || (Office.ribbon = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var AddinInternalServiceErrorCodes; + (function (AddinInternalServiceErrorCodes) { + AddinInternalServiceErrorCodes["generalException"] = "GeneralException"; + })(AddinInternalServiceErrorCodes || (AddinInternalServiceErrorCodes = {})); + var _libraryMetadataInternalServiceApi = { "version": "1.0.0", + "name": "OfficeCore", + "defaultApiSetName": "OfficeSharedApi", + "hostName": "Office", + "apiSets": [], + "strings": ["AddinInternalService"], + "enumTypes": [], + "clientObjectTypes": [[1, + 0, + 0, + 0, + [["notifyActionHandlerReady", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + 0, + "Microsoft.InternalService.AddinInternalService", + 4]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataInternalServiceApi, targetNamespaceObject: OfficeCore }); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var actionProxy; + (function (actionProxy) { + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _association; + var ActionMessageCategory = 2; + var ActionDispatchMessageType = 1000; + function init() { + if (typeof (OSF) !== "undefined" && OSF.DDA && OSF.DDA.RichApi && OSF.DDA.RichApi.richApiMessageManager) { + var context = new OfficeExtension.ClientRequestContext(); + return context.eventRegistration.register(5, "", _handleMessage); + } + } + function setActionAssociation(association) { + _association = association; + } + function _getFunction(functionName) { + if (functionName) { + var nameUpperCase = functionName.toUpperCase(); + var call = _association.mappings[nameUpperCase]; + if (!_isNullOrUndefined(call) && typeof (call) === "function") { + return call; + } + } + throw OfficeExtension.Utility.createRuntimeError("invalidOperation", "sourceData", "ActionProxy._getFunction"); + } + function _handleMessage(args) { + try { + OfficeExtension.Utility.log('ActionProxy._handleMessage'); + OfficeExtension.Utility.checkArgumentNull(args, "args"); + var entryArray = args.entries; + var invocationArray = []; + for (var i = 0; i < entryArray.length; i++) { + if (entryArray[i].messageCategory !== ActionMessageCategory) { + continue; + } + if (typeof (entryArray[i].message) === 'string') { + entryArray[i].message = JSON.parse(entryArray[i].message); + } + if (entryArray[i].messageType === ActionDispatchMessageType) { + var actionsArgs = null; + var actionName = entryArray[i].message[0]; + var call = _getFunction(actionName); + if (entryArray[i].message.length >= 2) { + var actionArgsJson = entryArray[i].message[1]; + if (actionArgsJson) { + if (_isJsonObjectString(actionArgsJson)) { + actionsArgs = JSON.parse(actionArgsJson); + } + else { + actionsArgs = actionArgsJson; + } + } + } + if (typeof (OSF) !== 'undefined' && + OSF.AppTelemetry && + OSF.AppTelemetry.CallOnAppActivatedIfPending) { + OSF.AppTelemetry.CallOnAppActivatedIfPending(); + } + call.apply(null, [actionsArgs]); + } + else { + OfficeExtension.Utility.log('ActionProxy._handleMessage unknown message type ' + entryArray[i].messageType); + } + } + } + catch (ex) { + _tryLog(ex); + throw ex; + } + return OfficeExtension.Utility._createPromiseFromResult(null); + } + function _isJsonObjectString(value) { + if (typeof value === 'string' && value[0] === '{') { + return true; + } + return false; + } + function toLogMessage(ex) { + var ret = 'Unknown Error'; + if (ex) { + try { + if (ex.toString) { + ret = ex.toString(); + } + ret = ret + ' ' + JSON.stringify(ex); + } + catch (otherEx) { + ret = 'Unexpected Error'; + } + } + return ret; + } + function _tryLog(ex) { + var message = toLogMessage(ex); + OfficeExtension.Utility.log(message); + } + function notifyActionHandlerReady() { + var context = new OfficeExtension.ClientRequestContext(); + var addinInternalService = OfficeCore.AddinInternalService.newObject(context); + context._customData = 'WacPartition'; + addinInternalService.notifyActionHandlerReady(); + return context.sync(); + } + function handlerOnReadyInternal() { + try { + Microsoft.Office.WebExtension.onReadyInternal() + .then(function () { + return init(); + }) + .then(function () { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.isDialog === true || (hostInfo.hostPlatform === "web" && hostInfo.hostType !== "word" && hostInfo.hostType !== "excel")) { + return; + } + else { + return notifyActionHandlerReady(); + } + }); + } + catch (ex) { + } + } + function initFromHostBridge(hostBridge) { + hostBridge.addHostMessageHandler(function (bridgeMessage) { + if (bridgeMessage.type === 3) { + _handleMessage(bridgeMessage.message); + } + }); + } + function initOnce() { + OfficeExtension.Utility.log('ActionProxy.initOnce'); + if (typeof (Office.actions) != 'undefined') { + setActionAssociation(Office.actions._association); + } + if (typeof (document) !== 'undefined') { + if (document.readyState && document.readyState !== 'loading') { + OfficeExtension.Utility.log('ActionProxy.initOnce: document.readyState is not loading state'); + handlerOnReadyInternal(); + } + else if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", function () { + OfficeExtension.Utility.log('ActionProxy.initOnce: DOMContentLoaded event triggered'); + handlerOnReadyInternal(); + }); + } + } + OfficeExtension.HostBridge.onInited(function (hostBridge) { + initFromHostBridge(hostBridge); + }); + } + initOnce(); + })(actionProxy || (actionProxy = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var actions; + (function (actions) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function areShortcutsInUse(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, inUseArray, inUseInfoArray, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + inUseArray = actionService.areShortcutsInUse(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + inUseInfoArray = []; + for (i = 0; i < shortcuts.length; i++) { + inUseInfoArray.push({ + shortcut: shortcuts[i], + inUse: inUseArray.value[i] + }); + } + return [2, inUseInfoArray]; + } + }); + }); + } + actions.areShortcutsInUse = areShortcutsInUse; + function replaceShortcuts(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + actionService.replaceShortcuts(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + actions.replaceShortcuts = replaceShortcuts; + function getShortcuts() { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, shortcuts; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + shortcuts = actionService.getShortcuts(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, shortcuts.value]; + } + }); + }); + } + actions.getShortcuts = getShortcuts; + })(actions = Office.actions || (Office.actions = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var AugLoop; + (function (AugLoop) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function SendMessage(message) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + augLoopEventService.sendMessage(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + AugLoop.SendMessage = SendMessage; + function onHostMessageReceived(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService, callback, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + callback = function (args) { + if (listener) { + var message = args.data; + listener(message); + } + return null; + }; + augLoopEventService.onHostMessageReceived.add(callback); + return [4, augLoopEventService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + augLoopEventService.onHostMessageReceived.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + AugLoop.onHostMessageReceived = onHostMessageReceived; + })(AugLoop = OfficeFirstParty.AugLoop || (OfficeFirstParty.AugLoop = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var Undo; + (function (Undo) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + context._customData = 'SkipUndoRecording'; + return context; + } + var resolver; + function onCopilotOperationStartedEventReceived() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (typeof resolver !== "undefined") { + resolver(); + resolver = undefined; + } + return [2]; + }); + }); + } + function undo() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + result = undoService.undo(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + Undo.undo = undo; + function onUndoStackChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onUndoStackChanged.add(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + undoService.onUndoStackChanged.remove(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + Undo.onUndoStackChanged = onUndoStackChanged; + function startCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var waitForEventPromise, context, undoService, shouldWaitForEvent, e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (typeof resolver !== "undefined") { + throw new Error("startCopilotOperation is already inprogress"); + } + waitForEventPromise = new Promise(function (resolve) { resolver = resolve; }); + _a.label = 1; + case 1: + _a.trys.push([1, 4, , 5]); + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onCopilotOperationStarted.add(onCopilotOperationStartedEventReceived); + return [4, context.sync()]; + case 2: + _a.sent(); + shouldWaitForEvent = undoService.startCopilotOperation(""); + return [4, context.sync()]; + case 3: + _a.sent(); + if (shouldWaitForEvent.value) { + return [2, waitForEventPromise]; + } + else { + resolver = undefined; + } + return [3, 5]; + case 4: + e_1 = _a.sent(); + resolver = undefined; + throw e_1; + case 5: return [2]; + } + }); + }); + } + Undo.startCopilotOperation = startCopilotOperation; + function endCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.endCopilotOperation(""); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + Undo.endCopilotOperation = endCopilotOperation; + })(Undo = OfficeFirstParty.Undo || (OfficeFirstParty.Undo = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var Office; +(function (Office) { + var dialogPage; + (function (dialogPage_1) { + function close() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.close(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.close = close; + function readyToShow() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.readyToShow(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.readyToShow = readyToShow; + function onShow(callback) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.onOnShowEvent.add(callback); + removeListener = function () { + dialogPage.onOnShowEvent.remove(callback); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + dialogPage_1.onShow = onShow; + function sendMessageToHost(message) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.sendMessageToHost(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.sendMessageToHost = sendMessageToHost; + })(dialogPage = Office.dialogPage || (Office.dialogPage = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var UserFeedback; + (function (UserFeedback) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function CollectUserFeedback(feedbacktype, uiType, featureArea, options) { + return __awaiter(this, void 0, void 0, function () { + var context, userFeedbackService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.collectUserFeedback(feedbacktype, uiType, featureArea, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + UserFeedback.CollectUserFeedback = CollectUserFeedback; + function onUserFeedbackUIDismissed(listener) { + return __awaiter(this, void 0, void 0, function () { + var callback, context, userFeedbackService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + callback = function (args) { + if (listener) { + var isFeedbackSent = args.isFeedbackSent; + listener(isFeedbackSent); + } + return null; + }; + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.onUserFeedbackUIDismissed.add(callback); + return [4, userFeedbackService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + userFeedbackService.onUserFeedbackUIDismissed.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + UserFeedback.onUserFeedbackUIDismissed = onUserFeedbackUIDismissed; + })(UserFeedback = OfficeFirstParty.UserFeedback || (OfficeFirstParty.UserFeedback = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var _BeginExcel = "_BeginExcel"; +var Excel; +(function (Excel) { + var Base64EncodingType; + (function (Base64EncodingType) { + Base64EncodingType["JPG"] = "JPG"; + Base64EncodingType["PNG"] = "PNG"; + })(Base64EncodingType = Excel.Base64EncodingType || (Excel.Base64EncodingType = {})); + var BlockedErrorCellValueSubType; + (function (BlockedErrorCellValueSubType) { + BlockedErrorCellValueSubType["unknown"] = "Unknown"; + BlockedErrorCellValueSubType["dataTypeRestrictedDomain"] = "DataTypeRestrictedDomain"; + BlockedErrorCellValueSubType["dataTypePrivacySetting"] = "DataTypePrivacySetting"; + BlockedErrorCellValueSubType["dataTypeUnsupportedApp"] = "DataTypeUnsupportedApp"; + BlockedErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BlockedErrorCellValueSubType["richDataLinkDisabled"] = "RichDataLinkDisabled"; + BlockedErrorCellValueSubType["signInError"] = "SignInError"; + BlockedErrorCellValueSubType["noLicense"] = "NoLicense"; + })(BlockedErrorCellValueSubType = Excel.BlockedErrorCellValueSubType || (Excel.BlockedErrorCellValueSubType = {})); + var BusyErrorCellValueSubType; + (function (BusyErrorCellValueSubType) { + BusyErrorCellValueSubType["unknown"] = "Unknown"; + BusyErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BusyErrorCellValueSubType["loadingImage"] = "LoadingImage"; + })(BusyErrorCellValueSubType = Excel.BusyErrorCellValueSubType || (Excel.BusyErrorCellValueSubType = {})); + var CalcErrorCellValueSubType; + (function (CalcErrorCellValueSubType) { + CalcErrorCellValueSubType["unknown"] = "Unknown"; + CalcErrorCellValueSubType["arrayOfArrays"] = "ArrayOfArrays"; + CalcErrorCellValueSubType["arrayOfRanges"] = "ArrayOfRanges"; + CalcErrorCellValueSubType["emptyArray"] = "EmptyArray"; + CalcErrorCellValueSubType["unsupportedLifting"] = "UnsupportedLifting"; + CalcErrorCellValueSubType["dataTableReferencedPendingFormula"] = "DataTableReferencedPendingFormula"; + CalcErrorCellValueSubType["tooManyCells"] = "TooManyCells"; + CalcErrorCellValueSubType["lambdaInCell"] = "LambdaInCell"; + CalcErrorCellValueSubType["tooDeeplyNested"] = "TooDeeplyNested"; + CalcErrorCellValueSubType["textOverflow"] = "TextOverflow"; + })(CalcErrorCellValueSubType = Excel.CalcErrorCellValueSubType || (Excel.CalcErrorCellValueSubType = {})); + var EntityCardLayoutType; + (function (EntityCardLayoutType) { + EntityCardLayoutType["entity"] = "Entity"; + EntityCardLayoutType["array"] = "Array"; + })(EntityCardLayoutType = Excel.EntityCardLayoutType || (Excel.EntityCardLayoutType = {})); + var EntityCompactLayoutIcons; + (function (EntityCompactLayoutIcons) { + EntityCompactLayoutIcons["generic"] = "Generic"; + EntityCompactLayoutIcons["accessibility"] = "Accessibility"; + EntityCompactLayoutIcons["airplane"] = "Airplane"; + EntityCompactLayoutIcons["airplaneTakeOff"] = "AirplaneTakeOff"; + EntityCompactLayoutIcons["album"] = "Album"; + EntityCompactLayoutIcons["alert"] = "Alert"; + EntityCompactLayoutIcons["alertUrgent"] = "AlertUrgent"; + EntityCompactLayoutIcons["animal"] = "Animal"; + EntityCompactLayoutIcons["animalCat"] = "AnimalCat"; + EntityCompactLayoutIcons["animalDog"] = "AnimalDog"; + EntityCompactLayoutIcons["animalRabbit"] = "AnimalRabbit"; + EntityCompactLayoutIcons["animalTurtle"] = "AnimalTurtle"; + EntityCompactLayoutIcons["appFolder"] = "AppFolder"; + EntityCompactLayoutIcons["appGeneric"] = "AppGeneric"; + EntityCompactLayoutIcons["apple"] = "Apple"; + EntityCompactLayoutIcons["approvalsApp"] = "ApprovalsApp"; + EntityCompactLayoutIcons["archive"] = "Archive"; + EntityCompactLayoutIcons["archiveMultiple"] = "ArchiveMultiple"; + EntityCompactLayoutIcons["arrowTrendingLines"] = "ArrowTrendingLines"; + EntityCompactLayoutIcons["art"] = "Art"; + EntityCompactLayoutIcons["atom"] = "Atom"; + EntityCompactLayoutIcons["attach"] = "Attach"; + EntityCompactLayoutIcons["automobile"] = "Automobile"; + EntityCompactLayoutIcons["autosum"] = "Autosum"; + EntityCompactLayoutIcons["backpack"] = "Backpack"; + EntityCompactLayoutIcons["badge"] = "Badge"; + EntityCompactLayoutIcons["balloon"] = "Balloon"; + EntityCompactLayoutIcons["bank"] = "Bank"; + EntityCompactLayoutIcons["barcodeScanner"] = "BarcodeScanner"; + EntityCompactLayoutIcons["basketball"] = "Basketball"; + EntityCompactLayoutIcons["battery0"] = "Battery0"; + EntityCompactLayoutIcons["battery10"] = "Battery10"; + EntityCompactLayoutIcons["beach"] = "Beach"; + EntityCompactLayoutIcons["beaker"] = "Beaker"; + EntityCompactLayoutIcons["bed"] = "Bed"; + EntityCompactLayoutIcons["binFull"] = "BinFull"; + EntityCompactLayoutIcons["bird"] = "Bird"; + EntityCompactLayoutIcons["bluetooth"] = "Bluetooth"; + EntityCompactLayoutIcons["board"] = "Board"; + EntityCompactLayoutIcons["boardGames"] = "BoardGames"; + EntityCompactLayoutIcons["book"] = "Book"; + EntityCompactLayoutIcons["bookmark"] = "Bookmark"; + EntityCompactLayoutIcons["bookmarkMultiple"] = "BookmarkMultiple"; + EntityCompactLayoutIcons["bot"] = "Bot"; + EntityCompactLayoutIcons["bowlChopsticks"] = "BowlChopsticks"; + EntityCompactLayoutIcons["box"] = "Box"; + EntityCompactLayoutIcons["boxMultiple"] = "BoxMultiple"; + EntityCompactLayoutIcons["brainCircuit"] = "BrainCircuit"; + EntityCompactLayoutIcons["branch"] = "Branch"; + EntityCompactLayoutIcons["branchFork"] = "BranchFork"; + EntityCompactLayoutIcons["branchRequest"] = "BranchRequest"; + EntityCompactLayoutIcons["bridge"] = "Bridge"; + EntityCompactLayoutIcons["briefcase"] = "Briefcase"; + EntityCompactLayoutIcons["briefcaseMedical"] = "BriefcaseMedical"; + EntityCompactLayoutIcons["broadActivityFeed"] = "BroadActivityFeed"; + EntityCompactLayoutIcons["broom"] = "Broom"; + EntityCompactLayoutIcons["bug"] = "Bug"; + EntityCompactLayoutIcons["building"] = "Building"; + EntityCompactLayoutIcons["buildingBank"] = "BuildingBank"; + EntityCompactLayoutIcons["buildingFactory"] = "BuildingFactory"; + EntityCompactLayoutIcons["buildingGovernment"] = "BuildingGovernment"; + EntityCompactLayoutIcons["buildingHome"] = "BuildingHome"; + EntityCompactLayoutIcons["buildingLighthouse"] = "BuildingLighthouse"; + EntityCompactLayoutIcons["buildingMultiple"] = "BuildingMultiple"; + EntityCompactLayoutIcons["buildingRetail"] = "BuildingRetail"; + EntityCompactLayoutIcons["buildingRetailMore"] = "BuildingRetailMore"; + EntityCompactLayoutIcons["buildingRetailToolbox"] = "BuildingRetailToolbox"; + EntityCompactLayoutIcons["buildingShop"] = "BuildingShop"; + EntityCompactLayoutIcons["buildingSkyscraper"] = "BuildingSkyscraper"; + EntityCompactLayoutIcons["calculator"] = "Calculator"; + EntityCompactLayoutIcons["calendarLtr"] = "CalendarLtr"; + EntityCompactLayoutIcons["calendarRtl"] = "CalendarRtl"; + EntityCompactLayoutIcons["call"] = "Call"; + EntityCompactLayoutIcons["calligraphyPen"] = "CalligraphyPen"; + EntityCompactLayoutIcons["camera"] = "Camera"; + EntityCompactLayoutIcons["cameraDome"] = "CameraDome"; + EntityCompactLayoutIcons["car"] = "Car"; + EntityCompactLayoutIcons["cart"] = "Cart"; + EntityCompactLayoutIcons["cat"] = "Cat"; + EntityCompactLayoutIcons["certificate"] = "Certificate"; + EntityCompactLayoutIcons["chartMultiple"] = "ChartMultiple"; + EntityCompactLayoutIcons["chat"] = "Chat"; + EntityCompactLayoutIcons["chatMultiple"] = "ChatMultiple"; + EntityCompactLayoutIcons["chatVideo"] = "ChatVideo"; + EntityCompactLayoutIcons["check"] = "Check"; + EntityCompactLayoutIcons["checkboxChecked"] = "CheckboxChecked"; + EntityCompactLayoutIcons["checkboxUnchecked"] = "CheckboxUnchecked"; + EntityCompactLayoutIcons["checkmark"] = "Checkmark"; + EntityCompactLayoutIcons["chess"] = "Chess"; + EntityCompactLayoutIcons["city"] = "City"; + EntityCompactLayoutIcons["class"] = "Class"; + EntityCompactLayoutIcons["classification"] = "Classification"; + EntityCompactLayoutIcons["clipboard"] = "Clipboard"; + EntityCompactLayoutIcons["clipboardDataBar"] = "ClipboardDataBar"; + EntityCompactLayoutIcons["clipboardPulse"] = "ClipboardPulse"; + EntityCompactLayoutIcons["clipboardTask"] = "ClipboardTask"; + EntityCompactLayoutIcons["clock"] = "Clock"; + EntityCompactLayoutIcons["clockAlarm"] = "ClockAlarm"; + EntityCompactLayoutIcons["cloud"] = "Cloud"; + EntityCompactLayoutIcons["cloudWords"] = "CloudWords"; + EntityCompactLayoutIcons["code"] = "Code"; + EntityCompactLayoutIcons["collections"] = "Collections"; + EntityCompactLayoutIcons["comment"] = "Comment"; + EntityCompactLayoutIcons["commentMultiple"] = "CommentMultiple"; + EntityCompactLayoutIcons["communication"] = "Communication"; + EntityCompactLayoutIcons["compassNorthwest"] = "CompassNorthwest"; + EntityCompactLayoutIcons["conferenceRoom"] = "ConferenceRoom"; + EntityCompactLayoutIcons["connector"] = "Connector"; + EntityCompactLayoutIcons["constellation"] = "Constellation"; + EntityCompactLayoutIcons["contactCard"] = "ContactCard"; + EntityCompactLayoutIcons["cookies"] = "Cookies"; + EntityCompactLayoutIcons["couch"] = "Couch"; + EntityCompactLayoutIcons["creditCardPerson"] = "CreditCardPerson"; + EntityCompactLayoutIcons["creditCardToolbox"] = "CreditCardToolbox"; + EntityCompactLayoutIcons["cube"] = "Cube"; + EntityCompactLayoutIcons["cubeMultiple"] = "CubeMultiple"; + EntityCompactLayoutIcons["cubeTree"] = "CubeTree"; + EntityCompactLayoutIcons["currencyDollarEuro"] = "CurrencyDollarEuro"; + EntityCompactLayoutIcons["currencyDollarRupee"] = "CurrencyDollarRupee"; + EntityCompactLayoutIcons["dataArea"] = "DataArea"; + EntityCompactLayoutIcons["database"] = "Database"; + EntityCompactLayoutIcons["databaseMultiple"] = "DatabaseMultiple"; + EntityCompactLayoutIcons["dataFunnel"] = "DataFunnel"; + EntityCompactLayoutIcons["dataHistogram"] = "DataHistogram"; + EntityCompactLayoutIcons["dataLine"] = "DataLine"; + EntityCompactLayoutIcons["dataPie"] = "DataPie"; + EntityCompactLayoutIcons["dataScatter"] = "DataScatter"; + EntityCompactLayoutIcons["dataSunburst"] = "DataSunburst"; + EntityCompactLayoutIcons["dataTreemap"] = "DataTreemap"; + EntityCompactLayoutIcons["dataWaterfall"] = "DataWaterfall"; + EntityCompactLayoutIcons["dataWhisker"] = "DataWhisker"; + EntityCompactLayoutIcons["dentist"] = "Dentist"; + EntityCompactLayoutIcons["designIdeas"] = "DesignIdeas"; + EntityCompactLayoutIcons["desktop"] = "Desktop"; + EntityCompactLayoutIcons["desktopMac"] = "DesktopMac"; + EntityCompactLayoutIcons["developerBoard"] = "DeveloperBoard"; + EntityCompactLayoutIcons["deviceMeetingRoom"] = "DeviceMeetingRoom"; + EntityCompactLayoutIcons["diagram"] = "Diagram"; + EntityCompactLayoutIcons["dialpad"] = "Dialpad"; + EntityCompactLayoutIcons["diamond"] = "Diamond"; + EntityCompactLayoutIcons["dinosaur"] = "Dinosaur"; + EntityCompactLayoutIcons["directions"] = "Directions"; + EntityCompactLayoutIcons["disaster"] = "Disaster"; + EntityCompactLayoutIcons["diversity"] = "Diversity"; + EntityCompactLayoutIcons["dNA"] = "DNA"; + EntityCompactLayoutIcons["doctor"] = "Doctor"; + EntityCompactLayoutIcons["document"] = "Document"; + EntityCompactLayoutIcons["documentData"] = "DocumentData"; + EntityCompactLayoutIcons["documentLandscape"] = "DocumentLandscape"; + EntityCompactLayoutIcons["documentMultiple"] = "DocumentMultiple"; + EntityCompactLayoutIcons["documentPdf"] = "DocumentPdf"; + EntityCompactLayoutIcons["documentQueue"] = "DocumentQueue"; + EntityCompactLayoutIcons["documentText"] = "DocumentText"; + EntityCompactLayoutIcons["dog"] = "Dog"; + EntityCompactLayoutIcons["door"] = "Door"; + EntityCompactLayoutIcons["doorTag"] = "DoorTag"; + EntityCompactLayoutIcons["drafts"] = "Drafts"; + EntityCompactLayoutIcons["drama"] = "Drama"; + EntityCompactLayoutIcons["drinkBeer"] = "DrinkBeer"; + EntityCompactLayoutIcons["drinkCoffee"] = "DrinkCoffee"; + EntityCompactLayoutIcons["drinkMargarita"] = "DrinkMargarita"; + EntityCompactLayoutIcons["drinkToGo"] = "DrinkToGo"; + EntityCompactLayoutIcons["drinkWine"] = "DrinkWine"; + EntityCompactLayoutIcons["driveTrain"] = "DriveTrain"; + EntityCompactLayoutIcons["drop"] = "Drop"; + EntityCompactLayoutIcons["dualScreen"] = "DualScreen"; + EntityCompactLayoutIcons["dumbbell"] = "Dumbbell"; + EntityCompactLayoutIcons["earth"] = "Earth"; + EntityCompactLayoutIcons["emoji"] = "Emoji"; + EntityCompactLayoutIcons["emojiAngry"] = "EmojiAngry"; + EntityCompactLayoutIcons["emojiHand"] = "EmojiHand"; + EntityCompactLayoutIcons["emojiLaugh"] = "EmojiLaugh"; + EntityCompactLayoutIcons["emojiMeh"] = "EmojiMeh"; + EntityCompactLayoutIcons["emojiMultiple"] = "EmojiMultiple"; + EntityCompactLayoutIcons["emojiSad"] = "EmojiSad"; + EntityCompactLayoutIcons["emojiSadSlight"] = "EmojiSadSlight"; + EntityCompactLayoutIcons["emojiSmileSlight"] = "EmojiSmileSlight"; + EntityCompactLayoutIcons["emojiSparkle"] = "EmojiSparkle"; + EntityCompactLayoutIcons["emojiSurprise"] = "EmojiSurprise"; + EntityCompactLayoutIcons["engine"] = "Engine"; + EntityCompactLayoutIcons["eraser"] = "Eraser"; + EntityCompactLayoutIcons["eye"] = "Eye"; + EntityCompactLayoutIcons["eyedropper"] = "Eyedropper"; + EntityCompactLayoutIcons["fax"] = "Fax"; + EntityCompactLayoutIcons["fingerprint"] = "Fingerprint"; + EntityCompactLayoutIcons["firstAid"] = "FirstAid"; + EntityCompactLayoutIcons["flag"] = "Flag"; + EntityCompactLayoutIcons["flash"] = "Flash"; + EntityCompactLayoutIcons["flashlight"] = "Flashlight"; + EntityCompactLayoutIcons["flow"] = "Flow"; + EntityCompactLayoutIcons["flowchart"] = "Flowchart"; + EntityCompactLayoutIcons["folder"] = "Folder"; + EntityCompactLayoutIcons["folderOpen"] = "FolderOpen"; + EntityCompactLayoutIcons["folderOpenVertical"] = "FolderOpenVertical"; + EntityCompactLayoutIcons["folderPerson"] = "FolderPerson"; + EntityCompactLayoutIcons["folderZip"] = "FolderZip"; + EntityCompactLayoutIcons["food"] = "Food"; + EntityCompactLayoutIcons["foodApple"] = "FoodApple"; + EntityCompactLayoutIcons["foodCake"] = "FoodCake"; + EntityCompactLayoutIcons["foodEgg"] = "FoodEgg"; + EntityCompactLayoutIcons["foodGrains"] = "FoodGrains"; + EntityCompactLayoutIcons["foodPizza"] = "FoodPizza"; + EntityCompactLayoutIcons["foodToast"] = "FoodToast"; + EntityCompactLayoutIcons["galaxy"] = "Galaxy"; + EntityCompactLayoutIcons["games"] = "Games"; + EntityCompactLayoutIcons["ganttChart"] = "GanttChart"; + EntityCompactLayoutIcons["gas"] = "Gas"; + EntityCompactLayoutIcons["gasPump"] = "GasPump"; + EntityCompactLayoutIcons["gauge"] = "Gauge"; + EntityCompactLayoutIcons["gavel"] = "Gavel"; + EntityCompactLayoutIcons["gift"] = "Gift"; + EntityCompactLayoutIcons["giftCard"] = "GiftCard"; + EntityCompactLayoutIcons["glasses"] = "Glasses"; + EntityCompactLayoutIcons["globe"] = "Globe"; + EntityCompactLayoutIcons["globeSurface"] = "GlobeSurface"; + EntityCompactLayoutIcons["grid"] = "Grid"; + EntityCompactLayoutIcons["gridDots"] = "GridDots"; + EntityCompactLayoutIcons["gridKanban"] = "GridKanban"; + EntityCompactLayoutIcons["guardian"] = "Guardian"; + EntityCompactLayoutIcons["guest"] = "Guest"; + EntityCompactLayoutIcons["guitar"] = "Guitar"; + EntityCompactLayoutIcons["handLeft"] = "HandLeft"; + EntityCompactLayoutIcons["handRight"] = "HandRight"; + EntityCompactLayoutIcons["handshake"] = "Handshake"; + EntityCompactLayoutIcons["hardDrive"] = "HardDrive"; + EntityCompactLayoutIcons["hatGraduation"] = "HatGraduation"; + EntityCompactLayoutIcons["headphones"] = "Headphones"; + EntityCompactLayoutIcons["headphonesSoundWave"] = "HeadphonesSoundWave"; + EntityCompactLayoutIcons["headset"] = "Headset"; + EntityCompactLayoutIcons["headsetVr"] = "HeadsetVr"; + EntityCompactLayoutIcons["heart"] = "Heart"; + EntityCompactLayoutIcons["heartBroken"] = "HeartBroken"; + EntityCompactLayoutIcons["heartCircle"] = "HeartCircle"; + EntityCompactLayoutIcons["heartHuman"] = "HeartHuman"; + EntityCompactLayoutIcons["heartPulse"] = "HeartPulse"; + EntityCompactLayoutIcons["history"] = "History"; + EntityCompactLayoutIcons["home"] = "Home"; + EntityCompactLayoutIcons["homeMore"] = "HomeMore"; + EntityCompactLayoutIcons["homePerson"] = "HomePerson"; + EntityCompactLayoutIcons["icons"] = "Icons"; + EntityCompactLayoutIcons["image"] = "Image"; + EntityCompactLayoutIcons["imageGlobe"] = "ImageGlobe"; + EntityCompactLayoutIcons["imageMultiple"] = "ImageMultiple"; + EntityCompactLayoutIcons["iot"] = "Iot"; + EntityCompactLayoutIcons["joystick"] = "Joystick"; + EntityCompactLayoutIcons["justice"] = "Justice"; + EntityCompactLayoutIcons["key"] = "Key"; + EntityCompactLayoutIcons["keyboard"] = "Keyboard"; + EntityCompactLayoutIcons["keyboardLayoutSplit"] = "KeyboardLayoutSplit"; + EntityCompactLayoutIcons["keyMultiple"] = "KeyMultiple"; + EntityCompactLayoutIcons["languages"] = "Languages"; + EntityCompactLayoutIcons["laptop"] = "Laptop"; + EntityCompactLayoutIcons["lasso"] = "Lasso"; + EntityCompactLayoutIcons["launcherSettings"] = "LauncherSettings"; + EntityCompactLayoutIcons["layer"] = "Layer"; + EntityCompactLayoutIcons["leaf"] = "Leaf"; + EntityCompactLayoutIcons["leafOne"] = "LeafOne"; + EntityCompactLayoutIcons["leafThree"] = "LeafThree"; + EntityCompactLayoutIcons["leafTwo"] = "LeafTwo"; + EntityCompactLayoutIcons["library"] = "Library"; + EntityCompactLayoutIcons["lightbulb"] = "Lightbulb"; + EntityCompactLayoutIcons["lightbulbFilament"] = "LightbulbFilament"; + EntityCompactLayoutIcons["likert"] = "Likert"; + EntityCompactLayoutIcons["link"] = "Link"; + EntityCompactLayoutIcons["localLanguage"] = "LocalLanguage"; + EntityCompactLayoutIcons["location"] = "Location"; + EntityCompactLayoutIcons["lockClosed"] = "LockClosed"; + EntityCompactLayoutIcons["lockMultiple"] = "LockMultiple"; + EntityCompactLayoutIcons["lockOpen"] = "LockOpen"; + EntityCompactLayoutIcons["lottery"] = "Lottery"; + EntityCompactLayoutIcons["luggage"] = "Luggage"; + EntityCompactLayoutIcons["mail"] = "Mail"; + EntityCompactLayoutIcons["mailInbox"] = "MailInbox"; + EntityCompactLayoutIcons["mailMultiple"] = "MailMultiple"; + EntityCompactLayoutIcons["map"] = "Map"; + EntityCompactLayoutIcons["mapPin"] = "MapPin"; + EntityCompactLayoutIcons["markdown"] = "Markdown"; + EntityCompactLayoutIcons["mathFormula"] = "MathFormula"; + EntityCompactLayoutIcons["mathSymbols"] = "MathSymbols"; + EntityCompactLayoutIcons["max"] = "Max"; + EntityCompactLayoutIcons["megaphone"] = "Megaphone"; + EntityCompactLayoutIcons["megaphoneLoud"] = "MegaphoneLoud"; + EntityCompactLayoutIcons["mention"] = "Mention"; + EntityCompactLayoutIcons["mic"] = "Mic"; + EntityCompactLayoutIcons["microscope"] = "Microscope"; + EntityCompactLayoutIcons["midi"] = "Midi"; + EntityCompactLayoutIcons["molecule"] = "Molecule"; + EntityCompactLayoutIcons["money"] = "Money"; + EntityCompactLayoutIcons["moneyHand"] = "MoneyHand"; + EntityCompactLayoutIcons["mountain"] = "Mountain"; + EntityCompactLayoutIcons["movieCamera"] = "MovieCamera"; + EntityCompactLayoutIcons["moviesAndTv"] = "MoviesAndTv"; + EntityCompactLayoutIcons["musicNote"] = "MusicNote"; + EntityCompactLayoutIcons["musicNote1"] = "MusicNote1"; + EntityCompactLayoutIcons["musicNote2"] = "MusicNote2"; + EntityCompactLayoutIcons["myLocation"] = "MyLocation"; + EntityCompactLayoutIcons["nByN"] = "NByN"; + EntityCompactLayoutIcons["nByOne"] = "NByOne"; + EntityCompactLayoutIcons["news"] = "News"; + EntityCompactLayoutIcons["notablePeople"] = "NotablePeople"; + EntityCompactLayoutIcons["note"] = "Note"; + EntityCompactLayoutIcons["notebook"] = "Notebook"; + EntityCompactLayoutIcons["notepad"] = "Notepad"; + EntityCompactLayoutIcons["notepadPerson"] = "NotepadPerson"; + EntityCompactLayoutIcons["oneByN"] = "OneByN"; + EntityCompactLayoutIcons["oneByOne"] = "OneByOne"; + EntityCompactLayoutIcons["options"] = "Options"; + EntityCompactLayoutIcons["organization"] = "Organization"; + EntityCompactLayoutIcons["organizationHorizontal"] = "OrganizationHorizontal"; + EntityCompactLayoutIcons["oval"] = "Oval"; + EntityCompactLayoutIcons["paintBrush"] = "PaintBrush"; + EntityCompactLayoutIcons["paintBucket"] = "PaintBucket"; + EntityCompactLayoutIcons["partlySunnyWeather"] = "PartlySunnyWeather"; + EntityCompactLayoutIcons["password"] = "Password"; + EntityCompactLayoutIcons["patch"] = "Patch"; + EntityCompactLayoutIcons["patient"] = "Patient"; + EntityCompactLayoutIcons["payment"] = "Payment"; + EntityCompactLayoutIcons["pen"] = "Pen"; + EntityCompactLayoutIcons["pentagon"] = "Pentagon"; + EntityCompactLayoutIcons["people"] = "People"; + EntityCompactLayoutIcons["peopleAudience"] = "PeopleAudience"; + EntityCompactLayoutIcons["peopleCall"] = "PeopleCall"; + EntityCompactLayoutIcons["peopleCommunity"] = "PeopleCommunity"; + EntityCompactLayoutIcons["peopleMoney"] = "PeopleMoney"; + EntityCompactLayoutIcons["peopleQueue"] = "PeopleQueue"; + EntityCompactLayoutIcons["peopleTeam"] = "PeopleTeam"; + EntityCompactLayoutIcons["peopleToolbox"] = "PeopleToolbox"; + EntityCompactLayoutIcons["person"] = "Person"; + EntityCompactLayoutIcons["personBoard"] = "PersonBoard"; + EntityCompactLayoutIcons["personCall"] = "PersonCall"; + EntityCompactLayoutIcons["personChat"] = "PersonChat"; + EntityCompactLayoutIcons["personFeedback"] = "PersonFeedback"; + EntityCompactLayoutIcons["personSupport"] = "PersonSupport"; + EntityCompactLayoutIcons["personVoice"] = "PersonVoice"; + EntityCompactLayoutIcons["phone"] = "Phone"; + EntityCompactLayoutIcons["phoneDesktop"] = "PhoneDesktop"; + EntityCompactLayoutIcons["phoneLaptop"] = "PhoneLaptop"; + EntityCompactLayoutIcons["phoneShake"] = "PhoneShake"; + EntityCompactLayoutIcons["phoneTablet"] = "PhoneTablet"; + EntityCompactLayoutIcons["phoneVibrate"] = "PhoneVibrate"; + EntityCompactLayoutIcons["photoFilter"] = "PhotoFilter"; + EntityCompactLayoutIcons["pi"] = "Pi"; + EntityCompactLayoutIcons["pictureInPicture"] = "PictureInPicture"; + EntityCompactLayoutIcons["pilates"] = "Pilates"; + EntityCompactLayoutIcons["pill"] = "Pill"; + EntityCompactLayoutIcons["pin"] = "Pin"; + EntityCompactLayoutIcons["pipeline"] = "Pipeline"; + EntityCompactLayoutIcons["planet"] = "Planet"; + EntityCompactLayoutIcons["playingCards"] = "PlayingCards"; + EntityCompactLayoutIcons["plugConnected"] = "PlugConnected"; + EntityCompactLayoutIcons["plugDisconnected"] = "PlugDisconnected"; + EntityCompactLayoutIcons["pointScan"] = "PointScan"; + EntityCompactLayoutIcons["poll"] = "Poll"; + EntityCompactLayoutIcons["power"] = "Power"; + EntityCompactLayoutIcons["predictions"] = "Predictions"; + EntityCompactLayoutIcons["premium"] = "Premium"; + EntityCompactLayoutIcons["presenter"] = "Presenter"; + EntityCompactLayoutIcons["previewLink"] = "PreviewLink"; + EntityCompactLayoutIcons["print"] = "Print"; + EntityCompactLayoutIcons["production"] = "Production"; + EntityCompactLayoutIcons["prohibited"] = "Prohibited"; + EntityCompactLayoutIcons["projectionScreen"] = "ProjectionScreen"; + EntityCompactLayoutIcons["protocolHandler"] = "ProtocolHandler"; + EntityCompactLayoutIcons["pulse"] = "Pulse"; + EntityCompactLayoutIcons["pulseSquare"] = "PulseSquare"; + EntityCompactLayoutIcons["puzzlePiece"] = "PuzzlePiece"; + EntityCompactLayoutIcons["qrCode"] = "QrCode"; + EntityCompactLayoutIcons["radar"] = "Radar"; + EntityCompactLayoutIcons["ram"] = "Ram"; + EntityCompactLayoutIcons["readingList"] = "ReadingList"; + EntityCompactLayoutIcons["realEstate"] = "RealEstate"; + EntityCompactLayoutIcons["receipt"] = "Receipt"; + EntityCompactLayoutIcons["reward"] = "Reward"; + EntityCompactLayoutIcons["rhombus"] = "Rhombus"; + EntityCompactLayoutIcons["ribbon"] = "Ribbon"; + EntityCompactLayoutIcons["ribbonStar"] = "RibbonStar"; + EntityCompactLayoutIcons["roadCone"] = "RoadCone"; + EntityCompactLayoutIcons["rocket"] = "Rocket"; + EntityCompactLayoutIcons["router"] = "Router"; + EntityCompactLayoutIcons["rss"] = "Rss"; + EntityCompactLayoutIcons["ruler"] = "Ruler"; + EntityCompactLayoutIcons["run"] = "Run"; + EntityCompactLayoutIcons["running"] = "Running"; + EntityCompactLayoutIcons["satellite"] = "Satellite"; + EntityCompactLayoutIcons["save"] = "Save"; + EntityCompactLayoutIcons["savings"] = "Savings"; + EntityCompactLayoutIcons["scales"] = "Scales"; + EntityCompactLayoutIcons["scan"] = "Scan"; + EntityCompactLayoutIcons["scratchpad"] = "Scratchpad"; + EntityCompactLayoutIcons["screenPerson"] = "ScreenPerson"; + EntityCompactLayoutIcons["screenshot"] = "Screenshot"; + EntityCompactLayoutIcons["search"] = "Search"; + EntityCompactLayoutIcons["serialPort"] = "SerialPort"; + EntityCompactLayoutIcons["server"] = "Server"; + EntityCompactLayoutIcons["serverMultiple"] = "ServerMultiple"; + EntityCompactLayoutIcons["serviceBell"] = "ServiceBell"; + EntityCompactLayoutIcons["settings"] = "Settings"; + EntityCompactLayoutIcons["shapes"] = "Shapes"; + EntityCompactLayoutIcons["shield"] = "Shield"; + EntityCompactLayoutIcons["shieldTask"] = "ShieldTask"; + EntityCompactLayoutIcons["shoppingBag"] = "ShoppingBag"; + EntityCompactLayoutIcons["signature"] = "Signature"; + EntityCompactLayoutIcons["sim"] = "Sim"; + EntityCompactLayoutIcons["sleep"] = "Sleep"; + EntityCompactLayoutIcons["smartwatch"] = "Smartwatch"; + EntityCompactLayoutIcons["soundSource"] = "SoundSource"; + EntityCompactLayoutIcons["soundWaveCircle"] = "SoundWaveCircle"; + EntityCompactLayoutIcons["sparkle"] = "Sparkle"; + EntityCompactLayoutIcons["speaker0"] = "Speaker0"; + EntityCompactLayoutIcons["speaker2"] = "Speaker2"; + EntityCompactLayoutIcons["sport"] = "Sport"; + EntityCompactLayoutIcons["sportAmericanFootball"] = "SportAmericanFootball"; + EntityCompactLayoutIcons["sportBaseball"] = "SportBaseball"; + EntityCompactLayoutIcons["sportBasketball"] = "SportBasketball"; + EntityCompactLayoutIcons["sportHockey"] = "SportHockey"; + EntityCompactLayoutIcons["sportSoccer"] = "SportSoccer"; + EntityCompactLayoutIcons["squareMultiple"] = "SquareMultiple"; + EntityCompactLayoutIcons["squareShadow"] = "SquareShadow"; + EntityCompactLayoutIcons["squaresNested"] = "SquaresNested"; + EntityCompactLayoutIcons["stack"] = "Stack"; + EntityCompactLayoutIcons["stackStar"] = "StackStar"; + EntityCompactLayoutIcons["star"] = "Star"; + EntityCompactLayoutIcons["starFilled"] = "StarFilled"; + EntityCompactLayoutIcons["starHalf"] = "StarHalf"; + EntityCompactLayoutIcons["starLineHorizontal3"] = "StarLineHorizontal3"; + EntityCompactLayoutIcons["starOneQuarter"] = "StarOneQuarter"; + EntityCompactLayoutIcons["starThreeQuarter"] = "StarThreeQuarter"; + EntityCompactLayoutIcons["status"] = "Status"; + EntityCompactLayoutIcons["steps"] = "Steps"; + EntityCompactLayoutIcons["stethoscope"] = "Stethoscope"; + EntityCompactLayoutIcons["sticker"] = "Sticker"; + EntityCompactLayoutIcons["storage"] = "Storage"; + EntityCompactLayoutIcons["stream"] = "Stream"; + EntityCompactLayoutIcons["streamInput"] = "StreamInput"; + EntityCompactLayoutIcons["streamInputOutput"] = "StreamInputOutput"; + EntityCompactLayoutIcons["streamOutput"] = "StreamOutput"; + EntityCompactLayoutIcons["styleGuide"] = "StyleGuide"; + EntityCompactLayoutIcons["subGrid"] = "SubGrid"; + EntityCompactLayoutIcons["subtitles"] = "Subtitles"; + EntityCompactLayoutIcons["surfaceEarbuds"] = "SurfaceEarbuds"; + EntityCompactLayoutIcons["surfaceHub"] = "SurfaceHub"; + EntityCompactLayoutIcons["symbols"] = "Symbols"; + EntityCompactLayoutIcons["syringe"] = "Syringe"; + EntityCompactLayoutIcons["system"] = "System"; + EntityCompactLayoutIcons["tabDesktop"] = "TabDesktop"; + EntityCompactLayoutIcons["tabInprivateAccount"] = "TabInprivateAccount"; + EntityCompactLayoutIcons["table"] = "Table"; + EntityCompactLayoutIcons["tableImage"] = "TableImage"; + EntityCompactLayoutIcons["tableMultiple"] = "TableMultiple"; + EntityCompactLayoutIcons["tablet"] = "Tablet"; + EntityCompactLayoutIcons["tabs"] = "Tabs"; + EntityCompactLayoutIcons["tag"] = "Tag"; + EntityCompactLayoutIcons["tagCircle"] = "TagCircle"; + EntityCompactLayoutIcons["tagMultiple"] = "TagMultiple"; + EntityCompactLayoutIcons["target"] = "Target"; + EntityCompactLayoutIcons["targetArrow"] = "TargetArrow"; + EntityCompactLayoutIcons["teddy"] = "Teddy"; + EntityCompactLayoutIcons["temperature"] = "Temperature"; + EntityCompactLayoutIcons["tent"] = "Tent"; + EntityCompactLayoutIcons["tetrisApp"] = "TetrisApp"; + EntityCompactLayoutIcons["textbox"] = "Textbox"; + EntityCompactLayoutIcons["textQuote"] = "TextQuote"; + EntityCompactLayoutIcons["thinking"] = "Thinking"; + EntityCompactLayoutIcons["thumbDislike"] = "ThumbDislike"; + EntityCompactLayoutIcons["thumbLike"] = "ThumbLike"; + EntityCompactLayoutIcons["ticketDiagonal"] = "TicketDiagonal"; + EntityCompactLayoutIcons["ticketHorizontal"] = "TicketHorizontal"; + EntityCompactLayoutIcons["timeAndWeather"] = "TimeAndWeather"; + EntityCompactLayoutIcons["timeline"] = "Timeline"; + EntityCompactLayoutIcons["timer"] = "Timer"; + EntityCompactLayoutIcons["toolbox"] = "Toolbox"; + EntityCompactLayoutIcons["topSpeed"] = "TopSpeed"; + EntityCompactLayoutIcons["translate"] = "Translate"; + EntityCompactLayoutIcons["transmission"] = "Transmission"; + EntityCompactLayoutIcons["treeDeciduous"] = "TreeDeciduous"; + EntityCompactLayoutIcons["treeEvergreen"] = "TreeEvergreen"; + EntityCompactLayoutIcons["trophy"] = "Trophy"; + EntityCompactLayoutIcons["tv"] = "Tv"; + EntityCompactLayoutIcons["tvUsb"] = "TvUsb"; + EntityCompactLayoutIcons["umbrella"] = "Umbrella"; + EntityCompactLayoutIcons["usbPlug"] = "UsbPlug"; + EntityCompactLayoutIcons["usbStick"] = "UsbStick"; + EntityCompactLayoutIcons["vault"] = "Vault"; + EntityCompactLayoutIcons["vehicleBicycle"] = "VehicleBicycle"; + EntityCompactLayoutIcons["vehicleBus"] = "VehicleBus"; + EntityCompactLayoutIcons["vehicleCab"] = "VehicleCab"; + EntityCompactLayoutIcons["vehicleCar"] = "VehicleCar"; + EntityCompactLayoutIcons["vehicleCarCollision"] = "VehicleCarCollision"; + EntityCompactLayoutIcons["vehicleCarProfileLtr"] = "VehicleCarProfileLtr"; + EntityCompactLayoutIcons["vehicleCarProfileRtl"] = "VehicleCarProfileRtl"; + EntityCompactLayoutIcons["vehicleShip"] = "VehicleShip"; + EntityCompactLayoutIcons["vehicleSubway"] = "VehicleSubway"; + EntityCompactLayoutIcons["vehicleTruck"] = "VehicleTruck"; + EntityCompactLayoutIcons["vehicleTruckBag"] = "VehicleTruckBag"; + EntityCompactLayoutIcons["vehicleTruckCube"] = "VehicleTruckCube"; + EntityCompactLayoutIcons["vehicleTruckProfile"] = "VehicleTruckProfile"; + EntityCompactLayoutIcons["video"] = "Video"; + EntityCompactLayoutIcons["video360"] = "Video360"; + EntityCompactLayoutIcons["videoChat"] = "VideoChat"; + EntityCompactLayoutIcons["videoClip"] = "VideoClip"; + EntityCompactLayoutIcons["videoClipMultiple"] = "VideoClipMultiple"; + EntityCompactLayoutIcons["videoPerson"] = "VideoPerson"; + EntityCompactLayoutIcons["videoRecording"] = "VideoRecording"; + EntityCompactLayoutIcons["videoSecurity"] = "VideoSecurity"; + EntityCompactLayoutIcons["viewDesktop"] = "ViewDesktop"; + EntityCompactLayoutIcons["viewDesktopMobile"] = "ViewDesktopMobile"; + EntityCompactLayoutIcons["violin"] = "Violin"; + EntityCompactLayoutIcons["virtualNetwork"] = "VirtualNetwork"; + EntityCompactLayoutIcons["voicemail"] = "Voicemail"; + EntityCompactLayoutIcons["vote"] = "Vote"; + EntityCompactLayoutIcons["walkieTalkie"] = "WalkieTalkie"; + EntityCompactLayoutIcons["wallet"] = "Wallet"; + EntityCompactLayoutIcons["walletCreditCard"] = "WalletCreditCard"; + EntityCompactLayoutIcons["wallpaper"] = "Wallpaper"; + EntityCompactLayoutIcons["wand"] = "Wand"; + EntityCompactLayoutIcons["warning"] = "Warning"; + EntityCompactLayoutIcons["weatherBlowingSnow"] = "WeatherBlowingSnow"; + EntityCompactLayoutIcons["weatherCloudy"] = "WeatherCloudy"; + EntityCompactLayoutIcons["weatherDrizzle"] = "WeatherDrizzle"; + EntityCompactLayoutIcons["weatherDuststorm"] = "WeatherDuststorm"; + EntityCompactLayoutIcons["weatherFog"] = "WeatherFog"; + EntityCompactLayoutIcons["weatherHailDay"] = "WeatherHailDay"; + EntityCompactLayoutIcons["weatherHailNight"] = "WeatherHailNight"; + EntityCompactLayoutIcons["weatherHaze"] = "WeatherHaze"; + EntityCompactLayoutIcons["weatherMoon"] = "WeatherMoon"; + EntityCompactLayoutIcons["weatherPartlyCloudyDay"] = "WeatherPartlyCloudyDay"; + EntityCompactLayoutIcons["weatherPartlyCloudyNight"] = "WeatherPartlyCloudyNight"; + EntityCompactLayoutIcons["weatherRain"] = "WeatherRain"; + EntityCompactLayoutIcons["weatherRainShowersDay"] = "WeatherRainShowersDay"; + EntityCompactLayoutIcons["weatherRainShowersNight"] = "WeatherRainShowersNight"; + EntityCompactLayoutIcons["weatherRainSnow"] = "WeatherRainSnow"; + EntityCompactLayoutIcons["weatherSnow"] = "WeatherSnow"; + EntityCompactLayoutIcons["weatherSnowflake"] = "WeatherSnowflake"; + EntityCompactLayoutIcons["weatherSnowShowerDay"] = "WeatherSnowShowerDay"; + EntityCompactLayoutIcons["weatherSnowShowerNight"] = "WeatherSnowShowerNight"; + EntityCompactLayoutIcons["weatherSqualls"] = "WeatherSqualls"; + EntityCompactLayoutIcons["weatherSunnyHigh"] = "WeatherSunnyHigh"; + EntityCompactLayoutIcons["weatherSunnyLow"] = "WeatherSunnyLow"; + EntityCompactLayoutIcons["weatherThunderstorm"] = "WeatherThunderstorm"; + EntityCompactLayoutIcons["webAsset"] = "WebAsset"; + EntityCompactLayoutIcons["whiteboard"] = "Whiteboard"; + EntityCompactLayoutIcons["wifi1"] = "Wifi1"; + EntityCompactLayoutIcons["wifi2"] = "Wifi2"; + EntityCompactLayoutIcons["window"] = "Window"; + EntityCompactLayoutIcons["windowMultiple"] = "WindowMultiple"; + EntityCompactLayoutIcons["windowWrench"] = "WindowWrench"; + EntityCompactLayoutIcons["wrench"] = "Wrench"; + EntityCompactLayoutIcons["wrenchScrewdriver"] = "WrenchScrewdriver"; + EntityCompactLayoutIcons["xray"] = "Xray"; + EntityCompactLayoutIcons["yoga"] = "Yoga"; + })(EntityCompactLayoutIcons = Excel.EntityCompactLayoutIcons || (Excel.EntityCompactLayoutIcons = {})); + var ReferenceValueType; + (function (ReferenceValueType) { + ReferenceValueType["array"] = "Array"; + ReferenceValueType["entity"] = "Entity"; + ReferenceValueType["root"] = "Root"; + })(ReferenceValueType = Excel.ReferenceValueType || (Excel.ReferenceValueType = {})); + var CellValueType; + (function (CellValueType) { + CellValueType["array"] = "Array"; + CellValueType["boolean"] = "Boolean"; + CellValueType["double"] = "Double"; + CellValueType["entity"] = "Entity"; + CellValueType["empty"] = "Empty"; + CellValueType["error"] = "Error"; + CellValueType["formattedNumber"] = "FormattedNumber"; + CellValueType["linkedEntity"] = "LinkedEntity"; + CellValueType["localImage"] = "LocalImage"; + CellValueType["reference"] = "Reference"; + CellValueType["string"] = "String"; + CellValueType["notAvailable"] = "NotAvailable"; + CellValueType["webImage"] = "WebImage"; + })(CellValueType = Excel.CellValueType || (Excel.CellValueType = {})); + var ConnectErrorCellValueSubType; + (function (ConnectErrorCellValueSubType) { + ConnectErrorCellValueSubType["unknown"] = "Unknown"; + ConnectErrorCellValueSubType["serviceError"] = "ServiceError"; + ConnectErrorCellValueSubType["externalLinks"] = "ExternalLinks"; + ConnectErrorCellValueSubType["externalLinksNonCloudLocation"] = "ExternalLinksNonCloudLocation"; + ConnectErrorCellValueSubType["dataTypeNoConnection"] = "DataTypeNoConnection"; + ConnectErrorCellValueSubType["dataTypeServiceError"] = "DataTypeServiceError"; + ConnectErrorCellValueSubType["missingContent"] = "MissingContent"; + ConnectErrorCellValueSubType["requestThrottle"] = "RequestThrottle"; + ConnectErrorCellValueSubType["externalLinksFailedToRefresh"] = "ExternalLinksFailedToRefresh"; + ConnectErrorCellValueSubType["externalLinksAccessFailed"] = "ExternalLinksAccessFailed"; + ConnectErrorCellValueSubType["externalLinksServerError"] = "ExternalLinksServerError"; + ConnectErrorCellValueSubType["externalLinksInvalidRequest"] = "ExternalLinksInvalidRequest"; + ConnectErrorCellValueSubType["externalLinksUnAuthenticated"] = "ExternalLinksUnAuthenticated"; + ConnectErrorCellValueSubType["externalLinksThrottledByHost"] = "ExternalLinksThrottledByHost"; + ConnectErrorCellValueSubType["externalLinksFileTooLarge"] = "ExternalLinksFileTooLarge"; + ConnectErrorCellValueSubType["outdatedLinkedEntity"] = "OutdatedLinkedEntity"; + ConnectErrorCellValueSubType["genericServerError"] = "GenericServerError"; + })(ConnectErrorCellValueSubType = Excel.ConnectErrorCellValueSubType || (Excel.ConnectErrorCellValueSubType = {})); + var ErrorCellValueType; + (function (ErrorCellValueType) { + ErrorCellValueType["blocked"] = "Blocked"; + ErrorCellValueType["busy"] = "Busy"; + ErrorCellValueType["calc"] = "Calc"; + ErrorCellValueType["connect"] = "Connect"; + ErrorCellValueType["div0"] = "Div0"; + ErrorCellValueType["external"] = "External"; + ErrorCellValueType["field"] = "Field"; + ErrorCellValueType["gettingData"] = "GettingData"; + ErrorCellValueType["notAvailable"] = "NotAvailable"; + ErrorCellValueType["name"] = "Name"; + ErrorCellValueType["null"] = "Null"; + ErrorCellValueType["num"] = "Num"; + ErrorCellValueType["placeholder"] = "Placeholder"; + ErrorCellValueType["ref"] = "Ref"; + ErrorCellValueType["spill"] = "Spill"; + ErrorCellValueType["value"] = "Value"; + })(ErrorCellValueType = Excel.ErrorCellValueType || (Excel.ErrorCellValueType = {})); + var ExternalErrorCellValueSubType; + (function (ExternalErrorCellValueSubType) { + ExternalErrorCellValueSubType["unknown"] = "Unknown"; + })(ExternalErrorCellValueSubType = Excel.ExternalErrorCellValueSubType || (Excel.ExternalErrorCellValueSubType = {})); + var FieldErrorCellValueSubType; + (function (FieldErrorCellValueSubType) { + FieldErrorCellValueSubType["unknown"] = "Unknown"; + FieldErrorCellValueSubType["webImageMissingFilePart"] = "WebImageMissingFilePart"; + FieldErrorCellValueSubType["dataProviderError"] = "DataProviderError"; + FieldErrorCellValueSubType["richValueRelMissingFilePart"] = "RichValueRelMissingFilePart"; + })(FieldErrorCellValueSubType = Excel.FieldErrorCellValueSubType || (Excel.FieldErrorCellValueSubType = {})); + var NumErrorCellValueSubType; + (function (NumErrorCellValueSubType) { + NumErrorCellValueSubType["unknown"] = "Unknown"; + NumErrorCellValueSubType["arrayTooLarge"] = "ArrayTooLarge"; + })(NumErrorCellValueSubType = Excel.NumErrorCellValueSubType || (Excel.NumErrorCellValueSubType = {})); + var RefErrorCellValueSubType; + (function (RefErrorCellValueSubType) { + RefErrorCellValueSubType["unknown"] = "Unknown"; + RefErrorCellValueSubType["externalLinksStructuredRef"] = "ExternalLinksStructuredRef"; + RefErrorCellValueSubType["externalLinksCalculatedRef"] = "ExternalLinksCalculatedRef"; + })(RefErrorCellValueSubType = Excel.RefErrorCellValueSubType || (Excel.RefErrorCellValueSubType = {})); + var SpillErrorCellValueSubType; + (function (SpillErrorCellValueSubType) { + SpillErrorCellValueSubType["unknown"] = "Unknown"; + SpillErrorCellValueSubType["collision"] = "Collision"; + SpillErrorCellValueSubType["indeterminateSize"] = "IndeterminateSize"; + SpillErrorCellValueSubType["worksheetEdge"] = "WorksheetEdge"; + SpillErrorCellValueSubType["outOfMemoryWhileCalc"] = "OutOfMemoryWhileCalc"; + SpillErrorCellValueSubType["table"] = "Table"; + SpillErrorCellValueSubType["mergedCell"] = "MergedCell"; + })(SpillErrorCellValueSubType = Excel.SpillErrorCellValueSubType || (Excel.SpillErrorCellValueSubType = {})); + var ValueErrorCellValueSubType; + (function (ValueErrorCellValueSubType) { + ValueErrorCellValueSubType["unknown"] = "Unknown"; + ValueErrorCellValueSubType["vlookupColumnIndexLessThanOne"] = "VlookupColumnIndexLessThanOne"; + ValueErrorCellValueSubType["vlookupResultNotFound"] = "VlookupResultNotFound"; + ValueErrorCellValueSubType["hlookupRowIndexLessThanOne"] = "HlookupRowIndexLessThanOne"; + ValueErrorCellValueSubType["hlookupResultNotFound"] = "HlookupResultNotFound"; + ValueErrorCellValueSubType["coerceStringToNumberInvalid"] = "CoerceStringToNumberInvalid"; + ValueErrorCellValueSubType["coerceStringToBoolInvalid"] = "CoerceStringToBoolInvalid"; + ValueErrorCellValueSubType["coerceStringToInvalidType"] = "CoerceStringToInvalidType"; + ValueErrorCellValueSubType["subArrayStartRowMissingEndRowNot"] = "SubArrayStartRowMissingEndRowNot"; + ValueErrorCellValueSubType["subArrayStartColumnMissingEndColumnNot"] = "SubArrayStartColumnMissingEndColumnNot"; + ValueErrorCellValueSubType["invalidImageUrl"] = "InvalidImageUrl"; + ValueErrorCellValueSubType["stockHistoryNonTradingDays"] = "StockHistoryNonTradingDays"; + ValueErrorCellValueSubType["stockHistoryNotAStock"] = "StockHistoryNotAStock"; + ValueErrorCellValueSubType["stockHistoryInvalidDate"] = "StockHistoryInvalidDate"; + ValueErrorCellValueSubType["stockHistoryEndBeforeStart"] = "StockHistoryEndBeforeStart"; + ValueErrorCellValueSubType["stockHistoryStartInFuture"] = "StockHistoryStartInFuture"; + ValueErrorCellValueSubType["stockHistoryInvalidEnum"] = "StockHistoryInvalidEnum"; + ValueErrorCellValueSubType["stockHistoryOnlyDateRequested"] = "StockHistoryOnlyDateRequested"; + ValueErrorCellValueSubType["stockHistoryNotFound"] = "StockHistoryNotFound"; + ValueErrorCellValueSubType["lambdaWrongParamCount"] = "LambdaWrongParamCount"; + })(ValueErrorCellValueSubType = Excel.ValueErrorCellValueSubType || (Excel.ValueErrorCellValueSubType = {})); + function _runOnRegularOrWacContext(options, callback) { + var context = isOfficePlatform("OfficeOnline") + ? new WacSpecificRequestContext() + : new RequestContext(); + onBeforeExcelRun(options, context); + return OfficeExtension.CoreUtility.Promise.resolve() + .then(function () { return callback(context); }) + .then(context.sync); + } + var WacSpecificRequestContext = (function (_super) { + __extends(WacSpecificRequestContext, _super); + function WacSpecificRequestContext(url) { + var _this = _super.call(this, url) || this; + _this._customData = "WacPartition"; + _this.m_wacWorkbook = _createRootServiceObject(WacWorkbook, _this); + _this._rootObject = _this.m_wacWorkbook; + _this._rootObjectPropertyName = "wacWorkbook"; + return _this; + } + Object.defineProperty(WacSpecificRequestContext.prototype, "wacWorkbook", { + get: function () { + return this.m_wacWorkbook; + }, + enumerable: true, + configurable: true + }); + return WacSpecificRequestContext; + }(OfficeCore.RequestContext)); + var WacWorkbook = (function (_super) { + __extends(WacWorkbook, _super); + function WacWorkbook() { + return _super !== null && _super.apply(this, arguments) || this; + } + WacWorkbook.prototype.createAndOpenWorkbook = function (base64) { + _invokeMethod(this, "CreateAndOpenWorkbook", 0, [base64], 0, 0); + }; + return WacWorkbook; + }(OfficeExtension.ClientObject)); + function createWorkbook(base64) { + _throwIfApiNotSupported("Excel.createWorkbook", _defaultApiSetName, "1.8", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + if (context instanceof WacSpecificRequestContext) { + context.wacWorkbook.createAndOpenWorkbook(base64); + } + else { + context.workbook.application.createWorkbook(base64).open(); + } + }); + } + Excel.createWorkbook = createWorkbook; + function lowerCaseFirst(str) { + return str[0].toLowerCase() + str.slice(1); + } + var iconSets = ["ThreeArrows", + "ThreeArrowsGray", + "ThreeFlags", + "ThreeTrafficLights1", + "ThreeTrafficLights2", + "ThreeSigns", + "ThreeSymbols", + "ThreeSymbols2", + "FourArrows", + "FourArrowsGray", + "FourRedToBlack", + "FourRating", + "FourTrafficLights", + "FiveArrows", + "FiveArrowsGray", + "FiveRating", + "FiveQuarters", + "ThreeStars", + "ThreeTriangles", + "FiveBoxes"]; + var iconNames = [["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], + ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], + ["RedFlag", "YellowFlag", "GreenFlag"], + ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], + ["RedDiamond", "YellowTriangle", "GreenCircle"], + ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], + ["RedCross", "YellowExclamation", "GreenCheck"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], + ["OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], + ["SilverStar", "HalfGoldStar", "GoldStar"], + ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], + ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; + Excel.icons = {}; + iconSets.map(function (title, i) { + var camelTitle = lowerCaseFirst(title); + Excel.icons[camelTitle] = []; + iconNames[i].map(function (iconName, j) { + iconName = lowerCaseFirst(iconName); + var obj = { set: title, index: j }; + Excel.icons[camelTitle].push(obj); + Excel.icons[camelTitle][iconName] = obj; + }); + }); + function setRangePropertiesInBulk(range, propertyName, values, apiFlags) { + var maxCellCount = 1500; + if (Array.isArray(values) && values.length > 0 && Array.isArray(values[0]) && (values.length * values[0].length > maxCellCount) && isExcel1_3OrAbove()) { + var maxRowCount = Math.max(1, Math.round(maxCellCount / values[0].length)); + range._ValidateArraySize(values.length, values[0].length); + for (var startRowIndex = 0; startRowIndex < values.length; startRowIndex += maxRowCount) { + var rowCount = maxRowCount; + if (startRowIndex + rowCount > values.length) { + rowCount = values.length - startRowIndex; + } + var chunk = range.getRow(startRowIndex).untrack().getBoundingRect(range.getRow(startRowIndex + rowCount - 1).untrack()).untrack(); + var valueSlice = values.slice(startRowIndex, startRowIndex + rowCount); + _invokeSetProperty(chunk, propertyName, valueSlice, apiFlags != null ? apiFlags : 0); + } + return true; + } + return false; + } + function isExcelApiSetSupported(version) { + return OfficeExtension.Utility.isSetSupported("ExcelApi", version.toString()); + } + function isExcel1_3OrAbove() { + return isExcelApiSetSupported(1.3); + } + function isOfficePlatform(platform) { + if (typeof (window) !== "undefined" && window.Office && window.Office.context) { + return window.Office.context.platform === platform; + } + return false; + } + var OperationStatus; + (function (OperationStatus) { + OperationStatus["NotStarted"] = "notStarted"; + OperationStatus["Running"] = "running"; + OperationStatus["Succeeded"] = "succeeded"; + OperationStatus["Failed"] = "failed"; + })(OperationStatus || (OperationStatus = {})); + var HttpStatusCode; + (function (HttpStatusCode) { + HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK"; + HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created"; + HttpStatusCode[HttpStatusCode["Accepted"] = 202] = "Accepted"; + HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent"; + HttpStatusCode[HttpStatusCode["HighestSuccessCode"] = 299] = "HighestSuccessCode"; + HttpStatusCode[HttpStatusCode["TooManyRequests"] = 429] = "TooManyRequests"; + HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError"; + HttpStatusCode[HttpStatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpStatusCode || (HttpStatusCode = {})); + var SessionOperation; + (function (SessionOperation) { + SessionOperation["Close"] = "Session.close"; + SessionOperation["CommitChanges"] = "Session.commitChanges"; + SessionOperation["Create"] = "Session.resolveRequestUrlAndHeaderInfo"; + SessionOperation["Refresh"] = "Session.refreshSession"; + })(SessionOperation = Excel.SessionOperation || (Excel.SessionOperation = {})); + var Session = (function () { + function Session(workbookUrl, requestHeaders, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.persistChanges, persistChanges = _c === void 0 ? true : _c, _d = _b.commitExplicitly, commitExplicitly = _d === void 0 ? true : _d; + this.m_requestId = ''; + this.m_workbookUrl = !workbookUrl ? '' : this.ensureUrlFormatEndWithSlash(workbookUrl); + this.m_requestHeaders = !requestHeaders ? {} : requestHeaders; + this.m_persistChanges = persistChanges; + this.m_commitExplicitly = commitExplicitly; + } + Object.defineProperty(Session.prototype, "requestId", { + get: function () { + return this.m_requestId; + }, + enumerable: true, + configurable: true + }); + Session.prototype.close = function () { + var _this = this; + if (this.m_requestUrlAndHeaderInfo && + !OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + var url = this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url) + Session.CLOSE_SESSION; + var req = { + method: 'POST', + url: url, + headers: this.m_requestUrlAndHeaderInfo.headers, + body: '' + }; + return OfficeExtension.HttpUtility.sendRequest(req).then(function (resp) { + if (resp.statusCode !== HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(resp, SessionOperation.Close); + } + _this.m_requestUrlAndHeaderInfo = null; + for (var key in _this.m_requestHeaders) { + if (key.toLowerCase() === Session.WorkbookSessionIdHeaderNameLower) { + delete _this.m_requestHeaders[key]; + break; + } + } + }); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + Session.prototype.commitChanges = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (!this.m_commitExplicitly) { + throw this.createError(HttpStatusCode.InternalServerError, 'Can not call commitChanges() if commitExplicitly is not set.', SessionOperation.CommitChanges); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.CommitChanges); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.CommitChanges); + } + var commitChangesRequestInfo = this.createCommitChangesRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(commitChangesRequestInfo).then(function (commitChangesResponseInfo) { + var statusCode = commitChangesResponseInfo.statusCode; + if (statusCode === HttpStatusCode.Accepted) { + return _this.delay(Session.POLL_DELAY) + .then(function (_) { + return _this.pollResourceLocation(_this.getHeaderIgnoreCase(commitChangesResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.CommitChanges, additionalRequestHeaders); + }) + .then(function (commitChangesResourceLocationResponseInfo) { + var operationStatusBody = JSON.parse(commitChangesResourceLocationResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(commitChangesResourceLocationResponseInfo, SessionOperation.CommitChanges); + } + return _this.parseCooldownTime(commitChangesResourceLocationResponseInfo); + }); + } + if (statusCode >= HttpStatusCode.OK && statusCode <= HttpStatusCode.HighestSuccessCode) { + return _this.parseCooldownTime(commitChangesResponseInfo); + } + throw _this.createErrorFromResponseInfo(commitChangesResponseInfo, SessionOperation.CommitChanges); + }); + }; + Session.prototype._resolveRequestUrlAndHeaderInfo = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (this.m_requestUrlAndHeaderInfo) { + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (this.getHeaderIgnoreCase(this.m_requestHeaders, Session.WorkbookSessionIdHeaderNameLower)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + var sessionRequestInfo = this.createAsyncGraphSessionRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(sessionRequestInfo).then(function (sessionResponseInfo) { + _this.m_requestId = _this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.REQUEST_ID_HEADER); + if (sessionResponseInfo.statusCode !== HttpStatusCode.Accepted && + sessionResponseInfo.statusCode !== HttpStatusCode.Created) { + throw _this.createErrorFromResponseInfo(sessionResponseInfo, SessionOperation.Create); + } + if (sessionResponseInfo.statusCode === HttpStatusCode.Created) { + _this.formatRequestUrlAndHeaderInfo(sessionResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + } + return _this.delay(Session.POLL_DELAY) + .then(function (_) { return _this.pollResourceLocation(_this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.Create, additionalRequestHeaders); }) + .then(function (operationStatusResponseInfo) { + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, SessionOperation.Create); + } + var sessionResourceLocationRequestInfo = { + method: 'GET', + url: operationStatusBody.resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: _this.getHeaderIgnoreCase(_this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined + }; + return OfficeExtension.HttpUtility.sendRequest(sessionResourceLocationRequestInfo).then(function (sessionResourceLocationResponseInfo) { + _this.formatRequestUrlAndHeaderInfo(sessionResourceLocationResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + }); + }); + }); + }; + Session.prototype.refreshSession = function () { + var _this = this; + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.Refresh); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.Refresh); + } + var refreshSessionRequestInfo = this.createRefreshSessionRequestInfo(); + return OfficeExtension.HttpUtility.sendRequest(refreshSessionRequestInfo).then(function (refreshSessionResponseInfo) { + var statusCode = refreshSessionResponseInfo.statusCode; + if (statusCode != HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(refreshSessionResponseInfo, SessionOperation.Refresh); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + }; + Session.prototype.getHeaderIgnoreCase = function (headers, headerName) { + var foundHeaders = Object.keys(headers).filter(function (key) { return key.toLowerCase() === headerName.toLowerCase(); }); + return foundHeaders.length > 0 ? headers[foundHeaders[0]] : undefined; + }; + Session.prototype.createCommitChangesRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + var url = this.getCorrectGraphVersionUrl() + Session.COMMIT_CHANGES; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.createAsyncGraphSessionRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + var url = this.getCorrectGraphVersionUrl() + Session.CREATE_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: { persistChanges: this.m_persistChanges, commitExplicitly: this.m_commitExplicitly } + }; + }; + Session.prototype.createRefreshSessionRequestInfo = function () { + var url = this.getCorrectGraphVersionUrl() + Session.REFRESH_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.getCorrectGraphVersionUrl = function () { + return this.m_workbookUrl.replace(new RegExp('graph\.microsoft\.com\/.*?\/'), "graph.microsoft.com/" + Session.ASYNC_API_GRAPH_VERSION + "/"); + }; + Session.prototype.pollResourceLocation = function (resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (pollAttempt === void 0) { + pollAttempt = 0; + } + if (pollAttempt >= Session.MAX_POLL_ATTEMPTS) { + throw this.createError(HttpStatusCode.InternalServerError, 'Timout while polling for the resource location.', sessionOperation); + } + var operationStatusRequestInfo = { + method: 'GET', + url: resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: this.getHeaderIgnoreCase(this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined + }; + return OfficeExtension.HttpUtility.sendRequest(operationStatusRequestInfo).then(function (operationStatusResponseInfo) { + if (operationStatusResponseInfo.statusCode !== HttpStatusCode.OK) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + } + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + switch (operationStatusBody.status) { + case OperationStatus.Succeeded: + return operationStatusResponseInfo; + case OperationStatus.Failed: + return operationStatusResponseInfo; + case OperationStatus.NotStarted: + case OperationStatus.Running: + return _this.delay(Session.POLL_DELAY).then(function (_) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + }); + default: + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, sessionOperation); + } + }); + }; + Session.prototype.parseCooldownTime = function (responseInfo) { + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + return !retryAfter + ? Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER + : parseInt(retryAfter) * 1000; + }; + Session.prototype.formatRequestUrlAndHeaderInfo = function (responseInfo) { + if (responseInfo.statusCode !== HttpStatusCode.OK && responseInfo.statusCode !== HttpStatusCode.Created) { + throw this.createErrorFromResponseInfo(responseInfo, SessionOperation.Create); + } + var session = JSON.parse(responseInfo.body); + var sessionId = session.id; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + headers[Session.WorkbookSessionIdHeaderName] = sessionId; + this.m_requestUrlAndHeaderInfo = { url: this.getCorrectGraphVersionUrl(), headers: headers }; + }; + Session.prototype.ensureUrlFormatEndWithSlash = function (url) { + if (url.charAt(url.length - 1) !== '/') { + url += '/'; + } + return url; + }; + Session.prototype.delay = function (milliseconds) { + return new OfficeExtension.CoreUtility.Promise(function (res, _) { return setTimeout(function () { return res(); }, milliseconds); }); + }; + Session.prototype.createErrorFromResponseInfo = function (responseInfo, locationThrown) { + var err = OfficeExtension.Utility._parseErrorResponse(responseInfo); + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + var data = { + retryAfter: retryAfter, + responseBody: OfficeExtension.Utility._parseErrorResponseBody(responseInfo) + }; + return OfficeExtension.Utility.createRuntimeError(err.errorCode, err.errorMessage, locationThrown, responseInfo.statusCode, data); + }; + Session.prototype.createError = function (code, message, locationThrown) { + return OfficeExtension.Utility.createRuntimeError('' + code, message, locationThrown); + }; + Session.WorkbookSessionIdHeaderName = 'Workbook-Session-Id'; + Session.WorkbookSessionIdHeaderNameLower = 'workbook-session-id'; + Session.ASYNC_API_GRAPH_VERSION = 'beta'; + Session.POLL_DELAY = 10000; + Session.MAX_POLL_ATTEMPTS = 10; + Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER = 10000; + Session.LOCATION_HEADER = 'location'; + Session.AUTHORIZATION_HEADER = 'authorization'; + Session.REQUEST_ID_HEADER = 'request-id'; + Session.RETRY_AFTER_HEADER = 'retry-after'; + Session.PREFER_HEADER = 'Prefer'; + Session.PREFER_HEADER_VAL = 'respond-async'; + Session.CONTENT_TYPE_HEADER = 'Content-Type'; + Session.CONTENT_TYPE_HEADER_VAL = 'application/json'; + Session.CLOSE_SESSION = 'closeSession'; + Session.COMMIT_CHANGES = 'commitChanges'; + Session.CREATE_SESSION = 'createSession'; + Session.REFRESH_SESSION = 'refreshSession'; + return Session; + }()); + Excel.Session = Session; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + var _this = _super.call(this, url) || this; + _this.m_workbook = _createRootServiceObject(Excel.Workbook, _this); + _this._rootObject = _this.m_workbook; + _this._rootObjectPropertyName = "workbook"; + return _this; + } + RequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext = 5004; + if (officeJsErrorCode === ooeInvalidApiCallInContext) { + response.ErrorCode = ErrorCodes.invalidOperationInCellEditMode; + response.HttpStatusCode = 400; + response.ErrorMessage = OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; + Object.defineProperty(RequestContext.prototype, "workbook", { + get: function () { + return this.m_workbook; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "application", { + get: function () { + return this.workbook.application; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "runtime", { + get: function () { + return this.workbook._Runtime; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeCore.RequestContext)); + Excel.RequestContext = RequestContext; + var Recorder = (function () { + function Recorder() { + } + Recorder.enableMacroRecordingEvent = function (context) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = true; + var registerEventHandler = function (context) { + context.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent] = "true"; + context.workbook.onRecordingStateChangedEvent.add(function (args) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = args.recording; + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + if (context !== undefined && context !== null) { + return registerEventHandler(context); + } + return run(function (context) { + return registerEventHandler(context); + }); + }; + return Recorder; + }()); + Excel.Recorder = Recorder; + function onBeforeExcelRun(options, context) { + var excelOptions = options; + if (excelOptions.delayForCellEdit && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + context._requestFlagModifier |= 64; + } + else { + context._requestFlagModifier &= ~64; + } + if (excelOptions._makerSafe) { + context._requestFlagModifier |= 1024; + } + } + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.run = run; + function runBatch(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.runBatch = runBatch; + Excel._RedirectV1APIs = false; + Excel._V1APIMap = { + "GetDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GetSelectedDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.getSelectedData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GoToByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.gotoById(callArgs); } + }, + "AddColumnsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddColumns(callArgs); } + }, + "AddFromSelectionAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromSelection(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromNamedItemAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromNamedItem(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromPromptAsync": { + call: function (ctx, callArgs) { + if (versionNumberIsEarlierThan({ ios: { desiredMajor: 2, desiredMinor: 20, desiredBuild: 0 } }) && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + ctx._requestFlagModifier |= 64; + } + return ctx.workbook._V1Api.bindingAddFromPrompt(callArgs); + }, + postprocess: postprocessBindingDescriptor + }, + "AddRowsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddRows(callArgs); } + }, + "GetByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetById(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "ReleaseByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingReleaseById(callArgs); } + }, + "GetAllAsync": { + call: function (ctx) { return ctx.workbook._V1Api.bindingGetAll(); }, + postprocess: function (response) { + return response.bindings.map(function (descriptor) { return postprocessBindingDescriptor(descriptor); }); + } + }, + "DeleteAllDataValuesAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingDeleteAllDataValues(callArgs); } + }, + "SetSelectedDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.setSelectedData(callArgs); } + }, + "SetDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetData(callArgs); } + }, + "SetFormatsAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetFormats(callArgs); } + }, + "SetTableOptionsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetTableOptions(callArgs); } + }, + "ClearFormatsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } + }, + "GetFilePropertiesAsync": { + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } + } + }; + function postprocessBindingDescriptor(response) { + var bindingDescriptor = { + BindingColumnCount: response.bindingColumnCount, + BindingId: response.bindingId, + BindingRowCount: response.bindingRowCount, + bindingType: response.bindingType, + HasHeaders: response.hasHeaders + }; + return window.OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, window.Microsoft.Office.WebExtension.context.document); + } + function getDataCommonPostprocess(response, callArgs) { + var isPlainData = response.headers == null; + var data; + if (isPlainData) { + data = response.rows; + } + else { + data = response; + } + data = window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data === undefined ? null : data; + } + function versionNumberIsEarlierThan(versionsForPlatformMap) { + var hasOfficeVersion = typeof (window) !== "undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var platform = window.Office.context.diagnostics.platform.toLowerCase(); + if (platform === 'officeonline') { + return false; + } + var versionForCurrentPlatform = versionsForPlatformMap[platform]; + if (versionForCurrentPlatform == null) { + versionForCurrentPlatform = versionsForPlatformMap.general; + } + var version = window.Office.context.diagnostics.version; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(version); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (major < versionForCurrentPlatform.desiredMajor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor < versionForCurrentPlatform.desiredMinor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor === versionForCurrentPlatform.desiredMinor && build < versionForCurrentPlatform.desiredBuild) { + var revisionString = result[4]; + var devBuildValidation = /^3\d\d\d+$/; + var isDevBuild = devBuildValidation.exec(revisionString); + if (isDevBuild) { + return true; + } + } + } + return false; + } + var ALWAYS_TRUE_PLACEHOLDER_OVERRIDE = true; + var _CC; + (function (_CC) { + _CC.office10EventIdBindingSelectionChangedEvent = 3; + _CC.office10EventIdBindingDataChangedEvent = 4; + _CC.office10EventIdDocumentSelectionChangedEvent = 2; + _CC.office10EventIdRichApiMessageEvent = 5; + _CC.office10EventIdSettingsChangedEvent = 1; + })(_CC = Excel._CC || (Excel._CC = {})); + var _hostName = "Excel"; + var _defaultApiSetName = "ExcelApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var RangeValuesPreviewCustom = (function () { + function RangeValuesPreviewCustom() { + } + Object.defineProperty(RangeValuesPreviewCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return RangeValuesPreviewCustom; + }()); + Excel.RangeValuesPreviewCustom = RangeValuesPreviewCustom; + (function (_CC) { + function Application_SuspendApiCalculationUntilNextSync(thisObj) { + if (isOfficePlatform("Mac") && isExcelApiSetSupported(1.6) && !isExcelApiSetSupported(1.7)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Application_SuspendApiCalculationUntilNextSync = Application_SuspendApiCalculationUntilNextSync; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Workbook_EnableOfficeScriptRecording(thisObj, eventId) { + this.context.eventId = eventId; + return { handled: false }; + } + _CC.Workbook_EnableOfficeScriptRecording = Workbook_EnableOfficeScriptRecording; + function Workbook_RecordAction(thisObj, payload) { + this.context.sdxPayload = payload; + return { handled: false }; + } + _CC.Workbook_RecordAction = Workbook_RecordAction; + function Workbook_SelectionChanged_EventArgsTransform(thisObj, args) { + return { workbook: thisObj }; + } + _CC.Workbook_SelectionChanged_EventArgsTransform = Workbook_SelectionChanged_EventArgsTransform; + function Workbook_WACOperationEvent_EventArgsTransform(thisObj, args) { + var event = { + eventId: args.eventId, + payload: args.payload, + type: Excel.EventType.wacoperationEvent + }; + return event; + } + _CC.Workbook_WACOperationEvent_EventArgsTransform = Workbook_WACOperationEvent_EventArgsTransform; + function Workbook__Message_EventArgsTransform(thisObj, args) { + return { + entries: args.entries, + workbook: thisObj + }; + } + _CC.Workbook__Message_EventArgsTransform = Workbook__Message_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Worksheet_Charts_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Charts_Get = Worksheet_Charts_Get; + function Worksheet_Comments_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Comments_Get = Worksheet_Comments_Get; + function Worksheet_Names_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Names_Get = Worksheet_Names_Get; + function Worksheet_PivotTables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_PivotTables_Get = Worksheet_PivotTables_Get; + function Worksheet_RangeValuesPreview_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_RangeValuesPreview_Get = Worksheet_RangeValuesPreview_Get; + function Worksheet_Shapes_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Shapes_Get = Worksheet_Shapes_Get; + function Worksheet_ShowGridlines_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showGridlines = value; + _invokeSetProperty(thisObj, "Gridlines", value, _calculateApiFlags(2, "ExcelApiUndo", "1.16")); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowGridlines_Set = Worksheet_ShowGridlines_Set; + function Worksheet_ShowHeadings_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showHeadings = value; + _invokeSetProperty(thisObj, "Headings", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowHeadings_Set = Worksheet_ShowHeadings_Set; + function Worksheet_Tables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Tables_Get = Worksheet_Tables_Get; + function Worksheet_Visuals_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Visuals_Get = Worksheet_Visuals_Get; + function Worksheet_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState + }; + return newArgs; + } + _CC.Worksheet_Changed_EventArgsTransform = Worksheet_Changed_EventArgsTransform; + function Worksheet_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.Worksheet_FormatChanged_EventArgsTransform = Worksheet_FormatChanged_EventArgsTransform; + function Worksheet_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.Worksheet_FormulaChanged_EventArgsTransform = Worksheet_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function _overrideWorksheetCollectionEventMethod(thisObj, methodName, apiVersion) { + if ((!isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.12)) || + (isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.11))) { + _throwIfApiNotSupported("WorksheetCollection." + methodName, _defaultApiSetName, apiVersion, _hostName); + _invokeMethod(thisObj, methodName, 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + function WorksheetCollection__RegisterActivatedEvent(thisObj) { + if (!isExcelApiSetSupported(1.9)) { + _throwIfApiNotSupported("WorksheetCollection._RegisterActivatedEvent", _defaultApiSetName, "1.7", _hostName); + _invokeMethod(thisObj, "_RegisterActivatedEvent", 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetCollection__RegisterActivatedEvent = WorksheetCollection__RegisterActivatedEvent; + function WorksheetCollection__RegisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterAddedEvent = WorksheetCollection__RegisterAddedEvent; + function WorksheetCollection__RegisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterColumnSortedEvent = WorksheetCollection__RegisterColumnSortedEvent; + function WorksheetCollection__RegisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__RegisterDataChangedEvent = WorksheetCollection__RegisterDataChangedEvent; + function WorksheetCollection__RegisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterDeletedEvent = WorksheetCollection__RegisterDeletedEvent; + function WorksheetCollection__RegisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterRowSortedEvent = WorksheetCollection__RegisterRowSortedEvent; + function WorksheetCollection__UnregisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterAddedEvent = WorksheetCollection__UnregisterAddedEvent; + function WorksheetCollection__UnregisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterColumnSortedEvent = WorksheetCollection__UnregisterColumnSortedEvent; + function WorksheetCollection__UnregisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__UnregisterDataChangedEvent = WorksheetCollection__UnregisterDataChangedEvent; + function WorksheetCollection__UnregisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterDeletedEvent = WorksheetCollection__UnregisterDeletedEvent; + function WorksheetCollection__UnregisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterRowSortedEvent = WorksheetCollection__UnregisterRowSortedEvent; + function WorksheetCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState + }; + return newArgs; + } + _CC.WorksheetCollection_Changed_EventArgsTransform = WorksheetCollection_Changed_EventArgsTransform; + function WorksheetCollection_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.WorksheetCollection_FormatChanged_EventArgsTransform = WorksheetCollection_FormatChanged_EventArgsTransform; + function WorksheetCollection_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.WorksheetCollection_FormulaChanged_EventArgsTransform = WorksheetCollection_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function WorksheetProtection_Protect(thisObj, options, password) { + if (versionNumberIsEarlierThan({ + mac: { desiredMajor: 16, desiredMinor: 7, desiredBuild: 17101600 }, + ios: { desiredMajor: 2, desiredMinor: 7, desiredBuild: 1016 }, + general: { desiredMajor: 16, desiredMinor: 0, desiredBuild: 8716 } + })) { + _invokeMethod(thisObj, "Protect", 0, [options], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetProtection_Protect = WorksheetProtection_Protect; + })(_CC = Excel._CC || (Excel._CC = {})); + var RangeCustom = (function () { + function RangeCustom() { + } + RangeCustom.prototype._ensureInteger = function (num, methodName) { + if (!(typeof num === "number" && isFinite(num) && Math.floor(num) === num)) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + } + }; + RangeCustom.prototype._getAdjacentRange = function (functionName, count, referenceRange, rowDirection, columnDirection) { + if (count == null) { + count = 1; + } + this._ensureInteger(count, functionName); + var startRange; + var rowOffset = 0; + var columnOffset = 0; + if (count > 0) { + startRange = referenceRange.getOffsetRange(rowDirection, columnDirection); + } + else { + startRange = referenceRange; + rowOffset = rowDirection; + columnOffset = columnDirection; + } + if (Math.abs(count) === 1) { + return startRange; + } + return startRange.getBoundingRect(referenceRange.getOffsetRange(rowDirection * count + rowOffset, columnDirection * count + columnOffset)); + }; + return RangeCustom; + }()); + Excel.RangeCustom = RangeCustom; + (function (_CC) { + function Range_HandleResult(thisObj, value) { + if (!_isUndefined(value["isEntireColumn"])) { + thisObj.m_isEntireColumn = value["isEntireColumn"]; + } + if (!_isUndefined(value["isEntireRow"])) { + thisObj.m_isEntireRow = value["isEntireRow"]; + } + } + _CC.Range_HandleResult = Range_HandleResult; + function Range_GetColumnsAfter(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsAfter", count, thisObj.getLastColumn(), 0, 1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsAfter = Range_GetColumnsAfter; + function Range_GetColumnsBefore(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsBefore", count, thisObj.getColumn(0), 0, -1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsBefore = Range_GetColumnsBefore; + function Range_GetResizedRange(thisObj, deltaRows, deltaColumns) { + if (!isExcel1_3OrAbove()) { + thisObj._ensureInteger(deltaRows, "getResizedRange"); + thisObj._ensureInteger(deltaColumns, "getResizedRange"); + var referenceRange = (deltaRows >= 0 && deltaColumns >= 0) ? thisObj : thisObj.getCell(0, 0); + var result = referenceRange.getBoundingRect(thisObj.getLastCell().getOffsetRange(deltaRows, deltaColumns)); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetResizedRange = Range_GetResizedRange; + function Range_GetRowsAbove(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = thisObj._getAdjacentRange("getRowsAbove", count, thisObj.getRow(0), -1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsAbove = Range_GetRowsAbove; + function Range_GetRowsBelow(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = this._getAdjacentRange("getRowsBelow", count, thisObj.getLastRow(), 1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsBelow = Range_GetRowsBelow; + function Range_Formulas_Set(thisObj, value) { + thisObj.m_formulas = value; + if (setRangePropertiesInBulk(thisObj, "Formulas", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Formulas_Set = Range_Formulas_Set; + function Range_FormulasLocal_Set(thisObj, value) { + thisObj.m_formulasLocal = value; + if (setRangePropertiesInBulk(thisObj, "FormulasLocal", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasLocal_Set = Range_FormulasLocal_Set; + function Range_FormulasR1C1_Set(thisObj, value) { + thisObj.m_formulasR1C1 = value; + if (setRangePropertiesInBulk(thisObj, "FormulasR1C1", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasR1C1_Set = Range_FormulasR1C1_Set; + function Range_NumberFormat_Set(thisObj, value) { + thisObj.m_numberFormat = value; + if (setRangePropertiesInBulk(thisObj, "NumberFormat", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_NumberFormat_Set = Range_NumberFormat_Set; + function Range_Values_Set(thisObj, value) { + thisObj.m_values = value; + if (setRangePropertiesInBulk(thisObj, "Values", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Values_Set = Range_Values_Set; + function Range_ValuesAsJson_Set(thisObj, value) { + thisObj.m_valuesAsJson = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJson", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJson_Set = Range_ValuesAsJson_Set; + function Range_ValuesAsJsonLocal_Set(thisObj, value) { + thisObj.m_valuesAsJsonLocal = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJsonLocal", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJsonLocal_Set = Range_ValuesAsJsonLocal_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function SettingCollection_Add(thisObj, key, value) { + value = _CC._replaceDateWithStringDate(value); + var result = _createMethodObject(Excel.Setting, thisObj, "Add", 0, [key, value], false, true, null, 0); + return { handled: true, result: result }; + } + _CC.SettingCollection_Add = SettingCollection_Add; + function SettingCollection_SettingsChanged_EventArgsTransform(thisObj, args) { + return { + settings: thisObj + }; + } + _CC.SettingCollection_SettingsChanged_EventArgsTransform = SettingCollection_SettingsChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + var DateJSONPrefix = "Date("; + var DateJSONSuffix = ")"; + function _replaceStringDateWithDate(value) { + var strValue = JSON.stringify(value); + value = JSON.parse(strValue, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === DateJSONPrefix && v.slice(-1) === DateJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + return value; + } + function _replaceDateWithStringDate(value) { + var strValue = JSON.stringify(value, function dateReplacer(k, v) { + return (this[k] instanceof Date) ? (DateJSONPrefix + this[k].getTime() + DateJSONSuffix) : v; + }); + value = JSON.parse(strValue); + return value; + } + _CC._replaceDateWithStringDate = _replaceDateWithStringDate; + function Setting_HandleResult(thisObj, value) { + if (!_isUndefined(value["Value"])) { + value["Value"] = _replaceStringDateWithDate(value["Value"]); + } + ; + } + _CC.Setting_HandleResult = Setting_HandleResult; + function Setting_Value_Set(thisObj, value) { + if (!_isNullOrUndefined(value)) { + thisObj.m_value = value; + var newValue = _replaceDateWithStringDate(value); + _invokeSetProperty(thisObj, "Value", newValue, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Setting_Value_Set = Setting_Value_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + var NamedItemCollectionCustom = (function () { + function NamedItemCollectionCustom() { + } + Object.defineProperty(NamedItemCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItemCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return NamedItemCollectionCustom; + }()); + Excel.NamedItemCollectionCustom = NamedItemCollectionCustom; + (function (_CC) { + function Binding_DataChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj + }; + return evt; + } + _CC.Binding_DataChanged_EventArgsTransform = Binding_DataChanged_EventArgsTransform; + function Binding_SelectionChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj, + columnCount: args.columnCount, + rowCount: args.rowCount, + startColumn: args.startColumn, + startRow: args.startRow + }; + return evt; + } + _CC.Binding_SelectionChanged_EventArgsTransform = Binding_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var TableCollectionCustom = (function () { + function TableCollectionCustom() { + } + Object.defineProperty(TableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return TableCollectionCustom; + }()); + Excel.TableCollectionCustom = TableCollectionCustom; + (function (_CC) { + function TableCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.TableCollection_Changed_EventArgsTransform = TableCollection_Changed_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Table_HandleIdResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleIdResult = Table_HandleIdResult; + function Table_HandleResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleResult = Table_HandleResult; + function Table_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.Table_Changed_EventArgsTransform = Table_Changed_EventArgsTransform; + function Table_SelectionChanged_EventArgsTransform(thisObj, args) { + var value = args; + var isAddressNullOrEmpty = (!value.address || value.address.length === 0); + var newArgs = { + type: Excel.EventType.tableSelectionChanged, + isInsideTable: !isAddressNullOrEmpty, + worksheetId: value.worksheetId, + tableId: thisObj.id, + address: value.address + }; + return newArgs; + } + _CC.Table_SelectionChanged_EventArgsTransform = Table_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartCollectionCustom = (function () { + function ChartCollectionCustom() { + } + Object.defineProperty(ChartCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ChartCollectionCustom; + }()); + Excel.ChartCollectionCustom = ChartCollectionCustom; + (function (_CC) { + function ChartCollection_Add(thisObj, type, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); + } + return { handled: false, result: null }; + } + _CC.ChartCollection_Add = ChartCollection_Add; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Chart_SetData(thisObj, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); + } + return { handled: false }; + } + _CC.Chart_SetData = Chart_SetData; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartFillCustom = (function () { + function ChartFillCustom() { + } + ChartFillCustom.prototype.load = function (option) { + _load(this, option); + return this; + }; + return ChartFillCustom; + }()); + Excel.ChartFillCustom = ChartFillCustom; + var VisualCollectionCustom = (function () { + function VisualCollectionCustom() { + } + Object.defineProperty(VisualCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return VisualCollectionCustom; + }()); + Excel.VisualCollectionCustom = VisualCollectionCustom; + (function (_CC) { + function VisualCollection_AgaveVisualUpdate_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: value.type, + payload: value.payload + }; + return newArgs; + } + _CC.VisualCollection_AgaveVisualUpdate_EventArgsTransform = VisualCollection_AgaveVisualUpdate_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Visual_ChangeNotification_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + targetId: value.targetId, + changeType: value.changeType, + payload: value.payload, + type: Excel.EventType.visualChange + }; + return newArgs; + } + _CC.Visual_ChangeNotification_EventArgsTransform = Visual_ChangeNotification_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var PivotTableCollectionCustom = (function () { + function PivotTableCollectionCustom() { + } + Object.defineProperty(PivotTableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return PivotTableCollectionCustom; + }()); + Excel.PivotTableCollectionCustom = PivotTableCollectionCustom; + (function (_CC) { + function PivotLayout_GetColumnLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetColumnLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetColumnLabelRange = PivotLayout_GetColumnLabelRange; + function PivotLayout_GetDataBodyRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetDataBodyRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataBodyRange = PivotLayout_GetDataBodyRange; + function PivotLayout_GetDataHierarchy(thisObj, cell) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + _throwIfApiNotSupported("PivotLayout.getDataHierarchy", _defaultApiSetName, "1.9", _hostName); + var result = _createMethodObject(Excel.DataPivotHierarchy, thisObj, "GetDataHierarchy", 0, [cell], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataHierarchy = PivotLayout_GetDataHierarchy; + function PivotLayout_GetFilterAxisRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetFilterAxisRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetFilterAxisRange = PivotLayout_GetFilterAxisRange; + function PivotLayout_GetRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRange = PivotLayout_GetRange; + function PivotLayout_GetRowLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRowLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRowLabelRange = PivotLayout_GetRowLabelRange; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function PivotField_SortByLabels(thisObj, sortBy) { + if (typeof sortBy === "string") { + sortBy = (sortBy.toLowerCase() === "ascending"); + } + _invokeMethod(thisObj, "SortByLabels", 0, [sortBy], 0, 0); + return { handled: true }; + } + _CC.PivotField_SortByLabels = PivotField_SortByLabels; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormattingService_GetFormatter(thisObj, format) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatting.GetFormatter", "NumberFormatting", "1.1", _hostName); + var result = _createMethodObject(Excel.NumberFormatter, thisObj, "GetFormatter", 0, [format], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormattingService_GetFormatter = NumberFormattingService_GetFormatter; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormatter_Format(thisObj, value) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatter.Format", "NumberFormatting", "1.1", _hostName); + var result = _invokeMethod(thisObj, "Format", 0, [value], 0, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormatter_Format = NumberFormatter_Format; + })(_CC = Excel._CC || (Excel._CC = {})); + var CustomFunctionManagerCustom = (function () { + function CustomFunctionManagerCustom() { + } + CustomFunctionManagerCustom.register = function (metadata, javascript) { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { return Excel.CustomFunctionManager.newObject(context).register(metadata, javascript); }); + }; + CustomFunctionManagerCustom.getStatus = function () { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + var manager = Excel.CustomFunctionManager.newObject(context).load("status"); + return context.sync().then(function () { return manager.status; }); + }); + }; + return CustomFunctionManagerCustom; + }()); + Excel.CustomFunctionManagerCustom = CustomFunctionManagerCustom; + (function (_CC) { + function CustomFunctionManager_StaticCustomize(type) { + type.register = CustomFunctionManagerCustom.register; + type.getStatus = CustomFunctionManagerCustom.getStatus; + } + _CC.CustomFunctionManager_StaticCustomize = CustomFunctionManager_StaticCustomize; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Style_TextOrientation_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_textOrientation = value; + _invokeSetProperty(thisObj, "Orientation", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Style_TextOrientation_Set = Style_TextOrientation_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function InternalTest_Test1Event_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_Test1Event_EventArgsTransform = InternalTest_Test1Event_EventArgsTransform; + function InternalTest_TestEvent_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_TestEvent_EventArgsTransform = InternalTest_TestEvent_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var CommentCollectionCustom = (function () { + function CommentCollectionCustom() { + } + Object.defineProperty(CommentCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return CommentCollectionCustom; + }()); + Excel.CommentCollectionCustom = CommentCollectionCustom; + var ShapeCollectionCustom = (function () { + function ShapeCollectionCustom() { + } + Object.defineProperty(ShapeCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ShapeCollectionCustom; + }()); + Excel.ShapeCollectionCustom = ShapeCollectionCustom; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["accessDenied"] = "AccessDenied"; + ErrorCodes["apiNotFound"] = "ApiNotFound"; + ErrorCodes["conflict"] = "Conflict"; + ErrorCodes["emptyChartSeries"] = "EmptyChartSeries"; + ErrorCodes["filteredRangeConflict"] = "FilteredRangeConflict"; + ErrorCodes["formulaLengthExceedsLimit"] = "FormulaLengthExceedsLimit"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["inactiveWorkbook"] = "InactiveWorkbook"; + ErrorCodes["insertDeleteConflict"] = "InsertDeleteConflict"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidBinding"] = "InvalidBinding"; + ErrorCodes["invalidOperation"] = "InvalidOperation"; + ErrorCodes["invalidReference"] = "InvalidReference"; + ErrorCodes["invalidSelection"] = "InvalidSelection"; + ErrorCodes["itemAlreadyExists"] = "ItemAlreadyExists"; + ErrorCodes["itemNotFound"] = "ItemNotFound"; + ErrorCodes["mergedRangeConflict"] = "MergedRangeConflict"; + ErrorCodes["nonBlankCellOffSheet"] = "NonBlankCellOffSheet"; + ErrorCodes["notImplemented"] = "NotImplemented"; + ErrorCodes["openWorkbookLinksBlocked"] = "OpenWorkbookLinksBlocked"; + ErrorCodes["operationCellsExceedLimit"] = "OperationCellsExceedLimit"; + ErrorCodes["pivotTableRangeConflict"] = "PivotTableRangeConflict"; + ErrorCodes["powerQueryRefreshResourceChallenge"] = "PowerQueryRefreshResourceChallenge"; + ErrorCodes["rangeExceedsLimit"] = "RangeExceedsLimit"; + ErrorCodes["refreshWorkbookLinksBlocked"] = "RefreshWorkbookLinksBlocked"; + ErrorCodes["requestAborted"] = "RequestAborted"; + ErrorCodes["responsePayloadSizeLimitExceeded"] = "ResponsePayloadSizeLimitExceeded"; + ErrorCodes["unsupportedFeature"] = "UnsupportedFeature"; + ErrorCodes["unsupportedFillType"] = "UnsupportedFillType"; + ErrorCodes["unsupportedOperation"] = "UnsupportedOperation"; + ErrorCodes["unsupportedSheet"] = "UnsupportedSheet"; + ErrorCodes["invalidOperationInCellEditMode"] = "InvalidOperationInCellEditMode"; + })(ErrorCodes = Excel.ErrorCodes || (Excel.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = {})); + var _libraryMetadataXlapi = { "version": "1.0.0", + "name": "Excel", + "defaultApiSetName": "ExcelApi", + "hostName": "Excel", + "apiSets": [["1.19", "ExcelApiUndo"], ["1.1", "Recorder"], ["99.9"], ["1.4", "ExcelApiUndo"], ["1.8"], ["1.9"], ["1.11"], ["1.18"], ["1.6"], ["1.6", "ExcelApiUndo"], ["1.7"], ["1.1", "ExcelApiUndo"], ["1.2"], ["1.3"], ["1.4"], ["1.5"], ["1.10"], ["1.14"], ["1.1", "ExcelApiOnline"], ["1.1", "CustomFunctions"], ["1.1", "WACOperationEvents"], ["1.3", "ExcelApiUndo"], ["1.13"], ["1.16"], ["1.8", "ExcelApiUndo"], ["1.16", "ExcelApiUndo"], ["1.12"], ["1.2", "ExcelApiOnline"], ["1.2", "ExcelApiUndo"], ["1.17"], ["1.7", "ExcelApiUndo"], ["1.10", "ExcelApiUndo"], ["1.14", "ExcelApiUndo"], ["1.15", "ExcelApiUndo"], ["1.15"], ["1.17", "ExcelApiUndo"], ["99.99", "ExcelApiUndo"], ["1.9", "ExcelApiUndo"], ["1.11", "ExcelApiUndo"], ["1.12", "ExcelApiUndo"], ["1.13", "ExcelApiUndo"], ["1.18", "ExcelApiUndo"]], + "strings": [], + "enumTypes": [["UndoChangeType", ["undoAction", "redoAction", "undoOrRedoCleared", "undoGroupAdded"]], + ["SDX", ["guidedReapply"]], + ["BusinessBarEntryType", [], { "officeScriptsRunningStatus": 0, "msFormsDataSyncRunningStatus": 1 }], + ["FormulaReferenceStyle", ["a1", "r1C1"]], + ["NavigationObjectType", ["table", "pivotTable", "chart", "shape", "namedRange"]], + ["UserActivityType", ["none", "insertSheet", "deleteSheet", "renameSheet", "changeCell", "insertRow", "insertColumn", "deleteRow", "deleteColumn", "insertPartialRow", "insertPartialColumn", "insertPartialColumnRightToLeft", "deletePartialRow", "deletePartialColumn", "deletePartialColumnRightToLeft", "move", "sort", "mergeCells", "unmergeCells", "unknownOperation", "genericEdit"]], + ["LineageEndOfLogStatus", ["loadInProgress", "success", "endOfLog", "purged", "trimmed", "unsupported", "cleared", "error"]], + ["LineageLoadType", ["new", "next", "previous", "latest"]], + ["LoadToType", ["connectionOnly", "table", "pivotTable", "pivotChart"]], + ["QueryError", ["unknown", "none", "failedLoadToWorksheet", "failedLoadToDataModel", "failedDownload", "failedToCompleteDownload"]], + ["RangeOptimizationType", ["other", "numberFormat", "textAlignment", "textProperties", "cellBorder", "fillColor", "sheetProtection", "rowHeight", "rowVisibility"]], + ["WorkbookLinksHardToFindMessages", ["none", "containsDefinedNames", "hiddenOrVeryHiddenSheet", "hiddenFloatingObjects", "lockedFloatingObjectsThroughVba", "protectedSheet", "containsConditionalFormatting", "containsDataValidation", "hiddenRowsAndColumns"]], + ["WorkbookLinksIconState", ["ok", "moreInfo", "warning"]], + ["WorkbookLinksRefreshSettings", ["ask", "always", "never"]], + ["WorkbookConditionalFormattingRulesManagerScope", ["defaultScope", "selectedRange", "activatedWorksheet", "activatedTable", "activatedPivotTable"]], + ["WorkbookLinksRefreshMode", ["manual", "automatic"]], + ["HelpTopic", ["showChanges", "guidedReapply", "externalCodeServiceDiagnostics"]], + ["DocumentTaskChangeAction", [], { "unknown": "unknown", "create": "create", "assign": "assign", "unassign": "unassign", "unassignAll": "unassignAll", "setSchedule": "setSchedule", "setPercentComplete": "setPercentComplete", "setPriority": "setPriority", "remove": "remove", "restore": "restore", "setTitle": "setTitle", "undo": "undo" }], + ["DataSourceType", ["unknown", "cube", "localRange", "localTable", "oledbDefault"]], + ["DateFilterCondition", ["unknown", "equals", "before", "beforeOrEqualTo", "after", "afterOrEqualTo", "between", "tomorrow", "today", "yesterday", "nextWeek", "thisWeek", "lastWeek", "nextMonth", "thisMonth", "lastMonth", "nextQuarter", "thisQuarter", "lastQuarter", "nextYear", "thisYear", "lastYear", "yearToDate", "allDatesInPeriodQuarter1", "allDatesInPeriodQuarter2", "allDatesInPeriodQuarter3", "allDatesInPeriodQuarter4", "allDatesInPeriodJanuary", "allDatesInPeriodFebruary", "allDatesInPeriodMarch", "allDatesInPeriodApril", "allDatesInPeriodMay", "allDatesInPeriodJune", "allDatesInPeriodJuly", "allDatesInPeriodAugust", "allDatesInPeriodSeptember", "allDatesInPeriodOctober", "allDatesInPeriodNovember", "allDatesInPeriodDecember"]], + ["LabelFilterCondition", ["unknown", "equals", "beginsWith", "endsWith", "contains", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between"]], + ["PivotFilterType", ["unknown", "value", "manual", "label", "date"]], + ["TopBottomSelectionType", ["items", "percent", "sum"]], + ["ValueFilterCondition", ["unknown", "equals", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between", "topN", "bottomN"]], + ["BuiltInPivotTableStyle", ["none", "light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "light22", "light23", "light24", "light25", "light26", "light27", "light28", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11", "dark12", "dark13", "dark14", "dark15", "dark16", "dark17", "dark18", "dark19", "dark20", "dark21", "dark22", "dark23", "dark24", "dark25", "dark26", "dark27", "dark28"]], + ["BuiltInSlicerStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "other1", "other2", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6"]], + ["BuiltInTableStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11"]], + ["ChartSeriesDimension", ["categories", "values", "bubbleSizes"], { "xvalues": "XValues", "yvalues": "YValues" }], + ["PivotTableDateGroupBy", ["invalid", "bySeconds", "byMinutes", "byHours", "byDays", "byMonths", "byQuarters", "byYears"]], + ["PivotFilterTopBottomCriterion", ["invalid", "topItems", "topPercent", "topSum", "bottomItems", "bottomPercent", "bottomSum"]], + ["SortBy", ["ascending", "descending"]], + ["AggregationFunction", ["unknown", "automatic", "sum", "count", "average", "max", "min", "product", "countNumbers", "standardDeviation", "standardDeviationP", "variance", "varianceP"]], + ["ShowAsCalculation", ["unknown", "none", "percentOfGrandTotal", "percentOfRowTotal", "percentOfColumnTotal", "percentOfParentRowTotal", "percentOfParentColumnTotal", "percentOfParentTotal", "percentOf", "runningTotal", "percentRunningTotal", "differenceFrom", "percentDifferenceFrom", "rankAscending", "rankDecending", "index"]], + ["PivotAxis", ["unknown", "row", "column", "data", "filter"]], + ["LinkedDataTypeRefreshMode", ["unknown", "manual", "onLoad", "periodic"]], + ["AxisType", ["invalid", "category", "value", "series"]], + ["AxisGroup", ["primary", "secondary"]], + ["AxisScaleType", ["linear", "logarithmic"]], + ["AxisCrosses", ["automatic", "maximum", "minimum", "custom"]], + ["AxisTickMark", ["none", "cross", "inside", "outside"]], + ["AxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["TrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ChartAxisType", ["invalid", "category", "value", "series"]], + ["ChartAxisGroup", ["primary", "secondary"]], + ["ChartAxisScaleType", ["linear", "logarithmic"]], + ["ChartAxisPosition", ["automatic", "maximum", "minimum", "custom"]], + ["ChartAxisTickMark", ["none", "cross", "inside", "outside"]], + ["CalculationState", ["done", "calculating", "pending"]], + ["ChartAxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["ChartAxisDisplayUnit", ["none", "hundreds", "thousands", "tenThousands", "hundredThousands", "millions", "tenMillions", "hundredMillions", "billions", "trillions", "custom"]], + ["ChartAxisTimeUnit", ["days", "months", "years"]], + ["ChartBoxQuartileCalculation", ["inclusive", "exclusive"]], + ["ChartAxisCategoryType", ["automatic", "textAxis", "dateAxis"]], + ["ChartBinType", ["category", "auto", "binWidth", "binCount"]], + ["ChartLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "grey25", "grey50", "grey75", "automatic", "roundDot"]], + ["ChartDataLabelPosition", ["invalid", "none", "center", "insideEnd", "insideBase", "outsideEnd", "left", "right", "top", "bottom", "bestFit", "callout"]], + ["ChartErrorBarsInclude", ["both", "minusValues", "plusValues"]], + ["ChartErrorBarsType", ["fixedValue", "percent", "stDev", "stError", "custom"]], + ["ChartMapAreaLevel", ["automatic", "dataOnly", "city", "county", "state", "country", "continent", "world"]], + ["ChartGradientStyle", ["twoPhaseColor", "threePhaseColor"]], + ["ChartGradientStyleType", ["extremeValue", "number", "percent"]], + ["ChartTitlePosition", ["automatic", "top", "bottom", "left", "right"]], + ["ChartLegendPosition", ["invalid", "top", "bottom", "left", "right", "corner", "custom"]], + ["ChartMarkerStyle", ["invalid", "automatic", "none", "square", "diamond", "triangle", "star", "dot", "dash", "circle", "plus", "picture"], { "x": "X" }], + ["ChartPlotAreaPosition", ["automatic", "custom"]], + ["ChartMapLabelStrategy", ["none", "bestFit", "showAll"]], + ["ChartMapProjectionType", ["automatic", "mercator", "miller", "robinson", "albers"]], + ["ChartParentLabelStrategy", ["none", "banner", "overlapping"]], + ["ChartSeriesBy", ["auto", "columns", "rows"]], + ["ChartDataSourceType", ["localRange", "externalRange", "list", "unknown"]], + ["ChartTextHorizontalAlignment", ["center", "left", "right", "justify", "distributed"]], + ["ChartTextVerticalAlignment", ["center", "bottom", "top", "justify", "distributed"]], + ["ChartTickLabelAlignment", ["center", "left", "right"]], + ["ChartType", ["invalid", "columnClustered", "columnStacked", "columnStacked100", "barClustered", "barStacked", "barStacked100", "lineStacked", "lineStacked100", "lineMarkers", "lineMarkersStacked", "lineMarkersStacked100", "pieOfPie", "pieExploded", "barOfPie", "areaStacked", "areaStacked100", "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", "line", "pie", "area", "doughnut", "radar", "histogram", "boxwhisker", "pareto", "regionMap", "treemap", "waterfall", "sunburst", "funnel"], { "_3DColumnClustered": "3DColumnClustered", "_3DColumnStacked": "3DColumnStacked", "_3DColumnStacked100": "3DColumnStacked100", "_3DBarClustered": "3DBarClustered", "_3DBarStacked": "3DBarStacked", "_3DBarStacked100": "3DBarStacked100", "_3DPieExploded": "3DPieExploded", "xyscatterSmooth": "XYScatterSmooth", "xyscatterSmoothNoMarkers": "XYScatterSmoothNoMarkers", "xyscatterLines": "XYScatterLines", "xyscatterLinesNoMarkers": "XYScatterLinesNoMarkers", "_3DAreaStacked": "3DAreaStacked", "_3DAreaStacked100": "3DAreaStacked100", "_3DColumn": "3DColumn", "_3DLine": "3DLine", "_3DPie": "3DPie", "xyscatter": "XYScatter", "_3DArea": "3DArea" }], + ["ChartUnderlineStyle", ["none", "single"]], + ["ChartDisplayBlanksAs", ["notPlotted", "zero", "interplotted"]], + ["ChartPlotBy", ["rows", "columns"]], + ["ChartSplitType", ["splitByPosition", "splitByValue", "splitByPercentValue", "splitByCustomSplit"]], + ["ChartColorScheme", ["colorfulPalette1", "colorfulPalette2", "colorfulPalette3", "colorfulPalette4", "monochromaticPalette1", "monochromaticPalette2", "monochromaticPalette3", "monochromaticPalette4", "monochromaticPalette5", "monochromaticPalette6", "monochromaticPalette7", "monochromaticPalette8", "monochromaticPalette9", "monochromaticPalette10", "monochromaticPalette11", "monochromaticPalette12", "monochromaticPalette13"]], + ["ChartTrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ShapeZOrder", ["bringToFront", "bringForward", "sendToBack", "sendBackward"]], + ["ShapeType", ["unsupported", "image", "geometricShape", "group", "line"]], + ["ShapeScaleType", ["currentSize", "originalSize"]], + ["ShapeScaleFrom", ["scaleFromTopLeft", "scaleFromMiddle", "scaleFromBottomRight"]], + ["ShapeFillType", ["noFill", "solid", "gradient", "pattern", "pictureAndTexture", "mixed"]], + ["ShapeFontUnderlineStyle", ["none", "single", "double", "heavy", "dotted", "dottedHeavy", "dash", "dashHeavy", "dashLong", "dashLongHeavy", "dotDash", "dotDashHeavy", "dotDotDash", "dotDotDashHeavy", "wavy", "wavyHeavy", "wavyDouble"]], + ["PictureFormat", [], { "unknown": "UNKNOWN", "bmp": "BMP", "jpeg": "JPEG", "gif": "GIF", "png": "PNG", "svg": "SVG" }], + ["ShapeLineStyle", ["single", "thickBetweenThin", "thickThin", "thinThick", "thinThin"]], + ["ShapeLineDashStyle", ["dash", "dashDot", "dashDotDot", "longDash", "longDashDot", "roundDot", "solid", "squareDot", "longDashDotDot", "systemDash", "systemDot", "systemDashDot"]], + ["ArrowheadLength", ["short", "medium", "long"]], + ["ArrowheadStyle", ["none", "triangle", "stealth", "diamond", "oval", "open"]], + ["ArrowheadWidth", ["narrow", "medium", "wide"]], + ["PremiumLicenseName", ["python"]], + ["BindingType", ["range", "table", "text"]], + ["BorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight", "insideVertical", "insideHorizontal", "diagonalDown", "diagonalUp"]], + ["BorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "double", "slantDashDot"]], + ["BorderWeight", ["hairline", "thin", "medium", "thick"]], + ["CalculationMode", ["automatic", "automaticExceptTables", "manual"]], + ["RuntimeCalculationMode", [], { "undefined": 0, "automatic": 1, "automaticExceptTables": 2, "manual": 3 }], + ["CalculationType", ["recalculate", "full", "fullRebuild"]], + ["ClearApplyTo", ["all", "formats", "contents", "hyperlinks", "removeHyperlinks"]], + ["VisualCategory", ["column", "bar", "line", "area", "pie", "donut", "scatter", "bubble", "statistical", "stock", "combo", "hierarchy", "surface", "map", "funnel", "radar", "waterfall", "threeD", "other"]], + ["VisualPropertyType", ["object", "collection", "string", "double", "int", "bool", "enum", "color"]], + ["VisualChangeType", ["dataChange", "propertyChange", "genericChange", "selectionChange"]], + ["BoolMetaPropertyType", ["writeOnly", "readOnly", "hideEntireSubtreeUI", "hideMeButShowChildrenUI", "expandableUI", "nextPropOnSameLine", "hideLabel", "showResetUI", "hasOwnExpandableSection", "nextPropOnSameLineFOTP", "showResetUIFOTP", "untransferable", "ignoreDuringChangeChartType", "notTriviallyUndoable", "volatileEnum", "exceptionCollection", "metaOnly", "showHideCollection", "errorMessage", "infoMessage"]], + ["ConditionalDataBarAxisFormat", ["automatic", "none", "cellMidPoint"]], + ["ConditionalDataBarDirection", ["context", "leftToRight", "rightToLeft"]], + ["ConditionalFormatDirection", ["top", "bottom"]], + ["ConditionalFormatType", ["custom", "dataBar", "colorScale", "iconSet", "topBottom", "presetCriteria", "containsText", "cellValue"]], + ["ConditionalFormatRuleType", ["invalid", "automatic", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatIconRuleType", ["invalid", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatColorCriterionType", ["invalid", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalTopBottomCriterionType", ["invalid", "topItems", "topPercent", "bottomItems", "bottomPercent"]], + ["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"]], + ["ConditionalTextOperator", ["invalid", "contains", "notContains", "beginsWith", "endsWith"]], + ["ConditionalCellValueOperator", ["invalid", "between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqual", "lessThanOrEqual"]], + ["ConditionalIconCriterionOperator", ["invalid", "greaterThan", "greaterThanOrEqual"]], + ["ConditionalRangeBorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight"]], + ["ConditionalRangeBorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot"]], + ["ConditionalRangeFontUnderlineStyle", ["none", "single", "double"]], + ["CustomFunctionType", ["invalid", "script", "webService"]], + ["CustomFunctionMetadataFormat", ["invalid", "openApi"]], + ["DataValidationType", ["none", "wholeNumber", "decimal", "list", "date", "time", "textLength", "custom", "inconsistent", "mixedCriteria"]], + ["DataValidationOperator", ["between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqualTo", "lessThanOrEqualTo"]], + ["DataValidationAlertStyle", ["stop", "warning", "information"]], + ["DeleteShiftDirection", ["up", "left"]], + ["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"]], + ["FilterDatetimeSpecificity", ["year", "month", "day", "hour", "minute", "second"]], + ["FilterOn", ["bottomItems", "bottomPercent", "cellColor", "dynamic", "fontColor", "values", "topItems", "topPercent", "icon", "custom"]], + ["FilterOperator", ["and", "or"]], + ["HorizontalAlignment", ["general", "left", "center", "right", "fill", "justify", "centerAcrossSelection", "distributed"]], + ["IconSet", ["invalid", "threeArrows", "threeArrowsGray", "threeFlags", "threeTrafficLights1", "threeTrafficLights2", "threeSigns", "threeSymbols", "threeSymbols2", "fourArrows", "fourArrowsGray", "fourRedToBlack", "fourRating", "fourTrafficLights", "fiveArrows", "fiveArrowsGray", "fiveRating", "fiveQuarters", "threeStars", "threeTriangles", "fiveBoxes"]], + ["ImageFittingMode", ["fit", "fitAndCenter", "fill"]], + ["InsertShiftDirection", ["down", "right"]], + ["NamedItemScope", ["worksheet", "workbook"]], + ["NamedItemType", ["string", "integer", "double", "boolean", "range", "error", "array"]], + ["RangeUnderlineStyle", ["none", "single", "double", "singleAccountant", "doubleAccountant"]], + ["SheetVisibility", ["visible", "hidden", "veryHidden"]], + ["EventTriggerSource", ["unknown", "thisLocalAddin"]], + ["RangeValueType", ["unknown", "empty", "string", "integer", "double", "boolean", "error", "richValue"]], + ["KeyboardDirection", ["left", "right", "up", "down"]], + ["SearchDirection", ["forward", "backwards"]], + ["SortOrientation", ["rows", "columns"]], + ["SortOn", ["value", "cellColor", "fontColor", "icon"]], + ["SortDataOption", ["normal", "textAsNumber"]], + ["SortMethod", ["pinYin", "strokeCount"]], + ["VerticalAlignment", ["top", "center", "bottom", "justify", "distributed"]], + ["MessageCategory", [], { "none": 0, "customFunction": 1, "action": 2, "event": 65536 }], + ["MessageType", [], { "none": 0, "testEvent": 1, "test1Event": 2, "worksheetDataChangedEvent": 10, "worksheetActivatedEvent": 11, "worksheetDeactivatedEvent": 12, "worksheetAddedEvent": 13, "worksheetSelectionChangedEvent": 14, "worksheetDeletedEvent": 15, "worksheetCalculatedEvent": 16, "worksheetFilteredEvent": 17, "worksheetFormatChangedEvent": 18, "worksheetRowSortedEvent": 19, "worksheetColumnSortedEvent": 20, "worksheetSingleClickedEvent": 21, "worksheetRowHiddenChangedEvent": 22, "worksheetFormulaChangedEvent": 23, "worksheetProtectionChangedEvent": 24, "worksheetNameChangedEvent": 25, "worksheetVisibilityChangedEvent": 26, "worksheetMovedEvent": 27, "worksheetNavigationObjectChangedEvent": 28, "worksheetRowHeightChangedEvent": 29, "workbookFormulaReferenceStyleChangedEvent": 30, "chartAddedEvent": 50, "chartActivatedEvent": 51, "chartDeactivatedEvent": 52, "chartDeletedEvent": 53, "tableSelectionChangedEvent": 100, "tableDataChangedEvent": 101, "tableAddedEvent": 102, "tableDeletedEvent": 103, "tableFilteredEvent": 104, "agaveVisualUpdateEvent": 150, "customFunctionExecutionBeginEvent": 200, "customFunctionExecutionEndEvent": 201, "commentAddedEvent": 250, "commentDeletedEvent": 251, "commentChangedEvent": 252, "invocationMessage": 1000, "cancellationMessage": 1001, "metadataMessage": 1002, "visualSelectionChangedEvent": 2000, "visualChangeEvent": 2001, "visualTrackerModelChangedEvent": 2002, "shapeSelectionChangedEvent": 2100, "shapeActivatedEvent": 2101, "shapeDeactivatedEvent": 2102, "shapeAddedEvent": 2103, "shapeDeletedEvent": 2104, "workbookAutoSaveSettingChangedEvent": 2200, "wacoperationEvent": 2201, "recordingStateChangedEvent": 2202, "workbookActivatedEvent": 2203, "workbookNavigationObjectChangedEvent": 2204, "ribbonCommandExecutedEvent": 2300, "linkedDataTypeRefreshRequestCompletedEvent": 2500, "linkedDataTypeRefreshModeChangedEvent": 2501, "linkedDataTypeLinkedDataTypeAddedEvent": 2502, "linkedWorkbookWorkbookLinksChangedEvent": 2600, "linkedWorkbookRefreshCompletedEvent": 2601, "rangePickerSelectionChangedEvent": 2700, "rangePickerDeactivatedEvent": 2701, "lineageActivityUpdateAvailableEvent": 2800, "lineageActivityFilterUpdatedEvent": 2801, "lineageActivityLoadCompletedEvent": 2802, "pivotTableAddedEvent": 2900, "pivotTableDeletedEvent": 2901, "namedItemAddedEvent": 3000, "namedItemDeletedEvent": 3001, "guidedReapplyManagerUpdateAvailableEvent": 3100, "vbaRecorderRecordingChangedEvent": 3200, "vbaRecorderRecordingChanged2Event": 3202, "workbookActionRecordedEvent": 3201, "externalCodeServiceDiagnosticsNewEntryEvent": 3300, "externalCodeServiceDiagnosticsFilterUpdatedEvent": 3301, "rangeValuesPreviewDismissedEvent": 3400, "applicationUndoChangedEvent": 3500, "appRuntimeVisibilityChangedEvent": 65539, "beforeCloseNotifiactionCancelledEvent": 65540, "augmentationLoopAnnotationAddedEvent": 65541 }], + ["InsertDeleteCellsShiftDirection", ["none", "shiftCellLeft", "shiftCellUp", "shiftCellRight", "shiftCellDown"]], + ["DocumentPropertyType", ["number", "boolean", "date", "string", "float"]], + ["EventSource", ["local", "remote"]], + ["DataChangeType", ["unknown", "rangeEdited", "rowInserted", "rowDeleted", "columnInserted", "columnDeleted", "cellInserted", "cellDeleted"]], + ["RowHiddenChangeType", ["unhidden", "hidden"]], + ["CommentChangeType", ["commentEdited", "commentResolved", "commentReopened", "replyAdded", "replyDeleted", "replyEdited"]], + ["EventType", ["worksheetChanged", "worksheetSelectionChanged", "worksheetAdded", "worksheetActivated", "worksheetDeactivated", "tableChanged", "tableSelectionChanged", "worksheetDeleted", "chartAdded", "chartActivated", "chartDeactivated", "chartDeleted", "worksheetCalculated", "visualSelectionChanged", "agaveVisualUpdate", "tableAdded", "tableDeleted", "tableFiltered", "worksheetFiltered", "shapeActivated", "shapeDeactivated", "visualChange", "workbookAutoSaveSettingChanged", "worksheetFormatChanged", "ribbonCommandExecuted", "worksheetRowSorted", "worksheetColumnSorted", "worksheetSingleClicked", "worksheetRowHiddenChanged", "recordingStateChangedEvent", "commentAdded", "commentDeleted", "commentChanged", "linkedDataTypeRefreshRequestCompleted", "linkedDataTypeRefreshModeChanged", "linkedDataTypeLinkedDataTypeAdded", "worksheetFormulaChanged", "workbookActivated", "linkedWorkbookWorkbookLinksChanged", "linkedWorkbookRefreshCompleted", "worksheetProtectionChanged", "worksheetNameChanged", "worksheetVisibilityChanged", "worksheetMoved", "lineageActivityUpdateAvailable", "lineageActivityFilterUpdated", "lineageActivityLoadCompleted", "shapeAdded", "shapeDeleted", "pivotTableAdded", "pivotTableDeleted", "namedItemAdded", "namedItemDeleted", "worksheetNavigationObjectChanged", "workbookNavigationObjectChanged", "worksheetRowHeightChanged", "workbookFormulaReferenceStyleChanged", "guidedReapplyManagerUpdateAvailable", "vbaRecorderRecordingChanged", "rangeValuesPreviewDismissed", "annotationAdded", "workbookActionRecorded", "applicationUndoChanged", "vbaRecorderRecordingChanged2"], { "wacoperationEvent": "WACOperationEvent" }], + ["DocumentPropertyItem", ["title", "subject", "author", "keywords", "comments", "template", "lastAuth", "revision", "appName", "lastPrint", "creation", "lastSave", "category", "format", "manager", "company"]], + ["SubtotalLocationType", ["atTop", "atBottom", "off"]], + ["PivotLayoutType", ["compact", "tabular", "outline"]], + ["ProtectionSelectionMode", ["normal", "unlocked", "none"]], + ["PageOrientation", ["portrait", "landscape"]], + ["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"]], + ["ReadingOrder", ["context", "leftToRight", "rightToLeft"]], + ["BuiltInStyle", ["normal", "comma", "currency", "percent", "wholeComma", "wholeDollar", "hlink", "hlinkTrav", "note", "warningText", "emphasis1", "emphasis2", "emphasis3", "sheetTitle", "heading1", "heading2", "heading3", "heading4", "input", "output", "calculation", "checkCell", "linkedCell", "total", "good", "bad", "neutral", "accent1", "accent1_20", "accent1_40", "accent1_60", "accent2", "accent2_20", "accent2_40", "accent2_60", "accent3", "accent3_20", "accent3_40", "accent3_60", "accent4", "accent4_20", "accent4_40", "accent4_60", "accent5", "accent5_20", "accent5_40", "accent5_60", "accent6", "accent6_20", "accent6_40", "accent6_60", "explanatoryText"]], + ["PrintErrorType", ["asDisplayed", "blank", "dash", "notAvailable"]], + ["WorksheetPositionType", ["none", "before", "after", "beginning", "end"]], + ["PrintComments", ["noComments", "endSheet", "inPlace"]], + ["PrintOrder", ["downThenOver", "overThenDown"]], + ["PrintMarginUnit", ["points", "inches", "centimeters"]], + ["HeaderFooterState", ["default", "firstAndDefault", "oddAndEven", "firstOddAndEven"]], + ["AutoFillType", ["fillDefault", "fillCopy", "fillSeries", "fillFormats", "fillValues", "fillDays", "fillWeekdays", "fillMonths", "fillYears", "linearTrend", "growthTrend", "flashFill"]], + ["GroupOption", ["byRows", "byColumns"]], + ["RangeCopyType", ["all", "formulas", "values", "formats", "link"]], + ["LinkedDataTypeState", ["none", "validLinkedData", "disambiguationNeeded", "brokenLinkedData", "fetchingData"]], + ["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"]], + ["ConnectorType", ["straight", "elbow", "curve"]], + ["ContentType", ["plain", "mention"]], + ["SpecialCellType", ["conditionalFormats", "dataValidations", "blanks", "constants", "formulas", "sameConditionalFormat", "sameDataValidation", "visible"]], + ["SpecialCellValueType", ["all", "errors", "errorsLogical", "errorsNumbers", "errorsText", "errorsLogicalNumber", "errorsLogicalText", "errorsNumberText", "logical", "logicalNumbers", "logicalText", "logicalNumbersText", "numbers", "numbersText", "text"]], + ["Placement", ["twoCell", "oneCell", "absolute"]], + ["FillPattern", ["none", "solid", "gray50", "gray75", "gray25", "horizontal", "vertical", "down", "up", "checker", "semiGray75", "lightHorizontal", "lightVertical", "lightDown", "lightUp", "grid", "crissCross", "gray16", "gray8", "linearGradient", "rectangularGradient"]], + ["ShapeTextHorizontalAlignment", ["left", "center", "right", "justify", "justifyLow", "distributed", "thaiDistributed"]], + ["ShapeTextVerticalAlignment", ["top", "middle", "bottom", "justified", "distributed"]], + ["ShapeTextVerticalOverflow", ["overflow", "ellipsis", "clip"]], + ["ShapeTextHorizontalOverflow", ["overflow", "clip"]], + ["ShapeTextReadingOrder", ["leftToRight", "rightToLeft"]], + ["ShapeTextOrientation", ["horizontal", "vertical", "vertical270", "wordArtVertical", "eastAsianVertical", "mongolianVertical", "wordArtVerticalRTL"]], + ["ShapeAutoSize", ["autoSizeNone", "autoSizeTextToFitShape", "autoSizeShapeToFitText", "autoSizeMixed"]], + ["CloseBehavior", ["save", "skipSave"]], + ["SaveBehavior", ["save", "prompt"]], + ["SlicerSortType", ["dataSourceOrder", "ascending", "descending"]], + ["RibbonTab", ["others", "home", "insert", "draw", "pageLayout", "formulas", "data", "review", "view", "developer", "addIns", "help"]], + ["NumberFormatCategory", ["general", "number", "currency", "accounting", "date", "time", "percentage", "fraction", "scientific", "text", "special", "custom"]]], + "clientObjectTypes": [["UndoScope", + 0, + 0, + 0, + [["close", + 0, + 0, + 0, + 2], + ["open", + 1, + 0, + 0, + 2]]], + ["RangeValuesPreview", + 4, + 0, + 0, + [["_RegisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["dismiss", + 0, + 2, + 0, + 4], + ["show", + 3, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Dismissed", + 0, + 0, + "MessageType.rangeValuesPreviewDismissedEvent", + "this._ParentObject.id", + "_RegisterEventDismissed", + "_UnregisterEventDismissed"]]], + ["AugmentationLoop", + 0, + 0, + 0, + [["_RegisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["activateAnnotation", + 1, + 2, + 0, + 4], + ["submitSignal", + 1, + 2, + 0, + 4]], + 0, + 0, + 0, + [["AnnotationAdded", + 0, + 0, + "MessageType.augmentationLoopAnnotationAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAnnotationAddedEvent", + "_UnregisterAnnotationAddedEvent"]]], + ["ExternalCodeService", + 0, + 0, + [["diagnostics", + "ExternalCodeServiceDiagnostics", + 2, + 0, + 0, + 4]]], + ["ExternalCodeServiceDiagnostics", + 0, + [["id", + 2]], + 0, + [["_RegisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["clear", + 0, + 2, + 0, + 4], + ["fireStoredEntries", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1]], + 0, + 0, + 0, + [["FilterUpdated", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent", + "this.id", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["NewEntry", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsNewEntryEvent", + "this.id", + "_RegisterEventNewEntry", + "_UnregisterEventNewEntry"]]], + ["VbaRecorder", + 0, + [["id", + 2]], + 0, + [["_RegisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterEventRecordingChanged2", + 0, + 2, + 2, + 4], + ["_UnregisterEventRecordingChanged2", + 0, + 2, + 2, + 4]], + 0, + 0, + 0, + [["RecordingChanged", + 0, + 0, + "MessageType.vbaRecorderRecordingChangedEvent", + "this.id", + "_RegisterEventRecordingChanged", + "_UnregisterEventRecordingChanged"], + ["RecordingChanged2", + 0, + 2, + "MessageType.vbaRecorderRecordingChanged2Event", + "this.id", + "_RegisterEventRecordingChanged2", + "_UnregisterEventRecordingChanged2"]]], + ["WorksheetOptimizationScanResult", + 0, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + [["ranges", + "RangeOptimizationCollection", + 18, + 0, + 0, + 4]]], + ["UserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity"], + ["GuidedReapplyManager", + 0, + 0, + [["activities", + "UserActivityCollection", + 18, + 0, + 0, + 4], + ["summaryCardUserActivity", + "SummaryCardUserActivity", + 2, + 0, + 0, + 4]], + [["openSavedFile", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["discardActivites", + 0, + 2, + 0, + 4], + ["reapplyActivity", + 1, + 2, + 0, + 4], + ["saveActivities", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["UpdateAvailable", + 0, + 0, + "MessageType.guidedReapplyManagerUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["BusinessBar", + 0, + 0, + 0, + [["hide", + 2], + ["show", + 2]]], + ["UserActivity", + 0, + [["activityId", + 2], + ["activityType", + 2], + ["author", + 2], + ["createdDateTime", + 10], + ["guid", + 2], + ["rangeAddress", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2], + ["authorEmail", + 2], + ["locationDeleted", + 2]], + [["highlightRangeAreas", + "RangeAreas", + 2, + 0, + 0, + 4]]], + ["LineageActivityCollection", + 1, + 0, + 0, + [["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["clear", + 0, + 2, + 0, + 4], + ["getCount", + 0, + 2, + 0, + 4], + ["getState", + 0, + 2, + 0, + 4], + ["loadActivities", + 1, + 2, + 0, + 4], + ["loadLatestActivities", + 0, + 2, + 0, + 4], + ["loadNextActivities", + 0, + 2, + 0, + 4], + ["loadPreviousActivities", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_RegisterEventLoadCompleted", + 0, + 2, + 0, + 4], + ["_UnregisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_UnregisterEventLoadCompleted", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity", + [["FilterUpdated", + 0, + 0, + "MessageType.lineageActivityFilterUpdatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["LoadCompleted", + 0, + 0, + "MessageType.lineageActivityLoadCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventLoadCompleted", + "_UnregisterEventLoadCompleted"], + ["UpdateAvailable", + 0, + 0, + "MessageType.lineageActivityUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["SummaryItemUserActivity", + 0, + [["activityType", + 2], + ["rangeAddresses", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2]]], + ["SummaryItemUserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SummaryItemUserActivity", + 1, + 2, + 0, + 4]], + 0, + "SummaryItemUserActivity"], + ["SummaryCardUserActivity", + 0, + [["authors", + 2], + ["currentUser", + 2], + ["displayTime", + 10], + ["numberOfDetailedCard", + 2], + ["summaryUnviewableData", + 2]], + [["summaryItemUserActivities", + "SummaryItemUserActivityCollection", + 18, + 0, + 0, + 4]]], + ["AllowEditRange", + 0, + [["address", + 1], + ["isPasswordProtected", + 3], + ["title", + 1]], + 0, + [["delete"], + ["pauseProtection", + 1], + ["setPassword", + 1]]], + ["AllowEditRangeCollection", + 1, + 0, + 0, + [["add", + 3], + ["getCount", + 0, + 2, + 0, + 4], + ["pauseProtection", + 1]], + [["getItem", + "AllowEditRange", + 1, + 18, + 0, + 4], + ["getItemAt", + "AllowEditRange", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "AllowEditRange", + 1, + 2, + 0, + 4]], + 0, + "AllowEditRange"], + ["Query", + 0, + [["loadedTo", + 2], + ["loadedToDataModel", + 2], + ["name", + 2], + ["refreshDate", + 10], + ["rowsLoadedCount", + 2], + ["error", + 2]]], + ["QueryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Query", + 1, + 18, + 0, + 4]], + 0, + "Query"], + ["VisualTracker", + 0, + [["id", + 2]], + 0, + [["_RegisterEventModelChanged", + 0, + 2], + ["_UnregisterEventModelChanged", + 0, + 2], + ["requestTrackingAlteration", + 2, + 2, + 0, + 4]], + 0, + 0, + 0, + [["ModelChanged", + 0, + 0, + "MessageType.visualTrackerModelChangedEvent", + "this.id", + "_RegisterEventModelChanged", + "_UnregisterEventModelChanged"]]], + ["NumberFormatProperty", + 0, + [["key", + 3], + ["currency", + 3], + ["dateTime", + 3], + ["dateTimeHasDayOfWeek", + 3], + ["dateTimeHasMonth", + 3], + ["dateTimeHasYear", + 3], + ["numeric", + 3], + ["percent", + 3], + ["text", + 3]]], + ["NumberFormatPropertyCollection", + 1, + 0, + 0, + 0, + [["getItemAt", + "NumberFormatProperty", + 1, + 2, + 0, + 4]], + 0, + "NumberFormatProperty"], + ["RangeOptimization", + 0, + [["optimizationTypes", + 2], + ["range", + 2]]], + ["RangeOptimizationCollection", + 1, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeOptimization", + 1, + 2, + 0, + 4]], + 0, + "RangeOptimization"], + ["WorksheetOptimization", + 0, + 0, + 0, + 0, + [["optimize", + "WorksheetOptimizationResult", + 0, + 0, + 0, + 2], + ["scan", + "RangeOptimizationCollection", + 0, + 6, + 0, + 4], + ["scanExtended", + "WorksheetOptimizationScanResult", + 0, + 2, + 0, + 4]]], + ["WorksheetOptimizationResult", + 0, + [["allocatedCells", + 2], + ["optimizedCells", + 2]]], + ["LinkedWorkbook", + 0, + [["displayUrl", + 2, + 3], + ["fileName", + 3, + 3], + ["id", + 2], + ["longErrorDescription", + 2, + 3], + ["refreshEnabled", + 2, + 3], + ["refreshing", + 2, + 3], + ["statusMessage", + 2, + 3], + ["excelIconState", + 2, + 3], + ["hardToFindErrorMessages", + 2, + 3], + ["lastUpdated", + 10, + 3]], + 0, + [["_RegisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["breakLinks"], + ["changeSource", + 1, + 0, + 3], + ["findNextLink", + 0, + 2, + 3, + 4], + ["openWorkbook", + 0, + 2, + 3, + 4], + ["refresh"], + ["openChangeSourceDialog", + 0, + 0, + 3], + ["closeChangeSourceDialog", + 0, + 0, + 3]], + 0, + 0, + 0, + [["RefreshCompleted", + 0, + 3, + "MessageType.linkedWorkbookRefreshCompletedEvent", + "this.id", + "_RegisterRefreshCompletedEvent", + "_UnregisterRefreshCompletedEvent"]]], + ["LinkedWorkbookCollection", + 1, + [["breakAllLinksEnabled", + 0, + 3], + ["refreshAllEnabled", + 0, + 3], + ["workbookLinksRefreshMode"], + ["workbookLinksRefreshSettings", + 0, + 3], + ["containsNonWorkbookLinks", + 0, + 3]], + 0, + [["_RegisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["_UnregisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["breakAllLinks"], + ["getCount", + 0, + 2, + 3, + 4], + ["refreshAll"], + ["openEditLinksDialog", + 0, + 2, + 3, + 4]], + [["getItem", + "LinkedWorkbook", + 1, + 18, + 0, + 4], + ["getItemAt", + "LinkedWorkbook", + 1, + 2, + 3, + 4], + ["getItemOrNullObject", + "LinkedWorkbook", + 1]], + 0, + "LinkedWorkbook", + [["WorkbookLinksChanged", + 0, + 3, + "MessageType.linkedWorkbookWorkbookLinksChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWorkbookLinksChangedEvent", + "_UnregisterWorkbookLinksChangedEvent"]]], + ["DocumentTaskChange", + 0, + [["type", + 2], + ["changedBy", + 2], + ["commentId", + 2], + ["createdDateTime", + 10], + ["id", + 2], + ["assignee", + 2], + ["undoChangeId", + 2], + ["priority", + 2], + ["title", + 2], + ["percentComplete", + 2], + ["startDateTime", + 10], + ["dueDateTime", + 10]], + 0, + 0, + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.DocumentTaskChange", + 4], + ["DocumentTaskChangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "DocumentTaskChange", + 1, + 2, + 0, + 4]], + 0, + "DocumentTaskChange"], + ["RangePicker", + 0, + 0, + 0, + [["activate", + 1, + 0, + 0, + 2, + 0, + 4], + ["deactivate", + 0, + 0, + 0, + 2, + 0, + 4], + ["updateSelection", + 1, + 0, + 0, + 2, + 0, + 4], + ["updateSelectionWithNavigation", + 4, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_UnregisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventDeactivated", + 0, + 2, + 0, + 4], + ["_UnregisterEventDeactivated", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Deactivated", + 0, + 0, + "MessageType.rangePickerDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventDeactivated", + "_UnregisterEventDeactivated"], + ["SelectionChanged", + 0, + 0, + "MessageType.rangePickerSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventSelectionChanged", + "_UnregisterEventSelectionChanged"]]], + ["DocumentTask", + 0, + [["startAndDueDateTime"], + ["id", + 2], + ["percentComplete"], + ["priority"], + ["title"], + ["assignees", + 2], + ["completedBy", + 2], + ["completedDateTime", + 10], + ["createdBy", + 2], + ["createdDateTime", + 10]], + [["changes", + "DocumentTaskChangeCollection", + 18, + 0, + 0, + 4], + ["comment", + "Comment", + 2, + 0, + 0, + 4]], + [["assign", + 1], + ["unassign", + 1], + ["unassignAll"]]], + ["DocumentTaskCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "DocumentTask", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DocumentTask", + 1, + 2, + 0, + 4], + ["getItemAt", + "DocumentTask", + 1, + 2, + 0, + 4]], + 0, + "DocumentTask"], + ["DataConnection", + 0, + [["connectionString", + 2], + ["name", + 2], + ["commandText", + 2], + ["dataSourceType", + 2]]], + ["Runtime", + 0, + [["enableEvents", + 1, + 5]]], + ["Application", + 0, + [["calculationMode", + 1], + ["calculationEngineVersion", + 3, + 6], + ["calculationState", + 3, + 6], + ["decimalSeparator", + 3, + 7], + ["thousandsSeparator", + 3, + 7], + ["useSystemSeparators", + 3, + 7], + ["formatStaleValues", + 1, + 8]], + [["iterativeCalculation", + "IterativeCalculation", + 35, + 6, + 0, + 4], + ["ribbon", + "Ribbon", + 35, + 6, + 0, + 4], + ["cultureInfo", + "CultureInfo", + 3, + 7, + 0, + 4], + ["undoScope", + "UndoScope", + 3, + 3, + 0, + 4]], + [["calculate", + 1], + ["suspendApiCalculationUntilNextSync", + 0, + 1, + 9, + 2, + 0, + 10], + ["suspendScreenUpdatingUntilNextSync", + 0, + 0, + 6, + 2, + 0, + 10], + ["hasLicense", + 1, + 2, + 8, + 4], + ["redo", + 0, + 0, + 3, + 2], + ["explorePremiumLicense", + 1, + 2, + 8, + 4], + ["undo", + 0, + 0, + 3, + 2], + ["_RegisterEventUndoChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventUndoChanged", + 0, + 2, + 3, + 4]], + [["createWorkbook", + "WorkbookCreated", + 1, + 10, + 5, + 0, + 0, + "_GetWorkbookCreatedById"], + ["_GetWorkbookCreatedById", + "WorkbookCreated", + 1, + 2, + 5, + 4]], + 0, + 0, + [["UndoChanged", + 0, + 3, + "MessageType.applicationUndoChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUndoChanged", + "_UnregisterEventUndoChanged"]]], + ["IterativeCalculation", + 0, + [["enabled", + 1], + ["maxIteration", + 1], + ["maxChange", + 1]]], + ["Workbook", + 0, + [["name", + 3, + 11], + ["readOnly", + 3, + 5], + ["isDirty", + 1, + 6], + ["use1904DateSystem", + 1, + 8], + ["chartDataPointTrack", + 1, + 6], + ["usePrecisionAsDisplayed", + 1, + 6], + ["calculationEngineVersion", + 3, + 6], + ["autoSave", + 3, + 6], + ["previouslySaved", + 3, + 6], + ["showPivotFieldList", + 0, + 8, + 0, + 2, + 12], + ["formulaReferenceStyle", + 2, + 3]], + [["worksheets", + "WorksheetCollection", + 19, + 0, + 0, + 4], + ["names", + "NamedItemCollection", + 19, + 0, + 0, + 4], + ["tables", + "TableCollection", + 19, + 0, + 0, + 4], + ["application", + "Application", + 2, + 0, + 0, + 4], + ["bindings", + "BindingCollection", + 19, + 0, + 0, + 4], + ["functions", + "Functions", + 2, + 13, + 0, + 4], + ["_V1Api", + "_V1Api", + 2, + 14, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 19, + 14, + 0, + 4], + ["settings", + "SettingCollection", + 19, + 15, + 0, + 4], + ["customXmlParts", + "CustomXmlPartCollection", + 19, + 16, + 0, + 4], + ["internalTest", + "InternalTest", + 2, + 9, + 0, + 4], + ["properties", + "DocumentProperties", + 35, + 11, + 0, + 4], + ["styles", + "StyleCollection", + 19, + 11, + 0, + 4], + ["protection", + "WorkbookProtection", + 3, + 11, + 0, + 4], + ["dataConnections", + "DataConnectionCollection", + 3, + 11, + 0, + 4], + ["_Runtime", + "Runtime", + 2, + 16, + 0, + 4], + ["comments", + "CommentCollection", + 19, + 17, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["tableStyles", + "TableStyleCollection", + 19, + 17, + 0, + 4], + ["pivotTableStyles", + "PivotTableStyleCollection", + 19, + 17, + 0, + 4], + ["slicerStyles", + "SlicerStyleCollection", + 19, + 17, + 0, + 4], + ["timelineStyles", + "TimelineStyleCollection", + 19, + 17, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["linkedDataTypes", + "LinkedDataTypeCollection", + 18, + 8, + 0, + 4], + ["queries", + "QueryCollection", + 18, + 18, + 0, + 4], + ["linkedWorkbooks", + "LinkedWorkbookCollection", + 18, + 19, + 0, + 4], + ["rangePicker", + "RangePicker", + 2, + 8, + 0, + 4, + 0, + 4], + ["lineageActivities", + "LineageActivityCollection", + 18, + 3, + 0, + 4], + ["businessBar", + "BusinessBar", + 2, + 8, + 0, + 4], + ["guidedReapply", + "GuidedReapplyManager", + 2, + 3, + 0, + 4], + ["vbaRecorder", + "VbaRecorder", + 2, + 8, + 0, + 4], + ["externalCodeService", + "ExternalCodeService", + 2, + 8, + 0, + 4], + ["augmentationLoop", + "AugmentationLoop", + 2, + 8, + 0, + 4]], + [["_RemoveReference", + 1, + 2], + ["_GetObjectByReferenceId", + 1, + 2, + 0, + 4], + ["_GetObjectTypeNameByReferenceId", + 1, + 2, + 0, + 4], + ["_RemoveAllReferences", + 0, + 2], + ["_GetReferenceCount", + 0, + 2, + 0, + 4], + ["getIsActiveCollabSession", + 0, + 0, + 6], + ["registerCustomFunctions", + 7, + 0, + 20, + 8], + ["_SetOsfControlContainerReadyForCustomFunctions", + 0, + 0, + 20], + ["close", + 1, + 0, + 7], + ["save", + 1, + 0, + 7], + ["_RegisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_UnregisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_RegisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_UnregisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_RegisterActivatedEvent", + 0, + 2, + 23], + ["_UnregisterActivatedEvent", + 0, + 2, + 23], + ["insertWorksheetsFromBase64", + 2, + 0, + 23], + ["enableOfficeScriptRecording", + 1, + 1, + 19], + ["recordAction", + 1, + 3, + 0, + 4], + ["focus", + 0, + 2, + 3, + 4], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["showHelp", + 1, + 2, + 3, + 4], + ["getLinkedEntityCellValue", + 1, + 2, + 24, + 4], + ["getThemeColors", + 0, + 2, + 8, + 4], + ["_RegisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["notifySDXLoaded", + 1, + 2, + 3, + 4], + ["openConditionalFormattingRulesManager", + 1, + 0, + 3], + ["openNameManager", + 0, + 0, + 3], + ["_RegisterEventActionRecorded", + 0, + 2, + 2, + 4], + ["_UnregisterEventActionRecorded", + 0, + 2, + 2, + 4]], + [["getSelectedRange", + "Range", + 0, + 10, + 0, + 4], + ["getActiveCell", + "Range", + 0, + 10, + 11, + 4], + ["_GetRangeForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["_GetRangeOrNullObjectForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["getActiveChart", + "Chart", + 0, + 2, + 6, + 4], + ["getActiveChartOrNullObject", + "Chart", + 0, + 2, + 6, + 4], + ["getSelectedRanges", + "RangeAreas", + 0, + 10, + 6, + 4], + ["_GetRangesForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["_GetRangesOrNullObjectForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["getActiveSlicer", + "Slicer", + 0, + 2, + 17, + 4], + ["getActiveSlicerOrNullObject", + "Slicer", + 0, + 2, + 17, + 4]], + 0, + 0, + [["ActionRecorded", + 0, + 2, + "MessageType.workbookActionRecordedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventActionRecorded", + "_UnregisterEventActionRecorded"], + ["Activated", + 0, + 23, + "MessageType.workbookActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["AutoSaveSettingChanged", + 0, + 6, + "MessageType.workbookAutoSaveSettingChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAutoSaveSettingChangedEvent", + "_UnregisterAutoSaveSettingChangedEvent"], + ["FormulaReferenceStyleChanged", + 0, + 3, + "MessageType.workbookFormulaReferenceStyleChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFormulaReferenceStyleChanged", + "_UnregisterEventFormulaReferenceStyleChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.workbookNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["RecordingStateChangedEvent", + 0, + 21, + "MessageType.recordingStateChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRecordingStateChangedEvent", + "_UnregisterRecordingStateChangedEvent"], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdDocumentSelectionChangedEvent", + "", + "", + ""], + ["WACOperationEvent", + 2, + 21, + "MessageType.wacoperationEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWACOperationEvent", + "_UnregisterWACOperationEvent"], + ["_Message", + 3, + 11, + "_CC.office10EventIdRichApiMessageEvent", + "", + "", + ""]]], + ["WorkbookProtection", + 0, + [["protected", + 3]], + 0, + [["protect", + 1], + ["unprotect", + 1]]], + ["WorkbookCreated", + 0, + [["id", + 3]], + 0, + [["open", + 0, + 2, + 0, + 4]]], + ["Worksheet", + 0, + [["name", + 1], + ["id", + 3], + ["position", + 1], + ["visibility", + 1], + ["tabColor", + 1, + 11, + 0, + 2, + 25], + ["standardWidth", + 1, + 11], + ["standardHeight", + 3, + 11], + ["showGridlines", + 5, + 5, + 0, + 2, + 26], + ["showHeadings", + 5, + 5], + ["enableCalculation", + 1, + 6], + ["tabId", + 3, + 18]], + [["charts", + "ChartCollection", + 83, + 0, + 0, + 4], + ["tables", + "TableCollection", + 83, + 0, + 0, + 4], + ["protection", + "WorksheetProtection", + 3, + 13, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 83, + 14, + 0, + 4], + ["names", + "NamedItemCollection", + 83, + 15, + 0, + 4], + ["freezePanes", + "WorksheetFreezePanes", + 3, + 11, + 0, + 4], + ["pageLayout", + "PageLayout", + 35, + 6, + 0, + 4], + ["visuals", + "VisualCollection", + 83, + 17, + 0, + 4], + ["shapes", + "ShapeCollection", + 83, + 6, + 0, + 4], + ["horizontalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["verticalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["comments", + "CommentCollection", + 83, + 17, + 0, + 4], + ["customProperties", + "WorksheetCustomPropertyCollection", + 19, + 27, + 0, + 4], + ["namedSheetViews", + "NamedSheetViewCollection", + 18, + 19, + 0, + 4], + ["optimization", + "WorksheetOptimization", + 2, + 8, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["visualTracker", + "VisualTracker", + 2, + 28, + 0, + 4], + ["rangeValuesPreview", + "RangeValuesPreview", + 66, + 8, + 0, + 4]], + [["delete"], + ["activate", + 0, + 2], + ["calculate", + 1, + 0, + 9], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_RegisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["replaceAll", + 3, + 0, + 6], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["showOutlineLevels", + 2, + 0, + 17], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getRange", + "Range", + 1, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRangeByIndexes", + "Range", + 4, + 10, + 11, + 4], + ["getPrevious", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getPreviousOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNext", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNextOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["_GetSheetById", + "Worksheet", + 1, + 2, + 11, + 4], + ["copy", + "Worksheet", + 2, + 0, + 11, + 0, + 0, + "_GetAnotherWorksheetById"], + ["_GetAnotherWorksheetById", + "Worksheet", + 1, + 0, + 11], + ["findAll", + "RangeAreas", + 2, + 10, + 6, + 4], + ["findAllOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getRanges", + "RangeAreas", + 1, + 10, + 6, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 0, + 3], + ["getRangeR1C1", + "Range", + 1, + 2, + 3, + 4], + ["getRangesR1C1", + "RangeAreas", + 1, + 2, + 3, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 0, + 3]], + "workbook.worksheets", + 0, + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "this.id", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 11, + "MessageType.worksheetDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "this.id", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "this.id", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "this.id", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "this.id", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.worksheetNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "this.id", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "this.id", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "this.id", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "this.id", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 11, + "MessageType.worksheetSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "this.id", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "this.id", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetCollection", + 1, + 0, + 0, + [["getCount", + 1, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 3, + 11], + ["_UnregisterAddedEvent", + 0, + 3, + 11], + ["_RegisterActivatedEvent", + 0, + 3, + 11], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 3, + 11], + ["_UnregisterDeletedEvent", + 0, + 3, + 11], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 3, + 6], + ["_UnregisterDataChangedEvent", + 0, + 3, + 6], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["addFromBase64", + 4, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 3, + 17], + ["_UnregisterRowSortedEvent", + 0, + 3, + 17], + ["_RegisterColumnSortedEvent", + 0, + 3, + 17], + ["_UnregisterColumnSortedEvent", + 0, + 3, + 17], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getItem", + "Worksheet", + 1, + 18, + 0, + 4], + ["add", + "Worksheet", + 1, + 8, + 0, + 2, + 0, + 0, + 29], + ["getActiveWorksheet", + "Worksheet", + 0, + 2, + 0, + 4], + ["getItemOrNullObject", + "Worksheet", + 1, + 2, + 15, + 4], + ["getFirst", + "Worksheet", + 1, + 10, + 16, + 4], + ["getLast", + "Worksheet", + 1, + 10, + 16, + 4]], + 0, + "Worksheet", + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 11, + "MessageType.worksheetAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 6, + "MessageType.worksheetDataChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 11, + "MessageType.worksheetDeletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["Moved", + 0, + 30, + "MessageType.worksheetMovedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventMoved", + "_UnregisterEventMoved"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 6, + "MessageType.worksheetSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetProtection", + 0, + [["protected", + 3], + ["options", + 3], + ["canPauseProtection", + 3, + 19], + ["isPasswordProtected", + 3, + 19], + ["isPaused", + 3, + 19], + ["savedOptions", + 3, + 19]], + [["allowEditRanges", + "AllowEditRangeCollection", + 19, + 19, + 0, + 4]], + [["protect", + 2, + 1], + ["unprotect", + 1], + ["checkPassword", + 1, + 2, + 19, + 4], + ["pauseProtection", + 1, + 0, + 19], + ["resumeProtection", + 0, + 0, + 19], + ["setPassword", + 1, + 0, + 19], + ["updateOptions", + 1, + 0, + 19]]], + ["WorksheetFreezePanes", + 0, + 0, + 0, + [["unfreeze"], + ["freezeAt", + 1], + ["freezeRows", + 1], + ["freezeColumns", + 1]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getLocationOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["Range", + 14, + [["numberFormat", + 5, + 0, + 0, + 2, + 31], + ["numberFormatLocal", + 1, + 11, + 0, + 2, + 31], + ["values", + 5, + 0, + 0, + 2, + 31], + ["text", + 3], + ["formulas", + 5, + 0, + 0, + 2, + 32], + ["formulasLocal", + 5, + 0, + 0, + 2, + 32], + ["rowIndex", + 3], + ["columnIndex", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["address", + 3], + ["addressLocal", + 3], + ["cellCount", + 3], + ["_ReferenceId", + 2], + ["valueTypes", + 3], + ["formulasR1C1", + 5, + 13], + ["hidden", + 3, + 13], + ["rowHidden", + 1, + 13, + 0, + 2, + 32], + ["columnHidden", + 1, + 13, + 0, + 2, + 32], + ["isEntireColumn", + 3, + 11], + ["isEntireRow", + 3, + 11], + ["hyperlink", + 1, + 11, + 0, + 2, + 33], + ["style", + 1, + 11, + 0, + 2, + 32], + ["linkedDataTypeState", + 3, + 6], + ["hasSpill", + 3, + 27], + ["top", + 3, + 17], + ["left", + 3, + 17], + ["height", + 3, + 17], + ["width", + 3, + 17], + ["savedAsArray", + 3, + 27], + ["numberFormatCategories", + 3, + 27], + ["valuesAsJson", + 5, + 24], + ["valuesAsJsonLocal", + 5, + 24], + ["addressR1C1", + 2, + 3]], + [["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["sort", + "RangeSort", + 3, + 13, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 9, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 5, + 0, + 4]], + [["clear", + 1, + 0, + 0, + 2, + 0, + 32], + ["delete", + 1, + 0, + 0, + 2, + 0, + 34], + ["select", + 0, + 2], + ["_KeepReference", + 0, + 2], + ["merge", + 1, + 0, + 13, + 2, + 0, + 32], + ["unmerge", + 0, + 0, + 13], + ["_ValidateArraySize", + 2, + 2, + 14, + 4], + ["calculate", + 0, + 0, + 9], + ["showCard", + 0, + 0, + 11], + ["getImage", + 0, + 2, + 11, + 4], + ["replaceAll", + 3, + 0, + 6, + 2, + 0, + 32], + ["copyFrom", + 4, + 0, + 6, + 2, + 0, + 26], + ["convertToLinkedDataType", + 2, + 0, + 6], + ["convertDataTypeToText", + 0, + 0, + 6], + ["setDirty", + 0, + 0, + 6], + ["getCellProperties", + 1, + 0, + 6], + ["getRowProperties", + 1, + 0, + 6], + ["getColumnProperties", + 1, + 0, + 6], + ["setCellProperties", + 1, + 0, + 6], + ["setRowProperties", + 1, + 0, + 6], + ["setColumnProperties", + 1, + 0, + 6], + ["autoFill", + 2, + 0, + 6], + ["showTeachingCallout", + 2, + 0, + 6], + ["flashFill", + 0, + 0, + 6], + ["group", + 1, + 0, + 17], + ["ungroup", + 1, + 0, + 17], + ["showGroupDetails", + 1, + 0, + 17], + ["hideGroupDetails", + 1, + 0, + 17], + ["moveTo", + 1, + 0, + 7, + 2, + 0, + 26], + ["getDataClassificationIds", + 0, + 2, + 19, + 4]], + [["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["insert", + "Range", + 1, + 8, + 0, + 2, + 0, + 0, + 34], + ["getEntireColumn", + "Range", + 0, + 10, + 0, + 4], + ["getEntireRow", + "Range", + 0, + 10, + 0, + 4], + ["getOffsetRange", + "Range", + 2, + 10, + 0, + 4], + ["getRow", + "Range", + 1, + 10, + 0, + 4], + ["getColumn", + "Range", + 1, + 10, + 0, + 4], + ["getIntersection", + "Range", + 1, + 10, + 0, + 4], + ["getBoundingRect", + "Range", + 1, + 10, + 0, + 4], + ["getLastCell", + "Range", + 0, + 10, + 0, + 4], + ["getLastColumn", + "Range", + 0, + 10, + 0, + 4], + ["getLastRow", + "Range", + 0, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRowsAbove", + "Range", + 1, + 11, + 14, + 4], + ["getRowsBelow", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsBefore", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsAfter", + "Range", + 1, + 11, + 14, + 4], + ["getResizedRange", + "Range", + 2, + 11, + 14, + 4], + ["getVisibleView", + "RangeView", + 0, + 2, + 14, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getSurroundingRegion", + "Range", + 0, + 10, + 11, + 4], + ["getAbsoluteResizedRange", + "Range", + 2, + 10, + 11, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 6, + 4], + ["find", + "Range", + 2, + 10, + 6, + 4], + ["findOrNullObject", + "Range", + 2, + 10, + 6, + 4], + ["removeDuplicates", + "RemoveDuplicatesResult", + 2, + 8, + 6, + 2, + 0, + 0, + 33], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpillingToRange", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParent", + "Range", + 0, + 10, + 27, + 4], + ["getSpillingToRangeOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParentOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getMergedAreas", + "RangeAreas", + 0, + 10, + 19, + 4], + ["getPivotTables", + "PivotTableScopedCollection", + 1, + 6, + 27, + 4], + ["getPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 18, + 4], + ["getDirectPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 27, + 4], + ["getDependents", + "WorkbookRangeAreas", + 0, + 10, + 35, + 4], + ["getDirectDependents", + "WorkbookRangeAreas", + 0, + 10, + 23, + 4], + ["getExtendedRange", + "Range", + 2, + 10, + 23, + 4], + ["getRangeEdge", + "Range", + 2, + 10, + 23, + 4], + ["getNumberFormatProperties", + "NumberFormatPropertyCollection", + 0, + 6, + 8, + 4], + ["getSurroundingDataRegion", + "Range", + 0, + 2, + 8, + 4], + ["getMergedAreasOrNullObject", + "RangeAreas", + 0, + 0, + 23, + 2, + 0, + 0, + 31]]], + ["RangeAreas", + 2, + [["_ReferenceId", + 2], + ["address", + 3], + ["addressLocal", + 3], + ["areaCount", + 3], + ["cellCount", + 3], + ["isEntireColumn", + 3], + ["isEntireRow", + 3], + ["style", + 1], + ["addressR1C1", + 2, + 3]], + [["areas", + "RangeCollection", + 19, + 0, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 0, + 0, + 4], + ["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2], + ["calculate"], + ["clear", + 1], + ["setDirty"], + ["copyFrom", + 4], + ["convertToLinkedDataType", + 2], + ["convertDataTypeToText"], + ["select", + 0, + 2, + 8]], + [["getEntireColumn", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getEntireRow", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getIntersection", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getOffsetRangeAreas", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 0, + 4], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 0, + 4]]], + ["WorkbookRangeAreas", + 2, + [["_ReferenceId", + 2], + ["addresses", + 3]], + [["ranges", + "RangeCollection", + 19, + 0, + 0, + 4], + ["areas", + "RangeAreasCollection", + 19, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2]], + [["getRangeAreasBySheet", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getRangeAreasOrNullObjectBySheet", + "RangeAreas", + 1, + 10, + 0, + 4]]], + ["RangeView", + 0, + [["numberFormat", + 1], + ["values", + 1], + ["text", + 3], + ["formulas", + 1], + ["formulasLocal", + 1], + ["formulasR1C1", + 1], + ["valueTypes", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["cellAddresses", + 3], + ["index", + 3], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["rows", + "RangeViewCollection", + 19, + 0, + 0, + 4]], + 0, + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["RangeViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "RangeView", + 1, + 2, + 0, + 4]], + 0, + "RangeView"], + ["SettingCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Setting", + 1, + 18, + 0, + 4], + ["add", + "Setting", + 2, + 9], + ["getItemOrNullObject", + "Setting", + 1, + 2, + 0, + 4]], + 0, + "Setting", + [["SettingsChanged", + 3, + 0, + "_CC.office10EventIdSettingsChangedEvent", + "", + "", + ""]]], + ["Setting", + 8, + [["key", + 3], + ["value", + 5], + ["_Id", + 2]], + 0, + [["delete"]]], + ["NamedItemCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "NamedItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "NamedItem", + 1, + 2, + 15, + 4], + ["add", + "NamedItem", + 3, + 8, + 15], + ["addFormulaLocal", + "NamedItem", + 3, + 0, + 15]], + 0, + "NamedItem", + [["Added", + 0, + 3, + "MessageType.namedItemAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.namedItemDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["NamedItem", + 0, + [["name", + 3], + ["type", + 3], + ["value", + 3], + ["visible", + 1], + ["_Id", + 2], + ["comment", + 1, + 15], + ["scope", + 3, + 15], + ["formula", + 1, + 11], + ["valueAsJson", + 3, + 24], + ["valueAsJsonLocal", + 3, + 24]], + [["worksheet", + "Worksheet", + 2, + 15, + 0, + 4], + ["worksheetOrNullObject", + "Worksheet", + 2, + 15, + 0, + 4], + ["arrayValues", + "NamedItemArrayValues", + 3, + 11, + 0, + 4]], + [["delete", + 0, + 0, + 15]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 15, + 4]]], + ["NamedItemArrayValues", + 0, + [["values", + 3], + ["types", + 3], + ["valuesAsJson", + 3, + 24], + ["valuesAsJsonLocal", + 3, + 24]]], + ["Binding", + 0, + [["id", + 3], + ["type", + 3]], + 0, + [["getText", + 0, + 2, + 0, + 4], + ["delete", + 0, + 0, + 14]], + [["getTable", + "Table", + 0, + 2, + 0, + 4], + ["getRange", + "Range", + 0, + 2, + 0, + 4]], + 0, + 0, + [["DataChanged", + 3, + 14, + "_CC.office10EventIdBindingDataChangedEvent", + "this.id", + "", + ""], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdBindingSelectionChangedEvent", + "this.id", + "", + ""]]], + ["BindingCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "Binding", + 1, + 18, + 0, + 4], + ["getItemAt", + "Binding", + 1, + 2, + 0, + 4], + ["add", + "Binding", + 3, + 8, + 14], + ["addFromNamedItem", + "Binding", + 3, + 0, + 14], + ["addFromSelection", + "Binding", + 2, + 0, + 14], + ["getItemOrNullObject", + "Binding", + 1, + 2, + 15, + 4]], + 0, + "Binding"], + ["TableCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1]], + [["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemAt", + "Table", + 1, + 2, + 0, + 4], + ["add", + "Table", + 2, + 8, + 0, + 2, + 0, + 0, + 33], + ["getItemOrNullObject", + "Table", + 1, + 2, + 15, + 4], + ["addQueryTable", + "Table", + 2, + 0, + 8]], + 0, + "Table", + [["Added", + 0, + 6, + "MessageType.tableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this._eventTargetId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Deleted", + 0, + 6, + "MessageType.tableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this._eventTargetId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"]]], + ["TableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getFirst", + "Table", + 0, + 10, + 0, + 4], + ["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Table", + 1, + 2, + 18, + 4]], + 0, + "Table"], + ["Table", + 24, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 26], + ["showHeaders", + 1, + 0, + 0, + 2, + 33], + ["showTotals", + 1, + 0, + 0, + 2, + 33], + ["style", + 1, + 0, + 0, + 2, + 33], + ["highlightFirstColumn", + 1, + 14, + 0, + 2, + 33], + ["highlightLastColumn", + 1, + 14, + 0, + 2, + 33], + ["showBandedRows", + 1, + 14, + 0, + 2, + 33], + ["showBandedColumns", + 1, + 14, + 0, + 2, + 33], + ["showFilterButton", + 1, + 14, + 0, + 2, + 33], + ["legacyId", + 3, + 5]], + [["columns", + "TableColumnCollection", + 19, + 0, + 0, + 4], + ["rows", + "TableRowCollection", + 19, + 0, + 0, + 4], + ["sort", + "TableSort", + 3, + 13, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["tableStyle", + "TableStyle", + 35, + 8, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearFilters", + 0, + 0, + 13], + ["reapplyFilters", + 0, + 0, + 13, + 2, + 0, + 26], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["clearStyle", + 0, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["resize", + 1, + 0, + 23, + 2, + 0, + 26], + ["setStyle", + 1, + 0, + 8]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4], + ["convertToRange", + "Range", + 0, + 8, + 13, + 2, + 0, + 0, + 26]], + "workbook.tables", + 0, + [["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["SelectionChanged", + 2, + 11, + "MessageType.tableSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["TableColumnCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "TableColumn", + 1, + 18, + 0, + 4], + ["getItemAt", + "TableColumn", + 1, + 2, + 0, + 4], + ["add", + "TableColumn", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["getItemOrNullObject", + "TableColumn", + 1, + 2, + 15, + 4], + ["addAsJson", + "TableColumn", + 3, + 0, + 24]], + 0, + "TableColumn"], + ["TableColumn", + 0, + [["id", + 3], + ["index", + 3], + ["values", + 1], + ["name", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["filter", + "Filter", + 3, + 13, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4]]], + ["TableRowCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["deleteRows", + 1, + 0, + 19], + ["deleteRowsAt", + 2, + 0, + 19, + 2, + 0, + 26]], + [["getItemAt", + "TableRow", + 1, + 2, + 0, + 4], + ["add", + "TableRow", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["addAsJson", + "TableRow", + 3, + 0, + 24]], + 0, + "TableRow"], + ["TableRow", + 0, + [["index", + 3], + ["values", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + 0, + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["DataValidation", + 0, + [["type", + 3], + ["rule", + 1], + ["prompt", + 1], + ["errorAlert", + 1], + ["ignoreBlanks", + 1], + ["valid", + 3]], + 0, + [["clear"]], + [["getInvalidCells", + "RangeAreas", + 0, + 10, + 6, + 4], + ["getInvalidCellsOrNullObject", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["RemoveDuplicatesResult", + 0, + [["removed", + 3], + ["uniqueRemaining", + 3]]], + ["RangeFormat", + 0, + [["wrapText", + 1, + 0, + 0, + 2, + 32], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 32], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 32], + ["columnWidth", + 1, + 13, + 0, + 2, + 32], + ["rowHeight", + 1, + 13, + 0, + 2, + 32], + ["textOrientation", + 1, + 11, + 0, + 2, + 32], + ["useStandardHeight", + 1, + 11], + ["useStandardWidth", + 1, + 11], + ["readingOrder", + 1, + 6], + ["shrinkToFit", + 1, + 6], + ["indentLevel", + 1, + 6, + 0, + 2, + 32], + ["autoIndent", + 1, + 6]], + [["fill", + "RangeFill", + 35, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["protection", + "FormatProtection", + 35, + 13, + 0, + 4]], + [["autofitColumns", + 0, + 0, + 13, + 2, + 0, + 32], + ["autofitRows", + 0, + 0, + 13, + 2, + 0, + 32], + ["adjustIndent", + 1, + 0, + 7, + 2, + 0, + 34]]], + ["FormatProtection", + 0, + [["locked", + 1], + ["formulaHidden", + 1]]], + ["RangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6], + ["patternTintAndShade", + 1, + 6], + ["pattern", + 1, + 6], + ["patternColor", + 1, + 6]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 32]]], + ["RangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 32], + ["weight", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6]]], + ["RangeBorderCollection", + 1, + [["count", + 3], + ["tintAndShade", + 1, + 6]], + 0, + 0, + [["getItem", + "RangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "RangeBorder", + 1, + 2, + 0, + 4]], + 0, + "RangeBorder"], + ["RangeFont", + 0, + [["name", + 1, + 0, + 0, + 2, + 32], + ["size", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 12], + ["italic", + 1, + 0, + 0, + 2, + 32], + ["bold", + 1, + 0, + 0, + 2, + 32], + ["underline", + 1, + 0, + 0, + 2, + 32], + ["strikethrough", + 1, + 6, + 0, + 2, + 32], + ["subscript", + 1, + 6], + ["superscript", + 1, + 6], + ["tintAndShade", + 1, + 6]]], + ["ChartCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29]], + [["add", + "Chart", + 3, + 9, + 0, + 2, + 0, + 0, + 36], + ["getItemAt", + "Chart", + 1, + 2, + 0, + 4], + ["_GetItem", + "Chart", + 1, + 18, + 0, + 4], + ["getItem", + "Chart", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Chart", + 1, + 2, + 15, + 4]], + 0, + "Chart", + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this._ParentObject.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 5, + "MessageType.chartAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this._ParentObject.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 5, + "MessageType.chartDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Chart", + 0, + [["name", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 36], + ["left", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["height", + 1, + 0, + 0, + 2, + 36], + ["id", + 3, + 11], + ["showAllFieldButtons", + 1, + 11, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 37], + ["showDataLabelsOverMaximum", + 1, + 5, + 0, + 2, + 37], + ["categoryLabelLevel", + 1, + 5, + 0, + 2, + 37], + ["style", + 1, + 5, + 0, + 2, + 37], + ["displayBlanksAs", + 1, + 5, + 0, + 2, + 37], + ["plotBy", + 1, + 5, + 0, + 2, + 37], + ["plotVisibleOnly", + 1, + 5, + 0, + 2, + 37], + ["seriesNameLevel", + 1, + 5, + 0, + 2, + 37]], + [["title", + "ChartTitle", + 35, + 0, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 0, + 0, + 4], + ["legend", + "ChartLegend", + 35, + 0, + 0, + 4], + ["series", + "ChartSeriesCollection", + 19, + 0, + 0, + 4], + ["axes", + "ChartAxes", + 35, + 0, + 0, + 4], + ["format", + "ChartAreaFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["plotArea", + "ChartPlotArea", + 35, + 5, + 0, + 4], + ["pivotOptions", + "ChartPivotOptions", + 35, + 6, + 0, + 4]], + [["setData", + 2, + 1, + 0, + 2, + 0, + 36], + ["delete", + 0, + 0, + 0, + 2, + 0, + 36], + ["setPosition", + 2, + 0, + 0, + 2, + 0, + 36], + ["getImage", + 3, + 2, + 13, + 4], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["activate", + 0, + 2, + 6], + ["getDataRange", + 0, + 0, + 28], + ["getDataRangeOrNullObject", + 0, + 0, + 28]], + [["getDataTable", + "ChartDataTable", + 0, + 2, + 18, + 4], + ["getDataTableOrNullObject", + "ChartDataTable", + 0, + 2, + 18, + 4]], + 0, + 0, + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["ChartPivotOptions", + 0, + [["showAxisFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showLegendFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showReportFilterFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showValueFieldButtons", + 1, + 0, + 0, + 2, + 37]]], + ["ChartAreaFormat", + 0, + [["roundedCorners", + 1, + 6, + 0, + 2, + 37], + ["colorScheme", + 1, + 6, + 0, + 2, + 37]], + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartSeriesCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartSeries", + 1, + 2, + 0, + 4], + ["add", + "ChartSeries", + 2, + 8, + 11, + 2, + 0, + 0, + 36]], + 0, + "ChartSeries"], + ["ChartSeries", + 0, + [["name", + 1, + 0, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 10], + ["hasDataLabels", + 1, + 11, + 0, + 2, + 37], + ["filtered", + 1, + 11, + 0, + 2, + 37], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["showShadow", + 1, + 11, + 0, + 2, + 37], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36], + ["smooth", + 1, + 11, + 0, + 2, + 37], + ["plotOrder", + 1, + 11, + 0, + 2, + 37], + ["gapWidth", + 1, + 11, + 0, + 2, + 36], + ["doughnutHoleSize", + 1, + 11, + 0, + 2, + 36], + ["axisGroup", + 1, + 5, + 0, + 2, + 36], + ["explosion", + 1, + 5, + 0, + 2, + 37], + ["firstSliceAngle", + 1, + 5, + 0, + 2, + 37], + ["invertIfNegative", + 1, + 5, + 0, + 2, + 37], + ["bubbleScale", + 1, + 6, + 0, + 2, + 37], + ["secondPlotSize", + 1, + 5, + 0, + 2, + 37], + ["splitType", + 1, + 5, + 0, + 2, + 37], + ["splitValue", + 1, + 6, + 0, + 2, + 37], + ["varyByCategories", + 1, + 5, + 0, + 2, + 37], + ["showLeaderLines", + 1, + 6, + 0, + 2, + 37], + ["overlap", + 1, + 5, + 0, + 2, + 36], + ["gradientStyle", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointType", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumColor", + 1, + 6, + 0, + 2, + 37], + ["parentLabelStrategy", + 1, + 6, + 0, + 2, + 37], + ["showConnectorLines", + 1, + 6, + 0, + 2, + 37], + ["invertColor", + 1, + 6, + 0, + 2, + 37]], + [["points", + "ChartPointsCollection", + 19, + 0, + 0, + 4], + ["format", + "ChartSeriesFormat", + 35, + 0, + 0, + 4], + ["trendlines", + "ChartTrendlineCollection", + 19, + 11, + 0, + 4], + ["xErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["yErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 5, + 0, + 4], + ["binOptions", + "ChartBinOptions", + 35, + 6, + 0, + 4], + ["mapOptions", + "ChartMapOptions", + 35, + 6, + 0, + 4], + ["boxwhiskerOptions", + "ChartBoxwhiskerOptions", + 35, + 6, + 0, + 4]], + [["delete", + 0, + 0, + 11, + 2, + 0, + 36], + ["setXAxisValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setBubbleSizes", + 1, + 0, + 11, + 2, + 0, + 37], + ["getDimensionValues", + 1, + 0, + 27, + 2, + 0, + 37], + ["getDimensionDataSourceString", + 1, + 0, + 35], + ["getDimensionDataSourceType", + 1, + 0, + 35]]], + ["ChartSeriesFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartPointsCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartPoint", + 1, + 2, + 0, + 4]], + 0, + "ChartPoint"], + ["ChartPoint", + 0, + [["value", + 3], + ["hasDataLabel", + 1, + 11, + 0, + 2, + 37], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36]], + [["format", + "ChartPointFormat", + 35, + 0, + 0, + 4], + ["dataLabel", + "ChartDataLabel", + 35, + 11, + 0, + 4]]], + ["ChartPointFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartAxes", + 0, + 0, + [["categoryAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["seriesAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["valueAxis", + "ChartAxis", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ChartAxis", + 2, + 2, + 11, + 4]]], + ["ChartAxis", + 0, + [["majorUnit", + 1, + 0, + 0, + 2, + 37], + ["maximum", + 1, + 0, + 0, + 2, + 36], + ["minimum", + 1, + 0, + 0, + 2, + 36], + ["minorUnit", + 1, + 0, + 0, + 2, + 37], + ["displayUnit", + 1, + 11, + 0, + 2, + 36], + ["showDisplayUnitLabel", + 1, + 11, + 0, + 2, + 37], + ["customDisplayUnit", + 3, + 11], + ["type", + 3, + 11], + ["minorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["majorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["baseTimeUnit", + 1, + 11, + 0, + 2, + 37], + ["categoryType", + 1, + 11, + 0, + 2, + 37], + ["axisGroup", + 3, + 11], + ["scaleType", + 1, + 11, + 0, + 2, + 37], + ["logBase", + 1, + 11, + 0, + 2, + 37], + ["left", + 3, + 11], + ["top", + 3, + 11], + ["height", + 3, + 11], + ["width", + 3, + 11], + ["reversePlotOrder", + 1, + 11, + 0, + 2, + 36], + ["crosses", + 1, + 11, + 0, + 2, + 36], + ["crossesAt", + 3, + 11], + ["visible", + 1, + 11, + 0, + 2, + 37], + ["isBetweenCategories", + 1, + 5, + 0, + 2, + 36], + ["majorTickMark", + 1, + 11, + 0, + 2, + 37], + ["minorTickMark", + 1, + 11, + 0, + 2, + 37], + ["tickMarkSpacing", + 1, + 11, + 0, + 2, + 37], + ["tickLabelPosition", + 1, + 11, + 0, + 2, + 36], + ["tickLabelSpacing", + 1, + 11, + 0, + 2, + 37], + ["alignment", + 1, + 5, + 0, + 2, + 37], + ["multiLevel", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["offset", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["position", + 1, + 5, + 0, + 2, + 36], + ["positionAt", + 3, + 5]], + [["majorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["minorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["title", + "ChartAxisTitle", + 35, + 0, + 0, + 4], + ["format", + "ChartAxisFormat", + 35, + 0, + 0, + 4]], + [["setCategoryNames", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCustomDisplayUnit", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCrossesAt", + 1, + 0, + 11, + 2, + 0, + 37], + ["setPositionAt", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4]]], + ["ChartAxisTitle", + 0, + [["text", + 1, + 0, + 0, + 2, + 36], + ["visible", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 27, + 0, + 2, + 37]], + [["format", + "ChartAxisTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataLabels", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataLabel", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 5, + 0, + 2, + 37], + ["left", + 1, + 5, + 0, + 2, + 37], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["formula", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["text", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 5, + 0, + 4]], + 0, + [["getSubstring", + "ChartFormatString", + 2, + 2, + 8, + 4]]], + ["ChartDataLabelFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataTable", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showHorizontalBorder", + 1, + 0, + 0, + 2, + 37], + ["showVerticalBorder", + 1, + 0, + 0, + 2, + 37], + ["showOutlineBorder", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartDataTableFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataTableFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4]]], + ["ChartErrorBars", + 0, + [["endStyleCap", + 1, + 0, + 0, + 2, + 37], + ["include", + 1, + 0, + 0, + 2, + 37], + ["type", + 1, + 0, + 0, + 2, + 37], + ["visible", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartErrorBarsFormat", + 35, + 0, + 0, + 4]]], + ["ChartErrorBarsFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlines", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36]], + [["format", + "ChartGridlinesFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlinesFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartLegend", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36], + ["position", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["width", + 1, + 11, + 0, + 2, + 37], + ["height", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartLegendFormat", + 35, + 0, + 0, + 4], + ["legendEntries", + "ChartLegendEntryCollection", + 19, + 11, + 0, + 4]]], + ["ChartLegendEntry", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["left", + 3, + 5], + ["top", + 3, + 5], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["index", + 3, + 5]]], + ["ChartLegendEntryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "ChartLegendEntry", + 1, + 2, + 0, + 4]], + 0, + "ChartLegendEntry"], + ["ChartLegendFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartMapOptions", + 0, + [["level", + 1, + 0, + 0, + 2, + 37], + ["labelStrategy", + 1, + 0, + 0, + 2, + 37], + ["projectionType", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTitle", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["width", + 3, + 11], + ["height", + 3, + 11], + ["verticalAlignment", + 1, + 11, + 0, + 2, + 37], + ["textOrientation", + 1, + 11, + 0, + 2, + 37], + ["position", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 11, + 2, + 0, + 37]], + [["getSubstring", + "ChartFormatString", + 2, + 2, + 11, + 4]]], + ["ChartFormatString", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartFill", + 4, + 0, + 0, + [["setSolidColor", + 1, + 0, + 0, + 2, + 0, + 36], + ["clear", + 0, + 0, + 0, + 2, + 0, + 37], + ["getSolidColor", + 0, + 0, + 24, + 2, + 0, + 37]]], + ["ChartBorder", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 0, + 0, + 2, + 36], + ["weight", + 1, + 0, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 5, + 2, + 0, + 37]]], + ["ChartBinOptions", + 0, + [["type", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["count", + 1, + 0, + 0, + 2, + 36], + ["allowOverflow", + 1, + 0, + 0, + 2, + 37], + ["allowUnderflow", + 1, + 0, + 0, + 2, + 37], + ["overflowValue", + 1, + 0, + 0, + 2, + 36], + ["underflowValue", + 1, + 0, + 0, + 2, + 36]]], + ["ChartBoxwhiskerOptions", + 0, + [["showInnerPoints", + 1, + 0, + 0, + 2, + 37], + ["showOutlierPoints", + 1, + 0, + 0, + 2, + 37], + ["showMeanMarker", + 1, + 0, + 0, + 2, + 37], + ["showMeanLine", + 1, + 0, + 0, + 2, + 37], + ["quartileCalculation", + 1, + 0, + 0, + 2, + 37]]], + ["ChartLineFormat", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 11, + 0, + 2, + 36], + ["weight", + 1, + 11, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartFont", + 0, + [["bold", + 1, + 0, + 0, + 2, + 37], + ["color", + 1, + 0, + 0, + 2, + 36], + ["italic", + 1, + 0, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["size", + 1, + 0, + 0, + 2, + 37], + ["underline", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTrendline", + 0, + [["type", + 1, + 0, + 0, + 2, + 37], + ["polynomialOrder", + 1, + 0, + 0, + 2, + 37], + ["movingAveragePeriod", + 1, + 0, + 0, + 2, + 37], + ["_Id", + 2], + ["showEquation", + 1, + 5, + 0, + 2, + 37], + ["showRSquared", + 1, + 5, + 0, + 2, + 37], + ["forwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["backwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["intercept", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartTrendlineFormat", + 35, + 0, + 0, + 4], + ["label", + "ChartTrendlineLabel", + 35, + 5, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartTrendlineCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "ChartTrendline", + 1, + 8, + 0, + 2, + 0, + 0, + 36], + ["getItem", + "ChartTrendline", + 1, + 18, + 0, + 4]], + 0, + "ChartTrendline"], + ["ChartTrendlineFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabel", + 0, + [["top", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 0, + 0, + 2, + 37], + ["width", + 3], + ["height", + 3], + ["formula", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 37], + ["autoText", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 0, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37]], + [["format", + "ChartTrendlineLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabelFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartPlotArea", + 0, + [["left", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 37], + ["width", + 1, + 0, + 0, + 2, + 37], + ["height", + 1, + 0, + 0, + 2, + 37], + ["insideLeft", + 1, + 0, + 0, + 2, + 37], + ["insideTop", + 1, + 0, + 0, + 2, + 37], + ["insideWidth", + 1, + 0, + 0, + 2, + 37], + ["insideHeight", + 1, + 0, + 0, + 2, + 37], + ["position", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartPlotAreaFormat", + 35, + 0, + 0, + 4]]], + ["ChartPlotAreaFormat", + 0, + 0, + [["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4]]], + ["VisualCollection", + 5, + 0, + 0, + [["getDefinitions", + 0, + 2, + 0, + 4], + ["getPreview", + 4, + 2, + 0, + 4], + ["bootstrapAgaveVisual", + 0, + 0, + 0, + 2], + ["getCount", + 0, + 2, + 0, + 4], + ["_RegisterSelectionChangedEvent", + 0, + 2], + ["_UnregisterSelectionChangedEvent", + 0, + 2]], + [["add", + "Visual", + 3, + 8, + 0, + 2], + ["_GetItem", + "Visual", + 1, + 18, + 0, + 4], + ["getSelectedOrNullObject", + "Visual", + 0, + 2, + 0, + 4]], + 0, + "Visual", + [["AgaveVisualUpdate", + 2, + 0, + "MessageType.agaveVisualUpdateEvent", + "", + "null", + "null"], + ["SelectionChanged", + 0, + 0, + "MessageType.visualSelectionChangedEvent", + "this._ParentObject.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["Visual", + 0, + [["id", + 3], + ["isSupportedInVisualTaskpane", + 3]], + [["properties", + "VisualPropertyCollection", + 18, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2], + ["getProperty", + 1, + 2, + 0, + 4], + ["setProperty", + 2, + 0, + 0, + 2], + ["changeDataSource", + 2, + 0, + 0, + 2], + ["getDataSource", + 0, + 2, + 0, + 4], + ["setPropertyToDefault", + 1, + 0, + 0, + 2], + ["_RegisterChangeEvent", + 0, + 2], + ["_UnregisterChangeEvent", + 0, + 2], + ["serializeProperties", + 0, + 2, + 0, + 4], + ["deserializeProperties", + 1, + 0, + 0, + 2], + ["addChildProperty", + 2, + 0, + 19, + 2], + ["removeChildProperty", + 2, + 0, + 19, + 2], + ["getDataFieldAssignments", + 0, + 0, + 3], + ["getDataConfig", + 0, + 2, + 3, + 4], + ["modifyDataConfig", + 1, + 0, + 3, + 2]], + [["getChildProperties", + "VisualPropertyCollection", + 2, + 6, + 0, + 4], + ["getDataControllerClient", + "DataControllerClient", + 0, + 2, + 0, + 4], + ["getElementChildProperties", + "VisualPropertyCollection", + 3, + 6, + 0, + 4]], + 0, + 0, + [["ChangeNotification", + 2, + 0, + "MessageType.visualChangeEvent", + "this.id", + "_RegisterChangeEvent", + "_UnregisterChangeEvent"]]], + ["VisualProperty", + 0, + [["type", + 3], + ["value", + 3], + ["id", + 3], + ["localizedName", + 3], + ["options", + 3], + ["localizedOptions", + 3], + ["hasDefault", + 3], + ["isDefault", + 3], + ["min", + 3], + ["max", + 3], + ["stepSize", + 3], + ["hideMeButShowChildrenUI", + 3], + ["expandableUI", + 3], + ["nextPropOnSameLine", + 3], + ["showResetUI", + 3], + ["size", + 3, + 19], + ["minSize", + 3, + 19], + ["maxSize", + 3, + 19], + ["index", + 3, + 19], + ["parentName", + 3, + 19]], + 0, + [["getBoolMetaProperty", + 1, + 2, + 0, + 4]]], + ["VisualPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "VisualProperty", + 1, + 18, + 0, + 4], + ["getItemAt", + "VisualProperty", + 1, + 2, + 0, + 4]], + 0, + "VisualProperty"], + ["DataControllerClient", + 0, + 0, + 0, + [["getWells", + 0, + 2, + 0, + 4], + ["getAssociatedFields", + 1, + 2, + 0, + 4], + ["getAvailableFields", + 1, + 2, + 0, + 4], + ["addField", + 3, + 0, + 0, + 2], + ["removeField", + 2, + 0, + 0, + 2], + ["moveField", + 3, + 0, + 0, + 2]]], + ["RangeSort", + 0, + 0, + 0, + [["apply", + 5, + 0, + 0, + 2, + 0, + 32]]], + ["TableSort", + 0, + [["matchCase", + 3], + ["method", + 3], + ["fields", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 26], + ["clear"], + ["reapply"]]], + ["Filter", + 0, + [["criteria", + 3]], + 0, + [["apply", + 1], + ["clear", + 0, + 0, + 0, + 2, + 0, + 34], + ["applyBottomItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyBottomPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCellColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyDynamicFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyFontColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyValuesFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyIconFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCustomFilter", + 3, + 0, + 0, + 2, + 0, + 34]]], + ["AutoFilter", + 0, + [["enabled", + 3], + ["isDataFiltered", + 3], + ["criteria", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 33], + ["reapply", + 0, + 0, + 0, + 2, + 0, + 26], + ["remove", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearCriteria", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearColumnCriteria", + 1, + 0, + 18]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["CultureInfo", + 0, + [["name", + 3]], + [["numberFormat", + "NumberFormatInfo", + 3, + 0, + 0, + 4], + ["datetimeFormat", + "DatetimeFormatInfo", + 3, + 27, + 0, + 4]]], + ["NumberFormatInfo", + 0, + [["numberDecimalSeparator", + 3], + ["numberGroupSeparator", + 3], + ["currencySymbol", + 3, + 30]]], + ["DatetimeFormatInfo", + 0, + [["dateSeparator", + 3], + ["longDatePattern", + 3], + ["shortDatePattern", + 3], + ["timeSeparator", + 3], + ["longTimePattern", + 3]]], + ["CustomXmlPartScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4], + ["getOnlyItem", + "CustomXmlPart", + 0, + 2, + 0, + 4], + ["getOnlyItemOrNullObject", + "CustomXmlPart", + 0, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPartCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["add", + "CustomXmlPart", + 1, + 8], + ["getByNamespace", + "CustomXmlPartScopedCollection", + 1, + 6, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPart", + 0, + [["id", + 3], + ["namespaceUri", + 3]], + 0, + [["delete"], + ["getXml", + 0, + 2, + 0, + 4], + ["setXml", + 1]]], + ["_V1Api", + 0, + 0, + 0, + [["bindingGetData", + 1, + 2, + 0, + 4], + ["getSelectedData", + 1, + 2, + 0, + 4], + ["gotoById", + 1, + 2, + 0, + 4], + ["bindingAddFromSelection", + 1, + 2], + ["bindingGetById", + 1, + 2, + 0, + 4], + ["bindingReleaseById", + 1, + 2], + ["bindingGetAll", + 0, + 2, + 0, + 4], + ["bindingAddFromNamedItem", + 1, + 2], + ["bindingAddFromPrompt", + 1, + 2], + ["bindingDeleteAllDataValues", + 1], + ["setSelectedData", + 1], + ["bindingClearFormats", + 1], + ["bindingSetData", + 1], + ["bindingSetFormats", + 1], + ["bindingSetTableOptions", + 1], + ["bindingAddRows", + 1], + ["bindingAddColumns", + 1], + ["getFilePropertiesAsync", + 0, + 2, + 9, + 4]]], + ["PivotTableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getFirst", + "PivotTable", + 0, + 10, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 0, + 4], + ["getFirstOrNullObject", + "PivotTable", + 0, + 2, + 35, + 4]], + 0, + "PivotTable"], + ["PivotTableCollection", + 5, + 0, + 0, + [["refreshAll", + 0, + 0, + 0, + 2, + 0, + 12], + ["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 15, + 4], + ["add", + "PivotTable", + 3, + 8, + 5, + 2, + 0, + 0, + 12]], + 0, + "PivotTable", + [["Added", + 0, + 3, + "MessageType.pivotTableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.pivotTableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["PivotTable", + 0, + [["name", + 1, + 0, + 0, + 2, + 12], + ["id", + 3, + 16], + ["useCustomSortLists", + 1, + 6, + 0, + 2, + 12], + ["enableDataValueEditing", + 1, + 6, + 0, + 2, + 12], + ["refreshOnOpen", + 0, + 23, + 0, + 2, + 29], + ["allowMultipleFiltersPerField", + 0, + 27, + 0, + 2, + 12]], + [["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["hierarchies", + "PivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["rowHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["columnHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["dataHierarchies", + "DataPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["filterHierarchies", + "FilterPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["layout", + "PivotLayout", + 2, + 5, + 0, + 4]], + [["refresh", + 0, + 0, + 0, + 2, + 0, + 12], + ["delete", + 0, + 0, + 5, + 2, + 0, + 12], + ["getDataSourceString", + 0, + 2, + 35, + 4], + ["getDataSourceType", + 0, + 2, + 35, + 4]], + [["addDateGroup", + "PivotHierarchy", + 2, + 0, + 8, + 2, + 0, + 0, + 38]]], + ["PivotLayout", + 0, + [["showColumnGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["showRowGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["enableFieldList", + 1, + 17, + 0, + 2, + 12], + ["subtotalLocation", + 1, + 0, + 0, + 2, + 12], + ["layoutType", + 1, + 0, + 0, + 2, + 12], + ["autoFormat", + 1, + 6, + 0, + 2, + 12], + ["preserveFormatting", + 1, + 6, + 0, + 2, + 12], + ["altTextDescription", + 0, + 23, + 0, + 2, + 29], + ["altTextTitle", + 0, + 23, + 0, + 2, + 29], + ["emptyCellText", + 0, + 23, + 0, + 2, + 29], + ["fillEmptyCells", + 0, + 23, + 0, + 2, + 29], + ["showFieldHeaders", + 0, + 23, + 0, + 2, + 29], + ["tabularValues", + 3, + 8], + ["tabularText", + 3, + 8], + ["tabularNumberFormat", + 3, + 8], + ["tabularNumberFormatLocal", + 3, + 8]], + [["pivotStyle", + "PivotTableStyle", + 35, + 8, + 0, + 4]], + [["setAutoSortOnCell", + 2, + 0, + 6, + 2, + 0, + 12], + ["setStyle", + 1, + 0, + 8, + 2, + 0, + 12], + ["displayBlankLineAfterEachItem", + 1, + 0, + 23, + 2, + 0, + 29], + ["repeatAllItemLabels", + 1, + 0, + 23, + 2, + 0, + 29]], + [["getRange", + "Range", + 0, + 3], + ["getRowLabelRange", + "Range", + 0, + 3], + ["getColumnLabelRange", + "Range", + 0, + 3], + ["getFilterAxisRange", + "Range", + 0, + 3], + ["getDataBodyRange", + "Range", + 0, + 3], + ["getCell", + "Range", + 3, + 2, + 8], + ["getPivotItems", + "PivotItemCollection", + 2, + 4, + 6], + ["getDataHierarchy", + "DataPivotHierarchy", + 1, + 3, + 6]]], + ["PivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotHierarchy", + 1, + 2, + 0, + 4]], + 0, + "PivotHierarchy"], + ["PivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]]], + ["RowColumnPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "RowColumnPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "RowColumnPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "RowColumnPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "RowColumnPivotHierarchy"], + ["RowColumnPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["FilterPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "FilterPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "FilterPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "FilterPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "FilterPivotHierarchy"], + ["FilterPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["enableMultipleFilterItems", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["DataPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "DataPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DataPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "DataPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "DataPivotHierarchy"], + ["DataPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["numberFormat", + 1, + 0, + 0, + 2, + 12], + ["summarizeBy", + 1, + 0, + 0, + 2, + 12], + ["showAs", + 1, + 0, + 0, + 2, + 12]], + [["field", + "PivotField", + 35, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["PivotFieldCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotField", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotField", + 1, + 2, + 0, + 4]], + 0, + "PivotField"], + ["PivotField", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["subtotals", + 1, + 0, + 0, + 2, + 12], + ["showAllItems", + 1, + 0, + 0, + 2, + 12]], + [["items", + "PivotItemCollection", + 19, + 0, + 0, + 4]], + [["sortByLabels", + 1, + 1, + 0, + 2, + 0, + 12], + ["sortByValues", + 3, + 0, + 6, + 2, + 0, + 12], + ["applyFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["clearAllFilters", + 0, + 0, + 27, + 2, + 0, + 12], + ["clearFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["getFilters", + 0, + 0, + 27], + ["isFiltered", + 1, + 0, + 27]]], + ["PivotItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotItem", + 1, + 2, + 0, + 4]], + 0, + "PivotItem"], + ["PivotItem", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["isExpanded", + 1, + 0, + 0, + 2, + 12], + ["visible", + 1, + 0, + 0, + 2, + 12]]], + ["WorksheetCustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["_Id", + 2]], + 0, + [["delete"]]], + ["WorksheetCustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "WorksheetCustomProperty", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "WorksheetCustomProperty", + 1], + ["add", + "WorksheetCustomProperty", + 2, + 8]], + 0, + "WorksheetCustomProperty"], + ["DocumentProperties", + 0, + [["title", + 1], + ["subject", + 1], + ["author", + 1], + ["keywords", + 1], + ["comments", + 1], + ["lastAuthor", + 3], + ["revisionNumber", + 1], + ["creationDate", + 11], + ["category", + 1], + ["manager", + 1], + ["company", + 1]], + [["custom", + "CustomPropertyCollection", + 19, + 0, + 0, + 4]]], + ["CustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["type", + 3]], + 0, + [["delete"]]], + ["CustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["deleteAll"]], + [["getItemOrNullObject", + "CustomProperty", + 1, + 2, + 0, + 4], + ["add", + "CustomProperty", + 2, + 8], + ["getItem", + "CustomProperty", + 1, + 18, + 0, + 4]], + 0, + "CustomProperty"], + ["ConditionalFormatCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["clearAll", + 0, + 0, + 0, + 2, + 0, + 39]], + [["getItemAt", + "ConditionalFormat", + 1, + 2, + 0, + 4], + ["add", + "ConditionalFormat", + 1, + 8, + 0, + 2, + 0, + 0, + 39], + ["getItem", + "ConditionalFormat", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "ConditionalFormat", + 1, + 2, + 18, + 4]], + 0, + "ConditionalFormat"], + ["ConditionalFormat", + 0, + [["stopIfTrue", + 1], + ["priority", + 1], + ["type", + 3], + ["id", + 3]], + [["dataBarOrNullObject", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["dataBar", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["customOrNullObject", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["custom", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSet", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSetOrNullObject", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScale", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScaleOrNullObject", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottom", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottomOrNullObject", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["preset", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["presetOrNullObject", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparison", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparisonOrNullObject", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValue", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValueOrNullObject", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 40], + ["changeRuleToCellValue", + 1, + 0, + 30], + ["changeRuleToColorScale", + 0, + 0, + 30], + ["changeRuleToContainsText", + 1, + 0, + 30], + ["changeRuleToCustom", + 1, + 0, + 30], + ["changeRuleToDataBar", + 0, + 0, + 30], + ["changeRuleToIconSet", + 0, + 0, + 30], + ["changeRuleToPresetCriteria", + 1, + 0, + 30], + ["changeRuleToTopBottom", + 1, + 0, + 30], + ["setRanges", + 1, + 0, + 30]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getRanges", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["DataBarConditionalFormat", + 0, + [["showDataBarOnly", + 1, + 0, + 0, + 2, + 40], + ["barDirection", + 1, + 0, + 0, + 2, + 41], + ["axisFormat", + 1, + 0, + 0, + 2, + 41], + ["axisColor", + 1, + 0, + 0, + 2, + 41], + ["lowerBoundRule", + 1, + 0, + 0, + 2, + 41], + ["upperBoundRule", + 1, + 0, + 0, + 2, + 41]], + [["positiveFormat", + "ConditionalDataBarPositiveFormat", + 35, + 0, + 0, + 4], + ["negativeFormat", + "ConditionalDataBarNegativeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalDataBarPositiveFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["gradientFill", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40]]], + ["ConditionalDataBarNegativeFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveFillColor", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveBorderColor", + 1, + 0, + 0, + 2, + 40]]], + ["CustomConditionalFormat", + 0, + 0, + [["rule", + "ConditionalFormatRule", + 35, + 0, + 0, + 4], + ["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalFormatRule", + 0, + [["formula", + 1, + 0, + 0, + 2, + 41], + ["formulaLocal", + 1], + ["formulaR1C1", + 1]]], + ["IconSetConditionalFormat", + 0, + [["reverseIconOrder", + 1, + 0, + 0, + 2, + 41], + ["showIconOnly", + 1, + 0, + 0, + 2, + 41], + ["style", + 1, + 0, + 0, + 2, + 41], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["ColorScaleConditionalFormat", + 0, + [["threeColorScale", + 3], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["TopBottomConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["PresetCriteriaConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["TextConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["CellValueConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalRangeFormat", + 0, + [["numberFormat", + 1]], + [["fill", + "ConditionalRangeFill", + 35, + 0, + 0, + 4], + ["font", + "ConditionalRangeFont", + 35, + 0, + 0, + 4], + ["borders", + "ConditionalRangeBorderCollection", + 51, + 0, + 0, + 4]], + [["clearFormat", + 0, + 0, + 30]]], + ["ConditionalRangeFont", + 0, + [["color", + 1, + 0, + 0, + 2, + 42], + ["italic", + 1, + 0, + 0, + 2, + 42], + ["bold", + 1, + 0, + 0, + 2, + 42], + ["underline", + 1, + 0, + 0, + 2, + 42], + ["strikethrough", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 42], + ["color", + 1, + 0, + 0, + 2, + 42]]], + ["ConditionalRangeBorderCollection", + 1, + [["count", + 3]], + [["top", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["bottom", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["left", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["right", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ConditionalRangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "ConditionalRangeBorder", + 1, + 2, + 0, + 4]], + 0, + "ConditionalRangeBorder"], + ["NumberFormattingService", + 0, + 0, + 0, + 0, + [["getFormatter", + "NumberFormatter", + 1, + 3]], + 0, + 0, + 0, + "Microsoft.ExcelServices.NumberFormattingService", + 4], + ["NumberFormatter", + 0, + [["isDateTime", + 3], + ["isPercent", + 3], + ["isCurrency", + 3], + ["isNumeric", + 3], + ["isText", + 3], + ["hasYear", + 3], + ["hasMonth", + 3], + ["hasDayOfWeek", + 3]], + 0, + [["format", + 1, + 3]]], + ["CustomFunctionManager", + 36, + [["status", + 2]], + 0, + [["register", + 2]], + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.CustomFunctionManager", + 4], + ["Style", + 0, + [["builtIn", + 3], + ["formulaHidden", + 1], + ["horizontalAlignment", + 1], + ["includeAlignment", + 1], + ["includeBorder", + 1], + ["includeFont", + 1], + ["includeNumber", + 1], + ["includePatterns", + 1], + ["includeProtection", + 1], + ["indentLevel", + 1], + ["locked", + 1], + ["name", + 3], + ["numberFormat", + 1], + ["numberFormatLocal", + 1], + ["readingOrder", + 1], + ["shrinkToFit", + 1], + ["verticalAlignment", + 1], + ["wrapText", + 1], + ["textOrientation", + 5, + 5], + ["autoIndent", + 1, + 5]], + [["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["fill", + "RangeFill", + 35, + 0, + 0, + 4]], + [["delete"]]], + ["StyleCollection", + 1, + 0, + 0, + [["add", + 1], + ["getCount", + 0, + 2, + 6, + 4]], + [["getItem", + "Style", + 1, + 18, + 0, + 4], + ["getItemAt", + "Style", + 1, + 2, + 6, + 4], + ["getItemOrNullObject", + "Style", + 1, + 2, + 18, + 4]], + 0, + "Style"], + ["TableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TableStyle", + 1, + 2, + 0, + 4], + ["add", + "TableStyle", + 2, + 8], + ["getDefault", + "TableStyle"]], + 0, + "TableStyle"], + ["TableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TableStyle"]]], + ["PivotTableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "PivotTableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTableStyle", + 1, + 2, + 0, + 4], + ["add", + "PivotTableStyle", + 2, + 8], + ["getDefault", + "PivotTableStyle"]], + 0, + "PivotTableStyle"], + ["PivotTableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "PivotTableStyle"]]], + ["SlicerStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "SlicerStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerStyle", + 1, + 2, + 0, + 4], + ["add", + "SlicerStyle", + 2, + 8], + ["getDefault", + "SlicerStyle"]], + 0, + "SlicerStyle"], + ["SlicerStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "SlicerStyle"]]], + ["TimelineStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TimelineStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TimelineStyle", + 1, + 2, + 0, + 4], + ["add", + "TimelineStyle", + 2, + 8], + ["getDefault", + "TimelineStyle"]], + 0, + "TimelineStyle"], + ["TimelineStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TimelineStyle"]]], + ["InternalTest", + 0, + 0, + 0, + [["delay", + 1], + ["triggerMessage", + 4, + 0, + 11], + ["_RegisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEvent", + 2, + 0, + 11], + ["triggerPostProcess", + 0, + 0, + 11], + ["_RegisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEventWithFilter", + 3, + 0, + 11], + ["firstPartyMethod", + 0, + 2, + 11, + 5], + ["_RegisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_RegisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["unregisterAllCustomFunctionExecutionEvents", + 0, + 0, + 20], + ["updateRangeValueOnCurrentSheet", + 2, + 0, + 3, + 2], + ["triggerUserUndo", + 0, + 2, + 3], + ["triggerUserRedo", + 0, + 2, + 3], + ["enterCellEdit", + 1, + 0, + 6], + ["installCustomFunctionsFromCache", + 0, + 0, + 6], + ["recalc", + 2, + 0, + 6], + ["recalcBySolutionId", + 1, + 0, + 6], + ["safeForCellEditModeMethod", + 1, + 0, + 6], + ["exitCellEdit", + 0, + 0, + 6], + ["noPermissionMethod", + 1, + 0, + 6], + ["verifyCustomFunctionListExist", + 0, + 0, + 6], + ["enableContentWorkbookLink", + 0, + 0, + 3], + ["previewExecutionMethod", + 1, + 0, + 8, + 16], + ["setRapidJsonEnabled", + 1, + 0, + 8], + ["triggerVbaRecorderRecordingChanged", + 2, + 0, + 8]], + 0, + 0, + 0, + [["CustomFunctionExecutionBeginEvent", + 0, + 20, + "MessageType.customFunctionExecutionBeginEvent", + "", + "_RegisterCustomFunctionExecutionBeginEvent", + "_UnregisterCustomFunctionExecutionBeginEvent"], + ["CustomFunctionExecutionEndEvent", + 0, + 20, + "MessageType.customFunctionExecutionEndEvent", + "", + "_RegisterCustomFunctionExecutionEndEvent", + "_UnregisterCustomFunctionExecutionEndEvent"], + ["Test1Event", + 2, + 11, + "MessageType.test1Event", + "", + "_RegisterTest1Event", + "_UnregisterTest1Event"], + ["TestEvent", + 2, + 11, + "MessageType.testEvent", + "", + "_RegisterTestEvent", + "_UnregisterTestEvent"]], + "Microsoft.ExcelServices.InternalTest", + 4], + ["PageLayout", + 0, + [["orientation", + 1], + ["paperSize", + 1], + ["blackAndWhite", + 1], + ["printErrors", + 1], + ["zoom", + 1], + ["centerHorizontally", + 1], + ["centerVertically", + 1], + ["printHeadings", + 1], + ["printGridlines", + 1], + ["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["headerMargin", + 1], + ["footerMargin", + 1], + ["printComments", + 1], + ["draftMode", + 1], + ["firstPageNumber", + 1], + ["printOrder", + 1]], + [["headersFooters", + "HeaderFooterGroup", + 35, + 0, + 0, + 4]], + [["setPrintMargins", + 2], + ["setPrintArea", + 1], + ["setPrintTitleRows", + 1], + ["setPrintTitleColumns", + 1]], + [["getPrintArea", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintAreaOrNullObject", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintTitleRows", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleRowsOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumns", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumnsOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["HeaderFooter", + 0, + [["leftHeader", + 1], + ["centerHeader", + 1], + ["rightHeader", + 1], + ["leftFooter", + 1], + ["centerFooter", + 1], + ["rightFooter", + 1]]], + ["HeaderFooterGroup", + 0, + [["state", + 1], + ["useSheetMargins", + 1], + ["useSheetScale", + 1]], + [["defaultForAllPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["firstPage", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["evenPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["oddPages", + "HeaderFooter", + 35, + 0, + 0, + 4]]], + ["PageBreak", + 0, + [["_Id", + 2], + ["columnIndex", + 3], + ["rowIndex", + 3]], + 0, + [["delete"]], + [["getCellAfterBreak", + "Range", + 0, + 10, + 0, + 4]]], + ["PageBreakCollection", + 1, + 0, + 0, + [["removePageBreaks"], + ["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PageBreak", + 1, + 18, + 0, + 4], + ["add", + "PageBreak", + 1, + 8]], + 0, + "PageBreak"], + ["DataConnectionCollection", + 0, + 0, + 0, + [["refreshAll"]], + [["add", + "DataConnection", + 4, + 8, + 8, + 2, + 0, + 0, + 12]]], + ["RangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "Range", + 1, + 2, + 0, + 4]], + 0, + "Range"], + ["RangeAreasCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeAreas", + 1, + 2, + 0, + 4]], + 0, + "RangeAreas"], + ["CommentCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 2, + 27], + ["_UnregisterAddedEvent", + 0, + 2, + 27], + ["_RegisterDeletedEvent", + 0, + 2, + 27], + ["_UnregisterDeletedEvent", + 0, + 2, + 27], + ["_RegisterChangedEvent", + 0, + 2, + 27], + ["_UnregisterChangedEvent", + 0, + 2, + 27]], + [["getItem", + "Comment", + 1, + 18, + 0, + 4], + ["getItemAt", + "Comment", + 1, + 2, + 0, + 4], + ["add", + "Comment", + 3, + 8], + ["getItemByReplyId", + "Comment", + 1, + 2, + 0, + 4], + ["getItemByCell", + "Comment", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Comment", + 1, + 2, + 18, + 4]], + 0, + "Comment", + [["Added", + 0, + 27, + "MessageType.commentAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 0, + 27, + "MessageType.commentChangedEvent", + "this._eventTargetId", + "_RegisterChangedEvent", + "_UnregisterChangedEvent"], + ["Deleted", + 0, + 27, + "MessageType.commentDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Comment", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 1, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + [["replies", + "CommentReplyCollection", + 19, + 0, + 0, + 4]], + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["CommentReplyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "CommentReply", + 2, + 8], + ["getItem", + "CommentReply", + 1, + 18, + 0, + 4], + ["getItemAt", + "CommentReply", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "CommentReply", + 1, + 2, + 18, + 4]], + 0, + "CommentReply"], + ["CommentReply", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 3, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + 0, + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getParentComment", + "Comment"], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["ShapeCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["addImage", + "Shape", + 1], + ["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["addGeometricShape", + "Shape", + 1], + ["addTextBox", + "Shape", + 1], + ["addSvg", + "Shape", + 1, + 0, + 8], + ["addGroup", + "Shape", + 1], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["addLine", + "Shape", + 5], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape", + [["Added", + 0, + 3, + "MessageType.shapeAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.shapeDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Shape", + 0, + [["id", + 3], + ["name", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["rotation", + 1], + ["zOrderPosition", + 3], + ["altTextTitle", + 1], + ["altTextDescription", + 1, + 0, + 0, + 2, + 36], + ["type", + 3], + ["lockAspectRatio", + 1], + ["placement", + 1, + 17], + ["geometricShapeType", + 1], + ["visible", + 1], + ["level", + 3], + ["connectionSiteCount", + 3], + ["scriptLink", + 1, + 8, + 0, + 2, + 37], + ["displayName", + 3, + 35]], + [["geometricShape", + "GeometricShape", + 2, + 0, + 0, + 4], + ["image", + "Image", + 2, + 0, + 0, + 4], + ["textFrame", + "TextFrame", + 2, + 0, + 0, + 4], + ["fill", + "ShapeFill", + 35, + 0, + 0, + 4], + ["group", + "ShapeGroup", + 2, + 0, + 0, + 4], + ["parentGroup", + "Shape", + 2, + 0, + 0, + 4], + ["line", + "Line", + 2, + 0, + 0, + 4], + ["lineFormat", + "ShapeLineFormat", + 35, + 0, + 0, + 4]], + [["setZOrder", + 1], + ["incrementLeft", + 1], + ["incrementTop", + 1], + ["incrementRotation", + 1], + ["scaleHeight", + 3], + ["scaleWidth", + 3], + ["delete"], + ["getAsImage", + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["activate", + 0, + 0, + 3]], + [["copyTo", + "Shape", + 1, + 8, + 17, + 0, + 0, + "_GetShapeById"], + ["_GetShapeById", + "Shape", + 1, + 2, + 17, + 4]], + 0, + 0, + [["Activated", + 0, + 0, + "MessageType.shapeActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 0, + "MessageType.shapeDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["GeometricShape", + 0, + [["id", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["Image", + 0, + [["id", + 3], + ["format", + 3, + 0, + "format"]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["ShapeGroup", + 0, + [["id", + 3]], + [["shapes", + "GroupShapeCollection", + 19, + 0, + 0, + 4], + ["shape", + "Shape", + 2, + 0, + 0, + 4]], + [["ungroup"]]], + ["GroupShapeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape"], + ["Line", + 0, + [["id", + 3], + ["connectorType", + 1, + 0, + "connectorType"], + ["beginArrowheadLength", + 1], + ["beginArrowheadStyle", + 1], + ["beginArrowheadWidth", + 1], + ["endArrowheadLength", + 1], + ["endArrowheadStyle", + 1], + ["endArrowheadWidth", + 1], + ["isBeginConnected", + 3], + ["beginConnectedSite", + 3], + ["isEndConnected", + 3], + ["endConnectedSite", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4], + ["beginConnectedShape", + "Shape", + 2, + 0, + 0, + 4], + ["endConnectedShape", + "Shape", + 2, + 0, + 0, + 4]], + [["connectBeginShape", + 2], + ["disconnectBeginShape"], + ["connectEndShape", + 2], + ["disconnectEndShape"]]], + ["ShapeFill", + 0, + [["foregroundColor", + 1], + ["type", + 3], + ["transparency", + 1]], + 0, + [["clear"], + ["setSolidColor", + 1]]], + ["ShapeLineFormat", + 0, + [["visible", + 1], + ["color", + 1], + ["style", + 1], + ["weight", + 1], + ["dashStyle", + 1], + ["transparency", + 1]]], + ["TextFrame", + 0, + [["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["horizontalAlignment", + 1], + ["horizontalOverflow", + 1], + ["verticalAlignment", + 1], + ["verticalOverflow", + 1], + ["orientation", + 1], + ["readingOrder", + 1], + ["hasText", + 3], + ["autoSizeSetting", + 1]], + [["textRange", + "TextRange", + 2, + 0, + 0, + 4]], + [["deleteText"]]], + ["TextRange", + 0, + [["text", + 1]], + [["font", + "ShapeFont", + 35, + 0, + 0, + 4]], + 0, + [["getSubstring", + "TextRange", + 2]]], + ["ShapeFont", + 0, + [["size", + 1], + ["name", + 1], + ["color", + 1], + ["bold", + 1], + ["italic", + 1], + ["underline", + 1]]], + ["Slicer", + 0, + [["id", + 3], + ["name", + 1], + ["caption", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["nameInFormula", + 1, + 8], + ["isFilterCleared", + 3], + ["style", + 1], + ["sortBy", + 1], + ["sortUsingCustomLists", + 1, + 3], + ["columnCount", + 1, + 3], + ["disableMoveResizeUI", + 1, + 3], + ["displayHeader", + 1, + 3], + ["rowHeight", + 1, + 3], + ["shapeId", + 2, + 3]], + [["slicerItems", + "SlicerItemCollection", + 19, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 35, + 0, + 0, + 4], + ["slicerStyle", + "SlicerStyle", + 35, + 8, + 0, + 4]], + [["delete"], + ["clearFilters"], + ["getSelectedItems"], + ["selectItems", + 1], + ["activate", + 0, + 2, + 3], + ["setStyle", + 1, + 0, + 8]]], + ["SlicerCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "Slicer", + 3, + 8], + ["getItemAt", + "Slicer", + 1, + 2, + 0, + 4], + ["getItem", + "Slicer", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Slicer", + 1, + 2, + 0, + 4]], + 0, + "Slicer"], + ["SlicerItem", + 0, + [["key", + 3], + ["name", + 3], + ["isSelected", + 1], + ["hasData", + 3]]], + ["SlicerItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SlicerItem", + 1, + 2, + 0, + 4], + ["getItem", + "SlicerItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerItem", + 1, + 2, + 0, + 4]], + 0, + "SlicerItem"], + ["Ribbon", + 0, + [["activeTab", + 1]], + 0, + [["executeCommand", + 2], + ["showTeachingCallout", + 3], + ["_RegisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["showChartDialog", + 1, + 2, + 8, + 4]], + 0, + 0, + 0, + [["CommandExecuted", + 0, + 0, + "MessageType.ribbonCommandExecutedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCommandExecutedEvent", + "_UnregisterCommandExecutedEvent"]]], + ["LinkedDataType", + 0, + [["dataProvider", + 2], + ["serviceId", + 2], + ["lastRefreshed", + 10], + ["name", + 2], + ["periodicRefreshInterval", + 2], + ["refreshDataLoadWarnings", + 2], + ["refreshMode", + 2], + ["supportedRefreshModes", + 2], + ["refreshErrors", + 2]], + 0, + [["requestRefresh", + 0, + 0, + 0, + 2], + ["requestSetRefreshMode", + 1, + 0, + 0, + 2]]], + ["LinkedDataTypeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["requestRefreshAll", + 0, + 0, + 0, + 2], + ["_RegisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_RegisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_RegisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4]], + [["getItem", + "LinkedDataType", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "LinkedDataType", + 1], + ["getItemAt", + "LinkedDataType", + 1, + 2, + 0, + 4]], + 0, + "LinkedDataType", + [["LinkedDataTypeAdded", + 0, + 0, + "MessageType.linkedDataTypeLinkedDataTypeAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterLinkedDataTypeAddedEvent", + "_UnregisterLinkedDataTypeAddedEvent"], + ["RefreshModeChanged", + 0, + 0, + "MessageType.linkedDataTypeRefreshModeChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshModeChangedEvent", + "_UnregisterRefreshModeChangedEvent"], + ["RefreshRequestCompleted", + 0, + 0, + "MessageType.linkedDataTypeRefreshRequestCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshRequestCompletedEvent", + "_UnregisterRefreshRequestCompletedEvent"]]], + ["SheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "SheetView", + 1]]], + ["SheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "SheetView", + 1, + 8], + ["enterTemporary", + "SheetView"], + ["getActive", + "SheetView"], + ["getItem", + "SheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "SheetView", + 1, + 2, + 0, + 4]], + 0, + "SheetView"], + ["NamedSheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "NamedSheetView", + 1]]], + ["NamedSheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "NamedSheetView", + 1, + 8], + ["enterTemporary", + "NamedSheetView"], + ["getActive", + "NamedSheetView"], + ["getItem", + "NamedSheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "NamedSheetView", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "NamedSheetView", + 1, + 2, + 28, + 4]], + 0, + "NamedSheetView"], + ["FunctionResult", + 0, + [["error", + 3], + ["value", + 3]]], + ["Functions", + 0, + 0, + 0, + 0, + [["count", + "FunctionResult", + 1, + 72], + ["if", + "FunctionResult", + 3, + 8], + ["isNA", + "FunctionResult", + 1, + 8], + ["isError", + "FunctionResult", + 1, + 8], + ["sum", + "FunctionResult", + 1, + 72], + ["average", + "FunctionResult", + 1, + 72], + ["min", + "FunctionResult", + 1, + 72], + ["max", + "FunctionResult", + 1, + 72], + ["na", + "FunctionResult", + 0, + 8], + ["npv", + "FunctionResult", + 2, + 72], + ["dollar", + "FunctionResult", + 2, + 8], + ["fixed", + "FunctionResult", + 3, + 8], + ["sin", + "FunctionResult", + 1, + 8], + ["cos", + "FunctionResult", + 1, + 8], + ["tan", + "FunctionResult", + 1, + 8], + ["atan", + "FunctionResult", + 1, + 8], + ["pi", + "FunctionResult", + 0, + 8], + ["sqrt", + "FunctionResult", + 1, + 8], + ["exp", + "FunctionResult", + 1, + 8], + ["ln", + "FunctionResult", + 1, + 8], + ["log10", + "FunctionResult", + 1, + 8], + ["abs", + "FunctionResult", + 1, + 8], + ["int", + "FunctionResult", + 1, + 8], + ["sign", + "FunctionResult", + 1, + 8], + ["round", + "FunctionResult", + 2, + 8], + ["lookup", + "FunctionResult", + 3, + 8], + ["rept", + "FunctionResult", + 2, + 8], + ["mid", + "FunctionResult", + 3, + 8], + ["len", + "FunctionResult", + 1, + 8], + ["value", + "FunctionResult", + 1, + 8], + ["true", + "FunctionResult", + 0, + 8], + ["false", + "FunctionResult", + 0, + 8], + ["and", + "FunctionResult", + 1, + 72], + ["or", + "FunctionResult", + 1, + 72], + ["not", + "FunctionResult", + 1, + 8], + ["mod", + "FunctionResult", + 2, + 8], + ["dcount", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCount"], + ["dsum", + "FunctionResult", + 3, + 8, + 0, + 0, + "DSum"], + ["daverage", + "FunctionResult", + 3, + 8, + 0, + 0, + "DAverage"], + ["dmin", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMin"], + ["dmax", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMax"], + ["dstDev", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDev"], + ["dvar", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVar"], + ["text", + "FunctionResult", + 2, + 8], + ["pv", + "FunctionResult", + 5, + 8], + ["fv", + "FunctionResult", + 5, + 8], + ["nper", + "FunctionResult", + 5, + 8, + 0, + 0, + "NPer"], + ["pmt", + "FunctionResult", + 5, + 8], + ["rate", + "FunctionResult", + 6, + 8], + ["mirr", + "FunctionResult", + 3, + 8, + 0, + 0, + "MIrr"], + ["irr", + "FunctionResult", + 2, + 8], + ["rand", + "FunctionResult", + 0, + 8], + ["match", + "FunctionResult", + 3, + 8], + ["date", + "FunctionResult", + 3, + 8], + ["time", + "FunctionResult", + 3, + 8], + ["day", + "FunctionResult", + 1, + 8], + ["month", + "FunctionResult", + 1, + 8], + ["year", + "FunctionResult", + 1, + 8], + ["weekday", + "FunctionResult", + 2, + 8], + ["hour", + "FunctionResult", + 1, + 8], + ["minute", + "FunctionResult", + 1, + 8], + ["second", + "FunctionResult", + 1, + 8], + ["now", + "FunctionResult", + 0, + 8], + ["areas", + "FunctionResult", + 1, + 8], + ["rows", + "FunctionResult", + 1, + 8], + ["columns", + "FunctionResult", + 1, + 8], + ["type", + "FunctionResult", + 1, + 8], + ["atan2", + "FunctionResult", + 2, + 8], + ["asin", + "FunctionResult", + 1, + 8], + ["acos", + "FunctionResult", + 1, + 8], + ["choose", + "FunctionResult", + 2, + 72], + ["hlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "HLookup"], + ["vlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "VLookup"], + ["isref", + "FunctionResult", + 1, + 8], + ["log", + "FunctionResult", + 2, + 8], + ["char", + "FunctionResult", + 1, + 8], + ["lower", + "FunctionResult", + 1, + 8], + ["upper", + "FunctionResult", + 1, + 8], + ["proper", + "FunctionResult", + 1, + 8], + ["left", + "FunctionResult", + 2, + 8], + ["right", + "FunctionResult", + 2, + 8], + ["exact", + "FunctionResult", + 2, + 8], + ["trim", + "FunctionResult", + 1, + 8], + ["replace", + "FunctionResult", + 4, + 8], + ["substitute", + "FunctionResult", + 4, + 8], + ["code", + "FunctionResult", + 1, + 8], + ["find", + "FunctionResult", + 3, + 8], + ["isErr", + "FunctionResult", + 1, + 8], + ["isText", + "FunctionResult", + 1, + 8], + ["isNumber", + "FunctionResult", + 1, + 8], + ["t", + "FunctionResult", + 1, + 8, + 0, + 0, + "T"], + ["n", + "FunctionResult", + 1, + 8, + 0, + 0, + "N"], + ["datevalue", + "FunctionResult", + 1, + 8], + ["timevalue", + "FunctionResult", + 1, + 8], + ["sln", + "FunctionResult", + 3, + 8], + ["syd", + "FunctionResult", + 4, + 8], + ["ddb", + "FunctionResult", + 5, + 8], + ["clean", + "FunctionResult", + 1, + 8], + ["ipmt", + "FunctionResult", + 6, + 8], + ["ppmt", + "FunctionResult", + 6, + 8], + ["countA", + "FunctionResult", + 1, + 72], + ["product", + "FunctionResult", + 1, + 72], + ["fact", + "FunctionResult", + 1, + 8], + ["dproduct", + "FunctionResult", + 3, + 8, + 0, + 0, + "DProduct"], + ["isNonText", + "FunctionResult", + 1, + 8], + ["dstDevP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDevP"], + ["dvarP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVarP"], + ["trunc", + "FunctionResult", + 2, + 8], + ["isLogical", + "FunctionResult", + 1, + 8], + ["dcountA", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCountA"], + ["usdollar", + "FunctionResult", + 2, + 8, + 0, + 0, + "USDollar"], + ["findB", + "FunctionResult", + 3, + 8], + ["replaceB", + "FunctionResult", + 4, + 8], + ["leftb", + "FunctionResult", + 2, + 8], + ["rightb", + "FunctionResult", + 2, + 8], + ["midb", + "FunctionResult", + 3, + 8], + ["lenb", + "FunctionResult", + 1, + 8], + ["roundUp", + "FunctionResult", + 2, + 8], + ["roundDown", + "FunctionResult", + 2, + 8], + ["asc", + "FunctionResult", + 1, + 8], + ["dbcs", + "FunctionResult", + 1, + 8], + ["days360", + "FunctionResult", + 3, + 8], + ["today", + "FunctionResult", + 0, + 8], + ["vdb", + "FunctionResult", + 7, + 8], + ["median", + "FunctionResult", + 1, + 72], + ["sinh", + "FunctionResult", + 1, + 8], + ["cosh", + "FunctionResult", + 1, + 8], + ["tanh", + "FunctionResult", + 1, + 8], + ["asinh", + "FunctionResult", + 1, + 8], + ["acosh", + "FunctionResult", + 1, + 8], + ["atanh", + "FunctionResult", + 1, + 8], + ["dget", + "FunctionResult", + 3, + 8, + 0, + 0, + "DGet"], + ["db", + "FunctionResult", + 5, + 8], + ["error_Type", + "FunctionResult", + 1, + 8], + ["aveDev", + "FunctionResult", + 1, + 72], + ["gammaLn", + "FunctionResult", + 1, + 8], + ["combin", + "FunctionResult", + 2, + 8], + ["even", + "FunctionResult", + 1, + 8], + ["fisher", + "FunctionResult", + 1, + 8], + ["fisherInv", + "FunctionResult", + 1, + 8], + ["standardize", + "FunctionResult", + 3, + 8], + ["odd", + "FunctionResult", + 1, + 8], + ["permut", + "FunctionResult", + 2, + 8], + ["devSq", + "FunctionResult", + 1, + 72], + ["geoMean", + "FunctionResult", + 1, + 72], + ["harMean", + "FunctionResult", + 1, + 72], + ["sumSq", + "FunctionResult", + 1, + 72], + ["kurt", + "FunctionResult", + 1, + 72], + ["skew", + "FunctionResult", + 1, + 72], + ["large", + "FunctionResult", + 2, + 8], + ["small", + "FunctionResult", + 2, + 8], + ["trimMean", + "FunctionResult", + 2, + 8], + ["concatenate", + "FunctionResult", + 1, + 72], + ["power", + "FunctionResult", + 2, + 8], + ["radians", + "FunctionResult", + 1, + 8], + ["degrees", + "FunctionResult", + 1, + 8], + ["subtotal", + "FunctionResult", + 2, + 72], + ["sumIf", + "FunctionResult", + 3, + 8], + ["countIf", + "FunctionResult", + 2, + 8], + ["countBlank", + "FunctionResult", + 1, + 8], + ["ispmt", + "FunctionResult", + 4, + 8], + ["roman", + "FunctionResult", + 2, + 8], + ["hyperlink", + "FunctionResult", + 2, + 8], + ["averageA", + "FunctionResult", + 1, + 72], + ["maxA", + "FunctionResult", + 1, + 72], + ["minA", + "FunctionResult", + 1, + 72], + ["stDevPA", + "FunctionResult", + 1, + 72], + ["varPA", + "FunctionResult", + 1, + 72], + ["stDevA", + "FunctionResult", + 1, + 72], + ["varA", + "FunctionResult", + 1, + 72], + ["bahtText", + "FunctionResult", + 1, + 8], + ["hex2Bin", + "FunctionResult", + 2, + 8], + ["hex2Dec", + "FunctionResult", + 1, + 8], + ["hex2Oct", + "FunctionResult", + 2, + 8], + ["dec2Bin", + "FunctionResult", + 2, + 8], + ["dec2Hex", + "FunctionResult", + 2, + 8], + ["dec2Oct", + "FunctionResult", + 2, + 8], + ["oct2Bin", + "FunctionResult", + 2, + 8], + ["oct2Hex", + "FunctionResult", + 2, + 8], + ["oct2Dec", + "FunctionResult", + 1, + 8], + ["bin2Dec", + "FunctionResult", + 1, + 8], + ["bin2Oct", + "FunctionResult", + 2, + 8], + ["bin2Hex", + "FunctionResult", + 2, + 8], + ["imSub", + "FunctionResult", + 2, + 8], + ["imDiv", + "FunctionResult", + 2, + 8], + ["imPower", + "FunctionResult", + 2, + 8], + ["imAbs", + "FunctionResult", + 1, + 8], + ["imSqrt", + "FunctionResult", + 1, + 8], + ["imLn", + "FunctionResult", + 1, + 8], + ["imLog2", + "FunctionResult", + 1, + 8], + ["imLog10", + "FunctionResult", + 1, + 8], + ["imSin", + "FunctionResult", + 1, + 8], + ["imCos", + "FunctionResult", + 1, + 8], + ["imExp", + "FunctionResult", + 1, + 8], + ["imArgument", + "FunctionResult", + 1, + 8], + ["imConjugate", + "FunctionResult", + 1, + 8], + ["imaginary", + "FunctionResult", + 1, + 8], + ["imReal", + "FunctionResult", + 1, + 8], + ["complex", + "FunctionResult", + 3, + 8], + ["imSum", + "FunctionResult", + 1, + 72], + ["imProduct", + "FunctionResult", + 1, + 72], + ["seriesSum", + "FunctionResult", + 4, + 8], + ["factDouble", + "FunctionResult", + 1, + 8], + ["sqrtPi", + "FunctionResult", + 1, + 8], + ["quotient", + "FunctionResult", + 2, + 8], + ["delta", + "FunctionResult", + 2, + 8], + ["geStep", + "FunctionResult", + 2, + 8], + ["isEven", + "FunctionResult", + 1, + 8], + ["isOdd", + "FunctionResult", + 1, + 8], + ["mround", + "FunctionResult", + 2, + 8, + 0, + 0, + "MRound"], + ["erf", + "FunctionResult", + 2, + 8], + ["erfC", + "FunctionResult", + 1, + 8], + ["besselJ", + "FunctionResult", + 2, + 8], + ["besselK", + "FunctionResult", + 2, + 8], + ["besselY", + "FunctionResult", + 2, + 8], + ["besselI", + "FunctionResult", + 2, + 8], + ["xirr", + "FunctionResult", + 3, + 8], + ["xnpv", + "FunctionResult", + 3, + 8], + ["priceMat", + "FunctionResult", + 6, + 8], + ["yieldMat", + "FunctionResult", + 6, + 8], + ["intRate", + "FunctionResult", + 5, + 8], + ["received", + "FunctionResult", + 5, + 8], + ["disc", + "FunctionResult", + 5, + 8], + ["priceDisc", + "FunctionResult", + 5, + 8], + ["yieldDisc", + "FunctionResult", + 5, + 8], + ["tbillEq", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillEq"], + ["tbillPrice", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillPrice"], + ["tbillYield", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillYield"], + ["price", + "FunctionResult", + 7, + 8], + ["yield", + "FunctionResult", + 7, + 8], + ["dollarDe", + "FunctionResult", + 2, + 8], + ["dollarFr", + "FunctionResult", + 2, + 8], + ["nominal", + "FunctionResult", + 2, + 8], + ["effect", + "FunctionResult", + 2, + 8], + ["cumPrinc", + "FunctionResult", + 6, + 8], + ["cumIPmt", + "FunctionResult", + 6, + 8], + ["edate", + "FunctionResult", + 2, + 8, + 0, + 0, + "EDate"], + ["eoMonth", + "FunctionResult", + 2, + 8], + ["yearFrac", + "FunctionResult", + 3, + 8], + ["coupDayBs", + "FunctionResult", + 4, + 8], + ["coupDays", + "FunctionResult", + 4, + 8], + ["coupDaysNc", + "FunctionResult", + 4, + 8], + ["coupNcd", + "FunctionResult", + 4, + 8], + ["coupNum", + "FunctionResult", + 4, + 8], + ["coupPcd", + "FunctionResult", + 4, + 8], + ["duration", + "FunctionResult", + 6, + 8], + ["mduration", + "FunctionResult", + 6, + 8, + 0, + 0, + "MDuration"], + ["oddLPrice", + "FunctionResult", + 8, + 8], + ["oddLYield", + "FunctionResult", + 8, + 8], + ["oddFPrice", + "FunctionResult", + 9, + 8], + ["oddFYield", + "FunctionResult", + 9, + 8], + ["randBetween", + "FunctionResult", + 2, + 8], + ["weekNum", + "FunctionResult", + 2, + 8], + ["amorDegrc", + "FunctionResult", + 7, + 8], + ["amorLinc", + "FunctionResult", + 7, + 8], + ["convert", + "FunctionResult", + 3, + 8], + ["accrInt", + "FunctionResult", + 8, + 8], + ["accrIntM", + "FunctionResult", + 5, + 8], + ["workDay", + "FunctionResult", + 3, + 8], + ["networkDays", + "FunctionResult", + 3, + 8], + ["gcd", + "FunctionResult", + 1, + 72], + ["multiNomial", + "FunctionResult", + 1, + 72], + ["lcm", + "FunctionResult", + 1, + 72], + ["fvschedule", + "FunctionResult", + 2, + 8, + 0, + 0, + "FVSchedule"], + ["countIfs", + "FunctionResult", + 1, + 72], + ["sumIfs", + "FunctionResult", + 2, + 72], + ["averageIf", + "FunctionResult", + 3, + 8], + ["averageIfs", + "FunctionResult", + 2, + 72], + ["binom_Dist", + "FunctionResult", + 4, + 8], + ["binom_Inv", + "FunctionResult", + 3, + 8], + ["confidence_Norm", + "FunctionResult", + 3, + 8], + ["confidence_T", + "FunctionResult", + 3, + 8], + ["expon_Dist", + "FunctionResult", + 3, + 8], + ["gamma_Dist", + "FunctionResult", + 4, + 8], + ["gamma_Inv", + "FunctionResult", + 3, + 8], + ["norm_Dist", + "FunctionResult", + 4, + 8], + ["norm_Inv", + "FunctionResult", + 3, + 8], + ["percentile_Exc", + "FunctionResult", + 2, + 8], + ["percentile_Inc", + "FunctionResult", + 2, + 8], + ["percentRank_Exc", + "FunctionResult", + 3, + 8], + ["percentRank_Inc", + "FunctionResult", + 3, + 8], + ["poisson_Dist", + "FunctionResult", + 3, + 8], + ["quartile_Exc", + "FunctionResult", + 2, + 8], + ["quartile_Inc", + "FunctionResult", + 2, + 8], + ["rank_Avg", + "FunctionResult", + 3, + 8], + ["rank_Eq", + "FunctionResult", + 3, + 8], + ["stDev_S", + "FunctionResult", + 1, + 72], + ["stDev_P", + "FunctionResult", + 1, + 72], + ["t_Dist", + "FunctionResult", + 3, + 8], + ["t_Dist_2T", + "FunctionResult", + 2, + 8], + ["t_Dist_RT", + "FunctionResult", + 2, + 8], + ["t_Inv", + "FunctionResult", + 2, + 8], + ["t_Inv_2T", + "FunctionResult", + 2, + 8], + ["var_S", + "FunctionResult", + 1, + 72], + ["var_P", + "FunctionResult", + 1, + 72], + ["weibull_Dist", + "FunctionResult", + 4, + 8], + ["networkDays_Intl", + "FunctionResult", + 4, + 8], + ["workDay_Intl", + "FunctionResult", + 4, + 8], + ["ecma_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ECMA_Ceiling"], + ["iso_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ISO_Ceiling"], + ["beta_Dist", + "FunctionResult", + 6, + 8], + ["beta_Inv", + "FunctionResult", + 5, + 8], + ["chiSq_Dist", + "FunctionResult", + 3, + 8], + ["chiSq_Dist_RT", + "FunctionResult", + 2, + 8], + ["chiSq_Inv", + "FunctionResult", + 2, + 8], + ["chiSq_Inv_RT", + "FunctionResult", + 2, + 8], + ["f_Dist", + "FunctionResult", + 4, + 8], + ["f_Dist_RT", + "FunctionResult", + 3, + 8], + ["f_Inv", + "FunctionResult", + 3, + 8], + ["f_Inv_RT", + "FunctionResult", + 3, + 8], + ["hypGeom_Dist", + "FunctionResult", + 5, + 8], + ["logNorm_Dist", + "FunctionResult", + 4, + 8], + ["logNorm_Inv", + "FunctionResult", + 3, + 8], + ["negBinom_Dist", + "FunctionResult", + 4, + 8], + ["norm_S_Dist", + "FunctionResult", + 2, + 8], + ["norm_S_Inv", + "FunctionResult", + 1, + 8], + ["z_Test", + "FunctionResult", + 3, + 8], + ["erf_Precise", + "FunctionResult", + 1, + 8], + ["erfC_Precise", + "FunctionResult", + 1, + 8], + ["gammaLn_Precise", + "FunctionResult", + 1, + 8], + ["ceiling_Precise", + "FunctionResult", + 2, + 8], + ["floor_Precise", + "FunctionResult", + 2, + 8], + ["acot", + "FunctionResult", + 1, + 8], + ["acoth", + "FunctionResult", + 1, + 8], + ["cot", + "FunctionResult", + 1, + 8], + ["coth", + "FunctionResult", + 1, + 8], + ["csc", + "FunctionResult", + 1, + 8], + ["csch", + "FunctionResult", + 1, + 8], + ["sec", + "FunctionResult", + 1, + 8], + ["sech", + "FunctionResult", + 1, + 8], + ["imTan", + "FunctionResult", + 1, + 8], + ["imCot", + "FunctionResult", + 1, + 8], + ["imCsc", + "FunctionResult", + 1, + 8], + ["imCsch", + "FunctionResult", + 1, + 8], + ["imSec", + "FunctionResult", + 1, + 8], + ["imSech", + "FunctionResult", + 1, + 8], + ["bitand", + "FunctionResult", + 2, + 8], + ["bitor", + "FunctionResult", + 2, + 8], + ["bitxor", + "FunctionResult", + 2, + 8], + ["bitlshift", + "FunctionResult", + 2, + 8], + ["bitrshift", + "FunctionResult", + 2, + 8], + ["permutationa", + "FunctionResult", + 2, + 8], + ["combina", + "FunctionResult", + 2, + 8], + ["xor", + "FunctionResult", + 1, + 72], + ["pduration", + "FunctionResult", + 3, + 8, + 0, + 0, + "PDuration"], + ["base", + "FunctionResult", + 3, + 8], + ["decimal", + "FunctionResult", + 2, + 8], + ["days", + "FunctionResult", + 2, + 8], + ["binom_Dist_Range", + "FunctionResult", + 4, + 8], + ["gamma", + "FunctionResult", + 1, + 8], + ["skew_p", + "FunctionResult", + 1, + 72], + ["gauss", + "FunctionResult", + 1, + 8], + ["phi", + "FunctionResult", + 1, + 8], + ["rri", + "FunctionResult", + 3, + 8], + ["unichar", + "FunctionResult", + 1, + 8], + ["unicode", + "FunctionResult", + 1, + 8], + ["arabic", + "FunctionResult", + 1, + 8], + ["isoWeekNum", + "FunctionResult", + 1, + 8], + ["numberValue", + "FunctionResult", + 3, + 8], + ["sheet", + "FunctionResult", + 1, + 8], + ["sheets", + "FunctionResult", + 1, + 8], + ["isFormula", + "FunctionResult", + 1, + 8], + ["ceiling_Math", + "FunctionResult", + 3, + 8], + ["floor_Math", + "FunctionResult", + 3, + 8], + ["imSinh", + "FunctionResult", + 1, + 8], + ["imCosh", + "FunctionResult", + 1, + 8]]]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataXlapi, targetNamespaceObject: Excel }); +})(Excel || (Excel = {})); +var _EndExcel = "_EndExcel"; +if (typeof (window) !== "undefined" && + window.OSF && + window.OSF._OfficeAppFactory && + window.OSF._OfficeAppFactory.getHostInfo && + window.OSF._OfficeAppFactory.getHostInfo()) { + var hostPlatform = window.OSF._OfficeAppFactory.getHostInfo().hostPlatform; + if (hostPlatform === "web") { + OfficeExtension._internalConfig.enablePreviewExecution = true; + } +} +OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel = true; +OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria = false; +function exposeOfficeRuntimeThroughOfficeNamespace(OfficeRuntime, Office) { + var _a, _b; + if (typeof OfficeRuntime === "undefined") { + if (typeof window !== "undefined") { + OfficeRuntime = window === null || window === void 0 ? void 0 : window.OfficeRuntime; + } + } + if (typeof OfficeRuntime === "undefined") { + OfficeRuntime = {}; + } + if (typeof Office !== "undefined") { + Office.storage = Office.storage || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.storage); + Office.auth = Office.auth || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.auth); + Office.getAccessToken = Office.getAccessToken || ((_a = OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.auth) === null || _a === void 0 ? void 0 : _a.getAccessToken); + Office.addin = Office.addin || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.addin); + Office.isSetSupported = Office.isSetSupported || ((_b = OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.apiInformation) === null || _b === void 0 ? void 0 : _b.isSetSupported); + Office.license = Office.license || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.license); + Office.message = Office.message || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.message); + } +} +exposeOfficeRuntimeThroughOfficeNamespace(typeof OfficeRuntime !== "undefined" ? OfficeRuntime || undefined : undefined, typeof Office !== "undefined" ? Office || undefined : undefined); diff --git a/dist/excel-android-16.00.js b/dist/excel-android-16.00.js new file mode 100644 index 000000000..21d0f9544 --- /dev/null +++ b/dist/excel-android-16.00.js @@ -0,0 +1,26 @@ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md +*/ + +/* +* @overview es6-promise - a tiny implementation of Promises/A+. +* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +* @license Licensed under MIT license +* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE +* @version 2.3.0 +*/ + + +// Sources: +// osfweb: 16.0\16801.10000 +// runtime: 16.0\16801.10000 +// core: 16.0\16801.10000 +// host: custom + + + +var OfficeExt,__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){var t=function(){function e(){}return e.prototype.isMsAjaxLoaded=function(){return!!("undefined"!==typeof Sys&&"undefined"!==typeof Type&&Sys.StringBuilder&&"function"===typeof Sys.StringBuilder&&Type.registerNamespace&&"function"===typeof Type.registerNamespace&&Type.registerClass&&"function"===typeof Type.registerClass&&"function"===typeof Function._validateParams&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&"function"===typeof Sys.Serialization.JavaScriptSerializer.serialize)},e.prototype.loadMsAjaxFull=function(e){var t=("https:"===window.location.protocol.toLowerCase()?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,e)},Object.defineProperty(e.prototype,"msAjaxError",{get:function(){return null==this._msAjaxError&&this.isMsAjaxLoaded()&&(this._msAjaxError=Error),this._msAjaxError},set:function(e){this._msAjaxError=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxString",{get:function(){return null==this._msAjaxString&&this.isMsAjaxLoaded()&&(this._msAjaxString=String),this._msAjaxString},set:function(e){this._msAjaxString=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxDebug",{get:function(){return null==this._msAjaxDebug&&this.isMsAjaxLoaded()&&(this._msAjaxDebug=Sys.Debug),this._msAjaxDebug},set:function(e){this._msAjaxDebug=e},enumerable:!0,configurable:!0}),e}();e.MicrosoftAjaxFactory=t}(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};!function(e){var t=function(){function e(e){this._internalStorage=e}return e.prototype.getItem=function(e){try{return this._internalStorage&&this._internalStorage.getItem(e)}catch(e){return null}},e.prototype.setItem=function(e,t){try{this._internalStorage&&this._internalStorage.setItem(e,t)}catch(e){}},e.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(e){}},e.prototype.removeItem=function(e){try{this._internalStorage&&this._internalStorage.removeItem(e)}catch(e){}},e.prototype.getKeysWithPrefix=function(e){var t=[];try{for(var n=this._internalStorage&&this._internalStorage.length||0,r=0;r0?i.push(n):0===n.tabIndex&&r.push(n):r.push(n);return i=i.sort((function(e,t){var n=e.tabIndex-t.tabIndex;return 0===n&&(n=i.indexOf(e)-i.indexOf(t)),n})),[].concat(i,r)}return{set_entropy:function(e){if("string"==typeof e)for(var t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(n=new Date(parseInt(t.slice(5,-1))))?n:t})):Sys.Serialization.JavaScriptSerializer.deserialize(r,!0),t[n]=r}catch(e){}}return t},loadScript:function(e,t,r){if(e&&t){var i=window.document,o=n[e];if(o)o.loaded?t():o.pendingCallbacks.push(t);else{var a=i.createElement("script");a.type="text/javascript",o={loaded:!1,pendingCallbacks:[t],timer:null},n[e]=o;var s=function(){null!=o.timer&&(clearTimeout(o.timer),delete o.timer),o.loaded=!0;for(var e=o.pendingCallbacks.length,t=0;t0?l(null):l(new Event("Script load timed out"))}),r),a.setAttribute("crossOrigin","anonymous"),a.src=e,i.getElementsByTagName("head")[0].appendChild(a)}}},loadCSS:function(e){if(e){var t=window.document,n=t.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.getElementsByTagName("head")[0].appendChild(n)}},parseEnum:function(e,t){var n=t[e.trim()];if("undefined"==typeof n)throw OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+e),OsfMsAjaxFactory.msAjaxError.argument("str");return n},delayExecutionAndCache:function(){var e={calc:arguments[0]};return function(){return e.calc&&(e.val=e.calc.apply(this,arguments),delete e.calc),e.val}},getUniqueId:function(){return(e+=1).toString()},formatString:function(){var e=arguments,t=e[0];return t.replace(/{(\d+)}/gm,(function(t,n){var r=parseInt(n,10)+1;return void 0===e[r]?"{"+n+"}":e[r]}))},generateConversationId:function(){return[a(),a(),(new Date).getTime().toString()].join("_")},getFrameName:function(e){return"_xdm_"+e+this.generateConversationId()},addXdmInfoAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_xdm_Info=",t,!1)},addSerializerVersionAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_serializer_version=",t,!0)},addFlightsAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_flights=",t,!0)},addInfoAsHash:function(e,n,r,i){var o,a=(e=e.trim()||"").split(t),s=a.shift(),l=a.join(t);return o=i?[n,encodeURIComponent(r),l].join(""):[l,n,r].join(""),[s,t,o].join("")},parseHostInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(e){var t=OSF.OUtil.parseXdmInfoWithGivenFragment(e,window.location.hash);return t||(t=OSF.OUtil.parseXdmInfoFromWindowName(e,window.name)),t},parseXdmInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(e,t){return OSF.OUtil.parseInfoWithGivenFragment("&_xdm_Info=","_xdm_",!1,e,t)},parseSerializerVersion:function(e){var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(e,window.location.hash);return isNaN(t)&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(e,window.name)),t},parseSerializerVersionFromWindowName:function(e,t){return parseInt(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(e,t){return parseInt(OSF.OUtil.parseInfoWithGivenFragment("&_serializer_version=","_serializer_version=",!0,e,t))},parseFlights:function(e){var t=OSF.OUtil.parseFlightsWithGivenFragment(e,window.location.hash);return 0==t.length&&(t=OSF.OUtil.parseFlightsFromWindowName(e,window.name)),t},checkFlight:function(e){return OSF.Flights&&OSF.Flights.indexOf(e)>=0},pushFlight:function(e){return OSF.Flights.indexOf(e)<0&&(OSF.Flights.push(e),!0)},getBooleanSetting:function(e){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,e)},getBooleanFromDictionary:function(e,t){var n=e&&t&&void 0!==e[t]&&e[t]&&("string"===typeof e[t]&&"TRUE"===e[t].toUpperCase()||"boolean"===typeof e[t]&&e[t]);return void 0!==n&&n},getIntFromDictionary:function(e,t){return e&&t&&void 0!==e[t]&&"string"===typeof e[t]?parseInt(e[t]):NaN},pushIntFlight:function(e,t){return!(e in OSF.IntFlights)&&(OSF.IntFlights[e]=t,!0)},getIntFlight:function(e){return OSF.IntFlights&&e in OSF.IntFlights?OSF.IntFlights[e]:NaN},parseFlightsFromWindowName:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment("&_flights=","_flights=",!0,e,t))},parseArrayWithDefault:function(e){var t=[];try{t=JSON.parse(e)}catch(e){}return Array.isArray(t)||(t=[]),t},parseInfoFromWindowName:function(e,t,n){try{var r=JSON.parse(t),i=null!=r?r[n]:null,o=s();if(!e&&o&&null!=r){var a=r[OSF.WindowNameItemKeys.BaseFrameName]+n;i?o.setItem(a,i):i=o.getItem(a)}return i}catch(e){return null}},parseInfoWithGivenFragment:function(e,t,n,r,i){var o=i.split(e),a=o.length>1?o[o.length-1]:null;n&&null!=a&&(a.indexOf("&")>=0&&(a=a.split("&")[0]),a=decodeURIComponent(a));var l=s();if(!r&&l){var c=window.name.indexOf(t);if(c>-1){var u=window.name.indexOf(";",c);-1==u&&(u=window.name.length);var d=window.name.substring(c,u);a?l.setItem(d,a):a=l.getItem(d)}}return a},getConversationId:function(){var e=window.location.search,t=null;if(e){var n=e.indexOf("&");(t=n>0?e.substring(1,n):e.substr(1))&&"="===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1))&&(t=decodeURIComponent(t))}return t},getInfoItems:function(e){var t=e.split("$");return"undefined"==typeof t[1]&&(t=e.split("|")),"undefined"==typeof t[1]&&(t=e.split("%7C")),t},getXdmFieldValue:function(e,t){var n="",r=OSF.OUtil.parseXdmInfo(t);if(r){var i=OSF.OUtil.getInfoItems(r);if(void 0!=i&&i.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:n=i[2];break;case OSF.XdmFieldName.AppId:n=i[1]}}return n},validateParamObject:function(e,t,n){var r=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:!1},{name:"expectedProperties",type:Object,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0}]);if(r)throw r;for(var i in t)if(r=Function._validateParameter(e[i],t[i],i))throw r},writeProfilerMark:function(e){window.msWriteProfilerMark&&(window.msWriteProfilerMark(e),OsfMsAjaxFactory.msAjaxDebug.trace(e))},outputDebug:function(e){"undefined"!==typeof OsfMsAjaxFactory&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(e)},defineNondefaultProperty:function(e,t,n,r){for(var i in n=n||{},r){var o=r[i];void 0==n[o]&&(n[o]=!0)}return Object.defineProperty(e,t,n),e},defineNondefaultProperties:function(e,t,n){for(var r in t=t||{})OSF.OUtil.defineNondefaultProperty(e,r,t[r],n);return e},defineEnumerableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["enumerable"])},defineEnumerableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["enumerable"])},defineMutableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["writable","enumerable","configurable"])},defineMutableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["writable","enumerable","configurable"])},finalizeProperties:function(e,t){t=t||{};for(var n=Object.getOwnPropertyNames(e),r=n.length,i=0;i>8,a=255&n,u[s++]=i>>2,u[s++]=(3&i)<<4|o>>4,u[s++]=(15&o)<<2|a>>6,u[s++]=63&a,isNaN(n)||(i=n>>8,o=255&r,a=r>>8,u[s++]=i>>2,u[s++]=(3&i)<<4|o>>4,u[s++]=(15&o)<<2|a>>6,u[s++]=63&a),isNaN(n)?u[s-1]=64:isNaN(r)&&(u[s-2]=64,u[s-1]=64);for(var p=0;p=2?n[r-2]+"."+n[r-1]:1==r?n[0]:void 0},isiOS:function(){return!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)},isChrome:function(){return window.navigator.userAgent.indexOf("Chrome")>0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},startsWith:function(e,t,n){return n?e.substr(0,t.length)===t:e.startsWith(t)},containsPort:function(e,t,n,r){return this.startsWith(e,t+"//"+n+":"+r,!0)||this.startsWith(e,n+":"+r,!0)},getRedundandPortString:function(e,t){return e&&t?"https:"==t.protocol&&this.containsPort(e,"https:",t.hostname,"443")?":443":"http:"==t.protocol&&this.containsPort(e,"http:",t.hostname,"80")?":80":"":""},removeChar:function(e,t){return t=e.length)return this.removeChar(e,n);if("/"===t){if("?"===e.charAt(n+1)||"#"===e.charAt(n+1))return this.removeChar(e,n)}else if("?"===t&&"#"===e.charAt(n+1))return this.removeChar(e,n)}return e},cleanUrl:function(e){if(e=this.cleanUrlOfChar(e,"/"),e=this.cleanUrlOfChar(e,"?"),"https://"==(e=this.cleanUrlOfChar(e,"#")).substr(0,8))-1!=(t=e.indexOf(":443"))&&(t!=e.length-4&&"/"!=e.charAt(t+4)&&"?"!=e.charAt(t+4)&&"#"!=e.charAt(t+4)||(e=e.substring(0,t)+e.substring(t+4)));else if("http://"==e.substr(0,7)){var t;-1!=(t=e.indexOf(":80"))&&(t!=e.length-3&&"/"!=e.charAt(t+3)&&"?"!=e.charAt(t+3)&&"#"!=e.charAt(t+3)||(e=e.substring(0,t)+e.substring(t+3)))}return e},parseUrl:function(e,t){if(void 0===t&&(t=!1),"undefined"!==typeof e&&e){var n=this.isIE(),r={protocol:void 0,hostname:void 0,host:void 0,port:void 0,pathname:void 0,search:void 0,hash:void 0,isPortPartOfUrl:void 0};try{if(n){var i=document.createElement("a");if(i.href=e,!i||!i.protocol||!i.host||!i.hostname||!i.href||this.cleanUrl(i.href).toLowerCase()!==this.cleanUrl(e).toLowerCase())throw"InvalidUrl";if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=i.protocol)throw new Error("NotHttps");var o=this.getRedundandPortString(e,i);r.protocol=i.protocol,r.hostname=i.hostname,r.port=""==o?i.port:"",r.host=""!=o?i.hostname:i.host,r.pathname=(n?"/":"")+i.pathname,r.search=i.search,r.hash=i.hash,r.isPortPartOfUrl=this.containsPort(e,i.protocol,i.hostname,i.port)}else{var a=new URL(e);if(a&&a.protocol&&a.host&&a.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=a.protocol)throw new Error("NotHttps");r.protocol=a.protocol,r.hostname=a.hostname,r.port=a.port,r.host=a.host,r.pathname=a.pathname,r.search=a.search,r.hash=a.hash,r.isPortPartOfUrl=a.host.lastIndexOf(":"+a.port)==a.host.length-a.port.length-1}}}catch(e){if("NotHttps"===e.message)throw e}return r}},shallowCopy:function(e){if(null==e)return null;if(e instanceof Object){if(Array.isArray(e)){for(var t=[],n=0;ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(e=l(e),n=t?e.length-1:0,0===e.length)return null;for(;!i&&n>=0&&ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(r=function(e,t){for(var n=0;n=0&&ie.length)return!1;if(e.substr(e.length-t.length)===t)return!0}return!1},hashCode:function(e){var t=0;if(!OSF.OUtil.isNullOrUndefined(e))for(var n=0,r=e.length;n0;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[n%16],n=Math.floor(n/16);for(;r<32;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[Math.floor(16*Math.random())];return t}}}();try{!function(){OSF.Flights=OSF.OUtil.parseFlights(!0)}()}catch(e){}window.OSF=OSF,OSF.OUtil.setNamespace("OSF",window),OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3},OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614,Visio:8388615,OneNoteAndroid:4194305},OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"},OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"},OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20,UpdateTargetUrl:21,InstallCustomFunctions:22,SendTelemetryEvent:23,UninstallCustomFunctions:24,SendMessage:25,LaunchExtensionComponent:26,StopExtensionComponent:27,RestartExtensionComponent:28,EnableTaskPaneHeaderButton:29,DisableTaskPaneHeaderButton:30,TaskPaneHeaderButtonClicked:31,RemoveAppCommandsAddin:32,RefreshRibbonGallery:33,GetOriginalControlId:34,OfficeJsReady:35,InsertDevManifest:36,InsertDevManifestError:37,SendCustomerContent:38,KeyboardShortcuts:39},OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"},OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006},OSF.OfficeAppContext=function(e,t,n,r,i,o,a,s,l,c,u,d,f,p,h,g,m,y,v,b,O,S,C,_,A,D,E){this._id=e,this._appName=t,this._appVersion=n,this._appUILocale=r,this._dataLocale=i,this._docUrl=o,this._clientMode=a,this._settings=s,this._reason=l,this._osfControlType=c,this._eToken=u,this._correlationId=d,this._appInstanceId=f,this._touchEnabled=p,this._commerceAllowed=h,this._appMinorVersion=g,this._requirementMatrix=m,this._hostCustomMessage=y,this._hostFullVersion=v,this._isDialog=!1,this._clientWindowHeight=b,this._clientWindowWidth=O,this._addinName=S,this._appDomains=C,this._dialogRequirementMatrix=_,this._featureGates=A,this._officeTheme=D,this._initialDisplayMode=E,this.get_id=function(){return this._id},this.get_appName=function(){return this._appName},this.get_appVersion=function(){return this._appVersion},this.get_appUILocale=function(){return this._appUILocale},this.get_dataLocale=function(){return this._dataLocale},this.get_docUrl=function(){return this._docUrl},this.get_clientMode=function(){return this._clientMode},this.get_bindings=function(){return this._bindings},this.get_settings=function(){return this._settings},this.get_reason=function(){return this._reason},this.get_osfControlType=function(){return this._osfControlType},this.get_eToken=function(){return this._eToken},this.get_correlationId=function(){return this._correlationId},this.get_appInstanceId=function(){return this._appInstanceId},this.get_touchEnabled=function(){return this._touchEnabled},this.get_commerceAllowed=function(){return this._commerceAllowed},this.get_appMinorVersion=function(){return this._appMinorVersion},this.get_requirementMatrix=function(){return this._requirementMatrix},this.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix},this.get_hostCustomMessage=function(){return this._hostCustomMessage},this.get_hostFullVersion=function(){return this._hostFullVersion},this.get_isDialog=function(){return this._isDialog},this.get_clientWindowHeight=function(){return this._clientWindowHeight},this.get_clientWindowWidth=function(){return this._clientWindowWidth},this.get_addinName=function(){return this._addinName},this.get_appDomains=function(){return this._appDomains},this.get_featureGates=function(){return this._featureGates},this.get_officeTheme=function(){return this._officeTheme},this.get_initialDisplayMode=function(){return this._initialDisplayMode?this._initialDisplayMode:0}},OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1},OSF.ClientMode={ReadOnly:0,ReadWrite:1},OSF.OUtil.setNamespace("Microsoft",window),OSF.OUtil.setNamespace("Office",Microsoft),OSF.OUtil.setNamespace("Client",Microsoft.Office),OSF.OUtil.setNamespace("WebExtension",Microsoft.Office),Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",ControlActivation:"controlActivation"},Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"},Microsoft.Office.WebExtension.FilterType={All:"all"},Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",JsonData:"jsonData",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",AllowConsentPrompt:"allowConsentPrompt",ForMSGraphAccess:"forMSGraphAccess",AllowSignInPrompt:"allowSignInPrompt",JsonPayload:"jsonPayload",EnableNewHosts:"enableNewHosts",AccountTypeFilter:"accountTypeFilter",AddinTrustId:"addinTrustId",Reserved:"reserved",Tcid:"tcid",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo",TargetOrigin:"targetOrigin",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64",FormId:"formId"},OSF.OUtil.setNamespace("DDA",OSF),OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0},OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"},OSF.DDA.EventDescriptors={},OSF.DDA.ListDescriptors={},OSF.DDA.UI={},OSF.DDA.getXdmEventName=function(e,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?e+"_"+t:t},OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetAuthContextMethod:99,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidInsertFormMethod:106,dispidDisplayRibbonCalloutAsyncMethod:109,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidExecuteFeature:146,dispidQueryFeature:147,dispidGetNestedAppAuthContextMethod:205,dispidMethodMax:205},OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidOlkRecurrenceChangedEvent:49,dispidOlkAttachmentsChangedEvent:50,dispidOlkEnhancedLocationsChangedEvent:51,dispidOlkInfobarClickedEvent:52,dispidOlkSelectedItemsChangedEvent:53,dispidOlkSensitivityLabelChangedEvent:54,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63},OSF.DDA.ErrorCodeManager=function(){var e={};return{getErrorArgs:function(t){var n=e[t];return n?(n.name||(n.name=e[this.errorCodes.ooeInternalError].name),n.message||(n.message=e[this.errorCodes.ooeInternalError].message)):n=e[this.errorCodes.ooeInternalError],n},addErrorMessage:function(t,n){e[t]=n},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeOperationCancelled:5014,ooeWorkbookHidden:5015,ooeWriteNotSupportedWhenModalDialogOpen:5016,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeRequestPayloadSizeLimitExceeded:5103,ooeResponsePayloadSizeLimitExceeded:5104,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeModalDialogOpen:12012,ooeDocumentIsInactive:12013,ooeDialogParentIsMinimized:12014,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010,ooeResourceNotAllowed:13011,ooeSSOUnsupportedPlatform:13012,ooeSSOCallThrottled:13013,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(t){e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden]={name:t.L_APICallFailed,message:t.L_WorkbookHiddenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen]={name:t.L_APICallFailed,message:t.L_WriteNotSupportedWhenModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_RequestPayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_ResponsePayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen]={name:t.L_DisplayDialogError,message:t.L_ModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive]={name:t.L_DisplayDialogError,message:t.L_DocumentIsInactive},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized]={name:t.L_DisplayDialogError,message:t.L_DialogParentIsMinimized},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:t.L_APINotSupported,message:t.L_SSOUnsupportedPlatform},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:t.L_OperationCancelledError,message:t.L_OperationCancelledErrorMessage}}}}(),function(e){!function(e){var t=function(){return function(){}}();e.RequirementVersion=t;var n=function(){return function(e){this.isSetSupported=function(e,t){if(void 0==e)return!1;void 0==t&&(t=0);var n=this._setMap._sets;if(n.hasOwnProperty(e.toLowerCase())){var r=n[e.toLowerCase()];try{var i=this._getVersion(r);t+="";var o=this._getVersion(t);if(i.major>0&&i.major>o.major)return!0;if(i.major>0&&i.minor>=0&&i.major==o.major&&i.minor>=o.minor)return!0}catch(e){return!1}}return!1},this._getVersion=function(e){var t=(e+="").split("."),n=0,r=0;if(t.length<2&&isNaN(Number(e)))throw"version format incorrect";if(n=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(n)||isNaN(r))throw"version format incorrect";return{minor:r,major:n}},this._setMap=e,this.isSetSupported=this.isSetSupported.bind(this)}}();e.RequirementMatrix=n;var r=function(){return function(e){this._addSetMap=function(e){for(var t in e)this._sets[t]=e[t]},this._sets=e}}();e.DefaultSetRequirement=r;var i=function(e){function t(){return e.call(this,{dialogapi:1.1})||this}return __extends(t,e),t}(r);e.DefaultRequiredDialogSetRequirement=i;var o=function(e){function t(){return e.call(this,{dialogorigin:1.1})||this}return __extends(t,e),t}(r);e.DefaultOptionalDialogSetRequirement=o;var a=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,excelapi:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelClientDefaultSetRequirement=a;var s=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(a);e.ExcelClientV1DefaultSetRequirement=s;var l=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookClientDefaultSetRequirement=l;var c=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1,wordapi:1.1})||this}return __extends(t,e),t}(r);e.WordClientDefaultSetRequirement=c;var u=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:1.1}),t}return __extends(t,e),t}(c);e.WordClientV1DefaultSetRequirement=u;var d=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointClientDefaultSetRequirement=d;var f=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(d);e.PowerpointClientV1DefaultSetRequirement=f;var p=function(e){function t(){return e.call(this,{selection:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ProjectClientDefaultSetRequirement=p;var h=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,file:1.1})||this}return __extends(t,e),t}(r);e.ExcelWebDefaultSetRequirement=h;var g=function(e){function t(){return e.call(this,{compressedfile:1.1,documentevents:1.1,file:1.1,imagecoercion:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablecoercion:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordWebDefaultSetRequirement=g;var m=function(e){function t(){return e.call(this,{activeview:1.1,settings:1.1})||this}return __extends(t,e),t}(r);e.PowerpointWebDefaultSetRequirement=m;var y=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookWebDefaultSetRequirement=y;var v=function(e){function t(){return e.call(this,{activeview:1.1,documentevents:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.SwayWebDefaultSetRequirement=v;var b=function(e){function t(){return e.call(this,{bindingevents:1.1,partialtablebindings:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1})||this}return __extends(t,e),t}(r);e.AccessWebDefaultSetRequirement=b;var O=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelIOSDefaultSetRequirement=O;var S=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordIOSDefaultSetRequirement=S;var C=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2}),t}return __extends(t,e),t}(S);e.WordIOSV1DefaultSetRequirement=C;var _=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointIOSDefaultSetRequirement=_;var A=function(e){function t(){return e.call(this,{mailbox:1.1})||this}return __extends(t,e),t}(r);e.OutlookIOSDefaultSetRequirement=A;var D=function(){function e(){}return e.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},e.getDefaultRequirementMatrix=function(t){this.initializeDefaultSetMatrix();var i=void 0,o=t.get_requirementMatrix();if(void 0!=o&&o.length>0&&"undefined"!==typeof JSON){var a=JSON.parse(t.get_requirementMatrix().toLowerCase());i=new n(new r(a))}else{var s=e.getClientFullVersionString(t);i=void 0!=e.DefaultSetArrayMatrix&&void 0!=e.DefaultSetArrayMatrix[s]?new n(e.DefaultSetArrayMatrix[s]):new n(new r({}))}return i},e.getDefaultDialogRequirementMatrix=function(e){var t=void 0,a=e.get_dialogRequirementMatrix();if(void 0!=a&&a.length>0&&"undefined"!==typeof JSON){var s=JSON.parse(e.get_requirementMatrix().toLowerCase());t=new r(s)}else{t=new i;var l=e.get_requirementMatrix();if(void 0!=l&&l.length>0&&"undefined"!==typeof JSON){s=JSON.parse(l.toLowerCase());for(var c in t._sets)s.hasOwnProperty(c)&&(t._sets[c]=s[c]);var u=new o;for(var c in u._sets)s.hasOwnProperty(c)&&(t._sets[c]=s[c])}}return new n(t)},e.getClientFullVersionString=function(e){var t=e.get_appMinorVersion(),n="",r="",i=e.get_appName();return(1024==i||4096==i||8192==i||65536==i)&&1==e.get_appVersion()?r=4096==i&&t>=15?"16.00.01":"16.00":64==e.get_appName()?r=e.get_appVersion():(n=t<10?"0"+t:""+t,r=e.get_appVersion()+"."+n),e.get_appName()+"-"+r},e.initializeDefaultSetMatrix=function(){e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1600]=new a,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1600]=new c,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1600]=new d,e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1601]=new s,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1601]=new u,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1601]=new f,e.DefaultSetArrayMatrix[e.Outlook_RCLIENT_1600]=new l,e.DefaultSetArrayMatrix[e.Excel_WAC_1600]=new h,e.DefaultSetArrayMatrix[e.Word_WAC_1600]=new g,e.DefaultSetArrayMatrix[e.Outlook_WAC_1600]=new y,e.DefaultSetArrayMatrix[e.Outlook_WAC_1601]=new y,e.DefaultSetArrayMatrix[e.Project_RCLIENT_1600]=new p,e.DefaultSetArrayMatrix[e.Access_WAC_1600]=new b,e.DefaultSetArrayMatrix[e.PowerPoint_WAC_1600]=new m,e.DefaultSetArrayMatrix[e.Excel_IOS_1600]=new O,e.DefaultSetArrayMatrix[e.SWAY_WAC_1600]=new v,e.DefaultSetArrayMatrix[e.Word_IOS_1600]=new S,e.DefaultSetArrayMatrix[e.Word_IOS_16001]=new C,e.DefaultSetArrayMatrix[e.PowerPoint_IOS_1600]=new _,e.DefaultSetArrayMatrix[e.Outlook_IOS_1600]=new A},e.Excel_RCLIENT_1600="1-16.00",e.Excel_RCLIENT_1601="1-16.01",e.Word_RCLIENT_1600="2-16.00",e.Word_RCLIENT_1601="2-16.01",e.PowerPoint_RCLIENT_1600="4-16.00",e.PowerPoint_RCLIENT_1601="4-16.01",e.Outlook_RCLIENT_1600="8-16.00",e.Excel_WAC_1600="16-16.00",e.Word_WAC_1600="32-16.00",e.Outlook_WAC_1600="64-16.00",e.Outlook_WAC_1601="64-16.01",e.Project_RCLIENT_1600="128-16.00",e.Access_WAC_1600="256-16.00",e.PowerPoint_WAC_1600="512-16.00",e.Excel_IOS_1600="1024-16.00",e.SWAY_WAC_1600="2048-16.00",e.Word_IOS_1600="4096-16.00",e.Word_IOS_16001="4096-16.00.01",e.PowerPoint_IOS_1600="8192-16.00",e.Outlook_IOS_1600="65536-16.00",e.DefaultSetArrayMatrix={},e}();e.RequirementsMatrixFactory=D}(e.Requirement||(e.Requirement={}))}(OfficeExt||(OfficeExt={})),OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"},Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"},OSF.NamespaceManager=function(){var e,t=!1;return{enableShortcut:function(){t||(window.Office?e=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,t=!0)},disableShortcut:function(){t&&(e?window.Office=e:OSF.OUtil.unsetNamespace("Office",window),t=!1)}}}(),OSF.NamespaceManager.enableShortcut(),Microsoft.Office.WebExtension.useShortNamespace=function(e){e?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()},Microsoft.Office.WebExtension.select=function(e,t){var n;if(e&&"string"==typeof e){var r=e.indexOf("#");if(-1!=r){var i=e.substring(0,r),o=e.substring(r+1);switch(i){case"binding":case"bindings":o&&(n=new OSF.DDA.BindingPromise(o))}}}if(n)return n.onFail=t,n;if(t){var a=typeof t;if("function"!=a)throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,a);var s={};s[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}},OSF.DDA.Context=function(e,t,n,r,i){if(OSF.OUtil.defineEnumerableProperties(this,{contentLanguage:{value:e.get_dataLocale()},displayLanguage:{value:e.get_appUILocale()},touchEnabled:{value:e.get_touchEnabled()},commerceAllowed:{value:e.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},isDialog:{value:OSF._OfficeAppFactory.getHostInfo().isDialog},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(e.get_hostFullVersion())}}),n&&OSF.OUtil.defineEnumerableProperty(this,"license",{value:n}),e.ui&&OSF.OUtil.defineEnumerableProperty(this,"ui",{value:e.ui}),e.auth&&OSF.OUtil.defineEnumerableProperty(this,"auth",{value:e.auth}),e.webAuth&&OSF.OUtil.defineEnumerableProperty(this,"webAuth",{value:e.webAuth}),e.application&&OSF.OUtil.defineEnumerableProperty(this,"application",{value:e.application}),e.extensionLifeCycle&&OSF.OUtil.defineEnumerableProperty(this,"extensionLifeCycle",{value:e.extensionLifeCycle}),e.messaging&&OSF.OUtil.defineEnumerableProperty(this,"messaging",{value:e.messaging}),e.ui&&e.ui.taskPaneAction&&OSF.OUtil.defineEnumerableProperty(this,"taskPaneAction",{value:e.ui.taskPaneAction}),e.ui&&e.ui.ribbonGallery&&OSF.OUtil.defineEnumerableProperty(this,"ribbonGallery",{value:e.ui.ribbonGallery}),e.get_isDialog()){var o=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(e);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:o})}else{if(t&&OSF.OUtil.defineEnumerableProperty(this,"document",{value:t}),r){var a=r.displayName||"appOM";delete r.displayName,OSF.OUtil.defineEnumerableProperty(this,a,{value:r})}e.get_officeTheme()?OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return e.get_officeTheme()}}):i&&OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return i()}});o=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(e);if(OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:o}),e.get_featureGates){var s=e.get_featureGates();if(s&&s.EnablePublicThemeManager){var l=new OSF.DDA.Theming.InternalThemeHandler;l.InitializeThemeManager(),OSF.OUtil.defineEnumerableProperty(this,"themeManager",{value:l})}}}},OSF.DDA.OutlookContext=function(e,t,n,r,i){OSF.DDA.OutlookContext.uber.constructor.call(this,e,null,n,r,i),t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t}),e.sensitivityLabelsCatalog&&OSF.OUtil.defineEnumerableProperty(this,"sensitivityLabelsCatalog",{value:e.sensitivityLabelsCatalog()})},OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context),OSF.DDA.OutlookAppOm=function(e,t,n){},OSF.DDA.Application=function(e){},OSF.DDA.Document=function(e,t){var n;switch(e.get_clientMode()){case OSF.ClientMode.ReadOnly:n=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:n=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t}),OSF.OUtil.defineMutableProperties(this,{mode:{value:n},url:{value:e.get_docUrl()}})},OSF.DDA.JsomDocument=function(e,t,n){OSF.DDA.JsomDocument.uber.constructor.call(this,e,n),t&&OSF.OUtil.defineEnumerableProperty(this,"bindings",{get:function(){return t}});var r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetSelectedDataAsync,r.SetSelectedDataAsync]),OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))},OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document),OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var e;return OSF&&OSF._OfficeAppFactory&&(e=OSF._OfficeAppFactory.getContext()),e}}),OSF.DDA.License=function(e){OSF.OUtil.defineEnumerableProperty(this,"value",{value:e})},OSF.DDA.ApiMethodCall=function(e,t,n,r,i){var o=e.length,a=OSF.OUtil.delayExecutionAndCache((function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,i)}));this.verifyArguments=function(e,t){for(var n in e){var r=e[n],i=t[n];if(r.enum)switch(typeof i){case"string":if(OSF.OUtil.listContainsValue(r.enum,i))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw a()}if(r.types&&!OSF.OUtil.listContainsValue(r.types,typeof i))throw a()}},this.extractRequiredArguments=function(t,n,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,a,c=e.length-1;c>=s;c--){var u=e[c];switch(typeof u){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);o=u;break;case"function":if(a)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);a=u;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}if(o=l.fillOptions(o,n,r,i),a){if(o[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;o[Microsoft.Office.WebExtension.Parameters.Callback]=a}return l.verifyArguments(t,o),o}(e,i,n,r);return l.constructCallArgs(i,o,n,r)},this.processResponse=function(e,t,n,o){return e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,n,o):t:i?i(e,t):OSF.DDA.ErrorCodeManager.getErrorArgs(e)},this.getCallArgs=function(e){for(var t,n,r=e.length-1;r>=s;r--){var i=e[r];switch(typeof i){case"object":t=i;break;case"function":n=i}}return t=t||{},n&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=n),t}},OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[],n=e.privateStateCallbacks?OSF.OUtil.createObject(e.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(e.requiredArguments||[],t,n,e.onSucceeded,e.onFailed,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.AsyncMethodCalls={},OSF.DDA.AsyncMethodCalls.define=function(e){OSF.DDA.AsyncMethodCalls[e.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(e)},OSF.DDA.Error=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{name:{value:e},message:{value:t},code:{value:n}})},OSF.DDA.AsyncResult=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:e[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}}),e[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:e[OSF.DDA.AsyncResultEnum.Properties.Context]}),t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})},OSF.DDA.issueAsyncResult=function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Callback];if(r){var i,o={};o[OSF.DDA.AsyncResultEnum.Properties.Context]=e[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?o[OSF.DDA.AsyncResultEnum.Properties.Value]=n:(i={},n=n||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=n.name||n,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=n.message||n),r(new OSF.DDA.AsyncResult(o,i))}},OSF.DDA.SyncMethodNames={},OSF.DDA.SyncMethodNames.addNames=function(e){for(var t in e){var n={};OSF.OUtil.defineEnumerableProperties(n,{id:{value:t},displayName:{value:e[t]}}),OSF.DDA.SyncMethodNames[t]=n}},OSF.DDA.SyncMethodCall=function(e,t,n,r,i){var o=e.length,a=new OSF.DDA.ApiMethodCall(e,t,n,r,i);this.verifyAndExtractCall=function(e,n,r){var i=a.extractRequiredArguments(e,n,r),s=function(e,n,r,i){if(e.length>o+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var s,l=e.length-1;l>=o;l--){var c=e[l];switch(typeof c){case"object":if(s)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);s=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}return s=a.fillOptions(s,n,r,i),a.verifyArguments(t,s),s}(e,i,n,r);return a.constructCallArgs(i,s,n,r)}},OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[];return new OSF.DDA.SyncMethodCall(e.requiredArguments||[],t,e.privateStateCallbacks,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.SyncMethodCalls={},OSF.DDA.SyncMethodCalls.define=function(e){OSF.DDA.SyncMethodCalls[e.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(e)},OSF.DDA.ListType=function(){var e={};return{setListType:function(t,n){e[t]=n},isListType:function(t){return OSF.OUtil.listContainsKey(e,t)},getDescriptor:function(t){return e[t]}}}(),OSF.DDA.HostParameterMap=function(e,t){var n={};function r(i,o){var a=i?{}:void 0;for(var s in i){var l,c=i[s];if(OSF.DDA.ListType.isListType(s))for(var u in l=[],c)l.push(r(c[u],o));else if(OSF.OUtil.listContainsKey(n,s))l=n[s][o](c);else if("fromHost"==o&&e.preserveNesting(s))l=r(c,o);else{var d=t[s];if(d){var f=d[o];f&&void 0===(l=f[c])&&(l=c)}else l=c}a[s]=l}return a}function i(n,i,o){var a,s=t[n][o];if("toHost"==o)a=function n(r,i){var o;for(var a in i){var s;if(void 0!=(s=e.isComplexType(a)?n(r,t[a].toHost):r[a])){o||(o={});var l=i[a];"self"==l&&(l=a),o[l]=e.pack(a,s)}}return o}(r(i,o),s);else if("fromHost"==o){a=r(function n(r,i,o){for(var a in o||(o={}),i){var s,l,c=i[a];if("self"==c)s=r;else{if("sourceData"==c){o[a]=r.toArray();continue}s=r[c]}if(null===s||void 0===s)o[a]=void 0;else if(s=e.unpack(a,s),e.isComplexType(a))l=t[a].fromHost,e.preserveNesting(a)?o[a]=n(s,l):n(s,l,o);else if(OSF.DDA.ListType.isListType(a)){(l={})[OSF.DDA.ListType.getDescriptor(a)]="self";var u=new Array(s.length);for(var d in s)u[d]=n(s[d],l);o[a]=u}else o[a]=s}return o}(i,s),o)}return a}n[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(e){if(null!=e&&void 0!==e.rows){var t={};t[OSF.DDA.TableDataProperties.TableRows]=e.rows,t[OSF.DDA.TableDataProperties.TableHeaders]=e.headers,e=t}return e},fromHost:function(e){return e}},n[Microsoft.Office.WebExtension.Parameters.JsonData]={toHost:function(e){return e},fromHost:function(e){return"string"===typeof e?JSON.parse(e):e}},n[Microsoft.Office.WebExtension.Parameters.SampleData]=n[Microsoft.Office.WebExtension.Parameters.Data],t||(t={}),this.addMapping=function(e,n){var r,i;if(n.map)for(var o in i={},r=n.map){var a=r[o];"self"==a&&(a=o),i[a]=o}else r=n.toHost,i=n.fromHost;var s=t[e];if(s){var l=s.toHost;for(var c in l)r[c]=l[c];for(var u in l=s.fromHost)i[u]=l[u]}else s=t[e]={};s.toHost=r,s.fromHost=i},this.toHost=function(e,t){return i(e,t,"toHost")},this.fromHost=function(e,t){return i(e,t,"fromHost")},this.self="self",this.sourceData="sourceData",this.addComplexType=function(t){e.addComplexType(t)},this.getDynamicType=function(t){return e.getDynamicType(t)},this.setDynamicType=function(t,n){e.setDynamicType(t,n)},this.dynamicTypes=n,this.doMapValues=function(e,t){return r(e,t)}},OSF.DDA.SpecialProcessor=function(e,t){this.addComplexType=function(t){e.push(t)},this.getDynamicType=function(e){return t[e]},this.setDynamicType=function(e,n){t[e]=n},this.isComplexType=function(t){return OSF.OUtil.listContainsValue(e,t)},this.isDynamicType=function(e){return OSF.OUtil.listContainsKey(t,e)},this.preserveNesting=function(e){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,e)},this.pack=function(e,n){return this.isDynamicType(e)?t[e].toHost(n):n},this.unpack=function(e,n){return this.isDynamicType(e)?t[e].fromHost(n):n}},OSF.DDA.getDecoratedParameterMap=function(e,t){var n=new OSF.DDA.HostParameterMap(e);n.self;function r(e){var t=null;if(e){t={};for(var n=e.length,r=0;r0){for(var r=[],i=0;i=i)break;if(r=Function._validateParameter(e[o],s,l))return r.popStackFrame(),r}return null}),Function._validateParameterCount||(Function._validateParameterCount=function(e,t,r){var i,o,a=t.length,s=e.length;if(sa)for(o=!0,i=0;i0&&t.push(o)}}}catch(e){}return t}var t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){return{toHost:function(e){if(OSF.DDA.TableDataProperties&&"string"!=typeof e&&void 0!==e[OSF.DDA.TableDataProperties.TableRows]){var t=[];t[0]=e[OSF.DDA.TableDataProperties.TableRows],t[1]=e[OSF.DDA.TableDataProperties.TableHeaders],e=t}return e},fromHost:function(t){var n;if(t.toArray)if(2===t.dimensions())n=e(t);else{var r=t.toArray();2===r.length&&(null!=r[0]&&r[0].toArray||null!=r[1]&&r[1].toArray)?((n={})[OSF.DDA.TableDataProperties.TableRows]=e(r[0]),n[OSF.DDA.TableDataProperties.TableHeaders]=e(r[1])):n=r}else n=t;return n}}}(),OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,[],t),this.unpack=function(e,n){var r;this.isComplexType(e)||OSF.DDA.ListType.isListType(e)?r=void 0!==n&&void 0!==n.toArray?n.toArray():n||{}:r=this.isDynamicType(e)?t[e].fromHost(n):n;return r}},OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor),OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]}),OSF.DDA.SafeArray.Delegate.executeAsync=function(e){function t(e){var n=e;if(null!=e&&e.toArray){var r=e.toArray();n=new Array(r.length);for(var i=0;i2){a=[];for(var s=1;s=2){t[0];n=t[1]}if(r)return r(new e.WebViewSafeArray(n))}))},t.prototype.registerEvent=function(t,n,r,i){this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.RegisterEvent,t,n,(function(t){var n=t,i=0;OSF.OUtil.isArray(t)&&t.length>=2&&(i=t[0],n=t[1]),r&&r(i,new e.WebViewSafeArray(n))}),(function(t){if(i)return i(new e.WebViewSafeArray(t))}))},t.prototype.unregisterEvent=function(t,n,r){this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.UnregisterEvent,t,n,(function(t){return r(new e.WebViewSafeArray(t))}))},t.prototype.messageParent=function(e){var t=e[Microsoft.Office.WebExtension.Parameters.MessageToParent],n=e[Microsoft.Office.WebExtension.Parameters.TargetOrigin];n||(n=window.location.origin);var r={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(r),n)},t.prototype.openDialog=function(e,n,r,i){var o=JSON.parse(n),a=o.url;if(a){var s=a.split("#"),l="?";a.indexOf("?")>-1&&(l="&");var c="width="+screen.width*o.width/100+", height="+screen.height*o.height/100;s[0]=s[0].concat(l).concat("action=displayDialog");var u,d=s.join("#");t.popup=window.open(d,"",c),window.addEventListener("message",(function(n){if(n.source==t.popup)try{var i=JSON.parse(n.data);i.dialogMessage&&r(e,[OSF.DialogMessageType.DialogMessageReceived,i.dialogMessage.messageContent,n.origin])}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handled. Message:"+n.data)}})),u=window.setInterval((function(){try{(null==t.popup||t.popup.closed)&&(window.clearInterval(u),r(e,[OSF.DialogMessageType.DialogClosed]))}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}),1e3),i(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}},t.prototype.closeDialog=function(e,n,r){t.popup?(t.popup.close(),t.popup=null,r(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):r(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},t.prototype.sendMessage=function(e){var t=e[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString()),this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.SendMessage,t,null)},t.prototype.closeSdxDialog=function(e){},t.prototype.resizeSdxDialog=function(e,t){},t}();e.WebViewHostController=t}(OSFWebView||(OSFWebView={})),function(e){!function(e){e[e.MethodCallback=0]="MethodCallback",e[e.EventCallback=1]="EventCallback"}(e.CallbackType||(e.CallbackType={}));var t=function(){return function(e,t,n){this.callbackType=e,this.callbackId=t,this.params=n}}();e.CallbackData=t}(CrossIFrameCommon||(CrossIFrameCommon={})),function(e){var t=function(){function e(){}return e.getInstance=function(){return null==e.uniqueInstance&&(e.uniqueInstance=new e),e.uniqueInstance},e.prototype.postMessage=function(e,t){agaveHost.postMessage(t)},e.prototype.ReceiveMessage=function(e){switch(e.callbackType){case CrossIFrameCommon.CallbackType.MethodCallback:OSFWebView.ScriptMessaging.agaveHostCallback(e.callbackId,e.params);break;case CrossIFrameCommon.CallbackType.EventCallback:OSFWebView.ScriptMessaging.agaveHostEventCallback(e.callbackId,e.params)}},e}();e.Poster=t}(Android||(Android={})),OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(e){return function(t){var n=function(e,n){t.onReceiving&&t.onReceiving(),t.onComplete&&t.onComplete(e,n)};try{e(t.hostCallArgs,t.onCalling,n)}catch(e){n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,{name:Strings.OfficeOM.L_InternalError,message:e})}}},read:function(e,t){e&&e();OSF._OfficeAppFactory.getInitializationHelper().getAppContext(null,(function(e){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,e.get_settings())}))},write:function(e,t,n,r){var i={},o=[],a=[];for(var s in e)o.push(s),a.push(e[s]);i.keys=o,i.values=a,n&&n();OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.WriteSettings,i,(function(e){r&&r(e[0],null)}))}},OSF.InitializationHelper.prototype.initializeSettings=function(e,t){var n=e.get_settings();return this.deserializeSettings(n,t)},OSF.InitializationHelper.prototype.getAppContext=function(e,t){var n;n=this._hostInfo.isDialog?OSF.WebView.PopupMessageHandlerName:OSF.WebView.MessageHandlerName,OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(n,OSF.WebView.MethodId.GetContext,[],(function(e){var n,r=OSF.WebView.AppContextProperties,i=e[r.AppType],o=!1;for(var a in OSF.AppName)if(OSF.AppName[a]==i){o=!0;break}if(!o)throw"Unsupported client type "+i;for(var s=e[r.Settings],l={},c=s[0],u=s[1],d=0;dn[i])return!1}return!1},e.prototype.isDirectToAriaEnabled=function(){if(void 0===this.EnableDirectToAria||null===this.EnableDirectToAria){var e=void 0,t=void 0;OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&(e=OSF._OfficeAppFactory.getHostInfo().hostPlatform),window.external&&"undefined"!==typeof window.external.GetContext&&"undefined"!==typeof window.external.GetContext().GetHostFullVersion&&(t=window.external.GetContext().GetHostFullVersion()),this.EnableDirectToAria=this.shouldSendDirectToAria(e,t)}return this.EnableDirectToAria},e.prototype.sendTelemetry=function(t,n){e.EnableSendingTelemetryWithLegacyAria&&this.isDirectToAriaEnabled()&&OSF.OUtil.loadScript(this.getAriaCDNLocation(),(function(){try{if(!this.ALogger){this.ALogger=AWTLogManager.initialize("db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439")}var e=new AWTEventProperties;for(var r in e.setName("Office.Extensibility.OfficeJS."+t),n)"table"!==r.toLowerCase()&&e.setProperty(r,n[r]);var i=new Date;e.setProperty("Date",i.toISOString()),this.ALogger.logEvent(e)}catch(e){}}),1e3),e.EnableSendingTelemetryWithOTel&&i(t,n)},e.prototype.logData=function(e){this.isIUsageData(e)?this.sendTelemetry(e.Table,e.Fields):this.sendTelemetry(e.Table,e)},e.EnableSendingTelemetryWithOTel=!0,e.EnableSendingTelemetryWithLegacyAria=!1,e}();e.AriaLogger=o}(OSFAriaLogger||(OSFAriaLogger={})),function(e){"use strict";var t,n=OSF.OUtil.Guid.generateNewGuid(),r="",i=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i");e.enableTelemetry=!0;var o=function(){return function(){}}();e.AppInfo=o;var a=function(){return function(e,t){this.name=e,this.handler=t}}(),s=function(){function e(){this.clientIDKey="Office API client",this.logIdSetKey="Office App Log Id Set"}return e.prototype.getClientId=function(){var e=this.getValue(this.clientIDKey);return(!e||e.length<=0||e.length>40)&&(e=OSF.OUtil.Guid.generateNewGuid(),this.setValue(this.clientIDKey,e)),e},e.prototype.saveLog=function(e,t){var n=this.getValue(this.logIdSetKey);n=(n&&n.length>0?n+";":"")+e,this.setValue(this.logIdSetKey,n),this.setValue(e,t)},e.prototype.enumerateLog=function(e,t){var n=this.getValue(this.logIdSetKey);if(n){var r=n.split(";");for(var i in r){var o=r[i],a=this.getValue(o);a&&(e&&e(o,a),t&&this.remove(o))}t&&this.remove(this.logIdSetKey)}},e.prototype.getValue=function(e){var t=OSF.OUtil.getLocalStorage(),n="";return t&&(n=t.getItem(e)),n},e.prototype.setValue=function(e,t){var n=OSF.OUtil.getLocalStorage();n&&n.setItem(e,t)},e.prototype.remove=function(e){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(e)}catch(e){}},e}(),l=function(){function t(){}return t.prototype.LogData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(e){}},t.prototype.LogRawData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(e){}},t}();function c(e){return e&&(e=e.replace(/[{}]/g,"").toLowerCase()),e||""}function u(e,t){var i=new OSFLog.AppInitializationUsageData;i.CorrelationId=c(r),i.SessionId=n,i.SuccessCode=e?1:0,i.Message=t,(new l).LogData(i)}function d(){var e=0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.PublicAddin);return e||!!t&&p(OSF._OfficeAppFactory.getHostInfo().hostPlatform,t.hostVersion)}function f(e,t){return d()||t!==e?t:"PRIVATE"}function p(e,t){var n=!1,r=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(t);if(r){var i=parseInt(r[1]),o=parseInt(r[2]),a=parseInt(r[3]);"win32"==e?(i<16||16==i&&a<14225)&&(n=!0):"mac"==e&&(i<16||16==i&&(o<52||52==o&&a<808))&&(n=!0)}return n}function h(){return 0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.IsMos)}e.initialize=function(r){if(e.enableTelemetry&&!t){t=new o,r.get_hostFullVersion()?t.hostVersion=r.get_hostFullVersion():t.hostVersion=r.get_appVersion(),t.appId=d()?r.get_id():"PRIVATE",t.marketplaceType=r._marketplaceType,t.browser=window.navigator.userAgent,t.correlationId=c(r.get_correlationId()),t.clientId=(new s).getClientId(),t.appInstanceId=r.get_appInstanceId(),t.appInstanceId&&(t.appInstanceId=c(t.appInstanceId),t.appInstanceId=f(r.get_id(),t.appInstanceId)),t.message=r.get_hostCustomMessage(),t.officeJSVersion=OSF.ConstantNames.FileVersion,t.hostJSVersion="0.0.0.0",r._wacHostEnvironment&&(t.wacHostEnvironment=r._wacHostEnvironment),void 0!==r._isFromWacAutomation&&null!==r._isFromWacAutomation&&(t.isFromWacAutomation=r._isFromWacAutomation.toString().toLowerCase());var l=r.get_docUrl();t.docUrl=i.test(l)?l:"";var u=location.href;u&&(u=u.split("?")[0].split("#")[0]),t.isMos=h(),t.appURL="",function(e,t){var n,r;t.assetId="",t.userId="";try{n=decodeURIComponent(e);var i=(r=(new DOMParser).parseFromString(n,"text/xml")).getElementsByTagName("t")[0].attributes.getNamedItem("cid"),o=r.getElementsByTagName("t")[0].attributes.getNamedItem("oid");i&&i.nodeValue?t.userId=i.nodeValue:o&&o.nodeValue&&(t.userId=o.nodeValue),t.assetId=r.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(e){}finally{n=null,r=null,null}}(r.get_eToken(),t),t.sessionId=n,"undefined"!==typeof OTel&&OTel.OTelLogger.initialize(t),function(){var t=new Date,n=null,r=0,i=!1,o=function(){document.hasFocus()?null==n&&(n=new Date):n&&(r+=Math.abs((new Date).getTime()-n.getTime()),n=null)},s=[];s.push(new a("focus",o)),s.push(new a("blur",o)),s.push(new a("focusout",o)),s.push(new a("focusin",o));var l=function(){for(var o=0;o0)for(var r=0;r0)for(var r=0;r0&&(this._eventHandlers[e]=[],!0)},clearObjectEventHandlers:function(e,t){return null!=this._objectEventHandlers[e]&&null!=this._objectEventHandlers[e][t]&&(this._objectEventHandlers[e][t]=[],!0)},getEventHandlerCount:function(e){return void 0!=this._eventHandlers[e]?this._eventHandlers[e].length:-1},getObjectEventHandlerCount:function(e,t){return null==this._objectEventHandlers[e]||null==this._objectEventHandlers[e][t]?0:this._objectEventHandlers[e][t].length},fireEvent:function(e){if(void 0==e.type)return!1;var t=e.type;if(t&&this._eventHandlers[t]){for(var n=this._eventHandlers[t],r=0;r0){for(var r=t[0];n.length>0;){r(n.shift())}return!0}}return!1},clearQueuedEvent:function(e){e&&this._eventHandlers[e]&&(this._queuedEventsArgs[e]&&(this._queuedEventsArgs[e]=[]))}},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureEventArgs=function(e,t,n){var r;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(n,t.document),n[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(n,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(n),"outlook"==OSF._OfficeAppFactory.getHostInfo().hostType&&"mac"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&OSF.DDA.convertOlkAppointmentTimeToDateFormat(r);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(e,n[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(e,n);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkItemSelectedChangedEventArgs(n),t.initialize(r.initialData),"win32"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform&&"mac"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform||t.setCurrentItemNumber(r.itemNumber.itemNumber);break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecipientsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecurrenceChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAttachmentsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.InfobarClicked:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkInfobarClickedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkSelectedItemsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkSensitivityLabelChangedEventArgs(n);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return r},OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]}),OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1},OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"}),OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent",MessageOrigin:"messageOrigin"}),OSF.DDA.DialogEventType={},OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"}),OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",DisplayModalDialogAsync:"displayModalDialogAsync",CloseAsync:"close"}),OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",MessageChild:"messageChild",SendMessage:"sendMessage",AddMessageHandler:"addEventHandler"}),OSF.DDA.UI.ParentUI=function(){var e;e=null!=Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived?new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]):new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]);var t=this,n=function(n,r){t[n]||OSF.OUtil.defineEnumerableProperty(t,n,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];n(arguments,e,t,r)}})};n(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,!1),Microsoft.Office.WebExtension.FeatureGates.ModalWebDialogAPI&&n(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName,!0),OSF.OUtil.finalizeProperties(this)},OSF.DDA.UI.ChildUI=function(e){var t=OSF.DDA.SyncMethodNames.MessageParent.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return e(arguments,n)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;n[r]||"undefined"==typeof OSF.DialogParentMessageEventDispatch||OSF.DDA.DispIdHost.addEventSupport(n,OSF.DialogParentMessageEventDispatch,e),OSF.OUtil.finalizeProperties(this)},OSF.DialogHandler=function(){},OSF.DDA.DialogEventArgs=function(e){e[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:e[OSF.DDA.PropertyDescriptors.MessageType]}})},OSF.DDA.DialogParentEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}})};var DialogApiManager=function(){function e(){}return e.defineApi=function(e,t){OSF.DDA.AsyncMethodCalls.define({method:e,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:t,privateStateCallbacks:[],onSucceeded:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Id],i=e[Microsoft.Office.WebExtension.Parameters.Data],o=new OSF.DialogHandler,a=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(o,a,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];e(arguments,r,i,o)}});var s=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;if(OSF.OUtil.defineEnumerableProperty(o,s,{value:function(){var e=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],t=e.verifyAndExtractCall(arguments,o,i),n=t[Microsoft.Office.WebExtension.Parameters.EventType],r=t[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(n,r)}}),!0===OSF.DDA.UI.EnableSendMessageDialogAPI){var l=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(o,l,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,i,o)}})}if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var c=OSF.DDA.SyncMethodNames.MessageChild.displayName;OSF.OUtil.defineEnumerableProperty(o,c,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,i,o)}})}return o},checkCallArgs:function(e,t,n){return e[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Width]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Width]>100&&(e[Microsoft.Office.WebExtension.Parameters.Width]=99),e[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Height]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Height]>100&&(e[Microsoft.Office.WebExtension.Parameters.Height]=99),e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),e}})},e.messageChildRichApiBridge=function(){if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,null,null)}},e.initOnce=function(){e.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync,e.displayDialogAsyncApiSupportedOptions),e.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync,e.displayModalDialogAsyncApiSupportedOptions)},e.displayDialogAsyncApiSupportedOptions=[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.EnforceAppDomain,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo,value:{types:["boolean"],defaultValue:!1}}],e.displayModalDialogAsyncApiSupportedOptions=e.displayDialogAsyncApiSupportedOptions.concat([{name:"abortWhenParentIsMinimized",value:{types:["boolean"],defaultValue:!1}},{name:"abortWhenDocIsInactive",value:{types:["boolean"],defaultValue:!1}}]),e}();DialogApiManager.initOnce(),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}],privateStateCallbacks:[]}),OSF.DDA.SafeArray.Delegate.openDialog=function(e){try{e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,e);OSF.ClientHostController.openDialog(e.dispId,e.targetId,(function(t,n){e.onEvent&&e.onEvent(n),OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(e.dispId)}),t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.closeDialog=function(e){e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,e);try{OSF.ClientHostController.closeDialog(e.dispId,e.targetId,t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.messageParent=function(e){try{e.onCalling&&e.onCalling();var t=(new Date).getTime(),n=OSF.ClientHostController.messageParent(e.hostCallArgs);return e.onReceiving&&e.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(e.dispId,e.hostCallArgs,Math.abs((new Date).getTime()-t),n),n}catch(e){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(e)}},OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.sendMessage=function(e){try{e.onCalling&&e.onCalling();(new Date).getTime();var t=OSF.ClientHostController.sendMessage(e.hostCallArgs);return e.onReceiving&&e.onReceiving(),t}catch(e){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(e)}},Microsoft.Office.WebExtension.TableData=function(e,t){function n(e){if(null==e||void 0==e)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(e,2);t<2;t++)e=[e];return e}catch(e){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(e){t=n(e)}},rows:{get:function(){return e},set:function(t){e=null==t||OSF.OUtil.isArray(t)&&0==t.length?[]:n(t)}}}),this.headers=t,this.rows=e},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureTableData=function(e){return new Microsoft.Office.WebExtension.TableData(e[OSF.DDA.TableDataProperties.TableRows],e[OSF.DDA.TableDataProperties.TableHeaders])},Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"},OSF.DDA.DataCoercion=function(){return{findArrayDimensionality:function(e){if(OSF.OUtil.isArray(e)){for(var t=0,n=0;n=0&&(e=e.substring(t+5,e.length))<"14.14393"}()?e.PromiseImpl.Init():window.Promise:e.PromiseImpl.Init()}()}(t=e._Internal||(e._Internal={}));var n=t.OfficePromise;e.Promise=n}(OfficeExtension||(OfficeExtension={})),function(e){var t=function(){function e(){}return e.prototype._resolveRequestUrlAndHeaderInfo=function(){return c._createPromiseFromResult(null)},e.prototype._createRequestExecutorOrNull=function(){return null},e.prototype.getEventRegistration=function(e){return null},e}();e.SessionBase=t;var n=function(){function e(){}return e.setCustomSendRequestFunc=function(t){e.s_customSendRequestFunc=t},e.xhrSendRequestFunc=function(e){return c.createPromise((function(t,n){var i=new XMLHttpRequest;if(i.open(e.method,e.url),i.onload=function(){var e={statusCode:i.status,headers:c._parseHttpResponseHeaders(i.getAllResponseHeaders()),body:i.responseText};t(e)},i.onerror=function(){n(new r.RuntimeError({code:o.connectionFailure,httpStatusCode:i.status,message:c._getResourceString(a.connectionFailureWithStatus,i.statusText)}))},e.headers)for(var s in e.headers)i.setRequestHeader(s,e.headers[s]);i.send(c._getRequestBodyText(e))}))},e.fetchSendRequestFunc=function(e){var t=c._getRequestBodyText(e);return""===t&&(t=void 0),fetch(e.url,{method:e.method,headers:e.headers,body:t}).then((function(e){return e.text().then((function(t){var n=e.status,r={};return e.headers.forEach((function(e,t){r[t]=e})),{statusCode:n,headers:r,body:t}}))}))},e.sendRequest=function(t){e.validateAndNormalizeRequest(t);var n=e.s_customSendRequestFunc;return n||(n="undefined"!==typeof fetch?e.fetchSendRequestFunc:e.xhrSendRequestFunc),n(t)},e.setCustomSendLocalDocumentRequestFunc=function(t){e.s_customSendLocalDocumentRequestFunc=t},e.sendLocalDocumentRequest=function(t){return e.validateAndNormalizeRequest(t),(e.s_customSendLocalDocumentRequestFunc||e.officeJsSendLocalDocumentRequestFunc)(t)},e.officeJsSendLocalDocumentRequestFunc=function(e){e=c._validateLocalDocumentRequest(e);var t=c._buildRequestMessageSafeArray(e);return c.createPromise((function(e,n){OSF.DDA.RichApi.executeRichApiRequestAsync(t,(function(t){var n;n="succeeded"==t.status?{statusCode:l.getResponseStatusCode(t),headers:l.getResponseHeaders(t),body:l.getResponseBody(t)}:l.buildHttpResponseFromOfficeJsError(t.error.code,t.error.message),c.log("Response:"),c.log(JSON.stringify(n)),e(n)}))}))},e.validateAndNormalizeRequest=function(e){if(c.isNullOrUndefined(e))throw r.RuntimeError._createInvalidArgError({argumentName:"request"});c.isNullOrEmptyString(e.method)&&(e.method="GET"),e.method=e.method.toUpperCase();var t=!1;if("object"===typeof e.headers&&e.headers[s.testRequestNameHeader]&&(t=!0),!t){var n=u._getCurrentTestNameWithSequenceId();n&&(e.headers||(e.headers={}),e.headers[s.testRequestNameHeader]=n)}},e.logRequest=function(t){if(c._logEnabled){if(c.log("---HTTP Request---"),c.log(t.method+" "+t.url),t.headers)for(var n in t.headers)c.log(n+": "+t.headers[n]);e._logBodyEnabled&&c.log(c._getRequestBodyText(t))}},e.logResponse=function(t){if(c._logEnabled){if(c.log("---HTTP Response---"),c.log(""+t.statusCode),t.headers)for(var n in t.headers)c.log(n+": "+t.headers[n]);e._logBodyEnabled&&c.log(t.body)}},e._logBodyEnabled=!1,e}();e.HttpUtility=n;var r,i=function(){function e(e){var t=this;this.m_bridge=e,this.m_promiseResolver={},this.m_handlers=[],this.m_bridge.onMessageFromHost=function(e){var n=JSON.parse(e);if(3==n.type){var r=n.message;if(r&&r.entries)for(var i=0;i=0){var o=t.url.substr(i+1),a=c._parseRequestFlagsAndCustomDataFromQueryStringIfAny(o);a.flags>=0&&(n=a.flags)}"string"===typeof t.body&&(t.body=JSON.parse(t.body));var s={id:e.nextId(),type:1,flags:n,message:t};return r.sendMessageToHostAndExpectResponse(s).then((function(e){return e.message}))}));for(var i=0;i=0&&this.m_handlers.splice(t,1)},e.onInited=function(t){e.s_onInitedHandlers.push(t),e.s_instance&&t(e.s_instance)},e.prototype.dispatchMessage=function(e){if("number"===typeof e.id){var t=this.m_promiseResolver[e.id];if(t)return t(e),void delete this.m_promiseResolver[e.id]}for(var n=0;n0},e._getLocalDocumentUrlPrefixLength=function(e){for(var t=["http://document.localhost","https://document.localhost","//document.localhost"],n=e.toLowerCase().trim(),r=0;r0){var o=t.url.substr(i+1),a=e._parseRequestFlagsAndCustomDataFromQueryStringIfAny(o);a.flags>=0&&(n=a.flags),r=a.customData}}return l.buildRequestMessageSafeArray(r,n,t.method,t.url,t.headers,e._getRequestBodyText(t))},e._parseHttpResponseHeaders=function(t){var n={};if(!e.isNullOrEmptyString(t))for(var r=new RegExp("\r?\n"),i=t.split(r),o=0;o0){var l=a.substr(0,s),c=a.substr(s+1);l=e.trim(l),c=e.trim(c),n[l.toUpperCase()]=c}}}return n},e._parseErrorResponse=function(t){var n=e._parseErrorResponseBody(t),r=t.statusCode.toString();if(e.isNullOrUndefined(n)||"object"!==typeof n||!n.error)return e._createDefaultErrorResponse(r);var i=n.error,o=i.innerError;return o&&o.code?e._createErrorResponse(o.code,r,o.message):i.code?e._createErrorResponse(i.code,r,i.message):e._createDefaultErrorResponse(r)},e._parseErrorResponseBody=function(t){if(e.isPlainJsonObject(t.body))return t.body;if(!e.isNullOrEmptyString(t.body)){var n=e.trim(t.body);try{return JSON.parse(n)}catch(t){e.log("Error when parse "+n)}}},e._createDefaultErrorResponse=function(t){return{errorCode:o.connectionFailure,errorMessage:e._getResourceString(a.connectionFailureWithStatus,t)}},e._createErrorResponse=function(t,n,r){return{errorCode:t,errorMessage:e._getResourceString(a.connectionFailureWithDetails,[n,t,r])}},e._copyHeaders=function(e,t){if(e&&t)for(var n in e)t[n]=e[n]},e.addResourceStringValues=function(t){for(var n in t)e.s_resourceStringValues[n]=t[n]},e._logEnabled=!1,e.s_resourceStringValues={ApiNotFoundDetails:"The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",ConnectionFailureWithStatus:"The request failed with status code of {0}.",ConnectionFailureWithDetails:"The request failed with status code of {0}, error code {1} and the following error message: {2}",InvalidArgument:"The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",InvalidObjectPath:'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',InvalidRequestContext:"Cannot use the object across different request contexts.",Timeout:"The operation has timed out.",ValueNotLoaded:'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'},e}();e.CoreUtility=c;var u=function(){function e(){}return e.setMock=function(t){e.s_isMock=t},e.isMock=function(){return e.s_isMock},e._setCurrentTestName=function(t){e.s_currentTestName=t,e.s_currentTestSequenceId=0},e._getCurrentTestNameWithSequenceId=function(){return e.s_currentTestName?(e.s_currentTestSequenceId++,e.s_currentTestName+"."+e.s_currentTestSequenceId):null},e}();e.TestUtility=u,e._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!0,enableUndoableFlag:!0,appendTypeNameToObjectPathInfo:!1,enablePreviewExecution:!1},e.config={extendedErrorLogging:!1};var d=function(){function t(){}return t.createSetPropertyAction=function(t,n,r,i,o){C.validateObjectPath(n);var a={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:n._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[i],l=C.setMethodArguments(t,a.ArgumentInfo,s);C.validateReferencedObjectPaths(l);var c=new p(a,0,o);if(c.referencedObjectPath=n._objectPath,c.referencedArgumentObjectPaths=l,e._internalConfig.enablePreviewExecution&&0!==(16&o)){var u={Id:t._nextId(),ActionType:4,Name:r,ObjectId:"",ObjectType:"",Arguments:[i]};n._addPreviewExecutionAction(u)}return n._addAction(c)},t.createQueryAction=function(e,t,n,r){C.validateObjectPath(t);var i={Id:e._nextId(),ActionType:2,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},o=new p(i,1,4);return o.referencedObjectPath=t._objectPath,t._addAction(o,r)},t.createQueryAsJsonAction=function(e,t,n,r){C.validateObjectPath(t);var i={Id:e._nextId(),ActionType:7,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},o=new p(i,1,4);return o.referencedObjectPath=t._objectPath,t._addAction(o,r)},t.createUpdateAction=function(e,t,n){C.validateObjectPath(t);var r={Id:e._nextId(),ActionType:9,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},i=new p(r,0,0);return i.referencedObjectPath=t._objectPath,t._addAction(i)},t}();e.CommonActionFactory=d;var f=function(){function t(e,t){this.m_contextBase=e,this.m_objectPath=t}return Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_context",{get:function(){return this.m_contextBase},enumerable:!0,configurable:!0}),t.prototype._addAction=function(e,t){var n=this;return void 0===t&&(t=null),c.createPromise((function(r,i){n._context._addServiceApiAction(e,t,r,i)}))},t.prototype._addPreviewExecutionAction=function(e){},t.prototype._retrieve=function(t,n){var r=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;r||(r=!C.isSetSupported("RichApiRuntime","1.1"));var i=g._parseQueryOption(t);return r?d.createQueryAction(this._context,this,i,n):d.createQueryAsJsonAction(this._context,this,i,n)},t.prototype._recursivelyUpdate=function(t){var n=e._internalConfig.alwaysPolyfillClientObjectUpdateMethod;n||(n=!C.isSetSupported("RichApiRuntime","1.2"));try{var i=this[S.scalarPropertyNames];i||(i=[]);var s=this[S.scalarPropertyUpdateable];if(!s){s=[];for(var l=0;l=0){if(!s[m])throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:c._getResourceString(_.attemptingToSetReadOnlyProperty,g),debugInfo:{errorLocation:g}});f[g]=t[g],++h}else{if(!(u.indexOf(g)>=0))throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:c._getResourceString(_.propertyDoesNotExist,g),debugInfo:{errorLocation:g}});p[g]=t[g]}}if(h>0)if(n)for(l=0;l0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});t.Top=s}else if("$skip"===a){if("number"!==typeof s||n.length>0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});t.Skip=s}else if("boolean"===typeof s)s&&t.Select.push(e.combineQueryPath(n,a,"/"));else{if("object"!==typeof s)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});e.parseStrictLoadOptionHelper(t,e.combineQueryPath(n,a,"/"),e.combineQueryPath(i,a,"."),s)}}},e}();e.ClientRequestContextBase=g;var m=function(){function e(e){this.m_objectPath=e}return e.prototype._handleResult=function(e){c.isNullOrUndefined(e)?this.m_objectPath._updateAsNullObject():this.m_objectPath.updateUsingObjectData(e,null)},e}(),y=function(){function t(e){this.m_contextBase=e,this.m_actions=[],this.m_actionResultHandler={},this.m_referencedObjectPaths={},this.m_instantiatedObjectPaths={},this.m_preSyncPromises=[],this.m_previewExecutionActions=[]}return t.prototype.addAction=function(e){this.m_actions.push(e),1==e.actionInfo.ActionType&&(this.m_instantiatedObjectPaths[e.actionInfo.ObjectPathId]=e)},t.prototype.addPreviewExecutionAction=function(e){this.m_previewExecutionActions.push(e)},Object.defineProperty(t.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.ensureInstantiateObjectPath=function(e){if(e){if(this.m_instantiatedObjectPaths[e.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(e.parentObjectPath),this.ensureInstantiateObjectPaths(e.argumentObjectPaths),!this.m_instantiatedObjectPaths[e.objectPathInfo.Id]){var t={Id:this.m_contextBase._nextId(),ActionType:1,Name:"",ObjectPathId:e.objectPathInfo.Id},n=new p(t,1,4);n.referencedObjectPath=e,this.addReferencedObjectPath(e),this.addAction(n);var r=new m(e);this.addActionResultHandler(n,r)}}},t.prototype.ensureInstantiateObjectPaths=function(e){if(e)for(var t=0;t0&&(c.PreviewExecutionActions=this.m_previewExecutionActions,n|=4096),{body:c,flags:n}},t.prototype.processResponse=function(e){if(e)for(var t=0;t=0;t--){var n=this.m_actions[t].actionInfo;if(n.ObjectPathId===e&&3===n.ActionType&&n.Name===S.keepReference){this.m_actions.splice(t,1);break}}},t._updateLastUsedActionIdOfObjectPathId=function(e,n,r){for(;n;){if(e[n.objectPathInfo.Id])return;e[n.objectPathInfo.Id]=r;var i=n.argumentObjectPaths;if(i)for(var o=i.length,a=0;a=0;--i){var o=(f=e[i]).actionInfo.Id;f.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(n,f.referencedObjectPath,o);var a=f.referencedArgumentObjectPaths;if(a)for(var s=a.length,l=0;l0?f.actionInfo.L=p:f.actionInfo.L&&delete f.actionInfo.L}},t}();e.ClientRequestBase=y;var v=function(){function e(e){this.m_type=e}return Object.defineProperty(e.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new r.RuntimeError({code:o.valueNotLoaded,httpStatusCode:400,message:c._getResourceString(a.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),e.prototype._handleResult=function(e){this.m_isLoaded=!0,"object"===typeof e&&e&&e._IsNull||(1===this.m_type?this.m_value=C.adjustToDateTime(e):this.m_value=e)},e}();e.ClientResult=v;var b=function(){function e(e){this.m_context=e,this.m_actions=[]}return e.prototype.add=function(e,t,n,r){var i=this;this.m_actions.push({action:e,resultHandler:t,resolve:n,reject:r}),1===this.m_actions.length&&setTimeout((function(){return i.processActions()}),0)},e.prototype.processActions=function(){var e=this;if(0!==this.m_actions.length){var t=this.m_actions;this.m_actions=[];for(var n=new y(this.m_context),r=0;r=65&&e.charCodeAt(t)<=90;)t++;return t0?".":"")+n;break;case 3:n=t.normalizeName(e.objectPathInfo.Name)+"()"+(n.length>0?".":"")+n;break;case 4:n=t.normalizeName(e.objectPathInfo.Name)+(n.length>0?".":"")+n;break;case 5:n="getItem()"+(n.length>0?".":"")+n;break;case 6:n="_reference()"+(n.length>0?".":"")+n}e=e.parentObjectPath}return n},t.setMethodArguments=function(e,n,r){if(c.isNullOrUndefined(r))return null;var i=new Array,o=new Array,a=t.collectObjectPathInfos(e,r,i,o);return n.Arguments=r,a&&(n.ReferencedObjectPathIds=o),i},t.validateContext=function(e,t){if(e&&t&&t._context!==e)throw new r.RuntimeError({code:o.invalidRequestContext,httpStatusCode:400,message:c._getResourceString(a.invalidRequestContext)})},t.isSetSupported=function(e,n){return"function"===typeof t.isSetSupportedOverride?t.isSetSupportedOverride(e,n):!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)||window.Office.context.requirements.isSetSupported(e,n)},t.throwIfApiNotSupported=function(e,n,i,s){if(t._doApiNotSupportedCheck&&!t.isSetSupported(n,i)){var l=c._getResourceString(a.apiNotFoundDetails,[e,n+" "+i,s]);throw new r.RuntimeError({code:o.apiNotFound,httpStatusCode:404,message:l,debugInfo:{errorLocation:e}})}},t.calculateApiFlags=function(e,n,r){var i=window&&window.location&&window.location.href&&-1!==window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc");return("function"===typeof t.isSetSupportedOverride?t.isSetSupportedOverride(n,r):!i&&t.isSetSupported(n,r))||(e&=-3),e},t._parseSelectExpand=function(e){var t=[];if(!c.isNullOrEmptyString(e))for(var n=e.split(","),r=0;r0&&t.push(i)}return t;function o(e){var t=e.toLowerCase();if("items"===t||"items/"===t)return"*";return("items/"===t.substr(0,6)||"items."===t.substr(0,6))&&(e=e.substr(6)),e.replace(new RegExp("[/.]items[/.]","gi"),"/")}},t.changePropertyNameToCamelLowerCase=function(e){if(Array.isArray(e)){for(var n=[],r=0;r=0){var a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!0),s=a.processForDebugStatementInfo(n.Body.Error.ActionIndex);o={statement:s.statement,surroundingStatements:s.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},e.config.extendedErrorLogging&&(a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!1),o.fullStatements=a.process())}var l=null;if(n.Body.Results?l=n.Body.Results:n.Body.ProcessedResults&&n.Body.ProcessedResults.Results&&(l=n.Body.ProcessedResults.Results),l){this._processingResult=!0;try{t.processResponse(l)}finally{this._processingResult=!1}}}if(!Z.isNullOrEmptyString(n.ErrorCode))return new r.RuntimeError({code:n.ErrorCode,httpStatusCode:n.HttpStatusCode,message:n.ErrorMessage,traceMessages:i,data:{responseBody:n.RawErrorResponseBody}});if(n.Body&&n.Body.Error){var c={errorLocation:n.Body.Error.Location};return o&&(c.statement=o.statement,c.surroundingStatements=o.surroundingStatements,c.fullStatements=o.fullStatements),new r.RuntimeError({code:n.Body.Error.Code,httpStatusCode:n.Body.Error.HttpStatusCode,message:n.Body.Error.Message,traceMessages:i,debugInfo:c})}return null},i.prototype.processPendingEventHandlers=function(e){for(var t=Z._createPromiseFromResult(null),n=0;n0)if(i.isValidRequestInfo(n[0]))f=n[0],h=1;else if(Z.isPlainJsonObject(n[0])){if(null!=(f=(g=n[0]).session)&&!i.isValidRequestInfo(f))return i.createErrorPromise(t);p=g.previousObjects,h=1}if(n.length==h+1)d=n[h+0];else{if(null!=g||n.length!=h+2)return i.createErrorPromise(t);p=n[h+0],d=n[h+1]}if(null!=p)if(p instanceof k)u=function(){return p.context};else if(p instanceof i)u=function(){return p};else{if(!Array.isArray(p))return i.createErrorPromise(t);var m=p;if(0==m.length)return i.createErrorPromise(t);for(var y=0;y0&&h._onRunFinishedNotifiers.shift()();if(v)return g;throw g}))},i}(g);e.ClientRequestContext=U;var L=function(){function e(e,t){this.m_proxy=e,this.m_shouldPolyfill=t;var n=e[H.scalarPropertyNames],r=e[H.navigationPropertyNames],i=e[H.className],o=e[H.isCollection];if(n)for(var a=0;a=0;s--)if(i[s]===r[o].handler){i.splice(s,1);break}break;case 2:i=[]}return a&&(!this.m_registered&&i.length>0?n=n.then((function(){return t.m_eventInfo.registerFunc(t.m_callback)})).then((function(){return t.m_registered=!0})):this.m_registered&&0==i.length&&(n=n.then((function(){return t.m_eventInfo.unregisterFunc(t.m_callback)})).catch((function(e){c.log("Error when unregister event: "+JSON.stringify(e))})).then((function(){return t.m_registered=!1}))),n=n.then((function(){return t.m_handlers=i}))),n},e.prototype.fireEvent=function(e){for(var t=[],n=0;n0},e.prototype.register=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});var i=this.getHandlers(e,t);return i.push(n),1===i.length?this.m_registerEventImpl(e,t):Z._createPromiseFromResult(null)},e.prototype.unregister=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var i=this.getHandlers(e,t),o=i.length-1;o>=0;o--)if(i[o]===n){i.splice(o,1);break}return 0===i.length?this.m_unregisterEventImpl(e,t):Z._createPromiseFromResult(null)},e}();e.EventRegistration=G;var q=function(){function e(){this.m_eventRegistration=new G(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this)),this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return e.prototype.ready=function(){var t=this;return this.m_ready||(e._testReadyImpl?this.m_ready=e._testReadyImpl().then((function(){t.m_isReady=!0})):i.instance?this.m_ready=Z._createPromiseFromResult(null).then((function(){t.m_isReady=!0})):this.m_ready=r.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then((function(){t.m_isReady=!0}))),this.m_ready},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.register(e,t,n)}))},e.prototype.unregister=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.unregister(e,t,n)}))},e.prototype._registerEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._unregisterEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._handleRichApiMessage=function(e){if(e&&e.entries)for(var t=0;t=0;i--)if(r[i]===e){r.splice(i,1);break}0==r.length&&q.getGenericEventRegistration(n).unregister(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)}))},t.prototype.removeAll=function(){},t}(B);e.GenericEventHandlers=z;var J=function(){function e(e){this.m_clientObject=e}return e.prototype._handleResult=function(e){this.m_clientObject._handleIdResult(e)},e}(),Q=function(){function e(){}return e.createGlobalObjectObjectPath=function(e){var t={Id:e._nextId(),ObjectPathType:1,Name:""};return new h(t,null,!1,!1,1,4)},e.createNewObjectObjectPath=function(e,t,n,r){var i={Id:e._nextId(),ObjectPathType:2,Name:t};return new h(i,null,n,!1,1,Z._fixupApiFlags(r))},e.createPropertyObjectPath=function(e,t,n,r,i,o){var a={Id:e._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id};return new h(a,t._objectPath,r,i,1,Z._fixupApiFlags(o))},e.createIndexerObjectPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new h(r,t._objectPath,!1,!1,1,4)},e.createIndexerObjectPathUsingParentPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new h(r,t,!1,!1,1,4)},e.createMethodObjectPath=function(e,t,n,r,i,o,a,s,l){var c={Id:e._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u=Z.setMethodArguments(e,c.ArgumentInfo,i),d=new h(c,t._objectPath,o,a,r,Z._fixupApiFlags(l));return d.argumentObjectPaths=u,d.getByIdMethodName=s,d},e.createReferenceIdObjectPath=function(e,t){var n={Id:e._nextId(),ObjectPathType:6,Name:t,ArgumentInfo:{}};return new h(n,null,!1,!1,1,4)},e.createChildItemObjectPathUsingIndexerOrGetItemAt=function(t,n,r,i,o){var a=Z.tryGetObjectIdFromLoadOrRetrieveResult(i);return t&&!Z.isNullOrUndefined(a)?e.createChildItemObjectPathUsingIndexer(n,r,i):e.createChildItemObjectPathUsingGetItemAt(n,r,i,o)},e.createChildItemObjectPathUsingIndexer=function(e,t,n){var r=Z.tryGetObjectIdFromLoadOrRetrieveResult(n),i=i={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return i.ArgumentInfo.Arguments=[r],new h(i,t._objectPath,!1,!1,1,4)},e.createChildItemObjectPathUsingGetItemAt=function(e,t,n,r){var i=n[H.index];i&&(r=i);var o={Id:e._nextId(),ObjectPathType:3,Name:H.getItemAt,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=[r],new h(o,t._objectPath,!1,!1,1,4)},e}();e.ObjectPathFactory=Q;var K=function(){function t(e){this.m_context=e}return t.prototype.executeAsync=function(n,r,i){var o=this,a=l.buildMessageArrayForIRequestExecutor(n,r,i,t.SourceLibHeaderValue);return new e.Promise((function(e,t){OSF.DDA.RichApi.executeRichApiRequestAsync(a,(function(t){var n;c.log("Response:"),c.log(JSON.stringify(t)),"succeeded"==t.status?n=l.buildResponseOnSuccess(l.getResponseBody(t),l.getResponseHeaders(t)):(n=l.buildResponseOnError(t.error.code,t.error.message),o.m_context._processOfficeJsErrorResponse(t.error.code,n)),e(n)}))}))},t.SourceLibHeaderValue="officejs",t}(),X=function(){function e(e){this._autoCleanupList={},this.m_context=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._addCommon(e,!0)})):this._addCommon(e,!0)},e.prototype._autoAdd=function(e){this._addCommon(e,!1),this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e},e.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(e,t){this.m_context._autoCleanup&&!e[H.isTracked]&&e!==this.m_context._rootObject&&t&&!Z.isNullOrEmptyString(t[H.referenceId])&&(this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e,e[H.isTracked]=!0)},e.prototype._addCommon=function(e,t){if(e[H.isTracked])t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id];else{var n=e[H.referenceId];if(e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName])throw Z.createRuntimeError(o.generalException,c._getResourceString($.objectIsUntracked),null);Z.isNullOrEmptyString(n)&&e._KeepReference&&(e._KeepReference(),M.createInstantiateAction(this.m_context,e),t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id],e[H.isTracked]=!0)}},e.prototype.remove=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._removeCommon(e)})):this._removeCommon(e)},e.prototype._removeCommon=function(e){e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName]=!0,e.context._pendingRequest._removeKeepReferenceAction(e._objectPath.objectPathInfo.Id);var t=e[H.referenceId];if(!Z.isNullOrEmptyString(t)){var n=this.m_context._rootObject;n._RemoveReference&&n._RemoveReference(t)}delete e[H.isTracked]},e.prototype._retrieveAndClearAutoCleanupList=function(){var e=this._autoCleanupList;return this._autoCleanupList={},e},e}();e.TrackedObjects=X;var Y=function(){function t(e,t,n,r,i){e||(e="root"),this.m_globalObjName=e,this.m_referencedObjectPaths=t,this.m_actions=n,this.m_statements=[],this.m_variableNameForObjectPathMap={},this.m_variableNameToObjectPathMap={},this.m_declaredObjectPathMap={},this.m_showDispose=r,this.m_removePII=i}return t.prototype.process=function(){this.m_showDispose&&W._calculateLastUsedObjectPathIds(this.m_actions);for(var e=0;e=0&&this.m_statements.length>t+5+1));n++);if(t<0)return null;var r=t-5;r<0&&(r=0);var i=t+1+5;i>this.m_statements.length&&(i=this.m_statements.length);var o=[];0!=r&&o.push("...");for(var a=r;a>>>>"),o.push(this.m_statements[t]),o.push("// <<<<<");for(var s=t+1;s0)return e+" // And then dispose {"+r.map((function(e){return n.getObjVarName(e)})).join(", ")+"}"}return e},t.prototype.buildQueryExpression=function(e){if(e.actionInfo.QueryInfo){var t={};return t.select=e.actionInfo.QueryInfo.Select,t.expand=e.actionInfo.QueryInfo.Expand,t.skip=e.actionInfo.QueryInfo.Skip,t.top=e.actionInfo.QueryInfo.Top,"undefined"===typeof t.top&&"undefined"===typeof t.skip&&"undefined"===typeof t.expand?"undefined"===typeof t.select?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(e){return(5==e.objectPathInfo.ObjectPathType||3==e.objectPathInfo.ObjectPathType||4==e.objectPathInfo.ObjectPathType)&&e.objectPathInfo.ParentObjectPathId?this.getObjVarName(e.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(e):this.buildObjectPathExpression(e)},t.prototype.buildObjectPathExpression=function(e){var t=this.buildObjectPathInfoExpression(e.objectPathInfo),n=e.originalObjectPathInfo;return n&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(n)+" */"),t},t.prototype.buildObjectPathInfoExpression=function(e){switch(e.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 3:return Z._toCamelLowerCase(e.Name)+"("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 2:return e.Name+".newObject()";case 7:return"null";case 4:return Z._toCamelLowerCase(e.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(e.Name)+")"}},t.prototype.buildArgumentsExpression=function(e){var t="";if(!e.Arguments||0===e.Arguments.length)return t;if(this.m_removePII)return"undefined"===typeof e.Arguments[0]?t:"...";for(var n=0;n0&&(t+=", "),t+=this.buildArgumentLiteral(e.Arguments[n],e.ReferencedObjectPathIds?e.ReferencedObjectPathIds[n]:null);return"undefined"===t&&(t=""),t},t.prototype.buildArgumentLiteral=function(e,t){return"number"==typeof e&&e===t?this.getObjVarName(t):JSON.stringify(e)},t.prototype.getObjVarNameBase=function(e){var t="v",n=this.m_referencedObjectPaths[e];if(n)switch(n.objectPathInfo.ObjectPathType){case 1:t=this.m_globalObjName;break;case 4:t=Z._toCamelLowerCase(n.objectPathInfo.Name);break;case 3:var r=n.objectPathInfo.Name;r.length>3&&"Get"===r.substr(0,3)&&(r=r.substr(3)),t=Z._toCamelLowerCase(r);break;case 5:var i=this.getObjVarNameBase(n.objectPathInfo.ParentObjectPathId);t="s"===i.charAt(i.length-1)?i.substr(0,i.length-1):i+"Item"}return t},t.prototype.getObjVarName=function(e){if(this.m_variableNameForObjectPathMap[e])return this.m_variableNameForObjectPathMap[e];var t=this.getObjVarNameBase(e);if(!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t;for(var n=1;this.m_variableNameToObjectPathMap[t+n.toString()];)n++;return t+=n.toString(),this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t},t}(),$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.cannotRegisterEvent="CannotRegisterEvent",t.connectionFailureWithStatus="ConnectionFailureWithStatus",t.connectionFailureWithDetails="ConnectionFailureWithDetails",t.propertyNotLoaded="PropertyNotLoaded",t.runMustReturnPromise="RunMustReturnPromise",t.moreInfoInnerError="MoreInfoInnerError",t.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",t.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",t.objectIsUntracked="ObjectIsUntracked",t.customFunctionDefintionMissing="CustomFunctionDefintionMissing",t.customFunctionImplementationMissing="CustomFunctionImplementationMissing",t.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",t.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",t.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",t.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",t.customFunctionInvalidFunction="CustomFunctionInvalidFunction",t.customFunctionInvalidFunctionMapping="CustomFunctionInvalidFunctionMapping",t.customFunctionWindowMissing="CustomFunctionWindowMissing",t.customFunctionDefintionMissingOnWindow="CustomFunctionDefintionMissingOnWindow",t.pendingBatchInProgress="PendingBatchInProgress",t.notInsideBatch="NotInsideBatch",t.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",t}(_);e.ResourceStrings=$,c.addResourceStringValues({CannotRegisterEvent:"The event handler cannot be registered.",PropertyNotLoaded:"The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",RunMustReturnPromise:'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',InvalidOrTimedOutSessionMessage:"Your Office Online session has expired or is invalid. To continue, refresh the page.",InvalidOperationInCellEditMode:"Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",InvalidSheetName:"The request cannot be processed because the specified worksheet cannot be found. Please try again.",CustomFunctionDefintionMissing:"A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.",CustomFunctionDefintionMissingOnWindow:"A property with the name '{0}' that represents the function's definition must exist on the window object.",CustomFunctionImplementationMissing:"The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",CustomFunctionNameContainsBadChars:"The function name may only contain letters, digits, underscores, and periods.",CustomFunctionNameCannotSplit:"The function name must contain a non-empty namespace and a non-empty short name.",CustomFunctionUnexpectedNumberOfEntriesInResultBatch:"The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",CustomFunctionCancellationHandlerMissing:"The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",CustomFunctionInvalidFunction:"The property with the name '{0}' that represents the function's definition is not a valid function.",CustomFunctionInvalidFunctionMapping:"The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.",CustomFunctionWindowMissing:"The window object was not found.",PendingBatchInProgress:"There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",NotInsideBatch:"Operations may not be invoked outside of a batch method.",CannotUpdateReadOnlyProperty:"The property '{0}' is read-only and it cannot be updated.",ObjectIsUntracked:"The object is untracked."});var Z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.fixObjectPathIfNecessary=function(e,t){e&&e._objectPath&&t&&e._objectPath.updateUsingObjectData(t,e)},n.load=function(e,t){return e.context.load(e,t),e},n.loadAndSync=function(e,t){return e.context.load(e,t),e.context.sync().then((function(){return e}))},n.retrieve=function(t,r){var i=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;i||(i=!n.isSetSupported("RichApiRuntime","1.1"));var o=new L(t,i);return t._retrieve(r,o),o},n.retrieveAndSync=function(e,t){var r=n.retrieve(e,t);return e.context.sync().then((function(){return r}))},n.toJson=function(e,t,r,i){var o={};for(var a in t){"undefined"!==typeof(s=t[a])&&(o[a]=s)}for(var a in r){var s;"undefined"!==typeof(s=r[a])&&(s[n.fieldName_isCollection]&&"undefined"!==typeof s[n.fieldName_m__items]?o[a]=s.toJSON().items:o[a]=s.toJSON())}return i&&(o.items=i.map((function(e){return e.toJSON()}))),o},n.throwError=function(e,t,n){throw new r.RuntimeError({code:e,httpStatusCode:400,message:c._getResourceString(e,t),debugInfo:n?{errorLocation:n}:void 0})},n.createRuntimeError=function(e,t,n,i,o){return new r.RuntimeError({code:e,httpStatusCode:i,message:t,debugInfo:{errorLocation:n},data:o})},n.throwIfNotLoaded=function(e,t,r,i){if(!i&&c.isUndefined(t)&&e.charCodeAt(0)!=n.s_underscoreCharCode&&!n.s_suppressPropertyNotLoadedException)throw n.createPropertyNotLoadedException(r,e)},n._getPropertyValueWithoutCheckLoaded=function(e,t){n.s_suppressPropertyNotLoadedException=!0;try{return e[t]}finally{n.s_suppressPropertyNotLoadedException=!1}},n.createPropertyNotLoadedException=function(e,t){return new r.RuntimeError({code:T.propertyNotLoaded,httpStatusCode:400,message:c._getResourceString($.propertyNotLoaded,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.createCannotUpdateReadOnlyPropertyException=function(e,t){return new r.RuntimeError({code:T.cannotUpdateReadOnlyProperty,httpStatusCode:400,message:c._getResourceString($.cannotUpdateReadOnlyProperty,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.promisify=function(t){return new e.Promise((function(e,n){t((function(t){"failed"==t.status?n(t.error):e(t.value)}))}))},n._addActionResultHandler=function(e,t,n){e.context._pendingRequest.addActionResultHandler(t,n)},n._handleNavigationPropertyResults=function(e,t,n){for(var r=0;r0;)e.push(0),n--},t.prototype.getString=function(e){return"number"===typeof e?e>0?this.m_strings[e-1]:null:e},t.prototype.buildEnumType=function(e){var t;if(Array.isArray(e)){(t={name:e[0],fields:e[2]}).fields||(t.fields={});var n=e[1];if(Array.isArray(n))for(var r=0;rn)return!1;return!0},t.prototype.evaluateEventType=function(t){if(Z.isNullOrEmptyString(t))return 0;if(this.isAllDigits(t))return parseInt(t);var n=this.resolveObjectByFullName(t);if("number"!==typeof n)throw new e.Error("Invalid event type: "+t);return n},t.prototype.buildPrototype=function(e,t){this.buildScalarProperties(e,t),this.buildNavigationProperties(e,t),this.buildScalarMethods(e,t),this.buildNavigationMethods(e,t),this.buildEvents(e,t),this.buildHandleResult(e,t),this.buildHandleIdResult(e,t),this.buildHandleRetrieveResult(e,t),this.buildLoad(e,t),this.buildRetrieve(e,t),this.buildSetMockData(e,t),this.buildEnsureUnchanged(e,t),this.buildUpdate(e,t),this.buildSet(e,t),this.buildToJSON(e,t),this.buildItems(e,t),this.buildTypeMetadataInfo(e,t),this.buildTrackUntrack(e,t),this.buildMixin(e,t)},t.prototype.toSimpleCamelUpperCase=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)},t.prototype.ensureOriginalName=function(e){null===e.originalName&&(e.originalName=this.toSimpleCamelUpperCase(e.name))},t.prototype.getFieldName=function(e){return"m_"+e.name},t.prototype.throwIfApiNotSupported=function(e,t){if(this.m_apiSets&&t.apiSetInfoOrdinal>0){var n=this.m_apiSets[t.apiSetInfoOrdinal-1];n&&Z.throwIfApiNotSupported(e.name+"."+t.name,n.name,n.version,this.m_hostName)}},t.prototype.buildScalarProperties=function(e,t){if(Array.isArray(t.scalarProperties))for(var n=0;n0){var n=this.m_apiSets[t-1];n&&(e=C.calculateApiFlags(e,n.name,n.version))}return e},t.prototype.buildScalarProperty=function(e,n,r){this.ensureOriginalName(r);var i=this,o=this.getFieldName(r),a={get:function(){return Z.throwIfNotLoaded(r.name,this[o],n.name,this._isNull),i.throwIfApiNotSupported(n,r),this[o]},enumerable:!0,configurable:!0};0===(2&r.behaviorFlags)&&(a.set=function(e){if(4&r.behaviorFlags&&i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName+"_Set").call(this,this,e).handled)return;this[o]=e;var a=i.calculateApiFlags(r.setMethodApiFlags,r.undoableApiSetInfoOrdinal);ee.invokeSetProperty(this,r.originalName,e,a)}),Object.defineProperty(e.prototype,r.name,a)},t.prototype.buildNavigationProperties=function(e,t){if(Array.isArray(t.navigationProperties))for(var n=0;n0){for(var o=0;o0){for(var o=0;o0&&(Object.defineProperty(e.prototype,"_scalarPropertyNames",{get:function(){return this.m__scalarPropertyNames||(this.m__scalarPropertyNames=t.scalarProperties.map((function(e){return e.name}))),this.m__scalarPropertyNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyOriginalNames",{get:function(){return this.m__scalarPropertyOriginalNames||(this.m__scalarPropertyOriginalNames=t.scalarProperties.map((function(e){return e.originalName}))),this.m__scalarPropertyOriginalNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyUpdateable",{get:function(){return this.m__scalarPropertyUpdateable||(this.m__scalarPropertyUpdateable=t.scalarProperties.map((function(e){return 0===(2&e.behaviorFlags)}))),this.m__scalarPropertyUpdateable},enumerable:!0,configurable:!0})),t.navigationProperties&&t.navigationProperties.length>0&&Object.defineProperty(e.prototype,"_navigationPropertyNames",{get:function(){return this.m__navigationPropertyNames||(this.m__navigationPropertyNames=t.navigationProperties.map((function(e){return e.name}))),this.m__navigationPropertyNames},enumerable:!0,configurable:!0})},t.prototype.buildTrackUntrack=function(e,t){2&t.behaviorFlags&&(e.prototype.track=function(){return this.context.trackedObjects.add(this),this},e.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this})},t.prototype.buildMixin=function(e,t){if(4&t.behaviorFlags){var n=this.getFunction(t.name+"Custom");Z.applyMixin(e,n)}},t.prototype.getOnEventName=function(e){return"_"===e[0]?"_on"+e.substr(1):"on"+e},t.prototype.buildEvents=function(e,t){if(t.events)for(var n=0;n0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)&&(n=!0);var r=document.createElement("a");if(r.href=this.m_url,this.m_options.webApplication){var i=ae.embeddingPageOrigin+"="+e+"&"+ae.embeddingPageSessionInfo+"="+this.m_options.sessionKey;0===r.search.length||"?"===r.search?r.search="?"+ae.sessionContext+"="+encodeURIComponent(i):r.search=r.search+"&"+ae.sessionContext+"="+encodeURIComponent(i)}else n?0===r.hash.length||"#"===r.hash?r.hash="#"+t:r.hash=r.hash+"&"+t:0===r.search.length||"?"===r.search?r.search="?"+t:r.search=r.search+"&"+t;return r.href},t.prototype.init=function(){var e=this;window.addEventListener("message",this.m_onMessageHandler);var t=this._getIFrameSrc();return c.createPromise((function(n,r){var i=document.createElement("iframe");if(e.m_options.id&&(i.id=e.m_options.id,i.name=e.m_options.id),i.style.height=e.m_options.height,i.style.width=e.m_options.width,e.m_options.webApplication){var s=document.createElement("form");s.setAttribute("action",t),s.setAttribute("method","post"),s.setAttribute("target",i.name),e.m_options.container.appendChild(s);var l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name","access_token"),l.setAttribute("value",e.m_options.webApplication.accessToken),s.appendChild(l);var u=document.createElement("input");u.setAttribute("type","hidden"),u.setAttribute("name","access_token_ttl"),u.setAttribute("value",e.m_options.webApplication.accessTokenTtl),s.appendChild(u),e.m_options.container.appendChild(i),s.submit()}else i.src=t,e.m_options.container.appendChild(i);e.m_timeoutId=window.setTimeout((function(){e.close();var t=Z.createRuntimeError(o.timeout,c._getResourceString(a.timeout),"EmbeddedSession.init");r(t)}),e.m_options.timeoutInMilliseconds),e.m_promiseResolver=n}))},t.prototype._invoke=function(e,t,n){this.m_enabled?(ie&&(n=ie(n)),this._sendMessageWithCallback(this.m_id++,e,n,(function(e){oe&&(e=oe(e));var n=e.Error;delete e.Error,t(n||0,e)}))):t(5001,null)},t.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler),window.clearTimeout(this.m_timeoutId),this.m_enabled=!1},t.prototype.getEventRegistration=function(e){return this.m_sessionEventManager||(this.m_sessionEventManager=new G(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},t.prototype._createRequestExecutorOrNull=function(){return new le(this)},t.prototype._resolveRequestUrlAndHeaderInfo=function(){return c._createPromiseFromResult(null)},t.prototype._registerEventImpl=function(e,t){var n=this;return c.createPromise((function(r,i){n._sendMessageWithCallback(n.m_id++,ne.RegisterEventCommand,{EventId:e,TargetId:t},(function(){r(null)}))}))},t.prototype._unregisterEventImpl=function(e,t){var n=this;return c.createPromise((function(r,i){n._sendMessageWithCallback(n.m_id++,ne.UnregisterEventCommand,{EventId:e,TargetId:t},(function(){r()}))}))},t.prototype._onMessage=function(e){var t=this;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===e.source&&this.m_chosenOrigin===e.origin)){var n=e.data;if(n&&n[ne.CommandKey]===ne.ApiReadyCommand)!this.m_chosenWindow&&this._isValidDescendant(e.source)&&n[ne.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=e.source,this.m_chosenOrigin=e.origin,this._sendMessageWithCallback(this.m_id++,ne.GetAppContextCommand,null,(function(e){t._setupContext(e),window.clearTimeout(t.m_timeoutId),t.m_promiseResolver()})));else if(n&&n[ne.CommandKey]===ne.FireEventCommand){var r=n[ne.ParamsKey],i=r.EventId,o=r.TargetId,a=r.Data;if(this.m_sessionEventManager)for(var s=this.m_sessionEventManager.getHandlers(i,o),l=0;l0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=2){var s=t[n].message[1];s&&(r=a(s)?JSON.parse(s):s)}"undefined"!==typeof OSF&&OSF.AppTelemetry&&OSF.AppTelemetry.CallOnAppActivatedIfPending&&OSF.AppTelemetry.CallOnAppActivatedIfPending(),o.apply(null,[r])}else OfficeExtension.Utility.log("ActionProxy._handleMessage unknown message type "+t[n].messageType)}catch(e){throw function(e){var t=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t}(e);OfficeExtension.Utility.log(t)}(e),e}return OfficeExtension.Utility._createPromiseFromResult(null)}function a(e){return"string"===typeof e&&"{"===e[0]}function s(){try{Microsoft.Office.WebExtension.onReadyInternal().then((function(){return function(){if("undefined"!==typeof OSF&&OSF.DDA&&OSF.DDA.RichApi&&OSF.DDA.RichApi.richApiMessageManager)return(new OfficeExtension.ClientRequestContext).eventRegistration.register(5,"",o)}()})).then((function(){var e=OSF._OfficeAppFactory.getHostInfo();return!0===e.isDialog||"web"===e.hostPlatform&&"word"!==e.hostType&&"excel"!==e.hostType?void 0:function(){var e=new OfficeExtension.ClientRequestContext,t=OfficeCore.AddinInternalService.newObject(e);return e._customData="WacPartition",t.notifyActionHandlerReady(),e.sync()}()}))}catch(e){}}!function(){OfficeExtension.Utility.log("ActionProxy.initOnce"),"undefined"!=typeof e.actions&&function(e){n=e}(e.actions._association),"undefined"!==typeof document&&(document.readyState&&"loading"!==document.readyState?(OfficeExtension.Utility.log("ActionProxy.initOnce: document.readyState is not loading state"),s()):document.addEventListener&&document.addEventListener("DOMContentLoaded",(function(){OfficeExtension.Utility.log("ActionProxy.initOnce: DOMContentLoaded event triggered"),s()}))),OfficeExtension.HostBridge.onInited((function(e){!function(e){e.addHostMessageHandler((function(e){3===e.type&&o(e.message)}))}(e)}))}()}(t||(t={}))}(Office||(Office={})),function(e){!function(e){function t(){var e=new OfficeCore.RequestContext;return"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e._customData="WacPartition"),e}e.areShortcutsInUse=function(e){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,a;return __generator(this,(function(s){switch(s.label){case 0:return n=t(),r=OfficeCore.ActionService.newObject(n),i=r.areShortcutsInUse(e),[4,n.sync()];case 1:for(s.sent(),o=[],a=0;a0&&Array.isArray(n[0])&&n.length*n[0].length>1500&&d()){var i=Math.max(1,Math.round(1500/n[0].length));e._ValidateArraySize(n.length,n[0].length);for(var o=0;on.length&&(a=n.length-o);var s=e.getRow(o).untrack().getBoundingRect(e.getRow(o+a-1).untrack()).untrack(),l=n.slice(o,o+a);E(s,t,l,null!=r?r:0)}return!0}return!1}function u(e){return OfficeExtension.Utility.isSetSupported("ExcelApi",e.toString())}function d(){return u(1.3)}function f(e){return!("undefined"===typeof window||!window.Office||!window.Office.context)&&window.Office.context.platform===e}e.icons={},["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"].map((function(t,n){var r=i(t);e.icons[r]=[],l[n].map((function(n,o){n=i(n);var a={set:t,index:o};e.icons[r].push(a),e.icons[r][n]=a}))})),function(e){e.NotStarted="notStarted",e.Running="running",e.Succeeded="succeeded",e.Failed="failed"}(o||(o={})),function(e){e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NoContent=204]="NoContent",e[e.HighestSuccessCode=299]="HighestSuccessCode",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout"}(a||(a={})),function(e){e.Close="Session.close",e.CommitChanges="Session.commitChanges",e.Create="Session.resolveRequestUrlAndHeaderInfo",e.Refresh="Session.refreshSession"}(s=e.SessionOperation||(e.SessionOperation={}));var p=function(){function e(e,t,n){var r=void 0===n?{}:n,i=r.persistChanges,o=void 0===i||i,a=r.commitExplicitly,s=void 0===a||a;this.m_requestId="",this.m_workbookUrl=e?this.ensureUrlFormatEndWithSlash(e):"",this.m_requestHeaders=t||{},this.m_persistChanges=o,this.m_commitExplicitly=s}return Object.defineProperty(e.prototype,"requestId",{get:function(){return this.m_requestId},enumerable:!0,configurable:!0}),e.prototype.close=function(){var t=this;if(this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)){var n={method:"POST",url:this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url)+e.CLOSE_SESSION,headers:this.m_requestUrlAndHeaderInfo.headers,body:""};return OfficeExtension.HttpUtility.sendRequest(n).then((function(n){if(n.statusCode!==a.NoContent)throw t.createErrorFromResponseInfo(n,s.Close);for(var r in t.m_requestUrlAndHeaderInfo=null,t.m_requestHeaders)if(r.toLowerCase()===e.WorkbookSessionIdHeaderNameLower){delete t.m_requestHeaders[r];break}}))}return OfficeExtension.Utility._createPromiseFromResult(null)},e.prototype.commitChanges=function(t){var n=this;if(void 0===t&&(t={}),!this.m_commitExplicitly)throw this.createError(a.InternalServerError,"Can not call commitChanges() if commitExplicitly is not set.",s.CommitChanges);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.CommitChanges);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.CommitChanges);var r=this.createCommitChangesRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(r).then((function(r){var i=r.statusCode;if(i===a.Accepted)return n.delay(e.POLL_DELAY).then((function(i){return n.pollResourceLocation(n.getHeaderIgnoreCase(r.headers,e.LOCATION_HEADER),s.CommitChanges,t)})).then((function(e){if(JSON.parse(e.body).status===o.Failed)throw n.createErrorFromResponseInfo(e,s.CommitChanges);return n.parseCooldownTime(e)}));if(i>=a.OK&&i<=a.HighestSuccessCode)return n.parseCooldownTime(r);throw n.createErrorFromResponseInfo(r,s.CommitChanges)}))},e.prototype._resolveRequestUrlAndHeaderInfo=function(t){var n=this;if(void 0===t&&(t={}),this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(this.getHeaderIgnoreCase(this.m_requestHeaders,e.WorkbookSessionIdHeaderNameLower))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);var r=this.createAsyncGraphSessionRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(r).then((function(r){if(n.m_requestId=n.getHeaderIgnoreCase(r.headers,e.REQUEST_ID_HEADER),r.statusCode!==a.Accepted&&r.statusCode!==a.Created)throw n.createErrorFromResponseInfo(r,s.Create);return r.statusCode===a.Created?(n.formatRequestUrlAndHeaderInfo(r),n.m_requestUrlAndHeaderInfo):n.delay(e.POLL_DELAY).then((function(i){return n.pollResourceLocation(n.getHeaderIgnoreCase(r.headers,e.LOCATION_HEADER),s.Create,t)})).then((function(r){var i=JSON.parse(r.body);if(i.status===o.Failed)throw n.createErrorFromResponseInfo(r,s.Create);var a={method:"GET",url:i.resourceLocation,headers:__assign({},t,{Authorization:n.getHeaderIgnoreCase(n.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(a).then((function(e){return n.formatRequestUrlAndHeaderInfo(e),n.m_requestUrlAndHeaderInfo}))}))}))},e.prototype.refreshSession=function(){var e=this;if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.Refresh);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.Refresh);var t=this.createRefreshSessionRequestInfo();return OfficeExtension.HttpUtility.sendRequest(t).then((function(t){if(t.statusCode!=a.NoContent)throw e.createErrorFromResponseInfo(t,s.Refresh);return OfficeExtension.Utility._createPromiseFromResult(null)}))},e.prototype.getHeaderIgnoreCase=function(e,t){var n=Object.keys(e).filter((function(e){return e.toLowerCase()===t.toLowerCase()}));return n.length>0?e[n[0]]:void 0},e.prototype.createCommitChangesRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.COMMIT_CHANGES,r={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,r),OfficeExtension.Utility._copyHeaders(t,r),r[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:r,body:{}}},e.prototype.createAsyncGraphSessionRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.CREATE_SESSION,r={};return OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,r),OfficeExtension.Utility._copyHeaders(t,r),r[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,r[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:r,body:{persistChanges:this.m_persistChanges,commitExplicitly:this.m_commitExplicitly}}},e.prototype.createRefreshSessionRequestInfo=function(){var t=this.getCorrectGraphVersionUrl()+e.REFRESH_SESSION,n={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,n),n[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,{url:t,method:"POST",headers:n,body:{}}},e.prototype.getCorrectGraphVersionUrl=function(){return this.m_workbookUrl.replace(new RegExp("graph.microsoft.com/.*?/"),"graph.microsoft.com/"+e.ASYNC_API_GRAPH_VERSION+"/")},e.prototype.pollResourceLocation=function(t,n,r,i){var s=this;if(void 0===r&&(r={}),void 0===i&&(i=0),i>=e.MAX_POLL_ATTEMPTS)throw this.createError(a.InternalServerError,"Timout while polling for the resource location.",n);var l={method:"GET",url:t,headers:__assign({},r,{Authorization:this.getHeaderIgnoreCase(this.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(l).then((function(l){if(l.statusCode!==a.OK)return s.pollResourceLocation(t,n,r,i+1);switch(JSON.parse(l.body).status){case o.Succeeded:case o.Failed:return l;case o.NotStarted:case o.Running:return s.delay(e.POLL_DELAY).then((function(e){return s.pollResourceLocation(t,n,r,i+1)}));default:throw s.createErrorFromResponseInfo(l,n)}}))},e.prototype.parseCooldownTime=function(t){var n=this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER);return n?1e3*parseInt(n):e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER},e.prototype.formatRequestUrlAndHeaderInfo=function(t){if(t.statusCode!==a.OK&&t.statusCode!==a.Created)throw this.createErrorFromResponseInfo(t,s.Create);var n=JSON.parse(t.body).id,r={};OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,r),r[e.WorkbookSessionIdHeaderName]=n,this.m_requestUrlAndHeaderInfo={url:this.getCorrectGraphVersionUrl(),headers:r}},e.prototype.ensureUrlFormatEndWithSlash=function(e){return"/"!==e.charAt(e.length-1)&&(e+="/"),e},e.prototype.delay=function(e){return new OfficeExtension.CoreUtility.Promise((function(t,n){return setTimeout((function(){return t()}),e)}))},e.prototype.createErrorFromResponseInfo=function(t,n){var r=OfficeExtension.Utility._parseErrorResponse(t),i={retryAfter:this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER),responseBody:OfficeExtension.Utility._parseErrorResponseBody(t)};return OfficeExtension.Utility.createRuntimeError(r.errorCode,r.errorMessage,n,t.statusCode,i)},e.prototype.createError=function(e,t,n){return OfficeExtension.Utility.createRuntimeError(""+e,t,n)},e.WorkbookSessionIdHeaderName="Workbook-Session-Id",e.WorkbookSessionIdHeaderNameLower="workbook-session-id",e.ASYNC_API_GRAPH_VERSION="beta",e.POLL_DELAY=1e4,e.MAX_POLL_ATTEMPTS=10,e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER=1e4,e.LOCATION_HEADER="location",e.AUTHORIZATION_HEADER="authorization",e.REQUEST_ID_HEADER="request-id",e.RETRY_AFTER_HEADER="retry-after",e.PREFER_HEADER="Prefer",e.PREFER_HEADER_VAL="respond-async",e.CONTENT_TYPE_HEADER="Content-Type",e.CONTENT_TYPE_HEADER_VAL="application/json",e.CLOSE_SESSION="closeSession",e.COMMIT_CHANGES="commitChanges",e.CREATE_SESSION="createSession",e.REFRESH_SESSION="refreshSession",e}();e.Session=p;var h=function(t){function n(n){var r=t.call(this,n)||this;return r.m_workbook=A(e.Workbook,r),r._rootObject=r.m_workbook,r._rootObjectPropertyName="workbook",r}return __extends(n,t),n.prototype._processOfficeJsErrorResponse=function(e,t){5004===e&&(t.ErrorCode=B.invalidOperationInCellEditMode,t.HttpStatusCode=400,t.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode))},Object.defineProperty(n.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"runtime",{get:function(){return this.workbook._Runtime},enumerable:!0,configurable:!0}),n}(OfficeCore.RequestContext);e.RequestContext=h;var g=function(){function e(){}return e.enableMacroRecordingEvent=function(e){OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=!0;var t=function(e){return e.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent]="true",e.workbook.onRecordingStateChangedEvent.add((function(e){return OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=e.recording,OfficeExtension.Utility._createPromiseFromResult(null)})),OfficeExtension.Utility._createPromiseFromResult(null)};return void 0!==e&&null!==e?t(e):y((function(e){return t(e)}))},e}();function m(e,t){var n=e;n.delayForCellEdit&&OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")?t._requestFlagModifier|=64:t._requestFlagModifier&=-65,n._makerSafe&&(t._requestFlagModifier|=1024)}function y(t,n){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,(function(t){return new e.RequestContext(t)}),m)}function v(e){var t={BindingColumnCount:e.bindingColumnCount,BindingId:e.bindingId,BindingRowCount:e.bindingRowCount,bindingType:e.bindingType,HasHeaders:e.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function b(e,t){var n;return n=null==e.headers?e.rows:e,void 0===(n=window.OSF.DDA.DataCoercion.coerceData(n,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]))?null:n}function O(e){if(!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version))return!1;var t=window.Office.context.diagnostics.platform.toLowerCase();if("officeonline"===t)return!1;var n=e[t];null==n&&(n=e.general);var r=window.Office.context.diagnostics.version,i=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(r);if(i){var o=parseInt(i[1]),a=parseInt(i[2]),s=parseInt(i[3]);if(o0?o=n.getOffsetRange(r,i):(o=n,a=r,s=i),1===Math.abs(t)?o:o.getBoundingRect(n.getOffsetRange(r*t+a,i*t+s))},t}();e.RangeCustom=w,function(t){t.Range_HandleResult=function(e,t){P(t.isEntireColumn)||(e.m_isEntireColumn=t.isEntireColumn),P(t.isEntireRow)||(e.m_isEntireRow=t.isEntireRow)},t.Range_GetColumnsAfter=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsAfter",n,t.getLastColumn(),0,1)})},t.Range_GetColumnsBefore=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsBefore",n,t.getColumn(0),0,-1)})},t.Range_GetResizedRange=function(e,t,n){return d()?{handled:!1,result:null}:(e._ensureInteger(t,"getResizedRange"),e._ensureInteger(n,"getResizedRange"),{handled:!0,result:(t>=0&&n>=0?e:e.getCell(0,0)).getBoundingRect(e.getLastCell().getOffsetRange(t,n))})},t.Range_GetRowsAbove=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getRowsAbove",n,t.getRow(0),-1,0)})},t.Range_GetRowsBelow=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:this._getAdjacentRange("getRowsBelow",n,t.getLastRow(),1,0)})},t.Range_Formulas_Set=function(e,t){return e.m_formulas=t,c(e,"Formulas",t)?{handled:!0}:{handled:!1}},t.Range_FormulasLocal_Set=function(e,t){return e.m_formulasLocal=t,c(e,"FormulasLocal",t)?{handled:!0}:{handled:!1}},t.Range_FormulasR1C1_Set=function(e,t){return e.m_formulasR1C1=t,c(e,"FormulasR1C1",t)?{handled:!0}:{handled:!1}},t.Range_NumberFormat_Set=function(e,t){return e.m_numberFormat=t,c(e,"NumberFormat",t,x(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_Values_Set=function(e,t){return e.m_values=t,c(e,"Values",t,x(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJson_Set=function(e,t){return e.m_valuesAsJson=t,c(e,"ValuesAsJson",t,x(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJsonLocal_Set=function(e,t){return e.m_valuesAsJsonLocal=t,c(e,"ValuesAsJsonLocal",t,x(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}}}(e._CC||(e._CC={})),function(t){t.SettingCollection_Add=function(n,r,i){return i=t._replaceDateWithStringDate(i),{handled:!0,result:_(e.Setting,n,"Add",0,[r,i],!1,!0,null,0)}},t.SettingCollection_SettingsChanged_EventArgsTransform=function(e,t){return{settings:e}}}(e._CC||(e._CC={})),function(e){function t(e){var t=JSON.stringify(e,(function(e,t){return this[e]instanceof Date?"Date("+this[e].getTime()+")":t}));return e=JSON.parse(t)}e._replaceDateWithStringDate=t,e.Setting_HandleResult=function(e,t){P(t.Value)||(t.Value=function(e){var t=JSON.stringify(e);return e=JSON.parse(t,(function(e,t){var n;return"string"===typeof t&&t&&t.length>6&&"Date("===t.slice(0,5)&&")"===t.slice(-1)&&(n=new Date(parseInt(t.slice(5,-1))))?n:t}))}(t.Value))},e.Setting_Value_Set=function(e,n){if(!F(n)){e.m_value=n;var r=t(n);return E(e,"Value",r,0),{handled:!0}}return{handled:!1}}}(e._CC||(e._CC={}));var M=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.NamedItemCollectionCustom=M,function(e){e.Binding_DataChanged_EventArgsTransform=function(e,t){return{binding:e}},e.Binding_SelectionChanged_EventArgsTransform=function(e,t){return{binding:e,columnCount:t.columnCount,rowCount:t.rowCount,startColumn:t.startColumn,startRow:t.startRow}}}(e._CC||(e._CC={}));var k=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.TableCollectionCustom=k,function(t){t.TableCollection_Changed_EventArgsTransform=function(t,n){var r,i=n;return null==i.valueBefore&&null==i.valueAfter||(r={valueBefore:i.valueBefore,valueAfter:i.valueAfter,valueTypeBefore:i.valueTypeBefore,valueTypeAfter:i.valueTypeAfter,valueAsJsonBefore:i.valueAsJsonBefore,valueAsJsonAfter:i.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:i.changeType,source:i.source,worksheetId:i.worksheetId,tableId:i.tableId,address:i.address,getRange:function(e){return R("TableChangedEventArgs.getRange",C,"1.8",S),e.workbook._GetRangeForEventByReferenceId(i.referenceId)},getRangeOrNullObject:function(e){return R("TableChangedEventArgs.getRangeOrNullObject",C,"1.8",S),e.workbook._GetRangeOrNullObjectForEventByReferenceId(i.referenceId)},details:r}}}(e._CC||(e._CC={})),function(t){t.Table_HandleIdResult=function(e,t){P(t.Id)||(t.Id=t.Id.toString())},t.Table_HandleResult=function(e,t){P(t.Id)||(t.Id=t.Id.toString())},t.Table_Changed_EventArgsTransform=function(t,n){var r,i=n;return null==i.valueBefore&&null==i.valueAfter||(r={valueBefore:i.valueBefore,valueAfter:i.valueAfter,valueTypeBefore:i.valueTypeBefore,valueTypeAfter:i.valueTypeAfter,valueAsJsonBefore:i.valueAsJsonBefore,valueAsJsonAfter:i.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:i.changeType,source:i.source,worksheetId:i.worksheetId,tableId:i.tableId,address:i.address,getRange:function(e){return R("TableChangedEventArgs.getRange",C,"1.8",S),e.workbook._GetRangeForEventByReferenceId(i.referenceId)},getRangeOrNullObject:function(e){return R("TableChangedEventArgs.getRangeOrNullObject",C,"1.8",S),e.workbook._GetRangeOrNullObjectForEventByReferenceId(i.referenceId)},details:r}},t.Table_SelectionChanged_EventArgsTransform=function(t,n){var r=n,i=!r.address||0===r.address.length;return{type:e.EventType.tableSelectionChanged,isInsideTable:!i,worksheetId:r.worksheetId,tableId:t.id,address:r.address}}}(e._CC||(e._CC={}));var N=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ChartCollectionCustom=N,function(t){t.ChartCollection_Add=function(t,n,r,i){if(!(r instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Charts.Add");return{handled:!1,result:null}}}(e._CC||(e._CC={})),function(t){t.Chart_SetData=function(t,n,r){if(!(n instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Chart.setData");return{handled:!1}}}(e._CC||(e._CC={}));var j=function(){function e(){}return e.prototype.load=function(e){return I(this,e),this},e}();e.ChartFillCustom=j;var U=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.VisualCollectionCustom=U,function(e){e.VisualCollection_AgaveVisualUpdate_EventArgsTransform=function(e,t){var n=t;return{type:n.type,payload:n.payload}}}(e._CC||(e._CC={})),function(t){t.Visual_ChangeNotification_EventArgsTransform=function(t,n){var r=n;return{targetId:r.targetId,changeType:r.changeType,payload:r.payload,type:e.EventType.visualChange}}}(e._CC||(e._CC={}));var L=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.PivotTableCollectionCustom=L,function(t){t.PivotLayout_GetColumnLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:_(e.Range,t,"GetColumnLabelRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataBodyRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:_(e.Range,t,"GetDataBodyRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataHierarchy=function(t,n){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:(R("PivotLayout.getDataHierarchy",C,"1.9",S),{handled:!0,result:_(e.DataPivotHierarchy,t,"GetDataHierarchy",0,[n],!1,!1,null,0)})},t.PivotLayout_GetFilterAxisRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:_(e.Range,t,"GetFilterAxisRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:_(e.Range,t,"GetRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRowLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:_(e.Range,t,"GetRowLabelRange",0,[],!1,!1,null,0)}}}(e._CC||(e._CC={})),function(e){e.PivotField_SortByLabels=function(e,t){return"string"===typeof t&&(t="ascending"===t.toLowerCase()),D(e,"SortByLabels",0,[t],0,0),{handled:!0}}}(e._CC||(e._CC={})),function(t){t.NumberFormattingService_GetFormatter=function(t,n){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(R("NumberFormatting.GetFormatter","NumberFormatting","1.1",S),{handled:!0,result:_(e.NumberFormatter,t,"GetFormatter",0,[n],!1,!1,null,0)})}}(e._CC||(e._CC={})),function(e){e.NumberFormatter_Format=function(e,t){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(R("NumberFormatter.Format","NumberFormatting","1.1",S),{handled:!0,result:D(e,"Format",0,[t],0,0)})}}(e._CC||(e._CC={}));var H=function(){function n(){}return n.register=function(n,r){return R("CustomFunctionManager.register","CustomFunctions","1.3",S),t({delayForCellEdit:!0},(function(t){return e.CustomFunctionManager.newObject(t).register(n,r)}))},n.getStatus=function(){return R("CustomFunctionManager.register","CustomFunctions","1.3",S),t({delayForCellEdit:!0},(function(t){var n=e.CustomFunctionManager.newObject(t).load("status");return t.sync().then((function(){return n.status}))}))},n}();e.CustomFunctionManagerCustom=H,function(e){e.CustomFunctionManager_StaticCustomize=function(e){e.register=H.register,e.getStatus=H.getStatus}}(e._CC||(e._CC={})),function(e){e.Style_TextOrientation_Set=function(e,t){return e.m_textOrientation=t,E(e,"Orientation",t,0),{handled:!0}}}(e._CC||(e._CC={})),function(e){e.InternalTest_Test1Event_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}},e.InternalTest_TestEvent_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}}}(e._CC||(e._CC={}));var W=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.CommentCollectionCustom=W;var B,V=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ShapeCollectionCustom=V,function(e){e.accessDenied="AccessDenied",e.apiNotFound="ApiNotFound",e.conflict="Conflict",e.emptyChartSeries="EmptyChartSeries",e.filteredRangeConflict="FilteredRangeConflict",e.formulaLengthExceedsLimit="FormulaLengthExceedsLimit",e.generalException="GeneralException",e.inactiveWorkbook="InactiveWorkbook",e.insertDeleteConflict="InsertDeleteConflict",e.invalidArgument="InvalidArgument",e.invalidBinding="InvalidBinding",e.invalidOperation="InvalidOperation",e.invalidReference="InvalidReference",e.invalidSelection="InvalidSelection",e.itemAlreadyExists="ItemAlreadyExists",e.itemNotFound="ItemNotFound",e.mergedRangeConflict="MergedRangeConflict",e.nonBlankCellOffSheet="NonBlankCellOffSheet",e.notImplemented="NotImplemented",e.openWorkbookLinksBlocked="OpenWorkbookLinksBlocked",e.operationCellsExceedLimit="OperationCellsExceedLimit",e.pivotTableRangeConflict="PivotTableRangeConflict",e.powerQueryRefreshResourceChallenge="PowerQueryRefreshResourceChallenge",e.rangeExceedsLimit="RangeExceedsLimit",e.refreshWorkbookLinksBlocked="RefreshWorkbookLinksBlocked",e.requestAborted="RequestAborted",e.responsePayloadSizeLimitExceeded="ResponsePayloadSizeLimitExceeded",e.unsupportedFeature="UnsupportedFeature",e.unsupportedFillType="UnsupportedFillType",e.unsupportedOperation="UnsupportedOperation",e.unsupportedSheet="UnsupportedSheet",e.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"}(B=e.ErrorCodes||(e.ErrorCodes={})),e.Interfaces||(e.Interfaces={});new OfficeExtension.LibraryBuilder({metadata:{version:"1.0.0",name:"Excel",defaultApiSetName:"ExcelApi",hostName:"Excel",apiSets:[["1.19","ExcelApiUndo"],["1.1","Recorder"],["99.9"],["1.4","ExcelApiUndo"],["1.8"],["1.9"],["1.11"],["1.18"],["1.6"],["1.6","ExcelApiUndo"],["1.7"],["1.1","ExcelApiUndo"],["1.2"],["1.3"],["1.4"],["1.5"],["1.10"],["1.14"],["1.1","ExcelApiOnline"],["1.1","CustomFunctions"],["1.1","WACOperationEvents"],["1.3","ExcelApiUndo"],["1.13"],["1.16"],["1.8","ExcelApiUndo"],["1.16","ExcelApiUndo"],["1.12"],["1.2","ExcelApiOnline"],["1.2","ExcelApiUndo"],["1.17"],["1.7","ExcelApiUndo"],["1.10","ExcelApiUndo"],["1.14","ExcelApiUndo"],["1.15","ExcelApiUndo"],["1.15"],["1.17","ExcelApiUndo"],["99.99","ExcelApiUndo"],["1.9","ExcelApiUndo"],["1.11","ExcelApiUndo"],["1.12","ExcelApiUndo"],["1.13","ExcelApiUndo"],["1.18","ExcelApiUndo"]],strings:[],enumTypes:[["UndoChangeType",["undoAction","redoAction","undoOrRedoCleared","undoGroupAdded"]],["SDX",["guidedReapply"]],["BusinessBarEntryType",[],{officeScriptsRunningStatus:0,msFormsDataSyncRunningStatus:1}],["FormulaReferenceStyle",["a1","r1C1"]],["NavigationObjectType",["table","pivotTable","chart","shape","namedRange"]],["UserActivityType",["none","insertSheet","deleteSheet","renameSheet","changeCell","insertRow","insertColumn","deleteRow","deleteColumn","insertPartialRow","insertPartialColumn","insertPartialColumnRightToLeft","deletePartialRow","deletePartialColumn","deletePartialColumnRightToLeft","move","sort","mergeCells","unmergeCells","unknownOperation","genericEdit"]],["LineageEndOfLogStatus",["loadInProgress","success","endOfLog","purged","trimmed","unsupported","cleared","error"]],["LineageLoadType",["new","next","previous","latest"]],["LoadToType",["connectionOnly","table","pivotTable","pivotChart"]],["QueryError",["unknown","none","failedLoadToWorksheet","failedLoadToDataModel","failedDownload","failedToCompleteDownload"]],["RangeOptimizationType",["other","numberFormat","textAlignment","textProperties","cellBorder","fillColor","sheetProtection","rowHeight","rowVisibility"]],["WorkbookLinksHardToFindMessages",["none","containsDefinedNames","hiddenOrVeryHiddenSheet","hiddenFloatingObjects","lockedFloatingObjectsThroughVba","protectedSheet","containsConditionalFormatting","containsDataValidation","hiddenRowsAndColumns"]],["WorkbookLinksIconState",["ok","moreInfo","warning"]],["WorkbookLinksRefreshSettings",["ask","always","never"]],["WorkbookConditionalFormattingRulesManagerScope",["defaultScope","selectedRange","activatedWorksheet","activatedTable","activatedPivotTable"]],["WorkbookLinksRefreshMode",["manual","automatic"]],["HelpTopic",["showChanges","guidedReapply","externalCodeServiceDiagnostics"]],["DocumentTaskChangeAction",[],{unknown:"unknown",create:"create",assign:"assign",unassign:"unassign",unassignAll:"unassignAll",setSchedule:"setSchedule",setPercentComplete:"setPercentComplete",setPriority:"setPriority",remove:"remove",restore:"restore",setTitle:"setTitle",undo:"undo"}],["DataSourceType",["unknown","cube","localRange","localTable","oledbDefault"]],["DateFilterCondition",["unknown","equals","before","beforeOrEqualTo","after","afterOrEqualTo","between","tomorrow","today","yesterday","nextWeek","thisWeek","lastWeek","nextMonth","thisMonth","lastMonth","nextQuarter","thisQuarter","lastQuarter","nextYear","thisYear","lastYear","yearToDate","allDatesInPeriodQuarter1","allDatesInPeriodQuarter2","allDatesInPeriodQuarter3","allDatesInPeriodQuarter4","allDatesInPeriodJanuary","allDatesInPeriodFebruary","allDatesInPeriodMarch","allDatesInPeriodApril","allDatesInPeriodMay","allDatesInPeriodJune","allDatesInPeriodJuly","allDatesInPeriodAugust","allDatesInPeriodSeptember","allDatesInPeriodOctober","allDatesInPeriodNovember","allDatesInPeriodDecember"]],["LabelFilterCondition",["unknown","equals","beginsWith","endsWith","contains","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between"]],["PivotFilterType",["unknown","value","manual","label","date"]],["TopBottomSelectionType",["items","percent","sum"]],["ValueFilterCondition",["unknown","equals","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between","topN","bottomN"]],["BuiltInPivotTableStyle",["none","light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","light22","light23","light24","light25","light26","light27","light28","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11","dark12","dark13","dark14","dark15","dark16","dark17","dark18","dark19","dark20","dark21","dark22","dark23","dark24","dark25","dark26","dark27","dark28"]],["BuiltInSlicerStyle",["light1","light2","light3","light4","light5","light6","other1","other2","dark1","dark2","dark3","dark4","dark5","dark6"]],["BuiltInTableStyle",["light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11"]],["ChartSeriesDimension",["categories","values","bubbleSizes"],{xvalues:"XValues",yvalues:"YValues"}],["PivotTableDateGroupBy",["invalid","bySeconds","byMinutes","byHours","byDays","byMonths","byQuarters","byYears"]],["PivotFilterTopBottomCriterion",["invalid","topItems","topPercent","topSum","bottomItems","bottomPercent","bottomSum"]],["SortBy",["ascending","descending"]],["AggregationFunction",["unknown","automatic","sum","count","average","max","min","product","countNumbers","standardDeviation","standardDeviationP","variance","varianceP"]],["ShowAsCalculation",["unknown","none","percentOfGrandTotal","percentOfRowTotal","percentOfColumnTotal","percentOfParentRowTotal","percentOfParentColumnTotal","percentOfParentTotal","percentOf","runningTotal","percentRunningTotal","differenceFrom","percentDifferenceFrom","rankAscending","rankDecending","index"]],["PivotAxis",["unknown","row","column","data","filter"]],["LinkedDataTypeRefreshMode",["unknown","manual","onLoad","periodic"]],["AxisType",["invalid","category","value","series"]],["AxisGroup",["primary","secondary"]],["AxisScaleType",["linear","logarithmic"]],["AxisCrosses",["automatic","maximum","minimum","custom"]],["AxisTickMark",["none","cross","inside","outside"]],["AxisTickLabelPosition",["nextToAxis","high","low","none"]],["TrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ChartAxisType",["invalid","category","value","series"]],["ChartAxisGroup",["primary","secondary"]],["ChartAxisScaleType",["linear","logarithmic"]],["ChartAxisPosition",["automatic","maximum","minimum","custom"]],["ChartAxisTickMark",["none","cross","inside","outside"]],["CalculationState",["done","calculating","pending"]],["ChartAxisTickLabelPosition",["nextToAxis","high","low","none"]],["ChartAxisDisplayUnit",["none","hundreds","thousands","tenThousands","hundredThousands","millions","tenMillions","hundredMillions","billions","trillions","custom"]],["ChartAxisTimeUnit",["days","months","years"]],["ChartBoxQuartileCalculation",["inclusive","exclusive"]],["ChartAxisCategoryType",["automatic","textAxis","dateAxis"]],["ChartBinType",["category","auto","binWidth","binCount"]],["ChartLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","grey25","grey50","grey75","automatic","roundDot"]],["ChartDataLabelPosition",["invalid","none","center","insideEnd","insideBase","outsideEnd","left","right","top","bottom","bestFit","callout"]],["ChartErrorBarsInclude",["both","minusValues","plusValues"]],["ChartErrorBarsType",["fixedValue","percent","stDev","stError","custom"]],["ChartMapAreaLevel",["automatic","dataOnly","city","county","state","country","continent","world"]],["ChartGradientStyle",["twoPhaseColor","threePhaseColor"]],["ChartGradientStyleType",["extremeValue","number","percent"]],["ChartTitlePosition",["automatic","top","bottom","left","right"]],["ChartLegendPosition",["invalid","top","bottom","left","right","corner","custom"]],["ChartMarkerStyle",["invalid","automatic","none","square","diamond","triangle","star","dot","dash","circle","plus","picture"],{x:"X"}],["ChartPlotAreaPosition",["automatic","custom"]],["ChartMapLabelStrategy",["none","bestFit","showAll"]],["ChartMapProjectionType",["automatic","mercator","miller","robinson","albers"]],["ChartParentLabelStrategy",["none","banner","overlapping"]],["ChartSeriesBy",["auto","columns","rows"]],["ChartDataSourceType",["localRange","externalRange","list","unknown"]],["ChartTextHorizontalAlignment",["center","left","right","justify","distributed"]],["ChartTextVerticalAlignment",["center","bottom","top","justify","distributed"]],["ChartTickLabelAlignment",["center","left","right"]],["ChartType",["invalid","columnClustered","columnStacked","columnStacked100","barClustered","barStacked","barStacked100","lineStacked","lineStacked100","lineMarkers","lineMarkersStacked","lineMarkersStacked100","pieOfPie","pieExploded","barOfPie","areaStacked","areaStacked100","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","line","pie","area","doughnut","radar","histogram","boxwhisker","pareto","regionMap","treemap","waterfall","sunburst","funnel"],{_3DColumnClustered:"3DColumnClustered",_3DColumnStacked:"3DColumnStacked",_3DColumnStacked100:"3DColumnStacked100",_3DBarClustered:"3DBarClustered",_3DBarStacked:"3DBarStacked",_3DBarStacked100:"3DBarStacked100",_3DPieExploded:"3DPieExploded",xyscatterSmooth:"XYScatterSmooth",xyscatterSmoothNoMarkers:"XYScatterSmoothNoMarkers",xyscatterLines:"XYScatterLines",xyscatterLinesNoMarkers:"XYScatterLinesNoMarkers",_3DAreaStacked:"3DAreaStacked",_3DAreaStacked100:"3DAreaStacked100",_3DColumn:"3DColumn",_3DLine:"3DLine",_3DPie:"3DPie",xyscatter:"XYScatter",_3DArea:"3DArea"}],["ChartUnderlineStyle",["none","single"]],["ChartDisplayBlanksAs",["notPlotted","zero","interplotted"]],["ChartPlotBy",["rows","columns"]],["ChartSplitType",["splitByPosition","splitByValue","splitByPercentValue","splitByCustomSplit"]],["ChartColorScheme",["colorfulPalette1","colorfulPalette2","colorfulPalette3","colorfulPalette4","monochromaticPalette1","monochromaticPalette2","monochromaticPalette3","monochromaticPalette4","monochromaticPalette5","monochromaticPalette6","monochromaticPalette7","monochromaticPalette8","monochromaticPalette9","monochromaticPalette10","monochromaticPalette11","monochromaticPalette12","monochromaticPalette13"]],["ChartTrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ShapeZOrder",["bringToFront","bringForward","sendToBack","sendBackward"]],["ShapeType",["unsupported","image","geometricShape","group","line"]],["ShapeScaleType",["currentSize","originalSize"]],["ShapeScaleFrom",["scaleFromTopLeft","scaleFromMiddle","scaleFromBottomRight"]],["ShapeFillType",["noFill","solid","gradient","pattern","pictureAndTexture","mixed"]],["ShapeFontUnderlineStyle",["none","single","double","heavy","dotted","dottedHeavy","dash","dashHeavy","dashLong","dashLongHeavy","dotDash","dotDashHeavy","dotDotDash","dotDotDashHeavy","wavy","wavyHeavy","wavyDouble"]],["PictureFormat",[],{unknown:"UNKNOWN",bmp:"BMP",jpeg:"JPEG",gif:"GIF",png:"PNG",svg:"SVG"}],["ShapeLineStyle",["single","thickBetweenThin","thickThin","thinThick","thinThin"]],["ShapeLineDashStyle",["dash","dashDot","dashDotDot","longDash","longDashDot","roundDot","solid","squareDot","longDashDotDot","systemDash","systemDot","systemDashDot"]],["ArrowheadLength",["short","medium","long"]],["ArrowheadStyle",["none","triangle","stealth","diamond","oval","open"]],["ArrowheadWidth",["narrow","medium","wide"]],["PremiumLicenseName",["python"]],["BindingType",["range","table","text"]],["BorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight","insideVertical","insideHorizontal","diagonalDown","diagonalUp"]],["BorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","double","slantDashDot"]],["BorderWeight",["hairline","thin","medium","thick"]],["CalculationMode",["automatic","automaticExceptTables","manual"]],["RuntimeCalculationMode",[],{undefined:0,automatic:1,automaticExceptTables:2,manual:3}],["CalculationType",["recalculate","full","fullRebuild"]],["ClearApplyTo",["all","formats","contents","hyperlinks","removeHyperlinks"]],["VisualCategory",["column","bar","line","area","pie","donut","scatter","bubble","statistical","stock","combo","hierarchy","surface","map","funnel","radar","waterfall","threeD","other"]],["VisualPropertyType",["object","collection","string","double","int","bool","enum","color"]],["VisualChangeType",["dataChange","propertyChange","genericChange","selectionChange"]],["BoolMetaPropertyType",["writeOnly","readOnly","hideEntireSubtreeUI","hideMeButShowChildrenUI","expandableUI","nextPropOnSameLine","hideLabel","showResetUI","hasOwnExpandableSection","nextPropOnSameLineFOTP","showResetUIFOTP","untransferable","ignoreDuringChangeChartType","notTriviallyUndoable","volatileEnum","exceptionCollection","metaOnly","showHideCollection","errorMessage","infoMessage"]],["ConditionalDataBarAxisFormat",["automatic","none","cellMidPoint"]],["ConditionalDataBarDirection",["context","leftToRight","rightToLeft"]],["ConditionalFormatDirection",["top","bottom"]],["ConditionalFormatType",["custom","dataBar","colorScale","iconSet","topBottom","presetCriteria","containsText","cellValue"]],["ConditionalFormatRuleType",["invalid","automatic","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalFormatIconRuleType",["invalid","number","percent","formula","percentile"]],["ConditionalFormatColorCriterionType",["invalid","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalTopBottomCriterionType",["invalid","topItems","topPercent","bottomItems","bottomPercent"]],["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"]],["ConditionalTextOperator",["invalid","contains","notContains","beginsWith","endsWith"]],["ConditionalCellValueOperator",["invalid","between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual"]],["ConditionalIconCriterionOperator",["invalid","greaterThan","greaterThanOrEqual"]],["ConditionalRangeBorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight"]],["ConditionalRangeBorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot"]],["ConditionalRangeFontUnderlineStyle",["none","single","double"]],["CustomFunctionType",["invalid","script","webService"]],["CustomFunctionMetadataFormat",["invalid","openApi"]],["DataValidationType",["none","wholeNumber","decimal","list","date","time","textLength","custom","inconsistent","mixedCriteria"]],["DataValidationOperator",["between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqualTo","lessThanOrEqualTo"]],["DataValidationAlertStyle",["stop","warning","information"]],["DeleteShiftDirection",["up","left"]],["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"]],["FilterDatetimeSpecificity",["year","month","day","hour","minute","second"]],["FilterOn",["bottomItems","bottomPercent","cellColor","dynamic","fontColor","values","topItems","topPercent","icon","custom"]],["FilterOperator",["and","or"]],["HorizontalAlignment",["general","left","center","right","fill","justify","centerAcrossSelection","distributed"]],["IconSet",["invalid","threeArrows","threeArrowsGray","threeFlags","threeTrafficLights1","threeTrafficLights2","threeSigns","threeSymbols","threeSymbols2","fourArrows","fourArrowsGray","fourRedToBlack","fourRating","fourTrafficLights","fiveArrows","fiveArrowsGray","fiveRating","fiveQuarters","threeStars","threeTriangles","fiveBoxes"]],["ImageFittingMode",["fit","fitAndCenter","fill"]],["InsertShiftDirection",["down","right"]],["NamedItemScope",["worksheet","workbook"]],["NamedItemType",["string","integer","double","boolean","range","error","array"]],["RangeUnderlineStyle",["none","single","double","singleAccountant","doubleAccountant"]],["SheetVisibility",["visible","hidden","veryHidden"]],["EventTriggerSource",["unknown","thisLocalAddin"]],["RangeValueType",["unknown","empty","string","integer","double","boolean","error","richValue"]],["KeyboardDirection",["left","right","up","down"]],["SearchDirection",["forward","backwards"]],["SortOrientation",["rows","columns"]],["SortOn",["value","cellColor","fontColor","icon"]],["SortDataOption",["normal","textAsNumber"]],["SortMethod",["pinYin","strokeCount"]],["VerticalAlignment",["top","center","bottom","justify","distributed"]],["MessageCategory",[],{none:0,customFunction:1,action:2,event:65536}],["MessageType",[],{none:0,testEvent:1,test1Event:2,worksheetDataChangedEvent:10,worksheetActivatedEvent:11,worksheetDeactivatedEvent:12,worksheetAddedEvent:13,worksheetSelectionChangedEvent:14,worksheetDeletedEvent:15,worksheetCalculatedEvent:16,worksheetFilteredEvent:17,worksheetFormatChangedEvent:18,worksheetRowSortedEvent:19,worksheetColumnSortedEvent:20,worksheetSingleClickedEvent:21,worksheetRowHiddenChangedEvent:22,worksheetFormulaChangedEvent:23,worksheetProtectionChangedEvent:24,worksheetNameChangedEvent:25,worksheetVisibilityChangedEvent:26,worksheetMovedEvent:27,worksheetNavigationObjectChangedEvent:28,worksheetRowHeightChangedEvent:29,workbookFormulaReferenceStyleChangedEvent:30,chartAddedEvent:50,chartActivatedEvent:51,chartDeactivatedEvent:52,chartDeletedEvent:53,tableSelectionChangedEvent:100,tableDataChangedEvent:101,tableAddedEvent:102,tableDeletedEvent:103,tableFilteredEvent:104,agaveVisualUpdateEvent:150,customFunctionExecutionBeginEvent:200,customFunctionExecutionEndEvent:201,commentAddedEvent:250,commentDeletedEvent:251,commentChangedEvent:252,invocationMessage:1e3,cancellationMessage:1001,metadataMessage:1002,visualSelectionChangedEvent:2e3,visualChangeEvent:2001,visualTrackerModelChangedEvent:2002,shapeSelectionChangedEvent:2100,shapeActivatedEvent:2101,shapeDeactivatedEvent:2102,shapeAddedEvent:2103,shapeDeletedEvent:2104,workbookAutoSaveSettingChangedEvent:2200,wacoperationEvent:2201,recordingStateChangedEvent:2202,workbookActivatedEvent:2203,workbookNavigationObjectChangedEvent:2204,ribbonCommandExecutedEvent:2300,linkedDataTypeRefreshRequestCompletedEvent:2500,linkedDataTypeRefreshModeChangedEvent:2501,linkedDataTypeLinkedDataTypeAddedEvent:2502,linkedWorkbookWorkbookLinksChangedEvent:2600,linkedWorkbookRefreshCompletedEvent:2601,rangePickerSelectionChangedEvent:2700,rangePickerDeactivatedEvent:2701,lineageActivityUpdateAvailableEvent:2800,lineageActivityFilterUpdatedEvent:2801,lineageActivityLoadCompletedEvent:2802,pivotTableAddedEvent:2900,pivotTableDeletedEvent:2901,namedItemAddedEvent:3e3,namedItemDeletedEvent:3001,guidedReapplyManagerUpdateAvailableEvent:3100,vbaRecorderRecordingChangedEvent:3200,vbaRecorderRecordingChanged2Event:3202,workbookActionRecordedEvent:3201,externalCodeServiceDiagnosticsNewEntryEvent:3300,externalCodeServiceDiagnosticsFilterUpdatedEvent:3301,rangeValuesPreviewDismissedEvent:3400,applicationUndoChangedEvent:3500,appRuntimeVisibilityChangedEvent:65539,beforeCloseNotifiactionCancelledEvent:65540,augmentationLoopAnnotationAddedEvent:65541}],["InsertDeleteCellsShiftDirection",["none","shiftCellLeft","shiftCellUp","shiftCellRight","shiftCellDown"]],["DocumentPropertyType",["number","boolean","date","string","float"]],["EventSource",["local","remote"]],["DataChangeType",["unknown","rangeEdited","rowInserted","rowDeleted","columnInserted","columnDeleted","cellInserted","cellDeleted"]],["RowHiddenChangeType",["unhidden","hidden"]],["CommentChangeType",["commentEdited","commentResolved","commentReopened","replyAdded","replyDeleted","replyEdited"]],["EventType",["worksheetChanged","worksheetSelectionChanged","worksheetAdded","worksheetActivated","worksheetDeactivated","tableChanged","tableSelectionChanged","worksheetDeleted","chartAdded","chartActivated","chartDeactivated","chartDeleted","worksheetCalculated","visualSelectionChanged","agaveVisualUpdate","tableAdded","tableDeleted","tableFiltered","worksheetFiltered","shapeActivated","shapeDeactivated","visualChange","workbookAutoSaveSettingChanged","worksheetFormatChanged","ribbonCommandExecuted","worksheetRowSorted","worksheetColumnSorted","worksheetSingleClicked","worksheetRowHiddenChanged","recordingStateChangedEvent","commentAdded","commentDeleted","commentChanged","linkedDataTypeRefreshRequestCompleted","linkedDataTypeRefreshModeChanged","linkedDataTypeLinkedDataTypeAdded","worksheetFormulaChanged","workbookActivated","linkedWorkbookWorkbookLinksChanged","linkedWorkbookRefreshCompleted","worksheetProtectionChanged","worksheetNameChanged","worksheetVisibilityChanged","worksheetMoved","lineageActivityUpdateAvailable","lineageActivityFilterUpdated","lineageActivityLoadCompleted","shapeAdded","shapeDeleted","pivotTableAdded","pivotTableDeleted","namedItemAdded","namedItemDeleted","worksheetNavigationObjectChanged","workbookNavigationObjectChanged","worksheetRowHeightChanged","workbookFormulaReferenceStyleChanged","guidedReapplyManagerUpdateAvailable","vbaRecorderRecordingChanged","rangeValuesPreviewDismissed","annotationAdded","workbookActionRecorded","applicationUndoChanged","vbaRecorderRecordingChanged2"],{wacoperationEvent:"WACOperationEvent"}],["DocumentPropertyItem",["title","subject","author","keywords","comments","template","lastAuth","revision","appName","lastPrint","creation","lastSave","category","format","manager","company"]],["SubtotalLocationType",["atTop","atBottom","off"]],["PivotLayoutType",["compact","tabular","outline"]],["ProtectionSelectionMode",["normal","unlocked","none"]],["PageOrientation",["portrait","landscape"]],["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"]],["ReadingOrder",["context","leftToRight","rightToLeft"]],["BuiltInStyle",["normal","comma","currency","percent","wholeComma","wholeDollar","hlink","hlinkTrav","note","warningText","emphasis1","emphasis2","emphasis3","sheetTitle","heading1","heading2","heading3","heading4","input","output","calculation","checkCell","linkedCell","total","good","bad","neutral","accent1","accent1_20","accent1_40","accent1_60","accent2","accent2_20","accent2_40","accent2_60","accent3","accent3_20","accent3_40","accent3_60","accent4","accent4_20","accent4_40","accent4_60","accent5","accent5_20","accent5_40","accent5_60","accent6","accent6_20","accent6_40","accent6_60","explanatoryText"]],["PrintErrorType",["asDisplayed","blank","dash","notAvailable"]],["WorksheetPositionType",["none","before","after","beginning","end"]],["PrintComments",["noComments","endSheet","inPlace"]],["PrintOrder",["downThenOver","overThenDown"]],["PrintMarginUnit",["points","inches","centimeters"]],["HeaderFooterState",["default","firstAndDefault","oddAndEven","firstOddAndEven"]],["AutoFillType",["fillDefault","fillCopy","fillSeries","fillFormats","fillValues","fillDays","fillWeekdays","fillMonths","fillYears","linearTrend","growthTrend","flashFill"]],["GroupOption",["byRows","byColumns"]],["RangeCopyType",["all","formulas","values","formats","link"]],["LinkedDataTypeState",["none","validLinkedData","disambiguationNeeded","brokenLinkedData","fetchingData"]],["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"]],["ConnectorType",["straight","elbow","curve"]],["ContentType",["plain","mention"]],["SpecialCellType",["conditionalFormats","dataValidations","blanks","constants","formulas","sameConditionalFormat","sameDataValidation","visible"]],["SpecialCellValueType",["all","errors","errorsLogical","errorsNumbers","errorsText","errorsLogicalNumber","errorsLogicalText","errorsNumberText","logical","logicalNumbers","logicalText","logicalNumbersText","numbers","numbersText","text"]],["Placement",["twoCell","oneCell","absolute"]],["FillPattern",["none","solid","gray50","gray75","gray25","horizontal","vertical","down","up","checker","semiGray75","lightHorizontal","lightVertical","lightDown","lightUp","grid","crissCross","gray16","gray8","linearGradient","rectangularGradient"]],["ShapeTextHorizontalAlignment",["left","center","right","justify","justifyLow","distributed","thaiDistributed"]],["ShapeTextVerticalAlignment",["top","middle","bottom","justified","distributed"]],["ShapeTextVerticalOverflow",["overflow","ellipsis","clip"]],["ShapeTextHorizontalOverflow",["overflow","clip"]],["ShapeTextReadingOrder",["leftToRight","rightToLeft"]],["ShapeTextOrientation",["horizontal","vertical","vertical270","wordArtVertical","eastAsianVertical","mongolianVertical","wordArtVerticalRTL"]],["ShapeAutoSize",["autoSizeNone","autoSizeTextToFitShape","autoSizeShapeToFitText","autoSizeMixed"]],["CloseBehavior",["save","skipSave"]],["SaveBehavior",["save","prompt"]],["SlicerSortType",["dataSourceOrder","ascending","descending"]],["RibbonTab",["others","home","insert","draw","pageLayout","formulas","data","review","view","developer","addIns","help"]],["NumberFormatCategory",["general","number","currency","accounting","date","time","percentage","fraction","scientific","text","special","custom"]]],clientObjectTypes:[["UndoScope",0,0,0,[["close",0,0,0,2],["open",1,0,0,2]]],["RangeValuesPreview",4,0,0,[["_RegisterEventDismissed",0,0,0,2,0,1],["_UnregisterEventDismissed",0,0,0,2,0,1],["dismiss",0,2,0,4],["show",3,2,0,4]],0,0,0,[["Dismissed",0,0,"MessageType.rangeValuesPreviewDismissedEvent","this._ParentObject.id","_RegisterEventDismissed","_UnregisterEventDismissed"]]],["AugmentationLoop",0,0,0,[["_RegisterAnnotationAddedEvent",0,2,0,4],["_UnregisterAnnotationAddedEvent",0,2,0,4],["activateAnnotation",1,2,0,4],["submitSignal",1,2,0,4]],0,0,0,[["AnnotationAdded",0,0,"MessageType.augmentationLoopAnnotationAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAnnotationAddedEvent","_UnregisterAnnotationAddedEvent"]]],["ExternalCodeService",0,0,[["diagnostics","ExternalCodeServiceDiagnostics",2,0,0,4]]],["ExternalCodeServiceDiagnostics",0,[["id",2]],0,[["_RegisterEventNewEntry",0,0,0,2,0,1],["_UnregisterEventNewEntry",0,0,0,2,0,1],["clear",0,2,0,4],["fireStoredEntries",0,2,0,4],["_RegisterEventFilterUpdated",0,0,0,2,0,1],["_UnregisterEventFilterUpdated",0,0,0,2,0,1]],0,0,0,[["FilterUpdated",0,0,"MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent","this.id","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["NewEntry",0,0,"MessageType.externalCodeServiceDiagnosticsNewEntryEvent","this.id","_RegisterEventNewEntry","_UnregisterEventNewEntry"]]],["VbaRecorder",0,[["id",2]],0,[["_RegisterEventRecordingChanged",0,0,0,2,0,1],["_UnregisterEventRecordingChanged",0,0,0,2,0,1],["_RegisterEventRecordingChanged2",0,2,2,4],["_UnregisterEventRecordingChanged2",0,2,2,4]],0,0,0,[["RecordingChanged",0,0,"MessageType.vbaRecorderRecordingChangedEvent","this.id","_RegisterEventRecordingChanged","_UnregisterEventRecordingChanged"],["RecordingChanged2",0,2,"MessageType.vbaRecorderRecordingChanged2Event","this.id","_RegisterEventRecordingChanged2","_UnregisterEventRecordingChanged2"]]],["WorksheetOptimizationScanResult",0,[["allocatedCells",2],["optimizableCells",2]],[["ranges","RangeOptimizationCollection",18,0,0,4]]],["UserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity"],["GuidedReapplyManager",0,0,[["activities","UserActivityCollection",18,0,0,4],["summaryCardUserActivity","SummaryCardUserActivity",2,0,0,4]],[["openSavedFile",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["discardActivites",0,2,0,4],["reapplyActivity",1,2,0,4],["saveActivities",0,2,0,4]],0,0,0,[["UpdateAvailable",0,0,"MessageType.guidedReapplyManagerUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["BusinessBar",0,0,0,[["hide",2],["show",2]]],["UserActivity",0,[["activityId",2],["activityType",2],["author",2],["createdDateTime",10],["guid",2],["rangeAddress",2],["sheetName",2],["valueChangeData",2],["authorEmail",2],["locationDeleted",2]],[["highlightRangeAreas","RangeAreas",2,0,0,4]]],["LineageActivityCollection",1,0,0,[["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["clear",0,2,0,4],["getCount",0,2,0,4],["getState",0,2,0,4],["loadActivities",1,2,0,4],["loadLatestActivities",0,2,0,4],["loadNextActivities",0,2,0,4],["loadPreviousActivities",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventFilterUpdated",0,2,0,4],["_RegisterEventLoadCompleted",0,2,0,4],["_UnregisterEventFilterUpdated",0,2,0,4],["_UnregisterEventLoadCompleted",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity",[["FilterUpdated",0,0,"MessageType.lineageActivityFilterUpdatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["LoadCompleted",0,0,"MessageType.lineageActivityLoadCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventLoadCompleted","_UnregisterEventLoadCompleted"],["UpdateAvailable",0,0,"MessageType.lineageActivityUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["SummaryItemUserActivity",0,[["activityType",2],["rangeAddresses",2],["sheetName",2],["valueChangeData",2]]],["SummaryItemUserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SummaryItemUserActivity",1,2,0,4]],0,"SummaryItemUserActivity"],["SummaryCardUserActivity",0,[["authors",2],["currentUser",2],["displayTime",10],["numberOfDetailedCard",2],["summaryUnviewableData",2]],[["summaryItemUserActivities","SummaryItemUserActivityCollection",18,0,0,4]]],["AllowEditRange",0,[["address",1],["isPasswordProtected",3],["title",1]],0,[["delete"],["pauseProtection",1],["setPassword",1]]],["AllowEditRangeCollection",1,0,0,[["add",3],["getCount",0,2,0,4],["pauseProtection",1]],[["getItem","AllowEditRange",1,18,0,4],["getItemAt","AllowEditRange",1,2,0,4],["getItemOrNullObject","AllowEditRange",1,2,0,4]],0,"AllowEditRange"],["Query",0,[["loadedTo",2],["loadedToDataModel",2],["name",2],["refreshDate",10],["rowsLoadedCount",2],["error",2]]],["QueryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Query",1,18,0,4]],0,"Query"],["VisualTracker",0,[["id",2]],0,[["_RegisterEventModelChanged",0,2],["_UnregisterEventModelChanged",0,2],["requestTrackingAlteration",2,2,0,4]],0,0,0,[["ModelChanged",0,0,"MessageType.visualTrackerModelChangedEvent","this.id","_RegisterEventModelChanged","_UnregisterEventModelChanged"]]],["NumberFormatProperty",0,[["key",3],["currency",3],["dateTime",3],["dateTimeHasDayOfWeek",3],["dateTimeHasMonth",3],["dateTimeHasYear",3],["numeric",3],["percent",3],["text",3]]],["NumberFormatPropertyCollection",1,0,0,0,[["getItemAt","NumberFormatProperty",1,2,0,4]],0,"NumberFormatProperty"],["RangeOptimization",0,[["optimizationTypes",2],["range",2]]],["RangeOptimizationCollection",1,[["allocatedCells",2],["optimizableCells",2]],0,[["getCount",0,2,0,4]],[["getItemAt","RangeOptimization",1,2,0,4]],0,"RangeOptimization"],["WorksheetOptimization",0,0,0,0,[["optimize","WorksheetOptimizationResult",0,0,0,2],["scan","RangeOptimizationCollection",0,6,0,4],["scanExtended","WorksheetOptimizationScanResult",0,2,0,4]]],["WorksheetOptimizationResult",0,[["allocatedCells",2],["optimizedCells",2]]],["LinkedWorkbook",0,[["displayUrl",2,3],["fileName",3,3],["id",2],["longErrorDescription",2,3],["refreshEnabled",2,3],["refreshing",2,3],["statusMessage",2,3],["excelIconState",2,3],["hardToFindErrorMessages",2,3],["lastUpdated",10,3]],0,[["_RegisterRefreshCompletedEvent",0,0,3,2,0,1],["_UnregisterRefreshCompletedEvent",0,0,3,2,0,1],["breakLinks"],["changeSource",1,0,3],["findNextLink",0,2,3,4],["openWorkbook",0,2,3,4],["refresh"],["openChangeSourceDialog",0,0,3],["closeChangeSourceDialog",0,0,3]],0,0,0,[["RefreshCompleted",0,3,"MessageType.linkedWorkbookRefreshCompletedEvent","this.id","_RegisterRefreshCompletedEvent","_UnregisterRefreshCompletedEvent"]]],["LinkedWorkbookCollection",1,[["breakAllLinksEnabled",0,3],["refreshAllEnabled",0,3],["workbookLinksRefreshMode"],["workbookLinksRefreshSettings",0,3],["containsNonWorkbookLinks",0,3]],0,[["_RegisterWorkbookLinksChangedEvent",0,2,3,4],["_UnregisterWorkbookLinksChangedEvent",0,2,3,4],["breakAllLinks"],["getCount",0,2,3,4],["refreshAll"],["openEditLinksDialog",0,2,3,4]],[["getItem","LinkedWorkbook",1,18,0,4],["getItemAt","LinkedWorkbook",1,2,3,4],["getItemOrNullObject","LinkedWorkbook",1]],0,"LinkedWorkbook",[["WorkbookLinksChanged",0,3,"MessageType.linkedWorkbookWorkbookLinksChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWorkbookLinksChangedEvent","_UnregisterWorkbookLinksChangedEvent"]]],["DocumentTaskChange",0,[["type",2],["changedBy",2],["commentId",2],["createdDateTime",10],["id",2],["assignee",2],["undoChangeId",2],["priority",2],["title",2],["percentComplete",2],["startDateTime",10],["dueDateTime",10]],0,0,0,0,0,0,"Microsoft.ExcelServices.DocumentTaskChange",4],["DocumentTaskChangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","DocumentTaskChange",1,2,0,4]],0,"DocumentTaskChange"],["RangePicker",0,0,0,[["activate",1,0,0,2,0,4],["deactivate",0,0,0,2,0,4],["updateSelection",1,0,0,2,0,4],["updateSelectionWithNavigation",4,0,0,2,0,4],["_RegisterEventSelectionChanged",0,0,0,2,0,4],["_UnregisterEventSelectionChanged",0,0,0,2,0,4],["_RegisterEventDeactivated",0,2,0,4],["_UnregisterEventDeactivated",0,2,0,4]],0,0,0,[["Deactivated",0,0,"MessageType.rangePickerDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventDeactivated","_UnregisterEventDeactivated"],["SelectionChanged",0,0,"MessageType.rangePickerSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventSelectionChanged","_UnregisterEventSelectionChanged"]]],["DocumentTask",0,[["startAndDueDateTime"],["id",2],["percentComplete"],["priority"],["title"],["assignees",2],["completedBy",2],["completedDateTime",10],["createdBy",2],["createdDateTime",10]],[["changes","DocumentTaskChangeCollection",18,0,0,4],["comment","Comment",2,0,0,4]],[["assign",1],["unassign",1],["unassignAll"]]],["DocumentTaskCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","DocumentTask",1,18,0,4],["getItemOrNullObject","DocumentTask",1,2,0,4],["getItemAt","DocumentTask",1,2,0,4]],0,"DocumentTask"],["DataConnection",0,[["connectionString",2],["name",2],["commandText",2],["dataSourceType",2]]],["Runtime",0,[["enableEvents",1,5]]],["Application",0,[["calculationMode",1],["calculationEngineVersion",3,6],["calculationState",3,6],["decimalSeparator",3,7],["thousandsSeparator",3,7],["useSystemSeparators",3,7],["formatStaleValues",1,8]],[["iterativeCalculation","IterativeCalculation",35,6,0,4],["ribbon","Ribbon",35,6,0,4],["cultureInfo","CultureInfo",3,7,0,4],["undoScope","UndoScope",3,3,0,4]],[["calculate",1],["suspendApiCalculationUntilNextSync",0,1,9,2,0,10],["suspendScreenUpdatingUntilNextSync",0,0,6,2,0,10],["hasLicense",1,2,8,4],["redo",0,0,3,2],["explorePremiumLicense",1,2,8,4],["undo",0,0,3,2],["_RegisterEventUndoChanged",0,2,3,4],["_UnregisterEventUndoChanged",0,2,3,4]],[["createWorkbook","WorkbookCreated",1,10,5,0,0,"_GetWorkbookCreatedById"],["_GetWorkbookCreatedById","WorkbookCreated",1,2,5,4]],0,0,[["UndoChanged",0,3,"MessageType.applicationUndoChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUndoChanged","_UnregisterEventUndoChanged"]]],["IterativeCalculation",0,[["enabled",1],["maxIteration",1],["maxChange",1]]],["Workbook",0,[["name",3,11],["readOnly",3,5],["isDirty",1,6],["use1904DateSystem",1,8],["chartDataPointTrack",1,6],["usePrecisionAsDisplayed",1,6],["calculationEngineVersion",3,6],["autoSave",3,6],["previouslySaved",3,6],["showPivotFieldList",0,8,0,2,12],["formulaReferenceStyle",2,3]],[["worksheets","WorksheetCollection",19,0,0,4],["names","NamedItemCollection",19,0,0,4],["tables","TableCollection",19,0,0,4],["application","Application",2,0,0,4],["bindings","BindingCollection",19,0,0,4],["functions","Functions",2,13,0,4],["_V1Api","_V1Api",2,14,0,4],["pivotTables","PivotTableCollection",19,14,0,4],["settings","SettingCollection",19,15,0,4],["customXmlParts","CustomXmlPartCollection",19,16,0,4],["internalTest","InternalTest",2,9,0,4],["properties","DocumentProperties",35,11,0,4],["styles","StyleCollection",19,11,0,4],["protection","WorkbookProtection",3,11,0,4],["dataConnections","DataConnectionCollection",3,11,0,4],["_Runtime","Runtime",2,16,0,4],["comments","CommentCollection",19,17,0,4],["slicers","SlicerCollection",19,17,0,4],["tableStyles","TableStyleCollection",19,17,0,4],["pivotTableStyles","PivotTableStyleCollection",19,17,0,4],["slicerStyles","SlicerStyleCollection",19,17,0,4],["timelineStyles","TimelineStyleCollection",19,17,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["linkedDataTypes","LinkedDataTypeCollection",18,8,0,4],["queries","QueryCollection",18,18,0,4],["linkedWorkbooks","LinkedWorkbookCollection",18,19,0,4],["rangePicker","RangePicker",2,8,0,4,0,4],["lineageActivities","LineageActivityCollection",18,3,0,4],["businessBar","BusinessBar",2,8,0,4],["guidedReapply","GuidedReapplyManager",2,3,0,4],["vbaRecorder","VbaRecorder",2,8,0,4],["externalCodeService","ExternalCodeService",2,8,0,4],["augmentationLoop","AugmentationLoop",2,8,0,4]],[["_RemoveReference",1,2],["_GetObjectByReferenceId",1,2,0,4],["_GetObjectTypeNameByReferenceId",1,2,0,4],["_RemoveAllReferences",0,2],["_GetReferenceCount",0,2,0,4],["getIsActiveCollabSession",0,0,6],["registerCustomFunctions",7,0,20,8],["_SetOsfControlContainerReadyForCustomFunctions",0,0,20],["close",1,0,7],["save",1,0,7],["_RegisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_UnregisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_RegisterWACOperationEvent",0,2,21,4],["_UnregisterWACOperationEvent",0,2,21,4],["_RegisterRecordingStateChangedEvent",0,0,21,2,0,22],["_UnregisterRecordingStateChangedEvent",0,0,21,2,0,22],["_RegisterActivatedEvent",0,2,23],["_UnregisterActivatedEvent",0,2,23],["insertWorksheetsFromBase64",2,0,23],["enableOfficeScriptRecording",1,1,19],["recordAction",1,3,0,4],["focus",0,2,3,4],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["showHelp",1,2,3,4],["getLinkedEntityCellValue",1,2,24,4],["getThemeColors",0,2,8,4],["_RegisterEventFormulaReferenceStyleChanged",0,2,3,4],["_UnregisterEventFormulaReferenceStyleChanged",0,2,3,4],["notifySDXLoaded",1,2,3,4],["openConditionalFormattingRulesManager",1,0,3],["openNameManager",0,0,3],["_RegisterEventActionRecorded",0,2,2,4],["_UnregisterEventActionRecorded",0,2,2,4]],[["getSelectedRange","Range",0,10,0,4],["getActiveCell","Range",0,10,11,4],["_GetRangeForEventByReferenceId","Range",1,2,0,4],["_GetRangeOrNullObjectForEventByReferenceId","Range",1,2,0,4],["getActiveChart","Chart",0,2,6,4],["getActiveChartOrNullObject","Chart",0,2,6,4],["getSelectedRanges","RangeAreas",0,10,6,4],["_GetRangesForEventByReferenceId","RangeAreas",1,2,6,4],["_GetRangesOrNullObjectForEventByReferenceId","RangeAreas",1,2,6,4],["getActiveSlicer","Slicer",0,2,17,4],["getActiveSlicerOrNullObject","Slicer",0,2,17,4]],0,0,[["ActionRecorded",0,2,"MessageType.workbookActionRecordedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventActionRecorded","_UnregisterEventActionRecorded"],["Activated",0,23,"MessageType.workbookActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["AutoSaveSettingChanged",0,6,"MessageType.workbookAutoSaveSettingChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAutoSaveSettingChangedEvent","_UnregisterAutoSaveSettingChangedEvent"],["FormulaReferenceStyleChanged",0,3,"MessageType.workbookFormulaReferenceStyleChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFormulaReferenceStyleChanged","_UnregisterEventFormulaReferenceStyleChanged"],["NavigationObjectChanged",0,3,"MessageType.workbookNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["RecordingStateChangedEvent",0,21,"MessageType.recordingStateChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRecordingStateChangedEvent","_UnregisterRecordingStateChangedEvent"],["SelectionChanged",3,14,"_CC.office10EventIdDocumentSelectionChangedEvent","","",""],["WACOperationEvent",2,21,"MessageType.wacoperationEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWACOperationEvent","_UnregisterWACOperationEvent"],["_Message",3,11,"_CC.office10EventIdRichApiMessageEvent","","",""]]],["WorkbookProtection",0,[["protected",3]],0,[["protect",1],["unprotect",1]]],["WorkbookCreated",0,[["id",3]],0,[["open",0,2,0,4]]],["Worksheet",0,[["name",1],["id",3],["position",1],["visibility",1],["tabColor",1,11,0,2,25],["standardWidth",1,11],["standardHeight",3,11],["showGridlines",5,5,0,2,26],["showHeadings",5,5],["enableCalculation",1,6],["tabId",3,18]],[["charts","ChartCollection",83,0,0,4],["tables","TableCollection",83,0,0,4],["protection","WorksheetProtection",3,13,0,4],["pivotTables","PivotTableCollection",83,14,0,4],["names","NamedItemCollection",83,15,0,4],["freezePanes","WorksheetFreezePanes",3,11,0,4],["pageLayout","PageLayout",35,6,0,4],["visuals","VisualCollection",83,17,0,4],["shapes","ShapeCollection",83,6,0,4],["horizontalPageBreaks","PageBreakCollection",19,6,0,4],["verticalPageBreaks","PageBreakCollection",19,6,0,4],["autoFilter","AutoFilter",3,6,0,4],["slicers","SlicerCollection",19,17,0,4],["comments","CommentCollection",83,17,0,4],["customProperties","WorksheetCustomPropertyCollection",19,27,0,4],["namedSheetViews","NamedSheetViewCollection",18,19,0,4],["optimization","WorksheetOptimization",2,8,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["visualTracker","VisualTracker",2,28,0,4],["rangeValuesPreview","RangeValuesPreview",66,8,0,4]],[["delete"],["activate",0,2],["calculate",1,0,9],["_RegisterDataChangedEvent",0,0,11,2,0,10],["_UnregisterDataChangedEvent",0,0,11,2,0,10],["_RegisterActivatedEvent",0,0,11,2,0,1],["_UnregisterActivatedEvent",0,0,11,2,0,1],["_RegisterDeactivatedEvent",0,0,11,2,0,1],["_UnregisterDeactivatedEvent",0,0,11,2,0,1],["_RegisterSelectionChangedEvent",0,0,11,2,0,29],["_UnregisterSelectionChangedEvent",0,0,11,2,0,29],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["replaceAll",3,0,6],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,0,17,2,0,1],["_UnregisterRowSortedEvent",0,0,17,2,0,1],["_RegisterColumnSortedEvent",0,0,17,2,0,1],["_UnregisterColumnSortedEvent",0,0,17,2,0,1],["_RegisterSingleClickedEvent",0,0,17,2,0,1],["_UnregisterSingleClickedEvent",0,0,17,2,0,1],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["showOutlineLevels",2,0,17],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,0,30,2,0,1],["_RegisterEventVisibilityChanged",0,0,30,2,0,1],["_UnregisterEventNameChanged",0,0,30,2,0,1],["_UnregisterEventVisibilityChanged",0,0,30,2,0,1],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getRange","Range",1,10,0,4],["getUsedRange","Range",1,10,0,4],["getCell","Range",2,10,0,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getRangeByIndexes","Range",4,10,11,4],["getPrevious","Worksheet",1,10,16,4,0,"_GetSheetById"],["getPreviousOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNext","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNextOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["_GetSheetById","Worksheet",1,2,11,4],["copy","Worksheet",2,0,11,0,0,"_GetAnotherWorksheetById"],["_GetAnotherWorksheetById","Worksheet",1,0,11],["findAll","RangeAreas",2,10,6,4],["findAllOrNullObject","RangeAreas",2,10,6,4],["getRanges","RangeAreas",1,10,6,4],["getUsedRangeAreas","RangeAreas",1,0,3],["getRangeR1C1","Range",1,2,3,4],["getRangesR1C1","RangeAreas",1,2,3,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,0,3]],"workbook.worksheets",0,[["Activated",0,11,"MessageType.worksheetActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","this.id","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,11,"MessageType.worksheetDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","this.id","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","this.id","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","this.id","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","this.id","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["NavigationObjectChanged",0,3,"MessageType.worksheetNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","this.id","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","this.id","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","this.id","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","this.id","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,11,"MessageType.worksheetSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","this.id","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","this.id","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetCollection",1,0,0,[["getCount",1,2,15,4],["_RegisterAddedEvent",0,3,11],["_UnregisterAddedEvent",0,3,11],["_RegisterActivatedEvent",0,3,11],["_UnregisterActivatedEvent",0,0,11,2,0,29],["_RegisterDeactivatedEvent",0,0,11,2,0,29],["_UnregisterDeactivatedEvent",0,0,11,2,0,29],["_RegisterDeletedEvent",0,3,11],["_UnregisterDeletedEvent",0,3,11],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["_RegisterDataChangedEvent",0,3,6],["_UnregisterDataChangedEvent",0,3,6],["_RegisterSelectionChangedEvent",0,0,6,2,0,29],["_UnregisterSelectionChangedEvent",0,0,6,2,0,29],["addFromBase64",4,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,3,17],["_UnregisterRowSortedEvent",0,3,17],["_RegisterColumnSortedEvent",0,3,17],["_UnregisterColumnSortedEvent",0,3,17],["_RegisterSingleClickedEvent",0,0,17,2,0,29],["_UnregisterSingleClickedEvent",0,0,17,2,0,29],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,2,30,4],["_RegisterEventVisibilityChanged",0,2,30,4],["_UnregisterEventNameChanged",0,2,30,4],["_UnregisterEventVisibilityChanged",0,2,30,4],["_RegisterEventMoved",0,0,30,2,0,1],["_UnregisterEventMoved",0,0,30,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getItem","Worksheet",1,18,0,4],["add","Worksheet",1,8,0,2,0,0,29],["getActiveWorksheet","Worksheet",0,2,0,4],["getItemOrNullObject","Worksheet",1,2,15,4],["getFirst","Worksheet",1,10,16,4],["getLast","Worksheet",1,10,16,4]],0,"Worksheet",[["Activated",0,11,"MessageType.worksheetActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,11,"MessageType.worksheetAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,6,"MessageType.worksheetDataChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,11,"MessageType.worksheetDeletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["Moved",0,30,"MessageType.worksheetMovedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventMoved","_UnregisterEventMoved"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,6,"MessageType.worksheetSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetProtection",0,[["protected",3],["options",3],["canPauseProtection",3,19],["isPasswordProtected",3,19],["isPaused",3,19],["savedOptions",3,19]],[["allowEditRanges","AllowEditRangeCollection",19,19,0,4]],[["protect",2,1],["unprotect",1],["checkPassword",1,2,19,4],["pauseProtection",1,0,19],["resumeProtection",0,0,19],["setPassword",1,0,19],["updateOptions",1,0,19]]],["WorksheetFreezePanes",0,0,0,[["unfreeze"],["freezeAt",1],["freezeRows",1],["freezeColumns",1]],[["getLocation","Range",0,10,0,4],["getLocationOrNullObject","Range",0,10,0,4]]],["Range",14,[["numberFormat",5,0,0,2,31],["numberFormatLocal",1,11,0,2,31],["values",5,0,0,2,31],["text",3],["formulas",5,0,0,2,32],["formulasLocal",5,0,0,2,32],["rowIndex",3],["columnIndex",3],["rowCount",3],["columnCount",3],["address",3],["addressLocal",3],["cellCount",3],["_ReferenceId",2],["valueTypes",3],["formulasR1C1",5,13],["hidden",3,13],["rowHidden",1,13,0,2,32],["columnHidden",1,13,0,2,32],["isEntireColumn",3,11],["isEntireRow",3,11],["hyperlink",1,11,0,2,33],["style",1,11,0,2,32],["linkedDataTypeState",3,6],["hasSpill",3,27],["top",3,17],["left",3,17],["height",3,17],["width",3,17],["savedAsArray",3,27],["numberFormatCategories",3,27],["valuesAsJson",5,24],["valuesAsJsonLocal",5,24],["addressR1C1",2,3]],[["format","RangeFormat",35,0,0,4],["worksheet","Worksheet",2,0,0,4],["sort","RangeSort",3,13,0,4],["conditionalFormats","ConditionalFormatCollection",19,9,0,4],["dataValidation","DataValidation",35,5,0,4]],[["clear",1,0,0,2,0,32],["delete",1,0,0,2,0,34],["select",0,2],["_KeepReference",0,2],["merge",1,0,13,2,0,32],["unmerge",0,0,13],["_ValidateArraySize",2,2,14,4],["calculate",0,0,9],["showCard",0,0,11],["getImage",0,2,11,4],["replaceAll",3,0,6,2,0,32],["copyFrom",4,0,6,2,0,26],["convertToLinkedDataType",2,0,6],["convertDataTypeToText",0,0,6],["setDirty",0,0,6],["getCellProperties",1,0,6],["getRowProperties",1,0,6],["getColumnProperties",1,0,6],["setCellProperties",1,0,6],["setRowProperties",1,0,6],["setColumnProperties",1,0,6],["autoFill",2,0,6],["showTeachingCallout",2,0,6],["flashFill",0,0,6],["group",1,0,17],["ungroup",1,0,17],["showGroupDetails",1,0,17],["hideGroupDetails",1,0,17],["moveTo",1,0,7,2,0,26],["getDataClassificationIds",0,2,19,4]],[["getCell","Range",2,10,0,4],["getUsedRange","Range",1,10,0,4],["insert","Range",1,8,0,2,0,0,34],["getEntireColumn","Range",0,10,0,4],["getEntireRow","Range",0,10,0,4],["getOffsetRange","Range",2,10,0,4],["getRow","Range",1,10,0,4],["getColumn","Range",1,10,0,4],["getIntersection","Range",1,10,0,4],["getBoundingRect","Range",1,10,0,4],["getLastCell","Range",0,10,0,4],["getLastColumn","Range",0,10,0,4],["getLastRow","Range",0,10,0,4],["getIntersectionOrNullObject","Range",1,10,15,4],["getRowsAbove","Range",1,11,14,4],["getRowsBelow","Range",1,11,14,4],["getColumnsBefore","Range",1,11,14,4],["getColumnsAfter","Range",1,11,14,4],["getResizedRange","Range",2,11,14,4],["getVisibleView","RangeView",0,2,14,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getSurroundingRegion","Range",0,10,11,4],["getAbsoluteResizedRange","Range",2,10,11,4],["getTables","TableScopedCollection",1,6,6,4],["find","Range",2,10,6,4],["findOrNullObject","Range",2,10,6,4],["removeDuplicates","RemoveDuplicatesResult",2,8,6,2,0,0,33],["getSpecialCells","RangeAreas",2,10,6,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,6,4],["getSpillingToRange","Range",0,10,27,4],["getSpillParent","Range",0,10,27,4],["getSpillingToRangeOrNullObject","Range",0,10,27,4],["getSpillParentOrNullObject","Range",0,10,27,4],["getMergedAreas","RangeAreas",0,10,19,4],["getPivotTables","PivotTableScopedCollection",1,6,27,4],["getPrecedents","WorkbookRangeAreas",0,10,18,4],["getDirectPrecedents","WorkbookRangeAreas",0,10,27,4],["getDependents","WorkbookRangeAreas",0,10,35,4],["getDirectDependents","WorkbookRangeAreas",0,10,23,4],["getExtendedRange","Range",2,10,23,4],["getRangeEdge","Range",2,10,23,4],["getNumberFormatProperties","NumberFormatPropertyCollection",0,6,8,4],["getSurroundingDataRegion","Range",0,2,8,4],["getMergedAreasOrNullObject","RangeAreas",0,0,23,2,0,0,31]]],["RangeAreas",2,[["_ReferenceId",2],["address",3],["addressLocal",3],["areaCount",3],["cellCount",3],["isEntireColumn",3],["isEntireRow",3],["style",1],["addressR1C1",2,3]],[["areas","RangeCollection",19,0,0,4],["conditionalFormats","ConditionalFormatCollection",19,0,0,4],["format","RangeFormat",35,0,0,4],["dataValidation","DataValidation",35,0,0,4],["worksheet","Worksheet",2,0,0,4]],[["_KeepReference",0,2],["calculate"],["clear",1],["setDirty"],["copyFrom",4],["convertToLinkedDataType",2],["convertDataTypeToText"],["select",0,2,8]],[["getEntireColumn","RangeAreas",0,10,0,4],["getEntireRow","RangeAreas",0,10,0,4],["getIntersection","RangeAreas",1,10,0,4],["getIntersectionOrNullObject","RangeAreas",1,10,0,4],["getOffsetRangeAreas","RangeAreas",2,10,0,4],["getUsedRangeAreas","RangeAreas",1,10,0,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,10,0,4],["getTables","TableScopedCollection",1,6,0,4],["getSpecialCells","RangeAreas",2,10,0,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,0,4]]],["WorkbookRangeAreas",2,[["_ReferenceId",2],["addresses",3]],[["ranges","RangeCollection",19,0,0,4],["areas","RangeAreasCollection",19,0,0,4]],[["_KeepReference",0,2]],[["getRangeAreasBySheet","RangeAreas",1,10,0,4],["getRangeAreasOrNullObjectBySheet","RangeAreas",1,10,0,4]]],["RangeView",0,[["numberFormat",1],["values",1],["text",3],["formulas",1],["formulasLocal",1],["formulasR1C1",1],["valueTypes",3],["rowCount",3],["columnCount",3],["cellAddresses",3],["index",3],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["rows","RangeViewCollection",19,0,0,4]],0,[["getRange","Range",0,10,0,4]]],["RangeViewCollection",1,0,0,[["getCount",0,2,15,4]],[["getItemAt","RangeView",1,2,0,4]],0,"RangeView"],["SettingCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Setting",1,18,0,4],["add","Setting",2,9],["getItemOrNullObject","Setting",1,2,0,4]],0,"Setting",[["SettingsChanged",3,0,"_CC.office10EventIdSettingsChangedEvent","","",""]]],["Setting",8,[["key",3],["value",5],["_Id",2]],0,[["delete"]]],["NamedItemCollection",5,0,0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","NamedItem",1,18,0,4],["getItemOrNullObject","NamedItem",1,2,15,4],["add","NamedItem",3,8,15],["addFormulaLocal","NamedItem",3,0,15]],0,"NamedItem",[["Added",0,3,"MessageType.namedItemAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.namedItemDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["NamedItem",0,[["name",3],["type",3],["value",3],["visible",1],["_Id",2],["comment",1,15],["scope",3,15],["formula",1,11],["valueAsJson",3,24],["valueAsJsonLocal",3,24]],[["worksheet","Worksheet",2,15,0,4],["worksheetOrNullObject","Worksheet",2,15,0,4],["arrayValues","NamedItemArrayValues",3,11,0,4]],[["delete",0,0,15]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,15,4]]],["NamedItemArrayValues",0,[["values",3],["types",3],["valuesAsJson",3,24],["valuesAsJsonLocal",3,24]]],["Binding",0,[["id",3],["type",3]],0,[["getText",0,2,0,4],["delete",0,0,14]],[["getTable","Table",0,2,0,4],["getRange","Range",0,2,0,4]],0,0,[["DataChanged",3,14,"_CC.office10EventIdBindingDataChangedEvent","this.id","",""],["SelectionChanged",3,14,"_CC.office10EventIdBindingSelectionChangedEvent","this.id","",""]]],["BindingCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","Binding",1,18,0,4],["getItemAt","Binding",1,2,0,4],["add","Binding",3,8,14],["addFromNamedItem","Binding",3,0,14],["addFromSelection","Binding",2,0,14],["getItemOrNullObject","Binding",1,2,15,4]],0,"Binding"],["TableCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["_RegisterAddedEvent",0,0,6,2,0,1],["_UnregisterAddedEvent",0,0,6,2,0,1],["_RegisterDeletedEvent",0,0,6,2,0,1],["_UnregisterDeletedEvent",0,0,6,2,0,1],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1]],[["getItem","Table",1,18,0,4],["getItemAt","Table",1,2,0,4],["add","Table",2,8,0,2,0,0,33],["getItemOrNullObject","Table",1,2,15,4],["addQueryTable","Table",2,0,8]],0,"Table",[["Added",0,6,"MessageType.tableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",2,11,"MessageType.tableDataChangedEvent","this._eventTargetId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Deleted",0,6,"MessageType.tableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this._eventTargetId","_RegisterFilteredEvent","_UnregisterFilteredEvent"]]],["TableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getFirst","Table",0,10,0,4],["getItem","Table",1,18,0,4],["getItemOrNullObject","Table",1,2,18,4]],0,"Table"],["Table",24,[["id",3],["name",1,0,0,2,26],["showHeaders",1,0,0,2,33],["showTotals",1,0,0,2,33],["style",1,0,0,2,33],["highlightFirstColumn",1,14,0,2,33],["highlightLastColumn",1,14,0,2,33],["showBandedRows",1,14,0,2,33],["showBandedColumns",1,14,0,2,33],["showFilterButton",1,14,0,2,33],["legacyId",3,5]],[["columns","TableColumnCollection",19,0,0,4],["rows","TableRowCollection",19,0,0,4],["sort","TableSort",3,13,0,4],["worksheet","Worksheet",2,13,0,4],["autoFilter","AutoFilter",3,6,0,4],["tableStyle","TableStyle",35,8,0,4]],[["delete",0,0,0,2,0,26],["clearFilters",0,0,13],["reapplyFilters",0,0,13,2,0,26],["_RegisterSelectionChangedEvent",0,0,11,2,0,1],["_UnregisterSelectionChangedEvent",0,0,11,2,0,1],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["clearStyle",0,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["resize",1,0,23,2,0,26],["setStyle",1,0,8]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4],["convertToRange","Range",0,8,13,2,0,0,26]],"workbook.tables",0,[["Changed",2,11,"MessageType.tableDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["SelectionChanged",2,11,"MessageType.tableSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["TableColumnCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","TableColumn",1,18,0,4],["getItemAt","TableColumn",1,2,0,4],["add","TableColumn",3,8,0,2,0,0,34],["getItemOrNullObject","TableColumn",1,2,15,4],["addAsJson","TableColumn",3,0,24]],0,"TableColumn"],["TableColumn",0,[["id",3],["index",3],["values",1],["name",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["filter","Filter",3,13,0,4]],[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4]]],["TableRowCollection",1,[["count",3]],0,[["getCount",0,2,15,4],["deleteRows",1,0,19],["deleteRowsAt",2,0,19,2,0,26]],[["getItemAt","TableRow",1,2,0,4],["add","TableRow",3,8,0,2,0,0,34],["addAsJson","TableRow",3,0,24]],0,"TableRow"],["TableRow",0,[["index",3],["values",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],0,[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4]]],["DataValidation",0,[["type",3],["rule",1],["prompt",1],["errorAlert",1],["ignoreBlanks",1],["valid",3]],0,[["clear"]],[["getInvalidCells","RangeAreas",0,10,6,4],["getInvalidCellsOrNullObject","RangeAreas",0,10,6,4]]],["RemoveDuplicatesResult",0,[["removed",3],["uniqueRemaining",3]]],["RangeFormat",0,[["wrapText",1,0,0,2,32],["horizontalAlignment",1,0,0,2,32],["verticalAlignment",1,0,0,2,32],["columnWidth",1,13,0,2,32],["rowHeight",1,13,0,2,32],["textOrientation",1,11,0,2,32],["useStandardHeight",1,11],["useStandardWidth",1,11],["readingOrder",1,6],["shrinkToFit",1,6],["indentLevel",1,6,0,2,32],["autoIndent",1,6]],[["fill","RangeFill",35,0,0,4],["font","RangeFont",35,0,0,4],["borders","RangeBorderCollection",51,0,0,4],["protection","FormatProtection",35,13,0,4]],[["autofitColumns",0,0,13,2,0,32],["autofitRows",0,0,13,2,0,32],["adjustIndent",1,0,7,2,0,34]]],["FormatProtection",0,[["locked",1],["formulaHidden",1]]],["RangeFill",0,[["color",1,0,0,2,32],["tintAndShade",1,6],["patternTintAndShade",1,6],["pattern",1,6],["patternColor",1,6]],0,[["clear",0,0,0,2,0,32]]],["RangeBorder",0,[["sideIndex",3],["style",1,0,0,2,32],["weight",1,0,0,2,32],["color",1,0,0,2,32],["tintAndShade",1,6]]],["RangeBorderCollection",1,[["count",3],["tintAndShade",1,6]],0,0,[["getItem","RangeBorder",1,18,0,4],["getItemAt","RangeBorder",1,2,0,4]],0,"RangeBorder"],["RangeFont",0,[["name",1,0,0,2,32],["size",1,0,0,2,32],["color",1,0,0,2,12],["italic",1,0,0,2,32],["bold",1,0,0,2,32],["underline",1,0,0,2,32],["strikethrough",1,6,0,2,32],["subscript",1,6],["superscript",1,6],["tintAndShade",1,6]]],["ChartCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,5,2,0,1],["_UnregisterAddedEvent",0,0,5,2,0,1],["_RegisterActivatedEvent",0,0,5,2,0,29],["_UnregisterActivatedEvent",0,0,5,2,0,29],["_RegisterDeactivatedEvent",0,0,5,2,0,29],["_UnregisterDeactivatedEvent",0,0,5,2,0,29],["_RegisterDeletedEvent",0,0,5,2,0,29],["_UnregisterDeletedEvent",0,0,5,2,0,29]],[["add","Chart",3,9,0,2,0,0,36],["getItemAt","Chart",1,2,0,4],["_GetItem","Chart",1,18,0,4],["getItem","Chart",1,2,0,4],["getItemOrNullObject","Chart",1,2,15,4]],0,"Chart",[["Activated",0,5,"MessageType.chartActivatedEvent","this._ParentObject.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,5,"MessageType.chartAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this._ParentObject.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,5,"MessageType.chartDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Chart",0,[["name",1,0,0,2,37],["top",1,0,0,2,36],["left",1,0,0,2,36],["width",1,0,0,2,36],["height",1,0,0,2,36],["id",3,11],["showAllFieldButtons",1,11,0,2,36],["chartType",1,11,0,2,37],["showDataLabelsOverMaximum",1,5,0,2,37],["categoryLabelLevel",1,5,0,2,37],["style",1,5,0,2,37],["displayBlanksAs",1,5,0,2,37],["plotBy",1,5,0,2,37],["plotVisibleOnly",1,5,0,2,37],["seriesNameLevel",1,5,0,2,37]],[["title","ChartTitle",35,0,0,4],["dataLabels","ChartDataLabels",35,0,0,4],["legend","ChartLegend",35,0,0,4],["series","ChartSeriesCollection",19,0,0,4],["axes","ChartAxes",35,0,0,4],["format","ChartAreaFormat",35,0,0,4],["worksheet","Worksheet",2,13,0,4],["plotArea","ChartPlotArea",35,5,0,4],["pivotOptions","ChartPivotOptions",35,6,0,4]],[["setData",2,1,0,2,0,36],["delete",0,0,0,2,0,36],["setPosition",2,0,0,2,0,36],["getImage",3,2,13,4],["_RegisterActivatedEvent",0,0,5,2,0,1],["_UnregisterActivatedEvent",0,0,5,2,0,1],["_RegisterDeactivatedEvent",0,0,5,2,0,1],["_UnregisterDeactivatedEvent",0,0,5,2,0,1],["activate",0,2,6],["getDataRange",0,0,28],["getDataRangeOrNullObject",0,0,28]],[["getDataTable","ChartDataTable",0,2,18,4],["getDataTableOrNullObject","ChartDataTable",0,2,18,4]],0,0,[["Activated",0,5,"MessageType.chartActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["ChartPivotOptions",0,[["showAxisFieldButtons",1,0,0,2,37],["showLegendFieldButtons",1,0,0,2,37],["showReportFilterFieldButtons",1,0,0,2,37],["showValueFieldButtons",1,0,0,2,37]]],["ChartAreaFormat",0,[["roundedCorners",1,6,0,2,37],["colorScheme",1,6,0,2,37]],[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartSeriesCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartSeries",1,2,0,4],["add","ChartSeries",2,8,11,2,0,0,36]],0,"ChartSeries"],["ChartSeries",0,[["name",1,0,0,2,36],["chartType",1,11,0,2,10],["hasDataLabels",1,11,0,2,37],["filtered",1,11,0,2,37],["markerSize",1,11,0,2,36],["markerStyle",1,11,0,2,36],["showShadow",1,11,0,2,37],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36],["smooth",1,11,0,2,37],["plotOrder",1,11,0,2,37],["gapWidth",1,11,0,2,36],["doughnutHoleSize",1,11,0,2,36],["axisGroup",1,5,0,2,36],["explosion",1,5,0,2,37],["firstSliceAngle",1,5,0,2,37],["invertIfNegative",1,5,0,2,37],["bubbleScale",1,6,0,2,37],["secondPlotSize",1,5,0,2,37],["splitType",1,5,0,2,37],["splitValue",1,6,0,2,37],["varyByCategories",1,5,0,2,37],["showLeaderLines",1,6,0,2,37],["overlap",1,5,0,2,36],["gradientStyle",1,6,0,2,37],["gradientMinimumType",1,6,0,2,37],["gradientMidpointType",1,6,0,2,37],["gradientMaximumType",1,6,0,2,37],["gradientMinimumValue",1,6,0,2,37],["gradientMidpointValue",1,6,0,2,37],["gradientMaximumValue",1,6,0,2,37],["gradientMinimumColor",1,6,0,2,37],["gradientMidpointColor",1,6,0,2,37],["gradientMaximumColor",1,6,0,2,37],["parentLabelStrategy",1,6,0,2,37],["showConnectorLines",1,6,0,2,37],["invertColor",1,6,0,2,37]],[["points","ChartPointsCollection",19,0,0,4],["format","ChartSeriesFormat",35,0,0,4],["trendlines","ChartTrendlineCollection",19,11,0,4],["xErrorBars","ChartErrorBars",35,6,0,4],["yErrorBars","ChartErrorBars",35,6,0,4],["dataLabels","ChartDataLabels",35,5,0,4],["binOptions","ChartBinOptions",35,6,0,4],["mapOptions","ChartMapOptions",35,6,0,4],["boxwhiskerOptions","ChartBoxwhiskerOptions",35,6,0,4]],[["delete",0,0,11,2,0,36],["setXAxisValues",1,0,11,2,0,36],["setValues",1,0,11,2,0,36],["setBubbleSizes",1,0,11,2,0,37],["getDimensionValues",1,0,27,2,0,37],["getDimensionDataSourceString",1,0,35],["getDimensionDataSourceType",1,0,35]]],["ChartSeriesFormat",0,0,[["fill","ChartFill",3,0,0,4],["line","ChartLineFormat",35,0,0,4]]],["ChartPointsCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartPoint",1,2,0,4]],0,"ChartPoint"],["ChartPoint",0,[["value",3],["hasDataLabel",1,11,0,2,37],["markerStyle",1,11,0,2,36],["markerSize",1,11,0,2,36],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36]],[["format","ChartPointFormat",35,0,0,4],["dataLabel","ChartDataLabel",35,11,0,4]]],["ChartPointFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartAxes",0,0,[["categoryAxis","ChartAxis",35,0,0,4],["seriesAxis","ChartAxis",35,0,0,4],["valueAxis","ChartAxis",35,0,0,4]],0,[["getItem","ChartAxis",2,2,11,4]]],["ChartAxis",0,[["majorUnit",1,0,0,2,37],["maximum",1,0,0,2,36],["minimum",1,0,0,2,36],["minorUnit",1,0,0,2,37],["displayUnit",1,11,0,2,36],["showDisplayUnitLabel",1,11,0,2,37],["customDisplayUnit",3,11],["type",3,11],["minorTimeUnitScale",1,11,0,2,37],["majorTimeUnitScale",1,11,0,2,37],["baseTimeUnit",1,11,0,2,37],["categoryType",1,11,0,2,37],["axisGroup",3,11],["scaleType",1,11,0,2,37],["logBase",1,11,0,2,37],["left",3,11],["top",3,11],["height",3,11],["width",3,11],["reversePlotOrder",1,11,0,2,36],["crosses",1,11,0,2,36],["crossesAt",3,11],["visible",1,11,0,2,37],["isBetweenCategories",1,5,0,2,36],["majorTickMark",1,11,0,2,37],["minorTickMark",1,11,0,2,37],["tickMarkSpacing",1,11,0,2,37],["tickLabelPosition",1,11,0,2,36],["tickLabelSpacing",1,11,0,2,37],["alignment",1,5,0,2,37],["multiLevel",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["offset",1,5,0,2,37],["textOrientation",1,5,0,2,37],["position",1,5,0,2,36],["positionAt",3,5]],[["majorGridlines","ChartGridlines",35,0,0,4],["minorGridlines","ChartGridlines",35,0,0,4],["title","ChartAxisTitle",35,0,0,4],["format","ChartAxisFormat",35,0,0,4]],[["setCategoryNames",1,0,11,2,0,37],["setCustomDisplayUnit",1,0,11,2,0,37],["setCrossesAt",1,0,11,2,0,37],["setPositionAt",1,0,5,2,0,37]]],["ChartAxisFormat",0,0,[["font","ChartFont",35,0,0,4],["line","ChartLineFormat",35,0,0,4],["fill","ChartFill",3,5,0,4]]],["ChartAxisTitle",0,[["text",1,0,0,2,36],["visible",1,0,0,2,37],["textOrientation",1,27,0,2,37]],[["format","ChartAxisTitleFormat",35,0,0,4]],[["setFormula",1,0,5,2,0,37]]],["ChartAxisTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,5,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataLabels",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["textOrientation",1,5,0,2,37],["autoText",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["showAsDataCallout",3,8,0,2,37],["geometricShapeType",1,8,0,2,37]],[["format","ChartDataLabelFormat",35,0,0,4]]],["ChartDataLabel",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["top",1,5,0,2,37],["left",1,5,0,2,37],["width",3,5],["height",3,5],["formula",1,5,0,2,37],["textOrientation",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["text",1,5,0,2,37],["autoText",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["geometricShapeType",1,8,0,2,37],["showAsDataCallout",3,8,0,2,37]],[["format","ChartDataLabelFormat",35,5,0,4]],0,[["getSubstring","ChartFormatString",2,2,8,4]]],["ChartDataLabelFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataTable",0,[["visible",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showHorizontalBorder",1,0,0,2,37],["showVerticalBorder",1,0,0,2,37],["showOutlineBorder",1,0,0,2,37]],[["format","ChartDataTableFormat",35,0,0,4]]],["ChartDataTableFormat",0,0,[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,0,0,4]]],["ChartErrorBars",0,[["endStyleCap",1,0,0,2,37],["include",1,0,0,2,37],["type",1,0,0,2,37],["visible",1,0,0,2,37]],[["format","ChartErrorBarsFormat",35,0,0,4]]],["ChartErrorBarsFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartGridlines",0,[["visible",1,0,0,2,36]],[["format","ChartGridlinesFormat",35,0,0,4]]],["ChartGridlinesFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartLegend",0,[["visible",1,0,0,2,36],["position",1,0,0,2,36],["overlay",1,0,0,2,37],["left",1,11,0,2,37],["top",1,11,0,2,37],["width",1,11,0,2,37],["height",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartLegendFormat",35,0,0,4],["legendEntries","ChartLegendEntryCollection",19,11,0,4]]],["ChartLegendEntry",0,[["visible",1,0,0,2,37],["left",3,5],["top",3,5],["width",3,5],["height",3,5],["index",3,5]]],["ChartLegendEntryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","ChartLegendEntry",1,2,0,4]],0,"ChartLegendEntry"],["ChartLegendFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartMapOptions",0,[["level",1,0,0,2,37],["labelStrategy",1,0,0,2,37],["projectionType",1,0,0,2,37]]],["ChartTitle",0,[["visible",1,0,0,2,37],["text",1,0,0,2,36],["overlay",1,0,0,2,37],["horizontalAlignment",1,11,0,2,37],["top",1,11,0,2,37],["left",1,11,0,2,37],["width",3,11],["height",3,11],["verticalAlignment",1,11,0,2,37],["textOrientation",1,11,0,2,37],["position",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartTitleFormat",35,0,0,4]],[["setFormula",1,0,11,2,0,37]],[["getSubstring","ChartFormatString",2,2,11,4]]],["ChartFormatString",0,0,[["font","ChartFont",35,0,0,4]]],["ChartTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartFill",4,0,0,[["setSolidColor",1,0,0,2,0,36],["clear",0,0,0,2,0,37],["getSolidColor",0,0,24,2,0,37]]],["ChartBorder",0,[["color",1,0,0,2,36],["lineStyle",1,0,0,2,36],["weight",1,0,0,2,36]],0,[["clear",0,0,5,2,0,37]]],["ChartBinOptions",0,[["type",1,0,0,2,36],["width",1,0,0,2,36],["count",1,0,0,2,36],["allowOverflow",1,0,0,2,37],["allowUnderflow",1,0,0,2,37],["overflowValue",1,0,0,2,36],["underflowValue",1,0,0,2,36]]],["ChartBoxwhiskerOptions",0,[["showInnerPoints",1,0,0,2,37],["showOutlierPoints",1,0,0,2,37],["showMeanMarker",1,0,0,2,37],["showMeanLine",1,0,0,2,37],["quartileCalculation",1,0,0,2,37]]],["ChartLineFormat",0,[["color",1,0,0,2,36],["lineStyle",1,11,0,2,36],["weight",1,11,0,2,36]],0,[["clear",0,0,0,2,0,37]]],["ChartFont",0,[["bold",1,0,0,2,37],["color",1,0,0,2,36],["italic",1,0,0,2,37],["name",1,0,0,2,37],["size",1,0,0,2,37],["underline",1,0,0,2,37]]],["ChartTrendline",0,[["type",1,0,0,2,37],["polynomialOrder",1,0,0,2,37],["movingAveragePeriod",1,0,0,2,37],["_Id",2],["showEquation",1,5,0,2,37],["showRSquared",1,5,0,2,37],["forwardPeriod",1,5,0,2,37],["backwardPeriod",1,5,0,2,37],["name",1,0,0,2,37],["intercept",1,0,0,2,37]],[["format","ChartTrendlineFormat",35,0,0,4],["label","ChartTrendlineLabel",35,5,0,4]],[["delete",0,0,0,2,0,37]]],["ChartTrendlineCollection",1,0,0,[["getCount",0,2,0,4]],[["add","ChartTrendline",1,8,0,2,0,0,36],["getItem","ChartTrendline",1,18,0,4]],0,"ChartTrendline"],["ChartTrendlineFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartTrendlineLabel",0,[["top",1,0,0,2,37],["left",1,0,0,2,37],["width",3],["height",3],["formula",1,0,0,2,37],["textOrientation",1,0,0,2,37],["horizontalAlignment",1,0,0,2,37],["verticalAlignment",1,0,0,2,37],["text",1,0,0,2,37],["autoText",1,0,0,2,37],["numberFormat",1,0,0,2,37],["linkNumberFormat",1,6,0,2,37]],[["format","ChartTrendlineLabelFormat",35,0,0,4]]],["ChartTrendlineLabelFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,0,0,4],["font","ChartFont",35,0,0,4]]],["ChartPlotArea",0,[["left",1,0,0,2,37],["top",1,0,0,2,37],["width",1,0,0,2,37],["height",1,0,0,2,37],["insideLeft",1,0,0,2,37],["insideTop",1,0,0,2,37],["insideWidth",1,0,0,2,37],["insideHeight",1,0,0,2,37],["position",1,0,0,2,37]],[["format","ChartPlotAreaFormat",35,0,0,4]]],["ChartPlotAreaFormat",0,0,[["border","ChartBorder",35,0,0,4],["fill","ChartFill",3,0,0,4]]],["VisualCollection",5,0,0,[["getDefinitions",0,2,0,4],["getPreview",4,2,0,4],["bootstrapAgaveVisual",0,0,0,2],["getCount",0,2,0,4],["_RegisterSelectionChangedEvent",0,2],["_UnregisterSelectionChangedEvent",0,2]],[["add","Visual",3,8,0,2],["_GetItem","Visual",1,18,0,4],["getSelectedOrNullObject","Visual",0,2,0,4]],0,"Visual",[["AgaveVisualUpdate",2,0,"MessageType.agaveVisualUpdateEvent","","null","null"],["SelectionChanged",0,0,"MessageType.visualSelectionChangedEvent","this._ParentObject.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["Visual",0,[["id",3],["isSupportedInVisualTaskpane",3]],[["properties","VisualPropertyCollection",18,0,0,4]],[["delete",0,0,0,2],["getProperty",1,2,0,4],["setProperty",2,0,0,2],["changeDataSource",2,0,0,2],["getDataSource",0,2,0,4],["setPropertyToDefault",1,0,0,2],["_RegisterChangeEvent",0,2],["_UnregisterChangeEvent",0,2],["serializeProperties",0,2,0,4],["deserializeProperties",1,0,0,2],["addChildProperty",2,0,19,2],["removeChildProperty",2,0,19,2],["getDataFieldAssignments",0,0,3],["getDataConfig",0,2,3,4],["modifyDataConfig",1,0,3,2]],[["getChildProperties","VisualPropertyCollection",2,6,0,4],["getDataControllerClient","DataControllerClient",0,2,0,4],["getElementChildProperties","VisualPropertyCollection",3,6,0,4]],0,0,[["ChangeNotification",2,0,"MessageType.visualChangeEvent","this.id","_RegisterChangeEvent","_UnregisterChangeEvent"]]],["VisualProperty",0,[["type",3],["value",3],["id",3],["localizedName",3],["options",3],["localizedOptions",3],["hasDefault",3],["isDefault",3],["min",3],["max",3],["stepSize",3],["hideMeButShowChildrenUI",3],["expandableUI",3],["nextPropOnSameLine",3],["showResetUI",3],["size",3,19],["minSize",3,19],["maxSize",3,19],["index",3,19],["parentName",3,19]],0,[["getBoolMetaProperty",1,2,0,4]]],["VisualPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","VisualProperty",1,18,0,4],["getItemAt","VisualProperty",1,2,0,4]],0,"VisualProperty"],["DataControllerClient",0,0,0,[["getWells",0,2,0,4],["getAssociatedFields",1,2,0,4],["getAvailableFields",1,2,0,4],["addField",3,0,0,2],["removeField",2,0,0,2],["moveField",3,0,0,2]]],["RangeSort",0,0,0,[["apply",5,0,0,2,0,32]]],["TableSort",0,[["matchCase",3],["method",3],["fields",3]],0,[["apply",3,0,0,2,0,26],["clear"],["reapply"]]],["Filter",0,[["criteria",3]],0,[["apply",1],["clear",0,0,0,2,0,34],["applyBottomItemsFilter",1,0,0,2,0,34],["applyBottomPercentFilter",1,0,0,2,0,34],["applyCellColorFilter",1,0,0,2,0,34],["applyDynamicFilter",1,0,0,2,0,34],["applyFontColorFilter",1,0,0,2,0,34],["applyValuesFilter",1,0,0,2,0,34],["applyTopItemsFilter",1,0,0,2,0,34],["applyTopPercentFilter",1,0,0,2,0,34],["applyIconFilter",1,0,0,2,0,34],["applyCustomFilter",3,0,0,2,0,34]]],["AutoFilter",0,[["enabled",3],["isDataFiltered",3],["criteria",3]],0,[["apply",3,0,0,2,0,33],["reapply",0,0,0,2,0,26],["remove",0,0,0,2,0,26],["clearCriteria",0,0,0,2,0,26],["clearColumnCriteria",1,0,18]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4]]],["CultureInfo",0,[["name",3]],[["numberFormat","NumberFormatInfo",3,0,0,4],["datetimeFormat","DatetimeFormatInfo",3,27,0,4]]],["NumberFormatInfo",0,[["numberDecimalSeparator",3],["numberGroupSeparator",3],["currencySymbol",3,30]]],["DatetimeFormatInfo",0,[["dateSeparator",3],["longDatePattern",3],["shortDatePattern",3],["timeSeparator",3],["longTimePattern",3]]],["CustomXmlPartScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4],["getOnlyItem","CustomXmlPart",0,2,0,4],["getOnlyItemOrNullObject","CustomXmlPart",0,2,0,4]],0,"CustomXmlPart"],["CustomXmlPartCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["add","CustomXmlPart",1,8],["getByNamespace","CustomXmlPartScopedCollection",1,6,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4]],0,"CustomXmlPart"],["CustomXmlPart",0,[["id",3],["namespaceUri",3]],0,[["delete"],["getXml",0,2,0,4],["setXml",1]]],["_V1Api",0,0,0,[["bindingGetData",1,2,0,4],["getSelectedData",1,2,0,4],["gotoById",1,2,0,4],["bindingAddFromSelection",1,2],["bindingGetById",1,2,0,4],["bindingReleaseById",1,2],["bindingGetAll",0,2,0,4],["bindingAddFromNamedItem",1,2],["bindingAddFromPrompt",1,2],["bindingDeleteAllDataValues",1],["setSelectedData",1],["bindingClearFormats",1],["bindingSetData",1],["bindingSetFormats",1],["bindingSetTableOptions",1],["bindingAddRows",1],["bindingAddColumns",1],["getFilePropertiesAsync",0,2,9,4]]],["PivotTableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotTable",1,18,0,4],["getFirst","PivotTable",0,10,0,4],["getItemOrNullObject","PivotTable",1,2,0,4],["getFirstOrNullObject","PivotTable",0,2,35,4]],0,"PivotTable"],["PivotTableCollection",5,0,0,[["refreshAll",0,0,0,2,0,12],["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","PivotTable",1,18,0,4],["getItemOrNullObject","PivotTable",1,2,15,4],["add","PivotTable",3,8,5,2,0,0,12]],0,"PivotTable",[["Added",0,3,"MessageType.pivotTableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.pivotTableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["PivotTable",0,[["name",1,0,0,2,12],["id",3,16],["useCustomSortLists",1,6,0,2,12],["enableDataValueEditing",1,6,0,2,12],["refreshOnOpen",0,23,0,2,29],["allowMultipleFiltersPerField",0,27,0,2,12]],[["worksheet","Worksheet",2,0,0,4],["hierarchies","PivotHierarchyCollection",19,5,0,4],["rowHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["columnHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["dataHierarchies","DataPivotHierarchyCollection",19,5,0,4],["filterHierarchies","FilterPivotHierarchyCollection",19,5,0,4],["layout","PivotLayout",2,5,0,4]],[["refresh",0,0,0,2,0,12],["delete",0,0,5,2,0,12],["getDataSourceString",0,2,35,4],["getDataSourceType",0,2,35,4]],[["addDateGroup","PivotHierarchy",2,0,8,2,0,0,38]]],["PivotLayout",0,[["showColumnGrandTotals",1,0,0,2,12],["showRowGrandTotals",1,0,0,2,12],["enableFieldList",1,17,0,2,12],["subtotalLocation",1,0,0,2,12],["layoutType",1,0,0,2,12],["autoFormat",1,6,0,2,12],["preserveFormatting",1,6,0,2,12],["altTextDescription",0,23,0,2,29],["altTextTitle",0,23,0,2,29],["emptyCellText",0,23,0,2,29],["fillEmptyCells",0,23,0,2,29],["showFieldHeaders",0,23,0,2,29],["tabularValues",3,8],["tabularText",3,8],["tabularNumberFormat",3,8],["tabularNumberFormatLocal",3,8]],[["pivotStyle","PivotTableStyle",35,8,0,4]],[["setAutoSortOnCell",2,0,6,2,0,12],["setStyle",1,0,8,2,0,12],["displayBlankLineAfterEachItem",1,0,23,2,0,29],["repeatAllItemLabels",1,0,23,2,0,29]],[["getRange","Range",0,3],["getRowLabelRange","Range",0,3],["getColumnLabelRange","Range",0,3],["getFilterAxisRange","Range",0,3],["getDataBodyRange","Range",0,3],["getCell","Range",3,2,8],["getPivotItems","PivotItemCollection",2,4,6],["getDataHierarchy","DataPivotHierarchy",1,3,6]]],["PivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotHierarchy",1,18,0,4],["getItemOrNullObject","PivotHierarchy",1,2,0,4]],0,"PivotHierarchy"],["PivotHierarchy",0,[["id",3],["name",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]]],["RowColumnPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","RowColumnPivotHierarchy",1,18,0,4],["getItemOrNullObject","RowColumnPivotHierarchy",1,2,0,4],["add","RowColumnPivotHierarchy",1,8,0,2,0,0,12]],0,"RowColumnPivotHierarchy"],["RowColumnPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["FilterPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","FilterPivotHierarchy",1,18,0,4],["getItemOrNullObject","FilterPivotHierarchy",1,2,0,4],["add","FilterPivotHierarchy",1,8,0,2,0,0,12]],0,"FilterPivotHierarchy"],["FilterPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["enableMultipleFilterItems",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["DataPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","DataPivotHierarchy",1,18,0,4],["getItemOrNullObject","DataPivotHierarchy",1,2,0,4],["add","DataPivotHierarchy",1,8,0,2,0,0,12]],0,"DataPivotHierarchy"],["DataPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["numberFormat",1,0,0,2,12],["summarizeBy",1,0,0,2,12],["showAs",1,0,0,2,12]],[["field","PivotField",35,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["PivotFieldCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotField",1,18,0,4],["getItemOrNullObject","PivotField",1,2,0,4]],0,"PivotField"],["PivotField",0,[["id",3],["name",1,0,0,2,12],["subtotals",1,0,0,2,12],["showAllItems",1,0,0,2,12]],[["items","PivotItemCollection",19,0,0,4]],[["sortByLabels",1,1,0,2,0,12],["sortByValues",3,0,6,2,0,12],["applyFilter",1,0,27,2,0,12],["clearAllFilters",0,0,27,2,0,12],["clearFilter",1,0,27,2,0,12],["getFilters",0,0,27],["isFiltered",1,0,27]]],["PivotItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotItem",1,18,0,4],["getItemOrNullObject","PivotItem",1,2,0,4]],0,"PivotItem"],["PivotItem",0,[["id",3],["name",1,0,0,2,12],["isExpanded",1,0,0,2,12],["visible",1,0,0,2,12]]],["WorksheetCustomProperty",0,[["key",3],["value",1],["_Id",2]],0,[["delete"]]],["WorksheetCustomPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","WorksheetCustomProperty",1,18,0,4],["getItemOrNullObject","WorksheetCustomProperty",1],["add","WorksheetCustomProperty",2,8]],0,"WorksheetCustomProperty"],["DocumentProperties",0,[["title",1],["subject",1],["author",1],["keywords",1],["comments",1],["lastAuthor",3],["revisionNumber",1],["creationDate",11],["category",1],["manager",1],["company",1]],[["custom","CustomPropertyCollection",19,0,0,4]]],["CustomProperty",0,[["key",3],["value",1],["type",3]],0,[["delete"]]],["CustomPropertyCollection",1,0,0,[["getCount",0,2,0,4],["deleteAll"]],[["getItemOrNullObject","CustomProperty",1,2,0,4],["add","CustomProperty",2,8],["getItem","CustomProperty",1,18,0,4]],0,"CustomProperty"],["ConditionalFormatCollection",1,0,0,[["getCount",0,2,0,4],["clearAll",0,0,0,2,0,39]],[["getItemAt","ConditionalFormat",1,2,0,4],["add","ConditionalFormat",1,8,0,2,0,0,39],["getItem","ConditionalFormat",1,18,0,4],["getItemOrNullObject","ConditionalFormat",1,2,18,4]],0,"ConditionalFormat"],["ConditionalFormat",0,[["stopIfTrue",1],["priority",1],["type",3],["id",3]],[["dataBarOrNullObject","DataBarConditionalFormat",35,0,0,4],["dataBar","DataBarConditionalFormat",35,0,0,4],["customOrNullObject","CustomConditionalFormat",35,0,0,4],["custom","CustomConditionalFormat",35,0,0,4],["iconSet","IconSetConditionalFormat",35,0,0,4],["iconSetOrNullObject","IconSetConditionalFormat",35,0,0,4],["colorScale","ColorScaleConditionalFormat",35,0,0,4],["colorScaleOrNullObject","ColorScaleConditionalFormat",35,0,0,4],["topBottom","TopBottomConditionalFormat",35,0,0,4],["topBottomOrNullObject","TopBottomConditionalFormat",35,0,0,4],["preset","PresetCriteriaConditionalFormat",35,0,0,4],["presetOrNullObject","PresetCriteriaConditionalFormat",35,0,0,4],["textComparison","TextConditionalFormat",35,0,0,4],["textComparisonOrNullObject","TextConditionalFormat",35,0,0,4],["cellValue","CellValueConditionalFormat",35,0,0,4],["cellValueOrNullObject","CellValueConditionalFormat",35,0,0,4]],[["delete",0,0,0,2,0,40],["changeRuleToCellValue",1,0,30],["changeRuleToColorScale",0,0,30],["changeRuleToContainsText",1,0,30],["changeRuleToCustom",1,0,30],["changeRuleToDataBar",0,0,30],["changeRuleToIconSet",0,0,30],["changeRuleToPresetCriteria",1,0,30],["changeRuleToTopBottom",1,0,30],["setRanges",1,0,30]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4],["getRanges","RangeAreas",0,10,6,4]]],["DataBarConditionalFormat",0,[["showDataBarOnly",1,0,0,2,40],["barDirection",1,0,0,2,41],["axisFormat",1,0,0,2,41],["axisColor",1,0,0,2,41],["lowerBoundRule",1,0,0,2,41],["upperBoundRule",1,0,0,2,41]],[["positiveFormat","ConditionalDataBarPositiveFormat",35,0,0,4],["negativeFormat","ConditionalDataBarNegativeFormat",35,0,0,4]]],["ConditionalDataBarPositiveFormat",0,[["fillColor",1,0,0,2,40],["gradientFill",1,0,0,2,40],["borderColor",1,0,0,2,40]]],["ConditionalDataBarNegativeFormat",0,[["fillColor",1,0,0,2,40],["matchPositiveFillColor",1,0,0,2,40],["borderColor",1,0,0,2,40],["matchPositiveBorderColor",1,0,0,2,40]]],["CustomConditionalFormat",0,0,[["rule","ConditionalFormatRule",35,0,0,4],["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalFormatRule",0,[["formula",1,0,0,2,41],["formulaLocal",1],["formulaR1C1",1]]],["IconSetConditionalFormat",0,[["reverseIconOrder",1,0,0,2,41],["showIconOnly",1,0,0,2,41],["style",1,0,0,2,41],["criteria",1,0,0,2,41]]],["ColorScaleConditionalFormat",0,[["threeColorScale",3],["criteria",1,0,0,2,41]]],["TopBottomConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["PresetCriteriaConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["TextConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["CellValueConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalRangeFormat",0,[["numberFormat",1]],[["fill","ConditionalRangeFill",35,0,0,4],["font","ConditionalRangeFont",35,0,0,4],["borders","ConditionalRangeBorderCollection",51,0,0,4]],[["clearFormat",0,0,30]]],["ConditionalRangeFont",0,[["color",1,0,0,2,42],["italic",1,0,0,2,42],["bold",1,0,0,2,42],["underline",1,0,0,2,42],["strikethrough",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeFill",0,[["color",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeBorder",0,[["sideIndex",3],["style",1,0,0,2,42],["color",1,0,0,2,42]]],["ConditionalRangeBorderCollection",1,[["count",3]],[["top","ConditionalRangeBorder",35,0,0,4],["bottom","ConditionalRangeBorder",35,0,0,4],["left","ConditionalRangeBorder",35,0,0,4],["right","ConditionalRangeBorder",35,0,0,4]],0,[["getItem","ConditionalRangeBorder",1,18,0,4],["getItemAt","ConditionalRangeBorder",1,2,0,4]],0,"ConditionalRangeBorder"],["NumberFormattingService",0,0,0,0,[["getFormatter","NumberFormatter",1,3]],0,0,0,"Microsoft.ExcelServices.NumberFormattingService",4],["NumberFormatter",0,[["isDateTime",3],["isPercent",3],["isCurrency",3],["isNumeric",3],["isText",3],["hasYear",3],["hasMonth",3],["hasDayOfWeek",3]],0,[["format",1,3]]],["CustomFunctionManager",36,[["status",2]],0,[["register",2]],0,0,0,0,"Microsoft.ExcelServices.CustomFunctionManager",4],["Style",0,[["builtIn",3],["formulaHidden",1],["horizontalAlignment",1],["includeAlignment",1],["includeBorder",1],["includeFont",1],["includeNumber",1],["includePatterns",1],["includeProtection",1],["indentLevel",1],["locked",1],["name",3],["numberFormat",1],["numberFormatLocal",1],["readingOrder",1],["shrinkToFit",1],["verticalAlignment",1],["wrapText",1],["textOrientation",5,5],["autoIndent",1,5]],[["borders","RangeBorderCollection",51,0,0,4],["font","RangeFont",35,0,0,4],["fill","RangeFill",35,0,0,4]],[["delete"]]],["StyleCollection",1,0,0,[["add",1],["getCount",0,2,6,4]],[["getItem","Style",1,18,0,4],["getItemAt","Style",1,2,6,4],["getItemOrNullObject","Style",1,2,18,4]],0,"Style"],["TableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TableStyle",1,18,0,4],["getItemOrNullObject","TableStyle",1,2,0,4],["add","TableStyle",2,8],["getDefault","TableStyle"]],0,"TableStyle"],["TableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TableStyle"]]],["PivotTableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","PivotTableStyle",1,18,0,4],["getItemOrNullObject","PivotTableStyle",1,2,0,4],["add","PivotTableStyle",2,8],["getDefault","PivotTableStyle"]],0,"PivotTableStyle"],["PivotTableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","PivotTableStyle"]]],["SlicerStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","SlicerStyle",1,18,0,4],["getItemOrNullObject","SlicerStyle",1,2,0,4],["add","SlicerStyle",2,8],["getDefault","SlicerStyle"]],0,"SlicerStyle"],["SlicerStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","SlicerStyle"]]],["TimelineStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TimelineStyle",1,18,0,4],["getItemOrNullObject","TimelineStyle",1,2,0,4],["add","TimelineStyle",2,8],["getDefault","TimelineStyle"]],0,"TimelineStyle"],["TimelineStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TimelineStyle"]]],["InternalTest",0,0,0,[["delay",1],["triggerMessage",4,0,11],["_RegisterTestEvent",0,0,11,2,0,1],["_UnregisterTestEvent",0,0,11,2,0,1],["triggerTestEvent",2,0,11],["triggerPostProcess",0,0,11],["_RegisterTest1Event",0,0,11,2,0,1],["_UnregisterTest1Event",0,0,11,2,0,1],["triggerTestEventWithFilter",3,0,11],["firstPartyMethod",0,2,11,5],["_RegisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_RegisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["unregisterAllCustomFunctionExecutionEvents",0,0,20],["updateRangeValueOnCurrentSheet",2,0,3,2],["triggerUserUndo",0,2,3],["triggerUserRedo",0,2,3],["enterCellEdit",1,0,6],["installCustomFunctionsFromCache",0,0,6],["recalc",2,0,6],["recalcBySolutionId",1,0,6],["safeForCellEditModeMethod",1,0,6],["exitCellEdit",0,0,6],["noPermissionMethod",1,0,6],["verifyCustomFunctionListExist",0,0,6],["enableContentWorkbookLink",0,0,3],["previewExecutionMethod",1,0,8,16],["setRapidJsonEnabled",1,0,8],["triggerVbaRecorderRecordingChanged",2,0,8]],0,0,0,[["CustomFunctionExecutionBeginEvent",0,20,"MessageType.customFunctionExecutionBeginEvent","","_RegisterCustomFunctionExecutionBeginEvent","_UnregisterCustomFunctionExecutionBeginEvent"],["CustomFunctionExecutionEndEvent",0,20,"MessageType.customFunctionExecutionEndEvent","","_RegisterCustomFunctionExecutionEndEvent","_UnregisterCustomFunctionExecutionEndEvent"],["Test1Event",2,11,"MessageType.test1Event","","_RegisterTest1Event","_UnregisterTest1Event"],["TestEvent",2,11,"MessageType.testEvent","","_RegisterTestEvent","_UnregisterTestEvent"]],"Microsoft.ExcelServices.InternalTest",4],["PageLayout",0,[["orientation",1],["paperSize",1],["blackAndWhite",1],["printErrors",1],["zoom",1],["centerHorizontally",1],["centerVertically",1],["printHeadings",1],["printGridlines",1],["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["headerMargin",1],["footerMargin",1],["printComments",1],["draftMode",1],["firstPageNumber",1],["printOrder",1]],[["headersFooters","HeaderFooterGroup",35,0,0,4]],[["setPrintMargins",2],["setPrintArea",1],["setPrintTitleRows",1],["setPrintTitleColumns",1]],[["getPrintArea","RangeAreas",0,10,0,4],["getPrintAreaOrNullObject","RangeAreas",0,10,0,4],["getPrintTitleRows","Range",0,10,0,4],["getPrintTitleRowsOrNullObject","Range",0,10,0,4],["getPrintTitleColumns","Range",0,10,0,4],["getPrintTitleColumnsOrNullObject","Range",0,10,0,4]]],["HeaderFooter",0,[["leftHeader",1],["centerHeader",1],["rightHeader",1],["leftFooter",1],["centerFooter",1],["rightFooter",1]]],["HeaderFooterGroup",0,[["state",1],["useSheetMargins",1],["useSheetScale",1]],[["defaultForAllPages","HeaderFooter",35,0,0,4],["firstPage","HeaderFooter",35,0,0,4],["evenPages","HeaderFooter",35,0,0,4],["oddPages","HeaderFooter",35,0,0,4]]],["PageBreak",0,[["_Id",2],["columnIndex",3],["rowIndex",3]],0,[["delete"]],[["getCellAfterBreak","Range",0,10,0,4]]],["PageBreakCollection",1,0,0,[["removePageBreaks"],["getCount",0,2,0,4]],[["getItem","PageBreak",1,18,0,4],["add","PageBreak",1,8]],0,"PageBreak"],["DataConnectionCollection",0,0,0,[["refreshAll"]],[["add","DataConnection",4,8,8,2,0,0,12]]],["RangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","Range",1,2,0,4]],0,"Range"],["RangeAreasCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","RangeAreas",1,2,0,4]],0,"RangeAreas"],["CommentCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,2,27],["_UnregisterAddedEvent",0,2,27],["_RegisterDeletedEvent",0,2,27],["_UnregisterDeletedEvent",0,2,27],["_RegisterChangedEvent",0,2,27],["_UnregisterChangedEvent",0,2,27]],[["getItem","Comment",1,18,0,4],["getItemAt","Comment",1,2,0,4],["add","Comment",3,8],["getItemByReplyId","Comment",1,2,0,4],["getItemByCell","Comment",1,2,0,4],["getItemOrNullObject","Comment",1,2,18,4]],0,"Comment",[["Added",0,27,"MessageType.commentAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",0,27,"MessageType.commentChangedEvent","this._eventTargetId","_RegisterChangedEvent","_UnregisterChangedEvent"],["Deleted",0,27,"MessageType.commentDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Comment",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",1,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],[["replies","CommentReplyCollection",19,0,0,4]],[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["CommentReplyCollection",1,0,0,[["getCount",0,2,0,4]],[["add","CommentReply",2,8],["getItem","CommentReply",1,18,0,4],["getItemAt","CommentReply",1,2,0,4],["getItemOrNullObject","CommentReply",1,2,18,4]],0,"CommentReply"],["CommentReply",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",3,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],0,[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["getParentComment","Comment"],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["ShapeCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["addImage","Shape",1],["_GetItem","Shape",1,18,0,4],["addGeometricShape","Shape",1],["addTextBox","Shape",1],["addSvg","Shape",1,0,8],["addGroup","Shape",1],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["addLine","Shape",5],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape",[["Added",0,3,"MessageType.shapeAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.shapeDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Shape",0,[["id",3],["name",1],["left",1],["top",1],["width",1],["height",1],["rotation",1],["zOrderPosition",3],["altTextTitle",1],["altTextDescription",1,0,0,2,36],["type",3],["lockAspectRatio",1],["placement",1,17],["geometricShapeType",1],["visible",1],["level",3],["connectionSiteCount",3],["scriptLink",1,8,0,2,37],["displayName",3,35]],[["geometricShape","GeometricShape",2,0,0,4],["image","Image",2,0,0,4],["textFrame","TextFrame",2,0,0,4],["fill","ShapeFill",35,0,0,4],["group","ShapeGroup",2,0,0,4],["parentGroup","Shape",2,0,0,4],["line","Line",2,0,0,4],["lineFormat","ShapeLineFormat",35,0,0,4]],[["setZOrder",1],["incrementLeft",1],["incrementTop",1],["incrementRotation",1],["scaleHeight",3],["scaleWidth",3],["delete"],["getAsImage",1],["_RegisterActivatedEvent",0,0,0,2,0,1],["_UnregisterActivatedEvent",0,0,0,2,0,1],["_RegisterDeactivatedEvent",0,0,0,2,0,1],["_UnregisterDeactivatedEvent",0,0,0,2,0,1],["activate",0,0,3]],[["copyTo","Shape",1,8,17,0,0,"_GetShapeById"],["_GetShapeById","Shape",1,2,17,4]],0,0,[["Activated",0,0,"MessageType.shapeActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,0,"MessageType.shapeDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["GeometricShape",0,[["id",3]],[["shape","Shape",2,0,0,4]]],["Image",0,[["id",3],["format",3,0,"format"]],[["shape","Shape",2,0,0,4]]],["ShapeGroup",0,[["id",3]],[["shapes","GroupShapeCollection",19,0,0,4],["shape","Shape",2,0,0,4]],[["ungroup"]]],["GroupShapeCollection",1,0,0,[["getCount",0,2,0,4]],[["_GetItem","Shape",1,18,0,4],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape"],["Line",0,[["id",3],["connectorType",1,0,"connectorType"],["beginArrowheadLength",1],["beginArrowheadStyle",1],["beginArrowheadWidth",1],["endArrowheadLength",1],["endArrowheadStyle",1],["endArrowheadWidth",1],["isBeginConnected",3],["beginConnectedSite",3],["isEndConnected",3],["endConnectedSite",3]],[["shape","Shape",2,0,0,4],["beginConnectedShape","Shape",2,0,0,4],["endConnectedShape","Shape",2,0,0,4]],[["connectBeginShape",2],["disconnectBeginShape"],["connectEndShape",2],["disconnectEndShape"]]],["ShapeFill",0,[["foregroundColor",1],["type",3],["transparency",1]],0,[["clear"],["setSolidColor",1]]],["ShapeLineFormat",0,[["visible",1],["color",1],["style",1],["weight",1],["dashStyle",1],["transparency",1]]],["TextFrame",0,[["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["horizontalAlignment",1],["horizontalOverflow",1],["verticalAlignment",1],["verticalOverflow",1],["orientation",1],["readingOrder",1],["hasText",3],["autoSizeSetting",1]],[["textRange","TextRange",2,0,0,4]],[["deleteText"]]],["TextRange",0,[["text",1]],[["font","ShapeFont",35,0,0,4]],0,[["getSubstring","TextRange",2]]],["ShapeFont",0,[["size",1],["name",1],["color",1],["bold",1],["italic",1],["underline",1]]],["Slicer",0,[["id",3],["name",1],["caption",1],["left",1],["top",1],["width",1],["height",1],["nameInFormula",1,8],["isFilterCleared",3],["style",1],["sortBy",1],["sortUsingCustomLists",1,3],["columnCount",1,3],["disableMoveResizeUI",1,3],["displayHeader",1,3],["rowHeight",1,3],["shapeId",2,3]],[["slicerItems","SlicerItemCollection",19,0,0,4],["worksheet","Worksheet",35,0,0,4],["slicerStyle","SlicerStyle",35,8,0,4]],[["delete"],["clearFilters"],["getSelectedItems"],["selectItems",1],["activate",0,2,3],["setStyle",1,0,8]]],["SlicerCollection",1,0,0,[["getCount",0,2,0,4]],[["add","Slicer",3,8],["getItemAt","Slicer",1,2,0,4],["getItem","Slicer",1,18,0,4],["getItemOrNullObject","Slicer",1,2,0,4]],0,"Slicer"],["SlicerItem",0,[["key",3],["name",3],["isSelected",1],["hasData",3]]],["SlicerItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SlicerItem",1,2,0,4],["getItem","SlicerItem",1,18,0,4],["getItemOrNullObject","SlicerItem",1,2,0,4]],0,"SlicerItem"],["Ribbon",0,[["activeTab",1]],0,[["executeCommand",2],["showTeachingCallout",3],["_RegisterCommandExecutedEvent",0,0,0,2,0,1],["_UnregisterCommandExecutedEvent",0,0,0,2,0,1],["showChartDialog",1,2,8,4]],0,0,0,[["CommandExecuted",0,0,"MessageType.ribbonCommandExecutedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCommandExecutedEvent","_UnregisterCommandExecutedEvent"]]],["LinkedDataType",0,[["dataProvider",2],["serviceId",2],["lastRefreshed",10],["name",2],["periodicRefreshInterval",2],["refreshDataLoadWarnings",2],["refreshMode",2],["supportedRefreshModes",2],["refreshErrors",2]],0,[["requestRefresh",0,0,0,2],["requestSetRefreshMode",1,0,0,2]]],["LinkedDataTypeCollection",1,0,0,[["getCount",0,2,0,4],["requestRefreshAll",0,0,0,2],["_RegisterRefreshRequestCompletedEvent",0,2,0,4],["_UnregisterRefreshRequestCompletedEvent",0,2,0,4],["_RegisterRefreshModeChangedEvent",0,2,0,4],["_UnregisterRefreshModeChangedEvent",0,2,0,4],["_RegisterLinkedDataTypeAddedEvent",0,2,0,4],["_UnregisterLinkedDataTypeAddedEvent",0,2,0,4]],[["getItem","LinkedDataType",1,18,0,4],["getItemOrNullObject","LinkedDataType",1],["getItemAt","LinkedDataType",1,2,0,4]],0,"LinkedDataType",[["LinkedDataTypeAdded",0,0,"MessageType.linkedDataTypeLinkedDataTypeAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterLinkedDataTypeAddedEvent","_UnregisterLinkedDataTypeAddedEvent"],["RefreshModeChanged",0,0,"MessageType.linkedDataTypeRefreshModeChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshModeChangedEvent","_UnregisterRefreshModeChangedEvent"],["RefreshRequestCompleted",0,0,"MessageType.linkedDataTypeRefreshRequestCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshRequestCompletedEvent","_UnregisterRefreshRequestCompletedEvent"]]],["SheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","SheetView",1]]],["SheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","SheetView",1,8],["enterTemporary","SheetView"],["getActive","SheetView"],["getItem","SheetView",1,18,0,4],["getItemAt","SheetView",1,2,0,4]],0,"SheetView"],["NamedSheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","NamedSheetView",1]]],["NamedSheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","NamedSheetView",1,8],["enterTemporary","NamedSheetView"],["getActive","NamedSheetView"],["getItem","NamedSheetView",1,18,0,4],["getItemAt","NamedSheetView",1,2,0,4],["getItemOrNullObject","NamedSheetView",1,2,28,4]],0,"NamedSheetView"],["FunctionResult",0,[["error",3],["value",3]]],["Functions",0,0,0,0,[["count","FunctionResult",1,72],["if","FunctionResult",3,8],["isNA","FunctionResult",1,8],["isError","FunctionResult",1,8],["sum","FunctionResult",1,72],["average","FunctionResult",1,72],["min","FunctionResult",1,72],["max","FunctionResult",1,72],["na","FunctionResult",0,8],["npv","FunctionResult",2,72],["dollar","FunctionResult",2,8],["fixed","FunctionResult",3,8],["sin","FunctionResult",1,8],["cos","FunctionResult",1,8],["tan","FunctionResult",1,8],["atan","FunctionResult",1,8],["pi","FunctionResult",0,8],["sqrt","FunctionResult",1,8],["exp","FunctionResult",1,8],["ln","FunctionResult",1,8],["log10","FunctionResult",1,8],["abs","FunctionResult",1,8],["int","FunctionResult",1,8],["sign","FunctionResult",1,8],["round","FunctionResult",2,8],["lookup","FunctionResult",3,8],["rept","FunctionResult",2,8],["mid","FunctionResult",3,8],["len","FunctionResult",1,8],["value","FunctionResult",1,8],["true","FunctionResult",0,8],["false","FunctionResult",0,8],["and","FunctionResult",1,72],["or","FunctionResult",1,72],["not","FunctionResult",1,8],["mod","FunctionResult",2,8],["dcount","FunctionResult",3,8,0,0,"DCount"],["dsum","FunctionResult",3,8,0,0,"DSum"],["daverage","FunctionResult",3,8,0,0,"DAverage"],["dmin","FunctionResult",3,8,0,0,"DMin"],["dmax","FunctionResult",3,8,0,0,"DMax"],["dstDev","FunctionResult",3,8,0,0,"DStDev"],["dvar","FunctionResult",3,8,0,0,"DVar"],["text","FunctionResult",2,8],["pv","FunctionResult",5,8],["fv","FunctionResult",5,8],["nper","FunctionResult",5,8,0,0,"NPer"],["pmt","FunctionResult",5,8],["rate","FunctionResult",6,8],["mirr","FunctionResult",3,8,0,0,"MIrr"],["irr","FunctionResult",2,8],["rand","FunctionResult",0,8],["match","FunctionResult",3,8],["date","FunctionResult",3,8],["time","FunctionResult",3,8],["day","FunctionResult",1,8],["month","FunctionResult",1,8],["year","FunctionResult",1,8],["weekday","FunctionResult",2,8],["hour","FunctionResult",1,8],["minute","FunctionResult",1,8],["second","FunctionResult",1,8],["now","FunctionResult",0,8],["areas","FunctionResult",1,8],["rows","FunctionResult",1,8],["columns","FunctionResult",1,8],["type","FunctionResult",1,8],["atan2","FunctionResult",2,8],["asin","FunctionResult",1,8],["acos","FunctionResult",1,8],["choose","FunctionResult",2,72],["hlookup","FunctionResult",4,8,0,0,"HLookup"],["vlookup","FunctionResult",4,8,0,0,"VLookup"],["isref","FunctionResult",1,8],["log","FunctionResult",2,8],["char","FunctionResult",1,8],["lower","FunctionResult",1,8],["upper","FunctionResult",1,8],["proper","FunctionResult",1,8],["left","FunctionResult",2,8],["right","FunctionResult",2,8],["exact","FunctionResult",2,8],["trim","FunctionResult",1,8],["replace","FunctionResult",4,8],["substitute","FunctionResult",4,8],["code","FunctionResult",1,8],["find","FunctionResult",3,8],["isErr","FunctionResult",1,8],["isText","FunctionResult",1,8],["isNumber","FunctionResult",1,8],["t","FunctionResult",1,8,0,0,"T"],["n","FunctionResult",1,8,0,0,"N"],["datevalue","FunctionResult",1,8],["timevalue","FunctionResult",1,8],["sln","FunctionResult",3,8],["syd","FunctionResult",4,8],["ddb","FunctionResult",5,8],["clean","FunctionResult",1,8],["ipmt","FunctionResult",6,8],["ppmt","FunctionResult",6,8],["countA","FunctionResult",1,72],["product","FunctionResult",1,72],["fact","FunctionResult",1,8],["dproduct","FunctionResult",3,8,0,0,"DProduct"],["isNonText","FunctionResult",1,8],["dstDevP","FunctionResult",3,8,0,0,"DStDevP"],["dvarP","FunctionResult",3,8,0,0,"DVarP"],["trunc","FunctionResult",2,8],["isLogical","FunctionResult",1,8],["dcountA","FunctionResult",3,8,0,0,"DCountA"],["usdollar","FunctionResult",2,8,0,0,"USDollar"],["findB","FunctionResult",3,8],["replaceB","FunctionResult",4,8],["leftb","FunctionResult",2,8],["rightb","FunctionResult",2,8],["midb","FunctionResult",3,8],["lenb","FunctionResult",1,8],["roundUp","FunctionResult",2,8],["roundDown","FunctionResult",2,8],["asc","FunctionResult",1,8],["dbcs","FunctionResult",1,8],["days360","FunctionResult",3,8],["today","FunctionResult",0,8],["vdb","FunctionResult",7,8],["median","FunctionResult",1,72],["sinh","FunctionResult",1,8],["cosh","FunctionResult",1,8],["tanh","FunctionResult",1,8],["asinh","FunctionResult",1,8],["acosh","FunctionResult",1,8],["atanh","FunctionResult",1,8],["dget","FunctionResult",3,8,0,0,"DGet"],["db","FunctionResult",5,8],["error_Type","FunctionResult",1,8],["aveDev","FunctionResult",1,72],["gammaLn","FunctionResult",1,8],["combin","FunctionResult",2,8],["even","FunctionResult",1,8],["fisher","FunctionResult",1,8],["fisherInv","FunctionResult",1,8],["standardize","FunctionResult",3,8],["odd","FunctionResult",1,8],["permut","FunctionResult",2,8],["devSq","FunctionResult",1,72],["geoMean","FunctionResult",1,72],["harMean","FunctionResult",1,72],["sumSq","FunctionResult",1,72],["kurt","FunctionResult",1,72],["skew","FunctionResult",1,72],["large","FunctionResult",2,8],["small","FunctionResult",2,8],["trimMean","FunctionResult",2,8],["concatenate","FunctionResult",1,72],["power","FunctionResult",2,8],["radians","FunctionResult",1,8],["degrees","FunctionResult",1,8],["subtotal","FunctionResult",2,72],["sumIf","FunctionResult",3,8],["countIf","FunctionResult",2,8],["countBlank","FunctionResult",1,8],["ispmt","FunctionResult",4,8],["roman","FunctionResult",2,8],["hyperlink","FunctionResult",2,8],["averageA","FunctionResult",1,72],["maxA","FunctionResult",1,72],["minA","FunctionResult",1,72],["stDevPA","FunctionResult",1,72],["varPA","FunctionResult",1,72],["stDevA","FunctionResult",1,72],["varA","FunctionResult",1,72],["bahtText","FunctionResult",1,8],["hex2Bin","FunctionResult",2,8],["hex2Dec","FunctionResult",1,8],["hex2Oct","FunctionResult",2,8],["dec2Bin","FunctionResult",2,8],["dec2Hex","FunctionResult",2,8],["dec2Oct","FunctionResult",2,8],["oct2Bin","FunctionResult",2,8],["oct2Hex","FunctionResult",2,8],["oct2Dec","FunctionResult",1,8],["bin2Dec","FunctionResult",1,8],["bin2Oct","FunctionResult",2,8],["bin2Hex","FunctionResult",2,8],["imSub","FunctionResult",2,8],["imDiv","FunctionResult",2,8],["imPower","FunctionResult",2,8],["imAbs","FunctionResult",1,8],["imSqrt","FunctionResult",1,8],["imLn","FunctionResult",1,8],["imLog2","FunctionResult",1,8],["imLog10","FunctionResult",1,8],["imSin","FunctionResult",1,8],["imCos","FunctionResult",1,8],["imExp","FunctionResult",1,8],["imArgument","FunctionResult",1,8],["imConjugate","FunctionResult",1,8],["imaginary","FunctionResult",1,8],["imReal","FunctionResult",1,8],["complex","FunctionResult",3,8],["imSum","FunctionResult",1,72],["imProduct","FunctionResult",1,72],["seriesSum","FunctionResult",4,8],["factDouble","FunctionResult",1,8],["sqrtPi","FunctionResult",1,8],["quotient","FunctionResult",2,8],["delta","FunctionResult",2,8],["geStep","FunctionResult",2,8],["isEven","FunctionResult",1,8],["isOdd","FunctionResult",1,8],["mround","FunctionResult",2,8,0,0,"MRound"],["erf","FunctionResult",2,8],["erfC","FunctionResult",1,8],["besselJ","FunctionResult",2,8],["besselK","FunctionResult",2,8],["besselY","FunctionResult",2,8],["besselI","FunctionResult",2,8],["xirr","FunctionResult",3,8],["xnpv","FunctionResult",3,8],["priceMat","FunctionResult",6,8],["yieldMat","FunctionResult",6,8],["intRate","FunctionResult",5,8],["received","FunctionResult",5,8],["disc","FunctionResult",5,8],["priceDisc","FunctionResult",5,8],["yieldDisc","FunctionResult",5,8],["tbillEq","FunctionResult",3,8,0,0,"TBillEq"],["tbillPrice","FunctionResult",3,8,0,0,"TBillPrice"],["tbillYield","FunctionResult",3,8,0,0,"TBillYield"],["price","FunctionResult",7,8],["yield","FunctionResult",7,8],["dollarDe","FunctionResult",2,8],["dollarFr","FunctionResult",2,8],["nominal","FunctionResult",2,8],["effect","FunctionResult",2,8],["cumPrinc","FunctionResult",6,8],["cumIPmt","FunctionResult",6,8],["edate","FunctionResult",2,8,0,0,"EDate"],["eoMonth","FunctionResult",2,8],["yearFrac","FunctionResult",3,8],["coupDayBs","FunctionResult",4,8],["coupDays","FunctionResult",4,8],["coupDaysNc","FunctionResult",4,8],["coupNcd","FunctionResult",4,8],["coupNum","FunctionResult",4,8],["coupPcd","FunctionResult",4,8],["duration","FunctionResult",6,8],["mduration","FunctionResult",6,8,0,0,"MDuration"],["oddLPrice","FunctionResult",8,8],["oddLYield","FunctionResult",8,8],["oddFPrice","FunctionResult",9,8],["oddFYield","FunctionResult",9,8],["randBetween","FunctionResult",2,8],["weekNum","FunctionResult",2,8],["amorDegrc","FunctionResult",7,8],["amorLinc","FunctionResult",7,8],["convert","FunctionResult",3,8],["accrInt","FunctionResult",8,8],["accrIntM","FunctionResult",5,8],["workDay","FunctionResult",3,8],["networkDays","FunctionResult",3,8],["gcd","FunctionResult",1,72],["multiNomial","FunctionResult",1,72],["lcm","FunctionResult",1,72],["fvschedule","FunctionResult",2,8,0,0,"FVSchedule"],["countIfs","FunctionResult",1,72],["sumIfs","FunctionResult",2,72],["averageIf","FunctionResult",3,8],["averageIfs","FunctionResult",2,72],["binom_Dist","FunctionResult",4,8],["binom_Inv","FunctionResult",3,8],["confidence_Norm","FunctionResult",3,8],["confidence_T","FunctionResult",3,8],["expon_Dist","FunctionResult",3,8],["gamma_Dist","FunctionResult",4,8],["gamma_Inv","FunctionResult",3,8],["norm_Dist","FunctionResult",4,8],["norm_Inv","FunctionResult",3,8],["percentile_Exc","FunctionResult",2,8],["percentile_Inc","FunctionResult",2,8],["percentRank_Exc","FunctionResult",3,8],["percentRank_Inc","FunctionResult",3,8],["poisson_Dist","FunctionResult",3,8],["quartile_Exc","FunctionResult",2,8],["quartile_Inc","FunctionResult",2,8],["rank_Avg","FunctionResult",3,8],["rank_Eq","FunctionResult",3,8],["stDev_S","FunctionResult",1,72],["stDev_P","FunctionResult",1,72],["t_Dist","FunctionResult",3,8],["t_Dist_2T","FunctionResult",2,8],["t_Dist_RT","FunctionResult",2,8],["t_Inv","FunctionResult",2,8],["t_Inv_2T","FunctionResult",2,8],["var_S","FunctionResult",1,72],["var_P","FunctionResult",1,72],["weibull_Dist","FunctionResult",4,8],["networkDays_Intl","FunctionResult",4,8],["workDay_Intl","FunctionResult",4,8],["ecma_Ceiling","FunctionResult",2,8,0,0,"ECMA_Ceiling"],["iso_Ceiling","FunctionResult",2,8,0,0,"ISO_Ceiling"],["beta_Dist","FunctionResult",6,8],["beta_Inv","FunctionResult",5,8],["chiSq_Dist","FunctionResult",3,8],["chiSq_Dist_RT","FunctionResult",2,8],["chiSq_Inv","FunctionResult",2,8],["chiSq_Inv_RT","FunctionResult",2,8],["f_Dist","FunctionResult",4,8],["f_Dist_RT","FunctionResult",3,8],["f_Inv","FunctionResult",3,8],["f_Inv_RT","FunctionResult",3,8],["hypGeom_Dist","FunctionResult",5,8],["logNorm_Dist","FunctionResult",4,8],["logNorm_Inv","FunctionResult",3,8],["negBinom_Dist","FunctionResult",4,8],["norm_S_Dist","FunctionResult",2,8],["norm_S_Inv","FunctionResult",1,8],["z_Test","FunctionResult",3,8],["erf_Precise","FunctionResult",1,8],["erfC_Precise","FunctionResult",1,8],["gammaLn_Precise","FunctionResult",1,8],["ceiling_Precise","FunctionResult",2,8],["floor_Precise","FunctionResult",2,8],["acot","FunctionResult",1,8],["acoth","FunctionResult",1,8],["cot","FunctionResult",1,8],["coth","FunctionResult",1,8],["csc","FunctionResult",1,8],["csch","FunctionResult",1,8],["sec","FunctionResult",1,8],["sech","FunctionResult",1,8],["imTan","FunctionResult",1,8],["imCot","FunctionResult",1,8],["imCsc","FunctionResult",1,8],["imCsch","FunctionResult",1,8],["imSec","FunctionResult",1,8],["imSech","FunctionResult",1,8],["bitand","FunctionResult",2,8],["bitor","FunctionResult",2,8],["bitxor","FunctionResult",2,8],["bitlshift","FunctionResult",2,8],["bitrshift","FunctionResult",2,8],["permutationa","FunctionResult",2,8],["combina","FunctionResult",2,8],["xor","FunctionResult",1,72],["pduration","FunctionResult",3,8,0,0,"PDuration"],["base","FunctionResult",3,8],["decimal","FunctionResult",2,8],["days","FunctionResult",2,8],["binom_Dist_Range","FunctionResult",4,8],["gamma","FunctionResult",1,8],["skew_p","FunctionResult",1,72],["gauss","FunctionResult",1,8],["phi","FunctionResult",1,8],["rri","FunctionResult",3,8],["unichar","FunctionResult",1,8],["unicode","FunctionResult",1,8],["arabic","FunctionResult",1,8],["isoWeekNum","FunctionResult",1,8],["numberValue","FunctionResult",3,8],["sheet","FunctionResult",1,8],["sheets","FunctionResult",1,8],["isFormula","FunctionResult",1,8],["ceiling_Math","FunctionResult",3,8],["floor_Math","FunctionResult",3,8],["imSinh","FunctionResult",1,8],["imCosh","FunctionResult",1,8]]]]},targetNamespaceObject:e})}(Excel||(Excel={}));var _EndExcel="_EndExcel";if("undefined"!==typeof window&&window.OSF&&window.OSF._OfficeAppFactory&&window.OSF._OfficeAppFactory.getHostInfo&&window.OSF._OfficeAppFactory.getHostInfo()){var hostPlatform=window.OSF._OfficeAppFactory.getHostInfo().hostPlatform;"web"===hostPlatform&&(OfficeExtension._internalConfig.enablePreviewExecution=!0)}function exposeOfficeRuntimeThroughOfficeNamespace(e,t){var n,r;"undefined"===typeof e&&"undefined"!==typeof window&&(e=null===window||void 0===window?void 0:window.OfficeRuntime),"undefined"===typeof e&&(e={}),"undefined"!==typeof t&&(t.storage=t.storage||(null===e||void 0===e?void 0:e.storage),t.auth=t.auth||(null===e||void 0===e?void 0:e.auth),t.getAccessToken=t.getAccessToken||(null===(n=null===e||void 0===e?void 0:e.auth)||void 0===n?void 0:n.getAccessToken),t.addin=t.addin||(null===e||void 0===e?void 0:e.addin),t.isSetSupported=t.isSetSupported||(null===(r=null===e||void 0===e?void 0:e.apiInformation)||void 0===r?void 0:r.isSetSupported),t.license=t.license||(null===e||void 0===e?void 0:e.license),t.message=t.message||(null===e||void 0===e?void 0:e.message))}OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel=!0,OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria=!1,exposeOfficeRuntimeThroughOfficeNamespace("undefined"!==typeof OfficeRuntime&&OfficeRuntime||void 0,"undefined"!==typeof Office&&Office||void 0); \ No newline at end of file diff --git a/dist/excel-ios-16.00.debug.js b/dist/excel-ios-16.00.debug.js new file mode 100644 index 000000000..99781206b --- /dev/null +++ b/dist/excel-ios-16.00.debug.js @@ -0,0 +1,39975 @@ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md +*/ + +/* +* @overview es6-promise - a tiny implementation of Promises/A+. +* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +* @license Licensed under MIT license +* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE +* @version 2.3.0 +*/ + + +// Sources: +// osfweb: 16.0\16801.10000 +// runtime: 16.0\16801.10000 +// core: 16.0\16801.10000 +// host: custom + + + +if (typeof OSFPerformance !== "undefined") { + OSFPerformance.hostInitializationStart = OSFPerformance.now(); +} +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExt; +(function (OfficeExt) { + var MicrosoftAjaxFactory = (function () { + function MicrosoftAjaxFactory() { + } + MicrosoftAjaxFactory.prototype.isMsAjaxLoaded = function () { + if (typeof (Sys) !== 'undefined' && typeof (Type) !== 'undefined' && + Sys.StringBuilder && typeof (Sys.StringBuilder) === "function" && + Type.registerNamespace && typeof (Type.registerNamespace) === "function" && + Type.registerClass && typeof (Type.registerClass) === "function" && + typeof (Function._validateParams) === "function" && + Sys.Serialization && Sys.Serialization.JavaScriptSerializer && typeof (Sys.Serialization.JavaScriptSerializer.serialize) === "function") { + return true; + } + else { + return false; + } + }; + MicrosoftAjaxFactory.prototype.loadMsAjaxFull = function (callback) { + var msAjaxCDNPath = (window.location.protocol.toLowerCase() === 'https:' ? 'https:' : 'http:') + '//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js'; + OSF.OUtil.loadScript(msAjaxCDNPath, callback); + }; + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxError", { + get: function () { + if (this._msAjaxError == null && this.isMsAjaxLoaded()) { + this._msAjaxError = Error; + } + return this._msAjaxError; + }, + set: function (errorClass) { + this._msAjaxError = errorClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxString", { + get: function () { + if (this._msAjaxString == null && this.isMsAjaxLoaded()) { + this._msAjaxString = String; + } + return this._msAjaxString; + }, + set: function (stringClass) { + this._msAjaxString = stringClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxDebug", { + get: function () { + if (this._msAjaxDebug == null && this.isMsAjaxLoaded()) { + this._msAjaxDebug = Sys.Debug; + } + return this._msAjaxDebug; + }, + set: function (debugClass) { + this._msAjaxDebug = debugClass; + }, + enumerable: true, + configurable: true + }); + return MicrosoftAjaxFactory; + }()); + OfficeExt.MicrosoftAjaxFactory = MicrosoftAjaxFactory; +})(OfficeExt || (OfficeExt = {})); +var OsfMsAjaxFactory = new OfficeExt.MicrosoftAjaxFactory(); +var OSF = OSF || {}; +(function (OfficeExt) { + var SafeStorage = (function () { + function SafeStorage(_internalStorage) { + this._internalStorage = _internalStorage; + } + SafeStorage.prototype.getItem = function (key) { + try { + return this._internalStorage && this._internalStorage.getItem(key); + } + catch (e) { + return null; + } + }; + SafeStorage.prototype.setItem = function (key, data) { + try { + this._internalStorage && this._internalStorage.setItem(key, data); + } + catch (e) { + } + }; + SafeStorage.prototype.clear = function () { + try { + this._internalStorage && this._internalStorage.clear(); + } + catch (e) { + } + }; + SafeStorage.prototype.removeItem = function (key) { + try { + this._internalStorage && this._internalStorage.removeItem(key); + } + catch (e) { + } + }; + SafeStorage.prototype.getKeysWithPrefix = function (keyPrefix) { + var keyList = []; + try { + var len = this._internalStorage && this._internalStorage.length || 0; + for (var i = 0; i < len; i++) { + var key = this._internalStorage.key(i); + if (key.indexOf(keyPrefix) === 0) { + keyList.push(key); + } + } + } + catch (e) { + } + return keyList; + }; + SafeStorage.prototype.isLocalStorageAvailable = function () { + return (this._internalStorage != null); + }; + return SafeStorage; + }()); + OfficeExt.SafeStorage = SafeStorage; +})(OfficeExt || (OfficeExt = {})); +OSF.XdmFieldName = { + ConversationUrl: "ConversationUrl", + AppId: "AppId" +}; +OSF.TestFlightStart = 1000; +OSF.TestFlightEnd = 1009; +OSF.FlightNames = { + UseOriginNotUrl: 0, + AddinEnforceHttps: 2, + FirstPartyAnonymousProxyReadyCheckTimeout: 6, + AddinRibbonIdAllowUnknown: 9, + ManifestParserDevConsoleLog: 15, + AddinActionDefinitionHybridMode: 18, + UseActionIdForUILessCommand: 20, + RequirementSetRibbonApiOnePointTwo: 21, + SetFocusToTaskpaneIsEnabled: 22, + ShortcutInfoArrayInUserPreferenceData: 23, + OSFTestFlight1000: OSF.TestFlightStart, + OSFTestFlight1001: OSF.TestFlightStart + 1, + OSFTestFlight1002: OSF.TestFlightStart + 2, + OSFTestFlight1003: OSF.TestFlightStart + 3, + OSFTestFlight1004: OSF.TestFlightStart + 4, + OSFTestFlight1005: OSF.TestFlightStart + 5, + OSFTestFlight1006: OSF.TestFlightStart + 6, + OSFTestFlight1007: OSF.TestFlightStart + 7, + OSFTestFlight1008: OSF.TestFlightStart + 8, + OSFTestFlight1009: OSF.TestFlightEnd +}; +OSF.TrustUXFlightValues = { + TrustUXControlA: 0, + TrustUXExperimentB: 1, + TrustUXExperimentC: 2 +}; +OSF.FlightTreatmentNames = { + AddinTrustUXImprovement: "Microsoft.Office.SharedOnline.AddinTrustUXImprovement", + BlockAutoOpenAddInIfStoreDisabled: "Microsoft.Office.SharedOnline.BlockAutoOpenAddInIfStoreDisabled", + Bug7083046KillSwitch: "Microsoft.Office.SharedOnline.Bug7083046KillSwitch", + CheckProxyIsReadyRetry: "Microsoft.Office.SharedOnline.OEP.CheckProxyIsReadyRetry", + InsertionDialogFixesEnabled: "Microsoft.Office.SharedOnline.InsertionDialogFixesEnabled", + WopiPreinstalledAddInsEnabled: "Microsoft.Office.SharedOnline.WopiPreinstalledAddInsEnabled", + WopiUseNewActivate: "Microsoft.Office.SharedOnline.WopiUseNewActivate", + MosManifestEnabled: "Microsoft.Office.SharedOnline.OEP.MosManifest", + RemoveGetTrustNoPrompt: "Microsoft.Office.SharedOnline.removeGetTrustNoPrompt", + HostTrustDialog: "Microsoft.Office.SharedOnline.HostTrustDialog", + AddinDetailsServiceSupportEnabled: "Microsoft.Office.SharedOnline.AddinDetailsServiceSupportEnabled", + GetAddinFlyoutEnabled: "Microsoft.Office.SharedOnline.GetAddinFlyoutEnabled", + BackstageEnabled: "Microsoft.Office.SharedOnline.NewBackstageEnabled", + EnablingWindowOpenUsageLogging: "Microsoft.Office.SharedOnline.EnablingWindowOpenUsageLogging" +}; +OSF.Flights = []; +OSF.IntFlights = {}; +OSF.Settings = {}; +OSF.WindowNameItemKeys = { + BaseFrameName: "baseFrameName", + HostInfo: "hostInfo", + XdmInfo: "xdmInfo", + SerializerVersion: "serializerVersion", + AppContext: "appContext", + Flights: "flights" +}; +OSF.OUtil = (function () { + var _uniqueId = -1; + var _xdmInfoKey = '&_xdm_Info='; + var _serializerVersionKey = '&_serializer_version='; + var _flightsKey = '&_flights='; + var _xdmSessionKeyPrefix = '_xdm_'; + var _serializerVersionKeyPrefix = '_serializer_version='; + var _flightsKeyPrefix = '_flights='; + var _fragmentSeparator = '#'; + var _fragmentInfoDelimiter = '&'; + var _classN = "class"; + var _loadedScripts = {}; + var _defaultScriptLoadingTimeout = 30000; + var _safeSessionStorage = null; + var _safeLocalStorage = null; + var _rndentropy = new Date().getTime(); + function _random() { + var nextrand = 0x7fffffff * (Math.random()); + nextrand ^= _rndentropy ^ ((new Date().getMilliseconds()) << Math.floor(Math.random() * (31 - 10))); + return nextrand.toString(16); + } + ; + function _getSessionStorage() { + if (!_safeSessionStorage) { + try { + var sessionStorage = window.sessionStorage; + } + catch (ex) { + sessionStorage = null; + } + _safeSessionStorage = new OfficeExt.SafeStorage(sessionStorage); + } + return _safeSessionStorage; + } + ; + function _reOrderTabbableElements(elements) { + var bucket0 = []; + var bucketPositive = []; + var i; + var len = elements.length; + var ele; + for (i = 0; i < len; i++) { + ele = elements[i]; + if (ele.tabIndex) { + if (ele.tabIndex > 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex === 0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive = bucketPositive.sort(function (left, right) { + var diff = left.tabIndex - right.tabIndex; + if (diff === 0) { + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + return { + set_entropy: function OSF_OUtil$set_entropy(entropy) { + if (typeof entropy == "string") { + for (var i = 0; i < entropy.length; i += 4) { + var temp = 0; + for (var j = 0; j < 4 && i + j < entropy.length; j++) { + temp = (temp << 8) + entropy.charCodeAt(i + j); + } + _rndentropy ^= temp; + } + } + else if (typeof entropy == "number") { + _rndentropy ^= entropy; + } + else { + _rndentropy ^= 0x7fffffff * Math.random(); + } + _rndentropy &= 0x7fffffff; + }, + extend: function OSF_OUtil$extend(child, parent) { + var F = function () { }; + F.prototype = parent.prototype; + child.prototype = new F(); + child.prototype.constructor = child; + child.uber = parent.prototype; + if (parent.prototype.constructor === Object.prototype.constructor) { + parent.prototype.constructor = parent; + } + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name] = {}; + } + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { + if (parent && name && parent[name]) { + delete parent[name]; + } + }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret = {}; + for (var key in settingsCollection) { + var value = settingsCollection[key]; + try { + if (JSON) { + value = JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret = {}; + serializedSettings = serializedSettings || {}; + for (var key in serializedSettings) { + var value = serializedSettings[key]; + try { + if (JSON) { + value = JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if (!_loadedScriptEntry) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + var onLoadTimeOut = function OSF_OUtil_loadScript$onLoadTimeOut() { + if (window.navigator.userAgent.indexOf("Trident") > 0) { + onLoadError(null); + } + else { + onLoadError(new Event("Script load timed out")); + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError(errorEvent) { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(errorEvent); + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadTimeOut, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) { + if (url) { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link); + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { + var parsed = enumObject[str.trim()]; + if (typeof (parsed) == 'undefined') { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed; + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { + var obj = { calc: arguments[0] }; + return function () { + if (obj.calc) { + obj.val = obj.calc.apply(this, arguments); + delete obj.calc; + } + return obj.val; + }; + }, + getUniqueId: function OSF_OUtil$getUniqueId() { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString(); + }, + formatString: function OSF_OUtil$formatString() { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10) + 1; + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }, + generateConversationId: function OSF_OUtil$generateConversationId() { + return [_random(), _random(), (new Date()).getTime().toString()].join('_'); + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId(); + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { + return OSF.OUtil.addInfoAsHash(url, _xdmInfoKey, xdmInfoValue, false); + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) { + return OSF.OUtil.addInfoAsHash(url, _serializerVersionKey, serializerVersion, true); + }, + addFlightsAsHash: function OSF_OUtil$addFlightsAsHash(url, flights) { + return OSF.OUtil.addInfoAsHash(url, _flightsKey, flights, true); + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) { + url = url.trim() || ''; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if (encodeInfo) { + newFragment = [keyName, encodeURIComponent(infoValue), fragment].join(''); + } + else { + newFragment = [fragment, keyName, infoValue].join(''); + } + return [urlWithoutFragment, _fragmentSeparator, newFragment].join(''); + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.HostInfo); + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.XdmInfo); + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.SerializerVersion)); + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseFlights: function OSF_OUtil$parseFlights(skipSessionStorage) { + var flights = OSF.OUtil.parseFlightsWithGivenFragment(skipSessionStorage, window.location.hash); + if (flights.length == 0) { + flights = OSF.OUtil.parseFlightsFromWindowName(skipSessionStorage, window.name); + } + return flights; + }, + checkFlight: function OSF_OUtil$checkFlightEnabled(flight) { + return OSF.Flights && OSF.Flights.indexOf(flight) >= 0; + }, + pushFlight: function OSF_OUtil$pushFlight(flight) { + if (OSF.Flights.indexOf(flight) < 0) { + OSF.Flights.push(flight); + return true; + } + return false; + }, + getBooleanSetting: function OSF_OUtil$getSetting(settingName) { + return OSF.OUtil.getBooleanFromDictionary(OSF.Settings, settingName); + }, + getBooleanFromDictionary: function OSF_OUtil$getBooleanFromDictionary(settings, settingName) { + var result = (settings && settingName && settings[settingName] !== undefined && settings[settingName] && + ((typeof (settings[settingName]) === "string" && settings[settingName].toUpperCase() === 'TRUE') || + (typeof (settings[settingName]) === "boolean" && settings[settingName]))); + return result !== undefined ? result : false; + }, + getIntFromDictionary: function OSF_OUtil$getIntFromDictionary(settings, settingName) { + if (settings && settingName && settings[settingName] !== undefined && (typeof settings[settingName] === "string")) { + return parseInt(settings[settingName]); + } + else { + return NaN; + } + }, + pushIntFlight: function OSF_OUtil$pushIntFlight(flight, flightValue) { + if (!(flight in OSF.IntFlights)) { + OSF.IntFlights[flight] = flightValue; + return true; + } + return false; + }, + getIntFlight: function OSF_OUtil$getIntFlight(flight) { + if (OSF.IntFlights && (flight in OSF.IntFlights)) { + return OSF.IntFlights[flight]; + } + else { + return NaN; + } + }, + parseFlightsFromWindowName: function OSF_OUtil$parseFlightsFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.Flights)); + }, + parseFlightsWithGivenFragment: function OSF_OUtil$parseFlightsWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(_flightsKey, _flightsKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseArrayWithDefault: function OSF_OUtil$parseArrayWithDefault(jsonString) { + var array = []; + try { + array = JSON.parse(jsonString); + } + catch (ex) { } + if (!Array.isArray(array)) { + array = []; + } + return array; + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj != null) { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue != null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >= 0) { + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue = decodeURIComponent(infoValue); + } + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd = window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd == -1) { + sessionKeyEnd = window.name.length; + } + var sessionKey = window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString = window.location.search; + var conversationId = null; + if (searchString) { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1) === '=') { + conversationId = conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId = decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) { + var items = strInfo.split("$"); + if (typeof items[1] == "undefined") { + items = strInfo.split("|"); + } + if (typeof items[1] == "undefined") { + items = strInfo.split("%7C"); + } + return items; + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue = ''; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if (items != undefined && items.length >= 3) { + switch (xdmFieldName) { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break; + } + } + } + return fieldValue; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e = Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) + throw e; + for (var p in expectedProperties) { + e = Function._validateParameter(params[p], expectedProperties[p], p); + if (e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) { + if (typeof (OsfMsAjaxFactory) !== 'undefined' && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) { + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor = descriptor || {}; + for (var nd in attributes) { + var attribute = attributes[nd]; + if (descriptor[attribute] == undefined) { + descriptor[attribute] = true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors = descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for (var i = 0; i < propsLength; i++) { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable = descriptor.writable || false; + } + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret = []; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key == item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value == list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add = list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key] = value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2] = newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj) === "[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj) === "[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj) === "[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.attachEvent) { + element.attachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.detachEvent) { + element.detachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = null; + } + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) { + var xmlhttp; + try { + xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function () { + if (xmlhttp.readyState == 4) { + if (xmlhttp.status == 200) { + onSuccess(xmlhttp.responseText); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + if (!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, c2, c3, a, b, c; + var i; + var length = input.length; + do { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + if (!isNaN(c2)) { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + } + if (isNaN(c2)) { + temp[i - 1] = 64; + } + else if (isNaN(c3)) { + temp[i - 2] = 64; + temp[i - 1] = 64; + } + for (var t = 0; t < i; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getSessionStorage: function OSF_Outil$getSessionStorage() { + return _getSessionStorage(); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage = window.localStorage; + } + catch (ex) { + localStorage = null; + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage); + } + return _safeLocalStorage; + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) { + var hex = "#" + (Number(val) + 0x1000000).toString(16).slice(-6); + return hex; + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) { + element.onclick = function (e) { + handler(); + }; + element.ontouchend = function (e) { + handler(); + e.preventDefault(); + }; + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) { + var e = Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: false }, + { name: "paramName", type: String, mayBeNull: false } + ]); + if (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return ""; + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)", "i"); + if (!queryExp.test(queryString)) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return ""; + } + return queryExp.exec(queryString)[1]; + }, + getHostnamePortionForLogging: function OSF_Outil$getHostnamePortionForLogging(hostname) { + var e = Function._validateParams(arguments, [{ name: "hostname", type: String, mayBeNull: false } + ]); + if (e) { + return ""; + } + var hostnameSubstrings = hostname.split('.'); + var len = hostnameSubstrings.length; + if (len >= 2) { + return hostnameSubstrings[len - 2] + "." + hostnameSubstrings[len - 1]; + } + else if (len == 1) { + return hostnameSubstrings[0]; + } + }, + isiOS: function OSF_Outil$isiOS() { + return (window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false); + }, + isChrome: function OSF_Outil$isChrome() { + return (window.navigator.userAgent.indexOf("Chrome") > 0) && !OSF.OUtil.isEdge(); + }, + isEdge: function OSF_Outil$isEdge() { + return window.navigator.userAgent.indexOf("Edge") > 0; + }, + isIE: function OSF_Outil$isIE() { + return window.navigator.userAgent.indexOf("Trident") > 0; + }, + isFirefox: function OSF_Outil$isFirefox() { + return window.navigator.userAgent.indexOf("Firefox") > 0; + }, + startsWith: function OSF_Outil$startsWith(originalString, patternToCheck, browserIsIE) { + if (browserIsIE) { + return originalString.substr(0, patternToCheck.length) === patternToCheck; + } + else { + return originalString.startsWith(patternToCheck); + } + }, + containsPort: function OSF_Outil$containsPort(url, protocol, hostname, portNumber) { + return this.startsWith(url, protocol + "//" + hostname + ":" + portNumber, true) || this.startsWith(url, hostname + ":" + portNumber, true); + }, + getRedundandPortString: function OSF_Outil$getRedundandPortString(url, parser) { + if (!url || !parser) + return ""; + if (parser.protocol == "https:" && this.containsPort(url, "https:", parser.hostname, "443")) + return ":443"; + else if (parser.protocol == "http:" && this.containsPort(url, "http:", parser.hostname, "80")) + return ":80"; + return ""; + }, + removeChar: function OSF_Outil$removeChar(url, indexOfCharToRemove) { + if (indexOfCharToRemove < url.length - 1) + return url.substring(0, indexOfCharToRemove) + url.substring(indexOfCharToRemove + 1); + else if (indexOfCharToRemove == url.length - 1) + return url.substring(0, url.length - 1); + else + return url; + }, + cleanUrlOfChar: function OSF_Outil$cleanUrlOfChar(url, charToClean) { + var i; + for (i = 0; i < url.length; i++) { + if (url.charAt(i) === charToClean) { + if (i + 1 >= url.length) { + return this.removeChar(url, i); + } + else if (charToClean === '/') { + if (url.charAt(i + 1) === '?' || url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + else if (charToClean === '?') { + if (url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + } + } + return url; + }, + cleanUrl: function OSF_Outil$cleanUrl(url) { + url = this.cleanUrlOfChar(url, '/'); + url = this.cleanUrlOfChar(url, '?'); + url = this.cleanUrlOfChar(url, '#'); + if (url.substr(0, 8) == "https://") { + var portIndex = url.indexOf(":443"); + if (portIndex != -1) { + if (portIndex == url.length - 4 || url.charAt(portIndex + 4) == "/" || url.charAt(portIndex + 4) == "?" || url.charAt(portIndex + 4) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 4); + } + } + } + else if (url.substr(0, 7) == "http://") { + var portIndex = url.indexOf(":80"); + if (portIndex != -1) { + if (portIndex == url.length - 3 || url.charAt(portIndex + 3) == "/" || url.charAt(portIndex + 3) == "?" || url.charAt(portIndex + 3) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 3); + } + } + } + return url; + }, + parseUrl: function OSF_Outil$parseUrl(url, enforceHttps) { + if (enforceHttps === void 0) { + enforceHttps = false; + } + if (typeof url === "undefined" || !url) { + return undefined; + } + var notHttpsErrorMessage = "NotHttps"; + var invalidUrlErrorMessage = "InvalidUrl"; + var isIEBoolean = this.isIE(); + var parsedUrlObj = { + protocol: undefined, + hostname: undefined, + host: undefined, + port: undefined, + pathname: undefined, + search: undefined, + hash: undefined, + isPortPartOfUrl: undefined + }; + try { + if (isIEBoolean) { + var parser = document.createElement("a"); + parser.href = url; + if (!parser || !parser.protocol || !parser.host || !parser.hostname || !parser.href + || this.cleanUrl(parser.href).toLowerCase() !== this.cleanUrl(url).toLowerCase()) { + throw invalidUrlErrorMessage; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && parser.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + var redundandPortString = this.getRedundandPortString(url, parser); + parsedUrlObj.protocol = parser.protocol; + parsedUrlObj.hostname = parser.hostname; + parsedUrlObj.port = (redundandPortString == "") ? parser.port : ""; + parsedUrlObj.host = (redundandPortString != "") ? parser.hostname : parser.host; + parsedUrlObj.pathname = (isIEBoolean ? "/" : "") + parser.pathname; + parsedUrlObj.search = parser.search; + parsedUrlObj.hash = parser.hash; + parsedUrlObj.isPortPartOfUrl = this.containsPort(url, parser.protocol, parser.hostname, parser.port); + } + else { + var urlObj = new URL(url); + if (urlObj && urlObj.protocol && urlObj.host && urlObj.hostname) { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && urlObj.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + parsedUrlObj.protocol = urlObj.protocol; + parsedUrlObj.hostname = urlObj.hostname; + parsedUrlObj.port = urlObj.port; + parsedUrlObj.host = urlObj.host; + parsedUrlObj.pathname = urlObj.pathname; + parsedUrlObj.search = urlObj.search; + parsedUrlObj.hash = urlObj.hash; + parsedUrlObj.isPortPartOfUrl = urlObj.host.lastIndexOf(":" + urlObj.port) == (urlObj.host.length - urlObj.port.length - 1); + } + } + } + catch (err) { + if (err.message === notHttpsErrorMessage) + throw err; + } + return parsedUrlObj; + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) { + if (sourceObj == null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr = []; + for (var i = 0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj = sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property] = sourceObj[property]; + } + } + return copyObj; + } + }, + createObject: function OSF_Outil$createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + }, + addClass: function OSF_OUtil$addClass(elmt, val) { + if (!OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + if (className) { + elmt.setAttribute(_classN, className + " " + val); + } + else { + elmt.setAttribute(_classN, val); + } + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) { + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findNextPos = function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && backward) { + return -1; + } + else if (currPos === allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if (all.length === 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, backward); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findCurrPos = function (all, curr) { + var i = 0; + for (; i < all.length; i++) { + if (all[i] === curr) { + return i; + } + } + return -1; + }; + var findNextPos = function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && shift) { + return -1; + } + else if (currPos === allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all, curr); + next = findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, shift); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + isNullOrUndefined: function OSF_OUtil$isNullOrUndefined(value) { + if (typeof (value) === "undefined") { + return true; + } + if (value === null) { + return true; + } + return false; + }, + stringEndsWith: function OSF_OUtil$stringEndsWith(value, subString) { + if (!OSF.OUtil.isNullOrUndefined(value) && !OSF.OUtil.isNullOrUndefined(subString)) { + if (subString.length > value.length) { + return false; + } + if (value.substr(value.length - subString.length) === subString) { + return true; + } + } + return false; + }, + hashCode: function OSF_OUtil$hashCode(str) { + var hash = 0; + if (!OSF.OUtil.isNullOrUndefined(str)) { + var i = 0; + var len = str.length; + while (i < len) { + hash = (hash << 5) - hash + str.charCodeAt(i++) | 0; + } + } + return hash; + }, + getValue: function OSF_OUtil$getValue(value, defaultValue) { + if (OSF.OUtil.isNullOrUndefined(value)) { + return defaultValue; + } + return value; + }, + externalNativeFunctionExists: function OSF_OUtil$externalNativeFunctionExists(type) { + return type === 'unknown' || type !== 'undefined'; + } + }; +})(); +OSF.OUtil.Guid = (function () { + var hexCode = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result = ""; + var tick = (new Date()).getTime(); + var index = 0; + for (; index < 32 && tick > 0; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + }; +})(); +try { + (function () { + OSF.Flights = OSF.OUtil.parseFlights(true); + })(); +} +catch (ex) { } +window.OSF = OSF; +OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614, + Visio: 8388615, + OneNoteAndroid: 4194305 +}; +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +}; +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +}; +OSF.AgaveHostAction = { + "Select": 0, + "UnSelect": 1, + "CancelDialog": 2, + "InsertAgave": 3, + "CtrlF6In": 4, + "CtrlF6Exit": 5, + "CtrlF6ExitShift": 6, + "SelectWithError": 7, + "NotifyHostError": 8, + "RefreshAddinCommands": 9, + "PageIsReady": 10, + "TabIn": 11, + "TabInShift": 12, + "TabExit": 13, + "TabExitShift": 14, + "EscExit": 15, + "F2Exit": 16, + "ExitNoFocusable": 17, + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20, + "UpdateTargetUrl": 21, + "InstallCustomFunctions": 22, + "SendTelemetryEvent": 23, + "UninstallCustomFunctions": 24, + "SendMessage": 25, + "LaunchExtensionComponent": 26, + "StopExtensionComponent": 27, + "RestartExtensionComponent": 28, + "EnableTaskPaneHeaderButton": 29, + "DisableTaskPaneHeaderButton": 30, + "TaskPaneHeaderButtonClicked": 31, + "RemoveAppCommandsAddin": 32, + "RefreshRibbonGallery": 33, + "GetOriginalControlId": 34, + "OfficeJsReady": 35, + "InsertDevManifest": 36, + "InsertDevManifestError": 37, + "SendCustomerContent": 38, + "KeyboardShortcuts": 39 +}; +OSF.SharedConstants = { + "NotificationConversationIdSuffix": '_ntf' +}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix, featureGates, officeTheme, initialDisplayMode) { + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this._featureGates = featureGates; + this._officeTheme = officeTheme; + this._initialDisplayMode = initialDisplayMode; + this.get_id = function get_id() { return this._id; }; + this.get_appName = function get_appName() { return this._appName; }; + this.get_appVersion = function get_appVersion() { return this._appVersion; }; + this.get_appUILocale = function get_appUILocale() { return this._appUILocale; }; + this.get_dataLocale = function get_dataLocale() { return this._dataLocale; }; + this.get_docUrl = function get_docUrl() { return this._docUrl; }; + this.get_clientMode = function get_clientMode() { return this._clientMode; }; + this.get_bindings = function get_bindings() { return this._bindings; }; + this.get_settings = function get_settings() { return this._settings; }; + this.get_reason = function get_reason() { return this._reason; }; + this.get_osfControlType = function get_osfControlType() { return this._osfControlType; }; + this.get_eToken = function get_eToken() { return this._eToken; }; + this.get_correlationId = function get_correlationId() { return this._correlationId; }; + this.get_appInstanceId = function get_appInstanceId() { return this._appInstanceId; }; + this.get_touchEnabled = function get_touchEnabled() { return this._touchEnabled; }; + this.get_commerceAllowed = function get_commerceAllowed() { return this._commerceAllowed; }; + this.get_appMinorVersion = function get_appMinorVersion() { return this._appMinorVersion; }; + this.get_requirementMatrix = function get_requirementMatrix() { return this._requirementMatrix; }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() { return this._dialogRequirementMatrix; }; + this.get_hostCustomMessage = function get_hostCustomMessage() { return this._hostCustomMessage; }; + this.get_hostFullVersion = function get_hostFullVersion() { return this._hostFullVersion; }; + this.get_isDialog = function get_isDialog() { return this._isDialog; }; + this.get_clientWindowHeight = function get_clientWindowHeight() { return this._clientWindowHeight; }; + this.get_clientWindowWidth = function get_clientWindowWidth() { return this._clientWindowWidth; }; + this.get_addinName = function get_addinName() { return this._addinName; }; + this.get_appDomains = function get_appDomains() { return this._appDomains; }; + this.get_featureGates = function get_featureGates() { return this._featureGates; }; + this.get_officeTheme = function get_officeTheme() { return this._officeTheme; }; + this.get_initialDisplayMode = function get_initialDisplayMode() { return this._initialDisplayMode ? this._initialDisplayMode : 0; }; +}; +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 +}; +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 +}; +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Client", Microsoft.Office); +OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened", + ControlActivation: "controlActivation" +}; +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType = { + All: "all" +}; +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + JsonData: "jsonData", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + AllowConsentPrompt: "allowConsentPrompt", + ForMSGraphAccess: "forMSGraphAccess", + AllowSignInPrompt: "allowSignInPrompt", + JsonPayload: "jsonPayload", + EnableNewHosts: "enableNewHosts", + AccountTypeFilter: "accountTypeFilter", + AddinTrustId: "addinTrustId", + Reserved: "reserved", + Tcid: "tcid", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + PromptBeforeOpen: "promptBeforeOpen", + EnforceAppDomain: "enforceAppDomain", + UrlNoHostInfo: "urlNoHostInfo", + TargetOrigin: "targetOrigin", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64", + FormId: "formId" +}; +OSF.OUtil.setNamespace("DDA", OSF); +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 +}; +OSF.DDA.PropertyDescriptors = { + AsyncResultStatus: "AsyncResultStatus" +}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { + if (eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || + eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) { + return id + "_" + eventType; + } + else { + return eventType; + } +}; +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidGetAuthContextMethod: 99, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, + dispidInsertFormMethod: 106, + dispidDisplayRibbonCalloutAsyncMethod: 109, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidExecuteFeature: 146, + dispidQueryFeature: 147, + dispidGetNestedAppAuthContextMethod: 205, + dispidMethodMax: 205 +}; +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidOlkRecurrenceChangedEvent: 49, + dispidOlkAttachmentsChangedEvent: 50, + dispidOlkEnhancedLocationsChangedEvent: 51, + dispidOlkInfobarClickedEvent: 52, + dispidOlkSelectedItemsChangedEvent: 53, + dispidOlkSensitivityLabelChangedEvent: 54, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 +}; +OSF.DDA.ErrorCodeManager = (function () { + var _errorMappings = {}; + return { + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) { + var errorArgs = _errorMappings[errorCode]; + if (!errorArgs) { + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + } + else { + if (!errorArgs.name) { + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + } + if (!errorArgs.message) { + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message; + } + } + return errorArgs; + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) { + _errorMappings[errorCode] = errorNameMessage; + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1000, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2000, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3000, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4000, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5000, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeOperationCancelled: 5014, + ooeWorkbookHidden: 5015, + ooeWriteNotSupportedWhenModalDialogOpen: 5016, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeRequestPayloadSizeLimitExceeded: 5103, + ooeResponsePayloadSizeLimitExceeded: 5104, + ooeCustomXmlNodeNotFound: 6000, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7000, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8000, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11000, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12000, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeModalDialogOpen: 12012, + ooeDocumentIsInactive: 12013, + ooeDialogParentIsMinimized: 12014, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010, + ooeResourceNotAllowed: 13011, + ooeSSOUnsupportedPlatform: 13012, + ooeSSOCallThrottled: 13013, + ooeAccessDenied: 13990, + ooeGeneralException: 13991 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidReadForBlankRow }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnMatrixData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { name: stringNS.L_InvalidBinding, message: stringNS.L_InvalidColumnsForBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { name: stringNS.L_SaveSettingsError, message: stringNS.L_SettingsCannotSave }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { name: stringNS.L_SettingsStaleError, message: stringNS.L_SettingsAreStale }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { name: stringNS.L_HostError, message: stringNS.L_OperationNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { name: stringNS.L_InternalError, message: stringNS.L_InternalErrorDescription }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { name: stringNS.L_PermissionDenied, message: stringNS.L_DocumentReadOnly }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { name: stringNS.L_EventRegistrationError, message: stringNS.L_EventHandlerNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { name: stringNS.L_InvalidAPICall, message: stringNS.L_InvalidApiCallInContext }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { name: stringNS.L_ShuttingDown, message: stringNS.L_ShuttingDown }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { name: stringNS.L_UnsupportedEnumeration, message: stringNS.L_UnsupportedEnumerationMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden] = { name: stringNS.L_APICallFailed, message: stringNS.L_WorkbookHiddenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen] = { name: stringNS.L_APICallFailed, message: stringNS.L_WriteNotSupportedWhenModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestPayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_ResponsePayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { name: stringNS.L_CustomXmlOutOfDateName, message: stringNS.L_CustomXmlOutOfDateMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { name: stringNS.L_CannotNavigateTo, message: stringNS.L_CannotNavigateTo }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { name: stringNS.L_SpecifiedIdNotExist, message: stringNS.L_SpecifiedIdNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { name: stringNS.L_NavOutOfBound, message: stringNS.L_NavOutOfBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { name: stringNS.L_DataWriteReminder, message: stringNS.L_CellDataAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { name: stringNS.L_MissingParameter, message: stringNS.L_ElementMissing }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidCellsValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidTableOptionValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidFormatValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_RowIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_ColIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_FormatValueOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { name: stringNS.L_FormattingReminder, message: stringNS.L_CellFormatAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { name: stringNS.L_MemoryLimit, message: stringNS.L_CloseFileBeforeRetrieve }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { name: stringNS.L_NetworkProblem, message: stringNS.L_NetworkProblemRetrieveFile }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { name: stringNS.L_InvalidValue, message: stringNS.L_SliceSizeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAlreadyOpened }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NetworkProblem }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { name: stringNS.L_DialogNavigateError, message: stringNS.L_DialogInvalidScheme }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAddressNotTrusted }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_ModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DocumentIsInactive }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogParentIsMinimized }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform] = { name: stringNS.L_APINotSupported, message: stringNS.L_SSOUnsupportedPlatform }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled] = { name: stringNS.L_OperationCancelledError, message: stringNS.L_OperationCancelledErrorMessage }; + } + }; +})(); +(function (OfficeExt) { + var Requirement; + (function (Requirement) { + var RequirementVersion = (function () { + function RequirementVersion() { + } + return RequirementVersion; + }()); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = (function () { + function RequirementMatrix(_setMap) { + this.isSetSupported = function _isSetSupported(name, minVersion) { + if (name == undefined) { + return false; + } + if (minVersion == undefined) { + minVersion = 0; + } + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if (sets.hasOwnProperty(name.toLowerCase())) { + var setMaxVersion = sets[name.toLowerCase()]; + try { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.major > 0 && + setMaxVersionNum.minor >= 0 && + setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor >= minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion = function (version) { + version = version + ""; + var temp = version.split("."); + var major = 0; + var minor = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } + } + var result = { "minor": minor, "major": major }; + return result; + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this); + } + return RequirementMatrix; + }()); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = (function () { + function DefaultSetRequirement(setMap) { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) { + for (var name in addedSet) { + this._sets[name] = addedSet[name]; + } + }; + this._sets = setMap; + } + return DefaultSetRequirement; + }()); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultRequiredDialogSetRequirement = (function (_super) { + __extends(DefaultRequiredDialogSetRequirement, _super); + function DefaultRequiredDialogSetRequirement() { + return _super.call(this, { + "dialogapi": 1.1 + }) || this; + } + return DefaultRequiredDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultRequiredDialogSetRequirement = DefaultRequiredDialogSetRequirement; + var DefaultOptionalDialogSetRequirement = (function (_super) { + __extends(DefaultOptionalDialogSetRequirement, _super); + function DefaultOptionalDialogSetRequirement() { + return _super.call(this, { + "dialogorigin": 1.1 + }) || this; + } + return DefaultOptionalDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultOptionalDialogSetRequirement = DefaultOptionalDialogSetRequirement; + var ExcelClientDefaultSetRequirement = (function (_super) { + __extends(ExcelClientDefaultSetRequirement, _super); + function ExcelClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "excelapi": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = (function (_super) { + __extends(ExcelClientV1DefaultSetRequirement, _super); + function ExcelClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return ExcelClientV1DefaultSetRequirement; + }(ExcelClientDefaultSetRequirement)); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = (function (_super) { + __extends(OutlookClientDefaultSetRequirement, _super); + function OutlookClientDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = (function (_super) { + __extends(WordClientDefaultSetRequirement, _super); + function WordClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1, + "wordapi": 1.1 + }) || this; + } + return WordClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = (function (_super) { + __extends(WordClientV1DefaultSetRequirement, _super); + function WordClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2, + "imagecoercion": 1.1 + }); + return _this; + } + return WordClientV1DefaultSetRequirement; + }(WordClientDefaultSetRequirement)); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = (function (_super) { + __extends(PowerpointClientDefaultSetRequirement, _super); + function PowerpointClientDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = (function (_super) { + __extends(PowerpointClientV1DefaultSetRequirement, _super); + function PowerpointClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return PowerpointClientV1DefaultSetRequirement; + }(PowerpointClientDefaultSetRequirement)); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = (function (_super) { + __extends(ProjectClientDefaultSetRequirement, _super); + function ProjectClientDefaultSetRequirement() { + return _super.call(this, { + "selection": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ProjectClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = (function (_super) { + __extends(ExcelWebDefaultSetRequirement, _super); + function ExcelWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "file": 1.1 + }) || this; + } + return ExcelWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = (function (_super) { + __extends(WordWebDefaultSetRequirement, _super); + function WordWebDefaultSetRequirement() { + return _super.call(this, { + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "imagecoercion": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablecoercion": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = (function (_super) { + __extends(PowerpointWebDefaultSetRequirement, _super); + function PowerpointWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "settings": 1.1 + }) || this; + } + return PowerpointWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = (function (_super) { + __extends(OutlookWebDefaultSetRequirement, _super); + function OutlookWebDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = (function (_super) { + __extends(SwayWebDefaultSetRequirement, _super); + function SwayWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "documentevents": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return SwayWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = (function (_super) { + __extends(AccessWebDefaultSetRequirement, _super); + function AccessWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "partialtablebindings": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1 + }) || this; + } + return AccessWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = (function (_super) { + __extends(ExcelIOSDefaultSetRequirement, _super); + function ExcelIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = (function (_super) { + __extends(WordIOSDefaultSetRequirement, _super); + function WordIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = (function (_super) { + __extends(WordIOSV1DefaultSetRequirement, _super); + function WordIOSV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2 + }); + return _this; + } + return WordIOSV1DefaultSetRequirement; + }(WordIOSDefaultSetRequirement)); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = (function (_super) { + __extends(PowerpointIOSDefaultSetRequirement, _super); + function PowerpointIOSDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = (function (_super) { + __extends(OutlookIOSDefaultSetRequirement, _super); + function OutlookIOSDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.1 + }) || this; + } + return OutlookIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = (function () { + function RequirementsMatrixFactory() { + } + RequirementsMatrixFactory.initializeOsfDda = function () { + OSF.OUtil.setNamespace("Requirement", OSF.DDA); + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function (appContext) { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if (RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) { + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + } + else { + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})); + } + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function (appContext) { + var setRequirements = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + setRequirements = new DefaultSetRequirement(matrixItem); + } + else { + setRequirements = new DefaultRequiredDialogSetRequirement(); + var mainRequirement = appContext.get_requirementMatrix(); + if (mainRequirement != undefined && mainRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(mainRequirement.toLowerCase()); + for (var name in setRequirements._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + var dialogOptionalSetRequirement = new DefaultOptionalDialogSetRequirement(); + for (var name in dialogOptionalSetRequirement._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + } + } + return new RequirementMatrix(setRequirements); + }; + RequirementsMatrixFactory.getClientFullVersionString = function (appContext) { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || + appName == 4096 || + appName == 8192 || + appName == 65536; + if (isIOSClient && appContext.get_appVersion() == 1) { + if (appName == 4096 && appMinorVersion >= 15) { + appFullVersion = "16.00.01"; + } + else { + appFullVersion = "16.00"; + } + } + else if (appContext.get_appName() == 64) { + appFullVersion = appContext.get_appVersion(); + } + else { + if (appMinorVersion < 10) { + appMinorVersionString = "0" + appMinorVersion; + } + else { + appMinorVersionString = "" + appMinorVersion; + } + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString; + } + return appContext.get_appName() + "-" + appFullVersion; + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function () { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement(); + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory; + }()); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory; + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})); +})(OfficeExt || (OfficeExt = {})); +OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" +}; +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" +}; +OSF.NamespaceManager = (function OSF_NamespaceManager() { + var _userOffice; + var _useShortcut = false; + return { + enableShortcut: function OSF_NamespaceManager$enableShortcut() { + if (!_useShortcut) { + if (window.Office) { + _userOffice = window.Office; + } + else { + OSF.OUtil.setNamespace("Office", window); + } + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true; + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() { + if (_useShortcut) { + if (_userOffice) { + window.Office = _userOffice; + } + else { + OSF.OUtil.unsetNamespace("Office", window); + } + _useShortcut = false; + } + } + }; +})(); +OSF.NamespaceManager.enableShortcut(); +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { + if (useShortcut) { + OSF.NamespaceManager.enableShortcut(); + } + else { + OSF.NamespaceManager.disableShortcut(); + } +}; +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { + var promise; + if (str && typeof str == "string") { + var index = str.indexOf("#"); + if (index != -1) { + var op = str.substring(0, index); + var target = str.substring(index + 1); + switch (op) { + case "binding": + case "bindings": + if (target) { + promise = new OSF.DDA.BindingPromise(target); + } + break; + } + } + } + if (!promise) { + if (errorCallback) { + var callbackType = typeof errorCallback; + if (callbackType == "function") { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext, OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)); + } + else { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, callbackType); + } + } + } + else { + promise.onFail = errorCallback; + return promise; + } +}; +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { + OSF.OUtil.defineEnumerableProperties(this, { + "contentLanguage": { + value: officeAppContext.get_dataLocale() + }, + "displayLanguage": { + value: officeAppContext.get_appUILocale() + }, + "touchEnabled": { + value: officeAppContext.get_touchEnabled() + }, + "commerceAllowed": { + value: officeAppContext.get_commerceAllowed() + }, + "host": { + value: OfficeExt.HostName.Host.getInstance().getHost() + }, + "platform": { + value: OfficeExt.HostName.Host.getInstance().getPlatform() + }, + "isDialog": { + value: OSF._OfficeAppFactory.getHostInfo().isDialog + }, + "diagnostics": { + value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion()) + } + }); + if (license) { + OSF.OUtil.defineEnumerableProperty(this, "license", { + value: license + }); + } + if (officeAppContext.ui) { + OSF.OUtil.defineEnumerableProperty(this, "ui", { + value: officeAppContext.ui + }); + } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.webAuth) { + OSF.OUtil.defineEnumerableProperty(this, "webAuth", { + value: officeAppContext.webAuth + }); + } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } + if (officeAppContext.extensionLifeCycle) { + OSF.OUtil.defineEnumerableProperty(this, "extensionLifeCycle", { + value: officeAppContext.extensionLifeCycle + }); + } + if (officeAppContext.messaging) { + OSF.OUtil.defineEnumerableProperty(this, "messaging", { + value: officeAppContext.messaging + }); + } + if (officeAppContext.ui && officeAppContext.ui.taskPaneAction) { + OSF.OUtil.defineEnumerableProperty(this, "taskPaneAction", { + value: officeAppContext.ui.taskPaneAction + }); + } + if (officeAppContext.ui && officeAppContext.ui.ribbonGallery) { + OSF.OUtil.defineEnumerableProperty(this, "ribbonGallery", { + value: officeAppContext.ui.ribbonGallery + }); + } + if (officeAppContext.get_isDialog()) { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } + else { + if (document) { + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: document + }); + } + if (appOM) { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this, displayName, { + value: appOM + }); + } + if (officeAppContext.get_officeTheme()) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return officeAppContext.get_officeTheme(); + } + }); + } + else if (getOfficeTheme) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return getOfficeTheme(); + } + }); + } + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + if (officeAppContext.get_featureGates) { + var featureGates = officeAppContext.get_featureGates(); + if (featureGates && featureGates["EnablePublicThemeManager"]) { + var themeManager = new OSF.DDA.Theming.InternalThemeHandler(); + themeManager.InitializeThemeManager(); + OSF.OUtil.defineEnumerableProperty(this, "themeManager", { + value: themeManager + }); + } + } + } +}; +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { + OSF.DDA.OutlookContext.uber.constructor.call(this, appContext, null, license, appOM, getOfficeTheme); + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "roamingSettings", { + value: settings + }); + } + if (appContext.sensitivityLabelsCatalog) { + OSF.OUtil.defineEnumerableProperty(this, "sensitivityLabelsCatalog", { + value: appContext.sensitivityLabelsCatalog() + }); + } +}; +OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { + var mode; + switch (officeAppContext.get_clientMode()) { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break; + } + ; + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "settings", { + value: settings + }); + } + ; + OSF.OUtil.defineMutableProperties(this, { + "mode": { + value: mode + }, + "url": { + value: officeAppContext.get_docUrl() + } + }); +}; +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { + OSF.DDA.JsomDocument.uber.constructor.call(this, officeAppContext, settings); + if (bindingFacade) { + OSF.OUtil.defineEnumerableProperty(this, "bindings", { + get: function OSF_DDA_Document$GetBindings() { return bindingFacade; } + }); + } + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetSelectedDataAsync, + am.SetSelectedDataAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])); +}; +OSF.OUtil.extend(OSF.DDA.JsomDocument, OSF.DDA.Document); +OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension, "context", { + get: function Microsoft_Office_WebExtension$GetContext() { + var context; + if (OSF && OSF._OfficeAppFactory) { + context = OSF._OfficeAppFactory.getContext(); + } + return context; + } +}); +OSF.DDA.License = function OSF_DDA_License(eToken) { + OSF.OUtil.defineEnumerableProperty(this, "value", { + value: eToken + }); +}; +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function () { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, displayName); + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) { + for (var name in params) { + var param = params[name]; + var arg = args[name]; + if (param["enum"]) { + switch (typeof arg) { + case "string": + if (OSF.OUtil.listContainsValue(param["enum"], arg)) { + break; + } + case "undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + } + if (param["types"]) { + if (!OSF.OUtil.listContainsValue(param["types"], typeof arg)) { + throw getInvalidParameterString(); + } + } + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) { + if (userArgs.length < requiredCount) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + } + var requiredArgs = []; + var index; + for (index = 0; index < requiredCount; index++) { + requiredArgs.push(userArgs[index]); + } + this.verifyArguments(requiredParameters, requiredArgs); + var ret = {}; + for (index = 0; index < requiredCount; index++) { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if (param.verify) { + var isValid = param.verify(arg, caller, stateInfo); + if (!isValid) { + throw getInvalidParameterString(); + } + } + ret[param.name] = arg; + } + return ret; + }, + this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) { + options = options || {}; + for (var optionName in supportedOptions) { + if (!OSF.OUtil.listContainsKey(options, optionName)) { + var value = undefined; + var option = supportedOptions[optionName]; + if (option.calculate && requiredArgs) { + value = option.calculate(requiredArgs, caller, stateInfo); + } + if (!value && option.defaultValue !== undefined) { + value = option.defaultValue; + } + options[optionName] = value; + } + } + return options; + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) { + var callArgs = {}; + for (var r in required) { + callArgs[r] = required[r]; + } + for (var o in options) { + callArgs[o] = options[o]; + } + for (var s in privateStateCallbacks) { + callArgs[s] = privateStateCallbacks[s](caller, stateInfo); + } + if (checkCallArgs) { + callArgs = checkCallArgs(callArgs, caller, stateInfo); + } + return callArgs; + }; +}; +OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" +}; +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" +}; +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 +}; +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" +}; +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.AsyncMethodNames[entry] = am; + } +}; +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 2) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + case "function": + if (parameterCallback) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + } + else { + parameterCallback = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + if (parameterCallback) { + if (options[Microsoft.Office.WebExtension.Parameters.Callback]) { + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + } + else { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + } + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (onSucceeded) { + payload = onSucceeded(response, caller, callArgs); + } + else { + payload = response; + } + } + else { + if (onFailed) { + payload = onFailed(status, response); + } + else { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + } + return payload; + }; + this.getCallArgs = function (suppliedArgs) { + var options, parameterCallback; + for (var i = suppliedArgs.length - 1; i >= requiredCount; i--) { + var argument = suppliedArgs[i]; + switch (typeof argument) { + case "object": + options = argument; + break; + case "function": + parameterCallback = argument; + break; + } + } + options = options || {}; + if (parameterCallback) { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + return options; + }; +}; +OSF.DDA.AsyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [], supportedOptions, privateStateCallbacks, params.onSucceeded, params.onFailed, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function (callDefinition) { + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { + OSF.OUtil.defineEnumerableProperties(this, { + "name": { + value: name + }, + "message": { + value: message + }, + "code": { + value: code + } + }); +}; +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { + OSF.OUtil.defineEnumerableProperties(this, { + "value": { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value] + }, + "status": { + value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded + } + }); + if (initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) { + OSF.OUtil.defineEnumerableProperty(this, "asyncContext", { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context] + }); + } + if (errorArgs) { + OSF.OUtil.defineEnumerableProperty(this, "error", { + value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + }); + } +}; +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if (callback) { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + } + else { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs, errorArgs)); + } +}; +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.SyncMethodNames[entry] = am; + } +}; +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 1) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; +}; +OSF.DDA.SyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [], supportedOptions, params.privateStateCallbacks, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function (callDefinition) { + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.ListType = (function () { + var listTypes = {}; + return { + setListType: function OSF_DDA_ListType$AddListType(t, prop) { listTypes[t] = prop; }, + isListType: function OSF_DDA_ListType$IsListType(t) { return OSF.OUtil.listContainsKey(listTypes, t); }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) { return listTypes[t]; } + }; +})(); +OSF.DDA.HostParameterMap = function (specialProcessor, mappings) { + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function (data) { + if (data != null && data.rows !== undefined) { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData; + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.JsonData] = { + toHost: function (data) { return data; }, + fromHost: function (data) { return typeof data === "string" ? JSON.parse(data) : data; } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) { + var ret = preimageSet ? {} : undefined; + for (var entry in preimageSet) { + var preimage = preimageSet[entry]; + var image; + if (OSF.DDA.ListType.isListType(entry)) { + image = []; + for (var subEntry in preimage) { + image.push(mapValues(preimage[subEntry], mapping)); + } + } + else if (OSF.OUtil.listContainsKey(dynamicTypes, entry)) { + image = dynamicTypes[entry][mapping](preimage); + } + else if (mapping == fromHostMap && specialProcessor.preserveNesting(entry)) { + image = mapValues(preimage, mapping); + } + else { + var maps = mappings[entry]; + if (maps) { + var map = maps[mapping]; + if (map) { + image = map[preimage]; + if (image === undefined) { + image = preimage; + } + } + } + else { + image = preimage; + } + } + ret[entry] = image; + } + return ret; + } + ; + function generateArguments(imageSet, parameters) { + var ret; + for (var param in parameters) { + var arg; + if (specialProcessor.isComplexType(param)) { + arg = generateArguments(imageSet, mappings[param][toHostMap]); + } + else { + arg = imageSet[param]; + } + if (arg != undefined) { + if (!ret) { + ret = {}; + } + var index = parameters[param]; + if (index == self) { + index = param; + } + ret[index] = specialProcessor.pack(param, arg); + } + } + return ret; + } + ; + function extractArguments(source, parameters, extracted) { + if (!extracted) { + extracted = {}; + } + for (var param in parameters) { + var index = parameters[param]; + var value; + if (index == self) { + value = source; + } + else if (index == sourceData) { + extracted[param] = source.toArray(); + continue; + } + else { + value = source[index]; + } + if (value === null || value === undefined) { + extracted[param] = undefined; + } + else { + value = specialProcessor.unpack(param, value); + var map; + if (specialProcessor.isComplexType(param)) { + map = mappings[param][fromHostMap]; + if (specialProcessor.preserveNesting(param)) { + extracted[param] = extractArguments(value, map); + } + else { + extractArguments(value, map, extracted); + } + } + else { + if (OSF.DDA.ListType.isListType(param)) { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for (var item in value) { + extractedValues[item] = extractArguments(value[item], map); + } + extracted[param] = extractedValues; + } + else { + extracted[param] = value; + } + } + } + } + return extracted; + } + ; + function applyMap(mapName, preimage, mapping) { + var parameters = mappings[mapName][mapping]; + var image; + if (mapping == "toHost") { + var imageSet = mapValues(preimage, mapping); + image = generateArguments(imageSet, parameters); + } + else if (mapping == "fromHost") { + var argumentSet = extractArguments(preimage, parameters); + image = mapValues(argumentSet, mapping); + } + return image; + } + ; + if (!mappings) { + mappings = {}; + } + this.addMapping = function (mapName, description) { + var toHost, fromHost; + if (description.map) { + toHost = description.map; + fromHost = {}; + for (var preimage in toHost) { + var image = toHost[preimage]; + if (image == self) { + image = preimage; + } + fromHost[image] = preimage; + } + } + else { + toHost = description.toHost; + fromHost = description.fromHost; + } + var pair = mappings[mapName]; + if (pair) { + var currMap = pair[toHostMap]; + for (var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for (var fh in currMap) + fromHost[fh] = currMap[fh]; + } + else { + pair = mappings[mapName] = {}; + } + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost; + }; + this.toHost = function (mapName, preimage) { return applyMap(mapName, preimage, toHostMap); }; + this.fromHost = function (mapName, image) { return applyMap(mapName, image, fromHostMap); }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function (ct) { specialProcessor.addComplexType(ct); }; + this.getDynamicType = function (dt) { return specialProcessor.getDynamicType(dt); }; + this.setDynamicType = function (dt, handler) { specialProcessor.setDynamicType(dt, handler); }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function (preimageSet, mapping) { return mapValues(preimageSet, mapping); }; +}; +OSF.DDA.SpecialProcessor = function (complexTypes, dynamicTypes) { + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) { + complexTypes.push(ct); + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) { + return dynamicTypes[dt]; + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) { + dynamicTypes[dt] = handler; + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) { + return OSF.OUtil.listContainsValue(complexTypes, t); + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) { + return OSF.OUtil.listContainsKey(dynamicTypes, p); + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) { + var pn = []; + if (OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if (OSF.DDA.DataNodeEventProperties) { + pn = pn.concat([ + OSF.DDA.DataNodeEventProperties.OldNode, + OSF.DDA.DataNodeEventProperties.NewNode, + OSF.DDA.DataNodeEventProperties.NextSiblingNode + ]); + } + return OSF.OUtil.listContainsValue(pn, p); + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].toHost(arg); + } + else { + value = arg; + } + return value; + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.DDA.getDecoratedParameterMap = function (specialProcessor, initialDefs) { + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + } + parameterMap.define = function define(definition) { + var args = {}; + var toHost = createObject(definition.toHost); + if (definition.invertible) { + args.map = toHost; + } + else if (definition.canonical) { + args.toHost = args.fromHost = toHost; + } + else { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost); + } + parameterMap.addMapping(definition.type, args); + if (definition.isComplexType) + parameterMap.addComplexType(definition.type); + }; + for (var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap; +}; +OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + "GoToByIdAsync": did.dispidNavigateToMethod, + "GetSelectedDataAsync": did.dispidGetSelectedDataMethod, + "SetSelectedDataAsync": did.dispidSetSelectedDataMethod, + "GetDocumentCopyChunkAsync": did.dispidGetDocumentCopyChunkMethod, + "ReleaseDocumentCopyAsync": did.dispidReleaseDocumentCopyMethod, + "GetDocumentCopyAsync": did.dispidGetDocumentCopyMethod, + "AddFromSelectionAsync": did.dispidAddBindingFromSelectionMethod, + "AddFromPromptAsync": did.dispidAddBindingFromPromptMethod, + "AddFromNamedItemAsync": did.dispidAddBindingFromNamedItemMethod, + "GetAllAsync": did.dispidGetAllBindingsMethod, + "GetByIdAsync": did.dispidGetBindingMethod, + "ReleaseByIdAsync": did.dispidReleaseBindingMethod, + "GetDataAsync": did.dispidGetBindingDataMethod, + "SetDataAsync": did.dispidSetBindingDataMethod, + "AddRowsAsync": did.dispidAddRowsMethod, + "AddColumnsAsync": did.dispidAddColumnsMethod, + "DeleteAllDataValuesAsync": did.dispidClearAllRowsMethod, + "RefreshAsync": did.dispidLoadSettingsMethod, + "SaveAsync": did.dispidSaveSettingsMethod, + "GetActiveViewAsync": did.dispidGetActiveViewMethod, + "GetFilePropertiesAsync": did.dispidGetFilePropertiesMethod, + "GetOfficeThemeAsync": did.dispidGetOfficeThemeMethod, + "GetDocumentThemeAsync": did.dispidGetDocumentThemeMethod, + "ClearFormatsAsync": did.dispidClearFormatsMethod, + "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, + "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, + "GetAuthContextAsync": did.dispidGetAuthContextMethod, + "GetNestedAppAuthContextAsync": did.dispidGetNestedAppAuthContextMethod, + "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, + "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, + "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, + "InsertFormAsync": did.dispidInsertFormMethod, + "ExecuteFeature": did.dispidExecuteFeature, + "QueryFeature": did.dispidQueryFeature, + "AddDataPartAsync": did.dispidAddDataPartMethod, + "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, + "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, + "GetPartXmlAsync": did.dispidGetDataPartXmlMethod, + "GetPartNodesAsync": did.dispidGetDataPartNodesMethod, + "DeleteDataPartAsync": did.dispidDeleteDataPartMethod, + "GetNodeValueAsync": did.dispidGetDataNodeValueMethod, + "GetNodeXmlAsync": did.dispidGetDataNodeXmlMethod, + "GetRelativeNodesAsync": did.dispidGetDataNodesMethod, + "SetNodeValueAsync": did.dispidSetDataNodeValueMethod, + "SetNodeXmlAsync": did.dispidSetDataNodeXmlMethod, + "AddDataPartNamespaceAsync": did.dispidAddDataNamespaceMethod, + "GetDataPartNamespaceAsync": did.dispidGetDataUriByPrefixMethod, + "GetDataPartPrefixAsync": did.dispidGetDataPrefixByUriMethod, + "GetNodeTextAsync": did.dispidGetDataNodeTextMethod, + "SetNodeTextAsync": did.dispidSetDataNodeTextMethod, + "GetSelectedTask": did.dispidGetSelectedTaskMethod, + "GetTask": did.dispidGetTaskMethod, + "GetWSSUrl": did.dispidGetWSSUrlMethod, + "GetTaskField": did.dispidGetTaskFieldMethod, + "GetSelectedResource": did.dispidGetSelectedResourceMethod, + "GetResourceField": did.dispidGetResourceFieldMethod, + "GetProjectField": did.dispidGetProjectFieldMethod, + "GetSelectedView": did.dispidGetSelectedViewMethod, + "GetTaskByIndex": did.dispidGetTaskByIndexMethod, + "GetResourceByIndex": did.dispidGetResourceByIndexMethod, + "SetTaskField": did.dispidSetTaskFieldMethod, + "SetResourceField": did.dispidSetResourceFieldMethod, + "GetMaxTaskIndex": did.dispidGetMaxTaskIndexMethod, + "GetMaxResourceIndex": did.dispidGetMaxResourceIndexMethod, + "CreateTask": did.dispidCreateTaskMethod + }; + for (var method in methodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = methodMap[method]; + } + } + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var syncMethodMap = { + "MessageParent": did.dispidMessageParentMethod, + "SendMessage": did.dispidSendMessageMethod + }; + for (var method in syncMethodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = syncMethodMap[method]; + } + } + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + "SettingsChanged": did.dispidSettingsChangedEvent, + "DocumentSelectionChanged": did.dispidDocumentSelectionChangedEvent, + "BindingSelectionChanged": did.dispidBindingSelectionChangedEvent, + "BindingDataChanged": did.dispidBindingDataChangedEvent, + "ActiveViewChanged": did.dispidActiveViewChangedEvent, + "OfficeThemeChanged": did.dispidOfficeThemeChangedEvent, + "DocumentThemeChanged": did.dispidDocumentThemeChangedEvent, + "AppCommandInvoked": did.dispidAppCommandInvokedEvent, + "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, + "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, + "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, + "RecurrenceChanged": did.dispidOlkRecurrenceChangedEvent, + "AttachmentsChanged": did.dispidOlkAttachmentsChangedEvent, + "EnhancedLocationsChanged": did.dispidOlkEnhancedLocationsChangedEvent, + "InfobarClicked": did.dispidOlkInfobarClickedEvent, + "SelectedItemsChanged": did.dispidOlkSelectedItemsChangedEvent, + "SensitivityLabelChanged": did.dispidOlkSensitivityLabelChangedEvent, + "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, + "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, + "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, + "DataNodeInserted": did.dispidDataNodeAddedEvent, + "DataNodeReplaced": did.dispidDataNodeReplacedEvent, + "DataNodeDeleted": did.dispidDataNodeDeletedEvent + }; + for (var event in eventMap) { + if (jsom[event]) { + dispIdMap[jsom[event]] = eventMap[event]; + } + } + function IsObjectEvent(dispId) { + return (dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { + if (typeof ex == "number") { + if (!callArgs) { + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + } + OSF.DDA.issueAsyncResult(callArgs, ex, OSF.DDA.ErrorCodeManager.getErrorArgs(ex)); + } + else { + throw ex; + } + } + ; + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) { + var callArgs; + try { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) { + window.Excel._RedirectV1APIs = true; + } + if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if (richApiInExcelMethodSubstitution.preprocess) { + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + } + var ctx = new window.Excel.RequestContext(); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); + ctx.sync() + .then(function () { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if (richApiInExcelMethodSubstitution.postprocess) { + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); + } + if (status != 0) { + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, response); + })["catch"](function (error) { + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure, null); + }); + } + else { + var hostCallArgs; + if (parameterMap.toHost) { + hostCallArgs = parameterMap.toHost(dispId, callArgs); + } + else { + hostCallArgs = callArgs; + } + var startTime = (new Date()).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + "dispId": dispId, + "hostCallArgs": hostCallArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": function (status, hostResponseArgs) { + var responseArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (parameterMap.fromHost) { + responseArgs = parameterMap.fromHost(dispId, hostResponseArgs); + } + else { + responseArgs = hostResponseArgs; + } + } + else { + responseArgs = hostResponseArgs; + } + var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); + OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry && !(OSF.ConstantNames && OSF.ConstantNames.IsCustomFunctionsRuntime)) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } + } + }); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); + if (!added) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; + } + } + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if (isPopupWindow) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return; + } + var dispId_1 = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId_1); + var targetId_1 = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId_1) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId_1, + "targetId": targetId_1, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = null; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web" && dispId_1 == OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent) { + args = hostArgs; + } + else { + args = parameterMap.fromHost(dispId_1, hostArgs); + } + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId_1, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId_1, args)); + } + }); + } + else { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var status, removeSuccess; + if (handler === null) { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + else { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration + }); + } + else { + onEnsureRegistration(status); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller, isModal) { + var callArgs; + var targetId; + var asyncMethodCall = null; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) { + var payload; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + else { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status, onSucceedArgs, caller, callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + } + OSF.DDA.issueAsyncResult(callArgs, status, payload); + } + try { + if (dialogMessageEvent == undefined || dialogOtherEvent == undefined) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + } + if (!isModal) { + if (OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + } + else { + if (OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.id]; + } + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + callArgs["isModal"] = isModal; + targetId = JSON.stringify(callArgs); + if (!OSF.DialogShownStatus.hasDialogShown) { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + } + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = parameterMap.fromHost(dispId, hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent, caller, args); + if (event.type == dialogOtherEvent) { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]); + } + eventDispatch.fireOrQueueEvent(event); + if (args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false; + } + } + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) { + var callArgs; + var dialogMessageEvent, dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false; + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": closeCallback + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + if (closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed, OSF.DDA.AsyncMethodNames.CloseAsync.displayName, closeStatus); + } + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; +}; +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { + for (var entry in asyncMethodNames) { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if (!target[name]) { + OSF.OUtil.defineEnumerableProperty(target, name, { + value: (function (asyncMethod) { + return function () { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod, arguments, target, privateState); + }; + })(method) + }); + } + } +}; +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if (!target[add]) { + OSF.OUtil.defineEnumerableProperty(target, add, { + value: function () { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments, eventDispatch, target, isPopupWindow); + } + }); + } + if (!target[remove]) { + OSF.OUtil.defineEnumerableProperty(target, remove, { + value: function () { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments, eventDispatch, target); + } + }); + } +}; +(function (OfficeExt) { + var loadMsAjax = false; + var MsAjaxTypeHelper = (function () { + function MsAjaxTypeHelper() { + } + MsAjaxTypeHelper.isInstanceOfType = function (type, instance) { + if (typeof (instance) === "undefined" || instance === null) + return false; + if (instance instanceof type) + return true; + var instanceType = instance.constructor; + if (!instanceType || (typeof (instanceType) !== "function") || !instanceType.__typeName || instanceType.__typeName === 'Object') { + instanceType = Object; + } + return !!(instanceType === type) || + (instanceType.__typeName && type.__typeName && instanceType.__typeName === type.__typeName); + }; + return MsAjaxTypeHelper; + }()); + OfficeExt.MsAjaxTypeHelper = MsAjaxTypeHelper; + var MsAjaxError = (function () { + function MsAjaxError() { + } + MsAjaxError.create = function (message, errorInfo) { + var err = new Error(message); + err.message = message; + if (errorInfo) { + for (var v in errorInfo) { + err[v] = errorInfo[v]; + } + } + err.popStackFrame(); + return err; + }; + MsAjaxError.parameterCount = function (message) { + var displayMessage = "Sys.ParameterCountException: " + (message ? message : "Parameter count mismatch."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.ParameterCountException' }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argument = function (paramName, message) { + var displayMessage = "Sys.ArgumentException: " + (message ? message : "Value does not fall within the expected range."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentNull = function (paramName, message) { + var displayMessage = "Sys.ArgumentNullException: " + (message ? message : "Value cannot be null."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentOutOfRange = function (paramName, actualValue, message) { + var displayMessage = "Sys.ArgumentOutOfRangeException: " + (message ? message : "Specified argument was out of the range of valid values."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + if (typeof (actualValue) !== "undefined" && actualValue !== null) { + displayMessage += "\n" + MsAjaxString.format("Actual value was {0}.", actualValue); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentType = function (paramName, actualType, expectedType, message) { + var displayMessage = "Sys.ArgumentTypeException: "; + if (message) { + displayMessage += message; + } + else if (actualType && expectedType) { + displayMessage += MsAjaxString.format("Object of type '{0}' cannot be converted to type '{1}'.", actualType.getName ? actualType.getName() : actualType, expectedType.getName ? expectedType.getName() : expectedType); + } + else { + displayMessage += "Object cannot be converted to the required type."; + } + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentUndefined = function (paramName, message) { + var displayMessage = "Sys.ArgumentUndefinedException: " + (message ? message : "Value cannot be undefined."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.invalidOperation = function (message) { + var displayMessage = "Sys.InvalidOperationException: " + (message ? message : "Operation is not valid due to the current state of the object."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.InvalidOperationException' }); + err.popStackFrame(); + return err; + }; + return MsAjaxError; + }()); + OfficeExt.MsAjaxError = MsAjaxError; + var MsAjaxString = (function () { + function MsAjaxString() { + } + MsAjaxString.format = function (format) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var source = format; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10); + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }; + MsAjaxString.startsWith = function (str, prefix) { + return (str.substr(0, prefix.length) === prefix); + }; + return MsAjaxString; + }()); + OfficeExt.MsAjaxString = MsAjaxString; + var MsAjaxDebug = (function () { + function MsAjaxDebug() { + } + MsAjaxDebug.trace = function (text) { + if (typeof Debug !== "undefined" && Debug.writeln) + Debug.writeln(text); + if (window.console && window.console.log) + window.console.log(text); + if (window.opera && window.opera.postError) + window.opera.postError(text); + if (window.debugService && window.debugService.trace) + window.debugService.trace(text); + var a = document.getElementById("TraceConsole"); + if (a && a.tagName.toUpperCase() === "TEXTAREA") { + a.appendChild(document.createTextNode(text + "\n")); + } + }; + return MsAjaxDebug; + }()); + OfficeExt.MsAjaxDebug = MsAjaxDebug; + if (!loadMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) { + var registerTypeInternal = function registerTypeInternal(type, name, isClass) { + if (type.__typeName === undefined || type.__typeName === null) { + type.__typeName = name; + } + if (type.__class === undefined || type.__class === null) { + type.__class = isClass; + } + }; + registerTypeInternal(Function, "Function", true); + registerTypeInternal(Error, "Error", true); + registerTypeInternal(Object, "Object", true); + registerTypeInternal(String, "String", true); + registerTypeInternal(Boolean, "Boolean", true); + registerTypeInternal(Date, "Date", true); + registerTypeInternal(Number, "Number", true); + registerTypeInternal(RegExp, "RegExp", true); + registerTypeInternal(Array, "Array", true); + if (!Function.createCallback) { + Function.createCallback = function Function$createCallback(method, context) { + var e = Function._validateParams(arguments, [ + { name: "method", type: Function }, + { name: "context", mayBeNull: true } + ]); + if (e) + throw e; + return function () { + var l = arguments.length; + if (l > 0) { + var args = []; + for (var i = 0; i < l; i++) { + args[i] = arguments[i]; + } + args[l] = context; + return method.apply(this, args); + } + return method.call(this, context); + }; + }; + } + if (!Function.createDelegate) { + Function.createDelegate = function Function$createDelegate(instance, method) { + var e = Function._validateParams(arguments, [ + { name: "instance", mayBeNull: true }, + { name: "method", type: Function } + ]); + if (e) + throw e; + return function () { + return method.apply(instance, arguments); + }; + }; + } + if (!Function._validateParams) { + Function._validateParams = function (params, expectedParams, validateParameterCount) { + var e, expectedLength = expectedParams.length; + validateParameterCount = validateParameterCount || (typeof (validateParameterCount) === "undefined"); + e = Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i = 0, l = params.length; i < l; i++) { + var expectedParam = expectedParams[Math.min(i, expectedLength - 1)], paramName = expectedParam.name; + if (expectedParam.parameterArray) { + paramName += "[" + (i - expectedLength + 1) + "]"; + } + else if (!validateParameterCount && (i >= expectedLength)) { + break; + } + e = Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; + }; + } + if (!Function._validateParameterCount) { + Function._validateParameterCount = function (params, expectedParams, validateParameterCount) { + var i, error, expectedLen = expectedParams.length, actualLen = params.length; + if (actualLen < expectedLen) { + var minParams = expectedLen; + for (i = 0; i < expectedLen; i++) { + var param = expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error = true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error = true; + for (i = 0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error = false; + break; + } + } + } + if (error) { + var e = MsAjaxError.parameterCount(); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!Function._validateParameter) { + Function._validateParameter = function (param, expectedParam, paramName) { + var e, expectedType = expectedParam.type, expectedInteger = !!expectedParam.integer, expectedDomElement = !!expectedParam.domElement, mayBeNull = !!expectedParam.mayBeNull; + e = Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType = expectedParam.elementType, elementMayBeNull = !!expectedParam.elementMayBeNull; + if (expectedType === Array && typeof (param) !== "undefined" && param !== null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger = !!expectedParam.elementInteger, expectedElementDomElement = !!expectedParam.elementDomElement; + for (var i = 0; i < param.length; i++) { + var elem = param[i]; + e = Function._validateParameterType(elem, expectedElementType, expectedElementInteger, expectedElementDomElement, elementMayBeNull, paramName + "[" + i + "]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; + }; + } + if (!Function._validateParameterType) { + Function._validateParameterType = function (param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof (param) === "undefined") { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param === null) { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && !OfficeExt.MsAjaxTypeHelper.isInstanceOfType(expectedType, param)) { + e = OfficeExt.MsAjaxError.argumentType(paramName, typeof (param), expectedType); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!window.Type) { + window.Type = Function; + } + if (!Type.registerNamespace) { + Type.registerNamespace = function (ns) { + var namespaceParts = ns.split('.'); + var currentNamespace = window; + for (var i = 0; i < namespaceParts.length; i++) { + currentNamespace[namespaceParts[i]] = currentNamespace[namespaceParts[i]] || {}; + currentNamespace = currentNamespace[namespaceParts[i]]; + } + }; + } + if (!Type.prototype.registerClass) { + Type.prototype.registerClass = function (cls) { cls = {}; }; + } + if (typeof (Sys) === "undefined") { + Type.registerNamespace('Sys'); + } + if (!Error.prototype.popStackFrame) { + Error.prototype.popStackFrame = function () { + if (arguments.length !== 0) + throw MsAjaxError.parameterCount(); + if (typeof (this.stack) === "undefined" || this.stack === null || + typeof (this.fileName) === "undefined" || this.fileName === null || + typeof (this.lineNumber) === "undefined" || this.lineNumber === null) { + return; + } + var stackFrames = this.stack.split("\n"); + var currentFrame = stackFrames[0]; + var pattern = this.fileName + ":" + this.lineNumber; + while (typeof (currentFrame) !== "undefined" && + currentFrame !== null && + currentFrame.indexOf(pattern) === -1) { + stackFrames.shift(); + currentFrame = stackFrames[0]; + } + var nextFrame = stackFrames[1]; + if (typeof (nextFrame) === "undefined" || nextFrame === null) { + return; + } + var nextFrameParts = nextFrame.match(/@(.*):(\d+)$/); + if (typeof (nextFrameParts) === "undefined" || nextFrameParts === null) { + return; + } + this.fileName = nextFrameParts[1]; + this.lineNumber = parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack = stackFrames.join("\n"); + }; + } + OsfMsAjaxFactory.msAjaxError = MsAjaxError; + OsfMsAjaxFactory.msAjaxString = MsAjaxString; + OsfMsAjaxFactory.msAjaxDebug = MsAjaxDebug; + } +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.setNamespace("SafeArray", OSF.DDA); +OSF.DDA.SafeArray.Response = { + Status: 0, + Payload: 1 +}; +OSF.DDA.SafeArray.UniqueArguments = { + Offset: "offset", + Run: "run", + BindingSpecificData: "bindingSpecificData", + MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" +}; +OSF.OUtil.setNamespace("Delegate", OSF.DDA.SafeArray); +OSF.DDA.SafeArray.Delegate._onException = function OSF_DDA_SafeArray_Delegate$OnException(ex, args) { + var status; + var statusNumber = ex.number; + if (statusNumber) { + switch (statusNumber) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2147467259: + if (args.dispId == OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + break; + case -2146828283: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147209089: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147208704: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + if (args.onComplete) { + args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } +}; +OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod = function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) { + var status; + var number = ex.number; + if (number) { + switch (number) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; +}; +OSF.DDA.SafeArray.Delegate.SpecialProcessor = function OSF_DDA_SafeArray_Delegate_SpecialProcessor() { + function _2DVBArrayToJaggedArray(vbArr) { + var ret; + try { + var rows = vbArr.ubound(1); + var cols = vbArr.ubound(2); + vbArr = vbArr.toArray(); + if (rows == 1 && cols == 1) { + ret = [vbArr]; + } + else { + ret = []; + for (var row = 0; row < rows; row++) { + var rowArr = []; + for (var col = 0; col < cols; col++) { + var datum = vbArr[row * cols + col]; + if (datum != OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) { + rowArr.push(datum); + } + } + if (rowArr.length > 0) { + ret.push(rowArr); + } + } + } + } + catch (ex) { + } + return ret; + } + var complexTypes = []; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = (function () { + var tableRows = 0; + var tableHeaders = 1; + return { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) { + if (OSF.DDA.TableDataProperties && typeof data != "string" && data[OSF.DDA.TableDataProperties.TableRows] !== undefined) { + var tableData = []; + tableData[tableRows] = data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.DDA.TableDataProperties.TableHeaders]; + data = tableData; + } + return data; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) { + var ret; + if (hostArgs.toArray) { + var dimensions = hostArgs.dimensions(); + if (dimensions === 2) { + ret = _2DVBArrayToJaggedArray(hostArgs); + } + else { + var array = hostArgs.toArray(); + if (array.length === 2 && ((array[0] != null && array[0].toArray) || (array[1] != null && array[1].toArray))) { + ret = {}; + ret[OSF.DDA.TableDataProperties.TableRows] = _2DVBArrayToJaggedArray(array[tableRows]); + ret[OSF.DDA.TableDataProperties.TableHeaders] = _2DVBArrayToJaggedArray(array[tableHeaders]); + } + else { + ret = array; + } + } + } + else { + ret = hostArgs; + } + return ret; + } + }; + })(); + OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes); + this.unpack = function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) { + var toArraySupported = arg !== undefined && arg.toArray !== undefined; + value = toArraySupported ? arg.toArray() : arg || {}; + } + else if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor); +OSF.DDA.SafeArray.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor(), [ + { + type: Microsoft.Office.WebExtension.Parameters.ValueFormat, + toHost: [ + { name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, value: 0 }, + { name: Microsoft.Office.WebExtension.ValueFormat.Formatted, value: 1 } + ] + }, + { + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [ + { name: Microsoft.Office.WebExtension.FilterType.All, value: 0 } + ] + } +]); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, + fromHost: [ + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, value: 0 }, + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) { + function toArray(args) { + var arrArgs = args; + if (OSF.OUtil.isArray(args)) { + var len = arrArgs.length; + for (var i = 0; i < len; i++) { + arrArgs[i] = toArray(arrArgs[i]); + } + } + else if (OSF.OUtil.isDate(args)) { + arrArgs = args.getVarDate(); + } + else if (typeof args === "object" && !OSF.OUtil.isArray(args)) { + arrArgs = []; + for (var index in args) { + if (!OSF.OUtil.isFunction(args[index])) { + arrArgs[index] = toArray(args[index]); + } + } + } + return arrArgs; + } + function fromSafeArray(value) { + var ret = value; + if (value != null && value.toArray) { + var arrayResult = value.toArray(); + ret = new Array(arrayResult.length); + for (var i = 0; i < arrayResult.length; i++) { + ret[i] = fromSafeArray(arrayResult[i]); + } + } + return ret; + } + try { + if (args.onCalling) { + args.onCalling(); + } + OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { + var result; + var status; + if (typeof hostResponseArgs === "number") { + result = []; + status = hostResponseArgs; + } + else { + result = hostResponseArgs.toArray(); + status = result[OSF.DDA.SafeArray.Response.Status]; + } + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) { + var payload = result[OSF.DDA.SafeArray.Response.Payload]; + payload = fromSafeArray(payload); + if (payload != null) { + if (!args._chunkResultData) { + args._chunkResultData = new Array(); + } + args._chunkResultData[payload[0]] = payload[1]; + } + return false; + } + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (result.length > 2) { + payload = []; + for (var i = 1; i < result.length; i++) + payload[i - 1] = result[i]; + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + if (args._chunkResultData) { + payload = fromSafeArray(payload); + if (payload != null) { + var expectedChunkCount = payload[payload.length - 1]; + if (args._chunkResultData.length == expectedChunkCount) { + payload[payload.length - 1] = args._chunkResultData; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + } + } + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + args.onComplete(status, payload); + } + return true; + }); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent = function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) { + var startTime = (new Date()).getTime(); + return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) { + if (args.onReceiving) { + args.onReceiving(); + } + var status = hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + }; +}; +OSF.DDA.SafeArray.Delegate.registerEventAsync = function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + try { + OSF.ClientHostController.registerEvent(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.unregisterEventAsync = function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.unregisterEvent(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.ClientMode = { + ReadWrite: 0, + ReadOnly: 1 +}; +OSF.DDA.RichInitializationReason = { + 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, + 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened +}; +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._initializeSettings = this.initializeSettings; +}; +OSF.InitializationHelper.prototype.deserializeSettings = function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) { + var settings; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if (storageSettings) { + serializedSettings = JSON.parse(storageSettings); + } + else { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if (refreshSupported) { + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + } + else { + settings = new OSF.DDA.Settings(deserializedSettings); + } + return settings; +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication() { +}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)); +}; +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { + var license = new OSF.DDA.License(appContext.get_eToken()); + var getOfficeThemeHandler = (OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme) ? OSF.DDA.OfficeTheme.getOfficeTheme : null; + if (appContext.get_isDialog()) { + if (OSF.DDA.UI.ChildUI) { + appContext.ui = new OSF.DDA.UI.ChildUI(); + } + } + else { + if (OSF.DDA.UI.ParentUI) { + appContext.ui = new OSF.DDA.UI.ParentUI(); + if (OfficeExt.Container) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.CloseContainerAsync]); + } + } + } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } + if (OSF.DDA.ExecuteFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.ExecuteFeature]); + } + if (OSF.DDA.QueryFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.QueryFeature]); + } + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + var asyncMethods = []; + var getAccessTokenMethod = OSF.DDA.AsyncMethodNames.GetAccessTokenAsync; + if (getAccessTokenMethod) { + asyncMethods.push(getAccessTokenMethod); + } + var authContextMethod = OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync; + if (authContextMethod) { + asyncMethods.push(authContextMethod); + } + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, asyncMethods); + } + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); + var getDelegateMethods, parameterMap; + getDelegateMethods = OSF.DDA.DispIdHost.getClientDelegateMethods; + parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods, parameterMap)); +}; +OSF.InitializationHelper.prototype.getInitializationReason = function (appContext) { return OSF.DDA.RichInitializationReason[appContext.get_reason()]; }; +OSF.DDA.DispIdHost.getClientDelegateMethods = function (actionId) { + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.SafeArray.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.SafeArray.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.SafeArray.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.SafeArray.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.SafeArray.Delegate.closeDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.SafeArray.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.SafeArray.Delegate.sendMessage; + if (OSF.DDA.AsyncMethodNames.RefreshAsync && actionId == OSF.DDA.AsyncMethodNames.RefreshAsync.id) { + var readSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + if (typeof (OSF.DDA.ClientSettingsManager.refresh) === "function") { + return OSF.DDA.ClientSettingsManager.refresh(onCalling, onReceiving); + } + else { + return OSF.DDA.ClientSettingsManager.read(onCalling, onReceiving); + } + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings); + } + if (OSF.DDA.AsyncMethodNames.SaveAsync && actionId == OSF.DDA.AsyncMethodNames.SaveAsync.id) { + var writeSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings], hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale], onCalling, onReceiving); + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings); + } + return delegateMethods; +}; +var OSF = OSF || {}; +var OSFWebkit; +(function (OSFWebkit) { + var WebkitSafeArray = (function () { + function WebkitSafeArray(data) { + this.data = data; + this.safeArrayFlag = this.isSafeArray(data); + } + WebkitSafeArray.prototype.dimensions = function () { + var dimensions = 0; + if (this.safeArrayFlag) { + dimensions = this.data[0][0]; + } + else if (this.isArray()) { + dimensions = 2; + } + return dimensions; + }; + WebkitSafeArray.prototype.getItem = function () { + var array = []; + var element = null; + if (this.safeArrayFlag) { + array = this.toArray(); + } + else { + array = this.data; + } + element = array; + for (var i = 0; i < arguments.length; i++) { + element = element[arguments[i]]; + } + return element; + }; + WebkitSafeArray.prototype.lbound = function (dimension) { + return 0; + }; + WebkitSafeArray.prototype.ubound = function (dimension) { + var ubound = 0; + if (this.safeArrayFlag) { + ubound = this.data[0][dimension]; + } + else if (this.isArray()) { + if (dimension == 1) { + return this.data.length; + } + else if (dimension == 2) { + if (OSF.OUtil.isArray(this.data[0])) { + return this.data[0].length; + } + else if (this.data[0] != null) { + return 1; + } + } + } + return ubound; + }; + WebkitSafeArray.prototype.toArray = function () { + if (this.isArray() == false) { + return this.data; + } + var arr = []; + var startingIndex = this.safeArrayFlag ? 1 : 0; + for (var i = startingIndex; i < this.data.length; i++) { + var element = this.data[i]; + if (this.isSafeArray(element)) { + arr.push(new WebkitSafeArray(element)); + } + else { + arr.push(element); + } + } + return arr; + }; + WebkitSafeArray.prototype.isArray = function () { + return OSF.OUtil.isArray(this.data); + }; + WebkitSafeArray.prototype.isSafeArray = function (obj) { + var isSafeArray = false; + if (OSF.OUtil.isArray(obj) && OSF.OUtil.isArray(obj[0])) { + var bounds = obj[0]; + var dimensions = bounds[0]; + if (bounds.length != dimensions + 1) { + return false; + } + var expectedArraySize = 1; + for (var i = 1; i < bounds.length; i++) { + var dimension = bounds[i]; + if (isFinite(dimension) == false) { + return false; + } + expectedArraySize = expectedArraySize * dimension; + } + expectedArraySize++; + isSafeArray = (expectedArraySize == obj.length); + } + return isSafeArray; + }; + return WebkitSafeArray; + }()); + OSFWebkit.WebkitSafeArray = WebkitSafeArray; +})(OSFWebkit || (OSFWebkit = {})); +(function (OSFWebkit) { + var ScriptMessaging; + (function (ScriptMessaging) { + var scriptMessenger = null; + function agaveHostCallback(callbackId, params) { + scriptMessenger.agaveHostCallback(callbackId, params); + } + ScriptMessaging.agaveHostCallback = agaveHostCallback; + function agaveHostEventCallback(callbackId, params) { + scriptMessenger.agaveHostEventCallback(callbackId, params); + } + ScriptMessaging.agaveHostEventCallback = agaveHostEventCallback; + function GetScriptMessenger() { + if (scriptMessenger == null) { + if (HostScriptMessaging.IsSupportedByHost()) { + scriptMessenger = new HostScriptMessaging(); + } + else { + scriptMessenger = new WebkitScriptMessaging("OSF.ScriptMessaging.agaveHostCallback", "OSF.ScriptMessaging.agaveHostEventCallback"); + } + } + return scriptMessenger; + } + ScriptMessaging.GetScriptMessenger = GetScriptMessenger; + var EventHandlerCallback = (function () { + function EventHandlerCallback(id, targetId, handler) { + this.id = id; + this.targetId = targetId; + this.handler = handler; + } + return EventHandlerCallback; + }()); + var HostScriptMessaging = (function () { + function HostScriptMessaging() { + this.eventHandlers = []; + } + HostScriptMessaging.IsSupportedByHost = function () { + return !!window._osfHostAPI; + }; + HostScriptMessaging.prototype.invokeMethod = function (handlerName, methodId, params, callback) { + var internalCallback = function (params) { + var callbacksDone = callback(params); + if (callbacksDone === undefined || callbacksDone === true) { + return true; + } + return false; + }; + window._osfHostAPI(handlerName, this.constructMessagingArgs(methodId, params), internalCallback); + }; + HostScriptMessaging.prototype.registerEvent = function (handlerName, methodId, dispId, targetId, handler, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + var internalCallback = function (params) { + callback(params); + return true; + }; + var internalEventHandler = function (params) { + handler(params); + return false; + }; + var callbackInfo = window._osfHostRegisterEvent(handlerName, this.constructMessagingArgs(methodId, hostArgs), internalEventHandler, internalCallback); + this.eventHandlers.push({ targetId: targetId, dispId: dispId, callbackId: callbackInfo.eventCallbackId }); + }; + HostScriptMessaging.prototype.unregisterEvent = function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + var internalCallback = function (params) { + callback(params); + return true; + }; + window._osfHostAPI(handlerName, this.constructMessagingArgs(methodId, hostArgs), internalCallback); + for (var i = this.eventHandlers.length - 1; i >= 0; i--) { + var handler = this.eventHandlers[i]; + if (handler.dispId === dispId && handler.targetId === targetId) { + this.eventHandlers.splice(i, 1); + window._osfHostUnregisterCallback(handler.callbackId); + } + } + }; + HostScriptMessaging.prototype.agaveHostCallback = function (callbackId, params) { + }; + HostScriptMessaging.prototype.agaveHostEventCallback = function (callbackId, params) { + }; + HostScriptMessaging.prototype.constructMessagingArgs = function (methodId, params) { + var messagingArgs = { + params: params, + methodId: methodId + }; + return messagingArgs; + }; + return HostScriptMessaging; + }()); + var WebkitScriptMessaging = (function () { + function WebkitScriptMessaging(methodCallbackName, eventCallbackName) { + this.callingIndex = 0; + this.callbackList = {}; + this.eventHandlerList = {}; + this.asyncMethodCallbackFunctionName = methodCallbackName; + this.eventCallbackFunctionName = eventCallbackName; + this.conversationId = WebkitScriptMessaging.getCurrentTimeMS().toString(); + } + WebkitScriptMessaging.prototype.invokeMethod = function (handlerName, methodId, params, callback) { + var messagingArgs = {}; + this.postWebkitMessage(messagingArgs, handlerName, methodId, params, callback); + }; + WebkitScriptMessaging.prototype.registerEvent = function (handlerName, methodId, dispId, targetId, handler, callback) { + var messagingArgs = { + eventCallbackFunction: this.eventCallbackFunctionName + }; + var hostArgs = { + id: dispId, + targetId: targetId + }; + var correlationId = this.postWebkitMessage(messagingArgs, handlerName, methodId, hostArgs, callback); + this.eventHandlerList[correlationId] = new EventHandlerCallback(dispId, targetId, handler); + }; + WebkitScriptMessaging.prototype.unregisterEvent = function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + for (var key in this.eventHandlerList) { + if (this.eventHandlerList.hasOwnProperty(key)) { + var eventCallback = this.eventHandlerList[key]; + if (eventCallback.id == dispId && eventCallback.targetId == targetId) { + delete this.eventHandlerList[key]; + } + } + } + this.invokeMethod(handlerName, methodId, hostArgs, callback); + }; + WebkitScriptMessaging.prototype.agaveHostCallback = function (callbackId, params) { + var callbackFunction = this.callbackList[callbackId]; + if (callbackFunction) { + var callbacksDone = callbackFunction(params); + if (callbacksDone === undefined || callbacksDone === true) { + delete this.callbackList[callbackId]; + } + } + }; + WebkitScriptMessaging.prototype.agaveHostEventCallback = function (callbackId, params) { + var eventCallback = this.eventHandlerList[callbackId]; + if (eventCallback) { + eventCallback.handler(params); + } + }; + WebkitScriptMessaging.prototype.postWebkitMessage = function (messagingArgs, handlerName, methodId, params, callback) { + messagingArgs.methodId = methodId; + messagingArgs.params = params; + var correlationId = ""; + if (callback) { + correlationId = this.generateCorrelationId(); + this.callbackList[correlationId] = callback; + messagingArgs.callbackId = correlationId; + messagingArgs.callbackFunction = this.asyncMethodCallbackFunctionName; + } + var invokePostMessage = function () { + window.webkit.messageHandlers[handlerName].postMessage(JSON.stringify(messagingArgs)); + }; + var currentTimestamp = WebkitScriptMessaging.getCurrentTimeMS(); + if (this.lastMessageTimestamp == null || (currentTimestamp - this.lastMessageTimestamp >= WebkitScriptMessaging.MESSAGE_TIME_DELTA)) { + invokePostMessage(); + this.lastMessageTimestamp = currentTimestamp; + } + else { + this.lastMessageTimestamp += WebkitScriptMessaging.MESSAGE_TIME_DELTA; + setTimeout(function () { + invokePostMessage(); + }, this.lastMessageTimestamp - currentTimestamp); + } + return correlationId; + }; + WebkitScriptMessaging.prototype.generateCorrelationId = function () { + ++this.callingIndex; + return this.conversationId + this.callingIndex; + }; + WebkitScriptMessaging.getCurrentTimeMS = function () { + return (new Date).getTime(); + }; + WebkitScriptMessaging.MESSAGE_TIME_DELTA = 10; + return WebkitScriptMessaging; + }()); + })(ScriptMessaging = OSFWebkit.ScriptMessaging || (OSFWebkit.ScriptMessaging = {})); +})(OSFWebkit || (OSFWebkit = {})); +OSF.ScriptMessaging = OSFWebkit.ScriptMessaging; +(function (OSFWebkit) { + OSFWebkit.MessageHandlerName = "Agave"; + OSFWebkit.PopupMessageHandlerName = "WefPopupHandler"; + var AppContextProperties; + (function (AppContextProperties) { + AppContextProperties[AppContextProperties["Settings"] = 0] = "Settings"; + AppContextProperties[AppContextProperties["SolutionReferenceId"] = 1] = "SolutionReferenceId"; + AppContextProperties[AppContextProperties["AppType"] = 2] = "AppType"; + AppContextProperties[AppContextProperties["MajorVersion"] = 3] = "MajorVersion"; + AppContextProperties[AppContextProperties["MinorVersion"] = 4] = "MinorVersion"; + AppContextProperties[AppContextProperties["RevisionVersion"] = 5] = "RevisionVersion"; + AppContextProperties[AppContextProperties["APIVersionSequence"] = 6] = "APIVersionSequence"; + AppContextProperties[AppContextProperties["AppCapabilities"] = 7] = "AppCapabilities"; + AppContextProperties[AppContextProperties["APPUILocale"] = 8] = "APPUILocale"; + AppContextProperties[AppContextProperties["AppDataLocale"] = 9] = "AppDataLocale"; + AppContextProperties[AppContextProperties["BindingCount"] = 10] = "BindingCount"; + AppContextProperties[AppContextProperties["DocumentUrl"] = 11] = "DocumentUrl"; + AppContextProperties[AppContextProperties["ActivationMode"] = 12] = "ActivationMode"; + AppContextProperties[AppContextProperties["ControlIntegrationLevel"] = 13] = "ControlIntegrationLevel"; + AppContextProperties[AppContextProperties["SolutionToken"] = 14] = "SolutionToken"; + AppContextProperties[AppContextProperties["APISetVersion"] = 15] = "APISetVersion"; + AppContextProperties[AppContextProperties["CorrelationId"] = 16] = "CorrelationId"; + AppContextProperties[AppContextProperties["InstanceId"] = 17] = "InstanceId"; + AppContextProperties[AppContextProperties["TouchEnabled"] = 18] = "TouchEnabled"; + AppContextProperties[AppContextProperties["CommerceAllowed"] = 19] = "CommerceAllowed"; + AppContextProperties[AppContextProperties["RequirementMatrix"] = 20] = "RequirementMatrix"; + AppContextProperties[AppContextProperties["HostCustomMessage"] = 21] = "HostCustomMessage"; + AppContextProperties[AppContextProperties["HostFullVersion"] = 22] = "HostFullVersion"; + AppContextProperties[AppContextProperties["InitialDisplayMode"] = 23] = "InitialDisplayMode"; + AppContextProperties[AppContextProperties["FeatureGates"] = 24] = "FeatureGates"; + AppContextProperties[AppContextProperties["HostSettings"] = 25] = "HostSettings"; + AppContextProperties[AppContextProperties["OfficeThemeInfo"] = 26] = "OfficeThemeInfo"; + })(AppContextProperties = OSFWebkit.AppContextProperties || (OSFWebkit.AppContextProperties = {})); + var MethodId; + (function (MethodId) { + MethodId[MethodId["Execute"] = 1] = "Execute"; + MethodId[MethodId["RegisterEvent"] = 2] = "RegisterEvent"; + MethodId[MethodId["UnregisterEvent"] = 3] = "UnregisterEvent"; + MethodId[MethodId["WriteSettings"] = 4] = "WriteSettings"; + MethodId[MethodId["GetContext"] = 5] = "GetContext"; + MethodId[MethodId["SendMessage"] = 6] = "SendMessage"; + MethodId[MethodId["MessageParent"] = 7] = "MessageParent"; + MethodId[MethodId["SendMessage2"] = 8] = "SendMessage2"; + MethodId[MethodId["MessageParent2"] = 9] = "MessageParent2"; + })(MethodId = OSFWebkit.MethodId || (OSFWebkit.MethodId = {})); + var WebkitHostController = (function () { + function WebkitHostController(hostScriptProxy) { + this.hostScriptProxy = hostScriptProxy; + this.useFullDialogAPI = !!window._enableFullDialogAPI; + this.osfSupportsDialogOrigin = !!window._osfEnableDialogOrigin; + } + WebkitHostController.prototype.execute = function (id, params, callback) { + var hostParams = { + id: id, + apiArgs: params + }; + var agaveResponseCallback = function (payload) { + if (callback) { + var invokeArguments = []; + if (OSF.OUtil.isArray(payload)) { + for (var i = 0; i < payload.length; i++) { + var element = payload[i]; + if (OSF.OUtil.isArray(element)) { + element = new OSFWebkit.WebkitSafeArray(element); + } + invokeArguments.unshift(element); + } + } + return callback.apply(null, invokeArguments); + } + }; + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.Execute, hostParams, agaveResponseCallback); + }; + WebkitHostController.prototype.registerEvent = function (id, targetId, handler, callback) { + var agaveEventHandlerCallback = function (payload) { + var safeArraySource = payload; + var eventId = 0; + if (OSF.OUtil.isArray(payload) && payload.length >= 2) { + safeArraySource = payload[0]; + eventId = payload[1]; + } + if (handler) { + handler(eventId, new OSFWebkit.WebkitSafeArray(safeArraySource)); + } + }; + var agaveResponseCallback = function (payload) { + if (callback) { + return callback(new OSFWebkit.WebkitSafeArray(payload)); + } + }; + this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.RegisterEvent, id, targetId, agaveEventHandlerCallback, agaveResponseCallback); + }; + WebkitHostController.prototype.unregisterEvent = function (id, targetId, callback) { + var agaveResponseCallback = function (response) { + return callback(new OSFWebkit.WebkitSafeArray(response)); + }; + this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.UnregisterEvent, id, targetId, agaveResponseCallback); + }; + WebkitHostController.prototype.messageParent = function (params) { + if (this.useFullDialogAPI && params) { + var messageToParent = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + if (typeof messageToParent === "boolean") { + if (messageToParent === true) { + params[Microsoft.Office.WebExtension.Parameters.MessageToParent] = "true"; + } + else if (messageToParent === false) { + params[Microsoft.Office.WebExtension.Parameters.MessageToParent] = ""; + } + } + } + var message; + var methodId; + if (this.osfSupportsDialogOrigin && params[Microsoft.Office.WebExtension.Parameters.TargetOrigin]) { + message = this.useFullDialogAPI ? JSON.stringify(params) : params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + methodId = OSF.Webkit.MethodId.MessageParent2; + } + else { + message = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + methodId = OSF.Webkit.MethodId.MessageParent; + } + if (this.useFullDialogAPI) { + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, methodId, message, null); + } + else { + var messageObj = { dialogMessage: { messageType: OSF.DialogMessageType.DialogMessageReceived, messageContent: message } }; + var targetOrigin = methodId == OSF.Webkit.MethodId.MessageParent2 ? params[Microsoft.Office.WebExtension.Parameters.TargetOrigin] : window.location.origin; + window.opener.postMessage(JSON.stringify(messageObj), targetOrigin); + } + }; + WebkitHostController.prototype.openDialog = function (id, targetId, handler, callback) { + if (this.useFullDialogAPI) { + this.registerEvent(id, targetId, handler, callback); + return; + } + if (WebkitHostController.popup && !WebkitHostController.popup.closed) { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); + return; + } + var magicWord = "action=displayDialog"; + WebkitHostController.OpenDialogCallback = undefined; + var fragmentSeparator = '#'; + var callArgs = JSON.parse(targetId); + var callUrl = callArgs.url; + if (!callUrl) { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme); + return; + } + var urlParts = callUrl.split(fragmentSeparator); + var seperator = "?"; + if (urlParts[0].indexOf("?") > -1) { + seperator = "&"; + } + var width = screen.width * callArgs.width / 100; + var height = screen.height * callArgs.height / 100; + var params = "width=" + width + ", height=" + height; + urlParts[0] = urlParts[0].concat(seperator).concat(magicWord); + var openUrl = urlParts.join(fragmentSeparator); + WebkitHostController.popup = window.open(openUrl, "", params); + function receiveMessage(event) { + if (event.origin == window.location.origin) { + try { + var messageObj = JSON.parse(event.data); + if (messageObj.dialogMessage) { + handler(id, [OSF.DialogMessageType.DialogMessageReceived, messageObj.dialogMessage.messageContent, event.origin]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:" + event.data); + } + } + } + WebkitHostController.DialogEventListener = receiveMessage; + function checkWindowClose() { + try { + if (WebkitHostController.popup == null || WebkitHostController.popup.closed) { + window.clearInterval(WebkitHostController.interval); + window.removeEventListener("message", WebkitHostController.DialogEventListener); + WebkitHostController.NotifyError = null; + WebkitHostController.popup = null; + handler(id, [OSF.DialogMessageType.DialogClosed]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed."); + } + } + function OpenDialogCallbackNotifyError(errorCode) { + handler(id, [errorCode]); + } + WebkitHostController.OpenDialogCallback = function (code) { + if (code == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + window.addEventListener("message", WebkitHostController.DialogEventListener); + WebkitHostController.interval = window.setInterval(checkWindowClose, 1000); + WebkitHostController.NotifyError = OpenDialogCallbackNotifyError; + } + callback(code); + }; + }; + WebkitHostController.prototype.closeDialog = function (id, targetId, callback) { + if (this.useFullDialogAPI) { + this.unregisterEvent(id, targetId, callback); + } + else { + if (WebkitHostController.popup) { + if (WebkitHostController.interval) { + window.clearInterval(WebkitHostController.interval); + } + WebkitHostController.popup.close(); + WebkitHostController.popup = null; + window.removeEventListener("message", WebkitHostController.DialogEventListener); + WebkitHostController.NotifyError = null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + } + }; + WebkitHostController.prototype.sendMessage = function (params) { + var message; + var methodId; + if (this.osfSupportsDialogOrigin && params[Microsoft.Office.WebExtension.Parameters.TargetOrigin]) { + message = JSON.stringify(params); + methodId = OSF.Webkit.MethodId.SendMessage2; + } + else { + message = params[Microsoft.Office.WebExtension.Parameters.MessageContent]; + methodId = OSF.Webkit.MethodId.SendMessage; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message = message.toString(); + } + } + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, methodId, message, null); + }; + WebkitHostController.prototype.closeSdxDialog = function (context) { + }; + WebkitHostController.prototype.resizeSdxDialog = function (width, height) { + }; + return WebkitHostController; + }()); + OSFWebkit.WebkitHostController = WebkitHostController; +})(OSFWebkit || (OSFWebkit = {})); +OSF.Webkit = OSFWebkit; +OSF.initializeWebkitCommon = function OSF_initializeWebkitCommon() { + OSF.DDA.ClientSettingsManager = { + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) { + return function (args) { + var status, response; + var onComplete = function onComplete(status, response) { + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + args.onComplete(status, response); + } + }; + try { + hostDelegateMethod(args.hostCallArgs, args.onCalling, onComplete); + } + catch (ex) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response = { name: Strings.OfficeOM.L_InternalError, message: ex }; + onComplete(status, response); + } + }; + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + var initializationHelper = OSF._OfficeAppFactory.getInitializationHelper(); + var onReceivedContext = function onReceivedContext(appContext) { + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, appContext.get_settings()); + } + }; + initializationHelper.getAppContext(null, onReceivedContext); + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) { + var hostParams = {}; + var keys = []; + var values = []; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + hostParams["keys"] = keys; + hostParams["values"] = values; + if (onCalling) { + onCalling(); + } + var onWriteCompleted = function onWriteCompleted(status) { + if (onComplete) { + onComplete(status[0], null); + } + }; + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.WriteSettings, hostParams, onWriteCompleted); + } + }; + OSF.InitializationHelper.prototype.initializeSettings = function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) { + var serializedSettings = appContext.get_settings(); + var settings = this.deserializeSettings(serializedSettings, refreshSupported); + return settings; + }; + OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + var getInvocationCallback = function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(appContext) { + var returnedContext; + var appContextProperties = OSF.Webkit.AppContextProperties; + var appType = appContext[appContextProperties.AppType]; + var hostSettings = appContext[appContextProperties.Settings]; + var serializedSettings = {}; + var keys = hostSettings[0]; + var values = hostSettings[1]; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + var id = appContext[appContextProperties.SolutionReferenceId]; + var version = appContext[appContextProperties.MajorVersion]; + var minorVersion = appContext[appContextProperties.MinorVersion]; + var clientMode = appContext[appContextProperties.AppCapabilities]; + var UILocale = appContext[appContextProperties.APPUILocale]; + var dataLocale = appContext[appContextProperties.AppDataLocale]; + var docUrl = appContext[appContextProperties.DocumentUrl]; + var reason = appContext[appContextProperties.ActivationMode]; + var osfControlType = appContext[appContextProperties.ControlIntegrationLevel]; + var eToken = appContext[appContextProperties.SolutionToken]; + eToken = eToken ? eToken.toString() : ""; + var correlationId = appContext[appContextProperties.CorrelationId]; + var appInstanceId = appContext[appContextProperties.InstanceId]; + var touchEnabled = appContext[appContextProperties.TouchEnabled]; + var commerceAllowed = appContext[appContextProperties.CommerceAllowed]; + var requirementMatrix = appContext[appContextProperties.RequirementMatrix]; + var hostCustomMessage = appContext[appContextProperties.HostCustomMessage]; + var hostFullVersion = appContext[appContextProperties.HostFullVersion]; + var initialDisplayMode = appContext[appContextProperties.InitialDisplayMode]; + var featureGates = null; + if (appContext[appContextProperties.FeatureGates]) { + try { + featureGates = JSON.parse(appContext[appContextProperties.FeatureGates]); + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("Exception while creating the SDX FeatureGates object. Details: " + ex); + } + } + var srcOfficeThemeInfo = null; + if (appContext[appContextProperties.OfficeThemeInfo]) { + try { + srcOfficeThemeInfo = JSON.parse(appContext[appContextProperties.OfficeThemeInfo]); + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("Exception while parsing officeThemeInfo. Details: " + ex); + } + } + var officeThemeInfo = {}; + if (srcOfficeThemeInfo) { + officeThemeInfo = OSF.DDA.Theming.ConvertToOfficeTheme(srcOfficeThemeInfo); + } + returnedContext = new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, serializedSettings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, undefined, undefined, undefined, undefined, undefined, featureGates, officeThemeInfo, initialDisplayMode); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + }; + var handler; + if (this._hostInfo.isDialog && window.webkit.messageHandlers[OSF.Webkit.PopupMessageHandlerName]) { + handler = OSF.Webkit.PopupMessageHandlerName; + } + else { + handler = OSF.Webkit.MessageHandlerName; + } + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler, OSF.Webkit.MethodId.GetContext, [], getInvocationCallback); + }; +}; +OSF.ClientHostController = new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger()); +OSF.initializeWebkitCommon(); +var OSFLog; +(function (OSFLog) { + var BaseUsageData = (function () { + function BaseUsageData(table) { + this._table = table; + this._fields = {}; + } + Object.defineProperty(BaseUsageData.prototype, "Fields", { + get: function () { + return this._fields; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype, "Table", { + get: function () { + return this._table; + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function () { + }; + BaseUsageData.prototype.SetSerializedField = function (key, value) { + if (typeof (value) !== "undefined" && value !== null) { + this._serializedFields[key] = value.toString(); + } + }; + BaseUsageData.prototype.SerializeRow = function () { + this._serializedFields = {}; + this.SetSerializedField("Table", this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields); + }; + return BaseUsageData; + }()); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = (function (_super) { + __extends(AppActivatedUsageData, _super); + function AppActivatedUsageData() { + return _super.call(this, "AppActivated") || this; + } + Object.defineProperty(AppActivatedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppId", { + get: function () { return this.Fields["AppId"]; }, + set: function (value) { this.Fields["AppId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppInstanceId", { + get: function () { return this.Fields["AppInstanceId"]; }, + set: function (value) { this.Fields["AppInstanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppURL", { + get: function () { return this.Fields["AppURL"]; }, + set: function (value) { this.Fields["AppURL"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AssetId", { + get: function () { return this.Fields["AssetId"]; }, + set: function (value) { this.Fields["AssetId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Browser", { + get: function () { return this.Fields["Browser"]; }, + set: function (value) { this.Fields["Browser"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "UserId", { + get: function () { return this.Fields["UserId"]; }, + set: function (value) { this.Fields["UserId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Host", { + get: function () { return this.Fields["Host"]; }, + set: function (value) { this.Fields["Host"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostVersion", { + get: function () { return this.Fields["HostVersion"]; }, + set: function (value) { this.Fields["HostVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "ClientId", { + get: function () { return this.Fields["ClientId"]; }, + set: function (value) { this.Fields["ClientId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeWidth", { + get: function () { return this.Fields["AppSizeWidth"]; }, + set: function (value) { this.Fields["AppSizeWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeHeight", { + get: function () { return this.Fields["AppSizeHeight"]; }, + set: function (value) { this.Fields["AppSizeHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "DocUrl", { + get: function () { return this.Fields["DocUrl"]; }, + set: function (value) { this.Fields["DocUrl"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "OfficeJSVersion", { + get: function () { return this.Fields["OfficeJSVersion"]; }, + set: function (value) { this.Fields["OfficeJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostJSVersion", { + get: function () { return this.Fields["HostJSVersion"]; }, + set: function (value) { this.Fields["HostJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "WacHostEnvironment", { + get: function () { return this.Fields["WacHostEnvironment"]; }, + set: function (value) { this.Fields["WacHostEnvironment"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsFromWacAutomation", { + get: function () { return this.Fields["IsFromWacAutomation"]; }, + set: function (value) { this.Fields["IsFromWacAutomation"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsMOS", { + get: function () { return this.Fields["IsMOS"]; }, + set: function (value) { this.Fields["IsMOS"] = value; }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("AppId", this.AppId); + this.SetSerializedField("AppInstanceId", this.AppInstanceId); + this.SetSerializedField("AppURL", this.AppURL); + this.SetSerializedField("AssetId", this.AssetId); + this.SetSerializedField("Browser", this.Browser); + this.SetSerializedField("UserId", this.UserId); + this.SetSerializedField("Host", this.Host); + this.SetSerializedField("HostVersion", this.HostVersion); + this.SetSerializedField("ClientId", this.ClientId); + this.SetSerializedField("AppSizeWidth", this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight", this.AppSizeHeight); + this.SetSerializedField("Message", this.Message); + this.SetSerializedField("DocUrl", this.DocUrl); + this.SetSerializedField("OfficeJSVersion", this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion", this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment", this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation", this.IsFromWacAutomation); + this.SetSerializedField("IsMOS", this.IsMOS); + }; + return AppActivatedUsageData; + }(BaseUsageData)); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = (function (_super) { + __extends(ScriptLoadUsageData, _super); + function ScriptLoadUsageData() { + return _super.call(this, "ScriptLoad") || this; + } + Object.defineProperty(ScriptLoadUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ScriptId", { + get: function () { return this.Fields["ScriptId"]; }, + set: function (value) { this.Fields["ScriptId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "StartTime", { + get: function () { return this.Fields["StartTime"]; }, + set: function (value) { this.Fields["StartTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("ScriptId", this.ScriptId); + this.SetSerializedField("StartTime", this.StartTime); + this.SetSerializedField("ResponseTime", this.ResponseTime); + }; + return ScriptLoadUsageData; + }(BaseUsageData)); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = (function (_super) { + __extends(AppClosedUsageData, _super); + function AppClosedUsageData() { + return _super.call(this, "AppClosed") || this; + } + Object.defineProperty(AppClosedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "FocusTime", { + get: function () { return this.Fields["FocusTime"]; }, + set: function (value) { this.Fields["FocusTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalWidth", { + get: function () { return this.Fields["AppSizeFinalWidth"]; }, + set: function (value) { this.Fields["AppSizeFinalWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalHeight", { + get: function () { return this.Fields["AppSizeFinalHeight"]; }, + set: function (value) { this.Fields["AppSizeFinalHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "OpenTime", { + get: function () { return this.Fields["OpenTime"]; }, + set: function (value) { this.Fields["OpenTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "CloseMethod", { + get: function () { return this.Fields["CloseMethod"]; }, + set: function (value) { this.Fields["CloseMethod"] = value; }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("FocusTime", this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth", this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight", this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime", this.OpenTime); + this.SetSerializedField("CloseMethod", this.CloseMethod); + }; + return AppClosedUsageData; + }(BaseUsageData)); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = (function (_super) { + __extends(APIUsageUsageData, _super); + function APIUsageUsageData() { + return _super.call(this, "APIUsage") || this; + } + Object.defineProperty(APIUsageUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIType", { + get: function () { return this.Fields["APIType"]; }, + set: function (value) { this.Fields["APIType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIID", { + get: function () { return this.Fields["APIID"]; }, + set: function (value) { this.Fields["APIID"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "Parameters", { + get: function () { return this.Fields["Parameters"]; }, + set: function (value) { this.Fields["Parameters"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ErrorType", { + get: function () { return this.Fields["ErrorType"]; }, + set: function (value) { this.Fields["ErrorType"] = value; }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("APIType", this.APIType); + this.SetSerializedField("APIID", this.APIID); + this.SetSerializedField("Parameters", this.Parameters); + this.SetSerializedField("ResponseTime", this.ResponseTime); + this.SetSerializedField("ErrorType", this.ErrorType); + }; + return APIUsageUsageData; + }(BaseUsageData)); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = (function (_super) { + __extends(AppInitializationUsageData, _super); + function AppInitializationUsageData() { + return _super.call(this, "AppInitialization") || this; + } + Object.defineProperty(AppInitializationUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SuccessCode", { + get: function () { return this.Fields["SuccessCode"]; }, + set: function (value) { this.Fields["SuccessCode"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("SuccessCode", this.SuccessCode); + this.SetSerializedField("Message", this.Message); + }; + return AppInitializationUsageData; + }(BaseUsageData)); + OSFLog.AppInitializationUsageData = AppInitializationUsageData; + var CheckWACHostUsageData = (function (_super) { + __extends(CheckWACHostUsageData, _super); + function CheckWACHostUsageData() { + return _super.call(this, "CheckWACHost") || this; + } + Object.defineProperty(CheckWACHostUsageData.prototype, "isWacKnownHost", { + get: function () { return this.Fields["isWacKnownHost"]; }, + set: function (value) { this.Fields["isWacKnownHost"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "instanceId", { + get: function () { return this.Fields["instanceId"]; }, + set: function (value) { this.Fields["instanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostType", { + get: function () { return this.Fields["hostType"]; }, + set: function (value) { this.Fields["hostType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostPlatform", { + get: function () { return this.Fields["hostPlatform"]; }, + set: function (value) { this.Fields["hostPlatform"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "wacDomain", { + get: function () { return this.Fields["wacDomain"]; }, + set: function (value) { this.Fields["wacDomain"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "isLocalStorageAvailable", { + get: function () { return this.Fields["isLocalStorageAvailable"]; }, + set: function (value) { this.Fields["isLocalStorageAvailable"] = value; }, + enumerable: true, + configurable: true + }); + CheckWACHostUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("isWacKnownHost", this.isWacKnownHost); + this.SetSerializedField("instanceId", this.instanceId); + this.SetSerializedField("hostType", this.hostType); + this.SetSerializedField("hostPlatform", this.hostPlatform); + this.SetSerializedField("wacDomain", this.wacDomain); + this.SetSerializedField("isLocalStorageAvailable", this.isLocalStorageAvailable); + }; + return CheckWACHostUsageData; + }(BaseUsageData)); + OSFLog.CheckWACHostUsageData = CheckWACHostUsageData; +})(OSFLog || (OSFLog = {})); +var Logger; +(function (Logger) { + "use strict"; + var TraceLevel; + (function (TraceLevel) { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error"; + })(TraceLevel = Logger.TraceLevel || (Logger.TraceLevel = {})); + var SendFlag; + (function (SendFlag) { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush"; + })(SendFlag = Logger.SendFlag || (Logger.SendFlag = {})); + function allowUploadingData() { + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) { + } + Logger.sendLog = sendLog; + function creatULSEndpoint() { + try { + return new ULSEndpointProxy(); + } + catch (e) { + return null; + } + } + var ULSEndpointProxy = (function () { + function ULSEndpointProxy() { + } + ULSEndpointProxy.prototype.writeLog = function (log) { + }; + ULSEndpointProxy.prototype.loadProxyFrame = function () { + }; + return ULSEndpointProxy; + }()); + if (!OSF.Logger) { + OSF.Logger = Logger; + } + Logger.ulsEndpoint = creatULSEndpoint(); +})(Logger || (Logger = {})); +var OSFAriaLogger; +(function (OSFAriaLogger) { + var TelemetryEventAppActivated = { name: "AppActivated", enabled: true, critical: true, points: [ + { name: "Browser", type: "string" }, + { name: "Message", type: "string" }, + { name: "Host", type: "string" }, + { name: "AppSizeWidth", type: "int64" }, + { name: "AppSizeHeight", type: "int64" }, + { name: "IsFromWacAutomation", type: "string" }, + { name: "IsMOS", type: "int64" }, + ] }; + var TelemetryEventScriptLoad = { name: "ScriptLoad", enabled: true, critical: false, points: [ + { name: "ScriptId", type: "string" }, + { name: "StartTime", type: "double" }, + { name: "ResponseTime", type: "double" }, + ] }; + var enableAPIUsage = shouldAPIUsageBeEnabled(); + var TelemetryEventApiUsage = { name: "APIUsage", enabled: enableAPIUsage, critical: false, points: [ + { name: "APIType", type: "string" }, + { name: "APIID", type: "int64" }, + { name: "Parameters", type: "string" }, + { name: "ResponseTime", type: "int64" }, + { name: "ErrorType", type: "int64" }, + ] }; + var TelemetryEventAppInitialization = { name: "AppInitialization", enabled: true, critical: false, points: [ + { name: "SuccessCode", type: "int64" }, + { name: "Message", type: "string" }, + ] }; + var TelemetryEventAppClosed = { name: "AppClosed", enabled: true, critical: false, points: [ + { name: "FocusTime", type: "int64" }, + { name: "AppSizeFinalWidth", type: "int64" }, + { name: "AppSizeFinalHeight", type: "int64" }, + { name: "OpenTime", type: "int64" }, + ] }; + var TelemetryEventCheckWACHost = { name: "CheckWACHost", enabled: true, critical: false, points: [ + { name: "isWacKnownHost", type: "int64" }, + { name: "solutionId", type: "string" }, + { name: "hostType", type: "string" }, + { name: "hostPlatform", type: "string" }, + { name: "correlationId", type: "string" }, + { name: "isLocalStorageAvailable", type: "boolean" }, + ] }; + var TelemetryEvents = [ + TelemetryEventAppActivated, + TelemetryEventScriptLoad, + TelemetryEventApiUsage, + TelemetryEventAppInitialization, + TelemetryEventAppClosed, + TelemetryEventCheckWACHost, + ]; + function createDataField(value, point) { + var key = point.rename === undefined ? point.name : point.rename; + var type = point.type; + var field = undefined; + switch (type) { + case "string": + field = oteljs.makeStringDataField(key, value); + break; + case "double": + if (typeof value === "string") { + value = parseFloat(value); + } + field = oteljs.makeDoubleDataField(key, value); + break; + case "int64": + if (typeof value === "string") { + value = parseInt(value); + } + field = oteljs.makeInt64DataField(key, value); + break; + case "boolean": + if (typeof value === "string") { + value = value === "true"; + } + field = oteljs.makeBooleanDataField(key, value); + break; + } + return field; + } + function getEventDefinition(eventName) { + for (var _i = 0, TelemetryEvents_1 = TelemetryEvents; _i < TelemetryEvents_1.length; _i++) { + var event_1 = TelemetryEvents_1[_i]; + if (event_1.name === eventName) { + return event_1; + } + } + return undefined; + } + function eventEnabled(eventName) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return false; + } + return eventDefinition.enabled; + } + function shouldAPIUsageBeEnabled() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function generateTelemetryEvent(eventName, telemetryData) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return undefined; + } + var dataFields = []; + for (var _i = 0, _a = eventDefinition.points; _i < _a.length; _i++) { + var point = _a[_i]; + var key = point.name; + var value = telemetryData[key]; + if (value === undefined) { + continue; + } + var field = createDataField(value, point); + if (field !== undefined) { + dataFields.push(field); + } + } + var flags = { dataCategories: oteljs.DataCategories.ProductServiceUsage }; + if (eventDefinition.critical) { + flags.samplingPolicy = oteljs.SamplingPolicy.CriticalBusinessImpact; + } + flags.diagnosticLevel = oteljs.DiagnosticLevel.NecessaryServiceDataEvent; + var eventNameFull = "Office.Extensibility.OfficeJs." + eventName + "X"; + var event = { eventName: eventNameFull, dataFields: dataFields, eventFlags: flags }; + return event; + } + function sendOtelTelemetryEvent(eventName, telemetryData) { + if (eventEnabled(eventName)) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var event = generateTelemetryEvent(eventName, telemetryData); + if (event === undefined) { + return; + } + Microsoft.Office.WebExtension.sendTelemetryEvent(event); + }); + } + } + } + var AriaLogger = (function () { + function AriaLogger() { + } + AriaLogger.prototype.getAriaCDNLocation = function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "ariatelemetry/aria-web-telemetry.js"); + }; + AriaLogger.getInstance = function () { + if (AriaLogger.AriaLoggerObj === undefined) { + AriaLogger.AriaLoggerObj = new AriaLogger(); + } + return AriaLogger.AriaLoggerObj; + }; + AriaLogger.prototype.isIUsageData = function (arg) { + return arg["Fields"] !== undefined; + }; + AriaLogger.prototype.shouldSendDirectToAria = function (flavor, version) { + var BASE10 = 10; + var MAX_VERSION_WIN32 = [16, 0, 11601]; + var MAX_VERSION_MAC = [16, 28]; + var max_version; + if (!flavor) { + return false; + } + else if (flavor.toLowerCase() === "win32") { + max_version = MAX_VERSION_WIN32; + } + else if (flavor.toLowerCase() === "mac") { + max_version = MAX_VERSION_MAC; + } + else { + return true; + } + if (!version) { + return false; + } + var versionTokens = version.split('.'); + for (var i = 0; i < max_version.length && i < versionTokens.length; i++) { + var versionToken = parseInt(versionTokens[i], BASE10); + if (isNaN(versionToken)) { + return false; + } + if (versionToken < max_version[i]) { + return true; + } + if (versionToken > max_version[i]) { + return false; + } + } + return false; + }; + AriaLogger.prototype.isDirectToAriaEnabled = function () { + if (this.EnableDirectToAria === undefined || this.EnableDirectToAria === null) { + var flavor = void 0; + var version = void 0; + if (OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo) { + flavor = OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]; + } + if (window.external && typeof window.external.GetContext !== "undefined" && typeof window.external.GetContext().GetHostFullVersion !== "undefined") { + version = window.external.GetContext().GetHostFullVersion(); + } + this.EnableDirectToAria = this.shouldSendDirectToAria(flavor, version); + } + return this.EnableDirectToAria; + }; + AriaLogger.prototype.sendTelemetry = function (tableName, telemetryData) { + var startAfterMs = 1000; + var sendAriaEnabled = AriaLogger.EnableSendingTelemetryWithLegacyAria && this.isDirectToAriaEnabled(); + if (sendAriaEnabled) { + OSF.OUtil.loadScript(this.getAriaCDNLocation(), function () { + try { + if (!this.ALogger) { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); + } + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for (var key in telemetryData) { + if (key.toLowerCase() !== "table") { + eventProperties.setProperty(key, telemetryData[key]); + } + } + var today = new Date(); + eventProperties.setProperty("Date", today.toISOString()); + this.ALogger.logEvent(eventProperties); + } + catch (e) { + } + }, startAfterMs); + } + if (AriaLogger.EnableSendingTelemetryWithOTel) { + sendOtelTelemetryEvent(tableName, telemetryData); + } + }; + AriaLogger.prototype.logData = function (data) { + if (this.isIUsageData(data)) { + this.sendTelemetry(data["Table"], data["Fields"]); + } + else { + this.sendTelemetry(data["Table"], data); + } + }; + AriaLogger.EnableSendingTelemetryWithOTel = true; + AriaLogger.EnableSendingTelemetryWithLegacyAria = false; + return AriaLogger; + }()); + OSFAriaLogger.AriaLogger = AriaLogger; +})(OSFAriaLogger || (OSFAriaLogger = {})); +var OSFAppTelemetry; +(function (OSFAppTelemetry) { + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + var privateAddinId = "PRIVATE"; + OSFAppTelemetry.enableTelemetry = true; + ; + var AppInfo = (function () { + function AppInfo() { + } + return AppInfo; + }()); + OSFAppTelemetry.AppInfo = AppInfo; + var Event = (function () { + function Event(name, handler) { + this.name = name; + this.handler = handler; + } + return Event; + }()); + var AppStorage = (function () { + function AppStorage() { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set"; + } + AppStorage.prototype.getClientId = function () { + var clientId = this.getValue(this.clientIDKey); + if (!clientId || clientId.length <= 0 || clientId.length > 40) { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey, clientId); + } + return clientId; + }; + AppStorage.prototype.saveLog = function (logId, log) { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = ((logIdSet && logIdSet.length > 0) ? (logIdSet + ";") : "") + logId; + this.setValue(this.logIdSetKey, logIdSet); + this.setValue(logId, log); + }; + AppStorage.prototype.enumerateLog = function (callback, clean) { + var logIdSet = this.getValue(this.logIdSetKey); + if (logIdSet) { + var ids = logIdSet.split(";"); + for (var id in ids) { + var logId = ids[id]; + var log = this.getValue(logId); + if (log) { + if (callback) { + callback(logId, log); + } + if (clean) { + this.remove(logId); + } + } + } + if (clean) { + this.remove(this.logIdSetKey); + } + } + }; + AppStorage.prototype.getValue = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if (osfLocalStorage) { + value = osfLocalStorage.getItem(key); + } + return value; + }; + AppStorage.prototype.setValue = function (key, value) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + osfLocalStorage.setItem(key, value); + } + }; + AppStorage.prototype.remove = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + try { + osfLocalStorage.removeItem(key); + } + catch (ex) { + } + } + }; + return AppStorage; + }()); + var AppLogger = (function () { + function AppLogger() { + } + AppLogger.prototype.LogData = function (data) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } + }; + AppLogger.prototype.LogRawData = function (log) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); + } + catch (e) { + } + }; + return AppLogger; + }()); + function trimStringToLowerCase(input) { + if (input) { + input = input.replace(/[{}]/g, "").toLowerCase(); + } + return (input || ""); + } + function initialize(context) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + if (appInfo) { + return; + } + appInfo = new AppInfo(); + if (context.get_hostFullVersion()) { + appInfo.hostVersion = context.get_hostFullVersion(); + } + else { + appInfo.hostVersion = context.get_appVersion(); + } + appInfo.appId = canSendAddinId() ? context.get_id() : privateAddinId; + appInfo.marketplaceType = context._marketplaceType; + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage()).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if (appInfo.appInstanceId) { + appInfo.appInstanceId = trimStringToLowerCase(appInfo.appInstanceId); + appInfo.appInstanceId = getCompliantAppInstanceId(context.get_id(), appInfo.appInstanceId); + } + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "0.0.0.0"; + if (context._wacHostEnvironment) { + appInfo.wacHostEnvironment = context._wacHostEnvironment; + } + if (context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) { + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + } + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if (url) { + url = url.split("?")[0].split("#")[0]; + } + appInfo.isMos = isMos(); + appInfo.appURL = ""; + (function getUserIdAndAssetIdFromToken(token, appInfo) { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try { + xmlContent = decodeURIComponent(token); + parser = new DOMParser(); + xmlDoc = parser.parseFromString(xmlContent, "text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if (cidNode && cidNode.nodeValue) { + appInfo.userId = cidNode.nodeValue; + } + else if (oidNode && oidNode.nodeValue) { + appInfo.userId = oidNode.nodeValue; + } + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue; + } + catch (e) { + } + finally { + xmlContent = null; + xmlDoc = null; + parser = null; + } + })(context.get_eToken(), appInfo); + appInfo.sessionId = sessionId; + if (typeof OTel !== "undefined") { + OTel.OTelLogger.initialize(appInfo); + } + (function handleLifecycle() { + var startTime = new Date(); + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function () { + if (document.hasFocus()) { + if (lastFocus == null) { + lastFocus = new Date(); + } + } + else if (lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + }; + var eventList = []; + eventList.push(new Event("focus", adjustFocusTime)); + eventList.push(new Event("blur", adjustFocusTime)); + eventList.push(new Event("focusout", adjustFocusTime)); + eventList.push(new Event("focusin", adjustFocusTime)); + var exitFunction = function () { + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.removeEventListener(window, eventList[i].name, eventList[i].handler); + } + eventList.length = 0; + if (!finished) { + if (document.hasFocus() && lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date()).getTime() - startTime.getTime()), focusTime); + finished = true; + } + }; + eventList.push(new Event("beforeunload", exitFunction)); + eventList.push(new Event("unload", exitFunction)); + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.addEventListener(window, eventList[i].name, eventList[i].handler); + } + adjustFocusTime(); + })(); + OSFAppTelemetry.onAppActivated(); + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() { + if (!appInfo) { + return; + } + (new AppStorage()).enumerateLog(function (id, log) { return (new AppLogger()).LogRawData(log); }, true); + var data = new OSFLog.AppActivatedUsageData(); + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = ""; + data.UserId = ""; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if (appInfo.wacHostEnvironment) { + data.WacHostEnvironment = appInfo.wacHostEnvironment; + } + if (appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) { + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + } + data.IsMOS = appInfo.isMos ? 1 : 0; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) { + var data = new OSFLog.ScriptLoadUsageData(); + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) { + if (!appInfo) { + return; + } + if (!isAllowedHost() || !isAPIUsageEnabledDispId(id, apiType)) { + return; + } + var data = new OSFLog.APIUsageUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCallDone = onCallDone; + ; + function onMethodDone(id, args, msResponseTime, errorType) { + var parameters = null; + if (args) { + if (typeof args == "number") { + parameters = String(args); + } + else if (typeof args === "object") { + for (var index in args) { + if (parameters !== null) { + parameters += ","; + } + else { + parameters = ""; + } + if (typeof args[index] == "number") { + parameters += String(args[index]); + } + } + } + else { + parameters = ""; + } + } + OSF.AppTelemetry.onCallDone("method", id, parameters, msResponseTime, errorType); + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) { + OSF.AppTelemetry.onCallDone("property", -1, propertyName, msResponseTime); + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onCheckWACHost(isWacKnownHost, instanceId, hostType, hostPlatform, wacDomain, isLocalStorageAvailable) { + var data = new OSFLog.CheckWACHostUsageData(); + data.isWacKnownHost = isWacKnownHost; + data.instanceId = instanceId; + data.hostType = hostType; + data.hostPlatform = hostPlatform; + data.isLocalStorageAvailable = isLocalStorageAvailable; + data.wacDomain = ""; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCheckWACHost = onCheckWACHost; + function onEventDone(id, errorType) { + OSF.AppTelemetry.onCallDone("event", id, null, 0, errorType); + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent", id, null, msResponseTime, errorType); + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) { + if (!appInfo) { + return; + } + var data = new OSFLog.AppClosedUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage()).saveLog(sessionId, data.SerializeRow()); + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId); + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) { + var data = new OSFLog.AppInitializationUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) { + doAppInitializationLogging(false, message); + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) { + doAppInitializationLogging(true, errorMessage); + } + OSFAppTelemetry.logAppException = logAppException; + function isAllowedHost() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function isAPIUsageEnabledDispId(dispId, apiType) { + if (apiType === "method") { + switch (dispId) { + case 4: + case 38: + case 37: + case 10: + case 12: + case -10: + return true; + default: + return false; + } + } + return false; + } + function canSendAddinId() { + var isPublic = (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.PublicAddin) != 0; + if (isPublic) { + return isPublic; + } + if (!appInfo) { + return false; + } + var hostPlatform = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + var hostVersion = appInfo.hostVersion; + return _isComplianceExceptedHost(hostPlatform, hostVersion); + } + OSFAppTelemetry.canSendAddinId = canSendAddinId; + function getCompliantAppInstanceId(addinId, appInstanceId) { + if (!canSendAddinId() && appInstanceId === addinId) { + return privateAddinId; + } + return appInstanceId; + } + OSFAppTelemetry.getCompliantAppInstanceId = getCompliantAppInstanceId; + function _isComplianceExceptedHost(hostPlatform, hostVersion) { + var excepted = false; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(hostVersion); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (hostPlatform == "win32") { + if (major < 16 || major == 16 && build < 14225) { + excepted = true; + } + } + else if (hostPlatform == "mac") { + if (major < 16 || (major == 16 && (minor < 52 || minor == 52 && build < 808))) { + excepted = true; + } + } + } + return excepted; + } + OSFAppTelemetry._isComplianceExceptedHost = _isComplianceExceptedHost; + function isMos() { + return (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.IsMos) != 0; + } + OSFAppTelemetry.isMos = isMos; + OSF.AppTelemetry = OSFAppTelemetry; +})(OSFAppTelemetry || (OSFAppTelemetry = {})); +var OSFPerfUtil; +(function (OSFPerfUtil) { + function prepareDataFieldsForOtel(resource, name) { + name = name + "_Resource"; + if (oteljs !== undefined) { + return [ + oteljs.makeDoubleDataField(name + "_responseEnd", resource.responseEnd), + oteljs.makeDoubleDataField(name + "_responseStart", resource.responseStart), + oteljs.makeDoubleDataField(name + "_startTime", resource.startTime), + oteljs.makeDoubleDataField(name + "_transferSize", resource.transferSize) + ]; + } + } + function sendPerformanceTelemetry() { + if (typeof OTel !== "undefined" && OSF.AppTelemetry.enableTelemetry && typeof OSFPerformance !== "undefined" && typeof (performance) != "undefined" && performance.getEntriesByType) { + var hostPerfResource_1; + var officePerfResource_1; + var resources = performance.getEntriesByType("resource"); + resources.forEach(function (resource) { + var resourceName = resource.name.toLowerCase(); + if (OSF.OUtil.stringEndsWith(resourceName, OSFPerformance.hostSpecificFileName)) { + hostPerfResource_1 = resource; + } + else if (OSF.OUtil.stringEndsWith(resourceName, OSF.ConstantNames.OfficeDebugJS) || + OSF.OUtil.stringEndsWith(resourceName, OSF.ConstantNames.OfficeJS)) { + officePerfResource_1 = resource; + } + }); + OTel.OTelLogger.onTelemetryLoaded(function () { + var dataFields = prepareDataFieldsForOtel(hostPerfResource_1, "HostJs"); + dataFields = dataFields.concat(prepareDataFieldsForOtel(officePerfResource_1, "OfficeJs")); + dataFields = dataFields.concat([ + oteljs.makeDoubleDataField("officeExecuteStartDate", OSFPerformance.officeExecuteStartDate), + oteljs.makeDoubleDataField("officeExecuteStart", OSFPerformance.officeExecuteStart), + oteljs.makeDoubleDataField("officeExecuteEnd", OSFPerformance.officeExecuteEnd), + oteljs.makeDoubleDataField("hostInitializationStart", OSFPerformance.hostInitializationStart), + oteljs.makeDoubleDataField("hostInitializationEnd", OSFPerformance.hostInitializationEnd), + oteljs.makeDoubleDataField("totalJSHeapSize", OSFPerformance.totalJSHeapSize), + oteljs.makeDoubleDataField("usedJSHeapSize", OSFPerformance.usedJSHeapSize), + oteljs.makeDoubleDataField("jsHeapSizeLimit", OSFPerformance.jsHeapSizeLimit), + oteljs.makeDoubleDataField("getAppContextStart", OSFPerformance.getAppContextStart), + oteljs.makeDoubleDataField("getAppContextEnd", OSFPerformance.getAppContextEnd), + oteljs.makeDoubleDataField("createOMEnd", OSFPerformance.createOMEnd), + oteljs.makeDoubleDataField("officeOnReady", OSFPerformance.officeOnReady), + oteljs.makeBooleanDataField("isSharedRuntime", (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.SharedApp) !== 0) + ]); + Microsoft.Office.WebExtension.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.JSPerformanceTelemetryV06", + dataFields: dataFields, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage, + diagnosticLevel: oteljs.DiagnosticLevel.NecessaryServiceDataEvent + } + }); + }); + } + } + OSFPerfUtil.sendPerformanceTelemetry = sendPerformanceTelemetry; +})(OSFPerfUtil || (OSFPerfUtil = {})); +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } + } +}; +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() { + var events = []; + for (var eventName in this._eventHandlers) + events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); + return events; + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) { + for (var eventName in this._eventHandlers) { + if (event == eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event == eventName) + return true; + } + return false; + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) + return true; + } + } + return false; + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._eventHandlers[eventType]; + if (handlers && !this.hasEventHandler(eventType, handler)) { + handlers.push(handler); + return true; + } + else { + return false; + } + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true; + } + return false; + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType, handler); + if (isFirstHandler && succeed) { + this.fireQueuedEvent(eventType); + } + return succeed; + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var index = 0; index < handlers.length; index++) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + return true; + } + } + } + return false; + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { + if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { + this._eventHandlers[eventType] = []; + return true; + } + return false; + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) { + this._objectEventHandlers[eventType][objectId] = []; + return true; + } + return false; + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } + return true; + } + else { + return false; + } + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if (_handlers != null) { + for (var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length == 0) { + queuedEvents.push(eventArgs); + } + else { + this.fireEvent(eventArgs); + } + return true; + } + else { + return false; + } + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length > 0) { + var eventHandler = eventHandlers[0]; + while (queuedEvents.length > 0) { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs); + } + return true; + } + } + return false; + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var queuedEvents = this._queuedEventsArgs[eventType]; + if (queuedEvents) { + this._queuedEventsArgs[eventType] = []; + } + } + } +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { + var args; + switch (eventType) { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties, target.document), eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties, target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" && OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + OSF.DDA.convertOlkAppointmentTimeToDateFormat(args); + } + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecurrenceChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecurrenceChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AttachmentsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAttachmentsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.InfobarClicked: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkInfobarClickedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSelectedItemsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSensitivityLabelChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + return args; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + "types": ["function", "object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [] +}); +OSF.DialogShownStatus = { hasDialogShown: false, isWindowDialog: false }; +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogMessageReceivedEvent: "DialogMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + MessageType: "messageType", + MessageContent: "messageContent", + MessageOrigin: "messageOrigin" +}); +OSF.DDA.DialogEventType = {}; +OSF.OUtil.augmentList(OSF.DDA.DialogEventType, { + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" +}); +OSF.DDA.AsyncMethodNames.addNames({ + DisplayDialogAsync: "displayDialogAsync", + DisplayModalDialogAsync: "displayModalDialogAsync", + CloseAsync: "close" +}); +OSF.DDA.SyncMethodNames.addNames({ + MessageParent: "messageParent", + MessageChild: "messageChild", + SendMessage: "sendMessage", + AddMessageHandler: "addEventHandler" +}); +OSF.DDA.UI.ParentUI = function OSF_DDA_ParentUI() { + var eventDispatch; + if (Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived != null) { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived, + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + ]); + } + else { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived + ]); + } + var target = this; + var defineDialogApi = function (apiName, isModalApi) { + if (!target[apiName]) { + OSF.OUtil.defineEnumerableProperty(target, apiName, { + value: function () { + var openDialog = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments, eventDispatch, target, isModalApi); + } + }); + } + }; + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName, false); + if (Microsoft.Office.WebExtension.FeatureGates["ModalWebDialogAPI"]) { + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName, true); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DDA.UI.ChildUI = function OSF_DDA_ChildUI(isPopupWindow) { + var messageParentName = OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target = this; + if (!target[messageParentName]) { + OSF.OUtil.defineEnumerableProperty(target, messageParentName, { + value: function () { + var messageParent = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments, target); + } + }); + } + var addEventHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if (!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch != "undefined") { + OSF.DDA.DispIdHost.addEventSupport(target, OSF.DialogParentMessageEventDispatch, isPopupWindow); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DialogHandler = function OSF_DialogHandler() { }; +OSF.DDA.DialogEventArgs = function OSF_DDA_DialogEventArgs(message) { + if (message[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogMessageReceived) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); + } + else { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogEventReceived + }, + "error": { + value: message[OSF.DDA.PropertyDescriptors.MessageType] + } + }); + } +}; +OSF.DDA.DialogParentEventArgs = function OSF_DDA_DialogParentEventArgs(message) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); +}; +var DialogApiManager = (function () { + function DialogApiManager() { + } + DialogApiManager.defineApi = function (apiName, supportedOptions) { + var asyncMethodCalls = OSF.DDA.AsyncMethodCalls; + asyncMethodCalls.define({ + method: apiName, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: supportedOptions, + privateStateCallbacks: [], + onSucceeded: function (args, caller, callArgs) { + var targetId = args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch = args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog = new OSF.DialogHandler(); + var closeDialog = OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, closeDialog, { + value: function () { + var closeDialogfunction = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments, targetId, eventDispatch, dialog); + } + }); + var addHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, addHandler, { + value: function () { + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(arguments, dialog, eventDispatch); + var eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType, handler); + } + }); + if (OSF.DDA.UI.EnableSendMessageDialogAPI === true) { + var sendMessage = OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, sendMessage, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var messageChild = OSF.DDA.SyncMethodNames.MessageChild.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, messageChild, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + return dialog; + }, + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs] = true; + } + return callArgs; + } + }); + }; + DialogApiManager.messageChildRichApiBridge = function () { + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, null, null); + } + }; + DialogApiManager.initOnce = function () { + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync, DialogApiManager.displayDialogAsyncApiSupportedOptions); + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync, DialogApiManager.displayModalDialogAsyncApiSupportedOptions); + }; + DialogApiManager.displayDialogAsyncApiSupportedOptions = [ + { + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.EnforceAppDomain, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]; + DialogApiManager.displayModalDialogAsyncApiSupportedOptions = DialogApiManager.displayDialogAsyncApiSupportedOptions.concat([ + { + name: "abortWhenParentIsMinimized", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: "abortWhenDocIsInactive", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]); + return DialogApiManager; +}()); +DialogApiManager.initOnce(); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageToParent, + "types": ["string", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageContent, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.openDialog = function OSF_DDA_SafeArray_Delegate$OpenDialog(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + OSF.ClientHostController.openDialog(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.closeDialog = function OSF_DDA_SafeArray_Delegate$CloseDialog(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.closeDialog(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.messageParent = function OSF_DDA_SafeArray_Delegate$MessageParent(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime = (new Date()).getTime(); + var result = OSF.ClientHostController.messageParent(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), result); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: 1 }, + { name: OSF.DDA.PropertyDescriptors.MessageOrigin, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.sendMessage = function OSF_DDA_SafeArray_Delegate$SendMessage(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime = (new Date()).getTime(); + var result = OSF.ClientHostController.sendMessage(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogParentMessageReceivedEvent: "DialogParentMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogParentMessageReceived: "dialogParentMessageReceived", + DialogParentEventReceived: "dialogParentEventReceived" +}); +OSF.DialogParentMessageEventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogParentEventReceived +]); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: 1 }, + { name: OSF.DDA.PropertyDescriptors.MessageOrigin, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.UI.EnableMessageChildDialogAPI = true; +Microsoft.Office.WebExtension.TableData = function Microsoft_Office_WebExtension_TableData(rows, headers) { + function fixData(data) { + if (data == null || data == undefined) { + return null; + } + try { + for (var dim = OSF.DDA.DataCoercion.findArrayDimensionality(data, 2); dim < 2; dim++) { + data = [data]; + } + return data; + } + catch (ex) { + } + } + ; + OSF.OUtil.defineEnumerableProperties(this, { + "headers": { + get: function () { return headers; }, + set: function (value) { + headers = fixData(value); + } + }, + "rows": { + get: function () { return rows; }, + set: function (value) { + rows = (value == null || (OSF.OUtil.isArray(value) && (value.length == 0))) ? + [] : + fixData(value); + } + } + }); + this.headers = headers; + this.rows = rows; +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureTableData = function OSF_DDA_OMFactory$manufactureTableData(tableDataProperties) { + return new Microsoft.Office.WebExtension.TableData(tableDataProperties[OSF.DDA.TableDataProperties.TableRows], tableDataProperties[OSF.DDA.TableDataProperties.TableHeaders]); +}; +Microsoft.Office.WebExtension.CoercionType = { + Text: "text", + Matrix: "matrix", + Table: "table" +}; +OSF.DDA.DataCoercion = (function OSF_DDA_DataCoercion() { + return { + findArrayDimensionality: function OSF_DDA_DataCoercion$findArrayDimensionality(obj) { + if (OSF.OUtil.isArray(obj)) { + var dim = 0; + for (var index = 0; index < obj.length; index++) { + dim = Math.max(dim, OSF.DDA.DataCoercion.findArrayDimensionality(obj[index])); + } + return dim + 1; + } + else { + return 0; + } + }, + getCoercionDefaultForBinding: function OSF_DDA_DataCoercion$getCoercionDefaultForBinding(bindingType) { + switch (bindingType) { + case Microsoft.Office.WebExtension.BindingType.Matrix: return Microsoft.Office.WebExtension.CoercionType.Matrix; + case Microsoft.Office.WebExtension.BindingType.Table: return Microsoft.Office.WebExtension.CoercionType.Table; + case Microsoft.Office.WebExtension.BindingType.Text: + default: + return Microsoft.Office.WebExtension.CoercionType.Text; + } + }, + getBindingDefaultForCoercion: function OSF_DDA_DataCoercion$getBindingDefaultForCoercion(coercionType) { + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Matrix: return Microsoft.Office.WebExtension.BindingType.Matrix; + case Microsoft.Office.WebExtension.CoercionType.Table: return Microsoft.Office.WebExtension.BindingType.Table; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + return Microsoft.Office.WebExtension.BindingType.Text; + } + }, + determineCoercionType: function OSF_DDA_DataCoercion$determineCoercionType(data) { + if (data == null || data == undefined) + return null; + var sourceType = null; + var runtimeType = typeof data; + if (data.rows !== undefined) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Table; + } + else if (OSF.OUtil.isArray(data)) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Matrix; + } + else if (runtimeType == "string" || runtimeType == "number" || runtimeType == "boolean" || OSF.OUtil.isDate(data)) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Text; + } + else { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject; + } + return sourceType; + }, + coerceData: function OSF_DDA_DataCoercion$coerceData(data, destinationType, sourceType) { + sourceType = sourceType || OSF.DDA.DataCoercion.determineCoercionType(data); + if (sourceType && sourceType != destinationType) { + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin); + data = OSF.DDA.DataCoercion._coerceDataFromTable(destinationType, OSF.DDA.DataCoercion._coerceDataToTable(data, sourceType)); + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd); + } + return data; + }, + _matrixToText: function OSF_DDA_DataCoercion$_matrixToText(matrix) { + if (matrix.length == 1 && matrix[0].length == 1) + return "" + matrix[0][0]; + var val = ""; + for (var i = 0; i < matrix.length; i++) { + val += matrix[i].join("\t") + "\n"; + } + return val.substring(0, val.length - 1); + }, + _textToMatrix: function OSF_DDA_DataCoercion$_textToMatrix(text) { + var ret = text.split("\n"); + for (var i = 0; i < ret.length; i++) + ret[i] = ret[i].split("\t"); + return ret; + }, + _tableToText: function OSF_DDA_DataCoercion$_tableToText(table) { + var headers = ""; + if (table.headers != null) { + headers = OSF.DDA.DataCoercion._matrixToText([table.headers]) + "\n"; + } + var rows = OSF.DDA.DataCoercion._matrixToText(table.rows); + if (rows == "") { + headers = headers.substring(0, headers.length - 1); + } + return headers + rows; + }, + _tableToMatrix: function OSF_DDA_DataCoercion$_tableToMatrix(table) { + var matrix = table.rows; + if (table.headers != null) { + matrix.unshift(table.headers); + } + return matrix; + }, + _coerceDataFromTable: function OSF_DDA_DataCoercion$_coerceDataFromTable(coercionType, table) { + var value; + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value = table; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value = OSF.DDA.DataCoercion._tableToMatrix(table); + break; + case Microsoft.Office.WebExtension.CoercionType.SlideRange: + value = null; + if (OSF.DDA.OMFactory.manufactureSlideRange) { + value = OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(table)); + } + if (value == null) { + value = OSF.DDA.DataCoercion._tableToText(table); + } + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value = OSF.DDA.DataCoercion._tableToText(table); + break; + } + return value; + }, + _coerceDataToTable: function OSF_DDA_DataCoercion$_coerceDataToTable(data, sourceType) { + if (sourceType == undefined) { + sourceType = OSF.DDA.DataCoercion.determineCoercionType(data); + } + var value; + switch (sourceType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value = data; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value = new Microsoft.Office.WebExtension.TableData(data); + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value = new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(data)); + break; + } + return value; + } + }; +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.CoercionType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.CoercionType.Table, value: 2 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + GetSelectedDataAsync: "getSelectedDataAsync", + SetSelectedDataAsync: "setSelectedDataAsync" +}); +(function () { + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] != undefined || data[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) { + data = OSF.DDA.OMFactory.manufactureTableData(data); + } + data = OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data == undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CoercionType, + "enum": Microsoft.Office.WebExtension.CoercionType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + } + ], + privateStateCallbacks: [], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageLeft, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageTop, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetSelectedDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageLeft, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageTop, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageWidth, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageHeight, value: 5 }, + ] +}); +OSF.DDA.SettingsManager = { + SerializedSettings: "serializedSettings", + RefreshingSettings: "refreshingSettings", + DateJSONPrefix: "Date(", + DataJSONSuffix: ")", + serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { + return OSF.OUtil.serializeSettings(settingsCollection); + }, + deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { + return OSF.OUtil.deserializeSettings(serializedSettings); + } +}; +OSF.DDA.Settings = function OSF_DDA_Settings(settings) { + settings = settings || {}; + var cacheSessionSettings = function (settings) { + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var serializedSettings = OSF.DDA.SettingsManager.serializeSettings(settings); + var storageSettings = JSON ? JSON.stringify(serializedSettings) : Sys.Serialization.JavaScriptSerializer.serialize(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + }; + OSF.OUtil.defineEnumerableProperties(this, { + "get": { + value: function OSF_DDA_Settings$get(name) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + var setting = settings[name]; + return typeof (setting) === 'undefined' ? null : setting; + } + }, + "set": { + value: function OSF_DDA_Settings$set(name, value) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false }, + { name: "value", mayBeNull: true } + ]); + if (e) + throw e; + settings[name] = value; + cacheSessionSettings(settings); + } + }, + "remove": { + value: function OSF_DDA_Settings$remove(name) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete settings[name]; + cacheSessionSettings(settings); + } + } + }); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.SaveAsync], settings); +}; +OSF.DDA.RefreshableSettings = function OSF_DDA_RefreshableSettings(settings) { + OSF.DDA.RefreshableSettings.uber.constructor.call(this, settings); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.RefreshAsync], settings); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged])); +}; +OSF.OUtil.extend(OSF.DDA.RefreshableSettings, OSF.DDA.Settings); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + SettingsChanged: "settingsChanged" +}); +OSF.DDA.SettingsChangedEventArgs = function OSF_DDA_SettingsChangedEventArgs(settingsInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.SettingsChanged + }, + "settings": { + value: settingsInstance + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ + RefreshAsync: "refreshAsync", + SaveAsync: "saveAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RefreshAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.RefreshingSettings, + value: function getRefreshingSettings(settingsInstance, settingsCollection) { + return settingsCollection; + } + } + ], + onSucceeded: function deserializeSettings(serializedSettingsDescriptor, refreshingSettings, refreshingSettingsArgs) { + var serializedSettings = serializedSettingsDescriptor[OSF.DDA.SettingsManager.SerializedSettings]; + var newSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + var oldSettings = refreshingSettingsArgs[OSF.DDA.SettingsManager.RefreshingSettings]; + for (var setting in oldSettings) { + refreshingSettings.remove(setting); + } + for (var setting in newSettings) { + refreshingSettings.set(setting, newSettings[setting]); + } + return refreshingSettings; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SaveAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, + value: { + "types": ["boolean"], + "defaultValue": true + } + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.SerializedSettings, + value: function serializeSettings(settingsInstance, settingsCollection) { + return OSF.DDA.SettingsManager.serializeSettings(settingsCollection); + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidLoadSettingsMethod, + fromHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSaveSettingsMethod, + toHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SettingsManager.SerializedSettings }, + { name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, value: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidSettingsChangedEvent }); +Microsoft.Office.WebExtension.BindingType = { + Table: "table", + Text: "text", + Matrix: "matrix" +}; +OSF.DDA.BindingProperties = { + Id: "BindingId", + Type: Microsoft.Office.WebExtension.Parameters.BindingType +}; +OSF.OUtil.augmentList(OSF.DDA.ListDescriptors, { BindingList: "BindingList" }); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + Subset: "subset", + BindingProperties: "BindingProperties" +}); +OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList, OSF.DDA.PropertyDescriptors.BindingProperties); +OSF.DDA.BindingPromise = function OSF_DDA_BindingPromise(bindingId, errorCallback) { + this._id = bindingId; + OSF.OUtil.defineEnumerableProperty(this, "onFail", { + get: function () { + return errorCallback; + }, + set: function (onError) { + var t = typeof onError; + if (t != "undefined" && t != "function") { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, t); + } + errorCallback = onError; + } + }); +}; +OSF.DDA.BindingPromise.prototype = { + _fetch: function OSF_DDA_BindingPromise$_fetch(onComplete) { + if (this.binding) { + if (onComplete) + onComplete(this.binding); + } + else { + if (!this._binding) { + var me = this; + Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(this._id, function (asyncResult) { + if (asyncResult.status == Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded) { + OSF.OUtil.defineEnumerableProperty(me, "binding", { + value: asyncResult.value + }); + if (onComplete) + onComplete(me.binding); + } + else { + if (me.onFail) + me.onFail(asyncResult); + } + }); + } + } + return this; + }, + getDataAsync: function OSF_DDA_BindingPromise$getDataAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.getDataAsync.apply(binding, args); }); + return this; + }, + setDataAsync: function OSF_DDA_BindingPromise$setDataAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setDataAsync.apply(binding, args); }); + return this; + }, + addHandlerAsync: function OSF_DDA_BindingPromise$addHandlerAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.addHandlerAsync.apply(binding, args); }); + return this; + }, + removeHandlerAsync: function OSF_DDA_BindingPromise$removeHandlerAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.removeHandlerAsync.apply(binding, args); }); + return this; + } +}; +OSF.DDA.BindingFacade = function OSF_DDA_BindingFacade(docInstance) { + this._eventDispatches = []; + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: docInstance + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddFromSelectionAsync, + am.AddFromNamedItemAsync, + am.GetAllAsync, + am.GetByIdAsync, + am.ReleaseByIdAsync + ]); +}; +OSF.DDA.UnknownBinding = function OSF_DDA_UknonwnBinding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { value: docInstance }, + "id": { value: id } + }); +}; +OSF.DDA.Binding = function OSF_DDA_Binding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { + value: docInstance + }, + "id": { + value: id + } + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDataAsync, + am.SetDataAsync + ]); + var et = Microsoft.Office.WebExtension.EventType; + var bindingEventDispatches = docInstance.bindings._eventDispatches; + if (!bindingEventDispatches[id]) { + bindingEventDispatches[id] = new OSF.EventDispatch([ + et.BindingSelectionChanged, + et.BindingDataChanged + ]); + } + var eventDispatch = bindingEventDispatches[id]; + OSF.DDA.DispIdHost.addEventSupport(this, eventDispatch); +}; +OSF.DDA.generateBindingId = function OSF_DDA$GenerateBindingId() { + return "UnnamedBinding_" + OSF.OUtil.getUniqueId() + "_" + new Date().getTime(); +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureBinding = function OSF_DDA_OMFactory$manufactureBinding(bindingProperties, containingDocument) { + var id = bindingProperties[OSF.DDA.BindingProperties.Id]; + var rows = bindingProperties[OSF.DDA.BindingProperties.RowCount]; + var cols = bindingProperties[OSF.DDA.BindingProperties.ColumnCount]; + var hasHeaders = bindingProperties[OSF.DDA.BindingProperties.HasHeaders]; + var binding; + switch (bindingProperties[OSF.DDA.BindingProperties.Type]) { + case Microsoft.Office.WebExtension.BindingType.Text: + binding = new OSF.DDA.TextBinding(id, containingDocument); + break; + case Microsoft.Office.WebExtension.BindingType.Matrix: + binding = new OSF.DDA.MatrixBinding(id, containingDocument, rows, cols); + break; + case Microsoft.Office.WebExtension.BindingType.Table: + var isExcelApp = function () { + return (OSF.DDA.ExcelDocument) + && (Microsoft.Office.WebExtension.context.document) + && (Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument); + }; + var tableBindingObject; + if (isExcelApp() && OSF.DDA.ExcelTableBinding) { + tableBindingObject = OSF.DDA.ExcelTableBinding; + } + else { + tableBindingObject = OSF.DDA.TableBinding; + } + binding = new tableBindingObject(id, containingDocument, rows, cols, hasHeaders); + break; + default: + binding = new OSF.DDA.UnknownBinding(id, containingDocument); + } + return binding; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddFromSelectionAsync: "addFromSelectionAsync", + AddFromNamedItemAsync: "addFromNamedItemAsync", + GetAllAsync: "getAllAsync", + GetByIdAsync: "getByIdAsync", + ReleaseByIdAsync: "releaseByIdAsync", + GetDataAsync: "getDataAsync", + SetDataAsync: "setDataAsync" +}); +(function () { + function processBinding(bindingDescriptor) { + return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); + } + function getObjectId(obj) { return obj.id; } + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] != undefined || data[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) { + data = OSF.DDA.OMFactory.manufactureTableData(data); + } + data = OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data == undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromSelectionAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.ItemName, + "types": ["string"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, + value: function () { return true; } + } + ], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAllAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response) { return OSF.OUtil.mapList(response[OSF.DDA.ListDescriptors.BindingList], processBinding); } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response, caller, callArgs) { + var id = callArgs[Microsoft.Office.WebExtension.Parameters.Id]; + delete caller._eventDispatches[id]; + } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDataAsync, + requiredArguments: [], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs, binding) { return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(binding.type); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RowCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ColumnCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount] == 0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.RowCount]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] || + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] || + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.MatrixBinding = function OSF_DDA_MatrixBinding(id, docInstance, rows, cols) { + OSF.DDA.MatrixBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Matrix + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + } + }); +}; +OSF.OUtil.extend(OSF.DDA.MatrixBinding, OSF.DDA.Binding); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.BindingProperties, + fromHost: [ + { name: OSF.DDA.BindingProperties.Id, value: 0 }, + { name: OSF.DDA.BindingProperties.Type, value: 1 }, + { name: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.BindingType, + toHost: [ + { name: Microsoft.Office.WebExtension.BindingType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.BindingType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.BindingType.Table, value: 2 } + ], + invertible: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ItemName, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseBindingMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAllBindingsMethod, + fromHost: [ + { name: OSF.DDA.ListDescriptors.BindingList, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 3 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 4 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, + fromHost: [ + { name: OSF.DDA.BindingProperties.RowCount, value: 0 }, + { name: OSF.DDA.BindingProperties.ColumnCount, value: 1 }, + { name: OSF.DDA.BindingProperties.HasHeaders, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.Subset, + toHost: [ + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 0 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Run, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Offset, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Run, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.RowCount, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ColumnCount, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddColumnsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearAllRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { TableDataProperties: "TableDataProperties" }); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.TableDataProperties = { + TableRows: "TableRows", + TableHeaders: "TableHeaders" +}; +OSF.DDA.TableBinding = function OSF_DDA_TableBinding(id, docInstance, rows, cols, hasHeaders) { + OSF.DDA.TableBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Table + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + }, + "hasHeaders": { + value: hasHeaders ? hasHeaders : false + } + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddRowsAsync, + am.AddColumnsAsync, + am.DeleteAllDataValuesAsync + ]); +}; +OSF.OUtil.extend(OSF.DDA.TableBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ + AddRowsAsync: "addRowsAsync", + AddColumnsAsync: "addColumnsAsync", + DeleteAllDataValuesAsync: "deleteAllDataValuesAsync" +}); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddRowsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddColumnsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.DDA.TextBinding = function OSF_DDA_TextBinding(id, docInstance) { + OSF.DDA.TextBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperty(this, "type", { + value: Microsoft.Office.WebExtension.BindingType.Text + }); +}; +OSF.OUtil.extend(OSF.DDA.TextBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ AddFromPromptAsync: "addFromPromptAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromPromptAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptText, + value: { + "types": ["string"], + "calculate": function () { return Strings.OfficeOM.L_AddBindingFromPromptDefaultText; } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.SampleData, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: function (bindingDescriptor) { return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.PromptText, value: 2 } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DocumentSelectionChanged: "documentSelectionChanged" }); +OSF.DDA.DocumentSelectionChangedEventArgs = function OSF_DDA_DocumentSelectionChangedEventArgs(docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged + }, + "document": { + value: docInstance + } + }); +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs = function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDeletedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDataChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidContentControlAddedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + BindingSelectionChanged: "bindingSelectionChanged", + BindingDataChanged: "bindingDataChanged" +}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { BindingSelectionChangedEvent: "BindingSelectionChangedEvent" }); +OSF.DDA.BindingSelectionChangedEventArgs = function OSF_DDA_BindingSelectionChangedEventArgs(bindingInstance, subset) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingSelectionChanged + }, + "binding": { + value: bindingInstance + } + }); + for (var prop in subset) { + OSF.OUtil.defineEnumerableProperty(this, prop, { + value: subset[prop] + }); + } +}; +OSF.DDA.BindingDataChangedEventArgs = function OSF_DDA_BindingDataChangedEventArgs(bindingInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingDataChanged + }, + "binding": { + value: bindingInstance + } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingDataChangedEvent, + fromHost: [{ name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self }] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType, { OnlyVisible: "onlyVisible" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [{ name: Microsoft.Office.WebExtension.FilterType.OnlyVisible, value: 1 }] +}); +Microsoft.Office.WebExtension.GoToType = { + Binding: "binding", + NamedItem: "namedItem", + Slide: "slide", + Index: "index" +}; +Microsoft.Office.WebExtension.SelectionMode = { + Default: "default", + Selected: "selected", + None: "none" +}; +Microsoft.Office.WebExtension.Index = { + First: "first", + Last: "last", + Next: "next", + Previous: "previous" +}; +OSF.DDA.AsyncMethodNames.addNames({ GoToByIdAsync: "goToByIdAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GoToByIdAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string", "number"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.GoToType, + "enum": Microsoft.Office.WebExtension.GoToType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SelectionMode, + value: { + "enum": Microsoft.Office.WebExtension.SelectionMode, + "defaultValue": Microsoft.Office.WebExtension.SelectionMode.Default + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.GoToType, + toHost: [ + { name: Microsoft.Office.WebExtension.GoToType.Binding, value: 0 }, + { name: Microsoft.Office.WebExtension.GoToType.NamedItem, value: 1 }, + { name: Microsoft.Office.WebExtension.GoToType.Slide, value: 2 }, + { name: Microsoft.Office.WebExtension.GoToType.Index, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.SelectionMode, + toHost: [ + { name: Microsoft.Office.WebExtension.SelectionMode.Default, value: 0 }, + { name: Microsoft.Office.WebExtension.SelectionMode.Selected, value: 1 }, + { name: Microsoft.Office.WebExtension.SelectionMode.None, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidNavigateToMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.GoToType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.SelectionMode, value: 2 } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { RichApiMessage: "richApiMessage" }); +OSF.DDA.RichApiMessageEventArgs = function OSF_DDA_RichApiMessageEventArgs(eventType, eventProperties) { + var entryArray = eventProperties[Microsoft.Office.WebExtension.Parameters.Data]; + var entries = []; + if (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var elem = entryArray[i]; + if (elem.toArray) { + elem = elem.toArray(); + } + entries.push({ + messageCategory: elem[0], + messageType: elem[1], + targetId: elem[2], + message: elem[3], + id: elem[4], + isRemoteOverride: elem[5] + }); + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: Microsoft.Office.WebExtension.EventType.RichApiMessage }, + "entries": { value: entries } + }); +}; +(function (OfficeExt) { + var RichApiMessageManager = (function () { + function RichApiMessageManager() { + this._eventDispatch = null; + this._registerHandlers = []; + this._eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.RichApiMessage, + ]); + OSF.DDA.DispIdHost.addEventSupport(this, this._eventDispatch); + } + RichApiMessageManager.prototype.register = function (handler) { + var _this = this; + if (!this._registerWithHostPromise) { + this._registerWithHostPromise = new Office.Promise(function (resolve, reject) { + _this.addHandlerAsync(Microsoft.Office.WebExtension.EventType.RichApiMessage, function (args) { + _this._registerHandlers.forEach(function (value) { + if (value) { + value(args); + } + }); + }, function (asyncResult) { + if (asyncResult.status == 'failed') { + reject(asyncResult.error); + } + else { + resolve(); + } + }); + }); + } + return this._registerWithHostPromise.then(function () { + _this._registerHandlers.push(handler); + }); + }; + return RichApiMessageManager; + }()); + OfficeExt.RichApiMessageManager = RichApiMessageManager; +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidRichApiMessageEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync, + requiredArguments: [ + { + name: Microsoft.Office.WebExtension.Parameters.Data, + types: ["object"] + } + ], + supportedOptions: [] +}); +OSF.OUtil.setNamespace("RichApi", OSF.DDA); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.FilePropertiesDescriptor = { + Url: "Url" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FilePropertiesDescriptor: "FilePropertiesDescriptor" +}); +Microsoft.Office.WebExtension.FileProperties = function Microsoft_Office_WebExtension_FileProperties(filePropertiesDescriptor) { + OSF.OUtil.defineEnumerableProperties(this, { + "url": { + value: filePropertiesDescriptor[OSF.DDA.FilePropertiesDescriptor.Url] + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ GetFilePropertiesAsync: "getFilePropertiesAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: 0 } + ], + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (filePropertiesDescriptor, caller, callArgs) { + return new Microsoft.Office.WebExtension.FileProperties(filePropertiesDescriptor); + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, + fromHost: [ + { name: OSF.DDA.FilePropertiesDescriptor.Url, value: 0 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.ExcelTableBinding = function OSF_DDA_ExcelTableBinding(id, docInstance, rows, cols, hasHeaders) { + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.ClearFormatsAsync, + am.SetTableOptionsAsync, + am.SetFormatsAsync + ]); + OSF.DDA.ExcelTableBinding.uber.constructor.call(this, id, docInstance, rows, cols, hasHeaders); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelTableBinding, OSF.DDA.TableBinding); +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + privateStateCallbacks: [] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var Parameters = Microsoft.Office.WebExtension.Parameters; + if (callArgs[Parameters.StartRow] == 0 && + callArgs[Parameters.StartColumn] == 0 && + OSF.OUtil.isArray(callArgs[Parameters.CellFormat]) && callArgs[Parameters.CellFormat].length === 0 && + OSF.OUtil.isArray(callArgs[Parameters.TableOptions]) && callArgs[Parameters.TableOptions].length === 0) { + delete callArgs[Parameters.StartRow]; + delete callArgs[Parameters.StartColumn]; + delete callArgs[Parameters.CellFormat]; + delete callArgs[Parameters.TableOptions]; + } + if (callArgs[Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + ((callArgs[Parameters.StartRow] && callArgs[Parameters.StartRow] != 0) || + (callArgs[Parameters.StartColumn] && callArgs[Parameters.StartColumn] != 0) || + callArgs[Parameters.CellFormat] || + callArgs[Parameters.TableOptions])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: function (obj) { return obj.id; } + } + ] + }); + OSF.DDA.BindingPromise.prototype.setTableOptionsAsync = function OSF_DDA_BindingPromise$setTableOptionsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setTableOptionsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.setFormatsAsync = function OSF_DDA_BindingPromise$setFormatsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setFormatsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.clearFormatsAsync = function OSF_DDA_BindingPromise$clearFormatsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.clearFormatsAsync.apply(binding, args); }); + return this; + }; +})(); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodNames.addNames({ + ClearFormatsAsync: "clearFormatsAsync", + SetTableOptionsAsync: "setTableOptionsAsync", + SetFormatsAsync: "setFormatsAsync" + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ClearFormatsAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetTableOptionsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.TableOptions, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetFormatsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CellFormat, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +Microsoft.Office.WebExtension.Table = { + All: 0, + Data: 1, + Headers: 2 +}; +(function () { + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetTableOptionsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 3 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 5 } + ] + }); + var tableOptionProperties = { + headerRow: 0, + bandedRows: 1, + firstColumn: 2, + lastColumn: 3, + bandedColumns: 4, + filterButton: 5, + style: 6, + totalRow: 7 + }; + var cellProperties = { + row: 0, + column: 1 + }; + var formatProperties = { + alignHorizontal: { text: "alignHorizontal", type: 1 }, + alignVertical: { text: "alignVertical", type: 2 }, + backgroundColor: { text: "backgroundColor", type: 101 }, + borderStyle: { text: "borderStyle", type: 201 }, + borderColor: { text: "borderColor", type: 202 }, + borderTopStyle: { text: "borderTopStyle", type: 203 }, + borderTopColor: { text: "borderTopColor", type: 204 }, + borderBottomStyle: { text: "borderBottomStyle", type: 205 }, + borderBottomColor: { text: "borderBottomColor", type: 206 }, + borderLeftStyle: { text: "borderLeftStyle", type: 207 }, + borderLeftColor: { text: "borderLeftColor", type: 208 }, + borderRightStyle: { text: "borderRightStyle", type: 209 }, + borderRightColor: { text: "borderRightColor", type: 210 }, + borderOutlineStyle: { text: "borderOutlineStyle", type: 211 }, + borderOutlineColor: { text: "borderOutlineColor", type: 212 }, + borderInlineStyle: { text: "borderInlineStyle", type: 213 }, + borderInlineColor: { text: "borderInlineColor", type: 214 }, + fontFamily: { text: "fontFamily", type: 301 }, + fontStyle: { text: "fontStyle", type: 302 }, + fontSize: { text: "fontSize", type: 303 }, + fontUnderlineStyle: { text: "fontUnderlineStyle", type: 304 }, + fontColor: { text: "fontColor", type: 305 }, + fontDirection: { text: "fontDirection", type: 306 }, + fontStrikethrough: { text: "fontStrikethrough", type: 307 }, + fontSuperscript: { text: "fontSuperscript", type: 308 }, + fontSubscript: { text: "fontSubscript", type: 309 }, + fontNormal: { text: "fontNormal", type: 310 }, + indentLeft: { text: "indentLeft", type: 401 }, + indentRight: { text: "indentRight", type: 402 }, + numberFormat: { text: "numberFormat", type: 501 }, + width: { text: "width", type: 701 }, + height: { text: "height", type: 702 }, + wrapping: { text: "wrapping", type: 703 } + }; + var borderStyleSet = [ + { name: "none", value: 0 }, + { name: "thin", value: 1 }, + { name: "medium", value: 2 }, + { name: "dashed", value: 3 }, + { name: "dotted", value: 4 }, + { name: "thick", value: 5 }, + { name: "double", value: 6 }, + { name: "hair", value: 7 }, + { name: "medium dashed", value: 8 }, + { name: "dash dot", value: 9 }, + { name: "medium dash dot", value: 10 }, + { name: "dash dot dot", value: 11 }, + { name: "medium dash dot dot", value: 12 }, + { name: "slant dash dot", value: 13 }, + ]; + var colorSet = [ + { name: "none", value: 0 }, + { name: "black", value: 1 }, + { name: "blue", value: 2 }, + { name: "gray", value: 3 }, + { name: "green", value: 4 }, + { name: "orange", value: 5 }, + { name: "pink", value: 6 }, + { name: "purple", value: 7 }, + { name: "red", value: 8 }, + { name: "teal", value: 9 }, + { name: "turquoise", value: 10 }, + { name: "violet", value: 11 }, + { name: "white", value: 12 }, + { name: "yellow", value: 13 }, + { name: "automatic", value: 14 }, + ]; + var ns = OSF.DDA.SafeArray.Delegate.ParameterMap; + ns.define({ + type: formatProperties.alignHorizontal.text, + toHost: [ + { name: "general", value: 0 }, + { name: "left", value: 1 }, + { name: "center", value: 2 }, + { name: "right", value: 3 }, + { name: "fill", value: 4 }, + { name: "justify", value: 5 }, + { name: "center across selection", value: 6 }, + { name: "distributed", value: 7 }, + ] + }); + ns.define({ + type: formatProperties.alignVertical.text, + toHost: [ + { name: "top", value: 0 }, + { name: "center", value: 1 }, + { name: "bottom", value: 2 }, + { name: "justify", value: 3 }, + { name: "distributed", value: 4 }, + ] + }); + ns.define({ + type: formatProperties.backgroundColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderTopStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderTopColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderBottomStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderBottomColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderLeftStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderLeftColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderRightStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderRightColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderOutlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderOutlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderInlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderInlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontStyle.text, + toHost: [ + { name: "regular", value: 0 }, + { name: "italic", value: 1 }, + { name: "bold", value: 2 }, + { name: "bold italic", value: 3 }, + ] + }); + ns.define({ + type: formatProperties.fontUnderlineStyle.text, + toHost: [ + { name: "none", value: 0 }, + { name: "single", value: 1 }, + { name: "double", value: 2 }, + { name: "single accounting", value: 3 }, + { name: "double accounting", value: 4 }, + ] + }); + ns.define({ + type: formatProperties.fontColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontDirection.text, + toHost: [ + { name: "context", value: 0 }, + { name: "left-to-right", value: 1 }, + { name: "right-to-left", value: 2 }, + ] + }); + ns.define({ + type: formatProperties.width.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] + }); + ns.define({ + type: formatProperties.height.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] + }); + ns.define({ + type: Microsoft.Office.WebExtension.Parameters.TableOptions, + toHost: [ + { name: "headerRow", value: 0 }, + { name: "bandedRows", value: 1 }, + { name: "firstColumn", value: 2 }, + { name: "lastColumn", value: 3 }, + { name: "bandedColumns", value: 4 }, + { name: "filterButton", value: 5 }, + { name: "style", value: 6 }, + { name: "totalRow", value: 7 } + ] + }); + ns.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat] = { + toHost: function (data) { + for (var entry in data) { + if (data[entry].format) { + data[entry].format = ns.doMapValues(data[entry].format, "toHost"); + } + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$toHost(cellFormats) { + var textCells = "cells"; + var textFormat = "format"; + var posCells = 0; + var posFormat = 1; + var ret = []; + for (var index in cellFormats) { + var cfOld = cellFormats[index]; + var cfNew = []; + if (typeof (cfOld[textCells]) !== 'undefined') { + var cellsOld = cfOld[textCells]; + var cellsNew; + if (typeof cfOld[textCells] === "object") { + cellsNew = []; + for (var entry in cellsOld) { + if (typeof (cellProperties[entry]) !== 'undefined') { + cellsNew[cellProperties[entry]] = cellsOld[entry]; + } + } + } + else { + cellsNew = cellsOld; + } + cfNew[posCells] = cellsNew; + } + if (cfOld[textFormat]) { + var formatOld = cfOld[textFormat]; + var formatNew = []; + for (var entry2 in formatOld) { + if (typeof (formatProperties[entry2]) !== 'undefined') { + formatNew.push([ + formatProperties[entry2].type, + formatOld[entry2] + ]); + } + } + cfNew[posFormat] = formatNew; + } + ret[index] = cfNew; + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$fromHost(hostArgs) { + return hostArgs; + } + }); + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$toHost(tableOptions) { + var ret = []; + for (var entry in tableOptions) { + if (typeof (tableOptionProperties[entry]) !== 'undefined') { + ret[tableOptionProperties[entry]] = tableOptions[entry]; + } + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$fromHost(hostArgs) { + return hostArgs; + } + }); +})(); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType, { Image: "image" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType, { XmlSvg: "xmlSvg" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Image, value: 8 }, + { name: Microsoft.Office.WebExtension.CoercionType.XmlSvg, value: 9 } + ] +}); +Microsoft.Office.WebExtension.AccountTypeFilter = { + NoFilter: "noFilter", + AAD: "aad", + MSA: "msa" +}; +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth = function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.EnableNewHosts, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AccountTypeFilter, + value: { + "enum": Microsoft.Office.WebExtension.AccountTypeFilter, + "defaultValue": Microsoft.Office.WebExtension.AccountTypeFilter.NoFilter + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var _a; + var appContext = OSF._OfficeAppFactory.getInitializationHelper()._appContext; + if (appContext && appContext._wopiHostOriginForSingleSignOn) { + var addinTrustId = OSF.OUtil.Guid.generateNewGuid(); + window.parent.parent.postMessage("{\"MessageId\":\"AddinTrustedOrigin\",\"AddinTrustId\":\"" + addinTrustId + "\"}", appContext._wopiHostOriginForSingleSignOn); + callArgs[Microsoft.Office.WebExtension.Parameters.AddinTrustId] = addinTrustId; + } + if (window.Office.context.requirements.isSetSupported("JsonPayloadSSO")) { + var jsonParameterMap = (_a = {}, + _a[Microsoft.Office.WebExtension.Parameters.ForceConsent] = false, + _a[Microsoft.Office.WebExtension.Parameters.ForceAddAccount] = false, + _a[Microsoft.Office.WebExtension.Parameters.AuthChallenge] = true, + _a[Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt] = true, + _a[Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess] = true, + _a[Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt] = true, + _a[Microsoft.Office.WebExtension.Parameters.EnableNewHosts] = true, + _a[Microsoft.Office.WebExtension.Parameters.AccountTypeFilter] = true, + _a); + var jsonPayload = {}; + for (var _i = 0, _b = Object.keys(jsonParameterMap); _i < _b.length; _i++) { + var key = _b[_i]; + if (jsonParameterMap[key]) { + jsonPayload[key] = callArgs[key]; + } + delete callArgs[key]; + } + callArgs[Microsoft.Office.WebExtension.Parameters.JsonPayload] = JSON.stringify(jsonPayload); + } + return callArgs; + }, + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.JsonPayload, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt, value: 5 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ GetNestedAppAuthContextAsync: "getAuthContextAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync, + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.JsonData]; + var userObjectId = data.userObjectId || ""; + var tenantId = data.tenantId || ""; + var userPrincipalName = data.userPrincipalName || ""; + var authorityType = data.authorityType || ""; + return { + userObjectId: userObjectId, + tenantId: tenantId, + userPrincipalName: userPrincipalName, + authorityType: authorityType + }; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetNestedAppAuthContextMethod, + toHost: [], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.JsonData, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + OpenBrowserWindow: "openBrowserWindow" +}); +OSF.DDA.OpenBrowser = function OSF_DDA_OpenBrowser() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.OpenBrowserWindow, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Reserved, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidOpenBrowserWindow, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Reserved, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Url, value: 1 } + ] +}); +OSF.DDA.ExcelDocument = function OSF_DDA_ExcelDocument(officeAppContext, settings) { + var bf = new OSF.DDA.BindingFacade(this); + OSF.DDA.DispIdHost.addAsyncMethods(bf, [OSF.DDA.AsyncMethodNames.AddFromPromptAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GoToByIdAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]); + OSF.DDA.ExcelDocument.uber.constructor.call(this, officeAppContext, bf, settings); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelDocument, OSF.DDA.JsomDocument); +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + appContext.doc = new OSF.DDA.ExcelDocument(appContext, this._initializeSettings(appContext, true)); + OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + OSF.DDA.RichApi.richApiMessageManager = new OfficeExt.RichApiMessageManager(); + appReady(); +}; +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["number", "object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["number", "object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExtension; +(function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire = function () { + return null; + }(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + var PromiseImpl; + (function (PromiseImpl) { + function Init() { + return (function () { + "use strict"; + function lib$es6$promise$utils$$objectOrFunction(x) { + return typeof x === 'function' || (typeof x === 'object' && x !== null); + } + function lib$es6$promise$utils$$isFunction(x) { + return typeof x === 'function'; + } + function lib$es6$promise$utils$$isMaybeThenable(x) { + return typeof x === 'object' && x !== null; + } + var lib$es6$promise$utils$$_isArray; + if (!Array.isArray) { + lib$es6$promise$utils$$_isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; + } + else { + lib$es6$promise$utils$$_isArray = Array.isArray; + } + var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray; + var lib$es6$promise$asap$$len = 0; + var lib$es6$promise$asap$$toString = {}.toString; + var lib$es6$promise$asap$$vertxNext; + var lib$es6$promise$asap$$customSchedulerFn; + var lib$es6$promise$asap$$asap = function asap(callback, arg) { + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback; + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg; + lib$es6$promise$asap$$len += 2; + if (lib$es6$promise$asap$$len === 2) { + if (lib$es6$promise$asap$$customSchedulerFn) { + lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush); + } + else { + lib$es6$promise$asap$$scheduleFlush(); + } + } + }; + function lib$es6$promise$asap$$setScheduler(scheduleFn) { + lib$es6$promise$asap$$customSchedulerFn = scheduleFn; + } + function lib$es6$promise$asap$$setAsap(asapFn) { + lib$es6$promise$asap$$asap = asapFn; + } + var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined; + var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {}; + var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver; + var lib$es6$promise$asap$$isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && + typeof importScripts !== 'undefined' && + typeof MessageChannel !== 'undefined'; + function lib$es6$promise$asap$$useNextTick() { + var nextTick = process.nextTick; + var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); + if (Array.isArray(version) && version[1] === '0' && version[2] === '10') { + nextTick = window.setImmediate; + } + return function () { + nextTick(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useVertxTimer() { + return function () { + lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useMutationObserver() { + var iterations = 0; + var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + return function () { + node.data = (iterations = ++iterations % 2); + }; + } + function lib$es6$promise$asap$$useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = lib$es6$promise$asap$$flush; + return function () { + channel.port2.postMessage(0); + }; + } + function lib$es6$promise$asap$$useSetTimeout() { + return function () { + setTimeout(lib$es6$promise$asap$$flush, 1); + }; + } + var lib$es6$promise$asap$$queue = new Array(1000); + function lib$es6$promise$asap$$flush() { + for (var i = 0; i < lib$es6$promise$asap$$len; i += 2) { + var callback = lib$es6$promise$asap$$queue[i]; + var arg = lib$es6$promise$asap$$queue[i + 1]; + callback(arg); + lib$es6$promise$asap$$queue[i] = undefined; + lib$es6$promise$asap$$queue[i + 1] = undefined; + } + lib$es6$promise$asap$$len = 0; + } + var lib$es6$promise$asap$$scheduleFlush; + if (lib$es6$promise$asap$$isNode) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick(); + } + else if (lib$es6$promise$asap$$isWorker) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel(); + } + else { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout(); + } + function lib$es6$promise$$internal$$noop() { } + var lib$es6$promise$$internal$$PENDING = void 0; + var lib$es6$promise$$internal$$FULFILLED = 1; + var lib$es6$promise$$internal$$REJECTED = 2; + var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$selfFullfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function lib$es6$promise$$internal$$cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); + } + function lib$es6$promise$$internal$$getThen(promise) { + try { + return promise.then; + } + catch (error) { + lib$es6$promise$$internal$$GET_THEN_ERROR.error = error; + return lib$es6$promise$$internal$$GET_THEN_ERROR; + } + } + function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } + catch (e) { + return e; + } + } + function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) { + lib$es6$promise$asap$$asap(function (promise) { + var sealed = false; + var error = lib$es6$promise$$internal$$tryThen(then, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + lib$es6$promise$$internal$$reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + if (!sealed && error) { + sealed = true; + lib$es6$promise$$internal$$reject(promise, error); + } + }, promise); + } + function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) { + if (thenable._state === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, thenable._result); + } + else if (thenable._state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, thenable._result); + } + else { + lib$es6$promise$$internal$$subscribe(thenable, undefined, function (value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function (reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + } + function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable) { + if (maybeThenable.constructor === promise.constructor) { + lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable); + } + else { + var then = lib$es6$promise$$internal$$getThen(maybeThenable); + if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error); + } + else if (then === undefined) { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + else if (lib$es6$promise$utils$$isFunction(then)) { + lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then); + } + else { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + } + } + function lib$es6$promise$$internal$$resolve(promise, value) { + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFullfillment()); + } + else if (lib$es6$promise$utils$$objectOrFunction(value)) { + lib$es6$promise$$internal$$handleMaybeThenable(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + } + function lib$es6$promise$$internal$$publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + lib$es6$promise$$internal$$publish(promise); + } + function lib$es6$promise$$internal$$fulfill(promise, value) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._result = value; + promise._state = lib$es6$promise$$internal$$FULFILLED; + if (promise._subscribers.length !== 0) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise); + } + } + function lib$es6$promise$$internal$$reject(promise, reason) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._state = lib$es6$promise$$internal$$REJECTED; + promise._result = reason; + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise); + } + function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) { + var subscribers = parent._subscribers; + var length = subscribers.length; + parent._onerror = null; + subscribers[length] = child; + subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment; + subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection; + if (length === 0 && parent._state) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent); + } + } + function lib$es6$promise$$internal$$publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + if (subscribers.length === 0) { + return; + } + var child, callback, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + if (child) { + lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail); + } + else { + callback(detail); + } + } + promise._subscribers.length = 0; + } + function lib$es6$promise$$internal$$ErrorObject() { + this.error = null; + } + var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$tryCatch(callback, detail) { + try { + return callback(detail); + } + catch (e) { + lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e; + return lib$es6$promise$$internal$$TRY_CATCH_ERROR; + } + } + function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) { + var hasCallback = lib$es6$promise$utils$$isFunction(callback), value, error, succeeded, failed; + if (hasCallback) { + value = lib$es6$promise$$internal$$tryCatch(callback, detail); + if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value = null; + } + else { + succeeded = true; + } + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn()); + return; + } + } + else { + value = detail; + succeeded = true; + } + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + } + else if (hasCallback && succeeded) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else if (failed) { + lib$es6$promise$$internal$$reject(promise, error); + } + else if (settled === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, value); + } + else if (settled === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + } + function lib$es6$promise$$internal$$initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function rejectPromise(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + catch (e) { + lib$es6$promise$$internal$$reject(promise, e); + } + } + function lib$es6$promise$enumerator$$Enumerator(Constructor, input) { + var enumerator = this; + enumerator._instanceConstructor = Constructor; + enumerator.promise = new Constructor(lib$es6$promise$$internal$$noop); + if (enumerator._validateInput(input)) { + enumerator._input = input; + enumerator.length = input.length; + enumerator._remaining = input.length; + enumerator._init(); + if (enumerator.length === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + else { + enumerator.length = enumerator.length || 0; + enumerator._enumerate(); + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + } + } + else { + lib$es6$promise$$internal$$reject(enumerator.promise, enumerator._validationError()); + } + } + lib$es6$promise$enumerator$$Enumerator.prototype._validateInput = function (input) { + return lib$es6$promise$utils$$isArray(input); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._validationError = function () { + return new _Internal.Error('Array Methods must be provided an Array'); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._init = function () { + this._result = new Array(this.length); + }; + var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator; + lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function () { + var enumerator = this; + var length = enumerator.length; + var promise = enumerator.promise; + var input = enumerator._input; + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + enumerator._eachEntry(input[i], i); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function (entry, i) { + var enumerator = this; + var c = enumerator._instanceConstructor; + if (lib$es6$promise$utils$$isMaybeThenable(entry)) { + if (entry.constructor === c && entry._state !== lib$es6$promise$$internal$$PENDING) { + entry._onerror = null; + enumerator._settledAt(entry._state, i, entry._result); + } + else { + enumerator._willSettleAt(c.resolve(entry), i); + } + } + else { + enumerator._remaining--; + enumerator._result[i] = entry; + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function (state, i, value) { + var enumerator = this; + var promise = enumerator.promise; + if (promise._state === lib$es6$promise$$internal$$PENDING) { + enumerator._remaining--; + if (state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + else { + enumerator._result[i] = value; + } + } + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(promise, enumerator._result); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function (promise, i) { + var enumerator = this; + lib$es6$promise$$internal$$subscribe(promise, undefined, function (value) { + enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value); + }, function (reason) { + enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason); + }); + }; + function lib$es6$promise$promise$all$$all(entries) { + return new lib$es6$promise$enumerator$$default(this, entries).promise; + } + var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all; + function lib$es6$promise$promise$race$$race(entries) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + if (!lib$es6$promise$utils$$isArray(entries)) { + lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.')); + return promise; + } + var length = entries.length; + function onFulfillment(value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + function onRejection(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + } + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); + } + return promise; + } + var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race; + function lib$es6$promise$promise$resolve$$resolve(object) { + var Constructor = this; + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$resolve(promise, object); + return promise; + } + var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve; + function lib$es6$promise$promise$reject$$reject(reason) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$reject(promise, reason); + return promise; + } + var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject; + var lib$es6$promise$promise$$counter = 0; + function lib$es6$promise$promise$$needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); + } + function lib$es6$promise$promise$$needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise; + function lib$es6$promise$promise$$Promise(resolver) { + this._id = lib$es6$promise$promise$$counter++; + this._state = undefined; + this._result = undefined; + this._subscribers = []; + if (lib$es6$promise$$internal$$noop !== resolver) { + if (!lib$es6$promise$utils$$isFunction(resolver)) { + lib$es6$promise$promise$$needsResolver(); + } + if (!(this instanceof lib$es6$promise$promise$$Promise)) { + lib$es6$promise$promise$$needsNew(); + } + lib$es6$promise$$internal$$initializePromise(this, resolver); + } + } + lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default; + lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default; + lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default; + lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default; + lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler; + lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap; + lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap; + lib$es6$promise$promise$$Promise.prototype = { + constructor: lib$es6$promise$promise$$Promise, + then: function (onFulfillment, onRejection) { + var parent = this; + var state = parent._state; + if (state === lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state === lib$es6$promise$$internal$$REJECTED && !onRejection) { + return this; + } + var child = new this.constructor(lib$es6$promise$$internal$$noop); + var result = parent._result; + if (state) { + var callback = arguments[state - 1]; + lib$es6$promise$asap$$asap(function () { + lib$es6$promise$$internal$$invokeCallback(state, child, callback, result); + }); + } + else { + lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection); + } + return child; + }, + 'catch': function (onRejection) { + return this.then(null, onRejection); + } + }; + return lib$es6$promise$promise$$default; + }).call(this); + } + PromiseImpl.Init = Init; + })(PromiseImpl = _Internal.PromiseImpl || (_Internal.PromiseImpl = {})); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + function isEdgeLessThan14() { + var userAgent = window.navigator.userAgent; + var versionIdx = userAgent.indexOf("Edge/"); + if (versionIdx >= 0) { + userAgent = userAgent.substring(versionIdx + 5, userAgent.length); + if (userAgent < "14.14393") + return true; + else + return false; + } + return false; + } + function determinePromise() { + if (typeof (window) === "undefined" && typeof (Promise) === "function") { + return Promise; + } + if (typeof (window) !== "undefined" && window.Promise) { + if (isEdgeLessThan14()) { + return _Internal.PromiseImpl.Init(); + } + else { + return window.Promise; + } + } + else { + return _Internal.PromiseImpl.Init(); + } + } + _Internal.OfficePromise = determinePromise(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + var OfficePromise = _Internal.OfficePromise; + OfficeExtension.Promise = OfficePromise; +})(OfficeExtension || (OfficeExtension = {})); +var OfficeExtension; +(function (OfficeExtension_1) { + var SessionBase = (function () { + function SessionBase() { + } + SessionBase.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + SessionBase.prototype._createRequestExecutorOrNull = function () { + return null; + }; + SessionBase.prototype.getEventRegistration = function (controlId) { + return null; + }; + return SessionBase; + }()); + OfficeExtension_1.SessionBase = SessionBase; + var HttpUtility = (function () { + function HttpUtility() { + } + HttpUtility.setCustomSendRequestFunc = function (func) { + HttpUtility.s_customSendRequestFunc = func; + }; + HttpUtility.xhrSendRequestFunc = function (request) { + return CoreUtility.createPromise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open(request.method, request.url); + xhr.onload = function () { + var resp = { + statusCode: xhr.status, + headers: CoreUtility._parseHttpResponseHeaders(xhr.getAllResponseHeaders()), + body: xhr.responseText + }; + resolve(resp); + }; + xhr.onerror = function () { + reject(new _Internal.RuntimeError({ + code: CoreErrorCodes.connectionFailure, + httpStatusCode: xhr.status, + message: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, xhr.statusText) + })); + }; + if (request.headers) { + for (var key in request.headers) { + xhr.setRequestHeader(key, request.headers[key]); + } + } + xhr.send(CoreUtility._getRequestBodyText(request)); + }); + }; + HttpUtility.fetchSendRequestFunc = function (request) { + var requestBodyText = CoreUtility._getRequestBodyText(request); + if (requestBodyText === '') { + requestBodyText = undefined; + } + return fetch(request.url, { + method: request.method, + headers: request.headers, + body: requestBodyText + }) + .then(function (resp) { + return resp.text() + .then(function (body) { + var statusCode = resp.status; + var headers = {}; + resp.headers.forEach(function (value, name) { + headers[name] = value; + }); + var ret = { statusCode: statusCode, headers: headers, body: body }; + return ret; + }); + }); + }; + HttpUtility.sendRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func = HttpUtility.s_customSendRequestFunc; + if (!func) { + if (typeof (fetch) !== 'undefined') { + func = HttpUtility.fetchSendRequestFunc; + } + else { + func = HttpUtility.xhrSendRequestFunc; + } + } + return func(request); + }; + HttpUtility.setCustomSendLocalDocumentRequestFunc = function (func) { + HttpUtility.s_customSendLocalDocumentRequestFunc = func; + }; + HttpUtility.sendLocalDocumentRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func; + func = HttpUtility.s_customSendLocalDocumentRequestFunc || HttpUtility.officeJsSendLocalDocumentRequestFunc; + return func(request); + }; + HttpUtility.officeJsSendLocalDocumentRequestFunc = function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestSafeArray = CoreUtility._buildRequestMessageSafeArray(request); + return CoreUtility.createPromise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { + var response; + if (asyncResult.status == 'succeeded') { + response = { + statusCode: RichApiMessageUtility.getResponseStatusCode(asyncResult), + headers: RichApiMessageUtility.getResponseHeaders(asyncResult), + body: RichApiMessageUtility.getResponseBody(asyncResult) + }; + } + else { + response = RichApiMessageUtility.buildHttpResponseFromOfficeJsError(asyncResult.error.code, asyncResult.error.message); + } + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(response)); + resolve(response); + }); + }); + }; + HttpUtility.validateAndNormalizeRequest = function (request) { + if (CoreUtility.isNullOrUndefined(request)) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + if (CoreUtility.isNullOrEmptyString(request.method)) { + request.method = 'GET'; + } + request.method = request.method.toUpperCase(); + var alreadyHasTestName = false; + if (typeof (request.headers) === 'object' && request.headers[CoreConstants.testRequestNameHeader]) { + alreadyHasTestName = true; + } + if (!alreadyHasTestName) { + var currentTestName = TestUtility._getCurrentTestNameWithSequenceId(); + if (currentTestName) { + if (!request.headers) { + request.headers = {}; + } + request.headers[CoreConstants.testRequestNameHeader] = currentTestName; + } + } + }; + HttpUtility.logRequest = function (request) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Request---'); + CoreUtility.log(request.method + ' ' + request.url); + if (request.headers) { + for (var key in request.headers) { + CoreUtility.log(key + ': ' + request.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(CoreUtility._getRequestBodyText(request)); + } + } + }; + HttpUtility.logResponse = function (response) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Response---'); + CoreUtility.log('' + response.statusCode); + if (response.headers) { + for (var key in response.headers) { + CoreUtility.log(key + ': ' + response.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(response.body); + } + } + }; + HttpUtility._logBodyEnabled = false; + return HttpUtility; + }()); + OfficeExtension_1.HttpUtility = HttpUtility; + var HostBridge = (function () { + function HostBridge(m_bridge) { + var _this = this; + this.m_bridge = m_bridge; + this.m_promiseResolver = {}; + this.m_handlers = []; + this.m_bridge.onMessageFromHost = function (messageText) { + var message = JSON.parse(messageText); + if (message.type == 3) { + var genericMessageBody = message.message; + if (genericMessageBody && genericMessageBody.entries) { + for (var i = 0; i < genericMessageBody.entries.length; i++) { + var entryObjectOrArray = genericMessageBody.entries[i]; + if (Array.isArray(entryObjectOrArray)) { + var entry = { + messageCategory: entryObjectOrArray[0], + messageType: entryObjectOrArray[1], + targetId: entryObjectOrArray[2], + message: entryObjectOrArray[3], + id: entryObjectOrArray[4] + }; + genericMessageBody.entries[i] = entry; + } + } + } + } + _this.dispatchMessage(message); + }; + } + HostBridge.init = function (bridge) { + if (typeof bridge !== 'object' || !bridge) { + return; + } + var instance = new HostBridge(bridge); + HostBridge.s_instance = instance; + HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var index = request.url.indexOf('?'); + if (index >= 0) { + var query = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(query); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + } + if (typeof (request.body) === "string") { + request.body = JSON.parse(request.body); + } + var bridgeMessage = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + message: request + }; + return instance.sendMessageToHostAndExpectResponse(bridgeMessage).then(function (bridgeResponse) { + var responseInfo = bridgeResponse.message; + return responseInfo; + }); + }); + for (var i = 0; i < HostBridge.s_onInitedHandlers.length; i++) { + HostBridge.s_onInitedHandlers[i](instance); + } + }; + Object.defineProperty(HostBridge, "instance", { + get: function () { + return HostBridge.s_instance; + }, + enumerable: true, + configurable: true + }); + HostBridge.prototype.sendMessageToHost = function (message) { + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + }; + HostBridge.prototype.sendMessageToHostAndExpectResponse = function (message) { + var _this = this; + var ret = CoreUtility.createPromise(function (resolve, reject) { + _this.m_promiseResolver[message.id] = resolve; + }); + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + return ret; + }; + HostBridge.prototype.addHostMessageHandler = function (handler) { + this.m_handlers.push(handler); + }; + HostBridge.prototype.removeHostMessageHandler = function (handler) { + var index = this.m_handlers.indexOf(handler); + if (index >= 0) { + this.m_handlers.splice(index, 1); + } + }; + HostBridge.onInited = function (handler) { + HostBridge.s_onInitedHandlers.push(handler); + if (HostBridge.s_instance) { + handler(HostBridge.s_instance); + } + }; + HostBridge.prototype.dispatchMessage = function (message) { + if (typeof message.id === 'number') { + var resolve = this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + delete this.m_promiseResolver[message.id]; + return; + } + } + for (var i = 0; i < this.m_handlers.length; i++) { + this.m_handlers[i](message); + } + }; + HostBridge.nextId = function () { + return HostBridge.s_nextId++; + }; + HostBridge.s_onInitedHandlers = []; + HostBridge.s_nextId = 1; + return HostBridge; + }()); + OfficeExtension_1.HostBridge = HostBridge; + if (typeof _richApiNativeBridge === 'object' && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var _Internal; + (function (_Internal) { + var RuntimeError = (function (_super) { + __extends(RuntimeError, _super); + function RuntimeError(error) { + var _this = _super.call(this, typeof error === 'string' ? error : error.message) || this; + Object.setPrototypeOf(_this, RuntimeError.prototype); + _this.name = 'RichApi.Error'; + if (typeof error === 'string') { + _this.message = error; + } + else { + _this.code = error.code; + _this.message = error.message; + _this.traceMessages = error.traceMessages || []; + _this.innerError = error.innerError || null; + _this.debugInfo = _this._createDebugInfo(error.debugInfo || {}); + _this.httpStatusCode = error.httpStatusCode; + _this.data = error.data; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode) || _this.httpStatusCode === 200) { + var mapping = {}; + mapping[CoreErrorCodes.accessDenied] = 401; + mapping[CoreErrorCodes.connectionFailure] = 500; + mapping[CoreErrorCodes.generalException] = 500; + mapping[CoreErrorCodes.invalidArgument] = 400; + mapping[CoreErrorCodes.invalidObjectPath] = 400; + mapping[CoreErrorCodes.invalidOrTimedOutSession] = 408; + mapping[CoreErrorCodes.invalidRequestContext] = 400; + mapping[CoreErrorCodes.timeout] = 408; + mapping[CoreErrorCodes.valueNotLoaded] = 400; + _this.httpStatusCode = mapping[_this.code]; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode)) { + _this.httpStatusCode = 500; + } + return _this; + } + RuntimeError.prototype.toString = function () { + return this.code + ': ' + this.message; + }; + RuntimeError.prototype._createDebugInfo = function (partialDebugInfo) { + var debugInfo = { + code: this.code, + message: this.message + }; + debugInfo.toString = function () { + return JSON.stringify(this); + }; + for (var key in partialDebugInfo) { + debugInfo[key] = partialDebugInfo[key]; + } + if (this.innerError) { + if (this.innerError instanceof _Internal.RuntimeError) { + debugInfo.innerError = this.innerError.debugInfo; + } + else { + debugInfo.innerError = this.innerError; + } + } + return debugInfo; + }; + RuntimeError._createInvalidArgError = function (error) { + return new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility.isNullOrEmptyString(error.argumentName) + ? CoreUtility._getResourceString(CoreResourceStrings.invalidArgumentGeneric) + : CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, error.argumentName), + debugInfo: error.errorLocation ? { errorLocation: error.errorLocation } : {}, + innerError: error.innerError + }); + }; + return RuntimeError; + }(Error)); + _Internal.RuntimeError = RuntimeError; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + OfficeExtension_1.Error = _Internal.RuntimeError; + var CoreErrorCodes = (function () { + function CoreErrorCodes() { + } + CoreErrorCodes.apiNotFound = 'ApiNotFound'; + CoreErrorCodes.accessDenied = 'AccessDenied'; + CoreErrorCodes.generalException = 'GeneralException'; + CoreErrorCodes.activityLimitReached = 'ActivityLimitReached'; + CoreErrorCodes.invalidArgument = 'InvalidArgument'; + CoreErrorCodes.connectionFailure = 'ConnectionFailure'; + CoreErrorCodes.timeout = 'Timeout'; + CoreErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + CoreErrorCodes.invalidObjectPath = 'InvalidObjectPath'; + CoreErrorCodes.invalidRequestContext = 'InvalidRequestContext'; + CoreErrorCodes.valueNotLoaded = 'ValueNotLoaded'; + CoreErrorCodes.requestPayloadSizeLimitExceeded = 'RequestPayloadSizeLimitExceeded'; + CoreErrorCodes.responsePayloadSizeLimitExceeded = 'ResponsePayloadSizeLimitExceeded'; + CoreErrorCodes.writeNotSupportedWhenModalDialogOpen = 'WriteNotSupportedWhenModalDialogOpen'; + return CoreErrorCodes; + }()); + OfficeExtension_1.CoreErrorCodes = CoreErrorCodes; + var CoreResourceStrings = (function () { + function CoreResourceStrings() { + } + CoreResourceStrings.apiNotFoundDetails = 'ApiNotFoundDetails'; + CoreResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + CoreResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + CoreResourceStrings.invalidArgument = 'InvalidArgument'; + CoreResourceStrings.invalidArgumentGeneric = 'InvalidArgumentGeneric'; + CoreResourceStrings.timeout = 'Timeout'; + CoreResourceStrings.invalidOrTimedOutSessionMessage = 'InvalidOrTimedOutSessionMessage'; + CoreResourceStrings.invalidSheetName = 'InvalidSheetName'; + CoreResourceStrings.invalidObjectPath = 'InvalidObjectPath'; + CoreResourceStrings.invalidRequestContext = 'InvalidRequestContext'; + CoreResourceStrings.valueNotLoaded = 'ValueNotLoaded'; + return CoreResourceStrings; + }()); + OfficeExtension_1.CoreResourceStrings = CoreResourceStrings; + var CoreConstants = (function () { + function CoreConstants() { + } + CoreConstants.flags = 'flags'; + CoreConstants.sourceLibHeader = 'SdkVersion'; + CoreConstants.processQuery = 'ProcessQuery'; + CoreConstants.localDocument = 'http://document.localhost/'; + CoreConstants.localDocumentApiPrefix = 'http://document.localhost/_api/'; + CoreConstants.customData = 'customdata'; + CoreConstants.testRequestNameHeader = 'x-test-request-name'; + return CoreConstants; + }()); + OfficeExtension_1.CoreConstants = CoreConstants; + var RichApiMessageUtility = (function () { + function RichApiMessageUtility() { + } + RichApiMessageUtility.buildMessageArrayForIRequestExecutor = function (customData, requestFlags, requestMessage, sourceLibHeaderValue) { + var requestMessageText = JSON.stringify(requestMessage.Body); + CoreUtility.log('Request:'); + CoreUtility.log(requestMessageText); + var headers = {}; + CoreUtility._copyHeaders(requestMessage.Headers, headers); + headers[CoreConstants.sourceLibHeader] = sourceLibHeaderValue; + var messageSafearray = RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, 'POST', CoreConstants.processQuery, headers, requestMessageText); + return messageSafearray; + }; + RichApiMessageUtility.buildResponseOnSuccess = function (responseBody, responseHeaders) { + var response = { HttpStatusCode: 200, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.Body = JSON.parse(responseBody); + response.Headers = responseHeaders; + return response; + }; + RichApiMessageUtility.buildResponseOnError = function (errorCode, message) { + var response = { HttpStatusCode: 500, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.ErrorCode = CoreErrorCodes.generalException; + response.ErrorMessage = message; + if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + response.ErrorCode = CoreErrorCodes.accessDenied; + response.HttpStatusCode = 401; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + response.ErrorCode = CoreErrorCodes.activityLimitReached; + response.HttpStatusCode = 429; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession) { + response.ErrorCode = CoreErrorCodes.invalidOrTimedOutSession; + response.HttpStatusCode = 408; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidOrTimedOutSessionMessage); + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.requestPayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.responsePayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen) { + response.ErrorCode = CoreErrorCodes.writeNotSupportedWhenModalDialogOpen; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName) { + response.ErrorCode = CoreErrorCodes.invalidRequestContext; + response.HttpStatusCode = 400; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidSheetName); + } + return response; + }; + RichApiMessageUtility.buildHttpResponseFromOfficeJsError = function (errorCode, message) { + var statusCode = 500; + var errorBody = {}; + errorBody['error'] = {}; + errorBody['error']['code'] = CoreErrorCodes.generalException; + errorBody['error']['message'] = message; + if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + statusCode = 403; + errorBody['error']['code'] = CoreErrorCodes.accessDenied; + } + else if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + statusCode = 429; + errorBody['error']['code'] = CoreErrorCodes.activityLimitReached; + } + return { statusCode: statusCode, headers: {}, body: JSON.stringify(errorBody) }; + }; + RichApiMessageUtility.buildRequestMessageSafeArray = function (customData, requestFlags, method, path, headers, body) { + var headerArray = []; + if (headers) { + for (var headerName in headers) { + headerArray.push(headerName); + headerArray.push(headers[headerName]); + } + } + var appPermission = 0; + var solutionId = ''; + var instanceId = ''; + var marketplaceType = ''; + var solutionVersion = ''; + var storeLocation = ''; + var compliantSolutionId = ''; + return [ + customData, + method, + path, + headerArray, + body, + appPermission, + requestFlags, + solutionId, + instanceId, + marketplaceType, + solutionVersion, + storeLocation, + compliantSolutionId + ]; + }; + RichApiMessageUtility.getResponseBody = function (result) { + return RichApiMessageUtility.getResponseBodyFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseHeaders = function (result) { + return RichApiMessageUtility.getResponseHeadersFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseBodyFromSafeArray = function (data) { + var ret = data[2]; + if (typeof ret === 'string') { + return ret; + } + var arr = ret; + return arr.join(''); + }; + RichApiMessageUtility.getResponseHeadersFromSafeArray = function (data) { + var arrayHeader = data[1]; + if (!arrayHeader) { + return null; + } + var headers = {}; + for (var i = 0; i < arrayHeader.length - 1; i += 2) { + headers[arrayHeader[i]] = arrayHeader[i + 1]; + } + return headers; + }; + RichApiMessageUtility.getResponseStatusCode = function (result) { + return RichApiMessageUtility.getResponseStatusCodeFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseStatusCodeFromSafeArray = function (data) { + return data[0]; + }; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession = 5012; + RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached = 5102; + RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability = 7000; + RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded = 5103; + RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded = 5104; + RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen = 5016; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName = 1014; + return RichApiMessageUtility; + }()); + OfficeExtension_1.RichApiMessageUtility = RichApiMessageUtility; + (function (_Internal) { + function getPromiseType() { + if (typeof Promise !== 'undefined') { + return Promise; + } + if (typeof Office !== 'undefined') { + if (Office.Promise) { + return Office.Promise; + } + } + if (typeof OfficeExtension !== 'undefined') { + if (OfficeExtension.Promise) { + return OfficeExtension.Promise; + } + } + throw new _Internal.Error('No Promise implementation found'); + } + _Internal.getPromiseType = getPromiseType; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var CoreUtility = (function () { + function CoreUtility() { + } + CoreUtility.log = function (message) { + if (CoreUtility._logEnabled && typeof console !== 'undefined' && console.log) { + console.log(message); + } + }; + CoreUtility.checkArgumentNull = function (value, name) { + if (CoreUtility.isNullOrUndefined(value)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: name }); + } + }; + CoreUtility.isNullOrUndefined = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isUndefined = function (value) { + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isNullOrEmptyString = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + if (value.length == 0) { + return true; + } + return false; + }; + CoreUtility.isPlainJsonObject = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return false; + } + if (typeof value !== 'object') { + return false; + } + if (Object.prototype.toString.apply(value) !== '[object Object]') { + return false; + } + if (value.constructor && + !Object.prototype.hasOwnProperty.call(value, 'constructor') && + !Object.prototype.hasOwnProperty.call(value.constructor.prototype, 'hasOwnProperty')) { + return false; + } + for (var key in value) { + if (!Object.prototype.hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + }; + CoreUtility.trim = function (str) { + return str.replace(new RegExp('^\\s+|\\s+$', 'g'), ''); + }; + CoreUtility.caseInsensitiveCompareString = function (str1, str2) { + if (CoreUtility.isNullOrUndefined(str1)) { + return CoreUtility.isNullOrUndefined(str2); + } + else { + if (CoreUtility.isNullOrUndefined(str2)) { + return false; + } + else { + return str1.toUpperCase() == str2.toUpperCase(); + } + } + }; + CoreUtility.isReadonlyRestRequest = function (method) { + return CoreUtility.caseInsensitiveCompareString(method, 'GET'); + }; + CoreUtility._getResourceString = function (resourceId, arg) { + var ret; + if (typeof window !== 'undefined' && window.Strings && window.Strings.OfficeOM) { + var stringName = 'L_' + resourceId; + var stringValue = window.Strings.OfficeOM[stringName]; + if (stringValue) { + ret = stringValue; + } + } + if (!ret) { + ret = CoreUtility.s_resourceStringValues[resourceId]; + } + if (!ret) { + ret = resourceId; + } + if (!CoreUtility.isNullOrUndefined(arg)) { + if (Array.isArray(arg)) { + var arrArg = arg; + ret = CoreUtility._formatString(ret, arrArg); + } + else { + ret = ret.replace('{0}', arg); + } + } + return ret; + }; + CoreUtility._formatString = function (format, arrArg) { + return format.replace(/\{\d\}/g, function (v) { + var position = parseInt(v.substr(1, v.length - 2)); + if (position < arrArg.length) { + return arrArg[position]; + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'format' }); + } + }); + }; + Object.defineProperty(CoreUtility, "Promise", { + get: function () { + return _Internal.getPromiseType(); + }, + enumerable: true, + configurable: true + }); + CoreUtility.createPromise = function (executor) { + var ret = new CoreUtility.Promise(executor); + return ret; + }; + CoreUtility._createPromiseFromResult = function (value) { + return CoreUtility.createPromise(function (resolve, reject) { + resolve(value); + }); + }; + CoreUtility._createPromiseFromException = function (reason) { + return CoreUtility.createPromise(function (resolve, reject) { + reject(reason); + }); + }; + CoreUtility._createTimeoutPromise = function (timeout) { + return CoreUtility.createPromise(function (resolve, reject) { + setTimeout(function () { + resolve(null); + }, timeout); + }); + }; + CoreUtility._createInvalidArgError = function (error) { + return _Internal.RuntimeError._createInvalidArgError(error); + }; + CoreUtility._isLocalDocumentUrl = function (url) { + return CoreUtility._getLocalDocumentUrlPrefixLength(url) > 0; + }; + CoreUtility._getLocalDocumentUrlPrefixLength = function (url) { + var localDocumentPrefixes = [ + 'http://document.localhost', + 'https://document.localhost', + '//document.localhost' + ]; + var urlLower = url.toLowerCase().trim(); + for (var i = 0; i < localDocumentPrefixes.length; i++) { + if (urlLower === localDocumentPrefixes[i]) { + return localDocumentPrefixes[i].length; + } + else if (urlLower.substr(0, localDocumentPrefixes[i].length + 1) === localDocumentPrefixes[i] + '/') { + return localDocumentPrefixes[i].length + 1; + } + } + return 0; + }; + CoreUtility._validateLocalDocumentRequest = function (request) { + var index = CoreUtility._getLocalDocumentUrlPrefixLength(request.url); + if (index <= 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + var path = request.url.substr(index); + var pathLower = path.toLowerCase(); + if (pathLower === '_api') { + path = ''; + } + else if (pathLower.substr(0, '_api/'.length) === '_api/') { + path = path.substr('_api/'.length); + } + return { + method: request.method, + url: path, + headers: request.headers, + body: request.body + }; + }; + CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny = function (queryString) { + var ret = { flags: -1, customData: '' }; + var parts = queryString.split('&'); + for (var i = 0; i < parts.length; i++) { + var keyvalue = parts[i].split('='); + if (keyvalue[0].toLowerCase() === CoreConstants.flags) { + var flags = parseInt(keyvalue[1]); + flags = flags & 8191; + ret.flags = flags; + } + else if (keyvalue[0].toLowerCase() === CoreConstants.customData) { + ret.customData = decodeURIComponent(keyvalue[1]); + } + } + return ret; + }; + CoreUtility._getRequestBodyText = function (request) { + var body = ''; + if (typeof request.body === 'string') { + body = request.body; + } + else if (request.body && typeof request.body === 'object') { + body = JSON.stringify(request.body); + } + return body; + }; + CoreUtility._parseResponseBody = function (response) { + if (typeof response.body === 'string') { + var bodyText = CoreUtility.trim(response.body); + return JSON.parse(bodyText); + } + else { + return response.body; + } + }; + CoreUtility._buildRequestMessageSafeArray = function (request) { + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var customData = ''; + if (request.url.substr(0, CoreConstants.processQuery.length).toLowerCase() === + CoreConstants.processQuery.toLowerCase()) { + var index = request.url.indexOf('?'); + if (index > 0) { + var queryString = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(queryString); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + customData = flagsAndCustomData.customData; + } + } + return RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, request.method, request.url, request.headers, CoreUtility._getRequestBodyText(request)); + }; + CoreUtility._parseHttpResponseHeaders = function (allResponseHeaders) { + var responseHeaders = {}; + if (!CoreUtility.isNullOrEmptyString(allResponseHeaders)) { + var regex = new RegExp('\r?\n'); + var entries = allResponseHeaders.split(regex); + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + if (entry != null) { + var index = entry.indexOf(':'); + if (index > 0) { + var key = entry.substr(0, index); + var value = entry.substr(index + 1); + key = CoreUtility.trim(key); + value = CoreUtility.trim(value); + responseHeaders[key.toUpperCase()] = value; + } + } + } + } + return responseHeaders; + }; + CoreUtility._parseErrorResponse = function (responseInfo) { + var errorObj = CoreUtility._parseErrorResponseBody(responseInfo); + var statusCode = responseInfo.statusCode.toString(); + if (CoreUtility.isNullOrUndefined(errorObj) || typeof errorObj !== 'object' || !errorObj.error) { + return CoreUtility._createDefaultErrorResponse(statusCode); + } + var error = errorObj.error; + var innerError = error.innerError; + if (innerError && innerError.code) { + return CoreUtility._createErrorResponse(innerError.code, statusCode, innerError.message); + } + if (error.code) { + return CoreUtility._createErrorResponse(error.code, statusCode, error.message); + } + return CoreUtility._createDefaultErrorResponse(statusCode); + }; + CoreUtility._parseErrorResponseBody = function (responseInfo) { + if (CoreUtility.isPlainJsonObject(responseInfo.body)) { + return responseInfo.body; + } + else if (!CoreUtility.isNullOrEmptyString(responseInfo.body)) { + var errorResponseBody = CoreUtility.trim(responseInfo.body); + try { + return JSON.parse(errorResponseBody); + } + catch (e) { + CoreUtility.log('Error when parse ' + errorResponseBody); + } + } + }; + CoreUtility._createDefaultErrorResponse = function (statusCode) { + return { + errorCode: CoreErrorCodes.connectionFailure, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, statusCode) + }; + }; + CoreUtility._createErrorResponse = function (code, statusCode, message) { + return { + errorCode: code, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithDetails, [ + statusCode, + code, + message + ]) + }; + }; + CoreUtility._copyHeaders = function (src, dest) { + if (src && dest) { + for (var key in src) { + dest[key] = src[key]; + } + } + }; + CoreUtility.addResourceStringValues = function (values) { + for (var key in values) { + CoreUtility.s_resourceStringValues[key] = values[key]; + } + }; + CoreUtility._logEnabled = false; + CoreUtility.s_resourceStringValues = { + ApiNotFoundDetails: 'The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.', + ConnectionFailureWithStatus: 'The request failed with status code of {0}.', + ConnectionFailureWithDetails: 'The request failed with status code of {0}, error code {1} and the following error message: {2}', + InvalidArgument: "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.", + InvalidObjectPath: 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.', + InvalidRequestContext: 'Cannot use the object across different request contexts.', + Timeout: 'The operation has timed out.', + ValueNotLoaded: 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.' + }; + return CoreUtility; + }()); + OfficeExtension_1.CoreUtility = CoreUtility; + var TestUtility = (function () { + function TestUtility() { + } + TestUtility.setMock = function (value) { + TestUtility.s_isMock = value; + }; + TestUtility.isMock = function () { + return TestUtility.s_isMock; + }; + TestUtility._setCurrentTestName = function (value) { + TestUtility.s_currentTestName = value; + TestUtility.s_currentTestSequenceId = 0; + }; + TestUtility._getCurrentTestNameWithSequenceId = function () { + if (TestUtility.s_currentTestName) { + TestUtility.s_currentTestSequenceId++; + return TestUtility.s_currentTestName + "." + TestUtility.s_currentTestSequenceId; + } + return null; + }; + return TestUtility; + }()); + OfficeExtension_1.TestUtility = TestUtility; + OfficeExtension_1._internalConfig = { + showDisposeInfoInDebugInfo: false, + showInternalApiInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectUpdateMethod: false, + alwaysPolyfillClientObjectRetrieveMethod: false, + enableConcurrentFlag: true, + enableUndoableFlag: true, + appendTypeNameToObjectPathInfo: false, + enablePreviewExecution: false + }; + OfficeExtension_1.config = { + extendedErrorLogging: false + }; + var CommonActionFactory = (function () { + function CommonActionFactory() { + } + CommonActionFactory.createSetPropertyAction = function (context, parent, propertyName, value, flags) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var args = [value]; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + CommonUtility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var action = new Action(actionInfo, 0, flags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (flags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectId: '', + ObjectType: '', + Arguments: [value] + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return parent._addAction(action); + }; + CommonActionFactory.createQueryAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 2, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createQueryAsJsonAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 7, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createUpdateAction = function (context, parent, objectState) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 9, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 0, 0); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action); + }; + return CommonActionFactory; + }()); + OfficeExtension_1.CommonActionFactory = CommonActionFactory; + var ClientObjectBase = (function () { + function ClientObjectBase(contextBase, objectPath) { + this.m_contextBase = contextBase; + this.m_objectPath = objectPath; + } + Object.defineProperty(ClientObjectBase.prototype, "_objectPath", { + get: function () { + return this.m_objectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObjectBase.prototype, "_context", { + get: function () { + return this.m_contextBase; + }, + enumerable: true, + configurable: true + }); + ClientObjectBase.prototype._addAction = function (action, resultHandler) { + var _this = this; + if (resultHandler === void 0) { + resultHandler = null; + } + return CoreUtility.createPromise(function (resolve, reject) { + _this._context._addServiceApiAction(action, resultHandler, resolve, reject); + }); + }; + ClientObjectBase.prototype._addPreviewExecutionAction = function (action) { + }; + ClientObjectBase.prototype._retrieve = function (option, resultHandler) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var queryOption = ClientRequestContextBase._parseQueryOption(option); + if (shouldPolyfill) { + return CommonActionFactory.createQueryAction(this._context, this, queryOption, resultHandler); + } + return CommonActionFactory.createQueryAsJsonAction(this._context, this, queryOption, resultHandler); + }; + ClientObjectBase.prototype._recursivelyUpdate = function (properties) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectUpdateMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.2'); + } + try { + var scalarPropNames = this[CommonConstants.scalarPropertyNames]; + if (!scalarPropNames) { + scalarPropNames = []; + } + var scalarPropUpdatable = this[CommonConstants.scalarPropertyUpdateable]; + if (!scalarPropUpdatable) { + scalarPropUpdatable = []; + for (var i = 0; i < scalarPropNames.length; i++) { + scalarPropUpdatable.push(false); + } + } + var navigationPropNames = this[CommonConstants.navigationPropertyNames]; + if (!navigationPropNames) { + navigationPropNames = []; + } + var scalarProps = {}; + var navigationProps = {}; + var scalarPropCount = 0; + for (var propName in properties) { + var index = scalarPropNames.indexOf(propName); + if (index >= 0) { + if (!scalarPropUpdatable[index]) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, propName), + debugInfo: { + errorLocation: propName + } + }); + } + scalarProps[propName] = properties[propName]; + ++scalarPropCount; + } + else if (navigationPropNames.indexOf(propName) >= 0) { + navigationProps[propName] = properties[propName]; + } + else { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, propName), + debugInfo: { + errorLocation: propName + } + }); + } + } + if (scalarPropCount > 0) { + if (shouldPolyfill) { + for (var i = 0; i < scalarPropNames.length; i++) { + var propName = scalarPropNames[i]; + var propValue = scalarProps[propName]; + if (!CommonUtility.isUndefined(propValue)) { + CommonActionFactory.createSetPropertyAction(this._context, this, propName, propValue); + } + } + } + else { + CommonActionFactory.createUpdateAction(this._context, this, scalarProps); + } + } + for (var propName in navigationProps) { + var navigationPropProxy = this[propName]; + var navigationPropValue = navigationProps[propName]; + navigationPropProxy._recursivelyUpdate(navigationPropValue); + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.update' + }, + innerError: innerError + }); + } + }; + return ClientObjectBase; + }()); + OfficeExtension_1.ClientObjectBase = ClientObjectBase; + var Action = (function () { + function Action(actionInfo, operationType, flags) { + this.m_actionInfo = actionInfo; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(Action.prototype, "actionInfo", { + get: function () { + return this.m_actionInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + return Action; + }()); + OfficeExtension_1.Action = Action; + var ObjectPath = (function () { + function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest, operationType, flags) { + this.m_objectPathInfo = objectPathInfo; + this.m_parentObjectPath = parentObjectPath; + this.m_isCollection = isCollection; + this.m_isInvalidAfterRequest = isInvalidAfterRequest; + this.m_isValid = true; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(ObjectPath.prototype, "id", { + get: function () { + var argumentInfo = this.m_objectPathInfo.ArgumentInfo; + if (!argumentInfo) { + return undefined; + } + var argument = argumentInfo.Arguments; + if (!argument) { + return undefined; + } + return argument[0]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parent", { + get: function () { + var parent = this.m_parentObjectPath; + if (!parent) { + return undefined; + } + return parent; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentId", { + get: function () { + return this.parent ? this.parent.id : undefined; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "objectPathInfo", { + get: function () { + return this.m_objectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isCollection", { + get: function () { + return this.m_isCollection; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isInvalidAfterRequest", { + get: function () { + return this.m_isInvalidAfterRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentObjectPath", { + get: function () { + return this.m_parentObjectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "argumentObjectPaths", { + get: function () { + return this.m_argumentObjectPaths; + }, + set: function (value) { + this.m_argumentObjectPaths = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isValid", { + get: function () { + return this.m_isValid; + }, + set: function (value) { + this.m_isValid = value; + if (!value && + this.m_objectPathInfo.ObjectPathType === 6 && + this.m_savedObjectPathInfo) { + ObjectPath.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo, this.m_objectPathInfo); + this.m_parentObjectPath = this.m_savedObjectPathInfo.parent; + this.m_isValid = true; + this.m_savedObjectPathInfo = null; + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "originalObjectPathInfo", { + get: function () { + return this.m_originalObjectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "getByIdMethodName", { + get: function () { + return this.m_getByIdMethodName; + }, + set: function (value) { + this.m_getByIdMethodName = value; + }, + enumerable: true, + configurable: true + }); + ObjectPath.prototype._updateAsNullObject = function () { + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 7; + this.m_objectPathInfo.Name = ''; + this.m_parentObjectPath = null; + }; + ObjectPath.prototype.saveOriginalObjectPathInfo = function () { + if (OfficeExtension_1.config.extendedErrorLogging && !this.m_originalObjectPathInfo) { + this.m_originalObjectPathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, this.m_originalObjectPathInfo); + } + }; + ObjectPath.prototype.updateUsingObjectData = function (value, clientObject) { + var referenceId = value[CommonConstants.referenceId]; + if (!CoreUtility.isNullOrEmptyString(referenceId)) { + if (!this.m_savedObjectPathInfo && + !this.isInvalidAfterRequest && + ObjectPath.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)) { + var pathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, pathInfo); + this.m_savedObjectPathInfo = { + pathInfo: pathInfo, + parent: this.m_parentObjectPath + }; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 6; + this.m_objectPathInfo.Name = referenceId; + delete this.m_objectPathInfo.ParentObjectPathId; + this.m_parentObjectPath = null; + return; + } + if (clientObject) { + var collectionPropertyPath = clientObject[CommonConstants.collectionPropertyPath]; + if (!CoreUtility.isNullOrEmptyString(collectionPropertyPath) && clientObject.context) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + var propNames = collectionPropertyPath.split('.'); + var parent_1 = clientObject.context[propNames[0]]; + for (var i = 1; i < propNames.length; i++) { + parent_1 = parent_1[propNames[i]]; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_parentObjectPath = parent_1._objectPath; + this.m_objectPathInfo.ParentObjectPathId = this.m_parentObjectPath.objectPathInfo.Id; + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + } + var parentIsCollection = this.parentObjectPath && this.parentObjectPath.isCollection; + var getByIdMethodName = this.getByIdMethodName; + if (parentIsCollection || !CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + if (!CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + this.m_objectPathInfo.ObjectPathType = 3; + this.m_objectPathInfo.Name = getByIdMethodName; + } + else { + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + } + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + }; + ObjectPath.prototype.resetForUpdateUsingObjectData = function () { + this.m_isInvalidAfterRequest = false; + this.m_isValid = true; + this.m_operationType = 1; + this.m_flags = 4; + this.m_objectPathInfo.ArgumentInfo = {}; + this.m_argumentObjectPaths = null; + this.m_getByIdMethodName = null; + }; + ObjectPath.isRestorableObjectPath = function (objectPathType) { + return (objectPathType === 1 || + objectPathType === 5 || + objectPathType === 3 || + objectPathType === 4); + }; + ObjectPath.copyObjectPathInfo = function (src, dest) { + dest.Id = src.Id; + dest.ArgumentInfo = src.ArgumentInfo; + dest.Name = src.Name; + dest.ObjectPathType = src.ObjectPathType; + dest.ParentObjectPathId = src.ParentObjectPathId; + }; + return ObjectPath; + }()); + OfficeExtension_1.ObjectPath = ObjectPath; + var ClientRequestContextBase = (function () { + function ClientRequestContextBase() { + this.m_nextId = 0; + } + ClientRequestContextBase.prototype._nextId = function () { + return ++this.m_nextId; + }; + ClientRequestContextBase.prototype._addServiceApiAction = function (action, resultHandler, resolve, reject) { + if (!this.m_serviceApiQueue) { + this.m_serviceApiQueue = new ServiceApiQueue(this); + } + this.m_serviceApiQueue.add(action, resultHandler, resolve, reject); + }; + ClientRequestContextBase._parseQueryOption = function (option) { + var queryOption = {}; + if (typeof option === 'string') { + var select = option; + queryOption.Select = CommonUtility._parseSelectExpand(select); + } + else if (Array.isArray(option)) { + queryOption.Select = option; + } + else if (typeof option === 'object') { + var loadOption = option; + if (ClientRequestContextBase.isLoadOption(loadOption)) { + if (typeof loadOption.select === 'string') { + queryOption.Select = CommonUtility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select = loadOption.select; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.select)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.select' }); + } + if (typeof loadOption.expand === 'string') { + queryOption.Expand = CommonUtility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand = loadOption.expand; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.expand)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.expand' }); + } + if (typeof loadOption.top === 'number') { + queryOption.Top = loadOption.top; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.top)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.top' }); + } + if (typeof loadOption.skip === 'number') { + queryOption.Skip = loadOption.skip; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.skip)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.skip' }); + } + } + else { + queryOption = ClientRequestContextBase.parseStrictLoadOption(option); + } + } + else if (!CommonUtility.isNullOrUndefined(option)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option' }); + } + return queryOption; + }; + ClientRequestContextBase.isLoadOption = function (loadOption) { + if (!CommonUtility.isUndefined(loadOption.select) && + (typeof loadOption.select === 'string' || Array.isArray(loadOption.select))) + return true; + if (!CommonUtility.isUndefined(loadOption.expand) && + (typeof loadOption.expand === 'string' || Array.isArray(loadOption.expand))) + return true; + if (!CommonUtility.isUndefined(loadOption.top) && typeof loadOption.top === 'number') + return true; + if (!CommonUtility.isUndefined(loadOption.skip) && typeof loadOption.skip === 'number') + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContextBase.parseStrictLoadOption = function (option) { + var ret = { Select: [] }; + ClientRequestContextBase.parseStrictLoadOptionHelper(ret, '', 'option', option); + return ret; + }; + ClientRequestContextBase.combineQueryPath = function (pathPrefix, key, separator) { + if (pathPrefix.length === 0) { + return key; + } + else { + return pathPrefix + separator + key; + } + }; + ClientRequestContextBase.parseStrictLoadOptionHelper = function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value = option[key]; + if (key === '$all') { + if (typeof value !== 'boolean') { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, '*', '/')); + } + } + else if (key === '$top') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Top = value; + } + else if (key === '$skip') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Skip = value; + } + else { + if (typeof value === 'boolean') { + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/')); + } + } + else if (typeof value === 'object') { + ClientRequestContextBase.parseStrictLoadOptionHelper(queryInfo, ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/'), ClientRequestContextBase.combineQueryPath(argPrefix, key, '.'), value); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + } + } + }; + return ClientRequestContextBase; + }()); + OfficeExtension_1.ClientRequestContextBase = ClientRequestContextBase; + var InstantiateActionUpdateObjectPathHandler = (function () { + function InstantiateActionUpdateObjectPathHandler(m_objectPath) { + this.m_objectPath = m_objectPath; + } + InstantiateActionUpdateObjectPathHandler.prototype._handleResult = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + this.m_objectPath._updateAsNullObject(); + } + else { + this.m_objectPath.updateUsingObjectData(value, null); + } + }; + return InstantiateActionUpdateObjectPathHandler; + }()); + var ClientRequestBase = (function () { + function ClientRequestBase(context) { + this.m_contextBase = context; + this.m_actions = []; + this.m_actionResultHandler = {}; + this.m_referencedObjectPaths = {}; + this.m_instantiatedObjectPaths = {}; + this.m_preSyncPromises = []; + this.m_previewExecutionActions = []; + } + ClientRequestBase.prototype.addAction = function (action) { + this.m_actions.push(action); + if (action.actionInfo.ActionType == 1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId] = action; + } + }; + ClientRequestBase.prototype.addPreviewExecutionAction = function (action) { + this.m_previewExecutionActions.push(action); + }; + Object.defineProperty(ClientRequestBase.prototype, "hasActions", { + get: function () { + return this.m_actions.length > 0; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._getLastAction = function () { + return this.m_actions[this.m_actions.length - 1]; + }; + ClientRequestBase.prototype.ensureInstantiateObjectPath = function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo = { + Id: this.m_contextBase._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction = new Action(actionInfo, 1, 4); + instantiateAction.referencedObjectPath = objectPath; + this.addReferencedObjectPath(objectPath); + this.addAction(instantiateAction); + var resultHandler = new InstantiateActionUpdateObjectPathHandler(objectPath); + this.addActionResultHandler(instantiateAction, resultHandler); + } + } + }; + ClientRequestBase.prototype.ensureInstantiateObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addReferencedObjectPath = function (objectPath) { + if (!objectPath || this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + while (objectPath) { + this.m_referencedObjectPaths[objectPath.objectPathInfo.Id] = objectPath; + if (objectPath.objectPathInfo.ObjectPathType == 3) { + this.addReferencedObjectPaths(objectPath.argumentObjectPaths); + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase.prototype.addReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.addReferencedObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addActionResultHandler = function (action, resultHandler) { + this.m_actionResultHandler[action.actionInfo.Id] = resultHandler; + }; + ClientRequestBase.prototype.aggregrateRequestFlags = function (requestFlags, operationType, flags) { + if (operationType === 0) { + requestFlags = requestFlags | 1; + if ((flags & 2) === 0) { + requestFlags = requestFlags & ~16; + } + if ((flags & 8) === 0) { + requestFlags = requestFlags & ~256; + } + requestFlags = requestFlags & ~4; + } + if (flags & 1) { + requestFlags = requestFlags | 2; + } + if ((flags & 4) === 0) { + requestFlags = requestFlags & ~4; + } + return requestFlags; + }; + ClientRequestBase.prototype.finallyNormalizeFlags = function (requestFlags) { + if ((requestFlags & 1) === 0) { + requestFlags = requestFlags & ~16; + requestFlags = requestFlags & ~256; + } + if (!OfficeExtension_1._internalConfig.enableConcurrentFlag) { + requestFlags = requestFlags & ~4; + } + if (!OfficeExtension_1._internalConfig.enableUndoableFlag) { + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.1')) { + requestFlags = requestFlags & ~4; + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.2')) { + requestFlags = requestFlags & ~256; + } + if (typeof this.m_flagsForTesting === 'number') { + requestFlags = this.m_flagsForTesting; + } + return requestFlags; + }; + ClientRequestBase.prototype.buildRequestMessageBodyAndRequestFlags = function () { + if (OfficeExtension_1._internalConfig.enableEarlyDispose) { + ClientRequestBase._calculateLastUsedObjectPathIds(this.m_actions); + } + var requestFlags = 4 | + 16 | + 256; + var objectPaths = {}; + for (var i in this.m_referencedObjectPaths) { + requestFlags = this.aggregrateRequestFlags(requestFlags, this.m_referencedObjectPaths[i].operationType, this.m_referencedObjectPaths[i].flags); + objectPaths[i] = this.m_referencedObjectPaths[i].objectPathInfo; + } + var actions = []; + var hasKeepReference = false; + for (var index = 0; index < this.m_actions.length; index++) { + var action = this.m_actions[index]; + if (action.actionInfo.ActionType === 3 && + action.actionInfo.Name === CommonConstants.keepReference) { + hasKeepReference = true; + } + requestFlags = this.aggregrateRequestFlags(requestFlags, action.operationType, action.flags); + actions.push(action.actionInfo); + } + requestFlags = this.finallyNormalizeFlags(requestFlags); + var body = { + AutoKeepReference: this.m_contextBase._autoCleanup && hasKeepReference, + Actions: actions, + ObjectPaths: objectPaths + }; + if (this.m_previewExecutionActions.length > 0) { + body.PreviewExecutionActions = this.m_previewExecutionActions; + requestFlags = requestFlags | 4096; + } + return { + body: body, + flags: requestFlags + }; + }; + ClientRequestBase.prototype.processResponse = function (actionResults) { + if (actionResults) { + for (var i = 0; i < actionResults.length; i++) { + var actionResult = actionResults[i]; + var handler = this.m_actionResultHandler[actionResult.ActionId]; + if (handler) { + handler._handleResult(actionResult.Value); + } + } + } + }; + ClientRequestBase.prototype.invalidatePendingInvalidObjectPaths = function () { + for (var i in this.m_referencedObjectPaths) { + if (this.m_referencedObjectPaths[i].isInvalidAfterRequest) { + this.m_referencedObjectPaths[i].isValid = false; + } + } + }; + ClientRequestBase.prototype._addPreSyncPromise = function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequestBase.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._removeKeepReferenceAction = function (objectPathId) { + for (var i = this.m_actions.length - 1; i >= 0; i--) { + var actionInfo = this.m_actions[i].actionInfo; + if (actionInfo.ObjectPathId === objectPathId && + actionInfo.ActionType === 3 && + actionInfo.Name === CommonConstants.keepReference) { + this.m_actions.splice(i, 1); + break; + } + } + }; + ClientRequestBase._updateLastUsedActionIdOfObjectPathId = function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id] = actionId; + var argumentObjectPaths = objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength = argumentObjectPaths.length; + for (var i = 0; i < argumentObjectPathsLength; i++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase._calculateLastUsedObjectPathIds = function (actions) { + var lastUsedActionIdOfObjectPathId = {}; + var actionsLength = actions.length; + for (var index = actionsLength - 1; index >= 0; --index) { + var action = actions[index]; + var actionId = action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths = action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength = referencedObjectPaths.length; + for (var refIndex = 0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction = {}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId = lastUsedActionIdOfObjectPathId[key]; + var objectPathIds = lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds = []; + lastUsedObjectPathIdsOfAction[actionId] = objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index = 0; index < actionsLength; index++) { + var action = actions[index]; + var lastUsedObjectPathIds = lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L = lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; + return ClientRequestBase; + }()); + OfficeExtension_1.ClientRequestBase = ClientRequestBase; + var ClientResult = (function () { + function ClientResult(m_type) { + this.m_type = m_type; + } + Object.defineProperty(ClientResult.prototype, "value", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'clientResult.value' + } + }); + } + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ClientResult.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (typeof value === 'object' && value && value._IsNull) { + return; + } + if (this.m_type === 1) { + this.m_value = CommonUtility.adjustToDateTime(value); + } + else { + this.m_value = value; + } + }; + return ClientResult; + }()); + OfficeExtension_1.ClientResult = ClientResult; + var ServiceApiQueue = (function () { + function ServiceApiQueue(m_context) { + this.m_context = m_context; + this.m_actions = []; + } + ServiceApiQueue.prototype.add = function (action, resultHandler, resolve, reject) { + var _this = this; + this.m_actions.push({ action: action, resultHandler: resultHandler, resolve: resolve, reject: reject }); + if (this.m_actions.length === 1) { + setTimeout(function () { return _this.processActions(); }, 0); + } + }; + ServiceApiQueue.prototype.processActions = function () { + var _this = this; + if (this.m_actions.length === 0) { + return; + } + var actions = this.m_actions; + this.m_actions = []; + var request = new ClientRequestBase(this.m_context); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + request.ensureInstantiateObjectPath(action.action.referencedObjectPath); + request.ensureInstantiateObjectPaths(action.action.referencedArgumentObjectPaths); + request.addAction(action.action); + request.addReferencedObjectPath(action.action.referencedObjectPath); + request.addReferencedObjectPaths(action.action.referencedArgumentObjectPaths); + } + var _a = request.buildRequestMessageBodyAndRequestFlags(), body = _a.body, flags = _a.flags; + var requestMessage = { + Url: CoreConstants.localDocumentApiPrefix, + Headers: null, + Body: body + }; + CoreUtility.log('Request:'); + CoreUtility.log(JSON.stringify(body)); + var executor = new HttpRequestExecutor(); + executor + .executeAsync(this.m_context._customData, flags, requestMessage) + .then(function (response) { + _this.processResponse(request, actions, response); + })["catch"](function (ex) { + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + action.reject(ex); + } + }); + }; + ServiceApiQueue.prototype.processResponse = function (request, actions, response) { + var error = this.getErrorFromResponse(response); + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (!actionResults) { + actionResults = []; + } + this.processActionResults(request, actions, actionResults, error); + }; + ServiceApiQueue.prototype.getErrorFromResponse = function (response) { + if (!CoreUtility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage + }); + } + if (response.Body && response.Body.Error) { + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message + }); + } + return null; + }; + ServiceApiQueue.prototype.processActionResults = function (request, actions, actionResults, err) { + request.processResponse(actionResults); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + var actionId = action.action.actionInfo.Id; + var hasResult = false; + for (var j = 0; j < actionResults.length; j++) { + if (actionId == actionResults[j].ActionId) { + var resultValue = actionResults[j].Value; + if (action.resultHandler) { + action.resultHandler._handleResult(resultValue); + resultValue = action.resultHandler.value; + } + if (action.resolve) { + action.resolve(resultValue); + } + hasResult = true; + break; + } + } + if (!hasResult && action.reject) { + if (err) { + action.reject(err); + } + else { + action.reject('No response for the action.'); + } + } + } + }; + return ServiceApiQueue; + }()); + var HttpRequestExecutor = (function () { + function HttpRequestExecutor() { + } + HttpRequestExecutor.prototype.getRequestUrl = function (baseUrl, requestFlags) { + if (baseUrl.charAt(baseUrl.length - 1) != '/') { + baseUrl = baseUrl + '/'; + } + baseUrl = baseUrl + CoreConstants.processQuery; + baseUrl = baseUrl + '?' + CoreConstants.flags + '=' + requestFlags.toString(); + return baseUrl; + }; + HttpRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var url = this.getRequestUrl(requestMessage.Url, requestFlags); + var requestInfo = { + method: 'POST', + url: url, + headers: {}, + body: requestMessage.Body + }; + requestInfo.headers[CoreConstants.sourceLibHeader] = HttpRequestExecutor.SourceLibHeaderValue; + requestInfo.headers['CONTENT-TYPE'] = 'application/json'; + if (requestMessage.Headers) { + for (var key in requestMessage.Headers) { + requestInfo.headers[key] = requestMessage.Headers[key]; + } + } + var sendRequestFunc = CoreUtility._isLocalDocumentUrl(requestInfo.url) + ? HttpUtility.sendLocalDocumentRequest + : HttpUtility.sendRequest; + return sendRequestFunc(requestInfo).then(function (responseInfo) { + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null, + RawErrorResponseBody: CoreUtility._parseErrorResponseBody(responseInfo) + }; + } + return response; + }); + }; + HttpRequestExecutor.SourceLibHeaderValue = 'officejs-rest'; + return HttpRequestExecutor; + }()); + OfficeExtension_1.HttpRequestExecutor = HttpRequestExecutor; + var CommonConstants = (function (_super) { + __extends(CommonConstants, _super); + function CommonConstants() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonConstants.collectionPropertyPath = '_collectionPropertyPath'; + CommonConstants.id = 'Id'; + CommonConstants.idLowerCase = 'id'; + CommonConstants.idPrivate = '_Id'; + CommonConstants.keepReference = '_KeepReference'; + CommonConstants.objectPathIdPrivate = '_ObjectPathId'; + CommonConstants.referenceId = '_ReferenceId'; + CommonConstants.items = '_Items'; + CommonConstants.itemsLowerCase = 'items'; + CommonConstants.scalarPropertyNames = '_scalarPropertyNames'; + CommonConstants.scalarPropertyOriginalNames = '_scalarPropertyOriginalNames'; + CommonConstants.navigationPropertyNames = '_navigationPropertyNames'; + CommonConstants.scalarPropertyUpdateable = '_scalarPropertyUpdateable'; + CommonConstants.previewExecutionObjectId = '_previewExecutionObjectId'; + return CommonConstants; + }(CoreConstants)); + OfficeExtension_1.CommonConstants = CommonConstants; + var CommonUtility = (function (_super) { + __extends(CommonUtility, _super); + function CommonUtility() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonUtility.validateObjectPath = function (clientObject) { + var objectPath = clientObject._objectPath; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + objectPath = objectPath.parentObjectPath; + } + }; + CommonUtility.validateReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + var objectPath = objectPaths[i]; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)) + }); + } + objectPath = objectPath.parentObjectPath; + } + } + } + }; + CommonUtility._toCamelLowerCase = function (name) { + if (CoreUtility.isNullOrEmptyString(name)) { + return name; + } + var index = 0; + while (index < name.length && name.charCodeAt(index) >= 65 && name.charCodeAt(index) <= 90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase() + name.substr(index); + } + else { + return name.toLowerCase(); + } + }; + CommonUtility.adjustToDateTime = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return null; + } + if (typeof value === 'string') { + return new Date(value); + } + if (Array.isArray(value)) { + var arr = value; + for (var i = 0; i < arr.length; i++) { + arr[i] = CommonUtility.adjustToDateTime(arr[i]); + } + return arr; + } + throw CoreUtility._createInvalidArgError({ argumentName: 'date' }); + }; + CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult = function (value) { + var id = value[CommonConstants.id]; + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idLowerCase]; + } + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idPrivate]; + } + return id; + }; + CommonUtility.getObjectPathExpression = function (objectPath) { + var ret = ''; + while (objectPath) { + switch (objectPath.objectPathInfo.ObjectPathType) { + case 1: + ret = ret; + break; + case 2: + ret = 'new()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 3: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + '()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 4: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + (ret.length > 0 ? '.' : '') + ret; + break; + case 5: + ret = 'getItem()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 6: + ret = '_reference()' + (ret.length > 0 ? '.' : '') + ret; + break; + } + objectPath = objectPath.parentObjectPath; + } + return ret; + }; + CommonUtility.setMethodArguments = function (context, argumentInfo, args) { + if (CoreUtility.isNullOrUndefined(args)) { + return null; + } + var referencedObjectPaths = new Array(); + var referencedObjectPathIds = new Array(); + var hasOne = CommonUtility.collectObjectPathInfos(context, args, referencedObjectPaths, referencedObjectPathIds); + argumentInfo.Arguments = args; + if (hasOne) { + argumentInfo.ReferencedObjectPathIds = referencedObjectPathIds; + } + return referencedObjectPaths; + }; + CommonUtility.validateContext = function (context, obj) { + if (context && obj && obj._context !== context) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidRequestContext, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidRequestContext) + }); + } + }; + CommonUtility.isSetSupported = function (apiSetName, apiSetVersion) { + if (typeof CommonUtility.isSetSupportedOverride === "function") { + return CommonUtility.isSetSupportedOverride(apiSetName, apiSetVersion); + } + if (typeof window !== 'undefined' && + window.Office && + window.Office.context && + window.Office.context.requirements) { + return window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion); + } + return true; + }; + CommonUtility.throwIfApiNotSupported = function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!CommonUtility._doApiNotSupportedCheck) { + return; + } + if (!CommonUtility.isSetSupported(apiSetName, apiSetVersion)) { + var message = CoreUtility._getResourceString(CoreResourceStrings.apiNotFoundDetails, [ + apiFullName, + apiSetName + ' ' + apiSetVersion, + hostName + ]); + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.apiNotFound, + httpStatusCode: 404, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + }; + CommonUtility.calculateApiFlags = function (apiFlags, undoableApiSetName, undoableApiSetVersion) { + var undoable = false; + var inMakerRuntime = (window + && window.location + && window.location.href + && window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc") !== -1); + if (typeof CommonUtility.isSetSupportedOverride === "function") { + undoable = CommonUtility.isSetSupportedOverride(undoableApiSetName, undoableApiSetVersion); + } + else if (inMakerRuntime) { + undoable = false; + } + else { + undoable = CommonUtility.isSetSupported(undoableApiSetName, undoableApiSetVersion); + } + if (!undoable) { + apiFlags = apiFlags & (~2); + } + return apiFlags; + }; + CommonUtility._parseSelectExpand = function (select) { + var args = []; + if (!CoreUtility.isNullOrEmptyString(select)) { + var propertyNames = select.split(','); + for (var i = 0; i < propertyNames.length; i++) { + var propertyName = propertyNames[i]; + propertyName = sanitizeForAnyItemsSlash(propertyName.trim()); + if (propertyName.length > 0) { + args.push(propertyName); + } + } + } + return args; + function sanitizeForAnyItemsSlash(propertyName) { + var propertyNameLower = propertyName.toLowerCase(); + if (propertyNameLower === 'items' || propertyNameLower === 'items/') { + return '*'; + } + var itemsSlashLength = 6; + var isItemsSlashOrItemsDot = propertyNameLower.substr(0, itemsSlashLength) === 'items/' || + propertyNameLower.substr(0, itemsSlashLength) === 'items.'; + if (isItemsSlashOrItemsDot) { + propertyName = propertyName.substr(itemsSlashLength); + } + return propertyName.replace(new RegExp('[/.]items[/.]', 'gi'), '/'); + } + }; + CommonUtility.changePropertyNameToCamelLowerCase = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + var propValue = value[key]; + if (key === CommonConstants.items) { + ret = {}; + ret[CommonConstants.itemsLowerCase] = this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else { + var propName = CommonUtility._toCamelLowerCase(key); + ret[propName] = this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.purifyJson = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.purifyJson(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + if (key.charCodeAt(0) !== charCodeUnderscore) { + var propValue = value[key]; + if (typeof propValue === 'object' && propValue !== null && Array.isArray(propValue['items'])) { + propValue = propValue['items']; + } + ret[key] = this.purifyJson(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.collectObjectPathInfos = function (context, args, referencedObjectPaths, referencedObjectPathIds) { + var hasOne = false; + for (var i = 0; i < args.length; i++) { + if (args[i] instanceof ClientObjectBase) { + var clientObject = args[i]; + CommonUtility.validateContext(context, clientObject); + args[i] = clientObject._objectPath.objectPathInfo.Id; + referencedObjectPathIds.push(clientObject._objectPath.objectPathInfo.Id); + referencedObjectPaths.push(clientObject._objectPath); + hasOne = true; + } + else if (Array.isArray(args[i])) { + var childArrayObjectPathIds = new Array(); + var childArrayHasOne = CommonUtility.collectObjectPathInfos(context, args[i], referencedObjectPaths, childArrayObjectPathIds); + if (childArrayHasOne) { + referencedObjectPathIds.push(childArrayObjectPathIds); + hasOne = true; + } + else { + referencedObjectPathIds.push(0); + } + } + else if (CoreUtility.isPlainJsonObject(args[i])) { + referencedObjectPathIds.push(0); + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(args[i], referencedObjectPaths); + } + else { + referencedObjectPathIds.push(0); + } + } + return hasOne; + }; + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds = function (value, referencedObjectPaths) { + var _a, _b; + for (var key in value) { + var propValue = value[key]; + if (propValue instanceof ClientObjectBase) { + referencedObjectPaths.push(propValue._objectPath); + value[key] = (_a = {}, _a[CommonConstants.objectPathIdPrivate] = propValue._objectPath.objectPathInfo.Id, _a); + } + else if (Array.isArray(propValue)) { + for (var i = 0; i < propValue.length; i++) { + if (propValue[i] instanceof ClientObjectBase) { + var elem = propValue[i]; + referencedObjectPaths.push(elem._objectPath); + propValue[i] = (_b = {}, _b[CommonConstants.objectPathIdPrivate] = elem._objectPath.objectPathInfo.Id, _b); + } + else if (CoreUtility.isPlainJsonObject(propValue[i])) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue[i], referencedObjectPaths); + } + } + } + else if (CoreUtility.isPlainJsonObject(propValue)) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue, referencedObjectPaths); + } + else { + } + } + }; + CommonUtility.normalizeName = function (name) { + return name.substr(0, 1).toLowerCase() + name.substr(1); + }; + CommonUtility._doApiNotSupportedCheck = false; + return CommonUtility; + }(CoreUtility)); + OfficeExtension_1.CommonUtility = CommonUtility; + var CommonResourceStrings = (function (_super) { + __extends(CommonResourceStrings, _super); + function CommonResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonResourceStrings.propertyDoesNotExist = 'PropertyDoesNotExist'; + CommonResourceStrings.attemptingToSetReadOnlyProperty = 'AttemptingToSetReadOnlyProperty'; + return CommonResourceStrings; + }(CoreResourceStrings)); + OfficeExtension_1.CommonResourceStrings = CommonResourceStrings; + var ClientRetrieveResult = (function (_super) { + __extends(ClientRetrieveResult, _super); + function ClientRetrieveResult(m_shouldPolyfill) { + var _this = _super.call(this) || this; + _this.m_shouldPolyfill = m_shouldPolyfill; + return _this; + } + ClientRetrieveResult.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (this.m_shouldPolyfill) { + this.m_value = CommonUtility.changePropertyNameToCamelLowerCase(this.m_value); + } + this.m_value = this.removeItemNodes(this.m_value); + }; + ClientRetrieveResult.prototype.removeItemNodes = function (value) { + if (typeof value === 'object' && value !== null && value[CommonConstants.itemsLowerCase]) { + value = value[CommonConstants.itemsLowerCase]; + } + return CommonUtility.purifyJson(value); + }; + return ClientRetrieveResult; + }(ClientResult)); + OfficeExtension_1.ClientRetrieveResult = ClientRetrieveResult; + var TraceActionResultHandler = (function () { + function TraceActionResultHandler(callback) { + this.callback = callback; + } + TraceActionResultHandler.prototype._handleResult = function (value) { + if (this.callback) { + this.callback(); + } + }; + return TraceActionResultHandler; + }()); + var ClientResultCallback = (function (_super) { + __extends(ClientResultCallback, _super); + function ClientResultCallback(callback) { + var _this = _super.call(this) || this; + _this.callback = callback; + return _this; + } + ClientResultCallback.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + this.callback(); + }; + return ClientResultCallback; + }(ClientResult)); + OfficeExtension_1.ClientResultCallback = ClientResultCallback; + var OperationalApiHelper = (function () { + function OperationalApiHelper() { + } + OperationalApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + if (operationType === void 0) { + operationType = 0; + } + if (args === void 0) { + args = []; + } + if (flags === void 0) { + flags = 0; + } + if (resultProcessType === void 0) { + resultProcessType = 0; + } + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResult(); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeMethodWithClientResultCallback = function (callback, obj, methodName) { + var operationType = 0; + var args = []; + var flags = 0; + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResultCallback(callback); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeRetrieve = function (obj, select) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var option; + if (typeof select[0] === 'object' && select[0].hasOwnProperty('$all')) { + if (!select[0]['$all']) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + option = select[0]; + } + else { + option = OperationalApiHelper._parseSelectOption(select); + } + return obj._retrieve(option, new ClientRetrieveResult(shouldPolyfill)); + }; + OperationalApiHelper._parseSelectOption = function (select) { + if (!select || !select[0]) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + var parsedSelect = select[0] && typeof select[0] !== 'string' ? select[0] : select; + return Array.isArray(parsedSelect) ? parsedSelect : OperationalApiHelper.parseRecursiveSelect(parsedSelect); + }; + OperationalApiHelper.parseRecursiveSelect = function (select) { + var deconstruct = function (selectObj) { + return Object.keys(selectObj).reduce(function (scalars, name) { + var value = selectObj[name]; + if (typeof value === 'object') { + return scalars.concat(deconstruct(value).map(function (postfix) { return name + "/" + postfix; })); + } + if (value) { + return scalars.concat(name); + } + return scalars; + }, []); + }; + return deconstruct(select); + }; + OperationalApiHelper.invokeRecursiveUpdate = function (obj, properties) { + return CoreUtility.createPromise(function (resolve, reject) { + obj._recursivelyUpdate(properties); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + obj._context._addServiceApiAction(action, null, resolve, reject); + }); + }; + OperationalApiHelper.createRootServiceObject = function (type, context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + var objectPath = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var objectPath = new ObjectPath(objectPathInfo, null, isCollection, false, 1, flags | 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, false, 1, flags | 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createIndexerObject = function (type, parent, args) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var id = parent._context._nextId(); + var objectPathInfo = { + Id: id, + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var o = new type(parent._context, objectPath); + return o; + }; + OperationalApiHelper.createAndInstantiateMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + return CoreUtility.createPromise(function (resolve, reject) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var result = new ClientResult(); + var actionInfo = { + Id: parent._context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id, + QueryInfo: {} + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = objectPath; + parent._context._addServiceApiAction(action, result, function () { return resolve(new type(parent._context, objectPath)); }, reject); + }); + }; + OperationalApiHelper.createTraceAction = function (context, callback) { + return CoreUtility.createPromise(function (resolve, reject) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + var result = new TraceActionResultHandler(callback); + context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.localDocumentContext = new ClientRequestContextBase(); + return OperationalApiHelper; + }()); + OfficeExtension_1.OperationalApiHelper = OperationalApiHelper; + var GenericEventRegistryOperational = (function () { + function GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform) { + this.eventId = eventId; + this.targetId = targetId; + this.eventArgumentTransform = eventArgumentTransform; + this.registeredCallbacks = []; + } + GenericEventRegistryOperational.prototype.add = function (callback) { + if (this.hasZero()) { + GenericEventRegistration.getGenericEventRegistration('').register(this.eventId, this.targetId, this.registerCallback); + } + this.registeredCallbacks.push(callback); + }; + GenericEventRegistryOperational.prototype.remove = function (callback) { + var index = this.registeredCallbacks.lastIndexOf(callback); + if (index !== -1) { + this.registeredCallbacks.splice(index, 1); + } + }; + GenericEventRegistryOperational.prototype.removeAll = function () { + this.registeredCallbacks = []; + GenericEventRegistration.getGenericEventRegistration('').unregister(this.eventId, this.targetId, this.registerCallback); + }; + GenericEventRegistryOperational.prototype.hasZero = function () { + return this.registeredCallbacks.length === 0; + }; + Object.defineProperty(GenericEventRegistryOperational.prototype, "registerCallback", { + get: function () { + var i = this; + if (!this.outsideCallback) { + this.outsideCallback = function (argument) { + i.call(argument); + }; + } + return this.outsideCallback; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistryOperational.prototype.call = function (rawEventArguments) { + var _this = this; + this.eventArgumentTransform(rawEventArguments).then(function (eventArguments) { + var promises = _this.registeredCallbacks.map(function (callback) { return GenericEventRegistryOperational.callCallback(callback, eventArguments); }); + CoreUtility.Promise.all(promises); + }); + }; + GenericEventRegistryOperational.callCallback = function (callback, eventArguments) { + return CoreUtility._createPromiseFromResult(null) + .then(GenericEventRegistryOperational.wrapCallbackInFunction(callback, eventArguments))["catch"](function (e) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(e)); + }); + }; + GenericEventRegistryOperational.wrapCallbackInFunction = function (callback, args) { + return function () { return callback(args); }; + }; + return GenericEventRegistryOperational; + }()); + OfficeExtension_1.GenericEventRegistryOperational = GenericEventRegistryOperational; + var GlobalEventRegistryOperational = (function () { + function GlobalEventRegistryOperational() { + this.eventToTargetToHandlerMap = {}; + } + Object.defineProperty(GlobalEventRegistryOperational, "globalEventRegistry", { + get: function () { + if (!GlobalEventRegistryOperational.singleton) { + GlobalEventRegistryOperational.singleton = new GlobalEventRegistryOperational(); + } + return GlobalEventRegistryOperational.singleton; + }, + enumerable: true, + configurable: true + }); + GlobalEventRegistryOperational.getGlobalEventRegistry = function (eventId, targetId, eventArgumentTransform) { + var global = GlobalEventRegistryOperational.globalEventRegistry; + var mapGlobal = global.eventToTargetToHandlerMap; + if (!mapGlobal.hasOwnProperty(eventId)) { + mapGlobal[eventId] = {}; + } + var mapEvent = mapGlobal[eventId]; + if (!mapEvent.hasOwnProperty(targetId)) { + mapEvent[targetId] = new GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform); + } + var target = mapEvent[targetId]; + return target; + }; + GlobalEventRegistryOperational.singleton = undefined; + return GlobalEventRegistryOperational; + }()); + OfficeExtension_1.GlobalEventRegistryOperational = GlobalEventRegistryOperational; + var GenericEventHandlerOperational = (function () { + function GenericEventHandlerOperational(genericEventInfo) { + this.genericEventInfo = genericEventInfo; + } + GenericEventHandlerOperational.prototype.add = function (callback) { + var _this = this; + var eventRegistered = undefined; + var promise = CoreUtility.createPromise(function (resolve) { + eventRegistered = resolve; + }); + var addCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.add(callback); + eventRegistered(); + }; + this.register(); + this.createTrace(addCallback); + return promise; + }; + GenericEventHandlerOperational.prototype.remove = function (callback) { + var _this = this; + var removeCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.remove(callback); + }; + this.register(); + this.createTrace(removeCallback); + }; + GenericEventHandlerOperational.prototype.removeAll = function () { + var _this = this; + var removeAllCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.removeAll(); + }; + this.unregister(); + this.createTrace(removeAllCallback); + }; + GenericEventHandlerOperational.prototype.createTrace = function (callback) { + OperationalApiHelper.createTraceAction(this.genericEventInfo.object._context, callback); + }; + GenericEventHandlerOperational.prototype.register = function () { + var operationType = 0; + var args = []; + var flags = 0; + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.register, operationType, args, flags); + if (!GenericEventRegistration.getGenericEventRegistration('').isReady) { + GenericEventRegistration.getGenericEventRegistration('').ready(); + } + }; + GenericEventHandlerOperational.prototype.unregister = function () { + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.unregister); + }; + return GenericEventHandlerOperational; + }()); + OfficeExtension_1.GenericEventHandlerOperational = GenericEventHandlerOperational; + var EventHelper = (function () { + function EventHelper() { + } + EventHelper.invokeOn = function (eventHandler, callback, options) { + var promiseResolve = undefined; + var promise = CoreUtility.createPromise(function (resolve, reject) { + promiseResolve = resolve; + }); + eventHandler.add(callback).then(function () { + promiseResolve({}); + }); + return promise; + }; + EventHelper.invokeOff = function (genericEventHandlersOpObj, eventHandler, eventName, callback) { + if (!eventName && !callback) { + var allGenericEventHandlersOp = Object.keys(genericEventHandlersOpObj).map(function (eventName) { return genericEventHandlersOpObj[eventName]; }); + return EventHelper.invokeAllOff(allGenericEventHandlersOp); + } + if (!eventName) { + return CoreUtility._createPromiseFromException(eventName + " must be supplied if handler is supplied."); + } + if (callback) { + eventHandler.remove(callback); + } + else { + eventHandler.removeAll(); + } + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + EventHelper.invokeAllOff = function (allGenericEventHandlersOperational) { + allGenericEventHandlersOperational.forEach(function (genericEventHandlerOperational) { + genericEventHandlerOperational.removeAll(); + }); + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + return EventHelper; + }()); + OfficeExtension_1.EventHelper = EventHelper; + var ErrorCodes = (function (_super) { + __extends(ErrorCodes, _super); + function ErrorCodes() { + return _super !== null && _super.apply(this, arguments) || this; + } + ErrorCodes.propertyNotLoaded = 'PropertyNotLoaded'; + ErrorCodes.runMustReturnPromise = 'RunMustReturnPromise'; + ErrorCodes.cannotRegisterEvent = 'CannotRegisterEvent'; + ErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + ErrorCodes.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ErrorCodes; + }(CoreErrorCodes)); + OfficeExtension_1.ErrorCodes = ErrorCodes; + var TraceMarkerActionResultHandler = (function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback = callback; + } + TraceMarkerActionResultHandler.prototype._handleResult = function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); + var ActionFactory = (function (_super) { + __extends(ActionFactory, _super); + function ActionFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + ActionFactory.createMethodAction = function (context, parent, methodName, operationType, args, flags) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var fixedFlags = Utility._fixupApiFlags(flags); + var action = new Action(actionInfo, operationType, fixedFlags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + parent._addAction(action); + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (fixedFlags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + Arguments: args, + ObjectId: '', + ObjectType: '' + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return action; + }; + ActionFactory.createRecursiveQueryAction = function (context, parent, query) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 6, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + RecursiveQueryInfo: query + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createEnsureUnchangedAction = function (context, parent, objectState) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 8, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createInstantiateAction = function (context, obj) { + Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); + var actionInfo = { + Id: context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: obj._objectPath.objectPathInfo.Id + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = obj._objectPath; + obj._addAction(action, new InstantiateActionResultHandler(obj), true); + return action; + }; + ActionFactory.createTraceAction = function (context, message, addTraceMessage) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var ret = new Action(actionInfo, 1, 4); + context._pendingRequest.addAction(ret); + if (addTraceMessage) { + context._pendingRequest.addTrace(actionInfo.Id, message); + } + return ret; + }; + ActionFactory.createTraceMarkerForCallback = function (context, callback) { + var action = ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; + return ActionFactory; + }(CommonActionFactory)); + OfficeExtension_1.ActionFactory = ActionFactory; + var ClientObject = (function (_super) { + __extends(ClientObject, _super); + function ClientObject(context, objectPath) { + var _this = _super.call(this, context, objectPath) || this; + Utility.checkArgumentNull(context, 'context'); + _this.m_context = context; + if (_this._objectPath) { + if (!context._processingResult && context._pendingRequest) { + ActionFactory.createInstantiateAction(context, _this); + if (context._autoCleanup && _this._KeepReference) { + context.trackedObjects._autoAdd(_this); + } + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo && _this._objectPath.objectPathInfo && _this._className) { + _this._objectPath.objectPathInfo.T = _this._className; + } + } + return _this; + } + Object.defineProperty(ClientObject.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNull", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNull', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNullObject", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNullObject', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "_isNull", { + get: function () { + return this.m_isNull; + }, + set: function (value) { + this.m_isNull = value; + if (value && this._objectPath) { + this._objectPath._updateAsNullObject(); + } + }, + enumerable: true, + configurable: true + }); + ClientObject.prototype._addAction = function (action, resultHandler, isInstantiationEnsured) { + if (resultHandler === void 0) { + resultHandler = null; + } + if (!isInstantiationEnsured) { + this.context._pendingRequest.ensureInstantiateObjectPath(this._objectPath); + this.context._pendingRequest.ensureInstantiateObjectPaths(action.referencedArgumentObjectPaths); + } + this.context._pendingRequest.addAction(action); + this.context._pendingRequest.addReferencedObjectPath(this._objectPath); + this.context._pendingRequest.addReferencedObjectPaths(action.referencedArgumentObjectPaths); + this.context._pendingRequest.addActionResultHandler(action, resultHandler); + return CoreUtility._createPromiseFromResult(null); + }; + ClientObject.prototype._addPreviewExecutionAction = function (action) { + if (!Utility.isUndefined(this._className)) { + action.ObjectType = this._className; + var objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idLowerCase); + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idPrivate); + } + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.previewExecutionObjectId); + } + action.ObjectId = objectId; + this.context._pendingRequest.addPreviewExecutionAction(action); + } + }; + ClientObject.prototype._handleResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleIdResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + Utility.fixObjectPathIfNecessary(this, value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleRetrieveResult = function (value, result) { + this._handleIdResult(value); + }; + ClientObject.prototype._recursivelySet = function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { + var isClientObject = input instanceof ClientObject; + var originalInput = input; + if (isClientObject) { + if (Object.getPrototypeOf(this) === Object.getPrototypeOf(input)) { + input = JSON.parse(JSON.stringify(input)); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'properties', + errorLocation: this._className + '.set' + }); + } + } + try { + var prop; + for (var i = 0; i < scalarWriteablePropertyNames.length; i++) { + prop = scalarWriteablePropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + this[prop] = input[prop]; + } + } + } + for (var i = 0; i < objectPropertyNames.length; i++) { + prop = objectPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + var dataToPassToSet = isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } + } + } + var throwOnReadOnly = !isClientObject; + if (options && !Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly = options.throwOnReadOnly; + } + for (var i = 0; i < notAllowedToBeSetPropertyNames.length; i++) { + prop = notAllowedToBeSetPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined' && throwOnReadOnly) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + for (prop in input) { + if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); + if (!propertyDescriptor) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, prop), + debugInfo: { + errorLocation: prop + } + }); + } + if (throwOnReadOnly && !propertyDescriptor.set) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.set' + }, + innerError: innerError + }); + } + }; + return ClientObject; + }(ClientObjectBase)); + OfficeExtension_1.ClientObject = ClientObject; + var HostBridgeRequestExecutor = (function () { + function HostBridgeRequestExecutor(session) { + this.m_session = session; + } + HostBridgeRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var httpRequestInfo = { + url: CoreConstants.processQuery, + method: 'POST', + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var controlId = ''; + if (requestMessage.Headers) { + controlId = requestMessage.Headers[Constants.officeControlId]; + } + var message = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + controlId: controlId, + message: httpRequestInfo + }; + CoreUtility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message).then(function (nativeBridgeResponse) { + CoreUtility.log('Received response: ' + JSON.stringify(nativeBridgeResponse)); + var responseInfo = nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession = (function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(m_bridge) { + var _this = _super.call(this) || this; + _this.m_bridge = m_bridge; + _this.m_bridge.addHostMessageHandler(function (message) { + if (message.type === 3) { + var controlId = message.controlId; + if (CoreUtility.isNullOrEmptyString(controlId)) { + GenericEventRegistration.getGenericEventRegistration(controlId)._handleRichApiMessage(message.message); + } + else { + var eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(controlId); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(''); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + } + } + }); + return _this; + } + HostBridgeSession.getInstanceIfHostBridgeInited = function () { + if (HostBridge.instance) { + if (CoreUtility.isNullOrUndefined(HostBridgeSession.s_instance) || + HostBridgeSession.s_instance.m_bridge !== HostBridge.instance) { + HostBridgeSession.s_instance = new HostBridgeSession(HostBridge.instance); + } + return HostBridgeSession.s_instance; + } + return null; + }; + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull = function () { + CoreUtility.log('NativeBridgeSession::CreateRequestExecutor'); + return new HostBridgeRequestExecutor(this); + }; + HostBridgeSession.prototype.getEventRegistration = function (controlId) { + return GenericEventRegistration.getGenericEventRegistration(controlId); + }; + HostBridgeSession.prototype.sendMessageToHost = function (message) { + return this.m_bridge.sendMessageToHostAndExpectResponse(message); + }; + return HostBridgeSession; + }(SessionBase)); + OfficeExtension_1.HostBridgeSession = HostBridgeSession; + var ClientRequestContext = (function (_super) { + __extends(ClientRequestContext, _super); + function ClientRequestContext(url) { + var _this = _super.call(this) || this; + _this.m_customRequestHeaders = {}; + _this.m_batchMode = 0; + _this._onRunFinishedNotifiers = []; + if (SessionBase._overrideSession) { + _this.m_requestUrlAndHeaderInfoResolver = SessionBase._overrideSession; + } + else { + if (Utility.isNullOrUndefined(url) || (typeof url === 'string' && url.length === 0)) { + url = ClientRequestContext.defaultRequestUrlAndHeaders; + if (!url) { + url = { url: CoreConstants.localDocument, headers: {} }; + } + } + if (typeof url === 'string') { + _this.m_requestUrlAndHeaderInfo = { url: url, headers: {} }; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfoResolver(url)) { + _this.m_requestUrlAndHeaderInfoResolver = url; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfo(url)) { + var requestInfo = url; + _this.m_requestUrlAndHeaderInfo = { url: requestInfo.url, headers: {} }; + CoreUtility._copyHeaders(requestInfo.headers, _this.m_requestUrlAndHeaderInfo.headers); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'url' }); + } + } + if (!_this.m_requestUrlAndHeaderInfoResolver && + _this.m_requestUrlAndHeaderInfo && + CoreUtility._isLocalDocumentUrl(_this.m_requestUrlAndHeaderInfo.url) && + HostBridgeSession.getInstanceIfHostBridgeInited()) { + _this.m_requestUrlAndHeaderInfo = null; + _this.m_requestUrlAndHeaderInfoResolver = HostBridgeSession.getInstanceIfHostBridgeInited(); + } + if (_this.m_requestUrlAndHeaderInfoResolver instanceof SessionBase) { + _this.m_session = _this.m_requestUrlAndHeaderInfoResolver; + } + _this._processingResult = false; + _this._customData = Constants.iterativeExecutor; + _this.sync = _this.sync.bind(_this); + return _this; + } + Object.defineProperty(ClientRequestContext.prototype, "session", { + get: function () { + return this.m_session; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "eventRegistration", { + get: function () { + if (this.m_session) { + return this.m_session.getEventRegistration(this._controlId); + } + return _Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_url", { + get: function () { + if (this.m_requestUrlAndHeaderInfo) { + return this.m_requestUrlAndHeaderInfo.url; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_pendingRequest", { + get: function () { + if (this.m_pendingRequest == null) { + this.m_pendingRequest = new ClientRequest(this); + } + return this.m_pendingRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_controlId", { + get: function () { + var ret = this.m_customRequestHeaders[Constants.officeControlId]; + if (CoreUtility.isNullOrUndefined(ret)) { + ret = ''; + } + return ret; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension_1._internalConfig.showDisposeInfoInDebugInfo); + var statements = prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { + get: function () { + if (!this.m_trackedObjects) { + this.m_trackedObjects = new TrackedObjects(this); + } + return this.m_trackedObjects; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "requestHeaders", { + get: function () { + return this.m_customRequestHeaders; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "batchMode", { + get: function () { + return this.m_batchMode; + }, + enumerable: true, + configurable: true + }); + ClientRequestContext.prototype.ensureInProgressBatchIfBatchMode = function () { + if (this.m_batchMode === 1 && !this.m_explicitBatchInProgress) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.notInsideBatch), null); + } + }; + ClientRequestContext.prototype.load = function (clientObj, option) { + Utility.validateContext(this, clientObj); + var queryOption = ClientRequestContext._parseQueryOption(option); + CommonActionFactory.createQueryAction(this, clientObj, queryOption, clientObj); + }; + ClientRequestContext.prototype.loadRecursive = function (clientObj, options, maxDepth) { + if (!Utility.isPlainJsonObject(options)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'options' }); + } + var quries = {}; + for (var key in options) { + quries[key] = ClientRequestContext._parseQueryOption(options[key]); + } + var action = ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); + this._pendingRequest.addActionResultHandler(action, clientObj); + }; + ClientRequestContext.prototype.trace = function (message) { + ActionFactory.createTraceAction(this, message, true); + }; + ClientRequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { }; + ClientRequestContext.prototype.ensureRequestUrlAndHeaderInfo = function () { + var _this = this; + return Utility._createPromiseFromResult(null).then(function () { + if (!_this.m_requestUrlAndHeaderInfo) { + return _this.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function (value) { + _this.m_requestUrlAndHeaderInfo = value; + if (!_this.m_requestUrlAndHeaderInfo) { + _this.m_requestUrlAndHeaderInfo = { url: CoreConstants.localDocument, headers: {} }; + } + if (Utility.isNullOrEmptyString(_this.m_requestUrlAndHeaderInfo.url)) { + _this.m_requestUrlAndHeaderInfo.url = CoreConstants.localDocument; + } + if (!_this.m_requestUrlAndHeaderInfo.headers) { + _this.m_requestUrlAndHeaderInfo.headers = {}; + } + if (typeof _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull === 'function') { + var executor = _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull(); + if (executor) { + _this._requestExecutor = executor; + } + } + }); + } + }); + }; + ClientRequestContext.prototype.syncPrivateMain = function () { + var _this = this; + return this.ensureRequestUrlAndHeaderInfo().then(function () { + var req = _this._pendingRequest; + _this.m_pendingRequest = null; + return _this.processPreSyncPromises(req).then(function () { return _this.syncPrivate(req); }); + }); + }; + ClientRequestContext.prototype.syncPrivate = function (req) { + var _this = this; + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(null); + } + if (!req.hasActions) { + return this.processPendingEventHandlers(req); + } + var _a = req.buildRequestMessageBodyAndRequestFlags(), msgBody = _a.body, requestFlags = _a.flags; + if (this._requestFlagModifier) { + requestFlags |= this._requestFlagModifier; + } + if (!this._requestExecutor) { + if (CoreUtility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + this._requestExecutor = new OfficeJsRequestExecutor(this); + } + else { + this._requestExecutor = new HttpRequestExecutor(); + } + } + var requestExecutor = this._requestExecutor; + var headers = {}; + CoreUtility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + CoreUtility._copyHeaders(this.m_customRequestHeaders, headers); + delete this.m_customRequestHeaders[Constants.officeScriptEventId]; + var testNameWithSequenceId = TestUtility._getCurrentTestNameWithSequenceId(); + if (testNameWithSequenceId) { + headers[CoreConstants.testRequestNameHeader] = testNameWithSequenceId; + } + var requestExecutorRequestMessage = { + Url: this.m_requestUrlAndHeaderInfo.url, + Headers: headers, + Body: msgBody + }; + req.invalidatePendingInvalidObjectPaths(); + var errorFromResponse = null; + var errorFromProcessEventHandlers = null; + this._lastSyncStart = typeof performance === 'undefined' ? Date.now() : performance.now(); + this._lastRequestFlags = requestFlags; + return requestExecutor + .executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) + .then(function (response) { + _this._lastSyncEnd = typeof performance === 'undefined' ? Date.now() : performance.now(); + if (OfficeExtension_1.config.executePerfLogFunc) { + OfficeExtension_1.config.executePerfLogFunc({ syncStart: _this._lastSyncStart, + syncEnd: _this._lastSyncEnd + }); + } + errorFromResponse = _this.processRequestExecutorResponseMessage(req, response); + return _this.processPendingEventHandlers(req)["catch"](function (ex) { + CoreUtility.log('Error in processPendingEventHandlers'); + CoreUtility.log(JSON.stringify(ex)); + errorFromProcessEventHandlers = ex; + }); + }) + .then(function () { + if (errorFromResponse) { + CoreUtility.log('Throw error from response: ' + JSON.stringify(errorFromResponse)); + throw errorFromResponse; + } + if (errorFromProcessEventHandlers) { + CoreUtility.log('Throw error from ProcessEventHandler: ' + JSON.stringify(errorFromProcessEventHandlers)); + var transformedError = null; + if (errorFromProcessEventHandlers instanceof _Internal.RuntimeError) { + transformedError = errorFromProcessEventHandlers; + transformedError.traceMessages = req._responseTraceMessages; + } + else { + var message = null; + if (typeof errorFromProcessEventHandlers === 'string') { + message = errorFromProcessEventHandlers; + } + else { + message = errorFromProcessEventHandlers.message; + } + if (Utility.isNullOrEmptyString(message)) { + message = CoreUtility._getResourceString(ResourceStrings.cannotRegisterEvent); + } + transformedError = new _Internal.RuntimeError({ + code: ErrorCodes.cannotRegisterEvent, + httpStatusCode: 400, + message: message, + traceMessages: req._responseTraceMessages + }); + } + throw transformedError; + } + }); + }; + ClientRequestContext.prototype.processRequestExecutorResponseMessage = function (req, response) { + if (response.Body && response.Body.TraceIds) { + req._setResponseTraceIds(response.Body.TraceIds); + } + var traceMessages = req._responseTraceMessages; + var errorStatementInfo = null; + if (response.Body) { + if (response.Body.Error && response.Body.Error.ActionIndex >= 0) { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, true); + var debugInfoStatementInfo = prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + errorStatementInfo = { + statement: debugInfoStatementInfo.statement, + surroundingStatements: debugInfoStatementInfo.surroundingStatements, + fullStatements: ['Please enable config.extendedErrorLogging to see full statements.'] + }; + if (OfficeExtension_1.config.extendedErrorLogging) { + prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, false); + errorStatementInfo.fullStatements = prettyPrinter.process(); + } + } + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (actionResults) { + this._processingResult = true; + try { + req.processResponse(actionResults); + } + finally { + this._processingResult = false; + } + } + } + if (!Utility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage, + traceMessages: traceMessages, + data: { responseBody: response.RawErrorResponseBody } + }); + } + else if (response.Body && response.Body.Error) { + var debugInfo = { + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement = errorStatementInfo.statement; + debugInfo.surroundingStatements = errorStatementInfo.surroundingStatements; + debugInfo.fullStatements = errorStatementInfo.fullStatements; + } + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message, + traceMessages: traceMessages, + debugInfo: debugInfo + }); + } + return null; + }; + ClientRequestContext.prototype.processPendingEventHandlers = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._pendingProcessEventHandlers.length; i++) { + var eventHandlers = req._pendingProcessEventHandlers[i]; + ret = ret.then(this.createProcessOneEventHandlersFunc(eventHandlers, req)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneEventHandlersFunc = function (eventHandlers, req) { + return function () { return eventHandlers._processRegistration(req); }; + }; + ClientRequestContext.prototype.processPreSyncPromises = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._preSyncPromises.length; i++) { + var p = req._preSyncPromises[i]; + ret = ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc = function (p) { + return function () { return p; }; + }; + ClientRequestContext.prototype.sync = function (passThroughValue) { + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(passThroughValue); + } + return this.syncPrivateMain().then(function () { return passThroughValue; }); + }; + ClientRequestContext.prototype.batch = function (batchBody) { + var _this = this; + if (this.m_batchMode !== 1) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, null, null)); + } + if (this.m_explicitBatchInProgress) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.pendingBatchInProgress), null)); + } + if (Utility.isNullOrUndefined(batchBody)) { + return Utility._createPromiseFromResult(null); + } + this.m_explicitBatchInProgress = true; + var previousRequest = this.m_pendingRequest; + this.m_pendingRequest = new ClientRequest(this); + var batchBodyResult; + try { + batchBodyResult = batchBody(this._rootObject, this); + } + catch (ex) { + this.m_explicitBatchInProgress = false; + this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + } + var request; + var batchBodyResultPromise; + if (typeof batchBodyResult === 'object' && batchBodyResult && typeof batchBodyResult.then === 'function') { + batchBodyResultPromise = Utility._createPromiseFromResult(null) + .then(function () { + return batchBodyResult; + }) + .then(function (result) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return result; + })["catch"](function (ex) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + }); + } + else { + this.m_explicitBatchInProgress = false; + request = this.m_pendingRequest; + this.m_pendingRequest = previousRequest; + batchBodyResultPromise = Utility._createPromiseFromResult(batchBodyResult); + } + return batchBodyResultPromise.then(function (result) { + return _this.ensureRequestUrlAndHeaderInfo() + .then(function () { + return _this.syncPrivate(request); + }) + .then(function () { + return result; + }); + }); + }; + ClientRequestContext._run = function (ctxInitializer, runBody, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runCommon('run', null, ctxInitializer, 0, runBody, numCleanupAttempts, retryDelay, null, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.isValidRequestInfo = function (value) { + return (typeof value === 'string' || + ClientRequestContext.isRequestUrlAndHeaderInfo(value) || + ClientRequestContext.isRequestUrlAndHeaderInfoResolver(value)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfo = function (value) { + return (typeof value === 'object' && + value !== null && + Object.getPrototypeOf(value) === Object.getPrototypeOf({}) && + !Utility.isNullOrUndefined(value.url)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfoResolver = function (value) { + return typeof value === 'object' && value !== null && typeof value._resolveRequestUrlAndHeaderInfo === 'function'; + }; + ClientRequestContext._runBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(0, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runExplicitBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(1, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runBatchCommon = function (batchMode, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + var ctxRetriever; + var batch; + var requestInfo = null; + var previousObjects = null; + var argOffset = 0; + var options = null; + if (receivedRunArgs.length > 0) { + if (ClientRequestContext.isValidRequestInfo(receivedRunArgs[0])) { + requestInfo = receivedRunArgs[0]; + argOffset = 1; + } + else if (Utility.isPlainJsonObject(receivedRunArgs[0])) { + options = receivedRunArgs[0]; + requestInfo = options.session; + if (requestInfo != null && !ClientRequestContext.isValidRequestInfo(requestInfo)) { + return ClientRequestContext.createErrorPromise(functionName); + } + previousObjects = options.previousObjects; + argOffset = 1; + } + } + if (receivedRunArgs.length == argOffset + 1) { + batch = receivedRunArgs[argOffset + 0]; + } + else if (options == null && receivedRunArgs.length == argOffset + 2) { + previousObjects = receivedRunArgs[argOffset + 0]; + batch = receivedRunArgs[argOffset + 1]; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + if (previousObjects != null) { + if (previousObjects instanceof ClientObject) { + ctxRetriever = function () { return previousObjects.context; }; + } + else if (previousObjects instanceof ClientRequestContext) { + ctxRetriever = function () { return previousObjects; }; + } + else if (Array.isArray(previousObjects)) { + var array = previousObjects; + if (array.length == 0) { + return ClientRequestContext.createErrorPromise(functionName); + } + for (var i = 0; i < array.length; i++) { + if (!(array[i] instanceof ClientObject)) { + return ClientRequestContext.createErrorPromise(functionName); + } + if (array[i].context != array[0].context) { + return ClientRequestContext.createErrorPromise(functionName, ResourceStrings.invalidRequestContext); + } + } + ctxRetriever = function () { return array[0].context; }; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + } + else { + ctxRetriever = ctxInitializer; + } + var onBeforeRunWithOptions = null; + if (onBeforeRun) { + onBeforeRunWithOptions = function (context) { return onBeforeRun(options || {}, context); }; + } + return ClientRequestContext._runCommon(functionName, requestInfo, ctxRetriever, batchMode, batch, numCleanupAttempts, retryDelay, onBeforeRunWithOptions, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.createErrorPromise = function (functionName, code) { + if (code === void 0) { + code = CoreResourceStrings.invalidArgument; + } + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(code, CoreUtility._getResourceString(code), functionName)); + }; + ClientRequestContext._runCommon = function (functionName, requestInfo, ctxRetriever, batchMode, runBody, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (SessionBase._overrideSession) { + requestInfo = SessionBase._overrideSession; + } + var starterPromise = CoreUtility.createPromise(function (resolve, reject) { + resolve(); + }); + var ctx; + var succeeded = false; + var resultOrError; + var previousBatchMode; + return starterPromise + .then(function () { + ctx = ctxRetriever(requestInfo); + if (ctx._autoCleanup) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + ctx._onRunFinishedNotifiers.push(function () { + ctx._autoCleanup = true; + resolve(); + }); + }); + } + else { + ctx._autoCleanup = true; + } + }) + .then(function () { + if (typeof runBody !== 'function') { + return ClientRequestContext.createErrorPromise(functionName); + } + previousBatchMode = ctx.m_batchMode; + ctx.m_batchMode = batchMode; + if (onBeforeRun) { + onBeforeRun(ctx); + } + var runBodyResult; + if (batchMode == 1) { + runBodyResult = runBody(ctx.batch.bind(ctx)); + } + else { + runBodyResult = runBody(ctx); + } + if (Utility.isNullOrUndefined(runBodyResult) || typeof runBodyResult.then !== 'function') { + Utility.throwError(ResourceStrings.runMustReturnPromise); + } + return runBodyResult; + }) + .then(function (runBodyResult) { + if (batchMode === 1) { + return runBodyResult; + } + else { + return ctx.sync(runBodyResult); + } + }) + .then(function (result) { + succeeded = true; + resultOrError = result; + })["catch"](function (error) { + resultOrError = error; + }) + .then(function () { + var itemsToRemove = ctx.trackedObjects._retrieveAndClearAutoCleanupList(); + ctx._autoCleanup = false; + ctx.m_batchMode = previousBatchMode; + for (var key in itemsToRemove) { + itemsToRemove[key]._objectPath.isValid = false; + } + var cleanupCounter = 0; + if (Utility._synchronousCleanup || ClientRequestContext.isRequestUrlAndHeaderInfoResolver(requestInfo)) { + return attemptCleanup(); + } + else { + attemptCleanup(); + } + function attemptCleanup() { + cleanupCounter++; + var savedPendingRequest = ctx.m_pendingRequest; + var savedBatchMode = ctx.m_batchMode; + var request = new ClientRequest(ctx); + ctx.m_pendingRequest = request; + ctx.m_batchMode = 0; + try { + for (var key in itemsToRemove) { + ctx.trackedObjects.remove(itemsToRemove[key]); + } + } + finally { + ctx.m_batchMode = savedBatchMode; + ctx.m_pendingRequest = savedPendingRequest; + } + return ctx + .syncPrivate(request) + .then(function () { + if (onCleanupSuccess) { + onCleanupSuccess(cleanupCounter); + } + })["catch"](function () { + if (onCleanupFailure) { + onCleanupFailure(cleanupCounter); + } + if (cleanupCounter < numCleanupAttempts) { + setTimeout(function () { + attemptCleanup(); + }, retryDelay); + } + }); + } + }) + .then(function () { + if (ctx._onRunFinishedNotifiers && ctx._onRunFinishedNotifiers.length > 0) { + var func = ctx._onRunFinishedNotifiers.shift(); + func(); + } + if (succeeded) { + return resultOrError; + } + else { + throw resultOrError; + } + }); + }; + return ClientRequestContext; + }(ClientRequestContextBase)); + OfficeExtension_1.ClientRequestContext = ClientRequestContext; + var RetrieveResultImpl = (function () { + function RetrieveResultImpl(m_proxy, m_shouldPolyfill) { + this.m_proxy = m_proxy; + this.m_shouldPolyfill = m_shouldPolyfill; + var scalarPropertyNames = m_proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = m_proxy[Constants.navigationPropertyNames]; + var typeName = m_proxy[Constants.className]; + var isCollection = m_proxy[Constants.isCollection]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, scalarPropertyNames[i]); + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, navigationPropertyNames[i]); + } + } + if (isCollection) { + Utility.definePropertyThrowUnloadedException(this, typeName, Constants.itemsLowerCase); + } + } + Object.defineProperty(RetrieveResultImpl.prototype, "$proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResultImpl.prototype, "$isNullObject", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: ErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'retrieveResult.$isNullObject' + } + }); + } + return this.m_isNullObject; + }, + enumerable: true, + configurable: true + }); + RetrieveResultImpl.prototype.toJSON = function () { + if (!this.m_isLoaded) { + return undefined; + } + if (this.m_isNullObject) { + return null; + } + if (Utility.isUndefined(this.m_json)) { + this.m_json = Utility.purifyJson(this.m_value); + } + return this.m_json; + }; + RetrieveResultImpl.prototype.toString = function () { + return JSON.stringify(this.toJSON()); + }; + RetrieveResultImpl.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (value === null || (typeof value === 'object' && value && value._IsNull)) { + this.m_isNullObject = true; + value = null; + } + else { + this.m_isNullObject = false; + } + if (this.m_shouldPolyfill) { + value = Utility.changePropertyNameToCamelLowerCase(value); + } + this.m_value = value; + this.m_proxy._handleRetrieveResult(value, this); + }; + return RetrieveResultImpl; + }()); + var Constants = (function (_super) { + __extends(Constants, _super); + function Constants() { + return _super !== null && _super.apply(this, arguments) || this; + } + Constants.getItemAt = 'GetItemAt'; + Constants.index = '_Index'; + Constants.iterativeExecutor = 'IterativeExecutor'; + Constants.isTracked = '_IsTracked'; + Constants.eventMessageCategory = 65536; + Constants.eventWorkbookId = 'Workbook'; + Constants.eventSourceRemote = 'Remote'; + Constants.proxy = '$proxy'; + Constants.className = '_className'; + Constants.isCollection = '_isCollection'; + Constants.collectionPropertyPath = '_collectionPropertyPath'; + Constants.objectPathInfoDoNotKeepReferenceFieldName = 'D'; + Constants.officeScriptEventId = 'X-OfficeScriptEventId'; + Constants.officeScriptFireRecordingEvent = 'X-OfficeScriptFireRecordingEvent'; + Constants.officeControlId = 'X-OfficeControlId'; + return Constants; + }(CommonConstants)); + OfficeExtension_1.Constants = Constants; + var ClientRequest = (function (_super) { + __extends(ClientRequest, _super); + function ClientRequest(context) { + var _this = _super.call(this, context) || this; + _this.m_context = context; + _this.m_pendingProcessEventHandlers = []; + _this.m_pendingEventHandlerActions = {}; + _this.m_traceInfos = {}; + _this.m_responseTraceIds = {}; + _this.m_responseTraceMessages = []; + return _this; + } + Object.defineProperty(ClientRequest.prototype, "traceInfos", { + get: function () { + return this.m_traceInfos; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceMessages", { + get: function () { + return this.m_responseTraceMessages; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceIds", { + get: function () { + return this.m_responseTraceIds; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._setResponseTraceIds = function (value) { + if (value) { + for (var i = 0; i < value.length; i++) { + var traceId = value[i]; + this.m_responseTraceIds[traceId] = traceId; + var message = this.m_traceInfos[traceId]; + if (!CoreUtility.isNullOrUndefined(message)) { + this.m_responseTraceMessages.push(message); + } + } + } + }; + ClientRequest.prototype.addTrace = function (actionId, message) { + this.m_traceInfos[actionId] = message; + }; + ClientRequest.prototype._addPendingEventHandlerAction = function (eventHandlers, action) { + if (!this.m_pendingEventHandlerActions[eventHandlers._id]) { + this.m_pendingEventHandlerActions[eventHandlers._id] = []; + this.m_pendingProcessEventHandlers.push(eventHandlers); + } + this.m_pendingEventHandlerActions[eventHandlers._id].push(action); + }; + Object.defineProperty(ClientRequest.prototype, "_pendingProcessEventHandlers", { + get: function () { + return this.m_pendingProcessEventHandlers; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._getPendingEventHandlerActions = function (eventHandlers) { + return this.m_pendingEventHandlerActions[eventHandlers._id]; + }; + return ClientRequest; + }(ClientRequestBase)); + OfficeExtension_1.ClientRequest = ClientRequest; + var EventHandlers = (function () { + function EventHandlers(context, parentObject, name, eventInfo) { + var _this = this; + this.m_id = context._nextId(); + this.m_context = context; + this.m_name = name; + this.m_handlers = []; + this.m_registered = false; + this.m_eventInfo = eventInfo; + this.m_callback = function (args) { + _this.m_eventInfo.eventArgsTransformFunc(args).then(function (newArgs) { return _this.fireEvent(newArgs); }); + }; + } + Object.defineProperty(EventHandlers.prototype, "_registered", { + get: function () { + return this.m_registered; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_id", { + get: function () { + return this.m_id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_handlers", { + get: function () { + return this.m_handlers; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); + EventHandlers.prototype.add = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 0 + }); + return new EventHandlerResult(this.m_context, this, handler); + }; + EventHandlers.prototype.remove = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 1 + }); + }; + EventHandlers.prototype.removeAll = function () { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: null, + operation: 2 + }); + }; + EventHandlers.prototype._processRegistration = function (req) { + var _this = this; + var ret = CoreUtility._createPromiseFromResult(null); + var actions = req._getPendingEventHandlerActions(this); + if (!actions) { + return ret; + } + var handlersResult = []; + for (var i = 0; i < this.m_handlers.length; i++) { + handlersResult.push(this.m_handlers[i]); + } + var hasChange = false; + for (var i = 0; i < actions.length; i++) { + if (req._responseTraceIds[actions[i].id]) { + hasChange = true; + switch (actions[i].operation) { + case 0: + handlersResult.push(actions[i].handler); + break; + case 1: + for (var index = handlersResult.length - 1; index >= 0; index--) { + if (handlersResult[index] === actions[i].handler) { + handlersResult.splice(index, 1); + break; + } + } + break; + case 2: + handlersResult = []; + break; + } + } + } + if (hasChange) { + if (!this.m_registered && handlersResult.length > 0) { + ret = ret.then(function () { return _this.m_eventInfo.registerFunc(_this.m_callback); }).then(function () { return (_this.m_registered = true); }); + } + else if (this.m_registered && handlersResult.length == 0) { + ret = ret + .then(function () { return _this.m_eventInfo.unregisterFunc(_this.m_callback); })["catch"](function (ex) { + CoreUtility.log('Error when unregister event: ' + JSON.stringify(ex)); + }) + .then(function () { return (_this.m_registered = false); }); + } + ret = ret.then(function () { return (_this.m_handlers = handlersResult); }); + } + return ret; + }; + EventHandlers.prototype.fireEvent = function (args) { + var promises = []; + for (var i = 0; i < this.m_handlers.length; i++) { + var handler = this.m_handlers[i]; + var p = CoreUtility._createPromiseFromResult(null) + .then(this.createFireOneEventHandlerFunc(handler, args))["catch"](function (ex) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(ex)); + }); + promises.push(p); + } + CoreUtility.Promise.all(promises); + }; + EventHandlers.prototype.createFireOneEventHandlerFunc = function (handler, args) { + return function () { return handler(args); }; + }; + return EventHandlers; + }()); + OfficeExtension_1.EventHandlers = EventHandlers; + var EventHandlerResult = (function () { + function EventHandlerResult(context, handlers, handler) { + this.m_context = context; + this.m_allHandlers = handlers; + this.m_handler = handler; + } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + EventHandlerResult.prototype.remove = function () { + if (this.m_allHandlers && this.m_handler) { + this.m_allHandlers.remove(this.m_handler); + this.m_allHandlers = null; + this.m_handler = null; + } + }; + return EventHandlerResult; + }()); + OfficeExtension_1.EventHandlerResult = EventHandlerResult; + (function (_Internal) { + var OfficeJsEventRegistration = (function () { + function OfficeJsEventRegistration() { + } + OfficeJsEventRegistration.prototype.register = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingDataChanged, handler, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingSelectionChanged, handler, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); + }); + case 5: + return OSF.DDA.RichApi.richApiMessageManager.register(handler); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { id: targetId }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { id: targetId }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { id: targetId }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + OfficeJsEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingDataChanged, { handler: handler }, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingSelectionChanged, { handler: handler }, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); + }); + case 5: + return Utility.promisify(function (callback) { + return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync('richApiMessage', { handler: handler }, callback); + }); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { id: targetId, handler: handler }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { id: targetId, handler: handler }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { id: targetId, handler: handler }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + return OfficeJsEventRegistration; + }()); + _Internal.officeJsEventRegistration = new OfficeJsEventRegistration(); + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var EventRegistration = (function () { + function EventRegistration(registerEventImpl, unregisterEventImpl) { + this.m_handlersByEventByTarget = {}; + this.m_registerEventImpl = registerEventImpl; + this.m_unregisterEventImpl = unregisterEventImpl; + } + EventRegistration.getTargetIdOrDefault = function (targetId) { + if (Utility.isNullOrUndefined(targetId)) { + return ''; + } + return targetId; + }; + EventRegistration.prototype.getHandlers = function (eventId, targetId) { + targetId = EventRegistration.getTargetIdOrDefault(targetId); + var handlersById = this.m_handlersByEventByTarget[eventId]; + if (!handlersById) { + handlersById = {}; + this.m_handlersByEventByTarget[eventId] = handlersById; + } + var handlers = handlersById[targetId]; + if (!handlers) { + handlers = []; + handlersById[targetId] = handlers; + } + return handlers; + }; + EventRegistration.prototype.callHandlers = function (eventId, targetId, argument) { + var funcs = this.getHandlers(eventId, targetId); + for (var i = 0; i < funcs.length; i++) { + funcs[i](argument); + } + }; + EventRegistration.prototype.hasHandlers = function (eventId, targetId) { + return this.getHandlers(eventId, targetId).length > 0; + }; + EventRegistration.prototype.register = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + handlers.push(handler); + if (handlers.length === 1) { + return this.m_registerEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + EventRegistration.prototype.unregister = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length === 0) { + return this.m_unregisterEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + return EventRegistration; + }()); + OfficeExtension_1.EventRegistration = EventRegistration; + var GenericEventRegistration = (function () { + function GenericEventRegistration() { + this.m_eventRegistration = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler = this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready = function () { + var _this = this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready = GenericEventRegistration._testReadyImpl().then(function () { + _this.m_isReady = true; + }); + } + else if (HostBridge.instance) { + this.m_ready = Utility._createPromiseFromResult(null).then(function () { + _this.m_isReady = true; + }); + } + else { + this.m_ready = _Internal.officeJsEventRegistration + .register(5, '', this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady = true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage = function (msg) { + if (msg && msg.entries) { + for (var entryIndex = 0; entryIndex < msg.entries.length; entryIndex++) { + var entry = msg.entries[entryIndex]; + if (entry.messageCategory == Constants.eventMessageCategory) { + if (CoreUtility._logEnabled) { + CoreUtility.log(JSON.stringify(entry)); + } + var eventId = entry.messageType; + var targetId = entry.targetId; + var hasHandlers = this.m_eventRegistration.hasHandlers(eventId, targetId); + if (hasHandlers) { + var arg = JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source = Constants.eventSourceRemote; + } + this.m_eventRegistration.callHandlers(eventId, targetId, arg); + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + if (!ret) { + ret = new GenericEventRegistration(); + GenericEventRegistration.s_genericEventRegistrations[controlId] = ret; + } + return ret; + }; + GenericEventRegistration.peekGenericEventRegistrationOrNull = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + return ret; + }; + GenericEventRegistration.richApiMessageEventCategory = 65536; + GenericEventRegistration.s_genericEventRegistrations = {}; + return GenericEventRegistration; + }()); + OfficeExtension_1.GenericEventRegistration = GenericEventRegistration; + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl = impl; + } + OfficeExtension_1._testSetRichApiMessageReadyImpl = _testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration('')._handleRichApiMessage(msg); + } + OfficeExtension_1._testTriggerRichApiMessageEvent = _testTriggerRichApiMessageEvent; + var GenericEventHandlers = (function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + var _this = _super.call(this, context, parentObject, name, eventInfo) || this; + _this.m_genericEventInfo = eventInfo; + return _this; + } + GenericEventHandlers.prototype.add = function (handler) { + var _this = this; + if (this._handlers.length == 0 && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + var controlId = this._context._controlId; + if (!GenericEventRegistration.getGenericEventRegistration(controlId).isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration(controlId).ready()); + } + ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length == 1) { + GenericEventRegistration.getGenericEventRegistration(controlId).register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove = function (handler) { + var _this = this; + if (this._handlers.length == 1 && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + var controlId = this._context._controlId; + ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers = _this._handlers; + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length == 0) { + GenericEventRegistration.getGenericEventRegistration(controlId).unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll = function () { }; + return GenericEventHandlers; + }(EventHandlers)); + OfficeExtension_1.GenericEventHandlers = GenericEventHandlers; + var InstantiateActionResultHandler = (function () { + function InstantiateActionResultHandler(clientObject) { + this.m_clientObject = clientObject; + } + InstantiateActionResultHandler.prototype._handleResult = function (value) { + this.m_clientObject._handleIdResult(value); + }; + return InstantiateActionResultHandler; + }()); + var ObjectPathFactory = (function () { + function ObjectPathFactory() { + } + ObjectPathFactory.createGlobalObjectObjectPath = function (context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + return new ObjectPath(objectPathInfo, null, false, false, 1, 4); + }; + ObjectPathFactory.createNewObjectObjectPath = function (context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var ret = new ObjectPath(objectPathInfo, null, isCollection, false, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createPropertyObjectPath = function (context, parent, propertyName, isCollection, isInvalidAfterRequest, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createIndexerObjectPath = function (context, parent, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createIndexerObjectPathUsingParentPath = function (context, parentObjectPath, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parentObjectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parentObjectPath, false, false, 1, 4); + }; + ObjectPathFactory.createMethodObjectPath = function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = Utility.setMethodArguments(context, objectPathInfo.ArgumentInfo, args); + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, Utility._fixupApiFlags(flags)); + ret.argumentObjectPaths = argumentObjectPaths; + ret.getByIdMethodName = getByIdMethodName; + return ret; + }; + ObjectPathFactory.createReferenceIdObjectPath = function (context, referenceId) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + var ret = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return ret; + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt = function (hasIndexerMethod, context, parent, childItem, index) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + if (hasIndexerMethod && !Utility.isNullOrUndefined(id)) { + return ObjectPathFactory.createChildItemObjectPathUsingIndexer(context, parent, childItem); + } + else { + return ObjectPathFactory.createChildItemObjectPathUsingGetItemAt(context, parent, childItem, index); + } + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexer = function (context, parent, childItem) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + var objectPathInfo = (objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }); + objectPathInfo.ArgumentInfo.Arguments = [id]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createChildItemObjectPathUsingGetItemAt = function (context, parent, childItem, index) { + var indexFromServer = childItem[Constants.index]; + if (indexFromServer) { + index = indexFromServer; + } + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: Constants.getItemAt, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = [index]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + return ObjectPathFactory; + }()); + OfficeExtension_1.ObjectPathFactory = ObjectPathFactory; + var OfficeJsRequestExecutor = (function () { + function OfficeJsRequestExecutor(context) { + this.m_context = context; + } + OfficeJsRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); + return new OfficeExtension_1.Promise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (result.status == 'succeeded') { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBody(result), RichApiMessageUtility.getResponseHeaders(result)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); + } + resolve(response); + }); + }); + }; + OfficeJsRequestExecutor.SourceLibHeaderValue = 'officejs'; + return OfficeJsRequestExecutor; + }()); + var TrackedObjects = (function () { + function TrackedObjects(context) { + this._autoCleanupList = {}; + this.m_context = context; + } + TrackedObjects.prototype.add = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._addCommon(item, true); }); + } + else { + this._addCommon(param, true); + } + }; + TrackedObjects.prototype._autoAdd = function (object) { + this._addCommon(object, false); + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + }; + TrackedObjects.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue = function (object, resultValue) { + var shouldAutoTrack = this.m_context._autoCleanup && + !object[Constants.isTracked] && + object !== this.m_context._rootObject && + resultValue && + !Utility.isNullOrEmptyString(resultValue[Constants.referenceId]); + if (shouldAutoTrack) { + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype._addCommon = function (object, isExplicitlyAdded) { + if (object[Constants.isTracked]) { + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + return; + } + var referenceId = object[Constants.referenceId]; + var donotKeepReference = object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName]; + if (donotKeepReference) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.objectIsUntracked), null); + } + if (Utility.isNullOrEmptyString(referenceId) && object._KeepReference) { + object._KeepReference(); + ActionFactory.createInstantiateAction(this.m_context, object); + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype.remove = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._removeCommon(item); }); + } + else { + this._removeCommon(param); + } + }; + TrackedObjects.prototype._removeCommon = function (object) { + object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName] = true; + object.context._pendingRequest._removeKeepReferenceAction(object._objectPath.objectPathInfo.Id); + var referenceId = object[Constants.referenceId]; + if (!Utility.isNullOrEmptyString(referenceId)) { + var rootObject = this.m_context._rootObject; + if (rootObject._RemoveReference) { + rootObject._RemoveReference(referenceId); + } + } + delete object[Constants.isTracked]; + }; + TrackedObjects.prototype._retrieveAndClearAutoCleanupList = function () { + var list = this._autoCleanupList; + this._autoCleanupList = {}; + return list; + }; + return TrackedObjects; + }()); + OfficeExtension_1.TrackedObjects = TrackedObjects; + var RequestPrettyPrinter = (function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose, removePII) { + if (!globalObjName) { + globalObjName = 'root'; + } + this.m_globalObjName = globalObjName; + this.m_referencedObjectPaths = referencedObjectPaths; + this.m_actions = actions; + this.m_statements = []; + this.m_variableNameForObjectPathMap = {}; + this.m_variableNameToObjectPathMap = {}; + this.m_declaredObjectPathMap = {}; + this.m_showDispose = showDispose; + this.m_removePII = removePII; + } + RequestPrettyPrinter.prototype.process = function () { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo = function (actionIndex) { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount = 5; + this.m_statements = []; + var oneStatement = ''; + var statementIndex = -1; + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex == i) { + statementIndex = this.m_statements.length - 1; + } + if (statementIndex >= 0 && this.m_statements.length > statementIndex + surroundingCount + 1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex = statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex = 0; + } + var endIndex = statementIndex + 1 + surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex = this.m_statements.length; + } + var surroundingStatements = []; + if (startIndex != 0) { + surroundingStatements.push('...'); + } + for (var i_1 = startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push('// >>>>>'); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push('// <<<<<'); + for (var i_2 = statementIndex + 1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push('...'); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction = function (action) { + var actionInfo = action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + case 9: + this.processUpdateAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction = function (action) { + var objId = action.actionInfo.ObjectPathId; + var objPath = this.m_referencedObjectPaths[objId]; + var varName = this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement = 'var ' + varName + ' = ' + this.buildObjectPathExpressionWithParent(objPath) + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId] = varName; + } + else { + var statement = '// Instantiate {' + varName + '}'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction = function (action) { + var methodName = action.actionInfo.Name; + if (methodName === '_KeepReference') { + if (!OfficeExtension_1._internalConfig.showInternalApiInDebugInfo) { + return; + } + methodName = 'track'; + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(methodName) + + '(' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.load(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.retrieve(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction = function (action) { + var queryExp = ''; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp = JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.loadRecursive(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(action.actionInfo.Name) + + ' = ' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction = function (action) { + var statement = 'context.trace();'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.ensureUnchanged(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processUpdateAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.update(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant = function (statement, action) { + var _this = this; + if (this.m_showDispose) { + var lastUsedObjectPathIds = action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose = lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(', '); + return statement + ' // And then dispose {' + objectNamesToDispose + '}'; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression = function (action) { + if (action.actionInfo.QueryInfo) { + var option = {}; + option.select = action.actionInfo.QueryInfo.Select; + option.expand = action.actionInfo.QueryInfo.Expand; + option.skip = action.actionInfo.QueryInfo.Skip; + option.top = action.actionInfo.QueryInfo.Top; + if (typeof option.top === 'undefined' && + typeof option.skip === 'undefined' && + typeof option.expand === 'undefined') { + if (typeof option.select === 'undefined') { + return ''; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ''; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent = function (objPath) { + var hasParent = objPath.objectPathInfo.ObjectPathType == 5 || + objPath.objectPathInfo.ObjectPathType == 3 || + objPath.objectPathInfo.ObjectPathType == 4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return (this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId) + '.' + this.buildObjectPathExpression(objPath)); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression = function (objPath) { + var expr = this.buildObjectPathInfoExpression(objPath.objectPathInfo); + var originalObjectPathInfo = objPath.originalObjectPathInfo; + if (originalObjectPathInfo) { + expr = expr + ' /* originally ' + this.buildObjectPathInfoExpression(originalObjectPathInfo) + ' */'; + } + return expr; + }; + RequestPrettyPrinter.prototype.buildObjectPathInfoExpression = function (objectPathInfo) { + switch (objectPathInfo.ObjectPathType) { + case 1: + return 'context.' + this.m_globalObjName; + case 5: + return 'getItem(' + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + ')'; + case 3: + return (Utility._toCamelLowerCase(objectPathInfo.Name) + + '(' + + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + + ')'); + case 2: + return objectPathInfo.Name + '.newObject()'; + case 7: + return 'null'; + case 4: + return Utility._toCamelLowerCase(objectPathInfo.Name); + case 6: + return ('context.' + this.m_globalObjName + '._getObjectByReferenceId(' + JSON.stringify(objectPathInfo.Name) + ')'); + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression = function (args) { + var ret = ''; + if (!args.Arguments || args.Arguments.length === 0) { + return ret; + } + if (this.m_removePII) { + if (typeof args.Arguments[0] === 'undefined') { + return ret; + } + return '...'; + } + for (var i = 0; i < args.Arguments.length; i++) { + if (i > 0) { + ret = ret + ', '; + } + ret = + ret + + this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret === 'undefined') { + ret = ''; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral = function (value, objectPathId) { + if (typeof value == 'number' && value === objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase = function (objectPathId) { + var ret = 'v'; + var objPath = this.m_referencedObjectPaths[objectPathId]; + if (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret = this.m_globalObjName; + break; + case 4: + ret = Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName = objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3) === 'Get') { + methodName = methodName.substr(3); + } + ret = Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName = this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1) === 's') { + ret = parentName.substr(0, parentName.length - 1); + } + else { + ret = parentName + 'Item'; + } + break; + } + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName = function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret = this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + } + var i = 1; + while (this.m_variableNameToObjectPathMap[ret + i.toString()]) { + i++; + } + ret = ret + i.toString(); + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + var ResourceStrings = (function (_super) { + __extends(ResourceStrings, _super); + function ResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + ResourceStrings.cannotRegisterEvent = 'CannotRegisterEvent'; + ResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + ResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + ResourceStrings.propertyNotLoaded = 'PropertyNotLoaded'; + ResourceStrings.runMustReturnPromise = 'RunMustReturnPromise'; + ResourceStrings.moreInfoInnerError = 'MoreInfoInnerError'; + ResourceStrings.cannotApplyPropertyThroughSetMethod = 'CannotApplyPropertyThroughSetMethod'; + ResourceStrings.invalidOperationInCellEditMode = 'InvalidOperationInCellEditMode'; + ResourceStrings.objectIsUntracked = 'ObjectIsUntracked'; + ResourceStrings.customFunctionDefintionMissing = 'CustomFunctionDefintionMissing'; + ResourceStrings.customFunctionImplementationMissing = 'CustomFunctionImplementationMissing'; + ResourceStrings.customFunctionNameContainsBadChars = 'CustomFunctionNameContainsBadChars'; + ResourceStrings.customFunctionNameCannotSplit = 'CustomFunctionNameCannotSplit'; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch = 'CustomFunctionUnexpectedNumberOfEntriesInResultBatch'; + ResourceStrings.customFunctionCancellationHandlerMissing = 'CustomFunctionCancellationHandlerMissing'; + ResourceStrings.customFunctionInvalidFunction = 'CustomFunctionInvalidFunction'; + ResourceStrings.customFunctionInvalidFunctionMapping = 'CustomFunctionInvalidFunctionMapping'; + ResourceStrings.customFunctionWindowMissing = 'CustomFunctionWindowMissing'; + ResourceStrings.customFunctionDefintionMissingOnWindow = 'CustomFunctionDefintionMissingOnWindow'; + ResourceStrings.pendingBatchInProgress = 'PendingBatchInProgress'; + ResourceStrings.notInsideBatch = 'NotInsideBatch'; + ResourceStrings.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ResourceStrings; + }(CommonResourceStrings)); + OfficeExtension_1.ResourceStrings = ResourceStrings; + CoreUtility.addResourceStringValues({ + CannotRegisterEvent: 'The event handler cannot be registered.', + PropertyNotLoaded: "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.", + RunMustReturnPromise: 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".', + InvalidOrTimedOutSessionMessage: 'Your Office Online session has expired or is invalid. To continue, refresh the page.', + InvalidOperationInCellEditMode: 'Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.', + InvalidSheetName: 'The request cannot be processed because the specified worksheet cannot be found. Please try again.', + CustomFunctionDefintionMissing: "A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.", + CustomFunctionDefintionMissingOnWindow: "A property with the name '{0}' that represents the function's definition must exist on the window object.", + CustomFunctionImplementationMissing: "The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.", + CustomFunctionNameContainsBadChars: 'The function name may only contain letters, digits, underscores, and periods.', + CustomFunctionNameCannotSplit: 'The function name must contain a non-empty namespace and a non-empty short name.', + CustomFunctionUnexpectedNumberOfEntriesInResultBatch: "The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.", + CustomFunctionCancellationHandlerMissing: 'The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.', + CustomFunctionInvalidFunction: "The property with the name '{0}' that represents the function's definition is not a valid function.", + CustomFunctionInvalidFunctionMapping: "The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.", + CustomFunctionWindowMissing: 'The window object was not found.', + PendingBatchInProgress: 'There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.', + NotInsideBatch: 'Operations may not be invoked outside of a batch method.', + CannotUpdateReadOnlyProperty: "The property '{0}' is read-only and it cannot be updated.", + ObjectIsUntracked: 'The object is untracked.' + }); + var Utility = (function (_super) { + __extends(Utility, _super); + function Utility() { + return _super !== null && _super.apply(this, arguments) || this; + } + Utility.fixObjectPathIfNecessary = function (clientObject, value) { + if (clientObject && clientObject._objectPath && value) { + clientObject._objectPath.updateUsingObjectData(value, clientObject); + } + }; + Utility.load = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve = function (clientObj, option) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !Utility.isSetSupported('RichApiRuntime', '1.1'); + } + var result = new RetrieveResultImpl(clientObj, shouldPolyfill); + clientObj._retrieve(option, result); + return result; + }; + Utility.retrieveAndSync = function (clientObj, option) { + var result = Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); + }; + Utility.toJson = function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result = {}; + for (var prop in scalarProperties) { + var value = scalarProperties[prop]; + if (typeof value !== 'undefined') { + result[prop] = value; + } + } + for (var prop in navigationProperties) { + var value = navigationProperties[prop]; + if (typeof value !== 'undefined') { + if (value[Utility.fieldName_isCollection] && typeof value[Utility.fieldName_m__items] !== 'undefined') { + result[prop] = value.toJSON()['items']; + } + else { + result[prop] = value.toJSON(); + } + } + } + if (collectionItemsIfAny) { + result['items'] = collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; + }; + Utility.throwError = function (resourceId, arg, errorLocation) { + throw new _Internal.RuntimeError({ + code: resourceId, + httpStatusCode: 400, + message: CoreUtility._getResourceString(resourceId, arg), + debugInfo: errorLocation ? { errorLocation: errorLocation } : undefined + }); + }; + Utility.createRuntimeError = function (code, message, location, httpStatusCode, data) { + return new _Internal.RuntimeError({ + code: code, + httpStatusCode: httpStatusCode, + message: message, + debugInfo: { errorLocation: location }, + data: data + }); + }; + Utility.throwIfNotLoaded = function (propertyName, fieldValue, entityName, isNull) { + if (!isNull && + CoreUtility.isUndefined(fieldValue) && + propertyName.charCodeAt(0) != Utility.s_underscoreCharCode && + !Utility.s_suppressPropertyNotLoadedException) { + throw Utility.createPropertyNotLoadedException(entityName, propertyName); + } + }; + Utility._getPropertyValueWithoutCheckLoaded = function (object, propertyName) { + Utility.s_suppressPropertyNotLoadedException = true; + try { + return object[propertyName]; + } + finally { + Utility.s_suppressPropertyNotLoadedException = false; + } + }; + Utility.createPropertyNotLoadedException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.propertyNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.propertyNotLoaded, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.createCannotUpdateReadOnlyPropertyException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.cannotUpdateReadOnlyProperty, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotUpdateReadOnlyProperty, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.promisify = function (action) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + var callback = function (result) { + if (result.status == 'failed') { + reject(result.error); + } + else { + resolve(result.value); + } + }; + action(callback); + }); + }; + Utility._addActionResultHandler = function (clientObj, action, resultHandler) { + clientObj.context._pendingRequest.addActionResultHandler(action, resultHandler); + }; + Utility._handleNavigationPropertyResults = function (clientObj, objectValue, propertyNames) { + for (var i = 0; i < propertyNames.length - 1; i += 2) { + if (!CoreUtility.isUndefined(objectValue[propertyNames[i + 1]])) { + clientObj[propertyNames[i]]._handleResult(objectValue[propertyNames[i + 1]]); + } + } + }; + Utility._fixupApiFlags = function (flags) { + if (typeof flags === 'boolean') { + if (flags) { + flags = 1; + } + else { + flags = 0; + } + } + return flags; + }; + Utility.definePropertyThrowUnloadedException = function (obj, typeName, propertyName) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + throw Utility.createPropertyNotLoadedException(typeName, propertyName); + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(typeName, propertyName); + } + }); + }; + Utility.defineReadOnlyPropertyWithValue = function (obj, propertyName, value) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + return value; + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(null, propertyName); + } + }); + }; + Utility.processRetrieveResult = function (proxy, value, result, childItemCreateFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + return; + } + if (childItemCreateFunc) { + var data = value[Constants.itemsLowerCase]; + if (Array.isArray(data)) { + var itemsResult = []; + for (var i = 0; i < data.length; i++) { + var itemProxy = childItemCreateFunc(data[i], i); + var itemResult = {}; + itemResult[Constants.proxy] = itemProxy; + itemProxy._handleRetrieveResult(data[i], itemResult); + itemsResult.push(itemResult); + } + Utility.defineReadOnlyPropertyWithValue(result, Constants.itemsLowerCase, itemsResult); + } + } + else { + var scalarPropertyNames = proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = proxy[Constants.navigationPropertyNames]; + var typeName = proxy[Constants.className]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + var propName = scalarPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + Utility.defineReadOnlyPropertyWithValue(result, propName, propValue); + } + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + var propName = navigationPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + var propProxy = proxy[propName]; + var propResult = {}; + propProxy._handleRetrieveResult(propValue, propResult); + propResult[Constants.proxy] = propProxy; + if (Array.isArray(propResult[Constants.itemsLowerCase])) { + propResult = propResult[Constants.itemsLowerCase]; + } + Utility.defineReadOnlyPropertyWithValue(result, propName, propResult); + } + } + } + } + }; + Utility.setMockData = function (clientObj, value, childItemCreateFunc, setItemsFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + clientObj._handleResult(value); + return; + } + if (clientObj[Constants.scalarPropertyOriginalNames]) { + var result = {}; + var scalarPropertyOriginalNames = clientObj[Constants.scalarPropertyOriginalNames]; + var scalarPropertyNames = clientObj[Constants.scalarPropertyNames]; + for (var i = 0; i < scalarPropertyNames.length; i++) { + if (typeof (value[scalarPropertyNames[i]]) !== 'undefined') { + result[scalarPropertyOriginalNames[i]] = value[scalarPropertyNames[i]]; + } + } + clientObj._handleResult(result); + } + if (clientObj[Constants.navigationPropertyNames]) { + var navigationPropertyNames = clientObj[Constants.navigationPropertyNames]; + for (var i = 0; i < navigationPropertyNames.length; i++) { + if (typeof (value[navigationPropertyNames[i]]) !== 'undefined') { + var navigationPropValue = clientObj[navigationPropertyNames[i]]; + if (navigationPropValue.setMockData) { + navigationPropValue.setMockData(value[navigationPropertyNames[i]]); + } + } + } + } + if (clientObj[Constants.isCollection] && childItemCreateFunc) { + var itemsData = Array.isArray(value) ? value : value[Constants.itemsLowerCase]; + if (Array.isArray(itemsData)) { + var items = []; + for (var i = 0; i < itemsData.length; i++) { + var item = childItemCreateFunc(itemsData, i); + Utility.setMockData(item, itemsData[i]); + items.push(item); + } + setItemsFunc(items); + } + } + }; + Utility.applyMixin = function (derived, base) { + Object.getOwnPropertyNames(base.prototype).forEach(function (name) { + if (name !== 'constructor') { + Object.defineProperty(derived.prototype, name, Object.getOwnPropertyDescriptor(base.prototype, name)); + } + }); + }; + Utility.ensureTypeInitialized = function (type) { + var context = new ClientRequestContext(); + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, "Temp", false, 0); + new type(context, objectPath); + }; + Utility.fieldName_m__items = 'm__items'; + Utility.fieldName_isCollection = '_isCollection'; + Utility._synchronousCleanup = false; + Utility.s_underscoreCharCode = '_'.charCodeAt(0); + Utility.s_suppressPropertyNotLoadedException = false; + return Utility; + }(CommonUtility)); + OfficeExtension_1.Utility = Utility; + var BatchApiHelper = (function () { + function BatchApiHelper() { + } + BatchApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + var action = ActionFactory.createMethodAction(obj.context, obj, methodName, operationType, args, flags); + var result = new ClientResult(resultProcessType); + Utility._addActionResultHandler(obj, action, result); + return result; + }; + BatchApiHelper.invokeEnsureUnchanged = function (obj, objectState) { + ActionFactory.createEnsureUnchangedAction(obj.context, obj, objectState); + }; + BatchApiHelper.invokeSetProperty = function (obj, propName, propValue, flags) { + ActionFactory.createSetPropertyAction(obj.context, obj, propName, propValue, flags); + }; + BatchApiHelper.createRootServiceObject = function (type, context) { + var objectPath = ObjectPathFactory.createGlobalObjectObjectPath(context); + return new type(context, objectPath); + }; + BatchApiHelper.createObjectFromReferenceId = function (type, context, referenceId) { + var objectPath = ObjectPathFactory.createReferenceIdObjectPath(context, referenceId); + return new type(context, objectPath); + }; + BatchApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, typeName, isCollection, flags); + return new type(context, objectPath); + }; + BatchApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPath = ObjectPathFactory.createPropertyObjectPath(parent.context, parent, propertyName, isCollection, false, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createIndexerObject = function (type, parent, args) { + var objectPath = ObjectPathFactory.createIndexerObjectPath(parent.context, parent, args); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPath = ObjectPathFactory.createMethodObjectPath(parent.context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createChildItemObject = function (type, hasIndexerMethod, parent, chileItem, index) { + var objectPath = ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt(hasIndexerMethod, parent.context, parent, chileItem, index); + return new type(parent.context, objectPath); + }; + return BatchApiHelper; + }()); + OfficeExtension_1.BatchApiHelper = BatchApiHelper; + var LibraryBuilder = (function () { + function LibraryBuilder(options) { + this.m_namespaceMap = {}; + this.m_namespace = options.metadata.name; + this.m_targetNamespaceObject = options.targetNamespaceObject; + this.m_namespaceMap[this.m_namespace] = options.targetNamespaceObject; + if (options.namespaceMap) { + for (var ns in options.namespaceMap) { + this.m_namespaceMap[ns] = options.namespaceMap[ns]; + } + } + this.m_defaultApiSetName = options.metadata.defaultApiSetName; + this.m_hostName = options.metadata.hostName; + var metadata = options.metadata; + if (metadata.enumTypes) { + for (var i = 0; i < metadata.enumTypes.length; i++) { + this.buildEnumType(metadata.enumTypes[i]); + } + } + if (metadata.apiSets) { + for (var i = 0; i < metadata.apiSets.length; i++) { + var elem = metadata.apiSets[i]; + if (Array.isArray(elem)) { + metadata.apiSets[i] = { + version: elem[0], + name: elem[1] || this.m_defaultApiSetName + }; + } + } + this.m_apiSets = metadata.apiSets; + } + this.m_strings = metadata.strings; + if (metadata.clientObjectTypes) { + for (var i = 0; i < metadata.clientObjectTypes.length; i++) { + var elem = metadata.clientObjectTypes[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 11); + metadata.clientObjectTypes[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + collectionPropertyPath: this.getString(elem[6]), + newObjectServerTypeFullName: this.getString(elem[9]), + newObjectApiFlags: elem[10], + childItemTypeFullName: this.getString(elem[7]), + scalarProperties: elem[2], + navigationProperties: elem[3], + scalarMethods: elem[4], + navigationMethods: elem[5], + events: elem[8] + }; + } + this.buildClientObjectType(metadata.clientObjectTypes[i], options.fullyInitialize); + } + } + } + LibraryBuilder.prototype.ensureArraySize = function (value, size) { + var count = size - value.length; + while (count > 0) { + value.push(0); + count--; + } + }; + LibraryBuilder.prototype.getString = function (ordinalOrValue) { + if (typeof (ordinalOrValue) === "number") { + if (ordinalOrValue > 0) { + return this.m_strings[ordinalOrValue - 1]; + } + return null; + } + return ordinalOrValue; + }; + LibraryBuilder.prototype.buildEnumType = function (elem) { + var enumType; + if (Array.isArray(elem)) { + enumType = { + name: elem[0], + fields: elem[2] + }; + if (!enumType.fields) { + enumType.fields = {}; + } + var fieldsWithCamelUpperCaseValue = elem[1]; + if (Array.isArray(fieldsWithCamelUpperCaseValue)) { + for (var index = 0; index < fieldsWithCamelUpperCaseValue.length; index++) { + enumType.fields[fieldsWithCamelUpperCaseValue[index]] = this.toSimpleCamelUpperCase(fieldsWithCamelUpperCaseValue[index]); + } + } + } + else { + enumType = elem; + } + this.m_targetNamespaceObject[enumType.name] = enumType.fields; + }; + LibraryBuilder.prototype.buildClientObjectType = function (typeInfo, fullyInitialize) { + var thisBuilder = this; + var type = function (context, objectPath) { + ClientObject.apply(this, arguments); + if (!thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited) { + thisBuilder.buildPrototype(thisBuilder.m_targetNamespaceObject[typeInfo.name], typeInfo); + thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited = true; + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo) { + if (this._objectPath && this._objectPath.objectPathInfo && this._className) { + this._objectPath.objectPathInfo.T = this._className; + } + } + }; + this.m_targetNamespaceObject[typeInfo.name] = type; + this.extendsType(type, ClientObject); + this.buildNewObject(type, typeInfo); + if ((typeInfo.behaviorFlags & 2) !== 0) { + type.prototype._KeepReference = function () { + BatchApiHelper.invokeMethod(this, "_KeepReference", 1, [], 0, 0); + }; + } + if ((typeInfo.behaviorFlags & 32) !== 0) { + var func = this.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_StaticCustomize"); + func.call(null, type); + } + if (fullyInitialize) { + this.buildPrototype(type, typeInfo); + type._typeInited = true; + } + }; + LibraryBuilder.prototype.extendsType = function (d, b) { + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + LibraryBuilder.prototype.findObjectUnderPath = function (top, paths, pathStartIndex) { + var obj = top; + for (var i = pathStartIndex; i < paths.length; i++) { + if (typeof (obj) !== 'object') { + throw new OfficeExtension_1.Error("Cannot find " + paths.join(".")); + } + obj = obj[paths[i]]; + } + return obj; + }; + LibraryBuilder.prototype.getFunction = function (fullName) { + var ret = this.resolveObjectByFullName(fullName); + if (typeof (ret) !== 'function') { + throw new OfficeExtension_1.Error("Cannot find function or type: " + fullName); + } + return ret; + }; + LibraryBuilder.prototype.resolveObjectByFullName = function (fullName) { + var parts = fullName.split('.'); + if (parts.length === 1) { + return this.m_targetNamespaceObject[parts[0]]; + } + var rootName = parts[0]; + if (rootName === this.m_namespace) { + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 1); + } + if (this.m_namespaceMap[rootName]) { + return this.findObjectUnderPath(this.m_namespaceMap[rootName], parts, 1); + } + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 0); + }; + LibraryBuilder.prototype.evaluateSimpleExpression = function (expression, thisObj) { + if (Utility.isNullOrUndefined(expression)) { + return null; + } + var paths = expression.split('.'); + if (paths.length === 3 && paths[0] === 'OfficeExtension' && paths[1] === 'Constants') { + return Constants[paths[2]]; + } + if (paths[0] === 'this') { + var obj = thisObj; + for (var i = 1; i < paths.length; i++) { + if (paths[i] == 'toString()') { + obj = obj.toString(); + } + else if (paths[i].substr(paths[i].length - 2) === "()") { + obj = obj[paths[i].substr(0, paths[i].length - 2)](); + } + else { + obj = obj[paths[i]]; + } + } + return obj; + } + throw new OfficeExtension_1.Error("Cannot evaluate: " + expression); + }; + LibraryBuilder.prototype.evaluateEventTargetId = function (targetIdExpression, thisObj) { + if (Utility.isNullOrEmptyString(targetIdExpression)) { + return ''; + } + return this.evaluateSimpleExpression(targetIdExpression, thisObj); + }; + LibraryBuilder.prototype.isAllDigits = function (expression) { + var charZero = '0'.charCodeAt(0); + var charNine = '9'.charCodeAt(0); + for (var i = 0; i < expression.length; i++) { + if (expression.charCodeAt(i) < charZero || + expression.charCodeAt(i) > charNine) { + return false; + } + } + return true; + }; + LibraryBuilder.prototype.evaluateEventType = function (eventTypeExpression) { + if (Utility.isNullOrEmptyString(eventTypeExpression)) { + return 0; + } + if (this.isAllDigits(eventTypeExpression)) { + return parseInt(eventTypeExpression); + } + var ret = this.resolveObjectByFullName(eventTypeExpression); + if (typeof (ret) !== 'number') { + throw new OfficeExtension_1.Error("Invalid event type: " + eventTypeExpression); + } + return ret; + }; + LibraryBuilder.prototype.buildPrototype = function (type, typeInfo) { + this.buildScalarProperties(type, typeInfo); + this.buildNavigationProperties(type, typeInfo); + this.buildScalarMethods(type, typeInfo); + this.buildNavigationMethods(type, typeInfo); + this.buildEvents(type, typeInfo); + this.buildHandleResult(type, typeInfo); + this.buildHandleIdResult(type, typeInfo); + this.buildHandleRetrieveResult(type, typeInfo); + this.buildLoad(type, typeInfo); + this.buildRetrieve(type, typeInfo); + this.buildSetMockData(type, typeInfo); + this.buildEnsureUnchanged(type, typeInfo); + this.buildUpdate(type, typeInfo); + this.buildSet(type, typeInfo); + this.buildToJSON(type, typeInfo); + this.buildItems(type, typeInfo); + this.buildTypeMetadataInfo(type, typeInfo); + this.buildTrackUntrack(type, typeInfo); + this.buildMixin(type, typeInfo); + }; + LibraryBuilder.prototype.toSimpleCamelUpperCase = function (name) { + return name.substr(0, 1).toUpperCase() + name.substr(1); + }; + LibraryBuilder.prototype.ensureOriginalName = function (member) { + if (member.originalName === null) { + member.originalName = this.toSimpleCamelUpperCase(member.name); + } + }; + LibraryBuilder.prototype.getFieldName = function (member) { + return "m_" + member.name; + }; + LibraryBuilder.prototype.throwIfApiNotSupported = function (typeInfo, member) { + if (this.m_apiSets && member.apiSetInfoOrdinal > 0) { + var apiSetInfo = this.m_apiSets[member.apiSetInfoOrdinal - 1]; + if (apiSetInfo) { + Utility.throwIfApiNotSupported(typeInfo.name + "." + member.name, apiSetInfo.name, apiSetInfo.version, this.m_hostName); + } + } + }; + LibraryBuilder.prototype.buildScalarProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarProperties)) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var elem = typeInfo.scalarProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 6); + typeInfo.scalarProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + originalName: this.getString(elem[3]), + setMethodApiFlags: elem[4], + undoableApiSetInfoOrdinal: elem[5] + }; + } + this.buildScalarProperty(type, typeInfo, typeInfo.scalarProperties[i]); + } + } + }; + LibraryBuilder.prototype.calculateApiFlags = function (apiFlags, undoableApiSetInfoOrdinal) { + if (undoableApiSetInfoOrdinal > 0) { + var undoableApiSetInfo = this.m_apiSets[undoableApiSetInfoOrdinal - 1]; + if (undoableApiSetInfo) { + apiFlags = CommonUtility.calculateApiFlags(apiFlags, undoableApiSetInfo.name, undoableApiSetInfo.version); + } + } + return apiFlags; + }; + LibraryBuilder.prototype.buildScalarProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + Utility.throwIfNotLoaded(propInfo.name, this[fieldName], typeInfo.name, this._isNull); + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildNavigationProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationProperties)) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + var elem = typeInfo.navigationProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 8); + typeInfo.navigationProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[4]), + getMethodApiFlags: elem[5], + setMethodApiFlags: elem[6], + propertyTypeFullName: this.getString(elem[1]), + undoableApiSetInfoOrdinal: elem[7] + }; + } + this.buildNavigationProperty(type, typeInfo, typeInfo.navigationProperties[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + if (!this[thisBuilder.getFieldName(propInfo)]) { + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + this[fieldName] = BatchApiHelper.createPropertyObject(thisBuilder.getFunction(propInfo.propertyTypeFullName), this, propInfo.originalName, (propInfo.behaviorFlags & 16) !== 0, propInfo.getMethodApiFlags); + } + if (propInfo.behaviorFlags & 64) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Get"); + customizationFunc.call(this, this, this[fieldName]); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildScalarMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarMethods)) { + for (var i = 0; i < typeInfo.scalarMethods.length; i++) { + var elem = typeInfo.scalarMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.scalarMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[5]), + apiFlags: elem[4], + parameterCount: elem[1], + undoableApiSetInfoOrdinal: elem[6] + }; + } + this.buildScalarMethod(type, typeInfo, typeInfo.scalarMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildScalarMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + var resultProcessType = 0; + if (methodInfo.behaviorFlags & 32) { + resultProcessType = 1; + } + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.invokeMethod(this, methodInfo.originalName, operationType, args, apiFlags, resultProcessType); + }; + }; + LibraryBuilder.prototype.buildNavigationMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationMethods)) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + var elem = typeInfo.navigationMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 9); + typeInfo.navigationMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[3], + apiSetInfoOrdinal: elem[4], + originalName: this.getString(elem[6]), + apiFlags: elem[5], + parameterCount: elem[2], + returnTypeFullName: this.getString(elem[1]), + returnObjectGetByIdMethodName: this.getString(elem[7]), + undoableApiSetInfoOrdinal: elem[8] + }; + } + this.buildNavigationMethod(type, typeInfo, typeInfo.navigationMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + if ((methodInfo.behaviorFlags & 16) !== 0) { + return BatchApiHelper.createIndexerObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, args); + } + else { + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.createMethodObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, methodInfo.originalName, operationType, args, (methodInfo.behaviorFlags & 4) !== 0, (methodInfo.behaviorFlags & 8) !== 0, methodInfo.returnObjectGetByIdMethodName, apiFlags); + } + }; + }; + LibraryBuilder.prototype.buildHandleResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleResult = function (value) { + ClientObject.prototype._handleResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + Utility.fixObjectPathIfNecessary(this, value); + if (typeInfo.behaviorFlags & 8) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i_3 = 0; i_3 < typeInfo.scalarProperties.length; i_3++) { + if (!Utility.isUndefined(value[typeInfo.scalarProperties[i_3].originalName])) { + if ((typeInfo.scalarProperties[i_3].behaviorFlags & 8) !== 0) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i_3].originalName]); + } + else { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = value[typeInfo.scalarProperties[i_3].originalName]; + } + } + } + } + if (typeInfo.navigationProperties) { + var propNames = []; + for (var i_4 = 0; i_4 < typeInfo.navigationProperties.length; i_4++) { + propNames.push(typeInfo.navigationProperties[i_4].name); + propNames.push(typeInfo.navigationProperties[i_4].originalName); + } + Utility._handleNavigationPropertyResults(this, value, propNames); + } + if ((typeInfo.behaviorFlags & 1) !== 0) { + var hasIndexerMethod = thisBuilder.hasIndexMethod(typeInfo); + if (!Utility.isNullOrUndefined(value[Constants.items])) { + this.m__items = []; + var _data = value[Constants.items]; + var childItemType = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + for (var i = 0; i < _data.length; i++) { + var _item = BatchApiHelper.createChildItemObject(childItemType, hasIndexerMethod, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + } + }; + }; + LibraryBuilder.prototype.buildHandleRetrieveResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleRetrieveResult = function (value, result) { + ClientObject.prototype._handleRetrieveResult.call(this, value, result); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if (typeInfo.scalarProperties[i].behaviorFlags & 8) { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].name])) { + value[typeInfo.scalarProperties[i].name] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i].name]); + } + } + } + } + if (typeInfo.behaviorFlags & 1) { + var hasIndexerMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + var childItemType_1 = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + var thisObj_1 = this; + Utility.processRetrieveResult(thisObj_1, value, result, function (childItemData, index) { return BatchApiHelper.createChildItemObject(childItemType_1, hasIndexerMethod_1, thisObj_1, childItemData, index); }); + } + else { + Utility.processRetrieveResult(this, value, result); + } + }; + }; + LibraryBuilder.prototype.buildHandleIdResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleIdResult = function (value) { + ClientObject.prototype._handleIdResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.behaviorFlags & 16) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleIdResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var propName = typeInfo.scalarProperties[i].originalName; + if (propName === "Id" || propName === "_Id" || propName === "_ReferenceId") { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].originalName])) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])] = value[typeInfo.scalarProperties[i].originalName]; + } + } + } + } + }; + }; + LibraryBuilder.prototype.buildLoad = function (type, typeInfo) { + type.prototype.load = function (options) { + return Utility.load(this, options); + }; + }; + LibraryBuilder.prototype.buildRetrieve = function (type, typeInfo) { + type.prototype.retrieve = function (options) { + return Utility.retrieve(this, options); + }; + }; + LibraryBuilder.prototype.buildNewObject = function (type, typeInfo) { + if (!Utility.isNullOrEmptyString(typeInfo.newObjectServerTypeFullName)) { + type.newObject = function (context) { + return BatchApiHelper.createTopLevelServiceObject(type, context, typeInfo.newObjectServerTypeFullName, (typeInfo.behaviorFlags & 1) !== 0, typeInfo.newObjectApiFlags); + }; + } + }; + LibraryBuilder.prototype.buildSetMockData = function (type, typeInfo) { + var thisBuilder = this; + if (typeInfo.behaviorFlags & 1) { + var hasIndexMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + type.prototype.setMockData = function (data) { + var thisObj = this; + Utility.setMockData(thisObj, data, function (childItemData, index) { + return BatchApiHelper.createChildItemObject(thisBuilder.getFunction(typeInfo.childItemTypeFullName), hasIndexMethod_1, thisObj, childItemData, index); + }, function (items) { + thisObj.m__items = items; + }); + }; + } + else { + type.prototype.setMockData = function (data) { + Utility.setMockData(this, data); + }; + } + }; + LibraryBuilder.prototype.buildEnsureUnchanged = function (type, typeInfo) { + type.prototype.ensureUnchanged = function (data) { + BatchApiHelper.invokeEnsureUnchanged(this, data); + }; + }; + LibraryBuilder.prototype.buildUpdate = function (type, typeInfo) { + type.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + }; + LibraryBuilder.prototype.buildSet = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) !== 0) { + return; + } + var notAllowedToBeSetPropertyNames = []; + var allowedScalarPropertyNames = []; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 2) === 0 && + (typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + allowedScalarPropertyNames.push(typeInfo.scalarProperties[i].name); + } + else { + notAllowedToBeSetPropertyNames.push(typeInfo.scalarProperties[i].name); + } + } + } + var allowedNavigationPropertyNames = []; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 16) !== 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 1) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 32) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else { + allowedNavigationPropertyNames.push(typeInfo.navigationProperties[i].name); + } + } + } + if (allowedNavigationPropertyNames.length === 0 && allowedScalarPropertyNames.length === 0) { + return; + } + type.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, allowedScalarPropertyNames, allowedNavigationPropertyNames, notAllowedToBeSetPropertyNames); + }; + }; + LibraryBuilder.prototype.buildItems = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) === 0) { + return; + } + Object.defineProperty(type.prototype, "items", { + get: function () { + Utility.throwIfNotLoaded("items", this.m__items, typeInfo.name, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildToJSON = function (type, typeInfo) { + var thisBuilder = this; + if ((typeInfo.behaviorFlags & 1) !== 0) { + type.prototype.toJSON = function () { + return Utility.toJson(this, {}, {}, this.m__items); + }; + return; + } + else { + type.prototype.toJSON = function () { + var scalarProperties = {}; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + scalarProperties[typeInfo.scalarProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])]; + } + } + } + var navProperties = {}; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 1) !== 0) { + navProperties[typeInfo.navigationProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.navigationProperties[i])]; + } + } + } + return Utility.toJson(this, scalarProperties, navProperties); + }; + } + }; + LibraryBuilder.prototype.buildTypeMetadataInfo = function (type, typeInfo) { + Object.defineProperty(type.prototype, "_className", { + get: function () { + return typeInfo.name; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_isCollection", { + get: function () { + return (typeInfo.behaviorFlags & 1) !== 0; + }, + enumerable: true, + configurable: true + }); + if (!Utility.isNullOrEmptyString(typeInfo.collectionPropertyPath)) { + Object.defineProperty(type.prototype, "_collectionPropertyPath", { + get: function () { + return typeInfo.collectionPropertyPath; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.scalarProperties && typeInfo.scalarProperties.length > 0) { + Object.defineProperty(type.prototype, "_scalarPropertyNames", { + get: function () { + if (!this.m__scalarPropertyNames) { + this.m__scalarPropertyNames = typeInfo.scalarProperties.map(function (p) { return p.name; }); + } + return this.m__scalarPropertyNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyOriginalNames", { + get: function () { + if (!this.m__scalarPropertyOriginalNames) { + this.m__scalarPropertyOriginalNames = typeInfo.scalarProperties.map(function (p) { return p.originalName; }); + } + return this.m__scalarPropertyOriginalNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyUpdateable", { + get: function () { + if (!this.m__scalarPropertyUpdateable) { + this.m__scalarPropertyUpdateable = typeInfo.scalarProperties.map(function (p) { return (p.behaviorFlags & 2) === 0; }); + } + return this.m__scalarPropertyUpdateable; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.navigationProperties && typeInfo.navigationProperties.length > 0) { + Object.defineProperty(type.prototype, "_navigationPropertyNames", { + get: function () { + if (!this.m__navigationPropertyNames) { + this.m__navigationPropertyNames = typeInfo.navigationProperties.map(function (p) { return p.name; }); + } + return this.m__navigationPropertyNames; + }, + enumerable: true, + configurable: true + }); + } + }; + LibraryBuilder.prototype.buildTrackUntrack = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 2) { + type.prototype.track = function () { + this.context.trackedObjects.add(this); + return this; + }; + type.prototype.untrack = function () { + this.context.trackedObjects.remove(this); + return this; + }; + } + }; + LibraryBuilder.prototype.buildMixin = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 4) { + var mixinType = this.getFunction(typeInfo.name + 'Custom'); + Utility.applyMixin(type, mixinType); + } + }; + LibraryBuilder.prototype.getOnEventName = function (name) { + if (name[0] === '_') { + return '_on' + name.substr(1); + } + return 'on' + name; + }; + LibraryBuilder.prototype.buildEvents = function (type, typeInfo) { + if (typeInfo.events) { + for (var i = 0; i < typeInfo.events.length; i++) { + var elem = typeInfo.events[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.events[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + typeExpression: this.getString(elem[3]), + targetIdExpression: this.getString(elem[4]), + register: this.getString(elem[5]), + unregister: this.getString(elem[6]) + }; + } + this.buildEvent(type, typeInfo, typeInfo.events[i]); + } + } + }; + LibraryBuilder.prototype.buildEvent = function (type, typeInfo, evt) { + if (evt.behaviorFlags & 1) { + this.buildV0Event(type, typeInfo, evt); + } + else { + this.buildV2Event(type, typeInfo, evt); + } + }; + LibraryBuilder.prototype.buildV2Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (evt.register !== 'null') { + registerFunc = this[evt.register].bind(this); + } + var unregisterFunc = null; + if (evt.unregister !== 'null') { + unregisterFunc = this[evt.unregister].bind(this); + } + var getTargetIdFunc = function () { + return thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + }; + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + var eventType = thisBuilder.evaluateEventType(evt.typeExpression); + this[fieldName] = new GenericEventHandlers(this.context, this, evt.name, { + eventType: eventType, + getTargetIdFunc: getTargetIdFunc, + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildV0Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (Utility.isNullOrEmptyString(evt.register)) { + var eventType_1 = thisBuilder.evaluateEventType(evt.typeExpression); + registerFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.register(eventType_1, targetId, handlerCallback); + }; + } + else if (evt.register !== 'null') { + var func_1 = thisBuilder.getFunction(evt.register); + registerFunc = + function (handlerCallback) { + return func_1.call(thisObj, thisObj, handlerCallback); + }; + } + var unregisterFunc = null; + if (Utility.isNullOrEmptyString(evt.unregister)) { + var eventType_2 = thisBuilder.evaluateEventType(evt.typeExpression); + unregisterFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.unregister(eventType_2, targetId, handlerCallback); + }; + } + else if (evt.unregister !== 'null') { + var func_2 = thisBuilder.getFunction(evt.unregister); + unregisterFunc = + function (handlerCallback) { + return func_2.call(thisObj, thisObj, handlerCallback); + }; + } + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + this[fieldName] = new EventHandlers(this.context, this, evt.name, { + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.hasIndexMethod = function (typeInfo) { + var ret = false; + if (typeInfo.navigationMethods) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + if ((typeInfo.navigationMethods[i].behaviorFlags & 16) !== 0) { + ret = true; + break; + } + } + } + return ret; + }; + LibraryBuilder.CustomizationCodeNamespace = "_CC"; + return LibraryBuilder; + }()); + OfficeExtension_1.LibraryBuilder = LibraryBuilder; + var versionToken = 1; + var internalConfiguration = { + invokeRequestModifier: function (request) { + request.DdaMethod.Version = versionToken; + return request; + }, + invokeResponseModifier: function (args) { + versionToken = args.Version; + if (args.Error) { + args.error = {}; + args.error.Code = args.Error; + } + return args; + } + }; + var CommunicationConstants; + (function (CommunicationConstants) { + CommunicationConstants["SendingId"] = "sId"; + CommunicationConstants["RespondingId"] = "rId"; + CommunicationConstants["CommandKey"] = "command"; + CommunicationConstants["SessionInfoKey"] = "sessionInfo"; + CommunicationConstants["ParamsKey"] = "params"; + CommunicationConstants["ApiReadyCommand"] = "apiready"; + CommunicationConstants["ExecuteMethodCommand"] = "executeMethod"; + CommunicationConstants["GetAppContextCommand"] = "getAppContext"; + CommunicationConstants["RegisterEventCommand"] = "registerEvent"; + CommunicationConstants["UnregisterEventCommand"] = "unregisterEvent"; + CommunicationConstants["FireEventCommand"] = "fireEvent"; + })(CommunicationConstants || (CommunicationConstants = {})); + var EmbeddedConstants = (function () { + function EmbeddedConstants() { + } + EmbeddedConstants.sessionContext = 'sc'; + EmbeddedConstants.embeddingPageOrigin = 'EmbeddingPageOrigin'; + EmbeddedConstants.embeddingPageSessionInfo = 'EmbeddingPageSessionInfo'; + return EmbeddedConstants; + }()); + OfficeExtension_1.EmbeddedConstants = EmbeddedConstants; + var EmbeddedSession = (function (_super) { + __extends(EmbeddedSession, _super); + function EmbeddedSession(url, options) { + var _this = _super.call(this) || this; + _this.m_chosenWindow = null; + _this.m_chosenOrigin = null; + _this.m_enabled = true; + _this.m_onMessageHandler = _this._onMessage.bind(_this); + _this.m_callbackList = {}; + _this.m_id = 0; + _this.m_timeoutId = -1; + _this.m_appContext = null; + _this.m_url = url; + _this.m_options = options; + if (!_this.m_options) { + _this.m_options = { sessionKey: Math.random().toString() }; + } + if (!_this.m_options.sessionKey) { + _this.m_options.sessionKey = Math.random().toString(); + } + if (!_this.m_options.container) { + _this.m_options.container = document.body; + } + if (!_this.m_options.timeoutInMilliseconds) { + _this.m_options.timeoutInMilliseconds = 60000; + } + if (!_this.m_options.height) { + _this.m_options.height = '400px'; + } + if (!_this.m_options.width) { + _this.m_options.width = '100%'; + } + if (!(_this.m_options.webApplication && + _this.m_options.webApplication.accessToken && + _this.m_options.webApplication.accessTokenTtl)) { + _this.m_options.webApplication = null; + } + return _this; + } + EmbeddedSession.prototype._getIFrameSrc = function () { + var origin = window.location.protocol + '//' + window.location.host; + var toAppend = EmbeddedConstants.embeddingPageOrigin + + '=' + + encodeURIComponent(origin) + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + encodeURIComponent(this.m_options.sessionKey); + var useHash = false; + if (this.m_url.toLowerCase().indexOf('/_layouts/preauth.aspx') > 0 || + this.m_url.toLowerCase().indexOf('/_layouts/15/preauth.aspx') > 0) { + useHash = true; + } + var a = document.createElement('a'); + a.href = this.m_url; + if (this.m_options.webApplication) { + var toAppendWAC = EmbeddedConstants.embeddingPageOrigin + + '=' + + origin + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + this.m_options.sessionKey; + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + else { + a.search = a.search + '&' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + } + else if (useHash) { + if (a.hash.length === 0 || a.hash === '#') { + a.hash = '#' + toAppend; + } + else { + a.hash = a.hash + '&' + toAppend; + } + } + else { + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + toAppend; + } + else { + a.search = a.search + '&' + toAppend; + } + } + var iframeSrc = a.href; + return iframeSrc; + }; + EmbeddedSession.prototype.init = function () { + var _this = this; + window.addEventListener('message', this.m_onMessageHandler); + var iframeSrc = this._getIFrameSrc(); + return CoreUtility.createPromise(function (resolve, reject) { + var iframeElement = document.createElement('iframe'); + if (_this.m_options.id) { + iframeElement.id = _this.m_options.id; + iframeElement.name = _this.m_options.id; + } + iframeElement.style.height = _this.m_options.height; + iframeElement.style.width = _this.m_options.width; + if (!_this.m_options.webApplication) { + iframeElement.src = iframeSrc; + _this.m_options.container.appendChild(iframeElement); + } + else { + var webApplicationForm = document.createElement('form'); + webApplicationForm.setAttribute('action', iframeSrc); + webApplicationForm.setAttribute('method', 'post'); + webApplicationForm.setAttribute('target', iframeElement.name); + _this.m_options.container.appendChild(webApplicationForm); + var token_input = document.createElement('input'); + token_input.setAttribute('type', 'hidden'); + token_input.setAttribute('name', 'access_token'); + token_input.setAttribute('value', _this.m_options.webApplication.accessToken); + webApplicationForm.appendChild(token_input); + var token_ttl_input = document.createElement('input'); + token_ttl_input.setAttribute('type', 'hidden'); + token_ttl_input.setAttribute('name', 'access_token_ttl'); + token_ttl_input.setAttribute('value', _this.m_options.webApplication.accessTokenTtl); + webApplicationForm.appendChild(token_ttl_input); + _this.m_options.container.appendChild(iframeElement); + webApplicationForm.submit(); + } + _this.m_timeoutId = window.setTimeout(function () { + _this.close(); + var err = Utility.createRuntimeError(CoreErrorCodes.timeout, CoreUtility._getResourceString(CoreResourceStrings.timeout), 'EmbeddedSession.init'); + reject(err); + }, _this.m_options.timeoutInMilliseconds); + _this.m_promiseResolver = resolve; + }); + }; + EmbeddedSession.prototype._invoke = function (method, callback, params) { + if (!this.m_enabled) { + callback(5001, null); + return; + } + if (internalConfiguration.invokeRequestModifier) { + params = internalConfiguration.invokeRequestModifier(params); + } + this._sendMessageWithCallback(this.m_id++, method, params, function (args) { + if (internalConfiguration.invokeResponseModifier) { + args = internalConfiguration.invokeResponseModifier(args); + } + var errorCode = args['Error']; + delete args['Error']; + callback(errorCode || 0, args); + }); + }; + EmbeddedSession.prototype.close = function () { + window.removeEventListener('message', this.m_onMessageHandler); + window.clearTimeout(this.m_timeoutId); + this.m_enabled = false; + }; + EmbeddedSession.prototype.getEventRegistration = function (controlId) { + if (!this.m_sessionEventManager) { + this.m_sessionEventManager = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + } + return this.m_sessionEventManager; + }; + EmbeddedSession.prototype._createRequestExecutorOrNull = function () { + return new EmbeddedRequestExecutor(this); + }; + EmbeddedSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + EmbeddedSession.prototype._registerEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.RegisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(null); + }); + }); + }; + EmbeddedSession.prototype._unregisterEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.UnregisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(); + }); + }); + }; + EmbeddedSession.prototype._onMessage = function (event) { + var _this = this; + if (!this.m_enabled) { + return; + } + if (this.m_chosenWindow && (this.m_chosenWindow !== event.source || this.m_chosenOrigin !== event.origin)) { + return; + } + var eventData = event.data; + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.ApiReadyCommand) { + if (!this.m_chosenWindow && + this._isValidDescendant(event.source) && + eventData[CommunicationConstants.SessionInfoKey] === this.m_options.sessionKey) { + this.m_chosenWindow = event.source; + this.m_chosenOrigin = event.origin; + this._sendMessageWithCallback(this.m_id++, CommunicationConstants.GetAppContextCommand, null, function (appContext) { + _this._setupContext(appContext); + window.clearTimeout(_this.m_timeoutId); + _this.m_promiseResolver(); + }); + } + return; + } + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.FireEventCommand) { + var msg = eventData[CommunicationConstants.ParamsKey]; + var eventId = msg['EventId']; + var targetId = msg['TargetId']; + var data = msg['Data']; + if (this.m_sessionEventManager) { + var handlers = this.m_sessionEventManager.getHandlers(eventId, targetId); + for (var i = 0; i < handlers.length; i++) { + handlers[i](data); + } + } + return; + } + if (eventData && eventData.hasOwnProperty(CommunicationConstants.RespondingId)) { + var rId = eventData[CommunicationConstants.RespondingId]; + if (this.m_callbackList.hasOwnProperty(rId)) { + var callback = this.m_callbackList[rId]; + if (typeof callback === 'function') { + callback(eventData[CommunicationConstants.ParamsKey]); + } + delete this.m_callbackList[rId]; + } + } + }; + EmbeddedSession.prototype._sendMessageWithCallback = function (id, command, data, callback) { + this.m_callbackList[id] = callback; + var message = {}; + message[CommunicationConstants.SendingId] = id; + message[CommunicationConstants.CommandKey] = command; + message[CommunicationConstants.ParamsKey] = data; + this.m_chosenWindow.postMessage(JSON.stringify(message), this.m_chosenOrigin); + }; + EmbeddedSession.prototype._isValidDescendant = function (wnd) { + var container = this.m_options.container || document.body; + function doesFrameWindow(containerWindow) { + if (containerWindow === wnd) { + return true; + } + for (var i = 0, len = containerWindow.frames.length; i < len; i++) { + if (doesFrameWindow(containerWindow.frames[i])) { + return true; + } + } + return false; + } + var iframes = container.getElementsByTagName('iframe'); + for (var i = 0, len = iframes.length; i < len; i++) { + if (doesFrameWindow(iframes[i].contentWindow)) { + return true; + } + } + return false; + }; + EmbeddedSession.prototype._setupContext = function (appContext) { + if (!(this.m_appContext = appContext)) { + return; + } + }; + return EmbeddedSession; + }(SessionBase)); + OfficeExtension_1.EmbeddedSession = EmbeddedSession; + var EmbeddedRequestExecutor = (function () { + function EmbeddedRequestExecutor(session) { + this.m_session = session; + } + EmbeddedRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, EmbeddedRequestExecutor.SourceLibHeaderValue); + return CoreUtility.createPromise(function (resolve, reject) { + _this.m_session._invoke(CommunicationConstants.ExecuteMethodCommand, function (status, result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (status == 0) { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBodyFromSafeArray(result.Data), RichApiMessageUtility.getResponseHeadersFromSafeArray(result.Data)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.Code, result.error.Message); + } + resolve(response); + }, EmbeddedRequestExecutor._transformMessageArrayIntoParams(messageSafearray)); + }); + }; + EmbeddedRequestExecutor._transformMessageArrayIntoParams = function (msgArray) { + return { + ArrayData: msgArray, + DdaMethod: { + DispatchId: EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod + } + }; + }; + EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod = 93; + EmbeddedRequestExecutor.SourceLibHeaderValue = 'Embedded'; + return EmbeddedRequestExecutor; + }()); +})(OfficeExtension || (OfficeExtension = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { + step(generator.next(value)); + } + catch (e) { + reject(e); + } } + function rejected(value) { try { + step(generator["throw"](value)); + } + catch (e) { + reject(e); + } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function () { if (t[0] & 1) + throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } + catch (e) { + op = [6, e]; + y = 0; + } + finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "AgaveVisualApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeBiShim = "BiShim"; + var BiShim = (function (_super) { + __extends(BiShim, _super); + function BiShim() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BiShim.prototype, "_className", { + get: function () { + return "BiShim"; + }, + enumerable: true, + configurable: true + }); + BiShim.prototype.initialize = function (capabilities) { + _invokeMethod(this, "Initialize", 0, [capabilities], 0, 0); + }; + BiShim.prototype.getData = function () { + return _invokeMethod(this, "getData", 1, [], 4, 0); + }; + BiShim.prototype.setVisualObjects = function (visualObjects) { + _invokeMethod(this, "setVisualObjects", 0, [visualObjects], 2, 0); + }; + BiShim.prototype.setVisualObjectsToPersist = function (visualObjectsToPersist) { + _invokeMethod(this, "setVisualObjectsToPersist", 0, [visualObjectsToPersist], 2, 0); + }; + BiShim.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BiShim.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BiShim.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BiShim, context, "Microsoft.AgaveVisual.BiShim", false, 4); + }; + BiShim.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BiShim; + }(OfficeExtension.ClientObject)); + OfficeCore.BiShim = BiShim; + var AgaveVisualErrorCodes; + (function (AgaveVisualErrorCodes) { + AgaveVisualErrorCodes["generalException1"] = "GeneralException"; + })(AgaveVisualErrorCodes = OfficeCore.AgaveVisualErrorCodes || (OfficeCore.AgaveVisualErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "ExperimentApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeFlightingService = "FlightingService"; + var FlightingService = (function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId = function () { + return _invokeMethod(this, "GetClientSessionId", 1, [], 4, 0); + }; + FlightingService.prototype.getDeferredFlights = function () { + return _invokeMethod(this, "GetDeferredFlights", 1, [], 4, 0); + }; + FlightingService.prototype.getFeature = function (featureName, type, defaultValue, possibleValues) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null, 4); + }; + FlightingService.prototype.getFeatureGate = function (featureName, scope) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeatureGate", 1, [featureName, scope], false, false, null, 4); + }; + FlightingService.prototype.resetOverride = function (featureName) { + _invokeMethod(this, "ResetOverride", 0, [featureName], 0, 0); + }; + FlightingService.prototype.setOverride = function (featureName, type, value) { + _invokeMethod(this, "SetOverride", 0, [featureName, type, value], 0, 0); + }; + FlightingService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FlightingService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FlightingService, context, "Microsoft.Experiment.FlightingService", false, 4); + }; + FlightingService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService = FlightingService; + var _typeABType = "ABType"; + var ABType = (function (_super) { + __extends(ABType, _super); + function ABType() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeABType, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + ABType.prototype.load = function (option) { + return _load(this, option); + }; + ABType.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + ABType.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ABType.prototype.toJSON = function () { + return _toJson(this, { + "value": this._V + }, {}); + }; + ABType.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType = ABType; + var FeatureType; + (function (FeatureType) { + FeatureType["boolean"] = "Boolean"; + FeatureType["integer"] = "Integer"; + FeatureType["string"] = "String"; + })(FeatureType = OfficeCore.FeatureType || (OfficeCore.FeatureType = {})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes["generalException"] = "GeneralException"; + })(ExperimentErrorCodes = OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyDialog; +(function (OfficeFirstPartyDialog) { + var Dialog = (function () { + function Dialog(_dialogService) { + this._dialogService = _dialogService; + } + Dialog.prototype.close = function () { + this._dialogService.close(); + return this._dialogService.context.sync(); + }; + Dialog.prototype.messageChild = function (message, options) { + if (DialogApiManager && DialogApiManager.messageChildRichApiBridge) { + DialogApiManager.messageChildRichApiBridge(message, options); + } + }; + return Dialog; + }()); + OfficeFirstPartyDialog.Dialog = Dialog; + function lookupErrorCodeAndMessage(internalCode) { + var _a; + var table = (_a = {}, + _a[12002] = { code: "InvalidUrl", message: "Cannot load URL, no such page or bad URL syntax." }, + _a[12003] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12004] = { code: "Untrusted", message: "Domain is not trusted." }, + _a[12005] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12007] = { code: "FailedToOpen", message: "Another dialog is already opened." }, + _a); + if (table[internalCode]) { + return table[internalCode]; + } + else { + return { code: "Unknown", message: "An unknown error has occured with code: " + internalCode }; + } + } + function displayWebDialog(url, options) { + if (options === void 0) { + options = {}; + } + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) { + throw new OfficeExtension.Error({ code: "InvalidArgument", message: 'Dimensions must be "number%" or number.' }); + } + var ctx = new OfficeExtension.ClientRequestContext(); + var dialogService = OfficeCore.FirstPartyDialogService.newObject(ctx); + var dialog = new OfficeFirstPartyDialog.Dialog(dialogService); + var eventResult = dialogService.onDialogMessage.add(function (args) { + OfficeExtension.Utility.log("dialogMessageHandler:" + JSON.stringify(args)); + var parsedMessage = JSON.parse(args.message); + var eventError = parsedMessage.errorCode + ? new OfficeExtension.Error(lookupErrorCodeAndMessage(parsedMessage.errorCode)) + : null; + var messageType = parsedMessage.type; + var origin = parsedMessage.origin; + var messageContent = parsedMessage.message; + switch (messageType) { + case 17: + if (eventError) { + reject(eventError); + } + else { + resolve(dialog); + } + break; + case 12: + if (options.onMessage) { + options.onMessage(messageContent, dialog, origin); + } + break; + case 10: + default: + if (parsedMessage.errorCode === 12006) { + if (eventResult) { + eventResult.remove(); + ctx.sync(); + } + if (options.onClose) { + options.onClose(); + } + } + else { + if (options.onRuntimeError) { + options.onRuntimeError(eventError, dialog); + reject(eventError); + } + } + } + return OfficeExtension.CoreUtility.Promise.resolve(); + }); + return ctx.sync() + .then(function () { + var dialogOptions = { + width: options.width ? parseInt(options.width) : 50, + height: options.height ? parseInt(options.height) : 50, + displayInIFrame: options.displayInIFrame, + dialogTitle: options.dialogTitle + }; + dialogService.displayDialog(url, dialogOptions); + return ctx.sync(); + })["catch"](function (e) { + reject(e); + }); + }); + function isInt(value) { + return (/^(\-|\+)?([0-9]+)%?$/.test(value)); + } + } + OfficeFirstPartyDialog.displayWebDialog = displayWebDialog; + var DialogEventType; + (function (DialogEventType) { + DialogEventType[DialogEventType["dialogMessageReceived"] = 0] = "dialogMessageReceived"; + DialogEventType[DialogEventType["dialogEventReceived"] = 1] = "dialogEventReceived"; + })(DialogEventType || (DialogEventType = {})); +})(OfficeFirstPartyDialog || (OfficeFirstPartyDialog = {})); +var OfficeCore; +(function (OfficeCore) { + OfficeCore.OfficeOnlineDomainList = [ + "*.dod.online.office365.us", + "*.gov.online.office365.us", + "*.officeapps-df.live.com", + "*.officeapps.live.com", + "*.online.office.de", + "*.partner.officewebapps.cn" + ]; + function isHostOriginTrusted() { + if (typeof window.external === 'undefined' || + typeof window.external.GetContext === 'undefined') { + var hostUrl = OSF.getClientEndPoint()._targetUrl; + var hostname_1 = getHostNameFromUrl(hostUrl); + if (hostUrl.indexOf("https:") != 0) { + return false; + } + OfficeCore.OfficeOnlineDomainList.forEach(function (domain) { + if (domain.indexOf("*.") == 0) { + domain = domain.substring(2); + } + if (hostname_1.indexOf(domain) == hostname_1.length - domain.length) { + return true; + } + }); + return false; + } + return true; + } + OfficeCore.isHostOriginTrusted = isHostOriginTrusted; + function getHostNameFromUrl(url) { + var hostName = ""; + hostName = url.split("/")[2]; + hostName = hostName.split(":")[0]; + hostName = hostName.split("?")[0]; + return hostName; + } +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var FirstPartyApis = (function () { + function FirstPartyApis(context) { + this.context = context; + } + Object.defineProperty(FirstPartyApis.prototype, "roamingSettings", { + get: function () { + if (!this.m_roamingSettings) { + this.m_roamingSettings = OfficeCore.AuthenticationService.newObject(this.context).roamingSettings; + } + return this.m_roamingSettings; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "tap", { + get: function () { + if (!this.m_tap) { + this.m_tap = OfficeCore.Tap.newObject(this.context); + } + return this.m_tap; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "skill", { + get: function () { + if (!this.m_skill) { + this.m_skill = OfficeCore.Skill.newObject(this.context); + } + return this.m_skill; + }, + enumerable: true, + configurable: true + }); + return FirstPartyApis; + }()); + OfficeCore.FirstPartyApis = FirstPartyApis; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + return _super.call(this, url) || this; + } + Object.defineProperty(RequestContext.prototype, "firstParty", { + get: function () { + if (!this.m_firstPartyApis) { + this.m_firstPartyApis = new FirstPartyApis(this); + } + return this.m_firstPartyApis; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry = OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "ribbon", { + get: function () { + if (!this.m_ribbon) { + this.m_ribbon = OfficeCore.DynamicRibbon.newObject(this); + } + return this.m_ribbon; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "bi", { + get: function () { + if (!this.m_biShim) { + this.m_biShim = OfficeCore.BiShim.newObject(this); + } + return this.m_biShim; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService = OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext = RequestContext; + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("OfficeCore.run", arguments, function (requestInfo) { return new OfficeCore.RequestContext(requestInfo); }); + } + OfficeCore.run = run; +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var license; + (function (license_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function isFeatureEnabled(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, isEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isEnabled = license.isFeatureEnabled(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isEnabled.value]; + } + }); + }); + } + license_1.isFeatureEnabled = isFeatureEnabled; + function getFeatureTier(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, tier; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + tier = license.getFeatureTier(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, tier.value]; + } + }); + }); + } + license_1.getFeatureTier = getFeatureTier; + function isFreemiumUpsellEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, license, isFreemiumUpsellEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isFreemiumUpsellEnabled = license.isFreemiumUpsellEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isFreemiumUpsellEnabled.value]; + } + }); + }); + } + license_1.isFreemiumUpsellEnabled = isFreemiumUpsellEnabled; + function launchUpsellExperience(experienceId) { + return __awaiter(this, void 0, void 0, function () { + var context, license; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + license.launchUpsellExperience(experienceId); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + license_1.launchUpsellExperience = launchUpsellExperience; + function onFeatureStateChanged(feature, listener) { + return __awaiter(this, void 0, void 0, function () { + var context, license, licenseFeature, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + licenseFeature = license.getLicenseFeature(feature); + licenseFeature.onStateChanged.add(listener); + removeListener = function () { + licenseFeature.onStateChanged.remove(listener); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + license_1.onFeatureStateChanged = onFeatureStateChanged; + function getMsaDeviceTicket(resource, policy, options) { + return __awaiter(this, void 0, void 0, function () { + var context, license, msaDeviceTicket; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + msaDeviceTicket = license.getMsaDeviceTicket(resource, policy, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, msaDeviceTicket.value]; + } + }); + }); + } + license_1.getMsaDeviceTicket = getMsaDeviceTicket; + })(license = Office.license || (Office.license = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeSkill = "Skill"; + var Skill = (function (_super) { + __extends(Skill, _super); + function Skill() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Skill.prototype, "_className", { + get: function () { + return "Skill"; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.executeAction = function (paneId, actionId, actionDescriptor) { + return _invokeMethod(this, "ExecuteAction", 1, [paneId, actionId, actionDescriptor], 4 | 1, 0); + }; + Skill.prototype.notifyPaneEvent = function (paneId, eventDescriptor) { + _invokeMethod(this, "NotifyPaneEvent", 1, [paneId, eventDescriptor], 4 | 1, 0); + }; + Skill.prototype.registerHostSkillEvent = function () { + _invokeMethod(this, "RegisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype.testFireEvent = function () { + _invokeMethod(this, "TestFireEvent", 0, [], 1, 0); + }; + Skill.prototype.unregisterHostSkillEvent = function () { + _invokeMethod(this, "UnregisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Skill.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Skill.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Skill, context, "Microsoft.SkillApi.Skill", false, 4); + }; + Object.defineProperty(Skill.prototype, "onHostSkillEvent", { + get: function () { + var _this = this; + if (!this.m_hostSkillEvent) { + this.m_hostSkillEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "HostSkillEvent", { + eventType: 65538, + registerFunc: function () { return _this.registerHostSkillEvent(); }, + unregisterFunc: function () { return _this.unregisterHostSkillEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.Skill_HostSkillEvent_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostSkillEvent; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Skill; + }(OfficeExtension.ClientObject)); + OfficeCore.Skill = Skill; + var _CC; + (function (_CC) { + function Skill_HostSkillEvent_EventArgsTransform(thisObj, args) { + var transformedArgs = { + type: args.type, + data: args.data + }; + return transformedArgs; + } + _CC.Skill_HostSkillEvent_EventArgsTransform = Skill_HostSkillEvent_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var SkillErrorCodes; + (function (SkillErrorCodes) { + SkillErrorCodes["generalException"] = "GeneralException"; + })(SkillErrorCodes = OfficeCore.SkillErrorCodes || (OfficeCore.SkillErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "TelemetryApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeTelemetryService = "TelemetryService"; + var TelemetryService = (function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendCustomerContent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _throwIfApiNotSupported("TelemetryService.sendCustomerContent", "Telemetry", "1.3", _hostName); + _invokeMethod(this, "SendCustomerContent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype.sendTelemetryEvent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _invokeMethod(this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + TelemetryService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.TelemetryService, context, "Microsoft.Telemetry.TelemetryService", false, 4); + }; + TelemetryService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService = TelemetryService; + var DataFieldType; + (function (DataFieldType) { + DataFieldType["unset"] = "Unset"; + DataFieldType["string"] = "String"; + DataFieldType["boolean"] = "Boolean"; + DataFieldType["int64"] = "Int64"; + DataFieldType["double"] = "Double"; + })(DataFieldType = OfficeCore.DataFieldType || (OfficeCore.DataFieldType = {})); + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes["generalException"] = "GeneralException"; + })(TelemetryErrorCodes = OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyAuth; +(function (OfficeFirstPartyAuth) { + var WebAuthReplyUrlsStorageKey = "officeWebAuthReplyUrls"; + var loaded = false; + OfficeFirstPartyAuth.authFlow = "authcode"; + OfficeFirstPartyAuth.autoPopup = false; + OfficeFirstPartyAuth.upnCheck = true; + OfficeFirstPartyAuth.msal = "https://alcdn.msauth.net/browser-1p/2.28.1/js/msal-browser-1p.min.js"; + OfficeFirstPartyAuth.debugging = false; + OfficeFirstPartyAuth.delay = 0; + OfficeFirstPartyAuth.delayMsal = 0; + function load(replyUrl, prefetch) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF.WebAuth && OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + var retrievedAuthContext = false; + try { + if (!Office || !Office.context || !Office.context.webAuth) { + reject({ + code: "GetAuthContextAsyncMissing", + message: "Office:[" + !Office + "],Office.context:[" + !Office.context + "],Office.context.webAuth:[" + !Office.context.webAuth + "]" + }); + return; + } + Office.context.webAuth.getAuthContextAsync(function (result) { + if (result.status === "succeeded") { + retrievedAuthContext = true; + var authContext = result.value; + if (!authContext || authContext.isAnonymous) { + reject({ + code: "CannotGetAuthContext", + message: authContext.Error + }); + return; + } + var isMsa = authContext.authorityType.toLowerCase() === 'msa'; + OSF.WebAuth.config = { + authFlow: OfficeFirstPartyAuth.authFlow, + authVersion: (OfficeFirstPartyAuth.authVersion) ? OfficeFirstPartyAuth.authVersion : null, + msal: OfficeFirstPartyAuth.msal, + delayWebAuth: OfficeFirstPartyAuth.delay, + delayMsal: OfficeFirstPartyAuth.delayMsal, + debugging: OfficeFirstPartyAuth.debugging, + authority: (OfficeFirstPartyAuth.authorityOverride) ? OfficeFirstPartyAuth.authorityOverride : authContext.authority, + idp: authContext.authorityType.toLowerCase(), + appIds: [isMsa ? (authContext.msaAppId) ? authContext.msaAppId : authContext.appId : authContext.appId], + redirectUri: (replyUrl) ? replyUrl : null, + upn: authContext.upn, + puid: authContext.userId, + prefetch: prefetch, + telemetryInstance: 'otel', + autoPopup: OfficeFirstPartyAuth.autoPopup, + enableUpnCheck: OfficeFirstPartyAuth.upnCheck, + enableConsoleLogging: OfficeFirstPartyAuth.debugging + }; + OSF.WebAuth.load().then(function (result) { + loaded = true; + logLoadEvent(result, loaded); + resolve(); + })["catch"](function (result) { + logLoadEvent(result, loaded); + reject({ + code: "PackageNotLoaded", + message: (result instanceof Event) ? result.type : result + }); + }); + if (OfficeFirstPartyAuth.authFlow === "implicit") { + var finalReplyUrl = (replyUrl) ? replyUrl : window.location.href.split("?")[0]; + var replyUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (replyUrls || replyUrls === "") { + replyUrls = finalReplyUrl; + } + else { + replyUrls += ", " + finalReplyUrl; + } + if (replyUrls) + sessionStorage.setItem(WebAuthReplyUrlsStorageKey, replyUrls); + } + } + else { + OSF.WebAuth.config = null; + reject({ + code: "CannotGetAuthContext", + message: result.status + }); + } + }); + } + catch (e) { + OSF.WebAuth.config = null; + OSF.WebAuth.load().then(function () { + resolve(); + })["catch"](function () { + reject({ + code: retrievedAuthContext ? "CannotGetAuthContext" : "FailedToLoad", + message: e + }); + }); + } + } + else { + resolve(); + } + }); + } + OfficeFirstPartyAuth.load = load; + function getAccessToken(options, behaviorOption) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + Office.context.webAuth.getAuthContextAsync(function (result) { + var supportsAuthToken = false; + if (result.status === "succeeded") { + var authContext = result.value; + if (authContext.supportsAuthToken) { + supportsAuthToken = true; + } + } + if (!supportsAuthToken) { + if (OSF.WebAuth && loaded) { + if (OSF.WebAuth.config.appIds[0]) { + OSF.WebAuth.getToken(options.resource, OSF.WebAuth.config.appIds[0], OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : null, (options && options.authChallenge) ? options.authChallenge : null).then(function (result) { + logAcquireEvent(result, true, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + resolve({ + accessToken: result.Token, + tokenIdenityType: (OSF.WebAuth.config.idp.toLowerCase() == "msa") + ? OfficeCore.IdentityType.microsoftAccount + : OfficeCore.IdentityType.organizationAccount + }); + })["catch"](function (result) { + logAcquireEvent(result, false, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + reject({ + code: result.ErrorCode, + message: (result instanceof Event) ? result.type : result.ErrorMessage + }); + }); + } + } + else { + logUnexpectedAcquire(loaded, OSF.WebAuth.loadAttempts); + } + } + else { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result_1 = auth.getAccessToken(options, null); + context.sync().then(function () { + resolve(result_1.value); + }); + } + }); + } + else { + var context_1 = new OfficeCore.RequestContext(); + var auth_1 = OfficeCore.AuthenticationService.newObject(context_1); + var handler_1 = auth_1.onTokenReceived.add(function (arg) { + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + handler_1.remove(); + context_1.sync()["catch"](function () { + }); + if (arg.code == 0) { + resolve(arg.tokenValue); + } + else { + if (OfficeExtension.CoreUtility.isNullOrUndefined(arg.errorInfo)) { + reject({ code: arg.code }); + } + else { + try { + reject(JSON.parse(arg.errorInfo)); + } + catch (e) { + reject({ code: arg.code, message: arg.errorInfo }); + } + } + } + } + return null; + }); + context_1.sync() + .then(function () { + var apiResult = auth_1.getAccessToken(options, auth_1._targetId); + return context_1.sync() + .then(function () { + if (OfficeExtension.CoreUtility.isNullOrUndefined(apiResult.value)) { + return null; + } + var tokenValue = apiResult.value.accessToken; + if (!OfficeExtension.CoreUtility.isNullOrUndefined(tokenValue)) { + resolve(apiResult.value); + } + }); + })["catch"](function (e) { + reject(e); + }); + } + }); + } + OfficeFirstPartyAuth.getAccessToken = getAccessToken; + function getPrimaryIdentityInfo() { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result = auth.getPrimaryIdentityInfo(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getPrimaryIdentityInfo = getPrimaryIdentityInfo; + function getIdentities() { + var context = new OfficeCore.RequestContext(); + var auth_service = OfficeCore.AuthenticationService.newObject(context); + var result = auth_service.getIdentities(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getIdentities = getIdentities; + function logLoadEvent(result, succeeded) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : "") + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'loadedApplicationCount': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + case 'timeToLoad': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.Load", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logAcquireEvent(result, succeeded, popup) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Popup', (typeof popup === "boolean") ? popup : false), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : result.ErrorCode), + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'timeToGetToken': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.GetAccessToken", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logUnexpectedAcquire(loadResult, loadAttempts) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeBooleanDataField('Loaded', loadResult), + oteljs.makeInt64DataField('LoadAttempts', (typeof loadAttempts === "number") ? loadAttempts : 0) + ]; + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.UnexpectedAcquire", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function loadWebAuthForReplyPage() { + try { + if (typeof (window) === "undefined" || !window.sessionStorage) { + return; + } + var webAuthRedirectUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (webAuthRedirectUrls !== null && webAuthRedirectUrls.indexOf(window.location.origin + window.location.pathname) !== -1) { + load(); + } + } + catch (ex) { + console.error(ex); + } + } + if (typeof (window) !== "undefined" && window.OSF) { + loadWebAuthForReplyPage(); + } +})(OfficeFirstPartyAuth || (OfficeFirstPartyAuth = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var IdentityType; + (function (IdentityType) { + IdentityType["organizationAccount"] = "OrganizationAccount"; + IdentityType["microsoftAccount"] = "MicrosoftAccount"; + IdentityType["unsupported"] = "Unsupported"; + })(IdentityType = OfficeCore.IdentityType || (OfficeCore.IdentityType = {})); + var _typeAuthenticationService = "AuthenticationService"; + var AuthenticationService = (function (_super) { + __extends(AuthenticationService, _super); + function AuthenticationService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AuthenticationService.prototype, "_className", { + get: function () { + return "AuthenticationService"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "_navigationPropertyNames", { + get: function () { + return ["roamingSettings"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "roamingSettings", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.RoamingSettingCollection, this, "RoamingSettings", false, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.getAccessToken = function (tokenParameters, targetId) { + return _invokeMethod(this, "GetAccessToken", 1, [tokenParameters, targetId], 4 | 1, 0); + }; + AuthenticationService.prototype.getIdentities = function () { + _throwIfApiNotSupported("AuthenticationService.getIdentities", "FirstPartyAuthentication", "1.3", _hostName); + return _invokeMethod(this, "GetIdentities", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.getPrimaryIdentityInfo = function () { + _throwIfApiNotSupported("AuthenticationService.getPrimaryIdentityInfo", "FirstPartyAuthentication", "1.2", _hostName); + return _invokeMethod(this, "GetPrimaryIdentityInfo", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.registerIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.registerIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "RegisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype.unregisterIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.unregisterIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "UnregisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["roamingSettings", "RoamingSettings"]); + }; + AuthenticationService.prototype.load = function (options) { + return _load(this, options); + }; + AuthenticationService.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + AuthenticationService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AuthenticationService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AuthenticationService, context, "Microsoft.Authentication.AuthenticationService", false, 4); + }; + Object.defineProperty(AuthenticationService.prototype, "onIdentityChanged", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onIdentityChanged", "FirstPartyAuthentication", "1.5", _hostName); + if (!this.m_identityChanged) { + this.m_identityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityChanged", { + eventType: 65545, + registerFunc: function () { return _this.registerIdentityChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterIdentityChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + email: value.email, + environment: value.environment, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "onTokenReceived", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onTokenReceived", "FirstPartyAuthentication", "1.2", _hostName); + if (!this.m_tokenReceived) { + this.m_tokenReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "TokenReceived", { + eventType: 3001, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return _this._targetId; }, + eventArgsTransformFunc: function (value) { + var event = _CC.AuthenticationService_TokenReceived_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_tokenReceived; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AuthenticationService; + }(OfficeExtension.ClientObject)); + OfficeCore.AuthenticationService = AuthenticationService; + var AuthenticationServiceCustom = (function () { + function AuthenticationServiceCustom() { + } + Object.defineProperty(AuthenticationServiceCustom.prototype, "_targetId", { + get: function () { + if (this.m_targetId == undefined) { + if (typeof (OSF) !== 'undefined' && OSF.OUtil) { + this.m_targetId = OSF.OUtil.Guid.generateNewGuid(); + } + else { + this.m_targetId = "" + this.context._nextId(); + } + } + return this.m_targetId; + }, + enumerable: true, + configurable: true + }); + return AuthenticationServiceCustom; + }()); + OfficeCore.AuthenticationServiceCustom = AuthenticationServiceCustom; + OfficeExtension.Utility.applyMixin(AuthenticationService, AuthenticationServiceCustom); + var _CC; + (function (_CC) { + function AuthenticationService_TokenReceived_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + tokenValue: value.tokenValue, + code: value.code, + errorInfo: value.errorInfo + }; + return newArgs; + } + _CC.AuthenticationService_TokenReceived_EventArgsTransform = AuthenticationService_TokenReceived_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeRoamingSetting = "RoamingSetting"; + var RoamingSetting = (function (_super) { + __extends(RoamingSetting, _super); + function RoamingSetting() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSetting.prototype, "_className", { + get: function () { + return "RoamingSetting"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRoamingSetting, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeRoamingSetting, this._isNull); + return this._V; + }, + set: function (value) { + this._V = value; + _invokeSetProperty(this, "Value", value, 0); + }, + enumerable: true, + configurable: true + }); + RoamingSetting.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["value"], [], []); + }; + RoamingSetting.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RoamingSetting.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + RoamingSetting.prototype.load = function (options) { + return _load(this, options); + }; + RoamingSetting.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RoamingSetting.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RoamingSetting.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSetting.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I, + "value": this._V + }, {}); + }; + RoamingSetting.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RoamingSetting.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RoamingSetting; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSetting = RoamingSetting; + var _typeRoamingSettingCollection = "RoamingSettingCollection"; + var RoamingSettingCollection = (function (_super) { + __extends(RoamingSettingCollection, _super); + function RoamingSettingCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSettingCollection.prototype, "_className", { + get: function () { + return "RoamingSettingCollection"; + }, + enumerable: true, + configurable: true + }); + RoamingSettingCollection.prototype.getItem = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItem", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype.getItemOrNullObject = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItemOrNullObject", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RoamingSettingCollection.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSettingCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RoamingSettingCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSettingCollection = RoamingSettingCollection; + var _typeBeforeDocumentCloseNotification = "BeforeDocumentCloseNotification"; + var BeforeDocumentCloseNotification = (function (_super) { + __extends(BeforeDocumentCloseNotification, _super); + function BeforeDocumentCloseNotification() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "_className", { + get: function () { + return "BeforeDocumentCloseNotification"; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.disable = function () { + _invokeMethod(this, "Disable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype.enable = function () { + _invokeMethod(this, "Enable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BeforeDocumentCloseNotification.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BeforeDocumentCloseNotification.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BeforeDocumentCloseNotification, context, "Microsoft.BeforeDocumentCloseNotification.BeforeDocumentCloseNotification", false, 4); + }; + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "onBeforeCloseNotificationCancelled", { + get: function () { + if (!this.m_beforeCloseNotificationCancelled) { + this.m_beforeCloseNotificationCancelled = new OfficeExtension.GenericEventHandlers(this.context, this, "BeforeCloseNotificationCancelled", { + eventType: 65540, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_beforeCloseNotificationCancelled; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BeforeDocumentCloseNotification; + }(OfficeExtension.ClientObject)); + OfficeCore.BeforeDocumentCloseNotification = BeforeDocumentCloseNotification; + var ServiceProvider; + (function (ServiceProvider) { + ServiceProvider["ariaBrowserPipeUrl"] = "AriaBrowserPipeUrl"; + ServiceProvider["ariaUploadUrl"] = "AriaUploadUrl"; + ServiceProvider["ariaVNextUploadUrl"] = "AriaVNextUploadUrl"; + ServiceProvider["lokiAutoDiscoverUrl"] = "LokiAutoDiscoverUrl"; + })(ServiceProvider = OfficeCore.ServiceProvider || (OfficeCore.ServiceProvider = {})); + var _typeServiceUrlProvider = "ServiceUrlProvider"; + var ServiceUrlProvider = (function (_super) { + __extends(ServiceUrlProvider, _super); + function ServiceUrlProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceUrlProvider.prototype, "_className", { + get: function () { + return "ServiceUrlProvider"; + }, + enumerable: true, + configurable: true + }); + ServiceUrlProvider.prototype.getServiceUrl = function (emailAddress, provider) { + return _invokeMethod(this, "GetServiceUrl", 1, [emailAddress, provider], 4, 0); + }; + ServiceUrlProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceUrlProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceUrlProvider.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceUrlProvider, context, "Microsoft.DesktopCompliance.ServiceUrlProvider", false, 4); + }; + ServiceUrlProvider.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceUrlProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceUrlProvider = ServiceUrlProvider; + var _typeLinkedIn = "LinkedIn"; + var LinkedIn = (function (_super) { + __extends(LinkedIn, _super); + function LinkedIn() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LinkedIn.prototype, "_className", { + get: function () { + return "LinkedIn"; + }, + enumerable: true, + configurable: true + }); + LinkedIn.prototype.isEnabledForOffice = function () { + return _invokeMethod(this, "IsEnabledForOffice", 1, [], 4, 0); + }; + LinkedIn.prototype.recordLinkedInSettingsCompliance = function (featureName, isEnabled) { + _invokeMethod(this, "RecordLinkedInSettingsCompliance", 0, [featureName, isEnabled], 0, 0); + }; + LinkedIn.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LinkedIn.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LinkedIn.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LinkedIn, context, "Microsoft.DesktopCompliance.LinkedIn", false, 4); + }; + LinkedIn.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LinkedIn; + }(OfficeExtension.ClientObject)); + OfficeCore.LinkedIn = LinkedIn; + var _typeNetworkUsage = "NetworkUsage"; + var NetworkUsage = (function (_super) { + __extends(NetworkUsage, _super); + function NetworkUsage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(NetworkUsage.prototype, "_className", { + get: function () { + return "NetworkUsage"; + }, + enumerable: true, + configurable: true + }); + NetworkUsage.prototype.isInDisconnectedMode = function () { + return _invokeMethod(this, "IsInDisconnectedMode", 1, [], 4, 0); + }; + NetworkUsage.prototype.isInOnlineMode = function () { + return _invokeMethod(this, "IsInOnlineMode", 1, [], 4, 0); + }; + NetworkUsage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + NetworkUsage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + NetworkUsage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.NetworkUsage, context, "Microsoft.DesktopCompliance.NetworkUsage", false, 4); + }; + NetworkUsage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return NetworkUsage; + }(OfficeExtension.ClientObject)); + OfficeCore.NetworkUsage = NetworkUsage; + var _typeDynamicRibbon = "DynamicRibbon"; + var DynamicRibbon = (function (_super) { + __extends(DynamicRibbon, _super); + function DynamicRibbon() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DynamicRibbon.prototype, "_className", { + get: function () { + return "DynamicRibbon"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "_navigationPropertyNames", { + get: function () { + return ["buttons"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "buttons", { + get: function () { + if (!this._B) { + this._B = _createPropertyObject(OfficeCore.RibbonButtonCollection, this, "Buttons", true, 4); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + DynamicRibbon.prototype.executeRequestCreate = function (jsonCreate) { + _throwIfApiNotSupported("DynamicRibbon.executeRequestCreate", "DynamicRibbon", "1.2", _hostName); + _invokeMethod(this, "ExecuteRequestCreate", 1, [jsonCreate], 4, 0); + }; + DynamicRibbon.prototype.executeRequestUpdate = function (jsonUpdate) { + _invokeMethod(this, "ExecuteRequestUpdate", 1, [jsonUpdate], 4, 0); + }; + DynamicRibbon.prototype.getButton = function (id) { + return _createMethodObject(OfficeCore.RibbonButton, this, "GetButton", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype.getTab = function (id) { + return _createMethodObject(OfficeCore.RibbonTab, this, "GetTab", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["buttons", "Buttons"]); + }; + DynamicRibbon.prototype.load = function (options) { + return _load(this, options); + }; + DynamicRibbon.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + DynamicRibbon.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DynamicRibbon.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DynamicRibbon, context, "Microsoft.DynamicRibbon.DynamicRibbon", false, 4); + }; + DynamicRibbon.prototype.toJSON = function () { + return _toJson(this, {}, { + "buttons": this._B + }); + }; + return DynamicRibbon; + }(OfficeExtension.ClientObject)); + OfficeCore.DynamicRibbon = DynamicRibbon; + var _typeRibbonTab = "RibbonTab"; + var RibbonTab = (function (_super) { + __extends(RibbonTab, _super); + function RibbonTab() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonTab.prototype, "_className", { + get: function () { + return "RibbonTab"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonTab, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + RibbonTab.prototype.setVisibility = function (visibility) { + _invokeMethod(this, "SetVisibility", 0, [visibility], 0, 0); + }; + RibbonTab.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + RibbonTab.prototype.load = function (options) { + return _load(this, options); + }; + RibbonTab.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonTab.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonTab.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonTab.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + RibbonTab.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonTab.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonTab; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonTab = RibbonTab; + var _typeRibbonButton = "RibbonButton"; + var RibbonButton = (function (_super) { + __extends(RibbonButton, _super); + function RibbonButton() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButton.prototype, "_className", { + get: function () { + return "RibbonButton"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "enabled", "label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Enabled", "Label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "enabled", { + get: function () { + _throwIfNotLoaded("enabled", this._E, _typeRibbonButton, this._isNull); + return this._E; + }, + set: function (value) { + this._E = value; + _invokeSetProperty(this, "Enabled", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonButton, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "label", { + get: function () { + _throwIfNotLoaded("label", this._L, _typeRibbonButton, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + RibbonButton.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["enabled"], [], []); + }; + RibbonButton.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RibbonButton.prototype.setEnabled = function (enabled) { + _invokeMethod(this, "SetEnabled", 0, [enabled], 0, 0); + }; + RibbonButton.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Enabled"])) { + this._E = obj["Enabled"]; + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Label"])) { + this._L = obj["Label"]; + } + }; + RibbonButton.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButton.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButton.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonButton.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonButton.prototype.toJSON = function () { + return _toJson(this, { + "enabled": this._E, + "id": this._I, + "label": this._L + }, {}); + }; + RibbonButton.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonButton.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonButton; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButton = RibbonButton; + var _typeRibbonButtonCollection = "RibbonButtonCollection"; + var RibbonButtonCollection = (function (_super) { + __extends(RibbonButtonCollection, _super); + function RibbonButtonCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButtonCollection.prototype, "_className", { + get: function () { + return "RibbonButtonCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeRibbonButtonCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + RibbonButtonCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + RibbonButtonCollection.prototype.getItem = function (key) { + return _createIndexerObject(OfficeCore.RibbonButton, this, [key]); + }; + RibbonButtonCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.RibbonButton, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + RibbonButtonCollection.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButtonCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButtonCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }); + }; + RibbonButtonCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + RibbonButtonCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return RibbonButtonCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButtonCollection = RibbonButtonCollection; + var _typeFirstPartyDialogService = "FirstPartyDialogService"; + var FirstPartyDialogService = (function (_super) { + __extends(FirstPartyDialogService, _super); + function FirstPartyDialogService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FirstPartyDialogService.prototype, "_className", { + get: function () { + return "FirstPartyDialogService"; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4 | 1, 0); + }; + FirstPartyDialogService.prototype.displayDialog = function (url, options) { + _invokeMethod(this, "DisplayDialog", 1, [url, options], 4 | 1, 0); + }; + FirstPartyDialogService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FirstPartyDialogService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FirstPartyDialogService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FirstPartyDialogService, context, "Microsoft.FirstPartyDialog.FirstPartyDialogService", false, 4); + }; + Object.defineProperty(FirstPartyDialogService.prototype, "onDialogMessage", { + get: function () { + var _this = this; + if (!this.m_dialogMessage) { + this.m_dialogMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "DialogMessage", { + eventType: 65536, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_dialogMessage; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FirstPartyDialogService; + }(OfficeExtension.ClientObject)); + OfficeCore.FirstPartyDialogService = FirstPartyDialogService; + (function (_CC) { + function FirstPartyDialogService_DialogMessage_EventArgsTransform(thisObj, args) { + return { + message: args.message + }; + } + _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform = FirstPartyDialogService_DialogMessage_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var TimeStringFormat; + (function (TimeStringFormat) { + TimeStringFormat["shortTime"] = "ShortTime"; + TimeStringFormat["longTime"] = "LongTime"; + TimeStringFormat["shortDate"] = "ShortDate"; + TimeStringFormat["longDate"] = "LongDate"; + })(TimeStringFormat = OfficeCore.TimeStringFormat || (OfficeCore.TimeStringFormat = {})); + var _typeLocaleApi = "LocaleApi"; + var LocaleApi = (function (_super) { + __extends(LocaleApi, _super); + function LocaleApi() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LocaleApi.prototype, "_className", { + get: function () { + return "LocaleApi"; + }, + enumerable: true, + configurable: true + }); + LocaleApi.prototype.formatDateTimeString = function (localeName, value, format) { + return _invokeMethod(this, "FormatDateTimeString", 1, [localeName, value, format], 4, 0); + }; + LocaleApi.prototype.getLocaleDateTimeFormattingInfo = function (localeName) { + return _invokeMethod(this, "GetLocaleDateTimeFormattingInfo", 1, [localeName], 4, 0); + }; + LocaleApi.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LocaleApi.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LocaleApi.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LocaleApi, context, "Microsoft.LocaleApi.LocaleApi", false, 4); + }; + LocaleApi.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LocaleApi; + }(OfficeExtension.ClientObject)); + OfficeCore.LocaleApi = LocaleApi; + var _typeComment = "Comment"; + var Comment = (function (_super) { + __extends(Comment, _super); + function Comment() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Comment.prototype, "_className", { + get: function () { + return "Comment"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "text", "created", "level", "resolved", "author", "mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Text", "Created", "Level", "Resolved", "Author", "Mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false, false, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_navigationPropertyNames", { + get: function () { + return ["parent", "parentOrNullObject", "replies"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parent", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.Comment, this, "Parent", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parentOrNullObject", { + get: function () { + if (!this._Pa) { + this._Pa = _createPropertyObject(OfficeCore.Comment, this, "ParentOrNullObject", false, 4); + } + return this._Pa; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "replies", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.CommentCollection, this, "Replies", true, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "author", { + get: function () { + _throwIfNotLoaded("author", this._A, _typeComment, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "created", { + get: function () { + _throwIfNotLoaded("created", this._C, _typeComment, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeComment, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "level", { + get: function () { + _throwIfNotLoaded("level", this._L, _typeComment, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "mentions", { + get: function () { + _throwIfNotLoaded("mentions", this._M, _typeComment, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "resolved", { + get: function () { + _throwIfNotLoaded("resolved", this._Re, _typeComment, this._isNull); + return this._Re; + }, + set: function (value) { + this._Re = value; + _invokeSetProperty(this, "Resolved", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeComment, this._isNull); + return this._T; + }, + set: function (value) { + this._T = value; + _invokeSetProperty(this, "Text", value, 0); + }, + enumerable: true, + configurable: true + }); + Comment.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["text", "resolved"], [], [ + "parent", + "parentOrNullObject", + "replies" + ]); + }; + Comment.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Comment.prototype["delete"] = function () { + _invokeMethod(this, "Delete", 0, [], 0, 0); + }; + Comment.prototype.getParentOrSelf = function () { + return _createMethodObject(OfficeCore.Comment, this, "GetParentOrSelf", 1, [], false, false, null, 4); + }; + Comment.prototype.getRichText = function (format) { + return _invokeMethod(this, "GetRichText", 1, [format], 4, 0); + }; + Comment.prototype.reply = function (text, format) { + return _createMethodObject(OfficeCore.Comment, this, "Reply", 0, [text, format], false, false, null, 0); + }; + Comment.prototype.setRichText = function (text, format) { + return _invokeMethod(this, "SetRichText", 0, [text, format], 0, 0); + }; + Comment.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Author"])) { + this._A = obj["Author"]; + } + if (!_isUndefined(obj["Created"])) { + this._C = _adjustToDateTime(obj["Created"]); + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Level"])) { + this._L = obj["Level"]; + } + if (!_isUndefined(obj["Mentions"])) { + this._M = obj["Mentions"]; + } + if (!_isUndefined(obj["Resolved"])) { + this._Re = obj["Resolved"]; + } + if (!_isUndefined(obj["Text"])) { + this._T = obj["Text"]; + } + _handleNavigationPropertyResults(this, obj, ["parent", "Parent", "parentOrNullObject", "ParentOrNullObject", "replies", "Replies"]); + }; + Comment.prototype.load = function (options) { + return _load(this, options); + }; + Comment.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Comment.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + Comment.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Created"])) { + obj["created"] = _adjustToDateTime(obj["created"]); + } + _processRetrieveResult(this, value, result); + }; + Comment.prototype.toJSON = function () { + return _toJson(this, { + "author": this._A, + "created": this._C, + "id": this._I, + "level": this._L, + "mentions": this._M, + "resolved": this._Re, + "text": this._T + }, { + "replies": this._R + }); + }; + Comment.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Comment.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Comment; + }(OfficeExtension.ClientObject)); + OfficeCore.Comment = Comment; + var _typeCommentCollection = "CommentCollection"; + var CommentCollection = (function (_super) { + __extends(CommentCollection, _super); + function CommentCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CommentCollection.prototype, "_className", { + get: function () { + return "CommentCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeCommentCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + CommentCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + CommentCollection.prototype.getItem = function (id) { + return _createIndexerObject(OfficeCore.Comment, this, [id]); + }; + CommentCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Comment, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + CommentCollection.prototype.load = function (options) { + return _load(this, options); + }; + CommentCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + CommentCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }); + }; + CommentCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + CommentCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return CommentCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.CommentCollection = CommentCollection; + var _typeExtensionLifeCycle = "ExtensionLifeCycle"; + var ExtensionLifeCycle = (function (_super) { + __extends(ExtensionLifeCycle, _super); + function ExtensionLifeCycle() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ExtensionLifeCycle.prototype, "_className", { + get: function () { + return "ExtensionLifeCycle"; + }, + enumerable: true, + configurable: true + }); + ExtensionLifeCycle.prototype.launchExtensionComponent = function (componentId, componentType, launchProperties) { + _invokeMethod(this, "LaunchExtensionComponent", 1, [componentId, componentType, launchProperties], 4 | 1, 0); + }; + ExtensionLifeCycle.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ExtensionLifeCycle.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ExtensionLifeCycle.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ExtensionLifeCycle, context, "Microsoft.OfficeSharedApi.ExtensionLifeCycle", false, 4); + }; + ExtensionLifeCycle.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ExtensionLifeCycle; + }(OfficeExtension.ClientObject)); + OfficeCore.ExtensionLifeCycle = ExtensionLifeCycle; + var CommentTextFormat; + (function (CommentTextFormat) { + CommentTextFormat["plain"] = "Plain"; + CommentTextFormat["markdown"] = "Markdown"; + CommentTextFormat["delta"] = "Delta"; + })(CommentTextFormat = OfficeCore.CommentTextFormat || (OfficeCore.CommentTextFormat = {})); + var PersonaCardPerfPoint; + (function (PersonaCardPerfPoint) { + PersonaCardPerfPoint["placeHolderRendered"] = "PlaceHolderRendered"; + PersonaCardPerfPoint["initialCardRendered"] = "InitialCardRendered"; + })(PersonaCardPerfPoint = OfficeCore.PersonaCardPerfPoint || (OfficeCore.PersonaCardPerfPoint = {})); + var UnifiedCommunicationAvailability; + (function (UnifiedCommunicationAvailability) { + UnifiedCommunicationAvailability["notSet"] = "NotSet"; + UnifiedCommunicationAvailability["free"] = "Free"; + UnifiedCommunicationAvailability["idle"] = "Idle"; + UnifiedCommunicationAvailability["busy"] = "Busy"; + UnifiedCommunicationAvailability["idleBusy"] = "IdleBusy"; + UnifiedCommunicationAvailability["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationAvailability["unalertable"] = "Unalertable"; + UnifiedCommunicationAvailability["unavailable"] = "Unavailable"; + })(UnifiedCommunicationAvailability = OfficeCore.UnifiedCommunicationAvailability || (OfficeCore.UnifiedCommunicationAvailability = {})); + var UnifiedCommunicationStatus; + (function (UnifiedCommunicationStatus) { + UnifiedCommunicationStatus["online"] = "Online"; + UnifiedCommunicationStatus["notOnline"] = "NotOnline"; + UnifiedCommunicationStatus["away"] = "Away"; + UnifiedCommunicationStatus["busy"] = "Busy"; + UnifiedCommunicationStatus["beRightBack"] = "BeRightBack"; + UnifiedCommunicationStatus["onThePhone"] = "OnThePhone"; + UnifiedCommunicationStatus["outToLunch"] = "OutToLunch"; + UnifiedCommunicationStatus["inAMeeting"] = "InAMeeting"; + UnifiedCommunicationStatus["outOfOffice"] = "OutOfOffice"; + UnifiedCommunicationStatus["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationStatus["inAConference"] = "InAConference"; + UnifiedCommunicationStatus["getting"] = "Getting"; + UnifiedCommunicationStatus["notABuddy"] = "NotABuddy"; + UnifiedCommunicationStatus["disconnected"] = "Disconnected"; + UnifiedCommunicationStatus["notInstalled"] = "NotInstalled"; + UnifiedCommunicationStatus["urgentInterruptionsOnly"] = "UrgentInterruptionsOnly"; + UnifiedCommunicationStatus["mayBeAvailable"] = "MayBeAvailable"; + UnifiedCommunicationStatus["idle"] = "Idle"; + UnifiedCommunicationStatus["inPresentation"] = "InPresentation"; + })(UnifiedCommunicationStatus = OfficeCore.UnifiedCommunicationStatus || (OfficeCore.UnifiedCommunicationStatus = {})); + var UnifiedCommunicationPresence; + (function (UnifiedCommunicationPresence) { + UnifiedCommunicationPresence["free"] = "Free"; + UnifiedCommunicationPresence["busy"] = "Busy"; + UnifiedCommunicationPresence["idle"] = "Idle"; + UnifiedCommunicationPresence["doNotDistrub"] = "DoNotDistrub"; + UnifiedCommunicationPresence["blocked"] = "Blocked"; + UnifiedCommunicationPresence["notSet"] = "NotSet"; + UnifiedCommunicationPresence["outOfOffice"] = "OutOfOffice"; + })(UnifiedCommunicationPresence = OfficeCore.UnifiedCommunicationPresence || (OfficeCore.UnifiedCommunicationPresence = {})); + var FreeBusyCalendarState; + (function (FreeBusyCalendarState) { + FreeBusyCalendarState["unknown"] = "Unknown"; + FreeBusyCalendarState["free"] = "Free"; + FreeBusyCalendarState["busy"] = "Busy"; + FreeBusyCalendarState["elsewhere"] = "Elsewhere"; + FreeBusyCalendarState["tentative"] = "Tentative"; + FreeBusyCalendarState["outOfOffice"] = "OutOfOffice"; + })(FreeBusyCalendarState = OfficeCore.FreeBusyCalendarState || (OfficeCore.FreeBusyCalendarState = {})); + var PersonaType; + (function (PersonaType) { + PersonaType["unknown"] = "Unknown"; + PersonaType["enterprise"] = "Enterprise"; + PersonaType["contact"] = "Contact"; + PersonaType["bot"] = "Bot"; + PersonaType["phoneOnly"] = "PhoneOnly"; + PersonaType["oneOff"] = "OneOff"; + PersonaType["distributionList"] = "DistributionList"; + PersonaType["personalDistributionList"] = "PersonalDistributionList"; + PersonaType["anonymous"] = "Anonymous"; + PersonaType["unifiedGroup"] = "UnifiedGroup"; + })(PersonaType = OfficeCore.PersonaType || (OfficeCore.PersonaType = {})); + var PhoneType; + (function (PhoneType) { + PhoneType["workPhone"] = "WorkPhone"; + PhoneType["homePhone"] = "HomePhone"; + PhoneType["mobilePhone"] = "MobilePhone"; + PhoneType["businessFax"] = "BusinessFax"; + PhoneType["otherPhone"] = "OtherPhone"; + })(PhoneType = OfficeCore.PhoneType || (OfficeCore.PhoneType = {})); + var AddressType; + (function (AddressType) { + AddressType["workAddress"] = "WorkAddress"; + AddressType["homeAddress"] = "HomeAddress"; + AddressType["otherAddress"] = "OtherAddress"; + })(AddressType = OfficeCore.AddressType || (OfficeCore.AddressType = {})); + var MemberType; + (function (MemberType) { + MemberType["unknown"] = "Unknown"; + MemberType["individual"] = "Individual"; + MemberType["group"] = "Group"; + })(MemberType = OfficeCore.MemberType || (OfficeCore.MemberType = {})); + var _typeMemberInfoList = "MemberInfoList"; + var MemberInfoList = (function (_super) { + __extends(MemberInfoList, _super); + function MemberInfoList() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MemberInfoList.prototype, "_className", { + get: function () { + return "MemberInfoList"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typeMemberInfoList, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typeMemberInfoList, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + MemberInfoList.prototype.getPersonaForMember = function (memberCookie) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForMember", 1, [memberCookie], false, false, null, 4); + }; + MemberInfoList.prototype.items = function () { + return _invokeMethod(this, "Items", 1, [], 4, 0); + }; + MemberInfoList.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + }; + MemberInfoList.prototype.load = function (options) { + return _load(this, options); + }; + MemberInfoList.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MemberInfoList.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MemberInfoList.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + MemberInfoList.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MemberInfoList.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MemberInfoList; + }(OfficeExtension.ClientObject)); + OfficeCore.MemberInfoList = MemberInfoList; + var PersonaDataUpdated; + (function (PersonaDataUpdated) { + PersonaDataUpdated["hostId"] = "HostId"; + PersonaDataUpdated["type"] = "Type"; + PersonaDataUpdated["photo"] = "Photo"; + PersonaDataUpdated["personaInfo"] = "PersonaInfo"; + PersonaDataUpdated["unifiedCommunicationInfo"] = "UnifiedCommunicationInfo"; + PersonaDataUpdated["organization"] = "Organization"; + PersonaDataUpdated["unifiedGroupInfo"] = "UnifiedGroupInfo"; + PersonaDataUpdated["members"] = "Members"; + PersonaDataUpdated["membership"] = "Membership"; + PersonaDataUpdated["capabilities"] = "Capabilities"; + PersonaDataUpdated["customizations"] = "Customizations"; + PersonaDataUpdated["viewableSources"] = "ViewableSources"; + PersonaDataUpdated["placeholder"] = "Placeholder"; + })(PersonaDataUpdated = OfficeCore.PersonaDataUpdated || (OfficeCore.PersonaDataUpdated = {})); + var _typePersonaActions = "PersonaActions"; + var PersonaActions = (function (_super) { + __extends(PersonaActions, _super); + function PersonaActions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaActions.prototype, "_className", { + get: function () { + return "PersonaActions"; + }, + enumerable: true, + configurable: true + }); + PersonaActions.prototype.addContact = function () { + _invokeMethod(this, "AddContact", 0, [], 0, 0); + }; + PersonaActions.prototype.callPhoneNumber = function (contactNumber) { + _invokeMethod(this, "CallPhoneNumber", 0, [contactNumber], 0, 0); + }; + PersonaActions.prototype.composeEmail = function (emailAddress) { + _invokeMethod(this, "ComposeEmail", 0, [emailAddress], 0, 0); + }; + PersonaActions.prototype.composeInstantMessage = function (sipAddress) { + _invokeMethod(this, "ComposeInstantMessage", 0, [sipAddress], 0, 0); + }; + PersonaActions.prototype.editContact = function () { + _invokeMethod(this, "EditContact", 0, [], 0, 0); + }; + PersonaActions.prototype.editContactByIdentifier = function (identifier) { + _invokeMethod(this, "EditContactByIdentifier", 0, [identifier], 0, 0); + }; + PersonaActions.prototype.editUnifiedGroup = function () { + _invokeMethod(this, "EditUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.getChangePhotoUrlAndOpenInBrowser = function () { + _invokeMethod(this, "GetChangePhotoUrlAndOpenInBrowser", 0, [], 0, 0); + }; + PersonaActions.prototype.hideHoverCardForPersona = function () { + _invokeMethod(this, "HideHoverCardForPersona", 0, [], 0, 0); + }; + PersonaActions.prototype.joinUnifiedGroup = function () { + _invokeMethod(this, "JoinUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.leaveUnifiedGroup = function () { + _invokeMethod(this, "LeaveUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.openGroupCalendar = function () { + _invokeMethod(this, "OpenGroupCalendar", 0, [], 0, 0); + }; + PersonaActions.prototype.openLinkContactUx = function () { + _invokeMethod(this, "OpenLinkContactUx", 0, [], 0, 0); + }; + PersonaActions.prototype.openOutlookProperties = function () { + _invokeMethod(this, "OpenOutlookProperties", 0, [], 0, 0); + }; + PersonaActions.prototype.pinPersonaToQuickContacts = function () { + _invokeMethod(this, "PinPersonaToQuickContacts", 0, [], 0, 0); + }; + PersonaActions.prototype.scheduleMeeting = function () { + _invokeMethod(this, "ScheduleMeeting", 0, [], 0, 0); + }; + PersonaActions.prototype.showContactCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContactCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showContextMenu = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContextMenu", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showExpandedCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowExpandedCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showHoverCardForPersona = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowHoverCardForPersona", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.startAudioCall = function () { + _invokeMethod(this, "StartAudioCall", 0, [], 0, 0); + }; + PersonaActions.prototype.startVideoCall = function () { + _invokeMethod(this, "StartVideoCall", 0, [], 0, 0); + }; + PersonaActions.prototype.subscribeToGroup = function () { + _invokeMethod(this, "SubscribeToGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.toggleTagForAlerts = function () { + _invokeMethod(this, "ToggleTagForAlerts", 0, [], 0, 0); + }; + PersonaActions.prototype.unsubscribeFromGroup = function () { + _invokeMethod(this, "UnsubscribeFromGroup", 0, [], 0, 0); + }; + PersonaActions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaActions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaActions.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaActions; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaActions = PersonaActions; + var _typePersonaInfoSource = "PersonaInfoSource"; + var PersonaInfoSource = (function (_super) { + __extends(PersonaInfoSource, _super); + function PersonaInfoSource() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfoSource.prototype, "_className", { + get: function () { + return "PersonaInfoSource"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "phones", "addresses", "webSites", "notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "Phones", "Addresses", "WebSites", "Notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "addresses", { + get: function () { + _throwIfNotLoaded("addresses", this._A, _typePersonaInfoSource, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfoSource, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfoSource, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfoSource, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfoSource, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfoSource, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfoSource, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfoSource, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfoSource, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfoSource, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfoSource, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfoSource, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfoSource, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfoSource, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "phones", { + get: function () { + _throwIfNotLoaded("phones", this._P, _typePersonaInfoSource, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfoSource, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfoSource, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfoSource, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfoSource.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Addresses"])) { + this._A = obj["Addresses"]; + } + if (!_isUndefined(obj["Birthday"])) { + this._B = obj["Birthday"]; + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = obj["Birthdays"]; + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["Phones"])) { + this._P = obj["Phones"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + }; + PersonaInfoSource.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfoSource.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfoSource.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaInfoSource.prototype.toJSON = function () { + return _toJson(this, { + "addresses": this._A, + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "phones": this._P, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, {}); + }; + PersonaInfoSource.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfoSource.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfoSource; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfoSource = PersonaInfoSource; + var _typePersonaInfo = "PersonaInfo"; + var PersonaInfo = (function (_super) { + __extends(PersonaInfo, _super); + function PersonaInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfo.prototype, "_className", { + get: function () { + return "PersonaInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "webSites", "notes", "isPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "WebSites", "Notes", "IsPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["sources"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sources", { + get: function () { + if (!this._So) { + this._So = _createPropertyObject(OfficeCore.PersonaInfoSource, this, "Sources", false, 4); + } + return this._So; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfo, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfo, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfo, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfo, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfo, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "isPersonResolved", { + get: function () { + _throwIfNotLoaded("isPersonResolved", this._I, _typePersonaInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfo, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfo, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfo, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfo, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfo, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfo, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfo, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfo.prototype.getAddresses = function () { + return _invokeMethod(this, "GetAddresses", 1, [], 4, 0); + }; + PersonaInfo.prototype.getPhones = function () { + return _invokeMethod(this, "GetPhones", 1, [], 4, 0); + }; + PersonaInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Birthday"])) { + this._B = _adjustToDateTime(obj["Birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = _adjustToDateTime(obj["Birthdays"]); + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["IsPersonResolved"])) { + this._I = obj["IsPersonResolved"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + _handleNavigationPropertyResults(this, obj, ["sources", "Sources"]); + }; + PersonaInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Birthday"])) { + obj["birthday"] = _adjustToDateTime(obj["birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + obj["birthdays"] = _adjustToDateTime(obj["birthdays"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaInfo.prototype.toJSON = function () { + return _toJson(this, { + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "isPersonResolved": this._I, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, { + "sources": this._So + }); + }; + PersonaInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfo = PersonaInfo; + var _typePersonaUnifiedCommunicationInfo = "PersonaUnifiedCommunicationInfo"; + var PersonaUnifiedCommunicationInfo = (function (_super) { + __extends(PersonaUnifiedCommunicationInfo, _super); + function PersonaUnifiedCommunicationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_className", { + get: function () { + return "PersonaUnifiedCommunicationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["availability", "status", "isSelf", "isTagged", "customStatusString", "isBlocked", "presenceTooltip", "isOutOfOffice", "outOfOfficeNote", "timezone", "meetingLocation", "meetingSubject", "timezoneBias", "idleStartTime", "overallCapability", "isOnBuddyList", "presenceNote", "voiceMailUri", "availabilityText", "availabilityTooltip", "isDurationInAvailabilityText", "freeBusyStatus", "calendarState", "presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Availability", "Status", "IsSelf", "IsTagged", "CustomStatusString", "IsBlocked", "PresenceTooltip", "IsOutOfOffice", "OutOfOfficeNote", "Timezone", "MeetingLocation", "MeetingSubject", "TimezoneBias", "IdleStartTime", "OverallCapability", "IsOnBuddyList", "PresenceNote", "VoiceMailUri", "AvailabilityText", "AvailabilityTooltip", "IsDurationInAvailabilityText", "FreeBusyStatus", "CalendarState", "Presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availability", { + get: function () { + _throwIfNotLoaded("availability", this._A, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityText", { + get: function () { + _throwIfNotLoaded("availabilityText", this._Av, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Av; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityTooltip", { + get: function () { + _throwIfNotLoaded("availabilityTooltip", this._Ava, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ava; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "calendarState", { + get: function () { + _throwIfNotLoaded("calendarState", this._C, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "customStatusString", { + get: function () { + _throwIfNotLoaded("customStatusString", this._Cu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Cu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "freeBusyStatus", { + get: function () { + _throwIfNotLoaded("freeBusyStatus", this._F, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "idleStartTime", { + get: function () { + _throwIfNotLoaded("idleStartTime", this._I, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isBlocked", { + get: function () { + _throwIfNotLoaded("isBlocked", this._Is, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isDurationInAvailabilityText", { + get: function () { + _throwIfNotLoaded("isDurationInAvailabilityText", this._IsD, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsD; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOnBuddyList", { + get: function () { + _throwIfNotLoaded("isOnBuddyList", this._IsO, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsO; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOutOfOffice", { + get: function () { + _throwIfNotLoaded("isOutOfOffice", this._IsOu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsOu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isSelf", { + get: function () { + _throwIfNotLoaded("isSelf", this._IsS, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsS; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isTagged", { + get: function () { + _throwIfNotLoaded("isTagged", this._IsT, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsT; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingLocation", { + get: function () { + _throwIfNotLoaded("meetingLocation", this._M, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingSubject", { + get: function () { + _throwIfNotLoaded("meetingSubject", this._Me, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Me; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "outOfOfficeNote", { + get: function () { + _throwIfNotLoaded("outOfOfficeNote", this._O, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "overallCapability", { + get: function () { + _throwIfNotLoaded("overallCapability", this._Ov, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ov; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presence", { + get: function () { + _throwIfNotLoaded("presence", this._P, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceNote", { + get: function () { + _throwIfNotLoaded("presenceNote", this._Pr, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pr; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceTooltip", { + get: function () { + _throwIfNotLoaded("presenceTooltip", this._Pre, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pre; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "status", { + get: function () { + _throwIfNotLoaded("status", this._S, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezone", { + get: function () { + _throwIfNotLoaded("timezone", this._T, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezoneBias", { + get: function () { + _throwIfNotLoaded("timezoneBias", this._Ti, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ti; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "voiceMailUri", { + get: function () { + _throwIfNotLoaded("voiceMailUri", this._V, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + PersonaUnifiedCommunicationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Availability"])) { + this._A = obj["Availability"]; + } + if (!_isUndefined(obj["AvailabilityText"])) { + this._Av = obj["AvailabilityText"]; + } + if (!_isUndefined(obj["AvailabilityTooltip"])) { + this._Ava = obj["AvailabilityTooltip"]; + } + if (!_isUndefined(obj["CalendarState"])) { + this._C = obj["CalendarState"]; + } + if (!_isUndefined(obj["CustomStatusString"])) { + this._Cu = obj["CustomStatusString"]; + } + if (!_isUndefined(obj["FreeBusyStatus"])) { + this._F = obj["FreeBusyStatus"]; + } + if (!_isUndefined(obj["IdleStartTime"])) { + this._I = _adjustToDateTime(obj["IdleStartTime"]); + } + if (!_isUndefined(obj["IsBlocked"])) { + this._Is = obj["IsBlocked"]; + } + if (!_isUndefined(obj["IsDurationInAvailabilityText"])) { + this._IsD = obj["IsDurationInAvailabilityText"]; + } + if (!_isUndefined(obj["IsOnBuddyList"])) { + this._IsO = obj["IsOnBuddyList"]; + } + if (!_isUndefined(obj["IsOutOfOffice"])) { + this._IsOu = obj["IsOutOfOffice"]; + } + if (!_isUndefined(obj["IsSelf"])) { + this._IsS = obj["IsSelf"]; + } + if (!_isUndefined(obj["IsTagged"])) { + this._IsT = obj["IsTagged"]; + } + if (!_isUndefined(obj["MeetingLocation"])) { + this._M = obj["MeetingLocation"]; + } + if (!_isUndefined(obj["MeetingSubject"])) { + this._Me = obj["MeetingSubject"]; + } + if (!_isUndefined(obj["OutOfOfficeNote"])) { + this._O = obj["OutOfOfficeNote"]; + } + if (!_isUndefined(obj["OverallCapability"])) { + this._Ov = obj["OverallCapability"]; + } + if (!_isUndefined(obj["Presence"])) { + this._P = obj["Presence"]; + } + if (!_isUndefined(obj["PresenceNote"])) { + this._Pr = obj["PresenceNote"]; + } + if (!_isUndefined(obj["PresenceTooltip"])) { + this._Pre = obj["PresenceTooltip"]; + } + if (!_isUndefined(obj["Status"])) { + this._S = obj["Status"]; + } + if (!_isUndefined(obj["Timezone"])) { + this._T = obj["Timezone"]; + } + if (!_isUndefined(obj["TimezoneBias"])) { + this._Ti = obj["TimezoneBias"]; + } + if (!_isUndefined(obj["VoiceMailUri"])) { + this._V = obj["VoiceMailUri"]; + } + }; + PersonaUnifiedCommunicationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaUnifiedCommunicationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaUnifiedCommunicationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["IdleStartTime"])) { + obj["idleStartTime"] = _adjustToDateTime(obj["idleStartTime"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaUnifiedCommunicationInfo.prototype.toJSON = function () { + return _toJson(this, { + "availability": this._A, + "availabilityText": this._Av, + "availabilityTooltip": this._Ava, + "calendarState": this._C, + "customStatusString": this._Cu, + "freeBusyStatus": this._F, + "idleStartTime": this._I, + "isBlocked": this._Is, + "isDurationInAvailabilityText": this._IsD, + "isOnBuddyList": this._IsO, + "isOutOfOffice": this._IsOu, + "isSelf": this._IsS, + "isTagged": this._IsT, + "meetingLocation": this._M, + "meetingSubject": this._Me, + "outOfOfficeNote": this._O, + "overallCapability": this._Ov, + "presence": this._P, + "presenceNote": this._Pr, + "presenceTooltip": this._Pre, + "status": this._S, + "timezone": this._T, + "timezoneBias": this._Ti, + "voiceMailUri": this._V + }, {}); + }; + PersonaUnifiedCommunicationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaUnifiedCommunicationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaUnifiedCommunicationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaUnifiedCommunicationInfo = PersonaUnifiedCommunicationInfo; + var _typePersonaPhotoInfo = "PersonaPhotoInfo"; + var PersonaPhotoInfo = (function (_super) { + __extends(PersonaPhotoInfo, _super); + function PersonaPhotoInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaPhotoInfo.prototype, "_className", { + get: function () { + return "PersonaPhotoInfo"; + }, + enumerable: true, + configurable: true + }); + PersonaPhotoInfo.prototype.getImageUri = function (uriScheme) { + return _invokeMethod(this, "getImageUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getImageUriWithMetadata = function (uriScheme) { + return _invokeMethod(this, "getImageUriWithMetadata", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getPlaceholderUri = function (uriScheme) { + return _invokeMethod(this, "getPlaceholderUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.setPlaceholderColor = function (color) { + _invokeMethod(this, "setPlaceholderColor", 0, [color], 0, 0); + }; + PersonaPhotoInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaPhotoInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaPhotoInfo.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaPhotoInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaPhotoInfo = PersonaPhotoInfo; + var _typePersonaCollection = "PersonaCollection"; + var PersonaCollection = (function (_super) { + __extends(PersonaCollection, _super); + function PersonaCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaCollection.prototype, "_className", { + get: function () { + return "PersonaCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typePersonaCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + PersonaCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + PersonaCollection.prototype.getItem = function (index) { + return _createIndexerObject(OfficeCore.Persona, this, [index]); + }; + PersonaCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Persona, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + PersonaCollection.prototype.load = function (options) { + return _load(this, options); + }; + PersonaCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }); + }; + PersonaCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + PersonaCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return PersonaCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaCollection = PersonaCollection; + var _typePersonaOrganizationInfo = "PersonaOrganizationInfo"; + var PersonaOrganizationInfo = (function (_super) { + __extends(PersonaOrganizationInfo, _super); + function PersonaOrganizationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaOrganizationInfo.prototype, "_className", { + get: function () { + return "PersonaOrganizationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["hierarchy", "manager", "directReports"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "directReports", { + get: function () { + if (!this._D) { + this._D = _createPropertyObject(OfficeCore.PersonaCollection, this, "DirectReports", true, 4); + } + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "hierarchy", { + get: function () { + if (!this._H) { + this._H = _createPropertyObject(OfficeCore.PersonaCollection, this, "Hierarchy", true, 4); + } + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "manager", { + get: function () { + if (!this._M) { + this._M = _createPropertyObject(OfficeCore.Persona, this, "Manager", false, 4); + } + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typePersonaOrganizationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typePersonaOrganizationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + PersonaOrganizationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + _handleNavigationPropertyResults(this, obj, ["directReports", "DirectReports", "hierarchy", "Hierarchy", "manager", "Manager"]); + }; + PersonaOrganizationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaOrganizationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaOrganizationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaOrganizationInfo.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + PersonaOrganizationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaOrganizationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaOrganizationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaOrganizationInfo = PersonaOrganizationInfo; + var CustomizedData; + (function (CustomizedData) { + CustomizedData["email"] = "Email"; + CustomizedData["workPhone"] = "WorkPhone"; + CustomizedData["workPhone2"] = "WorkPhone2"; + CustomizedData["workFax"] = "WorkFax"; + CustomizedData["mobilePhone"] = "MobilePhone"; + CustomizedData["homePhone"] = "HomePhone"; + CustomizedData["homePhone2"] = "HomePhone2"; + CustomizedData["otherPhone"] = "OtherPhone"; + CustomizedData["sipAddress"] = "SipAddress"; + CustomizedData["profile"] = "Profile"; + CustomizedData["office"] = "Office"; + CustomizedData["company"] = "Company"; + CustomizedData["workAddress"] = "WorkAddress"; + CustomizedData["homeAddress"] = "HomeAddress"; + CustomizedData["otherAddress"] = "OtherAddress"; + CustomizedData["birthday"] = "Birthday"; + })(CustomizedData = OfficeCore.CustomizedData || (OfficeCore.CustomizedData = {})); + var _typeUnifiedGroupInfo = "UnifiedGroupInfo"; + var UnifiedGroupInfo = (function (_super) { + __extends(UnifiedGroupInfo, _super); + function UnifiedGroupInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UnifiedGroupInfo.prototype, "_className", { + get: function () { + return "UnifiedGroupInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Description", "OneDrive", "OneNote", "IsPublic", "AmIOwner", "AmIMember", "AmISubscribed", "MemberCount", "OwnerCount", "HasGuests", "Site", "Planner", "Classification", "SubscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIMember", { + get: function () { + _throwIfNotLoaded("amIMember", this._A, _typeUnifiedGroupInfo, this._isNull); + return this._A; + }, + set: function (value) { + this._A = value; + _invokeSetProperty(this, "AmIMember", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIOwner", { + get: function () { + _throwIfNotLoaded("amIOwner", this._Am, _typeUnifiedGroupInfo, this._isNull); + return this._Am; + }, + set: function (value) { + this._Am = value; + _invokeSetProperty(this, "AmIOwner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amISubscribed", { + get: function () { + _throwIfNotLoaded("amISubscribed", this._AmI, _typeUnifiedGroupInfo, this._isNull); + return this._AmI; + }, + set: function (value) { + this._AmI = value; + _invokeSetProperty(this, "AmISubscribed", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "classification", { + get: function () { + _throwIfNotLoaded("classification", this._C, _typeUnifiedGroupInfo, this._isNull); + return this._C; + }, + set: function (value) { + this._C = value; + _invokeSetProperty(this, "Classification", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "description", { + get: function () { + _throwIfNotLoaded("description", this._D, _typeUnifiedGroupInfo, this._isNull); + return this._D; + }, + set: function (value) { + this._D = value; + _invokeSetProperty(this, "Description", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "hasGuests", { + get: function () { + _throwIfNotLoaded("hasGuests", this._H, _typeUnifiedGroupInfo, this._isNull); + return this._H; + }, + set: function (value) { + this._H = value; + _invokeSetProperty(this, "HasGuests", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "isPublic", { + get: function () { + _throwIfNotLoaded("isPublic", this._I, _typeUnifiedGroupInfo, this._isNull); + return this._I; + }, + set: function (value) { + this._I = value; + _invokeSetProperty(this, "IsPublic", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "memberCount", { + get: function () { + _throwIfNotLoaded("memberCount", this._M, _typeUnifiedGroupInfo, this._isNull); + return this._M; + }, + set: function (value) { + this._M = value; + _invokeSetProperty(this, "MemberCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneDrive", { + get: function () { + _throwIfNotLoaded("oneDrive", this._O, _typeUnifiedGroupInfo, this._isNull); + return this._O; + }, + set: function (value) { + this._O = value; + _invokeSetProperty(this, "OneDrive", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneNote", { + get: function () { + _throwIfNotLoaded("oneNote", this._On, _typeUnifiedGroupInfo, this._isNull); + return this._On; + }, + set: function (value) { + this._On = value; + _invokeSetProperty(this, "OneNote", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "ownerCount", { + get: function () { + _throwIfNotLoaded("ownerCount", this._Ow, _typeUnifiedGroupInfo, this._isNull); + return this._Ow; + }, + set: function (value) { + this._Ow = value; + _invokeSetProperty(this, "OwnerCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "planner", { + get: function () { + _throwIfNotLoaded("planner", this._P, _typeUnifiedGroupInfo, this._isNull); + return this._P; + }, + set: function (value) { + this._P = value; + _invokeSetProperty(this, "Planner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "site", { + get: function () { + _throwIfNotLoaded("site", this._S, _typeUnifiedGroupInfo, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Site", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "subscriptionEnabled", { + get: function () { + _throwIfNotLoaded("subscriptionEnabled", this._Su, _typeUnifiedGroupInfo, this._isNull); + return this._Su; + }, + set: function (value) { + this._Su = value; + _invokeSetProperty(this, "SubscriptionEnabled", value, 0); + }, + enumerable: true, + configurable: true + }); + UnifiedGroupInfo.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"], [], []); + }; + UnifiedGroupInfo.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + UnifiedGroupInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["AmIMember"])) { + this._A = obj["AmIMember"]; + } + if (!_isUndefined(obj["AmIOwner"])) { + this._Am = obj["AmIOwner"]; + } + if (!_isUndefined(obj["AmISubscribed"])) { + this._AmI = obj["AmISubscribed"]; + } + if (!_isUndefined(obj["Classification"])) { + this._C = obj["Classification"]; + } + if (!_isUndefined(obj["Description"])) { + this._D = obj["Description"]; + } + if (!_isUndefined(obj["HasGuests"])) { + this._H = obj["HasGuests"]; + } + if (!_isUndefined(obj["IsPublic"])) { + this._I = obj["IsPublic"]; + } + if (!_isUndefined(obj["MemberCount"])) { + this._M = obj["MemberCount"]; + } + if (!_isUndefined(obj["OneDrive"])) { + this._O = obj["OneDrive"]; + } + if (!_isUndefined(obj["OneNote"])) { + this._On = obj["OneNote"]; + } + if (!_isUndefined(obj["OwnerCount"])) { + this._Ow = obj["OwnerCount"]; + } + if (!_isUndefined(obj["Planner"])) { + this._P = obj["Planner"]; + } + if (!_isUndefined(obj["Site"])) { + this._S = obj["Site"]; + } + if (!_isUndefined(obj["SubscriptionEnabled"])) { + this._Su = obj["SubscriptionEnabled"]; + } + }; + UnifiedGroupInfo.prototype.load = function (options) { + return _load(this, options); + }; + UnifiedGroupInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + UnifiedGroupInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UnifiedGroupInfo.prototype.toJSON = function () { + return _toJson(this, { + "amIMember": this._A, + "amIOwner": this._Am, + "amISubscribed": this._AmI, + "classification": this._C, + "description": this._D, + "hasGuests": this._H, + "isPublic": this._I, + "memberCount": this._M, + "oneDrive": this._O, + "oneNote": this._On, + "ownerCount": this._Ow, + "planner": this._P, + "site": this._S, + "subscriptionEnabled": this._Su + }, {}); + }; + UnifiedGroupInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + UnifiedGroupInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return UnifiedGroupInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.UnifiedGroupInfo = UnifiedGroupInfo; + var _typePersona = "Persona"; + var PersonaPromiseType; + (function (PersonaPromiseType) { + PersonaPromiseType[PersonaPromiseType["immediate"] = 0] = "immediate"; + PersonaPromiseType[PersonaPromiseType["load"] = 3] = "load"; + })(PersonaPromiseType = OfficeCore.PersonaPromiseType || (OfficeCore.PersonaPromiseType = {})); + var PersonaInfoAndSource = (function () { + function PersonaInfoAndSource() { + } + return PersonaInfoAndSource; + }()); + OfficeCore.PersonaInfoAndSource = PersonaInfoAndSource; + ; + var Persona = (function (_super) { + __extends(Persona, _super); + function Persona() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Persona.prototype, "_className", { + get: function () { + return "Persona"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyNames", { + get: function () { + return ["hostId", "type", "capabilities", "diagnosticId", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["HostId", "Type", "Capabilities", "DiagnosticId", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_navigationPropertyNames", { + get: function () { + return ["photo", "personaInfo", "unifiedCommunicationInfo", "organization", "unifiedGroupInfo", "actions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "actions", { + get: function () { + if (!this._A) { + this._A = _createPropertyObject(OfficeCore.PersonaActions, this, "Actions", false, 4); + } + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "organization", { + get: function () { + if (!this._O) { + this._O = _createPropertyObject(OfficeCore.PersonaOrganizationInfo, this, "Organization", false, 4); + } + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "personaInfo", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.PersonaInfo, this, "PersonaInfo", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "photo", { + get: function () { + if (!this._Ph) { + this._Ph = _createPropertyObject(OfficeCore.PersonaPhotoInfo, this, "Photo", false, 4); + } + return this._Ph; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedCommunicationInfo", { + get: function () { + if (!this._U) { + this._U = _createPropertyObject(OfficeCore.PersonaUnifiedCommunicationInfo, this, "UnifiedCommunicationInfo", false, 4); + } + return this._U; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedGroupInfo", { + get: function () { + if (!this._Un) { + this._Un = _createPropertyObject(OfficeCore.UnifiedGroupInfo, this, "UnifiedGroupInfo", false, 4); + } + return this._Un; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "capabilities", { + get: function () { + _throwIfNotLoaded("capabilities", this._C, _typePersona, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "diagnosticId", { + get: function () { + _throwIfNotLoaded("diagnosticId", this._D, _typePersona, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "hostId", { + get: function () { + _throwIfNotLoaded("hostId", this._H, _typePersona, this._isNull); + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersona, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typePersona, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Persona.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, [], ["unifiedGroupInfo"], [ + "actions", + "organization", + "personaInfo", + "photo", + "unifiedCommunicationInfo" + ]); + }; + Persona.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Persona.prototype.dispose = function () { + _invokeMethod(this, "Dispose", 0, [], 0, 0); + }; + Persona.prototype.getCustomizations = function () { + return _invokeMethod(this, "GetCustomizations", 1, [], 4, 0); + }; + Persona.prototype.getMembers = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembers", 1, [], false, false, null, 4); + }; + Persona.prototype.getMembership = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembership", 1, [], false, false, null, 4); + }; + Persona.prototype.getViewableSources = function () { + return _invokeMethod(this, "GetViewableSources", 1, [], 4, 0); + }; + Persona.prototype.reportTimeForRender = function (perfpoint, millisecUTC) { + _invokeMethod(this, "ReportTimeForRender", 0, [perfpoint, millisecUTC], 0, 0); + }; + Persona.prototype.warmup = function (dataToWarmUp) { + _invokeMethod(this, "Warmup", 0, [dataToWarmUp], 0, 0); + }; + Persona.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Capabilities"])) { + this._C = obj["Capabilities"]; + } + if (!_isUndefined(obj["DiagnosticId"])) { + this._D = obj["DiagnosticId"]; + } + if (!_isUndefined(obj["HostId"])) { + this._H = obj["HostId"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + if (!_isUndefined(obj["Type"])) { + this._T = obj["Type"]; + } + _handleNavigationPropertyResults(this, obj, ["actions", "Actions", "organization", "Organization", "personaInfo", "PersonaInfo", "photo", "Photo", "unifiedCommunicationInfo", "UnifiedCommunicationInfo", "unifiedGroupInfo", "UnifiedGroupInfo"]); + }; + Persona.prototype.load = function (options) { + return _load(this, options); + }; + Persona.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Persona.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Persona.prototype.toJSON = function () { + return _toJson(this, { + "capabilities": this._C, + "diagnosticId": this._D, + "hostId": this._H, + "instanceId": this._I, + "type": this._T + }, { + "organization": this._O, + "personaInfo": this._P, + "unifiedCommunicationInfo": this._U, + "unifiedGroupInfo": this._Un + }); + }; + Persona.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Persona.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Persona; + }(OfficeExtension.ClientObject)); + OfficeCore.Persona = Persona; + var PersonaCustom = (function () { + function PersonaCustom() { + } + PersonaCustom.prototype.performAsyncOperation = function (type, waitFor, action, check) { + var _this = this; + if (type == PersonaPromiseType.immediate) { + action(); + return; + } + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + } + else { + var persona = _this; + persona.load("hostId"); + persona.context.sync().then(function () { + var hostId = persona.hostId; + _this.getPersonaLifetime().then(function (personaLifetime) { + var eventHandler = function (args) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (args.sendingPersonaHostId == hostId) { + for (var index = 0; index < args.dataUpdated.length; ++index) { + var updated = args.dataUpdated[index]; + if (waitFor == updated) { + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + personaLifetime.onPersonaUpdated.remove(eventHandler); + persona.context.sync(); + } + resolve(isWarmedUp); + }); + return; + } + } + } + resolve(false); + }); + }; + personaLifetime.onPersonaUpdated.add(eventHandler); + persona.context.sync(); + }); + }); + } + }); + }; + PersonaCustom.prototype.getOrganizationAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var organization = persona.organization; + organization.load("*"); + persona.context.sync().then(function () { + resolve(organization); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var organization = persona.organization; + organization.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(organization.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.organization, action, check); + }); + }; + PersonaCustom.prototype.getIsPersonaInfoResolvedCheck = function () { + var persona = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var info = persona.personaInfo; + info.load("isPersonResolved"); + persona.context.sync().then(function () { + resolve(info.isPersonResolved); + }); + }); + }; + PersonaCustom.prototype.getPersonaInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var info = persona.personaInfo; + info.load(); + persona.context.sync().then(function () { + resolve(info); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getPersonaInfoWithSourceAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var result = new PersonaInfoAndSource(); + result.info = persona.personaInfo; + result.info.load(); + result.source = persona.personaInfo.sources; + result.source.load(); + persona.context.sync().then(function () { + resolve(result); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedCommunicationInfo = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var ucInfo = persona.unifiedCommunicationInfo; + ucInfo.load("*"); + persona.context.sync().then(function () { + resolve(ucInfo); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedGroupInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var group = persona.unifiedGroupInfo; + group.load("*"); + persona.context.sync().then(function () { + resolve(group); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getTypeAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + persona.load("type"); + persona.context.sync().then(function () { + resolve(OfficeCore.PersonaType[persona.type.valueOf()]); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getCustomizationsAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var customizations = persona.getCustomizations(); + persona.context.sync().then(function () { + resolve(customizations.value); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getMembersAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, rejcet) { + var persona = _this; + var action = function () { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + resolve(members); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(members.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.members, action, check); + }); + }; + PersonaCustom.prototype.getMembershipAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var membership = persona.getMembership(); + membership.load("*"); + persona.context.sync().then(function () { + resolve(membership); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve) { + var membership = persona.getMembership(); + membership.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(membership.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.membership, action, check); + }); + }; + PersonaCustom.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + persona.load("instanceId"); + persona.context.sync().then(function () { + var peopleApi = new PeopleApiContext(persona.context, persona.instanceId); + peopleApi.getPersonaLifetime().then(function (lifetime) { + resolve(lifetime); + }); + }); + }); + }; + return PersonaCustom; + }()); + OfficeCore.PersonaCustom = PersonaCustom; + OfficeExtension.Utility.applyMixin(Persona, PersonaCustom); + var _typePersonaLifetime = "PersonaLifetime"; + var PersonaLifetime = (function (_super) { + __extends(PersonaLifetime, _super); + function PersonaLifetime() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaLifetime.prototype, "_className", { + get: function () { + return "PersonaLifetime"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyNames", { + get: function () { + return ["instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersonaLifetime, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.getPersona = function (hostId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersona", 1, [hostId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgByEntryId = function (entryId, name, sip, smtp) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgByEntryId", 1, [entryId, name, sip, smtp], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgEntry = function (name, sip, smtp, entryId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgEntry", 1, [name, sip, smtp, entryId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPolicies = function () { + return _invokeMethod(this, "GetPolicies", 1, [], 4, 0); + }; + PersonaLifetime.prototype.getTextScaleFactor = function () { + return _invokeMethod(this, "GetTextScaleFactor", 1, [], 4, 0); + }; + PersonaLifetime.prototype._RegisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_RegisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._UnregisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_UnregisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + PersonaLifetime.prototype.load = function (options) { + return _load(this, options); + }; + PersonaLifetime.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaLifetime.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(PersonaLifetime.prototype, "onPersonaUpdated", { + get: function () { + var _this = this; + if (!this.m_personaUpdated) { + this.m_personaUpdated = new OfficeExtension.GenericEventHandlers(this.context, this, "PersonaUpdated", { + eventType: 3502, + registerFunc: function () { return _this._RegisterPersonaUpdatedEvent(); }, + unregisterFunc: function () { return _this._UnregisterPersonaUpdatedEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + dataUpdated: value.dataUpdated, + sendingPersonaHostId: value.sendingPersonaHostId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_personaUpdated; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.toJSON = function () { + return _toJson(this, { + "instanceId": this._I + }, {}); + }; + PersonaLifetime.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaLifetime.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaLifetime; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaLifetime = PersonaLifetime; + var _typeLokiTokenProvider = "LokiTokenProvider"; + var LokiTokenProvider = (function (_super) { + __extends(LokiTokenProvider, _super); + function LokiTokenProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProvider.prototype, "_className", { + get: function () { + return "LokiTokenProvider"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyNames", { + get: function () { + return ["emailOrUpn", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["EmailOrUpn", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "emailOrUpn", { + get: function () { + _throwIfNotLoaded("emailOrUpn", this._E, _typeLokiTokenProvider, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typeLokiTokenProvider, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.requestClientAccessToken = function () { + _invokeMethod(this, "RequestClientAccessToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestIdentityUniqueId = function () { + _invokeMethod(this, "RequestIdentityUniqueId", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestToken = function () { + _invokeMethod(this, "RequestToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_RegisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_UnregisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["EmailOrUpn"])) { + this._E = obj["EmailOrUpn"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + LokiTokenProvider.prototype.load = function (options) { + return _load(this, options); + }; + LokiTokenProvider.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LokiTokenProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LokiTokenProvider.prototype, "onClientAccessTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_clientAccessTokenAvailable) { + this.m_clientAccessTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "ClientAccessTokenAvailable", { + eventType: 3505, + registerFunc: function () { return _this._RegisterClientAccessTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterClientAccessTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + clientAccessToken: value.clientAccessToken, + isAvailable: value.isAvailable, + tokenTTLInSeconds: value.tokenTTLInSeconds + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_clientAccessTokenAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onIdentityUniqueIdAvailable", { + get: function () { + var _this = this; + if (!this.m_identityUniqueIdAvailable) { + this.m_identityUniqueIdAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityUniqueIdAvailable", { + eventType: 3504, + registerFunc: function () { return _this._RegisterIdentityUniqueIdAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterIdentityUniqueIdAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityUniqueIdAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onLokiTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_lokiTokenAvailable) { + this.m_lokiTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "LokiTokenAvailable", { + eventType: 3503, + registerFunc: function () { return _this._RegisterLokiTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterLokiTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + lokiAutoDiscoverUrl: value.lokiAutoDiscoverUrl, + lokiToken: value.lokiToken + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_lokiTokenAvailable; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.toJSON = function () { + return _toJson(this, { + "emailOrUpn": this._E, + "instanceId": this._I + }, {}); + }; + LokiTokenProvider.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LokiTokenProvider.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LokiTokenProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProvider = LokiTokenProvider; + var _typeLokiTokenProviderFactory = "LokiTokenProviderFactory"; + var LokiTokenProviderFactory = (function (_super) { + __extends(LokiTokenProviderFactory, _super); + function LokiTokenProviderFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProviderFactory.prototype, "_className", { + get: function () { + return "LokiTokenProviderFactory"; + }, + enumerable: true, + configurable: true + }); + LokiTokenProviderFactory.prototype.getLokiTokenProvider = function (accountName) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [accountName], false, false, null, 4); + }; + LokiTokenProviderFactory.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LokiTokenProviderFactory.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LokiTokenProviderFactory.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LokiTokenProviderFactory, context, "Microsoft.People.LokiTokenProviderFactory", false, 4); + }; + LokiTokenProviderFactory.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LokiTokenProviderFactory; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProviderFactory = LokiTokenProviderFactory; + var _typeServiceContext = "ServiceContext"; + var PeopleApiContext = (function () { + function PeopleApiContext(context, instanceId) { + this.context = context; + this.instanceId = instanceId; + } + Object.defineProperty(PeopleApiContext.prototype, "serviceContext", { + get: function () { + if (!this.m_serviceConext) { + this.m_serviceConext = OfficeCore.ServiceContext.newObject(this.context); + } + return this.m_serviceConext; + }, + enumerable: true, + configurable: true + }); + PeopleApiContext.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var lifetime = _this.serviceContext.getPersonaLifetime(_this.instanceId); + _this.context.sync().then(function () { + lifetime.load("instanceId"); + _this.context.sync().then(function () { + resolve(lifetime); + }); + }); + }); + }; + PeopleApiContext.prototype.getInitialPersona = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this.serviceContext.getInitialPersona(_this.instanceId); + _this.context.sync().then(function () { + resolve(persona); + }); + }); + }; + PeopleApiContext.prototype.getLokiTokenProvider = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var provider = _this.serviceContext.getLokiTokenProvider(_this.instanceId); + _this.context.sync().then(function () { + provider.load("instanceId"); + _this.context.sync().then(function () { + resolve(provider); + }); + }); + }); + }; + return PeopleApiContext; + }()); + OfficeCore.PeopleApiContext = PeopleApiContext; + var ServiceContext = (function (_super) { + __extends(ServiceContext, _super); + function ServiceContext() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceContext.prototype, "_className", { + get: function () { + return "ServiceContext"; + }, + enumerable: true, + configurable: true + }); + ServiceContext.prototype.accountEmailOrUpn = function (instanceId) { + return _invokeMethod(this, "AccountEmailOrUpn", 1, [instanceId], 4, 0); + }; + ServiceContext.prototype.dispose = function (instance) { + _invokeMethod(this, "Dispose", 0, [instance], 0, 0); + }; + ServiceContext.prototype.getInitialPersona = function (instanceId) { + return _createMethodObject(OfficeCore.Persona, this, "GetInitialPersona", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getLokiTokenProvider = function (instanceId) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaLifetime = function (instanceId) { + return _createMethodObject(OfficeCore.PersonaLifetime, this, "GetPersonaLifetime", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaPolicies = function () { + return _invokeMethod(this, "GetPersonaPolicies", 1, [], 4, 0); + }; + ServiceContext.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceContext.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceContext.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceContext, context, "Microsoft.People.ServiceContext", false, 4); + }; + ServiceContext.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceContext; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceContext = ServiceContext; + var _typeRichapiPcxFeatureChecks = "RichapiPcxFeatureChecks"; + var RichapiPcxFeatureChecks = (function (_super) { + __extends(RichapiPcxFeatureChecks, _super); + function RichapiPcxFeatureChecks() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RichapiPcxFeatureChecks.prototype, "_className", { + get: function () { + return "RichapiPcxFeatureChecks"; + }, + enumerable: true, + configurable: true + }); + RichapiPcxFeatureChecks.prototype.isAddChangePhotoLinkOnLpcPersonaImageFlightEnabled = function () { + return _invokeMethod(this, "IsAddChangePhotoLinkOnLpcPersonaImageFlightEnabled", 1, [], 4, 0); + }; + RichapiPcxFeatureChecks.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RichapiPcxFeatureChecks.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RichapiPcxFeatureChecks.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.RichapiPcxFeatureChecks, context, "Microsoft.People.RichapiPcxFeatureChecks", false, 4); + }; + RichapiPcxFeatureChecks.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RichapiPcxFeatureChecks; + }(OfficeExtension.ClientObject)); + OfficeCore.RichapiPcxFeatureChecks = RichapiPcxFeatureChecks; + var _typeTap = "Tap"; + var Tap = (function (_super) { + __extends(Tap, _super); + function Tap() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Tap.prototype, "_className", { + get: function () { + return "Tap"; + }, + enumerable: true, + configurable: true + }); + Tap.prototype.getEnterpriseUserInfo = function () { + return _invokeMethod(this, "GetEnterpriseUserInfo", 1, [], 4 | 1, 0); + }; + Tap.prototype.getMruFriendlyPath = function (documentUrl) { + return _invokeMethod(this, "GetMruFriendlyPath", 1, [documentUrl], 4 | 1, 0); + }; + Tap.prototype.launchFileUrlInOfficeApp = function (documentUrl, useUniversalAsBackup) { + return _invokeMethod(this, "LaunchFileUrlInOfficeApp", 1, [documentUrl, useUniversalAsBackup], 4 | 1, 0); + }; + Tap.prototype.performLocalSearch = function (query, numResultsRequested, supportedFileExtensions, documentUrlToExclude) { + return _invokeMethod(this, "PerformLocalSearch", 1, [query, numResultsRequested, supportedFileExtensions, documentUrlToExclude], 4 | 1, 0); + }; + Tap.prototype.readSearchCache = function (keyword, expiredHours, filterObjectType) { + return _invokeMethod(this, "ReadSearchCache", 1, [keyword, expiredHours, filterObjectType], 4 | 1, 0); + }; + Tap.prototype.writeSearchCache = function (fileContent, keyword, filterObjectType) { + return _invokeMethod(this, "WriteSearchCache", 1, [fileContent, keyword, filterObjectType], 4 | 1, 0); + }; + Tap.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Tap.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Tap.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Tap, context, "Microsoft.TapRichApi.Tap", false, 4); + }; + Tap.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Tap; + }(OfficeExtension.ClientObject)); + OfficeCore.Tap = Tap; + var ObjectType; + (function (ObjectType) { + ObjectType["unknown"] = "Unknown"; + ObjectType["chart"] = "Chart"; + ObjectType["smartArt"] = "SmartArt"; + ObjectType["table"] = "Table"; + ObjectType["image"] = "Image"; + ObjectType["slide"] = "Slide"; + ObjectType["ole"] = "OLE"; + ObjectType["text"] = "Text"; + })(ObjectType = OfficeCore.ObjectType || (OfficeCore.ObjectType = {})); + var _typeThemeService = "ThemeService"; + var ThemeService = (function (_super) { + __extends(ThemeService, _super); + function ThemeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ThemeService.prototype, "_className", { + get: function () { + return "ThemeService"; + }, + enumerable: true, + configurable: true + }); + ThemeService.prototype.registerOfficeThemeChangedEvent = function () { + _invokeMethod(this, "RegisterOfficeThemeChangedEvent", 0, [], 0, 0); + }; + ThemeService.prototype.unregisterOfficeThemeChangedEvent = function () { + _invokeMethod(this, "UnregisterOfficeThemeChangedEvent", 0, [], 0, 0); + }; + ThemeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ThemeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ThemeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ThemeService, context, "Microsoft.Theme.ThemeService", false, 4); + }; + Object.defineProperty(ThemeService.prototype, "onOfficeThemeChanged", { + get: function () { + var _this = this; + if (!this.m_officeThemeChanged) { + this.m_officeThemeChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "OfficeThemeChanged", { + eventType: 65548, + registerFunc: function () { return _this.registerOfficeThemeChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterOfficeThemeChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.ThemeService_OfficeThemeChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_officeThemeChanged; + }, + enumerable: true, + configurable: true + }); + ThemeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ThemeService; + }(OfficeExtension.ClientObject)); + OfficeCore.ThemeService = ThemeService; + (function (_CC) { + function ThemeService_OfficeThemeChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + bodyBackgroundColor: args.bodyBackgroundColor, + bodyForegroundColor: args.bodyForegroundColor, + controlBackgroundColor: args.controlBackgroundColor, + controlForegroundColor: args.controlForegroundColor + }; + return newArgs; + } + _CC.ThemeService_OfficeThemeChanged_EventArgsTransform = ThemeService_OfficeThemeChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeAppRuntimePersistenceService = "AppRuntimePersistenceService"; + var AppRuntimePersistenceService = (function (_super) { + __extends(AppRuntimePersistenceService, _super); + function AppRuntimePersistenceService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimePersistenceService.prototype, "_className", { + get: function () { + return "AppRuntimePersistenceService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimePersistenceService.prototype.getAppRuntimeStartState = function () { + return _invokeMethod(this, "GetAppRuntimeStartState", 1, [], 4, 0); + }; + AppRuntimePersistenceService.prototype.setAppRuntimeStartState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeStartState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimePersistenceService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimePersistenceService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimePersistenceService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimePersistenceService, context, "Microsoft.AppRuntime.AppRuntimePersistenceService", false, 4); + }; + AppRuntimePersistenceService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimePersistenceService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimePersistenceService = AppRuntimePersistenceService; + var _typeAppRuntimeService = "AppRuntimeService"; + var AppRuntimeService = (function (_super) { + __extends(AppRuntimeService, _super); + function AppRuntimeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimeService.prototype, "_className", { + get: function () { + return "AppRuntimeService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.getAppRuntimeState = function () { + return _invokeMethod(this, "GetAppRuntimeState", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getContentSnapshotAsBase64 = function () { + _throwIfApiNotSupported("AppRuntimeService.getContentSnapshotAsBase64", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetContentSnapshotAsBase64", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getSnapshotEnabled = function () { + _throwIfApiNotSupported("AppRuntimeService.getSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetSnapshotEnabled", 1, [], 4, 0); + }; + AppRuntimeService.prototype.setAppRuntimeState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimeService.prototype.setSnapshotEnabled = function (enabled) { + _throwIfApiNotSupported("AppRuntimeService.setSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + _invokeMethod(this, "SetSnapshotEnabled", 1, [enabled], 4, 0); + }; + AppRuntimeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimeService, context, "Microsoft.AppRuntime.AppRuntimeService", false, 4); + }; + Object.defineProperty(AppRuntimeService.prototype, "onSnapshotImageReady", { + get: function () { + _throwIfApiNotSupported("AppRuntimeService.onSnapshotImageReady", "SnapshotControl", "1.1", _hostName); + if (!this.m_snapshotImageReady) { + this.m_snapshotImageReady = new OfficeExtension.GenericEventHandlers(this.context, this, "SnapshotImageReady", { + eventType: 65547, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + imageBase64: value.imageBase64 + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_snapshotImageReady; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppRuntimeService.prototype, "onVisibilityChanged", { + get: function () { + if (!this.m_visibilityChanged) { + this.m_visibilityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "VisibilityChanged", { + eventType: 65539, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + visibility: value.visibility + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_visibilityChanged; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimeService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimeService = AppRuntimeService; + var AppRuntimeState; + (function (AppRuntimeState) { + AppRuntimeState["inactive"] = "Inactive"; + AppRuntimeState["background"] = "Background"; + AppRuntimeState["visible"] = "Visible"; + })(AppRuntimeState = OfficeCore.AppRuntimeState || (OfficeCore.AppRuntimeState = {})); + var Visibility; + (function (Visibility) { + Visibility["hidden"] = "Hidden"; + Visibility["visible"] = "Visible"; + })(Visibility = OfficeCore.Visibility || (OfficeCore.Visibility = {})); + var LicenseFeatureTier; + (function (LicenseFeatureTier) { + LicenseFeatureTier["unknown"] = "Unknown"; + LicenseFeatureTier["basic"] = "Basic"; + LicenseFeatureTier["premium"] = "Premium"; + })(LicenseFeatureTier = OfficeCore.LicenseFeatureTier || (OfficeCore.LicenseFeatureTier = {})); + var _typeLicense = "License"; + var License = (function (_super) { + __extends(License, _super); + function License() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(License.prototype, "_className", { + get: function () { + return "License"; + }, + enumerable: true, + configurable: true + }); + License.prototype.getFeatureTier = function (feature, fallbackValue) { + return _invokeMethod(this, "GetFeatureTier", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.getLicenseFeature = function (feature) { + return _createMethodObject(OfficeCore.LicenseFeature, this, "GetLicenseFeature", 1, [feature], false, false, null, 4); + }; + License.prototype.getMsaDeviceTicket = function (resource, policy, options) { + return _invokeMethod(this, "GetMsaDeviceTicket", 1, [resource, policy, options], 4 | 1, 0); + }; + License.prototype.isFeatureEnabled = function (feature, fallbackValue) { + return _invokeMethod(this, "IsFeatureEnabled", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.isFreemiumUpsellEnabled = function () { + return _invokeMethod(this, "IsFreemiumUpsellEnabled", 1, [], 4, 0); + }; + License.prototype.launchUpsellExperience = function (experienceId) { + _invokeMethod(this, "LaunchUpsellExperience", 1, [experienceId], 4, 0); + }; + License.prototype._TestFireStateChangedEvent = function (feature) { + _invokeMethod(this, "_TestFireStateChangedEvent", 0, [feature], 1, 0); + }; + License.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + License.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + License.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.License, context, "Microsoft.Office.Licensing.License", false, 4); + }; + License.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return License; + }(OfficeExtension.ClientObject)); + OfficeCore.License = License; + var _typeLicenseFeature = "LicenseFeature"; + var LicenseFeature = (function (_super) { + __extends(LicenseFeature, _super); + function LicenseFeature() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LicenseFeature.prototype, "_className", { + get: function () { + return "LicenseFeature"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeLicenseFeature, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype._RegisterStateChange = function () { + _invokeMethod(this, "_RegisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._UnregisterStateChange = function () { + _invokeMethod(this, "_UnregisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + LicenseFeature.prototype.load = function (options) { + return _load(this, options); + }; + LicenseFeature.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LicenseFeature.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + LicenseFeature.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LicenseFeature.prototype, "onStateChanged", { + get: function () { + var _this = this; + if (!this.m_stateChanged) { + this.m_stateChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "StateChanged", { + eventType: 1, + registerFunc: function () { return _this._RegisterStateChange(); }, + unregisterFunc: function () { return _this._UnregisterStateChange(); }, + getTargetIdFunc: function () { return _this.id; }, + eventArgsTransformFunc: function (value) { + var event = _CC.LicenseFeature_StateChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_stateChanged; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + LicenseFeature.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LicenseFeature.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LicenseFeature; + }(OfficeExtension.ClientObject)); + OfficeCore.LicenseFeature = LicenseFeature; + (function (_CC) { + function LicenseFeature_StateChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + feature: args.featureName, + isEnabled: args.isEnabled, + tier: args.tierName + }; + if (args.tierName) { + newArgs.tier = args.tierName == 0 ? LicenseFeatureTier.unknown : + args.tierName == 1 ? LicenseFeatureTier.basic : + args.tierName == 2 ? LicenseFeatureTier.premium : + args.tierName; + } + return newArgs; + } + _CC.LicenseFeature_StateChanged_EventArgsTransform = LicenseFeature_StateChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeMsaDeviceTicketOptions = "MsaDeviceTicketOptions"; + var MsaDeviceTicketOptions = (function (_super) { + __extends(MsaDeviceTicketOptions, _super); + function MsaDeviceTicketOptions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_className", { + get: function () { + return "MsaDeviceTicketOptions"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyNames", { + get: function () { + return ["scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "scopes", { + get: function () { + _throwIfNotLoaded("scopes", this._S, _typeMsaDeviceTicketOptions, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Scopes", value, 0); + }, + enumerable: true, + configurable: true + }); + MsaDeviceTicketOptions.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["scopes"], [], []); + }; + MsaDeviceTicketOptions.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + MsaDeviceTicketOptions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Scopes"])) { + this._S = obj["Scopes"]; + } + }; + MsaDeviceTicketOptions.prototype.load = function (options) { + return _load(this, options); + }; + MsaDeviceTicketOptions.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MsaDeviceTicketOptions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MsaDeviceTicketOptions.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.MsaDeviceTicketOptions, context, "Microsoft.Office.Licensing.MsaDeviceTicketOptions", false, 4); + }; + MsaDeviceTicketOptions.prototype.toJSON = function () { + return _toJson(this, { + "scopes": this._S + }, {}); + }; + MsaDeviceTicketOptions.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MsaDeviceTicketOptions.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MsaDeviceTicketOptions; + }(OfficeExtension.ClientObject)); + OfficeCore.MsaDeviceTicketOptions = MsaDeviceTicketOptions; + var _typeDialogPage = "DialogPage"; + var DialogPage = (function (_super) { + __extends(DialogPage, _super); + function DialogPage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DialogPage.prototype, "_className", { + get: function () { + return "DialogPage"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_Id", { + get: function () { + _throwIfNotLoaded("_Id", this.__I, _typeDialogPage, this._isNull); + return this.__I; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4, 0); + }; + DialogPage.prototype.readyToShow = function () { + _invokeMethod(this, "ReadyToShow", 1, [], 4, 0); + }; + DialogPage.prototype.registerOnShow = function () { + _invokeMethod(this, "RegisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype.sendMessageToHost = function (message) { + _invokeMethod(this, "SendMessageToHost", 1, [message], 4, 0); + }; + DialogPage.prototype.unregisterOnShow = function () { + _invokeMethod(this, "UnregisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["_Id"])) { + this.__I = obj["_Id"]; + } + }; + DialogPage.prototype.load = function (options) { + return _load(this, options); + }; + DialogPage.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_Id"])) { + this.__I = value["_Id"]; + } + }; + DialogPage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DialogPage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DialogPage, context, "Microsoft.Office.DialogPage.DialogPage", false, 4); + }; + Object.defineProperty(DialogPage.prototype, "onOnShowEvent", { + get: function () { + var _this = this; + if (!this.m_onShowEvent) { + this.m_onShowEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "OnShowEvent", { + eventType: 1, + registerFunc: function () { return _this.registerOnShow(); }, + unregisterFunc: function () { return _this.unregisterOnShow(); }, + getTargetIdFunc: function () { return _this._Id; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_onShowEvent; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return DialogPage; + }(OfficeExtension.ClientObject)); + OfficeCore.DialogPage = DialogPage; + var _typeSharedFilePicker = "SharedFilePicker"; + var SharedFilePicker = (function (_super) { + __extends(SharedFilePicker, _super); + function SharedFilePicker() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(SharedFilePicker.prototype, "_className", { + get: function () { + return "SharedFilePicker"; + }, + enumerable: true, + configurable: true + }); + SharedFilePicker.prototype.getSharedFilePickerResponse = function (pickerCustomizationJsonString) { + return _invokeMethod(this, "GetSharedFilePickerResponse", 1, [pickerCustomizationJsonString], 4, 0); + }; + SharedFilePicker.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + SharedFilePicker.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + SharedFilePicker.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.SharedFilePicker, context, "Microsoft.Office.SharedFilePicker", false, 4); + }; + SharedFilePicker.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return SharedFilePicker; + }(OfficeExtension.ClientObject)); + OfficeCore.SharedFilePicker = SharedFilePicker; + var _typeActionService = "ActionService"; + var ActionService = (function (_super) { + __extends(ActionService, _super); + function ActionService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ActionService.prototype, "_className", { + get: function () { + return "ActionService"; + }, + enumerable: true, + configurable: true + }); + ActionService.prototype.areShortcutsInUse = function (shortcuts) { + return _invokeMethod(this, "AreShortcutsInUse", 0, [shortcuts], 0, 0); + }; + ActionService.prototype.getShortcuts = function () { + return _invokeMethod(this, "GetShortcuts", 1, [], 4, 0); + }; + ActionService.prototype.replaceShortcuts = function (shortcuts) { + _invokeMethod(this, "ReplaceShortcuts", 0, [shortcuts], 0, 0); + }; + ActionService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ActionService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ActionService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ActionService, context, "Microsoft.Office.ActionService", false, 4); + }; + ActionService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ActionService; + }(OfficeExtension.ClientObject)); + OfficeCore.ActionService = ActionService; + var _typeAuth = "Auth"; + var Auth = (function (_super) { + __extends(Auth, _super); + function Auth() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Auth.prototype, "_className", { + get: function () { + return "Auth"; + }, + enumerable: true, + configurable: true + }); + Auth.prototype.getAccessTokenFirstPartyOAuth = function (appName, target) { + return _invokeMethod(this, "GetAccessTokenFirstPartyOAuth", 1, [appName, target], 4 | 1, 0); + }; + Auth.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Auth.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Auth.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Auth, context, "Microsoft.Office.Auth", false, 1 | 4); + }; + Auth.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Auth; + }(OfficeExtension.ClientObject)); + OfficeCore.Auth = Auth; + var _typeAugLoopEventService = "AugLoopEventService"; + var AugLoopEventService = (function (_super) { + __extends(AugLoopEventService, _super); + function AugLoopEventService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AugLoopEventService.prototype, "_className", { + get: function () { + return "AugLoopEventService"; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.sendMessage = function (data) { + _invokeMethod(this, "SendMessage", 1, [data], 4 | 1, 0); + }; + AugLoopEventService.prototype._RegisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_RegisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._UnregisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_UnregisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AugLoopEventService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AugLoopEventService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AugLoopEventService, context, "Microsoft.Office.AugLoopEventService", false, 1 | 4); + }; + Object.defineProperty(AugLoopEventService.prototype, "onHostMessageReceived", { + get: function () { + var _this = this; + if (!this.m_hostMessageReceived) { + this.m_hostMessageReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "HostMessageReceived", { + eventType: 65542, + registerFunc: function () { return _this._RegisterHostMessageReceivedEvent(); }, + unregisterFunc: function () { return _this._UnregisterHostMessageReceivedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + data: value.data + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostMessageReceived; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AugLoopEventService; + }(OfficeExtension.ClientObject)); + OfficeCore.AugLoopEventService = AugLoopEventService; + var _typeUndoService = "UndoService"; + var UndoService = (function (_super) { + __extends(UndoService, _super); + function UndoService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UndoService.prototype, "_className", { + get: function () { + return "UndoService"; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.endCopilotOperation = function (batchId) { + _invokeMethod(this, "EndCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.startCopilotOperation = function (batchId) { + return _invokeMethod(this, "StartCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.undo = function () { + return _invokeMethod(this, "Undo", 0, [], 1, 0); + }; + UndoService.prototype._RegisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_RegisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._UnregisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_UnregisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UndoService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UndoService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UndoService, context, "Microsoft.Office.UndoService", false, 1 | 4); + }; + Object.defineProperty(UndoService.prototype, "onCopilotOperationStarted", { + get: function () { + if (!this.m_copilotOperationStarted) { + this.m_copilotOperationStarted = new OfficeExtension.GenericEventHandlers(this.context, this, "CopilotOperationStarted", { + eventType: 65544, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + batchId: value.batchId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_copilotOperationStarted; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UndoService.prototype, "onUndoStackChanged", { + get: function () { + var _this = this; + if (!this.m_undoStackChanged) { + this.m_undoStackChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "UndoStackChanged", { + eventType: 65543, + registerFunc: function () { return _this._RegisterUndoStackChangedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUndoStackChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_undoStackChanged; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UndoService; + }(OfficeExtension.ClientObject)); + OfficeCore.UndoService = UndoService; + var TriStateOption; + (function (TriStateOption) { + TriStateOption["notSet"] = "NotSet"; + TriStateOption["true"] = "True"; + TriStateOption["false"] = "False"; + })(TriStateOption = OfficeCore.TriStateOption || (OfficeCore.TriStateOption = {})); + var UserFeedbackType; + (function (UserFeedbackType) { + UserFeedbackType["like"] = "Like"; + UserFeedbackType["dislike"] = "Dislike"; + UserFeedbackType["idea"] = "Idea"; + UserFeedbackType["unclassified"] = "Unclassified"; + })(UserFeedbackType = OfficeCore.UserFeedbackType || (OfficeCore.UserFeedbackType = {})); + var UserFeedbackUIType; + (function (UserFeedbackUIType) { + UserFeedbackUIType["modalDialog"] = "ModalDialog"; + UserFeedbackUIType["taskpane"] = "Taskpane"; + })(UserFeedbackUIType = OfficeCore.UserFeedbackUIType || (OfficeCore.UserFeedbackUIType = {})); + var _typeUserFeedbackService = "UserFeedbackService"; + var UserFeedbackService = (function (_super) { + __extends(UserFeedbackService, _super); + function UserFeedbackService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UserFeedbackService.prototype, "_className", { + get: function () { + return "UserFeedbackService"; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.collectUserFeedback = function (feedbacktype, UIType, featureArea, options) { + _invokeMethod(this, "CollectUserFeedback", 1, [feedbacktype, UIType, featureArea, options], 4 | 1, 0); + }; + UserFeedbackService.prototype._RegisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_RegisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._UnregisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_UnregisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UserFeedbackService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UserFeedbackService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UserFeedbackService, context, "Microsoft.Office.UserFeedbackService", false, 1 | 4); + }; + Object.defineProperty(UserFeedbackService.prototype, "onUserFeedbackUIDismissed", { + get: function () { + var _this = this; + if (!this.m_userFeedbackUIDismissed) { + this.m_userFeedbackUIDismissed = new OfficeExtension.GenericEventHandlers(this.context, this, "UserFeedbackUIDismissed", { + eventType: 65546, + registerFunc: function () { return _this._RegisterUserFeedbackUIDismissedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUserFeedbackUIDismissedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + isFeedbackSent: value.isFeedbackSent + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_userFeedbackUIDismissed; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UserFeedbackService; + }(OfficeExtension.ClientObject)); + OfficeCore.UserFeedbackService = UserFeedbackService; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["apiNotAvailable"] = "ApiNotAvailable"; + ErrorCodes["clientError"] = "ClientError"; + ErrorCodes["controlIdNotFound"] = "ControlIdNotFound"; + ErrorCodes["entryIdRequired"] = "EntryIdRequired"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["hostRestartNeeded"] = "HostRestartNeeded"; + ErrorCodes["instanceNotFound"] = "InstanceNotFound"; + ErrorCodes["interactiveFlowAborted"] = "InteractiveFlowAborted"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidGrant"] = "InvalidGrant"; + ErrorCodes["invalidResourceUrl"] = "InvalidResourceUrl"; + ErrorCodes["invalidRibbonDefinition"] = "InvalidRibbonDefinition"; + ErrorCodes["objectNotFound"] = "ObjectNotFound"; + ErrorCodes["resourceNotSupported"] = "ResourceNotSupported"; + ErrorCodes["serverError"] = "ServerError"; + ErrorCodes["serviceUrlNotFound"] = "ServiceUrlNotFound"; + ErrorCodes["sharedRuntimeNotAvailable"] = "SharedRuntimeNotAvailable"; + ErrorCodes["ticketInvalidParams"] = "TicketInvalidParams"; + ErrorCodes["ticketNetworkError"] = "TicketNetworkError"; + ErrorCodes["ticketUnauthorized"] = "TicketUnauthorized"; + ErrorCodes["ticketUninitialized"] = "TicketUninitialized"; + ErrorCodes["ticketUnknownError"] = "TicketUnknownError"; + ErrorCodes["unexpectedError"] = "UnexpectedError"; + ErrorCodes["unsupportedUserIdentity"] = "UnsupportedUserIdentity"; + ErrorCodes["userNotSignedIn"] = "UserNotSignedIn"; + })(ErrorCodes = OfficeCore.ErrorCodes || (OfficeCore.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = OfficeCore.Interfaces || (OfficeCore.Interfaces = {})); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var VisibilityMode; + (function (VisibilityMode) { + VisibilityMode["hidden"] = "Hidden"; + VisibilityMode["taskpane"] = "Taskpane"; + })(VisibilityMode = Office.VisibilityMode || (Office.VisibilityMode = {})); + var StartupBehavior; + (function (StartupBehavior) { + StartupBehavior["none"] = "None"; + StartupBehavior["load"] = "Load"; + })(StartupBehavior = Office.StartupBehavior || (Office.StartupBehavior = {})); + var addin; + (function (addin) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function setStartupBehavior(behavior) { + return __awaiter(this, void 0, void 0, function () { + var state, context, appRuntimePersistenceService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (behavior !== StartupBehavior.load && behavior !== StartupBehavior.none) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.invalidArgument, null, null); + } + state = (behavior == StartupBehavior.load ? OfficeCore.AppRuntimeState.background : OfficeCore.AppRuntimeState.inactive); + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + appRuntimePersistenceService.setAppRuntimeStartState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + addin.setStartupBehavior = setStartupBehavior; + function getStartupBehavior() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimePersistenceService, stateResult, state, ret; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + stateResult = appRuntimePersistenceService.getAppRuntimeStartState(); + return [4, context.sync()]; + case 1: + _a.sent(); + state = stateResult.value; + ret = (state == OfficeCore.AppRuntimeState.inactive ? StartupBehavior.none : StartupBehavior.load); + return [2, ret]; + } + }); + }); + } + addin.getStartupBehavior = getStartupBehavior; + function setSnapshotEnabled(enabled) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setSnapshotEnabled(enabled); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, Promise.resolve()]; + } + }); + }); + } + addin.setSnapshotEnabled = setSnapshotEnabled; + function getSnapshotEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + result = appRuntimeService.getSnapshotEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + addin.getSnapshotEnabled = getSnapshotEnabled; + function getContentSnapshotAsBase64() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2, new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var context = _createRequestContext(true); + var appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + var timeoutId = setTimeout(function () { + handler.remove(); + context.sync()["catch"](function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "timeout", "getContentSnapshotAsBase64")); + }, 7000); + var handler = appRuntimeService.onSnapshotImageReady.add(function (arg) { + clearTimeout(timeoutId); + handler.remove(); + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + context.sync()["catch"](function () { }); + resolve(arg.imageBase64); + } + else { + context.sync()["catch"](function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "execution failed", "getContentSnapshotAsBase64")); + } + return null; + }); + context.sync().then(function () { + var apiResult = appRuntimeService.getContentSnapshotAsBase64(); + return context.sync().then(function () { return null; }); + })["catch"](function (e) { reject(e); }); + })]; + }); + }); + } + addin.getContentSnapshotAsBase64 = getContentSnapshotAsBase64; + function _setState(state) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setAppRuntimeState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + function _getState() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, stateResult; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + stateResult = appRuntimeService.getAppRuntimeState(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, stateResult.value]; + } + }); + }); + } + addin._getState = _getState; + function showAsTaskpane() { + return _setState(OfficeCore.AppRuntimeState.visible); + } + addin.showAsTaskpane = showAsTaskpane; + function hide() { + return _setState(OfficeCore.AppRuntimeState.background); + } + addin.hide = hide; + var _appRuntimeEvent; + function _getAppRuntimeEventService() { + if (!_appRuntimeEvent) { + var context = _createRequestContext(true); + _appRuntimeEvent = OfficeCore.AppRuntimeService.newObject(context); + } + return _appRuntimeEvent; + } + function _convertVisibilityToVisibilityMode(visibility) { + if (visibility === OfficeCore.Visibility.visible) { + return VisibilityMode.taskpane; + } + return VisibilityMode.hidden; + } + function onVisibilityModeChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var eventService, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + eventService = _getAppRuntimeEventService(); + registrationToken = eventService.onVisibilityChanged.add(function (args) { + if (listener) { + var msg = { + visibilityMode: _convertVisibilityToVisibilityMode(args.visibility) + }; + listener(msg); + } + return null; + }); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + addin.onVisibilityModeChanged = onVisibilityModeChanged; + var beforeDocumentCloseNotification; + (function (beforeDocumentCloseNotification) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function enable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.enable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.enable = enable; + function disable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.disable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.disable = disable; + function onCloseActionCancelled(listener) { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + registrationToken = beforeCloseNotification.onBeforeCloseNotificationCancelled.add(function (args) { + if (listener) { + listener(); + } + return null; + }); + return [4, context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + beforeDocumentCloseNotification.onCloseActionCancelled = onCloseActionCancelled; + })(beforeDocumentCloseNotification = addin.beforeDocumentCloseNotification || (addin.beforeDocumentCloseNotification = {})); + })(addin = Office.addin || (Office.addin = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ExtensionComponentType; + (function (ExtensionComponentType) { + ExtensionComponentType["taskpane"] = "Taskpane"; + })(ExtensionComponentType || (ExtensionComponentType = {})); + var extensionLifeCycle; + (function (extensionLifeCycle) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + return context; + } + function launchTaskpane(launchOptions) { + return __awaiter(this, void 0, void 0, function () { + var context, extensionLifecycle, settings; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + extensionLifecycle = OfficeCore.ExtensionLifeCycle.newObject(context); + settings = launchOptions.settings; + if (settings != undefined) { + launchOptions.settings = OSF.OUtil.serializeSettings(settings); + } + extensionLifecycle.launchExtensionComponent("", ExtensionComponentType.taskpane, launchOptions); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + extensionLifeCycle.launchTaskpane = launchTaskpane; + })(extensionLifeCycle = Office.extensionLifeCycle || (Office.extensionLifeCycle = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ribbon; + (function (ribbon_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function requestUpdate(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + function processControls(parent) { + if (parent.controls !== undefined + && parent.controls.length !== undefined + && !!parent.controls.length) { + parent.controls + .filter(function (control) { return !(!control.id); }) + .forEach(function (control) { + var ribbonControl = ribbon.getButton(control.id); + if (control.enabled !== undefined && control.enabled !== null) { + ribbonControl.enabled = control.enabled; + } + }); + } + } + input.tabs + .filter(function (tab) { return !(!tab.id); }) + .forEach(function (tab) { + var ribbonTab = ribbon.getTab(tab.id); + if (tab.visible !== undefined && tab.visible !== null) { + ribbonTab.setVisibility(tab.visible); + } + if (!!tab.groups && !!tab.groups.length) { + tab.groups + .filter(function (group) { return !(!group.id); }) + .forEach(function (group) { + processControls(group); + }); + } + else { + processControls(tab); + } + }); + return requestContext.sync(); + } + ribbon_1.requestUpdate = requestUpdate; + function requestCreateControls(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + var delay = function (milliseconds) { + return new Promise(function (resolve, _) { return setTimeout(function () { return resolve(); }, milliseconds); }); + }; + ribbon.executeRequestCreate(JSON.stringify(input)); + return delay(250) + .then(function () { return requestContext.sync(); }); + } + ribbon_1.requestCreateControls = requestCreateControls; + })(ribbon = Office.ribbon || (Office.ribbon = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var AddinInternalServiceErrorCodes; + (function (AddinInternalServiceErrorCodes) { + AddinInternalServiceErrorCodes["generalException"] = "GeneralException"; + })(AddinInternalServiceErrorCodes || (AddinInternalServiceErrorCodes = {})); + var _libraryMetadataInternalServiceApi = { "version": "1.0.0", + "name": "OfficeCore", + "defaultApiSetName": "OfficeSharedApi", + "hostName": "Office", + "apiSets": [], + "strings": ["AddinInternalService"], + "enumTypes": [], + "clientObjectTypes": [[1, + 0, + 0, + 0, + [["notifyActionHandlerReady", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + 0, + "Microsoft.InternalService.AddinInternalService", + 4]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataInternalServiceApi, targetNamespaceObject: OfficeCore }); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var actionProxy; + (function (actionProxy) { + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _association; + var ActionMessageCategory = 2; + var ActionDispatchMessageType = 1000; + function init() { + if (typeof (OSF) !== "undefined" && OSF.DDA && OSF.DDA.RichApi && OSF.DDA.RichApi.richApiMessageManager) { + var context = new OfficeExtension.ClientRequestContext(); + return context.eventRegistration.register(5, "", _handleMessage); + } + } + function setActionAssociation(association) { + _association = association; + } + function _getFunction(functionName) { + if (functionName) { + var nameUpperCase = functionName.toUpperCase(); + var call = _association.mappings[nameUpperCase]; + if (!_isNullOrUndefined(call) && typeof (call) === "function") { + return call; + } + } + throw OfficeExtension.Utility.createRuntimeError("invalidOperation", "sourceData", "ActionProxy._getFunction"); + } + function _handleMessage(args) { + try { + OfficeExtension.Utility.log('ActionProxy._handleMessage'); + OfficeExtension.Utility.checkArgumentNull(args, "args"); + var entryArray = args.entries; + var invocationArray = []; + for (var i = 0; i < entryArray.length; i++) { + if (entryArray[i].messageCategory !== ActionMessageCategory) { + continue; + } + if (typeof (entryArray[i].message) === 'string') { + entryArray[i].message = JSON.parse(entryArray[i].message); + } + if (entryArray[i].messageType === ActionDispatchMessageType) { + var actionsArgs = null; + var actionName = entryArray[i].message[0]; + var call = _getFunction(actionName); + if (entryArray[i].message.length >= 2) { + var actionArgsJson = entryArray[i].message[1]; + if (actionArgsJson) { + if (_isJsonObjectString(actionArgsJson)) { + actionsArgs = JSON.parse(actionArgsJson); + } + else { + actionsArgs = actionArgsJson; + } + } + } + if (typeof (OSF) !== 'undefined' && + OSF.AppTelemetry && + OSF.AppTelemetry.CallOnAppActivatedIfPending) { + OSF.AppTelemetry.CallOnAppActivatedIfPending(); + } + call.apply(null, [actionsArgs]); + } + else { + OfficeExtension.Utility.log('ActionProxy._handleMessage unknown message type ' + entryArray[i].messageType); + } + } + } + catch (ex) { + _tryLog(ex); + throw ex; + } + return OfficeExtension.Utility._createPromiseFromResult(null); + } + function _isJsonObjectString(value) { + if (typeof value === 'string' && value[0] === '{') { + return true; + } + return false; + } + function toLogMessage(ex) { + var ret = 'Unknown Error'; + if (ex) { + try { + if (ex.toString) { + ret = ex.toString(); + } + ret = ret + ' ' + JSON.stringify(ex); + } + catch (otherEx) { + ret = 'Unexpected Error'; + } + } + return ret; + } + function _tryLog(ex) { + var message = toLogMessage(ex); + OfficeExtension.Utility.log(message); + } + function notifyActionHandlerReady() { + var context = new OfficeExtension.ClientRequestContext(); + var addinInternalService = OfficeCore.AddinInternalService.newObject(context); + context._customData = 'WacPartition'; + addinInternalService.notifyActionHandlerReady(); + return context.sync(); + } + function handlerOnReadyInternal() { + try { + Microsoft.Office.WebExtension.onReadyInternal() + .then(function () { + return init(); + }) + .then(function () { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.isDialog === true || (hostInfo.hostPlatform === "web" && hostInfo.hostType !== "word" && hostInfo.hostType !== "excel")) { + return; + } + else { + return notifyActionHandlerReady(); + } + }); + } + catch (ex) { + } + } + function initFromHostBridge(hostBridge) { + hostBridge.addHostMessageHandler(function (bridgeMessage) { + if (bridgeMessage.type === 3) { + _handleMessage(bridgeMessage.message); + } + }); + } + function initOnce() { + OfficeExtension.Utility.log('ActionProxy.initOnce'); + if (typeof (Office.actions) != 'undefined') { + setActionAssociation(Office.actions._association); + } + if (typeof (document) !== 'undefined') { + if (document.readyState && document.readyState !== 'loading') { + OfficeExtension.Utility.log('ActionProxy.initOnce: document.readyState is not loading state'); + handlerOnReadyInternal(); + } + else if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", function () { + OfficeExtension.Utility.log('ActionProxy.initOnce: DOMContentLoaded event triggered'); + handlerOnReadyInternal(); + }); + } + } + OfficeExtension.HostBridge.onInited(function (hostBridge) { + initFromHostBridge(hostBridge); + }); + } + initOnce(); + })(actionProxy || (actionProxy = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var actions; + (function (actions) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function areShortcutsInUse(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, inUseArray, inUseInfoArray, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + inUseArray = actionService.areShortcutsInUse(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + inUseInfoArray = []; + for (i = 0; i < shortcuts.length; i++) { + inUseInfoArray.push({ + shortcut: shortcuts[i], + inUse: inUseArray.value[i] + }); + } + return [2, inUseInfoArray]; + } + }); + }); + } + actions.areShortcutsInUse = areShortcutsInUse; + function replaceShortcuts(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + actionService.replaceShortcuts(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + actions.replaceShortcuts = replaceShortcuts; + function getShortcuts() { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, shortcuts; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + shortcuts = actionService.getShortcuts(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, shortcuts.value]; + } + }); + }); + } + actions.getShortcuts = getShortcuts; + })(actions = Office.actions || (Office.actions = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var AugLoop; + (function (AugLoop) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function SendMessage(message) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + augLoopEventService.sendMessage(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + AugLoop.SendMessage = SendMessage; + function onHostMessageReceived(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService, callback, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + callback = function (args) { + if (listener) { + var message = args.data; + listener(message); + } + return null; + }; + augLoopEventService.onHostMessageReceived.add(callback); + return [4, augLoopEventService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + augLoopEventService.onHostMessageReceived.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + AugLoop.onHostMessageReceived = onHostMessageReceived; + })(AugLoop = OfficeFirstParty.AugLoop || (OfficeFirstParty.AugLoop = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var Undo; + (function (Undo) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + context._customData = 'SkipUndoRecording'; + return context; + } + var resolver; + function onCopilotOperationStartedEventReceived() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (typeof resolver !== "undefined") { + resolver(); + resolver = undefined; + } + return [2]; + }); + }); + } + function undo() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + result = undoService.undo(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + Undo.undo = undo; + function onUndoStackChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onUndoStackChanged.add(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + undoService.onUndoStackChanged.remove(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + Undo.onUndoStackChanged = onUndoStackChanged; + function startCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var waitForEventPromise, context, undoService, shouldWaitForEvent, e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (typeof resolver !== "undefined") { + throw new Error("startCopilotOperation is already inprogress"); + } + waitForEventPromise = new Promise(function (resolve) { resolver = resolve; }); + _a.label = 1; + case 1: + _a.trys.push([1, 4, , 5]); + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onCopilotOperationStarted.add(onCopilotOperationStartedEventReceived); + return [4, context.sync()]; + case 2: + _a.sent(); + shouldWaitForEvent = undoService.startCopilotOperation(""); + return [4, context.sync()]; + case 3: + _a.sent(); + if (shouldWaitForEvent.value) { + return [2, waitForEventPromise]; + } + else { + resolver = undefined; + } + return [3, 5]; + case 4: + e_1 = _a.sent(); + resolver = undefined; + throw e_1; + case 5: return [2]; + } + }); + }); + } + Undo.startCopilotOperation = startCopilotOperation; + function endCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.endCopilotOperation(""); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + Undo.endCopilotOperation = endCopilotOperation; + })(Undo = OfficeFirstParty.Undo || (OfficeFirstParty.Undo = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var Office; +(function (Office) { + var dialogPage; + (function (dialogPage_1) { + function close() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.close(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.close = close; + function readyToShow() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.readyToShow(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.readyToShow = readyToShow; + function onShow(callback) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.onOnShowEvent.add(callback); + removeListener = function () { + dialogPage.onOnShowEvent.remove(callback); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + dialogPage_1.onShow = onShow; + function sendMessageToHost(message) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.sendMessageToHost(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.sendMessageToHost = sendMessageToHost; + })(dialogPage = Office.dialogPage || (Office.dialogPage = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var UserFeedback; + (function (UserFeedback) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function CollectUserFeedback(feedbacktype, uiType, featureArea, options) { + return __awaiter(this, void 0, void 0, function () { + var context, userFeedbackService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.collectUserFeedback(feedbacktype, uiType, featureArea, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + UserFeedback.CollectUserFeedback = CollectUserFeedback; + function onUserFeedbackUIDismissed(listener) { + return __awaiter(this, void 0, void 0, function () { + var callback, context, userFeedbackService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + callback = function (args) { + if (listener) { + var isFeedbackSent = args.isFeedbackSent; + listener(isFeedbackSent); + } + return null; + }; + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.onUserFeedbackUIDismissed.add(callback); + return [4, userFeedbackService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + userFeedbackService.onUserFeedbackUIDismissed.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + UserFeedback.onUserFeedbackUIDismissed = onUserFeedbackUIDismissed; + })(UserFeedback = OfficeFirstParty.UserFeedback || (OfficeFirstParty.UserFeedback = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var _BeginExcel = "_BeginExcel"; +var Excel; +(function (Excel) { + var Base64EncodingType; + (function (Base64EncodingType) { + Base64EncodingType["JPG"] = "JPG"; + Base64EncodingType["PNG"] = "PNG"; + })(Base64EncodingType = Excel.Base64EncodingType || (Excel.Base64EncodingType = {})); + var BlockedErrorCellValueSubType; + (function (BlockedErrorCellValueSubType) { + BlockedErrorCellValueSubType["unknown"] = "Unknown"; + BlockedErrorCellValueSubType["dataTypeRestrictedDomain"] = "DataTypeRestrictedDomain"; + BlockedErrorCellValueSubType["dataTypePrivacySetting"] = "DataTypePrivacySetting"; + BlockedErrorCellValueSubType["dataTypeUnsupportedApp"] = "DataTypeUnsupportedApp"; + BlockedErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BlockedErrorCellValueSubType["richDataLinkDisabled"] = "RichDataLinkDisabled"; + BlockedErrorCellValueSubType["signInError"] = "SignInError"; + BlockedErrorCellValueSubType["noLicense"] = "NoLicense"; + })(BlockedErrorCellValueSubType = Excel.BlockedErrorCellValueSubType || (Excel.BlockedErrorCellValueSubType = {})); + var BusyErrorCellValueSubType; + (function (BusyErrorCellValueSubType) { + BusyErrorCellValueSubType["unknown"] = "Unknown"; + BusyErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BusyErrorCellValueSubType["loadingImage"] = "LoadingImage"; + })(BusyErrorCellValueSubType = Excel.BusyErrorCellValueSubType || (Excel.BusyErrorCellValueSubType = {})); + var CalcErrorCellValueSubType; + (function (CalcErrorCellValueSubType) { + CalcErrorCellValueSubType["unknown"] = "Unknown"; + CalcErrorCellValueSubType["arrayOfArrays"] = "ArrayOfArrays"; + CalcErrorCellValueSubType["arrayOfRanges"] = "ArrayOfRanges"; + CalcErrorCellValueSubType["emptyArray"] = "EmptyArray"; + CalcErrorCellValueSubType["unsupportedLifting"] = "UnsupportedLifting"; + CalcErrorCellValueSubType["dataTableReferencedPendingFormula"] = "DataTableReferencedPendingFormula"; + CalcErrorCellValueSubType["tooManyCells"] = "TooManyCells"; + CalcErrorCellValueSubType["lambdaInCell"] = "LambdaInCell"; + CalcErrorCellValueSubType["tooDeeplyNested"] = "TooDeeplyNested"; + CalcErrorCellValueSubType["textOverflow"] = "TextOverflow"; + })(CalcErrorCellValueSubType = Excel.CalcErrorCellValueSubType || (Excel.CalcErrorCellValueSubType = {})); + var EntityCardLayoutType; + (function (EntityCardLayoutType) { + EntityCardLayoutType["entity"] = "Entity"; + EntityCardLayoutType["array"] = "Array"; + })(EntityCardLayoutType = Excel.EntityCardLayoutType || (Excel.EntityCardLayoutType = {})); + var EntityCompactLayoutIcons; + (function (EntityCompactLayoutIcons) { + EntityCompactLayoutIcons["generic"] = "Generic"; + EntityCompactLayoutIcons["accessibility"] = "Accessibility"; + EntityCompactLayoutIcons["airplane"] = "Airplane"; + EntityCompactLayoutIcons["airplaneTakeOff"] = "AirplaneTakeOff"; + EntityCompactLayoutIcons["album"] = "Album"; + EntityCompactLayoutIcons["alert"] = "Alert"; + EntityCompactLayoutIcons["alertUrgent"] = "AlertUrgent"; + EntityCompactLayoutIcons["animal"] = "Animal"; + EntityCompactLayoutIcons["animalCat"] = "AnimalCat"; + EntityCompactLayoutIcons["animalDog"] = "AnimalDog"; + EntityCompactLayoutIcons["animalRabbit"] = "AnimalRabbit"; + EntityCompactLayoutIcons["animalTurtle"] = "AnimalTurtle"; + EntityCompactLayoutIcons["appFolder"] = "AppFolder"; + EntityCompactLayoutIcons["appGeneric"] = "AppGeneric"; + EntityCompactLayoutIcons["apple"] = "Apple"; + EntityCompactLayoutIcons["approvalsApp"] = "ApprovalsApp"; + EntityCompactLayoutIcons["archive"] = "Archive"; + EntityCompactLayoutIcons["archiveMultiple"] = "ArchiveMultiple"; + EntityCompactLayoutIcons["arrowTrendingLines"] = "ArrowTrendingLines"; + EntityCompactLayoutIcons["art"] = "Art"; + EntityCompactLayoutIcons["atom"] = "Atom"; + EntityCompactLayoutIcons["attach"] = "Attach"; + EntityCompactLayoutIcons["automobile"] = "Automobile"; + EntityCompactLayoutIcons["autosum"] = "Autosum"; + EntityCompactLayoutIcons["backpack"] = "Backpack"; + EntityCompactLayoutIcons["badge"] = "Badge"; + EntityCompactLayoutIcons["balloon"] = "Balloon"; + EntityCompactLayoutIcons["bank"] = "Bank"; + EntityCompactLayoutIcons["barcodeScanner"] = "BarcodeScanner"; + EntityCompactLayoutIcons["basketball"] = "Basketball"; + EntityCompactLayoutIcons["battery0"] = "Battery0"; + EntityCompactLayoutIcons["battery10"] = "Battery10"; + EntityCompactLayoutIcons["beach"] = "Beach"; + EntityCompactLayoutIcons["beaker"] = "Beaker"; + EntityCompactLayoutIcons["bed"] = "Bed"; + EntityCompactLayoutIcons["binFull"] = "BinFull"; + EntityCompactLayoutIcons["bird"] = "Bird"; + EntityCompactLayoutIcons["bluetooth"] = "Bluetooth"; + EntityCompactLayoutIcons["board"] = "Board"; + EntityCompactLayoutIcons["boardGames"] = "BoardGames"; + EntityCompactLayoutIcons["book"] = "Book"; + EntityCompactLayoutIcons["bookmark"] = "Bookmark"; + EntityCompactLayoutIcons["bookmarkMultiple"] = "BookmarkMultiple"; + EntityCompactLayoutIcons["bot"] = "Bot"; + EntityCompactLayoutIcons["bowlChopsticks"] = "BowlChopsticks"; + EntityCompactLayoutIcons["box"] = "Box"; + EntityCompactLayoutIcons["boxMultiple"] = "BoxMultiple"; + EntityCompactLayoutIcons["brainCircuit"] = "BrainCircuit"; + EntityCompactLayoutIcons["branch"] = "Branch"; + EntityCompactLayoutIcons["branchFork"] = "BranchFork"; + EntityCompactLayoutIcons["branchRequest"] = "BranchRequest"; + EntityCompactLayoutIcons["bridge"] = "Bridge"; + EntityCompactLayoutIcons["briefcase"] = "Briefcase"; + EntityCompactLayoutIcons["briefcaseMedical"] = "BriefcaseMedical"; + EntityCompactLayoutIcons["broadActivityFeed"] = "BroadActivityFeed"; + EntityCompactLayoutIcons["broom"] = "Broom"; + EntityCompactLayoutIcons["bug"] = "Bug"; + EntityCompactLayoutIcons["building"] = "Building"; + EntityCompactLayoutIcons["buildingBank"] = "BuildingBank"; + EntityCompactLayoutIcons["buildingFactory"] = "BuildingFactory"; + EntityCompactLayoutIcons["buildingGovernment"] = "BuildingGovernment"; + EntityCompactLayoutIcons["buildingHome"] = "BuildingHome"; + EntityCompactLayoutIcons["buildingLighthouse"] = "BuildingLighthouse"; + EntityCompactLayoutIcons["buildingMultiple"] = "BuildingMultiple"; + EntityCompactLayoutIcons["buildingRetail"] = "BuildingRetail"; + EntityCompactLayoutIcons["buildingRetailMore"] = "BuildingRetailMore"; + EntityCompactLayoutIcons["buildingRetailToolbox"] = "BuildingRetailToolbox"; + EntityCompactLayoutIcons["buildingShop"] = "BuildingShop"; + EntityCompactLayoutIcons["buildingSkyscraper"] = "BuildingSkyscraper"; + EntityCompactLayoutIcons["calculator"] = "Calculator"; + EntityCompactLayoutIcons["calendarLtr"] = "CalendarLtr"; + EntityCompactLayoutIcons["calendarRtl"] = "CalendarRtl"; + EntityCompactLayoutIcons["call"] = "Call"; + EntityCompactLayoutIcons["calligraphyPen"] = "CalligraphyPen"; + EntityCompactLayoutIcons["camera"] = "Camera"; + EntityCompactLayoutIcons["cameraDome"] = "CameraDome"; + EntityCompactLayoutIcons["car"] = "Car"; + EntityCompactLayoutIcons["cart"] = "Cart"; + EntityCompactLayoutIcons["cat"] = "Cat"; + EntityCompactLayoutIcons["certificate"] = "Certificate"; + EntityCompactLayoutIcons["chartMultiple"] = "ChartMultiple"; + EntityCompactLayoutIcons["chat"] = "Chat"; + EntityCompactLayoutIcons["chatMultiple"] = "ChatMultiple"; + EntityCompactLayoutIcons["chatVideo"] = "ChatVideo"; + EntityCompactLayoutIcons["check"] = "Check"; + EntityCompactLayoutIcons["checkboxChecked"] = "CheckboxChecked"; + EntityCompactLayoutIcons["checkboxUnchecked"] = "CheckboxUnchecked"; + EntityCompactLayoutIcons["checkmark"] = "Checkmark"; + EntityCompactLayoutIcons["chess"] = "Chess"; + EntityCompactLayoutIcons["city"] = "City"; + EntityCompactLayoutIcons["class"] = "Class"; + EntityCompactLayoutIcons["classification"] = "Classification"; + EntityCompactLayoutIcons["clipboard"] = "Clipboard"; + EntityCompactLayoutIcons["clipboardDataBar"] = "ClipboardDataBar"; + EntityCompactLayoutIcons["clipboardPulse"] = "ClipboardPulse"; + EntityCompactLayoutIcons["clipboardTask"] = "ClipboardTask"; + EntityCompactLayoutIcons["clock"] = "Clock"; + EntityCompactLayoutIcons["clockAlarm"] = "ClockAlarm"; + EntityCompactLayoutIcons["cloud"] = "Cloud"; + EntityCompactLayoutIcons["cloudWords"] = "CloudWords"; + EntityCompactLayoutIcons["code"] = "Code"; + EntityCompactLayoutIcons["collections"] = "Collections"; + EntityCompactLayoutIcons["comment"] = "Comment"; + EntityCompactLayoutIcons["commentMultiple"] = "CommentMultiple"; + EntityCompactLayoutIcons["communication"] = "Communication"; + EntityCompactLayoutIcons["compassNorthwest"] = "CompassNorthwest"; + EntityCompactLayoutIcons["conferenceRoom"] = "ConferenceRoom"; + EntityCompactLayoutIcons["connector"] = "Connector"; + EntityCompactLayoutIcons["constellation"] = "Constellation"; + EntityCompactLayoutIcons["contactCard"] = "ContactCard"; + EntityCompactLayoutIcons["cookies"] = "Cookies"; + EntityCompactLayoutIcons["couch"] = "Couch"; + EntityCompactLayoutIcons["creditCardPerson"] = "CreditCardPerson"; + EntityCompactLayoutIcons["creditCardToolbox"] = "CreditCardToolbox"; + EntityCompactLayoutIcons["cube"] = "Cube"; + EntityCompactLayoutIcons["cubeMultiple"] = "CubeMultiple"; + EntityCompactLayoutIcons["cubeTree"] = "CubeTree"; + EntityCompactLayoutIcons["currencyDollarEuro"] = "CurrencyDollarEuro"; + EntityCompactLayoutIcons["currencyDollarRupee"] = "CurrencyDollarRupee"; + EntityCompactLayoutIcons["dataArea"] = "DataArea"; + EntityCompactLayoutIcons["database"] = "Database"; + EntityCompactLayoutIcons["databaseMultiple"] = "DatabaseMultiple"; + EntityCompactLayoutIcons["dataFunnel"] = "DataFunnel"; + EntityCompactLayoutIcons["dataHistogram"] = "DataHistogram"; + EntityCompactLayoutIcons["dataLine"] = "DataLine"; + EntityCompactLayoutIcons["dataPie"] = "DataPie"; + EntityCompactLayoutIcons["dataScatter"] = "DataScatter"; + EntityCompactLayoutIcons["dataSunburst"] = "DataSunburst"; + EntityCompactLayoutIcons["dataTreemap"] = "DataTreemap"; + EntityCompactLayoutIcons["dataWaterfall"] = "DataWaterfall"; + EntityCompactLayoutIcons["dataWhisker"] = "DataWhisker"; + EntityCompactLayoutIcons["dentist"] = "Dentist"; + EntityCompactLayoutIcons["designIdeas"] = "DesignIdeas"; + EntityCompactLayoutIcons["desktop"] = "Desktop"; + EntityCompactLayoutIcons["desktopMac"] = "DesktopMac"; + EntityCompactLayoutIcons["developerBoard"] = "DeveloperBoard"; + EntityCompactLayoutIcons["deviceMeetingRoom"] = "DeviceMeetingRoom"; + EntityCompactLayoutIcons["diagram"] = "Diagram"; + EntityCompactLayoutIcons["dialpad"] = "Dialpad"; + EntityCompactLayoutIcons["diamond"] = "Diamond"; + EntityCompactLayoutIcons["dinosaur"] = "Dinosaur"; + EntityCompactLayoutIcons["directions"] = "Directions"; + EntityCompactLayoutIcons["disaster"] = "Disaster"; + EntityCompactLayoutIcons["diversity"] = "Diversity"; + EntityCompactLayoutIcons["dNA"] = "DNA"; + EntityCompactLayoutIcons["doctor"] = "Doctor"; + EntityCompactLayoutIcons["document"] = "Document"; + EntityCompactLayoutIcons["documentData"] = "DocumentData"; + EntityCompactLayoutIcons["documentLandscape"] = "DocumentLandscape"; + EntityCompactLayoutIcons["documentMultiple"] = "DocumentMultiple"; + EntityCompactLayoutIcons["documentPdf"] = "DocumentPdf"; + EntityCompactLayoutIcons["documentQueue"] = "DocumentQueue"; + EntityCompactLayoutIcons["documentText"] = "DocumentText"; + EntityCompactLayoutIcons["dog"] = "Dog"; + EntityCompactLayoutIcons["door"] = "Door"; + EntityCompactLayoutIcons["doorTag"] = "DoorTag"; + EntityCompactLayoutIcons["drafts"] = "Drafts"; + EntityCompactLayoutIcons["drama"] = "Drama"; + EntityCompactLayoutIcons["drinkBeer"] = "DrinkBeer"; + EntityCompactLayoutIcons["drinkCoffee"] = "DrinkCoffee"; + EntityCompactLayoutIcons["drinkMargarita"] = "DrinkMargarita"; + EntityCompactLayoutIcons["drinkToGo"] = "DrinkToGo"; + EntityCompactLayoutIcons["drinkWine"] = "DrinkWine"; + EntityCompactLayoutIcons["driveTrain"] = "DriveTrain"; + EntityCompactLayoutIcons["drop"] = "Drop"; + EntityCompactLayoutIcons["dualScreen"] = "DualScreen"; + EntityCompactLayoutIcons["dumbbell"] = "Dumbbell"; + EntityCompactLayoutIcons["earth"] = "Earth"; + EntityCompactLayoutIcons["emoji"] = "Emoji"; + EntityCompactLayoutIcons["emojiAngry"] = "EmojiAngry"; + EntityCompactLayoutIcons["emojiHand"] = "EmojiHand"; + EntityCompactLayoutIcons["emojiLaugh"] = "EmojiLaugh"; + EntityCompactLayoutIcons["emojiMeh"] = "EmojiMeh"; + EntityCompactLayoutIcons["emojiMultiple"] = "EmojiMultiple"; + EntityCompactLayoutIcons["emojiSad"] = "EmojiSad"; + EntityCompactLayoutIcons["emojiSadSlight"] = "EmojiSadSlight"; + EntityCompactLayoutIcons["emojiSmileSlight"] = "EmojiSmileSlight"; + EntityCompactLayoutIcons["emojiSparkle"] = "EmojiSparkle"; + EntityCompactLayoutIcons["emojiSurprise"] = "EmojiSurprise"; + EntityCompactLayoutIcons["engine"] = "Engine"; + EntityCompactLayoutIcons["eraser"] = "Eraser"; + EntityCompactLayoutIcons["eye"] = "Eye"; + EntityCompactLayoutIcons["eyedropper"] = "Eyedropper"; + EntityCompactLayoutIcons["fax"] = "Fax"; + EntityCompactLayoutIcons["fingerprint"] = "Fingerprint"; + EntityCompactLayoutIcons["firstAid"] = "FirstAid"; + EntityCompactLayoutIcons["flag"] = "Flag"; + EntityCompactLayoutIcons["flash"] = "Flash"; + EntityCompactLayoutIcons["flashlight"] = "Flashlight"; + EntityCompactLayoutIcons["flow"] = "Flow"; + EntityCompactLayoutIcons["flowchart"] = "Flowchart"; + EntityCompactLayoutIcons["folder"] = "Folder"; + EntityCompactLayoutIcons["folderOpen"] = "FolderOpen"; + EntityCompactLayoutIcons["folderOpenVertical"] = "FolderOpenVertical"; + EntityCompactLayoutIcons["folderPerson"] = "FolderPerson"; + EntityCompactLayoutIcons["folderZip"] = "FolderZip"; + EntityCompactLayoutIcons["food"] = "Food"; + EntityCompactLayoutIcons["foodApple"] = "FoodApple"; + EntityCompactLayoutIcons["foodCake"] = "FoodCake"; + EntityCompactLayoutIcons["foodEgg"] = "FoodEgg"; + EntityCompactLayoutIcons["foodGrains"] = "FoodGrains"; + EntityCompactLayoutIcons["foodPizza"] = "FoodPizza"; + EntityCompactLayoutIcons["foodToast"] = "FoodToast"; + EntityCompactLayoutIcons["galaxy"] = "Galaxy"; + EntityCompactLayoutIcons["games"] = "Games"; + EntityCompactLayoutIcons["ganttChart"] = "GanttChart"; + EntityCompactLayoutIcons["gas"] = "Gas"; + EntityCompactLayoutIcons["gasPump"] = "GasPump"; + EntityCompactLayoutIcons["gauge"] = "Gauge"; + EntityCompactLayoutIcons["gavel"] = "Gavel"; + EntityCompactLayoutIcons["gift"] = "Gift"; + EntityCompactLayoutIcons["giftCard"] = "GiftCard"; + EntityCompactLayoutIcons["glasses"] = "Glasses"; + EntityCompactLayoutIcons["globe"] = "Globe"; + EntityCompactLayoutIcons["globeSurface"] = "GlobeSurface"; + EntityCompactLayoutIcons["grid"] = "Grid"; + EntityCompactLayoutIcons["gridDots"] = "GridDots"; + EntityCompactLayoutIcons["gridKanban"] = "GridKanban"; + EntityCompactLayoutIcons["guardian"] = "Guardian"; + EntityCompactLayoutIcons["guest"] = "Guest"; + EntityCompactLayoutIcons["guitar"] = "Guitar"; + EntityCompactLayoutIcons["handLeft"] = "HandLeft"; + EntityCompactLayoutIcons["handRight"] = "HandRight"; + EntityCompactLayoutIcons["handshake"] = "Handshake"; + EntityCompactLayoutIcons["hardDrive"] = "HardDrive"; + EntityCompactLayoutIcons["hatGraduation"] = "HatGraduation"; + EntityCompactLayoutIcons["headphones"] = "Headphones"; + EntityCompactLayoutIcons["headphonesSoundWave"] = "HeadphonesSoundWave"; + EntityCompactLayoutIcons["headset"] = "Headset"; + EntityCompactLayoutIcons["headsetVr"] = "HeadsetVr"; + EntityCompactLayoutIcons["heart"] = "Heart"; + EntityCompactLayoutIcons["heartBroken"] = "HeartBroken"; + EntityCompactLayoutIcons["heartCircle"] = "HeartCircle"; + EntityCompactLayoutIcons["heartHuman"] = "HeartHuman"; + EntityCompactLayoutIcons["heartPulse"] = "HeartPulse"; + EntityCompactLayoutIcons["history"] = "History"; + EntityCompactLayoutIcons["home"] = "Home"; + EntityCompactLayoutIcons["homeMore"] = "HomeMore"; + EntityCompactLayoutIcons["homePerson"] = "HomePerson"; + EntityCompactLayoutIcons["icons"] = "Icons"; + EntityCompactLayoutIcons["image"] = "Image"; + EntityCompactLayoutIcons["imageGlobe"] = "ImageGlobe"; + EntityCompactLayoutIcons["imageMultiple"] = "ImageMultiple"; + EntityCompactLayoutIcons["iot"] = "Iot"; + EntityCompactLayoutIcons["joystick"] = "Joystick"; + EntityCompactLayoutIcons["justice"] = "Justice"; + EntityCompactLayoutIcons["key"] = "Key"; + EntityCompactLayoutIcons["keyboard"] = "Keyboard"; + EntityCompactLayoutIcons["keyboardLayoutSplit"] = "KeyboardLayoutSplit"; + EntityCompactLayoutIcons["keyMultiple"] = "KeyMultiple"; + EntityCompactLayoutIcons["languages"] = "Languages"; + EntityCompactLayoutIcons["laptop"] = "Laptop"; + EntityCompactLayoutIcons["lasso"] = "Lasso"; + EntityCompactLayoutIcons["launcherSettings"] = "LauncherSettings"; + EntityCompactLayoutIcons["layer"] = "Layer"; + EntityCompactLayoutIcons["leaf"] = "Leaf"; + EntityCompactLayoutIcons["leafOne"] = "LeafOne"; + EntityCompactLayoutIcons["leafThree"] = "LeafThree"; + EntityCompactLayoutIcons["leafTwo"] = "LeafTwo"; + EntityCompactLayoutIcons["library"] = "Library"; + EntityCompactLayoutIcons["lightbulb"] = "Lightbulb"; + EntityCompactLayoutIcons["lightbulbFilament"] = "LightbulbFilament"; + EntityCompactLayoutIcons["likert"] = "Likert"; + EntityCompactLayoutIcons["link"] = "Link"; + EntityCompactLayoutIcons["localLanguage"] = "LocalLanguage"; + EntityCompactLayoutIcons["location"] = "Location"; + EntityCompactLayoutIcons["lockClosed"] = "LockClosed"; + EntityCompactLayoutIcons["lockMultiple"] = "LockMultiple"; + EntityCompactLayoutIcons["lockOpen"] = "LockOpen"; + EntityCompactLayoutIcons["lottery"] = "Lottery"; + EntityCompactLayoutIcons["luggage"] = "Luggage"; + EntityCompactLayoutIcons["mail"] = "Mail"; + EntityCompactLayoutIcons["mailInbox"] = "MailInbox"; + EntityCompactLayoutIcons["mailMultiple"] = "MailMultiple"; + EntityCompactLayoutIcons["map"] = "Map"; + EntityCompactLayoutIcons["mapPin"] = "MapPin"; + EntityCompactLayoutIcons["markdown"] = "Markdown"; + EntityCompactLayoutIcons["mathFormula"] = "MathFormula"; + EntityCompactLayoutIcons["mathSymbols"] = "MathSymbols"; + EntityCompactLayoutIcons["max"] = "Max"; + EntityCompactLayoutIcons["megaphone"] = "Megaphone"; + EntityCompactLayoutIcons["megaphoneLoud"] = "MegaphoneLoud"; + EntityCompactLayoutIcons["mention"] = "Mention"; + EntityCompactLayoutIcons["mic"] = "Mic"; + EntityCompactLayoutIcons["microscope"] = "Microscope"; + EntityCompactLayoutIcons["midi"] = "Midi"; + EntityCompactLayoutIcons["molecule"] = "Molecule"; + EntityCompactLayoutIcons["money"] = "Money"; + EntityCompactLayoutIcons["moneyHand"] = "MoneyHand"; + EntityCompactLayoutIcons["mountain"] = "Mountain"; + EntityCompactLayoutIcons["movieCamera"] = "MovieCamera"; + EntityCompactLayoutIcons["moviesAndTv"] = "MoviesAndTv"; + EntityCompactLayoutIcons["musicNote"] = "MusicNote"; + EntityCompactLayoutIcons["musicNote1"] = "MusicNote1"; + EntityCompactLayoutIcons["musicNote2"] = "MusicNote2"; + EntityCompactLayoutIcons["myLocation"] = "MyLocation"; + EntityCompactLayoutIcons["nByN"] = "NByN"; + EntityCompactLayoutIcons["nByOne"] = "NByOne"; + EntityCompactLayoutIcons["news"] = "News"; + EntityCompactLayoutIcons["notablePeople"] = "NotablePeople"; + EntityCompactLayoutIcons["note"] = "Note"; + EntityCompactLayoutIcons["notebook"] = "Notebook"; + EntityCompactLayoutIcons["notepad"] = "Notepad"; + EntityCompactLayoutIcons["notepadPerson"] = "NotepadPerson"; + EntityCompactLayoutIcons["oneByN"] = "OneByN"; + EntityCompactLayoutIcons["oneByOne"] = "OneByOne"; + EntityCompactLayoutIcons["options"] = "Options"; + EntityCompactLayoutIcons["organization"] = "Organization"; + EntityCompactLayoutIcons["organizationHorizontal"] = "OrganizationHorizontal"; + EntityCompactLayoutIcons["oval"] = "Oval"; + EntityCompactLayoutIcons["paintBrush"] = "PaintBrush"; + EntityCompactLayoutIcons["paintBucket"] = "PaintBucket"; + EntityCompactLayoutIcons["partlySunnyWeather"] = "PartlySunnyWeather"; + EntityCompactLayoutIcons["password"] = "Password"; + EntityCompactLayoutIcons["patch"] = "Patch"; + EntityCompactLayoutIcons["patient"] = "Patient"; + EntityCompactLayoutIcons["payment"] = "Payment"; + EntityCompactLayoutIcons["pen"] = "Pen"; + EntityCompactLayoutIcons["pentagon"] = "Pentagon"; + EntityCompactLayoutIcons["people"] = "People"; + EntityCompactLayoutIcons["peopleAudience"] = "PeopleAudience"; + EntityCompactLayoutIcons["peopleCall"] = "PeopleCall"; + EntityCompactLayoutIcons["peopleCommunity"] = "PeopleCommunity"; + EntityCompactLayoutIcons["peopleMoney"] = "PeopleMoney"; + EntityCompactLayoutIcons["peopleQueue"] = "PeopleQueue"; + EntityCompactLayoutIcons["peopleTeam"] = "PeopleTeam"; + EntityCompactLayoutIcons["peopleToolbox"] = "PeopleToolbox"; + EntityCompactLayoutIcons["person"] = "Person"; + EntityCompactLayoutIcons["personBoard"] = "PersonBoard"; + EntityCompactLayoutIcons["personCall"] = "PersonCall"; + EntityCompactLayoutIcons["personChat"] = "PersonChat"; + EntityCompactLayoutIcons["personFeedback"] = "PersonFeedback"; + EntityCompactLayoutIcons["personSupport"] = "PersonSupport"; + EntityCompactLayoutIcons["personVoice"] = "PersonVoice"; + EntityCompactLayoutIcons["phone"] = "Phone"; + EntityCompactLayoutIcons["phoneDesktop"] = "PhoneDesktop"; + EntityCompactLayoutIcons["phoneLaptop"] = "PhoneLaptop"; + EntityCompactLayoutIcons["phoneShake"] = "PhoneShake"; + EntityCompactLayoutIcons["phoneTablet"] = "PhoneTablet"; + EntityCompactLayoutIcons["phoneVibrate"] = "PhoneVibrate"; + EntityCompactLayoutIcons["photoFilter"] = "PhotoFilter"; + EntityCompactLayoutIcons["pi"] = "Pi"; + EntityCompactLayoutIcons["pictureInPicture"] = "PictureInPicture"; + EntityCompactLayoutIcons["pilates"] = "Pilates"; + EntityCompactLayoutIcons["pill"] = "Pill"; + EntityCompactLayoutIcons["pin"] = "Pin"; + EntityCompactLayoutIcons["pipeline"] = "Pipeline"; + EntityCompactLayoutIcons["planet"] = "Planet"; + EntityCompactLayoutIcons["playingCards"] = "PlayingCards"; + EntityCompactLayoutIcons["plugConnected"] = "PlugConnected"; + EntityCompactLayoutIcons["plugDisconnected"] = "PlugDisconnected"; + EntityCompactLayoutIcons["pointScan"] = "PointScan"; + EntityCompactLayoutIcons["poll"] = "Poll"; + EntityCompactLayoutIcons["power"] = "Power"; + EntityCompactLayoutIcons["predictions"] = "Predictions"; + EntityCompactLayoutIcons["premium"] = "Premium"; + EntityCompactLayoutIcons["presenter"] = "Presenter"; + EntityCompactLayoutIcons["previewLink"] = "PreviewLink"; + EntityCompactLayoutIcons["print"] = "Print"; + EntityCompactLayoutIcons["production"] = "Production"; + EntityCompactLayoutIcons["prohibited"] = "Prohibited"; + EntityCompactLayoutIcons["projectionScreen"] = "ProjectionScreen"; + EntityCompactLayoutIcons["protocolHandler"] = "ProtocolHandler"; + EntityCompactLayoutIcons["pulse"] = "Pulse"; + EntityCompactLayoutIcons["pulseSquare"] = "PulseSquare"; + EntityCompactLayoutIcons["puzzlePiece"] = "PuzzlePiece"; + EntityCompactLayoutIcons["qrCode"] = "QrCode"; + EntityCompactLayoutIcons["radar"] = "Radar"; + EntityCompactLayoutIcons["ram"] = "Ram"; + EntityCompactLayoutIcons["readingList"] = "ReadingList"; + EntityCompactLayoutIcons["realEstate"] = "RealEstate"; + EntityCompactLayoutIcons["receipt"] = "Receipt"; + EntityCompactLayoutIcons["reward"] = "Reward"; + EntityCompactLayoutIcons["rhombus"] = "Rhombus"; + EntityCompactLayoutIcons["ribbon"] = "Ribbon"; + EntityCompactLayoutIcons["ribbonStar"] = "RibbonStar"; + EntityCompactLayoutIcons["roadCone"] = "RoadCone"; + EntityCompactLayoutIcons["rocket"] = "Rocket"; + EntityCompactLayoutIcons["router"] = "Router"; + EntityCompactLayoutIcons["rss"] = "Rss"; + EntityCompactLayoutIcons["ruler"] = "Ruler"; + EntityCompactLayoutIcons["run"] = "Run"; + EntityCompactLayoutIcons["running"] = "Running"; + EntityCompactLayoutIcons["satellite"] = "Satellite"; + EntityCompactLayoutIcons["save"] = "Save"; + EntityCompactLayoutIcons["savings"] = "Savings"; + EntityCompactLayoutIcons["scales"] = "Scales"; + EntityCompactLayoutIcons["scan"] = "Scan"; + EntityCompactLayoutIcons["scratchpad"] = "Scratchpad"; + EntityCompactLayoutIcons["screenPerson"] = "ScreenPerson"; + EntityCompactLayoutIcons["screenshot"] = "Screenshot"; + EntityCompactLayoutIcons["search"] = "Search"; + EntityCompactLayoutIcons["serialPort"] = "SerialPort"; + EntityCompactLayoutIcons["server"] = "Server"; + EntityCompactLayoutIcons["serverMultiple"] = "ServerMultiple"; + EntityCompactLayoutIcons["serviceBell"] = "ServiceBell"; + EntityCompactLayoutIcons["settings"] = "Settings"; + EntityCompactLayoutIcons["shapes"] = "Shapes"; + EntityCompactLayoutIcons["shield"] = "Shield"; + EntityCompactLayoutIcons["shieldTask"] = "ShieldTask"; + EntityCompactLayoutIcons["shoppingBag"] = "ShoppingBag"; + EntityCompactLayoutIcons["signature"] = "Signature"; + EntityCompactLayoutIcons["sim"] = "Sim"; + EntityCompactLayoutIcons["sleep"] = "Sleep"; + EntityCompactLayoutIcons["smartwatch"] = "Smartwatch"; + EntityCompactLayoutIcons["soundSource"] = "SoundSource"; + EntityCompactLayoutIcons["soundWaveCircle"] = "SoundWaveCircle"; + EntityCompactLayoutIcons["sparkle"] = "Sparkle"; + EntityCompactLayoutIcons["speaker0"] = "Speaker0"; + EntityCompactLayoutIcons["speaker2"] = "Speaker2"; + EntityCompactLayoutIcons["sport"] = "Sport"; + EntityCompactLayoutIcons["sportAmericanFootball"] = "SportAmericanFootball"; + EntityCompactLayoutIcons["sportBaseball"] = "SportBaseball"; + EntityCompactLayoutIcons["sportBasketball"] = "SportBasketball"; + EntityCompactLayoutIcons["sportHockey"] = "SportHockey"; + EntityCompactLayoutIcons["sportSoccer"] = "SportSoccer"; + EntityCompactLayoutIcons["squareMultiple"] = "SquareMultiple"; + EntityCompactLayoutIcons["squareShadow"] = "SquareShadow"; + EntityCompactLayoutIcons["squaresNested"] = "SquaresNested"; + EntityCompactLayoutIcons["stack"] = "Stack"; + EntityCompactLayoutIcons["stackStar"] = "StackStar"; + EntityCompactLayoutIcons["star"] = "Star"; + EntityCompactLayoutIcons["starFilled"] = "StarFilled"; + EntityCompactLayoutIcons["starHalf"] = "StarHalf"; + EntityCompactLayoutIcons["starLineHorizontal3"] = "StarLineHorizontal3"; + EntityCompactLayoutIcons["starOneQuarter"] = "StarOneQuarter"; + EntityCompactLayoutIcons["starThreeQuarter"] = "StarThreeQuarter"; + EntityCompactLayoutIcons["status"] = "Status"; + EntityCompactLayoutIcons["steps"] = "Steps"; + EntityCompactLayoutIcons["stethoscope"] = "Stethoscope"; + EntityCompactLayoutIcons["sticker"] = "Sticker"; + EntityCompactLayoutIcons["storage"] = "Storage"; + EntityCompactLayoutIcons["stream"] = "Stream"; + EntityCompactLayoutIcons["streamInput"] = "StreamInput"; + EntityCompactLayoutIcons["streamInputOutput"] = "StreamInputOutput"; + EntityCompactLayoutIcons["streamOutput"] = "StreamOutput"; + EntityCompactLayoutIcons["styleGuide"] = "StyleGuide"; + EntityCompactLayoutIcons["subGrid"] = "SubGrid"; + EntityCompactLayoutIcons["subtitles"] = "Subtitles"; + EntityCompactLayoutIcons["surfaceEarbuds"] = "SurfaceEarbuds"; + EntityCompactLayoutIcons["surfaceHub"] = "SurfaceHub"; + EntityCompactLayoutIcons["symbols"] = "Symbols"; + EntityCompactLayoutIcons["syringe"] = "Syringe"; + EntityCompactLayoutIcons["system"] = "System"; + EntityCompactLayoutIcons["tabDesktop"] = "TabDesktop"; + EntityCompactLayoutIcons["tabInprivateAccount"] = "TabInprivateAccount"; + EntityCompactLayoutIcons["table"] = "Table"; + EntityCompactLayoutIcons["tableImage"] = "TableImage"; + EntityCompactLayoutIcons["tableMultiple"] = "TableMultiple"; + EntityCompactLayoutIcons["tablet"] = "Tablet"; + EntityCompactLayoutIcons["tabs"] = "Tabs"; + EntityCompactLayoutIcons["tag"] = "Tag"; + EntityCompactLayoutIcons["tagCircle"] = "TagCircle"; + EntityCompactLayoutIcons["tagMultiple"] = "TagMultiple"; + EntityCompactLayoutIcons["target"] = "Target"; + EntityCompactLayoutIcons["targetArrow"] = "TargetArrow"; + EntityCompactLayoutIcons["teddy"] = "Teddy"; + EntityCompactLayoutIcons["temperature"] = "Temperature"; + EntityCompactLayoutIcons["tent"] = "Tent"; + EntityCompactLayoutIcons["tetrisApp"] = "TetrisApp"; + EntityCompactLayoutIcons["textbox"] = "Textbox"; + EntityCompactLayoutIcons["textQuote"] = "TextQuote"; + EntityCompactLayoutIcons["thinking"] = "Thinking"; + EntityCompactLayoutIcons["thumbDislike"] = "ThumbDislike"; + EntityCompactLayoutIcons["thumbLike"] = "ThumbLike"; + EntityCompactLayoutIcons["ticketDiagonal"] = "TicketDiagonal"; + EntityCompactLayoutIcons["ticketHorizontal"] = "TicketHorizontal"; + EntityCompactLayoutIcons["timeAndWeather"] = "TimeAndWeather"; + EntityCompactLayoutIcons["timeline"] = "Timeline"; + EntityCompactLayoutIcons["timer"] = "Timer"; + EntityCompactLayoutIcons["toolbox"] = "Toolbox"; + EntityCompactLayoutIcons["topSpeed"] = "TopSpeed"; + EntityCompactLayoutIcons["translate"] = "Translate"; + EntityCompactLayoutIcons["transmission"] = "Transmission"; + EntityCompactLayoutIcons["treeDeciduous"] = "TreeDeciduous"; + EntityCompactLayoutIcons["treeEvergreen"] = "TreeEvergreen"; + EntityCompactLayoutIcons["trophy"] = "Trophy"; + EntityCompactLayoutIcons["tv"] = "Tv"; + EntityCompactLayoutIcons["tvUsb"] = "TvUsb"; + EntityCompactLayoutIcons["umbrella"] = "Umbrella"; + EntityCompactLayoutIcons["usbPlug"] = "UsbPlug"; + EntityCompactLayoutIcons["usbStick"] = "UsbStick"; + EntityCompactLayoutIcons["vault"] = "Vault"; + EntityCompactLayoutIcons["vehicleBicycle"] = "VehicleBicycle"; + EntityCompactLayoutIcons["vehicleBus"] = "VehicleBus"; + EntityCompactLayoutIcons["vehicleCab"] = "VehicleCab"; + EntityCompactLayoutIcons["vehicleCar"] = "VehicleCar"; + EntityCompactLayoutIcons["vehicleCarCollision"] = "VehicleCarCollision"; + EntityCompactLayoutIcons["vehicleCarProfileLtr"] = "VehicleCarProfileLtr"; + EntityCompactLayoutIcons["vehicleCarProfileRtl"] = "VehicleCarProfileRtl"; + EntityCompactLayoutIcons["vehicleShip"] = "VehicleShip"; + EntityCompactLayoutIcons["vehicleSubway"] = "VehicleSubway"; + EntityCompactLayoutIcons["vehicleTruck"] = "VehicleTruck"; + EntityCompactLayoutIcons["vehicleTruckBag"] = "VehicleTruckBag"; + EntityCompactLayoutIcons["vehicleTruckCube"] = "VehicleTruckCube"; + EntityCompactLayoutIcons["vehicleTruckProfile"] = "VehicleTruckProfile"; + EntityCompactLayoutIcons["video"] = "Video"; + EntityCompactLayoutIcons["video360"] = "Video360"; + EntityCompactLayoutIcons["videoChat"] = "VideoChat"; + EntityCompactLayoutIcons["videoClip"] = "VideoClip"; + EntityCompactLayoutIcons["videoClipMultiple"] = "VideoClipMultiple"; + EntityCompactLayoutIcons["videoPerson"] = "VideoPerson"; + EntityCompactLayoutIcons["videoRecording"] = "VideoRecording"; + EntityCompactLayoutIcons["videoSecurity"] = "VideoSecurity"; + EntityCompactLayoutIcons["viewDesktop"] = "ViewDesktop"; + EntityCompactLayoutIcons["viewDesktopMobile"] = "ViewDesktopMobile"; + EntityCompactLayoutIcons["violin"] = "Violin"; + EntityCompactLayoutIcons["virtualNetwork"] = "VirtualNetwork"; + EntityCompactLayoutIcons["voicemail"] = "Voicemail"; + EntityCompactLayoutIcons["vote"] = "Vote"; + EntityCompactLayoutIcons["walkieTalkie"] = "WalkieTalkie"; + EntityCompactLayoutIcons["wallet"] = "Wallet"; + EntityCompactLayoutIcons["walletCreditCard"] = "WalletCreditCard"; + EntityCompactLayoutIcons["wallpaper"] = "Wallpaper"; + EntityCompactLayoutIcons["wand"] = "Wand"; + EntityCompactLayoutIcons["warning"] = "Warning"; + EntityCompactLayoutIcons["weatherBlowingSnow"] = "WeatherBlowingSnow"; + EntityCompactLayoutIcons["weatherCloudy"] = "WeatherCloudy"; + EntityCompactLayoutIcons["weatherDrizzle"] = "WeatherDrizzle"; + EntityCompactLayoutIcons["weatherDuststorm"] = "WeatherDuststorm"; + EntityCompactLayoutIcons["weatherFog"] = "WeatherFog"; + EntityCompactLayoutIcons["weatherHailDay"] = "WeatherHailDay"; + EntityCompactLayoutIcons["weatherHailNight"] = "WeatherHailNight"; + EntityCompactLayoutIcons["weatherHaze"] = "WeatherHaze"; + EntityCompactLayoutIcons["weatherMoon"] = "WeatherMoon"; + EntityCompactLayoutIcons["weatherPartlyCloudyDay"] = "WeatherPartlyCloudyDay"; + EntityCompactLayoutIcons["weatherPartlyCloudyNight"] = "WeatherPartlyCloudyNight"; + EntityCompactLayoutIcons["weatherRain"] = "WeatherRain"; + EntityCompactLayoutIcons["weatherRainShowersDay"] = "WeatherRainShowersDay"; + EntityCompactLayoutIcons["weatherRainShowersNight"] = "WeatherRainShowersNight"; + EntityCompactLayoutIcons["weatherRainSnow"] = "WeatherRainSnow"; + EntityCompactLayoutIcons["weatherSnow"] = "WeatherSnow"; + EntityCompactLayoutIcons["weatherSnowflake"] = "WeatherSnowflake"; + EntityCompactLayoutIcons["weatherSnowShowerDay"] = "WeatherSnowShowerDay"; + EntityCompactLayoutIcons["weatherSnowShowerNight"] = "WeatherSnowShowerNight"; + EntityCompactLayoutIcons["weatherSqualls"] = "WeatherSqualls"; + EntityCompactLayoutIcons["weatherSunnyHigh"] = "WeatherSunnyHigh"; + EntityCompactLayoutIcons["weatherSunnyLow"] = "WeatherSunnyLow"; + EntityCompactLayoutIcons["weatherThunderstorm"] = "WeatherThunderstorm"; + EntityCompactLayoutIcons["webAsset"] = "WebAsset"; + EntityCompactLayoutIcons["whiteboard"] = "Whiteboard"; + EntityCompactLayoutIcons["wifi1"] = "Wifi1"; + EntityCompactLayoutIcons["wifi2"] = "Wifi2"; + EntityCompactLayoutIcons["window"] = "Window"; + EntityCompactLayoutIcons["windowMultiple"] = "WindowMultiple"; + EntityCompactLayoutIcons["windowWrench"] = "WindowWrench"; + EntityCompactLayoutIcons["wrench"] = "Wrench"; + EntityCompactLayoutIcons["wrenchScrewdriver"] = "WrenchScrewdriver"; + EntityCompactLayoutIcons["xray"] = "Xray"; + EntityCompactLayoutIcons["yoga"] = "Yoga"; + })(EntityCompactLayoutIcons = Excel.EntityCompactLayoutIcons || (Excel.EntityCompactLayoutIcons = {})); + var ReferenceValueType; + (function (ReferenceValueType) { + ReferenceValueType["array"] = "Array"; + ReferenceValueType["entity"] = "Entity"; + ReferenceValueType["root"] = "Root"; + })(ReferenceValueType = Excel.ReferenceValueType || (Excel.ReferenceValueType = {})); + var CellValueType; + (function (CellValueType) { + CellValueType["array"] = "Array"; + CellValueType["boolean"] = "Boolean"; + CellValueType["double"] = "Double"; + CellValueType["entity"] = "Entity"; + CellValueType["empty"] = "Empty"; + CellValueType["error"] = "Error"; + CellValueType["formattedNumber"] = "FormattedNumber"; + CellValueType["linkedEntity"] = "LinkedEntity"; + CellValueType["localImage"] = "LocalImage"; + CellValueType["reference"] = "Reference"; + CellValueType["string"] = "String"; + CellValueType["notAvailable"] = "NotAvailable"; + CellValueType["webImage"] = "WebImage"; + })(CellValueType = Excel.CellValueType || (Excel.CellValueType = {})); + var ConnectErrorCellValueSubType; + (function (ConnectErrorCellValueSubType) { + ConnectErrorCellValueSubType["unknown"] = "Unknown"; + ConnectErrorCellValueSubType["serviceError"] = "ServiceError"; + ConnectErrorCellValueSubType["externalLinks"] = "ExternalLinks"; + ConnectErrorCellValueSubType["externalLinksNonCloudLocation"] = "ExternalLinksNonCloudLocation"; + ConnectErrorCellValueSubType["dataTypeNoConnection"] = "DataTypeNoConnection"; + ConnectErrorCellValueSubType["dataTypeServiceError"] = "DataTypeServiceError"; + ConnectErrorCellValueSubType["missingContent"] = "MissingContent"; + ConnectErrorCellValueSubType["requestThrottle"] = "RequestThrottle"; + ConnectErrorCellValueSubType["externalLinksFailedToRefresh"] = "ExternalLinksFailedToRefresh"; + ConnectErrorCellValueSubType["externalLinksAccessFailed"] = "ExternalLinksAccessFailed"; + ConnectErrorCellValueSubType["externalLinksServerError"] = "ExternalLinksServerError"; + ConnectErrorCellValueSubType["externalLinksInvalidRequest"] = "ExternalLinksInvalidRequest"; + ConnectErrorCellValueSubType["externalLinksUnAuthenticated"] = "ExternalLinksUnAuthenticated"; + ConnectErrorCellValueSubType["externalLinksThrottledByHost"] = "ExternalLinksThrottledByHost"; + ConnectErrorCellValueSubType["externalLinksFileTooLarge"] = "ExternalLinksFileTooLarge"; + ConnectErrorCellValueSubType["outdatedLinkedEntity"] = "OutdatedLinkedEntity"; + ConnectErrorCellValueSubType["genericServerError"] = "GenericServerError"; + })(ConnectErrorCellValueSubType = Excel.ConnectErrorCellValueSubType || (Excel.ConnectErrorCellValueSubType = {})); + var ErrorCellValueType; + (function (ErrorCellValueType) { + ErrorCellValueType["blocked"] = "Blocked"; + ErrorCellValueType["busy"] = "Busy"; + ErrorCellValueType["calc"] = "Calc"; + ErrorCellValueType["connect"] = "Connect"; + ErrorCellValueType["div0"] = "Div0"; + ErrorCellValueType["external"] = "External"; + ErrorCellValueType["field"] = "Field"; + ErrorCellValueType["gettingData"] = "GettingData"; + ErrorCellValueType["notAvailable"] = "NotAvailable"; + ErrorCellValueType["name"] = "Name"; + ErrorCellValueType["null"] = "Null"; + ErrorCellValueType["num"] = "Num"; + ErrorCellValueType["placeholder"] = "Placeholder"; + ErrorCellValueType["ref"] = "Ref"; + ErrorCellValueType["spill"] = "Spill"; + ErrorCellValueType["value"] = "Value"; + })(ErrorCellValueType = Excel.ErrorCellValueType || (Excel.ErrorCellValueType = {})); + var ExternalErrorCellValueSubType; + (function (ExternalErrorCellValueSubType) { + ExternalErrorCellValueSubType["unknown"] = "Unknown"; + })(ExternalErrorCellValueSubType = Excel.ExternalErrorCellValueSubType || (Excel.ExternalErrorCellValueSubType = {})); + var FieldErrorCellValueSubType; + (function (FieldErrorCellValueSubType) { + FieldErrorCellValueSubType["unknown"] = "Unknown"; + FieldErrorCellValueSubType["webImageMissingFilePart"] = "WebImageMissingFilePart"; + FieldErrorCellValueSubType["dataProviderError"] = "DataProviderError"; + FieldErrorCellValueSubType["richValueRelMissingFilePart"] = "RichValueRelMissingFilePart"; + })(FieldErrorCellValueSubType = Excel.FieldErrorCellValueSubType || (Excel.FieldErrorCellValueSubType = {})); + var NumErrorCellValueSubType; + (function (NumErrorCellValueSubType) { + NumErrorCellValueSubType["unknown"] = "Unknown"; + NumErrorCellValueSubType["arrayTooLarge"] = "ArrayTooLarge"; + })(NumErrorCellValueSubType = Excel.NumErrorCellValueSubType || (Excel.NumErrorCellValueSubType = {})); + var RefErrorCellValueSubType; + (function (RefErrorCellValueSubType) { + RefErrorCellValueSubType["unknown"] = "Unknown"; + RefErrorCellValueSubType["externalLinksStructuredRef"] = "ExternalLinksStructuredRef"; + RefErrorCellValueSubType["externalLinksCalculatedRef"] = "ExternalLinksCalculatedRef"; + })(RefErrorCellValueSubType = Excel.RefErrorCellValueSubType || (Excel.RefErrorCellValueSubType = {})); + var SpillErrorCellValueSubType; + (function (SpillErrorCellValueSubType) { + SpillErrorCellValueSubType["unknown"] = "Unknown"; + SpillErrorCellValueSubType["collision"] = "Collision"; + SpillErrorCellValueSubType["indeterminateSize"] = "IndeterminateSize"; + SpillErrorCellValueSubType["worksheetEdge"] = "WorksheetEdge"; + SpillErrorCellValueSubType["outOfMemoryWhileCalc"] = "OutOfMemoryWhileCalc"; + SpillErrorCellValueSubType["table"] = "Table"; + SpillErrorCellValueSubType["mergedCell"] = "MergedCell"; + })(SpillErrorCellValueSubType = Excel.SpillErrorCellValueSubType || (Excel.SpillErrorCellValueSubType = {})); + var ValueErrorCellValueSubType; + (function (ValueErrorCellValueSubType) { + ValueErrorCellValueSubType["unknown"] = "Unknown"; + ValueErrorCellValueSubType["vlookupColumnIndexLessThanOne"] = "VlookupColumnIndexLessThanOne"; + ValueErrorCellValueSubType["vlookupResultNotFound"] = "VlookupResultNotFound"; + ValueErrorCellValueSubType["hlookupRowIndexLessThanOne"] = "HlookupRowIndexLessThanOne"; + ValueErrorCellValueSubType["hlookupResultNotFound"] = "HlookupResultNotFound"; + ValueErrorCellValueSubType["coerceStringToNumberInvalid"] = "CoerceStringToNumberInvalid"; + ValueErrorCellValueSubType["coerceStringToBoolInvalid"] = "CoerceStringToBoolInvalid"; + ValueErrorCellValueSubType["coerceStringToInvalidType"] = "CoerceStringToInvalidType"; + ValueErrorCellValueSubType["subArrayStartRowMissingEndRowNot"] = "SubArrayStartRowMissingEndRowNot"; + ValueErrorCellValueSubType["subArrayStartColumnMissingEndColumnNot"] = "SubArrayStartColumnMissingEndColumnNot"; + ValueErrorCellValueSubType["invalidImageUrl"] = "InvalidImageUrl"; + ValueErrorCellValueSubType["stockHistoryNonTradingDays"] = "StockHistoryNonTradingDays"; + ValueErrorCellValueSubType["stockHistoryNotAStock"] = "StockHistoryNotAStock"; + ValueErrorCellValueSubType["stockHistoryInvalidDate"] = "StockHistoryInvalidDate"; + ValueErrorCellValueSubType["stockHistoryEndBeforeStart"] = "StockHistoryEndBeforeStart"; + ValueErrorCellValueSubType["stockHistoryStartInFuture"] = "StockHistoryStartInFuture"; + ValueErrorCellValueSubType["stockHistoryInvalidEnum"] = "StockHistoryInvalidEnum"; + ValueErrorCellValueSubType["stockHistoryOnlyDateRequested"] = "StockHistoryOnlyDateRequested"; + ValueErrorCellValueSubType["stockHistoryNotFound"] = "StockHistoryNotFound"; + ValueErrorCellValueSubType["lambdaWrongParamCount"] = "LambdaWrongParamCount"; + })(ValueErrorCellValueSubType = Excel.ValueErrorCellValueSubType || (Excel.ValueErrorCellValueSubType = {})); + function _runOnRegularOrWacContext(options, callback) { + var context = isOfficePlatform("OfficeOnline") + ? new WacSpecificRequestContext() + : new RequestContext(); + onBeforeExcelRun(options, context); + return OfficeExtension.CoreUtility.Promise.resolve() + .then(function () { return callback(context); }) + .then(context.sync); + } + var WacSpecificRequestContext = (function (_super) { + __extends(WacSpecificRequestContext, _super); + function WacSpecificRequestContext(url) { + var _this = _super.call(this, url) || this; + _this._customData = "WacPartition"; + _this.m_wacWorkbook = _createRootServiceObject(WacWorkbook, _this); + _this._rootObject = _this.m_wacWorkbook; + _this._rootObjectPropertyName = "wacWorkbook"; + return _this; + } + Object.defineProperty(WacSpecificRequestContext.prototype, "wacWorkbook", { + get: function () { + return this.m_wacWorkbook; + }, + enumerable: true, + configurable: true + }); + return WacSpecificRequestContext; + }(OfficeCore.RequestContext)); + var WacWorkbook = (function (_super) { + __extends(WacWorkbook, _super); + function WacWorkbook() { + return _super !== null && _super.apply(this, arguments) || this; + } + WacWorkbook.prototype.createAndOpenWorkbook = function (base64) { + _invokeMethod(this, "CreateAndOpenWorkbook", 0, [base64], 0, 0); + }; + return WacWorkbook; + }(OfficeExtension.ClientObject)); + function createWorkbook(base64) { + _throwIfApiNotSupported("Excel.createWorkbook", _defaultApiSetName, "1.8", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + if (context instanceof WacSpecificRequestContext) { + context.wacWorkbook.createAndOpenWorkbook(base64); + } + else { + context.workbook.application.createWorkbook(base64).open(); + } + }); + } + Excel.createWorkbook = createWorkbook; + function lowerCaseFirst(str) { + return str[0].toLowerCase() + str.slice(1); + } + var iconSets = ["ThreeArrows", + "ThreeArrowsGray", + "ThreeFlags", + "ThreeTrafficLights1", + "ThreeTrafficLights2", + "ThreeSigns", + "ThreeSymbols", + "ThreeSymbols2", + "FourArrows", + "FourArrowsGray", + "FourRedToBlack", + "FourRating", + "FourTrafficLights", + "FiveArrows", + "FiveArrowsGray", + "FiveRating", + "FiveQuarters", + "ThreeStars", + "ThreeTriangles", + "FiveBoxes"]; + var iconNames = [["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], + ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], + ["RedFlag", "YellowFlag", "GreenFlag"], + ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], + ["RedDiamond", "YellowTriangle", "GreenCircle"], + ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], + ["RedCross", "YellowExclamation", "GreenCheck"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], + ["OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], + ["SilverStar", "HalfGoldStar", "GoldStar"], + ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], + ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; + Excel.icons = {}; + iconSets.map(function (title, i) { + var camelTitle = lowerCaseFirst(title); + Excel.icons[camelTitle] = []; + iconNames[i].map(function (iconName, j) { + iconName = lowerCaseFirst(iconName); + var obj = { set: title, index: j }; + Excel.icons[camelTitle].push(obj); + Excel.icons[camelTitle][iconName] = obj; + }); + }); + function setRangePropertiesInBulk(range, propertyName, values, apiFlags) { + var maxCellCount = 1500; + if (Array.isArray(values) && values.length > 0 && Array.isArray(values[0]) && (values.length * values[0].length > maxCellCount) && isExcel1_3OrAbove()) { + var maxRowCount = Math.max(1, Math.round(maxCellCount / values[0].length)); + range._ValidateArraySize(values.length, values[0].length); + for (var startRowIndex = 0; startRowIndex < values.length; startRowIndex += maxRowCount) { + var rowCount = maxRowCount; + if (startRowIndex + rowCount > values.length) { + rowCount = values.length - startRowIndex; + } + var chunk = range.getRow(startRowIndex).untrack().getBoundingRect(range.getRow(startRowIndex + rowCount - 1).untrack()).untrack(); + var valueSlice = values.slice(startRowIndex, startRowIndex + rowCount); + _invokeSetProperty(chunk, propertyName, valueSlice, apiFlags != null ? apiFlags : 0); + } + return true; + } + return false; + } + function isExcelApiSetSupported(version) { + return OfficeExtension.Utility.isSetSupported("ExcelApi", version.toString()); + } + function isExcel1_3OrAbove() { + return isExcelApiSetSupported(1.3); + } + function isOfficePlatform(platform) { + if (typeof (window) !== "undefined" && window.Office && window.Office.context) { + return window.Office.context.platform === platform; + } + return false; + } + var OperationStatus; + (function (OperationStatus) { + OperationStatus["NotStarted"] = "notStarted"; + OperationStatus["Running"] = "running"; + OperationStatus["Succeeded"] = "succeeded"; + OperationStatus["Failed"] = "failed"; + })(OperationStatus || (OperationStatus = {})); + var HttpStatusCode; + (function (HttpStatusCode) { + HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK"; + HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created"; + HttpStatusCode[HttpStatusCode["Accepted"] = 202] = "Accepted"; + HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent"; + HttpStatusCode[HttpStatusCode["HighestSuccessCode"] = 299] = "HighestSuccessCode"; + HttpStatusCode[HttpStatusCode["TooManyRequests"] = 429] = "TooManyRequests"; + HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError"; + HttpStatusCode[HttpStatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpStatusCode || (HttpStatusCode = {})); + var SessionOperation; + (function (SessionOperation) { + SessionOperation["Close"] = "Session.close"; + SessionOperation["CommitChanges"] = "Session.commitChanges"; + SessionOperation["Create"] = "Session.resolveRequestUrlAndHeaderInfo"; + SessionOperation["Refresh"] = "Session.refreshSession"; + })(SessionOperation = Excel.SessionOperation || (Excel.SessionOperation = {})); + var Session = (function () { + function Session(workbookUrl, requestHeaders, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.persistChanges, persistChanges = _c === void 0 ? true : _c, _d = _b.commitExplicitly, commitExplicitly = _d === void 0 ? true : _d; + this.m_requestId = ''; + this.m_workbookUrl = !workbookUrl ? '' : this.ensureUrlFormatEndWithSlash(workbookUrl); + this.m_requestHeaders = !requestHeaders ? {} : requestHeaders; + this.m_persistChanges = persistChanges; + this.m_commitExplicitly = commitExplicitly; + } + Object.defineProperty(Session.prototype, "requestId", { + get: function () { + return this.m_requestId; + }, + enumerable: true, + configurable: true + }); + Session.prototype.close = function () { + var _this = this; + if (this.m_requestUrlAndHeaderInfo && + !OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + var url = this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url) + Session.CLOSE_SESSION; + var req = { + method: 'POST', + url: url, + headers: this.m_requestUrlAndHeaderInfo.headers, + body: '' + }; + return OfficeExtension.HttpUtility.sendRequest(req).then(function (resp) { + if (resp.statusCode !== HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(resp, SessionOperation.Close); + } + _this.m_requestUrlAndHeaderInfo = null; + for (var key in _this.m_requestHeaders) { + if (key.toLowerCase() === Session.WorkbookSessionIdHeaderNameLower) { + delete _this.m_requestHeaders[key]; + break; + } + } + }); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + Session.prototype.commitChanges = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (!this.m_commitExplicitly) { + throw this.createError(HttpStatusCode.InternalServerError, 'Can not call commitChanges() if commitExplicitly is not set.', SessionOperation.CommitChanges); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.CommitChanges); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.CommitChanges); + } + var commitChangesRequestInfo = this.createCommitChangesRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(commitChangesRequestInfo).then(function (commitChangesResponseInfo) { + var statusCode = commitChangesResponseInfo.statusCode; + if (statusCode === HttpStatusCode.Accepted) { + return _this.delay(Session.POLL_DELAY) + .then(function (_) { + return _this.pollResourceLocation(_this.getHeaderIgnoreCase(commitChangesResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.CommitChanges, additionalRequestHeaders); + }) + .then(function (commitChangesResourceLocationResponseInfo) { + var operationStatusBody = JSON.parse(commitChangesResourceLocationResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(commitChangesResourceLocationResponseInfo, SessionOperation.CommitChanges); + } + return _this.parseCooldownTime(commitChangesResourceLocationResponseInfo); + }); + } + if (statusCode >= HttpStatusCode.OK && statusCode <= HttpStatusCode.HighestSuccessCode) { + return _this.parseCooldownTime(commitChangesResponseInfo); + } + throw _this.createErrorFromResponseInfo(commitChangesResponseInfo, SessionOperation.CommitChanges); + }); + }; + Session.prototype._resolveRequestUrlAndHeaderInfo = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (this.m_requestUrlAndHeaderInfo) { + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (this.getHeaderIgnoreCase(this.m_requestHeaders, Session.WorkbookSessionIdHeaderNameLower)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + var sessionRequestInfo = this.createAsyncGraphSessionRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(sessionRequestInfo).then(function (sessionResponseInfo) { + _this.m_requestId = _this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.REQUEST_ID_HEADER); + if (sessionResponseInfo.statusCode !== HttpStatusCode.Accepted && + sessionResponseInfo.statusCode !== HttpStatusCode.Created) { + throw _this.createErrorFromResponseInfo(sessionResponseInfo, SessionOperation.Create); + } + if (sessionResponseInfo.statusCode === HttpStatusCode.Created) { + _this.formatRequestUrlAndHeaderInfo(sessionResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + } + return _this.delay(Session.POLL_DELAY) + .then(function (_) { return _this.pollResourceLocation(_this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.Create, additionalRequestHeaders); }) + .then(function (operationStatusResponseInfo) { + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, SessionOperation.Create); + } + var sessionResourceLocationRequestInfo = { + method: 'GET', + url: operationStatusBody.resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: _this.getHeaderIgnoreCase(_this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined + }; + return OfficeExtension.HttpUtility.sendRequest(sessionResourceLocationRequestInfo).then(function (sessionResourceLocationResponseInfo) { + _this.formatRequestUrlAndHeaderInfo(sessionResourceLocationResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + }); + }); + }); + }; + Session.prototype.refreshSession = function () { + var _this = this; + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.Refresh); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.Refresh); + } + var refreshSessionRequestInfo = this.createRefreshSessionRequestInfo(); + return OfficeExtension.HttpUtility.sendRequest(refreshSessionRequestInfo).then(function (refreshSessionResponseInfo) { + var statusCode = refreshSessionResponseInfo.statusCode; + if (statusCode != HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(refreshSessionResponseInfo, SessionOperation.Refresh); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + }; + Session.prototype.getHeaderIgnoreCase = function (headers, headerName) { + var foundHeaders = Object.keys(headers).filter(function (key) { return key.toLowerCase() === headerName.toLowerCase(); }); + return foundHeaders.length > 0 ? headers[foundHeaders[0]] : undefined; + }; + Session.prototype.createCommitChangesRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + var url = this.getCorrectGraphVersionUrl() + Session.COMMIT_CHANGES; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.createAsyncGraphSessionRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + var url = this.getCorrectGraphVersionUrl() + Session.CREATE_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: { persistChanges: this.m_persistChanges, commitExplicitly: this.m_commitExplicitly } + }; + }; + Session.prototype.createRefreshSessionRequestInfo = function () { + var url = this.getCorrectGraphVersionUrl() + Session.REFRESH_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.getCorrectGraphVersionUrl = function () { + return this.m_workbookUrl.replace(new RegExp('graph\.microsoft\.com\/.*?\/'), "graph.microsoft.com/" + Session.ASYNC_API_GRAPH_VERSION + "/"); + }; + Session.prototype.pollResourceLocation = function (resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (pollAttempt === void 0) { + pollAttempt = 0; + } + if (pollAttempt >= Session.MAX_POLL_ATTEMPTS) { + throw this.createError(HttpStatusCode.InternalServerError, 'Timout while polling for the resource location.', sessionOperation); + } + var operationStatusRequestInfo = { + method: 'GET', + url: resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: this.getHeaderIgnoreCase(this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined + }; + return OfficeExtension.HttpUtility.sendRequest(operationStatusRequestInfo).then(function (operationStatusResponseInfo) { + if (operationStatusResponseInfo.statusCode !== HttpStatusCode.OK) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + } + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + switch (operationStatusBody.status) { + case OperationStatus.Succeeded: + return operationStatusResponseInfo; + case OperationStatus.Failed: + return operationStatusResponseInfo; + case OperationStatus.NotStarted: + case OperationStatus.Running: + return _this.delay(Session.POLL_DELAY).then(function (_) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + }); + default: + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, sessionOperation); + } + }); + }; + Session.prototype.parseCooldownTime = function (responseInfo) { + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + return !retryAfter + ? Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER + : parseInt(retryAfter) * 1000; + }; + Session.prototype.formatRequestUrlAndHeaderInfo = function (responseInfo) { + if (responseInfo.statusCode !== HttpStatusCode.OK && responseInfo.statusCode !== HttpStatusCode.Created) { + throw this.createErrorFromResponseInfo(responseInfo, SessionOperation.Create); + } + var session = JSON.parse(responseInfo.body); + var sessionId = session.id; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + headers[Session.WorkbookSessionIdHeaderName] = sessionId; + this.m_requestUrlAndHeaderInfo = { url: this.getCorrectGraphVersionUrl(), headers: headers }; + }; + Session.prototype.ensureUrlFormatEndWithSlash = function (url) { + if (url.charAt(url.length - 1) !== '/') { + url += '/'; + } + return url; + }; + Session.prototype.delay = function (milliseconds) { + return new OfficeExtension.CoreUtility.Promise(function (res, _) { return setTimeout(function () { return res(); }, milliseconds); }); + }; + Session.prototype.createErrorFromResponseInfo = function (responseInfo, locationThrown) { + var err = OfficeExtension.Utility._parseErrorResponse(responseInfo); + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + var data = { + retryAfter: retryAfter, + responseBody: OfficeExtension.Utility._parseErrorResponseBody(responseInfo) + }; + return OfficeExtension.Utility.createRuntimeError(err.errorCode, err.errorMessage, locationThrown, responseInfo.statusCode, data); + }; + Session.prototype.createError = function (code, message, locationThrown) { + return OfficeExtension.Utility.createRuntimeError('' + code, message, locationThrown); + }; + Session.WorkbookSessionIdHeaderName = 'Workbook-Session-Id'; + Session.WorkbookSessionIdHeaderNameLower = 'workbook-session-id'; + Session.ASYNC_API_GRAPH_VERSION = 'beta'; + Session.POLL_DELAY = 10000; + Session.MAX_POLL_ATTEMPTS = 10; + Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER = 10000; + Session.LOCATION_HEADER = 'location'; + Session.AUTHORIZATION_HEADER = 'authorization'; + Session.REQUEST_ID_HEADER = 'request-id'; + Session.RETRY_AFTER_HEADER = 'retry-after'; + Session.PREFER_HEADER = 'Prefer'; + Session.PREFER_HEADER_VAL = 'respond-async'; + Session.CONTENT_TYPE_HEADER = 'Content-Type'; + Session.CONTENT_TYPE_HEADER_VAL = 'application/json'; + Session.CLOSE_SESSION = 'closeSession'; + Session.COMMIT_CHANGES = 'commitChanges'; + Session.CREATE_SESSION = 'createSession'; + Session.REFRESH_SESSION = 'refreshSession'; + return Session; + }()); + Excel.Session = Session; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + var _this = _super.call(this, url) || this; + _this.m_workbook = _createRootServiceObject(Excel.Workbook, _this); + _this._rootObject = _this.m_workbook; + _this._rootObjectPropertyName = "workbook"; + return _this; + } + RequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext = 5004; + if (officeJsErrorCode === ooeInvalidApiCallInContext) { + response.ErrorCode = ErrorCodes.invalidOperationInCellEditMode; + response.HttpStatusCode = 400; + response.ErrorMessage = OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; + Object.defineProperty(RequestContext.prototype, "workbook", { + get: function () { + return this.m_workbook; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "application", { + get: function () { + return this.workbook.application; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "runtime", { + get: function () { + return this.workbook._Runtime; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeCore.RequestContext)); + Excel.RequestContext = RequestContext; + var Recorder = (function () { + function Recorder() { + } + Recorder.enableMacroRecordingEvent = function (context) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = true; + var registerEventHandler = function (context) { + context.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent] = "true"; + context.workbook.onRecordingStateChangedEvent.add(function (args) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = args.recording; + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + if (context !== undefined && context !== null) { + return registerEventHandler(context); + } + return run(function (context) { + return registerEventHandler(context); + }); + }; + return Recorder; + }()); + Excel.Recorder = Recorder; + function onBeforeExcelRun(options, context) { + var excelOptions = options; + if (excelOptions.delayForCellEdit && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + context._requestFlagModifier |= 64; + } + else { + context._requestFlagModifier &= ~64; + } + if (excelOptions._makerSafe) { + context._requestFlagModifier |= 1024; + } + } + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.run = run; + function runBatch(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.runBatch = runBatch; + Excel._RedirectV1APIs = false; + Excel._V1APIMap = { + "GetDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GetSelectedDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.getSelectedData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GoToByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.gotoById(callArgs); } + }, + "AddColumnsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddColumns(callArgs); } + }, + "AddFromSelectionAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromSelection(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromNamedItemAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromNamedItem(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromPromptAsync": { + call: function (ctx, callArgs) { + if (versionNumberIsEarlierThan({ ios: { desiredMajor: 2, desiredMinor: 20, desiredBuild: 0 } }) && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + ctx._requestFlagModifier |= 64; + } + return ctx.workbook._V1Api.bindingAddFromPrompt(callArgs); + }, + postprocess: postprocessBindingDescriptor + }, + "AddRowsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddRows(callArgs); } + }, + "GetByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetById(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "ReleaseByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingReleaseById(callArgs); } + }, + "GetAllAsync": { + call: function (ctx) { return ctx.workbook._V1Api.bindingGetAll(); }, + postprocess: function (response) { + return response.bindings.map(function (descriptor) { return postprocessBindingDescriptor(descriptor); }); + } + }, + "DeleteAllDataValuesAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingDeleteAllDataValues(callArgs); } + }, + "SetSelectedDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.setSelectedData(callArgs); } + }, + "SetDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetData(callArgs); } + }, + "SetFormatsAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetFormats(callArgs); } + }, + "SetTableOptionsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetTableOptions(callArgs); } + }, + "ClearFormatsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } + }, + "GetFilePropertiesAsync": { + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } + } + }; + function postprocessBindingDescriptor(response) { + var bindingDescriptor = { + BindingColumnCount: response.bindingColumnCount, + BindingId: response.bindingId, + BindingRowCount: response.bindingRowCount, + bindingType: response.bindingType, + HasHeaders: response.hasHeaders + }; + return window.OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, window.Microsoft.Office.WebExtension.context.document); + } + function getDataCommonPostprocess(response, callArgs) { + var isPlainData = response.headers == null; + var data; + if (isPlainData) { + data = response.rows; + } + else { + data = response; + } + data = window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data === undefined ? null : data; + } + function versionNumberIsEarlierThan(versionsForPlatformMap) { + var hasOfficeVersion = typeof (window) !== "undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var platform = window.Office.context.diagnostics.platform.toLowerCase(); + if (platform === 'officeonline') { + return false; + } + var versionForCurrentPlatform = versionsForPlatformMap[platform]; + if (versionForCurrentPlatform == null) { + versionForCurrentPlatform = versionsForPlatformMap.general; + } + var version = window.Office.context.diagnostics.version; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(version); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (major < versionForCurrentPlatform.desiredMajor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor < versionForCurrentPlatform.desiredMinor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor === versionForCurrentPlatform.desiredMinor && build < versionForCurrentPlatform.desiredBuild) { + var revisionString = result[4]; + var devBuildValidation = /^3\d\d\d+$/; + var isDevBuild = devBuildValidation.exec(revisionString); + if (isDevBuild) { + return true; + } + } + } + return false; + } + var ALWAYS_TRUE_PLACEHOLDER_OVERRIDE = true; + var _CC; + (function (_CC) { + _CC.office10EventIdBindingSelectionChangedEvent = 3; + _CC.office10EventIdBindingDataChangedEvent = 4; + _CC.office10EventIdDocumentSelectionChangedEvent = 2; + _CC.office10EventIdRichApiMessageEvent = 5; + _CC.office10EventIdSettingsChangedEvent = 1; + })(_CC = Excel._CC || (Excel._CC = {})); + var _hostName = "Excel"; + var _defaultApiSetName = "ExcelApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var RangeValuesPreviewCustom = (function () { + function RangeValuesPreviewCustom() { + } + Object.defineProperty(RangeValuesPreviewCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return RangeValuesPreviewCustom; + }()); + Excel.RangeValuesPreviewCustom = RangeValuesPreviewCustom; + (function (_CC) { + function Application_SuspendApiCalculationUntilNextSync(thisObj) { + if (isOfficePlatform("Mac") && isExcelApiSetSupported(1.6) && !isExcelApiSetSupported(1.7)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Application_SuspendApiCalculationUntilNextSync = Application_SuspendApiCalculationUntilNextSync; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Workbook_EnableOfficeScriptRecording(thisObj, eventId) { + this.context.eventId = eventId; + return { handled: false }; + } + _CC.Workbook_EnableOfficeScriptRecording = Workbook_EnableOfficeScriptRecording; + function Workbook_RecordAction(thisObj, payload) { + this.context.sdxPayload = payload; + return { handled: false }; + } + _CC.Workbook_RecordAction = Workbook_RecordAction; + function Workbook_SelectionChanged_EventArgsTransform(thisObj, args) { + return { workbook: thisObj }; + } + _CC.Workbook_SelectionChanged_EventArgsTransform = Workbook_SelectionChanged_EventArgsTransform; + function Workbook_WACOperationEvent_EventArgsTransform(thisObj, args) { + var event = { + eventId: args.eventId, + payload: args.payload, + type: Excel.EventType.wacoperationEvent + }; + return event; + } + _CC.Workbook_WACOperationEvent_EventArgsTransform = Workbook_WACOperationEvent_EventArgsTransform; + function Workbook__Message_EventArgsTransform(thisObj, args) { + return { + entries: args.entries, + workbook: thisObj + }; + } + _CC.Workbook__Message_EventArgsTransform = Workbook__Message_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Worksheet_Charts_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Charts_Get = Worksheet_Charts_Get; + function Worksheet_Comments_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Comments_Get = Worksheet_Comments_Get; + function Worksheet_Names_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Names_Get = Worksheet_Names_Get; + function Worksheet_PivotTables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_PivotTables_Get = Worksheet_PivotTables_Get; + function Worksheet_RangeValuesPreview_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_RangeValuesPreview_Get = Worksheet_RangeValuesPreview_Get; + function Worksheet_Shapes_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Shapes_Get = Worksheet_Shapes_Get; + function Worksheet_ShowGridlines_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showGridlines = value; + _invokeSetProperty(thisObj, "Gridlines", value, _calculateApiFlags(2, "ExcelApiUndo", "1.16")); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowGridlines_Set = Worksheet_ShowGridlines_Set; + function Worksheet_ShowHeadings_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showHeadings = value; + _invokeSetProperty(thisObj, "Headings", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowHeadings_Set = Worksheet_ShowHeadings_Set; + function Worksheet_Tables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Tables_Get = Worksheet_Tables_Get; + function Worksheet_Visuals_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Visuals_Get = Worksheet_Visuals_Get; + function Worksheet_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState + }; + return newArgs; + } + _CC.Worksheet_Changed_EventArgsTransform = Worksheet_Changed_EventArgsTransform; + function Worksheet_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.Worksheet_FormatChanged_EventArgsTransform = Worksheet_FormatChanged_EventArgsTransform; + function Worksheet_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.Worksheet_FormulaChanged_EventArgsTransform = Worksheet_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function _overrideWorksheetCollectionEventMethod(thisObj, methodName, apiVersion) { + if ((!isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.12)) || + (isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.11))) { + _throwIfApiNotSupported("WorksheetCollection." + methodName, _defaultApiSetName, apiVersion, _hostName); + _invokeMethod(thisObj, methodName, 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + function WorksheetCollection__RegisterActivatedEvent(thisObj) { + if (!isExcelApiSetSupported(1.9)) { + _throwIfApiNotSupported("WorksheetCollection._RegisterActivatedEvent", _defaultApiSetName, "1.7", _hostName); + _invokeMethod(thisObj, "_RegisterActivatedEvent", 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetCollection__RegisterActivatedEvent = WorksheetCollection__RegisterActivatedEvent; + function WorksheetCollection__RegisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterAddedEvent = WorksheetCollection__RegisterAddedEvent; + function WorksheetCollection__RegisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterColumnSortedEvent = WorksheetCollection__RegisterColumnSortedEvent; + function WorksheetCollection__RegisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__RegisterDataChangedEvent = WorksheetCollection__RegisterDataChangedEvent; + function WorksheetCollection__RegisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterDeletedEvent = WorksheetCollection__RegisterDeletedEvent; + function WorksheetCollection__RegisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterRowSortedEvent = WorksheetCollection__RegisterRowSortedEvent; + function WorksheetCollection__UnregisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterAddedEvent = WorksheetCollection__UnregisterAddedEvent; + function WorksheetCollection__UnregisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterColumnSortedEvent = WorksheetCollection__UnregisterColumnSortedEvent; + function WorksheetCollection__UnregisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__UnregisterDataChangedEvent = WorksheetCollection__UnregisterDataChangedEvent; + function WorksheetCollection__UnregisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterDeletedEvent = WorksheetCollection__UnregisterDeletedEvent; + function WorksheetCollection__UnregisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterRowSortedEvent = WorksheetCollection__UnregisterRowSortedEvent; + function WorksheetCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState + }; + return newArgs; + } + _CC.WorksheetCollection_Changed_EventArgsTransform = WorksheetCollection_Changed_EventArgsTransform; + function WorksheetCollection_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.WorksheetCollection_FormatChanged_EventArgsTransform = WorksheetCollection_FormatChanged_EventArgsTransform; + function WorksheetCollection_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.WorksheetCollection_FormulaChanged_EventArgsTransform = WorksheetCollection_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function WorksheetProtection_Protect(thisObj, options, password) { + if (versionNumberIsEarlierThan({ + mac: { desiredMajor: 16, desiredMinor: 7, desiredBuild: 17101600 }, + ios: { desiredMajor: 2, desiredMinor: 7, desiredBuild: 1016 }, + general: { desiredMajor: 16, desiredMinor: 0, desiredBuild: 8716 } + })) { + _invokeMethod(thisObj, "Protect", 0, [options], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetProtection_Protect = WorksheetProtection_Protect; + })(_CC = Excel._CC || (Excel._CC = {})); + var RangeCustom = (function () { + function RangeCustom() { + } + RangeCustom.prototype._ensureInteger = function (num, methodName) { + if (!(typeof num === "number" && isFinite(num) && Math.floor(num) === num)) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + } + }; + RangeCustom.prototype._getAdjacentRange = function (functionName, count, referenceRange, rowDirection, columnDirection) { + if (count == null) { + count = 1; + } + this._ensureInteger(count, functionName); + var startRange; + var rowOffset = 0; + var columnOffset = 0; + if (count > 0) { + startRange = referenceRange.getOffsetRange(rowDirection, columnDirection); + } + else { + startRange = referenceRange; + rowOffset = rowDirection; + columnOffset = columnDirection; + } + if (Math.abs(count) === 1) { + return startRange; + } + return startRange.getBoundingRect(referenceRange.getOffsetRange(rowDirection * count + rowOffset, columnDirection * count + columnOffset)); + }; + return RangeCustom; + }()); + Excel.RangeCustom = RangeCustom; + (function (_CC) { + function Range_HandleResult(thisObj, value) { + if (!_isUndefined(value["isEntireColumn"])) { + thisObj.m_isEntireColumn = value["isEntireColumn"]; + } + if (!_isUndefined(value["isEntireRow"])) { + thisObj.m_isEntireRow = value["isEntireRow"]; + } + } + _CC.Range_HandleResult = Range_HandleResult; + function Range_GetColumnsAfter(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsAfter", count, thisObj.getLastColumn(), 0, 1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsAfter = Range_GetColumnsAfter; + function Range_GetColumnsBefore(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsBefore", count, thisObj.getColumn(0), 0, -1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsBefore = Range_GetColumnsBefore; + function Range_GetResizedRange(thisObj, deltaRows, deltaColumns) { + if (!isExcel1_3OrAbove()) { + thisObj._ensureInteger(deltaRows, "getResizedRange"); + thisObj._ensureInteger(deltaColumns, "getResizedRange"); + var referenceRange = (deltaRows >= 0 && deltaColumns >= 0) ? thisObj : thisObj.getCell(0, 0); + var result = referenceRange.getBoundingRect(thisObj.getLastCell().getOffsetRange(deltaRows, deltaColumns)); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetResizedRange = Range_GetResizedRange; + function Range_GetRowsAbove(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = thisObj._getAdjacentRange("getRowsAbove", count, thisObj.getRow(0), -1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsAbove = Range_GetRowsAbove; + function Range_GetRowsBelow(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = this._getAdjacentRange("getRowsBelow", count, thisObj.getLastRow(), 1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsBelow = Range_GetRowsBelow; + function Range_Formulas_Set(thisObj, value) { + thisObj.m_formulas = value; + if (setRangePropertiesInBulk(thisObj, "Formulas", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Formulas_Set = Range_Formulas_Set; + function Range_FormulasLocal_Set(thisObj, value) { + thisObj.m_formulasLocal = value; + if (setRangePropertiesInBulk(thisObj, "FormulasLocal", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasLocal_Set = Range_FormulasLocal_Set; + function Range_FormulasR1C1_Set(thisObj, value) { + thisObj.m_formulasR1C1 = value; + if (setRangePropertiesInBulk(thisObj, "FormulasR1C1", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasR1C1_Set = Range_FormulasR1C1_Set; + function Range_NumberFormat_Set(thisObj, value) { + thisObj.m_numberFormat = value; + if (setRangePropertiesInBulk(thisObj, "NumberFormat", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_NumberFormat_Set = Range_NumberFormat_Set; + function Range_Values_Set(thisObj, value) { + thisObj.m_values = value; + if (setRangePropertiesInBulk(thisObj, "Values", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Values_Set = Range_Values_Set; + function Range_ValuesAsJson_Set(thisObj, value) { + thisObj.m_valuesAsJson = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJson", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJson_Set = Range_ValuesAsJson_Set; + function Range_ValuesAsJsonLocal_Set(thisObj, value) { + thisObj.m_valuesAsJsonLocal = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJsonLocal", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJsonLocal_Set = Range_ValuesAsJsonLocal_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function SettingCollection_Add(thisObj, key, value) { + value = _CC._replaceDateWithStringDate(value); + var result = _createMethodObject(Excel.Setting, thisObj, "Add", 0, [key, value], false, true, null, 0); + return { handled: true, result: result }; + } + _CC.SettingCollection_Add = SettingCollection_Add; + function SettingCollection_SettingsChanged_EventArgsTransform(thisObj, args) { + return { + settings: thisObj + }; + } + _CC.SettingCollection_SettingsChanged_EventArgsTransform = SettingCollection_SettingsChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + var DateJSONPrefix = "Date("; + var DateJSONSuffix = ")"; + function _replaceStringDateWithDate(value) { + var strValue = JSON.stringify(value); + value = JSON.parse(strValue, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === DateJSONPrefix && v.slice(-1) === DateJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + return value; + } + function _replaceDateWithStringDate(value) { + var strValue = JSON.stringify(value, function dateReplacer(k, v) { + return (this[k] instanceof Date) ? (DateJSONPrefix + this[k].getTime() + DateJSONSuffix) : v; + }); + value = JSON.parse(strValue); + return value; + } + _CC._replaceDateWithStringDate = _replaceDateWithStringDate; + function Setting_HandleResult(thisObj, value) { + if (!_isUndefined(value["Value"])) { + value["Value"] = _replaceStringDateWithDate(value["Value"]); + } + ; + } + _CC.Setting_HandleResult = Setting_HandleResult; + function Setting_Value_Set(thisObj, value) { + if (!_isNullOrUndefined(value)) { + thisObj.m_value = value; + var newValue = _replaceDateWithStringDate(value); + _invokeSetProperty(thisObj, "Value", newValue, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Setting_Value_Set = Setting_Value_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + var NamedItemCollectionCustom = (function () { + function NamedItemCollectionCustom() { + } + Object.defineProperty(NamedItemCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItemCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return NamedItemCollectionCustom; + }()); + Excel.NamedItemCollectionCustom = NamedItemCollectionCustom; + (function (_CC) { + function Binding_DataChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj + }; + return evt; + } + _CC.Binding_DataChanged_EventArgsTransform = Binding_DataChanged_EventArgsTransform; + function Binding_SelectionChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj, + columnCount: args.columnCount, + rowCount: args.rowCount, + startColumn: args.startColumn, + startRow: args.startRow + }; + return evt; + } + _CC.Binding_SelectionChanged_EventArgsTransform = Binding_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var TableCollectionCustom = (function () { + function TableCollectionCustom() { + } + Object.defineProperty(TableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return TableCollectionCustom; + }()); + Excel.TableCollectionCustom = TableCollectionCustom; + (function (_CC) { + function TableCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.TableCollection_Changed_EventArgsTransform = TableCollection_Changed_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Table_HandleIdResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleIdResult = Table_HandleIdResult; + function Table_HandleResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleResult = Table_HandleResult; + function Table_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.Table_Changed_EventArgsTransform = Table_Changed_EventArgsTransform; + function Table_SelectionChanged_EventArgsTransform(thisObj, args) { + var value = args; + var isAddressNullOrEmpty = (!value.address || value.address.length === 0); + var newArgs = { + type: Excel.EventType.tableSelectionChanged, + isInsideTable: !isAddressNullOrEmpty, + worksheetId: value.worksheetId, + tableId: thisObj.id, + address: value.address + }; + return newArgs; + } + _CC.Table_SelectionChanged_EventArgsTransform = Table_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartCollectionCustom = (function () { + function ChartCollectionCustom() { + } + Object.defineProperty(ChartCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ChartCollectionCustom; + }()); + Excel.ChartCollectionCustom = ChartCollectionCustom; + (function (_CC) { + function ChartCollection_Add(thisObj, type, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); + } + return { handled: false, result: null }; + } + _CC.ChartCollection_Add = ChartCollection_Add; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Chart_SetData(thisObj, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); + } + return { handled: false }; + } + _CC.Chart_SetData = Chart_SetData; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartFillCustom = (function () { + function ChartFillCustom() { + } + ChartFillCustom.prototype.load = function (option) { + _load(this, option); + return this; + }; + return ChartFillCustom; + }()); + Excel.ChartFillCustom = ChartFillCustom; + var VisualCollectionCustom = (function () { + function VisualCollectionCustom() { + } + Object.defineProperty(VisualCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return VisualCollectionCustom; + }()); + Excel.VisualCollectionCustom = VisualCollectionCustom; + (function (_CC) { + function VisualCollection_AgaveVisualUpdate_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: value.type, + payload: value.payload + }; + return newArgs; + } + _CC.VisualCollection_AgaveVisualUpdate_EventArgsTransform = VisualCollection_AgaveVisualUpdate_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Visual_ChangeNotification_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + targetId: value.targetId, + changeType: value.changeType, + payload: value.payload, + type: Excel.EventType.visualChange + }; + return newArgs; + } + _CC.Visual_ChangeNotification_EventArgsTransform = Visual_ChangeNotification_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var PivotTableCollectionCustom = (function () { + function PivotTableCollectionCustom() { + } + Object.defineProperty(PivotTableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return PivotTableCollectionCustom; + }()); + Excel.PivotTableCollectionCustom = PivotTableCollectionCustom; + (function (_CC) { + function PivotLayout_GetColumnLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetColumnLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetColumnLabelRange = PivotLayout_GetColumnLabelRange; + function PivotLayout_GetDataBodyRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetDataBodyRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataBodyRange = PivotLayout_GetDataBodyRange; + function PivotLayout_GetDataHierarchy(thisObj, cell) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + _throwIfApiNotSupported("PivotLayout.getDataHierarchy", _defaultApiSetName, "1.9", _hostName); + var result = _createMethodObject(Excel.DataPivotHierarchy, thisObj, "GetDataHierarchy", 0, [cell], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataHierarchy = PivotLayout_GetDataHierarchy; + function PivotLayout_GetFilterAxisRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetFilterAxisRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetFilterAxisRange = PivotLayout_GetFilterAxisRange; + function PivotLayout_GetRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRange = PivotLayout_GetRange; + function PivotLayout_GetRowLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRowLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRowLabelRange = PivotLayout_GetRowLabelRange; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function PivotField_SortByLabels(thisObj, sortBy) { + if (typeof sortBy === "string") { + sortBy = (sortBy.toLowerCase() === "ascending"); + } + _invokeMethod(thisObj, "SortByLabels", 0, [sortBy], 0, 0); + return { handled: true }; + } + _CC.PivotField_SortByLabels = PivotField_SortByLabels; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormattingService_GetFormatter(thisObj, format) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatting.GetFormatter", "NumberFormatting", "1.1", _hostName); + var result = _createMethodObject(Excel.NumberFormatter, thisObj, "GetFormatter", 0, [format], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormattingService_GetFormatter = NumberFormattingService_GetFormatter; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormatter_Format(thisObj, value) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatter.Format", "NumberFormatting", "1.1", _hostName); + var result = _invokeMethod(thisObj, "Format", 0, [value], 0, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormatter_Format = NumberFormatter_Format; + })(_CC = Excel._CC || (Excel._CC = {})); + var CustomFunctionManagerCustom = (function () { + function CustomFunctionManagerCustom() { + } + CustomFunctionManagerCustom.register = function (metadata, javascript) { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { return Excel.CustomFunctionManager.newObject(context).register(metadata, javascript); }); + }; + CustomFunctionManagerCustom.getStatus = function () { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + var manager = Excel.CustomFunctionManager.newObject(context).load("status"); + return context.sync().then(function () { return manager.status; }); + }); + }; + return CustomFunctionManagerCustom; + }()); + Excel.CustomFunctionManagerCustom = CustomFunctionManagerCustom; + (function (_CC) { + function CustomFunctionManager_StaticCustomize(type) { + type.register = CustomFunctionManagerCustom.register; + type.getStatus = CustomFunctionManagerCustom.getStatus; + } + _CC.CustomFunctionManager_StaticCustomize = CustomFunctionManager_StaticCustomize; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Style_TextOrientation_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_textOrientation = value; + _invokeSetProperty(thisObj, "Orientation", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Style_TextOrientation_Set = Style_TextOrientation_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function InternalTest_Test1Event_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_Test1Event_EventArgsTransform = InternalTest_Test1Event_EventArgsTransform; + function InternalTest_TestEvent_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_TestEvent_EventArgsTransform = InternalTest_TestEvent_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var CommentCollectionCustom = (function () { + function CommentCollectionCustom() { + } + Object.defineProperty(CommentCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return CommentCollectionCustom; + }()); + Excel.CommentCollectionCustom = CommentCollectionCustom; + var ShapeCollectionCustom = (function () { + function ShapeCollectionCustom() { + } + Object.defineProperty(ShapeCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ShapeCollectionCustom; + }()); + Excel.ShapeCollectionCustom = ShapeCollectionCustom; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["accessDenied"] = "AccessDenied"; + ErrorCodes["apiNotFound"] = "ApiNotFound"; + ErrorCodes["conflict"] = "Conflict"; + ErrorCodes["emptyChartSeries"] = "EmptyChartSeries"; + ErrorCodes["filteredRangeConflict"] = "FilteredRangeConflict"; + ErrorCodes["formulaLengthExceedsLimit"] = "FormulaLengthExceedsLimit"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["inactiveWorkbook"] = "InactiveWorkbook"; + ErrorCodes["insertDeleteConflict"] = "InsertDeleteConflict"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidBinding"] = "InvalidBinding"; + ErrorCodes["invalidOperation"] = "InvalidOperation"; + ErrorCodes["invalidReference"] = "InvalidReference"; + ErrorCodes["invalidSelection"] = "InvalidSelection"; + ErrorCodes["itemAlreadyExists"] = "ItemAlreadyExists"; + ErrorCodes["itemNotFound"] = "ItemNotFound"; + ErrorCodes["mergedRangeConflict"] = "MergedRangeConflict"; + ErrorCodes["nonBlankCellOffSheet"] = "NonBlankCellOffSheet"; + ErrorCodes["notImplemented"] = "NotImplemented"; + ErrorCodes["openWorkbookLinksBlocked"] = "OpenWorkbookLinksBlocked"; + ErrorCodes["operationCellsExceedLimit"] = "OperationCellsExceedLimit"; + ErrorCodes["pivotTableRangeConflict"] = "PivotTableRangeConflict"; + ErrorCodes["powerQueryRefreshResourceChallenge"] = "PowerQueryRefreshResourceChallenge"; + ErrorCodes["rangeExceedsLimit"] = "RangeExceedsLimit"; + ErrorCodes["refreshWorkbookLinksBlocked"] = "RefreshWorkbookLinksBlocked"; + ErrorCodes["requestAborted"] = "RequestAborted"; + ErrorCodes["responsePayloadSizeLimitExceeded"] = "ResponsePayloadSizeLimitExceeded"; + ErrorCodes["unsupportedFeature"] = "UnsupportedFeature"; + ErrorCodes["unsupportedFillType"] = "UnsupportedFillType"; + ErrorCodes["unsupportedOperation"] = "UnsupportedOperation"; + ErrorCodes["unsupportedSheet"] = "UnsupportedSheet"; + ErrorCodes["invalidOperationInCellEditMode"] = "InvalidOperationInCellEditMode"; + })(ErrorCodes = Excel.ErrorCodes || (Excel.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = {})); + var _libraryMetadataXlapi = { "version": "1.0.0", + "name": "Excel", + "defaultApiSetName": "ExcelApi", + "hostName": "Excel", + "apiSets": [["1.19", "ExcelApiUndo"], ["1.1", "Recorder"], ["99.9"], ["1.4", "ExcelApiUndo"], ["1.8"], ["1.9"], ["1.11"], ["1.18"], ["1.6"], ["1.6", "ExcelApiUndo"], ["1.7"], ["1.1", "ExcelApiUndo"], ["1.2"], ["1.3"], ["1.4"], ["1.5"], ["1.10"], ["1.14"], ["1.1", "ExcelApiOnline"], ["1.1", "CustomFunctions"], ["1.1", "WACOperationEvents"], ["1.3", "ExcelApiUndo"], ["1.13"], ["1.16"], ["1.8", "ExcelApiUndo"], ["1.16", "ExcelApiUndo"], ["1.12"], ["1.2", "ExcelApiOnline"], ["1.2", "ExcelApiUndo"], ["1.17"], ["1.7", "ExcelApiUndo"], ["1.10", "ExcelApiUndo"], ["1.14", "ExcelApiUndo"], ["1.15", "ExcelApiUndo"], ["1.15"], ["1.17", "ExcelApiUndo"], ["99.99", "ExcelApiUndo"], ["1.9", "ExcelApiUndo"], ["1.11", "ExcelApiUndo"], ["1.12", "ExcelApiUndo"], ["1.13", "ExcelApiUndo"], ["1.18", "ExcelApiUndo"]], + "strings": [], + "enumTypes": [["UndoChangeType", ["undoAction", "redoAction", "undoOrRedoCleared", "undoGroupAdded"]], + ["SDX", ["guidedReapply"]], + ["BusinessBarEntryType", [], { "officeScriptsRunningStatus": 0, "msFormsDataSyncRunningStatus": 1 }], + ["FormulaReferenceStyle", ["a1", "r1C1"]], + ["NavigationObjectType", ["table", "pivotTable", "chart", "shape", "namedRange"]], + ["UserActivityType", ["none", "insertSheet", "deleteSheet", "renameSheet", "changeCell", "insertRow", "insertColumn", "deleteRow", "deleteColumn", "insertPartialRow", "insertPartialColumn", "insertPartialColumnRightToLeft", "deletePartialRow", "deletePartialColumn", "deletePartialColumnRightToLeft", "move", "sort", "mergeCells", "unmergeCells", "unknownOperation", "genericEdit"]], + ["LineageEndOfLogStatus", ["loadInProgress", "success", "endOfLog", "purged", "trimmed", "unsupported", "cleared", "error"]], + ["LineageLoadType", ["new", "next", "previous", "latest"]], + ["LoadToType", ["connectionOnly", "table", "pivotTable", "pivotChart"]], + ["QueryError", ["unknown", "none", "failedLoadToWorksheet", "failedLoadToDataModel", "failedDownload", "failedToCompleteDownload"]], + ["RangeOptimizationType", ["other", "numberFormat", "textAlignment", "textProperties", "cellBorder", "fillColor", "sheetProtection", "rowHeight", "rowVisibility"]], + ["WorkbookLinksHardToFindMessages", ["none", "containsDefinedNames", "hiddenOrVeryHiddenSheet", "hiddenFloatingObjects", "lockedFloatingObjectsThroughVba", "protectedSheet", "containsConditionalFormatting", "containsDataValidation", "hiddenRowsAndColumns"]], + ["WorkbookLinksIconState", ["ok", "moreInfo", "warning"]], + ["WorkbookLinksRefreshSettings", ["ask", "always", "never"]], + ["WorkbookConditionalFormattingRulesManagerScope", ["defaultScope", "selectedRange", "activatedWorksheet", "activatedTable", "activatedPivotTable"]], + ["WorkbookLinksRefreshMode", ["manual", "automatic"]], + ["HelpTopic", ["showChanges", "guidedReapply", "externalCodeServiceDiagnostics"]], + ["DocumentTaskChangeAction", [], { "unknown": "unknown", "create": "create", "assign": "assign", "unassign": "unassign", "unassignAll": "unassignAll", "setSchedule": "setSchedule", "setPercentComplete": "setPercentComplete", "setPriority": "setPriority", "remove": "remove", "restore": "restore", "setTitle": "setTitle", "undo": "undo" }], + ["DataSourceType", ["unknown", "cube", "localRange", "localTable", "oledbDefault"]], + ["DateFilterCondition", ["unknown", "equals", "before", "beforeOrEqualTo", "after", "afterOrEqualTo", "between", "tomorrow", "today", "yesterday", "nextWeek", "thisWeek", "lastWeek", "nextMonth", "thisMonth", "lastMonth", "nextQuarter", "thisQuarter", "lastQuarter", "nextYear", "thisYear", "lastYear", "yearToDate", "allDatesInPeriodQuarter1", "allDatesInPeriodQuarter2", "allDatesInPeriodQuarter3", "allDatesInPeriodQuarter4", "allDatesInPeriodJanuary", "allDatesInPeriodFebruary", "allDatesInPeriodMarch", "allDatesInPeriodApril", "allDatesInPeriodMay", "allDatesInPeriodJune", "allDatesInPeriodJuly", "allDatesInPeriodAugust", "allDatesInPeriodSeptember", "allDatesInPeriodOctober", "allDatesInPeriodNovember", "allDatesInPeriodDecember"]], + ["LabelFilterCondition", ["unknown", "equals", "beginsWith", "endsWith", "contains", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between"]], + ["PivotFilterType", ["unknown", "value", "manual", "label", "date"]], + ["TopBottomSelectionType", ["items", "percent", "sum"]], + ["ValueFilterCondition", ["unknown", "equals", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between", "topN", "bottomN"]], + ["BuiltInPivotTableStyle", ["none", "light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "light22", "light23", "light24", "light25", "light26", "light27", "light28", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11", "dark12", "dark13", "dark14", "dark15", "dark16", "dark17", "dark18", "dark19", "dark20", "dark21", "dark22", "dark23", "dark24", "dark25", "dark26", "dark27", "dark28"]], + ["BuiltInSlicerStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "other1", "other2", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6"]], + ["BuiltInTableStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11"]], + ["ChartSeriesDimension", ["categories", "values", "bubbleSizes"], { "xvalues": "XValues", "yvalues": "YValues" }], + ["PivotTableDateGroupBy", ["invalid", "bySeconds", "byMinutes", "byHours", "byDays", "byMonths", "byQuarters", "byYears"]], + ["PivotFilterTopBottomCriterion", ["invalid", "topItems", "topPercent", "topSum", "bottomItems", "bottomPercent", "bottomSum"]], + ["SortBy", ["ascending", "descending"]], + ["AggregationFunction", ["unknown", "automatic", "sum", "count", "average", "max", "min", "product", "countNumbers", "standardDeviation", "standardDeviationP", "variance", "varianceP"]], + ["ShowAsCalculation", ["unknown", "none", "percentOfGrandTotal", "percentOfRowTotal", "percentOfColumnTotal", "percentOfParentRowTotal", "percentOfParentColumnTotal", "percentOfParentTotal", "percentOf", "runningTotal", "percentRunningTotal", "differenceFrom", "percentDifferenceFrom", "rankAscending", "rankDecending", "index"]], + ["PivotAxis", ["unknown", "row", "column", "data", "filter"]], + ["LinkedDataTypeRefreshMode", ["unknown", "manual", "onLoad", "periodic"]], + ["AxisType", ["invalid", "category", "value", "series"]], + ["AxisGroup", ["primary", "secondary"]], + ["AxisScaleType", ["linear", "logarithmic"]], + ["AxisCrosses", ["automatic", "maximum", "minimum", "custom"]], + ["AxisTickMark", ["none", "cross", "inside", "outside"]], + ["AxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["TrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ChartAxisType", ["invalid", "category", "value", "series"]], + ["ChartAxisGroup", ["primary", "secondary"]], + ["ChartAxisScaleType", ["linear", "logarithmic"]], + ["ChartAxisPosition", ["automatic", "maximum", "minimum", "custom"]], + ["ChartAxisTickMark", ["none", "cross", "inside", "outside"]], + ["CalculationState", ["done", "calculating", "pending"]], + ["ChartAxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["ChartAxisDisplayUnit", ["none", "hundreds", "thousands", "tenThousands", "hundredThousands", "millions", "tenMillions", "hundredMillions", "billions", "trillions", "custom"]], + ["ChartAxisTimeUnit", ["days", "months", "years"]], + ["ChartBoxQuartileCalculation", ["inclusive", "exclusive"]], + ["ChartAxisCategoryType", ["automatic", "textAxis", "dateAxis"]], + ["ChartBinType", ["category", "auto", "binWidth", "binCount"]], + ["ChartLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "grey25", "grey50", "grey75", "automatic", "roundDot"]], + ["ChartDataLabelPosition", ["invalid", "none", "center", "insideEnd", "insideBase", "outsideEnd", "left", "right", "top", "bottom", "bestFit", "callout"]], + ["ChartErrorBarsInclude", ["both", "minusValues", "plusValues"]], + ["ChartErrorBarsType", ["fixedValue", "percent", "stDev", "stError", "custom"]], + ["ChartMapAreaLevel", ["automatic", "dataOnly", "city", "county", "state", "country", "continent", "world"]], + ["ChartGradientStyle", ["twoPhaseColor", "threePhaseColor"]], + ["ChartGradientStyleType", ["extremeValue", "number", "percent"]], + ["ChartTitlePosition", ["automatic", "top", "bottom", "left", "right"]], + ["ChartLegendPosition", ["invalid", "top", "bottom", "left", "right", "corner", "custom"]], + ["ChartMarkerStyle", ["invalid", "automatic", "none", "square", "diamond", "triangle", "star", "dot", "dash", "circle", "plus", "picture"], { "x": "X" }], + ["ChartPlotAreaPosition", ["automatic", "custom"]], + ["ChartMapLabelStrategy", ["none", "bestFit", "showAll"]], + ["ChartMapProjectionType", ["automatic", "mercator", "miller", "robinson", "albers"]], + ["ChartParentLabelStrategy", ["none", "banner", "overlapping"]], + ["ChartSeriesBy", ["auto", "columns", "rows"]], + ["ChartDataSourceType", ["localRange", "externalRange", "list", "unknown"]], + ["ChartTextHorizontalAlignment", ["center", "left", "right", "justify", "distributed"]], + ["ChartTextVerticalAlignment", ["center", "bottom", "top", "justify", "distributed"]], + ["ChartTickLabelAlignment", ["center", "left", "right"]], + ["ChartType", ["invalid", "columnClustered", "columnStacked", "columnStacked100", "barClustered", "barStacked", "barStacked100", "lineStacked", "lineStacked100", "lineMarkers", "lineMarkersStacked", "lineMarkersStacked100", "pieOfPie", "pieExploded", "barOfPie", "areaStacked", "areaStacked100", "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", "line", "pie", "area", "doughnut", "radar", "histogram", "boxwhisker", "pareto", "regionMap", "treemap", "waterfall", "sunburst", "funnel"], { "_3DColumnClustered": "3DColumnClustered", "_3DColumnStacked": "3DColumnStacked", "_3DColumnStacked100": "3DColumnStacked100", "_3DBarClustered": "3DBarClustered", "_3DBarStacked": "3DBarStacked", "_3DBarStacked100": "3DBarStacked100", "_3DPieExploded": "3DPieExploded", "xyscatterSmooth": "XYScatterSmooth", "xyscatterSmoothNoMarkers": "XYScatterSmoothNoMarkers", "xyscatterLines": "XYScatterLines", "xyscatterLinesNoMarkers": "XYScatterLinesNoMarkers", "_3DAreaStacked": "3DAreaStacked", "_3DAreaStacked100": "3DAreaStacked100", "_3DColumn": "3DColumn", "_3DLine": "3DLine", "_3DPie": "3DPie", "xyscatter": "XYScatter", "_3DArea": "3DArea" }], + ["ChartUnderlineStyle", ["none", "single"]], + ["ChartDisplayBlanksAs", ["notPlotted", "zero", "interplotted"]], + ["ChartPlotBy", ["rows", "columns"]], + ["ChartSplitType", ["splitByPosition", "splitByValue", "splitByPercentValue", "splitByCustomSplit"]], + ["ChartColorScheme", ["colorfulPalette1", "colorfulPalette2", "colorfulPalette3", "colorfulPalette4", "monochromaticPalette1", "monochromaticPalette2", "monochromaticPalette3", "monochromaticPalette4", "monochromaticPalette5", "monochromaticPalette6", "monochromaticPalette7", "monochromaticPalette8", "monochromaticPalette9", "monochromaticPalette10", "monochromaticPalette11", "monochromaticPalette12", "monochromaticPalette13"]], + ["ChartTrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ShapeZOrder", ["bringToFront", "bringForward", "sendToBack", "sendBackward"]], + ["ShapeType", ["unsupported", "image", "geometricShape", "group", "line"]], + ["ShapeScaleType", ["currentSize", "originalSize"]], + ["ShapeScaleFrom", ["scaleFromTopLeft", "scaleFromMiddle", "scaleFromBottomRight"]], + ["ShapeFillType", ["noFill", "solid", "gradient", "pattern", "pictureAndTexture", "mixed"]], + ["ShapeFontUnderlineStyle", ["none", "single", "double", "heavy", "dotted", "dottedHeavy", "dash", "dashHeavy", "dashLong", "dashLongHeavy", "dotDash", "dotDashHeavy", "dotDotDash", "dotDotDashHeavy", "wavy", "wavyHeavy", "wavyDouble"]], + ["PictureFormat", [], { "unknown": "UNKNOWN", "bmp": "BMP", "jpeg": "JPEG", "gif": "GIF", "png": "PNG", "svg": "SVG" }], + ["ShapeLineStyle", ["single", "thickBetweenThin", "thickThin", "thinThick", "thinThin"]], + ["ShapeLineDashStyle", ["dash", "dashDot", "dashDotDot", "longDash", "longDashDot", "roundDot", "solid", "squareDot", "longDashDotDot", "systemDash", "systemDot", "systemDashDot"]], + ["ArrowheadLength", ["short", "medium", "long"]], + ["ArrowheadStyle", ["none", "triangle", "stealth", "diamond", "oval", "open"]], + ["ArrowheadWidth", ["narrow", "medium", "wide"]], + ["PremiumLicenseName", ["python"]], + ["BindingType", ["range", "table", "text"]], + ["BorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight", "insideVertical", "insideHorizontal", "diagonalDown", "diagonalUp"]], + ["BorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "double", "slantDashDot"]], + ["BorderWeight", ["hairline", "thin", "medium", "thick"]], + ["CalculationMode", ["automatic", "automaticExceptTables", "manual"]], + ["RuntimeCalculationMode", [], { "undefined": 0, "automatic": 1, "automaticExceptTables": 2, "manual": 3 }], + ["CalculationType", ["recalculate", "full", "fullRebuild"]], + ["ClearApplyTo", ["all", "formats", "contents", "hyperlinks", "removeHyperlinks"]], + ["VisualCategory", ["column", "bar", "line", "area", "pie", "donut", "scatter", "bubble", "statistical", "stock", "combo", "hierarchy", "surface", "map", "funnel", "radar", "waterfall", "threeD", "other"]], + ["VisualPropertyType", ["object", "collection", "string", "double", "int", "bool", "enum", "color"]], + ["VisualChangeType", ["dataChange", "propertyChange", "genericChange", "selectionChange"]], + ["BoolMetaPropertyType", ["writeOnly", "readOnly", "hideEntireSubtreeUI", "hideMeButShowChildrenUI", "expandableUI", "nextPropOnSameLine", "hideLabel", "showResetUI", "hasOwnExpandableSection", "nextPropOnSameLineFOTP", "showResetUIFOTP", "untransferable", "ignoreDuringChangeChartType", "notTriviallyUndoable", "volatileEnum", "exceptionCollection", "metaOnly", "showHideCollection", "errorMessage", "infoMessage"]], + ["ConditionalDataBarAxisFormat", ["automatic", "none", "cellMidPoint"]], + ["ConditionalDataBarDirection", ["context", "leftToRight", "rightToLeft"]], + ["ConditionalFormatDirection", ["top", "bottom"]], + ["ConditionalFormatType", ["custom", "dataBar", "colorScale", "iconSet", "topBottom", "presetCriteria", "containsText", "cellValue"]], + ["ConditionalFormatRuleType", ["invalid", "automatic", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatIconRuleType", ["invalid", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatColorCriterionType", ["invalid", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalTopBottomCriterionType", ["invalid", "topItems", "topPercent", "bottomItems", "bottomPercent"]], + ["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"]], + ["ConditionalTextOperator", ["invalid", "contains", "notContains", "beginsWith", "endsWith"]], + ["ConditionalCellValueOperator", ["invalid", "between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqual", "lessThanOrEqual"]], + ["ConditionalIconCriterionOperator", ["invalid", "greaterThan", "greaterThanOrEqual"]], + ["ConditionalRangeBorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight"]], + ["ConditionalRangeBorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot"]], + ["ConditionalRangeFontUnderlineStyle", ["none", "single", "double"]], + ["CustomFunctionType", ["invalid", "script", "webService"]], + ["CustomFunctionMetadataFormat", ["invalid", "openApi"]], + ["DataValidationType", ["none", "wholeNumber", "decimal", "list", "date", "time", "textLength", "custom", "inconsistent", "mixedCriteria"]], + ["DataValidationOperator", ["between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqualTo", "lessThanOrEqualTo"]], + ["DataValidationAlertStyle", ["stop", "warning", "information"]], + ["DeleteShiftDirection", ["up", "left"]], + ["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"]], + ["FilterDatetimeSpecificity", ["year", "month", "day", "hour", "minute", "second"]], + ["FilterOn", ["bottomItems", "bottomPercent", "cellColor", "dynamic", "fontColor", "values", "topItems", "topPercent", "icon", "custom"]], + ["FilterOperator", ["and", "or"]], + ["HorizontalAlignment", ["general", "left", "center", "right", "fill", "justify", "centerAcrossSelection", "distributed"]], + ["IconSet", ["invalid", "threeArrows", "threeArrowsGray", "threeFlags", "threeTrafficLights1", "threeTrafficLights2", "threeSigns", "threeSymbols", "threeSymbols2", "fourArrows", "fourArrowsGray", "fourRedToBlack", "fourRating", "fourTrafficLights", "fiveArrows", "fiveArrowsGray", "fiveRating", "fiveQuarters", "threeStars", "threeTriangles", "fiveBoxes"]], + ["ImageFittingMode", ["fit", "fitAndCenter", "fill"]], + ["InsertShiftDirection", ["down", "right"]], + ["NamedItemScope", ["worksheet", "workbook"]], + ["NamedItemType", ["string", "integer", "double", "boolean", "range", "error", "array"]], + ["RangeUnderlineStyle", ["none", "single", "double", "singleAccountant", "doubleAccountant"]], + ["SheetVisibility", ["visible", "hidden", "veryHidden"]], + ["EventTriggerSource", ["unknown", "thisLocalAddin"]], + ["RangeValueType", ["unknown", "empty", "string", "integer", "double", "boolean", "error", "richValue"]], + ["KeyboardDirection", ["left", "right", "up", "down"]], + ["SearchDirection", ["forward", "backwards"]], + ["SortOrientation", ["rows", "columns"]], + ["SortOn", ["value", "cellColor", "fontColor", "icon"]], + ["SortDataOption", ["normal", "textAsNumber"]], + ["SortMethod", ["pinYin", "strokeCount"]], + ["VerticalAlignment", ["top", "center", "bottom", "justify", "distributed"]], + ["MessageCategory", [], { "none": 0, "customFunction": 1, "action": 2, "event": 65536 }], + ["MessageType", [], { "none": 0, "testEvent": 1, "test1Event": 2, "worksheetDataChangedEvent": 10, "worksheetActivatedEvent": 11, "worksheetDeactivatedEvent": 12, "worksheetAddedEvent": 13, "worksheetSelectionChangedEvent": 14, "worksheetDeletedEvent": 15, "worksheetCalculatedEvent": 16, "worksheetFilteredEvent": 17, "worksheetFormatChangedEvent": 18, "worksheetRowSortedEvent": 19, "worksheetColumnSortedEvent": 20, "worksheetSingleClickedEvent": 21, "worksheetRowHiddenChangedEvent": 22, "worksheetFormulaChangedEvent": 23, "worksheetProtectionChangedEvent": 24, "worksheetNameChangedEvent": 25, "worksheetVisibilityChangedEvent": 26, "worksheetMovedEvent": 27, "worksheetNavigationObjectChangedEvent": 28, "worksheetRowHeightChangedEvent": 29, "workbookFormulaReferenceStyleChangedEvent": 30, "chartAddedEvent": 50, "chartActivatedEvent": 51, "chartDeactivatedEvent": 52, "chartDeletedEvent": 53, "tableSelectionChangedEvent": 100, "tableDataChangedEvent": 101, "tableAddedEvent": 102, "tableDeletedEvent": 103, "tableFilteredEvent": 104, "agaveVisualUpdateEvent": 150, "customFunctionExecutionBeginEvent": 200, "customFunctionExecutionEndEvent": 201, "commentAddedEvent": 250, "commentDeletedEvent": 251, "commentChangedEvent": 252, "invocationMessage": 1000, "cancellationMessage": 1001, "metadataMessage": 1002, "visualSelectionChangedEvent": 2000, "visualChangeEvent": 2001, "visualTrackerModelChangedEvent": 2002, "shapeSelectionChangedEvent": 2100, "shapeActivatedEvent": 2101, "shapeDeactivatedEvent": 2102, "shapeAddedEvent": 2103, "shapeDeletedEvent": 2104, "workbookAutoSaveSettingChangedEvent": 2200, "wacoperationEvent": 2201, "recordingStateChangedEvent": 2202, "workbookActivatedEvent": 2203, "workbookNavigationObjectChangedEvent": 2204, "ribbonCommandExecutedEvent": 2300, "linkedDataTypeRefreshRequestCompletedEvent": 2500, "linkedDataTypeRefreshModeChangedEvent": 2501, "linkedDataTypeLinkedDataTypeAddedEvent": 2502, "linkedWorkbookWorkbookLinksChangedEvent": 2600, "linkedWorkbookRefreshCompletedEvent": 2601, "rangePickerSelectionChangedEvent": 2700, "rangePickerDeactivatedEvent": 2701, "lineageActivityUpdateAvailableEvent": 2800, "lineageActivityFilterUpdatedEvent": 2801, "lineageActivityLoadCompletedEvent": 2802, "pivotTableAddedEvent": 2900, "pivotTableDeletedEvent": 2901, "namedItemAddedEvent": 3000, "namedItemDeletedEvent": 3001, "guidedReapplyManagerUpdateAvailableEvent": 3100, "vbaRecorderRecordingChangedEvent": 3200, "vbaRecorderRecordingChanged2Event": 3202, "workbookActionRecordedEvent": 3201, "externalCodeServiceDiagnosticsNewEntryEvent": 3300, "externalCodeServiceDiagnosticsFilterUpdatedEvent": 3301, "rangeValuesPreviewDismissedEvent": 3400, "applicationUndoChangedEvent": 3500, "appRuntimeVisibilityChangedEvent": 65539, "beforeCloseNotifiactionCancelledEvent": 65540, "augmentationLoopAnnotationAddedEvent": 65541 }], + ["InsertDeleteCellsShiftDirection", ["none", "shiftCellLeft", "shiftCellUp", "shiftCellRight", "shiftCellDown"]], + ["DocumentPropertyType", ["number", "boolean", "date", "string", "float"]], + ["EventSource", ["local", "remote"]], + ["DataChangeType", ["unknown", "rangeEdited", "rowInserted", "rowDeleted", "columnInserted", "columnDeleted", "cellInserted", "cellDeleted"]], + ["RowHiddenChangeType", ["unhidden", "hidden"]], + ["CommentChangeType", ["commentEdited", "commentResolved", "commentReopened", "replyAdded", "replyDeleted", "replyEdited"]], + ["EventType", ["worksheetChanged", "worksheetSelectionChanged", "worksheetAdded", "worksheetActivated", "worksheetDeactivated", "tableChanged", "tableSelectionChanged", "worksheetDeleted", "chartAdded", "chartActivated", "chartDeactivated", "chartDeleted", "worksheetCalculated", "visualSelectionChanged", "agaveVisualUpdate", "tableAdded", "tableDeleted", "tableFiltered", "worksheetFiltered", "shapeActivated", "shapeDeactivated", "visualChange", "workbookAutoSaveSettingChanged", "worksheetFormatChanged", "ribbonCommandExecuted", "worksheetRowSorted", "worksheetColumnSorted", "worksheetSingleClicked", "worksheetRowHiddenChanged", "recordingStateChangedEvent", "commentAdded", "commentDeleted", "commentChanged", "linkedDataTypeRefreshRequestCompleted", "linkedDataTypeRefreshModeChanged", "linkedDataTypeLinkedDataTypeAdded", "worksheetFormulaChanged", "workbookActivated", "linkedWorkbookWorkbookLinksChanged", "linkedWorkbookRefreshCompleted", "worksheetProtectionChanged", "worksheetNameChanged", "worksheetVisibilityChanged", "worksheetMoved", "lineageActivityUpdateAvailable", "lineageActivityFilterUpdated", "lineageActivityLoadCompleted", "shapeAdded", "shapeDeleted", "pivotTableAdded", "pivotTableDeleted", "namedItemAdded", "namedItemDeleted", "worksheetNavigationObjectChanged", "workbookNavigationObjectChanged", "worksheetRowHeightChanged", "workbookFormulaReferenceStyleChanged", "guidedReapplyManagerUpdateAvailable", "vbaRecorderRecordingChanged", "rangeValuesPreviewDismissed", "annotationAdded", "workbookActionRecorded", "applicationUndoChanged", "vbaRecorderRecordingChanged2"], { "wacoperationEvent": "WACOperationEvent" }], + ["DocumentPropertyItem", ["title", "subject", "author", "keywords", "comments", "template", "lastAuth", "revision", "appName", "lastPrint", "creation", "lastSave", "category", "format", "manager", "company"]], + ["SubtotalLocationType", ["atTop", "atBottom", "off"]], + ["PivotLayoutType", ["compact", "tabular", "outline"]], + ["ProtectionSelectionMode", ["normal", "unlocked", "none"]], + ["PageOrientation", ["portrait", "landscape"]], + ["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"]], + ["ReadingOrder", ["context", "leftToRight", "rightToLeft"]], + ["BuiltInStyle", ["normal", "comma", "currency", "percent", "wholeComma", "wholeDollar", "hlink", "hlinkTrav", "note", "warningText", "emphasis1", "emphasis2", "emphasis3", "sheetTitle", "heading1", "heading2", "heading3", "heading4", "input", "output", "calculation", "checkCell", "linkedCell", "total", "good", "bad", "neutral", "accent1", "accent1_20", "accent1_40", "accent1_60", "accent2", "accent2_20", "accent2_40", "accent2_60", "accent3", "accent3_20", "accent3_40", "accent3_60", "accent4", "accent4_20", "accent4_40", "accent4_60", "accent5", "accent5_20", "accent5_40", "accent5_60", "accent6", "accent6_20", "accent6_40", "accent6_60", "explanatoryText"]], + ["PrintErrorType", ["asDisplayed", "blank", "dash", "notAvailable"]], + ["WorksheetPositionType", ["none", "before", "after", "beginning", "end"]], + ["PrintComments", ["noComments", "endSheet", "inPlace"]], + ["PrintOrder", ["downThenOver", "overThenDown"]], + ["PrintMarginUnit", ["points", "inches", "centimeters"]], + ["HeaderFooterState", ["default", "firstAndDefault", "oddAndEven", "firstOddAndEven"]], + ["AutoFillType", ["fillDefault", "fillCopy", "fillSeries", "fillFormats", "fillValues", "fillDays", "fillWeekdays", "fillMonths", "fillYears", "linearTrend", "growthTrend", "flashFill"]], + ["GroupOption", ["byRows", "byColumns"]], + ["RangeCopyType", ["all", "formulas", "values", "formats", "link"]], + ["LinkedDataTypeState", ["none", "validLinkedData", "disambiguationNeeded", "brokenLinkedData", "fetchingData"]], + ["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"]], + ["ConnectorType", ["straight", "elbow", "curve"]], + ["ContentType", ["plain", "mention"]], + ["SpecialCellType", ["conditionalFormats", "dataValidations", "blanks", "constants", "formulas", "sameConditionalFormat", "sameDataValidation", "visible"]], + ["SpecialCellValueType", ["all", "errors", "errorsLogical", "errorsNumbers", "errorsText", "errorsLogicalNumber", "errorsLogicalText", "errorsNumberText", "logical", "logicalNumbers", "logicalText", "logicalNumbersText", "numbers", "numbersText", "text"]], + ["Placement", ["twoCell", "oneCell", "absolute"]], + ["FillPattern", ["none", "solid", "gray50", "gray75", "gray25", "horizontal", "vertical", "down", "up", "checker", "semiGray75", "lightHorizontal", "lightVertical", "lightDown", "lightUp", "grid", "crissCross", "gray16", "gray8", "linearGradient", "rectangularGradient"]], + ["ShapeTextHorizontalAlignment", ["left", "center", "right", "justify", "justifyLow", "distributed", "thaiDistributed"]], + ["ShapeTextVerticalAlignment", ["top", "middle", "bottom", "justified", "distributed"]], + ["ShapeTextVerticalOverflow", ["overflow", "ellipsis", "clip"]], + ["ShapeTextHorizontalOverflow", ["overflow", "clip"]], + ["ShapeTextReadingOrder", ["leftToRight", "rightToLeft"]], + ["ShapeTextOrientation", ["horizontal", "vertical", "vertical270", "wordArtVertical", "eastAsianVertical", "mongolianVertical", "wordArtVerticalRTL"]], + ["ShapeAutoSize", ["autoSizeNone", "autoSizeTextToFitShape", "autoSizeShapeToFitText", "autoSizeMixed"]], + ["CloseBehavior", ["save", "skipSave"]], + ["SaveBehavior", ["save", "prompt"]], + ["SlicerSortType", ["dataSourceOrder", "ascending", "descending"]], + ["RibbonTab", ["others", "home", "insert", "draw", "pageLayout", "formulas", "data", "review", "view", "developer", "addIns", "help"]], + ["NumberFormatCategory", ["general", "number", "currency", "accounting", "date", "time", "percentage", "fraction", "scientific", "text", "special", "custom"]]], + "clientObjectTypes": [["UndoScope", + 0, + 0, + 0, + [["close", + 0, + 0, + 0, + 2], + ["open", + 1, + 0, + 0, + 2]]], + ["RangeValuesPreview", + 4, + 0, + 0, + [["_RegisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["dismiss", + 0, + 2, + 0, + 4], + ["show", + 3, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Dismissed", + 0, + 0, + "MessageType.rangeValuesPreviewDismissedEvent", + "this._ParentObject.id", + "_RegisterEventDismissed", + "_UnregisterEventDismissed"]]], + ["AugmentationLoop", + 0, + 0, + 0, + [["_RegisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["activateAnnotation", + 1, + 2, + 0, + 4], + ["submitSignal", + 1, + 2, + 0, + 4]], + 0, + 0, + 0, + [["AnnotationAdded", + 0, + 0, + "MessageType.augmentationLoopAnnotationAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAnnotationAddedEvent", + "_UnregisterAnnotationAddedEvent"]]], + ["ExternalCodeService", + 0, + 0, + [["diagnostics", + "ExternalCodeServiceDiagnostics", + 2, + 0, + 0, + 4]]], + ["ExternalCodeServiceDiagnostics", + 0, + [["id", + 2]], + 0, + [["_RegisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["clear", + 0, + 2, + 0, + 4], + ["fireStoredEntries", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1]], + 0, + 0, + 0, + [["FilterUpdated", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent", + "this.id", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["NewEntry", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsNewEntryEvent", + "this.id", + "_RegisterEventNewEntry", + "_UnregisterEventNewEntry"]]], + ["VbaRecorder", + 0, + [["id", + 2]], + 0, + [["_RegisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterEventRecordingChanged2", + 0, + 2, + 2, + 4], + ["_UnregisterEventRecordingChanged2", + 0, + 2, + 2, + 4]], + 0, + 0, + 0, + [["RecordingChanged", + 0, + 0, + "MessageType.vbaRecorderRecordingChangedEvent", + "this.id", + "_RegisterEventRecordingChanged", + "_UnregisterEventRecordingChanged"], + ["RecordingChanged2", + 0, + 2, + "MessageType.vbaRecorderRecordingChanged2Event", + "this.id", + "_RegisterEventRecordingChanged2", + "_UnregisterEventRecordingChanged2"]]], + ["WorksheetOptimizationScanResult", + 0, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + [["ranges", + "RangeOptimizationCollection", + 18, + 0, + 0, + 4]]], + ["UserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity"], + ["GuidedReapplyManager", + 0, + 0, + [["activities", + "UserActivityCollection", + 18, + 0, + 0, + 4], + ["summaryCardUserActivity", + "SummaryCardUserActivity", + 2, + 0, + 0, + 4]], + [["openSavedFile", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["discardActivites", + 0, + 2, + 0, + 4], + ["reapplyActivity", + 1, + 2, + 0, + 4], + ["saveActivities", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["UpdateAvailable", + 0, + 0, + "MessageType.guidedReapplyManagerUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["BusinessBar", + 0, + 0, + 0, + [["hide", + 2], + ["show", + 2]]], + ["UserActivity", + 0, + [["activityId", + 2], + ["activityType", + 2], + ["author", + 2], + ["createdDateTime", + 10], + ["guid", + 2], + ["rangeAddress", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2], + ["authorEmail", + 2], + ["locationDeleted", + 2]], + [["highlightRangeAreas", + "RangeAreas", + 2, + 0, + 0, + 4]]], + ["LineageActivityCollection", + 1, + 0, + 0, + [["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["clear", + 0, + 2, + 0, + 4], + ["getCount", + 0, + 2, + 0, + 4], + ["getState", + 0, + 2, + 0, + 4], + ["loadActivities", + 1, + 2, + 0, + 4], + ["loadLatestActivities", + 0, + 2, + 0, + 4], + ["loadNextActivities", + 0, + 2, + 0, + 4], + ["loadPreviousActivities", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_RegisterEventLoadCompleted", + 0, + 2, + 0, + 4], + ["_UnregisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_UnregisterEventLoadCompleted", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity", + [["FilterUpdated", + 0, + 0, + "MessageType.lineageActivityFilterUpdatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["LoadCompleted", + 0, + 0, + "MessageType.lineageActivityLoadCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventLoadCompleted", + "_UnregisterEventLoadCompleted"], + ["UpdateAvailable", + 0, + 0, + "MessageType.lineageActivityUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["SummaryItemUserActivity", + 0, + [["activityType", + 2], + ["rangeAddresses", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2]]], + ["SummaryItemUserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SummaryItemUserActivity", + 1, + 2, + 0, + 4]], + 0, + "SummaryItemUserActivity"], + ["SummaryCardUserActivity", + 0, + [["authors", + 2], + ["currentUser", + 2], + ["displayTime", + 10], + ["numberOfDetailedCard", + 2], + ["summaryUnviewableData", + 2]], + [["summaryItemUserActivities", + "SummaryItemUserActivityCollection", + 18, + 0, + 0, + 4]]], + ["AllowEditRange", + 0, + [["address", + 1], + ["isPasswordProtected", + 3], + ["title", + 1]], + 0, + [["delete"], + ["pauseProtection", + 1], + ["setPassword", + 1]]], + ["AllowEditRangeCollection", + 1, + 0, + 0, + [["add", + 3], + ["getCount", + 0, + 2, + 0, + 4], + ["pauseProtection", + 1]], + [["getItem", + "AllowEditRange", + 1, + 18, + 0, + 4], + ["getItemAt", + "AllowEditRange", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "AllowEditRange", + 1, + 2, + 0, + 4]], + 0, + "AllowEditRange"], + ["Query", + 0, + [["loadedTo", + 2], + ["loadedToDataModel", + 2], + ["name", + 2], + ["refreshDate", + 10], + ["rowsLoadedCount", + 2], + ["error", + 2]]], + ["QueryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Query", + 1, + 18, + 0, + 4]], + 0, + "Query"], + ["VisualTracker", + 0, + [["id", + 2]], + 0, + [["_RegisterEventModelChanged", + 0, + 2], + ["_UnregisterEventModelChanged", + 0, + 2], + ["requestTrackingAlteration", + 2, + 2, + 0, + 4]], + 0, + 0, + 0, + [["ModelChanged", + 0, + 0, + "MessageType.visualTrackerModelChangedEvent", + "this.id", + "_RegisterEventModelChanged", + "_UnregisterEventModelChanged"]]], + ["NumberFormatProperty", + 0, + [["key", + 3], + ["currency", + 3], + ["dateTime", + 3], + ["dateTimeHasDayOfWeek", + 3], + ["dateTimeHasMonth", + 3], + ["dateTimeHasYear", + 3], + ["numeric", + 3], + ["percent", + 3], + ["text", + 3]]], + ["NumberFormatPropertyCollection", + 1, + 0, + 0, + 0, + [["getItemAt", + "NumberFormatProperty", + 1, + 2, + 0, + 4]], + 0, + "NumberFormatProperty"], + ["RangeOptimization", + 0, + [["optimizationTypes", + 2], + ["range", + 2]]], + ["RangeOptimizationCollection", + 1, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeOptimization", + 1, + 2, + 0, + 4]], + 0, + "RangeOptimization"], + ["WorksheetOptimization", + 0, + 0, + 0, + 0, + [["optimize", + "WorksheetOptimizationResult", + 0, + 0, + 0, + 2], + ["scan", + "RangeOptimizationCollection", + 0, + 6, + 0, + 4], + ["scanExtended", + "WorksheetOptimizationScanResult", + 0, + 2, + 0, + 4]]], + ["WorksheetOptimizationResult", + 0, + [["allocatedCells", + 2], + ["optimizedCells", + 2]]], + ["LinkedWorkbook", + 0, + [["displayUrl", + 2, + 3], + ["fileName", + 3, + 3], + ["id", + 2], + ["longErrorDescription", + 2, + 3], + ["refreshEnabled", + 2, + 3], + ["refreshing", + 2, + 3], + ["statusMessage", + 2, + 3], + ["excelIconState", + 2, + 3], + ["hardToFindErrorMessages", + 2, + 3], + ["lastUpdated", + 10, + 3]], + 0, + [["_RegisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["breakLinks"], + ["changeSource", + 1, + 0, + 3], + ["findNextLink", + 0, + 2, + 3, + 4], + ["openWorkbook", + 0, + 2, + 3, + 4], + ["refresh"], + ["openChangeSourceDialog", + 0, + 0, + 3], + ["closeChangeSourceDialog", + 0, + 0, + 3]], + 0, + 0, + 0, + [["RefreshCompleted", + 0, + 3, + "MessageType.linkedWorkbookRefreshCompletedEvent", + "this.id", + "_RegisterRefreshCompletedEvent", + "_UnregisterRefreshCompletedEvent"]]], + ["LinkedWorkbookCollection", + 1, + [["breakAllLinksEnabled", + 0, + 3], + ["refreshAllEnabled", + 0, + 3], + ["workbookLinksRefreshMode"], + ["workbookLinksRefreshSettings", + 0, + 3], + ["containsNonWorkbookLinks", + 0, + 3]], + 0, + [["_RegisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["_UnregisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["breakAllLinks"], + ["getCount", + 0, + 2, + 3, + 4], + ["refreshAll"], + ["openEditLinksDialog", + 0, + 2, + 3, + 4]], + [["getItem", + "LinkedWorkbook", + 1, + 18, + 0, + 4], + ["getItemAt", + "LinkedWorkbook", + 1, + 2, + 3, + 4], + ["getItemOrNullObject", + "LinkedWorkbook", + 1]], + 0, + "LinkedWorkbook", + [["WorkbookLinksChanged", + 0, + 3, + "MessageType.linkedWorkbookWorkbookLinksChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWorkbookLinksChangedEvent", + "_UnregisterWorkbookLinksChangedEvent"]]], + ["DocumentTaskChange", + 0, + [["type", + 2], + ["changedBy", + 2], + ["commentId", + 2], + ["createdDateTime", + 10], + ["id", + 2], + ["assignee", + 2], + ["undoChangeId", + 2], + ["priority", + 2], + ["title", + 2], + ["percentComplete", + 2], + ["startDateTime", + 10], + ["dueDateTime", + 10]], + 0, + 0, + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.DocumentTaskChange", + 4], + ["DocumentTaskChangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "DocumentTaskChange", + 1, + 2, + 0, + 4]], + 0, + "DocumentTaskChange"], + ["RangePicker", + 0, + 0, + 0, + [["activate", + 1, + 0, + 0, + 2, + 0, + 4], + ["deactivate", + 0, + 0, + 0, + 2, + 0, + 4], + ["updateSelection", + 1, + 0, + 0, + 2, + 0, + 4], + ["updateSelectionWithNavigation", + 4, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_UnregisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventDeactivated", + 0, + 2, + 0, + 4], + ["_UnregisterEventDeactivated", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Deactivated", + 0, + 0, + "MessageType.rangePickerDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventDeactivated", + "_UnregisterEventDeactivated"], + ["SelectionChanged", + 0, + 0, + "MessageType.rangePickerSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventSelectionChanged", + "_UnregisterEventSelectionChanged"]]], + ["DocumentTask", + 0, + [["startAndDueDateTime"], + ["id", + 2], + ["percentComplete"], + ["priority"], + ["title"], + ["assignees", + 2], + ["completedBy", + 2], + ["completedDateTime", + 10], + ["createdBy", + 2], + ["createdDateTime", + 10]], + [["changes", + "DocumentTaskChangeCollection", + 18, + 0, + 0, + 4], + ["comment", + "Comment", + 2, + 0, + 0, + 4]], + [["assign", + 1], + ["unassign", + 1], + ["unassignAll"]]], + ["DocumentTaskCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "DocumentTask", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DocumentTask", + 1, + 2, + 0, + 4], + ["getItemAt", + "DocumentTask", + 1, + 2, + 0, + 4]], + 0, + "DocumentTask"], + ["DataConnection", + 0, + [["connectionString", + 2], + ["name", + 2], + ["commandText", + 2], + ["dataSourceType", + 2]]], + ["Runtime", + 0, + [["enableEvents", + 1, + 5]]], + ["Application", + 0, + [["calculationMode", + 1], + ["calculationEngineVersion", + 3, + 6], + ["calculationState", + 3, + 6], + ["decimalSeparator", + 3, + 7], + ["thousandsSeparator", + 3, + 7], + ["useSystemSeparators", + 3, + 7], + ["formatStaleValues", + 1, + 8]], + [["iterativeCalculation", + "IterativeCalculation", + 35, + 6, + 0, + 4], + ["ribbon", + "Ribbon", + 35, + 6, + 0, + 4], + ["cultureInfo", + "CultureInfo", + 3, + 7, + 0, + 4], + ["undoScope", + "UndoScope", + 3, + 3, + 0, + 4]], + [["calculate", + 1], + ["suspendApiCalculationUntilNextSync", + 0, + 1, + 9, + 2, + 0, + 10], + ["suspendScreenUpdatingUntilNextSync", + 0, + 0, + 6, + 2, + 0, + 10], + ["hasLicense", + 1, + 2, + 8, + 4], + ["redo", + 0, + 0, + 3, + 2], + ["explorePremiumLicense", + 1, + 2, + 8, + 4], + ["undo", + 0, + 0, + 3, + 2], + ["_RegisterEventUndoChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventUndoChanged", + 0, + 2, + 3, + 4]], + [["createWorkbook", + "WorkbookCreated", + 1, + 10, + 5, + 0, + 0, + "_GetWorkbookCreatedById"], + ["_GetWorkbookCreatedById", + "WorkbookCreated", + 1, + 2, + 5, + 4]], + 0, + 0, + [["UndoChanged", + 0, + 3, + "MessageType.applicationUndoChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUndoChanged", + "_UnregisterEventUndoChanged"]]], + ["IterativeCalculation", + 0, + [["enabled", + 1], + ["maxIteration", + 1], + ["maxChange", + 1]]], + ["Workbook", + 0, + [["name", + 3, + 11], + ["readOnly", + 3, + 5], + ["isDirty", + 1, + 6], + ["use1904DateSystem", + 1, + 8], + ["chartDataPointTrack", + 1, + 6], + ["usePrecisionAsDisplayed", + 1, + 6], + ["calculationEngineVersion", + 3, + 6], + ["autoSave", + 3, + 6], + ["previouslySaved", + 3, + 6], + ["showPivotFieldList", + 0, + 8, + 0, + 2, + 12], + ["formulaReferenceStyle", + 2, + 3]], + [["worksheets", + "WorksheetCollection", + 19, + 0, + 0, + 4], + ["names", + "NamedItemCollection", + 19, + 0, + 0, + 4], + ["tables", + "TableCollection", + 19, + 0, + 0, + 4], + ["application", + "Application", + 2, + 0, + 0, + 4], + ["bindings", + "BindingCollection", + 19, + 0, + 0, + 4], + ["functions", + "Functions", + 2, + 13, + 0, + 4], + ["_V1Api", + "_V1Api", + 2, + 14, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 19, + 14, + 0, + 4], + ["settings", + "SettingCollection", + 19, + 15, + 0, + 4], + ["customXmlParts", + "CustomXmlPartCollection", + 19, + 16, + 0, + 4], + ["internalTest", + "InternalTest", + 2, + 9, + 0, + 4], + ["properties", + "DocumentProperties", + 35, + 11, + 0, + 4], + ["styles", + "StyleCollection", + 19, + 11, + 0, + 4], + ["protection", + "WorkbookProtection", + 3, + 11, + 0, + 4], + ["dataConnections", + "DataConnectionCollection", + 3, + 11, + 0, + 4], + ["_Runtime", + "Runtime", + 2, + 16, + 0, + 4], + ["comments", + "CommentCollection", + 19, + 17, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["tableStyles", + "TableStyleCollection", + 19, + 17, + 0, + 4], + ["pivotTableStyles", + "PivotTableStyleCollection", + 19, + 17, + 0, + 4], + ["slicerStyles", + "SlicerStyleCollection", + 19, + 17, + 0, + 4], + ["timelineStyles", + "TimelineStyleCollection", + 19, + 17, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["linkedDataTypes", + "LinkedDataTypeCollection", + 18, + 8, + 0, + 4], + ["queries", + "QueryCollection", + 18, + 18, + 0, + 4], + ["linkedWorkbooks", + "LinkedWorkbookCollection", + 18, + 19, + 0, + 4], + ["rangePicker", + "RangePicker", + 2, + 8, + 0, + 4, + 0, + 4], + ["lineageActivities", + "LineageActivityCollection", + 18, + 3, + 0, + 4], + ["businessBar", + "BusinessBar", + 2, + 8, + 0, + 4], + ["guidedReapply", + "GuidedReapplyManager", + 2, + 3, + 0, + 4], + ["vbaRecorder", + "VbaRecorder", + 2, + 8, + 0, + 4], + ["externalCodeService", + "ExternalCodeService", + 2, + 8, + 0, + 4], + ["augmentationLoop", + "AugmentationLoop", + 2, + 8, + 0, + 4]], + [["_RemoveReference", + 1, + 2], + ["_GetObjectByReferenceId", + 1, + 2, + 0, + 4], + ["_GetObjectTypeNameByReferenceId", + 1, + 2, + 0, + 4], + ["_RemoveAllReferences", + 0, + 2], + ["_GetReferenceCount", + 0, + 2, + 0, + 4], + ["getIsActiveCollabSession", + 0, + 0, + 6], + ["registerCustomFunctions", + 7, + 0, + 20, + 8], + ["_SetOsfControlContainerReadyForCustomFunctions", + 0, + 0, + 20], + ["close", + 1, + 0, + 7], + ["save", + 1, + 0, + 7], + ["_RegisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_UnregisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_RegisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_UnregisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_RegisterActivatedEvent", + 0, + 2, + 23], + ["_UnregisterActivatedEvent", + 0, + 2, + 23], + ["insertWorksheetsFromBase64", + 2, + 0, + 23], + ["enableOfficeScriptRecording", + 1, + 1, + 19], + ["recordAction", + 1, + 3, + 0, + 4], + ["focus", + 0, + 2, + 3, + 4], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["showHelp", + 1, + 2, + 3, + 4], + ["getLinkedEntityCellValue", + 1, + 2, + 24, + 4], + ["getThemeColors", + 0, + 2, + 8, + 4], + ["_RegisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["notifySDXLoaded", + 1, + 2, + 3, + 4], + ["openConditionalFormattingRulesManager", + 1, + 0, + 3], + ["openNameManager", + 0, + 0, + 3], + ["_RegisterEventActionRecorded", + 0, + 2, + 2, + 4], + ["_UnregisterEventActionRecorded", + 0, + 2, + 2, + 4]], + [["getSelectedRange", + "Range", + 0, + 10, + 0, + 4], + ["getActiveCell", + "Range", + 0, + 10, + 11, + 4], + ["_GetRangeForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["_GetRangeOrNullObjectForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["getActiveChart", + "Chart", + 0, + 2, + 6, + 4], + ["getActiveChartOrNullObject", + "Chart", + 0, + 2, + 6, + 4], + ["getSelectedRanges", + "RangeAreas", + 0, + 10, + 6, + 4], + ["_GetRangesForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["_GetRangesOrNullObjectForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["getActiveSlicer", + "Slicer", + 0, + 2, + 17, + 4], + ["getActiveSlicerOrNullObject", + "Slicer", + 0, + 2, + 17, + 4]], + 0, + 0, + [["ActionRecorded", + 0, + 2, + "MessageType.workbookActionRecordedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventActionRecorded", + "_UnregisterEventActionRecorded"], + ["Activated", + 0, + 23, + "MessageType.workbookActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["AutoSaveSettingChanged", + 0, + 6, + "MessageType.workbookAutoSaveSettingChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAutoSaveSettingChangedEvent", + "_UnregisterAutoSaveSettingChangedEvent"], + ["FormulaReferenceStyleChanged", + 0, + 3, + "MessageType.workbookFormulaReferenceStyleChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFormulaReferenceStyleChanged", + "_UnregisterEventFormulaReferenceStyleChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.workbookNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["RecordingStateChangedEvent", + 0, + 21, + "MessageType.recordingStateChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRecordingStateChangedEvent", + "_UnregisterRecordingStateChangedEvent"], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdDocumentSelectionChangedEvent", + "", + "", + ""], + ["WACOperationEvent", + 2, + 21, + "MessageType.wacoperationEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWACOperationEvent", + "_UnregisterWACOperationEvent"], + ["_Message", + 3, + 11, + "_CC.office10EventIdRichApiMessageEvent", + "", + "", + ""]]], + ["WorkbookProtection", + 0, + [["protected", + 3]], + 0, + [["protect", + 1], + ["unprotect", + 1]]], + ["WorkbookCreated", + 0, + [["id", + 3]], + 0, + [["open", + 0, + 2, + 0, + 4]]], + ["Worksheet", + 0, + [["name", + 1], + ["id", + 3], + ["position", + 1], + ["visibility", + 1], + ["tabColor", + 1, + 11, + 0, + 2, + 25], + ["standardWidth", + 1, + 11], + ["standardHeight", + 3, + 11], + ["showGridlines", + 5, + 5, + 0, + 2, + 26], + ["showHeadings", + 5, + 5], + ["enableCalculation", + 1, + 6], + ["tabId", + 3, + 18]], + [["charts", + "ChartCollection", + 83, + 0, + 0, + 4], + ["tables", + "TableCollection", + 83, + 0, + 0, + 4], + ["protection", + "WorksheetProtection", + 3, + 13, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 83, + 14, + 0, + 4], + ["names", + "NamedItemCollection", + 83, + 15, + 0, + 4], + ["freezePanes", + "WorksheetFreezePanes", + 3, + 11, + 0, + 4], + ["pageLayout", + "PageLayout", + 35, + 6, + 0, + 4], + ["visuals", + "VisualCollection", + 83, + 17, + 0, + 4], + ["shapes", + "ShapeCollection", + 83, + 6, + 0, + 4], + ["horizontalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["verticalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["comments", + "CommentCollection", + 83, + 17, + 0, + 4], + ["customProperties", + "WorksheetCustomPropertyCollection", + 19, + 27, + 0, + 4], + ["namedSheetViews", + "NamedSheetViewCollection", + 18, + 19, + 0, + 4], + ["optimization", + "WorksheetOptimization", + 2, + 8, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["visualTracker", + "VisualTracker", + 2, + 28, + 0, + 4], + ["rangeValuesPreview", + "RangeValuesPreview", + 66, + 8, + 0, + 4]], + [["delete"], + ["activate", + 0, + 2], + ["calculate", + 1, + 0, + 9], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_RegisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["replaceAll", + 3, + 0, + 6], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["showOutlineLevels", + 2, + 0, + 17], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getRange", + "Range", + 1, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRangeByIndexes", + "Range", + 4, + 10, + 11, + 4], + ["getPrevious", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getPreviousOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNext", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNextOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["_GetSheetById", + "Worksheet", + 1, + 2, + 11, + 4], + ["copy", + "Worksheet", + 2, + 0, + 11, + 0, + 0, + "_GetAnotherWorksheetById"], + ["_GetAnotherWorksheetById", + "Worksheet", + 1, + 0, + 11], + ["findAll", + "RangeAreas", + 2, + 10, + 6, + 4], + ["findAllOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getRanges", + "RangeAreas", + 1, + 10, + 6, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 0, + 3], + ["getRangeR1C1", + "Range", + 1, + 2, + 3, + 4], + ["getRangesR1C1", + "RangeAreas", + 1, + 2, + 3, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 0, + 3]], + "workbook.worksheets", + 0, + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "this.id", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 11, + "MessageType.worksheetDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "this.id", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "this.id", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "this.id", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "this.id", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.worksheetNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "this.id", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "this.id", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "this.id", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "this.id", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 11, + "MessageType.worksheetSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "this.id", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "this.id", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetCollection", + 1, + 0, + 0, + [["getCount", + 1, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 3, + 11], + ["_UnregisterAddedEvent", + 0, + 3, + 11], + ["_RegisterActivatedEvent", + 0, + 3, + 11], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 3, + 11], + ["_UnregisterDeletedEvent", + 0, + 3, + 11], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 3, + 6], + ["_UnregisterDataChangedEvent", + 0, + 3, + 6], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["addFromBase64", + 4, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 3, + 17], + ["_UnregisterRowSortedEvent", + 0, + 3, + 17], + ["_RegisterColumnSortedEvent", + 0, + 3, + 17], + ["_UnregisterColumnSortedEvent", + 0, + 3, + 17], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getItem", + "Worksheet", + 1, + 18, + 0, + 4], + ["add", + "Worksheet", + 1, + 8, + 0, + 2, + 0, + 0, + 29], + ["getActiveWorksheet", + "Worksheet", + 0, + 2, + 0, + 4], + ["getItemOrNullObject", + "Worksheet", + 1, + 2, + 15, + 4], + ["getFirst", + "Worksheet", + 1, + 10, + 16, + 4], + ["getLast", + "Worksheet", + 1, + 10, + 16, + 4]], + 0, + "Worksheet", + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 11, + "MessageType.worksheetAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 6, + "MessageType.worksheetDataChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 11, + "MessageType.worksheetDeletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["Moved", + 0, + 30, + "MessageType.worksheetMovedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventMoved", + "_UnregisterEventMoved"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 6, + "MessageType.worksheetSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetProtection", + 0, + [["protected", + 3], + ["options", + 3], + ["canPauseProtection", + 3, + 19], + ["isPasswordProtected", + 3, + 19], + ["isPaused", + 3, + 19], + ["savedOptions", + 3, + 19]], + [["allowEditRanges", + "AllowEditRangeCollection", + 19, + 19, + 0, + 4]], + [["protect", + 2, + 1], + ["unprotect", + 1], + ["checkPassword", + 1, + 2, + 19, + 4], + ["pauseProtection", + 1, + 0, + 19], + ["resumeProtection", + 0, + 0, + 19], + ["setPassword", + 1, + 0, + 19], + ["updateOptions", + 1, + 0, + 19]]], + ["WorksheetFreezePanes", + 0, + 0, + 0, + [["unfreeze"], + ["freezeAt", + 1], + ["freezeRows", + 1], + ["freezeColumns", + 1]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getLocationOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["Range", + 14, + [["numberFormat", + 5, + 0, + 0, + 2, + 31], + ["numberFormatLocal", + 1, + 11, + 0, + 2, + 31], + ["values", + 5, + 0, + 0, + 2, + 31], + ["text", + 3], + ["formulas", + 5, + 0, + 0, + 2, + 32], + ["formulasLocal", + 5, + 0, + 0, + 2, + 32], + ["rowIndex", + 3], + ["columnIndex", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["address", + 3], + ["addressLocal", + 3], + ["cellCount", + 3], + ["_ReferenceId", + 2], + ["valueTypes", + 3], + ["formulasR1C1", + 5, + 13], + ["hidden", + 3, + 13], + ["rowHidden", + 1, + 13, + 0, + 2, + 32], + ["columnHidden", + 1, + 13, + 0, + 2, + 32], + ["isEntireColumn", + 3, + 11], + ["isEntireRow", + 3, + 11], + ["hyperlink", + 1, + 11, + 0, + 2, + 33], + ["style", + 1, + 11, + 0, + 2, + 32], + ["linkedDataTypeState", + 3, + 6], + ["hasSpill", + 3, + 27], + ["top", + 3, + 17], + ["left", + 3, + 17], + ["height", + 3, + 17], + ["width", + 3, + 17], + ["savedAsArray", + 3, + 27], + ["numberFormatCategories", + 3, + 27], + ["valuesAsJson", + 5, + 24], + ["valuesAsJsonLocal", + 5, + 24], + ["addressR1C1", + 2, + 3]], + [["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["sort", + "RangeSort", + 3, + 13, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 9, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 5, + 0, + 4]], + [["clear", + 1, + 0, + 0, + 2, + 0, + 32], + ["delete", + 1, + 0, + 0, + 2, + 0, + 34], + ["select", + 0, + 2], + ["_KeepReference", + 0, + 2], + ["merge", + 1, + 0, + 13, + 2, + 0, + 32], + ["unmerge", + 0, + 0, + 13], + ["_ValidateArraySize", + 2, + 2, + 14, + 4], + ["calculate", + 0, + 0, + 9], + ["showCard", + 0, + 0, + 11], + ["getImage", + 0, + 2, + 11, + 4], + ["replaceAll", + 3, + 0, + 6, + 2, + 0, + 32], + ["copyFrom", + 4, + 0, + 6, + 2, + 0, + 26], + ["convertToLinkedDataType", + 2, + 0, + 6], + ["convertDataTypeToText", + 0, + 0, + 6], + ["setDirty", + 0, + 0, + 6], + ["getCellProperties", + 1, + 0, + 6], + ["getRowProperties", + 1, + 0, + 6], + ["getColumnProperties", + 1, + 0, + 6], + ["setCellProperties", + 1, + 0, + 6], + ["setRowProperties", + 1, + 0, + 6], + ["setColumnProperties", + 1, + 0, + 6], + ["autoFill", + 2, + 0, + 6], + ["showTeachingCallout", + 2, + 0, + 6], + ["flashFill", + 0, + 0, + 6], + ["group", + 1, + 0, + 17], + ["ungroup", + 1, + 0, + 17], + ["showGroupDetails", + 1, + 0, + 17], + ["hideGroupDetails", + 1, + 0, + 17], + ["moveTo", + 1, + 0, + 7, + 2, + 0, + 26], + ["getDataClassificationIds", + 0, + 2, + 19, + 4]], + [["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["insert", + "Range", + 1, + 8, + 0, + 2, + 0, + 0, + 34], + ["getEntireColumn", + "Range", + 0, + 10, + 0, + 4], + ["getEntireRow", + "Range", + 0, + 10, + 0, + 4], + ["getOffsetRange", + "Range", + 2, + 10, + 0, + 4], + ["getRow", + "Range", + 1, + 10, + 0, + 4], + ["getColumn", + "Range", + 1, + 10, + 0, + 4], + ["getIntersection", + "Range", + 1, + 10, + 0, + 4], + ["getBoundingRect", + "Range", + 1, + 10, + 0, + 4], + ["getLastCell", + "Range", + 0, + 10, + 0, + 4], + ["getLastColumn", + "Range", + 0, + 10, + 0, + 4], + ["getLastRow", + "Range", + 0, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRowsAbove", + "Range", + 1, + 11, + 14, + 4], + ["getRowsBelow", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsBefore", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsAfter", + "Range", + 1, + 11, + 14, + 4], + ["getResizedRange", + "Range", + 2, + 11, + 14, + 4], + ["getVisibleView", + "RangeView", + 0, + 2, + 14, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getSurroundingRegion", + "Range", + 0, + 10, + 11, + 4], + ["getAbsoluteResizedRange", + "Range", + 2, + 10, + 11, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 6, + 4], + ["find", + "Range", + 2, + 10, + 6, + 4], + ["findOrNullObject", + "Range", + 2, + 10, + 6, + 4], + ["removeDuplicates", + "RemoveDuplicatesResult", + 2, + 8, + 6, + 2, + 0, + 0, + 33], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpillingToRange", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParent", + "Range", + 0, + 10, + 27, + 4], + ["getSpillingToRangeOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParentOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getMergedAreas", + "RangeAreas", + 0, + 10, + 19, + 4], + ["getPivotTables", + "PivotTableScopedCollection", + 1, + 6, + 27, + 4], + ["getPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 18, + 4], + ["getDirectPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 27, + 4], + ["getDependents", + "WorkbookRangeAreas", + 0, + 10, + 35, + 4], + ["getDirectDependents", + "WorkbookRangeAreas", + 0, + 10, + 23, + 4], + ["getExtendedRange", + "Range", + 2, + 10, + 23, + 4], + ["getRangeEdge", + "Range", + 2, + 10, + 23, + 4], + ["getNumberFormatProperties", + "NumberFormatPropertyCollection", + 0, + 6, + 8, + 4], + ["getSurroundingDataRegion", + "Range", + 0, + 2, + 8, + 4], + ["getMergedAreasOrNullObject", + "RangeAreas", + 0, + 0, + 23, + 2, + 0, + 0, + 31]]], + ["RangeAreas", + 2, + [["_ReferenceId", + 2], + ["address", + 3], + ["addressLocal", + 3], + ["areaCount", + 3], + ["cellCount", + 3], + ["isEntireColumn", + 3], + ["isEntireRow", + 3], + ["style", + 1], + ["addressR1C1", + 2, + 3]], + [["areas", + "RangeCollection", + 19, + 0, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 0, + 0, + 4], + ["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2], + ["calculate"], + ["clear", + 1], + ["setDirty"], + ["copyFrom", + 4], + ["convertToLinkedDataType", + 2], + ["convertDataTypeToText"], + ["select", + 0, + 2, + 8]], + [["getEntireColumn", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getEntireRow", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getIntersection", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getOffsetRangeAreas", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 0, + 4], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 0, + 4]]], + ["WorkbookRangeAreas", + 2, + [["_ReferenceId", + 2], + ["addresses", + 3]], + [["ranges", + "RangeCollection", + 19, + 0, + 0, + 4], + ["areas", + "RangeAreasCollection", + 19, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2]], + [["getRangeAreasBySheet", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getRangeAreasOrNullObjectBySheet", + "RangeAreas", + 1, + 10, + 0, + 4]]], + ["RangeView", + 0, + [["numberFormat", + 1], + ["values", + 1], + ["text", + 3], + ["formulas", + 1], + ["formulasLocal", + 1], + ["formulasR1C1", + 1], + ["valueTypes", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["cellAddresses", + 3], + ["index", + 3], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["rows", + "RangeViewCollection", + 19, + 0, + 0, + 4]], + 0, + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["RangeViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "RangeView", + 1, + 2, + 0, + 4]], + 0, + "RangeView"], + ["SettingCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Setting", + 1, + 18, + 0, + 4], + ["add", + "Setting", + 2, + 9], + ["getItemOrNullObject", + "Setting", + 1, + 2, + 0, + 4]], + 0, + "Setting", + [["SettingsChanged", + 3, + 0, + "_CC.office10EventIdSettingsChangedEvent", + "", + "", + ""]]], + ["Setting", + 8, + [["key", + 3], + ["value", + 5], + ["_Id", + 2]], + 0, + [["delete"]]], + ["NamedItemCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "NamedItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "NamedItem", + 1, + 2, + 15, + 4], + ["add", + "NamedItem", + 3, + 8, + 15], + ["addFormulaLocal", + "NamedItem", + 3, + 0, + 15]], + 0, + "NamedItem", + [["Added", + 0, + 3, + "MessageType.namedItemAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.namedItemDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["NamedItem", + 0, + [["name", + 3], + ["type", + 3], + ["value", + 3], + ["visible", + 1], + ["_Id", + 2], + ["comment", + 1, + 15], + ["scope", + 3, + 15], + ["formula", + 1, + 11], + ["valueAsJson", + 3, + 24], + ["valueAsJsonLocal", + 3, + 24]], + [["worksheet", + "Worksheet", + 2, + 15, + 0, + 4], + ["worksheetOrNullObject", + "Worksheet", + 2, + 15, + 0, + 4], + ["arrayValues", + "NamedItemArrayValues", + 3, + 11, + 0, + 4]], + [["delete", + 0, + 0, + 15]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 15, + 4]]], + ["NamedItemArrayValues", + 0, + [["values", + 3], + ["types", + 3], + ["valuesAsJson", + 3, + 24], + ["valuesAsJsonLocal", + 3, + 24]]], + ["Binding", + 0, + [["id", + 3], + ["type", + 3]], + 0, + [["getText", + 0, + 2, + 0, + 4], + ["delete", + 0, + 0, + 14]], + [["getTable", + "Table", + 0, + 2, + 0, + 4], + ["getRange", + "Range", + 0, + 2, + 0, + 4]], + 0, + 0, + [["DataChanged", + 3, + 14, + "_CC.office10EventIdBindingDataChangedEvent", + "this.id", + "", + ""], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdBindingSelectionChangedEvent", + "this.id", + "", + ""]]], + ["BindingCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "Binding", + 1, + 18, + 0, + 4], + ["getItemAt", + "Binding", + 1, + 2, + 0, + 4], + ["add", + "Binding", + 3, + 8, + 14], + ["addFromNamedItem", + "Binding", + 3, + 0, + 14], + ["addFromSelection", + "Binding", + 2, + 0, + 14], + ["getItemOrNullObject", + "Binding", + 1, + 2, + 15, + 4]], + 0, + "Binding"], + ["TableCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1]], + [["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemAt", + "Table", + 1, + 2, + 0, + 4], + ["add", + "Table", + 2, + 8, + 0, + 2, + 0, + 0, + 33], + ["getItemOrNullObject", + "Table", + 1, + 2, + 15, + 4], + ["addQueryTable", + "Table", + 2, + 0, + 8]], + 0, + "Table", + [["Added", + 0, + 6, + "MessageType.tableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this._eventTargetId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Deleted", + 0, + 6, + "MessageType.tableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this._eventTargetId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"]]], + ["TableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getFirst", + "Table", + 0, + 10, + 0, + 4], + ["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Table", + 1, + 2, + 18, + 4]], + 0, + "Table"], + ["Table", + 24, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 26], + ["showHeaders", + 1, + 0, + 0, + 2, + 33], + ["showTotals", + 1, + 0, + 0, + 2, + 33], + ["style", + 1, + 0, + 0, + 2, + 33], + ["highlightFirstColumn", + 1, + 14, + 0, + 2, + 33], + ["highlightLastColumn", + 1, + 14, + 0, + 2, + 33], + ["showBandedRows", + 1, + 14, + 0, + 2, + 33], + ["showBandedColumns", + 1, + 14, + 0, + 2, + 33], + ["showFilterButton", + 1, + 14, + 0, + 2, + 33], + ["legacyId", + 3, + 5]], + [["columns", + "TableColumnCollection", + 19, + 0, + 0, + 4], + ["rows", + "TableRowCollection", + 19, + 0, + 0, + 4], + ["sort", + "TableSort", + 3, + 13, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["tableStyle", + "TableStyle", + 35, + 8, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearFilters", + 0, + 0, + 13], + ["reapplyFilters", + 0, + 0, + 13, + 2, + 0, + 26], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["clearStyle", + 0, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["resize", + 1, + 0, + 23, + 2, + 0, + 26], + ["setStyle", + 1, + 0, + 8]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4], + ["convertToRange", + "Range", + 0, + 8, + 13, + 2, + 0, + 0, + 26]], + "workbook.tables", + 0, + [["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["SelectionChanged", + 2, + 11, + "MessageType.tableSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["TableColumnCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "TableColumn", + 1, + 18, + 0, + 4], + ["getItemAt", + "TableColumn", + 1, + 2, + 0, + 4], + ["add", + "TableColumn", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["getItemOrNullObject", + "TableColumn", + 1, + 2, + 15, + 4], + ["addAsJson", + "TableColumn", + 3, + 0, + 24]], + 0, + "TableColumn"], + ["TableColumn", + 0, + [["id", + 3], + ["index", + 3], + ["values", + 1], + ["name", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["filter", + "Filter", + 3, + 13, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4]]], + ["TableRowCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["deleteRows", + 1, + 0, + 19], + ["deleteRowsAt", + 2, + 0, + 19, + 2, + 0, + 26]], + [["getItemAt", + "TableRow", + 1, + 2, + 0, + 4], + ["add", + "TableRow", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["addAsJson", + "TableRow", + 3, + 0, + 24]], + 0, + "TableRow"], + ["TableRow", + 0, + [["index", + 3], + ["values", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + 0, + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["DataValidation", + 0, + [["type", + 3], + ["rule", + 1], + ["prompt", + 1], + ["errorAlert", + 1], + ["ignoreBlanks", + 1], + ["valid", + 3]], + 0, + [["clear"]], + [["getInvalidCells", + "RangeAreas", + 0, + 10, + 6, + 4], + ["getInvalidCellsOrNullObject", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["RemoveDuplicatesResult", + 0, + [["removed", + 3], + ["uniqueRemaining", + 3]]], + ["RangeFormat", + 0, + [["wrapText", + 1, + 0, + 0, + 2, + 32], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 32], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 32], + ["columnWidth", + 1, + 13, + 0, + 2, + 32], + ["rowHeight", + 1, + 13, + 0, + 2, + 32], + ["textOrientation", + 1, + 11, + 0, + 2, + 32], + ["useStandardHeight", + 1, + 11], + ["useStandardWidth", + 1, + 11], + ["readingOrder", + 1, + 6], + ["shrinkToFit", + 1, + 6], + ["indentLevel", + 1, + 6, + 0, + 2, + 32], + ["autoIndent", + 1, + 6]], + [["fill", + "RangeFill", + 35, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["protection", + "FormatProtection", + 35, + 13, + 0, + 4]], + [["autofitColumns", + 0, + 0, + 13, + 2, + 0, + 32], + ["autofitRows", + 0, + 0, + 13, + 2, + 0, + 32], + ["adjustIndent", + 1, + 0, + 7, + 2, + 0, + 34]]], + ["FormatProtection", + 0, + [["locked", + 1], + ["formulaHidden", + 1]]], + ["RangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6], + ["patternTintAndShade", + 1, + 6], + ["pattern", + 1, + 6], + ["patternColor", + 1, + 6]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 32]]], + ["RangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 32], + ["weight", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6]]], + ["RangeBorderCollection", + 1, + [["count", + 3], + ["tintAndShade", + 1, + 6]], + 0, + 0, + [["getItem", + "RangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "RangeBorder", + 1, + 2, + 0, + 4]], + 0, + "RangeBorder"], + ["RangeFont", + 0, + [["name", + 1, + 0, + 0, + 2, + 32], + ["size", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 12], + ["italic", + 1, + 0, + 0, + 2, + 32], + ["bold", + 1, + 0, + 0, + 2, + 32], + ["underline", + 1, + 0, + 0, + 2, + 32], + ["strikethrough", + 1, + 6, + 0, + 2, + 32], + ["subscript", + 1, + 6], + ["superscript", + 1, + 6], + ["tintAndShade", + 1, + 6]]], + ["ChartCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29]], + [["add", + "Chart", + 3, + 9, + 0, + 2, + 0, + 0, + 36], + ["getItemAt", + "Chart", + 1, + 2, + 0, + 4], + ["_GetItem", + "Chart", + 1, + 18, + 0, + 4], + ["getItem", + "Chart", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Chart", + 1, + 2, + 15, + 4]], + 0, + "Chart", + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this._ParentObject.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 5, + "MessageType.chartAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this._ParentObject.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 5, + "MessageType.chartDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Chart", + 0, + [["name", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 36], + ["left", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["height", + 1, + 0, + 0, + 2, + 36], + ["id", + 3, + 11], + ["showAllFieldButtons", + 1, + 11, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 37], + ["showDataLabelsOverMaximum", + 1, + 5, + 0, + 2, + 37], + ["categoryLabelLevel", + 1, + 5, + 0, + 2, + 37], + ["style", + 1, + 5, + 0, + 2, + 37], + ["displayBlanksAs", + 1, + 5, + 0, + 2, + 37], + ["plotBy", + 1, + 5, + 0, + 2, + 37], + ["plotVisibleOnly", + 1, + 5, + 0, + 2, + 37], + ["seriesNameLevel", + 1, + 5, + 0, + 2, + 37]], + [["title", + "ChartTitle", + 35, + 0, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 0, + 0, + 4], + ["legend", + "ChartLegend", + 35, + 0, + 0, + 4], + ["series", + "ChartSeriesCollection", + 19, + 0, + 0, + 4], + ["axes", + "ChartAxes", + 35, + 0, + 0, + 4], + ["format", + "ChartAreaFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["plotArea", + "ChartPlotArea", + 35, + 5, + 0, + 4], + ["pivotOptions", + "ChartPivotOptions", + 35, + 6, + 0, + 4]], + [["setData", + 2, + 1, + 0, + 2, + 0, + 36], + ["delete", + 0, + 0, + 0, + 2, + 0, + 36], + ["setPosition", + 2, + 0, + 0, + 2, + 0, + 36], + ["getImage", + 3, + 2, + 13, + 4], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["activate", + 0, + 2, + 6], + ["getDataRange", + 0, + 0, + 28], + ["getDataRangeOrNullObject", + 0, + 0, + 28]], + [["getDataTable", + "ChartDataTable", + 0, + 2, + 18, + 4], + ["getDataTableOrNullObject", + "ChartDataTable", + 0, + 2, + 18, + 4]], + 0, + 0, + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["ChartPivotOptions", + 0, + [["showAxisFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showLegendFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showReportFilterFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showValueFieldButtons", + 1, + 0, + 0, + 2, + 37]]], + ["ChartAreaFormat", + 0, + [["roundedCorners", + 1, + 6, + 0, + 2, + 37], + ["colorScheme", + 1, + 6, + 0, + 2, + 37]], + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartSeriesCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartSeries", + 1, + 2, + 0, + 4], + ["add", + "ChartSeries", + 2, + 8, + 11, + 2, + 0, + 0, + 36]], + 0, + "ChartSeries"], + ["ChartSeries", + 0, + [["name", + 1, + 0, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 10], + ["hasDataLabels", + 1, + 11, + 0, + 2, + 37], + ["filtered", + 1, + 11, + 0, + 2, + 37], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["showShadow", + 1, + 11, + 0, + 2, + 37], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36], + ["smooth", + 1, + 11, + 0, + 2, + 37], + ["plotOrder", + 1, + 11, + 0, + 2, + 37], + ["gapWidth", + 1, + 11, + 0, + 2, + 36], + ["doughnutHoleSize", + 1, + 11, + 0, + 2, + 36], + ["axisGroup", + 1, + 5, + 0, + 2, + 36], + ["explosion", + 1, + 5, + 0, + 2, + 37], + ["firstSliceAngle", + 1, + 5, + 0, + 2, + 37], + ["invertIfNegative", + 1, + 5, + 0, + 2, + 37], + ["bubbleScale", + 1, + 6, + 0, + 2, + 37], + ["secondPlotSize", + 1, + 5, + 0, + 2, + 37], + ["splitType", + 1, + 5, + 0, + 2, + 37], + ["splitValue", + 1, + 6, + 0, + 2, + 37], + ["varyByCategories", + 1, + 5, + 0, + 2, + 37], + ["showLeaderLines", + 1, + 6, + 0, + 2, + 37], + ["overlap", + 1, + 5, + 0, + 2, + 36], + ["gradientStyle", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointType", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumColor", + 1, + 6, + 0, + 2, + 37], + ["parentLabelStrategy", + 1, + 6, + 0, + 2, + 37], + ["showConnectorLines", + 1, + 6, + 0, + 2, + 37], + ["invertColor", + 1, + 6, + 0, + 2, + 37]], + [["points", + "ChartPointsCollection", + 19, + 0, + 0, + 4], + ["format", + "ChartSeriesFormat", + 35, + 0, + 0, + 4], + ["trendlines", + "ChartTrendlineCollection", + 19, + 11, + 0, + 4], + ["xErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["yErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 5, + 0, + 4], + ["binOptions", + "ChartBinOptions", + 35, + 6, + 0, + 4], + ["mapOptions", + "ChartMapOptions", + 35, + 6, + 0, + 4], + ["boxwhiskerOptions", + "ChartBoxwhiskerOptions", + 35, + 6, + 0, + 4]], + [["delete", + 0, + 0, + 11, + 2, + 0, + 36], + ["setXAxisValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setBubbleSizes", + 1, + 0, + 11, + 2, + 0, + 37], + ["getDimensionValues", + 1, + 0, + 27, + 2, + 0, + 37], + ["getDimensionDataSourceString", + 1, + 0, + 35], + ["getDimensionDataSourceType", + 1, + 0, + 35]]], + ["ChartSeriesFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartPointsCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartPoint", + 1, + 2, + 0, + 4]], + 0, + "ChartPoint"], + ["ChartPoint", + 0, + [["value", + 3], + ["hasDataLabel", + 1, + 11, + 0, + 2, + 37], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36]], + [["format", + "ChartPointFormat", + 35, + 0, + 0, + 4], + ["dataLabel", + "ChartDataLabel", + 35, + 11, + 0, + 4]]], + ["ChartPointFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartAxes", + 0, + 0, + [["categoryAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["seriesAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["valueAxis", + "ChartAxis", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ChartAxis", + 2, + 2, + 11, + 4]]], + ["ChartAxis", + 0, + [["majorUnit", + 1, + 0, + 0, + 2, + 37], + ["maximum", + 1, + 0, + 0, + 2, + 36], + ["minimum", + 1, + 0, + 0, + 2, + 36], + ["minorUnit", + 1, + 0, + 0, + 2, + 37], + ["displayUnit", + 1, + 11, + 0, + 2, + 36], + ["showDisplayUnitLabel", + 1, + 11, + 0, + 2, + 37], + ["customDisplayUnit", + 3, + 11], + ["type", + 3, + 11], + ["minorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["majorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["baseTimeUnit", + 1, + 11, + 0, + 2, + 37], + ["categoryType", + 1, + 11, + 0, + 2, + 37], + ["axisGroup", + 3, + 11], + ["scaleType", + 1, + 11, + 0, + 2, + 37], + ["logBase", + 1, + 11, + 0, + 2, + 37], + ["left", + 3, + 11], + ["top", + 3, + 11], + ["height", + 3, + 11], + ["width", + 3, + 11], + ["reversePlotOrder", + 1, + 11, + 0, + 2, + 36], + ["crosses", + 1, + 11, + 0, + 2, + 36], + ["crossesAt", + 3, + 11], + ["visible", + 1, + 11, + 0, + 2, + 37], + ["isBetweenCategories", + 1, + 5, + 0, + 2, + 36], + ["majorTickMark", + 1, + 11, + 0, + 2, + 37], + ["minorTickMark", + 1, + 11, + 0, + 2, + 37], + ["tickMarkSpacing", + 1, + 11, + 0, + 2, + 37], + ["tickLabelPosition", + 1, + 11, + 0, + 2, + 36], + ["tickLabelSpacing", + 1, + 11, + 0, + 2, + 37], + ["alignment", + 1, + 5, + 0, + 2, + 37], + ["multiLevel", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["offset", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["position", + 1, + 5, + 0, + 2, + 36], + ["positionAt", + 3, + 5]], + [["majorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["minorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["title", + "ChartAxisTitle", + 35, + 0, + 0, + 4], + ["format", + "ChartAxisFormat", + 35, + 0, + 0, + 4]], + [["setCategoryNames", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCustomDisplayUnit", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCrossesAt", + 1, + 0, + 11, + 2, + 0, + 37], + ["setPositionAt", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4]]], + ["ChartAxisTitle", + 0, + [["text", + 1, + 0, + 0, + 2, + 36], + ["visible", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 27, + 0, + 2, + 37]], + [["format", + "ChartAxisTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataLabels", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataLabel", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 5, + 0, + 2, + 37], + ["left", + 1, + 5, + 0, + 2, + 37], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["formula", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["text", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 5, + 0, + 4]], + 0, + [["getSubstring", + "ChartFormatString", + 2, + 2, + 8, + 4]]], + ["ChartDataLabelFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataTable", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showHorizontalBorder", + 1, + 0, + 0, + 2, + 37], + ["showVerticalBorder", + 1, + 0, + 0, + 2, + 37], + ["showOutlineBorder", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartDataTableFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataTableFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4]]], + ["ChartErrorBars", + 0, + [["endStyleCap", + 1, + 0, + 0, + 2, + 37], + ["include", + 1, + 0, + 0, + 2, + 37], + ["type", + 1, + 0, + 0, + 2, + 37], + ["visible", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartErrorBarsFormat", + 35, + 0, + 0, + 4]]], + ["ChartErrorBarsFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlines", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36]], + [["format", + "ChartGridlinesFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlinesFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartLegend", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36], + ["position", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["width", + 1, + 11, + 0, + 2, + 37], + ["height", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartLegendFormat", + 35, + 0, + 0, + 4], + ["legendEntries", + "ChartLegendEntryCollection", + 19, + 11, + 0, + 4]]], + ["ChartLegendEntry", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["left", + 3, + 5], + ["top", + 3, + 5], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["index", + 3, + 5]]], + ["ChartLegendEntryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "ChartLegendEntry", + 1, + 2, + 0, + 4]], + 0, + "ChartLegendEntry"], + ["ChartLegendFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartMapOptions", + 0, + [["level", + 1, + 0, + 0, + 2, + 37], + ["labelStrategy", + 1, + 0, + 0, + 2, + 37], + ["projectionType", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTitle", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["width", + 3, + 11], + ["height", + 3, + 11], + ["verticalAlignment", + 1, + 11, + 0, + 2, + 37], + ["textOrientation", + 1, + 11, + 0, + 2, + 37], + ["position", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 11, + 2, + 0, + 37]], + [["getSubstring", + "ChartFormatString", + 2, + 2, + 11, + 4]]], + ["ChartFormatString", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartFill", + 4, + 0, + 0, + [["setSolidColor", + 1, + 0, + 0, + 2, + 0, + 36], + ["clear", + 0, + 0, + 0, + 2, + 0, + 37], + ["getSolidColor", + 0, + 0, + 24, + 2, + 0, + 37]]], + ["ChartBorder", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 0, + 0, + 2, + 36], + ["weight", + 1, + 0, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 5, + 2, + 0, + 37]]], + ["ChartBinOptions", + 0, + [["type", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["count", + 1, + 0, + 0, + 2, + 36], + ["allowOverflow", + 1, + 0, + 0, + 2, + 37], + ["allowUnderflow", + 1, + 0, + 0, + 2, + 37], + ["overflowValue", + 1, + 0, + 0, + 2, + 36], + ["underflowValue", + 1, + 0, + 0, + 2, + 36]]], + ["ChartBoxwhiskerOptions", + 0, + [["showInnerPoints", + 1, + 0, + 0, + 2, + 37], + ["showOutlierPoints", + 1, + 0, + 0, + 2, + 37], + ["showMeanMarker", + 1, + 0, + 0, + 2, + 37], + ["showMeanLine", + 1, + 0, + 0, + 2, + 37], + ["quartileCalculation", + 1, + 0, + 0, + 2, + 37]]], + ["ChartLineFormat", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 11, + 0, + 2, + 36], + ["weight", + 1, + 11, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartFont", + 0, + [["bold", + 1, + 0, + 0, + 2, + 37], + ["color", + 1, + 0, + 0, + 2, + 36], + ["italic", + 1, + 0, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["size", + 1, + 0, + 0, + 2, + 37], + ["underline", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTrendline", + 0, + [["type", + 1, + 0, + 0, + 2, + 37], + ["polynomialOrder", + 1, + 0, + 0, + 2, + 37], + ["movingAveragePeriod", + 1, + 0, + 0, + 2, + 37], + ["_Id", + 2], + ["showEquation", + 1, + 5, + 0, + 2, + 37], + ["showRSquared", + 1, + 5, + 0, + 2, + 37], + ["forwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["backwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["intercept", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartTrendlineFormat", + 35, + 0, + 0, + 4], + ["label", + "ChartTrendlineLabel", + 35, + 5, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartTrendlineCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "ChartTrendline", + 1, + 8, + 0, + 2, + 0, + 0, + 36], + ["getItem", + "ChartTrendline", + 1, + 18, + 0, + 4]], + 0, + "ChartTrendline"], + ["ChartTrendlineFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabel", + 0, + [["top", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 0, + 0, + 2, + 37], + ["width", + 3], + ["height", + 3], + ["formula", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 37], + ["autoText", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 0, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37]], + [["format", + "ChartTrendlineLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabelFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartPlotArea", + 0, + [["left", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 37], + ["width", + 1, + 0, + 0, + 2, + 37], + ["height", + 1, + 0, + 0, + 2, + 37], + ["insideLeft", + 1, + 0, + 0, + 2, + 37], + ["insideTop", + 1, + 0, + 0, + 2, + 37], + ["insideWidth", + 1, + 0, + 0, + 2, + 37], + ["insideHeight", + 1, + 0, + 0, + 2, + 37], + ["position", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartPlotAreaFormat", + 35, + 0, + 0, + 4]]], + ["ChartPlotAreaFormat", + 0, + 0, + [["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4]]], + ["VisualCollection", + 5, + 0, + 0, + [["getDefinitions", + 0, + 2, + 0, + 4], + ["getPreview", + 4, + 2, + 0, + 4], + ["bootstrapAgaveVisual", + 0, + 0, + 0, + 2], + ["getCount", + 0, + 2, + 0, + 4], + ["_RegisterSelectionChangedEvent", + 0, + 2], + ["_UnregisterSelectionChangedEvent", + 0, + 2]], + [["add", + "Visual", + 3, + 8, + 0, + 2], + ["_GetItem", + "Visual", + 1, + 18, + 0, + 4], + ["getSelectedOrNullObject", + "Visual", + 0, + 2, + 0, + 4]], + 0, + "Visual", + [["AgaveVisualUpdate", + 2, + 0, + "MessageType.agaveVisualUpdateEvent", + "", + "null", + "null"], + ["SelectionChanged", + 0, + 0, + "MessageType.visualSelectionChangedEvent", + "this._ParentObject.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["Visual", + 0, + [["id", + 3], + ["isSupportedInVisualTaskpane", + 3]], + [["properties", + "VisualPropertyCollection", + 18, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2], + ["getProperty", + 1, + 2, + 0, + 4], + ["setProperty", + 2, + 0, + 0, + 2], + ["changeDataSource", + 2, + 0, + 0, + 2], + ["getDataSource", + 0, + 2, + 0, + 4], + ["setPropertyToDefault", + 1, + 0, + 0, + 2], + ["_RegisterChangeEvent", + 0, + 2], + ["_UnregisterChangeEvent", + 0, + 2], + ["serializeProperties", + 0, + 2, + 0, + 4], + ["deserializeProperties", + 1, + 0, + 0, + 2], + ["addChildProperty", + 2, + 0, + 19, + 2], + ["removeChildProperty", + 2, + 0, + 19, + 2], + ["getDataFieldAssignments", + 0, + 0, + 3], + ["getDataConfig", + 0, + 2, + 3, + 4], + ["modifyDataConfig", + 1, + 0, + 3, + 2]], + [["getChildProperties", + "VisualPropertyCollection", + 2, + 6, + 0, + 4], + ["getDataControllerClient", + "DataControllerClient", + 0, + 2, + 0, + 4], + ["getElementChildProperties", + "VisualPropertyCollection", + 3, + 6, + 0, + 4]], + 0, + 0, + [["ChangeNotification", + 2, + 0, + "MessageType.visualChangeEvent", + "this.id", + "_RegisterChangeEvent", + "_UnregisterChangeEvent"]]], + ["VisualProperty", + 0, + [["type", + 3], + ["value", + 3], + ["id", + 3], + ["localizedName", + 3], + ["options", + 3], + ["localizedOptions", + 3], + ["hasDefault", + 3], + ["isDefault", + 3], + ["min", + 3], + ["max", + 3], + ["stepSize", + 3], + ["hideMeButShowChildrenUI", + 3], + ["expandableUI", + 3], + ["nextPropOnSameLine", + 3], + ["showResetUI", + 3], + ["size", + 3, + 19], + ["minSize", + 3, + 19], + ["maxSize", + 3, + 19], + ["index", + 3, + 19], + ["parentName", + 3, + 19]], + 0, + [["getBoolMetaProperty", + 1, + 2, + 0, + 4]]], + ["VisualPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "VisualProperty", + 1, + 18, + 0, + 4], + ["getItemAt", + "VisualProperty", + 1, + 2, + 0, + 4]], + 0, + "VisualProperty"], + ["DataControllerClient", + 0, + 0, + 0, + [["getWells", + 0, + 2, + 0, + 4], + ["getAssociatedFields", + 1, + 2, + 0, + 4], + ["getAvailableFields", + 1, + 2, + 0, + 4], + ["addField", + 3, + 0, + 0, + 2], + ["removeField", + 2, + 0, + 0, + 2], + ["moveField", + 3, + 0, + 0, + 2]]], + ["RangeSort", + 0, + 0, + 0, + [["apply", + 5, + 0, + 0, + 2, + 0, + 32]]], + ["TableSort", + 0, + [["matchCase", + 3], + ["method", + 3], + ["fields", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 26], + ["clear"], + ["reapply"]]], + ["Filter", + 0, + [["criteria", + 3]], + 0, + [["apply", + 1], + ["clear", + 0, + 0, + 0, + 2, + 0, + 34], + ["applyBottomItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyBottomPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCellColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyDynamicFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyFontColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyValuesFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyIconFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCustomFilter", + 3, + 0, + 0, + 2, + 0, + 34]]], + ["AutoFilter", + 0, + [["enabled", + 3], + ["isDataFiltered", + 3], + ["criteria", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 33], + ["reapply", + 0, + 0, + 0, + 2, + 0, + 26], + ["remove", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearCriteria", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearColumnCriteria", + 1, + 0, + 18]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["CultureInfo", + 0, + [["name", + 3]], + [["numberFormat", + "NumberFormatInfo", + 3, + 0, + 0, + 4], + ["datetimeFormat", + "DatetimeFormatInfo", + 3, + 27, + 0, + 4]]], + ["NumberFormatInfo", + 0, + [["numberDecimalSeparator", + 3], + ["numberGroupSeparator", + 3], + ["currencySymbol", + 3, + 30]]], + ["DatetimeFormatInfo", + 0, + [["dateSeparator", + 3], + ["longDatePattern", + 3], + ["shortDatePattern", + 3], + ["timeSeparator", + 3], + ["longTimePattern", + 3]]], + ["CustomXmlPartScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4], + ["getOnlyItem", + "CustomXmlPart", + 0, + 2, + 0, + 4], + ["getOnlyItemOrNullObject", + "CustomXmlPart", + 0, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPartCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["add", + "CustomXmlPart", + 1, + 8], + ["getByNamespace", + "CustomXmlPartScopedCollection", + 1, + 6, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPart", + 0, + [["id", + 3], + ["namespaceUri", + 3]], + 0, + [["delete"], + ["getXml", + 0, + 2, + 0, + 4], + ["setXml", + 1]]], + ["_V1Api", + 0, + 0, + 0, + [["bindingGetData", + 1, + 2, + 0, + 4], + ["getSelectedData", + 1, + 2, + 0, + 4], + ["gotoById", + 1, + 2, + 0, + 4], + ["bindingAddFromSelection", + 1, + 2], + ["bindingGetById", + 1, + 2, + 0, + 4], + ["bindingReleaseById", + 1, + 2], + ["bindingGetAll", + 0, + 2, + 0, + 4], + ["bindingAddFromNamedItem", + 1, + 2], + ["bindingAddFromPrompt", + 1, + 2], + ["bindingDeleteAllDataValues", + 1], + ["setSelectedData", + 1], + ["bindingClearFormats", + 1], + ["bindingSetData", + 1], + ["bindingSetFormats", + 1], + ["bindingSetTableOptions", + 1], + ["bindingAddRows", + 1], + ["bindingAddColumns", + 1], + ["getFilePropertiesAsync", + 0, + 2, + 9, + 4]]], + ["PivotTableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getFirst", + "PivotTable", + 0, + 10, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 0, + 4], + ["getFirstOrNullObject", + "PivotTable", + 0, + 2, + 35, + 4]], + 0, + "PivotTable"], + ["PivotTableCollection", + 5, + 0, + 0, + [["refreshAll", + 0, + 0, + 0, + 2, + 0, + 12], + ["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 15, + 4], + ["add", + "PivotTable", + 3, + 8, + 5, + 2, + 0, + 0, + 12]], + 0, + "PivotTable", + [["Added", + 0, + 3, + "MessageType.pivotTableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.pivotTableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["PivotTable", + 0, + [["name", + 1, + 0, + 0, + 2, + 12], + ["id", + 3, + 16], + ["useCustomSortLists", + 1, + 6, + 0, + 2, + 12], + ["enableDataValueEditing", + 1, + 6, + 0, + 2, + 12], + ["refreshOnOpen", + 0, + 23, + 0, + 2, + 29], + ["allowMultipleFiltersPerField", + 0, + 27, + 0, + 2, + 12]], + [["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["hierarchies", + "PivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["rowHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["columnHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["dataHierarchies", + "DataPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["filterHierarchies", + "FilterPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["layout", + "PivotLayout", + 2, + 5, + 0, + 4]], + [["refresh", + 0, + 0, + 0, + 2, + 0, + 12], + ["delete", + 0, + 0, + 5, + 2, + 0, + 12], + ["getDataSourceString", + 0, + 2, + 35, + 4], + ["getDataSourceType", + 0, + 2, + 35, + 4]], + [["addDateGroup", + "PivotHierarchy", + 2, + 0, + 8, + 2, + 0, + 0, + 38]]], + ["PivotLayout", + 0, + [["showColumnGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["showRowGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["enableFieldList", + 1, + 17, + 0, + 2, + 12], + ["subtotalLocation", + 1, + 0, + 0, + 2, + 12], + ["layoutType", + 1, + 0, + 0, + 2, + 12], + ["autoFormat", + 1, + 6, + 0, + 2, + 12], + ["preserveFormatting", + 1, + 6, + 0, + 2, + 12], + ["altTextDescription", + 0, + 23, + 0, + 2, + 29], + ["altTextTitle", + 0, + 23, + 0, + 2, + 29], + ["emptyCellText", + 0, + 23, + 0, + 2, + 29], + ["fillEmptyCells", + 0, + 23, + 0, + 2, + 29], + ["showFieldHeaders", + 0, + 23, + 0, + 2, + 29], + ["tabularValues", + 3, + 8], + ["tabularText", + 3, + 8], + ["tabularNumberFormat", + 3, + 8], + ["tabularNumberFormatLocal", + 3, + 8]], + [["pivotStyle", + "PivotTableStyle", + 35, + 8, + 0, + 4]], + [["setAutoSortOnCell", + 2, + 0, + 6, + 2, + 0, + 12], + ["setStyle", + 1, + 0, + 8, + 2, + 0, + 12], + ["displayBlankLineAfterEachItem", + 1, + 0, + 23, + 2, + 0, + 29], + ["repeatAllItemLabels", + 1, + 0, + 23, + 2, + 0, + 29]], + [["getRange", + "Range", + 0, + 3], + ["getRowLabelRange", + "Range", + 0, + 3], + ["getColumnLabelRange", + "Range", + 0, + 3], + ["getFilterAxisRange", + "Range", + 0, + 3], + ["getDataBodyRange", + "Range", + 0, + 3], + ["getCell", + "Range", + 3, + 2, + 8], + ["getPivotItems", + "PivotItemCollection", + 2, + 4, + 6], + ["getDataHierarchy", + "DataPivotHierarchy", + 1, + 3, + 6]]], + ["PivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotHierarchy", + 1, + 2, + 0, + 4]], + 0, + "PivotHierarchy"], + ["PivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]]], + ["RowColumnPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "RowColumnPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "RowColumnPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "RowColumnPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "RowColumnPivotHierarchy"], + ["RowColumnPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["FilterPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "FilterPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "FilterPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "FilterPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "FilterPivotHierarchy"], + ["FilterPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["enableMultipleFilterItems", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["DataPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "DataPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DataPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "DataPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "DataPivotHierarchy"], + ["DataPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["numberFormat", + 1, + 0, + 0, + 2, + 12], + ["summarizeBy", + 1, + 0, + 0, + 2, + 12], + ["showAs", + 1, + 0, + 0, + 2, + 12]], + [["field", + "PivotField", + 35, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["PivotFieldCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotField", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotField", + 1, + 2, + 0, + 4]], + 0, + "PivotField"], + ["PivotField", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["subtotals", + 1, + 0, + 0, + 2, + 12], + ["showAllItems", + 1, + 0, + 0, + 2, + 12]], + [["items", + "PivotItemCollection", + 19, + 0, + 0, + 4]], + [["sortByLabels", + 1, + 1, + 0, + 2, + 0, + 12], + ["sortByValues", + 3, + 0, + 6, + 2, + 0, + 12], + ["applyFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["clearAllFilters", + 0, + 0, + 27, + 2, + 0, + 12], + ["clearFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["getFilters", + 0, + 0, + 27], + ["isFiltered", + 1, + 0, + 27]]], + ["PivotItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotItem", + 1, + 2, + 0, + 4]], + 0, + "PivotItem"], + ["PivotItem", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["isExpanded", + 1, + 0, + 0, + 2, + 12], + ["visible", + 1, + 0, + 0, + 2, + 12]]], + ["WorksheetCustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["_Id", + 2]], + 0, + [["delete"]]], + ["WorksheetCustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "WorksheetCustomProperty", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "WorksheetCustomProperty", + 1], + ["add", + "WorksheetCustomProperty", + 2, + 8]], + 0, + "WorksheetCustomProperty"], + ["DocumentProperties", + 0, + [["title", + 1], + ["subject", + 1], + ["author", + 1], + ["keywords", + 1], + ["comments", + 1], + ["lastAuthor", + 3], + ["revisionNumber", + 1], + ["creationDate", + 11], + ["category", + 1], + ["manager", + 1], + ["company", + 1]], + [["custom", + "CustomPropertyCollection", + 19, + 0, + 0, + 4]]], + ["CustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["type", + 3]], + 0, + [["delete"]]], + ["CustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["deleteAll"]], + [["getItemOrNullObject", + "CustomProperty", + 1, + 2, + 0, + 4], + ["add", + "CustomProperty", + 2, + 8], + ["getItem", + "CustomProperty", + 1, + 18, + 0, + 4]], + 0, + "CustomProperty"], + ["ConditionalFormatCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["clearAll", + 0, + 0, + 0, + 2, + 0, + 39]], + [["getItemAt", + "ConditionalFormat", + 1, + 2, + 0, + 4], + ["add", + "ConditionalFormat", + 1, + 8, + 0, + 2, + 0, + 0, + 39], + ["getItem", + "ConditionalFormat", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "ConditionalFormat", + 1, + 2, + 18, + 4]], + 0, + "ConditionalFormat"], + ["ConditionalFormat", + 0, + [["stopIfTrue", + 1], + ["priority", + 1], + ["type", + 3], + ["id", + 3]], + [["dataBarOrNullObject", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["dataBar", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["customOrNullObject", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["custom", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSet", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSetOrNullObject", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScale", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScaleOrNullObject", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottom", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottomOrNullObject", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["preset", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["presetOrNullObject", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparison", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparisonOrNullObject", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValue", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValueOrNullObject", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 40], + ["changeRuleToCellValue", + 1, + 0, + 30], + ["changeRuleToColorScale", + 0, + 0, + 30], + ["changeRuleToContainsText", + 1, + 0, + 30], + ["changeRuleToCustom", + 1, + 0, + 30], + ["changeRuleToDataBar", + 0, + 0, + 30], + ["changeRuleToIconSet", + 0, + 0, + 30], + ["changeRuleToPresetCriteria", + 1, + 0, + 30], + ["changeRuleToTopBottom", + 1, + 0, + 30], + ["setRanges", + 1, + 0, + 30]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getRanges", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["DataBarConditionalFormat", + 0, + [["showDataBarOnly", + 1, + 0, + 0, + 2, + 40], + ["barDirection", + 1, + 0, + 0, + 2, + 41], + ["axisFormat", + 1, + 0, + 0, + 2, + 41], + ["axisColor", + 1, + 0, + 0, + 2, + 41], + ["lowerBoundRule", + 1, + 0, + 0, + 2, + 41], + ["upperBoundRule", + 1, + 0, + 0, + 2, + 41]], + [["positiveFormat", + "ConditionalDataBarPositiveFormat", + 35, + 0, + 0, + 4], + ["negativeFormat", + "ConditionalDataBarNegativeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalDataBarPositiveFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["gradientFill", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40]]], + ["ConditionalDataBarNegativeFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveFillColor", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveBorderColor", + 1, + 0, + 0, + 2, + 40]]], + ["CustomConditionalFormat", + 0, + 0, + [["rule", + "ConditionalFormatRule", + 35, + 0, + 0, + 4], + ["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalFormatRule", + 0, + [["formula", + 1, + 0, + 0, + 2, + 41], + ["formulaLocal", + 1], + ["formulaR1C1", + 1]]], + ["IconSetConditionalFormat", + 0, + [["reverseIconOrder", + 1, + 0, + 0, + 2, + 41], + ["showIconOnly", + 1, + 0, + 0, + 2, + 41], + ["style", + 1, + 0, + 0, + 2, + 41], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["ColorScaleConditionalFormat", + 0, + [["threeColorScale", + 3], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["TopBottomConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["PresetCriteriaConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["TextConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["CellValueConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalRangeFormat", + 0, + [["numberFormat", + 1]], + [["fill", + "ConditionalRangeFill", + 35, + 0, + 0, + 4], + ["font", + "ConditionalRangeFont", + 35, + 0, + 0, + 4], + ["borders", + "ConditionalRangeBorderCollection", + 51, + 0, + 0, + 4]], + [["clearFormat", + 0, + 0, + 30]]], + ["ConditionalRangeFont", + 0, + [["color", + 1, + 0, + 0, + 2, + 42], + ["italic", + 1, + 0, + 0, + 2, + 42], + ["bold", + 1, + 0, + 0, + 2, + 42], + ["underline", + 1, + 0, + 0, + 2, + 42], + ["strikethrough", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 42], + ["color", + 1, + 0, + 0, + 2, + 42]]], + ["ConditionalRangeBorderCollection", + 1, + [["count", + 3]], + [["top", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["bottom", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["left", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["right", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ConditionalRangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "ConditionalRangeBorder", + 1, + 2, + 0, + 4]], + 0, + "ConditionalRangeBorder"], + ["NumberFormattingService", + 0, + 0, + 0, + 0, + [["getFormatter", + "NumberFormatter", + 1, + 3]], + 0, + 0, + 0, + "Microsoft.ExcelServices.NumberFormattingService", + 4], + ["NumberFormatter", + 0, + [["isDateTime", + 3], + ["isPercent", + 3], + ["isCurrency", + 3], + ["isNumeric", + 3], + ["isText", + 3], + ["hasYear", + 3], + ["hasMonth", + 3], + ["hasDayOfWeek", + 3]], + 0, + [["format", + 1, + 3]]], + ["CustomFunctionManager", + 36, + [["status", + 2]], + 0, + [["register", + 2]], + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.CustomFunctionManager", + 4], + ["Style", + 0, + [["builtIn", + 3], + ["formulaHidden", + 1], + ["horizontalAlignment", + 1], + ["includeAlignment", + 1], + ["includeBorder", + 1], + ["includeFont", + 1], + ["includeNumber", + 1], + ["includePatterns", + 1], + ["includeProtection", + 1], + ["indentLevel", + 1], + ["locked", + 1], + ["name", + 3], + ["numberFormat", + 1], + ["numberFormatLocal", + 1], + ["readingOrder", + 1], + ["shrinkToFit", + 1], + ["verticalAlignment", + 1], + ["wrapText", + 1], + ["textOrientation", + 5, + 5], + ["autoIndent", + 1, + 5]], + [["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["fill", + "RangeFill", + 35, + 0, + 0, + 4]], + [["delete"]]], + ["StyleCollection", + 1, + 0, + 0, + [["add", + 1], + ["getCount", + 0, + 2, + 6, + 4]], + [["getItem", + "Style", + 1, + 18, + 0, + 4], + ["getItemAt", + "Style", + 1, + 2, + 6, + 4], + ["getItemOrNullObject", + "Style", + 1, + 2, + 18, + 4]], + 0, + "Style"], + ["TableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TableStyle", + 1, + 2, + 0, + 4], + ["add", + "TableStyle", + 2, + 8], + ["getDefault", + "TableStyle"]], + 0, + "TableStyle"], + ["TableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TableStyle"]]], + ["PivotTableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "PivotTableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTableStyle", + 1, + 2, + 0, + 4], + ["add", + "PivotTableStyle", + 2, + 8], + ["getDefault", + "PivotTableStyle"]], + 0, + "PivotTableStyle"], + ["PivotTableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "PivotTableStyle"]]], + ["SlicerStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "SlicerStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerStyle", + 1, + 2, + 0, + 4], + ["add", + "SlicerStyle", + 2, + 8], + ["getDefault", + "SlicerStyle"]], + 0, + "SlicerStyle"], + ["SlicerStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "SlicerStyle"]]], + ["TimelineStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TimelineStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TimelineStyle", + 1, + 2, + 0, + 4], + ["add", + "TimelineStyle", + 2, + 8], + ["getDefault", + "TimelineStyle"]], + 0, + "TimelineStyle"], + ["TimelineStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TimelineStyle"]]], + ["InternalTest", + 0, + 0, + 0, + [["delay", + 1], + ["triggerMessage", + 4, + 0, + 11], + ["_RegisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEvent", + 2, + 0, + 11], + ["triggerPostProcess", + 0, + 0, + 11], + ["_RegisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEventWithFilter", + 3, + 0, + 11], + ["firstPartyMethod", + 0, + 2, + 11, + 5], + ["_RegisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_RegisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["unregisterAllCustomFunctionExecutionEvents", + 0, + 0, + 20], + ["updateRangeValueOnCurrentSheet", + 2, + 0, + 3, + 2], + ["triggerUserUndo", + 0, + 2, + 3], + ["triggerUserRedo", + 0, + 2, + 3], + ["enterCellEdit", + 1, + 0, + 6], + ["installCustomFunctionsFromCache", + 0, + 0, + 6], + ["recalc", + 2, + 0, + 6], + ["recalcBySolutionId", + 1, + 0, + 6], + ["safeForCellEditModeMethod", + 1, + 0, + 6], + ["exitCellEdit", + 0, + 0, + 6], + ["noPermissionMethod", + 1, + 0, + 6], + ["verifyCustomFunctionListExist", + 0, + 0, + 6], + ["enableContentWorkbookLink", + 0, + 0, + 3], + ["previewExecutionMethod", + 1, + 0, + 8, + 16], + ["setRapidJsonEnabled", + 1, + 0, + 8], + ["triggerVbaRecorderRecordingChanged", + 2, + 0, + 8]], + 0, + 0, + 0, + [["CustomFunctionExecutionBeginEvent", + 0, + 20, + "MessageType.customFunctionExecutionBeginEvent", + "", + "_RegisterCustomFunctionExecutionBeginEvent", + "_UnregisterCustomFunctionExecutionBeginEvent"], + ["CustomFunctionExecutionEndEvent", + 0, + 20, + "MessageType.customFunctionExecutionEndEvent", + "", + "_RegisterCustomFunctionExecutionEndEvent", + "_UnregisterCustomFunctionExecutionEndEvent"], + ["Test1Event", + 2, + 11, + "MessageType.test1Event", + "", + "_RegisterTest1Event", + "_UnregisterTest1Event"], + ["TestEvent", + 2, + 11, + "MessageType.testEvent", + "", + "_RegisterTestEvent", + "_UnregisterTestEvent"]], + "Microsoft.ExcelServices.InternalTest", + 4], + ["PageLayout", + 0, + [["orientation", + 1], + ["paperSize", + 1], + ["blackAndWhite", + 1], + ["printErrors", + 1], + ["zoom", + 1], + ["centerHorizontally", + 1], + ["centerVertically", + 1], + ["printHeadings", + 1], + ["printGridlines", + 1], + ["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["headerMargin", + 1], + ["footerMargin", + 1], + ["printComments", + 1], + ["draftMode", + 1], + ["firstPageNumber", + 1], + ["printOrder", + 1]], + [["headersFooters", + "HeaderFooterGroup", + 35, + 0, + 0, + 4]], + [["setPrintMargins", + 2], + ["setPrintArea", + 1], + ["setPrintTitleRows", + 1], + ["setPrintTitleColumns", + 1]], + [["getPrintArea", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintAreaOrNullObject", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintTitleRows", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleRowsOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumns", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumnsOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["HeaderFooter", + 0, + [["leftHeader", + 1], + ["centerHeader", + 1], + ["rightHeader", + 1], + ["leftFooter", + 1], + ["centerFooter", + 1], + ["rightFooter", + 1]]], + ["HeaderFooterGroup", + 0, + [["state", + 1], + ["useSheetMargins", + 1], + ["useSheetScale", + 1]], + [["defaultForAllPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["firstPage", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["evenPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["oddPages", + "HeaderFooter", + 35, + 0, + 0, + 4]]], + ["PageBreak", + 0, + [["_Id", + 2], + ["columnIndex", + 3], + ["rowIndex", + 3]], + 0, + [["delete"]], + [["getCellAfterBreak", + "Range", + 0, + 10, + 0, + 4]]], + ["PageBreakCollection", + 1, + 0, + 0, + [["removePageBreaks"], + ["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PageBreak", + 1, + 18, + 0, + 4], + ["add", + "PageBreak", + 1, + 8]], + 0, + "PageBreak"], + ["DataConnectionCollection", + 0, + 0, + 0, + [["refreshAll"]], + [["add", + "DataConnection", + 4, + 8, + 8, + 2, + 0, + 0, + 12]]], + ["RangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "Range", + 1, + 2, + 0, + 4]], + 0, + "Range"], + ["RangeAreasCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeAreas", + 1, + 2, + 0, + 4]], + 0, + "RangeAreas"], + ["CommentCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 2, + 27], + ["_UnregisterAddedEvent", + 0, + 2, + 27], + ["_RegisterDeletedEvent", + 0, + 2, + 27], + ["_UnregisterDeletedEvent", + 0, + 2, + 27], + ["_RegisterChangedEvent", + 0, + 2, + 27], + ["_UnregisterChangedEvent", + 0, + 2, + 27]], + [["getItem", + "Comment", + 1, + 18, + 0, + 4], + ["getItemAt", + "Comment", + 1, + 2, + 0, + 4], + ["add", + "Comment", + 3, + 8], + ["getItemByReplyId", + "Comment", + 1, + 2, + 0, + 4], + ["getItemByCell", + "Comment", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Comment", + 1, + 2, + 18, + 4]], + 0, + "Comment", + [["Added", + 0, + 27, + "MessageType.commentAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 0, + 27, + "MessageType.commentChangedEvent", + "this._eventTargetId", + "_RegisterChangedEvent", + "_UnregisterChangedEvent"], + ["Deleted", + 0, + 27, + "MessageType.commentDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Comment", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 1, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + [["replies", + "CommentReplyCollection", + 19, + 0, + 0, + 4]], + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["CommentReplyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "CommentReply", + 2, + 8], + ["getItem", + "CommentReply", + 1, + 18, + 0, + 4], + ["getItemAt", + "CommentReply", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "CommentReply", + 1, + 2, + 18, + 4]], + 0, + "CommentReply"], + ["CommentReply", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 3, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + 0, + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getParentComment", + "Comment"], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["ShapeCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["addImage", + "Shape", + 1], + ["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["addGeometricShape", + "Shape", + 1], + ["addTextBox", + "Shape", + 1], + ["addSvg", + "Shape", + 1, + 0, + 8], + ["addGroup", + "Shape", + 1], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["addLine", + "Shape", + 5], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape", + [["Added", + 0, + 3, + "MessageType.shapeAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.shapeDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Shape", + 0, + [["id", + 3], + ["name", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["rotation", + 1], + ["zOrderPosition", + 3], + ["altTextTitle", + 1], + ["altTextDescription", + 1, + 0, + 0, + 2, + 36], + ["type", + 3], + ["lockAspectRatio", + 1], + ["placement", + 1, + 17], + ["geometricShapeType", + 1], + ["visible", + 1], + ["level", + 3], + ["connectionSiteCount", + 3], + ["scriptLink", + 1, + 8, + 0, + 2, + 37], + ["displayName", + 3, + 35]], + [["geometricShape", + "GeometricShape", + 2, + 0, + 0, + 4], + ["image", + "Image", + 2, + 0, + 0, + 4], + ["textFrame", + "TextFrame", + 2, + 0, + 0, + 4], + ["fill", + "ShapeFill", + 35, + 0, + 0, + 4], + ["group", + "ShapeGroup", + 2, + 0, + 0, + 4], + ["parentGroup", + "Shape", + 2, + 0, + 0, + 4], + ["line", + "Line", + 2, + 0, + 0, + 4], + ["lineFormat", + "ShapeLineFormat", + 35, + 0, + 0, + 4]], + [["setZOrder", + 1], + ["incrementLeft", + 1], + ["incrementTop", + 1], + ["incrementRotation", + 1], + ["scaleHeight", + 3], + ["scaleWidth", + 3], + ["delete"], + ["getAsImage", + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["activate", + 0, + 0, + 3]], + [["copyTo", + "Shape", + 1, + 8, + 17, + 0, + 0, + "_GetShapeById"], + ["_GetShapeById", + "Shape", + 1, + 2, + 17, + 4]], + 0, + 0, + [["Activated", + 0, + 0, + "MessageType.shapeActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 0, + "MessageType.shapeDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["GeometricShape", + 0, + [["id", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["Image", + 0, + [["id", + 3], + ["format", + 3, + 0, + "format"]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["ShapeGroup", + 0, + [["id", + 3]], + [["shapes", + "GroupShapeCollection", + 19, + 0, + 0, + 4], + ["shape", + "Shape", + 2, + 0, + 0, + 4]], + [["ungroup"]]], + ["GroupShapeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape"], + ["Line", + 0, + [["id", + 3], + ["connectorType", + 1, + 0, + "connectorType"], + ["beginArrowheadLength", + 1], + ["beginArrowheadStyle", + 1], + ["beginArrowheadWidth", + 1], + ["endArrowheadLength", + 1], + ["endArrowheadStyle", + 1], + ["endArrowheadWidth", + 1], + ["isBeginConnected", + 3], + ["beginConnectedSite", + 3], + ["isEndConnected", + 3], + ["endConnectedSite", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4], + ["beginConnectedShape", + "Shape", + 2, + 0, + 0, + 4], + ["endConnectedShape", + "Shape", + 2, + 0, + 0, + 4]], + [["connectBeginShape", + 2], + ["disconnectBeginShape"], + ["connectEndShape", + 2], + ["disconnectEndShape"]]], + ["ShapeFill", + 0, + [["foregroundColor", + 1], + ["type", + 3], + ["transparency", + 1]], + 0, + [["clear"], + ["setSolidColor", + 1]]], + ["ShapeLineFormat", + 0, + [["visible", + 1], + ["color", + 1], + ["style", + 1], + ["weight", + 1], + ["dashStyle", + 1], + ["transparency", + 1]]], + ["TextFrame", + 0, + [["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["horizontalAlignment", + 1], + ["horizontalOverflow", + 1], + ["verticalAlignment", + 1], + ["verticalOverflow", + 1], + ["orientation", + 1], + ["readingOrder", + 1], + ["hasText", + 3], + ["autoSizeSetting", + 1]], + [["textRange", + "TextRange", + 2, + 0, + 0, + 4]], + [["deleteText"]]], + ["TextRange", + 0, + [["text", + 1]], + [["font", + "ShapeFont", + 35, + 0, + 0, + 4]], + 0, + [["getSubstring", + "TextRange", + 2]]], + ["ShapeFont", + 0, + [["size", + 1], + ["name", + 1], + ["color", + 1], + ["bold", + 1], + ["italic", + 1], + ["underline", + 1]]], + ["Slicer", + 0, + [["id", + 3], + ["name", + 1], + ["caption", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["nameInFormula", + 1, + 8], + ["isFilterCleared", + 3], + ["style", + 1], + ["sortBy", + 1], + ["sortUsingCustomLists", + 1, + 3], + ["columnCount", + 1, + 3], + ["disableMoveResizeUI", + 1, + 3], + ["displayHeader", + 1, + 3], + ["rowHeight", + 1, + 3], + ["shapeId", + 2, + 3]], + [["slicerItems", + "SlicerItemCollection", + 19, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 35, + 0, + 0, + 4], + ["slicerStyle", + "SlicerStyle", + 35, + 8, + 0, + 4]], + [["delete"], + ["clearFilters"], + ["getSelectedItems"], + ["selectItems", + 1], + ["activate", + 0, + 2, + 3], + ["setStyle", + 1, + 0, + 8]]], + ["SlicerCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "Slicer", + 3, + 8], + ["getItemAt", + "Slicer", + 1, + 2, + 0, + 4], + ["getItem", + "Slicer", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Slicer", + 1, + 2, + 0, + 4]], + 0, + "Slicer"], + ["SlicerItem", + 0, + [["key", + 3], + ["name", + 3], + ["isSelected", + 1], + ["hasData", + 3]]], + ["SlicerItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SlicerItem", + 1, + 2, + 0, + 4], + ["getItem", + "SlicerItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerItem", + 1, + 2, + 0, + 4]], + 0, + "SlicerItem"], + ["Ribbon", + 0, + [["activeTab", + 1]], + 0, + [["executeCommand", + 2], + ["showTeachingCallout", + 3], + ["_RegisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["showChartDialog", + 1, + 2, + 8, + 4]], + 0, + 0, + 0, + [["CommandExecuted", + 0, + 0, + "MessageType.ribbonCommandExecutedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCommandExecutedEvent", + "_UnregisterCommandExecutedEvent"]]], + ["LinkedDataType", + 0, + [["dataProvider", + 2], + ["serviceId", + 2], + ["lastRefreshed", + 10], + ["name", + 2], + ["periodicRefreshInterval", + 2], + ["refreshDataLoadWarnings", + 2], + ["refreshMode", + 2], + ["supportedRefreshModes", + 2], + ["refreshErrors", + 2]], + 0, + [["requestRefresh", + 0, + 0, + 0, + 2], + ["requestSetRefreshMode", + 1, + 0, + 0, + 2]]], + ["LinkedDataTypeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["requestRefreshAll", + 0, + 0, + 0, + 2], + ["_RegisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_RegisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_RegisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4]], + [["getItem", + "LinkedDataType", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "LinkedDataType", + 1], + ["getItemAt", + "LinkedDataType", + 1, + 2, + 0, + 4]], + 0, + "LinkedDataType", + [["LinkedDataTypeAdded", + 0, + 0, + "MessageType.linkedDataTypeLinkedDataTypeAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterLinkedDataTypeAddedEvent", + "_UnregisterLinkedDataTypeAddedEvent"], + ["RefreshModeChanged", + 0, + 0, + "MessageType.linkedDataTypeRefreshModeChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshModeChangedEvent", + "_UnregisterRefreshModeChangedEvent"], + ["RefreshRequestCompleted", + 0, + 0, + "MessageType.linkedDataTypeRefreshRequestCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshRequestCompletedEvent", + "_UnregisterRefreshRequestCompletedEvent"]]], + ["SheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "SheetView", + 1]]], + ["SheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "SheetView", + 1, + 8], + ["enterTemporary", + "SheetView"], + ["getActive", + "SheetView"], + ["getItem", + "SheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "SheetView", + 1, + 2, + 0, + 4]], + 0, + "SheetView"], + ["NamedSheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "NamedSheetView", + 1]]], + ["NamedSheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "NamedSheetView", + 1, + 8], + ["enterTemporary", + "NamedSheetView"], + ["getActive", + "NamedSheetView"], + ["getItem", + "NamedSheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "NamedSheetView", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "NamedSheetView", + 1, + 2, + 28, + 4]], + 0, + "NamedSheetView"], + ["FunctionResult", + 0, + [["error", + 3], + ["value", + 3]]], + ["Functions", + 0, + 0, + 0, + 0, + [["count", + "FunctionResult", + 1, + 72], + ["if", + "FunctionResult", + 3, + 8], + ["isNA", + "FunctionResult", + 1, + 8], + ["isError", + "FunctionResult", + 1, + 8], + ["sum", + "FunctionResult", + 1, + 72], + ["average", + "FunctionResult", + 1, + 72], + ["min", + "FunctionResult", + 1, + 72], + ["max", + "FunctionResult", + 1, + 72], + ["na", + "FunctionResult", + 0, + 8], + ["npv", + "FunctionResult", + 2, + 72], + ["dollar", + "FunctionResult", + 2, + 8], + ["fixed", + "FunctionResult", + 3, + 8], + ["sin", + "FunctionResult", + 1, + 8], + ["cos", + "FunctionResult", + 1, + 8], + ["tan", + "FunctionResult", + 1, + 8], + ["atan", + "FunctionResult", + 1, + 8], + ["pi", + "FunctionResult", + 0, + 8], + ["sqrt", + "FunctionResult", + 1, + 8], + ["exp", + "FunctionResult", + 1, + 8], + ["ln", + "FunctionResult", + 1, + 8], + ["log10", + "FunctionResult", + 1, + 8], + ["abs", + "FunctionResult", + 1, + 8], + ["int", + "FunctionResult", + 1, + 8], + ["sign", + "FunctionResult", + 1, + 8], + ["round", + "FunctionResult", + 2, + 8], + ["lookup", + "FunctionResult", + 3, + 8], + ["rept", + "FunctionResult", + 2, + 8], + ["mid", + "FunctionResult", + 3, + 8], + ["len", + "FunctionResult", + 1, + 8], + ["value", + "FunctionResult", + 1, + 8], + ["true", + "FunctionResult", + 0, + 8], + ["false", + "FunctionResult", + 0, + 8], + ["and", + "FunctionResult", + 1, + 72], + ["or", + "FunctionResult", + 1, + 72], + ["not", + "FunctionResult", + 1, + 8], + ["mod", + "FunctionResult", + 2, + 8], + ["dcount", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCount"], + ["dsum", + "FunctionResult", + 3, + 8, + 0, + 0, + "DSum"], + ["daverage", + "FunctionResult", + 3, + 8, + 0, + 0, + "DAverage"], + ["dmin", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMin"], + ["dmax", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMax"], + ["dstDev", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDev"], + ["dvar", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVar"], + ["text", + "FunctionResult", + 2, + 8], + ["pv", + "FunctionResult", + 5, + 8], + ["fv", + "FunctionResult", + 5, + 8], + ["nper", + "FunctionResult", + 5, + 8, + 0, + 0, + "NPer"], + ["pmt", + "FunctionResult", + 5, + 8], + ["rate", + "FunctionResult", + 6, + 8], + ["mirr", + "FunctionResult", + 3, + 8, + 0, + 0, + "MIrr"], + ["irr", + "FunctionResult", + 2, + 8], + ["rand", + "FunctionResult", + 0, + 8], + ["match", + "FunctionResult", + 3, + 8], + ["date", + "FunctionResult", + 3, + 8], + ["time", + "FunctionResult", + 3, + 8], + ["day", + "FunctionResult", + 1, + 8], + ["month", + "FunctionResult", + 1, + 8], + ["year", + "FunctionResult", + 1, + 8], + ["weekday", + "FunctionResult", + 2, + 8], + ["hour", + "FunctionResult", + 1, + 8], + ["minute", + "FunctionResult", + 1, + 8], + ["second", + "FunctionResult", + 1, + 8], + ["now", + "FunctionResult", + 0, + 8], + ["areas", + "FunctionResult", + 1, + 8], + ["rows", + "FunctionResult", + 1, + 8], + ["columns", + "FunctionResult", + 1, + 8], + ["type", + "FunctionResult", + 1, + 8], + ["atan2", + "FunctionResult", + 2, + 8], + ["asin", + "FunctionResult", + 1, + 8], + ["acos", + "FunctionResult", + 1, + 8], + ["choose", + "FunctionResult", + 2, + 72], + ["hlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "HLookup"], + ["vlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "VLookup"], + ["isref", + "FunctionResult", + 1, + 8], + ["log", + "FunctionResult", + 2, + 8], + ["char", + "FunctionResult", + 1, + 8], + ["lower", + "FunctionResult", + 1, + 8], + ["upper", + "FunctionResult", + 1, + 8], + ["proper", + "FunctionResult", + 1, + 8], + ["left", + "FunctionResult", + 2, + 8], + ["right", + "FunctionResult", + 2, + 8], + ["exact", + "FunctionResult", + 2, + 8], + ["trim", + "FunctionResult", + 1, + 8], + ["replace", + "FunctionResult", + 4, + 8], + ["substitute", + "FunctionResult", + 4, + 8], + ["code", + "FunctionResult", + 1, + 8], + ["find", + "FunctionResult", + 3, + 8], + ["isErr", + "FunctionResult", + 1, + 8], + ["isText", + "FunctionResult", + 1, + 8], + ["isNumber", + "FunctionResult", + 1, + 8], + ["t", + "FunctionResult", + 1, + 8, + 0, + 0, + "T"], + ["n", + "FunctionResult", + 1, + 8, + 0, + 0, + "N"], + ["datevalue", + "FunctionResult", + 1, + 8], + ["timevalue", + "FunctionResult", + 1, + 8], + ["sln", + "FunctionResult", + 3, + 8], + ["syd", + "FunctionResult", + 4, + 8], + ["ddb", + "FunctionResult", + 5, + 8], + ["clean", + "FunctionResult", + 1, + 8], + ["ipmt", + "FunctionResult", + 6, + 8], + ["ppmt", + "FunctionResult", + 6, + 8], + ["countA", + "FunctionResult", + 1, + 72], + ["product", + "FunctionResult", + 1, + 72], + ["fact", + "FunctionResult", + 1, + 8], + ["dproduct", + "FunctionResult", + 3, + 8, + 0, + 0, + "DProduct"], + ["isNonText", + "FunctionResult", + 1, + 8], + ["dstDevP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDevP"], + ["dvarP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVarP"], + ["trunc", + "FunctionResult", + 2, + 8], + ["isLogical", + "FunctionResult", + 1, + 8], + ["dcountA", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCountA"], + ["usdollar", + "FunctionResult", + 2, + 8, + 0, + 0, + "USDollar"], + ["findB", + "FunctionResult", + 3, + 8], + ["replaceB", + "FunctionResult", + 4, + 8], + ["leftb", + "FunctionResult", + 2, + 8], + ["rightb", + "FunctionResult", + 2, + 8], + ["midb", + "FunctionResult", + 3, + 8], + ["lenb", + "FunctionResult", + 1, + 8], + ["roundUp", + "FunctionResult", + 2, + 8], + ["roundDown", + "FunctionResult", + 2, + 8], + ["asc", + "FunctionResult", + 1, + 8], + ["dbcs", + "FunctionResult", + 1, + 8], + ["days360", + "FunctionResult", + 3, + 8], + ["today", + "FunctionResult", + 0, + 8], + ["vdb", + "FunctionResult", + 7, + 8], + ["median", + "FunctionResult", + 1, + 72], + ["sinh", + "FunctionResult", + 1, + 8], + ["cosh", + "FunctionResult", + 1, + 8], + ["tanh", + "FunctionResult", + 1, + 8], + ["asinh", + "FunctionResult", + 1, + 8], + ["acosh", + "FunctionResult", + 1, + 8], + ["atanh", + "FunctionResult", + 1, + 8], + ["dget", + "FunctionResult", + 3, + 8, + 0, + 0, + "DGet"], + ["db", + "FunctionResult", + 5, + 8], + ["error_Type", + "FunctionResult", + 1, + 8], + ["aveDev", + "FunctionResult", + 1, + 72], + ["gammaLn", + "FunctionResult", + 1, + 8], + ["combin", + "FunctionResult", + 2, + 8], + ["even", + "FunctionResult", + 1, + 8], + ["fisher", + "FunctionResult", + 1, + 8], + ["fisherInv", + "FunctionResult", + 1, + 8], + ["standardize", + "FunctionResult", + 3, + 8], + ["odd", + "FunctionResult", + 1, + 8], + ["permut", + "FunctionResult", + 2, + 8], + ["devSq", + "FunctionResult", + 1, + 72], + ["geoMean", + "FunctionResult", + 1, + 72], + ["harMean", + "FunctionResult", + 1, + 72], + ["sumSq", + "FunctionResult", + 1, + 72], + ["kurt", + "FunctionResult", + 1, + 72], + ["skew", + "FunctionResult", + 1, + 72], + ["large", + "FunctionResult", + 2, + 8], + ["small", + "FunctionResult", + 2, + 8], + ["trimMean", + "FunctionResult", + 2, + 8], + ["concatenate", + "FunctionResult", + 1, + 72], + ["power", + "FunctionResult", + 2, + 8], + ["radians", + "FunctionResult", + 1, + 8], + ["degrees", + "FunctionResult", + 1, + 8], + ["subtotal", + "FunctionResult", + 2, + 72], + ["sumIf", + "FunctionResult", + 3, + 8], + ["countIf", + "FunctionResult", + 2, + 8], + ["countBlank", + "FunctionResult", + 1, + 8], + ["ispmt", + "FunctionResult", + 4, + 8], + ["roman", + "FunctionResult", + 2, + 8], + ["hyperlink", + "FunctionResult", + 2, + 8], + ["averageA", + "FunctionResult", + 1, + 72], + ["maxA", + "FunctionResult", + 1, + 72], + ["minA", + "FunctionResult", + 1, + 72], + ["stDevPA", + "FunctionResult", + 1, + 72], + ["varPA", + "FunctionResult", + 1, + 72], + ["stDevA", + "FunctionResult", + 1, + 72], + ["varA", + "FunctionResult", + 1, + 72], + ["bahtText", + "FunctionResult", + 1, + 8], + ["hex2Bin", + "FunctionResult", + 2, + 8], + ["hex2Dec", + "FunctionResult", + 1, + 8], + ["hex2Oct", + "FunctionResult", + 2, + 8], + ["dec2Bin", + "FunctionResult", + 2, + 8], + ["dec2Hex", + "FunctionResult", + 2, + 8], + ["dec2Oct", + "FunctionResult", + 2, + 8], + ["oct2Bin", + "FunctionResult", + 2, + 8], + ["oct2Hex", + "FunctionResult", + 2, + 8], + ["oct2Dec", + "FunctionResult", + 1, + 8], + ["bin2Dec", + "FunctionResult", + 1, + 8], + ["bin2Oct", + "FunctionResult", + 2, + 8], + ["bin2Hex", + "FunctionResult", + 2, + 8], + ["imSub", + "FunctionResult", + 2, + 8], + ["imDiv", + "FunctionResult", + 2, + 8], + ["imPower", + "FunctionResult", + 2, + 8], + ["imAbs", + "FunctionResult", + 1, + 8], + ["imSqrt", + "FunctionResult", + 1, + 8], + ["imLn", + "FunctionResult", + 1, + 8], + ["imLog2", + "FunctionResult", + 1, + 8], + ["imLog10", + "FunctionResult", + 1, + 8], + ["imSin", + "FunctionResult", + 1, + 8], + ["imCos", + "FunctionResult", + 1, + 8], + ["imExp", + "FunctionResult", + 1, + 8], + ["imArgument", + "FunctionResult", + 1, + 8], + ["imConjugate", + "FunctionResult", + 1, + 8], + ["imaginary", + "FunctionResult", + 1, + 8], + ["imReal", + "FunctionResult", + 1, + 8], + ["complex", + "FunctionResult", + 3, + 8], + ["imSum", + "FunctionResult", + 1, + 72], + ["imProduct", + "FunctionResult", + 1, + 72], + ["seriesSum", + "FunctionResult", + 4, + 8], + ["factDouble", + "FunctionResult", + 1, + 8], + ["sqrtPi", + "FunctionResult", + 1, + 8], + ["quotient", + "FunctionResult", + 2, + 8], + ["delta", + "FunctionResult", + 2, + 8], + ["geStep", + "FunctionResult", + 2, + 8], + ["isEven", + "FunctionResult", + 1, + 8], + ["isOdd", + "FunctionResult", + 1, + 8], + ["mround", + "FunctionResult", + 2, + 8, + 0, + 0, + "MRound"], + ["erf", + "FunctionResult", + 2, + 8], + ["erfC", + "FunctionResult", + 1, + 8], + ["besselJ", + "FunctionResult", + 2, + 8], + ["besselK", + "FunctionResult", + 2, + 8], + ["besselY", + "FunctionResult", + 2, + 8], + ["besselI", + "FunctionResult", + 2, + 8], + ["xirr", + "FunctionResult", + 3, + 8], + ["xnpv", + "FunctionResult", + 3, + 8], + ["priceMat", + "FunctionResult", + 6, + 8], + ["yieldMat", + "FunctionResult", + 6, + 8], + ["intRate", + "FunctionResult", + 5, + 8], + ["received", + "FunctionResult", + 5, + 8], + ["disc", + "FunctionResult", + 5, + 8], + ["priceDisc", + "FunctionResult", + 5, + 8], + ["yieldDisc", + "FunctionResult", + 5, + 8], + ["tbillEq", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillEq"], + ["tbillPrice", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillPrice"], + ["tbillYield", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillYield"], + ["price", + "FunctionResult", + 7, + 8], + ["yield", + "FunctionResult", + 7, + 8], + ["dollarDe", + "FunctionResult", + 2, + 8], + ["dollarFr", + "FunctionResult", + 2, + 8], + ["nominal", + "FunctionResult", + 2, + 8], + ["effect", + "FunctionResult", + 2, + 8], + ["cumPrinc", + "FunctionResult", + 6, + 8], + ["cumIPmt", + "FunctionResult", + 6, + 8], + ["edate", + "FunctionResult", + 2, + 8, + 0, + 0, + "EDate"], + ["eoMonth", + "FunctionResult", + 2, + 8], + ["yearFrac", + "FunctionResult", + 3, + 8], + ["coupDayBs", + "FunctionResult", + 4, + 8], + ["coupDays", + "FunctionResult", + 4, + 8], + ["coupDaysNc", + "FunctionResult", + 4, + 8], + ["coupNcd", + "FunctionResult", + 4, + 8], + ["coupNum", + "FunctionResult", + 4, + 8], + ["coupPcd", + "FunctionResult", + 4, + 8], + ["duration", + "FunctionResult", + 6, + 8], + ["mduration", + "FunctionResult", + 6, + 8, + 0, + 0, + "MDuration"], + ["oddLPrice", + "FunctionResult", + 8, + 8], + ["oddLYield", + "FunctionResult", + 8, + 8], + ["oddFPrice", + "FunctionResult", + 9, + 8], + ["oddFYield", + "FunctionResult", + 9, + 8], + ["randBetween", + "FunctionResult", + 2, + 8], + ["weekNum", + "FunctionResult", + 2, + 8], + ["amorDegrc", + "FunctionResult", + 7, + 8], + ["amorLinc", + "FunctionResult", + 7, + 8], + ["convert", + "FunctionResult", + 3, + 8], + ["accrInt", + "FunctionResult", + 8, + 8], + ["accrIntM", + "FunctionResult", + 5, + 8], + ["workDay", + "FunctionResult", + 3, + 8], + ["networkDays", + "FunctionResult", + 3, + 8], + ["gcd", + "FunctionResult", + 1, + 72], + ["multiNomial", + "FunctionResult", + 1, + 72], + ["lcm", + "FunctionResult", + 1, + 72], + ["fvschedule", + "FunctionResult", + 2, + 8, + 0, + 0, + "FVSchedule"], + ["countIfs", + "FunctionResult", + 1, + 72], + ["sumIfs", + "FunctionResult", + 2, + 72], + ["averageIf", + "FunctionResult", + 3, + 8], + ["averageIfs", + "FunctionResult", + 2, + 72], + ["binom_Dist", + "FunctionResult", + 4, + 8], + ["binom_Inv", + "FunctionResult", + 3, + 8], + ["confidence_Norm", + "FunctionResult", + 3, + 8], + ["confidence_T", + "FunctionResult", + 3, + 8], + ["expon_Dist", + "FunctionResult", + 3, + 8], + ["gamma_Dist", + "FunctionResult", + 4, + 8], + ["gamma_Inv", + "FunctionResult", + 3, + 8], + ["norm_Dist", + "FunctionResult", + 4, + 8], + ["norm_Inv", + "FunctionResult", + 3, + 8], + ["percentile_Exc", + "FunctionResult", + 2, + 8], + ["percentile_Inc", + "FunctionResult", + 2, + 8], + ["percentRank_Exc", + "FunctionResult", + 3, + 8], + ["percentRank_Inc", + "FunctionResult", + 3, + 8], + ["poisson_Dist", + "FunctionResult", + 3, + 8], + ["quartile_Exc", + "FunctionResult", + 2, + 8], + ["quartile_Inc", + "FunctionResult", + 2, + 8], + ["rank_Avg", + "FunctionResult", + 3, + 8], + ["rank_Eq", + "FunctionResult", + 3, + 8], + ["stDev_S", + "FunctionResult", + 1, + 72], + ["stDev_P", + "FunctionResult", + 1, + 72], + ["t_Dist", + "FunctionResult", + 3, + 8], + ["t_Dist_2T", + "FunctionResult", + 2, + 8], + ["t_Dist_RT", + "FunctionResult", + 2, + 8], + ["t_Inv", + "FunctionResult", + 2, + 8], + ["t_Inv_2T", + "FunctionResult", + 2, + 8], + ["var_S", + "FunctionResult", + 1, + 72], + ["var_P", + "FunctionResult", + 1, + 72], + ["weibull_Dist", + "FunctionResult", + 4, + 8], + ["networkDays_Intl", + "FunctionResult", + 4, + 8], + ["workDay_Intl", + "FunctionResult", + 4, + 8], + ["ecma_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ECMA_Ceiling"], + ["iso_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ISO_Ceiling"], + ["beta_Dist", + "FunctionResult", + 6, + 8], + ["beta_Inv", + "FunctionResult", + 5, + 8], + ["chiSq_Dist", + "FunctionResult", + 3, + 8], + ["chiSq_Dist_RT", + "FunctionResult", + 2, + 8], + ["chiSq_Inv", + "FunctionResult", + 2, + 8], + ["chiSq_Inv_RT", + "FunctionResult", + 2, + 8], + ["f_Dist", + "FunctionResult", + 4, + 8], + ["f_Dist_RT", + "FunctionResult", + 3, + 8], + ["f_Inv", + "FunctionResult", + 3, + 8], + ["f_Inv_RT", + "FunctionResult", + 3, + 8], + ["hypGeom_Dist", + "FunctionResult", + 5, + 8], + ["logNorm_Dist", + "FunctionResult", + 4, + 8], + ["logNorm_Inv", + "FunctionResult", + 3, + 8], + ["negBinom_Dist", + "FunctionResult", + 4, + 8], + ["norm_S_Dist", + "FunctionResult", + 2, + 8], + ["norm_S_Inv", + "FunctionResult", + 1, + 8], + ["z_Test", + "FunctionResult", + 3, + 8], + ["erf_Precise", + "FunctionResult", + 1, + 8], + ["erfC_Precise", + "FunctionResult", + 1, + 8], + ["gammaLn_Precise", + "FunctionResult", + 1, + 8], + ["ceiling_Precise", + "FunctionResult", + 2, + 8], + ["floor_Precise", + "FunctionResult", + 2, + 8], + ["acot", + "FunctionResult", + 1, + 8], + ["acoth", + "FunctionResult", + 1, + 8], + ["cot", + "FunctionResult", + 1, + 8], + ["coth", + "FunctionResult", + 1, + 8], + ["csc", + "FunctionResult", + 1, + 8], + ["csch", + "FunctionResult", + 1, + 8], + ["sec", + "FunctionResult", + 1, + 8], + ["sech", + "FunctionResult", + 1, + 8], + ["imTan", + "FunctionResult", + 1, + 8], + ["imCot", + "FunctionResult", + 1, + 8], + ["imCsc", + "FunctionResult", + 1, + 8], + ["imCsch", + "FunctionResult", + 1, + 8], + ["imSec", + "FunctionResult", + 1, + 8], + ["imSech", + "FunctionResult", + 1, + 8], + ["bitand", + "FunctionResult", + 2, + 8], + ["bitor", + "FunctionResult", + 2, + 8], + ["bitxor", + "FunctionResult", + 2, + 8], + ["bitlshift", + "FunctionResult", + 2, + 8], + ["bitrshift", + "FunctionResult", + 2, + 8], + ["permutationa", + "FunctionResult", + 2, + 8], + ["combina", + "FunctionResult", + 2, + 8], + ["xor", + "FunctionResult", + 1, + 72], + ["pduration", + "FunctionResult", + 3, + 8, + 0, + 0, + "PDuration"], + ["base", + "FunctionResult", + 3, + 8], + ["decimal", + "FunctionResult", + 2, + 8], + ["days", + "FunctionResult", + 2, + 8], + ["binom_Dist_Range", + "FunctionResult", + 4, + 8], + ["gamma", + "FunctionResult", + 1, + 8], + ["skew_p", + "FunctionResult", + 1, + 72], + ["gauss", + "FunctionResult", + 1, + 8], + ["phi", + "FunctionResult", + 1, + 8], + ["rri", + "FunctionResult", + 3, + 8], + ["unichar", + "FunctionResult", + 1, + 8], + ["unicode", + "FunctionResult", + 1, + 8], + ["arabic", + "FunctionResult", + 1, + 8], + ["isoWeekNum", + "FunctionResult", + 1, + 8], + ["numberValue", + "FunctionResult", + 3, + 8], + ["sheet", + "FunctionResult", + 1, + 8], + ["sheets", + "FunctionResult", + 1, + 8], + ["isFormula", + "FunctionResult", + 1, + 8], + ["ceiling_Math", + "FunctionResult", + 3, + 8], + ["floor_Math", + "FunctionResult", + 3, + 8], + ["imSinh", + "FunctionResult", + 1, + 8], + ["imCosh", + "FunctionResult", + 1, + 8]]]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataXlapi, targetNamespaceObject: Excel }); +})(Excel || (Excel = {})); +var _EndExcel = "_EndExcel"; +if (typeof (window) !== "undefined" && + window.OSF && + window.OSF._OfficeAppFactory && + window.OSF._OfficeAppFactory.getHostInfo && + window.OSF._OfficeAppFactory.getHostInfo()) { + var hostPlatform = window.OSF._OfficeAppFactory.getHostInfo().hostPlatform; + if (hostPlatform === "web") { + OfficeExtension._internalConfig.enablePreviewExecution = true; + } +} +OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel = true; +OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria = false; +function exposeOfficeRuntimeThroughOfficeNamespace(OfficeRuntime, Office) { + var _a, _b; + if (typeof OfficeRuntime === "undefined") { + if (typeof window !== "undefined") { + OfficeRuntime = window === null || window === void 0 ? void 0 : window.OfficeRuntime; + } + } + if (typeof OfficeRuntime === "undefined") { + OfficeRuntime = {}; + } + if (typeof Office !== "undefined") { + Office.storage = Office.storage || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.storage); + Office.auth = Office.auth || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.auth); + Office.getAccessToken = Office.getAccessToken || ((_a = OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.auth) === null || _a === void 0 ? void 0 : _a.getAccessToken); + Office.addin = Office.addin || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.addin); + Office.isSetSupported = Office.isSetSupported || ((_b = OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.apiInformation) === null || _b === void 0 ? void 0 : _b.isSetSupported); + Office.license = Office.license || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.license); + Office.message = Office.message || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.message); + } +} +exposeOfficeRuntimeThroughOfficeNamespace(typeof OfficeRuntime !== "undefined" ? OfficeRuntime || undefined : undefined, typeof Office !== "undefined" ? Office || undefined : undefined); +if (typeof OSFPerformance !== "undefined") { + OSFPerformance.hostInitializationEnd = OSFPerformance.now(); + OSFPerformance.totalJSHeapSize = OSFPerformance.getTotalJSHeapSize(); + OSFPerformance.usedJSHeapSize = OSFPerformance.getUsedJSHeapSize(); + OSFPerformance.jsHeapSizeLimit = OSFPerformance.getJSHeapSizeLimit(); +} diff --git a/dist/excel-ios-16.00.js b/dist/excel-ios-16.00.js new file mode 100644 index 000000000..77cd1535f --- /dev/null +++ b/dist/excel-ios-16.00.js @@ -0,0 +1,26 @@ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md +*/ + +/* +* @overview es6-promise - a tiny implementation of Promises/A+. +* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +* @license Licensed under MIT license +* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE +* @version 2.3.0 +*/ + + +// Sources: +// osfweb: 16.0\16801.10000 +// runtime: 16.0\16801.10000 +// core: 16.0\16801.10000 +// host: custom + + + +"undefined"!==typeof OSFPerformance&&(OSFPerformance.hostInitializationStart=OSFPerformance.now());var OfficeExt,__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){var t=function(){function e(){}return e.prototype.isMsAjaxLoaded=function(){return!!("undefined"!==typeof Sys&&"undefined"!==typeof Type&&Sys.StringBuilder&&"function"===typeof Sys.StringBuilder&&Type.registerNamespace&&"function"===typeof Type.registerNamespace&&Type.registerClass&&"function"===typeof Type.registerClass&&"function"===typeof Function._validateParams&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&"function"===typeof Sys.Serialization.JavaScriptSerializer.serialize)},e.prototype.loadMsAjaxFull=function(e){var t=("https:"===window.location.protocol.toLowerCase()?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,e)},Object.defineProperty(e.prototype,"msAjaxError",{get:function(){return null==this._msAjaxError&&this.isMsAjaxLoaded()&&(this._msAjaxError=Error),this._msAjaxError},set:function(e){this._msAjaxError=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxString",{get:function(){return null==this._msAjaxString&&this.isMsAjaxLoaded()&&(this._msAjaxString=String),this._msAjaxString},set:function(e){this._msAjaxString=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxDebug",{get:function(){return null==this._msAjaxDebug&&this.isMsAjaxLoaded()&&(this._msAjaxDebug=Sys.Debug),this._msAjaxDebug},set:function(e){this._msAjaxDebug=e},enumerable:!0,configurable:!0}),e}();e.MicrosoftAjaxFactory=t}(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};!function(e){var t=function(){function e(e){this._internalStorage=e}return e.prototype.getItem=function(e){try{return this._internalStorage&&this._internalStorage.getItem(e)}catch(e){return null}},e.prototype.setItem=function(e,t){try{this._internalStorage&&this._internalStorage.setItem(e,t)}catch(e){}},e.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(e){}},e.prototype.removeItem=function(e){try{this._internalStorage&&this._internalStorage.removeItem(e)}catch(e){}},e.prototype.getKeysWithPrefix=function(e){var t=[];try{for(var n=this._internalStorage&&this._internalStorage.length||0,r=0;r0?i.push(n):0===n.tabIndex&&r.push(n):r.push(n);return i=i.sort((function(e,t){var n=e.tabIndex-t.tabIndex;return 0===n&&(n=i.indexOf(e)-i.indexOf(t)),n})),[].concat(i,r)}return{set_entropy:function(e){if("string"==typeof e)for(var t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(n=new Date(parseInt(t.slice(5,-1))))?n:t})):Sys.Serialization.JavaScriptSerializer.deserialize(r,!0),t[n]=r}catch(e){}}return t},loadScript:function(e,t,r){if(e&&t){var i=window.document,o=n[e];if(o)o.loaded?t():o.pendingCallbacks.push(t);else{var a=i.createElement("script");a.type="text/javascript",o={loaded:!1,pendingCallbacks:[t],timer:null},n[e]=o;var s=function(){null!=o.timer&&(clearTimeout(o.timer),delete o.timer),o.loaded=!0;for(var e=o.pendingCallbacks.length,t=0;t0?l(null):l(new Event("Script load timed out"))}),r),a.setAttribute("crossOrigin","anonymous"),a.src=e,i.getElementsByTagName("head")[0].appendChild(a)}}},loadCSS:function(e){if(e){var t=window.document,n=t.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.getElementsByTagName("head")[0].appendChild(n)}},parseEnum:function(e,t){var n=t[e.trim()];if("undefined"==typeof n)throw OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+e),OsfMsAjaxFactory.msAjaxError.argument("str");return n},delayExecutionAndCache:function(){var e={calc:arguments[0]};return function(){return e.calc&&(e.val=e.calc.apply(this,arguments),delete e.calc),e.val}},getUniqueId:function(){return(e+=1).toString()},formatString:function(){var e=arguments,t=e[0];return t.replace(/{(\d+)}/gm,(function(t,n){var r=parseInt(n,10)+1;return void 0===e[r]?"{"+n+"}":e[r]}))},generateConversationId:function(){return[a(),a(),(new Date).getTime().toString()].join("_")},getFrameName:function(e){return"_xdm_"+e+this.generateConversationId()},addXdmInfoAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_xdm_Info=",t,!1)},addSerializerVersionAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_serializer_version=",t,!0)},addFlightsAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_flights=",t,!0)},addInfoAsHash:function(e,n,r,i){var o,a=(e=e.trim()||"").split(t),s=a.shift(),l=a.join(t);return o=i?[n,encodeURIComponent(r),l].join(""):[l,n,r].join(""),[s,t,o].join("")},parseHostInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(e){var t=OSF.OUtil.parseXdmInfoWithGivenFragment(e,window.location.hash);return t||(t=OSF.OUtil.parseXdmInfoFromWindowName(e,window.name)),t},parseXdmInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(e,t){return OSF.OUtil.parseInfoWithGivenFragment("&_xdm_Info=","_xdm_",!1,e,t)},parseSerializerVersion:function(e){var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(e,window.location.hash);return isNaN(t)&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(e,window.name)),t},parseSerializerVersionFromWindowName:function(e,t){return parseInt(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(e,t){return parseInt(OSF.OUtil.parseInfoWithGivenFragment("&_serializer_version=","_serializer_version=",!0,e,t))},parseFlights:function(e){var t=OSF.OUtil.parseFlightsWithGivenFragment(e,window.location.hash);return 0==t.length&&(t=OSF.OUtil.parseFlightsFromWindowName(e,window.name)),t},checkFlight:function(e){return OSF.Flights&&OSF.Flights.indexOf(e)>=0},pushFlight:function(e){return OSF.Flights.indexOf(e)<0&&(OSF.Flights.push(e),!0)},getBooleanSetting:function(e){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,e)},getBooleanFromDictionary:function(e,t){var n=e&&t&&void 0!==e[t]&&e[t]&&("string"===typeof e[t]&&"TRUE"===e[t].toUpperCase()||"boolean"===typeof e[t]&&e[t]);return void 0!==n&&n},getIntFromDictionary:function(e,t){return e&&t&&void 0!==e[t]&&"string"===typeof e[t]?parseInt(e[t]):NaN},pushIntFlight:function(e,t){return!(e in OSF.IntFlights)&&(OSF.IntFlights[e]=t,!0)},getIntFlight:function(e){return OSF.IntFlights&&e in OSF.IntFlights?OSF.IntFlights[e]:NaN},parseFlightsFromWindowName:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment("&_flights=","_flights=",!0,e,t))},parseArrayWithDefault:function(e){var t=[];try{t=JSON.parse(e)}catch(e){}return Array.isArray(t)||(t=[]),t},parseInfoFromWindowName:function(e,t,n){try{var r=JSON.parse(t),i=null!=r?r[n]:null,o=s();if(!e&&o&&null!=r){var a=r[OSF.WindowNameItemKeys.BaseFrameName]+n;i?o.setItem(a,i):i=o.getItem(a)}return i}catch(e){return null}},parseInfoWithGivenFragment:function(e,t,n,r,i){var o=i.split(e),a=o.length>1?o[o.length-1]:null;n&&null!=a&&(a.indexOf("&")>=0&&(a=a.split("&")[0]),a=decodeURIComponent(a));var l=s();if(!r&&l){var c=window.name.indexOf(t);if(c>-1){var u=window.name.indexOf(";",c);-1==u&&(u=window.name.length);var d=window.name.substring(c,u);a?l.setItem(d,a):a=l.getItem(d)}}return a},getConversationId:function(){var e=window.location.search,t=null;if(e){var n=e.indexOf("&");(t=n>0?e.substring(1,n):e.substr(1))&&"="===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1))&&(t=decodeURIComponent(t))}return t},getInfoItems:function(e){var t=e.split("$");return"undefined"==typeof t[1]&&(t=e.split("|")),"undefined"==typeof t[1]&&(t=e.split("%7C")),t},getXdmFieldValue:function(e,t){var n="",r=OSF.OUtil.parseXdmInfo(t);if(r){var i=OSF.OUtil.getInfoItems(r);if(void 0!=i&&i.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:n=i[2];break;case OSF.XdmFieldName.AppId:n=i[1]}}return n},validateParamObject:function(e,t,n){var r=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:!1},{name:"expectedProperties",type:Object,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0}]);if(r)throw r;for(var i in t)if(r=Function._validateParameter(e[i],t[i],i))throw r},writeProfilerMark:function(e){window.msWriteProfilerMark&&(window.msWriteProfilerMark(e),OsfMsAjaxFactory.msAjaxDebug.trace(e))},outputDebug:function(e){"undefined"!==typeof OsfMsAjaxFactory&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(e)},defineNondefaultProperty:function(e,t,n,r){for(var i in n=n||{},r){var o=r[i];void 0==n[o]&&(n[o]=!0)}return Object.defineProperty(e,t,n),e},defineNondefaultProperties:function(e,t,n){for(var r in t=t||{})OSF.OUtil.defineNondefaultProperty(e,r,t[r],n);return e},defineEnumerableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["enumerable"])},defineEnumerableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["enumerable"])},defineMutableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["writable","enumerable","configurable"])},defineMutableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["writable","enumerable","configurable"])},finalizeProperties:function(e,t){t=t||{};for(var n=Object.getOwnPropertyNames(e),r=n.length,i=0;i>8,a=255&n,u[s++]=i>>2,u[s++]=(3&i)<<4|o>>4,u[s++]=(15&o)<<2|a>>6,u[s++]=63&a,isNaN(n)||(i=n>>8,o=255&r,a=r>>8,u[s++]=i>>2,u[s++]=(3&i)<<4|o>>4,u[s++]=(15&o)<<2|a>>6,u[s++]=63&a),isNaN(n)?u[s-1]=64:isNaN(r)&&(u[s-2]=64,u[s-1]=64);for(var p=0;p=2?n[r-2]+"."+n[r-1]:1==r?n[0]:void 0},isiOS:function(){return!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)},isChrome:function(){return window.navigator.userAgent.indexOf("Chrome")>0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},startsWith:function(e,t,n){return n?e.substr(0,t.length)===t:e.startsWith(t)},containsPort:function(e,t,n,r){return this.startsWith(e,t+"//"+n+":"+r,!0)||this.startsWith(e,n+":"+r,!0)},getRedundandPortString:function(e,t){return e&&t?"https:"==t.protocol&&this.containsPort(e,"https:",t.hostname,"443")?":443":"http:"==t.protocol&&this.containsPort(e,"http:",t.hostname,"80")?":80":"":""},removeChar:function(e,t){return t=e.length)return this.removeChar(e,n);if("/"===t){if("?"===e.charAt(n+1)||"#"===e.charAt(n+1))return this.removeChar(e,n)}else if("?"===t&&"#"===e.charAt(n+1))return this.removeChar(e,n)}return e},cleanUrl:function(e){if(e=this.cleanUrlOfChar(e,"/"),e=this.cleanUrlOfChar(e,"?"),"https://"==(e=this.cleanUrlOfChar(e,"#")).substr(0,8))-1!=(t=e.indexOf(":443"))&&(t!=e.length-4&&"/"!=e.charAt(t+4)&&"?"!=e.charAt(t+4)&&"#"!=e.charAt(t+4)||(e=e.substring(0,t)+e.substring(t+4)));else if("http://"==e.substr(0,7)){var t;-1!=(t=e.indexOf(":80"))&&(t!=e.length-3&&"/"!=e.charAt(t+3)&&"?"!=e.charAt(t+3)&&"#"!=e.charAt(t+3)||(e=e.substring(0,t)+e.substring(t+3)))}return e},parseUrl:function(e,t){if(void 0===t&&(t=!1),"undefined"!==typeof e&&e){var n=this.isIE(),r={protocol:void 0,hostname:void 0,host:void 0,port:void 0,pathname:void 0,search:void 0,hash:void 0,isPortPartOfUrl:void 0};try{if(n){var i=document.createElement("a");if(i.href=e,!i||!i.protocol||!i.host||!i.hostname||!i.href||this.cleanUrl(i.href).toLowerCase()!==this.cleanUrl(e).toLowerCase())throw"InvalidUrl";if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=i.protocol)throw new Error("NotHttps");var o=this.getRedundandPortString(e,i);r.protocol=i.protocol,r.hostname=i.hostname,r.port=""==o?i.port:"",r.host=""!=o?i.hostname:i.host,r.pathname=(n?"/":"")+i.pathname,r.search=i.search,r.hash=i.hash,r.isPortPartOfUrl=this.containsPort(e,i.protocol,i.hostname,i.port)}else{var a=new URL(e);if(a&&a.protocol&&a.host&&a.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=a.protocol)throw new Error("NotHttps");r.protocol=a.protocol,r.hostname=a.hostname,r.port=a.port,r.host=a.host,r.pathname=a.pathname,r.search=a.search,r.hash=a.hash,r.isPortPartOfUrl=a.host.lastIndexOf(":"+a.port)==a.host.length-a.port.length-1}}}catch(e){if("NotHttps"===e.message)throw e}return r}},shallowCopy:function(e){if(null==e)return null;if(e instanceof Object){if(Array.isArray(e)){for(var t=[],n=0;ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(e=l(e),n=t?e.length-1:0,0===e.length)return null;for(;!i&&n>=0&&ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(r=function(e,t){for(var n=0;n=0&&ie.length)return!1;if(e.substr(e.length-t.length)===t)return!0}return!1},hashCode:function(e){var t=0;if(!OSF.OUtil.isNullOrUndefined(e))for(var n=0,r=e.length;n0;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[n%16],n=Math.floor(n/16);for(;r<32;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[Math.floor(16*Math.random())];return t}}}();try{!function(){OSF.Flights=OSF.OUtil.parseFlights(!0)}()}catch(e){}window.OSF=OSF,OSF.OUtil.setNamespace("OSF",window),OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3},OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614,Visio:8388615,OneNoteAndroid:4194305},OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"},OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"},OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20,UpdateTargetUrl:21,InstallCustomFunctions:22,SendTelemetryEvent:23,UninstallCustomFunctions:24,SendMessage:25,LaunchExtensionComponent:26,StopExtensionComponent:27,RestartExtensionComponent:28,EnableTaskPaneHeaderButton:29,DisableTaskPaneHeaderButton:30,TaskPaneHeaderButtonClicked:31,RemoveAppCommandsAddin:32,RefreshRibbonGallery:33,GetOriginalControlId:34,OfficeJsReady:35,InsertDevManifest:36,InsertDevManifestError:37,SendCustomerContent:38,KeyboardShortcuts:39},OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"},OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006},OSF.OfficeAppContext=function(e,t,n,r,i,o,a,s,l,c,u,d,f,p,h,g,m,y,v,O,b,S,A,C,_,D,E){this._id=e,this._appName=t,this._appVersion=n,this._appUILocale=r,this._dataLocale=i,this._docUrl=o,this._clientMode=a,this._settings=s,this._reason=l,this._osfControlType=c,this._eToken=u,this._correlationId=d,this._appInstanceId=f,this._touchEnabled=p,this._commerceAllowed=h,this._appMinorVersion=g,this._requirementMatrix=m,this._hostCustomMessage=y,this._hostFullVersion=v,this._isDialog=!1,this._clientWindowHeight=O,this._clientWindowWidth=b,this._addinName=S,this._appDomains=A,this._dialogRequirementMatrix=C,this._featureGates=_,this._officeTheme=D,this._initialDisplayMode=E,this.get_id=function(){return this._id},this.get_appName=function(){return this._appName},this.get_appVersion=function(){return this._appVersion},this.get_appUILocale=function(){return this._appUILocale},this.get_dataLocale=function(){return this._dataLocale},this.get_docUrl=function(){return this._docUrl},this.get_clientMode=function(){return this._clientMode},this.get_bindings=function(){return this._bindings},this.get_settings=function(){return this._settings},this.get_reason=function(){return this._reason},this.get_osfControlType=function(){return this._osfControlType},this.get_eToken=function(){return this._eToken},this.get_correlationId=function(){return this._correlationId},this.get_appInstanceId=function(){return this._appInstanceId},this.get_touchEnabled=function(){return this._touchEnabled},this.get_commerceAllowed=function(){return this._commerceAllowed},this.get_appMinorVersion=function(){return this._appMinorVersion},this.get_requirementMatrix=function(){return this._requirementMatrix},this.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix},this.get_hostCustomMessage=function(){return this._hostCustomMessage},this.get_hostFullVersion=function(){return this._hostFullVersion},this.get_isDialog=function(){return this._isDialog},this.get_clientWindowHeight=function(){return this._clientWindowHeight},this.get_clientWindowWidth=function(){return this._clientWindowWidth},this.get_addinName=function(){return this._addinName},this.get_appDomains=function(){return this._appDomains},this.get_featureGates=function(){return this._featureGates},this.get_officeTheme=function(){return this._officeTheme},this.get_initialDisplayMode=function(){return this._initialDisplayMode?this._initialDisplayMode:0}},OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1},OSF.ClientMode={ReadOnly:0,ReadWrite:1},OSF.OUtil.setNamespace("Microsoft",window),OSF.OUtil.setNamespace("Office",Microsoft),OSF.OUtil.setNamespace("Client",Microsoft.Office),OSF.OUtil.setNamespace("WebExtension",Microsoft.Office),Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",ControlActivation:"controlActivation"},Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"},Microsoft.Office.WebExtension.FilterType={All:"all"},Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",JsonData:"jsonData",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",AllowConsentPrompt:"allowConsentPrompt",ForMSGraphAccess:"forMSGraphAccess",AllowSignInPrompt:"allowSignInPrompt",JsonPayload:"jsonPayload",EnableNewHosts:"enableNewHosts",AccountTypeFilter:"accountTypeFilter",AddinTrustId:"addinTrustId",Reserved:"reserved",Tcid:"tcid",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo",TargetOrigin:"targetOrigin",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64",FormId:"formId"},OSF.OUtil.setNamespace("DDA",OSF),OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0},OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"},OSF.DDA.EventDescriptors={},OSF.DDA.ListDescriptors={},OSF.DDA.UI={},OSF.DDA.getXdmEventName=function(e,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?e+"_"+t:t},OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetAuthContextMethod:99,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidInsertFormMethod:106,dispidDisplayRibbonCalloutAsyncMethod:109,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidExecuteFeature:146,dispidQueryFeature:147,dispidGetNestedAppAuthContextMethod:205,dispidMethodMax:205},OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidOlkRecurrenceChangedEvent:49,dispidOlkAttachmentsChangedEvent:50,dispidOlkEnhancedLocationsChangedEvent:51,dispidOlkInfobarClickedEvent:52,dispidOlkSelectedItemsChangedEvent:53,dispidOlkSensitivityLabelChangedEvent:54,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63},OSF.DDA.ErrorCodeManager=function(){var e={};return{getErrorArgs:function(t){var n=e[t];return n?(n.name||(n.name=e[this.errorCodes.ooeInternalError].name),n.message||(n.message=e[this.errorCodes.ooeInternalError].message)):n=e[this.errorCodes.ooeInternalError],n},addErrorMessage:function(t,n){e[t]=n},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeOperationCancelled:5014,ooeWorkbookHidden:5015,ooeWriteNotSupportedWhenModalDialogOpen:5016,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeRequestPayloadSizeLimitExceeded:5103,ooeResponsePayloadSizeLimitExceeded:5104,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeModalDialogOpen:12012,ooeDocumentIsInactive:12013,ooeDialogParentIsMinimized:12014,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010,ooeResourceNotAllowed:13011,ooeSSOUnsupportedPlatform:13012,ooeSSOCallThrottled:13013,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(t){e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden]={name:t.L_APICallFailed,message:t.L_WorkbookHiddenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen]={name:t.L_APICallFailed,message:t.L_WriteNotSupportedWhenModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_RequestPayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_ResponsePayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen]={name:t.L_DisplayDialogError,message:t.L_ModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive]={name:t.L_DisplayDialogError,message:t.L_DocumentIsInactive},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized]={name:t.L_DisplayDialogError,message:t.L_DialogParentIsMinimized},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:t.L_APINotSupported,message:t.L_SSOUnsupportedPlatform},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:t.L_OperationCancelledError,message:t.L_OperationCancelledErrorMessage}}}}(),function(e){!function(e){var t=function(){return function(){}}();e.RequirementVersion=t;var n=function(){return function(e){this.isSetSupported=function(e,t){if(void 0==e)return!1;void 0==t&&(t=0);var n=this._setMap._sets;if(n.hasOwnProperty(e.toLowerCase())){var r=n[e.toLowerCase()];try{var i=this._getVersion(r);t+="";var o=this._getVersion(t);if(i.major>0&&i.major>o.major)return!0;if(i.major>0&&i.minor>=0&&i.major==o.major&&i.minor>=o.minor)return!0}catch(e){return!1}}return!1},this._getVersion=function(e){var t=(e+="").split("."),n=0,r=0;if(t.length<2&&isNaN(Number(e)))throw"version format incorrect";if(n=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(n)||isNaN(r))throw"version format incorrect";return{minor:r,major:n}},this._setMap=e,this.isSetSupported=this.isSetSupported.bind(this)}}();e.RequirementMatrix=n;var r=function(){return function(e){this._addSetMap=function(e){for(var t in e)this._sets[t]=e[t]},this._sets=e}}();e.DefaultSetRequirement=r;var i=function(e){function t(){return e.call(this,{dialogapi:1.1})||this}return __extends(t,e),t}(r);e.DefaultRequiredDialogSetRequirement=i;var o=function(e){function t(){return e.call(this,{dialogorigin:1.1})||this}return __extends(t,e),t}(r);e.DefaultOptionalDialogSetRequirement=o;var a=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,excelapi:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelClientDefaultSetRequirement=a;var s=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(a);e.ExcelClientV1DefaultSetRequirement=s;var l=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookClientDefaultSetRequirement=l;var c=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1,wordapi:1.1})||this}return __extends(t,e),t}(r);e.WordClientDefaultSetRequirement=c;var u=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:1.1}),t}return __extends(t,e),t}(c);e.WordClientV1DefaultSetRequirement=u;var d=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointClientDefaultSetRequirement=d;var f=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(d);e.PowerpointClientV1DefaultSetRequirement=f;var p=function(e){function t(){return e.call(this,{selection:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ProjectClientDefaultSetRequirement=p;var h=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,file:1.1})||this}return __extends(t,e),t}(r);e.ExcelWebDefaultSetRequirement=h;var g=function(e){function t(){return e.call(this,{compressedfile:1.1,documentevents:1.1,file:1.1,imagecoercion:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablecoercion:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordWebDefaultSetRequirement=g;var m=function(e){function t(){return e.call(this,{activeview:1.1,settings:1.1})||this}return __extends(t,e),t}(r);e.PowerpointWebDefaultSetRequirement=m;var y=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookWebDefaultSetRequirement=y;var v=function(e){function t(){return e.call(this,{activeview:1.1,documentevents:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.SwayWebDefaultSetRequirement=v;var O=function(e){function t(){return e.call(this,{bindingevents:1.1,partialtablebindings:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1})||this}return __extends(t,e),t}(r);e.AccessWebDefaultSetRequirement=O;var b=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelIOSDefaultSetRequirement=b;var S=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordIOSDefaultSetRequirement=S;var A=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2}),t}return __extends(t,e),t}(S);e.WordIOSV1DefaultSetRequirement=A;var C=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointIOSDefaultSetRequirement=C;var _=function(e){function t(){return e.call(this,{mailbox:1.1})||this}return __extends(t,e),t}(r);e.OutlookIOSDefaultSetRequirement=_;var D=function(){function e(){}return e.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},e.getDefaultRequirementMatrix=function(t){this.initializeDefaultSetMatrix();var i=void 0,o=t.get_requirementMatrix();if(void 0!=o&&o.length>0&&"undefined"!==typeof JSON){var a=JSON.parse(t.get_requirementMatrix().toLowerCase());i=new n(new r(a))}else{var s=e.getClientFullVersionString(t);i=void 0!=e.DefaultSetArrayMatrix&&void 0!=e.DefaultSetArrayMatrix[s]?new n(e.DefaultSetArrayMatrix[s]):new n(new r({}))}return i},e.getDefaultDialogRequirementMatrix=function(e){var t=void 0,a=e.get_dialogRequirementMatrix();if(void 0!=a&&a.length>0&&"undefined"!==typeof JSON){var s=JSON.parse(e.get_requirementMatrix().toLowerCase());t=new r(s)}else{t=new i;var l=e.get_requirementMatrix();if(void 0!=l&&l.length>0&&"undefined"!==typeof JSON){s=JSON.parse(l.toLowerCase());for(var c in t._sets)s.hasOwnProperty(c)&&(t._sets[c]=s[c]);var u=new o;for(var c in u._sets)s.hasOwnProperty(c)&&(t._sets[c]=s[c])}}return new n(t)},e.getClientFullVersionString=function(e){var t=e.get_appMinorVersion(),n="",r="",i=e.get_appName();return(1024==i||4096==i||8192==i||65536==i)&&1==e.get_appVersion()?r=4096==i&&t>=15?"16.00.01":"16.00":64==e.get_appName()?r=e.get_appVersion():(n=t<10?"0"+t:""+t,r=e.get_appVersion()+"."+n),e.get_appName()+"-"+r},e.initializeDefaultSetMatrix=function(){e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1600]=new a,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1600]=new c,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1600]=new d,e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1601]=new s,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1601]=new u,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1601]=new f,e.DefaultSetArrayMatrix[e.Outlook_RCLIENT_1600]=new l,e.DefaultSetArrayMatrix[e.Excel_WAC_1600]=new h,e.DefaultSetArrayMatrix[e.Word_WAC_1600]=new g,e.DefaultSetArrayMatrix[e.Outlook_WAC_1600]=new y,e.DefaultSetArrayMatrix[e.Outlook_WAC_1601]=new y,e.DefaultSetArrayMatrix[e.Project_RCLIENT_1600]=new p,e.DefaultSetArrayMatrix[e.Access_WAC_1600]=new O,e.DefaultSetArrayMatrix[e.PowerPoint_WAC_1600]=new m,e.DefaultSetArrayMatrix[e.Excel_IOS_1600]=new b,e.DefaultSetArrayMatrix[e.SWAY_WAC_1600]=new v,e.DefaultSetArrayMatrix[e.Word_IOS_1600]=new S,e.DefaultSetArrayMatrix[e.Word_IOS_16001]=new A,e.DefaultSetArrayMatrix[e.PowerPoint_IOS_1600]=new C,e.DefaultSetArrayMatrix[e.Outlook_IOS_1600]=new _},e.Excel_RCLIENT_1600="1-16.00",e.Excel_RCLIENT_1601="1-16.01",e.Word_RCLIENT_1600="2-16.00",e.Word_RCLIENT_1601="2-16.01",e.PowerPoint_RCLIENT_1600="4-16.00",e.PowerPoint_RCLIENT_1601="4-16.01",e.Outlook_RCLIENT_1600="8-16.00",e.Excel_WAC_1600="16-16.00",e.Word_WAC_1600="32-16.00",e.Outlook_WAC_1600="64-16.00",e.Outlook_WAC_1601="64-16.01",e.Project_RCLIENT_1600="128-16.00",e.Access_WAC_1600="256-16.00",e.PowerPoint_WAC_1600="512-16.00",e.Excel_IOS_1600="1024-16.00",e.SWAY_WAC_1600="2048-16.00",e.Word_IOS_1600="4096-16.00",e.Word_IOS_16001="4096-16.00.01",e.PowerPoint_IOS_1600="8192-16.00",e.Outlook_IOS_1600="65536-16.00",e.DefaultSetArrayMatrix={},e}();e.RequirementsMatrixFactory=D}(e.Requirement||(e.Requirement={}))}(OfficeExt||(OfficeExt={})),OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"},Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"},OSF.NamespaceManager=function(){var e,t=!1;return{enableShortcut:function(){t||(window.Office?e=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,t=!0)},disableShortcut:function(){t&&(e?window.Office=e:OSF.OUtil.unsetNamespace("Office",window),t=!1)}}}(),OSF.NamespaceManager.enableShortcut(),Microsoft.Office.WebExtension.useShortNamespace=function(e){e?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()},Microsoft.Office.WebExtension.select=function(e,t){var n;if(e&&"string"==typeof e){var r=e.indexOf("#");if(-1!=r){var i=e.substring(0,r),o=e.substring(r+1);switch(i){case"binding":case"bindings":o&&(n=new OSF.DDA.BindingPromise(o))}}}if(n)return n.onFail=t,n;if(t){var a=typeof t;if("function"!=a)throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,a);var s={};s[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}},OSF.DDA.Context=function(e,t,n,r,i){if(OSF.OUtil.defineEnumerableProperties(this,{contentLanguage:{value:e.get_dataLocale()},displayLanguage:{value:e.get_appUILocale()},touchEnabled:{value:e.get_touchEnabled()},commerceAllowed:{value:e.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},isDialog:{value:OSF._OfficeAppFactory.getHostInfo().isDialog},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(e.get_hostFullVersion())}}),n&&OSF.OUtil.defineEnumerableProperty(this,"license",{value:n}),e.ui&&OSF.OUtil.defineEnumerableProperty(this,"ui",{value:e.ui}),e.auth&&OSF.OUtil.defineEnumerableProperty(this,"auth",{value:e.auth}),e.webAuth&&OSF.OUtil.defineEnumerableProperty(this,"webAuth",{value:e.webAuth}),e.application&&OSF.OUtil.defineEnumerableProperty(this,"application",{value:e.application}),e.extensionLifeCycle&&OSF.OUtil.defineEnumerableProperty(this,"extensionLifeCycle",{value:e.extensionLifeCycle}),e.messaging&&OSF.OUtil.defineEnumerableProperty(this,"messaging",{value:e.messaging}),e.ui&&e.ui.taskPaneAction&&OSF.OUtil.defineEnumerableProperty(this,"taskPaneAction",{value:e.ui.taskPaneAction}),e.ui&&e.ui.ribbonGallery&&OSF.OUtil.defineEnumerableProperty(this,"ribbonGallery",{value:e.ui.ribbonGallery}),e.get_isDialog()){var o=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(e);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:o})}else{if(t&&OSF.OUtil.defineEnumerableProperty(this,"document",{value:t}),r){var a=r.displayName||"appOM";delete r.displayName,OSF.OUtil.defineEnumerableProperty(this,a,{value:r})}e.get_officeTheme()?OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return e.get_officeTheme()}}):i&&OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return i()}});o=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(e);if(OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:o}),e.get_featureGates){var s=e.get_featureGates();if(s&&s.EnablePublicThemeManager){var l=new OSF.DDA.Theming.InternalThemeHandler;l.InitializeThemeManager(),OSF.OUtil.defineEnumerableProperty(this,"themeManager",{value:l})}}}},OSF.DDA.OutlookContext=function(e,t,n,r,i){OSF.DDA.OutlookContext.uber.constructor.call(this,e,null,n,r,i),t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t}),e.sensitivityLabelsCatalog&&OSF.OUtil.defineEnumerableProperty(this,"sensitivityLabelsCatalog",{value:e.sensitivityLabelsCatalog()})},OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context),OSF.DDA.OutlookAppOm=function(e,t,n){},OSF.DDA.Application=function(e){},OSF.DDA.Document=function(e,t){var n;switch(e.get_clientMode()){case OSF.ClientMode.ReadOnly:n=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:n=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t}),OSF.OUtil.defineMutableProperties(this,{mode:{value:n},url:{value:e.get_docUrl()}})},OSF.DDA.JsomDocument=function(e,t,n){OSF.DDA.JsomDocument.uber.constructor.call(this,e,n),t&&OSF.OUtil.defineEnumerableProperty(this,"bindings",{get:function(){return t}});var r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetSelectedDataAsync,r.SetSelectedDataAsync]),OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))},OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document),OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var e;return OSF&&OSF._OfficeAppFactory&&(e=OSF._OfficeAppFactory.getContext()),e}}),OSF.DDA.License=function(e){OSF.OUtil.defineEnumerableProperty(this,"value",{value:e})},OSF.DDA.ApiMethodCall=function(e,t,n,r,i){var o=e.length,a=OSF.OUtil.delayExecutionAndCache((function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,i)}));this.verifyArguments=function(e,t){for(var n in e){var r=e[n],i=t[n];if(r.enum)switch(typeof i){case"string":if(OSF.OUtil.listContainsValue(r.enum,i))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw a()}if(r.types&&!OSF.OUtil.listContainsValue(r.types,typeof i))throw a()}},this.extractRequiredArguments=function(t,n,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,a,c=e.length-1;c>=s;c--){var u=e[c];switch(typeof u){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);o=u;break;case"function":if(a)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);a=u;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}if(o=l.fillOptions(o,n,r,i),a){if(o[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;o[Microsoft.Office.WebExtension.Parameters.Callback]=a}return l.verifyArguments(t,o),o}(e,i,n,r);return l.constructCallArgs(i,o,n,r)},this.processResponse=function(e,t,n,o){return e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,n,o):t:i?i(e,t):OSF.DDA.ErrorCodeManager.getErrorArgs(e)},this.getCallArgs=function(e){for(var t,n,r=e.length-1;r>=s;r--){var i=e[r];switch(typeof i){case"object":t=i;break;case"function":n=i}}return t=t||{},n&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=n),t}},OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[],n=e.privateStateCallbacks?OSF.OUtil.createObject(e.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(e.requiredArguments||[],t,n,e.onSucceeded,e.onFailed,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.AsyncMethodCalls={},OSF.DDA.AsyncMethodCalls.define=function(e){OSF.DDA.AsyncMethodCalls[e.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(e)},OSF.DDA.Error=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{name:{value:e},message:{value:t},code:{value:n}})},OSF.DDA.AsyncResult=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:e[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}}),e[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:e[OSF.DDA.AsyncResultEnum.Properties.Context]}),t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})},OSF.DDA.issueAsyncResult=function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Callback];if(r){var i,o={};o[OSF.DDA.AsyncResultEnum.Properties.Context]=e[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?o[OSF.DDA.AsyncResultEnum.Properties.Value]=n:(i={},n=n||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=n.name||n,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=n.message||n),r(new OSF.DDA.AsyncResult(o,i))}},OSF.DDA.SyncMethodNames={},OSF.DDA.SyncMethodNames.addNames=function(e){for(var t in e){var n={};OSF.OUtil.defineEnumerableProperties(n,{id:{value:t},displayName:{value:e[t]}}),OSF.DDA.SyncMethodNames[t]=n}},OSF.DDA.SyncMethodCall=function(e,t,n,r,i){var o=e.length,a=new OSF.DDA.ApiMethodCall(e,t,n,r,i);this.verifyAndExtractCall=function(e,n,r){var i=a.extractRequiredArguments(e,n,r),s=function(e,n,r,i){if(e.length>o+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var s,l=e.length-1;l>=o;l--){var c=e[l];switch(typeof c){case"object":if(s)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);s=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}return s=a.fillOptions(s,n,r,i),a.verifyArguments(t,s),s}(e,i,n,r);return a.constructCallArgs(i,s,n,r)}},OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[];return new OSF.DDA.SyncMethodCall(e.requiredArguments||[],t,e.privateStateCallbacks,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.SyncMethodCalls={},OSF.DDA.SyncMethodCalls.define=function(e){OSF.DDA.SyncMethodCalls[e.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(e)},OSF.DDA.ListType=function(){var e={};return{setListType:function(t,n){e[t]=n},isListType:function(t){return OSF.OUtil.listContainsKey(e,t)},getDescriptor:function(t){return e[t]}}}(),OSF.DDA.HostParameterMap=function(e,t){var n={};function r(i,o){var a=i?{}:void 0;for(var s in i){var l,c=i[s];if(OSF.DDA.ListType.isListType(s))for(var u in l=[],c)l.push(r(c[u],o));else if(OSF.OUtil.listContainsKey(n,s))l=n[s][o](c);else if("fromHost"==o&&e.preserveNesting(s))l=r(c,o);else{var d=t[s];if(d){var f=d[o];f&&void 0===(l=f[c])&&(l=c)}else l=c}a[s]=l}return a}function i(n,i,o){var a,s=t[n][o];if("toHost"==o)a=function n(r,i){var o;for(var a in i){var s;if(void 0!=(s=e.isComplexType(a)?n(r,t[a].toHost):r[a])){o||(o={});var l=i[a];"self"==l&&(l=a),o[l]=e.pack(a,s)}}return o}(r(i,o),s);else if("fromHost"==o){a=r(function n(r,i,o){for(var a in o||(o={}),i){var s,l,c=i[a];if("self"==c)s=r;else{if("sourceData"==c){o[a]=r.toArray();continue}s=r[c]}if(null===s||void 0===s)o[a]=void 0;else if(s=e.unpack(a,s),e.isComplexType(a))l=t[a].fromHost,e.preserveNesting(a)?o[a]=n(s,l):n(s,l,o);else if(OSF.DDA.ListType.isListType(a)){(l={})[OSF.DDA.ListType.getDescriptor(a)]="self";var u=new Array(s.length);for(var d in s)u[d]=n(s[d],l);o[a]=u}else o[a]=s}return o}(i,s),o)}return a}n[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(e){if(null!=e&&void 0!==e.rows){var t={};t[OSF.DDA.TableDataProperties.TableRows]=e.rows,t[OSF.DDA.TableDataProperties.TableHeaders]=e.headers,e=t}return e},fromHost:function(e){return e}},n[Microsoft.Office.WebExtension.Parameters.JsonData]={toHost:function(e){return e},fromHost:function(e){return"string"===typeof e?JSON.parse(e):e}},n[Microsoft.Office.WebExtension.Parameters.SampleData]=n[Microsoft.Office.WebExtension.Parameters.Data],t||(t={}),this.addMapping=function(e,n){var r,i;if(n.map)for(var o in i={},r=n.map){var a=r[o];"self"==a&&(a=o),i[a]=o}else r=n.toHost,i=n.fromHost;var s=t[e];if(s){var l=s.toHost;for(var c in l)r[c]=l[c];for(var u in l=s.fromHost)i[u]=l[u]}else s=t[e]={};s.toHost=r,s.fromHost=i},this.toHost=function(e,t){return i(e,t,"toHost")},this.fromHost=function(e,t){return i(e,t,"fromHost")},this.self="self",this.sourceData="sourceData",this.addComplexType=function(t){e.addComplexType(t)},this.getDynamicType=function(t){return e.getDynamicType(t)},this.setDynamicType=function(t,n){e.setDynamicType(t,n)},this.dynamicTypes=n,this.doMapValues=function(e,t){return r(e,t)}},OSF.DDA.SpecialProcessor=function(e,t){this.addComplexType=function(t){e.push(t)},this.getDynamicType=function(e){return t[e]},this.setDynamicType=function(e,n){t[e]=n},this.isComplexType=function(t){return OSF.OUtil.listContainsValue(e,t)},this.isDynamicType=function(e){return OSF.OUtil.listContainsKey(t,e)},this.preserveNesting=function(e){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,e)},this.pack=function(e,n){return this.isDynamicType(e)?t[e].toHost(n):n},this.unpack=function(e,n){return this.isDynamicType(e)?t[e].fromHost(n):n}},OSF.DDA.getDecoratedParameterMap=function(e,t){var n=new OSF.DDA.HostParameterMap(e);n.self;function r(e){var t=null;if(e){t={};for(var n=e.length,r=0;r0){for(var r=[],i=0;i=i)break;if(r=Function._validateParameter(e[o],s,l))return r.popStackFrame(),r}return null}),Function._validateParameterCount||(Function._validateParameterCount=function(e,t,r){var i,o,a=t.length,s=e.length;if(sa)for(o=!0,i=0;i0&&t.push(o)}}}catch(e){}return t}var t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){return{toHost:function(e){if(OSF.DDA.TableDataProperties&&"string"!=typeof e&&void 0!==e[OSF.DDA.TableDataProperties.TableRows]){var t=[];t[0]=e[OSF.DDA.TableDataProperties.TableRows],t[1]=e[OSF.DDA.TableDataProperties.TableHeaders],e=t}return e},fromHost:function(t){var n;if(t.toArray)if(2===t.dimensions())n=e(t);else{var r=t.toArray();2===r.length&&(null!=r[0]&&r[0].toArray||null!=r[1]&&r[1].toArray)?((n={})[OSF.DDA.TableDataProperties.TableRows]=e(r[0]),n[OSF.DDA.TableDataProperties.TableHeaders]=e(r[1])):n=r}else n=t;return n}}}(),OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,[],t),this.unpack=function(e,n){var r;this.isComplexType(e)||OSF.DDA.ListType.isListType(e)?r=void 0!==n&&void 0!==n.toArray?n.toArray():n||{}:r=this.isDynamicType(e)?t[e].fromHost(n):n;return r}},OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor),OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]}),OSF.DDA.SafeArray.Delegate.executeAsync=function(e){function t(e){var n=e;if(null!=e&&e.toArray){var r=e.toArray();n=new Array(r.length);for(var i=0;i2){a=[];for(var s=1;s=0;a--){var s=this.eventHandlers[a];s.dispId===n&&s.targetId===r&&(this.eventHandlers.splice(a,1),window._osfHostUnregisterCallback(s.callbackId))}},e.prototype.agaveHostCallback=function(e,t){},e.prototype.agaveHostEventCallback=function(e,t){},e.prototype.constructMessagingArgs=function(e,t){return{params:t,methodId:e}},e}(),i=function(){function e(t,n){this.callingIndex=0,this.callbackList={},this.eventHandlerList={},this.asyncMethodCallbackFunctionName=t,this.eventCallbackFunctionName=n,this.conversationId=e.getCurrentTimeMS().toString()}return e.prototype.invokeMethod=function(e,t,n,r){this.postWebkitMessage({},e,t,n,r)},e.prototype.registerEvent=function(e,t,r,i,o,a){var s={eventCallbackFunction:this.eventCallbackFunctionName},l={id:r,targetId:i},c=this.postWebkitMessage(s,e,t,l,a);this.eventHandlerList[c]=new n(r,i,o)},e.prototype.unregisterEvent=function(e,t,n,r,i){var o={id:n,targetId:r};for(var a in this.eventHandlerList)if(this.eventHandlerList.hasOwnProperty(a)){var s=this.eventHandlerList[a];s.id==n&&s.targetId==r&&delete this.eventHandlerList[a]}this.invokeMethod(e,t,o,i)},e.prototype.agaveHostCallback=function(e,t){var n=this.callbackList[e];if(n){var r=n(t);void 0!==r&&!0!==r||delete this.callbackList[e]}},e.prototype.agaveHostEventCallback=function(e,t){var n=this.eventHandlerList[e];n&&n.handler(t)},e.prototype.postWebkitMessage=function(t,n,r,i,o){t.methodId=r,t.params=i;var a="";o&&(a=this.generateCorrelationId(),this.callbackList[a]=o,t.callbackId=a,t.callbackFunction=this.asyncMethodCallbackFunctionName);var s=function(){window.webkit.messageHandlers[n].postMessage(JSON.stringify(t))},l=e.getCurrentTimeMS();return null==this.lastMessageTimestamp||l-this.lastMessageTimestamp>=e.MESSAGE_TIME_DELTA?(s(),this.lastMessageTimestamp=l):(this.lastMessageTimestamp+=e.MESSAGE_TIME_DELTA,setTimeout((function(){s()}),this.lastMessageTimestamp-l)),a},e.prototype.generateCorrelationId=function(){return++this.callingIndex,this.conversationId+this.callingIndex},e.getCurrentTimeMS=function(){return(new Date).getTime()},e.MESSAGE_TIME_DELTA=10,e}()}(e.ScriptMessaging||(e.ScriptMessaging={}))}(OSFWebkit||(OSFWebkit={})),OSF.ScriptMessaging=OSFWebkit.ScriptMessaging,function(e){e.MessageHandlerName="Agave",e.PopupMessageHandlerName="WefPopupHandler",function(e){e[e.Settings=0]="Settings",e[e.SolutionReferenceId=1]="SolutionReferenceId",e[e.AppType=2]="AppType",e[e.MajorVersion=3]="MajorVersion",e[e.MinorVersion=4]="MinorVersion",e[e.RevisionVersion=5]="RevisionVersion",e[e.APIVersionSequence=6]="APIVersionSequence",e[e.AppCapabilities=7]="AppCapabilities",e[e.APPUILocale=8]="APPUILocale",e[e.AppDataLocale=9]="AppDataLocale",e[e.BindingCount=10]="BindingCount",e[e.DocumentUrl=11]="DocumentUrl",e[e.ActivationMode=12]="ActivationMode",e[e.ControlIntegrationLevel=13]="ControlIntegrationLevel",e[e.SolutionToken=14]="SolutionToken",e[e.APISetVersion=15]="APISetVersion",e[e.CorrelationId=16]="CorrelationId",e[e.InstanceId=17]="InstanceId",e[e.TouchEnabled=18]="TouchEnabled",e[e.CommerceAllowed=19]="CommerceAllowed",e[e.RequirementMatrix=20]="RequirementMatrix",e[e.HostCustomMessage=21]="HostCustomMessage",e[e.HostFullVersion=22]="HostFullVersion",e[e.InitialDisplayMode=23]="InitialDisplayMode",e[e.FeatureGates=24]="FeatureGates",e[e.HostSettings=25]="HostSettings",e[e.OfficeThemeInfo=26]="OfficeThemeInfo"}(e.AppContextProperties||(e.AppContextProperties={})),function(e){e[e.Execute=1]="Execute",e[e.RegisterEvent=2]="RegisterEvent",e[e.UnregisterEvent=3]="UnregisterEvent",e[e.WriteSettings=4]="WriteSettings",e[e.GetContext=5]="GetContext",e[e.SendMessage=6]="SendMessage",e[e.MessageParent=7]="MessageParent",e[e.SendMessage2=8]="SendMessage2",e[e.MessageParent2=9]="MessageParent2"}(e.MethodId||(e.MethodId={}));var t=function(){function t(e){this.hostScriptProxy=e,this.useFullDialogAPI=!!window._enableFullDialogAPI,this.osfSupportsDialogOrigin=!!window._osfEnableDialogOrigin}return t.prototype.execute=function(t,n,r){var i={id:t,apiArgs:n};this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.Execute,i,(function(t){if(r){var n=[];if(OSF.OUtil.isArray(t))for(var i=0;i=2&&(n=t[0],i=t[1]),r&&r(i,new e.WebkitSafeArray(n))}),(function(t){if(i)return i(new e.WebkitSafeArray(t))}))},t.prototype.unregisterEvent=function(t,n,r){this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,t,n,(function(t){return r(new e.WebkitSafeArray(t))}))},t.prototype.messageParent=function(e){if(this.useFullDialogAPI&&e){var t=e[Microsoft.Office.WebExtension.Parameters.MessageToParent];"boolean"===typeof t&&(!0===t?e[Microsoft.Office.WebExtension.Parameters.MessageToParent]="true":!1===t&&(e[Microsoft.Office.WebExtension.Parameters.MessageToParent]=""))}var n,r;if(this.osfSupportsDialogOrigin&&e[Microsoft.Office.WebExtension.Parameters.TargetOrigin]?(n=this.useFullDialogAPI?JSON.stringify(e):e[Microsoft.Office.WebExtension.Parameters.MessageToParent],r=OSF.Webkit.MethodId.MessageParent2):(n=e[Microsoft.Office.WebExtension.Parameters.MessageToParent],r=OSF.Webkit.MethodId.MessageParent),this.useFullDialogAPI)this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,r,n,null);else{var i={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:n}},o=r==OSF.Webkit.MethodId.MessageParent2?e[Microsoft.Office.WebExtension.Parameters.TargetOrigin]:window.location.origin;window.opener.postMessage(JSON.stringify(i),o)}},t.prototype.openDialog=function(e,n,r,i){if(this.useFullDialogAPI)this.registerEvent(e,n,r,i);else if(!t.popup||t.popup.closed){t.OpenDialogCallback=void 0;var o=JSON.parse(n),a=o.url;if(a){var s=a.split("#"),l="?";s[0].indexOf("?")>-1&&(l="&");var c="width="+screen.width*o.width/100+", height="+screen.height*o.height/100;s[0]=s[0].concat(l).concat("action=displayDialog");var u=s.join("#");t.popup=window.open(u,"",c),t.DialogEventListener=function(t){if(t.origin==window.location.origin)try{var n=JSON.parse(t.data);n.dialogMessage&&r(e,[OSF.DialogMessageType.DialogMessageReceived,n.dialogMessage.messageContent,t.origin])}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+t.data)}},t.OpenDialogCallback=function(e){e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(window.addEventListener("message",t.DialogEventListener),t.interval=window.setInterval(d,1e3),t.NotifyError=f),i(e)}}else i(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme)}else i(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);function d(){try{(null==t.popup||t.popup.closed)&&(window.clearInterval(t.interval),window.removeEventListener("message",t.DialogEventListener),t.NotifyError=null,t.popup=null,r(e,[OSF.DialogMessageType.DialogClosed]))}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}function f(t){r(e,[t])}},t.prototype.closeDialog=function(e,n,r){this.useFullDialogAPI?this.unregisterEvent(e,n,r):t.popup?(t.interval&&window.clearInterval(t.interval),t.popup.close(),t.popup=null,window.removeEventListener("message",t.DialogEventListener),t.NotifyError=null,r(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):r(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},t.prototype.sendMessage=function(e){var t,n;this.osfSupportsDialogOrigin&&e[Microsoft.Office.WebExtension.Parameters.TargetOrigin]?(t=JSON.stringify(e),n=OSF.Webkit.MethodId.SendMessage2):(t=e[Microsoft.Office.WebExtension.Parameters.MessageContent],n=OSF.Webkit.MethodId.SendMessage,!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString())),this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,n,t,null)},t.prototype.closeSdxDialog=function(e){},t.prototype.resizeSdxDialog=function(e,t){},t}();e.WebkitHostController=t}(OSFWebkit||(OSFWebkit={})),OSF.Webkit=OSFWebkit,OSF.initializeWebkitCommon=function(){OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(e){return function(t){var n=function(e,n){t.onReceiving&&t.onReceiving(),t.onComplete&&t.onComplete(e,n)};try{e(t.hostCallArgs,t.onCalling,n)}catch(e){n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,{name:Strings.OfficeOM.L_InternalError,message:e})}}},read:function(e,t){e&&e();OSF._OfficeAppFactory.getInitializationHelper().getAppContext(null,(function(e){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,e.get_settings())}))},write:function(e,t,n,r){var i={},o=[],a=[];for(var s in e)o.push(s),a.push(e[s]);i.keys=o,i.values=a,n&&n();OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,i,(function(e){r&&r(e[0],null)}))}},OSF.InitializationHelper.prototype.initializeSettings=function(e,t){var n=e.get_settings();return this.deserializeSettings(n,t)},OSF.InitializationHelper.prototype.getAppContext=function(e,t){var n;n=this._hostInfo.isDialog&&window.webkit.messageHandlers[OSF.Webkit.PopupMessageHandlerName]?OSF.Webkit.PopupMessageHandlerName:OSF.Webkit.MessageHandlerName,OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(n,OSF.Webkit.MethodId.GetContext,[],(function(e){for(var n,r=OSF.Webkit.AppContextProperties,i=e[r.AppType],o=e[r.Settings],a={},s=o[0],l=o[1],c=0;cn[i])return!1}return!1},e.prototype.isDirectToAriaEnabled=function(){if(void 0===this.EnableDirectToAria||null===this.EnableDirectToAria){var e=void 0,t=void 0;OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&(e=OSF._OfficeAppFactory.getHostInfo().hostPlatform),window.external&&"undefined"!==typeof window.external.GetContext&&"undefined"!==typeof window.external.GetContext().GetHostFullVersion&&(t=window.external.GetContext().GetHostFullVersion()),this.EnableDirectToAria=this.shouldSendDirectToAria(e,t)}return this.EnableDirectToAria},e.prototype.sendTelemetry=function(t,n){e.EnableSendingTelemetryWithLegacyAria&&this.isDirectToAriaEnabled()&&OSF.OUtil.loadScript(this.getAriaCDNLocation(),(function(){try{if(!this.ALogger){this.ALogger=AWTLogManager.initialize("db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439")}var e=new AWTEventProperties;for(var r in e.setName("Office.Extensibility.OfficeJS."+t),n)"table"!==r.toLowerCase()&&e.setProperty(r,n[r]);var i=new Date;e.setProperty("Date",i.toISOString()),this.ALogger.logEvent(e)}catch(e){}}),1e3),e.EnableSendingTelemetryWithOTel&&i(t,n)},e.prototype.logData=function(e){this.isIUsageData(e)?this.sendTelemetry(e.Table,e.Fields):this.sendTelemetry(e.Table,e)},e.EnableSendingTelemetryWithOTel=!0,e.EnableSendingTelemetryWithLegacyAria=!1,e}();e.AriaLogger=o}(OSFAriaLogger||(OSFAriaLogger={})),function(e){"use strict";var t,n=OSF.OUtil.Guid.generateNewGuid(),r="",i=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i");e.enableTelemetry=!0;var o=function(){return function(){}}();e.AppInfo=o;var a=function(){return function(e,t){this.name=e,this.handler=t}}(),s=function(){function e(){this.clientIDKey="Office API client",this.logIdSetKey="Office App Log Id Set"}return e.prototype.getClientId=function(){var e=this.getValue(this.clientIDKey);return(!e||e.length<=0||e.length>40)&&(e=OSF.OUtil.Guid.generateNewGuid(),this.setValue(this.clientIDKey,e)),e},e.prototype.saveLog=function(e,t){var n=this.getValue(this.logIdSetKey);n=(n&&n.length>0?n+";":"")+e,this.setValue(this.logIdSetKey,n),this.setValue(e,t)},e.prototype.enumerateLog=function(e,t){var n=this.getValue(this.logIdSetKey);if(n){var r=n.split(";");for(var i in r){var o=r[i],a=this.getValue(o);a&&(e&&e(o,a),t&&this.remove(o))}t&&this.remove(this.logIdSetKey)}},e.prototype.getValue=function(e){var t=OSF.OUtil.getLocalStorage(),n="";return t&&(n=t.getItem(e)),n},e.prototype.setValue=function(e,t){var n=OSF.OUtil.getLocalStorage();n&&n.setItem(e,t)},e.prototype.remove=function(e){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(e)}catch(e){}},e}(),l=function(){function t(){}return t.prototype.LogData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(e){}},t.prototype.LogRawData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(e){}},t}();function c(e){return e&&(e=e.replace(/[{}]/g,"").toLowerCase()),e||""}function u(e,t){var i=new OSFLog.AppInitializationUsageData;i.CorrelationId=c(r),i.SessionId=n,i.SuccessCode=e?1:0,i.Message=t,(new l).LogData(i)}function d(){var e=0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.PublicAddin);return e||!!t&&p(OSF._OfficeAppFactory.getHostInfo().hostPlatform,t.hostVersion)}function f(e,t){return d()||t!==e?t:"PRIVATE"}function p(e,t){var n=!1,r=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(t);if(r){var i=parseInt(r[1]),o=parseInt(r[2]),a=parseInt(r[3]);"win32"==e?(i<16||16==i&&a<14225)&&(n=!0):"mac"==e&&(i<16||16==i&&(o<52||52==o&&a<808))&&(n=!0)}return n}function h(){return 0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.IsMos)}e.initialize=function(r){if(e.enableTelemetry&&!t){t=new o,r.get_hostFullVersion()?t.hostVersion=r.get_hostFullVersion():t.hostVersion=r.get_appVersion(),t.appId=d()?r.get_id():"PRIVATE",t.marketplaceType=r._marketplaceType,t.browser=window.navigator.userAgent,t.correlationId=c(r.get_correlationId()),t.clientId=(new s).getClientId(),t.appInstanceId=r.get_appInstanceId(),t.appInstanceId&&(t.appInstanceId=c(t.appInstanceId),t.appInstanceId=f(r.get_id(),t.appInstanceId)),t.message=r.get_hostCustomMessage(),t.officeJSVersion=OSF.ConstantNames.FileVersion,t.hostJSVersion="0.0.0.0",r._wacHostEnvironment&&(t.wacHostEnvironment=r._wacHostEnvironment),void 0!==r._isFromWacAutomation&&null!==r._isFromWacAutomation&&(t.isFromWacAutomation=r._isFromWacAutomation.toString().toLowerCase());var l=r.get_docUrl();t.docUrl=i.test(l)?l:"";var u=location.href;u&&(u=u.split("?")[0].split("#")[0]),t.isMos=h(),t.appURL="",function(e,t){var n,r;t.assetId="",t.userId="";try{n=decodeURIComponent(e);var i=(r=(new DOMParser).parseFromString(n,"text/xml")).getElementsByTagName("t")[0].attributes.getNamedItem("cid"),o=r.getElementsByTagName("t")[0].attributes.getNamedItem("oid");i&&i.nodeValue?t.userId=i.nodeValue:o&&o.nodeValue&&(t.userId=o.nodeValue),t.assetId=r.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(e){}finally{n=null,r=null,null}}(r.get_eToken(),t),t.sessionId=n,"undefined"!==typeof OTel&&OTel.OTelLogger.initialize(t),function(){var t=new Date,n=null,r=0,i=!1,o=function(){document.hasFocus()?null==n&&(n=new Date):n&&(r+=Math.abs((new Date).getTime()-n.getTime()),n=null)},s=[];s.push(new a("focus",o)),s.push(new a("blur",o)),s.push(new a("focusout",o)),s.push(new a("focusin",o));var l=function(){for(var o=0;o0)for(var r=0;r0)for(var r=0;r0&&(this._eventHandlers[e]=[],!0)},clearObjectEventHandlers:function(e,t){return null!=this._objectEventHandlers[e]&&null!=this._objectEventHandlers[e][t]&&(this._objectEventHandlers[e][t]=[],!0)},getEventHandlerCount:function(e){return void 0!=this._eventHandlers[e]?this._eventHandlers[e].length:-1},getObjectEventHandlerCount:function(e,t){return null==this._objectEventHandlers[e]||null==this._objectEventHandlers[e][t]?0:this._objectEventHandlers[e][t].length},fireEvent:function(e){if(void 0==e.type)return!1;var t=e.type;if(t&&this._eventHandlers[t]){for(var n=this._eventHandlers[t],r=0;r0){for(var r=t[0];n.length>0;){r(n.shift())}return!0}}return!1},clearQueuedEvent:function(e){e&&this._eventHandlers[e]&&(this._queuedEventsArgs[e]&&(this._queuedEventsArgs[e]=[]))}},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureEventArgs=function(e,t,n){var r;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(n,t.document),n[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(n,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(n),"outlook"==OSF._OfficeAppFactory.getHostInfo().hostType&&"mac"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&OSF.DDA.convertOlkAppointmentTimeToDateFormat(r);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(e,n[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(e,n);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkItemSelectedChangedEventArgs(n),t.initialize(r.initialData),"win32"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform&&"mac"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform||t.setCurrentItemNumber(r.itemNumber.itemNumber);break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecipientsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecurrenceChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAttachmentsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.InfobarClicked:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkInfobarClickedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkSelectedItemsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkSensitivityLabelChangedEventArgs(n);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return r},OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]}),OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1},OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"}),OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent",MessageOrigin:"messageOrigin"}),OSF.DDA.DialogEventType={},OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"}),OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",DisplayModalDialogAsync:"displayModalDialogAsync",CloseAsync:"close"}),OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",MessageChild:"messageChild",SendMessage:"sendMessage",AddMessageHandler:"addEventHandler"}),OSF.DDA.UI.ParentUI=function(){var e;e=null!=Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived?new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]):new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]);var t=this,n=function(n,r){t[n]||OSF.OUtil.defineEnumerableProperty(t,n,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];n(arguments,e,t,r)}})};n(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,!1),Microsoft.Office.WebExtension.FeatureGates.ModalWebDialogAPI&&n(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName,!0),OSF.OUtil.finalizeProperties(this)},OSF.DDA.UI.ChildUI=function(e){var t=OSF.DDA.SyncMethodNames.MessageParent.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return e(arguments,n)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;n[r]||"undefined"==typeof OSF.DialogParentMessageEventDispatch||OSF.DDA.DispIdHost.addEventSupport(n,OSF.DialogParentMessageEventDispatch,e),OSF.OUtil.finalizeProperties(this)},OSF.DialogHandler=function(){},OSF.DDA.DialogEventArgs=function(e){e[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:e[OSF.DDA.PropertyDescriptors.MessageType]}})},OSF.DDA.DialogParentEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}})};var DialogApiManager=function(){function e(){}return e.defineApi=function(e,t){OSF.DDA.AsyncMethodCalls.define({method:e,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:t,privateStateCallbacks:[],onSucceeded:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Id],i=e[Microsoft.Office.WebExtension.Parameters.Data],o=new OSF.DialogHandler,a=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(o,a,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];e(arguments,r,i,o)}});var s=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;if(OSF.OUtil.defineEnumerableProperty(o,s,{value:function(){var e=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],t=e.verifyAndExtractCall(arguments,o,i),n=t[Microsoft.Office.WebExtension.Parameters.EventType],r=t[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(n,r)}}),!0===OSF.DDA.UI.EnableSendMessageDialogAPI){var l=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(o,l,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,i,o)}})}if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var c=OSF.DDA.SyncMethodNames.MessageChild.displayName;OSF.OUtil.defineEnumerableProperty(o,c,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,i,o)}})}return o},checkCallArgs:function(e,t,n){return e[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Width]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Width]>100&&(e[Microsoft.Office.WebExtension.Parameters.Width]=99),e[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Height]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Height]>100&&(e[Microsoft.Office.WebExtension.Parameters.Height]=99),e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),e}})},e.messageChildRichApiBridge=function(){if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,null,null)}},e.initOnce=function(){e.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync,e.displayDialogAsyncApiSupportedOptions),e.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync,e.displayModalDialogAsyncApiSupportedOptions)},e.displayDialogAsyncApiSupportedOptions=[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.EnforceAppDomain,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo,value:{types:["boolean"],defaultValue:!1}}],e.displayModalDialogAsyncApiSupportedOptions=e.displayDialogAsyncApiSupportedOptions.concat([{name:"abortWhenParentIsMinimized",value:{types:["boolean"],defaultValue:!1}},{name:"abortWhenDocIsInactive",value:{types:["boolean"],defaultValue:!1}}]),e}();DialogApiManager.initOnce(),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}],privateStateCallbacks:[]}),OSF.DDA.SafeArray.Delegate.openDialog=function(e){try{e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,e);OSF.ClientHostController.openDialog(e.dispId,e.targetId,(function(t,n){e.onEvent&&e.onEvent(n),OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(e.dispId)}),t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.closeDialog=function(e){e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,e);try{OSF.ClientHostController.closeDialog(e.dispId,e.targetId,t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.messageParent=function(e){try{e.onCalling&&e.onCalling();var t=(new Date).getTime(),n=OSF.ClientHostController.messageParent(e.hostCallArgs);return e.onReceiving&&e.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(e.dispId,e.hostCallArgs,Math.abs((new Date).getTime()-t),n),n}catch(e){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(e)}},OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.sendMessage=function(e){try{e.onCalling&&e.onCalling();(new Date).getTime();var t=OSF.ClientHostController.sendMessage(e.hostCallArgs);return e.onReceiving&&e.onReceiving(),t}catch(e){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(e)}},OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogParentMessageReceivedEvent:"DialogParentMessageReceivedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogParentMessageReceived:"dialogParentMessageReceived",DialogParentEventReceived:"dialogParentEventReceived"}),OSF.DialogParentMessageEventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,Microsoft.Office.WebExtension.EventType.DialogParentEventReceived]),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:!0}),OSF.DDA.UI.EnableMessageChildDialogAPI=!0,Microsoft.Office.WebExtension.TableData=function(e,t){function n(e){if(null==e||void 0==e)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(e,2);t<2;t++)e=[e];return e}catch(e){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(e){t=n(e)}},rows:{get:function(){return e},set:function(t){e=null==t||OSF.OUtil.isArray(t)&&0==t.length?[]:n(t)}}}),this.headers=t,this.rows=e},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureTableData=function(e){return new Microsoft.Office.WebExtension.TableData(e[OSF.DDA.TableDataProperties.TableRows],e[OSF.DDA.TableDataProperties.TableHeaders])},Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"},OSF.DDA.DataCoercion=function(){return{findArrayDimensionality:function(e){if(OSF.OUtil.isArray(e)){for(var t=0,n=0;n=0&&(e=e.substring(t+5,e.length))<"14.14393"}()?e.PromiseImpl.Init():window.Promise:e.PromiseImpl.Init()}()}(t=e._Internal||(e._Internal={}));var n=t.OfficePromise;e.Promise=n}(OfficeExtension||(OfficeExtension={})),function(e){var t=function(){function e(){}return e.prototype._resolveRequestUrlAndHeaderInfo=function(){return c._createPromiseFromResult(null)},e.prototype._createRequestExecutorOrNull=function(){return null},e.prototype.getEventRegistration=function(e){return null},e}();e.SessionBase=t;var n=function(){function e(){}return e.setCustomSendRequestFunc=function(t){e.s_customSendRequestFunc=t},e.xhrSendRequestFunc=function(e){return c.createPromise((function(t,n){var i=new XMLHttpRequest;if(i.open(e.method,e.url),i.onload=function(){var e={statusCode:i.status,headers:c._parseHttpResponseHeaders(i.getAllResponseHeaders()),body:i.responseText};t(e)},i.onerror=function(){n(new r.RuntimeError({code:o.connectionFailure,httpStatusCode:i.status,message:c._getResourceString(a.connectionFailureWithStatus,i.statusText)}))},e.headers)for(var s in e.headers)i.setRequestHeader(s,e.headers[s]);i.send(c._getRequestBodyText(e))}))},e.fetchSendRequestFunc=function(e){var t=c._getRequestBodyText(e);return""===t&&(t=void 0),fetch(e.url,{method:e.method,headers:e.headers,body:t}).then((function(e){return e.text().then((function(t){var n=e.status,r={};return e.headers.forEach((function(e,t){r[t]=e})),{statusCode:n,headers:r,body:t}}))}))},e.sendRequest=function(t){e.validateAndNormalizeRequest(t);var n=e.s_customSendRequestFunc;return n||(n="undefined"!==typeof fetch?e.fetchSendRequestFunc:e.xhrSendRequestFunc),n(t)},e.setCustomSendLocalDocumentRequestFunc=function(t){e.s_customSendLocalDocumentRequestFunc=t},e.sendLocalDocumentRequest=function(t){return e.validateAndNormalizeRequest(t),(e.s_customSendLocalDocumentRequestFunc||e.officeJsSendLocalDocumentRequestFunc)(t)},e.officeJsSendLocalDocumentRequestFunc=function(e){e=c._validateLocalDocumentRequest(e);var t=c._buildRequestMessageSafeArray(e);return c.createPromise((function(e,n){OSF.DDA.RichApi.executeRichApiRequestAsync(t,(function(t){var n;n="succeeded"==t.status?{statusCode:l.getResponseStatusCode(t),headers:l.getResponseHeaders(t),body:l.getResponseBody(t)}:l.buildHttpResponseFromOfficeJsError(t.error.code,t.error.message),c.log("Response:"),c.log(JSON.stringify(n)),e(n)}))}))},e.validateAndNormalizeRequest=function(e){if(c.isNullOrUndefined(e))throw r.RuntimeError._createInvalidArgError({argumentName:"request"});c.isNullOrEmptyString(e.method)&&(e.method="GET"),e.method=e.method.toUpperCase();var t=!1;if("object"===typeof e.headers&&e.headers[s.testRequestNameHeader]&&(t=!0),!t){var n=u._getCurrentTestNameWithSequenceId();n&&(e.headers||(e.headers={}),e.headers[s.testRequestNameHeader]=n)}},e.logRequest=function(t){if(c._logEnabled){if(c.log("---HTTP Request---"),c.log(t.method+" "+t.url),t.headers)for(var n in t.headers)c.log(n+": "+t.headers[n]);e._logBodyEnabled&&c.log(c._getRequestBodyText(t))}},e.logResponse=function(t){if(c._logEnabled){if(c.log("---HTTP Response---"),c.log(""+t.statusCode),t.headers)for(var n in t.headers)c.log(n+": "+t.headers[n]);e._logBodyEnabled&&c.log(t.body)}},e._logBodyEnabled=!1,e}();e.HttpUtility=n;var r,i=function(){function e(e){var t=this;this.m_bridge=e,this.m_promiseResolver={},this.m_handlers=[],this.m_bridge.onMessageFromHost=function(e){var n=JSON.parse(e);if(3==n.type){var r=n.message;if(r&&r.entries)for(var i=0;i=0){var o=t.url.substr(i+1),a=c._parseRequestFlagsAndCustomDataFromQueryStringIfAny(o);a.flags>=0&&(n=a.flags)}"string"===typeof t.body&&(t.body=JSON.parse(t.body));var s={id:e.nextId(),type:1,flags:n,message:t};return r.sendMessageToHostAndExpectResponse(s).then((function(e){return e.message}))}));for(var i=0;i=0&&this.m_handlers.splice(t,1)},e.onInited=function(t){e.s_onInitedHandlers.push(t),e.s_instance&&t(e.s_instance)},e.prototype.dispatchMessage=function(e){if("number"===typeof e.id){var t=this.m_promiseResolver[e.id];if(t)return t(e),void delete this.m_promiseResolver[e.id]}for(var n=0;n0},e._getLocalDocumentUrlPrefixLength=function(e){for(var t=["http://document.localhost","https://document.localhost","//document.localhost"],n=e.toLowerCase().trim(),r=0;r0){var o=t.url.substr(i+1),a=e._parseRequestFlagsAndCustomDataFromQueryStringIfAny(o);a.flags>=0&&(n=a.flags),r=a.customData}}return l.buildRequestMessageSafeArray(r,n,t.method,t.url,t.headers,e._getRequestBodyText(t))},e._parseHttpResponseHeaders=function(t){var n={};if(!e.isNullOrEmptyString(t))for(var r=new RegExp("\r?\n"),i=t.split(r),o=0;o0){var l=a.substr(0,s),c=a.substr(s+1);l=e.trim(l),c=e.trim(c),n[l.toUpperCase()]=c}}}return n},e._parseErrorResponse=function(t){var n=e._parseErrorResponseBody(t),r=t.statusCode.toString();if(e.isNullOrUndefined(n)||"object"!==typeof n||!n.error)return e._createDefaultErrorResponse(r);var i=n.error,o=i.innerError;return o&&o.code?e._createErrorResponse(o.code,r,o.message):i.code?e._createErrorResponse(i.code,r,i.message):e._createDefaultErrorResponse(r)},e._parseErrorResponseBody=function(t){if(e.isPlainJsonObject(t.body))return t.body;if(!e.isNullOrEmptyString(t.body)){var n=e.trim(t.body);try{return JSON.parse(n)}catch(t){e.log("Error when parse "+n)}}},e._createDefaultErrorResponse=function(t){return{errorCode:o.connectionFailure,errorMessage:e._getResourceString(a.connectionFailureWithStatus,t)}},e._createErrorResponse=function(t,n,r){return{errorCode:t,errorMessage:e._getResourceString(a.connectionFailureWithDetails,[n,t,r])}},e._copyHeaders=function(e,t){if(e&&t)for(var n in e)t[n]=e[n]},e.addResourceStringValues=function(t){for(var n in t)e.s_resourceStringValues[n]=t[n]},e._logEnabled=!1,e.s_resourceStringValues={ApiNotFoundDetails:"The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",ConnectionFailureWithStatus:"The request failed with status code of {0}.",ConnectionFailureWithDetails:"The request failed with status code of {0}, error code {1} and the following error message: {2}",InvalidArgument:"The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",InvalidObjectPath:'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',InvalidRequestContext:"Cannot use the object across different request contexts.",Timeout:"The operation has timed out.",ValueNotLoaded:'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'},e}();e.CoreUtility=c;var u=function(){function e(){}return e.setMock=function(t){e.s_isMock=t},e.isMock=function(){return e.s_isMock},e._setCurrentTestName=function(t){e.s_currentTestName=t,e.s_currentTestSequenceId=0},e._getCurrentTestNameWithSequenceId=function(){return e.s_currentTestName?(e.s_currentTestSequenceId++,e.s_currentTestName+"."+e.s_currentTestSequenceId):null},e}();e.TestUtility=u,e._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!0,enableUndoableFlag:!0,appendTypeNameToObjectPathInfo:!1,enablePreviewExecution:!1},e.config={extendedErrorLogging:!1};var d=function(){function t(){}return t.createSetPropertyAction=function(t,n,r,i,o){A.validateObjectPath(n);var a={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:n._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[i],l=A.setMethodArguments(t,a.ArgumentInfo,s);A.validateReferencedObjectPaths(l);var c=new p(a,0,o);if(c.referencedObjectPath=n._objectPath,c.referencedArgumentObjectPaths=l,e._internalConfig.enablePreviewExecution&&0!==(16&o)){var u={Id:t._nextId(),ActionType:4,Name:r,ObjectId:"",ObjectType:"",Arguments:[i]};n._addPreviewExecutionAction(u)}return n._addAction(c)},t.createQueryAction=function(e,t,n,r){A.validateObjectPath(t);var i={Id:e._nextId(),ActionType:2,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},o=new p(i,1,4);return o.referencedObjectPath=t._objectPath,t._addAction(o,r)},t.createQueryAsJsonAction=function(e,t,n,r){A.validateObjectPath(t);var i={Id:e._nextId(),ActionType:7,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},o=new p(i,1,4);return o.referencedObjectPath=t._objectPath,t._addAction(o,r)},t.createUpdateAction=function(e,t,n){A.validateObjectPath(t);var r={Id:e._nextId(),ActionType:9,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},i=new p(r,0,0);return i.referencedObjectPath=t._objectPath,t._addAction(i)},t}();e.CommonActionFactory=d;var f=function(){function t(e,t){this.m_contextBase=e,this.m_objectPath=t}return Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_context",{get:function(){return this.m_contextBase},enumerable:!0,configurable:!0}),t.prototype._addAction=function(e,t){var n=this;return void 0===t&&(t=null),c.createPromise((function(r,i){n._context._addServiceApiAction(e,t,r,i)}))},t.prototype._addPreviewExecutionAction=function(e){},t.prototype._retrieve=function(t,n){var r=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;r||(r=!A.isSetSupported("RichApiRuntime","1.1"));var i=g._parseQueryOption(t);return r?d.createQueryAction(this._context,this,i,n):d.createQueryAsJsonAction(this._context,this,i,n)},t.prototype._recursivelyUpdate=function(t){var n=e._internalConfig.alwaysPolyfillClientObjectUpdateMethod;n||(n=!A.isSetSupported("RichApiRuntime","1.2"));try{var i=this[S.scalarPropertyNames];i||(i=[]);var s=this[S.scalarPropertyUpdateable];if(!s){s=[];for(var l=0;l=0){if(!s[m])throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:c._getResourceString(C.attemptingToSetReadOnlyProperty,g),debugInfo:{errorLocation:g}});f[g]=t[g],++h}else{if(!(u.indexOf(g)>=0))throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:c._getResourceString(C.propertyDoesNotExist,g),debugInfo:{errorLocation:g}});p[g]=t[g]}}if(h>0)if(n)for(l=0;l0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});t.Top=s}else if("$skip"===a){if("number"!==typeof s||n.length>0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});t.Skip=s}else if("boolean"===typeof s)s&&t.Select.push(e.combineQueryPath(n,a,"/"));else{if("object"!==typeof s)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});e.parseStrictLoadOptionHelper(t,e.combineQueryPath(n,a,"/"),e.combineQueryPath(i,a,"."),s)}}},e}();e.ClientRequestContextBase=g;var m=function(){function e(e){this.m_objectPath=e}return e.prototype._handleResult=function(e){c.isNullOrUndefined(e)?this.m_objectPath._updateAsNullObject():this.m_objectPath.updateUsingObjectData(e,null)},e}(),y=function(){function t(e){this.m_contextBase=e,this.m_actions=[],this.m_actionResultHandler={},this.m_referencedObjectPaths={},this.m_instantiatedObjectPaths={},this.m_preSyncPromises=[],this.m_previewExecutionActions=[]}return t.prototype.addAction=function(e){this.m_actions.push(e),1==e.actionInfo.ActionType&&(this.m_instantiatedObjectPaths[e.actionInfo.ObjectPathId]=e)},t.prototype.addPreviewExecutionAction=function(e){this.m_previewExecutionActions.push(e)},Object.defineProperty(t.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.ensureInstantiateObjectPath=function(e){if(e){if(this.m_instantiatedObjectPaths[e.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(e.parentObjectPath),this.ensureInstantiateObjectPaths(e.argumentObjectPaths),!this.m_instantiatedObjectPaths[e.objectPathInfo.Id]){var t={Id:this.m_contextBase._nextId(),ActionType:1,Name:"",ObjectPathId:e.objectPathInfo.Id},n=new p(t,1,4);n.referencedObjectPath=e,this.addReferencedObjectPath(e),this.addAction(n);var r=new m(e);this.addActionResultHandler(n,r)}}},t.prototype.ensureInstantiateObjectPaths=function(e){if(e)for(var t=0;t0&&(c.PreviewExecutionActions=this.m_previewExecutionActions,n|=4096),{body:c,flags:n}},t.prototype.processResponse=function(e){if(e)for(var t=0;t=0;t--){var n=this.m_actions[t].actionInfo;if(n.ObjectPathId===e&&3===n.ActionType&&n.Name===S.keepReference){this.m_actions.splice(t,1);break}}},t._updateLastUsedActionIdOfObjectPathId=function(e,n,r){for(;n;){if(e[n.objectPathInfo.Id])return;e[n.objectPathInfo.Id]=r;var i=n.argumentObjectPaths;if(i)for(var o=i.length,a=0;a=0;--i){var o=(f=e[i]).actionInfo.Id;f.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(n,f.referencedObjectPath,o);var a=f.referencedArgumentObjectPaths;if(a)for(var s=a.length,l=0;l0?f.actionInfo.L=p:f.actionInfo.L&&delete f.actionInfo.L}},t}();e.ClientRequestBase=y;var v=function(){function e(e){this.m_type=e}return Object.defineProperty(e.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new r.RuntimeError({code:o.valueNotLoaded,httpStatusCode:400,message:c._getResourceString(a.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),e.prototype._handleResult=function(e){this.m_isLoaded=!0,"object"===typeof e&&e&&e._IsNull||(1===this.m_type?this.m_value=A.adjustToDateTime(e):this.m_value=e)},e}();e.ClientResult=v;var O=function(){function e(e){this.m_context=e,this.m_actions=[]}return e.prototype.add=function(e,t,n,r){var i=this;this.m_actions.push({action:e,resultHandler:t,resolve:n,reject:r}),1===this.m_actions.length&&setTimeout((function(){return i.processActions()}),0)},e.prototype.processActions=function(){var e=this;if(0!==this.m_actions.length){var t=this.m_actions;this.m_actions=[];for(var n=new y(this.m_context),r=0;r=65&&e.charCodeAt(t)<=90;)t++;return t0?".":"")+n;break;case 3:n=t.normalizeName(e.objectPathInfo.Name)+"()"+(n.length>0?".":"")+n;break;case 4:n=t.normalizeName(e.objectPathInfo.Name)+(n.length>0?".":"")+n;break;case 5:n="getItem()"+(n.length>0?".":"")+n;break;case 6:n="_reference()"+(n.length>0?".":"")+n}e=e.parentObjectPath}return n},t.setMethodArguments=function(e,n,r){if(c.isNullOrUndefined(r))return null;var i=new Array,o=new Array,a=t.collectObjectPathInfos(e,r,i,o);return n.Arguments=r,a&&(n.ReferencedObjectPathIds=o),i},t.validateContext=function(e,t){if(e&&t&&t._context!==e)throw new r.RuntimeError({code:o.invalidRequestContext,httpStatusCode:400,message:c._getResourceString(a.invalidRequestContext)})},t.isSetSupported=function(e,n){return"function"===typeof t.isSetSupportedOverride?t.isSetSupportedOverride(e,n):!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)||window.Office.context.requirements.isSetSupported(e,n)},t.throwIfApiNotSupported=function(e,n,i,s){if(t._doApiNotSupportedCheck&&!t.isSetSupported(n,i)){var l=c._getResourceString(a.apiNotFoundDetails,[e,n+" "+i,s]);throw new r.RuntimeError({code:o.apiNotFound,httpStatusCode:404,message:l,debugInfo:{errorLocation:e}})}},t.calculateApiFlags=function(e,n,r){var i=window&&window.location&&window.location.href&&-1!==window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc");return("function"===typeof t.isSetSupportedOverride?t.isSetSupportedOverride(n,r):!i&&t.isSetSupported(n,r))||(e&=-3),e},t._parseSelectExpand=function(e){var t=[];if(!c.isNullOrEmptyString(e))for(var n=e.split(","),r=0;r0&&t.push(i)}return t;function o(e){var t=e.toLowerCase();if("items"===t||"items/"===t)return"*";return("items/"===t.substr(0,6)||"items."===t.substr(0,6))&&(e=e.substr(6)),e.replace(new RegExp("[/.]items[/.]","gi"),"/")}},t.changePropertyNameToCamelLowerCase=function(e){if(Array.isArray(e)){for(var n=[],r=0;r=0){var a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!0),s=a.processForDebugStatementInfo(n.Body.Error.ActionIndex);o={statement:s.statement,surroundingStatements:s.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},e.config.extendedErrorLogging&&(a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!1),o.fullStatements=a.process())}var l=null;if(n.Body.Results?l=n.Body.Results:n.Body.ProcessedResults&&n.Body.ProcessedResults.Results&&(l=n.Body.ProcessedResults.Results),l){this._processingResult=!0;try{t.processResponse(l)}finally{this._processingResult=!1}}}if(!Z.isNullOrEmptyString(n.ErrorCode))return new r.RuntimeError({code:n.ErrorCode,httpStatusCode:n.HttpStatusCode,message:n.ErrorMessage,traceMessages:i,data:{responseBody:n.RawErrorResponseBody}});if(n.Body&&n.Body.Error){var c={errorLocation:n.Body.Error.Location};return o&&(c.statement=o.statement,c.surroundingStatements=o.surroundingStatements,c.fullStatements=o.fullStatements),new r.RuntimeError({code:n.Body.Error.Code,httpStatusCode:n.Body.Error.HttpStatusCode,message:n.Body.Error.Message,traceMessages:i,debugInfo:c})}return null},i.prototype.processPendingEventHandlers=function(e){for(var t=Z._createPromiseFromResult(null),n=0;n0)if(i.isValidRequestInfo(n[0]))f=n[0],h=1;else if(Z.isPlainJsonObject(n[0])){if(null!=(f=(g=n[0]).session)&&!i.isValidRequestInfo(f))return i.createErrorPromise(t);p=g.previousObjects,h=1}if(n.length==h+1)d=n[h+0];else{if(null!=g||n.length!=h+2)return i.createErrorPromise(t);p=n[h+0],d=n[h+1]}if(null!=p)if(p instanceof k)u=function(){return p.context};else if(p instanceof i)u=function(){return p};else{if(!Array.isArray(p))return i.createErrorPromise(t);var m=p;if(0==m.length)return i.createErrorPromise(t);for(var y=0;y0&&h._onRunFinishedNotifiers.shift()();if(v)return g;throw g}))},i}(g);e.ClientRequestContext=U;var L=function(){function e(e,t){this.m_proxy=e,this.m_shouldPolyfill=t;var n=e[H.scalarPropertyNames],r=e[H.navigationPropertyNames],i=e[H.className],o=e[H.isCollection];if(n)for(var a=0;a=0;s--)if(i[s]===r[o].handler){i.splice(s,1);break}break;case 2:i=[]}return a&&(!this.m_registered&&i.length>0?n=n.then((function(){return t.m_eventInfo.registerFunc(t.m_callback)})).then((function(){return t.m_registered=!0})):this.m_registered&&0==i.length&&(n=n.then((function(){return t.m_eventInfo.unregisterFunc(t.m_callback)})).catch((function(e){c.log("Error when unregister event: "+JSON.stringify(e))})).then((function(){return t.m_registered=!1}))),n=n.then((function(){return t.m_handlers=i}))),n},e.prototype.fireEvent=function(e){for(var t=[],n=0;n0},e.prototype.register=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});var i=this.getHandlers(e,t);return i.push(n),1===i.length?this.m_registerEventImpl(e,t):Z._createPromiseFromResult(null)},e.prototype.unregister=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var i=this.getHandlers(e,t),o=i.length-1;o>=0;o--)if(i[o]===n){i.splice(o,1);break}return 0===i.length?this.m_unregisterEventImpl(e,t):Z._createPromiseFromResult(null)},e}();e.EventRegistration=G;var q=function(){function e(){this.m_eventRegistration=new G(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this)),this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return e.prototype.ready=function(){var t=this;return this.m_ready||(e._testReadyImpl?this.m_ready=e._testReadyImpl().then((function(){t.m_isReady=!0})):i.instance?this.m_ready=Z._createPromiseFromResult(null).then((function(){t.m_isReady=!0})):this.m_ready=r.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then((function(){t.m_isReady=!0}))),this.m_ready},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.register(e,t,n)}))},e.prototype.unregister=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.unregister(e,t,n)}))},e.prototype._registerEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._unregisterEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._handleRichApiMessage=function(e){if(e&&e.entries)for(var t=0;t=0;i--)if(r[i]===e){r.splice(i,1);break}0==r.length&&q.getGenericEventRegistration(n).unregister(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)}))},t.prototype.removeAll=function(){},t}(B);e.GenericEventHandlers=z;var J=function(){function e(e){this.m_clientObject=e}return e.prototype._handleResult=function(e){this.m_clientObject._handleIdResult(e)},e}(),Q=function(){function e(){}return e.createGlobalObjectObjectPath=function(e){var t={Id:e._nextId(),ObjectPathType:1,Name:""};return new h(t,null,!1,!1,1,4)},e.createNewObjectObjectPath=function(e,t,n,r){var i={Id:e._nextId(),ObjectPathType:2,Name:t};return new h(i,null,n,!1,1,Z._fixupApiFlags(r))},e.createPropertyObjectPath=function(e,t,n,r,i,o){var a={Id:e._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id};return new h(a,t._objectPath,r,i,1,Z._fixupApiFlags(o))},e.createIndexerObjectPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new h(r,t._objectPath,!1,!1,1,4)},e.createIndexerObjectPathUsingParentPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new h(r,t,!1,!1,1,4)},e.createMethodObjectPath=function(e,t,n,r,i,o,a,s,l){var c={Id:e._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u=Z.setMethodArguments(e,c.ArgumentInfo,i),d=new h(c,t._objectPath,o,a,r,Z._fixupApiFlags(l));return d.argumentObjectPaths=u,d.getByIdMethodName=s,d},e.createReferenceIdObjectPath=function(e,t){var n={Id:e._nextId(),ObjectPathType:6,Name:t,ArgumentInfo:{}};return new h(n,null,!1,!1,1,4)},e.createChildItemObjectPathUsingIndexerOrGetItemAt=function(t,n,r,i,o){var a=Z.tryGetObjectIdFromLoadOrRetrieveResult(i);return t&&!Z.isNullOrUndefined(a)?e.createChildItemObjectPathUsingIndexer(n,r,i):e.createChildItemObjectPathUsingGetItemAt(n,r,i,o)},e.createChildItemObjectPathUsingIndexer=function(e,t,n){var r=Z.tryGetObjectIdFromLoadOrRetrieveResult(n),i=i={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return i.ArgumentInfo.Arguments=[r],new h(i,t._objectPath,!1,!1,1,4)},e.createChildItemObjectPathUsingGetItemAt=function(e,t,n,r){var i=n[H.index];i&&(r=i);var o={Id:e._nextId(),ObjectPathType:3,Name:H.getItemAt,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=[r],new h(o,t._objectPath,!1,!1,1,4)},e}();e.ObjectPathFactory=Q;var K=function(){function t(e){this.m_context=e}return t.prototype.executeAsync=function(n,r,i){var o=this,a=l.buildMessageArrayForIRequestExecutor(n,r,i,t.SourceLibHeaderValue);return new e.Promise((function(e,t){OSF.DDA.RichApi.executeRichApiRequestAsync(a,(function(t){var n;c.log("Response:"),c.log(JSON.stringify(t)),"succeeded"==t.status?n=l.buildResponseOnSuccess(l.getResponseBody(t),l.getResponseHeaders(t)):(n=l.buildResponseOnError(t.error.code,t.error.message),o.m_context._processOfficeJsErrorResponse(t.error.code,n)),e(n)}))}))},t.SourceLibHeaderValue="officejs",t}(),X=function(){function e(e){this._autoCleanupList={},this.m_context=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._addCommon(e,!0)})):this._addCommon(e,!0)},e.prototype._autoAdd=function(e){this._addCommon(e,!1),this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e},e.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(e,t){this.m_context._autoCleanup&&!e[H.isTracked]&&e!==this.m_context._rootObject&&t&&!Z.isNullOrEmptyString(t[H.referenceId])&&(this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e,e[H.isTracked]=!0)},e.prototype._addCommon=function(e,t){if(e[H.isTracked])t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id];else{var n=e[H.referenceId];if(e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName])throw Z.createRuntimeError(o.generalException,c._getResourceString($.objectIsUntracked),null);Z.isNullOrEmptyString(n)&&e._KeepReference&&(e._KeepReference(),w.createInstantiateAction(this.m_context,e),t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id],e[H.isTracked]=!0)}},e.prototype.remove=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._removeCommon(e)})):this._removeCommon(e)},e.prototype._removeCommon=function(e){e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName]=!0,e.context._pendingRequest._removeKeepReferenceAction(e._objectPath.objectPathInfo.Id);var t=e[H.referenceId];if(!Z.isNullOrEmptyString(t)){var n=this.m_context._rootObject;n._RemoveReference&&n._RemoveReference(t)}delete e[H.isTracked]},e.prototype._retrieveAndClearAutoCleanupList=function(){var e=this._autoCleanupList;return this._autoCleanupList={},e},e}();e.TrackedObjects=X;var Y=function(){function t(e,t,n,r,i){e||(e="root"),this.m_globalObjName=e,this.m_referencedObjectPaths=t,this.m_actions=n,this.m_statements=[],this.m_variableNameForObjectPathMap={},this.m_variableNameToObjectPathMap={},this.m_declaredObjectPathMap={},this.m_showDispose=r,this.m_removePII=i}return t.prototype.process=function(){this.m_showDispose&&W._calculateLastUsedObjectPathIds(this.m_actions);for(var e=0;e=0&&this.m_statements.length>t+5+1));n++);if(t<0)return null;var r=t-5;r<0&&(r=0);var i=t+1+5;i>this.m_statements.length&&(i=this.m_statements.length);var o=[];0!=r&&o.push("...");for(var a=r;a>>>>"),o.push(this.m_statements[t]),o.push("// <<<<<");for(var s=t+1;s0)return e+" // And then dispose {"+r.map((function(e){return n.getObjVarName(e)})).join(", ")+"}"}return e},t.prototype.buildQueryExpression=function(e){if(e.actionInfo.QueryInfo){var t={};return t.select=e.actionInfo.QueryInfo.Select,t.expand=e.actionInfo.QueryInfo.Expand,t.skip=e.actionInfo.QueryInfo.Skip,t.top=e.actionInfo.QueryInfo.Top,"undefined"===typeof t.top&&"undefined"===typeof t.skip&&"undefined"===typeof t.expand?"undefined"===typeof t.select?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(e){return(5==e.objectPathInfo.ObjectPathType||3==e.objectPathInfo.ObjectPathType||4==e.objectPathInfo.ObjectPathType)&&e.objectPathInfo.ParentObjectPathId?this.getObjVarName(e.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(e):this.buildObjectPathExpression(e)},t.prototype.buildObjectPathExpression=function(e){var t=this.buildObjectPathInfoExpression(e.objectPathInfo),n=e.originalObjectPathInfo;return n&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(n)+" */"),t},t.prototype.buildObjectPathInfoExpression=function(e){switch(e.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 3:return Z._toCamelLowerCase(e.Name)+"("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 2:return e.Name+".newObject()";case 7:return"null";case 4:return Z._toCamelLowerCase(e.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(e.Name)+")"}},t.prototype.buildArgumentsExpression=function(e){var t="";if(!e.Arguments||0===e.Arguments.length)return t;if(this.m_removePII)return"undefined"===typeof e.Arguments[0]?t:"...";for(var n=0;n0&&(t+=", "),t+=this.buildArgumentLiteral(e.Arguments[n],e.ReferencedObjectPathIds?e.ReferencedObjectPathIds[n]:null);return"undefined"===t&&(t=""),t},t.prototype.buildArgumentLiteral=function(e,t){return"number"==typeof e&&e===t?this.getObjVarName(t):JSON.stringify(e)},t.prototype.getObjVarNameBase=function(e){var t="v",n=this.m_referencedObjectPaths[e];if(n)switch(n.objectPathInfo.ObjectPathType){case 1:t=this.m_globalObjName;break;case 4:t=Z._toCamelLowerCase(n.objectPathInfo.Name);break;case 3:var r=n.objectPathInfo.Name;r.length>3&&"Get"===r.substr(0,3)&&(r=r.substr(3)),t=Z._toCamelLowerCase(r);break;case 5:var i=this.getObjVarNameBase(n.objectPathInfo.ParentObjectPathId);t="s"===i.charAt(i.length-1)?i.substr(0,i.length-1):i+"Item"}return t},t.prototype.getObjVarName=function(e){if(this.m_variableNameForObjectPathMap[e])return this.m_variableNameForObjectPathMap[e];var t=this.getObjVarNameBase(e);if(!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t;for(var n=1;this.m_variableNameToObjectPathMap[t+n.toString()];)n++;return t+=n.toString(),this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t},t}(),$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.cannotRegisterEvent="CannotRegisterEvent",t.connectionFailureWithStatus="ConnectionFailureWithStatus",t.connectionFailureWithDetails="ConnectionFailureWithDetails",t.propertyNotLoaded="PropertyNotLoaded",t.runMustReturnPromise="RunMustReturnPromise",t.moreInfoInnerError="MoreInfoInnerError",t.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",t.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",t.objectIsUntracked="ObjectIsUntracked",t.customFunctionDefintionMissing="CustomFunctionDefintionMissing",t.customFunctionImplementationMissing="CustomFunctionImplementationMissing",t.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",t.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",t.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",t.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",t.customFunctionInvalidFunction="CustomFunctionInvalidFunction",t.customFunctionInvalidFunctionMapping="CustomFunctionInvalidFunctionMapping",t.customFunctionWindowMissing="CustomFunctionWindowMissing",t.customFunctionDefintionMissingOnWindow="CustomFunctionDefintionMissingOnWindow",t.pendingBatchInProgress="PendingBatchInProgress",t.notInsideBatch="NotInsideBatch",t.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",t}(C);e.ResourceStrings=$,c.addResourceStringValues({CannotRegisterEvent:"The event handler cannot be registered.",PropertyNotLoaded:"The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",RunMustReturnPromise:'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',InvalidOrTimedOutSessionMessage:"Your Office Online session has expired or is invalid. To continue, refresh the page.",InvalidOperationInCellEditMode:"Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",InvalidSheetName:"The request cannot be processed because the specified worksheet cannot be found. Please try again.",CustomFunctionDefintionMissing:"A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.",CustomFunctionDefintionMissingOnWindow:"A property with the name '{0}' that represents the function's definition must exist on the window object.",CustomFunctionImplementationMissing:"The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",CustomFunctionNameContainsBadChars:"The function name may only contain letters, digits, underscores, and periods.",CustomFunctionNameCannotSplit:"The function name must contain a non-empty namespace and a non-empty short name.",CustomFunctionUnexpectedNumberOfEntriesInResultBatch:"The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",CustomFunctionCancellationHandlerMissing:"The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",CustomFunctionInvalidFunction:"The property with the name '{0}' that represents the function's definition is not a valid function.",CustomFunctionInvalidFunctionMapping:"The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.",CustomFunctionWindowMissing:"The window object was not found.",PendingBatchInProgress:"There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",NotInsideBatch:"Operations may not be invoked outside of a batch method.",CannotUpdateReadOnlyProperty:"The property '{0}' is read-only and it cannot be updated.",ObjectIsUntracked:"The object is untracked."});var Z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.fixObjectPathIfNecessary=function(e,t){e&&e._objectPath&&t&&e._objectPath.updateUsingObjectData(t,e)},n.load=function(e,t){return e.context.load(e,t),e},n.loadAndSync=function(e,t){return e.context.load(e,t),e.context.sync().then((function(){return e}))},n.retrieve=function(t,r){var i=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;i||(i=!n.isSetSupported("RichApiRuntime","1.1"));var o=new L(t,i);return t._retrieve(r,o),o},n.retrieveAndSync=function(e,t){var r=n.retrieve(e,t);return e.context.sync().then((function(){return r}))},n.toJson=function(e,t,r,i){var o={};for(var a in t){"undefined"!==typeof(s=t[a])&&(o[a]=s)}for(var a in r){var s;"undefined"!==typeof(s=r[a])&&(s[n.fieldName_isCollection]&&"undefined"!==typeof s[n.fieldName_m__items]?o[a]=s.toJSON().items:o[a]=s.toJSON())}return i&&(o.items=i.map((function(e){return e.toJSON()}))),o},n.throwError=function(e,t,n){throw new r.RuntimeError({code:e,httpStatusCode:400,message:c._getResourceString(e,t),debugInfo:n?{errorLocation:n}:void 0})},n.createRuntimeError=function(e,t,n,i,o){return new r.RuntimeError({code:e,httpStatusCode:i,message:t,debugInfo:{errorLocation:n},data:o})},n.throwIfNotLoaded=function(e,t,r,i){if(!i&&c.isUndefined(t)&&e.charCodeAt(0)!=n.s_underscoreCharCode&&!n.s_suppressPropertyNotLoadedException)throw n.createPropertyNotLoadedException(r,e)},n._getPropertyValueWithoutCheckLoaded=function(e,t){n.s_suppressPropertyNotLoadedException=!0;try{return e[t]}finally{n.s_suppressPropertyNotLoadedException=!1}},n.createPropertyNotLoadedException=function(e,t){return new r.RuntimeError({code:T.propertyNotLoaded,httpStatusCode:400,message:c._getResourceString($.propertyNotLoaded,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.createCannotUpdateReadOnlyPropertyException=function(e,t){return new r.RuntimeError({code:T.cannotUpdateReadOnlyProperty,httpStatusCode:400,message:c._getResourceString($.cannotUpdateReadOnlyProperty,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.promisify=function(t){return new e.Promise((function(e,n){t((function(t){"failed"==t.status?n(t.error):e(t.value)}))}))},n._addActionResultHandler=function(e,t,n){e.context._pendingRequest.addActionResultHandler(t,n)},n._handleNavigationPropertyResults=function(e,t,n){for(var r=0;r0;)e.push(0),n--},t.prototype.getString=function(e){return"number"===typeof e?e>0?this.m_strings[e-1]:null:e},t.prototype.buildEnumType=function(e){var t;if(Array.isArray(e)){(t={name:e[0],fields:e[2]}).fields||(t.fields={});var n=e[1];if(Array.isArray(n))for(var r=0;rn)return!1;return!0},t.prototype.evaluateEventType=function(t){if(Z.isNullOrEmptyString(t))return 0;if(this.isAllDigits(t))return parseInt(t);var n=this.resolveObjectByFullName(t);if("number"!==typeof n)throw new e.Error("Invalid event type: "+t);return n},t.prototype.buildPrototype=function(e,t){this.buildScalarProperties(e,t),this.buildNavigationProperties(e,t),this.buildScalarMethods(e,t),this.buildNavigationMethods(e,t),this.buildEvents(e,t),this.buildHandleResult(e,t),this.buildHandleIdResult(e,t),this.buildHandleRetrieveResult(e,t),this.buildLoad(e,t),this.buildRetrieve(e,t),this.buildSetMockData(e,t),this.buildEnsureUnchanged(e,t),this.buildUpdate(e,t),this.buildSet(e,t),this.buildToJSON(e,t),this.buildItems(e,t),this.buildTypeMetadataInfo(e,t),this.buildTrackUntrack(e,t),this.buildMixin(e,t)},t.prototype.toSimpleCamelUpperCase=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)},t.prototype.ensureOriginalName=function(e){null===e.originalName&&(e.originalName=this.toSimpleCamelUpperCase(e.name))},t.prototype.getFieldName=function(e){return"m_"+e.name},t.prototype.throwIfApiNotSupported=function(e,t){if(this.m_apiSets&&t.apiSetInfoOrdinal>0){var n=this.m_apiSets[t.apiSetInfoOrdinal-1];n&&Z.throwIfApiNotSupported(e.name+"."+t.name,n.name,n.version,this.m_hostName)}},t.prototype.buildScalarProperties=function(e,t){if(Array.isArray(t.scalarProperties))for(var n=0;n0){var n=this.m_apiSets[t-1];n&&(e=A.calculateApiFlags(e,n.name,n.version))}return e},t.prototype.buildScalarProperty=function(e,n,r){this.ensureOriginalName(r);var i=this,o=this.getFieldName(r),a={get:function(){return Z.throwIfNotLoaded(r.name,this[o],n.name,this._isNull),i.throwIfApiNotSupported(n,r),this[o]},enumerable:!0,configurable:!0};0===(2&r.behaviorFlags)&&(a.set=function(e){if(4&r.behaviorFlags&&i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName+"_Set").call(this,this,e).handled)return;this[o]=e;var a=i.calculateApiFlags(r.setMethodApiFlags,r.undoableApiSetInfoOrdinal);ee.invokeSetProperty(this,r.originalName,e,a)}),Object.defineProperty(e.prototype,r.name,a)},t.prototype.buildNavigationProperties=function(e,t){if(Array.isArray(t.navigationProperties))for(var n=0;n0){for(var o=0;o0){for(var o=0;o0&&(Object.defineProperty(e.prototype,"_scalarPropertyNames",{get:function(){return this.m__scalarPropertyNames||(this.m__scalarPropertyNames=t.scalarProperties.map((function(e){return e.name}))),this.m__scalarPropertyNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyOriginalNames",{get:function(){return this.m__scalarPropertyOriginalNames||(this.m__scalarPropertyOriginalNames=t.scalarProperties.map((function(e){return e.originalName}))),this.m__scalarPropertyOriginalNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyUpdateable",{get:function(){return this.m__scalarPropertyUpdateable||(this.m__scalarPropertyUpdateable=t.scalarProperties.map((function(e){return 0===(2&e.behaviorFlags)}))),this.m__scalarPropertyUpdateable},enumerable:!0,configurable:!0})),t.navigationProperties&&t.navigationProperties.length>0&&Object.defineProperty(e.prototype,"_navigationPropertyNames",{get:function(){return this.m__navigationPropertyNames||(this.m__navigationPropertyNames=t.navigationProperties.map((function(e){return e.name}))),this.m__navigationPropertyNames},enumerable:!0,configurable:!0})},t.prototype.buildTrackUntrack=function(e,t){2&t.behaviorFlags&&(e.prototype.track=function(){return this.context.trackedObjects.add(this),this},e.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this})},t.prototype.buildMixin=function(e,t){if(4&t.behaviorFlags){var n=this.getFunction(t.name+"Custom");Z.applyMixin(e,n)}},t.prototype.getOnEventName=function(e){return"_"===e[0]?"_on"+e.substr(1):"on"+e},t.prototype.buildEvents=function(e,t){if(t.events)for(var n=0;n0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)&&(n=!0);var r=document.createElement("a");if(r.href=this.m_url,this.m_options.webApplication){var i=ae.embeddingPageOrigin+"="+e+"&"+ae.embeddingPageSessionInfo+"="+this.m_options.sessionKey;0===r.search.length||"?"===r.search?r.search="?"+ae.sessionContext+"="+encodeURIComponent(i):r.search=r.search+"&"+ae.sessionContext+"="+encodeURIComponent(i)}else n?0===r.hash.length||"#"===r.hash?r.hash="#"+t:r.hash=r.hash+"&"+t:0===r.search.length||"?"===r.search?r.search="?"+t:r.search=r.search+"&"+t;return r.href},t.prototype.init=function(){var e=this;window.addEventListener("message",this.m_onMessageHandler);var t=this._getIFrameSrc();return c.createPromise((function(n,r){var i=document.createElement("iframe");if(e.m_options.id&&(i.id=e.m_options.id,i.name=e.m_options.id),i.style.height=e.m_options.height,i.style.width=e.m_options.width,e.m_options.webApplication){var s=document.createElement("form");s.setAttribute("action",t),s.setAttribute("method","post"),s.setAttribute("target",i.name),e.m_options.container.appendChild(s);var l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name","access_token"),l.setAttribute("value",e.m_options.webApplication.accessToken),s.appendChild(l);var u=document.createElement("input");u.setAttribute("type","hidden"),u.setAttribute("name","access_token_ttl"),u.setAttribute("value",e.m_options.webApplication.accessTokenTtl),s.appendChild(u),e.m_options.container.appendChild(i),s.submit()}else i.src=t,e.m_options.container.appendChild(i);e.m_timeoutId=window.setTimeout((function(){e.close();var t=Z.createRuntimeError(o.timeout,c._getResourceString(a.timeout),"EmbeddedSession.init");r(t)}),e.m_options.timeoutInMilliseconds),e.m_promiseResolver=n}))},t.prototype._invoke=function(e,t,n){this.m_enabled?(ie&&(n=ie(n)),this._sendMessageWithCallback(this.m_id++,e,n,(function(e){oe&&(e=oe(e));var n=e.Error;delete e.Error,t(n||0,e)}))):t(5001,null)},t.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler),window.clearTimeout(this.m_timeoutId),this.m_enabled=!1},t.prototype.getEventRegistration=function(e){return this.m_sessionEventManager||(this.m_sessionEventManager=new G(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},t.prototype._createRequestExecutorOrNull=function(){return new le(this)},t.prototype._resolveRequestUrlAndHeaderInfo=function(){return c._createPromiseFromResult(null)},t.prototype._registerEventImpl=function(e,t){var n=this;return c.createPromise((function(r,i){n._sendMessageWithCallback(n.m_id++,ne.RegisterEventCommand,{EventId:e,TargetId:t},(function(){r(null)}))}))},t.prototype._unregisterEventImpl=function(e,t){var n=this;return c.createPromise((function(r,i){n._sendMessageWithCallback(n.m_id++,ne.UnregisterEventCommand,{EventId:e,TargetId:t},(function(){r()}))}))},t.prototype._onMessage=function(e){var t=this;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===e.source&&this.m_chosenOrigin===e.origin)){var n=e.data;if(n&&n[ne.CommandKey]===ne.ApiReadyCommand)!this.m_chosenWindow&&this._isValidDescendant(e.source)&&n[ne.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=e.source,this.m_chosenOrigin=e.origin,this._sendMessageWithCallback(this.m_id++,ne.GetAppContextCommand,null,(function(e){t._setupContext(e),window.clearTimeout(t.m_timeoutId),t.m_promiseResolver()})));else if(n&&n[ne.CommandKey]===ne.FireEventCommand){var r=n[ne.ParamsKey],i=r.EventId,o=r.TargetId,a=r.Data;if(this.m_sessionEventManager)for(var s=this.m_sessionEventManager.getHandlers(i,o),l=0;l0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=2){var s=t[n].message[1];s&&(r=a(s)?JSON.parse(s):s)}"undefined"!==typeof OSF&&OSF.AppTelemetry&&OSF.AppTelemetry.CallOnAppActivatedIfPending&&OSF.AppTelemetry.CallOnAppActivatedIfPending(),o.apply(null,[r])}else OfficeExtension.Utility.log("ActionProxy._handleMessage unknown message type "+t[n].messageType)}catch(e){throw function(e){var t=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t}(e);OfficeExtension.Utility.log(t)}(e),e}return OfficeExtension.Utility._createPromiseFromResult(null)}function a(e){return"string"===typeof e&&"{"===e[0]}function s(){try{Microsoft.Office.WebExtension.onReadyInternal().then((function(){return function(){if("undefined"!==typeof OSF&&OSF.DDA&&OSF.DDA.RichApi&&OSF.DDA.RichApi.richApiMessageManager)return(new OfficeExtension.ClientRequestContext).eventRegistration.register(5,"",o)}()})).then((function(){var e=OSF._OfficeAppFactory.getHostInfo();return!0===e.isDialog||"web"===e.hostPlatform&&"word"!==e.hostType&&"excel"!==e.hostType?void 0:function(){var e=new OfficeExtension.ClientRequestContext,t=OfficeCore.AddinInternalService.newObject(e);return e._customData="WacPartition",t.notifyActionHandlerReady(),e.sync()}()}))}catch(e){}}!function(){OfficeExtension.Utility.log("ActionProxy.initOnce"),"undefined"!=typeof e.actions&&function(e){n=e}(e.actions._association),"undefined"!==typeof document&&(document.readyState&&"loading"!==document.readyState?(OfficeExtension.Utility.log("ActionProxy.initOnce: document.readyState is not loading state"),s()):document.addEventListener&&document.addEventListener("DOMContentLoaded",(function(){OfficeExtension.Utility.log("ActionProxy.initOnce: DOMContentLoaded event triggered"),s()}))),OfficeExtension.HostBridge.onInited((function(e){!function(e){e.addHostMessageHandler((function(e){3===e.type&&o(e.message)}))}(e)}))}()}(t||(t={}))}(Office||(Office={})),function(e){!function(e){function t(){var e=new OfficeCore.RequestContext;return"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e._customData="WacPartition"),e}e.areShortcutsInUse=function(e){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,a;return __generator(this,(function(s){switch(s.label){case 0:return n=t(),r=OfficeCore.ActionService.newObject(n),i=r.areShortcutsInUse(e),[4,n.sync()];case 1:for(s.sent(),o=[],a=0;a0&&Array.isArray(n[0])&&n.length*n[0].length>1500&&d()){var i=Math.max(1,Math.round(1500/n[0].length));e._ValidateArraySize(n.length,n[0].length);for(var o=0;on.length&&(a=n.length-o);var s=e.getRow(o).untrack().getBoundingRect(e.getRow(o+a-1).untrack()).untrack(),l=n.slice(o,o+a);E(s,t,l,null!=r?r:0)}return!0}return!1}function u(e){return OfficeExtension.Utility.isSetSupported("ExcelApi",e.toString())}function d(){return u(1.3)}function f(e){return!("undefined"===typeof window||!window.Office||!window.Office.context)&&window.Office.context.platform===e}e.icons={},["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"].map((function(t,n){var r=i(t);e.icons[r]=[],l[n].map((function(n,o){n=i(n);var a={set:t,index:o};e.icons[r].push(a),e.icons[r][n]=a}))})),function(e){e.NotStarted="notStarted",e.Running="running",e.Succeeded="succeeded",e.Failed="failed"}(o||(o={})),function(e){e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NoContent=204]="NoContent",e[e.HighestSuccessCode=299]="HighestSuccessCode",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout"}(a||(a={})),function(e){e.Close="Session.close",e.CommitChanges="Session.commitChanges",e.Create="Session.resolveRequestUrlAndHeaderInfo",e.Refresh="Session.refreshSession"}(s=e.SessionOperation||(e.SessionOperation={}));var p=function(){function e(e,t,n){var r=void 0===n?{}:n,i=r.persistChanges,o=void 0===i||i,a=r.commitExplicitly,s=void 0===a||a;this.m_requestId="",this.m_workbookUrl=e?this.ensureUrlFormatEndWithSlash(e):"",this.m_requestHeaders=t||{},this.m_persistChanges=o,this.m_commitExplicitly=s}return Object.defineProperty(e.prototype,"requestId",{get:function(){return this.m_requestId},enumerable:!0,configurable:!0}),e.prototype.close=function(){var t=this;if(this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)){var n={method:"POST",url:this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url)+e.CLOSE_SESSION,headers:this.m_requestUrlAndHeaderInfo.headers,body:""};return OfficeExtension.HttpUtility.sendRequest(n).then((function(n){if(n.statusCode!==a.NoContent)throw t.createErrorFromResponseInfo(n,s.Close);for(var r in t.m_requestUrlAndHeaderInfo=null,t.m_requestHeaders)if(r.toLowerCase()===e.WorkbookSessionIdHeaderNameLower){delete t.m_requestHeaders[r];break}}))}return OfficeExtension.Utility._createPromiseFromResult(null)},e.prototype.commitChanges=function(t){var n=this;if(void 0===t&&(t={}),!this.m_commitExplicitly)throw this.createError(a.InternalServerError,"Can not call commitChanges() if commitExplicitly is not set.",s.CommitChanges);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.CommitChanges);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.CommitChanges);var r=this.createCommitChangesRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(r).then((function(r){var i=r.statusCode;if(i===a.Accepted)return n.delay(e.POLL_DELAY).then((function(i){return n.pollResourceLocation(n.getHeaderIgnoreCase(r.headers,e.LOCATION_HEADER),s.CommitChanges,t)})).then((function(e){if(JSON.parse(e.body).status===o.Failed)throw n.createErrorFromResponseInfo(e,s.CommitChanges);return n.parseCooldownTime(e)}));if(i>=a.OK&&i<=a.HighestSuccessCode)return n.parseCooldownTime(r);throw n.createErrorFromResponseInfo(r,s.CommitChanges)}))},e.prototype._resolveRequestUrlAndHeaderInfo=function(t){var n=this;if(void 0===t&&(t={}),this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(this.getHeaderIgnoreCase(this.m_requestHeaders,e.WorkbookSessionIdHeaderNameLower))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);var r=this.createAsyncGraphSessionRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(r).then((function(r){if(n.m_requestId=n.getHeaderIgnoreCase(r.headers,e.REQUEST_ID_HEADER),r.statusCode!==a.Accepted&&r.statusCode!==a.Created)throw n.createErrorFromResponseInfo(r,s.Create);return r.statusCode===a.Created?(n.formatRequestUrlAndHeaderInfo(r),n.m_requestUrlAndHeaderInfo):n.delay(e.POLL_DELAY).then((function(i){return n.pollResourceLocation(n.getHeaderIgnoreCase(r.headers,e.LOCATION_HEADER),s.Create,t)})).then((function(r){var i=JSON.parse(r.body);if(i.status===o.Failed)throw n.createErrorFromResponseInfo(r,s.Create);var a={method:"GET",url:i.resourceLocation,headers:__assign({},t,{Authorization:n.getHeaderIgnoreCase(n.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(a).then((function(e){return n.formatRequestUrlAndHeaderInfo(e),n.m_requestUrlAndHeaderInfo}))}))}))},e.prototype.refreshSession=function(){var e=this;if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.Refresh);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.Refresh);var t=this.createRefreshSessionRequestInfo();return OfficeExtension.HttpUtility.sendRequest(t).then((function(t){if(t.statusCode!=a.NoContent)throw e.createErrorFromResponseInfo(t,s.Refresh);return OfficeExtension.Utility._createPromiseFromResult(null)}))},e.prototype.getHeaderIgnoreCase=function(e,t){var n=Object.keys(e).filter((function(e){return e.toLowerCase()===t.toLowerCase()}));return n.length>0?e[n[0]]:void 0},e.prototype.createCommitChangesRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.COMMIT_CHANGES,r={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,r),OfficeExtension.Utility._copyHeaders(t,r),r[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:r,body:{}}},e.prototype.createAsyncGraphSessionRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.CREATE_SESSION,r={};return OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,r),OfficeExtension.Utility._copyHeaders(t,r),r[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,r[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:r,body:{persistChanges:this.m_persistChanges,commitExplicitly:this.m_commitExplicitly}}},e.prototype.createRefreshSessionRequestInfo=function(){var t=this.getCorrectGraphVersionUrl()+e.REFRESH_SESSION,n={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,n),n[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,{url:t,method:"POST",headers:n,body:{}}},e.prototype.getCorrectGraphVersionUrl=function(){return this.m_workbookUrl.replace(new RegExp("graph.microsoft.com/.*?/"),"graph.microsoft.com/"+e.ASYNC_API_GRAPH_VERSION+"/")},e.prototype.pollResourceLocation=function(t,n,r,i){var s=this;if(void 0===r&&(r={}),void 0===i&&(i=0),i>=e.MAX_POLL_ATTEMPTS)throw this.createError(a.InternalServerError,"Timout while polling for the resource location.",n);var l={method:"GET",url:t,headers:__assign({},r,{Authorization:this.getHeaderIgnoreCase(this.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(l).then((function(l){if(l.statusCode!==a.OK)return s.pollResourceLocation(t,n,r,i+1);switch(JSON.parse(l.body).status){case o.Succeeded:case o.Failed:return l;case o.NotStarted:case o.Running:return s.delay(e.POLL_DELAY).then((function(e){return s.pollResourceLocation(t,n,r,i+1)}));default:throw s.createErrorFromResponseInfo(l,n)}}))},e.prototype.parseCooldownTime=function(t){var n=this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER);return n?1e3*parseInt(n):e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER},e.prototype.formatRequestUrlAndHeaderInfo=function(t){if(t.statusCode!==a.OK&&t.statusCode!==a.Created)throw this.createErrorFromResponseInfo(t,s.Create);var n=JSON.parse(t.body).id,r={};OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,r),r[e.WorkbookSessionIdHeaderName]=n,this.m_requestUrlAndHeaderInfo={url:this.getCorrectGraphVersionUrl(),headers:r}},e.prototype.ensureUrlFormatEndWithSlash=function(e){return"/"!==e.charAt(e.length-1)&&(e+="/"),e},e.prototype.delay=function(e){return new OfficeExtension.CoreUtility.Promise((function(t,n){return setTimeout((function(){return t()}),e)}))},e.prototype.createErrorFromResponseInfo=function(t,n){var r=OfficeExtension.Utility._parseErrorResponse(t),i={retryAfter:this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER),responseBody:OfficeExtension.Utility._parseErrorResponseBody(t)};return OfficeExtension.Utility.createRuntimeError(r.errorCode,r.errorMessage,n,t.statusCode,i)},e.prototype.createError=function(e,t,n){return OfficeExtension.Utility.createRuntimeError(""+e,t,n)},e.WorkbookSessionIdHeaderName="Workbook-Session-Id",e.WorkbookSessionIdHeaderNameLower="workbook-session-id",e.ASYNC_API_GRAPH_VERSION="beta",e.POLL_DELAY=1e4,e.MAX_POLL_ATTEMPTS=10,e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER=1e4,e.LOCATION_HEADER="location",e.AUTHORIZATION_HEADER="authorization",e.REQUEST_ID_HEADER="request-id",e.RETRY_AFTER_HEADER="retry-after",e.PREFER_HEADER="Prefer",e.PREFER_HEADER_VAL="respond-async",e.CONTENT_TYPE_HEADER="Content-Type",e.CONTENT_TYPE_HEADER_VAL="application/json",e.CLOSE_SESSION="closeSession",e.COMMIT_CHANGES="commitChanges",e.CREATE_SESSION="createSession",e.REFRESH_SESSION="refreshSession",e}();e.Session=p;var h=function(t){function n(n){var r=t.call(this,n)||this;return r.m_workbook=_(e.Workbook,r),r._rootObject=r.m_workbook,r._rootObjectPropertyName="workbook",r}return __extends(n,t),n.prototype._processOfficeJsErrorResponse=function(e,t){5004===e&&(t.ErrorCode=B.invalidOperationInCellEditMode,t.HttpStatusCode=400,t.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode))},Object.defineProperty(n.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"runtime",{get:function(){return this.workbook._Runtime},enumerable:!0,configurable:!0}),n}(OfficeCore.RequestContext);e.RequestContext=h;var g=function(){function e(){}return e.enableMacroRecordingEvent=function(e){OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=!0;var t=function(e){return e.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent]="true",e.workbook.onRecordingStateChangedEvent.add((function(e){return OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=e.recording,OfficeExtension.Utility._createPromiseFromResult(null)})),OfficeExtension.Utility._createPromiseFromResult(null)};return void 0!==e&&null!==e?t(e):y((function(e){return t(e)}))},e}();function m(e,t){var n=e;n.delayForCellEdit&&OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")?t._requestFlagModifier|=64:t._requestFlagModifier&=-65,n._makerSafe&&(t._requestFlagModifier|=1024)}function y(t,n){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,(function(t){return new e.RequestContext(t)}),m)}function v(e){var t={BindingColumnCount:e.bindingColumnCount,BindingId:e.bindingId,BindingRowCount:e.bindingRowCount,bindingType:e.bindingType,HasHeaders:e.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function O(e,t){var n;return n=null==e.headers?e.rows:e,void 0===(n=window.OSF.DDA.DataCoercion.coerceData(n,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]))?null:n}function b(e){if(!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version))return!1;var t=window.Office.context.diagnostics.platform.toLowerCase();if("officeonline"===t)return!1;var n=e[t];null==n&&(n=e.general);var r=window.Office.context.diagnostics.version,i=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(r);if(i){var o=parseInt(i[1]),a=parseInt(i[2]),s=parseInt(i[3]);if(o0?o=n.getOffsetRange(r,i):(o=n,a=r,s=i),1===Math.abs(t)?o:o.getBoundingRect(n.getOffsetRange(r*t+a,i*t+s))},t}();e.RangeCustom=M,function(t){t.Range_HandleResult=function(e,t){P(t.isEntireColumn)||(e.m_isEntireColumn=t.isEntireColumn),P(t.isEntireRow)||(e.m_isEntireRow=t.isEntireRow)},t.Range_GetColumnsAfter=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsAfter",n,t.getLastColumn(),0,1)})},t.Range_GetColumnsBefore=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsBefore",n,t.getColumn(0),0,-1)})},t.Range_GetResizedRange=function(e,t,n){return d()?{handled:!1,result:null}:(e._ensureInteger(t,"getResizedRange"),e._ensureInteger(n,"getResizedRange"),{handled:!0,result:(t>=0&&n>=0?e:e.getCell(0,0)).getBoundingRect(e.getLastCell().getOffsetRange(t,n))})},t.Range_GetRowsAbove=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getRowsAbove",n,t.getRow(0),-1,0)})},t.Range_GetRowsBelow=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:this._getAdjacentRange("getRowsBelow",n,t.getLastRow(),1,0)})},t.Range_Formulas_Set=function(e,t){return e.m_formulas=t,c(e,"Formulas",t)?{handled:!0}:{handled:!1}},t.Range_FormulasLocal_Set=function(e,t){return e.m_formulasLocal=t,c(e,"FormulasLocal",t)?{handled:!0}:{handled:!1}},t.Range_FormulasR1C1_Set=function(e,t){return e.m_formulasR1C1=t,c(e,"FormulasR1C1",t)?{handled:!0}:{handled:!1}},t.Range_NumberFormat_Set=function(e,t){return e.m_numberFormat=t,c(e,"NumberFormat",t,x(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_Values_Set=function(e,t){return e.m_values=t,c(e,"Values",t,x(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJson_Set=function(e,t){return e.m_valuesAsJson=t,c(e,"ValuesAsJson",t,x(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJsonLocal_Set=function(e,t){return e.m_valuesAsJsonLocal=t,c(e,"ValuesAsJsonLocal",t,x(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}}}(e._CC||(e._CC={})),function(t){t.SettingCollection_Add=function(n,r,i){return i=t._replaceDateWithStringDate(i),{handled:!0,result:C(e.Setting,n,"Add",0,[r,i],!1,!0,null,0)}},t.SettingCollection_SettingsChanged_EventArgsTransform=function(e,t){return{settings:e}}}(e._CC||(e._CC={})),function(e){function t(e){var t=JSON.stringify(e,(function(e,t){return this[e]instanceof Date?"Date("+this[e].getTime()+")":t}));return e=JSON.parse(t)}e._replaceDateWithStringDate=t,e.Setting_HandleResult=function(e,t){P(t.Value)||(t.Value=function(e){var t=JSON.stringify(e);return e=JSON.parse(t,(function(e,t){var n;return"string"===typeof t&&t&&t.length>6&&"Date("===t.slice(0,5)&&")"===t.slice(-1)&&(n=new Date(parseInt(t.slice(5,-1))))?n:t}))}(t.Value))},e.Setting_Value_Set=function(e,n){if(!F(n)){e.m_value=n;var r=t(n);return E(e,"Value",r,0),{handled:!0}}return{handled:!1}}}(e._CC||(e._CC={}));var w=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.NamedItemCollectionCustom=w,function(e){e.Binding_DataChanged_EventArgsTransform=function(e,t){return{binding:e}},e.Binding_SelectionChanged_EventArgsTransform=function(e,t){return{binding:e,columnCount:t.columnCount,rowCount:t.rowCount,startColumn:t.startColumn,startRow:t.startRow}}}(e._CC||(e._CC={}));var k=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.TableCollectionCustom=k,function(t){t.TableCollection_Changed_EventArgsTransform=function(t,n){var r,i=n;return null==i.valueBefore&&null==i.valueAfter||(r={valueBefore:i.valueBefore,valueAfter:i.valueAfter,valueTypeBefore:i.valueTypeBefore,valueTypeAfter:i.valueTypeAfter,valueAsJsonBefore:i.valueAsJsonBefore,valueAsJsonAfter:i.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:i.changeType,source:i.source,worksheetId:i.worksheetId,tableId:i.tableId,address:i.address,getRange:function(e){return I("TableChangedEventArgs.getRange",A,"1.8",S),e.workbook._GetRangeForEventByReferenceId(i.referenceId)},getRangeOrNullObject:function(e){return I("TableChangedEventArgs.getRangeOrNullObject",A,"1.8",S),e.workbook._GetRangeOrNullObjectForEventByReferenceId(i.referenceId)},details:r}}}(e._CC||(e._CC={})),function(t){t.Table_HandleIdResult=function(e,t){P(t.Id)||(t.Id=t.Id.toString())},t.Table_HandleResult=function(e,t){P(t.Id)||(t.Id=t.Id.toString())},t.Table_Changed_EventArgsTransform=function(t,n){var r,i=n;return null==i.valueBefore&&null==i.valueAfter||(r={valueBefore:i.valueBefore,valueAfter:i.valueAfter,valueTypeBefore:i.valueTypeBefore,valueTypeAfter:i.valueTypeAfter,valueAsJsonBefore:i.valueAsJsonBefore,valueAsJsonAfter:i.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:i.changeType,source:i.source,worksheetId:i.worksheetId,tableId:i.tableId,address:i.address,getRange:function(e){return I("TableChangedEventArgs.getRange",A,"1.8",S),e.workbook._GetRangeForEventByReferenceId(i.referenceId)},getRangeOrNullObject:function(e){return I("TableChangedEventArgs.getRangeOrNullObject",A,"1.8",S),e.workbook._GetRangeOrNullObjectForEventByReferenceId(i.referenceId)},details:r}},t.Table_SelectionChanged_EventArgsTransform=function(t,n){var r=n,i=!r.address||0===r.address.length;return{type:e.EventType.tableSelectionChanged,isInsideTable:!i,worksheetId:r.worksheetId,tableId:t.id,address:r.address}}}(e._CC||(e._CC={}));var N=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ChartCollectionCustom=N,function(t){t.ChartCollection_Add=function(t,n,r,i){if(!(r instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Charts.Add");return{handled:!1,result:null}}}(e._CC||(e._CC={})),function(t){t.Chart_SetData=function(t,n,r){if(!(n instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Chart.setData");return{handled:!1}}}(e._CC||(e._CC={}));var j=function(){function e(){}return e.prototype.load=function(e){return R(this,e),this},e}();e.ChartFillCustom=j;var U=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.VisualCollectionCustom=U,function(e){e.VisualCollection_AgaveVisualUpdate_EventArgsTransform=function(e,t){var n=t;return{type:n.type,payload:n.payload}}}(e._CC||(e._CC={})),function(t){t.Visual_ChangeNotification_EventArgsTransform=function(t,n){var r=n;return{targetId:r.targetId,changeType:r.changeType,payload:r.payload,type:e.EventType.visualChange}}}(e._CC||(e._CC={}));var L=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.PivotTableCollectionCustom=L,function(t){t.PivotLayout_GetColumnLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:C(e.Range,t,"GetColumnLabelRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataBodyRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:C(e.Range,t,"GetDataBodyRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataHierarchy=function(t,n){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:(I("PivotLayout.getDataHierarchy",A,"1.9",S),{handled:!0,result:C(e.DataPivotHierarchy,t,"GetDataHierarchy",0,[n],!1,!1,null,0)})},t.PivotLayout_GetFilterAxisRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:C(e.Range,t,"GetFilterAxisRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:C(e.Range,t,"GetRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRowLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:C(e.Range,t,"GetRowLabelRange",0,[],!1,!1,null,0)}}}(e._CC||(e._CC={})),function(e){e.PivotField_SortByLabels=function(e,t){return"string"===typeof t&&(t="ascending"===t.toLowerCase()),D(e,"SortByLabels",0,[t],0,0),{handled:!0}}}(e._CC||(e._CC={})),function(t){t.NumberFormattingService_GetFormatter=function(t,n){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(I("NumberFormatting.GetFormatter","NumberFormatting","1.1",S),{handled:!0,result:C(e.NumberFormatter,t,"GetFormatter",0,[n],!1,!1,null,0)})}}(e._CC||(e._CC={})),function(e){e.NumberFormatter_Format=function(e,t){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(I("NumberFormatter.Format","NumberFormatting","1.1",S),{handled:!0,result:D(e,"Format",0,[t],0,0)})}}(e._CC||(e._CC={}));var H=function(){function n(){}return n.register=function(n,r){return I("CustomFunctionManager.register","CustomFunctions","1.3",S),t({delayForCellEdit:!0},(function(t){return e.CustomFunctionManager.newObject(t).register(n,r)}))},n.getStatus=function(){return I("CustomFunctionManager.register","CustomFunctions","1.3",S),t({delayForCellEdit:!0},(function(t){var n=e.CustomFunctionManager.newObject(t).load("status");return t.sync().then((function(){return n.status}))}))},n}();e.CustomFunctionManagerCustom=H,function(e){e.CustomFunctionManager_StaticCustomize=function(e){e.register=H.register,e.getStatus=H.getStatus}}(e._CC||(e._CC={})),function(e){e.Style_TextOrientation_Set=function(e,t){return e.m_textOrientation=t,E(e,"Orientation",t,0),{handled:!0}}}(e._CC||(e._CC={})),function(e){e.InternalTest_Test1Event_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}},e.InternalTest_TestEvent_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}}}(e._CC||(e._CC={}));var W=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.CommentCollectionCustom=W;var B,V=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ShapeCollectionCustom=V,function(e){e.accessDenied="AccessDenied",e.apiNotFound="ApiNotFound",e.conflict="Conflict",e.emptyChartSeries="EmptyChartSeries",e.filteredRangeConflict="FilteredRangeConflict",e.formulaLengthExceedsLimit="FormulaLengthExceedsLimit",e.generalException="GeneralException",e.inactiveWorkbook="InactiveWorkbook",e.insertDeleteConflict="InsertDeleteConflict",e.invalidArgument="InvalidArgument",e.invalidBinding="InvalidBinding",e.invalidOperation="InvalidOperation",e.invalidReference="InvalidReference",e.invalidSelection="InvalidSelection",e.itemAlreadyExists="ItemAlreadyExists",e.itemNotFound="ItemNotFound",e.mergedRangeConflict="MergedRangeConflict",e.nonBlankCellOffSheet="NonBlankCellOffSheet",e.notImplemented="NotImplemented",e.openWorkbookLinksBlocked="OpenWorkbookLinksBlocked",e.operationCellsExceedLimit="OperationCellsExceedLimit",e.pivotTableRangeConflict="PivotTableRangeConflict",e.powerQueryRefreshResourceChallenge="PowerQueryRefreshResourceChallenge",e.rangeExceedsLimit="RangeExceedsLimit",e.refreshWorkbookLinksBlocked="RefreshWorkbookLinksBlocked",e.requestAborted="RequestAborted",e.responsePayloadSizeLimitExceeded="ResponsePayloadSizeLimitExceeded",e.unsupportedFeature="UnsupportedFeature",e.unsupportedFillType="UnsupportedFillType",e.unsupportedOperation="UnsupportedOperation",e.unsupportedSheet="UnsupportedSheet",e.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"}(B=e.ErrorCodes||(e.ErrorCodes={})),e.Interfaces||(e.Interfaces={});new OfficeExtension.LibraryBuilder({metadata:{version:"1.0.0",name:"Excel",defaultApiSetName:"ExcelApi",hostName:"Excel",apiSets:[["1.19","ExcelApiUndo"],["1.1","Recorder"],["99.9"],["1.4","ExcelApiUndo"],["1.8"],["1.9"],["1.11"],["1.18"],["1.6"],["1.6","ExcelApiUndo"],["1.7"],["1.1","ExcelApiUndo"],["1.2"],["1.3"],["1.4"],["1.5"],["1.10"],["1.14"],["1.1","ExcelApiOnline"],["1.1","CustomFunctions"],["1.1","WACOperationEvents"],["1.3","ExcelApiUndo"],["1.13"],["1.16"],["1.8","ExcelApiUndo"],["1.16","ExcelApiUndo"],["1.12"],["1.2","ExcelApiOnline"],["1.2","ExcelApiUndo"],["1.17"],["1.7","ExcelApiUndo"],["1.10","ExcelApiUndo"],["1.14","ExcelApiUndo"],["1.15","ExcelApiUndo"],["1.15"],["1.17","ExcelApiUndo"],["99.99","ExcelApiUndo"],["1.9","ExcelApiUndo"],["1.11","ExcelApiUndo"],["1.12","ExcelApiUndo"],["1.13","ExcelApiUndo"],["1.18","ExcelApiUndo"]],strings:[],enumTypes:[["UndoChangeType",["undoAction","redoAction","undoOrRedoCleared","undoGroupAdded"]],["SDX",["guidedReapply"]],["BusinessBarEntryType",[],{officeScriptsRunningStatus:0,msFormsDataSyncRunningStatus:1}],["FormulaReferenceStyle",["a1","r1C1"]],["NavigationObjectType",["table","pivotTable","chart","shape","namedRange"]],["UserActivityType",["none","insertSheet","deleteSheet","renameSheet","changeCell","insertRow","insertColumn","deleteRow","deleteColumn","insertPartialRow","insertPartialColumn","insertPartialColumnRightToLeft","deletePartialRow","deletePartialColumn","deletePartialColumnRightToLeft","move","sort","mergeCells","unmergeCells","unknownOperation","genericEdit"]],["LineageEndOfLogStatus",["loadInProgress","success","endOfLog","purged","trimmed","unsupported","cleared","error"]],["LineageLoadType",["new","next","previous","latest"]],["LoadToType",["connectionOnly","table","pivotTable","pivotChart"]],["QueryError",["unknown","none","failedLoadToWorksheet","failedLoadToDataModel","failedDownload","failedToCompleteDownload"]],["RangeOptimizationType",["other","numberFormat","textAlignment","textProperties","cellBorder","fillColor","sheetProtection","rowHeight","rowVisibility"]],["WorkbookLinksHardToFindMessages",["none","containsDefinedNames","hiddenOrVeryHiddenSheet","hiddenFloatingObjects","lockedFloatingObjectsThroughVba","protectedSheet","containsConditionalFormatting","containsDataValidation","hiddenRowsAndColumns"]],["WorkbookLinksIconState",["ok","moreInfo","warning"]],["WorkbookLinksRefreshSettings",["ask","always","never"]],["WorkbookConditionalFormattingRulesManagerScope",["defaultScope","selectedRange","activatedWorksheet","activatedTable","activatedPivotTable"]],["WorkbookLinksRefreshMode",["manual","automatic"]],["HelpTopic",["showChanges","guidedReapply","externalCodeServiceDiagnostics"]],["DocumentTaskChangeAction",[],{unknown:"unknown",create:"create",assign:"assign",unassign:"unassign",unassignAll:"unassignAll",setSchedule:"setSchedule",setPercentComplete:"setPercentComplete",setPriority:"setPriority",remove:"remove",restore:"restore",setTitle:"setTitle",undo:"undo"}],["DataSourceType",["unknown","cube","localRange","localTable","oledbDefault"]],["DateFilterCondition",["unknown","equals","before","beforeOrEqualTo","after","afterOrEqualTo","between","tomorrow","today","yesterday","nextWeek","thisWeek","lastWeek","nextMonth","thisMonth","lastMonth","nextQuarter","thisQuarter","lastQuarter","nextYear","thisYear","lastYear","yearToDate","allDatesInPeriodQuarter1","allDatesInPeriodQuarter2","allDatesInPeriodQuarter3","allDatesInPeriodQuarter4","allDatesInPeriodJanuary","allDatesInPeriodFebruary","allDatesInPeriodMarch","allDatesInPeriodApril","allDatesInPeriodMay","allDatesInPeriodJune","allDatesInPeriodJuly","allDatesInPeriodAugust","allDatesInPeriodSeptember","allDatesInPeriodOctober","allDatesInPeriodNovember","allDatesInPeriodDecember"]],["LabelFilterCondition",["unknown","equals","beginsWith","endsWith","contains","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between"]],["PivotFilterType",["unknown","value","manual","label","date"]],["TopBottomSelectionType",["items","percent","sum"]],["ValueFilterCondition",["unknown","equals","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between","topN","bottomN"]],["BuiltInPivotTableStyle",["none","light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","light22","light23","light24","light25","light26","light27","light28","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11","dark12","dark13","dark14","dark15","dark16","dark17","dark18","dark19","dark20","dark21","dark22","dark23","dark24","dark25","dark26","dark27","dark28"]],["BuiltInSlicerStyle",["light1","light2","light3","light4","light5","light6","other1","other2","dark1","dark2","dark3","dark4","dark5","dark6"]],["BuiltInTableStyle",["light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11"]],["ChartSeriesDimension",["categories","values","bubbleSizes"],{xvalues:"XValues",yvalues:"YValues"}],["PivotTableDateGroupBy",["invalid","bySeconds","byMinutes","byHours","byDays","byMonths","byQuarters","byYears"]],["PivotFilterTopBottomCriterion",["invalid","topItems","topPercent","topSum","bottomItems","bottomPercent","bottomSum"]],["SortBy",["ascending","descending"]],["AggregationFunction",["unknown","automatic","sum","count","average","max","min","product","countNumbers","standardDeviation","standardDeviationP","variance","varianceP"]],["ShowAsCalculation",["unknown","none","percentOfGrandTotal","percentOfRowTotal","percentOfColumnTotal","percentOfParentRowTotal","percentOfParentColumnTotal","percentOfParentTotal","percentOf","runningTotal","percentRunningTotal","differenceFrom","percentDifferenceFrom","rankAscending","rankDecending","index"]],["PivotAxis",["unknown","row","column","data","filter"]],["LinkedDataTypeRefreshMode",["unknown","manual","onLoad","periodic"]],["AxisType",["invalid","category","value","series"]],["AxisGroup",["primary","secondary"]],["AxisScaleType",["linear","logarithmic"]],["AxisCrosses",["automatic","maximum","minimum","custom"]],["AxisTickMark",["none","cross","inside","outside"]],["AxisTickLabelPosition",["nextToAxis","high","low","none"]],["TrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ChartAxisType",["invalid","category","value","series"]],["ChartAxisGroup",["primary","secondary"]],["ChartAxisScaleType",["linear","logarithmic"]],["ChartAxisPosition",["automatic","maximum","minimum","custom"]],["ChartAxisTickMark",["none","cross","inside","outside"]],["CalculationState",["done","calculating","pending"]],["ChartAxisTickLabelPosition",["nextToAxis","high","low","none"]],["ChartAxisDisplayUnit",["none","hundreds","thousands","tenThousands","hundredThousands","millions","tenMillions","hundredMillions","billions","trillions","custom"]],["ChartAxisTimeUnit",["days","months","years"]],["ChartBoxQuartileCalculation",["inclusive","exclusive"]],["ChartAxisCategoryType",["automatic","textAxis","dateAxis"]],["ChartBinType",["category","auto","binWidth","binCount"]],["ChartLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","grey25","grey50","grey75","automatic","roundDot"]],["ChartDataLabelPosition",["invalid","none","center","insideEnd","insideBase","outsideEnd","left","right","top","bottom","bestFit","callout"]],["ChartErrorBarsInclude",["both","minusValues","plusValues"]],["ChartErrorBarsType",["fixedValue","percent","stDev","stError","custom"]],["ChartMapAreaLevel",["automatic","dataOnly","city","county","state","country","continent","world"]],["ChartGradientStyle",["twoPhaseColor","threePhaseColor"]],["ChartGradientStyleType",["extremeValue","number","percent"]],["ChartTitlePosition",["automatic","top","bottom","left","right"]],["ChartLegendPosition",["invalid","top","bottom","left","right","corner","custom"]],["ChartMarkerStyle",["invalid","automatic","none","square","diamond","triangle","star","dot","dash","circle","plus","picture"],{x:"X"}],["ChartPlotAreaPosition",["automatic","custom"]],["ChartMapLabelStrategy",["none","bestFit","showAll"]],["ChartMapProjectionType",["automatic","mercator","miller","robinson","albers"]],["ChartParentLabelStrategy",["none","banner","overlapping"]],["ChartSeriesBy",["auto","columns","rows"]],["ChartDataSourceType",["localRange","externalRange","list","unknown"]],["ChartTextHorizontalAlignment",["center","left","right","justify","distributed"]],["ChartTextVerticalAlignment",["center","bottom","top","justify","distributed"]],["ChartTickLabelAlignment",["center","left","right"]],["ChartType",["invalid","columnClustered","columnStacked","columnStacked100","barClustered","barStacked","barStacked100","lineStacked","lineStacked100","lineMarkers","lineMarkersStacked","lineMarkersStacked100","pieOfPie","pieExploded","barOfPie","areaStacked","areaStacked100","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","line","pie","area","doughnut","radar","histogram","boxwhisker","pareto","regionMap","treemap","waterfall","sunburst","funnel"],{_3DColumnClustered:"3DColumnClustered",_3DColumnStacked:"3DColumnStacked",_3DColumnStacked100:"3DColumnStacked100",_3DBarClustered:"3DBarClustered",_3DBarStacked:"3DBarStacked",_3DBarStacked100:"3DBarStacked100",_3DPieExploded:"3DPieExploded",xyscatterSmooth:"XYScatterSmooth",xyscatterSmoothNoMarkers:"XYScatterSmoothNoMarkers",xyscatterLines:"XYScatterLines",xyscatterLinesNoMarkers:"XYScatterLinesNoMarkers",_3DAreaStacked:"3DAreaStacked",_3DAreaStacked100:"3DAreaStacked100",_3DColumn:"3DColumn",_3DLine:"3DLine",_3DPie:"3DPie",xyscatter:"XYScatter",_3DArea:"3DArea"}],["ChartUnderlineStyle",["none","single"]],["ChartDisplayBlanksAs",["notPlotted","zero","interplotted"]],["ChartPlotBy",["rows","columns"]],["ChartSplitType",["splitByPosition","splitByValue","splitByPercentValue","splitByCustomSplit"]],["ChartColorScheme",["colorfulPalette1","colorfulPalette2","colorfulPalette3","colorfulPalette4","monochromaticPalette1","monochromaticPalette2","monochromaticPalette3","monochromaticPalette4","monochromaticPalette5","monochromaticPalette6","monochromaticPalette7","monochromaticPalette8","monochromaticPalette9","monochromaticPalette10","monochromaticPalette11","monochromaticPalette12","monochromaticPalette13"]],["ChartTrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ShapeZOrder",["bringToFront","bringForward","sendToBack","sendBackward"]],["ShapeType",["unsupported","image","geometricShape","group","line"]],["ShapeScaleType",["currentSize","originalSize"]],["ShapeScaleFrom",["scaleFromTopLeft","scaleFromMiddle","scaleFromBottomRight"]],["ShapeFillType",["noFill","solid","gradient","pattern","pictureAndTexture","mixed"]],["ShapeFontUnderlineStyle",["none","single","double","heavy","dotted","dottedHeavy","dash","dashHeavy","dashLong","dashLongHeavy","dotDash","dotDashHeavy","dotDotDash","dotDotDashHeavy","wavy","wavyHeavy","wavyDouble"]],["PictureFormat",[],{unknown:"UNKNOWN",bmp:"BMP",jpeg:"JPEG",gif:"GIF",png:"PNG",svg:"SVG"}],["ShapeLineStyle",["single","thickBetweenThin","thickThin","thinThick","thinThin"]],["ShapeLineDashStyle",["dash","dashDot","dashDotDot","longDash","longDashDot","roundDot","solid","squareDot","longDashDotDot","systemDash","systemDot","systemDashDot"]],["ArrowheadLength",["short","medium","long"]],["ArrowheadStyle",["none","triangle","stealth","diamond","oval","open"]],["ArrowheadWidth",["narrow","medium","wide"]],["PremiumLicenseName",["python"]],["BindingType",["range","table","text"]],["BorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight","insideVertical","insideHorizontal","diagonalDown","diagonalUp"]],["BorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","double","slantDashDot"]],["BorderWeight",["hairline","thin","medium","thick"]],["CalculationMode",["automatic","automaticExceptTables","manual"]],["RuntimeCalculationMode",[],{undefined:0,automatic:1,automaticExceptTables:2,manual:3}],["CalculationType",["recalculate","full","fullRebuild"]],["ClearApplyTo",["all","formats","contents","hyperlinks","removeHyperlinks"]],["VisualCategory",["column","bar","line","area","pie","donut","scatter","bubble","statistical","stock","combo","hierarchy","surface","map","funnel","radar","waterfall","threeD","other"]],["VisualPropertyType",["object","collection","string","double","int","bool","enum","color"]],["VisualChangeType",["dataChange","propertyChange","genericChange","selectionChange"]],["BoolMetaPropertyType",["writeOnly","readOnly","hideEntireSubtreeUI","hideMeButShowChildrenUI","expandableUI","nextPropOnSameLine","hideLabel","showResetUI","hasOwnExpandableSection","nextPropOnSameLineFOTP","showResetUIFOTP","untransferable","ignoreDuringChangeChartType","notTriviallyUndoable","volatileEnum","exceptionCollection","metaOnly","showHideCollection","errorMessage","infoMessage"]],["ConditionalDataBarAxisFormat",["automatic","none","cellMidPoint"]],["ConditionalDataBarDirection",["context","leftToRight","rightToLeft"]],["ConditionalFormatDirection",["top","bottom"]],["ConditionalFormatType",["custom","dataBar","colorScale","iconSet","topBottom","presetCriteria","containsText","cellValue"]],["ConditionalFormatRuleType",["invalid","automatic","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalFormatIconRuleType",["invalid","number","percent","formula","percentile"]],["ConditionalFormatColorCriterionType",["invalid","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalTopBottomCriterionType",["invalid","topItems","topPercent","bottomItems","bottomPercent"]],["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"]],["ConditionalTextOperator",["invalid","contains","notContains","beginsWith","endsWith"]],["ConditionalCellValueOperator",["invalid","between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual"]],["ConditionalIconCriterionOperator",["invalid","greaterThan","greaterThanOrEqual"]],["ConditionalRangeBorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight"]],["ConditionalRangeBorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot"]],["ConditionalRangeFontUnderlineStyle",["none","single","double"]],["CustomFunctionType",["invalid","script","webService"]],["CustomFunctionMetadataFormat",["invalid","openApi"]],["DataValidationType",["none","wholeNumber","decimal","list","date","time","textLength","custom","inconsistent","mixedCriteria"]],["DataValidationOperator",["between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqualTo","lessThanOrEqualTo"]],["DataValidationAlertStyle",["stop","warning","information"]],["DeleteShiftDirection",["up","left"]],["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"]],["FilterDatetimeSpecificity",["year","month","day","hour","minute","second"]],["FilterOn",["bottomItems","bottomPercent","cellColor","dynamic","fontColor","values","topItems","topPercent","icon","custom"]],["FilterOperator",["and","or"]],["HorizontalAlignment",["general","left","center","right","fill","justify","centerAcrossSelection","distributed"]],["IconSet",["invalid","threeArrows","threeArrowsGray","threeFlags","threeTrafficLights1","threeTrafficLights2","threeSigns","threeSymbols","threeSymbols2","fourArrows","fourArrowsGray","fourRedToBlack","fourRating","fourTrafficLights","fiveArrows","fiveArrowsGray","fiveRating","fiveQuarters","threeStars","threeTriangles","fiveBoxes"]],["ImageFittingMode",["fit","fitAndCenter","fill"]],["InsertShiftDirection",["down","right"]],["NamedItemScope",["worksheet","workbook"]],["NamedItemType",["string","integer","double","boolean","range","error","array"]],["RangeUnderlineStyle",["none","single","double","singleAccountant","doubleAccountant"]],["SheetVisibility",["visible","hidden","veryHidden"]],["EventTriggerSource",["unknown","thisLocalAddin"]],["RangeValueType",["unknown","empty","string","integer","double","boolean","error","richValue"]],["KeyboardDirection",["left","right","up","down"]],["SearchDirection",["forward","backwards"]],["SortOrientation",["rows","columns"]],["SortOn",["value","cellColor","fontColor","icon"]],["SortDataOption",["normal","textAsNumber"]],["SortMethod",["pinYin","strokeCount"]],["VerticalAlignment",["top","center","bottom","justify","distributed"]],["MessageCategory",[],{none:0,customFunction:1,action:2,event:65536}],["MessageType",[],{none:0,testEvent:1,test1Event:2,worksheetDataChangedEvent:10,worksheetActivatedEvent:11,worksheetDeactivatedEvent:12,worksheetAddedEvent:13,worksheetSelectionChangedEvent:14,worksheetDeletedEvent:15,worksheetCalculatedEvent:16,worksheetFilteredEvent:17,worksheetFormatChangedEvent:18,worksheetRowSortedEvent:19,worksheetColumnSortedEvent:20,worksheetSingleClickedEvent:21,worksheetRowHiddenChangedEvent:22,worksheetFormulaChangedEvent:23,worksheetProtectionChangedEvent:24,worksheetNameChangedEvent:25,worksheetVisibilityChangedEvent:26,worksheetMovedEvent:27,worksheetNavigationObjectChangedEvent:28,worksheetRowHeightChangedEvent:29,workbookFormulaReferenceStyleChangedEvent:30,chartAddedEvent:50,chartActivatedEvent:51,chartDeactivatedEvent:52,chartDeletedEvent:53,tableSelectionChangedEvent:100,tableDataChangedEvent:101,tableAddedEvent:102,tableDeletedEvent:103,tableFilteredEvent:104,agaveVisualUpdateEvent:150,customFunctionExecutionBeginEvent:200,customFunctionExecutionEndEvent:201,commentAddedEvent:250,commentDeletedEvent:251,commentChangedEvent:252,invocationMessage:1e3,cancellationMessage:1001,metadataMessage:1002,visualSelectionChangedEvent:2e3,visualChangeEvent:2001,visualTrackerModelChangedEvent:2002,shapeSelectionChangedEvent:2100,shapeActivatedEvent:2101,shapeDeactivatedEvent:2102,shapeAddedEvent:2103,shapeDeletedEvent:2104,workbookAutoSaveSettingChangedEvent:2200,wacoperationEvent:2201,recordingStateChangedEvent:2202,workbookActivatedEvent:2203,workbookNavigationObjectChangedEvent:2204,ribbonCommandExecutedEvent:2300,linkedDataTypeRefreshRequestCompletedEvent:2500,linkedDataTypeRefreshModeChangedEvent:2501,linkedDataTypeLinkedDataTypeAddedEvent:2502,linkedWorkbookWorkbookLinksChangedEvent:2600,linkedWorkbookRefreshCompletedEvent:2601,rangePickerSelectionChangedEvent:2700,rangePickerDeactivatedEvent:2701,lineageActivityUpdateAvailableEvent:2800,lineageActivityFilterUpdatedEvent:2801,lineageActivityLoadCompletedEvent:2802,pivotTableAddedEvent:2900,pivotTableDeletedEvent:2901,namedItemAddedEvent:3e3,namedItemDeletedEvent:3001,guidedReapplyManagerUpdateAvailableEvent:3100,vbaRecorderRecordingChangedEvent:3200,vbaRecorderRecordingChanged2Event:3202,workbookActionRecordedEvent:3201,externalCodeServiceDiagnosticsNewEntryEvent:3300,externalCodeServiceDiagnosticsFilterUpdatedEvent:3301,rangeValuesPreviewDismissedEvent:3400,applicationUndoChangedEvent:3500,appRuntimeVisibilityChangedEvent:65539,beforeCloseNotifiactionCancelledEvent:65540,augmentationLoopAnnotationAddedEvent:65541}],["InsertDeleteCellsShiftDirection",["none","shiftCellLeft","shiftCellUp","shiftCellRight","shiftCellDown"]],["DocumentPropertyType",["number","boolean","date","string","float"]],["EventSource",["local","remote"]],["DataChangeType",["unknown","rangeEdited","rowInserted","rowDeleted","columnInserted","columnDeleted","cellInserted","cellDeleted"]],["RowHiddenChangeType",["unhidden","hidden"]],["CommentChangeType",["commentEdited","commentResolved","commentReopened","replyAdded","replyDeleted","replyEdited"]],["EventType",["worksheetChanged","worksheetSelectionChanged","worksheetAdded","worksheetActivated","worksheetDeactivated","tableChanged","tableSelectionChanged","worksheetDeleted","chartAdded","chartActivated","chartDeactivated","chartDeleted","worksheetCalculated","visualSelectionChanged","agaveVisualUpdate","tableAdded","tableDeleted","tableFiltered","worksheetFiltered","shapeActivated","shapeDeactivated","visualChange","workbookAutoSaveSettingChanged","worksheetFormatChanged","ribbonCommandExecuted","worksheetRowSorted","worksheetColumnSorted","worksheetSingleClicked","worksheetRowHiddenChanged","recordingStateChangedEvent","commentAdded","commentDeleted","commentChanged","linkedDataTypeRefreshRequestCompleted","linkedDataTypeRefreshModeChanged","linkedDataTypeLinkedDataTypeAdded","worksheetFormulaChanged","workbookActivated","linkedWorkbookWorkbookLinksChanged","linkedWorkbookRefreshCompleted","worksheetProtectionChanged","worksheetNameChanged","worksheetVisibilityChanged","worksheetMoved","lineageActivityUpdateAvailable","lineageActivityFilterUpdated","lineageActivityLoadCompleted","shapeAdded","shapeDeleted","pivotTableAdded","pivotTableDeleted","namedItemAdded","namedItemDeleted","worksheetNavigationObjectChanged","workbookNavigationObjectChanged","worksheetRowHeightChanged","workbookFormulaReferenceStyleChanged","guidedReapplyManagerUpdateAvailable","vbaRecorderRecordingChanged","rangeValuesPreviewDismissed","annotationAdded","workbookActionRecorded","applicationUndoChanged","vbaRecorderRecordingChanged2"],{wacoperationEvent:"WACOperationEvent"}],["DocumentPropertyItem",["title","subject","author","keywords","comments","template","lastAuth","revision","appName","lastPrint","creation","lastSave","category","format","manager","company"]],["SubtotalLocationType",["atTop","atBottom","off"]],["PivotLayoutType",["compact","tabular","outline"]],["ProtectionSelectionMode",["normal","unlocked","none"]],["PageOrientation",["portrait","landscape"]],["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"]],["ReadingOrder",["context","leftToRight","rightToLeft"]],["BuiltInStyle",["normal","comma","currency","percent","wholeComma","wholeDollar","hlink","hlinkTrav","note","warningText","emphasis1","emphasis2","emphasis3","sheetTitle","heading1","heading2","heading3","heading4","input","output","calculation","checkCell","linkedCell","total","good","bad","neutral","accent1","accent1_20","accent1_40","accent1_60","accent2","accent2_20","accent2_40","accent2_60","accent3","accent3_20","accent3_40","accent3_60","accent4","accent4_20","accent4_40","accent4_60","accent5","accent5_20","accent5_40","accent5_60","accent6","accent6_20","accent6_40","accent6_60","explanatoryText"]],["PrintErrorType",["asDisplayed","blank","dash","notAvailable"]],["WorksheetPositionType",["none","before","after","beginning","end"]],["PrintComments",["noComments","endSheet","inPlace"]],["PrintOrder",["downThenOver","overThenDown"]],["PrintMarginUnit",["points","inches","centimeters"]],["HeaderFooterState",["default","firstAndDefault","oddAndEven","firstOddAndEven"]],["AutoFillType",["fillDefault","fillCopy","fillSeries","fillFormats","fillValues","fillDays","fillWeekdays","fillMonths","fillYears","linearTrend","growthTrend","flashFill"]],["GroupOption",["byRows","byColumns"]],["RangeCopyType",["all","formulas","values","formats","link"]],["LinkedDataTypeState",["none","validLinkedData","disambiguationNeeded","brokenLinkedData","fetchingData"]],["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"]],["ConnectorType",["straight","elbow","curve"]],["ContentType",["plain","mention"]],["SpecialCellType",["conditionalFormats","dataValidations","blanks","constants","formulas","sameConditionalFormat","sameDataValidation","visible"]],["SpecialCellValueType",["all","errors","errorsLogical","errorsNumbers","errorsText","errorsLogicalNumber","errorsLogicalText","errorsNumberText","logical","logicalNumbers","logicalText","logicalNumbersText","numbers","numbersText","text"]],["Placement",["twoCell","oneCell","absolute"]],["FillPattern",["none","solid","gray50","gray75","gray25","horizontal","vertical","down","up","checker","semiGray75","lightHorizontal","lightVertical","lightDown","lightUp","grid","crissCross","gray16","gray8","linearGradient","rectangularGradient"]],["ShapeTextHorizontalAlignment",["left","center","right","justify","justifyLow","distributed","thaiDistributed"]],["ShapeTextVerticalAlignment",["top","middle","bottom","justified","distributed"]],["ShapeTextVerticalOverflow",["overflow","ellipsis","clip"]],["ShapeTextHorizontalOverflow",["overflow","clip"]],["ShapeTextReadingOrder",["leftToRight","rightToLeft"]],["ShapeTextOrientation",["horizontal","vertical","vertical270","wordArtVertical","eastAsianVertical","mongolianVertical","wordArtVerticalRTL"]],["ShapeAutoSize",["autoSizeNone","autoSizeTextToFitShape","autoSizeShapeToFitText","autoSizeMixed"]],["CloseBehavior",["save","skipSave"]],["SaveBehavior",["save","prompt"]],["SlicerSortType",["dataSourceOrder","ascending","descending"]],["RibbonTab",["others","home","insert","draw","pageLayout","formulas","data","review","view","developer","addIns","help"]],["NumberFormatCategory",["general","number","currency","accounting","date","time","percentage","fraction","scientific","text","special","custom"]]],clientObjectTypes:[["UndoScope",0,0,0,[["close",0,0,0,2],["open",1,0,0,2]]],["RangeValuesPreview",4,0,0,[["_RegisterEventDismissed",0,0,0,2,0,1],["_UnregisterEventDismissed",0,0,0,2,0,1],["dismiss",0,2,0,4],["show",3,2,0,4]],0,0,0,[["Dismissed",0,0,"MessageType.rangeValuesPreviewDismissedEvent","this._ParentObject.id","_RegisterEventDismissed","_UnregisterEventDismissed"]]],["AugmentationLoop",0,0,0,[["_RegisterAnnotationAddedEvent",0,2,0,4],["_UnregisterAnnotationAddedEvent",0,2,0,4],["activateAnnotation",1,2,0,4],["submitSignal",1,2,0,4]],0,0,0,[["AnnotationAdded",0,0,"MessageType.augmentationLoopAnnotationAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAnnotationAddedEvent","_UnregisterAnnotationAddedEvent"]]],["ExternalCodeService",0,0,[["diagnostics","ExternalCodeServiceDiagnostics",2,0,0,4]]],["ExternalCodeServiceDiagnostics",0,[["id",2]],0,[["_RegisterEventNewEntry",0,0,0,2,0,1],["_UnregisterEventNewEntry",0,0,0,2,0,1],["clear",0,2,0,4],["fireStoredEntries",0,2,0,4],["_RegisterEventFilterUpdated",0,0,0,2,0,1],["_UnregisterEventFilterUpdated",0,0,0,2,0,1]],0,0,0,[["FilterUpdated",0,0,"MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent","this.id","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["NewEntry",0,0,"MessageType.externalCodeServiceDiagnosticsNewEntryEvent","this.id","_RegisterEventNewEntry","_UnregisterEventNewEntry"]]],["VbaRecorder",0,[["id",2]],0,[["_RegisterEventRecordingChanged",0,0,0,2,0,1],["_UnregisterEventRecordingChanged",0,0,0,2,0,1],["_RegisterEventRecordingChanged2",0,2,2,4],["_UnregisterEventRecordingChanged2",0,2,2,4]],0,0,0,[["RecordingChanged",0,0,"MessageType.vbaRecorderRecordingChangedEvent","this.id","_RegisterEventRecordingChanged","_UnregisterEventRecordingChanged"],["RecordingChanged2",0,2,"MessageType.vbaRecorderRecordingChanged2Event","this.id","_RegisterEventRecordingChanged2","_UnregisterEventRecordingChanged2"]]],["WorksheetOptimizationScanResult",0,[["allocatedCells",2],["optimizableCells",2]],[["ranges","RangeOptimizationCollection",18,0,0,4]]],["UserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity"],["GuidedReapplyManager",0,0,[["activities","UserActivityCollection",18,0,0,4],["summaryCardUserActivity","SummaryCardUserActivity",2,0,0,4]],[["openSavedFile",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["discardActivites",0,2,0,4],["reapplyActivity",1,2,0,4],["saveActivities",0,2,0,4]],0,0,0,[["UpdateAvailable",0,0,"MessageType.guidedReapplyManagerUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["BusinessBar",0,0,0,[["hide",2],["show",2]]],["UserActivity",0,[["activityId",2],["activityType",2],["author",2],["createdDateTime",10],["guid",2],["rangeAddress",2],["sheetName",2],["valueChangeData",2],["authorEmail",2],["locationDeleted",2]],[["highlightRangeAreas","RangeAreas",2,0,0,4]]],["LineageActivityCollection",1,0,0,[["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["clear",0,2,0,4],["getCount",0,2,0,4],["getState",0,2,0,4],["loadActivities",1,2,0,4],["loadLatestActivities",0,2,0,4],["loadNextActivities",0,2,0,4],["loadPreviousActivities",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventFilterUpdated",0,2,0,4],["_RegisterEventLoadCompleted",0,2,0,4],["_UnregisterEventFilterUpdated",0,2,0,4],["_UnregisterEventLoadCompleted",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity",[["FilterUpdated",0,0,"MessageType.lineageActivityFilterUpdatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["LoadCompleted",0,0,"MessageType.lineageActivityLoadCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventLoadCompleted","_UnregisterEventLoadCompleted"],["UpdateAvailable",0,0,"MessageType.lineageActivityUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["SummaryItemUserActivity",0,[["activityType",2],["rangeAddresses",2],["sheetName",2],["valueChangeData",2]]],["SummaryItemUserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SummaryItemUserActivity",1,2,0,4]],0,"SummaryItemUserActivity"],["SummaryCardUserActivity",0,[["authors",2],["currentUser",2],["displayTime",10],["numberOfDetailedCard",2],["summaryUnviewableData",2]],[["summaryItemUserActivities","SummaryItemUserActivityCollection",18,0,0,4]]],["AllowEditRange",0,[["address",1],["isPasswordProtected",3],["title",1]],0,[["delete"],["pauseProtection",1],["setPassword",1]]],["AllowEditRangeCollection",1,0,0,[["add",3],["getCount",0,2,0,4],["pauseProtection",1]],[["getItem","AllowEditRange",1,18,0,4],["getItemAt","AllowEditRange",1,2,0,4],["getItemOrNullObject","AllowEditRange",1,2,0,4]],0,"AllowEditRange"],["Query",0,[["loadedTo",2],["loadedToDataModel",2],["name",2],["refreshDate",10],["rowsLoadedCount",2],["error",2]]],["QueryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Query",1,18,0,4]],0,"Query"],["VisualTracker",0,[["id",2]],0,[["_RegisterEventModelChanged",0,2],["_UnregisterEventModelChanged",0,2],["requestTrackingAlteration",2,2,0,4]],0,0,0,[["ModelChanged",0,0,"MessageType.visualTrackerModelChangedEvent","this.id","_RegisterEventModelChanged","_UnregisterEventModelChanged"]]],["NumberFormatProperty",0,[["key",3],["currency",3],["dateTime",3],["dateTimeHasDayOfWeek",3],["dateTimeHasMonth",3],["dateTimeHasYear",3],["numeric",3],["percent",3],["text",3]]],["NumberFormatPropertyCollection",1,0,0,0,[["getItemAt","NumberFormatProperty",1,2,0,4]],0,"NumberFormatProperty"],["RangeOptimization",0,[["optimizationTypes",2],["range",2]]],["RangeOptimizationCollection",1,[["allocatedCells",2],["optimizableCells",2]],0,[["getCount",0,2,0,4]],[["getItemAt","RangeOptimization",1,2,0,4]],0,"RangeOptimization"],["WorksheetOptimization",0,0,0,0,[["optimize","WorksheetOptimizationResult",0,0,0,2],["scan","RangeOptimizationCollection",0,6,0,4],["scanExtended","WorksheetOptimizationScanResult",0,2,0,4]]],["WorksheetOptimizationResult",0,[["allocatedCells",2],["optimizedCells",2]]],["LinkedWorkbook",0,[["displayUrl",2,3],["fileName",3,3],["id",2],["longErrorDescription",2,3],["refreshEnabled",2,3],["refreshing",2,3],["statusMessage",2,3],["excelIconState",2,3],["hardToFindErrorMessages",2,3],["lastUpdated",10,3]],0,[["_RegisterRefreshCompletedEvent",0,0,3,2,0,1],["_UnregisterRefreshCompletedEvent",0,0,3,2,0,1],["breakLinks"],["changeSource",1,0,3],["findNextLink",0,2,3,4],["openWorkbook",0,2,3,4],["refresh"],["openChangeSourceDialog",0,0,3],["closeChangeSourceDialog",0,0,3]],0,0,0,[["RefreshCompleted",0,3,"MessageType.linkedWorkbookRefreshCompletedEvent","this.id","_RegisterRefreshCompletedEvent","_UnregisterRefreshCompletedEvent"]]],["LinkedWorkbookCollection",1,[["breakAllLinksEnabled",0,3],["refreshAllEnabled",0,3],["workbookLinksRefreshMode"],["workbookLinksRefreshSettings",0,3],["containsNonWorkbookLinks",0,3]],0,[["_RegisterWorkbookLinksChangedEvent",0,2,3,4],["_UnregisterWorkbookLinksChangedEvent",0,2,3,4],["breakAllLinks"],["getCount",0,2,3,4],["refreshAll"],["openEditLinksDialog",0,2,3,4]],[["getItem","LinkedWorkbook",1,18,0,4],["getItemAt","LinkedWorkbook",1,2,3,4],["getItemOrNullObject","LinkedWorkbook",1]],0,"LinkedWorkbook",[["WorkbookLinksChanged",0,3,"MessageType.linkedWorkbookWorkbookLinksChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWorkbookLinksChangedEvent","_UnregisterWorkbookLinksChangedEvent"]]],["DocumentTaskChange",0,[["type",2],["changedBy",2],["commentId",2],["createdDateTime",10],["id",2],["assignee",2],["undoChangeId",2],["priority",2],["title",2],["percentComplete",2],["startDateTime",10],["dueDateTime",10]],0,0,0,0,0,0,"Microsoft.ExcelServices.DocumentTaskChange",4],["DocumentTaskChangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","DocumentTaskChange",1,2,0,4]],0,"DocumentTaskChange"],["RangePicker",0,0,0,[["activate",1,0,0,2,0,4],["deactivate",0,0,0,2,0,4],["updateSelection",1,0,0,2,0,4],["updateSelectionWithNavigation",4,0,0,2,0,4],["_RegisterEventSelectionChanged",0,0,0,2,0,4],["_UnregisterEventSelectionChanged",0,0,0,2,0,4],["_RegisterEventDeactivated",0,2,0,4],["_UnregisterEventDeactivated",0,2,0,4]],0,0,0,[["Deactivated",0,0,"MessageType.rangePickerDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventDeactivated","_UnregisterEventDeactivated"],["SelectionChanged",0,0,"MessageType.rangePickerSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventSelectionChanged","_UnregisterEventSelectionChanged"]]],["DocumentTask",0,[["startAndDueDateTime"],["id",2],["percentComplete"],["priority"],["title"],["assignees",2],["completedBy",2],["completedDateTime",10],["createdBy",2],["createdDateTime",10]],[["changes","DocumentTaskChangeCollection",18,0,0,4],["comment","Comment",2,0,0,4]],[["assign",1],["unassign",1],["unassignAll"]]],["DocumentTaskCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","DocumentTask",1,18,0,4],["getItemOrNullObject","DocumentTask",1,2,0,4],["getItemAt","DocumentTask",1,2,0,4]],0,"DocumentTask"],["DataConnection",0,[["connectionString",2],["name",2],["commandText",2],["dataSourceType",2]]],["Runtime",0,[["enableEvents",1,5]]],["Application",0,[["calculationMode",1],["calculationEngineVersion",3,6],["calculationState",3,6],["decimalSeparator",3,7],["thousandsSeparator",3,7],["useSystemSeparators",3,7],["formatStaleValues",1,8]],[["iterativeCalculation","IterativeCalculation",35,6,0,4],["ribbon","Ribbon",35,6,0,4],["cultureInfo","CultureInfo",3,7,0,4],["undoScope","UndoScope",3,3,0,4]],[["calculate",1],["suspendApiCalculationUntilNextSync",0,1,9,2,0,10],["suspendScreenUpdatingUntilNextSync",0,0,6,2,0,10],["hasLicense",1,2,8,4],["redo",0,0,3,2],["explorePremiumLicense",1,2,8,4],["undo",0,0,3,2],["_RegisterEventUndoChanged",0,2,3,4],["_UnregisterEventUndoChanged",0,2,3,4]],[["createWorkbook","WorkbookCreated",1,10,5,0,0,"_GetWorkbookCreatedById"],["_GetWorkbookCreatedById","WorkbookCreated",1,2,5,4]],0,0,[["UndoChanged",0,3,"MessageType.applicationUndoChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUndoChanged","_UnregisterEventUndoChanged"]]],["IterativeCalculation",0,[["enabled",1],["maxIteration",1],["maxChange",1]]],["Workbook",0,[["name",3,11],["readOnly",3,5],["isDirty",1,6],["use1904DateSystem",1,8],["chartDataPointTrack",1,6],["usePrecisionAsDisplayed",1,6],["calculationEngineVersion",3,6],["autoSave",3,6],["previouslySaved",3,6],["showPivotFieldList",0,8,0,2,12],["formulaReferenceStyle",2,3]],[["worksheets","WorksheetCollection",19,0,0,4],["names","NamedItemCollection",19,0,0,4],["tables","TableCollection",19,0,0,4],["application","Application",2,0,0,4],["bindings","BindingCollection",19,0,0,4],["functions","Functions",2,13,0,4],["_V1Api","_V1Api",2,14,0,4],["pivotTables","PivotTableCollection",19,14,0,4],["settings","SettingCollection",19,15,0,4],["customXmlParts","CustomXmlPartCollection",19,16,0,4],["internalTest","InternalTest",2,9,0,4],["properties","DocumentProperties",35,11,0,4],["styles","StyleCollection",19,11,0,4],["protection","WorkbookProtection",3,11,0,4],["dataConnections","DataConnectionCollection",3,11,0,4],["_Runtime","Runtime",2,16,0,4],["comments","CommentCollection",19,17,0,4],["slicers","SlicerCollection",19,17,0,4],["tableStyles","TableStyleCollection",19,17,0,4],["pivotTableStyles","PivotTableStyleCollection",19,17,0,4],["slicerStyles","SlicerStyleCollection",19,17,0,4],["timelineStyles","TimelineStyleCollection",19,17,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["linkedDataTypes","LinkedDataTypeCollection",18,8,0,4],["queries","QueryCollection",18,18,0,4],["linkedWorkbooks","LinkedWorkbookCollection",18,19,0,4],["rangePicker","RangePicker",2,8,0,4,0,4],["lineageActivities","LineageActivityCollection",18,3,0,4],["businessBar","BusinessBar",2,8,0,4],["guidedReapply","GuidedReapplyManager",2,3,0,4],["vbaRecorder","VbaRecorder",2,8,0,4],["externalCodeService","ExternalCodeService",2,8,0,4],["augmentationLoop","AugmentationLoop",2,8,0,4]],[["_RemoveReference",1,2],["_GetObjectByReferenceId",1,2,0,4],["_GetObjectTypeNameByReferenceId",1,2,0,4],["_RemoveAllReferences",0,2],["_GetReferenceCount",0,2,0,4],["getIsActiveCollabSession",0,0,6],["registerCustomFunctions",7,0,20,8],["_SetOsfControlContainerReadyForCustomFunctions",0,0,20],["close",1,0,7],["save",1,0,7],["_RegisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_UnregisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_RegisterWACOperationEvent",0,2,21,4],["_UnregisterWACOperationEvent",0,2,21,4],["_RegisterRecordingStateChangedEvent",0,0,21,2,0,22],["_UnregisterRecordingStateChangedEvent",0,0,21,2,0,22],["_RegisterActivatedEvent",0,2,23],["_UnregisterActivatedEvent",0,2,23],["insertWorksheetsFromBase64",2,0,23],["enableOfficeScriptRecording",1,1,19],["recordAction",1,3,0,4],["focus",0,2,3,4],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["showHelp",1,2,3,4],["getLinkedEntityCellValue",1,2,24,4],["getThemeColors",0,2,8,4],["_RegisterEventFormulaReferenceStyleChanged",0,2,3,4],["_UnregisterEventFormulaReferenceStyleChanged",0,2,3,4],["notifySDXLoaded",1,2,3,4],["openConditionalFormattingRulesManager",1,0,3],["openNameManager",0,0,3],["_RegisterEventActionRecorded",0,2,2,4],["_UnregisterEventActionRecorded",0,2,2,4]],[["getSelectedRange","Range",0,10,0,4],["getActiveCell","Range",0,10,11,4],["_GetRangeForEventByReferenceId","Range",1,2,0,4],["_GetRangeOrNullObjectForEventByReferenceId","Range",1,2,0,4],["getActiveChart","Chart",0,2,6,4],["getActiveChartOrNullObject","Chart",0,2,6,4],["getSelectedRanges","RangeAreas",0,10,6,4],["_GetRangesForEventByReferenceId","RangeAreas",1,2,6,4],["_GetRangesOrNullObjectForEventByReferenceId","RangeAreas",1,2,6,4],["getActiveSlicer","Slicer",0,2,17,4],["getActiveSlicerOrNullObject","Slicer",0,2,17,4]],0,0,[["ActionRecorded",0,2,"MessageType.workbookActionRecordedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventActionRecorded","_UnregisterEventActionRecorded"],["Activated",0,23,"MessageType.workbookActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["AutoSaveSettingChanged",0,6,"MessageType.workbookAutoSaveSettingChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAutoSaveSettingChangedEvent","_UnregisterAutoSaveSettingChangedEvent"],["FormulaReferenceStyleChanged",0,3,"MessageType.workbookFormulaReferenceStyleChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFormulaReferenceStyleChanged","_UnregisterEventFormulaReferenceStyleChanged"],["NavigationObjectChanged",0,3,"MessageType.workbookNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["RecordingStateChangedEvent",0,21,"MessageType.recordingStateChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRecordingStateChangedEvent","_UnregisterRecordingStateChangedEvent"],["SelectionChanged",3,14,"_CC.office10EventIdDocumentSelectionChangedEvent","","",""],["WACOperationEvent",2,21,"MessageType.wacoperationEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWACOperationEvent","_UnregisterWACOperationEvent"],["_Message",3,11,"_CC.office10EventIdRichApiMessageEvent","","",""]]],["WorkbookProtection",0,[["protected",3]],0,[["protect",1],["unprotect",1]]],["WorkbookCreated",0,[["id",3]],0,[["open",0,2,0,4]]],["Worksheet",0,[["name",1],["id",3],["position",1],["visibility",1],["tabColor",1,11,0,2,25],["standardWidth",1,11],["standardHeight",3,11],["showGridlines",5,5,0,2,26],["showHeadings",5,5],["enableCalculation",1,6],["tabId",3,18]],[["charts","ChartCollection",83,0,0,4],["tables","TableCollection",83,0,0,4],["protection","WorksheetProtection",3,13,0,4],["pivotTables","PivotTableCollection",83,14,0,4],["names","NamedItemCollection",83,15,0,4],["freezePanes","WorksheetFreezePanes",3,11,0,4],["pageLayout","PageLayout",35,6,0,4],["visuals","VisualCollection",83,17,0,4],["shapes","ShapeCollection",83,6,0,4],["horizontalPageBreaks","PageBreakCollection",19,6,0,4],["verticalPageBreaks","PageBreakCollection",19,6,0,4],["autoFilter","AutoFilter",3,6,0,4],["slicers","SlicerCollection",19,17,0,4],["comments","CommentCollection",83,17,0,4],["customProperties","WorksheetCustomPropertyCollection",19,27,0,4],["namedSheetViews","NamedSheetViewCollection",18,19,0,4],["optimization","WorksheetOptimization",2,8,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["visualTracker","VisualTracker",2,28,0,4],["rangeValuesPreview","RangeValuesPreview",66,8,0,4]],[["delete"],["activate",0,2],["calculate",1,0,9],["_RegisterDataChangedEvent",0,0,11,2,0,10],["_UnregisterDataChangedEvent",0,0,11,2,0,10],["_RegisterActivatedEvent",0,0,11,2,0,1],["_UnregisterActivatedEvent",0,0,11,2,0,1],["_RegisterDeactivatedEvent",0,0,11,2,0,1],["_UnregisterDeactivatedEvent",0,0,11,2,0,1],["_RegisterSelectionChangedEvent",0,0,11,2,0,29],["_UnregisterSelectionChangedEvent",0,0,11,2,0,29],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["replaceAll",3,0,6],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,0,17,2,0,1],["_UnregisterRowSortedEvent",0,0,17,2,0,1],["_RegisterColumnSortedEvent",0,0,17,2,0,1],["_UnregisterColumnSortedEvent",0,0,17,2,0,1],["_RegisterSingleClickedEvent",0,0,17,2,0,1],["_UnregisterSingleClickedEvent",0,0,17,2,0,1],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["showOutlineLevels",2,0,17],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,0,30,2,0,1],["_RegisterEventVisibilityChanged",0,0,30,2,0,1],["_UnregisterEventNameChanged",0,0,30,2,0,1],["_UnregisterEventVisibilityChanged",0,0,30,2,0,1],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getRange","Range",1,10,0,4],["getUsedRange","Range",1,10,0,4],["getCell","Range",2,10,0,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getRangeByIndexes","Range",4,10,11,4],["getPrevious","Worksheet",1,10,16,4,0,"_GetSheetById"],["getPreviousOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNext","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNextOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["_GetSheetById","Worksheet",1,2,11,4],["copy","Worksheet",2,0,11,0,0,"_GetAnotherWorksheetById"],["_GetAnotherWorksheetById","Worksheet",1,0,11],["findAll","RangeAreas",2,10,6,4],["findAllOrNullObject","RangeAreas",2,10,6,4],["getRanges","RangeAreas",1,10,6,4],["getUsedRangeAreas","RangeAreas",1,0,3],["getRangeR1C1","Range",1,2,3,4],["getRangesR1C1","RangeAreas",1,2,3,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,0,3]],"workbook.worksheets",0,[["Activated",0,11,"MessageType.worksheetActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","this.id","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,11,"MessageType.worksheetDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","this.id","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","this.id","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","this.id","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","this.id","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["NavigationObjectChanged",0,3,"MessageType.worksheetNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","this.id","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","this.id","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","this.id","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","this.id","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,11,"MessageType.worksheetSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","this.id","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","this.id","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetCollection",1,0,0,[["getCount",1,2,15,4],["_RegisterAddedEvent",0,3,11],["_UnregisterAddedEvent",0,3,11],["_RegisterActivatedEvent",0,3,11],["_UnregisterActivatedEvent",0,0,11,2,0,29],["_RegisterDeactivatedEvent",0,0,11,2,0,29],["_UnregisterDeactivatedEvent",0,0,11,2,0,29],["_RegisterDeletedEvent",0,3,11],["_UnregisterDeletedEvent",0,3,11],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["_RegisterDataChangedEvent",0,3,6],["_UnregisterDataChangedEvent",0,3,6],["_RegisterSelectionChangedEvent",0,0,6,2,0,29],["_UnregisterSelectionChangedEvent",0,0,6,2,0,29],["addFromBase64",4,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,3,17],["_UnregisterRowSortedEvent",0,3,17],["_RegisterColumnSortedEvent",0,3,17],["_UnregisterColumnSortedEvent",0,3,17],["_RegisterSingleClickedEvent",0,0,17,2,0,29],["_UnregisterSingleClickedEvent",0,0,17,2,0,29],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,2,30,4],["_RegisterEventVisibilityChanged",0,2,30,4],["_UnregisterEventNameChanged",0,2,30,4],["_UnregisterEventVisibilityChanged",0,2,30,4],["_RegisterEventMoved",0,0,30,2,0,1],["_UnregisterEventMoved",0,0,30,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getItem","Worksheet",1,18,0,4],["add","Worksheet",1,8,0,2,0,0,29],["getActiveWorksheet","Worksheet",0,2,0,4],["getItemOrNullObject","Worksheet",1,2,15,4],["getFirst","Worksheet",1,10,16,4],["getLast","Worksheet",1,10,16,4]],0,"Worksheet",[["Activated",0,11,"MessageType.worksheetActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,11,"MessageType.worksheetAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,6,"MessageType.worksheetDataChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,11,"MessageType.worksheetDeletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["Moved",0,30,"MessageType.worksheetMovedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventMoved","_UnregisterEventMoved"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,6,"MessageType.worksheetSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetProtection",0,[["protected",3],["options",3],["canPauseProtection",3,19],["isPasswordProtected",3,19],["isPaused",3,19],["savedOptions",3,19]],[["allowEditRanges","AllowEditRangeCollection",19,19,0,4]],[["protect",2,1],["unprotect",1],["checkPassword",1,2,19,4],["pauseProtection",1,0,19],["resumeProtection",0,0,19],["setPassword",1,0,19],["updateOptions",1,0,19]]],["WorksheetFreezePanes",0,0,0,[["unfreeze"],["freezeAt",1],["freezeRows",1],["freezeColumns",1]],[["getLocation","Range",0,10,0,4],["getLocationOrNullObject","Range",0,10,0,4]]],["Range",14,[["numberFormat",5,0,0,2,31],["numberFormatLocal",1,11,0,2,31],["values",5,0,0,2,31],["text",3],["formulas",5,0,0,2,32],["formulasLocal",5,0,0,2,32],["rowIndex",3],["columnIndex",3],["rowCount",3],["columnCount",3],["address",3],["addressLocal",3],["cellCount",3],["_ReferenceId",2],["valueTypes",3],["formulasR1C1",5,13],["hidden",3,13],["rowHidden",1,13,0,2,32],["columnHidden",1,13,0,2,32],["isEntireColumn",3,11],["isEntireRow",3,11],["hyperlink",1,11,0,2,33],["style",1,11,0,2,32],["linkedDataTypeState",3,6],["hasSpill",3,27],["top",3,17],["left",3,17],["height",3,17],["width",3,17],["savedAsArray",3,27],["numberFormatCategories",3,27],["valuesAsJson",5,24],["valuesAsJsonLocal",5,24],["addressR1C1",2,3]],[["format","RangeFormat",35,0,0,4],["worksheet","Worksheet",2,0,0,4],["sort","RangeSort",3,13,0,4],["conditionalFormats","ConditionalFormatCollection",19,9,0,4],["dataValidation","DataValidation",35,5,0,4]],[["clear",1,0,0,2,0,32],["delete",1,0,0,2,0,34],["select",0,2],["_KeepReference",0,2],["merge",1,0,13,2,0,32],["unmerge",0,0,13],["_ValidateArraySize",2,2,14,4],["calculate",0,0,9],["showCard",0,0,11],["getImage",0,2,11,4],["replaceAll",3,0,6,2,0,32],["copyFrom",4,0,6,2,0,26],["convertToLinkedDataType",2,0,6],["convertDataTypeToText",0,0,6],["setDirty",0,0,6],["getCellProperties",1,0,6],["getRowProperties",1,0,6],["getColumnProperties",1,0,6],["setCellProperties",1,0,6],["setRowProperties",1,0,6],["setColumnProperties",1,0,6],["autoFill",2,0,6],["showTeachingCallout",2,0,6],["flashFill",0,0,6],["group",1,0,17],["ungroup",1,0,17],["showGroupDetails",1,0,17],["hideGroupDetails",1,0,17],["moveTo",1,0,7,2,0,26],["getDataClassificationIds",0,2,19,4]],[["getCell","Range",2,10,0,4],["getUsedRange","Range",1,10,0,4],["insert","Range",1,8,0,2,0,0,34],["getEntireColumn","Range",0,10,0,4],["getEntireRow","Range",0,10,0,4],["getOffsetRange","Range",2,10,0,4],["getRow","Range",1,10,0,4],["getColumn","Range",1,10,0,4],["getIntersection","Range",1,10,0,4],["getBoundingRect","Range",1,10,0,4],["getLastCell","Range",0,10,0,4],["getLastColumn","Range",0,10,0,4],["getLastRow","Range",0,10,0,4],["getIntersectionOrNullObject","Range",1,10,15,4],["getRowsAbove","Range",1,11,14,4],["getRowsBelow","Range",1,11,14,4],["getColumnsBefore","Range",1,11,14,4],["getColumnsAfter","Range",1,11,14,4],["getResizedRange","Range",2,11,14,4],["getVisibleView","RangeView",0,2,14,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getSurroundingRegion","Range",0,10,11,4],["getAbsoluteResizedRange","Range",2,10,11,4],["getTables","TableScopedCollection",1,6,6,4],["find","Range",2,10,6,4],["findOrNullObject","Range",2,10,6,4],["removeDuplicates","RemoveDuplicatesResult",2,8,6,2,0,0,33],["getSpecialCells","RangeAreas",2,10,6,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,6,4],["getSpillingToRange","Range",0,10,27,4],["getSpillParent","Range",0,10,27,4],["getSpillingToRangeOrNullObject","Range",0,10,27,4],["getSpillParentOrNullObject","Range",0,10,27,4],["getMergedAreas","RangeAreas",0,10,19,4],["getPivotTables","PivotTableScopedCollection",1,6,27,4],["getPrecedents","WorkbookRangeAreas",0,10,18,4],["getDirectPrecedents","WorkbookRangeAreas",0,10,27,4],["getDependents","WorkbookRangeAreas",0,10,35,4],["getDirectDependents","WorkbookRangeAreas",0,10,23,4],["getExtendedRange","Range",2,10,23,4],["getRangeEdge","Range",2,10,23,4],["getNumberFormatProperties","NumberFormatPropertyCollection",0,6,8,4],["getSurroundingDataRegion","Range",0,2,8,4],["getMergedAreasOrNullObject","RangeAreas",0,0,23,2,0,0,31]]],["RangeAreas",2,[["_ReferenceId",2],["address",3],["addressLocal",3],["areaCount",3],["cellCount",3],["isEntireColumn",3],["isEntireRow",3],["style",1],["addressR1C1",2,3]],[["areas","RangeCollection",19,0,0,4],["conditionalFormats","ConditionalFormatCollection",19,0,0,4],["format","RangeFormat",35,0,0,4],["dataValidation","DataValidation",35,0,0,4],["worksheet","Worksheet",2,0,0,4]],[["_KeepReference",0,2],["calculate"],["clear",1],["setDirty"],["copyFrom",4],["convertToLinkedDataType",2],["convertDataTypeToText"],["select",0,2,8]],[["getEntireColumn","RangeAreas",0,10,0,4],["getEntireRow","RangeAreas",0,10,0,4],["getIntersection","RangeAreas",1,10,0,4],["getIntersectionOrNullObject","RangeAreas",1,10,0,4],["getOffsetRangeAreas","RangeAreas",2,10,0,4],["getUsedRangeAreas","RangeAreas",1,10,0,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,10,0,4],["getTables","TableScopedCollection",1,6,0,4],["getSpecialCells","RangeAreas",2,10,0,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,0,4]]],["WorkbookRangeAreas",2,[["_ReferenceId",2],["addresses",3]],[["ranges","RangeCollection",19,0,0,4],["areas","RangeAreasCollection",19,0,0,4]],[["_KeepReference",0,2]],[["getRangeAreasBySheet","RangeAreas",1,10,0,4],["getRangeAreasOrNullObjectBySheet","RangeAreas",1,10,0,4]]],["RangeView",0,[["numberFormat",1],["values",1],["text",3],["formulas",1],["formulasLocal",1],["formulasR1C1",1],["valueTypes",3],["rowCount",3],["columnCount",3],["cellAddresses",3],["index",3],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["rows","RangeViewCollection",19,0,0,4]],0,[["getRange","Range",0,10,0,4]]],["RangeViewCollection",1,0,0,[["getCount",0,2,15,4]],[["getItemAt","RangeView",1,2,0,4]],0,"RangeView"],["SettingCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Setting",1,18,0,4],["add","Setting",2,9],["getItemOrNullObject","Setting",1,2,0,4]],0,"Setting",[["SettingsChanged",3,0,"_CC.office10EventIdSettingsChangedEvent","","",""]]],["Setting",8,[["key",3],["value",5],["_Id",2]],0,[["delete"]]],["NamedItemCollection",5,0,0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","NamedItem",1,18,0,4],["getItemOrNullObject","NamedItem",1,2,15,4],["add","NamedItem",3,8,15],["addFormulaLocal","NamedItem",3,0,15]],0,"NamedItem",[["Added",0,3,"MessageType.namedItemAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.namedItemDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["NamedItem",0,[["name",3],["type",3],["value",3],["visible",1],["_Id",2],["comment",1,15],["scope",3,15],["formula",1,11],["valueAsJson",3,24],["valueAsJsonLocal",3,24]],[["worksheet","Worksheet",2,15,0,4],["worksheetOrNullObject","Worksheet",2,15,0,4],["arrayValues","NamedItemArrayValues",3,11,0,4]],[["delete",0,0,15]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,15,4]]],["NamedItemArrayValues",0,[["values",3],["types",3],["valuesAsJson",3,24],["valuesAsJsonLocal",3,24]]],["Binding",0,[["id",3],["type",3]],0,[["getText",0,2,0,4],["delete",0,0,14]],[["getTable","Table",0,2,0,4],["getRange","Range",0,2,0,4]],0,0,[["DataChanged",3,14,"_CC.office10EventIdBindingDataChangedEvent","this.id","",""],["SelectionChanged",3,14,"_CC.office10EventIdBindingSelectionChangedEvent","this.id","",""]]],["BindingCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","Binding",1,18,0,4],["getItemAt","Binding",1,2,0,4],["add","Binding",3,8,14],["addFromNamedItem","Binding",3,0,14],["addFromSelection","Binding",2,0,14],["getItemOrNullObject","Binding",1,2,15,4]],0,"Binding"],["TableCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["_RegisterAddedEvent",0,0,6,2,0,1],["_UnregisterAddedEvent",0,0,6,2,0,1],["_RegisterDeletedEvent",0,0,6,2,0,1],["_UnregisterDeletedEvent",0,0,6,2,0,1],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1]],[["getItem","Table",1,18,0,4],["getItemAt","Table",1,2,0,4],["add","Table",2,8,0,2,0,0,33],["getItemOrNullObject","Table",1,2,15,4],["addQueryTable","Table",2,0,8]],0,"Table",[["Added",0,6,"MessageType.tableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",2,11,"MessageType.tableDataChangedEvent","this._eventTargetId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Deleted",0,6,"MessageType.tableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this._eventTargetId","_RegisterFilteredEvent","_UnregisterFilteredEvent"]]],["TableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getFirst","Table",0,10,0,4],["getItem","Table",1,18,0,4],["getItemOrNullObject","Table",1,2,18,4]],0,"Table"],["Table",24,[["id",3],["name",1,0,0,2,26],["showHeaders",1,0,0,2,33],["showTotals",1,0,0,2,33],["style",1,0,0,2,33],["highlightFirstColumn",1,14,0,2,33],["highlightLastColumn",1,14,0,2,33],["showBandedRows",1,14,0,2,33],["showBandedColumns",1,14,0,2,33],["showFilterButton",1,14,0,2,33],["legacyId",3,5]],[["columns","TableColumnCollection",19,0,0,4],["rows","TableRowCollection",19,0,0,4],["sort","TableSort",3,13,0,4],["worksheet","Worksheet",2,13,0,4],["autoFilter","AutoFilter",3,6,0,4],["tableStyle","TableStyle",35,8,0,4]],[["delete",0,0,0,2,0,26],["clearFilters",0,0,13],["reapplyFilters",0,0,13,2,0,26],["_RegisterSelectionChangedEvent",0,0,11,2,0,1],["_UnregisterSelectionChangedEvent",0,0,11,2,0,1],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["clearStyle",0,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["resize",1,0,23,2,0,26],["setStyle",1,0,8]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4],["convertToRange","Range",0,8,13,2,0,0,26]],"workbook.tables",0,[["Changed",2,11,"MessageType.tableDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["SelectionChanged",2,11,"MessageType.tableSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["TableColumnCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","TableColumn",1,18,0,4],["getItemAt","TableColumn",1,2,0,4],["add","TableColumn",3,8,0,2,0,0,34],["getItemOrNullObject","TableColumn",1,2,15,4],["addAsJson","TableColumn",3,0,24]],0,"TableColumn"],["TableColumn",0,[["id",3],["index",3],["values",1],["name",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["filter","Filter",3,13,0,4]],[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4]]],["TableRowCollection",1,[["count",3]],0,[["getCount",0,2,15,4],["deleteRows",1,0,19],["deleteRowsAt",2,0,19,2,0,26]],[["getItemAt","TableRow",1,2,0,4],["add","TableRow",3,8,0,2,0,0,34],["addAsJson","TableRow",3,0,24]],0,"TableRow"],["TableRow",0,[["index",3],["values",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],0,[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4]]],["DataValidation",0,[["type",3],["rule",1],["prompt",1],["errorAlert",1],["ignoreBlanks",1],["valid",3]],0,[["clear"]],[["getInvalidCells","RangeAreas",0,10,6,4],["getInvalidCellsOrNullObject","RangeAreas",0,10,6,4]]],["RemoveDuplicatesResult",0,[["removed",3],["uniqueRemaining",3]]],["RangeFormat",0,[["wrapText",1,0,0,2,32],["horizontalAlignment",1,0,0,2,32],["verticalAlignment",1,0,0,2,32],["columnWidth",1,13,0,2,32],["rowHeight",1,13,0,2,32],["textOrientation",1,11,0,2,32],["useStandardHeight",1,11],["useStandardWidth",1,11],["readingOrder",1,6],["shrinkToFit",1,6],["indentLevel",1,6,0,2,32],["autoIndent",1,6]],[["fill","RangeFill",35,0,0,4],["font","RangeFont",35,0,0,4],["borders","RangeBorderCollection",51,0,0,4],["protection","FormatProtection",35,13,0,4]],[["autofitColumns",0,0,13,2,0,32],["autofitRows",0,0,13,2,0,32],["adjustIndent",1,0,7,2,0,34]]],["FormatProtection",0,[["locked",1],["formulaHidden",1]]],["RangeFill",0,[["color",1,0,0,2,32],["tintAndShade",1,6],["patternTintAndShade",1,6],["pattern",1,6],["patternColor",1,6]],0,[["clear",0,0,0,2,0,32]]],["RangeBorder",0,[["sideIndex",3],["style",1,0,0,2,32],["weight",1,0,0,2,32],["color",1,0,0,2,32],["tintAndShade",1,6]]],["RangeBorderCollection",1,[["count",3],["tintAndShade",1,6]],0,0,[["getItem","RangeBorder",1,18,0,4],["getItemAt","RangeBorder",1,2,0,4]],0,"RangeBorder"],["RangeFont",0,[["name",1,0,0,2,32],["size",1,0,0,2,32],["color",1,0,0,2,12],["italic",1,0,0,2,32],["bold",1,0,0,2,32],["underline",1,0,0,2,32],["strikethrough",1,6,0,2,32],["subscript",1,6],["superscript",1,6],["tintAndShade",1,6]]],["ChartCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,5,2,0,1],["_UnregisterAddedEvent",0,0,5,2,0,1],["_RegisterActivatedEvent",0,0,5,2,0,29],["_UnregisterActivatedEvent",0,0,5,2,0,29],["_RegisterDeactivatedEvent",0,0,5,2,0,29],["_UnregisterDeactivatedEvent",0,0,5,2,0,29],["_RegisterDeletedEvent",0,0,5,2,0,29],["_UnregisterDeletedEvent",0,0,5,2,0,29]],[["add","Chart",3,9,0,2,0,0,36],["getItemAt","Chart",1,2,0,4],["_GetItem","Chart",1,18,0,4],["getItem","Chart",1,2,0,4],["getItemOrNullObject","Chart",1,2,15,4]],0,"Chart",[["Activated",0,5,"MessageType.chartActivatedEvent","this._ParentObject.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,5,"MessageType.chartAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this._ParentObject.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,5,"MessageType.chartDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Chart",0,[["name",1,0,0,2,37],["top",1,0,0,2,36],["left",1,0,0,2,36],["width",1,0,0,2,36],["height",1,0,0,2,36],["id",3,11],["showAllFieldButtons",1,11,0,2,36],["chartType",1,11,0,2,37],["showDataLabelsOverMaximum",1,5,0,2,37],["categoryLabelLevel",1,5,0,2,37],["style",1,5,0,2,37],["displayBlanksAs",1,5,0,2,37],["plotBy",1,5,0,2,37],["plotVisibleOnly",1,5,0,2,37],["seriesNameLevel",1,5,0,2,37]],[["title","ChartTitle",35,0,0,4],["dataLabels","ChartDataLabels",35,0,0,4],["legend","ChartLegend",35,0,0,4],["series","ChartSeriesCollection",19,0,0,4],["axes","ChartAxes",35,0,0,4],["format","ChartAreaFormat",35,0,0,4],["worksheet","Worksheet",2,13,0,4],["plotArea","ChartPlotArea",35,5,0,4],["pivotOptions","ChartPivotOptions",35,6,0,4]],[["setData",2,1,0,2,0,36],["delete",0,0,0,2,0,36],["setPosition",2,0,0,2,0,36],["getImage",3,2,13,4],["_RegisterActivatedEvent",0,0,5,2,0,1],["_UnregisterActivatedEvent",0,0,5,2,0,1],["_RegisterDeactivatedEvent",0,0,5,2,0,1],["_UnregisterDeactivatedEvent",0,0,5,2,0,1],["activate",0,2,6],["getDataRange",0,0,28],["getDataRangeOrNullObject",0,0,28]],[["getDataTable","ChartDataTable",0,2,18,4],["getDataTableOrNullObject","ChartDataTable",0,2,18,4]],0,0,[["Activated",0,5,"MessageType.chartActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["ChartPivotOptions",0,[["showAxisFieldButtons",1,0,0,2,37],["showLegendFieldButtons",1,0,0,2,37],["showReportFilterFieldButtons",1,0,0,2,37],["showValueFieldButtons",1,0,0,2,37]]],["ChartAreaFormat",0,[["roundedCorners",1,6,0,2,37],["colorScheme",1,6,0,2,37]],[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartSeriesCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartSeries",1,2,0,4],["add","ChartSeries",2,8,11,2,0,0,36]],0,"ChartSeries"],["ChartSeries",0,[["name",1,0,0,2,36],["chartType",1,11,0,2,10],["hasDataLabels",1,11,0,2,37],["filtered",1,11,0,2,37],["markerSize",1,11,0,2,36],["markerStyle",1,11,0,2,36],["showShadow",1,11,0,2,37],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36],["smooth",1,11,0,2,37],["plotOrder",1,11,0,2,37],["gapWidth",1,11,0,2,36],["doughnutHoleSize",1,11,0,2,36],["axisGroup",1,5,0,2,36],["explosion",1,5,0,2,37],["firstSliceAngle",1,5,0,2,37],["invertIfNegative",1,5,0,2,37],["bubbleScale",1,6,0,2,37],["secondPlotSize",1,5,0,2,37],["splitType",1,5,0,2,37],["splitValue",1,6,0,2,37],["varyByCategories",1,5,0,2,37],["showLeaderLines",1,6,0,2,37],["overlap",1,5,0,2,36],["gradientStyle",1,6,0,2,37],["gradientMinimumType",1,6,0,2,37],["gradientMidpointType",1,6,0,2,37],["gradientMaximumType",1,6,0,2,37],["gradientMinimumValue",1,6,0,2,37],["gradientMidpointValue",1,6,0,2,37],["gradientMaximumValue",1,6,0,2,37],["gradientMinimumColor",1,6,0,2,37],["gradientMidpointColor",1,6,0,2,37],["gradientMaximumColor",1,6,0,2,37],["parentLabelStrategy",1,6,0,2,37],["showConnectorLines",1,6,0,2,37],["invertColor",1,6,0,2,37]],[["points","ChartPointsCollection",19,0,0,4],["format","ChartSeriesFormat",35,0,0,4],["trendlines","ChartTrendlineCollection",19,11,0,4],["xErrorBars","ChartErrorBars",35,6,0,4],["yErrorBars","ChartErrorBars",35,6,0,4],["dataLabels","ChartDataLabels",35,5,0,4],["binOptions","ChartBinOptions",35,6,0,4],["mapOptions","ChartMapOptions",35,6,0,4],["boxwhiskerOptions","ChartBoxwhiskerOptions",35,6,0,4]],[["delete",0,0,11,2,0,36],["setXAxisValues",1,0,11,2,0,36],["setValues",1,0,11,2,0,36],["setBubbleSizes",1,0,11,2,0,37],["getDimensionValues",1,0,27,2,0,37],["getDimensionDataSourceString",1,0,35],["getDimensionDataSourceType",1,0,35]]],["ChartSeriesFormat",0,0,[["fill","ChartFill",3,0,0,4],["line","ChartLineFormat",35,0,0,4]]],["ChartPointsCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartPoint",1,2,0,4]],0,"ChartPoint"],["ChartPoint",0,[["value",3],["hasDataLabel",1,11,0,2,37],["markerStyle",1,11,0,2,36],["markerSize",1,11,0,2,36],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36]],[["format","ChartPointFormat",35,0,0,4],["dataLabel","ChartDataLabel",35,11,0,4]]],["ChartPointFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartAxes",0,0,[["categoryAxis","ChartAxis",35,0,0,4],["seriesAxis","ChartAxis",35,0,0,4],["valueAxis","ChartAxis",35,0,0,4]],0,[["getItem","ChartAxis",2,2,11,4]]],["ChartAxis",0,[["majorUnit",1,0,0,2,37],["maximum",1,0,0,2,36],["minimum",1,0,0,2,36],["minorUnit",1,0,0,2,37],["displayUnit",1,11,0,2,36],["showDisplayUnitLabel",1,11,0,2,37],["customDisplayUnit",3,11],["type",3,11],["minorTimeUnitScale",1,11,0,2,37],["majorTimeUnitScale",1,11,0,2,37],["baseTimeUnit",1,11,0,2,37],["categoryType",1,11,0,2,37],["axisGroup",3,11],["scaleType",1,11,0,2,37],["logBase",1,11,0,2,37],["left",3,11],["top",3,11],["height",3,11],["width",3,11],["reversePlotOrder",1,11,0,2,36],["crosses",1,11,0,2,36],["crossesAt",3,11],["visible",1,11,0,2,37],["isBetweenCategories",1,5,0,2,36],["majorTickMark",1,11,0,2,37],["minorTickMark",1,11,0,2,37],["tickMarkSpacing",1,11,0,2,37],["tickLabelPosition",1,11,0,2,36],["tickLabelSpacing",1,11,0,2,37],["alignment",1,5,0,2,37],["multiLevel",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["offset",1,5,0,2,37],["textOrientation",1,5,0,2,37],["position",1,5,0,2,36],["positionAt",3,5]],[["majorGridlines","ChartGridlines",35,0,0,4],["minorGridlines","ChartGridlines",35,0,0,4],["title","ChartAxisTitle",35,0,0,4],["format","ChartAxisFormat",35,0,0,4]],[["setCategoryNames",1,0,11,2,0,37],["setCustomDisplayUnit",1,0,11,2,0,37],["setCrossesAt",1,0,11,2,0,37],["setPositionAt",1,0,5,2,0,37]]],["ChartAxisFormat",0,0,[["font","ChartFont",35,0,0,4],["line","ChartLineFormat",35,0,0,4],["fill","ChartFill",3,5,0,4]]],["ChartAxisTitle",0,[["text",1,0,0,2,36],["visible",1,0,0,2,37],["textOrientation",1,27,0,2,37]],[["format","ChartAxisTitleFormat",35,0,0,4]],[["setFormula",1,0,5,2,0,37]]],["ChartAxisTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,5,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataLabels",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["textOrientation",1,5,0,2,37],["autoText",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["showAsDataCallout",3,8,0,2,37],["geometricShapeType",1,8,0,2,37]],[["format","ChartDataLabelFormat",35,0,0,4]]],["ChartDataLabel",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["top",1,5,0,2,37],["left",1,5,0,2,37],["width",3,5],["height",3,5],["formula",1,5,0,2,37],["textOrientation",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["text",1,5,0,2,37],["autoText",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["geometricShapeType",1,8,0,2,37],["showAsDataCallout",3,8,0,2,37]],[["format","ChartDataLabelFormat",35,5,0,4]],0,[["getSubstring","ChartFormatString",2,2,8,4]]],["ChartDataLabelFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataTable",0,[["visible",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showHorizontalBorder",1,0,0,2,37],["showVerticalBorder",1,0,0,2,37],["showOutlineBorder",1,0,0,2,37]],[["format","ChartDataTableFormat",35,0,0,4]]],["ChartDataTableFormat",0,0,[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,0,0,4]]],["ChartErrorBars",0,[["endStyleCap",1,0,0,2,37],["include",1,0,0,2,37],["type",1,0,0,2,37],["visible",1,0,0,2,37]],[["format","ChartErrorBarsFormat",35,0,0,4]]],["ChartErrorBarsFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartGridlines",0,[["visible",1,0,0,2,36]],[["format","ChartGridlinesFormat",35,0,0,4]]],["ChartGridlinesFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartLegend",0,[["visible",1,0,0,2,36],["position",1,0,0,2,36],["overlay",1,0,0,2,37],["left",1,11,0,2,37],["top",1,11,0,2,37],["width",1,11,0,2,37],["height",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartLegendFormat",35,0,0,4],["legendEntries","ChartLegendEntryCollection",19,11,0,4]]],["ChartLegendEntry",0,[["visible",1,0,0,2,37],["left",3,5],["top",3,5],["width",3,5],["height",3,5],["index",3,5]]],["ChartLegendEntryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","ChartLegendEntry",1,2,0,4]],0,"ChartLegendEntry"],["ChartLegendFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartMapOptions",0,[["level",1,0,0,2,37],["labelStrategy",1,0,0,2,37],["projectionType",1,0,0,2,37]]],["ChartTitle",0,[["visible",1,0,0,2,37],["text",1,0,0,2,36],["overlay",1,0,0,2,37],["horizontalAlignment",1,11,0,2,37],["top",1,11,0,2,37],["left",1,11,0,2,37],["width",3,11],["height",3,11],["verticalAlignment",1,11,0,2,37],["textOrientation",1,11,0,2,37],["position",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartTitleFormat",35,0,0,4]],[["setFormula",1,0,11,2,0,37]],[["getSubstring","ChartFormatString",2,2,11,4]]],["ChartFormatString",0,0,[["font","ChartFont",35,0,0,4]]],["ChartTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartFill",4,0,0,[["setSolidColor",1,0,0,2,0,36],["clear",0,0,0,2,0,37],["getSolidColor",0,0,24,2,0,37]]],["ChartBorder",0,[["color",1,0,0,2,36],["lineStyle",1,0,0,2,36],["weight",1,0,0,2,36]],0,[["clear",0,0,5,2,0,37]]],["ChartBinOptions",0,[["type",1,0,0,2,36],["width",1,0,0,2,36],["count",1,0,0,2,36],["allowOverflow",1,0,0,2,37],["allowUnderflow",1,0,0,2,37],["overflowValue",1,0,0,2,36],["underflowValue",1,0,0,2,36]]],["ChartBoxwhiskerOptions",0,[["showInnerPoints",1,0,0,2,37],["showOutlierPoints",1,0,0,2,37],["showMeanMarker",1,0,0,2,37],["showMeanLine",1,0,0,2,37],["quartileCalculation",1,0,0,2,37]]],["ChartLineFormat",0,[["color",1,0,0,2,36],["lineStyle",1,11,0,2,36],["weight",1,11,0,2,36]],0,[["clear",0,0,0,2,0,37]]],["ChartFont",0,[["bold",1,0,0,2,37],["color",1,0,0,2,36],["italic",1,0,0,2,37],["name",1,0,0,2,37],["size",1,0,0,2,37],["underline",1,0,0,2,37]]],["ChartTrendline",0,[["type",1,0,0,2,37],["polynomialOrder",1,0,0,2,37],["movingAveragePeriod",1,0,0,2,37],["_Id",2],["showEquation",1,5,0,2,37],["showRSquared",1,5,0,2,37],["forwardPeriod",1,5,0,2,37],["backwardPeriod",1,5,0,2,37],["name",1,0,0,2,37],["intercept",1,0,0,2,37]],[["format","ChartTrendlineFormat",35,0,0,4],["label","ChartTrendlineLabel",35,5,0,4]],[["delete",0,0,0,2,0,37]]],["ChartTrendlineCollection",1,0,0,[["getCount",0,2,0,4]],[["add","ChartTrendline",1,8,0,2,0,0,36],["getItem","ChartTrendline",1,18,0,4]],0,"ChartTrendline"],["ChartTrendlineFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartTrendlineLabel",0,[["top",1,0,0,2,37],["left",1,0,0,2,37],["width",3],["height",3],["formula",1,0,0,2,37],["textOrientation",1,0,0,2,37],["horizontalAlignment",1,0,0,2,37],["verticalAlignment",1,0,0,2,37],["text",1,0,0,2,37],["autoText",1,0,0,2,37],["numberFormat",1,0,0,2,37],["linkNumberFormat",1,6,0,2,37]],[["format","ChartTrendlineLabelFormat",35,0,0,4]]],["ChartTrendlineLabelFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,0,0,4],["font","ChartFont",35,0,0,4]]],["ChartPlotArea",0,[["left",1,0,0,2,37],["top",1,0,0,2,37],["width",1,0,0,2,37],["height",1,0,0,2,37],["insideLeft",1,0,0,2,37],["insideTop",1,0,0,2,37],["insideWidth",1,0,0,2,37],["insideHeight",1,0,0,2,37],["position",1,0,0,2,37]],[["format","ChartPlotAreaFormat",35,0,0,4]]],["ChartPlotAreaFormat",0,0,[["border","ChartBorder",35,0,0,4],["fill","ChartFill",3,0,0,4]]],["VisualCollection",5,0,0,[["getDefinitions",0,2,0,4],["getPreview",4,2,0,4],["bootstrapAgaveVisual",0,0,0,2],["getCount",0,2,0,4],["_RegisterSelectionChangedEvent",0,2],["_UnregisterSelectionChangedEvent",0,2]],[["add","Visual",3,8,0,2],["_GetItem","Visual",1,18,0,4],["getSelectedOrNullObject","Visual",0,2,0,4]],0,"Visual",[["AgaveVisualUpdate",2,0,"MessageType.agaveVisualUpdateEvent","","null","null"],["SelectionChanged",0,0,"MessageType.visualSelectionChangedEvent","this._ParentObject.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["Visual",0,[["id",3],["isSupportedInVisualTaskpane",3]],[["properties","VisualPropertyCollection",18,0,0,4]],[["delete",0,0,0,2],["getProperty",1,2,0,4],["setProperty",2,0,0,2],["changeDataSource",2,0,0,2],["getDataSource",0,2,0,4],["setPropertyToDefault",1,0,0,2],["_RegisterChangeEvent",0,2],["_UnregisterChangeEvent",0,2],["serializeProperties",0,2,0,4],["deserializeProperties",1,0,0,2],["addChildProperty",2,0,19,2],["removeChildProperty",2,0,19,2],["getDataFieldAssignments",0,0,3],["getDataConfig",0,2,3,4],["modifyDataConfig",1,0,3,2]],[["getChildProperties","VisualPropertyCollection",2,6,0,4],["getDataControllerClient","DataControllerClient",0,2,0,4],["getElementChildProperties","VisualPropertyCollection",3,6,0,4]],0,0,[["ChangeNotification",2,0,"MessageType.visualChangeEvent","this.id","_RegisterChangeEvent","_UnregisterChangeEvent"]]],["VisualProperty",0,[["type",3],["value",3],["id",3],["localizedName",3],["options",3],["localizedOptions",3],["hasDefault",3],["isDefault",3],["min",3],["max",3],["stepSize",3],["hideMeButShowChildrenUI",3],["expandableUI",3],["nextPropOnSameLine",3],["showResetUI",3],["size",3,19],["minSize",3,19],["maxSize",3,19],["index",3,19],["parentName",3,19]],0,[["getBoolMetaProperty",1,2,0,4]]],["VisualPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","VisualProperty",1,18,0,4],["getItemAt","VisualProperty",1,2,0,4]],0,"VisualProperty"],["DataControllerClient",0,0,0,[["getWells",0,2,0,4],["getAssociatedFields",1,2,0,4],["getAvailableFields",1,2,0,4],["addField",3,0,0,2],["removeField",2,0,0,2],["moveField",3,0,0,2]]],["RangeSort",0,0,0,[["apply",5,0,0,2,0,32]]],["TableSort",0,[["matchCase",3],["method",3],["fields",3]],0,[["apply",3,0,0,2,0,26],["clear"],["reapply"]]],["Filter",0,[["criteria",3]],0,[["apply",1],["clear",0,0,0,2,0,34],["applyBottomItemsFilter",1,0,0,2,0,34],["applyBottomPercentFilter",1,0,0,2,0,34],["applyCellColorFilter",1,0,0,2,0,34],["applyDynamicFilter",1,0,0,2,0,34],["applyFontColorFilter",1,0,0,2,0,34],["applyValuesFilter",1,0,0,2,0,34],["applyTopItemsFilter",1,0,0,2,0,34],["applyTopPercentFilter",1,0,0,2,0,34],["applyIconFilter",1,0,0,2,0,34],["applyCustomFilter",3,0,0,2,0,34]]],["AutoFilter",0,[["enabled",3],["isDataFiltered",3],["criteria",3]],0,[["apply",3,0,0,2,0,33],["reapply",0,0,0,2,0,26],["remove",0,0,0,2,0,26],["clearCriteria",0,0,0,2,0,26],["clearColumnCriteria",1,0,18]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4]]],["CultureInfo",0,[["name",3]],[["numberFormat","NumberFormatInfo",3,0,0,4],["datetimeFormat","DatetimeFormatInfo",3,27,0,4]]],["NumberFormatInfo",0,[["numberDecimalSeparator",3],["numberGroupSeparator",3],["currencySymbol",3,30]]],["DatetimeFormatInfo",0,[["dateSeparator",3],["longDatePattern",3],["shortDatePattern",3],["timeSeparator",3],["longTimePattern",3]]],["CustomXmlPartScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4],["getOnlyItem","CustomXmlPart",0,2,0,4],["getOnlyItemOrNullObject","CustomXmlPart",0,2,0,4]],0,"CustomXmlPart"],["CustomXmlPartCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["add","CustomXmlPart",1,8],["getByNamespace","CustomXmlPartScopedCollection",1,6,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4]],0,"CustomXmlPart"],["CustomXmlPart",0,[["id",3],["namespaceUri",3]],0,[["delete"],["getXml",0,2,0,4],["setXml",1]]],["_V1Api",0,0,0,[["bindingGetData",1,2,0,4],["getSelectedData",1,2,0,4],["gotoById",1,2,0,4],["bindingAddFromSelection",1,2],["bindingGetById",1,2,0,4],["bindingReleaseById",1,2],["bindingGetAll",0,2,0,4],["bindingAddFromNamedItem",1,2],["bindingAddFromPrompt",1,2],["bindingDeleteAllDataValues",1],["setSelectedData",1],["bindingClearFormats",1],["bindingSetData",1],["bindingSetFormats",1],["bindingSetTableOptions",1],["bindingAddRows",1],["bindingAddColumns",1],["getFilePropertiesAsync",0,2,9,4]]],["PivotTableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotTable",1,18,0,4],["getFirst","PivotTable",0,10,0,4],["getItemOrNullObject","PivotTable",1,2,0,4],["getFirstOrNullObject","PivotTable",0,2,35,4]],0,"PivotTable"],["PivotTableCollection",5,0,0,[["refreshAll",0,0,0,2,0,12],["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","PivotTable",1,18,0,4],["getItemOrNullObject","PivotTable",1,2,15,4],["add","PivotTable",3,8,5,2,0,0,12]],0,"PivotTable",[["Added",0,3,"MessageType.pivotTableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.pivotTableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["PivotTable",0,[["name",1,0,0,2,12],["id",3,16],["useCustomSortLists",1,6,0,2,12],["enableDataValueEditing",1,6,0,2,12],["refreshOnOpen",0,23,0,2,29],["allowMultipleFiltersPerField",0,27,0,2,12]],[["worksheet","Worksheet",2,0,0,4],["hierarchies","PivotHierarchyCollection",19,5,0,4],["rowHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["columnHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["dataHierarchies","DataPivotHierarchyCollection",19,5,0,4],["filterHierarchies","FilterPivotHierarchyCollection",19,5,0,4],["layout","PivotLayout",2,5,0,4]],[["refresh",0,0,0,2,0,12],["delete",0,0,5,2,0,12],["getDataSourceString",0,2,35,4],["getDataSourceType",0,2,35,4]],[["addDateGroup","PivotHierarchy",2,0,8,2,0,0,38]]],["PivotLayout",0,[["showColumnGrandTotals",1,0,0,2,12],["showRowGrandTotals",1,0,0,2,12],["enableFieldList",1,17,0,2,12],["subtotalLocation",1,0,0,2,12],["layoutType",1,0,0,2,12],["autoFormat",1,6,0,2,12],["preserveFormatting",1,6,0,2,12],["altTextDescription",0,23,0,2,29],["altTextTitle",0,23,0,2,29],["emptyCellText",0,23,0,2,29],["fillEmptyCells",0,23,0,2,29],["showFieldHeaders",0,23,0,2,29],["tabularValues",3,8],["tabularText",3,8],["tabularNumberFormat",3,8],["tabularNumberFormatLocal",3,8]],[["pivotStyle","PivotTableStyle",35,8,0,4]],[["setAutoSortOnCell",2,0,6,2,0,12],["setStyle",1,0,8,2,0,12],["displayBlankLineAfterEachItem",1,0,23,2,0,29],["repeatAllItemLabels",1,0,23,2,0,29]],[["getRange","Range",0,3],["getRowLabelRange","Range",0,3],["getColumnLabelRange","Range",0,3],["getFilterAxisRange","Range",0,3],["getDataBodyRange","Range",0,3],["getCell","Range",3,2,8],["getPivotItems","PivotItemCollection",2,4,6],["getDataHierarchy","DataPivotHierarchy",1,3,6]]],["PivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotHierarchy",1,18,0,4],["getItemOrNullObject","PivotHierarchy",1,2,0,4]],0,"PivotHierarchy"],["PivotHierarchy",0,[["id",3],["name",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]]],["RowColumnPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","RowColumnPivotHierarchy",1,18,0,4],["getItemOrNullObject","RowColumnPivotHierarchy",1,2,0,4],["add","RowColumnPivotHierarchy",1,8,0,2,0,0,12]],0,"RowColumnPivotHierarchy"],["RowColumnPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["FilterPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","FilterPivotHierarchy",1,18,0,4],["getItemOrNullObject","FilterPivotHierarchy",1,2,0,4],["add","FilterPivotHierarchy",1,8,0,2,0,0,12]],0,"FilterPivotHierarchy"],["FilterPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["enableMultipleFilterItems",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["DataPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","DataPivotHierarchy",1,18,0,4],["getItemOrNullObject","DataPivotHierarchy",1,2,0,4],["add","DataPivotHierarchy",1,8,0,2,0,0,12]],0,"DataPivotHierarchy"],["DataPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["numberFormat",1,0,0,2,12],["summarizeBy",1,0,0,2,12],["showAs",1,0,0,2,12]],[["field","PivotField",35,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["PivotFieldCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotField",1,18,0,4],["getItemOrNullObject","PivotField",1,2,0,4]],0,"PivotField"],["PivotField",0,[["id",3],["name",1,0,0,2,12],["subtotals",1,0,0,2,12],["showAllItems",1,0,0,2,12]],[["items","PivotItemCollection",19,0,0,4]],[["sortByLabels",1,1,0,2,0,12],["sortByValues",3,0,6,2,0,12],["applyFilter",1,0,27,2,0,12],["clearAllFilters",0,0,27,2,0,12],["clearFilter",1,0,27,2,0,12],["getFilters",0,0,27],["isFiltered",1,0,27]]],["PivotItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotItem",1,18,0,4],["getItemOrNullObject","PivotItem",1,2,0,4]],0,"PivotItem"],["PivotItem",0,[["id",3],["name",1,0,0,2,12],["isExpanded",1,0,0,2,12],["visible",1,0,0,2,12]]],["WorksheetCustomProperty",0,[["key",3],["value",1],["_Id",2]],0,[["delete"]]],["WorksheetCustomPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","WorksheetCustomProperty",1,18,0,4],["getItemOrNullObject","WorksheetCustomProperty",1],["add","WorksheetCustomProperty",2,8]],0,"WorksheetCustomProperty"],["DocumentProperties",0,[["title",1],["subject",1],["author",1],["keywords",1],["comments",1],["lastAuthor",3],["revisionNumber",1],["creationDate",11],["category",1],["manager",1],["company",1]],[["custom","CustomPropertyCollection",19,0,0,4]]],["CustomProperty",0,[["key",3],["value",1],["type",3]],0,[["delete"]]],["CustomPropertyCollection",1,0,0,[["getCount",0,2,0,4],["deleteAll"]],[["getItemOrNullObject","CustomProperty",1,2,0,4],["add","CustomProperty",2,8],["getItem","CustomProperty",1,18,0,4]],0,"CustomProperty"],["ConditionalFormatCollection",1,0,0,[["getCount",0,2,0,4],["clearAll",0,0,0,2,0,39]],[["getItemAt","ConditionalFormat",1,2,0,4],["add","ConditionalFormat",1,8,0,2,0,0,39],["getItem","ConditionalFormat",1,18,0,4],["getItemOrNullObject","ConditionalFormat",1,2,18,4]],0,"ConditionalFormat"],["ConditionalFormat",0,[["stopIfTrue",1],["priority",1],["type",3],["id",3]],[["dataBarOrNullObject","DataBarConditionalFormat",35,0,0,4],["dataBar","DataBarConditionalFormat",35,0,0,4],["customOrNullObject","CustomConditionalFormat",35,0,0,4],["custom","CustomConditionalFormat",35,0,0,4],["iconSet","IconSetConditionalFormat",35,0,0,4],["iconSetOrNullObject","IconSetConditionalFormat",35,0,0,4],["colorScale","ColorScaleConditionalFormat",35,0,0,4],["colorScaleOrNullObject","ColorScaleConditionalFormat",35,0,0,4],["topBottom","TopBottomConditionalFormat",35,0,0,4],["topBottomOrNullObject","TopBottomConditionalFormat",35,0,0,4],["preset","PresetCriteriaConditionalFormat",35,0,0,4],["presetOrNullObject","PresetCriteriaConditionalFormat",35,0,0,4],["textComparison","TextConditionalFormat",35,0,0,4],["textComparisonOrNullObject","TextConditionalFormat",35,0,0,4],["cellValue","CellValueConditionalFormat",35,0,0,4],["cellValueOrNullObject","CellValueConditionalFormat",35,0,0,4]],[["delete",0,0,0,2,0,40],["changeRuleToCellValue",1,0,30],["changeRuleToColorScale",0,0,30],["changeRuleToContainsText",1,0,30],["changeRuleToCustom",1,0,30],["changeRuleToDataBar",0,0,30],["changeRuleToIconSet",0,0,30],["changeRuleToPresetCriteria",1,0,30],["changeRuleToTopBottom",1,0,30],["setRanges",1,0,30]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4],["getRanges","RangeAreas",0,10,6,4]]],["DataBarConditionalFormat",0,[["showDataBarOnly",1,0,0,2,40],["barDirection",1,0,0,2,41],["axisFormat",1,0,0,2,41],["axisColor",1,0,0,2,41],["lowerBoundRule",1,0,0,2,41],["upperBoundRule",1,0,0,2,41]],[["positiveFormat","ConditionalDataBarPositiveFormat",35,0,0,4],["negativeFormat","ConditionalDataBarNegativeFormat",35,0,0,4]]],["ConditionalDataBarPositiveFormat",0,[["fillColor",1,0,0,2,40],["gradientFill",1,0,0,2,40],["borderColor",1,0,0,2,40]]],["ConditionalDataBarNegativeFormat",0,[["fillColor",1,0,0,2,40],["matchPositiveFillColor",1,0,0,2,40],["borderColor",1,0,0,2,40],["matchPositiveBorderColor",1,0,0,2,40]]],["CustomConditionalFormat",0,0,[["rule","ConditionalFormatRule",35,0,0,4],["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalFormatRule",0,[["formula",1,0,0,2,41],["formulaLocal",1],["formulaR1C1",1]]],["IconSetConditionalFormat",0,[["reverseIconOrder",1,0,0,2,41],["showIconOnly",1,0,0,2,41],["style",1,0,0,2,41],["criteria",1,0,0,2,41]]],["ColorScaleConditionalFormat",0,[["threeColorScale",3],["criteria",1,0,0,2,41]]],["TopBottomConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["PresetCriteriaConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["TextConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["CellValueConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalRangeFormat",0,[["numberFormat",1]],[["fill","ConditionalRangeFill",35,0,0,4],["font","ConditionalRangeFont",35,0,0,4],["borders","ConditionalRangeBorderCollection",51,0,0,4]],[["clearFormat",0,0,30]]],["ConditionalRangeFont",0,[["color",1,0,0,2,42],["italic",1,0,0,2,42],["bold",1,0,0,2,42],["underline",1,0,0,2,42],["strikethrough",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeFill",0,[["color",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeBorder",0,[["sideIndex",3],["style",1,0,0,2,42],["color",1,0,0,2,42]]],["ConditionalRangeBorderCollection",1,[["count",3]],[["top","ConditionalRangeBorder",35,0,0,4],["bottom","ConditionalRangeBorder",35,0,0,4],["left","ConditionalRangeBorder",35,0,0,4],["right","ConditionalRangeBorder",35,0,0,4]],0,[["getItem","ConditionalRangeBorder",1,18,0,4],["getItemAt","ConditionalRangeBorder",1,2,0,4]],0,"ConditionalRangeBorder"],["NumberFormattingService",0,0,0,0,[["getFormatter","NumberFormatter",1,3]],0,0,0,"Microsoft.ExcelServices.NumberFormattingService",4],["NumberFormatter",0,[["isDateTime",3],["isPercent",3],["isCurrency",3],["isNumeric",3],["isText",3],["hasYear",3],["hasMonth",3],["hasDayOfWeek",3]],0,[["format",1,3]]],["CustomFunctionManager",36,[["status",2]],0,[["register",2]],0,0,0,0,"Microsoft.ExcelServices.CustomFunctionManager",4],["Style",0,[["builtIn",3],["formulaHidden",1],["horizontalAlignment",1],["includeAlignment",1],["includeBorder",1],["includeFont",1],["includeNumber",1],["includePatterns",1],["includeProtection",1],["indentLevel",1],["locked",1],["name",3],["numberFormat",1],["numberFormatLocal",1],["readingOrder",1],["shrinkToFit",1],["verticalAlignment",1],["wrapText",1],["textOrientation",5,5],["autoIndent",1,5]],[["borders","RangeBorderCollection",51,0,0,4],["font","RangeFont",35,0,0,4],["fill","RangeFill",35,0,0,4]],[["delete"]]],["StyleCollection",1,0,0,[["add",1],["getCount",0,2,6,4]],[["getItem","Style",1,18,0,4],["getItemAt","Style",1,2,6,4],["getItemOrNullObject","Style",1,2,18,4]],0,"Style"],["TableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TableStyle",1,18,0,4],["getItemOrNullObject","TableStyle",1,2,0,4],["add","TableStyle",2,8],["getDefault","TableStyle"]],0,"TableStyle"],["TableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TableStyle"]]],["PivotTableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","PivotTableStyle",1,18,0,4],["getItemOrNullObject","PivotTableStyle",1,2,0,4],["add","PivotTableStyle",2,8],["getDefault","PivotTableStyle"]],0,"PivotTableStyle"],["PivotTableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","PivotTableStyle"]]],["SlicerStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","SlicerStyle",1,18,0,4],["getItemOrNullObject","SlicerStyle",1,2,0,4],["add","SlicerStyle",2,8],["getDefault","SlicerStyle"]],0,"SlicerStyle"],["SlicerStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","SlicerStyle"]]],["TimelineStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TimelineStyle",1,18,0,4],["getItemOrNullObject","TimelineStyle",1,2,0,4],["add","TimelineStyle",2,8],["getDefault","TimelineStyle"]],0,"TimelineStyle"],["TimelineStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TimelineStyle"]]],["InternalTest",0,0,0,[["delay",1],["triggerMessage",4,0,11],["_RegisterTestEvent",0,0,11,2,0,1],["_UnregisterTestEvent",0,0,11,2,0,1],["triggerTestEvent",2,0,11],["triggerPostProcess",0,0,11],["_RegisterTest1Event",0,0,11,2,0,1],["_UnregisterTest1Event",0,0,11,2,0,1],["triggerTestEventWithFilter",3,0,11],["firstPartyMethod",0,2,11,5],["_RegisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_RegisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["unregisterAllCustomFunctionExecutionEvents",0,0,20],["updateRangeValueOnCurrentSheet",2,0,3,2],["triggerUserUndo",0,2,3],["triggerUserRedo",0,2,3],["enterCellEdit",1,0,6],["installCustomFunctionsFromCache",0,0,6],["recalc",2,0,6],["recalcBySolutionId",1,0,6],["safeForCellEditModeMethod",1,0,6],["exitCellEdit",0,0,6],["noPermissionMethod",1,0,6],["verifyCustomFunctionListExist",0,0,6],["enableContentWorkbookLink",0,0,3],["previewExecutionMethod",1,0,8,16],["setRapidJsonEnabled",1,0,8],["triggerVbaRecorderRecordingChanged",2,0,8]],0,0,0,[["CustomFunctionExecutionBeginEvent",0,20,"MessageType.customFunctionExecutionBeginEvent","","_RegisterCustomFunctionExecutionBeginEvent","_UnregisterCustomFunctionExecutionBeginEvent"],["CustomFunctionExecutionEndEvent",0,20,"MessageType.customFunctionExecutionEndEvent","","_RegisterCustomFunctionExecutionEndEvent","_UnregisterCustomFunctionExecutionEndEvent"],["Test1Event",2,11,"MessageType.test1Event","","_RegisterTest1Event","_UnregisterTest1Event"],["TestEvent",2,11,"MessageType.testEvent","","_RegisterTestEvent","_UnregisterTestEvent"]],"Microsoft.ExcelServices.InternalTest",4],["PageLayout",0,[["orientation",1],["paperSize",1],["blackAndWhite",1],["printErrors",1],["zoom",1],["centerHorizontally",1],["centerVertically",1],["printHeadings",1],["printGridlines",1],["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["headerMargin",1],["footerMargin",1],["printComments",1],["draftMode",1],["firstPageNumber",1],["printOrder",1]],[["headersFooters","HeaderFooterGroup",35,0,0,4]],[["setPrintMargins",2],["setPrintArea",1],["setPrintTitleRows",1],["setPrintTitleColumns",1]],[["getPrintArea","RangeAreas",0,10,0,4],["getPrintAreaOrNullObject","RangeAreas",0,10,0,4],["getPrintTitleRows","Range",0,10,0,4],["getPrintTitleRowsOrNullObject","Range",0,10,0,4],["getPrintTitleColumns","Range",0,10,0,4],["getPrintTitleColumnsOrNullObject","Range",0,10,0,4]]],["HeaderFooter",0,[["leftHeader",1],["centerHeader",1],["rightHeader",1],["leftFooter",1],["centerFooter",1],["rightFooter",1]]],["HeaderFooterGroup",0,[["state",1],["useSheetMargins",1],["useSheetScale",1]],[["defaultForAllPages","HeaderFooter",35,0,0,4],["firstPage","HeaderFooter",35,0,0,4],["evenPages","HeaderFooter",35,0,0,4],["oddPages","HeaderFooter",35,0,0,4]]],["PageBreak",0,[["_Id",2],["columnIndex",3],["rowIndex",3]],0,[["delete"]],[["getCellAfterBreak","Range",0,10,0,4]]],["PageBreakCollection",1,0,0,[["removePageBreaks"],["getCount",0,2,0,4]],[["getItem","PageBreak",1,18,0,4],["add","PageBreak",1,8]],0,"PageBreak"],["DataConnectionCollection",0,0,0,[["refreshAll"]],[["add","DataConnection",4,8,8,2,0,0,12]]],["RangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","Range",1,2,0,4]],0,"Range"],["RangeAreasCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","RangeAreas",1,2,0,4]],0,"RangeAreas"],["CommentCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,2,27],["_UnregisterAddedEvent",0,2,27],["_RegisterDeletedEvent",0,2,27],["_UnregisterDeletedEvent",0,2,27],["_RegisterChangedEvent",0,2,27],["_UnregisterChangedEvent",0,2,27]],[["getItem","Comment",1,18,0,4],["getItemAt","Comment",1,2,0,4],["add","Comment",3,8],["getItemByReplyId","Comment",1,2,0,4],["getItemByCell","Comment",1,2,0,4],["getItemOrNullObject","Comment",1,2,18,4]],0,"Comment",[["Added",0,27,"MessageType.commentAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",0,27,"MessageType.commentChangedEvent","this._eventTargetId","_RegisterChangedEvent","_UnregisterChangedEvent"],["Deleted",0,27,"MessageType.commentDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Comment",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",1,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],[["replies","CommentReplyCollection",19,0,0,4]],[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["CommentReplyCollection",1,0,0,[["getCount",0,2,0,4]],[["add","CommentReply",2,8],["getItem","CommentReply",1,18,0,4],["getItemAt","CommentReply",1,2,0,4],["getItemOrNullObject","CommentReply",1,2,18,4]],0,"CommentReply"],["CommentReply",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",3,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],0,[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["getParentComment","Comment"],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["ShapeCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["addImage","Shape",1],["_GetItem","Shape",1,18,0,4],["addGeometricShape","Shape",1],["addTextBox","Shape",1],["addSvg","Shape",1,0,8],["addGroup","Shape",1],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["addLine","Shape",5],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape",[["Added",0,3,"MessageType.shapeAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.shapeDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Shape",0,[["id",3],["name",1],["left",1],["top",1],["width",1],["height",1],["rotation",1],["zOrderPosition",3],["altTextTitle",1],["altTextDescription",1,0,0,2,36],["type",3],["lockAspectRatio",1],["placement",1,17],["geometricShapeType",1],["visible",1],["level",3],["connectionSiteCount",3],["scriptLink",1,8,0,2,37],["displayName",3,35]],[["geometricShape","GeometricShape",2,0,0,4],["image","Image",2,0,0,4],["textFrame","TextFrame",2,0,0,4],["fill","ShapeFill",35,0,0,4],["group","ShapeGroup",2,0,0,4],["parentGroup","Shape",2,0,0,4],["line","Line",2,0,0,4],["lineFormat","ShapeLineFormat",35,0,0,4]],[["setZOrder",1],["incrementLeft",1],["incrementTop",1],["incrementRotation",1],["scaleHeight",3],["scaleWidth",3],["delete"],["getAsImage",1],["_RegisterActivatedEvent",0,0,0,2,0,1],["_UnregisterActivatedEvent",0,0,0,2,0,1],["_RegisterDeactivatedEvent",0,0,0,2,0,1],["_UnregisterDeactivatedEvent",0,0,0,2,0,1],["activate",0,0,3]],[["copyTo","Shape",1,8,17,0,0,"_GetShapeById"],["_GetShapeById","Shape",1,2,17,4]],0,0,[["Activated",0,0,"MessageType.shapeActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,0,"MessageType.shapeDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["GeometricShape",0,[["id",3]],[["shape","Shape",2,0,0,4]]],["Image",0,[["id",3],["format",3,0,"format"]],[["shape","Shape",2,0,0,4]]],["ShapeGroup",0,[["id",3]],[["shapes","GroupShapeCollection",19,0,0,4],["shape","Shape",2,0,0,4]],[["ungroup"]]],["GroupShapeCollection",1,0,0,[["getCount",0,2,0,4]],[["_GetItem","Shape",1,18,0,4],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape"],["Line",0,[["id",3],["connectorType",1,0,"connectorType"],["beginArrowheadLength",1],["beginArrowheadStyle",1],["beginArrowheadWidth",1],["endArrowheadLength",1],["endArrowheadStyle",1],["endArrowheadWidth",1],["isBeginConnected",3],["beginConnectedSite",3],["isEndConnected",3],["endConnectedSite",3]],[["shape","Shape",2,0,0,4],["beginConnectedShape","Shape",2,0,0,4],["endConnectedShape","Shape",2,0,0,4]],[["connectBeginShape",2],["disconnectBeginShape"],["connectEndShape",2],["disconnectEndShape"]]],["ShapeFill",0,[["foregroundColor",1],["type",3],["transparency",1]],0,[["clear"],["setSolidColor",1]]],["ShapeLineFormat",0,[["visible",1],["color",1],["style",1],["weight",1],["dashStyle",1],["transparency",1]]],["TextFrame",0,[["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["horizontalAlignment",1],["horizontalOverflow",1],["verticalAlignment",1],["verticalOverflow",1],["orientation",1],["readingOrder",1],["hasText",3],["autoSizeSetting",1]],[["textRange","TextRange",2,0,0,4]],[["deleteText"]]],["TextRange",0,[["text",1]],[["font","ShapeFont",35,0,0,4]],0,[["getSubstring","TextRange",2]]],["ShapeFont",0,[["size",1],["name",1],["color",1],["bold",1],["italic",1],["underline",1]]],["Slicer",0,[["id",3],["name",1],["caption",1],["left",1],["top",1],["width",1],["height",1],["nameInFormula",1,8],["isFilterCleared",3],["style",1],["sortBy",1],["sortUsingCustomLists",1,3],["columnCount",1,3],["disableMoveResizeUI",1,3],["displayHeader",1,3],["rowHeight",1,3],["shapeId",2,3]],[["slicerItems","SlicerItemCollection",19,0,0,4],["worksheet","Worksheet",35,0,0,4],["slicerStyle","SlicerStyle",35,8,0,4]],[["delete"],["clearFilters"],["getSelectedItems"],["selectItems",1],["activate",0,2,3],["setStyle",1,0,8]]],["SlicerCollection",1,0,0,[["getCount",0,2,0,4]],[["add","Slicer",3,8],["getItemAt","Slicer",1,2,0,4],["getItem","Slicer",1,18,0,4],["getItemOrNullObject","Slicer",1,2,0,4]],0,"Slicer"],["SlicerItem",0,[["key",3],["name",3],["isSelected",1],["hasData",3]]],["SlicerItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SlicerItem",1,2,0,4],["getItem","SlicerItem",1,18,0,4],["getItemOrNullObject","SlicerItem",1,2,0,4]],0,"SlicerItem"],["Ribbon",0,[["activeTab",1]],0,[["executeCommand",2],["showTeachingCallout",3],["_RegisterCommandExecutedEvent",0,0,0,2,0,1],["_UnregisterCommandExecutedEvent",0,0,0,2,0,1],["showChartDialog",1,2,8,4]],0,0,0,[["CommandExecuted",0,0,"MessageType.ribbonCommandExecutedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCommandExecutedEvent","_UnregisterCommandExecutedEvent"]]],["LinkedDataType",0,[["dataProvider",2],["serviceId",2],["lastRefreshed",10],["name",2],["periodicRefreshInterval",2],["refreshDataLoadWarnings",2],["refreshMode",2],["supportedRefreshModes",2],["refreshErrors",2]],0,[["requestRefresh",0,0,0,2],["requestSetRefreshMode",1,0,0,2]]],["LinkedDataTypeCollection",1,0,0,[["getCount",0,2,0,4],["requestRefreshAll",0,0,0,2],["_RegisterRefreshRequestCompletedEvent",0,2,0,4],["_UnregisterRefreshRequestCompletedEvent",0,2,0,4],["_RegisterRefreshModeChangedEvent",0,2,0,4],["_UnregisterRefreshModeChangedEvent",0,2,0,4],["_RegisterLinkedDataTypeAddedEvent",0,2,0,4],["_UnregisterLinkedDataTypeAddedEvent",0,2,0,4]],[["getItem","LinkedDataType",1,18,0,4],["getItemOrNullObject","LinkedDataType",1],["getItemAt","LinkedDataType",1,2,0,4]],0,"LinkedDataType",[["LinkedDataTypeAdded",0,0,"MessageType.linkedDataTypeLinkedDataTypeAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterLinkedDataTypeAddedEvent","_UnregisterLinkedDataTypeAddedEvent"],["RefreshModeChanged",0,0,"MessageType.linkedDataTypeRefreshModeChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshModeChangedEvent","_UnregisterRefreshModeChangedEvent"],["RefreshRequestCompleted",0,0,"MessageType.linkedDataTypeRefreshRequestCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshRequestCompletedEvent","_UnregisterRefreshRequestCompletedEvent"]]],["SheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","SheetView",1]]],["SheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","SheetView",1,8],["enterTemporary","SheetView"],["getActive","SheetView"],["getItem","SheetView",1,18,0,4],["getItemAt","SheetView",1,2,0,4]],0,"SheetView"],["NamedSheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","NamedSheetView",1]]],["NamedSheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","NamedSheetView",1,8],["enterTemporary","NamedSheetView"],["getActive","NamedSheetView"],["getItem","NamedSheetView",1,18,0,4],["getItemAt","NamedSheetView",1,2,0,4],["getItemOrNullObject","NamedSheetView",1,2,28,4]],0,"NamedSheetView"],["FunctionResult",0,[["error",3],["value",3]]],["Functions",0,0,0,0,[["count","FunctionResult",1,72],["if","FunctionResult",3,8],["isNA","FunctionResult",1,8],["isError","FunctionResult",1,8],["sum","FunctionResult",1,72],["average","FunctionResult",1,72],["min","FunctionResult",1,72],["max","FunctionResult",1,72],["na","FunctionResult",0,8],["npv","FunctionResult",2,72],["dollar","FunctionResult",2,8],["fixed","FunctionResult",3,8],["sin","FunctionResult",1,8],["cos","FunctionResult",1,8],["tan","FunctionResult",1,8],["atan","FunctionResult",1,8],["pi","FunctionResult",0,8],["sqrt","FunctionResult",1,8],["exp","FunctionResult",1,8],["ln","FunctionResult",1,8],["log10","FunctionResult",1,8],["abs","FunctionResult",1,8],["int","FunctionResult",1,8],["sign","FunctionResult",1,8],["round","FunctionResult",2,8],["lookup","FunctionResult",3,8],["rept","FunctionResult",2,8],["mid","FunctionResult",3,8],["len","FunctionResult",1,8],["value","FunctionResult",1,8],["true","FunctionResult",0,8],["false","FunctionResult",0,8],["and","FunctionResult",1,72],["or","FunctionResult",1,72],["not","FunctionResult",1,8],["mod","FunctionResult",2,8],["dcount","FunctionResult",3,8,0,0,"DCount"],["dsum","FunctionResult",3,8,0,0,"DSum"],["daverage","FunctionResult",3,8,0,0,"DAverage"],["dmin","FunctionResult",3,8,0,0,"DMin"],["dmax","FunctionResult",3,8,0,0,"DMax"],["dstDev","FunctionResult",3,8,0,0,"DStDev"],["dvar","FunctionResult",3,8,0,0,"DVar"],["text","FunctionResult",2,8],["pv","FunctionResult",5,8],["fv","FunctionResult",5,8],["nper","FunctionResult",5,8,0,0,"NPer"],["pmt","FunctionResult",5,8],["rate","FunctionResult",6,8],["mirr","FunctionResult",3,8,0,0,"MIrr"],["irr","FunctionResult",2,8],["rand","FunctionResult",0,8],["match","FunctionResult",3,8],["date","FunctionResult",3,8],["time","FunctionResult",3,8],["day","FunctionResult",1,8],["month","FunctionResult",1,8],["year","FunctionResult",1,8],["weekday","FunctionResult",2,8],["hour","FunctionResult",1,8],["minute","FunctionResult",1,8],["second","FunctionResult",1,8],["now","FunctionResult",0,8],["areas","FunctionResult",1,8],["rows","FunctionResult",1,8],["columns","FunctionResult",1,8],["type","FunctionResult",1,8],["atan2","FunctionResult",2,8],["asin","FunctionResult",1,8],["acos","FunctionResult",1,8],["choose","FunctionResult",2,72],["hlookup","FunctionResult",4,8,0,0,"HLookup"],["vlookup","FunctionResult",4,8,0,0,"VLookup"],["isref","FunctionResult",1,8],["log","FunctionResult",2,8],["char","FunctionResult",1,8],["lower","FunctionResult",1,8],["upper","FunctionResult",1,8],["proper","FunctionResult",1,8],["left","FunctionResult",2,8],["right","FunctionResult",2,8],["exact","FunctionResult",2,8],["trim","FunctionResult",1,8],["replace","FunctionResult",4,8],["substitute","FunctionResult",4,8],["code","FunctionResult",1,8],["find","FunctionResult",3,8],["isErr","FunctionResult",1,8],["isText","FunctionResult",1,8],["isNumber","FunctionResult",1,8],["t","FunctionResult",1,8,0,0,"T"],["n","FunctionResult",1,8,0,0,"N"],["datevalue","FunctionResult",1,8],["timevalue","FunctionResult",1,8],["sln","FunctionResult",3,8],["syd","FunctionResult",4,8],["ddb","FunctionResult",5,8],["clean","FunctionResult",1,8],["ipmt","FunctionResult",6,8],["ppmt","FunctionResult",6,8],["countA","FunctionResult",1,72],["product","FunctionResult",1,72],["fact","FunctionResult",1,8],["dproduct","FunctionResult",3,8,0,0,"DProduct"],["isNonText","FunctionResult",1,8],["dstDevP","FunctionResult",3,8,0,0,"DStDevP"],["dvarP","FunctionResult",3,8,0,0,"DVarP"],["trunc","FunctionResult",2,8],["isLogical","FunctionResult",1,8],["dcountA","FunctionResult",3,8,0,0,"DCountA"],["usdollar","FunctionResult",2,8,0,0,"USDollar"],["findB","FunctionResult",3,8],["replaceB","FunctionResult",4,8],["leftb","FunctionResult",2,8],["rightb","FunctionResult",2,8],["midb","FunctionResult",3,8],["lenb","FunctionResult",1,8],["roundUp","FunctionResult",2,8],["roundDown","FunctionResult",2,8],["asc","FunctionResult",1,8],["dbcs","FunctionResult",1,8],["days360","FunctionResult",3,8],["today","FunctionResult",0,8],["vdb","FunctionResult",7,8],["median","FunctionResult",1,72],["sinh","FunctionResult",1,8],["cosh","FunctionResult",1,8],["tanh","FunctionResult",1,8],["asinh","FunctionResult",1,8],["acosh","FunctionResult",1,8],["atanh","FunctionResult",1,8],["dget","FunctionResult",3,8,0,0,"DGet"],["db","FunctionResult",5,8],["error_Type","FunctionResult",1,8],["aveDev","FunctionResult",1,72],["gammaLn","FunctionResult",1,8],["combin","FunctionResult",2,8],["even","FunctionResult",1,8],["fisher","FunctionResult",1,8],["fisherInv","FunctionResult",1,8],["standardize","FunctionResult",3,8],["odd","FunctionResult",1,8],["permut","FunctionResult",2,8],["devSq","FunctionResult",1,72],["geoMean","FunctionResult",1,72],["harMean","FunctionResult",1,72],["sumSq","FunctionResult",1,72],["kurt","FunctionResult",1,72],["skew","FunctionResult",1,72],["large","FunctionResult",2,8],["small","FunctionResult",2,8],["trimMean","FunctionResult",2,8],["concatenate","FunctionResult",1,72],["power","FunctionResult",2,8],["radians","FunctionResult",1,8],["degrees","FunctionResult",1,8],["subtotal","FunctionResult",2,72],["sumIf","FunctionResult",3,8],["countIf","FunctionResult",2,8],["countBlank","FunctionResult",1,8],["ispmt","FunctionResult",4,8],["roman","FunctionResult",2,8],["hyperlink","FunctionResult",2,8],["averageA","FunctionResult",1,72],["maxA","FunctionResult",1,72],["minA","FunctionResult",1,72],["stDevPA","FunctionResult",1,72],["varPA","FunctionResult",1,72],["stDevA","FunctionResult",1,72],["varA","FunctionResult",1,72],["bahtText","FunctionResult",1,8],["hex2Bin","FunctionResult",2,8],["hex2Dec","FunctionResult",1,8],["hex2Oct","FunctionResult",2,8],["dec2Bin","FunctionResult",2,8],["dec2Hex","FunctionResult",2,8],["dec2Oct","FunctionResult",2,8],["oct2Bin","FunctionResult",2,8],["oct2Hex","FunctionResult",2,8],["oct2Dec","FunctionResult",1,8],["bin2Dec","FunctionResult",1,8],["bin2Oct","FunctionResult",2,8],["bin2Hex","FunctionResult",2,8],["imSub","FunctionResult",2,8],["imDiv","FunctionResult",2,8],["imPower","FunctionResult",2,8],["imAbs","FunctionResult",1,8],["imSqrt","FunctionResult",1,8],["imLn","FunctionResult",1,8],["imLog2","FunctionResult",1,8],["imLog10","FunctionResult",1,8],["imSin","FunctionResult",1,8],["imCos","FunctionResult",1,8],["imExp","FunctionResult",1,8],["imArgument","FunctionResult",1,8],["imConjugate","FunctionResult",1,8],["imaginary","FunctionResult",1,8],["imReal","FunctionResult",1,8],["complex","FunctionResult",3,8],["imSum","FunctionResult",1,72],["imProduct","FunctionResult",1,72],["seriesSum","FunctionResult",4,8],["factDouble","FunctionResult",1,8],["sqrtPi","FunctionResult",1,8],["quotient","FunctionResult",2,8],["delta","FunctionResult",2,8],["geStep","FunctionResult",2,8],["isEven","FunctionResult",1,8],["isOdd","FunctionResult",1,8],["mround","FunctionResult",2,8,0,0,"MRound"],["erf","FunctionResult",2,8],["erfC","FunctionResult",1,8],["besselJ","FunctionResult",2,8],["besselK","FunctionResult",2,8],["besselY","FunctionResult",2,8],["besselI","FunctionResult",2,8],["xirr","FunctionResult",3,8],["xnpv","FunctionResult",3,8],["priceMat","FunctionResult",6,8],["yieldMat","FunctionResult",6,8],["intRate","FunctionResult",5,8],["received","FunctionResult",5,8],["disc","FunctionResult",5,8],["priceDisc","FunctionResult",5,8],["yieldDisc","FunctionResult",5,8],["tbillEq","FunctionResult",3,8,0,0,"TBillEq"],["tbillPrice","FunctionResult",3,8,0,0,"TBillPrice"],["tbillYield","FunctionResult",3,8,0,0,"TBillYield"],["price","FunctionResult",7,8],["yield","FunctionResult",7,8],["dollarDe","FunctionResult",2,8],["dollarFr","FunctionResult",2,8],["nominal","FunctionResult",2,8],["effect","FunctionResult",2,8],["cumPrinc","FunctionResult",6,8],["cumIPmt","FunctionResult",6,8],["edate","FunctionResult",2,8,0,0,"EDate"],["eoMonth","FunctionResult",2,8],["yearFrac","FunctionResult",3,8],["coupDayBs","FunctionResult",4,8],["coupDays","FunctionResult",4,8],["coupDaysNc","FunctionResult",4,8],["coupNcd","FunctionResult",4,8],["coupNum","FunctionResult",4,8],["coupPcd","FunctionResult",4,8],["duration","FunctionResult",6,8],["mduration","FunctionResult",6,8,0,0,"MDuration"],["oddLPrice","FunctionResult",8,8],["oddLYield","FunctionResult",8,8],["oddFPrice","FunctionResult",9,8],["oddFYield","FunctionResult",9,8],["randBetween","FunctionResult",2,8],["weekNum","FunctionResult",2,8],["amorDegrc","FunctionResult",7,8],["amorLinc","FunctionResult",7,8],["convert","FunctionResult",3,8],["accrInt","FunctionResult",8,8],["accrIntM","FunctionResult",5,8],["workDay","FunctionResult",3,8],["networkDays","FunctionResult",3,8],["gcd","FunctionResult",1,72],["multiNomial","FunctionResult",1,72],["lcm","FunctionResult",1,72],["fvschedule","FunctionResult",2,8,0,0,"FVSchedule"],["countIfs","FunctionResult",1,72],["sumIfs","FunctionResult",2,72],["averageIf","FunctionResult",3,8],["averageIfs","FunctionResult",2,72],["binom_Dist","FunctionResult",4,8],["binom_Inv","FunctionResult",3,8],["confidence_Norm","FunctionResult",3,8],["confidence_T","FunctionResult",3,8],["expon_Dist","FunctionResult",3,8],["gamma_Dist","FunctionResult",4,8],["gamma_Inv","FunctionResult",3,8],["norm_Dist","FunctionResult",4,8],["norm_Inv","FunctionResult",3,8],["percentile_Exc","FunctionResult",2,8],["percentile_Inc","FunctionResult",2,8],["percentRank_Exc","FunctionResult",3,8],["percentRank_Inc","FunctionResult",3,8],["poisson_Dist","FunctionResult",3,8],["quartile_Exc","FunctionResult",2,8],["quartile_Inc","FunctionResult",2,8],["rank_Avg","FunctionResult",3,8],["rank_Eq","FunctionResult",3,8],["stDev_S","FunctionResult",1,72],["stDev_P","FunctionResult",1,72],["t_Dist","FunctionResult",3,8],["t_Dist_2T","FunctionResult",2,8],["t_Dist_RT","FunctionResult",2,8],["t_Inv","FunctionResult",2,8],["t_Inv_2T","FunctionResult",2,8],["var_S","FunctionResult",1,72],["var_P","FunctionResult",1,72],["weibull_Dist","FunctionResult",4,8],["networkDays_Intl","FunctionResult",4,8],["workDay_Intl","FunctionResult",4,8],["ecma_Ceiling","FunctionResult",2,8,0,0,"ECMA_Ceiling"],["iso_Ceiling","FunctionResult",2,8,0,0,"ISO_Ceiling"],["beta_Dist","FunctionResult",6,8],["beta_Inv","FunctionResult",5,8],["chiSq_Dist","FunctionResult",3,8],["chiSq_Dist_RT","FunctionResult",2,8],["chiSq_Inv","FunctionResult",2,8],["chiSq_Inv_RT","FunctionResult",2,8],["f_Dist","FunctionResult",4,8],["f_Dist_RT","FunctionResult",3,8],["f_Inv","FunctionResult",3,8],["f_Inv_RT","FunctionResult",3,8],["hypGeom_Dist","FunctionResult",5,8],["logNorm_Dist","FunctionResult",4,8],["logNorm_Inv","FunctionResult",3,8],["negBinom_Dist","FunctionResult",4,8],["norm_S_Dist","FunctionResult",2,8],["norm_S_Inv","FunctionResult",1,8],["z_Test","FunctionResult",3,8],["erf_Precise","FunctionResult",1,8],["erfC_Precise","FunctionResult",1,8],["gammaLn_Precise","FunctionResult",1,8],["ceiling_Precise","FunctionResult",2,8],["floor_Precise","FunctionResult",2,8],["acot","FunctionResult",1,8],["acoth","FunctionResult",1,8],["cot","FunctionResult",1,8],["coth","FunctionResult",1,8],["csc","FunctionResult",1,8],["csch","FunctionResult",1,8],["sec","FunctionResult",1,8],["sech","FunctionResult",1,8],["imTan","FunctionResult",1,8],["imCot","FunctionResult",1,8],["imCsc","FunctionResult",1,8],["imCsch","FunctionResult",1,8],["imSec","FunctionResult",1,8],["imSech","FunctionResult",1,8],["bitand","FunctionResult",2,8],["bitor","FunctionResult",2,8],["bitxor","FunctionResult",2,8],["bitlshift","FunctionResult",2,8],["bitrshift","FunctionResult",2,8],["permutationa","FunctionResult",2,8],["combina","FunctionResult",2,8],["xor","FunctionResult",1,72],["pduration","FunctionResult",3,8,0,0,"PDuration"],["base","FunctionResult",3,8],["decimal","FunctionResult",2,8],["days","FunctionResult",2,8],["binom_Dist_Range","FunctionResult",4,8],["gamma","FunctionResult",1,8],["skew_p","FunctionResult",1,72],["gauss","FunctionResult",1,8],["phi","FunctionResult",1,8],["rri","FunctionResult",3,8],["unichar","FunctionResult",1,8],["unicode","FunctionResult",1,8],["arabic","FunctionResult",1,8],["isoWeekNum","FunctionResult",1,8],["numberValue","FunctionResult",3,8],["sheet","FunctionResult",1,8],["sheets","FunctionResult",1,8],["isFormula","FunctionResult",1,8],["ceiling_Math","FunctionResult",3,8],["floor_Math","FunctionResult",3,8],["imSinh","FunctionResult",1,8],["imCosh","FunctionResult",1,8]]]]},targetNamespaceObject:e})}(Excel||(Excel={}));var _EndExcel="_EndExcel";if("undefined"!==typeof window&&window.OSF&&window.OSF._OfficeAppFactory&&window.OSF._OfficeAppFactory.getHostInfo&&window.OSF._OfficeAppFactory.getHostInfo()){var hostPlatform=window.OSF._OfficeAppFactory.getHostInfo().hostPlatform;"web"===hostPlatform&&(OfficeExtension._internalConfig.enablePreviewExecution=!0)}function exposeOfficeRuntimeThroughOfficeNamespace(e,t){var n,r;"undefined"===typeof e&&"undefined"!==typeof window&&(e=null===window||void 0===window?void 0:window.OfficeRuntime),"undefined"===typeof e&&(e={}),"undefined"!==typeof t&&(t.storage=t.storage||(null===e||void 0===e?void 0:e.storage),t.auth=t.auth||(null===e||void 0===e?void 0:e.auth),t.getAccessToken=t.getAccessToken||(null===(n=null===e||void 0===e?void 0:e.auth)||void 0===n?void 0:n.getAccessToken),t.addin=t.addin||(null===e||void 0===e?void 0:e.addin),t.isSetSupported=t.isSetSupported||(null===(r=null===e||void 0===e?void 0:e.apiInformation)||void 0===r?void 0:r.isSetSupported),t.license=t.license||(null===e||void 0===e?void 0:e.license),t.message=t.message||(null===e||void 0===e?void 0:e.message))}OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel=!0,OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria=!1,exposeOfficeRuntimeThroughOfficeNamespace("undefined"!==typeof OfficeRuntime&&OfficeRuntime||void 0,"undefined"!==typeof Office&&Office||void 0),"undefined"!==typeof OSFPerformance&&(OSFPerformance.hostInitializationEnd=OSFPerformance.now(),OSFPerformance.totalJSHeapSize=OSFPerformance.getTotalJSHeapSize(),OSFPerformance.usedJSHeapSize=OSFPerformance.getUsedJSHeapSize(),OSFPerformance.jsHeapSizeLimit=OSFPerformance.getJSHeapSizeLimit()); \ No newline at end of file diff --git a/dist/excel-mac-16.00-core.debug.js b/dist/excel-mac-16.00-core.debug.js new file mode 100644 index 000000000..bb61a0bab --- /dev/null +++ b/dist/excel-mac-16.00-core.debug.js @@ -0,0 +1,9050 @@ +/* Excel Mac specific API library (Core APIs only) */ + +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + + This file also contains the following Promise implementation (with a few small modifications): + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 2.3.0 +*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExt; +(function (OfficeExt) { + var MicrosoftAjaxFactory = (function () { + function MicrosoftAjaxFactory() { + } + MicrosoftAjaxFactory.prototype.isMsAjaxLoaded = function () { + if (typeof (Sys) !== 'undefined' && typeof (Type) !== 'undefined' && + Sys.StringBuilder && typeof (Sys.StringBuilder) === "function" && + Type.registerNamespace && typeof (Type.registerNamespace) === "function" && + Type.registerClass && typeof (Type.registerClass) === "function" && + typeof (Function._validateParams) === "function" && + Sys.Serialization && Sys.Serialization.JavaScriptSerializer && typeof (Sys.Serialization.JavaScriptSerializer.serialize) === "function") { + return true; + } + else { + return false; + } + }; + MicrosoftAjaxFactory.prototype.loadMsAjaxFull = function (callback) { + var msAjaxCDNPath = (window.location.protocol.toLowerCase() === 'https:' ? 'https:' : 'http:') + '//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js'; + OSF.OUtil.loadScript(msAjaxCDNPath, callback); + }; + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxError", { + get: function () { + if (this._msAjaxError == null && this.isMsAjaxLoaded()) { + this._msAjaxError = Error; + } + return this._msAjaxError; + }, + set: function (errorClass) { + this._msAjaxError = errorClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxString", { + get: function () { + if (this._msAjaxString == null && this.isMsAjaxLoaded()) { + this._msAjaxString = String; + } + return this._msAjaxString; + }, + set: function (stringClass) { + this._msAjaxString = stringClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxDebug", { + get: function () { + if (this._msAjaxDebug == null && this.isMsAjaxLoaded()) { + this._msAjaxDebug = Sys.Debug; + } + return this._msAjaxDebug; + }, + set: function (debugClass) { + this._msAjaxDebug = debugClass; + }, + enumerable: true, + configurable: true + }); + return MicrosoftAjaxFactory; + }()); + OfficeExt.MicrosoftAjaxFactory = MicrosoftAjaxFactory; +})(OfficeExt || (OfficeExt = {})); +var OsfMsAjaxFactory = new OfficeExt.MicrosoftAjaxFactory(); +var OSF = OSF || {}; +(function (OfficeExt) { + var SafeStorage = (function () { + function SafeStorage(_internalStorage) { + this._internalStorage = _internalStorage; + } + SafeStorage.prototype.getItem = function (key) { + try { + return this._internalStorage && this._internalStorage.getItem(key); + } + catch (e) { + return null; + } + }; + SafeStorage.prototype.setItem = function (key, data) { + try { + this._internalStorage && this._internalStorage.setItem(key, data); + } + catch (e) { + } + }; + SafeStorage.prototype.clear = function () { + try { + this._internalStorage && this._internalStorage.clear(); + } + catch (e) { + } + }; + SafeStorage.prototype.removeItem = function (key) { + try { + this._internalStorage && this._internalStorage.removeItem(key); + } + catch (e) { + } + }; + SafeStorage.prototype.getKeysWithPrefix = function (keyPrefix) { + var keyList = []; + try { + var len = this._internalStorage && this._internalStorage.length || 0; + for (var i = 0; i < len; i++) { + var key = this._internalStorage.key(i); + if (key.indexOf(keyPrefix) === 0) { + keyList.push(key); + } + } + } + catch (e) { + } + return keyList; + }; + SafeStorage.prototype.isLocalStorageAvailable = function () { + return (this._internalStorage != null); + }; + return SafeStorage; + }()); + OfficeExt.SafeStorage = SafeStorage; +})(OfficeExt || (OfficeExt = {})); +OSF.XdmFieldName = { + ConversationUrl: "ConversationUrl", + AppId: "AppId" +}; +OSF.TestFlightStart = 1000; +OSF.TestFlightEnd = 1009; +OSF.FlightNames = { + UseOriginNotUrl: 0, + AddinEnforceHttps: 2, + FirstPartyAnonymousProxyReadyCheckTimeout: 6, + AddinRibbonIdAllowUnknown: 9, + ManifestParserDevConsoleLog: 15, + AddinActionDefinitionHybridMode: 18, + UseActionIdForUILessCommand: 20, + RequirementSetRibbonApiOnePointTwo: 21, + SetFocusToTaskpaneIsEnabled: 22, + ShortcutInfoArrayInUserPreferenceData: 23, + OSFTestFlight1000: OSF.TestFlightStart, + OSFTestFlight1001: OSF.TestFlightStart + 1, + OSFTestFlight1002: OSF.TestFlightStart + 2, + OSFTestFlight1003: OSF.TestFlightStart + 3, + OSFTestFlight1004: OSF.TestFlightStart + 4, + OSFTestFlight1005: OSF.TestFlightStart + 5, + OSFTestFlight1006: OSF.TestFlightStart + 6, + OSFTestFlight1007: OSF.TestFlightStart + 7, + OSFTestFlight1008: OSF.TestFlightStart + 8, + OSFTestFlight1009: OSF.TestFlightEnd +}; +OSF.TrustUXFlightValues = { + TrustUXControlA: 0, + TrustUXExperimentB: 1, + TrustUXExperimentC: 2 +}; +OSF.FlightTreatmentNames = { + AddinTrustUXImprovement: "Microsoft.Office.SharedOnline.AddinTrustUXImprovement", + BlockAutoOpenAddInIfStoreDisabled: "Microsoft.Office.SharedOnline.BlockAutoOpenAddInIfStoreDisabled", + Bug7083046KillSwitch: "Microsoft.Office.SharedOnline.Bug7083046KillSwitch", + CheckProxyIsReadyRetry: "Microsoft.Office.SharedOnline.OEP.CheckProxyIsReadyRetry", + InsertionDialogFixesEnabled: "Microsoft.Office.SharedOnline.InsertionDialogFixesEnabled", + WopiPreinstalledAddInsEnabled: "Microsoft.Office.SharedOnline.WopiPreinstalledAddInsEnabled", + WopiUseNewActivate: "Microsoft.Office.SharedOnline.WopiUseNewActivate", + MosManifestEnabled: "Microsoft.Office.SharedOnline.OEP.MosManifest", + RemoveGetTrustNoPrompt: "Microsoft.Office.SharedOnline.removeGetTrustNoPrompt", + HostTrustDialog: "Microsoft.Office.SharedOnline.HostTrustDialog", + AddinDetailsServiceSupportEnabled: "Microsoft.Office.SharedOnline.AddinDetailsServiceSupportEnabled", + GetAddinFlyoutEnabled: "Microsoft.Office.SharedOnline.GetAddinFlyoutEnabled", + BackstageEnabled: "Microsoft.Office.SharedOnline.NewBackstageEnabled", + EnablingWindowOpenUsageLogging: "Microsoft.Office.SharedOnline.EnablingWindowOpenUsageLogging" +}; +OSF.Flights = []; +OSF.IntFlights = {}; +OSF.Settings = {}; +OSF.WindowNameItemKeys = { + BaseFrameName: "baseFrameName", + HostInfo: "hostInfo", + XdmInfo: "xdmInfo", + SerializerVersion: "serializerVersion", + AppContext: "appContext", + Flights: "flights" +}; +OSF.OUtil = (function () { + var _uniqueId = -1; + var _xdmInfoKey = '&_xdm_Info='; + var _serializerVersionKey = '&_serializer_version='; + var _flightsKey = '&_flights='; + var _xdmSessionKeyPrefix = '_xdm_'; + var _serializerVersionKeyPrefix = '_serializer_version='; + var _flightsKeyPrefix = '_flights='; + var _fragmentSeparator = '#'; + var _fragmentInfoDelimiter = '&'; + var _classN = "class"; + var _loadedScripts = {}; + var _defaultScriptLoadingTimeout = 30000; + var _safeSessionStorage = null; + var _safeLocalStorage = null; + var _rndentropy = new Date().getTime(); + function _random() { + var nextrand = 0x7fffffff * (Math.random()); + nextrand ^= _rndentropy ^ ((new Date().getMilliseconds()) << Math.floor(Math.random() * (31 - 10))); + return nextrand.toString(16); + } + ; + function _getSessionStorage() { + if (!_safeSessionStorage) { + try { + var sessionStorage = window.sessionStorage; + } + catch (ex) { + sessionStorage = null; + } + _safeSessionStorage = new OfficeExt.SafeStorage(sessionStorage); + } + return _safeSessionStorage; + } + ; + function _reOrderTabbableElements(elements) { + var bucket0 = []; + var bucketPositive = []; + var i; + var len = elements.length; + var ele; + for (i = 0; i < len; i++) { + ele = elements[i]; + if (ele.tabIndex) { + if (ele.tabIndex > 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex === 0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive = bucketPositive.sort(function (left, right) { + var diff = left.tabIndex - right.tabIndex; + if (diff === 0) { + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + return { + set_entropy: function OSF_OUtil$set_entropy(entropy) { + if (typeof entropy == "string") { + for (var i = 0; i < entropy.length; i += 4) { + var temp = 0; + for (var j = 0; j < 4 && i + j < entropy.length; j++) { + temp = (temp << 8) + entropy.charCodeAt(i + j); + } + _rndentropy ^= temp; + } + } + else if (typeof entropy == "number") { + _rndentropy ^= entropy; + } + else { + _rndentropy ^= 0x7fffffff * Math.random(); + } + _rndentropy &= 0x7fffffff; + }, + extend: function OSF_OUtil$extend(child, parent) { + var F = function () { }; + F.prototype = parent.prototype; + child.prototype = new F(); + child.prototype.constructor = child; + child.uber = parent.prototype; + if (parent.prototype.constructor === Object.prototype.constructor) { + parent.prototype.constructor = parent; + } + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name] = {}; + } + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { + if (parent && name && parent[name]) { + delete parent[name]; + } + }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret = {}; + for (var key in settingsCollection) { + var value = settingsCollection[key]; + try { + if (JSON) { + value = JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret = {}; + serializedSettings = serializedSettings || {}; + for (var key in serializedSettings) { + var value = serializedSettings[key]; + try { + if (JSON) { + value = JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if (!_loadedScriptEntry) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + var onLoadTimeOut = function OSF_OUtil_loadScript$onLoadTimeOut() { + if (window.navigator.userAgent.indexOf("Trident") > 0) { + onLoadError(null); + } + else { + onLoadError(new Event("Script load timed out")); + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError(errorEvent) { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(errorEvent); + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadTimeOut, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) { + if (url) { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link); + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { + var parsed = enumObject[str.trim()]; + if (typeof (parsed) == 'undefined') { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed; + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { + var obj = { calc: arguments[0] }; + return function () { + if (obj.calc) { + obj.val = obj.calc.apply(this, arguments); + delete obj.calc; + } + return obj.val; + }; + }, + getUniqueId: function OSF_OUtil$getUniqueId() { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString(); + }, + formatString: function OSF_OUtil$formatString() { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10) + 1; + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }, + generateConversationId: function OSF_OUtil$generateConversationId() { + return [_random(), _random(), (new Date()).getTime().toString()].join('_'); + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId(); + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { + return OSF.OUtil.addInfoAsHash(url, _xdmInfoKey, xdmInfoValue, false); + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) { + return OSF.OUtil.addInfoAsHash(url, _serializerVersionKey, serializerVersion, true); + }, + addFlightsAsHash: function OSF_OUtil$addFlightsAsHash(url, flights) { + return OSF.OUtil.addInfoAsHash(url, _flightsKey, flights, true); + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) { + url = url.trim() || ''; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if (encodeInfo) { + newFragment = [keyName, encodeURIComponent(infoValue), fragment].join(''); + } + else { + newFragment = [fragment, keyName, infoValue].join(''); + } + return [urlWithoutFragment, _fragmentSeparator, newFragment].join(''); + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.HostInfo); + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.XdmInfo); + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.SerializerVersion)); + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseFlights: function OSF_OUtil$parseFlights(skipSessionStorage) { + var flights = OSF.OUtil.parseFlightsWithGivenFragment(skipSessionStorage, window.location.hash); + if (flights.length == 0) { + flights = OSF.OUtil.parseFlightsFromWindowName(skipSessionStorage, window.name); + } + return flights; + }, + checkFlight: function OSF_OUtil$checkFlightEnabled(flight) { + return OSF.Flights && OSF.Flights.indexOf(flight) >= 0; + }, + pushFlight: function OSF_OUtil$pushFlight(flight) { + if (OSF.Flights.indexOf(flight) < 0) { + OSF.Flights.push(flight); + return true; + } + return false; + }, + getBooleanSetting: function OSF_OUtil$getSetting(settingName) { + return OSF.OUtil.getBooleanFromDictionary(OSF.Settings, settingName); + }, + getBooleanFromDictionary: function OSF_OUtil$getBooleanFromDictionary(settings, settingName) { + var result = (settings && settingName && settings[settingName] !== undefined && settings[settingName] && + ((typeof (settings[settingName]) === "string" && settings[settingName].toUpperCase() === 'TRUE') || + (typeof (settings[settingName]) === "boolean" && settings[settingName]))); + return result !== undefined ? result : false; + }, + getIntFromDictionary: function OSF_OUtil$getIntFromDictionary(settings, settingName) { + if (settings && settingName && settings[settingName] !== undefined && (typeof settings[settingName] === "string")) { + return parseInt(settings[settingName]); + } + else { + return NaN; + } + }, + pushIntFlight: function OSF_OUtil$pushIntFlight(flight, flightValue) { + if (!(flight in OSF.IntFlights)) { + OSF.IntFlights[flight] = flightValue; + return true; + } + return false; + }, + getIntFlight: function OSF_OUtil$getIntFlight(flight) { + if (OSF.IntFlights && (flight in OSF.IntFlights)) { + return OSF.IntFlights[flight]; + } + else { + return NaN; + } + }, + parseFlightsFromWindowName: function OSF_OUtil$parseFlightsFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.Flights)); + }, + parseFlightsWithGivenFragment: function OSF_OUtil$parseFlightsWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(_flightsKey, _flightsKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseArrayWithDefault: function OSF_OUtil$parseArrayWithDefault(jsonString) { + var array = []; + try { + array = JSON.parse(jsonString); + } + catch (ex) { } + if (!Array.isArray(array)) { + array = []; + } + return array; + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj != null) { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue != null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >= 0) { + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue = decodeURIComponent(infoValue); + } + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd = window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd == -1) { + sessionKeyEnd = window.name.length; + } + var sessionKey = window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString = window.location.search; + var conversationId = null; + if (searchString) { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1) === '=') { + conversationId = conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId = decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) { + var items = strInfo.split("$"); + if (typeof items[1] == "undefined") { + items = strInfo.split("|"); + } + if (typeof items[1] == "undefined") { + items = strInfo.split("%7C"); + } + return items; + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue = ''; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if (items != undefined && items.length >= 3) { + switch (xdmFieldName) { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break; + } + } + } + return fieldValue; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e = Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) + throw e; + for (var p in expectedProperties) { + e = Function._validateParameter(params[p], expectedProperties[p], p); + if (e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) { + if (typeof (OsfMsAjaxFactory) !== 'undefined' && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) { + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor = descriptor || {}; + for (var nd in attributes) { + var attribute = attributes[nd]; + if (descriptor[attribute] == undefined) { + descriptor[attribute] = true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors = descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for (var i = 0; i < propsLength; i++) { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable = descriptor.writable || false; + } + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret = []; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key == item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value == list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add = list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key] = value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2] = newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj) === "[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj) === "[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj) === "[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.attachEvent) { + element.attachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.detachEvent) { + element.detachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = null; + } + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) { + var xmlhttp; + try { + xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function () { + if (xmlhttp.readyState == 4) { + if (xmlhttp.status == 200) { + onSuccess(xmlhttp.responseText); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + if (!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, c2, c3, a, b, c; + var i; + var length = input.length; + do { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + if (!isNaN(c2)) { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + } + if (isNaN(c2)) { + temp[i - 1] = 64; + } + else if (isNaN(c3)) { + temp[i - 2] = 64; + temp[i - 1] = 64; + } + for (var t = 0; t < i; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getSessionStorage: function OSF_Outil$getSessionStorage() { + return _getSessionStorage(); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage = window.localStorage; + } + catch (ex) { + localStorage = null; + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage); + } + return _safeLocalStorage; + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) { + var hex = "#" + (Number(val) + 0x1000000).toString(16).slice(-6); + return hex; + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) { + element.onclick = function (e) { + handler(); + }; + element.ontouchend = function (e) { + handler(); + e.preventDefault(); + }; + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) { + var e = Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: false }, + { name: "paramName", type: String, mayBeNull: false } + ]); + if (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return ""; + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)", "i"); + if (!queryExp.test(queryString)) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return ""; + } + return queryExp.exec(queryString)[1]; + }, + getHostnamePortionForLogging: function OSF_Outil$getHostnamePortionForLogging(hostname) { + var e = Function._validateParams(arguments, [{ name: "hostname", type: String, mayBeNull: false } + ]); + if (e) { + return ""; + } + var hostnameSubstrings = hostname.split('.'); + var len = hostnameSubstrings.length; + if (len >= 2) { + return hostnameSubstrings[len - 2] + "." + hostnameSubstrings[len - 1]; + } + else if (len == 1) { + return hostnameSubstrings[0]; + } + }, + isiOS: function OSF_Outil$isiOS() { + return (window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false); + }, + isChrome: function OSF_Outil$isChrome() { + return (window.navigator.userAgent.indexOf("Chrome") > 0) && !OSF.OUtil.isEdge(); + }, + isEdge: function OSF_Outil$isEdge() { + return window.navigator.userAgent.indexOf("Edge") > 0; + }, + isIE: function OSF_Outil$isIE() { + return window.navigator.userAgent.indexOf("Trident") > 0; + }, + isFirefox: function OSF_Outil$isFirefox() { + return window.navigator.userAgent.indexOf("Firefox") > 0; + }, + startsWith: function OSF_Outil$startsWith(originalString, patternToCheck, browserIsIE) { + if (browserIsIE) { + return originalString.substr(0, patternToCheck.length) === patternToCheck; + } + else { + return originalString.startsWith(patternToCheck); + } + }, + containsPort: function OSF_Outil$containsPort(url, protocol, hostname, portNumber) { + return this.startsWith(url, protocol + "//" + hostname + ":" + portNumber, true) || this.startsWith(url, hostname + ":" + portNumber, true); + }, + getRedundandPortString: function OSF_Outil$getRedundandPortString(url, parser) { + if (!url || !parser) + return ""; + if (parser.protocol == "https:" && this.containsPort(url, "https:", parser.hostname, "443")) + return ":443"; + else if (parser.protocol == "http:" && this.containsPort(url, "http:", parser.hostname, "80")) + return ":80"; + return ""; + }, + removeChar: function OSF_Outil$removeChar(url, indexOfCharToRemove) { + if (indexOfCharToRemove < url.length - 1) + return url.substring(0, indexOfCharToRemove) + url.substring(indexOfCharToRemove + 1); + else if (indexOfCharToRemove == url.length - 1) + return url.substring(0, url.length - 1); + else + return url; + }, + cleanUrlOfChar: function OSF_Outil$cleanUrlOfChar(url, charToClean) { + var i; + for (i = 0; i < url.length; i++) { + if (url.charAt(i) === charToClean) { + if (i + 1 >= url.length) { + return this.removeChar(url, i); + } + else if (charToClean === '/') { + if (url.charAt(i + 1) === '?' || url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + else if (charToClean === '?') { + if (url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + } + } + return url; + }, + cleanUrl: function OSF_Outil$cleanUrl(url) { + url = this.cleanUrlOfChar(url, '/'); + url = this.cleanUrlOfChar(url, '?'); + url = this.cleanUrlOfChar(url, '#'); + if (url.substr(0, 8) == "https://") { + var portIndex = url.indexOf(":443"); + if (portIndex != -1) { + if (portIndex == url.length - 4 || url.charAt(portIndex + 4) == "/" || url.charAt(portIndex + 4) == "?" || url.charAt(portIndex + 4) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 4); + } + } + } + else if (url.substr(0, 7) == "http://") { + var portIndex = url.indexOf(":80"); + if (portIndex != -1) { + if (portIndex == url.length - 3 || url.charAt(portIndex + 3) == "/" || url.charAt(portIndex + 3) == "?" || url.charAt(portIndex + 3) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 3); + } + } + } + return url; + }, + parseUrl: function OSF_Outil$parseUrl(url, enforceHttps) { + if (enforceHttps === void 0) { enforceHttps = false; } + if (typeof url === "undefined" || !url) { + return undefined; + } + var notHttpsErrorMessage = "NotHttps"; + var invalidUrlErrorMessage = "InvalidUrl"; + var isIEBoolean = this.isIE(); + var parsedUrlObj = { + protocol: undefined, + hostname: undefined, + host: undefined, + port: undefined, + pathname: undefined, + search: undefined, + hash: undefined, + isPortPartOfUrl: undefined + }; + try { + if (isIEBoolean) { + var parser = document.createElement("a"); + parser.href = url; + if (!parser || !parser.protocol || !parser.host || !parser.hostname || !parser.href + || this.cleanUrl(parser.href).toLowerCase() !== this.cleanUrl(url).toLowerCase()) { + throw invalidUrlErrorMessage; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && parser.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + var redundandPortString = this.getRedundandPortString(url, parser); + parsedUrlObj.protocol = parser.protocol; + parsedUrlObj.hostname = parser.hostname; + parsedUrlObj.port = (redundandPortString == "") ? parser.port : ""; + parsedUrlObj.host = (redundandPortString != "") ? parser.hostname : parser.host; + parsedUrlObj.pathname = (isIEBoolean ? "/" : "") + parser.pathname; + parsedUrlObj.search = parser.search; + parsedUrlObj.hash = parser.hash; + parsedUrlObj.isPortPartOfUrl = this.containsPort(url, parser.protocol, parser.hostname, parser.port); + } + else { + var urlObj = new URL(url); + if (urlObj && urlObj.protocol && urlObj.host && urlObj.hostname) { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && urlObj.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + parsedUrlObj.protocol = urlObj.protocol; + parsedUrlObj.hostname = urlObj.hostname; + parsedUrlObj.port = urlObj.port; + parsedUrlObj.host = urlObj.host; + parsedUrlObj.pathname = urlObj.pathname; + parsedUrlObj.search = urlObj.search; + parsedUrlObj.hash = urlObj.hash; + parsedUrlObj.isPortPartOfUrl = urlObj.host.lastIndexOf(":" + urlObj.port) == (urlObj.host.length - urlObj.port.length - 1); + } + } + } + catch (err) { + if (err.message === notHttpsErrorMessage) + throw err; + } + return parsedUrlObj; + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) { + if (sourceObj == null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr = []; + for (var i = 0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj = sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property] = sourceObj[property]; + } + } + return copyObj; + } + }, + createObject: function OSF_Outil$createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + }, + addClass: function OSF_OUtil$addClass(elmt, val) { + if (!OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + if (className) { + elmt.setAttribute(_classN, className + " " + val); + } + else { + elmt.setAttribute(_classN, val); + } + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) { + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findNextPos = function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && backward) { + return -1; + } + else if (currPos === allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if (all.length === 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, backward); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findCurrPos = function (all, curr) { + var i = 0; + for (; i < all.length; i++) { + if (all[i] === curr) { + return i; + } + } + return -1; + }; + var findNextPos = function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && shift) { + return -1; + } + else if (currPos === allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all, curr); + next = findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, shift); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + isNullOrUndefined: function OSF_OUtil$isNullOrUndefined(value) { + if (typeof (value) === "undefined") { + return true; + } + if (value === null) { + return true; + } + return false; + }, + stringEndsWith: function OSF_OUtil$stringEndsWith(value, subString) { + if (!OSF.OUtil.isNullOrUndefined(value) && !OSF.OUtil.isNullOrUndefined(subString)) { + if (subString.length > value.length) { + return false; + } + if (value.substr(value.length - subString.length) === subString) { + return true; + } + } + return false; + }, + hashCode: function OSF_OUtil$hashCode(str) { + var hash = 0; + if (!OSF.OUtil.isNullOrUndefined(str)) { + var i = 0; + var len = str.length; + while (i < len) { + hash = (hash << 5) - hash + str.charCodeAt(i++) | 0; + } + } + return hash; + }, + getValue: function OSF_OUtil$getValue(value, defaultValue) { + if (OSF.OUtil.isNullOrUndefined(value)) { + return defaultValue; + } + return value; + }, + externalNativeFunctionExists: function OSF_OUtil$externalNativeFunctionExists(type) { + return type === 'unknown' || type !== 'undefined'; + } + }; +})(); +OSF.OUtil.Guid = (function () { + var hexCode = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result = ""; + var tick = (new Date()).getTime(); + var index = 0; + for (; index < 32 && tick > 0; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + }; +})(); +try { + (function () { + OSF.Flights = OSF.OUtil.parseFlights(true); + })(); +} +catch (ex) { } +window.OSF = OSF; +OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614, + Visio: 8388615, + OneNoteAndroid: 4194305 +}; +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +}; +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +}; +OSF.AgaveHostAction = { + "Select": 0, + "UnSelect": 1, + "CancelDialog": 2, + "InsertAgave": 3, + "CtrlF6In": 4, + "CtrlF6Exit": 5, + "CtrlF6ExitShift": 6, + "SelectWithError": 7, + "NotifyHostError": 8, + "RefreshAddinCommands": 9, + "PageIsReady": 10, + "TabIn": 11, + "TabInShift": 12, + "TabExit": 13, + "TabExitShift": 14, + "EscExit": 15, + "F2Exit": 16, + "ExitNoFocusable": 17, + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20, + "UpdateTargetUrl": 21, + "InstallCustomFunctions": 22, + "SendTelemetryEvent": 23, + "UninstallCustomFunctions": 24, + "SendMessage": 25, + "LaunchExtensionComponent": 26, + "StopExtensionComponent": 27, + "RestartExtensionComponent": 28, + "EnableTaskPaneHeaderButton": 29, + "DisableTaskPaneHeaderButton": 30, + "TaskPaneHeaderButtonClicked": 31, + "RemoveAppCommandsAddin": 32, + "RefreshRibbonGallery": 33, + "GetOriginalControlId": 34, + "OfficeJsReady": 35, + "InsertDevManifest": 36, + "InsertDevManifestError": 37, + "SendCustomerContent": 38, + "KeyboardShortcuts": 39 +}; +OSF.SharedConstants = { + "NotificationConversationIdSuffix": '_ntf' +}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix, featureGates, officeTheme, initialDisplayMode) { + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this._featureGates = featureGates; + this._officeTheme = officeTheme; + this._initialDisplayMode = initialDisplayMode; + this.get_id = function get_id() { return this._id; }; + this.get_appName = function get_appName() { return this._appName; }; + this.get_appVersion = function get_appVersion() { return this._appVersion; }; + this.get_appUILocale = function get_appUILocale() { return this._appUILocale; }; + this.get_dataLocale = function get_dataLocale() { return this._dataLocale; }; + this.get_docUrl = function get_docUrl() { return this._docUrl; }; + this.get_clientMode = function get_clientMode() { return this._clientMode; }; + this.get_bindings = function get_bindings() { return this._bindings; }; + this.get_settings = function get_settings() { return this._settings; }; + this.get_reason = function get_reason() { return this._reason; }; + this.get_osfControlType = function get_osfControlType() { return this._osfControlType; }; + this.get_eToken = function get_eToken() { return this._eToken; }; + this.get_correlationId = function get_correlationId() { return this._correlationId; }; + this.get_appInstanceId = function get_appInstanceId() { return this._appInstanceId; }; + this.get_touchEnabled = function get_touchEnabled() { return this._touchEnabled; }; + this.get_commerceAllowed = function get_commerceAllowed() { return this._commerceAllowed; }; + this.get_appMinorVersion = function get_appMinorVersion() { return this._appMinorVersion; }; + this.get_requirementMatrix = function get_requirementMatrix() { return this._requirementMatrix; }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() { return this._dialogRequirementMatrix; }; + this.get_hostCustomMessage = function get_hostCustomMessage() { return this._hostCustomMessage; }; + this.get_hostFullVersion = function get_hostFullVersion() { return this._hostFullVersion; }; + this.get_isDialog = function get_isDialog() { return this._isDialog; }; + this.get_clientWindowHeight = function get_clientWindowHeight() { return this._clientWindowHeight; }; + this.get_clientWindowWidth = function get_clientWindowWidth() { return this._clientWindowWidth; }; + this.get_addinName = function get_addinName() { return this._addinName; }; + this.get_appDomains = function get_appDomains() { return this._appDomains; }; + this.get_featureGates = function get_featureGates() { return this._featureGates; }; + this.get_officeTheme = function get_officeTheme() { return this._officeTheme; }; + this.get_initialDisplayMode = function get_initialDisplayMode() { return this._initialDisplayMode ? this._initialDisplayMode : 0; }; +}; +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 +}; +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 +}; +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Client", Microsoft.Office); +OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened", + ControlActivation: "controlActivation" +}; +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType = { + All: "all" +}; +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + JsonData: "jsonData", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + AllowConsentPrompt: "allowConsentPrompt", + ForMSGraphAccess: "forMSGraphAccess", + AllowSignInPrompt: "allowSignInPrompt", + JsonPayload: "jsonPayload", + EnableNewHosts: "enableNewHosts", + AccountTypeFilter: "accountTypeFilter", + AddinTrustId: "addinTrustId", + Reserved: "reserved", + Tcid: "tcid", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + PromptBeforeOpen: "promptBeforeOpen", + EnforceAppDomain: "enforceAppDomain", + UrlNoHostInfo: "urlNoHostInfo", + TargetOrigin: "targetOrigin", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64", + FormId: "formId" +}; +OSF.OUtil.setNamespace("DDA", OSF); +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 +}; +OSF.DDA.PropertyDescriptors = { + AsyncResultStatus: "AsyncResultStatus" +}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { + if (eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || + eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) { + return id + "_" + eventType; + } + else { + return eventType; + } +}; +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidGetAuthContextMethod: 99, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, + dispidInsertFormMethod: 106, + dispidDisplayRibbonCalloutAsyncMethod: 109, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidExecuteFeature: 146, + dispidQueryFeature: 147, + dispidGetNestedAppAuthContextMethod: 205, + dispidMethodMax: 205 +}; +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidOlkRecurrenceChangedEvent: 49, + dispidOlkAttachmentsChangedEvent: 50, + dispidOlkEnhancedLocationsChangedEvent: 51, + dispidOlkInfobarClickedEvent: 52, + dispidOlkSelectedItemsChangedEvent: 53, + dispidOlkSensitivityLabelChangedEvent: 54, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 +}; +OSF.DDA.ErrorCodeManager = (function () { + var _errorMappings = {}; + return { + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) { + var errorArgs = _errorMappings[errorCode]; + if (!errorArgs) { + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + } + else { + if (!errorArgs.name) { + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + } + if (!errorArgs.message) { + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message; + } + } + return errorArgs; + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) { + _errorMappings[errorCode] = errorNameMessage; + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1000, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2000, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3000, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4000, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5000, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeOperationCancelled: 5014, + ooeWorkbookHidden: 5015, + ooeWriteNotSupportedWhenModalDialogOpen: 5016, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeRequestPayloadSizeLimitExceeded: 5103, + ooeResponsePayloadSizeLimitExceeded: 5104, + ooeCustomXmlNodeNotFound: 6000, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7000, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8000, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11000, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12000, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeModalDialogOpen: 12012, + ooeDocumentIsInactive: 12013, + ooeDialogParentIsMinimized: 12014, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010, + ooeResourceNotAllowed: 13011, + ooeSSOUnsupportedPlatform: 13012, + ooeSSOCallThrottled: 13013, + ooeAccessDenied: 13990, + ooeGeneralException: 13991 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidReadForBlankRow }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnMatrixData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { name: stringNS.L_InvalidBinding, message: stringNS.L_InvalidColumnsForBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { name: stringNS.L_SaveSettingsError, message: stringNS.L_SettingsCannotSave }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { name: stringNS.L_SettingsStaleError, message: stringNS.L_SettingsAreStale }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { name: stringNS.L_HostError, message: stringNS.L_OperationNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { name: stringNS.L_InternalError, message: stringNS.L_InternalErrorDescription }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { name: stringNS.L_PermissionDenied, message: stringNS.L_DocumentReadOnly }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { name: stringNS.L_EventRegistrationError, message: stringNS.L_EventHandlerNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { name: stringNS.L_InvalidAPICall, message: stringNS.L_InvalidApiCallInContext }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { name: stringNS.L_ShuttingDown, message: stringNS.L_ShuttingDown }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { name: stringNS.L_UnsupportedEnumeration, message: stringNS.L_UnsupportedEnumerationMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden] = { name: stringNS.L_APICallFailed, message: stringNS.L_WorkbookHiddenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen] = { name: stringNS.L_APICallFailed, message: stringNS.L_WriteNotSupportedWhenModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestPayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_ResponsePayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { name: stringNS.L_CustomXmlOutOfDateName, message: stringNS.L_CustomXmlOutOfDateMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { name: stringNS.L_CannotNavigateTo, message: stringNS.L_CannotNavigateTo }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { name: stringNS.L_SpecifiedIdNotExist, message: stringNS.L_SpecifiedIdNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { name: stringNS.L_NavOutOfBound, message: stringNS.L_NavOutOfBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { name: stringNS.L_DataWriteReminder, message: stringNS.L_CellDataAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { name: stringNS.L_MissingParameter, message: stringNS.L_ElementMissing }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidCellsValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidTableOptionValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidFormatValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_RowIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_ColIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_FormatValueOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { name: stringNS.L_FormattingReminder, message: stringNS.L_CellFormatAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { name: stringNS.L_MemoryLimit, message: stringNS.L_CloseFileBeforeRetrieve }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { name: stringNS.L_NetworkProblem, message: stringNS.L_NetworkProblemRetrieveFile }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { name: stringNS.L_InvalidValue, message: stringNS.L_SliceSizeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAlreadyOpened }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NetworkProblem }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { name: stringNS.L_DialogNavigateError, message: stringNS.L_DialogInvalidScheme }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAddressNotTrusted }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_ModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DocumentIsInactive }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogParentIsMinimized }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform] = { name: stringNS.L_APINotSupported, message: stringNS.L_SSOUnsupportedPlatform }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled] = { name: stringNS.L_OperationCancelledError, message: stringNS.L_OperationCancelledErrorMessage }; + } + }; +})(); +(function (OfficeExt) { + var Requirement; + (function (Requirement) { + var RequirementVersion = (function () { + function RequirementVersion() { + } + return RequirementVersion; + }()); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = (function () { + function RequirementMatrix(_setMap) { + this.isSetSupported = function _isSetSupported(name, minVersion) { + if (name == undefined) { + return false; + } + if (minVersion == undefined) { + minVersion = 0; + } + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if (sets.hasOwnProperty(name.toLowerCase())) { + var setMaxVersion = sets[name.toLowerCase()]; + try { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.major > 0 && + setMaxVersionNum.minor >= 0 && + setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor >= minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion = function (version) { + version = version + ""; + var temp = version.split("."); + var major = 0; + var minor = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } + } + var result = { "minor": minor, "major": major }; + return result; + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this); + } + return RequirementMatrix; + }()); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = (function () { + function DefaultSetRequirement(setMap) { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) { + for (var name in addedSet) { + this._sets[name] = addedSet[name]; + } + }; + this._sets = setMap; + } + return DefaultSetRequirement; + }()); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultRequiredDialogSetRequirement = (function (_super) { + __extends(DefaultRequiredDialogSetRequirement, _super); + function DefaultRequiredDialogSetRequirement() { + return _super.call(this, { + "dialogapi": 1.1 + }) || this; + } + return DefaultRequiredDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultRequiredDialogSetRequirement = DefaultRequiredDialogSetRequirement; + var DefaultOptionalDialogSetRequirement = (function (_super) { + __extends(DefaultOptionalDialogSetRequirement, _super); + function DefaultOptionalDialogSetRequirement() { + return _super.call(this, { + "dialogorigin": 1.1 + }) || this; + } + return DefaultOptionalDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultOptionalDialogSetRequirement = DefaultOptionalDialogSetRequirement; + var ExcelClientDefaultSetRequirement = (function (_super) { + __extends(ExcelClientDefaultSetRequirement, _super); + function ExcelClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "excelapi": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = (function (_super) { + __extends(ExcelClientV1DefaultSetRequirement, _super); + function ExcelClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return ExcelClientV1DefaultSetRequirement; + }(ExcelClientDefaultSetRequirement)); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = (function (_super) { + __extends(OutlookClientDefaultSetRequirement, _super); + function OutlookClientDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = (function (_super) { + __extends(WordClientDefaultSetRequirement, _super); + function WordClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1, + "wordapi": 1.1 + }) || this; + } + return WordClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = (function (_super) { + __extends(WordClientV1DefaultSetRequirement, _super); + function WordClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2, + "imagecoercion": 1.1 + }); + return _this; + } + return WordClientV1DefaultSetRequirement; + }(WordClientDefaultSetRequirement)); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = (function (_super) { + __extends(PowerpointClientDefaultSetRequirement, _super); + function PowerpointClientDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = (function (_super) { + __extends(PowerpointClientV1DefaultSetRequirement, _super); + function PowerpointClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return PowerpointClientV1DefaultSetRequirement; + }(PowerpointClientDefaultSetRequirement)); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = (function (_super) { + __extends(ProjectClientDefaultSetRequirement, _super); + function ProjectClientDefaultSetRequirement() { + return _super.call(this, { + "selection": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ProjectClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = (function (_super) { + __extends(ExcelWebDefaultSetRequirement, _super); + function ExcelWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "file": 1.1 + }) || this; + } + return ExcelWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = (function (_super) { + __extends(WordWebDefaultSetRequirement, _super); + function WordWebDefaultSetRequirement() { + return _super.call(this, { + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "imagecoercion": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablecoercion": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = (function (_super) { + __extends(PowerpointWebDefaultSetRequirement, _super); + function PowerpointWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "settings": 1.1 + }) || this; + } + return PowerpointWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = (function (_super) { + __extends(OutlookWebDefaultSetRequirement, _super); + function OutlookWebDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = (function (_super) { + __extends(SwayWebDefaultSetRequirement, _super); + function SwayWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "documentevents": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return SwayWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = (function (_super) { + __extends(AccessWebDefaultSetRequirement, _super); + function AccessWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "partialtablebindings": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1 + }) || this; + } + return AccessWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = (function (_super) { + __extends(ExcelIOSDefaultSetRequirement, _super); + function ExcelIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = (function (_super) { + __extends(WordIOSDefaultSetRequirement, _super); + function WordIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = (function (_super) { + __extends(WordIOSV1DefaultSetRequirement, _super); + function WordIOSV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2 + }); + return _this; + } + return WordIOSV1DefaultSetRequirement; + }(WordIOSDefaultSetRequirement)); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = (function (_super) { + __extends(PowerpointIOSDefaultSetRequirement, _super); + function PowerpointIOSDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = (function (_super) { + __extends(OutlookIOSDefaultSetRequirement, _super); + function OutlookIOSDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.1 + }) || this; + } + return OutlookIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = (function () { + function RequirementsMatrixFactory() { + } + RequirementsMatrixFactory.initializeOsfDda = function () { + OSF.OUtil.setNamespace("Requirement", OSF.DDA); + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function (appContext) { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if (RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) { + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + } + else { + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})); + } + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function (appContext) { + var setRequirements = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + setRequirements = new DefaultSetRequirement(matrixItem); + } + else { + setRequirements = new DefaultRequiredDialogSetRequirement(); + var mainRequirement = appContext.get_requirementMatrix(); + if (mainRequirement != undefined && mainRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(mainRequirement.toLowerCase()); + for (var name in setRequirements._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + var dialogOptionalSetRequirement = new DefaultOptionalDialogSetRequirement(); + for (var name in dialogOptionalSetRequirement._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + } + } + return new RequirementMatrix(setRequirements); + }; + RequirementsMatrixFactory.getClientFullVersionString = function (appContext) { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || + appName == 4096 || + appName == 8192 || + appName == 65536; + if (isIOSClient && appContext.get_appVersion() == 1) { + if (appName == 4096 && appMinorVersion >= 15) { + appFullVersion = "16.00.01"; + } + else { + appFullVersion = "16.00"; + } + } + else if (appContext.get_appName() == 64) { + appFullVersion = appContext.get_appVersion(); + } + else { + if (appMinorVersion < 10) { + appMinorVersionString = "0" + appMinorVersion; + } + else { + appMinorVersionString = "" + appMinorVersion; + } + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString; + } + return appContext.get_appName() + "-" + appFullVersion; + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function () { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement(); + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory; + }()); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory; + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})); +})(OfficeExt || (OfficeExt = {})); +OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" +}; +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" +}; +OSF.NamespaceManager = (function OSF_NamespaceManager() { + var _userOffice; + var _useShortcut = false; + return { + enableShortcut: function OSF_NamespaceManager$enableShortcut() { + if (!_useShortcut) { + if (window.Office) { + _userOffice = window.Office; + } + else { + OSF.OUtil.setNamespace("Office", window); + } + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true; + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() { + if (_useShortcut) { + if (_userOffice) { + window.Office = _userOffice; + } + else { + OSF.OUtil.unsetNamespace("Office", window); + } + _useShortcut = false; + } + } + }; +})(); +OSF.NamespaceManager.enableShortcut(); +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { + if (useShortcut) { + OSF.NamespaceManager.enableShortcut(); + } + else { + OSF.NamespaceManager.disableShortcut(); + } +}; +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { + var promise; + if (str && typeof str == "string") { + var index = str.indexOf("#"); + if (index != -1) { + var op = str.substring(0, index); + var target = str.substring(index + 1); + switch (op) { + case "binding": + case "bindings": + if (target) { + promise = new OSF.DDA.BindingPromise(target); + } + break; + } + } + } + if (!promise) { + if (errorCallback) { + var callbackType = typeof errorCallback; + if (callbackType == "function") { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext, OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)); + } + else { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, callbackType); + } + } + } + else { + promise.onFail = errorCallback; + return promise; + } +}; +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { + OSF.OUtil.defineEnumerableProperties(this, { + "contentLanguage": { + value: officeAppContext.get_dataLocale() + }, + "displayLanguage": { + value: officeAppContext.get_appUILocale() + }, + "touchEnabled": { + value: officeAppContext.get_touchEnabled() + }, + "commerceAllowed": { + value: officeAppContext.get_commerceAllowed() + }, + "host": { + value: OfficeExt.HostName.Host.getInstance().getHost() + }, + "platform": { + value: OfficeExt.HostName.Host.getInstance().getPlatform() + }, + "isDialog": { + value: OSF._OfficeAppFactory.getHostInfo().isDialog + }, + "diagnostics": { + value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion()) + } + }); + if (license) { + OSF.OUtil.defineEnumerableProperty(this, "license", { + value: license + }); + } + if (officeAppContext.ui) { + OSF.OUtil.defineEnumerableProperty(this, "ui", { + value: officeAppContext.ui + }); + } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.webAuth) { + OSF.OUtil.defineEnumerableProperty(this, "webAuth", { + value: officeAppContext.webAuth + }); + } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } + if (officeAppContext.extensionLifeCycle) { + OSF.OUtil.defineEnumerableProperty(this, "extensionLifeCycle", { + value: officeAppContext.extensionLifeCycle + }); + } + if (officeAppContext.messaging) { + OSF.OUtil.defineEnumerableProperty(this, "messaging", { + value: officeAppContext.messaging + }); + } + if (officeAppContext.ui && officeAppContext.ui.taskPaneAction) { + OSF.OUtil.defineEnumerableProperty(this, "taskPaneAction", { + value: officeAppContext.ui.taskPaneAction + }); + } + if (officeAppContext.ui && officeAppContext.ui.ribbonGallery) { + OSF.OUtil.defineEnumerableProperty(this, "ribbonGallery", { + value: officeAppContext.ui.ribbonGallery + }); + } + if (officeAppContext.get_isDialog()) { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } + else { + if (document) { + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: document + }); + } + if (appOM) { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this, displayName, { + value: appOM + }); + } + if (officeAppContext.get_officeTheme()) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return officeAppContext.get_officeTheme(); + } + }); + } + else if (getOfficeTheme) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return getOfficeTheme(); + } + }); + } + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + if (officeAppContext.get_featureGates) { + var featureGates = officeAppContext.get_featureGates(); + if (featureGates && featureGates["EnablePublicThemeManager"]) { + var themeManager = new OSF.DDA.Theming.InternalThemeHandler(); + themeManager.InitializeThemeManager(); + OSF.OUtil.defineEnumerableProperty(this, "themeManager", { + value: themeManager + }); + } + } + } +}; +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { + OSF.DDA.OutlookContext.uber.constructor.call(this, appContext, null, license, appOM, getOfficeTheme); + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "roamingSettings", { + value: settings + }); + } + if (appContext.sensitivityLabelsCatalog) { + OSF.OUtil.defineEnumerableProperty(this, "sensitivityLabelsCatalog", { + value: appContext.sensitivityLabelsCatalog() + }); + } +}; +OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { + var mode; + switch (officeAppContext.get_clientMode()) { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break; + } + ; + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "settings", { + value: settings + }); + } + ; + OSF.OUtil.defineMutableProperties(this, { + "mode": { + value: mode + }, + "url": { + value: officeAppContext.get_docUrl() + } + }); +}; +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { + OSF.DDA.JsomDocument.uber.constructor.call(this, officeAppContext, settings); + if (bindingFacade) { + OSF.OUtil.defineEnumerableProperty(this, "bindings", { + get: function OSF_DDA_Document$GetBindings() { return bindingFacade; } + }); + } + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetSelectedDataAsync, + am.SetSelectedDataAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])); +}; +OSF.OUtil.extend(OSF.DDA.JsomDocument, OSF.DDA.Document); +OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension, "context", { + get: function Microsoft_Office_WebExtension$GetContext() { + var context; + if (OSF && OSF._OfficeAppFactory) { + context = OSF._OfficeAppFactory.getContext(); + } + return context; + } +}); +OSF.DDA.License = function OSF_DDA_License(eToken) { + OSF.OUtil.defineEnumerableProperty(this, "value", { + value: eToken + }); +}; +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function () { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, displayName); + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) { + for (var name in params) { + var param = params[name]; + var arg = args[name]; + if (param["enum"]) { + switch (typeof arg) { + case "string": + if (OSF.OUtil.listContainsValue(param["enum"], arg)) { + break; + } + case "undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + } + if (param["types"]) { + if (!OSF.OUtil.listContainsValue(param["types"], typeof arg)) { + throw getInvalidParameterString(); + } + } + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) { + if (userArgs.length < requiredCount) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + } + var requiredArgs = []; + var index; + for (index = 0; index < requiredCount; index++) { + requiredArgs.push(userArgs[index]); + } + this.verifyArguments(requiredParameters, requiredArgs); + var ret = {}; + for (index = 0; index < requiredCount; index++) { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if (param.verify) { + var isValid = param.verify(arg, caller, stateInfo); + if (!isValid) { + throw getInvalidParameterString(); + } + } + ret[param.name] = arg; + } + return ret; + }, + this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) { + options = options || {}; + for (var optionName in supportedOptions) { + if (!OSF.OUtil.listContainsKey(options, optionName)) { + var value = undefined; + var option = supportedOptions[optionName]; + if (option.calculate && requiredArgs) { + value = option.calculate(requiredArgs, caller, stateInfo); + } + if (!value && option.defaultValue !== undefined) { + value = option.defaultValue; + } + options[optionName] = value; + } + } + return options; + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) { + var callArgs = {}; + for (var r in required) { + callArgs[r] = required[r]; + } + for (var o in options) { + callArgs[o] = options[o]; + } + for (var s in privateStateCallbacks) { + callArgs[s] = privateStateCallbacks[s](caller, stateInfo); + } + if (checkCallArgs) { + callArgs = checkCallArgs(callArgs, caller, stateInfo); + } + return callArgs; + }; +}; +OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" +}; +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" +}; +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 +}; +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" +}; +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.AsyncMethodNames[entry] = am; + } +}; +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 2) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + case "function": + if (parameterCallback) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + } + else { + parameterCallback = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + if (parameterCallback) { + if (options[Microsoft.Office.WebExtension.Parameters.Callback]) { + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + } + else { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + } + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (onSucceeded) { + payload = onSucceeded(response, caller, callArgs); + } + else { + payload = response; + } + } + else { + if (onFailed) { + payload = onFailed(status, response); + } + else { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + } + return payload; + }; + this.getCallArgs = function (suppliedArgs) { + var options, parameterCallback; + for (var i = suppliedArgs.length - 1; i >= requiredCount; i--) { + var argument = suppliedArgs[i]; + switch (typeof argument) { + case "object": + options = argument; + break; + case "function": + parameterCallback = argument; + break; + } + } + options = options || {}; + if (parameterCallback) { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + return options; + }; +}; +OSF.DDA.AsyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [], supportedOptions, privateStateCallbacks, params.onSucceeded, params.onFailed, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function (callDefinition) { + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { + OSF.OUtil.defineEnumerableProperties(this, { + "name": { + value: name + }, + "message": { + value: message + }, + "code": { + value: code + } + }); +}; +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { + OSF.OUtil.defineEnumerableProperties(this, { + "value": { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value] + }, + "status": { + value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded + } + }); + if (initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) { + OSF.OUtil.defineEnumerableProperty(this, "asyncContext", { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context] + }); + } + if (errorArgs) { + OSF.OUtil.defineEnumerableProperty(this, "error", { + value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + }); + } +}; +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if (callback) { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + } + else { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs, errorArgs)); + } +}; +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.SyncMethodNames[entry] = am; + } +}; +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 1) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; +}; +OSF.DDA.SyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [], supportedOptions, params.privateStateCallbacks, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function (callDefinition) { + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.ListType = (function () { + var listTypes = {}; + return { + setListType: function OSF_DDA_ListType$AddListType(t, prop) { listTypes[t] = prop; }, + isListType: function OSF_DDA_ListType$IsListType(t) { return OSF.OUtil.listContainsKey(listTypes, t); }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) { return listTypes[t]; } + }; +})(); +OSF.DDA.HostParameterMap = function (specialProcessor, mappings) { + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function (data) { + if (data != null && data.rows !== undefined) { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData; + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.JsonData] = { + toHost: function (data) { return data; }, + fromHost: function (data) { return typeof data === "string" ? JSON.parse(data) : data; } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) { + var ret = preimageSet ? {} : undefined; + for (var entry in preimageSet) { + var preimage = preimageSet[entry]; + var image; + if (OSF.DDA.ListType.isListType(entry)) { + image = []; + for (var subEntry in preimage) { + image.push(mapValues(preimage[subEntry], mapping)); + } + } + else if (OSF.OUtil.listContainsKey(dynamicTypes, entry)) { + image = dynamicTypes[entry][mapping](preimage); + } + else if (mapping == fromHostMap && specialProcessor.preserveNesting(entry)) { + image = mapValues(preimage, mapping); + } + else { + var maps = mappings[entry]; + if (maps) { + var map = maps[mapping]; + if (map) { + image = map[preimage]; + if (image === undefined) { + image = preimage; + } + } + } + else { + image = preimage; + } + } + ret[entry] = image; + } + return ret; + } + ; + function generateArguments(imageSet, parameters) { + var ret; + for (var param in parameters) { + var arg; + if (specialProcessor.isComplexType(param)) { + arg = generateArguments(imageSet, mappings[param][toHostMap]); + } + else { + arg = imageSet[param]; + } + if (arg != undefined) { + if (!ret) { + ret = {}; + } + var index = parameters[param]; + if (index == self) { + index = param; + } + ret[index] = specialProcessor.pack(param, arg); + } + } + return ret; + } + ; + function extractArguments(source, parameters, extracted) { + if (!extracted) { + extracted = {}; + } + for (var param in parameters) { + var index = parameters[param]; + var value; + if (index == self) { + value = source; + } + else if (index == sourceData) { + extracted[param] = source.toArray(); + continue; + } + else { + value = source[index]; + } + if (value === null || value === undefined) { + extracted[param] = undefined; + } + else { + value = specialProcessor.unpack(param, value); + var map; + if (specialProcessor.isComplexType(param)) { + map = mappings[param][fromHostMap]; + if (specialProcessor.preserveNesting(param)) { + extracted[param] = extractArguments(value, map); + } + else { + extractArguments(value, map, extracted); + } + } + else { + if (OSF.DDA.ListType.isListType(param)) { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for (var item in value) { + extractedValues[item] = extractArguments(value[item], map); + } + extracted[param] = extractedValues; + } + else { + extracted[param] = value; + } + } + } + } + return extracted; + } + ; + function applyMap(mapName, preimage, mapping) { + var parameters = mappings[mapName][mapping]; + var image; + if (mapping == "toHost") { + var imageSet = mapValues(preimage, mapping); + image = generateArguments(imageSet, parameters); + } + else if (mapping == "fromHost") { + var argumentSet = extractArguments(preimage, parameters); + image = mapValues(argumentSet, mapping); + } + return image; + } + ; + if (!mappings) { + mappings = {}; + } + this.addMapping = function (mapName, description) { + var toHost, fromHost; + if (description.map) { + toHost = description.map; + fromHost = {}; + for (var preimage in toHost) { + var image = toHost[preimage]; + if (image == self) { + image = preimage; + } + fromHost[image] = preimage; + } + } + else { + toHost = description.toHost; + fromHost = description.fromHost; + } + var pair = mappings[mapName]; + if (pair) { + var currMap = pair[toHostMap]; + for (var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for (var fh in currMap) + fromHost[fh] = currMap[fh]; + } + else { + pair = mappings[mapName] = {}; + } + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost; + }; + this.toHost = function (mapName, preimage) { return applyMap(mapName, preimage, toHostMap); }; + this.fromHost = function (mapName, image) { return applyMap(mapName, image, fromHostMap); }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function (ct) { specialProcessor.addComplexType(ct); }; + this.getDynamicType = function (dt) { return specialProcessor.getDynamicType(dt); }; + this.setDynamicType = function (dt, handler) { specialProcessor.setDynamicType(dt, handler); }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function (preimageSet, mapping) { return mapValues(preimageSet, mapping); }; +}; +OSF.DDA.SpecialProcessor = function (complexTypes, dynamicTypes) { + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) { + complexTypes.push(ct); + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) { + return dynamicTypes[dt]; + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) { + dynamicTypes[dt] = handler; + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) { + return OSF.OUtil.listContainsValue(complexTypes, t); + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) { + return OSF.OUtil.listContainsKey(dynamicTypes, p); + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) { + var pn = []; + if (OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if (OSF.DDA.DataNodeEventProperties) { + pn = pn.concat([ + OSF.DDA.DataNodeEventProperties.OldNode, + OSF.DDA.DataNodeEventProperties.NewNode, + OSF.DDA.DataNodeEventProperties.NextSiblingNode + ]); + } + return OSF.OUtil.listContainsValue(pn, p); + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].toHost(arg); + } + else { + value = arg; + } + return value; + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.DDA.getDecoratedParameterMap = function (specialProcessor, initialDefs) { + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + } + parameterMap.define = function define(definition) { + var args = {}; + var toHost = createObject(definition.toHost); + if (definition.invertible) { + args.map = toHost; + } + else if (definition.canonical) { + args.toHost = args.fromHost = toHost; + } + else { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost); + } + parameterMap.addMapping(definition.type, args); + if (definition.isComplexType) + parameterMap.addComplexType(definition.type); + }; + for (var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap; +}; +OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + "GoToByIdAsync": did.dispidNavigateToMethod, + "GetSelectedDataAsync": did.dispidGetSelectedDataMethod, + "SetSelectedDataAsync": did.dispidSetSelectedDataMethod, + "GetDocumentCopyChunkAsync": did.dispidGetDocumentCopyChunkMethod, + "ReleaseDocumentCopyAsync": did.dispidReleaseDocumentCopyMethod, + "GetDocumentCopyAsync": did.dispidGetDocumentCopyMethod, + "AddFromSelectionAsync": did.dispidAddBindingFromSelectionMethod, + "AddFromPromptAsync": did.dispidAddBindingFromPromptMethod, + "AddFromNamedItemAsync": did.dispidAddBindingFromNamedItemMethod, + "GetAllAsync": did.dispidGetAllBindingsMethod, + "GetByIdAsync": did.dispidGetBindingMethod, + "ReleaseByIdAsync": did.dispidReleaseBindingMethod, + "GetDataAsync": did.dispidGetBindingDataMethod, + "SetDataAsync": did.dispidSetBindingDataMethod, + "AddRowsAsync": did.dispidAddRowsMethod, + "AddColumnsAsync": did.dispidAddColumnsMethod, + "DeleteAllDataValuesAsync": did.dispidClearAllRowsMethod, + "RefreshAsync": did.dispidLoadSettingsMethod, + "SaveAsync": did.dispidSaveSettingsMethod, + "GetActiveViewAsync": did.dispidGetActiveViewMethod, + "GetFilePropertiesAsync": did.dispidGetFilePropertiesMethod, + "GetOfficeThemeAsync": did.dispidGetOfficeThemeMethod, + "GetDocumentThemeAsync": did.dispidGetDocumentThemeMethod, + "ClearFormatsAsync": did.dispidClearFormatsMethod, + "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, + "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, + "GetAuthContextAsync": did.dispidGetAuthContextMethod, + "GetNestedAppAuthContextAsync": did.dispidGetNestedAppAuthContextMethod, + "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, + "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, + "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, + "InsertFormAsync": did.dispidInsertFormMethod, + "ExecuteFeature": did.dispidExecuteFeature, + "QueryFeature": did.dispidQueryFeature, + "AddDataPartAsync": did.dispidAddDataPartMethod, + "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, + "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, + "GetPartXmlAsync": did.dispidGetDataPartXmlMethod, + "GetPartNodesAsync": did.dispidGetDataPartNodesMethod, + "DeleteDataPartAsync": did.dispidDeleteDataPartMethod, + "GetNodeValueAsync": did.dispidGetDataNodeValueMethod, + "GetNodeXmlAsync": did.dispidGetDataNodeXmlMethod, + "GetRelativeNodesAsync": did.dispidGetDataNodesMethod, + "SetNodeValueAsync": did.dispidSetDataNodeValueMethod, + "SetNodeXmlAsync": did.dispidSetDataNodeXmlMethod, + "AddDataPartNamespaceAsync": did.dispidAddDataNamespaceMethod, + "GetDataPartNamespaceAsync": did.dispidGetDataUriByPrefixMethod, + "GetDataPartPrefixAsync": did.dispidGetDataPrefixByUriMethod, + "GetNodeTextAsync": did.dispidGetDataNodeTextMethod, + "SetNodeTextAsync": did.dispidSetDataNodeTextMethod, + "GetSelectedTask": did.dispidGetSelectedTaskMethod, + "GetTask": did.dispidGetTaskMethod, + "GetWSSUrl": did.dispidGetWSSUrlMethod, + "GetTaskField": did.dispidGetTaskFieldMethod, + "GetSelectedResource": did.dispidGetSelectedResourceMethod, + "GetResourceField": did.dispidGetResourceFieldMethod, + "GetProjectField": did.dispidGetProjectFieldMethod, + "GetSelectedView": did.dispidGetSelectedViewMethod, + "GetTaskByIndex": did.dispidGetTaskByIndexMethod, + "GetResourceByIndex": did.dispidGetResourceByIndexMethod, + "SetTaskField": did.dispidSetTaskFieldMethod, + "SetResourceField": did.dispidSetResourceFieldMethod, + "GetMaxTaskIndex": did.dispidGetMaxTaskIndexMethod, + "GetMaxResourceIndex": did.dispidGetMaxResourceIndexMethod, + "CreateTask": did.dispidCreateTaskMethod + }; + for (var method in methodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = methodMap[method]; + } + } + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var syncMethodMap = { + "MessageParent": did.dispidMessageParentMethod, + "SendMessage": did.dispidSendMessageMethod + }; + for (var method in syncMethodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = syncMethodMap[method]; + } + } + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + "SettingsChanged": did.dispidSettingsChangedEvent, + "DocumentSelectionChanged": did.dispidDocumentSelectionChangedEvent, + "BindingSelectionChanged": did.dispidBindingSelectionChangedEvent, + "BindingDataChanged": did.dispidBindingDataChangedEvent, + "ActiveViewChanged": did.dispidActiveViewChangedEvent, + "OfficeThemeChanged": did.dispidOfficeThemeChangedEvent, + "DocumentThemeChanged": did.dispidDocumentThemeChangedEvent, + "AppCommandInvoked": did.dispidAppCommandInvokedEvent, + "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, + "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, + "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, + "RecurrenceChanged": did.dispidOlkRecurrenceChangedEvent, + "AttachmentsChanged": did.dispidOlkAttachmentsChangedEvent, + "EnhancedLocationsChanged": did.dispidOlkEnhancedLocationsChangedEvent, + "InfobarClicked": did.dispidOlkInfobarClickedEvent, + "SelectedItemsChanged": did.dispidOlkSelectedItemsChangedEvent, + "SensitivityLabelChanged": did.dispidOlkSensitivityLabelChangedEvent, + "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, + "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, + "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, + "DataNodeInserted": did.dispidDataNodeAddedEvent, + "DataNodeReplaced": did.dispidDataNodeReplacedEvent, + "DataNodeDeleted": did.dispidDataNodeDeletedEvent + }; + for (var event in eventMap) { + if (jsom[event]) { + dispIdMap[jsom[event]] = eventMap[event]; + } + } + function IsObjectEvent(dispId) { + return (dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { + if (typeof ex == "number") { + if (!callArgs) { + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + } + OSF.DDA.issueAsyncResult(callArgs, ex, OSF.DDA.ErrorCodeManager.getErrorArgs(ex)); + } + else { + throw ex; + } + } + ; + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) { + var callArgs; + try { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) { + window.Excel._RedirectV1APIs = true; + } + if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if (richApiInExcelMethodSubstitution.preprocess) { + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + } + var ctx = new window.Excel.RequestContext(); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); + ctx.sync() + .then(function () { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if (richApiInExcelMethodSubstitution.postprocess) { + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); + } + if (status != 0) { + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, response); + })["catch"](function (error) { + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure, null); + }); + } + else { + var hostCallArgs; + if (parameterMap.toHost) { + hostCallArgs = parameterMap.toHost(dispId, callArgs); + } + else { + hostCallArgs = callArgs; + } + var startTime = (new Date()).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + "dispId": dispId, + "hostCallArgs": hostCallArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": function (status, hostResponseArgs) { + var responseArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (parameterMap.fromHost) { + responseArgs = parameterMap.fromHost(dispId, hostResponseArgs); + } + else { + responseArgs = hostResponseArgs; + } + } + else { + responseArgs = hostResponseArgs; + } + var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); + OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry && !(OSF.ConstantNames && OSF.ConstantNames.IsCustomFunctionsRuntime)) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } + } + }); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); + if (!added) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; + } + } + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if (isPopupWindow) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return; + } + var dispId_1 = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId_1); + var targetId_1 = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId_1) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId_1, + "targetId": targetId_1, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = null; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web" && dispId_1 == OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent) { + args = hostArgs; + } + else { + args = parameterMap.fromHost(dispId_1, hostArgs); + } + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId_1, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId_1, args)); + } + }); + } + else { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var status, removeSuccess; + if (handler === null) { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + else { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration + }); + } + else { + onEnsureRegistration(status); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller, isModal) { + var callArgs; + var targetId; + var asyncMethodCall = null; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) { + var payload; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + else { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status, onSucceedArgs, caller, callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + } + OSF.DDA.issueAsyncResult(callArgs, status, payload); + } + try { + if (dialogMessageEvent == undefined || dialogOtherEvent == undefined) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + } + if (!isModal) { + if (OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + } + else { + if (OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.id]; + } + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + callArgs["isModal"] = isModal; + targetId = JSON.stringify(callArgs); + if (!OSF.DialogShownStatus.hasDialogShown) { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + } + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = parameterMap.fromHost(dispId, hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent, caller, args); + if (event.type == dialogOtherEvent) { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]); + } + eventDispatch.fireOrQueueEvent(event); + if (args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false; + } + } + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) { + var callArgs; + var dialogMessageEvent, dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false; + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": closeCallback + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + if (closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed, OSF.DDA.AsyncMethodNames.CloseAsync.displayName, closeStatus); + } + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; +}; +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { + for (var entry in asyncMethodNames) { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if (!target[name]) { + OSF.OUtil.defineEnumerableProperty(target, name, { + value: (function (asyncMethod) { + return function () { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod, arguments, target, privateState); + }; + })(method) + }); + } + } +}; +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if (!target[add]) { + OSF.OUtil.defineEnumerableProperty(target, add, { + value: function () { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments, eventDispatch, target, isPopupWindow); + } + }); + } + if (!target[remove]) { + OSF.OUtil.defineEnumerableProperty(target, remove, { + value: function () { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments, eventDispatch, target); + } + }); + } +}; +(function (OfficeExt) { + var loadMsAjax = false; + var MsAjaxTypeHelper = (function () { + function MsAjaxTypeHelper() { + } + MsAjaxTypeHelper.isInstanceOfType = function (type, instance) { + if (typeof (instance) === "undefined" || instance === null) + return false; + if (instance instanceof type) + return true; + var instanceType = instance.constructor; + if (!instanceType || (typeof (instanceType) !== "function") || !instanceType.__typeName || instanceType.__typeName === 'Object') { + instanceType = Object; + } + return !!(instanceType === type) || + (instanceType.__typeName && type.__typeName && instanceType.__typeName === type.__typeName); + }; + return MsAjaxTypeHelper; + }()); + OfficeExt.MsAjaxTypeHelper = MsAjaxTypeHelper; + var MsAjaxError = (function () { + function MsAjaxError() { + } + MsAjaxError.create = function (message, errorInfo) { + var err = new Error(message); + err.message = message; + if (errorInfo) { + for (var v in errorInfo) { + err[v] = errorInfo[v]; + } + } + err.popStackFrame(); + return err; + }; + MsAjaxError.parameterCount = function (message) { + var displayMessage = "Sys.ParameterCountException: " + (message ? message : "Parameter count mismatch."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.ParameterCountException' }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argument = function (paramName, message) { + var displayMessage = "Sys.ArgumentException: " + (message ? message : "Value does not fall within the expected range."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentNull = function (paramName, message) { + var displayMessage = "Sys.ArgumentNullException: " + (message ? message : "Value cannot be null."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentOutOfRange = function (paramName, actualValue, message) { + var displayMessage = "Sys.ArgumentOutOfRangeException: " + (message ? message : "Specified argument was out of the range of valid values."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + if (typeof (actualValue) !== "undefined" && actualValue !== null) { + displayMessage += "\n" + MsAjaxString.format("Actual value was {0}.", actualValue); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentType = function (paramName, actualType, expectedType, message) { + var displayMessage = "Sys.ArgumentTypeException: "; + if (message) { + displayMessage += message; + } + else if (actualType && expectedType) { + displayMessage += MsAjaxString.format("Object of type '{0}' cannot be converted to type '{1}'.", actualType.getName ? actualType.getName() : actualType, expectedType.getName ? expectedType.getName() : expectedType); + } + else { + displayMessage += "Object cannot be converted to the required type."; + } + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentUndefined = function (paramName, message) { + var displayMessage = "Sys.ArgumentUndefinedException: " + (message ? message : "Value cannot be undefined."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.invalidOperation = function (message) { + var displayMessage = "Sys.InvalidOperationException: " + (message ? message : "Operation is not valid due to the current state of the object."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.InvalidOperationException' }); + err.popStackFrame(); + return err; + }; + return MsAjaxError; + }()); + OfficeExt.MsAjaxError = MsAjaxError; + var MsAjaxString = (function () { + function MsAjaxString() { + } + MsAjaxString.format = function (format) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var source = format; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10); + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }; + MsAjaxString.startsWith = function (str, prefix) { + return (str.substr(0, prefix.length) === prefix); + }; + return MsAjaxString; + }()); + OfficeExt.MsAjaxString = MsAjaxString; + var MsAjaxDebug = (function () { + function MsAjaxDebug() { + } + MsAjaxDebug.trace = function (text) { + if (typeof Debug !== "undefined" && Debug.writeln) + Debug.writeln(text); + if (window.console && window.console.log) + window.console.log(text); + if (window.opera && window.opera.postError) + window.opera.postError(text); + if (window.debugService && window.debugService.trace) + window.debugService.trace(text); + var a = document.getElementById("TraceConsole"); + if (a && a.tagName.toUpperCase() === "TEXTAREA") { + a.appendChild(document.createTextNode(text + "\n")); + } + }; + return MsAjaxDebug; + }()); + OfficeExt.MsAjaxDebug = MsAjaxDebug; + if (!loadMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) { + var registerTypeInternal = function registerTypeInternal(type, name, isClass) { + if (type.__typeName === undefined || type.__typeName === null) { + type.__typeName = name; + } + if (type.__class === undefined || type.__class === null) { + type.__class = isClass; + } + }; + registerTypeInternal(Function, "Function", true); + registerTypeInternal(Error, "Error", true); + registerTypeInternal(Object, "Object", true); + registerTypeInternal(String, "String", true); + registerTypeInternal(Boolean, "Boolean", true); + registerTypeInternal(Date, "Date", true); + registerTypeInternal(Number, "Number", true); + registerTypeInternal(RegExp, "RegExp", true); + registerTypeInternal(Array, "Array", true); + if (!Function.createCallback) { + Function.createCallback = function Function$createCallback(method, context) { + var e = Function._validateParams(arguments, [ + { name: "method", type: Function }, + { name: "context", mayBeNull: true } + ]); + if (e) + throw e; + return function () { + var l = arguments.length; + if (l > 0) { + var args = []; + for (var i = 0; i < l; i++) { + args[i] = arguments[i]; + } + args[l] = context; + return method.apply(this, args); + } + return method.call(this, context); + }; + }; + } + if (!Function.createDelegate) { + Function.createDelegate = function Function$createDelegate(instance, method) { + var e = Function._validateParams(arguments, [ + { name: "instance", mayBeNull: true }, + { name: "method", type: Function } + ]); + if (e) + throw e; + return function () { + return method.apply(instance, arguments); + }; + }; + } + if (!Function._validateParams) { + Function._validateParams = function (params, expectedParams, validateParameterCount) { + var e, expectedLength = expectedParams.length; + validateParameterCount = validateParameterCount || (typeof (validateParameterCount) === "undefined"); + e = Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i = 0, l = params.length; i < l; i++) { + var expectedParam = expectedParams[Math.min(i, expectedLength - 1)], paramName = expectedParam.name; + if (expectedParam.parameterArray) { + paramName += "[" + (i - expectedLength + 1) + "]"; + } + else if (!validateParameterCount && (i >= expectedLength)) { + break; + } + e = Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; + }; + } + if (!Function._validateParameterCount) { + Function._validateParameterCount = function (params, expectedParams, validateParameterCount) { + var i, error, expectedLen = expectedParams.length, actualLen = params.length; + if (actualLen < expectedLen) { + var minParams = expectedLen; + for (i = 0; i < expectedLen; i++) { + var param = expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error = true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error = true; + for (i = 0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error = false; + break; + } + } + } + if (error) { + var e = MsAjaxError.parameterCount(); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!Function._validateParameter) { + Function._validateParameter = function (param, expectedParam, paramName) { + var e, expectedType = expectedParam.type, expectedInteger = !!expectedParam.integer, expectedDomElement = !!expectedParam.domElement, mayBeNull = !!expectedParam.mayBeNull; + e = Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType = expectedParam.elementType, elementMayBeNull = !!expectedParam.elementMayBeNull; + if (expectedType === Array && typeof (param) !== "undefined" && param !== null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger = !!expectedParam.elementInteger, expectedElementDomElement = !!expectedParam.elementDomElement; + for (var i = 0; i < param.length; i++) { + var elem = param[i]; + e = Function._validateParameterType(elem, expectedElementType, expectedElementInteger, expectedElementDomElement, elementMayBeNull, paramName + "[" + i + "]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; + }; + } + if (!Function._validateParameterType) { + Function._validateParameterType = function (param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof (param) === "undefined") { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param === null) { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && !OfficeExt.MsAjaxTypeHelper.isInstanceOfType(expectedType, param)) { + e = OfficeExt.MsAjaxError.argumentType(paramName, typeof (param), expectedType); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!window.Type) { + window.Type = Function; + } + if (!Type.registerNamespace) { + Type.registerNamespace = function (ns) { + var namespaceParts = ns.split('.'); + var currentNamespace = window; + for (var i = 0; i < namespaceParts.length; i++) { + currentNamespace[namespaceParts[i]] = currentNamespace[namespaceParts[i]] || {}; + currentNamespace = currentNamespace[namespaceParts[i]]; + } + }; + } + if (!Type.prototype.registerClass) { + Type.prototype.registerClass = function (cls) { cls = {}; }; + } + if (typeof (Sys) === "undefined") { + Type.registerNamespace('Sys'); + } + if (!Error.prototype.popStackFrame) { + Error.prototype.popStackFrame = function () { + if (arguments.length !== 0) + throw MsAjaxError.parameterCount(); + if (typeof (this.stack) === "undefined" || this.stack === null || + typeof (this.fileName) === "undefined" || this.fileName === null || + typeof (this.lineNumber) === "undefined" || this.lineNumber === null) { + return; + } + var stackFrames = this.stack.split("\n"); + var currentFrame = stackFrames[0]; + var pattern = this.fileName + ":" + this.lineNumber; + while (typeof (currentFrame) !== "undefined" && + currentFrame !== null && + currentFrame.indexOf(pattern) === -1) { + stackFrames.shift(); + currentFrame = stackFrames[0]; + } + var nextFrame = stackFrames[1]; + if (typeof (nextFrame) === "undefined" || nextFrame === null) { + return; + } + var nextFrameParts = nextFrame.match(/@(.*):(\d+)$/); + if (typeof (nextFrameParts) === "undefined" || nextFrameParts === null) { + return; + } + this.fileName = nextFrameParts[1]; + this.lineNumber = parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack = stackFrames.join("\n"); + }; + } + OsfMsAjaxFactory.msAjaxError = MsAjaxError; + OsfMsAjaxFactory.msAjaxString = MsAjaxString; + OsfMsAjaxFactory.msAjaxDebug = MsAjaxDebug; + } +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.setNamespace("SafeArray", OSF.DDA); +OSF.DDA.SafeArray.Response = { + Status: 0, + Payload: 1 +}; +OSF.DDA.SafeArray.UniqueArguments = { + Offset: "offset", + Run: "run", + BindingSpecificData: "bindingSpecificData", + MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" +}; +OSF.OUtil.setNamespace("Delegate", OSF.DDA.SafeArray); +OSF.DDA.SafeArray.Delegate._onException = function OSF_DDA_SafeArray_Delegate$OnException(ex, args) { + var status; + var statusNumber = ex.number; + if (statusNumber) { + switch (statusNumber) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2147467259: + if (args.dispId == OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + break; + case -2146828283: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147209089: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147208704: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + if (args.onComplete) { + args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } +}; +OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod = function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) { + var status; + var number = ex.number; + if (number) { + switch (number) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; +}; +OSF.DDA.SafeArray.Delegate.SpecialProcessor = function OSF_DDA_SafeArray_Delegate_SpecialProcessor() { + function _2DVBArrayToJaggedArray(vbArr) { + var ret; + try { + var rows = vbArr.ubound(1); + var cols = vbArr.ubound(2); + vbArr = vbArr.toArray(); + if (rows == 1 && cols == 1) { + ret = [vbArr]; + } + else { + ret = []; + for (var row = 0; row < rows; row++) { + var rowArr = []; + for (var col = 0; col < cols; col++) { + var datum = vbArr[row * cols + col]; + if (datum != OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) { + rowArr.push(datum); + } + } + if (rowArr.length > 0) { + ret.push(rowArr); + } + } + } + } + catch (ex) { + } + return ret; + } + var complexTypes = []; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = (function () { + var tableRows = 0; + var tableHeaders = 1; + return { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) { + if (OSF.DDA.TableDataProperties && typeof data != "string" && data[OSF.DDA.TableDataProperties.TableRows] !== undefined) { + var tableData = []; + tableData[tableRows] = data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.DDA.TableDataProperties.TableHeaders]; + data = tableData; + } + return data; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) { + var ret; + if (hostArgs.toArray) { + var dimensions = hostArgs.dimensions(); + if (dimensions === 2) { + ret = _2DVBArrayToJaggedArray(hostArgs); + } + else { + var array = hostArgs.toArray(); + if (array.length === 2 && ((array[0] != null && array[0].toArray) || (array[1] != null && array[1].toArray))) { + ret = {}; + ret[OSF.DDA.TableDataProperties.TableRows] = _2DVBArrayToJaggedArray(array[tableRows]); + ret[OSF.DDA.TableDataProperties.TableHeaders] = _2DVBArrayToJaggedArray(array[tableHeaders]); + } + else { + ret = array; + } + } + } + else { + ret = hostArgs; + } + return ret; + } + }; + })(); + OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes); + this.unpack = function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) { + var toArraySupported = arg !== undefined && arg.toArray !== undefined; + value = toArraySupported ? arg.toArray() : arg || {}; + } + else if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor); +OSF.DDA.SafeArray.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor(), [ + { + type: Microsoft.Office.WebExtension.Parameters.ValueFormat, + toHost: [ + { name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, value: 0 }, + { name: Microsoft.Office.WebExtension.ValueFormat.Formatted, value: 1 } + ] + }, + { + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [ + { name: Microsoft.Office.WebExtension.FilterType.All, value: 0 } + ] + } +]); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, + fromHost: [ + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, value: 0 }, + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) { + function toArray(args) { + var arrArgs = args; + if (OSF.OUtil.isArray(args)) { + var len = arrArgs.length; + for (var i = 0; i < len; i++) { + arrArgs[i] = toArray(arrArgs[i]); + } + } + else if (OSF.OUtil.isDate(args)) { + arrArgs = args.getVarDate(); + } + else if (typeof args === "object" && !OSF.OUtil.isArray(args)) { + arrArgs = []; + for (var index in args) { + if (!OSF.OUtil.isFunction(args[index])) { + arrArgs[index] = toArray(args[index]); + } + } + } + return arrArgs; + } + function fromSafeArray(value) { + var ret = value; + if (value != null && value.toArray) { + var arrayResult = value.toArray(); + ret = new Array(arrayResult.length); + for (var i = 0; i < arrayResult.length; i++) { + ret[i] = fromSafeArray(arrayResult[i]); + } + } + return ret; + } + try { + if (args.onCalling) { + args.onCalling(); + } + OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { + var result; + var status; + if (typeof hostResponseArgs === "number") { + result = []; + status = hostResponseArgs; + } + else { + result = hostResponseArgs.toArray(); + status = result[OSF.DDA.SafeArray.Response.Status]; + } + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) { + var payload = result[OSF.DDA.SafeArray.Response.Payload]; + payload = fromSafeArray(payload); + if (payload != null) { + if (!args._chunkResultData) { + args._chunkResultData = new Array(); + } + args._chunkResultData[payload[0]] = payload[1]; + } + return false; + } + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (result.length > 2) { + payload = []; + for (var i = 1; i < result.length; i++) + payload[i - 1] = result[i]; + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + if (args._chunkResultData) { + payload = fromSafeArray(payload); + if (payload != null) { + var expectedChunkCount = payload[payload.length - 1]; + if (args._chunkResultData.length == expectedChunkCount) { + payload[payload.length - 1] = args._chunkResultData; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + } + } + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + args.onComplete(status, payload); + } + return true; + }); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent = function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) { + var startTime = (new Date()).getTime(); + return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) { + if (args.onReceiving) { + args.onReceiving(); + } + var status = hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + }; +}; +OSF.DDA.SafeArray.Delegate.registerEventAsync = function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + try { + OSF.ClientHostController.registerEvent(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.unregisterEventAsync = function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.unregisterEvent(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.ClientMode = { + ReadWrite: 0, + ReadOnly: 1 +}; +OSF.DDA.RichInitializationReason = { + 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, + 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened +}; +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._initializeSettings = this.initializeSettings; +}; +OSF.InitializationHelper.prototype.deserializeSettings = function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) { + var settings; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if (storageSettings) { + serializedSettings = JSON.parse(storageSettings); + } + else { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if (refreshSupported) { + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + } + else { + settings = new OSF.DDA.Settings(deserializedSettings); + } + return settings; +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication() { +}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)); +}; +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { + var license = new OSF.DDA.License(appContext.get_eToken()); + var getOfficeThemeHandler = (OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme) ? OSF.DDA.OfficeTheme.getOfficeTheme : null; + if (appContext.get_isDialog()) { + if (OSF.DDA.UI.ChildUI) { + appContext.ui = new OSF.DDA.UI.ChildUI(); + } + } + else { + if (OSF.DDA.UI.ParentUI) { + appContext.ui = new OSF.DDA.UI.ParentUI(); + if (OfficeExt.Container) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.CloseContainerAsync]); + } + } + } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } + if (OSF.DDA.ExecuteFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.ExecuteFeature]); + } + if (OSF.DDA.QueryFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.QueryFeature]); + } + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + var asyncMethods = []; + var getAccessTokenMethod = OSF.DDA.AsyncMethodNames.GetAccessTokenAsync; + if (getAccessTokenMethod) { + asyncMethods.push(getAccessTokenMethod); + } + var authContextMethod = OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync; + if (authContextMethod) { + asyncMethods.push(authContextMethod); + } + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, asyncMethods); + } + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); + var getDelegateMethods, parameterMap; + getDelegateMethods = OSF.DDA.DispIdHost.getClientDelegateMethods; + parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods, parameterMap)); +}; +OSF.InitializationHelper.prototype.getInitializationReason = function (appContext) { return OSF.DDA.RichInitializationReason[appContext.get_reason()]; }; +OSF.DDA.DispIdHost.getClientDelegateMethods = function (actionId) { + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.SafeArray.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.SafeArray.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.SafeArray.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.SafeArray.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.SafeArray.Delegate.closeDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.SafeArray.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.SafeArray.Delegate.sendMessage; + if (OSF.DDA.AsyncMethodNames.RefreshAsync && actionId == OSF.DDA.AsyncMethodNames.RefreshAsync.id) { + var readSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + if (typeof (OSF.DDA.ClientSettingsManager.refresh) === "function") { + return OSF.DDA.ClientSettingsManager.refresh(onCalling, onReceiving); + } + else { + return OSF.DDA.ClientSettingsManager.read(onCalling, onReceiving); + } + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings); + } + if (OSF.DDA.AsyncMethodNames.SaveAsync && actionId == OSF.DDA.AsyncMethodNames.SaveAsync.id) { + var writeSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings], hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale], onCalling, onReceiving); + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings); + } + return delegateMethods; +}; +(function (OfficeExt) { + var MacRichClientHostController = (function () { + function MacRichClientHostController() { + } + MacRichClientHostController.prototype.execute = function (id, params, callback) { + setTimeout(function () { + window.external.Execute(id, params, callback); + }, 0); + }; + MacRichClientHostController.prototype.registerEvent = function (id, targetId, handler, callback) { + setTimeout(function () { + window.external.RegisterEvent(id, targetId, handler, callback); + }, 0); + }; + MacRichClientHostController.prototype.unregisterEvent = function (id, targetId, callback) { + setTimeout(function () { + window.external.UnregisterEvent(id, targetId, callback); + }, 0); + }; + MacRichClientHostController.prototype.openDialog = function (id, targetId, handler, callback) { + if (MacRichClientHostController.popup && !MacRichClientHostController.popup.closed) { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); + return; + } + var magicWord = "action=displayDialog"; + window.dialogAPIErrorCode = undefined; + var fragmentSeparator = '#'; + var callArgs = JSON.parse(targetId); + var callUrl = callArgs.url; + if (!callUrl) { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme); + return; + } + var urlParts = callUrl.split(fragmentSeparator); + var seperator = "?"; + if (urlParts[0].indexOf("?") > -1) { + seperator = "&"; + } + var width = screen.width * callArgs.width / 100; + var height = screen.height * callArgs.height / 100; + var params = "width=" + width + ", height=" + height; + urlParts[0] = urlParts[0].concat(seperator).concat(magicWord); + var openUrl = urlParts.join(fragmentSeparator); + MacRichClientHostController.popup = window.open(openUrl, "", params); + function receiveMessage(event) { + if (event.source == MacRichClientHostController.popup) { + try { + var messageObj = JSON.parse(event.data); + if (messageObj.dialogMessage) { + handler(id, [OSF.DialogMessageType.DialogMessageReceived, messageObj.dialogMessage.messageContent]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:" + event.data); + } + } + } + MacRichClientHostController.DialogEventListener = receiveMessage; + function checkWindowCloseNotifyError(errorCode) { + handler(id, [errorCode]); + } + function checkWindowClose() { + try { + if (MacRichClientHostController.popup == null || MacRichClientHostController.popup.closed) { + window.clearInterval(MacRichClientHostController.interval); + window.removeEventListener("message", MacRichClientHostController.DialogEventListener); + MacRichClientHostController.NotifyError = null; + handler(id, [OSF.DialogMessageType.DialogClosed]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed."); + } + } + if (MacRichClientHostController.popup != undefined && window.dialogAPIErrorCode == undefined) { + window.addEventListener("message", MacRichClientHostController.DialogEventListener); + MacRichClientHostController.interval = window.setInterval(checkWindowClose, 500); + MacRichClientHostController.NotifyError = checkWindowCloseNotifyError; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + var error = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + if (window.dialogAPIErrorCode) { + error = window.dialogAPIErrorCode; + } + callback(error); + } + }; + MacRichClientHostController.prototype.messageParent = function (params) { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + var messageObj = { dialogMessage: { messageType: OSF.DialogMessageType.DialogMessageReceived, messageContent: message } }; + window.opener.postMessage(JSON.stringify(messageObj), window.location.origin); + }; + MacRichClientHostController.prototype.closeDialog = function (id, targetId, callback) { + if (MacRichClientHostController.popup) { + if (MacRichClientHostController.interval) { + window.clearInterval(MacRichClientHostController.interval); + } + MacRichClientHostController.popup.close(); + MacRichClientHostController.popup = null; + window.removeEventListener("message", MacRichClientHostController.DialogEventListener); + MacRichClientHostController.NotifyError = null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + }; + MacRichClientHostController.prototype.sendMessage = function (params) { + }; + MacRichClientHostController.prototype.closeSdxDialog = function (context) { + }; + MacRichClientHostController.prototype.resizeSdxDialog = function (width, height) { + }; + return MacRichClientHostController; + }()); + OfficeExt.MacRichClientHostController = MacRichClientHostController; +})(OfficeExt || (OfficeExt = {})); +var OSF = OSF || {}; +var OSFWebkit; +(function (OSFWebkit) { + var WebkitSafeArray = (function () { + function WebkitSafeArray(data) { + this.data = data; + this.safeArrayFlag = this.isSafeArray(data); + } + WebkitSafeArray.prototype.dimensions = function () { + var dimensions = 0; + if (this.safeArrayFlag) { + dimensions = this.data[0][0]; + } + else if (this.isArray()) { + dimensions = 2; + } + return dimensions; + }; + WebkitSafeArray.prototype.getItem = function () { + var array = []; + var element = null; + if (this.safeArrayFlag) { + array = this.toArray(); + } + else { + array = this.data; + } + element = array; + for (var i = 0; i < arguments.length; i++) { + element = element[arguments[i]]; + } + return element; + }; + WebkitSafeArray.prototype.lbound = function (dimension) { + return 0; + }; + WebkitSafeArray.prototype.ubound = function (dimension) { + var ubound = 0; + if (this.safeArrayFlag) { + ubound = this.data[0][dimension]; + } + else if (this.isArray()) { + if (dimension == 1) { + return this.data.length; + } + else if (dimension == 2) { + if (OSF.OUtil.isArray(this.data[0])) { + return this.data[0].length; + } + else if (this.data[0] != null) { + return 1; + } + } + } + return ubound; + }; + WebkitSafeArray.prototype.toArray = function () { + if (this.isArray() == false) { + return this.data; + } + var arr = []; + var startingIndex = this.safeArrayFlag ? 1 : 0; + for (var i = startingIndex; i < this.data.length; i++) { + var element = this.data[i]; + if (this.isSafeArray(element)) { + arr.push(new WebkitSafeArray(element)); + } + else { + arr.push(element); + } + } + return arr; + }; + WebkitSafeArray.prototype.isArray = function () { + return OSF.OUtil.isArray(this.data); + }; + WebkitSafeArray.prototype.isSafeArray = function (obj) { + var isSafeArray = false; + if (OSF.OUtil.isArray(obj) && OSF.OUtil.isArray(obj[0])) { + var bounds = obj[0]; + var dimensions = bounds[0]; + if (bounds.length != dimensions + 1) { + return false; + } + var expectedArraySize = 1; + for (var i = 1; i < bounds.length; i++) { + var dimension = bounds[i]; + if (isFinite(dimension) == false) { + return false; + } + expectedArraySize = expectedArraySize * dimension; + } + expectedArraySize++; + isSafeArray = (expectedArraySize == obj.length); + } + return isSafeArray; + }; + return WebkitSafeArray; + }()); + OSFWebkit.WebkitSafeArray = WebkitSafeArray; +})(OSFWebkit || (OSFWebkit = {})); +(function (OSFWebkit) { + var ScriptMessaging; + (function (ScriptMessaging) { + var scriptMessenger = null; + function agaveHostCallback(callbackId, params) { + scriptMessenger.agaveHostCallback(callbackId, params); + } + ScriptMessaging.agaveHostCallback = agaveHostCallback; + function agaveHostEventCallback(callbackId, params) { + scriptMessenger.agaveHostEventCallback(callbackId, params); + } + ScriptMessaging.agaveHostEventCallback = agaveHostEventCallback; + function GetScriptMessenger() { + if (scriptMessenger == null) { + if (HostScriptMessaging.IsSupportedByHost()) { + scriptMessenger = new HostScriptMessaging(); + } + else { + scriptMessenger = new WebkitScriptMessaging("OSF.ScriptMessaging.agaveHostCallback", "OSF.ScriptMessaging.agaveHostEventCallback"); + } + } + return scriptMessenger; + } + ScriptMessaging.GetScriptMessenger = GetScriptMessenger; + var EventHandlerCallback = (function () { + function EventHandlerCallback(id, targetId, handler) { + this.id = id; + this.targetId = targetId; + this.handler = handler; + } + return EventHandlerCallback; + }()); + var HostScriptMessaging = (function () { + function HostScriptMessaging() { + this.eventHandlers = []; + } + HostScriptMessaging.IsSupportedByHost = function () { + return !!window._osfHostAPI; + }; + HostScriptMessaging.prototype.invokeMethod = function (handlerName, methodId, params, callback) { + var internalCallback = function (params) { + var callbacksDone = callback(params); + if (callbacksDone === undefined || callbacksDone === true) { + return true; + } + return false; + }; + window._osfHostAPI(handlerName, this.constructMessagingArgs(methodId, params), internalCallback); + }; + HostScriptMessaging.prototype.registerEvent = function (handlerName, methodId, dispId, targetId, handler, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + var internalCallback = function (params) { + callback(params); + return true; + }; + var internalEventHandler = function (params) { + handler(params); + return false; + }; + var callbackInfo = window._osfHostRegisterEvent(handlerName, this.constructMessagingArgs(methodId, hostArgs), internalEventHandler, internalCallback); + this.eventHandlers.push({ targetId: targetId, dispId: dispId, callbackId: callbackInfo.eventCallbackId }); + }; + HostScriptMessaging.prototype.unregisterEvent = function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + var internalCallback = function (params) { + callback(params); + return true; + }; + window._osfHostAPI(handlerName, this.constructMessagingArgs(methodId, hostArgs), internalCallback); + for (var i = this.eventHandlers.length - 1; i >= 0; i--) { + var handler = this.eventHandlers[i]; + if (handler.dispId === dispId && handler.targetId === targetId) { + this.eventHandlers.splice(i, 1); + window._osfHostUnregisterCallback(handler.callbackId); + } + } + }; + HostScriptMessaging.prototype.agaveHostCallback = function (callbackId, params) { + }; + HostScriptMessaging.prototype.agaveHostEventCallback = function (callbackId, params) { + }; + HostScriptMessaging.prototype.constructMessagingArgs = function (methodId, params) { + var messagingArgs = { + params: params, + methodId: methodId + }; + return messagingArgs; + }; + return HostScriptMessaging; + }()); + var WebkitScriptMessaging = (function () { + function WebkitScriptMessaging(methodCallbackName, eventCallbackName) { + this.callingIndex = 0; + this.callbackList = {}; + this.eventHandlerList = {}; + this.asyncMethodCallbackFunctionName = methodCallbackName; + this.eventCallbackFunctionName = eventCallbackName; + this.conversationId = WebkitScriptMessaging.getCurrentTimeMS().toString(); + } + WebkitScriptMessaging.prototype.invokeMethod = function (handlerName, methodId, params, callback) { + var messagingArgs = {}; + this.postWebkitMessage(messagingArgs, handlerName, methodId, params, callback); + }; + WebkitScriptMessaging.prototype.registerEvent = function (handlerName, methodId, dispId, targetId, handler, callback) { + var messagingArgs = { + eventCallbackFunction: this.eventCallbackFunctionName + }; + var hostArgs = { + id: dispId, + targetId: targetId + }; + var correlationId = this.postWebkitMessage(messagingArgs, handlerName, methodId, hostArgs, callback); + this.eventHandlerList[correlationId] = new EventHandlerCallback(dispId, targetId, handler); + }; + WebkitScriptMessaging.prototype.unregisterEvent = function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + for (var key in this.eventHandlerList) { + if (this.eventHandlerList.hasOwnProperty(key)) { + var eventCallback = this.eventHandlerList[key]; + if (eventCallback.id == dispId && eventCallback.targetId == targetId) { + delete this.eventHandlerList[key]; + } + } + } + this.invokeMethod(handlerName, methodId, hostArgs, callback); + }; + WebkitScriptMessaging.prototype.agaveHostCallback = function (callbackId, params) { + var callbackFunction = this.callbackList[callbackId]; + if (callbackFunction) { + var callbacksDone = callbackFunction(params); + if (callbacksDone === undefined || callbacksDone === true) { + delete this.callbackList[callbackId]; + } + } + }; + WebkitScriptMessaging.prototype.agaveHostEventCallback = function (callbackId, params) { + var eventCallback = this.eventHandlerList[callbackId]; + if (eventCallback) { + eventCallback.handler(params); + } + }; + WebkitScriptMessaging.prototype.postWebkitMessage = function (messagingArgs, handlerName, methodId, params, callback) { + messagingArgs.methodId = methodId; + messagingArgs.params = params; + var correlationId = ""; + if (callback) { + correlationId = this.generateCorrelationId(); + this.callbackList[correlationId] = callback; + messagingArgs.callbackId = correlationId; + messagingArgs.callbackFunction = this.asyncMethodCallbackFunctionName; + } + var invokePostMessage = function () { + window.webkit.messageHandlers[handlerName].postMessage(JSON.stringify(messagingArgs)); + }; + var currentTimestamp = WebkitScriptMessaging.getCurrentTimeMS(); + if (this.lastMessageTimestamp == null || (currentTimestamp - this.lastMessageTimestamp >= WebkitScriptMessaging.MESSAGE_TIME_DELTA)) { + invokePostMessage(); + this.lastMessageTimestamp = currentTimestamp; + } + else { + this.lastMessageTimestamp += WebkitScriptMessaging.MESSAGE_TIME_DELTA; + setTimeout(function () { + invokePostMessage(); + }, this.lastMessageTimestamp - currentTimestamp); + } + return correlationId; + }; + WebkitScriptMessaging.prototype.generateCorrelationId = function () { + ++this.callingIndex; + return this.conversationId + this.callingIndex; + }; + WebkitScriptMessaging.getCurrentTimeMS = function () { + return (new Date).getTime(); + }; + WebkitScriptMessaging.MESSAGE_TIME_DELTA = 10; + return WebkitScriptMessaging; + }()); + })(ScriptMessaging = OSFWebkit.ScriptMessaging || (OSFWebkit.ScriptMessaging = {})); +})(OSFWebkit || (OSFWebkit = {})); +OSF.ScriptMessaging = OSFWebkit.ScriptMessaging; +(function (OSFWebkit) { + OSFWebkit.MessageHandlerName = "Agave"; + OSFWebkit.PopupMessageHandlerName = "WefPopupHandler"; + var AppContextProperties; + (function (AppContextProperties) { + AppContextProperties[AppContextProperties["Settings"] = 0] = "Settings"; + AppContextProperties[AppContextProperties["SolutionReferenceId"] = 1] = "SolutionReferenceId"; + AppContextProperties[AppContextProperties["AppType"] = 2] = "AppType"; + AppContextProperties[AppContextProperties["MajorVersion"] = 3] = "MajorVersion"; + AppContextProperties[AppContextProperties["MinorVersion"] = 4] = "MinorVersion"; + AppContextProperties[AppContextProperties["RevisionVersion"] = 5] = "RevisionVersion"; + AppContextProperties[AppContextProperties["APIVersionSequence"] = 6] = "APIVersionSequence"; + AppContextProperties[AppContextProperties["AppCapabilities"] = 7] = "AppCapabilities"; + AppContextProperties[AppContextProperties["APPUILocale"] = 8] = "APPUILocale"; + AppContextProperties[AppContextProperties["AppDataLocale"] = 9] = "AppDataLocale"; + AppContextProperties[AppContextProperties["BindingCount"] = 10] = "BindingCount"; + AppContextProperties[AppContextProperties["DocumentUrl"] = 11] = "DocumentUrl"; + AppContextProperties[AppContextProperties["ActivationMode"] = 12] = "ActivationMode"; + AppContextProperties[AppContextProperties["ControlIntegrationLevel"] = 13] = "ControlIntegrationLevel"; + AppContextProperties[AppContextProperties["SolutionToken"] = 14] = "SolutionToken"; + AppContextProperties[AppContextProperties["APISetVersion"] = 15] = "APISetVersion"; + AppContextProperties[AppContextProperties["CorrelationId"] = 16] = "CorrelationId"; + AppContextProperties[AppContextProperties["InstanceId"] = 17] = "InstanceId"; + AppContextProperties[AppContextProperties["TouchEnabled"] = 18] = "TouchEnabled"; + AppContextProperties[AppContextProperties["CommerceAllowed"] = 19] = "CommerceAllowed"; + AppContextProperties[AppContextProperties["RequirementMatrix"] = 20] = "RequirementMatrix"; + AppContextProperties[AppContextProperties["HostCustomMessage"] = 21] = "HostCustomMessage"; + AppContextProperties[AppContextProperties["HostFullVersion"] = 22] = "HostFullVersion"; + AppContextProperties[AppContextProperties["InitialDisplayMode"] = 23] = "InitialDisplayMode"; + AppContextProperties[AppContextProperties["FeatureGates"] = 24] = "FeatureGates"; + AppContextProperties[AppContextProperties["HostSettings"] = 25] = "HostSettings"; + AppContextProperties[AppContextProperties["OfficeThemeInfo"] = 26] = "OfficeThemeInfo"; + })(AppContextProperties = OSFWebkit.AppContextProperties || (OSFWebkit.AppContextProperties = {})); + var MethodId; + (function (MethodId) { + MethodId[MethodId["Execute"] = 1] = "Execute"; + MethodId[MethodId["RegisterEvent"] = 2] = "RegisterEvent"; + MethodId[MethodId["UnregisterEvent"] = 3] = "UnregisterEvent"; + MethodId[MethodId["WriteSettings"] = 4] = "WriteSettings"; + MethodId[MethodId["GetContext"] = 5] = "GetContext"; + MethodId[MethodId["SendMessage"] = 6] = "SendMessage"; + MethodId[MethodId["MessageParent"] = 7] = "MessageParent"; + MethodId[MethodId["SendMessage2"] = 8] = "SendMessage2"; + MethodId[MethodId["MessageParent2"] = 9] = "MessageParent2"; + })(MethodId = OSFWebkit.MethodId || (OSFWebkit.MethodId = {})); + var WebkitHostController = (function () { + function WebkitHostController(hostScriptProxy) { + this.hostScriptProxy = hostScriptProxy; + this.useFullDialogAPI = !!window._enableFullDialogAPI; + this.osfSupportsDialogOrigin = !!window._osfEnableDialogOrigin; + } + WebkitHostController.prototype.execute = function (id, params, callback) { + var hostParams = { + id: id, + apiArgs: params + }; + var agaveResponseCallback = function (payload) { + if (callback) { + var invokeArguments = []; + if (OSF.OUtil.isArray(payload)) { + for (var i = 0; i < payload.length; i++) { + var element = payload[i]; + if (OSF.OUtil.isArray(element)) { + element = new OSFWebkit.WebkitSafeArray(element); + } + invokeArguments.unshift(element); + } + } + return callback.apply(null, invokeArguments); + } + }; + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.Execute, hostParams, agaveResponseCallback); + }; + WebkitHostController.prototype.registerEvent = function (id, targetId, handler, callback) { + var agaveEventHandlerCallback = function (payload) { + var safeArraySource = payload; + var eventId = 0; + if (OSF.OUtil.isArray(payload) && payload.length >= 2) { + safeArraySource = payload[0]; + eventId = payload[1]; + } + if (handler) { + handler(eventId, new OSFWebkit.WebkitSafeArray(safeArraySource)); + } + }; + var agaveResponseCallback = function (payload) { + if (callback) { + return callback(new OSFWebkit.WebkitSafeArray(payload)); + } + }; + this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.RegisterEvent, id, targetId, agaveEventHandlerCallback, agaveResponseCallback); + }; + WebkitHostController.prototype.unregisterEvent = function (id, targetId, callback) { + var agaveResponseCallback = function (response) { + return callback(new OSFWebkit.WebkitSafeArray(response)); + }; + this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.UnregisterEvent, id, targetId, agaveResponseCallback); + }; + WebkitHostController.prototype.messageParent = function (params) { + if (this.useFullDialogAPI && params) { + var messageToParent = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + if (typeof messageToParent === "boolean") { + if (messageToParent === true) { + params[Microsoft.Office.WebExtension.Parameters.MessageToParent] = "true"; + } + else if (messageToParent === false) { + params[Microsoft.Office.WebExtension.Parameters.MessageToParent] = ""; + } + } + } + var message; + var methodId; + if (this.osfSupportsDialogOrigin && params[Microsoft.Office.WebExtension.Parameters.TargetOrigin]) { + message = this.useFullDialogAPI ? JSON.stringify(params) : params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + methodId = OSF.Webkit.MethodId.MessageParent2; + } + else { + message = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + methodId = OSF.Webkit.MethodId.MessageParent; + } + if (this.useFullDialogAPI) { + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, methodId, message, null); + } + else { + var messageObj = { dialogMessage: { messageType: OSF.DialogMessageType.DialogMessageReceived, messageContent: message } }; + var targetOrigin = methodId == OSF.Webkit.MethodId.MessageParent2 ? params[Microsoft.Office.WebExtension.Parameters.TargetOrigin] : window.location.origin; + window.opener.postMessage(JSON.stringify(messageObj), targetOrigin); + } + }; + WebkitHostController.prototype.openDialog = function (id, targetId, handler, callback) { + if (this.useFullDialogAPI) { + this.registerEvent(id, targetId, handler, callback); + return; + } + if (WebkitHostController.popup && !WebkitHostController.popup.closed) { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); + return; + } + var magicWord = "action=displayDialog"; + WebkitHostController.OpenDialogCallback = undefined; + var fragmentSeparator = '#'; + var callArgs = JSON.parse(targetId); + var callUrl = callArgs.url; + if (!callUrl) { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme); + return; + } + var urlParts = callUrl.split(fragmentSeparator); + var seperator = "?"; + if (urlParts[0].indexOf("?") > -1) { + seperator = "&"; + } + var width = screen.width * callArgs.width / 100; + var height = screen.height * callArgs.height / 100; + var params = "width=" + width + ", height=" + height; + urlParts[0] = urlParts[0].concat(seperator).concat(magicWord); + var openUrl = urlParts.join(fragmentSeparator); + WebkitHostController.popup = window.open(openUrl, "", params); + function receiveMessage(event) { + if (event.origin == window.location.origin) { + try { + var messageObj = JSON.parse(event.data); + if (messageObj.dialogMessage) { + handler(id, [OSF.DialogMessageType.DialogMessageReceived, messageObj.dialogMessage.messageContent, event.origin]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:" + event.data); + } + } + } + WebkitHostController.DialogEventListener = receiveMessage; + function checkWindowClose() { + try { + if (WebkitHostController.popup == null || WebkitHostController.popup.closed) { + window.clearInterval(WebkitHostController.interval); + window.removeEventListener("message", WebkitHostController.DialogEventListener); + WebkitHostController.NotifyError = null; + WebkitHostController.popup = null; + handler(id, [OSF.DialogMessageType.DialogClosed]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed."); + } + } + function OpenDialogCallbackNotifyError(errorCode) { + handler(id, [errorCode]); + } + WebkitHostController.OpenDialogCallback = function (code) { + if (code == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + window.addEventListener("message", WebkitHostController.DialogEventListener); + WebkitHostController.interval = window.setInterval(checkWindowClose, 1000); + WebkitHostController.NotifyError = OpenDialogCallbackNotifyError; + } + callback(code); + }; + }; + WebkitHostController.prototype.closeDialog = function (id, targetId, callback) { + if (this.useFullDialogAPI) { + this.unregisterEvent(id, targetId, callback); + } + else { + if (WebkitHostController.popup) { + if (WebkitHostController.interval) { + window.clearInterval(WebkitHostController.interval); + } + WebkitHostController.popup.close(); + WebkitHostController.popup = null; + window.removeEventListener("message", WebkitHostController.DialogEventListener); + WebkitHostController.NotifyError = null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + } + }; + WebkitHostController.prototype.sendMessage = function (params) { + var message; + var methodId; + if (this.osfSupportsDialogOrigin && params[Microsoft.Office.WebExtension.Parameters.TargetOrigin]) { + message = JSON.stringify(params); + methodId = OSF.Webkit.MethodId.SendMessage2; + } + else { + message = params[Microsoft.Office.WebExtension.Parameters.MessageContent]; + methodId = OSF.Webkit.MethodId.SendMessage; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message = message.toString(); + } + } + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, methodId, message, null); + }; + WebkitHostController.prototype.closeSdxDialog = function (context) { + }; + WebkitHostController.prototype.resizeSdxDialog = function (width, height) { + }; + return WebkitHostController; + }()); + OSFWebkit.WebkitHostController = WebkitHostController; +})(OSFWebkit || (OSFWebkit = {})); +OSF.Webkit = OSFWebkit; +OSF.initializeWebkitCommon = function OSF_initializeWebkitCommon() { + OSF.DDA.ClientSettingsManager = { + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) { + return function (args) { + var status, response; + var onComplete = function onComplete(status, response) { + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + args.onComplete(status, response); + } + }; + try { + hostDelegateMethod(args.hostCallArgs, args.onCalling, onComplete); + } + catch (ex) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response = { name: Strings.OfficeOM.L_InternalError, message: ex }; + onComplete(status, response); + } + }; + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + var initializationHelper = OSF._OfficeAppFactory.getInitializationHelper(); + var onReceivedContext = function onReceivedContext(appContext) { + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, appContext.get_settings()); + } + }; + initializationHelper.getAppContext(null, onReceivedContext); + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) { + var hostParams = {}; + var keys = []; + var values = []; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + hostParams["keys"] = keys; + hostParams["values"] = values; + if (onCalling) { + onCalling(); + } + var onWriteCompleted = function onWriteCompleted(status) { + if (onComplete) { + onComplete(status[0], null); + } + }; + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.WriteSettings, hostParams, onWriteCompleted); + } + }; + OSF.InitializationHelper.prototype.initializeSettings = function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) { + var serializedSettings = appContext.get_settings(); + var settings = this.deserializeSettings(serializedSettings, refreshSupported); + return settings; + }; + OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + var getInvocationCallback = function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(appContext) { + var returnedContext; + var appContextProperties = OSF.Webkit.AppContextProperties; + var appType = appContext[appContextProperties.AppType]; + var hostSettings = appContext[appContextProperties.Settings]; + var serializedSettings = {}; + var keys = hostSettings[0]; + var values = hostSettings[1]; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + var id = appContext[appContextProperties.SolutionReferenceId]; + var version = appContext[appContextProperties.MajorVersion]; + var minorVersion = appContext[appContextProperties.MinorVersion]; + var clientMode = appContext[appContextProperties.AppCapabilities]; + var UILocale = appContext[appContextProperties.APPUILocale]; + var dataLocale = appContext[appContextProperties.AppDataLocale]; + var docUrl = appContext[appContextProperties.DocumentUrl]; + var reason = appContext[appContextProperties.ActivationMode]; + var osfControlType = appContext[appContextProperties.ControlIntegrationLevel]; + var eToken = appContext[appContextProperties.SolutionToken]; + eToken = eToken ? eToken.toString() : ""; + var correlationId = appContext[appContextProperties.CorrelationId]; + var appInstanceId = appContext[appContextProperties.InstanceId]; + var touchEnabled = appContext[appContextProperties.TouchEnabled]; + var commerceAllowed = appContext[appContextProperties.CommerceAllowed]; + var requirementMatrix = appContext[appContextProperties.RequirementMatrix]; + var hostCustomMessage = appContext[appContextProperties.HostCustomMessage]; + var hostFullVersion = appContext[appContextProperties.HostFullVersion]; + var initialDisplayMode = appContext[appContextProperties.InitialDisplayMode]; + var featureGates = null; + if (appContext[appContextProperties.FeatureGates]) { + try { + featureGates = JSON.parse(appContext[appContextProperties.FeatureGates]); + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("Exception while creating the SDX FeatureGates object. Details: " + ex); + } + } + var srcOfficeThemeInfo = null; + if (appContext[appContextProperties.OfficeThemeInfo]) { + try { + srcOfficeThemeInfo = JSON.parse(appContext[appContextProperties.OfficeThemeInfo]); + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("Exception while parsing officeThemeInfo. Details: " + ex); + } + } + var officeThemeInfo = {}; + if (srcOfficeThemeInfo) { + officeThemeInfo = OSF.DDA.Theming.ConvertToOfficeTheme(srcOfficeThemeInfo); + } + returnedContext = new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, serializedSettings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, undefined, undefined, undefined, undefined, undefined, featureGates, officeThemeInfo, initialDisplayMode); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + }; + var handler; + if (this._hostInfo.isDialog && window.webkit.messageHandlers[OSF.Webkit.PopupMessageHandlerName]) { + handler = OSF.Webkit.PopupMessageHandlerName; + } + else { + handler = OSF.Webkit.MessageHandlerName; + } + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler, OSF.Webkit.MethodId.GetContext, [], getInvocationCallback); + }; +}; +(function (OfficeExt) { + var OfficeTheme; + (function (OfficeTheme) { + var OfficeThemeManager = (function () { + function OfficeThemeManager() { + this._osfOfficeTheme = null; + this._osfOfficeThemeTimeStamp = null; + } + OfficeThemeManager.prototype.getOfficeTheme = function () { + if (OSF.DDA._OsfControlContext) { + if (this._osfOfficeTheme && this._osfOfficeThemeTimeStamp && ((new Date()).getTime() - this._osfOfficeThemeTimeStamp < OfficeThemeManager._osfOfficeThemeCacheValidPeriod)) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo", 0); + } + } + else { + var startTime = (new Date()).getTime(); + var osfOfficeTheme = OSF.DDA._OsfControlContext.GetOfficeThemeInfo(); + var endTime = (new Date()).getTime(); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo", Math.abs(endTime - startTime)); + } + this._osfOfficeTheme = JSON.parse(osfOfficeTheme); + this._osfOfficeTheme = OSF.DDA.Theming.ConvertToOfficeTheme(this._osfOfficeTheme); + this._osfOfficeThemeTimeStamp = endTime; + } + return this._osfOfficeTheme; + } + }; + OfficeThemeManager.instance = function () { + if (OfficeThemeManager._instance == null) { + OfficeThemeManager._instance = new OfficeThemeManager(); + } + return OfficeThemeManager._instance; + }; + OfficeThemeManager._osfOfficeThemeCacheValidPeriod = 5000; + OfficeThemeManager._instance = null; + return OfficeThemeManager; + }()); + OfficeTheme.OfficeThemeManager = OfficeThemeManager; + OSF.OUtil.setNamespace("OfficeTheme", OSF.DDA); + OSF.DDA.OfficeTheme.getOfficeTheme = OfficeExt.OfficeTheme.OfficeThemeManager.instance().getOfficeTheme; + })(OfficeTheme = OfficeExt.OfficeTheme || (OfficeExt.OfficeTheme = {})); +})(OfficeExt || (OfficeExt = {})); +OSF.initializeRichCommon = function OSF_initializeRichCommon() { + OSF.DDA.ClientSettingsManager = { + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) { + return function (args) { + var onComplete = function onComplete(status, response) { + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + args.onComplete(status, response); + } + }; + var response; + try { + response = hostDelegateMethod(args.hostCallArgs, args.onCalling, onComplete); + } + catch (ex) { + var status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response = { name: Strings.OfficeOM.L_InternalError, message: ex }; + if (args.onComplete) { + args.onComplete(status, response); + } + } + }; + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + OSF.DDA._OsfControlContext.GetSettings(OsfOMToken).Read(keys, values); + } + else { + OSF.DDA._OsfControlContext.GetSettings().Read(keys, values); + } + var serializedSettings = {}; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, serializedSettings); + } + return serializedSettings; + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) { + var keys = []; + var values = []; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + if (onCalling) { + onCalling(); + } + var settingObj; + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + settingObj = OSF.DDA._OsfControlContext.GetSettings(OsfOMToken); + } + else { + settingObj = OSF.DDA._OsfControlContext.GetSettings(); + } + if (typeof settingObj.WriteAsync != 'undefined') { + settingObj.WriteAsync(keys, values, onComplete); + } + else { + settingObj.Write(keys, values); + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + }, + refresh: function OSF_DDA_ClientSettingsManager$refresh(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + var osfSettingsObj; + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + osfSettingsObj = OSF.DDA._OsfControlContext.GetSettings(OsfOMToken); + } + else { + osfSettingsObj = OSF.DDA._OsfControlContext.GetSettings(); + } + var readSettingsAndReturn = function () { + osfSettingsObj.Read(keys, values); + var serializedSettings = {}; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, serializedSettings); + } + }; + if (osfSettingsObj.RefreshAsync) { + osfSettingsObj.RefreshAsync(function () { + readSettingsAndReturn(); + }); + } + else { + readSettingsAndReturn(); + } + } + }; + OSF.InitializationHelper.prototype.initializeSettings = function OSF_InitializationHelper$initializeSettings(refreshSupported) { + var serializedSettings = OSF.DDA.ClientSettingsManager.read(); + var settings = this.deserializeSettings(serializedSettings, refreshSupported); + return settings; + }; + OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + var returnedContext; + var context; + var warningText = "Warning: Office.js is loaded outside of Office client"; + try { + if (window.external && OSF.OUtil.externalNativeFunctionExists(typeof window.external.GetContext)) { + context = OSF.DDA._OsfControlContext = window.external.GetContext(); + } + else { + OsfMsAjaxFactory.msAjaxDebug.trace(warningText); + return; + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace(warningText); + return; + } + var appType = context.GetAppType(); + var id = context.GetSolutionRef(); + var version = context.GetAppVersionMajor(); + var minorVersion = context.GetAppVersionMinor(); + var UILocale = context.GetAppUILocale(); + var dataLocale = context.GetAppDataLocale(); + var docUrl = context.GetDocUrl(); + var clientMode = context.GetAppCapabilities(); + var reason = context.GetActivationMode(); + var osfControlType = context.GetControlIntegrationLevel(); + var settings = []; + var eToken; + try { + eToken = context.GetSolutionToken(); + } + catch (ex) { + } + var correlationId; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetCorrelationId)) { + correlationId = context.GetCorrelationId(); + } + var appInstanceId; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetInstanceId)) { + appInstanceId = context.GetInstanceId(); + } + var touchEnabled; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetTouchEnabled)) { + touchEnabled = context.GetTouchEnabled(); + } + var commerceAllowed; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetCommerceAllowed)) { + commerceAllowed = context.GetCommerceAllowed(); + } + var requirementMatrix; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetSupportedMatrix)) { + requirementMatrix = context.GetSupportedMatrix(); + } + var hostCustomMessage; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetHostCustomMessage)) { + hostCustomMessage = context.GetHostCustomMessage(); + } + var hostFullVersion; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetHostFullVersion)) { + hostFullVersion = context.GetHostFullVersion(); + } + var dialogRequirementMatrix; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetDialogRequirementMatrix)) { + dialogRequirementMatrix = context.GetDialogRequirementMatrix(); + } + var sdxFeatureGates; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetFeaturesForSolution)) { + try { + var sdxFeatureGatesJson = context.GetFeaturesForSolution(); + if (sdxFeatureGatesJson) { + sdxFeatureGates = JSON.parse(sdxFeatureGatesJson); + } + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("Exception while creating the SDX FeatureGates object. Details: " + ex); + } + } + var initialDisplayMode = 0; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetInitialDisplayMode)) { + initialDisplayMode = context.GetInitialDisplayMode(); + } + eToken = eToken ? eToken.toString() : ""; + returnedContext = new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, undefined, undefined, undefined, undefined, dialogRequirementMatrix, sdxFeatureGates, undefined, initialDisplayMode); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + }; +}; +OSF.OUtil.setNamespace("ExtensionLifeCycle", OSF); +OSF.ExtensionLifeCycle.close = function OSF_ExtensionLifeCycle$close(context) { + OSF.ClientHostController.closeSdxDialog(context); +}; +OSF.ExtensionLifeCycle.resize = function OSF_ExtensionLifeCycle$resize(width, height) { + OSF.ClientHostController.resizeSdxDialog(width, height); +}; +(function () { + function isWebkit2Sandbox() { + return window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.Agave; + } + if (isWebkit2Sandbox()) { + OSF.ClientHostController = new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger()); + OSF.initializeWebkitCommon(); + OSF.InitializationHelper.prototype.initializeMacSettings = function (appContext, refreshSupported) { + return this._initializeSettings(appContext, refreshSupported); + }; + } + else { + OSF.ClientHostController = new OfficeExt.MacRichClientHostController(); + OSF.initializeRichCommon(); + OSF.InitializationHelper.prototype.initializeMacSettings = function (appContext, refreshSupported) { + return this._initializeSettings(refreshSupported); + }; + } +})(); +var OSFLog; +(function (OSFLog) { + var BaseUsageData = (function () { + function BaseUsageData(table) { + this._table = table; + this._fields = {}; + } + Object.defineProperty(BaseUsageData.prototype, "Fields", { + get: function () { + return this._fields; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype, "Table", { + get: function () { + return this._table; + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function () { + }; + BaseUsageData.prototype.SetSerializedField = function (key, value) { + if (typeof (value) !== "undefined" && value !== null) { + this._serializedFields[key] = value.toString(); + } + }; + BaseUsageData.prototype.SerializeRow = function () { + this._serializedFields = {}; + this.SetSerializedField("Table", this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields); + }; + return BaseUsageData; + }()); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = (function (_super) { + __extends(AppActivatedUsageData, _super); + function AppActivatedUsageData() { + return _super.call(this, "AppActivated") || this; + } + Object.defineProperty(AppActivatedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppId", { + get: function () { return this.Fields["AppId"]; }, + set: function (value) { this.Fields["AppId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppInstanceId", { + get: function () { return this.Fields["AppInstanceId"]; }, + set: function (value) { this.Fields["AppInstanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppURL", { + get: function () { return this.Fields["AppURL"]; }, + set: function (value) { this.Fields["AppURL"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AssetId", { + get: function () { return this.Fields["AssetId"]; }, + set: function (value) { this.Fields["AssetId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Browser", { + get: function () { return this.Fields["Browser"]; }, + set: function (value) { this.Fields["Browser"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "UserId", { + get: function () { return this.Fields["UserId"]; }, + set: function (value) { this.Fields["UserId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Host", { + get: function () { return this.Fields["Host"]; }, + set: function (value) { this.Fields["Host"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostVersion", { + get: function () { return this.Fields["HostVersion"]; }, + set: function (value) { this.Fields["HostVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "ClientId", { + get: function () { return this.Fields["ClientId"]; }, + set: function (value) { this.Fields["ClientId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeWidth", { + get: function () { return this.Fields["AppSizeWidth"]; }, + set: function (value) { this.Fields["AppSizeWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeHeight", { + get: function () { return this.Fields["AppSizeHeight"]; }, + set: function (value) { this.Fields["AppSizeHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "DocUrl", { + get: function () { return this.Fields["DocUrl"]; }, + set: function (value) { this.Fields["DocUrl"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "OfficeJSVersion", { + get: function () { return this.Fields["OfficeJSVersion"]; }, + set: function (value) { this.Fields["OfficeJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostJSVersion", { + get: function () { return this.Fields["HostJSVersion"]; }, + set: function (value) { this.Fields["HostJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "WacHostEnvironment", { + get: function () { return this.Fields["WacHostEnvironment"]; }, + set: function (value) { this.Fields["WacHostEnvironment"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsFromWacAutomation", { + get: function () { return this.Fields["IsFromWacAutomation"]; }, + set: function (value) { this.Fields["IsFromWacAutomation"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsMOS", { + get: function () { return this.Fields["IsMOS"]; }, + set: function (value) { this.Fields["IsMOS"] = value; }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("AppId", this.AppId); + this.SetSerializedField("AppInstanceId", this.AppInstanceId); + this.SetSerializedField("AppURL", this.AppURL); + this.SetSerializedField("AssetId", this.AssetId); + this.SetSerializedField("Browser", this.Browser); + this.SetSerializedField("UserId", this.UserId); + this.SetSerializedField("Host", this.Host); + this.SetSerializedField("HostVersion", this.HostVersion); + this.SetSerializedField("ClientId", this.ClientId); + this.SetSerializedField("AppSizeWidth", this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight", this.AppSizeHeight); + this.SetSerializedField("Message", this.Message); + this.SetSerializedField("DocUrl", this.DocUrl); + this.SetSerializedField("OfficeJSVersion", this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion", this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment", this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation", this.IsFromWacAutomation); + this.SetSerializedField("IsMOS", this.IsMOS); + }; + return AppActivatedUsageData; + }(BaseUsageData)); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = (function (_super) { + __extends(ScriptLoadUsageData, _super); + function ScriptLoadUsageData() { + return _super.call(this, "ScriptLoad") || this; + } + Object.defineProperty(ScriptLoadUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ScriptId", { + get: function () { return this.Fields["ScriptId"]; }, + set: function (value) { this.Fields["ScriptId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "StartTime", { + get: function () { return this.Fields["StartTime"]; }, + set: function (value) { this.Fields["StartTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("ScriptId", this.ScriptId); + this.SetSerializedField("StartTime", this.StartTime); + this.SetSerializedField("ResponseTime", this.ResponseTime); + }; + return ScriptLoadUsageData; + }(BaseUsageData)); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = (function (_super) { + __extends(AppClosedUsageData, _super); + function AppClosedUsageData() { + return _super.call(this, "AppClosed") || this; + } + Object.defineProperty(AppClosedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "FocusTime", { + get: function () { return this.Fields["FocusTime"]; }, + set: function (value) { this.Fields["FocusTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalWidth", { + get: function () { return this.Fields["AppSizeFinalWidth"]; }, + set: function (value) { this.Fields["AppSizeFinalWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalHeight", { + get: function () { return this.Fields["AppSizeFinalHeight"]; }, + set: function (value) { this.Fields["AppSizeFinalHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "OpenTime", { + get: function () { return this.Fields["OpenTime"]; }, + set: function (value) { this.Fields["OpenTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "CloseMethod", { + get: function () { return this.Fields["CloseMethod"]; }, + set: function (value) { this.Fields["CloseMethod"] = value; }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("FocusTime", this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth", this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight", this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime", this.OpenTime); + this.SetSerializedField("CloseMethod", this.CloseMethod); + }; + return AppClosedUsageData; + }(BaseUsageData)); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = (function (_super) { + __extends(APIUsageUsageData, _super); + function APIUsageUsageData() { + return _super.call(this, "APIUsage") || this; + } + Object.defineProperty(APIUsageUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIType", { + get: function () { return this.Fields["APIType"]; }, + set: function (value) { this.Fields["APIType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIID", { + get: function () { return this.Fields["APIID"]; }, + set: function (value) { this.Fields["APIID"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "Parameters", { + get: function () { return this.Fields["Parameters"]; }, + set: function (value) { this.Fields["Parameters"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ErrorType", { + get: function () { return this.Fields["ErrorType"]; }, + set: function (value) { this.Fields["ErrorType"] = value; }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("APIType", this.APIType); + this.SetSerializedField("APIID", this.APIID); + this.SetSerializedField("Parameters", this.Parameters); + this.SetSerializedField("ResponseTime", this.ResponseTime); + this.SetSerializedField("ErrorType", this.ErrorType); + }; + return APIUsageUsageData; + }(BaseUsageData)); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = (function (_super) { + __extends(AppInitializationUsageData, _super); + function AppInitializationUsageData() { + return _super.call(this, "AppInitialization") || this; + } + Object.defineProperty(AppInitializationUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SuccessCode", { + get: function () { return this.Fields["SuccessCode"]; }, + set: function (value) { this.Fields["SuccessCode"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("SuccessCode", this.SuccessCode); + this.SetSerializedField("Message", this.Message); + }; + return AppInitializationUsageData; + }(BaseUsageData)); + OSFLog.AppInitializationUsageData = AppInitializationUsageData; + var CheckWACHostUsageData = (function (_super) { + __extends(CheckWACHostUsageData, _super); + function CheckWACHostUsageData() { + return _super.call(this, "CheckWACHost") || this; + } + Object.defineProperty(CheckWACHostUsageData.prototype, "isWacKnownHost", { + get: function () { return this.Fields["isWacKnownHost"]; }, + set: function (value) { this.Fields["isWacKnownHost"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "instanceId", { + get: function () { return this.Fields["instanceId"]; }, + set: function (value) { this.Fields["instanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostType", { + get: function () { return this.Fields["hostType"]; }, + set: function (value) { this.Fields["hostType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostPlatform", { + get: function () { return this.Fields["hostPlatform"]; }, + set: function (value) { this.Fields["hostPlatform"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "wacDomain", { + get: function () { return this.Fields["wacDomain"]; }, + set: function (value) { this.Fields["wacDomain"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "isLocalStorageAvailable", { + get: function () { return this.Fields["isLocalStorageAvailable"]; }, + set: function (value) { this.Fields["isLocalStorageAvailable"] = value; }, + enumerable: true, + configurable: true + }); + CheckWACHostUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("isWacKnownHost", this.isWacKnownHost); + this.SetSerializedField("instanceId", this.instanceId); + this.SetSerializedField("hostType", this.hostType); + this.SetSerializedField("hostPlatform", this.hostPlatform); + this.SetSerializedField("wacDomain", this.wacDomain); + this.SetSerializedField("isLocalStorageAvailable", this.isLocalStorageAvailable); + }; + return CheckWACHostUsageData; + }(BaseUsageData)); + OSFLog.CheckWACHostUsageData = CheckWACHostUsageData; +})(OSFLog || (OSFLog = {})); +var Logger; +(function (Logger) { + "use strict"; + var TraceLevel; + (function (TraceLevel) { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error"; + })(TraceLevel = Logger.TraceLevel || (Logger.TraceLevel = {})); + var SendFlag; + (function (SendFlag) { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush"; + })(SendFlag = Logger.SendFlag || (Logger.SendFlag = {})); + function allowUploadingData() { + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) { + } + Logger.sendLog = sendLog; + function creatULSEndpoint() { + try { + return new ULSEndpointProxy(); + } + catch (e) { + return null; + } + } + var ULSEndpointProxy = (function () { + function ULSEndpointProxy() { + } + ULSEndpointProxy.prototype.writeLog = function (log) { + }; + ULSEndpointProxy.prototype.loadProxyFrame = function () { + }; + return ULSEndpointProxy; + }()); + if (!OSF.Logger) { + OSF.Logger = Logger; + } + Logger.ulsEndpoint = creatULSEndpoint(); +})(Logger || (Logger = {})); +var OSFAriaLogger; +(function (OSFAriaLogger) { + var TelemetryEventAppActivated = { name: "AppActivated", enabled: true, critical: true, points: [ + { name: "Browser", type: "string" }, + { name: "Message", type: "string" }, + { name: "Host", type: "string" }, + { name: "AppSizeWidth", type: "int64" }, + { name: "AppSizeHeight", type: "int64" }, + { name: "IsFromWacAutomation", type: "string" }, + { name: "IsMOS", type: "int64" }, + ] }; + var TelemetryEventScriptLoad = { name: "ScriptLoad", enabled: true, critical: false, points: [ + { name: "ScriptId", type: "string" }, + { name: "StartTime", type: "double" }, + { name: "ResponseTime", type: "double" }, + ] }; + var enableAPIUsage = shouldAPIUsageBeEnabled(); + var TelemetryEventApiUsage = { name: "APIUsage", enabled: enableAPIUsage, critical: false, points: [ + { name: "APIType", type: "string" }, + { name: "APIID", type: "int64" }, + { name: "Parameters", type: "string" }, + { name: "ResponseTime", type: "int64" }, + { name: "ErrorType", type: "int64" }, + ] }; + var TelemetryEventAppInitialization = { name: "AppInitialization", enabled: true, critical: false, points: [ + { name: "SuccessCode", type: "int64" }, + { name: "Message", type: "string" }, + ] }; + var TelemetryEventAppClosed = { name: "AppClosed", enabled: true, critical: false, points: [ + { name: "FocusTime", type: "int64" }, + { name: "AppSizeFinalWidth", type: "int64" }, + { name: "AppSizeFinalHeight", type: "int64" }, + { name: "OpenTime", type: "int64" }, + ] }; + var TelemetryEventCheckWACHost = { name: "CheckWACHost", enabled: true, critical: false, points: [ + { name: "isWacKnownHost", type: "int64" }, + { name: "solutionId", type: "string" }, + { name: "hostType", type: "string" }, + { name: "hostPlatform", type: "string" }, + { name: "correlationId", type: "string" }, + { name: "isLocalStorageAvailable", type: "boolean" }, + ] }; + var TelemetryEvents = [ + TelemetryEventAppActivated, + TelemetryEventScriptLoad, + TelemetryEventApiUsage, + TelemetryEventAppInitialization, + TelemetryEventAppClosed, + TelemetryEventCheckWACHost, + ]; + function createDataField(value, point) { + var key = point.rename === undefined ? point.name : point.rename; + var type = point.type; + var field = undefined; + switch (type) { + case "string": + field = oteljs.makeStringDataField(key, value); + break; + case "double": + if (typeof value === "string") { + value = parseFloat(value); + } + field = oteljs.makeDoubleDataField(key, value); + break; + case "int64": + if (typeof value === "string") { + value = parseInt(value); + } + field = oteljs.makeInt64DataField(key, value); + break; + case "boolean": + if (typeof value === "string") { + value = value === "true"; + } + field = oteljs.makeBooleanDataField(key, value); + break; + } + return field; + } + function getEventDefinition(eventName) { + for (var _i = 0, TelemetryEvents_1 = TelemetryEvents; _i < TelemetryEvents_1.length; _i++) { + var event_1 = TelemetryEvents_1[_i]; + if (event_1.name === eventName) { + return event_1; + } + } + return undefined; + } + function eventEnabled(eventName) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return false; + } + return eventDefinition.enabled; + } + function shouldAPIUsageBeEnabled() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function generateTelemetryEvent(eventName, telemetryData) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return undefined; + } + var dataFields = []; + for (var _i = 0, _a = eventDefinition.points; _i < _a.length; _i++) { + var point = _a[_i]; + var key = point.name; + var value = telemetryData[key]; + if (value === undefined) { + continue; + } + var field = createDataField(value, point); + if (field !== undefined) { + dataFields.push(field); + } + } + var flags = { dataCategories: oteljs.DataCategories.ProductServiceUsage }; + if (eventDefinition.critical) { + flags.samplingPolicy = oteljs.SamplingPolicy.CriticalBusinessImpact; + } + flags.diagnosticLevel = oteljs.DiagnosticLevel.NecessaryServiceDataEvent; + var eventNameFull = "Office.Extensibility.OfficeJs." + eventName + "X"; + var event = { eventName: eventNameFull, dataFields: dataFields, eventFlags: flags }; + return event; + } + function sendOtelTelemetryEvent(eventName, telemetryData) { + if (eventEnabled(eventName)) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var event = generateTelemetryEvent(eventName, telemetryData); + if (event === undefined) { + return; + } + Microsoft.Office.WebExtension.sendTelemetryEvent(event); + }); + } + } + } + var AriaLogger = (function () { + function AriaLogger() { + } + AriaLogger.prototype.getAriaCDNLocation = function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "ariatelemetry/aria-web-telemetry.js"); + }; + AriaLogger.getInstance = function () { + if (AriaLogger.AriaLoggerObj === undefined) { + AriaLogger.AriaLoggerObj = new AriaLogger(); + } + return AriaLogger.AriaLoggerObj; + }; + AriaLogger.prototype.isIUsageData = function (arg) { + return arg["Fields"] !== undefined; + }; + AriaLogger.prototype.shouldSendDirectToAria = function (flavor, version) { + var BASE10 = 10; + var MAX_VERSION_WIN32 = [16, 0, 11601]; + var MAX_VERSION_MAC = [16, 28]; + var max_version; + if (!flavor) { + return false; + } + else if (flavor.toLowerCase() === "win32") { + max_version = MAX_VERSION_WIN32; + } + else if (flavor.toLowerCase() === "mac") { + max_version = MAX_VERSION_MAC; + } + else { + return true; + } + if (!version) { + return false; + } + var versionTokens = version.split('.'); + for (var i = 0; i < max_version.length && i < versionTokens.length; i++) { + var versionToken = parseInt(versionTokens[i], BASE10); + if (isNaN(versionToken)) { + return false; + } + if (versionToken < max_version[i]) { + return true; + } + if (versionToken > max_version[i]) { + return false; + } + } + return false; + }; + AriaLogger.prototype.isDirectToAriaEnabled = function () { + if (this.EnableDirectToAria === undefined || this.EnableDirectToAria === null) { + var flavor = void 0; + var version = void 0; + if (OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo) { + flavor = OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]; + } + if (window.external && typeof window.external.GetContext !== "undefined" && typeof window.external.GetContext().GetHostFullVersion !== "undefined") { + version = window.external.GetContext().GetHostFullVersion(); + } + this.EnableDirectToAria = this.shouldSendDirectToAria(flavor, version); + } + return this.EnableDirectToAria; + }; + AriaLogger.prototype.sendTelemetry = function (tableName, telemetryData) { + var startAfterMs = 1000; + var sendAriaEnabled = AriaLogger.EnableSendingTelemetryWithLegacyAria && this.isDirectToAriaEnabled(); + if (sendAriaEnabled) { + OSF.OUtil.loadScript(this.getAriaCDNLocation(), function () { + try { + if (!this.ALogger) { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); + } + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for (var key in telemetryData) { + if (key.toLowerCase() !== "table") { + eventProperties.setProperty(key, telemetryData[key]); + } + } + var today = new Date(); + eventProperties.setProperty("Date", today.toISOString()); + this.ALogger.logEvent(eventProperties); + } + catch (e) { + } + }, startAfterMs); + } + if (AriaLogger.EnableSendingTelemetryWithOTel) { + sendOtelTelemetryEvent(tableName, telemetryData); + } + }; + AriaLogger.prototype.logData = function (data) { + if (this.isIUsageData(data)) { + this.sendTelemetry(data["Table"], data["Fields"]); + } + else { + this.sendTelemetry(data["Table"], data); + } + }; + AriaLogger.EnableSendingTelemetryWithOTel = true; + AriaLogger.EnableSendingTelemetryWithLegacyAria = false; + return AriaLogger; + }()); + OSFAriaLogger.AriaLogger = AriaLogger; +})(OSFAriaLogger || (OSFAriaLogger = {})); +var OSFAppTelemetry; +(function (OSFAppTelemetry) { + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + var privateAddinId = "PRIVATE"; + OSFAppTelemetry.enableTelemetry = true; + ; + var AppInfo = (function () { + function AppInfo() { + } + return AppInfo; + }()); + OSFAppTelemetry.AppInfo = AppInfo; + var Event = (function () { + function Event(name, handler) { + this.name = name; + this.handler = handler; + } + return Event; + }()); + var AppStorage = (function () { + function AppStorage() { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set"; + } + AppStorage.prototype.getClientId = function () { + var clientId = this.getValue(this.clientIDKey); + if (!clientId || clientId.length <= 0 || clientId.length > 40) { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey, clientId); + } + return clientId; + }; + AppStorage.prototype.saveLog = function (logId, log) { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = ((logIdSet && logIdSet.length > 0) ? (logIdSet + ";") : "") + logId; + this.setValue(this.logIdSetKey, logIdSet); + this.setValue(logId, log); + }; + AppStorage.prototype.enumerateLog = function (callback, clean) { + var logIdSet = this.getValue(this.logIdSetKey); + if (logIdSet) { + var ids = logIdSet.split(";"); + for (var id in ids) { + var logId = ids[id]; + var log = this.getValue(logId); + if (log) { + if (callback) { + callback(logId, log); + } + if (clean) { + this.remove(logId); + } + } + } + if (clean) { + this.remove(this.logIdSetKey); + } + } + }; + AppStorage.prototype.getValue = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if (osfLocalStorage) { + value = osfLocalStorage.getItem(key); + } + return value; + }; + AppStorage.prototype.setValue = function (key, value) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + osfLocalStorage.setItem(key, value); + } + }; + AppStorage.prototype.remove = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + try { + osfLocalStorage.removeItem(key); + } + catch (ex) { + } + } + }; + return AppStorage; + }()); + var AppLogger = (function () { + function AppLogger() { + } + AppLogger.prototype.LogData = function (data) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } + }; + AppLogger.prototype.LogRawData = function (log) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); + } + catch (e) { + } + }; + return AppLogger; + }()); + function trimStringToLowerCase(input) { + if (input) { + input = input.replace(/[{}]/g, "").toLowerCase(); + } + return (input || ""); + } + function initialize(context) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + if (appInfo) { + return; + } + appInfo = new AppInfo(); + if (context.get_hostFullVersion()) { + appInfo.hostVersion = context.get_hostFullVersion(); + } + else { + appInfo.hostVersion = context.get_appVersion(); + } + appInfo.appId = canSendAddinId() ? context.get_id() : privateAddinId; + appInfo.marketplaceType = context._marketplaceType; + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage()).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if (appInfo.appInstanceId) { + appInfo.appInstanceId = trimStringToLowerCase(appInfo.appInstanceId); + appInfo.appInstanceId = getCompliantAppInstanceId(context.get_id(), appInfo.appInstanceId); + } + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "0.0.0.0"; + if (context._wacHostEnvironment) { + appInfo.wacHostEnvironment = context._wacHostEnvironment; + } + if (context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) { + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + } + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if (url) { + url = url.split("?")[0].split("#")[0]; + } + appInfo.isMos = isMos(); + appInfo.appURL = ""; + (function getUserIdAndAssetIdFromToken(token, appInfo) { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try { + xmlContent = decodeURIComponent(token); + parser = new DOMParser(); + xmlDoc = parser.parseFromString(xmlContent, "text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if (cidNode && cidNode.nodeValue) { + appInfo.userId = cidNode.nodeValue; + } + else if (oidNode && oidNode.nodeValue) { + appInfo.userId = oidNode.nodeValue; + } + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue; + } + catch (e) { + } + finally { + xmlContent = null; + xmlDoc = null; + parser = null; + } + })(context.get_eToken(), appInfo); + appInfo.sessionId = sessionId; + if (typeof OTel !== "undefined") { + OTel.OTelLogger.initialize(appInfo); + } + (function handleLifecycle() { + var startTime = new Date(); + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function () { + if (document.hasFocus()) { + if (lastFocus == null) { + lastFocus = new Date(); + } + } + else if (lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + }; + var eventList = []; + eventList.push(new Event("focus", adjustFocusTime)); + eventList.push(new Event("blur", adjustFocusTime)); + eventList.push(new Event("focusout", adjustFocusTime)); + eventList.push(new Event("focusin", adjustFocusTime)); + var exitFunction = function () { + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.removeEventListener(window, eventList[i].name, eventList[i].handler); + } + eventList.length = 0; + if (!finished) { + if (document.hasFocus() && lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date()).getTime() - startTime.getTime()), focusTime); + finished = true; + } + }; + eventList.push(new Event("beforeunload", exitFunction)); + eventList.push(new Event("unload", exitFunction)); + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.addEventListener(window, eventList[i].name, eventList[i].handler); + } + adjustFocusTime(); + })(); + OSFAppTelemetry.onAppActivated(); + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() { + if (!appInfo) { + return; + } + (new AppStorage()).enumerateLog(function (id, log) { return (new AppLogger()).LogRawData(log); }, true); + var data = new OSFLog.AppActivatedUsageData(); + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = ""; + data.UserId = ""; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if (appInfo.wacHostEnvironment) { + data.WacHostEnvironment = appInfo.wacHostEnvironment; + } + if (appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) { + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + } + data.IsMOS = appInfo.isMos ? 1 : 0; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) { + var data = new OSFLog.ScriptLoadUsageData(); + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) { + if (!appInfo) { + return; + } + if (!isAllowedHost() || !isAPIUsageEnabledDispId(id, apiType)) { + return; + } + var data = new OSFLog.APIUsageUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCallDone = onCallDone; + ; + function onMethodDone(id, args, msResponseTime, errorType) { + var parameters = null; + if (args) { + if (typeof args == "number") { + parameters = String(args); + } + else if (typeof args === "object") { + for (var index in args) { + if (parameters !== null) { + parameters += ","; + } + else { + parameters = ""; + } + if (typeof args[index] == "number") { + parameters += String(args[index]); + } + } + } + else { + parameters = ""; + } + } + OSF.AppTelemetry.onCallDone("method", id, parameters, msResponseTime, errorType); + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) { + OSF.AppTelemetry.onCallDone("property", -1, propertyName, msResponseTime); + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onCheckWACHost(isWacKnownHost, instanceId, hostType, hostPlatform, wacDomain, isLocalStorageAvailable) { + var data = new OSFLog.CheckWACHostUsageData(); + data.isWacKnownHost = isWacKnownHost; + data.instanceId = instanceId; + data.hostType = hostType; + data.hostPlatform = hostPlatform; + data.isLocalStorageAvailable = isLocalStorageAvailable; + data.wacDomain = ""; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCheckWACHost = onCheckWACHost; + function onEventDone(id, errorType) { + OSF.AppTelemetry.onCallDone("event", id, null, 0, errorType); + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent", id, null, msResponseTime, errorType); + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) { + if (!appInfo) { + return; + } + var data = new OSFLog.AppClosedUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage()).saveLog(sessionId, data.SerializeRow()); + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId); + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) { + var data = new OSFLog.AppInitializationUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) { + doAppInitializationLogging(false, message); + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) { + doAppInitializationLogging(true, errorMessage); + } + OSFAppTelemetry.logAppException = logAppException; + function isAllowedHost() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function isAPIUsageEnabledDispId(dispId, apiType) { + if (apiType === "method") { + switch (dispId) { + case 4: + case 38: + case 37: + case 10: + case 12: + case -10: + return true; + default: + return false; + } + } + return false; + } + function canSendAddinId() { + var isPublic = (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.PublicAddin) != 0; + if (isPublic) { + return isPublic; + } + if (!appInfo) { + return false; + } + var hostPlatform = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + var hostVersion = appInfo.hostVersion; + return _isComplianceExceptedHost(hostPlatform, hostVersion); + } + OSFAppTelemetry.canSendAddinId = canSendAddinId; + function getCompliantAppInstanceId(addinId, appInstanceId) { + if (!canSendAddinId() && appInstanceId === addinId) { + return privateAddinId; + } + return appInstanceId; + } + OSFAppTelemetry.getCompliantAppInstanceId = getCompliantAppInstanceId; + function _isComplianceExceptedHost(hostPlatform, hostVersion) { + var excepted = false; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(hostVersion); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (hostPlatform == "win32") { + if (major < 16 || major == 16 && build < 14225) { + excepted = true; + } + } + else if (hostPlatform == "mac") { + if (major < 16 || (major == 16 && (minor < 52 || minor == 52 && build < 808))) { + excepted = true; + } + } + } + return excepted; + } + OSFAppTelemetry._isComplianceExceptedHost = _isComplianceExceptedHost; + function isMos() { + return (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.IsMos) != 0; + } + OSFAppTelemetry.isMos = isMos; + OSF.AppTelemetry = OSFAppTelemetry; +})(OSFAppTelemetry || (OSFAppTelemetry = {})); +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + OSF.DDA.RichApi.richApiMessageManager = new OfficeExt.RichApiMessageManager(); + appReady(); +}; +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync, + requiredArguments: [ + { + name: Microsoft.Office.WebExtension.Parameters.Data, + types: ["object"] + } + ], + supportedOptions: [] +}); +OSF.OUtil.setNamespace("RichApi", OSF.DDA); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } + } +}; +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() { + var events = []; + for (var eventName in this._eventHandlers) + events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); + return events; + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) { + for (var eventName in this._eventHandlers) { + if (event == eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event == eventName) + return true; + } + return false; + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) + return true; + } + } + return false; + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._eventHandlers[eventType]; + if (handlers && !this.hasEventHandler(eventType, handler)) { + handlers.push(handler); + return true; + } + else { + return false; + } + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true; + } + return false; + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType, handler); + if (isFirstHandler && succeed) { + this.fireQueuedEvent(eventType); + } + return succeed; + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var index = 0; index < handlers.length; index++) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + return true; + } + } + } + return false; + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { + if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { + this._eventHandlers[eventType] = []; + return true; + } + return false; + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) { + this._objectEventHandlers[eventType][objectId] = []; + return true; + } + return false; + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } + return true; + } + else { + return false; + } + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if (_handlers != null) { + for (var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length == 0) { + queuedEvents.push(eventArgs); + } + else { + this.fireEvent(eventArgs); + } + return true; + } + else { + return false; + } + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length > 0) { + var eventHandler = eventHandlers[0]; + while (queuedEvents.length > 0) { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs); + } + return true; + } + } + return false; + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var queuedEvents = this._queuedEventsArgs[eventType]; + if (queuedEvents) { + this._queuedEventsArgs[eventType] = []; + } + } + } +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { + var args; + switch (eventType) { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties, target.document), eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties, target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" && OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + OSF.DDA.convertOlkAppointmentTimeToDateFormat(args); + } + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecurrenceChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecurrenceChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AttachmentsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAttachmentsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.InfobarClicked: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkInfobarClickedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSelectedItemsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSensitivityLabelChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + return args; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + "types": ["function", "object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { RichApiMessage: "richApiMessage" }); +OSF.DDA.RichApiMessageEventArgs = function OSF_DDA_RichApiMessageEventArgs(eventType, eventProperties) { + var entryArray = eventProperties[Microsoft.Office.WebExtension.Parameters.Data]; + var entries = []; + if (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var elem = entryArray[i]; + if (elem.toArray) { + elem = elem.toArray(); + } + entries.push({ + messageCategory: elem[0], + messageType: elem[1], + targetId: elem[2], + message: elem[3], + id: elem[4], + isRemoteOverride: elem[5] + }); + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: Microsoft.Office.WebExtension.EventType.RichApiMessage }, + "entries": { value: entries } + }); +}; +(function (OfficeExt) { + var RichApiMessageManager = (function () { + function RichApiMessageManager() { + this._eventDispatch = null; + this._registerHandlers = []; + this._eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.RichApiMessage, + ]); + OSF.DDA.DispIdHost.addEventSupport(this, this._eventDispatch); + } + RichApiMessageManager.prototype.register = function (handler) { + var _this = this; + if (!this._registerWithHostPromise) { + this._registerWithHostPromise = new Office.Promise(function (resolve, reject) { + _this.addHandlerAsync(Microsoft.Office.WebExtension.EventType.RichApiMessage, function (args) { + _this._registerHandlers.forEach(function (value) { + if (value) { + value(args); + } + }); + }, function (asyncResult) { + if (asyncResult.status == 'failed') { + reject(asyncResult.error); + } + else { + resolve(); + } + }); + }); + } + return this._registerWithHostPromise.then(function () { + _this._registerHandlers.push(handler); + }); + }; + return RichApiMessageManager; + }()); + OfficeExt.RichApiMessageManager = RichApiMessageManager; +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidRichApiMessageEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DialogShownStatus = { hasDialogShown: false, isWindowDialog: false }; +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogMessageReceivedEvent: "DialogMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + MessageType: "messageType", + MessageContent: "messageContent", + MessageOrigin: "messageOrigin" +}); +OSF.DDA.DialogEventType = {}; +OSF.OUtil.augmentList(OSF.DDA.DialogEventType, { + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" +}); +OSF.DDA.AsyncMethodNames.addNames({ + DisplayDialogAsync: "displayDialogAsync", + DisplayModalDialogAsync: "displayModalDialogAsync", + CloseAsync: "close" +}); +OSF.DDA.SyncMethodNames.addNames({ + MessageParent: "messageParent", + MessageChild: "messageChild", + SendMessage: "sendMessage", + AddMessageHandler: "addEventHandler" +}); +OSF.DDA.UI.ParentUI = function OSF_DDA_ParentUI() { + var eventDispatch; + if (Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived != null) { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived, + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + ]); + } + else { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived + ]); + } + var target = this; + var defineDialogApi = function (apiName, isModalApi) { + if (!target[apiName]) { + OSF.OUtil.defineEnumerableProperty(target, apiName, { + value: function () { + var openDialog = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments, eventDispatch, target, isModalApi); + } + }); + } + }; + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName, false); + if (Microsoft.Office.WebExtension.FeatureGates["ModalWebDialogAPI"]) { + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName, true); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DDA.UI.ChildUI = function OSF_DDA_ChildUI(isPopupWindow) { + var messageParentName = OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target = this; + if (!target[messageParentName]) { + OSF.OUtil.defineEnumerableProperty(target, messageParentName, { + value: function () { + var messageParent = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments, target); + } + }); + } + var addEventHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if (!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch != "undefined") { + OSF.DDA.DispIdHost.addEventSupport(target, OSF.DialogParentMessageEventDispatch, isPopupWindow); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DialogHandler = function OSF_DialogHandler() { }; +OSF.DDA.DialogEventArgs = function OSF_DDA_DialogEventArgs(message) { + if (message[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogMessageReceived) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); + } + else { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogEventReceived + }, + "error": { + value: message[OSF.DDA.PropertyDescriptors.MessageType] + } + }); + } +}; +OSF.DDA.DialogParentEventArgs = function OSF_DDA_DialogParentEventArgs(message) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); +}; +var DialogApiManager = (function () { + function DialogApiManager() { + } + DialogApiManager.defineApi = function (apiName, supportedOptions) { + var asyncMethodCalls = OSF.DDA.AsyncMethodCalls; + asyncMethodCalls.define({ + method: apiName, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: supportedOptions, + privateStateCallbacks: [], + onSucceeded: function (args, caller, callArgs) { + var targetId = args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch = args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog = new OSF.DialogHandler(); + var closeDialog = OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, closeDialog, { + value: function () { + var closeDialogfunction = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments, targetId, eventDispatch, dialog); + } + }); + var addHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, addHandler, { + value: function () { + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(arguments, dialog, eventDispatch); + var eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType, handler); + } + }); + if (OSF.DDA.UI.EnableSendMessageDialogAPI === true) { + var sendMessage = OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, sendMessage, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var messageChild = OSF.DDA.SyncMethodNames.MessageChild.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, messageChild, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + return dialog; + }, + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs] = true; + } + return callArgs; + } + }); + }; + DialogApiManager.messageChildRichApiBridge = function () { + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, null, null); + } + }; + DialogApiManager.initOnce = function () { + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync, DialogApiManager.displayDialogAsyncApiSupportedOptions); + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync, DialogApiManager.displayModalDialogAsyncApiSupportedOptions); + }; + DialogApiManager.displayDialogAsyncApiSupportedOptions = [ + { + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.EnforceAppDomain, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]; + DialogApiManager.displayModalDialogAsyncApiSupportedOptions = DialogApiManager.displayDialogAsyncApiSupportedOptions.concat([ + { + name: "abortWhenParentIsMinimized", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: "abortWhenDocIsInactive", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]); + return DialogApiManager; +}()); +DialogApiManager.initOnce(); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageToParent, + "types": ["string", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageContent, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.openDialog = function OSF_DDA_SafeArray_Delegate$OpenDialog(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + OSF.ClientHostController.openDialog(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.closeDialog = function OSF_DDA_SafeArray_Delegate$CloseDialog(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.closeDialog(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.messageParent = function OSF_DDA_SafeArray_Delegate$MessageParent(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime = (new Date()).getTime(); + var result = OSF.ClientHostController.messageParent(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), result); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: 1 }, + { name: OSF.DDA.PropertyDescriptors.MessageOrigin, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.sendMessage = function OSF_DDA_SafeArray_Delegate$SendMessage(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime = (new Date()).getTime(); + var result = OSF.ClientHostController.sendMessage(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; + + + +!function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + i: moduleId, + l: !1, + exports: {} + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.l = !0, module.exports; + } + __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function(exports, name, getter) { + __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { + enumerable: !0, + get: getter + }); + }, __webpack_require__.r = function(exports) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(exports, "__esModule", { + value: !0 + }); + }, __webpack_require__.t = function(value, mode) { + if (1 & mode && (value = __webpack_require__(value)), 8 & mode) return value; + if (4 & mode && "object" == typeof value && value && value.__esModule) return value; + var ns = Object.create(null); + if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { + enumerable: !0, + value: value + }), 2 & mode && "string" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }, __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function() { + return module.default; + } : function() { + return module; + }; + return __webpack_require__.d(getter, "a", getter), getter; + }, __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 1); +}([ function(module, exports) { + module.exports = OfficeExtensionBatch; +}, function(module, exports, __webpack_require__) { + "use strict"; + var __assign = this && this.__assign || function() { + return (__assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) for (var p in s = arguments[i]) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]); + return t; + }).apply(this, arguments); + }; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var ApiInformationWeb = __webpack_require__(2), ApiInformationNative = __webpack_require__(3), AsyncStorageWeb = __webpack_require__(5), DialogApiWeb = __webpack_require__(6), StorageApiNative = __webpack_require__(7), officeruntime_storage_web_1 = __webpack_require__(8), Experimentation = __webpack_require__(9), officeruntime_message_1 = __webpack_require__(10), DynamicRibbon = __webpack_require__(13), officeruntime_auth_1 = __webpack_require__(14); + window._useSDXSandbox ? window._OfficeRuntimeNative = __assign(__assign({}, window.OfficeRuntime), { + displayWebDialog: DialogApiWeb.displayWebDialog, + AsyncStorage: StorageApiNative.AsyncStorage, + storage: StorageApiNative.storage, + experimentation: Experimentation.experimentation, + apiInformation: ApiInformationNative.apiInformation, + message: officeruntime_message_1.Message.instance, + ui: DynamicRibbon.ui, + auth: officeruntime_auth_1.Auth.instance + }) : window._OfficeRuntimeNative = __assign(__assign({}, window.OfficeRuntime), { + displayWebDialog: DialogApiWeb.displayWebDialog, + AsyncStorage: AsyncStorageWeb, + storage: officeruntime_storage_web_1.storage, + experimentation: Experimentation.experimentation, + apiInformation: ApiInformationWeb.apiInformation, + message: officeruntime_message_1.Message.instance, + ui: DynamicRibbon.ui, + auth: officeruntime_auth_1.Auth.instance + }), Object.freeze(window._OfficeRuntimeNative); +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.apiInformation = void 0, exports.apiInformation = { + isSetSupported: function(capability, version) { + try { + return !!(Office && Office.context && Office.context.requirements) && Office.context.requirements.isSetSupported(capability, version); + } catch (e) { + return !1; + } + } + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + (function(global) { + function getVersion(version) { + var temp = version.split("."), major = 0, minor = 0, patch = 0; + if (temp.length < 2 && isNaN(Number(version))) throw "version format incorrect"; + if (major = Number(temp[0]), temp.length >= 2 && (minor = Number(temp[1])), temp.length >= 3 && (patch = Number(temp[2])), + isNaN(major) || isNaN(minor) || isNaN(patch)) throw "version format incorrect"; + return { + major: major, + minor: minor, + patch: patch + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.apiInformation = void 0, exports.apiInformation = { + isSetSupported: function(capability, version) { + if ("string" != typeof capability) return !1; + if (null == version && (version = "0.0.0"), void 0 === global.__apiSets) return !1; + var sets = global.__apiSets, index = Object.keys(sets).map((function(key) { + return key.toLowerCase(); + })).indexOf(capability.toLowerCase()); + if (index > -1) { + var setMaxVersion = sets[Object.keys(sets)[index]]; + try { + var minVersionNum = getVersion(version), setMaxVersionNum = void 0; + if ((setMaxVersionNum = Array.isArray(setMaxVersion) ? function(versions, majorVersion) { + for (var i = 0; i < versions.length; i++) { + var v = getVersion(versions[i]); + if (v.major == majorVersion) return v; + } + return { + major: 0, + minor: 0, + patch: 0 + }; + }(setMaxVersion, minVersionNum.major) : getVersion(setMaxVersion)).major > 0) { + if (setMaxVersionNum.major > minVersionNum.major) return !0; + if (setMaxVersionNum.major == minVersionNum.major && setMaxVersionNum.minor > minVersionNum.minor) return !0; + if (setMaxVersionNum.major == minVersionNum.major && setMaxVersionNum.minor == minVersionNum.minor && setMaxVersionNum.patch >= minVersionNum.patch) return !0; + } + } catch (e) { + return !1; + } + } + return !1; + } + }; + }).call(this, __webpack_require__(4)); +}, function(module, exports) { + var g; + g = function() { + return this; + }(); + try { + g = g || new Function("return this")(); + } catch (e) { + "object" == typeof window && (g = window); + } + module.exports = g; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.multiGet = exports.multiRemove = exports.multiSet = exports.getAllKeys = exports.clear = exports.removeItem = exports.setItem = exports.getItem = void 0; + var prefix = "_Office_AsyncStorage_"; + function ensureFreshLocalStorage() { + window.localStorage.setItem("_Office_AsyncStorage_|_unusedKey_", null), window.localStorage.removeItem("_Office_AsyncStorage_|_unusedKey_"); + } + function performAction(action, callback) { + return void 0 === callback && (callback = function() {}), new Promise((function(resolve, reject) { + try { + ensureFreshLocalStorage(), action(), callback(null), resolve(); + } catch (e) { + callback(e), reject(e); + } + })); + } + function performActionAndReturnResult(action, callback) { + return void 0 === callback && (callback = function() {}), new Promise((function(resolve, reject) { + try { + ensureFreshLocalStorage(); + var result = action(); + callback(null, result), resolve(result); + } catch (e) { + callback(e, null), reject(e); + } + })); + } + function performMultiAction(collection, action, callback) { + return void 0 === callback && (callback = function() {}), new Promise((function(resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } catch (e) { + errors.push(e); + } + collection.forEach((function(item) { + try { + action(item); + } catch (e) { + errors.push(e); + } + })), callback(errors), errors.length > 0 ? reject(errors) : resolve(); + })); + } + exports.getItem = function(key, callback) { + return performActionAndReturnResult((function() { + return window.localStorage.getItem(prefix + key); + }), callback); + }, exports.setItem = function(key, value, callback) { + return performAction((function() { + return window.localStorage.setItem(prefix + key, value); + }), callback); + }, exports.removeItem = function(key, callback) { + return performAction((function() { + return window.localStorage.removeItem(prefix + key); + }), callback); + }, exports.clear = function(callback) { + return performAction((function() { + Object.keys(window.localStorage).filter((function(fullKey) { + return 0 === fullKey.indexOf(prefix); + })).forEach((function(fullKey) { + return window.localStorage.removeItem(fullKey); + })); + }), callback); + }, exports.getAllKeys = function(callback) { + return performActionAndReturnResult((function() { + return Object.keys(window.localStorage).filter((function(fullKey) { + return 0 === fullKey.indexOf(prefix); + })).map((function(fullKey) { + return fullKey.substr(prefix.length); + })); + }), callback); + }, exports.multiSet = function(keyValuePairs, callback) { + return performMultiAction(keyValuePairs, (function(_a) { + var key = _a[0], value = _a[1]; + return window.localStorage.setItem(prefix + key, value); + }), callback); + }, exports.multiRemove = function(keys, callback) { + return performMultiAction(keys, (function(key) { + return window.localStorage.removeItem(prefix + key); + }), callback); + }, exports.multiGet = function(keys, callback) { + return new Promise((function(resolve, reject) { + callback || (callback = function() {}); + var errors = [], results = keys.map((function(key) { + try { + return [ key, window.localStorage.getItem(prefix + key) ]; + } catch (e) { + errors.push(e); + } + })).filter((function(pair) { + return pair; + })); + errors.length > 0 ? (callback(errors, results), reject(errors)) : (callback(null, results), + resolve(results)); + })); + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.displayWebDialog = exports.Dialog = void 0; + var OfficeExtension = __webpack_require__(0), Dialog = function() { + function Dialog(_dialog) { + this._dialog = _dialog; + } + return Dialog.prototype.close = function() { + return this._dialog.close(), OfficeExtension.CoreUtility.Promise.resolve(); + }, Dialog; + }(); + exports.Dialog = Dialog, exports.displayWebDialog = function(url, options) { + return new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) throw new OfficeExtension.Error({ + code: "InvalidArgument", + message: 'Dimensions must be "number%" or number.' + }); + var dialog, dialogOptions = { + width: options.width ? parseInt(options.width, 10) : 50, + height: options.height ? parseInt(options.height, 10) : 50, + displayInIframe: options.displayInIFrame || !1 + }; + function messageHandler(args) { + options.onMessage && options.onMessage(args.message, dialog, args.origin); + } + function eventHandler(args) { + 12006 === args.error ? options.onClose && options.onClose() : options.onRuntimeError && options.onRuntimeError(new OfficeExtension.Error(lookupErrorCodeAndMessage(args.error)), dialog); + } + function isInt(value) { + return /^(\-|\+)?([0-9]+)%?$/.test(value); + } + function lookupErrorCodeAndMessage(internalCode) { + var _a, table = ((_a = {})[12002] = { + code: "InvalidUrl", + message: "Cannot load URL, no such page or bad URL syntax." + }, _a[12003] = { + code: "InvalidUrl", + message: "HTTPS is required." + }, _a[12004] = { + code: "Untrusted", + message: "Domain is not trusted." + }, _a[12005] = { + code: "InvalidUrl", + message: "HTTPS is required." + }, _a[12007] = { + code: "FailedToOpen", + message: "Another dialog is already opened." + }, _a); + return table[internalCode] ? table[internalCode] : { + code: "Unknown", + message: "An unknown error has occured" + }; + } + Office.context.ui.displayDialogAsync(url, dialogOptions, (function(asyncResult) { + "failed" === asyncResult.status ? reject(new OfficeExtension.Error(lookupErrorCodeAndMessage(asyncResult.error.code))) : ((dialog = asyncResult.value).addEventHandler(Office.EventType.DialogMessageReceived, messageHandler), + dialog.addEventHandler(Office.EventType.DialogEventReceived, eventHandler), resolve(new Dialog(dialog))); + })); + })); + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function(d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function(d, b) { + if ("function" != typeof b && null !== b) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }); + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ErrorCodes = exports.PersistentKvStorageService = exports.storage = exports.AsyncStorage = void 0; + var OfficeExtension = __webpack_require__(0), _createTopLevelServiceObject = (OfficeExtension.BatchApiHelper.createPropertyObject, + OfficeExtension.BatchApiHelper.createMethodObject, OfficeExtension.BatchApiHelper.createIndexerObject, + OfficeExtension.BatchApiHelper.createRootServiceObject, OfficeExtension.BatchApiHelper.createTopLevelServiceObject), _invokeMethod = (OfficeExtension.BatchApiHelper.createChildItemObject, + OfficeExtension.BatchApiHelper.invokeMethod), _isNullOrUndefined = (OfficeExtension.BatchApiHelper.invokeEnsureUnchanged, + OfficeExtension.BatchApiHelper.invokeSetProperty, OfficeExtension.Utility.isNullOrUndefined), _toJson = (OfficeExtension.Utility.isUndefined, + OfficeExtension.Utility.throwIfNotLoaded, OfficeExtension.Utility.throwIfApiNotSupported, + OfficeExtension.Utility.load, OfficeExtension.Utility.retrieve, OfficeExtension.Utility.toJson), _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary, _processRetrieveResult = (OfficeExtension.Utility._handleNavigationPropertyResults, + OfficeExtension.Utility.adjustToDateTime, OfficeExtension.Utility.processRetrieveResult); + OfficeExtension.Utility.setMockData, OfficeExtension.CommonUtility.calculateApiFlags; + function callPersistentKvStorageManager(nativeCall, getValueOnSuccess) { + return new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + var storageManager = PersistentKvStorageManager.getInstance(), invokeId = storageManager.setCallBack((function(result, error) { + if (error) reject(error); else { + var value = getValueOnSuccess(result); + resolve(value); + } + })); + storageManager.ctx.sync().then((function() { + var storageService = storageManager.getPersistentKvStorageService(); + return nativeCall(storageService, invokeId), storageManager.ctx.sync(); + })).catch((function(e) { + reject(e); + })); + })); + } + function callStorageManager(nativeCall, getValueOnSuccess, callback) { + return new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + var storageManager = PersistentKvStorageManager.getInstance(), invokeId = storageManager.setCallBack((function(result, error) { + if (error) return callback && callback(error), void reject(error); + var value = getValueOnSuccess(result); + callback && callback(null, value), resolve(value); + })); + storageManager.ctx.sync().then((function() { + var storageService = storageManager.getPersistentKvStorageService(); + return nativeCall(storageService, invokeId), storageManager.ctx.sync(); + })).catch((function(e) { + reject(e); + })); + })); + } + exports.AsyncStorage = { + getItem: function(key, callback) { + return callStorageManager((function(storage, invokeId) { + return storage.multiGet(invokeId, JSON.stringify([ key ])); + }), (function(result) { + var parsedResult = JSON.parse(result); + return parsedResult && parsedResult[0] && parsedResult[0][1] ? parsedResult[0][1] : null; + }), callback); + }, + setItem: function(key, value, callback) { + return callStorageManager((function(storage, invokeId) { + return storage.multiSet(invokeId, JSON.stringify([ [ key, value ] ])); + }), (function() { + return null; + }), callback); + }, + removeItem: function(key, callback) { + return callStorageManager((function(storage, invokeId) { + return storage.multiRemove(invokeId, JSON.stringify([ key ])); + }), (function() { + return null; + }), callback); + }, + multiGet: function(keys, callback) { + return callStorageManager((function(storage, invokeId) { + return storage.multiGet(invokeId, JSON.stringify(keys)); + }), (function(result) { + var keyValues = JSON.parse(result), map = {}; + return keyValues && keyValues.forEach((function(_a) { + var key = _a[0], value = _a[1]; + return map[key] = value, value; + })), keys.map((function(key) { + return [ key, map[key] ? map[key] : null ]; + })); + }), callback); + }, + multiSet: function(keyValuePairs, callback) { + return callStorageManager((function(storage, invokeId) { + return storage.multiSet(invokeId, JSON.stringify(keyValuePairs)); + }), (function() { + return null; + }), callback); + }, + multiRemove: function(keys, callback) { + return callStorageManager((function(storage, invokeId) { + return storage.multiRemove(invokeId, JSON.stringify(keys)); + }), (function() { + return null; + }), callback); + }, + getAllKeys: function(callback) { + return callStorageManager((function(storage, invokeId) { + return storage.getAllKeys(invokeId); + }), (function(result) { + return JSON.parse(result); + }), callback); + }, + clear: function(callback) { + return callStorageManager((function(storage, invokeId) { + return storage.clear(invokeId); + }), (function() { + return null; + }), callback); + } + }, exports.storage = { + getItem: function(key) { + return callPersistentKvStorageManager((function(perStorage, invokeId) { + return perStorage.multiGet(invokeId, JSON.stringify([ key ])); + }), (function(result) { + var parsedResult = JSON.parse(result); + return parsedResult && parsedResult[0] && parsedResult[0][1] ? parsedResult[0][1] : null; + })); + }, + setItem: function(key, value) { + return callPersistentKvStorageManager((function(perStorage, invokeId) { + return perStorage.multiSet(invokeId, JSON.stringify([ [ key, value ] ])); + }), (function() { + return null; + })); + }, + removeItem: function(key) { + return callPersistentKvStorageManager((function(perStorage, invokeId) { + return perStorage.multiRemove(invokeId, JSON.stringify([ key ])); + }), (function() { + return null; + })); + }, + getItems: function(keys) { + return callPersistentKvStorageManager((function(perStorage, invokeId) { + return perStorage.multiGet(invokeId, JSON.stringify(keys)); + }), (function(result) { + var keyValues = JSON.parse(result), map = {}; + return keys.forEach((function(k) { + map[k] = null; + })), keyValues && keyValues.forEach((function(_a) { + var key = _a[0], value = _a[1]; + return map[key] = value, value; + })), map; + })); + }, + setItems: function(keyValues) { + var keyValuePairs = []; + for (var key in keyValues) keyValues.hasOwnProperty(key) && keyValuePairs.push([ key, keyValues[key] ]); + return callPersistentKvStorageManager((function(storage, invokeId) { + return storage.multiSet(invokeId, JSON.stringify(keyValuePairs)); + }), (function() { + return null; + })); + }, + removeItems: function(keys) { + return callPersistentKvStorageManager((function(perStorage, invokeId) { + return perStorage.multiRemove(invokeId, JSON.stringify(keys)); + }), (function() { + return null; + })); + }, + getKeys: function() { + return callPersistentKvStorageManager((function(perStorage, invokeId) { + return perStorage.getAllKeys(invokeId); + }), (function(result) { + return JSON.parse(result); + })); + } + }; + var PersistentKvStorageManager = function() { + function PersistentKvStorageManager() { + var _this = this; + this._invokeId = 0, this._callDict = {}, this.ctx = new OfficeExtension.ClientRequestContext, + this._perkvstorService = PersistentKvStorageService.newObject(this.ctx), this._eventResult = this._perkvstorService.onPersistentStorageMessage.add((function(args) { + OfficeExtension.Utility.log("persistentKvStoragegMessageHandler:" + JSON.stringify(args)); + var callback = _this._callDict[args.invokeId]; + callback && (callback(args.message, args.error), delete _this._callDict[args.invokeId]); + })); + } + return PersistentKvStorageManager.getInstance = function() { + return void 0 === PersistentKvStorageManager.instance ? PersistentKvStorageManager.instance = new PersistentKvStorageManager : PersistentKvStorageManager.instance._perkvstorService = PersistentKvStorageService.newObject(PersistentKvStorageManager.instance.ctx), + PersistentKvStorageManager.instance; + }, PersistentKvStorageManager.prototype.getPersistentKvStorageService = function() { + return this._perkvstorService; + }, PersistentKvStorageManager.prototype.getCallBack = function(callId) { + return this._callDict[callId]; + }, PersistentKvStorageManager.prototype.setCallBack = function(callback) { + var id = this._invokeId; + return this._callDict[this._invokeId++] = callback, id; + }, PersistentKvStorageManager; + }(), PersistentKvStorageService = function(_super) { + function PersistentKvStorageService() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(PersistentKvStorageService, _super), Object.defineProperty(PersistentKvStorageService.prototype, "_className", { + get: function() { + return "PersistentKvStorageService"; + }, + enumerable: !1, + configurable: !0 + }), PersistentKvStorageService.prototype.clear = function(id) { + _invokeMethod(this, "Clear", 1, [ id ], 4, 0); + }, PersistentKvStorageService.prototype.getAllKeys = function(id) { + _invokeMethod(this, "GetAllKeys", 1, [ id ], 4, 0); + }, PersistentKvStorageService.prototype.multiGet = function(id, jsonKeys) { + _invokeMethod(this, "MultiGet", 1, [ id, jsonKeys ], 4, 0); + }, PersistentKvStorageService.prototype.multiRemove = function(id, jsonKeys) { + _invokeMethod(this, "MultiRemove", 1, [ id, jsonKeys ], 4, 0); + }, PersistentKvStorageService.prototype.multiSet = function(id, jsonKeyValue) { + _invokeMethod(this, "MultiSet", 1, [ id, jsonKeyValue ], 4, 0); + }, PersistentKvStorageService.prototype._handleResult = function(value) { + (_super.prototype._handleResult.call(this, value), _isNullOrUndefined(value)) || _fixObjectPathIfNecessary(this, value); + }, PersistentKvStorageService.prototype._handleRetrieveResult = function(value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, PersistentKvStorageService.newObject = function(context) { + return _createTopLevelServiceObject(PersistentKvStorageService, context, "Microsoft.PersistentKvStorage.PersistentKvStorageService", !1, 4); + }, Object.defineProperty(PersistentKvStorageService.prototype, "onPersistentStorageMessage", { + get: function() { + return this.m_persistentStorageMessage || (this.m_persistentStorageMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "PersistentStorageMessage", { + eventType: 65537, + registerFunc: function() {}, + unregisterFunc: function() {}, + getTargetIdFunc: function() { + return null; + }, + eventArgsTransformFunc: function(args) { + var perkvstorArgs, internalCode, _a, table; + try { + var parsedMessage = JSON.parse(args.message), hr = parseInt(parsedMessage.errorCode), error = 0 != hr ? new OfficeExtension.Error((internalCode = hr, + (_a = {})[16389] = { + code: "GenericException", + message: "Unknown error." + }, _a[65535] = { + code: "Unexcepted", + message: "Catastrophic failure." + }, _a[14] = { + code: "OutOfMemory", + message: "Ran out of memory." + }, _a[87] = { + code: "InvalidArg", + message: "One or more arguments are invalid." + }, _a[16385] = { + code: "NotImplemented", + message: "Not implemented." + }, _a[6] = { + code: "BadHandle", + message: "File Handle is not Set." + }, _a[5] = { + code: "AccessDenied", + message: "Can't read the Storage File." + }, (table = _a)[internalCode] ? table[internalCode] : { + code: "Unknown", + message: "An unknown error has occured" + })) : null; + perkvstorArgs = { + invokeId: parsedMessage.invokeId, + message: parsedMessage.message, + error: error + }; + } catch (e) { + perkvstorArgs = { + invokeId: -1, + message: e.message, + error: new OfficeExtension.Error({ + code: "GenericException", + message: "Unknown error" + }) + }; + } + return OfficeExtension.Utility._createPromiseFromResult(perkvstorArgs); + } + })), this.m_persistentStorageMessage; + }, + enumerable: !1, + configurable: !0 + }), PersistentKvStorageService.prototype.toJSON = function() { + return _toJson(this, {}, {}); + }, PersistentKvStorageService; + }(OfficeExtension.ClientObject); + exports.PersistentKvStorageService = PersistentKvStorageService, function(ErrorCodes) { + ErrorCodes.generalException = "GeneralException"; + }(exports.ErrorCodes || (exports.ErrorCodes = {})); +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.storage = void 0; + var prefix = "_OfficeRuntime_Storage_"; + function ensureFreshLocalStorage() { + window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_", null), window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_"); + } + function performAction(action) { + return new Promise((function(resolve, reject) { + try { + ensureFreshLocalStorage(), action(), resolve(); + } catch (e) { + reject(e); + } + })); + } + function performActionAndReturnResult(action) { + return new Promise((function(resolve, reject) { + try { + ensureFreshLocalStorage(), resolve(action()); + } catch (e) { + reject(e); + } + })); + } + function performMultiAction(collection, action) { + return new Promise((function(resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } catch (e) { + errors.push(e); + } + for (var key in collection) if (collection.hasOwnProperty(key) || Array.isArray(collection)) try { + Array.isArray(collection) ? action(collection[key]) : action(key); + } catch (e) { + errors.push(e); + } + errors.length > 0 ? reject(new Error("Unknown error.")) : resolve(); + })); + } + exports.storage = { + getItem: function(key) { + return performActionAndReturnResult((function() { + return window.localStorage.getItem(prefix + key); + })); + }, + setItem: function(key, value) { + return performAction((function() { + return window.localStorage.setItem(prefix + key, value); + })); + }, + removeItem: function(key) { + return performAction((function() { + return window.localStorage.removeItem(prefix + key); + })); + }, + getItems: function(keys) { + return new Promise((function(resolve, reject) { + var result = {}, errors = []; + try { + ensureFreshLocalStorage(); + } catch (e) { + reject(e); + } + keys.forEach((function(key) { + try { + var value = window.localStorage.getItem(prefix + key); + result[key] = value || null; + } catch (e) { + errors.push(e); + } + })), errors.length > 0 ? reject(new Error("Unknown error.")) : resolve(result); + })); + }, + setItems: function(keyValues) { + return performMultiAction(keyValues, (function(key) { + return window.localStorage.setItem(prefix + key, keyValues[key]); + })); + }, + removeItems: function(keys) { + return performMultiAction(keys, (function(key) { + window.localStorage.removeItem(prefix + key); + })); + }, + getKeys: function() { + return performActionAndReturnResult((function() { + return Object.keys(window.localStorage).filter((function(fullKey) { + return 0 === fullKey.indexOf(prefix); + })).map((function(fullKey) { + return fullKey.substr(prefix.length); + })); + })); + } + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))((function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + } + function step(result) { + var value; + result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P((function(resolve) { + resolve(value); + }))).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + })); + }, __generator = this && this.__generator || function(thisArg, body) { + var f, y, t, g, _ = { + label: 0, + sent: function() { + if (1 & t[0]) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }; + return g = { + next: verb(0), + throw: verb(1), + return: verb(2) + }, "function" == typeof Symbol && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return function(op) { + if (f) throw new TypeError("Generator is already executing."); + for (;_; ) try { + if (f = 1, y && (t = 2 & op[0] ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), + 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + switch (y = 0, t && (op = [ 2 & op[0], t.value ]), op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + return _.label++, { + value: op[1], + done: !1 + }; + + case 5: + _.label++, y = op[1], op = [ 0 ]; + continue; + + case 7: + op = _.ops.pop(), _.trys.pop(); + continue; + + default: + if (!(t = _.trys, (t = t.length > 0 && t[t.length - 1]) || 6 !== op[0] && 2 !== op[0])) { + _ = 0; + continue; + } + if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (6 === op[0] && _.label < t[1]) { + _.label = t[1], t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2], _.ops.push(op); + break; + } + t[2] && _.ops.pop(), _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [ 6, e ], y = 0; + } finally { + f = t = 0; + } + if (5 & op[0]) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: !0 + }; + }([ n, v ]); + }; + } + }; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.experimentation = void 0; + var ExperimentationNative = function() { + function ExperimentationNative() {} + return ExperimentationNative.prototype.getBooleanFeatureGate = function(featureName, defaultValue) { + try { + var featureGateValue = Microsoft.Office.WebExtension.FeatureGates[featureName]; + return "true" === featureGateValue.toString().toLowerCase() || !0 === featureGateValue; + } catch (error) { + return defaultValue; + } + }, ExperimentationNative.prototype.getIntFeatureGate = function(featureName, defaultValue) { + try { + var featureGateValue = parseInt(Microsoft.Office.WebExtension.FeatureGates[featureName]); + return isNaN(featureGateValue) ? defaultValue : featureGateValue; + } catch (error) { + return defaultValue; + } + }, ExperimentationNative.prototype.getStringFeatureGate = function(featureName, defaultValue) { + try { + var featureGateValue = Microsoft.Office.WebExtension.FeatureGates[featureName]; + return null == featureGateValue ? defaultValue : featureGateValue; + } catch (error) { + return defaultValue; + } + }, ExperimentationNative.prototype.getChangeGate = function(changeGateName) { + return this.getBooleanFeatureGate(changeGateName, !0); + }, ExperimentationNative.prototype.getBooleanFeatureGateAsync = function(featureName, defaultValue) { + return __awaiter(this, void 0, void 0, (function() { + var context, feature; + return __generator(this, (function(_b) { + switch (_b.label) { + case 0: + return _b.trys.push([ 0, 2, , 3 ]), context = this.getRequestContext(), feature = context.flighting.getFeature(featureName, "Boolean", defaultValue), + context.load(feature), [ 4, context.sync() ]; + + case 1: + return _b.sent(), [ 2, feature.value ]; + + case 2: + return _b.sent(), [ 2, Promise.resolve(defaultValue) ]; + + case 3: + return [ 2 ]; + } + })); + })); + }, ExperimentationNative.prototype.getStringFeatureGateAsync = function(featureName, defaultValue) { + return __awaiter(this, void 0, void 0, (function() { + var context, feature; + return __generator(this, (function(_b) { + switch (_b.label) { + case 0: + return _b.trys.push([ 0, 2, , 3 ]), context = this.getRequestContext(), feature = context.flighting.getFeature(featureName, "String", defaultValue), + context.load(feature), [ 4, context.sync() ]; + + case 1: + return _b.sent(), [ 2, feature.value ]; + + case 2: + return _b.sent(), [ 2, Promise.resolve(defaultValue) ]; + + case 3: + return [ 2 ]; + } + })); + })); + }, ExperimentationNative.prototype.getIntFeatureGateAsync = function(featureName, defaultValue) { + return __awaiter(this, void 0, void 0, (function() { + var context, feature; + return __generator(this, (function(_b) { + switch (_b.label) { + case 0: + return _b.trys.push([ 0, 2, , 3 ]), context = this.getRequestContext(), feature = context.flighting.getFeature(featureName, "Integer", defaultValue), + context.load(feature), [ 4, context.sync() ]; + + case 1: + return _b.sent(), [ 2, feature.value ]; + + case 2: + return _b.sent(), [ 2, Promise.resolve(defaultValue) ]; + + case 3: + return [ 2 ]; + } + })); + })); + }, ExperimentationNative.prototype.getRequestContext = function() { + var ctx; + if (Office.context.platform !== Office.PlatformType.OfficeOnline) { + switch (Office.context.host) { + case Office.HostType.Excel: + ctx = new Excel.RequestContext; + break; + + case Office.HostType.OneNote: + ctx = new OneNote.RequestContext; + break; + + case Office.HostType.PowerPoint: + ctx = new PowerPoint.RequestContext; + break; + + case Office.HostType.Word: + ctx = new Word.RequestContext; + break; + + default: + throw new Error("Unknown Application ".concat(Office.context.host)); + } + return ctx; + } + }, ExperimentationNative; + }(); + exports.experimentation = new ExperimentationNative; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Message = void 0; + var Message_1 = __webpack_require__(11); + Object.defineProperty(exports, "Message", { + enumerable: !0, + get: function() { + return Message_1.Message; + } + }); +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Message = void 0; + var ListenerManager_1 = __webpack_require__(12), Message = function() { + function Message() { + this.listeners = {}; + } + return Message.prototype.on = function(eventName, listener) { + return this.add(eventName, listener), new Promise((function(resolve) { + resolve(); + })); + }, Message.prototype.off = function(eventName, listener) { + return this.remove(eventName, listener), new Promise((function(resolve) { + resolve(); + })); + }, Message.prototype.emit = function(eventName, message) { + return this.send(eventName, message), new Promise((function(resolve) { + resolve(); + })); + }, Object.defineProperty(Message, "instance", { + get: function() { + return Message.singleton || (Message.singleton = new Message), this.singleton; + }, + enumerable: !1, + configurable: !0 + }), Message.prototype.setupReceive = function() { + Office && Office.context && Office.context.messaging && !Office.context.messaging.onMessage && (Office.context.messaging.onMessage = this.receiveMessage.bind(this)); + }, Message.prototype.add = function(eventName, listener) { + this.listeners.hasOwnProperty(eventName) || (this.listeners[eventName] = new ListenerManager_1.ListenerManager, + this.setupReceive()), this.listeners[eventName].add(listener); + }, Message.prototype.remove = function(eventName, listener) { + this.listeners.hasOwnProperty(eventName) && (listener ? this.listeners[eventName].remove(listener) : delete this.listeners[eventName]); + }, Message.prototype.send = function(eventName, message) { + var wrapped = { + eventName: eventName, + message: message + }; + Office && Office.context && Office.context.messaging && Office.context.messaging.sendMessage && Office.context.messaging.sendMessage(wrapped); + }, Message.prototype.receiveMessage = function(wrapped) { + var eventName = wrapped.eventName, message = wrapped.message; + this.listeners.hasOwnProperty(eventName) && this.listeners[eventName].call(message); + }, Message; + }(); + exports.Message = Message; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ListenerManager = void 0; + var ListenerManager = function() { + function ListenerManager() { + this.listeners = []; + } + return ListenerManager.prototype.add = function(listener) { + this.listeners.push(listener); + }, ListenerManager.prototype.remove = function(listener) { + var index = this.listeners.lastIndexOf(listener); + -1 !== index && this.listeners.splice(index, 1); + }, ListenerManager.prototype.call = function(message) { + this.listeners.forEach((function(listener) { + return listener(message); + })); + }, ListenerManager; + }(); + exports.ListenerManager = ListenerManager; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Ribbon = exports.ui = void 0, exports.ui = { + getRibbon: function() { + return new Promise((function(resolve, reject) { + resolve(new Ribbon); + })); + } + }; + var Ribbon = function() { + function Ribbon() { + this.requestContext = new OfficeCore.RequestContext, OSF.WebAuth && "web" == OSF._OfficeAppFactory.getHostInfo().hostPlatform && (this.requestContext._customData = "WacPartition"); + } + return Ribbon.prototype.requestUpdate = function(input) { + var ribbon = this.requestContext.ribbon; + return input.tabs.filter((function(tab) { + return !!tab.id; + })).forEach((function(tab) { + var ribbonTab = ribbon.getTab(tab.id); + void 0 !== tab.visible && null !== tab.visible && ribbonTab.setVisibility(tab.visible), + tab.controls.filter((function(control) { + return !!control.id; + })).forEach((function(control) { + var ribbonControl = ribbon.getButton(control.id); + void 0 !== control.enabled && null !== control.enabled && (ribbonControl.enabled = control.enabled); + })); + })), this.requestContext.sync(); + }, Ribbon; + }(); + exports.Ribbon = Ribbon; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Auth = void 0; + var OfficeExtension = __webpack_require__(0), Auth = function() { + function Auth() {} + return Auth.prototype.getAccessToken = function(params) { + return new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + try { + Office.context.auth.getAccessTokenAsync(params || {}, (function(result) { + "succeeded" === result.status ? resolve(result.value) : reject(result.error); + })); + } catch (error) { + reject(error); + } + })); + }, Auth.prototype.getAuthContext = function() { + return new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + try { + Office.context.auth.getAuthContextAsync((function(result) { + "succeeded" === result.status ? resolve(result.value) : reject(result.error); + })); + } catch (error) { + reject(error); + } + })); + }, Object.defineProperty(Auth, "instance", { + get: function() { + return Auth.singleton || (Auth.singleton = new Auth), Auth.singleton; + }, + enumerable: !1, + configurable: !0 + }), Auth; + }(); + exports.Auth = Auth; +} ]); \ No newline at end of file diff --git a/dist/excel-mac-16.00-core.js b/dist/excel-mac-16.00-core.js new file mode 100644 index 000000000..e2a48e2c3 --- /dev/null +++ b/dist/excel-mac-16.00-core.js @@ -0,0 +1,22 @@ +/* Excel Mac specific API library (Core APIs only) */ + +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + + This file also contains the following Promise implementation (with a few small modifications): + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 2.3.0 +*/ +var __extends=this&&this.__extends||function(){var a=function(c,b){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(c,a){for(var b in a)if(a.hasOwnProperty(b))c[b]=a[b]};return a(c,b)};return function(c,b){a(c,b);function d(){this.constructor=c}c.prototype=b===null?Object.create(b):(d.prototype=b.prototype,new d)}}(),OfficeExt;(function(b){var a=function(){var a=true;function b(){}b.prototype.isMsAjaxLoaded=function(){var b="function",c="undefined";if(typeof Sys!==c&&typeof Type!==c&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b&&typeof Function._validateParams===b&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===b)return a;else return false};b.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(b.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==null&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==null&&a.isMsAjaxLoaded())a._msAjaxString=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==null&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return b}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a==h)for(var b=0;b6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(d)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,d)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,b);f[e]=a}catch(g){}}return f},loadScript:function(f,g,i){if(f&&g){var k=window.document,d=v[f];if(!d){var e=k.createElement("script");e.type="text/javascript";d={loaded:c,pendingCallbacks:[g],timer:a};v[f]=d;var j=function(){if(d.timer!=a){clearTimeout(d.timer);delete d.timer}d.loaded=b;for(var e=d.pendingCallbacks.length,c=0;c0)h(a);else h(new Event("Script load timed out"))},h=function(g){delete v[f];if(d.timer!=a){clearTimeout(d.timer);delete d.timer}for(var c=d.pendingCallbacks.length,b=0;b=0},pushFlight:function(a){if(OSF.Flights.indexOf(a)<0){OSF.Flights.push(a);return b}return c},getBooleanSetting:function(a){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,a)},getBooleanFromDictionary:function(b,a){var d=b&&a&&b[a]!==undefined&&b[a]&&(typeof b[a]===h&&b[a].toUpperCase()==="TRUE"||typeof b[a]==="boolean"&&b[a]);return d!==undefined?d:c},getIntFromDictionary:function(b,a){if(b&&a&&b[a]!==undefined&&typeof b[a]===h)return parseInt(b[a]);else return NaN},pushIntFlight:function(a,d){if(!(a in OSF.IntFlights)){OSF.IntFlights[a]=d;return b}return c},getIntFlight:function(a){if(OSF.IntFlights&&a in OSF.IntFlights)return OSF.IntFlights[a];else return NaN},parseFlightsFromWindowName:function(a,b){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(a,b,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(a,c){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(B,G,b,a,c))},parseArrayWithDefault:function(b){var a=[];try{a=JSON.parse(b)}catch(c){}if(!Array.isArray(a))a=[];return a},parseInfoFromWindowName:function(g,h,f){try{var b=JSON.parse(h),c=b!=a?b[f]:a,d=t();if(!g&&d&&b!=a){var e=b[OSF.WindowNameItemKeys.BaseFrameName]+f;if(c)d.setItem(e,c);else c=d.getItem(e)}return c}catch(i){return a}},parseInfoWithGivenFragment:function(m,j,k,i,l){var f=l.split(m),b=f.length>1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(y)>=0)b=b.split(y)[0];b=decodeURIComponent(b)}var c=t();if(!i&&c){var e=window.name.indexOf(j);if(e>d){var g=window.name.indexOf(";",e);if(g==d)g=window.name.length;var h=window.name.substring(e,g);if(b)c.setItem(h,b);else b=c.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==f)a=b.split("|");if(typeof a[1]==f)a=b.split("%7C");return a},getXdmFieldValue:function(f,d){var b=e,c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(f){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:c},{name:"expectedProperties",type:Object,mayBeNull:c},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var d in e){a=Function._validateParameter(f[d],e[d],d);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==f&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[i])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[i])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[p,i,q])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[p,i,q])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;g=h&255;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63;if(!isNaN(h)){d=h>>8;f=j&255;g=j>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63}if(isNaN(h))b[a-1]=64;else if(isNaN(j)){b[a-2]=64;b[a-1]=64}for(var l=0;l=2)return a[b-2]+"."+a[b-1];else if(b==1)return a[0]},isiOS:function(){return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?b:c},isChrome:function(){return window.navigator.userAgent.indexOf("Chrome")>0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},startsWith:function(b,a,c){if(c)return b.substr(0,a.length)===a;else return b.startsWith(a)},containsPort:function(d,e,c,a){return this.startsWith(d,e+"//"+c+":"+a,b)||this.startsWith(d,c+":"+a,b)},getRedundandPortString:function(b,a){if(!b||!a)return e;if(a.protocol==k&&this.containsPort(b,k,a.hostname,"443"))return ":443";else if(a.protocol=="http:"&&this.containsPort(b,"http:",a.hostname,"80"))return ":80";return e},removeChar:function(a,b){if(b=a.length)return this.removeChar(a,b);else if(c==="/"){if(a.charAt(b+1)==="?"||a.charAt(b+1)===g)return this.removeChar(a,b)}else if(c==="?")if(a.charAt(b+1)===g)return this.removeChar(a,b);return a},cleanUrl:function(a){a=this.cleanUrlOfChar(a,"/");a=this.cleanUrlOfChar(a,"?");a=this.cleanUrlOfChar(a,g);if(a.substr(0,8)=="https://"){var b=a.indexOf(":443");if(b!=d)if(b==a.length-4||a.charAt(b+4)=="/"||a.charAt(b+4)=="?"||a.charAt(b+4)==g)a=a.substring(0,b)+a.substring(b+4)}else if(a.substr(0,7)=="http://"){var b=a.indexOf(":80");if(b!=d)if(b==a.length-3||a.charAt(b+3)=="/"||a.charAt(b+3)=="?"||a.charAt(b+3)==g)a=a.substring(0,b)+a.substring(b+3)}return a},parseUrl:function(g,i){var h=this;if(i===void 0)i=c;if(typeof g===f||!g)return undefined;var j="NotHttps",o="InvalidUrl",n=h.isIE(),b={protocol:undefined,hostname:undefined,host:undefined,port:undefined,pathname:undefined,search:undefined,hash:undefined,isPortPartOfUrl:undefined};try{if(n){var a=document.createElement("a");a.href=g;if(!a||!a.protocol||!a.host||!a.hostname||!a.href||h.cleanUrl(a.href).toLowerCase()!==h.cleanUrl(g).toLowerCase())throw o;if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps))if(i&&a.protocol!=k)throw new Error(j);var m=h.getRedundandPortString(g,a);b.protocol=a.protocol;b.hostname=a.hostname;b.port=m==e?a.port:e;b.host=m!=e?a.hostname:a.host;b.pathname=(n?"/":e)+a.pathname;b.search=a.search;b.hash=a.hash;b.isPortPartOfUrl=h.containsPort(g,a.protocol,a.hostname,a.port)}else{var d=new URL(g);if(d&&d.protocol&&d.host&&d.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps))if(i&&d.protocol!=k)throw new Error(j);b.protocol=d.protocol;b.hostname=d.hostname;b.port=d.port;b.host=d.host;b.pathname=d.pathname;b.search=d.search;b.hash=d.hash;b.isPortPartOfUrl=d.host.lastIndexOf(":"+d.port)==d.host.length-d.port.length-1}}}catch(l){if(l.message===j)throw l}return b},shallowCopy:function(b){if(b==a)return a;else if(!(b instanceof Object))return b;else if(Array.isArray(b)){for(var e=[],d=0;dc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};e=x(e);g=i?e.length-1:0;if(e.length===0)return a;while(!h&&g>=0&&gc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};f=x(f);j=n(f,o);e=i(f.length,j,m);if(e<0)return a;while(!h&&e>=0&&ed.length)return c;if(d.substr(d.length-a.length)===a)return b}return c},hashCode:function(b){var a=0;if(!OSF.OUtil.isNullOrUndefined(b)){var c=0,d=b.length;while(c0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();try{(function(){OSF.Flights=OSF.OUtil.parseFlights(true)})()}catch(ex){}window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614,Visio:8388615,OneNoteAndroid:4194305};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20,UpdateTargetUrl:21,InstallCustomFunctions:22,SendTelemetryEvent:23,UninstallCustomFunctions:24,SendMessage:25,LaunchExtensionComponent:26,StopExtensionComponent:27,RestartExtensionComponent:28,EnableTaskPaneHeaderButton:29,DisableTaskPaneHeaderButton:30,TaskPaneHeaderButtonClicked:31,RemoveAppCommandsAddin:32,RefreshRibbonGallery:33,GetOriginalControlId:34,OfficeJsReady:35,InsertDevManifest:36,InsertDevManifestError:37,SendCustomerContent:38,KeyboardShortcuts:39};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(B,x,s,p,u,y,t,w,A,k,z,m,l,o,i,h,g,f,j,c,e,v,r,b,n,q,d){var a=this;a._id=B;a._appName=x;a._appVersion=s;a._appUILocale=p;a._dataLocale=u;a._docUrl=y;a._clientMode=t;a._settings=w;a._reason=A;a._osfControlType=k;a._eToken=z;a._correlationId=m;a._appInstanceId=l;a._touchEnabled=o;a._commerceAllowed=i;a._appMinorVersion=h;a._requirementMatrix=g;a._hostCustomMessage=f;a._hostFullVersion=j;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=e;a._addinName=v;a._appDomains=r;a._dialogRequirementMatrix=b;a._featureGates=n;a._officeTheme=q;a._initialDisplayMode=d;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.get_appDomains=function(){return this._appDomains};a.get_featureGates=function(){return this._featureGates};a.get_officeTheme=function(){return this._officeTheme};a.get_initialDisplayMode=function(){return this._initialDisplayMode?this._initialDisplayMode:0}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",ControlActivation:"controlActivation"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",JsonData:"jsonData",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",AllowConsentPrompt:"allowConsentPrompt",ForMSGraphAccess:"forMSGraphAccess",AllowSignInPrompt:"allowSignInPrompt",JsonPayload:"jsonPayload",EnableNewHosts:"enableNewHosts",AccountTypeFilter:"accountTypeFilter",AddinTrustId:"addinTrustId",Reserved:"reserved",Tcid:"tcid",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo",TargetOrigin:"targetOrigin",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64",FormId:"formId"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetAuthContextMethod:99,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidInsertFormMethod:106,dispidDisplayRibbonCalloutAsyncMethod:109,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidExecuteFeature:146,dispidQueryFeature:147,dispidGetNestedAppAuthContextMethod:205,dispidMethodMax:205};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidOlkRecurrenceChangedEvent:49,dispidOlkAttachmentsChangedEvent:50,dispidOlkEnhancedLocationsChangedEvent:51,dispidOlkInfobarClickedEvent:52,dispidOlkSelectedItemsChangedEvent:53,dispidOlkSensitivityLabelChangedEvent:54,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeOperationCancelled:5014,ooeWorkbookHidden:5015,ooeWriteNotSupportedWhenModalDialogOpen:5016,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeRequestPayloadSizeLimitExceeded:5103,ooeResponsePayloadSizeLimitExceeded:5104,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeModalDialogOpen:12012,ooeDocumentIsInactive:12013,ooeDialogParentIsMinimized:12014,ooeNotSSOAgave:13000,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010,ooeResourceNotAllowed:13011,ooeSSOUnsupportedPlatform:13012,ooeSSOCallThrottled:13013,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:b.L_InvalidOrTimedOutSession,message:b.L_InvalidOrTimedOutSessionMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:b.L_APICallFailed,message:b.L_InvalidApiArgumentsMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden]={name:b.L_APICallFailed,message:b.L_WorkbookHiddenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen]={name:b.L_APICallFailed,message:b.L_WriteNotSupportedWhenModalDialogOpen};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded]={name:b.L_APICallFailed,message:b.L_RequestPayloadSizeLimitExceededMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded]={name:b.L_APICallFailed,message:b.L_ResponsePayloadSizeLimitExceededMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen]={name:b.L_DisplayDialogError,message:b.L_ModalDialogOpen};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive]={name:b.L_DisplayDialogError,message:b.L_DocumentIsInactive};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized]={name:b.L_DisplayDialogError,message:b.L_DialogParentIsMinimized};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:b.L_APINotSupported,message:b.L_InvalidSSOAddinMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:b.L_UserNotSignedIn,message:b.L_UserNotSignedIn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:b.L_UserAborted,message:b.L_UserAbortedMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:b.L_UnsupportedUserIdentity,message:b.L_UnsupportedUserIdentityMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:b.L_InvalidResourceUrl,message:b.L_InvalidResourceUrlMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:b.L_InvalidGrant,message:b.L_InvalidGrantMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:b.L_SSOClientError,message:b.L_SSOClientErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:b.L_SSOServerError,message:b.L_SSOServerErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:b.L_AddinIsAlreadyRequestingToken,message:b.L_AddinIsAlreadyRequestingTokenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:b.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:b.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:b.L_SSOConnectionLostError,message:b.L_SSOConnectionLostErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:b.L_APINotSupported,message:b.L_SSOUnsupportedPlatform};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:b.L_OperationCancelledError,message:b.L_OperationCancelledErrorMessage}}}}();(function(a){var b;(function(b){var a=1.1,A=function(){function a(){}return a}();b.RequirementVersion=A;var d=function(){function a(b){var a=this;a.isSetSupported=function(d,b){if(d==undefined)return false;if(b==undefined)b=0;var f=this._setMap,e=f._sets;if(e.hasOwnProperty(d.toLowerCase())){var g=e[d.toLowerCase()];try{var a=this._getVersion(g);b=b+"";var c=this._getVersion(b);if(a.major>0&&a.major>c.major)return true;if(a.major>0&&a.minor>=0&&a.major==c.major&&a.minor>=c.minor)return true}catch(h){return false}}return false};a._getVersion=function(b){var a="version format incorrect";b=b+"";var c=b.split("."),d=0,e=0;if(c.length<2&&isNaN(Number(b)))throw a;else{d=Number(c[0]);if(c.length>=2)e=Number(c[1]);if(isNaN(d)||isNaN(e))throw a}var f={minor:e,major:d};return f};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var l=function(c){__extends(b,c);function b(){return c.call(this,{dialogapi:a})||this}return b}(c);b.DefaultRequiredDialogSetRequirement=l;var k=function(c){__extends(b,c);function b(){return c.call(this,{dialogorigin:a})||this}return b}(c);b.DefaultOptionalDialogSetRequirement=k;var f=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})||this}return b}(c);b.ExcelClientDefaultSetRequirement=f;var m=function(c){__extends(b,c);function b(){var b=c.call(this)||this;b._addSetMap({imagecoercion:a});return b}return b}(f);b.ExcelClientV1DefaultSetRequirement=m;var n=function(b){__extends(a,b);function a(){return b.call(this,{mailbox:1.3})||this}return a}(c);b.OutlookClientDefaultSetRequirement=n;var h=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})||this}return b}(c);b.WordClientDefaultSetRequirement=h;var r=function(c){__extends(b,c);function b(){var b=c.call(this)||this;b._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a});return b}return b}(h);b.WordClientV1DefaultSetRequirement=r;var e=function(c){__extends(b,c);function b(){return c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})||this}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){var b=c.call(this)||this;b._addSetMap({imagecoercion:a});return b}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var q=function(c){__extends(b,c);function b(){return c.call(this,{selection:a,textcoercion:a})||this}return b}(c);b.ProjectClientDefaultSetRequirement=q;var w=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})||this}return b}(c);b.ExcelWebDefaultSetRequirement=w;var y=function(c){__extends(b,c);function b(){return c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})||this}return b}(c);b.WordWebDefaultSetRequirement=y;var p=function(c){__extends(b,c);function b(){return c.call(this,{activeview:a,settings:a})||this}return b}(c);b.PowerpointWebDefaultSetRequirement=p;var g=function(b){__extends(a,b);function a(){return b.call(this,{mailbox:1.3})||this}return a}(c);b.OutlookWebDefaultSetRequirement=g;var x=function(c){__extends(b,c);function b(){return c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})||this}return b}(c);b.SwayWebDefaultSetRequirement=x;var t=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})||this}return b}(c);b.AccessWebDefaultSetRequirement=t;var v=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})||this}return b}(c);b.ExcelIOSDefaultSetRequirement=v;var i=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})||this}return b}(c);b.WordIOSDefaultSetRequirement=i;var u=function(b){__extends(a,b);function a(){var a=b.call(this)||this;a._addSetMap({customxmlparts:1.2,wordapi:1.2});return a}return a}(i);b.WordIOSV1DefaultSetRequirement=u;var o=function(c){__extends(b,c);function b(){return c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})||this}return b}(c);b.PowerpointIOSDefaultSetRequirement=o;var s=function(c){__extends(b,c);function b(){return c.call(this,{mailbox:a})||this}return b}(c);b.OutlookIOSDefaultSetRequirement=s;var z=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var i=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(i))}else{var h=a.getClientFullVersionString(f);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDefaultDialogRequirementMatrix=function(h){var a=undefined,i=h.get_dialogRequirementMatrix();if(i!=undefined&&i.length>0&&typeof JSON!==b){var f=JSON.parse(h.get_requirementMatrix().toLowerCase());a=new c(f)}else{a=new l;var g=h.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var f=JSON.parse(g.toLowerCase());for(var e in a._sets)if(f.hasOwnProperty(e))a._sets[e]=f[e];var j=new k;for(var e in j._sets)if(f.hasOwnProperty(e))a._sets[e]=f[e]}}return new d(a)};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new f;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new h;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new m;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new n;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new w;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new y;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new g;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new g;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new q;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new t;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new p;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new v;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new x;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new i;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new u;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new o;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new s};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=z})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,j,k,c,d){var i="officeTheme",h="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},isDialog:{value:OSF._OfficeAppFactory.getHostInfo().isDialog},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});k&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:k});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});a.auth&&OSF.OUtil.defineEnumerableProperty(b,"auth",{value:a.auth});a.webAuth&&OSF.OUtil.defineEnumerableProperty(b,"webAuth",{value:a.webAuth});a.application&&OSF.OUtil.defineEnumerableProperty(b,"application",{value:a.application});a.extensionLifeCycle&&OSF.OUtil.defineEnumerableProperty(b,"extensionLifeCycle",{value:a.extensionLifeCycle});a.messaging&&OSF.OUtil.defineEnumerableProperty(b,"messaging",{value:a.messaging});a.ui&&a.ui.taskPaneAction&&OSF.OUtil.defineEnumerableProperty(b,"taskPaneAction",{value:a.ui.taskPaneAction});a.ui&&a.ui.ribbonGallery&&OSF.OUtil.defineEnumerableProperty(b,"ribbonGallery",{value:a.ui.ribbonGallery});if(a.get_isDialog()){var f=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,h,{value:f})}else{j&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:j});if(c){var l=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,l,{value:c})}if(a.get_officeTheme())OSF.OUtil.defineEnumerableProperty(b,i,{"get":function(){return a.get_officeTheme()}});else d&&OSF.OUtil.defineEnumerableProperty(b,i,{"get":function(){return d()}});var f=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,h,{value:f});if(a.get_featureGates){var e=a.get_featureGates();if(e&&e["EnablePublicThemeManager"]){var g=new OSF.DDA.Theming.InternalThemeHandler;g.InitializeThemeManager();OSF.OUtil.defineEnumerableProperty(b,"themeManager",{value:g})}}}};OSF.DDA.OutlookContext=function(a,b,d,e,c){OSF.DDA.OutlookContext.uber.constructor.call(this,a,null,d,e,c);b&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:b});a.sensitivityLabelsCatalog&&OSF.OUtil.defineEnumerableProperty(this,"sensitivityLabelsCatalog",{value:a.sensitivityLabelsCatalog()})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.JsonData]={toHost:function(a){return a},fromHost:function(a){return typeof a==="string"?JSON.parse(a):a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0&&b.push(c)}}}catch(i){}return b}var c=[],b={};b[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,b=1;return {toHost:function(a){if(OSF.DDA.TableDataProperties&&typeof a!="string"&&a[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=a[OSF.DDA.TableDataProperties.TableRows];d[b]=a[OSF.DDA.TableDataProperties.TableHeaders];a=d}return a},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=a(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=a(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=a(d[b])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,b);this.unpack=function(c,a){var d;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c)){var e=a!==undefined&&a.toArray!==undefined;d=e?a.toArray():a||{}}else if(this.isDynamicType(c))d=b[c].fromHost(a);else d=a;return d}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(a){function c(a){var b=a;if(OSF.OUtil.isArray(a))for(var f=b.length,d=0;d2){c=[];for(var f=1;f-1)j="&";var u=screen.width*f.width/100,s=screen.height*f.height/100,t="width="+u+", height="+s;e[0]=e[0].concat(j).concat(p);var r=e.join(i);a.popup=window.open(r,"",t);function o(b){if(b.source==a.popup)try{var c=JSON.parse(b.data);c.dialogMessage&&g(h,[OSF.DialogMessageType.DialogMessageReceived,c.dialogMessage.messageContent])}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+b.data)}}a.DialogEventListener=o;function m(a){g(h,[a])}function n(){try{if(a.popup==b||a.popup.closed){window.clearInterval(a.interval);window.removeEventListener(c,a.DialogEventListener);a.NotifyError=b;g(h,[OSF.DialogMessageType.DialogClosed])}}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}if(a.popup!=undefined&&window.dialogAPIErrorCode==undefined){window.addEventListener(c,a.DialogEventListener);a.interval=window.setInterval(n,500);a.NotifyError=m;d(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else{var l=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;if(window.dialogAPIErrorCode)l=window.dialogAPIErrorCode;d(l)}};a.prototype.messageParent=function(c){var b=c[Microsoft.Office.WebExtension.Parameters.MessageToParent],a={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:b}};window.opener.postMessage(JSON.stringify(a),window.location.origin)};a.prototype.closeDialog=function(f,e,d){if(a.popup){a.interval&&window.clearInterval(a.interval);a.popup.close();a.popup=b;window.removeEventListener(c,a.DialogEventListener);a.NotifyError=b;d(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else d(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};a.prototype.sendMessage=function(){};a.prototype.closeSdxDialog=function(){};a.prototype.resizeSdxDialog=function(){};return a}();b.MacRichClientHostController=a})(OfficeExt||(OfficeExt={}));var OSF=OSF||{},OSFWebkit;(function(b){var a=function(){var a=false;function b(a){this.data=a;this.safeArrayFlag=this.isSafeArray(a)}b.prototype.dimensions=function(){var a=0;if(this.safeArrayFlag)a=this.data[0][0];else if(this.isArray())a=2;return a};b.prototype.getItem=function(){var b=[],a=null;if(this.safeArrayFlag)b=this.toArray();else b=this.data;a=b;for(var c=0;c=0;c--){var d=b.eventHandlers[c];if(d.dispId===f&&d.targetId===e){b.eventHandlers.splice(c,1);window._osfHostUnregisterCallback(d.callbackId)}}};b.prototype.agaveHostCallback=function(){};b.prototype.agaveHostEventCallback=function(){};b.prototype.constructMessagingArgs=function(b,c){var a={params:c,methodId:b};return a};return b}(),f=function(){function b(c,d){var a=this;a.callingIndex=0;a.callbackList={};a.eventHandlerList={};a.asyncMethodCallbackFunctionName=c;a.eventCallbackFunctionName=d;a.conversationId=b.getCurrentTimeMS().toString()}b.prototype.invokeMethod=function(b,d,e,c){var a={};this.postWebkitMessage(a,b,d,e,c)};b.prototype.registerEvent=function(e,i,b,a,j,f){var d={eventCallbackFunction:this.eventCallbackFunctionName},h={id:b,targetId:a},c=this.postWebkitMessage(d,e,i,h,f);this.eventHandlerList[c]=new g(b,a,j)};b.prototype.unregisterEvent=function(f,i,e,d,g){var a=this,h={id:e,targetId:d};for(var b in a.eventHandlerList)if(a.eventHandlerList.hasOwnProperty(b)){var c=a.eventHandlerList[b];if(c.id==e&&c.targetId==d)delete a.eventHandlerList[b]}a.invokeMethod(f,i,h,g)};b.prototype.agaveHostCallback=function(d,e){var b=this.callbackList[d];if(b){var c=b(e);if(c===undefined||c===a)delete this.callbackList[d]}};b.prototype.agaveHostEventCallback=function(b,c){var a=this.eventHandlerList[b];a&&a.handler(c)};b.prototype.postWebkitMessage=function(c,h,i,j,g){var a=this;c.methodId=i;c.params=j;var d="";if(g){d=a.generateCorrelationId();a.callbackList[d]=g;c.callbackId=d;c.callbackFunction=a.asyncMethodCallbackFunctionName}var f=function(){window.webkit.messageHandlers[h].postMessage(JSON.stringify(c))},e=b.getCurrentTimeMS();if(a.lastMessageTimestamp==null||e-a.lastMessageTimestamp>=b.MESSAGE_TIME_DELTA){f();a.lastMessageTimestamp=e}else{a.lastMessageTimestamp+=b.MESSAGE_TIME_DELTA;setTimeout(function(){f()},a.lastMessageTimestamp-e)}return d};b.prototype.generateCorrelationId=function(){++this.callingIndex;return this.conversationId+this.callingIndex};b.getCurrentTimeMS=function(){return (new Date).getTime()};b.MESSAGE_TIME_DELTA=10;return b}()})(b=a.ScriptMessaging||(a.ScriptMessaging={}))})(OSFWebkit||(OSFWebkit={}));OSF.ScriptMessaging=OSFWebkit.ScriptMessaging;(function(a){a.MessageHandlerName="Agave";a.PopupMessageHandlerName="WefPopupHandler";var b;(function(a){var A="OfficeThemeInfo",z="HostSettings",y="FeatureGates",x="InitialDisplayMode",w="HostFullVersion",v="HostCustomMessage",u="RequirementMatrix",t="CommerceAllowed",s="TouchEnabled",r="InstanceId",q="CorrelationId",p="APISetVersion",o="SolutionToken",n="ControlIntegrationLevel",m="ActivationMode",l="DocumentUrl",k="BindingCount",j="AppDataLocale",i="APPUILocale",h="AppCapabilities",g="APIVersionSequence",f="RevisionVersion",e="MinorVersion",d="MajorVersion",c="SolutionReferenceId",b="Settings";a[a[b]=0]=b;a[a[c]=1]=c;a[a["AppType"]=2]="AppType";a[a[d]=3]=d;a[a[e]=4]=e;a[a[f]=5]=f;a[a[g]=6]=g;a[a[h]=7]=h;a[a[i]=8]=i;a[a[j]=9]=j;a[a[k]=10]=k;a[a[l]=11]=l;a[a[m]=12]=m;a[a[n]=13]=n;a[a[o]=14]=o;a[a[p]=15]=p;a[a[q]=16]=q;a[a[r]=17]=r;a[a[s]=18]=s;a[a[t]=19]=t;a[a[u]=20]=u;a[a[v]=21]=v;a[a[w]=22]=w;a[a[x]=23]=x;a[a[y]=24]=y;a[a[z]=25]=z;a[a[A]=26]=A})(b=a.AppContextProperties||(a.AppContextProperties={}));var d;(function(a){var i="MessageParent2",h="SendMessage2",g="MessageParent",f="SendMessage",e="GetContext",d="WriteSettings",c="UnregisterEvent",b="RegisterEvent";a[a["Execute"]=1]="Execute";a[a[b]=2]=b;a[a[c]=3]=c;a[a[d]=4]=d;a[a[e]=5]=e;a[a[f]=6]=f;a[a[g]=7]=g;a[a[h]=8]=h;a[a[i]=9]=i})(d=a.MethodId||(a.MethodId={}));var c=function(){var d="message",c=null;function b(a){this.hostScriptProxy=a;this.useFullDialogAPI=!!window._enableFullDialogAPI;this.osfSupportsDialogOrigin=!!window._osfEnableDialogOrigin}b.prototype.execute=function(g,f,b){var e={id:g,apiArgs:f},d=function(e){if(b){var g=[];if(OSF.OUtil.isArray(e))for(var f=0;f=2){d=b[0];e=b[1]}c&&c(e,new a.WebkitSafeArray(d))},e=function(c){if(b)return b(new a.WebkitSafeArray(c))};this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,g,f,d,e)};b.prototype.unregisterEvent=function(e,d,c){var b=function(b){return c(new a.WebkitSafeArray(b))};this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,e,d,b)};b.prototype.messageParent=function(a){var b=this;if(b.useFullDialogAPI&&a){var f=a[Microsoft.Office.WebExtension.Parameters.MessageToParent];if(typeof f==="boolean")if(f===true)a[Microsoft.Office.WebExtension.Parameters.MessageToParent]="true";else if(f===false)a[Microsoft.Office.WebExtension.Parameters.MessageToParent]=""}var e,d;if(b.osfSupportsDialogOrigin&&a[Microsoft.Office.WebExtension.Parameters.TargetOrigin]){e=b.useFullDialogAPI?JSON.stringify(a):a[Microsoft.Office.WebExtension.Parameters.MessageToParent];d=OSF.Webkit.MethodId.MessageParent2}else{e=a[Microsoft.Office.WebExtension.Parameters.MessageToParent];d=OSF.Webkit.MethodId.MessageParent}if(b.useFullDialogAPI)b.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,d,e,c);else{var h={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:e}},g=d==OSF.Webkit.MethodId.MessageParent2?a[Microsoft.Office.WebExtension.Parameters.TargetOrigin]:window.location.origin;window.opener.postMessage(JSON.stringify(h),g)}};b.prototype.openDialog=function(g,k,f,a){if(this.useFullDialogAPI){this.registerEvent(g,k,f,a);return}if(b.popup&&!b.popup.closed){a(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}var p="action=displayDialog";b.OpenDialogCallback=undefined;var i="#",h=JSON.parse(k),l=h.url;if(!l){a(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}var e=l.split(i),j="?";if(e[0].indexOf("?")>-1)j="&";var t=screen.width*h.width/100,r=screen.height*h.height/100,s="width="+t+", height="+r;e[0]=e[0].concat(j).concat(p);var q=e.join(i);b.popup=window.open(q,"",s);function o(a){if(a.origin==window.location.origin)try{var b=JSON.parse(a.data);b.dialogMessage&&f(g,[OSF.DialogMessageType.DialogMessageReceived,b.dialogMessage.messageContent,a.origin])}catch(c){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+a.data)}}b.DialogEventListener=o;function n(){try{if(b.popup==c||b.popup.closed){window.clearInterval(b.interval);window.removeEventListener(d,b.DialogEventListener);b.NotifyError=c;b.popup=c;f(g,[OSF.DialogMessageType.DialogClosed])}}catch(a){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}function m(a){f(g,[a])}b.OpenDialogCallback=function(c){if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){window.addEventListener(d,b.DialogEventListener);b.interval=window.setInterval(n,1e3);b.NotifyError=m}a(c)}};b.prototype.closeDialog=function(f,e,a){if(this.useFullDialogAPI)this.unregisterEvent(f,e,a);else if(b.popup){b.interval&&window.clearInterval(b.interval);b.popup.close();b.popup=c;window.removeEventListener(d,b.DialogEventListener);b.NotifyError=c;a(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else a(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};b.prototype.sendMessage=function(d){var a,b;if(this.osfSupportsDialogOrigin&&d[Microsoft.Office.WebExtension.Parameters.TargetOrigin]){a=JSON.stringify(d);b=OSF.Webkit.MethodId.SendMessage2}else{a=d[Microsoft.Office.WebExtension.Parameters.MessageContent];b=OSF.Webkit.MethodId.SendMessage;if(!isNaN(parseFloat(a))&&isFinite(a))a=a.toString()}this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,b,a,c)};b.prototype.closeSdxDialog=function(){};b.prototype.resizeSdxDialog=function(){};return b}();a.WebkitHostController=c})(OSFWebkit||(OSFWebkit={}));OSF.Webkit=OSFWebkit;OSF.initializeWebkitCommon=function(){var a=null;OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(a){return function(b){var e,d,c=function(c,a){b.onReceiving&&b.onReceiving();b.onComplete&&b.onComplete(c,a)};try{a(b.hostCallArgs,b.onCalling,c)}catch(f){e=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;d={name:Strings.OfficeOM.L_InternalError,message:f};c(e,d)}}},read:function(c,b){var g=[],f=[];c&&c();var d=OSF._OfficeAppFactory.getInitializationHelper(),e=function(a){b&&b(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,a.get_settings())};d.getAppContext(a,e)},write:function(c,j,e,d){var b={},g=[],f=[];for(var h in c){g.push(h);f.push(c[h])}b["keys"]=g;b["values"]=f;e&&e();var i=function(b){d&&d(b[0],a)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,b,i)}};OSF.InitializationHelper.prototype.initializeSettings=function(c,b){var a=c.get_settings(),d=this.deserializeSettings(a,b);return d};OSF.InitializationHelper.prototype.getAppContext=function(e,d){var c=function(c){for(var i,b=OSF.Webkit.AppContextProperties,B=c[b.AppType],m=c[b.Settings],j={},n=m[0],F=m[1],f=0;fd[b])return a}return a};b.prototype.isDirectToAriaEnabled=function(){var a=this;if(a.EnableDirectToAria===undefined||a.EnableDirectToAria===null){var c=void 0,b=void 0;if(OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo)c=OSF._OfficeAppFactory.getHostInfo()[f];if(window.external&&typeof window.external.GetContext!==e&&typeof window.external.GetContext().GetHostFullVersion!==e)b=window.external.GetContext().GetHostFullVersion();a.EnableDirectToAria=a.shouldSendDirectToAria(c,b)}return a.EnableDirectToAria};b.prototype.sendTelemetry=function(c,a){var e=1e3,d=b.EnableSendingTelemetryWithLegacyAria&&this.isDirectToAriaEnabled();d&&OSF.OUtil.loadScript(this.getAriaCDNLocation(),function(){try{if(!this.ALogger){var e="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439";this.ALogger=AWTLogManager.initialize(e)}var b=new AWTEventProperties;b.setName("Office.Extensibility.OfficeJS."+c);for(var d in a)d.toLowerCase()!=="table"&&b.setProperty(d,a[d]);var f=new Date;b.setProperty("Date",f.toISOString());this.ALogger.logEvent(b)}catch(g){}},e);b.EnableSendingTelemetryWithOTel&&r(c,a)};b.prototype.logData=function(a){if(this.isIUsageData(a))this.sendTelemetry(a["Table"],a["Fields"]);else this.sendTelemetry(a["Table"],a)};b.EnableSendingTelemetryWithOTel=c;b.EnableSendingTelemetryWithLegacyAria=a;return b}();w.AriaLogger=y})(OSFAriaLogger||(OSFAriaLogger={}));var OSFAppTelemetry;(function(d){var e=false,b=null,f=true,c="";"use strict";var a,h=OSF.OUtil.Guid.generateNewGuid(),k=c,x=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"),q="PRIVATE";d.enableTelemetry=f;var r=function(){function a(){}return a}();d.AppInfo=r;var j=function(){function a(b,a){this.name=b;this.handler=a}return a}(),n=function(){function a(){this.clientIDKey="Office API client";this.logIdSetKey="Office App Log Id Set"}a.prototype.getClientId=function(){var b=this,a=b.getValue(b.clientIDKey);if(!a||a.length<=0||a.length>40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),i=function(){function a(){}a.prototype.LogData=function(a){if(!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(a)}catch(b){}};a.prototype.LogRawData=function(a){if(!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function g(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function H(i){if(!d.enableTelemetry)return;if(a)return;a=new r;if(i.get_hostFullVersion())a.hostVersion=i.get_hostFullVersion();else a.hostVersion=i.get_appVersion();a.appId=m()?i.get_id():q;a.marketplaceType=i._marketplaceType;a.browser=window.navigator.userAgent;a.correlationId=g(i.get_correlationId());a.clientId=(new n).getClientId();a.appInstanceId=i.get_appInstanceId();if(a.appInstanceId){a.appInstanceId=g(a.appInstanceId);a.appInstanceId=o(i.get_id(),a.appInstanceId)}a.message=i.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="0.0.0.0";if(i._wacHostEnvironment)a.wacHostEnvironment=i._wacHostEnvironment;if(i._isFromWacAutomation!==undefined&&i._isFromWacAutomation!==b)a.isFromWacAutomation=i._isFromWacAutomation.toString().toLowerCase();var l=i.get_docUrl();a.docUrl=x.test(l)?l:c;var k=location.href;if(k)k=k.split("?")[0].split("#")[0];a.isMos=s();a.appURL=c;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(i.get_eToken(),a);a.sessionId=h;typeof OTel!=="undefined"&&OTel.OTelLogger.initialize(a);(function(){var m=new Date,c=b,i=0,l=e,g=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){i+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new j("focus",g));a.push(new j("blur",g));a.push(new j("focusout",g));a.push(new j("focusin",g));var k=function(){for(var e=0;e0)for(var b=0;b0)for(var b=0;b0){this._eventHandlers[a]=[];return true}return false},clearObjectEventHandlers:function(a,b){if(this._objectEventHandlers[a]!=null&&this._objectEventHandlers[a][b]!=null){this._objectEventHandlers[a][b]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},getObjectEventHandlerCount:function(a,b){if(this._objectEventHandlers[a]==null||this._objectEventHandlers[a][b]==null)return 0;return this._objectEventHandlers[a][b].length},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){for(var d=this._eventHandlers[b],c=0;c0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(c,f,b){var h="hostPlatform",e="outlook",d="hostType",g=this,a;switch(c){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(g.manufactureBinding(b,f.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(g.manufactureBinding(b,f.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);OSF._OfficeAppFactory.getHostInfo()[d]==e&&OSF._OfficeAppFactory.getHostInfo()[h]=="mac"&&OSF.DDA.convertOlkAppointmentTimeToDateFormat(a);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:a=new OSF.DDA.ObjectEventArgs(c,b[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:a=new OSF.DDA.RichApiMessageEventArgs(c,b);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);f.initialize(a["initialData"]);(OSF._OfficeAppFactory.getHostInfo()[h]=="win32"||OSF._OfficeAppFactory.getHostInfo()[h]=="mac")&&f.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkRecipientsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkRecurrenceChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkAttachmentsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.InfobarClicked:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkInfobarClickedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkSelectedItemsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkSensitivityLabelChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RichApiMessage:"richApiMessage"});OSF.DDA.RichApiMessageEventArgs=function(f,e){var b=e[Microsoft.Office.WebExtension.Parameters.Data],d=[];if(b)for(var c=0;c100)b[Microsoft.Office.WebExtension.Parameters.Width]=99;if(b[Microsoft.Office.WebExtension.Parameters.Height]<=0)b[Microsoft.Office.WebExtension.Parameters.Height]=1;if(!b[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&b[Microsoft.Office.WebExtension.Parameters.Height]>100)b[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!b[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])b[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=a;return b}})};b.messageChildRichApiBridge=function(){if(OSF.DDA.UI.EnableMessageChildDialogAPI===a){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return b(arguments,null,null)}};b.initOnce=function(){b.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync,b.displayDialogAsyncApiSupportedOptions);b.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync,b.displayModalDialogAsyncApiSupportedOptions)};b.displayDialogAsyncApiSupportedOptions=[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:[c],defaultValue:d}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:[c],defaultValue:d}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:[c],defaultValue:d}},{name:Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.EnforceAppDomain,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo,value:{types:[c],defaultValue:d}}];b.displayModalDialogAsyncApiSupportedOptions=b.displayDialogAsyncApiSupportedOptions.concat([{name:"abortWhenParentIsMinimized",value:{types:[c],defaultValue:d}},{name:"abortWhenDocIsInactive",value:{types:[c],defaultValue:d}}]);return b}();DialogApiManager.initOnce();OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(a){try{a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);OSF.ClientHostController.openDialog(a.dispId,a.targetId,function(c,b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(a){a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{OSF.ClientHostController.closeDialog(a.dispId,a.targetId,c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.messageParent=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),b=OSF.ClientHostController.messageParent(a.hostCallArgs);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-d),b);return b}catch(c){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(c)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:true});OSF.DDA.SafeArray.Delegate.sendMessage=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),c=OSF.ClientHostController.sendMessage(a.hostCallArgs);a.onReceiving&&a.onReceiving();return c}catch(b){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(b)}} + + + +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=OfficeExtensionBatch},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=2&&(r=Number(n[1])),n.length>=3&&(o=Number(n[2])),isNaN(t)||isNaN(r)||isNaN(o))throw"version format incorrect";return{major:t,minor:r,patch:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.apiInformation=void 0,t.apiInformation={isSetSupported:function(t,r){if("string"!=typeof t)return!1;if(null==r&&(r="0.0.0"),void 0===e.__apiSets)return!1;var o=e.__apiSets,i=Object.keys(o).map((function(e){return e.toLowerCase()})).indexOf(t.toLowerCase());if(i>-1){var u=o[Object.keys(o)[i]];try{var c,s=n(r);if((c=Array.isArray(u)?function(e,t){for(var r=0;r0){if(c.major>s.major)return!0;if(c.major==s.major&&c.minor>s.minor)return!0;if(c.major==s.major&&c.minor==s.minor&&c.patch>=s.patch)return!0}}catch(e){return!1}}return!1}}}).call(this,n(4))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiGet=t.multiRemove=t.multiSet=t.getAllKeys=t.clear=t.removeItem=t.setItem=t.getItem=void 0;var r="_Office_AsyncStorage_";function o(){window.localStorage.setItem("_Office_AsyncStorage_|_unusedKey_",null),window.localStorage.removeItem("_Office_AsyncStorage_|_unusedKey_")}function i(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,r){try{o(),e(),t(null),n()}catch(e){t(e),r(e)}}))}function u(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,r){try{o();var i=e();t(null,i),n(i)}catch(e){t(e,null),r(e)}}))}function c(e,t,n){return void 0===n&&(n=function(){}),new Promise((function(r,i){var u=[];try{o()}catch(e){u.push(e)}e.forEach((function(e){try{t(e)}catch(e){u.push(e)}})),n(u),u.length>0?i(u):r()}))}t.getItem=function(e,t){return u((function(){return window.localStorage.getItem(r+e)}),t)},t.setItem=function(e,t,n){return i((function(){return window.localStorage.setItem(r+e,t)}),n)},t.removeItem=function(e,t){return i((function(){return window.localStorage.removeItem(r+e)}),t)},t.clear=function(e){return i((function(){Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).forEach((function(e){return window.localStorage.removeItem(e)}))}),e)},t.getAllKeys=function(e){return u((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).map((function(e){return e.substr(r.length)}))}),e)},t.multiSet=function(e,t){return c(e,(function(e){var t=e[0],n=e[1];return window.localStorage.setItem(r+t,n)}),t)},t.multiRemove=function(e,t){return c(e,(function(e){return window.localStorage.removeItem(r+e)}),t)},t.multiGet=function(e,t){return new Promise((function(n,o){t||(t=function(){});var i=[],u=e.map((function(e){try{return[e,window.localStorage.getItem(r+e)]}catch(e){i.push(e)}})).filter((function(e){return e}));i.length>0?(t(i,u),o(i)):(t(null,u),n(u))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.displayWebDialog=t.Dialog=void 0;var r=n(0),o=function(){function e(e){this._dialog=e}return e.prototype.close=function(){return this._dialog.close(),r.CoreUtility.Promise.resolve()},e}();t.Dialog=o,t.displayWebDialog=function(e,t){return new r.CoreUtility.Promise((function(n,i){if(t.width&&t.height&&(!f(t.width)||!f(t.height)))throw new r.Error({code:"InvalidArgument",message:'Dimensions must be "number%" or number.'});var u,c={width:t.width?parseInt(t.width,10):50,height:t.height?parseInt(t.height,10):50,displayInIframe:t.displayInIFrame||!1};function s(e){t.onMessage&&t.onMessage(e.message,u,e.origin)}function a(e){12006===e.error?t.onClose&&t.onClose():t.onRuntimeError&&t.onRuntimeError(new r.Error(l(e.error)),u)}function f(e){return/^(\-|\+)?([0-9]+)%?$/.test(e)}function l(e){var t,n=((t={})[12002]={code:"InvalidUrl",message:"Cannot load URL, no such page or bad URL syntax."},t[12003]={code:"InvalidUrl",message:"HTTPS is required."},t[12004]={code:"Untrusted",message:"Domain is not trusted."},t[12005]={code:"InvalidUrl",message:"HTTPS is required."},t[12007]={code:"FailedToOpen",message:"Another dialog is already opened."},t);return n[e]?n[e]:{code:"Unknown",message:"An unknown error has occured"}}Office.context.ui.displayDialogAsync(e,c,(function(e){"failed"===e.status?i(new r.Error(l(e.error.code))):((u=e.value).addEventHandler(Office.EventType.DialogMessageReceived,s),u.addEventHandler(Office.EventType.DialogEventReceived,a),n(new o(u)))}))}))}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCodes=t.PersistentKvStorageService=t.storage=t.AsyncStorage=void 0;var i=n(0),u=(i.BatchApiHelper.createPropertyObject,i.BatchApiHelper.createMethodObject,i.BatchApiHelper.createIndexerObject,i.BatchApiHelper.createRootServiceObject,i.BatchApiHelper.createTopLevelServiceObject),c=(i.BatchApiHelper.createChildItemObject,i.BatchApiHelper.invokeMethod),s=(i.BatchApiHelper.invokeEnsureUnchanged,i.BatchApiHelper.invokeSetProperty,i.Utility.isNullOrUndefined),a=(i.Utility.isUndefined,i.Utility.throwIfNotLoaded,i.Utility.throwIfApiNotSupported,i.Utility.load,i.Utility.retrieve,i.Utility.toJson),f=i.Utility.fixObjectPathIfNecessary,l=(i.Utility._handleNavigationPropertyResults,i.Utility.adjustToDateTime,i.Utility.processRetrieveResult);function p(e,t){return new i.CoreUtility.Promise((function(n,r){var o=d.getInstance(),i=o.setCallBack((function(e,o){if(o)r(o);else{var i=t(e);n(i)}}));o.ctx.sync().then((function(){var t=o.getPersistentKvStorageService();return e(t,i),o.ctx.sync()})).catch((function(e){r(e)}))}))}function g(e,t,n){return new i.CoreUtility.Promise((function(r,o){var i=d.getInstance(),u=i.setCallBack((function(e,i){if(i)return n&&n(i),void o(i);var u=t(e);n&&n(null,u),r(u)}));i.ctx.sync().then((function(){var t=i.getPersistentKvStorageService();return e(t,u),i.ctx.sync()})).catch((function(e){o(e)}))}))}i.Utility.setMockData,i.CommonUtility.calculateApiFlags,t.AsyncStorage={getItem:function(e,t){return g((function(t,n){return t.multiGet(n,JSON.stringify([e]))}),(function(e){var t=JSON.parse(e);return t&&t[0]&&t[0][1]?t[0][1]:null}),t)},setItem:function(e,t,n){return g((function(n,r){return n.multiSet(r,JSON.stringify([[e,t]]))}),(function(){return null}),n)},removeItem:function(e,t){return g((function(t,n){return t.multiRemove(n,JSON.stringify([e]))}),(function(){return null}),t)},multiGet:function(e,t){return g((function(t,n){return t.multiGet(n,JSON.stringify(e))}),(function(t){var n=JSON.parse(t),r={};return n&&n.forEach((function(e){var t=e[0],n=e[1];return r[t]=n,n})),e.map((function(e){return[e,r[e]?r[e]:null]}))}),t)},multiSet:function(e,t){return g((function(t,n){return t.multiSet(n,JSON.stringify(e))}),(function(){return null}),t)},multiRemove:function(e,t){return g((function(t,n){return t.multiRemove(n,JSON.stringify(e))}),(function(){return null}),t)},getAllKeys:function(e){return g((function(e,t){return e.getAllKeys(t)}),(function(e){return JSON.parse(e)}),e)},clear:function(e){return g((function(e,t){return e.clear(t)}),(function(){return null}),e)}},t.storage={getItem:function(e){return p((function(t,n){return t.multiGet(n,JSON.stringify([e]))}),(function(e){var t=JSON.parse(e);return t&&t[0]&&t[0][1]?t[0][1]:null}))},setItem:function(e,t){return p((function(n,r){return n.multiSet(r,JSON.stringify([[e,t]]))}),(function(){return null}))},removeItem:function(e){return p((function(t,n){return t.multiRemove(n,JSON.stringify([e]))}),(function(){return null}))},getItems:function(e){return p((function(t,n){return t.multiGet(n,JSON.stringify(e))}),(function(t){var n=JSON.parse(t),r={};return e.forEach((function(e){r[e]=null})),n&&n.forEach((function(e){var t=e[0],n=e[1];return r[t]=n,n})),r}))},setItems:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push([n,e[n]]);return p((function(e,n){return e.multiSet(n,JSON.stringify(t))}),(function(){return null}))},removeItems:function(e){return p((function(t,n){return t.multiRemove(n,JSON.stringify(e))}),(function(){return null}))},getKeys:function(){return p((function(e,t){return e.getAllKeys(t)}),(function(e){return JSON.parse(e)}))}};var d=function(){function e(){var e=this;this._invokeId=0,this._callDict={},this.ctx=new i.ClientRequestContext,this._perkvstorService=m.newObject(this.ctx),this._eventResult=this._perkvstorService.onPersistentStorageMessage.add((function(t){i.Utility.log("persistentKvStoragegMessageHandler:"+JSON.stringify(t));var n=e._callDict[t.invokeId];n&&(n(t.message,t.error),delete e._callDict[t.invokeId])}))}return e.getInstance=function(){return void 0===e.instance?e.instance=new e:e.instance._perkvstorService=m.newObject(e.instance.ctx),e.instance},e.prototype.getPersistentKvStorageService=function(){return this._perkvstorService},e.prototype.getCallBack=function(e){return this._callDict[e]},e.prototype.setCallBack=function(e){var t=this._invokeId;return this._callDict[this._invokeId++]=e,t},e}(),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"PersistentKvStorageService"},enumerable:!1,configurable:!0}),t.prototype.clear=function(e){c(this,"Clear",1,[e],4,0)},t.prototype.getAllKeys=function(e){c(this,"GetAllKeys",1,[e],4,0)},t.prototype.multiGet=function(e,t){c(this,"MultiGet",1,[e,t],4,0)},t.prototype.multiRemove=function(e,t){c(this,"MultiRemove",1,[e,t],4,0)},t.prototype.multiSet=function(e,t){c(this,"MultiSet",1,[e,t],4,0)},t.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),s(t)||f(this,t)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),l(this,t,n)},t.newObject=function(e){return u(t,e,"Microsoft.PersistentKvStorage.PersistentKvStorageService",!1,4)},Object.defineProperty(t.prototype,"onPersistentStorageMessage",{get:function(){return this.m_persistentStorageMessage||(this.m_persistentStorageMessage=new i.GenericEventHandlers(this.context,this,"PersistentStorageMessage",{eventType:65537,registerFunc:function(){},unregisterFunc:function(){},getTargetIdFunc:function(){return null},eventArgsTransformFunc:function(e){var t,n,r,o;try{var u=JSON.parse(e.message),c=parseInt(u.errorCode),s=0!=c?new i.Error((n=c,(r={})[16389]={code:"GenericException",message:"Unknown error."},r[65535]={code:"Unexcepted",message:"Catastrophic failure."},r[14]={code:"OutOfMemory",message:"Ran out of memory."},r[87]={code:"InvalidArg",message:"One or more arguments are invalid."},r[16385]={code:"NotImplemented",message:"Not implemented."},r[6]={code:"BadHandle",message:"File Handle is not Set."},r[5]={code:"AccessDenied",message:"Can't read the Storage File."},(o=r)[n]?o[n]:{code:"Unknown",message:"An unknown error has occured"})):null;t={invokeId:u.invokeId,message:u.message,error:s}}catch(e){t={invokeId:-1,message:e.message,error:new i.Error({code:"GenericException",message:"Unknown error"})}}return i.Utility._createPromiseFromResult(t)}})),this.m_persistentStorageMessage},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return a(this,{},{})},t}(i.ClientObject);t.PersistentKvStorageService=m,function(e){e.generalException="GeneralException"}(t.ErrorCodes||(t.ErrorCodes={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storage=void 0;var r="_OfficeRuntime_Storage_";function o(){window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_",null),window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_")}function i(e){return new Promise((function(t,n){try{o(),e(),t()}catch(e){n(e)}}))}function u(e){return new Promise((function(t,n){try{o(),t(e())}catch(e){n(e)}}))}function c(e,t){return new Promise((function(n,r){var i=[];try{o()}catch(e){i.push(e)}for(var u in e)if(e.hasOwnProperty(u)||Array.isArray(e))try{Array.isArray(e)?t(e[u]):t(u)}catch(e){i.push(e)}i.length>0?r(new Error("Unknown error.")):n()}))}t.storage={getItem:function(e){return u((function(){return window.localStorage.getItem(r+e)}))},setItem:function(e,t){return i((function(){return window.localStorage.setItem(r+e,t)}))},removeItem:function(e){return i((function(){return window.localStorage.removeItem(r+e)}))},getItems:function(e){return new Promise((function(t,n){var i={},u=[];try{o()}catch(e){n(e)}e.forEach((function(e){try{var t=window.localStorage.getItem(r+e);i[e]=t||null}catch(e){u.push(e)}})),u.length>0?n(new Error("Unknown error.")):t(i)}))},setItems:function(e){return c(e,(function(t){return window.localStorage.setItem(r+t,e[t])}))},removeItems:function(e){return c(e,(function(e){window.localStorage.removeItem(r+e)}))},getKeys:function(){return u((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).map((function(e){return e.substr(r.length)}))}))}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,c)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex === 0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive = bucketPositive.sort(function (left, right) { + var diff = left.tabIndex - right.tabIndex; + if (diff === 0) { + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + return { + set_entropy: function OSF_OUtil$set_entropy(entropy) { + if (typeof entropy == "string") { + for (var i = 0; i < entropy.length; i += 4) { + var temp = 0; + for (var j = 0; j < 4 && i + j < entropy.length; j++) { + temp = (temp << 8) + entropy.charCodeAt(i + j); + } + _rndentropy ^= temp; + } + } + else if (typeof entropy == "number") { + _rndentropy ^= entropy; + } + else { + _rndentropy ^= 0x7fffffff * Math.random(); + } + _rndentropy &= 0x7fffffff; + }, + extend: function OSF_OUtil$extend(child, parent) { + var F = function () { }; + F.prototype = parent.prototype; + child.prototype = new F(); + child.prototype.constructor = child; + child.uber = parent.prototype; + if (parent.prototype.constructor === Object.prototype.constructor) { + parent.prototype.constructor = parent; + } + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name] = {}; + } + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { + if (parent && name && parent[name]) { + delete parent[name]; + } + }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret = {}; + for (var key in settingsCollection) { + var value = settingsCollection[key]; + try { + if (JSON) { + value = JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret = {}; + serializedSettings = serializedSettings || {}; + for (var key in serializedSettings) { + var value = serializedSettings[key]; + try { + if (JSON) { + value = JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if (!_loadedScriptEntry) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + var onLoadTimeOut = function OSF_OUtil_loadScript$onLoadTimeOut() { + if (window.navigator.userAgent.indexOf("Trident") > 0) { + onLoadError(null); + } + else { + onLoadError(new Event("Script load timed out")); + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError(errorEvent) { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(errorEvent); + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadTimeOut, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) { + if (url) { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link); + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { + var parsed = enumObject[str.trim()]; + if (typeof (parsed) == 'undefined') { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed; + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { + var obj = { calc: arguments[0] }; + return function () { + if (obj.calc) { + obj.val = obj.calc.apply(this, arguments); + delete obj.calc; + } + return obj.val; + }; + }, + getUniqueId: function OSF_OUtil$getUniqueId() { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString(); + }, + formatString: function OSF_OUtil$formatString() { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10) + 1; + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }, + generateConversationId: function OSF_OUtil$generateConversationId() { + return [_random(), _random(), (new Date()).getTime().toString()].join('_'); + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId(); + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { + return OSF.OUtil.addInfoAsHash(url, _xdmInfoKey, xdmInfoValue, false); + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) { + return OSF.OUtil.addInfoAsHash(url, _serializerVersionKey, serializerVersion, true); + }, + addFlightsAsHash: function OSF_OUtil$addFlightsAsHash(url, flights) { + return OSF.OUtil.addInfoAsHash(url, _flightsKey, flights, true); + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) { + url = url.trim() || ''; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if (encodeInfo) { + newFragment = [keyName, encodeURIComponent(infoValue), fragment].join(''); + } + else { + newFragment = [fragment, keyName, infoValue].join(''); + } + return [urlWithoutFragment, _fragmentSeparator, newFragment].join(''); + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.HostInfo); + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.XdmInfo); + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.SerializerVersion)); + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseFlights: function OSF_OUtil$parseFlights(skipSessionStorage) { + var flights = OSF.OUtil.parseFlightsWithGivenFragment(skipSessionStorage, window.location.hash); + if (flights.length == 0) { + flights = OSF.OUtil.parseFlightsFromWindowName(skipSessionStorage, window.name); + } + return flights; + }, + checkFlight: function OSF_OUtil$checkFlightEnabled(flight) { + return OSF.Flights && OSF.Flights.indexOf(flight) >= 0; + }, + pushFlight: function OSF_OUtil$pushFlight(flight) { + if (OSF.Flights.indexOf(flight) < 0) { + OSF.Flights.push(flight); + return true; + } + return false; + }, + getBooleanSetting: function OSF_OUtil$getSetting(settingName) { + return OSF.OUtil.getBooleanFromDictionary(OSF.Settings, settingName); + }, + getBooleanFromDictionary: function OSF_OUtil$getBooleanFromDictionary(settings, settingName) { + var result = (settings && settingName && settings[settingName] !== undefined && settings[settingName] && + ((typeof (settings[settingName]) === "string" && settings[settingName].toUpperCase() === 'TRUE') || + (typeof (settings[settingName]) === "boolean" && settings[settingName]))); + return result !== undefined ? result : false; + }, + getIntFromDictionary: function OSF_OUtil$getIntFromDictionary(settings, settingName) { + if (settings && settingName && settings[settingName] !== undefined && (typeof settings[settingName] === "string")) { + return parseInt(settings[settingName]); + } + else { + return NaN; + } + }, + pushIntFlight: function OSF_OUtil$pushIntFlight(flight, flightValue) { + if (!(flight in OSF.IntFlights)) { + OSF.IntFlights[flight] = flightValue; + return true; + } + return false; + }, + getIntFlight: function OSF_OUtil$getIntFlight(flight) { + if (OSF.IntFlights && (flight in OSF.IntFlights)) { + return OSF.IntFlights[flight]; + } + else { + return NaN; + } + }, + parseFlightsFromWindowName: function OSF_OUtil$parseFlightsFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.Flights)); + }, + parseFlightsWithGivenFragment: function OSF_OUtil$parseFlightsWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(_flightsKey, _flightsKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseArrayWithDefault: function OSF_OUtil$parseArrayWithDefault(jsonString) { + var array = []; + try { + array = JSON.parse(jsonString); + } + catch (ex) { } + if (!Array.isArray(array)) { + array = []; + } + return array; + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj != null) { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue != null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >= 0) { + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue = decodeURIComponent(infoValue); + } + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd = window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd == -1) { + sessionKeyEnd = window.name.length; + } + var sessionKey = window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString = window.location.search; + var conversationId = null; + if (searchString) { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1) === '=') { + conversationId = conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId = decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) { + var items = strInfo.split("$"); + if (typeof items[1] == "undefined") { + items = strInfo.split("|"); + } + if (typeof items[1] == "undefined") { + items = strInfo.split("%7C"); + } + return items; + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue = ''; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if (items != undefined && items.length >= 3) { + switch (xdmFieldName) { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break; + } + } + } + return fieldValue; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e = Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) + throw e; + for (var p in expectedProperties) { + e = Function._validateParameter(params[p], expectedProperties[p], p); + if (e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) { + if (typeof (OsfMsAjaxFactory) !== 'undefined' && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) { + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor = descriptor || {}; + for (var nd in attributes) { + var attribute = attributes[nd]; + if (descriptor[attribute] == undefined) { + descriptor[attribute] = true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors = descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for (var i = 0; i < propsLength; i++) { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable = descriptor.writable || false; + } + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret = []; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key == item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value == list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add = list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key] = value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2] = newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj) === "[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj) === "[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj) === "[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.attachEvent) { + element.attachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.detachEvent) { + element.detachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = null; + } + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) { + var xmlhttp; + try { + xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function () { + if (xmlhttp.readyState == 4) { + if (xmlhttp.status == 200) { + onSuccess(xmlhttp.responseText); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + if (!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, c2, c3, a, b, c; + var i; + var length = input.length; + do { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + if (!isNaN(c2)) { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + } + if (isNaN(c2)) { + temp[i - 1] = 64; + } + else if (isNaN(c3)) { + temp[i - 2] = 64; + temp[i - 1] = 64; + } + for (var t = 0; t < i; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getSessionStorage: function OSF_Outil$getSessionStorage() { + return _getSessionStorage(); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage = window.localStorage; + } + catch (ex) { + localStorage = null; + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage); + } + return _safeLocalStorage; + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) { + var hex = "#" + (Number(val) + 0x1000000).toString(16).slice(-6); + return hex; + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) { + element.onclick = function (e) { + handler(); + }; + element.ontouchend = function (e) { + handler(); + e.preventDefault(); + }; + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) { + var e = Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: false }, + { name: "paramName", type: String, mayBeNull: false } + ]); + if (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return ""; + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)", "i"); + if (!queryExp.test(queryString)) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return ""; + } + return queryExp.exec(queryString)[1]; + }, + getHostnamePortionForLogging: function OSF_Outil$getHostnamePortionForLogging(hostname) { + var e = Function._validateParams(arguments, [{ name: "hostname", type: String, mayBeNull: false } + ]); + if (e) { + return ""; + } + var hostnameSubstrings = hostname.split('.'); + var len = hostnameSubstrings.length; + if (len >= 2) { + return hostnameSubstrings[len - 2] + "." + hostnameSubstrings[len - 1]; + } + else if (len == 1) { + return hostnameSubstrings[0]; + } + }, + isiOS: function OSF_Outil$isiOS() { + return (window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false); + }, + isChrome: function OSF_Outil$isChrome() { + return (window.navigator.userAgent.indexOf("Chrome") > 0) && !OSF.OUtil.isEdge(); + }, + isEdge: function OSF_Outil$isEdge() { + return window.navigator.userAgent.indexOf("Edge") > 0; + }, + isIE: function OSF_Outil$isIE() { + return window.navigator.userAgent.indexOf("Trident") > 0; + }, + isFirefox: function OSF_Outil$isFirefox() { + return window.navigator.userAgent.indexOf("Firefox") > 0; + }, + startsWith: function OSF_Outil$startsWith(originalString, patternToCheck, browserIsIE) { + if (browserIsIE) { + return originalString.substr(0, patternToCheck.length) === patternToCheck; + } + else { + return originalString.startsWith(patternToCheck); + } + }, + containsPort: function OSF_Outil$containsPort(url, protocol, hostname, portNumber) { + return this.startsWith(url, protocol + "//" + hostname + ":" + portNumber, true) || this.startsWith(url, hostname + ":" + portNumber, true); + }, + getRedundandPortString: function OSF_Outil$getRedundandPortString(url, parser) { + if (!url || !parser) + return ""; + if (parser.protocol == "https:" && this.containsPort(url, "https:", parser.hostname, "443")) + return ":443"; + else if (parser.protocol == "http:" && this.containsPort(url, "http:", parser.hostname, "80")) + return ":80"; + return ""; + }, + removeChar: function OSF_Outil$removeChar(url, indexOfCharToRemove) { + if (indexOfCharToRemove < url.length - 1) + return url.substring(0, indexOfCharToRemove) + url.substring(indexOfCharToRemove + 1); + else if (indexOfCharToRemove == url.length - 1) + return url.substring(0, url.length - 1); + else + return url; + }, + cleanUrlOfChar: function OSF_Outil$cleanUrlOfChar(url, charToClean) { + var i; + for (i = 0; i < url.length; i++) { + if (url.charAt(i) === charToClean) { + if (i + 1 >= url.length) { + return this.removeChar(url, i); + } + else if (charToClean === '/') { + if (url.charAt(i + 1) === '?' || url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + else if (charToClean === '?') { + if (url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + } + } + return url; + }, + cleanUrl: function OSF_Outil$cleanUrl(url) { + url = this.cleanUrlOfChar(url, '/'); + url = this.cleanUrlOfChar(url, '?'); + url = this.cleanUrlOfChar(url, '#'); + if (url.substr(0, 8) == "https://") { + var portIndex = url.indexOf(":443"); + if (portIndex != -1) { + if (portIndex == url.length - 4 || url.charAt(portIndex + 4) == "/" || url.charAt(portIndex + 4) == "?" || url.charAt(portIndex + 4) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 4); + } + } + } + else if (url.substr(0, 7) == "http://") { + var portIndex = url.indexOf(":80"); + if (portIndex != -1) { + if (portIndex == url.length - 3 || url.charAt(portIndex + 3) == "/" || url.charAt(portIndex + 3) == "?" || url.charAt(portIndex + 3) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 3); + } + } + } + return url; + }, + parseUrl: function OSF_Outil$parseUrl(url, enforceHttps) { + if (enforceHttps === void 0) { + enforceHttps = false; + } + if (typeof url === "undefined" || !url) { + return undefined; + } + var notHttpsErrorMessage = "NotHttps"; + var invalidUrlErrorMessage = "InvalidUrl"; + var isIEBoolean = this.isIE(); + var parsedUrlObj = { + protocol: undefined, + hostname: undefined, + host: undefined, + port: undefined, + pathname: undefined, + search: undefined, + hash: undefined, + isPortPartOfUrl: undefined + }; + try { + if (isIEBoolean) { + var parser = document.createElement("a"); + parser.href = url; + if (!parser || !parser.protocol || !parser.host || !parser.hostname || !parser.href + || this.cleanUrl(parser.href).toLowerCase() !== this.cleanUrl(url).toLowerCase()) { + throw invalidUrlErrorMessage; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && parser.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + var redundandPortString = this.getRedundandPortString(url, parser); + parsedUrlObj.protocol = parser.protocol; + parsedUrlObj.hostname = parser.hostname; + parsedUrlObj.port = (redundandPortString == "") ? parser.port : ""; + parsedUrlObj.host = (redundandPortString != "") ? parser.hostname : parser.host; + parsedUrlObj.pathname = (isIEBoolean ? "/" : "") + parser.pathname; + parsedUrlObj.search = parser.search; + parsedUrlObj.hash = parser.hash; + parsedUrlObj.isPortPartOfUrl = this.containsPort(url, parser.protocol, parser.hostname, parser.port); + } + else { + var urlObj = new URL(url); + if (urlObj && urlObj.protocol && urlObj.host && urlObj.hostname) { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && urlObj.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + parsedUrlObj.protocol = urlObj.protocol; + parsedUrlObj.hostname = urlObj.hostname; + parsedUrlObj.port = urlObj.port; + parsedUrlObj.host = urlObj.host; + parsedUrlObj.pathname = urlObj.pathname; + parsedUrlObj.search = urlObj.search; + parsedUrlObj.hash = urlObj.hash; + parsedUrlObj.isPortPartOfUrl = urlObj.host.lastIndexOf(":" + urlObj.port) == (urlObj.host.length - urlObj.port.length - 1); + } + } + } + catch (err) { + if (err.message === notHttpsErrorMessage) + throw err; + } + return parsedUrlObj; + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) { + if (sourceObj == null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr = []; + for (var i = 0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj = sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property] = sourceObj[property]; + } + } + return copyObj; + } + }, + createObject: function OSF_Outil$createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + }, + addClass: function OSF_OUtil$addClass(elmt, val) { + if (!OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + if (className) { + elmt.setAttribute(_classN, className + " " + val); + } + else { + elmt.setAttribute(_classN, val); + } + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) { + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findNextPos = function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && backward) { + return -1; + } + else if (currPos === allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if (all.length === 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, backward); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findCurrPos = function (all, curr) { + var i = 0; + for (; i < all.length; i++) { + if (all[i] === curr) { + return i; + } + } + return -1; + }; + var findNextPos = function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && shift) { + return -1; + } + else if (currPos === allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all, curr); + next = findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, shift); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + isNullOrUndefined: function OSF_OUtil$isNullOrUndefined(value) { + if (typeof (value) === "undefined") { + return true; + } + if (value === null) { + return true; + } + return false; + }, + stringEndsWith: function OSF_OUtil$stringEndsWith(value, subString) { + if (!OSF.OUtil.isNullOrUndefined(value) && !OSF.OUtil.isNullOrUndefined(subString)) { + if (subString.length > value.length) { + return false; + } + if (value.substr(value.length - subString.length) === subString) { + return true; + } + } + return false; + }, + hashCode: function OSF_OUtil$hashCode(str) { + var hash = 0; + if (!OSF.OUtil.isNullOrUndefined(str)) { + var i = 0; + var len = str.length; + while (i < len) { + hash = (hash << 5) - hash + str.charCodeAt(i++) | 0; + } + } + return hash; + }, + getValue: function OSF_OUtil$getValue(value, defaultValue) { + if (OSF.OUtil.isNullOrUndefined(value)) { + return defaultValue; + } + return value; + }, + externalNativeFunctionExists: function OSF_OUtil$externalNativeFunctionExists(type) { + return type === 'unknown' || type !== 'undefined'; + } + }; +})(); +OSF.OUtil.Guid = (function () { + var hexCode = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result = ""; + var tick = (new Date()).getTime(); + var index = 0; + for (; index < 32 && tick > 0; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + }; +})(); +try { + (function () { + OSF.Flights = OSF.OUtil.parseFlights(true); + })(); +} +catch (ex) { } +window.OSF = OSF; +OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614, + Visio: 8388615, + OneNoteAndroid: 4194305 +}; +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +}; +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +}; +OSF.AgaveHostAction = { + "Select": 0, + "UnSelect": 1, + "CancelDialog": 2, + "InsertAgave": 3, + "CtrlF6In": 4, + "CtrlF6Exit": 5, + "CtrlF6ExitShift": 6, + "SelectWithError": 7, + "NotifyHostError": 8, + "RefreshAddinCommands": 9, + "PageIsReady": 10, + "TabIn": 11, + "TabInShift": 12, + "TabExit": 13, + "TabExitShift": 14, + "EscExit": 15, + "F2Exit": 16, + "ExitNoFocusable": 17, + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20, + "UpdateTargetUrl": 21, + "InstallCustomFunctions": 22, + "SendTelemetryEvent": 23, + "UninstallCustomFunctions": 24, + "SendMessage": 25, + "LaunchExtensionComponent": 26, + "StopExtensionComponent": 27, + "RestartExtensionComponent": 28, + "EnableTaskPaneHeaderButton": 29, + "DisableTaskPaneHeaderButton": 30, + "TaskPaneHeaderButtonClicked": 31, + "RemoveAppCommandsAddin": 32, + "RefreshRibbonGallery": 33, + "GetOriginalControlId": 34, + "OfficeJsReady": 35, + "InsertDevManifest": 36, + "InsertDevManifestError": 37, + "SendCustomerContent": 38, + "KeyboardShortcuts": 39 +}; +OSF.SharedConstants = { + "NotificationConversationIdSuffix": '_ntf' +}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix, featureGates, officeTheme, initialDisplayMode) { + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this._featureGates = featureGates; + this._officeTheme = officeTheme; + this._initialDisplayMode = initialDisplayMode; + this.get_id = function get_id() { return this._id; }; + this.get_appName = function get_appName() { return this._appName; }; + this.get_appVersion = function get_appVersion() { return this._appVersion; }; + this.get_appUILocale = function get_appUILocale() { return this._appUILocale; }; + this.get_dataLocale = function get_dataLocale() { return this._dataLocale; }; + this.get_docUrl = function get_docUrl() { return this._docUrl; }; + this.get_clientMode = function get_clientMode() { return this._clientMode; }; + this.get_bindings = function get_bindings() { return this._bindings; }; + this.get_settings = function get_settings() { return this._settings; }; + this.get_reason = function get_reason() { return this._reason; }; + this.get_osfControlType = function get_osfControlType() { return this._osfControlType; }; + this.get_eToken = function get_eToken() { return this._eToken; }; + this.get_correlationId = function get_correlationId() { return this._correlationId; }; + this.get_appInstanceId = function get_appInstanceId() { return this._appInstanceId; }; + this.get_touchEnabled = function get_touchEnabled() { return this._touchEnabled; }; + this.get_commerceAllowed = function get_commerceAllowed() { return this._commerceAllowed; }; + this.get_appMinorVersion = function get_appMinorVersion() { return this._appMinorVersion; }; + this.get_requirementMatrix = function get_requirementMatrix() { return this._requirementMatrix; }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() { return this._dialogRequirementMatrix; }; + this.get_hostCustomMessage = function get_hostCustomMessage() { return this._hostCustomMessage; }; + this.get_hostFullVersion = function get_hostFullVersion() { return this._hostFullVersion; }; + this.get_isDialog = function get_isDialog() { return this._isDialog; }; + this.get_clientWindowHeight = function get_clientWindowHeight() { return this._clientWindowHeight; }; + this.get_clientWindowWidth = function get_clientWindowWidth() { return this._clientWindowWidth; }; + this.get_addinName = function get_addinName() { return this._addinName; }; + this.get_appDomains = function get_appDomains() { return this._appDomains; }; + this.get_featureGates = function get_featureGates() { return this._featureGates; }; + this.get_officeTheme = function get_officeTheme() { return this._officeTheme; }; + this.get_initialDisplayMode = function get_initialDisplayMode() { return this._initialDisplayMode ? this._initialDisplayMode : 0; }; +}; +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 +}; +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 +}; +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Client", Microsoft.Office); +OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened", + ControlActivation: "controlActivation" +}; +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType = { + All: "all" +}; +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + JsonData: "jsonData", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + AllowConsentPrompt: "allowConsentPrompt", + ForMSGraphAccess: "forMSGraphAccess", + AllowSignInPrompt: "allowSignInPrompt", + JsonPayload: "jsonPayload", + EnableNewHosts: "enableNewHosts", + AccountTypeFilter: "accountTypeFilter", + AddinTrustId: "addinTrustId", + Reserved: "reserved", + Tcid: "tcid", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + PromptBeforeOpen: "promptBeforeOpen", + EnforceAppDomain: "enforceAppDomain", + UrlNoHostInfo: "urlNoHostInfo", + TargetOrigin: "targetOrigin", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64", + FormId: "formId" +}; +OSF.OUtil.setNamespace("DDA", OSF); +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 +}; +OSF.DDA.PropertyDescriptors = { + AsyncResultStatus: "AsyncResultStatus" +}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { + if (eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || + eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) { + return id + "_" + eventType; + } + else { + return eventType; + } +}; +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidGetAuthContextMethod: 99, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, + dispidInsertFormMethod: 106, + dispidDisplayRibbonCalloutAsyncMethod: 109, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidExecuteFeature: 146, + dispidQueryFeature: 147, + dispidGetNestedAppAuthContextMethod: 205, + dispidMethodMax: 205 +}; +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidOlkRecurrenceChangedEvent: 49, + dispidOlkAttachmentsChangedEvent: 50, + dispidOlkEnhancedLocationsChangedEvent: 51, + dispidOlkInfobarClickedEvent: 52, + dispidOlkSelectedItemsChangedEvent: 53, + dispidOlkSensitivityLabelChangedEvent: 54, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 +}; +OSF.DDA.ErrorCodeManager = (function () { + var _errorMappings = {}; + return { + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) { + var errorArgs = _errorMappings[errorCode]; + if (!errorArgs) { + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + } + else { + if (!errorArgs.name) { + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + } + if (!errorArgs.message) { + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message; + } + } + return errorArgs; + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) { + _errorMappings[errorCode] = errorNameMessage; + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1000, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2000, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3000, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4000, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5000, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeOperationCancelled: 5014, + ooeWorkbookHidden: 5015, + ooeWriteNotSupportedWhenModalDialogOpen: 5016, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeRequestPayloadSizeLimitExceeded: 5103, + ooeResponsePayloadSizeLimitExceeded: 5104, + ooeCustomXmlNodeNotFound: 6000, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7000, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8000, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11000, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12000, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeModalDialogOpen: 12012, + ooeDocumentIsInactive: 12013, + ooeDialogParentIsMinimized: 12014, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010, + ooeResourceNotAllowed: 13011, + ooeSSOUnsupportedPlatform: 13012, + ooeSSOCallThrottled: 13013, + ooeAccessDenied: 13990, + ooeGeneralException: 13991 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidReadForBlankRow }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnMatrixData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { name: stringNS.L_InvalidBinding, message: stringNS.L_InvalidColumnsForBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { name: stringNS.L_SaveSettingsError, message: stringNS.L_SettingsCannotSave }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { name: stringNS.L_SettingsStaleError, message: stringNS.L_SettingsAreStale }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { name: stringNS.L_HostError, message: stringNS.L_OperationNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { name: stringNS.L_InternalError, message: stringNS.L_InternalErrorDescription }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { name: stringNS.L_PermissionDenied, message: stringNS.L_DocumentReadOnly }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { name: stringNS.L_EventRegistrationError, message: stringNS.L_EventHandlerNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { name: stringNS.L_InvalidAPICall, message: stringNS.L_InvalidApiCallInContext }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { name: stringNS.L_ShuttingDown, message: stringNS.L_ShuttingDown }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { name: stringNS.L_UnsupportedEnumeration, message: stringNS.L_UnsupportedEnumerationMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden] = { name: stringNS.L_APICallFailed, message: stringNS.L_WorkbookHiddenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen] = { name: stringNS.L_APICallFailed, message: stringNS.L_WriteNotSupportedWhenModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestPayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_ResponsePayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { name: stringNS.L_CustomXmlOutOfDateName, message: stringNS.L_CustomXmlOutOfDateMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { name: stringNS.L_CannotNavigateTo, message: stringNS.L_CannotNavigateTo }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { name: stringNS.L_SpecifiedIdNotExist, message: stringNS.L_SpecifiedIdNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { name: stringNS.L_NavOutOfBound, message: stringNS.L_NavOutOfBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { name: stringNS.L_DataWriteReminder, message: stringNS.L_CellDataAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { name: stringNS.L_MissingParameter, message: stringNS.L_ElementMissing }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidCellsValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidTableOptionValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidFormatValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_RowIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_ColIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_FormatValueOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { name: stringNS.L_FormattingReminder, message: stringNS.L_CellFormatAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { name: stringNS.L_MemoryLimit, message: stringNS.L_CloseFileBeforeRetrieve }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { name: stringNS.L_NetworkProblem, message: stringNS.L_NetworkProblemRetrieveFile }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { name: stringNS.L_InvalidValue, message: stringNS.L_SliceSizeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAlreadyOpened }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NetworkProblem }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { name: stringNS.L_DialogNavigateError, message: stringNS.L_DialogInvalidScheme }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAddressNotTrusted }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_ModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DocumentIsInactive }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogParentIsMinimized }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform] = { name: stringNS.L_APINotSupported, message: stringNS.L_SSOUnsupportedPlatform }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled] = { name: stringNS.L_OperationCancelledError, message: stringNS.L_OperationCancelledErrorMessage }; + } + }; +})(); +(function (OfficeExt) { + var Requirement; + (function (Requirement) { + var RequirementVersion = (function () { + function RequirementVersion() { + } + return RequirementVersion; + }()); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = (function () { + function RequirementMatrix(_setMap) { + this.isSetSupported = function _isSetSupported(name, minVersion) { + if (name == undefined) { + return false; + } + if (minVersion == undefined) { + minVersion = 0; + } + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if (sets.hasOwnProperty(name.toLowerCase())) { + var setMaxVersion = sets[name.toLowerCase()]; + try { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.major > 0 && + setMaxVersionNum.minor >= 0 && + setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor >= minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion = function (version) { + version = version + ""; + var temp = version.split("."); + var major = 0; + var minor = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } + } + var result = { "minor": minor, "major": major }; + return result; + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this); + } + return RequirementMatrix; + }()); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = (function () { + function DefaultSetRequirement(setMap) { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) { + for (var name in addedSet) { + this._sets[name] = addedSet[name]; + } + }; + this._sets = setMap; + } + return DefaultSetRequirement; + }()); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultRequiredDialogSetRequirement = (function (_super) { + __extends(DefaultRequiredDialogSetRequirement, _super); + function DefaultRequiredDialogSetRequirement() { + return _super.call(this, { + "dialogapi": 1.1 + }) || this; + } + return DefaultRequiredDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultRequiredDialogSetRequirement = DefaultRequiredDialogSetRequirement; + var DefaultOptionalDialogSetRequirement = (function (_super) { + __extends(DefaultOptionalDialogSetRequirement, _super); + function DefaultOptionalDialogSetRequirement() { + return _super.call(this, { + "dialogorigin": 1.1 + }) || this; + } + return DefaultOptionalDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultOptionalDialogSetRequirement = DefaultOptionalDialogSetRequirement; + var ExcelClientDefaultSetRequirement = (function (_super) { + __extends(ExcelClientDefaultSetRequirement, _super); + function ExcelClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "excelapi": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = (function (_super) { + __extends(ExcelClientV1DefaultSetRequirement, _super); + function ExcelClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return ExcelClientV1DefaultSetRequirement; + }(ExcelClientDefaultSetRequirement)); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = (function (_super) { + __extends(OutlookClientDefaultSetRequirement, _super); + function OutlookClientDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = (function (_super) { + __extends(WordClientDefaultSetRequirement, _super); + function WordClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1, + "wordapi": 1.1 + }) || this; + } + return WordClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = (function (_super) { + __extends(WordClientV1DefaultSetRequirement, _super); + function WordClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2, + "imagecoercion": 1.1 + }); + return _this; + } + return WordClientV1DefaultSetRequirement; + }(WordClientDefaultSetRequirement)); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = (function (_super) { + __extends(PowerpointClientDefaultSetRequirement, _super); + function PowerpointClientDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = (function (_super) { + __extends(PowerpointClientV1DefaultSetRequirement, _super); + function PowerpointClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return PowerpointClientV1DefaultSetRequirement; + }(PowerpointClientDefaultSetRequirement)); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = (function (_super) { + __extends(ProjectClientDefaultSetRequirement, _super); + function ProjectClientDefaultSetRequirement() { + return _super.call(this, { + "selection": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ProjectClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = (function (_super) { + __extends(ExcelWebDefaultSetRequirement, _super); + function ExcelWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "file": 1.1 + }) || this; + } + return ExcelWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = (function (_super) { + __extends(WordWebDefaultSetRequirement, _super); + function WordWebDefaultSetRequirement() { + return _super.call(this, { + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "imagecoercion": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablecoercion": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = (function (_super) { + __extends(PowerpointWebDefaultSetRequirement, _super); + function PowerpointWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "settings": 1.1 + }) || this; + } + return PowerpointWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = (function (_super) { + __extends(OutlookWebDefaultSetRequirement, _super); + function OutlookWebDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = (function (_super) { + __extends(SwayWebDefaultSetRequirement, _super); + function SwayWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "documentevents": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return SwayWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = (function (_super) { + __extends(AccessWebDefaultSetRequirement, _super); + function AccessWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "partialtablebindings": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1 + }) || this; + } + return AccessWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = (function (_super) { + __extends(ExcelIOSDefaultSetRequirement, _super); + function ExcelIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = (function (_super) { + __extends(WordIOSDefaultSetRequirement, _super); + function WordIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = (function (_super) { + __extends(WordIOSV1DefaultSetRequirement, _super); + function WordIOSV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2 + }); + return _this; + } + return WordIOSV1DefaultSetRequirement; + }(WordIOSDefaultSetRequirement)); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = (function (_super) { + __extends(PowerpointIOSDefaultSetRequirement, _super); + function PowerpointIOSDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = (function (_super) { + __extends(OutlookIOSDefaultSetRequirement, _super); + function OutlookIOSDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.1 + }) || this; + } + return OutlookIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = (function () { + function RequirementsMatrixFactory() { + } + RequirementsMatrixFactory.initializeOsfDda = function () { + OSF.OUtil.setNamespace("Requirement", OSF.DDA); + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function (appContext) { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if (RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) { + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + } + else { + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})); + } + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function (appContext) { + var setRequirements = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + setRequirements = new DefaultSetRequirement(matrixItem); + } + else { + setRequirements = new DefaultRequiredDialogSetRequirement(); + var mainRequirement = appContext.get_requirementMatrix(); + if (mainRequirement != undefined && mainRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(mainRequirement.toLowerCase()); + for (var name in setRequirements._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + var dialogOptionalSetRequirement = new DefaultOptionalDialogSetRequirement(); + for (var name in dialogOptionalSetRequirement._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + } + } + return new RequirementMatrix(setRequirements); + }; + RequirementsMatrixFactory.getClientFullVersionString = function (appContext) { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || + appName == 4096 || + appName == 8192 || + appName == 65536; + if (isIOSClient && appContext.get_appVersion() == 1) { + if (appName == 4096 && appMinorVersion >= 15) { + appFullVersion = "16.00.01"; + } + else { + appFullVersion = "16.00"; + } + } + else if (appContext.get_appName() == 64) { + appFullVersion = appContext.get_appVersion(); + } + else { + if (appMinorVersion < 10) { + appMinorVersionString = "0" + appMinorVersion; + } + else { + appMinorVersionString = "" + appMinorVersion; + } + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString; + } + return appContext.get_appName() + "-" + appFullVersion; + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function () { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement(); + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory; + }()); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory; + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})); +})(OfficeExt || (OfficeExt = {})); +OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" +}; +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" +}; +OSF.NamespaceManager = (function OSF_NamespaceManager() { + var _userOffice; + var _useShortcut = false; + return { + enableShortcut: function OSF_NamespaceManager$enableShortcut() { + if (!_useShortcut) { + if (window.Office) { + _userOffice = window.Office; + } + else { + OSF.OUtil.setNamespace("Office", window); + } + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true; + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() { + if (_useShortcut) { + if (_userOffice) { + window.Office = _userOffice; + } + else { + OSF.OUtil.unsetNamespace("Office", window); + } + _useShortcut = false; + } + } + }; +})(); +OSF.NamespaceManager.enableShortcut(); +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { + if (useShortcut) { + OSF.NamespaceManager.enableShortcut(); + } + else { + OSF.NamespaceManager.disableShortcut(); + } +}; +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { + var promise; + if (str && typeof str == "string") { + var index = str.indexOf("#"); + if (index != -1) { + var op = str.substring(0, index); + var target = str.substring(index + 1); + switch (op) { + case "binding": + case "bindings": + if (target) { + promise = new OSF.DDA.BindingPromise(target); + } + break; + } + } + } + if (!promise) { + if (errorCallback) { + var callbackType = typeof errorCallback; + if (callbackType == "function") { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext, OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)); + } + else { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, callbackType); + } + } + } + else { + promise.onFail = errorCallback; + return promise; + } +}; +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { + OSF.OUtil.defineEnumerableProperties(this, { + "contentLanguage": { + value: officeAppContext.get_dataLocale() + }, + "displayLanguage": { + value: officeAppContext.get_appUILocale() + }, + "touchEnabled": { + value: officeAppContext.get_touchEnabled() + }, + "commerceAllowed": { + value: officeAppContext.get_commerceAllowed() + }, + "host": { + value: OfficeExt.HostName.Host.getInstance().getHost() + }, + "platform": { + value: OfficeExt.HostName.Host.getInstance().getPlatform() + }, + "isDialog": { + value: OSF._OfficeAppFactory.getHostInfo().isDialog + }, + "diagnostics": { + value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion()) + } + }); + if (license) { + OSF.OUtil.defineEnumerableProperty(this, "license", { + value: license + }); + } + if (officeAppContext.ui) { + OSF.OUtil.defineEnumerableProperty(this, "ui", { + value: officeAppContext.ui + }); + } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.webAuth) { + OSF.OUtil.defineEnumerableProperty(this, "webAuth", { + value: officeAppContext.webAuth + }); + } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } + if (officeAppContext.extensionLifeCycle) { + OSF.OUtil.defineEnumerableProperty(this, "extensionLifeCycle", { + value: officeAppContext.extensionLifeCycle + }); + } + if (officeAppContext.messaging) { + OSF.OUtil.defineEnumerableProperty(this, "messaging", { + value: officeAppContext.messaging + }); + } + if (officeAppContext.ui && officeAppContext.ui.taskPaneAction) { + OSF.OUtil.defineEnumerableProperty(this, "taskPaneAction", { + value: officeAppContext.ui.taskPaneAction + }); + } + if (officeAppContext.ui && officeAppContext.ui.ribbonGallery) { + OSF.OUtil.defineEnumerableProperty(this, "ribbonGallery", { + value: officeAppContext.ui.ribbonGallery + }); + } + if (officeAppContext.get_isDialog()) { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } + else { + if (document) { + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: document + }); + } + if (appOM) { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this, displayName, { + value: appOM + }); + } + if (officeAppContext.get_officeTheme()) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return officeAppContext.get_officeTheme(); + } + }); + } + else if (getOfficeTheme) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return getOfficeTheme(); + } + }); + } + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + if (officeAppContext.get_featureGates) { + var featureGates = officeAppContext.get_featureGates(); + if (featureGates && featureGates["EnablePublicThemeManager"]) { + var themeManager = new OSF.DDA.Theming.InternalThemeHandler(); + themeManager.InitializeThemeManager(); + OSF.OUtil.defineEnumerableProperty(this, "themeManager", { + value: themeManager + }); + } + } + } +}; +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { + OSF.DDA.OutlookContext.uber.constructor.call(this, appContext, null, license, appOM, getOfficeTheme); + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "roamingSettings", { + value: settings + }); + } + if (appContext.sensitivityLabelsCatalog) { + OSF.OUtil.defineEnumerableProperty(this, "sensitivityLabelsCatalog", { + value: appContext.sensitivityLabelsCatalog() + }); + } +}; +OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { + var mode; + switch (officeAppContext.get_clientMode()) { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break; + } + ; + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "settings", { + value: settings + }); + } + ; + OSF.OUtil.defineMutableProperties(this, { + "mode": { + value: mode + }, + "url": { + value: officeAppContext.get_docUrl() + } + }); +}; +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { + OSF.DDA.JsomDocument.uber.constructor.call(this, officeAppContext, settings); + if (bindingFacade) { + OSF.OUtil.defineEnumerableProperty(this, "bindings", { + get: function OSF_DDA_Document$GetBindings() { return bindingFacade; } + }); + } + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetSelectedDataAsync, + am.SetSelectedDataAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])); +}; +OSF.OUtil.extend(OSF.DDA.JsomDocument, OSF.DDA.Document); +OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension, "context", { + get: function Microsoft_Office_WebExtension$GetContext() { + var context; + if (OSF && OSF._OfficeAppFactory) { + context = OSF._OfficeAppFactory.getContext(); + } + return context; + } +}); +OSF.DDA.License = function OSF_DDA_License(eToken) { + OSF.OUtil.defineEnumerableProperty(this, "value", { + value: eToken + }); +}; +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function () { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, displayName); + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) { + for (var name in params) { + var param = params[name]; + var arg = args[name]; + if (param["enum"]) { + switch (typeof arg) { + case "string": + if (OSF.OUtil.listContainsValue(param["enum"], arg)) { + break; + } + case "undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + } + if (param["types"]) { + if (!OSF.OUtil.listContainsValue(param["types"], typeof arg)) { + throw getInvalidParameterString(); + } + } + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) { + if (userArgs.length < requiredCount) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + } + var requiredArgs = []; + var index; + for (index = 0; index < requiredCount; index++) { + requiredArgs.push(userArgs[index]); + } + this.verifyArguments(requiredParameters, requiredArgs); + var ret = {}; + for (index = 0; index < requiredCount; index++) { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if (param.verify) { + var isValid = param.verify(arg, caller, stateInfo); + if (!isValid) { + throw getInvalidParameterString(); + } + } + ret[param.name] = arg; + } + return ret; + }, + this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) { + options = options || {}; + for (var optionName in supportedOptions) { + if (!OSF.OUtil.listContainsKey(options, optionName)) { + var value = undefined; + var option = supportedOptions[optionName]; + if (option.calculate && requiredArgs) { + value = option.calculate(requiredArgs, caller, stateInfo); + } + if (!value && option.defaultValue !== undefined) { + value = option.defaultValue; + } + options[optionName] = value; + } + } + return options; + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) { + var callArgs = {}; + for (var r in required) { + callArgs[r] = required[r]; + } + for (var o in options) { + callArgs[o] = options[o]; + } + for (var s in privateStateCallbacks) { + callArgs[s] = privateStateCallbacks[s](caller, stateInfo); + } + if (checkCallArgs) { + callArgs = checkCallArgs(callArgs, caller, stateInfo); + } + return callArgs; + }; +}; +OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" +}; +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" +}; +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 +}; +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" +}; +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.AsyncMethodNames[entry] = am; + } +}; +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 2) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + case "function": + if (parameterCallback) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + } + else { + parameterCallback = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + if (parameterCallback) { + if (options[Microsoft.Office.WebExtension.Parameters.Callback]) { + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + } + else { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + } + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (onSucceeded) { + payload = onSucceeded(response, caller, callArgs); + } + else { + payload = response; + } + } + else { + if (onFailed) { + payload = onFailed(status, response); + } + else { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + } + return payload; + }; + this.getCallArgs = function (suppliedArgs) { + var options, parameterCallback; + for (var i = suppliedArgs.length - 1; i >= requiredCount; i--) { + var argument = suppliedArgs[i]; + switch (typeof argument) { + case "object": + options = argument; + break; + case "function": + parameterCallback = argument; + break; + } + } + options = options || {}; + if (parameterCallback) { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + return options; + }; +}; +OSF.DDA.AsyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [], supportedOptions, privateStateCallbacks, params.onSucceeded, params.onFailed, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function (callDefinition) { + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { + OSF.OUtil.defineEnumerableProperties(this, { + "name": { + value: name + }, + "message": { + value: message + }, + "code": { + value: code + } + }); +}; +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { + OSF.OUtil.defineEnumerableProperties(this, { + "value": { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value] + }, + "status": { + value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded + } + }); + if (initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) { + OSF.OUtil.defineEnumerableProperty(this, "asyncContext", { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context] + }); + } + if (errorArgs) { + OSF.OUtil.defineEnumerableProperty(this, "error", { + value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + }); + } +}; +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if (callback) { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + } + else { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs, errorArgs)); + } +}; +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.SyncMethodNames[entry] = am; + } +}; +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 1) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; +}; +OSF.DDA.SyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [], supportedOptions, params.privateStateCallbacks, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function (callDefinition) { + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.ListType = (function () { + var listTypes = {}; + return { + setListType: function OSF_DDA_ListType$AddListType(t, prop) { listTypes[t] = prop; }, + isListType: function OSF_DDA_ListType$IsListType(t) { return OSF.OUtil.listContainsKey(listTypes, t); }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) { return listTypes[t]; } + }; +})(); +OSF.DDA.HostParameterMap = function (specialProcessor, mappings) { + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function (data) { + if (data != null && data.rows !== undefined) { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData; + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.JsonData] = { + toHost: function (data) { return data; }, + fromHost: function (data) { return typeof data === "string" ? JSON.parse(data) : data; } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) { + var ret = preimageSet ? {} : undefined; + for (var entry in preimageSet) { + var preimage = preimageSet[entry]; + var image; + if (OSF.DDA.ListType.isListType(entry)) { + image = []; + for (var subEntry in preimage) { + image.push(mapValues(preimage[subEntry], mapping)); + } + } + else if (OSF.OUtil.listContainsKey(dynamicTypes, entry)) { + image = dynamicTypes[entry][mapping](preimage); + } + else if (mapping == fromHostMap && specialProcessor.preserveNesting(entry)) { + image = mapValues(preimage, mapping); + } + else { + var maps = mappings[entry]; + if (maps) { + var map = maps[mapping]; + if (map) { + image = map[preimage]; + if (image === undefined) { + image = preimage; + } + } + } + else { + image = preimage; + } + } + ret[entry] = image; + } + return ret; + } + ; + function generateArguments(imageSet, parameters) { + var ret; + for (var param in parameters) { + var arg; + if (specialProcessor.isComplexType(param)) { + arg = generateArguments(imageSet, mappings[param][toHostMap]); + } + else { + arg = imageSet[param]; + } + if (arg != undefined) { + if (!ret) { + ret = {}; + } + var index = parameters[param]; + if (index == self) { + index = param; + } + ret[index] = specialProcessor.pack(param, arg); + } + } + return ret; + } + ; + function extractArguments(source, parameters, extracted) { + if (!extracted) { + extracted = {}; + } + for (var param in parameters) { + var index = parameters[param]; + var value; + if (index == self) { + value = source; + } + else if (index == sourceData) { + extracted[param] = source.toArray(); + continue; + } + else { + value = source[index]; + } + if (value === null || value === undefined) { + extracted[param] = undefined; + } + else { + value = specialProcessor.unpack(param, value); + var map; + if (specialProcessor.isComplexType(param)) { + map = mappings[param][fromHostMap]; + if (specialProcessor.preserveNesting(param)) { + extracted[param] = extractArguments(value, map); + } + else { + extractArguments(value, map, extracted); + } + } + else { + if (OSF.DDA.ListType.isListType(param)) { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for (var item in value) { + extractedValues[item] = extractArguments(value[item], map); + } + extracted[param] = extractedValues; + } + else { + extracted[param] = value; + } + } + } + } + return extracted; + } + ; + function applyMap(mapName, preimage, mapping) { + var parameters = mappings[mapName][mapping]; + var image; + if (mapping == "toHost") { + var imageSet = mapValues(preimage, mapping); + image = generateArguments(imageSet, parameters); + } + else if (mapping == "fromHost") { + var argumentSet = extractArguments(preimage, parameters); + image = mapValues(argumentSet, mapping); + } + return image; + } + ; + if (!mappings) { + mappings = {}; + } + this.addMapping = function (mapName, description) { + var toHost, fromHost; + if (description.map) { + toHost = description.map; + fromHost = {}; + for (var preimage in toHost) { + var image = toHost[preimage]; + if (image == self) { + image = preimage; + } + fromHost[image] = preimage; + } + } + else { + toHost = description.toHost; + fromHost = description.fromHost; + } + var pair = mappings[mapName]; + if (pair) { + var currMap = pair[toHostMap]; + for (var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for (var fh in currMap) + fromHost[fh] = currMap[fh]; + } + else { + pair = mappings[mapName] = {}; + } + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost; + }; + this.toHost = function (mapName, preimage) { return applyMap(mapName, preimage, toHostMap); }; + this.fromHost = function (mapName, image) { return applyMap(mapName, image, fromHostMap); }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function (ct) { specialProcessor.addComplexType(ct); }; + this.getDynamicType = function (dt) { return specialProcessor.getDynamicType(dt); }; + this.setDynamicType = function (dt, handler) { specialProcessor.setDynamicType(dt, handler); }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function (preimageSet, mapping) { return mapValues(preimageSet, mapping); }; +}; +OSF.DDA.SpecialProcessor = function (complexTypes, dynamicTypes) { + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) { + complexTypes.push(ct); + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) { + return dynamicTypes[dt]; + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) { + dynamicTypes[dt] = handler; + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) { + return OSF.OUtil.listContainsValue(complexTypes, t); + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) { + return OSF.OUtil.listContainsKey(dynamicTypes, p); + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) { + var pn = []; + if (OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if (OSF.DDA.DataNodeEventProperties) { + pn = pn.concat([ + OSF.DDA.DataNodeEventProperties.OldNode, + OSF.DDA.DataNodeEventProperties.NewNode, + OSF.DDA.DataNodeEventProperties.NextSiblingNode + ]); + } + return OSF.OUtil.listContainsValue(pn, p); + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].toHost(arg); + } + else { + value = arg; + } + return value; + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.DDA.getDecoratedParameterMap = function (specialProcessor, initialDefs) { + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + } + parameterMap.define = function define(definition) { + var args = {}; + var toHost = createObject(definition.toHost); + if (definition.invertible) { + args.map = toHost; + } + else if (definition.canonical) { + args.toHost = args.fromHost = toHost; + } + else { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost); + } + parameterMap.addMapping(definition.type, args); + if (definition.isComplexType) + parameterMap.addComplexType(definition.type); + }; + for (var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap; +}; +OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + "GoToByIdAsync": did.dispidNavigateToMethod, + "GetSelectedDataAsync": did.dispidGetSelectedDataMethod, + "SetSelectedDataAsync": did.dispidSetSelectedDataMethod, + "GetDocumentCopyChunkAsync": did.dispidGetDocumentCopyChunkMethod, + "ReleaseDocumentCopyAsync": did.dispidReleaseDocumentCopyMethod, + "GetDocumentCopyAsync": did.dispidGetDocumentCopyMethod, + "AddFromSelectionAsync": did.dispidAddBindingFromSelectionMethod, + "AddFromPromptAsync": did.dispidAddBindingFromPromptMethod, + "AddFromNamedItemAsync": did.dispidAddBindingFromNamedItemMethod, + "GetAllAsync": did.dispidGetAllBindingsMethod, + "GetByIdAsync": did.dispidGetBindingMethod, + "ReleaseByIdAsync": did.dispidReleaseBindingMethod, + "GetDataAsync": did.dispidGetBindingDataMethod, + "SetDataAsync": did.dispidSetBindingDataMethod, + "AddRowsAsync": did.dispidAddRowsMethod, + "AddColumnsAsync": did.dispidAddColumnsMethod, + "DeleteAllDataValuesAsync": did.dispidClearAllRowsMethod, + "RefreshAsync": did.dispidLoadSettingsMethod, + "SaveAsync": did.dispidSaveSettingsMethod, + "GetActiveViewAsync": did.dispidGetActiveViewMethod, + "GetFilePropertiesAsync": did.dispidGetFilePropertiesMethod, + "GetOfficeThemeAsync": did.dispidGetOfficeThemeMethod, + "GetDocumentThemeAsync": did.dispidGetDocumentThemeMethod, + "ClearFormatsAsync": did.dispidClearFormatsMethod, + "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, + "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, + "GetAuthContextAsync": did.dispidGetAuthContextMethod, + "GetNestedAppAuthContextAsync": did.dispidGetNestedAppAuthContextMethod, + "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, + "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, + "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, + "InsertFormAsync": did.dispidInsertFormMethod, + "ExecuteFeature": did.dispidExecuteFeature, + "QueryFeature": did.dispidQueryFeature, + "AddDataPartAsync": did.dispidAddDataPartMethod, + "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, + "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, + "GetPartXmlAsync": did.dispidGetDataPartXmlMethod, + "GetPartNodesAsync": did.dispidGetDataPartNodesMethod, + "DeleteDataPartAsync": did.dispidDeleteDataPartMethod, + "GetNodeValueAsync": did.dispidGetDataNodeValueMethod, + "GetNodeXmlAsync": did.dispidGetDataNodeXmlMethod, + "GetRelativeNodesAsync": did.dispidGetDataNodesMethod, + "SetNodeValueAsync": did.dispidSetDataNodeValueMethod, + "SetNodeXmlAsync": did.dispidSetDataNodeXmlMethod, + "AddDataPartNamespaceAsync": did.dispidAddDataNamespaceMethod, + "GetDataPartNamespaceAsync": did.dispidGetDataUriByPrefixMethod, + "GetDataPartPrefixAsync": did.dispidGetDataPrefixByUriMethod, + "GetNodeTextAsync": did.dispidGetDataNodeTextMethod, + "SetNodeTextAsync": did.dispidSetDataNodeTextMethod, + "GetSelectedTask": did.dispidGetSelectedTaskMethod, + "GetTask": did.dispidGetTaskMethod, + "GetWSSUrl": did.dispidGetWSSUrlMethod, + "GetTaskField": did.dispidGetTaskFieldMethod, + "GetSelectedResource": did.dispidGetSelectedResourceMethod, + "GetResourceField": did.dispidGetResourceFieldMethod, + "GetProjectField": did.dispidGetProjectFieldMethod, + "GetSelectedView": did.dispidGetSelectedViewMethod, + "GetTaskByIndex": did.dispidGetTaskByIndexMethod, + "GetResourceByIndex": did.dispidGetResourceByIndexMethod, + "SetTaskField": did.dispidSetTaskFieldMethod, + "SetResourceField": did.dispidSetResourceFieldMethod, + "GetMaxTaskIndex": did.dispidGetMaxTaskIndexMethod, + "GetMaxResourceIndex": did.dispidGetMaxResourceIndexMethod, + "CreateTask": did.dispidCreateTaskMethod + }; + for (var method in methodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = methodMap[method]; + } + } + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var syncMethodMap = { + "MessageParent": did.dispidMessageParentMethod, + "SendMessage": did.dispidSendMessageMethod + }; + for (var method in syncMethodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = syncMethodMap[method]; + } + } + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + "SettingsChanged": did.dispidSettingsChangedEvent, + "DocumentSelectionChanged": did.dispidDocumentSelectionChangedEvent, + "BindingSelectionChanged": did.dispidBindingSelectionChangedEvent, + "BindingDataChanged": did.dispidBindingDataChangedEvent, + "ActiveViewChanged": did.dispidActiveViewChangedEvent, + "OfficeThemeChanged": did.dispidOfficeThemeChangedEvent, + "DocumentThemeChanged": did.dispidDocumentThemeChangedEvent, + "AppCommandInvoked": did.dispidAppCommandInvokedEvent, + "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, + "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, + "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, + "RecurrenceChanged": did.dispidOlkRecurrenceChangedEvent, + "AttachmentsChanged": did.dispidOlkAttachmentsChangedEvent, + "EnhancedLocationsChanged": did.dispidOlkEnhancedLocationsChangedEvent, + "InfobarClicked": did.dispidOlkInfobarClickedEvent, + "SelectedItemsChanged": did.dispidOlkSelectedItemsChangedEvent, + "SensitivityLabelChanged": did.dispidOlkSensitivityLabelChangedEvent, + "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, + "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, + "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, + "DataNodeInserted": did.dispidDataNodeAddedEvent, + "DataNodeReplaced": did.dispidDataNodeReplacedEvent, + "DataNodeDeleted": did.dispidDataNodeDeletedEvent + }; + for (var event in eventMap) { + if (jsom[event]) { + dispIdMap[jsom[event]] = eventMap[event]; + } + } + function IsObjectEvent(dispId) { + return (dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { + if (typeof ex == "number") { + if (!callArgs) { + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + } + OSF.DDA.issueAsyncResult(callArgs, ex, OSF.DDA.ErrorCodeManager.getErrorArgs(ex)); + } + else { + throw ex; + } + } + ; + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) { + var callArgs; + try { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) { + window.Excel._RedirectV1APIs = true; + } + if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if (richApiInExcelMethodSubstitution.preprocess) { + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + } + var ctx = new window.Excel.RequestContext(); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); + ctx.sync() + .then(function () { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if (richApiInExcelMethodSubstitution.postprocess) { + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); + } + if (status != 0) { + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, response); + })["catch"](function (error) { + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure, null); + }); + } + else { + var hostCallArgs; + if (parameterMap.toHost) { + hostCallArgs = parameterMap.toHost(dispId, callArgs); + } + else { + hostCallArgs = callArgs; + } + var startTime = (new Date()).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + "dispId": dispId, + "hostCallArgs": hostCallArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": function (status, hostResponseArgs) { + var responseArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (parameterMap.fromHost) { + responseArgs = parameterMap.fromHost(dispId, hostResponseArgs); + } + else { + responseArgs = hostResponseArgs; + } + } + else { + responseArgs = hostResponseArgs; + } + var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); + OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry && !(OSF.ConstantNames && OSF.ConstantNames.IsCustomFunctionsRuntime)) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } + } + }); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); + if (!added) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; + } + } + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if (isPopupWindow) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return; + } + var dispId_1 = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId_1); + var targetId_1 = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId_1) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId_1, + "targetId": targetId_1, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = null; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web" && dispId_1 == OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent) { + args = hostArgs; + } + else { + args = parameterMap.fromHost(dispId_1, hostArgs); + } + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId_1, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId_1, args)); + } + }); + } + else { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var status, removeSuccess; + if (handler === null) { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + else { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration + }); + } + else { + onEnsureRegistration(status); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller, isModal) { + var callArgs; + var targetId; + var asyncMethodCall = null; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) { + var payload; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + else { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status, onSucceedArgs, caller, callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + } + OSF.DDA.issueAsyncResult(callArgs, status, payload); + } + try { + if (dialogMessageEvent == undefined || dialogOtherEvent == undefined) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + } + if (!isModal) { + if (OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + } + else { + if (OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.id]; + } + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + callArgs["isModal"] = isModal; + targetId = JSON.stringify(callArgs); + if (!OSF.DialogShownStatus.hasDialogShown) { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + } + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = parameterMap.fromHost(dispId, hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent, caller, args); + if (event.type == dialogOtherEvent) { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]); + } + eventDispatch.fireOrQueueEvent(event); + if (args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false; + } + } + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) { + var callArgs; + var dialogMessageEvent, dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false; + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": closeCallback + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + if (closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed, OSF.DDA.AsyncMethodNames.CloseAsync.displayName, closeStatus); + } + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; +}; +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { + for (var entry in asyncMethodNames) { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if (!target[name]) { + OSF.OUtil.defineEnumerableProperty(target, name, { + value: (function (asyncMethod) { + return function () { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod, arguments, target, privateState); + }; + })(method) + }); + } + } +}; +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if (!target[add]) { + OSF.OUtil.defineEnumerableProperty(target, add, { + value: function () { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments, eventDispatch, target, isPopupWindow); + } + }); + } + if (!target[remove]) { + OSF.OUtil.defineEnumerableProperty(target, remove, { + value: function () { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments, eventDispatch, target); + } + }); + } +}; +(function (OfficeExt) { + var loadMsAjax = false; + var MsAjaxTypeHelper = (function () { + function MsAjaxTypeHelper() { + } + MsAjaxTypeHelper.isInstanceOfType = function (type, instance) { + if (typeof (instance) === "undefined" || instance === null) + return false; + if (instance instanceof type) + return true; + var instanceType = instance.constructor; + if (!instanceType || (typeof (instanceType) !== "function") || !instanceType.__typeName || instanceType.__typeName === 'Object') { + instanceType = Object; + } + return !!(instanceType === type) || + (instanceType.__typeName && type.__typeName && instanceType.__typeName === type.__typeName); + }; + return MsAjaxTypeHelper; + }()); + OfficeExt.MsAjaxTypeHelper = MsAjaxTypeHelper; + var MsAjaxError = (function () { + function MsAjaxError() { + } + MsAjaxError.create = function (message, errorInfo) { + var err = new Error(message); + err.message = message; + if (errorInfo) { + for (var v in errorInfo) { + err[v] = errorInfo[v]; + } + } + err.popStackFrame(); + return err; + }; + MsAjaxError.parameterCount = function (message) { + var displayMessage = "Sys.ParameterCountException: " + (message ? message : "Parameter count mismatch."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.ParameterCountException' }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argument = function (paramName, message) { + var displayMessage = "Sys.ArgumentException: " + (message ? message : "Value does not fall within the expected range."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentNull = function (paramName, message) { + var displayMessage = "Sys.ArgumentNullException: " + (message ? message : "Value cannot be null."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentOutOfRange = function (paramName, actualValue, message) { + var displayMessage = "Sys.ArgumentOutOfRangeException: " + (message ? message : "Specified argument was out of the range of valid values."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + if (typeof (actualValue) !== "undefined" && actualValue !== null) { + displayMessage += "\n" + MsAjaxString.format("Actual value was {0}.", actualValue); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentType = function (paramName, actualType, expectedType, message) { + var displayMessage = "Sys.ArgumentTypeException: "; + if (message) { + displayMessage += message; + } + else if (actualType && expectedType) { + displayMessage += MsAjaxString.format("Object of type '{0}' cannot be converted to type '{1}'.", actualType.getName ? actualType.getName() : actualType, expectedType.getName ? expectedType.getName() : expectedType); + } + else { + displayMessage += "Object cannot be converted to the required type."; + } + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentUndefined = function (paramName, message) { + var displayMessage = "Sys.ArgumentUndefinedException: " + (message ? message : "Value cannot be undefined."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.invalidOperation = function (message) { + var displayMessage = "Sys.InvalidOperationException: " + (message ? message : "Operation is not valid due to the current state of the object."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.InvalidOperationException' }); + err.popStackFrame(); + return err; + }; + return MsAjaxError; + }()); + OfficeExt.MsAjaxError = MsAjaxError; + var MsAjaxString = (function () { + function MsAjaxString() { + } + MsAjaxString.format = function (format) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var source = format; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10); + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }; + MsAjaxString.startsWith = function (str, prefix) { + return (str.substr(0, prefix.length) === prefix); + }; + return MsAjaxString; + }()); + OfficeExt.MsAjaxString = MsAjaxString; + var MsAjaxDebug = (function () { + function MsAjaxDebug() { + } + MsAjaxDebug.trace = function (text) { + if (typeof Debug !== "undefined" && Debug.writeln) + Debug.writeln(text); + if (window.console && window.console.log) + window.console.log(text); + if (window.opera && window.opera.postError) + window.opera.postError(text); + if (window.debugService && window.debugService.trace) + window.debugService.trace(text); + var a = document.getElementById("TraceConsole"); + if (a && a.tagName.toUpperCase() === "TEXTAREA") { + a.appendChild(document.createTextNode(text + "\n")); + } + }; + return MsAjaxDebug; + }()); + OfficeExt.MsAjaxDebug = MsAjaxDebug; + if (!loadMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) { + var registerTypeInternal = function registerTypeInternal(type, name, isClass) { + if (type.__typeName === undefined || type.__typeName === null) { + type.__typeName = name; + } + if (type.__class === undefined || type.__class === null) { + type.__class = isClass; + } + }; + registerTypeInternal(Function, "Function", true); + registerTypeInternal(Error, "Error", true); + registerTypeInternal(Object, "Object", true); + registerTypeInternal(String, "String", true); + registerTypeInternal(Boolean, "Boolean", true); + registerTypeInternal(Date, "Date", true); + registerTypeInternal(Number, "Number", true); + registerTypeInternal(RegExp, "RegExp", true); + registerTypeInternal(Array, "Array", true); + if (!Function.createCallback) { + Function.createCallback = function Function$createCallback(method, context) { + var e = Function._validateParams(arguments, [ + { name: "method", type: Function }, + { name: "context", mayBeNull: true } + ]); + if (e) + throw e; + return function () { + var l = arguments.length; + if (l > 0) { + var args = []; + for (var i = 0; i < l; i++) { + args[i] = arguments[i]; + } + args[l] = context; + return method.apply(this, args); + } + return method.call(this, context); + }; + }; + } + if (!Function.createDelegate) { + Function.createDelegate = function Function$createDelegate(instance, method) { + var e = Function._validateParams(arguments, [ + { name: "instance", mayBeNull: true }, + { name: "method", type: Function } + ]); + if (e) + throw e; + return function () { + return method.apply(instance, arguments); + }; + }; + } + if (!Function._validateParams) { + Function._validateParams = function (params, expectedParams, validateParameterCount) { + var e, expectedLength = expectedParams.length; + validateParameterCount = validateParameterCount || (typeof (validateParameterCount) === "undefined"); + e = Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i = 0, l = params.length; i < l; i++) { + var expectedParam = expectedParams[Math.min(i, expectedLength - 1)], paramName = expectedParam.name; + if (expectedParam.parameterArray) { + paramName += "[" + (i - expectedLength + 1) + "]"; + } + else if (!validateParameterCount && (i >= expectedLength)) { + break; + } + e = Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; + }; + } + if (!Function._validateParameterCount) { + Function._validateParameterCount = function (params, expectedParams, validateParameterCount) { + var i, error, expectedLen = expectedParams.length, actualLen = params.length; + if (actualLen < expectedLen) { + var minParams = expectedLen; + for (i = 0; i < expectedLen; i++) { + var param = expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error = true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error = true; + for (i = 0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error = false; + break; + } + } + } + if (error) { + var e = MsAjaxError.parameterCount(); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!Function._validateParameter) { + Function._validateParameter = function (param, expectedParam, paramName) { + var e, expectedType = expectedParam.type, expectedInteger = !!expectedParam.integer, expectedDomElement = !!expectedParam.domElement, mayBeNull = !!expectedParam.mayBeNull; + e = Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType = expectedParam.elementType, elementMayBeNull = !!expectedParam.elementMayBeNull; + if (expectedType === Array && typeof (param) !== "undefined" && param !== null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger = !!expectedParam.elementInteger, expectedElementDomElement = !!expectedParam.elementDomElement; + for (var i = 0; i < param.length; i++) { + var elem = param[i]; + e = Function._validateParameterType(elem, expectedElementType, expectedElementInteger, expectedElementDomElement, elementMayBeNull, paramName + "[" + i + "]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; + }; + } + if (!Function._validateParameterType) { + Function._validateParameterType = function (param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof (param) === "undefined") { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param === null) { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && !OfficeExt.MsAjaxTypeHelper.isInstanceOfType(expectedType, param)) { + e = OfficeExt.MsAjaxError.argumentType(paramName, typeof (param), expectedType); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!window.Type) { + window.Type = Function; + } + if (!Type.registerNamespace) { + Type.registerNamespace = function (ns) { + var namespaceParts = ns.split('.'); + var currentNamespace = window; + for (var i = 0; i < namespaceParts.length; i++) { + currentNamespace[namespaceParts[i]] = currentNamespace[namespaceParts[i]] || {}; + currentNamespace = currentNamespace[namespaceParts[i]]; + } + }; + } + if (!Type.prototype.registerClass) { + Type.prototype.registerClass = function (cls) { cls = {}; }; + } + if (typeof (Sys) === "undefined") { + Type.registerNamespace('Sys'); + } + if (!Error.prototype.popStackFrame) { + Error.prototype.popStackFrame = function () { + if (arguments.length !== 0) + throw MsAjaxError.parameterCount(); + if (typeof (this.stack) === "undefined" || this.stack === null || + typeof (this.fileName) === "undefined" || this.fileName === null || + typeof (this.lineNumber) === "undefined" || this.lineNumber === null) { + return; + } + var stackFrames = this.stack.split("\n"); + var currentFrame = stackFrames[0]; + var pattern = this.fileName + ":" + this.lineNumber; + while (typeof (currentFrame) !== "undefined" && + currentFrame !== null && + currentFrame.indexOf(pattern) === -1) { + stackFrames.shift(); + currentFrame = stackFrames[0]; + } + var nextFrame = stackFrames[1]; + if (typeof (nextFrame) === "undefined" || nextFrame === null) { + return; + } + var nextFrameParts = nextFrame.match(/@(.*):(\d+)$/); + if (typeof (nextFrameParts) === "undefined" || nextFrameParts === null) { + return; + } + this.fileName = nextFrameParts[1]; + this.lineNumber = parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack = stackFrames.join("\n"); + }; + } + OsfMsAjaxFactory.msAjaxError = MsAjaxError; + OsfMsAjaxFactory.msAjaxString = MsAjaxString; + OsfMsAjaxFactory.msAjaxDebug = MsAjaxDebug; + } +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.setNamespace("SafeArray", OSF.DDA); +OSF.DDA.SafeArray.Response = { + Status: 0, + Payload: 1 +}; +OSF.DDA.SafeArray.UniqueArguments = { + Offset: "offset", + Run: "run", + BindingSpecificData: "bindingSpecificData", + MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" +}; +OSF.OUtil.setNamespace("Delegate", OSF.DDA.SafeArray); +OSF.DDA.SafeArray.Delegate._onException = function OSF_DDA_SafeArray_Delegate$OnException(ex, args) { + var status; + var statusNumber = ex.number; + if (statusNumber) { + switch (statusNumber) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2147467259: + if (args.dispId == OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + break; + case -2146828283: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147209089: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147208704: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + if (args.onComplete) { + args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } +}; +OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod = function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) { + var status; + var number = ex.number; + if (number) { + switch (number) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; +}; +OSF.DDA.SafeArray.Delegate.SpecialProcessor = function OSF_DDA_SafeArray_Delegate_SpecialProcessor() { + function _2DVBArrayToJaggedArray(vbArr) { + var ret; + try { + var rows = vbArr.ubound(1); + var cols = vbArr.ubound(2); + vbArr = vbArr.toArray(); + if (rows == 1 && cols == 1) { + ret = [vbArr]; + } + else { + ret = []; + for (var row = 0; row < rows; row++) { + var rowArr = []; + for (var col = 0; col < cols; col++) { + var datum = vbArr[row * cols + col]; + if (datum != OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) { + rowArr.push(datum); + } + } + if (rowArr.length > 0) { + ret.push(rowArr); + } + } + } + } + catch (ex) { + } + return ret; + } + var complexTypes = []; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = (function () { + var tableRows = 0; + var tableHeaders = 1; + return { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) { + if (OSF.DDA.TableDataProperties && typeof data != "string" && data[OSF.DDA.TableDataProperties.TableRows] !== undefined) { + var tableData = []; + tableData[tableRows] = data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.DDA.TableDataProperties.TableHeaders]; + data = tableData; + } + return data; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) { + var ret; + if (hostArgs.toArray) { + var dimensions = hostArgs.dimensions(); + if (dimensions === 2) { + ret = _2DVBArrayToJaggedArray(hostArgs); + } + else { + var array = hostArgs.toArray(); + if (array.length === 2 && ((array[0] != null && array[0].toArray) || (array[1] != null && array[1].toArray))) { + ret = {}; + ret[OSF.DDA.TableDataProperties.TableRows] = _2DVBArrayToJaggedArray(array[tableRows]); + ret[OSF.DDA.TableDataProperties.TableHeaders] = _2DVBArrayToJaggedArray(array[tableHeaders]); + } + else { + ret = array; + } + } + } + else { + ret = hostArgs; + } + return ret; + } + }; + })(); + OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes); + this.unpack = function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) { + var toArraySupported = arg !== undefined && arg.toArray !== undefined; + value = toArraySupported ? arg.toArray() : arg || {}; + } + else if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor); +OSF.DDA.SafeArray.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor(), [ + { + type: Microsoft.Office.WebExtension.Parameters.ValueFormat, + toHost: [ + { name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, value: 0 }, + { name: Microsoft.Office.WebExtension.ValueFormat.Formatted, value: 1 } + ] + }, + { + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [ + { name: Microsoft.Office.WebExtension.FilterType.All, value: 0 } + ] + } +]); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, + fromHost: [ + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, value: 0 }, + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) { + function toArray(args) { + var arrArgs = args; + if (OSF.OUtil.isArray(args)) { + var len = arrArgs.length; + for (var i = 0; i < len; i++) { + arrArgs[i] = toArray(arrArgs[i]); + } + } + else if (OSF.OUtil.isDate(args)) { + arrArgs = args.getVarDate(); + } + else if (typeof args === "object" && !OSF.OUtil.isArray(args)) { + arrArgs = []; + for (var index in args) { + if (!OSF.OUtil.isFunction(args[index])) { + arrArgs[index] = toArray(args[index]); + } + } + } + return arrArgs; + } + function fromSafeArray(value) { + var ret = value; + if (value != null && value.toArray) { + var arrayResult = value.toArray(); + ret = new Array(arrayResult.length); + for (var i = 0; i < arrayResult.length; i++) { + ret[i] = fromSafeArray(arrayResult[i]); + } + } + return ret; + } + try { + if (args.onCalling) { + args.onCalling(); + } + OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { + var result; + var status; + if (typeof hostResponseArgs === "number") { + result = []; + status = hostResponseArgs; + } + else { + result = hostResponseArgs.toArray(); + status = result[OSF.DDA.SafeArray.Response.Status]; + } + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) { + var payload = result[OSF.DDA.SafeArray.Response.Payload]; + payload = fromSafeArray(payload); + if (payload != null) { + if (!args._chunkResultData) { + args._chunkResultData = new Array(); + } + args._chunkResultData[payload[0]] = payload[1]; + } + return false; + } + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (result.length > 2) { + payload = []; + for (var i = 1; i < result.length; i++) + payload[i - 1] = result[i]; + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + if (args._chunkResultData) { + payload = fromSafeArray(payload); + if (payload != null) { + var expectedChunkCount = payload[payload.length - 1]; + if (args._chunkResultData.length == expectedChunkCount) { + payload[payload.length - 1] = args._chunkResultData; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + } + } + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + args.onComplete(status, payload); + } + return true; + }); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent = function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) { + var startTime = (new Date()).getTime(); + return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) { + if (args.onReceiving) { + args.onReceiving(); + } + var status = hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + }; +}; +OSF.DDA.SafeArray.Delegate.registerEventAsync = function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + try { + OSF.ClientHostController.registerEvent(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.unregisterEventAsync = function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.unregisterEvent(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.ClientMode = { + ReadWrite: 0, + ReadOnly: 1 +}; +OSF.DDA.RichInitializationReason = { + 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, + 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened +}; +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._initializeSettings = this.initializeSettings; +}; +OSF.InitializationHelper.prototype.deserializeSettings = function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) { + var settings; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if (storageSettings) { + serializedSettings = JSON.parse(storageSettings); + } + else { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if (refreshSupported) { + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + } + else { + settings = new OSF.DDA.Settings(deserializedSettings); + } + return settings; +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication() { +}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)); +}; +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { + var license = new OSF.DDA.License(appContext.get_eToken()); + var getOfficeThemeHandler = (OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme) ? OSF.DDA.OfficeTheme.getOfficeTheme : null; + if (appContext.get_isDialog()) { + if (OSF.DDA.UI.ChildUI) { + appContext.ui = new OSF.DDA.UI.ChildUI(); + } + } + else { + if (OSF.DDA.UI.ParentUI) { + appContext.ui = new OSF.DDA.UI.ParentUI(); + if (OfficeExt.Container) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.CloseContainerAsync]); + } + } + } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } + if (OSF.DDA.ExecuteFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.ExecuteFeature]); + } + if (OSF.DDA.QueryFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.QueryFeature]); + } + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + var asyncMethods = []; + var getAccessTokenMethod = OSF.DDA.AsyncMethodNames.GetAccessTokenAsync; + if (getAccessTokenMethod) { + asyncMethods.push(getAccessTokenMethod); + } + var authContextMethod = OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync; + if (authContextMethod) { + asyncMethods.push(authContextMethod); + } + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, asyncMethods); + } + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); + var getDelegateMethods, parameterMap; + getDelegateMethods = OSF.DDA.DispIdHost.getClientDelegateMethods; + parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods, parameterMap)); +}; +OSF.InitializationHelper.prototype.getInitializationReason = function (appContext) { return OSF.DDA.RichInitializationReason[appContext.get_reason()]; }; +OSF.DDA.DispIdHost.getClientDelegateMethods = function (actionId) { + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.SafeArray.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.SafeArray.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.SafeArray.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.SafeArray.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.SafeArray.Delegate.closeDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.SafeArray.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.SafeArray.Delegate.sendMessage; + if (OSF.DDA.AsyncMethodNames.RefreshAsync && actionId == OSF.DDA.AsyncMethodNames.RefreshAsync.id) { + var readSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + if (typeof (OSF.DDA.ClientSettingsManager.refresh) === "function") { + return OSF.DDA.ClientSettingsManager.refresh(onCalling, onReceiving); + } + else { + return OSF.DDA.ClientSettingsManager.read(onCalling, onReceiving); + } + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings); + } + if (OSF.DDA.AsyncMethodNames.SaveAsync && actionId == OSF.DDA.AsyncMethodNames.SaveAsync.id) { + var writeSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings], hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale], onCalling, onReceiving); + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings); + } + return delegateMethods; +}; +(function (OfficeExt) { + var MacRichClientHostController = (function () { + function MacRichClientHostController() { + } + MacRichClientHostController.prototype.execute = function (id, params, callback) { + setTimeout(function () { + window.external.Execute(id, params, callback); + }, 0); + }; + MacRichClientHostController.prototype.registerEvent = function (id, targetId, handler, callback) { + setTimeout(function () { + window.external.RegisterEvent(id, targetId, handler, callback); + }, 0); + }; + MacRichClientHostController.prototype.unregisterEvent = function (id, targetId, callback) { + setTimeout(function () { + window.external.UnregisterEvent(id, targetId, callback); + }, 0); + }; + MacRichClientHostController.prototype.openDialog = function (id, targetId, handler, callback) { + if (MacRichClientHostController.popup && !MacRichClientHostController.popup.closed) { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); + return; + } + var magicWord = "action=displayDialog"; + window.dialogAPIErrorCode = undefined; + var fragmentSeparator = '#'; + var callArgs = JSON.parse(targetId); + var callUrl = callArgs.url; + if (!callUrl) { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme); + return; + } + var urlParts = callUrl.split(fragmentSeparator); + var seperator = "?"; + if (urlParts[0].indexOf("?") > -1) { + seperator = "&"; + } + var width = screen.width * callArgs.width / 100; + var height = screen.height * callArgs.height / 100; + var params = "width=" + width + ", height=" + height; + urlParts[0] = urlParts[0].concat(seperator).concat(magicWord); + var openUrl = urlParts.join(fragmentSeparator); + MacRichClientHostController.popup = window.open(openUrl, "", params); + function receiveMessage(event) { + if (event.source == MacRichClientHostController.popup) { + try { + var messageObj = JSON.parse(event.data); + if (messageObj.dialogMessage) { + handler(id, [OSF.DialogMessageType.DialogMessageReceived, messageObj.dialogMessage.messageContent]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:" + event.data); + } + } + } + MacRichClientHostController.DialogEventListener = receiveMessage; + function checkWindowCloseNotifyError(errorCode) { + handler(id, [errorCode]); + } + function checkWindowClose() { + try { + if (MacRichClientHostController.popup == null || MacRichClientHostController.popup.closed) { + window.clearInterval(MacRichClientHostController.interval); + window.removeEventListener("message", MacRichClientHostController.DialogEventListener); + MacRichClientHostController.NotifyError = null; + handler(id, [OSF.DialogMessageType.DialogClosed]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed."); + } + } + if (MacRichClientHostController.popup != undefined && window.dialogAPIErrorCode == undefined) { + window.addEventListener("message", MacRichClientHostController.DialogEventListener); + MacRichClientHostController.interval = window.setInterval(checkWindowClose, 500); + MacRichClientHostController.NotifyError = checkWindowCloseNotifyError; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + var error = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + if (window.dialogAPIErrorCode) { + error = window.dialogAPIErrorCode; + } + callback(error); + } + }; + MacRichClientHostController.prototype.messageParent = function (params) { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + var messageObj = { dialogMessage: { messageType: OSF.DialogMessageType.DialogMessageReceived, messageContent: message } }; + window.opener.postMessage(JSON.stringify(messageObj), window.location.origin); + }; + MacRichClientHostController.prototype.closeDialog = function (id, targetId, callback) { + if (MacRichClientHostController.popup) { + if (MacRichClientHostController.interval) { + window.clearInterval(MacRichClientHostController.interval); + } + MacRichClientHostController.popup.close(); + MacRichClientHostController.popup = null; + window.removeEventListener("message", MacRichClientHostController.DialogEventListener); + MacRichClientHostController.NotifyError = null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + }; + MacRichClientHostController.prototype.sendMessage = function (params) { + }; + MacRichClientHostController.prototype.closeSdxDialog = function (context) { + }; + MacRichClientHostController.prototype.resizeSdxDialog = function (width, height) { + }; + return MacRichClientHostController; + }()); + OfficeExt.MacRichClientHostController = MacRichClientHostController; +})(OfficeExt || (OfficeExt = {})); +var OSF = OSF || {}; +var OSFWebkit; +(function (OSFWebkit) { + var WebkitSafeArray = (function () { + function WebkitSafeArray(data) { + this.data = data; + this.safeArrayFlag = this.isSafeArray(data); + } + WebkitSafeArray.prototype.dimensions = function () { + var dimensions = 0; + if (this.safeArrayFlag) { + dimensions = this.data[0][0]; + } + else if (this.isArray()) { + dimensions = 2; + } + return dimensions; + }; + WebkitSafeArray.prototype.getItem = function () { + var array = []; + var element = null; + if (this.safeArrayFlag) { + array = this.toArray(); + } + else { + array = this.data; + } + element = array; + for (var i = 0; i < arguments.length; i++) { + element = element[arguments[i]]; + } + return element; + }; + WebkitSafeArray.prototype.lbound = function (dimension) { + return 0; + }; + WebkitSafeArray.prototype.ubound = function (dimension) { + var ubound = 0; + if (this.safeArrayFlag) { + ubound = this.data[0][dimension]; + } + else if (this.isArray()) { + if (dimension == 1) { + return this.data.length; + } + else if (dimension == 2) { + if (OSF.OUtil.isArray(this.data[0])) { + return this.data[0].length; + } + else if (this.data[0] != null) { + return 1; + } + } + } + return ubound; + }; + WebkitSafeArray.prototype.toArray = function () { + if (this.isArray() == false) { + return this.data; + } + var arr = []; + var startingIndex = this.safeArrayFlag ? 1 : 0; + for (var i = startingIndex; i < this.data.length; i++) { + var element = this.data[i]; + if (this.isSafeArray(element)) { + arr.push(new WebkitSafeArray(element)); + } + else { + arr.push(element); + } + } + return arr; + }; + WebkitSafeArray.prototype.isArray = function () { + return OSF.OUtil.isArray(this.data); + }; + WebkitSafeArray.prototype.isSafeArray = function (obj) { + var isSafeArray = false; + if (OSF.OUtil.isArray(obj) && OSF.OUtil.isArray(obj[0])) { + var bounds = obj[0]; + var dimensions = bounds[0]; + if (bounds.length != dimensions + 1) { + return false; + } + var expectedArraySize = 1; + for (var i = 1; i < bounds.length; i++) { + var dimension = bounds[i]; + if (isFinite(dimension) == false) { + return false; + } + expectedArraySize = expectedArraySize * dimension; + } + expectedArraySize++; + isSafeArray = (expectedArraySize == obj.length); + } + return isSafeArray; + }; + return WebkitSafeArray; + }()); + OSFWebkit.WebkitSafeArray = WebkitSafeArray; +})(OSFWebkit || (OSFWebkit = {})); +(function (OSFWebkit) { + var ScriptMessaging; + (function (ScriptMessaging) { + var scriptMessenger = null; + function agaveHostCallback(callbackId, params) { + scriptMessenger.agaveHostCallback(callbackId, params); + } + ScriptMessaging.agaveHostCallback = agaveHostCallback; + function agaveHostEventCallback(callbackId, params) { + scriptMessenger.agaveHostEventCallback(callbackId, params); + } + ScriptMessaging.agaveHostEventCallback = agaveHostEventCallback; + function GetScriptMessenger() { + if (scriptMessenger == null) { + if (HostScriptMessaging.IsSupportedByHost()) { + scriptMessenger = new HostScriptMessaging(); + } + else { + scriptMessenger = new WebkitScriptMessaging("OSF.ScriptMessaging.agaveHostCallback", "OSF.ScriptMessaging.agaveHostEventCallback"); + } + } + return scriptMessenger; + } + ScriptMessaging.GetScriptMessenger = GetScriptMessenger; + var EventHandlerCallback = (function () { + function EventHandlerCallback(id, targetId, handler) { + this.id = id; + this.targetId = targetId; + this.handler = handler; + } + return EventHandlerCallback; + }()); + var HostScriptMessaging = (function () { + function HostScriptMessaging() { + this.eventHandlers = []; + } + HostScriptMessaging.IsSupportedByHost = function () { + return !!window._osfHostAPI; + }; + HostScriptMessaging.prototype.invokeMethod = function (handlerName, methodId, params, callback) { + var internalCallback = function (params) { + var callbacksDone = callback(params); + if (callbacksDone === undefined || callbacksDone === true) { + return true; + } + return false; + }; + window._osfHostAPI(handlerName, this.constructMessagingArgs(methodId, params), internalCallback); + }; + HostScriptMessaging.prototype.registerEvent = function (handlerName, methodId, dispId, targetId, handler, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + var internalCallback = function (params) { + callback(params); + return true; + }; + var internalEventHandler = function (params) { + handler(params); + return false; + }; + var callbackInfo = window._osfHostRegisterEvent(handlerName, this.constructMessagingArgs(methodId, hostArgs), internalEventHandler, internalCallback); + this.eventHandlers.push({ targetId: targetId, dispId: dispId, callbackId: callbackInfo.eventCallbackId }); + }; + HostScriptMessaging.prototype.unregisterEvent = function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + var internalCallback = function (params) { + callback(params); + return true; + }; + window._osfHostAPI(handlerName, this.constructMessagingArgs(methodId, hostArgs), internalCallback); + for (var i = this.eventHandlers.length - 1; i >= 0; i--) { + var handler = this.eventHandlers[i]; + if (handler.dispId === dispId && handler.targetId === targetId) { + this.eventHandlers.splice(i, 1); + window._osfHostUnregisterCallback(handler.callbackId); + } + } + }; + HostScriptMessaging.prototype.agaveHostCallback = function (callbackId, params) { + }; + HostScriptMessaging.prototype.agaveHostEventCallback = function (callbackId, params) { + }; + HostScriptMessaging.prototype.constructMessagingArgs = function (methodId, params) { + var messagingArgs = { + params: params, + methodId: methodId + }; + return messagingArgs; + }; + return HostScriptMessaging; + }()); + var WebkitScriptMessaging = (function () { + function WebkitScriptMessaging(methodCallbackName, eventCallbackName) { + this.callingIndex = 0; + this.callbackList = {}; + this.eventHandlerList = {}; + this.asyncMethodCallbackFunctionName = methodCallbackName; + this.eventCallbackFunctionName = eventCallbackName; + this.conversationId = WebkitScriptMessaging.getCurrentTimeMS().toString(); + } + WebkitScriptMessaging.prototype.invokeMethod = function (handlerName, methodId, params, callback) { + var messagingArgs = {}; + this.postWebkitMessage(messagingArgs, handlerName, methodId, params, callback); + }; + WebkitScriptMessaging.prototype.registerEvent = function (handlerName, methodId, dispId, targetId, handler, callback) { + var messagingArgs = { + eventCallbackFunction: this.eventCallbackFunctionName + }; + var hostArgs = { + id: dispId, + targetId: targetId + }; + var correlationId = this.postWebkitMessage(messagingArgs, handlerName, methodId, hostArgs, callback); + this.eventHandlerList[correlationId] = new EventHandlerCallback(dispId, targetId, handler); + }; + WebkitScriptMessaging.prototype.unregisterEvent = function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + for (var key in this.eventHandlerList) { + if (this.eventHandlerList.hasOwnProperty(key)) { + var eventCallback = this.eventHandlerList[key]; + if (eventCallback.id == dispId && eventCallback.targetId == targetId) { + delete this.eventHandlerList[key]; + } + } + } + this.invokeMethod(handlerName, methodId, hostArgs, callback); + }; + WebkitScriptMessaging.prototype.agaveHostCallback = function (callbackId, params) { + var callbackFunction = this.callbackList[callbackId]; + if (callbackFunction) { + var callbacksDone = callbackFunction(params); + if (callbacksDone === undefined || callbacksDone === true) { + delete this.callbackList[callbackId]; + } + } + }; + WebkitScriptMessaging.prototype.agaveHostEventCallback = function (callbackId, params) { + var eventCallback = this.eventHandlerList[callbackId]; + if (eventCallback) { + eventCallback.handler(params); + } + }; + WebkitScriptMessaging.prototype.postWebkitMessage = function (messagingArgs, handlerName, methodId, params, callback) { + messagingArgs.methodId = methodId; + messagingArgs.params = params; + var correlationId = ""; + if (callback) { + correlationId = this.generateCorrelationId(); + this.callbackList[correlationId] = callback; + messagingArgs.callbackId = correlationId; + messagingArgs.callbackFunction = this.asyncMethodCallbackFunctionName; + } + var invokePostMessage = function () { + window.webkit.messageHandlers[handlerName].postMessage(JSON.stringify(messagingArgs)); + }; + var currentTimestamp = WebkitScriptMessaging.getCurrentTimeMS(); + if (this.lastMessageTimestamp == null || (currentTimestamp - this.lastMessageTimestamp >= WebkitScriptMessaging.MESSAGE_TIME_DELTA)) { + invokePostMessage(); + this.lastMessageTimestamp = currentTimestamp; + } + else { + this.lastMessageTimestamp += WebkitScriptMessaging.MESSAGE_TIME_DELTA; + setTimeout(function () { + invokePostMessage(); + }, this.lastMessageTimestamp - currentTimestamp); + } + return correlationId; + }; + WebkitScriptMessaging.prototype.generateCorrelationId = function () { + ++this.callingIndex; + return this.conversationId + this.callingIndex; + }; + WebkitScriptMessaging.getCurrentTimeMS = function () { + return (new Date).getTime(); + }; + WebkitScriptMessaging.MESSAGE_TIME_DELTA = 10; + return WebkitScriptMessaging; + }()); + })(ScriptMessaging = OSFWebkit.ScriptMessaging || (OSFWebkit.ScriptMessaging = {})); +})(OSFWebkit || (OSFWebkit = {})); +OSF.ScriptMessaging = OSFWebkit.ScriptMessaging; +(function (OSFWebkit) { + OSFWebkit.MessageHandlerName = "Agave"; + OSFWebkit.PopupMessageHandlerName = "WefPopupHandler"; + var AppContextProperties; + (function (AppContextProperties) { + AppContextProperties[AppContextProperties["Settings"] = 0] = "Settings"; + AppContextProperties[AppContextProperties["SolutionReferenceId"] = 1] = "SolutionReferenceId"; + AppContextProperties[AppContextProperties["AppType"] = 2] = "AppType"; + AppContextProperties[AppContextProperties["MajorVersion"] = 3] = "MajorVersion"; + AppContextProperties[AppContextProperties["MinorVersion"] = 4] = "MinorVersion"; + AppContextProperties[AppContextProperties["RevisionVersion"] = 5] = "RevisionVersion"; + AppContextProperties[AppContextProperties["APIVersionSequence"] = 6] = "APIVersionSequence"; + AppContextProperties[AppContextProperties["AppCapabilities"] = 7] = "AppCapabilities"; + AppContextProperties[AppContextProperties["APPUILocale"] = 8] = "APPUILocale"; + AppContextProperties[AppContextProperties["AppDataLocale"] = 9] = "AppDataLocale"; + AppContextProperties[AppContextProperties["BindingCount"] = 10] = "BindingCount"; + AppContextProperties[AppContextProperties["DocumentUrl"] = 11] = "DocumentUrl"; + AppContextProperties[AppContextProperties["ActivationMode"] = 12] = "ActivationMode"; + AppContextProperties[AppContextProperties["ControlIntegrationLevel"] = 13] = "ControlIntegrationLevel"; + AppContextProperties[AppContextProperties["SolutionToken"] = 14] = "SolutionToken"; + AppContextProperties[AppContextProperties["APISetVersion"] = 15] = "APISetVersion"; + AppContextProperties[AppContextProperties["CorrelationId"] = 16] = "CorrelationId"; + AppContextProperties[AppContextProperties["InstanceId"] = 17] = "InstanceId"; + AppContextProperties[AppContextProperties["TouchEnabled"] = 18] = "TouchEnabled"; + AppContextProperties[AppContextProperties["CommerceAllowed"] = 19] = "CommerceAllowed"; + AppContextProperties[AppContextProperties["RequirementMatrix"] = 20] = "RequirementMatrix"; + AppContextProperties[AppContextProperties["HostCustomMessage"] = 21] = "HostCustomMessage"; + AppContextProperties[AppContextProperties["HostFullVersion"] = 22] = "HostFullVersion"; + AppContextProperties[AppContextProperties["InitialDisplayMode"] = 23] = "InitialDisplayMode"; + AppContextProperties[AppContextProperties["FeatureGates"] = 24] = "FeatureGates"; + AppContextProperties[AppContextProperties["HostSettings"] = 25] = "HostSettings"; + AppContextProperties[AppContextProperties["OfficeThemeInfo"] = 26] = "OfficeThemeInfo"; + })(AppContextProperties = OSFWebkit.AppContextProperties || (OSFWebkit.AppContextProperties = {})); + var MethodId; + (function (MethodId) { + MethodId[MethodId["Execute"] = 1] = "Execute"; + MethodId[MethodId["RegisterEvent"] = 2] = "RegisterEvent"; + MethodId[MethodId["UnregisterEvent"] = 3] = "UnregisterEvent"; + MethodId[MethodId["WriteSettings"] = 4] = "WriteSettings"; + MethodId[MethodId["GetContext"] = 5] = "GetContext"; + MethodId[MethodId["SendMessage"] = 6] = "SendMessage"; + MethodId[MethodId["MessageParent"] = 7] = "MessageParent"; + MethodId[MethodId["SendMessage2"] = 8] = "SendMessage2"; + MethodId[MethodId["MessageParent2"] = 9] = "MessageParent2"; + })(MethodId = OSFWebkit.MethodId || (OSFWebkit.MethodId = {})); + var WebkitHostController = (function () { + function WebkitHostController(hostScriptProxy) { + this.hostScriptProxy = hostScriptProxy; + this.useFullDialogAPI = !!window._enableFullDialogAPI; + this.osfSupportsDialogOrigin = !!window._osfEnableDialogOrigin; + } + WebkitHostController.prototype.execute = function (id, params, callback) { + var hostParams = { + id: id, + apiArgs: params + }; + var agaveResponseCallback = function (payload) { + if (callback) { + var invokeArguments = []; + if (OSF.OUtil.isArray(payload)) { + for (var i = 0; i < payload.length; i++) { + var element = payload[i]; + if (OSF.OUtil.isArray(element)) { + element = new OSFWebkit.WebkitSafeArray(element); + } + invokeArguments.unshift(element); + } + } + return callback.apply(null, invokeArguments); + } + }; + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.Execute, hostParams, agaveResponseCallback); + }; + WebkitHostController.prototype.registerEvent = function (id, targetId, handler, callback) { + var agaveEventHandlerCallback = function (payload) { + var safeArraySource = payload; + var eventId = 0; + if (OSF.OUtil.isArray(payload) && payload.length >= 2) { + safeArraySource = payload[0]; + eventId = payload[1]; + } + if (handler) { + handler(eventId, new OSFWebkit.WebkitSafeArray(safeArraySource)); + } + }; + var agaveResponseCallback = function (payload) { + if (callback) { + return callback(new OSFWebkit.WebkitSafeArray(payload)); + } + }; + this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.RegisterEvent, id, targetId, agaveEventHandlerCallback, agaveResponseCallback); + }; + WebkitHostController.prototype.unregisterEvent = function (id, targetId, callback) { + var agaveResponseCallback = function (response) { + return callback(new OSFWebkit.WebkitSafeArray(response)); + }; + this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.UnregisterEvent, id, targetId, agaveResponseCallback); + }; + WebkitHostController.prototype.messageParent = function (params) { + if (this.useFullDialogAPI && params) { + var messageToParent = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + if (typeof messageToParent === "boolean") { + if (messageToParent === true) { + params[Microsoft.Office.WebExtension.Parameters.MessageToParent] = "true"; + } + else if (messageToParent === false) { + params[Microsoft.Office.WebExtension.Parameters.MessageToParent] = ""; + } + } + } + var message; + var methodId; + if (this.osfSupportsDialogOrigin && params[Microsoft.Office.WebExtension.Parameters.TargetOrigin]) { + message = this.useFullDialogAPI ? JSON.stringify(params) : params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + methodId = OSF.Webkit.MethodId.MessageParent2; + } + else { + message = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + methodId = OSF.Webkit.MethodId.MessageParent; + } + if (this.useFullDialogAPI) { + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, methodId, message, null); + } + else { + var messageObj = { dialogMessage: { messageType: OSF.DialogMessageType.DialogMessageReceived, messageContent: message } }; + var targetOrigin = methodId == OSF.Webkit.MethodId.MessageParent2 ? params[Microsoft.Office.WebExtension.Parameters.TargetOrigin] : window.location.origin; + window.opener.postMessage(JSON.stringify(messageObj), targetOrigin); + } + }; + WebkitHostController.prototype.openDialog = function (id, targetId, handler, callback) { + if (this.useFullDialogAPI) { + this.registerEvent(id, targetId, handler, callback); + return; + } + if (WebkitHostController.popup && !WebkitHostController.popup.closed) { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); + return; + } + var magicWord = "action=displayDialog"; + WebkitHostController.OpenDialogCallback = undefined; + var fragmentSeparator = '#'; + var callArgs = JSON.parse(targetId); + var callUrl = callArgs.url; + if (!callUrl) { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme); + return; + } + var urlParts = callUrl.split(fragmentSeparator); + var seperator = "?"; + if (urlParts[0].indexOf("?") > -1) { + seperator = "&"; + } + var width = screen.width * callArgs.width / 100; + var height = screen.height * callArgs.height / 100; + var params = "width=" + width + ", height=" + height; + urlParts[0] = urlParts[0].concat(seperator).concat(magicWord); + var openUrl = urlParts.join(fragmentSeparator); + WebkitHostController.popup = window.open(openUrl, "", params); + function receiveMessage(event) { + if (event.origin == window.location.origin) { + try { + var messageObj = JSON.parse(event.data); + if (messageObj.dialogMessage) { + handler(id, [OSF.DialogMessageType.DialogMessageReceived, messageObj.dialogMessage.messageContent, event.origin]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:" + event.data); + } + } + } + WebkitHostController.DialogEventListener = receiveMessage; + function checkWindowClose() { + try { + if (WebkitHostController.popup == null || WebkitHostController.popup.closed) { + window.clearInterval(WebkitHostController.interval); + window.removeEventListener("message", WebkitHostController.DialogEventListener); + WebkitHostController.NotifyError = null; + WebkitHostController.popup = null; + handler(id, [OSF.DialogMessageType.DialogClosed]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed."); + } + } + function OpenDialogCallbackNotifyError(errorCode) { + handler(id, [errorCode]); + } + WebkitHostController.OpenDialogCallback = function (code) { + if (code == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + window.addEventListener("message", WebkitHostController.DialogEventListener); + WebkitHostController.interval = window.setInterval(checkWindowClose, 1000); + WebkitHostController.NotifyError = OpenDialogCallbackNotifyError; + } + callback(code); + }; + }; + WebkitHostController.prototype.closeDialog = function (id, targetId, callback) { + if (this.useFullDialogAPI) { + this.unregisterEvent(id, targetId, callback); + } + else { + if (WebkitHostController.popup) { + if (WebkitHostController.interval) { + window.clearInterval(WebkitHostController.interval); + } + WebkitHostController.popup.close(); + WebkitHostController.popup = null; + window.removeEventListener("message", WebkitHostController.DialogEventListener); + WebkitHostController.NotifyError = null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + } + }; + WebkitHostController.prototype.sendMessage = function (params) { + var message; + var methodId; + if (this.osfSupportsDialogOrigin && params[Microsoft.Office.WebExtension.Parameters.TargetOrigin]) { + message = JSON.stringify(params); + methodId = OSF.Webkit.MethodId.SendMessage2; + } + else { + message = params[Microsoft.Office.WebExtension.Parameters.MessageContent]; + methodId = OSF.Webkit.MethodId.SendMessage; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message = message.toString(); + } + } + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, methodId, message, null); + }; + WebkitHostController.prototype.closeSdxDialog = function (context) { + }; + WebkitHostController.prototype.resizeSdxDialog = function (width, height) { + }; + return WebkitHostController; + }()); + OSFWebkit.WebkitHostController = WebkitHostController; +})(OSFWebkit || (OSFWebkit = {})); +OSF.Webkit = OSFWebkit; +OSF.initializeWebkitCommon = function OSF_initializeWebkitCommon() { + OSF.DDA.ClientSettingsManager = { + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) { + return function (args) { + var status, response; + var onComplete = function onComplete(status, response) { + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + args.onComplete(status, response); + } + }; + try { + hostDelegateMethod(args.hostCallArgs, args.onCalling, onComplete); + } + catch (ex) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response = { name: Strings.OfficeOM.L_InternalError, message: ex }; + onComplete(status, response); + } + }; + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + var initializationHelper = OSF._OfficeAppFactory.getInitializationHelper(); + var onReceivedContext = function onReceivedContext(appContext) { + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, appContext.get_settings()); + } + }; + initializationHelper.getAppContext(null, onReceivedContext); + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) { + var hostParams = {}; + var keys = []; + var values = []; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + hostParams["keys"] = keys; + hostParams["values"] = values; + if (onCalling) { + onCalling(); + } + var onWriteCompleted = function onWriteCompleted(status) { + if (onComplete) { + onComplete(status[0], null); + } + }; + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.WriteSettings, hostParams, onWriteCompleted); + } + }; + OSF.InitializationHelper.prototype.initializeSettings = function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) { + var serializedSettings = appContext.get_settings(); + var settings = this.deserializeSettings(serializedSettings, refreshSupported); + return settings; + }; + OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + var getInvocationCallback = function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(appContext) { + var returnedContext; + var appContextProperties = OSF.Webkit.AppContextProperties; + var appType = appContext[appContextProperties.AppType]; + var hostSettings = appContext[appContextProperties.Settings]; + var serializedSettings = {}; + var keys = hostSettings[0]; + var values = hostSettings[1]; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + var id = appContext[appContextProperties.SolutionReferenceId]; + var version = appContext[appContextProperties.MajorVersion]; + var minorVersion = appContext[appContextProperties.MinorVersion]; + var clientMode = appContext[appContextProperties.AppCapabilities]; + var UILocale = appContext[appContextProperties.APPUILocale]; + var dataLocale = appContext[appContextProperties.AppDataLocale]; + var docUrl = appContext[appContextProperties.DocumentUrl]; + var reason = appContext[appContextProperties.ActivationMode]; + var osfControlType = appContext[appContextProperties.ControlIntegrationLevel]; + var eToken = appContext[appContextProperties.SolutionToken]; + eToken = eToken ? eToken.toString() : ""; + var correlationId = appContext[appContextProperties.CorrelationId]; + var appInstanceId = appContext[appContextProperties.InstanceId]; + var touchEnabled = appContext[appContextProperties.TouchEnabled]; + var commerceAllowed = appContext[appContextProperties.CommerceAllowed]; + var requirementMatrix = appContext[appContextProperties.RequirementMatrix]; + var hostCustomMessage = appContext[appContextProperties.HostCustomMessage]; + var hostFullVersion = appContext[appContextProperties.HostFullVersion]; + var initialDisplayMode = appContext[appContextProperties.InitialDisplayMode]; + var featureGates = null; + if (appContext[appContextProperties.FeatureGates]) { + try { + featureGates = JSON.parse(appContext[appContextProperties.FeatureGates]); + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("Exception while creating the SDX FeatureGates object. Details: " + ex); + } + } + var srcOfficeThemeInfo = null; + if (appContext[appContextProperties.OfficeThemeInfo]) { + try { + srcOfficeThemeInfo = JSON.parse(appContext[appContextProperties.OfficeThemeInfo]); + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("Exception while parsing officeThemeInfo. Details: " + ex); + } + } + var officeThemeInfo = {}; + if (srcOfficeThemeInfo) { + officeThemeInfo = OSF.DDA.Theming.ConvertToOfficeTheme(srcOfficeThemeInfo); + } + returnedContext = new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, serializedSettings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, undefined, undefined, undefined, undefined, undefined, featureGates, officeThemeInfo, initialDisplayMode); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + }; + var handler; + if (this._hostInfo.isDialog && window.webkit.messageHandlers[OSF.Webkit.PopupMessageHandlerName]) { + handler = OSF.Webkit.PopupMessageHandlerName; + } + else { + handler = OSF.Webkit.MessageHandlerName; + } + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler, OSF.Webkit.MethodId.GetContext, [], getInvocationCallback); + }; +}; +(function (OfficeExt) { + var OfficeTheme; + (function (OfficeTheme) { + var OfficeThemeManager = (function () { + function OfficeThemeManager() { + this._osfOfficeTheme = null; + this._osfOfficeThemeTimeStamp = null; + } + OfficeThemeManager.prototype.getOfficeTheme = function () { + if (OSF.DDA._OsfControlContext) { + if (this._osfOfficeTheme && this._osfOfficeThemeTimeStamp && ((new Date()).getTime() - this._osfOfficeThemeTimeStamp < OfficeThemeManager._osfOfficeThemeCacheValidPeriod)) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo", 0); + } + } + else { + var startTime = (new Date()).getTime(); + var osfOfficeTheme = OSF.DDA._OsfControlContext.GetOfficeThemeInfo(); + var endTime = (new Date()).getTime(); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo", Math.abs(endTime - startTime)); + } + this._osfOfficeTheme = JSON.parse(osfOfficeTheme); + this._osfOfficeTheme = OSF.DDA.Theming.ConvertToOfficeTheme(this._osfOfficeTheme); + this._osfOfficeThemeTimeStamp = endTime; + } + return this._osfOfficeTheme; + } + }; + OfficeThemeManager.instance = function () { + if (OfficeThemeManager._instance == null) { + OfficeThemeManager._instance = new OfficeThemeManager(); + } + return OfficeThemeManager._instance; + }; + OfficeThemeManager._osfOfficeThemeCacheValidPeriod = 5000; + OfficeThemeManager._instance = null; + return OfficeThemeManager; + }()); + OfficeTheme.OfficeThemeManager = OfficeThemeManager; + OSF.OUtil.setNamespace("OfficeTheme", OSF.DDA); + OSF.DDA.OfficeTheme.getOfficeTheme = OfficeExt.OfficeTheme.OfficeThemeManager.instance().getOfficeTheme; + })(OfficeTheme = OfficeExt.OfficeTheme || (OfficeExt.OfficeTheme = {})); +})(OfficeExt || (OfficeExt = {})); +OSF.initializeRichCommon = function OSF_initializeRichCommon() { + OSF.DDA.ClientSettingsManager = { + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) { + return function (args) { + var onComplete = function onComplete(status, response) { + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + args.onComplete(status, response); + } + }; + var response; + try { + response = hostDelegateMethod(args.hostCallArgs, args.onCalling, onComplete); + } + catch (ex) { + var status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response = { name: Strings.OfficeOM.L_InternalError, message: ex }; + if (args.onComplete) { + args.onComplete(status, response); + } + } + }; + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + OSF.DDA._OsfControlContext.GetSettings(OsfOMToken).Read(keys, values); + } + else { + OSF.DDA._OsfControlContext.GetSettings().Read(keys, values); + } + var serializedSettings = {}; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, serializedSettings); + } + return serializedSettings; + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) { + var keys = []; + var values = []; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + if (onCalling) { + onCalling(); + } + var settingObj; + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + settingObj = OSF.DDA._OsfControlContext.GetSettings(OsfOMToken); + } + else { + settingObj = OSF.DDA._OsfControlContext.GetSettings(); + } + if (typeof settingObj.WriteAsync != 'undefined') { + settingObj.WriteAsync(keys, values, onComplete); + } + else { + settingObj.Write(keys, values); + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + }, + refresh: function OSF_DDA_ClientSettingsManager$refresh(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + var osfSettingsObj; + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + osfSettingsObj = OSF.DDA._OsfControlContext.GetSettings(OsfOMToken); + } + else { + osfSettingsObj = OSF.DDA._OsfControlContext.GetSettings(); + } + var readSettingsAndReturn = function () { + osfSettingsObj.Read(keys, values); + var serializedSettings = {}; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, serializedSettings); + } + }; + if (osfSettingsObj.RefreshAsync) { + osfSettingsObj.RefreshAsync(function () { + readSettingsAndReturn(); + }); + } + else { + readSettingsAndReturn(); + } + } + }; + OSF.InitializationHelper.prototype.initializeSettings = function OSF_InitializationHelper$initializeSettings(refreshSupported) { + var serializedSettings = OSF.DDA.ClientSettingsManager.read(); + var settings = this.deserializeSettings(serializedSettings, refreshSupported); + return settings; + }; + OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + var returnedContext; + var context; + var warningText = "Warning: Office.js is loaded outside of Office client"; + try { + if (window.external && OSF.OUtil.externalNativeFunctionExists(typeof window.external.GetContext)) { + context = OSF.DDA._OsfControlContext = window.external.GetContext(); + } + else { + OsfMsAjaxFactory.msAjaxDebug.trace(warningText); + return; + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace(warningText); + return; + } + var appType = context.GetAppType(); + var id = context.GetSolutionRef(); + var version = context.GetAppVersionMajor(); + var minorVersion = context.GetAppVersionMinor(); + var UILocale = context.GetAppUILocale(); + var dataLocale = context.GetAppDataLocale(); + var docUrl = context.GetDocUrl(); + var clientMode = context.GetAppCapabilities(); + var reason = context.GetActivationMode(); + var osfControlType = context.GetControlIntegrationLevel(); + var settings = []; + var eToken; + try { + eToken = context.GetSolutionToken(); + } + catch (ex) { + } + var correlationId; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetCorrelationId)) { + correlationId = context.GetCorrelationId(); + } + var appInstanceId; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetInstanceId)) { + appInstanceId = context.GetInstanceId(); + } + var touchEnabled; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetTouchEnabled)) { + touchEnabled = context.GetTouchEnabled(); + } + var commerceAllowed; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetCommerceAllowed)) { + commerceAllowed = context.GetCommerceAllowed(); + } + var requirementMatrix; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetSupportedMatrix)) { + requirementMatrix = context.GetSupportedMatrix(); + } + var hostCustomMessage; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetHostCustomMessage)) { + hostCustomMessage = context.GetHostCustomMessage(); + } + var hostFullVersion; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetHostFullVersion)) { + hostFullVersion = context.GetHostFullVersion(); + } + var dialogRequirementMatrix; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetDialogRequirementMatrix)) { + dialogRequirementMatrix = context.GetDialogRequirementMatrix(); + } + var sdxFeatureGates; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetFeaturesForSolution)) { + try { + var sdxFeatureGatesJson = context.GetFeaturesForSolution(); + if (sdxFeatureGatesJson) { + sdxFeatureGates = JSON.parse(sdxFeatureGatesJson); + } + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("Exception while creating the SDX FeatureGates object. Details: " + ex); + } + } + var initialDisplayMode = 0; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetInitialDisplayMode)) { + initialDisplayMode = context.GetInitialDisplayMode(); + } + eToken = eToken ? eToken.toString() : ""; + returnedContext = new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, undefined, undefined, undefined, undefined, dialogRequirementMatrix, sdxFeatureGates, undefined, initialDisplayMode); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + }; +}; +OSF.OUtil.setNamespace("ExtensionLifeCycle", OSF); +OSF.ExtensionLifeCycle.close = function OSF_ExtensionLifeCycle$close(context) { + OSF.ClientHostController.closeSdxDialog(context); +}; +OSF.ExtensionLifeCycle.resize = function OSF_ExtensionLifeCycle$resize(width, height) { + OSF.ClientHostController.resizeSdxDialog(width, height); +}; +(function () { + function isWebkit2Sandbox() { + return window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.Agave; + } + if (isWebkit2Sandbox()) { + OSF.ClientHostController = new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger()); + OSF.initializeWebkitCommon(); + OSF.InitializationHelper.prototype.initializeMacSettings = function (appContext, refreshSupported) { + return this._initializeSettings(appContext, refreshSupported); + }; + } + else { + OSF.ClientHostController = new OfficeExt.MacRichClientHostController(); + OSF.initializeRichCommon(); + OSF.InitializationHelper.prototype.initializeMacSettings = function (appContext, refreshSupported) { + return this._initializeSettings(refreshSupported); + }; + } +})(); +var OSFLog; +(function (OSFLog) { + var BaseUsageData = (function () { + function BaseUsageData(table) { + this._table = table; + this._fields = {}; + } + Object.defineProperty(BaseUsageData.prototype, "Fields", { + get: function () { + return this._fields; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype, "Table", { + get: function () { + return this._table; + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function () { + }; + BaseUsageData.prototype.SetSerializedField = function (key, value) { + if (typeof (value) !== "undefined" && value !== null) { + this._serializedFields[key] = value.toString(); + } + }; + BaseUsageData.prototype.SerializeRow = function () { + this._serializedFields = {}; + this.SetSerializedField("Table", this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields); + }; + return BaseUsageData; + }()); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = (function (_super) { + __extends(AppActivatedUsageData, _super); + function AppActivatedUsageData() { + return _super.call(this, "AppActivated") || this; + } + Object.defineProperty(AppActivatedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppId", { + get: function () { return this.Fields["AppId"]; }, + set: function (value) { this.Fields["AppId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppInstanceId", { + get: function () { return this.Fields["AppInstanceId"]; }, + set: function (value) { this.Fields["AppInstanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppURL", { + get: function () { return this.Fields["AppURL"]; }, + set: function (value) { this.Fields["AppURL"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AssetId", { + get: function () { return this.Fields["AssetId"]; }, + set: function (value) { this.Fields["AssetId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Browser", { + get: function () { return this.Fields["Browser"]; }, + set: function (value) { this.Fields["Browser"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "UserId", { + get: function () { return this.Fields["UserId"]; }, + set: function (value) { this.Fields["UserId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Host", { + get: function () { return this.Fields["Host"]; }, + set: function (value) { this.Fields["Host"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostVersion", { + get: function () { return this.Fields["HostVersion"]; }, + set: function (value) { this.Fields["HostVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "ClientId", { + get: function () { return this.Fields["ClientId"]; }, + set: function (value) { this.Fields["ClientId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeWidth", { + get: function () { return this.Fields["AppSizeWidth"]; }, + set: function (value) { this.Fields["AppSizeWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeHeight", { + get: function () { return this.Fields["AppSizeHeight"]; }, + set: function (value) { this.Fields["AppSizeHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "DocUrl", { + get: function () { return this.Fields["DocUrl"]; }, + set: function (value) { this.Fields["DocUrl"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "OfficeJSVersion", { + get: function () { return this.Fields["OfficeJSVersion"]; }, + set: function (value) { this.Fields["OfficeJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostJSVersion", { + get: function () { return this.Fields["HostJSVersion"]; }, + set: function (value) { this.Fields["HostJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "WacHostEnvironment", { + get: function () { return this.Fields["WacHostEnvironment"]; }, + set: function (value) { this.Fields["WacHostEnvironment"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsFromWacAutomation", { + get: function () { return this.Fields["IsFromWacAutomation"]; }, + set: function (value) { this.Fields["IsFromWacAutomation"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsMOS", { + get: function () { return this.Fields["IsMOS"]; }, + set: function (value) { this.Fields["IsMOS"] = value; }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("AppId", this.AppId); + this.SetSerializedField("AppInstanceId", this.AppInstanceId); + this.SetSerializedField("AppURL", this.AppURL); + this.SetSerializedField("AssetId", this.AssetId); + this.SetSerializedField("Browser", this.Browser); + this.SetSerializedField("UserId", this.UserId); + this.SetSerializedField("Host", this.Host); + this.SetSerializedField("HostVersion", this.HostVersion); + this.SetSerializedField("ClientId", this.ClientId); + this.SetSerializedField("AppSizeWidth", this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight", this.AppSizeHeight); + this.SetSerializedField("Message", this.Message); + this.SetSerializedField("DocUrl", this.DocUrl); + this.SetSerializedField("OfficeJSVersion", this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion", this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment", this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation", this.IsFromWacAutomation); + this.SetSerializedField("IsMOS", this.IsMOS); + }; + return AppActivatedUsageData; + }(BaseUsageData)); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = (function (_super) { + __extends(ScriptLoadUsageData, _super); + function ScriptLoadUsageData() { + return _super.call(this, "ScriptLoad") || this; + } + Object.defineProperty(ScriptLoadUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ScriptId", { + get: function () { return this.Fields["ScriptId"]; }, + set: function (value) { this.Fields["ScriptId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "StartTime", { + get: function () { return this.Fields["StartTime"]; }, + set: function (value) { this.Fields["StartTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("ScriptId", this.ScriptId); + this.SetSerializedField("StartTime", this.StartTime); + this.SetSerializedField("ResponseTime", this.ResponseTime); + }; + return ScriptLoadUsageData; + }(BaseUsageData)); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = (function (_super) { + __extends(AppClosedUsageData, _super); + function AppClosedUsageData() { + return _super.call(this, "AppClosed") || this; + } + Object.defineProperty(AppClosedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "FocusTime", { + get: function () { return this.Fields["FocusTime"]; }, + set: function (value) { this.Fields["FocusTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalWidth", { + get: function () { return this.Fields["AppSizeFinalWidth"]; }, + set: function (value) { this.Fields["AppSizeFinalWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalHeight", { + get: function () { return this.Fields["AppSizeFinalHeight"]; }, + set: function (value) { this.Fields["AppSizeFinalHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "OpenTime", { + get: function () { return this.Fields["OpenTime"]; }, + set: function (value) { this.Fields["OpenTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "CloseMethod", { + get: function () { return this.Fields["CloseMethod"]; }, + set: function (value) { this.Fields["CloseMethod"] = value; }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("FocusTime", this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth", this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight", this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime", this.OpenTime); + this.SetSerializedField("CloseMethod", this.CloseMethod); + }; + return AppClosedUsageData; + }(BaseUsageData)); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = (function (_super) { + __extends(APIUsageUsageData, _super); + function APIUsageUsageData() { + return _super.call(this, "APIUsage") || this; + } + Object.defineProperty(APIUsageUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIType", { + get: function () { return this.Fields["APIType"]; }, + set: function (value) { this.Fields["APIType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIID", { + get: function () { return this.Fields["APIID"]; }, + set: function (value) { this.Fields["APIID"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "Parameters", { + get: function () { return this.Fields["Parameters"]; }, + set: function (value) { this.Fields["Parameters"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ErrorType", { + get: function () { return this.Fields["ErrorType"]; }, + set: function (value) { this.Fields["ErrorType"] = value; }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("APIType", this.APIType); + this.SetSerializedField("APIID", this.APIID); + this.SetSerializedField("Parameters", this.Parameters); + this.SetSerializedField("ResponseTime", this.ResponseTime); + this.SetSerializedField("ErrorType", this.ErrorType); + }; + return APIUsageUsageData; + }(BaseUsageData)); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = (function (_super) { + __extends(AppInitializationUsageData, _super); + function AppInitializationUsageData() { + return _super.call(this, "AppInitialization") || this; + } + Object.defineProperty(AppInitializationUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SuccessCode", { + get: function () { return this.Fields["SuccessCode"]; }, + set: function (value) { this.Fields["SuccessCode"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("SuccessCode", this.SuccessCode); + this.SetSerializedField("Message", this.Message); + }; + return AppInitializationUsageData; + }(BaseUsageData)); + OSFLog.AppInitializationUsageData = AppInitializationUsageData; + var CheckWACHostUsageData = (function (_super) { + __extends(CheckWACHostUsageData, _super); + function CheckWACHostUsageData() { + return _super.call(this, "CheckWACHost") || this; + } + Object.defineProperty(CheckWACHostUsageData.prototype, "isWacKnownHost", { + get: function () { return this.Fields["isWacKnownHost"]; }, + set: function (value) { this.Fields["isWacKnownHost"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "instanceId", { + get: function () { return this.Fields["instanceId"]; }, + set: function (value) { this.Fields["instanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostType", { + get: function () { return this.Fields["hostType"]; }, + set: function (value) { this.Fields["hostType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostPlatform", { + get: function () { return this.Fields["hostPlatform"]; }, + set: function (value) { this.Fields["hostPlatform"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "wacDomain", { + get: function () { return this.Fields["wacDomain"]; }, + set: function (value) { this.Fields["wacDomain"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "isLocalStorageAvailable", { + get: function () { return this.Fields["isLocalStorageAvailable"]; }, + set: function (value) { this.Fields["isLocalStorageAvailable"] = value; }, + enumerable: true, + configurable: true + }); + CheckWACHostUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("isWacKnownHost", this.isWacKnownHost); + this.SetSerializedField("instanceId", this.instanceId); + this.SetSerializedField("hostType", this.hostType); + this.SetSerializedField("hostPlatform", this.hostPlatform); + this.SetSerializedField("wacDomain", this.wacDomain); + this.SetSerializedField("isLocalStorageAvailable", this.isLocalStorageAvailable); + }; + return CheckWACHostUsageData; + }(BaseUsageData)); + OSFLog.CheckWACHostUsageData = CheckWACHostUsageData; +})(OSFLog || (OSFLog = {})); +var Logger; +(function (Logger) { + "use strict"; + var TraceLevel; + (function (TraceLevel) { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error"; + })(TraceLevel = Logger.TraceLevel || (Logger.TraceLevel = {})); + var SendFlag; + (function (SendFlag) { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush"; + })(SendFlag = Logger.SendFlag || (Logger.SendFlag = {})); + function allowUploadingData() { + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) { + } + Logger.sendLog = sendLog; + function creatULSEndpoint() { + try { + return new ULSEndpointProxy(); + } + catch (e) { + return null; + } + } + var ULSEndpointProxy = (function () { + function ULSEndpointProxy() { + } + ULSEndpointProxy.prototype.writeLog = function (log) { + }; + ULSEndpointProxy.prototype.loadProxyFrame = function () { + }; + return ULSEndpointProxy; + }()); + if (!OSF.Logger) { + OSF.Logger = Logger; + } + Logger.ulsEndpoint = creatULSEndpoint(); +})(Logger || (Logger = {})); +var OSFAriaLogger; +(function (OSFAriaLogger) { + var TelemetryEventAppActivated = { name: "AppActivated", enabled: true, critical: true, points: [ + { name: "Browser", type: "string" }, + { name: "Message", type: "string" }, + { name: "Host", type: "string" }, + { name: "AppSizeWidth", type: "int64" }, + { name: "AppSizeHeight", type: "int64" }, + { name: "IsFromWacAutomation", type: "string" }, + { name: "IsMOS", type: "int64" }, + ] }; + var TelemetryEventScriptLoad = { name: "ScriptLoad", enabled: true, critical: false, points: [ + { name: "ScriptId", type: "string" }, + { name: "StartTime", type: "double" }, + { name: "ResponseTime", type: "double" }, + ] }; + var enableAPIUsage = shouldAPIUsageBeEnabled(); + var TelemetryEventApiUsage = { name: "APIUsage", enabled: enableAPIUsage, critical: false, points: [ + { name: "APIType", type: "string" }, + { name: "APIID", type: "int64" }, + { name: "Parameters", type: "string" }, + { name: "ResponseTime", type: "int64" }, + { name: "ErrorType", type: "int64" }, + ] }; + var TelemetryEventAppInitialization = { name: "AppInitialization", enabled: true, critical: false, points: [ + { name: "SuccessCode", type: "int64" }, + { name: "Message", type: "string" }, + ] }; + var TelemetryEventAppClosed = { name: "AppClosed", enabled: true, critical: false, points: [ + { name: "FocusTime", type: "int64" }, + { name: "AppSizeFinalWidth", type: "int64" }, + { name: "AppSizeFinalHeight", type: "int64" }, + { name: "OpenTime", type: "int64" }, + ] }; + var TelemetryEventCheckWACHost = { name: "CheckWACHost", enabled: true, critical: false, points: [ + { name: "isWacKnownHost", type: "int64" }, + { name: "solutionId", type: "string" }, + { name: "hostType", type: "string" }, + { name: "hostPlatform", type: "string" }, + { name: "correlationId", type: "string" }, + { name: "isLocalStorageAvailable", type: "boolean" }, + ] }; + var TelemetryEvents = [ + TelemetryEventAppActivated, + TelemetryEventScriptLoad, + TelemetryEventApiUsage, + TelemetryEventAppInitialization, + TelemetryEventAppClosed, + TelemetryEventCheckWACHost, + ]; + function createDataField(value, point) { + var key = point.rename === undefined ? point.name : point.rename; + var type = point.type; + var field = undefined; + switch (type) { + case "string": + field = oteljs.makeStringDataField(key, value); + break; + case "double": + if (typeof value === "string") { + value = parseFloat(value); + } + field = oteljs.makeDoubleDataField(key, value); + break; + case "int64": + if (typeof value === "string") { + value = parseInt(value); + } + field = oteljs.makeInt64DataField(key, value); + break; + case "boolean": + if (typeof value === "string") { + value = value === "true"; + } + field = oteljs.makeBooleanDataField(key, value); + break; + } + return field; + } + function getEventDefinition(eventName) { + for (var _i = 0, TelemetryEvents_1 = TelemetryEvents; _i < TelemetryEvents_1.length; _i++) { + var event_1 = TelemetryEvents_1[_i]; + if (event_1.name === eventName) { + return event_1; + } + } + return undefined; + } + function eventEnabled(eventName) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return false; + } + return eventDefinition.enabled; + } + function shouldAPIUsageBeEnabled() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function generateTelemetryEvent(eventName, telemetryData) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return undefined; + } + var dataFields = []; + for (var _i = 0, _a = eventDefinition.points; _i < _a.length; _i++) { + var point = _a[_i]; + var key = point.name; + var value = telemetryData[key]; + if (value === undefined) { + continue; + } + var field = createDataField(value, point); + if (field !== undefined) { + dataFields.push(field); + } + } + var flags = { dataCategories: oteljs.DataCategories.ProductServiceUsage }; + if (eventDefinition.critical) { + flags.samplingPolicy = oteljs.SamplingPolicy.CriticalBusinessImpact; + } + flags.diagnosticLevel = oteljs.DiagnosticLevel.NecessaryServiceDataEvent; + var eventNameFull = "Office.Extensibility.OfficeJs." + eventName + "X"; + var event = { eventName: eventNameFull, dataFields: dataFields, eventFlags: flags }; + return event; + } + function sendOtelTelemetryEvent(eventName, telemetryData) { + if (eventEnabled(eventName)) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var event = generateTelemetryEvent(eventName, telemetryData); + if (event === undefined) { + return; + } + Microsoft.Office.WebExtension.sendTelemetryEvent(event); + }); + } + } + } + var AriaLogger = (function () { + function AriaLogger() { + } + AriaLogger.prototype.getAriaCDNLocation = function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "ariatelemetry/aria-web-telemetry.js"); + }; + AriaLogger.getInstance = function () { + if (AriaLogger.AriaLoggerObj === undefined) { + AriaLogger.AriaLoggerObj = new AriaLogger(); + } + return AriaLogger.AriaLoggerObj; + }; + AriaLogger.prototype.isIUsageData = function (arg) { + return arg["Fields"] !== undefined; + }; + AriaLogger.prototype.shouldSendDirectToAria = function (flavor, version) { + var BASE10 = 10; + var MAX_VERSION_WIN32 = [16, 0, 11601]; + var MAX_VERSION_MAC = [16, 28]; + var max_version; + if (!flavor) { + return false; + } + else if (flavor.toLowerCase() === "win32") { + max_version = MAX_VERSION_WIN32; + } + else if (flavor.toLowerCase() === "mac") { + max_version = MAX_VERSION_MAC; + } + else { + return true; + } + if (!version) { + return false; + } + var versionTokens = version.split('.'); + for (var i = 0; i < max_version.length && i < versionTokens.length; i++) { + var versionToken = parseInt(versionTokens[i], BASE10); + if (isNaN(versionToken)) { + return false; + } + if (versionToken < max_version[i]) { + return true; + } + if (versionToken > max_version[i]) { + return false; + } + } + return false; + }; + AriaLogger.prototype.isDirectToAriaEnabled = function () { + if (this.EnableDirectToAria === undefined || this.EnableDirectToAria === null) { + var flavor = void 0; + var version = void 0; + if (OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo) { + flavor = OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]; + } + if (window.external && typeof window.external.GetContext !== "undefined" && typeof window.external.GetContext().GetHostFullVersion !== "undefined") { + version = window.external.GetContext().GetHostFullVersion(); + } + this.EnableDirectToAria = this.shouldSendDirectToAria(flavor, version); + } + return this.EnableDirectToAria; + }; + AriaLogger.prototype.sendTelemetry = function (tableName, telemetryData) { + var startAfterMs = 1000; + var sendAriaEnabled = AriaLogger.EnableSendingTelemetryWithLegacyAria && this.isDirectToAriaEnabled(); + if (sendAriaEnabled) { + OSF.OUtil.loadScript(this.getAriaCDNLocation(), function () { + try { + if (!this.ALogger) { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); + } + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for (var key in telemetryData) { + if (key.toLowerCase() !== "table") { + eventProperties.setProperty(key, telemetryData[key]); + } + } + var today = new Date(); + eventProperties.setProperty("Date", today.toISOString()); + this.ALogger.logEvent(eventProperties); + } + catch (e) { + } + }, startAfterMs); + } + if (AriaLogger.EnableSendingTelemetryWithOTel) { + sendOtelTelemetryEvent(tableName, telemetryData); + } + }; + AriaLogger.prototype.logData = function (data) { + if (this.isIUsageData(data)) { + this.sendTelemetry(data["Table"], data["Fields"]); + } + else { + this.sendTelemetry(data["Table"], data); + } + }; + AriaLogger.EnableSendingTelemetryWithOTel = true; + AriaLogger.EnableSendingTelemetryWithLegacyAria = false; + return AriaLogger; + }()); + OSFAriaLogger.AriaLogger = AriaLogger; +})(OSFAriaLogger || (OSFAriaLogger = {})); +var OSFAppTelemetry; +(function (OSFAppTelemetry) { + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + var privateAddinId = "PRIVATE"; + OSFAppTelemetry.enableTelemetry = true; + ; + var AppInfo = (function () { + function AppInfo() { + } + return AppInfo; + }()); + OSFAppTelemetry.AppInfo = AppInfo; + var Event = (function () { + function Event(name, handler) { + this.name = name; + this.handler = handler; + } + return Event; + }()); + var AppStorage = (function () { + function AppStorage() { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set"; + } + AppStorage.prototype.getClientId = function () { + var clientId = this.getValue(this.clientIDKey); + if (!clientId || clientId.length <= 0 || clientId.length > 40) { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey, clientId); + } + return clientId; + }; + AppStorage.prototype.saveLog = function (logId, log) { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = ((logIdSet && logIdSet.length > 0) ? (logIdSet + ";") : "") + logId; + this.setValue(this.logIdSetKey, logIdSet); + this.setValue(logId, log); + }; + AppStorage.prototype.enumerateLog = function (callback, clean) { + var logIdSet = this.getValue(this.logIdSetKey); + if (logIdSet) { + var ids = logIdSet.split(";"); + for (var id in ids) { + var logId = ids[id]; + var log = this.getValue(logId); + if (log) { + if (callback) { + callback(logId, log); + } + if (clean) { + this.remove(logId); + } + } + } + if (clean) { + this.remove(this.logIdSetKey); + } + } + }; + AppStorage.prototype.getValue = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if (osfLocalStorage) { + value = osfLocalStorage.getItem(key); + } + return value; + }; + AppStorage.prototype.setValue = function (key, value) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + osfLocalStorage.setItem(key, value); + } + }; + AppStorage.prototype.remove = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + try { + osfLocalStorage.removeItem(key); + } + catch (ex) { + } + } + }; + return AppStorage; + }()); + var AppLogger = (function () { + function AppLogger() { + } + AppLogger.prototype.LogData = function (data) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } + }; + AppLogger.prototype.LogRawData = function (log) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); + } + catch (e) { + } + }; + return AppLogger; + }()); + function trimStringToLowerCase(input) { + if (input) { + input = input.replace(/[{}]/g, "").toLowerCase(); + } + return (input || ""); + } + function initialize(context) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + if (appInfo) { + return; + } + appInfo = new AppInfo(); + if (context.get_hostFullVersion()) { + appInfo.hostVersion = context.get_hostFullVersion(); + } + else { + appInfo.hostVersion = context.get_appVersion(); + } + appInfo.appId = canSendAddinId() ? context.get_id() : privateAddinId; + appInfo.marketplaceType = context._marketplaceType; + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage()).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if (appInfo.appInstanceId) { + appInfo.appInstanceId = trimStringToLowerCase(appInfo.appInstanceId); + appInfo.appInstanceId = getCompliantAppInstanceId(context.get_id(), appInfo.appInstanceId); + } + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "0.0.0.0"; + if (context._wacHostEnvironment) { + appInfo.wacHostEnvironment = context._wacHostEnvironment; + } + if (context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) { + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + } + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if (url) { + url = url.split("?")[0].split("#")[0]; + } + appInfo.isMos = isMos(); + appInfo.appURL = ""; + (function getUserIdAndAssetIdFromToken(token, appInfo) { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try { + xmlContent = decodeURIComponent(token); + parser = new DOMParser(); + xmlDoc = parser.parseFromString(xmlContent, "text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if (cidNode && cidNode.nodeValue) { + appInfo.userId = cidNode.nodeValue; + } + else if (oidNode && oidNode.nodeValue) { + appInfo.userId = oidNode.nodeValue; + } + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue; + } + catch (e) { + } + finally { + xmlContent = null; + xmlDoc = null; + parser = null; + } + })(context.get_eToken(), appInfo); + appInfo.sessionId = sessionId; + if (typeof OTel !== "undefined") { + OTel.OTelLogger.initialize(appInfo); + } + (function handleLifecycle() { + var startTime = new Date(); + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function () { + if (document.hasFocus()) { + if (lastFocus == null) { + lastFocus = new Date(); + } + } + else if (lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + }; + var eventList = []; + eventList.push(new Event("focus", adjustFocusTime)); + eventList.push(new Event("blur", adjustFocusTime)); + eventList.push(new Event("focusout", adjustFocusTime)); + eventList.push(new Event("focusin", adjustFocusTime)); + var exitFunction = function () { + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.removeEventListener(window, eventList[i].name, eventList[i].handler); + } + eventList.length = 0; + if (!finished) { + if (document.hasFocus() && lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date()).getTime() - startTime.getTime()), focusTime); + finished = true; + } + }; + eventList.push(new Event("beforeunload", exitFunction)); + eventList.push(new Event("unload", exitFunction)); + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.addEventListener(window, eventList[i].name, eventList[i].handler); + } + adjustFocusTime(); + })(); + OSFAppTelemetry.onAppActivated(); + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() { + if (!appInfo) { + return; + } + (new AppStorage()).enumerateLog(function (id, log) { return (new AppLogger()).LogRawData(log); }, true); + var data = new OSFLog.AppActivatedUsageData(); + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = ""; + data.UserId = ""; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if (appInfo.wacHostEnvironment) { + data.WacHostEnvironment = appInfo.wacHostEnvironment; + } + if (appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) { + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + } + data.IsMOS = appInfo.isMos ? 1 : 0; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) { + var data = new OSFLog.ScriptLoadUsageData(); + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) { + if (!appInfo) { + return; + } + if (!isAllowedHost() || !isAPIUsageEnabledDispId(id, apiType)) { + return; + } + var data = new OSFLog.APIUsageUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCallDone = onCallDone; + ; + function onMethodDone(id, args, msResponseTime, errorType) { + var parameters = null; + if (args) { + if (typeof args == "number") { + parameters = String(args); + } + else if (typeof args === "object") { + for (var index in args) { + if (parameters !== null) { + parameters += ","; + } + else { + parameters = ""; + } + if (typeof args[index] == "number") { + parameters += String(args[index]); + } + } + } + else { + parameters = ""; + } + } + OSF.AppTelemetry.onCallDone("method", id, parameters, msResponseTime, errorType); + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) { + OSF.AppTelemetry.onCallDone("property", -1, propertyName, msResponseTime); + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onCheckWACHost(isWacKnownHost, instanceId, hostType, hostPlatform, wacDomain, isLocalStorageAvailable) { + var data = new OSFLog.CheckWACHostUsageData(); + data.isWacKnownHost = isWacKnownHost; + data.instanceId = instanceId; + data.hostType = hostType; + data.hostPlatform = hostPlatform; + data.isLocalStorageAvailable = isLocalStorageAvailable; + data.wacDomain = ""; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCheckWACHost = onCheckWACHost; + function onEventDone(id, errorType) { + OSF.AppTelemetry.onCallDone("event", id, null, 0, errorType); + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent", id, null, msResponseTime, errorType); + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) { + if (!appInfo) { + return; + } + var data = new OSFLog.AppClosedUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage()).saveLog(sessionId, data.SerializeRow()); + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId); + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) { + var data = new OSFLog.AppInitializationUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) { + doAppInitializationLogging(false, message); + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) { + doAppInitializationLogging(true, errorMessage); + } + OSFAppTelemetry.logAppException = logAppException; + function isAllowedHost() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function isAPIUsageEnabledDispId(dispId, apiType) { + if (apiType === "method") { + switch (dispId) { + case 4: + case 38: + case 37: + case 10: + case 12: + case -10: + return true; + default: + return false; + } + } + return false; + } + function canSendAddinId() { + var isPublic = (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.PublicAddin) != 0; + if (isPublic) { + return isPublic; + } + if (!appInfo) { + return false; + } + var hostPlatform = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + var hostVersion = appInfo.hostVersion; + return _isComplianceExceptedHost(hostPlatform, hostVersion); + } + OSFAppTelemetry.canSendAddinId = canSendAddinId; + function getCompliantAppInstanceId(addinId, appInstanceId) { + if (!canSendAddinId() && appInstanceId === addinId) { + return privateAddinId; + } + return appInstanceId; + } + OSFAppTelemetry.getCompliantAppInstanceId = getCompliantAppInstanceId; + function _isComplianceExceptedHost(hostPlatform, hostVersion) { + var excepted = false; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(hostVersion); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (hostPlatform == "win32") { + if (major < 16 || major == 16 && build < 14225) { + excepted = true; + } + } + else if (hostPlatform == "mac") { + if (major < 16 || (major == 16 && (minor < 52 || minor == 52 && build < 808))) { + excepted = true; + } + } + } + return excepted; + } + OSFAppTelemetry._isComplianceExceptedHost = _isComplianceExceptedHost; + function isMos() { + return (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.IsMos) != 0; + } + OSFAppTelemetry.isMos = isMos; + OSF.AppTelemetry = OSFAppTelemetry; +})(OSFAppTelemetry || (OSFAppTelemetry = {})); +var OSFPerfUtil; +(function (OSFPerfUtil) { + function prepareDataFieldsForOtel(resource, name) { + name = name + "_Resource"; + if (oteljs !== undefined) { + return [ + oteljs.makeDoubleDataField(name + "_responseEnd", resource.responseEnd), + oteljs.makeDoubleDataField(name + "_responseStart", resource.responseStart), + oteljs.makeDoubleDataField(name + "_startTime", resource.startTime), + oteljs.makeDoubleDataField(name + "_transferSize", resource.transferSize) + ]; + } + } + function sendPerformanceTelemetry() { + if (typeof OTel !== "undefined" && OSF.AppTelemetry.enableTelemetry && typeof OSFPerformance !== "undefined" && typeof (performance) != "undefined" && performance.getEntriesByType) { + var hostPerfResource_1; + var officePerfResource_1; + var resources = performance.getEntriesByType("resource"); + resources.forEach(function (resource) { + var resourceName = resource.name.toLowerCase(); + if (OSF.OUtil.stringEndsWith(resourceName, OSFPerformance.hostSpecificFileName)) { + hostPerfResource_1 = resource; + } + else if (OSF.OUtil.stringEndsWith(resourceName, OSF.ConstantNames.OfficeDebugJS) || + OSF.OUtil.stringEndsWith(resourceName, OSF.ConstantNames.OfficeJS)) { + officePerfResource_1 = resource; + } + }); + OTel.OTelLogger.onTelemetryLoaded(function () { + var dataFields = prepareDataFieldsForOtel(hostPerfResource_1, "HostJs"); + dataFields = dataFields.concat(prepareDataFieldsForOtel(officePerfResource_1, "OfficeJs")); + dataFields = dataFields.concat([ + oteljs.makeDoubleDataField("officeExecuteStartDate", OSFPerformance.officeExecuteStartDate), + oteljs.makeDoubleDataField("officeExecuteStart", OSFPerformance.officeExecuteStart), + oteljs.makeDoubleDataField("officeExecuteEnd", OSFPerformance.officeExecuteEnd), + oteljs.makeDoubleDataField("hostInitializationStart", OSFPerformance.hostInitializationStart), + oteljs.makeDoubleDataField("hostInitializationEnd", OSFPerformance.hostInitializationEnd), + oteljs.makeDoubleDataField("totalJSHeapSize", OSFPerformance.totalJSHeapSize), + oteljs.makeDoubleDataField("usedJSHeapSize", OSFPerformance.usedJSHeapSize), + oteljs.makeDoubleDataField("jsHeapSizeLimit", OSFPerformance.jsHeapSizeLimit), + oteljs.makeDoubleDataField("getAppContextStart", OSFPerformance.getAppContextStart), + oteljs.makeDoubleDataField("getAppContextEnd", OSFPerformance.getAppContextEnd), + oteljs.makeDoubleDataField("createOMEnd", OSFPerformance.createOMEnd), + oteljs.makeDoubleDataField("officeOnReady", OSFPerformance.officeOnReady), + oteljs.makeBooleanDataField("isSharedRuntime", (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.SharedApp) !== 0) + ]); + Microsoft.Office.WebExtension.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.JSPerformanceTelemetryV06", + dataFields: dataFields, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage, + diagnosticLevel: oteljs.DiagnosticLevel.NecessaryServiceDataEvent + } + }); + }); + } + } + OSFPerfUtil.sendPerformanceTelemetry = sendPerformanceTelemetry; +})(OSFPerfUtil || (OSFPerfUtil = {})); +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } + } +}; +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() { + var events = []; + for (var eventName in this._eventHandlers) + events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); + return events; + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) { + for (var eventName in this._eventHandlers) { + if (event == eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event == eventName) + return true; + } + return false; + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) + return true; + } + } + return false; + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._eventHandlers[eventType]; + if (handlers && !this.hasEventHandler(eventType, handler)) { + handlers.push(handler); + return true; + } + else { + return false; + } + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true; + } + return false; + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType, handler); + if (isFirstHandler && succeed) { + this.fireQueuedEvent(eventType); + } + return succeed; + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var index = 0; index < handlers.length; index++) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + return true; + } + } + } + return false; + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { + if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { + this._eventHandlers[eventType] = []; + return true; + } + return false; + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) { + this._objectEventHandlers[eventType][objectId] = []; + return true; + } + return false; + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } + return true; + } + else { + return false; + } + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if (_handlers != null) { + for (var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length == 0) { + queuedEvents.push(eventArgs); + } + else { + this.fireEvent(eventArgs); + } + return true; + } + else { + return false; + } + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length > 0) { + var eventHandler = eventHandlers[0]; + while (queuedEvents.length > 0) { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs); + } + return true; + } + } + return false; + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var queuedEvents = this._queuedEventsArgs[eventType]; + if (queuedEvents) { + this._queuedEventsArgs[eventType] = []; + } + } + } +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { + var args; + switch (eventType) { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties, target.document), eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties, target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" && OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + OSF.DDA.convertOlkAppointmentTimeToDateFormat(args); + } + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecurrenceChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecurrenceChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AttachmentsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAttachmentsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.InfobarClicked: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkInfobarClickedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSelectedItemsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSensitivityLabelChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + return args; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + "types": ["function", "object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [] +}); +OSF.DialogShownStatus = { hasDialogShown: false, isWindowDialog: false }; +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogMessageReceivedEvent: "DialogMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + MessageType: "messageType", + MessageContent: "messageContent", + MessageOrigin: "messageOrigin" +}); +OSF.DDA.DialogEventType = {}; +OSF.OUtil.augmentList(OSF.DDA.DialogEventType, { + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" +}); +OSF.DDA.AsyncMethodNames.addNames({ + DisplayDialogAsync: "displayDialogAsync", + DisplayModalDialogAsync: "displayModalDialogAsync", + CloseAsync: "close" +}); +OSF.DDA.SyncMethodNames.addNames({ + MessageParent: "messageParent", + MessageChild: "messageChild", + SendMessage: "sendMessage", + AddMessageHandler: "addEventHandler" +}); +OSF.DDA.UI.ParentUI = function OSF_DDA_ParentUI() { + var eventDispatch; + if (Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived != null) { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived, + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + ]); + } + else { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived + ]); + } + var target = this; + var defineDialogApi = function (apiName, isModalApi) { + if (!target[apiName]) { + OSF.OUtil.defineEnumerableProperty(target, apiName, { + value: function () { + var openDialog = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments, eventDispatch, target, isModalApi); + } + }); + } + }; + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName, false); + if (Microsoft.Office.WebExtension.FeatureGates["ModalWebDialogAPI"]) { + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName, true); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DDA.UI.ChildUI = function OSF_DDA_ChildUI(isPopupWindow) { + var messageParentName = OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target = this; + if (!target[messageParentName]) { + OSF.OUtil.defineEnumerableProperty(target, messageParentName, { + value: function () { + var messageParent = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments, target); + } + }); + } + var addEventHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if (!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch != "undefined") { + OSF.DDA.DispIdHost.addEventSupport(target, OSF.DialogParentMessageEventDispatch, isPopupWindow); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DialogHandler = function OSF_DialogHandler() { }; +OSF.DDA.DialogEventArgs = function OSF_DDA_DialogEventArgs(message) { + if (message[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogMessageReceived) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); + } + else { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogEventReceived + }, + "error": { + value: message[OSF.DDA.PropertyDescriptors.MessageType] + } + }); + } +}; +OSF.DDA.DialogParentEventArgs = function OSF_DDA_DialogParentEventArgs(message) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); +}; +var DialogApiManager = (function () { + function DialogApiManager() { + } + DialogApiManager.defineApi = function (apiName, supportedOptions) { + var asyncMethodCalls = OSF.DDA.AsyncMethodCalls; + asyncMethodCalls.define({ + method: apiName, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: supportedOptions, + privateStateCallbacks: [], + onSucceeded: function (args, caller, callArgs) { + var targetId = args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch = args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog = new OSF.DialogHandler(); + var closeDialog = OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, closeDialog, { + value: function () { + var closeDialogfunction = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments, targetId, eventDispatch, dialog); + } + }); + var addHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, addHandler, { + value: function () { + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(arguments, dialog, eventDispatch); + var eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType, handler); + } + }); + if (OSF.DDA.UI.EnableSendMessageDialogAPI === true) { + var sendMessage = OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, sendMessage, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var messageChild = OSF.DDA.SyncMethodNames.MessageChild.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, messageChild, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + return dialog; + }, + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs] = true; + } + return callArgs; + } + }); + }; + DialogApiManager.messageChildRichApiBridge = function () { + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, null, null); + } + }; + DialogApiManager.initOnce = function () { + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync, DialogApiManager.displayDialogAsyncApiSupportedOptions); + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync, DialogApiManager.displayModalDialogAsyncApiSupportedOptions); + }; + DialogApiManager.displayDialogAsyncApiSupportedOptions = [ + { + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.EnforceAppDomain, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]; + DialogApiManager.displayModalDialogAsyncApiSupportedOptions = DialogApiManager.displayDialogAsyncApiSupportedOptions.concat([ + { + name: "abortWhenParentIsMinimized", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: "abortWhenDocIsInactive", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]); + return DialogApiManager; +}()); +DialogApiManager.initOnce(); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageToParent, + "types": ["string", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageContent, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.openDialog = function OSF_DDA_SafeArray_Delegate$OpenDialog(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + OSF.ClientHostController.openDialog(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.closeDialog = function OSF_DDA_SafeArray_Delegate$CloseDialog(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.closeDialog(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.messageParent = function OSF_DDA_SafeArray_Delegate$MessageParent(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime = (new Date()).getTime(); + var result = OSF.ClientHostController.messageParent(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), result); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: 1 }, + { name: OSF.DDA.PropertyDescriptors.MessageOrigin, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.sendMessage = function OSF_DDA_SafeArray_Delegate$SendMessage(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime = (new Date()).getTime(); + var result = OSF.ClientHostController.sendMessage(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogParentMessageReceivedEvent: "DialogParentMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogParentMessageReceived: "dialogParentMessageReceived", + DialogParentEventReceived: "dialogParentEventReceived" +}); +OSF.DialogParentMessageEventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogParentEventReceived +]); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: 1 }, + { name: OSF.DDA.PropertyDescriptors.MessageOrigin, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.UI.EnableMessageChildDialogAPI = true; +Microsoft.Office.WebExtension.TableData = function Microsoft_Office_WebExtension_TableData(rows, headers) { + function fixData(data) { + if (data == null || data == undefined) { + return null; + } + try { + for (var dim = OSF.DDA.DataCoercion.findArrayDimensionality(data, 2); dim < 2; dim++) { + data = [data]; + } + return data; + } + catch (ex) { + } + } + ; + OSF.OUtil.defineEnumerableProperties(this, { + "headers": { + get: function () { return headers; }, + set: function (value) { + headers = fixData(value); + } + }, + "rows": { + get: function () { return rows; }, + set: function (value) { + rows = (value == null || (OSF.OUtil.isArray(value) && (value.length == 0))) ? + [] : + fixData(value); + } + } + }); + this.headers = headers; + this.rows = rows; +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureTableData = function OSF_DDA_OMFactory$manufactureTableData(tableDataProperties) { + return new Microsoft.Office.WebExtension.TableData(tableDataProperties[OSF.DDA.TableDataProperties.TableRows], tableDataProperties[OSF.DDA.TableDataProperties.TableHeaders]); +}; +Microsoft.Office.WebExtension.CoercionType = { + Text: "text", + Matrix: "matrix", + Table: "table" +}; +OSF.DDA.DataCoercion = (function OSF_DDA_DataCoercion() { + return { + findArrayDimensionality: function OSF_DDA_DataCoercion$findArrayDimensionality(obj) { + if (OSF.OUtil.isArray(obj)) { + var dim = 0; + for (var index = 0; index < obj.length; index++) { + dim = Math.max(dim, OSF.DDA.DataCoercion.findArrayDimensionality(obj[index])); + } + return dim + 1; + } + else { + return 0; + } + }, + getCoercionDefaultForBinding: function OSF_DDA_DataCoercion$getCoercionDefaultForBinding(bindingType) { + switch (bindingType) { + case Microsoft.Office.WebExtension.BindingType.Matrix: return Microsoft.Office.WebExtension.CoercionType.Matrix; + case Microsoft.Office.WebExtension.BindingType.Table: return Microsoft.Office.WebExtension.CoercionType.Table; + case Microsoft.Office.WebExtension.BindingType.Text: + default: + return Microsoft.Office.WebExtension.CoercionType.Text; + } + }, + getBindingDefaultForCoercion: function OSF_DDA_DataCoercion$getBindingDefaultForCoercion(coercionType) { + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Matrix: return Microsoft.Office.WebExtension.BindingType.Matrix; + case Microsoft.Office.WebExtension.CoercionType.Table: return Microsoft.Office.WebExtension.BindingType.Table; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + return Microsoft.Office.WebExtension.BindingType.Text; + } + }, + determineCoercionType: function OSF_DDA_DataCoercion$determineCoercionType(data) { + if (data == null || data == undefined) + return null; + var sourceType = null; + var runtimeType = typeof data; + if (data.rows !== undefined) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Table; + } + else if (OSF.OUtil.isArray(data)) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Matrix; + } + else if (runtimeType == "string" || runtimeType == "number" || runtimeType == "boolean" || OSF.OUtil.isDate(data)) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Text; + } + else { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject; + } + return sourceType; + }, + coerceData: function OSF_DDA_DataCoercion$coerceData(data, destinationType, sourceType) { + sourceType = sourceType || OSF.DDA.DataCoercion.determineCoercionType(data); + if (sourceType && sourceType != destinationType) { + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin); + data = OSF.DDA.DataCoercion._coerceDataFromTable(destinationType, OSF.DDA.DataCoercion._coerceDataToTable(data, sourceType)); + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd); + } + return data; + }, + _matrixToText: function OSF_DDA_DataCoercion$_matrixToText(matrix) { + if (matrix.length == 1 && matrix[0].length == 1) + return "" + matrix[0][0]; + var val = ""; + for (var i = 0; i < matrix.length; i++) { + val += matrix[i].join("\t") + "\n"; + } + return val.substring(0, val.length - 1); + }, + _textToMatrix: function OSF_DDA_DataCoercion$_textToMatrix(text) { + var ret = text.split("\n"); + for (var i = 0; i < ret.length; i++) + ret[i] = ret[i].split("\t"); + return ret; + }, + _tableToText: function OSF_DDA_DataCoercion$_tableToText(table) { + var headers = ""; + if (table.headers != null) { + headers = OSF.DDA.DataCoercion._matrixToText([table.headers]) + "\n"; + } + var rows = OSF.DDA.DataCoercion._matrixToText(table.rows); + if (rows == "") { + headers = headers.substring(0, headers.length - 1); + } + return headers + rows; + }, + _tableToMatrix: function OSF_DDA_DataCoercion$_tableToMatrix(table) { + var matrix = table.rows; + if (table.headers != null) { + matrix.unshift(table.headers); + } + return matrix; + }, + _coerceDataFromTable: function OSF_DDA_DataCoercion$_coerceDataFromTable(coercionType, table) { + var value; + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value = table; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value = OSF.DDA.DataCoercion._tableToMatrix(table); + break; + case Microsoft.Office.WebExtension.CoercionType.SlideRange: + value = null; + if (OSF.DDA.OMFactory.manufactureSlideRange) { + value = OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(table)); + } + if (value == null) { + value = OSF.DDA.DataCoercion._tableToText(table); + } + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value = OSF.DDA.DataCoercion._tableToText(table); + break; + } + return value; + }, + _coerceDataToTable: function OSF_DDA_DataCoercion$_coerceDataToTable(data, sourceType) { + if (sourceType == undefined) { + sourceType = OSF.DDA.DataCoercion.determineCoercionType(data); + } + var value; + switch (sourceType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value = data; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value = new Microsoft.Office.WebExtension.TableData(data); + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value = new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(data)); + break; + } + return value; + } + }; +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.CoercionType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.CoercionType.Table, value: 2 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + GetSelectedDataAsync: "getSelectedDataAsync", + SetSelectedDataAsync: "setSelectedDataAsync" +}); +(function () { + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] != undefined || data[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) { + data = OSF.DDA.OMFactory.manufactureTableData(data); + } + data = OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data == undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CoercionType, + "enum": Microsoft.Office.WebExtension.CoercionType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + } + ], + privateStateCallbacks: [], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageLeft, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageTop, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetSelectedDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageLeft, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageTop, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageWidth, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageHeight, value: 5 }, + ] +}); +OSF.DDA.SettingsManager = { + SerializedSettings: "serializedSettings", + RefreshingSettings: "refreshingSettings", + DateJSONPrefix: "Date(", + DataJSONSuffix: ")", + serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { + return OSF.OUtil.serializeSettings(settingsCollection); + }, + deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { + return OSF.OUtil.deserializeSettings(serializedSettings); + } +}; +OSF.DDA.Settings = function OSF_DDA_Settings(settings) { + settings = settings || {}; + var cacheSessionSettings = function (settings) { + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var serializedSettings = OSF.DDA.SettingsManager.serializeSettings(settings); + var storageSettings = JSON ? JSON.stringify(serializedSettings) : Sys.Serialization.JavaScriptSerializer.serialize(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + }; + OSF.OUtil.defineEnumerableProperties(this, { + "get": { + value: function OSF_DDA_Settings$get(name) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + var setting = settings[name]; + return typeof (setting) === 'undefined' ? null : setting; + } + }, + "set": { + value: function OSF_DDA_Settings$set(name, value) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false }, + { name: "value", mayBeNull: true } + ]); + if (e) + throw e; + settings[name] = value; + cacheSessionSettings(settings); + } + }, + "remove": { + value: function OSF_DDA_Settings$remove(name) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete settings[name]; + cacheSessionSettings(settings); + } + } + }); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.SaveAsync], settings); +}; +OSF.DDA.RefreshableSettings = function OSF_DDA_RefreshableSettings(settings) { + OSF.DDA.RefreshableSettings.uber.constructor.call(this, settings); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.RefreshAsync], settings); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged])); +}; +OSF.OUtil.extend(OSF.DDA.RefreshableSettings, OSF.DDA.Settings); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + SettingsChanged: "settingsChanged" +}); +OSF.DDA.SettingsChangedEventArgs = function OSF_DDA_SettingsChangedEventArgs(settingsInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.SettingsChanged + }, + "settings": { + value: settingsInstance + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ + RefreshAsync: "refreshAsync", + SaveAsync: "saveAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RefreshAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.RefreshingSettings, + value: function getRefreshingSettings(settingsInstance, settingsCollection) { + return settingsCollection; + } + } + ], + onSucceeded: function deserializeSettings(serializedSettingsDescriptor, refreshingSettings, refreshingSettingsArgs) { + var serializedSettings = serializedSettingsDescriptor[OSF.DDA.SettingsManager.SerializedSettings]; + var newSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + var oldSettings = refreshingSettingsArgs[OSF.DDA.SettingsManager.RefreshingSettings]; + for (var setting in oldSettings) { + refreshingSettings.remove(setting); + } + for (var setting in newSettings) { + refreshingSettings.set(setting, newSettings[setting]); + } + return refreshingSettings; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SaveAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, + value: { + "types": ["boolean"], + "defaultValue": true + } + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.SerializedSettings, + value: function serializeSettings(settingsInstance, settingsCollection) { + return OSF.DDA.SettingsManager.serializeSettings(settingsCollection); + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidLoadSettingsMethod, + fromHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSaveSettingsMethod, + toHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SettingsManager.SerializedSettings }, + { name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, value: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidSettingsChangedEvent }); +OSF.DDA.AsyncMethodNames.addNames({ + GetOfficeThemeAsync: "getOfficeThemeAsync", + GetDocumentThemeAsync: "getDocumentThemeAsync" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + OfficeThemeChanged: "officeThemeChanged", + DocumentThemeChanged: "documentThemeChanged" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.Parameters, { + DocumentTheme: "documentTheme", + OfficeTheme: "officeTheme" +}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DocumentThemeChangedEvent: "DocumentThemeChangedEvent", + OfficeThemeChangedEvent: "OfficeThemeChangedEvent" +}); +OSF.OUtil.setNamespace("Theming", OSF.DDA); +OSF.DDA.Theming.OfficeThemeEnum = { + BodyForegroundColor: "bodyForegroundColor", + BodyBackgroundColor: "bodyBackgroundColor", + ControlForegroundColor: "controlForegroundColor", + ControlBackgroundColor: "controlBackgroundColor", + ThemeId: "themeId", + IsDarkTheme: "isDarkTheme" +}; +OSF.DDA.Theming.OfficeThemeEnumWac = { + PrimaryFontColor: "primaryFontColor", + PrimaryBackgroundColor: "primaryBackgroundColor", + SecondaryFontColor: "secondaryFontColor", + SecondaryBackgroundColor: "secondaryBackgroundColor", + IsDarkTheme: "isDarkTheme" +}; +OSF.DDA.Theming.DocumentThemeEnum = { + PrimaryFontColor: "primaryFontColor", + PrimaryBackgroundColor: "primaryBackgroundColor", + SecondaryFontColor: "secondaryFontColor", + SecondaryBackgroundColor: "secondaryBackgroundColor", + Accent1: "accent1", + Accent2: "accent2", + Accent3: "accent3", + Accent4: "accent4", + Accent5: "accent5", + Accent6: "accent6", + Hyperlink: "hyperlink", + FollowedHyperlink: "followedHyperlink", + HeaderLatinFont: "headerLatinFont", + HeaderEastAsianFont: "headerEastAsianFont", + HeaderScriptFont: "headerScriptFont", + HeaderLocalizedFont: "headerLocalizedFont", + BodyLatinFont: "bodyLatinFont", + BodyEastAsianFont: "bodyEastAsianFont", + BodyScriptFont: "bodyScriptFont", + BodyLocalizedFont: "bodyLocalizedFont" +}; +OSF.DDA.Theming.GetIsDarkThemeFromCSSHexColor = function OSF_DDA_Theming_GetIsDarkThemeFromCSSHexColor(themeColor) { + var color = themeColor.charAt(0) === "#" ? themeColor.substring(1, 7) : themeColor; + var r = parseInt(color.substring(0, 2), 16); + var g = parseInt(color.substring(2, 4), 16); + var b = parseInt(color.substring(4, 6), 16); + var fIsDarkTheme = r * 0.299 + g * 0.587 + b * 0.114 < 186 ? true : false; + return fIsDarkTheme; +}; +OSF.DDA.Theming.ConvertToDocumentTheme = function OSF_DDA_Theming_ConvertToDocumentTheme(response) { + var mappingDocumentTheme = [ + { name: "primaryFontColor", needToConvertToHex: true }, + { name: "primaryBackgroundColor", needToConvertToHex: true }, + { name: "secondaryFontColor", needToConvertToHex: true }, + { name: "secondaryBackgroundColor", needToConvertToHex: true }, + { name: "accent1", needToConvertToHex: true }, + { name: "accent2", needToConvertToHex: true }, + { name: "accent3", needToConvertToHex: true }, + { name: "accent4", needToConvertToHex: true }, + { name: "accent5", needToConvertToHex: true }, + { name: "accent6", needToConvertToHex: true }, + { name: "hyperlink", needToConvertToHex: true }, + { name: "followedHyperlink", needToConvertToHex: true }, + { name: "headerLatinFont", needToConvertToHex: false }, + { name: "headerEastAsianFont", needToConvertToHex: false }, + { name: "headerScriptFont", needToConvertToHex: false }, + { name: "headerLocalizedFont", needToConvertToHex: false }, + { name: "bodyLatinFont", needToConvertToHex: false }, + { name: "bodyEastAsianFont", needToConvertToHex: false }, + { name: "bodyScriptFont", needToConvertToHex: false }, + { name: "bodyLocalizedFont", needToConvertToHex: false } + ]; + var result = {}; + for (var i = 0; i < mappingDocumentTheme.length; i++) { + if (mappingDocumentTheme[i].needToConvertToHex) { + result[mappingDocumentTheme[i].name] = OSF.OUtil.convertIntToCssHexColor(response[mappingDocumentTheme[i].name]); + } + else { + result[mappingDocumentTheme[i].name] = response[mappingDocumentTheme[i].name]; + } + } + return result; +}; +OSF.DDA.Theming.ConvertToOfficeTheme = function OSF_DDA_Theming_ConvertToOfficeTheme(response) { + var officeThemeInfo = {}; + if (response) { + var themeKeys = OSF.DDA.Theming.OfficeThemeEnum; + var themeNameMapping = { + bodyBackgroundColor: { name: themeKeys.BodyBackgroundColor, convertToHex: true }, + bodyForegroundColor: { name: themeKeys.BodyForegroundColor, convertToHex: true }, + controlBackgroundColor: { name: themeKeys.ControlBackgroundColor, convertToHex: true }, + controlForegroundColor: { name: themeKeys.ControlForegroundColor, convertToHex: true }, + primaryFontColor: { name: themeKeys.BodyForegroundColor, convertToHex: true }, + primaryBackgroundColor: { name: themeKeys.BodyBackgroundColor, convertToHex: true }, + secondaryFontColor: { name: themeKeys.ControlBackgroundColor, convertToHex: true }, + secondaryBackgroundColor: { name: themeKeys.ControlForegroundColor, convertToHex: true } + }; + for (var srcThemePropName in response) { + var fNeedToConvertToCSSHex = false; + var targetThemePropName = srcThemePropName; + if (themeNameMapping[srcThemePropName]) { + targetThemePropName = themeNameMapping[srcThemePropName].name; + fNeedToConvertToCSSHex = themeNameMapping[srcThemePropName].convertToHex; + } + officeThemeInfo[targetThemePropName] = fNeedToConvertToCSSHex ? OSF.OUtil.convertIntToCssHexColor(response[srcThemePropName]) : response[srcThemePropName]; + } + if (officeThemeInfo[themeKeys.IsDarkTheme] == undefined) { + officeThemeInfo[themeKeys.IsDarkTheme] = OSF.DDA.Theming.GetIsDarkThemeFromCSSHexColor(officeThemeInfo[themeKeys.BodyBackgroundColor]); + } + } + return officeThemeInfo; +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: OSF.DDA.Theming.ConvertToDocumentTheme +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: OSF.DDA.Theming.ConvertToOfficeTheme +}); +OSF.DDA.Theming.OfficeThemeChangedEventArgs = function OSF_DDA_Theming_OfficeThemeChangedEventArgs(officeThemeData) { + var ret = null; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web") { + ret = officeThemeData; + } + else { + ret = OSF.DDA.Theming.ConvertToOfficeTheme(officeThemeData); + } + ret.isDarkTheme = OSF.DDA.Theming.GetIsDarkThemeFromCSSHexColor(ret.bodyBackgroundColor); + if ((hostInfo.hostPlatform.toLowerCase() == "web") || + (hostInfo.hostPlatform.toLowerCase() == "mac") || + (hostInfo.hostPlatform.toLowerCase() == "ios")) { + var context = OSF._OfficeAppFactory.getContext(); + if (context && context.officeTheme) { + context.officeTheme.bodyBackgroundColor = ret.bodyBackgroundColor; + context.officeTheme.bodyForegroundColor = ret.bodyForegroundColor; + context.officeTheme.controlBackgroundColor = ret.controlBackgroundColor; + context.officeTheme.controlBackgroundColor = ret.controlBackgroundColor; + context.officeTheme.isDarkTheme = ret.isDarkTheme; + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.OfficeThemeChanged + }, + "officeTheme": { + value: ret + } + }); +}; +OSF.DDA.Theming.DocumentThemeChangedEventArgs = function OSF_DDA_Theming_DocumentThemeChangedEventArgs(documentTheme) { + var ret = OSF.DDA.Theming.ConvertToDocumentTheme(documentTheme); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DocumentThemeChanged + }, + "documentTheme": { + value: ret + } + }); +}; +var OSF_DDA_Theming_InternalThemeHandler = (function () { + function OSF_DDA_Theming_InternalThemeHandler() { + this._pseudoDocumentObject = null; + this._eventTarget = null; + this._previousDocumentThemeData = null; + this._previousOfficeThemeData = null; + this._officeCss = null; + this._asyncCallsCompleted = null; + this._isPublicThemeManager = false; + this._onAsyncCallsCompleted = null; + } + OSF_DDA_Theming_InternalThemeHandler.prototype.InitializeThemeManager = function () { + this._isPublicThemeManager = true; + this._eventTarget = this; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync, + OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.OfficeThemeChanged, + Microsoft.Office.WebExtension.EventType.DocumentThemeChanged + ])); + }; + OSF_DDA_Theming_InternalThemeHandler.prototype.InitializeAndChangeOnce = function (callback) { + this._officeCss = this._getOfficeThemesCss(); + if (!this._officeCss) { + if (callback) { + callback(); + } + return; + } + this._onAsyncCallsCompleted = callback; + this._pseudoDocumentObject = {}; + var pseudoDoc = this._pseudoDocumentObject; + if (!this._isPublicThemeManager) { + OSF.DDA.DispIdHost.addAsyncMethods(pseudoDoc, [ + OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync, + OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(pseudoDoc, new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.OfficeThemeChanged, + Microsoft.Office.WebExtension.EventType.DocumentThemeChanged + ])); + } + this._asyncCallsCompleted = {}; + this._asyncCallsCompleted[OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync] = false; + this._asyncCallsCompleted[OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync] = false; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (this._isPublicThemeManager) { + if (hostInfo && (hostInfo.hostType.toLowerCase() != Microsoft.Office.WebExtension.HostType.Word.toLowerCase())) { + this._getAndProcessThemeData(this._eventTarget.getDocumentThemeAsync, Function.createDelegate(this, this._processDocumentThemeData), OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync); + } + this._getAndProcessThemeData(this._eventTarget.getOfficeThemeAsync, Function.createDelegate(this, this._processOfficeThemeData), OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync); + } + else { + if (hostInfo && (hostInfo.hostType.toLowerCase() != Microsoft.Office.WebExtension.HostType.Word.toLowerCase())) { + this._getAndProcessThemeData(pseudoDoc.getDocumentThemeAsync, Function.createDelegate(this, this._processDocumentThemeData), OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync); + } + this._getAndProcessThemeData(pseudoDoc.getOfficeThemeAsync, Function.createDelegate(this, this._processOfficeThemeData), OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync); + } + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._getOfficeThemesCss = function () { + function getOfficeThemesCssInternal() { + var cssFileName = "officethemes.css"; + for (var i = 0; i < document.styleSheets.length; i++) { + var ss = document.styleSheets[i]; + if (!ss.disabled + && ss.href + && cssFileName == ss.href.substring(ss.href.length - cssFileName.length, ss.href.length).toLowerCase()) { + if ((!ss.cssRules) && (!ss.rules)) { + return null; + } + else { + return ss; + } + } + } + } + try { + return getOfficeThemesCssInternal(); + } + catch (e) { + return null; + } + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._changeCss = function (officeCss, selector, newRule) { + var length = officeCss.cssRules ? officeCss.cssRules.length : officeCss.rules.length; + for (var i = 0; i < length; i++) { + var rule; + if (officeCss.cssRules) { + rule = officeCss.cssRules[i]; + } + else { + rule = officeCss.rules[i]; + } + var ruleSelector = rule.selectorText; + if (ruleSelector && ruleSelector.toLowerCase() == selector.toLowerCase()) { + if (officeCss.cssRules) { + officeCss.deleteRule(i); + officeCss.insertRule(ruleSelector + newRule, i); + } + else { + officeCss.removeRule(i); + officeCss.addRule(ruleSelector, newRule, i); + } + } + } + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._changeDocumentThemeData = function (data) { + var documentThemeCssMapping = [ + { name: "primaryFontColor", cssSelector: ".office-docTheme-primary-fontColor", cssProperty: "color" }, + { name: "primaryBackgroundColor", cssSelector: ".office-docTheme-primary-bgColor", cssProperty: "background-color" }, + { name: "secondaryFontColor", cssSelector: ".office-docTheme-secondary-fontColor", cssProperty: "color" }, + { name: "secondaryBackgroundColor", cssSelector: ".office-docTheme-secondary-bgColor", cssProperty: "background-color" }, + { name: "accent1", cssSelector: ".office-contentAccent1-color", cssProperty: "color" }, + { name: "accent2", cssSelector: ".office-contentAccent2-color", cssProperty: "color" }, + { name: "accent3", cssSelector: ".office-contentAccent3-color", cssProperty: "color" }, + { name: "accent4", cssSelector: ".office-contentAccent4-color", cssProperty: "color" }, + { name: "accent5", cssSelector: ".office-contentAccent5-color", cssProperty: "color" }, + { name: "accent6", cssSelector: ".office-contentAccent6-color", cssProperty: "color" }, + { name: "accent1", cssSelector: ".office-contentAccent1-bgColor", cssProperty: "background-color" }, + { name: "accent2", cssSelector: ".office-contentAccent2-bgColor", cssProperty: "background-color" }, + { name: "accent3", cssSelector: ".office-contentAccent3-bgColor", cssProperty: "background-color" }, + { name: "accent4", cssSelector: ".office-contentAccent4-bgColor", cssProperty: "background-color" }, + { name: "accent5", cssSelector: ".office-contentAccent5-bgColor", cssProperty: "background-color" }, + { name: "accent6", cssSelector: ".office-contentAccent6-bgColor", cssProperty: "background-color" }, + { name: "accent1", cssSelector: ".office-contentAccent1-borderColor", cssProperty: "border-color" }, + { name: "accent2", cssSelector: ".office-contentAccent2-borderColor", cssProperty: "border-color" }, + { name: "accent3", cssSelector: ".office-contentAccent3-borderColor", cssProperty: "border-color" }, + { name: "accent4", cssSelector: ".office-contentAccent4-borderColor", cssProperty: "border-color" }, + { name: "accent5", cssSelector: ".office-contentAccent5-borderColor", cssProperty: "border-color" }, + { name: "accent6", cssSelector: ".office-contentAccent6-borderColor", cssProperty: "border-color" }, + { name: "hyperlink", cssSelector: ".office-a", cssProperty: "color" }, + { name: "followedHyperlink", cssSelector: ".office-a:visited", cssProperty: "color" }, + { name: "headerLatinFont", cssSelector: ".office-headerFont-latin", cssProperty: "font-family" }, + { name: "headerEastAsianFont", cssSelector: ".office-headerFont-eastAsian", cssProperty: "font-family" }, + { name: "headerScriptFont", cssSelector: ".office-headerFont-script", cssProperty: "font-family" }, + { name: "headerLocalizedFont", cssSelector: ".office-headerFont-localized", cssProperty: "font-family" }, + { name: "bodyLatinFont", cssSelector: ".office-bodyFont-latin", cssProperty: "font-family" }, + { name: "bodyEastAsianFont", cssSelector: ".office-bodyFont-eastAsian", cssProperty: "font-family" }, + { name: "bodyScriptFont", cssSelector: ".office-bodyFont-script", cssProperty: "font-family" }, + { name: "bodyLocalizedFont", cssSelector: ".office-bodyFont-localized", cssProperty: "font-family" } + ]; + var realData = data.type == Microsoft.Office.WebExtension.EventType.DocumentThemeChanged ? data.documentTheme : data; + for (var i = 0; i < documentThemeCssMapping.length; i++) { + if (this._previousDocumentThemeData === null || this._previousDocumentThemeData[documentThemeCssMapping[i].name] != realData[documentThemeCssMapping[i].name]) { + if (realData[documentThemeCssMapping[i].name] != null && realData[documentThemeCssMapping[i].name] != "") { + var insertableText = realData[documentThemeCssMapping[i].name]; + if (documentThemeCssMapping[i].cssProperty === "font-family") { + insertableText = '"' + insertableText.replace(new RegExp("\"", "g"), '\\"') + '"'; + } + this._changeCss(this._officeCss, documentThemeCssMapping[i].cssSelector, "{" + documentThemeCssMapping[i].cssProperty + ":" + insertableText + ";}"); + } + else { + this._changeCss(this._officeCss, documentThemeCssMapping[i].cssSelector, "{}"); + } + } + } + this._previousDocumentThemeData = realData; + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._changeOfficeThemeData = function (data) { + var officeThemeKeys = OSF.DDA.Theming.OfficeThemeEnum; + var officeThemeCssMapping = [ + { name: officeThemeKeys.BodyForegroundColor, cssSelector: ".office-officeTheme-primary-fontColor", cssProperty: "color" }, + { name: officeThemeKeys.BodyBackgroundColor, cssSelector: ".office-officeTheme-primary-bgColor", cssProperty: "background-color" }, + { name: officeThemeKeys.ControlForegroundColor, cssSelector: ".office-officeTheme-secondary-fontColor", cssProperty: "color" }, + { name: officeThemeKeys.ControlBackgroundColor, cssSelector: ".office-officeTheme-secondary-bgColor", cssProperty: "background-color" } + ]; + var realData = data.type == Microsoft.Office.WebExtension.EventType.OfficeThemeChanged ? data.officeTheme : data; + for (var i = 0; i < officeThemeCssMapping.length; i++) { + if (this._previousOfficeThemeData === null || this._previousOfficeThemeData[officeThemeCssMapping[i].name] != realData[officeThemeCssMapping[i].name]) { + if (realData[officeThemeCssMapping[i].name] !== undefined) { + this._changeCss(this._officeCss, officeThemeCssMapping[i].cssSelector, "{" + officeThemeCssMapping[i].cssProperty + ":" + realData[officeThemeCssMapping[i].name] + ";}"); + } + } + } + this._previousOfficeThemeData = realData; + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._getAndProcessThemeData = function (getThemeMethod, processResultCallback, getThemeMethodIdentifier) { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web") { + if (getThemeMethodIdentifier == OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync) { + var officeThemeData = {}; + var context = OSF._OfficeAppFactory.getContext(); + if (context && context.officeTheme) { + var officeThemeKeys = OSF.DDA.Theming.OfficeThemeEnum; + officeThemeData[officeThemeKeys.BodyBackgroundColor] = context.officeTheme.bodyBackgroundColor; + officeThemeData[officeThemeKeys.BodyForegroundColor] = context.officeTheme.bodyForegroundColor; + officeThemeData[officeThemeKeys.ControlBackgroundColor] = context.officeTheme.controlBackgroundColor; + officeThemeData[officeThemeKeys.ControlForegroundColor] = context.officeTheme.controlForegroundColor; + officeThemeData[officeThemeKeys.IsDarkTheme] = context.officeTheme.isDarkTheme; + } + processResultCallback(officeThemeData); + } + return; + } + getThemeMethod(Function.createDelegate(this, function (asyncResult) { + if (asyncResult.status == "succeeded") { + var data = asyncResult.value; + processResultCallback(data); + } + if (this._areAllCallsCompleted(getThemeMethodIdentifier) && this._onAsyncCallsCompleted) { + this._onAsyncCallsCompleted(); + this._onAsyncCallsCompleted = null; + } + })); + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._processOfficeThemeData = function (data) { + this._changeOfficeThemeData(data); + if (this._isPublicThemeManager) { + this._eventTarget.addHandlerAsync(Microsoft.Office.WebExtension.EventType.OfficeThemeChanged, Function.createDelegate(this, this._changeOfficeThemeData), null); + } + else { + this._pseudoDocumentObject.addHandlerAsync(Microsoft.Office.WebExtension.EventType.OfficeThemeChanged, Function.createDelegate(this, this._changeOfficeThemeData), null); + } + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._processDocumentThemeData = function (data) { + this._changeDocumentThemeData(data); + if (this._isPublicThemeManager) { + this._eventTarget.addHandlerAsync(Microsoft.Office.WebExtension.EventType.DocumentThemeChanged, Function.createDelegate(this, this._changeDocumentThemeData), null); + } + else { + this._pseudoDocumentObject.addHandlerAsync(Microsoft.Office.WebExtension.EventType.DocumentThemeChanged, Function.createDelegate(this, this._changeDocumentThemeData), null); + } + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._areAllCallsCompleted = function (completedCall) { + var asyncCallsCompleted; + if (!(asyncCallsCompleted = this._asyncCallsCompleted)) { + return true; + } + if (completedCall && asyncCallsCompleted.hasOwnProperty(completedCall)) { + asyncCallsCompleted[completedCall] = true; + } + for (var call in asyncCallsCompleted) { + if (asyncCallsCompleted.hasOwnProperty(call) && asyncCallsCompleted[call]) { + continue; + } + return false; + } + return true; + }; + return OSF_DDA_Theming_InternalThemeHandler; +}()); +OSF.DDA.Theming.InternalThemeHandler = OSF_DDA_Theming_InternalThemeHandler; +var parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; +parameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetDocumentThemeMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.DocumentTheme, value: parameterMap.self } + ] +}); +parameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetOfficeThemeMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.OfficeTheme, value: parameterMap.self } + ] +}); +parameterMap.define({ + type: OSF.DDA.EventDispId.dispidDocumentThemeChangedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DocumentThemeChangedEvent, value: parameterMap.self } + ], + isComplexType: true +}); +parameterMap.define({ + type: OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.OfficeThemeChangedEvent, value: parameterMap.self } + ], + isComplexType: true +}); +var destKeys = OSF.DDA.Theming.DocumentThemeEnum; +parameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.DocumentTheme, + fromHost: [ + { name: destKeys.PrimaryBackgroundColor, value: 0 }, + { name: destKeys.PrimaryFontColor, value: 1 }, + { name: destKeys.SecondaryBackgroundColor, value: 2 }, + { name: destKeys.SecondaryFontColor, value: 3 }, + { name: destKeys.Accent1, value: 4 }, + { name: destKeys.Accent2, value: 5 }, + { name: destKeys.Accent3, value: 6 }, + { name: destKeys.Accent4, value: 7 }, + { name: destKeys.Accent5, value: 8 }, + { name: destKeys.Accent6, value: 9 }, + { name: destKeys.Hyperlink, value: 10 }, + { name: destKeys.FollowedHyperlink, value: 11 }, + { name: destKeys.HeaderLatinFont, value: 12 }, + { name: destKeys.HeaderEastAsianFont, value: 13 }, + { name: destKeys.HeaderScriptFont, value: 14 }, + { name: destKeys.HeaderLocalizedFont, value: 15 }, + { name: destKeys.BodyLatinFont, value: 16 }, + { name: destKeys.BodyEastAsianFont, value: 17 }, + { name: destKeys.BodyScriptFont, value: 18 }, + { name: destKeys.BodyLocalizedFont, value: 19 } + ], + isComplexType: true +}); +destKeys = OSF.DDA.Theming.OfficeThemeEnum; +parameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.OfficeTheme, + fromHost: [ + { name: destKeys.BodyForegroundColor, value: 0 }, + { name: destKeys.BodyBackgroundColor, value: 1 }, + { name: destKeys.ControlForegroundColor, value: 2 }, + { name: destKeys.ControlBackgroundColor, value: 3 } + ], + isComplexType: true +}); +parameterMap.define({ + type: OSF.DDA.EventDescriptors.DocumentThemeChangedEvent, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.DocumentTheme, value: parameterMap.self } + ], + isComplexType: true +}); +parameterMap.define({ + type: OSF.DDA.EventDescriptors.OfficeThemeChangedEvent, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.OfficeTheme, value: parameterMap.self } + ], + isComplexType: true +}); +Microsoft.Office.WebExtension.BindingType = { + Table: "table", + Text: "text", + Matrix: "matrix" +}; +OSF.DDA.BindingProperties = { + Id: "BindingId", + Type: Microsoft.Office.WebExtension.Parameters.BindingType +}; +OSF.OUtil.augmentList(OSF.DDA.ListDescriptors, { BindingList: "BindingList" }); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + Subset: "subset", + BindingProperties: "BindingProperties" +}); +OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList, OSF.DDA.PropertyDescriptors.BindingProperties); +OSF.DDA.BindingPromise = function OSF_DDA_BindingPromise(bindingId, errorCallback) { + this._id = bindingId; + OSF.OUtil.defineEnumerableProperty(this, "onFail", { + get: function () { + return errorCallback; + }, + set: function (onError) { + var t = typeof onError; + if (t != "undefined" && t != "function") { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, t); + } + errorCallback = onError; + } + }); +}; +OSF.DDA.BindingPromise.prototype = { + _fetch: function OSF_DDA_BindingPromise$_fetch(onComplete) { + if (this.binding) { + if (onComplete) + onComplete(this.binding); + } + else { + if (!this._binding) { + var me = this; + Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(this._id, function (asyncResult) { + if (asyncResult.status == Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded) { + OSF.OUtil.defineEnumerableProperty(me, "binding", { + value: asyncResult.value + }); + if (onComplete) + onComplete(me.binding); + } + else { + if (me.onFail) + me.onFail(asyncResult); + } + }); + } + } + return this; + }, + getDataAsync: function OSF_DDA_BindingPromise$getDataAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.getDataAsync.apply(binding, args); }); + return this; + }, + setDataAsync: function OSF_DDA_BindingPromise$setDataAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setDataAsync.apply(binding, args); }); + return this; + }, + addHandlerAsync: function OSF_DDA_BindingPromise$addHandlerAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.addHandlerAsync.apply(binding, args); }); + return this; + }, + removeHandlerAsync: function OSF_DDA_BindingPromise$removeHandlerAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.removeHandlerAsync.apply(binding, args); }); + return this; + } +}; +OSF.DDA.BindingFacade = function OSF_DDA_BindingFacade(docInstance) { + this._eventDispatches = []; + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: docInstance + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddFromSelectionAsync, + am.AddFromNamedItemAsync, + am.GetAllAsync, + am.GetByIdAsync, + am.ReleaseByIdAsync + ]); +}; +OSF.DDA.UnknownBinding = function OSF_DDA_UknonwnBinding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { value: docInstance }, + "id": { value: id } + }); +}; +OSF.DDA.Binding = function OSF_DDA_Binding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { + value: docInstance + }, + "id": { + value: id + } + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDataAsync, + am.SetDataAsync + ]); + var et = Microsoft.Office.WebExtension.EventType; + var bindingEventDispatches = docInstance.bindings._eventDispatches; + if (!bindingEventDispatches[id]) { + bindingEventDispatches[id] = new OSF.EventDispatch([ + et.BindingSelectionChanged, + et.BindingDataChanged + ]); + } + var eventDispatch = bindingEventDispatches[id]; + OSF.DDA.DispIdHost.addEventSupport(this, eventDispatch); +}; +OSF.DDA.generateBindingId = function OSF_DDA$GenerateBindingId() { + return "UnnamedBinding_" + OSF.OUtil.getUniqueId() + "_" + new Date().getTime(); +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureBinding = function OSF_DDA_OMFactory$manufactureBinding(bindingProperties, containingDocument) { + var id = bindingProperties[OSF.DDA.BindingProperties.Id]; + var rows = bindingProperties[OSF.DDA.BindingProperties.RowCount]; + var cols = bindingProperties[OSF.DDA.BindingProperties.ColumnCount]; + var hasHeaders = bindingProperties[OSF.DDA.BindingProperties.HasHeaders]; + var binding; + switch (bindingProperties[OSF.DDA.BindingProperties.Type]) { + case Microsoft.Office.WebExtension.BindingType.Text: + binding = new OSF.DDA.TextBinding(id, containingDocument); + break; + case Microsoft.Office.WebExtension.BindingType.Matrix: + binding = new OSF.DDA.MatrixBinding(id, containingDocument, rows, cols); + break; + case Microsoft.Office.WebExtension.BindingType.Table: + var isExcelApp = function () { + return (OSF.DDA.ExcelDocument) + && (Microsoft.Office.WebExtension.context.document) + && (Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument); + }; + var tableBindingObject; + if (isExcelApp() && OSF.DDA.ExcelTableBinding) { + tableBindingObject = OSF.DDA.ExcelTableBinding; + } + else { + tableBindingObject = OSF.DDA.TableBinding; + } + binding = new tableBindingObject(id, containingDocument, rows, cols, hasHeaders); + break; + default: + binding = new OSF.DDA.UnknownBinding(id, containingDocument); + } + return binding; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddFromSelectionAsync: "addFromSelectionAsync", + AddFromNamedItemAsync: "addFromNamedItemAsync", + GetAllAsync: "getAllAsync", + GetByIdAsync: "getByIdAsync", + ReleaseByIdAsync: "releaseByIdAsync", + GetDataAsync: "getDataAsync", + SetDataAsync: "setDataAsync" +}); +(function () { + function processBinding(bindingDescriptor) { + return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); + } + function getObjectId(obj) { return obj.id; } + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] != undefined || data[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) { + data = OSF.DDA.OMFactory.manufactureTableData(data); + } + data = OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data == undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromSelectionAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.ItemName, + "types": ["string"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, + value: function () { return true; } + } + ], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAllAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response) { return OSF.OUtil.mapList(response[OSF.DDA.ListDescriptors.BindingList], processBinding); } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response, caller, callArgs) { + var id = callArgs[Microsoft.Office.WebExtension.Parameters.Id]; + delete caller._eventDispatches[id]; + } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDataAsync, + requiredArguments: [], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs, binding) { return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(binding.type); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RowCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ColumnCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount] == 0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.RowCount]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] || + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] || + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.MatrixBinding = function OSF_DDA_MatrixBinding(id, docInstance, rows, cols) { + OSF.DDA.MatrixBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Matrix + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + } + }); +}; +OSF.OUtil.extend(OSF.DDA.MatrixBinding, OSF.DDA.Binding); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.BindingProperties, + fromHost: [ + { name: OSF.DDA.BindingProperties.Id, value: 0 }, + { name: OSF.DDA.BindingProperties.Type, value: 1 }, + { name: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.BindingType, + toHost: [ + { name: Microsoft.Office.WebExtension.BindingType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.BindingType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.BindingType.Table, value: 2 } + ], + invertible: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ItemName, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseBindingMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAllBindingsMethod, + fromHost: [ + { name: OSF.DDA.ListDescriptors.BindingList, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 3 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 4 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, + fromHost: [ + { name: OSF.DDA.BindingProperties.RowCount, value: 0 }, + { name: OSF.DDA.BindingProperties.ColumnCount, value: 1 }, + { name: OSF.DDA.BindingProperties.HasHeaders, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.Subset, + toHost: [ + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 0 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Run, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Offset, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Run, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.RowCount, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ColumnCount, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddColumnsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearAllRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { TableDataProperties: "TableDataProperties" }); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.TableDataProperties = { + TableRows: "TableRows", + TableHeaders: "TableHeaders" +}; +OSF.DDA.TableBinding = function OSF_DDA_TableBinding(id, docInstance, rows, cols, hasHeaders) { + OSF.DDA.TableBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Table + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + }, + "hasHeaders": { + value: hasHeaders ? hasHeaders : false + } + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddRowsAsync, + am.AddColumnsAsync, + am.DeleteAllDataValuesAsync + ]); +}; +OSF.OUtil.extend(OSF.DDA.TableBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ + AddRowsAsync: "addRowsAsync", + AddColumnsAsync: "addColumnsAsync", + DeleteAllDataValuesAsync: "deleteAllDataValuesAsync" +}); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddRowsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddColumnsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.DDA.TextBinding = function OSF_DDA_TextBinding(id, docInstance) { + OSF.DDA.TextBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperty(this, "type", { + value: Microsoft.Office.WebExtension.BindingType.Text + }); +}; +OSF.OUtil.extend(OSF.DDA.TextBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ AddFromPromptAsync: "addFromPromptAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromPromptAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptText, + value: { + "types": ["string"], + "calculate": function () { return Strings.OfficeOM.L_AddBindingFromPromptDefaultText; } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.SampleData, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: function (bindingDescriptor) { return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.PromptText, value: 2 } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DocumentSelectionChanged: "documentSelectionChanged" }); +OSF.DDA.DocumentSelectionChangedEventArgs = function OSF_DDA_DocumentSelectionChangedEventArgs(docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged + }, + "document": { + value: docInstance + } + }); +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs = function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDeletedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDataChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidContentControlAddedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + BindingSelectionChanged: "bindingSelectionChanged", + BindingDataChanged: "bindingDataChanged" +}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { BindingSelectionChangedEvent: "BindingSelectionChangedEvent" }); +OSF.DDA.BindingSelectionChangedEventArgs = function OSF_DDA_BindingSelectionChangedEventArgs(bindingInstance, subset) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingSelectionChanged + }, + "binding": { + value: bindingInstance + } + }); + for (var prop in subset) { + OSF.OUtil.defineEnumerableProperty(this, prop, { + value: subset[prop] + }); + } +}; +OSF.DDA.BindingDataChangedEventArgs = function OSF_DDA_BindingDataChangedEventArgs(bindingInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingDataChanged + }, + "binding": { + value: bindingInstance + } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingDataChangedEvent, + fromHost: [{ name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self }] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType, { OnlyVisible: "onlyVisible" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [{ name: Microsoft.Office.WebExtension.FilterType.OnlyVisible, value: 1 }] +}); +Microsoft.Office.WebExtension.GoToType = { + Binding: "binding", + NamedItem: "namedItem", + Slide: "slide", + Index: "index" +}; +Microsoft.Office.WebExtension.SelectionMode = { + Default: "default", + Selected: "selected", + None: "none" +}; +Microsoft.Office.WebExtension.Index = { + First: "first", + Last: "last", + Next: "next", + Previous: "previous" +}; +OSF.DDA.AsyncMethodNames.addNames({ GoToByIdAsync: "goToByIdAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GoToByIdAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string", "number"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.GoToType, + "enum": Microsoft.Office.WebExtension.GoToType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SelectionMode, + value: { + "enum": Microsoft.Office.WebExtension.SelectionMode, + "defaultValue": Microsoft.Office.WebExtension.SelectionMode.Default + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.GoToType, + toHost: [ + { name: Microsoft.Office.WebExtension.GoToType.Binding, value: 0 }, + { name: Microsoft.Office.WebExtension.GoToType.NamedItem, value: 1 }, + { name: Microsoft.Office.WebExtension.GoToType.Slide, value: 2 }, + { name: Microsoft.Office.WebExtension.GoToType.Index, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.SelectionMode, + toHost: [ + { name: Microsoft.Office.WebExtension.SelectionMode.Default, value: 0 }, + { name: Microsoft.Office.WebExtension.SelectionMode.Selected, value: 1 }, + { name: Microsoft.Office.WebExtension.SelectionMode.None, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidNavigateToMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.GoToType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.SelectionMode, value: 2 } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { RichApiMessage: "richApiMessage" }); +OSF.DDA.RichApiMessageEventArgs = function OSF_DDA_RichApiMessageEventArgs(eventType, eventProperties) { + var entryArray = eventProperties[Microsoft.Office.WebExtension.Parameters.Data]; + var entries = []; + if (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var elem = entryArray[i]; + if (elem.toArray) { + elem = elem.toArray(); + } + entries.push({ + messageCategory: elem[0], + messageType: elem[1], + targetId: elem[2], + message: elem[3], + id: elem[4], + isRemoteOverride: elem[5] + }); + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: Microsoft.Office.WebExtension.EventType.RichApiMessage }, + "entries": { value: entries } + }); +}; +(function (OfficeExt) { + var RichApiMessageManager = (function () { + function RichApiMessageManager() { + this._eventDispatch = null; + this._registerHandlers = []; + this._eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.RichApiMessage, + ]); + OSF.DDA.DispIdHost.addEventSupport(this, this._eventDispatch); + } + RichApiMessageManager.prototype.register = function (handler) { + var _this = this; + if (!this._registerWithHostPromise) { + this._registerWithHostPromise = new Office.Promise(function (resolve, reject) { + _this.addHandlerAsync(Microsoft.Office.WebExtension.EventType.RichApiMessage, function (args) { + _this._registerHandlers.forEach(function (value) { + if (value) { + value(args); + } + }); + }, function (asyncResult) { + if (asyncResult.status == 'failed') { + reject(asyncResult.error); + } + else { + resolve(); + } + }); + }); + } + return this._registerWithHostPromise.then(function () { + _this._registerHandlers.push(handler); + }); + }; + return RichApiMessageManager; + }()); + OfficeExt.RichApiMessageManager = RichApiMessageManager; +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidRichApiMessageEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync, + requiredArguments: [ + { + name: Microsoft.Office.WebExtension.Parameters.Data, + types: ["object"] + } + ], + supportedOptions: [] +}); +OSF.OUtil.setNamespace("RichApi", OSF.DDA); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +Microsoft.Office.WebExtension.FileType = { + Text: "text", + Compressed: "compressed", + Pdf: "pdf" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FileProperties: "FileProperties", + FileSliceProperties: "FileSliceProperties" +}); +OSF.DDA.FileProperties = { + Handle: "FileHandle", + FileSize: "FileSize", + SliceSize: Microsoft.Office.WebExtension.Parameters.SliceSize +}; +OSF.DDA.File = function OSF_DDA_File(handle, fileSize, sliceSize) { + OSF.OUtil.defineEnumerableProperties(this, { + "size": { + value: fileSize + }, + "sliceCount": { + value: Math.ceil(fileSize / sliceSize) + } + }); + var privateState = {}; + privateState[OSF.DDA.FileProperties.Handle] = handle; + privateState[OSF.DDA.FileProperties.SliceSize] = sliceSize; + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDocumentCopyChunkAsync, + am.ReleaseDocumentCopyAsync + ], privateState); +}; +OSF.DDA.FileSliceOffset = "fileSliceoffset"; +OSF.DDA.AsyncMethodNames.addNames({ + GetDocumentCopyAsync: "getFileAsync", + GetDocumentCopyChunkAsync: "getSliceAsync", + ReleaseDocumentCopyAsync: "closeAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.FileType, + "enum": Microsoft.Office.WebExtension.FileType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SliceSize, + value: { + "types": ["number"], + "defaultValue": 4 * 1024 * 1024 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var sliceSize = callArgs[Microsoft.Office.WebExtension.Parameters.SliceSize]; + if (sliceSize <= 0 || sliceSize > (4 * 1024 * 1024)) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize; + } + return callArgs; + }, + onSucceeded: function (fileDescriptor, caller, callArgs) { + return new OSF.DDA.File(fileDescriptor[OSF.DDA.FileProperties.Handle], fileDescriptor[OSF.DDA.FileProperties.FileSize], callArgs[Microsoft.Office.WebExtension.Parameters.SliceSize]); + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.SliceIndex, + "types": ["number"] + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.FileProperties.Handle, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.Handle]; } + }, + { + name: OSF.DDA.FileProperties.SliceSize, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.SliceSize]; } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var index = callArgs[Microsoft.Office.WebExtension.Parameters.SliceIndex]; + if (index < 0 || index >= caller.sliceCount) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange; + } + callArgs[OSF.DDA.FileSliceOffset] = parseInt((index * stateInfo[OSF.DDA.FileProperties.SliceSize]).toString()); + return callArgs; + }, + onSucceeded: function (sliceDescriptor, caller, callArgs) { + var slice = {}; + OSF.OUtil.defineEnumerableProperties(slice, { + "data": { + value: OSF.OUtil.shallowCopy(sliceDescriptor[Microsoft.Office.WebExtension.Parameters.Data]) + }, + "index": { + value: callArgs[Microsoft.Office.WebExtension.Parameters.SliceIndex] + }, + "size": { + value: sliceDescriptor[OSF.DDA.FileProperties.SliceSize] + } + }); + return slice; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync, + privateStateCallbacks: [ + { + name: OSF.DDA.FileProperties.Handle, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.Handle]; } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FileProperties, + fromHost: [ + { name: OSF.DDA.FileProperties.Handle, value: 0 }, + { name: OSF.DDA.FileProperties.FileSize, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FileSliceProperties, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 }, + { name: OSF.DDA.FileProperties.SliceSize, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.FileType, + toHost: [ + { name: Microsoft.Office.WebExtension.FileType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.FileType.Compressed, value: 5 }, + { name: Microsoft.Office.WebExtension.FileType.Pdf, value: 6 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod, + toHost: [{ name: Microsoft.Office.WebExtension.Parameters.FileType, value: 0 }], + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FileProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod, + toHost: [ + { name: OSF.DDA.FileProperties.Handle, value: 0 }, + { name: OSF.DDA.FileSliceOffset, value: 1 }, + { name: OSF.DDA.FileProperties.SliceSize, value: 2 } + ], + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FileSliceProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod, + toHost: [{ name: OSF.DDA.FileProperties.Handle, value: 0 }] +}); +OSF.DDA.FilePropertiesDescriptor = { + Url: "Url" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FilePropertiesDescriptor: "FilePropertiesDescriptor" +}); +Microsoft.Office.WebExtension.FileProperties = function Microsoft_Office_WebExtension_FileProperties(filePropertiesDescriptor) { + OSF.OUtil.defineEnumerableProperties(this, { + "url": { + value: filePropertiesDescriptor[OSF.DDA.FilePropertiesDescriptor.Url] + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ GetFilePropertiesAsync: "getFilePropertiesAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: 0 } + ], + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (filePropertiesDescriptor, caller, callArgs) { + return new Microsoft.Office.WebExtension.FileProperties(filePropertiesDescriptor); + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, + fromHost: [ + { name: OSF.DDA.FilePropertiesDescriptor.Url, value: 0 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.ExcelTableBinding = function OSF_DDA_ExcelTableBinding(id, docInstance, rows, cols, hasHeaders) { + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.ClearFormatsAsync, + am.SetTableOptionsAsync, + am.SetFormatsAsync + ]); + OSF.DDA.ExcelTableBinding.uber.constructor.call(this, id, docInstance, rows, cols, hasHeaders); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelTableBinding, OSF.DDA.TableBinding); +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + privateStateCallbacks: [] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var Parameters = Microsoft.Office.WebExtension.Parameters; + if (callArgs[Parameters.StartRow] == 0 && + callArgs[Parameters.StartColumn] == 0 && + OSF.OUtil.isArray(callArgs[Parameters.CellFormat]) && callArgs[Parameters.CellFormat].length === 0 && + OSF.OUtil.isArray(callArgs[Parameters.TableOptions]) && callArgs[Parameters.TableOptions].length === 0) { + delete callArgs[Parameters.StartRow]; + delete callArgs[Parameters.StartColumn]; + delete callArgs[Parameters.CellFormat]; + delete callArgs[Parameters.TableOptions]; + } + if (callArgs[Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + ((callArgs[Parameters.StartRow] && callArgs[Parameters.StartRow] != 0) || + (callArgs[Parameters.StartColumn] && callArgs[Parameters.StartColumn] != 0) || + callArgs[Parameters.CellFormat] || + callArgs[Parameters.TableOptions])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: function (obj) { return obj.id; } + } + ] + }); + OSF.DDA.BindingPromise.prototype.setTableOptionsAsync = function OSF_DDA_BindingPromise$setTableOptionsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setTableOptionsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.setFormatsAsync = function OSF_DDA_BindingPromise$setFormatsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setFormatsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.clearFormatsAsync = function OSF_DDA_BindingPromise$clearFormatsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.clearFormatsAsync.apply(binding, args); }); + return this; + }; +})(); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodNames.addNames({ + ClearFormatsAsync: "clearFormatsAsync", + SetTableOptionsAsync: "setTableOptionsAsync", + SetFormatsAsync: "setFormatsAsync" + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ClearFormatsAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetTableOptionsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.TableOptions, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetFormatsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CellFormat, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +Microsoft.Office.WebExtension.Table = { + All: 0, + Data: 1, + Headers: 2 +}; +(function () { + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetTableOptionsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 3 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 5 } + ] + }); + var tableOptionProperties = { + headerRow: 0, + bandedRows: 1, + firstColumn: 2, + lastColumn: 3, + bandedColumns: 4, + filterButton: 5, + style: 6, + totalRow: 7 + }; + var cellProperties = { + row: 0, + column: 1 + }; + var formatProperties = { + alignHorizontal: { text: "alignHorizontal", type: 1 }, + alignVertical: { text: "alignVertical", type: 2 }, + backgroundColor: { text: "backgroundColor", type: 101 }, + borderStyle: { text: "borderStyle", type: 201 }, + borderColor: { text: "borderColor", type: 202 }, + borderTopStyle: { text: "borderTopStyle", type: 203 }, + borderTopColor: { text: "borderTopColor", type: 204 }, + borderBottomStyle: { text: "borderBottomStyle", type: 205 }, + borderBottomColor: { text: "borderBottomColor", type: 206 }, + borderLeftStyle: { text: "borderLeftStyle", type: 207 }, + borderLeftColor: { text: "borderLeftColor", type: 208 }, + borderRightStyle: { text: "borderRightStyle", type: 209 }, + borderRightColor: { text: "borderRightColor", type: 210 }, + borderOutlineStyle: { text: "borderOutlineStyle", type: 211 }, + borderOutlineColor: { text: "borderOutlineColor", type: 212 }, + borderInlineStyle: { text: "borderInlineStyle", type: 213 }, + borderInlineColor: { text: "borderInlineColor", type: 214 }, + fontFamily: { text: "fontFamily", type: 301 }, + fontStyle: { text: "fontStyle", type: 302 }, + fontSize: { text: "fontSize", type: 303 }, + fontUnderlineStyle: { text: "fontUnderlineStyle", type: 304 }, + fontColor: { text: "fontColor", type: 305 }, + fontDirection: { text: "fontDirection", type: 306 }, + fontStrikethrough: { text: "fontStrikethrough", type: 307 }, + fontSuperscript: { text: "fontSuperscript", type: 308 }, + fontSubscript: { text: "fontSubscript", type: 309 }, + fontNormal: { text: "fontNormal", type: 310 }, + indentLeft: { text: "indentLeft", type: 401 }, + indentRight: { text: "indentRight", type: 402 }, + numberFormat: { text: "numberFormat", type: 501 }, + width: { text: "width", type: 701 }, + height: { text: "height", type: 702 }, + wrapping: { text: "wrapping", type: 703 } + }; + var borderStyleSet = [ + { name: "none", value: 0 }, + { name: "thin", value: 1 }, + { name: "medium", value: 2 }, + { name: "dashed", value: 3 }, + { name: "dotted", value: 4 }, + { name: "thick", value: 5 }, + { name: "double", value: 6 }, + { name: "hair", value: 7 }, + { name: "medium dashed", value: 8 }, + { name: "dash dot", value: 9 }, + { name: "medium dash dot", value: 10 }, + { name: "dash dot dot", value: 11 }, + { name: "medium dash dot dot", value: 12 }, + { name: "slant dash dot", value: 13 }, + ]; + var colorSet = [ + { name: "none", value: 0 }, + { name: "black", value: 1 }, + { name: "blue", value: 2 }, + { name: "gray", value: 3 }, + { name: "green", value: 4 }, + { name: "orange", value: 5 }, + { name: "pink", value: 6 }, + { name: "purple", value: 7 }, + { name: "red", value: 8 }, + { name: "teal", value: 9 }, + { name: "turquoise", value: 10 }, + { name: "violet", value: 11 }, + { name: "white", value: 12 }, + { name: "yellow", value: 13 }, + { name: "automatic", value: 14 }, + ]; + var ns = OSF.DDA.SafeArray.Delegate.ParameterMap; + ns.define({ + type: formatProperties.alignHorizontal.text, + toHost: [ + { name: "general", value: 0 }, + { name: "left", value: 1 }, + { name: "center", value: 2 }, + { name: "right", value: 3 }, + { name: "fill", value: 4 }, + { name: "justify", value: 5 }, + { name: "center across selection", value: 6 }, + { name: "distributed", value: 7 }, + ] + }); + ns.define({ + type: formatProperties.alignVertical.text, + toHost: [ + { name: "top", value: 0 }, + { name: "center", value: 1 }, + { name: "bottom", value: 2 }, + { name: "justify", value: 3 }, + { name: "distributed", value: 4 }, + ] + }); + ns.define({ + type: formatProperties.backgroundColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderTopStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderTopColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderBottomStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderBottomColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderLeftStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderLeftColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderRightStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderRightColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderOutlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderOutlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderInlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderInlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontStyle.text, + toHost: [ + { name: "regular", value: 0 }, + { name: "italic", value: 1 }, + { name: "bold", value: 2 }, + { name: "bold italic", value: 3 }, + ] + }); + ns.define({ + type: formatProperties.fontUnderlineStyle.text, + toHost: [ + { name: "none", value: 0 }, + { name: "single", value: 1 }, + { name: "double", value: 2 }, + { name: "single accounting", value: 3 }, + { name: "double accounting", value: 4 }, + ] + }); + ns.define({ + type: formatProperties.fontColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontDirection.text, + toHost: [ + { name: "context", value: 0 }, + { name: "left-to-right", value: 1 }, + { name: "right-to-left", value: 2 }, + ] + }); + ns.define({ + type: formatProperties.width.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] + }); + ns.define({ + type: formatProperties.height.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] + }); + ns.define({ + type: Microsoft.Office.WebExtension.Parameters.TableOptions, + toHost: [ + { name: "headerRow", value: 0 }, + { name: "bandedRows", value: 1 }, + { name: "firstColumn", value: 2 }, + { name: "lastColumn", value: 3 }, + { name: "bandedColumns", value: 4 }, + { name: "filterButton", value: 5 }, + { name: "style", value: 6 }, + { name: "totalRow", value: 7 } + ] + }); + ns.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat] = { + toHost: function (data) { + for (var entry in data) { + if (data[entry].format) { + data[entry].format = ns.doMapValues(data[entry].format, "toHost"); + } + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$toHost(cellFormats) { + var textCells = "cells"; + var textFormat = "format"; + var posCells = 0; + var posFormat = 1; + var ret = []; + for (var index in cellFormats) { + var cfOld = cellFormats[index]; + var cfNew = []; + if (typeof (cfOld[textCells]) !== 'undefined') { + var cellsOld = cfOld[textCells]; + var cellsNew; + if (typeof cfOld[textCells] === "object") { + cellsNew = []; + for (var entry in cellsOld) { + if (typeof (cellProperties[entry]) !== 'undefined') { + cellsNew[cellProperties[entry]] = cellsOld[entry]; + } + } + } + else { + cellsNew = cellsOld; + } + cfNew[posCells] = cellsNew; + } + if (cfOld[textFormat]) { + var formatOld = cfOld[textFormat]; + var formatNew = []; + for (var entry2 in formatOld) { + if (typeof (formatProperties[entry2]) !== 'undefined') { + formatNew.push([ + formatProperties[entry2].type, + formatOld[entry2] + ]); + } + } + cfNew[posFormat] = formatNew; + } + ret[index] = cfNew; + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$fromHost(hostArgs) { + return hostArgs; + } + }); + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$toHost(tableOptions) { + var ret = []; + for (var entry in tableOptions) { + if (typeof (tableOptionProperties[entry]) !== 'undefined') { + ret[tableOptionProperties[entry]] = tableOptions[entry]; + } + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$fromHost(hostArgs) { + return hostArgs; + } + }); +})(); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType, { Image: "image" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType, { XmlSvg: "xmlSvg" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Image, value: 8 }, + { name: Microsoft.Office.WebExtension.CoercionType.XmlSvg, value: 9 } + ] +}); +(function (OfficeExt) { + var AppCommand; + (function (AppCommand) { + var AppCommandManager = (function () { + function AppCommandManager() { + var _this = this; + this._pseudoDocument = null; + this._eventDispatch = null; + this._useAssociatedActionsOnly = null; + this._processAppCommandInvocation = function (args) { + var verifyResult = _this._verifyManifestCallback(args.callbackName); + if (verifyResult.errorCode != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + _this._invokeAppCommandCompletedMethod(args.appCommandId, verifyResult.errorCode, ""); + return; + } + var eventObj = _this._constructEventObjectForCallback(args); + if (eventObj) { + window.setTimeout(function () { verifyResult.callback(eventObj); }, 0); + } + else { + _this._invokeAppCommandCompletedMethod(args.appCommandId, OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError, ""); + } + }; + } + AppCommandManager.initializeOsfDda = function () { + OSF.DDA.AsyncMethodNames.addNames({ + AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync" + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Status, + "types": ["number"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, + "types": ["string"] + } + ] + }); + OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + AppCommandInvokedEvent: "AppCommandInvokedEvent" + }); + OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + AppCommandInvoked: "appCommandInvoked" + }); + OSF.OUtil.setNamespace("AppCommand", OSF.DDA); + OSF.DDA.AppCommand.AppCommandInvokedEventArgs = OfficeExt.AppCommand.AppCommandInvokedEventArgs; + }; + AppCommandManager.prototype.initializeAndChangeOnce = function (callback) { + AppCommand.registerDdaFacade(); + this._pseudoDocument = {}; + OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument, [ + OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, + ]); + this._eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.AppCommandInvoked, + ]); + var onRegisterCompleted = function (result) { + if (callback) { + if (result.status == "succeeded") { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + } + }; + OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument, this._eventDispatch); + this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked, this._processAppCommandInvocation, onRegisterCompleted); + }; + AppCommandManager.prototype._verifyManifestCallback = function (callbackName) { + var defaultResult = { callback: null, errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback }; + callbackName = callbackName.trim(); + try { + var callbackFunc = this._getCallbackFunc(callbackName); + if (typeof callbackFunc != "function") { + return defaultResult; + } + } + catch (e) { + return defaultResult; + } + return { callback: callbackFunc, errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess }; + }; + AppCommandManager.prototype._getUseAssociatedActionsOnly = function () { + if (this._useAssociatedActionsOnly == null) { + this._useAssociatedActionsOnly = false; + try { + if (window["useAssociatedActionsOnly"] === true) { + this._useAssociatedActionsOnly = true; + } + else { + this._useAssociatedActionsOnly = OSF._OfficeAppFactory.getLoadScriptHelper().getUseAssociatedActionsOnlyDefined(); + } + } + catch (e) { } + } + return this._useAssociatedActionsOnly; + }; + AppCommandManager.prototype._getCallbackFuncFromWindow = function (callbackName) { + var callList = callbackName.split("."); + var parentObject = window; + for (var i = 0; i < callList.length - 1; i++) { + if (parentObject[callList[i]] && (typeof parentObject[callList[i]] == "object" || typeof parentObject[callList[i]] == "function")) { + parentObject = parentObject[callList[i]]; + } + else { + return null; + } + } + var callbackFunc = parentObject[callList[callList.length - 1]]; + return callbackFunc; + }; + AppCommandManager.prototype._getCallbackFuncFromActionAssociateTable = function (callbackName) { + var nameUpperCase = callbackName.toUpperCase(); + return Office.actions._association.mappings[nameUpperCase]; + }; + AppCommandManager.prototype._getCallbackFunc = function (callbackName) { + var _this = this; + var callbackFunc = null; + var useAssociateTable = false; + if (!this._getUseAssociatedActionsOnly()) { + callbackFunc = this._getCallbackFuncFromWindow(callbackName); + } + if (!callbackFunc) { + callbackFunc = this._getCallbackFuncFromActionAssociateTable(callbackName); + if (callbackFunc) { + useAssociateTable = true; + } + } + if (!AppCommandManager.isTelemetrySubmitted) { + AppCommandManager.isTelemetrySubmitted = true; + try { + if (OTel && oteljs && Microsoft.Office.WebExtension.sendTelemetryEvent) { + var telSampleRate = OTel.OTelLogger.getHost() == "Outlook" ? 0.1 : 0.2; + if (Math.random() < telSampleRate) { + OTel.OTelLogger.onTelemetryLoaded(function () { + var dataFields = [ + oteljs.makeBooleanDataField("UseAction", _this._useAssociatedActionsOnly === true), + oteljs.makeBooleanDataField("UseAssociateTable", useAssociateTable) + ]; + Microsoft.Office.WebExtension.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.AppCommandDefinition", + dataFields: dataFields, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage, + diagnosticLevel: oteljs.DiagnosticLevel.NecessaryServiceDataEvent + } + }); + }); + } + } + } + catch (e) { } + } + return callbackFunc; + }; + AppCommandManager.prototype._invokeAppCommandCompletedMethod = function (appCommandId, resultCode, data) { + this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId, resultCode, data); + }; + AppCommandManager.prototype._constructEventObjectForCallback = function (args) { + var _this = this; + var eventObj = new AppCommandCallbackEventArgs(); + try { + var jsonData = JSON.parse(args.eventObjStr); + this._translateEventObjectInternal(jsonData, eventObj); + Object.defineProperty(eventObj, 'completed', { + value: function (completedContext) { + eventObj.completedContext = completedContext; + var jsonString = JSON.stringify(eventObj); + _this._invokeAppCommandCompletedMethod(args.appCommandId, OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, jsonString); + }, + enumerable: true + }); + } + catch (e) { + eventObj = null; + } + return eventObj; + }; + AppCommandManager.prototype._translateEventObjectInternal = function (input, output) { + for (var key in input) { + if (!input.hasOwnProperty(key)) + continue; + var inputChild = input[key]; + if (typeof inputChild == "object" && inputChild != null) { + OSF.OUtil.defineEnumerableProperty(output, key, { + value: {} + }); + this._translateEventObjectInternal(inputChild, output[key]); + } + else { + Object.defineProperty(output, key, { + value: inputChild, + enumerable: true, + writable: true + }); + } + } + }; + AppCommandManager.prototype._constructObjectByTemplate = function (template, input) { + var output = {}; + if (!template || !input) + return output; + for (var key in template) { + if (template.hasOwnProperty(key)) { + output[key] = null; + if (input[key] != null) { + var templateChild = template[key]; + var inputChild = input[key]; + var inputChildType = typeof inputChild; + if (typeof templateChild == "object" && templateChild != null) { + output[key] = this._constructObjectByTemplate(templateChild, inputChild); + } + else if (inputChildType == "number" || inputChildType == "string" || inputChildType == "boolean") { + output[key] = inputChild; + } + } + } + } + return output; + }; + AppCommandManager.instance = function () { + if (AppCommandManager._instance == null) { + AppCommandManager._instance = new AppCommandManager(); + } + return AppCommandManager._instance; + }; + AppCommandManager.isTelemetrySubmitted = false; + AppCommandManager._instance = null; + return AppCommandManager; + }()); + AppCommand.AppCommandManager = AppCommandManager; + var AppCommandInvokedEventArgs = (function () { + function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr) { + this.type = Microsoft.Office.WebExtension.EventType.AppCommandInvoked; + this.appCommandId = appCommandId; + this.callbackName = callbackName; + this.eventObjStr = eventObjStr; + } + AppCommandInvokedEventArgs.create = function (eventProperties) { + return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId], eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName], eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr]); + }; + return AppCommandInvokedEventArgs; + }()); + AppCommand.AppCommandInvokedEventArgs = AppCommandInvokedEventArgs; + var AppCommandCallbackEventArgs = (function () { + function AppCommandCallbackEventArgs() { + } + return AppCommandCallbackEventArgs; + }()); + AppCommand.AppCommandCallbackEventArgs = AppCommandCallbackEventArgs; + AppCommand.AppCommandInvokedEventEnums = { + AppCommandId: "appCommandId", + CallbackName: "callbackName", + EventObjStr: "eventObjStr" + }; + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})); +})(OfficeExt || (OfficeExt = {})); +OfficeExt.AppCommand.AppCommandManager.initializeOsfDda(); +(function (OfficeExt) { + var AppCommand; + (function (AppCommand) { + function registerDdaFacade() { + if (OSF.DDA.SafeArray) { + var parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + parameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Status, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, value: 2 } + ] + }); + parameterMap.define({ + type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, value: parameterMap.self } + ], + isComplexType: true + }); + parameterMap.define({ + type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, + fromHost: [ + { name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId, value: 0 }, + { name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName, value: 1 }, + { name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr, value: 2 }, + ], + isComplexType: true + }); + } + } + AppCommand.registerDdaFacade = registerDdaFacade; + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})); +})(OfficeExt || (OfficeExt = {})); +Microsoft.Office.WebExtension.AccountTypeFilter = { + NoFilter: "noFilter", + AAD: "aad", + MSA: "msa" +}; +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth = function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.EnableNewHosts, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AccountTypeFilter, + value: { + "enum": Microsoft.Office.WebExtension.AccountTypeFilter, + "defaultValue": Microsoft.Office.WebExtension.AccountTypeFilter.NoFilter + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var _a; + var appContext = OSF._OfficeAppFactory.getInitializationHelper()._appContext; + if (appContext && appContext._wopiHostOriginForSingleSignOn) { + var addinTrustId = OSF.OUtil.Guid.generateNewGuid(); + window.parent.parent.postMessage("{\"MessageId\":\"AddinTrustedOrigin\",\"AddinTrustId\":\"" + addinTrustId + "\"}", appContext._wopiHostOriginForSingleSignOn); + callArgs[Microsoft.Office.WebExtension.Parameters.AddinTrustId] = addinTrustId; + } + if (window.Office.context.requirements.isSetSupported("JsonPayloadSSO")) { + var jsonParameterMap = (_a = {}, + _a[Microsoft.Office.WebExtension.Parameters.ForceConsent] = false, + _a[Microsoft.Office.WebExtension.Parameters.ForceAddAccount] = false, + _a[Microsoft.Office.WebExtension.Parameters.AuthChallenge] = true, + _a[Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt] = true, + _a[Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess] = true, + _a[Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt] = true, + _a[Microsoft.Office.WebExtension.Parameters.EnableNewHosts] = true, + _a[Microsoft.Office.WebExtension.Parameters.AccountTypeFilter] = true, + _a); + var jsonPayload = {}; + for (var _i = 0, _b = Object.keys(jsonParameterMap); _i < _b.length; _i++) { + var key = _b[_i]; + if (jsonParameterMap[key]) { + jsonPayload[key] = callArgs[key]; + } + delete callArgs[key]; + } + callArgs[Microsoft.Office.WebExtension.Parameters.JsonPayload] = JSON.stringify(jsonPayload); + } + return callArgs; + }, + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.JsonPayload, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt, value: 5 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ GetNestedAppAuthContextAsync: "getAuthContextAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync, + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.JsonData]; + var userObjectId = data.userObjectId || ""; + var tenantId = data.tenantId || ""; + var userPrincipalName = data.userPrincipalName || ""; + var authorityType = data.authorityType || ""; + return { + userObjectId: userObjectId, + tenantId: tenantId, + userPrincipalName: userPrincipalName, + authorityType: authorityType + }; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetNestedAppAuthContextMethod, + toHost: [], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.JsonData, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + OpenBrowserWindow: "openBrowserWindow" +}); +OSF.DDA.OpenBrowser = function OSF_DDA_OpenBrowser() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.OpenBrowserWindow, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Reserved, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidOpenBrowserWindow, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Reserved, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Url, value: 1 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteFeature: "executeFeatureAsync", + QueryFeature: "queryFeatureAsync" +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FeatureProperties: "FeatureProperties", + TcidEnabled: "TcidEnabled", + TcidVisible: "TcidVisible" +}); +OSF.DDA.ExecuteFeature = function OSF_DDA_ExecuteFeature() { +}; +OSF.DDA.QueryFeature = function OSF_DDA_QueryFeature() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteFeature, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Tcid, + "types": ["number"] + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.QueryFeature, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Tcid, + "types": ["number"] + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FeatureProperties, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.TcidEnabled, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.TcidVisible, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteFeature, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Tcid, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidQueryFeature, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FeatureProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Tcid, value: 0 } + ] +}); +OSF.DDA.ExcelDocument = function OSF_DDA_ExcelDocument(officeAppContext, settings) { + var bf = new OSF.DDA.BindingFacade(this); + OSF.DDA.DispIdHost.addAsyncMethods(bf, [OSF.DDA.AsyncMethodNames.AddFromPromptAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GoToByIdAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]); + OSF.DDA.ExcelDocument.uber.constructor.call(this, officeAppContext, bf, settings); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelDocument, OSF.DDA.JsomDocument); +OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize(appContext) { + if (!(appContext && appContext.get_isDialog())) { + var appCommandHandler = OfficeExt.AppCommand.AppCommandManager.instance(); + appCommandHandler.initializeAndChangeOnce(); + } + if (appContext && appContext.get_featureGates) { + var featureGates = appContext.get_featureGates(); + if (featureGates && featureGates["EnableExcelAddInTheme"]) { + if (featureGates["EnablePublicThemeManager"]) { + if (typeof window !== 'undefined' && + window.Office && + window.Office.context && + window.Office.context.themeManager) { + window.Office.context.themeManager.InitializeAndChangeOnce(); + } + } + else { + var themeHandler = new OSF.DDA.Theming.InternalThemeHandler(); + themeHandler.InitializeAndChangeOnce(); + } + } + } +}; +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + appContext.doc = new OSF.DDA.ExcelDocument(appContext, this.initializeMacSettings(appContext, true)); + OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + if (!appContext.get_isDialog()) { + OSF.DDA.RichApi.richApiMessageManager = new OfficeExt.RichApiMessageManager(); + } + appReady(); +}; +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["number", "object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["number", "object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExtension; +(function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire = function () { + return null; + }(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + var PromiseImpl; + (function (PromiseImpl) { + function Init() { + return (function () { + "use strict"; + function lib$es6$promise$utils$$objectOrFunction(x) { + return typeof x === 'function' || (typeof x === 'object' && x !== null); + } + function lib$es6$promise$utils$$isFunction(x) { + return typeof x === 'function'; + } + function lib$es6$promise$utils$$isMaybeThenable(x) { + return typeof x === 'object' && x !== null; + } + var lib$es6$promise$utils$$_isArray; + if (!Array.isArray) { + lib$es6$promise$utils$$_isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; + } + else { + lib$es6$promise$utils$$_isArray = Array.isArray; + } + var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray; + var lib$es6$promise$asap$$len = 0; + var lib$es6$promise$asap$$toString = {}.toString; + var lib$es6$promise$asap$$vertxNext; + var lib$es6$promise$asap$$customSchedulerFn; + var lib$es6$promise$asap$$asap = function asap(callback, arg) { + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback; + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg; + lib$es6$promise$asap$$len += 2; + if (lib$es6$promise$asap$$len === 2) { + if (lib$es6$promise$asap$$customSchedulerFn) { + lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush); + } + else { + lib$es6$promise$asap$$scheduleFlush(); + } + } + }; + function lib$es6$promise$asap$$setScheduler(scheduleFn) { + lib$es6$promise$asap$$customSchedulerFn = scheduleFn; + } + function lib$es6$promise$asap$$setAsap(asapFn) { + lib$es6$promise$asap$$asap = asapFn; + } + var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined; + var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {}; + var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver; + var lib$es6$promise$asap$$isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && + typeof importScripts !== 'undefined' && + typeof MessageChannel !== 'undefined'; + function lib$es6$promise$asap$$useNextTick() { + var nextTick = process.nextTick; + var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); + if (Array.isArray(version) && version[1] === '0' && version[2] === '10') { + nextTick = window.setImmediate; + } + return function () { + nextTick(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useVertxTimer() { + return function () { + lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useMutationObserver() { + var iterations = 0; + var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + return function () { + node.data = (iterations = ++iterations % 2); + }; + } + function lib$es6$promise$asap$$useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = lib$es6$promise$asap$$flush; + return function () { + channel.port2.postMessage(0); + }; + } + function lib$es6$promise$asap$$useSetTimeout() { + return function () { + setTimeout(lib$es6$promise$asap$$flush, 1); + }; + } + var lib$es6$promise$asap$$queue = new Array(1000); + function lib$es6$promise$asap$$flush() { + for (var i = 0; i < lib$es6$promise$asap$$len; i += 2) { + var callback = lib$es6$promise$asap$$queue[i]; + var arg = lib$es6$promise$asap$$queue[i + 1]; + callback(arg); + lib$es6$promise$asap$$queue[i] = undefined; + lib$es6$promise$asap$$queue[i + 1] = undefined; + } + lib$es6$promise$asap$$len = 0; + } + var lib$es6$promise$asap$$scheduleFlush; + if (lib$es6$promise$asap$$isNode) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick(); + } + else if (lib$es6$promise$asap$$isWorker) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel(); + } + else { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout(); + } + function lib$es6$promise$$internal$$noop() { } + var lib$es6$promise$$internal$$PENDING = void 0; + var lib$es6$promise$$internal$$FULFILLED = 1; + var lib$es6$promise$$internal$$REJECTED = 2; + var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$selfFullfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function lib$es6$promise$$internal$$cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); + } + function lib$es6$promise$$internal$$getThen(promise) { + try { + return promise.then; + } + catch (error) { + lib$es6$promise$$internal$$GET_THEN_ERROR.error = error; + return lib$es6$promise$$internal$$GET_THEN_ERROR; + } + } + function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } + catch (e) { + return e; + } + } + function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) { + lib$es6$promise$asap$$asap(function (promise) { + var sealed = false; + var error = lib$es6$promise$$internal$$tryThen(then, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + lib$es6$promise$$internal$$reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + if (!sealed && error) { + sealed = true; + lib$es6$promise$$internal$$reject(promise, error); + } + }, promise); + } + function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) { + if (thenable._state === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, thenable._result); + } + else if (thenable._state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, thenable._result); + } + else { + lib$es6$promise$$internal$$subscribe(thenable, undefined, function (value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function (reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + } + function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable) { + if (maybeThenable.constructor === promise.constructor) { + lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable); + } + else { + var then = lib$es6$promise$$internal$$getThen(maybeThenable); + if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error); + } + else if (then === undefined) { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + else if (lib$es6$promise$utils$$isFunction(then)) { + lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then); + } + else { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + } + } + function lib$es6$promise$$internal$$resolve(promise, value) { + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFullfillment()); + } + else if (lib$es6$promise$utils$$objectOrFunction(value)) { + lib$es6$promise$$internal$$handleMaybeThenable(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + } + function lib$es6$promise$$internal$$publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + lib$es6$promise$$internal$$publish(promise); + } + function lib$es6$promise$$internal$$fulfill(promise, value) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._result = value; + promise._state = lib$es6$promise$$internal$$FULFILLED; + if (promise._subscribers.length !== 0) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise); + } + } + function lib$es6$promise$$internal$$reject(promise, reason) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._state = lib$es6$promise$$internal$$REJECTED; + promise._result = reason; + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise); + } + function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) { + var subscribers = parent._subscribers; + var length = subscribers.length; + parent._onerror = null; + subscribers[length] = child; + subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment; + subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection; + if (length === 0 && parent._state) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent); + } + } + function lib$es6$promise$$internal$$publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + if (subscribers.length === 0) { + return; + } + var child, callback, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + if (child) { + lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail); + } + else { + callback(detail); + } + } + promise._subscribers.length = 0; + } + function lib$es6$promise$$internal$$ErrorObject() { + this.error = null; + } + var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$tryCatch(callback, detail) { + try { + return callback(detail); + } + catch (e) { + lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e; + return lib$es6$promise$$internal$$TRY_CATCH_ERROR; + } + } + function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) { + var hasCallback = lib$es6$promise$utils$$isFunction(callback), value, error, succeeded, failed; + if (hasCallback) { + value = lib$es6$promise$$internal$$tryCatch(callback, detail); + if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value = null; + } + else { + succeeded = true; + } + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn()); + return; + } + } + else { + value = detail; + succeeded = true; + } + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + } + else if (hasCallback && succeeded) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else if (failed) { + lib$es6$promise$$internal$$reject(promise, error); + } + else if (settled === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, value); + } + else if (settled === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + } + function lib$es6$promise$$internal$$initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function rejectPromise(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + catch (e) { + lib$es6$promise$$internal$$reject(promise, e); + } + } + function lib$es6$promise$enumerator$$Enumerator(Constructor, input) { + var enumerator = this; + enumerator._instanceConstructor = Constructor; + enumerator.promise = new Constructor(lib$es6$promise$$internal$$noop); + if (enumerator._validateInput(input)) { + enumerator._input = input; + enumerator.length = input.length; + enumerator._remaining = input.length; + enumerator._init(); + if (enumerator.length === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + else { + enumerator.length = enumerator.length || 0; + enumerator._enumerate(); + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + } + } + else { + lib$es6$promise$$internal$$reject(enumerator.promise, enumerator._validationError()); + } + } + lib$es6$promise$enumerator$$Enumerator.prototype._validateInput = function (input) { + return lib$es6$promise$utils$$isArray(input); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._validationError = function () { + return new _Internal.Error('Array Methods must be provided an Array'); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._init = function () { + this._result = new Array(this.length); + }; + var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator; + lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function () { + var enumerator = this; + var length = enumerator.length; + var promise = enumerator.promise; + var input = enumerator._input; + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + enumerator._eachEntry(input[i], i); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function (entry, i) { + var enumerator = this; + var c = enumerator._instanceConstructor; + if (lib$es6$promise$utils$$isMaybeThenable(entry)) { + if (entry.constructor === c && entry._state !== lib$es6$promise$$internal$$PENDING) { + entry._onerror = null; + enumerator._settledAt(entry._state, i, entry._result); + } + else { + enumerator._willSettleAt(c.resolve(entry), i); + } + } + else { + enumerator._remaining--; + enumerator._result[i] = entry; + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function (state, i, value) { + var enumerator = this; + var promise = enumerator.promise; + if (promise._state === lib$es6$promise$$internal$$PENDING) { + enumerator._remaining--; + if (state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + else { + enumerator._result[i] = value; + } + } + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(promise, enumerator._result); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function (promise, i) { + var enumerator = this; + lib$es6$promise$$internal$$subscribe(promise, undefined, function (value) { + enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value); + }, function (reason) { + enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason); + }); + }; + function lib$es6$promise$promise$all$$all(entries) { + return new lib$es6$promise$enumerator$$default(this, entries).promise; + } + var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all; + function lib$es6$promise$promise$race$$race(entries) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + if (!lib$es6$promise$utils$$isArray(entries)) { + lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.')); + return promise; + } + var length = entries.length; + function onFulfillment(value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + function onRejection(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + } + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); + } + return promise; + } + var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race; + function lib$es6$promise$promise$resolve$$resolve(object) { + var Constructor = this; + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$resolve(promise, object); + return promise; + } + var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve; + function lib$es6$promise$promise$reject$$reject(reason) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$reject(promise, reason); + return promise; + } + var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject; + var lib$es6$promise$promise$$counter = 0; + function lib$es6$promise$promise$$needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); + } + function lib$es6$promise$promise$$needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise; + function lib$es6$promise$promise$$Promise(resolver) { + this._id = lib$es6$promise$promise$$counter++; + this._state = undefined; + this._result = undefined; + this._subscribers = []; + if (lib$es6$promise$$internal$$noop !== resolver) { + if (!lib$es6$promise$utils$$isFunction(resolver)) { + lib$es6$promise$promise$$needsResolver(); + } + if (!(this instanceof lib$es6$promise$promise$$Promise)) { + lib$es6$promise$promise$$needsNew(); + } + lib$es6$promise$$internal$$initializePromise(this, resolver); + } + } + lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default; + lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default; + lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default; + lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default; + lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler; + lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap; + lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap; + lib$es6$promise$promise$$Promise.prototype = { + constructor: lib$es6$promise$promise$$Promise, + then: function (onFulfillment, onRejection) { + var parent = this; + var state = parent._state; + if (state === lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state === lib$es6$promise$$internal$$REJECTED && !onRejection) { + return this; + } + var child = new this.constructor(lib$es6$promise$$internal$$noop); + var result = parent._result; + if (state) { + var callback = arguments[state - 1]; + lib$es6$promise$asap$$asap(function () { + lib$es6$promise$$internal$$invokeCallback(state, child, callback, result); + }); + } + else { + lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection); + } + return child; + }, + 'catch': function (onRejection) { + return this.then(null, onRejection); + } + }; + return lib$es6$promise$promise$$default; + }).call(this); + } + PromiseImpl.Init = Init; + })(PromiseImpl = _Internal.PromiseImpl || (_Internal.PromiseImpl = {})); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + function isEdgeLessThan14() { + var userAgent = window.navigator.userAgent; + var versionIdx = userAgent.indexOf("Edge/"); + if (versionIdx >= 0) { + userAgent = userAgent.substring(versionIdx + 5, userAgent.length); + if (userAgent < "14.14393") + return true; + else + return false; + } + return false; + } + function determinePromise() { + if (typeof (window) === "undefined" && typeof (Promise) === "function") { + return Promise; + } + if (typeof (window) !== "undefined" && window.Promise) { + if (isEdgeLessThan14()) { + return _Internal.PromiseImpl.Init(); + } + else { + return window.Promise; + } + } + else { + return _Internal.PromiseImpl.Init(); + } + } + _Internal.OfficePromise = determinePromise(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + var OfficePromise = _Internal.OfficePromise; + OfficeExtension.Promise = OfficePromise; +})(OfficeExtension || (OfficeExtension = {})); +var OfficeExtension; +(function (OfficeExtension_1) { + var SessionBase = (function () { + function SessionBase() { + } + SessionBase.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + SessionBase.prototype._createRequestExecutorOrNull = function () { + return null; + }; + SessionBase.prototype.getEventRegistration = function (controlId) { + return null; + }; + return SessionBase; + }()); + OfficeExtension_1.SessionBase = SessionBase; + var HttpUtility = (function () { + function HttpUtility() { + } + HttpUtility.setCustomSendRequestFunc = function (func) { + HttpUtility.s_customSendRequestFunc = func; + }; + HttpUtility.xhrSendRequestFunc = function (request) { + return CoreUtility.createPromise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open(request.method, request.url); + xhr.onload = function () { + var resp = { + statusCode: xhr.status, + headers: CoreUtility._parseHttpResponseHeaders(xhr.getAllResponseHeaders()), + body: xhr.responseText + }; + resolve(resp); + }; + xhr.onerror = function () { + reject(new _Internal.RuntimeError({ + code: CoreErrorCodes.connectionFailure, + httpStatusCode: xhr.status, + message: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, xhr.statusText) + })); + }; + if (request.headers) { + for (var key in request.headers) { + xhr.setRequestHeader(key, request.headers[key]); + } + } + xhr.send(CoreUtility._getRequestBodyText(request)); + }); + }; + HttpUtility.fetchSendRequestFunc = function (request) { + var requestBodyText = CoreUtility._getRequestBodyText(request); + if (requestBodyText === '') { + requestBodyText = undefined; + } + return fetch(request.url, { + method: request.method, + headers: request.headers, + body: requestBodyText + }) + .then(function (resp) { + return resp.text() + .then(function (body) { + var statusCode = resp.status; + var headers = {}; + resp.headers.forEach(function (value, name) { + headers[name] = value; + }); + var ret = { statusCode: statusCode, headers: headers, body: body }; + return ret; + }); + }); + }; + HttpUtility.sendRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func = HttpUtility.s_customSendRequestFunc; + if (!func) { + if (typeof (fetch) !== 'undefined') { + func = HttpUtility.fetchSendRequestFunc; + } + else { + func = HttpUtility.xhrSendRequestFunc; + } + } + return func(request); + }; + HttpUtility.setCustomSendLocalDocumentRequestFunc = function (func) { + HttpUtility.s_customSendLocalDocumentRequestFunc = func; + }; + HttpUtility.sendLocalDocumentRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func; + func = HttpUtility.s_customSendLocalDocumentRequestFunc || HttpUtility.officeJsSendLocalDocumentRequestFunc; + return func(request); + }; + HttpUtility.officeJsSendLocalDocumentRequestFunc = function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestSafeArray = CoreUtility._buildRequestMessageSafeArray(request); + return CoreUtility.createPromise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { + var response; + if (asyncResult.status == 'succeeded') { + response = { + statusCode: RichApiMessageUtility.getResponseStatusCode(asyncResult), + headers: RichApiMessageUtility.getResponseHeaders(asyncResult), + body: RichApiMessageUtility.getResponseBody(asyncResult) + }; + } + else { + response = RichApiMessageUtility.buildHttpResponseFromOfficeJsError(asyncResult.error.code, asyncResult.error.message); + } + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(response)); + resolve(response); + }); + }); + }; + HttpUtility.validateAndNormalizeRequest = function (request) { + if (CoreUtility.isNullOrUndefined(request)) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + if (CoreUtility.isNullOrEmptyString(request.method)) { + request.method = 'GET'; + } + request.method = request.method.toUpperCase(); + var alreadyHasTestName = false; + if (typeof (request.headers) === 'object' && request.headers[CoreConstants.testRequestNameHeader]) { + alreadyHasTestName = true; + } + if (!alreadyHasTestName) { + var currentTestName = TestUtility._getCurrentTestNameWithSequenceId(); + if (currentTestName) { + if (!request.headers) { + request.headers = {}; + } + request.headers[CoreConstants.testRequestNameHeader] = currentTestName; + } + } + }; + HttpUtility.logRequest = function (request) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Request---'); + CoreUtility.log(request.method + ' ' + request.url); + if (request.headers) { + for (var key in request.headers) { + CoreUtility.log(key + ': ' + request.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(CoreUtility._getRequestBodyText(request)); + } + } + }; + HttpUtility.logResponse = function (response) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Response---'); + CoreUtility.log('' + response.statusCode); + if (response.headers) { + for (var key in response.headers) { + CoreUtility.log(key + ': ' + response.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(response.body); + } + } + }; + HttpUtility._logBodyEnabled = false; + return HttpUtility; + }()); + OfficeExtension_1.HttpUtility = HttpUtility; + var HostBridge = (function () { + function HostBridge(m_bridge) { + var _this = this; + this.m_bridge = m_bridge; + this.m_promiseResolver = {}; + this.m_handlers = []; + this.m_bridge.onMessageFromHost = function (messageText) { + var message = JSON.parse(messageText); + if (message.type == 3) { + var genericMessageBody = message.message; + if (genericMessageBody && genericMessageBody.entries) { + for (var i = 0; i < genericMessageBody.entries.length; i++) { + var entryObjectOrArray = genericMessageBody.entries[i]; + if (Array.isArray(entryObjectOrArray)) { + var entry = { + messageCategory: entryObjectOrArray[0], + messageType: entryObjectOrArray[1], + targetId: entryObjectOrArray[2], + message: entryObjectOrArray[3], + id: entryObjectOrArray[4] + }; + genericMessageBody.entries[i] = entry; + } + } + } + } + _this.dispatchMessage(message); + }; + } + HostBridge.init = function (bridge) { + if (typeof bridge !== 'object' || !bridge) { + return; + } + var instance = new HostBridge(bridge); + HostBridge.s_instance = instance; + HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var index = request.url.indexOf('?'); + if (index >= 0) { + var query = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(query); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + } + if (typeof (request.body) === "string") { + request.body = JSON.parse(request.body); + } + var bridgeMessage = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + message: request + }; + return instance.sendMessageToHostAndExpectResponse(bridgeMessage).then(function (bridgeResponse) { + var responseInfo = bridgeResponse.message; + return responseInfo; + }); + }); + for (var i = 0; i < HostBridge.s_onInitedHandlers.length; i++) { + HostBridge.s_onInitedHandlers[i](instance); + } + }; + Object.defineProperty(HostBridge, "instance", { + get: function () { + return HostBridge.s_instance; + }, + enumerable: true, + configurable: true + }); + HostBridge.prototype.sendMessageToHost = function (message) { + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + }; + HostBridge.prototype.sendMessageToHostAndExpectResponse = function (message) { + var _this = this; + var ret = CoreUtility.createPromise(function (resolve, reject) { + _this.m_promiseResolver[message.id] = resolve; + }); + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + return ret; + }; + HostBridge.prototype.addHostMessageHandler = function (handler) { + this.m_handlers.push(handler); + }; + HostBridge.prototype.removeHostMessageHandler = function (handler) { + var index = this.m_handlers.indexOf(handler); + if (index >= 0) { + this.m_handlers.splice(index, 1); + } + }; + HostBridge.onInited = function (handler) { + HostBridge.s_onInitedHandlers.push(handler); + if (HostBridge.s_instance) { + handler(HostBridge.s_instance); + } + }; + HostBridge.prototype.dispatchMessage = function (message) { + if (typeof message.id === 'number') { + var resolve = this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + delete this.m_promiseResolver[message.id]; + return; + } + } + for (var i = 0; i < this.m_handlers.length; i++) { + this.m_handlers[i](message); + } + }; + HostBridge.nextId = function () { + return HostBridge.s_nextId++; + }; + HostBridge.s_onInitedHandlers = []; + HostBridge.s_nextId = 1; + return HostBridge; + }()); + OfficeExtension_1.HostBridge = HostBridge; + if (typeof _richApiNativeBridge === 'object' && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var _Internal; + (function (_Internal) { + var RuntimeError = (function (_super) { + __extends(RuntimeError, _super); + function RuntimeError(error) { + var _this = _super.call(this, typeof error === 'string' ? error : error.message) || this; + Object.setPrototypeOf(_this, RuntimeError.prototype); + _this.name = 'RichApi.Error'; + if (typeof error === 'string') { + _this.message = error; + } + else { + _this.code = error.code; + _this.message = error.message; + _this.traceMessages = error.traceMessages || []; + _this.innerError = error.innerError || null; + _this.debugInfo = _this._createDebugInfo(error.debugInfo || {}); + _this.httpStatusCode = error.httpStatusCode; + _this.data = error.data; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode) || _this.httpStatusCode === 200) { + var mapping = {}; + mapping[CoreErrorCodes.accessDenied] = 401; + mapping[CoreErrorCodes.connectionFailure] = 500; + mapping[CoreErrorCodes.generalException] = 500; + mapping[CoreErrorCodes.invalidArgument] = 400; + mapping[CoreErrorCodes.invalidObjectPath] = 400; + mapping[CoreErrorCodes.invalidOrTimedOutSession] = 408; + mapping[CoreErrorCodes.invalidRequestContext] = 400; + mapping[CoreErrorCodes.timeout] = 408; + mapping[CoreErrorCodes.valueNotLoaded] = 400; + _this.httpStatusCode = mapping[_this.code]; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode)) { + _this.httpStatusCode = 500; + } + return _this; + } + RuntimeError.prototype.toString = function () { + return this.code + ': ' + this.message; + }; + RuntimeError.prototype._createDebugInfo = function (partialDebugInfo) { + var debugInfo = { + code: this.code, + message: this.message + }; + debugInfo.toString = function () { + return JSON.stringify(this); + }; + for (var key in partialDebugInfo) { + debugInfo[key] = partialDebugInfo[key]; + } + if (this.innerError) { + if (this.innerError instanceof _Internal.RuntimeError) { + debugInfo.innerError = this.innerError.debugInfo; + } + else { + debugInfo.innerError = this.innerError; + } + } + return debugInfo; + }; + RuntimeError._createInvalidArgError = function (error) { + return new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility.isNullOrEmptyString(error.argumentName) + ? CoreUtility._getResourceString(CoreResourceStrings.invalidArgumentGeneric) + : CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, error.argumentName), + debugInfo: error.errorLocation ? { errorLocation: error.errorLocation } : {}, + innerError: error.innerError + }); + }; + return RuntimeError; + }(Error)); + _Internal.RuntimeError = RuntimeError; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + OfficeExtension_1.Error = _Internal.RuntimeError; + var CoreErrorCodes = (function () { + function CoreErrorCodes() { + } + CoreErrorCodes.apiNotFound = 'ApiNotFound'; + CoreErrorCodes.accessDenied = 'AccessDenied'; + CoreErrorCodes.generalException = 'GeneralException'; + CoreErrorCodes.activityLimitReached = 'ActivityLimitReached'; + CoreErrorCodes.invalidArgument = 'InvalidArgument'; + CoreErrorCodes.connectionFailure = 'ConnectionFailure'; + CoreErrorCodes.timeout = 'Timeout'; + CoreErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + CoreErrorCodes.invalidObjectPath = 'InvalidObjectPath'; + CoreErrorCodes.invalidRequestContext = 'InvalidRequestContext'; + CoreErrorCodes.valueNotLoaded = 'ValueNotLoaded'; + CoreErrorCodes.requestPayloadSizeLimitExceeded = 'RequestPayloadSizeLimitExceeded'; + CoreErrorCodes.responsePayloadSizeLimitExceeded = 'ResponsePayloadSizeLimitExceeded'; + CoreErrorCodes.writeNotSupportedWhenModalDialogOpen = 'WriteNotSupportedWhenModalDialogOpen'; + return CoreErrorCodes; + }()); + OfficeExtension_1.CoreErrorCodes = CoreErrorCodes; + var CoreResourceStrings = (function () { + function CoreResourceStrings() { + } + CoreResourceStrings.apiNotFoundDetails = 'ApiNotFoundDetails'; + CoreResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + CoreResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + CoreResourceStrings.invalidArgument = 'InvalidArgument'; + CoreResourceStrings.invalidArgumentGeneric = 'InvalidArgumentGeneric'; + CoreResourceStrings.timeout = 'Timeout'; + CoreResourceStrings.invalidOrTimedOutSessionMessage = 'InvalidOrTimedOutSessionMessage'; + CoreResourceStrings.invalidSheetName = 'InvalidSheetName'; + CoreResourceStrings.invalidObjectPath = 'InvalidObjectPath'; + CoreResourceStrings.invalidRequestContext = 'InvalidRequestContext'; + CoreResourceStrings.valueNotLoaded = 'ValueNotLoaded'; + return CoreResourceStrings; + }()); + OfficeExtension_1.CoreResourceStrings = CoreResourceStrings; + var CoreConstants = (function () { + function CoreConstants() { + } + CoreConstants.flags = 'flags'; + CoreConstants.sourceLibHeader = 'SdkVersion'; + CoreConstants.processQuery = 'ProcessQuery'; + CoreConstants.localDocument = 'http://document.localhost/'; + CoreConstants.localDocumentApiPrefix = 'http://document.localhost/_api/'; + CoreConstants.customData = 'customdata'; + CoreConstants.testRequestNameHeader = 'x-test-request-name'; + return CoreConstants; + }()); + OfficeExtension_1.CoreConstants = CoreConstants; + var RichApiMessageUtility = (function () { + function RichApiMessageUtility() { + } + RichApiMessageUtility.buildMessageArrayForIRequestExecutor = function (customData, requestFlags, requestMessage, sourceLibHeaderValue) { + var requestMessageText = JSON.stringify(requestMessage.Body); + CoreUtility.log('Request:'); + CoreUtility.log(requestMessageText); + var headers = {}; + CoreUtility._copyHeaders(requestMessage.Headers, headers); + headers[CoreConstants.sourceLibHeader] = sourceLibHeaderValue; + var messageSafearray = RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, 'POST', CoreConstants.processQuery, headers, requestMessageText); + return messageSafearray; + }; + RichApiMessageUtility.buildResponseOnSuccess = function (responseBody, responseHeaders) { + var response = { HttpStatusCode: 200, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.Body = JSON.parse(responseBody); + response.Headers = responseHeaders; + return response; + }; + RichApiMessageUtility.buildResponseOnError = function (errorCode, message) { + var response = { HttpStatusCode: 500, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.ErrorCode = CoreErrorCodes.generalException; + response.ErrorMessage = message; + if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + response.ErrorCode = CoreErrorCodes.accessDenied; + response.HttpStatusCode = 401; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + response.ErrorCode = CoreErrorCodes.activityLimitReached; + response.HttpStatusCode = 429; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession) { + response.ErrorCode = CoreErrorCodes.invalidOrTimedOutSession; + response.HttpStatusCode = 408; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidOrTimedOutSessionMessage); + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.requestPayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.responsePayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen) { + response.ErrorCode = CoreErrorCodes.writeNotSupportedWhenModalDialogOpen; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName) { + response.ErrorCode = CoreErrorCodes.invalidRequestContext; + response.HttpStatusCode = 400; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidSheetName); + } + return response; + }; + RichApiMessageUtility.buildHttpResponseFromOfficeJsError = function (errorCode, message) { + var statusCode = 500; + var errorBody = {}; + errorBody['error'] = {}; + errorBody['error']['code'] = CoreErrorCodes.generalException; + errorBody['error']['message'] = message; + if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + statusCode = 403; + errorBody['error']['code'] = CoreErrorCodes.accessDenied; + } + else if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + statusCode = 429; + errorBody['error']['code'] = CoreErrorCodes.activityLimitReached; + } + return { statusCode: statusCode, headers: {}, body: JSON.stringify(errorBody) }; + }; + RichApiMessageUtility.buildRequestMessageSafeArray = function (customData, requestFlags, method, path, headers, body) { + var headerArray = []; + if (headers) { + for (var headerName in headers) { + headerArray.push(headerName); + headerArray.push(headers[headerName]); + } + } + var appPermission = 0; + var solutionId = ''; + var instanceId = ''; + var marketplaceType = ''; + var solutionVersion = ''; + var storeLocation = ''; + var compliantSolutionId = ''; + return [ + customData, + method, + path, + headerArray, + body, + appPermission, + requestFlags, + solutionId, + instanceId, + marketplaceType, + solutionVersion, + storeLocation, + compliantSolutionId + ]; + }; + RichApiMessageUtility.getResponseBody = function (result) { + return RichApiMessageUtility.getResponseBodyFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseHeaders = function (result) { + return RichApiMessageUtility.getResponseHeadersFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseBodyFromSafeArray = function (data) { + var ret = data[2]; + if (typeof ret === 'string') { + return ret; + } + var arr = ret; + return arr.join(''); + }; + RichApiMessageUtility.getResponseHeadersFromSafeArray = function (data) { + var arrayHeader = data[1]; + if (!arrayHeader) { + return null; + } + var headers = {}; + for (var i = 0; i < arrayHeader.length - 1; i += 2) { + headers[arrayHeader[i]] = arrayHeader[i + 1]; + } + return headers; + }; + RichApiMessageUtility.getResponseStatusCode = function (result) { + return RichApiMessageUtility.getResponseStatusCodeFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseStatusCodeFromSafeArray = function (data) { + return data[0]; + }; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession = 5012; + RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached = 5102; + RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability = 7000; + RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded = 5103; + RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded = 5104; + RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen = 5016; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName = 1014; + return RichApiMessageUtility; + }()); + OfficeExtension_1.RichApiMessageUtility = RichApiMessageUtility; + (function (_Internal) { + function getPromiseType() { + if (typeof Promise !== 'undefined') { + return Promise; + } + if (typeof Office !== 'undefined') { + if (Office.Promise) { + return Office.Promise; + } + } + if (typeof OfficeExtension !== 'undefined') { + if (OfficeExtension.Promise) { + return OfficeExtension.Promise; + } + } + throw new _Internal.Error('No Promise implementation found'); + } + _Internal.getPromiseType = getPromiseType; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var CoreUtility = (function () { + function CoreUtility() { + } + CoreUtility.log = function (message) { + if (CoreUtility._logEnabled && typeof console !== 'undefined' && console.log) { + console.log(message); + } + }; + CoreUtility.checkArgumentNull = function (value, name) { + if (CoreUtility.isNullOrUndefined(value)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: name }); + } + }; + CoreUtility.isNullOrUndefined = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isUndefined = function (value) { + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isNullOrEmptyString = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + if (value.length == 0) { + return true; + } + return false; + }; + CoreUtility.isPlainJsonObject = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return false; + } + if (typeof value !== 'object') { + return false; + } + if (Object.prototype.toString.apply(value) !== '[object Object]') { + return false; + } + if (value.constructor && + !Object.prototype.hasOwnProperty.call(value, 'constructor') && + !Object.prototype.hasOwnProperty.call(value.constructor.prototype, 'hasOwnProperty')) { + return false; + } + for (var key in value) { + if (!Object.prototype.hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + }; + CoreUtility.trim = function (str) { + return str.replace(new RegExp('^\\s+|\\s+$', 'g'), ''); + }; + CoreUtility.caseInsensitiveCompareString = function (str1, str2) { + if (CoreUtility.isNullOrUndefined(str1)) { + return CoreUtility.isNullOrUndefined(str2); + } + else { + if (CoreUtility.isNullOrUndefined(str2)) { + return false; + } + else { + return str1.toUpperCase() == str2.toUpperCase(); + } + } + }; + CoreUtility.isReadonlyRestRequest = function (method) { + return CoreUtility.caseInsensitiveCompareString(method, 'GET'); + }; + CoreUtility._getResourceString = function (resourceId, arg) { + var ret; + if (typeof window !== 'undefined' && window.Strings && window.Strings.OfficeOM) { + var stringName = 'L_' + resourceId; + var stringValue = window.Strings.OfficeOM[stringName]; + if (stringValue) { + ret = stringValue; + } + } + if (!ret) { + ret = CoreUtility.s_resourceStringValues[resourceId]; + } + if (!ret) { + ret = resourceId; + } + if (!CoreUtility.isNullOrUndefined(arg)) { + if (Array.isArray(arg)) { + var arrArg = arg; + ret = CoreUtility._formatString(ret, arrArg); + } + else { + ret = ret.replace('{0}', arg); + } + } + return ret; + }; + CoreUtility._formatString = function (format, arrArg) { + return format.replace(/\{\d\}/g, function (v) { + var position = parseInt(v.substr(1, v.length - 2)); + if (position < arrArg.length) { + return arrArg[position]; + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'format' }); + } + }); + }; + Object.defineProperty(CoreUtility, "Promise", { + get: function () { + return _Internal.getPromiseType(); + }, + enumerable: true, + configurable: true + }); + CoreUtility.createPromise = function (executor) { + var ret = new CoreUtility.Promise(executor); + return ret; + }; + CoreUtility._createPromiseFromResult = function (value) { + return CoreUtility.createPromise(function (resolve, reject) { + resolve(value); + }); + }; + CoreUtility._createPromiseFromException = function (reason) { + return CoreUtility.createPromise(function (resolve, reject) { + reject(reason); + }); + }; + CoreUtility._createTimeoutPromise = function (timeout) { + return CoreUtility.createPromise(function (resolve, reject) { + setTimeout(function () { + resolve(null); + }, timeout); + }); + }; + CoreUtility._createInvalidArgError = function (error) { + return _Internal.RuntimeError._createInvalidArgError(error); + }; + CoreUtility._isLocalDocumentUrl = function (url) { + return CoreUtility._getLocalDocumentUrlPrefixLength(url) > 0; + }; + CoreUtility._getLocalDocumentUrlPrefixLength = function (url) { + var localDocumentPrefixes = [ + 'http://document.localhost', + 'https://document.localhost', + '//document.localhost' + ]; + var urlLower = url.toLowerCase().trim(); + for (var i = 0; i < localDocumentPrefixes.length; i++) { + if (urlLower === localDocumentPrefixes[i]) { + return localDocumentPrefixes[i].length; + } + else if (urlLower.substr(0, localDocumentPrefixes[i].length + 1) === localDocumentPrefixes[i] + '/') { + return localDocumentPrefixes[i].length + 1; + } + } + return 0; + }; + CoreUtility._validateLocalDocumentRequest = function (request) { + var index = CoreUtility._getLocalDocumentUrlPrefixLength(request.url); + if (index <= 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + var path = request.url.substr(index); + var pathLower = path.toLowerCase(); + if (pathLower === '_api') { + path = ''; + } + else if (pathLower.substr(0, '_api/'.length) === '_api/') { + path = path.substr('_api/'.length); + } + return { + method: request.method, + url: path, + headers: request.headers, + body: request.body + }; + }; + CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny = function (queryString) { + var ret = { flags: -1, customData: '' }; + var parts = queryString.split('&'); + for (var i = 0; i < parts.length; i++) { + var keyvalue = parts[i].split('='); + if (keyvalue[0].toLowerCase() === CoreConstants.flags) { + var flags = parseInt(keyvalue[1]); + flags = flags & 8191; + ret.flags = flags; + } + else if (keyvalue[0].toLowerCase() === CoreConstants.customData) { + ret.customData = decodeURIComponent(keyvalue[1]); + } + } + return ret; + }; + CoreUtility._getRequestBodyText = function (request) { + var body = ''; + if (typeof request.body === 'string') { + body = request.body; + } + else if (request.body && typeof request.body === 'object') { + body = JSON.stringify(request.body); + } + return body; + }; + CoreUtility._parseResponseBody = function (response) { + if (typeof response.body === 'string') { + var bodyText = CoreUtility.trim(response.body); + return JSON.parse(bodyText); + } + else { + return response.body; + } + }; + CoreUtility._buildRequestMessageSafeArray = function (request) { + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var customData = ''; + if (request.url.substr(0, CoreConstants.processQuery.length).toLowerCase() === + CoreConstants.processQuery.toLowerCase()) { + var index = request.url.indexOf('?'); + if (index > 0) { + var queryString = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(queryString); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + customData = flagsAndCustomData.customData; + } + } + return RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, request.method, request.url, request.headers, CoreUtility._getRequestBodyText(request)); + }; + CoreUtility._parseHttpResponseHeaders = function (allResponseHeaders) { + var responseHeaders = {}; + if (!CoreUtility.isNullOrEmptyString(allResponseHeaders)) { + var regex = new RegExp('\r?\n'); + var entries = allResponseHeaders.split(regex); + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + if (entry != null) { + var index = entry.indexOf(':'); + if (index > 0) { + var key = entry.substr(0, index); + var value = entry.substr(index + 1); + key = CoreUtility.trim(key); + value = CoreUtility.trim(value); + responseHeaders[key.toUpperCase()] = value; + } + } + } + } + return responseHeaders; + }; + CoreUtility._parseErrorResponse = function (responseInfo) { + var errorObj = CoreUtility._parseErrorResponseBody(responseInfo); + var statusCode = responseInfo.statusCode.toString(); + if (CoreUtility.isNullOrUndefined(errorObj) || typeof errorObj !== 'object' || !errorObj.error) { + return CoreUtility._createDefaultErrorResponse(statusCode); + } + var error = errorObj.error; + var innerError = error.innerError; + if (innerError && innerError.code) { + return CoreUtility._createErrorResponse(innerError.code, statusCode, innerError.message); + } + if (error.code) { + return CoreUtility._createErrorResponse(error.code, statusCode, error.message); + } + return CoreUtility._createDefaultErrorResponse(statusCode); + }; + CoreUtility._parseErrorResponseBody = function (responseInfo) { + if (CoreUtility.isPlainJsonObject(responseInfo.body)) { + return responseInfo.body; + } + else if (!CoreUtility.isNullOrEmptyString(responseInfo.body)) { + var errorResponseBody = CoreUtility.trim(responseInfo.body); + try { + return JSON.parse(errorResponseBody); + } + catch (e) { + CoreUtility.log('Error when parse ' + errorResponseBody); + } + } + }; + CoreUtility._createDefaultErrorResponse = function (statusCode) { + return { + errorCode: CoreErrorCodes.connectionFailure, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, statusCode) + }; + }; + CoreUtility._createErrorResponse = function (code, statusCode, message) { + return { + errorCode: code, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithDetails, [ + statusCode, + code, + message + ]) + }; + }; + CoreUtility._copyHeaders = function (src, dest) { + if (src && dest) { + for (var key in src) { + dest[key] = src[key]; + } + } + }; + CoreUtility.addResourceStringValues = function (values) { + for (var key in values) { + CoreUtility.s_resourceStringValues[key] = values[key]; + } + }; + CoreUtility._logEnabled = false; + CoreUtility.s_resourceStringValues = { + ApiNotFoundDetails: 'The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.', + ConnectionFailureWithStatus: 'The request failed with status code of {0}.', + ConnectionFailureWithDetails: 'The request failed with status code of {0}, error code {1} and the following error message: {2}', + InvalidArgument: "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.", + InvalidObjectPath: 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.', + InvalidRequestContext: 'Cannot use the object across different request contexts.', + Timeout: 'The operation has timed out.', + ValueNotLoaded: 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.' + }; + return CoreUtility; + }()); + OfficeExtension_1.CoreUtility = CoreUtility; + var TestUtility = (function () { + function TestUtility() { + } + TestUtility.setMock = function (value) { + TestUtility.s_isMock = value; + }; + TestUtility.isMock = function () { + return TestUtility.s_isMock; + }; + TestUtility._setCurrentTestName = function (value) { + TestUtility.s_currentTestName = value; + TestUtility.s_currentTestSequenceId = 0; + }; + TestUtility._getCurrentTestNameWithSequenceId = function () { + if (TestUtility.s_currentTestName) { + TestUtility.s_currentTestSequenceId++; + return TestUtility.s_currentTestName + "." + TestUtility.s_currentTestSequenceId; + } + return null; + }; + return TestUtility; + }()); + OfficeExtension_1.TestUtility = TestUtility; + OfficeExtension_1._internalConfig = { + showDisposeInfoInDebugInfo: false, + showInternalApiInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectUpdateMethod: false, + alwaysPolyfillClientObjectRetrieveMethod: false, + enableConcurrentFlag: true, + enableUndoableFlag: true, + appendTypeNameToObjectPathInfo: false, + enablePreviewExecution: false + }; + OfficeExtension_1.config = { + extendedErrorLogging: false + }; + var CommonActionFactory = (function () { + function CommonActionFactory() { + } + CommonActionFactory.createSetPropertyAction = function (context, parent, propertyName, value, flags) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var args = [value]; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + CommonUtility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var action = new Action(actionInfo, 0, flags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (flags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectId: '', + ObjectType: '', + Arguments: [value] + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return parent._addAction(action); + }; + CommonActionFactory.createQueryAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 2, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createQueryAsJsonAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 7, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createUpdateAction = function (context, parent, objectState) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 9, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 0, 0); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action); + }; + return CommonActionFactory; + }()); + OfficeExtension_1.CommonActionFactory = CommonActionFactory; + var ClientObjectBase = (function () { + function ClientObjectBase(contextBase, objectPath) { + this.m_contextBase = contextBase; + this.m_objectPath = objectPath; + } + Object.defineProperty(ClientObjectBase.prototype, "_objectPath", { + get: function () { + return this.m_objectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObjectBase.prototype, "_context", { + get: function () { + return this.m_contextBase; + }, + enumerable: true, + configurable: true + }); + ClientObjectBase.prototype._addAction = function (action, resultHandler) { + var _this = this; + if (resultHandler === void 0) { + resultHandler = null; + } + return CoreUtility.createPromise(function (resolve, reject) { + _this._context._addServiceApiAction(action, resultHandler, resolve, reject); + }); + }; + ClientObjectBase.prototype._addPreviewExecutionAction = function (action) { + }; + ClientObjectBase.prototype._retrieve = function (option, resultHandler) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var queryOption = ClientRequestContextBase._parseQueryOption(option); + if (shouldPolyfill) { + return CommonActionFactory.createQueryAction(this._context, this, queryOption, resultHandler); + } + return CommonActionFactory.createQueryAsJsonAction(this._context, this, queryOption, resultHandler); + }; + ClientObjectBase.prototype._recursivelyUpdate = function (properties) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectUpdateMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.2'); + } + try { + var scalarPropNames = this[CommonConstants.scalarPropertyNames]; + if (!scalarPropNames) { + scalarPropNames = []; + } + var scalarPropUpdatable = this[CommonConstants.scalarPropertyUpdateable]; + if (!scalarPropUpdatable) { + scalarPropUpdatable = []; + for (var i = 0; i < scalarPropNames.length; i++) { + scalarPropUpdatable.push(false); + } + } + var navigationPropNames = this[CommonConstants.navigationPropertyNames]; + if (!navigationPropNames) { + navigationPropNames = []; + } + var scalarProps = {}; + var navigationProps = {}; + var scalarPropCount = 0; + for (var propName in properties) { + var index = scalarPropNames.indexOf(propName); + if (index >= 0) { + if (!scalarPropUpdatable[index]) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, propName), + debugInfo: { + errorLocation: propName + } + }); + } + scalarProps[propName] = properties[propName]; + ++scalarPropCount; + } + else if (navigationPropNames.indexOf(propName) >= 0) { + navigationProps[propName] = properties[propName]; + } + else { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, propName), + debugInfo: { + errorLocation: propName + } + }); + } + } + if (scalarPropCount > 0) { + if (shouldPolyfill) { + for (var i = 0; i < scalarPropNames.length; i++) { + var propName = scalarPropNames[i]; + var propValue = scalarProps[propName]; + if (!CommonUtility.isUndefined(propValue)) { + CommonActionFactory.createSetPropertyAction(this._context, this, propName, propValue); + } + } + } + else { + CommonActionFactory.createUpdateAction(this._context, this, scalarProps); + } + } + for (var propName in navigationProps) { + var navigationPropProxy = this[propName]; + var navigationPropValue = navigationProps[propName]; + navigationPropProxy._recursivelyUpdate(navigationPropValue); + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.update' + }, + innerError: innerError + }); + } + }; + return ClientObjectBase; + }()); + OfficeExtension_1.ClientObjectBase = ClientObjectBase; + var Action = (function () { + function Action(actionInfo, operationType, flags) { + this.m_actionInfo = actionInfo; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(Action.prototype, "actionInfo", { + get: function () { + return this.m_actionInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + return Action; + }()); + OfficeExtension_1.Action = Action; + var ObjectPath = (function () { + function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest, operationType, flags) { + this.m_objectPathInfo = objectPathInfo; + this.m_parentObjectPath = parentObjectPath; + this.m_isCollection = isCollection; + this.m_isInvalidAfterRequest = isInvalidAfterRequest; + this.m_isValid = true; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(ObjectPath.prototype, "id", { + get: function () { + var argumentInfo = this.m_objectPathInfo.ArgumentInfo; + if (!argumentInfo) { + return undefined; + } + var argument = argumentInfo.Arguments; + if (!argument) { + return undefined; + } + return argument[0]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parent", { + get: function () { + var parent = this.m_parentObjectPath; + if (!parent) { + return undefined; + } + return parent; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentId", { + get: function () { + return this.parent ? this.parent.id : undefined; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "objectPathInfo", { + get: function () { + return this.m_objectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isCollection", { + get: function () { + return this.m_isCollection; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isInvalidAfterRequest", { + get: function () { + return this.m_isInvalidAfterRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentObjectPath", { + get: function () { + return this.m_parentObjectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "argumentObjectPaths", { + get: function () { + return this.m_argumentObjectPaths; + }, + set: function (value) { + this.m_argumentObjectPaths = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isValid", { + get: function () { + return this.m_isValid; + }, + set: function (value) { + this.m_isValid = value; + if (!value && + this.m_objectPathInfo.ObjectPathType === 6 && + this.m_savedObjectPathInfo) { + ObjectPath.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo, this.m_objectPathInfo); + this.m_parentObjectPath = this.m_savedObjectPathInfo.parent; + this.m_isValid = true; + this.m_savedObjectPathInfo = null; + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "originalObjectPathInfo", { + get: function () { + return this.m_originalObjectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "getByIdMethodName", { + get: function () { + return this.m_getByIdMethodName; + }, + set: function (value) { + this.m_getByIdMethodName = value; + }, + enumerable: true, + configurable: true + }); + ObjectPath.prototype._updateAsNullObject = function () { + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 7; + this.m_objectPathInfo.Name = ''; + this.m_parentObjectPath = null; + }; + ObjectPath.prototype.saveOriginalObjectPathInfo = function () { + if (OfficeExtension_1.config.extendedErrorLogging && !this.m_originalObjectPathInfo) { + this.m_originalObjectPathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, this.m_originalObjectPathInfo); + } + }; + ObjectPath.prototype.updateUsingObjectData = function (value, clientObject) { + var referenceId = value[CommonConstants.referenceId]; + if (!CoreUtility.isNullOrEmptyString(referenceId)) { + if (!this.m_savedObjectPathInfo && + !this.isInvalidAfterRequest && + ObjectPath.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)) { + var pathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, pathInfo); + this.m_savedObjectPathInfo = { + pathInfo: pathInfo, + parent: this.m_parentObjectPath + }; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 6; + this.m_objectPathInfo.Name = referenceId; + delete this.m_objectPathInfo.ParentObjectPathId; + this.m_parentObjectPath = null; + return; + } + if (clientObject) { + var collectionPropertyPath = clientObject[CommonConstants.collectionPropertyPath]; + if (!CoreUtility.isNullOrEmptyString(collectionPropertyPath) && clientObject.context) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + var propNames = collectionPropertyPath.split('.'); + var parent_1 = clientObject.context[propNames[0]]; + for (var i = 1; i < propNames.length; i++) { + parent_1 = parent_1[propNames[i]]; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_parentObjectPath = parent_1._objectPath; + this.m_objectPathInfo.ParentObjectPathId = this.m_parentObjectPath.objectPathInfo.Id; + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + } + var parentIsCollection = this.parentObjectPath && this.parentObjectPath.isCollection; + var getByIdMethodName = this.getByIdMethodName; + if (parentIsCollection || !CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + if (!CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + this.m_objectPathInfo.ObjectPathType = 3; + this.m_objectPathInfo.Name = getByIdMethodName; + } + else { + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + } + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + }; + ObjectPath.prototype.resetForUpdateUsingObjectData = function () { + this.m_isInvalidAfterRequest = false; + this.m_isValid = true; + this.m_operationType = 1; + this.m_flags = 4; + this.m_objectPathInfo.ArgumentInfo = {}; + this.m_argumentObjectPaths = null; + this.m_getByIdMethodName = null; + }; + ObjectPath.isRestorableObjectPath = function (objectPathType) { + return (objectPathType === 1 || + objectPathType === 5 || + objectPathType === 3 || + objectPathType === 4); + }; + ObjectPath.copyObjectPathInfo = function (src, dest) { + dest.Id = src.Id; + dest.ArgumentInfo = src.ArgumentInfo; + dest.Name = src.Name; + dest.ObjectPathType = src.ObjectPathType; + dest.ParentObjectPathId = src.ParentObjectPathId; + }; + return ObjectPath; + }()); + OfficeExtension_1.ObjectPath = ObjectPath; + var ClientRequestContextBase = (function () { + function ClientRequestContextBase() { + this.m_nextId = 0; + } + ClientRequestContextBase.prototype._nextId = function () { + return ++this.m_nextId; + }; + ClientRequestContextBase.prototype._addServiceApiAction = function (action, resultHandler, resolve, reject) { + if (!this.m_serviceApiQueue) { + this.m_serviceApiQueue = new ServiceApiQueue(this); + } + this.m_serviceApiQueue.add(action, resultHandler, resolve, reject); + }; + ClientRequestContextBase._parseQueryOption = function (option) { + var queryOption = {}; + if (typeof option === 'string') { + var select = option; + queryOption.Select = CommonUtility._parseSelectExpand(select); + } + else if (Array.isArray(option)) { + queryOption.Select = option; + } + else if (typeof option === 'object') { + var loadOption = option; + if (ClientRequestContextBase.isLoadOption(loadOption)) { + if (typeof loadOption.select === 'string') { + queryOption.Select = CommonUtility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select = loadOption.select; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.select)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.select' }); + } + if (typeof loadOption.expand === 'string') { + queryOption.Expand = CommonUtility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand = loadOption.expand; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.expand)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.expand' }); + } + if (typeof loadOption.top === 'number') { + queryOption.Top = loadOption.top; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.top)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.top' }); + } + if (typeof loadOption.skip === 'number') { + queryOption.Skip = loadOption.skip; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.skip)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.skip' }); + } + } + else { + queryOption = ClientRequestContextBase.parseStrictLoadOption(option); + } + } + else if (!CommonUtility.isNullOrUndefined(option)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option' }); + } + return queryOption; + }; + ClientRequestContextBase.isLoadOption = function (loadOption) { + if (!CommonUtility.isUndefined(loadOption.select) && + (typeof loadOption.select === 'string' || Array.isArray(loadOption.select))) + return true; + if (!CommonUtility.isUndefined(loadOption.expand) && + (typeof loadOption.expand === 'string' || Array.isArray(loadOption.expand))) + return true; + if (!CommonUtility.isUndefined(loadOption.top) && typeof loadOption.top === 'number') + return true; + if (!CommonUtility.isUndefined(loadOption.skip) && typeof loadOption.skip === 'number') + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContextBase.parseStrictLoadOption = function (option) { + var ret = { Select: [] }; + ClientRequestContextBase.parseStrictLoadOptionHelper(ret, '', 'option', option); + return ret; + }; + ClientRequestContextBase.combineQueryPath = function (pathPrefix, key, separator) { + if (pathPrefix.length === 0) { + return key; + } + else { + return pathPrefix + separator + key; + } + }; + ClientRequestContextBase.parseStrictLoadOptionHelper = function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value = option[key]; + if (key === '$all') { + if (typeof value !== 'boolean') { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, '*', '/')); + } + } + else if (key === '$top') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Top = value; + } + else if (key === '$skip') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Skip = value; + } + else { + if (typeof value === 'boolean') { + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/')); + } + } + else if (typeof value === 'object') { + ClientRequestContextBase.parseStrictLoadOptionHelper(queryInfo, ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/'), ClientRequestContextBase.combineQueryPath(argPrefix, key, '.'), value); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + } + } + }; + return ClientRequestContextBase; + }()); + OfficeExtension_1.ClientRequestContextBase = ClientRequestContextBase; + var InstantiateActionUpdateObjectPathHandler = (function () { + function InstantiateActionUpdateObjectPathHandler(m_objectPath) { + this.m_objectPath = m_objectPath; + } + InstantiateActionUpdateObjectPathHandler.prototype._handleResult = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + this.m_objectPath._updateAsNullObject(); + } + else { + this.m_objectPath.updateUsingObjectData(value, null); + } + }; + return InstantiateActionUpdateObjectPathHandler; + }()); + var ClientRequestBase = (function () { + function ClientRequestBase(context) { + this.m_contextBase = context; + this.m_actions = []; + this.m_actionResultHandler = {}; + this.m_referencedObjectPaths = {}; + this.m_instantiatedObjectPaths = {}; + this.m_preSyncPromises = []; + this.m_previewExecutionActions = []; + } + ClientRequestBase.prototype.addAction = function (action) { + this.m_actions.push(action); + if (action.actionInfo.ActionType == 1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId] = action; + } + }; + ClientRequestBase.prototype.addPreviewExecutionAction = function (action) { + this.m_previewExecutionActions.push(action); + }; + Object.defineProperty(ClientRequestBase.prototype, "hasActions", { + get: function () { + return this.m_actions.length > 0; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._getLastAction = function () { + return this.m_actions[this.m_actions.length - 1]; + }; + ClientRequestBase.prototype.ensureInstantiateObjectPath = function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo = { + Id: this.m_contextBase._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction = new Action(actionInfo, 1, 4); + instantiateAction.referencedObjectPath = objectPath; + this.addReferencedObjectPath(objectPath); + this.addAction(instantiateAction); + var resultHandler = new InstantiateActionUpdateObjectPathHandler(objectPath); + this.addActionResultHandler(instantiateAction, resultHandler); + } + } + }; + ClientRequestBase.prototype.ensureInstantiateObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addReferencedObjectPath = function (objectPath) { + if (!objectPath || this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + while (objectPath) { + this.m_referencedObjectPaths[objectPath.objectPathInfo.Id] = objectPath; + if (objectPath.objectPathInfo.ObjectPathType == 3) { + this.addReferencedObjectPaths(objectPath.argumentObjectPaths); + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase.prototype.addReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.addReferencedObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addActionResultHandler = function (action, resultHandler) { + this.m_actionResultHandler[action.actionInfo.Id] = resultHandler; + }; + ClientRequestBase.prototype.aggregrateRequestFlags = function (requestFlags, operationType, flags) { + if (operationType === 0) { + requestFlags = requestFlags | 1; + if ((flags & 2) === 0) { + requestFlags = requestFlags & ~16; + } + if ((flags & 8) === 0) { + requestFlags = requestFlags & ~256; + } + requestFlags = requestFlags & ~4; + } + if (flags & 1) { + requestFlags = requestFlags | 2; + } + if ((flags & 4) === 0) { + requestFlags = requestFlags & ~4; + } + return requestFlags; + }; + ClientRequestBase.prototype.finallyNormalizeFlags = function (requestFlags) { + if ((requestFlags & 1) === 0) { + requestFlags = requestFlags & ~16; + requestFlags = requestFlags & ~256; + } + if (!OfficeExtension_1._internalConfig.enableConcurrentFlag) { + requestFlags = requestFlags & ~4; + } + if (!OfficeExtension_1._internalConfig.enableUndoableFlag) { + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.1')) { + requestFlags = requestFlags & ~4; + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.2')) { + requestFlags = requestFlags & ~256; + } + if (typeof this.m_flagsForTesting === 'number') { + requestFlags = this.m_flagsForTesting; + } + return requestFlags; + }; + ClientRequestBase.prototype.buildRequestMessageBodyAndRequestFlags = function () { + if (OfficeExtension_1._internalConfig.enableEarlyDispose) { + ClientRequestBase._calculateLastUsedObjectPathIds(this.m_actions); + } + var requestFlags = 4 | + 16 | + 256; + var objectPaths = {}; + for (var i in this.m_referencedObjectPaths) { + requestFlags = this.aggregrateRequestFlags(requestFlags, this.m_referencedObjectPaths[i].operationType, this.m_referencedObjectPaths[i].flags); + objectPaths[i] = this.m_referencedObjectPaths[i].objectPathInfo; + } + var actions = []; + var hasKeepReference = false; + for (var index = 0; index < this.m_actions.length; index++) { + var action = this.m_actions[index]; + if (action.actionInfo.ActionType === 3 && + action.actionInfo.Name === CommonConstants.keepReference) { + hasKeepReference = true; + } + requestFlags = this.aggregrateRequestFlags(requestFlags, action.operationType, action.flags); + actions.push(action.actionInfo); + } + requestFlags = this.finallyNormalizeFlags(requestFlags); + var body = { + AutoKeepReference: this.m_contextBase._autoCleanup && hasKeepReference, + Actions: actions, + ObjectPaths: objectPaths + }; + if (this.m_previewExecutionActions.length > 0) { + body.PreviewExecutionActions = this.m_previewExecutionActions; + requestFlags = requestFlags | 4096; + } + return { + body: body, + flags: requestFlags + }; + }; + ClientRequestBase.prototype.processResponse = function (actionResults) { + if (actionResults) { + for (var i = 0; i < actionResults.length; i++) { + var actionResult = actionResults[i]; + var handler = this.m_actionResultHandler[actionResult.ActionId]; + if (handler) { + handler._handleResult(actionResult.Value); + } + } + } + }; + ClientRequestBase.prototype.invalidatePendingInvalidObjectPaths = function () { + for (var i in this.m_referencedObjectPaths) { + if (this.m_referencedObjectPaths[i].isInvalidAfterRequest) { + this.m_referencedObjectPaths[i].isValid = false; + } + } + }; + ClientRequestBase.prototype._addPreSyncPromise = function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequestBase.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._removeKeepReferenceAction = function (objectPathId) { + for (var i = this.m_actions.length - 1; i >= 0; i--) { + var actionInfo = this.m_actions[i].actionInfo; + if (actionInfo.ObjectPathId === objectPathId && + actionInfo.ActionType === 3 && + actionInfo.Name === CommonConstants.keepReference) { + this.m_actions.splice(i, 1); + break; + } + } + }; + ClientRequestBase._updateLastUsedActionIdOfObjectPathId = function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id] = actionId; + var argumentObjectPaths = objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength = argumentObjectPaths.length; + for (var i = 0; i < argumentObjectPathsLength; i++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase._calculateLastUsedObjectPathIds = function (actions) { + var lastUsedActionIdOfObjectPathId = {}; + var actionsLength = actions.length; + for (var index = actionsLength - 1; index >= 0; --index) { + var action = actions[index]; + var actionId = action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths = action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength = referencedObjectPaths.length; + for (var refIndex = 0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction = {}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId = lastUsedActionIdOfObjectPathId[key]; + var objectPathIds = lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds = []; + lastUsedObjectPathIdsOfAction[actionId] = objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index = 0; index < actionsLength; index++) { + var action = actions[index]; + var lastUsedObjectPathIds = lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L = lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; + return ClientRequestBase; + }()); + OfficeExtension_1.ClientRequestBase = ClientRequestBase; + var ClientResult = (function () { + function ClientResult(m_type) { + this.m_type = m_type; + } + Object.defineProperty(ClientResult.prototype, "value", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'clientResult.value' + } + }); + } + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ClientResult.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (typeof value === 'object' && value && value._IsNull) { + return; + } + if (this.m_type === 1) { + this.m_value = CommonUtility.adjustToDateTime(value); + } + else { + this.m_value = value; + } + }; + return ClientResult; + }()); + OfficeExtension_1.ClientResult = ClientResult; + var ServiceApiQueue = (function () { + function ServiceApiQueue(m_context) { + this.m_context = m_context; + this.m_actions = []; + } + ServiceApiQueue.prototype.add = function (action, resultHandler, resolve, reject) { + var _this = this; + this.m_actions.push({ action: action, resultHandler: resultHandler, resolve: resolve, reject: reject }); + if (this.m_actions.length === 1) { + setTimeout(function () { return _this.processActions(); }, 0); + } + }; + ServiceApiQueue.prototype.processActions = function () { + var _this = this; + if (this.m_actions.length === 0) { + return; + } + var actions = this.m_actions; + this.m_actions = []; + var request = new ClientRequestBase(this.m_context); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + request.ensureInstantiateObjectPath(action.action.referencedObjectPath); + request.ensureInstantiateObjectPaths(action.action.referencedArgumentObjectPaths); + request.addAction(action.action); + request.addReferencedObjectPath(action.action.referencedObjectPath); + request.addReferencedObjectPaths(action.action.referencedArgumentObjectPaths); + } + var _a = request.buildRequestMessageBodyAndRequestFlags(), body = _a.body, flags = _a.flags; + var requestMessage = { + Url: CoreConstants.localDocumentApiPrefix, + Headers: null, + Body: body + }; + CoreUtility.log('Request:'); + CoreUtility.log(JSON.stringify(body)); + var executor = new HttpRequestExecutor(); + executor + .executeAsync(this.m_context._customData, flags, requestMessage) + .then(function (response) { + _this.processResponse(request, actions, response); + })["catch"](function (ex) { + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + action.reject(ex); + } + }); + }; + ServiceApiQueue.prototype.processResponse = function (request, actions, response) { + var error = this.getErrorFromResponse(response); + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (!actionResults) { + actionResults = []; + } + this.processActionResults(request, actions, actionResults, error); + }; + ServiceApiQueue.prototype.getErrorFromResponse = function (response) { + if (!CoreUtility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage + }); + } + if (response.Body && response.Body.Error) { + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message + }); + } + return null; + }; + ServiceApiQueue.prototype.processActionResults = function (request, actions, actionResults, err) { + request.processResponse(actionResults); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + var actionId = action.action.actionInfo.Id; + var hasResult = false; + for (var j = 0; j < actionResults.length; j++) { + if (actionId == actionResults[j].ActionId) { + var resultValue = actionResults[j].Value; + if (action.resultHandler) { + action.resultHandler._handleResult(resultValue); + resultValue = action.resultHandler.value; + } + if (action.resolve) { + action.resolve(resultValue); + } + hasResult = true; + break; + } + } + if (!hasResult && action.reject) { + if (err) { + action.reject(err); + } + else { + action.reject('No response for the action.'); + } + } + } + }; + return ServiceApiQueue; + }()); + var HttpRequestExecutor = (function () { + function HttpRequestExecutor() { + } + HttpRequestExecutor.prototype.getRequestUrl = function (baseUrl, requestFlags) { + if (baseUrl.charAt(baseUrl.length - 1) != '/') { + baseUrl = baseUrl + '/'; + } + baseUrl = baseUrl + CoreConstants.processQuery; + baseUrl = baseUrl + '?' + CoreConstants.flags + '=' + requestFlags.toString(); + return baseUrl; + }; + HttpRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var url = this.getRequestUrl(requestMessage.Url, requestFlags); + var requestInfo = { + method: 'POST', + url: url, + headers: {}, + body: requestMessage.Body + }; + requestInfo.headers[CoreConstants.sourceLibHeader] = HttpRequestExecutor.SourceLibHeaderValue; + requestInfo.headers['CONTENT-TYPE'] = 'application/json'; + if (requestMessage.Headers) { + for (var key in requestMessage.Headers) { + requestInfo.headers[key] = requestMessage.Headers[key]; + } + } + var sendRequestFunc = CoreUtility._isLocalDocumentUrl(requestInfo.url) + ? HttpUtility.sendLocalDocumentRequest + : HttpUtility.sendRequest; + return sendRequestFunc(requestInfo).then(function (responseInfo) { + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null, + RawErrorResponseBody: CoreUtility._parseErrorResponseBody(responseInfo) + }; + } + return response; + }); + }; + HttpRequestExecutor.SourceLibHeaderValue = 'officejs-rest'; + return HttpRequestExecutor; + }()); + OfficeExtension_1.HttpRequestExecutor = HttpRequestExecutor; + var CommonConstants = (function (_super) { + __extends(CommonConstants, _super); + function CommonConstants() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonConstants.collectionPropertyPath = '_collectionPropertyPath'; + CommonConstants.id = 'Id'; + CommonConstants.idLowerCase = 'id'; + CommonConstants.idPrivate = '_Id'; + CommonConstants.keepReference = '_KeepReference'; + CommonConstants.objectPathIdPrivate = '_ObjectPathId'; + CommonConstants.referenceId = '_ReferenceId'; + CommonConstants.items = '_Items'; + CommonConstants.itemsLowerCase = 'items'; + CommonConstants.scalarPropertyNames = '_scalarPropertyNames'; + CommonConstants.scalarPropertyOriginalNames = '_scalarPropertyOriginalNames'; + CommonConstants.navigationPropertyNames = '_navigationPropertyNames'; + CommonConstants.scalarPropertyUpdateable = '_scalarPropertyUpdateable'; + CommonConstants.previewExecutionObjectId = '_previewExecutionObjectId'; + return CommonConstants; + }(CoreConstants)); + OfficeExtension_1.CommonConstants = CommonConstants; + var CommonUtility = (function (_super) { + __extends(CommonUtility, _super); + function CommonUtility() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonUtility.validateObjectPath = function (clientObject) { + var objectPath = clientObject._objectPath; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + objectPath = objectPath.parentObjectPath; + } + }; + CommonUtility.validateReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + var objectPath = objectPaths[i]; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)) + }); + } + objectPath = objectPath.parentObjectPath; + } + } + } + }; + CommonUtility._toCamelLowerCase = function (name) { + if (CoreUtility.isNullOrEmptyString(name)) { + return name; + } + var index = 0; + while (index < name.length && name.charCodeAt(index) >= 65 && name.charCodeAt(index) <= 90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase() + name.substr(index); + } + else { + return name.toLowerCase(); + } + }; + CommonUtility.adjustToDateTime = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return null; + } + if (typeof value === 'string') { + return new Date(value); + } + if (Array.isArray(value)) { + var arr = value; + for (var i = 0; i < arr.length; i++) { + arr[i] = CommonUtility.adjustToDateTime(arr[i]); + } + return arr; + } + throw CoreUtility._createInvalidArgError({ argumentName: 'date' }); + }; + CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult = function (value) { + var id = value[CommonConstants.id]; + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idLowerCase]; + } + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idPrivate]; + } + return id; + }; + CommonUtility.getObjectPathExpression = function (objectPath) { + var ret = ''; + while (objectPath) { + switch (objectPath.objectPathInfo.ObjectPathType) { + case 1: + ret = ret; + break; + case 2: + ret = 'new()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 3: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + '()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 4: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + (ret.length > 0 ? '.' : '') + ret; + break; + case 5: + ret = 'getItem()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 6: + ret = '_reference()' + (ret.length > 0 ? '.' : '') + ret; + break; + } + objectPath = objectPath.parentObjectPath; + } + return ret; + }; + CommonUtility.setMethodArguments = function (context, argumentInfo, args) { + if (CoreUtility.isNullOrUndefined(args)) { + return null; + } + var referencedObjectPaths = new Array(); + var referencedObjectPathIds = new Array(); + var hasOne = CommonUtility.collectObjectPathInfos(context, args, referencedObjectPaths, referencedObjectPathIds); + argumentInfo.Arguments = args; + if (hasOne) { + argumentInfo.ReferencedObjectPathIds = referencedObjectPathIds; + } + return referencedObjectPaths; + }; + CommonUtility.validateContext = function (context, obj) { + if (context && obj && obj._context !== context) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidRequestContext, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidRequestContext) + }); + } + }; + CommonUtility.isSetSupported = function (apiSetName, apiSetVersion) { + if (typeof CommonUtility.isSetSupportedOverride === "function") { + return CommonUtility.isSetSupportedOverride(apiSetName, apiSetVersion); + } + if (typeof window !== 'undefined' && + window.Office && + window.Office.context && + window.Office.context.requirements) { + return window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion); + } + return true; + }; + CommonUtility.throwIfApiNotSupported = function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!CommonUtility._doApiNotSupportedCheck) { + return; + } + if (!CommonUtility.isSetSupported(apiSetName, apiSetVersion)) { + var message = CoreUtility._getResourceString(CoreResourceStrings.apiNotFoundDetails, [ + apiFullName, + apiSetName + ' ' + apiSetVersion, + hostName + ]); + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.apiNotFound, + httpStatusCode: 404, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + }; + CommonUtility.calculateApiFlags = function (apiFlags, undoableApiSetName, undoableApiSetVersion) { + var undoable = false; + var inMakerRuntime = (window + && window.location + && window.location.href + && window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc") !== -1); + if (typeof CommonUtility.isSetSupportedOverride === "function") { + undoable = CommonUtility.isSetSupportedOverride(undoableApiSetName, undoableApiSetVersion); + } + else if (inMakerRuntime) { + undoable = false; + } + else { + undoable = CommonUtility.isSetSupported(undoableApiSetName, undoableApiSetVersion); + } + if (!undoable) { + apiFlags = apiFlags & (~2); + } + return apiFlags; + }; + CommonUtility._parseSelectExpand = function (select) { + var args = []; + if (!CoreUtility.isNullOrEmptyString(select)) { + var propertyNames = select.split(','); + for (var i = 0; i < propertyNames.length; i++) { + var propertyName = propertyNames[i]; + propertyName = sanitizeForAnyItemsSlash(propertyName.trim()); + if (propertyName.length > 0) { + args.push(propertyName); + } + } + } + return args; + function sanitizeForAnyItemsSlash(propertyName) { + var propertyNameLower = propertyName.toLowerCase(); + if (propertyNameLower === 'items' || propertyNameLower === 'items/') { + return '*'; + } + var itemsSlashLength = 6; + var isItemsSlashOrItemsDot = propertyNameLower.substr(0, itemsSlashLength) === 'items/' || + propertyNameLower.substr(0, itemsSlashLength) === 'items.'; + if (isItemsSlashOrItemsDot) { + propertyName = propertyName.substr(itemsSlashLength); + } + return propertyName.replace(new RegExp('[/.]items[/.]', 'gi'), '/'); + } + }; + CommonUtility.changePropertyNameToCamelLowerCase = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + var propValue = value[key]; + if (key === CommonConstants.items) { + ret = {}; + ret[CommonConstants.itemsLowerCase] = this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else { + var propName = CommonUtility._toCamelLowerCase(key); + ret[propName] = this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.purifyJson = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.purifyJson(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + if (key.charCodeAt(0) !== charCodeUnderscore) { + var propValue = value[key]; + if (typeof propValue === 'object' && propValue !== null && Array.isArray(propValue['items'])) { + propValue = propValue['items']; + } + ret[key] = this.purifyJson(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.collectObjectPathInfos = function (context, args, referencedObjectPaths, referencedObjectPathIds) { + var hasOne = false; + for (var i = 0; i < args.length; i++) { + if (args[i] instanceof ClientObjectBase) { + var clientObject = args[i]; + CommonUtility.validateContext(context, clientObject); + args[i] = clientObject._objectPath.objectPathInfo.Id; + referencedObjectPathIds.push(clientObject._objectPath.objectPathInfo.Id); + referencedObjectPaths.push(clientObject._objectPath); + hasOne = true; + } + else if (Array.isArray(args[i])) { + var childArrayObjectPathIds = new Array(); + var childArrayHasOne = CommonUtility.collectObjectPathInfos(context, args[i], referencedObjectPaths, childArrayObjectPathIds); + if (childArrayHasOne) { + referencedObjectPathIds.push(childArrayObjectPathIds); + hasOne = true; + } + else { + referencedObjectPathIds.push(0); + } + } + else if (CoreUtility.isPlainJsonObject(args[i])) { + referencedObjectPathIds.push(0); + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(args[i], referencedObjectPaths); + } + else { + referencedObjectPathIds.push(0); + } + } + return hasOne; + }; + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds = function (value, referencedObjectPaths) { + var _a, _b; + for (var key in value) { + var propValue = value[key]; + if (propValue instanceof ClientObjectBase) { + referencedObjectPaths.push(propValue._objectPath); + value[key] = (_a = {}, _a[CommonConstants.objectPathIdPrivate] = propValue._objectPath.objectPathInfo.Id, _a); + } + else if (Array.isArray(propValue)) { + for (var i = 0; i < propValue.length; i++) { + if (propValue[i] instanceof ClientObjectBase) { + var elem = propValue[i]; + referencedObjectPaths.push(elem._objectPath); + propValue[i] = (_b = {}, _b[CommonConstants.objectPathIdPrivate] = elem._objectPath.objectPathInfo.Id, _b); + } + else if (CoreUtility.isPlainJsonObject(propValue[i])) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue[i], referencedObjectPaths); + } + } + } + else if (CoreUtility.isPlainJsonObject(propValue)) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue, referencedObjectPaths); + } + else { + } + } + }; + CommonUtility.normalizeName = function (name) { + return name.substr(0, 1).toLowerCase() + name.substr(1); + }; + CommonUtility._doApiNotSupportedCheck = false; + return CommonUtility; + }(CoreUtility)); + OfficeExtension_1.CommonUtility = CommonUtility; + var CommonResourceStrings = (function (_super) { + __extends(CommonResourceStrings, _super); + function CommonResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonResourceStrings.propertyDoesNotExist = 'PropertyDoesNotExist'; + CommonResourceStrings.attemptingToSetReadOnlyProperty = 'AttemptingToSetReadOnlyProperty'; + return CommonResourceStrings; + }(CoreResourceStrings)); + OfficeExtension_1.CommonResourceStrings = CommonResourceStrings; + var ClientRetrieveResult = (function (_super) { + __extends(ClientRetrieveResult, _super); + function ClientRetrieveResult(m_shouldPolyfill) { + var _this = _super.call(this) || this; + _this.m_shouldPolyfill = m_shouldPolyfill; + return _this; + } + ClientRetrieveResult.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (this.m_shouldPolyfill) { + this.m_value = CommonUtility.changePropertyNameToCamelLowerCase(this.m_value); + } + this.m_value = this.removeItemNodes(this.m_value); + }; + ClientRetrieveResult.prototype.removeItemNodes = function (value) { + if (typeof value === 'object' && value !== null && value[CommonConstants.itemsLowerCase]) { + value = value[CommonConstants.itemsLowerCase]; + } + return CommonUtility.purifyJson(value); + }; + return ClientRetrieveResult; + }(ClientResult)); + OfficeExtension_1.ClientRetrieveResult = ClientRetrieveResult; + var TraceActionResultHandler = (function () { + function TraceActionResultHandler(callback) { + this.callback = callback; + } + TraceActionResultHandler.prototype._handleResult = function (value) { + if (this.callback) { + this.callback(); + } + }; + return TraceActionResultHandler; + }()); + var ClientResultCallback = (function (_super) { + __extends(ClientResultCallback, _super); + function ClientResultCallback(callback) { + var _this = _super.call(this) || this; + _this.callback = callback; + return _this; + } + ClientResultCallback.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + this.callback(); + }; + return ClientResultCallback; + }(ClientResult)); + OfficeExtension_1.ClientResultCallback = ClientResultCallback; + var OperationalApiHelper = (function () { + function OperationalApiHelper() { + } + OperationalApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + if (operationType === void 0) { + operationType = 0; + } + if (args === void 0) { + args = []; + } + if (flags === void 0) { + flags = 0; + } + if (resultProcessType === void 0) { + resultProcessType = 0; + } + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResult(); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeMethodWithClientResultCallback = function (callback, obj, methodName) { + var operationType = 0; + var args = []; + var flags = 0; + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResultCallback(callback); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeRetrieve = function (obj, select) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var option; + if (typeof select[0] === 'object' && select[0].hasOwnProperty('$all')) { + if (!select[0]['$all']) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + option = select[0]; + } + else { + option = OperationalApiHelper._parseSelectOption(select); + } + return obj._retrieve(option, new ClientRetrieveResult(shouldPolyfill)); + }; + OperationalApiHelper._parseSelectOption = function (select) { + if (!select || !select[0]) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + var parsedSelect = select[0] && typeof select[0] !== 'string' ? select[0] : select; + return Array.isArray(parsedSelect) ? parsedSelect : OperationalApiHelper.parseRecursiveSelect(parsedSelect); + }; + OperationalApiHelper.parseRecursiveSelect = function (select) { + var deconstruct = function (selectObj) { + return Object.keys(selectObj).reduce(function (scalars, name) { + var value = selectObj[name]; + if (typeof value === 'object') { + return scalars.concat(deconstruct(value).map(function (postfix) { return name + "/" + postfix; })); + } + if (value) { + return scalars.concat(name); + } + return scalars; + }, []); + }; + return deconstruct(select); + }; + OperationalApiHelper.invokeRecursiveUpdate = function (obj, properties) { + return CoreUtility.createPromise(function (resolve, reject) { + obj._recursivelyUpdate(properties); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + obj._context._addServiceApiAction(action, null, resolve, reject); + }); + }; + OperationalApiHelper.createRootServiceObject = function (type, context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + var objectPath = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var objectPath = new ObjectPath(objectPathInfo, null, isCollection, false, 1, flags | 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, false, 1, flags | 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createIndexerObject = function (type, parent, args) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var id = parent._context._nextId(); + var objectPathInfo = { + Id: id, + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var o = new type(parent._context, objectPath); + return o; + }; + OperationalApiHelper.createAndInstantiateMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + return CoreUtility.createPromise(function (resolve, reject) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var result = new ClientResult(); + var actionInfo = { + Id: parent._context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id, + QueryInfo: {} + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = objectPath; + parent._context._addServiceApiAction(action, result, function () { return resolve(new type(parent._context, objectPath)); }, reject); + }); + }; + OperationalApiHelper.createTraceAction = function (context, callback) { + return CoreUtility.createPromise(function (resolve, reject) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + var result = new TraceActionResultHandler(callback); + context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.localDocumentContext = new ClientRequestContextBase(); + return OperationalApiHelper; + }()); + OfficeExtension_1.OperationalApiHelper = OperationalApiHelper; + var GenericEventRegistryOperational = (function () { + function GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform) { + this.eventId = eventId; + this.targetId = targetId; + this.eventArgumentTransform = eventArgumentTransform; + this.registeredCallbacks = []; + } + GenericEventRegistryOperational.prototype.add = function (callback) { + if (this.hasZero()) { + GenericEventRegistration.getGenericEventRegistration('').register(this.eventId, this.targetId, this.registerCallback); + } + this.registeredCallbacks.push(callback); + }; + GenericEventRegistryOperational.prototype.remove = function (callback) { + var index = this.registeredCallbacks.lastIndexOf(callback); + if (index !== -1) { + this.registeredCallbacks.splice(index, 1); + } + }; + GenericEventRegistryOperational.prototype.removeAll = function () { + this.registeredCallbacks = []; + GenericEventRegistration.getGenericEventRegistration('').unregister(this.eventId, this.targetId, this.registerCallback); + }; + GenericEventRegistryOperational.prototype.hasZero = function () { + return this.registeredCallbacks.length === 0; + }; + Object.defineProperty(GenericEventRegistryOperational.prototype, "registerCallback", { + get: function () { + var i = this; + if (!this.outsideCallback) { + this.outsideCallback = function (argument) { + i.call(argument); + }; + } + return this.outsideCallback; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistryOperational.prototype.call = function (rawEventArguments) { + var _this = this; + this.eventArgumentTransform(rawEventArguments).then(function (eventArguments) { + var promises = _this.registeredCallbacks.map(function (callback) { return GenericEventRegistryOperational.callCallback(callback, eventArguments); }); + CoreUtility.Promise.all(promises); + }); + }; + GenericEventRegistryOperational.callCallback = function (callback, eventArguments) { + return CoreUtility._createPromiseFromResult(null) + .then(GenericEventRegistryOperational.wrapCallbackInFunction(callback, eventArguments))["catch"](function (e) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(e)); + }); + }; + GenericEventRegistryOperational.wrapCallbackInFunction = function (callback, args) { + return function () { return callback(args); }; + }; + return GenericEventRegistryOperational; + }()); + OfficeExtension_1.GenericEventRegistryOperational = GenericEventRegistryOperational; + var GlobalEventRegistryOperational = (function () { + function GlobalEventRegistryOperational() { + this.eventToTargetToHandlerMap = {}; + } + Object.defineProperty(GlobalEventRegistryOperational, "globalEventRegistry", { + get: function () { + if (!GlobalEventRegistryOperational.singleton) { + GlobalEventRegistryOperational.singleton = new GlobalEventRegistryOperational(); + } + return GlobalEventRegistryOperational.singleton; + }, + enumerable: true, + configurable: true + }); + GlobalEventRegistryOperational.getGlobalEventRegistry = function (eventId, targetId, eventArgumentTransform) { + var global = GlobalEventRegistryOperational.globalEventRegistry; + var mapGlobal = global.eventToTargetToHandlerMap; + if (!mapGlobal.hasOwnProperty(eventId)) { + mapGlobal[eventId] = {}; + } + var mapEvent = mapGlobal[eventId]; + if (!mapEvent.hasOwnProperty(targetId)) { + mapEvent[targetId] = new GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform); + } + var target = mapEvent[targetId]; + return target; + }; + GlobalEventRegistryOperational.singleton = undefined; + return GlobalEventRegistryOperational; + }()); + OfficeExtension_1.GlobalEventRegistryOperational = GlobalEventRegistryOperational; + var GenericEventHandlerOperational = (function () { + function GenericEventHandlerOperational(genericEventInfo) { + this.genericEventInfo = genericEventInfo; + } + GenericEventHandlerOperational.prototype.add = function (callback) { + var _this = this; + var eventRegistered = undefined; + var promise = CoreUtility.createPromise(function (resolve) { + eventRegistered = resolve; + }); + var addCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.add(callback); + eventRegistered(); + }; + this.register(); + this.createTrace(addCallback); + return promise; + }; + GenericEventHandlerOperational.prototype.remove = function (callback) { + var _this = this; + var removeCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.remove(callback); + }; + this.register(); + this.createTrace(removeCallback); + }; + GenericEventHandlerOperational.prototype.removeAll = function () { + var _this = this; + var removeAllCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.removeAll(); + }; + this.unregister(); + this.createTrace(removeAllCallback); + }; + GenericEventHandlerOperational.prototype.createTrace = function (callback) { + OperationalApiHelper.createTraceAction(this.genericEventInfo.object._context, callback); + }; + GenericEventHandlerOperational.prototype.register = function () { + var operationType = 0; + var args = []; + var flags = 0; + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.register, operationType, args, flags); + if (!GenericEventRegistration.getGenericEventRegistration('').isReady) { + GenericEventRegistration.getGenericEventRegistration('').ready(); + } + }; + GenericEventHandlerOperational.prototype.unregister = function () { + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.unregister); + }; + return GenericEventHandlerOperational; + }()); + OfficeExtension_1.GenericEventHandlerOperational = GenericEventHandlerOperational; + var EventHelper = (function () { + function EventHelper() { + } + EventHelper.invokeOn = function (eventHandler, callback, options) { + var promiseResolve = undefined; + var promise = CoreUtility.createPromise(function (resolve, reject) { + promiseResolve = resolve; + }); + eventHandler.add(callback).then(function () { + promiseResolve({}); + }); + return promise; + }; + EventHelper.invokeOff = function (genericEventHandlersOpObj, eventHandler, eventName, callback) { + if (!eventName && !callback) { + var allGenericEventHandlersOp = Object.keys(genericEventHandlersOpObj).map(function (eventName) { return genericEventHandlersOpObj[eventName]; }); + return EventHelper.invokeAllOff(allGenericEventHandlersOp); + } + if (!eventName) { + return CoreUtility._createPromiseFromException(eventName + " must be supplied if handler is supplied."); + } + if (callback) { + eventHandler.remove(callback); + } + else { + eventHandler.removeAll(); + } + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + EventHelper.invokeAllOff = function (allGenericEventHandlersOperational) { + allGenericEventHandlersOperational.forEach(function (genericEventHandlerOperational) { + genericEventHandlerOperational.removeAll(); + }); + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + return EventHelper; + }()); + OfficeExtension_1.EventHelper = EventHelper; + var ErrorCodes = (function (_super) { + __extends(ErrorCodes, _super); + function ErrorCodes() { + return _super !== null && _super.apply(this, arguments) || this; + } + ErrorCodes.propertyNotLoaded = 'PropertyNotLoaded'; + ErrorCodes.runMustReturnPromise = 'RunMustReturnPromise'; + ErrorCodes.cannotRegisterEvent = 'CannotRegisterEvent'; + ErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + ErrorCodes.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ErrorCodes; + }(CoreErrorCodes)); + OfficeExtension_1.ErrorCodes = ErrorCodes; + var TraceMarkerActionResultHandler = (function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback = callback; + } + TraceMarkerActionResultHandler.prototype._handleResult = function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); + var ActionFactory = (function (_super) { + __extends(ActionFactory, _super); + function ActionFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + ActionFactory.createMethodAction = function (context, parent, methodName, operationType, args, flags) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var fixedFlags = Utility._fixupApiFlags(flags); + var action = new Action(actionInfo, operationType, fixedFlags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + parent._addAction(action); + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (fixedFlags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + Arguments: args, + ObjectId: '', + ObjectType: '' + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return action; + }; + ActionFactory.createRecursiveQueryAction = function (context, parent, query) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 6, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + RecursiveQueryInfo: query + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createEnsureUnchangedAction = function (context, parent, objectState) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 8, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createInstantiateAction = function (context, obj) { + Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); + var actionInfo = { + Id: context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: obj._objectPath.objectPathInfo.Id + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = obj._objectPath; + obj._addAction(action, new InstantiateActionResultHandler(obj), true); + return action; + }; + ActionFactory.createTraceAction = function (context, message, addTraceMessage) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var ret = new Action(actionInfo, 1, 4); + context._pendingRequest.addAction(ret); + if (addTraceMessage) { + context._pendingRequest.addTrace(actionInfo.Id, message); + } + return ret; + }; + ActionFactory.createTraceMarkerForCallback = function (context, callback) { + var action = ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; + return ActionFactory; + }(CommonActionFactory)); + OfficeExtension_1.ActionFactory = ActionFactory; + var ClientObject = (function (_super) { + __extends(ClientObject, _super); + function ClientObject(context, objectPath) { + var _this = _super.call(this, context, objectPath) || this; + Utility.checkArgumentNull(context, 'context'); + _this.m_context = context; + if (_this._objectPath) { + if (!context._processingResult && context._pendingRequest) { + ActionFactory.createInstantiateAction(context, _this); + if (context._autoCleanup && _this._KeepReference) { + context.trackedObjects._autoAdd(_this); + } + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo && _this._objectPath.objectPathInfo && _this._className) { + _this._objectPath.objectPathInfo.T = _this._className; + } + } + return _this; + } + Object.defineProperty(ClientObject.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNull", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNull', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNullObject", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNullObject', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "_isNull", { + get: function () { + return this.m_isNull; + }, + set: function (value) { + this.m_isNull = value; + if (value && this._objectPath) { + this._objectPath._updateAsNullObject(); + } + }, + enumerable: true, + configurable: true + }); + ClientObject.prototype._addAction = function (action, resultHandler, isInstantiationEnsured) { + if (resultHandler === void 0) { + resultHandler = null; + } + if (!isInstantiationEnsured) { + this.context._pendingRequest.ensureInstantiateObjectPath(this._objectPath); + this.context._pendingRequest.ensureInstantiateObjectPaths(action.referencedArgumentObjectPaths); + } + this.context._pendingRequest.addAction(action); + this.context._pendingRequest.addReferencedObjectPath(this._objectPath); + this.context._pendingRequest.addReferencedObjectPaths(action.referencedArgumentObjectPaths); + this.context._pendingRequest.addActionResultHandler(action, resultHandler); + return CoreUtility._createPromiseFromResult(null); + }; + ClientObject.prototype._addPreviewExecutionAction = function (action) { + if (!Utility.isUndefined(this._className)) { + action.ObjectType = this._className; + var objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idLowerCase); + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idPrivate); + } + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.previewExecutionObjectId); + } + action.ObjectId = objectId; + this.context._pendingRequest.addPreviewExecutionAction(action); + } + }; + ClientObject.prototype._handleResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleIdResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + Utility.fixObjectPathIfNecessary(this, value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleRetrieveResult = function (value, result) { + this._handleIdResult(value); + }; + ClientObject.prototype._recursivelySet = function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { + var isClientObject = input instanceof ClientObject; + var originalInput = input; + if (isClientObject) { + if (Object.getPrototypeOf(this) === Object.getPrototypeOf(input)) { + input = JSON.parse(JSON.stringify(input)); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'properties', + errorLocation: this._className + '.set' + }); + } + } + try { + var prop; + for (var i = 0; i < scalarWriteablePropertyNames.length; i++) { + prop = scalarWriteablePropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + this[prop] = input[prop]; + } + } + } + for (var i = 0; i < objectPropertyNames.length; i++) { + prop = objectPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + var dataToPassToSet = isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } + } + } + var throwOnReadOnly = !isClientObject; + if (options && !Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly = options.throwOnReadOnly; + } + for (var i = 0; i < notAllowedToBeSetPropertyNames.length; i++) { + prop = notAllowedToBeSetPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined' && throwOnReadOnly) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + for (prop in input) { + if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); + if (!propertyDescriptor) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, prop), + debugInfo: { + errorLocation: prop + } + }); + } + if (throwOnReadOnly && !propertyDescriptor.set) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.set' + }, + innerError: innerError + }); + } + }; + return ClientObject; + }(ClientObjectBase)); + OfficeExtension_1.ClientObject = ClientObject; + var HostBridgeRequestExecutor = (function () { + function HostBridgeRequestExecutor(session) { + this.m_session = session; + } + HostBridgeRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var httpRequestInfo = { + url: CoreConstants.processQuery, + method: 'POST', + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var controlId = ''; + if (requestMessage.Headers) { + controlId = requestMessage.Headers[Constants.officeControlId]; + } + var message = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + controlId: controlId, + message: httpRequestInfo + }; + CoreUtility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message).then(function (nativeBridgeResponse) { + CoreUtility.log('Received response: ' + JSON.stringify(nativeBridgeResponse)); + var responseInfo = nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession = (function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(m_bridge) { + var _this = _super.call(this) || this; + _this.m_bridge = m_bridge; + _this.m_bridge.addHostMessageHandler(function (message) { + if (message.type === 3) { + var controlId = message.controlId; + if (CoreUtility.isNullOrEmptyString(controlId)) { + GenericEventRegistration.getGenericEventRegistration(controlId)._handleRichApiMessage(message.message); + } + else { + var eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(controlId); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(''); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + } + } + }); + return _this; + } + HostBridgeSession.getInstanceIfHostBridgeInited = function () { + if (HostBridge.instance) { + if (CoreUtility.isNullOrUndefined(HostBridgeSession.s_instance) || + HostBridgeSession.s_instance.m_bridge !== HostBridge.instance) { + HostBridgeSession.s_instance = new HostBridgeSession(HostBridge.instance); + } + return HostBridgeSession.s_instance; + } + return null; + }; + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull = function () { + CoreUtility.log('NativeBridgeSession::CreateRequestExecutor'); + return new HostBridgeRequestExecutor(this); + }; + HostBridgeSession.prototype.getEventRegistration = function (controlId) { + return GenericEventRegistration.getGenericEventRegistration(controlId); + }; + HostBridgeSession.prototype.sendMessageToHost = function (message) { + return this.m_bridge.sendMessageToHostAndExpectResponse(message); + }; + return HostBridgeSession; + }(SessionBase)); + OfficeExtension_1.HostBridgeSession = HostBridgeSession; + var ClientRequestContext = (function (_super) { + __extends(ClientRequestContext, _super); + function ClientRequestContext(url) { + var _this = _super.call(this) || this; + _this.m_customRequestHeaders = {}; + _this.m_batchMode = 0; + _this._onRunFinishedNotifiers = []; + if (SessionBase._overrideSession) { + _this.m_requestUrlAndHeaderInfoResolver = SessionBase._overrideSession; + } + else { + if (Utility.isNullOrUndefined(url) || (typeof url === 'string' && url.length === 0)) { + url = ClientRequestContext.defaultRequestUrlAndHeaders; + if (!url) { + url = { url: CoreConstants.localDocument, headers: {} }; + } + } + if (typeof url === 'string') { + _this.m_requestUrlAndHeaderInfo = { url: url, headers: {} }; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfoResolver(url)) { + _this.m_requestUrlAndHeaderInfoResolver = url; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfo(url)) { + var requestInfo = url; + _this.m_requestUrlAndHeaderInfo = { url: requestInfo.url, headers: {} }; + CoreUtility._copyHeaders(requestInfo.headers, _this.m_requestUrlAndHeaderInfo.headers); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'url' }); + } + } + if (!_this.m_requestUrlAndHeaderInfoResolver && + _this.m_requestUrlAndHeaderInfo && + CoreUtility._isLocalDocumentUrl(_this.m_requestUrlAndHeaderInfo.url) && + HostBridgeSession.getInstanceIfHostBridgeInited()) { + _this.m_requestUrlAndHeaderInfo = null; + _this.m_requestUrlAndHeaderInfoResolver = HostBridgeSession.getInstanceIfHostBridgeInited(); + } + if (_this.m_requestUrlAndHeaderInfoResolver instanceof SessionBase) { + _this.m_session = _this.m_requestUrlAndHeaderInfoResolver; + } + _this._processingResult = false; + _this._customData = Constants.iterativeExecutor; + _this.sync = _this.sync.bind(_this); + return _this; + } + Object.defineProperty(ClientRequestContext.prototype, "session", { + get: function () { + return this.m_session; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "eventRegistration", { + get: function () { + if (this.m_session) { + return this.m_session.getEventRegistration(this._controlId); + } + return _Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_url", { + get: function () { + if (this.m_requestUrlAndHeaderInfo) { + return this.m_requestUrlAndHeaderInfo.url; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_pendingRequest", { + get: function () { + if (this.m_pendingRequest == null) { + this.m_pendingRequest = new ClientRequest(this); + } + return this.m_pendingRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_controlId", { + get: function () { + var ret = this.m_customRequestHeaders[Constants.officeControlId]; + if (CoreUtility.isNullOrUndefined(ret)) { + ret = ''; + } + return ret; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension_1._internalConfig.showDisposeInfoInDebugInfo); + var statements = prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { + get: function () { + if (!this.m_trackedObjects) { + this.m_trackedObjects = new TrackedObjects(this); + } + return this.m_trackedObjects; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "requestHeaders", { + get: function () { + return this.m_customRequestHeaders; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "batchMode", { + get: function () { + return this.m_batchMode; + }, + enumerable: true, + configurable: true + }); + ClientRequestContext.prototype.ensureInProgressBatchIfBatchMode = function () { + if (this.m_batchMode === 1 && !this.m_explicitBatchInProgress) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.notInsideBatch), null); + } + }; + ClientRequestContext.prototype.load = function (clientObj, option) { + Utility.validateContext(this, clientObj); + var queryOption = ClientRequestContext._parseQueryOption(option); + CommonActionFactory.createQueryAction(this, clientObj, queryOption, clientObj); + }; + ClientRequestContext.prototype.loadRecursive = function (clientObj, options, maxDepth) { + if (!Utility.isPlainJsonObject(options)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'options' }); + } + var quries = {}; + for (var key in options) { + quries[key] = ClientRequestContext._parseQueryOption(options[key]); + } + var action = ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); + this._pendingRequest.addActionResultHandler(action, clientObj); + }; + ClientRequestContext.prototype.trace = function (message) { + ActionFactory.createTraceAction(this, message, true); + }; + ClientRequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { }; + ClientRequestContext.prototype.ensureRequestUrlAndHeaderInfo = function () { + var _this = this; + return Utility._createPromiseFromResult(null).then(function () { + if (!_this.m_requestUrlAndHeaderInfo) { + return _this.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function (value) { + _this.m_requestUrlAndHeaderInfo = value; + if (!_this.m_requestUrlAndHeaderInfo) { + _this.m_requestUrlAndHeaderInfo = { url: CoreConstants.localDocument, headers: {} }; + } + if (Utility.isNullOrEmptyString(_this.m_requestUrlAndHeaderInfo.url)) { + _this.m_requestUrlAndHeaderInfo.url = CoreConstants.localDocument; + } + if (!_this.m_requestUrlAndHeaderInfo.headers) { + _this.m_requestUrlAndHeaderInfo.headers = {}; + } + if (typeof _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull === 'function') { + var executor = _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull(); + if (executor) { + _this._requestExecutor = executor; + } + } + }); + } + }); + }; + ClientRequestContext.prototype.syncPrivateMain = function () { + var _this = this; + return this.ensureRequestUrlAndHeaderInfo().then(function () { + var req = _this._pendingRequest; + _this.m_pendingRequest = null; + return _this.processPreSyncPromises(req).then(function () { return _this.syncPrivate(req); }); + }); + }; + ClientRequestContext.prototype.syncPrivate = function (req) { + var _this = this; + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(null); + } + if (!req.hasActions) { + return this.processPendingEventHandlers(req); + } + var _a = req.buildRequestMessageBodyAndRequestFlags(), msgBody = _a.body, requestFlags = _a.flags; + if (this._requestFlagModifier) { + requestFlags |= this._requestFlagModifier; + } + if (!this._requestExecutor) { + if (CoreUtility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + this._requestExecutor = new OfficeJsRequestExecutor(this); + } + else { + this._requestExecutor = new HttpRequestExecutor(); + } + } + var requestExecutor = this._requestExecutor; + var headers = {}; + CoreUtility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + CoreUtility._copyHeaders(this.m_customRequestHeaders, headers); + delete this.m_customRequestHeaders[Constants.officeScriptEventId]; + var testNameWithSequenceId = TestUtility._getCurrentTestNameWithSequenceId(); + if (testNameWithSequenceId) { + headers[CoreConstants.testRequestNameHeader] = testNameWithSequenceId; + } + var requestExecutorRequestMessage = { + Url: this.m_requestUrlAndHeaderInfo.url, + Headers: headers, + Body: msgBody + }; + req.invalidatePendingInvalidObjectPaths(); + var errorFromResponse = null; + var errorFromProcessEventHandlers = null; + this._lastSyncStart = typeof performance === 'undefined' ? Date.now() : performance.now(); + this._lastRequestFlags = requestFlags; + return requestExecutor + .executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) + .then(function (response) { + _this._lastSyncEnd = typeof performance === 'undefined' ? Date.now() : performance.now(); + if (OfficeExtension_1.config.executePerfLogFunc) { + OfficeExtension_1.config.executePerfLogFunc({ syncStart: _this._lastSyncStart, + syncEnd: _this._lastSyncEnd + }); + } + errorFromResponse = _this.processRequestExecutorResponseMessage(req, response); + return _this.processPendingEventHandlers(req)["catch"](function (ex) { + CoreUtility.log('Error in processPendingEventHandlers'); + CoreUtility.log(JSON.stringify(ex)); + errorFromProcessEventHandlers = ex; + }); + }) + .then(function () { + if (errorFromResponse) { + CoreUtility.log('Throw error from response: ' + JSON.stringify(errorFromResponse)); + throw errorFromResponse; + } + if (errorFromProcessEventHandlers) { + CoreUtility.log('Throw error from ProcessEventHandler: ' + JSON.stringify(errorFromProcessEventHandlers)); + var transformedError = null; + if (errorFromProcessEventHandlers instanceof _Internal.RuntimeError) { + transformedError = errorFromProcessEventHandlers; + transformedError.traceMessages = req._responseTraceMessages; + } + else { + var message = null; + if (typeof errorFromProcessEventHandlers === 'string') { + message = errorFromProcessEventHandlers; + } + else { + message = errorFromProcessEventHandlers.message; + } + if (Utility.isNullOrEmptyString(message)) { + message = CoreUtility._getResourceString(ResourceStrings.cannotRegisterEvent); + } + transformedError = new _Internal.RuntimeError({ + code: ErrorCodes.cannotRegisterEvent, + httpStatusCode: 400, + message: message, + traceMessages: req._responseTraceMessages + }); + } + throw transformedError; + } + }); + }; + ClientRequestContext.prototype.processRequestExecutorResponseMessage = function (req, response) { + if (response.Body && response.Body.TraceIds) { + req._setResponseTraceIds(response.Body.TraceIds); + } + var traceMessages = req._responseTraceMessages; + var errorStatementInfo = null; + if (response.Body) { + if (response.Body.Error && response.Body.Error.ActionIndex >= 0) { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, true); + var debugInfoStatementInfo = prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + errorStatementInfo = { + statement: debugInfoStatementInfo.statement, + surroundingStatements: debugInfoStatementInfo.surroundingStatements, + fullStatements: ['Please enable config.extendedErrorLogging to see full statements.'] + }; + if (OfficeExtension_1.config.extendedErrorLogging) { + prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, false); + errorStatementInfo.fullStatements = prettyPrinter.process(); + } + } + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (actionResults) { + this._processingResult = true; + try { + req.processResponse(actionResults); + } + finally { + this._processingResult = false; + } + } + } + if (!Utility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage, + traceMessages: traceMessages, + data: { responseBody: response.RawErrorResponseBody } + }); + } + else if (response.Body && response.Body.Error) { + var debugInfo = { + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement = errorStatementInfo.statement; + debugInfo.surroundingStatements = errorStatementInfo.surroundingStatements; + debugInfo.fullStatements = errorStatementInfo.fullStatements; + } + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message, + traceMessages: traceMessages, + debugInfo: debugInfo + }); + } + return null; + }; + ClientRequestContext.prototype.processPendingEventHandlers = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._pendingProcessEventHandlers.length; i++) { + var eventHandlers = req._pendingProcessEventHandlers[i]; + ret = ret.then(this.createProcessOneEventHandlersFunc(eventHandlers, req)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneEventHandlersFunc = function (eventHandlers, req) { + return function () { return eventHandlers._processRegistration(req); }; + }; + ClientRequestContext.prototype.processPreSyncPromises = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._preSyncPromises.length; i++) { + var p = req._preSyncPromises[i]; + ret = ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc = function (p) { + return function () { return p; }; + }; + ClientRequestContext.prototype.sync = function (passThroughValue) { + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(passThroughValue); + } + return this.syncPrivateMain().then(function () { return passThroughValue; }); + }; + ClientRequestContext.prototype.batch = function (batchBody) { + var _this = this; + if (this.m_batchMode !== 1) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, null, null)); + } + if (this.m_explicitBatchInProgress) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.pendingBatchInProgress), null)); + } + if (Utility.isNullOrUndefined(batchBody)) { + return Utility._createPromiseFromResult(null); + } + this.m_explicitBatchInProgress = true; + var previousRequest = this.m_pendingRequest; + this.m_pendingRequest = new ClientRequest(this); + var batchBodyResult; + try { + batchBodyResult = batchBody(this._rootObject, this); + } + catch (ex) { + this.m_explicitBatchInProgress = false; + this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + } + var request; + var batchBodyResultPromise; + if (typeof batchBodyResult === 'object' && batchBodyResult && typeof batchBodyResult.then === 'function') { + batchBodyResultPromise = Utility._createPromiseFromResult(null) + .then(function () { + return batchBodyResult; + }) + .then(function (result) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return result; + })["catch"](function (ex) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + }); + } + else { + this.m_explicitBatchInProgress = false; + request = this.m_pendingRequest; + this.m_pendingRequest = previousRequest; + batchBodyResultPromise = Utility._createPromiseFromResult(batchBodyResult); + } + return batchBodyResultPromise.then(function (result) { + return _this.ensureRequestUrlAndHeaderInfo() + .then(function () { + return _this.syncPrivate(request); + }) + .then(function () { + return result; + }); + }); + }; + ClientRequestContext._run = function (ctxInitializer, runBody, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runCommon('run', null, ctxInitializer, 0, runBody, numCleanupAttempts, retryDelay, null, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.isValidRequestInfo = function (value) { + return (typeof value === 'string' || + ClientRequestContext.isRequestUrlAndHeaderInfo(value) || + ClientRequestContext.isRequestUrlAndHeaderInfoResolver(value)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfo = function (value) { + return (typeof value === 'object' && + value !== null && + Object.getPrototypeOf(value) === Object.getPrototypeOf({}) && + !Utility.isNullOrUndefined(value.url)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfoResolver = function (value) { + return typeof value === 'object' && value !== null && typeof value._resolveRequestUrlAndHeaderInfo === 'function'; + }; + ClientRequestContext._runBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(0, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runExplicitBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(1, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runBatchCommon = function (batchMode, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + var ctxRetriever; + var batch; + var requestInfo = null; + var previousObjects = null; + var argOffset = 0; + var options = null; + if (receivedRunArgs.length > 0) { + if (ClientRequestContext.isValidRequestInfo(receivedRunArgs[0])) { + requestInfo = receivedRunArgs[0]; + argOffset = 1; + } + else if (Utility.isPlainJsonObject(receivedRunArgs[0])) { + options = receivedRunArgs[0]; + requestInfo = options.session; + if (requestInfo != null && !ClientRequestContext.isValidRequestInfo(requestInfo)) { + return ClientRequestContext.createErrorPromise(functionName); + } + previousObjects = options.previousObjects; + argOffset = 1; + } + } + if (receivedRunArgs.length == argOffset + 1) { + batch = receivedRunArgs[argOffset + 0]; + } + else if (options == null && receivedRunArgs.length == argOffset + 2) { + previousObjects = receivedRunArgs[argOffset + 0]; + batch = receivedRunArgs[argOffset + 1]; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + if (previousObjects != null) { + if (previousObjects instanceof ClientObject) { + ctxRetriever = function () { return previousObjects.context; }; + } + else if (previousObjects instanceof ClientRequestContext) { + ctxRetriever = function () { return previousObjects; }; + } + else if (Array.isArray(previousObjects)) { + var array = previousObjects; + if (array.length == 0) { + return ClientRequestContext.createErrorPromise(functionName); + } + for (var i = 0; i < array.length; i++) { + if (!(array[i] instanceof ClientObject)) { + return ClientRequestContext.createErrorPromise(functionName); + } + if (array[i].context != array[0].context) { + return ClientRequestContext.createErrorPromise(functionName, ResourceStrings.invalidRequestContext); + } + } + ctxRetriever = function () { return array[0].context; }; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + } + else { + ctxRetriever = ctxInitializer; + } + var onBeforeRunWithOptions = null; + if (onBeforeRun) { + onBeforeRunWithOptions = function (context) { return onBeforeRun(options || {}, context); }; + } + return ClientRequestContext._runCommon(functionName, requestInfo, ctxRetriever, batchMode, batch, numCleanupAttempts, retryDelay, onBeforeRunWithOptions, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.createErrorPromise = function (functionName, code) { + if (code === void 0) { + code = CoreResourceStrings.invalidArgument; + } + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(code, CoreUtility._getResourceString(code), functionName)); + }; + ClientRequestContext._runCommon = function (functionName, requestInfo, ctxRetriever, batchMode, runBody, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (SessionBase._overrideSession) { + requestInfo = SessionBase._overrideSession; + } + var starterPromise = CoreUtility.createPromise(function (resolve, reject) { + resolve(); + }); + var ctx; + var succeeded = false; + var resultOrError; + var previousBatchMode; + return starterPromise + .then(function () { + ctx = ctxRetriever(requestInfo); + if (ctx._autoCleanup) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + ctx._onRunFinishedNotifiers.push(function () { + ctx._autoCleanup = true; + resolve(); + }); + }); + } + else { + ctx._autoCleanup = true; + } + }) + .then(function () { + if (typeof runBody !== 'function') { + return ClientRequestContext.createErrorPromise(functionName); + } + previousBatchMode = ctx.m_batchMode; + ctx.m_batchMode = batchMode; + if (onBeforeRun) { + onBeforeRun(ctx); + } + var runBodyResult; + if (batchMode == 1) { + runBodyResult = runBody(ctx.batch.bind(ctx)); + } + else { + runBodyResult = runBody(ctx); + } + if (Utility.isNullOrUndefined(runBodyResult) || typeof runBodyResult.then !== 'function') { + Utility.throwError(ResourceStrings.runMustReturnPromise); + } + return runBodyResult; + }) + .then(function (runBodyResult) { + if (batchMode === 1) { + return runBodyResult; + } + else { + return ctx.sync(runBodyResult); + } + }) + .then(function (result) { + succeeded = true; + resultOrError = result; + })["catch"](function (error) { + resultOrError = error; + }) + .then(function () { + var itemsToRemove = ctx.trackedObjects._retrieveAndClearAutoCleanupList(); + ctx._autoCleanup = false; + ctx.m_batchMode = previousBatchMode; + for (var key in itemsToRemove) { + itemsToRemove[key]._objectPath.isValid = false; + } + var cleanupCounter = 0; + if (Utility._synchronousCleanup || ClientRequestContext.isRequestUrlAndHeaderInfoResolver(requestInfo)) { + return attemptCleanup(); + } + else { + attemptCleanup(); + } + function attemptCleanup() { + cleanupCounter++; + var savedPendingRequest = ctx.m_pendingRequest; + var savedBatchMode = ctx.m_batchMode; + var request = new ClientRequest(ctx); + ctx.m_pendingRequest = request; + ctx.m_batchMode = 0; + try { + for (var key in itemsToRemove) { + ctx.trackedObjects.remove(itemsToRemove[key]); + } + } + finally { + ctx.m_batchMode = savedBatchMode; + ctx.m_pendingRequest = savedPendingRequest; + } + return ctx + .syncPrivate(request) + .then(function () { + if (onCleanupSuccess) { + onCleanupSuccess(cleanupCounter); + } + })["catch"](function () { + if (onCleanupFailure) { + onCleanupFailure(cleanupCounter); + } + if (cleanupCounter < numCleanupAttempts) { + setTimeout(function () { + attemptCleanup(); + }, retryDelay); + } + }); + } + }) + .then(function () { + if (ctx._onRunFinishedNotifiers && ctx._onRunFinishedNotifiers.length > 0) { + var func = ctx._onRunFinishedNotifiers.shift(); + func(); + } + if (succeeded) { + return resultOrError; + } + else { + throw resultOrError; + } + }); + }; + return ClientRequestContext; + }(ClientRequestContextBase)); + OfficeExtension_1.ClientRequestContext = ClientRequestContext; + var RetrieveResultImpl = (function () { + function RetrieveResultImpl(m_proxy, m_shouldPolyfill) { + this.m_proxy = m_proxy; + this.m_shouldPolyfill = m_shouldPolyfill; + var scalarPropertyNames = m_proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = m_proxy[Constants.navigationPropertyNames]; + var typeName = m_proxy[Constants.className]; + var isCollection = m_proxy[Constants.isCollection]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, scalarPropertyNames[i]); + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, navigationPropertyNames[i]); + } + } + if (isCollection) { + Utility.definePropertyThrowUnloadedException(this, typeName, Constants.itemsLowerCase); + } + } + Object.defineProperty(RetrieveResultImpl.prototype, "$proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResultImpl.prototype, "$isNullObject", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: ErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'retrieveResult.$isNullObject' + } + }); + } + return this.m_isNullObject; + }, + enumerable: true, + configurable: true + }); + RetrieveResultImpl.prototype.toJSON = function () { + if (!this.m_isLoaded) { + return undefined; + } + if (this.m_isNullObject) { + return null; + } + if (Utility.isUndefined(this.m_json)) { + this.m_json = Utility.purifyJson(this.m_value); + } + return this.m_json; + }; + RetrieveResultImpl.prototype.toString = function () { + return JSON.stringify(this.toJSON()); + }; + RetrieveResultImpl.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (value === null || (typeof value === 'object' && value && value._IsNull)) { + this.m_isNullObject = true; + value = null; + } + else { + this.m_isNullObject = false; + } + if (this.m_shouldPolyfill) { + value = Utility.changePropertyNameToCamelLowerCase(value); + } + this.m_value = value; + this.m_proxy._handleRetrieveResult(value, this); + }; + return RetrieveResultImpl; + }()); + var Constants = (function (_super) { + __extends(Constants, _super); + function Constants() { + return _super !== null && _super.apply(this, arguments) || this; + } + Constants.getItemAt = 'GetItemAt'; + Constants.index = '_Index'; + Constants.iterativeExecutor = 'IterativeExecutor'; + Constants.isTracked = '_IsTracked'; + Constants.eventMessageCategory = 65536; + Constants.eventWorkbookId = 'Workbook'; + Constants.eventSourceRemote = 'Remote'; + Constants.proxy = '$proxy'; + Constants.className = '_className'; + Constants.isCollection = '_isCollection'; + Constants.collectionPropertyPath = '_collectionPropertyPath'; + Constants.objectPathInfoDoNotKeepReferenceFieldName = 'D'; + Constants.officeScriptEventId = 'X-OfficeScriptEventId'; + Constants.officeScriptFireRecordingEvent = 'X-OfficeScriptFireRecordingEvent'; + Constants.officeControlId = 'X-OfficeControlId'; + return Constants; + }(CommonConstants)); + OfficeExtension_1.Constants = Constants; + var ClientRequest = (function (_super) { + __extends(ClientRequest, _super); + function ClientRequest(context) { + var _this = _super.call(this, context) || this; + _this.m_context = context; + _this.m_pendingProcessEventHandlers = []; + _this.m_pendingEventHandlerActions = {}; + _this.m_traceInfos = {}; + _this.m_responseTraceIds = {}; + _this.m_responseTraceMessages = []; + return _this; + } + Object.defineProperty(ClientRequest.prototype, "traceInfos", { + get: function () { + return this.m_traceInfos; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceMessages", { + get: function () { + return this.m_responseTraceMessages; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceIds", { + get: function () { + return this.m_responseTraceIds; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._setResponseTraceIds = function (value) { + if (value) { + for (var i = 0; i < value.length; i++) { + var traceId = value[i]; + this.m_responseTraceIds[traceId] = traceId; + var message = this.m_traceInfos[traceId]; + if (!CoreUtility.isNullOrUndefined(message)) { + this.m_responseTraceMessages.push(message); + } + } + } + }; + ClientRequest.prototype.addTrace = function (actionId, message) { + this.m_traceInfos[actionId] = message; + }; + ClientRequest.prototype._addPendingEventHandlerAction = function (eventHandlers, action) { + if (!this.m_pendingEventHandlerActions[eventHandlers._id]) { + this.m_pendingEventHandlerActions[eventHandlers._id] = []; + this.m_pendingProcessEventHandlers.push(eventHandlers); + } + this.m_pendingEventHandlerActions[eventHandlers._id].push(action); + }; + Object.defineProperty(ClientRequest.prototype, "_pendingProcessEventHandlers", { + get: function () { + return this.m_pendingProcessEventHandlers; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._getPendingEventHandlerActions = function (eventHandlers) { + return this.m_pendingEventHandlerActions[eventHandlers._id]; + }; + return ClientRequest; + }(ClientRequestBase)); + OfficeExtension_1.ClientRequest = ClientRequest; + var EventHandlers = (function () { + function EventHandlers(context, parentObject, name, eventInfo) { + var _this = this; + this.m_id = context._nextId(); + this.m_context = context; + this.m_name = name; + this.m_handlers = []; + this.m_registered = false; + this.m_eventInfo = eventInfo; + this.m_callback = function (args) { + _this.m_eventInfo.eventArgsTransformFunc(args).then(function (newArgs) { return _this.fireEvent(newArgs); }); + }; + } + Object.defineProperty(EventHandlers.prototype, "_registered", { + get: function () { + return this.m_registered; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_id", { + get: function () { + return this.m_id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_handlers", { + get: function () { + return this.m_handlers; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); + EventHandlers.prototype.add = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 0 + }); + return new EventHandlerResult(this.m_context, this, handler); + }; + EventHandlers.prototype.remove = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 1 + }); + }; + EventHandlers.prototype.removeAll = function () { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: null, + operation: 2 + }); + }; + EventHandlers.prototype._processRegistration = function (req) { + var _this = this; + var ret = CoreUtility._createPromiseFromResult(null); + var actions = req._getPendingEventHandlerActions(this); + if (!actions) { + return ret; + } + var handlersResult = []; + for (var i = 0; i < this.m_handlers.length; i++) { + handlersResult.push(this.m_handlers[i]); + } + var hasChange = false; + for (var i = 0; i < actions.length; i++) { + if (req._responseTraceIds[actions[i].id]) { + hasChange = true; + switch (actions[i].operation) { + case 0: + handlersResult.push(actions[i].handler); + break; + case 1: + for (var index = handlersResult.length - 1; index >= 0; index--) { + if (handlersResult[index] === actions[i].handler) { + handlersResult.splice(index, 1); + break; + } + } + break; + case 2: + handlersResult = []; + break; + } + } + } + if (hasChange) { + if (!this.m_registered && handlersResult.length > 0) { + ret = ret.then(function () { return _this.m_eventInfo.registerFunc(_this.m_callback); }).then(function () { return (_this.m_registered = true); }); + } + else if (this.m_registered && handlersResult.length == 0) { + ret = ret + .then(function () { return _this.m_eventInfo.unregisterFunc(_this.m_callback); })["catch"](function (ex) { + CoreUtility.log('Error when unregister event: ' + JSON.stringify(ex)); + }) + .then(function () { return (_this.m_registered = false); }); + } + ret = ret.then(function () { return (_this.m_handlers = handlersResult); }); + } + return ret; + }; + EventHandlers.prototype.fireEvent = function (args) { + var promises = []; + for (var i = 0; i < this.m_handlers.length; i++) { + var handler = this.m_handlers[i]; + var p = CoreUtility._createPromiseFromResult(null) + .then(this.createFireOneEventHandlerFunc(handler, args))["catch"](function (ex) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(ex)); + }); + promises.push(p); + } + CoreUtility.Promise.all(promises); + }; + EventHandlers.prototype.createFireOneEventHandlerFunc = function (handler, args) { + return function () { return handler(args); }; + }; + return EventHandlers; + }()); + OfficeExtension_1.EventHandlers = EventHandlers; + var EventHandlerResult = (function () { + function EventHandlerResult(context, handlers, handler) { + this.m_context = context; + this.m_allHandlers = handlers; + this.m_handler = handler; + } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + EventHandlerResult.prototype.remove = function () { + if (this.m_allHandlers && this.m_handler) { + this.m_allHandlers.remove(this.m_handler); + this.m_allHandlers = null; + this.m_handler = null; + } + }; + return EventHandlerResult; + }()); + OfficeExtension_1.EventHandlerResult = EventHandlerResult; + (function (_Internal) { + var OfficeJsEventRegistration = (function () { + function OfficeJsEventRegistration() { + } + OfficeJsEventRegistration.prototype.register = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingDataChanged, handler, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingSelectionChanged, handler, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); + }); + case 5: + return OSF.DDA.RichApi.richApiMessageManager.register(handler); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { id: targetId }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { id: targetId }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { id: targetId }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + OfficeJsEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingDataChanged, { handler: handler }, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingSelectionChanged, { handler: handler }, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); + }); + case 5: + return Utility.promisify(function (callback) { + return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync('richApiMessage', { handler: handler }, callback); + }); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { id: targetId, handler: handler }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { id: targetId, handler: handler }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { id: targetId, handler: handler }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + return OfficeJsEventRegistration; + }()); + _Internal.officeJsEventRegistration = new OfficeJsEventRegistration(); + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var EventRegistration = (function () { + function EventRegistration(registerEventImpl, unregisterEventImpl) { + this.m_handlersByEventByTarget = {}; + this.m_registerEventImpl = registerEventImpl; + this.m_unregisterEventImpl = unregisterEventImpl; + } + EventRegistration.getTargetIdOrDefault = function (targetId) { + if (Utility.isNullOrUndefined(targetId)) { + return ''; + } + return targetId; + }; + EventRegistration.prototype.getHandlers = function (eventId, targetId) { + targetId = EventRegistration.getTargetIdOrDefault(targetId); + var handlersById = this.m_handlersByEventByTarget[eventId]; + if (!handlersById) { + handlersById = {}; + this.m_handlersByEventByTarget[eventId] = handlersById; + } + var handlers = handlersById[targetId]; + if (!handlers) { + handlers = []; + handlersById[targetId] = handlers; + } + return handlers; + }; + EventRegistration.prototype.callHandlers = function (eventId, targetId, argument) { + var funcs = this.getHandlers(eventId, targetId); + for (var i = 0; i < funcs.length; i++) { + funcs[i](argument); + } + }; + EventRegistration.prototype.hasHandlers = function (eventId, targetId) { + return this.getHandlers(eventId, targetId).length > 0; + }; + EventRegistration.prototype.register = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + handlers.push(handler); + if (handlers.length === 1) { + return this.m_registerEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + EventRegistration.prototype.unregister = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length === 0) { + return this.m_unregisterEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + return EventRegistration; + }()); + OfficeExtension_1.EventRegistration = EventRegistration; + var GenericEventRegistration = (function () { + function GenericEventRegistration() { + this.m_eventRegistration = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler = this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready = function () { + var _this = this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready = GenericEventRegistration._testReadyImpl().then(function () { + _this.m_isReady = true; + }); + } + else if (HostBridge.instance) { + this.m_ready = Utility._createPromiseFromResult(null).then(function () { + _this.m_isReady = true; + }); + } + else { + this.m_ready = _Internal.officeJsEventRegistration + .register(5, '', this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady = true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage = function (msg) { + if (msg && msg.entries) { + for (var entryIndex = 0; entryIndex < msg.entries.length; entryIndex++) { + var entry = msg.entries[entryIndex]; + if (entry.messageCategory == Constants.eventMessageCategory) { + if (CoreUtility._logEnabled) { + CoreUtility.log(JSON.stringify(entry)); + } + var eventId = entry.messageType; + var targetId = entry.targetId; + var hasHandlers = this.m_eventRegistration.hasHandlers(eventId, targetId); + if (hasHandlers) { + var arg = JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source = Constants.eventSourceRemote; + } + this.m_eventRegistration.callHandlers(eventId, targetId, arg); + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + if (!ret) { + ret = new GenericEventRegistration(); + GenericEventRegistration.s_genericEventRegistrations[controlId] = ret; + } + return ret; + }; + GenericEventRegistration.peekGenericEventRegistrationOrNull = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + return ret; + }; + GenericEventRegistration.richApiMessageEventCategory = 65536; + GenericEventRegistration.s_genericEventRegistrations = {}; + return GenericEventRegistration; + }()); + OfficeExtension_1.GenericEventRegistration = GenericEventRegistration; + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl = impl; + } + OfficeExtension_1._testSetRichApiMessageReadyImpl = _testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration('')._handleRichApiMessage(msg); + } + OfficeExtension_1._testTriggerRichApiMessageEvent = _testTriggerRichApiMessageEvent; + var GenericEventHandlers = (function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + var _this = _super.call(this, context, parentObject, name, eventInfo) || this; + _this.m_genericEventInfo = eventInfo; + return _this; + } + GenericEventHandlers.prototype.add = function (handler) { + var _this = this; + if (this._handlers.length == 0 && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + var controlId = this._context._controlId; + if (!GenericEventRegistration.getGenericEventRegistration(controlId).isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration(controlId).ready()); + } + ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length == 1) { + GenericEventRegistration.getGenericEventRegistration(controlId).register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove = function (handler) { + var _this = this; + if (this._handlers.length == 1 && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + var controlId = this._context._controlId; + ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers = _this._handlers; + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length == 0) { + GenericEventRegistration.getGenericEventRegistration(controlId).unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll = function () { }; + return GenericEventHandlers; + }(EventHandlers)); + OfficeExtension_1.GenericEventHandlers = GenericEventHandlers; + var InstantiateActionResultHandler = (function () { + function InstantiateActionResultHandler(clientObject) { + this.m_clientObject = clientObject; + } + InstantiateActionResultHandler.prototype._handleResult = function (value) { + this.m_clientObject._handleIdResult(value); + }; + return InstantiateActionResultHandler; + }()); + var ObjectPathFactory = (function () { + function ObjectPathFactory() { + } + ObjectPathFactory.createGlobalObjectObjectPath = function (context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + return new ObjectPath(objectPathInfo, null, false, false, 1, 4); + }; + ObjectPathFactory.createNewObjectObjectPath = function (context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var ret = new ObjectPath(objectPathInfo, null, isCollection, false, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createPropertyObjectPath = function (context, parent, propertyName, isCollection, isInvalidAfterRequest, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createIndexerObjectPath = function (context, parent, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createIndexerObjectPathUsingParentPath = function (context, parentObjectPath, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parentObjectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parentObjectPath, false, false, 1, 4); + }; + ObjectPathFactory.createMethodObjectPath = function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = Utility.setMethodArguments(context, objectPathInfo.ArgumentInfo, args); + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, Utility._fixupApiFlags(flags)); + ret.argumentObjectPaths = argumentObjectPaths; + ret.getByIdMethodName = getByIdMethodName; + return ret; + }; + ObjectPathFactory.createReferenceIdObjectPath = function (context, referenceId) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + var ret = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return ret; + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt = function (hasIndexerMethod, context, parent, childItem, index) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + if (hasIndexerMethod && !Utility.isNullOrUndefined(id)) { + return ObjectPathFactory.createChildItemObjectPathUsingIndexer(context, parent, childItem); + } + else { + return ObjectPathFactory.createChildItemObjectPathUsingGetItemAt(context, parent, childItem, index); + } + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexer = function (context, parent, childItem) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + var objectPathInfo = (objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }); + objectPathInfo.ArgumentInfo.Arguments = [id]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createChildItemObjectPathUsingGetItemAt = function (context, parent, childItem, index) { + var indexFromServer = childItem[Constants.index]; + if (indexFromServer) { + index = indexFromServer; + } + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: Constants.getItemAt, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = [index]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + return ObjectPathFactory; + }()); + OfficeExtension_1.ObjectPathFactory = ObjectPathFactory; + var OfficeJsRequestExecutor = (function () { + function OfficeJsRequestExecutor(context) { + this.m_context = context; + } + OfficeJsRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); + return new OfficeExtension_1.Promise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (result.status == 'succeeded') { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBody(result), RichApiMessageUtility.getResponseHeaders(result)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); + } + resolve(response); + }); + }); + }; + OfficeJsRequestExecutor.SourceLibHeaderValue = 'officejs'; + return OfficeJsRequestExecutor; + }()); + var TrackedObjects = (function () { + function TrackedObjects(context) { + this._autoCleanupList = {}; + this.m_context = context; + } + TrackedObjects.prototype.add = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._addCommon(item, true); }); + } + else { + this._addCommon(param, true); + } + }; + TrackedObjects.prototype._autoAdd = function (object) { + this._addCommon(object, false); + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + }; + TrackedObjects.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue = function (object, resultValue) { + var shouldAutoTrack = this.m_context._autoCleanup && + !object[Constants.isTracked] && + object !== this.m_context._rootObject && + resultValue && + !Utility.isNullOrEmptyString(resultValue[Constants.referenceId]); + if (shouldAutoTrack) { + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype._addCommon = function (object, isExplicitlyAdded) { + if (object[Constants.isTracked]) { + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + return; + } + var referenceId = object[Constants.referenceId]; + var donotKeepReference = object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName]; + if (donotKeepReference) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.objectIsUntracked), null); + } + if (Utility.isNullOrEmptyString(referenceId) && object._KeepReference) { + object._KeepReference(); + ActionFactory.createInstantiateAction(this.m_context, object); + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype.remove = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._removeCommon(item); }); + } + else { + this._removeCommon(param); + } + }; + TrackedObjects.prototype._removeCommon = function (object) { + object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName] = true; + object.context._pendingRequest._removeKeepReferenceAction(object._objectPath.objectPathInfo.Id); + var referenceId = object[Constants.referenceId]; + if (!Utility.isNullOrEmptyString(referenceId)) { + var rootObject = this.m_context._rootObject; + if (rootObject._RemoveReference) { + rootObject._RemoveReference(referenceId); + } + } + delete object[Constants.isTracked]; + }; + TrackedObjects.prototype._retrieveAndClearAutoCleanupList = function () { + var list = this._autoCleanupList; + this._autoCleanupList = {}; + return list; + }; + return TrackedObjects; + }()); + OfficeExtension_1.TrackedObjects = TrackedObjects; + var RequestPrettyPrinter = (function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose, removePII) { + if (!globalObjName) { + globalObjName = 'root'; + } + this.m_globalObjName = globalObjName; + this.m_referencedObjectPaths = referencedObjectPaths; + this.m_actions = actions; + this.m_statements = []; + this.m_variableNameForObjectPathMap = {}; + this.m_variableNameToObjectPathMap = {}; + this.m_declaredObjectPathMap = {}; + this.m_showDispose = showDispose; + this.m_removePII = removePII; + } + RequestPrettyPrinter.prototype.process = function () { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo = function (actionIndex) { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount = 5; + this.m_statements = []; + var oneStatement = ''; + var statementIndex = -1; + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex == i) { + statementIndex = this.m_statements.length - 1; + } + if (statementIndex >= 0 && this.m_statements.length > statementIndex + surroundingCount + 1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex = statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex = 0; + } + var endIndex = statementIndex + 1 + surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex = this.m_statements.length; + } + var surroundingStatements = []; + if (startIndex != 0) { + surroundingStatements.push('...'); + } + for (var i_1 = startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push('// >>>>>'); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push('// <<<<<'); + for (var i_2 = statementIndex + 1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push('...'); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction = function (action) { + var actionInfo = action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + case 9: + this.processUpdateAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction = function (action) { + var objId = action.actionInfo.ObjectPathId; + var objPath = this.m_referencedObjectPaths[objId]; + var varName = this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement = 'var ' + varName + ' = ' + this.buildObjectPathExpressionWithParent(objPath) + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId] = varName; + } + else { + var statement = '// Instantiate {' + varName + '}'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction = function (action) { + var methodName = action.actionInfo.Name; + if (methodName === '_KeepReference') { + if (!OfficeExtension_1._internalConfig.showInternalApiInDebugInfo) { + return; + } + methodName = 'track'; + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(methodName) + + '(' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.load(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.retrieve(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction = function (action) { + var queryExp = ''; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp = JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.loadRecursive(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(action.actionInfo.Name) + + ' = ' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction = function (action) { + var statement = 'context.trace();'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.ensureUnchanged(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processUpdateAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.update(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant = function (statement, action) { + var _this = this; + if (this.m_showDispose) { + var lastUsedObjectPathIds = action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose = lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(', '); + return statement + ' // And then dispose {' + objectNamesToDispose + '}'; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression = function (action) { + if (action.actionInfo.QueryInfo) { + var option = {}; + option.select = action.actionInfo.QueryInfo.Select; + option.expand = action.actionInfo.QueryInfo.Expand; + option.skip = action.actionInfo.QueryInfo.Skip; + option.top = action.actionInfo.QueryInfo.Top; + if (typeof option.top === 'undefined' && + typeof option.skip === 'undefined' && + typeof option.expand === 'undefined') { + if (typeof option.select === 'undefined') { + return ''; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ''; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent = function (objPath) { + var hasParent = objPath.objectPathInfo.ObjectPathType == 5 || + objPath.objectPathInfo.ObjectPathType == 3 || + objPath.objectPathInfo.ObjectPathType == 4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return (this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId) + '.' + this.buildObjectPathExpression(objPath)); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression = function (objPath) { + var expr = this.buildObjectPathInfoExpression(objPath.objectPathInfo); + var originalObjectPathInfo = objPath.originalObjectPathInfo; + if (originalObjectPathInfo) { + expr = expr + ' /* originally ' + this.buildObjectPathInfoExpression(originalObjectPathInfo) + ' */'; + } + return expr; + }; + RequestPrettyPrinter.prototype.buildObjectPathInfoExpression = function (objectPathInfo) { + switch (objectPathInfo.ObjectPathType) { + case 1: + return 'context.' + this.m_globalObjName; + case 5: + return 'getItem(' + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + ')'; + case 3: + return (Utility._toCamelLowerCase(objectPathInfo.Name) + + '(' + + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + + ')'); + case 2: + return objectPathInfo.Name + '.newObject()'; + case 7: + return 'null'; + case 4: + return Utility._toCamelLowerCase(objectPathInfo.Name); + case 6: + return ('context.' + this.m_globalObjName + '._getObjectByReferenceId(' + JSON.stringify(objectPathInfo.Name) + ')'); + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression = function (args) { + var ret = ''; + if (!args.Arguments || args.Arguments.length === 0) { + return ret; + } + if (this.m_removePII) { + if (typeof args.Arguments[0] === 'undefined') { + return ret; + } + return '...'; + } + for (var i = 0; i < args.Arguments.length; i++) { + if (i > 0) { + ret = ret + ', '; + } + ret = + ret + + this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret === 'undefined') { + ret = ''; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral = function (value, objectPathId) { + if (typeof value == 'number' && value === objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase = function (objectPathId) { + var ret = 'v'; + var objPath = this.m_referencedObjectPaths[objectPathId]; + if (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret = this.m_globalObjName; + break; + case 4: + ret = Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName = objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3) === 'Get') { + methodName = methodName.substr(3); + } + ret = Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName = this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1) === 's') { + ret = parentName.substr(0, parentName.length - 1); + } + else { + ret = parentName + 'Item'; + } + break; + } + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName = function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret = this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + } + var i = 1; + while (this.m_variableNameToObjectPathMap[ret + i.toString()]) { + i++; + } + ret = ret + i.toString(); + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + var ResourceStrings = (function (_super) { + __extends(ResourceStrings, _super); + function ResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + ResourceStrings.cannotRegisterEvent = 'CannotRegisterEvent'; + ResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + ResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + ResourceStrings.propertyNotLoaded = 'PropertyNotLoaded'; + ResourceStrings.runMustReturnPromise = 'RunMustReturnPromise'; + ResourceStrings.moreInfoInnerError = 'MoreInfoInnerError'; + ResourceStrings.cannotApplyPropertyThroughSetMethod = 'CannotApplyPropertyThroughSetMethod'; + ResourceStrings.invalidOperationInCellEditMode = 'InvalidOperationInCellEditMode'; + ResourceStrings.objectIsUntracked = 'ObjectIsUntracked'; + ResourceStrings.customFunctionDefintionMissing = 'CustomFunctionDefintionMissing'; + ResourceStrings.customFunctionImplementationMissing = 'CustomFunctionImplementationMissing'; + ResourceStrings.customFunctionNameContainsBadChars = 'CustomFunctionNameContainsBadChars'; + ResourceStrings.customFunctionNameCannotSplit = 'CustomFunctionNameCannotSplit'; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch = 'CustomFunctionUnexpectedNumberOfEntriesInResultBatch'; + ResourceStrings.customFunctionCancellationHandlerMissing = 'CustomFunctionCancellationHandlerMissing'; + ResourceStrings.customFunctionInvalidFunction = 'CustomFunctionInvalidFunction'; + ResourceStrings.customFunctionInvalidFunctionMapping = 'CustomFunctionInvalidFunctionMapping'; + ResourceStrings.customFunctionWindowMissing = 'CustomFunctionWindowMissing'; + ResourceStrings.customFunctionDefintionMissingOnWindow = 'CustomFunctionDefintionMissingOnWindow'; + ResourceStrings.pendingBatchInProgress = 'PendingBatchInProgress'; + ResourceStrings.notInsideBatch = 'NotInsideBatch'; + ResourceStrings.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ResourceStrings; + }(CommonResourceStrings)); + OfficeExtension_1.ResourceStrings = ResourceStrings; + CoreUtility.addResourceStringValues({ + CannotRegisterEvent: 'The event handler cannot be registered.', + PropertyNotLoaded: "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.", + RunMustReturnPromise: 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".', + InvalidOrTimedOutSessionMessage: 'Your Office Online session has expired or is invalid. To continue, refresh the page.', + InvalidOperationInCellEditMode: 'Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.', + InvalidSheetName: 'The request cannot be processed because the specified worksheet cannot be found. Please try again.', + CustomFunctionDefintionMissing: "A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.", + CustomFunctionDefintionMissingOnWindow: "A property with the name '{0}' that represents the function's definition must exist on the window object.", + CustomFunctionImplementationMissing: "The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.", + CustomFunctionNameContainsBadChars: 'The function name may only contain letters, digits, underscores, and periods.', + CustomFunctionNameCannotSplit: 'The function name must contain a non-empty namespace and a non-empty short name.', + CustomFunctionUnexpectedNumberOfEntriesInResultBatch: "The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.", + CustomFunctionCancellationHandlerMissing: 'The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.', + CustomFunctionInvalidFunction: "The property with the name '{0}' that represents the function's definition is not a valid function.", + CustomFunctionInvalidFunctionMapping: "The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.", + CustomFunctionWindowMissing: 'The window object was not found.', + PendingBatchInProgress: 'There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.', + NotInsideBatch: 'Operations may not be invoked outside of a batch method.', + CannotUpdateReadOnlyProperty: "The property '{0}' is read-only and it cannot be updated.", + ObjectIsUntracked: 'The object is untracked.' + }); + var Utility = (function (_super) { + __extends(Utility, _super); + function Utility() { + return _super !== null && _super.apply(this, arguments) || this; + } + Utility.fixObjectPathIfNecessary = function (clientObject, value) { + if (clientObject && clientObject._objectPath && value) { + clientObject._objectPath.updateUsingObjectData(value, clientObject); + } + }; + Utility.load = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve = function (clientObj, option) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !Utility.isSetSupported('RichApiRuntime', '1.1'); + } + var result = new RetrieveResultImpl(clientObj, shouldPolyfill); + clientObj._retrieve(option, result); + return result; + }; + Utility.retrieveAndSync = function (clientObj, option) { + var result = Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); + }; + Utility.toJson = function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result = {}; + for (var prop in scalarProperties) { + var value = scalarProperties[prop]; + if (typeof value !== 'undefined') { + result[prop] = value; + } + } + for (var prop in navigationProperties) { + var value = navigationProperties[prop]; + if (typeof value !== 'undefined') { + if (value[Utility.fieldName_isCollection] && typeof value[Utility.fieldName_m__items] !== 'undefined') { + result[prop] = value.toJSON()['items']; + } + else { + result[prop] = value.toJSON(); + } + } + } + if (collectionItemsIfAny) { + result['items'] = collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; + }; + Utility.throwError = function (resourceId, arg, errorLocation) { + throw new _Internal.RuntimeError({ + code: resourceId, + httpStatusCode: 400, + message: CoreUtility._getResourceString(resourceId, arg), + debugInfo: errorLocation ? { errorLocation: errorLocation } : undefined + }); + }; + Utility.createRuntimeError = function (code, message, location, httpStatusCode, data) { + return new _Internal.RuntimeError({ + code: code, + httpStatusCode: httpStatusCode, + message: message, + debugInfo: { errorLocation: location }, + data: data + }); + }; + Utility.throwIfNotLoaded = function (propertyName, fieldValue, entityName, isNull) { + if (!isNull && + CoreUtility.isUndefined(fieldValue) && + propertyName.charCodeAt(0) != Utility.s_underscoreCharCode && + !Utility.s_suppressPropertyNotLoadedException) { + throw Utility.createPropertyNotLoadedException(entityName, propertyName); + } + }; + Utility._getPropertyValueWithoutCheckLoaded = function (object, propertyName) { + Utility.s_suppressPropertyNotLoadedException = true; + try { + return object[propertyName]; + } + finally { + Utility.s_suppressPropertyNotLoadedException = false; + } + }; + Utility.createPropertyNotLoadedException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.propertyNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.propertyNotLoaded, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.createCannotUpdateReadOnlyPropertyException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.cannotUpdateReadOnlyProperty, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotUpdateReadOnlyProperty, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.promisify = function (action) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + var callback = function (result) { + if (result.status == 'failed') { + reject(result.error); + } + else { + resolve(result.value); + } + }; + action(callback); + }); + }; + Utility._addActionResultHandler = function (clientObj, action, resultHandler) { + clientObj.context._pendingRequest.addActionResultHandler(action, resultHandler); + }; + Utility._handleNavigationPropertyResults = function (clientObj, objectValue, propertyNames) { + for (var i = 0; i < propertyNames.length - 1; i += 2) { + if (!CoreUtility.isUndefined(objectValue[propertyNames[i + 1]])) { + clientObj[propertyNames[i]]._handleResult(objectValue[propertyNames[i + 1]]); + } + } + }; + Utility._fixupApiFlags = function (flags) { + if (typeof flags === 'boolean') { + if (flags) { + flags = 1; + } + else { + flags = 0; + } + } + return flags; + }; + Utility.definePropertyThrowUnloadedException = function (obj, typeName, propertyName) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + throw Utility.createPropertyNotLoadedException(typeName, propertyName); + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(typeName, propertyName); + } + }); + }; + Utility.defineReadOnlyPropertyWithValue = function (obj, propertyName, value) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + return value; + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(null, propertyName); + } + }); + }; + Utility.processRetrieveResult = function (proxy, value, result, childItemCreateFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + return; + } + if (childItemCreateFunc) { + var data = value[Constants.itemsLowerCase]; + if (Array.isArray(data)) { + var itemsResult = []; + for (var i = 0; i < data.length; i++) { + var itemProxy = childItemCreateFunc(data[i], i); + var itemResult = {}; + itemResult[Constants.proxy] = itemProxy; + itemProxy._handleRetrieveResult(data[i], itemResult); + itemsResult.push(itemResult); + } + Utility.defineReadOnlyPropertyWithValue(result, Constants.itemsLowerCase, itemsResult); + } + } + else { + var scalarPropertyNames = proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = proxy[Constants.navigationPropertyNames]; + var typeName = proxy[Constants.className]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + var propName = scalarPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + Utility.defineReadOnlyPropertyWithValue(result, propName, propValue); + } + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + var propName = navigationPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + var propProxy = proxy[propName]; + var propResult = {}; + propProxy._handleRetrieveResult(propValue, propResult); + propResult[Constants.proxy] = propProxy; + if (Array.isArray(propResult[Constants.itemsLowerCase])) { + propResult = propResult[Constants.itemsLowerCase]; + } + Utility.defineReadOnlyPropertyWithValue(result, propName, propResult); + } + } + } + } + }; + Utility.setMockData = function (clientObj, value, childItemCreateFunc, setItemsFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + clientObj._handleResult(value); + return; + } + if (clientObj[Constants.scalarPropertyOriginalNames]) { + var result = {}; + var scalarPropertyOriginalNames = clientObj[Constants.scalarPropertyOriginalNames]; + var scalarPropertyNames = clientObj[Constants.scalarPropertyNames]; + for (var i = 0; i < scalarPropertyNames.length; i++) { + if (typeof (value[scalarPropertyNames[i]]) !== 'undefined') { + result[scalarPropertyOriginalNames[i]] = value[scalarPropertyNames[i]]; + } + } + clientObj._handleResult(result); + } + if (clientObj[Constants.navigationPropertyNames]) { + var navigationPropertyNames = clientObj[Constants.navigationPropertyNames]; + for (var i = 0; i < navigationPropertyNames.length; i++) { + if (typeof (value[navigationPropertyNames[i]]) !== 'undefined') { + var navigationPropValue = clientObj[navigationPropertyNames[i]]; + if (navigationPropValue.setMockData) { + navigationPropValue.setMockData(value[navigationPropertyNames[i]]); + } + } + } + } + if (clientObj[Constants.isCollection] && childItemCreateFunc) { + var itemsData = Array.isArray(value) ? value : value[Constants.itemsLowerCase]; + if (Array.isArray(itemsData)) { + var items = []; + for (var i = 0; i < itemsData.length; i++) { + var item = childItemCreateFunc(itemsData, i); + Utility.setMockData(item, itemsData[i]); + items.push(item); + } + setItemsFunc(items); + } + } + }; + Utility.applyMixin = function (derived, base) { + Object.getOwnPropertyNames(base.prototype).forEach(function (name) { + if (name !== 'constructor') { + Object.defineProperty(derived.prototype, name, Object.getOwnPropertyDescriptor(base.prototype, name)); + } + }); + }; + Utility.ensureTypeInitialized = function (type) { + var context = new ClientRequestContext(); + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, "Temp", false, 0); + new type(context, objectPath); + }; + Utility.fieldName_m__items = 'm__items'; + Utility.fieldName_isCollection = '_isCollection'; + Utility._synchronousCleanup = false; + Utility.s_underscoreCharCode = '_'.charCodeAt(0); + Utility.s_suppressPropertyNotLoadedException = false; + return Utility; + }(CommonUtility)); + OfficeExtension_1.Utility = Utility; + var BatchApiHelper = (function () { + function BatchApiHelper() { + } + BatchApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + var action = ActionFactory.createMethodAction(obj.context, obj, methodName, operationType, args, flags); + var result = new ClientResult(resultProcessType); + Utility._addActionResultHandler(obj, action, result); + return result; + }; + BatchApiHelper.invokeEnsureUnchanged = function (obj, objectState) { + ActionFactory.createEnsureUnchangedAction(obj.context, obj, objectState); + }; + BatchApiHelper.invokeSetProperty = function (obj, propName, propValue, flags) { + ActionFactory.createSetPropertyAction(obj.context, obj, propName, propValue, flags); + }; + BatchApiHelper.createRootServiceObject = function (type, context) { + var objectPath = ObjectPathFactory.createGlobalObjectObjectPath(context); + return new type(context, objectPath); + }; + BatchApiHelper.createObjectFromReferenceId = function (type, context, referenceId) { + var objectPath = ObjectPathFactory.createReferenceIdObjectPath(context, referenceId); + return new type(context, objectPath); + }; + BatchApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, typeName, isCollection, flags); + return new type(context, objectPath); + }; + BatchApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPath = ObjectPathFactory.createPropertyObjectPath(parent.context, parent, propertyName, isCollection, false, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createIndexerObject = function (type, parent, args) { + var objectPath = ObjectPathFactory.createIndexerObjectPath(parent.context, parent, args); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPath = ObjectPathFactory.createMethodObjectPath(parent.context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createChildItemObject = function (type, hasIndexerMethod, parent, chileItem, index) { + var objectPath = ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt(hasIndexerMethod, parent.context, parent, chileItem, index); + return new type(parent.context, objectPath); + }; + return BatchApiHelper; + }()); + OfficeExtension_1.BatchApiHelper = BatchApiHelper; + var LibraryBuilder = (function () { + function LibraryBuilder(options) { + this.m_namespaceMap = {}; + this.m_namespace = options.metadata.name; + this.m_targetNamespaceObject = options.targetNamespaceObject; + this.m_namespaceMap[this.m_namespace] = options.targetNamespaceObject; + if (options.namespaceMap) { + for (var ns in options.namespaceMap) { + this.m_namespaceMap[ns] = options.namespaceMap[ns]; + } + } + this.m_defaultApiSetName = options.metadata.defaultApiSetName; + this.m_hostName = options.metadata.hostName; + var metadata = options.metadata; + if (metadata.enumTypes) { + for (var i = 0; i < metadata.enumTypes.length; i++) { + this.buildEnumType(metadata.enumTypes[i]); + } + } + if (metadata.apiSets) { + for (var i = 0; i < metadata.apiSets.length; i++) { + var elem = metadata.apiSets[i]; + if (Array.isArray(elem)) { + metadata.apiSets[i] = { + version: elem[0], + name: elem[1] || this.m_defaultApiSetName + }; + } + } + this.m_apiSets = metadata.apiSets; + } + this.m_strings = metadata.strings; + if (metadata.clientObjectTypes) { + for (var i = 0; i < metadata.clientObjectTypes.length; i++) { + var elem = metadata.clientObjectTypes[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 11); + metadata.clientObjectTypes[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + collectionPropertyPath: this.getString(elem[6]), + newObjectServerTypeFullName: this.getString(elem[9]), + newObjectApiFlags: elem[10], + childItemTypeFullName: this.getString(elem[7]), + scalarProperties: elem[2], + navigationProperties: elem[3], + scalarMethods: elem[4], + navigationMethods: elem[5], + events: elem[8] + }; + } + this.buildClientObjectType(metadata.clientObjectTypes[i], options.fullyInitialize); + } + } + } + LibraryBuilder.prototype.ensureArraySize = function (value, size) { + var count = size - value.length; + while (count > 0) { + value.push(0); + count--; + } + }; + LibraryBuilder.prototype.getString = function (ordinalOrValue) { + if (typeof (ordinalOrValue) === "number") { + if (ordinalOrValue > 0) { + return this.m_strings[ordinalOrValue - 1]; + } + return null; + } + return ordinalOrValue; + }; + LibraryBuilder.prototype.buildEnumType = function (elem) { + var enumType; + if (Array.isArray(elem)) { + enumType = { + name: elem[0], + fields: elem[2] + }; + if (!enumType.fields) { + enumType.fields = {}; + } + var fieldsWithCamelUpperCaseValue = elem[1]; + if (Array.isArray(fieldsWithCamelUpperCaseValue)) { + for (var index = 0; index < fieldsWithCamelUpperCaseValue.length; index++) { + enumType.fields[fieldsWithCamelUpperCaseValue[index]] = this.toSimpleCamelUpperCase(fieldsWithCamelUpperCaseValue[index]); + } + } + } + else { + enumType = elem; + } + this.m_targetNamespaceObject[enumType.name] = enumType.fields; + }; + LibraryBuilder.prototype.buildClientObjectType = function (typeInfo, fullyInitialize) { + var thisBuilder = this; + var type = function (context, objectPath) { + ClientObject.apply(this, arguments); + if (!thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited) { + thisBuilder.buildPrototype(thisBuilder.m_targetNamespaceObject[typeInfo.name], typeInfo); + thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited = true; + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo) { + if (this._objectPath && this._objectPath.objectPathInfo && this._className) { + this._objectPath.objectPathInfo.T = this._className; + } + } + }; + this.m_targetNamespaceObject[typeInfo.name] = type; + this.extendsType(type, ClientObject); + this.buildNewObject(type, typeInfo); + if ((typeInfo.behaviorFlags & 2) !== 0) { + type.prototype._KeepReference = function () { + BatchApiHelper.invokeMethod(this, "_KeepReference", 1, [], 0, 0); + }; + } + if ((typeInfo.behaviorFlags & 32) !== 0) { + var func = this.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_StaticCustomize"); + func.call(null, type); + } + if (fullyInitialize) { + this.buildPrototype(type, typeInfo); + type._typeInited = true; + } + }; + LibraryBuilder.prototype.extendsType = function (d, b) { + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + LibraryBuilder.prototype.findObjectUnderPath = function (top, paths, pathStartIndex) { + var obj = top; + for (var i = pathStartIndex; i < paths.length; i++) { + if (typeof (obj) !== 'object') { + throw new OfficeExtension_1.Error("Cannot find " + paths.join(".")); + } + obj = obj[paths[i]]; + } + return obj; + }; + LibraryBuilder.prototype.getFunction = function (fullName) { + var ret = this.resolveObjectByFullName(fullName); + if (typeof (ret) !== 'function') { + throw new OfficeExtension_1.Error("Cannot find function or type: " + fullName); + } + return ret; + }; + LibraryBuilder.prototype.resolveObjectByFullName = function (fullName) { + var parts = fullName.split('.'); + if (parts.length === 1) { + return this.m_targetNamespaceObject[parts[0]]; + } + var rootName = parts[0]; + if (rootName === this.m_namespace) { + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 1); + } + if (this.m_namespaceMap[rootName]) { + return this.findObjectUnderPath(this.m_namespaceMap[rootName], parts, 1); + } + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 0); + }; + LibraryBuilder.prototype.evaluateSimpleExpression = function (expression, thisObj) { + if (Utility.isNullOrUndefined(expression)) { + return null; + } + var paths = expression.split('.'); + if (paths.length === 3 && paths[0] === 'OfficeExtension' && paths[1] === 'Constants') { + return Constants[paths[2]]; + } + if (paths[0] === 'this') { + var obj = thisObj; + for (var i = 1; i < paths.length; i++) { + if (paths[i] == 'toString()') { + obj = obj.toString(); + } + else if (paths[i].substr(paths[i].length - 2) === "()") { + obj = obj[paths[i].substr(0, paths[i].length - 2)](); + } + else { + obj = obj[paths[i]]; + } + } + return obj; + } + throw new OfficeExtension_1.Error("Cannot evaluate: " + expression); + }; + LibraryBuilder.prototype.evaluateEventTargetId = function (targetIdExpression, thisObj) { + if (Utility.isNullOrEmptyString(targetIdExpression)) { + return ''; + } + return this.evaluateSimpleExpression(targetIdExpression, thisObj); + }; + LibraryBuilder.prototype.isAllDigits = function (expression) { + var charZero = '0'.charCodeAt(0); + var charNine = '9'.charCodeAt(0); + for (var i = 0; i < expression.length; i++) { + if (expression.charCodeAt(i) < charZero || + expression.charCodeAt(i) > charNine) { + return false; + } + } + return true; + }; + LibraryBuilder.prototype.evaluateEventType = function (eventTypeExpression) { + if (Utility.isNullOrEmptyString(eventTypeExpression)) { + return 0; + } + if (this.isAllDigits(eventTypeExpression)) { + return parseInt(eventTypeExpression); + } + var ret = this.resolveObjectByFullName(eventTypeExpression); + if (typeof (ret) !== 'number') { + throw new OfficeExtension_1.Error("Invalid event type: " + eventTypeExpression); + } + return ret; + }; + LibraryBuilder.prototype.buildPrototype = function (type, typeInfo) { + this.buildScalarProperties(type, typeInfo); + this.buildNavigationProperties(type, typeInfo); + this.buildScalarMethods(type, typeInfo); + this.buildNavigationMethods(type, typeInfo); + this.buildEvents(type, typeInfo); + this.buildHandleResult(type, typeInfo); + this.buildHandleIdResult(type, typeInfo); + this.buildHandleRetrieveResult(type, typeInfo); + this.buildLoad(type, typeInfo); + this.buildRetrieve(type, typeInfo); + this.buildSetMockData(type, typeInfo); + this.buildEnsureUnchanged(type, typeInfo); + this.buildUpdate(type, typeInfo); + this.buildSet(type, typeInfo); + this.buildToJSON(type, typeInfo); + this.buildItems(type, typeInfo); + this.buildTypeMetadataInfo(type, typeInfo); + this.buildTrackUntrack(type, typeInfo); + this.buildMixin(type, typeInfo); + }; + LibraryBuilder.prototype.toSimpleCamelUpperCase = function (name) { + return name.substr(0, 1).toUpperCase() + name.substr(1); + }; + LibraryBuilder.prototype.ensureOriginalName = function (member) { + if (member.originalName === null) { + member.originalName = this.toSimpleCamelUpperCase(member.name); + } + }; + LibraryBuilder.prototype.getFieldName = function (member) { + return "m_" + member.name; + }; + LibraryBuilder.prototype.throwIfApiNotSupported = function (typeInfo, member) { + if (this.m_apiSets && member.apiSetInfoOrdinal > 0) { + var apiSetInfo = this.m_apiSets[member.apiSetInfoOrdinal - 1]; + if (apiSetInfo) { + Utility.throwIfApiNotSupported(typeInfo.name + "." + member.name, apiSetInfo.name, apiSetInfo.version, this.m_hostName); + } + } + }; + LibraryBuilder.prototype.buildScalarProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarProperties)) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var elem = typeInfo.scalarProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 6); + typeInfo.scalarProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + originalName: this.getString(elem[3]), + setMethodApiFlags: elem[4], + undoableApiSetInfoOrdinal: elem[5] + }; + } + this.buildScalarProperty(type, typeInfo, typeInfo.scalarProperties[i]); + } + } + }; + LibraryBuilder.prototype.calculateApiFlags = function (apiFlags, undoableApiSetInfoOrdinal) { + if (undoableApiSetInfoOrdinal > 0) { + var undoableApiSetInfo = this.m_apiSets[undoableApiSetInfoOrdinal - 1]; + if (undoableApiSetInfo) { + apiFlags = CommonUtility.calculateApiFlags(apiFlags, undoableApiSetInfo.name, undoableApiSetInfo.version); + } + } + return apiFlags; + }; + LibraryBuilder.prototype.buildScalarProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + Utility.throwIfNotLoaded(propInfo.name, this[fieldName], typeInfo.name, this._isNull); + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildNavigationProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationProperties)) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + var elem = typeInfo.navigationProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 8); + typeInfo.navigationProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[4]), + getMethodApiFlags: elem[5], + setMethodApiFlags: elem[6], + propertyTypeFullName: this.getString(elem[1]), + undoableApiSetInfoOrdinal: elem[7] + }; + } + this.buildNavigationProperty(type, typeInfo, typeInfo.navigationProperties[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + if (!this[thisBuilder.getFieldName(propInfo)]) { + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + this[fieldName] = BatchApiHelper.createPropertyObject(thisBuilder.getFunction(propInfo.propertyTypeFullName), this, propInfo.originalName, (propInfo.behaviorFlags & 16) !== 0, propInfo.getMethodApiFlags); + } + if (propInfo.behaviorFlags & 64) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Get"); + customizationFunc.call(this, this, this[fieldName]); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildScalarMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarMethods)) { + for (var i = 0; i < typeInfo.scalarMethods.length; i++) { + var elem = typeInfo.scalarMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.scalarMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[5]), + apiFlags: elem[4], + parameterCount: elem[1], + undoableApiSetInfoOrdinal: elem[6] + }; + } + this.buildScalarMethod(type, typeInfo, typeInfo.scalarMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildScalarMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + var resultProcessType = 0; + if (methodInfo.behaviorFlags & 32) { + resultProcessType = 1; + } + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.invokeMethod(this, methodInfo.originalName, operationType, args, apiFlags, resultProcessType); + }; + }; + LibraryBuilder.prototype.buildNavigationMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationMethods)) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + var elem = typeInfo.navigationMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 9); + typeInfo.navigationMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[3], + apiSetInfoOrdinal: elem[4], + originalName: this.getString(elem[6]), + apiFlags: elem[5], + parameterCount: elem[2], + returnTypeFullName: this.getString(elem[1]), + returnObjectGetByIdMethodName: this.getString(elem[7]), + undoableApiSetInfoOrdinal: elem[8] + }; + } + this.buildNavigationMethod(type, typeInfo, typeInfo.navigationMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + if ((methodInfo.behaviorFlags & 16) !== 0) { + return BatchApiHelper.createIndexerObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, args); + } + else { + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.createMethodObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, methodInfo.originalName, operationType, args, (methodInfo.behaviorFlags & 4) !== 0, (methodInfo.behaviorFlags & 8) !== 0, methodInfo.returnObjectGetByIdMethodName, apiFlags); + } + }; + }; + LibraryBuilder.prototype.buildHandleResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleResult = function (value) { + ClientObject.prototype._handleResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + Utility.fixObjectPathIfNecessary(this, value); + if (typeInfo.behaviorFlags & 8) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i_3 = 0; i_3 < typeInfo.scalarProperties.length; i_3++) { + if (!Utility.isUndefined(value[typeInfo.scalarProperties[i_3].originalName])) { + if ((typeInfo.scalarProperties[i_3].behaviorFlags & 8) !== 0) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i_3].originalName]); + } + else { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = value[typeInfo.scalarProperties[i_3].originalName]; + } + } + } + } + if (typeInfo.navigationProperties) { + var propNames = []; + for (var i_4 = 0; i_4 < typeInfo.navigationProperties.length; i_4++) { + propNames.push(typeInfo.navigationProperties[i_4].name); + propNames.push(typeInfo.navigationProperties[i_4].originalName); + } + Utility._handleNavigationPropertyResults(this, value, propNames); + } + if ((typeInfo.behaviorFlags & 1) !== 0) { + var hasIndexerMethod = thisBuilder.hasIndexMethod(typeInfo); + if (!Utility.isNullOrUndefined(value[Constants.items])) { + this.m__items = []; + var _data = value[Constants.items]; + var childItemType = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + for (var i = 0; i < _data.length; i++) { + var _item = BatchApiHelper.createChildItemObject(childItemType, hasIndexerMethod, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + } + }; + }; + LibraryBuilder.prototype.buildHandleRetrieveResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleRetrieveResult = function (value, result) { + ClientObject.prototype._handleRetrieveResult.call(this, value, result); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if (typeInfo.scalarProperties[i].behaviorFlags & 8) { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].name])) { + value[typeInfo.scalarProperties[i].name] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i].name]); + } + } + } + } + if (typeInfo.behaviorFlags & 1) { + var hasIndexerMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + var childItemType_1 = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + var thisObj_1 = this; + Utility.processRetrieveResult(thisObj_1, value, result, function (childItemData, index) { return BatchApiHelper.createChildItemObject(childItemType_1, hasIndexerMethod_1, thisObj_1, childItemData, index); }); + } + else { + Utility.processRetrieveResult(this, value, result); + } + }; + }; + LibraryBuilder.prototype.buildHandleIdResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleIdResult = function (value) { + ClientObject.prototype._handleIdResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.behaviorFlags & 16) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleIdResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var propName = typeInfo.scalarProperties[i].originalName; + if (propName === "Id" || propName === "_Id" || propName === "_ReferenceId") { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].originalName])) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])] = value[typeInfo.scalarProperties[i].originalName]; + } + } + } + } + }; + }; + LibraryBuilder.prototype.buildLoad = function (type, typeInfo) { + type.prototype.load = function (options) { + return Utility.load(this, options); + }; + }; + LibraryBuilder.prototype.buildRetrieve = function (type, typeInfo) { + type.prototype.retrieve = function (options) { + return Utility.retrieve(this, options); + }; + }; + LibraryBuilder.prototype.buildNewObject = function (type, typeInfo) { + if (!Utility.isNullOrEmptyString(typeInfo.newObjectServerTypeFullName)) { + type.newObject = function (context) { + return BatchApiHelper.createTopLevelServiceObject(type, context, typeInfo.newObjectServerTypeFullName, (typeInfo.behaviorFlags & 1) !== 0, typeInfo.newObjectApiFlags); + }; + } + }; + LibraryBuilder.prototype.buildSetMockData = function (type, typeInfo) { + var thisBuilder = this; + if (typeInfo.behaviorFlags & 1) { + var hasIndexMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + type.prototype.setMockData = function (data) { + var thisObj = this; + Utility.setMockData(thisObj, data, function (childItemData, index) { + return BatchApiHelper.createChildItemObject(thisBuilder.getFunction(typeInfo.childItemTypeFullName), hasIndexMethod_1, thisObj, childItemData, index); + }, function (items) { + thisObj.m__items = items; + }); + }; + } + else { + type.prototype.setMockData = function (data) { + Utility.setMockData(this, data); + }; + } + }; + LibraryBuilder.prototype.buildEnsureUnchanged = function (type, typeInfo) { + type.prototype.ensureUnchanged = function (data) { + BatchApiHelper.invokeEnsureUnchanged(this, data); + }; + }; + LibraryBuilder.prototype.buildUpdate = function (type, typeInfo) { + type.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + }; + LibraryBuilder.prototype.buildSet = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) !== 0) { + return; + } + var notAllowedToBeSetPropertyNames = []; + var allowedScalarPropertyNames = []; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 2) === 0 && + (typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + allowedScalarPropertyNames.push(typeInfo.scalarProperties[i].name); + } + else { + notAllowedToBeSetPropertyNames.push(typeInfo.scalarProperties[i].name); + } + } + } + var allowedNavigationPropertyNames = []; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 16) !== 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 1) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 32) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else { + allowedNavigationPropertyNames.push(typeInfo.navigationProperties[i].name); + } + } + } + if (allowedNavigationPropertyNames.length === 0 && allowedScalarPropertyNames.length === 0) { + return; + } + type.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, allowedScalarPropertyNames, allowedNavigationPropertyNames, notAllowedToBeSetPropertyNames); + }; + }; + LibraryBuilder.prototype.buildItems = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) === 0) { + return; + } + Object.defineProperty(type.prototype, "items", { + get: function () { + Utility.throwIfNotLoaded("items", this.m__items, typeInfo.name, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildToJSON = function (type, typeInfo) { + var thisBuilder = this; + if ((typeInfo.behaviorFlags & 1) !== 0) { + type.prototype.toJSON = function () { + return Utility.toJson(this, {}, {}, this.m__items); + }; + return; + } + else { + type.prototype.toJSON = function () { + var scalarProperties = {}; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + scalarProperties[typeInfo.scalarProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])]; + } + } + } + var navProperties = {}; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 1) !== 0) { + navProperties[typeInfo.navigationProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.navigationProperties[i])]; + } + } + } + return Utility.toJson(this, scalarProperties, navProperties); + }; + } + }; + LibraryBuilder.prototype.buildTypeMetadataInfo = function (type, typeInfo) { + Object.defineProperty(type.prototype, "_className", { + get: function () { + return typeInfo.name; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_isCollection", { + get: function () { + return (typeInfo.behaviorFlags & 1) !== 0; + }, + enumerable: true, + configurable: true + }); + if (!Utility.isNullOrEmptyString(typeInfo.collectionPropertyPath)) { + Object.defineProperty(type.prototype, "_collectionPropertyPath", { + get: function () { + return typeInfo.collectionPropertyPath; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.scalarProperties && typeInfo.scalarProperties.length > 0) { + Object.defineProperty(type.prototype, "_scalarPropertyNames", { + get: function () { + if (!this.m__scalarPropertyNames) { + this.m__scalarPropertyNames = typeInfo.scalarProperties.map(function (p) { return p.name; }); + } + return this.m__scalarPropertyNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyOriginalNames", { + get: function () { + if (!this.m__scalarPropertyOriginalNames) { + this.m__scalarPropertyOriginalNames = typeInfo.scalarProperties.map(function (p) { return p.originalName; }); + } + return this.m__scalarPropertyOriginalNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyUpdateable", { + get: function () { + if (!this.m__scalarPropertyUpdateable) { + this.m__scalarPropertyUpdateable = typeInfo.scalarProperties.map(function (p) { return (p.behaviorFlags & 2) === 0; }); + } + return this.m__scalarPropertyUpdateable; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.navigationProperties && typeInfo.navigationProperties.length > 0) { + Object.defineProperty(type.prototype, "_navigationPropertyNames", { + get: function () { + if (!this.m__navigationPropertyNames) { + this.m__navigationPropertyNames = typeInfo.navigationProperties.map(function (p) { return p.name; }); + } + return this.m__navigationPropertyNames; + }, + enumerable: true, + configurable: true + }); + } + }; + LibraryBuilder.prototype.buildTrackUntrack = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 2) { + type.prototype.track = function () { + this.context.trackedObjects.add(this); + return this; + }; + type.prototype.untrack = function () { + this.context.trackedObjects.remove(this); + return this; + }; + } + }; + LibraryBuilder.prototype.buildMixin = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 4) { + var mixinType = this.getFunction(typeInfo.name + 'Custom'); + Utility.applyMixin(type, mixinType); + } + }; + LibraryBuilder.prototype.getOnEventName = function (name) { + if (name[0] === '_') { + return '_on' + name.substr(1); + } + return 'on' + name; + }; + LibraryBuilder.prototype.buildEvents = function (type, typeInfo) { + if (typeInfo.events) { + for (var i = 0; i < typeInfo.events.length; i++) { + var elem = typeInfo.events[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.events[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + typeExpression: this.getString(elem[3]), + targetIdExpression: this.getString(elem[4]), + register: this.getString(elem[5]), + unregister: this.getString(elem[6]) + }; + } + this.buildEvent(type, typeInfo, typeInfo.events[i]); + } + } + }; + LibraryBuilder.prototype.buildEvent = function (type, typeInfo, evt) { + if (evt.behaviorFlags & 1) { + this.buildV0Event(type, typeInfo, evt); + } + else { + this.buildV2Event(type, typeInfo, evt); + } + }; + LibraryBuilder.prototype.buildV2Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (evt.register !== 'null') { + registerFunc = this[evt.register].bind(this); + } + var unregisterFunc = null; + if (evt.unregister !== 'null') { + unregisterFunc = this[evt.unregister].bind(this); + } + var getTargetIdFunc = function () { + return thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + }; + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + var eventType = thisBuilder.evaluateEventType(evt.typeExpression); + this[fieldName] = new GenericEventHandlers(this.context, this, evt.name, { + eventType: eventType, + getTargetIdFunc: getTargetIdFunc, + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildV0Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (Utility.isNullOrEmptyString(evt.register)) { + var eventType_1 = thisBuilder.evaluateEventType(evt.typeExpression); + registerFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.register(eventType_1, targetId, handlerCallback); + }; + } + else if (evt.register !== 'null') { + var func_1 = thisBuilder.getFunction(evt.register); + registerFunc = + function (handlerCallback) { + return func_1.call(thisObj, thisObj, handlerCallback); + }; + } + var unregisterFunc = null; + if (Utility.isNullOrEmptyString(evt.unregister)) { + var eventType_2 = thisBuilder.evaluateEventType(evt.typeExpression); + unregisterFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.unregister(eventType_2, targetId, handlerCallback); + }; + } + else if (evt.unregister !== 'null') { + var func_2 = thisBuilder.getFunction(evt.unregister); + unregisterFunc = + function (handlerCallback) { + return func_2.call(thisObj, thisObj, handlerCallback); + }; + } + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + this[fieldName] = new EventHandlers(this.context, this, evt.name, { + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.hasIndexMethod = function (typeInfo) { + var ret = false; + if (typeInfo.navigationMethods) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + if ((typeInfo.navigationMethods[i].behaviorFlags & 16) !== 0) { + ret = true; + break; + } + } + } + return ret; + }; + LibraryBuilder.CustomizationCodeNamespace = "_CC"; + return LibraryBuilder; + }()); + OfficeExtension_1.LibraryBuilder = LibraryBuilder; + var versionToken = 1; + var internalConfiguration = { + invokeRequestModifier: function (request) { + request.DdaMethod.Version = versionToken; + return request; + }, + invokeResponseModifier: function (args) { + versionToken = args.Version; + if (args.Error) { + args.error = {}; + args.error.Code = args.Error; + } + return args; + } + }; + var CommunicationConstants; + (function (CommunicationConstants) { + CommunicationConstants["SendingId"] = "sId"; + CommunicationConstants["RespondingId"] = "rId"; + CommunicationConstants["CommandKey"] = "command"; + CommunicationConstants["SessionInfoKey"] = "sessionInfo"; + CommunicationConstants["ParamsKey"] = "params"; + CommunicationConstants["ApiReadyCommand"] = "apiready"; + CommunicationConstants["ExecuteMethodCommand"] = "executeMethod"; + CommunicationConstants["GetAppContextCommand"] = "getAppContext"; + CommunicationConstants["RegisterEventCommand"] = "registerEvent"; + CommunicationConstants["UnregisterEventCommand"] = "unregisterEvent"; + CommunicationConstants["FireEventCommand"] = "fireEvent"; + })(CommunicationConstants || (CommunicationConstants = {})); + var EmbeddedConstants = (function () { + function EmbeddedConstants() { + } + EmbeddedConstants.sessionContext = 'sc'; + EmbeddedConstants.embeddingPageOrigin = 'EmbeddingPageOrigin'; + EmbeddedConstants.embeddingPageSessionInfo = 'EmbeddingPageSessionInfo'; + return EmbeddedConstants; + }()); + OfficeExtension_1.EmbeddedConstants = EmbeddedConstants; + var EmbeddedSession = (function (_super) { + __extends(EmbeddedSession, _super); + function EmbeddedSession(url, options) { + var _this = _super.call(this) || this; + _this.m_chosenWindow = null; + _this.m_chosenOrigin = null; + _this.m_enabled = true; + _this.m_onMessageHandler = _this._onMessage.bind(_this); + _this.m_callbackList = {}; + _this.m_id = 0; + _this.m_timeoutId = -1; + _this.m_appContext = null; + _this.m_url = url; + _this.m_options = options; + if (!_this.m_options) { + _this.m_options = { sessionKey: Math.random().toString() }; + } + if (!_this.m_options.sessionKey) { + _this.m_options.sessionKey = Math.random().toString(); + } + if (!_this.m_options.container) { + _this.m_options.container = document.body; + } + if (!_this.m_options.timeoutInMilliseconds) { + _this.m_options.timeoutInMilliseconds = 60000; + } + if (!_this.m_options.height) { + _this.m_options.height = '400px'; + } + if (!_this.m_options.width) { + _this.m_options.width = '100%'; + } + if (!(_this.m_options.webApplication && + _this.m_options.webApplication.accessToken && + _this.m_options.webApplication.accessTokenTtl)) { + _this.m_options.webApplication = null; + } + return _this; + } + EmbeddedSession.prototype._getIFrameSrc = function () { + var origin = window.location.protocol + '//' + window.location.host; + var toAppend = EmbeddedConstants.embeddingPageOrigin + + '=' + + encodeURIComponent(origin) + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + encodeURIComponent(this.m_options.sessionKey); + var useHash = false; + if (this.m_url.toLowerCase().indexOf('/_layouts/preauth.aspx') > 0 || + this.m_url.toLowerCase().indexOf('/_layouts/15/preauth.aspx') > 0) { + useHash = true; + } + var a = document.createElement('a'); + a.href = this.m_url; + if (this.m_options.webApplication) { + var toAppendWAC = EmbeddedConstants.embeddingPageOrigin + + '=' + + origin + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + this.m_options.sessionKey; + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + else { + a.search = a.search + '&' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + } + else if (useHash) { + if (a.hash.length === 0 || a.hash === '#') { + a.hash = '#' + toAppend; + } + else { + a.hash = a.hash + '&' + toAppend; + } + } + else { + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + toAppend; + } + else { + a.search = a.search + '&' + toAppend; + } + } + var iframeSrc = a.href; + return iframeSrc; + }; + EmbeddedSession.prototype.init = function () { + var _this = this; + window.addEventListener('message', this.m_onMessageHandler); + var iframeSrc = this._getIFrameSrc(); + return CoreUtility.createPromise(function (resolve, reject) { + var iframeElement = document.createElement('iframe'); + if (_this.m_options.id) { + iframeElement.id = _this.m_options.id; + iframeElement.name = _this.m_options.id; + } + iframeElement.style.height = _this.m_options.height; + iframeElement.style.width = _this.m_options.width; + if (!_this.m_options.webApplication) { + iframeElement.src = iframeSrc; + _this.m_options.container.appendChild(iframeElement); + } + else { + var webApplicationForm = document.createElement('form'); + webApplicationForm.setAttribute('action', iframeSrc); + webApplicationForm.setAttribute('method', 'post'); + webApplicationForm.setAttribute('target', iframeElement.name); + _this.m_options.container.appendChild(webApplicationForm); + var token_input = document.createElement('input'); + token_input.setAttribute('type', 'hidden'); + token_input.setAttribute('name', 'access_token'); + token_input.setAttribute('value', _this.m_options.webApplication.accessToken); + webApplicationForm.appendChild(token_input); + var token_ttl_input = document.createElement('input'); + token_ttl_input.setAttribute('type', 'hidden'); + token_ttl_input.setAttribute('name', 'access_token_ttl'); + token_ttl_input.setAttribute('value', _this.m_options.webApplication.accessTokenTtl); + webApplicationForm.appendChild(token_ttl_input); + _this.m_options.container.appendChild(iframeElement); + webApplicationForm.submit(); + } + _this.m_timeoutId = window.setTimeout(function () { + _this.close(); + var err = Utility.createRuntimeError(CoreErrorCodes.timeout, CoreUtility._getResourceString(CoreResourceStrings.timeout), 'EmbeddedSession.init'); + reject(err); + }, _this.m_options.timeoutInMilliseconds); + _this.m_promiseResolver = resolve; + }); + }; + EmbeddedSession.prototype._invoke = function (method, callback, params) { + if (!this.m_enabled) { + callback(5001, null); + return; + } + if (internalConfiguration.invokeRequestModifier) { + params = internalConfiguration.invokeRequestModifier(params); + } + this._sendMessageWithCallback(this.m_id++, method, params, function (args) { + if (internalConfiguration.invokeResponseModifier) { + args = internalConfiguration.invokeResponseModifier(args); + } + var errorCode = args['Error']; + delete args['Error']; + callback(errorCode || 0, args); + }); + }; + EmbeddedSession.prototype.close = function () { + window.removeEventListener('message', this.m_onMessageHandler); + window.clearTimeout(this.m_timeoutId); + this.m_enabled = false; + }; + EmbeddedSession.prototype.getEventRegistration = function (controlId) { + if (!this.m_sessionEventManager) { + this.m_sessionEventManager = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + } + return this.m_sessionEventManager; + }; + EmbeddedSession.prototype._createRequestExecutorOrNull = function () { + return new EmbeddedRequestExecutor(this); + }; + EmbeddedSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + EmbeddedSession.prototype._registerEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.RegisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(null); + }); + }); + }; + EmbeddedSession.prototype._unregisterEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.UnregisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(); + }); + }); + }; + EmbeddedSession.prototype._onMessage = function (event) { + var _this = this; + if (!this.m_enabled) { + return; + } + if (this.m_chosenWindow && (this.m_chosenWindow !== event.source || this.m_chosenOrigin !== event.origin)) { + return; + } + var eventData = event.data; + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.ApiReadyCommand) { + if (!this.m_chosenWindow && + this._isValidDescendant(event.source) && + eventData[CommunicationConstants.SessionInfoKey] === this.m_options.sessionKey) { + this.m_chosenWindow = event.source; + this.m_chosenOrigin = event.origin; + this._sendMessageWithCallback(this.m_id++, CommunicationConstants.GetAppContextCommand, null, function (appContext) { + _this._setupContext(appContext); + window.clearTimeout(_this.m_timeoutId); + _this.m_promiseResolver(); + }); + } + return; + } + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.FireEventCommand) { + var msg = eventData[CommunicationConstants.ParamsKey]; + var eventId = msg['EventId']; + var targetId = msg['TargetId']; + var data = msg['Data']; + if (this.m_sessionEventManager) { + var handlers = this.m_sessionEventManager.getHandlers(eventId, targetId); + for (var i = 0; i < handlers.length; i++) { + handlers[i](data); + } + } + return; + } + if (eventData && eventData.hasOwnProperty(CommunicationConstants.RespondingId)) { + var rId = eventData[CommunicationConstants.RespondingId]; + if (this.m_callbackList.hasOwnProperty(rId)) { + var callback = this.m_callbackList[rId]; + if (typeof callback === 'function') { + callback(eventData[CommunicationConstants.ParamsKey]); + } + delete this.m_callbackList[rId]; + } + } + }; + EmbeddedSession.prototype._sendMessageWithCallback = function (id, command, data, callback) { + this.m_callbackList[id] = callback; + var message = {}; + message[CommunicationConstants.SendingId] = id; + message[CommunicationConstants.CommandKey] = command; + message[CommunicationConstants.ParamsKey] = data; + this.m_chosenWindow.postMessage(JSON.stringify(message), this.m_chosenOrigin); + }; + EmbeddedSession.prototype._isValidDescendant = function (wnd) { + var container = this.m_options.container || document.body; + function doesFrameWindow(containerWindow) { + if (containerWindow === wnd) { + return true; + } + for (var i = 0, len = containerWindow.frames.length; i < len; i++) { + if (doesFrameWindow(containerWindow.frames[i])) { + return true; + } + } + return false; + } + var iframes = container.getElementsByTagName('iframe'); + for (var i = 0, len = iframes.length; i < len; i++) { + if (doesFrameWindow(iframes[i].contentWindow)) { + return true; + } + } + return false; + }; + EmbeddedSession.prototype._setupContext = function (appContext) { + if (!(this.m_appContext = appContext)) { + return; + } + }; + return EmbeddedSession; + }(SessionBase)); + OfficeExtension_1.EmbeddedSession = EmbeddedSession; + var EmbeddedRequestExecutor = (function () { + function EmbeddedRequestExecutor(session) { + this.m_session = session; + } + EmbeddedRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, EmbeddedRequestExecutor.SourceLibHeaderValue); + return CoreUtility.createPromise(function (resolve, reject) { + _this.m_session._invoke(CommunicationConstants.ExecuteMethodCommand, function (status, result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (status == 0) { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBodyFromSafeArray(result.Data), RichApiMessageUtility.getResponseHeadersFromSafeArray(result.Data)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.Code, result.error.Message); + } + resolve(response); + }, EmbeddedRequestExecutor._transformMessageArrayIntoParams(messageSafearray)); + }); + }; + EmbeddedRequestExecutor._transformMessageArrayIntoParams = function (msgArray) { + return { + ArrayData: msgArray, + DdaMethod: { + DispatchId: EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod + } + }; + }; + EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod = 93; + EmbeddedRequestExecutor.SourceLibHeaderValue = 'Embedded'; + return EmbeddedRequestExecutor; + }()); +})(OfficeExtension || (OfficeExtension = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { + step(generator.next(value)); + } + catch (e) { + reject(e); + } } + function rejected(value) { try { + step(generator["throw"](value)); + } + catch (e) { + reject(e); + } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function () { if (t[0] & 1) + throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } + catch (e) { + op = [6, e]; + y = 0; + } + finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "AgaveVisualApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeBiShim = "BiShim"; + var BiShim = (function (_super) { + __extends(BiShim, _super); + function BiShim() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BiShim.prototype, "_className", { + get: function () { + return "BiShim"; + }, + enumerable: true, + configurable: true + }); + BiShim.prototype.initialize = function (capabilities) { + _invokeMethod(this, "Initialize", 0, [capabilities], 0, 0); + }; + BiShim.prototype.getData = function () { + return _invokeMethod(this, "getData", 1, [], 4, 0); + }; + BiShim.prototype.setVisualObjects = function (visualObjects) { + _invokeMethod(this, "setVisualObjects", 0, [visualObjects], 2, 0); + }; + BiShim.prototype.setVisualObjectsToPersist = function (visualObjectsToPersist) { + _invokeMethod(this, "setVisualObjectsToPersist", 0, [visualObjectsToPersist], 2, 0); + }; + BiShim.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BiShim.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BiShim.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BiShim, context, "Microsoft.AgaveVisual.BiShim", false, 4); + }; + BiShim.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BiShim; + }(OfficeExtension.ClientObject)); + OfficeCore.BiShim = BiShim; + var AgaveVisualErrorCodes; + (function (AgaveVisualErrorCodes) { + AgaveVisualErrorCodes["generalException1"] = "GeneralException"; + })(AgaveVisualErrorCodes = OfficeCore.AgaveVisualErrorCodes || (OfficeCore.AgaveVisualErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "ExperimentApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeFlightingService = "FlightingService"; + var FlightingService = (function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId = function () { + return _invokeMethod(this, "GetClientSessionId", 1, [], 4, 0); + }; + FlightingService.prototype.getDeferredFlights = function () { + return _invokeMethod(this, "GetDeferredFlights", 1, [], 4, 0); + }; + FlightingService.prototype.getFeature = function (featureName, type, defaultValue, possibleValues) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null, 4); + }; + FlightingService.prototype.getFeatureGate = function (featureName, scope) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeatureGate", 1, [featureName, scope], false, false, null, 4); + }; + FlightingService.prototype.resetOverride = function (featureName) { + _invokeMethod(this, "ResetOverride", 0, [featureName], 0, 0); + }; + FlightingService.prototype.setOverride = function (featureName, type, value) { + _invokeMethod(this, "SetOverride", 0, [featureName, type, value], 0, 0); + }; + FlightingService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FlightingService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FlightingService, context, "Microsoft.Experiment.FlightingService", false, 4); + }; + FlightingService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService = FlightingService; + var _typeABType = "ABType"; + var ABType = (function (_super) { + __extends(ABType, _super); + function ABType() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeABType, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + ABType.prototype.load = function (option) { + return _load(this, option); + }; + ABType.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + ABType.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ABType.prototype.toJSON = function () { + return _toJson(this, { + "value": this._V + }, {}); + }; + ABType.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType = ABType; + var FeatureType; + (function (FeatureType) { + FeatureType["boolean"] = "Boolean"; + FeatureType["integer"] = "Integer"; + FeatureType["string"] = "String"; + })(FeatureType = OfficeCore.FeatureType || (OfficeCore.FeatureType = {})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes["generalException"] = "GeneralException"; + })(ExperimentErrorCodes = OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyDialog; +(function (OfficeFirstPartyDialog) { + var Dialog = (function () { + function Dialog(_dialogService) { + this._dialogService = _dialogService; + } + Dialog.prototype.close = function () { + this._dialogService.close(); + return this._dialogService.context.sync(); + }; + Dialog.prototype.messageChild = function (message, options) { + if (DialogApiManager && DialogApiManager.messageChildRichApiBridge) { + DialogApiManager.messageChildRichApiBridge(message, options); + } + }; + return Dialog; + }()); + OfficeFirstPartyDialog.Dialog = Dialog; + function lookupErrorCodeAndMessage(internalCode) { + var _a; + var table = (_a = {}, + _a[12002] = { code: "InvalidUrl", message: "Cannot load URL, no such page or bad URL syntax." }, + _a[12003] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12004] = { code: "Untrusted", message: "Domain is not trusted." }, + _a[12005] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12007] = { code: "FailedToOpen", message: "Another dialog is already opened." }, + _a); + if (table[internalCode]) { + return table[internalCode]; + } + else { + return { code: "Unknown", message: "An unknown error has occured with code: " + internalCode }; + } + } + function displayWebDialog(url, options) { + if (options === void 0) { + options = {}; + } + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) { + throw new OfficeExtension.Error({ code: "InvalidArgument", message: 'Dimensions must be "number%" or number.' }); + } + var ctx = new OfficeExtension.ClientRequestContext(); + var dialogService = OfficeCore.FirstPartyDialogService.newObject(ctx); + var dialog = new OfficeFirstPartyDialog.Dialog(dialogService); + var eventResult = dialogService.onDialogMessage.add(function (args) { + OfficeExtension.Utility.log("dialogMessageHandler:" + JSON.stringify(args)); + var parsedMessage = JSON.parse(args.message); + var eventError = parsedMessage.errorCode + ? new OfficeExtension.Error(lookupErrorCodeAndMessage(parsedMessage.errorCode)) + : null; + var messageType = parsedMessage.type; + var origin = parsedMessage.origin; + var messageContent = parsedMessage.message; + switch (messageType) { + case 17: + if (eventError) { + reject(eventError); + } + else { + resolve(dialog); + } + break; + case 12: + if (options.onMessage) { + options.onMessage(messageContent, dialog, origin); + } + break; + case 10: + default: + if (parsedMessage.errorCode === 12006) { + if (eventResult) { + eventResult.remove(); + ctx.sync(); + } + if (options.onClose) { + options.onClose(); + } + } + else { + if (options.onRuntimeError) { + options.onRuntimeError(eventError, dialog); + reject(eventError); + } + } + } + return OfficeExtension.CoreUtility.Promise.resolve(); + }); + return ctx.sync() + .then(function () { + var dialogOptions = { + width: options.width ? parseInt(options.width) : 50, + height: options.height ? parseInt(options.height) : 50, + displayInIFrame: options.displayInIFrame, + dialogTitle: options.dialogTitle + }; + dialogService.displayDialog(url, dialogOptions); + return ctx.sync(); + })["catch"](function (e) { + reject(e); + }); + }); + function isInt(value) { + return (/^(\-|\+)?([0-9]+)%?$/.test(value)); + } + } + OfficeFirstPartyDialog.displayWebDialog = displayWebDialog; + var DialogEventType; + (function (DialogEventType) { + DialogEventType[DialogEventType["dialogMessageReceived"] = 0] = "dialogMessageReceived"; + DialogEventType[DialogEventType["dialogEventReceived"] = 1] = "dialogEventReceived"; + })(DialogEventType || (DialogEventType = {})); +})(OfficeFirstPartyDialog || (OfficeFirstPartyDialog = {})); +var OfficeCore; +(function (OfficeCore) { + OfficeCore.OfficeOnlineDomainList = [ + "*.dod.online.office365.us", + "*.gov.online.office365.us", + "*.officeapps-df.live.com", + "*.officeapps.live.com", + "*.online.office.de", + "*.partner.officewebapps.cn" + ]; + function isHostOriginTrusted() { + if (typeof window.external === 'undefined' || + typeof window.external.GetContext === 'undefined') { + var hostUrl = OSF.getClientEndPoint()._targetUrl; + var hostname_1 = getHostNameFromUrl(hostUrl); + if (hostUrl.indexOf("https:") != 0) { + return false; + } + OfficeCore.OfficeOnlineDomainList.forEach(function (domain) { + if (domain.indexOf("*.") == 0) { + domain = domain.substring(2); + } + if (hostname_1.indexOf(domain) == hostname_1.length - domain.length) { + return true; + } + }); + return false; + } + return true; + } + OfficeCore.isHostOriginTrusted = isHostOriginTrusted; + function getHostNameFromUrl(url) { + var hostName = ""; + hostName = url.split("/")[2]; + hostName = hostName.split(":")[0]; + hostName = hostName.split("?")[0]; + return hostName; + } +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var FirstPartyApis = (function () { + function FirstPartyApis(context) { + this.context = context; + } + Object.defineProperty(FirstPartyApis.prototype, "roamingSettings", { + get: function () { + if (!this.m_roamingSettings) { + this.m_roamingSettings = OfficeCore.AuthenticationService.newObject(this.context).roamingSettings; + } + return this.m_roamingSettings; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "tap", { + get: function () { + if (!this.m_tap) { + this.m_tap = OfficeCore.Tap.newObject(this.context); + } + return this.m_tap; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "skill", { + get: function () { + if (!this.m_skill) { + this.m_skill = OfficeCore.Skill.newObject(this.context); + } + return this.m_skill; + }, + enumerable: true, + configurable: true + }); + return FirstPartyApis; + }()); + OfficeCore.FirstPartyApis = FirstPartyApis; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + return _super.call(this, url) || this; + } + Object.defineProperty(RequestContext.prototype, "firstParty", { + get: function () { + if (!this.m_firstPartyApis) { + this.m_firstPartyApis = new FirstPartyApis(this); + } + return this.m_firstPartyApis; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry = OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "ribbon", { + get: function () { + if (!this.m_ribbon) { + this.m_ribbon = OfficeCore.DynamicRibbon.newObject(this); + } + return this.m_ribbon; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "bi", { + get: function () { + if (!this.m_biShim) { + this.m_biShim = OfficeCore.BiShim.newObject(this); + } + return this.m_biShim; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService = OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext = RequestContext; + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("OfficeCore.run", arguments, function (requestInfo) { return new OfficeCore.RequestContext(requestInfo); }); + } + OfficeCore.run = run; +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var license; + (function (license_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function isFeatureEnabled(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, isEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isEnabled = license.isFeatureEnabled(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isEnabled.value]; + } + }); + }); + } + license_1.isFeatureEnabled = isFeatureEnabled; + function getFeatureTier(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, tier; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + tier = license.getFeatureTier(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, tier.value]; + } + }); + }); + } + license_1.getFeatureTier = getFeatureTier; + function isFreemiumUpsellEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, license, isFreemiumUpsellEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isFreemiumUpsellEnabled = license.isFreemiumUpsellEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isFreemiumUpsellEnabled.value]; + } + }); + }); + } + license_1.isFreemiumUpsellEnabled = isFreemiumUpsellEnabled; + function launchUpsellExperience(experienceId) { + return __awaiter(this, void 0, void 0, function () { + var context, license; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + license.launchUpsellExperience(experienceId); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + license_1.launchUpsellExperience = launchUpsellExperience; + function onFeatureStateChanged(feature, listener) { + return __awaiter(this, void 0, void 0, function () { + var context, license, licenseFeature, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + licenseFeature = license.getLicenseFeature(feature); + licenseFeature.onStateChanged.add(listener); + removeListener = function () { + licenseFeature.onStateChanged.remove(listener); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + license_1.onFeatureStateChanged = onFeatureStateChanged; + function getMsaDeviceTicket(resource, policy, options) { + return __awaiter(this, void 0, void 0, function () { + var context, license, msaDeviceTicket; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + msaDeviceTicket = license.getMsaDeviceTicket(resource, policy, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, msaDeviceTicket.value]; + } + }); + }); + } + license_1.getMsaDeviceTicket = getMsaDeviceTicket; + })(license = Office.license || (Office.license = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeSkill = "Skill"; + var Skill = (function (_super) { + __extends(Skill, _super); + function Skill() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Skill.prototype, "_className", { + get: function () { + return "Skill"; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.executeAction = function (paneId, actionId, actionDescriptor) { + return _invokeMethod(this, "ExecuteAction", 1, [paneId, actionId, actionDescriptor], 4 | 1, 0); + }; + Skill.prototype.notifyPaneEvent = function (paneId, eventDescriptor) { + _invokeMethod(this, "NotifyPaneEvent", 1, [paneId, eventDescriptor], 4 | 1, 0); + }; + Skill.prototype.registerHostSkillEvent = function () { + _invokeMethod(this, "RegisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype.testFireEvent = function () { + _invokeMethod(this, "TestFireEvent", 0, [], 1, 0); + }; + Skill.prototype.unregisterHostSkillEvent = function () { + _invokeMethod(this, "UnregisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Skill.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Skill.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Skill, context, "Microsoft.SkillApi.Skill", false, 4); + }; + Object.defineProperty(Skill.prototype, "onHostSkillEvent", { + get: function () { + var _this = this; + if (!this.m_hostSkillEvent) { + this.m_hostSkillEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "HostSkillEvent", { + eventType: 65538, + registerFunc: function () { return _this.registerHostSkillEvent(); }, + unregisterFunc: function () { return _this.unregisterHostSkillEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.Skill_HostSkillEvent_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostSkillEvent; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Skill; + }(OfficeExtension.ClientObject)); + OfficeCore.Skill = Skill; + var _CC; + (function (_CC) { + function Skill_HostSkillEvent_EventArgsTransform(thisObj, args) { + var transformedArgs = { + type: args.type, + data: args.data + }; + return transformedArgs; + } + _CC.Skill_HostSkillEvent_EventArgsTransform = Skill_HostSkillEvent_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var SkillErrorCodes; + (function (SkillErrorCodes) { + SkillErrorCodes["generalException"] = "GeneralException"; + })(SkillErrorCodes = OfficeCore.SkillErrorCodes || (OfficeCore.SkillErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "TelemetryApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeTelemetryService = "TelemetryService"; + var TelemetryService = (function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendCustomerContent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _throwIfApiNotSupported("TelemetryService.sendCustomerContent", "Telemetry", "1.3", _hostName); + _invokeMethod(this, "SendCustomerContent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype.sendTelemetryEvent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _invokeMethod(this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + TelemetryService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.TelemetryService, context, "Microsoft.Telemetry.TelemetryService", false, 4); + }; + TelemetryService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService = TelemetryService; + var DataFieldType; + (function (DataFieldType) { + DataFieldType["unset"] = "Unset"; + DataFieldType["string"] = "String"; + DataFieldType["boolean"] = "Boolean"; + DataFieldType["int64"] = "Int64"; + DataFieldType["double"] = "Double"; + })(DataFieldType = OfficeCore.DataFieldType || (OfficeCore.DataFieldType = {})); + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes["generalException"] = "GeneralException"; + })(TelemetryErrorCodes = OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyAuth; +(function (OfficeFirstPartyAuth) { + var WebAuthReplyUrlsStorageKey = "officeWebAuthReplyUrls"; + var loaded = false; + OfficeFirstPartyAuth.authFlow = "authcode"; + OfficeFirstPartyAuth.autoPopup = false; + OfficeFirstPartyAuth.upnCheck = true; + OfficeFirstPartyAuth.msal = "https://alcdn.msauth.net/browser-1p/2.28.1/js/msal-browser-1p.min.js"; + OfficeFirstPartyAuth.debugging = false; + OfficeFirstPartyAuth.delay = 0; + OfficeFirstPartyAuth.delayMsal = 0; + function load(replyUrl, prefetch) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF.WebAuth && OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + var retrievedAuthContext = false; + try { + if (!Office || !Office.context || !Office.context.webAuth) { + reject({ + code: "GetAuthContextAsyncMissing", + message: "Office:[" + !Office + "],Office.context:[" + !Office.context + "],Office.context.webAuth:[" + !Office.context.webAuth + "]" + }); + return; + } + Office.context.webAuth.getAuthContextAsync(function (result) { + if (result.status === "succeeded") { + retrievedAuthContext = true; + var authContext = result.value; + if (!authContext || authContext.isAnonymous) { + reject({ + code: "CannotGetAuthContext", + message: authContext.Error + }); + return; + } + var isMsa = authContext.authorityType.toLowerCase() === 'msa'; + OSF.WebAuth.config = { + authFlow: OfficeFirstPartyAuth.authFlow, + authVersion: (OfficeFirstPartyAuth.authVersion) ? OfficeFirstPartyAuth.authVersion : null, + msal: OfficeFirstPartyAuth.msal, + delayWebAuth: OfficeFirstPartyAuth.delay, + delayMsal: OfficeFirstPartyAuth.delayMsal, + debugging: OfficeFirstPartyAuth.debugging, + authority: (OfficeFirstPartyAuth.authorityOverride) ? OfficeFirstPartyAuth.authorityOverride : authContext.authority, + idp: authContext.authorityType.toLowerCase(), + appIds: [isMsa ? (authContext.msaAppId) ? authContext.msaAppId : authContext.appId : authContext.appId], + redirectUri: (replyUrl) ? replyUrl : null, + upn: authContext.upn, + puid: authContext.userId, + prefetch: prefetch, + telemetryInstance: 'otel', + autoPopup: OfficeFirstPartyAuth.autoPopup, + enableUpnCheck: OfficeFirstPartyAuth.upnCheck, + enableConsoleLogging: OfficeFirstPartyAuth.debugging + }; + OSF.WebAuth.load().then(function (result) { + loaded = true; + logLoadEvent(result, loaded); + resolve(); + })["catch"](function (result) { + logLoadEvent(result, loaded); + reject({ + code: "PackageNotLoaded", + message: (result instanceof Event) ? result.type : result + }); + }); + if (OfficeFirstPartyAuth.authFlow === "implicit") { + var finalReplyUrl = (replyUrl) ? replyUrl : window.location.href.split("?")[0]; + var replyUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (replyUrls || replyUrls === "") { + replyUrls = finalReplyUrl; + } + else { + replyUrls += ", " + finalReplyUrl; + } + if (replyUrls) + sessionStorage.setItem(WebAuthReplyUrlsStorageKey, replyUrls); + } + } + else { + OSF.WebAuth.config = null; + reject({ + code: "CannotGetAuthContext", + message: result.status + }); + } + }); + } + catch (e) { + OSF.WebAuth.config = null; + OSF.WebAuth.load().then(function () { + resolve(); + })["catch"](function () { + reject({ + code: retrievedAuthContext ? "CannotGetAuthContext" : "FailedToLoad", + message: e + }); + }); + } + } + else { + resolve(); + } + }); + } + OfficeFirstPartyAuth.load = load; + function getAccessToken(options, behaviorOption) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + Office.context.webAuth.getAuthContextAsync(function (result) { + var supportsAuthToken = false; + if (result.status === "succeeded") { + var authContext = result.value; + if (authContext.supportsAuthToken) { + supportsAuthToken = true; + } + } + if (!supportsAuthToken) { + if (OSF.WebAuth && loaded) { + if (OSF.WebAuth.config.appIds[0]) { + OSF.WebAuth.getToken(options.resource, OSF.WebAuth.config.appIds[0], OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : null, (options && options.authChallenge) ? options.authChallenge : null).then(function (result) { + logAcquireEvent(result, true, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + resolve({ + accessToken: result.Token, + tokenIdenityType: (OSF.WebAuth.config.idp.toLowerCase() == "msa") + ? OfficeCore.IdentityType.microsoftAccount + : OfficeCore.IdentityType.organizationAccount + }); + })["catch"](function (result) { + logAcquireEvent(result, false, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + reject({ + code: result.ErrorCode, + message: (result instanceof Event) ? result.type : result.ErrorMessage + }); + }); + } + } + else { + logUnexpectedAcquire(loaded, OSF.WebAuth.loadAttempts); + } + } + else { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result_1 = auth.getAccessToken(options, null); + context.sync().then(function () { + resolve(result_1.value); + }); + } + }); + } + else { + var context_1 = new OfficeCore.RequestContext(); + var auth_1 = OfficeCore.AuthenticationService.newObject(context_1); + var handler_1 = auth_1.onTokenReceived.add(function (arg) { + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + handler_1.remove(); + context_1.sync()["catch"](function () { + }); + if (arg.code == 0) { + resolve(arg.tokenValue); + } + else { + if (OfficeExtension.CoreUtility.isNullOrUndefined(arg.errorInfo)) { + reject({ code: arg.code }); + } + else { + try { + reject(JSON.parse(arg.errorInfo)); + } + catch (e) { + reject({ code: arg.code, message: arg.errorInfo }); + } + } + } + } + return null; + }); + context_1.sync() + .then(function () { + var apiResult = auth_1.getAccessToken(options, auth_1._targetId); + return context_1.sync() + .then(function () { + if (OfficeExtension.CoreUtility.isNullOrUndefined(apiResult.value)) { + return null; + } + var tokenValue = apiResult.value.accessToken; + if (!OfficeExtension.CoreUtility.isNullOrUndefined(tokenValue)) { + resolve(apiResult.value); + } + }); + })["catch"](function (e) { + reject(e); + }); + } + }); + } + OfficeFirstPartyAuth.getAccessToken = getAccessToken; + function getPrimaryIdentityInfo() { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result = auth.getPrimaryIdentityInfo(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getPrimaryIdentityInfo = getPrimaryIdentityInfo; + function getIdentities() { + var context = new OfficeCore.RequestContext(); + var auth_service = OfficeCore.AuthenticationService.newObject(context); + var result = auth_service.getIdentities(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getIdentities = getIdentities; + function logLoadEvent(result, succeeded) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : "") + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'loadedApplicationCount': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + case 'timeToLoad': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.Load", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logAcquireEvent(result, succeeded, popup) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Popup', (typeof popup === "boolean") ? popup : false), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : result.ErrorCode), + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'timeToGetToken': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.GetAccessToken", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logUnexpectedAcquire(loadResult, loadAttempts) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeBooleanDataField('Loaded', loadResult), + oteljs.makeInt64DataField('LoadAttempts', (typeof loadAttempts === "number") ? loadAttempts : 0) + ]; + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.UnexpectedAcquire", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function loadWebAuthForReplyPage() { + try { + if (typeof (window) === "undefined" || !window.sessionStorage) { + return; + } + var webAuthRedirectUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (webAuthRedirectUrls !== null && webAuthRedirectUrls.indexOf(window.location.origin + window.location.pathname) !== -1) { + load(); + } + } + catch (ex) { + console.error(ex); + } + } + if (typeof (window) !== "undefined" && window.OSF) { + loadWebAuthForReplyPage(); + } +})(OfficeFirstPartyAuth || (OfficeFirstPartyAuth = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var IdentityType; + (function (IdentityType) { + IdentityType["organizationAccount"] = "OrganizationAccount"; + IdentityType["microsoftAccount"] = "MicrosoftAccount"; + IdentityType["unsupported"] = "Unsupported"; + })(IdentityType = OfficeCore.IdentityType || (OfficeCore.IdentityType = {})); + var _typeAuthenticationService = "AuthenticationService"; + var AuthenticationService = (function (_super) { + __extends(AuthenticationService, _super); + function AuthenticationService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AuthenticationService.prototype, "_className", { + get: function () { + return "AuthenticationService"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "_navigationPropertyNames", { + get: function () { + return ["roamingSettings"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "roamingSettings", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.RoamingSettingCollection, this, "RoamingSettings", false, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.getAccessToken = function (tokenParameters, targetId) { + return _invokeMethod(this, "GetAccessToken", 1, [tokenParameters, targetId], 4 | 1, 0); + }; + AuthenticationService.prototype.getIdentities = function () { + _throwIfApiNotSupported("AuthenticationService.getIdentities", "FirstPartyAuthentication", "1.3", _hostName); + return _invokeMethod(this, "GetIdentities", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.getPrimaryIdentityInfo = function () { + _throwIfApiNotSupported("AuthenticationService.getPrimaryIdentityInfo", "FirstPartyAuthentication", "1.2", _hostName); + return _invokeMethod(this, "GetPrimaryIdentityInfo", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.registerIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.registerIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "RegisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype.unregisterIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.unregisterIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "UnregisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["roamingSettings", "RoamingSettings"]); + }; + AuthenticationService.prototype.load = function (options) { + return _load(this, options); + }; + AuthenticationService.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + AuthenticationService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AuthenticationService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AuthenticationService, context, "Microsoft.Authentication.AuthenticationService", false, 4); + }; + Object.defineProperty(AuthenticationService.prototype, "onIdentityChanged", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onIdentityChanged", "FirstPartyAuthentication", "1.5", _hostName); + if (!this.m_identityChanged) { + this.m_identityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityChanged", { + eventType: 65545, + registerFunc: function () { return _this.registerIdentityChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterIdentityChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + email: value.email, + environment: value.environment, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "onTokenReceived", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onTokenReceived", "FirstPartyAuthentication", "1.2", _hostName); + if (!this.m_tokenReceived) { + this.m_tokenReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "TokenReceived", { + eventType: 3001, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return _this._targetId; }, + eventArgsTransformFunc: function (value) { + var event = _CC.AuthenticationService_TokenReceived_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_tokenReceived; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AuthenticationService; + }(OfficeExtension.ClientObject)); + OfficeCore.AuthenticationService = AuthenticationService; + var AuthenticationServiceCustom = (function () { + function AuthenticationServiceCustom() { + } + Object.defineProperty(AuthenticationServiceCustom.prototype, "_targetId", { + get: function () { + if (this.m_targetId == undefined) { + if (typeof (OSF) !== 'undefined' && OSF.OUtil) { + this.m_targetId = OSF.OUtil.Guid.generateNewGuid(); + } + else { + this.m_targetId = "" + this.context._nextId(); + } + } + return this.m_targetId; + }, + enumerable: true, + configurable: true + }); + return AuthenticationServiceCustom; + }()); + OfficeCore.AuthenticationServiceCustom = AuthenticationServiceCustom; + OfficeExtension.Utility.applyMixin(AuthenticationService, AuthenticationServiceCustom); + var _CC; + (function (_CC) { + function AuthenticationService_TokenReceived_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + tokenValue: value.tokenValue, + code: value.code, + errorInfo: value.errorInfo + }; + return newArgs; + } + _CC.AuthenticationService_TokenReceived_EventArgsTransform = AuthenticationService_TokenReceived_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeRoamingSetting = "RoamingSetting"; + var RoamingSetting = (function (_super) { + __extends(RoamingSetting, _super); + function RoamingSetting() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSetting.prototype, "_className", { + get: function () { + return "RoamingSetting"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRoamingSetting, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeRoamingSetting, this._isNull); + return this._V; + }, + set: function (value) { + this._V = value; + _invokeSetProperty(this, "Value", value, 0); + }, + enumerable: true, + configurable: true + }); + RoamingSetting.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["value"], [], []); + }; + RoamingSetting.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RoamingSetting.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + RoamingSetting.prototype.load = function (options) { + return _load(this, options); + }; + RoamingSetting.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RoamingSetting.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RoamingSetting.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSetting.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I, + "value": this._V + }, {}); + }; + RoamingSetting.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RoamingSetting.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RoamingSetting; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSetting = RoamingSetting; + var _typeRoamingSettingCollection = "RoamingSettingCollection"; + var RoamingSettingCollection = (function (_super) { + __extends(RoamingSettingCollection, _super); + function RoamingSettingCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSettingCollection.prototype, "_className", { + get: function () { + return "RoamingSettingCollection"; + }, + enumerable: true, + configurable: true + }); + RoamingSettingCollection.prototype.getItem = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItem", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype.getItemOrNullObject = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItemOrNullObject", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RoamingSettingCollection.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSettingCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RoamingSettingCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSettingCollection = RoamingSettingCollection; + var _typeBeforeDocumentCloseNotification = "BeforeDocumentCloseNotification"; + var BeforeDocumentCloseNotification = (function (_super) { + __extends(BeforeDocumentCloseNotification, _super); + function BeforeDocumentCloseNotification() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "_className", { + get: function () { + return "BeforeDocumentCloseNotification"; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.disable = function () { + _invokeMethod(this, "Disable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype.enable = function () { + _invokeMethod(this, "Enable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BeforeDocumentCloseNotification.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BeforeDocumentCloseNotification.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BeforeDocumentCloseNotification, context, "Microsoft.BeforeDocumentCloseNotification.BeforeDocumentCloseNotification", false, 4); + }; + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "onBeforeCloseNotificationCancelled", { + get: function () { + if (!this.m_beforeCloseNotificationCancelled) { + this.m_beforeCloseNotificationCancelled = new OfficeExtension.GenericEventHandlers(this.context, this, "BeforeCloseNotificationCancelled", { + eventType: 65540, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_beforeCloseNotificationCancelled; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BeforeDocumentCloseNotification; + }(OfficeExtension.ClientObject)); + OfficeCore.BeforeDocumentCloseNotification = BeforeDocumentCloseNotification; + var ServiceProvider; + (function (ServiceProvider) { + ServiceProvider["ariaBrowserPipeUrl"] = "AriaBrowserPipeUrl"; + ServiceProvider["ariaUploadUrl"] = "AriaUploadUrl"; + ServiceProvider["ariaVNextUploadUrl"] = "AriaVNextUploadUrl"; + ServiceProvider["lokiAutoDiscoverUrl"] = "LokiAutoDiscoverUrl"; + })(ServiceProvider = OfficeCore.ServiceProvider || (OfficeCore.ServiceProvider = {})); + var _typeServiceUrlProvider = "ServiceUrlProvider"; + var ServiceUrlProvider = (function (_super) { + __extends(ServiceUrlProvider, _super); + function ServiceUrlProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceUrlProvider.prototype, "_className", { + get: function () { + return "ServiceUrlProvider"; + }, + enumerable: true, + configurable: true + }); + ServiceUrlProvider.prototype.getServiceUrl = function (emailAddress, provider) { + return _invokeMethod(this, "GetServiceUrl", 1, [emailAddress, provider], 4, 0); + }; + ServiceUrlProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceUrlProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceUrlProvider.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceUrlProvider, context, "Microsoft.DesktopCompliance.ServiceUrlProvider", false, 4); + }; + ServiceUrlProvider.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceUrlProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceUrlProvider = ServiceUrlProvider; + var _typeLinkedIn = "LinkedIn"; + var LinkedIn = (function (_super) { + __extends(LinkedIn, _super); + function LinkedIn() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LinkedIn.prototype, "_className", { + get: function () { + return "LinkedIn"; + }, + enumerable: true, + configurable: true + }); + LinkedIn.prototype.isEnabledForOffice = function () { + return _invokeMethod(this, "IsEnabledForOffice", 1, [], 4, 0); + }; + LinkedIn.prototype.recordLinkedInSettingsCompliance = function (featureName, isEnabled) { + _invokeMethod(this, "RecordLinkedInSettingsCompliance", 0, [featureName, isEnabled], 0, 0); + }; + LinkedIn.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LinkedIn.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LinkedIn.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LinkedIn, context, "Microsoft.DesktopCompliance.LinkedIn", false, 4); + }; + LinkedIn.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LinkedIn; + }(OfficeExtension.ClientObject)); + OfficeCore.LinkedIn = LinkedIn; + var _typeNetworkUsage = "NetworkUsage"; + var NetworkUsage = (function (_super) { + __extends(NetworkUsage, _super); + function NetworkUsage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(NetworkUsage.prototype, "_className", { + get: function () { + return "NetworkUsage"; + }, + enumerable: true, + configurable: true + }); + NetworkUsage.prototype.isInDisconnectedMode = function () { + return _invokeMethod(this, "IsInDisconnectedMode", 1, [], 4, 0); + }; + NetworkUsage.prototype.isInOnlineMode = function () { + return _invokeMethod(this, "IsInOnlineMode", 1, [], 4, 0); + }; + NetworkUsage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + NetworkUsage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + NetworkUsage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.NetworkUsage, context, "Microsoft.DesktopCompliance.NetworkUsage", false, 4); + }; + NetworkUsage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return NetworkUsage; + }(OfficeExtension.ClientObject)); + OfficeCore.NetworkUsage = NetworkUsage; + var _typeDynamicRibbon = "DynamicRibbon"; + var DynamicRibbon = (function (_super) { + __extends(DynamicRibbon, _super); + function DynamicRibbon() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DynamicRibbon.prototype, "_className", { + get: function () { + return "DynamicRibbon"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "_navigationPropertyNames", { + get: function () { + return ["buttons"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "buttons", { + get: function () { + if (!this._B) { + this._B = _createPropertyObject(OfficeCore.RibbonButtonCollection, this, "Buttons", true, 4); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + DynamicRibbon.prototype.executeRequestCreate = function (jsonCreate) { + _throwIfApiNotSupported("DynamicRibbon.executeRequestCreate", "DynamicRibbon", "1.2", _hostName); + _invokeMethod(this, "ExecuteRequestCreate", 1, [jsonCreate], 4, 0); + }; + DynamicRibbon.prototype.executeRequestUpdate = function (jsonUpdate) { + _invokeMethod(this, "ExecuteRequestUpdate", 1, [jsonUpdate], 4, 0); + }; + DynamicRibbon.prototype.getButton = function (id) { + return _createMethodObject(OfficeCore.RibbonButton, this, "GetButton", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype.getTab = function (id) { + return _createMethodObject(OfficeCore.RibbonTab, this, "GetTab", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["buttons", "Buttons"]); + }; + DynamicRibbon.prototype.load = function (options) { + return _load(this, options); + }; + DynamicRibbon.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + DynamicRibbon.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DynamicRibbon.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DynamicRibbon, context, "Microsoft.DynamicRibbon.DynamicRibbon", false, 4); + }; + DynamicRibbon.prototype.toJSON = function () { + return _toJson(this, {}, { + "buttons": this._B + }); + }; + return DynamicRibbon; + }(OfficeExtension.ClientObject)); + OfficeCore.DynamicRibbon = DynamicRibbon; + var _typeRibbonTab = "RibbonTab"; + var RibbonTab = (function (_super) { + __extends(RibbonTab, _super); + function RibbonTab() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonTab.prototype, "_className", { + get: function () { + return "RibbonTab"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonTab, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + RibbonTab.prototype.setVisibility = function (visibility) { + _invokeMethod(this, "SetVisibility", 0, [visibility], 0, 0); + }; + RibbonTab.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + RibbonTab.prototype.load = function (options) { + return _load(this, options); + }; + RibbonTab.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonTab.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonTab.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonTab.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + RibbonTab.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonTab.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonTab; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonTab = RibbonTab; + var _typeRibbonButton = "RibbonButton"; + var RibbonButton = (function (_super) { + __extends(RibbonButton, _super); + function RibbonButton() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButton.prototype, "_className", { + get: function () { + return "RibbonButton"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "enabled", "label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Enabled", "Label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "enabled", { + get: function () { + _throwIfNotLoaded("enabled", this._E, _typeRibbonButton, this._isNull); + return this._E; + }, + set: function (value) { + this._E = value; + _invokeSetProperty(this, "Enabled", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonButton, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "label", { + get: function () { + _throwIfNotLoaded("label", this._L, _typeRibbonButton, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + RibbonButton.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["enabled"], [], []); + }; + RibbonButton.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RibbonButton.prototype.setEnabled = function (enabled) { + _invokeMethod(this, "SetEnabled", 0, [enabled], 0, 0); + }; + RibbonButton.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Enabled"])) { + this._E = obj["Enabled"]; + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Label"])) { + this._L = obj["Label"]; + } + }; + RibbonButton.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButton.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButton.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonButton.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonButton.prototype.toJSON = function () { + return _toJson(this, { + "enabled": this._E, + "id": this._I, + "label": this._L + }, {}); + }; + RibbonButton.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonButton.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonButton; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButton = RibbonButton; + var _typeRibbonButtonCollection = "RibbonButtonCollection"; + var RibbonButtonCollection = (function (_super) { + __extends(RibbonButtonCollection, _super); + function RibbonButtonCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButtonCollection.prototype, "_className", { + get: function () { + return "RibbonButtonCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeRibbonButtonCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + RibbonButtonCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + RibbonButtonCollection.prototype.getItem = function (key) { + return _createIndexerObject(OfficeCore.RibbonButton, this, [key]); + }; + RibbonButtonCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.RibbonButton, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + RibbonButtonCollection.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButtonCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButtonCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }); + }; + RibbonButtonCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + RibbonButtonCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return RibbonButtonCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButtonCollection = RibbonButtonCollection; + var _typeFirstPartyDialogService = "FirstPartyDialogService"; + var FirstPartyDialogService = (function (_super) { + __extends(FirstPartyDialogService, _super); + function FirstPartyDialogService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FirstPartyDialogService.prototype, "_className", { + get: function () { + return "FirstPartyDialogService"; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4 | 1, 0); + }; + FirstPartyDialogService.prototype.displayDialog = function (url, options) { + _invokeMethod(this, "DisplayDialog", 1, [url, options], 4 | 1, 0); + }; + FirstPartyDialogService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FirstPartyDialogService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FirstPartyDialogService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FirstPartyDialogService, context, "Microsoft.FirstPartyDialog.FirstPartyDialogService", false, 4); + }; + Object.defineProperty(FirstPartyDialogService.prototype, "onDialogMessage", { + get: function () { + var _this = this; + if (!this.m_dialogMessage) { + this.m_dialogMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "DialogMessage", { + eventType: 65536, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_dialogMessage; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FirstPartyDialogService; + }(OfficeExtension.ClientObject)); + OfficeCore.FirstPartyDialogService = FirstPartyDialogService; + (function (_CC) { + function FirstPartyDialogService_DialogMessage_EventArgsTransform(thisObj, args) { + return { + message: args.message + }; + } + _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform = FirstPartyDialogService_DialogMessage_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var TimeStringFormat; + (function (TimeStringFormat) { + TimeStringFormat["shortTime"] = "ShortTime"; + TimeStringFormat["longTime"] = "LongTime"; + TimeStringFormat["shortDate"] = "ShortDate"; + TimeStringFormat["longDate"] = "LongDate"; + })(TimeStringFormat = OfficeCore.TimeStringFormat || (OfficeCore.TimeStringFormat = {})); + var _typeLocaleApi = "LocaleApi"; + var LocaleApi = (function (_super) { + __extends(LocaleApi, _super); + function LocaleApi() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LocaleApi.prototype, "_className", { + get: function () { + return "LocaleApi"; + }, + enumerable: true, + configurable: true + }); + LocaleApi.prototype.formatDateTimeString = function (localeName, value, format) { + return _invokeMethod(this, "FormatDateTimeString", 1, [localeName, value, format], 4, 0); + }; + LocaleApi.prototype.getLocaleDateTimeFormattingInfo = function (localeName) { + return _invokeMethod(this, "GetLocaleDateTimeFormattingInfo", 1, [localeName], 4, 0); + }; + LocaleApi.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LocaleApi.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LocaleApi.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LocaleApi, context, "Microsoft.LocaleApi.LocaleApi", false, 4); + }; + LocaleApi.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LocaleApi; + }(OfficeExtension.ClientObject)); + OfficeCore.LocaleApi = LocaleApi; + var _typeComment = "Comment"; + var Comment = (function (_super) { + __extends(Comment, _super); + function Comment() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Comment.prototype, "_className", { + get: function () { + return "Comment"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "text", "created", "level", "resolved", "author", "mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Text", "Created", "Level", "Resolved", "Author", "Mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false, false, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_navigationPropertyNames", { + get: function () { + return ["parent", "parentOrNullObject", "replies"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parent", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.Comment, this, "Parent", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parentOrNullObject", { + get: function () { + if (!this._Pa) { + this._Pa = _createPropertyObject(OfficeCore.Comment, this, "ParentOrNullObject", false, 4); + } + return this._Pa; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "replies", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.CommentCollection, this, "Replies", true, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "author", { + get: function () { + _throwIfNotLoaded("author", this._A, _typeComment, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "created", { + get: function () { + _throwIfNotLoaded("created", this._C, _typeComment, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeComment, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "level", { + get: function () { + _throwIfNotLoaded("level", this._L, _typeComment, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "mentions", { + get: function () { + _throwIfNotLoaded("mentions", this._M, _typeComment, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "resolved", { + get: function () { + _throwIfNotLoaded("resolved", this._Re, _typeComment, this._isNull); + return this._Re; + }, + set: function (value) { + this._Re = value; + _invokeSetProperty(this, "Resolved", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeComment, this._isNull); + return this._T; + }, + set: function (value) { + this._T = value; + _invokeSetProperty(this, "Text", value, 0); + }, + enumerable: true, + configurable: true + }); + Comment.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["text", "resolved"], [], [ + "parent", + "parentOrNullObject", + "replies" + ]); + }; + Comment.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Comment.prototype["delete"] = function () { + _invokeMethod(this, "Delete", 0, [], 0, 0); + }; + Comment.prototype.getParentOrSelf = function () { + return _createMethodObject(OfficeCore.Comment, this, "GetParentOrSelf", 1, [], false, false, null, 4); + }; + Comment.prototype.getRichText = function (format) { + return _invokeMethod(this, "GetRichText", 1, [format], 4, 0); + }; + Comment.prototype.reply = function (text, format) { + return _createMethodObject(OfficeCore.Comment, this, "Reply", 0, [text, format], false, false, null, 0); + }; + Comment.prototype.setRichText = function (text, format) { + return _invokeMethod(this, "SetRichText", 0, [text, format], 0, 0); + }; + Comment.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Author"])) { + this._A = obj["Author"]; + } + if (!_isUndefined(obj["Created"])) { + this._C = _adjustToDateTime(obj["Created"]); + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Level"])) { + this._L = obj["Level"]; + } + if (!_isUndefined(obj["Mentions"])) { + this._M = obj["Mentions"]; + } + if (!_isUndefined(obj["Resolved"])) { + this._Re = obj["Resolved"]; + } + if (!_isUndefined(obj["Text"])) { + this._T = obj["Text"]; + } + _handleNavigationPropertyResults(this, obj, ["parent", "Parent", "parentOrNullObject", "ParentOrNullObject", "replies", "Replies"]); + }; + Comment.prototype.load = function (options) { + return _load(this, options); + }; + Comment.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Comment.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + Comment.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Created"])) { + obj["created"] = _adjustToDateTime(obj["created"]); + } + _processRetrieveResult(this, value, result); + }; + Comment.prototype.toJSON = function () { + return _toJson(this, { + "author": this._A, + "created": this._C, + "id": this._I, + "level": this._L, + "mentions": this._M, + "resolved": this._Re, + "text": this._T + }, { + "replies": this._R + }); + }; + Comment.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Comment.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Comment; + }(OfficeExtension.ClientObject)); + OfficeCore.Comment = Comment; + var _typeCommentCollection = "CommentCollection"; + var CommentCollection = (function (_super) { + __extends(CommentCollection, _super); + function CommentCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CommentCollection.prototype, "_className", { + get: function () { + return "CommentCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeCommentCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + CommentCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + CommentCollection.prototype.getItem = function (id) { + return _createIndexerObject(OfficeCore.Comment, this, [id]); + }; + CommentCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Comment, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + CommentCollection.prototype.load = function (options) { + return _load(this, options); + }; + CommentCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + CommentCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }); + }; + CommentCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + CommentCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return CommentCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.CommentCollection = CommentCollection; + var _typeExtensionLifeCycle = "ExtensionLifeCycle"; + var ExtensionLifeCycle = (function (_super) { + __extends(ExtensionLifeCycle, _super); + function ExtensionLifeCycle() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ExtensionLifeCycle.prototype, "_className", { + get: function () { + return "ExtensionLifeCycle"; + }, + enumerable: true, + configurable: true + }); + ExtensionLifeCycle.prototype.launchExtensionComponent = function (componentId, componentType, launchProperties) { + _invokeMethod(this, "LaunchExtensionComponent", 1, [componentId, componentType, launchProperties], 4 | 1, 0); + }; + ExtensionLifeCycle.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ExtensionLifeCycle.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ExtensionLifeCycle.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ExtensionLifeCycle, context, "Microsoft.OfficeSharedApi.ExtensionLifeCycle", false, 4); + }; + ExtensionLifeCycle.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ExtensionLifeCycle; + }(OfficeExtension.ClientObject)); + OfficeCore.ExtensionLifeCycle = ExtensionLifeCycle; + var CommentTextFormat; + (function (CommentTextFormat) { + CommentTextFormat["plain"] = "Plain"; + CommentTextFormat["markdown"] = "Markdown"; + CommentTextFormat["delta"] = "Delta"; + })(CommentTextFormat = OfficeCore.CommentTextFormat || (OfficeCore.CommentTextFormat = {})); + var PersonaCardPerfPoint; + (function (PersonaCardPerfPoint) { + PersonaCardPerfPoint["placeHolderRendered"] = "PlaceHolderRendered"; + PersonaCardPerfPoint["initialCardRendered"] = "InitialCardRendered"; + })(PersonaCardPerfPoint = OfficeCore.PersonaCardPerfPoint || (OfficeCore.PersonaCardPerfPoint = {})); + var UnifiedCommunicationAvailability; + (function (UnifiedCommunicationAvailability) { + UnifiedCommunicationAvailability["notSet"] = "NotSet"; + UnifiedCommunicationAvailability["free"] = "Free"; + UnifiedCommunicationAvailability["idle"] = "Idle"; + UnifiedCommunicationAvailability["busy"] = "Busy"; + UnifiedCommunicationAvailability["idleBusy"] = "IdleBusy"; + UnifiedCommunicationAvailability["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationAvailability["unalertable"] = "Unalertable"; + UnifiedCommunicationAvailability["unavailable"] = "Unavailable"; + })(UnifiedCommunicationAvailability = OfficeCore.UnifiedCommunicationAvailability || (OfficeCore.UnifiedCommunicationAvailability = {})); + var UnifiedCommunicationStatus; + (function (UnifiedCommunicationStatus) { + UnifiedCommunicationStatus["online"] = "Online"; + UnifiedCommunicationStatus["notOnline"] = "NotOnline"; + UnifiedCommunicationStatus["away"] = "Away"; + UnifiedCommunicationStatus["busy"] = "Busy"; + UnifiedCommunicationStatus["beRightBack"] = "BeRightBack"; + UnifiedCommunicationStatus["onThePhone"] = "OnThePhone"; + UnifiedCommunicationStatus["outToLunch"] = "OutToLunch"; + UnifiedCommunicationStatus["inAMeeting"] = "InAMeeting"; + UnifiedCommunicationStatus["outOfOffice"] = "OutOfOffice"; + UnifiedCommunicationStatus["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationStatus["inAConference"] = "InAConference"; + UnifiedCommunicationStatus["getting"] = "Getting"; + UnifiedCommunicationStatus["notABuddy"] = "NotABuddy"; + UnifiedCommunicationStatus["disconnected"] = "Disconnected"; + UnifiedCommunicationStatus["notInstalled"] = "NotInstalled"; + UnifiedCommunicationStatus["urgentInterruptionsOnly"] = "UrgentInterruptionsOnly"; + UnifiedCommunicationStatus["mayBeAvailable"] = "MayBeAvailable"; + UnifiedCommunicationStatus["idle"] = "Idle"; + UnifiedCommunicationStatus["inPresentation"] = "InPresentation"; + })(UnifiedCommunicationStatus = OfficeCore.UnifiedCommunicationStatus || (OfficeCore.UnifiedCommunicationStatus = {})); + var UnifiedCommunicationPresence; + (function (UnifiedCommunicationPresence) { + UnifiedCommunicationPresence["free"] = "Free"; + UnifiedCommunicationPresence["busy"] = "Busy"; + UnifiedCommunicationPresence["idle"] = "Idle"; + UnifiedCommunicationPresence["doNotDistrub"] = "DoNotDistrub"; + UnifiedCommunicationPresence["blocked"] = "Blocked"; + UnifiedCommunicationPresence["notSet"] = "NotSet"; + UnifiedCommunicationPresence["outOfOffice"] = "OutOfOffice"; + })(UnifiedCommunicationPresence = OfficeCore.UnifiedCommunicationPresence || (OfficeCore.UnifiedCommunicationPresence = {})); + var FreeBusyCalendarState; + (function (FreeBusyCalendarState) { + FreeBusyCalendarState["unknown"] = "Unknown"; + FreeBusyCalendarState["free"] = "Free"; + FreeBusyCalendarState["busy"] = "Busy"; + FreeBusyCalendarState["elsewhere"] = "Elsewhere"; + FreeBusyCalendarState["tentative"] = "Tentative"; + FreeBusyCalendarState["outOfOffice"] = "OutOfOffice"; + })(FreeBusyCalendarState = OfficeCore.FreeBusyCalendarState || (OfficeCore.FreeBusyCalendarState = {})); + var PersonaType; + (function (PersonaType) { + PersonaType["unknown"] = "Unknown"; + PersonaType["enterprise"] = "Enterprise"; + PersonaType["contact"] = "Contact"; + PersonaType["bot"] = "Bot"; + PersonaType["phoneOnly"] = "PhoneOnly"; + PersonaType["oneOff"] = "OneOff"; + PersonaType["distributionList"] = "DistributionList"; + PersonaType["personalDistributionList"] = "PersonalDistributionList"; + PersonaType["anonymous"] = "Anonymous"; + PersonaType["unifiedGroup"] = "UnifiedGroup"; + })(PersonaType = OfficeCore.PersonaType || (OfficeCore.PersonaType = {})); + var PhoneType; + (function (PhoneType) { + PhoneType["workPhone"] = "WorkPhone"; + PhoneType["homePhone"] = "HomePhone"; + PhoneType["mobilePhone"] = "MobilePhone"; + PhoneType["businessFax"] = "BusinessFax"; + PhoneType["otherPhone"] = "OtherPhone"; + })(PhoneType = OfficeCore.PhoneType || (OfficeCore.PhoneType = {})); + var AddressType; + (function (AddressType) { + AddressType["workAddress"] = "WorkAddress"; + AddressType["homeAddress"] = "HomeAddress"; + AddressType["otherAddress"] = "OtherAddress"; + })(AddressType = OfficeCore.AddressType || (OfficeCore.AddressType = {})); + var MemberType; + (function (MemberType) { + MemberType["unknown"] = "Unknown"; + MemberType["individual"] = "Individual"; + MemberType["group"] = "Group"; + })(MemberType = OfficeCore.MemberType || (OfficeCore.MemberType = {})); + var _typeMemberInfoList = "MemberInfoList"; + var MemberInfoList = (function (_super) { + __extends(MemberInfoList, _super); + function MemberInfoList() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MemberInfoList.prototype, "_className", { + get: function () { + return "MemberInfoList"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typeMemberInfoList, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typeMemberInfoList, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + MemberInfoList.prototype.getPersonaForMember = function (memberCookie) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForMember", 1, [memberCookie], false, false, null, 4); + }; + MemberInfoList.prototype.items = function () { + return _invokeMethod(this, "Items", 1, [], 4, 0); + }; + MemberInfoList.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + }; + MemberInfoList.prototype.load = function (options) { + return _load(this, options); + }; + MemberInfoList.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MemberInfoList.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MemberInfoList.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + MemberInfoList.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MemberInfoList.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MemberInfoList; + }(OfficeExtension.ClientObject)); + OfficeCore.MemberInfoList = MemberInfoList; + var PersonaDataUpdated; + (function (PersonaDataUpdated) { + PersonaDataUpdated["hostId"] = "HostId"; + PersonaDataUpdated["type"] = "Type"; + PersonaDataUpdated["photo"] = "Photo"; + PersonaDataUpdated["personaInfo"] = "PersonaInfo"; + PersonaDataUpdated["unifiedCommunicationInfo"] = "UnifiedCommunicationInfo"; + PersonaDataUpdated["organization"] = "Organization"; + PersonaDataUpdated["unifiedGroupInfo"] = "UnifiedGroupInfo"; + PersonaDataUpdated["members"] = "Members"; + PersonaDataUpdated["membership"] = "Membership"; + PersonaDataUpdated["capabilities"] = "Capabilities"; + PersonaDataUpdated["customizations"] = "Customizations"; + PersonaDataUpdated["viewableSources"] = "ViewableSources"; + PersonaDataUpdated["placeholder"] = "Placeholder"; + })(PersonaDataUpdated = OfficeCore.PersonaDataUpdated || (OfficeCore.PersonaDataUpdated = {})); + var _typePersonaActions = "PersonaActions"; + var PersonaActions = (function (_super) { + __extends(PersonaActions, _super); + function PersonaActions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaActions.prototype, "_className", { + get: function () { + return "PersonaActions"; + }, + enumerable: true, + configurable: true + }); + PersonaActions.prototype.addContact = function () { + _invokeMethod(this, "AddContact", 0, [], 0, 0); + }; + PersonaActions.prototype.callPhoneNumber = function (contactNumber) { + _invokeMethod(this, "CallPhoneNumber", 0, [contactNumber], 0, 0); + }; + PersonaActions.prototype.composeEmail = function (emailAddress) { + _invokeMethod(this, "ComposeEmail", 0, [emailAddress], 0, 0); + }; + PersonaActions.prototype.composeInstantMessage = function (sipAddress) { + _invokeMethod(this, "ComposeInstantMessage", 0, [sipAddress], 0, 0); + }; + PersonaActions.prototype.editContact = function () { + _invokeMethod(this, "EditContact", 0, [], 0, 0); + }; + PersonaActions.prototype.editContactByIdentifier = function (identifier) { + _invokeMethod(this, "EditContactByIdentifier", 0, [identifier], 0, 0); + }; + PersonaActions.prototype.editUnifiedGroup = function () { + _invokeMethod(this, "EditUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.getChangePhotoUrlAndOpenInBrowser = function () { + _invokeMethod(this, "GetChangePhotoUrlAndOpenInBrowser", 0, [], 0, 0); + }; + PersonaActions.prototype.hideHoverCardForPersona = function () { + _invokeMethod(this, "HideHoverCardForPersona", 0, [], 0, 0); + }; + PersonaActions.prototype.joinUnifiedGroup = function () { + _invokeMethod(this, "JoinUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.leaveUnifiedGroup = function () { + _invokeMethod(this, "LeaveUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.openGroupCalendar = function () { + _invokeMethod(this, "OpenGroupCalendar", 0, [], 0, 0); + }; + PersonaActions.prototype.openLinkContactUx = function () { + _invokeMethod(this, "OpenLinkContactUx", 0, [], 0, 0); + }; + PersonaActions.prototype.openOutlookProperties = function () { + _invokeMethod(this, "OpenOutlookProperties", 0, [], 0, 0); + }; + PersonaActions.prototype.pinPersonaToQuickContacts = function () { + _invokeMethod(this, "PinPersonaToQuickContacts", 0, [], 0, 0); + }; + PersonaActions.prototype.scheduleMeeting = function () { + _invokeMethod(this, "ScheduleMeeting", 0, [], 0, 0); + }; + PersonaActions.prototype.showContactCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContactCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showContextMenu = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContextMenu", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showExpandedCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowExpandedCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showHoverCardForPersona = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowHoverCardForPersona", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.startAudioCall = function () { + _invokeMethod(this, "StartAudioCall", 0, [], 0, 0); + }; + PersonaActions.prototype.startVideoCall = function () { + _invokeMethod(this, "StartVideoCall", 0, [], 0, 0); + }; + PersonaActions.prototype.subscribeToGroup = function () { + _invokeMethod(this, "SubscribeToGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.toggleTagForAlerts = function () { + _invokeMethod(this, "ToggleTagForAlerts", 0, [], 0, 0); + }; + PersonaActions.prototype.unsubscribeFromGroup = function () { + _invokeMethod(this, "UnsubscribeFromGroup", 0, [], 0, 0); + }; + PersonaActions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaActions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaActions.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaActions; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaActions = PersonaActions; + var _typePersonaInfoSource = "PersonaInfoSource"; + var PersonaInfoSource = (function (_super) { + __extends(PersonaInfoSource, _super); + function PersonaInfoSource() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfoSource.prototype, "_className", { + get: function () { + return "PersonaInfoSource"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "phones", "addresses", "webSites", "notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "Phones", "Addresses", "WebSites", "Notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "addresses", { + get: function () { + _throwIfNotLoaded("addresses", this._A, _typePersonaInfoSource, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfoSource, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfoSource, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfoSource, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfoSource, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfoSource, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfoSource, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfoSource, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfoSource, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfoSource, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfoSource, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfoSource, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfoSource, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfoSource, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "phones", { + get: function () { + _throwIfNotLoaded("phones", this._P, _typePersonaInfoSource, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfoSource, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfoSource, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfoSource, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfoSource.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Addresses"])) { + this._A = obj["Addresses"]; + } + if (!_isUndefined(obj["Birthday"])) { + this._B = obj["Birthday"]; + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = obj["Birthdays"]; + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["Phones"])) { + this._P = obj["Phones"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + }; + PersonaInfoSource.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfoSource.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfoSource.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaInfoSource.prototype.toJSON = function () { + return _toJson(this, { + "addresses": this._A, + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "phones": this._P, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, {}); + }; + PersonaInfoSource.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfoSource.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfoSource; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfoSource = PersonaInfoSource; + var _typePersonaInfo = "PersonaInfo"; + var PersonaInfo = (function (_super) { + __extends(PersonaInfo, _super); + function PersonaInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfo.prototype, "_className", { + get: function () { + return "PersonaInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "webSites", "notes", "isPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "WebSites", "Notes", "IsPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["sources"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sources", { + get: function () { + if (!this._So) { + this._So = _createPropertyObject(OfficeCore.PersonaInfoSource, this, "Sources", false, 4); + } + return this._So; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfo, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfo, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfo, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfo, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfo, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "isPersonResolved", { + get: function () { + _throwIfNotLoaded("isPersonResolved", this._I, _typePersonaInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfo, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfo, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfo, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfo, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfo, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfo, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfo, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfo.prototype.getAddresses = function () { + return _invokeMethod(this, "GetAddresses", 1, [], 4, 0); + }; + PersonaInfo.prototype.getPhones = function () { + return _invokeMethod(this, "GetPhones", 1, [], 4, 0); + }; + PersonaInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Birthday"])) { + this._B = _adjustToDateTime(obj["Birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = _adjustToDateTime(obj["Birthdays"]); + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["IsPersonResolved"])) { + this._I = obj["IsPersonResolved"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + _handleNavigationPropertyResults(this, obj, ["sources", "Sources"]); + }; + PersonaInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Birthday"])) { + obj["birthday"] = _adjustToDateTime(obj["birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + obj["birthdays"] = _adjustToDateTime(obj["birthdays"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaInfo.prototype.toJSON = function () { + return _toJson(this, { + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "isPersonResolved": this._I, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, { + "sources": this._So + }); + }; + PersonaInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfo = PersonaInfo; + var _typePersonaUnifiedCommunicationInfo = "PersonaUnifiedCommunicationInfo"; + var PersonaUnifiedCommunicationInfo = (function (_super) { + __extends(PersonaUnifiedCommunicationInfo, _super); + function PersonaUnifiedCommunicationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_className", { + get: function () { + return "PersonaUnifiedCommunicationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["availability", "status", "isSelf", "isTagged", "customStatusString", "isBlocked", "presenceTooltip", "isOutOfOffice", "outOfOfficeNote", "timezone", "meetingLocation", "meetingSubject", "timezoneBias", "idleStartTime", "overallCapability", "isOnBuddyList", "presenceNote", "voiceMailUri", "availabilityText", "availabilityTooltip", "isDurationInAvailabilityText", "freeBusyStatus", "calendarState", "presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Availability", "Status", "IsSelf", "IsTagged", "CustomStatusString", "IsBlocked", "PresenceTooltip", "IsOutOfOffice", "OutOfOfficeNote", "Timezone", "MeetingLocation", "MeetingSubject", "TimezoneBias", "IdleStartTime", "OverallCapability", "IsOnBuddyList", "PresenceNote", "VoiceMailUri", "AvailabilityText", "AvailabilityTooltip", "IsDurationInAvailabilityText", "FreeBusyStatus", "CalendarState", "Presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availability", { + get: function () { + _throwIfNotLoaded("availability", this._A, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityText", { + get: function () { + _throwIfNotLoaded("availabilityText", this._Av, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Av; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityTooltip", { + get: function () { + _throwIfNotLoaded("availabilityTooltip", this._Ava, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ava; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "calendarState", { + get: function () { + _throwIfNotLoaded("calendarState", this._C, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "customStatusString", { + get: function () { + _throwIfNotLoaded("customStatusString", this._Cu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Cu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "freeBusyStatus", { + get: function () { + _throwIfNotLoaded("freeBusyStatus", this._F, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "idleStartTime", { + get: function () { + _throwIfNotLoaded("idleStartTime", this._I, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isBlocked", { + get: function () { + _throwIfNotLoaded("isBlocked", this._Is, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isDurationInAvailabilityText", { + get: function () { + _throwIfNotLoaded("isDurationInAvailabilityText", this._IsD, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsD; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOnBuddyList", { + get: function () { + _throwIfNotLoaded("isOnBuddyList", this._IsO, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsO; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOutOfOffice", { + get: function () { + _throwIfNotLoaded("isOutOfOffice", this._IsOu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsOu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isSelf", { + get: function () { + _throwIfNotLoaded("isSelf", this._IsS, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsS; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isTagged", { + get: function () { + _throwIfNotLoaded("isTagged", this._IsT, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsT; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingLocation", { + get: function () { + _throwIfNotLoaded("meetingLocation", this._M, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingSubject", { + get: function () { + _throwIfNotLoaded("meetingSubject", this._Me, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Me; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "outOfOfficeNote", { + get: function () { + _throwIfNotLoaded("outOfOfficeNote", this._O, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "overallCapability", { + get: function () { + _throwIfNotLoaded("overallCapability", this._Ov, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ov; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presence", { + get: function () { + _throwIfNotLoaded("presence", this._P, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceNote", { + get: function () { + _throwIfNotLoaded("presenceNote", this._Pr, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pr; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceTooltip", { + get: function () { + _throwIfNotLoaded("presenceTooltip", this._Pre, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pre; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "status", { + get: function () { + _throwIfNotLoaded("status", this._S, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezone", { + get: function () { + _throwIfNotLoaded("timezone", this._T, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezoneBias", { + get: function () { + _throwIfNotLoaded("timezoneBias", this._Ti, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ti; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "voiceMailUri", { + get: function () { + _throwIfNotLoaded("voiceMailUri", this._V, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + PersonaUnifiedCommunicationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Availability"])) { + this._A = obj["Availability"]; + } + if (!_isUndefined(obj["AvailabilityText"])) { + this._Av = obj["AvailabilityText"]; + } + if (!_isUndefined(obj["AvailabilityTooltip"])) { + this._Ava = obj["AvailabilityTooltip"]; + } + if (!_isUndefined(obj["CalendarState"])) { + this._C = obj["CalendarState"]; + } + if (!_isUndefined(obj["CustomStatusString"])) { + this._Cu = obj["CustomStatusString"]; + } + if (!_isUndefined(obj["FreeBusyStatus"])) { + this._F = obj["FreeBusyStatus"]; + } + if (!_isUndefined(obj["IdleStartTime"])) { + this._I = _adjustToDateTime(obj["IdleStartTime"]); + } + if (!_isUndefined(obj["IsBlocked"])) { + this._Is = obj["IsBlocked"]; + } + if (!_isUndefined(obj["IsDurationInAvailabilityText"])) { + this._IsD = obj["IsDurationInAvailabilityText"]; + } + if (!_isUndefined(obj["IsOnBuddyList"])) { + this._IsO = obj["IsOnBuddyList"]; + } + if (!_isUndefined(obj["IsOutOfOffice"])) { + this._IsOu = obj["IsOutOfOffice"]; + } + if (!_isUndefined(obj["IsSelf"])) { + this._IsS = obj["IsSelf"]; + } + if (!_isUndefined(obj["IsTagged"])) { + this._IsT = obj["IsTagged"]; + } + if (!_isUndefined(obj["MeetingLocation"])) { + this._M = obj["MeetingLocation"]; + } + if (!_isUndefined(obj["MeetingSubject"])) { + this._Me = obj["MeetingSubject"]; + } + if (!_isUndefined(obj["OutOfOfficeNote"])) { + this._O = obj["OutOfOfficeNote"]; + } + if (!_isUndefined(obj["OverallCapability"])) { + this._Ov = obj["OverallCapability"]; + } + if (!_isUndefined(obj["Presence"])) { + this._P = obj["Presence"]; + } + if (!_isUndefined(obj["PresenceNote"])) { + this._Pr = obj["PresenceNote"]; + } + if (!_isUndefined(obj["PresenceTooltip"])) { + this._Pre = obj["PresenceTooltip"]; + } + if (!_isUndefined(obj["Status"])) { + this._S = obj["Status"]; + } + if (!_isUndefined(obj["Timezone"])) { + this._T = obj["Timezone"]; + } + if (!_isUndefined(obj["TimezoneBias"])) { + this._Ti = obj["TimezoneBias"]; + } + if (!_isUndefined(obj["VoiceMailUri"])) { + this._V = obj["VoiceMailUri"]; + } + }; + PersonaUnifiedCommunicationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaUnifiedCommunicationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaUnifiedCommunicationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["IdleStartTime"])) { + obj["idleStartTime"] = _adjustToDateTime(obj["idleStartTime"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaUnifiedCommunicationInfo.prototype.toJSON = function () { + return _toJson(this, { + "availability": this._A, + "availabilityText": this._Av, + "availabilityTooltip": this._Ava, + "calendarState": this._C, + "customStatusString": this._Cu, + "freeBusyStatus": this._F, + "idleStartTime": this._I, + "isBlocked": this._Is, + "isDurationInAvailabilityText": this._IsD, + "isOnBuddyList": this._IsO, + "isOutOfOffice": this._IsOu, + "isSelf": this._IsS, + "isTagged": this._IsT, + "meetingLocation": this._M, + "meetingSubject": this._Me, + "outOfOfficeNote": this._O, + "overallCapability": this._Ov, + "presence": this._P, + "presenceNote": this._Pr, + "presenceTooltip": this._Pre, + "status": this._S, + "timezone": this._T, + "timezoneBias": this._Ti, + "voiceMailUri": this._V + }, {}); + }; + PersonaUnifiedCommunicationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaUnifiedCommunicationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaUnifiedCommunicationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaUnifiedCommunicationInfo = PersonaUnifiedCommunicationInfo; + var _typePersonaPhotoInfo = "PersonaPhotoInfo"; + var PersonaPhotoInfo = (function (_super) { + __extends(PersonaPhotoInfo, _super); + function PersonaPhotoInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaPhotoInfo.prototype, "_className", { + get: function () { + return "PersonaPhotoInfo"; + }, + enumerable: true, + configurable: true + }); + PersonaPhotoInfo.prototype.getImageUri = function (uriScheme) { + return _invokeMethod(this, "getImageUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getImageUriWithMetadata = function (uriScheme) { + return _invokeMethod(this, "getImageUriWithMetadata", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getPlaceholderUri = function (uriScheme) { + return _invokeMethod(this, "getPlaceholderUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.setPlaceholderColor = function (color) { + _invokeMethod(this, "setPlaceholderColor", 0, [color], 0, 0); + }; + PersonaPhotoInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaPhotoInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaPhotoInfo.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaPhotoInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaPhotoInfo = PersonaPhotoInfo; + var _typePersonaCollection = "PersonaCollection"; + var PersonaCollection = (function (_super) { + __extends(PersonaCollection, _super); + function PersonaCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaCollection.prototype, "_className", { + get: function () { + return "PersonaCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typePersonaCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + PersonaCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + PersonaCollection.prototype.getItem = function (index) { + return _createIndexerObject(OfficeCore.Persona, this, [index]); + }; + PersonaCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Persona, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + PersonaCollection.prototype.load = function (options) { + return _load(this, options); + }; + PersonaCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }); + }; + PersonaCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + PersonaCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return PersonaCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaCollection = PersonaCollection; + var _typePersonaOrganizationInfo = "PersonaOrganizationInfo"; + var PersonaOrganizationInfo = (function (_super) { + __extends(PersonaOrganizationInfo, _super); + function PersonaOrganizationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaOrganizationInfo.prototype, "_className", { + get: function () { + return "PersonaOrganizationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["hierarchy", "manager", "directReports"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "directReports", { + get: function () { + if (!this._D) { + this._D = _createPropertyObject(OfficeCore.PersonaCollection, this, "DirectReports", true, 4); + } + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "hierarchy", { + get: function () { + if (!this._H) { + this._H = _createPropertyObject(OfficeCore.PersonaCollection, this, "Hierarchy", true, 4); + } + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "manager", { + get: function () { + if (!this._M) { + this._M = _createPropertyObject(OfficeCore.Persona, this, "Manager", false, 4); + } + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typePersonaOrganizationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typePersonaOrganizationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + PersonaOrganizationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + _handleNavigationPropertyResults(this, obj, ["directReports", "DirectReports", "hierarchy", "Hierarchy", "manager", "Manager"]); + }; + PersonaOrganizationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaOrganizationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaOrganizationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaOrganizationInfo.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + PersonaOrganizationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaOrganizationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaOrganizationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaOrganizationInfo = PersonaOrganizationInfo; + var CustomizedData; + (function (CustomizedData) { + CustomizedData["email"] = "Email"; + CustomizedData["workPhone"] = "WorkPhone"; + CustomizedData["workPhone2"] = "WorkPhone2"; + CustomizedData["workFax"] = "WorkFax"; + CustomizedData["mobilePhone"] = "MobilePhone"; + CustomizedData["homePhone"] = "HomePhone"; + CustomizedData["homePhone2"] = "HomePhone2"; + CustomizedData["otherPhone"] = "OtherPhone"; + CustomizedData["sipAddress"] = "SipAddress"; + CustomizedData["profile"] = "Profile"; + CustomizedData["office"] = "Office"; + CustomizedData["company"] = "Company"; + CustomizedData["workAddress"] = "WorkAddress"; + CustomizedData["homeAddress"] = "HomeAddress"; + CustomizedData["otherAddress"] = "OtherAddress"; + CustomizedData["birthday"] = "Birthday"; + })(CustomizedData = OfficeCore.CustomizedData || (OfficeCore.CustomizedData = {})); + var _typeUnifiedGroupInfo = "UnifiedGroupInfo"; + var UnifiedGroupInfo = (function (_super) { + __extends(UnifiedGroupInfo, _super); + function UnifiedGroupInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UnifiedGroupInfo.prototype, "_className", { + get: function () { + return "UnifiedGroupInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Description", "OneDrive", "OneNote", "IsPublic", "AmIOwner", "AmIMember", "AmISubscribed", "MemberCount", "OwnerCount", "HasGuests", "Site", "Planner", "Classification", "SubscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIMember", { + get: function () { + _throwIfNotLoaded("amIMember", this._A, _typeUnifiedGroupInfo, this._isNull); + return this._A; + }, + set: function (value) { + this._A = value; + _invokeSetProperty(this, "AmIMember", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIOwner", { + get: function () { + _throwIfNotLoaded("amIOwner", this._Am, _typeUnifiedGroupInfo, this._isNull); + return this._Am; + }, + set: function (value) { + this._Am = value; + _invokeSetProperty(this, "AmIOwner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amISubscribed", { + get: function () { + _throwIfNotLoaded("amISubscribed", this._AmI, _typeUnifiedGroupInfo, this._isNull); + return this._AmI; + }, + set: function (value) { + this._AmI = value; + _invokeSetProperty(this, "AmISubscribed", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "classification", { + get: function () { + _throwIfNotLoaded("classification", this._C, _typeUnifiedGroupInfo, this._isNull); + return this._C; + }, + set: function (value) { + this._C = value; + _invokeSetProperty(this, "Classification", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "description", { + get: function () { + _throwIfNotLoaded("description", this._D, _typeUnifiedGroupInfo, this._isNull); + return this._D; + }, + set: function (value) { + this._D = value; + _invokeSetProperty(this, "Description", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "hasGuests", { + get: function () { + _throwIfNotLoaded("hasGuests", this._H, _typeUnifiedGroupInfo, this._isNull); + return this._H; + }, + set: function (value) { + this._H = value; + _invokeSetProperty(this, "HasGuests", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "isPublic", { + get: function () { + _throwIfNotLoaded("isPublic", this._I, _typeUnifiedGroupInfo, this._isNull); + return this._I; + }, + set: function (value) { + this._I = value; + _invokeSetProperty(this, "IsPublic", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "memberCount", { + get: function () { + _throwIfNotLoaded("memberCount", this._M, _typeUnifiedGroupInfo, this._isNull); + return this._M; + }, + set: function (value) { + this._M = value; + _invokeSetProperty(this, "MemberCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneDrive", { + get: function () { + _throwIfNotLoaded("oneDrive", this._O, _typeUnifiedGroupInfo, this._isNull); + return this._O; + }, + set: function (value) { + this._O = value; + _invokeSetProperty(this, "OneDrive", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneNote", { + get: function () { + _throwIfNotLoaded("oneNote", this._On, _typeUnifiedGroupInfo, this._isNull); + return this._On; + }, + set: function (value) { + this._On = value; + _invokeSetProperty(this, "OneNote", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "ownerCount", { + get: function () { + _throwIfNotLoaded("ownerCount", this._Ow, _typeUnifiedGroupInfo, this._isNull); + return this._Ow; + }, + set: function (value) { + this._Ow = value; + _invokeSetProperty(this, "OwnerCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "planner", { + get: function () { + _throwIfNotLoaded("planner", this._P, _typeUnifiedGroupInfo, this._isNull); + return this._P; + }, + set: function (value) { + this._P = value; + _invokeSetProperty(this, "Planner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "site", { + get: function () { + _throwIfNotLoaded("site", this._S, _typeUnifiedGroupInfo, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Site", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "subscriptionEnabled", { + get: function () { + _throwIfNotLoaded("subscriptionEnabled", this._Su, _typeUnifiedGroupInfo, this._isNull); + return this._Su; + }, + set: function (value) { + this._Su = value; + _invokeSetProperty(this, "SubscriptionEnabled", value, 0); + }, + enumerable: true, + configurable: true + }); + UnifiedGroupInfo.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"], [], []); + }; + UnifiedGroupInfo.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + UnifiedGroupInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["AmIMember"])) { + this._A = obj["AmIMember"]; + } + if (!_isUndefined(obj["AmIOwner"])) { + this._Am = obj["AmIOwner"]; + } + if (!_isUndefined(obj["AmISubscribed"])) { + this._AmI = obj["AmISubscribed"]; + } + if (!_isUndefined(obj["Classification"])) { + this._C = obj["Classification"]; + } + if (!_isUndefined(obj["Description"])) { + this._D = obj["Description"]; + } + if (!_isUndefined(obj["HasGuests"])) { + this._H = obj["HasGuests"]; + } + if (!_isUndefined(obj["IsPublic"])) { + this._I = obj["IsPublic"]; + } + if (!_isUndefined(obj["MemberCount"])) { + this._M = obj["MemberCount"]; + } + if (!_isUndefined(obj["OneDrive"])) { + this._O = obj["OneDrive"]; + } + if (!_isUndefined(obj["OneNote"])) { + this._On = obj["OneNote"]; + } + if (!_isUndefined(obj["OwnerCount"])) { + this._Ow = obj["OwnerCount"]; + } + if (!_isUndefined(obj["Planner"])) { + this._P = obj["Planner"]; + } + if (!_isUndefined(obj["Site"])) { + this._S = obj["Site"]; + } + if (!_isUndefined(obj["SubscriptionEnabled"])) { + this._Su = obj["SubscriptionEnabled"]; + } + }; + UnifiedGroupInfo.prototype.load = function (options) { + return _load(this, options); + }; + UnifiedGroupInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + UnifiedGroupInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UnifiedGroupInfo.prototype.toJSON = function () { + return _toJson(this, { + "amIMember": this._A, + "amIOwner": this._Am, + "amISubscribed": this._AmI, + "classification": this._C, + "description": this._D, + "hasGuests": this._H, + "isPublic": this._I, + "memberCount": this._M, + "oneDrive": this._O, + "oneNote": this._On, + "ownerCount": this._Ow, + "planner": this._P, + "site": this._S, + "subscriptionEnabled": this._Su + }, {}); + }; + UnifiedGroupInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + UnifiedGroupInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return UnifiedGroupInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.UnifiedGroupInfo = UnifiedGroupInfo; + var _typePersona = "Persona"; + var PersonaPromiseType; + (function (PersonaPromiseType) { + PersonaPromiseType[PersonaPromiseType["immediate"] = 0] = "immediate"; + PersonaPromiseType[PersonaPromiseType["load"] = 3] = "load"; + })(PersonaPromiseType = OfficeCore.PersonaPromiseType || (OfficeCore.PersonaPromiseType = {})); + var PersonaInfoAndSource = (function () { + function PersonaInfoAndSource() { + } + return PersonaInfoAndSource; + }()); + OfficeCore.PersonaInfoAndSource = PersonaInfoAndSource; + ; + var Persona = (function (_super) { + __extends(Persona, _super); + function Persona() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Persona.prototype, "_className", { + get: function () { + return "Persona"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyNames", { + get: function () { + return ["hostId", "type", "capabilities", "diagnosticId", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["HostId", "Type", "Capabilities", "DiagnosticId", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_navigationPropertyNames", { + get: function () { + return ["photo", "personaInfo", "unifiedCommunicationInfo", "organization", "unifiedGroupInfo", "actions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "actions", { + get: function () { + if (!this._A) { + this._A = _createPropertyObject(OfficeCore.PersonaActions, this, "Actions", false, 4); + } + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "organization", { + get: function () { + if (!this._O) { + this._O = _createPropertyObject(OfficeCore.PersonaOrganizationInfo, this, "Organization", false, 4); + } + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "personaInfo", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.PersonaInfo, this, "PersonaInfo", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "photo", { + get: function () { + if (!this._Ph) { + this._Ph = _createPropertyObject(OfficeCore.PersonaPhotoInfo, this, "Photo", false, 4); + } + return this._Ph; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedCommunicationInfo", { + get: function () { + if (!this._U) { + this._U = _createPropertyObject(OfficeCore.PersonaUnifiedCommunicationInfo, this, "UnifiedCommunicationInfo", false, 4); + } + return this._U; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedGroupInfo", { + get: function () { + if (!this._Un) { + this._Un = _createPropertyObject(OfficeCore.UnifiedGroupInfo, this, "UnifiedGroupInfo", false, 4); + } + return this._Un; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "capabilities", { + get: function () { + _throwIfNotLoaded("capabilities", this._C, _typePersona, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "diagnosticId", { + get: function () { + _throwIfNotLoaded("diagnosticId", this._D, _typePersona, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "hostId", { + get: function () { + _throwIfNotLoaded("hostId", this._H, _typePersona, this._isNull); + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersona, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typePersona, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Persona.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, [], ["unifiedGroupInfo"], [ + "actions", + "organization", + "personaInfo", + "photo", + "unifiedCommunicationInfo" + ]); + }; + Persona.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Persona.prototype.dispose = function () { + _invokeMethod(this, "Dispose", 0, [], 0, 0); + }; + Persona.prototype.getCustomizations = function () { + return _invokeMethod(this, "GetCustomizations", 1, [], 4, 0); + }; + Persona.prototype.getMembers = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembers", 1, [], false, false, null, 4); + }; + Persona.prototype.getMembership = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembership", 1, [], false, false, null, 4); + }; + Persona.prototype.getViewableSources = function () { + return _invokeMethod(this, "GetViewableSources", 1, [], 4, 0); + }; + Persona.prototype.reportTimeForRender = function (perfpoint, millisecUTC) { + _invokeMethod(this, "ReportTimeForRender", 0, [perfpoint, millisecUTC], 0, 0); + }; + Persona.prototype.warmup = function (dataToWarmUp) { + _invokeMethod(this, "Warmup", 0, [dataToWarmUp], 0, 0); + }; + Persona.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Capabilities"])) { + this._C = obj["Capabilities"]; + } + if (!_isUndefined(obj["DiagnosticId"])) { + this._D = obj["DiagnosticId"]; + } + if (!_isUndefined(obj["HostId"])) { + this._H = obj["HostId"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + if (!_isUndefined(obj["Type"])) { + this._T = obj["Type"]; + } + _handleNavigationPropertyResults(this, obj, ["actions", "Actions", "organization", "Organization", "personaInfo", "PersonaInfo", "photo", "Photo", "unifiedCommunicationInfo", "UnifiedCommunicationInfo", "unifiedGroupInfo", "UnifiedGroupInfo"]); + }; + Persona.prototype.load = function (options) { + return _load(this, options); + }; + Persona.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Persona.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Persona.prototype.toJSON = function () { + return _toJson(this, { + "capabilities": this._C, + "diagnosticId": this._D, + "hostId": this._H, + "instanceId": this._I, + "type": this._T + }, { + "organization": this._O, + "personaInfo": this._P, + "unifiedCommunicationInfo": this._U, + "unifiedGroupInfo": this._Un + }); + }; + Persona.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Persona.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Persona; + }(OfficeExtension.ClientObject)); + OfficeCore.Persona = Persona; + var PersonaCustom = (function () { + function PersonaCustom() { + } + PersonaCustom.prototype.performAsyncOperation = function (type, waitFor, action, check) { + var _this = this; + if (type == PersonaPromiseType.immediate) { + action(); + return; + } + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + } + else { + var persona = _this; + persona.load("hostId"); + persona.context.sync().then(function () { + var hostId = persona.hostId; + _this.getPersonaLifetime().then(function (personaLifetime) { + var eventHandler = function (args) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (args.sendingPersonaHostId == hostId) { + for (var index = 0; index < args.dataUpdated.length; ++index) { + var updated = args.dataUpdated[index]; + if (waitFor == updated) { + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + personaLifetime.onPersonaUpdated.remove(eventHandler); + persona.context.sync(); + } + resolve(isWarmedUp); + }); + return; + } + } + } + resolve(false); + }); + }; + personaLifetime.onPersonaUpdated.add(eventHandler); + persona.context.sync(); + }); + }); + } + }); + }; + PersonaCustom.prototype.getOrganizationAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var organization = persona.organization; + organization.load("*"); + persona.context.sync().then(function () { + resolve(organization); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var organization = persona.organization; + organization.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(organization.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.organization, action, check); + }); + }; + PersonaCustom.prototype.getIsPersonaInfoResolvedCheck = function () { + var persona = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var info = persona.personaInfo; + info.load("isPersonResolved"); + persona.context.sync().then(function () { + resolve(info.isPersonResolved); + }); + }); + }; + PersonaCustom.prototype.getPersonaInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var info = persona.personaInfo; + info.load(); + persona.context.sync().then(function () { + resolve(info); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getPersonaInfoWithSourceAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var result = new PersonaInfoAndSource(); + result.info = persona.personaInfo; + result.info.load(); + result.source = persona.personaInfo.sources; + result.source.load(); + persona.context.sync().then(function () { + resolve(result); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedCommunicationInfo = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var ucInfo = persona.unifiedCommunicationInfo; + ucInfo.load("*"); + persona.context.sync().then(function () { + resolve(ucInfo); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedGroupInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var group = persona.unifiedGroupInfo; + group.load("*"); + persona.context.sync().then(function () { + resolve(group); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getTypeAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + persona.load("type"); + persona.context.sync().then(function () { + resolve(OfficeCore.PersonaType[persona.type.valueOf()]); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getCustomizationsAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var customizations = persona.getCustomizations(); + persona.context.sync().then(function () { + resolve(customizations.value); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getMembersAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, rejcet) { + var persona = _this; + var action = function () { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + resolve(members); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(members.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.members, action, check); + }); + }; + PersonaCustom.prototype.getMembershipAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var membership = persona.getMembership(); + membership.load("*"); + persona.context.sync().then(function () { + resolve(membership); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve) { + var membership = persona.getMembership(); + membership.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(membership.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.membership, action, check); + }); + }; + PersonaCustom.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + persona.load("instanceId"); + persona.context.sync().then(function () { + var peopleApi = new PeopleApiContext(persona.context, persona.instanceId); + peopleApi.getPersonaLifetime().then(function (lifetime) { + resolve(lifetime); + }); + }); + }); + }; + return PersonaCustom; + }()); + OfficeCore.PersonaCustom = PersonaCustom; + OfficeExtension.Utility.applyMixin(Persona, PersonaCustom); + var _typePersonaLifetime = "PersonaLifetime"; + var PersonaLifetime = (function (_super) { + __extends(PersonaLifetime, _super); + function PersonaLifetime() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaLifetime.prototype, "_className", { + get: function () { + return "PersonaLifetime"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyNames", { + get: function () { + return ["instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersonaLifetime, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.getPersona = function (hostId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersona", 1, [hostId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgByEntryId = function (entryId, name, sip, smtp) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgByEntryId", 1, [entryId, name, sip, smtp], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgEntry = function (name, sip, smtp, entryId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgEntry", 1, [name, sip, smtp, entryId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPolicies = function () { + return _invokeMethod(this, "GetPolicies", 1, [], 4, 0); + }; + PersonaLifetime.prototype.getTextScaleFactor = function () { + return _invokeMethod(this, "GetTextScaleFactor", 1, [], 4, 0); + }; + PersonaLifetime.prototype._RegisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_RegisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._UnregisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_UnregisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + PersonaLifetime.prototype.load = function (options) { + return _load(this, options); + }; + PersonaLifetime.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaLifetime.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(PersonaLifetime.prototype, "onPersonaUpdated", { + get: function () { + var _this = this; + if (!this.m_personaUpdated) { + this.m_personaUpdated = new OfficeExtension.GenericEventHandlers(this.context, this, "PersonaUpdated", { + eventType: 3502, + registerFunc: function () { return _this._RegisterPersonaUpdatedEvent(); }, + unregisterFunc: function () { return _this._UnregisterPersonaUpdatedEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + dataUpdated: value.dataUpdated, + sendingPersonaHostId: value.sendingPersonaHostId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_personaUpdated; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.toJSON = function () { + return _toJson(this, { + "instanceId": this._I + }, {}); + }; + PersonaLifetime.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaLifetime.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaLifetime; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaLifetime = PersonaLifetime; + var _typeLokiTokenProvider = "LokiTokenProvider"; + var LokiTokenProvider = (function (_super) { + __extends(LokiTokenProvider, _super); + function LokiTokenProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProvider.prototype, "_className", { + get: function () { + return "LokiTokenProvider"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyNames", { + get: function () { + return ["emailOrUpn", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["EmailOrUpn", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "emailOrUpn", { + get: function () { + _throwIfNotLoaded("emailOrUpn", this._E, _typeLokiTokenProvider, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typeLokiTokenProvider, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.requestClientAccessToken = function () { + _invokeMethod(this, "RequestClientAccessToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestIdentityUniqueId = function () { + _invokeMethod(this, "RequestIdentityUniqueId", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestToken = function () { + _invokeMethod(this, "RequestToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_RegisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_UnregisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["EmailOrUpn"])) { + this._E = obj["EmailOrUpn"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + LokiTokenProvider.prototype.load = function (options) { + return _load(this, options); + }; + LokiTokenProvider.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LokiTokenProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LokiTokenProvider.prototype, "onClientAccessTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_clientAccessTokenAvailable) { + this.m_clientAccessTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "ClientAccessTokenAvailable", { + eventType: 3505, + registerFunc: function () { return _this._RegisterClientAccessTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterClientAccessTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + clientAccessToken: value.clientAccessToken, + isAvailable: value.isAvailable, + tokenTTLInSeconds: value.tokenTTLInSeconds + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_clientAccessTokenAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onIdentityUniqueIdAvailable", { + get: function () { + var _this = this; + if (!this.m_identityUniqueIdAvailable) { + this.m_identityUniqueIdAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityUniqueIdAvailable", { + eventType: 3504, + registerFunc: function () { return _this._RegisterIdentityUniqueIdAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterIdentityUniqueIdAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityUniqueIdAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onLokiTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_lokiTokenAvailable) { + this.m_lokiTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "LokiTokenAvailable", { + eventType: 3503, + registerFunc: function () { return _this._RegisterLokiTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterLokiTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + lokiAutoDiscoverUrl: value.lokiAutoDiscoverUrl, + lokiToken: value.lokiToken + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_lokiTokenAvailable; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.toJSON = function () { + return _toJson(this, { + "emailOrUpn": this._E, + "instanceId": this._I + }, {}); + }; + LokiTokenProvider.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LokiTokenProvider.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LokiTokenProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProvider = LokiTokenProvider; + var _typeLokiTokenProviderFactory = "LokiTokenProviderFactory"; + var LokiTokenProviderFactory = (function (_super) { + __extends(LokiTokenProviderFactory, _super); + function LokiTokenProviderFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProviderFactory.prototype, "_className", { + get: function () { + return "LokiTokenProviderFactory"; + }, + enumerable: true, + configurable: true + }); + LokiTokenProviderFactory.prototype.getLokiTokenProvider = function (accountName) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [accountName], false, false, null, 4); + }; + LokiTokenProviderFactory.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LokiTokenProviderFactory.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LokiTokenProviderFactory.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LokiTokenProviderFactory, context, "Microsoft.People.LokiTokenProviderFactory", false, 4); + }; + LokiTokenProviderFactory.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LokiTokenProviderFactory; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProviderFactory = LokiTokenProviderFactory; + var _typeServiceContext = "ServiceContext"; + var PeopleApiContext = (function () { + function PeopleApiContext(context, instanceId) { + this.context = context; + this.instanceId = instanceId; + } + Object.defineProperty(PeopleApiContext.prototype, "serviceContext", { + get: function () { + if (!this.m_serviceConext) { + this.m_serviceConext = OfficeCore.ServiceContext.newObject(this.context); + } + return this.m_serviceConext; + }, + enumerable: true, + configurable: true + }); + PeopleApiContext.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var lifetime = _this.serviceContext.getPersonaLifetime(_this.instanceId); + _this.context.sync().then(function () { + lifetime.load("instanceId"); + _this.context.sync().then(function () { + resolve(lifetime); + }); + }); + }); + }; + PeopleApiContext.prototype.getInitialPersona = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this.serviceContext.getInitialPersona(_this.instanceId); + _this.context.sync().then(function () { + resolve(persona); + }); + }); + }; + PeopleApiContext.prototype.getLokiTokenProvider = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var provider = _this.serviceContext.getLokiTokenProvider(_this.instanceId); + _this.context.sync().then(function () { + provider.load("instanceId"); + _this.context.sync().then(function () { + resolve(provider); + }); + }); + }); + }; + return PeopleApiContext; + }()); + OfficeCore.PeopleApiContext = PeopleApiContext; + var ServiceContext = (function (_super) { + __extends(ServiceContext, _super); + function ServiceContext() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceContext.prototype, "_className", { + get: function () { + return "ServiceContext"; + }, + enumerable: true, + configurable: true + }); + ServiceContext.prototype.accountEmailOrUpn = function (instanceId) { + return _invokeMethod(this, "AccountEmailOrUpn", 1, [instanceId], 4, 0); + }; + ServiceContext.prototype.dispose = function (instance) { + _invokeMethod(this, "Dispose", 0, [instance], 0, 0); + }; + ServiceContext.prototype.getInitialPersona = function (instanceId) { + return _createMethodObject(OfficeCore.Persona, this, "GetInitialPersona", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getLokiTokenProvider = function (instanceId) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaLifetime = function (instanceId) { + return _createMethodObject(OfficeCore.PersonaLifetime, this, "GetPersonaLifetime", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaPolicies = function () { + return _invokeMethod(this, "GetPersonaPolicies", 1, [], 4, 0); + }; + ServiceContext.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceContext.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceContext.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceContext, context, "Microsoft.People.ServiceContext", false, 4); + }; + ServiceContext.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceContext; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceContext = ServiceContext; + var _typeRichapiPcxFeatureChecks = "RichapiPcxFeatureChecks"; + var RichapiPcxFeatureChecks = (function (_super) { + __extends(RichapiPcxFeatureChecks, _super); + function RichapiPcxFeatureChecks() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RichapiPcxFeatureChecks.prototype, "_className", { + get: function () { + return "RichapiPcxFeatureChecks"; + }, + enumerable: true, + configurable: true + }); + RichapiPcxFeatureChecks.prototype.isAddChangePhotoLinkOnLpcPersonaImageFlightEnabled = function () { + return _invokeMethod(this, "IsAddChangePhotoLinkOnLpcPersonaImageFlightEnabled", 1, [], 4, 0); + }; + RichapiPcxFeatureChecks.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RichapiPcxFeatureChecks.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RichapiPcxFeatureChecks.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.RichapiPcxFeatureChecks, context, "Microsoft.People.RichapiPcxFeatureChecks", false, 4); + }; + RichapiPcxFeatureChecks.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RichapiPcxFeatureChecks; + }(OfficeExtension.ClientObject)); + OfficeCore.RichapiPcxFeatureChecks = RichapiPcxFeatureChecks; + var _typeTap = "Tap"; + var Tap = (function (_super) { + __extends(Tap, _super); + function Tap() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Tap.prototype, "_className", { + get: function () { + return "Tap"; + }, + enumerable: true, + configurable: true + }); + Tap.prototype.getEnterpriseUserInfo = function () { + return _invokeMethod(this, "GetEnterpriseUserInfo", 1, [], 4 | 1, 0); + }; + Tap.prototype.getMruFriendlyPath = function (documentUrl) { + return _invokeMethod(this, "GetMruFriendlyPath", 1, [documentUrl], 4 | 1, 0); + }; + Tap.prototype.launchFileUrlInOfficeApp = function (documentUrl, useUniversalAsBackup) { + return _invokeMethod(this, "LaunchFileUrlInOfficeApp", 1, [documentUrl, useUniversalAsBackup], 4 | 1, 0); + }; + Tap.prototype.performLocalSearch = function (query, numResultsRequested, supportedFileExtensions, documentUrlToExclude) { + return _invokeMethod(this, "PerformLocalSearch", 1, [query, numResultsRequested, supportedFileExtensions, documentUrlToExclude], 4 | 1, 0); + }; + Tap.prototype.readSearchCache = function (keyword, expiredHours, filterObjectType) { + return _invokeMethod(this, "ReadSearchCache", 1, [keyword, expiredHours, filterObjectType], 4 | 1, 0); + }; + Tap.prototype.writeSearchCache = function (fileContent, keyword, filterObjectType) { + return _invokeMethod(this, "WriteSearchCache", 1, [fileContent, keyword, filterObjectType], 4 | 1, 0); + }; + Tap.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Tap.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Tap.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Tap, context, "Microsoft.TapRichApi.Tap", false, 4); + }; + Tap.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Tap; + }(OfficeExtension.ClientObject)); + OfficeCore.Tap = Tap; + var ObjectType; + (function (ObjectType) { + ObjectType["unknown"] = "Unknown"; + ObjectType["chart"] = "Chart"; + ObjectType["smartArt"] = "SmartArt"; + ObjectType["table"] = "Table"; + ObjectType["image"] = "Image"; + ObjectType["slide"] = "Slide"; + ObjectType["ole"] = "OLE"; + ObjectType["text"] = "Text"; + })(ObjectType = OfficeCore.ObjectType || (OfficeCore.ObjectType = {})); + var _typeThemeService = "ThemeService"; + var ThemeService = (function (_super) { + __extends(ThemeService, _super); + function ThemeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ThemeService.prototype, "_className", { + get: function () { + return "ThemeService"; + }, + enumerable: true, + configurable: true + }); + ThemeService.prototype.registerOfficeThemeChangedEvent = function () { + _invokeMethod(this, "RegisterOfficeThemeChangedEvent", 0, [], 0, 0); + }; + ThemeService.prototype.unregisterOfficeThemeChangedEvent = function () { + _invokeMethod(this, "UnregisterOfficeThemeChangedEvent", 0, [], 0, 0); + }; + ThemeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ThemeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ThemeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ThemeService, context, "Microsoft.Theme.ThemeService", false, 4); + }; + Object.defineProperty(ThemeService.prototype, "onOfficeThemeChanged", { + get: function () { + var _this = this; + if (!this.m_officeThemeChanged) { + this.m_officeThemeChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "OfficeThemeChanged", { + eventType: 65548, + registerFunc: function () { return _this.registerOfficeThemeChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterOfficeThemeChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.ThemeService_OfficeThemeChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_officeThemeChanged; + }, + enumerable: true, + configurable: true + }); + ThemeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ThemeService; + }(OfficeExtension.ClientObject)); + OfficeCore.ThemeService = ThemeService; + (function (_CC) { + function ThemeService_OfficeThemeChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + bodyBackgroundColor: args.bodyBackgroundColor, + bodyForegroundColor: args.bodyForegroundColor, + controlBackgroundColor: args.controlBackgroundColor, + controlForegroundColor: args.controlForegroundColor + }; + return newArgs; + } + _CC.ThemeService_OfficeThemeChanged_EventArgsTransform = ThemeService_OfficeThemeChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeAppRuntimePersistenceService = "AppRuntimePersistenceService"; + var AppRuntimePersistenceService = (function (_super) { + __extends(AppRuntimePersistenceService, _super); + function AppRuntimePersistenceService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimePersistenceService.prototype, "_className", { + get: function () { + return "AppRuntimePersistenceService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimePersistenceService.prototype.getAppRuntimeStartState = function () { + return _invokeMethod(this, "GetAppRuntimeStartState", 1, [], 4, 0); + }; + AppRuntimePersistenceService.prototype.setAppRuntimeStartState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeStartState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimePersistenceService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimePersistenceService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimePersistenceService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimePersistenceService, context, "Microsoft.AppRuntime.AppRuntimePersistenceService", false, 4); + }; + AppRuntimePersistenceService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimePersistenceService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimePersistenceService = AppRuntimePersistenceService; + var _typeAppRuntimeService = "AppRuntimeService"; + var AppRuntimeService = (function (_super) { + __extends(AppRuntimeService, _super); + function AppRuntimeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimeService.prototype, "_className", { + get: function () { + return "AppRuntimeService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.getAppRuntimeState = function () { + return _invokeMethod(this, "GetAppRuntimeState", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getContentSnapshotAsBase64 = function () { + _throwIfApiNotSupported("AppRuntimeService.getContentSnapshotAsBase64", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetContentSnapshotAsBase64", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getSnapshotEnabled = function () { + _throwIfApiNotSupported("AppRuntimeService.getSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetSnapshotEnabled", 1, [], 4, 0); + }; + AppRuntimeService.prototype.setAppRuntimeState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimeService.prototype.setSnapshotEnabled = function (enabled) { + _throwIfApiNotSupported("AppRuntimeService.setSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + _invokeMethod(this, "SetSnapshotEnabled", 1, [enabled], 4, 0); + }; + AppRuntimeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimeService, context, "Microsoft.AppRuntime.AppRuntimeService", false, 4); + }; + Object.defineProperty(AppRuntimeService.prototype, "onSnapshotImageReady", { + get: function () { + _throwIfApiNotSupported("AppRuntimeService.onSnapshotImageReady", "SnapshotControl", "1.1", _hostName); + if (!this.m_snapshotImageReady) { + this.m_snapshotImageReady = new OfficeExtension.GenericEventHandlers(this.context, this, "SnapshotImageReady", { + eventType: 65547, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + imageBase64: value.imageBase64 + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_snapshotImageReady; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppRuntimeService.prototype, "onVisibilityChanged", { + get: function () { + if (!this.m_visibilityChanged) { + this.m_visibilityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "VisibilityChanged", { + eventType: 65539, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + visibility: value.visibility + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_visibilityChanged; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimeService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimeService = AppRuntimeService; + var AppRuntimeState; + (function (AppRuntimeState) { + AppRuntimeState["inactive"] = "Inactive"; + AppRuntimeState["background"] = "Background"; + AppRuntimeState["visible"] = "Visible"; + })(AppRuntimeState = OfficeCore.AppRuntimeState || (OfficeCore.AppRuntimeState = {})); + var Visibility; + (function (Visibility) { + Visibility["hidden"] = "Hidden"; + Visibility["visible"] = "Visible"; + })(Visibility = OfficeCore.Visibility || (OfficeCore.Visibility = {})); + var LicenseFeatureTier; + (function (LicenseFeatureTier) { + LicenseFeatureTier["unknown"] = "Unknown"; + LicenseFeatureTier["basic"] = "Basic"; + LicenseFeatureTier["premium"] = "Premium"; + })(LicenseFeatureTier = OfficeCore.LicenseFeatureTier || (OfficeCore.LicenseFeatureTier = {})); + var _typeLicense = "License"; + var License = (function (_super) { + __extends(License, _super); + function License() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(License.prototype, "_className", { + get: function () { + return "License"; + }, + enumerable: true, + configurable: true + }); + License.prototype.getFeatureTier = function (feature, fallbackValue) { + return _invokeMethod(this, "GetFeatureTier", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.getLicenseFeature = function (feature) { + return _createMethodObject(OfficeCore.LicenseFeature, this, "GetLicenseFeature", 1, [feature], false, false, null, 4); + }; + License.prototype.getMsaDeviceTicket = function (resource, policy, options) { + return _invokeMethod(this, "GetMsaDeviceTicket", 1, [resource, policy, options], 4 | 1, 0); + }; + License.prototype.isFeatureEnabled = function (feature, fallbackValue) { + return _invokeMethod(this, "IsFeatureEnabled", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.isFreemiumUpsellEnabled = function () { + return _invokeMethod(this, "IsFreemiumUpsellEnabled", 1, [], 4, 0); + }; + License.prototype.launchUpsellExperience = function (experienceId) { + _invokeMethod(this, "LaunchUpsellExperience", 1, [experienceId], 4, 0); + }; + License.prototype._TestFireStateChangedEvent = function (feature) { + _invokeMethod(this, "_TestFireStateChangedEvent", 0, [feature], 1, 0); + }; + License.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + License.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + License.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.License, context, "Microsoft.Office.Licensing.License", false, 4); + }; + License.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return License; + }(OfficeExtension.ClientObject)); + OfficeCore.License = License; + var _typeLicenseFeature = "LicenseFeature"; + var LicenseFeature = (function (_super) { + __extends(LicenseFeature, _super); + function LicenseFeature() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LicenseFeature.prototype, "_className", { + get: function () { + return "LicenseFeature"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeLicenseFeature, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype._RegisterStateChange = function () { + _invokeMethod(this, "_RegisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._UnregisterStateChange = function () { + _invokeMethod(this, "_UnregisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + LicenseFeature.prototype.load = function (options) { + return _load(this, options); + }; + LicenseFeature.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LicenseFeature.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + LicenseFeature.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LicenseFeature.prototype, "onStateChanged", { + get: function () { + var _this = this; + if (!this.m_stateChanged) { + this.m_stateChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "StateChanged", { + eventType: 1, + registerFunc: function () { return _this._RegisterStateChange(); }, + unregisterFunc: function () { return _this._UnregisterStateChange(); }, + getTargetIdFunc: function () { return _this.id; }, + eventArgsTransformFunc: function (value) { + var event = _CC.LicenseFeature_StateChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_stateChanged; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + LicenseFeature.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LicenseFeature.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LicenseFeature; + }(OfficeExtension.ClientObject)); + OfficeCore.LicenseFeature = LicenseFeature; + (function (_CC) { + function LicenseFeature_StateChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + feature: args.featureName, + isEnabled: args.isEnabled, + tier: args.tierName + }; + if (args.tierName) { + newArgs.tier = args.tierName == 0 ? LicenseFeatureTier.unknown : + args.tierName == 1 ? LicenseFeatureTier.basic : + args.tierName == 2 ? LicenseFeatureTier.premium : + args.tierName; + } + return newArgs; + } + _CC.LicenseFeature_StateChanged_EventArgsTransform = LicenseFeature_StateChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeMsaDeviceTicketOptions = "MsaDeviceTicketOptions"; + var MsaDeviceTicketOptions = (function (_super) { + __extends(MsaDeviceTicketOptions, _super); + function MsaDeviceTicketOptions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_className", { + get: function () { + return "MsaDeviceTicketOptions"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyNames", { + get: function () { + return ["scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "scopes", { + get: function () { + _throwIfNotLoaded("scopes", this._S, _typeMsaDeviceTicketOptions, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Scopes", value, 0); + }, + enumerable: true, + configurable: true + }); + MsaDeviceTicketOptions.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["scopes"], [], []); + }; + MsaDeviceTicketOptions.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + MsaDeviceTicketOptions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Scopes"])) { + this._S = obj["Scopes"]; + } + }; + MsaDeviceTicketOptions.prototype.load = function (options) { + return _load(this, options); + }; + MsaDeviceTicketOptions.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MsaDeviceTicketOptions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MsaDeviceTicketOptions.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.MsaDeviceTicketOptions, context, "Microsoft.Office.Licensing.MsaDeviceTicketOptions", false, 4); + }; + MsaDeviceTicketOptions.prototype.toJSON = function () { + return _toJson(this, { + "scopes": this._S + }, {}); + }; + MsaDeviceTicketOptions.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MsaDeviceTicketOptions.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MsaDeviceTicketOptions; + }(OfficeExtension.ClientObject)); + OfficeCore.MsaDeviceTicketOptions = MsaDeviceTicketOptions; + var _typeDialogPage = "DialogPage"; + var DialogPage = (function (_super) { + __extends(DialogPage, _super); + function DialogPage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DialogPage.prototype, "_className", { + get: function () { + return "DialogPage"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_Id", { + get: function () { + _throwIfNotLoaded("_Id", this.__I, _typeDialogPage, this._isNull); + return this.__I; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4, 0); + }; + DialogPage.prototype.readyToShow = function () { + _invokeMethod(this, "ReadyToShow", 1, [], 4, 0); + }; + DialogPage.prototype.registerOnShow = function () { + _invokeMethod(this, "RegisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype.sendMessageToHost = function (message) { + _invokeMethod(this, "SendMessageToHost", 1, [message], 4, 0); + }; + DialogPage.prototype.unregisterOnShow = function () { + _invokeMethod(this, "UnregisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["_Id"])) { + this.__I = obj["_Id"]; + } + }; + DialogPage.prototype.load = function (options) { + return _load(this, options); + }; + DialogPage.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_Id"])) { + this.__I = value["_Id"]; + } + }; + DialogPage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DialogPage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DialogPage, context, "Microsoft.Office.DialogPage.DialogPage", false, 4); + }; + Object.defineProperty(DialogPage.prototype, "onOnShowEvent", { + get: function () { + var _this = this; + if (!this.m_onShowEvent) { + this.m_onShowEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "OnShowEvent", { + eventType: 1, + registerFunc: function () { return _this.registerOnShow(); }, + unregisterFunc: function () { return _this.unregisterOnShow(); }, + getTargetIdFunc: function () { return _this._Id; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_onShowEvent; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return DialogPage; + }(OfficeExtension.ClientObject)); + OfficeCore.DialogPage = DialogPage; + var _typeSharedFilePicker = "SharedFilePicker"; + var SharedFilePicker = (function (_super) { + __extends(SharedFilePicker, _super); + function SharedFilePicker() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(SharedFilePicker.prototype, "_className", { + get: function () { + return "SharedFilePicker"; + }, + enumerable: true, + configurable: true + }); + SharedFilePicker.prototype.getSharedFilePickerResponse = function (pickerCustomizationJsonString) { + return _invokeMethod(this, "GetSharedFilePickerResponse", 1, [pickerCustomizationJsonString], 4, 0); + }; + SharedFilePicker.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + SharedFilePicker.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + SharedFilePicker.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.SharedFilePicker, context, "Microsoft.Office.SharedFilePicker", false, 4); + }; + SharedFilePicker.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return SharedFilePicker; + }(OfficeExtension.ClientObject)); + OfficeCore.SharedFilePicker = SharedFilePicker; + var _typeActionService = "ActionService"; + var ActionService = (function (_super) { + __extends(ActionService, _super); + function ActionService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ActionService.prototype, "_className", { + get: function () { + return "ActionService"; + }, + enumerable: true, + configurable: true + }); + ActionService.prototype.areShortcutsInUse = function (shortcuts) { + return _invokeMethod(this, "AreShortcutsInUse", 0, [shortcuts], 0, 0); + }; + ActionService.prototype.getShortcuts = function () { + return _invokeMethod(this, "GetShortcuts", 1, [], 4, 0); + }; + ActionService.prototype.replaceShortcuts = function (shortcuts) { + _invokeMethod(this, "ReplaceShortcuts", 0, [shortcuts], 0, 0); + }; + ActionService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ActionService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ActionService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ActionService, context, "Microsoft.Office.ActionService", false, 4); + }; + ActionService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ActionService; + }(OfficeExtension.ClientObject)); + OfficeCore.ActionService = ActionService; + var _typeAuth = "Auth"; + var Auth = (function (_super) { + __extends(Auth, _super); + function Auth() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Auth.prototype, "_className", { + get: function () { + return "Auth"; + }, + enumerable: true, + configurable: true + }); + Auth.prototype.getAccessTokenFirstPartyOAuth = function (appName, target) { + return _invokeMethod(this, "GetAccessTokenFirstPartyOAuth", 1, [appName, target], 4 | 1, 0); + }; + Auth.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Auth.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Auth.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Auth, context, "Microsoft.Office.Auth", false, 1 | 4); + }; + Auth.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Auth; + }(OfficeExtension.ClientObject)); + OfficeCore.Auth = Auth; + var _typeAugLoopEventService = "AugLoopEventService"; + var AugLoopEventService = (function (_super) { + __extends(AugLoopEventService, _super); + function AugLoopEventService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AugLoopEventService.prototype, "_className", { + get: function () { + return "AugLoopEventService"; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.sendMessage = function (data) { + _invokeMethod(this, "SendMessage", 1, [data], 4 | 1, 0); + }; + AugLoopEventService.prototype._RegisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_RegisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._UnregisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_UnregisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AugLoopEventService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AugLoopEventService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AugLoopEventService, context, "Microsoft.Office.AugLoopEventService", false, 1 | 4); + }; + Object.defineProperty(AugLoopEventService.prototype, "onHostMessageReceived", { + get: function () { + var _this = this; + if (!this.m_hostMessageReceived) { + this.m_hostMessageReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "HostMessageReceived", { + eventType: 65542, + registerFunc: function () { return _this._RegisterHostMessageReceivedEvent(); }, + unregisterFunc: function () { return _this._UnregisterHostMessageReceivedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + data: value.data + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostMessageReceived; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AugLoopEventService; + }(OfficeExtension.ClientObject)); + OfficeCore.AugLoopEventService = AugLoopEventService; + var _typeUndoService = "UndoService"; + var UndoService = (function (_super) { + __extends(UndoService, _super); + function UndoService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UndoService.prototype, "_className", { + get: function () { + return "UndoService"; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.endCopilotOperation = function (batchId) { + _invokeMethod(this, "EndCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.startCopilotOperation = function (batchId) { + return _invokeMethod(this, "StartCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.undo = function () { + return _invokeMethod(this, "Undo", 0, [], 1, 0); + }; + UndoService.prototype._RegisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_RegisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._UnregisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_UnregisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UndoService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UndoService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UndoService, context, "Microsoft.Office.UndoService", false, 1 | 4); + }; + Object.defineProperty(UndoService.prototype, "onCopilotOperationStarted", { + get: function () { + if (!this.m_copilotOperationStarted) { + this.m_copilotOperationStarted = new OfficeExtension.GenericEventHandlers(this.context, this, "CopilotOperationStarted", { + eventType: 65544, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + batchId: value.batchId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_copilotOperationStarted; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UndoService.prototype, "onUndoStackChanged", { + get: function () { + var _this = this; + if (!this.m_undoStackChanged) { + this.m_undoStackChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "UndoStackChanged", { + eventType: 65543, + registerFunc: function () { return _this._RegisterUndoStackChangedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUndoStackChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_undoStackChanged; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UndoService; + }(OfficeExtension.ClientObject)); + OfficeCore.UndoService = UndoService; + var TriStateOption; + (function (TriStateOption) { + TriStateOption["notSet"] = "NotSet"; + TriStateOption["true"] = "True"; + TriStateOption["false"] = "False"; + })(TriStateOption = OfficeCore.TriStateOption || (OfficeCore.TriStateOption = {})); + var UserFeedbackType; + (function (UserFeedbackType) { + UserFeedbackType["like"] = "Like"; + UserFeedbackType["dislike"] = "Dislike"; + UserFeedbackType["idea"] = "Idea"; + UserFeedbackType["unclassified"] = "Unclassified"; + })(UserFeedbackType = OfficeCore.UserFeedbackType || (OfficeCore.UserFeedbackType = {})); + var UserFeedbackUIType; + (function (UserFeedbackUIType) { + UserFeedbackUIType["modalDialog"] = "ModalDialog"; + UserFeedbackUIType["taskpane"] = "Taskpane"; + })(UserFeedbackUIType = OfficeCore.UserFeedbackUIType || (OfficeCore.UserFeedbackUIType = {})); + var _typeUserFeedbackService = "UserFeedbackService"; + var UserFeedbackService = (function (_super) { + __extends(UserFeedbackService, _super); + function UserFeedbackService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UserFeedbackService.prototype, "_className", { + get: function () { + return "UserFeedbackService"; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.collectUserFeedback = function (feedbacktype, UIType, featureArea, options) { + _invokeMethod(this, "CollectUserFeedback", 1, [feedbacktype, UIType, featureArea, options], 4 | 1, 0); + }; + UserFeedbackService.prototype._RegisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_RegisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._UnregisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_UnregisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UserFeedbackService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UserFeedbackService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UserFeedbackService, context, "Microsoft.Office.UserFeedbackService", false, 1 | 4); + }; + Object.defineProperty(UserFeedbackService.prototype, "onUserFeedbackUIDismissed", { + get: function () { + var _this = this; + if (!this.m_userFeedbackUIDismissed) { + this.m_userFeedbackUIDismissed = new OfficeExtension.GenericEventHandlers(this.context, this, "UserFeedbackUIDismissed", { + eventType: 65546, + registerFunc: function () { return _this._RegisterUserFeedbackUIDismissedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUserFeedbackUIDismissedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + isFeedbackSent: value.isFeedbackSent + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_userFeedbackUIDismissed; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UserFeedbackService; + }(OfficeExtension.ClientObject)); + OfficeCore.UserFeedbackService = UserFeedbackService; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["apiNotAvailable"] = "ApiNotAvailable"; + ErrorCodes["clientError"] = "ClientError"; + ErrorCodes["controlIdNotFound"] = "ControlIdNotFound"; + ErrorCodes["entryIdRequired"] = "EntryIdRequired"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["hostRestartNeeded"] = "HostRestartNeeded"; + ErrorCodes["instanceNotFound"] = "InstanceNotFound"; + ErrorCodes["interactiveFlowAborted"] = "InteractiveFlowAborted"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidGrant"] = "InvalidGrant"; + ErrorCodes["invalidResourceUrl"] = "InvalidResourceUrl"; + ErrorCodes["invalidRibbonDefinition"] = "InvalidRibbonDefinition"; + ErrorCodes["objectNotFound"] = "ObjectNotFound"; + ErrorCodes["resourceNotSupported"] = "ResourceNotSupported"; + ErrorCodes["serverError"] = "ServerError"; + ErrorCodes["serviceUrlNotFound"] = "ServiceUrlNotFound"; + ErrorCodes["sharedRuntimeNotAvailable"] = "SharedRuntimeNotAvailable"; + ErrorCodes["ticketInvalidParams"] = "TicketInvalidParams"; + ErrorCodes["ticketNetworkError"] = "TicketNetworkError"; + ErrorCodes["ticketUnauthorized"] = "TicketUnauthorized"; + ErrorCodes["ticketUninitialized"] = "TicketUninitialized"; + ErrorCodes["ticketUnknownError"] = "TicketUnknownError"; + ErrorCodes["unexpectedError"] = "UnexpectedError"; + ErrorCodes["unsupportedUserIdentity"] = "UnsupportedUserIdentity"; + ErrorCodes["userNotSignedIn"] = "UserNotSignedIn"; + })(ErrorCodes = OfficeCore.ErrorCodes || (OfficeCore.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = OfficeCore.Interfaces || (OfficeCore.Interfaces = {})); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var VisibilityMode; + (function (VisibilityMode) { + VisibilityMode["hidden"] = "Hidden"; + VisibilityMode["taskpane"] = "Taskpane"; + })(VisibilityMode = Office.VisibilityMode || (Office.VisibilityMode = {})); + var StartupBehavior; + (function (StartupBehavior) { + StartupBehavior["none"] = "None"; + StartupBehavior["load"] = "Load"; + })(StartupBehavior = Office.StartupBehavior || (Office.StartupBehavior = {})); + var addin; + (function (addin) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function setStartupBehavior(behavior) { + return __awaiter(this, void 0, void 0, function () { + var state, context, appRuntimePersistenceService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (behavior !== StartupBehavior.load && behavior !== StartupBehavior.none) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.invalidArgument, null, null); + } + state = (behavior == StartupBehavior.load ? OfficeCore.AppRuntimeState.background : OfficeCore.AppRuntimeState.inactive); + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + appRuntimePersistenceService.setAppRuntimeStartState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + addin.setStartupBehavior = setStartupBehavior; + function getStartupBehavior() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimePersistenceService, stateResult, state, ret; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + stateResult = appRuntimePersistenceService.getAppRuntimeStartState(); + return [4, context.sync()]; + case 1: + _a.sent(); + state = stateResult.value; + ret = (state == OfficeCore.AppRuntimeState.inactive ? StartupBehavior.none : StartupBehavior.load); + return [2, ret]; + } + }); + }); + } + addin.getStartupBehavior = getStartupBehavior; + function setSnapshotEnabled(enabled) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setSnapshotEnabled(enabled); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, Promise.resolve()]; + } + }); + }); + } + addin.setSnapshotEnabled = setSnapshotEnabled; + function getSnapshotEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + result = appRuntimeService.getSnapshotEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + addin.getSnapshotEnabled = getSnapshotEnabled; + function getContentSnapshotAsBase64() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2, new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var context = _createRequestContext(true); + var appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + var timeoutId = setTimeout(function () { + handler.remove(); + context.sync()["catch"](function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "timeout", "getContentSnapshotAsBase64")); + }, 7000); + var handler = appRuntimeService.onSnapshotImageReady.add(function (arg) { + clearTimeout(timeoutId); + handler.remove(); + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + context.sync()["catch"](function () { }); + resolve(arg.imageBase64); + } + else { + context.sync()["catch"](function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "execution failed", "getContentSnapshotAsBase64")); + } + return null; + }); + context.sync().then(function () { + var apiResult = appRuntimeService.getContentSnapshotAsBase64(); + return context.sync().then(function () { return null; }); + })["catch"](function (e) { reject(e); }); + })]; + }); + }); + } + addin.getContentSnapshotAsBase64 = getContentSnapshotAsBase64; + function _setState(state) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setAppRuntimeState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + function _getState() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, stateResult; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + stateResult = appRuntimeService.getAppRuntimeState(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, stateResult.value]; + } + }); + }); + } + addin._getState = _getState; + function showAsTaskpane() { + return _setState(OfficeCore.AppRuntimeState.visible); + } + addin.showAsTaskpane = showAsTaskpane; + function hide() { + return _setState(OfficeCore.AppRuntimeState.background); + } + addin.hide = hide; + var _appRuntimeEvent; + function _getAppRuntimeEventService() { + if (!_appRuntimeEvent) { + var context = _createRequestContext(true); + _appRuntimeEvent = OfficeCore.AppRuntimeService.newObject(context); + } + return _appRuntimeEvent; + } + function _convertVisibilityToVisibilityMode(visibility) { + if (visibility === OfficeCore.Visibility.visible) { + return VisibilityMode.taskpane; + } + return VisibilityMode.hidden; + } + function onVisibilityModeChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var eventService, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + eventService = _getAppRuntimeEventService(); + registrationToken = eventService.onVisibilityChanged.add(function (args) { + if (listener) { + var msg = { + visibilityMode: _convertVisibilityToVisibilityMode(args.visibility) + }; + listener(msg); + } + return null; + }); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + addin.onVisibilityModeChanged = onVisibilityModeChanged; + var beforeDocumentCloseNotification; + (function (beforeDocumentCloseNotification) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function enable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.enable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.enable = enable; + function disable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.disable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.disable = disable; + function onCloseActionCancelled(listener) { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + registrationToken = beforeCloseNotification.onBeforeCloseNotificationCancelled.add(function (args) { + if (listener) { + listener(); + } + return null; + }); + return [4, context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + beforeDocumentCloseNotification.onCloseActionCancelled = onCloseActionCancelled; + })(beforeDocumentCloseNotification = addin.beforeDocumentCloseNotification || (addin.beforeDocumentCloseNotification = {})); + })(addin = Office.addin || (Office.addin = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ExtensionComponentType; + (function (ExtensionComponentType) { + ExtensionComponentType["taskpane"] = "Taskpane"; + })(ExtensionComponentType || (ExtensionComponentType = {})); + var extensionLifeCycle; + (function (extensionLifeCycle) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + return context; + } + function launchTaskpane(launchOptions) { + return __awaiter(this, void 0, void 0, function () { + var context, extensionLifecycle, settings; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + extensionLifecycle = OfficeCore.ExtensionLifeCycle.newObject(context); + settings = launchOptions.settings; + if (settings != undefined) { + launchOptions.settings = OSF.OUtil.serializeSettings(settings); + } + extensionLifecycle.launchExtensionComponent("", ExtensionComponentType.taskpane, launchOptions); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + extensionLifeCycle.launchTaskpane = launchTaskpane; + })(extensionLifeCycle = Office.extensionLifeCycle || (Office.extensionLifeCycle = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ribbon; + (function (ribbon_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function requestUpdate(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + function processControls(parent) { + if (parent.controls !== undefined + && parent.controls.length !== undefined + && !!parent.controls.length) { + parent.controls + .filter(function (control) { return !(!control.id); }) + .forEach(function (control) { + var ribbonControl = ribbon.getButton(control.id); + if (control.enabled !== undefined && control.enabled !== null) { + ribbonControl.enabled = control.enabled; + } + }); + } + } + input.tabs + .filter(function (tab) { return !(!tab.id); }) + .forEach(function (tab) { + var ribbonTab = ribbon.getTab(tab.id); + if (tab.visible !== undefined && tab.visible !== null) { + ribbonTab.setVisibility(tab.visible); + } + if (!!tab.groups && !!tab.groups.length) { + tab.groups + .filter(function (group) { return !(!group.id); }) + .forEach(function (group) { + processControls(group); + }); + } + else { + processControls(tab); + } + }); + return requestContext.sync(); + } + ribbon_1.requestUpdate = requestUpdate; + function requestCreateControls(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + var delay = function (milliseconds) { + return new Promise(function (resolve, _) { return setTimeout(function () { return resolve(); }, milliseconds); }); + }; + ribbon.executeRequestCreate(JSON.stringify(input)); + return delay(250) + .then(function () { return requestContext.sync(); }); + } + ribbon_1.requestCreateControls = requestCreateControls; + })(ribbon = Office.ribbon || (Office.ribbon = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var AddinInternalServiceErrorCodes; + (function (AddinInternalServiceErrorCodes) { + AddinInternalServiceErrorCodes["generalException"] = "GeneralException"; + })(AddinInternalServiceErrorCodes || (AddinInternalServiceErrorCodes = {})); + var _libraryMetadataInternalServiceApi = { "version": "1.0.0", + "name": "OfficeCore", + "defaultApiSetName": "OfficeSharedApi", + "hostName": "Office", + "apiSets": [], + "strings": ["AddinInternalService"], + "enumTypes": [], + "clientObjectTypes": [[1, + 0, + 0, + 0, + [["notifyActionHandlerReady", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + 0, + "Microsoft.InternalService.AddinInternalService", + 4]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataInternalServiceApi, targetNamespaceObject: OfficeCore }); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var actionProxy; + (function (actionProxy) { + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _association; + var ActionMessageCategory = 2; + var ActionDispatchMessageType = 1000; + function init() { + if (typeof (OSF) !== "undefined" && OSF.DDA && OSF.DDA.RichApi && OSF.DDA.RichApi.richApiMessageManager) { + var context = new OfficeExtension.ClientRequestContext(); + return context.eventRegistration.register(5, "", _handleMessage); + } + } + function setActionAssociation(association) { + _association = association; + } + function _getFunction(functionName) { + if (functionName) { + var nameUpperCase = functionName.toUpperCase(); + var call = _association.mappings[nameUpperCase]; + if (!_isNullOrUndefined(call) && typeof (call) === "function") { + return call; + } + } + throw OfficeExtension.Utility.createRuntimeError("invalidOperation", "sourceData", "ActionProxy._getFunction"); + } + function _handleMessage(args) { + try { + OfficeExtension.Utility.log('ActionProxy._handleMessage'); + OfficeExtension.Utility.checkArgumentNull(args, "args"); + var entryArray = args.entries; + var invocationArray = []; + for (var i = 0; i < entryArray.length; i++) { + if (entryArray[i].messageCategory !== ActionMessageCategory) { + continue; + } + if (typeof (entryArray[i].message) === 'string') { + entryArray[i].message = JSON.parse(entryArray[i].message); + } + if (entryArray[i].messageType === ActionDispatchMessageType) { + var actionsArgs = null; + var actionName = entryArray[i].message[0]; + var call = _getFunction(actionName); + if (entryArray[i].message.length >= 2) { + var actionArgsJson = entryArray[i].message[1]; + if (actionArgsJson) { + if (_isJsonObjectString(actionArgsJson)) { + actionsArgs = JSON.parse(actionArgsJson); + } + else { + actionsArgs = actionArgsJson; + } + } + } + if (typeof (OSF) !== 'undefined' && + OSF.AppTelemetry && + OSF.AppTelemetry.CallOnAppActivatedIfPending) { + OSF.AppTelemetry.CallOnAppActivatedIfPending(); + } + call.apply(null, [actionsArgs]); + } + else { + OfficeExtension.Utility.log('ActionProxy._handleMessage unknown message type ' + entryArray[i].messageType); + } + } + } + catch (ex) { + _tryLog(ex); + throw ex; + } + return OfficeExtension.Utility._createPromiseFromResult(null); + } + function _isJsonObjectString(value) { + if (typeof value === 'string' && value[0] === '{') { + return true; + } + return false; + } + function toLogMessage(ex) { + var ret = 'Unknown Error'; + if (ex) { + try { + if (ex.toString) { + ret = ex.toString(); + } + ret = ret + ' ' + JSON.stringify(ex); + } + catch (otherEx) { + ret = 'Unexpected Error'; + } + } + return ret; + } + function _tryLog(ex) { + var message = toLogMessage(ex); + OfficeExtension.Utility.log(message); + } + function notifyActionHandlerReady() { + var context = new OfficeExtension.ClientRequestContext(); + var addinInternalService = OfficeCore.AddinInternalService.newObject(context); + context._customData = 'WacPartition'; + addinInternalService.notifyActionHandlerReady(); + return context.sync(); + } + function handlerOnReadyInternal() { + try { + Microsoft.Office.WebExtension.onReadyInternal() + .then(function () { + return init(); + }) + .then(function () { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.isDialog === true || (hostInfo.hostPlatform === "web" && hostInfo.hostType !== "word" && hostInfo.hostType !== "excel")) { + return; + } + else { + return notifyActionHandlerReady(); + } + }); + } + catch (ex) { + } + } + function initFromHostBridge(hostBridge) { + hostBridge.addHostMessageHandler(function (bridgeMessage) { + if (bridgeMessage.type === 3) { + _handleMessage(bridgeMessage.message); + } + }); + } + function initOnce() { + OfficeExtension.Utility.log('ActionProxy.initOnce'); + if (typeof (Office.actions) != 'undefined') { + setActionAssociation(Office.actions._association); + } + if (typeof (document) !== 'undefined') { + if (document.readyState && document.readyState !== 'loading') { + OfficeExtension.Utility.log('ActionProxy.initOnce: document.readyState is not loading state'); + handlerOnReadyInternal(); + } + else if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", function () { + OfficeExtension.Utility.log('ActionProxy.initOnce: DOMContentLoaded event triggered'); + handlerOnReadyInternal(); + }); + } + } + OfficeExtension.HostBridge.onInited(function (hostBridge) { + initFromHostBridge(hostBridge); + }); + } + initOnce(); + })(actionProxy || (actionProxy = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var actions; + (function (actions) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function areShortcutsInUse(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, inUseArray, inUseInfoArray, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + inUseArray = actionService.areShortcutsInUse(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + inUseInfoArray = []; + for (i = 0; i < shortcuts.length; i++) { + inUseInfoArray.push({ + shortcut: shortcuts[i], + inUse: inUseArray.value[i] + }); + } + return [2, inUseInfoArray]; + } + }); + }); + } + actions.areShortcutsInUse = areShortcutsInUse; + function replaceShortcuts(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + actionService.replaceShortcuts(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + actions.replaceShortcuts = replaceShortcuts; + function getShortcuts() { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, shortcuts; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + shortcuts = actionService.getShortcuts(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, shortcuts.value]; + } + }); + }); + } + actions.getShortcuts = getShortcuts; + })(actions = Office.actions || (Office.actions = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var AugLoop; + (function (AugLoop) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function SendMessage(message) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + augLoopEventService.sendMessage(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + AugLoop.SendMessage = SendMessage; + function onHostMessageReceived(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService, callback, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + callback = function (args) { + if (listener) { + var message = args.data; + listener(message); + } + return null; + }; + augLoopEventService.onHostMessageReceived.add(callback); + return [4, augLoopEventService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + augLoopEventService.onHostMessageReceived.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + AugLoop.onHostMessageReceived = onHostMessageReceived; + })(AugLoop = OfficeFirstParty.AugLoop || (OfficeFirstParty.AugLoop = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var Undo; + (function (Undo) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + context._customData = 'SkipUndoRecording'; + return context; + } + var resolver; + function onCopilotOperationStartedEventReceived() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (typeof resolver !== "undefined") { + resolver(); + resolver = undefined; + } + return [2]; + }); + }); + } + function undo() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + result = undoService.undo(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + Undo.undo = undo; + function onUndoStackChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onUndoStackChanged.add(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + undoService.onUndoStackChanged.remove(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + Undo.onUndoStackChanged = onUndoStackChanged; + function startCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var waitForEventPromise, context, undoService, shouldWaitForEvent, e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (typeof resolver !== "undefined") { + throw new Error("startCopilotOperation is already inprogress"); + } + waitForEventPromise = new Promise(function (resolve) { resolver = resolve; }); + _a.label = 1; + case 1: + _a.trys.push([1, 4, , 5]); + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onCopilotOperationStarted.add(onCopilotOperationStartedEventReceived); + return [4, context.sync()]; + case 2: + _a.sent(); + shouldWaitForEvent = undoService.startCopilotOperation(""); + return [4, context.sync()]; + case 3: + _a.sent(); + if (shouldWaitForEvent.value) { + return [2, waitForEventPromise]; + } + else { + resolver = undefined; + } + return [3, 5]; + case 4: + e_1 = _a.sent(); + resolver = undefined; + throw e_1; + case 5: return [2]; + } + }); + }); + } + Undo.startCopilotOperation = startCopilotOperation; + function endCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.endCopilotOperation(""); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + Undo.endCopilotOperation = endCopilotOperation; + })(Undo = OfficeFirstParty.Undo || (OfficeFirstParty.Undo = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var Office; +(function (Office) { + var dialogPage; + (function (dialogPage_1) { + function close() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.close(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.close = close; + function readyToShow() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.readyToShow(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.readyToShow = readyToShow; + function onShow(callback) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.onOnShowEvent.add(callback); + removeListener = function () { + dialogPage.onOnShowEvent.remove(callback); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + dialogPage_1.onShow = onShow; + function sendMessageToHost(message) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.sendMessageToHost(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.sendMessageToHost = sendMessageToHost; + })(dialogPage = Office.dialogPage || (Office.dialogPage = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var UserFeedback; + (function (UserFeedback) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function CollectUserFeedback(feedbacktype, uiType, featureArea, options) { + return __awaiter(this, void 0, void 0, function () { + var context, userFeedbackService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.collectUserFeedback(feedbacktype, uiType, featureArea, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + UserFeedback.CollectUserFeedback = CollectUserFeedback; + function onUserFeedbackUIDismissed(listener) { + return __awaiter(this, void 0, void 0, function () { + var callback, context, userFeedbackService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + callback = function (args) { + if (listener) { + var isFeedbackSent = args.isFeedbackSent; + listener(isFeedbackSent); + } + return null; + }; + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.onUserFeedbackUIDismissed.add(callback); + return [4, userFeedbackService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + userFeedbackService.onUserFeedbackUIDismissed.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + UserFeedback.onUserFeedbackUIDismissed = onUserFeedbackUIDismissed; + })(UserFeedback = OfficeFirstParty.UserFeedback || (OfficeFirstParty.UserFeedback = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var _BeginExcel = "_BeginExcel"; +var Excel; +(function (Excel) { + var Base64EncodingType; + (function (Base64EncodingType) { + Base64EncodingType["JPG"] = "JPG"; + Base64EncodingType["PNG"] = "PNG"; + })(Base64EncodingType = Excel.Base64EncodingType || (Excel.Base64EncodingType = {})); + var BlockedErrorCellValueSubType; + (function (BlockedErrorCellValueSubType) { + BlockedErrorCellValueSubType["unknown"] = "Unknown"; + BlockedErrorCellValueSubType["dataTypeRestrictedDomain"] = "DataTypeRestrictedDomain"; + BlockedErrorCellValueSubType["dataTypePrivacySetting"] = "DataTypePrivacySetting"; + BlockedErrorCellValueSubType["dataTypeUnsupportedApp"] = "DataTypeUnsupportedApp"; + BlockedErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BlockedErrorCellValueSubType["richDataLinkDisabled"] = "RichDataLinkDisabled"; + BlockedErrorCellValueSubType["signInError"] = "SignInError"; + BlockedErrorCellValueSubType["noLicense"] = "NoLicense"; + })(BlockedErrorCellValueSubType = Excel.BlockedErrorCellValueSubType || (Excel.BlockedErrorCellValueSubType = {})); + var BusyErrorCellValueSubType; + (function (BusyErrorCellValueSubType) { + BusyErrorCellValueSubType["unknown"] = "Unknown"; + BusyErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BusyErrorCellValueSubType["loadingImage"] = "LoadingImage"; + })(BusyErrorCellValueSubType = Excel.BusyErrorCellValueSubType || (Excel.BusyErrorCellValueSubType = {})); + var CalcErrorCellValueSubType; + (function (CalcErrorCellValueSubType) { + CalcErrorCellValueSubType["unknown"] = "Unknown"; + CalcErrorCellValueSubType["arrayOfArrays"] = "ArrayOfArrays"; + CalcErrorCellValueSubType["arrayOfRanges"] = "ArrayOfRanges"; + CalcErrorCellValueSubType["emptyArray"] = "EmptyArray"; + CalcErrorCellValueSubType["unsupportedLifting"] = "UnsupportedLifting"; + CalcErrorCellValueSubType["dataTableReferencedPendingFormula"] = "DataTableReferencedPendingFormula"; + CalcErrorCellValueSubType["tooManyCells"] = "TooManyCells"; + CalcErrorCellValueSubType["lambdaInCell"] = "LambdaInCell"; + CalcErrorCellValueSubType["tooDeeplyNested"] = "TooDeeplyNested"; + CalcErrorCellValueSubType["textOverflow"] = "TextOverflow"; + })(CalcErrorCellValueSubType = Excel.CalcErrorCellValueSubType || (Excel.CalcErrorCellValueSubType = {})); + var EntityCardLayoutType; + (function (EntityCardLayoutType) { + EntityCardLayoutType["entity"] = "Entity"; + EntityCardLayoutType["array"] = "Array"; + })(EntityCardLayoutType = Excel.EntityCardLayoutType || (Excel.EntityCardLayoutType = {})); + var EntityCompactLayoutIcons; + (function (EntityCompactLayoutIcons) { + EntityCompactLayoutIcons["generic"] = "Generic"; + EntityCompactLayoutIcons["accessibility"] = "Accessibility"; + EntityCompactLayoutIcons["airplane"] = "Airplane"; + EntityCompactLayoutIcons["airplaneTakeOff"] = "AirplaneTakeOff"; + EntityCompactLayoutIcons["album"] = "Album"; + EntityCompactLayoutIcons["alert"] = "Alert"; + EntityCompactLayoutIcons["alertUrgent"] = "AlertUrgent"; + EntityCompactLayoutIcons["animal"] = "Animal"; + EntityCompactLayoutIcons["animalCat"] = "AnimalCat"; + EntityCompactLayoutIcons["animalDog"] = "AnimalDog"; + EntityCompactLayoutIcons["animalRabbit"] = "AnimalRabbit"; + EntityCompactLayoutIcons["animalTurtle"] = "AnimalTurtle"; + EntityCompactLayoutIcons["appFolder"] = "AppFolder"; + EntityCompactLayoutIcons["appGeneric"] = "AppGeneric"; + EntityCompactLayoutIcons["apple"] = "Apple"; + EntityCompactLayoutIcons["approvalsApp"] = "ApprovalsApp"; + EntityCompactLayoutIcons["archive"] = "Archive"; + EntityCompactLayoutIcons["archiveMultiple"] = "ArchiveMultiple"; + EntityCompactLayoutIcons["arrowTrendingLines"] = "ArrowTrendingLines"; + EntityCompactLayoutIcons["art"] = "Art"; + EntityCompactLayoutIcons["atom"] = "Atom"; + EntityCompactLayoutIcons["attach"] = "Attach"; + EntityCompactLayoutIcons["automobile"] = "Automobile"; + EntityCompactLayoutIcons["autosum"] = "Autosum"; + EntityCompactLayoutIcons["backpack"] = "Backpack"; + EntityCompactLayoutIcons["badge"] = "Badge"; + EntityCompactLayoutIcons["balloon"] = "Balloon"; + EntityCompactLayoutIcons["bank"] = "Bank"; + EntityCompactLayoutIcons["barcodeScanner"] = "BarcodeScanner"; + EntityCompactLayoutIcons["basketball"] = "Basketball"; + EntityCompactLayoutIcons["battery0"] = "Battery0"; + EntityCompactLayoutIcons["battery10"] = "Battery10"; + EntityCompactLayoutIcons["beach"] = "Beach"; + EntityCompactLayoutIcons["beaker"] = "Beaker"; + EntityCompactLayoutIcons["bed"] = "Bed"; + EntityCompactLayoutIcons["binFull"] = "BinFull"; + EntityCompactLayoutIcons["bird"] = "Bird"; + EntityCompactLayoutIcons["bluetooth"] = "Bluetooth"; + EntityCompactLayoutIcons["board"] = "Board"; + EntityCompactLayoutIcons["boardGames"] = "BoardGames"; + EntityCompactLayoutIcons["book"] = "Book"; + EntityCompactLayoutIcons["bookmark"] = "Bookmark"; + EntityCompactLayoutIcons["bookmarkMultiple"] = "BookmarkMultiple"; + EntityCompactLayoutIcons["bot"] = "Bot"; + EntityCompactLayoutIcons["bowlChopsticks"] = "BowlChopsticks"; + EntityCompactLayoutIcons["box"] = "Box"; + EntityCompactLayoutIcons["boxMultiple"] = "BoxMultiple"; + EntityCompactLayoutIcons["brainCircuit"] = "BrainCircuit"; + EntityCompactLayoutIcons["branch"] = "Branch"; + EntityCompactLayoutIcons["branchFork"] = "BranchFork"; + EntityCompactLayoutIcons["branchRequest"] = "BranchRequest"; + EntityCompactLayoutIcons["bridge"] = "Bridge"; + EntityCompactLayoutIcons["briefcase"] = "Briefcase"; + EntityCompactLayoutIcons["briefcaseMedical"] = "BriefcaseMedical"; + EntityCompactLayoutIcons["broadActivityFeed"] = "BroadActivityFeed"; + EntityCompactLayoutIcons["broom"] = "Broom"; + EntityCompactLayoutIcons["bug"] = "Bug"; + EntityCompactLayoutIcons["building"] = "Building"; + EntityCompactLayoutIcons["buildingBank"] = "BuildingBank"; + EntityCompactLayoutIcons["buildingFactory"] = "BuildingFactory"; + EntityCompactLayoutIcons["buildingGovernment"] = "BuildingGovernment"; + EntityCompactLayoutIcons["buildingHome"] = "BuildingHome"; + EntityCompactLayoutIcons["buildingLighthouse"] = "BuildingLighthouse"; + EntityCompactLayoutIcons["buildingMultiple"] = "BuildingMultiple"; + EntityCompactLayoutIcons["buildingRetail"] = "BuildingRetail"; + EntityCompactLayoutIcons["buildingRetailMore"] = "BuildingRetailMore"; + EntityCompactLayoutIcons["buildingRetailToolbox"] = "BuildingRetailToolbox"; + EntityCompactLayoutIcons["buildingShop"] = "BuildingShop"; + EntityCompactLayoutIcons["buildingSkyscraper"] = "BuildingSkyscraper"; + EntityCompactLayoutIcons["calculator"] = "Calculator"; + EntityCompactLayoutIcons["calendarLtr"] = "CalendarLtr"; + EntityCompactLayoutIcons["calendarRtl"] = "CalendarRtl"; + EntityCompactLayoutIcons["call"] = "Call"; + EntityCompactLayoutIcons["calligraphyPen"] = "CalligraphyPen"; + EntityCompactLayoutIcons["camera"] = "Camera"; + EntityCompactLayoutIcons["cameraDome"] = "CameraDome"; + EntityCompactLayoutIcons["car"] = "Car"; + EntityCompactLayoutIcons["cart"] = "Cart"; + EntityCompactLayoutIcons["cat"] = "Cat"; + EntityCompactLayoutIcons["certificate"] = "Certificate"; + EntityCompactLayoutIcons["chartMultiple"] = "ChartMultiple"; + EntityCompactLayoutIcons["chat"] = "Chat"; + EntityCompactLayoutIcons["chatMultiple"] = "ChatMultiple"; + EntityCompactLayoutIcons["chatVideo"] = "ChatVideo"; + EntityCompactLayoutIcons["check"] = "Check"; + EntityCompactLayoutIcons["checkboxChecked"] = "CheckboxChecked"; + EntityCompactLayoutIcons["checkboxUnchecked"] = "CheckboxUnchecked"; + EntityCompactLayoutIcons["checkmark"] = "Checkmark"; + EntityCompactLayoutIcons["chess"] = "Chess"; + EntityCompactLayoutIcons["city"] = "City"; + EntityCompactLayoutIcons["class"] = "Class"; + EntityCompactLayoutIcons["classification"] = "Classification"; + EntityCompactLayoutIcons["clipboard"] = "Clipboard"; + EntityCompactLayoutIcons["clipboardDataBar"] = "ClipboardDataBar"; + EntityCompactLayoutIcons["clipboardPulse"] = "ClipboardPulse"; + EntityCompactLayoutIcons["clipboardTask"] = "ClipboardTask"; + EntityCompactLayoutIcons["clock"] = "Clock"; + EntityCompactLayoutIcons["clockAlarm"] = "ClockAlarm"; + EntityCompactLayoutIcons["cloud"] = "Cloud"; + EntityCompactLayoutIcons["cloudWords"] = "CloudWords"; + EntityCompactLayoutIcons["code"] = "Code"; + EntityCompactLayoutIcons["collections"] = "Collections"; + EntityCompactLayoutIcons["comment"] = "Comment"; + EntityCompactLayoutIcons["commentMultiple"] = "CommentMultiple"; + EntityCompactLayoutIcons["communication"] = "Communication"; + EntityCompactLayoutIcons["compassNorthwest"] = "CompassNorthwest"; + EntityCompactLayoutIcons["conferenceRoom"] = "ConferenceRoom"; + EntityCompactLayoutIcons["connector"] = "Connector"; + EntityCompactLayoutIcons["constellation"] = "Constellation"; + EntityCompactLayoutIcons["contactCard"] = "ContactCard"; + EntityCompactLayoutIcons["cookies"] = "Cookies"; + EntityCompactLayoutIcons["couch"] = "Couch"; + EntityCompactLayoutIcons["creditCardPerson"] = "CreditCardPerson"; + EntityCompactLayoutIcons["creditCardToolbox"] = "CreditCardToolbox"; + EntityCompactLayoutIcons["cube"] = "Cube"; + EntityCompactLayoutIcons["cubeMultiple"] = "CubeMultiple"; + EntityCompactLayoutIcons["cubeTree"] = "CubeTree"; + EntityCompactLayoutIcons["currencyDollarEuro"] = "CurrencyDollarEuro"; + EntityCompactLayoutIcons["currencyDollarRupee"] = "CurrencyDollarRupee"; + EntityCompactLayoutIcons["dataArea"] = "DataArea"; + EntityCompactLayoutIcons["database"] = "Database"; + EntityCompactLayoutIcons["databaseMultiple"] = "DatabaseMultiple"; + EntityCompactLayoutIcons["dataFunnel"] = "DataFunnel"; + EntityCompactLayoutIcons["dataHistogram"] = "DataHistogram"; + EntityCompactLayoutIcons["dataLine"] = "DataLine"; + EntityCompactLayoutIcons["dataPie"] = "DataPie"; + EntityCompactLayoutIcons["dataScatter"] = "DataScatter"; + EntityCompactLayoutIcons["dataSunburst"] = "DataSunburst"; + EntityCompactLayoutIcons["dataTreemap"] = "DataTreemap"; + EntityCompactLayoutIcons["dataWaterfall"] = "DataWaterfall"; + EntityCompactLayoutIcons["dataWhisker"] = "DataWhisker"; + EntityCompactLayoutIcons["dentist"] = "Dentist"; + EntityCompactLayoutIcons["designIdeas"] = "DesignIdeas"; + EntityCompactLayoutIcons["desktop"] = "Desktop"; + EntityCompactLayoutIcons["desktopMac"] = "DesktopMac"; + EntityCompactLayoutIcons["developerBoard"] = "DeveloperBoard"; + EntityCompactLayoutIcons["deviceMeetingRoom"] = "DeviceMeetingRoom"; + EntityCompactLayoutIcons["diagram"] = "Diagram"; + EntityCompactLayoutIcons["dialpad"] = "Dialpad"; + EntityCompactLayoutIcons["diamond"] = "Diamond"; + EntityCompactLayoutIcons["dinosaur"] = "Dinosaur"; + EntityCompactLayoutIcons["directions"] = "Directions"; + EntityCompactLayoutIcons["disaster"] = "Disaster"; + EntityCompactLayoutIcons["diversity"] = "Diversity"; + EntityCompactLayoutIcons["dNA"] = "DNA"; + EntityCompactLayoutIcons["doctor"] = "Doctor"; + EntityCompactLayoutIcons["document"] = "Document"; + EntityCompactLayoutIcons["documentData"] = "DocumentData"; + EntityCompactLayoutIcons["documentLandscape"] = "DocumentLandscape"; + EntityCompactLayoutIcons["documentMultiple"] = "DocumentMultiple"; + EntityCompactLayoutIcons["documentPdf"] = "DocumentPdf"; + EntityCompactLayoutIcons["documentQueue"] = "DocumentQueue"; + EntityCompactLayoutIcons["documentText"] = "DocumentText"; + EntityCompactLayoutIcons["dog"] = "Dog"; + EntityCompactLayoutIcons["door"] = "Door"; + EntityCompactLayoutIcons["doorTag"] = "DoorTag"; + EntityCompactLayoutIcons["drafts"] = "Drafts"; + EntityCompactLayoutIcons["drama"] = "Drama"; + EntityCompactLayoutIcons["drinkBeer"] = "DrinkBeer"; + EntityCompactLayoutIcons["drinkCoffee"] = "DrinkCoffee"; + EntityCompactLayoutIcons["drinkMargarita"] = "DrinkMargarita"; + EntityCompactLayoutIcons["drinkToGo"] = "DrinkToGo"; + EntityCompactLayoutIcons["drinkWine"] = "DrinkWine"; + EntityCompactLayoutIcons["driveTrain"] = "DriveTrain"; + EntityCompactLayoutIcons["drop"] = "Drop"; + EntityCompactLayoutIcons["dualScreen"] = "DualScreen"; + EntityCompactLayoutIcons["dumbbell"] = "Dumbbell"; + EntityCompactLayoutIcons["earth"] = "Earth"; + EntityCompactLayoutIcons["emoji"] = "Emoji"; + EntityCompactLayoutIcons["emojiAngry"] = "EmojiAngry"; + EntityCompactLayoutIcons["emojiHand"] = "EmojiHand"; + EntityCompactLayoutIcons["emojiLaugh"] = "EmojiLaugh"; + EntityCompactLayoutIcons["emojiMeh"] = "EmojiMeh"; + EntityCompactLayoutIcons["emojiMultiple"] = "EmojiMultiple"; + EntityCompactLayoutIcons["emojiSad"] = "EmojiSad"; + EntityCompactLayoutIcons["emojiSadSlight"] = "EmojiSadSlight"; + EntityCompactLayoutIcons["emojiSmileSlight"] = "EmojiSmileSlight"; + EntityCompactLayoutIcons["emojiSparkle"] = "EmojiSparkle"; + EntityCompactLayoutIcons["emojiSurprise"] = "EmojiSurprise"; + EntityCompactLayoutIcons["engine"] = "Engine"; + EntityCompactLayoutIcons["eraser"] = "Eraser"; + EntityCompactLayoutIcons["eye"] = "Eye"; + EntityCompactLayoutIcons["eyedropper"] = "Eyedropper"; + EntityCompactLayoutIcons["fax"] = "Fax"; + EntityCompactLayoutIcons["fingerprint"] = "Fingerprint"; + EntityCompactLayoutIcons["firstAid"] = "FirstAid"; + EntityCompactLayoutIcons["flag"] = "Flag"; + EntityCompactLayoutIcons["flash"] = "Flash"; + EntityCompactLayoutIcons["flashlight"] = "Flashlight"; + EntityCompactLayoutIcons["flow"] = "Flow"; + EntityCompactLayoutIcons["flowchart"] = "Flowchart"; + EntityCompactLayoutIcons["folder"] = "Folder"; + EntityCompactLayoutIcons["folderOpen"] = "FolderOpen"; + EntityCompactLayoutIcons["folderOpenVertical"] = "FolderOpenVertical"; + EntityCompactLayoutIcons["folderPerson"] = "FolderPerson"; + EntityCompactLayoutIcons["folderZip"] = "FolderZip"; + EntityCompactLayoutIcons["food"] = "Food"; + EntityCompactLayoutIcons["foodApple"] = "FoodApple"; + EntityCompactLayoutIcons["foodCake"] = "FoodCake"; + EntityCompactLayoutIcons["foodEgg"] = "FoodEgg"; + EntityCompactLayoutIcons["foodGrains"] = "FoodGrains"; + EntityCompactLayoutIcons["foodPizza"] = "FoodPizza"; + EntityCompactLayoutIcons["foodToast"] = "FoodToast"; + EntityCompactLayoutIcons["galaxy"] = "Galaxy"; + EntityCompactLayoutIcons["games"] = "Games"; + EntityCompactLayoutIcons["ganttChart"] = "GanttChart"; + EntityCompactLayoutIcons["gas"] = "Gas"; + EntityCompactLayoutIcons["gasPump"] = "GasPump"; + EntityCompactLayoutIcons["gauge"] = "Gauge"; + EntityCompactLayoutIcons["gavel"] = "Gavel"; + EntityCompactLayoutIcons["gift"] = "Gift"; + EntityCompactLayoutIcons["giftCard"] = "GiftCard"; + EntityCompactLayoutIcons["glasses"] = "Glasses"; + EntityCompactLayoutIcons["globe"] = "Globe"; + EntityCompactLayoutIcons["globeSurface"] = "GlobeSurface"; + EntityCompactLayoutIcons["grid"] = "Grid"; + EntityCompactLayoutIcons["gridDots"] = "GridDots"; + EntityCompactLayoutIcons["gridKanban"] = "GridKanban"; + EntityCompactLayoutIcons["guardian"] = "Guardian"; + EntityCompactLayoutIcons["guest"] = "Guest"; + EntityCompactLayoutIcons["guitar"] = "Guitar"; + EntityCompactLayoutIcons["handLeft"] = "HandLeft"; + EntityCompactLayoutIcons["handRight"] = "HandRight"; + EntityCompactLayoutIcons["handshake"] = "Handshake"; + EntityCompactLayoutIcons["hardDrive"] = "HardDrive"; + EntityCompactLayoutIcons["hatGraduation"] = "HatGraduation"; + EntityCompactLayoutIcons["headphones"] = "Headphones"; + EntityCompactLayoutIcons["headphonesSoundWave"] = "HeadphonesSoundWave"; + EntityCompactLayoutIcons["headset"] = "Headset"; + EntityCompactLayoutIcons["headsetVr"] = "HeadsetVr"; + EntityCompactLayoutIcons["heart"] = "Heart"; + EntityCompactLayoutIcons["heartBroken"] = "HeartBroken"; + EntityCompactLayoutIcons["heartCircle"] = "HeartCircle"; + EntityCompactLayoutIcons["heartHuman"] = "HeartHuman"; + EntityCompactLayoutIcons["heartPulse"] = "HeartPulse"; + EntityCompactLayoutIcons["history"] = "History"; + EntityCompactLayoutIcons["home"] = "Home"; + EntityCompactLayoutIcons["homeMore"] = "HomeMore"; + EntityCompactLayoutIcons["homePerson"] = "HomePerson"; + EntityCompactLayoutIcons["icons"] = "Icons"; + EntityCompactLayoutIcons["image"] = "Image"; + EntityCompactLayoutIcons["imageGlobe"] = "ImageGlobe"; + EntityCompactLayoutIcons["imageMultiple"] = "ImageMultiple"; + EntityCompactLayoutIcons["iot"] = "Iot"; + EntityCompactLayoutIcons["joystick"] = "Joystick"; + EntityCompactLayoutIcons["justice"] = "Justice"; + EntityCompactLayoutIcons["key"] = "Key"; + EntityCompactLayoutIcons["keyboard"] = "Keyboard"; + EntityCompactLayoutIcons["keyboardLayoutSplit"] = "KeyboardLayoutSplit"; + EntityCompactLayoutIcons["keyMultiple"] = "KeyMultiple"; + EntityCompactLayoutIcons["languages"] = "Languages"; + EntityCompactLayoutIcons["laptop"] = "Laptop"; + EntityCompactLayoutIcons["lasso"] = "Lasso"; + EntityCompactLayoutIcons["launcherSettings"] = "LauncherSettings"; + EntityCompactLayoutIcons["layer"] = "Layer"; + EntityCompactLayoutIcons["leaf"] = "Leaf"; + EntityCompactLayoutIcons["leafOne"] = "LeafOne"; + EntityCompactLayoutIcons["leafThree"] = "LeafThree"; + EntityCompactLayoutIcons["leafTwo"] = "LeafTwo"; + EntityCompactLayoutIcons["library"] = "Library"; + EntityCompactLayoutIcons["lightbulb"] = "Lightbulb"; + EntityCompactLayoutIcons["lightbulbFilament"] = "LightbulbFilament"; + EntityCompactLayoutIcons["likert"] = "Likert"; + EntityCompactLayoutIcons["link"] = "Link"; + EntityCompactLayoutIcons["localLanguage"] = "LocalLanguage"; + EntityCompactLayoutIcons["location"] = "Location"; + EntityCompactLayoutIcons["lockClosed"] = "LockClosed"; + EntityCompactLayoutIcons["lockMultiple"] = "LockMultiple"; + EntityCompactLayoutIcons["lockOpen"] = "LockOpen"; + EntityCompactLayoutIcons["lottery"] = "Lottery"; + EntityCompactLayoutIcons["luggage"] = "Luggage"; + EntityCompactLayoutIcons["mail"] = "Mail"; + EntityCompactLayoutIcons["mailInbox"] = "MailInbox"; + EntityCompactLayoutIcons["mailMultiple"] = "MailMultiple"; + EntityCompactLayoutIcons["map"] = "Map"; + EntityCompactLayoutIcons["mapPin"] = "MapPin"; + EntityCompactLayoutIcons["markdown"] = "Markdown"; + EntityCompactLayoutIcons["mathFormula"] = "MathFormula"; + EntityCompactLayoutIcons["mathSymbols"] = "MathSymbols"; + EntityCompactLayoutIcons["max"] = "Max"; + EntityCompactLayoutIcons["megaphone"] = "Megaphone"; + EntityCompactLayoutIcons["megaphoneLoud"] = "MegaphoneLoud"; + EntityCompactLayoutIcons["mention"] = "Mention"; + EntityCompactLayoutIcons["mic"] = "Mic"; + EntityCompactLayoutIcons["microscope"] = "Microscope"; + EntityCompactLayoutIcons["midi"] = "Midi"; + EntityCompactLayoutIcons["molecule"] = "Molecule"; + EntityCompactLayoutIcons["money"] = "Money"; + EntityCompactLayoutIcons["moneyHand"] = "MoneyHand"; + EntityCompactLayoutIcons["mountain"] = "Mountain"; + EntityCompactLayoutIcons["movieCamera"] = "MovieCamera"; + EntityCompactLayoutIcons["moviesAndTv"] = "MoviesAndTv"; + EntityCompactLayoutIcons["musicNote"] = "MusicNote"; + EntityCompactLayoutIcons["musicNote1"] = "MusicNote1"; + EntityCompactLayoutIcons["musicNote2"] = "MusicNote2"; + EntityCompactLayoutIcons["myLocation"] = "MyLocation"; + EntityCompactLayoutIcons["nByN"] = "NByN"; + EntityCompactLayoutIcons["nByOne"] = "NByOne"; + EntityCompactLayoutIcons["news"] = "News"; + EntityCompactLayoutIcons["notablePeople"] = "NotablePeople"; + EntityCompactLayoutIcons["note"] = "Note"; + EntityCompactLayoutIcons["notebook"] = "Notebook"; + EntityCompactLayoutIcons["notepad"] = "Notepad"; + EntityCompactLayoutIcons["notepadPerson"] = "NotepadPerson"; + EntityCompactLayoutIcons["oneByN"] = "OneByN"; + EntityCompactLayoutIcons["oneByOne"] = "OneByOne"; + EntityCompactLayoutIcons["options"] = "Options"; + EntityCompactLayoutIcons["organization"] = "Organization"; + EntityCompactLayoutIcons["organizationHorizontal"] = "OrganizationHorizontal"; + EntityCompactLayoutIcons["oval"] = "Oval"; + EntityCompactLayoutIcons["paintBrush"] = "PaintBrush"; + EntityCompactLayoutIcons["paintBucket"] = "PaintBucket"; + EntityCompactLayoutIcons["partlySunnyWeather"] = "PartlySunnyWeather"; + EntityCompactLayoutIcons["password"] = "Password"; + EntityCompactLayoutIcons["patch"] = "Patch"; + EntityCompactLayoutIcons["patient"] = "Patient"; + EntityCompactLayoutIcons["payment"] = "Payment"; + EntityCompactLayoutIcons["pen"] = "Pen"; + EntityCompactLayoutIcons["pentagon"] = "Pentagon"; + EntityCompactLayoutIcons["people"] = "People"; + EntityCompactLayoutIcons["peopleAudience"] = "PeopleAudience"; + EntityCompactLayoutIcons["peopleCall"] = "PeopleCall"; + EntityCompactLayoutIcons["peopleCommunity"] = "PeopleCommunity"; + EntityCompactLayoutIcons["peopleMoney"] = "PeopleMoney"; + EntityCompactLayoutIcons["peopleQueue"] = "PeopleQueue"; + EntityCompactLayoutIcons["peopleTeam"] = "PeopleTeam"; + EntityCompactLayoutIcons["peopleToolbox"] = "PeopleToolbox"; + EntityCompactLayoutIcons["person"] = "Person"; + EntityCompactLayoutIcons["personBoard"] = "PersonBoard"; + EntityCompactLayoutIcons["personCall"] = "PersonCall"; + EntityCompactLayoutIcons["personChat"] = "PersonChat"; + EntityCompactLayoutIcons["personFeedback"] = "PersonFeedback"; + EntityCompactLayoutIcons["personSupport"] = "PersonSupport"; + EntityCompactLayoutIcons["personVoice"] = "PersonVoice"; + EntityCompactLayoutIcons["phone"] = "Phone"; + EntityCompactLayoutIcons["phoneDesktop"] = "PhoneDesktop"; + EntityCompactLayoutIcons["phoneLaptop"] = "PhoneLaptop"; + EntityCompactLayoutIcons["phoneShake"] = "PhoneShake"; + EntityCompactLayoutIcons["phoneTablet"] = "PhoneTablet"; + EntityCompactLayoutIcons["phoneVibrate"] = "PhoneVibrate"; + EntityCompactLayoutIcons["photoFilter"] = "PhotoFilter"; + EntityCompactLayoutIcons["pi"] = "Pi"; + EntityCompactLayoutIcons["pictureInPicture"] = "PictureInPicture"; + EntityCompactLayoutIcons["pilates"] = "Pilates"; + EntityCompactLayoutIcons["pill"] = "Pill"; + EntityCompactLayoutIcons["pin"] = "Pin"; + EntityCompactLayoutIcons["pipeline"] = "Pipeline"; + EntityCompactLayoutIcons["planet"] = "Planet"; + EntityCompactLayoutIcons["playingCards"] = "PlayingCards"; + EntityCompactLayoutIcons["plugConnected"] = "PlugConnected"; + EntityCompactLayoutIcons["plugDisconnected"] = "PlugDisconnected"; + EntityCompactLayoutIcons["pointScan"] = "PointScan"; + EntityCompactLayoutIcons["poll"] = "Poll"; + EntityCompactLayoutIcons["power"] = "Power"; + EntityCompactLayoutIcons["predictions"] = "Predictions"; + EntityCompactLayoutIcons["premium"] = "Premium"; + EntityCompactLayoutIcons["presenter"] = "Presenter"; + EntityCompactLayoutIcons["previewLink"] = "PreviewLink"; + EntityCompactLayoutIcons["print"] = "Print"; + EntityCompactLayoutIcons["production"] = "Production"; + EntityCompactLayoutIcons["prohibited"] = "Prohibited"; + EntityCompactLayoutIcons["projectionScreen"] = "ProjectionScreen"; + EntityCompactLayoutIcons["protocolHandler"] = "ProtocolHandler"; + EntityCompactLayoutIcons["pulse"] = "Pulse"; + EntityCompactLayoutIcons["pulseSquare"] = "PulseSquare"; + EntityCompactLayoutIcons["puzzlePiece"] = "PuzzlePiece"; + EntityCompactLayoutIcons["qrCode"] = "QrCode"; + EntityCompactLayoutIcons["radar"] = "Radar"; + EntityCompactLayoutIcons["ram"] = "Ram"; + EntityCompactLayoutIcons["readingList"] = "ReadingList"; + EntityCompactLayoutIcons["realEstate"] = "RealEstate"; + EntityCompactLayoutIcons["receipt"] = "Receipt"; + EntityCompactLayoutIcons["reward"] = "Reward"; + EntityCompactLayoutIcons["rhombus"] = "Rhombus"; + EntityCompactLayoutIcons["ribbon"] = "Ribbon"; + EntityCompactLayoutIcons["ribbonStar"] = "RibbonStar"; + EntityCompactLayoutIcons["roadCone"] = "RoadCone"; + EntityCompactLayoutIcons["rocket"] = "Rocket"; + EntityCompactLayoutIcons["router"] = "Router"; + EntityCompactLayoutIcons["rss"] = "Rss"; + EntityCompactLayoutIcons["ruler"] = "Ruler"; + EntityCompactLayoutIcons["run"] = "Run"; + EntityCompactLayoutIcons["running"] = "Running"; + EntityCompactLayoutIcons["satellite"] = "Satellite"; + EntityCompactLayoutIcons["save"] = "Save"; + EntityCompactLayoutIcons["savings"] = "Savings"; + EntityCompactLayoutIcons["scales"] = "Scales"; + EntityCompactLayoutIcons["scan"] = "Scan"; + EntityCompactLayoutIcons["scratchpad"] = "Scratchpad"; + EntityCompactLayoutIcons["screenPerson"] = "ScreenPerson"; + EntityCompactLayoutIcons["screenshot"] = "Screenshot"; + EntityCompactLayoutIcons["search"] = "Search"; + EntityCompactLayoutIcons["serialPort"] = "SerialPort"; + EntityCompactLayoutIcons["server"] = "Server"; + EntityCompactLayoutIcons["serverMultiple"] = "ServerMultiple"; + EntityCompactLayoutIcons["serviceBell"] = "ServiceBell"; + EntityCompactLayoutIcons["settings"] = "Settings"; + EntityCompactLayoutIcons["shapes"] = "Shapes"; + EntityCompactLayoutIcons["shield"] = "Shield"; + EntityCompactLayoutIcons["shieldTask"] = "ShieldTask"; + EntityCompactLayoutIcons["shoppingBag"] = "ShoppingBag"; + EntityCompactLayoutIcons["signature"] = "Signature"; + EntityCompactLayoutIcons["sim"] = "Sim"; + EntityCompactLayoutIcons["sleep"] = "Sleep"; + EntityCompactLayoutIcons["smartwatch"] = "Smartwatch"; + EntityCompactLayoutIcons["soundSource"] = "SoundSource"; + EntityCompactLayoutIcons["soundWaveCircle"] = "SoundWaveCircle"; + EntityCompactLayoutIcons["sparkle"] = "Sparkle"; + EntityCompactLayoutIcons["speaker0"] = "Speaker0"; + EntityCompactLayoutIcons["speaker2"] = "Speaker2"; + EntityCompactLayoutIcons["sport"] = "Sport"; + EntityCompactLayoutIcons["sportAmericanFootball"] = "SportAmericanFootball"; + EntityCompactLayoutIcons["sportBaseball"] = "SportBaseball"; + EntityCompactLayoutIcons["sportBasketball"] = "SportBasketball"; + EntityCompactLayoutIcons["sportHockey"] = "SportHockey"; + EntityCompactLayoutIcons["sportSoccer"] = "SportSoccer"; + EntityCompactLayoutIcons["squareMultiple"] = "SquareMultiple"; + EntityCompactLayoutIcons["squareShadow"] = "SquareShadow"; + EntityCompactLayoutIcons["squaresNested"] = "SquaresNested"; + EntityCompactLayoutIcons["stack"] = "Stack"; + EntityCompactLayoutIcons["stackStar"] = "StackStar"; + EntityCompactLayoutIcons["star"] = "Star"; + EntityCompactLayoutIcons["starFilled"] = "StarFilled"; + EntityCompactLayoutIcons["starHalf"] = "StarHalf"; + EntityCompactLayoutIcons["starLineHorizontal3"] = "StarLineHorizontal3"; + EntityCompactLayoutIcons["starOneQuarter"] = "StarOneQuarter"; + EntityCompactLayoutIcons["starThreeQuarter"] = "StarThreeQuarter"; + EntityCompactLayoutIcons["status"] = "Status"; + EntityCompactLayoutIcons["steps"] = "Steps"; + EntityCompactLayoutIcons["stethoscope"] = "Stethoscope"; + EntityCompactLayoutIcons["sticker"] = "Sticker"; + EntityCompactLayoutIcons["storage"] = "Storage"; + EntityCompactLayoutIcons["stream"] = "Stream"; + EntityCompactLayoutIcons["streamInput"] = "StreamInput"; + EntityCompactLayoutIcons["streamInputOutput"] = "StreamInputOutput"; + EntityCompactLayoutIcons["streamOutput"] = "StreamOutput"; + EntityCompactLayoutIcons["styleGuide"] = "StyleGuide"; + EntityCompactLayoutIcons["subGrid"] = "SubGrid"; + EntityCompactLayoutIcons["subtitles"] = "Subtitles"; + EntityCompactLayoutIcons["surfaceEarbuds"] = "SurfaceEarbuds"; + EntityCompactLayoutIcons["surfaceHub"] = "SurfaceHub"; + EntityCompactLayoutIcons["symbols"] = "Symbols"; + EntityCompactLayoutIcons["syringe"] = "Syringe"; + EntityCompactLayoutIcons["system"] = "System"; + EntityCompactLayoutIcons["tabDesktop"] = "TabDesktop"; + EntityCompactLayoutIcons["tabInprivateAccount"] = "TabInprivateAccount"; + EntityCompactLayoutIcons["table"] = "Table"; + EntityCompactLayoutIcons["tableImage"] = "TableImage"; + EntityCompactLayoutIcons["tableMultiple"] = "TableMultiple"; + EntityCompactLayoutIcons["tablet"] = "Tablet"; + EntityCompactLayoutIcons["tabs"] = "Tabs"; + EntityCompactLayoutIcons["tag"] = "Tag"; + EntityCompactLayoutIcons["tagCircle"] = "TagCircle"; + EntityCompactLayoutIcons["tagMultiple"] = "TagMultiple"; + EntityCompactLayoutIcons["target"] = "Target"; + EntityCompactLayoutIcons["targetArrow"] = "TargetArrow"; + EntityCompactLayoutIcons["teddy"] = "Teddy"; + EntityCompactLayoutIcons["temperature"] = "Temperature"; + EntityCompactLayoutIcons["tent"] = "Tent"; + EntityCompactLayoutIcons["tetrisApp"] = "TetrisApp"; + EntityCompactLayoutIcons["textbox"] = "Textbox"; + EntityCompactLayoutIcons["textQuote"] = "TextQuote"; + EntityCompactLayoutIcons["thinking"] = "Thinking"; + EntityCompactLayoutIcons["thumbDislike"] = "ThumbDislike"; + EntityCompactLayoutIcons["thumbLike"] = "ThumbLike"; + EntityCompactLayoutIcons["ticketDiagonal"] = "TicketDiagonal"; + EntityCompactLayoutIcons["ticketHorizontal"] = "TicketHorizontal"; + EntityCompactLayoutIcons["timeAndWeather"] = "TimeAndWeather"; + EntityCompactLayoutIcons["timeline"] = "Timeline"; + EntityCompactLayoutIcons["timer"] = "Timer"; + EntityCompactLayoutIcons["toolbox"] = "Toolbox"; + EntityCompactLayoutIcons["topSpeed"] = "TopSpeed"; + EntityCompactLayoutIcons["translate"] = "Translate"; + EntityCompactLayoutIcons["transmission"] = "Transmission"; + EntityCompactLayoutIcons["treeDeciduous"] = "TreeDeciduous"; + EntityCompactLayoutIcons["treeEvergreen"] = "TreeEvergreen"; + EntityCompactLayoutIcons["trophy"] = "Trophy"; + EntityCompactLayoutIcons["tv"] = "Tv"; + EntityCompactLayoutIcons["tvUsb"] = "TvUsb"; + EntityCompactLayoutIcons["umbrella"] = "Umbrella"; + EntityCompactLayoutIcons["usbPlug"] = "UsbPlug"; + EntityCompactLayoutIcons["usbStick"] = "UsbStick"; + EntityCompactLayoutIcons["vault"] = "Vault"; + EntityCompactLayoutIcons["vehicleBicycle"] = "VehicleBicycle"; + EntityCompactLayoutIcons["vehicleBus"] = "VehicleBus"; + EntityCompactLayoutIcons["vehicleCab"] = "VehicleCab"; + EntityCompactLayoutIcons["vehicleCar"] = "VehicleCar"; + EntityCompactLayoutIcons["vehicleCarCollision"] = "VehicleCarCollision"; + EntityCompactLayoutIcons["vehicleCarProfileLtr"] = "VehicleCarProfileLtr"; + EntityCompactLayoutIcons["vehicleCarProfileRtl"] = "VehicleCarProfileRtl"; + EntityCompactLayoutIcons["vehicleShip"] = "VehicleShip"; + EntityCompactLayoutIcons["vehicleSubway"] = "VehicleSubway"; + EntityCompactLayoutIcons["vehicleTruck"] = "VehicleTruck"; + EntityCompactLayoutIcons["vehicleTruckBag"] = "VehicleTruckBag"; + EntityCompactLayoutIcons["vehicleTruckCube"] = "VehicleTruckCube"; + EntityCompactLayoutIcons["vehicleTruckProfile"] = "VehicleTruckProfile"; + EntityCompactLayoutIcons["video"] = "Video"; + EntityCompactLayoutIcons["video360"] = "Video360"; + EntityCompactLayoutIcons["videoChat"] = "VideoChat"; + EntityCompactLayoutIcons["videoClip"] = "VideoClip"; + EntityCompactLayoutIcons["videoClipMultiple"] = "VideoClipMultiple"; + EntityCompactLayoutIcons["videoPerson"] = "VideoPerson"; + EntityCompactLayoutIcons["videoRecording"] = "VideoRecording"; + EntityCompactLayoutIcons["videoSecurity"] = "VideoSecurity"; + EntityCompactLayoutIcons["viewDesktop"] = "ViewDesktop"; + EntityCompactLayoutIcons["viewDesktopMobile"] = "ViewDesktopMobile"; + EntityCompactLayoutIcons["violin"] = "Violin"; + EntityCompactLayoutIcons["virtualNetwork"] = "VirtualNetwork"; + EntityCompactLayoutIcons["voicemail"] = "Voicemail"; + EntityCompactLayoutIcons["vote"] = "Vote"; + EntityCompactLayoutIcons["walkieTalkie"] = "WalkieTalkie"; + EntityCompactLayoutIcons["wallet"] = "Wallet"; + EntityCompactLayoutIcons["walletCreditCard"] = "WalletCreditCard"; + EntityCompactLayoutIcons["wallpaper"] = "Wallpaper"; + EntityCompactLayoutIcons["wand"] = "Wand"; + EntityCompactLayoutIcons["warning"] = "Warning"; + EntityCompactLayoutIcons["weatherBlowingSnow"] = "WeatherBlowingSnow"; + EntityCompactLayoutIcons["weatherCloudy"] = "WeatherCloudy"; + EntityCompactLayoutIcons["weatherDrizzle"] = "WeatherDrizzle"; + EntityCompactLayoutIcons["weatherDuststorm"] = "WeatherDuststorm"; + EntityCompactLayoutIcons["weatherFog"] = "WeatherFog"; + EntityCompactLayoutIcons["weatherHailDay"] = "WeatherHailDay"; + EntityCompactLayoutIcons["weatherHailNight"] = "WeatherHailNight"; + EntityCompactLayoutIcons["weatherHaze"] = "WeatherHaze"; + EntityCompactLayoutIcons["weatherMoon"] = "WeatherMoon"; + EntityCompactLayoutIcons["weatherPartlyCloudyDay"] = "WeatherPartlyCloudyDay"; + EntityCompactLayoutIcons["weatherPartlyCloudyNight"] = "WeatherPartlyCloudyNight"; + EntityCompactLayoutIcons["weatherRain"] = "WeatherRain"; + EntityCompactLayoutIcons["weatherRainShowersDay"] = "WeatherRainShowersDay"; + EntityCompactLayoutIcons["weatherRainShowersNight"] = "WeatherRainShowersNight"; + EntityCompactLayoutIcons["weatherRainSnow"] = "WeatherRainSnow"; + EntityCompactLayoutIcons["weatherSnow"] = "WeatherSnow"; + EntityCompactLayoutIcons["weatherSnowflake"] = "WeatherSnowflake"; + EntityCompactLayoutIcons["weatherSnowShowerDay"] = "WeatherSnowShowerDay"; + EntityCompactLayoutIcons["weatherSnowShowerNight"] = "WeatherSnowShowerNight"; + EntityCompactLayoutIcons["weatherSqualls"] = "WeatherSqualls"; + EntityCompactLayoutIcons["weatherSunnyHigh"] = "WeatherSunnyHigh"; + EntityCompactLayoutIcons["weatherSunnyLow"] = "WeatherSunnyLow"; + EntityCompactLayoutIcons["weatherThunderstorm"] = "WeatherThunderstorm"; + EntityCompactLayoutIcons["webAsset"] = "WebAsset"; + EntityCompactLayoutIcons["whiteboard"] = "Whiteboard"; + EntityCompactLayoutIcons["wifi1"] = "Wifi1"; + EntityCompactLayoutIcons["wifi2"] = "Wifi2"; + EntityCompactLayoutIcons["window"] = "Window"; + EntityCompactLayoutIcons["windowMultiple"] = "WindowMultiple"; + EntityCompactLayoutIcons["windowWrench"] = "WindowWrench"; + EntityCompactLayoutIcons["wrench"] = "Wrench"; + EntityCompactLayoutIcons["wrenchScrewdriver"] = "WrenchScrewdriver"; + EntityCompactLayoutIcons["xray"] = "Xray"; + EntityCompactLayoutIcons["yoga"] = "Yoga"; + })(EntityCompactLayoutIcons = Excel.EntityCompactLayoutIcons || (Excel.EntityCompactLayoutIcons = {})); + var ReferenceValueType; + (function (ReferenceValueType) { + ReferenceValueType["array"] = "Array"; + ReferenceValueType["entity"] = "Entity"; + ReferenceValueType["root"] = "Root"; + })(ReferenceValueType = Excel.ReferenceValueType || (Excel.ReferenceValueType = {})); + var CellValueType; + (function (CellValueType) { + CellValueType["array"] = "Array"; + CellValueType["boolean"] = "Boolean"; + CellValueType["double"] = "Double"; + CellValueType["entity"] = "Entity"; + CellValueType["empty"] = "Empty"; + CellValueType["error"] = "Error"; + CellValueType["formattedNumber"] = "FormattedNumber"; + CellValueType["linkedEntity"] = "LinkedEntity"; + CellValueType["localImage"] = "LocalImage"; + CellValueType["reference"] = "Reference"; + CellValueType["string"] = "String"; + CellValueType["notAvailable"] = "NotAvailable"; + CellValueType["webImage"] = "WebImage"; + })(CellValueType = Excel.CellValueType || (Excel.CellValueType = {})); + var ConnectErrorCellValueSubType; + (function (ConnectErrorCellValueSubType) { + ConnectErrorCellValueSubType["unknown"] = "Unknown"; + ConnectErrorCellValueSubType["serviceError"] = "ServiceError"; + ConnectErrorCellValueSubType["externalLinks"] = "ExternalLinks"; + ConnectErrorCellValueSubType["externalLinksNonCloudLocation"] = "ExternalLinksNonCloudLocation"; + ConnectErrorCellValueSubType["dataTypeNoConnection"] = "DataTypeNoConnection"; + ConnectErrorCellValueSubType["dataTypeServiceError"] = "DataTypeServiceError"; + ConnectErrorCellValueSubType["missingContent"] = "MissingContent"; + ConnectErrorCellValueSubType["requestThrottle"] = "RequestThrottle"; + ConnectErrorCellValueSubType["externalLinksFailedToRefresh"] = "ExternalLinksFailedToRefresh"; + ConnectErrorCellValueSubType["externalLinksAccessFailed"] = "ExternalLinksAccessFailed"; + ConnectErrorCellValueSubType["externalLinksServerError"] = "ExternalLinksServerError"; + ConnectErrorCellValueSubType["externalLinksInvalidRequest"] = "ExternalLinksInvalidRequest"; + ConnectErrorCellValueSubType["externalLinksUnAuthenticated"] = "ExternalLinksUnAuthenticated"; + ConnectErrorCellValueSubType["externalLinksThrottledByHost"] = "ExternalLinksThrottledByHost"; + ConnectErrorCellValueSubType["externalLinksFileTooLarge"] = "ExternalLinksFileTooLarge"; + ConnectErrorCellValueSubType["outdatedLinkedEntity"] = "OutdatedLinkedEntity"; + ConnectErrorCellValueSubType["genericServerError"] = "GenericServerError"; + })(ConnectErrorCellValueSubType = Excel.ConnectErrorCellValueSubType || (Excel.ConnectErrorCellValueSubType = {})); + var ErrorCellValueType; + (function (ErrorCellValueType) { + ErrorCellValueType["blocked"] = "Blocked"; + ErrorCellValueType["busy"] = "Busy"; + ErrorCellValueType["calc"] = "Calc"; + ErrorCellValueType["connect"] = "Connect"; + ErrorCellValueType["div0"] = "Div0"; + ErrorCellValueType["external"] = "External"; + ErrorCellValueType["field"] = "Field"; + ErrorCellValueType["gettingData"] = "GettingData"; + ErrorCellValueType["notAvailable"] = "NotAvailable"; + ErrorCellValueType["name"] = "Name"; + ErrorCellValueType["null"] = "Null"; + ErrorCellValueType["num"] = "Num"; + ErrorCellValueType["placeholder"] = "Placeholder"; + ErrorCellValueType["ref"] = "Ref"; + ErrorCellValueType["spill"] = "Spill"; + ErrorCellValueType["value"] = "Value"; + })(ErrorCellValueType = Excel.ErrorCellValueType || (Excel.ErrorCellValueType = {})); + var ExternalErrorCellValueSubType; + (function (ExternalErrorCellValueSubType) { + ExternalErrorCellValueSubType["unknown"] = "Unknown"; + })(ExternalErrorCellValueSubType = Excel.ExternalErrorCellValueSubType || (Excel.ExternalErrorCellValueSubType = {})); + var FieldErrorCellValueSubType; + (function (FieldErrorCellValueSubType) { + FieldErrorCellValueSubType["unknown"] = "Unknown"; + FieldErrorCellValueSubType["webImageMissingFilePart"] = "WebImageMissingFilePart"; + FieldErrorCellValueSubType["dataProviderError"] = "DataProviderError"; + FieldErrorCellValueSubType["richValueRelMissingFilePart"] = "RichValueRelMissingFilePart"; + })(FieldErrorCellValueSubType = Excel.FieldErrorCellValueSubType || (Excel.FieldErrorCellValueSubType = {})); + var NumErrorCellValueSubType; + (function (NumErrorCellValueSubType) { + NumErrorCellValueSubType["unknown"] = "Unknown"; + NumErrorCellValueSubType["arrayTooLarge"] = "ArrayTooLarge"; + })(NumErrorCellValueSubType = Excel.NumErrorCellValueSubType || (Excel.NumErrorCellValueSubType = {})); + var RefErrorCellValueSubType; + (function (RefErrorCellValueSubType) { + RefErrorCellValueSubType["unknown"] = "Unknown"; + RefErrorCellValueSubType["externalLinksStructuredRef"] = "ExternalLinksStructuredRef"; + RefErrorCellValueSubType["externalLinksCalculatedRef"] = "ExternalLinksCalculatedRef"; + })(RefErrorCellValueSubType = Excel.RefErrorCellValueSubType || (Excel.RefErrorCellValueSubType = {})); + var SpillErrorCellValueSubType; + (function (SpillErrorCellValueSubType) { + SpillErrorCellValueSubType["unknown"] = "Unknown"; + SpillErrorCellValueSubType["collision"] = "Collision"; + SpillErrorCellValueSubType["indeterminateSize"] = "IndeterminateSize"; + SpillErrorCellValueSubType["worksheetEdge"] = "WorksheetEdge"; + SpillErrorCellValueSubType["outOfMemoryWhileCalc"] = "OutOfMemoryWhileCalc"; + SpillErrorCellValueSubType["table"] = "Table"; + SpillErrorCellValueSubType["mergedCell"] = "MergedCell"; + })(SpillErrorCellValueSubType = Excel.SpillErrorCellValueSubType || (Excel.SpillErrorCellValueSubType = {})); + var ValueErrorCellValueSubType; + (function (ValueErrorCellValueSubType) { + ValueErrorCellValueSubType["unknown"] = "Unknown"; + ValueErrorCellValueSubType["vlookupColumnIndexLessThanOne"] = "VlookupColumnIndexLessThanOne"; + ValueErrorCellValueSubType["vlookupResultNotFound"] = "VlookupResultNotFound"; + ValueErrorCellValueSubType["hlookupRowIndexLessThanOne"] = "HlookupRowIndexLessThanOne"; + ValueErrorCellValueSubType["hlookupResultNotFound"] = "HlookupResultNotFound"; + ValueErrorCellValueSubType["coerceStringToNumberInvalid"] = "CoerceStringToNumberInvalid"; + ValueErrorCellValueSubType["coerceStringToBoolInvalid"] = "CoerceStringToBoolInvalid"; + ValueErrorCellValueSubType["coerceStringToInvalidType"] = "CoerceStringToInvalidType"; + ValueErrorCellValueSubType["subArrayStartRowMissingEndRowNot"] = "SubArrayStartRowMissingEndRowNot"; + ValueErrorCellValueSubType["subArrayStartColumnMissingEndColumnNot"] = "SubArrayStartColumnMissingEndColumnNot"; + ValueErrorCellValueSubType["invalidImageUrl"] = "InvalidImageUrl"; + ValueErrorCellValueSubType["stockHistoryNonTradingDays"] = "StockHistoryNonTradingDays"; + ValueErrorCellValueSubType["stockHistoryNotAStock"] = "StockHistoryNotAStock"; + ValueErrorCellValueSubType["stockHistoryInvalidDate"] = "StockHistoryInvalidDate"; + ValueErrorCellValueSubType["stockHistoryEndBeforeStart"] = "StockHistoryEndBeforeStart"; + ValueErrorCellValueSubType["stockHistoryStartInFuture"] = "StockHistoryStartInFuture"; + ValueErrorCellValueSubType["stockHistoryInvalidEnum"] = "StockHistoryInvalidEnum"; + ValueErrorCellValueSubType["stockHistoryOnlyDateRequested"] = "StockHistoryOnlyDateRequested"; + ValueErrorCellValueSubType["stockHistoryNotFound"] = "StockHistoryNotFound"; + ValueErrorCellValueSubType["lambdaWrongParamCount"] = "LambdaWrongParamCount"; + })(ValueErrorCellValueSubType = Excel.ValueErrorCellValueSubType || (Excel.ValueErrorCellValueSubType = {})); + function _runOnRegularOrWacContext(options, callback) { + var context = isOfficePlatform("OfficeOnline") + ? new WacSpecificRequestContext() + : new RequestContext(); + onBeforeExcelRun(options, context); + return OfficeExtension.CoreUtility.Promise.resolve() + .then(function () { return callback(context); }) + .then(context.sync); + } + var WacSpecificRequestContext = (function (_super) { + __extends(WacSpecificRequestContext, _super); + function WacSpecificRequestContext(url) { + var _this = _super.call(this, url) || this; + _this._customData = "WacPartition"; + _this.m_wacWorkbook = _createRootServiceObject(WacWorkbook, _this); + _this._rootObject = _this.m_wacWorkbook; + _this._rootObjectPropertyName = "wacWorkbook"; + return _this; + } + Object.defineProperty(WacSpecificRequestContext.prototype, "wacWorkbook", { + get: function () { + return this.m_wacWorkbook; + }, + enumerable: true, + configurable: true + }); + return WacSpecificRequestContext; + }(OfficeCore.RequestContext)); + var WacWorkbook = (function (_super) { + __extends(WacWorkbook, _super); + function WacWorkbook() { + return _super !== null && _super.apply(this, arguments) || this; + } + WacWorkbook.prototype.createAndOpenWorkbook = function (base64) { + _invokeMethod(this, "CreateAndOpenWorkbook", 0, [base64], 0, 0); + }; + return WacWorkbook; + }(OfficeExtension.ClientObject)); + function createWorkbook(base64) { + _throwIfApiNotSupported("Excel.createWorkbook", _defaultApiSetName, "1.8", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + if (context instanceof WacSpecificRequestContext) { + context.wacWorkbook.createAndOpenWorkbook(base64); + } + else { + context.workbook.application.createWorkbook(base64).open(); + } + }); + } + Excel.createWorkbook = createWorkbook; + function lowerCaseFirst(str) { + return str[0].toLowerCase() + str.slice(1); + } + var iconSets = ["ThreeArrows", + "ThreeArrowsGray", + "ThreeFlags", + "ThreeTrafficLights1", + "ThreeTrafficLights2", + "ThreeSigns", + "ThreeSymbols", + "ThreeSymbols2", + "FourArrows", + "FourArrowsGray", + "FourRedToBlack", + "FourRating", + "FourTrafficLights", + "FiveArrows", + "FiveArrowsGray", + "FiveRating", + "FiveQuarters", + "ThreeStars", + "ThreeTriangles", + "FiveBoxes"]; + var iconNames = [["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], + ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], + ["RedFlag", "YellowFlag", "GreenFlag"], + ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], + ["RedDiamond", "YellowTriangle", "GreenCircle"], + ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], + ["RedCross", "YellowExclamation", "GreenCheck"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], + ["OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], + ["SilverStar", "HalfGoldStar", "GoldStar"], + ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], + ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; + Excel.icons = {}; + iconSets.map(function (title, i) { + var camelTitle = lowerCaseFirst(title); + Excel.icons[camelTitle] = []; + iconNames[i].map(function (iconName, j) { + iconName = lowerCaseFirst(iconName); + var obj = { set: title, index: j }; + Excel.icons[camelTitle].push(obj); + Excel.icons[camelTitle][iconName] = obj; + }); + }); + function setRangePropertiesInBulk(range, propertyName, values, apiFlags) { + var maxCellCount = 1500; + if (Array.isArray(values) && values.length > 0 && Array.isArray(values[0]) && (values.length * values[0].length > maxCellCount) && isExcel1_3OrAbove()) { + var maxRowCount = Math.max(1, Math.round(maxCellCount / values[0].length)); + range._ValidateArraySize(values.length, values[0].length); + for (var startRowIndex = 0; startRowIndex < values.length; startRowIndex += maxRowCount) { + var rowCount = maxRowCount; + if (startRowIndex + rowCount > values.length) { + rowCount = values.length - startRowIndex; + } + var chunk = range.getRow(startRowIndex).untrack().getBoundingRect(range.getRow(startRowIndex + rowCount - 1).untrack()).untrack(); + var valueSlice = values.slice(startRowIndex, startRowIndex + rowCount); + _invokeSetProperty(chunk, propertyName, valueSlice, apiFlags != null ? apiFlags : 0); + } + return true; + } + return false; + } + function isExcelApiSetSupported(version) { + return OfficeExtension.Utility.isSetSupported("ExcelApi", version.toString()); + } + function isExcel1_3OrAbove() { + return isExcelApiSetSupported(1.3); + } + function isOfficePlatform(platform) { + if (typeof (window) !== "undefined" && window.Office && window.Office.context) { + return window.Office.context.platform === platform; + } + return false; + } + var OperationStatus; + (function (OperationStatus) { + OperationStatus["NotStarted"] = "notStarted"; + OperationStatus["Running"] = "running"; + OperationStatus["Succeeded"] = "succeeded"; + OperationStatus["Failed"] = "failed"; + })(OperationStatus || (OperationStatus = {})); + var HttpStatusCode; + (function (HttpStatusCode) { + HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK"; + HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created"; + HttpStatusCode[HttpStatusCode["Accepted"] = 202] = "Accepted"; + HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent"; + HttpStatusCode[HttpStatusCode["HighestSuccessCode"] = 299] = "HighestSuccessCode"; + HttpStatusCode[HttpStatusCode["TooManyRequests"] = 429] = "TooManyRequests"; + HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError"; + HttpStatusCode[HttpStatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpStatusCode || (HttpStatusCode = {})); + var SessionOperation; + (function (SessionOperation) { + SessionOperation["Close"] = "Session.close"; + SessionOperation["CommitChanges"] = "Session.commitChanges"; + SessionOperation["Create"] = "Session.resolveRequestUrlAndHeaderInfo"; + SessionOperation["Refresh"] = "Session.refreshSession"; + })(SessionOperation = Excel.SessionOperation || (Excel.SessionOperation = {})); + var Session = (function () { + function Session(workbookUrl, requestHeaders, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.persistChanges, persistChanges = _c === void 0 ? true : _c, _d = _b.commitExplicitly, commitExplicitly = _d === void 0 ? true : _d; + this.m_requestId = ''; + this.m_workbookUrl = !workbookUrl ? '' : this.ensureUrlFormatEndWithSlash(workbookUrl); + this.m_requestHeaders = !requestHeaders ? {} : requestHeaders; + this.m_persistChanges = persistChanges; + this.m_commitExplicitly = commitExplicitly; + } + Object.defineProperty(Session.prototype, "requestId", { + get: function () { + return this.m_requestId; + }, + enumerable: true, + configurable: true + }); + Session.prototype.close = function () { + var _this = this; + if (this.m_requestUrlAndHeaderInfo && + !OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + var url = this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url) + Session.CLOSE_SESSION; + var req = { + method: 'POST', + url: url, + headers: this.m_requestUrlAndHeaderInfo.headers, + body: '' + }; + return OfficeExtension.HttpUtility.sendRequest(req).then(function (resp) { + if (resp.statusCode !== HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(resp, SessionOperation.Close); + } + _this.m_requestUrlAndHeaderInfo = null; + for (var key in _this.m_requestHeaders) { + if (key.toLowerCase() === Session.WorkbookSessionIdHeaderNameLower) { + delete _this.m_requestHeaders[key]; + break; + } + } + }); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + Session.prototype.commitChanges = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (!this.m_commitExplicitly) { + throw this.createError(HttpStatusCode.InternalServerError, 'Can not call commitChanges() if commitExplicitly is not set.', SessionOperation.CommitChanges); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.CommitChanges); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.CommitChanges); + } + var commitChangesRequestInfo = this.createCommitChangesRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(commitChangesRequestInfo).then(function (commitChangesResponseInfo) { + var statusCode = commitChangesResponseInfo.statusCode; + if (statusCode === HttpStatusCode.Accepted) { + return _this.delay(Session.POLL_DELAY) + .then(function (_) { + return _this.pollResourceLocation(_this.getHeaderIgnoreCase(commitChangesResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.CommitChanges, additionalRequestHeaders); + }) + .then(function (commitChangesResourceLocationResponseInfo) { + var operationStatusBody = JSON.parse(commitChangesResourceLocationResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(commitChangesResourceLocationResponseInfo, SessionOperation.CommitChanges); + } + return _this.parseCooldownTime(commitChangesResourceLocationResponseInfo); + }); + } + if (statusCode >= HttpStatusCode.OK && statusCode <= HttpStatusCode.HighestSuccessCode) { + return _this.parseCooldownTime(commitChangesResponseInfo); + } + throw _this.createErrorFromResponseInfo(commitChangesResponseInfo, SessionOperation.CommitChanges); + }); + }; + Session.prototype._resolveRequestUrlAndHeaderInfo = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (this.m_requestUrlAndHeaderInfo) { + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (this.getHeaderIgnoreCase(this.m_requestHeaders, Session.WorkbookSessionIdHeaderNameLower)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + var sessionRequestInfo = this.createAsyncGraphSessionRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(sessionRequestInfo).then(function (sessionResponseInfo) { + _this.m_requestId = _this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.REQUEST_ID_HEADER); + if (sessionResponseInfo.statusCode !== HttpStatusCode.Accepted && + sessionResponseInfo.statusCode !== HttpStatusCode.Created) { + throw _this.createErrorFromResponseInfo(sessionResponseInfo, SessionOperation.Create); + } + if (sessionResponseInfo.statusCode === HttpStatusCode.Created) { + _this.formatRequestUrlAndHeaderInfo(sessionResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + } + return _this.delay(Session.POLL_DELAY) + .then(function (_) { return _this.pollResourceLocation(_this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.Create, additionalRequestHeaders); }) + .then(function (operationStatusResponseInfo) { + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, SessionOperation.Create); + } + var sessionResourceLocationRequestInfo = { + method: 'GET', + url: operationStatusBody.resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: _this.getHeaderIgnoreCase(_this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined + }; + return OfficeExtension.HttpUtility.sendRequest(sessionResourceLocationRequestInfo).then(function (sessionResourceLocationResponseInfo) { + _this.formatRequestUrlAndHeaderInfo(sessionResourceLocationResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + }); + }); + }); + }; + Session.prototype.refreshSession = function () { + var _this = this; + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.Refresh); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.Refresh); + } + var refreshSessionRequestInfo = this.createRefreshSessionRequestInfo(); + return OfficeExtension.HttpUtility.sendRequest(refreshSessionRequestInfo).then(function (refreshSessionResponseInfo) { + var statusCode = refreshSessionResponseInfo.statusCode; + if (statusCode != HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(refreshSessionResponseInfo, SessionOperation.Refresh); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + }; + Session.prototype.getHeaderIgnoreCase = function (headers, headerName) { + var foundHeaders = Object.keys(headers).filter(function (key) { return key.toLowerCase() === headerName.toLowerCase(); }); + return foundHeaders.length > 0 ? headers[foundHeaders[0]] : undefined; + }; + Session.prototype.createCommitChangesRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + var url = this.getCorrectGraphVersionUrl() + Session.COMMIT_CHANGES; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.createAsyncGraphSessionRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + var url = this.getCorrectGraphVersionUrl() + Session.CREATE_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: { persistChanges: this.m_persistChanges, commitExplicitly: this.m_commitExplicitly } + }; + }; + Session.prototype.createRefreshSessionRequestInfo = function () { + var url = this.getCorrectGraphVersionUrl() + Session.REFRESH_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.getCorrectGraphVersionUrl = function () { + return this.m_workbookUrl.replace(new RegExp('graph\.microsoft\.com\/.*?\/'), "graph.microsoft.com/" + Session.ASYNC_API_GRAPH_VERSION + "/"); + }; + Session.prototype.pollResourceLocation = function (resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (pollAttempt === void 0) { + pollAttempt = 0; + } + if (pollAttempt >= Session.MAX_POLL_ATTEMPTS) { + throw this.createError(HttpStatusCode.InternalServerError, 'Timout while polling for the resource location.', sessionOperation); + } + var operationStatusRequestInfo = { + method: 'GET', + url: resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: this.getHeaderIgnoreCase(this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined + }; + return OfficeExtension.HttpUtility.sendRequest(operationStatusRequestInfo).then(function (operationStatusResponseInfo) { + if (operationStatusResponseInfo.statusCode !== HttpStatusCode.OK) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + } + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + switch (operationStatusBody.status) { + case OperationStatus.Succeeded: + return operationStatusResponseInfo; + case OperationStatus.Failed: + return operationStatusResponseInfo; + case OperationStatus.NotStarted: + case OperationStatus.Running: + return _this.delay(Session.POLL_DELAY).then(function (_) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + }); + default: + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, sessionOperation); + } + }); + }; + Session.prototype.parseCooldownTime = function (responseInfo) { + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + return !retryAfter + ? Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER + : parseInt(retryAfter) * 1000; + }; + Session.prototype.formatRequestUrlAndHeaderInfo = function (responseInfo) { + if (responseInfo.statusCode !== HttpStatusCode.OK && responseInfo.statusCode !== HttpStatusCode.Created) { + throw this.createErrorFromResponseInfo(responseInfo, SessionOperation.Create); + } + var session = JSON.parse(responseInfo.body); + var sessionId = session.id; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + headers[Session.WorkbookSessionIdHeaderName] = sessionId; + this.m_requestUrlAndHeaderInfo = { url: this.getCorrectGraphVersionUrl(), headers: headers }; + }; + Session.prototype.ensureUrlFormatEndWithSlash = function (url) { + if (url.charAt(url.length - 1) !== '/') { + url += '/'; + } + return url; + }; + Session.prototype.delay = function (milliseconds) { + return new OfficeExtension.CoreUtility.Promise(function (res, _) { return setTimeout(function () { return res(); }, milliseconds); }); + }; + Session.prototype.createErrorFromResponseInfo = function (responseInfo, locationThrown) { + var err = OfficeExtension.Utility._parseErrorResponse(responseInfo); + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + var data = { + retryAfter: retryAfter, + responseBody: OfficeExtension.Utility._parseErrorResponseBody(responseInfo) + }; + return OfficeExtension.Utility.createRuntimeError(err.errorCode, err.errorMessage, locationThrown, responseInfo.statusCode, data); + }; + Session.prototype.createError = function (code, message, locationThrown) { + return OfficeExtension.Utility.createRuntimeError('' + code, message, locationThrown); + }; + Session.WorkbookSessionIdHeaderName = 'Workbook-Session-Id'; + Session.WorkbookSessionIdHeaderNameLower = 'workbook-session-id'; + Session.ASYNC_API_GRAPH_VERSION = 'beta'; + Session.POLL_DELAY = 10000; + Session.MAX_POLL_ATTEMPTS = 10; + Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER = 10000; + Session.LOCATION_HEADER = 'location'; + Session.AUTHORIZATION_HEADER = 'authorization'; + Session.REQUEST_ID_HEADER = 'request-id'; + Session.RETRY_AFTER_HEADER = 'retry-after'; + Session.PREFER_HEADER = 'Prefer'; + Session.PREFER_HEADER_VAL = 'respond-async'; + Session.CONTENT_TYPE_HEADER = 'Content-Type'; + Session.CONTENT_TYPE_HEADER_VAL = 'application/json'; + Session.CLOSE_SESSION = 'closeSession'; + Session.COMMIT_CHANGES = 'commitChanges'; + Session.CREATE_SESSION = 'createSession'; + Session.REFRESH_SESSION = 'refreshSession'; + return Session; + }()); + Excel.Session = Session; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + var _this = _super.call(this, url) || this; + _this.m_workbook = _createRootServiceObject(Excel.Workbook, _this); + _this._rootObject = _this.m_workbook; + _this._rootObjectPropertyName = "workbook"; + return _this; + } + RequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext = 5004; + if (officeJsErrorCode === ooeInvalidApiCallInContext) { + response.ErrorCode = ErrorCodes.invalidOperationInCellEditMode; + response.HttpStatusCode = 400; + response.ErrorMessage = OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; + Object.defineProperty(RequestContext.prototype, "workbook", { + get: function () { + return this.m_workbook; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "application", { + get: function () { + return this.workbook.application; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "runtime", { + get: function () { + return this.workbook._Runtime; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeCore.RequestContext)); + Excel.RequestContext = RequestContext; + var Recorder = (function () { + function Recorder() { + } + Recorder.enableMacroRecordingEvent = function (context) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = true; + var registerEventHandler = function (context) { + context.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent] = "true"; + context.workbook.onRecordingStateChangedEvent.add(function (args) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = args.recording; + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + if (context !== undefined && context !== null) { + return registerEventHandler(context); + } + return run(function (context) { + return registerEventHandler(context); + }); + }; + return Recorder; + }()); + Excel.Recorder = Recorder; + function onBeforeExcelRun(options, context) { + var excelOptions = options; + if (excelOptions.delayForCellEdit && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + context._requestFlagModifier |= 64; + } + else { + context._requestFlagModifier &= ~64; + } + if (excelOptions._makerSafe) { + context._requestFlagModifier |= 1024; + } + } + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.run = run; + function runBatch(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.runBatch = runBatch; + Excel._RedirectV1APIs = false; + Excel._V1APIMap = { + "GetDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GetSelectedDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.getSelectedData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GoToByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.gotoById(callArgs); } + }, + "AddColumnsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddColumns(callArgs); } + }, + "AddFromSelectionAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromSelection(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromNamedItemAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromNamedItem(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromPromptAsync": { + call: function (ctx, callArgs) { + if (versionNumberIsEarlierThan({ ios: { desiredMajor: 2, desiredMinor: 20, desiredBuild: 0 } }) && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + ctx._requestFlagModifier |= 64; + } + return ctx.workbook._V1Api.bindingAddFromPrompt(callArgs); + }, + postprocess: postprocessBindingDescriptor + }, + "AddRowsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddRows(callArgs); } + }, + "GetByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetById(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "ReleaseByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingReleaseById(callArgs); } + }, + "GetAllAsync": { + call: function (ctx) { return ctx.workbook._V1Api.bindingGetAll(); }, + postprocess: function (response) { + return response.bindings.map(function (descriptor) { return postprocessBindingDescriptor(descriptor); }); + } + }, + "DeleteAllDataValuesAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingDeleteAllDataValues(callArgs); } + }, + "SetSelectedDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.setSelectedData(callArgs); } + }, + "SetDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetData(callArgs); } + }, + "SetFormatsAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetFormats(callArgs); } + }, + "SetTableOptionsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetTableOptions(callArgs); } + }, + "ClearFormatsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } + }, + "GetFilePropertiesAsync": { + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } + } + }; + function postprocessBindingDescriptor(response) { + var bindingDescriptor = { + BindingColumnCount: response.bindingColumnCount, + BindingId: response.bindingId, + BindingRowCount: response.bindingRowCount, + bindingType: response.bindingType, + HasHeaders: response.hasHeaders + }; + return window.OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, window.Microsoft.Office.WebExtension.context.document); + } + function getDataCommonPostprocess(response, callArgs) { + var isPlainData = response.headers == null; + var data; + if (isPlainData) { + data = response.rows; + } + else { + data = response; + } + data = window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data === undefined ? null : data; + } + function versionNumberIsEarlierThan(versionsForPlatformMap) { + var hasOfficeVersion = typeof (window) !== "undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var platform = window.Office.context.diagnostics.platform.toLowerCase(); + if (platform === 'officeonline') { + return false; + } + var versionForCurrentPlatform = versionsForPlatformMap[platform]; + if (versionForCurrentPlatform == null) { + versionForCurrentPlatform = versionsForPlatformMap.general; + } + var version = window.Office.context.diagnostics.version; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(version); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (major < versionForCurrentPlatform.desiredMajor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor < versionForCurrentPlatform.desiredMinor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor === versionForCurrentPlatform.desiredMinor && build < versionForCurrentPlatform.desiredBuild) { + var revisionString = result[4]; + var devBuildValidation = /^3\d\d\d+$/; + var isDevBuild = devBuildValidation.exec(revisionString); + if (isDevBuild) { + return true; + } + } + } + return false; + } + var ALWAYS_TRUE_PLACEHOLDER_OVERRIDE = true; + var _CC; + (function (_CC) { + _CC.office10EventIdBindingSelectionChangedEvent = 3; + _CC.office10EventIdBindingDataChangedEvent = 4; + _CC.office10EventIdDocumentSelectionChangedEvent = 2; + _CC.office10EventIdRichApiMessageEvent = 5; + _CC.office10EventIdSettingsChangedEvent = 1; + })(_CC = Excel._CC || (Excel._CC = {})); + var _hostName = "Excel"; + var _defaultApiSetName = "ExcelApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var RangeValuesPreviewCustom = (function () { + function RangeValuesPreviewCustom() { + } + Object.defineProperty(RangeValuesPreviewCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return RangeValuesPreviewCustom; + }()); + Excel.RangeValuesPreviewCustom = RangeValuesPreviewCustom; + (function (_CC) { + function Application_SuspendApiCalculationUntilNextSync(thisObj) { + if (isOfficePlatform("Mac") && isExcelApiSetSupported(1.6) && !isExcelApiSetSupported(1.7)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Application_SuspendApiCalculationUntilNextSync = Application_SuspendApiCalculationUntilNextSync; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Workbook_EnableOfficeScriptRecording(thisObj, eventId) { + this.context.eventId = eventId; + return { handled: false }; + } + _CC.Workbook_EnableOfficeScriptRecording = Workbook_EnableOfficeScriptRecording; + function Workbook_RecordAction(thisObj, payload) { + this.context.sdxPayload = payload; + return { handled: false }; + } + _CC.Workbook_RecordAction = Workbook_RecordAction; + function Workbook_SelectionChanged_EventArgsTransform(thisObj, args) { + return { workbook: thisObj }; + } + _CC.Workbook_SelectionChanged_EventArgsTransform = Workbook_SelectionChanged_EventArgsTransform; + function Workbook_WACOperationEvent_EventArgsTransform(thisObj, args) { + var event = { + eventId: args.eventId, + payload: args.payload, + type: Excel.EventType.wacoperationEvent + }; + return event; + } + _CC.Workbook_WACOperationEvent_EventArgsTransform = Workbook_WACOperationEvent_EventArgsTransform; + function Workbook__Message_EventArgsTransform(thisObj, args) { + return { + entries: args.entries, + workbook: thisObj + }; + } + _CC.Workbook__Message_EventArgsTransform = Workbook__Message_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Worksheet_Charts_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Charts_Get = Worksheet_Charts_Get; + function Worksheet_Comments_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Comments_Get = Worksheet_Comments_Get; + function Worksheet_Names_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Names_Get = Worksheet_Names_Get; + function Worksheet_PivotTables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_PivotTables_Get = Worksheet_PivotTables_Get; + function Worksheet_RangeValuesPreview_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_RangeValuesPreview_Get = Worksheet_RangeValuesPreview_Get; + function Worksheet_Shapes_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Shapes_Get = Worksheet_Shapes_Get; + function Worksheet_ShowGridlines_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showGridlines = value; + _invokeSetProperty(thisObj, "Gridlines", value, _calculateApiFlags(2, "ExcelApiUndo", "1.16")); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowGridlines_Set = Worksheet_ShowGridlines_Set; + function Worksheet_ShowHeadings_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showHeadings = value; + _invokeSetProperty(thisObj, "Headings", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowHeadings_Set = Worksheet_ShowHeadings_Set; + function Worksheet_Tables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Tables_Get = Worksheet_Tables_Get; + function Worksheet_Visuals_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Visuals_Get = Worksheet_Visuals_Get; + function Worksheet_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState + }; + return newArgs; + } + _CC.Worksheet_Changed_EventArgsTransform = Worksheet_Changed_EventArgsTransform; + function Worksheet_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.Worksheet_FormatChanged_EventArgsTransform = Worksheet_FormatChanged_EventArgsTransform; + function Worksheet_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.Worksheet_FormulaChanged_EventArgsTransform = Worksheet_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function _overrideWorksheetCollectionEventMethod(thisObj, methodName, apiVersion) { + if ((!isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.12)) || + (isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.11))) { + _throwIfApiNotSupported("WorksheetCollection." + methodName, _defaultApiSetName, apiVersion, _hostName); + _invokeMethod(thisObj, methodName, 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + function WorksheetCollection__RegisterActivatedEvent(thisObj) { + if (!isExcelApiSetSupported(1.9)) { + _throwIfApiNotSupported("WorksheetCollection._RegisterActivatedEvent", _defaultApiSetName, "1.7", _hostName); + _invokeMethod(thisObj, "_RegisterActivatedEvent", 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetCollection__RegisterActivatedEvent = WorksheetCollection__RegisterActivatedEvent; + function WorksheetCollection__RegisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterAddedEvent = WorksheetCollection__RegisterAddedEvent; + function WorksheetCollection__RegisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterColumnSortedEvent = WorksheetCollection__RegisterColumnSortedEvent; + function WorksheetCollection__RegisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__RegisterDataChangedEvent = WorksheetCollection__RegisterDataChangedEvent; + function WorksheetCollection__RegisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterDeletedEvent = WorksheetCollection__RegisterDeletedEvent; + function WorksheetCollection__RegisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterRowSortedEvent = WorksheetCollection__RegisterRowSortedEvent; + function WorksheetCollection__UnregisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterAddedEvent = WorksheetCollection__UnregisterAddedEvent; + function WorksheetCollection__UnregisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterColumnSortedEvent = WorksheetCollection__UnregisterColumnSortedEvent; + function WorksheetCollection__UnregisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__UnregisterDataChangedEvent = WorksheetCollection__UnregisterDataChangedEvent; + function WorksheetCollection__UnregisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterDeletedEvent = WorksheetCollection__UnregisterDeletedEvent; + function WorksheetCollection__UnregisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterRowSortedEvent = WorksheetCollection__UnregisterRowSortedEvent; + function WorksheetCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState + }; + return newArgs; + } + _CC.WorksheetCollection_Changed_EventArgsTransform = WorksheetCollection_Changed_EventArgsTransform; + function WorksheetCollection_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.WorksheetCollection_FormatChanged_EventArgsTransform = WorksheetCollection_FormatChanged_EventArgsTransform; + function WorksheetCollection_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.WorksheetCollection_FormulaChanged_EventArgsTransform = WorksheetCollection_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function WorksheetProtection_Protect(thisObj, options, password) { + if (versionNumberIsEarlierThan({ + mac: { desiredMajor: 16, desiredMinor: 7, desiredBuild: 17101600 }, + ios: { desiredMajor: 2, desiredMinor: 7, desiredBuild: 1016 }, + general: { desiredMajor: 16, desiredMinor: 0, desiredBuild: 8716 } + })) { + _invokeMethod(thisObj, "Protect", 0, [options], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetProtection_Protect = WorksheetProtection_Protect; + })(_CC = Excel._CC || (Excel._CC = {})); + var RangeCustom = (function () { + function RangeCustom() { + } + RangeCustom.prototype._ensureInteger = function (num, methodName) { + if (!(typeof num === "number" && isFinite(num) && Math.floor(num) === num)) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + } + }; + RangeCustom.prototype._getAdjacentRange = function (functionName, count, referenceRange, rowDirection, columnDirection) { + if (count == null) { + count = 1; + } + this._ensureInteger(count, functionName); + var startRange; + var rowOffset = 0; + var columnOffset = 0; + if (count > 0) { + startRange = referenceRange.getOffsetRange(rowDirection, columnDirection); + } + else { + startRange = referenceRange; + rowOffset = rowDirection; + columnOffset = columnDirection; + } + if (Math.abs(count) === 1) { + return startRange; + } + return startRange.getBoundingRect(referenceRange.getOffsetRange(rowDirection * count + rowOffset, columnDirection * count + columnOffset)); + }; + return RangeCustom; + }()); + Excel.RangeCustom = RangeCustom; + (function (_CC) { + function Range_HandleResult(thisObj, value) { + if (!_isUndefined(value["isEntireColumn"])) { + thisObj.m_isEntireColumn = value["isEntireColumn"]; + } + if (!_isUndefined(value["isEntireRow"])) { + thisObj.m_isEntireRow = value["isEntireRow"]; + } + } + _CC.Range_HandleResult = Range_HandleResult; + function Range_GetColumnsAfter(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsAfter", count, thisObj.getLastColumn(), 0, 1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsAfter = Range_GetColumnsAfter; + function Range_GetColumnsBefore(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsBefore", count, thisObj.getColumn(0), 0, -1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsBefore = Range_GetColumnsBefore; + function Range_GetResizedRange(thisObj, deltaRows, deltaColumns) { + if (!isExcel1_3OrAbove()) { + thisObj._ensureInteger(deltaRows, "getResizedRange"); + thisObj._ensureInteger(deltaColumns, "getResizedRange"); + var referenceRange = (deltaRows >= 0 && deltaColumns >= 0) ? thisObj : thisObj.getCell(0, 0); + var result = referenceRange.getBoundingRect(thisObj.getLastCell().getOffsetRange(deltaRows, deltaColumns)); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetResizedRange = Range_GetResizedRange; + function Range_GetRowsAbove(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = thisObj._getAdjacentRange("getRowsAbove", count, thisObj.getRow(0), -1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsAbove = Range_GetRowsAbove; + function Range_GetRowsBelow(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = this._getAdjacentRange("getRowsBelow", count, thisObj.getLastRow(), 1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsBelow = Range_GetRowsBelow; + function Range_Formulas_Set(thisObj, value) { + thisObj.m_formulas = value; + if (setRangePropertiesInBulk(thisObj, "Formulas", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Formulas_Set = Range_Formulas_Set; + function Range_FormulasLocal_Set(thisObj, value) { + thisObj.m_formulasLocal = value; + if (setRangePropertiesInBulk(thisObj, "FormulasLocal", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasLocal_Set = Range_FormulasLocal_Set; + function Range_FormulasR1C1_Set(thisObj, value) { + thisObj.m_formulasR1C1 = value; + if (setRangePropertiesInBulk(thisObj, "FormulasR1C1", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasR1C1_Set = Range_FormulasR1C1_Set; + function Range_NumberFormat_Set(thisObj, value) { + thisObj.m_numberFormat = value; + if (setRangePropertiesInBulk(thisObj, "NumberFormat", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_NumberFormat_Set = Range_NumberFormat_Set; + function Range_Values_Set(thisObj, value) { + thisObj.m_values = value; + if (setRangePropertiesInBulk(thisObj, "Values", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Values_Set = Range_Values_Set; + function Range_ValuesAsJson_Set(thisObj, value) { + thisObj.m_valuesAsJson = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJson", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJson_Set = Range_ValuesAsJson_Set; + function Range_ValuesAsJsonLocal_Set(thisObj, value) { + thisObj.m_valuesAsJsonLocal = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJsonLocal", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJsonLocal_Set = Range_ValuesAsJsonLocal_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function SettingCollection_Add(thisObj, key, value) { + value = _CC._replaceDateWithStringDate(value); + var result = _createMethodObject(Excel.Setting, thisObj, "Add", 0, [key, value], false, true, null, 0); + return { handled: true, result: result }; + } + _CC.SettingCollection_Add = SettingCollection_Add; + function SettingCollection_SettingsChanged_EventArgsTransform(thisObj, args) { + return { + settings: thisObj + }; + } + _CC.SettingCollection_SettingsChanged_EventArgsTransform = SettingCollection_SettingsChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + var DateJSONPrefix = "Date("; + var DateJSONSuffix = ")"; + function _replaceStringDateWithDate(value) { + var strValue = JSON.stringify(value); + value = JSON.parse(strValue, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === DateJSONPrefix && v.slice(-1) === DateJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + return value; + } + function _replaceDateWithStringDate(value) { + var strValue = JSON.stringify(value, function dateReplacer(k, v) { + return (this[k] instanceof Date) ? (DateJSONPrefix + this[k].getTime() + DateJSONSuffix) : v; + }); + value = JSON.parse(strValue); + return value; + } + _CC._replaceDateWithStringDate = _replaceDateWithStringDate; + function Setting_HandleResult(thisObj, value) { + if (!_isUndefined(value["Value"])) { + value["Value"] = _replaceStringDateWithDate(value["Value"]); + } + ; + } + _CC.Setting_HandleResult = Setting_HandleResult; + function Setting_Value_Set(thisObj, value) { + if (!_isNullOrUndefined(value)) { + thisObj.m_value = value; + var newValue = _replaceDateWithStringDate(value); + _invokeSetProperty(thisObj, "Value", newValue, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Setting_Value_Set = Setting_Value_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + var NamedItemCollectionCustom = (function () { + function NamedItemCollectionCustom() { + } + Object.defineProperty(NamedItemCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItemCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return NamedItemCollectionCustom; + }()); + Excel.NamedItemCollectionCustom = NamedItemCollectionCustom; + (function (_CC) { + function Binding_DataChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj + }; + return evt; + } + _CC.Binding_DataChanged_EventArgsTransform = Binding_DataChanged_EventArgsTransform; + function Binding_SelectionChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj, + columnCount: args.columnCount, + rowCount: args.rowCount, + startColumn: args.startColumn, + startRow: args.startRow + }; + return evt; + } + _CC.Binding_SelectionChanged_EventArgsTransform = Binding_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var TableCollectionCustom = (function () { + function TableCollectionCustom() { + } + Object.defineProperty(TableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return TableCollectionCustom; + }()); + Excel.TableCollectionCustom = TableCollectionCustom; + (function (_CC) { + function TableCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.TableCollection_Changed_EventArgsTransform = TableCollection_Changed_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Table_HandleIdResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleIdResult = Table_HandleIdResult; + function Table_HandleResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleResult = Table_HandleResult; + function Table_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.Table_Changed_EventArgsTransform = Table_Changed_EventArgsTransform; + function Table_SelectionChanged_EventArgsTransform(thisObj, args) { + var value = args; + var isAddressNullOrEmpty = (!value.address || value.address.length === 0); + var newArgs = { + type: Excel.EventType.tableSelectionChanged, + isInsideTable: !isAddressNullOrEmpty, + worksheetId: value.worksheetId, + tableId: thisObj.id, + address: value.address + }; + return newArgs; + } + _CC.Table_SelectionChanged_EventArgsTransform = Table_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartCollectionCustom = (function () { + function ChartCollectionCustom() { + } + Object.defineProperty(ChartCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ChartCollectionCustom; + }()); + Excel.ChartCollectionCustom = ChartCollectionCustom; + (function (_CC) { + function ChartCollection_Add(thisObj, type, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); + } + return { handled: false, result: null }; + } + _CC.ChartCollection_Add = ChartCollection_Add; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Chart_SetData(thisObj, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); + } + return { handled: false }; + } + _CC.Chart_SetData = Chart_SetData; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartFillCustom = (function () { + function ChartFillCustom() { + } + ChartFillCustom.prototype.load = function (option) { + _load(this, option); + return this; + }; + return ChartFillCustom; + }()); + Excel.ChartFillCustom = ChartFillCustom; + var VisualCollectionCustom = (function () { + function VisualCollectionCustom() { + } + Object.defineProperty(VisualCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return VisualCollectionCustom; + }()); + Excel.VisualCollectionCustom = VisualCollectionCustom; + (function (_CC) { + function VisualCollection_AgaveVisualUpdate_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: value.type, + payload: value.payload + }; + return newArgs; + } + _CC.VisualCollection_AgaveVisualUpdate_EventArgsTransform = VisualCollection_AgaveVisualUpdate_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Visual_ChangeNotification_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + targetId: value.targetId, + changeType: value.changeType, + payload: value.payload, + type: Excel.EventType.visualChange + }; + return newArgs; + } + _CC.Visual_ChangeNotification_EventArgsTransform = Visual_ChangeNotification_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var PivotTableCollectionCustom = (function () { + function PivotTableCollectionCustom() { + } + Object.defineProperty(PivotTableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return PivotTableCollectionCustom; + }()); + Excel.PivotTableCollectionCustom = PivotTableCollectionCustom; + (function (_CC) { + function PivotLayout_GetColumnLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetColumnLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetColumnLabelRange = PivotLayout_GetColumnLabelRange; + function PivotLayout_GetDataBodyRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetDataBodyRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataBodyRange = PivotLayout_GetDataBodyRange; + function PivotLayout_GetDataHierarchy(thisObj, cell) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + _throwIfApiNotSupported("PivotLayout.getDataHierarchy", _defaultApiSetName, "1.9", _hostName); + var result = _createMethodObject(Excel.DataPivotHierarchy, thisObj, "GetDataHierarchy", 0, [cell], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataHierarchy = PivotLayout_GetDataHierarchy; + function PivotLayout_GetFilterAxisRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetFilterAxisRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetFilterAxisRange = PivotLayout_GetFilterAxisRange; + function PivotLayout_GetRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRange = PivotLayout_GetRange; + function PivotLayout_GetRowLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRowLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRowLabelRange = PivotLayout_GetRowLabelRange; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function PivotField_SortByLabels(thisObj, sortBy) { + if (typeof sortBy === "string") { + sortBy = (sortBy.toLowerCase() === "ascending"); + } + _invokeMethod(thisObj, "SortByLabels", 0, [sortBy], 0, 0); + return { handled: true }; + } + _CC.PivotField_SortByLabels = PivotField_SortByLabels; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormattingService_GetFormatter(thisObj, format) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatting.GetFormatter", "NumberFormatting", "1.1", _hostName); + var result = _createMethodObject(Excel.NumberFormatter, thisObj, "GetFormatter", 0, [format], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormattingService_GetFormatter = NumberFormattingService_GetFormatter; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormatter_Format(thisObj, value) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatter.Format", "NumberFormatting", "1.1", _hostName); + var result = _invokeMethod(thisObj, "Format", 0, [value], 0, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormatter_Format = NumberFormatter_Format; + })(_CC = Excel._CC || (Excel._CC = {})); + var CustomFunctionManagerCustom = (function () { + function CustomFunctionManagerCustom() { + } + CustomFunctionManagerCustom.register = function (metadata, javascript) { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { return Excel.CustomFunctionManager.newObject(context).register(metadata, javascript); }); + }; + CustomFunctionManagerCustom.getStatus = function () { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + var manager = Excel.CustomFunctionManager.newObject(context).load("status"); + return context.sync().then(function () { return manager.status; }); + }); + }; + return CustomFunctionManagerCustom; + }()); + Excel.CustomFunctionManagerCustom = CustomFunctionManagerCustom; + (function (_CC) { + function CustomFunctionManager_StaticCustomize(type) { + type.register = CustomFunctionManagerCustom.register; + type.getStatus = CustomFunctionManagerCustom.getStatus; + } + _CC.CustomFunctionManager_StaticCustomize = CustomFunctionManager_StaticCustomize; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Style_TextOrientation_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_textOrientation = value; + _invokeSetProperty(thisObj, "Orientation", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Style_TextOrientation_Set = Style_TextOrientation_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function InternalTest_Test1Event_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_Test1Event_EventArgsTransform = InternalTest_Test1Event_EventArgsTransform; + function InternalTest_TestEvent_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_TestEvent_EventArgsTransform = InternalTest_TestEvent_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var CommentCollectionCustom = (function () { + function CommentCollectionCustom() { + } + Object.defineProperty(CommentCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return CommentCollectionCustom; + }()); + Excel.CommentCollectionCustom = CommentCollectionCustom; + var ShapeCollectionCustom = (function () { + function ShapeCollectionCustom() { + } + Object.defineProperty(ShapeCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ShapeCollectionCustom; + }()); + Excel.ShapeCollectionCustom = ShapeCollectionCustom; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["accessDenied"] = "AccessDenied"; + ErrorCodes["apiNotFound"] = "ApiNotFound"; + ErrorCodes["conflict"] = "Conflict"; + ErrorCodes["emptyChartSeries"] = "EmptyChartSeries"; + ErrorCodes["filteredRangeConflict"] = "FilteredRangeConflict"; + ErrorCodes["formulaLengthExceedsLimit"] = "FormulaLengthExceedsLimit"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["inactiveWorkbook"] = "InactiveWorkbook"; + ErrorCodes["insertDeleteConflict"] = "InsertDeleteConflict"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidBinding"] = "InvalidBinding"; + ErrorCodes["invalidOperation"] = "InvalidOperation"; + ErrorCodes["invalidReference"] = "InvalidReference"; + ErrorCodes["invalidSelection"] = "InvalidSelection"; + ErrorCodes["itemAlreadyExists"] = "ItemAlreadyExists"; + ErrorCodes["itemNotFound"] = "ItemNotFound"; + ErrorCodes["mergedRangeConflict"] = "MergedRangeConflict"; + ErrorCodes["nonBlankCellOffSheet"] = "NonBlankCellOffSheet"; + ErrorCodes["notImplemented"] = "NotImplemented"; + ErrorCodes["openWorkbookLinksBlocked"] = "OpenWorkbookLinksBlocked"; + ErrorCodes["operationCellsExceedLimit"] = "OperationCellsExceedLimit"; + ErrorCodes["pivotTableRangeConflict"] = "PivotTableRangeConflict"; + ErrorCodes["powerQueryRefreshResourceChallenge"] = "PowerQueryRefreshResourceChallenge"; + ErrorCodes["rangeExceedsLimit"] = "RangeExceedsLimit"; + ErrorCodes["refreshWorkbookLinksBlocked"] = "RefreshWorkbookLinksBlocked"; + ErrorCodes["requestAborted"] = "RequestAborted"; + ErrorCodes["responsePayloadSizeLimitExceeded"] = "ResponsePayloadSizeLimitExceeded"; + ErrorCodes["unsupportedFeature"] = "UnsupportedFeature"; + ErrorCodes["unsupportedFillType"] = "UnsupportedFillType"; + ErrorCodes["unsupportedOperation"] = "UnsupportedOperation"; + ErrorCodes["unsupportedSheet"] = "UnsupportedSheet"; + ErrorCodes["invalidOperationInCellEditMode"] = "InvalidOperationInCellEditMode"; + })(ErrorCodes = Excel.ErrorCodes || (Excel.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = {})); + var _libraryMetadataXlapi = { "version": "1.0.0", + "name": "Excel", + "defaultApiSetName": "ExcelApi", + "hostName": "Excel", + "apiSets": [["1.19", "ExcelApiUndo"], ["1.1", "Recorder"], ["99.9"], ["1.4", "ExcelApiUndo"], ["1.8"], ["1.9"], ["1.11"], ["1.18"], ["1.6"], ["1.6", "ExcelApiUndo"], ["1.7"], ["1.1", "ExcelApiUndo"], ["1.2"], ["1.3"], ["1.4"], ["1.5"], ["1.10"], ["1.14"], ["1.1", "ExcelApiOnline"], ["1.1", "CustomFunctions"], ["1.1", "WACOperationEvents"], ["1.3", "ExcelApiUndo"], ["1.13"], ["1.16"], ["1.8", "ExcelApiUndo"], ["1.16", "ExcelApiUndo"], ["1.12"], ["1.2", "ExcelApiOnline"], ["1.2", "ExcelApiUndo"], ["1.17"], ["1.7", "ExcelApiUndo"], ["1.10", "ExcelApiUndo"], ["1.14", "ExcelApiUndo"], ["1.15", "ExcelApiUndo"], ["1.15"], ["1.17", "ExcelApiUndo"], ["99.99", "ExcelApiUndo"], ["1.9", "ExcelApiUndo"], ["1.11", "ExcelApiUndo"], ["1.12", "ExcelApiUndo"], ["1.13", "ExcelApiUndo"], ["1.18", "ExcelApiUndo"]], + "strings": [], + "enumTypes": [["UndoChangeType", ["undoAction", "redoAction", "undoOrRedoCleared", "undoGroupAdded"]], + ["SDX", ["guidedReapply"]], + ["BusinessBarEntryType", [], { "officeScriptsRunningStatus": 0, "msFormsDataSyncRunningStatus": 1 }], + ["FormulaReferenceStyle", ["a1", "r1C1"]], + ["NavigationObjectType", ["table", "pivotTable", "chart", "shape", "namedRange"]], + ["UserActivityType", ["none", "insertSheet", "deleteSheet", "renameSheet", "changeCell", "insertRow", "insertColumn", "deleteRow", "deleteColumn", "insertPartialRow", "insertPartialColumn", "insertPartialColumnRightToLeft", "deletePartialRow", "deletePartialColumn", "deletePartialColumnRightToLeft", "move", "sort", "mergeCells", "unmergeCells", "unknownOperation", "genericEdit"]], + ["LineageEndOfLogStatus", ["loadInProgress", "success", "endOfLog", "purged", "trimmed", "unsupported", "cleared", "error"]], + ["LineageLoadType", ["new", "next", "previous", "latest"]], + ["LoadToType", ["connectionOnly", "table", "pivotTable", "pivotChart"]], + ["QueryError", ["unknown", "none", "failedLoadToWorksheet", "failedLoadToDataModel", "failedDownload", "failedToCompleteDownload"]], + ["RangeOptimizationType", ["other", "numberFormat", "textAlignment", "textProperties", "cellBorder", "fillColor", "sheetProtection", "rowHeight", "rowVisibility"]], + ["WorkbookLinksHardToFindMessages", ["none", "containsDefinedNames", "hiddenOrVeryHiddenSheet", "hiddenFloatingObjects", "lockedFloatingObjectsThroughVba", "protectedSheet", "containsConditionalFormatting", "containsDataValidation", "hiddenRowsAndColumns"]], + ["WorkbookLinksIconState", ["ok", "moreInfo", "warning"]], + ["WorkbookLinksRefreshSettings", ["ask", "always", "never"]], + ["WorkbookConditionalFormattingRulesManagerScope", ["defaultScope", "selectedRange", "activatedWorksheet", "activatedTable", "activatedPivotTable"]], + ["WorkbookLinksRefreshMode", ["manual", "automatic"]], + ["HelpTopic", ["showChanges", "guidedReapply", "externalCodeServiceDiagnostics"]], + ["DocumentTaskChangeAction", [], { "unknown": "unknown", "create": "create", "assign": "assign", "unassign": "unassign", "unassignAll": "unassignAll", "setSchedule": "setSchedule", "setPercentComplete": "setPercentComplete", "setPriority": "setPriority", "remove": "remove", "restore": "restore", "setTitle": "setTitle", "undo": "undo" }], + ["DataSourceType", ["unknown", "cube", "localRange", "localTable", "oledbDefault"]], + ["DateFilterCondition", ["unknown", "equals", "before", "beforeOrEqualTo", "after", "afterOrEqualTo", "between", "tomorrow", "today", "yesterday", "nextWeek", "thisWeek", "lastWeek", "nextMonth", "thisMonth", "lastMonth", "nextQuarter", "thisQuarter", "lastQuarter", "nextYear", "thisYear", "lastYear", "yearToDate", "allDatesInPeriodQuarter1", "allDatesInPeriodQuarter2", "allDatesInPeriodQuarter3", "allDatesInPeriodQuarter4", "allDatesInPeriodJanuary", "allDatesInPeriodFebruary", "allDatesInPeriodMarch", "allDatesInPeriodApril", "allDatesInPeriodMay", "allDatesInPeriodJune", "allDatesInPeriodJuly", "allDatesInPeriodAugust", "allDatesInPeriodSeptember", "allDatesInPeriodOctober", "allDatesInPeriodNovember", "allDatesInPeriodDecember"]], + ["LabelFilterCondition", ["unknown", "equals", "beginsWith", "endsWith", "contains", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between"]], + ["PivotFilterType", ["unknown", "value", "manual", "label", "date"]], + ["TopBottomSelectionType", ["items", "percent", "sum"]], + ["ValueFilterCondition", ["unknown", "equals", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between", "topN", "bottomN"]], + ["BuiltInPivotTableStyle", ["none", "light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "light22", "light23", "light24", "light25", "light26", "light27", "light28", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11", "dark12", "dark13", "dark14", "dark15", "dark16", "dark17", "dark18", "dark19", "dark20", "dark21", "dark22", "dark23", "dark24", "dark25", "dark26", "dark27", "dark28"]], + ["BuiltInSlicerStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "other1", "other2", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6"]], + ["BuiltInTableStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11"]], + ["ChartSeriesDimension", ["categories", "values", "bubbleSizes"], { "xvalues": "XValues", "yvalues": "YValues" }], + ["PivotTableDateGroupBy", ["invalid", "bySeconds", "byMinutes", "byHours", "byDays", "byMonths", "byQuarters", "byYears"]], + ["PivotFilterTopBottomCriterion", ["invalid", "topItems", "topPercent", "topSum", "bottomItems", "bottomPercent", "bottomSum"]], + ["SortBy", ["ascending", "descending"]], + ["AggregationFunction", ["unknown", "automatic", "sum", "count", "average", "max", "min", "product", "countNumbers", "standardDeviation", "standardDeviationP", "variance", "varianceP"]], + ["ShowAsCalculation", ["unknown", "none", "percentOfGrandTotal", "percentOfRowTotal", "percentOfColumnTotal", "percentOfParentRowTotal", "percentOfParentColumnTotal", "percentOfParentTotal", "percentOf", "runningTotal", "percentRunningTotal", "differenceFrom", "percentDifferenceFrom", "rankAscending", "rankDecending", "index"]], + ["PivotAxis", ["unknown", "row", "column", "data", "filter"]], + ["LinkedDataTypeRefreshMode", ["unknown", "manual", "onLoad", "periodic"]], + ["AxisType", ["invalid", "category", "value", "series"]], + ["AxisGroup", ["primary", "secondary"]], + ["AxisScaleType", ["linear", "logarithmic"]], + ["AxisCrosses", ["automatic", "maximum", "minimum", "custom"]], + ["AxisTickMark", ["none", "cross", "inside", "outside"]], + ["AxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["TrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ChartAxisType", ["invalid", "category", "value", "series"]], + ["ChartAxisGroup", ["primary", "secondary"]], + ["ChartAxisScaleType", ["linear", "logarithmic"]], + ["ChartAxisPosition", ["automatic", "maximum", "minimum", "custom"]], + ["ChartAxisTickMark", ["none", "cross", "inside", "outside"]], + ["CalculationState", ["done", "calculating", "pending"]], + ["ChartAxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["ChartAxisDisplayUnit", ["none", "hundreds", "thousands", "tenThousands", "hundredThousands", "millions", "tenMillions", "hundredMillions", "billions", "trillions", "custom"]], + ["ChartAxisTimeUnit", ["days", "months", "years"]], + ["ChartBoxQuartileCalculation", ["inclusive", "exclusive"]], + ["ChartAxisCategoryType", ["automatic", "textAxis", "dateAxis"]], + ["ChartBinType", ["category", "auto", "binWidth", "binCount"]], + ["ChartLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "grey25", "grey50", "grey75", "automatic", "roundDot"]], + ["ChartDataLabelPosition", ["invalid", "none", "center", "insideEnd", "insideBase", "outsideEnd", "left", "right", "top", "bottom", "bestFit", "callout"]], + ["ChartErrorBarsInclude", ["both", "minusValues", "plusValues"]], + ["ChartErrorBarsType", ["fixedValue", "percent", "stDev", "stError", "custom"]], + ["ChartMapAreaLevel", ["automatic", "dataOnly", "city", "county", "state", "country", "continent", "world"]], + ["ChartGradientStyle", ["twoPhaseColor", "threePhaseColor"]], + ["ChartGradientStyleType", ["extremeValue", "number", "percent"]], + ["ChartTitlePosition", ["automatic", "top", "bottom", "left", "right"]], + ["ChartLegendPosition", ["invalid", "top", "bottom", "left", "right", "corner", "custom"]], + ["ChartMarkerStyle", ["invalid", "automatic", "none", "square", "diamond", "triangle", "star", "dot", "dash", "circle", "plus", "picture"], { "x": "X" }], + ["ChartPlotAreaPosition", ["automatic", "custom"]], + ["ChartMapLabelStrategy", ["none", "bestFit", "showAll"]], + ["ChartMapProjectionType", ["automatic", "mercator", "miller", "robinson", "albers"]], + ["ChartParentLabelStrategy", ["none", "banner", "overlapping"]], + ["ChartSeriesBy", ["auto", "columns", "rows"]], + ["ChartDataSourceType", ["localRange", "externalRange", "list", "unknown"]], + ["ChartTextHorizontalAlignment", ["center", "left", "right", "justify", "distributed"]], + ["ChartTextVerticalAlignment", ["center", "bottom", "top", "justify", "distributed"]], + ["ChartTickLabelAlignment", ["center", "left", "right"]], + ["ChartType", ["invalid", "columnClustered", "columnStacked", "columnStacked100", "barClustered", "barStacked", "barStacked100", "lineStacked", "lineStacked100", "lineMarkers", "lineMarkersStacked", "lineMarkersStacked100", "pieOfPie", "pieExploded", "barOfPie", "areaStacked", "areaStacked100", "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", "line", "pie", "area", "doughnut", "radar", "histogram", "boxwhisker", "pareto", "regionMap", "treemap", "waterfall", "sunburst", "funnel"], { "_3DColumnClustered": "3DColumnClustered", "_3DColumnStacked": "3DColumnStacked", "_3DColumnStacked100": "3DColumnStacked100", "_3DBarClustered": "3DBarClustered", "_3DBarStacked": "3DBarStacked", "_3DBarStacked100": "3DBarStacked100", "_3DPieExploded": "3DPieExploded", "xyscatterSmooth": "XYScatterSmooth", "xyscatterSmoothNoMarkers": "XYScatterSmoothNoMarkers", "xyscatterLines": "XYScatterLines", "xyscatterLinesNoMarkers": "XYScatterLinesNoMarkers", "_3DAreaStacked": "3DAreaStacked", "_3DAreaStacked100": "3DAreaStacked100", "_3DColumn": "3DColumn", "_3DLine": "3DLine", "_3DPie": "3DPie", "xyscatter": "XYScatter", "_3DArea": "3DArea" }], + ["ChartUnderlineStyle", ["none", "single"]], + ["ChartDisplayBlanksAs", ["notPlotted", "zero", "interplotted"]], + ["ChartPlotBy", ["rows", "columns"]], + ["ChartSplitType", ["splitByPosition", "splitByValue", "splitByPercentValue", "splitByCustomSplit"]], + ["ChartColorScheme", ["colorfulPalette1", "colorfulPalette2", "colorfulPalette3", "colorfulPalette4", "monochromaticPalette1", "monochromaticPalette2", "monochromaticPalette3", "monochromaticPalette4", "monochromaticPalette5", "monochromaticPalette6", "monochromaticPalette7", "monochromaticPalette8", "monochromaticPalette9", "monochromaticPalette10", "monochromaticPalette11", "monochromaticPalette12", "monochromaticPalette13"]], + ["ChartTrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ShapeZOrder", ["bringToFront", "bringForward", "sendToBack", "sendBackward"]], + ["ShapeType", ["unsupported", "image", "geometricShape", "group", "line"]], + ["ShapeScaleType", ["currentSize", "originalSize"]], + ["ShapeScaleFrom", ["scaleFromTopLeft", "scaleFromMiddle", "scaleFromBottomRight"]], + ["ShapeFillType", ["noFill", "solid", "gradient", "pattern", "pictureAndTexture", "mixed"]], + ["ShapeFontUnderlineStyle", ["none", "single", "double", "heavy", "dotted", "dottedHeavy", "dash", "dashHeavy", "dashLong", "dashLongHeavy", "dotDash", "dotDashHeavy", "dotDotDash", "dotDotDashHeavy", "wavy", "wavyHeavy", "wavyDouble"]], + ["PictureFormat", [], { "unknown": "UNKNOWN", "bmp": "BMP", "jpeg": "JPEG", "gif": "GIF", "png": "PNG", "svg": "SVG" }], + ["ShapeLineStyle", ["single", "thickBetweenThin", "thickThin", "thinThick", "thinThin"]], + ["ShapeLineDashStyle", ["dash", "dashDot", "dashDotDot", "longDash", "longDashDot", "roundDot", "solid", "squareDot", "longDashDotDot", "systemDash", "systemDot", "systemDashDot"]], + ["ArrowheadLength", ["short", "medium", "long"]], + ["ArrowheadStyle", ["none", "triangle", "stealth", "diamond", "oval", "open"]], + ["ArrowheadWidth", ["narrow", "medium", "wide"]], + ["PremiumLicenseName", ["python"]], + ["BindingType", ["range", "table", "text"]], + ["BorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight", "insideVertical", "insideHorizontal", "diagonalDown", "diagonalUp"]], + ["BorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "double", "slantDashDot"]], + ["BorderWeight", ["hairline", "thin", "medium", "thick"]], + ["CalculationMode", ["automatic", "automaticExceptTables", "manual"]], + ["RuntimeCalculationMode", [], { "undefined": 0, "automatic": 1, "automaticExceptTables": 2, "manual": 3 }], + ["CalculationType", ["recalculate", "full", "fullRebuild"]], + ["ClearApplyTo", ["all", "formats", "contents", "hyperlinks", "removeHyperlinks"]], + ["VisualCategory", ["column", "bar", "line", "area", "pie", "donut", "scatter", "bubble", "statistical", "stock", "combo", "hierarchy", "surface", "map", "funnel", "radar", "waterfall", "threeD", "other"]], + ["VisualPropertyType", ["object", "collection", "string", "double", "int", "bool", "enum", "color"]], + ["VisualChangeType", ["dataChange", "propertyChange", "genericChange", "selectionChange"]], + ["BoolMetaPropertyType", ["writeOnly", "readOnly", "hideEntireSubtreeUI", "hideMeButShowChildrenUI", "expandableUI", "nextPropOnSameLine", "hideLabel", "showResetUI", "hasOwnExpandableSection", "nextPropOnSameLineFOTP", "showResetUIFOTP", "untransferable", "ignoreDuringChangeChartType", "notTriviallyUndoable", "volatileEnum", "exceptionCollection", "metaOnly", "showHideCollection", "errorMessage", "infoMessage"]], + ["ConditionalDataBarAxisFormat", ["automatic", "none", "cellMidPoint"]], + ["ConditionalDataBarDirection", ["context", "leftToRight", "rightToLeft"]], + ["ConditionalFormatDirection", ["top", "bottom"]], + ["ConditionalFormatType", ["custom", "dataBar", "colorScale", "iconSet", "topBottom", "presetCriteria", "containsText", "cellValue"]], + ["ConditionalFormatRuleType", ["invalid", "automatic", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatIconRuleType", ["invalid", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatColorCriterionType", ["invalid", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalTopBottomCriterionType", ["invalid", "topItems", "topPercent", "bottomItems", "bottomPercent"]], + ["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"]], + ["ConditionalTextOperator", ["invalid", "contains", "notContains", "beginsWith", "endsWith"]], + ["ConditionalCellValueOperator", ["invalid", "between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqual", "lessThanOrEqual"]], + ["ConditionalIconCriterionOperator", ["invalid", "greaterThan", "greaterThanOrEqual"]], + ["ConditionalRangeBorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight"]], + ["ConditionalRangeBorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot"]], + ["ConditionalRangeFontUnderlineStyle", ["none", "single", "double"]], + ["CustomFunctionType", ["invalid", "script", "webService"]], + ["CustomFunctionMetadataFormat", ["invalid", "openApi"]], + ["DataValidationType", ["none", "wholeNumber", "decimal", "list", "date", "time", "textLength", "custom", "inconsistent", "mixedCriteria"]], + ["DataValidationOperator", ["between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqualTo", "lessThanOrEqualTo"]], + ["DataValidationAlertStyle", ["stop", "warning", "information"]], + ["DeleteShiftDirection", ["up", "left"]], + ["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"]], + ["FilterDatetimeSpecificity", ["year", "month", "day", "hour", "minute", "second"]], + ["FilterOn", ["bottomItems", "bottomPercent", "cellColor", "dynamic", "fontColor", "values", "topItems", "topPercent", "icon", "custom"]], + ["FilterOperator", ["and", "or"]], + ["HorizontalAlignment", ["general", "left", "center", "right", "fill", "justify", "centerAcrossSelection", "distributed"]], + ["IconSet", ["invalid", "threeArrows", "threeArrowsGray", "threeFlags", "threeTrafficLights1", "threeTrafficLights2", "threeSigns", "threeSymbols", "threeSymbols2", "fourArrows", "fourArrowsGray", "fourRedToBlack", "fourRating", "fourTrafficLights", "fiveArrows", "fiveArrowsGray", "fiveRating", "fiveQuarters", "threeStars", "threeTriangles", "fiveBoxes"]], + ["ImageFittingMode", ["fit", "fitAndCenter", "fill"]], + ["InsertShiftDirection", ["down", "right"]], + ["NamedItemScope", ["worksheet", "workbook"]], + ["NamedItemType", ["string", "integer", "double", "boolean", "range", "error", "array"]], + ["RangeUnderlineStyle", ["none", "single", "double", "singleAccountant", "doubleAccountant"]], + ["SheetVisibility", ["visible", "hidden", "veryHidden"]], + ["EventTriggerSource", ["unknown", "thisLocalAddin"]], + ["RangeValueType", ["unknown", "empty", "string", "integer", "double", "boolean", "error", "richValue"]], + ["KeyboardDirection", ["left", "right", "up", "down"]], + ["SearchDirection", ["forward", "backwards"]], + ["SortOrientation", ["rows", "columns"]], + ["SortOn", ["value", "cellColor", "fontColor", "icon"]], + ["SortDataOption", ["normal", "textAsNumber"]], + ["SortMethod", ["pinYin", "strokeCount"]], + ["VerticalAlignment", ["top", "center", "bottom", "justify", "distributed"]], + ["MessageCategory", [], { "none": 0, "customFunction": 1, "action": 2, "event": 65536 }], + ["MessageType", [], { "none": 0, "testEvent": 1, "test1Event": 2, "worksheetDataChangedEvent": 10, "worksheetActivatedEvent": 11, "worksheetDeactivatedEvent": 12, "worksheetAddedEvent": 13, "worksheetSelectionChangedEvent": 14, "worksheetDeletedEvent": 15, "worksheetCalculatedEvent": 16, "worksheetFilteredEvent": 17, "worksheetFormatChangedEvent": 18, "worksheetRowSortedEvent": 19, "worksheetColumnSortedEvent": 20, "worksheetSingleClickedEvent": 21, "worksheetRowHiddenChangedEvent": 22, "worksheetFormulaChangedEvent": 23, "worksheetProtectionChangedEvent": 24, "worksheetNameChangedEvent": 25, "worksheetVisibilityChangedEvent": 26, "worksheetMovedEvent": 27, "worksheetNavigationObjectChangedEvent": 28, "worksheetRowHeightChangedEvent": 29, "workbookFormulaReferenceStyleChangedEvent": 30, "chartAddedEvent": 50, "chartActivatedEvent": 51, "chartDeactivatedEvent": 52, "chartDeletedEvent": 53, "tableSelectionChangedEvent": 100, "tableDataChangedEvent": 101, "tableAddedEvent": 102, "tableDeletedEvent": 103, "tableFilteredEvent": 104, "agaveVisualUpdateEvent": 150, "customFunctionExecutionBeginEvent": 200, "customFunctionExecutionEndEvent": 201, "commentAddedEvent": 250, "commentDeletedEvent": 251, "commentChangedEvent": 252, "invocationMessage": 1000, "cancellationMessage": 1001, "metadataMessage": 1002, "visualSelectionChangedEvent": 2000, "visualChangeEvent": 2001, "visualTrackerModelChangedEvent": 2002, "shapeSelectionChangedEvent": 2100, "shapeActivatedEvent": 2101, "shapeDeactivatedEvent": 2102, "shapeAddedEvent": 2103, "shapeDeletedEvent": 2104, "workbookAutoSaveSettingChangedEvent": 2200, "wacoperationEvent": 2201, "recordingStateChangedEvent": 2202, "workbookActivatedEvent": 2203, "workbookNavigationObjectChangedEvent": 2204, "ribbonCommandExecutedEvent": 2300, "linkedDataTypeRefreshRequestCompletedEvent": 2500, "linkedDataTypeRefreshModeChangedEvent": 2501, "linkedDataTypeLinkedDataTypeAddedEvent": 2502, "linkedWorkbookWorkbookLinksChangedEvent": 2600, "linkedWorkbookRefreshCompletedEvent": 2601, "rangePickerSelectionChangedEvent": 2700, "rangePickerDeactivatedEvent": 2701, "lineageActivityUpdateAvailableEvent": 2800, "lineageActivityFilterUpdatedEvent": 2801, "lineageActivityLoadCompletedEvent": 2802, "pivotTableAddedEvent": 2900, "pivotTableDeletedEvent": 2901, "namedItemAddedEvent": 3000, "namedItemDeletedEvent": 3001, "guidedReapplyManagerUpdateAvailableEvent": 3100, "vbaRecorderRecordingChangedEvent": 3200, "vbaRecorderRecordingChanged2Event": 3202, "workbookActionRecordedEvent": 3201, "externalCodeServiceDiagnosticsNewEntryEvent": 3300, "externalCodeServiceDiagnosticsFilterUpdatedEvent": 3301, "rangeValuesPreviewDismissedEvent": 3400, "applicationUndoChangedEvent": 3500, "appRuntimeVisibilityChangedEvent": 65539, "beforeCloseNotifiactionCancelledEvent": 65540, "augmentationLoopAnnotationAddedEvent": 65541 }], + ["InsertDeleteCellsShiftDirection", ["none", "shiftCellLeft", "shiftCellUp", "shiftCellRight", "shiftCellDown"]], + ["DocumentPropertyType", ["number", "boolean", "date", "string", "float"]], + ["EventSource", ["local", "remote"]], + ["DataChangeType", ["unknown", "rangeEdited", "rowInserted", "rowDeleted", "columnInserted", "columnDeleted", "cellInserted", "cellDeleted"]], + ["RowHiddenChangeType", ["unhidden", "hidden"]], + ["CommentChangeType", ["commentEdited", "commentResolved", "commentReopened", "replyAdded", "replyDeleted", "replyEdited"]], + ["EventType", ["worksheetChanged", "worksheetSelectionChanged", "worksheetAdded", "worksheetActivated", "worksheetDeactivated", "tableChanged", "tableSelectionChanged", "worksheetDeleted", "chartAdded", "chartActivated", "chartDeactivated", "chartDeleted", "worksheetCalculated", "visualSelectionChanged", "agaveVisualUpdate", "tableAdded", "tableDeleted", "tableFiltered", "worksheetFiltered", "shapeActivated", "shapeDeactivated", "visualChange", "workbookAutoSaveSettingChanged", "worksheetFormatChanged", "ribbonCommandExecuted", "worksheetRowSorted", "worksheetColumnSorted", "worksheetSingleClicked", "worksheetRowHiddenChanged", "recordingStateChangedEvent", "commentAdded", "commentDeleted", "commentChanged", "linkedDataTypeRefreshRequestCompleted", "linkedDataTypeRefreshModeChanged", "linkedDataTypeLinkedDataTypeAdded", "worksheetFormulaChanged", "workbookActivated", "linkedWorkbookWorkbookLinksChanged", "linkedWorkbookRefreshCompleted", "worksheetProtectionChanged", "worksheetNameChanged", "worksheetVisibilityChanged", "worksheetMoved", "lineageActivityUpdateAvailable", "lineageActivityFilterUpdated", "lineageActivityLoadCompleted", "shapeAdded", "shapeDeleted", "pivotTableAdded", "pivotTableDeleted", "namedItemAdded", "namedItemDeleted", "worksheetNavigationObjectChanged", "workbookNavigationObjectChanged", "worksheetRowHeightChanged", "workbookFormulaReferenceStyleChanged", "guidedReapplyManagerUpdateAvailable", "vbaRecorderRecordingChanged", "rangeValuesPreviewDismissed", "annotationAdded", "workbookActionRecorded", "applicationUndoChanged", "vbaRecorderRecordingChanged2"], { "wacoperationEvent": "WACOperationEvent" }], + ["DocumentPropertyItem", ["title", "subject", "author", "keywords", "comments", "template", "lastAuth", "revision", "appName", "lastPrint", "creation", "lastSave", "category", "format", "manager", "company"]], + ["SubtotalLocationType", ["atTop", "atBottom", "off"]], + ["PivotLayoutType", ["compact", "tabular", "outline"]], + ["ProtectionSelectionMode", ["normal", "unlocked", "none"]], + ["PageOrientation", ["portrait", "landscape"]], + ["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"]], + ["ReadingOrder", ["context", "leftToRight", "rightToLeft"]], + ["BuiltInStyle", ["normal", "comma", "currency", "percent", "wholeComma", "wholeDollar", "hlink", "hlinkTrav", "note", "warningText", "emphasis1", "emphasis2", "emphasis3", "sheetTitle", "heading1", "heading2", "heading3", "heading4", "input", "output", "calculation", "checkCell", "linkedCell", "total", "good", "bad", "neutral", "accent1", "accent1_20", "accent1_40", "accent1_60", "accent2", "accent2_20", "accent2_40", "accent2_60", "accent3", "accent3_20", "accent3_40", "accent3_60", "accent4", "accent4_20", "accent4_40", "accent4_60", "accent5", "accent5_20", "accent5_40", "accent5_60", "accent6", "accent6_20", "accent6_40", "accent6_60", "explanatoryText"]], + ["PrintErrorType", ["asDisplayed", "blank", "dash", "notAvailable"]], + ["WorksheetPositionType", ["none", "before", "after", "beginning", "end"]], + ["PrintComments", ["noComments", "endSheet", "inPlace"]], + ["PrintOrder", ["downThenOver", "overThenDown"]], + ["PrintMarginUnit", ["points", "inches", "centimeters"]], + ["HeaderFooterState", ["default", "firstAndDefault", "oddAndEven", "firstOddAndEven"]], + ["AutoFillType", ["fillDefault", "fillCopy", "fillSeries", "fillFormats", "fillValues", "fillDays", "fillWeekdays", "fillMonths", "fillYears", "linearTrend", "growthTrend", "flashFill"]], + ["GroupOption", ["byRows", "byColumns"]], + ["RangeCopyType", ["all", "formulas", "values", "formats", "link"]], + ["LinkedDataTypeState", ["none", "validLinkedData", "disambiguationNeeded", "brokenLinkedData", "fetchingData"]], + ["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"]], + ["ConnectorType", ["straight", "elbow", "curve"]], + ["ContentType", ["plain", "mention"]], + ["SpecialCellType", ["conditionalFormats", "dataValidations", "blanks", "constants", "formulas", "sameConditionalFormat", "sameDataValidation", "visible"]], + ["SpecialCellValueType", ["all", "errors", "errorsLogical", "errorsNumbers", "errorsText", "errorsLogicalNumber", "errorsLogicalText", "errorsNumberText", "logical", "logicalNumbers", "logicalText", "logicalNumbersText", "numbers", "numbersText", "text"]], + ["Placement", ["twoCell", "oneCell", "absolute"]], + ["FillPattern", ["none", "solid", "gray50", "gray75", "gray25", "horizontal", "vertical", "down", "up", "checker", "semiGray75", "lightHorizontal", "lightVertical", "lightDown", "lightUp", "grid", "crissCross", "gray16", "gray8", "linearGradient", "rectangularGradient"]], + ["ShapeTextHorizontalAlignment", ["left", "center", "right", "justify", "justifyLow", "distributed", "thaiDistributed"]], + ["ShapeTextVerticalAlignment", ["top", "middle", "bottom", "justified", "distributed"]], + ["ShapeTextVerticalOverflow", ["overflow", "ellipsis", "clip"]], + ["ShapeTextHorizontalOverflow", ["overflow", "clip"]], + ["ShapeTextReadingOrder", ["leftToRight", "rightToLeft"]], + ["ShapeTextOrientation", ["horizontal", "vertical", "vertical270", "wordArtVertical", "eastAsianVertical", "mongolianVertical", "wordArtVerticalRTL"]], + ["ShapeAutoSize", ["autoSizeNone", "autoSizeTextToFitShape", "autoSizeShapeToFitText", "autoSizeMixed"]], + ["CloseBehavior", ["save", "skipSave"]], + ["SaveBehavior", ["save", "prompt"]], + ["SlicerSortType", ["dataSourceOrder", "ascending", "descending"]], + ["RibbonTab", ["others", "home", "insert", "draw", "pageLayout", "formulas", "data", "review", "view", "developer", "addIns", "help"]], + ["NumberFormatCategory", ["general", "number", "currency", "accounting", "date", "time", "percentage", "fraction", "scientific", "text", "special", "custom"]]], + "clientObjectTypes": [["UndoScope", + 0, + 0, + 0, + [["close", + 0, + 0, + 0, + 2], + ["open", + 1, + 0, + 0, + 2]]], + ["RangeValuesPreview", + 4, + 0, + 0, + [["_RegisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["dismiss", + 0, + 2, + 0, + 4], + ["show", + 3, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Dismissed", + 0, + 0, + "MessageType.rangeValuesPreviewDismissedEvent", + "this._ParentObject.id", + "_RegisterEventDismissed", + "_UnregisterEventDismissed"]]], + ["AugmentationLoop", + 0, + 0, + 0, + [["_RegisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["activateAnnotation", + 1, + 2, + 0, + 4], + ["submitSignal", + 1, + 2, + 0, + 4]], + 0, + 0, + 0, + [["AnnotationAdded", + 0, + 0, + "MessageType.augmentationLoopAnnotationAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAnnotationAddedEvent", + "_UnregisterAnnotationAddedEvent"]]], + ["ExternalCodeService", + 0, + 0, + [["diagnostics", + "ExternalCodeServiceDiagnostics", + 2, + 0, + 0, + 4]]], + ["ExternalCodeServiceDiagnostics", + 0, + [["id", + 2]], + 0, + [["_RegisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["clear", + 0, + 2, + 0, + 4], + ["fireStoredEntries", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1]], + 0, + 0, + 0, + [["FilterUpdated", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent", + "this.id", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["NewEntry", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsNewEntryEvent", + "this.id", + "_RegisterEventNewEntry", + "_UnregisterEventNewEntry"]]], + ["VbaRecorder", + 0, + [["id", + 2]], + 0, + [["_RegisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterEventRecordingChanged2", + 0, + 2, + 2, + 4], + ["_UnregisterEventRecordingChanged2", + 0, + 2, + 2, + 4]], + 0, + 0, + 0, + [["RecordingChanged", + 0, + 0, + "MessageType.vbaRecorderRecordingChangedEvent", + "this.id", + "_RegisterEventRecordingChanged", + "_UnregisterEventRecordingChanged"], + ["RecordingChanged2", + 0, + 2, + "MessageType.vbaRecorderRecordingChanged2Event", + "this.id", + "_RegisterEventRecordingChanged2", + "_UnregisterEventRecordingChanged2"]]], + ["WorksheetOptimizationScanResult", + 0, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + [["ranges", + "RangeOptimizationCollection", + 18, + 0, + 0, + 4]]], + ["UserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity"], + ["GuidedReapplyManager", + 0, + 0, + [["activities", + "UserActivityCollection", + 18, + 0, + 0, + 4], + ["summaryCardUserActivity", + "SummaryCardUserActivity", + 2, + 0, + 0, + 4]], + [["openSavedFile", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["discardActivites", + 0, + 2, + 0, + 4], + ["reapplyActivity", + 1, + 2, + 0, + 4], + ["saveActivities", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["UpdateAvailable", + 0, + 0, + "MessageType.guidedReapplyManagerUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["BusinessBar", + 0, + 0, + 0, + [["hide", + 2], + ["show", + 2]]], + ["UserActivity", + 0, + [["activityId", + 2], + ["activityType", + 2], + ["author", + 2], + ["createdDateTime", + 10], + ["guid", + 2], + ["rangeAddress", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2], + ["authorEmail", + 2], + ["locationDeleted", + 2]], + [["highlightRangeAreas", + "RangeAreas", + 2, + 0, + 0, + 4]]], + ["LineageActivityCollection", + 1, + 0, + 0, + [["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["clear", + 0, + 2, + 0, + 4], + ["getCount", + 0, + 2, + 0, + 4], + ["getState", + 0, + 2, + 0, + 4], + ["loadActivities", + 1, + 2, + 0, + 4], + ["loadLatestActivities", + 0, + 2, + 0, + 4], + ["loadNextActivities", + 0, + 2, + 0, + 4], + ["loadPreviousActivities", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_RegisterEventLoadCompleted", + 0, + 2, + 0, + 4], + ["_UnregisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_UnregisterEventLoadCompleted", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity", + [["FilterUpdated", + 0, + 0, + "MessageType.lineageActivityFilterUpdatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["LoadCompleted", + 0, + 0, + "MessageType.lineageActivityLoadCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventLoadCompleted", + "_UnregisterEventLoadCompleted"], + ["UpdateAvailable", + 0, + 0, + "MessageType.lineageActivityUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["SummaryItemUserActivity", + 0, + [["activityType", + 2], + ["rangeAddresses", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2]]], + ["SummaryItemUserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SummaryItemUserActivity", + 1, + 2, + 0, + 4]], + 0, + "SummaryItemUserActivity"], + ["SummaryCardUserActivity", + 0, + [["authors", + 2], + ["currentUser", + 2], + ["displayTime", + 10], + ["numberOfDetailedCard", + 2], + ["summaryUnviewableData", + 2]], + [["summaryItemUserActivities", + "SummaryItemUserActivityCollection", + 18, + 0, + 0, + 4]]], + ["AllowEditRange", + 0, + [["address", + 1], + ["isPasswordProtected", + 3], + ["title", + 1]], + 0, + [["delete"], + ["pauseProtection", + 1], + ["setPassword", + 1]]], + ["AllowEditRangeCollection", + 1, + 0, + 0, + [["add", + 3], + ["getCount", + 0, + 2, + 0, + 4], + ["pauseProtection", + 1]], + [["getItem", + "AllowEditRange", + 1, + 18, + 0, + 4], + ["getItemAt", + "AllowEditRange", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "AllowEditRange", + 1, + 2, + 0, + 4]], + 0, + "AllowEditRange"], + ["Query", + 0, + [["loadedTo", + 2], + ["loadedToDataModel", + 2], + ["name", + 2], + ["refreshDate", + 10], + ["rowsLoadedCount", + 2], + ["error", + 2]]], + ["QueryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Query", + 1, + 18, + 0, + 4]], + 0, + "Query"], + ["VisualTracker", + 0, + [["id", + 2]], + 0, + [["_RegisterEventModelChanged", + 0, + 2], + ["_UnregisterEventModelChanged", + 0, + 2], + ["requestTrackingAlteration", + 2, + 2, + 0, + 4]], + 0, + 0, + 0, + [["ModelChanged", + 0, + 0, + "MessageType.visualTrackerModelChangedEvent", + "this.id", + "_RegisterEventModelChanged", + "_UnregisterEventModelChanged"]]], + ["NumberFormatProperty", + 0, + [["key", + 3], + ["currency", + 3], + ["dateTime", + 3], + ["dateTimeHasDayOfWeek", + 3], + ["dateTimeHasMonth", + 3], + ["dateTimeHasYear", + 3], + ["numeric", + 3], + ["percent", + 3], + ["text", + 3]]], + ["NumberFormatPropertyCollection", + 1, + 0, + 0, + 0, + [["getItemAt", + "NumberFormatProperty", + 1, + 2, + 0, + 4]], + 0, + "NumberFormatProperty"], + ["RangeOptimization", + 0, + [["optimizationTypes", + 2], + ["range", + 2]]], + ["RangeOptimizationCollection", + 1, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeOptimization", + 1, + 2, + 0, + 4]], + 0, + "RangeOptimization"], + ["WorksheetOptimization", + 0, + 0, + 0, + 0, + [["optimize", + "WorksheetOptimizationResult", + 0, + 0, + 0, + 2], + ["scan", + "RangeOptimizationCollection", + 0, + 6, + 0, + 4], + ["scanExtended", + "WorksheetOptimizationScanResult", + 0, + 2, + 0, + 4]]], + ["WorksheetOptimizationResult", + 0, + [["allocatedCells", + 2], + ["optimizedCells", + 2]]], + ["LinkedWorkbook", + 0, + [["displayUrl", + 2, + 3], + ["fileName", + 3, + 3], + ["id", + 2], + ["longErrorDescription", + 2, + 3], + ["refreshEnabled", + 2, + 3], + ["refreshing", + 2, + 3], + ["statusMessage", + 2, + 3], + ["excelIconState", + 2, + 3], + ["hardToFindErrorMessages", + 2, + 3], + ["lastUpdated", + 10, + 3]], + 0, + [["_RegisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["breakLinks"], + ["changeSource", + 1, + 0, + 3], + ["findNextLink", + 0, + 2, + 3, + 4], + ["openWorkbook", + 0, + 2, + 3, + 4], + ["refresh"], + ["openChangeSourceDialog", + 0, + 0, + 3], + ["closeChangeSourceDialog", + 0, + 0, + 3]], + 0, + 0, + 0, + [["RefreshCompleted", + 0, + 3, + "MessageType.linkedWorkbookRefreshCompletedEvent", + "this.id", + "_RegisterRefreshCompletedEvent", + "_UnregisterRefreshCompletedEvent"]]], + ["LinkedWorkbookCollection", + 1, + [["breakAllLinksEnabled", + 0, + 3], + ["refreshAllEnabled", + 0, + 3], + ["workbookLinksRefreshMode"], + ["workbookLinksRefreshSettings", + 0, + 3], + ["containsNonWorkbookLinks", + 0, + 3]], + 0, + [["_RegisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["_UnregisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["breakAllLinks"], + ["getCount", + 0, + 2, + 3, + 4], + ["refreshAll"], + ["openEditLinksDialog", + 0, + 2, + 3, + 4]], + [["getItem", + "LinkedWorkbook", + 1, + 18, + 0, + 4], + ["getItemAt", + "LinkedWorkbook", + 1, + 2, + 3, + 4], + ["getItemOrNullObject", + "LinkedWorkbook", + 1]], + 0, + "LinkedWorkbook", + [["WorkbookLinksChanged", + 0, + 3, + "MessageType.linkedWorkbookWorkbookLinksChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWorkbookLinksChangedEvent", + "_UnregisterWorkbookLinksChangedEvent"]]], + ["DocumentTaskChange", + 0, + [["type", + 2], + ["changedBy", + 2], + ["commentId", + 2], + ["createdDateTime", + 10], + ["id", + 2], + ["assignee", + 2], + ["undoChangeId", + 2], + ["priority", + 2], + ["title", + 2], + ["percentComplete", + 2], + ["startDateTime", + 10], + ["dueDateTime", + 10]], + 0, + 0, + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.DocumentTaskChange", + 4], + ["DocumentTaskChangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "DocumentTaskChange", + 1, + 2, + 0, + 4]], + 0, + "DocumentTaskChange"], + ["RangePicker", + 0, + 0, + 0, + [["activate", + 1, + 0, + 0, + 2, + 0, + 4], + ["deactivate", + 0, + 0, + 0, + 2, + 0, + 4], + ["updateSelection", + 1, + 0, + 0, + 2, + 0, + 4], + ["updateSelectionWithNavigation", + 4, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_UnregisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventDeactivated", + 0, + 2, + 0, + 4], + ["_UnregisterEventDeactivated", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Deactivated", + 0, + 0, + "MessageType.rangePickerDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventDeactivated", + "_UnregisterEventDeactivated"], + ["SelectionChanged", + 0, + 0, + "MessageType.rangePickerSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventSelectionChanged", + "_UnregisterEventSelectionChanged"]]], + ["DocumentTask", + 0, + [["startAndDueDateTime"], + ["id", + 2], + ["percentComplete"], + ["priority"], + ["title"], + ["assignees", + 2], + ["completedBy", + 2], + ["completedDateTime", + 10], + ["createdBy", + 2], + ["createdDateTime", + 10]], + [["changes", + "DocumentTaskChangeCollection", + 18, + 0, + 0, + 4], + ["comment", + "Comment", + 2, + 0, + 0, + 4]], + [["assign", + 1], + ["unassign", + 1], + ["unassignAll"]]], + ["DocumentTaskCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "DocumentTask", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DocumentTask", + 1, + 2, + 0, + 4], + ["getItemAt", + "DocumentTask", + 1, + 2, + 0, + 4]], + 0, + "DocumentTask"], + ["DataConnection", + 0, + [["connectionString", + 2], + ["name", + 2], + ["commandText", + 2], + ["dataSourceType", + 2]]], + ["Runtime", + 0, + [["enableEvents", + 1, + 5]]], + ["Application", + 0, + [["calculationMode", + 1], + ["calculationEngineVersion", + 3, + 6], + ["calculationState", + 3, + 6], + ["decimalSeparator", + 3, + 7], + ["thousandsSeparator", + 3, + 7], + ["useSystemSeparators", + 3, + 7], + ["formatStaleValues", + 1, + 8]], + [["iterativeCalculation", + "IterativeCalculation", + 35, + 6, + 0, + 4], + ["ribbon", + "Ribbon", + 35, + 6, + 0, + 4], + ["cultureInfo", + "CultureInfo", + 3, + 7, + 0, + 4], + ["undoScope", + "UndoScope", + 3, + 3, + 0, + 4]], + [["calculate", + 1], + ["suspendApiCalculationUntilNextSync", + 0, + 1, + 9, + 2, + 0, + 10], + ["suspendScreenUpdatingUntilNextSync", + 0, + 0, + 6, + 2, + 0, + 10], + ["hasLicense", + 1, + 2, + 8, + 4], + ["redo", + 0, + 0, + 3, + 2], + ["explorePremiumLicense", + 1, + 2, + 8, + 4], + ["undo", + 0, + 0, + 3, + 2], + ["_RegisterEventUndoChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventUndoChanged", + 0, + 2, + 3, + 4]], + [["createWorkbook", + "WorkbookCreated", + 1, + 10, + 5, + 0, + 0, + "_GetWorkbookCreatedById"], + ["_GetWorkbookCreatedById", + "WorkbookCreated", + 1, + 2, + 5, + 4]], + 0, + 0, + [["UndoChanged", + 0, + 3, + "MessageType.applicationUndoChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUndoChanged", + "_UnregisterEventUndoChanged"]]], + ["IterativeCalculation", + 0, + [["enabled", + 1], + ["maxIteration", + 1], + ["maxChange", + 1]]], + ["Workbook", + 0, + [["name", + 3, + 11], + ["readOnly", + 3, + 5], + ["isDirty", + 1, + 6], + ["use1904DateSystem", + 1, + 8], + ["chartDataPointTrack", + 1, + 6], + ["usePrecisionAsDisplayed", + 1, + 6], + ["calculationEngineVersion", + 3, + 6], + ["autoSave", + 3, + 6], + ["previouslySaved", + 3, + 6], + ["showPivotFieldList", + 0, + 8, + 0, + 2, + 12], + ["formulaReferenceStyle", + 2, + 3]], + [["worksheets", + "WorksheetCollection", + 19, + 0, + 0, + 4], + ["names", + "NamedItemCollection", + 19, + 0, + 0, + 4], + ["tables", + "TableCollection", + 19, + 0, + 0, + 4], + ["application", + "Application", + 2, + 0, + 0, + 4], + ["bindings", + "BindingCollection", + 19, + 0, + 0, + 4], + ["functions", + "Functions", + 2, + 13, + 0, + 4], + ["_V1Api", + "_V1Api", + 2, + 14, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 19, + 14, + 0, + 4], + ["settings", + "SettingCollection", + 19, + 15, + 0, + 4], + ["customXmlParts", + "CustomXmlPartCollection", + 19, + 16, + 0, + 4], + ["internalTest", + "InternalTest", + 2, + 9, + 0, + 4], + ["properties", + "DocumentProperties", + 35, + 11, + 0, + 4], + ["styles", + "StyleCollection", + 19, + 11, + 0, + 4], + ["protection", + "WorkbookProtection", + 3, + 11, + 0, + 4], + ["dataConnections", + "DataConnectionCollection", + 3, + 11, + 0, + 4], + ["_Runtime", + "Runtime", + 2, + 16, + 0, + 4], + ["comments", + "CommentCollection", + 19, + 17, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["tableStyles", + "TableStyleCollection", + 19, + 17, + 0, + 4], + ["pivotTableStyles", + "PivotTableStyleCollection", + 19, + 17, + 0, + 4], + ["slicerStyles", + "SlicerStyleCollection", + 19, + 17, + 0, + 4], + ["timelineStyles", + "TimelineStyleCollection", + 19, + 17, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["linkedDataTypes", + "LinkedDataTypeCollection", + 18, + 8, + 0, + 4], + ["queries", + "QueryCollection", + 18, + 18, + 0, + 4], + ["linkedWorkbooks", + "LinkedWorkbookCollection", + 18, + 19, + 0, + 4], + ["rangePicker", + "RangePicker", + 2, + 8, + 0, + 4, + 0, + 4], + ["lineageActivities", + "LineageActivityCollection", + 18, + 3, + 0, + 4], + ["businessBar", + "BusinessBar", + 2, + 8, + 0, + 4], + ["guidedReapply", + "GuidedReapplyManager", + 2, + 3, + 0, + 4], + ["vbaRecorder", + "VbaRecorder", + 2, + 8, + 0, + 4], + ["externalCodeService", + "ExternalCodeService", + 2, + 8, + 0, + 4], + ["augmentationLoop", + "AugmentationLoop", + 2, + 8, + 0, + 4]], + [["_RemoveReference", + 1, + 2], + ["_GetObjectByReferenceId", + 1, + 2, + 0, + 4], + ["_GetObjectTypeNameByReferenceId", + 1, + 2, + 0, + 4], + ["_RemoveAllReferences", + 0, + 2], + ["_GetReferenceCount", + 0, + 2, + 0, + 4], + ["getIsActiveCollabSession", + 0, + 0, + 6], + ["registerCustomFunctions", + 7, + 0, + 20, + 8], + ["_SetOsfControlContainerReadyForCustomFunctions", + 0, + 0, + 20], + ["close", + 1, + 0, + 7], + ["save", + 1, + 0, + 7], + ["_RegisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_UnregisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_RegisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_UnregisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_RegisterActivatedEvent", + 0, + 2, + 23], + ["_UnregisterActivatedEvent", + 0, + 2, + 23], + ["insertWorksheetsFromBase64", + 2, + 0, + 23], + ["enableOfficeScriptRecording", + 1, + 1, + 19], + ["recordAction", + 1, + 3, + 0, + 4], + ["focus", + 0, + 2, + 3, + 4], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["showHelp", + 1, + 2, + 3, + 4], + ["getLinkedEntityCellValue", + 1, + 2, + 24, + 4], + ["getThemeColors", + 0, + 2, + 8, + 4], + ["_RegisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["notifySDXLoaded", + 1, + 2, + 3, + 4], + ["openConditionalFormattingRulesManager", + 1, + 0, + 3], + ["openNameManager", + 0, + 0, + 3], + ["_RegisterEventActionRecorded", + 0, + 2, + 2, + 4], + ["_UnregisterEventActionRecorded", + 0, + 2, + 2, + 4]], + [["getSelectedRange", + "Range", + 0, + 10, + 0, + 4], + ["getActiveCell", + "Range", + 0, + 10, + 11, + 4], + ["_GetRangeForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["_GetRangeOrNullObjectForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["getActiveChart", + "Chart", + 0, + 2, + 6, + 4], + ["getActiveChartOrNullObject", + "Chart", + 0, + 2, + 6, + 4], + ["getSelectedRanges", + "RangeAreas", + 0, + 10, + 6, + 4], + ["_GetRangesForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["_GetRangesOrNullObjectForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["getActiveSlicer", + "Slicer", + 0, + 2, + 17, + 4], + ["getActiveSlicerOrNullObject", + "Slicer", + 0, + 2, + 17, + 4]], + 0, + 0, + [["ActionRecorded", + 0, + 2, + "MessageType.workbookActionRecordedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventActionRecorded", + "_UnregisterEventActionRecorded"], + ["Activated", + 0, + 23, + "MessageType.workbookActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["AutoSaveSettingChanged", + 0, + 6, + "MessageType.workbookAutoSaveSettingChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAutoSaveSettingChangedEvent", + "_UnregisterAutoSaveSettingChangedEvent"], + ["FormulaReferenceStyleChanged", + 0, + 3, + "MessageType.workbookFormulaReferenceStyleChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFormulaReferenceStyleChanged", + "_UnregisterEventFormulaReferenceStyleChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.workbookNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["RecordingStateChangedEvent", + 0, + 21, + "MessageType.recordingStateChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRecordingStateChangedEvent", + "_UnregisterRecordingStateChangedEvent"], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdDocumentSelectionChangedEvent", + "", + "", + ""], + ["WACOperationEvent", + 2, + 21, + "MessageType.wacoperationEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWACOperationEvent", + "_UnregisterWACOperationEvent"], + ["_Message", + 3, + 11, + "_CC.office10EventIdRichApiMessageEvent", + "", + "", + ""]]], + ["WorkbookProtection", + 0, + [["protected", + 3]], + 0, + [["protect", + 1], + ["unprotect", + 1]]], + ["WorkbookCreated", + 0, + [["id", + 3]], + 0, + [["open", + 0, + 2, + 0, + 4]]], + ["Worksheet", + 0, + [["name", + 1], + ["id", + 3], + ["position", + 1], + ["visibility", + 1], + ["tabColor", + 1, + 11, + 0, + 2, + 25], + ["standardWidth", + 1, + 11], + ["standardHeight", + 3, + 11], + ["showGridlines", + 5, + 5, + 0, + 2, + 26], + ["showHeadings", + 5, + 5], + ["enableCalculation", + 1, + 6], + ["tabId", + 3, + 18]], + [["charts", + "ChartCollection", + 83, + 0, + 0, + 4], + ["tables", + "TableCollection", + 83, + 0, + 0, + 4], + ["protection", + "WorksheetProtection", + 3, + 13, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 83, + 14, + 0, + 4], + ["names", + "NamedItemCollection", + 83, + 15, + 0, + 4], + ["freezePanes", + "WorksheetFreezePanes", + 3, + 11, + 0, + 4], + ["pageLayout", + "PageLayout", + 35, + 6, + 0, + 4], + ["visuals", + "VisualCollection", + 83, + 17, + 0, + 4], + ["shapes", + "ShapeCollection", + 83, + 6, + 0, + 4], + ["horizontalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["verticalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["comments", + "CommentCollection", + 83, + 17, + 0, + 4], + ["customProperties", + "WorksheetCustomPropertyCollection", + 19, + 27, + 0, + 4], + ["namedSheetViews", + "NamedSheetViewCollection", + 18, + 19, + 0, + 4], + ["optimization", + "WorksheetOptimization", + 2, + 8, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["visualTracker", + "VisualTracker", + 2, + 28, + 0, + 4], + ["rangeValuesPreview", + "RangeValuesPreview", + 66, + 8, + 0, + 4]], + [["delete"], + ["activate", + 0, + 2], + ["calculate", + 1, + 0, + 9], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_RegisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["replaceAll", + 3, + 0, + 6], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["showOutlineLevels", + 2, + 0, + 17], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getRange", + "Range", + 1, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRangeByIndexes", + "Range", + 4, + 10, + 11, + 4], + ["getPrevious", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getPreviousOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNext", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNextOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["_GetSheetById", + "Worksheet", + 1, + 2, + 11, + 4], + ["copy", + "Worksheet", + 2, + 0, + 11, + 0, + 0, + "_GetAnotherWorksheetById"], + ["_GetAnotherWorksheetById", + "Worksheet", + 1, + 0, + 11], + ["findAll", + "RangeAreas", + 2, + 10, + 6, + 4], + ["findAllOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getRanges", + "RangeAreas", + 1, + 10, + 6, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 0, + 3], + ["getRangeR1C1", + "Range", + 1, + 2, + 3, + 4], + ["getRangesR1C1", + "RangeAreas", + 1, + 2, + 3, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 0, + 3]], + "workbook.worksheets", + 0, + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "this.id", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 11, + "MessageType.worksheetDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "this.id", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "this.id", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "this.id", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "this.id", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.worksheetNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "this.id", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "this.id", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "this.id", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "this.id", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 11, + "MessageType.worksheetSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "this.id", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "this.id", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetCollection", + 1, + 0, + 0, + [["getCount", + 1, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 3, + 11], + ["_UnregisterAddedEvent", + 0, + 3, + 11], + ["_RegisterActivatedEvent", + 0, + 3, + 11], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 3, + 11], + ["_UnregisterDeletedEvent", + 0, + 3, + 11], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 3, + 6], + ["_UnregisterDataChangedEvent", + 0, + 3, + 6], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["addFromBase64", + 4, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 3, + 17], + ["_UnregisterRowSortedEvent", + 0, + 3, + 17], + ["_RegisterColumnSortedEvent", + 0, + 3, + 17], + ["_UnregisterColumnSortedEvent", + 0, + 3, + 17], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getItem", + "Worksheet", + 1, + 18, + 0, + 4], + ["add", + "Worksheet", + 1, + 8, + 0, + 2, + 0, + 0, + 29], + ["getActiveWorksheet", + "Worksheet", + 0, + 2, + 0, + 4], + ["getItemOrNullObject", + "Worksheet", + 1, + 2, + 15, + 4], + ["getFirst", + "Worksheet", + 1, + 10, + 16, + 4], + ["getLast", + "Worksheet", + 1, + 10, + 16, + 4]], + 0, + "Worksheet", + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 11, + "MessageType.worksheetAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 6, + "MessageType.worksheetDataChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 11, + "MessageType.worksheetDeletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["Moved", + 0, + 30, + "MessageType.worksheetMovedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventMoved", + "_UnregisterEventMoved"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 6, + "MessageType.worksheetSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetProtection", + 0, + [["protected", + 3], + ["options", + 3], + ["canPauseProtection", + 3, + 19], + ["isPasswordProtected", + 3, + 19], + ["isPaused", + 3, + 19], + ["savedOptions", + 3, + 19]], + [["allowEditRanges", + "AllowEditRangeCollection", + 19, + 19, + 0, + 4]], + [["protect", + 2, + 1], + ["unprotect", + 1], + ["checkPassword", + 1, + 2, + 19, + 4], + ["pauseProtection", + 1, + 0, + 19], + ["resumeProtection", + 0, + 0, + 19], + ["setPassword", + 1, + 0, + 19], + ["updateOptions", + 1, + 0, + 19]]], + ["WorksheetFreezePanes", + 0, + 0, + 0, + [["unfreeze"], + ["freezeAt", + 1], + ["freezeRows", + 1], + ["freezeColumns", + 1]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getLocationOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["Range", + 14, + [["numberFormat", + 5, + 0, + 0, + 2, + 31], + ["numberFormatLocal", + 1, + 11, + 0, + 2, + 31], + ["values", + 5, + 0, + 0, + 2, + 31], + ["text", + 3], + ["formulas", + 5, + 0, + 0, + 2, + 32], + ["formulasLocal", + 5, + 0, + 0, + 2, + 32], + ["rowIndex", + 3], + ["columnIndex", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["address", + 3], + ["addressLocal", + 3], + ["cellCount", + 3], + ["_ReferenceId", + 2], + ["valueTypes", + 3], + ["formulasR1C1", + 5, + 13], + ["hidden", + 3, + 13], + ["rowHidden", + 1, + 13, + 0, + 2, + 32], + ["columnHidden", + 1, + 13, + 0, + 2, + 32], + ["isEntireColumn", + 3, + 11], + ["isEntireRow", + 3, + 11], + ["hyperlink", + 1, + 11, + 0, + 2, + 33], + ["style", + 1, + 11, + 0, + 2, + 32], + ["linkedDataTypeState", + 3, + 6], + ["hasSpill", + 3, + 27], + ["top", + 3, + 17], + ["left", + 3, + 17], + ["height", + 3, + 17], + ["width", + 3, + 17], + ["savedAsArray", + 3, + 27], + ["numberFormatCategories", + 3, + 27], + ["valuesAsJson", + 5, + 24], + ["valuesAsJsonLocal", + 5, + 24], + ["addressR1C1", + 2, + 3]], + [["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["sort", + "RangeSort", + 3, + 13, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 9, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 5, + 0, + 4]], + [["clear", + 1, + 0, + 0, + 2, + 0, + 32], + ["delete", + 1, + 0, + 0, + 2, + 0, + 34], + ["select", + 0, + 2], + ["_KeepReference", + 0, + 2], + ["merge", + 1, + 0, + 13, + 2, + 0, + 32], + ["unmerge", + 0, + 0, + 13], + ["_ValidateArraySize", + 2, + 2, + 14, + 4], + ["calculate", + 0, + 0, + 9], + ["showCard", + 0, + 0, + 11], + ["getImage", + 0, + 2, + 11, + 4], + ["replaceAll", + 3, + 0, + 6, + 2, + 0, + 32], + ["copyFrom", + 4, + 0, + 6, + 2, + 0, + 26], + ["convertToLinkedDataType", + 2, + 0, + 6], + ["convertDataTypeToText", + 0, + 0, + 6], + ["setDirty", + 0, + 0, + 6], + ["getCellProperties", + 1, + 0, + 6], + ["getRowProperties", + 1, + 0, + 6], + ["getColumnProperties", + 1, + 0, + 6], + ["setCellProperties", + 1, + 0, + 6], + ["setRowProperties", + 1, + 0, + 6], + ["setColumnProperties", + 1, + 0, + 6], + ["autoFill", + 2, + 0, + 6], + ["showTeachingCallout", + 2, + 0, + 6], + ["flashFill", + 0, + 0, + 6], + ["group", + 1, + 0, + 17], + ["ungroup", + 1, + 0, + 17], + ["showGroupDetails", + 1, + 0, + 17], + ["hideGroupDetails", + 1, + 0, + 17], + ["moveTo", + 1, + 0, + 7, + 2, + 0, + 26], + ["getDataClassificationIds", + 0, + 2, + 19, + 4]], + [["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["insert", + "Range", + 1, + 8, + 0, + 2, + 0, + 0, + 34], + ["getEntireColumn", + "Range", + 0, + 10, + 0, + 4], + ["getEntireRow", + "Range", + 0, + 10, + 0, + 4], + ["getOffsetRange", + "Range", + 2, + 10, + 0, + 4], + ["getRow", + "Range", + 1, + 10, + 0, + 4], + ["getColumn", + "Range", + 1, + 10, + 0, + 4], + ["getIntersection", + "Range", + 1, + 10, + 0, + 4], + ["getBoundingRect", + "Range", + 1, + 10, + 0, + 4], + ["getLastCell", + "Range", + 0, + 10, + 0, + 4], + ["getLastColumn", + "Range", + 0, + 10, + 0, + 4], + ["getLastRow", + "Range", + 0, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRowsAbove", + "Range", + 1, + 11, + 14, + 4], + ["getRowsBelow", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsBefore", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsAfter", + "Range", + 1, + 11, + 14, + 4], + ["getResizedRange", + "Range", + 2, + 11, + 14, + 4], + ["getVisibleView", + "RangeView", + 0, + 2, + 14, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getSurroundingRegion", + "Range", + 0, + 10, + 11, + 4], + ["getAbsoluteResizedRange", + "Range", + 2, + 10, + 11, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 6, + 4], + ["find", + "Range", + 2, + 10, + 6, + 4], + ["findOrNullObject", + "Range", + 2, + 10, + 6, + 4], + ["removeDuplicates", + "RemoveDuplicatesResult", + 2, + 8, + 6, + 2, + 0, + 0, + 33], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpillingToRange", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParent", + "Range", + 0, + 10, + 27, + 4], + ["getSpillingToRangeOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParentOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getMergedAreas", + "RangeAreas", + 0, + 10, + 19, + 4], + ["getPivotTables", + "PivotTableScopedCollection", + 1, + 6, + 27, + 4], + ["getPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 18, + 4], + ["getDirectPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 27, + 4], + ["getDependents", + "WorkbookRangeAreas", + 0, + 10, + 35, + 4], + ["getDirectDependents", + "WorkbookRangeAreas", + 0, + 10, + 23, + 4], + ["getExtendedRange", + "Range", + 2, + 10, + 23, + 4], + ["getRangeEdge", + "Range", + 2, + 10, + 23, + 4], + ["getNumberFormatProperties", + "NumberFormatPropertyCollection", + 0, + 6, + 8, + 4], + ["getSurroundingDataRegion", + "Range", + 0, + 2, + 8, + 4], + ["getMergedAreasOrNullObject", + "RangeAreas", + 0, + 0, + 23, + 2, + 0, + 0, + 31]]], + ["RangeAreas", + 2, + [["_ReferenceId", + 2], + ["address", + 3], + ["addressLocal", + 3], + ["areaCount", + 3], + ["cellCount", + 3], + ["isEntireColumn", + 3], + ["isEntireRow", + 3], + ["style", + 1], + ["addressR1C1", + 2, + 3]], + [["areas", + "RangeCollection", + 19, + 0, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 0, + 0, + 4], + ["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2], + ["calculate"], + ["clear", + 1], + ["setDirty"], + ["copyFrom", + 4], + ["convertToLinkedDataType", + 2], + ["convertDataTypeToText"], + ["select", + 0, + 2, + 8]], + [["getEntireColumn", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getEntireRow", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getIntersection", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getOffsetRangeAreas", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 0, + 4], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 0, + 4]]], + ["WorkbookRangeAreas", + 2, + [["_ReferenceId", + 2], + ["addresses", + 3]], + [["ranges", + "RangeCollection", + 19, + 0, + 0, + 4], + ["areas", + "RangeAreasCollection", + 19, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2]], + [["getRangeAreasBySheet", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getRangeAreasOrNullObjectBySheet", + "RangeAreas", + 1, + 10, + 0, + 4]]], + ["RangeView", + 0, + [["numberFormat", + 1], + ["values", + 1], + ["text", + 3], + ["formulas", + 1], + ["formulasLocal", + 1], + ["formulasR1C1", + 1], + ["valueTypes", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["cellAddresses", + 3], + ["index", + 3], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["rows", + "RangeViewCollection", + 19, + 0, + 0, + 4]], + 0, + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["RangeViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "RangeView", + 1, + 2, + 0, + 4]], + 0, + "RangeView"], + ["SettingCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Setting", + 1, + 18, + 0, + 4], + ["add", + "Setting", + 2, + 9], + ["getItemOrNullObject", + "Setting", + 1, + 2, + 0, + 4]], + 0, + "Setting", + [["SettingsChanged", + 3, + 0, + "_CC.office10EventIdSettingsChangedEvent", + "", + "", + ""]]], + ["Setting", + 8, + [["key", + 3], + ["value", + 5], + ["_Id", + 2]], + 0, + [["delete"]]], + ["NamedItemCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "NamedItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "NamedItem", + 1, + 2, + 15, + 4], + ["add", + "NamedItem", + 3, + 8, + 15], + ["addFormulaLocal", + "NamedItem", + 3, + 0, + 15]], + 0, + "NamedItem", + [["Added", + 0, + 3, + "MessageType.namedItemAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.namedItemDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["NamedItem", + 0, + [["name", + 3], + ["type", + 3], + ["value", + 3], + ["visible", + 1], + ["_Id", + 2], + ["comment", + 1, + 15], + ["scope", + 3, + 15], + ["formula", + 1, + 11], + ["valueAsJson", + 3, + 24], + ["valueAsJsonLocal", + 3, + 24]], + [["worksheet", + "Worksheet", + 2, + 15, + 0, + 4], + ["worksheetOrNullObject", + "Worksheet", + 2, + 15, + 0, + 4], + ["arrayValues", + "NamedItemArrayValues", + 3, + 11, + 0, + 4]], + [["delete", + 0, + 0, + 15]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 15, + 4]]], + ["NamedItemArrayValues", + 0, + [["values", + 3], + ["types", + 3], + ["valuesAsJson", + 3, + 24], + ["valuesAsJsonLocal", + 3, + 24]]], + ["Binding", + 0, + [["id", + 3], + ["type", + 3]], + 0, + [["getText", + 0, + 2, + 0, + 4], + ["delete", + 0, + 0, + 14]], + [["getTable", + "Table", + 0, + 2, + 0, + 4], + ["getRange", + "Range", + 0, + 2, + 0, + 4]], + 0, + 0, + [["DataChanged", + 3, + 14, + "_CC.office10EventIdBindingDataChangedEvent", + "this.id", + "", + ""], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdBindingSelectionChangedEvent", + "this.id", + "", + ""]]], + ["BindingCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "Binding", + 1, + 18, + 0, + 4], + ["getItemAt", + "Binding", + 1, + 2, + 0, + 4], + ["add", + "Binding", + 3, + 8, + 14], + ["addFromNamedItem", + "Binding", + 3, + 0, + 14], + ["addFromSelection", + "Binding", + 2, + 0, + 14], + ["getItemOrNullObject", + "Binding", + 1, + 2, + 15, + 4]], + 0, + "Binding"], + ["TableCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1]], + [["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemAt", + "Table", + 1, + 2, + 0, + 4], + ["add", + "Table", + 2, + 8, + 0, + 2, + 0, + 0, + 33], + ["getItemOrNullObject", + "Table", + 1, + 2, + 15, + 4], + ["addQueryTable", + "Table", + 2, + 0, + 8]], + 0, + "Table", + [["Added", + 0, + 6, + "MessageType.tableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this._eventTargetId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Deleted", + 0, + 6, + "MessageType.tableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this._eventTargetId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"]]], + ["TableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getFirst", + "Table", + 0, + 10, + 0, + 4], + ["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Table", + 1, + 2, + 18, + 4]], + 0, + "Table"], + ["Table", + 24, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 26], + ["showHeaders", + 1, + 0, + 0, + 2, + 33], + ["showTotals", + 1, + 0, + 0, + 2, + 33], + ["style", + 1, + 0, + 0, + 2, + 33], + ["highlightFirstColumn", + 1, + 14, + 0, + 2, + 33], + ["highlightLastColumn", + 1, + 14, + 0, + 2, + 33], + ["showBandedRows", + 1, + 14, + 0, + 2, + 33], + ["showBandedColumns", + 1, + 14, + 0, + 2, + 33], + ["showFilterButton", + 1, + 14, + 0, + 2, + 33], + ["legacyId", + 3, + 5]], + [["columns", + "TableColumnCollection", + 19, + 0, + 0, + 4], + ["rows", + "TableRowCollection", + 19, + 0, + 0, + 4], + ["sort", + "TableSort", + 3, + 13, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["tableStyle", + "TableStyle", + 35, + 8, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearFilters", + 0, + 0, + 13], + ["reapplyFilters", + 0, + 0, + 13, + 2, + 0, + 26], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["clearStyle", + 0, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["resize", + 1, + 0, + 23, + 2, + 0, + 26], + ["setStyle", + 1, + 0, + 8]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4], + ["convertToRange", + "Range", + 0, + 8, + 13, + 2, + 0, + 0, + 26]], + "workbook.tables", + 0, + [["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["SelectionChanged", + 2, + 11, + "MessageType.tableSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["TableColumnCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "TableColumn", + 1, + 18, + 0, + 4], + ["getItemAt", + "TableColumn", + 1, + 2, + 0, + 4], + ["add", + "TableColumn", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["getItemOrNullObject", + "TableColumn", + 1, + 2, + 15, + 4], + ["addAsJson", + "TableColumn", + 3, + 0, + 24]], + 0, + "TableColumn"], + ["TableColumn", + 0, + [["id", + 3], + ["index", + 3], + ["values", + 1], + ["name", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["filter", + "Filter", + 3, + 13, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4]]], + ["TableRowCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["deleteRows", + 1, + 0, + 19], + ["deleteRowsAt", + 2, + 0, + 19, + 2, + 0, + 26]], + [["getItemAt", + "TableRow", + 1, + 2, + 0, + 4], + ["add", + "TableRow", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["addAsJson", + "TableRow", + 3, + 0, + 24]], + 0, + "TableRow"], + ["TableRow", + 0, + [["index", + 3], + ["values", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + 0, + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["DataValidation", + 0, + [["type", + 3], + ["rule", + 1], + ["prompt", + 1], + ["errorAlert", + 1], + ["ignoreBlanks", + 1], + ["valid", + 3]], + 0, + [["clear"]], + [["getInvalidCells", + "RangeAreas", + 0, + 10, + 6, + 4], + ["getInvalidCellsOrNullObject", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["RemoveDuplicatesResult", + 0, + [["removed", + 3], + ["uniqueRemaining", + 3]]], + ["RangeFormat", + 0, + [["wrapText", + 1, + 0, + 0, + 2, + 32], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 32], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 32], + ["columnWidth", + 1, + 13, + 0, + 2, + 32], + ["rowHeight", + 1, + 13, + 0, + 2, + 32], + ["textOrientation", + 1, + 11, + 0, + 2, + 32], + ["useStandardHeight", + 1, + 11], + ["useStandardWidth", + 1, + 11], + ["readingOrder", + 1, + 6], + ["shrinkToFit", + 1, + 6], + ["indentLevel", + 1, + 6, + 0, + 2, + 32], + ["autoIndent", + 1, + 6]], + [["fill", + "RangeFill", + 35, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["protection", + "FormatProtection", + 35, + 13, + 0, + 4]], + [["autofitColumns", + 0, + 0, + 13, + 2, + 0, + 32], + ["autofitRows", + 0, + 0, + 13, + 2, + 0, + 32], + ["adjustIndent", + 1, + 0, + 7, + 2, + 0, + 34]]], + ["FormatProtection", + 0, + [["locked", + 1], + ["formulaHidden", + 1]]], + ["RangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6], + ["patternTintAndShade", + 1, + 6], + ["pattern", + 1, + 6], + ["patternColor", + 1, + 6]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 32]]], + ["RangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 32], + ["weight", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6]]], + ["RangeBorderCollection", + 1, + [["count", + 3], + ["tintAndShade", + 1, + 6]], + 0, + 0, + [["getItem", + "RangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "RangeBorder", + 1, + 2, + 0, + 4]], + 0, + "RangeBorder"], + ["RangeFont", + 0, + [["name", + 1, + 0, + 0, + 2, + 32], + ["size", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 12], + ["italic", + 1, + 0, + 0, + 2, + 32], + ["bold", + 1, + 0, + 0, + 2, + 32], + ["underline", + 1, + 0, + 0, + 2, + 32], + ["strikethrough", + 1, + 6, + 0, + 2, + 32], + ["subscript", + 1, + 6], + ["superscript", + 1, + 6], + ["tintAndShade", + 1, + 6]]], + ["ChartCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29]], + [["add", + "Chart", + 3, + 9, + 0, + 2, + 0, + 0, + 36], + ["getItemAt", + "Chart", + 1, + 2, + 0, + 4], + ["_GetItem", + "Chart", + 1, + 18, + 0, + 4], + ["getItem", + "Chart", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Chart", + 1, + 2, + 15, + 4]], + 0, + "Chart", + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this._ParentObject.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 5, + "MessageType.chartAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this._ParentObject.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 5, + "MessageType.chartDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Chart", + 0, + [["name", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 36], + ["left", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["height", + 1, + 0, + 0, + 2, + 36], + ["id", + 3, + 11], + ["showAllFieldButtons", + 1, + 11, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 37], + ["showDataLabelsOverMaximum", + 1, + 5, + 0, + 2, + 37], + ["categoryLabelLevel", + 1, + 5, + 0, + 2, + 37], + ["style", + 1, + 5, + 0, + 2, + 37], + ["displayBlanksAs", + 1, + 5, + 0, + 2, + 37], + ["plotBy", + 1, + 5, + 0, + 2, + 37], + ["plotVisibleOnly", + 1, + 5, + 0, + 2, + 37], + ["seriesNameLevel", + 1, + 5, + 0, + 2, + 37]], + [["title", + "ChartTitle", + 35, + 0, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 0, + 0, + 4], + ["legend", + "ChartLegend", + 35, + 0, + 0, + 4], + ["series", + "ChartSeriesCollection", + 19, + 0, + 0, + 4], + ["axes", + "ChartAxes", + 35, + 0, + 0, + 4], + ["format", + "ChartAreaFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["plotArea", + "ChartPlotArea", + 35, + 5, + 0, + 4], + ["pivotOptions", + "ChartPivotOptions", + 35, + 6, + 0, + 4]], + [["setData", + 2, + 1, + 0, + 2, + 0, + 36], + ["delete", + 0, + 0, + 0, + 2, + 0, + 36], + ["setPosition", + 2, + 0, + 0, + 2, + 0, + 36], + ["getImage", + 3, + 2, + 13, + 4], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["activate", + 0, + 2, + 6], + ["getDataRange", + 0, + 0, + 28], + ["getDataRangeOrNullObject", + 0, + 0, + 28]], + [["getDataTable", + "ChartDataTable", + 0, + 2, + 18, + 4], + ["getDataTableOrNullObject", + "ChartDataTable", + 0, + 2, + 18, + 4]], + 0, + 0, + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["ChartPivotOptions", + 0, + [["showAxisFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showLegendFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showReportFilterFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showValueFieldButtons", + 1, + 0, + 0, + 2, + 37]]], + ["ChartAreaFormat", + 0, + [["roundedCorners", + 1, + 6, + 0, + 2, + 37], + ["colorScheme", + 1, + 6, + 0, + 2, + 37]], + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartSeriesCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartSeries", + 1, + 2, + 0, + 4], + ["add", + "ChartSeries", + 2, + 8, + 11, + 2, + 0, + 0, + 36]], + 0, + "ChartSeries"], + ["ChartSeries", + 0, + [["name", + 1, + 0, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 10], + ["hasDataLabels", + 1, + 11, + 0, + 2, + 37], + ["filtered", + 1, + 11, + 0, + 2, + 37], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["showShadow", + 1, + 11, + 0, + 2, + 37], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36], + ["smooth", + 1, + 11, + 0, + 2, + 37], + ["plotOrder", + 1, + 11, + 0, + 2, + 37], + ["gapWidth", + 1, + 11, + 0, + 2, + 36], + ["doughnutHoleSize", + 1, + 11, + 0, + 2, + 36], + ["axisGroup", + 1, + 5, + 0, + 2, + 36], + ["explosion", + 1, + 5, + 0, + 2, + 37], + ["firstSliceAngle", + 1, + 5, + 0, + 2, + 37], + ["invertIfNegative", + 1, + 5, + 0, + 2, + 37], + ["bubbleScale", + 1, + 6, + 0, + 2, + 37], + ["secondPlotSize", + 1, + 5, + 0, + 2, + 37], + ["splitType", + 1, + 5, + 0, + 2, + 37], + ["splitValue", + 1, + 6, + 0, + 2, + 37], + ["varyByCategories", + 1, + 5, + 0, + 2, + 37], + ["showLeaderLines", + 1, + 6, + 0, + 2, + 37], + ["overlap", + 1, + 5, + 0, + 2, + 36], + ["gradientStyle", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointType", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumColor", + 1, + 6, + 0, + 2, + 37], + ["parentLabelStrategy", + 1, + 6, + 0, + 2, + 37], + ["showConnectorLines", + 1, + 6, + 0, + 2, + 37], + ["invertColor", + 1, + 6, + 0, + 2, + 37]], + [["points", + "ChartPointsCollection", + 19, + 0, + 0, + 4], + ["format", + "ChartSeriesFormat", + 35, + 0, + 0, + 4], + ["trendlines", + "ChartTrendlineCollection", + 19, + 11, + 0, + 4], + ["xErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["yErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 5, + 0, + 4], + ["binOptions", + "ChartBinOptions", + 35, + 6, + 0, + 4], + ["mapOptions", + "ChartMapOptions", + 35, + 6, + 0, + 4], + ["boxwhiskerOptions", + "ChartBoxwhiskerOptions", + 35, + 6, + 0, + 4]], + [["delete", + 0, + 0, + 11, + 2, + 0, + 36], + ["setXAxisValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setBubbleSizes", + 1, + 0, + 11, + 2, + 0, + 37], + ["getDimensionValues", + 1, + 0, + 27, + 2, + 0, + 37], + ["getDimensionDataSourceString", + 1, + 0, + 35], + ["getDimensionDataSourceType", + 1, + 0, + 35]]], + ["ChartSeriesFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartPointsCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartPoint", + 1, + 2, + 0, + 4]], + 0, + "ChartPoint"], + ["ChartPoint", + 0, + [["value", + 3], + ["hasDataLabel", + 1, + 11, + 0, + 2, + 37], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36]], + [["format", + "ChartPointFormat", + 35, + 0, + 0, + 4], + ["dataLabel", + "ChartDataLabel", + 35, + 11, + 0, + 4]]], + ["ChartPointFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartAxes", + 0, + 0, + [["categoryAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["seriesAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["valueAxis", + "ChartAxis", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ChartAxis", + 2, + 2, + 11, + 4]]], + ["ChartAxis", + 0, + [["majorUnit", + 1, + 0, + 0, + 2, + 37], + ["maximum", + 1, + 0, + 0, + 2, + 36], + ["minimum", + 1, + 0, + 0, + 2, + 36], + ["minorUnit", + 1, + 0, + 0, + 2, + 37], + ["displayUnit", + 1, + 11, + 0, + 2, + 36], + ["showDisplayUnitLabel", + 1, + 11, + 0, + 2, + 37], + ["customDisplayUnit", + 3, + 11], + ["type", + 3, + 11], + ["minorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["majorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["baseTimeUnit", + 1, + 11, + 0, + 2, + 37], + ["categoryType", + 1, + 11, + 0, + 2, + 37], + ["axisGroup", + 3, + 11], + ["scaleType", + 1, + 11, + 0, + 2, + 37], + ["logBase", + 1, + 11, + 0, + 2, + 37], + ["left", + 3, + 11], + ["top", + 3, + 11], + ["height", + 3, + 11], + ["width", + 3, + 11], + ["reversePlotOrder", + 1, + 11, + 0, + 2, + 36], + ["crosses", + 1, + 11, + 0, + 2, + 36], + ["crossesAt", + 3, + 11], + ["visible", + 1, + 11, + 0, + 2, + 37], + ["isBetweenCategories", + 1, + 5, + 0, + 2, + 36], + ["majorTickMark", + 1, + 11, + 0, + 2, + 37], + ["minorTickMark", + 1, + 11, + 0, + 2, + 37], + ["tickMarkSpacing", + 1, + 11, + 0, + 2, + 37], + ["tickLabelPosition", + 1, + 11, + 0, + 2, + 36], + ["tickLabelSpacing", + 1, + 11, + 0, + 2, + 37], + ["alignment", + 1, + 5, + 0, + 2, + 37], + ["multiLevel", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["offset", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["position", + 1, + 5, + 0, + 2, + 36], + ["positionAt", + 3, + 5]], + [["majorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["minorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["title", + "ChartAxisTitle", + 35, + 0, + 0, + 4], + ["format", + "ChartAxisFormat", + 35, + 0, + 0, + 4]], + [["setCategoryNames", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCustomDisplayUnit", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCrossesAt", + 1, + 0, + 11, + 2, + 0, + 37], + ["setPositionAt", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4]]], + ["ChartAxisTitle", + 0, + [["text", + 1, + 0, + 0, + 2, + 36], + ["visible", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 27, + 0, + 2, + 37]], + [["format", + "ChartAxisTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataLabels", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataLabel", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 5, + 0, + 2, + 37], + ["left", + 1, + 5, + 0, + 2, + 37], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["formula", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["text", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 5, + 0, + 4]], + 0, + [["getSubstring", + "ChartFormatString", + 2, + 2, + 8, + 4]]], + ["ChartDataLabelFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataTable", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showHorizontalBorder", + 1, + 0, + 0, + 2, + 37], + ["showVerticalBorder", + 1, + 0, + 0, + 2, + 37], + ["showOutlineBorder", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartDataTableFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataTableFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4]]], + ["ChartErrorBars", + 0, + [["endStyleCap", + 1, + 0, + 0, + 2, + 37], + ["include", + 1, + 0, + 0, + 2, + 37], + ["type", + 1, + 0, + 0, + 2, + 37], + ["visible", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartErrorBarsFormat", + 35, + 0, + 0, + 4]]], + ["ChartErrorBarsFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlines", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36]], + [["format", + "ChartGridlinesFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlinesFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartLegend", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36], + ["position", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["width", + 1, + 11, + 0, + 2, + 37], + ["height", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartLegendFormat", + 35, + 0, + 0, + 4], + ["legendEntries", + "ChartLegendEntryCollection", + 19, + 11, + 0, + 4]]], + ["ChartLegendEntry", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["left", + 3, + 5], + ["top", + 3, + 5], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["index", + 3, + 5]]], + ["ChartLegendEntryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "ChartLegendEntry", + 1, + 2, + 0, + 4]], + 0, + "ChartLegendEntry"], + ["ChartLegendFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartMapOptions", + 0, + [["level", + 1, + 0, + 0, + 2, + 37], + ["labelStrategy", + 1, + 0, + 0, + 2, + 37], + ["projectionType", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTitle", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["width", + 3, + 11], + ["height", + 3, + 11], + ["verticalAlignment", + 1, + 11, + 0, + 2, + 37], + ["textOrientation", + 1, + 11, + 0, + 2, + 37], + ["position", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 11, + 2, + 0, + 37]], + [["getSubstring", + "ChartFormatString", + 2, + 2, + 11, + 4]]], + ["ChartFormatString", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartFill", + 4, + 0, + 0, + [["setSolidColor", + 1, + 0, + 0, + 2, + 0, + 36], + ["clear", + 0, + 0, + 0, + 2, + 0, + 37], + ["getSolidColor", + 0, + 0, + 24, + 2, + 0, + 37]]], + ["ChartBorder", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 0, + 0, + 2, + 36], + ["weight", + 1, + 0, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 5, + 2, + 0, + 37]]], + ["ChartBinOptions", + 0, + [["type", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["count", + 1, + 0, + 0, + 2, + 36], + ["allowOverflow", + 1, + 0, + 0, + 2, + 37], + ["allowUnderflow", + 1, + 0, + 0, + 2, + 37], + ["overflowValue", + 1, + 0, + 0, + 2, + 36], + ["underflowValue", + 1, + 0, + 0, + 2, + 36]]], + ["ChartBoxwhiskerOptions", + 0, + [["showInnerPoints", + 1, + 0, + 0, + 2, + 37], + ["showOutlierPoints", + 1, + 0, + 0, + 2, + 37], + ["showMeanMarker", + 1, + 0, + 0, + 2, + 37], + ["showMeanLine", + 1, + 0, + 0, + 2, + 37], + ["quartileCalculation", + 1, + 0, + 0, + 2, + 37]]], + ["ChartLineFormat", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 11, + 0, + 2, + 36], + ["weight", + 1, + 11, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartFont", + 0, + [["bold", + 1, + 0, + 0, + 2, + 37], + ["color", + 1, + 0, + 0, + 2, + 36], + ["italic", + 1, + 0, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["size", + 1, + 0, + 0, + 2, + 37], + ["underline", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTrendline", + 0, + [["type", + 1, + 0, + 0, + 2, + 37], + ["polynomialOrder", + 1, + 0, + 0, + 2, + 37], + ["movingAveragePeriod", + 1, + 0, + 0, + 2, + 37], + ["_Id", + 2], + ["showEquation", + 1, + 5, + 0, + 2, + 37], + ["showRSquared", + 1, + 5, + 0, + 2, + 37], + ["forwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["backwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["intercept", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartTrendlineFormat", + 35, + 0, + 0, + 4], + ["label", + "ChartTrendlineLabel", + 35, + 5, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartTrendlineCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "ChartTrendline", + 1, + 8, + 0, + 2, + 0, + 0, + 36], + ["getItem", + "ChartTrendline", + 1, + 18, + 0, + 4]], + 0, + "ChartTrendline"], + ["ChartTrendlineFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabel", + 0, + [["top", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 0, + 0, + 2, + 37], + ["width", + 3], + ["height", + 3], + ["formula", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 37], + ["autoText", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 0, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37]], + [["format", + "ChartTrendlineLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabelFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartPlotArea", + 0, + [["left", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 37], + ["width", + 1, + 0, + 0, + 2, + 37], + ["height", + 1, + 0, + 0, + 2, + 37], + ["insideLeft", + 1, + 0, + 0, + 2, + 37], + ["insideTop", + 1, + 0, + 0, + 2, + 37], + ["insideWidth", + 1, + 0, + 0, + 2, + 37], + ["insideHeight", + 1, + 0, + 0, + 2, + 37], + ["position", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartPlotAreaFormat", + 35, + 0, + 0, + 4]]], + ["ChartPlotAreaFormat", + 0, + 0, + [["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4]]], + ["VisualCollection", + 5, + 0, + 0, + [["getDefinitions", + 0, + 2, + 0, + 4], + ["getPreview", + 4, + 2, + 0, + 4], + ["bootstrapAgaveVisual", + 0, + 0, + 0, + 2], + ["getCount", + 0, + 2, + 0, + 4], + ["_RegisterSelectionChangedEvent", + 0, + 2], + ["_UnregisterSelectionChangedEvent", + 0, + 2]], + [["add", + "Visual", + 3, + 8, + 0, + 2], + ["_GetItem", + "Visual", + 1, + 18, + 0, + 4], + ["getSelectedOrNullObject", + "Visual", + 0, + 2, + 0, + 4]], + 0, + "Visual", + [["AgaveVisualUpdate", + 2, + 0, + "MessageType.agaveVisualUpdateEvent", + "", + "null", + "null"], + ["SelectionChanged", + 0, + 0, + "MessageType.visualSelectionChangedEvent", + "this._ParentObject.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["Visual", + 0, + [["id", + 3], + ["isSupportedInVisualTaskpane", + 3]], + [["properties", + "VisualPropertyCollection", + 18, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2], + ["getProperty", + 1, + 2, + 0, + 4], + ["setProperty", + 2, + 0, + 0, + 2], + ["changeDataSource", + 2, + 0, + 0, + 2], + ["getDataSource", + 0, + 2, + 0, + 4], + ["setPropertyToDefault", + 1, + 0, + 0, + 2], + ["_RegisterChangeEvent", + 0, + 2], + ["_UnregisterChangeEvent", + 0, + 2], + ["serializeProperties", + 0, + 2, + 0, + 4], + ["deserializeProperties", + 1, + 0, + 0, + 2], + ["addChildProperty", + 2, + 0, + 19, + 2], + ["removeChildProperty", + 2, + 0, + 19, + 2], + ["getDataFieldAssignments", + 0, + 0, + 3], + ["getDataConfig", + 0, + 2, + 3, + 4], + ["modifyDataConfig", + 1, + 0, + 3, + 2]], + [["getChildProperties", + "VisualPropertyCollection", + 2, + 6, + 0, + 4], + ["getDataControllerClient", + "DataControllerClient", + 0, + 2, + 0, + 4], + ["getElementChildProperties", + "VisualPropertyCollection", + 3, + 6, + 0, + 4]], + 0, + 0, + [["ChangeNotification", + 2, + 0, + "MessageType.visualChangeEvent", + "this.id", + "_RegisterChangeEvent", + "_UnregisterChangeEvent"]]], + ["VisualProperty", + 0, + [["type", + 3], + ["value", + 3], + ["id", + 3], + ["localizedName", + 3], + ["options", + 3], + ["localizedOptions", + 3], + ["hasDefault", + 3], + ["isDefault", + 3], + ["min", + 3], + ["max", + 3], + ["stepSize", + 3], + ["hideMeButShowChildrenUI", + 3], + ["expandableUI", + 3], + ["nextPropOnSameLine", + 3], + ["showResetUI", + 3], + ["size", + 3, + 19], + ["minSize", + 3, + 19], + ["maxSize", + 3, + 19], + ["index", + 3, + 19], + ["parentName", + 3, + 19]], + 0, + [["getBoolMetaProperty", + 1, + 2, + 0, + 4]]], + ["VisualPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "VisualProperty", + 1, + 18, + 0, + 4], + ["getItemAt", + "VisualProperty", + 1, + 2, + 0, + 4]], + 0, + "VisualProperty"], + ["DataControllerClient", + 0, + 0, + 0, + [["getWells", + 0, + 2, + 0, + 4], + ["getAssociatedFields", + 1, + 2, + 0, + 4], + ["getAvailableFields", + 1, + 2, + 0, + 4], + ["addField", + 3, + 0, + 0, + 2], + ["removeField", + 2, + 0, + 0, + 2], + ["moveField", + 3, + 0, + 0, + 2]]], + ["RangeSort", + 0, + 0, + 0, + [["apply", + 5, + 0, + 0, + 2, + 0, + 32]]], + ["TableSort", + 0, + [["matchCase", + 3], + ["method", + 3], + ["fields", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 26], + ["clear"], + ["reapply"]]], + ["Filter", + 0, + [["criteria", + 3]], + 0, + [["apply", + 1], + ["clear", + 0, + 0, + 0, + 2, + 0, + 34], + ["applyBottomItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyBottomPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCellColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyDynamicFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyFontColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyValuesFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyIconFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCustomFilter", + 3, + 0, + 0, + 2, + 0, + 34]]], + ["AutoFilter", + 0, + [["enabled", + 3], + ["isDataFiltered", + 3], + ["criteria", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 33], + ["reapply", + 0, + 0, + 0, + 2, + 0, + 26], + ["remove", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearCriteria", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearColumnCriteria", + 1, + 0, + 18]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["CultureInfo", + 0, + [["name", + 3]], + [["numberFormat", + "NumberFormatInfo", + 3, + 0, + 0, + 4], + ["datetimeFormat", + "DatetimeFormatInfo", + 3, + 27, + 0, + 4]]], + ["NumberFormatInfo", + 0, + [["numberDecimalSeparator", + 3], + ["numberGroupSeparator", + 3], + ["currencySymbol", + 3, + 30]]], + ["DatetimeFormatInfo", + 0, + [["dateSeparator", + 3], + ["longDatePattern", + 3], + ["shortDatePattern", + 3], + ["timeSeparator", + 3], + ["longTimePattern", + 3]]], + ["CustomXmlPartScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4], + ["getOnlyItem", + "CustomXmlPart", + 0, + 2, + 0, + 4], + ["getOnlyItemOrNullObject", + "CustomXmlPart", + 0, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPartCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["add", + "CustomXmlPart", + 1, + 8], + ["getByNamespace", + "CustomXmlPartScopedCollection", + 1, + 6, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPart", + 0, + [["id", + 3], + ["namespaceUri", + 3]], + 0, + [["delete"], + ["getXml", + 0, + 2, + 0, + 4], + ["setXml", + 1]]], + ["_V1Api", + 0, + 0, + 0, + [["bindingGetData", + 1, + 2, + 0, + 4], + ["getSelectedData", + 1, + 2, + 0, + 4], + ["gotoById", + 1, + 2, + 0, + 4], + ["bindingAddFromSelection", + 1, + 2], + ["bindingGetById", + 1, + 2, + 0, + 4], + ["bindingReleaseById", + 1, + 2], + ["bindingGetAll", + 0, + 2, + 0, + 4], + ["bindingAddFromNamedItem", + 1, + 2], + ["bindingAddFromPrompt", + 1, + 2], + ["bindingDeleteAllDataValues", + 1], + ["setSelectedData", + 1], + ["bindingClearFormats", + 1], + ["bindingSetData", + 1], + ["bindingSetFormats", + 1], + ["bindingSetTableOptions", + 1], + ["bindingAddRows", + 1], + ["bindingAddColumns", + 1], + ["getFilePropertiesAsync", + 0, + 2, + 9, + 4]]], + ["PivotTableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getFirst", + "PivotTable", + 0, + 10, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 0, + 4], + ["getFirstOrNullObject", + "PivotTable", + 0, + 2, + 35, + 4]], + 0, + "PivotTable"], + ["PivotTableCollection", + 5, + 0, + 0, + [["refreshAll", + 0, + 0, + 0, + 2, + 0, + 12], + ["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 15, + 4], + ["add", + "PivotTable", + 3, + 8, + 5, + 2, + 0, + 0, + 12]], + 0, + "PivotTable", + [["Added", + 0, + 3, + "MessageType.pivotTableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.pivotTableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["PivotTable", + 0, + [["name", + 1, + 0, + 0, + 2, + 12], + ["id", + 3, + 16], + ["useCustomSortLists", + 1, + 6, + 0, + 2, + 12], + ["enableDataValueEditing", + 1, + 6, + 0, + 2, + 12], + ["refreshOnOpen", + 0, + 23, + 0, + 2, + 29], + ["allowMultipleFiltersPerField", + 0, + 27, + 0, + 2, + 12]], + [["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["hierarchies", + "PivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["rowHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["columnHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["dataHierarchies", + "DataPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["filterHierarchies", + "FilterPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["layout", + "PivotLayout", + 2, + 5, + 0, + 4]], + [["refresh", + 0, + 0, + 0, + 2, + 0, + 12], + ["delete", + 0, + 0, + 5, + 2, + 0, + 12], + ["getDataSourceString", + 0, + 2, + 35, + 4], + ["getDataSourceType", + 0, + 2, + 35, + 4]], + [["addDateGroup", + "PivotHierarchy", + 2, + 0, + 8, + 2, + 0, + 0, + 38]]], + ["PivotLayout", + 0, + [["showColumnGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["showRowGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["enableFieldList", + 1, + 17, + 0, + 2, + 12], + ["subtotalLocation", + 1, + 0, + 0, + 2, + 12], + ["layoutType", + 1, + 0, + 0, + 2, + 12], + ["autoFormat", + 1, + 6, + 0, + 2, + 12], + ["preserveFormatting", + 1, + 6, + 0, + 2, + 12], + ["altTextDescription", + 0, + 23, + 0, + 2, + 29], + ["altTextTitle", + 0, + 23, + 0, + 2, + 29], + ["emptyCellText", + 0, + 23, + 0, + 2, + 29], + ["fillEmptyCells", + 0, + 23, + 0, + 2, + 29], + ["showFieldHeaders", + 0, + 23, + 0, + 2, + 29], + ["tabularValues", + 3, + 8], + ["tabularText", + 3, + 8], + ["tabularNumberFormat", + 3, + 8], + ["tabularNumberFormatLocal", + 3, + 8]], + [["pivotStyle", + "PivotTableStyle", + 35, + 8, + 0, + 4]], + [["setAutoSortOnCell", + 2, + 0, + 6, + 2, + 0, + 12], + ["setStyle", + 1, + 0, + 8, + 2, + 0, + 12], + ["displayBlankLineAfterEachItem", + 1, + 0, + 23, + 2, + 0, + 29], + ["repeatAllItemLabels", + 1, + 0, + 23, + 2, + 0, + 29]], + [["getRange", + "Range", + 0, + 3], + ["getRowLabelRange", + "Range", + 0, + 3], + ["getColumnLabelRange", + "Range", + 0, + 3], + ["getFilterAxisRange", + "Range", + 0, + 3], + ["getDataBodyRange", + "Range", + 0, + 3], + ["getCell", + "Range", + 3, + 2, + 8], + ["getPivotItems", + "PivotItemCollection", + 2, + 4, + 6], + ["getDataHierarchy", + "DataPivotHierarchy", + 1, + 3, + 6]]], + ["PivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotHierarchy", + 1, + 2, + 0, + 4]], + 0, + "PivotHierarchy"], + ["PivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]]], + ["RowColumnPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "RowColumnPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "RowColumnPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "RowColumnPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "RowColumnPivotHierarchy"], + ["RowColumnPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["FilterPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "FilterPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "FilterPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "FilterPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "FilterPivotHierarchy"], + ["FilterPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["enableMultipleFilterItems", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["DataPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "DataPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DataPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "DataPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "DataPivotHierarchy"], + ["DataPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["numberFormat", + 1, + 0, + 0, + 2, + 12], + ["summarizeBy", + 1, + 0, + 0, + 2, + 12], + ["showAs", + 1, + 0, + 0, + 2, + 12]], + [["field", + "PivotField", + 35, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["PivotFieldCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotField", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotField", + 1, + 2, + 0, + 4]], + 0, + "PivotField"], + ["PivotField", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["subtotals", + 1, + 0, + 0, + 2, + 12], + ["showAllItems", + 1, + 0, + 0, + 2, + 12]], + [["items", + "PivotItemCollection", + 19, + 0, + 0, + 4]], + [["sortByLabels", + 1, + 1, + 0, + 2, + 0, + 12], + ["sortByValues", + 3, + 0, + 6, + 2, + 0, + 12], + ["applyFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["clearAllFilters", + 0, + 0, + 27, + 2, + 0, + 12], + ["clearFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["getFilters", + 0, + 0, + 27], + ["isFiltered", + 1, + 0, + 27]]], + ["PivotItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotItem", + 1, + 2, + 0, + 4]], + 0, + "PivotItem"], + ["PivotItem", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["isExpanded", + 1, + 0, + 0, + 2, + 12], + ["visible", + 1, + 0, + 0, + 2, + 12]]], + ["WorksheetCustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["_Id", + 2]], + 0, + [["delete"]]], + ["WorksheetCustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "WorksheetCustomProperty", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "WorksheetCustomProperty", + 1], + ["add", + "WorksheetCustomProperty", + 2, + 8]], + 0, + "WorksheetCustomProperty"], + ["DocumentProperties", + 0, + [["title", + 1], + ["subject", + 1], + ["author", + 1], + ["keywords", + 1], + ["comments", + 1], + ["lastAuthor", + 3], + ["revisionNumber", + 1], + ["creationDate", + 11], + ["category", + 1], + ["manager", + 1], + ["company", + 1]], + [["custom", + "CustomPropertyCollection", + 19, + 0, + 0, + 4]]], + ["CustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["type", + 3]], + 0, + [["delete"]]], + ["CustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["deleteAll"]], + [["getItemOrNullObject", + "CustomProperty", + 1, + 2, + 0, + 4], + ["add", + "CustomProperty", + 2, + 8], + ["getItem", + "CustomProperty", + 1, + 18, + 0, + 4]], + 0, + "CustomProperty"], + ["ConditionalFormatCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["clearAll", + 0, + 0, + 0, + 2, + 0, + 39]], + [["getItemAt", + "ConditionalFormat", + 1, + 2, + 0, + 4], + ["add", + "ConditionalFormat", + 1, + 8, + 0, + 2, + 0, + 0, + 39], + ["getItem", + "ConditionalFormat", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "ConditionalFormat", + 1, + 2, + 18, + 4]], + 0, + "ConditionalFormat"], + ["ConditionalFormat", + 0, + [["stopIfTrue", + 1], + ["priority", + 1], + ["type", + 3], + ["id", + 3]], + [["dataBarOrNullObject", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["dataBar", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["customOrNullObject", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["custom", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSet", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSetOrNullObject", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScale", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScaleOrNullObject", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottom", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottomOrNullObject", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["preset", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["presetOrNullObject", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparison", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparisonOrNullObject", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValue", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValueOrNullObject", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 40], + ["changeRuleToCellValue", + 1, + 0, + 30], + ["changeRuleToColorScale", + 0, + 0, + 30], + ["changeRuleToContainsText", + 1, + 0, + 30], + ["changeRuleToCustom", + 1, + 0, + 30], + ["changeRuleToDataBar", + 0, + 0, + 30], + ["changeRuleToIconSet", + 0, + 0, + 30], + ["changeRuleToPresetCriteria", + 1, + 0, + 30], + ["changeRuleToTopBottom", + 1, + 0, + 30], + ["setRanges", + 1, + 0, + 30]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getRanges", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["DataBarConditionalFormat", + 0, + [["showDataBarOnly", + 1, + 0, + 0, + 2, + 40], + ["barDirection", + 1, + 0, + 0, + 2, + 41], + ["axisFormat", + 1, + 0, + 0, + 2, + 41], + ["axisColor", + 1, + 0, + 0, + 2, + 41], + ["lowerBoundRule", + 1, + 0, + 0, + 2, + 41], + ["upperBoundRule", + 1, + 0, + 0, + 2, + 41]], + [["positiveFormat", + "ConditionalDataBarPositiveFormat", + 35, + 0, + 0, + 4], + ["negativeFormat", + "ConditionalDataBarNegativeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalDataBarPositiveFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["gradientFill", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40]]], + ["ConditionalDataBarNegativeFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveFillColor", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveBorderColor", + 1, + 0, + 0, + 2, + 40]]], + ["CustomConditionalFormat", + 0, + 0, + [["rule", + "ConditionalFormatRule", + 35, + 0, + 0, + 4], + ["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalFormatRule", + 0, + [["formula", + 1, + 0, + 0, + 2, + 41], + ["formulaLocal", + 1], + ["formulaR1C1", + 1]]], + ["IconSetConditionalFormat", + 0, + [["reverseIconOrder", + 1, + 0, + 0, + 2, + 41], + ["showIconOnly", + 1, + 0, + 0, + 2, + 41], + ["style", + 1, + 0, + 0, + 2, + 41], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["ColorScaleConditionalFormat", + 0, + [["threeColorScale", + 3], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["TopBottomConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["PresetCriteriaConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["TextConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["CellValueConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalRangeFormat", + 0, + [["numberFormat", + 1]], + [["fill", + "ConditionalRangeFill", + 35, + 0, + 0, + 4], + ["font", + "ConditionalRangeFont", + 35, + 0, + 0, + 4], + ["borders", + "ConditionalRangeBorderCollection", + 51, + 0, + 0, + 4]], + [["clearFormat", + 0, + 0, + 30]]], + ["ConditionalRangeFont", + 0, + [["color", + 1, + 0, + 0, + 2, + 42], + ["italic", + 1, + 0, + 0, + 2, + 42], + ["bold", + 1, + 0, + 0, + 2, + 42], + ["underline", + 1, + 0, + 0, + 2, + 42], + ["strikethrough", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 42], + ["color", + 1, + 0, + 0, + 2, + 42]]], + ["ConditionalRangeBorderCollection", + 1, + [["count", + 3]], + [["top", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["bottom", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["left", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["right", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ConditionalRangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "ConditionalRangeBorder", + 1, + 2, + 0, + 4]], + 0, + "ConditionalRangeBorder"], + ["NumberFormattingService", + 0, + 0, + 0, + 0, + [["getFormatter", + "NumberFormatter", + 1, + 3]], + 0, + 0, + 0, + "Microsoft.ExcelServices.NumberFormattingService", + 4], + ["NumberFormatter", + 0, + [["isDateTime", + 3], + ["isPercent", + 3], + ["isCurrency", + 3], + ["isNumeric", + 3], + ["isText", + 3], + ["hasYear", + 3], + ["hasMonth", + 3], + ["hasDayOfWeek", + 3]], + 0, + [["format", + 1, + 3]]], + ["CustomFunctionManager", + 36, + [["status", + 2]], + 0, + [["register", + 2]], + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.CustomFunctionManager", + 4], + ["Style", + 0, + [["builtIn", + 3], + ["formulaHidden", + 1], + ["horizontalAlignment", + 1], + ["includeAlignment", + 1], + ["includeBorder", + 1], + ["includeFont", + 1], + ["includeNumber", + 1], + ["includePatterns", + 1], + ["includeProtection", + 1], + ["indentLevel", + 1], + ["locked", + 1], + ["name", + 3], + ["numberFormat", + 1], + ["numberFormatLocal", + 1], + ["readingOrder", + 1], + ["shrinkToFit", + 1], + ["verticalAlignment", + 1], + ["wrapText", + 1], + ["textOrientation", + 5, + 5], + ["autoIndent", + 1, + 5]], + [["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["fill", + "RangeFill", + 35, + 0, + 0, + 4]], + [["delete"]]], + ["StyleCollection", + 1, + 0, + 0, + [["add", + 1], + ["getCount", + 0, + 2, + 6, + 4]], + [["getItem", + "Style", + 1, + 18, + 0, + 4], + ["getItemAt", + "Style", + 1, + 2, + 6, + 4], + ["getItemOrNullObject", + "Style", + 1, + 2, + 18, + 4]], + 0, + "Style"], + ["TableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TableStyle", + 1, + 2, + 0, + 4], + ["add", + "TableStyle", + 2, + 8], + ["getDefault", + "TableStyle"]], + 0, + "TableStyle"], + ["TableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TableStyle"]]], + ["PivotTableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "PivotTableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTableStyle", + 1, + 2, + 0, + 4], + ["add", + "PivotTableStyle", + 2, + 8], + ["getDefault", + "PivotTableStyle"]], + 0, + "PivotTableStyle"], + ["PivotTableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "PivotTableStyle"]]], + ["SlicerStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "SlicerStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerStyle", + 1, + 2, + 0, + 4], + ["add", + "SlicerStyle", + 2, + 8], + ["getDefault", + "SlicerStyle"]], + 0, + "SlicerStyle"], + ["SlicerStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "SlicerStyle"]]], + ["TimelineStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TimelineStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TimelineStyle", + 1, + 2, + 0, + 4], + ["add", + "TimelineStyle", + 2, + 8], + ["getDefault", + "TimelineStyle"]], + 0, + "TimelineStyle"], + ["TimelineStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TimelineStyle"]]], + ["InternalTest", + 0, + 0, + 0, + [["delay", + 1], + ["triggerMessage", + 4, + 0, + 11], + ["_RegisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEvent", + 2, + 0, + 11], + ["triggerPostProcess", + 0, + 0, + 11], + ["_RegisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEventWithFilter", + 3, + 0, + 11], + ["firstPartyMethod", + 0, + 2, + 11, + 5], + ["_RegisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_RegisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["unregisterAllCustomFunctionExecutionEvents", + 0, + 0, + 20], + ["updateRangeValueOnCurrentSheet", + 2, + 0, + 3, + 2], + ["triggerUserUndo", + 0, + 2, + 3], + ["triggerUserRedo", + 0, + 2, + 3], + ["enterCellEdit", + 1, + 0, + 6], + ["installCustomFunctionsFromCache", + 0, + 0, + 6], + ["recalc", + 2, + 0, + 6], + ["recalcBySolutionId", + 1, + 0, + 6], + ["safeForCellEditModeMethod", + 1, + 0, + 6], + ["exitCellEdit", + 0, + 0, + 6], + ["noPermissionMethod", + 1, + 0, + 6], + ["verifyCustomFunctionListExist", + 0, + 0, + 6], + ["enableContentWorkbookLink", + 0, + 0, + 3], + ["previewExecutionMethod", + 1, + 0, + 8, + 16], + ["setRapidJsonEnabled", + 1, + 0, + 8], + ["triggerVbaRecorderRecordingChanged", + 2, + 0, + 8]], + 0, + 0, + 0, + [["CustomFunctionExecutionBeginEvent", + 0, + 20, + "MessageType.customFunctionExecutionBeginEvent", + "", + "_RegisterCustomFunctionExecutionBeginEvent", + "_UnregisterCustomFunctionExecutionBeginEvent"], + ["CustomFunctionExecutionEndEvent", + 0, + 20, + "MessageType.customFunctionExecutionEndEvent", + "", + "_RegisterCustomFunctionExecutionEndEvent", + "_UnregisterCustomFunctionExecutionEndEvent"], + ["Test1Event", + 2, + 11, + "MessageType.test1Event", + "", + "_RegisterTest1Event", + "_UnregisterTest1Event"], + ["TestEvent", + 2, + 11, + "MessageType.testEvent", + "", + "_RegisterTestEvent", + "_UnregisterTestEvent"]], + "Microsoft.ExcelServices.InternalTest", + 4], + ["PageLayout", + 0, + [["orientation", + 1], + ["paperSize", + 1], + ["blackAndWhite", + 1], + ["printErrors", + 1], + ["zoom", + 1], + ["centerHorizontally", + 1], + ["centerVertically", + 1], + ["printHeadings", + 1], + ["printGridlines", + 1], + ["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["headerMargin", + 1], + ["footerMargin", + 1], + ["printComments", + 1], + ["draftMode", + 1], + ["firstPageNumber", + 1], + ["printOrder", + 1]], + [["headersFooters", + "HeaderFooterGroup", + 35, + 0, + 0, + 4]], + [["setPrintMargins", + 2], + ["setPrintArea", + 1], + ["setPrintTitleRows", + 1], + ["setPrintTitleColumns", + 1]], + [["getPrintArea", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintAreaOrNullObject", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintTitleRows", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleRowsOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumns", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumnsOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["HeaderFooter", + 0, + [["leftHeader", + 1], + ["centerHeader", + 1], + ["rightHeader", + 1], + ["leftFooter", + 1], + ["centerFooter", + 1], + ["rightFooter", + 1]]], + ["HeaderFooterGroup", + 0, + [["state", + 1], + ["useSheetMargins", + 1], + ["useSheetScale", + 1]], + [["defaultForAllPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["firstPage", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["evenPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["oddPages", + "HeaderFooter", + 35, + 0, + 0, + 4]]], + ["PageBreak", + 0, + [["_Id", + 2], + ["columnIndex", + 3], + ["rowIndex", + 3]], + 0, + [["delete"]], + [["getCellAfterBreak", + "Range", + 0, + 10, + 0, + 4]]], + ["PageBreakCollection", + 1, + 0, + 0, + [["removePageBreaks"], + ["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PageBreak", + 1, + 18, + 0, + 4], + ["add", + "PageBreak", + 1, + 8]], + 0, + "PageBreak"], + ["DataConnectionCollection", + 0, + 0, + 0, + [["refreshAll"]], + [["add", + "DataConnection", + 4, + 8, + 8, + 2, + 0, + 0, + 12]]], + ["RangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "Range", + 1, + 2, + 0, + 4]], + 0, + "Range"], + ["RangeAreasCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeAreas", + 1, + 2, + 0, + 4]], + 0, + "RangeAreas"], + ["CommentCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 2, + 27], + ["_UnregisterAddedEvent", + 0, + 2, + 27], + ["_RegisterDeletedEvent", + 0, + 2, + 27], + ["_UnregisterDeletedEvent", + 0, + 2, + 27], + ["_RegisterChangedEvent", + 0, + 2, + 27], + ["_UnregisterChangedEvent", + 0, + 2, + 27]], + [["getItem", + "Comment", + 1, + 18, + 0, + 4], + ["getItemAt", + "Comment", + 1, + 2, + 0, + 4], + ["add", + "Comment", + 3, + 8], + ["getItemByReplyId", + "Comment", + 1, + 2, + 0, + 4], + ["getItemByCell", + "Comment", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Comment", + 1, + 2, + 18, + 4]], + 0, + "Comment", + [["Added", + 0, + 27, + "MessageType.commentAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 0, + 27, + "MessageType.commentChangedEvent", + "this._eventTargetId", + "_RegisterChangedEvent", + "_UnregisterChangedEvent"], + ["Deleted", + 0, + 27, + "MessageType.commentDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Comment", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 1, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + [["replies", + "CommentReplyCollection", + 19, + 0, + 0, + 4]], + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["CommentReplyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "CommentReply", + 2, + 8], + ["getItem", + "CommentReply", + 1, + 18, + 0, + 4], + ["getItemAt", + "CommentReply", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "CommentReply", + 1, + 2, + 18, + 4]], + 0, + "CommentReply"], + ["CommentReply", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 3, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + 0, + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getParentComment", + "Comment"], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["ShapeCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["addImage", + "Shape", + 1], + ["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["addGeometricShape", + "Shape", + 1], + ["addTextBox", + "Shape", + 1], + ["addSvg", + "Shape", + 1, + 0, + 8], + ["addGroup", + "Shape", + 1], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["addLine", + "Shape", + 5], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape", + [["Added", + 0, + 3, + "MessageType.shapeAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.shapeDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Shape", + 0, + [["id", + 3], + ["name", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["rotation", + 1], + ["zOrderPosition", + 3], + ["altTextTitle", + 1], + ["altTextDescription", + 1, + 0, + 0, + 2, + 36], + ["type", + 3], + ["lockAspectRatio", + 1], + ["placement", + 1, + 17], + ["geometricShapeType", + 1], + ["visible", + 1], + ["level", + 3], + ["connectionSiteCount", + 3], + ["scriptLink", + 1, + 8, + 0, + 2, + 37], + ["displayName", + 3, + 35]], + [["geometricShape", + "GeometricShape", + 2, + 0, + 0, + 4], + ["image", + "Image", + 2, + 0, + 0, + 4], + ["textFrame", + "TextFrame", + 2, + 0, + 0, + 4], + ["fill", + "ShapeFill", + 35, + 0, + 0, + 4], + ["group", + "ShapeGroup", + 2, + 0, + 0, + 4], + ["parentGroup", + "Shape", + 2, + 0, + 0, + 4], + ["line", + "Line", + 2, + 0, + 0, + 4], + ["lineFormat", + "ShapeLineFormat", + 35, + 0, + 0, + 4]], + [["setZOrder", + 1], + ["incrementLeft", + 1], + ["incrementTop", + 1], + ["incrementRotation", + 1], + ["scaleHeight", + 3], + ["scaleWidth", + 3], + ["delete"], + ["getAsImage", + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["activate", + 0, + 0, + 3]], + [["copyTo", + "Shape", + 1, + 8, + 17, + 0, + 0, + "_GetShapeById"], + ["_GetShapeById", + "Shape", + 1, + 2, + 17, + 4]], + 0, + 0, + [["Activated", + 0, + 0, + "MessageType.shapeActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 0, + "MessageType.shapeDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["GeometricShape", + 0, + [["id", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["Image", + 0, + [["id", + 3], + ["format", + 3, + 0, + "format"]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["ShapeGroup", + 0, + [["id", + 3]], + [["shapes", + "GroupShapeCollection", + 19, + 0, + 0, + 4], + ["shape", + "Shape", + 2, + 0, + 0, + 4]], + [["ungroup"]]], + ["GroupShapeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape"], + ["Line", + 0, + [["id", + 3], + ["connectorType", + 1, + 0, + "connectorType"], + ["beginArrowheadLength", + 1], + ["beginArrowheadStyle", + 1], + ["beginArrowheadWidth", + 1], + ["endArrowheadLength", + 1], + ["endArrowheadStyle", + 1], + ["endArrowheadWidth", + 1], + ["isBeginConnected", + 3], + ["beginConnectedSite", + 3], + ["isEndConnected", + 3], + ["endConnectedSite", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4], + ["beginConnectedShape", + "Shape", + 2, + 0, + 0, + 4], + ["endConnectedShape", + "Shape", + 2, + 0, + 0, + 4]], + [["connectBeginShape", + 2], + ["disconnectBeginShape"], + ["connectEndShape", + 2], + ["disconnectEndShape"]]], + ["ShapeFill", + 0, + [["foregroundColor", + 1], + ["type", + 3], + ["transparency", + 1]], + 0, + [["clear"], + ["setSolidColor", + 1]]], + ["ShapeLineFormat", + 0, + [["visible", + 1], + ["color", + 1], + ["style", + 1], + ["weight", + 1], + ["dashStyle", + 1], + ["transparency", + 1]]], + ["TextFrame", + 0, + [["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["horizontalAlignment", + 1], + ["horizontalOverflow", + 1], + ["verticalAlignment", + 1], + ["verticalOverflow", + 1], + ["orientation", + 1], + ["readingOrder", + 1], + ["hasText", + 3], + ["autoSizeSetting", + 1]], + [["textRange", + "TextRange", + 2, + 0, + 0, + 4]], + [["deleteText"]]], + ["TextRange", + 0, + [["text", + 1]], + [["font", + "ShapeFont", + 35, + 0, + 0, + 4]], + 0, + [["getSubstring", + "TextRange", + 2]]], + ["ShapeFont", + 0, + [["size", + 1], + ["name", + 1], + ["color", + 1], + ["bold", + 1], + ["italic", + 1], + ["underline", + 1]]], + ["Slicer", + 0, + [["id", + 3], + ["name", + 1], + ["caption", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["nameInFormula", + 1, + 8], + ["isFilterCleared", + 3], + ["style", + 1], + ["sortBy", + 1], + ["sortUsingCustomLists", + 1, + 3], + ["columnCount", + 1, + 3], + ["disableMoveResizeUI", + 1, + 3], + ["displayHeader", + 1, + 3], + ["rowHeight", + 1, + 3], + ["shapeId", + 2, + 3]], + [["slicerItems", + "SlicerItemCollection", + 19, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 35, + 0, + 0, + 4], + ["slicerStyle", + "SlicerStyle", + 35, + 8, + 0, + 4]], + [["delete"], + ["clearFilters"], + ["getSelectedItems"], + ["selectItems", + 1], + ["activate", + 0, + 2, + 3], + ["setStyle", + 1, + 0, + 8]]], + ["SlicerCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "Slicer", + 3, + 8], + ["getItemAt", + "Slicer", + 1, + 2, + 0, + 4], + ["getItem", + "Slicer", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Slicer", + 1, + 2, + 0, + 4]], + 0, + "Slicer"], + ["SlicerItem", + 0, + [["key", + 3], + ["name", + 3], + ["isSelected", + 1], + ["hasData", + 3]]], + ["SlicerItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SlicerItem", + 1, + 2, + 0, + 4], + ["getItem", + "SlicerItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerItem", + 1, + 2, + 0, + 4]], + 0, + "SlicerItem"], + ["Ribbon", + 0, + [["activeTab", + 1]], + 0, + [["executeCommand", + 2], + ["showTeachingCallout", + 3], + ["_RegisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["showChartDialog", + 1, + 2, + 8, + 4]], + 0, + 0, + 0, + [["CommandExecuted", + 0, + 0, + "MessageType.ribbonCommandExecutedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCommandExecutedEvent", + "_UnregisterCommandExecutedEvent"]]], + ["LinkedDataType", + 0, + [["dataProvider", + 2], + ["serviceId", + 2], + ["lastRefreshed", + 10], + ["name", + 2], + ["periodicRefreshInterval", + 2], + ["refreshDataLoadWarnings", + 2], + ["refreshMode", + 2], + ["supportedRefreshModes", + 2], + ["refreshErrors", + 2]], + 0, + [["requestRefresh", + 0, + 0, + 0, + 2], + ["requestSetRefreshMode", + 1, + 0, + 0, + 2]]], + ["LinkedDataTypeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["requestRefreshAll", + 0, + 0, + 0, + 2], + ["_RegisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_RegisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_RegisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4]], + [["getItem", + "LinkedDataType", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "LinkedDataType", + 1], + ["getItemAt", + "LinkedDataType", + 1, + 2, + 0, + 4]], + 0, + "LinkedDataType", + [["LinkedDataTypeAdded", + 0, + 0, + "MessageType.linkedDataTypeLinkedDataTypeAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterLinkedDataTypeAddedEvent", + "_UnregisterLinkedDataTypeAddedEvent"], + ["RefreshModeChanged", + 0, + 0, + "MessageType.linkedDataTypeRefreshModeChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshModeChangedEvent", + "_UnregisterRefreshModeChangedEvent"], + ["RefreshRequestCompleted", + 0, + 0, + "MessageType.linkedDataTypeRefreshRequestCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshRequestCompletedEvent", + "_UnregisterRefreshRequestCompletedEvent"]]], + ["SheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "SheetView", + 1]]], + ["SheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "SheetView", + 1, + 8], + ["enterTemporary", + "SheetView"], + ["getActive", + "SheetView"], + ["getItem", + "SheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "SheetView", + 1, + 2, + 0, + 4]], + 0, + "SheetView"], + ["NamedSheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "NamedSheetView", + 1]]], + ["NamedSheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "NamedSheetView", + 1, + 8], + ["enterTemporary", + "NamedSheetView"], + ["getActive", + "NamedSheetView"], + ["getItem", + "NamedSheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "NamedSheetView", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "NamedSheetView", + 1, + 2, + 28, + 4]], + 0, + "NamedSheetView"], + ["FunctionResult", + 0, + [["error", + 3], + ["value", + 3]]], + ["Functions", + 0, + 0, + 0, + 0, + [["count", + "FunctionResult", + 1, + 72], + ["if", + "FunctionResult", + 3, + 8], + ["isNA", + "FunctionResult", + 1, + 8], + ["isError", + "FunctionResult", + 1, + 8], + ["sum", + "FunctionResult", + 1, + 72], + ["average", + "FunctionResult", + 1, + 72], + ["min", + "FunctionResult", + 1, + 72], + ["max", + "FunctionResult", + 1, + 72], + ["na", + "FunctionResult", + 0, + 8], + ["npv", + "FunctionResult", + 2, + 72], + ["dollar", + "FunctionResult", + 2, + 8], + ["fixed", + "FunctionResult", + 3, + 8], + ["sin", + "FunctionResult", + 1, + 8], + ["cos", + "FunctionResult", + 1, + 8], + ["tan", + "FunctionResult", + 1, + 8], + ["atan", + "FunctionResult", + 1, + 8], + ["pi", + "FunctionResult", + 0, + 8], + ["sqrt", + "FunctionResult", + 1, + 8], + ["exp", + "FunctionResult", + 1, + 8], + ["ln", + "FunctionResult", + 1, + 8], + ["log10", + "FunctionResult", + 1, + 8], + ["abs", + "FunctionResult", + 1, + 8], + ["int", + "FunctionResult", + 1, + 8], + ["sign", + "FunctionResult", + 1, + 8], + ["round", + "FunctionResult", + 2, + 8], + ["lookup", + "FunctionResult", + 3, + 8], + ["rept", + "FunctionResult", + 2, + 8], + ["mid", + "FunctionResult", + 3, + 8], + ["len", + "FunctionResult", + 1, + 8], + ["value", + "FunctionResult", + 1, + 8], + ["true", + "FunctionResult", + 0, + 8], + ["false", + "FunctionResult", + 0, + 8], + ["and", + "FunctionResult", + 1, + 72], + ["or", + "FunctionResult", + 1, + 72], + ["not", + "FunctionResult", + 1, + 8], + ["mod", + "FunctionResult", + 2, + 8], + ["dcount", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCount"], + ["dsum", + "FunctionResult", + 3, + 8, + 0, + 0, + "DSum"], + ["daverage", + "FunctionResult", + 3, + 8, + 0, + 0, + "DAverage"], + ["dmin", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMin"], + ["dmax", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMax"], + ["dstDev", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDev"], + ["dvar", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVar"], + ["text", + "FunctionResult", + 2, + 8], + ["pv", + "FunctionResult", + 5, + 8], + ["fv", + "FunctionResult", + 5, + 8], + ["nper", + "FunctionResult", + 5, + 8, + 0, + 0, + "NPer"], + ["pmt", + "FunctionResult", + 5, + 8], + ["rate", + "FunctionResult", + 6, + 8], + ["mirr", + "FunctionResult", + 3, + 8, + 0, + 0, + "MIrr"], + ["irr", + "FunctionResult", + 2, + 8], + ["rand", + "FunctionResult", + 0, + 8], + ["match", + "FunctionResult", + 3, + 8], + ["date", + "FunctionResult", + 3, + 8], + ["time", + "FunctionResult", + 3, + 8], + ["day", + "FunctionResult", + 1, + 8], + ["month", + "FunctionResult", + 1, + 8], + ["year", + "FunctionResult", + 1, + 8], + ["weekday", + "FunctionResult", + 2, + 8], + ["hour", + "FunctionResult", + 1, + 8], + ["minute", + "FunctionResult", + 1, + 8], + ["second", + "FunctionResult", + 1, + 8], + ["now", + "FunctionResult", + 0, + 8], + ["areas", + "FunctionResult", + 1, + 8], + ["rows", + "FunctionResult", + 1, + 8], + ["columns", + "FunctionResult", + 1, + 8], + ["type", + "FunctionResult", + 1, + 8], + ["atan2", + "FunctionResult", + 2, + 8], + ["asin", + "FunctionResult", + 1, + 8], + ["acos", + "FunctionResult", + 1, + 8], + ["choose", + "FunctionResult", + 2, + 72], + ["hlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "HLookup"], + ["vlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "VLookup"], + ["isref", + "FunctionResult", + 1, + 8], + ["log", + "FunctionResult", + 2, + 8], + ["char", + "FunctionResult", + 1, + 8], + ["lower", + "FunctionResult", + 1, + 8], + ["upper", + "FunctionResult", + 1, + 8], + ["proper", + "FunctionResult", + 1, + 8], + ["left", + "FunctionResult", + 2, + 8], + ["right", + "FunctionResult", + 2, + 8], + ["exact", + "FunctionResult", + 2, + 8], + ["trim", + "FunctionResult", + 1, + 8], + ["replace", + "FunctionResult", + 4, + 8], + ["substitute", + "FunctionResult", + 4, + 8], + ["code", + "FunctionResult", + 1, + 8], + ["find", + "FunctionResult", + 3, + 8], + ["isErr", + "FunctionResult", + 1, + 8], + ["isText", + "FunctionResult", + 1, + 8], + ["isNumber", + "FunctionResult", + 1, + 8], + ["t", + "FunctionResult", + 1, + 8, + 0, + 0, + "T"], + ["n", + "FunctionResult", + 1, + 8, + 0, + 0, + "N"], + ["datevalue", + "FunctionResult", + 1, + 8], + ["timevalue", + "FunctionResult", + 1, + 8], + ["sln", + "FunctionResult", + 3, + 8], + ["syd", + "FunctionResult", + 4, + 8], + ["ddb", + "FunctionResult", + 5, + 8], + ["clean", + "FunctionResult", + 1, + 8], + ["ipmt", + "FunctionResult", + 6, + 8], + ["ppmt", + "FunctionResult", + 6, + 8], + ["countA", + "FunctionResult", + 1, + 72], + ["product", + "FunctionResult", + 1, + 72], + ["fact", + "FunctionResult", + 1, + 8], + ["dproduct", + "FunctionResult", + 3, + 8, + 0, + 0, + "DProduct"], + ["isNonText", + "FunctionResult", + 1, + 8], + ["dstDevP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDevP"], + ["dvarP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVarP"], + ["trunc", + "FunctionResult", + 2, + 8], + ["isLogical", + "FunctionResult", + 1, + 8], + ["dcountA", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCountA"], + ["usdollar", + "FunctionResult", + 2, + 8, + 0, + 0, + "USDollar"], + ["findB", + "FunctionResult", + 3, + 8], + ["replaceB", + "FunctionResult", + 4, + 8], + ["leftb", + "FunctionResult", + 2, + 8], + ["rightb", + "FunctionResult", + 2, + 8], + ["midb", + "FunctionResult", + 3, + 8], + ["lenb", + "FunctionResult", + 1, + 8], + ["roundUp", + "FunctionResult", + 2, + 8], + ["roundDown", + "FunctionResult", + 2, + 8], + ["asc", + "FunctionResult", + 1, + 8], + ["dbcs", + "FunctionResult", + 1, + 8], + ["days360", + "FunctionResult", + 3, + 8], + ["today", + "FunctionResult", + 0, + 8], + ["vdb", + "FunctionResult", + 7, + 8], + ["median", + "FunctionResult", + 1, + 72], + ["sinh", + "FunctionResult", + 1, + 8], + ["cosh", + "FunctionResult", + 1, + 8], + ["tanh", + "FunctionResult", + 1, + 8], + ["asinh", + "FunctionResult", + 1, + 8], + ["acosh", + "FunctionResult", + 1, + 8], + ["atanh", + "FunctionResult", + 1, + 8], + ["dget", + "FunctionResult", + 3, + 8, + 0, + 0, + "DGet"], + ["db", + "FunctionResult", + 5, + 8], + ["error_Type", + "FunctionResult", + 1, + 8], + ["aveDev", + "FunctionResult", + 1, + 72], + ["gammaLn", + "FunctionResult", + 1, + 8], + ["combin", + "FunctionResult", + 2, + 8], + ["even", + "FunctionResult", + 1, + 8], + ["fisher", + "FunctionResult", + 1, + 8], + ["fisherInv", + "FunctionResult", + 1, + 8], + ["standardize", + "FunctionResult", + 3, + 8], + ["odd", + "FunctionResult", + 1, + 8], + ["permut", + "FunctionResult", + 2, + 8], + ["devSq", + "FunctionResult", + 1, + 72], + ["geoMean", + "FunctionResult", + 1, + 72], + ["harMean", + "FunctionResult", + 1, + 72], + ["sumSq", + "FunctionResult", + 1, + 72], + ["kurt", + "FunctionResult", + 1, + 72], + ["skew", + "FunctionResult", + 1, + 72], + ["large", + "FunctionResult", + 2, + 8], + ["small", + "FunctionResult", + 2, + 8], + ["trimMean", + "FunctionResult", + 2, + 8], + ["concatenate", + "FunctionResult", + 1, + 72], + ["power", + "FunctionResult", + 2, + 8], + ["radians", + "FunctionResult", + 1, + 8], + ["degrees", + "FunctionResult", + 1, + 8], + ["subtotal", + "FunctionResult", + 2, + 72], + ["sumIf", + "FunctionResult", + 3, + 8], + ["countIf", + "FunctionResult", + 2, + 8], + ["countBlank", + "FunctionResult", + 1, + 8], + ["ispmt", + "FunctionResult", + 4, + 8], + ["roman", + "FunctionResult", + 2, + 8], + ["hyperlink", + "FunctionResult", + 2, + 8], + ["averageA", + "FunctionResult", + 1, + 72], + ["maxA", + "FunctionResult", + 1, + 72], + ["minA", + "FunctionResult", + 1, + 72], + ["stDevPA", + "FunctionResult", + 1, + 72], + ["varPA", + "FunctionResult", + 1, + 72], + ["stDevA", + "FunctionResult", + 1, + 72], + ["varA", + "FunctionResult", + 1, + 72], + ["bahtText", + "FunctionResult", + 1, + 8], + ["hex2Bin", + "FunctionResult", + 2, + 8], + ["hex2Dec", + "FunctionResult", + 1, + 8], + ["hex2Oct", + "FunctionResult", + 2, + 8], + ["dec2Bin", + "FunctionResult", + 2, + 8], + ["dec2Hex", + "FunctionResult", + 2, + 8], + ["dec2Oct", + "FunctionResult", + 2, + 8], + ["oct2Bin", + "FunctionResult", + 2, + 8], + ["oct2Hex", + "FunctionResult", + 2, + 8], + ["oct2Dec", + "FunctionResult", + 1, + 8], + ["bin2Dec", + "FunctionResult", + 1, + 8], + ["bin2Oct", + "FunctionResult", + 2, + 8], + ["bin2Hex", + "FunctionResult", + 2, + 8], + ["imSub", + "FunctionResult", + 2, + 8], + ["imDiv", + "FunctionResult", + 2, + 8], + ["imPower", + "FunctionResult", + 2, + 8], + ["imAbs", + "FunctionResult", + 1, + 8], + ["imSqrt", + "FunctionResult", + 1, + 8], + ["imLn", + "FunctionResult", + 1, + 8], + ["imLog2", + "FunctionResult", + 1, + 8], + ["imLog10", + "FunctionResult", + 1, + 8], + ["imSin", + "FunctionResult", + 1, + 8], + ["imCos", + "FunctionResult", + 1, + 8], + ["imExp", + "FunctionResult", + 1, + 8], + ["imArgument", + "FunctionResult", + 1, + 8], + ["imConjugate", + "FunctionResult", + 1, + 8], + ["imaginary", + "FunctionResult", + 1, + 8], + ["imReal", + "FunctionResult", + 1, + 8], + ["complex", + "FunctionResult", + 3, + 8], + ["imSum", + "FunctionResult", + 1, + 72], + ["imProduct", + "FunctionResult", + 1, + 72], + ["seriesSum", + "FunctionResult", + 4, + 8], + ["factDouble", + "FunctionResult", + 1, + 8], + ["sqrtPi", + "FunctionResult", + 1, + 8], + ["quotient", + "FunctionResult", + 2, + 8], + ["delta", + "FunctionResult", + 2, + 8], + ["geStep", + "FunctionResult", + 2, + 8], + ["isEven", + "FunctionResult", + 1, + 8], + ["isOdd", + "FunctionResult", + 1, + 8], + ["mround", + "FunctionResult", + 2, + 8, + 0, + 0, + "MRound"], + ["erf", + "FunctionResult", + 2, + 8], + ["erfC", + "FunctionResult", + 1, + 8], + ["besselJ", + "FunctionResult", + 2, + 8], + ["besselK", + "FunctionResult", + 2, + 8], + ["besselY", + "FunctionResult", + 2, + 8], + ["besselI", + "FunctionResult", + 2, + 8], + ["xirr", + "FunctionResult", + 3, + 8], + ["xnpv", + "FunctionResult", + 3, + 8], + ["priceMat", + "FunctionResult", + 6, + 8], + ["yieldMat", + "FunctionResult", + 6, + 8], + ["intRate", + "FunctionResult", + 5, + 8], + ["received", + "FunctionResult", + 5, + 8], + ["disc", + "FunctionResult", + 5, + 8], + ["priceDisc", + "FunctionResult", + 5, + 8], + ["yieldDisc", + "FunctionResult", + 5, + 8], + ["tbillEq", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillEq"], + ["tbillPrice", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillPrice"], + ["tbillYield", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillYield"], + ["price", + "FunctionResult", + 7, + 8], + ["yield", + "FunctionResult", + 7, + 8], + ["dollarDe", + "FunctionResult", + 2, + 8], + ["dollarFr", + "FunctionResult", + 2, + 8], + ["nominal", + "FunctionResult", + 2, + 8], + ["effect", + "FunctionResult", + 2, + 8], + ["cumPrinc", + "FunctionResult", + 6, + 8], + ["cumIPmt", + "FunctionResult", + 6, + 8], + ["edate", + "FunctionResult", + 2, + 8, + 0, + 0, + "EDate"], + ["eoMonth", + "FunctionResult", + 2, + 8], + ["yearFrac", + "FunctionResult", + 3, + 8], + ["coupDayBs", + "FunctionResult", + 4, + 8], + ["coupDays", + "FunctionResult", + 4, + 8], + ["coupDaysNc", + "FunctionResult", + 4, + 8], + ["coupNcd", + "FunctionResult", + 4, + 8], + ["coupNum", + "FunctionResult", + 4, + 8], + ["coupPcd", + "FunctionResult", + 4, + 8], + ["duration", + "FunctionResult", + 6, + 8], + ["mduration", + "FunctionResult", + 6, + 8, + 0, + 0, + "MDuration"], + ["oddLPrice", + "FunctionResult", + 8, + 8], + ["oddLYield", + "FunctionResult", + 8, + 8], + ["oddFPrice", + "FunctionResult", + 9, + 8], + ["oddFYield", + "FunctionResult", + 9, + 8], + ["randBetween", + "FunctionResult", + 2, + 8], + ["weekNum", + "FunctionResult", + 2, + 8], + ["amorDegrc", + "FunctionResult", + 7, + 8], + ["amorLinc", + "FunctionResult", + 7, + 8], + ["convert", + "FunctionResult", + 3, + 8], + ["accrInt", + "FunctionResult", + 8, + 8], + ["accrIntM", + "FunctionResult", + 5, + 8], + ["workDay", + "FunctionResult", + 3, + 8], + ["networkDays", + "FunctionResult", + 3, + 8], + ["gcd", + "FunctionResult", + 1, + 72], + ["multiNomial", + "FunctionResult", + 1, + 72], + ["lcm", + "FunctionResult", + 1, + 72], + ["fvschedule", + "FunctionResult", + 2, + 8, + 0, + 0, + "FVSchedule"], + ["countIfs", + "FunctionResult", + 1, + 72], + ["sumIfs", + "FunctionResult", + 2, + 72], + ["averageIf", + "FunctionResult", + 3, + 8], + ["averageIfs", + "FunctionResult", + 2, + 72], + ["binom_Dist", + "FunctionResult", + 4, + 8], + ["binom_Inv", + "FunctionResult", + 3, + 8], + ["confidence_Norm", + "FunctionResult", + 3, + 8], + ["confidence_T", + "FunctionResult", + 3, + 8], + ["expon_Dist", + "FunctionResult", + 3, + 8], + ["gamma_Dist", + "FunctionResult", + 4, + 8], + ["gamma_Inv", + "FunctionResult", + 3, + 8], + ["norm_Dist", + "FunctionResult", + 4, + 8], + ["norm_Inv", + "FunctionResult", + 3, + 8], + ["percentile_Exc", + "FunctionResult", + 2, + 8], + ["percentile_Inc", + "FunctionResult", + 2, + 8], + ["percentRank_Exc", + "FunctionResult", + 3, + 8], + ["percentRank_Inc", + "FunctionResult", + 3, + 8], + ["poisson_Dist", + "FunctionResult", + 3, + 8], + ["quartile_Exc", + "FunctionResult", + 2, + 8], + ["quartile_Inc", + "FunctionResult", + 2, + 8], + ["rank_Avg", + "FunctionResult", + 3, + 8], + ["rank_Eq", + "FunctionResult", + 3, + 8], + ["stDev_S", + "FunctionResult", + 1, + 72], + ["stDev_P", + "FunctionResult", + 1, + 72], + ["t_Dist", + "FunctionResult", + 3, + 8], + ["t_Dist_2T", + "FunctionResult", + 2, + 8], + ["t_Dist_RT", + "FunctionResult", + 2, + 8], + ["t_Inv", + "FunctionResult", + 2, + 8], + ["t_Inv_2T", + "FunctionResult", + 2, + 8], + ["var_S", + "FunctionResult", + 1, + 72], + ["var_P", + "FunctionResult", + 1, + 72], + ["weibull_Dist", + "FunctionResult", + 4, + 8], + ["networkDays_Intl", + "FunctionResult", + 4, + 8], + ["workDay_Intl", + "FunctionResult", + 4, + 8], + ["ecma_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ECMA_Ceiling"], + ["iso_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ISO_Ceiling"], + ["beta_Dist", + "FunctionResult", + 6, + 8], + ["beta_Inv", + "FunctionResult", + 5, + 8], + ["chiSq_Dist", + "FunctionResult", + 3, + 8], + ["chiSq_Dist_RT", + "FunctionResult", + 2, + 8], + ["chiSq_Inv", + "FunctionResult", + 2, + 8], + ["chiSq_Inv_RT", + "FunctionResult", + 2, + 8], + ["f_Dist", + "FunctionResult", + 4, + 8], + ["f_Dist_RT", + "FunctionResult", + 3, + 8], + ["f_Inv", + "FunctionResult", + 3, + 8], + ["f_Inv_RT", + "FunctionResult", + 3, + 8], + ["hypGeom_Dist", + "FunctionResult", + 5, + 8], + ["logNorm_Dist", + "FunctionResult", + 4, + 8], + ["logNorm_Inv", + "FunctionResult", + 3, + 8], + ["negBinom_Dist", + "FunctionResult", + 4, + 8], + ["norm_S_Dist", + "FunctionResult", + 2, + 8], + ["norm_S_Inv", + "FunctionResult", + 1, + 8], + ["z_Test", + "FunctionResult", + 3, + 8], + ["erf_Precise", + "FunctionResult", + 1, + 8], + ["erfC_Precise", + "FunctionResult", + 1, + 8], + ["gammaLn_Precise", + "FunctionResult", + 1, + 8], + ["ceiling_Precise", + "FunctionResult", + 2, + 8], + ["floor_Precise", + "FunctionResult", + 2, + 8], + ["acot", + "FunctionResult", + 1, + 8], + ["acoth", + "FunctionResult", + 1, + 8], + ["cot", + "FunctionResult", + 1, + 8], + ["coth", + "FunctionResult", + 1, + 8], + ["csc", + "FunctionResult", + 1, + 8], + ["csch", + "FunctionResult", + 1, + 8], + ["sec", + "FunctionResult", + 1, + 8], + ["sech", + "FunctionResult", + 1, + 8], + ["imTan", + "FunctionResult", + 1, + 8], + ["imCot", + "FunctionResult", + 1, + 8], + ["imCsc", + "FunctionResult", + 1, + 8], + ["imCsch", + "FunctionResult", + 1, + 8], + ["imSec", + "FunctionResult", + 1, + 8], + ["imSech", + "FunctionResult", + 1, + 8], + ["bitand", + "FunctionResult", + 2, + 8], + ["bitor", + "FunctionResult", + 2, + 8], + ["bitxor", + "FunctionResult", + 2, + 8], + ["bitlshift", + "FunctionResult", + 2, + 8], + ["bitrshift", + "FunctionResult", + 2, + 8], + ["permutationa", + "FunctionResult", + 2, + 8], + ["combina", + "FunctionResult", + 2, + 8], + ["xor", + "FunctionResult", + 1, + 72], + ["pduration", + "FunctionResult", + 3, + 8, + 0, + 0, + "PDuration"], + ["base", + "FunctionResult", + 3, + 8], + ["decimal", + "FunctionResult", + 2, + 8], + ["days", + "FunctionResult", + 2, + 8], + ["binom_Dist_Range", + "FunctionResult", + 4, + 8], + ["gamma", + "FunctionResult", + 1, + 8], + ["skew_p", + "FunctionResult", + 1, + 72], + ["gauss", + "FunctionResult", + 1, + 8], + ["phi", + "FunctionResult", + 1, + 8], + ["rri", + "FunctionResult", + 3, + 8], + ["unichar", + "FunctionResult", + 1, + 8], + ["unicode", + "FunctionResult", + 1, + 8], + ["arabic", + "FunctionResult", + 1, + 8], + ["isoWeekNum", + "FunctionResult", + 1, + 8], + ["numberValue", + "FunctionResult", + 3, + 8], + ["sheet", + "FunctionResult", + 1, + 8], + ["sheets", + "FunctionResult", + 1, + 8], + ["isFormula", + "FunctionResult", + 1, + 8], + ["ceiling_Math", + "FunctionResult", + 3, + 8], + ["floor_Math", + "FunctionResult", + 3, + 8], + ["imSinh", + "FunctionResult", + 1, + 8], + ["imCosh", + "FunctionResult", + 1, + 8]]]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataXlapi, targetNamespaceObject: Excel }); +})(Excel || (Excel = {})); +var _EndExcel = "_EndExcel"; +if (typeof (window) !== "undefined" && + window.OSF && + window.OSF._OfficeAppFactory && + window.OSF._OfficeAppFactory.getHostInfo && + window.OSF._OfficeAppFactory.getHostInfo()) { + var hostPlatform = window.OSF._OfficeAppFactory.getHostInfo().hostPlatform; + if (hostPlatform === "web") { + OfficeExtension._internalConfig.enablePreviewExecution = true; + } +} +!function (modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) + return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + i: moduleId, + l: !1, + exports: {} + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.l = !0, module.exports; + } + __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function (exports, name, getter) { + __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { + enumerable: !0, + get: getter + }); + }, __webpack_require__.r = function (exports) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(exports, "__esModule", { + value: !0 + }); + }, __webpack_require__.t = function (value, mode) { + if (1 & mode && (value = __webpack_require__(value)), 8 & mode) + return value; + if (4 & mode && "object" == typeof value && value && value.__esModule) + return value; + var ns = Object.create(null); + if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { + enumerable: !0, + value: value + }), 2 & mode && "string" != typeof value) + for (var key in value) + __webpack_require__.d(ns, key, function (key) { + return value[key]; + }.bind(null, key)); + return ns; + }, __webpack_require__.n = function (module) { + var getter = module && module.__esModule ? function () { + return module["default"]; + } : function () { + return module; + }; + return __webpack_require__.d(getter, "a", getter), getter; + }, __webpack_require__.o = function (object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 1); +}([function (module, exports) { + module.exports = OfficeExtensionBatch; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), __webpack_require__(2), "undefined" == typeof CustomFunctionMappings && (window.CustomFunctionMappings = {}), + "undefined" == typeof Promise && (window.Promise = Office.Promise), window.OfficeExtensionBatch = window.OfficeExtensionBatch || window.OfficeExtension; + var customfunctions_agave_initialize_1 = __webpack_require__(3); + !function () { + var shouldInitialize = !1; + "undefined" != typeof OSF && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo && (0 != (2 & (OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo().flags)) && (shouldInitialize = !0)); + (0, customfunctions_agave_initialize_1["default"])(shouldInitialize); + }(); + }, function (module, exports) { + !function (self) { + "use strict"; + if (!self.fetch) { + var support_searchParams = "URLSearchParams" in self, support_iterable = "Symbol" in self && "iterator" in Symbol, support_blob = "FileReader" in self && "Blob" in self && function () { + try { + return new Blob, !0; + } + catch (e) { + return !1; + } + }(), support_formData = "FormData" in self, support_arrayBuffer = "ArrayBuffer" in self; + if (support_arrayBuffer) + var viewClasses = ["[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]"], isDataView = function (obj) { + return obj && DataView.prototype.isPrototypeOf(obj); + }, isArrayBufferView = ArrayBuffer.isView || function (obj) { + return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1; + }; + Headers.prototype.append = function (name, value) { + name = normalizeName(name), value = normalizeValue(value); + var oldValue = this.map[name]; + this.map[name] = oldValue ? oldValue + "," + value : value; + }, Headers.prototype["delete"] = function (name) { + delete this.map[normalizeName(name)]; + }, Headers.prototype.get = function (name) { + return name = normalizeName(name), this.has(name) ? this.map[name] : null; + }, Headers.prototype.has = function (name) { + return this.map.hasOwnProperty(normalizeName(name)); + }, Headers.prototype.set = function (name, value) { + this.map[normalizeName(name)] = normalizeValue(value); + }, Headers.prototype.forEach = function (callback, thisArg) { + for (var name in this.map) + this.map.hasOwnProperty(name) && callback.call(thisArg, this.map[name], name, this); + }, Headers.prototype.keys = function () { + var items = []; + return this.forEach((function (value, name) { + items.push(name); + })), iteratorFor(items); + }, Headers.prototype.values = function () { + var items = []; + return this.forEach((function (value) { + items.push(value); + })), iteratorFor(items); + }, Headers.prototype.entries = function () { + var items = []; + return this.forEach((function (value, name) { + items.push([name, value]); + })), iteratorFor(items); + }, support_iterable && (Headers.prototype[Symbol.iterator] = Headers.prototype.entries); + var methods = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"]; + Request.prototype.clone = function () { + return new Request(this, { + body: this._bodyInit + }); + }, Body.call(Request.prototype), Body.call(Response.prototype), Response.prototype.clone = function () { + return new Response(this._bodyInit, { + status: this.status, + statusText: this.statusText, + headers: new Headers(this.headers), + url: this.url + }); + }, Response.error = function () { + var response = new Response(null, { + status: 0, + statusText: "" + }); + return response.type = "error", response; + }; + var redirectStatuses = [301, 302, 303, 307, 308]; + Response.redirect = function (url, status) { + if (-1 === redirectStatuses.indexOf(status)) + throw new RangeError("Invalid status code"); + return new Response(null, { + status: status, + headers: { + location: url + } + }); + }, self.Headers = Headers, self.Request = Request, self.Response = Response, self.fetch = function (input, init) { + return new Promise((function (resolve, reject) { + var request = new Request(input, init), xhr = new XMLHttpRequest; + xhr.onload = function () { + var rawHeaders, headers, options = { + status: xhr.status, + statusText: xhr.statusText, + headers: (rawHeaders = xhr.getAllResponseHeaders() || "", headers = new Headers, + rawHeaders.split(/\r?\n/).forEach((function (line) { + var parts = line.split(":"), key = parts.shift().trim(); + if (key) { + var value = parts.join(":").trim(); + headers.append(key, value); + } + })), headers) + }; + options.url = "responseURL" in xhr ? xhr.responseURL : options.headers.get("X-Request-URL"); + var body = "response" in xhr ? xhr.response : xhr.responseText; + resolve(new Response(body, options)); + }, xhr.onerror = function () { + reject(new TypeError("Network request failed")); + }, xhr.ontimeout = function () { + reject(new TypeError("Network request failed")); + }, xhr.open(request.method, request.url, !0), "include" === request.credentials && (xhr.withCredentials = !0), + "responseType" in xhr && support_blob && (xhr.responseType = "blob"), request.headers.forEach((function (value, name) { + xhr.setRequestHeader(name, value); + })), xhr.send(void 0 === request._bodyInit ? null : request._bodyInit); + })); + }, self.fetch.polyfill = !0; + } + function normalizeName(name) { + if ("string" != typeof name && (name = String(name)), /[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) + throw new TypeError("Invalid character in header field name"); + return name.toLowerCase(); + } + function normalizeValue(value) { + return "string" != typeof value && (value = String(value)), value; + } + function iteratorFor(items) { + var iterator = { + next: function () { + var value = items.shift(); + return { + done: void 0 === value, + value: value + }; + } + }; + return support_iterable && (iterator[Symbol.iterator] = function () { + return iterator; + }), iterator; + } + function Headers(headers) { + this.map = {}, headers instanceof Headers ? headers.forEach((function (value, name) { + this.append(name, value); + }), this) : Array.isArray(headers) ? headers.forEach((function (header) { + this.append(header[0], header[1]); + }), this) : headers && Object.getOwnPropertyNames(headers).forEach((function (name) { + this.append(name, headers[name]); + }), this); + } + function consumed(body) { + if (body.bodyUsed) + return Promise.reject(new TypeError("Already read")); + body.bodyUsed = !0; + } + function fileReaderReady(reader) { + return new Promise((function (resolve, reject) { + reader.onload = function () { + resolve(reader.result); + }, reader.onerror = function () { + reject(reader.error); + }; + })); + } + function readBlobAsArrayBuffer(blob) { + var reader = new FileReader, promise = fileReaderReady(reader); + return reader.readAsArrayBuffer(blob), promise; + } + function bufferClone(buf) { + if (buf.slice) + return buf.slice(0); + var view = new Uint8Array(buf.byteLength); + return view.set(new Uint8Array(buf)), view.buffer; + } + function Body() { + return this.bodyUsed = !1, this._initBody = function (body) { + if (this._bodyInit = body, body) + if ("string" == typeof body) + this._bodyText = body; + else if (support_blob && Blob.prototype.isPrototypeOf(body)) + this._bodyBlob = body; + else if (support_formData && FormData.prototype.isPrototypeOf(body)) + this._bodyFormData = body; + else if (support_searchParams && URLSearchParams.prototype.isPrototypeOf(body)) + this._bodyText = body.toString(); + else if (support_arrayBuffer && support_blob && isDataView(body)) + this._bodyArrayBuffer = bufferClone(body.buffer), + this._bodyInit = new Blob([this._bodyArrayBuffer]); + else { + if (!support_arrayBuffer || !ArrayBuffer.prototype.isPrototypeOf(body) && !isArrayBufferView(body)) + throw new Error("unsupported BodyInit type"); + this._bodyArrayBuffer = bufferClone(body); + } + else + this._bodyText = ""; + this.headers.get("content-type") || ("string" == typeof body ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : support_searchParams && URLSearchParams.prototype.isPrototypeOf(body) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8")); + }, support_blob && (this.blob = function () { + var rejected = consumed(this); + if (rejected) + return rejected; + if (this._bodyBlob) + return Promise.resolve(this._bodyBlob); + if (this._bodyArrayBuffer) + return Promise.resolve(new Blob([this._bodyArrayBuffer])); + if (this._bodyFormData) + throw new Error("could not read FormData body as blob"); + return Promise.resolve(new Blob([this._bodyText])); + }, this.arrayBuffer = function () { + return this._bodyArrayBuffer ? consumed(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(readBlobAsArrayBuffer); + }), this.text = function () { + var blob, reader, promise, rejected = consumed(this); + if (rejected) + return rejected; + if (this._bodyBlob) + return blob = this._bodyBlob, reader = new FileReader, promise = fileReaderReady(reader), + reader.readAsText(blob), promise; + if (this._bodyArrayBuffer) + return Promise.resolve(function (buf) { + for (var view = new Uint8Array(buf), chars = new Array(view.length), i = 0; i < view.length; i++) + chars[i] = String.fromCharCode(view[i]); + return chars.join(""); + }(this._bodyArrayBuffer)); + if (this._bodyFormData) + throw new Error("could not read FormData body as text"); + return Promise.resolve(this._bodyText); + }, support_formData && (this.formData = function () { + return this.text().then(decode); + }), this.json = function () { + return this.text().then(JSON.parse); + }, this; + } + function Request(input, options) { + var method, upcased, body = (options = options || {}).body; + if (input instanceof Request) { + if (input.bodyUsed) + throw new TypeError("Already read"); + this.url = input.url, this.credentials = input.credentials, options.headers || (this.headers = new Headers(input.headers)), + this.method = input.method, this.mode = input.mode, body || null == input._bodyInit || (body = input._bodyInit, + input.bodyUsed = !0); + } + else + this.url = String(input); + if (this.credentials = options.credentials || this.credentials || "omit", !options.headers && this.headers || (this.headers = new Headers(options.headers)), + this.method = (method = options.method || this.method || "GET", upcased = method.toUpperCase(), + methods.indexOf(upcased) > -1 ? upcased : method), this.mode = options.mode || this.mode || null, + this.referrer = null, ("GET" === this.method || "HEAD" === this.method) && body) + throw new TypeError("Body not allowed for GET or HEAD requests"); + this._initBody(body); + } + function decode(body) { + var form = new FormData; + return body.trim().split("&").forEach((function (bytes) { + if (bytes) { + var split = bytes.split("="), name = split.shift().replace(/\+/g, " "), value = split.join("=").replace(/\+/g, " "); + form.append(decodeURIComponent(name), decodeURIComponent(value)); + } + })), form; + } + function Response(bodyInit, options) { + options || (options = {}), this.type = "default", this.status = "status" in options ? options.status : 200, + this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in options ? options.statusText : "OK", + this.headers = new Headers(options.headers), this.url = options.url || "", this._initBody(bodyInit); + } + }("undefined" != typeof self ? self : this); + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var CFRuntime = __webpack_require__(4); + exports["default"] = function (shouldInitRuntime) { + function documentReadyCallback() { + Office.onReady((function (hostInfo) { + hostInfo.host === Office.HostType.Excel ? function initializeCustomFunctionsOrDelay() { + CustomFunctionMappings && CustomFunctionMappings.__delay__ ? setTimeout(initializeCustomFunctionsOrDelay, 50) : CFRuntime.CustomFunctions.initialize(); + }() : console.warn("Warning: Expected to be loaded inside of an Excel add-in."); + })); + } + window.CustomFunctions = window.CustomFunctions || {}, window.CustomFunctions.setCustomFunctionInvoker = CFRuntime.setCustomFunctionInvoker, + window.CustomFunctions.Error = CFRuntime.CustomFunctionError, window.CustomFunctions.ErrorCode = CFRuntime.ErrorCode, + window.CustomFunctions.FormattedNumber = CFRuntime.CustomFunctionFormattedNumber, + window.CustomFunctions.Entity = CFRuntime.CustomFunctionEntity, window.CustomFunctions.WebImage = CFRuntime.CustomFunctionWebImage, + window.CustomFunctions.Attribution = CFRuntime.CustomFunctionAttribution, window.CustomFunctions.Provider = CFRuntime.CustomFunctionProvider, + CFRuntime.setCustomFunctionAssociation(window.CustomFunctions._association), shouldInitRuntime && ("loading" === document.readyState ? document.addEventListener("DOMContentLoaded", documentReadyCallback) : documentReadyCallback()); + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function (d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) + Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function (d, b) { + if ("function" != typeof b && null !== b) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }); + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.CustomFunctionsContainer = exports.CustomFunctions = exports.setCustomFunctionInvoker = exports.setCustomFunctionAssociation = exports.customFunctionProxy = exports.CustomFunctionProxy = exports.CreateCustomFunctionInstance = exports.CustomFunctionProvider = exports.CustomFunctionAttribution = exports.CustomFunctionWebImage = exports.CustomFunctionFormattedNumber = exports.CustomFunctionEntity = exports.CustomFunctionError = exports.ErrorCode = exports.InvocationContext = exports.Script = void 0; + var OfficeExtension = __webpack_require__(0), Core = __webpack_require__(0), _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject, _createRootServiceObject = (OfficeExtension.BatchApiHelper.createMethodObject, + OfficeExtension.BatchApiHelper.createIndexerObject, OfficeExtension.BatchApiHelper.createRootServiceObject), _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject, _invokeMethod = (OfficeExtension.BatchApiHelper.createChildItemObject, + OfficeExtension.BatchApiHelper.invokeMethod), _isNullOrUndefined = (OfficeExtension.BatchApiHelper.invokeEnsureUnchanged, + OfficeExtension.BatchApiHelper.invokeSetProperty, OfficeExtension.Utility.isNullOrUndefined), _throwIfApiNotSupported = (OfficeExtension.Utility.isUndefined, + OfficeExtension.Utility.throwIfNotLoaded, OfficeExtension.Utility.throwIfApiNotSupported), _load = OfficeExtension.Utility.load, _toJson = (OfficeExtension.Utility.retrieve, + OfficeExtension.Utility.toJson), _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary, _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults, _processRetrieveResult = (OfficeExtension.Utility.adjustToDateTime, + OfficeExtension.Utility.processRetrieveResult), CustomFunctionRequestContext = (OfficeExtension.Utility.setMockData, + OfficeExtension.CommonUtility.calculateApiFlags, function (_super) { + function CustomFunctionRequestContext(requestInfo) { + var _this = _super.call(this, requestInfo) || this; + return _this.m_customFunctions = CustomFunctions.newObject(_this), _this.m_container = _createRootServiceObject(CustomFunctionsContainer, _this), + _this._rootObject = _this.m_container, _this._rootObjectPropertyName = "customFunctionsContainer", + _this._requestFlagModifier = 2176, _this; + } + return __extends(CustomFunctionRequestContext, _super), Object.defineProperty(CustomFunctionRequestContext.prototype, "customFunctions", { + get: function () { + return this.m_customFunctions; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(CustomFunctionRequestContext.prototype, "customFunctionsContainer", { + get: function () { + return this.m_container; + }, + enumerable: !1, + configurable: !0 + }), CustomFunctionRequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { + 5004 === officeJsErrorCode && (response.ErrorCode = CustomFunctionRuntimeErrorCode.invalidOperationInCellEditMode, + response.ErrorMessage = OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode)); + }, CustomFunctionRequestContext; + }(OfficeExtension.ClientRequestContext)); + exports.Script = { + _CustomFunctionMetadata: {} + }; + var CustomFunctionLoggingSeverity, InvocationContext = function () { + function InvocationContext(functionName, address, parameterAddresses, setResultHandler, setErrorHandler) { + this._functionName = functionName, _isNullOrUndefined(address) || (this._address = address), + _isNullOrUndefined(parameterAddresses) || (this._parameterAddresses = parameterAddresses), + this.setResult = setResultHandler, this.setError = setErrorHandler; + } + return Object.defineProperty(InvocationContext.prototype, "onCanceled", { + get: function () { + if (!_isNullOrUndefined(this._onCanceled) && "function" == typeof this._onCanceled) + return this._onCanceled; + }, + set: function (handler) { + this._onCanceled = handler; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(InvocationContext.prototype, "functionName", { + get: function () { + return this._functionName; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(InvocationContext.prototype, "address", { + get: function () { + return this._address; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(InvocationContext.prototype, "parameterAddresses", { + get: function () { + return this._parameterAddresses; + }, + enumerable: !1, + configurable: !0 + }), InvocationContext; + }(); + exports.InvocationContext = InvocationContext, function (CustomFunctionLoggingSeverity) { + CustomFunctionLoggingSeverity.Info = "Medium", CustomFunctionLoggingSeverity.Error = "Unexpected", + CustomFunctionLoggingSeverity.Verbose = "Verbose"; + }(CustomFunctionLoggingSeverity || (CustomFunctionLoggingSeverity = {})); + var ErrorCode, CustomFunctionLog = function (Severity, Message) { + this.Severity = Severity, this.Message = Message; + }, CustomFunctionsLogger = function () { + function CustomFunctionsLogger() { } + return CustomFunctionsLogger.logEvent = function (log, data, data2) { + if (CustomFunctionsLogger.s_shouldLog || OfficeExtension.CoreUtility._logEnabled) { + var logMessage = log.Severity + " " + log.Message + data; + if (data2 && (logMessage = logMessage + " " + data2), OfficeExtension.Utility.log(logMessage), + CustomFunctionsLogger.s_shouldLog) + switch (log.Severity) { + case CustomFunctionLoggingSeverity.Verbose: + null !== console.log && console.log(logMessage); + break; + case CustomFunctionLoggingSeverity.Info: + null !== console.info && console.info(logMessage); + break; + case CustomFunctionLoggingSeverity.Error: + null !== console.error && console.error(logMessage); + } + } + }, CustomFunctionsLogger.shouldLog = function () { + try { + return !_isNullOrUndefined(console) && !_isNullOrUndefined(window) && window.name && "string" == typeof window.name && JSON.parse(window.name)[CustomFunctionsLogger.CustomFunctionLoggingFlag]; + } + catch (ex) { + return OfficeExtension.Utility.log(JSON.stringify(ex)), !1; + } + }, CustomFunctionsLogger.CustomFunctionLoggingFlag = "CustomFunctionsRuntimeLogging", + CustomFunctionsLogger.s_shouldLog = CustomFunctionsLogger.shouldLog(), CustomFunctionsLogger; + }(); + !function (ErrorCode) { + ErrorCode.invalidValue = "#VALUE!", ErrorCode.notAvailable = "#N/A", ErrorCode.divisionByZero = "#DIV/0!", + ErrorCode.invalidNumber = "#NUM!", ErrorCode.nullReference = "#NULL!", ErrorCode.invalidName = "#NAME?", + ErrorCode.invalidReference = "#REF!"; + }(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {})); + var CustomFunctionError = function (_super) { + function CustomFunctionError(errorCode, errorMessage, errorSubType) { + var _this = _super.call(this, errorMessage || "") || this; + return _this.type = CustomFunctionError.valueType, _this.basicType = CustomFunctionError.valueType, + Object.setPrototypeOf(_this, CustomFunctionError.prototype), _this.code = errorCode || ErrorCode.invalidValue, + _this.basicValue = errorCode || ErrorCode.invalidValue, _this.errorSubType = errorSubType, + _this.stack = void 0, _this; + } + return __extends(CustomFunctionError, _super), CustomFunctionError.prototype.toJSON = function () { + return { + valueType: "CustomFunctionError", + code: this.code, + type: this.type, + basicValue: this.basicValue, + basicType: this.type, + errorSubType: this.errorSubType, + message: this._getMessage(), + errorType: this._getErrorType() + }; + }, CustomFunctionError.prototype._getErrorType = function () { + switch (this.basicValue) { + case ErrorCode.invalidValue: + return "Value"; + case ErrorCode.divisionByZero: + return "Div0"; + case ErrorCode.notAvailable: + return "NotAvailable"; + case ErrorCode.invalidNumber: + return "Num"; + case ErrorCode.invalidName: + return "Name"; + case ErrorCode.invalidReference: + return "Ref"; + case ErrorCode.nullReference: + return "Null"; + default: + return; + } + }, CustomFunctionError.prototype._getMessage = function () { + switch (this.basicValue) { + case ErrorCode.invalidValue: + case ErrorCode.notAvailable: + return "" == this.message ? void 0 : this.message; + case ErrorCode.divisionByZero: + case ErrorCode.invalidNumber: + case ErrorCode.invalidName: + case ErrorCode.invalidReference: + case ErrorCode.nullReference: + default: + return; + } + }, CustomFunctionError.valueType = "Error", CustomFunctionError; + }(Error); + exports.CustomFunctionError = CustomFunctionError; + var CustomFunctionEntity = function () { + function CustomFunctionEntity(text, properties) { + this.type = CustomFunctionEntity.valueType, this.basicValue = "#VALUE!", this.basicType = "Error", + Object.setPrototypeOf(this, CustomFunctionEntity.prototype), this.text = text, this.properties = properties; + } + return CustomFunctionEntity.prototype.toJSON = function () { + return { + type: this.type, + text: this.text, + basicValue: this.basicValue, + basicType: this.basicType, + properties: this.properties + }; + }, CustomFunctionEntity.valueType = "Entity", CustomFunctionEntity; + }(); + exports.CustomFunctionEntity = CustomFunctionEntity; + var CustomFunctionFormattedNumber = function () { + function CustomFunctionFormattedNumber(basicValue, numberFormat) { + this.type = CustomFunctionFormattedNumber.valueType, this.basicValue = basicValue, + this.numberFormat = numberFormat; + } + return CustomFunctionFormattedNumber.prototype.toJSON = function () { + return { + type: this.type, + basicValue: this.basicValue, + numberFormat: this.numberFormat + }; + }, CustomFunctionFormattedNumber.valueType = "FormattedNumber", CustomFunctionFormattedNumber; + }(); + exports.CustomFunctionFormattedNumber = CustomFunctionFormattedNumber; + var CustomFunctionWebImage = function () { + function CustomFunctionWebImage(address, altText, relatedImagesAddress, attribution, provider) { + this.type = CustomFunctionWebImage.valueType, this.basicValue = "#VALUE!", this.basicType = "Error", + this.address = address, null != attribution && (this.attribution = attribution), + null != provider && (this.provider = provider), null != altText && (this.altText = altText), + null != relatedImagesAddress && (this.relatedImagesAddress = relatedImagesAddress); + } + return CustomFunctionWebImage.prototype.toJSON = function () { + return { + type: this.type, + basicValue: this.basicValue, + basicType: this.basicType, + address: this.address, + altText: this.altText, + relatedImagesAddress: this.relatedImagesAddress, + attribution: null == this.attribution ? void 0 : this.attribution.map((function (attr) { + return attr.toJSON(); + })), + provider: null == this.provider ? void 0 : this.provider.toJSON() + }; + }, CustomFunctionWebImage.valueType = "WebImage", CustomFunctionWebImage; + }(); + exports.CustomFunctionWebImage = CustomFunctionWebImage; + var CustomFunctionAttribution = function () { + function CustomFunctionAttribution(licenseAddress, licenseText, sourceAddress, sourceText) { + null != licenseAddress && (this.licenseAddress = licenseAddress), null != licenseText && (this.licenseText = licenseText), + null != sourceAddress && (this.sourceAddress = sourceAddress), null != sourceText && (this.sourceText = sourceText); + } + return CustomFunctionAttribution.prototype.toJSON = function () { + return { + licenseAddress: this.licenseAddress, + licenseText: this.licenseText, + sourceAddress: this.sourceAddress, + sourceText: this.sourceText + }; + }, CustomFunctionAttribution; + }(); + exports.CustomFunctionAttribution = CustomFunctionAttribution; + var CustomFunctionProvider = function () { + function CustomFunctionProvider(description, logoSourceAddress, logoTargetAddress) { + this.description = description, null != logoSourceAddress && (this.logoSourceAddress = logoSourceAddress), + null != logoTargetAddress && (this.logoTargetAddress = logoTargetAddress); + } + return CustomFunctionProvider.prototype.toJSON = function () { + return { + description: this.description, + logoSourceAddress: this.logoSourceAddress, + logoTargetAddress: this.logoTargetAddress + }; + }, CustomFunctionProvider; + }(); + exports.CustomFunctionProvider = CustomFunctionProvider, exports.CreateCustomFunctionInstance = function CreateCustomFunctionInstance(parameterValues) { + if (parameterValues instanceof Array) + return parameterValues.map((function (item) { + return CreateCustomFunctionInstance(item); + })); + if (!(parameterValues instanceof Object)) + return parameterValues; + var obj = JSON.parse(parameterValues.value); + switch (obj.type) { + case CustomFunctionEntity.valueType: + return new CustomFunctionEntity(obj.text, obj.properties); + case CustomFunctionFormattedNumber.valueType: + return new CustomFunctionFormattedNumber(obj.primitive, obj.numberFormat); + case CustomFunctionError.valueType: + return new CustomFunctionError(obj.primitive, void 0, obj.errorSubCode); + case CustomFunctionWebImage.valueType: + return new CustomFunctionWebImage(obj.address, obj.altText, obj.relatedImagesAddress, obj.attribution, obj.provider); + case "Double": + case "String": + case "Boolean": + return obj.primitive; + default: + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy.createRichDataFromJsonString"); + } + }; + var CustomFunctionProxy = function () { + function CustomFunctionProxy() { + this._whenInit = void 0, this._isInit = !1, this._setResultsDelayMillis = 50, this._setResultsOverdueDelayMillis = 2e3, + this._maxContextSyncExecutionDurationMills = 15e3, this._minContextSyncIntervalMills = 500, + this._smallerMinContextSyncIntervalMills = 200, this._maxContextSyncIntervalMills = 2e3, + this._setResultsLifeMillis = 6e4, this._ensureInitRetryDelayMillis = 500, this._resultEntryBuffer = {}, + this._resultEntryRetryBuffer = {}, this._retryBufferBodySize = 0, this._isSetResultsTaskScheduled = !1, + this._setResultsTaskOverdueTime = 0, this._inProgressContextSyncExpectedFinishTime = 0, + this._batchQuotaMillis = 1e3, this._invocationContextMap = {}, this._maxResultSize = 2e6; + } + return CustomFunctionProxy.prototype._initSettings = function () { + if ("object" == typeof exports.Script && "object" == typeof exports.Script._CustomFunctionSettings) { + if ("number" == typeof exports.Script._CustomFunctionSettings.setResultsDelayMillis) { + var setResultsDelayMillis = exports.Script._CustomFunctionSettings.setResultsDelayMillis; + setResultsDelayMillis = Math.max(0, setResultsDelayMillis), setResultsDelayMillis = Math.min(1e3, setResultsDelayMillis), + this._setResultsDelayMillis = setResultsDelayMillis; + } + if ("number" == typeof exports.Script._CustomFunctionSettings.ensureInitRetryDelayMillis) { + var ensureInitRetryDelayMillis = exports.Script._CustomFunctionSettings.ensureInitRetryDelayMillis; + ensureInitRetryDelayMillis = Math.max(0, ensureInitRetryDelayMillis), ensureInitRetryDelayMillis = Math.min(2e3, ensureInitRetryDelayMillis), + this._ensureInitRetryDelayMillis = ensureInitRetryDelayMillis; + } + if ("number" == typeof exports.Script._CustomFunctionSettings.setResultsLifeMillis) { + var setResultsLifeMillis = exports.Script._CustomFunctionSettings.setResultsLifeMillis; + setResultsLifeMillis = Math.max(0, setResultsLifeMillis), setResultsLifeMillis = Math.min(6e5, setResultsLifeMillis), + this._setResultsLifeMillis = setResultsLifeMillis; + } + if ("number" == typeof exports.Script._CustomFunctionSettings.batchQuotaMillis) { + var batchQuotaMillis = exports.Script._CustomFunctionSettings.batchQuotaMillis; + batchQuotaMillis = Math.max(0, batchQuotaMillis), batchQuotaMillis = Math.min(1e3, batchQuotaMillis), + this._batchQuotaMillis = batchQuotaMillis; + } + } + }, CustomFunctionProxy.prototype.ensureInit = function (context) { + var _this = this; + return this._initSettings(), void 0 === this._whenInit && (this._whenInit = OfficeExtension.Utility._createPromiseFromResult(null).then((function () { + if (!_this._isInit) + return context.eventRegistration.register(5, "", _this._handleMessage.bind(_this)); + })).then((function () { + _this._isInit = !0; + }))), this._isInit || context._pendingRequest._addPreSyncPromise(this._whenInit), + this._whenInit; + }, CustomFunctionProxy.prototype.setCustomFunctionInvoker = function (invoker) { + "object" == typeof CustomFunctionMappings && delete CustomFunctionMappings.__delay__, + this._invoker = invoker; + }, CustomFunctionProxy.prototype.setCustomFunctionAssociation = function (association) { + var _this = this; + this._customFunctionMappingsUpperCase = void 0, this._association = association, + this._association && this._association.onchange((function () { + _this._customFunctionMappingsUpperCase = void 0; + })); + }, CustomFunctionProxy.prototype._initFromHostBridge = function (hostBridge) { + var _this = this; + this._initSettings(), hostBridge.addHostMessageHandler((function (bridgeMessage) { + 3 === bridgeMessage.type ? _this._handleMessage(bridgeMessage.message) : 4 === bridgeMessage.type && _this._handleSettings(bridgeMessage.message); + })), this._isInit = !0, this._whenInit = OfficeExtension.CoreUtility.Promise.resolve(); + }, CustomFunctionProxy.prototype._handleSettings = function (args) { + OfficeExtension.Utility.log("CustomFunctionProxy._handleSettings:" + JSON.stringify(args)), + args && "object" == typeof args && (CustomFunctionsLogger.s_shouldLog = args[CustomFunctionsLogger.CustomFunctionLoggingFlag]); + }, CustomFunctionProxy.prototype._handleMessage = function (args) { + try { + OfficeExtension.Utility.log("CustomFunctionProxy._handleMessage"), OfficeExtension.Utility.checkArgumentNull(args, "args"); + for (var entryArray = args.entries, invocationArray = [], cancellationArray = [], metadataArray = [], i = 0; i < entryArray.length; i++) + 1 === entryArray[i].messageCategory && ("string" == typeof entryArray[i].message && (entryArray[i].message = JSON.parse(entryArray[i].message)), + 1e3 === entryArray[i].messageType ? invocationArray.push(entryArray[i]) : 1001 === entryArray[i].messageType ? cancellationArray.push(entryArray[i]) : 1002 === entryArray[i].messageType ? metadataArray.push(entryArray[i]) : OfficeExtension.Utility.log("CustomFunctionProxy._handleMessage unknown message type " + entryArray[i].messageType)); + if (metadataArray.length > 0 && this._handleMetadataEntries(metadataArray), invocationArray.length > 0) { + var batchArray = this._batchInvocationEntries(invocationArray); + batchArray.length > 0 && this._invokeRemainingBatchEntries(batchArray, 0); + } + cancellationArray.length > 0 && this._handleCancellationEntries(cancellationArray); + } + catch (ex) { + throw CustomFunctionProxy._tryLog(ex), ex; + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }, CustomFunctionProxy.toLogMessage = function (ex) { + var ret = "Unknown Error"; + if (ex) + try { + ex.toString && (ret = ex.toString()), ret = ret + " " + JSON.stringify(ex); + } + catch (otherEx) { + ret = "Unexpected Error"; + } + return ret; + }, CustomFunctionProxy._tryLog = function (ex) { + var message = CustomFunctionProxy.toLogMessage(ex); + OfficeExtension.Utility.log(message); + }, CustomFunctionProxy.prototype._handleMetadataEntries = function (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var message = entryArray[i].message; + if (_isNullOrUndefined(message)) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy._handleMetadataEntries"); + exports.Script._CustomFunctionMetadata[message.functionName] = { + options: { + stream: message.isStream, + cancelable: message.isCancelable + } + }; + } + }, CustomFunctionProxy.prototype._handleCancellationEntries = function (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var message = entryArray[i].message; + if (_isNullOrUndefined(message)) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy._handleCancellationEntries"); + var invocationId = message.invocationId, invocationContext = this._invocationContextMap[invocationId]; + _isNullOrUndefined(invocationContext) || (delete this._invocationContextMap[invocationId], + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionCancellation, invocationContext.functionName), + _isNullOrUndefined(invocationContext.onCanceled) || invocationContext.onCanceled()); + } + }, CustomFunctionProxy.prototype._transferCustomFunctionError = function (entryArray) { + var _this = this; + return entryArray.map((function (value, index) { + return null === value ? value : null != value.code && "CustomFunctionError" == value.type ? new CustomFunctionError(value.code) : value instanceof Array ? _this._transferCustomFunctionError(value) : value; + })); + }, CustomFunctionProxy.prototype._transferCustomFunctionRichData = function (entryArray) { + var _this = this; + return entryArray.map((function (element, index) { + return element instanceof Array ? _this._transferCustomFunctionRichData(element) : element instanceof Object ? JSON.parse(element.value) : element; + })); + }, CustomFunctionProxy.prototype._batchInvocationEntries = function (entryArray) { + for (var _this = this, batchArray = [], _loop_1 = function (i) { + var message, arrayOrObjectMessage = entryArray[i].message; + if (Array.isArray(arrayOrObjectMessage) ? (message = { + invocationId: arrayOrObjectMessage[0], + functionName: arrayOrObjectMessage[1], + parameterValues: arrayOrObjectMessage[2], + address: arrayOrObjectMessage[3], + flags: arrayOrObjectMessage[4], + parameterAddresses: null + }, _isNullOrUndefined(arrayOrObjectMessage[5]) || (message.parameterAddresses = arrayOrObjectMessage[5])) : message = arrayOrObjectMessage, + _isNullOrUndefined(message)) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy._batchInvocationEntries"); + if (_isNullOrUndefined(message.invocationId) || message.invocationId < 0) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "invocationId", "CustomFunctionProxy._batchInvocationEntries"); + if (_isNullOrUndefined(message.functionName)) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "functionName", "CustomFunctionProxy._batchInvocationEntries"); + var call = null, isCancelable = !1, isStreaming = !1, isAllowError = !1; + if ("number" == typeof message.flags) + isCancelable = 0 != (1 & message.flags), isStreaming = 0 != (2 & message.flags), + isAllowError = 0 != (4 & message.flags), 0 != (8 & message.flags) && (message.parameterValues = this_1._transferCustomFunctionRichData(message.parameterValues)), + isAllowError && (message.parameterValues = this_1._transferCustomFunctionError(message.parameterValues)); + else { + var metadata = exports.Script._CustomFunctionMetadata[message.functionName]; + if (_isNullOrUndefined(metadata)) + return CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionNotFoundLog, message.functionName), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.8") ? this_1._setError(message.invocationId, null, 9) : this_1._setError(message.invocationId, "N/A", 1), + "continue"; + isCancelable = metadata.options.cancelable, isStreaming = metadata.options.stream; + } + if (this_1._invoker && !this_1._customFunctionMappingsContains(message.functionName)) + return this_1._invokeFunctionUsingInvoker(message), + "continue"; + try { + call = this_1._getFunction(message.functionName); + } + catch (ex) { + return CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionNotFoundLog, message.functionName), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.8") ? this_1._setError(message.invocationId, ex, 10) : this_1._setError(message.invocationId, ex, 1), + "continue"; + } + var invocationContext = void 0; + if (isStreaming || isCancelable) { + var setResult = void 0, setError = void 0; + isStreaming && (setResult = function (result) { + _this._invocationContextMap[message.invocationId] ? _this._setResult(message.invocationId, result) : CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionAlreadyCancelled, message.functionName); + }, setError = function (error) { + _this._invocationContextMap[message.invocationId] ? _this._setError(message.invocationId, error.message, _this._getCustomFunctionResultErrorCodeFromErrorCode(error.code)) : CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionAlreadyCancelled, message.functionName); + }), invocationContext = new InvocationContext(message.functionName, message.address, message.parameterAddresses, setResult, setError), + this_1._invocationContextMap[message.invocationId] = invocationContext; + } + else + invocationContext = new InvocationContext(message.functionName, message.address, message.parameterAddresses); + message.parameterValues.push(invocationContext), batchArray.push({ + call: call, + isBatching: !1, + isStreaming: isStreaming, + invocationIds: [message.invocationId], + parameterValueSets: [message.parameterValues], + functionName: message.functionName + }); + }, this_1 = this, i = 0; i < entryArray.length; i++) + _loop_1(i); + return batchArray; + }, CustomFunctionProxy.prototype._invokeFunctionUsingInvoker = function (message) { + var _this = this, isCancelable = 0 != (1 & message.flags), isStreaming = 0 != (2 & message.flags), invocationId = message.invocationId, setResult = void 0, setError = void 0; + if (isStreaming) + setResult = function (result) { + _this._invocationContextMap[invocationId] && _this._setResult(invocationId, result); + }, setError = function (error) { + _this._invocationContextMap[invocationId] && _this._setError(invocationId, error.message, _this._getCustomFunctionResultErrorCodeFromErrorCode(error.code)); + }; + else { + var setResultCalled_1 = !1; + setResult = function (result) { + setResultCalled_1 || _this._setResult(invocationId, result), setResultCalled_1 = !0; + }, setError = function (error) { + setResultCalled_1 || _this._setError(invocationId, error.message, _this._getCustomFunctionResultErrorCodeFromErrorCode(error.code)), + setResultCalled_1 = !0; + }; + } + var invocationContext = new InvocationContext(message.functionName, message.address, message.parameterAddresses, setResult, setError); + (isStreaming || isCancelable) && (this._invocationContextMap[invocationId] = invocationContext), + this._invoker.invoke(message.functionName, message.parameterValues, invocationContext); + }, CustomFunctionProxy.prototype._ensureCustomFunctionMappingsUpperCase = function () { + if (_isNullOrUndefined(this._customFunctionMappingsUpperCase)) { + if (this._customFunctionMappingsUpperCase = {}, "object" == typeof CustomFunctionMappings) + for (var key in OfficeExtension.CoreUtility.log("CustomFunctionMappings.Keys=" + JSON.stringify(Object.keys(CustomFunctionMappings))), + CustomFunctionMappings) + this._customFunctionMappingsUpperCase[key.toUpperCase()] && CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionDuplicatedName, key), + this._customFunctionMappingsUpperCase[key.toUpperCase()] = CustomFunctionMappings[key]; + if (this._association) + for (var key in OfficeExtension.CoreUtility.log("CustomFunctionAssociateMappings.Keys=" + JSON.stringify(Object.keys(this._association.mappings))), + this._association.mappings) + this._customFunctionMappingsUpperCase[key.toUpperCase()] && CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionDuplicatedName, key), + this._customFunctionMappingsUpperCase[key.toUpperCase()] = this._association.mappings[key]; + } + }, CustomFunctionProxy.prototype._customFunctionMappingsContains = function (functionName) { + this._ensureCustomFunctionMappingsUpperCase(); + var functionNameUpperCase = functionName.toUpperCase(); + if (!_isNullOrUndefined(this._customFunctionMappingsUpperCase[functionNameUpperCase])) + return !0; + if ("undefined" != typeof window) { + for (var functionParent = window, functionNameSegments = functionName.split("."), i = 0; i < functionNameSegments.length - 1; i++) + if (functionParent = functionParent[functionNameSegments[i]], + _isNullOrUndefined(functionParent) || "object" != typeof functionParent) + return !1; + if ("function" == typeof functionParent[functionNameSegments[functionNameSegments.length - 1]]) + return !0; + } + return !1; + }, CustomFunctionProxy.prototype._getCustomFunctionMappings = function (functionName) { + this._ensureCustomFunctionMappingsUpperCase(); + var functionNameUpperCase = functionName.toUpperCase(); + if (!_isNullOrUndefined(this._customFunctionMappingsUpperCase[functionNameUpperCase])) { + if ("function" == typeof this._customFunctionMappingsUpperCase[functionNameUpperCase]) + return this._customFunctionMappingsUpperCase[functionNameUpperCase]; + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.invalidOperation, OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.customFunctionInvalidFunctionMapping, functionName), "CustomFunctionProxy._getCustomFunctionMappings"); + } + }, CustomFunctionProxy.prototype._getFunction = function (functionName) { + return this._getCustomFunctionMappings(functionName); + }, CustomFunctionProxy.prototype._invokeRemainingBatchEntries = function (batchArray, startIndex) { + OfficeExtension.Utility.log("CustomFunctionProxy._invokeRemainingBatchEntries"); + for (var startTimeMillis = Date.now(), i = startIndex; i < batchArray.length; i++) { + if (!(Date.now() - startTimeMillis < this._batchQuotaMillis)) { + OfficeExtension.Utility.log("setTimeout(CustomFunctionProxy._invokeRemainingBatchEntries)"), + setTimeout(this._invokeRemainingBatchEntries.bind(this), 0, batchArray, i); + break; + } + this._invokeFunctionAndSetResult(batchArray[i]); + } + }, CustomFunctionProxy.prototype._invokeFunctionAndSetResult = function (batch) { + var results, _this = this; + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionStartLog, batch.functionName); + var startTime = Date.now(); + try { + results = batch.isBatching ? batch.call.call(null, batch.parameterValueSets) : [batch.call.apply(null, batch.parameterValueSets[0])]; + } + catch (ex) { + var outboundData_1 = []; + outboundData_1.push(Date.now() - startTime); + for (var i = 0; i < batch.invocationIds.length; i++) + ex instanceof CustomFunctionError ? this._setErrorWithOutboundData(batch.invocationIds[i], ex.message, this._getCustomFunctionResultErrorCodeFromErrorCode(ex.code), outboundData_1) : this._setErrorWithOutboundData(batch.invocationIds[i], ex, 2, outboundData_1); + return void CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionExceptionThrownLog, batch.functionName, CustomFunctionProxy.toLogMessage(ex)); + } + var outboundData = []; + if (CustomFunctions.isFeatureEnabled(3) || outboundData.push(Date.now() - startTime), + batch.isStreaming) + ; + else if (results.length === batch.parameterValueSets.length) { + var _loop_2 = function (i) { + _isNullOrUndefined(results[i]) || "object" != typeof results[i] || "function" != typeof results[i].then ? (CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionFinishLog, batch.functionName), + this_2._setResultWithOutboundData(batch.invocationIds[i], results[i], outboundData)) : results[i].then((function (value) { + CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionFinishLog, batch.functionName), + _this._setResultWithOutboundData(batch.invocationIds[i], value, outboundData); + }), (function (reason) { + CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionRejectedPromoseLog, batch.functionName, CustomFunctionProxy.toLogMessage(reason)), + reason instanceof CustomFunctionError ? _this._setErrorWithOutboundData(batch.invocationIds[i], reason, _this._getCustomFunctionResultErrorCodeFromErrorCode(reason.code), outboundData) : _this._setErrorWithOutboundData(batch.invocationIds[i], reason, 3, outboundData); + })); + }, this_2 = this; + for (i = 0; i < results.length; i++) + _loop_2(i); + } + else { + CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionBatchMismatchLog, batch.functionName); + for (i = 0; i < batch.invocationIds.length; i++) + this._setErrorWithOutboundData(batch.invocationIds[i], OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch), 4, outboundData); + } + }, CustomFunctionProxy.prototype._setResult = function (invocationId, result) { + var outboundData = []; + outboundData.push(0), this._setResultWithOutboundData(invocationId, result, outboundData); + }, CustomFunctionProxy.prototype._setResultWithOutboundData = function (invocationId, result, outboundData) { + var invocationResult = { + id: invocationId, + value: result, + outboundData: outboundData + }; + "number" == typeof result ? isNaN(result) ? (invocationResult.failed = !0, invocationResult.value = "NaN") : isFinite(result) || (invocationResult.failed = !0, + invocationResult.value = "Infinity", invocationResult.errorCode = 6) : result instanceof CustomFunctionError || result instanceof CustomFunctionEntity || result instanceof CustomFunctionFormattedNumber || result instanceof CustomFunctionWebImage ? (invocationResult.failed = !1, + invocationResult.value = result.toJSON()) : result instanceof Error && (invocationResult.failed = !0, + invocationResult.value = CustomFunctionProxy.toLogMessage(result), invocationResult.errorCode = 0); + var timeNow = Date.now(); + this._resultEntryBuffer[invocationId] = { + timeCreated: timeNow, + result: invocationResult + }, this._ensureSetResultsTaskIsScheduled(timeNow); + }, CustomFunctionProxy.prototype._setError = function (invocationId, error, errorCode) { + var outboundData = []; + outboundData.push(0), this._setErrorWithOutboundData(invocationId, error, errorCode, outboundData); + }, CustomFunctionProxy.prototype._setErrorWithOutboundData = function (invocationId, error, errorCode, outboundData) { + var message = ""; + _isNullOrUndefined(error) || (error instanceof CustomFunctionError && !_isNullOrUndefined(error.message) ? message = error.message : "string" == typeof error && (message = error)); + var result = { + id: invocationId, + failed: !0, + value: message, + errorCode: errorCode, + outboundData: outboundData + }, timeNow = Date.now(); + this._resultEntryBuffer[invocationId] = { + timeCreated: timeNow, + result: result + }, this._ensureSetResultsTaskIsScheduled(timeNow); + }, CustomFunctionProxy.prototype._getCustomFunctionResultErrorCodeFromErrorCode = function (errorCode) { + var internalCode; + switch (errorCode) { + case ErrorCode.notAvailable: + internalCode = 1; + break; + case ErrorCode.divisionByZero: + internalCode = 5; + break; + case ErrorCode.invalidValue: + internalCode = 7; + break; + case ErrorCode.invalidNumber: + internalCode = 6; + break; + case ErrorCode.nullReference: + internalCode = 8; + break; + default: + internalCode = 7; + } + return internalCode; + }, CustomFunctionProxy.prototype._ensureSetResultsTaskIsScheduled = function (timeNow) { + if (this._setResultsTaskOverdueTime > 0 && timeNow > this._setResultsTaskOverdueTime) + return OfficeExtension.Utility.log("SetResultsTask overdue"), + void this._executeSetResultsTask(); + this._isSetResultsTaskScheduled || (OfficeExtension.Utility.log("setTimeout(CustomFunctionProxy._executeSetResultsTask)"), + setTimeout(this._executeSetResultsTask.bind(this), this._setResultsDelayMillis), + this._isSetResultsTaskScheduled = !0, this._setResultsTaskOverdueTime = timeNow + this._setResultsDelayMillis + this._setResultsOverdueDelayMillis); + }, CustomFunctionProxy.prototype._convertCustomFunctionInvocationResultToArray = function (result) { + var ret = []; + return ret.push(result.id), ret.push(!result.failed), OfficeExtension.CoreUtility.isUndefined(result.value) ? ret.push(null) : ret.push(result.value), + result.failed && (OfficeExtension.CoreUtility.isUndefined(result.errorCode) ? ret.push(0) : ret.push(result.errorCode)), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.9") && ret.push(result.outboundData), + ret; + }, CustomFunctionProxy.prototype._executeSetResultsTask = function () { + var _this = this; + OfficeExtension.Utility.log("CustomFunctionProxy._executeSetResultsTask"); + var timeNow = Date.now(); + if (this._inProgressContextSyncExpectedFinishTime > 0 && this._inProgressContextSyncExpectedFinishTime > timeNow) + return OfficeExtension.Utility.log("context.sync() is in progress. setTimeout(CustomFunctionProxy._executeSetResultsTask)"), + setTimeout(this._executeSetResultsTask.bind(this), this._setResultsDelayMillis), + void (this._setResultsTaskOverdueTime = timeNow + this._setResultsDelayMillis + this._setResultsOverdueDelayMillis); + this._isSetResultsTaskScheduled = !1, this._setResultsTaskOverdueTime = 0; + var resultEntryBufferCopy = {}, isSizeRetry = !1; + CustomFunctions.isFeatureEnabled(1) && Object.keys(this._resultEntryRetryBuffer).length > 0 ? (resultEntryBufferCopy = this._resultEntryRetryBuffer, + this._resultEntryRetryBuffer = {}, this._retryBufferBodySize = 2, isSizeRetry = !0) : (resultEntryBufferCopy = this._resultEntryBuffer, + this._resultEntryBuffer = {}); + var useArrayResult = OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.7"), invocationResults = []; + for (var key in resultEntryBufferCopy) + useArrayResult ? invocationResults.push(this._convertCustomFunctionInvocationResultToArray(resultEntryBufferCopy[key].result)) : invocationResults.push(resultEntryBufferCopy[key].result); + if (0 !== invocationResults.length) { + var context = new CustomFunctionRequestContext; + useArrayResult ? context.customFunctions.setInvocationArrayResults(invocationResults) : context.customFunctions.setInvocationResults(invocationResults); + var contextSyncStartTime = Date.now(); + this._inProgressContextSyncExpectedFinishTime = contextSyncStartTime + this._maxContextSyncExecutionDurationMills, + context.sync().then((function (value) { + var timeNow = Date.now(); + _this._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(timeNow - contextSyncStartTime), + isSizeRetry && _this._ensureSetResultsTaskIsScheduled(timeNow); + }), (function (reason) { + var timeNow = Date.now(); + _this._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(timeNow - contextSyncStartTime), + CustomFunctions.isFeatureEnabled(1) && reason.code == OfficeExtension.ErrorCodes.requestPayloadSizeLimitExceeded ? _this._restoreAndSliceResultEntries(timeNow, resultEntryBufferCopy) : _this._restoreResultEntries(timeNow, resultEntryBufferCopy), + _this._ensureSetResultsTaskIsScheduled(timeNow); + })); + } + }, CustomFunctionProxy.prototype._restoreResultEntries = function (timeNow, resultEntryBufferCopy) { + for (var key in resultEntryBufferCopy) { + var resultSetter = resultEntryBufferCopy[key]; + timeNow - resultSetter.timeCreated <= this._setResultsLifeMillis && (this._resultEntryBuffer[key] || (this._resultEntryBuffer[key] = resultSetter)); + } + }, CustomFunctionProxy.prototype._restoreAndSliceResultEntries = function (timeNow, resultEntryBufferCopy) { + for (var key in resultEntryBufferCopy) { + var resultSetter = resultEntryBufferCopy[key], resultSize = void 0; + if (timeNow - resultSetter.timeCreated <= this._setResultsLifeMillis && !this._resultEntryBuffer[key]) { + try { + resultSize = JSON.stringify(this._convertCustomFunctionInvocationResultToArray(resultSetter.result)).length + 1; + } + catch (ex) { + this._resultEntryBuffer[key] = resultSetter, OfficeExtension.Utility.log("Result can't pass in JSON.stringify"); + continue; + } + this._retryBufferBodySize + resultSize < this._maxResultSize ? (this._resultEntryRetryBuffer[key] = resultSetter, + this._retryBufferBodySize += resultSize) : this._resultEntryBuffer[key] = resultSetter; + } + } + }, CustomFunctionProxy.prototype._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval = function (lastContextSyncDurationMills) { + var _this = this, contextSyncInterval = CustomFunctions.isFeatureEnabled(2) ? this._smallerMinContextSyncIntervalMills : this._minContextSyncIntervalMills, interval = Math.max(contextSyncInterval, 2 * lastContextSyncDurationMills), intervalMax = CustomFunctions.isFeatureEnabled(4) ? Math.min(this._maxContextSyncIntervalMills, interval) : interval; + OfficeExtension.Utility.log("setTimeout(clearInProgressContestSyncExpectedFinishedTime," + interval + ")"), + setTimeout((function () { + OfficeExtension.Utility.log("clearInProgressContestSyncExpectedFinishedTime"), _this._inProgressContextSyncExpectedFinishTime = 0; + }), intervalMax); + }, CustomFunctionProxy.CustomFunctionExecutionStartLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Verbose, "CustomFunctions [Execution] [Begin] Function="), + CustomFunctionProxy.CustomFunctionExecutionFailureLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] Function="), + CustomFunctionProxy.CustomFunctionExecutionRejectedPromoseLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] [RejectedPromise] Function="), + CustomFunctionProxy.CustomFunctionExecutionExceptionThrownLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] [ExceptionThrown] Function="), + CustomFunctionProxy.CustomFunctionExecutionBatchMismatchLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] [BatchMismatch] Function="), + CustomFunctionProxy.CustomFunctionExecutionFinishLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Info, "CustomFunctions [Execution] [End] [Success] Function="), + CustomFunctionProxy.CustomFunctionExecutionNotFoundLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [NotFound] Function="), + CustomFunctionProxy.CustomFunctionCancellation = new CustomFunctionLog(CustomFunctionLoggingSeverity.Info, "CustomFunctions [Cancellation] Function="), + CustomFunctionProxy.CustomFunctionAlreadyCancelled = new CustomFunctionLog(CustomFunctionLoggingSeverity.Info, "CustomFunctions [AlreadyCancelled] Function="), + CustomFunctionProxy.CustomFunctionDuplicatedName = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [DuplicatedName] Function="), + CustomFunctionProxy.CustomFunctionInvalidArg = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [InvalidArg] Name="), + CustomFunctionProxy; + }(); + exports.CustomFunctionProxy = CustomFunctionProxy, exports.customFunctionProxy = new CustomFunctionProxy, + exports.setCustomFunctionAssociation = exports.customFunctionProxy.setCustomFunctionAssociation.bind(exports.customFunctionProxy), + exports.setCustomFunctionInvoker = exports.customFunctionProxy.setCustomFunctionInvoker.bind(exports.customFunctionProxy), + Core.HostBridge.onInited((function (hostBridge) { + exports.customFunctionProxy._initFromHostBridge(hostBridge); + })); + var CustomFunctions = function (_super) { + function CustomFunctions() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(CustomFunctions, _super), Object.defineProperty(CustomFunctions.prototype, "_className", { + get: function () { + return "CustomFunctions"; + }, + enumerable: !1, + configurable: !0 + }), CustomFunctions.isFeatureEnabled = function (args) { + return this._enabledFeature instanceof Array && this._enabledFeature.indexOf(args) >= 0; + }, CustomFunctions.initialize = function () { + var _this = this, context = new CustomFunctionRequestContext; + return exports.customFunctionProxy.ensureInit(context).then((function () { + var enabledFeature; + return context.customFunctions._SetOsfControlContainerReadyForCustomFunctions(), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.9") && (enabledFeature = context.customFunctions._GetEnabledFeatures()), + OfficeExtension.Utility.log("OsfControl activation lifecycle: Set OsfControlContainer ready for CustomFunctions"), + context._customData = "SetOsfControlContainerReadyForCustomFunctions", context.sync().then((function () { + _isNullOrUndefined(enabledFeature) || (_this._enabledFeature = enabledFeature.value); + }))["catch"]((function (error) { + !function (error, rethrowOtherError) { + var isCellEditModeError = error instanceof OfficeExtension.Error && error.code === CustomFunctionRuntimeErrorCode.invalidOperationInCellEditMode; + if (OfficeExtension.CoreUtility.log("Error on starting custom functions: " + error), + isCellEditModeError) { + OfficeExtension.CoreUtility.log("Was in cell-edit mode, will try again"); + var delay_1 = exports.customFunctionProxy._ensureInitRetryDelayMillis; + return new OfficeExtension.CoreUtility.Promise((function (resolve) { + return setTimeout(resolve, delay_1); + })).then((function () { + return CustomFunctions.initialize(); + })); + } + if (rethrowOtherError) + throw error; + }(error, !0); + })); + })); + }, CustomFunctions.prototype.setInvocationArrayResults = function (results) { + _throwIfApiNotSupported("CustomFunctions.setInvocationArrayResults", "CustomFunctions", "1.4", "Excel"), + _invokeMethod(this, "SetInvocationArrayResults", 0, [results], 2, 0); + }, CustomFunctions.prototype.setInvocationResults = function (results) { + _invokeMethod(this, "SetInvocationResults", 0, [results], 2, 0); + }, CustomFunctions.prototype._GetEnabledFeatures = function () { + return _throwIfApiNotSupported("CustomFunctions._GetEnabledFeatures", "CustomFunctions", "1.4", "Excel"), + _invokeMethod(this, "_GetEnabledFeatures", 1, [], 4, 0); + }, CustomFunctions.prototype._SetInvocationError = function (invocationId, message) { + _invokeMethod(this, "_SetInvocationError", 0, [invocationId, message], 2, 0); + }, CustomFunctions.prototype._SetInvocationResult = function (invocationId, result) { + _invokeMethod(this, "_SetInvocationResult", 0, [invocationId, result], 2, 0); + }, CustomFunctions.prototype._SetOsfControlContainerReadyForCustomFunctions = function () { + _invokeMethod(this, "_SetOsfControlContainerReadyForCustomFunctions", 0, [], 10, 0); + }, CustomFunctions.prototype._handleResult = function (value) { + (_super.prototype._handleResult.call(this, value), _isNullOrUndefined(value)) || _fixObjectPathIfNecessary(this, value); + }, CustomFunctions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, CustomFunctions.newObject = function (context) { + return _createTopLevelServiceObject(CustomFunctions, context, "Microsoft.ExcelServices.CustomFunctions", !1, 4); + }, CustomFunctions.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }, CustomFunctions; + }(OfficeExtension.ClientObject); + exports.CustomFunctions = CustomFunctions; + var CustomFunctionRuntimeErrorCode, CustomFunctionsContainer = function (_super) { + function CustomFunctionsContainer() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(CustomFunctionsContainer, _super), Object.defineProperty(CustomFunctionsContainer.prototype, "_className", { + get: function () { + return "CustomFunctionsContainer"; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(CustomFunctionsContainer.prototype, "_navigationPropertyNames", { + get: function () { + return ["customFunctions"]; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(CustomFunctionsContainer.prototype, "customFunctions", { + get: function () { + return _throwIfApiNotSupported("CustomFunctionsContainer.customFunctions", "CustomFunctions", "1.2", "Excel"), + this._C || (this._C = _createPropertyObject(CustomFunctions, this, "CustomFunctions", !1, 4)), + this._C; + }, + enumerable: !1, + configurable: !0 + }), CustomFunctionsContainer.prototype._handleResult = function (value) { + if (_super.prototype._handleResult.call(this, value), !_isNullOrUndefined(value)) { + var obj = value; + _fixObjectPathIfNecessary(this, obj), _handleNavigationPropertyResults(this, obj, ["customFunctions", "CustomFunctions"]); + } + }, CustomFunctionsContainer.prototype.load = function (options) { + return _load(this, options); + }, CustomFunctionsContainer.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, CustomFunctionsContainer.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }, CustomFunctionsContainer; + }(OfficeExtension.ClientObject); + exports.CustomFunctionsContainer = CustomFunctionsContainer, function (CustomFunctionRuntimeErrorCode) { + CustomFunctionRuntimeErrorCode.generalException = "GeneralException", CustomFunctionRuntimeErrorCode.invalidOperation = "InvalidOperation", + CustomFunctionRuntimeErrorCode.invalidOperationInCellEditMode = "InvalidOperationInCellEditMode"; + }(CustomFunctionRuntimeErrorCode || (CustomFunctionRuntimeErrorCode = {})); + }]); +OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel = true; +OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria = false; +window.OfficeExtensionBatch = window.OfficeExtension; +!function (modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) + return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + i: moduleId, + l: !1, + exports: {} + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.l = !0, module.exports; + } + __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function (exports, name, getter) { + __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { + enumerable: !0, + get: getter + }); + }, __webpack_require__.r = function (exports) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(exports, "__esModule", { + value: !0 + }); + }, __webpack_require__.t = function (value, mode) { + if (1 & mode && (value = __webpack_require__(value)), 8 & mode) + return value; + if (4 & mode && "object" == typeof value && value && value.__esModule) + return value; + var ns = Object.create(null); + if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { + enumerable: !0, + value: value + }), 2 & mode && "string" != typeof value) + for (var key in value) + __webpack_require__.d(ns, key, function (key) { + return value[key]; + }.bind(null, key)); + return ns; + }, __webpack_require__.n = function (module) { + var getter = module && module.__esModule ? function () { + return module["default"]; + } : function () { + return module; + }; + return __webpack_require__.d(getter, "a", getter), getter; + }, __webpack_require__.o = function (object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 1); +}([function (module, exports) { + module.exports = OfficeExtensionBatch; + }, function (module, exports, __webpack_require__) { + "use strict"; + var __assign = this && this.__assign || function () { + return (__assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) + for (var p in s = arguments[i]) + Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]); + return t; + }).apply(this, arguments); + }; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var ApiInformationWeb = __webpack_require__(2), ApiInformationNative = __webpack_require__(3), AsyncStorageWeb = __webpack_require__(5), DialogApiWeb = __webpack_require__(6), StorageApiNative = __webpack_require__(7), officeruntime_storage_web_1 = __webpack_require__(8), Experimentation = __webpack_require__(9), officeruntime_message_1 = __webpack_require__(10), DynamicRibbon = __webpack_require__(13), officeruntime_auth_1 = __webpack_require__(14); + window._useSDXSandbox ? window._OfficeRuntimeNative = __assign(__assign({}, window.OfficeRuntime), { + displayWebDialog: DialogApiWeb.displayWebDialog, + AsyncStorage: StorageApiNative.AsyncStorage, + storage: StorageApiNative.storage, + experimentation: Experimentation.experimentation, + apiInformation: ApiInformationNative.apiInformation, + message: officeruntime_message_1.Message.instance, + ui: DynamicRibbon.ui, + auth: officeruntime_auth_1.Auth.instance + }) : window._OfficeRuntimeNative = __assign(__assign({}, window.OfficeRuntime), { + displayWebDialog: DialogApiWeb.displayWebDialog, + AsyncStorage: AsyncStorageWeb, + storage: officeruntime_storage_web_1.storage, + experimentation: Experimentation.experimentation, + apiInformation: ApiInformationWeb.apiInformation, + message: officeruntime_message_1.Message.instance, + ui: DynamicRibbon.ui, + auth: officeruntime_auth_1.Auth.instance + }), Object.freeze(window._OfficeRuntimeNative); + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.apiInformation = void 0, exports.apiInformation = { + isSetSupported: function (capability, version) { + try { + return !!(Office && Office.context && Office.context.requirements) && Office.context.requirements.isSetSupported(capability, version); + } + catch (e) { + return !1; + } + } + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + (function (global) { + function getVersion(version) { + var temp = version.split("."), major = 0, minor = 0, patch = 0; + if (temp.length < 2 && isNaN(Number(version))) + throw "version format incorrect"; + if (major = Number(temp[0]), temp.length >= 2 && (minor = Number(temp[1])), temp.length >= 3 && (patch = Number(temp[2])), + isNaN(major) || isNaN(minor) || isNaN(patch)) + throw "version format incorrect"; + return { + major: major, + minor: minor, + patch: patch + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.apiInformation = void 0, exports.apiInformation = { + isSetSupported: function (capability, version) { + if ("string" != typeof capability) + return !1; + if (null == version && (version = "0.0.0"), void 0 === global.__apiSets) + return !1; + var sets = global.__apiSets, index = Object.keys(sets).map((function (key) { + return key.toLowerCase(); + })).indexOf(capability.toLowerCase()); + if (index > -1) { + var setMaxVersion = sets[Object.keys(sets)[index]]; + try { + var minVersionNum = getVersion(version), setMaxVersionNum = void 0; + if ((setMaxVersionNum = Array.isArray(setMaxVersion) ? function (versions, majorVersion) { + for (var i = 0; i < versions.length; i++) { + var v = getVersion(versions[i]); + if (v.major == majorVersion) + return v; + } + return { + major: 0, + minor: 0, + patch: 0 + }; + }(setMaxVersion, minVersionNum.major) : getVersion(setMaxVersion)).major > 0) { + if (setMaxVersionNum.major > minVersionNum.major) + return !0; + if (setMaxVersionNum.major == minVersionNum.major && setMaxVersionNum.minor > minVersionNum.minor) + return !0; + if (setMaxVersionNum.major == minVersionNum.major && setMaxVersionNum.minor == minVersionNum.minor && setMaxVersionNum.patch >= minVersionNum.patch) + return !0; + } + } + catch (e) { + return !1; + } + } + return !1; + } + }; + }).call(this, __webpack_require__(4)); + }, function (module, exports) { + var g; + g = function () { + return this; + }(); + try { + g = g || new Function("return this")(); + } + catch (e) { + "object" == typeof window && (g = window); + } + module.exports = g; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.multiGet = exports.multiRemove = exports.multiSet = exports.getAllKeys = exports.clear = exports.removeItem = exports.setItem = exports.getItem = void 0; + var prefix = "_Office_AsyncStorage_"; + function ensureFreshLocalStorage() { + window.localStorage.setItem("_Office_AsyncStorage_|_unusedKey_", null), window.localStorage.removeItem("_Office_AsyncStorage_|_unusedKey_"); + } + function performAction(action, callback) { + return void 0 === callback && (callback = function () { }), new Promise((function (resolve, reject) { + try { + ensureFreshLocalStorage(), action(), callback(null), resolve(); + } + catch (e) { + callback(e), reject(e); + } + })); + } + function performActionAndReturnResult(action, callback) { + return void 0 === callback && (callback = function () { }), new Promise((function (resolve, reject) { + try { + ensureFreshLocalStorage(); + var result = action(); + callback(null, result), resolve(result); + } + catch (e) { + callback(e, null), reject(e); + } + })); + } + function performMultiAction(collection, action, callback) { + return void 0 === callback && (callback = function () { }), new Promise((function (resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } + catch (e) { + errors.push(e); + } + collection.forEach((function (item) { + try { + action(item); + } + catch (e) { + errors.push(e); + } + })), callback(errors), errors.length > 0 ? reject(errors) : resolve(); + })); + } + exports.getItem = function (key, callback) { + return performActionAndReturnResult((function () { + return window.localStorage.getItem(prefix + key); + }), callback); + }, exports.setItem = function (key, value, callback) { + return performAction((function () { + return window.localStorage.setItem(prefix + key, value); + }), callback); + }, exports.removeItem = function (key, callback) { + return performAction((function () { + return window.localStorage.removeItem(prefix + key); + }), callback); + }, exports.clear = function (callback) { + return performAction((function () { + Object.keys(window.localStorage).filter((function (fullKey) { + return 0 === fullKey.indexOf(prefix); + })).forEach((function (fullKey) { + return window.localStorage.removeItem(fullKey); + })); + }), callback); + }, exports.getAllKeys = function (callback) { + return performActionAndReturnResult((function () { + return Object.keys(window.localStorage).filter((function (fullKey) { + return 0 === fullKey.indexOf(prefix); + })).map((function (fullKey) { + return fullKey.substr(prefix.length); + })); + }), callback); + }, exports.multiSet = function (keyValuePairs, callback) { + return performMultiAction(keyValuePairs, (function (_a) { + var key = _a[0], value = _a[1]; + return window.localStorage.setItem(prefix + key, value); + }), callback); + }, exports.multiRemove = function (keys, callback) { + return performMultiAction(keys, (function (key) { + return window.localStorage.removeItem(prefix + key); + }), callback); + }, exports.multiGet = function (keys, callback) { + return new Promise((function (resolve, reject) { + callback || (callback = function () { }); + var errors = [], results = keys.map((function (key) { + try { + return [key, window.localStorage.getItem(prefix + key)]; + } + catch (e) { + errors.push(e); + } + })).filter((function (pair) { + return pair; + })); + errors.length > 0 ? (callback(errors, results), reject(errors)) : (callback(null, results), + resolve(results)); + })); + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.displayWebDialog = exports.Dialog = void 0; + var OfficeExtension = __webpack_require__(0), Dialog = function () { + function Dialog(_dialog) { + this._dialog = _dialog; + } + return Dialog.prototype.close = function () { + return this._dialog.close(), OfficeExtension.CoreUtility.Promise.resolve(); + }, Dialog; + }(); + exports.Dialog = Dialog, exports.displayWebDialog = function (url, options) { + return new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) + throw new OfficeExtension.Error({ + code: "InvalidArgument", + message: 'Dimensions must be "number%" or number.' + }); + var dialog, dialogOptions = { + width: options.width ? parseInt(options.width, 10) : 50, + height: options.height ? parseInt(options.height, 10) : 50, + displayInIframe: options.displayInIFrame || !1 + }; + function messageHandler(args) { + options.onMessage && options.onMessage(args.message, dialog, args.origin); + } + function eventHandler(args) { + 12006 === args.error ? options.onClose && options.onClose() : options.onRuntimeError && options.onRuntimeError(new OfficeExtension.Error(lookupErrorCodeAndMessage(args.error)), dialog); + } + function isInt(value) { + return /^(\-|\+)?([0-9]+)%?$/.test(value); + } + function lookupErrorCodeAndMessage(internalCode) { + var _a, table = ((_a = {})[12002] = { + code: "InvalidUrl", + message: "Cannot load URL, no such page or bad URL syntax." + }, _a[12003] = { + code: "InvalidUrl", + message: "HTTPS is required." + }, _a[12004] = { + code: "Untrusted", + message: "Domain is not trusted." + }, _a[12005] = { + code: "InvalidUrl", + message: "HTTPS is required." + }, _a[12007] = { + code: "FailedToOpen", + message: "Another dialog is already opened." + }, _a); + return table[internalCode] ? table[internalCode] : { + code: "Unknown", + message: "An unknown error has occured" + }; + } + Office.context.ui.displayDialogAsync(url, dialogOptions, (function (asyncResult) { + "failed" === asyncResult.status ? reject(new OfficeExtension.Error(lookupErrorCodeAndMessage(asyncResult.error.code))) : ((dialog = asyncResult.value).addEventHandler(Office.EventType.DialogMessageReceived, messageHandler), + dialog.addEventHandler(Office.EventType.DialogEventReceived, eventHandler), resolve(new Dialog(dialog))); + })); + })); + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function (d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) + Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function (d, b) { + if ("function" != typeof b && null !== b) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }); + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ErrorCodes = exports.PersistentKvStorageService = exports.storage = exports.AsyncStorage = void 0; + var OfficeExtension = __webpack_require__(0), _createTopLevelServiceObject = (OfficeExtension.BatchApiHelper.createPropertyObject, + OfficeExtension.BatchApiHelper.createMethodObject, OfficeExtension.BatchApiHelper.createIndexerObject, + OfficeExtension.BatchApiHelper.createRootServiceObject, OfficeExtension.BatchApiHelper.createTopLevelServiceObject), _invokeMethod = (OfficeExtension.BatchApiHelper.createChildItemObject, + OfficeExtension.BatchApiHelper.invokeMethod), _isNullOrUndefined = (OfficeExtension.BatchApiHelper.invokeEnsureUnchanged, + OfficeExtension.BatchApiHelper.invokeSetProperty, OfficeExtension.Utility.isNullOrUndefined), _toJson = (OfficeExtension.Utility.isUndefined, + OfficeExtension.Utility.throwIfNotLoaded, OfficeExtension.Utility.throwIfApiNotSupported, + OfficeExtension.Utility.load, OfficeExtension.Utility.retrieve, OfficeExtension.Utility.toJson), _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary, _processRetrieveResult = (OfficeExtension.Utility._handleNavigationPropertyResults, + OfficeExtension.Utility.adjustToDateTime, OfficeExtension.Utility.processRetrieveResult); + OfficeExtension.Utility.setMockData, OfficeExtension.CommonUtility.calculateApiFlags; + function callPersistentKvStorageManager(nativeCall, getValueOnSuccess) { + return new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + var storageManager = PersistentKvStorageManager.getInstance(), invokeId = storageManager.setCallBack((function (result, error) { + if (error) + reject(error); + else { + var value = getValueOnSuccess(result); + resolve(value); + } + })); + storageManager.ctx.sync().then((function () { + var storageService = storageManager.getPersistentKvStorageService(); + return nativeCall(storageService, invokeId), storageManager.ctx.sync(); + }))["catch"]((function (e) { + reject(e); + })); + })); + } + function callStorageManager(nativeCall, getValueOnSuccess, callback) { + return new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + var storageManager = PersistentKvStorageManager.getInstance(), invokeId = storageManager.setCallBack((function (result, error) { + if (error) + return callback && callback(error), void reject(error); + var value = getValueOnSuccess(result); + callback && callback(null, value), resolve(value); + })); + storageManager.ctx.sync().then((function () { + var storageService = storageManager.getPersistentKvStorageService(); + return nativeCall(storageService, invokeId), storageManager.ctx.sync(); + }))["catch"]((function (e) { + reject(e); + })); + })); + } + exports.AsyncStorage = { + getItem: function (key, callback) { + return callStorageManager((function (storage, invokeId) { + return storage.multiGet(invokeId, JSON.stringify([key])); + }), (function (result) { + var parsedResult = JSON.parse(result); + return parsedResult && parsedResult[0] && parsedResult[0][1] ? parsedResult[0][1] : null; + }), callback); + }, + setItem: function (key, value, callback) { + return callStorageManager((function (storage, invokeId) { + return storage.multiSet(invokeId, JSON.stringify([[key, value]])); + }), (function () { + return null; + }), callback); + }, + removeItem: function (key, callback) { + return callStorageManager((function (storage, invokeId) { + return storage.multiRemove(invokeId, JSON.stringify([key])); + }), (function () { + return null; + }), callback); + }, + multiGet: function (keys, callback) { + return callStorageManager((function (storage, invokeId) { + return storage.multiGet(invokeId, JSON.stringify(keys)); + }), (function (result) { + var keyValues = JSON.parse(result), map = {}; + return keyValues && keyValues.forEach((function (_a) { + var key = _a[0], value = _a[1]; + return map[key] = value, value; + })), keys.map((function (key) { + return [key, map[key] ? map[key] : null]; + })); + }), callback); + }, + multiSet: function (keyValuePairs, callback) { + return callStorageManager((function (storage, invokeId) { + return storage.multiSet(invokeId, JSON.stringify(keyValuePairs)); + }), (function () { + return null; + }), callback); + }, + multiRemove: function (keys, callback) { + return callStorageManager((function (storage, invokeId) { + return storage.multiRemove(invokeId, JSON.stringify(keys)); + }), (function () { + return null; + }), callback); + }, + getAllKeys: function (callback) { + return callStorageManager((function (storage, invokeId) { + return storage.getAllKeys(invokeId); + }), (function (result) { + return JSON.parse(result); + }), callback); + }, + clear: function (callback) { + return callStorageManager((function (storage, invokeId) { + return storage.clear(invokeId); + }), (function () { + return null; + }), callback); + } + }, exports.storage = { + getItem: function (key) { + return callPersistentKvStorageManager((function (perStorage, invokeId) { + return perStorage.multiGet(invokeId, JSON.stringify([key])); + }), (function (result) { + var parsedResult = JSON.parse(result); + return parsedResult && parsedResult[0] && parsedResult[0][1] ? parsedResult[0][1] : null; + })); + }, + setItem: function (key, value) { + return callPersistentKvStorageManager((function (perStorage, invokeId) { + return perStorage.multiSet(invokeId, JSON.stringify([[key, value]])); + }), (function () { + return null; + })); + }, + removeItem: function (key) { + return callPersistentKvStorageManager((function (perStorage, invokeId) { + return perStorage.multiRemove(invokeId, JSON.stringify([key])); + }), (function () { + return null; + })); + }, + getItems: function (keys) { + return callPersistentKvStorageManager((function (perStorage, invokeId) { + return perStorage.multiGet(invokeId, JSON.stringify(keys)); + }), (function (result) { + var keyValues = JSON.parse(result), map = {}; + return keys.forEach((function (k) { + map[k] = null; + })), keyValues && keyValues.forEach((function (_a) { + var key = _a[0], value = _a[1]; + return map[key] = value, value; + })), map; + })); + }, + setItems: function (keyValues) { + var keyValuePairs = []; + for (var key in keyValues) + keyValues.hasOwnProperty(key) && keyValuePairs.push([key, keyValues[key]]); + return callPersistentKvStorageManager((function (storage, invokeId) { + return storage.multiSet(invokeId, JSON.stringify(keyValuePairs)); + }), (function () { + return null; + })); + }, + removeItems: function (keys) { + return callPersistentKvStorageManager((function (perStorage, invokeId) { + return perStorage.multiRemove(invokeId, JSON.stringify(keys)); + }), (function () { + return null; + })); + }, + getKeys: function () { + return callPersistentKvStorageManager((function (perStorage, invokeId) { + return perStorage.getAllKeys(invokeId); + }), (function (result) { + return JSON.parse(result); + })); + } + }; + var PersistentKvStorageManager = function () { + function PersistentKvStorageManager() { + var _this = this; + this._invokeId = 0, this._callDict = {}, this.ctx = new OfficeExtension.ClientRequestContext, + this._perkvstorService = PersistentKvStorageService.newObject(this.ctx), this._eventResult = this._perkvstorService.onPersistentStorageMessage.add((function (args) { + OfficeExtension.Utility.log("persistentKvStoragegMessageHandler:" + JSON.stringify(args)); + var callback = _this._callDict[args.invokeId]; + callback && (callback(args.message, args.error), delete _this._callDict[args.invokeId]); + })); + } + return PersistentKvStorageManager.getInstance = function () { + return void 0 === PersistentKvStorageManager.instance ? PersistentKvStorageManager.instance = new PersistentKvStorageManager : PersistentKvStorageManager.instance._perkvstorService = PersistentKvStorageService.newObject(PersistentKvStorageManager.instance.ctx), + PersistentKvStorageManager.instance; + }, PersistentKvStorageManager.prototype.getPersistentKvStorageService = function () { + return this._perkvstorService; + }, PersistentKvStorageManager.prototype.getCallBack = function (callId) { + return this._callDict[callId]; + }, PersistentKvStorageManager.prototype.setCallBack = function (callback) { + var id = this._invokeId; + return this._callDict[this._invokeId++] = callback, id; + }, PersistentKvStorageManager; + }(), PersistentKvStorageService = function (_super) { + function PersistentKvStorageService() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(PersistentKvStorageService, _super), Object.defineProperty(PersistentKvStorageService.prototype, "_className", { + get: function () { + return "PersistentKvStorageService"; + }, + enumerable: !1, + configurable: !0 + }), PersistentKvStorageService.prototype.clear = function (id) { + _invokeMethod(this, "Clear", 1, [id], 4, 0); + }, PersistentKvStorageService.prototype.getAllKeys = function (id) { + _invokeMethod(this, "GetAllKeys", 1, [id], 4, 0); + }, PersistentKvStorageService.prototype.multiGet = function (id, jsonKeys) { + _invokeMethod(this, "MultiGet", 1, [id, jsonKeys], 4, 0); + }, PersistentKvStorageService.prototype.multiRemove = function (id, jsonKeys) { + _invokeMethod(this, "MultiRemove", 1, [id, jsonKeys], 4, 0); + }, PersistentKvStorageService.prototype.multiSet = function (id, jsonKeyValue) { + _invokeMethod(this, "MultiSet", 1, [id, jsonKeyValue], 4, 0); + }, PersistentKvStorageService.prototype._handleResult = function (value) { + (_super.prototype._handleResult.call(this, value), _isNullOrUndefined(value)) || _fixObjectPathIfNecessary(this, value); + }, PersistentKvStorageService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, PersistentKvStorageService.newObject = function (context) { + return _createTopLevelServiceObject(PersistentKvStorageService, context, "Microsoft.PersistentKvStorage.PersistentKvStorageService", !1, 4); + }, Object.defineProperty(PersistentKvStorageService.prototype, "onPersistentStorageMessage", { + get: function () { + return this.m_persistentStorageMessage || (this.m_persistentStorageMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "PersistentStorageMessage", { + eventType: 65537, + registerFunc: function () { }, + unregisterFunc: function () { }, + getTargetIdFunc: function () { + return null; + }, + eventArgsTransformFunc: function (args) { + var perkvstorArgs, internalCode, _a, table; + try { + var parsedMessage = JSON.parse(args.message), hr = parseInt(parsedMessage.errorCode), error = 0 != hr ? new OfficeExtension.Error((internalCode = hr, + (_a = {})[16389] = { + code: "GenericException", + message: "Unknown error." + }, _a[65535] = { + code: "Unexcepted", + message: "Catastrophic failure." + }, _a[14] = { + code: "OutOfMemory", + message: "Ran out of memory." + }, _a[87] = { + code: "InvalidArg", + message: "One or more arguments are invalid." + }, _a[16385] = { + code: "NotImplemented", + message: "Not implemented." + }, _a[6] = { + code: "BadHandle", + message: "File Handle is not Set." + }, _a[5] = { + code: "AccessDenied", + message: "Can't read the Storage File." + }, (table = _a)[internalCode] ? table[internalCode] : { + code: "Unknown", + message: "An unknown error has occured" + })) : null; + perkvstorArgs = { + invokeId: parsedMessage.invokeId, + message: parsedMessage.message, + error: error + }; + } + catch (e) { + perkvstorArgs = { + invokeId: -1, + message: e.message, + error: new OfficeExtension.Error({ + code: "GenericException", + message: "Unknown error" + }) + }; + } + return OfficeExtension.Utility._createPromiseFromResult(perkvstorArgs); + } + })), this.m_persistentStorageMessage; + }, + enumerable: !1, + configurable: !0 + }), PersistentKvStorageService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }, PersistentKvStorageService; + }(OfficeExtension.ClientObject); + exports.PersistentKvStorageService = PersistentKvStorageService, function (ErrorCodes) { + ErrorCodes.generalException = "GeneralException"; + }(exports.ErrorCodes || (exports.ErrorCodes = {})); + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.storage = void 0; + var prefix = "_OfficeRuntime_Storage_"; + function ensureFreshLocalStorage() { + window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_", null), window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_"); + } + function performAction(action) { + return new Promise((function (resolve, reject) { + try { + ensureFreshLocalStorage(), action(), resolve(); + } + catch (e) { + reject(e); + } + })); + } + function performActionAndReturnResult(action) { + return new Promise((function (resolve, reject) { + try { + ensureFreshLocalStorage(), resolve(action()); + } + catch (e) { + reject(e); + } + })); + } + function performMultiAction(collection, action) { + return new Promise((function (resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } + catch (e) { + errors.push(e); + } + for (var key in collection) + if (collection.hasOwnProperty(key) || Array.isArray(collection)) + try { + Array.isArray(collection) ? action(collection[key]) : action(key); + } + catch (e) { + errors.push(e); + } + errors.length > 0 ? reject(new Error("Unknown error.")) : resolve(); + })); + } + exports.storage = { + getItem: function (key) { + return performActionAndReturnResult((function () { + return window.localStorage.getItem(prefix + key); + })); + }, + setItem: function (key, value) { + return performAction((function () { + return window.localStorage.setItem(prefix + key, value); + })); + }, + removeItem: function (key) { + return performAction((function () { + return window.localStorage.removeItem(prefix + key); + })); + }, + getItems: function (keys) { + return new Promise((function (resolve, reject) { + var result = {}, errors = []; + try { + ensureFreshLocalStorage(); + } + catch (e) { + reject(e); + } + keys.forEach((function (key) { + try { + var value = window.localStorage.getItem(prefix + key); + result[key] = value || null; + } + catch (e) { + errors.push(e); + } + })), errors.length > 0 ? reject(new Error("Unknown error.")) : resolve(result); + })); + }, + setItems: function (keyValues) { + return performMultiAction(keyValues, (function (key) { + return window.localStorage.setItem(prefix + key, keyValues[key]); + })); + }, + removeItems: function (keys) { + return performMultiAction(keys, (function (key) { + window.localStorage.removeItem(prefix + key); + })); + }, + getKeys: function () { + return performActionAndReturnResult((function () { + return Object.keys(window.localStorage).filter((function (fullKey) { + return 0 === fullKey.indexOf(prefix); + })).map((function (fullKey) { + return fullKey.substr(prefix.length); + })); + })); + } + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))((function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } + catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } + catch (e) { + reject(e); + } + } + function step(result) { + var value; + result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P((function (resolve) { + resolve(value); + }))).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + })); + }, __generator = this && this.__generator || function (thisArg, body) { + var f, y, t, g, _ = { + label: 0, + sent: function () { + if (1 & t[0]) + throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, "function" == typeof Symbol && (g[Symbol.iterator] = function () { + return this; + }), g; + function verb(n) { + return function (v) { + return function (op) { + if (f) + throw new TypeError("Generator is already executing."); + for (; _;) + try { + if (f = 1, y && (t = 2 & op[0] ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), + 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + switch (y = 0, t && (op = [2 & op[0], t.value]), op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + return _.label++, { + value: op[1], + done: !1 + }; + case 5: + _.label++, y = op[1], op = [0]; + continue; + case 7: + op = _.ops.pop(), _.trys.pop(); + continue; + default: + if (!(t = _.trys, (t = t.length > 0 && t[t.length - 1]) || 6 !== op[0] && 2 !== op[0])) { + _ = 0; + continue; + } + if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (6 === op[0] && _.label < t[1]) { + _.label = t[1], t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2], _.ops.push(op); + break; + } + t[2] && _.ops.pop(), _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } + catch (e) { + op = [6, e], y = 0; + } + finally { + f = t = 0; + } + if (5 & op[0]) + throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: !0 + }; + }([n, v]); + }; + } + }; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.experimentation = void 0; + var ExperimentationNative = function () { + function ExperimentationNative() { } + return ExperimentationNative.prototype.getBooleanFeatureGate = function (featureName, defaultValue) { + try { + var featureGateValue = Microsoft.Office.WebExtension.FeatureGates[featureName]; + return "true" === featureGateValue.toString().toLowerCase() || !0 === featureGateValue; + } + catch (error) { + return defaultValue; + } + }, ExperimentationNative.prototype.getIntFeatureGate = function (featureName, defaultValue) { + try { + var featureGateValue = parseInt(Microsoft.Office.WebExtension.FeatureGates[featureName]); + return isNaN(featureGateValue) ? defaultValue : featureGateValue; + } + catch (error) { + return defaultValue; + } + }, ExperimentationNative.prototype.getStringFeatureGate = function (featureName, defaultValue) { + try { + var featureGateValue = Microsoft.Office.WebExtension.FeatureGates[featureName]; + return null == featureGateValue ? defaultValue : featureGateValue; + } + catch (error) { + return defaultValue; + } + }, ExperimentationNative.prototype.getChangeGate = function (changeGateName) { + return this.getBooleanFeatureGate(changeGateName, !0); + }, ExperimentationNative.prototype.getBooleanFeatureGateAsync = function (featureName, defaultValue) { + return __awaiter(this, void 0, void 0, (function () { + var context, feature; + return __generator(this, (function (_b) { + switch (_b.label) { + case 0: + return _b.trys.push([0, 2, , 3]), context = this.getRequestContext(), feature = context.flighting.getFeature(featureName, "Boolean", defaultValue), + context.load(feature), [4, context.sync()]; + case 1: + return _b.sent(), [2, feature.value]; + case 2: + return _b.sent(), [2, Promise.resolve(defaultValue)]; + case 3: + return [2]; + } + })); + })); + }, ExperimentationNative.prototype.getStringFeatureGateAsync = function (featureName, defaultValue) { + return __awaiter(this, void 0, void 0, (function () { + var context, feature; + return __generator(this, (function (_b) { + switch (_b.label) { + case 0: + return _b.trys.push([0, 2, , 3]), context = this.getRequestContext(), feature = context.flighting.getFeature(featureName, "String", defaultValue), + context.load(feature), [4, context.sync()]; + case 1: + return _b.sent(), [2, feature.value]; + case 2: + return _b.sent(), [2, Promise.resolve(defaultValue)]; + case 3: + return [2]; + } + })); + })); + }, ExperimentationNative.prototype.getIntFeatureGateAsync = function (featureName, defaultValue) { + return __awaiter(this, void 0, void 0, (function () { + var context, feature; + return __generator(this, (function (_b) { + switch (_b.label) { + case 0: + return _b.trys.push([0, 2, , 3]), context = this.getRequestContext(), feature = context.flighting.getFeature(featureName, "Integer", defaultValue), + context.load(feature), [4, context.sync()]; + case 1: + return _b.sent(), [2, feature.value]; + case 2: + return _b.sent(), [2, Promise.resolve(defaultValue)]; + case 3: + return [2]; + } + })); + })); + }, ExperimentationNative.prototype.getRequestContext = function () { + var ctx; + if (Office.context.platform !== Office.PlatformType.OfficeOnline) { + switch (Office.context.host) { + case Office.HostType.Excel: + ctx = new Excel.RequestContext; + break; + case Office.HostType.OneNote: + ctx = new OneNote.RequestContext; + break; + case Office.HostType.PowerPoint: + ctx = new PowerPoint.RequestContext; + break; + case Office.HostType.Word: + ctx = new Word.RequestContext; + break; + default: + throw new Error("Unknown Application ".concat(Office.context.host)); + } + return ctx; + } + }, ExperimentationNative; + }(); + exports.experimentation = new ExperimentationNative; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Message = void 0; + var Message_1 = __webpack_require__(11); + Object.defineProperty(exports, "Message", { + enumerable: !0, + get: function () { + return Message_1.Message; + } + }); + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Message = void 0; + var ListenerManager_1 = __webpack_require__(12), Message = function () { + function Message() { + this.listeners = {}; + } + return Message.prototype.on = function (eventName, listener) { + return this.add(eventName, listener), new Promise((function (resolve) { + resolve(); + })); + }, Message.prototype.off = function (eventName, listener) { + return this.remove(eventName, listener), new Promise((function (resolve) { + resolve(); + })); + }, Message.prototype.emit = function (eventName, message) { + return this.send(eventName, message), new Promise((function (resolve) { + resolve(); + })); + }, Object.defineProperty(Message, "instance", { + get: function () { + return Message.singleton || (Message.singleton = new Message), this.singleton; + }, + enumerable: !1, + configurable: !0 + }), Message.prototype.setupReceive = function () { + Office && Office.context && Office.context.messaging && !Office.context.messaging.onMessage && (Office.context.messaging.onMessage = this.receiveMessage.bind(this)); + }, Message.prototype.add = function (eventName, listener) { + this.listeners.hasOwnProperty(eventName) || (this.listeners[eventName] = new ListenerManager_1.ListenerManager, + this.setupReceive()), this.listeners[eventName].add(listener); + }, Message.prototype.remove = function (eventName, listener) { + this.listeners.hasOwnProperty(eventName) && (listener ? this.listeners[eventName].remove(listener) : delete this.listeners[eventName]); + }, Message.prototype.send = function (eventName, message) { + var wrapped = { + eventName: eventName, + message: message + }; + Office && Office.context && Office.context.messaging && Office.context.messaging.sendMessage && Office.context.messaging.sendMessage(wrapped); + }, Message.prototype.receiveMessage = function (wrapped) { + var eventName = wrapped.eventName, message = wrapped.message; + this.listeners.hasOwnProperty(eventName) && this.listeners[eventName].call(message); + }, Message; + }(); + exports.Message = Message; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ListenerManager = void 0; + var ListenerManager = function () { + function ListenerManager() { + this.listeners = []; + } + return ListenerManager.prototype.add = function (listener) { + this.listeners.push(listener); + }, ListenerManager.prototype.remove = function (listener) { + var index = this.listeners.lastIndexOf(listener); + -1 !== index && this.listeners.splice(index, 1); + }, ListenerManager.prototype.call = function (message) { + this.listeners.forEach((function (listener) { + return listener(message); + })); + }, ListenerManager; + }(); + exports.ListenerManager = ListenerManager; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Ribbon = exports.ui = void 0, exports.ui = { + getRibbon: function () { + return new Promise((function (resolve, reject) { + resolve(new Ribbon); + })); + } + }; + var Ribbon = function () { + function Ribbon() { + this.requestContext = new OfficeCore.RequestContext, OSF.WebAuth && "web" == OSF._OfficeAppFactory.getHostInfo().hostPlatform && (this.requestContext._customData = "WacPartition"); + } + return Ribbon.prototype.requestUpdate = function (input) { + var ribbon = this.requestContext.ribbon; + return input.tabs.filter((function (tab) { + return !!tab.id; + })).forEach((function (tab) { + var ribbonTab = ribbon.getTab(tab.id); + void 0 !== tab.visible && null !== tab.visible && ribbonTab.setVisibility(tab.visible), + tab.controls.filter((function (control) { + return !!control.id; + })).forEach((function (control) { + var ribbonControl = ribbon.getButton(control.id); + void 0 !== control.enabled && null !== control.enabled && (ribbonControl.enabled = control.enabled); + })); + })), this.requestContext.sync(); + }, Ribbon; + }(); + exports.Ribbon = Ribbon; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Auth = void 0; + var OfficeExtension = __webpack_require__(0), Auth = function () { + function Auth() { } + return Auth.prototype.getAccessToken = function (params) { + return new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + try { + Office.context.auth.getAccessTokenAsync(params || {}, (function (result) { + "succeeded" === result.status ? resolve(result.value) : reject(result.error); + })); + } + catch (error) { + reject(error); + } + })); + }, Auth.prototype.getAuthContext = function () { + return new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + try { + Office.context.auth.getAuthContextAsync((function (result) { + "succeeded" === result.status ? resolve(result.value) : reject(result.error); + })); + } + catch (error) { + reject(error); + } + })); + }, Object.defineProperty(Auth, "instance", { + get: function () { + return Auth.singleton || (Auth.singleton = new Auth), Auth.singleton; + }, + enumerable: !1, + configurable: !0 + }), Auth; + }(); + exports.Auth = Auth; + }]); +window.OfficeRuntime = window._OfficeRuntimeNative; +function exposeOfficeRuntimeThroughOfficeNamespace(OfficeRuntime, Office) { + var _a, _b; + if (typeof OfficeRuntime === "undefined") { + if (typeof window !== "undefined") { + OfficeRuntime = window === null || window === void 0 ? void 0 : window.OfficeRuntime; + } + } + if (typeof OfficeRuntime === "undefined") { + OfficeRuntime = {}; + } + if (typeof Office !== "undefined") { + Office.storage = Office.storage || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.storage); + Office.auth = Office.auth || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.auth); + Office.getAccessToken = Office.getAccessToken || ((_a = OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.auth) === null || _a === void 0 ? void 0 : _a.getAccessToken); + Office.addin = Office.addin || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.addin); + Office.isSetSupported = Office.isSetSupported || ((_b = OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.apiInformation) === null || _b === void 0 ? void 0 : _b.isSetSupported); + Office.license = Office.license || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.license); + Office.message = Office.message || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.message); + } +} +exposeOfficeRuntimeThroughOfficeNamespace(typeof OfficeRuntime !== "undefined" ? OfficeRuntime || undefined : undefined, typeof Office !== "undefined" ? Office || undefined : undefined); +if (typeof OSFPerformance !== "undefined") { + OSFPerformance.hostInitializationEnd = OSFPerformance.now(); + OSFPerformance.totalJSHeapSize = OSFPerformance.getTotalJSHeapSize(); + OSFPerformance.usedJSHeapSize = OSFPerformance.getUsedJSHeapSize(); + OSFPerformance.jsHeapSizeLimit = OSFPerformance.getJSHeapSizeLimit(); +} diff --git a/dist/excel-mac-16.00.js b/dist/excel-mac-16.00.js new file mode 100644 index 000000000..332672883 --- /dev/null +++ b/dist/excel-mac-16.00.js @@ -0,0 +1,26 @@ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md +*/ + +/* +* @overview es6-promise - a tiny implementation of Promises/A+. +* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +* @license Licensed under MIT license +* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE +* @version 2.3.0 +*/ + + +// Sources: +// osfweb: 16.0\16801.10000 +// runtime: 16.0\16801.10000 +// core: 16.0\16801.10000 +// host: custom + + + +"undefined"!==typeof OSFPerformance&&(OSFPerformance.hostInitializationStart=OSFPerformance.now());var OfficeExt,__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){var t=function(){function e(){}return e.prototype.isMsAjaxLoaded=function(){return!!("undefined"!==typeof Sys&&"undefined"!==typeof Type&&Sys.StringBuilder&&"function"===typeof Sys.StringBuilder&&Type.registerNamespace&&"function"===typeof Type.registerNamespace&&Type.registerClass&&"function"===typeof Type.registerClass&&"function"===typeof Function._validateParams&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&"function"===typeof Sys.Serialization.JavaScriptSerializer.serialize)},e.prototype.loadMsAjaxFull=function(e){var t=("https:"===window.location.protocol.toLowerCase()?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,e)},Object.defineProperty(e.prototype,"msAjaxError",{get:function(){return null==this._msAjaxError&&this.isMsAjaxLoaded()&&(this._msAjaxError=Error),this._msAjaxError},set:function(e){this._msAjaxError=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxString",{get:function(){return null==this._msAjaxString&&this.isMsAjaxLoaded()&&(this._msAjaxString=String),this._msAjaxString},set:function(e){this._msAjaxString=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxDebug",{get:function(){return null==this._msAjaxDebug&&this.isMsAjaxLoaded()&&(this._msAjaxDebug=Sys.Debug),this._msAjaxDebug},set:function(e){this._msAjaxDebug=e},enumerable:!0,configurable:!0}),e}();e.MicrosoftAjaxFactory=t}(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};!function(e){var t=function(){function e(e){this._internalStorage=e}return e.prototype.getItem=function(e){try{return this._internalStorage&&this._internalStorage.getItem(e)}catch(e){return null}},e.prototype.setItem=function(e,t){try{this._internalStorage&&this._internalStorage.setItem(e,t)}catch(e){}},e.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(e){}},e.prototype.removeItem=function(e){try{this._internalStorage&&this._internalStorage.removeItem(e)}catch(e){}},e.prototype.getKeysWithPrefix=function(e){var t=[];try{for(var n=this._internalStorage&&this._internalStorage.length||0,r=0;r0?o.push(n):0===n.tabIndex&&r.push(n):r.push(n);return o=o.sort((function(e,t){var n=e.tabIndex-t.tabIndex;return 0===n&&(n=o.indexOf(e)-o.indexOf(t)),n})),[].concat(o,r)}return{set_entropy:function(e){if("string"==typeof e)for(var t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(n=new Date(parseInt(t.slice(5,-1))))?n:t})):Sys.Serialization.JavaScriptSerializer.deserialize(r,!0),t[n]=r}catch(e){}}return t},loadScript:function(e,t,r){if(e&&t){var o=window.document,i=n[e];if(i)i.loaded?t():i.pendingCallbacks.push(t);else{var a=o.createElement("script");a.type="text/javascript",i={loaded:!1,pendingCallbacks:[t],timer:null},n[e]=i;var s=function(){null!=i.timer&&(clearTimeout(i.timer),delete i.timer),i.loaded=!0;for(var e=i.pendingCallbacks.length,t=0;t0?c(null):c(new Event("Script load timed out"))}),r),a.setAttribute("crossOrigin","anonymous"),a.src=e,o.getElementsByTagName("head")[0].appendChild(a)}}},loadCSS:function(e){if(e){var t=window.document,n=t.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.getElementsByTagName("head")[0].appendChild(n)}},parseEnum:function(e,t){var n=t[e.trim()];if("undefined"==typeof n)throw OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+e),OsfMsAjaxFactory.msAjaxError.argument("str");return n},delayExecutionAndCache:function(){var e={calc:arguments[0]};return function(){return e.calc&&(e.val=e.calc.apply(this,arguments),delete e.calc),e.val}},getUniqueId:function(){return(e+=1).toString()},formatString:function(){var e=arguments,t=e[0];return t.replace(/{(\d+)}/gm,(function(t,n){var r=parseInt(n,10)+1;return void 0===e[r]?"{"+n+"}":e[r]}))},generateConversationId:function(){return[a(),a(),(new Date).getTime().toString()].join("_")},getFrameName:function(e){return"_xdm_"+e+this.generateConversationId()},addXdmInfoAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_xdm_Info=",t,!1)},addSerializerVersionAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_serializer_version=",t,!0)},addFlightsAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_flights=",t,!0)},addInfoAsHash:function(e,n,r,o){var i,a=(e=e.trim()||"").split(t),s=a.shift(),c=a.join(t);return i=o?[n,encodeURIComponent(r),c].join(""):[c,n,r].join(""),[s,t,i].join("")},parseHostInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(e){var t=OSF.OUtil.parseXdmInfoWithGivenFragment(e,window.location.hash);return t||(t=OSF.OUtil.parseXdmInfoFromWindowName(e,window.name)),t},parseXdmInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(e,t){return OSF.OUtil.parseInfoWithGivenFragment("&_xdm_Info=","_xdm_",!1,e,t)},parseSerializerVersion:function(e){var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(e,window.location.hash);return isNaN(t)&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(e,window.name)),t},parseSerializerVersionFromWindowName:function(e,t){return parseInt(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(e,t){return parseInt(OSF.OUtil.parseInfoWithGivenFragment("&_serializer_version=","_serializer_version=",!0,e,t))},parseFlights:function(e){var t=OSF.OUtil.parseFlightsWithGivenFragment(e,window.location.hash);return 0==t.length&&(t=OSF.OUtil.parseFlightsFromWindowName(e,window.name)),t},checkFlight:function(e){return OSF.Flights&&OSF.Flights.indexOf(e)>=0},pushFlight:function(e){return OSF.Flights.indexOf(e)<0&&(OSF.Flights.push(e),!0)},getBooleanSetting:function(e){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,e)},getBooleanFromDictionary:function(e,t){var n=e&&t&&void 0!==e[t]&&e[t]&&("string"===typeof e[t]&&"TRUE"===e[t].toUpperCase()||"boolean"===typeof e[t]&&e[t]);return void 0!==n&&n},getIntFromDictionary:function(e,t){return e&&t&&void 0!==e[t]&&"string"===typeof e[t]?parseInt(e[t]):NaN},pushIntFlight:function(e,t){return!(e in OSF.IntFlights)&&(OSF.IntFlights[e]=t,!0)},getIntFlight:function(e){return OSF.IntFlights&&e in OSF.IntFlights?OSF.IntFlights[e]:NaN},parseFlightsFromWindowName:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment("&_flights=","_flights=",!0,e,t))},parseArrayWithDefault:function(e){var t=[];try{t=JSON.parse(e)}catch(e){}return Array.isArray(t)||(t=[]),t},parseInfoFromWindowName:function(e,t,n){try{var r=JSON.parse(t),o=null!=r?r[n]:null,i=s();if(!e&&i&&null!=r){var a=r[OSF.WindowNameItemKeys.BaseFrameName]+n;o?i.setItem(a,o):o=i.getItem(a)}return o}catch(e){return null}},parseInfoWithGivenFragment:function(e,t,n,r,o){var i=o.split(e),a=i.length>1?i[i.length-1]:null;n&&null!=a&&(a.indexOf("&")>=0&&(a=a.split("&")[0]),a=decodeURIComponent(a));var c=s();if(!r&&c){var l=window.name.indexOf(t);if(l>-1){var u=window.name.indexOf(";",l);-1==u&&(u=window.name.length);var d=window.name.substring(l,u);a?c.setItem(d,a):a=c.getItem(d)}}return a},getConversationId:function(){var e=window.location.search,t=null;if(e){var n=e.indexOf("&");(t=n>0?e.substring(1,n):e.substr(1))&&"="===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1))&&(t=decodeURIComponent(t))}return t},getInfoItems:function(e){var t=e.split("$");return"undefined"==typeof t[1]&&(t=e.split("|")),"undefined"==typeof t[1]&&(t=e.split("%7C")),t},getXdmFieldValue:function(e,t){var n="",r=OSF.OUtil.parseXdmInfo(t);if(r){var o=OSF.OUtil.getInfoItems(r);if(void 0!=o&&o.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:n=o[2];break;case OSF.XdmFieldName.AppId:n=o[1]}}return n},validateParamObject:function(e,t,n){var r=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:!1},{name:"expectedProperties",type:Object,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0}]);if(r)throw r;for(var o in t)if(r=Function._validateParameter(e[o],t[o],o))throw r},writeProfilerMark:function(e){window.msWriteProfilerMark&&(window.msWriteProfilerMark(e),OsfMsAjaxFactory.msAjaxDebug.trace(e))},outputDebug:function(e){"undefined"!==typeof OsfMsAjaxFactory&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(e)},defineNondefaultProperty:function(e,t,n,r){for(var o in n=n||{},r){var i=r[o];void 0==n[i]&&(n[i]=!0)}return Object.defineProperty(e,t,n),e},defineNondefaultProperties:function(e,t,n){for(var r in t=t||{})OSF.OUtil.defineNondefaultProperty(e,r,t[r],n);return e},defineEnumerableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["enumerable"])},defineEnumerableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["enumerable"])},defineMutableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["writable","enumerable","configurable"])},defineMutableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["writable","enumerable","configurable"])},finalizeProperties:function(e,t){t=t||{};for(var n=Object.getOwnPropertyNames(e),r=n.length,o=0;o>8,a=255&n,u[s++]=o>>2,u[s++]=(3&o)<<4|i>>4,u[s++]=(15&i)<<2|a>>6,u[s++]=63&a,isNaN(n)||(o=n>>8,i=255&r,a=r>>8,u[s++]=o>>2,u[s++]=(3&o)<<4|i>>4,u[s++]=(15&i)<<2|a>>6,u[s++]=63&a),isNaN(n)?u[s-1]=64:isNaN(r)&&(u[s-2]=64,u[s-1]=64);for(var p=0;p=2?n[r-2]+"."+n[r-1]:1==r?n[0]:void 0},isiOS:function(){return!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)},isChrome:function(){return window.navigator.userAgent.indexOf("Chrome")>0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},startsWith:function(e,t,n){return n?e.substr(0,t.length)===t:e.startsWith(t)},containsPort:function(e,t,n,r){return this.startsWith(e,t+"//"+n+":"+r,!0)||this.startsWith(e,n+":"+r,!0)},getRedundandPortString:function(e,t){return e&&t?"https:"==t.protocol&&this.containsPort(e,"https:",t.hostname,"443")?":443":"http:"==t.protocol&&this.containsPort(e,"http:",t.hostname,"80")?":80":"":""},removeChar:function(e,t){return t=e.length)return this.removeChar(e,n);if("/"===t){if("?"===e.charAt(n+1)||"#"===e.charAt(n+1))return this.removeChar(e,n)}else if("?"===t&&"#"===e.charAt(n+1))return this.removeChar(e,n)}return e},cleanUrl:function(e){if(e=this.cleanUrlOfChar(e,"/"),e=this.cleanUrlOfChar(e,"?"),"https://"==(e=this.cleanUrlOfChar(e,"#")).substr(0,8))-1!=(t=e.indexOf(":443"))&&(t!=e.length-4&&"/"!=e.charAt(t+4)&&"?"!=e.charAt(t+4)&&"#"!=e.charAt(t+4)||(e=e.substring(0,t)+e.substring(t+4)));else if("http://"==e.substr(0,7)){var t;-1!=(t=e.indexOf(":80"))&&(t!=e.length-3&&"/"!=e.charAt(t+3)&&"?"!=e.charAt(t+3)&&"#"!=e.charAt(t+3)||(e=e.substring(0,t)+e.substring(t+3)))}return e},parseUrl:function(e,t){if(void 0===t&&(t=!1),"undefined"!==typeof e&&e){var n=this.isIE(),r={protocol:void 0,hostname:void 0,host:void 0,port:void 0,pathname:void 0,search:void 0,hash:void 0,isPortPartOfUrl:void 0};try{if(n){var o=document.createElement("a");if(o.href=e,!o||!o.protocol||!o.host||!o.hostname||!o.href||this.cleanUrl(o.href).toLowerCase()!==this.cleanUrl(e).toLowerCase())throw"InvalidUrl";if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=o.protocol)throw new Error("NotHttps");var i=this.getRedundandPortString(e,o);r.protocol=o.protocol,r.hostname=o.hostname,r.port=""==i?o.port:"",r.host=""!=i?o.hostname:o.host,r.pathname=(n?"/":"")+o.pathname,r.search=o.search,r.hash=o.hash,r.isPortPartOfUrl=this.containsPort(e,o.protocol,o.hostname,o.port)}else{var a=new URL(e);if(a&&a.protocol&&a.host&&a.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=a.protocol)throw new Error("NotHttps");r.protocol=a.protocol,r.hostname=a.hostname,r.port=a.port,r.host=a.host,r.pathname=a.pathname,r.search=a.search,r.hash=a.hash,r.isPortPartOfUrl=a.host.lastIndexOf(":"+a.port)==a.host.length-a.port.length-1}}}catch(e){if("NotHttps"===e.message)throw e}return r}},shallowCopy:function(e){if(null==e)return null;if(e instanceof Object){if(Array.isArray(e)){for(var t=[],n=0;ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(e=c(e),n=t?e.length-1:0,0===e.length)return null;for(;!o&&n>=0&&ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(r=function(e,t){for(var n=0;n=0&&oe.length)return!1;if(e.substr(e.length-t.length)===t)return!0}return!1},hashCode:function(e){var t=0;if(!OSF.OUtil.isNullOrUndefined(e))for(var n=0,r=e.length;n0;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[n%16],n=Math.floor(n/16);for(;r<32;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[Math.floor(16*Math.random())];return t}}}();try{!function(){OSF.Flights=OSF.OUtil.parseFlights(!0)}()}catch(e){}window.OSF=OSF,OSF.OUtil.setNamespace("OSF",window),OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3},OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614,Visio:8388615,OneNoteAndroid:4194305},OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"},OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"},OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20,UpdateTargetUrl:21,InstallCustomFunctions:22,SendTelemetryEvent:23,UninstallCustomFunctions:24,SendMessage:25,LaunchExtensionComponent:26,StopExtensionComponent:27,RestartExtensionComponent:28,EnableTaskPaneHeaderButton:29,DisableTaskPaneHeaderButton:30,TaskPaneHeaderButtonClicked:31,RemoveAppCommandsAddin:32,RefreshRibbonGallery:33,GetOriginalControlId:34,OfficeJsReady:35,InsertDevManifest:36,InsertDevManifestError:37,SendCustomerContent:38,KeyboardShortcuts:39},OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"},OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006},OSF.OfficeAppContext=function(e,t,n,r,o,i,a,s,c,l,u,d,f,p,h,m,g,y,v,O,b,S,C,A,_,D,F){this._id=e,this._appName=t,this._appVersion=n,this._appUILocale=r,this._dataLocale=o,this._docUrl=i,this._clientMode=a,this._settings=s,this._reason=c,this._osfControlType=l,this._eToken=u,this._correlationId=d,this._appInstanceId=f,this._touchEnabled=p,this._commerceAllowed=h,this._appMinorVersion=m,this._requirementMatrix=g,this._hostCustomMessage=y,this._hostFullVersion=v,this._isDialog=!1,this._clientWindowHeight=O,this._clientWindowWidth=b,this._addinName=S,this._appDomains=C,this._dialogRequirementMatrix=A,this._featureGates=_,this._officeTheme=D,this._initialDisplayMode=F,this.get_id=function(){return this._id},this.get_appName=function(){return this._appName},this.get_appVersion=function(){return this._appVersion},this.get_appUILocale=function(){return this._appUILocale},this.get_dataLocale=function(){return this._dataLocale},this.get_docUrl=function(){return this._docUrl},this.get_clientMode=function(){return this._clientMode},this.get_bindings=function(){return this._bindings},this.get_settings=function(){return this._settings},this.get_reason=function(){return this._reason},this.get_osfControlType=function(){return this._osfControlType},this.get_eToken=function(){return this._eToken},this.get_correlationId=function(){return this._correlationId},this.get_appInstanceId=function(){return this._appInstanceId},this.get_touchEnabled=function(){return this._touchEnabled},this.get_commerceAllowed=function(){return this._commerceAllowed},this.get_appMinorVersion=function(){return this._appMinorVersion},this.get_requirementMatrix=function(){return this._requirementMatrix},this.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix},this.get_hostCustomMessage=function(){return this._hostCustomMessage},this.get_hostFullVersion=function(){return this._hostFullVersion},this.get_isDialog=function(){return this._isDialog},this.get_clientWindowHeight=function(){return this._clientWindowHeight},this.get_clientWindowWidth=function(){return this._clientWindowWidth},this.get_addinName=function(){return this._addinName},this.get_appDomains=function(){return this._appDomains},this.get_featureGates=function(){return this._featureGates},this.get_officeTheme=function(){return this._officeTheme},this.get_initialDisplayMode=function(){return this._initialDisplayMode?this._initialDisplayMode:0}},OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1},OSF.ClientMode={ReadOnly:0,ReadWrite:1},OSF.OUtil.setNamespace("Microsoft",window),OSF.OUtil.setNamespace("Office",Microsoft),OSF.OUtil.setNamespace("Client",Microsoft.Office),OSF.OUtil.setNamespace("WebExtension",Microsoft.Office),Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",ControlActivation:"controlActivation"},Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"},Microsoft.Office.WebExtension.FilterType={All:"all"},Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",JsonData:"jsonData",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",AllowConsentPrompt:"allowConsentPrompt",ForMSGraphAccess:"forMSGraphAccess",AllowSignInPrompt:"allowSignInPrompt",JsonPayload:"jsonPayload",EnableNewHosts:"enableNewHosts",AccountTypeFilter:"accountTypeFilter",AddinTrustId:"addinTrustId",Reserved:"reserved",Tcid:"tcid",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo",TargetOrigin:"targetOrigin",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64",FormId:"formId"},OSF.OUtil.setNamespace("DDA",OSF),OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0},OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"},OSF.DDA.EventDescriptors={},OSF.DDA.ListDescriptors={},OSF.DDA.UI={},OSF.DDA.getXdmEventName=function(e,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?e+"_"+t:t},OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetAuthContextMethod:99,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidInsertFormMethod:106,dispidDisplayRibbonCalloutAsyncMethod:109,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidExecuteFeature:146,dispidQueryFeature:147,dispidGetNestedAppAuthContextMethod:205,dispidMethodMax:205},OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidOlkRecurrenceChangedEvent:49,dispidOlkAttachmentsChangedEvent:50,dispidOlkEnhancedLocationsChangedEvent:51,dispidOlkInfobarClickedEvent:52,dispidOlkSelectedItemsChangedEvent:53,dispidOlkSensitivityLabelChangedEvent:54,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63},OSF.DDA.ErrorCodeManager=function(){var e={};return{getErrorArgs:function(t){var n=e[t];return n?(n.name||(n.name=e[this.errorCodes.ooeInternalError].name),n.message||(n.message=e[this.errorCodes.ooeInternalError].message)):n=e[this.errorCodes.ooeInternalError],n},addErrorMessage:function(t,n){e[t]=n},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeOperationCancelled:5014,ooeWorkbookHidden:5015,ooeWriteNotSupportedWhenModalDialogOpen:5016,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeRequestPayloadSizeLimitExceeded:5103,ooeResponsePayloadSizeLimitExceeded:5104,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeModalDialogOpen:12012,ooeDocumentIsInactive:12013,ooeDialogParentIsMinimized:12014,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010,ooeResourceNotAllowed:13011,ooeSSOUnsupportedPlatform:13012,ooeSSOCallThrottled:13013,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(t){e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden]={name:t.L_APICallFailed,message:t.L_WorkbookHiddenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen]={name:t.L_APICallFailed,message:t.L_WriteNotSupportedWhenModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_RequestPayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_ResponsePayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen]={name:t.L_DisplayDialogError,message:t.L_ModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive]={name:t.L_DisplayDialogError,message:t.L_DocumentIsInactive},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized]={name:t.L_DisplayDialogError,message:t.L_DialogParentIsMinimized},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:t.L_APINotSupported,message:t.L_SSOUnsupportedPlatform},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:t.L_OperationCancelledError,message:t.L_OperationCancelledErrorMessage}}}}(),function(e){!function(e){var t=function(){return function(){}}();e.RequirementVersion=t;var n=function(){return function(e){this.isSetSupported=function(e,t){if(void 0==e)return!1;void 0==t&&(t=0);var n=this._setMap._sets;if(n.hasOwnProperty(e.toLowerCase())){var r=n[e.toLowerCase()];try{var o=this._getVersion(r);t+="";var i=this._getVersion(t);if(o.major>0&&o.major>i.major)return!0;if(o.major>0&&o.minor>=0&&o.major==i.major&&o.minor>=i.minor)return!0}catch(e){return!1}}return!1},this._getVersion=function(e){var t=(e+="").split("."),n=0,r=0;if(t.length<2&&isNaN(Number(e)))throw"version format incorrect";if(n=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(n)||isNaN(r))throw"version format incorrect";return{minor:r,major:n}},this._setMap=e,this.isSetSupported=this.isSetSupported.bind(this)}}();e.RequirementMatrix=n;var r=function(){return function(e){this._addSetMap=function(e){for(var t in e)this._sets[t]=e[t]},this._sets=e}}();e.DefaultSetRequirement=r;var o=function(e){function t(){return e.call(this,{dialogapi:1.1})||this}return __extends(t,e),t}(r);e.DefaultRequiredDialogSetRequirement=o;var i=function(e){function t(){return e.call(this,{dialogorigin:1.1})||this}return __extends(t,e),t}(r);e.DefaultOptionalDialogSetRequirement=i;var a=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,excelapi:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelClientDefaultSetRequirement=a;var s=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(a);e.ExcelClientV1DefaultSetRequirement=s;var c=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookClientDefaultSetRequirement=c;var l=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1,wordapi:1.1})||this}return __extends(t,e),t}(r);e.WordClientDefaultSetRequirement=l;var u=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:1.1}),t}return __extends(t,e),t}(l);e.WordClientV1DefaultSetRequirement=u;var d=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointClientDefaultSetRequirement=d;var f=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(d);e.PowerpointClientV1DefaultSetRequirement=f;var p=function(e){function t(){return e.call(this,{selection:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ProjectClientDefaultSetRequirement=p;var h=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,file:1.1})||this}return __extends(t,e),t}(r);e.ExcelWebDefaultSetRequirement=h;var m=function(e){function t(){return e.call(this,{compressedfile:1.1,documentevents:1.1,file:1.1,imagecoercion:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablecoercion:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordWebDefaultSetRequirement=m;var g=function(e){function t(){return e.call(this,{activeview:1.1,settings:1.1})||this}return __extends(t,e),t}(r);e.PowerpointWebDefaultSetRequirement=g;var y=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookWebDefaultSetRequirement=y;var v=function(e){function t(){return e.call(this,{activeview:1.1,documentevents:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.SwayWebDefaultSetRequirement=v;var O=function(e){function t(){return e.call(this,{bindingevents:1.1,partialtablebindings:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1})||this}return __extends(t,e),t}(r);e.AccessWebDefaultSetRequirement=O;var b=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelIOSDefaultSetRequirement=b;var S=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordIOSDefaultSetRequirement=S;var C=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2}),t}return __extends(t,e),t}(S);e.WordIOSV1DefaultSetRequirement=C;var A=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointIOSDefaultSetRequirement=A;var _=function(e){function t(){return e.call(this,{mailbox:1.1})||this}return __extends(t,e),t}(r);e.OutlookIOSDefaultSetRequirement=_;var D=function(){function e(){}return e.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},e.getDefaultRequirementMatrix=function(t){this.initializeDefaultSetMatrix();var o=void 0,i=t.get_requirementMatrix();if(void 0!=i&&i.length>0&&"undefined"!==typeof JSON){var a=JSON.parse(t.get_requirementMatrix().toLowerCase());o=new n(new r(a))}else{var s=e.getClientFullVersionString(t);o=void 0!=e.DefaultSetArrayMatrix&&void 0!=e.DefaultSetArrayMatrix[s]?new n(e.DefaultSetArrayMatrix[s]):new n(new r({}))}return o},e.getDefaultDialogRequirementMatrix=function(e){var t=void 0,a=e.get_dialogRequirementMatrix();if(void 0!=a&&a.length>0&&"undefined"!==typeof JSON){var s=JSON.parse(e.get_requirementMatrix().toLowerCase());t=new r(s)}else{t=new o;var c=e.get_requirementMatrix();if(void 0!=c&&c.length>0&&"undefined"!==typeof JSON){s=JSON.parse(c.toLowerCase());for(var l in t._sets)s.hasOwnProperty(l)&&(t._sets[l]=s[l]);var u=new i;for(var l in u._sets)s.hasOwnProperty(l)&&(t._sets[l]=s[l])}}return new n(t)},e.getClientFullVersionString=function(e){var t=e.get_appMinorVersion(),n="",r="",o=e.get_appName();return(1024==o||4096==o||8192==o||65536==o)&&1==e.get_appVersion()?r=4096==o&&t>=15?"16.00.01":"16.00":64==e.get_appName()?r=e.get_appVersion():(n=t<10?"0"+t:""+t,r=e.get_appVersion()+"."+n),e.get_appName()+"-"+r},e.initializeDefaultSetMatrix=function(){e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1600]=new a,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1600]=new l,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1600]=new d,e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1601]=new s,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1601]=new u,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1601]=new f,e.DefaultSetArrayMatrix[e.Outlook_RCLIENT_1600]=new c,e.DefaultSetArrayMatrix[e.Excel_WAC_1600]=new h,e.DefaultSetArrayMatrix[e.Word_WAC_1600]=new m,e.DefaultSetArrayMatrix[e.Outlook_WAC_1600]=new y,e.DefaultSetArrayMatrix[e.Outlook_WAC_1601]=new y,e.DefaultSetArrayMatrix[e.Project_RCLIENT_1600]=new p,e.DefaultSetArrayMatrix[e.Access_WAC_1600]=new O,e.DefaultSetArrayMatrix[e.PowerPoint_WAC_1600]=new g,e.DefaultSetArrayMatrix[e.Excel_IOS_1600]=new b,e.DefaultSetArrayMatrix[e.SWAY_WAC_1600]=new v,e.DefaultSetArrayMatrix[e.Word_IOS_1600]=new S,e.DefaultSetArrayMatrix[e.Word_IOS_16001]=new C,e.DefaultSetArrayMatrix[e.PowerPoint_IOS_1600]=new A,e.DefaultSetArrayMatrix[e.Outlook_IOS_1600]=new _},e.Excel_RCLIENT_1600="1-16.00",e.Excel_RCLIENT_1601="1-16.01",e.Word_RCLIENT_1600="2-16.00",e.Word_RCLIENT_1601="2-16.01",e.PowerPoint_RCLIENT_1600="4-16.00",e.PowerPoint_RCLIENT_1601="4-16.01",e.Outlook_RCLIENT_1600="8-16.00",e.Excel_WAC_1600="16-16.00",e.Word_WAC_1600="32-16.00",e.Outlook_WAC_1600="64-16.00",e.Outlook_WAC_1601="64-16.01",e.Project_RCLIENT_1600="128-16.00",e.Access_WAC_1600="256-16.00",e.PowerPoint_WAC_1600="512-16.00",e.Excel_IOS_1600="1024-16.00",e.SWAY_WAC_1600="2048-16.00",e.Word_IOS_1600="4096-16.00",e.Word_IOS_16001="4096-16.00.01",e.PowerPoint_IOS_1600="8192-16.00",e.Outlook_IOS_1600="65536-16.00",e.DefaultSetArrayMatrix={},e}();e.RequirementsMatrixFactory=D}(e.Requirement||(e.Requirement={}))}(OfficeExt||(OfficeExt={})),OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"},Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"},OSF.NamespaceManager=function(){var e,t=!1;return{enableShortcut:function(){t||(window.Office?e=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,t=!0)},disableShortcut:function(){t&&(e?window.Office=e:OSF.OUtil.unsetNamespace("Office",window),t=!1)}}}(),OSF.NamespaceManager.enableShortcut(),Microsoft.Office.WebExtension.useShortNamespace=function(e){e?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()},Microsoft.Office.WebExtension.select=function(e,t){var n;if(e&&"string"==typeof e){var r=e.indexOf("#");if(-1!=r){var o=e.substring(0,r),i=e.substring(r+1);switch(o){case"binding":case"bindings":i&&(n=new OSF.DDA.BindingPromise(i))}}}if(n)return n.onFail=t,n;if(t){var a=typeof t;if("function"!=a)throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,a);var s={};s[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}},OSF.DDA.Context=function(e,t,n,r,o){if(OSF.OUtil.defineEnumerableProperties(this,{contentLanguage:{value:e.get_dataLocale()},displayLanguage:{value:e.get_appUILocale()},touchEnabled:{value:e.get_touchEnabled()},commerceAllowed:{value:e.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},isDialog:{value:OSF._OfficeAppFactory.getHostInfo().isDialog},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(e.get_hostFullVersion())}}),n&&OSF.OUtil.defineEnumerableProperty(this,"license",{value:n}),e.ui&&OSF.OUtil.defineEnumerableProperty(this,"ui",{value:e.ui}),e.auth&&OSF.OUtil.defineEnumerableProperty(this,"auth",{value:e.auth}),e.webAuth&&OSF.OUtil.defineEnumerableProperty(this,"webAuth",{value:e.webAuth}),e.application&&OSF.OUtil.defineEnumerableProperty(this,"application",{value:e.application}),e.extensionLifeCycle&&OSF.OUtil.defineEnumerableProperty(this,"extensionLifeCycle",{value:e.extensionLifeCycle}),e.messaging&&OSF.OUtil.defineEnumerableProperty(this,"messaging",{value:e.messaging}),e.ui&&e.ui.taskPaneAction&&OSF.OUtil.defineEnumerableProperty(this,"taskPaneAction",{value:e.ui.taskPaneAction}),e.ui&&e.ui.ribbonGallery&&OSF.OUtil.defineEnumerableProperty(this,"ribbonGallery",{value:e.ui.ribbonGallery}),e.get_isDialog()){var i=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(e);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:i})}else{if(t&&OSF.OUtil.defineEnumerableProperty(this,"document",{value:t}),r){var a=r.displayName||"appOM";delete r.displayName,OSF.OUtil.defineEnumerableProperty(this,a,{value:r})}e.get_officeTheme()?OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return e.get_officeTheme()}}):o&&OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return o()}});i=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(e);if(OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:i}),e.get_featureGates){var s=e.get_featureGates();if(s&&s.EnablePublicThemeManager){var c=new OSF.DDA.Theming.InternalThemeHandler;c.InitializeThemeManager(),OSF.OUtil.defineEnumerableProperty(this,"themeManager",{value:c})}}}},OSF.DDA.OutlookContext=function(e,t,n,r,o){OSF.DDA.OutlookContext.uber.constructor.call(this,e,null,n,r,o),t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t}),e.sensitivityLabelsCatalog&&OSF.OUtil.defineEnumerableProperty(this,"sensitivityLabelsCatalog",{value:e.sensitivityLabelsCatalog()})},OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context),OSF.DDA.OutlookAppOm=function(e,t,n){},OSF.DDA.Application=function(e){},OSF.DDA.Document=function(e,t){var n;switch(e.get_clientMode()){case OSF.ClientMode.ReadOnly:n=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:n=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t}),OSF.OUtil.defineMutableProperties(this,{mode:{value:n},url:{value:e.get_docUrl()}})},OSF.DDA.JsomDocument=function(e,t,n){OSF.DDA.JsomDocument.uber.constructor.call(this,e,n),t&&OSF.OUtil.defineEnumerableProperty(this,"bindings",{get:function(){return t}});var r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetSelectedDataAsync,r.SetSelectedDataAsync]),OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))},OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document),OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var e;return OSF&&OSF._OfficeAppFactory&&(e=OSF._OfficeAppFactory.getContext()),e}}),OSF.DDA.License=function(e){OSF.OUtil.defineEnumerableProperty(this,"value",{value:e})},OSF.DDA.ApiMethodCall=function(e,t,n,r,o){var i=e.length,a=OSF.OUtil.delayExecutionAndCache((function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,o)}));this.verifyArguments=function(e,t){for(var n in e){var r=e[n],o=t[n];if(r.enum)switch(typeof o){case"string":if(OSF.OUtil.listContainsValue(r.enum,o))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw a()}if(r.types&&!OSF.OUtil.listContainsValue(r.types,typeof o))throw a()}},this.extractRequiredArguments=function(t,n,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var i,a,l=e.length-1;l>=s;l--){var u=e[l];switch(typeof u){case"object":if(i)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);i=u;break;case"function":if(a)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);a=u;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}if(i=c.fillOptions(i,n,r,o),a){if(i[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;i[Microsoft.Office.WebExtension.Parameters.Callback]=a}return c.verifyArguments(t,i),i}(e,o,n,r);return c.constructCallArgs(o,i,n,r)},this.processResponse=function(e,t,n,i){return e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,n,i):t:o?o(e,t):OSF.DDA.ErrorCodeManager.getErrorArgs(e)},this.getCallArgs=function(e){for(var t,n,r=e.length-1;r>=s;r--){var o=e[r];switch(typeof o){case"object":t=o;break;case"function":n=o}}return t=t||{},n&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=n),t}},OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[],n=e.privateStateCallbacks?OSF.OUtil.createObject(e.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(e.requiredArguments||[],t,n,e.onSucceeded,e.onFailed,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.AsyncMethodCalls={},OSF.DDA.AsyncMethodCalls.define=function(e){OSF.DDA.AsyncMethodCalls[e.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(e)},OSF.DDA.Error=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{name:{value:e},message:{value:t},code:{value:n}})},OSF.DDA.AsyncResult=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:e[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}}),e[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:e[OSF.DDA.AsyncResultEnum.Properties.Context]}),t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})},OSF.DDA.issueAsyncResult=function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Callback];if(r){var o,i={};i[OSF.DDA.AsyncResultEnum.Properties.Context]=e[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?i[OSF.DDA.AsyncResultEnum.Properties.Value]=n:(o={},n=n||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),o[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,o[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=n.name||n,o[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=n.message||n),r(new OSF.DDA.AsyncResult(i,o))}},OSF.DDA.SyncMethodNames={},OSF.DDA.SyncMethodNames.addNames=function(e){for(var t in e){var n={};OSF.OUtil.defineEnumerableProperties(n,{id:{value:t},displayName:{value:e[t]}}),OSF.DDA.SyncMethodNames[t]=n}},OSF.DDA.SyncMethodCall=function(e,t,n,r,o){var i=e.length,a=new OSF.DDA.ApiMethodCall(e,t,n,r,o);this.verifyAndExtractCall=function(e,n,r){var o=a.extractRequiredArguments(e,n,r),s=function(e,n,r,o){if(e.length>i+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var s,c=e.length-1;c>=i;c--){var l=e[c];switch(typeof l){case"object":if(s)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);s=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}return s=a.fillOptions(s,n,r,o),a.verifyArguments(t,s),s}(e,o,n,r);return a.constructCallArgs(o,s,n,r)}},OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[];return new OSF.DDA.SyncMethodCall(e.requiredArguments||[],t,e.privateStateCallbacks,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.SyncMethodCalls={},OSF.DDA.SyncMethodCalls.define=function(e){OSF.DDA.SyncMethodCalls[e.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(e)},OSF.DDA.ListType=function(){var e={};return{setListType:function(t,n){e[t]=n},isListType:function(t){return OSF.OUtil.listContainsKey(e,t)},getDescriptor:function(t){return e[t]}}}(),OSF.DDA.HostParameterMap=function(e,t){var n={};function r(o,i){var a=o?{}:void 0;for(var s in o){var c,l=o[s];if(OSF.DDA.ListType.isListType(s))for(var u in c=[],l)c.push(r(l[u],i));else if(OSF.OUtil.listContainsKey(n,s))c=n[s][i](l);else if("fromHost"==i&&e.preserveNesting(s))c=r(l,i);else{var d=t[s];if(d){var f=d[i];f&&void 0===(c=f[l])&&(c=l)}else c=l}a[s]=c}return a}function o(n,o,i){var a,s=t[n][i];if("toHost"==i)a=function n(r,o){var i;for(var a in o){var s;if(void 0!=(s=e.isComplexType(a)?n(r,t[a].toHost):r[a])){i||(i={});var c=o[a];"self"==c&&(c=a),i[c]=e.pack(a,s)}}return i}(r(o,i),s);else if("fromHost"==i){a=r(function n(r,o,i){for(var a in i||(i={}),o){var s,c,l=o[a];if("self"==l)s=r;else{if("sourceData"==l){i[a]=r.toArray();continue}s=r[l]}if(null===s||void 0===s)i[a]=void 0;else if(s=e.unpack(a,s),e.isComplexType(a))c=t[a].fromHost,e.preserveNesting(a)?i[a]=n(s,c):n(s,c,i);else if(OSF.DDA.ListType.isListType(a)){(c={})[OSF.DDA.ListType.getDescriptor(a)]="self";var u=new Array(s.length);for(var d in s)u[d]=n(s[d],c);i[a]=u}else i[a]=s}return i}(o,s),i)}return a}n[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(e){if(null!=e&&void 0!==e.rows){var t={};t[OSF.DDA.TableDataProperties.TableRows]=e.rows,t[OSF.DDA.TableDataProperties.TableHeaders]=e.headers,e=t}return e},fromHost:function(e){return e}},n[Microsoft.Office.WebExtension.Parameters.JsonData]={toHost:function(e){return e},fromHost:function(e){return"string"===typeof e?JSON.parse(e):e}},n[Microsoft.Office.WebExtension.Parameters.SampleData]=n[Microsoft.Office.WebExtension.Parameters.Data],t||(t={}),this.addMapping=function(e,n){var r,o;if(n.map)for(var i in o={},r=n.map){var a=r[i];"self"==a&&(a=i),o[a]=i}else r=n.toHost,o=n.fromHost;var s=t[e];if(s){var c=s.toHost;for(var l in c)r[l]=c[l];for(var u in c=s.fromHost)o[u]=c[u]}else s=t[e]={};s.toHost=r,s.fromHost=o},this.toHost=function(e,t){return o(e,t,"toHost")},this.fromHost=function(e,t){return o(e,t,"fromHost")},this.self="self",this.sourceData="sourceData",this.addComplexType=function(t){e.addComplexType(t)},this.getDynamicType=function(t){return e.getDynamicType(t)},this.setDynamicType=function(t,n){e.setDynamicType(t,n)},this.dynamicTypes=n,this.doMapValues=function(e,t){return r(e,t)}},OSF.DDA.SpecialProcessor=function(e,t){this.addComplexType=function(t){e.push(t)},this.getDynamicType=function(e){return t[e]},this.setDynamicType=function(e,n){t[e]=n},this.isComplexType=function(t){return OSF.OUtil.listContainsValue(e,t)},this.isDynamicType=function(e){return OSF.OUtil.listContainsKey(t,e)},this.preserveNesting=function(e){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,e)},this.pack=function(e,n){return this.isDynamicType(e)?t[e].toHost(n):n},this.unpack=function(e,n){return this.isDynamicType(e)?t[e].fromHost(n):n}},OSF.DDA.getDecoratedParameterMap=function(e,t){var n=new OSF.DDA.HostParameterMap(e);n.self;function r(e){var t=null;if(e){t={};for(var n=e.length,r=0;r0){for(var r=[],o=0;o=o)break;if(r=Function._validateParameter(e[i],s,c))return r.popStackFrame(),r}return null}),Function._validateParameterCount||(Function._validateParameterCount=function(e,t,r){var o,i,a=t.length,s=e.length;if(sa)for(i=!0,o=0;o0&&t.push(i)}}}catch(e){}return t}var t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){return{toHost:function(e){if(OSF.DDA.TableDataProperties&&"string"!=typeof e&&void 0!==e[OSF.DDA.TableDataProperties.TableRows]){var t=[];t[0]=e[OSF.DDA.TableDataProperties.TableRows],t[1]=e[OSF.DDA.TableDataProperties.TableHeaders],e=t}return e},fromHost:function(t){var n;if(t.toArray)if(2===t.dimensions())n=e(t);else{var r=t.toArray();2===r.length&&(null!=r[0]&&r[0].toArray||null!=r[1]&&r[1].toArray)?((n={})[OSF.DDA.TableDataProperties.TableRows]=e(r[0]),n[OSF.DDA.TableDataProperties.TableHeaders]=e(r[1])):n=r}else n=t;return n}}}(),OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,[],t),this.unpack=function(e,n){var r;this.isComplexType(e)||OSF.DDA.ListType.isListType(e)?r=void 0!==n&&void 0!==n.toArray?n.toArray():n||{}:r=this.isDynamicType(e)?t[e].fromHost(n):n;return r}},OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor),OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]}),OSF.DDA.SafeArray.Delegate.executeAsync=function(e){function t(e){var n=e;if(null!=e&&e.toArray){var r=e.toArray();n=new Array(r.length);for(var o=0;o2){a=[];for(var s=1;s-1&&(c="&");var l="width="+screen.width*i.width/100+", height="+screen.height*i.height/100;s[0]=s[0].concat(c).concat("action=displayDialog");var u=s.join("#");if(e.popup=window.open(u,"",l),e.DialogEventListener=function(n){if(n.source==e.popup)try{var o=JSON.parse(n.data);o.dialogMessage&&r(t,[OSF.DialogMessageType.DialogMessageReceived,o.dialogMessage.messageContent])}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+n.data)}},void 0!=e.popup&&void 0==window.dialogAPIErrorCode)window.addEventListener("message",e.DialogEventListener),e.interval=window.setInterval((function(){try{(null==e.popup||e.popup.closed)&&(window.clearInterval(e.interval),window.removeEventListener("message",e.DialogEventListener),e.NotifyError=null,r(t,[OSF.DialogMessageType.DialogClosed]))}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}),500),e.NotifyError=function(e){r(t,[e])},o(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);else{var d=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;window.dialogAPIErrorCode&&(d=window.dialogAPIErrorCode),o(d)}}else o(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme)}else o(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened)},e.prototype.messageParent=function(e){var t=e[Microsoft.Office.WebExtension.Parameters.MessageToParent],n={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(n),window.location.origin)},e.prototype.closeDialog=function(t,n,r){e.popup?(e.interval&&window.clearInterval(e.interval),e.popup.close(),e.popup=null,window.removeEventListener("message",e.DialogEventListener),e.NotifyError=null,r(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):r(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},e.prototype.sendMessage=function(e){},e.prototype.closeSdxDialog=function(e){},e.prototype.resizeSdxDialog=function(e,t){},e}();e.MacRichClientHostController=t}(OfficeExt||(OfficeExt={}));var OSFWebkit,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OSFPerfUtil;OSF=OSF||{};!function(e){var t=function(){function e(e){this.data=e,this.safeArrayFlag=this.isSafeArray(e)}return e.prototype.dimensions=function(){var e=0;return this.safeArrayFlag?e=this.data[0][0]:this.isArray()&&(e=2),e},e.prototype.getItem=function(){var e=null;e=this.safeArrayFlag?this.toArray():this.data;for(var t=0;t=0;a--){var s=this.eventHandlers[a];s.dispId===n&&s.targetId===r&&(this.eventHandlers.splice(a,1),window._osfHostUnregisterCallback(s.callbackId))}},e.prototype.agaveHostCallback=function(e,t){},e.prototype.agaveHostEventCallback=function(e,t){},e.prototype.constructMessagingArgs=function(e,t){return{params:t,methodId:e}},e}(),o=function(){function e(t,n){this.callingIndex=0,this.callbackList={},this.eventHandlerList={},this.asyncMethodCallbackFunctionName=t,this.eventCallbackFunctionName=n,this.conversationId=e.getCurrentTimeMS().toString()}return e.prototype.invokeMethod=function(e,t,n,r){this.postWebkitMessage({},e,t,n,r)},e.prototype.registerEvent=function(e,t,r,o,i,a){var s={eventCallbackFunction:this.eventCallbackFunctionName},c={id:r,targetId:o},l=this.postWebkitMessage(s,e,t,c,a);this.eventHandlerList[l]=new n(r,o,i)},e.prototype.unregisterEvent=function(e,t,n,r,o){var i={id:n,targetId:r};for(var a in this.eventHandlerList)if(this.eventHandlerList.hasOwnProperty(a)){var s=this.eventHandlerList[a];s.id==n&&s.targetId==r&&delete this.eventHandlerList[a]}this.invokeMethod(e,t,i,o)},e.prototype.agaveHostCallback=function(e,t){var n=this.callbackList[e];if(n){var r=n(t);void 0!==r&&!0!==r||delete this.callbackList[e]}},e.prototype.agaveHostEventCallback=function(e,t){var n=this.eventHandlerList[e];n&&n.handler(t)},e.prototype.postWebkitMessage=function(t,n,r,o,i){t.methodId=r,t.params=o;var a="";i&&(a=this.generateCorrelationId(),this.callbackList[a]=i,t.callbackId=a,t.callbackFunction=this.asyncMethodCallbackFunctionName);var s=function(){window.webkit.messageHandlers[n].postMessage(JSON.stringify(t))},c=e.getCurrentTimeMS();return null==this.lastMessageTimestamp||c-this.lastMessageTimestamp>=e.MESSAGE_TIME_DELTA?(s(),this.lastMessageTimestamp=c):(this.lastMessageTimestamp+=e.MESSAGE_TIME_DELTA,setTimeout((function(){s()}),this.lastMessageTimestamp-c)),a},e.prototype.generateCorrelationId=function(){return++this.callingIndex,this.conversationId+this.callingIndex},e.getCurrentTimeMS=function(){return(new Date).getTime()},e.MESSAGE_TIME_DELTA=10,e}()}(e.ScriptMessaging||(e.ScriptMessaging={}))}(OSFWebkit||(OSFWebkit={})),OSF.ScriptMessaging=OSFWebkit.ScriptMessaging,function(e){e.MessageHandlerName="Agave",e.PopupMessageHandlerName="WefPopupHandler",function(e){e[e.Settings=0]="Settings",e[e.SolutionReferenceId=1]="SolutionReferenceId",e[e.AppType=2]="AppType",e[e.MajorVersion=3]="MajorVersion",e[e.MinorVersion=4]="MinorVersion",e[e.RevisionVersion=5]="RevisionVersion",e[e.APIVersionSequence=6]="APIVersionSequence",e[e.AppCapabilities=7]="AppCapabilities",e[e.APPUILocale=8]="APPUILocale",e[e.AppDataLocale=9]="AppDataLocale",e[e.BindingCount=10]="BindingCount",e[e.DocumentUrl=11]="DocumentUrl",e[e.ActivationMode=12]="ActivationMode",e[e.ControlIntegrationLevel=13]="ControlIntegrationLevel",e[e.SolutionToken=14]="SolutionToken",e[e.APISetVersion=15]="APISetVersion",e[e.CorrelationId=16]="CorrelationId",e[e.InstanceId=17]="InstanceId",e[e.TouchEnabled=18]="TouchEnabled",e[e.CommerceAllowed=19]="CommerceAllowed",e[e.RequirementMatrix=20]="RequirementMatrix",e[e.HostCustomMessage=21]="HostCustomMessage",e[e.HostFullVersion=22]="HostFullVersion",e[e.InitialDisplayMode=23]="InitialDisplayMode",e[e.FeatureGates=24]="FeatureGates",e[e.HostSettings=25]="HostSettings",e[e.OfficeThemeInfo=26]="OfficeThemeInfo"}(e.AppContextProperties||(e.AppContextProperties={})),function(e){e[e.Execute=1]="Execute",e[e.RegisterEvent=2]="RegisterEvent",e[e.UnregisterEvent=3]="UnregisterEvent",e[e.WriteSettings=4]="WriteSettings",e[e.GetContext=5]="GetContext",e[e.SendMessage=6]="SendMessage",e[e.MessageParent=7]="MessageParent",e[e.SendMessage2=8]="SendMessage2",e[e.MessageParent2=9]="MessageParent2"}(e.MethodId||(e.MethodId={}));var t=function(){function t(e){this.hostScriptProxy=e,this.useFullDialogAPI=!!window._enableFullDialogAPI,this.osfSupportsDialogOrigin=!!window._osfEnableDialogOrigin}return t.prototype.execute=function(t,n,r){var o={id:t,apiArgs:n};this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.Execute,o,(function(t){if(r){var n=[];if(OSF.OUtil.isArray(t))for(var o=0;o=2&&(n=t[0],o=t[1]),r&&r(o,new e.WebkitSafeArray(n))}),(function(t){if(o)return o(new e.WebkitSafeArray(t))}))},t.prototype.unregisterEvent=function(t,n,r){this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,t,n,(function(t){return r(new e.WebkitSafeArray(t))}))},t.prototype.messageParent=function(e){if(this.useFullDialogAPI&&e){var t=e[Microsoft.Office.WebExtension.Parameters.MessageToParent];"boolean"===typeof t&&(!0===t?e[Microsoft.Office.WebExtension.Parameters.MessageToParent]="true":!1===t&&(e[Microsoft.Office.WebExtension.Parameters.MessageToParent]=""))}var n,r;if(this.osfSupportsDialogOrigin&&e[Microsoft.Office.WebExtension.Parameters.TargetOrigin]?(n=this.useFullDialogAPI?JSON.stringify(e):e[Microsoft.Office.WebExtension.Parameters.MessageToParent],r=OSF.Webkit.MethodId.MessageParent2):(n=e[Microsoft.Office.WebExtension.Parameters.MessageToParent],r=OSF.Webkit.MethodId.MessageParent),this.useFullDialogAPI)this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,r,n,null);else{var o={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:n}},i=r==OSF.Webkit.MethodId.MessageParent2?e[Microsoft.Office.WebExtension.Parameters.TargetOrigin]:window.location.origin;window.opener.postMessage(JSON.stringify(o),i)}},t.prototype.openDialog=function(e,n,r,o){if(this.useFullDialogAPI)this.registerEvent(e,n,r,o);else if(!t.popup||t.popup.closed){t.OpenDialogCallback=void 0;var i=JSON.parse(n),a=i.url;if(a){var s=a.split("#"),c="?";s[0].indexOf("?")>-1&&(c="&");var l="width="+screen.width*i.width/100+", height="+screen.height*i.height/100;s[0]=s[0].concat(c).concat("action=displayDialog");var u=s.join("#");t.popup=window.open(u,"",l),t.DialogEventListener=function(t){if(t.origin==window.location.origin)try{var n=JSON.parse(t.data);n.dialogMessage&&r(e,[OSF.DialogMessageType.DialogMessageReceived,n.dialogMessage.messageContent,t.origin])}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+t.data)}},t.OpenDialogCallback=function(e){e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(window.addEventListener("message",t.DialogEventListener),t.interval=window.setInterval(d,1e3),t.NotifyError=f),o(e)}}else o(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme)}else o(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);function d(){try{(null==t.popup||t.popup.closed)&&(window.clearInterval(t.interval),window.removeEventListener("message",t.DialogEventListener),t.NotifyError=null,t.popup=null,r(e,[OSF.DialogMessageType.DialogClosed]))}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}function f(t){r(e,[t])}},t.prototype.closeDialog=function(e,n,r){this.useFullDialogAPI?this.unregisterEvent(e,n,r):t.popup?(t.interval&&window.clearInterval(t.interval),t.popup.close(),t.popup=null,window.removeEventListener("message",t.DialogEventListener),t.NotifyError=null,r(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):r(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},t.prototype.sendMessage=function(e){var t,n;this.osfSupportsDialogOrigin&&e[Microsoft.Office.WebExtension.Parameters.TargetOrigin]?(t=JSON.stringify(e),n=OSF.Webkit.MethodId.SendMessage2):(t=e[Microsoft.Office.WebExtension.Parameters.MessageContent],n=OSF.Webkit.MethodId.SendMessage,!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString())),this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,n,t,null)},t.prototype.closeSdxDialog=function(e){},t.prototype.resizeSdxDialog=function(e,t){},t}();e.WebkitHostController=t}(OSFWebkit||(OSFWebkit={})),OSF.Webkit=OSFWebkit,OSF.initializeWebkitCommon=function(){OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(e){return function(t){var n=function(e,n){t.onReceiving&&t.onReceiving(),t.onComplete&&t.onComplete(e,n)};try{e(t.hostCallArgs,t.onCalling,n)}catch(e){n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,{name:Strings.OfficeOM.L_InternalError,message:e})}}},read:function(e,t){e&&e();OSF._OfficeAppFactory.getInitializationHelper().getAppContext(null,(function(e){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,e.get_settings())}))},write:function(e,t,n,r){var o={},i=[],a=[];for(var s in e)i.push(s),a.push(e[s]);o.keys=i,o.values=a,n&&n();OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,o,(function(e){r&&r(e[0],null)}))}},OSF.InitializationHelper.prototype.initializeSettings=function(e,t){var n=e.get_settings();return this.deserializeSettings(n,t)},OSF.InitializationHelper.prototype.getAppContext=function(e,t){var n;n=this._hostInfo.isDialog&&window.webkit.messageHandlers[OSF.Webkit.PopupMessageHandlerName]?OSF.Webkit.PopupMessageHandlerName:OSF.Webkit.MessageHandlerName,OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(n,OSF.Webkit.MethodId.GetContext,[],(function(e){for(var n,r=OSF.Webkit.AppContextProperties,o=e[r.AppType],i=e[r.Settings],a={},s=i[0],c=i[1],l=0;ln[o])return!1}return!1},e.prototype.isDirectToAriaEnabled=function(){if(void 0===this.EnableDirectToAria||null===this.EnableDirectToAria){var e=void 0,t=void 0;OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&(e=OSF._OfficeAppFactory.getHostInfo().hostPlatform),window.external&&"undefined"!==typeof window.external.GetContext&&"undefined"!==typeof window.external.GetContext().GetHostFullVersion&&(t=window.external.GetContext().GetHostFullVersion()),this.EnableDirectToAria=this.shouldSendDirectToAria(e,t)}return this.EnableDirectToAria},e.prototype.sendTelemetry=function(t,n){e.EnableSendingTelemetryWithLegacyAria&&this.isDirectToAriaEnabled()&&OSF.OUtil.loadScript(this.getAriaCDNLocation(),(function(){try{if(!this.ALogger){this.ALogger=AWTLogManager.initialize("db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439")}var e=new AWTEventProperties;for(var r in e.setName("Office.Extensibility.OfficeJS."+t),n)"table"!==r.toLowerCase()&&e.setProperty(r,n[r]);var o=new Date;e.setProperty("Date",o.toISOString()),this.ALogger.logEvent(e)}catch(e){}}),1e3),e.EnableSendingTelemetryWithOTel&&o(t,n)},e.prototype.logData=function(e){this.isIUsageData(e)?this.sendTelemetry(e.Table,e.Fields):this.sendTelemetry(e.Table,e)},e.EnableSendingTelemetryWithOTel=!0,e.EnableSendingTelemetryWithLegacyAria=!1,e}();e.AriaLogger=i}(OSFAriaLogger||(OSFAriaLogger={})),function(e){"use strict";var t,n=OSF.OUtil.Guid.generateNewGuid(),r="",o=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i");e.enableTelemetry=!0;var i=function(){return function(){}}();e.AppInfo=i;var a=function(){return function(e,t){this.name=e,this.handler=t}}(),s=function(){function e(){this.clientIDKey="Office API client",this.logIdSetKey="Office App Log Id Set"}return e.prototype.getClientId=function(){var e=this.getValue(this.clientIDKey);return(!e||e.length<=0||e.length>40)&&(e=OSF.OUtil.Guid.generateNewGuid(),this.setValue(this.clientIDKey,e)),e},e.prototype.saveLog=function(e,t){var n=this.getValue(this.logIdSetKey);n=(n&&n.length>0?n+";":"")+e,this.setValue(this.logIdSetKey,n),this.setValue(e,t)},e.prototype.enumerateLog=function(e,t){var n=this.getValue(this.logIdSetKey);if(n){var r=n.split(";");for(var o in r){var i=r[o],a=this.getValue(i);a&&(e&&e(i,a),t&&this.remove(i))}t&&this.remove(this.logIdSetKey)}},e.prototype.getValue=function(e){var t=OSF.OUtil.getLocalStorage(),n="";return t&&(n=t.getItem(e)),n},e.prototype.setValue=function(e,t){var n=OSF.OUtil.getLocalStorage();n&&n.setItem(e,t)},e.prototype.remove=function(e){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(e)}catch(e){}},e}(),c=function(){function t(){}return t.prototype.LogData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(e){}},t.prototype.LogRawData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(e){}},t}();function l(e){return e&&(e=e.replace(/[{}]/g,"").toLowerCase()),e||""}function u(e,t){var o=new OSFLog.AppInitializationUsageData;o.CorrelationId=l(r),o.SessionId=n,o.SuccessCode=e?1:0,o.Message=t,(new c).LogData(o)}function d(){var e=0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.PublicAddin);return e||!!t&&p(OSF._OfficeAppFactory.getHostInfo().hostPlatform,t.hostVersion)}function f(e,t){return d()||t!==e?t:"PRIVATE"}function p(e,t){var n=!1,r=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(t);if(r){var o=parseInt(r[1]),i=parseInt(r[2]),a=parseInt(r[3]);"win32"==e?(o<16||16==o&&a<14225)&&(n=!0):"mac"==e&&(o<16||16==o&&(i<52||52==i&&a<808))&&(n=!0)}return n}function h(){return 0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.IsMos)}e.initialize=function(r){if(e.enableTelemetry&&!t){t=new i,r.get_hostFullVersion()?t.hostVersion=r.get_hostFullVersion():t.hostVersion=r.get_appVersion(),t.appId=d()?r.get_id():"PRIVATE",t.marketplaceType=r._marketplaceType,t.browser=window.navigator.userAgent,t.correlationId=l(r.get_correlationId()),t.clientId=(new s).getClientId(),t.appInstanceId=r.get_appInstanceId(),t.appInstanceId&&(t.appInstanceId=l(t.appInstanceId),t.appInstanceId=f(r.get_id(),t.appInstanceId)),t.message=r.get_hostCustomMessage(),t.officeJSVersion=OSF.ConstantNames.FileVersion,t.hostJSVersion="0.0.0.0",r._wacHostEnvironment&&(t.wacHostEnvironment=r._wacHostEnvironment),void 0!==r._isFromWacAutomation&&null!==r._isFromWacAutomation&&(t.isFromWacAutomation=r._isFromWacAutomation.toString().toLowerCase());var c=r.get_docUrl();t.docUrl=o.test(c)?c:"";var u=location.href;u&&(u=u.split("?")[0].split("#")[0]),t.isMos=h(),t.appURL="",function(e,t){var n,r;t.assetId="",t.userId="";try{n=decodeURIComponent(e);var o=(r=(new DOMParser).parseFromString(n,"text/xml")).getElementsByTagName("t")[0].attributes.getNamedItem("cid"),i=r.getElementsByTagName("t")[0].attributes.getNamedItem("oid");o&&o.nodeValue?t.userId=o.nodeValue:i&&i.nodeValue&&(t.userId=i.nodeValue),t.assetId=r.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(e){}finally{n=null,r=null,null}}(r.get_eToken(),t),t.sessionId=n,"undefined"!==typeof OTel&&OTel.OTelLogger.initialize(t),function(){var t=new Date,n=null,r=0,o=!1,i=function(){document.hasFocus()?null==n&&(n=new Date):n&&(r+=Math.abs((new Date).getTime()-n.getTime()),n=null)},s=[];s.push(new a("focus",i)),s.push(new a("blur",i)),s.push(new a("focusout",i)),s.push(new a("focusin",i));var c=function(){for(var i=0;i0)for(var r=0;r0)for(var r=0;r0&&(this._eventHandlers[e]=[],!0)},clearObjectEventHandlers:function(e,t){return null!=this._objectEventHandlers[e]&&null!=this._objectEventHandlers[e][t]&&(this._objectEventHandlers[e][t]=[],!0)},getEventHandlerCount:function(e){return void 0!=this._eventHandlers[e]?this._eventHandlers[e].length:-1},getObjectEventHandlerCount:function(e,t){return null==this._objectEventHandlers[e]||null==this._objectEventHandlers[e][t]?0:this._objectEventHandlers[e][t].length},fireEvent:function(e){if(void 0==e.type)return!1;var t=e.type;if(t&&this._eventHandlers[t]){for(var n=this._eventHandlers[t],r=0;r0){for(var r=t[0];n.length>0;){r(n.shift())}return!0}}return!1},clearQueuedEvent:function(e){e&&this._eventHandlers[e]&&(this._queuedEventsArgs[e]&&(this._queuedEventsArgs[e]=[]))}},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureEventArgs=function(e,t,n){var r;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(n,t.document),n[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(n,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(n),"outlook"==OSF._OfficeAppFactory.getHostInfo().hostType&&"mac"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&OSF.DDA.convertOlkAppointmentTimeToDateFormat(r);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(e,n[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(e,n);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkItemSelectedChangedEventArgs(n),t.initialize(r.initialData),"win32"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform&&"mac"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform||t.setCurrentItemNumber(r.itemNumber.itemNumber);break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecipientsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecurrenceChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAttachmentsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.InfobarClicked:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkInfobarClickedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkSelectedItemsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkSensitivityLabelChangedEventArgs(n);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return r},OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]}),OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1},OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"}),OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent",MessageOrigin:"messageOrigin"}),OSF.DDA.DialogEventType={},OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"}),OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",DisplayModalDialogAsync:"displayModalDialogAsync",CloseAsync:"close"}),OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",MessageChild:"messageChild",SendMessage:"sendMessage",AddMessageHandler:"addEventHandler"}),OSF.DDA.UI.ParentUI=function(){var e;e=null!=Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived?new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]):new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]);var t=this,n=function(n,r){t[n]||OSF.OUtil.defineEnumerableProperty(t,n,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];n(arguments,e,t,r)}})};n(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,!1),Microsoft.Office.WebExtension.FeatureGates.ModalWebDialogAPI&&n(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName,!0),OSF.OUtil.finalizeProperties(this)},OSF.DDA.UI.ChildUI=function(e){var t=OSF.DDA.SyncMethodNames.MessageParent.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return e(arguments,n)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;n[r]||"undefined"==typeof OSF.DialogParentMessageEventDispatch||OSF.DDA.DispIdHost.addEventSupport(n,OSF.DialogParentMessageEventDispatch,e),OSF.OUtil.finalizeProperties(this)},OSF.DialogHandler=function(){},OSF.DDA.DialogEventArgs=function(e){e[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:e[OSF.DDA.PropertyDescriptors.MessageType]}})},OSF.DDA.DialogParentEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}})};var DialogApiManager=function(){function e(){}return e.defineApi=function(e,t){OSF.DDA.AsyncMethodCalls.define({method:e,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:t,privateStateCallbacks:[],onSucceeded:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Id],o=e[Microsoft.Office.WebExtension.Parameters.Data],i=new OSF.DialogHandler,a=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(i,a,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];e(arguments,r,o,i)}});var s=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;if(OSF.OUtil.defineEnumerableProperty(i,s,{value:function(){var e=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],t=e.verifyAndExtractCall(arguments,i,o),n=t[Microsoft.Office.WebExtension.Parameters.EventType],r=t[Microsoft.Office.WebExtension.Parameters.Handler];return o.addEventHandlerAndFireQueuedEvent(n,r)}}),!0===OSF.DDA.UI.EnableSendMessageDialogAPI){var c=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(i,c,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,o,i)}})}if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var l=OSF.DDA.SyncMethodNames.MessageChild.displayName;OSF.OUtil.defineEnumerableProperty(i,l,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,o,i)}})}return i},checkCallArgs:function(e,t,n){return e[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Width]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Width]>100&&(e[Microsoft.Office.WebExtension.Parameters.Width]=99),e[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Height]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Height]>100&&(e[Microsoft.Office.WebExtension.Parameters.Height]=99),e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),e}})},e.messageChildRichApiBridge=function(){if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,null,null)}},e.initOnce=function(){e.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync,e.displayDialogAsyncApiSupportedOptions),e.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync,e.displayModalDialogAsyncApiSupportedOptions)},e.displayDialogAsyncApiSupportedOptions=[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.EnforceAppDomain,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo,value:{types:["boolean"],defaultValue:!1}}],e.displayModalDialogAsyncApiSupportedOptions=e.displayDialogAsyncApiSupportedOptions.concat([{name:"abortWhenParentIsMinimized",value:{types:["boolean"],defaultValue:!1}},{name:"abortWhenDocIsInactive",value:{types:["boolean"],defaultValue:!1}}]),e}();DialogApiManager.initOnce(),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}],privateStateCallbacks:[]}),OSF.DDA.SafeArray.Delegate.openDialog=function(e){try{e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,e);OSF.ClientHostController.openDialog(e.dispId,e.targetId,(function(t,n){e.onEvent&&e.onEvent(n),OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(e.dispId)}),t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.closeDialog=function(e){e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,e);try{OSF.ClientHostController.closeDialog(e.dispId,e.targetId,t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.messageParent=function(e){try{e.onCalling&&e.onCalling();var t=(new Date).getTime(),n=OSF.ClientHostController.messageParent(e.hostCallArgs);return e.onReceiving&&e.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(e.dispId,e.hostCallArgs,Math.abs((new Date).getTime()-t),n),n}catch(e){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(e)}},OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.sendMessage=function(e){try{e.onCalling&&e.onCalling();(new Date).getTime();var t=OSF.ClientHostController.sendMessage(e.hostCallArgs);return e.onReceiving&&e.onReceiving(),t}catch(e){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(e)}},OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogParentMessageReceivedEvent:"DialogParentMessageReceivedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogParentMessageReceived:"dialogParentMessageReceived",DialogParentEventReceived:"dialogParentEventReceived"}),OSF.DialogParentMessageEventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,Microsoft.Office.WebExtension.EventType.DialogParentEventReceived]),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:!0}),OSF.DDA.UI.EnableMessageChildDialogAPI=!0,Microsoft.Office.WebExtension.TableData=function(e,t){function n(e){if(null==e||void 0==e)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(e,2);t<2;t++)e=[e];return e}catch(e){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(e){t=n(e)}},rows:{get:function(){return e},set:function(t){e=null==t||OSF.OUtil.isArray(t)&&0==t.length?[]:n(t)}}}),this.headers=t,this.rows=e},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureTableData=function(e){return new Microsoft.Office.WebExtension.TableData(e[OSF.DDA.TableDataProperties.TableRows],e[OSF.DDA.TableDataProperties.TableHeaders])},Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"},OSF.DDA.DataCoercion=function(){return{findArrayDimensionality:function(e){if(OSF.OUtil.isArray(e)){for(var t=0,n=0;n4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return e},onSucceeded:function(e,t,n){return new OSF.DDA.File(e[OSF.DDA.FileProperties.Handle],e[OSF.DDA.FileProperties.FileSize],n[Microsoft.Office.WebExtension.Parameters.SliceSize])}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(e,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(e,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return e[OSF.DDA.FileSliceOffset]=parseInt((r*n[OSF.DDA.FileProperties.SliceSize]).toString()),e},onSucceeded:function(e,t,n){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:OSF.OUtil.shallowCopy(e[Microsoft.Office.WebExtension.Parameters.Data])},index:{value:n[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:e[OSF.DDA.FileProperties.SliceSize]}}),r}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(e,t){return t[OSF.DDA.FileProperties.Handle]}}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]}),OSF.DDA.FilePropertiesDescriptor={Url:"Url"},OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"}),Microsoft.Office.WebExtension.FileProperties=function(e){OSF.OUtil.defineEnumerableProperties(this,{url:{value:e[OSF.DDA.FilePropertiesDescriptor.Url]}})},OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(e,t,n){return new Microsoft.Office.WebExtension.FileProperties(e)}}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.ExcelTableBinding=function(e,t,n,r,o){var i=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[i.ClearFormatsAsync,i.SetTableOptionsAsync,i.SetFormatsAsync]),OSF.DDA.ExcelTableBinding.uber.constructor.call(this,e,t,n,r,o),OSF.OUtil.finalizeProperties(this)},OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e){return OSF.DDA.DataCoercion.determineCoercionType(e[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:["object"],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:["object"],defaultValue:[]}}],privateStateCallbacks:[]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e){return OSF.DDA.DataCoercion.determineCoercionType(e[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:["object","string"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:["object"],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:["object"],defaultValue:[]}}],checkCallArgs:function(e,t,n){var r=Microsoft.Office.WebExtension.Parameters;if(0==e[r.StartRow]&&0==e[r.StartColumn]&&OSF.OUtil.isArray(e[r.CellFormat])&&0===e[r.CellFormat].length&&OSF.OUtil.isArray(e[r.TableOptions])&&0===e[r.TableOptions].length&&(delete e[r.StartRow],delete e[r.StartColumn],delete e[r.CellFormat],delete e[r.TableOptions]),e[r.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(e[r.StartRow]&&0!=e[r.StartRow]||e[r.StartColumn]&&0!=e[r.StartColumn]||e[r.CellFormat]||e[r.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return e},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(e){return e.id}}]}),OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var e=arguments;return this._fetch((function(t){t.setTableOptionsAsync.apply(t,e)})),this},OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var e=arguments;return this._fetch((function(t){t.setFormatsAsync.apply(t,e)})),this},OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var e=arguments;return this._fetch((function(t){t.clearFormatsAsync.apply(t,e)})),this}}(),function(){function e(e){return e.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]})}(),Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2},function(){OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:3}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:4},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:5}]});var e={headerRow:0,bandedRows:1,firstColumn:2,lastColumn:3,bandedColumns:4,filterButton:5,style:6,totalRow:7},t={row:0,column:1},n={alignHorizontal:{text:"alignHorizontal",type:1},alignVertical:{text:"alignVertical",type:2},backgroundColor:{text:"backgroundColor",type:101},borderStyle:{text:"borderStyle",type:201},borderColor:{text:"borderColor",type:202},borderTopStyle:{text:"borderTopStyle",type:203},borderTopColor:{text:"borderTopColor",type:204},borderBottomStyle:{text:"borderBottomStyle",type:205},borderBottomColor:{text:"borderBottomColor",type:206},borderLeftStyle:{text:"borderLeftStyle",type:207},borderLeftColor:{text:"borderLeftColor",type:208},borderRightStyle:{text:"borderRightStyle",type:209},borderRightColor:{text:"borderRightColor",type:210},borderOutlineStyle:{text:"borderOutlineStyle",type:211},borderOutlineColor:{text:"borderOutlineColor",type:212},borderInlineStyle:{text:"borderInlineStyle",type:213},borderInlineColor:{text:"borderInlineColor",type:214},fontFamily:{text:"fontFamily",type:301},fontStyle:{text:"fontStyle",type:302},fontSize:{text:"fontSize",type:303},fontUnderlineStyle:{text:"fontUnderlineStyle",type:304},fontColor:{text:"fontColor",type:305},fontDirection:{text:"fontDirection",type:306},fontStrikethrough:{text:"fontStrikethrough",type:307},fontSuperscript:{text:"fontSuperscript",type:308},fontSubscript:{text:"fontSubscript",type:309},fontNormal:{text:"fontNormal",type:310},indentLeft:{text:"indentLeft",type:401},indentRight:{text:"indentRight",type:402},numberFormat:{text:"numberFormat",type:501},width:{text:"width",type:701},height:{text:"height",type:702},wrapping:{text:"wrapping",type:703}},r=[{name:"none",value:0},{name:"thin",value:1},{name:"medium",value:2},{name:"dashed",value:3},{name:"dotted",value:4},{name:"thick",value:5},{name:"double",value:6},{name:"hair",value:7},{name:"medium dashed",value:8},{name:"dash dot",value:9},{name:"medium dash dot",value:10},{name:"dash dot dot",value:11},{name:"medium dash dot dot",value:12},{name:"slant dash dot",value:13}],o=[{name:"none",value:0},{name:"black",value:1},{name:"blue",value:2},{name:"gray",value:3},{name:"green",value:4},{name:"orange",value:5},{name:"pink",value:6},{name:"purple",value:7},{name:"red",value:8},{name:"teal",value:9},{name:"turquoise",value:10},{name:"violet",value:11},{name:"white",value:12},{name:"yellow",value:13},{name:"automatic",value:14}],i=OSF.DDA.SafeArray.Delegate.ParameterMap;i.define({type:n.alignHorizontal.text,toHost:[{name:"general",value:0},{name:"left",value:1},{name:"center",value:2},{name:"right",value:3},{name:"fill",value:4},{name:"justify",value:5},{name:"center across selection",value:6},{name:"distributed",value:7}]}),i.define({type:n.alignVertical.text,toHost:[{name:"top",value:0},{name:"center",value:1},{name:"bottom",value:2},{name:"justify",value:3},{name:"distributed",value:4}]}),i.define({type:n.backgroundColor.text,toHost:o}),i.define({type:n.borderStyle.text,toHost:r}),i.define({type:n.borderColor.text,toHost:o}),i.define({type:n.borderTopStyle.text,toHost:r}),i.define({type:n.borderTopColor.text,toHost:o}),i.define({type:n.borderBottomStyle.text,toHost:r}),i.define({type:n.borderBottomColor.text,toHost:o}),i.define({type:n.borderLeftStyle.text,toHost:r}),i.define({type:n.borderLeftColor.text,toHost:o}),i.define({type:n.borderRightStyle.text,toHost:r}),i.define({type:n.borderRightColor.text,toHost:o}),i.define({type:n.borderOutlineStyle.text,toHost:r}),i.define({type:n.borderOutlineColor.text,toHost:o}),i.define({type:n.borderInlineStyle.text,toHost:r}),i.define({type:n.borderInlineColor.text,toHost:o}),i.define({type:n.fontStyle.text,toHost:[{name:"regular",value:0},{name:"italic",value:1},{name:"bold",value:2},{name:"bold italic",value:3}]}),i.define({type:n.fontUnderlineStyle.text,toHost:[{name:"none",value:0},{name:"single",value:1},{name:"double",value:2},{name:"single accounting",value:3},{name:"double accounting",value:4}]}),i.define({type:n.fontColor.text,toHost:o}),i.define({type:n.fontDirection.text,toHost:[{name:"context",value:0},{name:"left-to-right",value:1},{name:"right-to-left",value:2}]}),i.define({type:n.width.text,toHost:[{name:"auto fit",value:-1}]}),i.define({type:n.height.text,toHost:[{name:"auto fit",value:-1}]}),i.define({type:Microsoft.Office.WebExtension.Parameters.TableOptions,toHost:[{name:"headerRow",value:0},{name:"bandedRows",value:1},{name:"firstColumn",value:2},{name:"lastColumn",value:3},{name:"bandedColumns",value:4},{name:"filterButton",value:5},{name:"style",value:6},{name:"totalRow",value:7}]}),i.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={toHost:function(e){for(var t in e)e[t].format&&(e[t].format=i.doMapValues(e[t].format,"toHost"));return e},fromHost:function(e){return e}},i.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat,{toHost:function(e){var r=[];for(var o in e){var i=e[o],a=[];if("undefined"!==typeof i.cells){var s,c=i.cells;if("object"===typeof i.cells)for(var l in s=[],c)"undefined"!==typeof t[l]&&(s[t[l]]=c[l]);else s=c;a[0]=s}if(i.format){var u=i.format,d=[];for(var f in u)"undefined"!==typeof n[f]&&d.push([n[f].type,u[f]]);a[1]=d}r[o]=a}return r},fromHost:function(e){return e}}),i.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions,{toHost:function(t){var n=[];for(var r in t)"undefined"!==typeof e[r]&&(n[e[r]]=t[r]);return n},fromHost:function(e){return e}})}(),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Image:"image"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{XmlSvg:"xmlSvg"}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Image,value:8},{name:Microsoft.Office.WebExtension.CoercionType.XmlSvg,value:9}]}),function(e){!function(t){var n=function(){function n(){var e=this;this._pseudoDocument=null,this._eventDispatch=null,this._useAssociatedActionsOnly=null,this._processAppCommandInvocation=function(t){var n=e._verifyManifestCallback(t.callbackName);if(n.errorCode==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var r=e._constructEventObjectForCallback(t);r?window.setTimeout((function(){n.callback(r)}),0):e._invokeAppCommandCompletedMethod(t.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}else e._invokeAppCommandCompletedMethod(t.appCommandId,n.errorCode,"")}}return n.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:["string"]}]}),OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"}),OSF.OUtil.setNamespace("AppCommand",OSF.DDA),OSF.DDA.AppCommand.AppCommandInvokedEventArgs=e.AppCommand.AppCommandInvokedEventArgs},n.prototype.initializeAndChangeOnce=function(e){t.registerDdaFacade(),this._pseudoDocument={},OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]),this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch),this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,(function(t){e&&("succeeded"==t.status?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))}))},n.prototype._verifyManifestCallback=function(e){var t={callback:null,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback};e=e.trim();try{var n=this._getCallbackFunc(e);if("function"!=typeof n)return t}catch(e){return t}return{callback:n,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}},n.prototype._getUseAssociatedActionsOnly=function(){if(null==this._useAssociatedActionsOnly){this._useAssociatedActionsOnly=!1;try{!0===window.useAssociatedActionsOnly?this._useAssociatedActionsOnly=!0:this._useAssociatedActionsOnly=OSF._OfficeAppFactory.getLoadScriptHelper().getUseAssociatedActionsOnlyDefined()}catch(e){}}return this._useAssociatedActionsOnly},n.prototype._getCallbackFuncFromWindow=function(e){for(var t=e.split("."),n=window,r=0;r=0&&(e=e.substring(t+5,e.length))<"14.14393"}()?e.PromiseImpl.Init():window.Promise:e.PromiseImpl.Init()}()}(t=e._Internal||(e._Internal={}));var n=t.OfficePromise;e.Promise=n}(OfficeExtension||(OfficeExtension={})),function(e){var t=function(){function e(){}return e.prototype._resolveRequestUrlAndHeaderInfo=function(){return l._createPromiseFromResult(null)},e.prototype._createRequestExecutorOrNull=function(){return null},e.prototype.getEventRegistration=function(e){return null},e}();e.SessionBase=t;var n=function(){function e(){}return e.setCustomSendRequestFunc=function(t){e.s_customSendRequestFunc=t},e.xhrSendRequestFunc=function(e){return l.createPromise((function(t,n){var o=new XMLHttpRequest;if(o.open(e.method,e.url),o.onload=function(){var e={statusCode:o.status,headers:l._parseHttpResponseHeaders(o.getAllResponseHeaders()),body:o.responseText};t(e)},o.onerror=function(){n(new r.RuntimeError({code:i.connectionFailure,httpStatusCode:o.status,message:l._getResourceString(a.connectionFailureWithStatus,o.statusText)}))},e.headers)for(var s in e.headers)o.setRequestHeader(s,e.headers[s]);o.send(l._getRequestBodyText(e))}))},e.fetchSendRequestFunc=function(e){var t=l._getRequestBodyText(e);return""===t&&(t=void 0),fetch(e.url,{method:e.method,headers:e.headers,body:t}).then((function(e){return e.text().then((function(t){var n=e.status,r={};return e.headers.forEach((function(e,t){r[t]=e})),{statusCode:n,headers:r,body:t}}))}))},e.sendRequest=function(t){e.validateAndNormalizeRequest(t);var n=e.s_customSendRequestFunc;return n||(n="undefined"!==typeof fetch?e.fetchSendRequestFunc:e.xhrSendRequestFunc),n(t)},e.setCustomSendLocalDocumentRequestFunc=function(t){e.s_customSendLocalDocumentRequestFunc=t},e.sendLocalDocumentRequest=function(t){return e.validateAndNormalizeRequest(t),(e.s_customSendLocalDocumentRequestFunc||e.officeJsSendLocalDocumentRequestFunc)(t)},e.officeJsSendLocalDocumentRequestFunc=function(e){e=l._validateLocalDocumentRequest(e);var t=l._buildRequestMessageSafeArray(e);return l.createPromise((function(e,n){OSF.DDA.RichApi.executeRichApiRequestAsync(t,(function(t){var n;n="succeeded"==t.status?{statusCode:c.getResponseStatusCode(t),headers:c.getResponseHeaders(t),body:c.getResponseBody(t)}:c.buildHttpResponseFromOfficeJsError(t.error.code,t.error.message),l.log("Response:"),l.log(JSON.stringify(n)),e(n)}))}))},e.validateAndNormalizeRequest=function(e){if(l.isNullOrUndefined(e))throw r.RuntimeError._createInvalidArgError({argumentName:"request"});l.isNullOrEmptyString(e.method)&&(e.method="GET"),e.method=e.method.toUpperCase();var t=!1;if("object"===typeof e.headers&&e.headers[s.testRequestNameHeader]&&(t=!0),!t){var n=u._getCurrentTestNameWithSequenceId();n&&(e.headers||(e.headers={}),e.headers[s.testRequestNameHeader]=n)}},e.logRequest=function(t){if(l._logEnabled){if(l.log("---HTTP Request---"),l.log(t.method+" "+t.url),t.headers)for(var n in t.headers)l.log(n+": "+t.headers[n]);e._logBodyEnabled&&l.log(l._getRequestBodyText(t))}},e.logResponse=function(t){if(l._logEnabled){if(l.log("---HTTP Response---"),l.log(""+t.statusCode),t.headers)for(var n in t.headers)l.log(n+": "+t.headers[n]);e._logBodyEnabled&&l.log(t.body)}},e._logBodyEnabled=!1,e}();e.HttpUtility=n;var r,o=function(){function e(e){var t=this;this.m_bridge=e,this.m_promiseResolver={},this.m_handlers=[],this.m_bridge.onMessageFromHost=function(e){var n=JSON.parse(e);if(3==n.type){var r=n.message;if(r&&r.entries)for(var o=0;o=0){var i=t.url.substr(o+1),a=l._parseRequestFlagsAndCustomDataFromQueryStringIfAny(i);a.flags>=0&&(n=a.flags)}"string"===typeof t.body&&(t.body=JSON.parse(t.body));var s={id:e.nextId(),type:1,flags:n,message:t};return r.sendMessageToHostAndExpectResponse(s).then((function(e){return e.message}))}));for(var o=0;o=0&&this.m_handlers.splice(t,1)},e.onInited=function(t){e.s_onInitedHandlers.push(t),e.s_instance&&t(e.s_instance)},e.prototype.dispatchMessage=function(e){if("number"===typeof e.id){var t=this.m_promiseResolver[e.id];if(t)return t(e),void delete this.m_promiseResolver[e.id]}for(var n=0;n0},e._getLocalDocumentUrlPrefixLength=function(e){for(var t=["http://document.localhost","https://document.localhost","//document.localhost"],n=e.toLowerCase().trim(),r=0;r0){var i=t.url.substr(o+1),a=e._parseRequestFlagsAndCustomDataFromQueryStringIfAny(i);a.flags>=0&&(n=a.flags),r=a.customData}}return c.buildRequestMessageSafeArray(r,n,t.method,t.url,t.headers,e._getRequestBodyText(t))},e._parseHttpResponseHeaders=function(t){var n={};if(!e.isNullOrEmptyString(t))for(var r=new RegExp("\r?\n"),o=t.split(r),i=0;i0){var c=a.substr(0,s),l=a.substr(s+1);c=e.trim(c),l=e.trim(l),n[c.toUpperCase()]=l}}}return n},e._parseErrorResponse=function(t){var n=e._parseErrorResponseBody(t),r=t.statusCode.toString();if(e.isNullOrUndefined(n)||"object"!==typeof n||!n.error)return e._createDefaultErrorResponse(r);var o=n.error,i=o.innerError;return i&&i.code?e._createErrorResponse(i.code,r,i.message):o.code?e._createErrorResponse(o.code,r,o.message):e._createDefaultErrorResponse(r)},e._parseErrorResponseBody=function(t){if(e.isPlainJsonObject(t.body))return t.body;if(!e.isNullOrEmptyString(t.body)){var n=e.trim(t.body);try{return JSON.parse(n)}catch(t){e.log("Error when parse "+n)}}},e._createDefaultErrorResponse=function(t){return{errorCode:i.connectionFailure,errorMessage:e._getResourceString(a.connectionFailureWithStatus,t)}},e._createErrorResponse=function(t,n,r){return{errorCode:t,errorMessage:e._getResourceString(a.connectionFailureWithDetails,[n,t,r])}},e._copyHeaders=function(e,t){if(e&&t)for(var n in e)t[n]=e[n]},e.addResourceStringValues=function(t){for(var n in t)e.s_resourceStringValues[n]=t[n]},e._logEnabled=!1,e.s_resourceStringValues={ApiNotFoundDetails:"The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",ConnectionFailureWithStatus:"The request failed with status code of {0}.",ConnectionFailureWithDetails:"The request failed with status code of {0}, error code {1} and the following error message: {2}",InvalidArgument:"The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",InvalidObjectPath:'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',InvalidRequestContext:"Cannot use the object across different request contexts.",Timeout:"The operation has timed out.",ValueNotLoaded:'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'},e}();e.CoreUtility=l;var u=function(){function e(){}return e.setMock=function(t){e.s_isMock=t},e.isMock=function(){return e.s_isMock},e._setCurrentTestName=function(t){e.s_currentTestName=t,e.s_currentTestSequenceId=0},e._getCurrentTestNameWithSequenceId=function(){return e.s_currentTestName?(e.s_currentTestSequenceId++,e.s_currentTestName+"."+e.s_currentTestSequenceId):null},e}();e.TestUtility=u,e._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!0,enableUndoableFlag:!0,appendTypeNameToObjectPathInfo:!1,enablePreviewExecution:!1},e.config={extendedErrorLogging:!1};var d=function(){function t(){}return t.createSetPropertyAction=function(t,n,r,o,i){C.validateObjectPath(n);var a={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:n._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[o],c=C.setMethodArguments(t,a.ArgumentInfo,s);C.validateReferencedObjectPaths(c);var l=new p(a,0,i);if(l.referencedObjectPath=n._objectPath,l.referencedArgumentObjectPaths=c,e._internalConfig.enablePreviewExecution&&0!==(16&i)){var u={Id:t._nextId(),ActionType:4,Name:r,ObjectId:"",ObjectType:"",Arguments:[o]};n._addPreviewExecutionAction(u)}return n._addAction(l)},t.createQueryAction=function(e,t,n,r){C.validateObjectPath(t);var o={Id:e._nextId(),ActionType:2,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},i=new p(o,1,4);return i.referencedObjectPath=t._objectPath,t._addAction(i,r)},t.createQueryAsJsonAction=function(e,t,n,r){C.validateObjectPath(t);var o={Id:e._nextId(),ActionType:7,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},i=new p(o,1,4);return i.referencedObjectPath=t._objectPath,t._addAction(i,r)},t.createUpdateAction=function(e,t,n){C.validateObjectPath(t);var r={Id:e._nextId(),ActionType:9,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},o=new p(r,0,0);return o.referencedObjectPath=t._objectPath,t._addAction(o)},t}();e.CommonActionFactory=d;var f=function(){function t(e,t){this.m_contextBase=e,this.m_objectPath=t}return Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_context",{get:function(){return this.m_contextBase},enumerable:!0,configurable:!0}),t.prototype._addAction=function(e,t){var n=this;return void 0===t&&(t=null),l.createPromise((function(r,o){n._context._addServiceApiAction(e,t,r,o)}))},t.prototype._addPreviewExecutionAction=function(e){},t.prototype._retrieve=function(t,n){var r=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;r||(r=!C.isSetSupported("RichApiRuntime","1.1"));var o=m._parseQueryOption(t);return r?d.createQueryAction(this._context,this,o,n):d.createQueryAsJsonAction(this._context,this,o,n)},t.prototype._recursivelyUpdate=function(t){var n=e._internalConfig.alwaysPolyfillClientObjectUpdateMethod;n||(n=!C.isSetSupported("RichApiRuntime","1.2"));try{var o=this[S.scalarPropertyNames];o||(o=[]);var s=this[S.scalarPropertyUpdateable];if(!s){s=[];for(var c=0;c=0){if(!s[g])throw new r.RuntimeError({code:i.invalidArgument,httpStatusCode:400,message:l._getResourceString(A.attemptingToSetReadOnlyProperty,m),debugInfo:{errorLocation:m}});f[m]=t[m],++h}else{if(!(u.indexOf(m)>=0))throw new r.RuntimeError({code:i.invalidArgument,httpStatusCode:400,message:l._getResourceString(A.propertyDoesNotExist,m),debugInfo:{errorLocation:m}});p[m]=t[m]}}if(h>0)if(n)for(c=0;c0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(o,a,".")});t.Top=s}else if("$skip"===a){if("number"!==typeof s||n.length>0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(o,a,".")});t.Skip=s}else if("boolean"===typeof s)s&&t.Select.push(e.combineQueryPath(n,a,"/"));else{if("object"!==typeof s)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(o,a,".")});e.parseStrictLoadOptionHelper(t,e.combineQueryPath(n,a,"/"),e.combineQueryPath(o,a,"."),s)}}},e}();e.ClientRequestContextBase=m;var g=function(){function e(e){this.m_objectPath=e}return e.prototype._handleResult=function(e){l.isNullOrUndefined(e)?this.m_objectPath._updateAsNullObject():this.m_objectPath.updateUsingObjectData(e,null)},e}(),y=function(){function t(e){this.m_contextBase=e,this.m_actions=[],this.m_actionResultHandler={},this.m_referencedObjectPaths={},this.m_instantiatedObjectPaths={},this.m_preSyncPromises=[],this.m_previewExecutionActions=[]}return t.prototype.addAction=function(e){this.m_actions.push(e),1==e.actionInfo.ActionType&&(this.m_instantiatedObjectPaths[e.actionInfo.ObjectPathId]=e)},t.prototype.addPreviewExecutionAction=function(e){this.m_previewExecutionActions.push(e)},Object.defineProperty(t.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.ensureInstantiateObjectPath=function(e){if(e){if(this.m_instantiatedObjectPaths[e.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(e.parentObjectPath),this.ensureInstantiateObjectPaths(e.argumentObjectPaths),!this.m_instantiatedObjectPaths[e.objectPathInfo.Id]){var t={Id:this.m_contextBase._nextId(),ActionType:1,Name:"",ObjectPathId:e.objectPathInfo.Id},n=new p(t,1,4);n.referencedObjectPath=e,this.addReferencedObjectPath(e),this.addAction(n);var r=new g(e);this.addActionResultHandler(n,r)}}},t.prototype.ensureInstantiateObjectPaths=function(e){if(e)for(var t=0;t0&&(l.PreviewExecutionActions=this.m_previewExecutionActions,n|=4096),{body:l,flags:n}},t.prototype.processResponse=function(e){if(e)for(var t=0;t=0;t--){var n=this.m_actions[t].actionInfo;if(n.ObjectPathId===e&&3===n.ActionType&&n.Name===S.keepReference){this.m_actions.splice(t,1);break}}},t._updateLastUsedActionIdOfObjectPathId=function(e,n,r){for(;n;){if(e[n.objectPathInfo.Id])return;e[n.objectPathInfo.Id]=r;var o=n.argumentObjectPaths;if(o)for(var i=o.length,a=0;a=0;--o){var i=(f=e[o]).actionInfo.Id;f.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(n,f.referencedObjectPath,i);var a=f.referencedArgumentObjectPaths;if(a)for(var s=a.length,c=0;c0?f.actionInfo.L=p:f.actionInfo.L&&delete f.actionInfo.L}},t}();e.ClientRequestBase=y;var v=function(){function e(e){this.m_type=e}return Object.defineProperty(e.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new r.RuntimeError({code:i.valueNotLoaded,httpStatusCode:400,message:l._getResourceString(a.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),e.prototype._handleResult=function(e){this.m_isLoaded=!0,"object"===typeof e&&e&&e._IsNull||(1===this.m_type?this.m_value=C.adjustToDateTime(e):this.m_value=e)},e}();e.ClientResult=v;var O=function(){function e(e){this.m_context=e,this.m_actions=[]}return e.prototype.add=function(e,t,n,r){var o=this;this.m_actions.push({action:e,resultHandler:t,resolve:n,reject:r}),1===this.m_actions.length&&setTimeout((function(){return o.processActions()}),0)},e.prototype.processActions=function(){var e=this;if(0!==this.m_actions.length){var t=this.m_actions;this.m_actions=[];for(var n=new y(this.m_context),r=0;r=65&&e.charCodeAt(t)<=90;)t++;return t0?".":"")+n;break;case 3:n=t.normalizeName(e.objectPathInfo.Name)+"()"+(n.length>0?".":"")+n;break;case 4:n=t.normalizeName(e.objectPathInfo.Name)+(n.length>0?".":"")+n;break;case 5:n="getItem()"+(n.length>0?".":"")+n;break;case 6:n="_reference()"+(n.length>0?".":"")+n}e=e.parentObjectPath}return n},t.setMethodArguments=function(e,n,r){if(l.isNullOrUndefined(r))return null;var o=new Array,i=new Array,a=t.collectObjectPathInfos(e,r,o,i);return n.Arguments=r,a&&(n.ReferencedObjectPathIds=i),o},t.validateContext=function(e,t){if(e&&t&&t._context!==e)throw new r.RuntimeError({code:i.invalidRequestContext,httpStatusCode:400,message:l._getResourceString(a.invalidRequestContext)})},t.isSetSupported=function(e,n){return"function"===typeof t.isSetSupportedOverride?t.isSetSupportedOverride(e,n):!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)||window.Office.context.requirements.isSetSupported(e,n)},t.throwIfApiNotSupported=function(e,n,o,s){if(t._doApiNotSupportedCheck&&!t.isSetSupported(n,o)){var c=l._getResourceString(a.apiNotFoundDetails,[e,n+" "+o,s]);throw new r.RuntimeError({code:i.apiNotFound,httpStatusCode:404,message:c,debugInfo:{errorLocation:e}})}},t.calculateApiFlags=function(e,n,r){var o=window&&window.location&&window.location.href&&-1!==window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc");return("function"===typeof t.isSetSupportedOverride?t.isSetSupportedOverride(n,r):!o&&t.isSetSupported(n,r))||(e&=-3),e},t._parseSelectExpand=function(e){var t=[];if(!l.isNullOrEmptyString(e))for(var n=e.split(","),r=0;r0&&t.push(o)}return t;function i(e){var t=e.toLowerCase();if("items"===t||"items/"===t)return"*";return("items/"===t.substr(0,6)||"items."===t.substr(0,6))&&(e=e.substr(6)),e.replace(new RegExp("[/.]items[/.]","gi"),"/")}},t.changePropertyNameToCamelLowerCase=function(e){if(Array.isArray(e)){for(var n=[],r=0;r=0){var a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!0),s=a.processForDebugStatementInfo(n.Body.Error.ActionIndex);i={statement:s.statement,surroundingStatements:s.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},e.config.extendedErrorLogging&&(a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!1),i.fullStatements=a.process())}var c=null;if(n.Body.Results?c=n.Body.Results:n.Body.ProcessedResults&&n.Body.ProcessedResults.Results&&(c=n.Body.ProcessedResults.Results),c){this._processingResult=!0;try{t.processResponse(c)}finally{this._processingResult=!1}}}if(!Z.isNullOrEmptyString(n.ErrorCode))return new r.RuntimeError({code:n.ErrorCode,httpStatusCode:n.HttpStatusCode,message:n.ErrorMessage,traceMessages:o,data:{responseBody:n.RawErrorResponseBody}});if(n.Body&&n.Body.Error){var l={errorLocation:n.Body.Error.Location};return i&&(l.statement=i.statement,l.surroundingStatements=i.surroundingStatements,l.fullStatements=i.fullStatements),new r.RuntimeError({code:n.Body.Error.Code,httpStatusCode:n.Body.Error.HttpStatusCode,message:n.Body.Error.Message,traceMessages:o,debugInfo:l})}return null},o.prototype.processPendingEventHandlers=function(e){for(var t=Z._createPromiseFromResult(null),n=0;n0)if(o.isValidRequestInfo(n[0]))f=n[0],h=1;else if(Z.isPlainJsonObject(n[0])){if(null!=(f=(m=n[0]).session)&&!o.isValidRequestInfo(f))return o.createErrorPromise(t);p=m.previousObjects,h=1}if(n.length==h+1)d=n[h+0];else{if(null!=m||n.length!=h+2)return o.createErrorPromise(t);p=n[h+0],d=n[h+1]}if(null!=p)if(p instanceof k)u=function(){return p.context};else if(p instanceof o)u=function(){return p};else{if(!Array.isArray(p))return o.createErrorPromise(t);var g=p;if(0==g.length)return o.createErrorPromise(t);for(var y=0;y0&&h._onRunFinishedNotifiers.shift()();if(v)return m;throw m}))},o}(m);e.ClientRequestContext=U;var L=function(){function e(e,t){this.m_proxy=e,this.m_shouldPolyfill=t;var n=e[H.scalarPropertyNames],r=e[H.navigationPropertyNames],o=e[H.className],i=e[H.isCollection];if(n)for(var a=0;a=0;s--)if(o[s]===r[i].handler){o.splice(s,1);break}break;case 2:o=[]}return a&&(!this.m_registered&&o.length>0?n=n.then((function(){return t.m_eventInfo.registerFunc(t.m_callback)})).then((function(){return t.m_registered=!0})):this.m_registered&&0==o.length&&(n=n.then((function(){return t.m_eventInfo.unregisterFunc(t.m_callback)})).catch((function(e){l.log("Error when unregister event: "+JSON.stringify(e))})).then((function(){return t.m_registered=!1}))),n=n.then((function(){return t.m_handlers=o}))),n},e.prototype.fireEvent=function(e){for(var t=[],n=0;n0},e.prototype.register=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});var o=this.getHandlers(e,t);return o.push(n),1===o.length?this.m_registerEventImpl(e,t):Z._createPromiseFromResult(null)},e.prototype.unregister=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var o=this.getHandlers(e,t),i=o.length-1;i>=0;i--)if(o[i]===n){o.splice(i,1);break}return 0===o.length?this.m_unregisterEventImpl(e,t):Z._createPromiseFromResult(null)},e}();e.EventRegistration=V;var q=function(){function e(){this.m_eventRegistration=new V(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this)),this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return e.prototype.ready=function(){var t=this;return this.m_ready||(e._testReadyImpl?this.m_ready=e._testReadyImpl().then((function(){t.m_isReady=!0})):o.instance?this.m_ready=Z._createPromiseFromResult(null).then((function(){t.m_isReady=!0})):this.m_ready=r.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then((function(){t.m_isReady=!0}))),this.m_ready},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.register(e,t,n)}))},e.prototype.unregister=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.unregister(e,t,n)}))},e.prototype._registerEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._unregisterEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._handleRichApiMessage=function(e){if(e&&e.entries)for(var t=0;t=0;o--)if(r[o]===e){r.splice(o,1);break}0==r.length&&q.getGenericEventRegistration(n).unregister(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)}))},t.prototype.removeAll=function(){},t}(W);e.GenericEventHandlers=z;var J=function(){function e(e){this.m_clientObject=e}return e.prototype._handleResult=function(e){this.m_clientObject._handleIdResult(e)},e}(),K=function(){function e(){}return e.createGlobalObjectObjectPath=function(e){var t={Id:e._nextId(),ObjectPathType:1,Name:""};return new h(t,null,!1,!1,1,4)},e.createNewObjectObjectPath=function(e,t,n,r){var o={Id:e._nextId(),ObjectPathType:2,Name:t};return new h(o,null,n,!1,1,Z._fixupApiFlags(r))},e.createPropertyObjectPath=function(e,t,n,r,o,i){var a={Id:e._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id};return new h(a,t._objectPath,r,o,1,Z._fixupApiFlags(i))},e.createIndexerObjectPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new h(r,t._objectPath,!1,!1,1,4)},e.createIndexerObjectPathUsingParentPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new h(r,t,!1,!1,1,4)},e.createMethodObjectPath=function(e,t,n,r,o,i,a,s,c){var l={Id:e._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u=Z.setMethodArguments(e,l.ArgumentInfo,o),d=new h(l,t._objectPath,i,a,r,Z._fixupApiFlags(c));return d.argumentObjectPaths=u,d.getByIdMethodName=s,d},e.createReferenceIdObjectPath=function(e,t){var n={Id:e._nextId(),ObjectPathType:6,Name:t,ArgumentInfo:{}};return new h(n,null,!1,!1,1,4)},e.createChildItemObjectPathUsingIndexerOrGetItemAt=function(t,n,r,o,i){var a=Z.tryGetObjectIdFromLoadOrRetrieveResult(o);return t&&!Z.isNullOrUndefined(a)?e.createChildItemObjectPathUsingIndexer(n,r,o):e.createChildItemObjectPathUsingGetItemAt(n,r,o,i)},e.createChildItemObjectPathUsingIndexer=function(e,t,n){var r=Z.tryGetObjectIdFromLoadOrRetrieveResult(n),o=o={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=[r],new h(o,t._objectPath,!1,!1,1,4)},e.createChildItemObjectPathUsingGetItemAt=function(e,t,n,r){var o=n[H.index];o&&(r=o);var i={Id:e._nextId(),ObjectPathType:3,Name:H.getItemAt,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return i.ArgumentInfo.Arguments=[r],new h(i,t._objectPath,!1,!1,1,4)},e}();e.ObjectPathFactory=K;var Q=function(){function t(e){this.m_context=e}return t.prototype.executeAsync=function(n,r,o){var i=this,a=c.buildMessageArrayForIRequestExecutor(n,r,o,t.SourceLibHeaderValue);return new e.Promise((function(e,t){OSF.DDA.RichApi.executeRichApiRequestAsync(a,(function(t){var n;l.log("Response:"),l.log(JSON.stringify(t)),"succeeded"==t.status?n=c.buildResponseOnSuccess(c.getResponseBody(t),c.getResponseHeaders(t)):(n=c.buildResponseOnError(t.error.code,t.error.message),i.m_context._processOfficeJsErrorResponse(t.error.code,n)),e(n)}))}))},t.SourceLibHeaderValue="officejs",t}(),X=function(){function e(e){this._autoCleanupList={},this.m_context=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._addCommon(e,!0)})):this._addCommon(e,!0)},e.prototype._autoAdd=function(e){this._addCommon(e,!1),this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e},e.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(e,t){this.m_context._autoCleanup&&!e[H.isTracked]&&e!==this.m_context._rootObject&&t&&!Z.isNullOrEmptyString(t[H.referenceId])&&(this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e,e[H.isTracked]=!0)},e.prototype._addCommon=function(e,t){if(e[H.isTracked])t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id];else{var n=e[H.referenceId];if(e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName])throw Z.createRuntimeError(i.generalException,l._getResourceString($.objectIsUntracked),null);Z.isNullOrEmptyString(n)&&e._KeepReference&&(e._KeepReference(),w.createInstantiateAction(this.m_context,e),t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id],e[H.isTracked]=!0)}},e.prototype.remove=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._removeCommon(e)})):this._removeCommon(e)},e.prototype._removeCommon=function(e){e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName]=!0,e.context._pendingRequest._removeKeepReferenceAction(e._objectPath.objectPathInfo.Id);var t=e[H.referenceId];if(!Z.isNullOrEmptyString(t)){var n=this.m_context._rootObject;n._RemoveReference&&n._RemoveReference(t)}delete e[H.isTracked]},e.prototype._retrieveAndClearAutoCleanupList=function(){var e=this._autoCleanupList;return this._autoCleanupList={},e},e}();e.TrackedObjects=X;var Y=function(){function t(e,t,n,r,o){e||(e="root"),this.m_globalObjName=e,this.m_referencedObjectPaths=t,this.m_actions=n,this.m_statements=[],this.m_variableNameForObjectPathMap={},this.m_variableNameToObjectPathMap={},this.m_declaredObjectPathMap={},this.m_showDispose=r,this.m_removePII=o}return t.prototype.process=function(){this.m_showDispose&&B._calculateLastUsedObjectPathIds(this.m_actions);for(var e=0;e=0&&this.m_statements.length>t+5+1));n++);if(t<0)return null;var r=t-5;r<0&&(r=0);var o=t+1+5;o>this.m_statements.length&&(o=this.m_statements.length);var i=[];0!=r&&i.push("...");for(var a=r;a>>>>"),i.push(this.m_statements[t]),i.push("// <<<<<");for(var s=t+1;s0)return e+" // And then dispose {"+r.map((function(e){return n.getObjVarName(e)})).join(", ")+"}"}return e},t.prototype.buildQueryExpression=function(e){if(e.actionInfo.QueryInfo){var t={};return t.select=e.actionInfo.QueryInfo.Select,t.expand=e.actionInfo.QueryInfo.Expand,t.skip=e.actionInfo.QueryInfo.Skip,t.top=e.actionInfo.QueryInfo.Top,"undefined"===typeof t.top&&"undefined"===typeof t.skip&&"undefined"===typeof t.expand?"undefined"===typeof t.select?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(e){return(5==e.objectPathInfo.ObjectPathType||3==e.objectPathInfo.ObjectPathType||4==e.objectPathInfo.ObjectPathType)&&e.objectPathInfo.ParentObjectPathId?this.getObjVarName(e.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(e):this.buildObjectPathExpression(e)},t.prototype.buildObjectPathExpression=function(e){var t=this.buildObjectPathInfoExpression(e.objectPathInfo),n=e.originalObjectPathInfo;return n&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(n)+" */"),t},t.prototype.buildObjectPathInfoExpression=function(e){switch(e.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 3:return Z._toCamelLowerCase(e.Name)+"("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 2:return e.Name+".newObject()";case 7:return"null";case 4:return Z._toCamelLowerCase(e.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(e.Name)+")"}},t.prototype.buildArgumentsExpression=function(e){var t="";if(!e.Arguments||0===e.Arguments.length)return t;if(this.m_removePII)return"undefined"===typeof e.Arguments[0]?t:"...";for(var n=0;n0&&(t+=", "),t+=this.buildArgumentLiteral(e.Arguments[n],e.ReferencedObjectPathIds?e.ReferencedObjectPathIds[n]:null);return"undefined"===t&&(t=""),t},t.prototype.buildArgumentLiteral=function(e,t){return"number"==typeof e&&e===t?this.getObjVarName(t):JSON.stringify(e)},t.prototype.getObjVarNameBase=function(e){var t="v",n=this.m_referencedObjectPaths[e];if(n)switch(n.objectPathInfo.ObjectPathType){case 1:t=this.m_globalObjName;break;case 4:t=Z._toCamelLowerCase(n.objectPathInfo.Name);break;case 3:var r=n.objectPathInfo.Name;r.length>3&&"Get"===r.substr(0,3)&&(r=r.substr(3)),t=Z._toCamelLowerCase(r);break;case 5:var o=this.getObjVarNameBase(n.objectPathInfo.ParentObjectPathId);t="s"===o.charAt(o.length-1)?o.substr(0,o.length-1):o+"Item"}return t},t.prototype.getObjVarName=function(e){if(this.m_variableNameForObjectPathMap[e])return this.m_variableNameForObjectPathMap[e];var t=this.getObjVarNameBase(e);if(!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t;for(var n=1;this.m_variableNameToObjectPathMap[t+n.toString()];)n++;return t+=n.toString(),this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t},t}(),$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.cannotRegisterEvent="CannotRegisterEvent",t.connectionFailureWithStatus="ConnectionFailureWithStatus",t.connectionFailureWithDetails="ConnectionFailureWithDetails",t.propertyNotLoaded="PropertyNotLoaded",t.runMustReturnPromise="RunMustReturnPromise",t.moreInfoInnerError="MoreInfoInnerError",t.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",t.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",t.objectIsUntracked="ObjectIsUntracked",t.customFunctionDefintionMissing="CustomFunctionDefintionMissing",t.customFunctionImplementationMissing="CustomFunctionImplementationMissing",t.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",t.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",t.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",t.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",t.customFunctionInvalidFunction="CustomFunctionInvalidFunction",t.customFunctionInvalidFunctionMapping="CustomFunctionInvalidFunctionMapping",t.customFunctionWindowMissing="CustomFunctionWindowMissing",t.customFunctionDefintionMissingOnWindow="CustomFunctionDefintionMissingOnWindow",t.pendingBatchInProgress="PendingBatchInProgress",t.notInsideBatch="NotInsideBatch",t.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",t}(A);e.ResourceStrings=$,l.addResourceStringValues({CannotRegisterEvent:"The event handler cannot be registered.",PropertyNotLoaded:"The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",RunMustReturnPromise:'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',InvalidOrTimedOutSessionMessage:"Your Office Online session has expired or is invalid. To continue, refresh the page.",InvalidOperationInCellEditMode:"Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",InvalidSheetName:"The request cannot be processed because the specified worksheet cannot be found. Please try again.",CustomFunctionDefintionMissing:"A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.",CustomFunctionDefintionMissingOnWindow:"A property with the name '{0}' that represents the function's definition must exist on the window object.",CustomFunctionImplementationMissing:"The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",CustomFunctionNameContainsBadChars:"The function name may only contain letters, digits, underscores, and periods.",CustomFunctionNameCannotSplit:"The function name must contain a non-empty namespace and a non-empty short name.",CustomFunctionUnexpectedNumberOfEntriesInResultBatch:"The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",CustomFunctionCancellationHandlerMissing:"The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",CustomFunctionInvalidFunction:"The property with the name '{0}' that represents the function's definition is not a valid function.",CustomFunctionInvalidFunctionMapping:"The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.",CustomFunctionWindowMissing:"The window object was not found.",PendingBatchInProgress:"There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",NotInsideBatch:"Operations may not be invoked outside of a batch method.",CannotUpdateReadOnlyProperty:"The property '{0}' is read-only and it cannot be updated.",ObjectIsUntracked:"The object is untracked."});var Z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.fixObjectPathIfNecessary=function(e,t){e&&e._objectPath&&t&&e._objectPath.updateUsingObjectData(t,e)},n.load=function(e,t){return e.context.load(e,t),e},n.loadAndSync=function(e,t){return e.context.load(e,t),e.context.sync().then((function(){return e}))},n.retrieve=function(t,r){var o=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;o||(o=!n.isSetSupported("RichApiRuntime","1.1"));var i=new L(t,o);return t._retrieve(r,i),i},n.retrieveAndSync=function(e,t){var r=n.retrieve(e,t);return e.context.sync().then((function(){return r}))},n.toJson=function(e,t,r,o){var i={};for(var a in t){"undefined"!==typeof(s=t[a])&&(i[a]=s)}for(var a in r){var s;"undefined"!==typeof(s=r[a])&&(s[n.fieldName_isCollection]&&"undefined"!==typeof s[n.fieldName_m__items]?i[a]=s.toJSON().items:i[a]=s.toJSON())}return o&&(i.items=o.map((function(e){return e.toJSON()}))),i},n.throwError=function(e,t,n){throw new r.RuntimeError({code:e,httpStatusCode:400,message:l._getResourceString(e,t),debugInfo:n?{errorLocation:n}:void 0})},n.createRuntimeError=function(e,t,n,o,i){return new r.RuntimeError({code:e,httpStatusCode:o,message:t,debugInfo:{errorLocation:n},data:i})},n.throwIfNotLoaded=function(e,t,r,o){if(!o&&l.isUndefined(t)&&e.charCodeAt(0)!=n.s_underscoreCharCode&&!n.s_suppressPropertyNotLoadedException)throw n.createPropertyNotLoadedException(r,e)},n._getPropertyValueWithoutCheckLoaded=function(e,t){n.s_suppressPropertyNotLoadedException=!0;try{return e[t]}finally{n.s_suppressPropertyNotLoadedException=!1}},n.createPropertyNotLoadedException=function(e,t){return new r.RuntimeError({code:x.propertyNotLoaded,httpStatusCode:400,message:l._getResourceString($.propertyNotLoaded,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.createCannotUpdateReadOnlyPropertyException=function(e,t){return new r.RuntimeError({code:x.cannotUpdateReadOnlyProperty,httpStatusCode:400,message:l._getResourceString($.cannotUpdateReadOnlyProperty,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.promisify=function(t){return new e.Promise((function(e,n){t((function(t){"failed"==t.status?n(t.error):e(t.value)}))}))},n._addActionResultHandler=function(e,t,n){e.context._pendingRequest.addActionResultHandler(t,n)},n._handleNavigationPropertyResults=function(e,t,n){for(var r=0;r0;)e.push(0),n--},t.prototype.getString=function(e){return"number"===typeof e?e>0?this.m_strings[e-1]:null:e},t.prototype.buildEnumType=function(e){var t;if(Array.isArray(e)){(t={name:e[0],fields:e[2]}).fields||(t.fields={});var n=e[1];if(Array.isArray(n))for(var r=0;rn)return!1;return!0},t.prototype.evaluateEventType=function(t){if(Z.isNullOrEmptyString(t))return 0;if(this.isAllDigits(t))return parseInt(t);var n=this.resolveObjectByFullName(t);if("number"!==typeof n)throw new e.Error("Invalid event type: "+t);return n},t.prototype.buildPrototype=function(e,t){this.buildScalarProperties(e,t),this.buildNavigationProperties(e,t),this.buildScalarMethods(e,t),this.buildNavigationMethods(e,t),this.buildEvents(e,t),this.buildHandleResult(e,t),this.buildHandleIdResult(e,t),this.buildHandleRetrieveResult(e,t),this.buildLoad(e,t),this.buildRetrieve(e,t),this.buildSetMockData(e,t),this.buildEnsureUnchanged(e,t),this.buildUpdate(e,t),this.buildSet(e,t),this.buildToJSON(e,t),this.buildItems(e,t),this.buildTypeMetadataInfo(e,t),this.buildTrackUntrack(e,t),this.buildMixin(e,t)},t.prototype.toSimpleCamelUpperCase=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)},t.prototype.ensureOriginalName=function(e){null===e.originalName&&(e.originalName=this.toSimpleCamelUpperCase(e.name))},t.prototype.getFieldName=function(e){return"m_"+e.name},t.prototype.throwIfApiNotSupported=function(e,t){if(this.m_apiSets&&t.apiSetInfoOrdinal>0){var n=this.m_apiSets[t.apiSetInfoOrdinal-1];n&&Z.throwIfApiNotSupported(e.name+"."+t.name,n.name,n.version,this.m_hostName)}},t.prototype.buildScalarProperties=function(e,t){if(Array.isArray(t.scalarProperties))for(var n=0;n0){var n=this.m_apiSets[t-1];n&&(e=C.calculateApiFlags(e,n.name,n.version))}return e},t.prototype.buildScalarProperty=function(e,n,r){this.ensureOriginalName(r);var o=this,i=this.getFieldName(r),a={get:function(){return Z.throwIfNotLoaded(r.name,this[i],n.name,this._isNull),o.throwIfApiNotSupported(n,r),this[i]},enumerable:!0,configurable:!0};0===(2&r.behaviorFlags)&&(a.set=function(e){if(4&r.behaviorFlags&&o.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName+"_Set").call(this,this,e).handled)return;this[i]=e;var a=o.calculateApiFlags(r.setMethodApiFlags,r.undoableApiSetInfoOrdinal);ee.invokeSetProperty(this,r.originalName,e,a)}),Object.defineProperty(e.prototype,r.name,a)},t.prototype.buildNavigationProperties=function(e,t){if(Array.isArray(t.navigationProperties))for(var n=0;n0){for(var i=0;i0){for(var i=0;i0&&(Object.defineProperty(e.prototype,"_scalarPropertyNames",{get:function(){return this.m__scalarPropertyNames||(this.m__scalarPropertyNames=t.scalarProperties.map((function(e){return e.name}))),this.m__scalarPropertyNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyOriginalNames",{get:function(){return this.m__scalarPropertyOriginalNames||(this.m__scalarPropertyOriginalNames=t.scalarProperties.map((function(e){return e.originalName}))),this.m__scalarPropertyOriginalNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyUpdateable",{get:function(){return this.m__scalarPropertyUpdateable||(this.m__scalarPropertyUpdateable=t.scalarProperties.map((function(e){return 0===(2&e.behaviorFlags)}))),this.m__scalarPropertyUpdateable},enumerable:!0,configurable:!0})),t.navigationProperties&&t.navigationProperties.length>0&&Object.defineProperty(e.prototype,"_navigationPropertyNames",{get:function(){return this.m__navigationPropertyNames||(this.m__navigationPropertyNames=t.navigationProperties.map((function(e){return e.name}))),this.m__navigationPropertyNames},enumerable:!0,configurable:!0})},t.prototype.buildTrackUntrack=function(e,t){2&t.behaviorFlags&&(e.prototype.track=function(){return this.context.trackedObjects.add(this),this},e.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this})},t.prototype.buildMixin=function(e,t){if(4&t.behaviorFlags){var n=this.getFunction(t.name+"Custom");Z.applyMixin(e,n)}},t.prototype.getOnEventName=function(e){return"_"===e[0]?"_on"+e.substr(1):"on"+e},t.prototype.buildEvents=function(e,t){if(t.events)for(var n=0;n0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)&&(n=!0);var r=document.createElement("a");if(r.href=this.m_url,this.m_options.webApplication){var o=ae.embeddingPageOrigin+"="+e+"&"+ae.embeddingPageSessionInfo+"="+this.m_options.sessionKey;0===r.search.length||"?"===r.search?r.search="?"+ae.sessionContext+"="+encodeURIComponent(o):r.search=r.search+"&"+ae.sessionContext+"="+encodeURIComponent(o)}else n?0===r.hash.length||"#"===r.hash?r.hash="#"+t:r.hash=r.hash+"&"+t:0===r.search.length||"?"===r.search?r.search="?"+t:r.search=r.search+"&"+t;return r.href},t.prototype.init=function(){var e=this;window.addEventListener("message",this.m_onMessageHandler);var t=this._getIFrameSrc();return l.createPromise((function(n,r){var o=document.createElement("iframe");if(e.m_options.id&&(o.id=e.m_options.id,o.name=e.m_options.id),o.style.height=e.m_options.height,o.style.width=e.m_options.width,e.m_options.webApplication){var s=document.createElement("form");s.setAttribute("action",t),s.setAttribute("method","post"),s.setAttribute("target",o.name),e.m_options.container.appendChild(s);var c=document.createElement("input");c.setAttribute("type","hidden"),c.setAttribute("name","access_token"),c.setAttribute("value",e.m_options.webApplication.accessToken),s.appendChild(c);var u=document.createElement("input");u.setAttribute("type","hidden"),u.setAttribute("name","access_token_ttl"),u.setAttribute("value",e.m_options.webApplication.accessTokenTtl),s.appendChild(u),e.m_options.container.appendChild(o),s.submit()}else o.src=t,e.m_options.container.appendChild(o);e.m_timeoutId=window.setTimeout((function(){e.close();var t=Z.createRuntimeError(i.timeout,l._getResourceString(a.timeout),"EmbeddedSession.init");r(t)}),e.m_options.timeoutInMilliseconds),e.m_promiseResolver=n}))},t.prototype._invoke=function(e,t,n){this.m_enabled?(oe&&(n=oe(n)),this._sendMessageWithCallback(this.m_id++,e,n,(function(e){ie&&(e=ie(e));var n=e.Error;delete e.Error,t(n||0,e)}))):t(5001,null)},t.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler),window.clearTimeout(this.m_timeoutId),this.m_enabled=!1},t.prototype.getEventRegistration=function(e){return this.m_sessionEventManager||(this.m_sessionEventManager=new V(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},t.prototype._createRequestExecutorOrNull=function(){return new ce(this)},t.prototype._resolveRequestUrlAndHeaderInfo=function(){return l._createPromiseFromResult(null)},t.prototype._registerEventImpl=function(e,t){var n=this;return l.createPromise((function(r,o){n._sendMessageWithCallback(n.m_id++,ne.RegisterEventCommand,{EventId:e,TargetId:t},(function(){r(null)}))}))},t.prototype._unregisterEventImpl=function(e,t){var n=this;return l.createPromise((function(r,o){n._sendMessageWithCallback(n.m_id++,ne.UnregisterEventCommand,{EventId:e,TargetId:t},(function(){r()}))}))},t.prototype._onMessage=function(e){var t=this;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===e.source&&this.m_chosenOrigin===e.origin)){var n=e.data;if(n&&n[ne.CommandKey]===ne.ApiReadyCommand)!this.m_chosenWindow&&this._isValidDescendant(e.source)&&n[ne.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=e.source,this.m_chosenOrigin=e.origin,this._sendMessageWithCallback(this.m_id++,ne.GetAppContextCommand,null,(function(e){t._setupContext(e),window.clearTimeout(t.m_timeoutId),t.m_promiseResolver()})));else if(n&&n[ne.CommandKey]===ne.FireEventCommand){var r=n[ne.ParamsKey],o=r.EventId,i=r.TargetId,a=r.Data;if(this.m_sessionEventManager)for(var s=this.m_sessionEventManager.getHandlers(o,i),c=0;c0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=2){var s=t[n].message[1];s&&(r=a(s)?JSON.parse(s):s)}"undefined"!==typeof OSF&&OSF.AppTelemetry&&OSF.AppTelemetry.CallOnAppActivatedIfPending&&OSF.AppTelemetry.CallOnAppActivatedIfPending(),i.apply(null,[r])}else OfficeExtension.Utility.log("ActionProxy._handleMessage unknown message type "+t[n].messageType)}catch(e){throw function(e){var t=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t}(e);OfficeExtension.Utility.log(t)}(e),e}return OfficeExtension.Utility._createPromiseFromResult(null)}function a(e){return"string"===typeof e&&"{"===e[0]}function s(){try{Microsoft.Office.WebExtension.onReadyInternal().then((function(){return function(){if("undefined"!==typeof OSF&&OSF.DDA&&OSF.DDA.RichApi&&OSF.DDA.RichApi.richApiMessageManager)return(new OfficeExtension.ClientRequestContext).eventRegistration.register(5,"",i)}()})).then((function(){var e=OSF._OfficeAppFactory.getHostInfo();return!0===e.isDialog||"web"===e.hostPlatform&&"word"!==e.hostType&&"excel"!==e.hostType?void 0:function(){var e=new OfficeExtension.ClientRequestContext,t=OfficeCore.AddinInternalService.newObject(e);return e._customData="WacPartition",t.notifyActionHandlerReady(),e.sync()}()}))}catch(e){}}!function(){OfficeExtension.Utility.log("ActionProxy.initOnce"),"undefined"!=typeof e.actions&&function(e){n=e}(e.actions._association),"undefined"!==typeof document&&(document.readyState&&"loading"!==document.readyState?(OfficeExtension.Utility.log("ActionProxy.initOnce: document.readyState is not loading state"),s()):document.addEventListener&&document.addEventListener("DOMContentLoaded",(function(){OfficeExtension.Utility.log("ActionProxy.initOnce: DOMContentLoaded event triggered"),s()}))),OfficeExtension.HostBridge.onInited((function(e){!function(e){e.addHostMessageHandler((function(e){3===e.type&&i(e.message)}))}(e)}))}()}(t||(t={}))}(Office||(Office={})),function(e){!function(e){function t(){var e=new OfficeCore.RequestContext;return"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e._customData="WacPartition"),e}e.areShortcutsInUse=function(e){return __awaiter(this,void 0,void 0,(function(){var n,r,o,i,a;return __generator(this,(function(s){switch(s.label){case 0:return n=t(),r=OfficeCore.ActionService.newObject(n),o=r.areShortcutsInUse(e),[4,n.sync()];case 1:for(s.sent(),i=[],a=0;a0&&Array.isArray(n[0])&&n.length*n[0].length>1500&&d()){var o=Math.max(1,Math.round(1500/n[0].length));e._ValidateArraySize(n.length,n[0].length);for(var i=0;in.length&&(a=n.length-i);var s=e.getRow(i).untrack().getBoundingRect(e.getRow(i+a-1).untrack()).untrack(),c=n.slice(i,i+a);F(s,t,c,null!=r?r:0)}return!0}return!1}function u(e){return OfficeExtension.Utility.isSetSupported("ExcelApi",e.toString())}function d(){return u(1.3)}function f(e){return!("undefined"===typeof window||!window.Office||!window.Office.context)&&window.Office.context.platform===e}e.icons={},["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"].map((function(t,n){var r=o(t);e.icons[r]=[],c[n].map((function(n,i){n=o(n);var a={set:t,index:i};e.icons[r].push(a),e.icons[r][n]=a}))})),function(e){e.NotStarted="notStarted",e.Running="running",e.Succeeded="succeeded",e.Failed="failed"}(i||(i={})),function(e){e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NoContent=204]="NoContent",e[e.HighestSuccessCode=299]="HighestSuccessCode",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout"}(a||(a={})),function(e){e.Close="Session.close",e.CommitChanges="Session.commitChanges",e.Create="Session.resolveRequestUrlAndHeaderInfo",e.Refresh="Session.refreshSession"}(s=e.SessionOperation||(e.SessionOperation={}));var p=function(){function e(e,t,n){var r=void 0===n?{}:n,o=r.persistChanges,i=void 0===o||o,a=r.commitExplicitly,s=void 0===a||a;this.m_requestId="",this.m_workbookUrl=e?this.ensureUrlFormatEndWithSlash(e):"",this.m_requestHeaders=t||{},this.m_persistChanges=i,this.m_commitExplicitly=s}return Object.defineProperty(e.prototype,"requestId",{get:function(){return this.m_requestId},enumerable:!0,configurable:!0}),e.prototype.close=function(){var t=this;if(this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)){var n={method:"POST",url:this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url)+e.CLOSE_SESSION,headers:this.m_requestUrlAndHeaderInfo.headers,body:""};return OfficeExtension.HttpUtility.sendRequest(n).then((function(n){if(n.statusCode!==a.NoContent)throw t.createErrorFromResponseInfo(n,s.Close);for(var r in t.m_requestUrlAndHeaderInfo=null,t.m_requestHeaders)if(r.toLowerCase()===e.WorkbookSessionIdHeaderNameLower){delete t.m_requestHeaders[r];break}}))}return OfficeExtension.Utility._createPromiseFromResult(null)},e.prototype.commitChanges=function(t){var n=this;if(void 0===t&&(t={}),!this.m_commitExplicitly)throw this.createError(a.InternalServerError,"Can not call commitChanges() if commitExplicitly is not set.",s.CommitChanges);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.CommitChanges);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.CommitChanges);var r=this.createCommitChangesRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(r).then((function(r){var o=r.statusCode;if(o===a.Accepted)return n.delay(e.POLL_DELAY).then((function(o){return n.pollResourceLocation(n.getHeaderIgnoreCase(r.headers,e.LOCATION_HEADER),s.CommitChanges,t)})).then((function(e){if(JSON.parse(e.body).status===i.Failed)throw n.createErrorFromResponseInfo(e,s.CommitChanges);return n.parseCooldownTime(e)}));if(o>=a.OK&&o<=a.HighestSuccessCode)return n.parseCooldownTime(r);throw n.createErrorFromResponseInfo(r,s.CommitChanges)}))},e.prototype._resolveRequestUrlAndHeaderInfo=function(t){var n=this;if(void 0===t&&(t={}),this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(this.getHeaderIgnoreCase(this.m_requestHeaders,e.WorkbookSessionIdHeaderNameLower))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);var r=this.createAsyncGraphSessionRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(r).then((function(r){if(n.m_requestId=n.getHeaderIgnoreCase(r.headers,e.REQUEST_ID_HEADER),r.statusCode!==a.Accepted&&r.statusCode!==a.Created)throw n.createErrorFromResponseInfo(r,s.Create);return r.statusCode===a.Created?(n.formatRequestUrlAndHeaderInfo(r),n.m_requestUrlAndHeaderInfo):n.delay(e.POLL_DELAY).then((function(o){return n.pollResourceLocation(n.getHeaderIgnoreCase(r.headers,e.LOCATION_HEADER),s.Create,t)})).then((function(r){var o=JSON.parse(r.body);if(o.status===i.Failed)throw n.createErrorFromResponseInfo(r,s.Create);var a={method:"GET",url:o.resourceLocation,headers:__assign({},t,{Authorization:n.getHeaderIgnoreCase(n.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(a).then((function(e){return n.formatRequestUrlAndHeaderInfo(e),n.m_requestUrlAndHeaderInfo}))}))}))},e.prototype.refreshSession=function(){var e=this;if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.Refresh);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.Refresh);var t=this.createRefreshSessionRequestInfo();return OfficeExtension.HttpUtility.sendRequest(t).then((function(t){if(t.statusCode!=a.NoContent)throw e.createErrorFromResponseInfo(t,s.Refresh);return OfficeExtension.Utility._createPromiseFromResult(null)}))},e.prototype.getHeaderIgnoreCase=function(e,t){var n=Object.keys(e).filter((function(e){return e.toLowerCase()===t.toLowerCase()}));return n.length>0?e[n[0]]:void 0},e.prototype.createCommitChangesRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.COMMIT_CHANGES,r={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,r),OfficeExtension.Utility._copyHeaders(t,r),r[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:r,body:{}}},e.prototype.createAsyncGraphSessionRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.CREATE_SESSION,r={};return OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,r),OfficeExtension.Utility._copyHeaders(t,r),r[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,r[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:r,body:{persistChanges:this.m_persistChanges,commitExplicitly:this.m_commitExplicitly}}},e.prototype.createRefreshSessionRequestInfo=function(){var t=this.getCorrectGraphVersionUrl()+e.REFRESH_SESSION,n={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,n),n[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,{url:t,method:"POST",headers:n,body:{}}},e.prototype.getCorrectGraphVersionUrl=function(){return this.m_workbookUrl.replace(new RegExp("graph.microsoft.com/.*?/"),"graph.microsoft.com/"+e.ASYNC_API_GRAPH_VERSION+"/")},e.prototype.pollResourceLocation=function(t,n,r,o){var s=this;if(void 0===r&&(r={}),void 0===o&&(o=0),o>=e.MAX_POLL_ATTEMPTS)throw this.createError(a.InternalServerError,"Timout while polling for the resource location.",n);var c={method:"GET",url:t,headers:__assign({},r,{Authorization:this.getHeaderIgnoreCase(this.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(c).then((function(c){if(c.statusCode!==a.OK)return s.pollResourceLocation(t,n,r,o+1);switch(JSON.parse(c.body).status){case i.Succeeded:case i.Failed:return c;case i.NotStarted:case i.Running:return s.delay(e.POLL_DELAY).then((function(e){return s.pollResourceLocation(t,n,r,o+1)}));default:throw s.createErrorFromResponseInfo(c,n)}}))},e.prototype.parseCooldownTime=function(t){var n=this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER);return n?1e3*parseInt(n):e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER},e.prototype.formatRequestUrlAndHeaderInfo=function(t){if(t.statusCode!==a.OK&&t.statusCode!==a.Created)throw this.createErrorFromResponseInfo(t,s.Create);var n=JSON.parse(t.body).id,r={};OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,r),r[e.WorkbookSessionIdHeaderName]=n,this.m_requestUrlAndHeaderInfo={url:this.getCorrectGraphVersionUrl(),headers:r}},e.prototype.ensureUrlFormatEndWithSlash=function(e){return"/"!==e.charAt(e.length-1)&&(e+="/"),e},e.prototype.delay=function(e){return new OfficeExtension.CoreUtility.Promise((function(t,n){return setTimeout((function(){return t()}),e)}))},e.prototype.createErrorFromResponseInfo=function(t,n){var r=OfficeExtension.Utility._parseErrorResponse(t),o={retryAfter:this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER),responseBody:OfficeExtension.Utility._parseErrorResponseBody(t)};return OfficeExtension.Utility.createRuntimeError(r.errorCode,r.errorMessage,n,t.statusCode,o)},e.prototype.createError=function(e,t,n){return OfficeExtension.Utility.createRuntimeError(""+e,t,n)},e.WorkbookSessionIdHeaderName="Workbook-Session-Id",e.WorkbookSessionIdHeaderNameLower="workbook-session-id",e.ASYNC_API_GRAPH_VERSION="beta",e.POLL_DELAY=1e4,e.MAX_POLL_ATTEMPTS=10,e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER=1e4,e.LOCATION_HEADER="location",e.AUTHORIZATION_HEADER="authorization",e.REQUEST_ID_HEADER="request-id",e.RETRY_AFTER_HEADER="retry-after",e.PREFER_HEADER="Prefer",e.PREFER_HEADER_VAL="respond-async",e.CONTENT_TYPE_HEADER="Content-Type",e.CONTENT_TYPE_HEADER_VAL="application/json",e.CLOSE_SESSION="closeSession",e.COMMIT_CHANGES="commitChanges",e.CREATE_SESSION="createSession",e.REFRESH_SESSION="refreshSession",e}();e.Session=p;var h=function(t){function n(n){var r=t.call(this,n)||this;return r.m_workbook=_(e.Workbook,r),r._rootObject=r.m_workbook,r._rootObjectPropertyName="workbook",r}return __extends(n,t),n.prototype._processOfficeJsErrorResponse=function(e,t){5004===e&&(t.ErrorCode=W.invalidOperationInCellEditMode,t.HttpStatusCode=400,t.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode))},Object.defineProperty(n.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"runtime",{get:function(){return this.workbook._Runtime},enumerable:!0,configurable:!0}),n}(OfficeCore.RequestContext);e.RequestContext=h;var m=function(){function e(){}return e.enableMacroRecordingEvent=function(e){OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=!0;var t=function(e){return e.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent]="true",e.workbook.onRecordingStateChangedEvent.add((function(e){return OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=e.recording,OfficeExtension.Utility._createPromiseFromResult(null)})),OfficeExtension.Utility._createPromiseFromResult(null)};return void 0!==e&&null!==e?t(e):y((function(e){return t(e)}))},e}();function g(e,t){var n=e;n.delayForCellEdit&&OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")?t._requestFlagModifier|=64:t._requestFlagModifier&=-65,n._makerSafe&&(t._requestFlagModifier|=1024)}function y(t,n){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,(function(t){return new e.RequestContext(t)}),g)}function v(e){var t={BindingColumnCount:e.bindingColumnCount,BindingId:e.bindingId,BindingRowCount:e.bindingRowCount,bindingType:e.bindingType,HasHeaders:e.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function O(e,t){var n;return n=null==e.headers?e.rows:e,void 0===(n=window.OSF.DDA.DataCoercion.coerceData(n,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]))?null:n}function b(e){if(!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version))return!1;var t=window.Office.context.diagnostics.platform.toLowerCase();if("officeonline"===t)return!1;var n=e[t];null==n&&(n=e.general);var r=window.Office.context.diagnostics.version,o=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(r);if(o){var i=parseInt(o[1]),a=parseInt(o[2]),s=parseInt(o[3]);if(i0?i=n.getOffsetRange(r,o):(i=n,a=r,s=o),1===Math.abs(t)?i:i.getBoundingRect(n.getOffsetRange(r*t+a,o*t+s))},t}();e.RangeCustom=M,function(t){t.Range_HandleResult=function(e,t){P(t.isEntireColumn)||(e.m_isEntireColumn=t.isEntireColumn),P(t.isEntireRow)||(e.m_isEntireRow=t.isEntireRow)},t.Range_GetColumnsAfter=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsAfter",n,t.getLastColumn(),0,1)})},t.Range_GetColumnsBefore=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsBefore",n,t.getColumn(0),0,-1)})},t.Range_GetResizedRange=function(e,t,n){return d()?{handled:!1,result:null}:(e._ensureInteger(t,"getResizedRange"),e._ensureInteger(n,"getResizedRange"),{handled:!0,result:(t>=0&&n>=0?e:e.getCell(0,0)).getBoundingRect(e.getLastCell().getOffsetRange(t,n))})},t.Range_GetRowsAbove=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getRowsAbove",n,t.getRow(0),-1,0)})},t.Range_GetRowsBelow=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:this._getAdjacentRange("getRowsBelow",n,t.getLastRow(),1,0)})},t.Range_Formulas_Set=function(e,t){return e.m_formulas=t,l(e,"Formulas",t)?{handled:!0}:{handled:!1}},t.Range_FormulasLocal_Set=function(e,t){return e.m_formulasLocal=t,l(e,"FormulasLocal",t)?{handled:!0}:{handled:!1}},t.Range_FormulasR1C1_Set=function(e,t){return e.m_formulasR1C1=t,l(e,"FormulasR1C1",t)?{handled:!0}:{handled:!1}},t.Range_NumberFormat_Set=function(e,t){return e.m_numberFormat=t,l(e,"NumberFormat",t,T(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_Values_Set=function(e,t){return e.m_values=t,l(e,"Values",t,T(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJson_Set=function(e,t){return e.m_valuesAsJson=t,l(e,"ValuesAsJson",t,T(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJsonLocal_Set=function(e,t){return e.m_valuesAsJsonLocal=t,l(e,"ValuesAsJsonLocal",t,T(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}}}(e._CC||(e._CC={})),function(t){t.SettingCollection_Add=function(n,r,o){return o=t._replaceDateWithStringDate(o),{handled:!0,result:A(e.Setting,n,"Add",0,[r,o],!1,!0,null,0)}},t.SettingCollection_SettingsChanged_EventArgsTransform=function(e,t){return{settings:e}}}(e._CC||(e._CC={})),function(e){function t(e){var t=JSON.stringify(e,(function(e,t){return this[e]instanceof Date?"Date("+this[e].getTime()+")":t}));return e=JSON.parse(t)}e._replaceDateWithStringDate=t,e.Setting_HandleResult=function(e,t){P(t.Value)||(t.Value=function(e){var t=JSON.stringify(e);return e=JSON.parse(t,(function(e,t){var n;return"string"===typeof t&&t&&t.length>6&&"Date("===t.slice(0,5)&&")"===t.slice(-1)&&(n=new Date(parseInt(t.slice(5,-1))))?n:t}))}(t.Value))},e.Setting_Value_Set=function(e,n){if(!E(n)){e.m_value=n;var r=t(n);return F(e,"Value",r,0),{handled:!0}}return{handled:!1}}}(e._CC||(e._CC={}));var w=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.NamedItemCollectionCustom=w,function(e){e.Binding_DataChanged_EventArgsTransform=function(e,t){return{binding:e}},e.Binding_SelectionChanged_EventArgsTransform=function(e,t){return{binding:e,columnCount:t.columnCount,rowCount:t.rowCount,startColumn:t.startColumn,startRow:t.startRow}}}(e._CC||(e._CC={}));var k=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.TableCollectionCustom=k,function(t){t.TableCollection_Changed_EventArgsTransform=function(t,n){var r,o=n;return null==o.valueBefore&&null==o.valueAfter||(r={valueBefore:o.valueBefore,valueAfter:o.valueAfter,valueTypeBefore:o.valueTypeBefore,valueTypeAfter:o.valueTypeAfter,valueAsJsonBefore:o.valueAsJsonBefore,valueAsJsonAfter:o.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:o.changeType,source:o.source,worksheetId:o.worksheetId,tableId:o.tableId,address:o.address,getRange:function(e){return I("TableChangedEventArgs.getRange",C,"1.8",S),e.workbook._GetRangeForEventByReferenceId(o.referenceId)},getRangeOrNullObject:function(e){return I("TableChangedEventArgs.getRangeOrNullObject",C,"1.8",S),e.workbook._GetRangeOrNullObjectForEventByReferenceId(o.referenceId)},details:r}}}(e._CC||(e._CC={})),function(t){t.Table_HandleIdResult=function(e,t){P(t.Id)||(t.Id=t.Id.toString())},t.Table_HandleResult=function(e,t){P(t.Id)||(t.Id=t.Id.toString())},t.Table_Changed_EventArgsTransform=function(t,n){var r,o=n;return null==o.valueBefore&&null==o.valueAfter||(r={valueBefore:o.valueBefore,valueAfter:o.valueAfter,valueTypeBefore:o.valueTypeBefore,valueTypeAfter:o.valueTypeAfter,valueAsJsonBefore:o.valueAsJsonBefore,valueAsJsonAfter:o.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:o.changeType,source:o.source,worksheetId:o.worksheetId,tableId:o.tableId,address:o.address,getRange:function(e){return I("TableChangedEventArgs.getRange",C,"1.8",S),e.workbook._GetRangeForEventByReferenceId(o.referenceId)},getRangeOrNullObject:function(e){return I("TableChangedEventArgs.getRangeOrNullObject",C,"1.8",S),e.workbook._GetRangeOrNullObjectForEventByReferenceId(o.referenceId)},details:r}},t.Table_SelectionChanged_EventArgsTransform=function(t,n){var r=n,o=!r.address||0===r.address.length;return{type:e.EventType.tableSelectionChanged,isInsideTable:!o,worksheetId:r.worksheetId,tableId:t.id,address:r.address}}}(e._CC||(e._CC={}));var N=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ChartCollectionCustom=N,function(t){t.ChartCollection_Add=function(t,n,r,o){if(!(r instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Charts.Add");return{handled:!1,result:null}}}(e._CC||(e._CC={})),function(t){t.Chart_SetData=function(t,n,r){if(!(n instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Chart.setData");return{handled:!1}}}(e._CC||(e._CC={}));var j=function(){function e(){}return e.prototype.load=function(e){return R(this,e),this},e}();e.ChartFillCustom=j;var U=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.VisualCollectionCustom=U,function(e){e.VisualCollection_AgaveVisualUpdate_EventArgsTransform=function(e,t){var n=t;return{type:n.type,payload:n.payload}}}(e._CC||(e._CC={})),function(t){t.Visual_ChangeNotification_EventArgsTransform=function(t,n){var r=n;return{targetId:r.targetId,changeType:r.changeType,payload:r.payload,type:e.EventType.visualChange}}}(e._CC||(e._CC={}));var L=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.PivotTableCollectionCustom=L,function(t){t.PivotLayout_GetColumnLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetColumnLabelRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataBodyRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetDataBodyRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataHierarchy=function(t,n){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:(I("PivotLayout.getDataHierarchy",C,"1.9",S),{handled:!0,result:A(e.DataPivotHierarchy,t,"GetDataHierarchy",0,[n],!1,!1,null,0)})},t.PivotLayout_GetFilterAxisRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetFilterAxisRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRowLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetRowLabelRange",0,[],!1,!1,null,0)}}}(e._CC||(e._CC={})),function(e){e.PivotField_SortByLabels=function(e,t){return"string"===typeof t&&(t="ascending"===t.toLowerCase()),D(e,"SortByLabels",0,[t],0,0),{handled:!0}}}(e._CC||(e._CC={})),function(t){t.NumberFormattingService_GetFormatter=function(t,n){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(I("NumberFormatting.GetFormatter","NumberFormatting","1.1",S),{handled:!0,result:A(e.NumberFormatter,t,"GetFormatter",0,[n],!1,!1,null,0)})}}(e._CC||(e._CC={})),function(e){e.NumberFormatter_Format=function(e,t){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(I("NumberFormatter.Format","NumberFormatting","1.1",S),{handled:!0,result:D(e,"Format",0,[t],0,0)})}}(e._CC||(e._CC={}));var H=function(){function n(){}return n.register=function(n,r){return I("CustomFunctionManager.register","CustomFunctions","1.3",S),t({delayForCellEdit:!0},(function(t){return e.CustomFunctionManager.newObject(t).register(n,r)}))},n.getStatus=function(){return I("CustomFunctionManager.register","CustomFunctions","1.3",S),t({delayForCellEdit:!0},(function(t){var n=e.CustomFunctionManager.newObject(t).load("status");return t.sync().then((function(){return n.status}))}))},n}();e.CustomFunctionManagerCustom=H,function(e){e.CustomFunctionManager_StaticCustomize=function(e){e.register=H.register,e.getStatus=H.getStatus}}(e._CC||(e._CC={})),function(e){e.Style_TextOrientation_Set=function(e,t){return e.m_textOrientation=t,F(e,"Orientation",t,0),{handled:!0}}}(e._CC||(e._CC={})),function(e){e.InternalTest_Test1Event_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}},e.InternalTest_TestEvent_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}}}(e._CC||(e._CC={}));var B=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.CommentCollectionCustom=B;var W,G=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ShapeCollectionCustom=G,function(e){e.accessDenied="AccessDenied",e.apiNotFound="ApiNotFound",e.conflict="Conflict",e.emptyChartSeries="EmptyChartSeries",e.filteredRangeConflict="FilteredRangeConflict",e.formulaLengthExceedsLimit="FormulaLengthExceedsLimit",e.generalException="GeneralException",e.inactiveWorkbook="InactiveWorkbook",e.insertDeleteConflict="InsertDeleteConflict",e.invalidArgument="InvalidArgument",e.invalidBinding="InvalidBinding",e.invalidOperation="InvalidOperation",e.invalidReference="InvalidReference",e.invalidSelection="InvalidSelection",e.itemAlreadyExists="ItemAlreadyExists",e.itemNotFound="ItemNotFound",e.mergedRangeConflict="MergedRangeConflict",e.nonBlankCellOffSheet="NonBlankCellOffSheet",e.notImplemented="NotImplemented",e.openWorkbookLinksBlocked="OpenWorkbookLinksBlocked",e.operationCellsExceedLimit="OperationCellsExceedLimit",e.pivotTableRangeConflict="PivotTableRangeConflict",e.powerQueryRefreshResourceChallenge="PowerQueryRefreshResourceChallenge",e.rangeExceedsLimit="RangeExceedsLimit",e.refreshWorkbookLinksBlocked="RefreshWorkbookLinksBlocked",e.requestAborted="RequestAborted",e.responsePayloadSizeLimitExceeded="ResponsePayloadSizeLimitExceeded",e.unsupportedFeature="UnsupportedFeature",e.unsupportedFillType="UnsupportedFillType",e.unsupportedOperation="UnsupportedOperation",e.unsupportedSheet="UnsupportedSheet",e.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"}(W=e.ErrorCodes||(e.ErrorCodes={})),e.Interfaces||(e.Interfaces={});new OfficeExtension.LibraryBuilder({metadata:{version:"1.0.0",name:"Excel",defaultApiSetName:"ExcelApi",hostName:"Excel",apiSets:[["1.19","ExcelApiUndo"],["1.1","Recorder"],["99.9"],["1.4","ExcelApiUndo"],["1.8"],["1.9"],["1.11"],["1.18"],["1.6"],["1.6","ExcelApiUndo"],["1.7"],["1.1","ExcelApiUndo"],["1.2"],["1.3"],["1.4"],["1.5"],["1.10"],["1.14"],["1.1","ExcelApiOnline"],["1.1","CustomFunctions"],["1.1","WACOperationEvents"],["1.3","ExcelApiUndo"],["1.13"],["1.16"],["1.8","ExcelApiUndo"],["1.16","ExcelApiUndo"],["1.12"],["1.2","ExcelApiOnline"],["1.2","ExcelApiUndo"],["1.17"],["1.7","ExcelApiUndo"],["1.10","ExcelApiUndo"],["1.14","ExcelApiUndo"],["1.15","ExcelApiUndo"],["1.15"],["1.17","ExcelApiUndo"],["99.99","ExcelApiUndo"],["1.9","ExcelApiUndo"],["1.11","ExcelApiUndo"],["1.12","ExcelApiUndo"],["1.13","ExcelApiUndo"],["1.18","ExcelApiUndo"]],strings:[],enumTypes:[["UndoChangeType",["undoAction","redoAction","undoOrRedoCleared","undoGroupAdded"]],["SDX",["guidedReapply"]],["BusinessBarEntryType",[],{officeScriptsRunningStatus:0,msFormsDataSyncRunningStatus:1}],["FormulaReferenceStyle",["a1","r1C1"]],["NavigationObjectType",["table","pivotTable","chart","shape","namedRange"]],["UserActivityType",["none","insertSheet","deleteSheet","renameSheet","changeCell","insertRow","insertColumn","deleteRow","deleteColumn","insertPartialRow","insertPartialColumn","insertPartialColumnRightToLeft","deletePartialRow","deletePartialColumn","deletePartialColumnRightToLeft","move","sort","mergeCells","unmergeCells","unknownOperation","genericEdit"]],["LineageEndOfLogStatus",["loadInProgress","success","endOfLog","purged","trimmed","unsupported","cleared","error"]],["LineageLoadType",["new","next","previous","latest"]],["LoadToType",["connectionOnly","table","pivotTable","pivotChart"]],["QueryError",["unknown","none","failedLoadToWorksheet","failedLoadToDataModel","failedDownload","failedToCompleteDownload"]],["RangeOptimizationType",["other","numberFormat","textAlignment","textProperties","cellBorder","fillColor","sheetProtection","rowHeight","rowVisibility"]],["WorkbookLinksHardToFindMessages",["none","containsDefinedNames","hiddenOrVeryHiddenSheet","hiddenFloatingObjects","lockedFloatingObjectsThroughVba","protectedSheet","containsConditionalFormatting","containsDataValidation","hiddenRowsAndColumns"]],["WorkbookLinksIconState",["ok","moreInfo","warning"]],["WorkbookLinksRefreshSettings",["ask","always","never"]],["WorkbookConditionalFormattingRulesManagerScope",["defaultScope","selectedRange","activatedWorksheet","activatedTable","activatedPivotTable"]],["WorkbookLinksRefreshMode",["manual","automatic"]],["HelpTopic",["showChanges","guidedReapply","externalCodeServiceDiagnostics"]],["DocumentTaskChangeAction",[],{unknown:"unknown",create:"create",assign:"assign",unassign:"unassign",unassignAll:"unassignAll",setSchedule:"setSchedule",setPercentComplete:"setPercentComplete",setPriority:"setPriority",remove:"remove",restore:"restore",setTitle:"setTitle",undo:"undo"}],["DataSourceType",["unknown","cube","localRange","localTable","oledbDefault"]],["DateFilterCondition",["unknown","equals","before","beforeOrEqualTo","after","afterOrEqualTo","between","tomorrow","today","yesterday","nextWeek","thisWeek","lastWeek","nextMonth","thisMonth","lastMonth","nextQuarter","thisQuarter","lastQuarter","nextYear","thisYear","lastYear","yearToDate","allDatesInPeriodQuarter1","allDatesInPeriodQuarter2","allDatesInPeriodQuarter3","allDatesInPeriodQuarter4","allDatesInPeriodJanuary","allDatesInPeriodFebruary","allDatesInPeriodMarch","allDatesInPeriodApril","allDatesInPeriodMay","allDatesInPeriodJune","allDatesInPeriodJuly","allDatesInPeriodAugust","allDatesInPeriodSeptember","allDatesInPeriodOctober","allDatesInPeriodNovember","allDatesInPeriodDecember"]],["LabelFilterCondition",["unknown","equals","beginsWith","endsWith","contains","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between"]],["PivotFilterType",["unknown","value","manual","label","date"]],["TopBottomSelectionType",["items","percent","sum"]],["ValueFilterCondition",["unknown","equals","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between","topN","bottomN"]],["BuiltInPivotTableStyle",["none","light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","light22","light23","light24","light25","light26","light27","light28","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11","dark12","dark13","dark14","dark15","dark16","dark17","dark18","dark19","dark20","dark21","dark22","dark23","dark24","dark25","dark26","dark27","dark28"]],["BuiltInSlicerStyle",["light1","light2","light3","light4","light5","light6","other1","other2","dark1","dark2","dark3","dark4","dark5","dark6"]],["BuiltInTableStyle",["light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11"]],["ChartSeriesDimension",["categories","values","bubbleSizes"],{xvalues:"XValues",yvalues:"YValues"}],["PivotTableDateGroupBy",["invalid","bySeconds","byMinutes","byHours","byDays","byMonths","byQuarters","byYears"]],["PivotFilterTopBottomCriterion",["invalid","topItems","topPercent","topSum","bottomItems","bottomPercent","bottomSum"]],["SortBy",["ascending","descending"]],["AggregationFunction",["unknown","automatic","sum","count","average","max","min","product","countNumbers","standardDeviation","standardDeviationP","variance","varianceP"]],["ShowAsCalculation",["unknown","none","percentOfGrandTotal","percentOfRowTotal","percentOfColumnTotal","percentOfParentRowTotal","percentOfParentColumnTotal","percentOfParentTotal","percentOf","runningTotal","percentRunningTotal","differenceFrom","percentDifferenceFrom","rankAscending","rankDecending","index"]],["PivotAxis",["unknown","row","column","data","filter"]],["LinkedDataTypeRefreshMode",["unknown","manual","onLoad","periodic"]],["AxisType",["invalid","category","value","series"]],["AxisGroup",["primary","secondary"]],["AxisScaleType",["linear","logarithmic"]],["AxisCrosses",["automatic","maximum","minimum","custom"]],["AxisTickMark",["none","cross","inside","outside"]],["AxisTickLabelPosition",["nextToAxis","high","low","none"]],["TrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ChartAxisType",["invalid","category","value","series"]],["ChartAxisGroup",["primary","secondary"]],["ChartAxisScaleType",["linear","logarithmic"]],["ChartAxisPosition",["automatic","maximum","minimum","custom"]],["ChartAxisTickMark",["none","cross","inside","outside"]],["CalculationState",["done","calculating","pending"]],["ChartAxisTickLabelPosition",["nextToAxis","high","low","none"]],["ChartAxisDisplayUnit",["none","hundreds","thousands","tenThousands","hundredThousands","millions","tenMillions","hundredMillions","billions","trillions","custom"]],["ChartAxisTimeUnit",["days","months","years"]],["ChartBoxQuartileCalculation",["inclusive","exclusive"]],["ChartAxisCategoryType",["automatic","textAxis","dateAxis"]],["ChartBinType",["category","auto","binWidth","binCount"]],["ChartLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","grey25","grey50","grey75","automatic","roundDot"]],["ChartDataLabelPosition",["invalid","none","center","insideEnd","insideBase","outsideEnd","left","right","top","bottom","bestFit","callout"]],["ChartErrorBarsInclude",["both","minusValues","plusValues"]],["ChartErrorBarsType",["fixedValue","percent","stDev","stError","custom"]],["ChartMapAreaLevel",["automatic","dataOnly","city","county","state","country","continent","world"]],["ChartGradientStyle",["twoPhaseColor","threePhaseColor"]],["ChartGradientStyleType",["extremeValue","number","percent"]],["ChartTitlePosition",["automatic","top","bottom","left","right"]],["ChartLegendPosition",["invalid","top","bottom","left","right","corner","custom"]],["ChartMarkerStyle",["invalid","automatic","none","square","diamond","triangle","star","dot","dash","circle","plus","picture"],{x:"X"}],["ChartPlotAreaPosition",["automatic","custom"]],["ChartMapLabelStrategy",["none","bestFit","showAll"]],["ChartMapProjectionType",["automatic","mercator","miller","robinson","albers"]],["ChartParentLabelStrategy",["none","banner","overlapping"]],["ChartSeriesBy",["auto","columns","rows"]],["ChartDataSourceType",["localRange","externalRange","list","unknown"]],["ChartTextHorizontalAlignment",["center","left","right","justify","distributed"]],["ChartTextVerticalAlignment",["center","bottom","top","justify","distributed"]],["ChartTickLabelAlignment",["center","left","right"]],["ChartType",["invalid","columnClustered","columnStacked","columnStacked100","barClustered","barStacked","barStacked100","lineStacked","lineStacked100","lineMarkers","lineMarkersStacked","lineMarkersStacked100","pieOfPie","pieExploded","barOfPie","areaStacked","areaStacked100","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","line","pie","area","doughnut","radar","histogram","boxwhisker","pareto","regionMap","treemap","waterfall","sunburst","funnel"],{_3DColumnClustered:"3DColumnClustered",_3DColumnStacked:"3DColumnStacked",_3DColumnStacked100:"3DColumnStacked100",_3DBarClustered:"3DBarClustered",_3DBarStacked:"3DBarStacked",_3DBarStacked100:"3DBarStacked100",_3DPieExploded:"3DPieExploded",xyscatterSmooth:"XYScatterSmooth",xyscatterSmoothNoMarkers:"XYScatterSmoothNoMarkers",xyscatterLines:"XYScatterLines",xyscatterLinesNoMarkers:"XYScatterLinesNoMarkers",_3DAreaStacked:"3DAreaStacked",_3DAreaStacked100:"3DAreaStacked100",_3DColumn:"3DColumn",_3DLine:"3DLine",_3DPie:"3DPie",xyscatter:"XYScatter",_3DArea:"3DArea"}],["ChartUnderlineStyle",["none","single"]],["ChartDisplayBlanksAs",["notPlotted","zero","interplotted"]],["ChartPlotBy",["rows","columns"]],["ChartSplitType",["splitByPosition","splitByValue","splitByPercentValue","splitByCustomSplit"]],["ChartColorScheme",["colorfulPalette1","colorfulPalette2","colorfulPalette3","colorfulPalette4","monochromaticPalette1","monochromaticPalette2","monochromaticPalette3","monochromaticPalette4","monochromaticPalette5","monochromaticPalette6","monochromaticPalette7","monochromaticPalette8","monochromaticPalette9","monochromaticPalette10","monochromaticPalette11","monochromaticPalette12","monochromaticPalette13"]],["ChartTrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ShapeZOrder",["bringToFront","bringForward","sendToBack","sendBackward"]],["ShapeType",["unsupported","image","geometricShape","group","line"]],["ShapeScaleType",["currentSize","originalSize"]],["ShapeScaleFrom",["scaleFromTopLeft","scaleFromMiddle","scaleFromBottomRight"]],["ShapeFillType",["noFill","solid","gradient","pattern","pictureAndTexture","mixed"]],["ShapeFontUnderlineStyle",["none","single","double","heavy","dotted","dottedHeavy","dash","dashHeavy","dashLong","dashLongHeavy","dotDash","dotDashHeavy","dotDotDash","dotDotDashHeavy","wavy","wavyHeavy","wavyDouble"]],["PictureFormat",[],{unknown:"UNKNOWN",bmp:"BMP",jpeg:"JPEG",gif:"GIF",png:"PNG",svg:"SVG"}],["ShapeLineStyle",["single","thickBetweenThin","thickThin","thinThick","thinThin"]],["ShapeLineDashStyle",["dash","dashDot","dashDotDot","longDash","longDashDot","roundDot","solid","squareDot","longDashDotDot","systemDash","systemDot","systemDashDot"]],["ArrowheadLength",["short","medium","long"]],["ArrowheadStyle",["none","triangle","stealth","diamond","oval","open"]],["ArrowheadWidth",["narrow","medium","wide"]],["PremiumLicenseName",["python"]],["BindingType",["range","table","text"]],["BorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight","insideVertical","insideHorizontal","diagonalDown","diagonalUp"]],["BorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","double","slantDashDot"]],["BorderWeight",["hairline","thin","medium","thick"]],["CalculationMode",["automatic","automaticExceptTables","manual"]],["RuntimeCalculationMode",[],{undefined:0,automatic:1,automaticExceptTables:2,manual:3}],["CalculationType",["recalculate","full","fullRebuild"]],["ClearApplyTo",["all","formats","contents","hyperlinks","removeHyperlinks"]],["VisualCategory",["column","bar","line","area","pie","donut","scatter","bubble","statistical","stock","combo","hierarchy","surface","map","funnel","radar","waterfall","threeD","other"]],["VisualPropertyType",["object","collection","string","double","int","bool","enum","color"]],["VisualChangeType",["dataChange","propertyChange","genericChange","selectionChange"]],["BoolMetaPropertyType",["writeOnly","readOnly","hideEntireSubtreeUI","hideMeButShowChildrenUI","expandableUI","nextPropOnSameLine","hideLabel","showResetUI","hasOwnExpandableSection","nextPropOnSameLineFOTP","showResetUIFOTP","untransferable","ignoreDuringChangeChartType","notTriviallyUndoable","volatileEnum","exceptionCollection","metaOnly","showHideCollection","errorMessage","infoMessage"]],["ConditionalDataBarAxisFormat",["automatic","none","cellMidPoint"]],["ConditionalDataBarDirection",["context","leftToRight","rightToLeft"]],["ConditionalFormatDirection",["top","bottom"]],["ConditionalFormatType",["custom","dataBar","colorScale","iconSet","topBottom","presetCriteria","containsText","cellValue"]],["ConditionalFormatRuleType",["invalid","automatic","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalFormatIconRuleType",["invalid","number","percent","formula","percentile"]],["ConditionalFormatColorCriterionType",["invalid","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalTopBottomCriterionType",["invalid","topItems","topPercent","bottomItems","bottomPercent"]],["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"]],["ConditionalTextOperator",["invalid","contains","notContains","beginsWith","endsWith"]],["ConditionalCellValueOperator",["invalid","between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual"]],["ConditionalIconCriterionOperator",["invalid","greaterThan","greaterThanOrEqual"]],["ConditionalRangeBorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight"]],["ConditionalRangeBorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot"]],["ConditionalRangeFontUnderlineStyle",["none","single","double"]],["CustomFunctionType",["invalid","script","webService"]],["CustomFunctionMetadataFormat",["invalid","openApi"]],["DataValidationType",["none","wholeNumber","decimal","list","date","time","textLength","custom","inconsistent","mixedCriteria"]],["DataValidationOperator",["between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqualTo","lessThanOrEqualTo"]],["DataValidationAlertStyle",["stop","warning","information"]],["DeleteShiftDirection",["up","left"]],["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"]],["FilterDatetimeSpecificity",["year","month","day","hour","minute","second"]],["FilterOn",["bottomItems","bottomPercent","cellColor","dynamic","fontColor","values","topItems","topPercent","icon","custom"]],["FilterOperator",["and","or"]],["HorizontalAlignment",["general","left","center","right","fill","justify","centerAcrossSelection","distributed"]],["IconSet",["invalid","threeArrows","threeArrowsGray","threeFlags","threeTrafficLights1","threeTrafficLights2","threeSigns","threeSymbols","threeSymbols2","fourArrows","fourArrowsGray","fourRedToBlack","fourRating","fourTrafficLights","fiveArrows","fiveArrowsGray","fiveRating","fiveQuarters","threeStars","threeTriangles","fiveBoxes"]],["ImageFittingMode",["fit","fitAndCenter","fill"]],["InsertShiftDirection",["down","right"]],["NamedItemScope",["worksheet","workbook"]],["NamedItemType",["string","integer","double","boolean","range","error","array"]],["RangeUnderlineStyle",["none","single","double","singleAccountant","doubleAccountant"]],["SheetVisibility",["visible","hidden","veryHidden"]],["EventTriggerSource",["unknown","thisLocalAddin"]],["RangeValueType",["unknown","empty","string","integer","double","boolean","error","richValue"]],["KeyboardDirection",["left","right","up","down"]],["SearchDirection",["forward","backwards"]],["SortOrientation",["rows","columns"]],["SortOn",["value","cellColor","fontColor","icon"]],["SortDataOption",["normal","textAsNumber"]],["SortMethod",["pinYin","strokeCount"]],["VerticalAlignment",["top","center","bottom","justify","distributed"]],["MessageCategory",[],{none:0,customFunction:1,action:2,event:65536}],["MessageType",[],{none:0,testEvent:1,test1Event:2,worksheetDataChangedEvent:10,worksheetActivatedEvent:11,worksheetDeactivatedEvent:12,worksheetAddedEvent:13,worksheetSelectionChangedEvent:14,worksheetDeletedEvent:15,worksheetCalculatedEvent:16,worksheetFilteredEvent:17,worksheetFormatChangedEvent:18,worksheetRowSortedEvent:19,worksheetColumnSortedEvent:20,worksheetSingleClickedEvent:21,worksheetRowHiddenChangedEvent:22,worksheetFormulaChangedEvent:23,worksheetProtectionChangedEvent:24,worksheetNameChangedEvent:25,worksheetVisibilityChangedEvent:26,worksheetMovedEvent:27,worksheetNavigationObjectChangedEvent:28,worksheetRowHeightChangedEvent:29,workbookFormulaReferenceStyleChangedEvent:30,chartAddedEvent:50,chartActivatedEvent:51,chartDeactivatedEvent:52,chartDeletedEvent:53,tableSelectionChangedEvent:100,tableDataChangedEvent:101,tableAddedEvent:102,tableDeletedEvent:103,tableFilteredEvent:104,agaveVisualUpdateEvent:150,customFunctionExecutionBeginEvent:200,customFunctionExecutionEndEvent:201,commentAddedEvent:250,commentDeletedEvent:251,commentChangedEvent:252,invocationMessage:1e3,cancellationMessage:1001,metadataMessage:1002,visualSelectionChangedEvent:2e3,visualChangeEvent:2001,visualTrackerModelChangedEvent:2002,shapeSelectionChangedEvent:2100,shapeActivatedEvent:2101,shapeDeactivatedEvent:2102,shapeAddedEvent:2103,shapeDeletedEvent:2104,workbookAutoSaveSettingChangedEvent:2200,wacoperationEvent:2201,recordingStateChangedEvent:2202,workbookActivatedEvent:2203,workbookNavigationObjectChangedEvent:2204,ribbonCommandExecutedEvent:2300,linkedDataTypeRefreshRequestCompletedEvent:2500,linkedDataTypeRefreshModeChangedEvent:2501,linkedDataTypeLinkedDataTypeAddedEvent:2502,linkedWorkbookWorkbookLinksChangedEvent:2600,linkedWorkbookRefreshCompletedEvent:2601,rangePickerSelectionChangedEvent:2700,rangePickerDeactivatedEvent:2701,lineageActivityUpdateAvailableEvent:2800,lineageActivityFilterUpdatedEvent:2801,lineageActivityLoadCompletedEvent:2802,pivotTableAddedEvent:2900,pivotTableDeletedEvent:2901,namedItemAddedEvent:3e3,namedItemDeletedEvent:3001,guidedReapplyManagerUpdateAvailableEvent:3100,vbaRecorderRecordingChangedEvent:3200,vbaRecorderRecordingChanged2Event:3202,workbookActionRecordedEvent:3201,externalCodeServiceDiagnosticsNewEntryEvent:3300,externalCodeServiceDiagnosticsFilterUpdatedEvent:3301,rangeValuesPreviewDismissedEvent:3400,applicationUndoChangedEvent:3500,appRuntimeVisibilityChangedEvent:65539,beforeCloseNotifiactionCancelledEvent:65540,augmentationLoopAnnotationAddedEvent:65541}],["InsertDeleteCellsShiftDirection",["none","shiftCellLeft","shiftCellUp","shiftCellRight","shiftCellDown"]],["DocumentPropertyType",["number","boolean","date","string","float"]],["EventSource",["local","remote"]],["DataChangeType",["unknown","rangeEdited","rowInserted","rowDeleted","columnInserted","columnDeleted","cellInserted","cellDeleted"]],["RowHiddenChangeType",["unhidden","hidden"]],["CommentChangeType",["commentEdited","commentResolved","commentReopened","replyAdded","replyDeleted","replyEdited"]],["EventType",["worksheetChanged","worksheetSelectionChanged","worksheetAdded","worksheetActivated","worksheetDeactivated","tableChanged","tableSelectionChanged","worksheetDeleted","chartAdded","chartActivated","chartDeactivated","chartDeleted","worksheetCalculated","visualSelectionChanged","agaveVisualUpdate","tableAdded","tableDeleted","tableFiltered","worksheetFiltered","shapeActivated","shapeDeactivated","visualChange","workbookAutoSaveSettingChanged","worksheetFormatChanged","ribbonCommandExecuted","worksheetRowSorted","worksheetColumnSorted","worksheetSingleClicked","worksheetRowHiddenChanged","recordingStateChangedEvent","commentAdded","commentDeleted","commentChanged","linkedDataTypeRefreshRequestCompleted","linkedDataTypeRefreshModeChanged","linkedDataTypeLinkedDataTypeAdded","worksheetFormulaChanged","workbookActivated","linkedWorkbookWorkbookLinksChanged","linkedWorkbookRefreshCompleted","worksheetProtectionChanged","worksheetNameChanged","worksheetVisibilityChanged","worksheetMoved","lineageActivityUpdateAvailable","lineageActivityFilterUpdated","lineageActivityLoadCompleted","shapeAdded","shapeDeleted","pivotTableAdded","pivotTableDeleted","namedItemAdded","namedItemDeleted","worksheetNavigationObjectChanged","workbookNavigationObjectChanged","worksheetRowHeightChanged","workbookFormulaReferenceStyleChanged","guidedReapplyManagerUpdateAvailable","vbaRecorderRecordingChanged","rangeValuesPreviewDismissed","annotationAdded","workbookActionRecorded","applicationUndoChanged","vbaRecorderRecordingChanged2"],{wacoperationEvent:"WACOperationEvent"}],["DocumentPropertyItem",["title","subject","author","keywords","comments","template","lastAuth","revision","appName","lastPrint","creation","lastSave","category","format","manager","company"]],["SubtotalLocationType",["atTop","atBottom","off"]],["PivotLayoutType",["compact","tabular","outline"]],["ProtectionSelectionMode",["normal","unlocked","none"]],["PageOrientation",["portrait","landscape"]],["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"]],["ReadingOrder",["context","leftToRight","rightToLeft"]],["BuiltInStyle",["normal","comma","currency","percent","wholeComma","wholeDollar","hlink","hlinkTrav","note","warningText","emphasis1","emphasis2","emphasis3","sheetTitle","heading1","heading2","heading3","heading4","input","output","calculation","checkCell","linkedCell","total","good","bad","neutral","accent1","accent1_20","accent1_40","accent1_60","accent2","accent2_20","accent2_40","accent2_60","accent3","accent3_20","accent3_40","accent3_60","accent4","accent4_20","accent4_40","accent4_60","accent5","accent5_20","accent5_40","accent5_60","accent6","accent6_20","accent6_40","accent6_60","explanatoryText"]],["PrintErrorType",["asDisplayed","blank","dash","notAvailable"]],["WorksheetPositionType",["none","before","after","beginning","end"]],["PrintComments",["noComments","endSheet","inPlace"]],["PrintOrder",["downThenOver","overThenDown"]],["PrintMarginUnit",["points","inches","centimeters"]],["HeaderFooterState",["default","firstAndDefault","oddAndEven","firstOddAndEven"]],["AutoFillType",["fillDefault","fillCopy","fillSeries","fillFormats","fillValues","fillDays","fillWeekdays","fillMonths","fillYears","linearTrend","growthTrend","flashFill"]],["GroupOption",["byRows","byColumns"]],["RangeCopyType",["all","formulas","values","formats","link"]],["LinkedDataTypeState",["none","validLinkedData","disambiguationNeeded","brokenLinkedData","fetchingData"]],["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"]],["ConnectorType",["straight","elbow","curve"]],["ContentType",["plain","mention"]],["SpecialCellType",["conditionalFormats","dataValidations","blanks","constants","formulas","sameConditionalFormat","sameDataValidation","visible"]],["SpecialCellValueType",["all","errors","errorsLogical","errorsNumbers","errorsText","errorsLogicalNumber","errorsLogicalText","errorsNumberText","logical","logicalNumbers","logicalText","logicalNumbersText","numbers","numbersText","text"]],["Placement",["twoCell","oneCell","absolute"]],["FillPattern",["none","solid","gray50","gray75","gray25","horizontal","vertical","down","up","checker","semiGray75","lightHorizontal","lightVertical","lightDown","lightUp","grid","crissCross","gray16","gray8","linearGradient","rectangularGradient"]],["ShapeTextHorizontalAlignment",["left","center","right","justify","justifyLow","distributed","thaiDistributed"]],["ShapeTextVerticalAlignment",["top","middle","bottom","justified","distributed"]],["ShapeTextVerticalOverflow",["overflow","ellipsis","clip"]],["ShapeTextHorizontalOverflow",["overflow","clip"]],["ShapeTextReadingOrder",["leftToRight","rightToLeft"]],["ShapeTextOrientation",["horizontal","vertical","vertical270","wordArtVertical","eastAsianVertical","mongolianVertical","wordArtVerticalRTL"]],["ShapeAutoSize",["autoSizeNone","autoSizeTextToFitShape","autoSizeShapeToFitText","autoSizeMixed"]],["CloseBehavior",["save","skipSave"]],["SaveBehavior",["save","prompt"]],["SlicerSortType",["dataSourceOrder","ascending","descending"]],["RibbonTab",["others","home","insert","draw","pageLayout","formulas","data","review","view","developer","addIns","help"]],["NumberFormatCategory",["general","number","currency","accounting","date","time","percentage","fraction","scientific","text","special","custom"]]],clientObjectTypes:[["UndoScope",0,0,0,[["close",0,0,0,2],["open",1,0,0,2]]],["RangeValuesPreview",4,0,0,[["_RegisterEventDismissed",0,0,0,2,0,1],["_UnregisterEventDismissed",0,0,0,2,0,1],["dismiss",0,2,0,4],["show",3,2,0,4]],0,0,0,[["Dismissed",0,0,"MessageType.rangeValuesPreviewDismissedEvent","this._ParentObject.id","_RegisterEventDismissed","_UnregisterEventDismissed"]]],["AugmentationLoop",0,0,0,[["_RegisterAnnotationAddedEvent",0,2,0,4],["_UnregisterAnnotationAddedEvent",0,2,0,4],["activateAnnotation",1,2,0,4],["submitSignal",1,2,0,4]],0,0,0,[["AnnotationAdded",0,0,"MessageType.augmentationLoopAnnotationAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAnnotationAddedEvent","_UnregisterAnnotationAddedEvent"]]],["ExternalCodeService",0,0,[["diagnostics","ExternalCodeServiceDiagnostics",2,0,0,4]]],["ExternalCodeServiceDiagnostics",0,[["id",2]],0,[["_RegisterEventNewEntry",0,0,0,2,0,1],["_UnregisterEventNewEntry",0,0,0,2,0,1],["clear",0,2,0,4],["fireStoredEntries",0,2,0,4],["_RegisterEventFilterUpdated",0,0,0,2,0,1],["_UnregisterEventFilterUpdated",0,0,0,2,0,1]],0,0,0,[["FilterUpdated",0,0,"MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent","this.id","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["NewEntry",0,0,"MessageType.externalCodeServiceDiagnosticsNewEntryEvent","this.id","_RegisterEventNewEntry","_UnregisterEventNewEntry"]]],["VbaRecorder",0,[["id",2]],0,[["_RegisterEventRecordingChanged",0,0,0,2,0,1],["_UnregisterEventRecordingChanged",0,0,0,2,0,1],["_RegisterEventRecordingChanged2",0,2,2,4],["_UnregisterEventRecordingChanged2",0,2,2,4]],0,0,0,[["RecordingChanged",0,0,"MessageType.vbaRecorderRecordingChangedEvent","this.id","_RegisterEventRecordingChanged","_UnregisterEventRecordingChanged"],["RecordingChanged2",0,2,"MessageType.vbaRecorderRecordingChanged2Event","this.id","_RegisterEventRecordingChanged2","_UnregisterEventRecordingChanged2"]]],["WorksheetOptimizationScanResult",0,[["allocatedCells",2],["optimizableCells",2]],[["ranges","RangeOptimizationCollection",18,0,0,4]]],["UserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity"],["GuidedReapplyManager",0,0,[["activities","UserActivityCollection",18,0,0,4],["summaryCardUserActivity","SummaryCardUserActivity",2,0,0,4]],[["openSavedFile",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["discardActivites",0,2,0,4],["reapplyActivity",1,2,0,4],["saveActivities",0,2,0,4]],0,0,0,[["UpdateAvailable",0,0,"MessageType.guidedReapplyManagerUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["BusinessBar",0,0,0,[["hide",2],["show",2]]],["UserActivity",0,[["activityId",2],["activityType",2],["author",2],["createdDateTime",10],["guid",2],["rangeAddress",2],["sheetName",2],["valueChangeData",2],["authorEmail",2],["locationDeleted",2]],[["highlightRangeAreas","RangeAreas",2,0,0,4]]],["LineageActivityCollection",1,0,0,[["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["clear",0,2,0,4],["getCount",0,2,0,4],["getState",0,2,0,4],["loadActivities",1,2,0,4],["loadLatestActivities",0,2,0,4],["loadNextActivities",0,2,0,4],["loadPreviousActivities",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventFilterUpdated",0,2,0,4],["_RegisterEventLoadCompleted",0,2,0,4],["_UnregisterEventFilterUpdated",0,2,0,4],["_UnregisterEventLoadCompleted",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity",[["FilterUpdated",0,0,"MessageType.lineageActivityFilterUpdatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["LoadCompleted",0,0,"MessageType.lineageActivityLoadCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventLoadCompleted","_UnregisterEventLoadCompleted"],["UpdateAvailable",0,0,"MessageType.lineageActivityUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["SummaryItemUserActivity",0,[["activityType",2],["rangeAddresses",2],["sheetName",2],["valueChangeData",2]]],["SummaryItemUserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SummaryItemUserActivity",1,2,0,4]],0,"SummaryItemUserActivity"],["SummaryCardUserActivity",0,[["authors",2],["currentUser",2],["displayTime",10],["numberOfDetailedCard",2],["summaryUnviewableData",2]],[["summaryItemUserActivities","SummaryItemUserActivityCollection",18,0,0,4]]],["AllowEditRange",0,[["address",1],["isPasswordProtected",3],["title",1]],0,[["delete"],["pauseProtection",1],["setPassword",1]]],["AllowEditRangeCollection",1,0,0,[["add",3],["getCount",0,2,0,4],["pauseProtection",1]],[["getItem","AllowEditRange",1,18,0,4],["getItemAt","AllowEditRange",1,2,0,4],["getItemOrNullObject","AllowEditRange",1,2,0,4]],0,"AllowEditRange"],["Query",0,[["loadedTo",2],["loadedToDataModel",2],["name",2],["refreshDate",10],["rowsLoadedCount",2],["error",2]]],["QueryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Query",1,18,0,4]],0,"Query"],["VisualTracker",0,[["id",2]],0,[["_RegisterEventModelChanged",0,2],["_UnregisterEventModelChanged",0,2],["requestTrackingAlteration",2,2,0,4]],0,0,0,[["ModelChanged",0,0,"MessageType.visualTrackerModelChangedEvent","this.id","_RegisterEventModelChanged","_UnregisterEventModelChanged"]]],["NumberFormatProperty",0,[["key",3],["currency",3],["dateTime",3],["dateTimeHasDayOfWeek",3],["dateTimeHasMonth",3],["dateTimeHasYear",3],["numeric",3],["percent",3],["text",3]]],["NumberFormatPropertyCollection",1,0,0,0,[["getItemAt","NumberFormatProperty",1,2,0,4]],0,"NumberFormatProperty"],["RangeOptimization",0,[["optimizationTypes",2],["range",2]]],["RangeOptimizationCollection",1,[["allocatedCells",2],["optimizableCells",2]],0,[["getCount",0,2,0,4]],[["getItemAt","RangeOptimization",1,2,0,4]],0,"RangeOptimization"],["WorksheetOptimization",0,0,0,0,[["optimize","WorksheetOptimizationResult",0,0,0,2],["scan","RangeOptimizationCollection",0,6,0,4],["scanExtended","WorksheetOptimizationScanResult",0,2,0,4]]],["WorksheetOptimizationResult",0,[["allocatedCells",2],["optimizedCells",2]]],["LinkedWorkbook",0,[["displayUrl",2,3],["fileName",3,3],["id",2],["longErrorDescription",2,3],["refreshEnabled",2,3],["refreshing",2,3],["statusMessage",2,3],["excelIconState",2,3],["hardToFindErrorMessages",2,3],["lastUpdated",10,3]],0,[["_RegisterRefreshCompletedEvent",0,0,3,2,0,1],["_UnregisterRefreshCompletedEvent",0,0,3,2,0,1],["breakLinks"],["changeSource",1,0,3],["findNextLink",0,2,3,4],["openWorkbook",0,2,3,4],["refresh"],["openChangeSourceDialog",0,0,3],["closeChangeSourceDialog",0,0,3]],0,0,0,[["RefreshCompleted",0,3,"MessageType.linkedWorkbookRefreshCompletedEvent","this.id","_RegisterRefreshCompletedEvent","_UnregisterRefreshCompletedEvent"]]],["LinkedWorkbookCollection",1,[["breakAllLinksEnabled",0,3],["refreshAllEnabled",0,3],["workbookLinksRefreshMode"],["workbookLinksRefreshSettings",0,3],["containsNonWorkbookLinks",0,3]],0,[["_RegisterWorkbookLinksChangedEvent",0,2,3,4],["_UnregisterWorkbookLinksChangedEvent",0,2,3,4],["breakAllLinks"],["getCount",0,2,3,4],["refreshAll"],["openEditLinksDialog",0,2,3,4]],[["getItem","LinkedWorkbook",1,18,0,4],["getItemAt","LinkedWorkbook",1,2,3,4],["getItemOrNullObject","LinkedWorkbook",1]],0,"LinkedWorkbook",[["WorkbookLinksChanged",0,3,"MessageType.linkedWorkbookWorkbookLinksChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWorkbookLinksChangedEvent","_UnregisterWorkbookLinksChangedEvent"]]],["DocumentTaskChange",0,[["type",2],["changedBy",2],["commentId",2],["createdDateTime",10],["id",2],["assignee",2],["undoChangeId",2],["priority",2],["title",2],["percentComplete",2],["startDateTime",10],["dueDateTime",10]],0,0,0,0,0,0,"Microsoft.ExcelServices.DocumentTaskChange",4],["DocumentTaskChangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","DocumentTaskChange",1,2,0,4]],0,"DocumentTaskChange"],["RangePicker",0,0,0,[["activate",1,0,0,2,0,4],["deactivate",0,0,0,2,0,4],["updateSelection",1,0,0,2,0,4],["updateSelectionWithNavigation",4,0,0,2,0,4],["_RegisterEventSelectionChanged",0,0,0,2,0,4],["_UnregisterEventSelectionChanged",0,0,0,2,0,4],["_RegisterEventDeactivated",0,2,0,4],["_UnregisterEventDeactivated",0,2,0,4]],0,0,0,[["Deactivated",0,0,"MessageType.rangePickerDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventDeactivated","_UnregisterEventDeactivated"],["SelectionChanged",0,0,"MessageType.rangePickerSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventSelectionChanged","_UnregisterEventSelectionChanged"]]],["DocumentTask",0,[["startAndDueDateTime"],["id",2],["percentComplete"],["priority"],["title"],["assignees",2],["completedBy",2],["completedDateTime",10],["createdBy",2],["createdDateTime",10]],[["changes","DocumentTaskChangeCollection",18,0,0,4],["comment","Comment",2,0,0,4]],[["assign",1],["unassign",1],["unassignAll"]]],["DocumentTaskCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","DocumentTask",1,18,0,4],["getItemOrNullObject","DocumentTask",1,2,0,4],["getItemAt","DocumentTask",1,2,0,4]],0,"DocumentTask"],["DataConnection",0,[["connectionString",2],["name",2],["commandText",2],["dataSourceType",2]]],["Runtime",0,[["enableEvents",1,5]]],["Application",0,[["calculationMode",1],["calculationEngineVersion",3,6],["calculationState",3,6],["decimalSeparator",3,7],["thousandsSeparator",3,7],["useSystemSeparators",3,7],["formatStaleValues",1,8]],[["iterativeCalculation","IterativeCalculation",35,6,0,4],["ribbon","Ribbon",35,6,0,4],["cultureInfo","CultureInfo",3,7,0,4],["undoScope","UndoScope",3,3,0,4]],[["calculate",1],["suspendApiCalculationUntilNextSync",0,1,9,2,0,10],["suspendScreenUpdatingUntilNextSync",0,0,6,2,0,10],["hasLicense",1,2,8,4],["redo",0,0,3,2],["explorePremiumLicense",1,2,8,4],["undo",0,0,3,2],["_RegisterEventUndoChanged",0,2,3,4],["_UnregisterEventUndoChanged",0,2,3,4]],[["createWorkbook","WorkbookCreated",1,10,5,0,0,"_GetWorkbookCreatedById"],["_GetWorkbookCreatedById","WorkbookCreated",1,2,5,4]],0,0,[["UndoChanged",0,3,"MessageType.applicationUndoChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUndoChanged","_UnregisterEventUndoChanged"]]],["IterativeCalculation",0,[["enabled",1],["maxIteration",1],["maxChange",1]]],["Workbook",0,[["name",3,11],["readOnly",3,5],["isDirty",1,6],["use1904DateSystem",1,8],["chartDataPointTrack",1,6],["usePrecisionAsDisplayed",1,6],["calculationEngineVersion",3,6],["autoSave",3,6],["previouslySaved",3,6],["showPivotFieldList",0,8,0,2,12],["formulaReferenceStyle",2,3]],[["worksheets","WorksheetCollection",19,0,0,4],["names","NamedItemCollection",19,0,0,4],["tables","TableCollection",19,0,0,4],["application","Application",2,0,0,4],["bindings","BindingCollection",19,0,0,4],["functions","Functions",2,13,0,4],["_V1Api","_V1Api",2,14,0,4],["pivotTables","PivotTableCollection",19,14,0,4],["settings","SettingCollection",19,15,0,4],["customXmlParts","CustomXmlPartCollection",19,16,0,4],["internalTest","InternalTest",2,9,0,4],["properties","DocumentProperties",35,11,0,4],["styles","StyleCollection",19,11,0,4],["protection","WorkbookProtection",3,11,0,4],["dataConnections","DataConnectionCollection",3,11,0,4],["_Runtime","Runtime",2,16,0,4],["comments","CommentCollection",19,17,0,4],["slicers","SlicerCollection",19,17,0,4],["tableStyles","TableStyleCollection",19,17,0,4],["pivotTableStyles","PivotTableStyleCollection",19,17,0,4],["slicerStyles","SlicerStyleCollection",19,17,0,4],["timelineStyles","TimelineStyleCollection",19,17,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["linkedDataTypes","LinkedDataTypeCollection",18,8,0,4],["queries","QueryCollection",18,18,0,4],["linkedWorkbooks","LinkedWorkbookCollection",18,19,0,4],["rangePicker","RangePicker",2,8,0,4,0,4],["lineageActivities","LineageActivityCollection",18,3,0,4],["businessBar","BusinessBar",2,8,0,4],["guidedReapply","GuidedReapplyManager",2,3,0,4],["vbaRecorder","VbaRecorder",2,8,0,4],["externalCodeService","ExternalCodeService",2,8,0,4],["augmentationLoop","AugmentationLoop",2,8,0,4]],[["_RemoveReference",1,2],["_GetObjectByReferenceId",1,2,0,4],["_GetObjectTypeNameByReferenceId",1,2,0,4],["_RemoveAllReferences",0,2],["_GetReferenceCount",0,2,0,4],["getIsActiveCollabSession",0,0,6],["registerCustomFunctions",7,0,20,8],["_SetOsfControlContainerReadyForCustomFunctions",0,0,20],["close",1,0,7],["save",1,0,7],["_RegisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_UnregisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_RegisterWACOperationEvent",0,2,21,4],["_UnregisterWACOperationEvent",0,2,21,4],["_RegisterRecordingStateChangedEvent",0,0,21,2,0,22],["_UnregisterRecordingStateChangedEvent",0,0,21,2,0,22],["_RegisterActivatedEvent",0,2,23],["_UnregisterActivatedEvent",0,2,23],["insertWorksheetsFromBase64",2,0,23],["enableOfficeScriptRecording",1,1,19],["recordAction",1,3,0,4],["focus",0,2,3,4],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["showHelp",1,2,3,4],["getLinkedEntityCellValue",1,2,24,4],["getThemeColors",0,2,8,4],["_RegisterEventFormulaReferenceStyleChanged",0,2,3,4],["_UnregisterEventFormulaReferenceStyleChanged",0,2,3,4],["notifySDXLoaded",1,2,3,4],["openConditionalFormattingRulesManager",1,0,3],["openNameManager",0,0,3],["_RegisterEventActionRecorded",0,2,2,4],["_UnregisterEventActionRecorded",0,2,2,4]],[["getSelectedRange","Range",0,10,0,4],["getActiveCell","Range",0,10,11,4],["_GetRangeForEventByReferenceId","Range",1,2,0,4],["_GetRangeOrNullObjectForEventByReferenceId","Range",1,2,0,4],["getActiveChart","Chart",0,2,6,4],["getActiveChartOrNullObject","Chart",0,2,6,4],["getSelectedRanges","RangeAreas",0,10,6,4],["_GetRangesForEventByReferenceId","RangeAreas",1,2,6,4],["_GetRangesOrNullObjectForEventByReferenceId","RangeAreas",1,2,6,4],["getActiveSlicer","Slicer",0,2,17,4],["getActiveSlicerOrNullObject","Slicer",0,2,17,4]],0,0,[["ActionRecorded",0,2,"MessageType.workbookActionRecordedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventActionRecorded","_UnregisterEventActionRecorded"],["Activated",0,23,"MessageType.workbookActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["AutoSaveSettingChanged",0,6,"MessageType.workbookAutoSaveSettingChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAutoSaveSettingChangedEvent","_UnregisterAutoSaveSettingChangedEvent"],["FormulaReferenceStyleChanged",0,3,"MessageType.workbookFormulaReferenceStyleChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFormulaReferenceStyleChanged","_UnregisterEventFormulaReferenceStyleChanged"],["NavigationObjectChanged",0,3,"MessageType.workbookNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["RecordingStateChangedEvent",0,21,"MessageType.recordingStateChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRecordingStateChangedEvent","_UnregisterRecordingStateChangedEvent"],["SelectionChanged",3,14,"_CC.office10EventIdDocumentSelectionChangedEvent","","",""],["WACOperationEvent",2,21,"MessageType.wacoperationEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWACOperationEvent","_UnregisterWACOperationEvent"],["_Message",3,11,"_CC.office10EventIdRichApiMessageEvent","","",""]]],["WorkbookProtection",0,[["protected",3]],0,[["protect",1],["unprotect",1]]],["WorkbookCreated",0,[["id",3]],0,[["open",0,2,0,4]]],["Worksheet",0,[["name",1],["id",3],["position",1],["visibility",1],["tabColor",1,11,0,2,25],["standardWidth",1,11],["standardHeight",3,11],["showGridlines",5,5,0,2,26],["showHeadings",5,5],["enableCalculation",1,6],["tabId",3,18]],[["charts","ChartCollection",83,0,0,4],["tables","TableCollection",83,0,0,4],["protection","WorksheetProtection",3,13,0,4],["pivotTables","PivotTableCollection",83,14,0,4],["names","NamedItemCollection",83,15,0,4],["freezePanes","WorksheetFreezePanes",3,11,0,4],["pageLayout","PageLayout",35,6,0,4],["visuals","VisualCollection",83,17,0,4],["shapes","ShapeCollection",83,6,0,4],["horizontalPageBreaks","PageBreakCollection",19,6,0,4],["verticalPageBreaks","PageBreakCollection",19,6,0,4],["autoFilter","AutoFilter",3,6,0,4],["slicers","SlicerCollection",19,17,0,4],["comments","CommentCollection",83,17,0,4],["customProperties","WorksheetCustomPropertyCollection",19,27,0,4],["namedSheetViews","NamedSheetViewCollection",18,19,0,4],["optimization","WorksheetOptimization",2,8,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["visualTracker","VisualTracker",2,28,0,4],["rangeValuesPreview","RangeValuesPreview",66,8,0,4]],[["delete"],["activate",0,2],["calculate",1,0,9],["_RegisterDataChangedEvent",0,0,11,2,0,10],["_UnregisterDataChangedEvent",0,0,11,2,0,10],["_RegisterActivatedEvent",0,0,11,2,0,1],["_UnregisterActivatedEvent",0,0,11,2,0,1],["_RegisterDeactivatedEvent",0,0,11,2,0,1],["_UnregisterDeactivatedEvent",0,0,11,2,0,1],["_RegisterSelectionChangedEvent",0,0,11,2,0,29],["_UnregisterSelectionChangedEvent",0,0,11,2,0,29],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["replaceAll",3,0,6],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,0,17,2,0,1],["_UnregisterRowSortedEvent",0,0,17,2,0,1],["_RegisterColumnSortedEvent",0,0,17,2,0,1],["_UnregisterColumnSortedEvent",0,0,17,2,0,1],["_RegisterSingleClickedEvent",0,0,17,2,0,1],["_UnregisterSingleClickedEvent",0,0,17,2,0,1],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["showOutlineLevels",2,0,17],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,0,30,2,0,1],["_RegisterEventVisibilityChanged",0,0,30,2,0,1],["_UnregisterEventNameChanged",0,0,30,2,0,1],["_UnregisterEventVisibilityChanged",0,0,30,2,0,1],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getRange","Range",1,10,0,4],["getUsedRange","Range",1,10,0,4],["getCell","Range",2,10,0,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getRangeByIndexes","Range",4,10,11,4],["getPrevious","Worksheet",1,10,16,4,0,"_GetSheetById"],["getPreviousOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNext","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNextOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["_GetSheetById","Worksheet",1,2,11,4],["copy","Worksheet",2,0,11,0,0,"_GetAnotherWorksheetById"],["_GetAnotherWorksheetById","Worksheet",1,0,11],["findAll","RangeAreas",2,10,6,4],["findAllOrNullObject","RangeAreas",2,10,6,4],["getRanges","RangeAreas",1,10,6,4],["getUsedRangeAreas","RangeAreas",1,0,3],["getRangeR1C1","Range",1,2,3,4],["getRangesR1C1","RangeAreas",1,2,3,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,0,3]],"workbook.worksheets",0,[["Activated",0,11,"MessageType.worksheetActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","this.id","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,11,"MessageType.worksheetDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","this.id","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","this.id","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","this.id","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","this.id","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["NavigationObjectChanged",0,3,"MessageType.worksheetNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","this.id","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","this.id","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","this.id","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","this.id","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,11,"MessageType.worksheetSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","this.id","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","this.id","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetCollection",1,0,0,[["getCount",1,2,15,4],["_RegisterAddedEvent",0,3,11],["_UnregisterAddedEvent",0,3,11],["_RegisterActivatedEvent",0,3,11],["_UnregisterActivatedEvent",0,0,11,2,0,29],["_RegisterDeactivatedEvent",0,0,11,2,0,29],["_UnregisterDeactivatedEvent",0,0,11,2,0,29],["_RegisterDeletedEvent",0,3,11],["_UnregisterDeletedEvent",0,3,11],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["_RegisterDataChangedEvent",0,3,6],["_UnregisterDataChangedEvent",0,3,6],["_RegisterSelectionChangedEvent",0,0,6,2,0,29],["_UnregisterSelectionChangedEvent",0,0,6,2,0,29],["addFromBase64",4,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,3,17],["_UnregisterRowSortedEvent",0,3,17],["_RegisterColumnSortedEvent",0,3,17],["_UnregisterColumnSortedEvent",0,3,17],["_RegisterSingleClickedEvent",0,0,17,2,0,29],["_UnregisterSingleClickedEvent",0,0,17,2,0,29],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,2,30,4],["_RegisterEventVisibilityChanged",0,2,30,4],["_UnregisterEventNameChanged",0,2,30,4],["_UnregisterEventVisibilityChanged",0,2,30,4],["_RegisterEventMoved",0,0,30,2,0,1],["_UnregisterEventMoved",0,0,30,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getItem","Worksheet",1,18,0,4],["add","Worksheet",1,8,0,2,0,0,29],["getActiveWorksheet","Worksheet",0,2,0,4],["getItemOrNullObject","Worksheet",1,2,15,4],["getFirst","Worksheet",1,10,16,4],["getLast","Worksheet",1,10,16,4]],0,"Worksheet",[["Activated",0,11,"MessageType.worksheetActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,11,"MessageType.worksheetAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,6,"MessageType.worksheetDataChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,11,"MessageType.worksheetDeletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["Moved",0,30,"MessageType.worksheetMovedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventMoved","_UnregisterEventMoved"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,6,"MessageType.worksheetSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetProtection",0,[["protected",3],["options",3],["canPauseProtection",3,19],["isPasswordProtected",3,19],["isPaused",3,19],["savedOptions",3,19]],[["allowEditRanges","AllowEditRangeCollection",19,19,0,4]],[["protect",2,1],["unprotect",1],["checkPassword",1,2,19,4],["pauseProtection",1,0,19],["resumeProtection",0,0,19],["setPassword",1,0,19],["updateOptions",1,0,19]]],["WorksheetFreezePanes",0,0,0,[["unfreeze"],["freezeAt",1],["freezeRows",1],["freezeColumns",1]],[["getLocation","Range",0,10,0,4],["getLocationOrNullObject","Range",0,10,0,4]]],["Range",14,[["numberFormat",5,0,0,2,31],["numberFormatLocal",1,11,0,2,31],["values",5,0,0,2,31],["text",3],["formulas",5,0,0,2,32],["formulasLocal",5,0,0,2,32],["rowIndex",3],["columnIndex",3],["rowCount",3],["columnCount",3],["address",3],["addressLocal",3],["cellCount",3],["_ReferenceId",2],["valueTypes",3],["formulasR1C1",5,13],["hidden",3,13],["rowHidden",1,13,0,2,32],["columnHidden",1,13,0,2,32],["isEntireColumn",3,11],["isEntireRow",3,11],["hyperlink",1,11,0,2,33],["style",1,11,0,2,32],["linkedDataTypeState",3,6],["hasSpill",3,27],["top",3,17],["left",3,17],["height",3,17],["width",3,17],["savedAsArray",3,27],["numberFormatCategories",3,27],["valuesAsJson",5,24],["valuesAsJsonLocal",5,24],["addressR1C1",2,3]],[["format","RangeFormat",35,0,0,4],["worksheet","Worksheet",2,0,0,4],["sort","RangeSort",3,13,0,4],["conditionalFormats","ConditionalFormatCollection",19,9,0,4],["dataValidation","DataValidation",35,5,0,4]],[["clear",1,0,0,2,0,32],["delete",1,0,0,2,0,34],["select",0,2],["_KeepReference",0,2],["merge",1,0,13,2,0,32],["unmerge",0,0,13],["_ValidateArraySize",2,2,14,4],["calculate",0,0,9],["showCard",0,0,11],["getImage",0,2,11,4],["replaceAll",3,0,6,2,0,32],["copyFrom",4,0,6,2,0,26],["convertToLinkedDataType",2,0,6],["convertDataTypeToText",0,0,6],["setDirty",0,0,6],["getCellProperties",1,0,6],["getRowProperties",1,0,6],["getColumnProperties",1,0,6],["setCellProperties",1,0,6],["setRowProperties",1,0,6],["setColumnProperties",1,0,6],["autoFill",2,0,6],["showTeachingCallout",2,0,6],["flashFill",0,0,6],["group",1,0,17],["ungroup",1,0,17],["showGroupDetails",1,0,17],["hideGroupDetails",1,0,17],["moveTo",1,0,7,2,0,26],["getDataClassificationIds",0,2,19,4]],[["getCell","Range",2,10,0,4],["getUsedRange","Range",1,10,0,4],["insert","Range",1,8,0,2,0,0,34],["getEntireColumn","Range",0,10,0,4],["getEntireRow","Range",0,10,0,4],["getOffsetRange","Range",2,10,0,4],["getRow","Range",1,10,0,4],["getColumn","Range",1,10,0,4],["getIntersection","Range",1,10,0,4],["getBoundingRect","Range",1,10,0,4],["getLastCell","Range",0,10,0,4],["getLastColumn","Range",0,10,0,4],["getLastRow","Range",0,10,0,4],["getIntersectionOrNullObject","Range",1,10,15,4],["getRowsAbove","Range",1,11,14,4],["getRowsBelow","Range",1,11,14,4],["getColumnsBefore","Range",1,11,14,4],["getColumnsAfter","Range",1,11,14,4],["getResizedRange","Range",2,11,14,4],["getVisibleView","RangeView",0,2,14,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getSurroundingRegion","Range",0,10,11,4],["getAbsoluteResizedRange","Range",2,10,11,4],["getTables","TableScopedCollection",1,6,6,4],["find","Range",2,10,6,4],["findOrNullObject","Range",2,10,6,4],["removeDuplicates","RemoveDuplicatesResult",2,8,6,2,0,0,33],["getSpecialCells","RangeAreas",2,10,6,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,6,4],["getSpillingToRange","Range",0,10,27,4],["getSpillParent","Range",0,10,27,4],["getSpillingToRangeOrNullObject","Range",0,10,27,4],["getSpillParentOrNullObject","Range",0,10,27,4],["getMergedAreas","RangeAreas",0,10,19,4],["getPivotTables","PivotTableScopedCollection",1,6,27,4],["getPrecedents","WorkbookRangeAreas",0,10,18,4],["getDirectPrecedents","WorkbookRangeAreas",0,10,27,4],["getDependents","WorkbookRangeAreas",0,10,35,4],["getDirectDependents","WorkbookRangeAreas",0,10,23,4],["getExtendedRange","Range",2,10,23,4],["getRangeEdge","Range",2,10,23,4],["getNumberFormatProperties","NumberFormatPropertyCollection",0,6,8,4],["getSurroundingDataRegion","Range",0,2,8,4],["getMergedAreasOrNullObject","RangeAreas",0,0,23,2,0,0,31]]],["RangeAreas",2,[["_ReferenceId",2],["address",3],["addressLocal",3],["areaCount",3],["cellCount",3],["isEntireColumn",3],["isEntireRow",3],["style",1],["addressR1C1",2,3]],[["areas","RangeCollection",19,0,0,4],["conditionalFormats","ConditionalFormatCollection",19,0,0,4],["format","RangeFormat",35,0,0,4],["dataValidation","DataValidation",35,0,0,4],["worksheet","Worksheet",2,0,0,4]],[["_KeepReference",0,2],["calculate"],["clear",1],["setDirty"],["copyFrom",4],["convertToLinkedDataType",2],["convertDataTypeToText"],["select",0,2,8]],[["getEntireColumn","RangeAreas",0,10,0,4],["getEntireRow","RangeAreas",0,10,0,4],["getIntersection","RangeAreas",1,10,0,4],["getIntersectionOrNullObject","RangeAreas",1,10,0,4],["getOffsetRangeAreas","RangeAreas",2,10,0,4],["getUsedRangeAreas","RangeAreas",1,10,0,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,10,0,4],["getTables","TableScopedCollection",1,6,0,4],["getSpecialCells","RangeAreas",2,10,0,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,0,4]]],["WorkbookRangeAreas",2,[["_ReferenceId",2],["addresses",3]],[["ranges","RangeCollection",19,0,0,4],["areas","RangeAreasCollection",19,0,0,4]],[["_KeepReference",0,2]],[["getRangeAreasBySheet","RangeAreas",1,10,0,4],["getRangeAreasOrNullObjectBySheet","RangeAreas",1,10,0,4]]],["RangeView",0,[["numberFormat",1],["values",1],["text",3],["formulas",1],["formulasLocal",1],["formulasR1C1",1],["valueTypes",3],["rowCount",3],["columnCount",3],["cellAddresses",3],["index",3],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["rows","RangeViewCollection",19,0,0,4]],0,[["getRange","Range",0,10,0,4]]],["RangeViewCollection",1,0,0,[["getCount",0,2,15,4]],[["getItemAt","RangeView",1,2,0,4]],0,"RangeView"],["SettingCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Setting",1,18,0,4],["add","Setting",2,9],["getItemOrNullObject","Setting",1,2,0,4]],0,"Setting",[["SettingsChanged",3,0,"_CC.office10EventIdSettingsChangedEvent","","",""]]],["Setting",8,[["key",3],["value",5],["_Id",2]],0,[["delete"]]],["NamedItemCollection",5,0,0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","NamedItem",1,18,0,4],["getItemOrNullObject","NamedItem",1,2,15,4],["add","NamedItem",3,8,15],["addFormulaLocal","NamedItem",3,0,15]],0,"NamedItem",[["Added",0,3,"MessageType.namedItemAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.namedItemDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["NamedItem",0,[["name",3],["type",3],["value",3],["visible",1],["_Id",2],["comment",1,15],["scope",3,15],["formula",1,11],["valueAsJson",3,24],["valueAsJsonLocal",3,24]],[["worksheet","Worksheet",2,15,0,4],["worksheetOrNullObject","Worksheet",2,15,0,4],["arrayValues","NamedItemArrayValues",3,11,0,4]],[["delete",0,0,15]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,15,4]]],["NamedItemArrayValues",0,[["values",3],["types",3],["valuesAsJson",3,24],["valuesAsJsonLocal",3,24]]],["Binding",0,[["id",3],["type",3]],0,[["getText",0,2,0,4],["delete",0,0,14]],[["getTable","Table",0,2,0,4],["getRange","Range",0,2,0,4]],0,0,[["DataChanged",3,14,"_CC.office10EventIdBindingDataChangedEvent","this.id","",""],["SelectionChanged",3,14,"_CC.office10EventIdBindingSelectionChangedEvent","this.id","",""]]],["BindingCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","Binding",1,18,0,4],["getItemAt","Binding",1,2,0,4],["add","Binding",3,8,14],["addFromNamedItem","Binding",3,0,14],["addFromSelection","Binding",2,0,14],["getItemOrNullObject","Binding",1,2,15,4]],0,"Binding"],["TableCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["_RegisterAddedEvent",0,0,6,2,0,1],["_UnregisterAddedEvent",0,0,6,2,0,1],["_RegisterDeletedEvent",0,0,6,2,0,1],["_UnregisterDeletedEvent",0,0,6,2,0,1],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1]],[["getItem","Table",1,18,0,4],["getItemAt","Table",1,2,0,4],["add","Table",2,8,0,2,0,0,33],["getItemOrNullObject","Table",1,2,15,4],["addQueryTable","Table",2,0,8]],0,"Table",[["Added",0,6,"MessageType.tableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",2,11,"MessageType.tableDataChangedEvent","this._eventTargetId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Deleted",0,6,"MessageType.tableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this._eventTargetId","_RegisterFilteredEvent","_UnregisterFilteredEvent"]]],["TableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getFirst","Table",0,10,0,4],["getItem","Table",1,18,0,4],["getItemOrNullObject","Table",1,2,18,4]],0,"Table"],["Table",24,[["id",3],["name",1,0,0,2,26],["showHeaders",1,0,0,2,33],["showTotals",1,0,0,2,33],["style",1,0,0,2,33],["highlightFirstColumn",1,14,0,2,33],["highlightLastColumn",1,14,0,2,33],["showBandedRows",1,14,0,2,33],["showBandedColumns",1,14,0,2,33],["showFilterButton",1,14,0,2,33],["legacyId",3,5]],[["columns","TableColumnCollection",19,0,0,4],["rows","TableRowCollection",19,0,0,4],["sort","TableSort",3,13,0,4],["worksheet","Worksheet",2,13,0,4],["autoFilter","AutoFilter",3,6,0,4],["tableStyle","TableStyle",35,8,0,4]],[["delete",0,0,0,2,0,26],["clearFilters",0,0,13],["reapplyFilters",0,0,13,2,0,26],["_RegisterSelectionChangedEvent",0,0,11,2,0,1],["_UnregisterSelectionChangedEvent",0,0,11,2,0,1],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["clearStyle",0,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["resize",1,0,23,2,0,26],["setStyle",1,0,8]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4],["convertToRange","Range",0,8,13,2,0,0,26]],"workbook.tables",0,[["Changed",2,11,"MessageType.tableDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["SelectionChanged",2,11,"MessageType.tableSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["TableColumnCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","TableColumn",1,18,0,4],["getItemAt","TableColumn",1,2,0,4],["add","TableColumn",3,8,0,2,0,0,34],["getItemOrNullObject","TableColumn",1,2,15,4],["addAsJson","TableColumn",3,0,24]],0,"TableColumn"],["TableColumn",0,[["id",3],["index",3],["values",1],["name",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["filter","Filter",3,13,0,4]],[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4]]],["TableRowCollection",1,[["count",3]],0,[["getCount",0,2,15,4],["deleteRows",1,0,19],["deleteRowsAt",2,0,19,2,0,26]],[["getItemAt","TableRow",1,2,0,4],["add","TableRow",3,8,0,2,0,0,34],["addAsJson","TableRow",3,0,24]],0,"TableRow"],["TableRow",0,[["index",3],["values",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],0,[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4]]],["DataValidation",0,[["type",3],["rule",1],["prompt",1],["errorAlert",1],["ignoreBlanks",1],["valid",3]],0,[["clear"]],[["getInvalidCells","RangeAreas",0,10,6,4],["getInvalidCellsOrNullObject","RangeAreas",0,10,6,4]]],["RemoveDuplicatesResult",0,[["removed",3],["uniqueRemaining",3]]],["RangeFormat",0,[["wrapText",1,0,0,2,32],["horizontalAlignment",1,0,0,2,32],["verticalAlignment",1,0,0,2,32],["columnWidth",1,13,0,2,32],["rowHeight",1,13,0,2,32],["textOrientation",1,11,0,2,32],["useStandardHeight",1,11],["useStandardWidth",1,11],["readingOrder",1,6],["shrinkToFit",1,6],["indentLevel",1,6,0,2,32],["autoIndent",1,6]],[["fill","RangeFill",35,0,0,4],["font","RangeFont",35,0,0,4],["borders","RangeBorderCollection",51,0,0,4],["protection","FormatProtection",35,13,0,4]],[["autofitColumns",0,0,13,2,0,32],["autofitRows",0,0,13,2,0,32],["adjustIndent",1,0,7,2,0,34]]],["FormatProtection",0,[["locked",1],["formulaHidden",1]]],["RangeFill",0,[["color",1,0,0,2,32],["tintAndShade",1,6],["patternTintAndShade",1,6],["pattern",1,6],["patternColor",1,6]],0,[["clear",0,0,0,2,0,32]]],["RangeBorder",0,[["sideIndex",3],["style",1,0,0,2,32],["weight",1,0,0,2,32],["color",1,0,0,2,32],["tintAndShade",1,6]]],["RangeBorderCollection",1,[["count",3],["tintAndShade",1,6]],0,0,[["getItem","RangeBorder",1,18,0,4],["getItemAt","RangeBorder",1,2,0,4]],0,"RangeBorder"],["RangeFont",0,[["name",1,0,0,2,32],["size",1,0,0,2,32],["color",1,0,0,2,12],["italic",1,0,0,2,32],["bold",1,0,0,2,32],["underline",1,0,0,2,32],["strikethrough",1,6,0,2,32],["subscript",1,6],["superscript",1,6],["tintAndShade",1,6]]],["ChartCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,5,2,0,1],["_UnregisterAddedEvent",0,0,5,2,0,1],["_RegisterActivatedEvent",0,0,5,2,0,29],["_UnregisterActivatedEvent",0,0,5,2,0,29],["_RegisterDeactivatedEvent",0,0,5,2,0,29],["_UnregisterDeactivatedEvent",0,0,5,2,0,29],["_RegisterDeletedEvent",0,0,5,2,0,29],["_UnregisterDeletedEvent",0,0,5,2,0,29]],[["add","Chart",3,9,0,2,0,0,36],["getItemAt","Chart",1,2,0,4],["_GetItem","Chart",1,18,0,4],["getItem","Chart",1,2,0,4],["getItemOrNullObject","Chart",1,2,15,4]],0,"Chart",[["Activated",0,5,"MessageType.chartActivatedEvent","this._ParentObject.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,5,"MessageType.chartAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this._ParentObject.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,5,"MessageType.chartDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Chart",0,[["name",1,0,0,2,37],["top",1,0,0,2,36],["left",1,0,0,2,36],["width",1,0,0,2,36],["height",1,0,0,2,36],["id",3,11],["showAllFieldButtons",1,11,0,2,36],["chartType",1,11,0,2,37],["showDataLabelsOverMaximum",1,5,0,2,37],["categoryLabelLevel",1,5,0,2,37],["style",1,5,0,2,37],["displayBlanksAs",1,5,0,2,37],["plotBy",1,5,0,2,37],["plotVisibleOnly",1,5,0,2,37],["seriesNameLevel",1,5,0,2,37]],[["title","ChartTitle",35,0,0,4],["dataLabels","ChartDataLabels",35,0,0,4],["legend","ChartLegend",35,0,0,4],["series","ChartSeriesCollection",19,0,0,4],["axes","ChartAxes",35,0,0,4],["format","ChartAreaFormat",35,0,0,4],["worksheet","Worksheet",2,13,0,4],["plotArea","ChartPlotArea",35,5,0,4],["pivotOptions","ChartPivotOptions",35,6,0,4]],[["setData",2,1,0,2,0,36],["delete",0,0,0,2,0,36],["setPosition",2,0,0,2,0,36],["getImage",3,2,13,4],["_RegisterActivatedEvent",0,0,5,2,0,1],["_UnregisterActivatedEvent",0,0,5,2,0,1],["_RegisterDeactivatedEvent",0,0,5,2,0,1],["_UnregisterDeactivatedEvent",0,0,5,2,0,1],["activate",0,2,6],["getDataRange",0,0,28],["getDataRangeOrNullObject",0,0,28]],[["getDataTable","ChartDataTable",0,2,18,4],["getDataTableOrNullObject","ChartDataTable",0,2,18,4]],0,0,[["Activated",0,5,"MessageType.chartActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["ChartPivotOptions",0,[["showAxisFieldButtons",1,0,0,2,37],["showLegendFieldButtons",1,0,0,2,37],["showReportFilterFieldButtons",1,0,0,2,37],["showValueFieldButtons",1,0,0,2,37]]],["ChartAreaFormat",0,[["roundedCorners",1,6,0,2,37],["colorScheme",1,6,0,2,37]],[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartSeriesCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartSeries",1,2,0,4],["add","ChartSeries",2,8,11,2,0,0,36]],0,"ChartSeries"],["ChartSeries",0,[["name",1,0,0,2,36],["chartType",1,11,0,2,10],["hasDataLabels",1,11,0,2,37],["filtered",1,11,0,2,37],["markerSize",1,11,0,2,36],["markerStyle",1,11,0,2,36],["showShadow",1,11,0,2,37],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36],["smooth",1,11,0,2,37],["plotOrder",1,11,0,2,37],["gapWidth",1,11,0,2,36],["doughnutHoleSize",1,11,0,2,36],["axisGroup",1,5,0,2,36],["explosion",1,5,0,2,37],["firstSliceAngle",1,5,0,2,37],["invertIfNegative",1,5,0,2,37],["bubbleScale",1,6,0,2,37],["secondPlotSize",1,5,0,2,37],["splitType",1,5,0,2,37],["splitValue",1,6,0,2,37],["varyByCategories",1,5,0,2,37],["showLeaderLines",1,6,0,2,37],["overlap",1,5,0,2,36],["gradientStyle",1,6,0,2,37],["gradientMinimumType",1,6,0,2,37],["gradientMidpointType",1,6,0,2,37],["gradientMaximumType",1,6,0,2,37],["gradientMinimumValue",1,6,0,2,37],["gradientMidpointValue",1,6,0,2,37],["gradientMaximumValue",1,6,0,2,37],["gradientMinimumColor",1,6,0,2,37],["gradientMidpointColor",1,6,0,2,37],["gradientMaximumColor",1,6,0,2,37],["parentLabelStrategy",1,6,0,2,37],["showConnectorLines",1,6,0,2,37],["invertColor",1,6,0,2,37]],[["points","ChartPointsCollection",19,0,0,4],["format","ChartSeriesFormat",35,0,0,4],["trendlines","ChartTrendlineCollection",19,11,0,4],["xErrorBars","ChartErrorBars",35,6,0,4],["yErrorBars","ChartErrorBars",35,6,0,4],["dataLabels","ChartDataLabels",35,5,0,4],["binOptions","ChartBinOptions",35,6,0,4],["mapOptions","ChartMapOptions",35,6,0,4],["boxwhiskerOptions","ChartBoxwhiskerOptions",35,6,0,4]],[["delete",0,0,11,2,0,36],["setXAxisValues",1,0,11,2,0,36],["setValues",1,0,11,2,0,36],["setBubbleSizes",1,0,11,2,0,37],["getDimensionValues",1,0,27,2,0,37],["getDimensionDataSourceString",1,0,35],["getDimensionDataSourceType",1,0,35]]],["ChartSeriesFormat",0,0,[["fill","ChartFill",3,0,0,4],["line","ChartLineFormat",35,0,0,4]]],["ChartPointsCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartPoint",1,2,0,4]],0,"ChartPoint"],["ChartPoint",0,[["value",3],["hasDataLabel",1,11,0,2,37],["markerStyle",1,11,0,2,36],["markerSize",1,11,0,2,36],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36]],[["format","ChartPointFormat",35,0,0,4],["dataLabel","ChartDataLabel",35,11,0,4]]],["ChartPointFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartAxes",0,0,[["categoryAxis","ChartAxis",35,0,0,4],["seriesAxis","ChartAxis",35,0,0,4],["valueAxis","ChartAxis",35,0,0,4]],0,[["getItem","ChartAxis",2,2,11,4]]],["ChartAxis",0,[["majorUnit",1,0,0,2,37],["maximum",1,0,0,2,36],["minimum",1,0,0,2,36],["minorUnit",1,0,0,2,37],["displayUnit",1,11,0,2,36],["showDisplayUnitLabel",1,11,0,2,37],["customDisplayUnit",3,11],["type",3,11],["minorTimeUnitScale",1,11,0,2,37],["majorTimeUnitScale",1,11,0,2,37],["baseTimeUnit",1,11,0,2,37],["categoryType",1,11,0,2,37],["axisGroup",3,11],["scaleType",1,11,0,2,37],["logBase",1,11,0,2,37],["left",3,11],["top",3,11],["height",3,11],["width",3,11],["reversePlotOrder",1,11,0,2,36],["crosses",1,11,0,2,36],["crossesAt",3,11],["visible",1,11,0,2,37],["isBetweenCategories",1,5,0,2,36],["majorTickMark",1,11,0,2,37],["minorTickMark",1,11,0,2,37],["tickMarkSpacing",1,11,0,2,37],["tickLabelPosition",1,11,0,2,36],["tickLabelSpacing",1,11,0,2,37],["alignment",1,5,0,2,37],["multiLevel",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["offset",1,5,0,2,37],["textOrientation",1,5,0,2,37],["position",1,5,0,2,36],["positionAt",3,5]],[["majorGridlines","ChartGridlines",35,0,0,4],["minorGridlines","ChartGridlines",35,0,0,4],["title","ChartAxisTitle",35,0,0,4],["format","ChartAxisFormat",35,0,0,4]],[["setCategoryNames",1,0,11,2,0,37],["setCustomDisplayUnit",1,0,11,2,0,37],["setCrossesAt",1,0,11,2,0,37],["setPositionAt",1,0,5,2,0,37]]],["ChartAxisFormat",0,0,[["font","ChartFont",35,0,0,4],["line","ChartLineFormat",35,0,0,4],["fill","ChartFill",3,5,0,4]]],["ChartAxisTitle",0,[["text",1,0,0,2,36],["visible",1,0,0,2,37],["textOrientation",1,27,0,2,37]],[["format","ChartAxisTitleFormat",35,0,0,4]],[["setFormula",1,0,5,2,0,37]]],["ChartAxisTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,5,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataLabels",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["textOrientation",1,5,0,2,37],["autoText",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["showAsDataCallout",3,8,0,2,37],["geometricShapeType",1,8,0,2,37]],[["format","ChartDataLabelFormat",35,0,0,4]]],["ChartDataLabel",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["top",1,5,0,2,37],["left",1,5,0,2,37],["width",3,5],["height",3,5],["formula",1,5,0,2,37],["textOrientation",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["text",1,5,0,2,37],["autoText",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["geometricShapeType",1,8,0,2,37],["showAsDataCallout",3,8,0,2,37]],[["format","ChartDataLabelFormat",35,5,0,4]],0,[["getSubstring","ChartFormatString",2,2,8,4]]],["ChartDataLabelFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataTable",0,[["visible",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showHorizontalBorder",1,0,0,2,37],["showVerticalBorder",1,0,0,2,37],["showOutlineBorder",1,0,0,2,37]],[["format","ChartDataTableFormat",35,0,0,4]]],["ChartDataTableFormat",0,0,[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,0,0,4]]],["ChartErrorBars",0,[["endStyleCap",1,0,0,2,37],["include",1,0,0,2,37],["type",1,0,0,2,37],["visible",1,0,0,2,37]],[["format","ChartErrorBarsFormat",35,0,0,4]]],["ChartErrorBarsFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartGridlines",0,[["visible",1,0,0,2,36]],[["format","ChartGridlinesFormat",35,0,0,4]]],["ChartGridlinesFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartLegend",0,[["visible",1,0,0,2,36],["position",1,0,0,2,36],["overlay",1,0,0,2,37],["left",1,11,0,2,37],["top",1,11,0,2,37],["width",1,11,0,2,37],["height",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartLegendFormat",35,0,0,4],["legendEntries","ChartLegendEntryCollection",19,11,0,4]]],["ChartLegendEntry",0,[["visible",1,0,0,2,37],["left",3,5],["top",3,5],["width",3,5],["height",3,5],["index",3,5]]],["ChartLegendEntryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","ChartLegendEntry",1,2,0,4]],0,"ChartLegendEntry"],["ChartLegendFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartMapOptions",0,[["level",1,0,0,2,37],["labelStrategy",1,0,0,2,37],["projectionType",1,0,0,2,37]]],["ChartTitle",0,[["visible",1,0,0,2,37],["text",1,0,0,2,36],["overlay",1,0,0,2,37],["horizontalAlignment",1,11,0,2,37],["top",1,11,0,2,37],["left",1,11,0,2,37],["width",3,11],["height",3,11],["verticalAlignment",1,11,0,2,37],["textOrientation",1,11,0,2,37],["position",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartTitleFormat",35,0,0,4]],[["setFormula",1,0,11,2,0,37]],[["getSubstring","ChartFormatString",2,2,11,4]]],["ChartFormatString",0,0,[["font","ChartFont",35,0,0,4]]],["ChartTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartFill",4,0,0,[["setSolidColor",1,0,0,2,0,36],["clear",0,0,0,2,0,37],["getSolidColor",0,0,24,2,0,37]]],["ChartBorder",0,[["color",1,0,0,2,36],["lineStyle",1,0,0,2,36],["weight",1,0,0,2,36]],0,[["clear",0,0,5,2,0,37]]],["ChartBinOptions",0,[["type",1,0,0,2,36],["width",1,0,0,2,36],["count",1,0,0,2,36],["allowOverflow",1,0,0,2,37],["allowUnderflow",1,0,0,2,37],["overflowValue",1,0,0,2,36],["underflowValue",1,0,0,2,36]]],["ChartBoxwhiskerOptions",0,[["showInnerPoints",1,0,0,2,37],["showOutlierPoints",1,0,0,2,37],["showMeanMarker",1,0,0,2,37],["showMeanLine",1,0,0,2,37],["quartileCalculation",1,0,0,2,37]]],["ChartLineFormat",0,[["color",1,0,0,2,36],["lineStyle",1,11,0,2,36],["weight",1,11,0,2,36]],0,[["clear",0,0,0,2,0,37]]],["ChartFont",0,[["bold",1,0,0,2,37],["color",1,0,0,2,36],["italic",1,0,0,2,37],["name",1,0,0,2,37],["size",1,0,0,2,37],["underline",1,0,0,2,37]]],["ChartTrendline",0,[["type",1,0,0,2,37],["polynomialOrder",1,0,0,2,37],["movingAveragePeriod",1,0,0,2,37],["_Id",2],["showEquation",1,5,0,2,37],["showRSquared",1,5,0,2,37],["forwardPeriod",1,5,0,2,37],["backwardPeriod",1,5,0,2,37],["name",1,0,0,2,37],["intercept",1,0,0,2,37]],[["format","ChartTrendlineFormat",35,0,0,4],["label","ChartTrendlineLabel",35,5,0,4]],[["delete",0,0,0,2,0,37]]],["ChartTrendlineCollection",1,0,0,[["getCount",0,2,0,4]],[["add","ChartTrendline",1,8,0,2,0,0,36],["getItem","ChartTrendline",1,18,0,4]],0,"ChartTrendline"],["ChartTrendlineFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartTrendlineLabel",0,[["top",1,0,0,2,37],["left",1,0,0,2,37],["width",3],["height",3],["formula",1,0,0,2,37],["textOrientation",1,0,0,2,37],["horizontalAlignment",1,0,0,2,37],["verticalAlignment",1,0,0,2,37],["text",1,0,0,2,37],["autoText",1,0,0,2,37],["numberFormat",1,0,0,2,37],["linkNumberFormat",1,6,0,2,37]],[["format","ChartTrendlineLabelFormat",35,0,0,4]]],["ChartTrendlineLabelFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,0,0,4],["font","ChartFont",35,0,0,4]]],["ChartPlotArea",0,[["left",1,0,0,2,37],["top",1,0,0,2,37],["width",1,0,0,2,37],["height",1,0,0,2,37],["insideLeft",1,0,0,2,37],["insideTop",1,0,0,2,37],["insideWidth",1,0,0,2,37],["insideHeight",1,0,0,2,37],["position",1,0,0,2,37]],[["format","ChartPlotAreaFormat",35,0,0,4]]],["ChartPlotAreaFormat",0,0,[["border","ChartBorder",35,0,0,4],["fill","ChartFill",3,0,0,4]]],["VisualCollection",5,0,0,[["getDefinitions",0,2,0,4],["getPreview",4,2,0,4],["bootstrapAgaveVisual",0,0,0,2],["getCount",0,2,0,4],["_RegisterSelectionChangedEvent",0,2],["_UnregisterSelectionChangedEvent",0,2]],[["add","Visual",3,8,0,2],["_GetItem","Visual",1,18,0,4],["getSelectedOrNullObject","Visual",0,2,0,4]],0,"Visual",[["AgaveVisualUpdate",2,0,"MessageType.agaveVisualUpdateEvent","","null","null"],["SelectionChanged",0,0,"MessageType.visualSelectionChangedEvent","this._ParentObject.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["Visual",0,[["id",3],["isSupportedInVisualTaskpane",3]],[["properties","VisualPropertyCollection",18,0,0,4]],[["delete",0,0,0,2],["getProperty",1,2,0,4],["setProperty",2,0,0,2],["changeDataSource",2,0,0,2],["getDataSource",0,2,0,4],["setPropertyToDefault",1,0,0,2],["_RegisterChangeEvent",0,2],["_UnregisterChangeEvent",0,2],["serializeProperties",0,2,0,4],["deserializeProperties",1,0,0,2],["addChildProperty",2,0,19,2],["removeChildProperty",2,0,19,2],["getDataFieldAssignments",0,0,3],["getDataConfig",0,2,3,4],["modifyDataConfig",1,0,3,2]],[["getChildProperties","VisualPropertyCollection",2,6,0,4],["getDataControllerClient","DataControllerClient",0,2,0,4],["getElementChildProperties","VisualPropertyCollection",3,6,0,4]],0,0,[["ChangeNotification",2,0,"MessageType.visualChangeEvent","this.id","_RegisterChangeEvent","_UnregisterChangeEvent"]]],["VisualProperty",0,[["type",3],["value",3],["id",3],["localizedName",3],["options",3],["localizedOptions",3],["hasDefault",3],["isDefault",3],["min",3],["max",3],["stepSize",3],["hideMeButShowChildrenUI",3],["expandableUI",3],["nextPropOnSameLine",3],["showResetUI",3],["size",3,19],["minSize",3,19],["maxSize",3,19],["index",3,19],["parentName",3,19]],0,[["getBoolMetaProperty",1,2,0,4]]],["VisualPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","VisualProperty",1,18,0,4],["getItemAt","VisualProperty",1,2,0,4]],0,"VisualProperty"],["DataControllerClient",0,0,0,[["getWells",0,2,0,4],["getAssociatedFields",1,2,0,4],["getAvailableFields",1,2,0,4],["addField",3,0,0,2],["removeField",2,0,0,2],["moveField",3,0,0,2]]],["RangeSort",0,0,0,[["apply",5,0,0,2,0,32]]],["TableSort",0,[["matchCase",3],["method",3],["fields",3]],0,[["apply",3,0,0,2,0,26],["clear"],["reapply"]]],["Filter",0,[["criteria",3]],0,[["apply",1],["clear",0,0,0,2,0,34],["applyBottomItemsFilter",1,0,0,2,0,34],["applyBottomPercentFilter",1,0,0,2,0,34],["applyCellColorFilter",1,0,0,2,0,34],["applyDynamicFilter",1,0,0,2,0,34],["applyFontColorFilter",1,0,0,2,0,34],["applyValuesFilter",1,0,0,2,0,34],["applyTopItemsFilter",1,0,0,2,0,34],["applyTopPercentFilter",1,0,0,2,0,34],["applyIconFilter",1,0,0,2,0,34],["applyCustomFilter",3,0,0,2,0,34]]],["AutoFilter",0,[["enabled",3],["isDataFiltered",3],["criteria",3]],0,[["apply",3,0,0,2,0,33],["reapply",0,0,0,2,0,26],["remove",0,0,0,2,0,26],["clearCriteria",0,0,0,2,0,26],["clearColumnCriteria",1,0,18]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4]]],["CultureInfo",0,[["name",3]],[["numberFormat","NumberFormatInfo",3,0,0,4],["datetimeFormat","DatetimeFormatInfo",3,27,0,4]]],["NumberFormatInfo",0,[["numberDecimalSeparator",3],["numberGroupSeparator",3],["currencySymbol",3,30]]],["DatetimeFormatInfo",0,[["dateSeparator",3],["longDatePattern",3],["shortDatePattern",3],["timeSeparator",3],["longTimePattern",3]]],["CustomXmlPartScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4],["getOnlyItem","CustomXmlPart",0,2,0,4],["getOnlyItemOrNullObject","CustomXmlPart",0,2,0,4]],0,"CustomXmlPart"],["CustomXmlPartCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["add","CustomXmlPart",1,8],["getByNamespace","CustomXmlPartScopedCollection",1,6,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4]],0,"CustomXmlPart"],["CustomXmlPart",0,[["id",3],["namespaceUri",3]],0,[["delete"],["getXml",0,2,0,4],["setXml",1]]],["_V1Api",0,0,0,[["bindingGetData",1,2,0,4],["getSelectedData",1,2,0,4],["gotoById",1,2,0,4],["bindingAddFromSelection",1,2],["bindingGetById",1,2,0,4],["bindingReleaseById",1,2],["bindingGetAll",0,2,0,4],["bindingAddFromNamedItem",1,2],["bindingAddFromPrompt",1,2],["bindingDeleteAllDataValues",1],["setSelectedData",1],["bindingClearFormats",1],["bindingSetData",1],["bindingSetFormats",1],["bindingSetTableOptions",1],["bindingAddRows",1],["bindingAddColumns",1],["getFilePropertiesAsync",0,2,9,4]]],["PivotTableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotTable",1,18,0,4],["getFirst","PivotTable",0,10,0,4],["getItemOrNullObject","PivotTable",1,2,0,4],["getFirstOrNullObject","PivotTable",0,2,35,4]],0,"PivotTable"],["PivotTableCollection",5,0,0,[["refreshAll",0,0,0,2,0,12],["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","PivotTable",1,18,0,4],["getItemOrNullObject","PivotTable",1,2,15,4],["add","PivotTable",3,8,5,2,0,0,12]],0,"PivotTable",[["Added",0,3,"MessageType.pivotTableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.pivotTableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["PivotTable",0,[["name",1,0,0,2,12],["id",3,16],["useCustomSortLists",1,6,0,2,12],["enableDataValueEditing",1,6,0,2,12],["refreshOnOpen",0,23,0,2,29],["allowMultipleFiltersPerField",0,27,0,2,12]],[["worksheet","Worksheet",2,0,0,4],["hierarchies","PivotHierarchyCollection",19,5,0,4],["rowHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["columnHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["dataHierarchies","DataPivotHierarchyCollection",19,5,0,4],["filterHierarchies","FilterPivotHierarchyCollection",19,5,0,4],["layout","PivotLayout",2,5,0,4]],[["refresh",0,0,0,2,0,12],["delete",0,0,5,2,0,12],["getDataSourceString",0,2,35,4],["getDataSourceType",0,2,35,4]],[["addDateGroup","PivotHierarchy",2,0,8,2,0,0,38]]],["PivotLayout",0,[["showColumnGrandTotals",1,0,0,2,12],["showRowGrandTotals",1,0,0,2,12],["enableFieldList",1,17,0,2,12],["subtotalLocation",1,0,0,2,12],["layoutType",1,0,0,2,12],["autoFormat",1,6,0,2,12],["preserveFormatting",1,6,0,2,12],["altTextDescription",0,23,0,2,29],["altTextTitle",0,23,0,2,29],["emptyCellText",0,23,0,2,29],["fillEmptyCells",0,23,0,2,29],["showFieldHeaders",0,23,0,2,29],["tabularValues",3,8],["tabularText",3,8],["tabularNumberFormat",3,8],["tabularNumberFormatLocal",3,8]],[["pivotStyle","PivotTableStyle",35,8,0,4]],[["setAutoSortOnCell",2,0,6,2,0,12],["setStyle",1,0,8,2,0,12],["displayBlankLineAfterEachItem",1,0,23,2,0,29],["repeatAllItemLabels",1,0,23,2,0,29]],[["getRange","Range",0,3],["getRowLabelRange","Range",0,3],["getColumnLabelRange","Range",0,3],["getFilterAxisRange","Range",0,3],["getDataBodyRange","Range",0,3],["getCell","Range",3,2,8],["getPivotItems","PivotItemCollection",2,4,6],["getDataHierarchy","DataPivotHierarchy",1,3,6]]],["PivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotHierarchy",1,18,0,4],["getItemOrNullObject","PivotHierarchy",1,2,0,4]],0,"PivotHierarchy"],["PivotHierarchy",0,[["id",3],["name",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]]],["RowColumnPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","RowColumnPivotHierarchy",1,18,0,4],["getItemOrNullObject","RowColumnPivotHierarchy",1,2,0,4],["add","RowColumnPivotHierarchy",1,8,0,2,0,0,12]],0,"RowColumnPivotHierarchy"],["RowColumnPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["FilterPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","FilterPivotHierarchy",1,18,0,4],["getItemOrNullObject","FilterPivotHierarchy",1,2,0,4],["add","FilterPivotHierarchy",1,8,0,2,0,0,12]],0,"FilterPivotHierarchy"],["FilterPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["enableMultipleFilterItems",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["DataPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","DataPivotHierarchy",1,18,0,4],["getItemOrNullObject","DataPivotHierarchy",1,2,0,4],["add","DataPivotHierarchy",1,8,0,2,0,0,12]],0,"DataPivotHierarchy"],["DataPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["numberFormat",1,0,0,2,12],["summarizeBy",1,0,0,2,12],["showAs",1,0,0,2,12]],[["field","PivotField",35,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["PivotFieldCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotField",1,18,0,4],["getItemOrNullObject","PivotField",1,2,0,4]],0,"PivotField"],["PivotField",0,[["id",3],["name",1,0,0,2,12],["subtotals",1,0,0,2,12],["showAllItems",1,0,0,2,12]],[["items","PivotItemCollection",19,0,0,4]],[["sortByLabels",1,1,0,2,0,12],["sortByValues",3,0,6,2,0,12],["applyFilter",1,0,27,2,0,12],["clearAllFilters",0,0,27,2,0,12],["clearFilter",1,0,27,2,0,12],["getFilters",0,0,27],["isFiltered",1,0,27]]],["PivotItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotItem",1,18,0,4],["getItemOrNullObject","PivotItem",1,2,0,4]],0,"PivotItem"],["PivotItem",0,[["id",3],["name",1,0,0,2,12],["isExpanded",1,0,0,2,12],["visible",1,0,0,2,12]]],["WorksheetCustomProperty",0,[["key",3],["value",1],["_Id",2]],0,[["delete"]]],["WorksheetCustomPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","WorksheetCustomProperty",1,18,0,4],["getItemOrNullObject","WorksheetCustomProperty",1],["add","WorksheetCustomProperty",2,8]],0,"WorksheetCustomProperty"],["DocumentProperties",0,[["title",1],["subject",1],["author",1],["keywords",1],["comments",1],["lastAuthor",3],["revisionNumber",1],["creationDate",11],["category",1],["manager",1],["company",1]],[["custom","CustomPropertyCollection",19,0,0,4]]],["CustomProperty",0,[["key",3],["value",1],["type",3]],0,[["delete"]]],["CustomPropertyCollection",1,0,0,[["getCount",0,2,0,4],["deleteAll"]],[["getItemOrNullObject","CustomProperty",1,2,0,4],["add","CustomProperty",2,8],["getItem","CustomProperty",1,18,0,4]],0,"CustomProperty"],["ConditionalFormatCollection",1,0,0,[["getCount",0,2,0,4],["clearAll",0,0,0,2,0,39]],[["getItemAt","ConditionalFormat",1,2,0,4],["add","ConditionalFormat",1,8,0,2,0,0,39],["getItem","ConditionalFormat",1,18,0,4],["getItemOrNullObject","ConditionalFormat",1,2,18,4]],0,"ConditionalFormat"],["ConditionalFormat",0,[["stopIfTrue",1],["priority",1],["type",3],["id",3]],[["dataBarOrNullObject","DataBarConditionalFormat",35,0,0,4],["dataBar","DataBarConditionalFormat",35,0,0,4],["customOrNullObject","CustomConditionalFormat",35,0,0,4],["custom","CustomConditionalFormat",35,0,0,4],["iconSet","IconSetConditionalFormat",35,0,0,4],["iconSetOrNullObject","IconSetConditionalFormat",35,0,0,4],["colorScale","ColorScaleConditionalFormat",35,0,0,4],["colorScaleOrNullObject","ColorScaleConditionalFormat",35,0,0,4],["topBottom","TopBottomConditionalFormat",35,0,0,4],["topBottomOrNullObject","TopBottomConditionalFormat",35,0,0,4],["preset","PresetCriteriaConditionalFormat",35,0,0,4],["presetOrNullObject","PresetCriteriaConditionalFormat",35,0,0,4],["textComparison","TextConditionalFormat",35,0,0,4],["textComparisonOrNullObject","TextConditionalFormat",35,0,0,4],["cellValue","CellValueConditionalFormat",35,0,0,4],["cellValueOrNullObject","CellValueConditionalFormat",35,0,0,4]],[["delete",0,0,0,2,0,40],["changeRuleToCellValue",1,0,30],["changeRuleToColorScale",0,0,30],["changeRuleToContainsText",1,0,30],["changeRuleToCustom",1,0,30],["changeRuleToDataBar",0,0,30],["changeRuleToIconSet",0,0,30],["changeRuleToPresetCriteria",1,0,30],["changeRuleToTopBottom",1,0,30],["setRanges",1,0,30]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4],["getRanges","RangeAreas",0,10,6,4]]],["DataBarConditionalFormat",0,[["showDataBarOnly",1,0,0,2,40],["barDirection",1,0,0,2,41],["axisFormat",1,0,0,2,41],["axisColor",1,0,0,2,41],["lowerBoundRule",1,0,0,2,41],["upperBoundRule",1,0,0,2,41]],[["positiveFormat","ConditionalDataBarPositiveFormat",35,0,0,4],["negativeFormat","ConditionalDataBarNegativeFormat",35,0,0,4]]],["ConditionalDataBarPositiveFormat",0,[["fillColor",1,0,0,2,40],["gradientFill",1,0,0,2,40],["borderColor",1,0,0,2,40]]],["ConditionalDataBarNegativeFormat",0,[["fillColor",1,0,0,2,40],["matchPositiveFillColor",1,0,0,2,40],["borderColor",1,0,0,2,40],["matchPositiveBorderColor",1,0,0,2,40]]],["CustomConditionalFormat",0,0,[["rule","ConditionalFormatRule",35,0,0,4],["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalFormatRule",0,[["formula",1,0,0,2,41],["formulaLocal",1],["formulaR1C1",1]]],["IconSetConditionalFormat",0,[["reverseIconOrder",1,0,0,2,41],["showIconOnly",1,0,0,2,41],["style",1,0,0,2,41],["criteria",1,0,0,2,41]]],["ColorScaleConditionalFormat",0,[["threeColorScale",3],["criteria",1,0,0,2,41]]],["TopBottomConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["PresetCriteriaConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["TextConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["CellValueConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalRangeFormat",0,[["numberFormat",1]],[["fill","ConditionalRangeFill",35,0,0,4],["font","ConditionalRangeFont",35,0,0,4],["borders","ConditionalRangeBorderCollection",51,0,0,4]],[["clearFormat",0,0,30]]],["ConditionalRangeFont",0,[["color",1,0,0,2,42],["italic",1,0,0,2,42],["bold",1,0,0,2,42],["underline",1,0,0,2,42],["strikethrough",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeFill",0,[["color",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeBorder",0,[["sideIndex",3],["style",1,0,0,2,42],["color",1,0,0,2,42]]],["ConditionalRangeBorderCollection",1,[["count",3]],[["top","ConditionalRangeBorder",35,0,0,4],["bottom","ConditionalRangeBorder",35,0,0,4],["left","ConditionalRangeBorder",35,0,0,4],["right","ConditionalRangeBorder",35,0,0,4]],0,[["getItem","ConditionalRangeBorder",1,18,0,4],["getItemAt","ConditionalRangeBorder",1,2,0,4]],0,"ConditionalRangeBorder"],["NumberFormattingService",0,0,0,0,[["getFormatter","NumberFormatter",1,3]],0,0,0,"Microsoft.ExcelServices.NumberFormattingService",4],["NumberFormatter",0,[["isDateTime",3],["isPercent",3],["isCurrency",3],["isNumeric",3],["isText",3],["hasYear",3],["hasMonth",3],["hasDayOfWeek",3]],0,[["format",1,3]]],["CustomFunctionManager",36,[["status",2]],0,[["register",2]],0,0,0,0,"Microsoft.ExcelServices.CustomFunctionManager",4],["Style",0,[["builtIn",3],["formulaHidden",1],["horizontalAlignment",1],["includeAlignment",1],["includeBorder",1],["includeFont",1],["includeNumber",1],["includePatterns",1],["includeProtection",1],["indentLevel",1],["locked",1],["name",3],["numberFormat",1],["numberFormatLocal",1],["readingOrder",1],["shrinkToFit",1],["verticalAlignment",1],["wrapText",1],["textOrientation",5,5],["autoIndent",1,5]],[["borders","RangeBorderCollection",51,0,0,4],["font","RangeFont",35,0,0,4],["fill","RangeFill",35,0,0,4]],[["delete"]]],["StyleCollection",1,0,0,[["add",1],["getCount",0,2,6,4]],[["getItem","Style",1,18,0,4],["getItemAt","Style",1,2,6,4],["getItemOrNullObject","Style",1,2,18,4]],0,"Style"],["TableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TableStyle",1,18,0,4],["getItemOrNullObject","TableStyle",1,2,0,4],["add","TableStyle",2,8],["getDefault","TableStyle"]],0,"TableStyle"],["TableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TableStyle"]]],["PivotTableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","PivotTableStyle",1,18,0,4],["getItemOrNullObject","PivotTableStyle",1,2,0,4],["add","PivotTableStyle",2,8],["getDefault","PivotTableStyle"]],0,"PivotTableStyle"],["PivotTableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","PivotTableStyle"]]],["SlicerStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","SlicerStyle",1,18,0,4],["getItemOrNullObject","SlicerStyle",1,2,0,4],["add","SlicerStyle",2,8],["getDefault","SlicerStyle"]],0,"SlicerStyle"],["SlicerStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","SlicerStyle"]]],["TimelineStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TimelineStyle",1,18,0,4],["getItemOrNullObject","TimelineStyle",1,2,0,4],["add","TimelineStyle",2,8],["getDefault","TimelineStyle"]],0,"TimelineStyle"],["TimelineStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TimelineStyle"]]],["InternalTest",0,0,0,[["delay",1],["triggerMessage",4,0,11],["_RegisterTestEvent",0,0,11,2,0,1],["_UnregisterTestEvent",0,0,11,2,0,1],["triggerTestEvent",2,0,11],["triggerPostProcess",0,0,11],["_RegisterTest1Event",0,0,11,2,0,1],["_UnregisterTest1Event",0,0,11,2,0,1],["triggerTestEventWithFilter",3,0,11],["firstPartyMethod",0,2,11,5],["_RegisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_RegisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["unregisterAllCustomFunctionExecutionEvents",0,0,20],["updateRangeValueOnCurrentSheet",2,0,3,2],["triggerUserUndo",0,2,3],["triggerUserRedo",0,2,3],["enterCellEdit",1,0,6],["installCustomFunctionsFromCache",0,0,6],["recalc",2,0,6],["recalcBySolutionId",1,0,6],["safeForCellEditModeMethod",1,0,6],["exitCellEdit",0,0,6],["noPermissionMethod",1,0,6],["verifyCustomFunctionListExist",0,0,6],["enableContentWorkbookLink",0,0,3],["previewExecutionMethod",1,0,8,16],["setRapidJsonEnabled",1,0,8],["triggerVbaRecorderRecordingChanged",2,0,8]],0,0,0,[["CustomFunctionExecutionBeginEvent",0,20,"MessageType.customFunctionExecutionBeginEvent","","_RegisterCustomFunctionExecutionBeginEvent","_UnregisterCustomFunctionExecutionBeginEvent"],["CustomFunctionExecutionEndEvent",0,20,"MessageType.customFunctionExecutionEndEvent","","_RegisterCustomFunctionExecutionEndEvent","_UnregisterCustomFunctionExecutionEndEvent"],["Test1Event",2,11,"MessageType.test1Event","","_RegisterTest1Event","_UnregisterTest1Event"],["TestEvent",2,11,"MessageType.testEvent","","_RegisterTestEvent","_UnregisterTestEvent"]],"Microsoft.ExcelServices.InternalTest",4],["PageLayout",0,[["orientation",1],["paperSize",1],["blackAndWhite",1],["printErrors",1],["zoom",1],["centerHorizontally",1],["centerVertically",1],["printHeadings",1],["printGridlines",1],["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["headerMargin",1],["footerMargin",1],["printComments",1],["draftMode",1],["firstPageNumber",1],["printOrder",1]],[["headersFooters","HeaderFooterGroup",35,0,0,4]],[["setPrintMargins",2],["setPrintArea",1],["setPrintTitleRows",1],["setPrintTitleColumns",1]],[["getPrintArea","RangeAreas",0,10,0,4],["getPrintAreaOrNullObject","RangeAreas",0,10,0,4],["getPrintTitleRows","Range",0,10,0,4],["getPrintTitleRowsOrNullObject","Range",0,10,0,4],["getPrintTitleColumns","Range",0,10,0,4],["getPrintTitleColumnsOrNullObject","Range",0,10,0,4]]],["HeaderFooter",0,[["leftHeader",1],["centerHeader",1],["rightHeader",1],["leftFooter",1],["centerFooter",1],["rightFooter",1]]],["HeaderFooterGroup",0,[["state",1],["useSheetMargins",1],["useSheetScale",1]],[["defaultForAllPages","HeaderFooter",35,0,0,4],["firstPage","HeaderFooter",35,0,0,4],["evenPages","HeaderFooter",35,0,0,4],["oddPages","HeaderFooter",35,0,0,4]]],["PageBreak",0,[["_Id",2],["columnIndex",3],["rowIndex",3]],0,[["delete"]],[["getCellAfterBreak","Range",0,10,0,4]]],["PageBreakCollection",1,0,0,[["removePageBreaks"],["getCount",0,2,0,4]],[["getItem","PageBreak",1,18,0,4],["add","PageBreak",1,8]],0,"PageBreak"],["DataConnectionCollection",0,0,0,[["refreshAll"]],[["add","DataConnection",4,8,8,2,0,0,12]]],["RangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","Range",1,2,0,4]],0,"Range"],["RangeAreasCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","RangeAreas",1,2,0,4]],0,"RangeAreas"],["CommentCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,2,27],["_UnregisterAddedEvent",0,2,27],["_RegisterDeletedEvent",0,2,27],["_UnregisterDeletedEvent",0,2,27],["_RegisterChangedEvent",0,2,27],["_UnregisterChangedEvent",0,2,27]],[["getItem","Comment",1,18,0,4],["getItemAt","Comment",1,2,0,4],["add","Comment",3,8],["getItemByReplyId","Comment",1,2,0,4],["getItemByCell","Comment",1,2,0,4],["getItemOrNullObject","Comment",1,2,18,4]],0,"Comment",[["Added",0,27,"MessageType.commentAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",0,27,"MessageType.commentChangedEvent","this._eventTargetId","_RegisterChangedEvent","_UnregisterChangedEvent"],["Deleted",0,27,"MessageType.commentDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Comment",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",1,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],[["replies","CommentReplyCollection",19,0,0,4]],[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["CommentReplyCollection",1,0,0,[["getCount",0,2,0,4]],[["add","CommentReply",2,8],["getItem","CommentReply",1,18,0,4],["getItemAt","CommentReply",1,2,0,4],["getItemOrNullObject","CommentReply",1,2,18,4]],0,"CommentReply"],["CommentReply",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",3,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],0,[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["getParentComment","Comment"],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["ShapeCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["addImage","Shape",1],["_GetItem","Shape",1,18,0,4],["addGeometricShape","Shape",1],["addTextBox","Shape",1],["addSvg","Shape",1,0,8],["addGroup","Shape",1],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["addLine","Shape",5],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape",[["Added",0,3,"MessageType.shapeAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.shapeDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Shape",0,[["id",3],["name",1],["left",1],["top",1],["width",1],["height",1],["rotation",1],["zOrderPosition",3],["altTextTitle",1],["altTextDescription",1,0,0,2,36],["type",3],["lockAspectRatio",1],["placement",1,17],["geometricShapeType",1],["visible",1],["level",3],["connectionSiteCount",3],["scriptLink",1,8,0,2,37],["displayName",3,35]],[["geometricShape","GeometricShape",2,0,0,4],["image","Image",2,0,0,4],["textFrame","TextFrame",2,0,0,4],["fill","ShapeFill",35,0,0,4],["group","ShapeGroup",2,0,0,4],["parentGroup","Shape",2,0,0,4],["line","Line",2,0,0,4],["lineFormat","ShapeLineFormat",35,0,0,4]],[["setZOrder",1],["incrementLeft",1],["incrementTop",1],["incrementRotation",1],["scaleHeight",3],["scaleWidth",3],["delete"],["getAsImage",1],["_RegisterActivatedEvent",0,0,0,2,0,1],["_UnregisterActivatedEvent",0,0,0,2,0,1],["_RegisterDeactivatedEvent",0,0,0,2,0,1],["_UnregisterDeactivatedEvent",0,0,0,2,0,1],["activate",0,0,3]],[["copyTo","Shape",1,8,17,0,0,"_GetShapeById"],["_GetShapeById","Shape",1,2,17,4]],0,0,[["Activated",0,0,"MessageType.shapeActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,0,"MessageType.shapeDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["GeometricShape",0,[["id",3]],[["shape","Shape",2,0,0,4]]],["Image",0,[["id",3],["format",3,0,"format"]],[["shape","Shape",2,0,0,4]]],["ShapeGroup",0,[["id",3]],[["shapes","GroupShapeCollection",19,0,0,4],["shape","Shape",2,0,0,4]],[["ungroup"]]],["GroupShapeCollection",1,0,0,[["getCount",0,2,0,4]],[["_GetItem","Shape",1,18,0,4],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape"],["Line",0,[["id",3],["connectorType",1,0,"connectorType"],["beginArrowheadLength",1],["beginArrowheadStyle",1],["beginArrowheadWidth",1],["endArrowheadLength",1],["endArrowheadStyle",1],["endArrowheadWidth",1],["isBeginConnected",3],["beginConnectedSite",3],["isEndConnected",3],["endConnectedSite",3]],[["shape","Shape",2,0,0,4],["beginConnectedShape","Shape",2,0,0,4],["endConnectedShape","Shape",2,0,0,4]],[["connectBeginShape",2],["disconnectBeginShape"],["connectEndShape",2],["disconnectEndShape"]]],["ShapeFill",0,[["foregroundColor",1],["type",3],["transparency",1]],0,[["clear"],["setSolidColor",1]]],["ShapeLineFormat",0,[["visible",1],["color",1],["style",1],["weight",1],["dashStyle",1],["transparency",1]]],["TextFrame",0,[["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["horizontalAlignment",1],["horizontalOverflow",1],["verticalAlignment",1],["verticalOverflow",1],["orientation",1],["readingOrder",1],["hasText",3],["autoSizeSetting",1]],[["textRange","TextRange",2,0,0,4]],[["deleteText"]]],["TextRange",0,[["text",1]],[["font","ShapeFont",35,0,0,4]],0,[["getSubstring","TextRange",2]]],["ShapeFont",0,[["size",1],["name",1],["color",1],["bold",1],["italic",1],["underline",1]]],["Slicer",0,[["id",3],["name",1],["caption",1],["left",1],["top",1],["width",1],["height",1],["nameInFormula",1,8],["isFilterCleared",3],["style",1],["sortBy",1],["sortUsingCustomLists",1,3],["columnCount",1,3],["disableMoveResizeUI",1,3],["displayHeader",1,3],["rowHeight",1,3],["shapeId",2,3]],[["slicerItems","SlicerItemCollection",19,0,0,4],["worksheet","Worksheet",35,0,0,4],["slicerStyle","SlicerStyle",35,8,0,4]],[["delete"],["clearFilters"],["getSelectedItems"],["selectItems",1],["activate",0,2,3],["setStyle",1,0,8]]],["SlicerCollection",1,0,0,[["getCount",0,2,0,4]],[["add","Slicer",3,8],["getItemAt","Slicer",1,2,0,4],["getItem","Slicer",1,18,0,4],["getItemOrNullObject","Slicer",1,2,0,4]],0,"Slicer"],["SlicerItem",0,[["key",3],["name",3],["isSelected",1],["hasData",3]]],["SlicerItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SlicerItem",1,2,0,4],["getItem","SlicerItem",1,18,0,4],["getItemOrNullObject","SlicerItem",1,2,0,4]],0,"SlicerItem"],["Ribbon",0,[["activeTab",1]],0,[["executeCommand",2],["showTeachingCallout",3],["_RegisterCommandExecutedEvent",0,0,0,2,0,1],["_UnregisterCommandExecutedEvent",0,0,0,2,0,1],["showChartDialog",1,2,8,4]],0,0,0,[["CommandExecuted",0,0,"MessageType.ribbonCommandExecutedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCommandExecutedEvent","_UnregisterCommandExecutedEvent"]]],["LinkedDataType",0,[["dataProvider",2],["serviceId",2],["lastRefreshed",10],["name",2],["periodicRefreshInterval",2],["refreshDataLoadWarnings",2],["refreshMode",2],["supportedRefreshModes",2],["refreshErrors",2]],0,[["requestRefresh",0,0,0,2],["requestSetRefreshMode",1,0,0,2]]],["LinkedDataTypeCollection",1,0,0,[["getCount",0,2,0,4],["requestRefreshAll",0,0,0,2],["_RegisterRefreshRequestCompletedEvent",0,2,0,4],["_UnregisterRefreshRequestCompletedEvent",0,2,0,4],["_RegisterRefreshModeChangedEvent",0,2,0,4],["_UnregisterRefreshModeChangedEvent",0,2,0,4],["_RegisterLinkedDataTypeAddedEvent",0,2,0,4],["_UnregisterLinkedDataTypeAddedEvent",0,2,0,4]],[["getItem","LinkedDataType",1,18,0,4],["getItemOrNullObject","LinkedDataType",1],["getItemAt","LinkedDataType",1,2,0,4]],0,"LinkedDataType",[["LinkedDataTypeAdded",0,0,"MessageType.linkedDataTypeLinkedDataTypeAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterLinkedDataTypeAddedEvent","_UnregisterLinkedDataTypeAddedEvent"],["RefreshModeChanged",0,0,"MessageType.linkedDataTypeRefreshModeChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshModeChangedEvent","_UnregisterRefreshModeChangedEvent"],["RefreshRequestCompleted",0,0,"MessageType.linkedDataTypeRefreshRequestCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshRequestCompletedEvent","_UnregisterRefreshRequestCompletedEvent"]]],["SheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","SheetView",1]]],["SheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","SheetView",1,8],["enterTemporary","SheetView"],["getActive","SheetView"],["getItem","SheetView",1,18,0,4],["getItemAt","SheetView",1,2,0,4]],0,"SheetView"],["NamedSheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","NamedSheetView",1]]],["NamedSheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","NamedSheetView",1,8],["enterTemporary","NamedSheetView"],["getActive","NamedSheetView"],["getItem","NamedSheetView",1,18,0,4],["getItemAt","NamedSheetView",1,2,0,4],["getItemOrNullObject","NamedSheetView",1,2,28,4]],0,"NamedSheetView"],["FunctionResult",0,[["error",3],["value",3]]],["Functions",0,0,0,0,[["count","FunctionResult",1,72],["if","FunctionResult",3,8],["isNA","FunctionResult",1,8],["isError","FunctionResult",1,8],["sum","FunctionResult",1,72],["average","FunctionResult",1,72],["min","FunctionResult",1,72],["max","FunctionResult",1,72],["na","FunctionResult",0,8],["npv","FunctionResult",2,72],["dollar","FunctionResult",2,8],["fixed","FunctionResult",3,8],["sin","FunctionResult",1,8],["cos","FunctionResult",1,8],["tan","FunctionResult",1,8],["atan","FunctionResult",1,8],["pi","FunctionResult",0,8],["sqrt","FunctionResult",1,8],["exp","FunctionResult",1,8],["ln","FunctionResult",1,8],["log10","FunctionResult",1,8],["abs","FunctionResult",1,8],["int","FunctionResult",1,8],["sign","FunctionResult",1,8],["round","FunctionResult",2,8],["lookup","FunctionResult",3,8],["rept","FunctionResult",2,8],["mid","FunctionResult",3,8],["len","FunctionResult",1,8],["value","FunctionResult",1,8],["true","FunctionResult",0,8],["false","FunctionResult",0,8],["and","FunctionResult",1,72],["or","FunctionResult",1,72],["not","FunctionResult",1,8],["mod","FunctionResult",2,8],["dcount","FunctionResult",3,8,0,0,"DCount"],["dsum","FunctionResult",3,8,0,0,"DSum"],["daverage","FunctionResult",3,8,0,0,"DAverage"],["dmin","FunctionResult",3,8,0,0,"DMin"],["dmax","FunctionResult",3,8,0,0,"DMax"],["dstDev","FunctionResult",3,8,0,0,"DStDev"],["dvar","FunctionResult",3,8,0,0,"DVar"],["text","FunctionResult",2,8],["pv","FunctionResult",5,8],["fv","FunctionResult",5,8],["nper","FunctionResult",5,8,0,0,"NPer"],["pmt","FunctionResult",5,8],["rate","FunctionResult",6,8],["mirr","FunctionResult",3,8,0,0,"MIrr"],["irr","FunctionResult",2,8],["rand","FunctionResult",0,8],["match","FunctionResult",3,8],["date","FunctionResult",3,8],["time","FunctionResult",3,8],["day","FunctionResult",1,8],["month","FunctionResult",1,8],["year","FunctionResult",1,8],["weekday","FunctionResult",2,8],["hour","FunctionResult",1,8],["minute","FunctionResult",1,8],["second","FunctionResult",1,8],["now","FunctionResult",0,8],["areas","FunctionResult",1,8],["rows","FunctionResult",1,8],["columns","FunctionResult",1,8],["type","FunctionResult",1,8],["atan2","FunctionResult",2,8],["asin","FunctionResult",1,8],["acos","FunctionResult",1,8],["choose","FunctionResult",2,72],["hlookup","FunctionResult",4,8,0,0,"HLookup"],["vlookup","FunctionResult",4,8,0,0,"VLookup"],["isref","FunctionResult",1,8],["log","FunctionResult",2,8],["char","FunctionResult",1,8],["lower","FunctionResult",1,8],["upper","FunctionResult",1,8],["proper","FunctionResult",1,8],["left","FunctionResult",2,8],["right","FunctionResult",2,8],["exact","FunctionResult",2,8],["trim","FunctionResult",1,8],["replace","FunctionResult",4,8],["substitute","FunctionResult",4,8],["code","FunctionResult",1,8],["find","FunctionResult",3,8],["isErr","FunctionResult",1,8],["isText","FunctionResult",1,8],["isNumber","FunctionResult",1,8],["t","FunctionResult",1,8,0,0,"T"],["n","FunctionResult",1,8,0,0,"N"],["datevalue","FunctionResult",1,8],["timevalue","FunctionResult",1,8],["sln","FunctionResult",3,8],["syd","FunctionResult",4,8],["ddb","FunctionResult",5,8],["clean","FunctionResult",1,8],["ipmt","FunctionResult",6,8],["ppmt","FunctionResult",6,8],["countA","FunctionResult",1,72],["product","FunctionResult",1,72],["fact","FunctionResult",1,8],["dproduct","FunctionResult",3,8,0,0,"DProduct"],["isNonText","FunctionResult",1,8],["dstDevP","FunctionResult",3,8,0,0,"DStDevP"],["dvarP","FunctionResult",3,8,0,0,"DVarP"],["trunc","FunctionResult",2,8],["isLogical","FunctionResult",1,8],["dcountA","FunctionResult",3,8,0,0,"DCountA"],["usdollar","FunctionResult",2,8,0,0,"USDollar"],["findB","FunctionResult",3,8],["replaceB","FunctionResult",4,8],["leftb","FunctionResult",2,8],["rightb","FunctionResult",2,8],["midb","FunctionResult",3,8],["lenb","FunctionResult",1,8],["roundUp","FunctionResult",2,8],["roundDown","FunctionResult",2,8],["asc","FunctionResult",1,8],["dbcs","FunctionResult",1,8],["days360","FunctionResult",3,8],["today","FunctionResult",0,8],["vdb","FunctionResult",7,8],["median","FunctionResult",1,72],["sinh","FunctionResult",1,8],["cosh","FunctionResult",1,8],["tanh","FunctionResult",1,8],["asinh","FunctionResult",1,8],["acosh","FunctionResult",1,8],["atanh","FunctionResult",1,8],["dget","FunctionResult",3,8,0,0,"DGet"],["db","FunctionResult",5,8],["error_Type","FunctionResult",1,8],["aveDev","FunctionResult",1,72],["gammaLn","FunctionResult",1,8],["combin","FunctionResult",2,8],["even","FunctionResult",1,8],["fisher","FunctionResult",1,8],["fisherInv","FunctionResult",1,8],["standardize","FunctionResult",3,8],["odd","FunctionResult",1,8],["permut","FunctionResult",2,8],["devSq","FunctionResult",1,72],["geoMean","FunctionResult",1,72],["harMean","FunctionResult",1,72],["sumSq","FunctionResult",1,72],["kurt","FunctionResult",1,72],["skew","FunctionResult",1,72],["large","FunctionResult",2,8],["small","FunctionResult",2,8],["trimMean","FunctionResult",2,8],["concatenate","FunctionResult",1,72],["power","FunctionResult",2,8],["radians","FunctionResult",1,8],["degrees","FunctionResult",1,8],["subtotal","FunctionResult",2,72],["sumIf","FunctionResult",3,8],["countIf","FunctionResult",2,8],["countBlank","FunctionResult",1,8],["ispmt","FunctionResult",4,8],["roman","FunctionResult",2,8],["hyperlink","FunctionResult",2,8],["averageA","FunctionResult",1,72],["maxA","FunctionResult",1,72],["minA","FunctionResult",1,72],["stDevPA","FunctionResult",1,72],["varPA","FunctionResult",1,72],["stDevA","FunctionResult",1,72],["varA","FunctionResult",1,72],["bahtText","FunctionResult",1,8],["hex2Bin","FunctionResult",2,8],["hex2Dec","FunctionResult",1,8],["hex2Oct","FunctionResult",2,8],["dec2Bin","FunctionResult",2,8],["dec2Hex","FunctionResult",2,8],["dec2Oct","FunctionResult",2,8],["oct2Bin","FunctionResult",2,8],["oct2Hex","FunctionResult",2,8],["oct2Dec","FunctionResult",1,8],["bin2Dec","FunctionResult",1,8],["bin2Oct","FunctionResult",2,8],["bin2Hex","FunctionResult",2,8],["imSub","FunctionResult",2,8],["imDiv","FunctionResult",2,8],["imPower","FunctionResult",2,8],["imAbs","FunctionResult",1,8],["imSqrt","FunctionResult",1,8],["imLn","FunctionResult",1,8],["imLog2","FunctionResult",1,8],["imLog10","FunctionResult",1,8],["imSin","FunctionResult",1,8],["imCos","FunctionResult",1,8],["imExp","FunctionResult",1,8],["imArgument","FunctionResult",1,8],["imConjugate","FunctionResult",1,8],["imaginary","FunctionResult",1,8],["imReal","FunctionResult",1,8],["complex","FunctionResult",3,8],["imSum","FunctionResult",1,72],["imProduct","FunctionResult",1,72],["seriesSum","FunctionResult",4,8],["factDouble","FunctionResult",1,8],["sqrtPi","FunctionResult",1,8],["quotient","FunctionResult",2,8],["delta","FunctionResult",2,8],["geStep","FunctionResult",2,8],["isEven","FunctionResult",1,8],["isOdd","FunctionResult",1,8],["mround","FunctionResult",2,8,0,0,"MRound"],["erf","FunctionResult",2,8],["erfC","FunctionResult",1,8],["besselJ","FunctionResult",2,8],["besselK","FunctionResult",2,8],["besselY","FunctionResult",2,8],["besselI","FunctionResult",2,8],["xirr","FunctionResult",3,8],["xnpv","FunctionResult",3,8],["priceMat","FunctionResult",6,8],["yieldMat","FunctionResult",6,8],["intRate","FunctionResult",5,8],["received","FunctionResult",5,8],["disc","FunctionResult",5,8],["priceDisc","FunctionResult",5,8],["yieldDisc","FunctionResult",5,8],["tbillEq","FunctionResult",3,8,0,0,"TBillEq"],["tbillPrice","FunctionResult",3,8,0,0,"TBillPrice"],["tbillYield","FunctionResult",3,8,0,0,"TBillYield"],["price","FunctionResult",7,8],["yield","FunctionResult",7,8],["dollarDe","FunctionResult",2,8],["dollarFr","FunctionResult",2,8],["nominal","FunctionResult",2,8],["effect","FunctionResult",2,8],["cumPrinc","FunctionResult",6,8],["cumIPmt","FunctionResult",6,8],["edate","FunctionResult",2,8,0,0,"EDate"],["eoMonth","FunctionResult",2,8],["yearFrac","FunctionResult",3,8],["coupDayBs","FunctionResult",4,8],["coupDays","FunctionResult",4,8],["coupDaysNc","FunctionResult",4,8],["coupNcd","FunctionResult",4,8],["coupNum","FunctionResult",4,8],["coupPcd","FunctionResult",4,8],["duration","FunctionResult",6,8],["mduration","FunctionResult",6,8,0,0,"MDuration"],["oddLPrice","FunctionResult",8,8],["oddLYield","FunctionResult",8,8],["oddFPrice","FunctionResult",9,8],["oddFYield","FunctionResult",9,8],["randBetween","FunctionResult",2,8],["weekNum","FunctionResult",2,8],["amorDegrc","FunctionResult",7,8],["amorLinc","FunctionResult",7,8],["convert","FunctionResult",3,8],["accrInt","FunctionResult",8,8],["accrIntM","FunctionResult",5,8],["workDay","FunctionResult",3,8],["networkDays","FunctionResult",3,8],["gcd","FunctionResult",1,72],["multiNomial","FunctionResult",1,72],["lcm","FunctionResult",1,72],["fvschedule","FunctionResult",2,8,0,0,"FVSchedule"],["countIfs","FunctionResult",1,72],["sumIfs","FunctionResult",2,72],["averageIf","FunctionResult",3,8],["averageIfs","FunctionResult",2,72],["binom_Dist","FunctionResult",4,8],["binom_Inv","FunctionResult",3,8],["confidence_Norm","FunctionResult",3,8],["confidence_T","FunctionResult",3,8],["expon_Dist","FunctionResult",3,8],["gamma_Dist","FunctionResult",4,8],["gamma_Inv","FunctionResult",3,8],["norm_Dist","FunctionResult",4,8],["norm_Inv","FunctionResult",3,8],["percentile_Exc","FunctionResult",2,8],["percentile_Inc","FunctionResult",2,8],["percentRank_Exc","FunctionResult",3,8],["percentRank_Inc","FunctionResult",3,8],["poisson_Dist","FunctionResult",3,8],["quartile_Exc","FunctionResult",2,8],["quartile_Inc","FunctionResult",2,8],["rank_Avg","FunctionResult",3,8],["rank_Eq","FunctionResult",3,8],["stDev_S","FunctionResult",1,72],["stDev_P","FunctionResult",1,72],["t_Dist","FunctionResult",3,8],["t_Dist_2T","FunctionResult",2,8],["t_Dist_RT","FunctionResult",2,8],["t_Inv","FunctionResult",2,8],["t_Inv_2T","FunctionResult",2,8],["var_S","FunctionResult",1,72],["var_P","FunctionResult",1,72],["weibull_Dist","FunctionResult",4,8],["networkDays_Intl","FunctionResult",4,8],["workDay_Intl","FunctionResult",4,8],["ecma_Ceiling","FunctionResult",2,8,0,0,"ECMA_Ceiling"],["iso_Ceiling","FunctionResult",2,8,0,0,"ISO_Ceiling"],["beta_Dist","FunctionResult",6,8],["beta_Inv","FunctionResult",5,8],["chiSq_Dist","FunctionResult",3,8],["chiSq_Dist_RT","FunctionResult",2,8],["chiSq_Inv","FunctionResult",2,8],["chiSq_Inv_RT","FunctionResult",2,8],["f_Dist","FunctionResult",4,8],["f_Dist_RT","FunctionResult",3,8],["f_Inv","FunctionResult",3,8],["f_Inv_RT","FunctionResult",3,8],["hypGeom_Dist","FunctionResult",5,8],["logNorm_Dist","FunctionResult",4,8],["logNorm_Inv","FunctionResult",3,8],["negBinom_Dist","FunctionResult",4,8],["norm_S_Dist","FunctionResult",2,8],["norm_S_Inv","FunctionResult",1,8],["z_Test","FunctionResult",3,8],["erf_Precise","FunctionResult",1,8],["erfC_Precise","FunctionResult",1,8],["gammaLn_Precise","FunctionResult",1,8],["ceiling_Precise","FunctionResult",2,8],["floor_Precise","FunctionResult",2,8],["acot","FunctionResult",1,8],["acoth","FunctionResult",1,8],["cot","FunctionResult",1,8],["coth","FunctionResult",1,8],["csc","FunctionResult",1,8],["csch","FunctionResult",1,8],["sec","FunctionResult",1,8],["sech","FunctionResult",1,8],["imTan","FunctionResult",1,8],["imCot","FunctionResult",1,8],["imCsc","FunctionResult",1,8],["imCsch","FunctionResult",1,8],["imSec","FunctionResult",1,8],["imSech","FunctionResult",1,8],["bitand","FunctionResult",2,8],["bitor","FunctionResult",2,8],["bitxor","FunctionResult",2,8],["bitlshift","FunctionResult",2,8],["bitrshift","FunctionResult",2,8],["permutationa","FunctionResult",2,8],["combina","FunctionResult",2,8],["xor","FunctionResult",1,72],["pduration","FunctionResult",3,8,0,0,"PDuration"],["base","FunctionResult",3,8],["decimal","FunctionResult",2,8],["days","FunctionResult",2,8],["binom_Dist_Range","FunctionResult",4,8],["gamma","FunctionResult",1,8],["skew_p","FunctionResult",1,72],["gauss","FunctionResult",1,8],["phi","FunctionResult",1,8],["rri","FunctionResult",3,8],["unichar","FunctionResult",1,8],["unicode","FunctionResult",1,8],["arabic","FunctionResult",1,8],["isoWeekNum","FunctionResult",1,8],["numberValue","FunctionResult",3,8],["sheet","FunctionResult",1,8],["sheets","FunctionResult",1,8],["isFormula","FunctionResult",1,8],["ceiling_Math","FunctionResult",3,8],["floor_Math","FunctionResult",3,8],["imSinh","FunctionResult",1,8],["imCosh","FunctionResult",1,8]]]]},targetNamespaceObject:e})}(Excel||(Excel={}));var _EndExcel="_EndExcel";if("undefined"!==typeof window&&window.OSF&&window.OSF._OfficeAppFactory&&window.OSF._OfficeAppFactory.getHostInfo&&window.OSF._OfficeAppFactory.getHostInfo()){var hostPlatform=window.OSF._OfficeAppFactory.getHostInfo().hostPlatform;"web"===hostPlatform&&(OfficeExtension._internalConfig.enablePreviewExecution=!0)}function exposeOfficeRuntimeThroughOfficeNamespace(e,t){var n,r;"undefined"===typeof e&&"undefined"!==typeof window&&(e=null===window||void 0===window?void 0:window.OfficeRuntime),"undefined"===typeof e&&(e={}),"undefined"!==typeof t&&(t.storage=t.storage||(null===e||void 0===e?void 0:e.storage),t.auth=t.auth||(null===e||void 0===e?void 0:e.auth),t.getAccessToken=t.getAccessToken||(null===(n=null===e||void 0===e?void 0:e.auth)||void 0===n?void 0:n.getAccessToken),t.addin=t.addin||(null===e||void 0===e?void 0:e.addin),t.isSetSupported=t.isSetSupported||(null===(r=null===e||void 0===e?void 0:e.apiInformation)||void 0===r?void 0:r.isSetSupported),t.license=t.license||(null===e||void 0===e?void 0:e.license),t.message=t.message||(null===e||void 0===e?void 0:e.message))}!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=OfficeExtensionBatch},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(2),"undefined"==typeof CustomFunctionMappings&&(window.CustomFunctionMappings={}),"undefined"==typeof Promise&&(window.Promise=Office.Promise),window.OfficeExtensionBatch=window.OfficeExtensionBatch||window.OfficeExtension;var r=n(3);!function(){var e=!1;"undefined"!=typeof OSF&&OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&0!=(2&(OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo().flags))&&(e=!0),(0,r.default)(e)}()},function(e,t){!function(e){"use strict";if(!e.fetch){var t="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,r="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,i="ArrayBuffer"in e;if(i)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=function(e){return e&&DataView.prototype.isPrototypeOf(e)},c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};h.prototype.append=function(e,t){e=d(e),t=f(t);var n=this.map[e];this.map[e]=n?n+","+t:t},h.prototype.delete=function(e){delete this.map[d(e)]},h.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},h.prototype.set=function(e,t){this.map[d(e)]=f(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),p(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),p(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),p(e)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var l=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},O.call(b.prototype),O.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},C.error=function(){var e=new C(null,{status:0,statusText:""});return e.type="error",e};var u=[301,302,303,307,308];C.redirect=function(e,t){if(-1===u.indexOf(t))throw new RangeError("Invalid status code");return new C(null,{status:t,headers:{location:e}})},e.Headers=h,e.Request=b,e.Response=C,e.fetch=function(e,t){return new Promise((function(n,o){var i=new b(e,t),a=new XMLHttpRequest;a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new h,e.split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new C(o,r))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials&&(a.withCredentials=!0),"responseType"in a&&r&&(a.responseType="blob"),i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),a.send(void 0===i._bodyInit?null:i._bodyInit)}))},e.fetch.polyfill=!0}function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function f(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function m(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function y(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function O(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(r&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(o&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(i&&r&&s(e))this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!i||!ArrayBuffer.prototype.isPrototypeOf(e)&&!c(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=v(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,n,r=m(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=g(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function S(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function C(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);t.default=function(e){function t(){Office.onReady((function(e){e.host===Office.HostType.Excel?function e(){CustomFunctionMappings&&CustomFunctionMappings.__delay__?setTimeout(e,50):r.CustomFunctions.initialize()}():console.warn("Warning: Expected to be loaded inside of an Excel add-in.")}))}window.CustomFunctions=window.CustomFunctions||{},window.CustomFunctions.setCustomFunctionInvoker=r.setCustomFunctionInvoker,window.CustomFunctions.Error=r.CustomFunctionError,window.CustomFunctions.ErrorCode=r.ErrorCode,window.CustomFunctions.FormattedNumber=r.CustomFunctionFormattedNumber,window.CustomFunctions.Entity=r.CustomFunctionEntity,window.CustomFunctions.WebImage=r.CustomFunctionWebImage,window.CustomFunctions.Attribution=r.CustomFunctionAttribution,window.CustomFunctions.Provider=r.CustomFunctionProvider,r.setCustomFunctionAssociation(window.CustomFunctions._association),e&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t())}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CustomFunctionsContainer=t.CustomFunctions=t.setCustomFunctionInvoker=t.setCustomFunctionAssociation=t.customFunctionProxy=t.CustomFunctionProxy=t.CreateCustomFunctionInstance=t.CustomFunctionProvider=t.CustomFunctionAttribution=t.CustomFunctionWebImage=t.CustomFunctionFormattedNumber=t.CustomFunctionEntity=t.CustomFunctionError=t.ErrorCode=t.InvocationContext=t.Script=void 0;var i=n(0),a=n(0),s=i.BatchApiHelper.createPropertyObject,c=(i.BatchApiHelper.createMethodObject,i.BatchApiHelper.createIndexerObject,i.BatchApiHelper.createRootServiceObject),l=i.BatchApiHelper.createTopLevelServiceObject,u=(i.BatchApiHelper.createChildItemObject,i.BatchApiHelper.invokeMethod),d=(i.BatchApiHelper.invokeEnsureUnchanged,i.BatchApiHelper.invokeSetProperty,i.Utility.isNullOrUndefined),f=(i.Utility.isUndefined,i.Utility.throwIfNotLoaded,i.Utility.throwIfApiNotSupported),p=i.Utility.load,h=(i.Utility.retrieve,i.Utility.toJson),m=i.Utility.fixObjectPathIfNecessary,g=i.Utility._handleNavigationPropertyResults,y=(i.Utility.adjustToDateTime,i.Utility.processRetrieveResult),v=(i.Utility.setMockData,i.CommonUtility.calculateApiFlags,function(e){function t(t){var n=e.call(this,t)||this;return n.m_customFunctions=T.newObject(n),n.m_container=c(M,n),n._rootObject=n.m_container,n._rootObjectPropertyName="customFunctionsContainer",n._requestFlagModifier=2176,n}return o(t,e),Object.defineProperty(t.prototype,"customFunctions",{get:function(){return this.m_customFunctions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customFunctionsContainer",{get:function(){return this.m_container},enumerable:!1,configurable:!0}),t.prototype._processOfficeJsErrorResponse=function(e,t){5004===e&&(t.ErrorCode=x.invalidOperationInCellEditMode,t.ErrorMessage=i.Utility._getResourceString(i.ResourceStrings.invalidOperationInCellEditMode))},t}(i.ClientRequestContext));t.Script={_CustomFunctionMetadata:{}};var O,b=function(){function e(e,t,n,r,o){this._functionName=e,d(t)||(this._address=t),d(n)||(this._parameterAddresses=n),this.setResult=r,this.setError=o}return Object.defineProperty(e.prototype,"onCanceled",{get:function(){if(!d(this._onCanceled)&&"function"==typeof this._onCanceled)return this._onCanceled},set:function(e){this._onCanceled=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"functionName",{get:function(){return this._functionName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parameterAddresses",{get:function(){return this._parameterAddresses},enumerable:!1,configurable:!0}),e}();t.InvocationContext=b,function(e){e.Info="Medium",e.Error="Unexpected",e.Verbose="Verbose"}(O||(O={}));var S,C=function(e,t){this.Severity=e,this.Message=t},A=function(){function e(){}return e.logEvent=function(t,n,r){if(e.s_shouldLog||i.CoreUtility._logEnabled){var o=t.Severity+" "+t.Message+n;if(r&&(o=o+" "+r),i.Utility.log(o),e.s_shouldLog)switch(t.Severity){case O.Verbose:null!==console.log&&console.log(o);break;case O.Info:null!==console.info&&console.info(o);break;case O.Error:null!==console.error&&console.error(o)}}},e.shouldLog=function(){try{return!d(console)&&!d(window)&&window.name&&"string"==typeof window.name&&JSON.parse(window.name)[e.CustomFunctionLoggingFlag]}catch(e){return i.Utility.log(JSON.stringify(e)),!1}},e.CustomFunctionLoggingFlag="CustomFunctionsRuntimeLogging",e.s_shouldLog=e.shouldLog(),e}();!function(e){e.invalidValue="#VALUE!",e.notAvailable="#N/A",e.divisionByZero="#DIV/0!",e.invalidNumber="#NUM!",e.nullReference="#NULL!",e.invalidName="#NAME?",e.invalidReference="#REF!"}(S=t.ErrorCode||(t.ErrorCode={}));var _=function(e){function t(n,r,o){var i=e.call(this,r||"")||this;return i.type=t.valueType,i.basicType=t.valueType,Object.setPrototypeOf(i,t.prototype),i.code=n||S.invalidValue,i.basicValue=n||S.invalidValue,i.errorSubType=o,i.stack=void 0,i}return o(t,e),t.prototype.toJSON=function(){return{valueType:"CustomFunctionError",code:this.code,type:this.type,basicValue:this.basicValue,basicType:this.type,errorSubType:this.errorSubType,message:this._getMessage(),errorType:this._getErrorType()}},t.prototype._getErrorType=function(){switch(this.basicValue){case S.invalidValue:return"Value";case S.divisionByZero:return"Div0";case S.notAvailable:return"NotAvailable";case S.invalidNumber:return"Num";case S.invalidName:return"Name";case S.invalidReference:return"Ref";case S.nullReference:return"Null";default:return}},t.prototype._getMessage=function(){switch(this.basicValue){case S.invalidValue:case S.notAvailable:return""==this.message?void 0:this.message;case S.divisionByZero:case S.invalidNumber:case S.invalidName:case S.invalidReference:case S.nullReference:default:return}},t.valueType="Error",t}(Error);t.CustomFunctionError=_;var D=function(){function e(t,n){this.type=e.valueType,this.basicValue="#VALUE!",this.basicType="Error",Object.setPrototypeOf(this,e.prototype),this.text=t,this.properties=n}return e.prototype.toJSON=function(){return{type:this.type,text:this.text,basicValue:this.basicValue,basicType:this.basicType,properties:this.properties}},e.valueType="Entity",e}();t.CustomFunctionEntity=D;var F=function(){function e(t,n){this.type=e.valueType,this.basicValue=t,this.numberFormat=n}return e.prototype.toJSON=function(){return{type:this.type,basicValue:this.basicValue,numberFormat:this.numberFormat}},e.valueType="FormattedNumber",e}();t.CustomFunctionFormattedNumber=F;var E=function(){function e(t,n,r,o,i){this.type=e.valueType,this.basicValue="#VALUE!",this.basicType="Error",this.address=t,null!=o&&(this.attribution=o),null!=i&&(this.provider=i),null!=n&&(this.altText=n),null!=r&&(this.relatedImagesAddress=r)}return e.prototype.toJSON=function(){return{type:this.type,basicValue:this.basicValue,basicType:this.basicType,address:this.address,altText:this.altText,relatedImagesAddress:this.relatedImagesAddress,attribution:null==this.attribution?void 0:this.attribution.map((function(e){return e.toJSON()})),provider:null==this.provider?void 0:this.provider.toJSON()}},e.valueType="WebImage",e}();t.CustomFunctionWebImage=E;var P=function(){function e(e,t,n,r){null!=e&&(this.licenseAddress=e),null!=t&&(this.licenseText=t),null!=n&&(this.sourceAddress=n),null!=r&&(this.sourceText=r)}return e.prototype.toJSON=function(){return{licenseAddress:this.licenseAddress,licenseText:this.licenseText,sourceAddress:this.sourceAddress,sourceText:this.sourceText}},e}();t.CustomFunctionAttribution=P;var I=function(){function e(e,t,n){this.description=e,null!=t&&(this.logoSourceAddress=t),null!=n&&(this.logoTargetAddress=n)}return e.prototype.toJSON=function(){return{description:this.description,logoSourceAddress:this.logoSourceAddress,logoTargetAddress:this.logoTargetAddress}},e}();t.CustomFunctionProvider=I,t.CreateCustomFunctionInstance=function e(t){if(t instanceof Array)return t.map((function(t){return e(t)}));if(!(t instanceof Object))return t;var n=JSON.parse(t.value);switch(n.type){case D.valueType:return new D(n.text,n.properties);case F.valueType:return new F(n.primitive,n.numberFormat);case _.valueType:return new _(n.primitive,void 0,n.errorSubCode);case E.valueType:return new E(n.address,n.altText,n.relatedImagesAddress,n.attribution,n.provider);case"Double":case"String":case"Boolean":return n.primitive;default:throw i.Utility.createRuntimeError(x.generalException,"message","CustomFunctionProxy.createRichDataFromJsonString")}};var R=function(){function e(){this._whenInit=void 0,this._isInit=!1,this._setResultsDelayMillis=50,this._setResultsOverdueDelayMillis=2e3,this._maxContextSyncExecutionDurationMills=15e3,this._minContextSyncIntervalMills=500,this._smallerMinContextSyncIntervalMills=200,this._maxContextSyncIntervalMills=2e3,this._setResultsLifeMillis=6e4,this._ensureInitRetryDelayMillis=500,this._resultEntryBuffer={},this._resultEntryRetryBuffer={},this._retryBufferBodySize=0,this._isSetResultsTaskScheduled=!1,this._setResultsTaskOverdueTime=0,this._inProgressContextSyncExpectedFinishTime=0,this._batchQuotaMillis=1e3,this._invocationContextMap={},this._maxResultSize=2e6}return e.prototype._initSettings=function(){if("object"==typeof t.Script&&"object"==typeof t.Script._CustomFunctionSettings){if("number"==typeof t.Script._CustomFunctionSettings.setResultsDelayMillis){var e=t.Script._CustomFunctionSettings.setResultsDelayMillis;e=Math.max(0,e),e=Math.min(1e3,e),this._setResultsDelayMillis=e}if("number"==typeof t.Script._CustomFunctionSettings.ensureInitRetryDelayMillis){var n=t.Script._CustomFunctionSettings.ensureInitRetryDelayMillis;n=Math.max(0,n),n=Math.min(2e3,n),this._ensureInitRetryDelayMillis=n}if("number"==typeof t.Script._CustomFunctionSettings.setResultsLifeMillis){var r=t.Script._CustomFunctionSettings.setResultsLifeMillis;r=Math.max(0,r),r=Math.min(6e5,r),this._setResultsLifeMillis=r}if("number"==typeof t.Script._CustomFunctionSettings.batchQuotaMillis){var o=t.Script._CustomFunctionSettings.batchQuotaMillis;o=Math.max(0,o),o=Math.min(1e3,o),this._batchQuotaMillis=o}}},e.prototype.ensureInit=function(e){var t=this;return this._initSettings(),void 0===this._whenInit&&(this._whenInit=i.Utility._createPromiseFromResult(null).then((function(){if(!t._isInit)return e.eventRegistration.register(5,"",t._handleMessage.bind(t))})).then((function(){t._isInit=!0}))),this._isInit||e._pendingRequest._addPreSyncPromise(this._whenInit),this._whenInit},e.prototype.setCustomFunctionInvoker=function(e){"object"==typeof CustomFunctionMappings&&delete CustomFunctionMappings.__delay__,this._invoker=e},e.prototype.setCustomFunctionAssociation=function(e){var t=this;this._customFunctionMappingsUpperCase=void 0,this._association=e,this._association&&this._association.onchange((function(){t._customFunctionMappingsUpperCase=void 0}))},e.prototype._initFromHostBridge=function(e){var t=this;this._initSettings(),e.addHostMessageHandler((function(e){3===e.type?t._handleMessage(e.message):4===e.type&&t._handleSettings(e.message)})),this._isInit=!0,this._whenInit=i.CoreUtility.Promise.resolve()},e.prototype._handleSettings=function(e){i.Utility.log("CustomFunctionProxy._handleSettings:"+JSON.stringify(e)),e&&"object"==typeof e&&(A.s_shouldLog=e[A.CustomFunctionLoggingFlag])},e.prototype._handleMessage=function(t){try{i.Utility.log("CustomFunctionProxy._handleMessage"),i.Utility.checkArgumentNull(t,"args");for(var n=t.entries,r=[],o=[],a=[],s=0;s0&&this._handleMetadataEntries(a),r.length>0){var c=this._batchInvocationEntries(r);c.length>0&&this._invokeRemainingBatchEntries(c,0)}o.length>0&&this._handleCancellationEntries(o)}catch(t){throw e._tryLog(t),t}return i.Utility._createPromiseFromResult(null)},e.toLogMessage=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t},e._tryLog=function(t){var n=e.toLogMessage(t);i.Utility.log(n)},e.prototype._handleMetadataEntries=function(e){for(var n=0;n0&&e>this._setResultsTaskOverdueTime)return i.Utility.log("SetResultsTask overdue"),void this._executeSetResultsTask();this._isSetResultsTaskScheduled||(i.Utility.log("setTimeout(CustomFunctionProxy._executeSetResultsTask)"),setTimeout(this._executeSetResultsTask.bind(this),this._setResultsDelayMillis),this._isSetResultsTaskScheduled=!0,this._setResultsTaskOverdueTime=e+this._setResultsDelayMillis+this._setResultsOverdueDelayMillis)},e.prototype._convertCustomFunctionInvocationResultToArray=function(e){var t=[];return t.push(e.id),t.push(!e.failed),i.CoreUtility.isUndefined(e.value)?t.push(null):t.push(e.value),e.failed&&(i.CoreUtility.isUndefined(e.errorCode)?t.push(0):t.push(e.errorCode)),i.Utility.isSetSupported("CustomFunctions","1.9")&&t.push(e.outboundData),t},e.prototype._executeSetResultsTask=function(){var e=this;i.Utility.log("CustomFunctionProxy._executeSetResultsTask");var t=Date.now();if(this._inProgressContextSyncExpectedFinishTime>0&&this._inProgressContextSyncExpectedFinishTime>t)return i.Utility.log("context.sync() is in progress. setTimeout(CustomFunctionProxy._executeSetResultsTask)"),setTimeout(this._executeSetResultsTask.bind(this),this._setResultsDelayMillis),void(this._setResultsTaskOverdueTime=t+this._setResultsDelayMillis+this._setResultsOverdueDelayMillis);this._isSetResultsTaskScheduled=!1,this._setResultsTaskOverdueTime=0;var n={},r=!1;T.isFeatureEnabled(1)&&Object.keys(this._resultEntryRetryBuffer).length>0?(n=this._resultEntryRetryBuffer,this._resultEntryRetryBuffer={},this._retryBufferBodySize=2,r=!0):(n=this._resultEntryBuffer,this._resultEntryBuffer={});var o=i.Utility.isSetSupported("CustomFunctions","1.7"),a=[];for(var s in n)o?a.push(this._convertCustomFunctionInvocationResultToArray(n[s].result)):a.push(n[s].result);if(0!==a.length){var c=new v;o?c.customFunctions.setInvocationArrayResults(a):c.customFunctions.setInvocationResults(a);var l=Date.now();this._inProgressContextSyncExpectedFinishTime=l+this._maxContextSyncExecutionDurationMills,c.sync().then((function(t){var n=Date.now();e._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(n-l),r&&e._ensureSetResultsTaskIsScheduled(n)}),(function(t){var r=Date.now();e._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(r-l),T.isFeatureEnabled(1)&&t.code==i.ErrorCodes.requestPayloadSizeLimitExceeded?e._restoreAndSliceResultEntries(r,n):e._restoreResultEntries(r,n),e._ensureSetResultsTaskIsScheduled(r)}))}},e.prototype._restoreResultEntries=function(e,t){for(var n in t){var r=t[n];e-r.timeCreated<=this._setResultsLifeMillis&&(this._resultEntryBuffer[n]||(this._resultEntryBuffer[n]=r))}},e.prototype._restoreAndSliceResultEntries=function(e,t){for(var n in t){var r=t[n],o=void 0;if(e-r.timeCreated<=this._setResultsLifeMillis&&!this._resultEntryBuffer[n]){try{o=JSON.stringify(this._convertCustomFunctionInvocationResultToArray(r.result)).length+1}catch(e){this._resultEntryBuffer[n]=r,i.Utility.log("Result can't pass in JSON.stringify");continue}this._retryBufferBodySize+o=0},n.initialize=function(){var e=this,r=new v;return t.customFunctionProxy.ensureInit(r).then((function(){var o;return r.customFunctions._SetOsfControlContainerReadyForCustomFunctions(),i.Utility.isSetSupported("CustomFunctions","1.9")&&(o=r.customFunctions._GetEnabledFeatures()),i.Utility.log("OsfControl activation lifecycle: Set OsfControlContainer ready for CustomFunctions"),r._customData="SetOsfControlContainerReadyForCustomFunctions",r.sync().then((function(){d(o)||(e._enabledFeature=o.value)})).catch((function(e){!function(e,r){var o=e instanceof i.Error&&e.code===x.invalidOperationInCellEditMode;if(i.CoreUtility.log("Error on starting custom functions: "+e),o){i.CoreUtility.log("Was in cell-edit mode, will try again");var a=t.customFunctionProxy._ensureInitRetryDelayMillis;return new i.CoreUtility.Promise((function(e){return setTimeout(e,a)})).then((function(){return n.initialize()}))}throw e}(e)}))}))},n.prototype.setInvocationArrayResults=function(e){f("CustomFunctions.setInvocationArrayResults","CustomFunctions","1.4","Excel"),u(this,"SetInvocationArrayResults",0,[e],2,0)},n.prototype.setInvocationResults=function(e){u(this,"SetInvocationResults",0,[e],2,0)},n.prototype._GetEnabledFeatures=function(){return f("CustomFunctions._GetEnabledFeatures","CustomFunctions","1.4","Excel"),u(this,"_GetEnabledFeatures",1,[],4,0)},n.prototype._SetInvocationError=function(e,t){u(this,"_SetInvocationError",0,[e,t],2,0)},n.prototype._SetInvocationResult=function(e,t){u(this,"_SetInvocationResult",0,[e,t],2,0)},n.prototype._SetOsfControlContainerReadyForCustomFunctions=function(){u(this,"_SetOsfControlContainerReadyForCustomFunctions",0,[],10,0)},n.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),d(t)||m(this,t)},n.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),y(this,t,n)},n.newObject=function(e){return l(n,e,"Microsoft.ExcelServices.CustomFunctions",!1,4)},n.prototype.toJSON=function(){return h(this,{},{})},n}(i.ClientObject);t.CustomFunctions=T;var x,M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"CustomFunctionsContainer"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_navigationPropertyNames",{get:function(){return["customFunctions"]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customFunctions",{get:function(){return f("CustomFunctionsContainer.customFunctions","CustomFunctions","1.2","Excel"),this._C||(this._C=s(T,this,"CustomFunctions",!1,4)),this._C},enumerable:!1,configurable:!0}),t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!d(t)){var n=t;m(this,n),g(this,n,["customFunctions","CustomFunctions"])}},t.prototype.load=function(e){return p(this,e)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),y(this,t,n)},t.prototype.toJSON=function(){return h(this,{},{})},t}(i.ClientObject);t.CustomFunctionsContainer=M,function(e){e.generalException="GeneralException",e.invalidOperation="InvalidOperation",e.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"}(x||(x={}))}]),OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel=!0,OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria=!1,window.OfficeExtensionBatch=window.OfficeExtension,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=OfficeExtensionBatch},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=2&&(r=Number(n[1])),n.length>=3&&(o=Number(n[2])),isNaN(t)||isNaN(r)||isNaN(o))throw"version format incorrect";return{major:t,minor:r,patch:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.apiInformation=void 0,t.apiInformation={isSetSupported:function(t,r){if("string"!=typeof t)return!1;if(null==r&&(r="0.0.0"),void 0===e.__apiSets)return!1;var o=e.__apiSets,i=Object.keys(o).map((function(e){return e.toLowerCase()})).indexOf(t.toLowerCase());if(i>-1){var a=o[Object.keys(o)[i]];try{var s,c=n(r);if((s=Array.isArray(a)?function(e,t){for(var r=0;r0){if(s.major>c.major)return!0;if(s.major==c.major&&s.minor>c.minor)return!0;if(s.major==c.major&&s.minor==c.minor&&s.patch>=c.patch)return!0}}catch(e){return!1}}return!1}}}).call(this,n(4))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiGet=t.multiRemove=t.multiSet=t.getAllKeys=t.clear=t.removeItem=t.setItem=t.getItem=void 0;var r="_Office_AsyncStorage_";function o(){window.localStorage.setItem("_Office_AsyncStorage_|_unusedKey_",null),window.localStorage.removeItem("_Office_AsyncStorage_|_unusedKey_")}function i(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,r){try{o(),e(),t(null),n()}catch(e){t(e),r(e)}}))}function a(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,r){try{o();var i=e();t(null,i),n(i)}catch(e){t(e,null),r(e)}}))}function s(e,t,n){return void 0===n&&(n=function(){}),new Promise((function(r,i){var a=[];try{o()}catch(e){a.push(e)}e.forEach((function(e){try{t(e)}catch(e){a.push(e)}})),n(a),a.length>0?i(a):r()}))}t.getItem=function(e,t){return a((function(){return window.localStorage.getItem(r+e)}),t)},t.setItem=function(e,t,n){return i((function(){return window.localStorage.setItem(r+e,t)}),n)},t.removeItem=function(e,t){return i((function(){return window.localStorage.removeItem(r+e)}),t)},t.clear=function(e){return i((function(){Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).forEach((function(e){return window.localStorage.removeItem(e)}))}),e)},t.getAllKeys=function(e){return a((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).map((function(e){return e.substr(r.length)}))}),e)},t.multiSet=function(e,t){return s(e,(function(e){var t=e[0],n=e[1];return window.localStorage.setItem(r+t,n)}),t)},t.multiRemove=function(e,t){return s(e,(function(e){return window.localStorage.removeItem(r+e)}),t)},t.multiGet=function(e,t){return new Promise((function(n,o){t||(t=function(){});var i=[],a=e.map((function(e){try{return[e,window.localStorage.getItem(r+e)]}catch(e){i.push(e)}})).filter((function(e){return e}));i.length>0?(t(i,a),o(i)):(t(null,a),n(a))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.displayWebDialog=t.Dialog=void 0;var r=n(0),o=function(){function e(e){this._dialog=e}return e.prototype.close=function(){return this._dialog.close(),r.CoreUtility.Promise.resolve()},e}();t.Dialog=o,t.displayWebDialog=function(e,t){return new r.CoreUtility.Promise((function(n,i){if(t.width&&t.height&&(!u(t.width)||!u(t.height)))throw new r.Error({code:"InvalidArgument",message:'Dimensions must be "number%" or number.'});var a,s={width:t.width?parseInt(t.width,10):50,height:t.height?parseInt(t.height,10):50,displayInIframe:t.displayInIFrame||!1};function c(e){t.onMessage&&t.onMessage(e.message,a,e.origin)}function l(e){12006===e.error?t.onClose&&t.onClose():t.onRuntimeError&&t.onRuntimeError(new r.Error(d(e.error)),a)}function u(e){return/^(\-|\+)?([0-9]+)%?$/.test(e)}function d(e){var t,n=((t={})[12002]={code:"InvalidUrl",message:"Cannot load URL, no such page or bad URL syntax."},t[12003]={code:"InvalidUrl",message:"HTTPS is required."},t[12004]={code:"Untrusted",message:"Domain is not trusted."},t[12005]={code:"InvalidUrl",message:"HTTPS is required."},t[12007]={code:"FailedToOpen",message:"Another dialog is already opened."},t);return n[e]?n[e]:{code:"Unknown",message:"An unknown error has occured"}}Office.context.ui.displayDialogAsync(e,s,(function(e){"failed"===e.status?i(new r.Error(d(e.error.code))):((a=e.value).addEventHandler(Office.EventType.DialogMessageReceived,c),a.addEventHandler(Office.EventType.DialogEventReceived,l),n(new o(a)))}))}))}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCodes=t.PersistentKvStorageService=t.storage=t.AsyncStorage=void 0;var i=n(0),a=(i.BatchApiHelper.createPropertyObject,i.BatchApiHelper.createMethodObject,i.BatchApiHelper.createIndexerObject,i.BatchApiHelper.createRootServiceObject,i.BatchApiHelper.createTopLevelServiceObject),s=(i.BatchApiHelper.createChildItemObject,i.BatchApiHelper.invokeMethod),c=(i.BatchApiHelper.invokeEnsureUnchanged,i.BatchApiHelper.invokeSetProperty,i.Utility.isNullOrUndefined),l=(i.Utility.isUndefined,i.Utility.throwIfNotLoaded,i.Utility.throwIfApiNotSupported,i.Utility.load,i.Utility.retrieve,i.Utility.toJson),u=i.Utility.fixObjectPathIfNecessary,d=(i.Utility._handleNavigationPropertyResults,i.Utility.adjustToDateTime,i.Utility.processRetrieveResult);function f(e,t){return new i.CoreUtility.Promise((function(n,r){var o=h.getInstance(),i=o.setCallBack((function(e,o){if(o)r(o);else{var i=t(e);n(i)}}));o.ctx.sync().then((function(){var t=o.getPersistentKvStorageService();return e(t,i),o.ctx.sync()})).catch((function(e){r(e)}))}))}function p(e,t,n){return new i.CoreUtility.Promise((function(r,o){var i=h.getInstance(),a=i.setCallBack((function(e,i){if(i)return n&&n(i),void o(i);var a=t(e);n&&n(null,a),r(a)}));i.ctx.sync().then((function(){var t=i.getPersistentKvStorageService();return e(t,a),i.ctx.sync()})).catch((function(e){o(e)}))}))}i.Utility.setMockData,i.CommonUtility.calculateApiFlags,t.AsyncStorage={getItem:function(e,t){return p((function(t,n){return t.multiGet(n,JSON.stringify([e]))}),(function(e){var t=JSON.parse(e);return t&&t[0]&&t[0][1]?t[0][1]:null}),t)},setItem:function(e,t,n){return p((function(n,r){return n.multiSet(r,JSON.stringify([[e,t]]))}),(function(){return null}),n)},removeItem:function(e,t){return p((function(t,n){return t.multiRemove(n,JSON.stringify([e]))}),(function(){return null}),t)},multiGet:function(e,t){return p((function(t,n){return t.multiGet(n,JSON.stringify(e))}),(function(t){var n=JSON.parse(t),r={};return n&&n.forEach((function(e){var t=e[0],n=e[1];return r[t]=n,n})),e.map((function(e){return[e,r[e]?r[e]:null]}))}),t)},multiSet:function(e,t){return p((function(t,n){return t.multiSet(n,JSON.stringify(e))}),(function(){return null}),t)},multiRemove:function(e,t){return p((function(t,n){return t.multiRemove(n,JSON.stringify(e))}),(function(){return null}),t)},getAllKeys:function(e){return p((function(e,t){return e.getAllKeys(t)}),(function(e){return JSON.parse(e)}),e)},clear:function(e){return p((function(e,t){return e.clear(t)}),(function(){return null}),e)}},t.storage={getItem:function(e){return f((function(t,n){return t.multiGet(n,JSON.stringify([e]))}),(function(e){var t=JSON.parse(e);return t&&t[0]&&t[0][1]?t[0][1]:null}))},setItem:function(e,t){return f((function(n,r){return n.multiSet(r,JSON.stringify([[e,t]]))}),(function(){return null}))},removeItem:function(e){return f((function(t,n){return t.multiRemove(n,JSON.stringify([e]))}),(function(){return null}))},getItems:function(e){return f((function(t,n){return t.multiGet(n,JSON.stringify(e))}),(function(t){var n=JSON.parse(t),r={};return e.forEach((function(e){r[e]=null})),n&&n.forEach((function(e){var t=e[0],n=e[1];return r[t]=n,n})),r}))},setItems:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push([n,e[n]]);return f((function(e,n){return e.multiSet(n,JSON.stringify(t))}),(function(){return null}))},removeItems:function(e){return f((function(t,n){return t.multiRemove(n,JSON.stringify(e))}),(function(){return null}))},getKeys:function(){return f((function(e,t){return e.getAllKeys(t)}),(function(e){return JSON.parse(e)}))}};var h=function(){function e(){var e=this;this._invokeId=0,this._callDict={},this.ctx=new i.ClientRequestContext,this._perkvstorService=m.newObject(this.ctx),this._eventResult=this._perkvstorService.onPersistentStorageMessage.add((function(t){i.Utility.log("persistentKvStoragegMessageHandler:"+JSON.stringify(t));var n=e._callDict[t.invokeId];n&&(n(t.message,t.error),delete e._callDict[t.invokeId])}))}return e.getInstance=function(){return void 0===e.instance?e.instance=new e:e.instance._perkvstorService=m.newObject(e.instance.ctx),e.instance},e.prototype.getPersistentKvStorageService=function(){return this._perkvstorService},e.prototype.getCallBack=function(e){return this._callDict[e]},e.prototype.setCallBack=function(e){var t=this._invokeId;return this._callDict[this._invokeId++]=e,t},e}(),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"PersistentKvStorageService"},enumerable:!1,configurable:!0}),t.prototype.clear=function(e){s(this,"Clear",1,[e],4,0)},t.prototype.getAllKeys=function(e){s(this,"GetAllKeys",1,[e],4,0)},t.prototype.multiGet=function(e,t){s(this,"MultiGet",1,[e,t],4,0)},t.prototype.multiRemove=function(e,t){s(this,"MultiRemove",1,[e,t],4,0)},t.prototype.multiSet=function(e,t){s(this,"MultiSet",1,[e,t],4,0)},t.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),c(t)||u(this,t)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),d(this,t,n)},t.newObject=function(e){return a(t,e,"Microsoft.PersistentKvStorage.PersistentKvStorageService",!1,4)},Object.defineProperty(t.prototype,"onPersistentStorageMessage",{get:function(){return this.m_persistentStorageMessage||(this.m_persistentStorageMessage=new i.GenericEventHandlers(this.context,this,"PersistentStorageMessage",{eventType:65537,registerFunc:function(){},unregisterFunc:function(){},getTargetIdFunc:function(){return null},eventArgsTransformFunc:function(e){var t,n,r,o;try{var a=JSON.parse(e.message),s=parseInt(a.errorCode),c=0!=s?new i.Error((n=s,(r={})[16389]={code:"GenericException",message:"Unknown error."},r[65535]={code:"Unexcepted",message:"Catastrophic failure."},r[14]={code:"OutOfMemory",message:"Ran out of memory."},r[87]={code:"InvalidArg",message:"One or more arguments are invalid."},r[16385]={code:"NotImplemented",message:"Not implemented."},r[6]={code:"BadHandle",message:"File Handle is not Set."},r[5]={code:"AccessDenied",message:"Can't read the Storage File."},(o=r)[n]?o[n]:{code:"Unknown",message:"An unknown error has occured"})):null;t={invokeId:a.invokeId,message:a.message,error:c}}catch(e){t={invokeId:-1,message:e.message,error:new i.Error({code:"GenericException",message:"Unknown error"})}}return i.Utility._createPromiseFromResult(t)}})),this.m_persistentStorageMessage},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return l(this,{},{})},t}(i.ClientObject);t.PersistentKvStorageService=m,function(e){e.generalException="GeneralException"}(t.ErrorCodes||(t.ErrorCodes={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storage=void 0;var r="_OfficeRuntime_Storage_";function o(){window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_",null),window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_")}function i(e){return new Promise((function(t,n){try{o(),e(),t()}catch(e){n(e)}}))}function a(e){return new Promise((function(t,n){try{o(),t(e())}catch(e){n(e)}}))}function s(e,t){return new Promise((function(n,r){var i=[];try{o()}catch(e){i.push(e)}for(var a in e)if(e.hasOwnProperty(a)||Array.isArray(e))try{Array.isArray(e)?t(e[a]):t(a)}catch(e){i.push(e)}i.length>0?r(new Error("Unknown error.")):n()}))}t.storage={getItem:function(e){return a((function(){return window.localStorage.getItem(r+e)}))},setItem:function(e,t){return i((function(){return window.localStorage.setItem(r+e,t)}))},removeItem:function(e){return i((function(){return window.localStorage.removeItem(r+e)}))},getItems:function(e){return new Promise((function(t,n){var i={},a=[];try{o()}catch(e){n(e)}e.forEach((function(e){try{var t=window.localStorage.getItem(r+e);i[e]=t||null}catch(e){a.push(e)}})),a.length>0?n(new Error("Unknown error.")):t(i)}))},setItems:function(e){return s(e,(function(t){return window.localStorage.setItem(r+t,e[t])}))},removeItems:function(e){return s(e,(function(e){window.localStorage.removeItem(r+e)}))},getKeys:function(){return a((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).map((function(e){return e.substr(r.length)}))}))}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex === 0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive = bucketPositive.sort(function (left, right) { + var diff = left.tabIndex - right.tabIndex; + if (diff === 0) { + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + return { + set_entropy: function OSF_OUtil$set_entropy(entropy) { + if (typeof entropy == "string") { + for (var i = 0; i < entropy.length; i += 4) { + var temp = 0; + for (var j = 0; j < 4 && i + j < entropy.length; j++) { + temp = (temp << 8) + entropy.charCodeAt(i + j); + } + _rndentropy ^= temp; + } + } + else if (typeof entropy == "number") { + _rndentropy ^= entropy; + } + else { + _rndentropy ^= 0x7fffffff * Math.random(); + } + _rndentropy &= 0x7fffffff; + }, + extend: function OSF_OUtil$extend(child, parent) { + var F = function () { }; + F.prototype = parent.prototype; + child.prototype = new F(); + child.prototype.constructor = child; + child.uber = parent.prototype; + if (parent.prototype.constructor === Object.prototype.constructor) { + parent.prototype.constructor = parent; + } + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name] = {}; + } + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { + if (parent && name && parent[name]) { + delete parent[name]; + } + }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret = {}; + for (var key in settingsCollection) { + var value = settingsCollection[key]; + try { + if (JSON) { + value = JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret = {}; + serializedSettings = serializedSettings || {}; + for (var key in serializedSettings) { + var value = serializedSettings[key]; + try { + if (JSON) { + value = JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if (!_loadedScriptEntry) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + var onLoadTimeOut = function OSF_OUtil_loadScript$onLoadTimeOut() { + if (window.navigator.userAgent.indexOf("Trident") > 0) { + onLoadError(null); + } + else { + onLoadError(new Event("Script load timed out")); + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError(errorEvent) { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(errorEvent); + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadTimeOut, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) { + if (url) { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link); + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { + var parsed = enumObject[str.trim()]; + if (typeof (parsed) == 'undefined') { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed; + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { + var obj = { calc: arguments[0] }; + return function () { + if (obj.calc) { + obj.val = obj.calc.apply(this, arguments); + delete obj.calc; + } + return obj.val; + }; + }, + getUniqueId: function OSF_OUtil$getUniqueId() { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString(); + }, + formatString: function OSF_OUtil$formatString() { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10) + 1; + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }, + generateConversationId: function OSF_OUtil$generateConversationId() { + return [_random(), _random(), (new Date()).getTime().toString()].join('_'); + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId(); + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { + return OSF.OUtil.addInfoAsHash(url, _xdmInfoKey, xdmInfoValue, false); + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) { + return OSF.OUtil.addInfoAsHash(url, _serializerVersionKey, serializerVersion, true); + }, + addFlightsAsHash: function OSF_OUtil$addFlightsAsHash(url, flights) { + return OSF.OUtil.addInfoAsHash(url, _flightsKey, flights, true); + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) { + url = url.trim() || ''; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if (encodeInfo) { + newFragment = [keyName, encodeURIComponent(infoValue), fragment].join(''); + } + else { + newFragment = [fragment, keyName, infoValue].join(''); + } + return [urlWithoutFragment, _fragmentSeparator, newFragment].join(''); + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.HostInfo); + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.XdmInfo); + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.SerializerVersion)); + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseFlights: function OSF_OUtil$parseFlights(skipSessionStorage) { + var flights = OSF.OUtil.parseFlightsWithGivenFragment(skipSessionStorage, window.location.hash); + if (flights.length == 0) { + flights = OSF.OUtil.parseFlightsFromWindowName(skipSessionStorage, window.name); + } + return flights; + }, + checkFlight: function OSF_OUtil$checkFlightEnabled(flight) { + return OSF.Flights && OSF.Flights.indexOf(flight) >= 0; + }, + pushFlight: function OSF_OUtil$pushFlight(flight) { + if (OSF.Flights.indexOf(flight) < 0) { + OSF.Flights.push(flight); + return true; + } + return false; + }, + getBooleanSetting: function OSF_OUtil$getSetting(settingName) { + return OSF.OUtil.getBooleanFromDictionary(OSF.Settings, settingName); + }, + getBooleanFromDictionary: function OSF_OUtil$getBooleanFromDictionary(settings, settingName) { + var result = (settings && settingName && settings[settingName] !== undefined && settings[settingName] && + ((typeof (settings[settingName]) === "string" && settings[settingName].toUpperCase() === 'TRUE') || + (typeof (settings[settingName]) === "boolean" && settings[settingName]))); + return result !== undefined ? result : false; + }, + getIntFromDictionary: function OSF_OUtil$getIntFromDictionary(settings, settingName) { + if (settings && settingName && settings[settingName] !== undefined && (typeof settings[settingName] === "string")) { + return parseInt(settings[settingName]); + } + else { + return NaN; + } + }, + pushIntFlight: function OSF_OUtil$pushIntFlight(flight, flightValue) { + if (!(flight in OSF.IntFlights)) { + OSF.IntFlights[flight] = flightValue; + return true; + } + return false; + }, + getIntFlight: function OSF_OUtil$getIntFlight(flight) { + if (OSF.IntFlights && (flight in OSF.IntFlights)) { + return OSF.IntFlights[flight]; + } + else { + return NaN; + } + }, + parseFlightsFromWindowName: function OSF_OUtil$parseFlightsFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.Flights)); + }, + parseFlightsWithGivenFragment: function OSF_OUtil$parseFlightsWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(_flightsKey, _flightsKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseArrayWithDefault: function OSF_OUtil$parseArrayWithDefault(jsonString) { + var array = []; + try { + array = JSON.parse(jsonString); + } + catch (ex) { } + if (!Array.isArray(array)) { + array = []; + } + return array; + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj != null) { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue != null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >= 0) { + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue = decodeURIComponent(infoValue); + } + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd = window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd == -1) { + sessionKeyEnd = window.name.length; + } + var sessionKey = window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString = window.location.search; + var conversationId = null; + if (searchString) { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1) === '=') { + conversationId = conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId = decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) { + var items = strInfo.split("$"); + if (typeof items[1] == "undefined") { + items = strInfo.split("|"); + } + if (typeof items[1] == "undefined") { + items = strInfo.split("%7C"); + } + return items; + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue = ''; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if (items != undefined && items.length >= 3) { + switch (xdmFieldName) { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break; + } + } + } + return fieldValue; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e = Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) + throw e; + for (var p in expectedProperties) { + e = Function._validateParameter(params[p], expectedProperties[p], p); + if (e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) { + if (typeof (OsfMsAjaxFactory) !== 'undefined' && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) { + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor = descriptor || {}; + for (var nd in attributes) { + var attribute = attributes[nd]; + if (descriptor[attribute] == undefined) { + descriptor[attribute] = true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors = descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for (var i = 0; i < propsLength; i++) { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable = descriptor.writable || false; + } + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret = []; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key == item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value == list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add = list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key] = value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2] = newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj) === "[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj) === "[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj) === "[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.attachEvent) { + element.attachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.detachEvent) { + element.detachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = null; + } + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) { + var xmlhttp; + try { + xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function () { + if (xmlhttp.readyState == 4) { + if (xmlhttp.status == 200) { + onSuccess(xmlhttp.responseText); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + if (!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, c2, c3, a, b, c; + var i; + var length = input.length; + do { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + if (!isNaN(c2)) { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + } + if (isNaN(c2)) { + temp[i - 1] = 64; + } + else if (isNaN(c3)) { + temp[i - 2] = 64; + temp[i - 1] = 64; + } + for (var t = 0; t < i; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getSessionStorage: function OSF_Outil$getSessionStorage() { + return _getSessionStorage(); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage = window.localStorage; + } + catch (ex) { + localStorage = null; + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage); + } + return _safeLocalStorage; + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) { + var hex = "#" + (Number(val) + 0x1000000).toString(16).slice(-6); + return hex; + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) { + element.onclick = function (e) { + handler(); + }; + element.ontouchend = function (e) { + handler(); + e.preventDefault(); + }; + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) { + var e = Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: false }, + { name: "paramName", type: String, mayBeNull: false } + ]); + if (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return ""; + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)", "i"); + if (!queryExp.test(queryString)) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return ""; + } + return queryExp.exec(queryString)[1]; + }, + getHostnamePortionForLogging: function OSF_Outil$getHostnamePortionForLogging(hostname) { + var e = Function._validateParams(arguments, [{ name: "hostname", type: String, mayBeNull: false } + ]); + if (e) { + return ""; + } + var hostnameSubstrings = hostname.split('.'); + var len = hostnameSubstrings.length; + if (len >= 2) { + return hostnameSubstrings[len - 2] + "." + hostnameSubstrings[len - 1]; + } + else if (len == 1) { + return hostnameSubstrings[0]; + } + }, + isiOS: function OSF_Outil$isiOS() { + return (window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false); + }, + isChrome: function OSF_Outil$isChrome() { + return (window.navigator.userAgent.indexOf("Chrome") > 0) && !OSF.OUtil.isEdge(); + }, + isEdge: function OSF_Outil$isEdge() { + return window.navigator.userAgent.indexOf("Edge") > 0; + }, + isIE: function OSF_Outil$isIE() { + return window.navigator.userAgent.indexOf("Trident") > 0; + }, + isFirefox: function OSF_Outil$isFirefox() { + return window.navigator.userAgent.indexOf("Firefox") > 0; + }, + startsWith: function OSF_Outil$startsWith(originalString, patternToCheck, browserIsIE) { + if (browserIsIE) { + return originalString.substr(0, patternToCheck.length) === patternToCheck; + } + else { + return originalString.startsWith(patternToCheck); + } + }, + containsPort: function OSF_Outil$containsPort(url, protocol, hostname, portNumber) { + return this.startsWith(url, protocol + "//" + hostname + ":" + portNumber, true) || this.startsWith(url, hostname + ":" + portNumber, true); + }, + getRedundandPortString: function OSF_Outil$getRedundandPortString(url, parser) { + if (!url || !parser) + return ""; + if (parser.protocol == "https:" && this.containsPort(url, "https:", parser.hostname, "443")) + return ":443"; + else if (parser.protocol == "http:" && this.containsPort(url, "http:", parser.hostname, "80")) + return ":80"; + return ""; + }, + removeChar: function OSF_Outil$removeChar(url, indexOfCharToRemove) { + if (indexOfCharToRemove < url.length - 1) + return url.substring(0, indexOfCharToRemove) + url.substring(indexOfCharToRemove + 1); + else if (indexOfCharToRemove == url.length - 1) + return url.substring(0, url.length - 1); + else + return url; + }, + cleanUrlOfChar: function OSF_Outil$cleanUrlOfChar(url, charToClean) { + var i; + for (i = 0; i < url.length; i++) { + if (url.charAt(i) === charToClean) { + if (i + 1 >= url.length) { + return this.removeChar(url, i); + } + else if (charToClean === '/') { + if (url.charAt(i + 1) === '?' || url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + else if (charToClean === '?') { + if (url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + } + } + return url; + }, + cleanUrl: function OSF_Outil$cleanUrl(url) { + url = this.cleanUrlOfChar(url, '/'); + url = this.cleanUrlOfChar(url, '?'); + url = this.cleanUrlOfChar(url, '#'); + if (url.substr(0, 8) == "https://") { + var portIndex = url.indexOf(":443"); + if (portIndex != -1) { + if (portIndex == url.length - 4 || url.charAt(portIndex + 4) == "/" || url.charAt(portIndex + 4) == "?" || url.charAt(portIndex + 4) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 4); + } + } + } + else if (url.substr(0, 7) == "http://") { + var portIndex = url.indexOf(":80"); + if (portIndex != -1) { + if (portIndex == url.length - 3 || url.charAt(portIndex + 3) == "/" || url.charAt(portIndex + 3) == "?" || url.charAt(portIndex + 3) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 3); + } + } + } + return url; + }, + parseUrl: function OSF_Outil$parseUrl(url, enforceHttps) { + if (enforceHttps === void 0) { enforceHttps = false; } + if (typeof url === "undefined" || !url) { + return undefined; + } + var notHttpsErrorMessage = "NotHttps"; + var invalidUrlErrorMessage = "InvalidUrl"; + var isIEBoolean = this.isIE(); + var parsedUrlObj = { + protocol: undefined, + hostname: undefined, + host: undefined, + port: undefined, + pathname: undefined, + search: undefined, + hash: undefined, + isPortPartOfUrl: undefined + }; + try { + if (isIEBoolean) { + var parser = document.createElement("a"); + parser.href = url; + if (!parser || !parser.protocol || !parser.host || !parser.hostname || !parser.href + || this.cleanUrl(parser.href).toLowerCase() !== this.cleanUrl(url).toLowerCase()) { + throw invalidUrlErrorMessage; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && parser.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + var redundandPortString = this.getRedundandPortString(url, parser); + parsedUrlObj.protocol = parser.protocol; + parsedUrlObj.hostname = parser.hostname; + parsedUrlObj.port = (redundandPortString == "") ? parser.port : ""; + parsedUrlObj.host = (redundandPortString != "") ? parser.hostname : parser.host; + parsedUrlObj.pathname = (isIEBoolean ? "/" : "") + parser.pathname; + parsedUrlObj.search = parser.search; + parsedUrlObj.hash = parser.hash; + parsedUrlObj.isPortPartOfUrl = this.containsPort(url, parser.protocol, parser.hostname, parser.port); + } + else { + var urlObj = new URL(url); + if (urlObj && urlObj.protocol && urlObj.host && urlObj.hostname) { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && urlObj.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + parsedUrlObj.protocol = urlObj.protocol; + parsedUrlObj.hostname = urlObj.hostname; + parsedUrlObj.port = urlObj.port; + parsedUrlObj.host = urlObj.host; + parsedUrlObj.pathname = urlObj.pathname; + parsedUrlObj.search = urlObj.search; + parsedUrlObj.hash = urlObj.hash; + parsedUrlObj.isPortPartOfUrl = urlObj.host.lastIndexOf(":" + urlObj.port) == (urlObj.host.length - urlObj.port.length - 1); + } + } + } + catch (err) { + if (err.message === notHttpsErrorMessage) + throw err; + } + return parsedUrlObj; + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) { + if (sourceObj == null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr = []; + for (var i = 0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj = sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property] = sourceObj[property]; + } + } + return copyObj; + } + }, + createObject: function OSF_Outil$createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + }, + addClass: function OSF_OUtil$addClass(elmt, val) { + if (!OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + if (className) { + elmt.setAttribute(_classN, className + " " + val); + } + else { + elmt.setAttribute(_classN, val); + } + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) { + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findNextPos = function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && backward) { + return -1; + } + else if (currPos === allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if (all.length === 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, backward); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findCurrPos = function (all, curr) { + var i = 0; + for (; i < all.length; i++) { + if (all[i] === curr) { + return i; + } + } + return -1; + }; + var findNextPos = function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && shift) { + return -1; + } + else if (currPos === allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all, curr); + next = findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, shift); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + isNullOrUndefined: function OSF_OUtil$isNullOrUndefined(value) { + if (typeof (value) === "undefined") { + return true; + } + if (value === null) { + return true; + } + return false; + }, + stringEndsWith: function OSF_OUtil$stringEndsWith(value, subString) { + if (!OSF.OUtil.isNullOrUndefined(value) && !OSF.OUtil.isNullOrUndefined(subString)) { + if (subString.length > value.length) { + return false; + } + if (value.substr(value.length - subString.length) === subString) { + return true; + } + } + return false; + }, + hashCode: function OSF_OUtil$hashCode(str) { + var hash = 0; + if (!OSF.OUtil.isNullOrUndefined(str)) { + var i = 0; + var len = str.length; + while (i < len) { + hash = (hash << 5) - hash + str.charCodeAt(i++) | 0; + } + } + return hash; + }, + getValue: function OSF_OUtil$getValue(value, defaultValue) { + if (OSF.OUtil.isNullOrUndefined(value)) { + return defaultValue; + } + return value; + }, + externalNativeFunctionExists: function OSF_OUtil$externalNativeFunctionExists(type) { + return type === 'unknown' || type !== 'undefined'; + } + }; +})(); +OSF.OUtil.Guid = (function () { + var hexCode = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result = ""; + var tick = (new Date()).getTime(); + var index = 0; + for (; index < 32 && tick > 0; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + }; +})(); +try { + (function () { + OSF.Flights = OSF.OUtil.parseFlights(true); + })(); +} +catch (ex) { } +window.OSF = OSF; +OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614, + Visio: 8388615, + OneNoteAndroid: 4194305 +}; +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +}; +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +}; +OSF.AgaveHostAction = { + "Select": 0, + "UnSelect": 1, + "CancelDialog": 2, + "InsertAgave": 3, + "CtrlF6In": 4, + "CtrlF6Exit": 5, + "CtrlF6ExitShift": 6, + "SelectWithError": 7, + "NotifyHostError": 8, + "RefreshAddinCommands": 9, + "PageIsReady": 10, + "TabIn": 11, + "TabInShift": 12, + "TabExit": 13, + "TabExitShift": 14, + "EscExit": 15, + "F2Exit": 16, + "ExitNoFocusable": 17, + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20, + "UpdateTargetUrl": 21, + "InstallCustomFunctions": 22, + "SendTelemetryEvent": 23, + "UninstallCustomFunctions": 24, + "SendMessage": 25, + "LaunchExtensionComponent": 26, + "StopExtensionComponent": 27, + "RestartExtensionComponent": 28, + "EnableTaskPaneHeaderButton": 29, + "DisableTaskPaneHeaderButton": 30, + "TaskPaneHeaderButtonClicked": 31, + "RemoveAppCommandsAddin": 32, + "RefreshRibbonGallery": 33, + "GetOriginalControlId": 34, + "OfficeJsReady": 35, + "InsertDevManifest": 36, + "InsertDevManifestError": 37, + "SendCustomerContent": 38, + "KeyboardShortcuts": 39 +}; +OSF.SharedConstants = { + "NotificationConversationIdSuffix": '_ntf' +}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix, featureGates, officeTheme, initialDisplayMode) { + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this._featureGates = featureGates; + this._officeTheme = officeTheme; + this._initialDisplayMode = initialDisplayMode; + this.get_id = function get_id() { return this._id; }; + this.get_appName = function get_appName() { return this._appName; }; + this.get_appVersion = function get_appVersion() { return this._appVersion; }; + this.get_appUILocale = function get_appUILocale() { return this._appUILocale; }; + this.get_dataLocale = function get_dataLocale() { return this._dataLocale; }; + this.get_docUrl = function get_docUrl() { return this._docUrl; }; + this.get_clientMode = function get_clientMode() { return this._clientMode; }; + this.get_bindings = function get_bindings() { return this._bindings; }; + this.get_settings = function get_settings() { return this._settings; }; + this.get_reason = function get_reason() { return this._reason; }; + this.get_osfControlType = function get_osfControlType() { return this._osfControlType; }; + this.get_eToken = function get_eToken() { return this._eToken; }; + this.get_correlationId = function get_correlationId() { return this._correlationId; }; + this.get_appInstanceId = function get_appInstanceId() { return this._appInstanceId; }; + this.get_touchEnabled = function get_touchEnabled() { return this._touchEnabled; }; + this.get_commerceAllowed = function get_commerceAllowed() { return this._commerceAllowed; }; + this.get_appMinorVersion = function get_appMinorVersion() { return this._appMinorVersion; }; + this.get_requirementMatrix = function get_requirementMatrix() { return this._requirementMatrix; }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() { return this._dialogRequirementMatrix; }; + this.get_hostCustomMessage = function get_hostCustomMessage() { return this._hostCustomMessage; }; + this.get_hostFullVersion = function get_hostFullVersion() { return this._hostFullVersion; }; + this.get_isDialog = function get_isDialog() { return this._isDialog; }; + this.get_clientWindowHeight = function get_clientWindowHeight() { return this._clientWindowHeight; }; + this.get_clientWindowWidth = function get_clientWindowWidth() { return this._clientWindowWidth; }; + this.get_addinName = function get_addinName() { return this._addinName; }; + this.get_appDomains = function get_appDomains() { return this._appDomains; }; + this.get_featureGates = function get_featureGates() { return this._featureGates; }; + this.get_officeTheme = function get_officeTheme() { return this._officeTheme; }; + this.get_initialDisplayMode = function get_initialDisplayMode() { return this._initialDisplayMode ? this._initialDisplayMode : 0; }; +}; +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 +}; +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 +}; +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Client", Microsoft.Office); +OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened", + ControlActivation: "controlActivation" +}; +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType = { + All: "all" +}; +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + JsonData: "jsonData", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + AllowConsentPrompt: "allowConsentPrompt", + ForMSGraphAccess: "forMSGraphAccess", + AllowSignInPrompt: "allowSignInPrompt", + JsonPayload: "jsonPayload", + EnableNewHosts: "enableNewHosts", + AccountTypeFilter: "accountTypeFilter", + AddinTrustId: "addinTrustId", + Reserved: "reserved", + Tcid: "tcid", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + PromptBeforeOpen: "promptBeforeOpen", + EnforceAppDomain: "enforceAppDomain", + UrlNoHostInfo: "urlNoHostInfo", + TargetOrigin: "targetOrigin", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64", + FormId: "formId" +}; +OSF.OUtil.setNamespace("DDA", OSF); +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 +}; +OSF.DDA.PropertyDescriptors = { + AsyncResultStatus: "AsyncResultStatus" +}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { + if (eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || + eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) { + return id + "_" + eventType; + } + else { + return eventType; + } +}; +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidGetAuthContextMethod: 99, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, + dispidInsertFormMethod: 106, + dispidDisplayRibbonCalloutAsyncMethod: 109, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidExecuteFeature: 146, + dispidQueryFeature: 147, + dispidGetNestedAppAuthContextMethod: 205, + dispidMethodMax: 205 +}; +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidOlkRecurrenceChangedEvent: 49, + dispidOlkAttachmentsChangedEvent: 50, + dispidOlkEnhancedLocationsChangedEvent: 51, + dispidOlkInfobarClickedEvent: 52, + dispidOlkSelectedItemsChangedEvent: 53, + dispidOlkSensitivityLabelChangedEvent: 54, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 +}; +OSF.DDA.ErrorCodeManager = (function () { + var _errorMappings = {}; + return { + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) { + var errorArgs = _errorMappings[errorCode]; + if (!errorArgs) { + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + } + else { + if (!errorArgs.name) { + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + } + if (!errorArgs.message) { + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message; + } + } + return errorArgs; + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) { + _errorMappings[errorCode] = errorNameMessage; + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1000, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2000, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3000, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4000, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5000, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeOperationCancelled: 5014, + ooeWorkbookHidden: 5015, + ooeWriteNotSupportedWhenModalDialogOpen: 5016, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeRequestPayloadSizeLimitExceeded: 5103, + ooeResponsePayloadSizeLimitExceeded: 5104, + ooeCustomXmlNodeNotFound: 6000, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7000, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8000, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11000, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12000, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeModalDialogOpen: 12012, + ooeDocumentIsInactive: 12013, + ooeDialogParentIsMinimized: 12014, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010, + ooeResourceNotAllowed: 13011, + ooeSSOUnsupportedPlatform: 13012, + ooeSSOCallThrottled: 13013, + ooeAccessDenied: 13990, + ooeGeneralException: 13991 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidReadForBlankRow }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnMatrixData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { name: stringNS.L_InvalidBinding, message: stringNS.L_InvalidColumnsForBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { name: stringNS.L_SaveSettingsError, message: stringNS.L_SettingsCannotSave }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { name: stringNS.L_SettingsStaleError, message: stringNS.L_SettingsAreStale }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { name: stringNS.L_HostError, message: stringNS.L_OperationNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { name: stringNS.L_InternalError, message: stringNS.L_InternalErrorDescription }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { name: stringNS.L_PermissionDenied, message: stringNS.L_DocumentReadOnly }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { name: stringNS.L_EventRegistrationError, message: stringNS.L_EventHandlerNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { name: stringNS.L_InvalidAPICall, message: stringNS.L_InvalidApiCallInContext }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { name: stringNS.L_ShuttingDown, message: stringNS.L_ShuttingDown }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { name: stringNS.L_UnsupportedEnumeration, message: stringNS.L_UnsupportedEnumerationMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden] = { name: stringNS.L_APICallFailed, message: stringNS.L_WorkbookHiddenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen] = { name: stringNS.L_APICallFailed, message: stringNS.L_WriteNotSupportedWhenModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestPayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_ResponsePayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { name: stringNS.L_CustomXmlOutOfDateName, message: stringNS.L_CustomXmlOutOfDateMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { name: stringNS.L_CannotNavigateTo, message: stringNS.L_CannotNavigateTo }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { name: stringNS.L_SpecifiedIdNotExist, message: stringNS.L_SpecifiedIdNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { name: stringNS.L_NavOutOfBound, message: stringNS.L_NavOutOfBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { name: stringNS.L_DataWriteReminder, message: stringNS.L_CellDataAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { name: stringNS.L_MissingParameter, message: stringNS.L_ElementMissing }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidCellsValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidTableOptionValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidFormatValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_RowIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_ColIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_FormatValueOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { name: stringNS.L_FormattingReminder, message: stringNS.L_CellFormatAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { name: stringNS.L_MemoryLimit, message: stringNS.L_CloseFileBeforeRetrieve }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { name: stringNS.L_NetworkProblem, message: stringNS.L_NetworkProblemRetrieveFile }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { name: stringNS.L_InvalidValue, message: stringNS.L_SliceSizeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAlreadyOpened }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NetworkProblem }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { name: stringNS.L_DialogNavigateError, message: stringNS.L_DialogInvalidScheme }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAddressNotTrusted }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_ModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DocumentIsInactive }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogParentIsMinimized }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform] = { name: stringNS.L_APINotSupported, message: stringNS.L_SSOUnsupportedPlatform }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled] = { name: stringNS.L_OperationCancelledError, message: stringNS.L_OperationCancelledErrorMessage }; + } + }; +})(); +(function (OfficeExt) { + var Requirement; + (function (Requirement) { + var RequirementVersion = (function () { + function RequirementVersion() { + } + return RequirementVersion; + }()); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = (function () { + function RequirementMatrix(_setMap) { + this.isSetSupported = function _isSetSupported(name, minVersion) { + if (name == undefined) { + return false; + } + if (minVersion == undefined) { + minVersion = 0; + } + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if (sets.hasOwnProperty(name.toLowerCase())) { + var setMaxVersion = sets[name.toLowerCase()]; + try { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.major > 0 && + setMaxVersionNum.minor >= 0 && + setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor >= minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion = function (version) { + version = version + ""; + var temp = version.split("."); + var major = 0; + var minor = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } + } + var result = { "minor": minor, "major": major }; + return result; + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this); + } + return RequirementMatrix; + }()); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = (function () { + function DefaultSetRequirement(setMap) { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) { + for (var name in addedSet) { + this._sets[name] = addedSet[name]; + } + }; + this._sets = setMap; + } + return DefaultSetRequirement; + }()); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultRequiredDialogSetRequirement = (function (_super) { + __extends(DefaultRequiredDialogSetRequirement, _super); + function DefaultRequiredDialogSetRequirement() { + return _super.call(this, { + "dialogapi": 1.1 + }) || this; + } + return DefaultRequiredDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultRequiredDialogSetRequirement = DefaultRequiredDialogSetRequirement; + var DefaultOptionalDialogSetRequirement = (function (_super) { + __extends(DefaultOptionalDialogSetRequirement, _super); + function DefaultOptionalDialogSetRequirement() { + return _super.call(this, { + "dialogorigin": 1.1 + }) || this; + } + return DefaultOptionalDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultOptionalDialogSetRequirement = DefaultOptionalDialogSetRequirement; + var ExcelClientDefaultSetRequirement = (function (_super) { + __extends(ExcelClientDefaultSetRequirement, _super); + function ExcelClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "excelapi": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = (function (_super) { + __extends(ExcelClientV1DefaultSetRequirement, _super); + function ExcelClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return ExcelClientV1DefaultSetRequirement; + }(ExcelClientDefaultSetRequirement)); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = (function (_super) { + __extends(OutlookClientDefaultSetRequirement, _super); + function OutlookClientDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = (function (_super) { + __extends(WordClientDefaultSetRequirement, _super); + function WordClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1, + "wordapi": 1.1 + }) || this; + } + return WordClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = (function (_super) { + __extends(WordClientV1DefaultSetRequirement, _super); + function WordClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2, + "imagecoercion": 1.1 + }); + return _this; + } + return WordClientV1DefaultSetRequirement; + }(WordClientDefaultSetRequirement)); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = (function (_super) { + __extends(PowerpointClientDefaultSetRequirement, _super); + function PowerpointClientDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = (function (_super) { + __extends(PowerpointClientV1DefaultSetRequirement, _super); + function PowerpointClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return PowerpointClientV1DefaultSetRequirement; + }(PowerpointClientDefaultSetRequirement)); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = (function (_super) { + __extends(ProjectClientDefaultSetRequirement, _super); + function ProjectClientDefaultSetRequirement() { + return _super.call(this, { + "selection": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ProjectClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = (function (_super) { + __extends(ExcelWebDefaultSetRequirement, _super); + function ExcelWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "file": 1.1 + }) || this; + } + return ExcelWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = (function (_super) { + __extends(WordWebDefaultSetRequirement, _super); + function WordWebDefaultSetRequirement() { + return _super.call(this, { + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "imagecoercion": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablecoercion": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = (function (_super) { + __extends(PowerpointWebDefaultSetRequirement, _super); + function PowerpointWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "settings": 1.1 + }) || this; + } + return PowerpointWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = (function (_super) { + __extends(OutlookWebDefaultSetRequirement, _super); + function OutlookWebDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = (function (_super) { + __extends(SwayWebDefaultSetRequirement, _super); + function SwayWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "documentevents": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return SwayWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = (function (_super) { + __extends(AccessWebDefaultSetRequirement, _super); + function AccessWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "partialtablebindings": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1 + }) || this; + } + return AccessWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = (function (_super) { + __extends(ExcelIOSDefaultSetRequirement, _super); + function ExcelIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = (function (_super) { + __extends(WordIOSDefaultSetRequirement, _super); + function WordIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = (function (_super) { + __extends(WordIOSV1DefaultSetRequirement, _super); + function WordIOSV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2 + }); + return _this; + } + return WordIOSV1DefaultSetRequirement; + }(WordIOSDefaultSetRequirement)); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = (function (_super) { + __extends(PowerpointIOSDefaultSetRequirement, _super); + function PowerpointIOSDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = (function (_super) { + __extends(OutlookIOSDefaultSetRequirement, _super); + function OutlookIOSDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.1 + }) || this; + } + return OutlookIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = (function () { + function RequirementsMatrixFactory() { + } + RequirementsMatrixFactory.initializeOsfDda = function () { + OSF.OUtil.setNamespace("Requirement", OSF.DDA); + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function (appContext) { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + try { + var setName = "dialogorigin"; + if (!matrixItem.hasOwnProperty(setName)) { + matrixItem[setName] = 1.1; + } + } + catch (ex) { } + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if (RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) { + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + } + else { + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})); + } + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function (appContext) { + var setRequirements = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + setRequirements = new DefaultSetRequirement(matrixItem); + } + else { + setRequirements = new DefaultRequiredDialogSetRequirement(); + var mainRequirement = appContext.get_requirementMatrix(); + if (mainRequirement != undefined && mainRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(mainRequirement.toLowerCase()); + for (var name in setRequirements._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + var dialogOptionalSetRequirement = new DefaultOptionalDialogSetRequirement(); + for (var name in dialogOptionalSetRequirement._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + } + } + try { + var setName = "dialogorigin"; + if (!setRequirements._sets.hasOwnProperty(setName) && window.opener) { + setRequirements._sets[setName] = 1.1; + } + } + catch (ex) { } + return new RequirementMatrix(setRequirements); + }; + RequirementsMatrixFactory.getClientFullVersionString = function (appContext) { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || + appName == 4096 || + appName == 8192 || + appName == 65536; + if (isIOSClient && appContext.get_appVersion() == 1) { + if (appName == 4096 && appMinorVersion >= 15) { + appFullVersion = "16.00.01"; + } + else { + appFullVersion = "16.00"; + } + } + else if (appContext.get_appName() == 64) { + appFullVersion = appContext.get_appVersion(); + } + else { + if (appMinorVersion < 10) { + appMinorVersionString = "0" + appMinorVersion; + } + else { + appMinorVersionString = "" + appMinorVersion; + } + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString; + } + return appContext.get_appName() + "-" + appFullVersion; + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function () { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement(); + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory; + }()); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory; + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})); +})(OfficeExt || (OfficeExt = {})); +OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" +}; +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" +}; +OSF.NamespaceManager = (function OSF_NamespaceManager() { + var _userOffice; + var _useShortcut = false; + return { + enableShortcut: function OSF_NamespaceManager$enableShortcut() { + if (!_useShortcut) { + if (window.Office) { + _userOffice = window.Office; + } + else { + OSF.OUtil.setNamespace("Office", window); + } + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true; + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() { + if (_useShortcut) { + if (_userOffice) { + window.Office = _userOffice; + } + else { + OSF.OUtil.unsetNamespace("Office", window); + } + _useShortcut = false; + } + } + }; +})(); +OSF.NamespaceManager.enableShortcut(); +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { + if (useShortcut) { + OSF.NamespaceManager.enableShortcut(); + } + else { + OSF.NamespaceManager.disableShortcut(); + } +}; +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { + var promise; + if (str && typeof str == "string") { + var index = str.indexOf("#"); + if (index != -1) { + var op = str.substring(0, index); + var target = str.substring(index + 1); + switch (op) { + case "binding": + case "bindings": + if (target) { + promise = new OSF.DDA.BindingPromise(target); + } + break; + } + } + } + if (!promise) { + if (errorCallback) { + var callbackType = typeof errorCallback; + if (callbackType == "function") { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext, OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)); + } + else { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, callbackType); + } + } + } + else { + promise.onFail = errorCallback; + return promise; + } +}; +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { + OSF.OUtil.defineEnumerableProperties(this, { + "contentLanguage": { + value: officeAppContext.get_dataLocale() + }, + "displayLanguage": { + value: officeAppContext.get_appUILocale() + }, + "touchEnabled": { + value: officeAppContext.get_touchEnabled() + }, + "commerceAllowed": { + value: officeAppContext.get_commerceAllowed() + }, + "host": { + value: OfficeExt.HostName.Host.getInstance().getHost() + }, + "platform": { + value: OfficeExt.HostName.Host.getInstance().getPlatform() + }, + "isDialog": { + value: OSF._OfficeAppFactory.getHostInfo().isDialog + }, + "diagnostics": { + value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion()) + } + }); + if (license) { + OSF.OUtil.defineEnumerableProperty(this, "license", { + value: license + }); + } + if (officeAppContext.ui) { + OSF.OUtil.defineEnumerableProperty(this, "ui", { + value: officeAppContext.ui + }); + } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.webAuth) { + OSF.OUtil.defineEnumerableProperty(this, "webAuth", { + value: officeAppContext.webAuth + }); + } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } + if (officeAppContext.extensionLifeCycle) { + OSF.OUtil.defineEnumerableProperty(this, "extensionLifeCycle", { + value: officeAppContext.extensionLifeCycle + }); + } + if (officeAppContext.messaging) { + OSF.OUtil.defineEnumerableProperty(this, "messaging", { + value: officeAppContext.messaging + }); + } + if (officeAppContext.ui && officeAppContext.ui.taskPaneAction) { + OSF.OUtil.defineEnumerableProperty(this, "taskPaneAction", { + value: officeAppContext.ui.taskPaneAction + }); + } + if (officeAppContext.ui && officeAppContext.ui.ribbonGallery) { + OSF.OUtil.defineEnumerableProperty(this, "ribbonGallery", { + value: officeAppContext.ui.ribbonGallery + }); + } + if (officeAppContext.get_isDialog()) { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } + else { + if (document) { + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: document + }); + } + if (appOM) { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this, displayName, { + value: appOM + }); + } + if (officeAppContext.get_officeTheme()) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return officeAppContext.get_officeTheme(); + } + }); + } + else if (getOfficeTheme) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return getOfficeTheme(); + } + }); + } + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + if (officeAppContext.get_featureGates) { + var featureGates = officeAppContext.get_featureGates(); + if (featureGates && featureGates["EnablePublicThemeManager"]) { + var themeManager = new OSF.DDA.Theming.InternalThemeHandler(); + themeManager.InitializeThemeManager(); + OSF.OUtil.defineEnumerableProperty(this, "themeManager", { + value: themeManager + }); + } + } + } +}; +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { + OSF.DDA.OutlookContext.uber.constructor.call(this, appContext, null, license, appOM, getOfficeTheme); + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "roamingSettings", { + value: settings + }); + } + if (appContext.sensitivityLabelsCatalog) { + OSF.OUtil.defineEnumerableProperty(this, "sensitivityLabelsCatalog", { + value: appContext.sensitivityLabelsCatalog() + }); + } +}; +OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { + var mode; + switch (officeAppContext.get_clientMode()) { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break; + } + ; + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "settings", { + value: settings + }); + } + ; + OSF.OUtil.defineMutableProperties(this, { + "mode": { + value: mode + }, + "url": { + value: officeAppContext.get_docUrl() + } + }); +}; +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { + OSF.DDA.JsomDocument.uber.constructor.call(this, officeAppContext, settings); + if (bindingFacade) { + OSF.OUtil.defineEnumerableProperty(this, "bindings", { + get: function OSF_DDA_Document$GetBindings() { return bindingFacade; } + }); + } + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetSelectedDataAsync, + am.SetSelectedDataAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])); +}; +OSF.OUtil.extend(OSF.DDA.JsomDocument, OSF.DDA.Document); +OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension, "context", { + get: function Microsoft_Office_WebExtension$GetContext() { + var context; + if (OSF && OSF._OfficeAppFactory) { + context = OSF._OfficeAppFactory.getContext(); + } + return context; + } +}); +OSF.DDA.License = function OSF_DDA_License(eToken) { + OSF.OUtil.defineEnumerableProperty(this, "value", { + value: eToken + }); +}; +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function () { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, displayName); + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) { + for (var name in params) { + var param = params[name]; + var arg = args[name]; + if (param["enum"]) { + switch (typeof arg) { + case "string": + if (OSF.OUtil.listContainsValue(param["enum"], arg)) { + break; + } + case "undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + } + if (param["types"]) { + if (!OSF.OUtil.listContainsValue(param["types"], typeof arg)) { + throw getInvalidParameterString(); + } + } + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) { + if (userArgs.length < requiredCount) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + } + var requiredArgs = []; + var index; + for (index = 0; index < requiredCount; index++) { + requiredArgs.push(userArgs[index]); + } + this.verifyArguments(requiredParameters, requiredArgs); + var ret = {}; + for (index = 0; index < requiredCount; index++) { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if (param.verify) { + var isValid = param.verify(arg, caller, stateInfo); + if (!isValid) { + throw getInvalidParameterString(); + } + } + ret[param.name] = arg; + } + return ret; + }, + this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) { + options = options || {}; + for (var optionName in supportedOptions) { + if (!OSF.OUtil.listContainsKey(options, optionName)) { + var value = undefined; + var option = supportedOptions[optionName]; + if (option.calculate && requiredArgs) { + value = option.calculate(requiredArgs, caller, stateInfo); + } + if (!value && option.defaultValue !== undefined) { + value = option.defaultValue; + } + options[optionName] = value; + } + } + return options; + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) { + var callArgs = {}; + for (var r in required) { + callArgs[r] = required[r]; + } + for (var o in options) { + callArgs[o] = options[o]; + } + for (var s in privateStateCallbacks) { + callArgs[s] = privateStateCallbacks[s](caller, stateInfo); + } + if (checkCallArgs) { + callArgs = checkCallArgs(callArgs, caller, stateInfo); + } + return callArgs; + }; +}; +OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" +}; +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" +}; +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 +}; +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" +}; +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.AsyncMethodNames[entry] = am; + } +}; +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 2) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + case "function": + if (parameterCallback) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + } + else { + parameterCallback = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + if (parameterCallback) { + if (options[Microsoft.Office.WebExtension.Parameters.Callback]) { + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + } + else { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + } + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (onSucceeded) { + payload = onSucceeded(response, caller, callArgs); + } + else { + payload = response; + } + } + else { + if (onFailed) { + payload = onFailed(status, response); + } + else { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + } + return payload; + }; + this.getCallArgs = function (suppliedArgs) { + var options, parameterCallback; + for (var i = suppliedArgs.length - 1; i >= requiredCount; i--) { + var argument = suppliedArgs[i]; + switch (typeof argument) { + case "object": + options = argument; + break; + case "function": + parameterCallback = argument; + break; + } + } + options = options || {}; + if (parameterCallback) { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + return options; + }; +}; +OSF.DDA.AsyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [], supportedOptions, privateStateCallbacks, params.onSucceeded, params.onFailed, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function (callDefinition) { + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { + OSF.OUtil.defineEnumerableProperties(this, { + "name": { + value: name + }, + "message": { + value: message + }, + "code": { + value: code + } + }); +}; +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { + OSF.OUtil.defineEnumerableProperties(this, { + "value": { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value] + }, + "status": { + value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded + } + }); + if (initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) { + OSF.OUtil.defineEnumerableProperty(this, "asyncContext", { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context] + }); + } + if (errorArgs) { + OSF.OUtil.defineEnumerableProperty(this, "error", { + value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + }); + } +}; +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if (callback) { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + } + else { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs, errorArgs)); + } +}; +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.SyncMethodNames[entry] = am; + } +}; +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 1) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; +}; +OSF.DDA.SyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [], supportedOptions, params.privateStateCallbacks, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function (callDefinition) { + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.ListType = (function () { + var listTypes = {}; + return { + setListType: function OSF_DDA_ListType$AddListType(t, prop) { listTypes[t] = prop; }, + isListType: function OSF_DDA_ListType$IsListType(t) { return OSF.OUtil.listContainsKey(listTypes, t); }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) { return listTypes[t]; } + }; +})(); +OSF.DDA.HostParameterMap = function (specialProcessor, mappings) { + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function (data) { + if (data != null && data.rows !== undefined) { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData; + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.JsonData] = { + toHost: function (data) { return data; }, + fromHost: function (data) { return typeof data === "string" ? JSON.parse(data) : data; } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) { + var ret = preimageSet ? {} : undefined; + for (var entry in preimageSet) { + var preimage = preimageSet[entry]; + var image; + if (OSF.DDA.ListType.isListType(entry)) { + image = []; + for (var subEntry in preimage) { + image.push(mapValues(preimage[subEntry], mapping)); + } + } + else if (OSF.OUtil.listContainsKey(dynamicTypes, entry)) { + image = dynamicTypes[entry][mapping](preimage); + } + else if (mapping == fromHostMap && specialProcessor.preserveNesting(entry)) { + image = mapValues(preimage, mapping); + } + else { + var maps = mappings[entry]; + if (maps) { + var map = maps[mapping]; + if (map) { + image = map[preimage]; + if (image === undefined) { + image = preimage; + } + } + } + else { + image = preimage; + } + } + ret[entry] = image; + } + return ret; + } + ; + function generateArguments(imageSet, parameters) { + var ret; + for (var param in parameters) { + var arg; + if (specialProcessor.isComplexType(param)) { + arg = generateArguments(imageSet, mappings[param][toHostMap]); + } + else { + arg = imageSet[param]; + } + if (arg != undefined) { + if (!ret) { + ret = {}; + } + var index = parameters[param]; + if (index == self) { + index = param; + } + ret[index] = specialProcessor.pack(param, arg); + } + } + return ret; + } + ; + function extractArguments(source, parameters, extracted) { + if (!extracted) { + extracted = {}; + } + for (var param in parameters) { + var index = parameters[param]; + var value; + if (index == self) { + value = source; + } + else if (index == sourceData) { + extracted[param] = source.toArray(); + continue; + } + else { + value = source[index]; + } + if (value === null || value === undefined) { + extracted[param] = undefined; + } + else { + value = specialProcessor.unpack(param, value); + var map; + if (specialProcessor.isComplexType(param)) { + map = mappings[param][fromHostMap]; + if (specialProcessor.preserveNesting(param)) { + extracted[param] = extractArguments(value, map); + } + else { + extractArguments(value, map, extracted); + } + } + else { + if (OSF.DDA.ListType.isListType(param)) { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for (var item in value) { + extractedValues[item] = extractArguments(value[item], map); + } + extracted[param] = extractedValues; + } + else { + extracted[param] = value; + } + } + } + } + return extracted; + } + ; + function applyMap(mapName, preimage, mapping) { + var parameters = mappings[mapName][mapping]; + var image; + if (mapping == "toHost") { + var imageSet = mapValues(preimage, mapping); + image = generateArguments(imageSet, parameters); + } + else if (mapping == "fromHost") { + var argumentSet = extractArguments(preimage, parameters); + image = mapValues(argumentSet, mapping); + } + return image; + } + ; + if (!mappings) { + mappings = {}; + } + this.addMapping = function (mapName, description) { + var toHost, fromHost; + if (description.map) { + toHost = description.map; + fromHost = {}; + for (var preimage in toHost) { + var image = toHost[preimage]; + if (image == self) { + image = preimage; + } + fromHost[image] = preimage; + } + } + else { + toHost = description.toHost; + fromHost = description.fromHost; + } + var pair = mappings[mapName]; + if (pair) { + var currMap = pair[toHostMap]; + for (var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for (var fh in currMap) + fromHost[fh] = currMap[fh]; + } + else { + pair = mappings[mapName] = {}; + } + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost; + }; + this.toHost = function (mapName, preimage) { return applyMap(mapName, preimage, toHostMap); }; + this.fromHost = function (mapName, image) { return applyMap(mapName, image, fromHostMap); }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function (ct) { specialProcessor.addComplexType(ct); }; + this.getDynamicType = function (dt) { return specialProcessor.getDynamicType(dt); }; + this.setDynamicType = function (dt, handler) { specialProcessor.setDynamicType(dt, handler); }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function (preimageSet, mapping) { return mapValues(preimageSet, mapping); }; +}; +OSF.DDA.SpecialProcessor = function (complexTypes, dynamicTypes) { + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) { + complexTypes.push(ct); + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) { + return dynamicTypes[dt]; + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) { + dynamicTypes[dt] = handler; + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) { + return OSF.OUtil.listContainsValue(complexTypes, t); + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) { + return OSF.OUtil.listContainsKey(dynamicTypes, p); + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) { + var pn = []; + if (OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if (OSF.DDA.DataNodeEventProperties) { + pn = pn.concat([ + OSF.DDA.DataNodeEventProperties.OldNode, + OSF.DDA.DataNodeEventProperties.NewNode, + OSF.DDA.DataNodeEventProperties.NextSiblingNode + ]); + } + return OSF.OUtil.listContainsValue(pn, p); + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].toHost(arg); + } + else { + value = arg; + } + return value; + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.DDA.getDecoratedParameterMap = function (specialProcessor, initialDefs) { + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + } + parameterMap.define = function define(definition) { + var args = {}; + var toHost = createObject(definition.toHost); + if (definition.invertible) { + args.map = toHost; + } + else if (definition.canonical) { + args.toHost = args.fromHost = toHost; + } + else { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost); + } + parameterMap.addMapping(definition.type, args); + if (definition.isComplexType) + parameterMap.addComplexType(definition.type); + }; + for (var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap; +}; +OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + "GoToByIdAsync": did.dispidNavigateToMethod, + "GetSelectedDataAsync": did.dispidGetSelectedDataMethod, + "SetSelectedDataAsync": did.dispidSetSelectedDataMethod, + "GetDocumentCopyChunkAsync": did.dispidGetDocumentCopyChunkMethod, + "ReleaseDocumentCopyAsync": did.dispidReleaseDocumentCopyMethod, + "GetDocumentCopyAsync": did.dispidGetDocumentCopyMethod, + "AddFromSelectionAsync": did.dispidAddBindingFromSelectionMethod, + "AddFromPromptAsync": did.dispidAddBindingFromPromptMethod, + "AddFromNamedItemAsync": did.dispidAddBindingFromNamedItemMethod, + "GetAllAsync": did.dispidGetAllBindingsMethod, + "GetByIdAsync": did.dispidGetBindingMethod, + "ReleaseByIdAsync": did.dispidReleaseBindingMethod, + "GetDataAsync": did.dispidGetBindingDataMethod, + "SetDataAsync": did.dispidSetBindingDataMethod, + "AddRowsAsync": did.dispidAddRowsMethod, + "AddColumnsAsync": did.dispidAddColumnsMethod, + "DeleteAllDataValuesAsync": did.dispidClearAllRowsMethod, + "RefreshAsync": did.dispidLoadSettingsMethod, + "SaveAsync": did.dispidSaveSettingsMethod, + "GetActiveViewAsync": did.dispidGetActiveViewMethod, + "GetFilePropertiesAsync": did.dispidGetFilePropertiesMethod, + "GetOfficeThemeAsync": did.dispidGetOfficeThemeMethod, + "GetDocumentThemeAsync": did.dispidGetDocumentThemeMethod, + "ClearFormatsAsync": did.dispidClearFormatsMethod, + "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, + "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, + "GetAuthContextAsync": did.dispidGetAuthContextMethod, + "GetNestedAppAuthContextAsync": did.dispidGetNestedAppAuthContextMethod, + "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, + "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, + "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, + "InsertFormAsync": did.dispidInsertFormMethod, + "ExecuteFeature": did.dispidExecuteFeature, + "QueryFeature": did.dispidQueryFeature, + "AddDataPartAsync": did.dispidAddDataPartMethod, + "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, + "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, + "GetPartXmlAsync": did.dispidGetDataPartXmlMethod, + "GetPartNodesAsync": did.dispidGetDataPartNodesMethod, + "DeleteDataPartAsync": did.dispidDeleteDataPartMethod, + "GetNodeValueAsync": did.dispidGetDataNodeValueMethod, + "GetNodeXmlAsync": did.dispidGetDataNodeXmlMethod, + "GetRelativeNodesAsync": did.dispidGetDataNodesMethod, + "SetNodeValueAsync": did.dispidSetDataNodeValueMethod, + "SetNodeXmlAsync": did.dispidSetDataNodeXmlMethod, + "AddDataPartNamespaceAsync": did.dispidAddDataNamespaceMethod, + "GetDataPartNamespaceAsync": did.dispidGetDataUriByPrefixMethod, + "GetDataPartPrefixAsync": did.dispidGetDataPrefixByUriMethod, + "GetNodeTextAsync": did.dispidGetDataNodeTextMethod, + "SetNodeTextAsync": did.dispidSetDataNodeTextMethod, + "GetSelectedTask": did.dispidGetSelectedTaskMethod, + "GetTask": did.dispidGetTaskMethod, + "GetWSSUrl": did.dispidGetWSSUrlMethod, + "GetTaskField": did.dispidGetTaskFieldMethod, + "GetSelectedResource": did.dispidGetSelectedResourceMethod, + "GetResourceField": did.dispidGetResourceFieldMethod, + "GetProjectField": did.dispidGetProjectFieldMethod, + "GetSelectedView": did.dispidGetSelectedViewMethod, + "GetTaskByIndex": did.dispidGetTaskByIndexMethod, + "GetResourceByIndex": did.dispidGetResourceByIndexMethod, + "SetTaskField": did.dispidSetTaskFieldMethod, + "SetResourceField": did.dispidSetResourceFieldMethod, + "GetMaxTaskIndex": did.dispidGetMaxTaskIndexMethod, + "GetMaxResourceIndex": did.dispidGetMaxResourceIndexMethod, + "CreateTask": did.dispidCreateTaskMethod + }; + for (var method in methodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = methodMap[method]; + } + } + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var syncMethodMap = { + "MessageParent": did.dispidMessageParentMethod, + "SendMessage": did.dispidSendMessageMethod + }; + for (var method in syncMethodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = syncMethodMap[method]; + } + } + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + "SettingsChanged": did.dispidSettingsChangedEvent, + "DocumentSelectionChanged": did.dispidDocumentSelectionChangedEvent, + "BindingSelectionChanged": did.dispidBindingSelectionChangedEvent, + "BindingDataChanged": did.dispidBindingDataChangedEvent, + "ActiveViewChanged": did.dispidActiveViewChangedEvent, + "OfficeThemeChanged": did.dispidOfficeThemeChangedEvent, + "DocumentThemeChanged": did.dispidDocumentThemeChangedEvent, + "AppCommandInvoked": did.dispidAppCommandInvokedEvent, + "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, + "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, + "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, + "RecurrenceChanged": did.dispidOlkRecurrenceChangedEvent, + "AttachmentsChanged": did.dispidOlkAttachmentsChangedEvent, + "EnhancedLocationsChanged": did.dispidOlkEnhancedLocationsChangedEvent, + "InfobarClicked": did.dispidOlkInfobarClickedEvent, + "SelectedItemsChanged": did.dispidOlkSelectedItemsChangedEvent, + "SensitivityLabelChanged": did.dispidOlkSensitivityLabelChangedEvent, + "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, + "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, + "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, + "DataNodeInserted": did.dispidDataNodeAddedEvent, + "DataNodeReplaced": did.dispidDataNodeReplacedEvent, + "DataNodeDeleted": did.dispidDataNodeDeletedEvent + }; + for (var event in eventMap) { + if (jsom[event]) { + dispIdMap[jsom[event]] = eventMap[event]; + } + } + function IsObjectEvent(dispId) { + return (dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { + if (typeof ex == "number") { + if (!callArgs) { + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + } + OSF.DDA.issueAsyncResult(callArgs, ex, OSF.DDA.ErrorCodeManager.getErrorArgs(ex)); + } + else { + throw ex; + } + } + ; + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) { + var callArgs; + try { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) { + window.Excel._RedirectV1APIs = true; + } + if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if (richApiInExcelMethodSubstitution.preprocess) { + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + } + var ctx = new window.Excel.RequestContext(); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); + ctx.sync() + .then(function () { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if (richApiInExcelMethodSubstitution.postprocess) { + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); + } + if (status != 0) { + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, response); + })["catch"](function (error) { + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure, null); + }); + } + else { + var hostCallArgs; + if (parameterMap.toHost) { + hostCallArgs = parameterMap.toHost(dispId, callArgs); + } + else { + hostCallArgs = callArgs; + } + var startTime = (new Date()).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + "dispId": dispId, + "hostCallArgs": hostCallArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": function (status, hostResponseArgs) { + var responseArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (parameterMap.fromHost) { + responseArgs = parameterMap.fromHost(dispId, hostResponseArgs); + } + else { + responseArgs = hostResponseArgs; + } + } + else { + responseArgs = hostResponseArgs; + } + var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); + OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry && !(OSF.ConstantNames && OSF.ConstantNames.IsCustomFunctionsRuntime)) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } + } + }); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); + if (!added) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; + } + } + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if (isPopupWindow) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return; + } + var dispId_1 = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId_1); + var targetId_1 = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId_1) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId_1, + "targetId": targetId_1, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = null; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web" && dispId_1 == OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent) { + args = hostArgs; + } + else { + args = parameterMap.fromHost(dispId_1, hostArgs); + } + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId_1, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId_1, args)); + } + }); + } + else { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var status, removeSuccess; + if (handler === null) { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + else { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration + }); + } + else { + onEnsureRegistration(status); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller, isModal) { + var callArgs; + var targetId; + var asyncMethodCall = null; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) { + var payload; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + else { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status, onSucceedArgs, caller, callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + } + OSF.DDA.issueAsyncResult(callArgs, status, payload); + } + try { + if (dialogMessageEvent == undefined || dialogOtherEvent == undefined) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + } + if (!isModal) { + if (OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + } + else { + if (OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.id]; + } + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + callArgs["isModal"] = isModal; + targetId = JSON.stringify(callArgs); + if (!OSF.DialogShownStatus.hasDialogShown) { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + } + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = parameterMap.fromHost(dispId, hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent, caller, args); + if (event.type == dialogOtherEvent) { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]); + } + eventDispatch.fireOrQueueEvent(event); + if (args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false; + } + } + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) { + var callArgs; + var dialogMessageEvent, dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false; + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": closeCallback + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + if (closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed, OSF.DDA.AsyncMethodNames.CloseAsync.displayName, closeStatus); + } + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; +}; +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { + for (var entry in asyncMethodNames) { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if (!target[name]) { + OSF.OUtil.defineEnumerableProperty(target, name, { + value: (function (asyncMethod) { + return function () { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod, arguments, target, privateState); + }; + })(method) + }); + } + } +}; +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if (!target[add]) { + OSF.OUtil.defineEnumerableProperty(target, add, { + value: function () { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments, eventDispatch, target, isPopupWindow); + } + }); + } + if (!target[remove]) { + OSF.OUtil.defineEnumerableProperty(target, remove, { + value: function () { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments, eventDispatch, target); + } + }); + } +}; +OSF.ShowWindowDialogParameterKeys = { + Url: "url", + Width: "width", + Height: "height", + DisplayInIframe: "displayInIframe", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + PromptBeforeOpen: "promptBeforeOpen", + EnforceAppDomain: "enforceAppDomain", + UrlNoHostInfo: "urlNoHostInfo" +}; +OSF.HostThemeButtonStyleKeys = { + ButtonBorderColor: "buttonBorderColor", + ButtonBackgroundColor: "buttonBackgroundColor" +}; +OSF.OmexPageParameterKeys = { + AppName: "client", + AppVersion: "cv", + AppUILocale: "ui", + AppDomain: "appDomain", + StoreLocator: "rs", + AssetId: "assetid", + NotificationType: "notificationType", + AppCorrelationId: "corr", + AuthType: "authType", + AppId: "appid", + Scopes: "scopes" +}; +OSF.AuthType = { + Anonymous: 0, + MSA: 1, + OrgId: 2, + ADAL: 3 +}; +OSF.OmexMessageKeys = { + MessageType: "messageType", + MessageValue: "messageValue" +}; +OSF.OmexRemoveAddinMessageKeys = { + RemoveAddinResultCode: "resultCode", + RemoveAddinResultValue: "resultValue" +}; +OSF.OmexRemoveAddinResultCode = { + Success: 0, + ClientError: 400, + ServerError: 500, + UnknownError: 600 +}; +(function (OfficeExt) { + var WACUtils; + (function (WACUtils) { + var _trustedDomain = "^https:\/\/[a-z0-9-]+\.(officeapps\.live|officeapps-df\.live|partner\.officewebapps)\.com\/"; + function parseAppContextFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.AppContext); + } + WACUtils.parseAppContextFromWindowName = parseAppContextFromWindowName; + function serializeObjectToString(obj) { + if (typeof (JSON) !== "undefined") { + try { + return JSON.stringify(obj); + } + catch (ex) { + } + } + return ""; + } + WACUtils.serializeObjectToString = serializeObjectToString; + function isHostTrusted() { + return (new RegExp(_trustedDomain)).test(OSF.getClientEndPoint()._targetUrl.toLowerCase()); + } + WACUtils.isHostTrusted = isHostTrusted; + function addHostInfoAsQueryParam(url, hostInfoValue) { + if (!url) { + return null; + } + url = url.trim() || ''; + var questionMark = "?"; + var hostInfo = "_host_Info="; + var ampHostInfo = "&_host_Info="; + var fragmentSeparator = "#"; + var urlParts = url.split(fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(fragmentSeparator); + var querySplits = urlWithoutFragment.split(questionMark); + var urlWithoutFragmentWithHostInfo; + if (querySplits.length > 1) { + urlWithoutFragmentWithHostInfo = urlWithoutFragment + ampHostInfo + hostInfoValue; + } + else if (querySplits.length > 0) { + urlWithoutFragmentWithHostInfo = urlWithoutFragment + questionMark + hostInfo + hostInfoValue; + } + if (fragment) { + return [urlWithoutFragmentWithHostInfo, fragmentSeparator, fragment].join(''); + } + else { + return urlWithoutFragmentWithHostInfo; + } + } + WACUtils.addHostInfoAsQueryParam = addHostInfoAsQueryParam; + function getDomainForUrl(url) { + if (!url) { + return null; + } + var url_parser = document.createElement('a'); + url_parser.href = url; + return url_parser.protocol + "//" + url_parser.host; + } + WACUtils.getDomainForUrl = getDomainForUrl; + function shouldUseLocalStorageToPassMessage() { + try { + var osList = [ + "Windows NT 6.1", + "Windows NT 6.2", + "Windows NT 6.3", + "Windows NT 10.0" + ]; + var userAgent = window.navigator.userAgent; + for (var i = 0, len = osList.length; i < len; i++) { + if (userAgent.indexOf(osList[i]) > -1) { + return isInternetExplorer(); + } + } + return false; + } + catch (e) { + logExceptionToBrowserConsole("Error happens in shouldUseLocalStorageToPassMessage.", e); + return false; + } + } + WACUtils.shouldUseLocalStorageToPassMessage = shouldUseLocalStorageToPassMessage; + function isInternetExplorer() { + try { + var userAgent = window.navigator.userAgent; + return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1 || userAgent.indexOf("Edge/") > -1; + } + catch (e) { + logExceptionToBrowserConsole("Error happens in isInternetExplorer.", e); + return false; + } + } + WACUtils.isInternetExplorer = isInternetExplorer; + function removeMatchesFromLocalStorage(regexPatterns) { + var _localStorage = OSF.OUtil.getLocalStorage(); + var keys = _localStorage.getKeysWithPrefix(""); + for (var i = 0, len = keys.length; i < len; i++) { + var key = keys[i]; + for (var j = 0, lenRegex = regexPatterns.length; j < lenRegex; j++) { + if (regexPatterns[j].test(key)) { + _localStorage.removeItem(key); + break; + } + } + } + } + WACUtils.removeMatchesFromLocalStorage = removeMatchesFromLocalStorage; + function logExceptionToBrowserConsole(message, exception) { + OsfMsAjaxFactory.msAjaxDebug.trace(message + " Exception details: " + serializeObjectToString(exception)); + } + WACUtils.logExceptionToBrowserConsole = logExceptionToBrowserConsole; + function isTeamsWebView() { + var ua = navigator.userAgent; + return /Teams\/((?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)\.\d+)).* Electron\/((?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)\.\d+))/.test(ua); + } + WACUtils.isTeamsWebView = isTeamsWebView; + function getHostSecure(url) { + if (typeof url === "undefined" || !url) { + return undefined; + } + var host = undefined; + var httpsProtocol = "https:"; + try { + var urlObj = new URL(url); + if (urlObj) { + host = urlObj.host; + } + if (!urlObj.protocol) { + throw "fallback"; + } + else if (urlObj.protocol !== httpsProtocol) { + return undefined; + } + } + catch (ex) { + try { + var parser = document.createElement("a"); + parser.href = url; + if (parser.protocol !== httpsProtocol) { + return undefined; + } + var match = url.match(new RegExp("^https://[^/?#]+", "i")); + var naiveMatch = (match && match.length == 1) ? match[0].toLowerCase() : ""; + var parsedUrlWithoutPort = (parser.protocol + "//" + parser.hostname).toLowerCase(); + var parsedUrlWithPort = (parser.protocol + "//" + parser.host).toLowerCase(); + if (parsedUrlWithPort === naiveMatch || parsedUrlWithoutPort == naiveMatch) { + host = parser.port == "443" ? parser.hostname : parser.host; + } + } + catch (ex) { + return undefined; + } + } + return host ? host.toLowerCase() : undefined; + } + WACUtils.getHostSecure = getHostSecure; + var CacheConstants = (function () { + function CacheConstants() { + } + CacheConstants.GatedCacheKeyPrefix = "__OSF_GATED_OMEX."; + CacheConstants.AnonymousCacheKeyPrefix = "__OSF_ANONYMOUS_OMEX."; + CacheConstants.UngatedCacheKeyPrefix = "__OSF_OMEX."; + CacheConstants.ActivatedCacheKeyPrefix = "__OSF_RUNTIME_.Activated."; + CacheConstants.AppinstallAuthenticated = "appinstall_authenticated."; + CacheConstants.Entitlement = "entitle."; + CacheConstants.AppState = "appState."; + CacheConstants.AppDetails = "appDetails."; + CacheConstants.AppInstallInfo = "appInstallInfo."; + CacheConstants.AuthenticatedAppInstallInfoCacheKey = CacheConstants.GatedCacheKeyPrefix + CacheConstants.AppinstallAuthenticated + "{0}.{1}.{2}.{3}"; + CacheConstants.EntitlementsKey = CacheConstants.Entitlement + "{0}.{1}"; + CacheConstants.AppStateCacheKey = "{0}" + CacheConstants.AppState + "{1}.{2}"; + CacheConstants.AppDetailKey = "{0}" + CacheConstants.AppDetails + "{1}"; + CacheConstants.AppInstallInfoKey = "{0}" + CacheConstants.AppInstallInfo + "{1}.{2}"; + CacheConstants.ActivatedCacheKey = CacheConstants.ActivatedCacheKeyPrefix + "{0}.{1}.{2}"; + return CacheConstants; + }()); + WACUtils.CacheConstants = CacheConstants; + })(WACUtils = OfficeExt.WACUtils || (OfficeExt.WACUtils = {})); +})(OfficeExt || (OfficeExt = {})); +(function (OfficeExt) { + var loadMsAjax = false; + var MsAjaxTypeHelper = (function () { + function MsAjaxTypeHelper() { + } + MsAjaxTypeHelper.isInstanceOfType = function (type, instance) { + if (typeof (instance) === "undefined" || instance === null) + return false; + if (instance instanceof type) + return true; + var instanceType = instance.constructor; + if (!instanceType || (typeof (instanceType) !== "function") || !instanceType.__typeName || instanceType.__typeName === 'Object') { + instanceType = Object; + } + return !!(instanceType === type) || + (instanceType.__typeName && type.__typeName && instanceType.__typeName === type.__typeName); + }; + return MsAjaxTypeHelper; + }()); + OfficeExt.MsAjaxTypeHelper = MsAjaxTypeHelper; + var MsAjaxError = (function () { + function MsAjaxError() { + } + MsAjaxError.create = function (message, errorInfo) { + var err = new Error(message); + err.message = message; + if (errorInfo) { + for (var v in errorInfo) { + err[v] = errorInfo[v]; + } + } + err.popStackFrame(); + return err; + }; + MsAjaxError.parameterCount = function (message) { + var displayMessage = "Sys.ParameterCountException: " + (message ? message : "Parameter count mismatch."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.ParameterCountException' }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argument = function (paramName, message) { + var displayMessage = "Sys.ArgumentException: " + (message ? message : "Value does not fall within the expected range."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentNull = function (paramName, message) { + var displayMessage = "Sys.ArgumentNullException: " + (message ? message : "Value cannot be null."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentOutOfRange = function (paramName, actualValue, message) { + var displayMessage = "Sys.ArgumentOutOfRangeException: " + (message ? message : "Specified argument was out of the range of valid values."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + if (typeof (actualValue) !== "undefined" && actualValue !== null) { + displayMessage += "\n" + MsAjaxString.format("Actual value was {0}.", actualValue); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentType = function (paramName, actualType, expectedType, message) { + var displayMessage = "Sys.ArgumentTypeException: "; + if (message) { + displayMessage += message; + } + else if (actualType && expectedType) { + displayMessage += MsAjaxString.format("Object of type '{0}' cannot be converted to type '{1}'.", actualType.getName ? actualType.getName() : actualType, expectedType.getName ? expectedType.getName() : expectedType); + } + else { + displayMessage += "Object cannot be converted to the required type."; + } + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentUndefined = function (paramName, message) { + var displayMessage = "Sys.ArgumentUndefinedException: " + (message ? message : "Value cannot be undefined."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.invalidOperation = function (message) { + var displayMessage = "Sys.InvalidOperationException: " + (message ? message : "Operation is not valid due to the current state of the object."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.InvalidOperationException' }); + err.popStackFrame(); + return err; + }; + return MsAjaxError; + }()); + OfficeExt.MsAjaxError = MsAjaxError; + var MsAjaxString = (function () { + function MsAjaxString() { + } + MsAjaxString.format = function (format) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var source = format; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10); + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }; + MsAjaxString.startsWith = function (str, prefix) { + return (str.substr(0, prefix.length) === prefix); + }; + return MsAjaxString; + }()); + OfficeExt.MsAjaxString = MsAjaxString; + var MsAjaxDebug = (function () { + function MsAjaxDebug() { + } + MsAjaxDebug.trace = function (text) { + if (typeof Debug !== "undefined" && Debug.writeln) + Debug.writeln(text); + if (window.console && window.console.log) + window.console.log(text); + if (window.opera && window.opera.postError) + window.opera.postError(text); + if (window.debugService && window.debugService.trace) + window.debugService.trace(text); + var a = document.getElementById("TraceConsole"); + if (a && a.tagName.toUpperCase() === "TEXTAREA") { + a.appendChild(document.createTextNode(text + "\n")); + } + }; + return MsAjaxDebug; + }()); + OfficeExt.MsAjaxDebug = MsAjaxDebug; + if (!loadMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) { + var registerTypeInternal = function registerTypeInternal(type, name, isClass) { + if (type.__typeName === undefined || type.__typeName === null) { + type.__typeName = name; + } + if (type.__class === undefined || type.__class === null) { + type.__class = isClass; + } + }; + registerTypeInternal(Function, "Function", true); + registerTypeInternal(Error, "Error", true); + registerTypeInternal(Object, "Object", true); + registerTypeInternal(String, "String", true); + registerTypeInternal(Boolean, "Boolean", true); + registerTypeInternal(Date, "Date", true); + registerTypeInternal(Number, "Number", true); + registerTypeInternal(RegExp, "RegExp", true); + registerTypeInternal(Array, "Array", true); + if (!Function.createCallback) { + Function.createCallback = function Function$createCallback(method, context) { + var e = Function._validateParams(arguments, [ + { name: "method", type: Function }, + { name: "context", mayBeNull: true } + ]); + if (e) + throw e; + return function () { + var l = arguments.length; + if (l > 0) { + var args = []; + for (var i = 0; i < l; i++) { + args[i] = arguments[i]; + } + args[l] = context; + return method.apply(this, args); + } + return method.call(this, context); + }; + }; + } + if (!Function.createDelegate) { + Function.createDelegate = function Function$createDelegate(instance, method) { + var e = Function._validateParams(arguments, [ + { name: "instance", mayBeNull: true }, + { name: "method", type: Function } + ]); + if (e) + throw e; + return function () { + return method.apply(instance, arguments); + }; + }; + } + if (!Function._validateParams) { + Function._validateParams = function (params, expectedParams, validateParameterCount) { + var e, expectedLength = expectedParams.length; + validateParameterCount = validateParameterCount || (typeof (validateParameterCount) === "undefined"); + e = Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i = 0, l = params.length; i < l; i++) { + var expectedParam = expectedParams[Math.min(i, expectedLength - 1)], paramName = expectedParam.name; + if (expectedParam.parameterArray) { + paramName += "[" + (i - expectedLength + 1) + "]"; + } + else if (!validateParameterCount && (i >= expectedLength)) { + break; + } + e = Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; + }; + } + if (!Function._validateParameterCount) { + Function._validateParameterCount = function (params, expectedParams, validateParameterCount) { + var i, error, expectedLen = expectedParams.length, actualLen = params.length; + if (actualLen < expectedLen) { + var minParams = expectedLen; + for (i = 0; i < expectedLen; i++) { + var param = expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error = true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error = true; + for (i = 0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error = false; + break; + } + } + } + if (error) { + var e = MsAjaxError.parameterCount(); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!Function._validateParameter) { + Function._validateParameter = function (param, expectedParam, paramName) { + var e, expectedType = expectedParam.type, expectedInteger = !!expectedParam.integer, expectedDomElement = !!expectedParam.domElement, mayBeNull = !!expectedParam.mayBeNull; + e = Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType = expectedParam.elementType, elementMayBeNull = !!expectedParam.elementMayBeNull; + if (expectedType === Array && typeof (param) !== "undefined" && param !== null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger = !!expectedParam.elementInteger, expectedElementDomElement = !!expectedParam.elementDomElement; + for (var i = 0; i < param.length; i++) { + var elem = param[i]; + e = Function._validateParameterType(elem, expectedElementType, expectedElementInteger, expectedElementDomElement, elementMayBeNull, paramName + "[" + i + "]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; + }; + } + if (!Function._validateParameterType) { + Function._validateParameterType = function (param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof (param) === "undefined") { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param === null) { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && !OfficeExt.MsAjaxTypeHelper.isInstanceOfType(expectedType, param)) { + e = OfficeExt.MsAjaxError.argumentType(paramName, typeof (param), expectedType); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!window.Type) { + window.Type = Function; + } + if (!Type.registerNamespace) { + Type.registerNamespace = function (ns) { + var namespaceParts = ns.split('.'); + var currentNamespace = window; + for (var i = 0; i < namespaceParts.length; i++) { + currentNamespace[namespaceParts[i]] = currentNamespace[namespaceParts[i]] || {}; + currentNamespace = currentNamespace[namespaceParts[i]]; + } + }; + } + if (!Type.prototype.registerClass) { + Type.prototype.registerClass = function (cls) { cls = {}; }; + } + if (typeof (Sys) === "undefined") { + Type.registerNamespace('Sys'); + } + if (!Error.prototype.popStackFrame) { + Error.prototype.popStackFrame = function () { + if (arguments.length !== 0) + throw MsAjaxError.parameterCount(); + if (typeof (this.stack) === "undefined" || this.stack === null || + typeof (this.fileName) === "undefined" || this.fileName === null || + typeof (this.lineNumber) === "undefined" || this.lineNumber === null) { + return; + } + var stackFrames = this.stack.split("\n"); + var currentFrame = stackFrames[0]; + var pattern = this.fileName + ":" + this.lineNumber; + while (typeof (currentFrame) !== "undefined" && + currentFrame !== null && + currentFrame.indexOf(pattern) === -1) { + stackFrames.shift(); + currentFrame = stackFrames[0]; + } + var nextFrame = stackFrames[1]; + if (typeof (nextFrame) === "undefined" || nextFrame === null) { + return; + } + var nextFrameParts = nextFrame.match(/@(.*):(\d+)$/); + if (typeof (nextFrameParts) === "undefined" || nextFrameParts === null) { + return; + } + this.fileName = nextFrameParts[1]; + this.lineNumber = parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack = stackFrames.join("\n"); + }; + } + OsfMsAjaxFactory.msAjaxError = MsAjaxError; + OsfMsAjaxFactory.msAjaxString = MsAjaxString; + OsfMsAjaxFactory.msAjaxDebug = MsAjaxDebug; + } +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Common", Microsoft.Office); +Microsoft.Office.Common.InvokeType = { + "async": 0, + "sync": 1, + "asyncRegisterEvent": 2, + "asyncUnregisterEvent": 3, + "syncRegisterEvent": 4, + "syncUnregisterEvent": 5 +}; +OSF.SerializerVersion = { + MsAjax: 0, + Browser: 1 +}; +(function (OfficeExt) { + function appSpecificCheckOriginFunction(allowed_domains, eventObj, origin, checkOriginFunction) { + return false; + } + ; + OfficeExt.appSpecificCheckOrigin = appSpecificCheckOriginFunction; +})(OfficeExt || (OfficeExt = {})); +Microsoft.Office.Common.InvokeType = { "async": 0, + "sync": 1, + "asyncRegisterEvent": 2, + "asyncUnregisterEvent": 3, + "syncRegisterEvent": 4, + "syncUnregisterEvent": 5 +}; +Microsoft.Office.Common.InvokeResultCode = { + "noError": 0, + "errorInRequest": -1, + "errorHandlingRequest": -2, + "errorInResponse": -3, + "errorHandlingResponse": -4, + "errorHandlingRequestAccessDenied": -5, + "errorHandlingMethodCallTimedout": -6 +}; +Microsoft.Office.Common.MessageType = { "request": 0, + "response": 1 +}; +Microsoft.Office.Common.ActionType = { "invoke": 0, + "registerEvent": 1, + "unregisterEvent": 2 }; +Microsoft.Office.Common.ResponseType = { "forCalling": 0, + "forEventing": 1 +}; +Microsoft.Office.Common.HostTrustStatus = { + "unknown": 0, + "untrusted": 1, + "nothttps": 2, + "trusted": 3 +}; +Microsoft.Office.Common.MethodObject = function Microsoft_Office_Common_MethodObject(method, invokeType, blockingOthers) { + this._method = method; + this._invokeType = invokeType; + this._blockingOthers = blockingOthers; +}; +Microsoft.Office.Common.MethodObject.prototype = { + getMethod: function Microsoft_Office_Common_MethodObject$getMethod() { + return this._method; + }, + getInvokeType: function Microsoft_Office_Common_MethodObject$getInvokeType() { + return this._invokeType; + }, + getBlockingFlag: function Microsoft_Office_Common_MethodObject$getBlockingFlag() { + return this._blockingOthers; + } +}; +Microsoft.Office.Common.EventMethodObject = function Microsoft_Office_Common_EventMethodObject(registerMethodObject, unregisterMethodObject) { + this._registerMethodObject = registerMethodObject; + this._unregisterMethodObject = unregisterMethodObject; +}; +Microsoft.Office.Common.EventMethodObject.prototype = { + getRegisterMethodObject: function Microsoft_Office_Common_EventMethodObject$getRegisterMethodObject() { + return this._registerMethodObject; + }, + getUnregisterMethodObject: function Microsoft_Office_Common_EventMethodObject$getUnregisterMethodObject() { + return this._unregisterMethodObject; + } +}; +Microsoft.Office.Common.ServiceEndPoint = function Microsoft_Office_Common_ServiceEndPoint(serviceEndPointId) { + var e = Function._validateParams(arguments, [ + { name: "serviceEndPointId", type: String, mayBeNull: false } + ]); + if (e) + throw e; + this._methodObjectList = {}; + this._eventHandlerProxyList = {}; + this._Id = serviceEndPointId; + this._conversations = {}; + this._policyManager = null; + this._appDomains = {}; + this._onHandleRequestError = null; +}; +Microsoft.Office.Common.ServiceEndPoint.prototype = { + registerMethod: function Microsoft_Office_Common_ServiceEndPoint$registerMethod(methodName, method, invokeType, blockingOthers) { + var e = Function._validateParams(arguments, [{ name: "methodName", type: String, mayBeNull: false }, + { name: "method", type: Function, mayBeNull: false }, + { name: "invokeType", type: Number, mayBeNull: false }, + { name: "blockingOthers", type: Boolean, mayBeNull: false } + ]); + if (e) + throw e; + if (invokeType !== Microsoft.Office.Common.InvokeType.async + && invokeType !== Microsoft.Office.Common.InvokeType.sync) { + throw OsfMsAjaxFactory.msAjaxError.argument("invokeType"); + } + var methodObject = new Microsoft.Office.Common.MethodObject(method, invokeType, blockingOthers); + this._methodObjectList[methodName] = methodObject; + }, + unregisterMethod: function Microsoft_Office_Common_ServiceEndPoint$unregisterMethod(methodName) { + var e = Function._validateParams(arguments, [ + { name: "methodName", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete this._methodObjectList[methodName]; + }, + registerEvent: function Microsoft_Office_Common_ServiceEndPoint$registerEvent(eventName, registerMethod, unregisterMethod) { + var e = Function._validateParams(arguments, [{ name: "eventName", type: String, mayBeNull: false }, + { name: "registerMethod", type: Function, mayBeNull: false }, + { name: "unregisterMethod", type: Function, mayBeNull: false } + ]); + if (e) + throw e; + var methodObject = new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(registerMethod, Microsoft.Office.Common.InvokeType.syncRegisterEvent, false), new Microsoft.Office.Common.MethodObject(unregisterMethod, Microsoft.Office.Common.InvokeType.syncUnregisterEvent, false)); + this._methodObjectList[eventName] = methodObject; + }, + registerEventEx: function Microsoft_Office_Common_ServiceEndPoint$registerEventEx(eventName, registerMethod, registerMethodInvokeType, unregisterMethod, unregisterMethodInvokeType) { + var e = Function._validateParams(arguments, [{ name: "eventName", type: String, mayBeNull: false }, + { name: "registerMethod", type: Function, mayBeNull: false }, + { name: "registerMethodInvokeType", type: Number, mayBeNull: false }, + { name: "unregisterMethod", type: Function, mayBeNull: false }, + { name: "unregisterMethodInvokeType", type: Number, mayBeNull: false } + ]); + if (e) + throw e; + var methodObject = new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(registerMethod, registerMethodInvokeType, false), new Microsoft.Office.Common.MethodObject(unregisterMethod, unregisterMethodInvokeType, false)); + this._methodObjectList[eventName] = methodObject; + }, + unregisterEvent: function (eventName) { + var e = Function._validateParams(arguments, [ + { name: "eventName", type: String, mayBeNull: false } + ]); + if (e) + throw e; + this.unregisterMethod(eventName); + }, + registerConversation: function Microsoft_Office_Common_ServiceEndPoint$registerConversation(conversationId, conversationUrl, appDomains, serializerVersion) { + var e = Function._validateParams(arguments, [ + { name: "conversationId", type: String, mayBeNull: false }, + { name: "conversationUrl", type: String, mayBeNull: false, optional: true }, + { name: "appDomains", type: Object, mayBeNull: true, optional: true }, + { name: "serializerVersion", type: Number, mayBeNull: true, optional: true } + ]); + if (e) + throw e; + if (appDomains) { + if (!(appDomains instanceof Array)) { + throw OsfMsAjaxFactory.msAjaxError.argument("appDomains"); + } + this._appDomains[conversationId] = appDomains; + } + this._conversations[conversationId] = { url: conversationUrl, serializerVersion: serializerVersion }; + }, + unregisterConversation: function Microsoft_Office_Common_ServiceEndPoint$unregisterConversation(conversationId) { + var e = Function._validateParams(arguments, [ + { name: "conversationId", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete this._conversations[conversationId]; + }, + setPolicyManager: function Microsoft_Office_Common_ServiceEndPoint$setPolicyManager(policyManager) { + var e = Function._validateParams(arguments, [ + { name: "policyManager", type: Object, mayBeNull: false } + ]); + if (e) + throw e; + if (!policyManager.checkPermission) { + throw OsfMsAjaxFactory.msAjaxError.argument("policyManager"); + } + this._policyManager = policyManager; + }, + getPolicyManager: function Microsoft_Office_Common_ServiceEndPoint$getPolicyManager() { + return this._policyManager; + }, + dispose: function Microsoft_Office_Common_ServiceEndPoint$dispose() { + this._methodObjectList = null; + this._eventHandlerProxyList = null; + this._Id = null; + this._conversations = null; + this._policyManager = null; + this._appDomains = null; + this._onHandleRequestError = null; + } +}; +Microsoft.Office.Common.ClientEndPoint = function Microsoft_Office_Common_ClientEndPoint(conversationId, targetWindow, targetUrl, serializerVersion) { + var e = Function._validateParams(arguments, [ + { name: "conversationId", type: String, mayBeNull: false }, + { name: "targetWindow", mayBeNull: false }, + { name: "targetUrl", type: String, mayBeNull: false }, + { name: "serializerVersion", type: Number, mayBeNull: true, optional: true } + ]); + if (e) + throw e; + try { + if (!targetWindow.postMessage) { + throw OsfMsAjaxFactory.msAjaxError.argument("targetWindow"); + } + } + catch (ex) { + if (!Object.prototype.hasOwnProperty.call(targetWindow, "postMessage")) { + throw OsfMsAjaxFactory.msAjaxError.argument("targetWindow"); + } + } + this._conversationId = conversationId; + this._targetWindow = targetWindow; + this._targetUrl = targetUrl; + this._callingIndex = 0; + this._callbackList = {}; + this._eventHandlerList = {}; + if (serializerVersion != null) { + this._serializerVersion = serializerVersion; + } + else { + this._serializerVersion = OSF.SerializerVersion.Browser; + } + this._checkReceiverOriginAndRun = null; + this._hostTrustCheckStatus = Microsoft.Office.Common.HostTrustStatus.unknown; + this._checkStatusLogged = false; +}; +Microsoft.Office.Common.ClientEndPoint.prototype = { + invoke: function Microsoft_Office_Common_ClientEndPoint$invoke(targetMethodName, callback, param) { + var e = Function._validateParams(arguments, [{ name: "targetMethodName", type: String, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true }, + { name: "param", mayBeNull: true } + ]); + if (e) + throw e; + var me = this; + var funcToRun = function () { + var correlationId = me._callingIndex++; + var now = new Date(); + var callbackEntry = { "callback": callback, "createdOn": now.getTime() }; + if (param && typeof param === "object" && typeof param.__timeout__ === "number") { + callbackEntry.timeout = param.__timeout__; + delete param.__timeout__; + } + me._callbackList[correlationId] = callbackEntry; + try { + if (me._hostTrustCheckStatus !== Microsoft.Office.Common.HostTrustStatus.trusted) { + if (targetMethodName !== "ContextActivationManager_getAppContextAsync") { + throw "Access Denied"; + } + } + var callRequest = new Microsoft.Office.Common.Request(targetMethodName, Microsoft.Office.Common.ActionType.invoke, me._conversationId, correlationId, param); + var msg = Microsoft.Office.Common.MessagePackager.envelope(callRequest, me._serializerVersion); + me._targetWindow.postMessage(msg, me._targetUrl); + Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer(); + } + catch (ex) { + try { + if (callback !== null) + callback(Microsoft.Office.Common.InvokeResultCode.errorInRequest, ex); + } + finally { + delete me._callbackList[correlationId]; + } + } + }; + if (me._checkReceiverOriginAndRun) { + me._checkReceiverOriginAndRun(funcToRun); + } + else { + me._hostTrustCheckStatus = Microsoft.Office.Common.HostTrustStatus.trusted; + funcToRun(); + } + }, + registerForEvent: function Microsoft_Office_Common_ClientEndPoint$registerForEvent(targetEventName, eventHandler, callback, data) { + var e = Function._validateParams(arguments, [{ name: "targetEventName", type: String, mayBeNull: false }, + { name: "eventHandler", type: Function, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true }, + { name: "data", mayBeNull: true, optional: true } + ]); + if (e) + throw e; + var correlationId = this._callingIndex++; + var now = new Date(); + this._callbackList[correlationId] = { "callback": callback, "createdOn": now.getTime() }; + try { + var callRequest = new Microsoft.Office.Common.Request(targetEventName, Microsoft.Office.Common.ActionType.registerEvent, this._conversationId, correlationId, data); + var msg = Microsoft.Office.Common.MessagePackager.envelope(callRequest, this._serializerVersion); + this._targetWindow.postMessage(msg, this._targetUrl); + Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer(); + this._eventHandlerList[targetEventName] = eventHandler; + } + catch (ex) { + try { + if (callback !== null) { + callback(Microsoft.Office.Common.InvokeResultCode.errorInRequest, ex); + } + } + finally { + delete this._callbackList[correlationId]; + } + } + }, + unregisterForEvent: function Microsoft_Office_Common_ClientEndPoint$unregisterForEvent(targetEventName, callback, data) { + var e = Function._validateParams(arguments, [{ name: "targetEventName", type: String, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true }, + { name: "data", mayBeNull: true, optional: true } + ]); + if (e) + throw e; + var correlationId = this._callingIndex++; + var now = new Date(); + this._callbackList[correlationId] = { "callback": callback, "createdOn": now.getTime() }; + try { + var callRequest = new Microsoft.Office.Common.Request(targetEventName, Microsoft.Office.Common.ActionType.unregisterEvent, this._conversationId, correlationId, data); + var msg = Microsoft.Office.Common.MessagePackager.envelope(callRequest, this._serializerVersion); + this._targetWindow.postMessage(msg, this._targetUrl); + Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer(); + } + catch (ex) { + try { + if (callback !== null) { + callback(Microsoft.Office.Common.InvokeResultCode.errorInRequest, ex); + } + } + finally { + delete this._callbackList[correlationId]; + } + } + finally { + delete this._eventHandlerList[targetEventName]; + } + } +}; +Microsoft.Office.Common.XdmCommunicationManager = (function () { + var _invokerQueue = []; + var _lastMessageProcessTime = null; + var _messageProcessingTimer = null; + var _processInterval = 10; + var _blockingFlag = false; + var _methodTimeoutTimer = null; + var _methodTimeoutProcessInterval = 2000; + var _methodTimeoutDefault = 65000; + var _methodTimeout = _methodTimeoutDefault; + var _serviceEndPoints = {}; + var _clientEndPoints = {}; + var _initialized = false; + function isOfficeJsTarget() { + return true; + } + ; + function _lookupServiceEndPoint(conversationId) { + for (var id in _serviceEndPoints) { + if (_serviceEndPoints[id]._conversations[conversationId]) { + return _serviceEndPoints[id]; + } + } + OsfMsAjaxFactory.msAjaxDebug.trace("Unknown conversation Id."); + throw OsfMsAjaxFactory.msAjaxError.argument("conversationId"); + } + ; + function _lookupClientEndPoint(conversationId) { + var clientEndPoint = _clientEndPoints[conversationId]; + if (!clientEndPoint) { + OsfMsAjaxFactory.msAjaxDebug.trace("Unknown conversation Id."); + } + return clientEndPoint; + } + ; + function _lookupMethodObject(serviceEndPoint, messageObject) { + var methodOrEventMethodObject = serviceEndPoint._methodObjectList[messageObject._actionName]; + if (!methodOrEventMethodObject) { + OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:" + messageObject._actionName); + throw OsfMsAjaxFactory.msAjaxError.argument("messageObject"); + } + var methodObject = null; + if (messageObject._actionType === Microsoft.Office.Common.ActionType.invoke) { + methodObject = methodOrEventMethodObject; + } + else if (messageObject._actionType === Microsoft.Office.Common.ActionType.registerEvent) { + methodObject = methodOrEventMethodObject.getRegisterMethodObject(); + } + else { + methodObject = methodOrEventMethodObject.getUnregisterMethodObject(); + } + return methodObject; + } + ; + function _enqueInvoker(invoker) { + _invokerQueue.push(invoker); + } + ; + function _dequeInvoker() { + if (_messageProcessingTimer !== null) { + if (!_blockingFlag) { + if (_invokerQueue.length > 0) { + var invoker = _invokerQueue.shift(); + _executeCommand(invoker); + } + else { + clearInterval(_messageProcessingTimer); + _messageProcessingTimer = null; + } + } + } + else { + OsfMsAjaxFactory.msAjaxDebug.trace("channel is not ready."); + } + } + ; + function _executeCommand(invoker) { + _blockingFlag = invoker.getInvokeBlockingFlag(); + invoker.invoke(); + _lastMessageProcessTime = (new Date()).getTime(); + } + ; + function _checkMethodTimeout() { + if (_methodTimeoutTimer) { + var clientEndPoint; + var methodCallsNotTimedout = 0; + var now = new Date(); + var timeoutValue; + for (var conversationId in _clientEndPoints) { + clientEndPoint = _clientEndPoints[conversationId]; + for (var correlationId in clientEndPoint._callbackList) { + var callbackEntry = clientEndPoint._callbackList[correlationId]; + timeoutValue = callbackEntry.timeout ? callbackEntry.timeout : _methodTimeout; + if (timeoutValue >= 0 && Math.abs(now.getTime() - callbackEntry.createdOn) >= timeoutValue) { + try { + if (callbackEntry.callback) { + callbackEntry.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout, null); + } + } + finally { + delete clientEndPoint._callbackList[correlationId]; + } + } + else { + methodCallsNotTimedout++; + } + ; + } + } + if (methodCallsNotTimedout === 0) { + clearInterval(_methodTimeoutTimer); + _methodTimeoutTimer = null; + } + } + else { + OsfMsAjaxFactory.msAjaxDebug.trace("channel is not ready."); + } + } + ; + function _postCallbackHandler() { + _blockingFlag = false; + } + ; + function _registerListener(listener) { + if (window.addEventListener) { + window.addEventListener("message", listener, false); + } + else if ((navigator.userAgent.indexOf("MSIE") > -1) && window.attachEvent) { + window.attachEvent("onmessage", listener); + } + else { + OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API."); + throw OsfMsAjaxFactory.msAjaxError.argument("Browser"); + } + } + ; + function _checkOrigin(url, origin) { + var res = false; + if (!url || !origin || url === "null" || origin === "null" || !url.length || !origin.length) { + return res; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + res = _urlCompareUsingUrlStrings(url, origin); + } + else { + var url_parser, org_parser; + url_parser = document.createElement('a'); + org_parser = document.createElement('a'); + url_parser.href = url; + org_parser.href = origin; + res = _urlCompare(url_parser, org_parser); + } + return res; + } + function _checkOriginWithAppDomains(allowed_domains, origin) { + var res = false; + if (!origin || origin === "null" || !origin.length || !(allowed_domains) || !(allowed_domains instanceof Array) || !allowed_domains.length) { + return res; + } + var org_parser = document.createElement('a'); + var app_domain_parser = document.createElement('a'); + org_parser.href = origin; + for (var i = 0; i < allowed_domains.length && !res; i++) { + if (allowed_domains[i].indexOf("://") !== -1) { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + res = _urlCompareUsingUrlStrings(origin, allowed_domains[i]); + } + else { + app_domain_parser.href = allowed_domains[i]; + res = _urlCompare(org_parser, app_domain_parser); + } + } + } + return res; + } + function _isHostNameValidWacDomain(hostName) { + if (!hostName || hostName === "null") { + return false; + } + var regexHostNameStringArray = new Array("^office-int\\.com$", "^officeapps\\.live-int\\.com$", "^.*\\.dod\\.online\\.office365\\.us$", "^.*\\.gov\\.online\\.office365\\.us$", "^.*\\.officeapps\\.live\\.com$", "^.*\\.officeapps\\.live-int\\.com$", "^.*\\.officeapps-df\\.live\\.com$", "^.*\\.office\\.net$", "^" + document.domain.replace(new RegExp("\\.", "g"), "\\.") + "$"); + if (!isOfficeJsTarget() || (typeof officeInitializationSettings === "object" && officeInitializationSettings.trustAllCloudEnvironments === true)) { + regexHostNameStringArray.push("^.*\\.partner\\.officewebapps\\.cn$", "^.*\\.online\\.office\\.de$"); + } + var regexHostName = new RegExp(regexHostNameStringArray.join("|")); + return regexHostName.test(hostName); + } + function _isTargetSubdomainOfSourceLocation(sourceLocation, messageOrigin) { + if (!sourceLocation || !messageOrigin || sourceLocation === "null" || messageOrigin === "null") { + return false; + } + var sourceLocationParser; + var messageOriginParser; + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + sourceLocationParser = OSF.OUtil.parseUrl(sourceLocation, true); + messageOriginParser = OSF.OUtil.parseUrl(messageOrigin, true); + } + else { + sourceLocationParser = document.createElement('a'); + sourceLocationParser.href = sourceLocation; + messageOriginParser = document.createElement('a'); + messageOriginParser.href = messageOrigin; + } + var isSameProtocol = sourceLocationParser.protocol === messageOriginParser.protocol; + var isSamePort = sourceLocationParser.port === messageOriginParser.port; + var originHostName = messageOriginParser.hostname; + var sourceLocationHostName = sourceLocationParser.hostname; + var isSameDomain = originHostName === sourceLocationHostName; + var isSubDomain = false; + if (!isSameDomain && originHostName.length > sourceLocationHostName.length + 1) { + isSubDomain = originHostName.slice(-(sourceLocationHostName.length + 1)) === '.' + sourceLocationHostName; + } + var isSameDomainOrSubdomain = isSameDomain || isSubDomain; + return isSamePort && isSameProtocol && isSameDomainOrSubdomain; + } + function _urlCompareUsingUrlStrings(url_str1, url_str2) { + var parsedUrl1 = OSF.OUtil.parseUrl(url_str1, true); + var parsedUrl2 = OSF.OUtil.parseUrl(url_str2, true); + return _urlCompare(parsedUrl1, parsedUrl2); + } + function _urlCompare(url_parser1, url_parser2) { + return ((url_parser1.hostname == url_parser2.hostname) && + (url_parser1.protocol == url_parser2.protocol) && + _hasSamePort(url_parser1, url_parser2)); + } + function _hasSamePort(url_parser1, url_parser2) { + var httpPort = "80"; + var httpsPort = "443"; + return ((url_parser1.port == url_parser2.port) || + (url_parser1.port == "" && url_parser1.protocol == "http:" && url_parser2.port == httpPort) || + (url_parser1.port == "" && url_parser1.protocol == "https:" && url_parser2.port == httpsPort) || + (url_parser2.port == "" && url_parser2.protocol == "http:" && url_parser1.port == httpPort) || + (url_parser2.port == "" && url_parser2.protocol == "https:" && url_parser1.port == httpsPort)); + } + function _receive(e) { + if (!OSF) { + return; + } + if (e.data != '') { + var messageObject; + var serializerVersion = OSF.SerializerVersion.Browser; + var serializedMessage = e.data; + try { + messageObject = Microsoft.Office.Common.MessagePackager.unenvelope(serializedMessage, OSF.SerializerVersion.Browser); + serializerVersion = messageObject._serializerVersion != null ? messageObject._serializerVersion : serializerVersion; + } + catch (ex) { + return; + } + if (messageObject._messageType === Microsoft.Office.Common.MessageType.request) { + var requesterUrl = (e.origin == null || e.origin === "null") ? messageObject._origin : e.origin; + try { + var serviceEndPoint = _lookupServiceEndPoint(messageObject._conversationId); + var conversation = serviceEndPoint._conversations[messageObject._conversationId]; + serializerVersion = conversation.serializerVersion != null ? conversation.serializerVersion : serializerVersion; + var allowedDomains = [conversation.url].concat(serviceEndPoint._appDomains[messageObject._conversationId]); + if (!_checkOriginWithAppDomains(allowedDomains, e.origin)) { + if (!OfficeExt.appSpecificCheckOrigin(allowedDomains, e, messageObject._origin, _checkOriginWithAppDomains)) { + var isOriginSubdomain = _isTargetSubdomainOfSourceLocation(conversation.url, e.origin); + if (!isOriginSubdomain) { + throw "Failed origin check"; + } + } + } + var dataWithOrigin = (messageObject._data != null) ? messageObject._data : {}; + dataWithOrigin.SecurityOrigin = e.origin; + var policyManager = serviceEndPoint.getPolicyManager(); + if (policyManager && !policyManager.checkPermission(messageObject._conversationId, messageObject._actionName, dataWithOrigin)) { + throw "Access Denied"; + } + var methodObject = _lookupMethodObject(serviceEndPoint, messageObject); + var invokeCompleteCallback = new Microsoft.Office.Common.InvokeCompleteCallback(e.source, requesterUrl, messageObject._actionName, messageObject._conversationId, messageObject._correlationId, _postCallbackHandler, serializerVersion); + var invoker = new Microsoft.Office.Common.Invoker(methodObject, dataWithOrigin, invokeCompleteCallback, serviceEndPoint._eventHandlerProxyList, messageObject._conversationId, messageObject._actionName, serializerVersion); + var shouldEnque = true; + if (_messageProcessingTimer == null) { + if ((_lastMessageProcessTime == null || (new Date()).getTime() - _lastMessageProcessTime > _processInterval) && !_blockingFlag) { + _executeCommand(invoker); + shouldEnque = false; + } + else { + _messageProcessingTimer = setInterval(_dequeInvoker, _processInterval); + } + } + if (shouldEnque) { + _enqueInvoker(invoker); + } + } + catch (ex) { + if (serviceEndPoint && serviceEndPoint._onHandleRequestError) { + serviceEndPoint._onHandleRequestError(messageObject, ex); + } + var errorCode = Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest; + if (ex == "Access Denied") { + errorCode = Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied; + } + var callResponse = new Microsoft.Office.Common.Response(messageObject._actionName, messageObject._conversationId, messageObject._correlationId, errorCode, Microsoft.Office.Common.ResponseType.forCalling, ex); + var envelopedResult = Microsoft.Office.Common.MessagePackager.envelope(callResponse, serializerVersion); + var canPostMessage = false; + try { + canPostMessage = !!(e.source && e.source.postMessage); + } + catch (ex) { + } + var isOriginValid = false; + if (window.location.href && e.origin && e.origin !== "null" && _isTargetSubdomainOfSourceLocation(window.location.href, e.origin)) { + isOriginValid = true; + } + else { + if (e.origin && e.origin !== "null") { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + var hostname = OSF.OUtil.parseUrl(e.origin, true).hostname; + isOriginValid = _isHostNameValidWacDomain(hostname); + } + else { + var parser = document.createElement("a"); + parser.href = e.origin; + isOriginValid = _isHostNameValidWacDomain(parser.hostname); + } + } + } + if (canPostMessage && isOriginValid) { + e.source.postMessage(envelopedResult, requesterUrl); + } + } + } + else if (messageObject._messageType === Microsoft.Office.Common.MessageType.response) { + var clientEndPoint = _lookupClientEndPoint(messageObject._conversationId); + if (!clientEndPoint) { + return; + } + clientEndPoint._serializerVersion = serializerVersion; + if (!_checkOrigin(clientEndPoint._targetUrl, e.origin)) { + throw "Failed orgin check"; + } + if (messageObject._responseType === Microsoft.Office.Common.ResponseType.forCalling) { + var callbackEntry = clientEndPoint._callbackList[messageObject._correlationId]; + if (callbackEntry) { + try { + if (callbackEntry.callback) + callbackEntry.callback(messageObject._errorCode, messageObject._data); + } + finally { + delete clientEndPoint._callbackList[messageObject._correlationId]; + } + } + } + else { + var eventhandler = clientEndPoint._eventHandlerList[messageObject._actionName]; + if (eventhandler !== undefined && eventhandler !== null) { + eventhandler(messageObject._data); + } + } + } + else { + return; + } + } + } + ; + function _initialize() { + if (!_initialized) { + _registerListener(_receive); + _initialized = true; + } + } + ; + return { + connect: function Microsoft_Office_Common_XdmCommunicationManager$connect(conversationId, targetWindow, targetUrl, serializerVersion) { + var clientEndPoint = _clientEndPoints[conversationId]; + if (!clientEndPoint) { + _initialize(); + clientEndPoint = new Microsoft.Office.Common.ClientEndPoint(conversationId, targetWindow, targetUrl, serializerVersion); + _clientEndPoints[conversationId] = clientEndPoint; + } + return clientEndPoint; + }, + getClientEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$getClientEndPoint(conversationId) { + var e = Function._validateParams(arguments, [ + { name: "conversationId", type: String, mayBeNull: false } + ]); + if (e) + throw e; + return _clientEndPoints[conversationId]; + }, + createServiceEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$createServiceEndPoint(serviceEndPointId) { + _initialize(); + var serviceEndPoint = new Microsoft.Office.Common.ServiceEndPoint(serviceEndPointId); + _serviceEndPoints[serviceEndPointId] = serviceEndPoint; + return serviceEndPoint; + }, + getServiceEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$getServiceEndPoint(serviceEndPointId) { + var e = Function._validateParams(arguments, [ + { name: "serviceEndPointId", type: String, mayBeNull: false } + ]); + if (e) + throw e; + return _serviceEndPoints[serviceEndPointId]; + }, + deleteClientEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$deleteClientEndPoint(conversationId) { + var e = Function._validateParams(arguments, [ + { name: "conversationId", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete _clientEndPoints[conversationId]; + }, + deleteServiceEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$deleteServiceEndPoint(serviceEndPointId) { + var e = Function._validateParams(arguments, [ + { name: "serviceEndPointId", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete _serviceEndPoints[serviceEndPointId]; + }, + urlCompare: function Microsoft_Office_Common_XdmCommunicationManager$_urlCompare(url_parser1, url_parser2) { + return _urlCompare(url_parser1, url_parser2); + }, + checkUrlWithAppDomains: function Microsoft_Office_Common_XdmCommunicationManager$_checkUrlWithAppDomains(appDomains, origin) { + return _checkOriginWithAppDomains(appDomains, origin); + }, + isTargetSubdomainOfSourceLocation: function Microsoft_Office_Common_XdmCommunicationManager$_isTargetSubdomainOfSourceLocation(sourceLocation, messageOrigin) { + return _isTargetSubdomainOfSourceLocation(sourceLocation, messageOrigin); + }, + _setMethodTimeout: function Microsoft_Office_Common_XdmCommunicationManager$_setMethodTimeout(methodTimeout) { + var e = Function._validateParams(arguments, [ + { name: "methodTimeout", type: Number, mayBeNull: false } + ]); + if (e) + throw e; + _methodTimeout = (methodTimeout <= 0) ? _methodTimeoutDefault : methodTimeout; + }, + _startMethodTimeoutTimer: function Microsoft_Office_Common_XdmCommunicationManager$_startMethodTimeoutTimer() { + if (!_methodTimeoutTimer) { + _methodTimeoutTimer = setInterval(_checkMethodTimeout, _methodTimeoutProcessInterval); + } + }, + isHostNameValidWacDomain: function Microsoft_Office_Common_XdmCommunicationManager$_isHostNameValidWacDomain(hostName) { + return _isHostNameValidWacDomain(hostName); + }, + _hasSamePort: function Microsoft_Office_Common_XdmCommunicationManager$_hasSamePort(url_parser1, url_parser2) { + return _hasSamePort(url_parser1, url_parser2); + } + }; +})(); +Microsoft.Office.Common.Message = function Microsoft_Office_Common_Message(messageType, actionName, conversationId, correlationId, data) { + var e = Function._validateParams(arguments, [{ name: "messageType", type: Number, mayBeNull: false }, + { name: "actionName", type: String, mayBeNull: false }, + { name: "conversationId", type: String, mayBeNull: false }, + { name: "correlationId", mayBeNull: false }, + { name: "data", mayBeNull: true, optional: true } + ]); + if (e) + throw e; + this._messageType = messageType; + this._actionName = actionName; + this._conversationId = conversationId; + this._correlationId = correlationId; + this._origin = window.location.origin; + if (typeof data == "undefined") { + this._data = null; + } + else { + this._data = data; + } +}; +Microsoft.Office.Common.Message.prototype = { + getActionName: function Microsoft_Office_Common_Message$getActionName() { + return this._actionName; + }, + getConversationId: function Microsoft_Office_Common_Message$getConversationId() { + return this._conversationId; + }, + getCorrelationId: function Microsoft_Office_Common_Message$getCorrelationId() { + return this._correlationId; + }, + getOrigin: function Microsoft_Office_Common_Message$getOrigin() { + return this._origin; + }, + getData: function Microsoft_Office_Common_Message$getData() { + return this._data; + }, + getMessageType: function Microsoft_Office_Common_Message$getMessageType() { + return this._messageType; + } +}; +Microsoft.Office.Common.Request = function Microsoft_Office_Common_Request(actionName, actionType, conversationId, correlationId, data) { + Microsoft.Office.Common.Request.uber.constructor.call(this, Microsoft.Office.Common.MessageType.request, actionName, conversationId, correlationId, data); + this._actionType = actionType; +}; +OSF.OUtil.extend(Microsoft.Office.Common.Request, Microsoft.Office.Common.Message); +Microsoft.Office.Common.Request.prototype.getActionType = function Microsoft_Office_Common_Request$getActionType() { + return this._actionType; +}; +Microsoft.Office.Common.Response = function Microsoft_Office_Common_Response(actionName, conversationId, correlationId, errorCode, responseType, data) { + Microsoft.Office.Common.Response.uber.constructor.call(this, Microsoft.Office.Common.MessageType.response, actionName, conversationId, correlationId, data); + this._errorCode = errorCode; + this._responseType = responseType; +}; +OSF.OUtil.extend(Microsoft.Office.Common.Response, Microsoft.Office.Common.Message); +Microsoft.Office.Common.Response.prototype.getErrorCode = function Microsoft_Office_Common_Response$getErrorCode() { + return this._errorCode; +}; +Microsoft.Office.Common.Response.prototype.getResponseType = function Microsoft_Office_Common_Response$getResponseType() { + return this._responseType; +}; +Microsoft.Office.Common.MessagePackager = { + envelope: function Microsoft_Office_Common_MessagePackager$envelope(messageObject, serializerVersion) { + if (typeof (messageObject) === "object") { + messageObject._serializerVersion = OSF.SerializerVersion.Browser; + } + return JSON.stringify(messageObject); + }, + unenvelope: function Microsoft_Office_Common_MessagePackager$unenvelope(messageObject, serializerVersion) { + return JSON.parse(messageObject); + } +}; +Microsoft.Office.Common.ResponseSender = function Microsoft_Office_Common_ResponseSender(requesterWindow, requesterUrl, actionName, conversationId, correlationId, responseType, serializerVersion) { + var e = Function._validateParams(arguments, [{ name: "requesterWindow", mayBeNull: false }, + { name: "requesterUrl", type: String, mayBeNull: false }, + { name: "actionName", type: String, mayBeNull: false }, + { name: "conversationId", type: String, mayBeNull: false }, + { name: "correlationId", mayBeNull: false }, + { name: "responsetype", type: Number, maybeNull: false }, + { name: "serializerVersion", type: Number, maybeNull: true, optional: true } + ]); + if (e) + throw e; + this._requesterWindow = requesterWindow; + this._requesterUrl = requesterUrl; + this._actionName = actionName; + this._conversationId = conversationId; + this._correlationId = correlationId; + this._invokeResultCode = Microsoft.Office.Common.InvokeResultCode.noError; + this._responseType = responseType; + var me = this; + this._send = function (result) { + try { + var postMessageTarget = me._requesterUrl; + if (me._actionName === "dialogMessageReceived" || me._actionName === "dialogParentMessageReceived") { + if (result.targetOrigin) { + postMessageTarget = result.targetOrigin; + } + } + var response = new Microsoft.Office.Common.Response(me._actionName, me._conversationId, me._correlationId, me._invokeResultCode, me._responseType, result); + var envelopedResult = Microsoft.Office.Common.MessagePackager.envelope(response, serializerVersion); + me._requesterWindow.postMessage(envelopedResult, postMessageTarget); + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:" + ex.message); + } + }; +}; +Microsoft.Office.Common.ResponseSender.prototype = { + getRequesterWindow: function Microsoft_Office_Common_ResponseSender$getRequesterWindow() { + return this._requesterWindow; + }, + getRequesterUrl: function Microsoft_Office_Common_ResponseSender$getRequesterUrl() { + return this._requesterUrl; + }, + getActionName: function Microsoft_Office_Common_ResponseSender$getActionName() { + return this._actionName; + }, + getConversationId: function Microsoft_Office_Common_ResponseSender$getConversationId() { + return this._conversationId; + }, + getCorrelationId: function Microsoft_Office_Common_ResponseSender$getCorrelationId() { + return this._correlationId; + }, + getSend: function Microsoft_Office_Common_ResponseSender$getSend() { + return this._send; + }, + setResultCode: function Microsoft_Office_Common_ResponseSender$setResultCode(resultCode) { + this._invokeResultCode = resultCode; + } +}; +Microsoft.Office.Common.InvokeCompleteCallback = function Microsoft_Office_Common_InvokeCompleteCallback(requesterWindow, requesterUrl, actionName, conversationId, correlationId, postCallbackHandler, serializerVersion) { + Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(this, requesterWindow, requesterUrl, actionName, conversationId, correlationId, Microsoft.Office.Common.ResponseType.forCalling, serializerVersion); + this._postCallbackHandler = postCallbackHandler; + var me = this; + this._send = function (result, responseCode) { + if (responseCode != undefined) { + me._invokeResultCode = responseCode; + } + try { + var response = new Microsoft.Office.Common.Response(me._actionName, me._conversationId, me._correlationId, me._invokeResultCode, me._responseType, result); + var envelopedResult = Microsoft.Office.Common.MessagePackager.envelope(response, serializerVersion); + me._requesterWindow.postMessage(envelopedResult, me._requesterUrl); + me._postCallbackHandler(); + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:" + ex.message); + } + }; +}; +OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback, Microsoft.Office.Common.ResponseSender); +Microsoft.Office.Common.Invoker = function Microsoft_Office_Common_Invoker(methodObject, paramValue, invokeCompleteCallback, eventHandlerProxyList, conversationId, eventName, serializerVersion) { + var e = Function._validateParams(arguments, [ + { name: "methodObject", mayBeNull: false }, + { name: "paramValue", mayBeNull: true }, + { name: "invokeCompleteCallback", mayBeNull: false }, + { name: "eventHandlerProxyList", mayBeNull: true }, + { name: "conversationId", type: String, mayBeNull: false }, + { name: "eventName", type: String, mayBeNull: false }, + { name: "serializerVersion", type: Number, mayBeNull: true, optional: true } + ]); + if (e) + throw e; + this._methodObject = methodObject; + this._param = paramValue; + this._invokeCompleteCallback = invokeCompleteCallback; + this._eventHandlerProxyList = eventHandlerProxyList; + this._conversationId = conversationId; + this._eventName = eventName; + this._serializerVersion = serializerVersion; +}; +Microsoft.Office.Common.Invoker.prototype = { + invoke: function Microsoft_Office_Common_Invoker$invoke() { + try { + var result; + switch (this._methodObject.getInvokeType()) { + case Microsoft.Office.Common.InvokeType.async: + this._methodObject.getMethod()(this._param, this._invokeCompleteCallback.getSend()); + break; + case Microsoft.Office.Common.InvokeType.sync: + result = this._methodObject.getMethod()(this._param); + this._invokeCompleteCallback.getSend()(result); + break; + case Microsoft.Office.Common.InvokeType.syncRegisterEvent: + var eventHandlerProxy = this._createEventHandlerProxyObject(this._invokeCompleteCallback); + result = this._methodObject.getMethod()(eventHandlerProxy.getSend(), this._param); + this._eventHandlerProxyList[this._conversationId + this._eventName] = eventHandlerProxy.getSend(); + this._invokeCompleteCallback.getSend()(result); + break; + case Microsoft.Office.Common.InvokeType.syncUnregisterEvent: + var eventHandler = this._eventHandlerProxyList[this._conversationId + this._eventName]; + result = this._methodObject.getMethod()(eventHandler, this._param); + delete this._eventHandlerProxyList[this._conversationId + this._eventName]; + this._invokeCompleteCallback.getSend()(result); + break; + case Microsoft.Office.Common.InvokeType.asyncRegisterEvent: + var eventHandlerProxyAsync = this._createEventHandlerProxyObject(this._invokeCompleteCallback); + this._methodObject.getMethod()(eventHandlerProxyAsync.getSend(), this._invokeCompleteCallback.getSend(), this._param); + this._eventHandlerProxyList[this._callerId + this._eventName] = eventHandlerProxyAsync.getSend(); + break; + case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent: + var eventHandlerAsync = this._eventHandlerProxyList[this._callerId + this._eventName]; + this._methodObject.getMethod()(eventHandlerAsync, this._invokeCompleteCallback.getSend(), this._param); + delete this._eventHandlerProxyList[this._callerId + this._eventName]; + break; + default: + break; + } + } + catch (ex) { + this._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse); + this._invokeCompleteCallback.getSend()(ex); + } + }, + getInvokeBlockingFlag: function Microsoft_Office_Common_Invoker$getInvokeBlockingFlag() { + return this._methodObject.getBlockingFlag(); + }, + _createEventHandlerProxyObject: function Microsoft_Office_Common_Invoker$_createEventHandlerProxyObject(invokeCompleteObject) { + return new Microsoft.Office.Common.ResponseSender(invokeCompleteObject.getRequesterWindow(), invokeCompleteObject.getRequesterUrl(), invokeCompleteObject.getActionName(), invokeCompleteObject.getConversationId(), invokeCompleteObject.getCorrelationId(), Microsoft.Office.Common.ResponseType.forEventing, this._serializerVersion); + } +}; +OSF.OUtil.setNamespace("WAC", OSF.DDA); +OSF.DDA.WAC.UniqueArguments = { + Data: "Data", + Properties: "Properties", + BindingRequest: "DdaBindingsMethod", + BindingResponse: "Bindings", + SingleBindingResponse: "singleBindingResponse", + GetData: "DdaGetBindingData", + AddRowsColumns: "DdaAddRowsColumns", + SetData: "DdaSetBindingData", + ClearFormats: "DdaClearBindingFormats", + SetFormats: "DdaSetBindingFormats", + SettingsRequest: "DdaSettingsMethod", + BindingEventSource: "ddaBinding", + ArrayData: "ArrayData" +}; +OSF.OUtil.setNamespace("Delegate", OSF.DDA.WAC); +OSF.DDA.WAC.Delegate.SpecialProcessor = function OSF_DDA_WAC_Delegate_SpecialProcessor() { + var complexTypes = [ + OSF.DDA.WAC.UniqueArguments.SingleBindingResponse, + OSF.DDA.WAC.UniqueArguments.BindingRequest, + OSF.DDA.WAC.UniqueArguments.BindingResponse, + OSF.DDA.WAC.UniqueArguments.GetData, + OSF.DDA.WAC.UniqueArguments.AddRowsColumns, + OSF.DDA.WAC.UniqueArguments.SetData, + OSF.DDA.WAC.UniqueArguments.ClearFormats, + OSF.DDA.WAC.UniqueArguments.SetFormats, + OSF.DDA.WAC.UniqueArguments.SettingsRequest, + OSF.DDA.WAC.UniqueArguments.BindingEventSource + ]; + var dynamicTypes = {}; + OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes); +}; +OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor); +OSF.DDA.WAC.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor(), []); +OSF.OUtil.setNamespace("WAC", OSF.DDA); +OSF.OUtil.setNamespace("Delegate", OSF.DDA.WAC); +OSF.DDA.WAC.getDelegateMethods = function OSF_DDA_WAC_getDelegateMethods() { + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.WAC.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.WAC.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.WAC.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.WAC.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.WAC.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.WAC.Delegate.sendMessage; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.WAC.Delegate.closeDialog; + return delegateMethods; +}; +OSF.DDA.WAC.Delegate.version = 1; +OSF.DDA.WAC.Delegate.executeAsync = function OSF_DDA_WAC_Delegate$executeAsync(args) { + if (!args.hostCallArgs) { + args.hostCallArgs = {}; + } + args.hostCallArgs["DdaMethod"] = { + "ControlId": OSF._OfficeAppFactory.getId(), + "Version": OSF.DDA.WAC.Delegate.version, + "DispatchId": args.dispId + }; + args.hostCallArgs["__timeout__"] = -1; + if (args.onCalling) { + args.onCalling(); + } + if (!OSF.getClientEndPoint()) { + return; + } + OSF.getClientEndPoint().invoke("executeMethod", function OSF_DDA_WAC_Delegate$OMFacade$OnResponse(xdmStatus, payload) { + if (args.onReceiving) { + args.onReceiving(); + } + var error; + if (xdmStatus == Microsoft.Office.Common.InvokeResultCode.noError) { + OSF.DDA.WAC.Delegate.version = payload["Version"]; + error = payload["Error"]; + } + else { + switch (xdmStatus) { + case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied: + error = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + default: + error = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + if (args.onComplete) { + args.onComplete(error, payload); + } + }, args.hostCallArgs); +}; +OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent = function OSF_DDA_WAC_Delegate$GetOnAfterRegisterEvent(register, args) { + var startTime = (new Date()).getTime(); + return function OSF_DDA_WAC_Delegate$OnAfterRegisterEvent(xdmStatus, payload) { + if (args.onReceiving) { + args.onReceiving(); + } + var status; + if (xdmStatus != Microsoft.Office.Common.InvokeResultCode.noError) { + switch (xdmStatus) { + case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + else { + if (payload) { + if (payload["Error"]) { + status = payload["Error"]; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + } + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + }; +}; +OSF.DDA.WAC.Delegate.registerEventAsync = function OSF_DDA_WAC_Delegate$RegisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + if (!OSF.getClientEndPoint()) { + return; + } + OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(args.targetId, args.eventType), function OSF_DDA_WACOMFacade$OnEvent(payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true, args), { + "controlId": OSF._OfficeAppFactory.getId(), + "eventDispId": args.dispId, + "targetId": args.targetId + }); +}; +OSF.DDA.WAC.Delegate.unregisterEventAsync = function OSF_DDA_WAC_Delegate$UnregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + if (!OSF.getClientEndPoint()) { + return; + } + OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(args.targetId, args.eventType), OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, args), { + "controlId": OSF._OfficeAppFactory.getId(), + "eventDispId": args.dispId, + "targetId": args.targetId + }); +}; +(function (OfficeExt) { + var SovereignHelper = (function () { + function SovereignHelper() { + this._configPromise = null; + } + SovereignHelper.isSovereignVersion = function () { + return (typeof isOsfSovereignVersion !== "undefined" && + isOsfSovereignVersion === true); + }; + SovereignHelper.prototype.getEnvironmentName = function () { + return this.getConfig().then(function (config) { + return (config && config.envName) ? config.envName : null; + }); + }; + SovereignHelper.prototype.getEnvironmentType = function () { + return this.getConfig().then(function (config) { + return (config && config.envType) ? config.envType : null; + }); + }; + SovereignHelper.prototype.getTrustedHostOrigins = function () { + return this.getConfig().then(function (config) { + return config != null ? config.trustedHostOrigins : null; + }); + }; + SovereignHelper.prototype.isConfigAvailable = function () { + return this.getConfig().then(function (config) { + return config != null; + }); + }; + SovereignHelper.prototype.isSovereignHostTrusted = function (hostName) { + if (!hostName) { + return Office.Promise.resolve(false); + } + else if (hostName === window.location.hostname) { + return Office.Promise.resolve(true); + } + return this.getTrustedHostOrigins().then(function (trustedHostOrigins) { + if (!trustedHostOrigins || trustedHostOrigins.length == 0) { + return false; + } + var regexHostName = new RegExp(trustedHostOrigins.join("|")); + return regexHostName.test(hostName); + }); + }; + SovereignHelper.prototype.getConfigPath = function () { + var basePath = OSF._OfficeAppFactory + .getLoadScriptHelper() + .getOfficeJsBasePath(); + if (basePath) { + basePath = basePath.toLowerCase(); + var configRoot = "/lib/"; + var indexofRoot = basePath.indexOf(configRoot); + if (indexofRoot > -1) { + return (basePath + .toLowerCase() + .substring(0, indexofRoot + configRoot.length) + "officeconfig.json"); + } + } + return ""; + }; + SovereignHelper.prototype.getConfig = function () { + if (!this._configPromise) { + this._configPromise = this.tryLoadConfig(); + } + return this._configPromise; + }; + SovereignHelper.prototype.tryLoadConfig = function () { + var configPath = this.getConfigPath(); + if (configPath) { + var _localStorage_1 = OSF.OUtil.getLocalStorage(); + var cacheKey_1 = configPath + "_cache"; + var cacheValue = _localStorage_1.getItem(cacheKey_1); + var cacheResult_1 = null; + if (cacheValue) { + try { + cacheResult_1 = JSON.parse(cacheValue); + } + catch (_a) { } + var maxAgeInMs = 1000 * 60 * 60 * 24; + var currentTime = new Date().getTime(); + if (cacheResult_1 && + cacheResult_1.config && + cacheResult_1.createTime <= currentTime && + cacheResult_1.createTime + maxAgeInMs >= currentTime) { + return Office.Promise.resolve(cacheResult_1.config); + } + } + return this.downloadConfig(configPath).then(function (config) { + if (config) { + cacheResult_1 = { createTime: new Date().getTime(), config: config }; + _localStorage_1.setItem(cacheKey_1, JSON.stringify(cacheResult_1)); + } + else if (cacheResult_1) { + config = cacheResult_1.config; + } + return config; + }); + } + return Office.Promise.resolve(null); + }; + SovereignHelper.prototype.downloadConfig = function (configUrl) { + return new Office.Promise(function (resolve, reject) { + OSF.OUtil.xhrGet(configUrl, function (content) { + try { + resolve(JSON.parse(content)); + } + catch (_a) { + resolve(null); + } + }, function () { + resolve(null); + }); + }); + }; + return SovereignHelper; + }()); + OfficeExt.SovereignHelper = SovereignHelper; +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.setNamespace("WebApp", OSF); +OSF.OUtil.setNamespace("Messaging", OSF); +OSF.OUtil.setNamespace("ExtensionLifeCycle", OSF); +OSF.OUtil.setNamespace("TaskPaneAction", OSF); +OSF.OUtil.setNamespace("RibbonGallery", OSF); +OSF.WebApp.AddHostInfoAndXdmInfo = function OSF_WebApp$AddHostInfoAndXdmInfo(url) { + if (OSF._OfficeAppFactory.getWindowLocationSearch && OSF._OfficeAppFactory.getWindowLocationHash) { + return url + OSF._OfficeAppFactory.getWindowLocationSearch() + OSF._OfficeAppFactory.getWindowLocationHash(); + } + else { + return url; + } +}; +OSF.WebApp._UpdateLinksForHostAndXdmInfo = function OSF_WebApp$_UpdateLinksForHostAndXdmInfo() { + var links = document.querySelectorAll("a[data-officejs-navigate]"); + for (var i = 0; i < links.length; i++) { + if (OSF.WebApp._isGoodUrl(links[i].href)) { + links[i].href = OSF.WebApp.AddHostInfoAndXdmInfo(links[i].href); + } + } + var forms = document.querySelectorAll("form[data-officejs-navigate]"); + for (var i = 0; i < forms.length; i++) { + var form = forms[i]; + if (OSF.WebApp._isGoodUrl(form.action)) { + form.action = OSF.WebApp.AddHostInfoAndXdmInfo(form.action); + } + } +}; +OSF.WebApp._isGoodUrl = function OSF_WebApp$_isGoodUrl(url) { + if (typeof url == 'undefined') + return false; + url = url.trim(); + var colonIndex = url.indexOf(':'); + var protocol = colonIndex > 0 ? url.substr(0, colonIndex) : null; + var goodUrl = protocol !== null ? protocol.toLowerCase() === "http" || protocol.toLowerCase() === "https" : true; + goodUrl = goodUrl && url != "#" && url != "/" && url != "" && url != OSF._OfficeAppFactory.getWebAppState().webAppUrl; + return goodUrl; +}; +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._appContext = {}; + this._tabbableElements = "a[href]:not([tabindex='-1'])," + "area[href]:not([tabindex='-1'])," + "button:not([disabled]):not([tabindex='-1'])," + "input:not([disabled]):not([tabindex='-1'])," + "select:not([disabled]):not([tabindex='-1'])," + "textarea:not([disabled]):not([tabindex='-1'])," + "*[tabindex]:not([tabindex='-1'])," + "*[contenteditable]:not([disabled]):not([tabindex='-1'])"; + this._initializeSettings = function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) { + var settings; + var serializedSettings = appContext.get_settings(); + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if (storageSettings) { + serializedSettings = JSON.parse(storageSettings); + } + else { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if (refreshSupported) { + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + } + else { + settings = new OSF.DDA.Settings(deserializedSettings); + } + return settings; + }; + var windowOpen = function OSF_InitializationHelper$windowOpen(windowObj) { + var proxy = window.open; + windowObj.open = function (strUrl, strWindowName, strWindowFeatures) { + var windowObject = null; + var hostInfoObj = OSF._OfficeAppFactory.getHostInfo(); + try { + if (hostInfoObj.hostType === 'outlook' && hostInfoObj.hostPlatform === 'web' && hostInfoObj.flags & OSF.HostInfoFlags.IsMonarch) { + windowObject = proxy('about:blank?unfiltered', strWindowName, strWindowFeatures); + if (windowObject) { + windowObject.location = strUrl; + } + else { + windowObject = proxy(strUrl, strWindowName, strWindowFeatures); + } + } + else { + windowObject = proxy(strUrl, strWindowName, strWindowFeatures); + } + } + catch (ex) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen." + ex); + } + } + if (!windowObject) { + var params = { + "strUrl": strUrl, + "strWindowName": strWindowName, + "strWindowFeatures": strWindowFeatures + }; + if (OSF._OfficeAppFactory.getClientEndPoint()) { + OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost", null, params); + } + } + if (OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.EnablingWindowOpenUsageLogging)) { + if (hostInfoObj && hostInfoObj.hostType === 'outlook' && hostInfoObj.hostPlatform === 'web') { + if (!strWindowName || (strWindowName && strWindowName.indexOf('hostInfo') == -1)) { + var additionalParams = strWindowFeatures && String(strWindowFeatures).toLowerCase(); + var hasAdditionalParams = (additionalParams && (additionalParams.indexOf("width") > -1 || additionalParams.indexOf("height") > -1)) ? 1 : 0; + var succeeded = windowObject != null ? 0 : 1; + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(-10, hasAdditionalParams, 0, succeeded); + } + } + } + } + return windowObject; + }; + }; + windowOpen(window); +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { + var getAppIdFromWindowLocation = function OSF_InitializationHelper$getAppIdFromWindowLocation() { + var xdmInfoValue = OSF.OUtil.parseXdmInfo(true); + if (xdmInfoValue) { + var items = xdmInfoValue.split("|"); + return items[1]; + } + return null; + }; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + if (!hostInfoValue) { + hostInfoValue = OSF.OUtil.parseHostInfoFromWindowName(true, OSF._OfficeAppFactory.getWindowName()); + } + if (hostInfoValue && hostInfoValue.indexOf("isDialog") > -1) { + var appId = getAppIdFromWindowLocation(); + if (appId != null) { + osfSessionStorage.setItem(appId + "IsDialog", "true"); + } + this._hostInfo.isDialog = true; + return; + } + this._hostInfo.isDialog = osfSessionStorage.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId, false) + "IsDialog") != null ? true : false; + } +}; +OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppCommonMessage("OsfControl activation lifecycle: getAppContext got called."); + } + var me = this; + var getInvocationCallbackWebApp = function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(errorCode, appContext) { + var settings; + if (appContext._appName === OSF.AppName.ExcelWebApp) { + var serializedSettings = appContext._settings; + settings = {}; + for (var index in serializedSettings) { + var setting = serializedSettings[index]; + settings[setting[0]] = setting[1]; + } + } + else { + settings = appContext._settings; + } + if (appContext._appName === OSF.AppName.OutlookWebApp && !!appContext._requirementMatrix && appContext._requirementMatrix.indexOf("react") == -1) { + OSF.AgaveHostAction.SendTelemetryEvent = undefined; + } + if (!me._hostInfo.isDialog || window.opener == null) { + var pageUrl = window.location.origin; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.UpdateTargetUrl, pageUrl]); + } + if (errorCode === 0 && appContext._id != undefined && appContext._appName != undefined && appContext._appVersion != undefined && appContext._appUILocale != undefined && appContext._dataLocale != undefined && + appContext._docUrl != undefined && appContext._clientMode != undefined && appContext._settings != undefined && appContext._reason != undefined) { + me._appContext = appContext; + var appInstanceId = (appContext._appInstanceId ? appContext._appInstanceId : appContext._id); + var touchEnabled = false; + var commerceAllowed = true; + var minorVersion = 0; + if (appContext._appMinorVersion != undefined) { + minorVersion = appContext._appMinorVersion; + } + var requirementMatrix = undefined; + if (appContext._requirementMatrix != undefined) { + requirementMatrix = appContext._requirementMatrix; + } + appContext.eToken = appContext.eToken ? appContext.eToken : ""; + var returnedContext = new OSF.OfficeAppContext(appContext._id, appContext._appName, appContext._appVersion, appContext._appUILocale, appContext._dataLocale, appContext._docUrl, appContext._clientMode, settings, appContext._reason, appContext._osfControlType, appContext._eToken, appContext._correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, appContext._hostCustomMessage, appContext._hostFullVersion, appContext._clientWindowHeight, appContext._clientWindowWidth, appContext._addinName, appContext._appDomains, appContext._dialogRequirementMatrix, appContext._featureGates, appContext._officeTheme, appContext._initialDisplayMode); + returnedContext._wacHostEnvironment = appContext._wacHostEnvironment || "0"; + returnedContext._isFromWacAutomation = !!appContext._isFromWacAutomation; + returnedContext._marketplaceType = appContext._marketplaceType; + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + } + else { + var errorMsg = "Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is " + errorCode + ", exception: " + appContext; + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException(errorMsg); + } + throw errorMsg; + } + }; + try { + if (this._hostInfo.isDialog && window.opener != null) { + var appContext = OfficeExt.WACUtils.parseAppContextFromWindowName(false, OSF._OfficeAppFactory.getWindowName()); + getInvocationCallbackWebApp(0, appContext); + } + else { + this._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync", getInvocationCallbackWebApp, this._webAppState.id); + } + } + catch (ex) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:[" + ex + "]"); + } + throw ex; + } +}; +OSF.InitializationHelper.prototype.isHostOriginTrusted = function OSF_InitializationHelper$isHostOriginTrusted(hostOrigin) { +}; +OSF.InitializationHelper.prototype.performUserTrustCheck = function OSF_InitializationHelper$performUserTrustCheck(hostName, isHttps, funcToRun) { + var me = this; + var notHttpsErrorMessage = "NotHttps"; + var loadAgaveErrorUX = function () { + var officejsCDNHost = OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath().match(/^https?:\/\/[^:/?#]*(?::([0-9]+))?/); + if (officejsCDNHost && officejsCDNHost[0]) { + var agaveErrorUXPath = OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + 'AgaveErrorUX/index.html#'; + var hashObj = { + error: "NotTrustedWAC", + locale: OSF.getSupportedLocale(me._hostInfo.hostLocale, OSF.ConstantNames.DefaultLocale), + hostname: hostName, + noHttps: !isHttps, + validate: false, + useHtmlPopup: OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.HostTrustDialog), + isConfirm: false + }; + var hostUserTrustIframe = document.createElement("iframe"); + hostUserTrustIframe.style.visibility = "hidden"; + hostUserTrustIframe.style.height = "0"; + hostUserTrustIframe.style.width = "0"; + function hostUserTrustCallback(event) { + if ((event.source == hostUserTrustIframe.contentWindow) && + (event.origin == officejsCDNHost[0])) { + try { + var receivedObj = JSON.parse(event.data); + var e = Function._validateParams(receivedObj, [{ name: "hostUserTrusted", type: Boolean, mayBeNull: false } + ]); + if (receivedObj.hostUserTrusted === true) { + me._webAppState.clientEndPoint._hostTrustCheckStatus = Microsoft.Office.Common.HostTrustStatus.trusted; + OSF.OUtil.removeEventListener(window, "message", hostUserTrustCallback); + document.body.removeChild(hostUserTrustIframe); + } + else { + hashObj.validate = false; + if (OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.HostTrustDialog)) { + if (window.innerHeight * window.innerWidth === 0) { + var dialogNotificationShownArgs = { + "dispId": OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent, + "eventType": OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown, + "onComplete": null, + "onCalling": null + }; + OSF.DDA.WAC.Delegate.registerEventAsync(dialogNotificationShownArgs); + } + } + window.location.replace(agaveErrorUXPath + encodeURIComponent(JSON.stringify(hashObj))); + } + funcToRun(); + } + catch (e) { + document.body.textContent = Strings.OfficeOM.L_NotTrustedWAC; + } + } + } + ; + OSF.OUtil.addEventListener(window, "message", hostUserTrustCallback); + hashObj.validate = true; + hostUserTrustIframe.setAttribute('src', agaveErrorUXPath + encodeURIComponent(JSON.stringify(hashObj))); + hostUserTrustIframe.onload = function () { + var postingObj = { + hostname: hostName, + noHttps: !isHttps + }; + hostUserTrustIframe.contentWindow.postMessage(JSON.stringify(postingObj), officejsCDNHost[0]); + }; + document.body.appendChild(hostUserTrustIframe); + } + else { + document.body.textContent = Strings.OfficeOM.L_NotTrustedWAC; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (!isHttps) + throw new Error(notHttpsErrorMessage); + } + }; + if (document.body) { + loadAgaveErrorUX(); + } + else { + var checkDone = false; + document.addEventListener('DOMContentLoaded', function () { + if (!checkDone) { + checkDone = true; + loadAgaveErrorUX(); + } + }); + } +}; +OSF.InitializationHelper.prototype.checkWellKnownOrigins = function OSF_InitializationHelper$checkWellKnownOrigins(hostName, isHttps, onOriginCheckComplete) { + var me = this; + if (me._webAppState.clientEndPoint._hostTrustCheckStatus === Microsoft.Office.Common.HostTrustStatus.unknown) { + if (!isHttps) + me._webAppState.clientEndPoint._hostTrustCheckStatus = Microsoft.Office.Common.HostTrustStatus.nothttps; + if (me._webAppState.clientEndPoint._hostTrustCheckStatus != Microsoft.Office.Common.HostTrustStatus.nothttps) { + var isSovereignVersion = OfficeExt.SovereignHelper.isSovereignVersion(); + var isOriginValid = false; + if (!isSovereignVersion || (typeof officeInitializationSettings === "object" && officeInitializationSettings.trustAllCloudEnvironments === true)) { + isOriginValid = Microsoft.Office.Common.XdmCommunicationManager.isHostNameValidWacDomain(hostName); + if (me.isHostOriginTrusted) { + isOriginValid = isOriginValid || me.isHostOriginTrusted(hostName); + } + if (isOriginValid) { + me._webAppState.clientEndPoint._hostTrustCheckStatus = Microsoft.Office.Common.HostTrustStatus.trusted; + } + } + if (!isOriginValid && isSovereignVersion) { + if (!me._sovereignHelper) { + me._sovereignHelper = new OfficeExt.SovereignHelper(); + } + var sovereignHelper = me._sovereignHelper; + sovereignHelper.isConfigAvailable().then(function (isConfigAvailable) { + if (isConfigAvailable) { + sovereignHelper.isSovereignHostTrusted(hostName).then(function (isOriginValid) { + if (isOriginValid) { + me._webAppState.clientEndPoint._hostTrustCheckStatus = Microsoft.Office.Common.HostTrustStatus.trusted; + } + onOriginCheckComplete(); + }); + } + }); + return; + } + } + } + onOriginCheckComplete(); +}; +OSF.InitializationHelper.prototype.checkReceiverOriginAndRun = function OSF_InitializationHelper$checkReceiverOriginAndRun(funcToRun) { + var me = this; + if (me._webAppState.clientEndPoint._hostTrustCheckStatus === Microsoft.Office.Common.HostTrustStatus.trusted) { + funcToRun(); + return; + } + var parsedHostname = OSF.OUtil.parseUrl(me._webAppState.clientEndPoint._targetUrl, false); + var hostName = parsedHostname.hostname; + var isHttps = parsedHostname.protocol == "https:"; + me.checkWellKnownOrigins(hostName, isHttps, function () { + if (!me._webAppState.clientEndPoint._checkStatusLogged && me._hostInfo != null && me._hostInfo !== undefined) { + var isLocalStorageAvailable = OSF.OUtil.getLocalStorage().isLocalStorageAvailable(); + OSF.AppTelemetry.onCheckWACHost(me._webAppState.clientEndPoint._hostTrustCheckStatus, me._webAppState.id, me._hostInfo.hostType, me._hostInfo.hostPlatform, me._webAppState.clientEndPoint._targetUrl, isLocalStorageAvailable); + me._webAppState.clientEndPoint._checkStatusLogged = true; + } + if (me._webAppState.clientEndPoint._hostTrustCheckStatus === Microsoft.Office.Common.HostTrustStatus.trusted) { + funcToRun(); + } + else { + me.performUserTrustCheck(hostName, isHttps, funcToRun); + } + }); +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication() { + try { + var me = this; + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(false, OSF._OfficeAppFactory.getWindowLocationHash()); + if (!xdmInfoValue && OSF._OfficeAppFactory.getWindowName) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(false, OSF._OfficeAppFactory.getWindowName()); + } + if (xdmInfoValue) { + var xdmItems = OSF.OUtil.getInfoItems(xdmInfoValue); + if (xdmItems != undefined && xdmItems.length >= 3) { + me._webAppState.conversationID = xdmItems[0]; + me._webAppState.id = xdmItems[1]; + me._webAppState.webAppUrl = xdmItems[2].indexOf(":") >= 0 ? xdmItems[2] : decodeURIComponent(xdmItems[2]); + } + } + me._webAppState.wnd = window.opener != null ? window.opener : window.parent; + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(false, OSF._OfficeAppFactory.getWindowLocationHash()); + if (isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(false, OSF._OfficeAppFactory.getWindowName()); + } + me._webAppState.serializerVersion = serializerVersion; + if (this._hostInfo.isDialog && window.opener != null) { + return; + } + me._webAppState.clientEndPoint = Microsoft.Office.Common.XdmCommunicationManager.connect(me._webAppState.conversationID, me._webAppState.wnd, me._webAppState.webAppUrl, me._webAppState.serializerVersion); + me._webAppState.serviceEndPoint = Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(me._webAppState.id); + me._webAppState.clientEndPoint._checkReceiverOriginAndRun = function (funcToRun) { + me.checkReceiverOriginAndRun(funcToRun); + }; + var notificationConversationId = me._webAppState.conversationID + OSF.SharedConstants.NotificationConversationIdSuffix; + me._webAppState.serviceEndPoint.registerConversation(notificationConversationId, me._webAppState.webAppUrl); + var notifyAgave = function OSF__OfficeAppFactory_initialize$notifyAgave(params) { + var actionId; + if (typeof params == "string") { + actionId = params; + } + else { + actionId = params[0]; + } + switch (actionId) { + case OSF.AgaveHostAction.Select: + me._webAppState.focused = true; + break; + case OSF.AgaveHostAction.UnSelect: + me._webAppState.focused = false; + break; + case OSF.AgaveHostAction.TabIn: + case OSF.AgaveHostAction.CtrlF6In: + window.focus(); + var list = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToFirstTabbable(list, false); + if (!focused) { + window.blur(); + me._webAppState.focused = false; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.ExitNoFocusable]); + } + break; + case OSF.AgaveHostAction.TabInShift: + window.focus(); + var list = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToFirstTabbable(list, true); + if (!focused) { + window.blur(); + me._webAppState.focused = false; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.ExitNoFocusableShift]); + } + break; + case OSF.AgaveHostAction.SendMessage: + if (window.Office.context.messaging.onMessage) { + var message = params[1]; + window.Office.context.messaging.onMessage(message); + } + break; + case OSF.AgaveHostAction.TaskPaneHeaderButtonClicked: + if (window.Office.context.ui.taskPaneAction.onHeaderButtonClick) { + window.Office.context.ui.taskPaneAction.onHeaderButtonClick(); + } + break; + default: + OsfMsAjaxFactory.msAjaxDebug.trace("actionId " + actionId + " notifyAgave is wrong."); + break; + } + }; + me._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave", notifyAgave, Microsoft.Office.Common.InvokeType.async, false); + me.addOrRemoveEventListenersForWindow(true); + } + catch (ex) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:[" + ex + "]"); + } + throw ex; + } +}; +OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow = function OSF_InitializationHelper$addOrRemoveEventListenersForWindow(isAdd) { + var me = this; + var onWindowFocus = function () { + if (!me._webAppState.focused) { + me._webAppState.focused = true; + } + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.Select]); + }; + var onWindowBlur = function () { + if (!OSF) { + return; + } + if (me._webAppState.focused) { + me._webAppState.focused = false; + } + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.UnSelect]); + }; + var onWindowKeydown = function (e) { + e.preventDefault = e.preventDefault || function () { + e.returnValue = false; + }; + if (e.keyCode == 117 && (e.ctrlKey || e.metaKey)) { + e.preventDefault(); + var actionId = OSF.AgaveHostAction.CtrlF6Exit; + if (e.shiftKey) { + actionId = OSF.AgaveHostAction.CtrlF6ExitShift; + } + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, actionId]); + } + else if (e.keyCode == 9) { + var isPowerPointModernSlideShow = me._appContext._isPowerPointModernSlideShowEnabled && + me._appContext._appName == OSF.AppName.PowerpointWebApp && + me._appContext._clientMode == OSF.ClientMode.ReadOnly && + me._appContext._osfControlType == OSF.OsfControlType.DocumentLevel; + if (!isPowerPointModernSlideShow) { + e.preventDefault(); + } + var allTabbableElements = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToNextTabbable(allTabbableElements, e.target || e.srcElement, e.shiftKey); + if (focused) { + if (isPowerPointModernSlideShow) { + e.preventDefault(); + } + } + else { + if (me._hostInfo.isDialog) { + OSF.OUtil.focusToFirstTabbable(allTabbableElements, e.shiftKey); + } + else { + if (e.shiftKey) { + if (!isPowerPointModernSlideShow) { + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.TabExitShift]); + } + } + else { + if (OSF.OUtil.checkFlight(OSF.FlightNames.SetFocusToTaskpaneIsEnabled) && e.target && e.target.tagName.toUpperCase() === "BODY") { + OSF.OUtil.focusToFirstTabbable(allTabbableElements, e.shiftKey); + } + else { + if (!isPowerPointModernSlideShow) { + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.TabExit]); + } + } + } + } + } + } + else if (e.keyCode == 27) { + e.preventDefault(); + me.dismissDialogNotification && me.dismissDialogNotification(); + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.EscExit]); + } + else if (e.keyCode == 113) { + e.preventDefault(); + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.F2Exit]); + } + else if ((e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) && e.keyCode >= 1 && e.keyCode <= 255) { + var params = { + "keyCode": e.keyCode, + "shiftKey": e.shiftKey, + "altKey": e.altKey, + "ctrlKey": e.ctrlKey, + "metaKey": e.metaKey + }; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.KeyboardShortcuts, params]); + } + }; + var onWindowKeypress = function (e) { + if (e.keyCode == 117 && e.ctrlKey) { + if (e.preventDefault) { + e.preventDefault(); + } + else { + e.returnValue = false; + } + } + }; + if (isAdd) { + OSF.OUtil.addEventListener(window, "focus", onWindowFocus); + OSF.OUtil.addEventListener(window, "blur", onWindowBlur); + OSF.OUtil.addEventListener(window, "keydown", onWindowKeydown); + OSF.OUtil.addEventListener(window, "keypress", onWindowKeypress); + } + else { + OSF.OUtil.removeEventListener(window, "focus", onWindowFocus); + OSF.OUtil.removeEventListener(window, "blur", onWindowBlur); + OSF.OUtil.removeEventListener(window, "keydown", onWindowKeydown); + OSF.OUtil.removeEventListener(window, "keypress", onWindowKeypress); + } +}; +OSF.InitializationHelper.prototype.initWebDialog = function OSF_InitializationHelper$initWebDialog(appContext) { + if (appContext.get_isDialog()) { + if (OSF.DDA.UI.ChildUI) { + var isPopupWindow = (window.opener != null); + appContext.ui = new OSF.DDA.UI.ChildUI(isPopupWindow); + if (isPopupWindow) { + this.registerMessageReceivedEventForWindowDialog && this.registerMessageReceivedEventForWindowDialog(); + } + } + } + else { + if (OSF.DDA.UI.ParentUI) { + appContext.ui = new OSF.DDA.UI.ParentUI(); + if (OfficeExt.Container) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.CloseContainerAsync]); + } + } + } +}; +OSF.InitializationHelper.prototype.initWebAuth = function OSF_InitializationHelper$initWebAuth(appContext) { + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + var asyncMethods = []; + var getAccessTokenMethod = OSF.DDA.AsyncMethodNames.GetAccessTokenAsync; + if (getAccessTokenMethod) { + asyncMethods.push(getAccessTokenMethod); + } + var authContextMethod = OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync; + if (authContextMethod) { + asyncMethods.push(authContextMethod); + } + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, asyncMethods); + } +}; +OSF.InitializationHelper.prototype.initWebAuthImplicit = function OSF_InitializationHelper$initWebAuthImplicit(appContext) { + if (OSF.DDA.WebAuth) { + appContext.webAuth = new OSF.DDA.WebAuth(); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.webAuth, [OSF.DDA.AsyncMethodNames.GetAuthContextAsync]); + } +}; +OSF.getClientEndPoint = function OSF$getClientEndPoint() { + var initializationHelper = OSF._OfficeAppFactory.getInitializationHelper(); + return initializationHelper._webAppState.clientEndPoint; +}; +OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() { + if (this._hostInfo.isDialog) { + window.focus(); + var list = document.querySelectorAll(this._tabbableElements); + var focused = OSF.OUtil.focusToFirstTabbable(list, false); + if (!focused) { + window.blur(); + this._webAppState.focused = false; + if (this._webAppState.clientEndPoint) { + this._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [this._webAppState.id, OSF.AgaveHostAction.ExitNoFocusable]); + } + } + } +}; +OSF.Messaging.sendMessage = function OSF_Messaging$sendMessage(message) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.SendMessage, message]); +}; +OSF.ExtensionLifeCycle.launchExtensionComponent = function OSF_ExtensionLifeCycle$launchExtensionComponent(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.LaunchExtensionComponent, params]); +}; +OSF.ExtensionLifeCycle.stopExtensionComponent = function OSF_ExtensionLifeCycle$stopExtensionComponent(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.StopExtensionComponent, params]); +}; +OSF.ExtensionLifeCycle.restartExtensionComponent = function OSF_ExtensionLifeCycle$restartExtensionComponent(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.RestartExtensionComponent, params]); +}; +OSF.ExtensionLifeCycle.close = function OSF_ExtensionLifeCycle$close(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.CloseSDXDialog, params]); +}; +OSF.TaskPaneAction.enableHeaderButton = function OSF_TaskPaneAction$enableHeaderButton(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.EnableTaskPaneHeaderButton, params]); +}; +OSF.TaskPaneAction.disableHeaderButton = function OSF_TaskPaneAction$disableHeaderButton() { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.DisableTaskPaneHeaderButton]); +}; +OSF.RibbonGallery.refreshRibbon = function OSF_RibbonGallery$refreshRibbon(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.RefreshRibbonGallery, params]); +}; +var OSFLog; +(function (OSFLog) { + var BaseUsageData = (function () { + function BaseUsageData(table) { + this._table = table; + this._fields = {}; + } + Object.defineProperty(BaseUsageData.prototype, "Fields", { + get: function () { + return this._fields; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype, "Table", { + get: function () { + return this._table; + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function () { + }; + BaseUsageData.prototype.SetSerializedField = function (key, value) { + if (typeof (value) !== "undefined" && value !== null) { + this._serializedFields[key] = value.toString(); + } + }; + BaseUsageData.prototype.SerializeRow = function () { + this._serializedFields = {}; + this.SetSerializedField("Table", this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields); + }; + return BaseUsageData; + }()); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = (function (_super) { + __extends(AppActivatedUsageData, _super); + function AppActivatedUsageData() { + return _super.call(this, "AppActivated") || this; + } + Object.defineProperty(AppActivatedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppId", { + get: function () { return this.Fields["AppId"]; }, + set: function (value) { this.Fields["AppId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppInstanceId", { + get: function () { return this.Fields["AppInstanceId"]; }, + set: function (value) { this.Fields["AppInstanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppURL", { + get: function () { return this.Fields["AppURL"]; }, + set: function (value) { this.Fields["AppURL"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AssetId", { + get: function () { return this.Fields["AssetId"]; }, + set: function (value) { this.Fields["AssetId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Browser", { + get: function () { return this.Fields["Browser"]; }, + set: function (value) { this.Fields["Browser"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "UserId", { + get: function () { return this.Fields["UserId"]; }, + set: function (value) { this.Fields["UserId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Host", { + get: function () { return this.Fields["Host"]; }, + set: function (value) { this.Fields["Host"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostVersion", { + get: function () { return this.Fields["HostVersion"]; }, + set: function (value) { this.Fields["HostVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "ClientId", { + get: function () { return this.Fields["ClientId"]; }, + set: function (value) { this.Fields["ClientId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeWidth", { + get: function () { return this.Fields["AppSizeWidth"]; }, + set: function (value) { this.Fields["AppSizeWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeHeight", { + get: function () { return this.Fields["AppSizeHeight"]; }, + set: function (value) { this.Fields["AppSizeHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "DocUrl", { + get: function () { return this.Fields["DocUrl"]; }, + set: function (value) { this.Fields["DocUrl"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "OfficeJSVersion", { + get: function () { return this.Fields["OfficeJSVersion"]; }, + set: function (value) { this.Fields["OfficeJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostJSVersion", { + get: function () { return this.Fields["HostJSVersion"]; }, + set: function (value) { this.Fields["HostJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "WacHostEnvironment", { + get: function () { return this.Fields["WacHostEnvironment"]; }, + set: function (value) { this.Fields["WacHostEnvironment"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsFromWacAutomation", { + get: function () { return this.Fields["IsFromWacAutomation"]; }, + set: function (value) { this.Fields["IsFromWacAutomation"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsMOS", { + get: function () { return this.Fields["IsMOS"]; }, + set: function (value) { this.Fields["IsMOS"] = value; }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("AppId", this.AppId); + this.SetSerializedField("AppInstanceId", this.AppInstanceId); + this.SetSerializedField("AppURL", this.AppURL); + this.SetSerializedField("AssetId", this.AssetId); + this.SetSerializedField("Browser", this.Browser); + this.SetSerializedField("UserId", this.UserId); + this.SetSerializedField("Host", this.Host); + this.SetSerializedField("HostVersion", this.HostVersion); + this.SetSerializedField("ClientId", this.ClientId); + this.SetSerializedField("AppSizeWidth", this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight", this.AppSizeHeight); + this.SetSerializedField("Message", this.Message); + this.SetSerializedField("DocUrl", this.DocUrl); + this.SetSerializedField("OfficeJSVersion", this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion", this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment", this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation", this.IsFromWacAutomation); + this.SetSerializedField("IsMOS", this.IsMOS); + }; + return AppActivatedUsageData; + }(BaseUsageData)); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = (function (_super) { + __extends(ScriptLoadUsageData, _super); + function ScriptLoadUsageData() { + return _super.call(this, "ScriptLoad") || this; + } + Object.defineProperty(ScriptLoadUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ScriptId", { + get: function () { return this.Fields["ScriptId"]; }, + set: function (value) { this.Fields["ScriptId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "StartTime", { + get: function () { return this.Fields["StartTime"]; }, + set: function (value) { this.Fields["StartTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("ScriptId", this.ScriptId); + this.SetSerializedField("StartTime", this.StartTime); + this.SetSerializedField("ResponseTime", this.ResponseTime); + }; + return ScriptLoadUsageData; + }(BaseUsageData)); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = (function (_super) { + __extends(AppClosedUsageData, _super); + function AppClosedUsageData() { + return _super.call(this, "AppClosed") || this; + } + Object.defineProperty(AppClosedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "FocusTime", { + get: function () { return this.Fields["FocusTime"]; }, + set: function (value) { this.Fields["FocusTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalWidth", { + get: function () { return this.Fields["AppSizeFinalWidth"]; }, + set: function (value) { this.Fields["AppSizeFinalWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalHeight", { + get: function () { return this.Fields["AppSizeFinalHeight"]; }, + set: function (value) { this.Fields["AppSizeFinalHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "OpenTime", { + get: function () { return this.Fields["OpenTime"]; }, + set: function (value) { this.Fields["OpenTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "CloseMethod", { + get: function () { return this.Fields["CloseMethod"]; }, + set: function (value) { this.Fields["CloseMethod"] = value; }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("FocusTime", this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth", this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight", this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime", this.OpenTime); + this.SetSerializedField("CloseMethod", this.CloseMethod); + }; + return AppClosedUsageData; + }(BaseUsageData)); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = (function (_super) { + __extends(APIUsageUsageData, _super); + function APIUsageUsageData() { + return _super.call(this, "APIUsage") || this; + } + Object.defineProperty(APIUsageUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIType", { + get: function () { return this.Fields["APIType"]; }, + set: function (value) { this.Fields["APIType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIID", { + get: function () { return this.Fields["APIID"]; }, + set: function (value) { this.Fields["APIID"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "Parameters", { + get: function () { return this.Fields["Parameters"]; }, + set: function (value) { this.Fields["Parameters"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ErrorType", { + get: function () { return this.Fields["ErrorType"]; }, + set: function (value) { this.Fields["ErrorType"] = value; }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("APIType", this.APIType); + this.SetSerializedField("APIID", this.APIID); + this.SetSerializedField("Parameters", this.Parameters); + this.SetSerializedField("ResponseTime", this.ResponseTime); + this.SetSerializedField("ErrorType", this.ErrorType); + }; + return APIUsageUsageData; + }(BaseUsageData)); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = (function (_super) { + __extends(AppInitializationUsageData, _super); + function AppInitializationUsageData() { + return _super.call(this, "AppInitialization") || this; + } + Object.defineProperty(AppInitializationUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SuccessCode", { + get: function () { return this.Fields["SuccessCode"]; }, + set: function (value) { this.Fields["SuccessCode"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("SuccessCode", this.SuccessCode); + this.SetSerializedField("Message", this.Message); + }; + return AppInitializationUsageData; + }(BaseUsageData)); + OSFLog.AppInitializationUsageData = AppInitializationUsageData; + var CheckWACHostUsageData = (function (_super) { + __extends(CheckWACHostUsageData, _super); + function CheckWACHostUsageData() { + return _super.call(this, "CheckWACHost") || this; + } + Object.defineProperty(CheckWACHostUsageData.prototype, "isWacKnownHost", { + get: function () { return this.Fields["isWacKnownHost"]; }, + set: function (value) { this.Fields["isWacKnownHost"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "instanceId", { + get: function () { return this.Fields["instanceId"]; }, + set: function (value) { this.Fields["instanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostType", { + get: function () { return this.Fields["hostType"]; }, + set: function (value) { this.Fields["hostType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostPlatform", { + get: function () { return this.Fields["hostPlatform"]; }, + set: function (value) { this.Fields["hostPlatform"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "wacDomain", { + get: function () { return this.Fields["wacDomain"]; }, + set: function (value) { this.Fields["wacDomain"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "isLocalStorageAvailable", { + get: function () { return this.Fields["isLocalStorageAvailable"]; }, + set: function (value) { this.Fields["isLocalStorageAvailable"] = value; }, + enumerable: true, + configurable: true + }); + CheckWACHostUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("isWacKnownHost", this.isWacKnownHost); + this.SetSerializedField("instanceId", this.instanceId); + this.SetSerializedField("hostType", this.hostType); + this.SetSerializedField("hostPlatform", this.hostPlatform); + this.SetSerializedField("wacDomain", this.wacDomain); + this.SetSerializedField("isLocalStorageAvailable", this.isLocalStorageAvailable); + }; + return CheckWACHostUsageData; + }(BaseUsageData)); + OSFLog.CheckWACHostUsageData = CheckWACHostUsageData; +})(OSFLog || (OSFLog = {})); +var Logger; +(function (Logger) { + "use strict"; + var TraceLevel; + (function (TraceLevel) { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error"; + })(TraceLevel = Logger.TraceLevel || (Logger.TraceLevel = {})); + var SendFlag; + (function (SendFlag) { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush"; + })(SendFlag = Logger.SendFlag || (Logger.SendFlag = {})); + function allowUploadingData() { + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) { + } + Logger.sendLog = sendLog; + function creatULSEndpoint() { + try { + return new ULSEndpointProxy(); + } + catch (e) { + return null; + } + } + var ULSEndpointProxy = (function () { + function ULSEndpointProxy() { + } + ULSEndpointProxy.prototype.writeLog = function (log) { + }; + ULSEndpointProxy.prototype.loadProxyFrame = function () { + }; + return ULSEndpointProxy; + }()); + if (!OSF.Logger) { + OSF.Logger = Logger; + } + Logger.ulsEndpoint = creatULSEndpoint(); +})(Logger || (Logger = {})); +var OSFAriaLogger; +(function (OSFAriaLogger) { + var TelemetryEventAppActivated = { name: "AppActivated", enabled: true, critical: true, points: [ + { name: "Browser", type: "string" }, + { name: "Message", type: "string" }, + { name: "Host", type: "string" }, + { name: "AppSizeWidth", type: "int64" }, + { name: "AppSizeHeight", type: "int64" }, + { name: "IsFromWacAutomation", type: "string" }, + { name: "IsMOS", type: "int64" }, + ] }; + var TelemetryEventScriptLoad = { name: "ScriptLoad", enabled: true, critical: false, points: [ + { name: "ScriptId", type: "string" }, + { name: "StartTime", type: "double" }, + { name: "ResponseTime", type: "double" }, + ] }; + var enableAPIUsage = shouldAPIUsageBeEnabled(); + var TelemetryEventApiUsage = { name: "APIUsage", enabled: enableAPIUsage, critical: false, points: [ + { name: "APIType", type: "string" }, + { name: "APIID", type: "int64" }, + { name: "Parameters", type: "string" }, + { name: "ResponseTime", type: "int64" }, + { name: "ErrorType", type: "int64" }, + ] }; + var TelemetryEventAppInitialization = { name: "AppInitialization", enabled: true, critical: false, points: [ + { name: "SuccessCode", type: "int64" }, + { name: "Message", type: "string" }, + ] }; + var TelemetryEventAppClosed = { name: "AppClosed", enabled: true, critical: false, points: [ + { name: "FocusTime", type: "int64" }, + { name: "AppSizeFinalWidth", type: "int64" }, + { name: "AppSizeFinalHeight", type: "int64" }, + { name: "OpenTime", type: "int64" }, + ] }; + var TelemetryEventCheckWACHost = { name: "CheckWACHost", enabled: true, critical: false, points: [ + { name: "isWacKnownHost", type: "int64" }, + { name: "solutionId", type: "string" }, + { name: "hostType", type: "string" }, + { name: "hostPlatform", type: "string" }, + { name: "correlationId", type: "string" }, + { name: "isLocalStorageAvailable", type: "boolean" }, + ] }; + var TelemetryEvents = [ + TelemetryEventAppActivated, + TelemetryEventScriptLoad, + TelemetryEventApiUsage, + TelemetryEventAppInitialization, + TelemetryEventAppClosed, + TelemetryEventCheckWACHost, + ]; + function createDataField(value, point) { + var key = point.rename === undefined ? point.name : point.rename; + var type = point.type; + var field = undefined; + switch (type) { + case "string": + field = oteljs.makeStringDataField(key, value); + break; + case "double": + if (typeof value === "string") { + value = parseFloat(value); + } + field = oteljs.makeDoubleDataField(key, value); + break; + case "int64": + if (typeof value === "string") { + value = parseInt(value); + } + field = oteljs.makeInt64DataField(key, value); + break; + case "boolean": + if (typeof value === "string") { + value = value === "true"; + } + field = oteljs.makeBooleanDataField(key, value); + break; + } + return field; + } + function getEventDefinition(eventName) { + for (var _i = 0, TelemetryEvents_1 = TelemetryEvents; _i < TelemetryEvents_1.length; _i++) { + var event_1 = TelemetryEvents_1[_i]; + if (event_1.name === eventName) { + return event_1; + } + } + return undefined; + } + function eventEnabled(eventName) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return false; + } + return eventDefinition.enabled; + } + function shouldAPIUsageBeEnabled() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function generateTelemetryEvent(eventName, telemetryData) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return undefined; + } + var dataFields = []; + for (var _i = 0, _a = eventDefinition.points; _i < _a.length; _i++) { + var point = _a[_i]; + var key = point.name; + var value = telemetryData[key]; + if (value === undefined) { + continue; + } + var field = createDataField(value, point); + if (field !== undefined) { + dataFields.push(field); + } + } + var flags = { dataCategories: oteljs.DataCategories.ProductServiceUsage }; + if (eventDefinition.critical) { + flags.samplingPolicy = oteljs.SamplingPolicy.CriticalBusinessImpact; + } + flags.diagnosticLevel = oteljs.DiagnosticLevel.NecessaryServiceDataEvent; + var eventNameFull = "Office.Extensibility.OfficeJs." + eventName + "X"; + var event = { eventName: eventNameFull, dataFields: dataFields, eventFlags: flags }; + return event; + } + function sendOtelTelemetryEvent(eventName, telemetryData) { + if (eventEnabled(eventName)) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var event = generateTelemetryEvent(eventName, telemetryData); + if (event === undefined) { + return; + } + Microsoft.Office.WebExtension.sendTelemetryEvent(event); + }); + } + } + } + var AriaLogger = (function () { + function AriaLogger() { + } + AriaLogger.prototype.getAriaCDNLocation = function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "ariatelemetry/aria-web-telemetry.js"); + }; + AriaLogger.getInstance = function () { + if (AriaLogger.AriaLoggerObj === undefined) { + AriaLogger.AriaLoggerObj = new AriaLogger(); + } + return AriaLogger.AriaLoggerObj; + }; + AriaLogger.prototype.isIUsageData = function (arg) { + return arg["Fields"] !== undefined; + }; + AriaLogger.prototype.shouldSendDirectToAria = function (flavor, version) { + var BASE10 = 10; + var MAX_VERSION_WIN32 = [16, 0, 11601]; + var MAX_VERSION_MAC = [16, 28]; + var max_version; + if (!flavor) { + return false; + } + else if (flavor.toLowerCase() === "win32") { + max_version = MAX_VERSION_WIN32; + } + else if (flavor.toLowerCase() === "mac") { + max_version = MAX_VERSION_MAC; + } + else { + return true; + } + if (!version) { + return false; + } + var versionTokens = version.split('.'); + for (var i = 0; i < max_version.length && i < versionTokens.length; i++) { + var versionToken = parseInt(versionTokens[i], BASE10); + if (isNaN(versionToken)) { + return false; + } + if (versionToken < max_version[i]) { + return true; + } + if (versionToken > max_version[i]) { + return false; + } + } + return false; + }; + AriaLogger.prototype.isDirectToAriaEnabled = function () { + if (this.EnableDirectToAria === undefined || this.EnableDirectToAria === null) { + var flavor = void 0; + var version = void 0; + if (OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo) { + flavor = OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]; + } + if (window.external && typeof window.external.GetContext !== "undefined" && typeof window.external.GetContext().GetHostFullVersion !== "undefined") { + version = window.external.GetContext().GetHostFullVersion(); + } + this.EnableDirectToAria = this.shouldSendDirectToAria(flavor, version); + } + return this.EnableDirectToAria; + }; + AriaLogger.prototype.sendTelemetry = function (tableName, telemetryData) { + var startAfterMs = 1000; + var sendAriaEnabled = AriaLogger.EnableSendingTelemetryWithLegacyAria && this.isDirectToAriaEnabled(); + if (sendAriaEnabled) { + OSF.OUtil.loadScript(this.getAriaCDNLocation(), function () { + try { + if (!this.ALogger) { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); + } + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for (var key in telemetryData) { + if (key.toLowerCase() !== "table") { + eventProperties.setProperty(key, telemetryData[key]); + } + } + var today = new Date(); + eventProperties.setProperty("Date", today.toISOString()); + this.ALogger.logEvent(eventProperties); + } + catch (e) { + } + }, startAfterMs); + } + if (AriaLogger.EnableSendingTelemetryWithOTel) { + sendOtelTelemetryEvent(tableName, telemetryData); + } + }; + AriaLogger.prototype.logData = function (data) { + if (this.isIUsageData(data)) { + this.sendTelemetry(data["Table"], data["Fields"]); + } + else { + this.sendTelemetry(data["Table"], data); + } + }; + AriaLogger.EnableSendingTelemetryWithOTel = true; + AriaLogger.EnableSendingTelemetryWithLegacyAria = false; + return AriaLogger; + }()); + OSFAriaLogger.AriaLogger = AriaLogger; +})(OSFAriaLogger || (OSFAriaLogger = {})); +var OSFAppTelemetry; +(function (OSFAppTelemetry) { + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + var privateAddinId = "PRIVATE"; + OSFAppTelemetry.enableTelemetry = true; + ; + var AppInfo = (function () { + function AppInfo() { + } + return AppInfo; + }()); + OSFAppTelemetry.AppInfo = AppInfo; + var Event = (function () { + function Event(name, handler) { + this.name = name; + this.handler = handler; + } + return Event; + }()); + var AppStorage = (function () { + function AppStorage() { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set"; + } + AppStorage.prototype.getClientId = function () { + var clientId = this.getValue(this.clientIDKey); + if (!clientId || clientId.length <= 0 || clientId.length > 40) { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey, clientId); + } + return clientId; + }; + AppStorage.prototype.saveLog = function (logId, log) { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = ((logIdSet && logIdSet.length > 0) ? (logIdSet + ";") : "") + logId; + this.setValue(this.logIdSetKey, logIdSet); + this.setValue(logId, log); + }; + AppStorage.prototype.enumerateLog = function (callback, clean) { + var logIdSet = this.getValue(this.logIdSetKey); + if (logIdSet) { + var ids = logIdSet.split(";"); + for (var id in ids) { + var logId = ids[id]; + var log = this.getValue(logId); + if (log) { + if (callback) { + callback(logId, log); + } + if (clean) { + this.remove(logId); + } + } + } + if (clean) { + this.remove(this.logIdSetKey); + } + } + }; + AppStorage.prototype.getValue = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if (osfLocalStorage) { + value = osfLocalStorage.getItem(key); + } + return value; + }; + AppStorage.prototype.setValue = function (key, value) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + osfLocalStorage.setItem(key, value); + } + }; + AppStorage.prototype.remove = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + try { + osfLocalStorage.removeItem(key); + } + catch (ex) { + } + } + }; + return AppStorage; + }()); + var AppLogger = (function () { + function AppLogger() { + } + AppLogger.prototype.LogData = function (data) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } + }; + AppLogger.prototype.LogRawData = function (log) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); + } + catch (e) { + } + }; + return AppLogger; + }()); + function trimStringToLowerCase(input) { + if (input) { + input = input.replace(/[{}]/g, "").toLowerCase(); + } + return (input || ""); + } + function initialize(context) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + if (appInfo) { + return; + } + appInfo = new AppInfo(); + if (context.get_hostFullVersion()) { + appInfo.hostVersion = context.get_hostFullVersion(); + } + else { + appInfo.hostVersion = context.get_appVersion(); + } + appInfo.appId = canSendAddinId() ? context.get_id() : privateAddinId; + appInfo.marketplaceType = context._marketplaceType; + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage()).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if (appInfo.appInstanceId) { + appInfo.appInstanceId = trimStringToLowerCase(appInfo.appInstanceId); + appInfo.appInstanceId = getCompliantAppInstanceId(context.get_id(), appInfo.appInstanceId); + } + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "0.0.0.0"; + if (context._wacHostEnvironment) { + appInfo.wacHostEnvironment = context._wacHostEnvironment; + } + if (context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) { + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + } + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if (url) { + url = url.split("?")[0].split("#")[0]; + } + appInfo.isMos = isMos(); + appInfo.appURL = ""; + (function getUserIdAndAssetIdFromToken(token, appInfo) { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try { + xmlContent = decodeURIComponent(token); + parser = new DOMParser(); + xmlDoc = parser.parseFromString(xmlContent, "text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if (cidNode && cidNode.nodeValue) { + appInfo.userId = cidNode.nodeValue; + } + else if (oidNode && oidNode.nodeValue) { + appInfo.userId = oidNode.nodeValue; + } + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue; + } + catch (e) { + } + finally { + xmlContent = null; + xmlDoc = null; + parser = null; + } + })(context.get_eToken(), appInfo); + appInfo.sessionId = sessionId; + if (typeof OTel !== "undefined") { + OTel.OTelLogger.initialize(appInfo); + } + (function handleLifecycle() { + var startTime = new Date(); + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function () { + if (document.hasFocus()) { + if (lastFocus == null) { + lastFocus = new Date(); + } + } + else if (lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + }; + var eventList = []; + eventList.push(new Event("focus", adjustFocusTime)); + eventList.push(new Event("blur", adjustFocusTime)); + eventList.push(new Event("focusout", adjustFocusTime)); + eventList.push(new Event("focusin", adjustFocusTime)); + var exitFunction = function () { + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.removeEventListener(window, eventList[i].name, eventList[i].handler); + } + eventList.length = 0; + if (!finished) { + if (document.hasFocus() && lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date()).getTime() - startTime.getTime()), focusTime); + finished = true; + } + }; + eventList.push(new Event("beforeunload", exitFunction)); + eventList.push(new Event("unload", exitFunction)); + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.addEventListener(window, eventList[i].name, eventList[i].handler); + } + adjustFocusTime(); + })(); + OSFAppTelemetry.onAppActivated(); + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() { + if (!appInfo) { + return; + } + (new AppStorage()).enumerateLog(function (id, log) { return (new AppLogger()).LogRawData(log); }, true); + var data = new OSFLog.AppActivatedUsageData(); + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = ""; + data.UserId = ""; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if (appInfo.wacHostEnvironment) { + data.WacHostEnvironment = appInfo.wacHostEnvironment; + } + if (appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) { + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + } + data.IsMOS = appInfo.isMos ? 1 : 0; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) { + var data = new OSFLog.ScriptLoadUsageData(); + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) { + if (!appInfo) { + return; + } + if (!isAllowedHost() || !isAPIUsageEnabledDispId(id, apiType)) { + return; + } + var data = new OSFLog.APIUsageUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCallDone = onCallDone; + ; + function onMethodDone(id, args, msResponseTime, errorType) { + var parameters = null; + if (args) { + if (typeof args == "number") { + parameters = String(args); + } + else if (typeof args === "object") { + for (var index in args) { + if (parameters !== null) { + parameters += ","; + } + else { + parameters = ""; + } + if (typeof args[index] == "number") { + parameters += String(args[index]); + } + } + } + else { + parameters = ""; + } + } + OSF.AppTelemetry.onCallDone("method", id, parameters, msResponseTime, errorType); + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) { + OSF.AppTelemetry.onCallDone("property", -1, propertyName, msResponseTime); + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onCheckWACHost(isWacKnownHost, instanceId, hostType, hostPlatform, wacDomain, isLocalStorageAvailable) { + var data = new OSFLog.CheckWACHostUsageData(); + data.isWacKnownHost = isWacKnownHost; + data.instanceId = instanceId; + data.hostType = hostType; + data.hostPlatform = hostPlatform; + data.isLocalStorageAvailable = isLocalStorageAvailable; + data.wacDomain = ""; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCheckWACHost = onCheckWACHost; + function onEventDone(id, errorType) { + OSF.AppTelemetry.onCallDone("event", id, null, 0, errorType); + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent", id, null, msResponseTime, errorType); + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) { + if (!appInfo) { + return; + } + var data = new OSFLog.AppClosedUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage()).saveLog(sessionId, data.SerializeRow()); + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId); + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) { + var data = new OSFLog.AppInitializationUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) { + doAppInitializationLogging(false, message); + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) { + doAppInitializationLogging(true, errorMessage); + } + OSFAppTelemetry.logAppException = logAppException; + function isAllowedHost() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function isAPIUsageEnabledDispId(dispId, apiType) { + if (apiType === "method") { + switch (dispId) { + case 4: + case 38: + case 37: + case 10: + case 12: + case -10: + return true; + default: + return false; + } + } + return false; + } + function canSendAddinId() { + var isPublic = (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.PublicAddin) != 0; + if (isPublic) { + return isPublic; + } + if (!appInfo) { + return false; + } + var hostPlatform = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + var hostVersion = appInfo.hostVersion; + return _isComplianceExceptedHost(hostPlatform, hostVersion); + } + OSFAppTelemetry.canSendAddinId = canSendAddinId; + function getCompliantAppInstanceId(addinId, appInstanceId) { + if (!canSendAddinId() && appInstanceId === addinId) { + return privateAddinId; + } + return appInstanceId; + } + OSFAppTelemetry.getCompliantAppInstanceId = getCompliantAppInstanceId; + function _isComplianceExceptedHost(hostPlatform, hostVersion) { + var excepted = false; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(hostVersion); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (hostPlatform == "win32") { + if (major < 16 || major == 16 && build < 14225) { + excepted = true; + } + } + else if (hostPlatform == "mac") { + if (major < 16 || (major == 16 && (minor < 52 || minor == 52 && build < 808))) { + excepted = true; + } + } + } + return excepted; + } + OSFAppTelemetry._isComplianceExceptedHost = _isComplianceExceptedHost; + function isMos() { + return (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.IsMos) != 0; + } + OSFAppTelemetry.isMos = isMos; + OSF.AppTelemetry = OSFAppTelemetry; +})(OSFAppTelemetry || (OSFAppTelemetry = {})); +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + OSF.DDA.RichApi.richApiMessageManager = new OfficeExt.RichApiMessageManager(); + appReady(); +}; +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync, + requiredArguments: [ + { + name: Microsoft.Office.WebExtension.Parameters.Data, + types: ["object"] + } + ], + supportedOptions: [] +}); +OSF.OUtil.setNamespace("RichApi", OSF.DDA); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.ArrayData } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.Data } + ] +}); +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } + } +}; +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() { + var events = []; + for (var eventName in this._eventHandlers) + events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); + return events; + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) { + for (var eventName in this._eventHandlers) { + if (event == eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event == eventName) + return true; + } + return false; + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) + return true; + } + } + return false; + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._eventHandlers[eventType]; + if (handlers && !this.hasEventHandler(eventType, handler)) { + handlers.push(handler); + return true; + } + else { + return false; + } + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true; + } + return false; + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType, handler); + if (isFirstHandler && succeed) { + this.fireQueuedEvent(eventType); + } + return succeed; + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var index = 0; index < handlers.length; index++) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + return true; + } + } + } + return false; + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { + if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { + this._eventHandlers[eventType] = []; + return true; + } + return false; + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) { + this._objectEventHandlers[eventType][objectId] = []; + return true; + } + return false; + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } + return true; + } + else { + return false; + } + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if (_handlers != null) { + for (var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length == 0) { + queuedEvents.push(eventArgs); + } + else { + this.fireEvent(eventArgs); + } + return true; + } + else { + return false; + } + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length > 0) { + var eventHandler = eventHandlers[0]; + while (queuedEvents.length > 0) { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs); + } + return true; + } + } + return false; + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var queuedEvents = this._queuedEventsArgs[eventType]; + if (queuedEvents) { + this._queuedEventsArgs[eventType] = []; + } + } + } +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { + var args; + switch (eventType) { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties, target.document), eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties, target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" && OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + OSF.DDA.convertOlkAppointmentTimeToDateFormat(args); + } + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecurrenceChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecurrenceChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AttachmentsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAttachmentsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.InfobarClicked: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkInfobarClickedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSelectedItemsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSensitivityLabelChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + return args; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + "types": ["function", "object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { RichApiMessage: "richApiMessage" }); +OSF.DDA.RichApiMessageEventArgs = function OSF_DDA_RichApiMessageEventArgs(eventType, eventProperties) { + var entryArray = eventProperties[Microsoft.Office.WebExtension.Parameters.Data]; + var entries = []; + if (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var elem = entryArray[i]; + if (elem.toArray) { + elem = elem.toArray(); + } + entries.push({ + messageCategory: elem[0], + messageType: elem[1], + targetId: elem[2], + message: elem[3], + id: elem[4], + isRemoteOverride: elem[5] + }); + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: Microsoft.Office.WebExtension.EventType.RichApiMessage }, + "entries": { value: entries } + }); +}; +(function (OfficeExt) { + var RichApiMessageManager = (function () { + function RichApiMessageManager() { + this._eventDispatch = null; + this._registerHandlers = []; + this._eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.RichApiMessage, + ]); + OSF.DDA.DispIdHost.addEventSupport(this, this._eventDispatch); + } + RichApiMessageManager.prototype.register = function (handler) { + var _this = this; + if (!this._registerWithHostPromise) { + this._registerWithHostPromise = new Office.Promise(function (resolve, reject) { + _this.addHandlerAsync(Microsoft.Office.WebExtension.EventType.RichApiMessage, function (args) { + _this._registerHandlers.forEach(function (value) { + if (value) { + value(args); + } + }); + }, function (asyncResult) { + if (asyncResult.status == 'failed') { + reject(asyncResult.error); + } + else { + resolve(); + } + }); + }); + } + return this._registerWithHostPromise.then(function () { + _this._registerHandlers.push(handler); + }); + }; + return RichApiMessageManager; + }()); + OfficeExt.RichApiMessageManager = RichApiMessageManager; +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidRichApiMessageEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.ArrayData } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.ArrayData } + ] +}); +OSF.DialogShownStatus = { hasDialogShown: false, isWindowDialog: false }; +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogMessageReceivedEvent: "DialogMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + MessageType: "messageType", + MessageContent: "messageContent", + MessageOrigin: "messageOrigin" +}); +OSF.DDA.DialogEventType = {}; +OSF.OUtil.augmentList(OSF.DDA.DialogEventType, { + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" +}); +OSF.DDA.AsyncMethodNames.addNames({ + DisplayDialogAsync: "displayDialogAsync", + DisplayModalDialogAsync: "displayModalDialogAsync", + CloseAsync: "close" +}); +OSF.DDA.SyncMethodNames.addNames({ + MessageParent: "messageParent", + MessageChild: "messageChild", + SendMessage: "sendMessage", + AddMessageHandler: "addEventHandler" +}); +OSF.DDA.UI.ParentUI = function OSF_DDA_ParentUI() { + var eventDispatch; + if (Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived != null) { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived, + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + ]); + } + else { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived + ]); + } + var target = this; + var defineDialogApi = function (apiName, isModalApi) { + if (!target[apiName]) { + OSF.OUtil.defineEnumerableProperty(target, apiName, { + value: function () { + var openDialog = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments, eventDispatch, target, isModalApi); + } + }); + } + }; + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName, false); + if (Microsoft.Office.WebExtension.FeatureGates["ModalWebDialogAPI"]) { + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName, true); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DDA.UI.ChildUI = function OSF_DDA_ChildUI(isPopupWindow) { + var messageParentName = OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target = this; + if (!target[messageParentName]) { + OSF.OUtil.defineEnumerableProperty(target, messageParentName, { + value: function () { + var messageParent = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments, target); + } + }); + } + var addEventHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if (!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch != "undefined") { + OSF.DDA.DispIdHost.addEventSupport(target, OSF.DialogParentMessageEventDispatch, isPopupWindow); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DialogHandler = function OSF_DialogHandler() { }; +OSF.DDA.DialogEventArgs = function OSF_DDA_DialogEventArgs(message) { + if (message[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogMessageReceived) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); + } + else { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogEventReceived + }, + "error": { + value: message[OSF.DDA.PropertyDescriptors.MessageType] + } + }); + } +}; +OSF.DDA.DialogParentEventArgs = function OSF_DDA_DialogParentEventArgs(message) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); +}; +var DialogApiManager = (function () { + function DialogApiManager() { + } + DialogApiManager.defineApi = function (apiName, supportedOptions) { + var asyncMethodCalls = OSF.DDA.AsyncMethodCalls; + asyncMethodCalls.define({ + method: apiName, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: supportedOptions, + privateStateCallbacks: [], + onSucceeded: function (args, caller, callArgs) { + var targetId = args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch = args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog = new OSF.DialogHandler(); + var closeDialog = OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, closeDialog, { + value: function () { + var closeDialogfunction = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments, targetId, eventDispatch, dialog); + } + }); + var addHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, addHandler, { + value: function () { + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(arguments, dialog, eventDispatch); + var eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType, handler); + } + }); + if (OSF.DDA.UI.EnableSendMessageDialogAPI === true) { + var sendMessage = OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, sendMessage, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var messageChild = OSF.DDA.SyncMethodNames.MessageChild.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, messageChild, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + return dialog; + }, + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs] = true; + } + return callArgs; + } + }); + }; + DialogApiManager.messageChildRichApiBridge = function () { + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, null, null); + } + }; + DialogApiManager.initOnce = function () { + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync, DialogApiManager.displayDialogAsyncApiSupportedOptions); + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync, DialogApiManager.displayModalDialogAsyncApiSupportedOptions); + }; + DialogApiManager.displayDialogAsyncApiSupportedOptions = [ + { + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.EnforceAppDomain, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]; + DialogApiManager.displayModalDialogAsyncApiSupportedOptions = DialogApiManager.displayDialogAsyncApiSupportedOptions.concat([ + { + name: "abortWhenParentIsMinimized", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: "abortWhenDocIsInactive", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]); + return DialogApiManager; +}()); +DialogApiManager.initOnce(); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageToParent, + "types": ["string", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageContent, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + privateStateCallbacks: [] +}); +OSF.OUtil.setNamespace("Marshaling", OSF.DDA); +OSF.OUtil.setNamespace("Dialog", OSF.DDA.Marshaling); +OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys = { + MessageType: "messageType", + MessageContent: "messageContent", + MessageOrigin: "messageOrigin", + TargetOrigin: "targetOrigin" +}; +OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys = { + MessageType: "messageType", + MessageContent: "messageContent", + MessageOrigin: "messageOrigin", + TargetOrigin: "targetOrigin" +}; +OSF.DDA.Marshaling.MessageParentKeys = { + MessageToParent: "messageToParent", + TargetOrigin: "targetOrigin" +}; +OSF.DDA.Marshaling.DialogNotificationShownEventType = { + DialogNotificationShown: "dialogNotificationShown" +}; +OSF.DDA.Marshaling.SendMessageKeys = { + MessageContent: "messageContent", + TargetOrigin: "targetOrigin" +}; +(function (OfficeExt) { + var WacCommonUICssManager; + (function (WacCommonUICssManager) { + var hostType = { + Excel: "excel", + Word: "word", + PowerPoint: "powerpoint", + Outlook: "outlook", + Visio: "visio" + }; + function getDialogCssManager(applicationHostType) { + switch (applicationHostType) { + case hostType.Excel: + case hostType.Word: + case hostType.PowerPoint: + case hostType.Outlook: + case hostType.Visio: + return new DefaultDialogCSSManager(); + default: + return new DefaultDialogCSSManager(); + } + return null; + } + WacCommonUICssManager.getDialogCssManager = getDialogCssManager; + var DefaultDialogCSSManager = (function () { + function DefaultDialogCSSManager() { + this.overlayElementCSS = [ + "position: absolute", + "top: 0", + "left: 0", + "width: 100%", + "height: 100%", + "background-color: rgba(198, 198, 198, 0.5)", + "z-index: 99998" + ]; + this.dialogNotificationPanelCSS = [ + "width: 100%", + "height: 190px", + "position: absolute", + "z-index: 99999", + "background-color: rgba(255, 255, 255, 1)", + "left: 0px", + "top: 50%", + "margin-top: -95px" + ]; + this.newWindowNotificationTextPanelCSS = [ + "margin: 20px 14px", + "font-family: Segoe UI,Arial,Verdana,sans-serif", + "font-size: 14px", + "height: 100px", + "line-height: 100px" + ]; + this.newWindowNotificationTextSpanCSS = [ + "display: inline-block", + "line-height: normal", + "vertical-align: middle" + ]; + this.crossZoneNotificationTextPanelCSS = [ + "margin: 20px 14px", + "font-family: Segoe UI,Arial,Verdana,sans-serif", + "font-size: 14px", + "height: 100px", + ]; + this.dialogNotificationButtonPanelCSS = "margin:0px 9px"; + this.buttonStyleCSS = [ + "text-align: center", + "width: 70px", + "height: 25px", + "font-size: 14px", + "font-family: Segoe UI,Arial,Verdana,sans-serif", + "margin: 0px 5px", + "border-width: 1px", + "border-style: solid" + ]; + } + DefaultDialogCSSManager.prototype.getOverlayElementCSS = function () { + return this.overlayElementCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getDialogNotificationPanelCSS = function () { + return this.dialogNotificationPanelCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getNewWindowNotificationTextPanelCSS = function () { + return this.newWindowNotificationTextPanelCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getNewWindowNotificationTextSpanCSS = function () { + return this.newWindowNotificationTextSpanCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getCrossZoneNotificationTextPanelCSS = function () { + return this.crossZoneNotificationTextPanelCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getDialogNotificationButtonPanelCSS = function () { + return this.dialogNotificationButtonPanelCSS; + }; + DefaultDialogCSSManager.prototype.getDialogButtonCSS = function () { + return this.buttonStyleCSS.join(";"); + }; + return DefaultDialogCSSManager; + }()); + WacCommonUICssManager.DefaultDialogCSSManager = DefaultDialogCSSManager; + })(WacCommonUICssManager = OfficeExt.WacCommonUICssManager || (OfficeExt.WacCommonUICssManager = {})); +})(OfficeExt || (OfficeExt = {})); +(function (OfficeExt) { + var AddinNativeAction; + (function (AddinNativeAction) { + var Dialog; + (function (Dialog) { + var windowInstance = null; + var handler = null; + var overlayElement = null; + var dialogNotificationPanel = null; + var closeDialogKey = "osfDialogInternal:action=closeDialog"; + var showDialogCallback = null; + var hasCrossZoneNotification = false; + var checkWindowDialogCloseInterval = -1; + var messageParentKey = "messageParentKey"; + var hostThemeButtonStyle = null; + var commonButtonBorderColor = "#ababab"; + var commonButtonBackgroundColor = "#ffffff"; + var commonEventInButtonBackgroundColor = "#ccc"; + var newWindowNotificationId = "newWindowNotificaiton"; + var crossZoneNotificationId = "crossZoneNotification"; + var configureBrowserLinkId = "configureBrowserLink"; + var dialogNotificationTextPanelId = "dialogNotificationTextPanel"; + var shouldUseLocalStorageToPassMessage = OfficeExt.WACUtils.shouldUseLocalStorageToPassMessage(); + var registerDialogNotificationShownArgs = { + "dispId": OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent, + "eventType": OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown, + "onComplete": null, + "onCalling": null + }; + function setHostThemeButtonStyle(args) { + var hostThemeButtonStyleArgs = args.input; + if (hostThemeButtonStyleArgs != null) { + hostThemeButtonStyle = { + HostButtonBorderColor: hostThemeButtonStyleArgs[OSF.HostThemeButtonStyleKeys.ButtonBorderColor], + HostButtonBackgroundColor: hostThemeButtonStyleArgs[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor] + }; + } + args.completed(); + } + Dialog.setHostThemeButtonStyle = setHostThemeButtonStyle; + function removeEventListenersForDialog(args) { + OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(false); + args.completed(); + } + Dialog.removeEventListenersForDialog = removeEventListenersForDialog; + function handleNewWindowDialog(dialogInfo) { + try { + if (!checkAppDomain(dialogInfo)) { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains); + return; + } + if (!dialogInfo[OSF.ShowWindowDialogParameterKeys.PromptBeforeOpen]) { + showDialog(dialogInfo); + return; + } + hasCrossZoneNotification = false; + var ignoreButtonKeyDownClick = false; + var hostInfoObj = OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; + var dialogCssManager = OfficeExt.WacCommonUICssManager.getDialogCssManager(hostInfoObj.hostType); + var notificationText = OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification, OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName); + overlayElement = createOverlayElement(dialogCssManager); + document.body.insertBefore(overlayElement, document.body.firstChild); + dialogNotificationPanel = createNotificationPanel(dialogCssManager, notificationText); + dialogNotificationPanel.id = newWindowNotificationId; + var dialogNotificationButtonPanel = createButtonPanel(dialogCssManager); + var allowButton = createButtonControl(dialogCssManager, Strings.OfficeOM.L_ShowWindowDialogNotificationAllow); + var ignoreButton = createButtonControl(dialogCssManager, Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore); + dialogNotificationButtonPanel.appendChild(allowButton); + dialogNotificationButtonPanel.appendChild(ignoreButton); + dialogNotificationPanel.appendChild(dialogNotificationButtonPanel); + document.body.insertBefore(dialogNotificationPanel, document.body.firstChild); + allowButton.onclick = function (event) { + showDialog(dialogInfo); + if (!hasCrossZoneNotification) { + dismissDialogNotification(); + } + event.preventDefault(); + event.stopPropagation(); + }; + function ignoreButtonClickEventHandler(event) { + function unregisterDialogNotificationShownEventCallback(status) { + removeDialogNotificationElement(); + setFocusOnFirstElement(status); + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore); + } + registerDialogNotificationShownArgs.onCalling = unregisterDialogNotificationShownEventCallback; + OSF.DDA.WAC.Delegate.unregisterEventAsync(registerDialogNotificationShownArgs); + event.preventDefault(); + event.stopPropagation(); + } + ignoreButton.onclick = ignoreButtonClickEventHandler; + allowButton.addEventListener("keydown", function (event) { + if (event.shiftKey && event.keyCode == 9) { + handleButtonControlEventOut(allowButton); + handleButtonControlEventIn(ignoreButton); + ignoreButton.focus(); + event.preventDefault(); + event.stopPropagation(); + } + }, false); + ignoreButton.addEventListener("keydown", function (event) { + if (!event.shiftKey && event.keyCode == 9) { + handleButtonControlEventOut(ignoreButton); + handleButtonControlEventIn(allowButton); + allowButton.focus(); + event.preventDefault(); + event.stopPropagation(); + } + else if (event.keyCode == 13) { + ignoreButtonKeyDownClick = true; + event.preventDefault(); + event.stopPropagation(); + } + }, false); + ignoreButton.addEventListener("keyup", function (event) { + if (event.keyCode == 13 && ignoreButtonKeyDownClick) { + ignoreButtonKeyDownClick = false; + ignoreButtonClickEventHandler(event); + } + }, false); + window.focus(); + function registerDialogNotificationShownEventCallback(status) { + allowButton.focus(); + } + registerDialogNotificationShownArgs.onCalling = registerDialogNotificationShownEventCallback; + OSF.DDA.WAC.Delegate.registerEventAsync(registerDialogNotificationShownArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at new window dialog." + e); + } + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + } + Dialog.handleNewWindowDialog = handleNewWindowDialog; + function closeDialog(callback) { + try { + if (windowInstance != null) { + var appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + if (appDomains) { + for (var i = 0; i < appDomains.length && appDomains[i].indexOf("://") !== -1; i++) { + windowInstance.postMessage(closeDialogKey, appDomains[i]); + } + } + if (windowInstance != null && !windowInstance.closed) { + windowInstance.close(); + } + if (shouldUseLocalStorageToPassMessage) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } + window.clearInterval(checkWindowDialogCloseInterval); + windowInstance = null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at close window dialog." + e); + } + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + } + Dialog.closeDialog = closeDialog; + function messageParent(params) { + var message = params.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + var targetOrigin = params.hostCallArgs[Microsoft.Office.WebExtension.Parameters.TargetOrigin] || null; + if (!targetOrigin) { + var currentOrigin = window.location.origin; + if (!currentOrigin) { + currentOrigin = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + targetOrigin = currentOrigin; + } + if (shouldUseLocalStorageToPassMessage) { + try { + var messageKey = OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id + messageParentKey; + window.localStorage.setItem(messageKey, message); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during messageParent method:" + e); + } + } + } + else { + window.opener.postMessage(message, targetOrigin); + } + } + Dialog.messageParent = messageParent; + function sendMessage(params) { + if (windowInstance != null) { + var message = params.hostCallArgs; + var targetOrigin = message[Microsoft.Office.WebExtension.Parameters.TargetOrigin] || null; + delete message[Microsoft.Office.WebExtension.Parameters.TargetOrigin]; + if (!targetOrigin) { + var currentOrigin = window.location.origin; + if (!currentOrigin) { + currentOrigin = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + targetOrigin = currentOrigin; + } + if (typeof message != "string") { + message = JSON.stringify(message); + } + windowInstance.postMessage(message, targetOrigin); + } + } + Dialog.sendMessage = sendMessage; + function registerMessageReceivedEvent() { + function receiveCloseDialogMessage(event) { + if (event.source == window.opener) { + if (typeof event.data === "string" && event.data.indexOf(closeDialogKey) > -1) { + window.close(); + } + else { + var rawMessage = event.data, type = typeof rawMessage; + if (rawMessage && (type == "object" || type == "string")) { + var parsedMessage = (type == "string") ? JSON.parse(rawMessage) : rawMessage; + var message = {}; + message[OSF.DDA.PropertyDescriptors.MessageContent] = parsedMessage.messageContent; + message[OSF.DDA.PropertyDescriptors.MessageOrigin] = event.origin; + var eventArgs = OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived, null, message); + OSF.DialogParentMessageEventDispatch.fireEvent(eventArgs); + } + } + } + } + window.addEventListener("message", receiveCloseDialogMessage); + } + Dialog.registerMessageReceivedEvent = registerMessageReceivedEvent; + function setHandlerAndShowDialogCallback(onEventHandler, callback) { + handler = onEventHandler; + showDialogCallback = callback; + } + Dialog.setHandlerAndShowDialogCallback = setHandlerAndShowDialogCallback; + function escDismissDialogNotification() { + try { + if (dialogNotificationPanel && (dialogNotificationPanel.id == newWindowNotificationId) && showDialogCallback) { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore); + } + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback." + e); + } + } + dismissDialogNotification(); + } + Dialog.escDismissDialogNotification = escDismissDialogNotification; + function showCrossZoneNotification(windowUrl, hostType) { + var okButtonKeyDownClick = false; + var dialogCssManager = OfficeExt.WacCommonUICssManager.getDialogCssManager(hostType); + overlayElement = createOverlayElement(dialogCssManager); + document.body.insertBefore(overlayElement, document.body.firstChild); + dialogNotificationPanel = createNotificationPanelForCrossZoneIssue(dialogCssManager, windowUrl); + dialogNotificationPanel.id = crossZoneNotificationId; + var dialogNotificationButtonPanel = createButtonPanel(dialogCssManager); + var okButton = createButtonControl(dialogCssManager, Strings.OfficeOM.L_DialogOK ? Strings.OfficeOM.L_DialogOK : "OK"); + dialogNotificationButtonPanel.appendChild(okButton); + dialogNotificationPanel.appendChild(dialogNotificationButtonPanel); + document.body.insertBefore(dialogNotificationPanel, document.body.firstChild); + hasCrossZoneNotification = true; + okButton.onclick = function () { + dismissDialogNotification(); + }; + okButton.addEventListener("keydown", function (event) { + if (event.keyCode == 9) { + document.getElementById(configureBrowserLinkId).focus(); + event.preventDefault(); + event.stopPropagation(); + } + else if (event.keyCode == 13) { + okButtonKeyDownClick = true; + event.preventDefault(); + event.stopPropagation(); + } + }, false); + okButton.addEventListener("keyup", function (event) { + if (event.keyCode == 13 && okButtonKeyDownClick) { + okButtonKeyDownClick = false; + dismissDialogNotification(); + event.preventDefault(); + event.stopPropagation(); + } + }, false); + document.getElementById(configureBrowserLinkId).addEventListener("keydown", function (event) { + if (event.keyCode == 9) { + okButton.focus(); + event.preventDefault(); + event.stopPropagation(); + } + }, false); + window.focus(); + okButton.focus(); + } + Dialog.showCrossZoneNotification = showCrossZoneNotification; + function validateDialogDomain(dialogUrl, taskpaneUrl, allowSubdomains) { + if (allowSubdomains === void 0) { allowSubdomains = true; } + if (!dialogUrl || !taskpaneUrl) { + return false; + } + var httpsIdentifyString = "https:"; + var parsedDialogUrl = OSF.OUtil.parseUrl(dialogUrl); + var parsedTaskpaneUrl = OSF.OUtil.parseUrl(taskpaneUrl); + var appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + var isHttps = parsedDialogUrl.protocol === httpsIdentifyString; + if (!isHttps) { + return false; + } + var isSameDomain = parsedDialogUrl.protocol === parsedTaskpaneUrl.protocol + && parsedDialogUrl.hostname === parsedTaskpaneUrl.hostname + && parsedDialogUrl.port === parsedTaskpaneUrl.port; + var isInAppDomains = Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(appDomains, dialogUrl); + var isTrustedDomain = isSameDomain || isInAppDomains; + if (!isTrustedDomain && allowSubdomains) { + isTrustedDomain = Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(taskpaneUrl, dialogUrl); + } + return isTrustedDomain; + } + function receiveMessage(event) { + if (event.source == windowInstance) { + try { + var dialogOrigin = event.origin; + var taskpaneUrl = OSF._OfficeAppFactory.getInitializationHelper()._appContext._addInSourceUrl; + if (!taskpaneUrl) { + taskpaneUrl = window.location.origin; + if (!taskpaneUrl) { + taskpaneUrl = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + } + var isTrustedDomain = validateDialogDomain(dialogOrigin, taskpaneUrl, true); + if (!isTrustedDomain) { + throw new Error("Received a message from a dialog with an untrusted domain."); + } + var dialogMessageReceivedArgs = {}; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogMessageReceived; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent] = event.data; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin] = dialogOrigin; + handler(dialogMessageReceivedArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during receive message handler." + e); + } + } + } + } + function storageChangedHandler(event) { + var messageKey = OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id + messageParentKey; + if (event.key == messageKey) { + try { + var dialogMessageReceivedArgs = {}; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogMessageReceived; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent] = event.newValue; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin] = event.origin; + handler(dialogMessageReceivedArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during storage changed handler." + e); + } + } + } + } + function checkAppDomain(dialogInfo) { + var appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + var url = dialogInfo[OSF.ShowWindowDialogParameterKeys.Url]; + var fInDomain = Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(appDomains, url); + if (!fInDomain) { + var taskpaneUrl = OSF._OfficeAppFactory.getInitializationHelper()._appContext._addInSourceUrl; + if (!taskpaneUrl) { + taskpaneUrl = window.location.origin; + if (!taskpaneUrl) { + taskpaneUrl = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + } + return taskpaneUrl && Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(taskpaneUrl, url); + } + return fInDomain; + } + function showDialog(dialogInfo) { + var hostInfoObj = OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; + var hostInfoVals = [ + hostInfoObj.hostType, + hostInfoObj.hostPlatform, + hostInfoObj.hostSpecificFileVersion, + hostInfoObj.hostLocale, + hostInfoObj.osfControlAppCorrelationId, + "isDialog", + hostInfoObj.disableLogging ? "disableLogging" : "", + (hostInfoObj.flags & OSF.HostInfoFlags.PublicAddin) + ]; + var hostInfo = hostInfoVals.join("$"); + var appContext = OSF._OfficeAppFactory.getInitializationHelper()._appContext; + appContext._taskpaneUrl = window.location.origin; + if (!appContext._taskpaneUrl) { + appContext._taskpaneUrl = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + var windowUrl = dialogInfo[OSF.ShowWindowDialogParameterKeys.Url]; + if (!dialogInfo[OSF.ShowWindowDialogParameterKeys.UrlNoHostInfo]) { + windowUrl = OfficeExt.WACUtils.addHostInfoAsQueryParam(windowUrl, hostInfo); + } + var windowName = JSON.parse(window.name); + windowName[OSF.WindowNameItemKeys.HostInfo] = hostInfo; + windowName[OSF.WindowNameItemKeys.AppContext] = appContext; + var width = dialogInfo[OSF.ShowWindowDialogParameterKeys.Width] * screen.width / 100; + var height = dialogInfo[OSF.ShowWindowDialogParameterKeys.Height] * screen.height / 100; + var left = appContext._clientWindowWidth / 2 - width / 2; + var top = appContext._clientWindowHeight / 2 - height / 2; + var windowSpecs = "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top + ",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no"; + if (hostInfoObj.hostType === 'outlook' && hostInfoObj.hostPlatform === 'web' && hostInfoObj.flags & OSF.HostInfoFlags.IsMonarch) { + windowInstance = window.open('about:blank?unfiltered', OfficeExt.WACUtils.serializeObjectToString(windowName), windowSpecs); + if (windowInstance) { + windowInstance.location = windowUrl; + } + else { + windowInstance = window.open(windowUrl, OfficeExt.WACUtils.serializeObjectToString(windowName), windowSpecs); + } + } + else { + windowInstance = window.open(windowUrl, OfficeExt.WACUtils.serializeObjectToString(windowName), windowSpecs); + } + if (windowInstance == null) { + OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api."); + removeDialogNotificationElement(); + showCrossZoneNotification(windowUrl, hostInfoObj.hostType); + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone); + return; + } + if (shouldUseLocalStorageToPassMessage) { + window.addEventListener("storage", storageChangedHandler); + } + else { + window.addEventListener("message", receiveMessage); + } + function checkWindowClose() { + try { + if (windowInstance == null || windowInstance.closed) { + window.clearInterval(checkWindowDialogCloseInterval); + if (shouldUseLocalStorageToPassMessage) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } + var dialogClosedArgs = {}; + dialogClosedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogClosed; + handler(dialogClosedArgs); + } + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during check or handle window close." + e); + } + } + } + checkWindowDialogCloseInterval = window.setInterval(checkWindowClose, 1000); + if (showDialogCallback != null) { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("showDialogCallback can not be null."); + } + } + } + function createButtonControl(dialogCssManager, buttonValue) { + var buttonControl = document.createElement("input"); + buttonControl.setAttribute("type", "button"); + buttonControl.style.cssText = dialogCssManager.getDialogButtonCSS(); + buttonControl.style.borderColor = commonButtonBorderColor; + buttonControl.style.backgroundColor = commonButtonBackgroundColor; + buttonControl.setAttribute("value", buttonValue); + var buttonControlEventInHandler = function () { + handleButtonControlEventIn(buttonControl); + }; + var buttonControlEventOutHandler = function () { + handleButtonControlEventOut(buttonControl); + }; + buttonControl.addEventListener("mouseover", buttonControlEventInHandler); + buttonControl.addEventListener("focus", buttonControlEventInHandler); + buttonControl.addEventListener("mouseout", buttonControlEventOutHandler); + buttonControl.addEventListener("focusout", buttonControlEventOutHandler); + return buttonControl; + } + function handleButtonControlEventIn(buttonControl) { + if (hostThemeButtonStyle != null) { + buttonControl.style.borderColor = hostThemeButtonStyle.HostButtonBorderColor; + buttonControl.style.backgroundColor = hostThemeButtonStyle.HostButtonBackgroundColor; + } + else if (OSF.CommonUI && OSF.CommonUI.HostButtonBorderColor && OSF.CommonUI.HostButtonBackgroundColor) { + buttonControl.style.borderColor = OSF.CommonUI.HostButtonBorderColor; + buttonControl.style.backgroundColor = OSF.CommonUI.HostButtonBackgroundColor; + } + else { + buttonControl.style.backgroundColor = commonEventInButtonBackgroundColor; + } + } + function handleButtonControlEventOut(buttonControl) { + buttonControl.style.borderColor = commonButtonBorderColor; + buttonControl.style.backgroundColor = commonButtonBackgroundColor; + } + function dismissDialogNotification() { + function unregisterDialogNotificationShownEventCallback(status) { + removeDialogNotificationElement(); + setFocusOnFirstElement(status); + } + registerDialogNotificationShownArgs.onCalling = unregisterDialogNotificationShownEventCallback; + OSF.DDA.WAC.Delegate.unregisterEventAsync(registerDialogNotificationShownArgs); + } + function removeDialogNotificationElement() { + if (dialogNotificationPanel != null) { + document.body.removeChild(dialogNotificationPanel); + dialogNotificationPanel = null; + } + if (overlayElement != null) { + document.body.removeChild(overlayElement); + overlayElement = null; + } + } + function createOverlayElement(dialogCssManager) { + var overlayElement = document.createElement("div"); + overlayElement.style.cssText = dialogCssManager.getOverlayElementCSS(); + return overlayElement; + } + function createNotificationPanel(dialogCssManager, notificationString) { + var dialogNotificationPanel = document.createElement("div"); + dialogNotificationPanel.style.cssText = dialogCssManager.getDialogNotificationPanelCSS(); + setAttributeForDialogNotificationPanel(dialogNotificationPanel); + var dialogNotificationTextPanel = document.createElement("div"); + dialogNotificationTextPanel.style.cssText = dialogCssManager.getNewWindowNotificationTextPanelCSS(); + dialogNotificationTextPanel.id = dialogNotificationTextPanelId; + if (document.documentElement.getAttribute("dir") == "rtl") { + dialogNotificationTextPanel.style.paddingRight = "30px"; + } + else { + dialogNotificationTextPanel.style.paddingLeft = "30px"; + } + var dialogNotificationTextSpan = document.createElement("span"); + dialogNotificationTextSpan.style.cssText = dialogCssManager.getNewWindowNotificationTextSpanCSS(); + dialogNotificationTextSpan.innerText = notificationString; + dialogNotificationTextPanel.appendChild(dialogNotificationTextSpan); + dialogNotificationPanel.appendChild(dialogNotificationTextPanel); + return dialogNotificationPanel; + } + function createButtonPanel(dialogCssManager) { + var dialogNotificationButtonPanel = document.createElement("div"); + dialogNotificationButtonPanel.style.cssText = dialogCssManager.getDialogNotificationButtonPanelCSS(); + if (document.documentElement.getAttribute("dir") == "rtl") { + dialogNotificationButtonPanel.style.cssFloat = "left"; + } + else { + dialogNotificationButtonPanel.style.cssFloat = "right"; + } + return dialogNotificationButtonPanel; + } + function setFocusOnFirstElement(status) { + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var list = document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements); + OSF.OUtil.focusToFirstTabbable(list, false); + } + } + function createNotificationPanelForCrossZoneIssue(dialogCssManager, windowUrl) { + var dialogNotificationPanel = document.createElement("div"); + dialogNotificationPanel.style.cssText = dialogCssManager.getDialogNotificationPanelCSS(); + setAttributeForDialogNotificationPanel(dialogNotificationPanel); + var dialogNotificationTextPanel = document.createElement("div"); + dialogNotificationTextPanel.style.cssText = dialogCssManager.getCrossZoneNotificationTextPanelCSS(); + dialogNotificationTextPanel.id = dialogNotificationTextPanelId; + var configureBrowserLink = document.createElement("a"); + configureBrowserLink.id = configureBrowserLinkId; + configureBrowserLink.href = "#"; + configureBrowserLink.innerText = Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink; + configureBrowserLink.setAttribute("onclick", "window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"); + var dialogNotificationTextSpan = document.createElement("span"); + if (Strings.OfficeOM.L_NewWindowCrossZone) { + var dialogNotificationText = Strings.OfficeOM.L_NewWindowCrossZone.replace(/{1+}/gm, OfficeExt.WACUtils.getDomainForUrl(windowUrl)); + var dialogNotificationTextParts = dialogNotificationText.split("{0}"); + dialogNotificationTextSpan.appendChild(document.createTextNode(dialogNotificationTextParts[0])); + dialogNotificationTextSpan.appendChild(configureBrowserLink); + dialogNotificationTextSpan.appendChild(document.createTextNode(dialogNotificationTextParts[1])); + } + dialogNotificationTextPanel.appendChild(dialogNotificationTextSpan); + dialogNotificationPanel.appendChild(dialogNotificationTextPanel); + return dialogNotificationPanel; + } + function setAttributeForDialogNotificationPanel(dialogNotificationDiv) { + dialogNotificationDiv.setAttribute("role", "dialog"); + dialogNotificationDiv.setAttribute("aria-describedby", dialogNotificationTextPanelId); + } + })(Dialog = AddinNativeAction.Dialog || (AddinNativeAction.Dialog = {})); + })(AddinNativeAction = OfficeExt.AddinNativeAction || (OfficeExt.AddinNativeAction = {})); +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent }, + { name: OSF.DDA.PropertyDescriptors.MessageOrigin, value: OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent }, + { name: OSF.DDA.PropertyDescriptors.MessageOrigin, value: OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageOrigin } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidMessageParentMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.MessageToParent, value: OSF.DDA.Marshaling.MessageParentKeys.MessageToParent }, + { name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, value: OSF.DDA.Marshaling.MessageParentKeys.TargetOrigin } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSendMessageMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.MessageContent, value: OSF.DDA.Marshaling.SendMessageKeys.MessageContent }, + { name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, value: OSF.DDA.Marshaling.MessageParentKeys.TargetOrigin } + ] +}); +OSF.DDA.WAC.Delegate.openDialog = function OSF_DDA_WAC_Delegate$OpenDialog(args) { + var httpsIdentifyString = "https://"; + var httpIdentifyString = "http://"; + var dialogInfo = JSON.parse(args.targetId); + var callback = OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true, args); + function showDialogCallback(status) { + var payload = { "Error": status }; + try { + callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback." + e); + } + } + } + if (OSF.DialogShownStatus.hasDialogShown) { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); + return; + } + var dialogUrl = dialogInfo[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(); + var taskpaneUrl = (window.location.href).toLowerCase(); + if (OSF.AppTelemetry) { + var isSameDomain = false; + var parentIsSubdomain = false; + var childIsSubdomain = false; + var isAppDomain = false; + var dialogUrlPortionAllowedToLog = ""; + var taskpaneUrlPortionAllowedToLog = ""; + if (OSF.OUtil) { + var parsedDialogUrl = OSF.OUtil.parseUrl(dialogUrl); + var parsedTaskpaneUrl = OSF.OUtil.parseUrl(taskpaneUrl); + isSameDomain = parsedDialogUrl.protocol === parsedTaskpaneUrl.protocol + && parsedDialogUrl.hostname === parsedTaskpaneUrl.hostname + && parsedDialogUrl.port === parsedTaskpaneUrl.port; + dialogUrlPortionAllowedToLog = OSF.OUtil.getHostnamePortionForLogging(parsedDialogUrl.hostname); + if (isSameDomain) { + taskpaneUrlPortionAllowedToLog = dialogUrlPortionAllowedToLog; + } + else { + taskpaneUrlPortionAllowedToLog = OSF.OUtil.getHostnamePortionForLogging(parsedTaskpaneUrl.hostname); + parentIsSubdomain = Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(dialogUrl, taskpaneUrl); + childIsSubdomain = Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(taskpaneUrl, dialogUrl); + } + var appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + isAppDomain = Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(appDomains, dialogUrl); + } + var logJsonAsString = "openDialog isInline: " + dialogInfo[OSF.ShowWindowDialogParameterKeys.DisplayInIframe].toString() + ", " + "taskpaneHostname: " + taskpaneUrlPortionAllowedToLog + ", " + "dialogHostName: " + dialogUrlPortionAllowedToLog + ", " + "isSameDomain: " + isSameDomain.toString() + ", " + "parentIsSubdomain: " + parentIsSubdomain.toString() + ", " + "childIsSubdomain: " + childIsSubdomain.toString() + ", " + "isAppDomain: " + isAppDomain.toString(); + OSF.AppTelemetry.logAppCommonMessage(logJsonAsString); + } + if (dialogUrl == null || !(dialogUrl.substr(0, httpsIdentifyString.length) === httpsIdentifyString)) { + if (dialogUrl.substr(0, httpIdentifyString.length) === httpIdentifyString) { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS); + } + else { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme); + } + return; + } + if (!dialogInfo[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]) { + OSF.DialogShownStatus.isWindowDialog = true; + OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function OSF_DDA_WACDelegate$RegisterEventAsync_OnEvent(payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, showDialogCallback); + OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(dialogInfo); + } + else { + OSF.DialogShownStatus.isWindowDialog = false; + OSF.DDA.WAC.Delegate.registerEventAsync(args); + } +}; +OSF.DDA.WAC.Delegate.messageParent = function OSF_DDA_WAC_Delegate$MessageParent(args) { + if (window.opener != null) { + OfficeExt.AddinNativeAction.Dialog.messageParent(args); + } + else { + OSF.DDA.WAC.Delegate.executeAsync(args); + } +}; +OSF.DDA.WAC.Delegate.sendMessage = function OSF_DDA_WAC_Delegate$SendMessage(args) { + if (OSF.DialogShownStatus.hasDialogShown) { + if (OSF.DialogShownStatus.isWindowDialog) { + OfficeExt.AddinNativeAction.Dialog.sendMessage(args); + } + else { + OSF.DDA.WAC.Delegate.executeAsync(args); + } + } +}; +OSF.DDA.WAC.Delegate.closeDialog = function OSF_DDA_WAC_Delegate$CloseDialog(args) { + var callback = OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, args); + function closeDialogCallback(status) { + var payload = { "Error": status }; + try { + callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback." + e); + } + } + } + if (!OSF.DialogShownStatus.hasDialogShown) { + closeDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed); + } + else { + if (OSF.DialogShownStatus.isWindowDialog) { + if (args.onCalling) { + args.onCalling(); + } + OfficeExt.AddinNativeAction.Dialog.closeDialog(closeDialogCallback); + } + else { + OSF.DDA.WAC.Delegate.unregisterEventAsync(args); + } + } +}; +OSF.InitializationHelper.prototype.dismissDialogNotification = function OSF_InitializationHelper$dismissDialogNotification() { + OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification(); +}; +OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog = function OSF_InitializationHelper$registerMessageReceivedEventForWindowDialog() { + OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent(); +}; +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { + OSF.WebApp._UpdateLinksForHostAndXdmInfo(); + var license = new OSF.DDA.License(appContext.get_eToken()); + this.initWebDialog(appContext); + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license)); + var getDelegateMethods = OSF.DDA.WAC.getDelegateMethods; + var parameterMap = OSF.DDA.WAC.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods, parameterMap)); +}; + + + +!function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + i: moduleId, + l: !1, + exports: {} + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.l = !0, module.exports; + } + __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function(exports, name, getter) { + __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { + enumerable: !0, + get: getter + }); + }, __webpack_require__.r = function(exports) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(exports, "__esModule", { + value: !0 + }); + }, __webpack_require__.t = function(value, mode) { + if (1 & mode && (value = __webpack_require__(value)), 8 & mode) return value; + if (4 & mode && "object" == typeof value && value && value.__esModule) return value; + var ns = Object.create(null); + if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { + enumerable: !0, + value: value + }), 2 & mode && "string" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }, __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function() { + return module.default; + } : function() { + return module; + }; + return __webpack_require__.d(getter, "a", getter), getter; + }, __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 1); +}([ function(module, exports) { + module.exports = OfficeExtensionBatch; +}, function(module, exports, __webpack_require__) { + "use strict"; + var __assign = this && this.__assign || function() { + return (__assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) for (var p in s = arguments[i]) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]); + return t; + }).apply(this, arguments); + }; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var office_apiinformation_web_1 = __webpack_require__(2), AsyncStorage = __webpack_require__(3), DialogApi = __webpack_require__(4), officeruntime_storage_web_1 = __webpack_require__(5), Experimentation = __webpack_require__(6), officeruntime_message_1 = __webpack_require__(7), officeruntime_auth_1 = __webpack_require__(10), DynamicRibbon = __webpack_require__(11); + window._OfficeRuntimeWeb = __assign(__assign({}, window.OfficeRuntime), { + displayWebDialog: DialogApi.displayWebDialog, + AsyncStorage: AsyncStorage, + storage: officeruntime_storage_web_1.storage, + experimentation: Experimentation.experimentation, + apiInformation: office_apiinformation_web_1.apiInformation, + message: officeruntime_message_1.Message.instance, + ui: DynamicRibbon.ui, + auth: officeruntime_auth_1.Auth.instance + }), Object.freeze(window._OfficeRuntimeWeb); +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.apiInformation = void 0, exports.apiInformation = { + isSetSupported: function(capability, version) { + try { + return !!(Office && Office.context && Office.context.requirements) && Office.context.requirements.isSetSupported(capability, version); + } catch (e) { + return !1; + } + } + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.multiGet = exports.multiRemove = exports.multiSet = exports.getAllKeys = exports.clear = exports.removeItem = exports.setItem = exports.getItem = void 0; + var prefix = "_Office_AsyncStorage_"; + function ensureFreshLocalStorage() { + window.localStorage.setItem("_Office_AsyncStorage_|_unusedKey_", null), window.localStorage.removeItem("_Office_AsyncStorage_|_unusedKey_"); + } + function performAction(action, callback) { + return void 0 === callback && (callback = function() {}), new Promise((function(resolve, reject) { + try { + ensureFreshLocalStorage(), action(), callback(null), resolve(); + } catch (e) { + callback(e), reject(e); + } + })); + } + function performActionAndReturnResult(action, callback) { + return void 0 === callback && (callback = function() {}), new Promise((function(resolve, reject) { + try { + ensureFreshLocalStorage(); + var result = action(); + callback(null, result), resolve(result); + } catch (e) { + callback(e, null), reject(e); + } + })); + } + function performMultiAction(collection, action, callback) { + return void 0 === callback && (callback = function() {}), new Promise((function(resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } catch (e) { + errors.push(e); + } + collection.forEach((function(item) { + try { + action(item); + } catch (e) { + errors.push(e); + } + })), callback(errors), errors.length > 0 ? reject(errors) : resolve(); + })); + } + exports.getItem = function(key, callback) { + return performActionAndReturnResult((function() { + return window.localStorage.getItem(prefix + key); + }), callback); + }, exports.setItem = function(key, value, callback) { + return performAction((function() { + return window.localStorage.setItem(prefix + key, value); + }), callback); + }, exports.removeItem = function(key, callback) { + return performAction((function() { + return window.localStorage.removeItem(prefix + key); + }), callback); + }, exports.clear = function(callback) { + return performAction((function() { + Object.keys(window.localStorage).filter((function(fullKey) { + return 0 === fullKey.indexOf(prefix); + })).forEach((function(fullKey) { + return window.localStorage.removeItem(fullKey); + })); + }), callback); + }, exports.getAllKeys = function(callback) { + return performActionAndReturnResult((function() { + return Object.keys(window.localStorage).filter((function(fullKey) { + return 0 === fullKey.indexOf(prefix); + })).map((function(fullKey) { + return fullKey.substr(prefix.length); + })); + }), callback); + }, exports.multiSet = function(keyValuePairs, callback) { + return performMultiAction(keyValuePairs, (function(_a) { + var key = _a[0], value = _a[1]; + return window.localStorage.setItem(prefix + key, value); + }), callback); + }, exports.multiRemove = function(keys, callback) { + return performMultiAction(keys, (function(key) { + return window.localStorage.removeItem(prefix + key); + }), callback); + }, exports.multiGet = function(keys, callback) { + return new Promise((function(resolve, reject) { + callback || (callback = function() {}); + var errors = [], results = keys.map((function(key) { + try { + return [ key, window.localStorage.getItem(prefix + key) ]; + } catch (e) { + errors.push(e); + } + })).filter((function(pair) { + return pair; + })); + errors.length > 0 ? (callback(errors, results), reject(errors)) : (callback(null, results), + resolve(results)); + })); + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.displayWebDialog = exports.Dialog = void 0; + var OfficeExtension = __webpack_require__(0), Dialog = function() { + function Dialog(_dialog) { + this._dialog = _dialog; + } + return Dialog.prototype.close = function() { + return this._dialog.close(), OfficeExtension.CoreUtility.Promise.resolve(); + }, Dialog; + }(); + exports.Dialog = Dialog, exports.displayWebDialog = function(url, options) { + return new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) throw new OfficeExtension.Error({ + code: "InvalidArgument", + message: 'Dimensions must be "number%" or number.' + }); + var dialog, dialogOptions = { + width: options.width ? parseInt(options.width, 10) : 50, + height: options.height ? parseInt(options.height, 10) : 50, + displayInIframe: options.displayInIFrame || !1 + }; + function messageHandler(args) { + options.onMessage && options.onMessage(args.message, dialog, args.origin); + } + function eventHandler(args) { + 12006 === args.error ? options.onClose && options.onClose() : options.onRuntimeError && options.onRuntimeError(new OfficeExtension.Error(lookupErrorCodeAndMessage(args.error)), dialog); + } + function isInt(value) { + return /^(\-|\+)?([0-9]+)%?$/.test(value); + } + function lookupErrorCodeAndMessage(internalCode) { + var _a, table = ((_a = {})[12002] = { + code: "InvalidUrl", + message: "Cannot load URL, no such page or bad URL syntax." + }, _a[12003] = { + code: "InvalidUrl", + message: "HTTPS is required." + }, _a[12004] = { + code: "Untrusted", + message: "Domain is not trusted." + }, _a[12005] = { + code: "InvalidUrl", + message: "HTTPS is required." + }, _a[12007] = { + code: "FailedToOpen", + message: "Another dialog is already opened." + }, _a); + return table[internalCode] ? table[internalCode] : { + code: "Unknown", + message: "An unknown error has occured" + }; + } + Office.context.ui.displayDialogAsync(url, dialogOptions, (function(asyncResult) { + "failed" === asyncResult.status ? reject(new OfficeExtension.Error(lookupErrorCodeAndMessage(asyncResult.error.code))) : ((dialog = asyncResult.value).addEventHandler(Office.EventType.DialogMessageReceived, messageHandler), + dialog.addEventHandler(Office.EventType.DialogEventReceived, eventHandler), resolve(new Dialog(dialog))); + })); + })); + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.storage = void 0; + var prefix = "_OfficeRuntime_Storage_"; + function ensureFreshLocalStorage() { + window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_", null), window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_"); + } + function performAction(action) { + return new Promise((function(resolve, reject) { + try { + ensureFreshLocalStorage(), action(), resolve(); + } catch (e) { + reject(e); + } + })); + } + function performActionAndReturnResult(action) { + return new Promise((function(resolve, reject) { + try { + ensureFreshLocalStorage(), resolve(action()); + } catch (e) { + reject(e); + } + })); + } + function performMultiAction(collection, action) { + return new Promise((function(resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } catch (e) { + errors.push(e); + } + for (var key in collection) if (collection.hasOwnProperty(key) || Array.isArray(collection)) try { + Array.isArray(collection) ? action(collection[key]) : action(key); + } catch (e) { + errors.push(e); + } + errors.length > 0 ? reject(new Error("Unknown error.")) : resolve(); + })); + } + exports.storage = { + getItem: function(key) { + return performActionAndReturnResult((function() { + return window.localStorage.getItem(prefix + key); + })); + }, + setItem: function(key, value) { + return performAction((function() { + return window.localStorage.setItem(prefix + key, value); + })); + }, + removeItem: function(key) { + return performAction((function() { + return window.localStorage.removeItem(prefix + key); + })); + }, + getItems: function(keys) { + return new Promise((function(resolve, reject) { + var result = {}, errors = []; + try { + ensureFreshLocalStorage(); + } catch (e) { + reject(e); + } + keys.forEach((function(key) { + try { + var value = window.localStorage.getItem(prefix + key); + result[key] = value || null; + } catch (e) { + errors.push(e); + } + })), errors.length > 0 ? reject(new Error("Unknown error.")) : resolve(result); + })); + }, + setItems: function(keyValues) { + return performMultiAction(keyValues, (function(key) { + return window.localStorage.setItem(prefix + key, keyValues[key]); + })); + }, + removeItems: function(keys) { + return performMultiAction(keys, (function(key) { + window.localStorage.removeItem(prefix + key); + })); + }, + getKeys: function() { + return performActionAndReturnResult((function() { + return Object.keys(window.localStorage).filter((function(fullKey) { + return 0 === fullKey.indexOf(prefix); + })).map((function(fullKey) { + return fullKey.substr(prefix.length); + })); + })); + } + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.experimentation = void 0; + var ExperimentationWeb = function() { + function ExperimentationWeb() {} + return ExperimentationWeb.prototype.getBooleanFeatureGate = function(featureName, defaultValue) { + try { + var featureGateValue = Microsoft.Office.WebExtension.FeatureGates[featureName]; + return null == featureGateValue ? defaultValue : "true" === featureGateValue.toString().toLowerCase(); + } catch (error) { + return defaultValue; + } + }, ExperimentationWeb.prototype.getIntFeatureGate = function(featureName, defaultValue) { + try { + var featureGateValue = parseInt(Microsoft.Office.WebExtension.FeatureGates[featureName]); + return isNaN(featureGateValue) ? defaultValue : featureGateValue; + } catch (error) { + return defaultValue; + } + }, ExperimentationWeb.prototype.getStringFeatureGate = function(featureName, defaultValue) { + try { + var featureGateValue = Microsoft.Office.WebExtension.FeatureGates[featureName]; + return null == featureGateValue ? defaultValue : featureGateValue; + } catch (error) { + return defaultValue; + } + }, ExperimentationWeb.prototype.getChangeGate = function(changeGateName) { + return this.getBooleanFeatureGate(changeGateName, !0); + }, ExperimentationWeb.prototype.getBooleanFeatureGateAsync = function(featureName, defaultValue) { + return Promise.resolve(this.getBooleanFeatureGate(featureName, defaultValue)); + }, ExperimentationWeb.prototype.getIntFeatureGateAsync = function(featureName, defaultValue) { + return Promise.resolve(this.getIntFeatureGate(featureName, defaultValue)); + }, ExperimentationWeb.prototype.getStringFeatureGateAsync = function(featureName, defaultValue) { + return Promise.resolve(this.getStringFeatureGate(featureName, defaultValue)); + }, ExperimentationWeb; + }(); + exports.experimentation = new ExperimentationWeb; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Message = void 0; + var Message_1 = __webpack_require__(8); + Object.defineProperty(exports, "Message", { + enumerable: !0, + get: function() { + return Message_1.Message; + } + }); +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Message = void 0; + var ListenerManager_1 = __webpack_require__(9), Message = function() { + function Message() { + this.listeners = {}; + } + return Message.prototype.on = function(eventName, listener) { + return this.add(eventName, listener), new Promise((function(resolve) { + resolve(); + })); + }, Message.prototype.off = function(eventName, listener) { + return this.remove(eventName, listener), new Promise((function(resolve) { + resolve(); + })); + }, Message.prototype.emit = function(eventName, message) { + return this.send(eventName, message), new Promise((function(resolve) { + resolve(); + })); + }, Object.defineProperty(Message, "instance", { + get: function() { + return Message.singleton || (Message.singleton = new Message), this.singleton; + }, + enumerable: !1, + configurable: !0 + }), Message.prototype.setupReceive = function() { + Office && Office.context && Office.context.messaging && !Office.context.messaging.onMessage && (Office.context.messaging.onMessage = this.receiveMessage.bind(this)); + }, Message.prototype.add = function(eventName, listener) { + this.listeners.hasOwnProperty(eventName) || (this.listeners[eventName] = new ListenerManager_1.ListenerManager, + this.setupReceive()), this.listeners[eventName].add(listener); + }, Message.prototype.remove = function(eventName, listener) { + this.listeners.hasOwnProperty(eventName) && (listener ? this.listeners[eventName].remove(listener) : delete this.listeners[eventName]); + }, Message.prototype.send = function(eventName, message) { + var wrapped = { + eventName: eventName, + message: message + }; + Office && Office.context && Office.context.messaging && Office.context.messaging.sendMessage && Office.context.messaging.sendMessage(wrapped); + }, Message.prototype.receiveMessage = function(wrapped) { + var eventName = wrapped.eventName, message = wrapped.message; + this.listeners.hasOwnProperty(eventName) && this.listeners[eventName].call(message); + }, Message; + }(); + exports.Message = Message; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ListenerManager = void 0; + var ListenerManager = function() { + function ListenerManager() { + this.listeners = []; + } + return ListenerManager.prototype.add = function(listener) { + this.listeners.push(listener); + }, ListenerManager.prototype.remove = function(listener) { + var index = this.listeners.lastIndexOf(listener); + -1 !== index && this.listeners.splice(index, 1); + }, ListenerManager.prototype.call = function(message) { + this.listeners.forEach((function(listener) { + return listener(message); + })); + }, ListenerManager; + }(); + exports.ListenerManager = ListenerManager; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Auth = void 0; + var OfficeExtension = __webpack_require__(0), Auth = function() { + function Auth() {} + return Auth.prototype.getAccessToken = function(params) { + return new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + try { + Office.context.auth.getAccessTokenAsync(params || {}, (function(result) { + "succeeded" === result.status ? resolve(result.value) : reject(result.error); + })); + } catch (error) { + reject(error); + } + })); + }, Auth.prototype.getAuthContext = function() { + return new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + try { + Office.context.auth.getAuthContextAsync((function(result) { + "succeeded" === result.status ? resolve(result.value) : reject(result.error); + })); + } catch (error) { + reject(error); + } + })); + }, Object.defineProperty(Auth, "instance", { + get: function() { + return Auth.singleton || (Auth.singleton = new Auth), Auth.singleton; + }, + enumerable: !1, + configurable: !0 + }), Auth; + }(); + exports.Auth = Auth; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Ribbon = exports.ui = void 0, exports.ui = { + getRibbon: function() { + return new Promise((function(resolve, reject) { + resolve(new Ribbon); + })); + } + }; + var Ribbon = function() { + function Ribbon() { + this.requestContext = new OfficeCore.RequestContext, OSF.WebAuth && "web" == OSF._OfficeAppFactory.getHostInfo().hostPlatform && (this.requestContext._customData = "WacPartition"); + } + return Ribbon.prototype.requestUpdate = function(input) { + var ribbon = this.requestContext.ribbon; + return input.tabs.filter((function(tab) { + return !!tab.id; + })).forEach((function(tab) { + var ribbonTab = ribbon.getTab(tab.id); + void 0 !== tab.visible && null !== tab.visible && ribbonTab.setVisibility(tab.visible), + tab.controls.filter((function(control) { + return !!control.id; + })).forEach((function(control) { + var ribbonControl = ribbon.getButton(control.id); + void 0 !== control.enabled && null !== control.enabled && (ribbonControl.enabled = control.enabled); + })); + })), this.requestContext.sync(); + }, Ribbon; + }(); + exports.Ribbon = Ribbon; +} ]); \ No newline at end of file diff --git a/dist/excel-web-16.00-core.js b/dist/excel-web-16.00-core.js new file mode 100644 index 000000000..e4cf3a662 --- /dev/null +++ b/dist/excel-web-16.00-core.js @@ -0,0 +1,22 @@ +/* Excel web application specific API library (Core APIs only) */ + +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + + This file also contains the following Promise implementation (with a few small modifications): + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 2.3.0 +*/ +var __extends=this&&this.__extends||function(){var a=function(c,b){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(c,a){for(var b in a)if(a.hasOwnProperty(b))c[b]=a[b]};return a(c,b)};return function(c,b){a(c,b);function d(){this.constructor=c}c.prototype=b===null?Object.create(b):(d.prototype=b.prototype,new d)}}(),OfficeExt;(function(b){var a=function(){var a=true;function b(){}b.prototype.isMsAjaxLoaded=function(){var b="function",c="undefined";if(typeof Sys!==c&&typeof Type!==c&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b&&typeof Function._validateParams===b&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===b)return a;else return false};b.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(b.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==null&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==null&&a.isMsAjaxLoaded())a._msAjaxString=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==null&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return b}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a==h)for(var b=0;b6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(d)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,d)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,b);f[e]=a}catch(g){}}return f},loadScript:function(f,g,i){if(f&&g){var k=window.document,d=v[f];if(!d){var e=k.createElement("script");e.type="text/javascript";d={loaded:c,pendingCallbacks:[g],timer:a};v[f]=d;var j=function(){if(d.timer!=a){clearTimeout(d.timer);delete d.timer}d.loaded=b;for(var e=d.pendingCallbacks.length,c=0;c0)h(a);else h(new Event("Script load timed out"))},h=function(g){delete v[f];if(d.timer!=a){clearTimeout(d.timer);delete d.timer}for(var c=d.pendingCallbacks.length,b=0;b=0},pushFlight:function(a){if(OSF.Flights.indexOf(a)<0){OSF.Flights.push(a);return b}return c},getBooleanSetting:function(a){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,a)},getBooleanFromDictionary:function(b,a){var d=b&&a&&b[a]!==undefined&&b[a]&&(typeof b[a]===h&&b[a].toUpperCase()==="TRUE"||typeof b[a]==="boolean"&&b[a]);return d!==undefined?d:c},getIntFromDictionary:function(b,a){if(b&&a&&b[a]!==undefined&&typeof b[a]===h)return parseInt(b[a]);else return NaN},pushIntFlight:function(a,d){if(!(a in OSF.IntFlights)){OSF.IntFlights[a]=d;return b}return c},getIntFlight:function(a){if(OSF.IntFlights&&a in OSF.IntFlights)return OSF.IntFlights[a];else return NaN},parseFlightsFromWindowName:function(a,b){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(a,b,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(a,c){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(B,G,b,a,c))},parseArrayWithDefault:function(b){var a=[];try{a=JSON.parse(b)}catch(c){}if(!Array.isArray(a))a=[];return a},parseInfoFromWindowName:function(g,h,f){try{var b=JSON.parse(h),c=b!=a?b[f]:a,d=t();if(!g&&d&&b!=a){var e=b[OSF.WindowNameItemKeys.BaseFrameName]+f;if(c)d.setItem(e,c);else c=d.getItem(e)}return c}catch(i){return a}},parseInfoWithGivenFragment:function(m,j,k,i,l){var f=l.split(m),b=f.length>1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(y)>=0)b=b.split(y)[0];b=decodeURIComponent(b)}var c=t();if(!i&&c){var e=window.name.indexOf(j);if(e>d){var g=window.name.indexOf(";",e);if(g==d)g=window.name.length;var h=window.name.substring(e,g);if(b)c.setItem(h,b);else b=c.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==f)a=b.split("|");if(typeof a[1]==f)a=b.split("%7C");return a},getXdmFieldValue:function(f,d){var b=e,c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(f){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:c},{name:"expectedProperties",type:Object,mayBeNull:c},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var d in e){a=Function._validateParameter(f[d],e[d],d);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==f&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[i])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[i])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[p,i,q])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[p,i,q])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;g=h&255;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63;if(!isNaN(h)){d=h>>8;f=j&255;g=j>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63}if(isNaN(h))b[a-1]=64;else if(isNaN(j)){b[a-2]=64;b[a-1]=64}for(var l=0;l=2)return a[b-2]+"."+a[b-1];else if(b==1)return a[0]},isiOS:function(){return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?b:c},isChrome:function(){return window.navigator.userAgent.indexOf("Chrome")>0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},startsWith:function(b,a,c){if(c)return b.substr(0,a.length)===a;else return b.startsWith(a)},containsPort:function(d,e,c,a){return this.startsWith(d,e+"//"+c+":"+a,b)||this.startsWith(d,c+":"+a,b)},getRedundandPortString:function(b,a){if(!b||!a)return e;if(a.protocol==k&&this.containsPort(b,k,a.hostname,"443"))return ":443";else if(a.protocol=="http:"&&this.containsPort(b,"http:",a.hostname,"80"))return ":80";return e},removeChar:function(a,b){if(b=a.length)return this.removeChar(a,b);else if(c==="/"){if(a.charAt(b+1)==="?"||a.charAt(b+1)===g)return this.removeChar(a,b)}else if(c==="?")if(a.charAt(b+1)===g)return this.removeChar(a,b);return a},cleanUrl:function(a){a=this.cleanUrlOfChar(a,"/");a=this.cleanUrlOfChar(a,"?");a=this.cleanUrlOfChar(a,g);if(a.substr(0,8)=="https://"){var b=a.indexOf(":443");if(b!=d)if(b==a.length-4||a.charAt(b+4)=="/"||a.charAt(b+4)=="?"||a.charAt(b+4)==g)a=a.substring(0,b)+a.substring(b+4)}else if(a.substr(0,7)=="http://"){var b=a.indexOf(":80");if(b!=d)if(b==a.length-3||a.charAt(b+3)=="/"||a.charAt(b+3)=="?"||a.charAt(b+3)==g)a=a.substring(0,b)+a.substring(b+3)}return a},parseUrl:function(g,i){var h=this;if(i===void 0)i=c;if(typeof g===f||!g)return undefined;var j="NotHttps",o="InvalidUrl",n=h.isIE(),b={protocol:undefined,hostname:undefined,host:undefined,port:undefined,pathname:undefined,search:undefined,hash:undefined,isPortPartOfUrl:undefined};try{if(n){var a=document.createElement("a");a.href=g;if(!a||!a.protocol||!a.host||!a.hostname||!a.href||h.cleanUrl(a.href).toLowerCase()!==h.cleanUrl(g).toLowerCase())throw o;if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps))if(i&&a.protocol!=k)throw new Error(j);var m=h.getRedundandPortString(g,a);b.protocol=a.protocol;b.hostname=a.hostname;b.port=m==e?a.port:e;b.host=m!=e?a.hostname:a.host;b.pathname=(n?"/":e)+a.pathname;b.search=a.search;b.hash=a.hash;b.isPortPartOfUrl=h.containsPort(g,a.protocol,a.hostname,a.port)}else{var d=new URL(g);if(d&&d.protocol&&d.host&&d.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps))if(i&&d.protocol!=k)throw new Error(j);b.protocol=d.protocol;b.hostname=d.hostname;b.port=d.port;b.host=d.host;b.pathname=d.pathname;b.search=d.search;b.hash=d.hash;b.isPortPartOfUrl=d.host.lastIndexOf(":"+d.port)==d.host.length-d.port.length-1}}}catch(l){if(l.message===j)throw l}return b},shallowCopy:function(b){if(b==a)return a;else if(!(b instanceof Object))return b;else if(Array.isArray(b)){for(var e=[],d=0;dc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};e=x(e);g=i?e.length-1:0;if(e.length===0)return a;while(!h&&g>=0&&gc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};f=x(f);j=n(f,o);e=i(f.length,j,m);if(e<0)return a;while(!h&&e>=0&&ed.length)return c;if(d.substr(d.length-a.length)===a)return b}return c},hashCode:function(b){var a=0;if(!OSF.OUtil.isNullOrUndefined(b)){var c=0,d=b.length;while(c0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();try{(function(){OSF.Flights=OSF.OUtil.parseFlights(true)})()}catch(ex){}window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614,Visio:8388615,OneNoteAndroid:4194305};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20,UpdateTargetUrl:21,InstallCustomFunctions:22,SendTelemetryEvent:23,UninstallCustomFunctions:24,SendMessage:25,LaunchExtensionComponent:26,StopExtensionComponent:27,RestartExtensionComponent:28,EnableTaskPaneHeaderButton:29,DisableTaskPaneHeaderButton:30,TaskPaneHeaderButtonClicked:31,RemoveAppCommandsAddin:32,RefreshRibbonGallery:33,GetOriginalControlId:34,OfficeJsReady:35,InsertDevManifest:36,InsertDevManifestError:37,SendCustomerContent:38,KeyboardShortcuts:39};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(B,x,s,p,u,y,t,w,A,k,z,m,l,o,i,h,g,f,j,c,e,v,r,b,n,q,d){var a=this;a._id=B;a._appName=x;a._appVersion=s;a._appUILocale=p;a._dataLocale=u;a._docUrl=y;a._clientMode=t;a._settings=w;a._reason=A;a._osfControlType=k;a._eToken=z;a._correlationId=m;a._appInstanceId=l;a._touchEnabled=o;a._commerceAllowed=i;a._appMinorVersion=h;a._requirementMatrix=g;a._hostCustomMessage=f;a._hostFullVersion=j;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=e;a._addinName=v;a._appDomains=r;a._dialogRequirementMatrix=b;a._featureGates=n;a._officeTheme=q;a._initialDisplayMode=d;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.get_appDomains=function(){return this._appDomains};a.get_featureGates=function(){return this._featureGates};a.get_officeTheme=function(){return this._officeTheme};a.get_initialDisplayMode=function(){return this._initialDisplayMode?this._initialDisplayMode:0}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",ControlActivation:"controlActivation"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",JsonData:"jsonData",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",AllowConsentPrompt:"allowConsentPrompt",ForMSGraphAccess:"forMSGraphAccess",AllowSignInPrompt:"allowSignInPrompt",JsonPayload:"jsonPayload",EnableNewHosts:"enableNewHosts",AccountTypeFilter:"accountTypeFilter",AddinTrustId:"addinTrustId",Reserved:"reserved",Tcid:"tcid",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo",TargetOrigin:"targetOrigin",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64",FormId:"formId"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetAuthContextMethod:99,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidInsertFormMethod:106,dispidDisplayRibbonCalloutAsyncMethod:109,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidExecuteFeature:146,dispidQueryFeature:147,dispidGetNestedAppAuthContextMethod:205,dispidMethodMax:205};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidOlkRecurrenceChangedEvent:49,dispidOlkAttachmentsChangedEvent:50,dispidOlkEnhancedLocationsChangedEvent:51,dispidOlkInfobarClickedEvent:52,dispidOlkSelectedItemsChangedEvent:53,dispidOlkSensitivityLabelChangedEvent:54,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeOperationCancelled:5014,ooeWorkbookHidden:5015,ooeWriteNotSupportedWhenModalDialogOpen:5016,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeRequestPayloadSizeLimitExceeded:5103,ooeResponsePayloadSizeLimitExceeded:5104,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeModalDialogOpen:12012,ooeDocumentIsInactive:12013,ooeDialogParentIsMinimized:12014,ooeNotSSOAgave:13000,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010,ooeResourceNotAllowed:13011,ooeSSOUnsupportedPlatform:13012,ooeSSOCallThrottled:13013,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:b.L_InvalidOrTimedOutSession,message:b.L_InvalidOrTimedOutSessionMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:b.L_APICallFailed,message:b.L_InvalidApiArgumentsMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden]={name:b.L_APICallFailed,message:b.L_WorkbookHiddenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen]={name:b.L_APICallFailed,message:b.L_WriteNotSupportedWhenModalDialogOpen};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded]={name:b.L_APICallFailed,message:b.L_RequestPayloadSizeLimitExceededMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded]={name:b.L_APICallFailed,message:b.L_ResponsePayloadSizeLimitExceededMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen]={name:b.L_DisplayDialogError,message:b.L_ModalDialogOpen};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive]={name:b.L_DisplayDialogError,message:b.L_DocumentIsInactive};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized]={name:b.L_DisplayDialogError,message:b.L_DialogParentIsMinimized};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:b.L_APINotSupported,message:b.L_InvalidSSOAddinMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:b.L_UserNotSignedIn,message:b.L_UserNotSignedIn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:b.L_UserAborted,message:b.L_UserAbortedMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:b.L_UnsupportedUserIdentity,message:b.L_UnsupportedUserIdentityMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:b.L_InvalidResourceUrl,message:b.L_InvalidResourceUrlMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:b.L_InvalidGrant,message:b.L_InvalidGrantMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:b.L_SSOClientError,message:b.L_SSOClientErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:b.L_SSOServerError,message:b.L_SSOServerErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:b.L_AddinIsAlreadyRequestingToken,message:b.L_AddinIsAlreadyRequestingTokenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:b.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:b.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:b.L_SSOConnectionLostError,message:b.L_SSOConnectionLostErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:b.L_APINotSupported,message:b.L_SSOUnsupportedPlatform};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:b.L_OperationCancelledError,message:b.L_OperationCancelledErrorMessage}}}}();(function(a){var b;(function(b){var a=1.1,A=function(){function a(){}return a}();b.RequirementVersion=A;var d=function(){function a(b){var a=this;a.isSetSupported=function(d,b){if(d==undefined)return false;if(b==undefined)b=0;var f=this._setMap,e=f._sets;if(e.hasOwnProperty(d.toLowerCase())){var g=e[d.toLowerCase()];try{var a=this._getVersion(g);b=b+"";var c=this._getVersion(b);if(a.major>0&&a.major>c.major)return true;if(a.major>0&&a.minor>=0&&a.major==c.major&&a.minor>=c.minor)return true}catch(h){return false}}return false};a._getVersion=function(b){var a="version format incorrect";b=b+"";var c=b.split("."),d=0,e=0;if(c.length<2&&isNaN(Number(b)))throw a;else{d=Number(c[0]);if(c.length>=2)e=Number(c[1]);if(isNaN(d)||isNaN(e))throw a}var f={minor:e,major:d};return f};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var l=function(c){__extends(b,c);function b(){return c.call(this,{dialogapi:a})||this}return b}(c);b.DefaultRequiredDialogSetRequirement=l;var k=function(c){__extends(b,c);function b(){return c.call(this,{dialogorigin:a})||this}return b}(c);b.DefaultOptionalDialogSetRequirement=k;var f=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})||this}return b}(c);b.ExcelClientDefaultSetRequirement=f;var m=function(c){__extends(b,c);function b(){var b=c.call(this)||this;b._addSetMap({imagecoercion:a});return b}return b}(f);b.ExcelClientV1DefaultSetRequirement=m;var n=function(b){__extends(a,b);function a(){return b.call(this,{mailbox:1.3})||this}return a}(c);b.OutlookClientDefaultSetRequirement=n;var h=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})||this}return b}(c);b.WordClientDefaultSetRequirement=h;var r=function(c){__extends(b,c);function b(){var b=c.call(this)||this;b._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a});return b}return b}(h);b.WordClientV1DefaultSetRequirement=r;var e=function(c){__extends(b,c);function b(){return c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})||this}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){var b=c.call(this)||this;b._addSetMap({imagecoercion:a});return b}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var q=function(c){__extends(b,c);function b(){return c.call(this,{selection:a,textcoercion:a})||this}return b}(c);b.ProjectClientDefaultSetRequirement=q;var w=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})||this}return b}(c);b.ExcelWebDefaultSetRequirement=w;var y=function(c){__extends(b,c);function b(){return c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})||this}return b}(c);b.WordWebDefaultSetRequirement=y;var p=function(c){__extends(b,c);function b(){return c.call(this,{activeview:a,settings:a})||this}return b}(c);b.PowerpointWebDefaultSetRequirement=p;var g=function(b){__extends(a,b);function a(){return b.call(this,{mailbox:1.3})||this}return a}(c);b.OutlookWebDefaultSetRequirement=g;var x=function(c){__extends(b,c);function b(){return c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})||this}return b}(c);b.SwayWebDefaultSetRequirement=x;var t=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})||this}return b}(c);b.AccessWebDefaultSetRequirement=t;var v=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})||this}return b}(c);b.ExcelIOSDefaultSetRequirement=v;var i=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})||this}return b}(c);b.WordIOSDefaultSetRequirement=i;var u=function(b){__extends(a,b);function a(){var a=b.call(this)||this;a._addSetMap({customxmlparts:1.2,wordapi:1.2});return a}return a}(i);b.WordIOSV1DefaultSetRequirement=u;var o=function(c){__extends(b,c);function b(){return c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})||this}return b}(c);b.PowerpointIOSDefaultSetRequirement=o;var s=function(c){__extends(b,c);function b(){return c.call(this,{mailbox:a})||this}return b}(c);b.OutlookIOSDefaultSetRequirement=s;var z=function(){var A="dialogorigin",z="undefined";function b(){}b.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};b.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,h=f.get_requirementMatrix();if(h!=undefined&&h.length>0&&typeof JSON!==z){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());try{var j=A;if(!g.hasOwnProperty(j))g[j]=a}catch(k){}e=new d(new c(g))}else{var i=b.getClientFullVersionString(f);if(b.DefaultSetArrayMatrix!=undefined&&b.DefaultSetArrayMatrix[i]!=undefined)e=new d(b.DefaultSetArrayMatrix[i]);else e=new d(new c({}))}return e};b.getDefaultDialogRequirementMatrix=function(h){var b=undefined,i=h.get_dialogRequirementMatrix();if(i!=undefined&&i.length>0&&typeof JSON!==z){var f=JSON.parse(h.get_requirementMatrix().toLowerCase());b=new c(f)}else{b=new l;var g=h.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==z){var f=JSON.parse(g.toLowerCase());for(var e in b._sets)if(f.hasOwnProperty(e))b._sets[e]=f[e];var m=new k;for(var e in m._sets)if(f.hasOwnProperty(e))b._sets[e]=f[e]}}try{var j=A;if(!b._sets.hasOwnProperty(j)&&window.opener)b._sets[j]=a}catch(n){}return new d(b)};b.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};b.initializeDefaultSetMatrix=function(){b.DefaultSetArrayMatrix[b.Excel_RCLIENT_1600]=new f;b.DefaultSetArrayMatrix[b.Word_RCLIENT_1600]=new h;b.DefaultSetArrayMatrix[b.PowerPoint_RCLIENT_1600]=new e;b.DefaultSetArrayMatrix[b.Excel_RCLIENT_1601]=new m;b.DefaultSetArrayMatrix[b.Word_RCLIENT_1601]=new r;b.DefaultSetArrayMatrix[b.PowerPoint_RCLIENT_1601]=new j;b.DefaultSetArrayMatrix[b.Outlook_RCLIENT_1600]=new n;b.DefaultSetArrayMatrix[b.Excel_WAC_1600]=new w;b.DefaultSetArrayMatrix[b.Word_WAC_1600]=new y;b.DefaultSetArrayMatrix[b.Outlook_WAC_1600]=new g;b.DefaultSetArrayMatrix[b.Outlook_WAC_1601]=new g;b.DefaultSetArrayMatrix[b.Project_RCLIENT_1600]=new q;b.DefaultSetArrayMatrix[b.Access_WAC_1600]=new t;b.DefaultSetArrayMatrix[b.PowerPoint_WAC_1600]=new p;b.DefaultSetArrayMatrix[b.Excel_IOS_1600]=new v;b.DefaultSetArrayMatrix[b.SWAY_WAC_1600]=new x;b.DefaultSetArrayMatrix[b.Word_IOS_1600]=new i;b.DefaultSetArrayMatrix[b.Word_IOS_16001]=new u;b.DefaultSetArrayMatrix[b.PowerPoint_IOS_1600]=new o;b.DefaultSetArrayMatrix[b.Outlook_IOS_1600]=new s};b.Excel_RCLIENT_1600="1-16.00";b.Excel_RCLIENT_1601="1-16.01";b.Word_RCLIENT_1600="2-16.00";b.Word_RCLIENT_1601="2-16.01";b.PowerPoint_RCLIENT_1600="4-16.00";b.PowerPoint_RCLIENT_1601="4-16.01";b.Outlook_RCLIENT_1600="8-16.00";b.Excel_WAC_1600="16-16.00";b.Word_WAC_1600="32-16.00";b.Outlook_WAC_1600="64-16.00";b.Outlook_WAC_1601="64-16.01";b.Project_RCLIENT_1600="128-16.00";b.Access_WAC_1600="256-16.00";b.PowerPoint_WAC_1600="512-16.00";b.Excel_IOS_1600="1024-16.00";b.SWAY_WAC_1600="2048-16.00";b.Word_IOS_1600="4096-16.00";b.Word_IOS_16001="4096-16.00.01";b.PowerPoint_IOS_1600="8192-16.00";b.Outlook_IOS_1600="65536-16.00";b.DefaultSetArrayMatrix={};return b}();b.RequirementsMatrixFactory=z})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,j,k,c,d){var i="officeTheme",h="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},isDialog:{value:OSF._OfficeAppFactory.getHostInfo().isDialog},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});k&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:k});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});a.auth&&OSF.OUtil.defineEnumerableProperty(b,"auth",{value:a.auth});a.webAuth&&OSF.OUtil.defineEnumerableProperty(b,"webAuth",{value:a.webAuth});a.application&&OSF.OUtil.defineEnumerableProperty(b,"application",{value:a.application});a.extensionLifeCycle&&OSF.OUtil.defineEnumerableProperty(b,"extensionLifeCycle",{value:a.extensionLifeCycle});a.messaging&&OSF.OUtil.defineEnumerableProperty(b,"messaging",{value:a.messaging});a.ui&&a.ui.taskPaneAction&&OSF.OUtil.defineEnumerableProperty(b,"taskPaneAction",{value:a.ui.taskPaneAction});a.ui&&a.ui.ribbonGallery&&OSF.OUtil.defineEnumerableProperty(b,"ribbonGallery",{value:a.ui.ribbonGallery});if(a.get_isDialog()){var f=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,h,{value:f})}else{j&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:j});if(c){var l=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,l,{value:c})}if(a.get_officeTheme())OSF.OUtil.defineEnumerableProperty(b,i,{"get":function(){return a.get_officeTheme()}});else d&&OSF.OUtil.defineEnumerableProperty(b,i,{"get":function(){return d()}});var f=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,h,{value:f});if(a.get_featureGates){var e=a.get_featureGates();if(e&&e["EnablePublicThemeManager"]){var g=new OSF.DDA.Theming.InternalThemeHandler;g.InitializeThemeManager();OSF.OUtil.defineEnumerableProperty(b,"themeManager",{value:g})}}}};OSF.DDA.OutlookContext=function(a,b,d,e,c){OSF.DDA.OutlookContext.uber.constructor.call(this,a,null,d,e,c);b&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:b});a.sensitivityLabelsCatalog&&OSF.OUtil.defineEnumerableProperty(this,"sensitivityLabelsCatalog",{value:a.sensitivityLabelsCatalog()})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.JsonData]={toHost:function(a){return a},fromHost:function(a){return typeof a==="string"?JSON.parse(a):a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b1)a=c+j+e;else if(g.length>0)a=c+f+k+e;if(h)return [a,d,h].join("");else return a}a.addHostInfoAsQueryParam=i;function j(b){if(!b)return null;var a=document.createElement("a");a.href=b;return a.protocol+"//"+a.host}a.getDomainForUrl=j;function f(){try{for(var b=["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3","Windows NT 10.0"],f=window.navigator.userAgent,a=0,g=b.length;a-1)return e();return false}catch(d){c("Error happens in shouldUseLocalStorageToPassMessage.",d);return false}}a.shouldUseLocalStorageToPassMessage=f;function e(){try{var a=window.navigator.userAgent;return a.indexOf("MSIE ")>-1||a.indexOf("Trident/")>-1||a.indexOf("Edge/")>-1}catch(b){c("Error happens in isInternetExplorer.",b);return false}}a.isInternetExplorer=e;function h(c){for(var d=OSF.OUtil.getLocalStorage(),e=d.getKeysWithPrefix(""),a=0,h=e.length;a0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0){var a=t.shift();x(a)}else{clearInterval(i);i=b}}else OsfMsAjaxFactory.msAjaxDebug.trace(m)}function x(a){k=a.getInvokeBlockingFlag();a.invoke();s=(new Date).getTime()}function G(){if(j){var c,e=0,i=new Date,d;for(var h in f){c=f[h];for(var g in c._callbackList){var a=c._callbackList[g];d=a.timeout?a.timeout:y;if(d>=0&&Math.abs(i.getTime()-a.createdOn)>=d)try{a.callback&&a.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,b)}finally{delete c._callbackList[g]}else e++}}if(e===0){clearInterval(j);j=b}}else OsfMsAjaxFactory.msAjaxDebug.trace(m)}function F(){k=a}function I(b){if(window.addEventListener)window.addEventListener("message",b,a);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",b);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser")}}function M(c,b){var f=a;if(!c||!b||c===d||b===d||!c.length||!b.length)return f;if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps))f=u(c,b);else{var h,g;h=document.createElement(e);g=document.createElement(e);h.href=c;g.href=b;f=o(h,g)}return f}function q(b,c){var f=a;if(!c||c===d||!c.length||!b||!(b instanceof Array)||!b.length)return f;var i=document.createElement(e),h=document.createElement(e);i.href=c;for(var g=0;gg.length+1)l=j.slice(-(g.length+1))==="."+g;var m=k||l;return o&&n&&m}function u(d,e){var a=OSF.OUtil.parseUrl(d,c),b=OSF.OUtil.parseUrl(e,c);return o(a,b)}function o(a,b){return a.hostname==b.hostname&&a.protocol==b.protocol&&z(a,b)}function z(a,b){var d="80",c="443";return a.port==b.port||a.port==""&&a.protocol=="http:"&&b.port==d||a.port==""&&a.protocol=="https:"&&b.port==c||b.port==""&&b.protocol=="http:"&&a.port==d||b.port==""&&b.protocol=="https:"&&a.port==c}function N(g){var t="Access Denied";if(!OSF)return;if(g.data!=""){var f,h=OSF.SerializerVersion.Browser,Q=g.data;try{f=Microsoft.Office.Common.MessagePackager.unenvelope(Q,OSF.SerializerVersion.Browser);h=f._serializerVersion!=b?f._serializerVersion:h}catch(m){return}if(f._messageType===Microsoft.Office.Common.MessageType.request){var C=g.origin==b||g.origin===d?f._origin:g.origin;try{var j=D(f._conversationId),o=j._conversations[f._conversationId];h=o.serializerVersion!=b?o.serializerVersion:h;var z=[o.url].concat(j._appDomains[f._conversationId]);if(!q(z,g.origin))if(!OfficeExt.appSpecificCheckOrigin(z,g,f._origin,q)){var P=p(o.url,g.origin);if(!P)throw"Failed origin check"}var u=f._data!=b?f._data:{};u.SecurityOrigin=g.origin;var B=j.getPolicyManager();if(B&&!B.checkPermission(f._conversationId,f._actionName,u))throw t;var T=H(j,f),O=new Microsoft.Office.Common.InvokeCompleteCallback(g.source,C,f._actionName,f._conversationId,f._correlationId,F,h),J=new Microsoft.Office.Common.Invoker(T,u,O,j._eventHandlerProxyList,f._conversationId,f._actionName,h),G=c;if(i==b)if((s==b||(new Date).getTime()-s>w)&&!k){x(J);G=a}else i=setInterval(K,w);G&&L(J)}catch(m){j&&j._onHandleRequestError&&j._onHandleRequestError(f,m);var I=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;if(m==t)I=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied;var S=new Microsoft.Office.Common.Response(f._actionName,f._conversationId,f._correlationId,I,Microsoft.Office.Common.ResponseType.forCalling,m),R=Microsoft.Office.Common.MessagePackager.envelope(S,h),A=a;try{A=!!(g.source&&g.source.postMessage)}catch(m){}var n=a;if(window.location.href&&g.origin&&g.origin!==d&&p(window.location.href,g.origin))n=c;else if(g.origin&&g.origin!==d)if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)){var U=OSF.OUtil.parseUrl(g.origin,c).hostname;n=r(U)}else{var N=document.createElement(e);N.href=g.origin;n=r(N.hostname)}A&&n&&g.source.postMessage(R,C)}}else if(f._messageType===Microsoft.Office.Common.MessageType.response){var l=E(f._conversationId);if(!l)return;l._serializerVersion=h;if(!M(l._targetUrl,g.origin))throw"Failed orgin check";if(f._responseType===Microsoft.Office.Common.ResponseType.forCalling){var v=l._callbackList[f._correlationId];if(v)try{v.callback&&v.callback(f._errorCode,f._data)}finally{delete l._callbackList[f._correlationId]}}else{var y=l._eventHandlerList[f._actionName];y!==undefined&&y!==b&&y(f._data)}}else return}}function B(){if(!A){I(N);A=c}}return {connect:function(b,d,e,c){var a=f[b];if(!a){B();a=new Microsoft.Office.Common.ClientEndPoint(b,d,e,c);f[b]=a}return a},getClientEndPoint:function(c){var b=Function._validateParams(arguments,[{name:h,type:String,mayBeNull:a}]);if(b)throw b;return f[c]},createServiceEndPoint:function(a){B();var b=new Microsoft.Office.Common.ServiceEndPoint(a);g[a]=b;return b},getServiceEndPoint:function(c){var b=Function._validateParams(arguments,[{name:n,type:String,mayBeNull:a}]);if(b)throw b;return g[c]},deleteClientEndPoint:function(c){var b=Function._validateParams(arguments,[{name:h,type:String,mayBeNull:a}]);if(b)throw b;delete f[c]},deleteServiceEndPoint:function(c){var b=Function._validateParams(arguments,[{name:n,type:String,mayBeNull:a}]);if(b)throw b;delete g[c]},urlCompare:function(a,b){return o(a,b)},checkUrlWithAppDomains:function(a,b){return q(a,b)},isTargetSubdomainOfSourceLocation:function(a,b){return p(a,b)},_setMethodTimeout:function(b){var c=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:a}]);if(c)throw c;y=b<=0?v:b},_startMethodTimeoutTimer:function(){if(!j)j=setInterval(G,C)},isHostNameValidWacDomain:function(a){return r(a)},_hasSamePort:function(a,b){return z(a,b)}}}();Microsoft.Office.Common.Message=function(g,h,e,f,c){var b=false,a=this,d=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:b},{name:"actionName",type:String,mayBeNull:b},{name:"conversationId",type:String,mayBeNull:b},{name:"correlationId",mayBeNull:b},{name:"data",mayBeNull:true,optional:true}]);if(d)throw d;a._messageType=g;a._actionName=h;a._conversationId=e;a._correlationId=f;a._origin=window.location.origin;if(typeof c=="undefined")a._data=null;else a._data=c};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(c,d,a,b,e){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,c,a,b,e);this._actionType=d};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(d,a,b,e,c,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,d,a,b,f);this._errorCode=e;this._responseType=c};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(a){if(typeof a==="object")a._serializerVersion=OSF.SerializerVersion.Browser;return JSON.stringify(a)},unenvelope:function(a){return JSON.parse(a)}};Microsoft.Office.Common.ResponseSender=function(f,i,k,g,h,j,e){var c=false,a=this,d=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:c},{name:"requesterUrl",type:String,mayBeNull:c},{name:"actionName",type:String,mayBeNull:c},{name:"conversationId",type:String,mayBeNull:c},{name:"correlationId",mayBeNull:c},{name:"responsetype",type:Number,maybeNull:c},{name:"serializerVersion",type:Number,maybeNull:true,optional:true}]);if(d)throw d;a._requesterWindow=f;a._requesterUrl=i;a._actionName=k;a._conversationId=g;a._correlationId=h;a._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;a._responseType=j;var b=a;a._send=function(a){try{var c=b._requesterUrl;if(b._actionName==="dialogMessageReceived"||b._actionName==="dialogParentMessageReceived")if(a.targetOrigin)c=a.targetOrigin;var g=new Microsoft.Office.Common.Response(b._actionName,b._conversationId,b._correlationId,b._invokeResultCode,b._responseType,a),f=Microsoft.Office.Common.MessagePackager.envelope(g,e);b._requesterWindow.postMessage(f,c)}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+d.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(a){this._invokeResultCode=a}};Microsoft.Office.Common.InvokeCompleteCallback=function(e,h,i,f,g,d,c){var b=this;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(b,e,h,i,f,g,Microsoft.Office.Common.ResponseType.forCalling,c);b._postCallbackHandler=d;var a=b;b._send=function(g,b){if(b!=undefined)a._invokeResultCode=b;try{var f=new Microsoft.Office.Common.Response(a._actionName,a._conversationId,a._correlationId,a._invokeResultCode,a._responseType,g),e=Microsoft.Office.Common.MessagePackager.envelope(f,c);a._requesterWindow.postMessage(e,a._requesterUrl);a._postCallbackHandler()}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+d.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(i,j,e,f,h,k,g){var c=true,b=false,a=this,d=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:b},{name:"paramValue",mayBeNull:c},{name:"invokeCompleteCallback",mayBeNull:b},{name:"eventHandlerProxyList",mayBeNull:c},{name:"conversationId",type:String,mayBeNull:b},{name:"eventName",type:String,mayBeNull:b},{name:"serializerVersion",type:Number,mayBeNull:c,optional:c}]);if(d)throw d;a._methodObject=i;a._param=j;a._invokeCompleteCallback=e;a._eventHandlerProxyList=f;a._conversationId=h;a._eventName=k;a._serializerVersion=g};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var a=this;try{var b;switch(a._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:a._methodObject.getMethod()(a._param,a._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:b=a._methodObject.getMethod()(a._param);a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:var d=a._createEventHandlerProxyObject(a._invokeCompleteCallback);b=a._methodObject.getMethod()(d.getSend(),a._param);a._eventHandlerProxyList[a._conversationId+a._eventName]=d.getSend();a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:var g=a._eventHandlerProxyList[a._conversationId+a._eventName];b=a._methodObject.getMethod()(g,a._param);delete a._eventHandlerProxyList[a._conversationId+a._eventName];a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:var c=a._createEventHandlerProxyObject(a._invokeCompleteCallback);a._methodObject.getMethod()(c.getSend(),a._invokeCompleteCallback.getSend(),a._param);a._eventHandlerProxyList[a._callerId+a._eventName]=c.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:var f=a._eventHandlerProxyList[a._callerId+a._eventName];a._methodObject.getMethod()(f,a._invokeCompleteCallback.getSend(),a._param);delete a._eventHandlerProxyList[a._callerId+a._eventName]}}catch(e){a._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);a._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(a){return new Microsoft.Office.Common.ResponseSender(a.getRequesterWindow(),a.getRequesterUrl(),a.getActionName(),a.getConversationId(),a.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var a=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],b={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,a,b)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var a={};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync;a[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync;a[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync;a[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog;a[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent;a[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage;a[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog;return a};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(a){if(!a.hostCallArgs)a.hostCallArgs={};a.hostCallArgs["DdaMethod"]={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:a.dispId};a.hostCallArgs["__timeout__"]=-1;a.onCalling&&a.onCalling();if(!OSF.getClientEndPoint())return;OSF.getClientEndPoint().invoke("executeMethod",function(d,c){a.onReceiving&&a.onReceiving();var b;if(d==Microsoft.Office.Common.InvokeResultCode.noError){OSF.DDA.WAC.Delegate.version=c["Version"];b=c["Error"]}else switch(d){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}a.onComplete&&a.onComplete(b,c)},a.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(c,a){var b=(new Date).getTime();return function(f,e){a.onReceiving&&a.onReceiving();var d;if(f!=Microsoft.Office.Common.InvokeResultCode.noError)switch(f){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:d=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:d=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else if(e)if(e["Error"])d=e["Error"];else d=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;else d=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;a.onComplete&&a.onComplete(d);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(c,a.dispId,Math.abs((new Date).getTime()-b),d)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(a){a.onCalling&&a.onCalling();if(!OSF.getClientEndPoint())return;OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(a.targetId,a.eventType),function(b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true,a),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:a.dispId,targetId:a.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(a){a.onCalling&&a.onCalling();if(!OSF.getClientEndPoint())return;OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(a.targetId,a.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false,a),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:a.dispId,targetId:a.targetId})};(function(b){var a=function(){var a=null;function b(){this._configPromise=a}b.isSovereignVersion=function(){return typeof isOsfSovereignVersion!=="undefined"&&isOsfSovereignVersion===true};b.prototype.getEnvironmentName=function(){return this.getConfig().then(function(b){return b&&b.envName?b.envName:a})};b.prototype.getEnvironmentType=function(){return this.getConfig().then(function(b){return b&&b.envType?b.envType:a})};b.prototype.getTrustedHostOrigins=function(){return this.getConfig().then(function(b){return b!=a?b.trustedHostOrigins:a})};b.prototype.isConfigAvailable=function(){return this.getConfig().then(function(b){return b!=a})};b.prototype.isSovereignHostTrusted=function(a){if(!a)return Office.Promise.resolve(false);else if(a===window.location.hostname)return Office.Promise.resolve(true);return this.getTrustedHostOrigins().then(function(b){if(!b||b.length==0)return false;var c=new RegExp(b.join("|"));return c.test(a)})};b.prototype.getConfigPath=function(){var a=OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath();if(a){a=a.toLowerCase();var c="/lib/",b=a.indexOf(c);if(b>-1)return a.toLowerCase().substring(0,b+c.length)+"officeconfig.json"}return ""};b.prototype.getConfig=function(){var a=this;if(!a._configPromise)a._configPromise=a.tryLoadConfig();return a._configPromise};b.prototype.tryLoadConfig=function(){var c=this.getConfigPath();if(c){var d=OSF.OUtil.getLocalStorage(),f=c+"_cache",g=d.getItem(f),b=a;if(g){try{b=JSON.parse(g)}catch(i){}var h=1e3*60*60*24,e=(new Date).getTime();if(b&&b.config&&b.createTime<=e&&b.createTime+h>=e)return Office.Promise.resolve(b.config)}return this.downloadConfig(c).then(function(a){if(a){b={createTime:(new Date).getTime(),config:a};d.setItem(f,JSON.stringify(b))}else if(b)a=b.config;return a})}return Office.Promise.resolve(a)};b.prototype.downloadConfig=function(b){return new Office.Promise(function(c){OSF.OUtil.xhrGet(b,function(b){try{c(JSON.parse(b))}catch(d){c(a)}},function(){c(a)})})};return b}();b.SovereignHelper=a})(OfficeExt||(OfficeExt={}));OSF.OUtil.setNamespace("WebApp",OSF);OSF.OUtil.setNamespace("Messaging",OSF);OSF.OUtil.setNamespace("ExtensionLifeCycle",OSF);OSF.OUtil.setNamespace("TaskPaneAction",OSF);OSF.OUtil.setNamespace("RibbonGallery",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(a){if(OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash)return a+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash();else return a};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var b=document.querySelectorAll("a[data-officejs-navigate]"),a=0;a0?a.substr(0,d):null,c=b!==null?b.toLowerCase()==="http"||b.toLowerCase()==="https":true;c=c&&a!="#"&&a!="/"&&a!=""&&a!=OSF._OfficeAppFactory.getWebAppState().webAppUrl;return c};OSF.InitializationHelper=function(e,b,g,f,c){var a=this;a._hostInfo=e;a._webAppState=b;a._context=g;a._settings=f;a._hostFacade=c;a._appContext={};a._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";a._initializeSettings=function(g,f){var d,b=g.get_settings(),c=OSF.OUtil.getSessionStorage();if(c){var a=c.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey());if(a)b=JSON.parse(a);else{a=JSON.stringify(b);c.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),a)}}var e=OSF.DDA.SettingsManager.deserializeSettings(b);if(f)d=new OSF.DDA.RefreshableSettings(e);else d=new OSF.DDA.Settings(e);return d};var d=function(b){var a=window.open;b.open=function(f,c,d){var b=null,e=OSF._OfficeAppFactory.getHostInfo();try{if(e.hostType==="outlook"&&e.hostPlatform==="web"&&e.flags&OSF.HostInfoFlags.IsMonarch){b=a("about:blank?unfiltered",c,d);if(b)b.location=f;else b=a(f,c,d)}else b=a(f,c,d)}catch(h){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+h)}if(!b){var k={strUrl:f,strWindowName:c,strWindowFeatures:d};OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,k)}if(OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.EnablingWindowOpenUsageLogging))if(e&&e.hostType==="outlook"&&e.hostPlatform==="web")if(!c||c&&c.indexOf("hostInfo")==-1){var g=d&&String(d).toLowerCase(),i=g&&(g.indexOf("width")>-1||g.indexOf("height")>-1)?1:0,j=b!=null?0:1;OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(-10,i,0,j)}return b}};d(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(b){var d="IsDialog",a=true,f=function(){var b=OSF.OUtil.parseXdmInfo(a);if(b){var c=b.split("|");return c[1]}return null},c=OSF.OUtil.getSessionStorage();if(c){if(!b)b=OSF.OUtil.parseHostInfoFromWindowName(a,OSF._OfficeAppFactory.getWindowName());if(b&&b.indexOf("isDialog")>-1){var e=f();e!=null&&c.setItem(e+d,"true");this._hostInfo.isDialog=a;return}this._hostInfo.isDialog=c.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,false)+d)!=null?a:false}};OSF.InitializationHelper.prototype.getAppContext=function(g,e){var a=this;OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("OsfControl activation lifecycle: getAppContext got called.");var b=a,d=function(i,a){var d;if(a._appName===OSF.AppName.ExcelWebApp){var f=a._settings;d={};for(var p in f){var k=f[p];d[k[0]]=k[1]}}else d=a._settings;if(a._appName===OSF.AppName.OutlookWebApp&&!!a._requirementMatrix&&a._requirementMatrix.indexOf("react")==-1)OSF.AgaveHostAction.SendTelemetryEvent=undefined;if(!b._hostInfo.isDialog||window.opener==null){var o=window.location.origin;b._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[b._webAppState.id,OSF.AgaveHostAction.UpdateTargetUrl,o])}if(i===0&&a._id!=undefined&&a._appName!=undefined&&a._appVersion!=undefined&&a._appUILocale!=undefined&&a._dataLocale!=undefined&&a._docUrl!=undefined&&a._clientMode!=undefined&&a._settings!=undefined&&a._reason!=undefined){b._appContext=a;var m=a._appInstanceId?a._appInstanceId:a._id,n=false,l=true,h=0;if(a._appMinorVersion!=undefined)h=a._appMinorVersion;var g=undefined;if(a._requirementMatrix!=undefined)g=a._requirementMatrix;a.eToken=a.eToken?a.eToken:"";var c=new OSF.OfficeAppContext(a._id,a._appName,a._appVersion,a._appUILocale,a._dataLocale,a._docUrl,a._clientMode,d,a._reason,a._osfControlType,a._eToken,a._correlationId,m,n,l,h,g,a._hostCustomMessage,a._hostFullVersion,a._clientWindowHeight,a._clientWindowWidth,a._addinName,a._appDomains,a._dialogRequirementMatrix,a._featureGates,a._officeTheme,a._initialDisplayMode);c._wacHostEnvironment=a._wacHostEnvironment||"0";c._isFromWacAutomation=!!a._isFromWacAutomation;c._marketplaceType=a._marketplaceType;OSF.AppTelemetry&&OSF.AppTelemetry.initialize(c);e(c)}else{var j="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+i+", exception: "+a;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(j);throw j}};try{if(a._hostInfo.isDialog&&window.opener!=null){var f=OfficeExt.WACUtils.parseAppContextFromWindowName(false,OSF._OfficeAppFactory.getWindowName());d(0,f)}else a._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",d,a._webAppState.id)}catch(c){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+c+"]");throw c}};OSF.InitializationHelper.prototype.isHostOriginTrusted=function(){};OSF.InitializationHelper.prototype.performUserTrustCheck=function(e,b,h){var a=false,f=this,g="NotHttps",c=function(){var d=OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath().match(/^https?:\/\/[^:/?#]*(?::([0-9]+))?/);if(d&&d[0]){var k=OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"AgaveErrorUX/index.html#",i={error:"NotTrustedWAC",locale:OSF.getSupportedLocale(f._hostInfo.hostLocale,OSF.ConstantNames.DefaultLocale),hostname:e,noHttps:!b,validate:a,useHtmlPopup:OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.HostTrustDialog),isConfirm:a},c=document.createElement("iframe");c.style.visibility="hidden";c.style.height="0";c.style.width="0";function j(b){if(b.source==c.contentWindow&&b.origin==d[0])try{var e=JSON.parse(b.data),l=Function._validateParams(e,[{name:"hostUserTrusted",type:Boolean,mayBeNull:a}]);if(e.hostUserTrusted===true){f._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.trusted;OSF.OUtil.removeEventListener(window,"message",j);document.body.removeChild(c)}else{i.validate=a;if(OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.HostTrustDialog))if(window.innerHeight*window.innerWidth===0){var g={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:null,onCalling:null};OSF.DDA.WAC.Delegate.registerEventAsync(g)}window.location.replace(k+encodeURIComponent(JSON.stringify(i)))}h()}catch(l){document.body.textContent=Strings.OfficeOM.L_NotTrustedWAC}}OSF.OUtil.addEventListener(window,"message",j);i.validate=true;c.setAttribute("src",k+encodeURIComponent(JSON.stringify(i)));c.onload=function(){var a={hostname:e,noHttps:!b};c.contentWindow.postMessage(JSON.stringify(a),d[0])};document.body.appendChild(c)}else document.body.textContent=Strings.OfficeOM.L_NotTrustedWAC;if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps))if(!b)throw new Error(g)};if(document.body)c();else{var d=a;document.addEventListener("DOMContentLoaded",function(){if(!d){d=true;c()}})}};OSF.InitializationHelper.prototype.checkWellKnownOrigins=function(c,g,d){var a=this;if(a._webAppState.clientEndPoint._hostTrustCheckStatus===Microsoft.Office.Common.HostTrustStatus.unknown){if(!g)a._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.nothttps;if(a._webAppState.clientEndPoint._hostTrustCheckStatus!=Microsoft.Office.Common.HostTrustStatus.nothttps){var e=OfficeExt.SovereignHelper.isSovereignVersion(),b=false;if(!e||typeof officeInitializationSettings==="object"&&officeInitializationSettings.trustAllCloudEnvironments===true){b=Microsoft.Office.Common.XdmCommunicationManager.isHostNameValidWacDomain(c);if(a.isHostOriginTrusted)b=b||a.isHostOriginTrusted(c);if(b)a._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.trusted}if(!b&&e){if(!a._sovereignHelper)a._sovereignHelper=new OfficeExt.SovereignHelper;var f=a._sovereignHelper;f.isConfigAvailable().then(function(b){b&&f.isSovereignHostTrusted(c).then(function(b){if(b)a._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.trusted;d()})});return}}}d()};OSF.InitializationHelper.prototype.checkReceiverOriginAndRun=function(b){var a=this;if(a._webAppState.clientEndPoint._hostTrustCheckStatus===Microsoft.Office.Common.HostTrustStatus.trusted){b();return}var c=OSF.OUtil.parseUrl(a._webAppState.clientEndPoint._targetUrl,false),d=c.hostname,e=c.protocol=="https:";a.checkWellKnownOrigins(d,e,function(){if(!a._webAppState.clientEndPoint._checkStatusLogged&&a._hostInfo!=null&&a._hostInfo!==undefined){var c=OSF.OUtil.getLocalStorage().isLocalStorageAvailable();OSF.AppTelemetry.onCheckWACHost(a._webAppState.clientEndPoint._hostTrustCheckStatus,a._webAppState.id,a._hostInfo.hostType,a._hostInfo.hostPlatform,a._webAppState.clientEndPoint._targetUrl,c);a._webAppState.clientEndPoint._checkStatusLogged=true}if(a._webAppState.clientEndPoint._hostTrustCheckStatus===Microsoft.Office.Common.HostTrustStatus.trusted)b();else a.performUserTrustCheck(d,e,b)})};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var d=null,b=false;try{var a=this,e=OSF.OUtil.parseXdmInfoWithGivenFragment(b,OSF._OfficeAppFactory.getWindowLocationHash());if(!e&&OSF._OfficeAppFactory.getWindowName)e=OSF.OUtil.parseXdmInfoFromWindowName(b,OSF._OfficeAppFactory.getWindowName());if(e){var c=OSF.OUtil.getInfoItems(e);if(c!=undefined&&c.length>=3){a._webAppState.conversationID=c[0];a._webAppState.id=c[1];a._webAppState.webAppUrl=c[2].indexOf(":")>=0?c[2]:decodeURIComponent(c[2])}}a._webAppState.wnd=window.opener!=d?window.opener:window.parent;var f=OSF.OUtil.parseSerializerVersionWithGivenFragment(b,OSF._OfficeAppFactory.getWindowLocationHash());if(isNaN(f)&&OSF._OfficeAppFactory.getWindowName)f=OSF.OUtil.parseSerializerVersionFromWindowName(b,OSF._OfficeAppFactory.getWindowName());a._webAppState.serializerVersion=f;if(this._hostInfo.isDialog&&window.opener!=d)return;a._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(a._webAppState.conversationID,a._webAppState.wnd,a._webAppState.webAppUrl,a._webAppState.serializerVersion);a._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(a._webAppState.id);a._webAppState.clientEndPoint._checkReceiverOriginAndRun=function(b){a.checkReceiverOriginAndRun(b)};var h=a._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;a._webAppState.serviceEndPoint.registerConversation(h,a._webAppState.webAppUrl);var i=function(f){var c="ContextActivationManager_notifyHost",e;if(typeof f=="string")e=f;else e=f[0];switch(e){case OSF.AgaveHostAction.Select:a._webAppState.focused=true;break;case OSF.AgaveHostAction.UnSelect:a._webAppState.focused=b;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();var h=document.querySelectorAll(a._tabbableElements),g=OSF.OUtil.focusToFirstTabbable(h,b);if(!g){window.blur();a._webAppState.focused=b;a._webAppState.clientEndPoint.invoke(c,d,[a._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])}break;case OSF.AgaveHostAction.TabInShift:window.focus();var h=document.querySelectorAll(a._tabbableElements),g=OSF.OUtil.focusToFirstTabbable(h,true);if(!g){window.blur();a._webAppState.focused=b;a._webAppState.clientEndPoint.invoke(c,d,[a._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift])}break;case OSF.AgaveHostAction.SendMessage:if(window.Office.context.messaging.onMessage){var i=f[1];window.Office.context.messaging.onMessage(i)}break;case OSF.AgaveHostAction.TaskPaneHeaderButtonClicked:window.Office.context.ui.taskPaneAction.onHeaderButtonClick&&window.Office.context.ui.taskPaneAction.onHeaderButtonClick();break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+e+" notifyAgave is wrong.")}};a._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",i,Microsoft.Office.Common.InvokeType.async,b);a.addOrRemoveEventListenersForWindow(true)}catch(g){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+g+"]");throw g}};OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(i){var h="keypress",c=null,b="ContextActivationManager_notifyHost",a=this,f=function(){if(!a._webAppState.focused)a._webAppState.focused=true;a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.Select])},g=function(){if(!OSF)return;if(a._webAppState.focused)a._webAppState.focused=false;a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.UnSelect])},e=function(d){d.preventDefault=d.preventDefault||function(){d.returnValue=false};if(d.keyCode==117&&(d.ctrlKey||d.metaKey)){d.preventDefault();var g=OSF.AgaveHostAction.CtrlF6Exit;if(d.shiftKey)g=OSF.AgaveHostAction.CtrlF6ExitShift;a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,g])}else if(d.keyCode==9){var e=a._appContext._isPowerPointModernSlideShowEnabled&&a._appContext._appName==OSF.AppName.PowerpointWebApp&&a._appContext._clientMode==OSF.ClientMode.ReadOnly&&a._appContext._osfControlType==OSF.OsfControlType.DocumentLevel;!e&&d.preventDefault();var f=document.querySelectorAll(a._tabbableElements),h=OSF.OUtil.focusToNextTabbable(f,d.target||d.srcElement,d.shiftKey);if(h)e&&d.preventDefault();else if(a._hostInfo.isDialog)OSF.OUtil.focusToFirstTabbable(f,d.shiftKey);else if(d.shiftKey)!e&&a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.TabExitShift]);else if(OSF.OUtil.checkFlight(OSF.FlightNames.SetFocusToTaskpaneIsEnabled)&&d.target&&d.target.tagName.toUpperCase()==="BODY")OSF.OUtil.focusToFirstTabbable(f,d.shiftKey);else!e&&a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.TabExit])}else if(d.keyCode==27){d.preventDefault();a.dismissDialogNotification&&a.dismissDialogNotification();a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.EscExit])}else if(d.keyCode==113){d.preventDefault();a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.F2Exit])}else if((d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)&&d.keyCode>=1&&d.keyCode<=255){var i={keyCode:d.keyCode,shiftKey:d.shiftKey,altKey:d.altKey,ctrlKey:d.ctrlKey,metaKey:d.metaKey};a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.KeyboardShortcuts,i])}},d=function(a){if(a.keyCode==117&&a.ctrlKey)if(a.preventDefault)a.preventDefault();else a.returnValue=false};if(i){OSF.OUtil.addEventListener(window,"focus",f);OSF.OUtil.addEventListener(window,"blur",g);OSF.OUtil.addEventListener(window,"keydown",e);OSF.OUtil.addEventListener(window,h,d)}else{OSF.OUtil.removeEventListener(window,"focus",f);OSF.OUtil.removeEventListener(window,"blur",g);OSF.OUtil.removeEventListener(window,"keydown",e);OSF.OUtil.removeEventListener(window,h,d)}};OSF.InitializationHelper.prototype.initWebDialog=function(a){if(a.get_isDialog()){if(OSF.DDA.UI.ChildUI){var b=window.opener!=null;a.ui=new OSF.DDA.UI.ChildUI(b);if(b)this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else if(OSF.DDA.UI.ParentUI){a.ui=new OSF.DDA.UI.ParentUI;OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(a.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync])}};OSF.InitializationHelper.prototype.initWebAuth=function(d){if(OSF.DDA.Auth){d.auth=new OSF.DDA.Auth;var a=[],b=OSF.DDA.AsyncMethodNames.GetAccessTokenAsync;b&&a.push(b);var c=OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync;c&&a.push(c);OSF.DDA.DispIdHost.addAsyncMethods(d.auth,a)}};OSF.InitializationHelper.prototype.initWebAuthImplicit=function(a){if(OSF.DDA.WebAuth){a.webAuth=new OSF.DDA.WebAuth;OSF.DDA.DispIdHost.addAsyncMethods(a.webAuth,[OSF.DDA.AsyncMethodNames.GetAuthContextAsync])}};OSF.getClientEndPoint=function(){var a=OSF._OfficeAppFactory.getInitializationHelper();return a._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var a=this;if(a._hostInfo.isDialog){window.focus();var c=document.querySelectorAll(a._tabbableElements),b=OSF.OUtil.focusToFirstTabbable(c,false);if(!b){window.blur();a._webAppState.focused=false;a._webAppState.clientEndPoint&&a._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[a._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])}}};OSF.Messaging.sendMessage=function(a){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.SendMessage,a])};OSF.ExtensionLifeCycle.launchExtensionComponent=function(a){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.LaunchExtensionComponent,a])};OSF.ExtensionLifeCycle.stopExtensionComponent=function(a){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.StopExtensionComponent,a])};OSF.ExtensionLifeCycle.restartExtensionComponent=function(a){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.RestartExtensionComponent,a])};OSF.ExtensionLifeCycle.close=function(a){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.CloseSDXDialog,a])};OSF.TaskPaneAction.enableHeaderButton=function(a){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.EnableTaskPaneHeaderButton,a])};OSF.TaskPaneAction.disableHeaderButton=function(){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.DisableTaskPaneHeaderButton])};OSF.RibbonGallery.refreshRibbon=function(a){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.RefreshRibbonGallery,a])};var OSFLog;(function(g){var e="ResponseTime",d="Message",c="SessionId",b="CorrelationId",a=true,f=function(){function b(a){this._table=a;this._fields={}}Object.defineProperty(b.prototype,"Fields",{"get":function(){return this._fields},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"Table",{"get":function(){return this._table},enumerable:a,configurable:a});b.prototype.SerializeFields=function(){};b.prototype.SetSerializedField=function(b,a){if(typeof a!=="undefined"&&a!==null)this._serializedFields[b]=a.toString()};b.prototype.SerializeRow=function(){var a=this;a._serializedFields={};a.SetSerializedField("Table",a._table);a.SerializeFields();return JSON.stringify(a._serializedFields)};return b}();g.BaseUsageData=f;var i=function(w){var v="IsMOS",u="IsFromWacAutomation",t="WacHostEnvironment",s="HostJSVersion",r="OfficeJSVersion",q="DocUrl",p="AppSizeHeight",o="AppSizeWidth",n="ClientId",m="HostVersion",l="Host",k="UserId",j="Browser",i="AssetId",h="AppURL",g="AppInstanceId",f="AppId";__extends(e,w);function e(){return w.call(this,"AppActivated")||this}Object.defineProperty(e.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,i,{"get":function(){return this.Fields[i]},"set":function(a){this.Fields[i]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,j,{"get":function(){return this.Fields[j]},"set":function(a){this.Fields[j]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,k,{"get":function(){return this.Fields[k]},"set":function(a){this.Fields[k]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,l,{"get":function(){return this.Fields[l]},"set":function(a){this.Fields[l]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,m,{"get":function(){return this.Fields[m]},"set":function(a){this.Fields[m]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,n,{"get":function(){return this.Fields[n]},"set":function(a){this.Fields[n]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,o,{"get":function(){return this.Fields[o]},"set":function(a){this.Fields[o]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,p,{"get":function(){return this.Fields[p]},"set":function(a){this.Fields[p]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,q,{"get":function(){return this.Fields[q]},"set":function(a){this.Fields[q]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,r,{"get":function(){return this.Fields[r]},"set":function(a){this.Fields[r]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,s,{"get":function(){return this.Fields[s]},"set":function(a){this.Fields[s]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,t,{"get":function(){return this.Fields[t]},"set":function(a){this.Fields[t]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,u,{"get":function(){return this.Fields[u]},"set":function(a){this.Fields[u]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,v,{"get":function(){return this.Fields[v]},"set":function(a){this.Fields[v]=a},enumerable:a,configurable:a});e.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(f,a.AppId);a.SetSerializedField(g,a.AppInstanceId);a.SetSerializedField(h,a.AppURL);a.SetSerializedField(i,a.AssetId);a.SetSerializedField(j,a.Browser);a.SetSerializedField(k,a.UserId);a.SetSerializedField(l,a.Host);a.SetSerializedField(m,a.HostVersion);a.SetSerializedField(n,a.ClientId);a.SetSerializedField(o,a.AppSizeWidth);a.SetSerializedField(p,a.AppSizeHeight);a.SetSerializedField(d,a.Message);a.SetSerializedField(q,a.DocUrl);a.SetSerializedField(r,a.OfficeJSVersion);a.SetSerializedField(s,a.HostJSVersion);a.SetSerializedField(t,a.WacHostEnvironment);a.SetSerializedField(u,a.IsFromWacAutomation);a.SetSerializedField(v,a.IsMOS)};return e}(f);g.AppActivatedUsageData=i;var k=function(h){var f="StartTime",d="ScriptId";__extends(g,h);function g(){return h.call(this,"ScriptLoad")||this}Object.defineProperty(g.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});g.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(d,a.ScriptId);a.SetSerializedField(f,a.StartTime);a.SetSerializedField(e,a.ResponseTime)};return g}(f);g.ScriptLoadUsageData=k;var l=function(j){var h="CloseMethod",g="OpenTime",f="AppSizeFinalHeight",e="AppSizeFinalWidth",d="FocusTime";__extends(i,j);function i(){return j.call(this,"AppClosed")||this}Object.defineProperty(i.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});i.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(d,a.FocusTime);a.SetSerializedField(e,a.AppSizeFinalWidth);a.SetSerializedField(f,a.AppSizeFinalHeight);a.SetSerializedField(g,a.OpenTime);a.SetSerializedField(h,a.CloseMethod)};return i}(f);g.AppClosedUsageData=l;var m=function(j){var f="ErrorType",d="Parameters",h="APIID",g="APIType";__extends(i,j);function i(){return j.call(this,"APIUsage")||this}Object.defineProperty(i.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});i.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(g,a.APIType);a.SetSerializedField(h,a.APIID);a.SetSerializedField(d,a.Parameters);a.SetSerializedField(e,a.ResponseTime);a.SetSerializedField(f,a.ErrorType)};return i}(f);g.APIUsageUsageData=m;var h=function(g){var e="SuccessCode";__extends(f,g);function f(){return g.call(this,"AppInitialization")||this}Object.defineProperty(f.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(f.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(f.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(f.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});f.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(e,a.SuccessCode);a.SetSerializedField(d,a.Message)};return f}(f);g.AppInitializationUsageData=h;var j=function(i){var g="isLocalStorageAvailable",f="wacDomain",e="hostPlatform",d="hostType",c="instanceId",b="isWacKnownHost";__extends(h,i);function h(){return i.call(this,"CheckWACHost")||this}Object.defineProperty(h.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});h.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.isWacKnownHost);a.SetSerializedField(c,a.instanceId);a.SetSerializedField(d,a.hostType);a.SetSerializedField(e,a.hostPlatform);a.SetSerializedField(f,a.wacDomain);a.SetSerializedField(g,a.isLocalStorageAvailable)};return h}(f);g.CheckWACHostUsageData=j})(OSFLog||(OSFLog={}));var Logger;(function(a){"use strict";var e;(function(a){a[a["info"]=0]="info";a[a["warning"]=1]="warning";a[a["error"]=2]="error"})(e=a.TraceLevel||(a.TraceLevel={}));var f;(function(a){a[a["none"]=0]="none";a[a["flush"]=1]="flush"})(f=a.SendFlag||(a.SendFlag={}));function b(){}a.allowUploadingData=b;function g(){}a.sendLog=g;function c(){try{return new d}catch(a){return null}}var d=function(){function a(){}a.prototype.writeLog=function(){};a.prototype.loadProxyFrame=function(){};return a}();if(!OSF.Logger)OSF.Logger=a;a.ulsEndpoint=c()})(Logger||(Logger={}));var OSFAriaLogger;(function(w){var e="undefined",f="hostPlatform",h="hostType",j="ResponseTime",g="double",a=false,d="int64",b="string",c=true,l={name:"AppActivated",enabled:c,critical:c,points:[{name:"Browser",type:b},{name:"Message",type:b},{name:"Host",type:b},{name:"AppSizeWidth",type:d},{name:"AppSizeHeight",type:d},{name:"IsFromWacAutomation",type:b},{name:"IsMOS",type:d}]},n={name:"ScriptLoad",enabled:c,critical:a,points:[{name:"ScriptId",type:b},{name:"StartTime",type:g},{name:j,type:g}]},v=o(),s={name:"APIUsage",enabled:v,critical:a,points:[{name:"APIType",type:b},{name:"APIID",type:d},{name:"Parameters",type:b},{name:j,type:d},{name:"ErrorType",type:d}]},k={name:"AppInitialization",enabled:c,critical:a,points:[{name:"SuccessCode",type:d},{name:"Message",type:b}]},p={name:"AppClosed",enabled:c,critical:a,points:[{name:"FocusTime",type:d},{name:"AppSizeFinalWidth",type:d},{name:"AppSizeFinalHeight",type:d},{name:"OpenTime",type:d}]},m={name:"CheckWACHost",enabled:c,critical:a,points:[{name:"isWacKnownHost",type:d},{name:"solutionId",type:b},{name:h,type:b},{name:f,type:b},{name:"correlationId",type:b},{name:"isLocalStorageAvailable",type:"boolean"}]},u=[l,n,s,k,p,m];function t(a,e){var f=e.rename===undefined?e.name:e.rename,h=e.type,c=undefined;switch(h){case b:c=oteljs.makeStringDataField(f,a);break;case g:if(typeof a===b)a=parseFloat(a);c=oteljs.makeDoubleDataField(f,a);break;case d:if(typeof a===b)a=parseInt(a);c=oteljs.makeInt64DataField(f,a);break;case "boolean":if(typeof a===b)a=a==="true";c=oteljs.makeBooleanDataField(f,a)}return c}function i(d){for(var a=0,b=u;ad[b])return a}return a};b.prototype.isDirectToAriaEnabled=function(){var a=this;if(a.EnableDirectToAria===undefined||a.EnableDirectToAria===null){var c=void 0,b=void 0;if(OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo)c=OSF._OfficeAppFactory.getHostInfo()[f];if(window.external&&typeof window.external.GetContext!==e&&typeof window.external.GetContext().GetHostFullVersion!==e)b=window.external.GetContext().GetHostFullVersion();a.EnableDirectToAria=a.shouldSendDirectToAria(c,b)}return a.EnableDirectToAria};b.prototype.sendTelemetry=function(c,a){var e=1e3,d=b.EnableSendingTelemetryWithLegacyAria&&this.isDirectToAriaEnabled();d&&OSF.OUtil.loadScript(this.getAriaCDNLocation(),function(){try{if(!this.ALogger){var e="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439";this.ALogger=AWTLogManager.initialize(e)}var b=new AWTEventProperties;b.setName("Office.Extensibility.OfficeJS."+c);for(var d in a)d.toLowerCase()!=="table"&&b.setProperty(d,a[d]);var f=new Date;b.setProperty("Date",f.toISOString());this.ALogger.logEvent(b)}catch(g){}},e);b.EnableSendingTelemetryWithOTel&&r(c,a)};b.prototype.logData=function(a){if(this.isIUsageData(a))this.sendTelemetry(a["Table"],a["Fields"]);else this.sendTelemetry(a["Table"],a)};b.EnableSendingTelemetryWithOTel=c;b.EnableSendingTelemetryWithLegacyAria=a;return b}();w.AriaLogger=y})(OSFAriaLogger||(OSFAriaLogger={}));var OSFAppTelemetry;(function(d){var e=false,b=null,f=true,c="";"use strict";var a,h=OSF.OUtil.Guid.generateNewGuid(),k=c,x=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"),q="PRIVATE";d.enableTelemetry=f;var r=function(){function a(){}return a}();d.AppInfo=r;var j=function(){function a(b,a){this.name=b;this.handler=a}return a}(),n=function(){function a(){this.clientIDKey="Office API client";this.logIdSetKey="Office App Log Id Set"}a.prototype.getClientId=function(){var b=this,a=b.getValue(b.clientIDKey);if(!a||a.length<=0||a.length>40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),i=function(){function a(){}a.prototype.LogData=function(a){if(!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(a)}catch(b){}};a.prototype.LogRawData=function(a){if(!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function g(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function H(i){if(!d.enableTelemetry)return;if(a)return;a=new r;if(i.get_hostFullVersion())a.hostVersion=i.get_hostFullVersion();else a.hostVersion=i.get_appVersion();a.appId=m()?i.get_id():q;a.marketplaceType=i._marketplaceType;a.browser=window.navigator.userAgent;a.correlationId=g(i.get_correlationId());a.clientId=(new n).getClientId();a.appInstanceId=i.get_appInstanceId();if(a.appInstanceId){a.appInstanceId=g(a.appInstanceId);a.appInstanceId=o(i.get_id(),a.appInstanceId)}a.message=i.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="0.0.0.0";if(i._wacHostEnvironment)a.wacHostEnvironment=i._wacHostEnvironment;if(i._isFromWacAutomation!==undefined&&i._isFromWacAutomation!==b)a.isFromWacAutomation=i._isFromWacAutomation.toString().toLowerCase();var l=i.get_docUrl();a.docUrl=x.test(l)?l:c;var k=location.href;if(k)k=k.split("?")[0].split("#")[0];a.isMos=s();a.appURL=c;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(i.get_eToken(),a);a.sessionId=h;typeof OTel!=="undefined"&&OTel.OTelLogger.initialize(a);(function(){var m=new Date,c=b,i=0,l=e,g=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){i+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new j("focus",g));a.push(new j("blur",g));a.push(new j("focusout",g));a.push(new j("focusin",g));var k=function(){for(var e=0;e0)for(var b=0;b0)for(var b=0;b0){this._eventHandlers[a]=[];return true}return false},clearObjectEventHandlers:function(a,b){if(this._objectEventHandlers[a]!=null&&this._objectEventHandlers[a][b]!=null){this._objectEventHandlers[a][b]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},getObjectEventHandlerCount:function(a,b){if(this._objectEventHandlers[a]==null||this._objectEventHandlers[a][b]==null)return 0;return this._objectEventHandlers[a][b].length},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){for(var d=this._eventHandlers[b],c=0;c0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(c,f,b){var h="hostPlatform",e="outlook",d="hostType",g=this,a;switch(c){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(g.manufactureBinding(b,f.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(g.manufactureBinding(b,f.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);OSF._OfficeAppFactory.getHostInfo()[d]==e&&OSF._OfficeAppFactory.getHostInfo()[h]=="mac"&&OSF.DDA.convertOlkAppointmentTimeToDateFormat(a);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:a=new OSF.DDA.ObjectEventArgs(c,b[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:a=new OSF.DDA.RichApiMessageEventArgs(c,b);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);f.initialize(a["initialData"]);(OSF._OfficeAppFactory.getHostInfo()[h]=="win32"||OSF._OfficeAppFactory.getHostInfo()[h]=="mac")&&f.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkRecipientsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkRecurrenceChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkAttachmentsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.InfobarClicked:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkInfobarClickedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkSelectedItemsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkSensitivityLabelChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RichApiMessage:"richApiMessage"});OSF.DDA.RichApiMessageEventArgs=function(f,e){var b=e[Microsoft.Office.WebExtension.Parameters.Data],d=[];if(b)for(var c=0;c100)b[Microsoft.Office.WebExtension.Parameters.Width]=99;if(b[Microsoft.Office.WebExtension.Parameters.Height]<=0)b[Microsoft.Office.WebExtension.Parameters.Height]=1;if(!b[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&b[Microsoft.Office.WebExtension.Parameters.Height]>100)b[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!b[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])b[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=a;return b}})};b.messageChildRichApiBridge=function(){if(OSF.DDA.UI.EnableMessageChildDialogAPI===a){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return b(arguments,null,null)}};b.initOnce=function(){b.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync,b.displayDialogAsyncApiSupportedOptions);b.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync,b.displayModalDialogAsyncApiSupportedOptions)};b.displayDialogAsyncApiSupportedOptions=[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:[c],defaultValue:d}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:[c],defaultValue:d}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:[c],defaultValue:d}},{name:Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.EnforceAppDomain,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo,value:{types:[c],defaultValue:d}}];b.displayModalDialogAsyncApiSupportedOptions=b.displayDialogAsyncApiSupportedOptions.concat([{name:"abortWhenParentIsMinimized",value:{types:[c],defaultValue:d}},{name:"abortWhenDocIsInactive",value:{types:[c],defaultValue:d}}]);return b}();DialogApiManager.initOnce();OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent",MessageOrigin:"messageOrigin",TargetOrigin:"targetOrigin"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent",MessageOrigin:"messageOrigin",TargetOrigin:"targetOrigin"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent",TargetOrigin:"targetOrigin"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent",TargetOrigin:"targetOrigin"};(function(a){var b;(function(c){var a={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook",Visio:"visio"};function d(c){switch(c){case a.Excel:case a.Word:case a.PowerPoint:case a.Outlook:case a.Visio:return new b;default:return new b}return null}c.getDialogCssManager=d;var b=function(){var a=";";function b(){var f="height: 100px",b="font-size: 14px",a="font-family: Segoe UI,Arial,Verdana,sans-serif",e="margin: 20px 14px",d="width: 100%",c="position: absolute",g=this;g.overlayElementCSS=[c,"top: 0","left: 0",d,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];g.dialogNotificationPanelCSS=[d,"height: 190px",c,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];g.newWindowNotificationTextPanelCSS=[e,a,b,f,"line-height: 100px"];g.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];g.crossZoneNotificationTextPanelCSS=[e,a,b,f];g.dialogNotificationButtonPanelCSS="margin:0px 9px";g.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",b,a,"margin: 0px 5px","border-width: 1px","border-style: solid"]}b.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(a)};b.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(a)};b.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(a)};b.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(a)};b.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(a)};b.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS};b.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(a)};return b}();c.DefaultDialogCSSManager=b})(b=a.WacCommonUICssManager||(a.WacCommonUICssManager={}))})(OfficeExt||(OfficeExt={}));(function(a){var b;(function(b){var c;(function(m){var d="div",g="string",f="//",i="message",l="storage",e=true,j="keydown",c=false,b=null,h=b,t=b,o=b,k=b,N="osfDialogInternal:action=closeDialog",n=b,z=c,v=-1,M="messageParentKey",s=b,H="#ababab",F="#ffffff",Q="#ccc",I="newWindowNotificaiton",W="crossZoneNotification",A="configureBrowserLink",w="dialogNotificationTextPanel",q=a.WACUtils.shouldUseLocalStorageToPassMessage(),p={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:b,onCalling:b};function X(c){var a=c.input;if(a!=b)s={HostButtonBorderColor:a[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:a[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]};c.completed()}m.setHostThemeButtonStyle=X;function S(a){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(c);a.completed()}m.removeEventListenersForDialog=S;function Y(g){try{if(!ab(g)){n(OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains);return}if(!g[OSF.ShowWindowDialogParameterKeys.PromptBeforeOpen]){O(g);return}z=c;var i=c,t=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,f=a.WacCommonUICssManager.getDialogCssManager(t.hostType),s=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);o=K(f);document.body.insertBefore(o,document.body.firstChild);k=V(f,s);k.id=I;var h=L(f),d=C(f,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),b=C(f,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);h.appendChild(d);h.appendChild(b);k.appendChild(h);document.body.insertBefore(k,document.body.firstChild);d.onclick=function(a){O(g);!z&&r();a.preventDefault();a.stopPropagation()};function l(a){function b(a){u();J(a);n(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}p.onCalling=b;OSF.DDA.WAC.Delegate.unregisterEventAsync(p);a.preventDefault();a.stopPropagation()}b.onclick=l;d.addEventListener(j,function(a){if(a.shiftKey&&a.keyCode==9){x(d);y(b);b.focus();a.preventDefault();a.stopPropagation()}},c);b.addEventListener(j,function(a){if(!a.shiftKey&&a.keyCode==9){x(b);y(d);d.focus();a.preventDefault();a.stopPropagation()}else if(a.keyCode==13){i=e;a.preventDefault();a.stopPropagation()}},c);b.addEventListener("keyup",function(a){if(a.keyCode==13&&i){i=c;l(a)}},c);window.focus();function q(){d.focus()}p.onCalling=q;OSF.DDA.WAC.Delegate.registerEventAsync(p)}catch(m){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+m);n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}m.handleNewWindowDialog=Y;function cb(d){try{if(h!=b){var a=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;if(a)for(var c=0;c-1)window.close();else{var c=a.data,e=typeof c;if(c&&(e=="object"||e==g)){var f=e==g?JSON.parse(c):c,d={};d[OSF.DDA.PropertyDescriptors.MessageContent]=f.messageContent;d[OSF.DDA.PropertyDescriptors.MessageOrigin]=a.origin;var h=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,b,d);OSF.DialogParentMessageEventDispatch.fireEvent(h)}}}window.addEventListener(i,a)}m.registerMessageReceivedEvent=U;function R(a,b){t=a;n=b}m.setHandlerAndShowDialogCallback=R;function T(){try{k&&k.id==I&&n&&n(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+a)}r()}m.escDismissDialogNotification=T;function G(h,i){var f=c,d=a.WacCommonUICssManager.getDialogCssManager(i);o=K(d);document.body.insertBefore(o,document.body.firstChild);k=P(d,h);k.id=W;var g=L(d),b=C(d,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");g.appendChild(b);k.appendChild(g);document.body.insertBefore(k,document.body.firstChild);z=e;b.onclick=function(){r()};b.addEventListener(j,function(a){if(a.keyCode==9){document.getElementById(A).focus();a.preventDefault();a.stopPropagation()}else if(a.keyCode==13){f=e;a.preventDefault();a.stopPropagation()}},c);b.addEventListener("keyup",function(a){if(a.keyCode==13&&f){f=c;r();a.preventDefault();a.stopPropagation()}},c);document.getElementById(A).addEventListener(j,function(a){if(a.keyCode==9){b.focus();a.preventDefault();a.stopPropagation()}},c);window.focus();b.focus()}m.showCrossZoneNotification=G;function Z(b,h,f){if(f===void 0)f=e;if(!b||!h)return c;var i="https:",a=OSF.OUtil.parseUrl(b),d=OSF.OUtil.parseUrl(h),l=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,m=a.protocol===i;if(!m)return c;var k=a.protocol===d.protocol&&a.hostname===d.hostname&&a.port===d.port,j=Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(l,b),g=k||j;if(!g&&f)g=Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(h,b);return g}function D(c){if(c.source==h)try{var d=c.origin,a=OSF._OfficeAppFactory.getInitializationHelper()._appContext._addInSourceUrl;if(!a){a=window.location.origin;if(!a)a=window.location.protocol+f+window.location.hostname+(window.location.port?":"+window.location.port:"")}var i=Z(d,a,e);if(!i)throw new Error("Received a message from a dialog with an untrusted domain.");var b={};b[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;b[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=c.data;b[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin]=d;t(b)}catch(g){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+g)}}function B(b){var d=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+M;if(b.key==d)try{var a={};a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=b.newValue;a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin]=b.origin;t(a)}catch(c){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+c)}}function ab(e){var d=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,c=e[OSF.ShowWindowDialogParameterKeys.Url],b=Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(d,c);if(!b){var a=OSF._OfficeAppFactory.getInitializationHelper()._appContext._addInSourceUrl;if(!a){a=window.location.origin;if(!a)a=window.location.protocol+f+window.location.hostname+(window.location.port?":"+window.location.port:"")}return a&&Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(a,c)}return b}function O(j){var c=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,s=[c.hostType,c.hostPlatform,c.hostSpecificFileVersion,c.hostLocale,c.osfControlAppCorrelationId,"isDialog",c.disableLogging?"disableLogging":"",c.flags&OSF.HostInfoFlags.PublicAddin],m=s.join("$"),d=OSF._OfficeAppFactory.getInitializationHelper()._appContext;d._taskpaneUrl=window.location.origin;if(!d._taskpaneUrl)d._taskpaneUrl=window.location.protocol+f+window.location.hostname+(window.location.port?":"+window.location.port:"");var e=j[OSF.ShowWindowDialogParameterKeys.Url];if(!j[OSF.ShowWindowDialogParameterKeys.UrlNoHostInfo])e=a.WACUtils.addHostInfoAsQueryParam(e,m);var g=JSON.parse(window.name);g[OSF.WindowNameItemKeys.HostInfo]=m;g[OSF.WindowNameItemKeys.AppContext]=d;var p=j[OSF.ShowWindowDialogParameterKeys.Width]*screen.width/100,o=j[OSF.ShowWindowDialogParameterKeys.Height]*screen.height/100,w=d._clientWindowWidth/2-p/2,x=d._clientWindowHeight/2-o/2,k="width="+p+", height="+o+", left="+w+", top="+x+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";if(c.hostType==="outlook"&&c.hostPlatform==="web"&&c.flags&OSF.HostInfoFlags.IsMonarch){h=window.open("about:blank?unfiltered",a.WACUtils.serializeObjectToString(g),k);if(h)h.location=e;else h=window.open(e,a.WACUtils.serializeObjectToString(g),k)}else h=window.open(e,a.WACUtils.serializeObjectToString(g),k);if(h==b){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");u();G(e,c.hostType);n(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}if(q)window.addEventListener(l,B);else window.addEventListener(i,D);function r(){try{if(h==b||h.closed){window.clearInterval(v);if(q)window.removeEventListener(l,B);else window.removeEventListener(i,D);var a={};a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;t(a)}}catch(c){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+c)}}v=window.setInterval(r,1e3);if(n!=b)n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);else OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function C(d,e){var a=document.createElement("input");a.setAttribute("type","button");a.style.cssText=d.getDialogButtonCSS();a.style.borderColor=H;a.style.backgroundColor=F;a.setAttribute("value",e);var c=function(){y(a)},b=function(){x(a)};a.addEventListener("mouseover",c);a.addEventListener("focus",c);a.addEventListener("mouseout",b);a.addEventListener("focusout",b);return a}function y(a){if(s!=b){a.style.borderColor=s.HostButtonBorderColor;a.style.backgroundColor=s.HostButtonBackgroundColor}else if(OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor){a.style.borderColor=OSF.CommonUI.HostButtonBorderColor;a.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor}else a.style.backgroundColor=Q}function x(a){a.style.borderColor=H;a.style.backgroundColor=F}function r(){function a(a){u();J(a)}p.onCalling=a;OSF.DDA.WAC.Delegate.unregisterEventAsync(p)}function u(){if(k!=b){document.body.removeChild(k);k=b}if(o!=b){document.body.removeChild(o);o=b}}function K(b){var a=document.createElement(d);a.style.cssText=b.getOverlayElementCSS();return a}function V(e,f){var b=document.createElement(d);b.style.cssText=e.getDialogNotificationPanelCSS();E(b);var a=document.createElement(d);a.style.cssText=e.getNewWindowNotificationTextPanelCSS();a.id=w;if(document.documentElement.getAttribute("dir")=="rtl")a.style.paddingRight="30px";else a.style.paddingLeft="30px";var c=document.createElement("span");c.style.cssText=e.getNewWindowNotificationTextSpanCSS();c.innerText=f;a.appendChild(c);b.appendChild(a);return b}function L(b){var a=document.createElement(d);a.style.cssText=b.getDialogNotificationButtonPanelCSS();if(document.documentElement.getAttribute("dir")=="rtl")a.style.cssFloat="left";else a.style.cssFloat="right";return a}function J(a){if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var b=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(b,c)}}function P(h,j){var f=document.createElement(d);f.style.cssText=h.getDialogNotificationPanelCSS();E(f);var c=document.createElement(d);c.style.cssText=h.getCrossZoneNotificationTextPanelCSS();c.id=w;var b=document.createElement("a");b.id=A;b.href="#";b.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink;b.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')");var e=document.createElement("span");if(Strings.OfficeOM.L_NewWindowCrossZone){var i=Strings.OfficeOM.L_NewWindowCrossZone.replace(/{1+}/gm,a.WACUtils.getDomainForUrl(j)),g=i.split("{0}");e.appendChild(document.createTextNode(g[0]));e.appendChild(b);e.appendChild(document.createTextNode(g[1]))}c.appendChild(e);f.appendChild(c);return f}function E(a){a.setAttribute("role","dialog");a.setAttribute("aria-describedby",w)}})(c=b.Dialog||(b.Dialog={}))})(b=a.AddinNativeAction||(a.AddinNativeAction={}))})(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageOrigin}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent},{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:OSF.DDA.Marshaling.MessageParentKeys.TargetOrigin}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent},{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:OSF.DDA.Marshaling.MessageParentKeys.TargetOrigin}]});OSF.DDA.WAC.Delegate.openDialog=function(c){var b=", ",d=false,m="https://",n="http://",h=JSON.parse(c.targetId),t=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true,c);function e(c){var b={Error:c};try{t(Microsoft.Office.Common.InvokeResultCode.noError,b)}catch(a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+a)}}if(OSF.DialogShownStatus.hasDialogShown){e(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}var a=h[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(),l=window.location.href.toLowerCase();if(OSF.AppTelemetry){var k=d,o=d,p=d,q=d,j="",i="";if(OSF.OUtil){var g=OSF.OUtil.parseUrl(a),f=OSF.OUtil.parseUrl(l);k=g.protocol===f.protocol&&g.hostname===f.hostname&&g.port===f.port;j=OSF.OUtil.getHostnamePortionForLogging(g.hostname);if(k)i=j;else{i=OSF.OUtil.getHostnamePortionForLogging(f.hostname);o=Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(a,l);p=Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(l,a)}var s=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;q=Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(s,a)}var r="openDialog isInline: "+h[OSF.ShowWindowDialogParameterKeys.DisplayInIframe].toString()+b+"taskpaneHostname: "+i+b+"dialogHostName: "+j+b+"isSameDomain: "+k.toString()+b+"parentIsSubdomain: "+o.toString()+b+"childIsSubdomain: "+p.toString()+b+"isAppDomain: "+q.toString();OSF.AppTelemetry.logAppCommonMessage(r)}if(a==null||!(a.substr(0,m.length)===m)){if(a.substr(0,n.length)===n)e(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS);else e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}if(!h[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]){OSF.DialogShownStatus.isWindowDialog=true;OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(a){c.onEvent&&c.onEvent(a);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(c.dispId)},e);OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(h)}else{OSF.DialogShownStatus.isWindowDialog=d;OSF.DDA.WAC.Delegate.registerEventAsync(c)}};OSF.DDA.WAC.Delegate.messageParent=function(a){if(window.opener!=null)OfficeExt.AddinNativeAction.Dialog.messageParent(a);else OSF.DDA.WAC.Delegate.executeAsync(a)};OSF.DDA.WAC.Delegate.sendMessage=function(a){if(OSF.DialogShownStatus.hasDialogShown)if(OSF.DialogShownStatus.isWindowDialog)OfficeExt.AddinNativeAction.Dialog.sendMessage(a);else OSF.DDA.WAC.Delegate.executeAsync(a)};OSF.DDA.WAC.Delegate.closeDialog=function(a){var c=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false,a);function b(d){var b={Error:d};try{c(Microsoft.Office.Common.InvokeResultCode.noError,b)}catch(a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+a)}}if(!OSF.DialogShownStatus.hasDialogShown)b(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed);else if(OSF.DialogShownStatus.isWindowDialog){a.onCalling&&a.onCalling();OfficeExt.AddinNativeAction.Dialog.closeDialog(b)}else OSF.DDA.WAC.Delegate.unregisterEventAsync(a)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()};OSF.InitializationHelper.prototype.prepareApiSurface=function(a){OSF.WebApp._UpdateLinksForHostAndXdmInfo();var d=new OSF.DDA.License(a.get_eToken());this.initWebDialog(a);OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(a,a.doc,d));var b=OSF.DDA.WAC.getDelegateMethods,c=OSF.DDA.WAC.Delegate.ParameterMap;OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(b,c))} + + + +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=OfficeExtensionBatch},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?i(u):r()}))}t.getItem=function(e,t){return u((function(){return window.localStorage.getItem(r+e)}),t)},t.setItem=function(e,t,n){return i((function(){return window.localStorage.setItem(r+e,t)}),n)},t.removeItem=function(e,t){return i((function(){return window.localStorage.removeItem(r+e)}),t)},t.clear=function(e){return i((function(){Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).forEach((function(e){return window.localStorage.removeItem(e)}))}),e)},t.getAllKeys=function(e){return u((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).map((function(e){return e.substr(r.length)}))}),e)},t.multiSet=function(e,t){return c(e,(function(e){var t=e[0],n=e[1];return window.localStorage.setItem(r+t,n)}),t)},t.multiRemove=function(e,t){return c(e,(function(e){return window.localStorage.removeItem(r+e)}),t)},t.multiGet=function(e,t){return new Promise((function(n,o){t||(t=function(){});var i=[],u=e.map((function(e){try{return[e,window.localStorage.getItem(r+e)]}catch(e){i.push(e)}})).filter((function(e){return e}));i.length>0?(t(i,u),o(i)):(t(null,u),n(u))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.displayWebDialog=t.Dialog=void 0;var r=n(0),o=function(){function e(e){this._dialog=e}return e.prototype.close=function(){return this._dialog.close(),r.CoreUtility.Promise.resolve()},e}();t.Dialog=o,t.displayWebDialog=function(e,t){return new r.CoreUtility.Promise((function(n,i){if(t.width&&t.height&&(!f(t.width)||!f(t.height)))throw new r.Error({code:"InvalidArgument",message:'Dimensions must be "number%" or number.'});var u,c={width:t.width?parseInt(t.width,10):50,height:t.height?parseInt(t.height,10):50,displayInIframe:t.displayInIFrame||!1};function s(e){t.onMessage&&t.onMessage(e.message,u,e.origin)}function a(e){12006===e.error?t.onClose&&t.onClose():t.onRuntimeError&&t.onRuntimeError(new r.Error(l(e.error)),u)}function f(e){return/^(\-|\+)?([0-9]+)%?$/.test(e)}function l(e){var t,n=((t={})[12002]={code:"InvalidUrl",message:"Cannot load URL, no such page or bad URL syntax."},t[12003]={code:"InvalidUrl",message:"HTTPS is required."},t[12004]={code:"Untrusted",message:"Domain is not trusted."},t[12005]={code:"InvalidUrl",message:"HTTPS is required."},t[12007]={code:"FailedToOpen",message:"Another dialog is already opened."},t);return n[e]?n[e]:{code:"Unknown",message:"An unknown error has occured"}}Office.context.ui.displayDialogAsync(e,c,(function(e){"failed"===e.status?i(new r.Error(l(e.error.code))):((u=e.value).addEventHandler(Office.EventType.DialogMessageReceived,s),u.addEventHandler(Office.EventType.DialogEventReceived,a),n(new o(u)))}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storage=void 0;var r="_OfficeRuntime_Storage_";function o(){window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_",null),window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_")}function i(e){return new Promise((function(t,n){try{o(),e(),t()}catch(e){n(e)}}))}function u(e){return new Promise((function(t,n){try{o(),t(e())}catch(e){n(e)}}))}function c(e,t){return new Promise((function(n,r){var i=[];try{o()}catch(e){i.push(e)}for(var u in e)if(e.hasOwnProperty(u)||Array.isArray(e))try{Array.isArray(e)?t(e[u]):t(u)}catch(e){i.push(e)}i.length>0?r(new Error("Unknown error.")):n()}))}t.storage={getItem:function(e){return u((function(){return window.localStorage.getItem(r+e)}))},setItem:function(e,t){return i((function(){return window.localStorage.setItem(r+e,t)}))},removeItem:function(e){return i((function(){return window.localStorage.removeItem(r+e)}))},getItems:function(e){return new Promise((function(t,n){var i={},u=[];try{o()}catch(e){n(e)}e.forEach((function(e){try{var t=window.localStorage.getItem(r+e);i[e]=t||null}catch(e){u.push(e)}})),u.length>0?n(new Error("Unknown error.")):t(i)}))},setItems:function(e){return c(e,(function(t){return window.localStorage.setItem(r+t,e[t])}))},removeItems:function(e){return c(e,(function(e){window.localStorage.removeItem(r+e)}))},getKeys:function(){return u((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).map((function(e){return e.substr(r.length)}))}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.experimentation=void 0;var r=function(){function e(){}return e.prototype.getBooleanFeatureGate=function(e,t){try{var n=Microsoft.Office.WebExtension.FeatureGates[e];return null==n?t:"true"===n.toString().toLowerCase()}catch(e){return t}},e.prototype.getIntFeatureGate=function(e,t){try{var n=parseInt(Microsoft.Office.WebExtension.FeatureGates[e]);return isNaN(n)?t:n}catch(e){return t}},e.prototype.getStringFeatureGate=function(e,t){try{var n=Microsoft.Office.WebExtension.FeatureGates[e];return null==n?t:n}catch(e){return t}},e.prototype.getChangeGate=function(e){return this.getBooleanFeatureGate(e,!0)},e.prototype.getBooleanFeatureGateAsync=function(e,t){return Promise.resolve(this.getBooleanFeatureGate(e,t))},e.prototype.getIntFeatureGateAsync=function(e,t){return Promise.resolve(this.getIntFeatureGate(e,t))},e.prototype.getStringFeatureGateAsync=function(e,t){return Promise.resolve(this.getStringFeatureGate(e,t))},e}();t.experimentation=new r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var r=n(8);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var r=n(9),o=function(){function e(){this.listeners={}}return e.prototype.on=function(e,t){return this.add(e,t),new Promise((function(e){e()}))},e.prototype.off=function(e,t){return this.remove(e,t),new Promise((function(e){e()}))},e.prototype.emit=function(e,t){return this.send(e,t),new Promise((function(e){e()}))},Object.defineProperty(e,"instance",{get:function(){return e.singleton||(e.singleton=new e),this.singleton},enumerable:!1,configurable:!0}),e.prototype.setupReceive=function(){Office&&Office.context&&Office.context.messaging&&!Office.context.messaging.onMessage&&(Office.context.messaging.onMessage=this.receiveMessage.bind(this))},e.prototype.add=function(e,t){this.listeners.hasOwnProperty(e)||(this.listeners[e]=new r.ListenerManager,this.setupReceive()),this.listeners[e].add(t)},e.prototype.remove=function(e,t){this.listeners.hasOwnProperty(e)&&(t?this.listeners[e].remove(t):delete this.listeners[e])},e.prototype.send=function(e,t){var n={eventName:e,message:t};Office&&Office.context&&Office.context.messaging&&Office.context.messaging.sendMessage&&Office.context.messaging.sendMessage(n)},e.prototype.receiveMessage=function(e){var t=e.eventName,n=e.message;this.listeners.hasOwnProperty(t)&&this.listeners[t].call(n)},e}();t.Message=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListenerManager=void 0;var r=function(){function e(){this.listeners=[]}return e.prototype.add=function(e){this.listeners.push(e)},e.prototype.remove=function(e){var t=this.listeners.lastIndexOf(e);-1!==t&&this.listeners.splice(t,1)},e.prototype.call=function(e){this.listeners.forEach((function(t){return t(e)}))},e}();t.ListenerManager=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Auth=void 0;var r=n(0),o=function(){function e(){}return e.prototype.getAccessToken=function(e){return new r.CoreUtility.Promise((function(t,n){try{Office.context.auth.getAccessTokenAsync(e||{},(function(e){"succeeded"===e.status?t(e.value):n(e.error)}))}catch(e){n(e)}}))},e.prototype.getAuthContext=function(){return new r.CoreUtility.Promise((function(e,t){try{Office.context.auth.getAuthContextAsync((function(n){"succeeded"===n.status?e(n.value):t(n.error)}))}catch(e){t(e)}}))},Object.defineProperty(e,"instance",{get:function(){return e.singleton||(e.singleton=new e),e.singleton},enumerable:!1,configurable:!0}),e}();t.Auth=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ribbon=t.ui=void 0,t.ui={getRibbon:function(){return new Promise((function(e,t){e(new r)}))}};var r=function(){function e(){this.requestContext=new OfficeCore.RequestContext,OSF.WebAuth&&"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(this.requestContext._customData="WacPartition")}return e.prototype.requestUpdate=function(e){var t=this.requestContext.ribbon;return e.tabs.filter((function(e){return!!e.id})).forEach((function(e){var n=t.getTab(e.id);void 0!==e.visible&&null!==e.visible&&n.setVisibility(e.visible),e.controls.filter((function(e){return!!e.id})).forEach((function(e){var n=t.getButton(e.id);void 0!==e.enabled&&null!==e.enabled&&(n.enabled=e.enabled)}))})),this.requestContext.sync()},e}();t.Ribbon=r}]); \ No newline at end of file diff --git a/dist/excel-web-16.00.debug.js b/dist/excel-web-16.00.debug.js new file mode 100644 index 000000000..998921cfa --- /dev/null +++ b/dist/excel-web-16.00.debug.js @@ -0,0 +1,44594 @@ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md +*/ + +/* +* @overview es6-promise - a tiny implementation of Promises/A+. +* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +* @license Licensed under MIT license +* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE +* @version 2.3.0 +*/ + + +// Sources: +// osfweb: 16.0\16801.10000 +// runtime: 16.0\16801.10000 +// core: 16.0\16801.10000 +// host: custom + + + +if (typeof OSFPerformance !== "undefined") { + OSFPerformance.hostInitializationStart = OSFPerformance.now(); +} +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExt; +(function (OfficeExt) { + var MicrosoftAjaxFactory = (function () { + function MicrosoftAjaxFactory() { + } + MicrosoftAjaxFactory.prototype.isMsAjaxLoaded = function () { + if (typeof (Sys) !== 'undefined' && typeof (Type) !== 'undefined' && + Sys.StringBuilder && typeof (Sys.StringBuilder) === "function" && + Type.registerNamespace && typeof (Type.registerNamespace) === "function" && + Type.registerClass && typeof (Type.registerClass) === "function" && + typeof (Function._validateParams) === "function" && + Sys.Serialization && Sys.Serialization.JavaScriptSerializer && typeof (Sys.Serialization.JavaScriptSerializer.serialize) === "function") { + return true; + } + else { + return false; + } + }; + MicrosoftAjaxFactory.prototype.loadMsAjaxFull = function (callback) { + var msAjaxCDNPath = (window.location.protocol.toLowerCase() === 'https:' ? 'https:' : 'http:') + '//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js'; + OSF.OUtil.loadScript(msAjaxCDNPath, callback); + }; + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxError", { + get: function () { + if (this._msAjaxError == null && this.isMsAjaxLoaded()) { + this._msAjaxError = Error; + } + return this._msAjaxError; + }, + set: function (errorClass) { + this._msAjaxError = errorClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxString", { + get: function () { + if (this._msAjaxString == null && this.isMsAjaxLoaded()) { + this._msAjaxString = String; + } + return this._msAjaxString; + }, + set: function (stringClass) { + this._msAjaxString = stringClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxDebug", { + get: function () { + if (this._msAjaxDebug == null && this.isMsAjaxLoaded()) { + this._msAjaxDebug = Sys.Debug; + } + return this._msAjaxDebug; + }, + set: function (debugClass) { + this._msAjaxDebug = debugClass; + }, + enumerable: true, + configurable: true + }); + return MicrosoftAjaxFactory; + }()); + OfficeExt.MicrosoftAjaxFactory = MicrosoftAjaxFactory; +})(OfficeExt || (OfficeExt = {})); +var OsfMsAjaxFactory = new OfficeExt.MicrosoftAjaxFactory(); +var OSF = OSF || {}; +(function (OfficeExt) { + var SafeStorage = (function () { + function SafeStorage(_internalStorage) { + this._internalStorage = _internalStorage; + } + SafeStorage.prototype.getItem = function (key) { + try { + return this._internalStorage && this._internalStorage.getItem(key); + } + catch (e) { + return null; + } + }; + SafeStorage.prototype.setItem = function (key, data) { + try { + this._internalStorage && this._internalStorage.setItem(key, data); + } + catch (e) { + } + }; + SafeStorage.prototype.clear = function () { + try { + this._internalStorage && this._internalStorage.clear(); + } + catch (e) { + } + }; + SafeStorage.prototype.removeItem = function (key) { + try { + this._internalStorage && this._internalStorage.removeItem(key); + } + catch (e) { + } + }; + SafeStorage.prototype.getKeysWithPrefix = function (keyPrefix) { + var keyList = []; + try { + var len = this._internalStorage && this._internalStorage.length || 0; + for (var i = 0; i < len; i++) { + var key = this._internalStorage.key(i); + if (key.indexOf(keyPrefix) === 0) { + keyList.push(key); + } + } + } + catch (e) { + } + return keyList; + }; + SafeStorage.prototype.isLocalStorageAvailable = function () { + return (this._internalStorage != null); + }; + return SafeStorage; + }()); + OfficeExt.SafeStorage = SafeStorage; +})(OfficeExt || (OfficeExt = {})); +OSF.XdmFieldName = { + ConversationUrl: "ConversationUrl", + AppId: "AppId" +}; +OSF.TestFlightStart = 1000; +OSF.TestFlightEnd = 1009; +OSF.FlightNames = { + UseOriginNotUrl: 0, + AddinEnforceHttps: 2, + FirstPartyAnonymousProxyReadyCheckTimeout: 6, + AddinRibbonIdAllowUnknown: 9, + ManifestParserDevConsoleLog: 15, + AddinActionDefinitionHybridMode: 18, + UseActionIdForUILessCommand: 20, + RequirementSetRibbonApiOnePointTwo: 21, + SetFocusToTaskpaneIsEnabled: 22, + ShortcutInfoArrayInUserPreferenceData: 23, + OSFTestFlight1000: OSF.TestFlightStart, + OSFTestFlight1001: OSF.TestFlightStart + 1, + OSFTestFlight1002: OSF.TestFlightStart + 2, + OSFTestFlight1003: OSF.TestFlightStart + 3, + OSFTestFlight1004: OSF.TestFlightStart + 4, + OSFTestFlight1005: OSF.TestFlightStart + 5, + OSFTestFlight1006: OSF.TestFlightStart + 6, + OSFTestFlight1007: OSF.TestFlightStart + 7, + OSFTestFlight1008: OSF.TestFlightStart + 8, + OSFTestFlight1009: OSF.TestFlightEnd +}; +OSF.TrustUXFlightValues = { + TrustUXControlA: 0, + TrustUXExperimentB: 1, + TrustUXExperimentC: 2 +}; +OSF.FlightTreatmentNames = { + AddinTrustUXImprovement: "Microsoft.Office.SharedOnline.AddinTrustUXImprovement", + BlockAutoOpenAddInIfStoreDisabled: "Microsoft.Office.SharedOnline.BlockAutoOpenAddInIfStoreDisabled", + Bug7083046KillSwitch: "Microsoft.Office.SharedOnline.Bug7083046KillSwitch", + CheckProxyIsReadyRetry: "Microsoft.Office.SharedOnline.OEP.CheckProxyIsReadyRetry", + InsertionDialogFixesEnabled: "Microsoft.Office.SharedOnline.InsertionDialogFixesEnabled", + WopiPreinstalledAddInsEnabled: "Microsoft.Office.SharedOnline.WopiPreinstalledAddInsEnabled", + WopiUseNewActivate: "Microsoft.Office.SharedOnline.WopiUseNewActivate", + MosManifestEnabled: "Microsoft.Office.SharedOnline.OEP.MosManifest", + RemoveGetTrustNoPrompt: "Microsoft.Office.SharedOnline.removeGetTrustNoPrompt", + HostTrustDialog: "Microsoft.Office.SharedOnline.HostTrustDialog", + AddinDetailsServiceSupportEnabled: "Microsoft.Office.SharedOnline.AddinDetailsServiceSupportEnabled", + GetAddinFlyoutEnabled: "Microsoft.Office.SharedOnline.GetAddinFlyoutEnabled", + BackstageEnabled: "Microsoft.Office.SharedOnline.NewBackstageEnabled", + EnablingWindowOpenUsageLogging: "Microsoft.Office.SharedOnline.EnablingWindowOpenUsageLogging" +}; +OSF.Flights = []; +OSF.IntFlights = {}; +OSF.Settings = {}; +OSF.WindowNameItemKeys = { + BaseFrameName: "baseFrameName", + HostInfo: "hostInfo", + XdmInfo: "xdmInfo", + SerializerVersion: "serializerVersion", + AppContext: "appContext", + Flights: "flights" +}; +OSF.OUtil = (function () { + var _uniqueId = -1; + var _xdmInfoKey = '&_xdm_Info='; + var _serializerVersionKey = '&_serializer_version='; + var _flightsKey = '&_flights='; + var _xdmSessionKeyPrefix = '_xdm_'; + var _serializerVersionKeyPrefix = '_serializer_version='; + var _flightsKeyPrefix = '_flights='; + var _fragmentSeparator = '#'; + var _fragmentInfoDelimiter = '&'; + var _classN = "class"; + var _loadedScripts = {}; + var _defaultScriptLoadingTimeout = 30000; + var _safeSessionStorage = null; + var _safeLocalStorage = null; + var _rndentropy = new Date().getTime(); + function _random() { + var nextrand = 0x7fffffff * (Math.random()); + nextrand ^= _rndentropy ^ ((new Date().getMilliseconds()) << Math.floor(Math.random() * (31 - 10))); + return nextrand.toString(16); + } + ; + function _getSessionStorage() { + if (!_safeSessionStorage) { + try { + var sessionStorage = window.sessionStorage; + } + catch (ex) { + sessionStorage = null; + } + _safeSessionStorage = new OfficeExt.SafeStorage(sessionStorage); + } + return _safeSessionStorage; + } + ; + function _reOrderTabbableElements(elements) { + var bucket0 = []; + var bucketPositive = []; + var i; + var len = elements.length; + var ele; + for (i = 0; i < len; i++) { + ele = elements[i]; + if (ele.tabIndex) { + if (ele.tabIndex > 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex === 0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive = bucketPositive.sort(function (left, right) { + var diff = left.tabIndex - right.tabIndex; + if (diff === 0) { + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + return { + set_entropy: function OSF_OUtil$set_entropy(entropy) { + if (typeof entropy == "string") { + for (var i = 0; i < entropy.length; i += 4) { + var temp = 0; + for (var j = 0; j < 4 && i + j < entropy.length; j++) { + temp = (temp << 8) + entropy.charCodeAt(i + j); + } + _rndentropy ^= temp; + } + } + else if (typeof entropy == "number") { + _rndentropy ^= entropy; + } + else { + _rndentropy ^= 0x7fffffff * Math.random(); + } + _rndentropy &= 0x7fffffff; + }, + extend: function OSF_OUtil$extend(child, parent) { + var F = function () { }; + F.prototype = parent.prototype; + child.prototype = new F(); + child.prototype.constructor = child; + child.uber = parent.prototype; + if (parent.prototype.constructor === Object.prototype.constructor) { + parent.prototype.constructor = parent; + } + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name] = {}; + } + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { + if (parent && name && parent[name]) { + delete parent[name]; + } + }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret = {}; + for (var key in settingsCollection) { + var value = settingsCollection[key]; + try { + if (JSON) { + value = JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret = {}; + serializedSettings = serializedSettings || {}; + for (var key in serializedSettings) { + var value = serializedSettings[key]; + try { + if (JSON) { + value = JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if (!_loadedScriptEntry) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + var onLoadTimeOut = function OSF_OUtil_loadScript$onLoadTimeOut() { + if (window.navigator.userAgent.indexOf("Trident") > 0) { + onLoadError(null); + } + else { + onLoadError(new Event("Script load timed out")); + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError(errorEvent) { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(errorEvent); + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadTimeOut, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) { + if (url) { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link); + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { + var parsed = enumObject[str.trim()]; + if (typeof (parsed) == 'undefined') { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed; + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { + var obj = { calc: arguments[0] }; + return function () { + if (obj.calc) { + obj.val = obj.calc.apply(this, arguments); + delete obj.calc; + } + return obj.val; + }; + }, + getUniqueId: function OSF_OUtil$getUniqueId() { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString(); + }, + formatString: function OSF_OUtil$formatString() { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10) + 1; + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }, + generateConversationId: function OSF_OUtil$generateConversationId() { + return [_random(), _random(), (new Date()).getTime().toString()].join('_'); + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId(); + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { + return OSF.OUtil.addInfoAsHash(url, _xdmInfoKey, xdmInfoValue, false); + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) { + return OSF.OUtil.addInfoAsHash(url, _serializerVersionKey, serializerVersion, true); + }, + addFlightsAsHash: function OSF_OUtil$addFlightsAsHash(url, flights) { + return OSF.OUtil.addInfoAsHash(url, _flightsKey, flights, true); + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) { + url = url.trim() || ''; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if (encodeInfo) { + newFragment = [keyName, encodeURIComponent(infoValue), fragment].join(''); + } + else { + newFragment = [fragment, keyName, infoValue].join(''); + } + return [urlWithoutFragment, _fragmentSeparator, newFragment].join(''); + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.HostInfo); + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.XdmInfo); + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.SerializerVersion)); + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseFlights: function OSF_OUtil$parseFlights(skipSessionStorage) { + var flights = OSF.OUtil.parseFlightsWithGivenFragment(skipSessionStorage, window.location.hash); + if (flights.length == 0) { + flights = OSF.OUtil.parseFlightsFromWindowName(skipSessionStorage, window.name); + } + return flights; + }, + checkFlight: function OSF_OUtil$checkFlightEnabled(flight) { + return OSF.Flights && OSF.Flights.indexOf(flight) >= 0; + }, + pushFlight: function OSF_OUtil$pushFlight(flight) { + if (OSF.Flights.indexOf(flight) < 0) { + OSF.Flights.push(flight); + return true; + } + return false; + }, + getBooleanSetting: function OSF_OUtil$getSetting(settingName) { + return OSF.OUtil.getBooleanFromDictionary(OSF.Settings, settingName); + }, + getBooleanFromDictionary: function OSF_OUtil$getBooleanFromDictionary(settings, settingName) { + var result = (settings && settingName && settings[settingName] !== undefined && settings[settingName] && + ((typeof (settings[settingName]) === "string" && settings[settingName].toUpperCase() === 'TRUE') || + (typeof (settings[settingName]) === "boolean" && settings[settingName]))); + return result !== undefined ? result : false; + }, + getIntFromDictionary: function OSF_OUtil$getIntFromDictionary(settings, settingName) { + if (settings && settingName && settings[settingName] !== undefined && (typeof settings[settingName] === "string")) { + return parseInt(settings[settingName]); + } + else { + return NaN; + } + }, + pushIntFlight: function OSF_OUtil$pushIntFlight(flight, flightValue) { + if (!(flight in OSF.IntFlights)) { + OSF.IntFlights[flight] = flightValue; + return true; + } + return false; + }, + getIntFlight: function OSF_OUtil$getIntFlight(flight) { + if (OSF.IntFlights && (flight in OSF.IntFlights)) { + return OSF.IntFlights[flight]; + } + else { + return NaN; + } + }, + parseFlightsFromWindowName: function OSF_OUtil$parseFlightsFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.Flights)); + }, + parseFlightsWithGivenFragment: function OSF_OUtil$parseFlightsWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(_flightsKey, _flightsKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseArrayWithDefault: function OSF_OUtil$parseArrayWithDefault(jsonString) { + var array = []; + try { + array = JSON.parse(jsonString); + } + catch (ex) { } + if (!Array.isArray(array)) { + array = []; + } + return array; + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj != null) { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue != null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >= 0) { + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue = decodeURIComponent(infoValue); + } + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd = window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd == -1) { + sessionKeyEnd = window.name.length; + } + var sessionKey = window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString = window.location.search; + var conversationId = null; + if (searchString) { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1) === '=') { + conversationId = conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId = decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) { + var items = strInfo.split("$"); + if (typeof items[1] == "undefined") { + items = strInfo.split("|"); + } + if (typeof items[1] == "undefined") { + items = strInfo.split("%7C"); + } + return items; + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue = ''; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if (items != undefined && items.length >= 3) { + switch (xdmFieldName) { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break; + } + } + } + return fieldValue; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e = Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) + throw e; + for (var p in expectedProperties) { + e = Function._validateParameter(params[p], expectedProperties[p], p); + if (e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) { + if (typeof (OsfMsAjaxFactory) !== 'undefined' && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) { + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor = descriptor || {}; + for (var nd in attributes) { + var attribute = attributes[nd]; + if (descriptor[attribute] == undefined) { + descriptor[attribute] = true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors = descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for (var i = 0; i < propsLength; i++) { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable = descriptor.writable || false; + } + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret = []; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key == item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value == list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add = list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key] = value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2] = newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj) === "[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj) === "[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj) === "[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.attachEvent) { + element.attachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.detachEvent) { + element.detachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = null; + } + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) { + var xmlhttp; + try { + xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function () { + if (xmlhttp.readyState == 4) { + if (xmlhttp.status == 200) { + onSuccess(xmlhttp.responseText); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + if (!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, c2, c3, a, b, c; + var i; + var length = input.length; + do { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + if (!isNaN(c2)) { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + } + if (isNaN(c2)) { + temp[i - 1] = 64; + } + else if (isNaN(c3)) { + temp[i - 2] = 64; + temp[i - 1] = 64; + } + for (var t = 0; t < i; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getSessionStorage: function OSF_Outil$getSessionStorage() { + return _getSessionStorage(); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage = window.localStorage; + } + catch (ex) { + localStorage = null; + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage); + } + return _safeLocalStorage; + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) { + var hex = "#" + (Number(val) + 0x1000000).toString(16).slice(-6); + return hex; + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) { + element.onclick = function (e) { + handler(); + }; + element.ontouchend = function (e) { + handler(); + e.preventDefault(); + }; + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) { + var e = Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: false }, + { name: "paramName", type: String, mayBeNull: false } + ]); + if (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return ""; + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)", "i"); + if (!queryExp.test(queryString)) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return ""; + } + return queryExp.exec(queryString)[1]; + }, + getHostnamePortionForLogging: function OSF_Outil$getHostnamePortionForLogging(hostname) { + var e = Function._validateParams(arguments, [{ name: "hostname", type: String, mayBeNull: false } + ]); + if (e) { + return ""; + } + var hostnameSubstrings = hostname.split('.'); + var len = hostnameSubstrings.length; + if (len >= 2) { + return hostnameSubstrings[len - 2] + "." + hostnameSubstrings[len - 1]; + } + else if (len == 1) { + return hostnameSubstrings[0]; + } + }, + isiOS: function OSF_Outil$isiOS() { + return (window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false); + }, + isChrome: function OSF_Outil$isChrome() { + return (window.navigator.userAgent.indexOf("Chrome") > 0) && !OSF.OUtil.isEdge(); + }, + isEdge: function OSF_Outil$isEdge() { + return window.navigator.userAgent.indexOf("Edge") > 0; + }, + isIE: function OSF_Outil$isIE() { + return window.navigator.userAgent.indexOf("Trident") > 0; + }, + isFirefox: function OSF_Outil$isFirefox() { + return window.navigator.userAgent.indexOf("Firefox") > 0; + }, + startsWith: function OSF_Outil$startsWith(originalString, patternToCheck, browserIsIE) { + if (browserIsIE) { + return originalString.substr(0, patternToCheck.length) === patternToCheck; + } + else { + return originalString.startsWith(patternToCheck); + } + }, + containsPort: function OSF_Outil$containsPort(url, protocol, hostname, portNumber) { + return this.startsWith(url, protocol + "//" + hostname + ":" + portNumber, true) || this.startsWith(url, hostname + ":" + portNumber, true); + }, + getRedundandPortString: function OSF_Outil$getRedundandPortString(url, parser) { + if (!url || !parser) + return ""; + if (parser.protocol == "https:" && this.containsPort(url, "https:", parser.hostname, "443")) + return ":443"; + else if (parser.protocol == "http:" && this.containsPort(url, "http:", parser.hostname, "80")) + return ":80"; + return ""; + }, + removeChar: function OSF_Outil$removeChar(url, indexOfCharToRemove) { + if (indexOfCharToRemove < url.length - 1) + return url.substring(0, indexOfCharToRemove) + url.substring(indexOfCharToRemove + 1); + else if (indexOfCharToRemove == url.length - 1) + return url.substring(0, url.length - 1); + else + return url; + }, + cleanUrlOfChar: function OSF_Outil$cleanUrlOfChar(url, charToClean) { + var i; + for (i = 0; i < url.length; i++) { + if (url.charAt(i) === charToClean) { + if (i + 1 >= url.length) { + return this.removeChar(url, i); + } + else if (charToClean === '/') { + if (url.charAt(i + 1) === '?' || url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + else if (charToClean === '?') { + if (url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + } + } + return url; + }, + cleanUrl: function OSF_Outil$cleanUrl(url) { + url = this.cleanUrlOfChar(url, '/'); + url = this.cleanUrlOfChar(url, '?'); + url = this.cleanUrlOfChar(url, '#'); + if (url.substr(0, 8) == "https://") { + var portIndex = url.indexOf(":443"); + if (portIndex != -1) { + if (portIndex == url.length - 4 || url.charAt(portIndex + 4) == "/" || url.charAt(portIndex + 4) == "?" || url.charAt(portIndex + 4) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 4); + } + } + } + else if (url.substr(0, 7) == "http://") { + var portIndex = url.indexOf(":80"); + if (portIndex != -1) { + if (portIndex == url.length - 3 || url.charAt(portIndex + 3) == "/" || url.charAt(portIndex + 3) == "?" || url.charAt(portIndex + 3) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 3); + } + } + } + return url; + }, + parseUrl: function OSF_Outil$parseUrl(url, enforceHttps) { + if (enforceHttps === void 0) { + enforceHttps = false; + } + if (typeof url === "undefined" || !url) { + return undefined; + } + var notHttpsErrorMessage = "NotHttps"; + var invalidUrlErrorMessage = "InvalidUrl"; + var isIEBoolean = this.isIE(); + var parsedUrlObj = { + protocol: undefined, + hostname: undefined, + host: undefined, + port: undefined, + pathname: undefined, + search: undefined, + hash: undefined, + isPortPartOfUrl: undefined + }; + try { + if (isIEBoolean) { + var parser = document.createElement("a"); + parser.href = url; + if (!parser || !parser.protocol || !parser.host || !parser.hostname || !parser.href + || this.cleanUrl(parser.href).toLowerCase() !== this.cleanUrl(url).toLowerCase()) { + throw invalidUrlErrorMessage; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && parser.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + var redundandPortString = this.getRedundandPortString(url, parser); + parsedUrlObj.protocol = parser.protocol; + parsedUrlObj.hostname = parser.hostname; + parsedUrlObj.port = (redundandPortString == "") ? parser.port : ""; + parsedUrlObj.host = (redundandPortString != "") ? parser.hostname : parser.host; + parsedUrlObj.pathname = (isIEBoolean ? "/" : "") + parser.pathname; + parsedUrlObj.search = parser.search; + parsedUrlObj.hash = parser.hash; + parsedUrlObj.isPortPartOfUrl = this.containsPort(url, parser.protocol, parser.hostname, parser.port); + } + else { + var urlObj = new URL(url); + if (urlObj && urlObj.protocol && urlObj.host && urlObj.hostname) { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && urlObj.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + parsedUrlObj.protocol = urlObj.protocol; + parsedUrlObj.hostname = urlObj.hostname; + parsedUrlObj.port = urlObj.port; + parsedUrlObj.host = urlObj.host; + parsedUrlObj.pathname = urlObj.pathname; + parsedUrlObj.search = urlObj.search; + parsedUrlObj.hash = urlObj.hash; + parsedUrlObj.isPortPartOfUrl = urlObj.host.lastIndexOf(":" + urlObj.port) == (urlObj.host.length - urlObj.port.length - 1); + } + } + } + catch (err) { + if (err.message === notHttpsErrorMessage) + throw err; + } + return parsedUrlObj; + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) { + if (sourceObj == null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr = []; + for (var i = 0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj = sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property] = sourceObj[property]; + } + } + return copyObj; + } + }, + createObject: function OSF_Outil$createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + }, + addClass: function OSF_OUtil$addClass(elmt, val) { + if (!OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + if (className) { + elmt.setAttribute(_classN, className + " " + val); + } + else { + elmt.setAttribute(_classN, val); + } + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) { + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findNextPos = function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && backward) { + return -1; + } + else if (currPos === allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if (all.length === 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, backward); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findCurrPos = function (all, curr) { + var i = 0; + for (; i < all.length; i++) { + if (all[i] === curr) { + return i; + } + } + return -1; + }; + var findNextPos = function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && shift) { + return -1; + } + else if (currPos === allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all, curr); + next = findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, shift); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + isNullOrUndefined: function OSF_OUtil$isNullOrUndefined(value) { + if (typeof (value) === "undefined") { + return true; + } + if (value === null) { + return true; + } + return false; + }, + stringEndsWith: function OSF_OUtil$stringEndsWith(value, subString) { + if (!OSF.OUtil.isNullOrUndefined(value) && !OSF.OUtil.isNullOrUndefined(subString)) { + if (subString.length > value.length) { + return false; + } + if (value.substr(value.length - subString.length) === subString) { + return true; + } + } + return false; + }, + hashCode: function OSF_OUtil$hashCode(str) { + var hash = 0; + if (!OSF.OUtil.isNullOrUndefined(str)) { + var i = 0; + var len = str.length; + while (i < len) { + hash = (hash << 5) - hash + str.charCodeAt(i++) | 0; + } + } + return hash; + }, + getValue: function OSF_OUtil$getValue(value, defaultValue) { + if (OSF.OUtil.isNullOrUndefined(value)) { + return defaultValue; + } + return value; + }, + externalNativeFunctionExists: function OSF_OUtil$externalNativeFunctionExists(type) { + return type === 'unknown' || type !== 'undefined'; + } + }; +})(); +OSF.OUtil.Guid = (function () { + var hexCode = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result = ""; + var tick = (new Date()).getTime(); + var index = 0; + for (; index < 32 && tick > 0; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + }; +})(); +try { + (function () { + OSF.Flights = OSF.OUtil.parseFlights(true); + })(); +} +catch (ex) { } +window.OSF = OSF; +OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614, + Visio: 8388615, + OneNoteAndroid: 4194305 +}; +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +}; +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +}; +OSF.AgaveHostAction = { + "Select": 0, + "UnSelect": 1, + "CancelDialog": 2, + "InsertAgave": 3, + "CtrlF6In": 4, + "CtrlF6Exit": 5, + "CtrlF6ExitShift": 6, + "SelectWithError": 7, + "NotifyHostError": 8, + "RefreshAddinCommands": 9, + "PageIsReady": 10, + "TabIn": 11, + "TabInShift": 12, + "TabExit": 13, + "TabExitShift": 14, + "EscExit": 15, + "F2Exit": 16, + "ExitNoFocusable": 17, + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20, + "UpdateTargetUrl": 21, + "InstallCustomFunctions": 22, + "SendTelemetryEvent": 23, + "UninstallCustomFunctions": 24, + "SendMessage": 25, + "LaunchExtensionComponent": 26, + "StopExtensionComponent": 27, + "RestartExtensionComponent": 28, + "EnableTaskPaneHeaderButton": 29, + "DisableTaskPaneHeaderButton": 30, + "TaskPaneHeaderButtonClicked": 31, + "RemoveAppCommandsAddin": 32, + "RefreshRibbonGallery": 33, + "GetOriginalControlId": 34, + "OfficeJsReady": 35, + "InsertDevManifest": 36, + "InsertDevManifestError": 37, + "SendCustomerContent": 38, + "KeyboardShortcuts": 39 +}; +OSF.SharedConstants = { + "NotificationConversationIdSuffix": '_ntf' +}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix, featureGates, officeTheme, initialDisplayMode) { + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this._featureGates = featureGates; + this._officeTheme = officeTheme; + this._initialDisplayMode = initialDisplayMode; + this.get_id = function get_id() { return this._id; }; + this.get_appName = function get_appName() { return this._appName; }; + this.get_appVersion = function get_appVersion() { return this._appVersion; }; + this.get_appUILocale = function get_appUILocale() { return this._appUILocale; }; + this.get_dataLocale = function get_dataLocale() { return this._dataLocale; }; + this.get_docUrl = function get_docUrl() { return this._docUrl; }; + this.get_clientMode = function get_clientMode() { return this._clientMode; }; + this.get_bindings = function get_bindings() { return this._bindings; }; + this.get_settings = function get_settings() { return this._settings; }; + this.get_reason = function get_reason() { return this._reason; }; + this.get_osfControlType = function get_osfControlType() { return this._osfControlType; }; + this.get_eToken = function get_eToken() { return this._eToken; }; + this.get_correlationId = function get_correlationId() { return this._correlationId; }; + this.get_appInstanceId = function get_appInstanceId() { return this._appInstanceId; }; + this.get_touchEnabled = function get_touchEnabled() { return this._touchEnabled; }; + this.get_commerceAllowed = function get_commerceAllowed() { return this._commerceAllowed; }; + this.get_appMinorVersion = function get_appMinorVersion() { return this._appMinorVersion; }; + this.get_requirementMatrix = function get_requirementMatrix() { return this._requirementMatrix; }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() { return this._dialogRequirementMatrix; }; + this.get_hostCustomMessage = function get_hostCustomMessage() { return this._hostCustomMessage; }; + this.get_hostFullVersion = function get_hostFullVersion() { return this._hostFullVersion; }; + this.get_isDialog = function get_isDialog() { return this._isDialog; }; + this.get_clientWindowHeight = function get_clientWindowHeight() { return this._clientWindowHeight; }; + this.get_clientWindowWidth = function get_clientWindowWidth() { return this._clientWindowWidth; }; + this.get_addinName = function get_addinName() { return this._addinName; }; + this.get_appDomains = function get_appDomains() { return this._appDomains; }; + this.get_featureGates = function get_featureGates() { return this._featureGates; }; + this.get_officeTheme = function get_officeTheme() { return this._officeTheme; }; + this.get_initialDisplayMode = function get_initialDisplayMode() { return this._initialDisplayMode ? this._initialDisplayMode : 0; }; +}; +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 +}; +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 +}; +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Client", Microsoft.Office); +OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened", + ControlActivation: "controlActivation" +}; +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType = { + All: "all" +}; +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + JsonData: "jsonData", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + AllowConsentPrompt: "allowConsentPrompt", + ForMSGraphAccess: "forMSGraphAccess", + AllowSignInPrompt: "allowSignInPrompt", + JsonPayload: "jsonPayload", + EnableNewHosts: "enableNewHosts", + AccountTypeFilter: "accountTypeFilter", + AddinTrustId: "addinTrustId", + Reserved: "reserved", + Tcid: "tcid", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + PromptBeforeOpen: "promptBeforeOpen", + EnforceAppDomain: "enforceAppDomain", + UrlNoHostInfo: "urlNoHostInfo", + TargetOrigin: "targetOrigin", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64", + FormId: "formId" +}; +OSF.OUtil.setNamespace("DDA", OSF); +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 +}; +OSF.DDA.PropertyDescriptors = { + AsyncResultStatus: "AsyncResultStatus" +}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { + if (eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || + eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) { + return id + "_" + eventType; + } + else { + return eventType; + } +}; +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidGetAuthContextMethod: 99, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, + dispidInsertFormMethod: 106, + dispidDisplayRibbonCalloutAsyncMethod: 109, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidExecuteFeature: 146, + dispidQueryFeature: 147, + dispidGetNestedAppAuthContextMethod: 205, + dispidMethodMax: 205 +}; +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidOlkRecurrenceChangedEvent: 49, + dispidOlkAttachmentsChangedEvent: 50, + dispidOlkEnhancedLocationsChangedEvent: 51, + dispidOlkInfobarClickedEvent: 52, + dispidOlkSelectedItemsChangedEvent: 53, + dispidOlkSensitivityLabelChangedEvent: 54, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 +}; +OSF.DDA.ErrorCodeManager = (function () { + var _errorMappings = {}; + return { + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) { + var errorArgs = _errorMappings[errorCode]; + if (!errorArgs) { + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + } + else { + if (!errorArgs.name) { + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + } + if (!errorArgs.message) { + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message; + } + } + return errorArgs; + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) { + _errorMappings[errorCode] = errorNameMessage; + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1000, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2000, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3000, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4000, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5000, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeOperationCancelled: 5014, + ooeWorkbookHidden: 5015, + ooeWriteNotSupportedWhenModalDialogOpen: 5016, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeRequestPayloadSizeLimitExceeded: 5103, + ooeResponsePayloadSizeLimitExceeded: 5104, + ooeCustomXmlNodeNotFound: 6000, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7000, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8000, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11000, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12000, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeModalDialogOpen: 12012, + ooeDocumentIsInactive: 12013, + ooeDialogParentIsMinimized: 12014, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010, + ooeResourceNotAllowed: 13011, + ooeSSOUnsupportedPlatform: 13012, + ooeSSOCallThrottled: 13013, + ooeAccessDenied: 13990, + ooeGeneralException: 13991 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidReadForBlankRow }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnMatrixData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { name: stringNS.L_InvalidBinding, message: stringNS.L_InvalidColumnsForBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { name: stringNS.L_SaveSettingsError, message: stringNS.L_SettingsCannotSave }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { name: stringNS.L_SettingsStaleError, message: stringNS.L_SettingsAreStale }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { name: stringNS.L_HostError, message: stringNS.L_OperationNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { name: stringNS.L_InternalError, message: stringNS.L_InternalErrorDescription }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { name: stringNS.L_PermissionDenied, message: stringNS.L_DocumentReadOnly }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { name: stringNS.L_EventRegistrationError, message: stringNS.L_EventHandlerNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { name: stringNS.L_InvalidAPICall, message: stringNS.L_InvalidApiCallInContext }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { name: stringNS.L_ShuttingDown, message: stringNS.L_ShuttingDown }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { name: stringNS.L_UnsupportedEnumeration, message: stringNS.L_UnsupportedEnumerationMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden] = { name: stringNS.L_APICallFailed, message: stringNS.L_WorkbookHiddenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen] = { name: stringNS.L_APICallFailed, message: stringNS.L_WriteNotSupportedWhenModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestPayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_ResponsePayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { name: stringNS.L_CustomXmlOutOfDateName, message: stringNS.L_CustomXmlOutOfDateMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { name: stringNS.L_CannotNavigateTo, message: stringNS.L_CannotNavigateTo }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { name: stringNS.L_SpecifiedIdNotExist, message: stringNS.L_SpecifiedIdNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { name: stringNS.L_NavOutOfBound, message: stringNS.L_NavOutOfBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { name: stringNS.L_DataWriteReminder, message: stringNS.L_CellDataAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { name: stringNS.L_MissingParameter, message: stringNS.L_ElementMissing }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidCellsValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidTableOptionValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidFormatValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_RowIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_ColIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_FormatValueOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { name: stringNS.L_FormattingReminder, message: stringNS.L_CellFormatAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { name: stringNS.L_MemoryLimit, message: stringNS.L_CloseFileBeforeRetrieve }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { name: stringNS.L_NetworkProblem, message: stringNS.L_NetworkProblemRetrieveFile }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { name: stringNS.L_InvalidValue, message: stringNS.L_SliceSizeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAlreadyOpened }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NetworkProblem }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { name: stringNS.L_DialogNavigateError, message: stringNS.L_DialogInvalidScheme }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAddressNotTrusted }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_ModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DocumentIsInactive }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogParentIsMinimized }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform] = { name: stringNS.L_APINotSupported, message: stringNS.L_SSOUnsupportedPlatform }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled] = { name: stringNS.L_OperationCancelledError, message: stringNS.L_OperationCancelledErrorMessage }; + } + }; +})(); +(function (OfficeExt) { + var Requirement; + (function (Requirement) { + var RequirementVersion = (function () { + function RequirementVersion() { + } + return RequirementVersion; + }()); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = (function () { + function RequirementMatrix(_setMap) { + this.isSetSupported = function _isSetSupported(name, minVersion) { + if (name == undefined) { + return false; + } + if (minVersion == undefined) { + minVersion = 0; + } + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if (sets.hasOwnProperty(name.toLowerCase())) { + var setMaxVersion = sets[name.toLowerCase()]; + try { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.major > 0 && + setMaxVersionNum.minor >= 0 && + setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor >= minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion = function (version) { + version = version + ""; + var temp = version.split("."); + var major = 0; + var minor = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } + } + var result = { "minor": minor, "major": major }; + return result; + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this); + } + return RequirementMatrix; + }()); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = (function () { + function DefaultSetRequirement(setMap) { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) { + for (var name in addedSet) { + this._sets[name] = addedSet[name]; + } + }; + this._sets = setMap; + } + return DefaultSetRequirement; + }()); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultRequiredDialogSetRequirement = (function (_super) { + __extends(DefaultRequiredDialogSetRequirement, _super); + function DefaultRequiredDialogSetRequirement() { + return _super.call(this, { + "dialogapi": 1.1 + }) || this; + } + return DefaultRequiredDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultRequiredDialogSetRequirement = DefaultRequiredDialogSetRequirement; + var DefaultOptionalDialogSetRequirement = (function (_super) { + __extends(DefaultOptionalDialogSetRequirement, _super); + function DefaultOptionalDialogSetRequirement() { + return _super.call(this, { + "dialogorigin": 1.1 + }) || this; + } + return DefaultOptionalDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultOptionalDialogSetRequirement = DefaultOptionalDialogSetRequirement; + var ExcelClientDefaultSetRequirement = (function (_super) { + __extends(ExcelClientDefaultSetRequirement, _super); + function ExcelClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "excelapi": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = (function (_super) { + __extends(ExcelClientV1DefaultSetRequirement, _super); + function ExcelClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return ExcelClientV1DefaultSetRequirement; + }(ExcelClientDefaultSetRequirement)); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = (function (_super) { + __extends(OutlookClientDefaultSetRequirement, _super); + function OutlookClientDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = (function (_super) { + __extends(WordClientDefaultSetRequirement, _super); + function WordClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1, + "wordapi": 1.1 + }) || this; + } + return WordClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = (function (_super) { + __extends(WordClientV1DefaultSetRequirement, _super); + function WordClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2, + "imagecoercion": 1.1 + }); + return _this; + } + return WordClientV1DefaultSetRequirement; + }(WordClientDefaultSetRequirement)); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = (function (_super) { + __extends(PowerpointClientDefaultSetRequirement, _super); + function PowerpointClientDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = (function (_super) { + __extends(PowerpointClientV1DefaultSetRequirement, _super); + function PowerpointClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return PowerpointClientV1DefaultSetRequirement; + }(PowerpointClientDefaultSetRequirement)); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = (function (_super) { + __extends(ProjectClientDefaultSetRequirement, _super); + function ProjectClientDefaultSetRequirement() { + return _super.call(this, { + "selection": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ProjectClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = (function (_super) { + __extends(ExcelWebDefaultSetRequirement, _super); + function ExcelWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "file": 1.1 + }) || this; + } + return ExcelWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = (function (_super) { + __extends(WordWebDefaultSetRequirement, _super); + function WordWebDefaultSetRequirement() { + return _super.call(this, { + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "imagecoercion": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablecoercion": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = (function (_super) { + __extends(PowerpointWebDefaultSetRequirement, _super); + function PowerpointWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "settings": 1.1 + }) || this; + } + return PowerpointWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = (function (_super) { + __extends(OutlookWebDefaultSetRequirement, _super); + function OutlookWebDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = (function (_super) { + __extends(SwayWebDefaultSetRequirement, _super); + function SwayWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "documentevents": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return SwayWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = (function (_super) { + __extends(AccessWebDefaultSetRequirement, _super); + function AccessWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "partialtablebindings": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1 + }) || this; + } + return AccessWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = (function (_super) { + __extends(ExcelIOSDefaultSetRequirement, _super); + function ExcelIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = (function (_super) { + __extends(WordIOSDefaultSetRequirement, _super); + function WordIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = (function (_super) { + __extends(WordIOSV1DefaultSetRequirement, _super); + function WordIOSV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2 + }); + return _this; + } + return WordIOSV1DefaultSetRequirement; + }(WordIOSDefaultSetRequirement)); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = (function (_super) { + __extends(PowerpointIOSDefaultSetRequirement, _super); + function PowerpointIOSDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = (function (_super) { + __extends(OutlookIOSDefaultSetRequirement, _super); + function OutlookIOSDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.1 + }) || this; + } + return OutlookIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = (function () { + function RequirementsMatrixFactory() { + } + RequirementsMatrixFactory.initializeOsfDda = function () { + OSF.OUtil.setNamespace("Requirement", OSF.DDA); + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function (appContext) { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + try { + var setName = "dialogorigin"; + if (!matrixItem.hasOwnProperty(setName)) { + matrixItem[setName] = 1.1; + } + } + catch (ex) { } + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if (RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) { + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + } + else { + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})); + } + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function (appContext) { + var setRequirements = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + setRequirements = new DefaultSetRequirement(matrixItem); + } + else { + setRequirements = new DefaultRequiredDialogSetRequirement(); + var mainRequirement = appContext.get_requirementMatrix(); + if (mainRequirement != undefined && mainRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(mainRequirement.toLowerCase()); + for (var name in setRequirements._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + var dialogOptionalSetRequirement = new DefaultOptionalDialogSetRequirement(); + for (var name in dialogOptionalSetRequirement._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + } + } + try { + var setName = "dialogorigin"; + if (!setRequirements._sets.hasOwnProperty(setName) && window.opener) { + setRequirements._sets[setName] = 1.1; + } + } + catch (ex) { } + return new RequirementMatrix(setRequirements); + }; + RequirementsMatrixFactory.getClientFullVersionString = function (appContext) { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || + appName == 4096 || + appName == 8192 || + appName == 65536; + if (isIOSClient && appContext.get_appVersion() == 1) { + if (appName == 4096 && appMinorVersion >= 15) { + appFullVersion = "16.00.01"; + } + else { + appFullVersion = "16.00"; + } + } + else if (appContext.get_appName() == 64) { + appFullVersion = appContext.get_appVersion(); + } + else { + if (appMinorVersion < 10) { + appMinorVersionString = "0" + appMinorVersion; + } + else { + appMinorVersionString = "" + appMinorVersion; + } + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString; + } + return appContext.get_appName() + "-" + appFullVersion; + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function () { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement(); + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory; + }()); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory; + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})); +})(OfficeExt || (OfficeExt = {})); +OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" +}; +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" +}; +OSF.NamespaceManager = (function OSF_NamespaceManager() { + var _userOffice; + var _useShortcut = false; + return { + enableShortcut: function OSF_NamespaceManager$enableShortcut() { + if (!_useShortcut) { + if (window.Office) { + _userOffice = window.Office; + } + else { + OSF.OUtil.setNamespace("Office", window); + } + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true; + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() { + if (_useShortcut) { + if (_userOffice) { + window.Office = _userOffice; + } + else { + OSF.OUtil.unsetNamespace("Office", window); + } + _useShortcut = false; + } + } + }; +})(); +OSF.NamespaceManager.enableShortcut(); +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { + if (useShortcut) { + OSF.NamespaceManager.enableShortcut(); + } + else { + OSF.NamespaceManager.disableShortcut(); + } +}; +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { + var promise; + if (str && typeof str == "string") { + var index = str.indexOf("#"); + if (index != -1) { + var op = str.substring(0, index); + var target = str.substring(index + 1); + switch (op) { + case "binding": + case "bindings": + if (target) { + promise = new OSF.DDA.BindingPromise(target); + } + break; + } + } + } + if (!promise) { + if (errorCallback) { + var callbackType = typeof errorCallback; + if (callbackType == "function") { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext, OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)); + } + else { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, callbackType); + } + } + } + else { + promise.onFail = errorCallback; + return promise; + } +}; +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { + OSF.OUtil.defineEnumerableProperties(this, { + "contentLanguage": { + value: officeAppContext.get_dataLocale() + }, + "displayLanguage": { + value: officeAppContext.get_appUILocale() + }, + "touchEnabled": { + value: officeAppContext.get_touchEnabled() + }, + "commerceAllowed": { + value: officeAppContext.get_commerceAllowed() + }, + "host": { + value: OfficeExt.HostName.Host.getInstance().getHost() + }, + "platform": { + value: OfficeExt.HostName.Host.getInstance().getPlatform() + }, + "isDialog": { + value: OSF._OfficeAppFactory.getHostInfo().isDialog + }, + "diagnostics": { + value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion()) + } + }); + if (license) { + OSF.OUtil.defineEnumerableProperty(this, "license", { + value: license + }); + } + if (officeAppContext.ui) { + OSF.OUtil.defineEnumerableProperty(this, "ui", { + value: officeAppContext.ui + }); + } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.webAuth) { + OSF.OUtil.defineEnumerableProperty(this, "webAuth", { + value: officeAppContext.webAuth + }); + } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } + if (officeAppContext.extensionLifeCycle) { + OSF.OUtil.defineEnumerableProperty(this, "extensionLifeCycle", { + value: officeAppContext.extensionLifeCycle + }); + } + if (officeAppContext.messaging) { + OSF.OUtil.defineEnumerableProperty(this, "messaging", { + value: officeAppContext.messaging + }); + } + if (officeAppContext.ui && officeAppContext.ui.taskPaneAction) { + OSF.OUtil.defineEnumerableProperty(this, "taskPaneAction", { + value: officeAppContext.ui.taskPaneAction + }); + } + if (officeAppContext.ui && officeAppContext.ui.ribbonGallery) { + OSF.OUtil.defineEnumerableProperty(this, "ribbonGallery", { + value: officeAppContext.ui.ribbonGallery + }); + } + if (officeAppContext.get_isDialog()) { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } + else { + if (document) { + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: document + }); + } + if (appOM) { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this, displayName, { + value: appOM + }); + } + if (officeAppContext.get_officeTheme()) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return officeAppContext.get_officeTheme(); + } + }); + } + else if (getOfficeTheme) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return getOfficeTheme(); + } + }); + } + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + if (officeAppContext.get_featureGates) { + var featureGates = officeAppContext.get_featureGates(); + if (featureGates && featureGates["EnablePublicThemeManager"]) { + var themeManager = new OSF.DDA.Theming.InternalThemeHandler(); + themeManager.InitializeThemeManager(); + OSF.OUtil.defineEnumerableProperty(this, "themeManager", { + value: themeManager + }); + } + } + } +}; +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { + OSF.DDA.OutlookContext.uber.constructor.call(this, appContext, null, license, appOM, getOfficeTheme); + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "roamingSettings", { + value: settings + }); + } + if (appContext.sensitivityLabelsCatalog) { + OSF.OUtil.defineEnumerableProperty(this, "sensitivityLabelsCatalog", { + value: appContext.sensitivityLabelsCatalog() + }); + } +}; +OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { + var mode; + switch (officeAppContext.get_clientMode()) { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break; + } + ; + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "settings", { + value: settings + }); + } + ; + OSF.OUtil.defineMutableProperties(this, { + "mode": { + value: mode + }, + "url": { + value: officeAppContext.get_docUrl() + } + }); +}; +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { + OSF.DDA.JsomDocument.uber.constructor.call(this, officeAppContext, settings); + if (bindingFacade) { + OSF.OUtil.defineEnumerableProperty(this, "bindings", { + get: function OSF_DDA_Document$GetBindings() { return bindingFacade; } + }); + } + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetSelectedDataAsync, + am.SetSelectedDataAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])); +}; +OSF.OUtil.extend(OSF.DDA.JsomDocument, OSF.DDA.Document); +OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension, "context", { + get: function Microsoft_Office_WebExtension$GetContext() { + var context; + if (OSF && OSF._OfficeAppFactory) { + context = OSF._OfficeAppFactory.getContext(); + } + return context; + } +}); +OSF.DDA.License = function OSF_DDA_License(eToken) { + OSF.OUtil.defineEnumerableProperty(this, "value", { + value: eToken + }); +}; +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function () { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, displayName); + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) { + for (var name in params) { + var param = params[name]; + var arg = args[name]; + if (param["enum"]) { + switch (typeof arg) { + case "string": + if (OSF.OUtil.listContainsValue(param["enum"], arg)) { + break; + } + case "undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + } + if (param["types"]) { + if (!OSF.OUtil.listContainsValue(param["types"], typeof arg)) { + throw getInvalidParameterString(); + } + } + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) { + if (userArgs.length < requiredCount) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + } + var requiredArgs = []; + var index; + for (index = 0; index < requiredCount; index++) { + requiredArgs.push(userArgs[index]); + } + this.verifyArguments(requiredParameters, requiredArgs); + var ret = {}; + for (index = 0; index < requiredCount; index++) { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if (param.verify) { + var isValid = param.verify(arg, caller, stateInfo); + if (!isValid) { + throw getInvalidParameterString(); + } + } + ret[param.name] = arg; + } + return ret; + }, + this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) { + options = options || {}; + for (var optionName in supportedOptions) { + if (!OSF.OUtil.listContainsKey(options, optionName)) { + var value = undefined; + var option = supportedOptions[optionName]; + if (option.calculate && requiredArgs) { + value = option.calculate(requiredArgs, caller, stateInfo); + } + if (!value && option.defaultValue !== undefined) { + value = option.defaultValue; + } + options[optionName] = value; + } + } + return options; + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) { + var callArgs = {}; + for (var r in required) { + callArgs[r] = required[r]; + } + for (var o in options) { + callArgs[o] = options[o]; + } + for (var s in privateStateCallbacks) { + callArgs[s] = privateStateCallbacks[s](caller, stateInfo); + } + if (checkCallArgs) { + callArgs = checkCallArgs(callArgs, caller, stateInfo); + } + return callArgs; + }; +}; +OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" +}; +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" +}; +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 +}; +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" +}; +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.AsyncMethodNames[entry] = am; + } +}; +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 2) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + case "function": + if (parameterCallback) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + } + else { + parameterCallback = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + if (parameterCallback) { + if (options[Microsoft.Office.WebExtension.Parameters.Callback]) { + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + } + else { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + } + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (onSucceeded) { + payload = onSucceeded(response, caller, callArgs); + } + else { + payload = response; + } + } + else { + if (onFailed) { + payload = onFailed(status, response); + } + else { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + } + return payload; + }; + this.getCallArgs = function (suppliedArgs) { + var options, parameterCallback; + for (var i = suppliedArgs.length - 1; i >= requiredCount; i--) { + var argument = suppliedArgs[i]; + switch (typeof argument) { + case "object": + options = argument; + break; + case "function": + parameterCallback = argument; + break; + } + } + options = options || {}; + if (parameterCallback) { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + return options; + }; +}; +OSF.DDA.AsyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [], supportedOptions, privateStateCallbacks, params.onSucceeded, params.onFailed, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function (callDefinition) { + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { + OSF.OUtil.defineEnumerableProperties(this, { + "name": { + value: name + }, + "message": { + value: message + }, + "code": { + value: code + } + }); +}; +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { + OSF.OUtil.defineEnumerableProperties(this, { + "value": { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value] + }, + "status": { + value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded + } + }); + if (initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) { + OSF.OUtil.defineEnumerableProperty(this, "asyncContext", { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context] + }); + } + if (errorArgs) { + OSF.OUtil.defineEnumerableProperty(this, "error", { + value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + }); + } +}; +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if (callback) { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + } + else { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs, errorArgs)); + } +}; +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.SyncMethodNames[entry] = am; + } +}; +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 1) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; +}; +OSF.DDA.SyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [], supportedOptions, params.privateStateCallbacks, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function (callDefinition) { + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.ListType = (function () { + var listTypes = {}; + return { + setListType: function OSF_DDA_ListType$AddListType(t, prop) { listTypes[t] = prop; }, + isListType: function OSF_DDA_ListType$IsListType(t) { return OSF.OUtil.listContainsKey(listTypes, t); }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) { return listTypes[t]; } + }; +})(); +OSF.DDA.HostParameterMap = function (specialProcessor, mappings) { + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function (data) { + if (data != null && data.rows !== undefined) { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData; + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.JsonData] = { + toHost: function (data) { return data; }, + fromHost: function (data) { return typeof data === "string" ? JSON.parse(data) : data; } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) { + var ret = preimageSet ? {} : undefined; + for (var entry in preimageSet) { + var preimage = preimageSet[entry]; + var image; + if (OSF.DDA.ListType.isListType(entry)) { + image = []; + for (var subEntry in preimage) { + image.push(mapValues(preimage[subEntry], mapping)); + } + } + else if (OSF.OUtil.listContainsKey(dynamicTypes, entry)) { + image = dynamicTypes[entry][mapping](preimage); + } + else if (mapping == fromHostMap && specialProcessor.preserveNesting(entry)) { + image = mapValues(preimage, mapping); + } + else { + var maps = mappings[entry]; + if (maps) { + var map = maps[mapping]; + if (map) { + image = map[preimage]; + if (image === undefined) { + image = preimage; + } + } + } + else { + image = preimage; + } + } + ret[entry] = image; + } + return ret; + } + ; + function generateArguments(imageSet, parameters) { + var ret; + for (var param in parameters) { + var arg; + if (specialProcessor.isComplexType(param)) { + arg = generateArguments(imageSet, mappings[param][toHostMap]); + } + else { + arg = imageSet[param]; + } + if (arg != undefined) { + if (!ret) { + ret = {}; + } + var index = parameters[param]; + if (index == self) { + index = param; + } + ret[index] = specialProcessor.pack(param, arg); + } + } + return ret; + } + ; + function extractArguments(source, parameters, extracted) { + if (!extracted) { + extracted = {}; + } + for (var param in parameters) { + var index = parameters[param]; + var value; + if (index == self) { + value = source; + } + else if (index == sourceData) { + extracted[param] = source.toArray(); + continue; + } + else { + value = source[index]; + } + if (value === null || value === undefined) { + extracted[param] = undefined; + } + else { + value = specialProcessor.unpack(param, value); + var map; + if (specialProcessor.isComplexType(param)) { + map = mappings[param][fromHostMap]; + if (specialProcessor.preserveNesting(param)) { + extracted[param] = extractArguments(value, map); + } + else { + extractArguments(value, map, extracted); + } + } + else { + if (OSF.DDA.ListType.isListType(param)) { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for (var item in value) { + extractedValues[item] = extractArguments(value[item], map); + } + extracted[param] = extractedValues; + } + else { + extracted[param] = value; + } + } + } + } + return extracted; + } + ; + function applyMap(mapName, preimage, mapping) { + var parameters = mappings[mapName][mapping]; + var image; + if (mapping == "toHost") { + var imageSet = mapValues(preimage, mapping); + image = generateArguments(imageSet, parameters); + } + else if (mapping == "fromHost") { + var argumentSet = extractArguments(preimage, parameters); + image = mapValues(argumentSet, mapping); + } + return image; + } + ; + if (!mappings) { + mappings = {}; + } + this.addMapping = function (mapName, description) { + var toHost, fromHost; + if (description.map) { + toHost = description.map; + fromHost = {}; + for (var preimage in toHost) { + var image = toHost[preimage]; + if (image == self) { + image = preimage; + } + fromHost[image] = preimage; + } + } + else { + toHost = description.toHost; + fromHost = description.fromHost; + } + var pair = mappings[mapName]; + if (pair) { + var currMap = pair[toHostMap]; + for (var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for (var fh in currMap) + fromHost[fh] = currMap[fh]; + } + else { + pair = mappings[mapName] = {}; + } + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost; + }; + this.toHost = function (mapName, preimage) { return applyMap(mapName, preimage, toHostMap); }; + this.fromHost = function (mapName, image) { return applyMap(mapName, image, fromHostMap); }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function (ct) { specialProcessor.addComplexType(ct); }; + this.getDynamicType = function (dt) { return specialProcessor.getDynamicType(dt); }; + this.setDynamicType = function (dt, handler) { specialProcessor.setDynamicType(dt, handler); }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function (preimageSet, mapping) { return mapValues(preimageSet, mapping); }; +}; +OSF.DDA.SpecialProcessor = function (complexTypes, dynamicTypes) { + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) { + complexTypes.push(ct); + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) { + return dynamicTypes[dt]; + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) { + dynamicTypes[dt] = handler; + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) { + return OSF.OUtil.listContainsValue(complexTypes, t); + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) { + return OSF.OUtil.listContainsKey(dynamicTypes, p); + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) { + var pn = []; + if (OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if (OSF.DDA.DataNodeEventProperties) { + pn = pn.concat([ + OSF.DDA.DataNodeEventProperties.OldNode, + OSF.DDA.DataNodeEventProperties.NewNode, + OSF.DDA.DataNodeEventProperties.NextSiblingNode + ]); + } + return OSF.OUtil.listContainsValue(pn, p); + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].toHost(arg); + } + else { + value = arg; + } + return value; + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.DDA.getDecoratedParameterMap = function (specialProcessor, initialDefs) { + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + } + parameterMap.define = function define(definition) { + var args = {}; + var toHost = createObject(definition.toHost); + if (definition.invertible) { + args.map = toHost; + } + else if (definition.canonical) { + args.toHost = args.fromHost = toHost; + } + else { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost); + } + parameterMap.addMapping(definition.type, args); + if (definition.isComplexType) + parameterMap.addComplexType(definition.type); + }; + for (var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap; +}; +OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + "GoToByIdAsync": did.dispidNavigateToMethod, + "GetSelectedDataAsync": did.dispidGetSelectedDataMethod, + "SetSelectedDataAsync": did.dispidSetSelectedDataMethod, + "GetDocumentCopyChunkAsync": did.dispidGetDocumentCopyChunkMethod, + "ReleaseDocumentCopyAsync": did.dispidReleaseDocumentCopyMethod, + "GetDocumentCopyAsync": did.dispidGetDocumentCopyMethod, + "AddFromSelectionAsync": did.dispidAddBindingFromSelectionMethod, + "AddFromPromptAsync": did.dispidAddBindingFromPromptMethod, + "AddFromNamedItemAsync": did.dispidAddBindingFromNamedItemMethod, + "GetAllAsync": did.dispidGetAllBindingsMethod, + "GetByIdAsync": did.dispidGetBindingMethod, + "ReleaseByIdAsync": did.dispidReleaseBindingMethod, + "GetDataAsync": did.dispidGetBindingDataMethod, + "SetDataAsync": did.dispidSetBindingDataMethod, + "AddRowsAsync": did.dispidAddRowsMethod, + "AddColumnsAsync": did.dispidAddColumnsMethod, + "DeleteAllDataValuesAsync": did.dispidClearAllRowsMethod, + "RefreshAsync": did.dispidLoadSettingsMethod, + "SaveAsync": did.dispidSaveSettingsMethod, + "GetActiveViewAsync": did.dispidGetActiveViewMethod, + "GetFilePropertiesAsync": did.dispidGetFilePropertiesMethod, + "GetOfficeThemeAsync": did.dispidGetOfficeThemeMethod, + "GetDocumentThemeAsync": did.dispidGetDocumentThemeMethod, + "ClearFormatsAsync": did.dispidClearFormatsMethod, + "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, + "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, + "GetAuthContextAsync": did.dispidGetAuthContextMethod, + "GetNestedAppAuthContextAsync": did.dispidGetNestedAppAuthContextMethod, + "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, + "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, + "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, + "InsertFormAsync": did.dispidInsertFormMethod, + "ExecuteFeature": did.dispidExecuteFeature, + "QueryFeature": did.dispidQueryFeature, + "AddDataPartAsync": did.dispidAddDataPartMethod, + "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, + "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, + "GetPartXmlAsync": did.dispidGetDataPartXmlMethod, + "GetPartNodesAsync": did.dispidGetDataPartNodesMethod, + "DeleteDataPartAsync": did.dispidDeleteDataPartMethod, + "GetNodeValueAsync": did.dispidGetDataNodeValueMethod, + "GetNodeXmlAsync": did.dispidGetDataNodeXmlMethod, + "GetRelativeNodesAsync": did.dispidGetDataNodesMethod, + "SetNodeValueAsync": did.dispidSetDataNodeValueMethod, + "SetNodeXmlAsync": did.dispidSetDataNodeXmlMethod, + "AddDataPartNamespaceAsync": did.dispidAddDataNamespaceMethod, + "GetDataPartNamespaceAsync": did.dispidGetDataUriByPrefixMethod, + "GetDataPartPrefixAsync": did.dispidGetDataPrefixByUriMethod, + "GetNodeTextAsync": did.dispidGetDataNodeTextMethod, + "SetNodeTextAsync": did.dispidSetDataNodeTextMethod, + "GetSelectedTask": did.dispidGetSelectedTaskMethod, + "GetTask": did.dispidGetTaskMethod, + "GetWSSUrl": did.dispidGetWSSUrlMethod, + "GetTaskField": did.dispidGetTaskFieldMethod, + "GetSelectedResource": did.dispidGetSelectedResourceMethod, + "GetResourceField": did.dispidGetResourceFieldMethod, + "GetProjectField": did.dispidGetProjectFieldMethod, + "GetSelectedView": did.dispidGetSelectedViewMethod, + "GetTaskByIndex": did.dispidGetTaskByIndexMethod, + "GetResourceByIndex": did.dispidGetResourceByIndexMethod, + "SetTaskField": did.dispidSetTaskFieldMethod, + "SetResourceField": did.dispidSetResourceFieldMethod, + "GetMaxTaskIndex": did.dispidGetMaxTaskIndexMethod, + "GetMaxResourceIndex": did.dispidGetMaxResourceIndexMethod, + "CreateTask": did.dispidCreateTaskMethod + }; + for (var method in methodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = methodMap[method]; + } + } + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var syncMethodMap = { + "MessageParent": did.dispidMessageParentMethod, + "SendMessage": did.dispidSendMessageMethod + }; + for (var method in syncMethodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = syncMethodMap[method]; + } + } + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + "SettingsChanged": did.dispidSettingsChangedEvent, + "DocumentSelectionChanged": did.dispidDocumentSelectionChangedEvent, + "BindingSelectionChanged": did.dispidBindingSelectionChangedEvent, + "BindingDataChanged": did.dispidBindingDataChangedEvent, + "ActiveViewChanged": did.dispidActiveViewChangedEvent, + "OfficeThemeChanged": did.dispidOfficeThemeChangedEvent, + "DocumentThemeChanged": did.dispidDocumentThemeChangedEvent, + "AppCommandInvoked": did.dispidAppCommandInvokedEvent, + "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, + "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, + "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, + "RecurrenceChanged": did.dispidOlkRecurrenceChangedEvent, + "AttachmentsChanged": did.dispidOlkAttachmentsChangedEvent, + "EnhancedLocationsChanged": did.dispidOlkEnhancedLocationsChangedEvent, + "InfobarClicked": did.dispidOlkInfobarClickedEvent, + "SelectedItemsChanged": did.dispidOlkSelectedItemsChangedEvent, + "SensitivityLabelChanged": did.dispidOlkSensitivityLabelChangedEvent, + "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, + "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, + "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, + "DataNodeInserted": did.dispidDataNodeAddedEvent, + "DataNodeReplaced": did.dispidDataNodeReplacedEvent, + "DataNodeDeleted": did.dispidDataNodeDeletedEvent + }; + for (var event in eventMap) { + if (jsom[event]) { + dispIdMap[jsom[event]] = eventMap[event]; + } + } + function IsObjectEvent(dispId) { + return (dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { + if (typeof ex == "number") { + if (!callArgs) { + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + } + OSF.DDA.issueAsyncResult(callArgs, ex, OSF.DDA.ErrorCodeManager.getErrorArgs(ex)); + } + else { + throw ex; + } + } + ; + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) { + var callArgs; + try { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) { + window.Excel._RedirectV1APIs = true; + } + if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if (richApiInExcelMethodSubstitution.preprocess) { + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + } + var ctx = new window.Excel.RequestContext(); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); + ctx.sync() + .then(function () { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if (richApiInExcelMethodSubstitution.postprocess) { + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); + } + if (status != 0) { + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, response); + })["catch"](function (error) { + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure, null); + }); + } + else { + var hostCallArgs; + if (parameterMap.toHost) { + hostCallArgs = parameterMap.toHost(dispId, callArgs); + } + else { + hostCallArgs = callArgs; + } + var startTime = (new Date()).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + "dispId": dispId, + "hostCallArgs": hostCallArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": function (status, hostResponseArgs) { + var responseArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (parameterMap.fromHost) { + responseArgs = parameterMap.fromHost(dispId, hostResponseArgs); + } + else { + responseArgs = hostResponseArgs; + } + } + else { + responseArgs = hostResponseArgs; + } + var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); + OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry && !(OSF.ConstantNames && OSF.ConstantNames.IsCustomFunctionsRuntime)) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } + } + }); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); + if (!added) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; + } + } + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if (isPopupWindow) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return; + } + var dispId_1 = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId_1); + var targetId_1 = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId_1) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId_1, + "targetId": targetId_1, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = null; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web" && dispId_1 == OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent) { + args = hostArgs; + } + else { + args = parameterMap.fromHost(dispId_1, hostArgs); + } + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId_1, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId_1, args)); + } + }); + } + else { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var status, removeSuccess; + if (handler === null) { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + else { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration + }); + } + else { + onEnsureRegistration(status); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller, isModal) { + var callArgs; + var targetId; + var asyncMethodCall = null; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) { + var payload; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + else { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status, onSucceedArgs, caller, callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + } + OSF.DDA.issueAsyncResult(callArgs, status, payload); + } + try { + if (dialogMessageEvent == undefined || dialogOtherEvent == undefined) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + } + if (!isModal) { + if (OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + } + else { + if (OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.id]; + } + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + callArgs["isModal"] = isModal; + targetId = JSON.stringify(callArgs); + if (!OSF.DialogShownStatus.hasDialogShown) { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + } + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = parameterMap.fromHost(dispId, hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent, caller, args); + if (event.type == dialogOtherEvent) { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]); + } + eventDispatch.fireOrQueueEvent(event); + if (args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false; + } + } + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) { + var callArgs; + var dialogMessageEvent, dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false; + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": closeCallback + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + if (closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed, OSF.DDA.AsyncMethodNames.CloseAsync.displayName, closeStatus); + } + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; +}; +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { + for (var entry in asyncMethodNames) { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if (!target[name]) { + OSF.OUtil.defineEnumerableProperty(target, name, { + value: (function (asyncMethod) { + return function () { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod, arguments, target, privateState); + }; + })(method) + }); + } + } +}; +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if (!target[add]) { + OSF.OUtil.defineEnumerableProperty(target, add, { + value: function () { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments, eventDispatch, target, isPopupWindow); + } + }); + } + if (!target[remove]) { + OSF.OUtil.defineEnumerableProperty(target, remove, { + value: function () { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments, eventDispatch, target); + } + }); + } +}; +OSF.ShowWindowDialogParameterKeys = { + Url: "url", + Width: "width", + Height: "height", + DisplayInIframe: "displayInIframe", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + PromptBeforeOpen: "promptBeforeOpen", + EnforceAppDomain: "enforceAppDomain", + UrlNoHostInfo: "urlNoHostInfo" +}; +OSF.HostThemeButtonStyleKeys = { + ButtonBorderColor: "buttonBorderColor", + ButtonBackgroundColor: "buttonBackgroundColor" +}; +OSF.OmexPageParameterKeys = { + AppName: "client", + AppVersion: "cv", + AppUILocale: "ui", + AppDomain: "appDomain", + StoreLocator: "rs", + AssetId: "assetid", + NotificationType: "notificationType", + AppCorrelationId: "corr", + AuthType: "authType", + AppId: "appid", + Scopes: "scopes" +}; +OSF.AuthType = { + Anonymous: 0, + MSA: 1, + OrgId: 2, + ADAL: 3 +}; +OSF.OmexMessageKeys = { + MessageType: "messageType", + MessageValue: "messageValue" +}; +OSF.OmexRemoveAddinMessageKeys = { + RemoveAddinResultCode: "resultCode", + RemoveAddinResultValue: "resultValue" +}; +OSF.OmexRemoveAddinResultCode = { + Success: 0, + ClientError: 400, + ServerError: 500, + UnknownError: 600 +}; +(function (OfficeExt) { + var WACUtils; + (function (WACUtils) { + var _trustedDomain = "^https:\/\/[a-z0-9-]+\.(officeapps\.live|officeapps-df\.live|partner\.officewebapps)\.com\/"; + function parseAppContextFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.AppContext); + } + WACUtils.parseAppContextFromWindowName = parseAppContextFromWindowName; + function serializeObjectToString(obj) { + if (typeof (JSON) !== "undefined") { + try { + return JSON.stringify(obj); + } + catch (ex) { + } + } + return ""; + } + WACUtils.serializeObjectToString = serializeObjectToString; + function isHostTrusted() { + return (new RegExp(_trustedDomain)).test(OSF.getClientEndPoint()._targetUrl.toLowerCase()); + } + WACUtils.isHostTrusted = isHostTrusted; + function addHostInfoAsQueryParam(url, hostInfoValue) { + if (!url) { + return null; + } + url = url.trim() || ''; + var questionMark = "?"; + var hostInfo = "_host_Info="; + var ampHostInfo = "&_host_Info="; + var fragmentSeparator = "#"; + var urlParts = url.split(fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(fragmentSeparator); + var querySplits = urlWithoutFragment.split(questionMark); + var urlWithoutFragmentWithHostInfo; + if (querySplits.length > 1) { + urlWithoutFragmentWithHostInfo = urlWithoutFragment + ampHostInfo + hostInfoValue; + } + else if (querySplits.length > 0) { + urlWithoutFragmentWithHostInfo = urlWithoutFragment + questionMark + hostInfo + hostInfoValue; + } + if (fragment) { + return [urlWithoutFragmentWithHostInfo, fragmentSeparator, fragment].join(''); + } + else { + return urlWithoutFragmentWithHostInfo; + } + } + WACUtils.addHostInfoAsQueryParam = addHostInfoAsQueryParam; + function getDomainForUrl(url) { + if (!url) { + return null; + } + var url_parser = document.createElement('a'); + url_parser.href = url; + return url_parser.protocol + "//" + url_parser.host; + } + WACUtils.getDomainForUrl = getDomainForUrl; + function shouldUseLocalStorageToPassMessage() { + try { + var osList = [ + "Windows NT 6.1", + "Windows NT 6.2", + "Windows NT 6.3", + "Windows NT 10.0" + ]; + var userAgent = window.navigator.userAgent; + for (var i = 0, len = osList.length; i < len; i++) { + if (userAgent.indexOf(osList[i]) > -1) { + return isInternetExplorer(); + } + } + return false; + } + catch (e) { + logExceptionToBrowserConsole("Error happens in shouldUseLocalStorageToPassMessage.", e); + return false; + } + } + WACUtils.shouldUseLocalStorageToPassMessage = shouldUseLocalStorageToPassMessage; + function isInternetExplorer() { + try { + var userAgent = window.navigator.userAgent; + return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1 || userAgent.indexOf("Edge/") > -1; + } + catch (e) { + logExceptionToBrowserConsole("Error happens in isInternetExplorer.", e); + return false; + } + } + WACUtils.isInternetExplorer = isInternetExplorer; + function removeMatchesFromLocalStorage(regexPatterns) { + var _localStorage = OSF.OUtil.getLocalStorage(); + var keys = _localStorage.getKeysWithPrefix(""); + for (var i = 0, len = keys.length; i < len; i++) { + var key = keys[i]; + for (var j = 0, lenRegex = regexPatterns.length; j < lenRegex; j++) { + if (regexPatterns[j].test(key)) { + _localStorage.removeItem(key); + break; + } + } + } + } + WACUtils.removeMatchesFromLocalStorage = removeMatchesFromLocalStorage; + function logExceptionToBrowserConsole(message, exception) { + OsfMsAjaxFactory.msAjaxDebug.trace(message + " Exception details: " + serializeObjectToString(exception)); + } + WACUtils.logExceptionToBrowserConsole = logExceptionToBrowserConsole; + function isTeamsWebView() { + var ua = navigator.userAgent; + return /Teams\/((?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)\.\d+)).* Electron\/((?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)\.\d+))/.test(ua); + } + WACUtils.isTeamsWebView = isTeamsWebView; + function getHostSecure(url) { + if (typeof url === "undefined" || !url) { + return undefined; + } + var host = undefined; + var httpsProtocol = "https:"; + try { + var urlObj = new URL(url); + if (urlObj) { + host = urlObj.host; + } + if (!urlObj.protocol) { + throw "fallback"; + } + else if (urlObj.protocol !== httpsProtocol) { + return undefined; + } + } + catch (ex) { + try { + var parser = document.createElement("a"); + parser.href = url; + if (parser.protocol !== httpsProtocol) { + return undefined; + } + var match = url.match(new RegExp("^https://[^/?#]+", "i")); + var naiveMatch = (match && match.length == 1) ? match[0].toLowerCase() : ""; + var parsedUrlWithoutPort = (parser.protocol + "//" + parser.hostname).toLowerCase(); + var parsedUrlWithPort = (parser.protocol + "//" + parser.host).toLowerCase(); + if (parsedUrlWithPort === naiveMatch || parsedUrlWithoutPort == naiveMatch) { + host = parser.port == "443" ? parser.hostname : parser.host; + } + } + catch (ex) { + return undefined; + } + } + return host ? host.toLowerCase() : undefined; + } + WACUtils.getHostSecure = getHostSecure; + var CacheConstants = (function () { + function CacheConstants() { + } + CacheConstants.GatedCacheKeyPrefix = "__OSF_GATED_OMEX."; + CacheConstants.AnonymousCacheKeyPrefix = "__OSF_ANONYMOUS_OMEX."; + CacheConstants.UngatedCacheKeyPrefix = "__OSF_OMEX."; + CacheConstants.ActivatedCacheKeyPrefix = "__OSF_RUNTIME_.Activated."; + CacheConstants.AppinstallAuthenticated = "appinstall_authenticated."; + CacheConstants.Entitlement = "entitle."; + CacheConstants.AppState = "appState."; + CacheConstants.AppDetails = "appDetails."; + CacheConstants.AppInstallInfo = "appInstallInfo."; + CacheConstants.AuthenticatedAppInstallInfoCacheKey = CacheConstants.GatedCacheKeyPrefix + CacheConstants.AppinstallAuthenticated + "{0}.{1}.{2}.{3}"; + CacheConstants.EntitlementsKey = CacheConstants.Entitlement + "{0}.{1}"; + CacheConstants.AppStateCacheKey = "{0}" + CacheConstants.AppState + "{1}.{2}"; + CacheConstants.AppDetailKey = "{0}" + CacheConstants.AppDetails + "{1}"; + CacheConstants.AppInstallInfoKey = "{0}" + CacheConstants.AppInstallInfo + "{1}.{2}"; + CacheConstants.ActivatedCacheKey = CacheConstants.ActivatedCacheKeyPrefix + "{0}.{1}.{2}"; + return CacheConstants; + }()); + WACUtils.CacheConstants = CacheConstants; + })(WACUtils = OfficeExt.WACUtils || (OfficeExt.WACUtils = {})); +})(OfficeExt || (OfficeExt = {})); +(function (OfficeExt) { + var loadMsAjax = false; + var MsAjaxTypeHelper = (function () { + function MsAjaxTypeHelper() { + } + MsAjaxTypeHelper.isInstanceOfType = function (type, instance) { + if (typeof (instance) === "undefined" || instance === null) + return false; + if (instance instanceof type) + return true; + var instanceType = instance.constructor; + if (!instanceType || (typeof (instanceType) !== "function") || !instanceType.__typeName || instanceType.__typeName === 'Object') { + instanceType = Object; + } + return !!(instanceType === type) || + (instanceType.__typeName && type.__typeName && instanceType.__typeName === type.__typeName); + }; + return MsAjaxTypeHelper; + }()); + OfficeExt.MsAjaxTypeHelper = MsAjaxTypeHelper; + var MsAjaxError = (function () { + function MsAjaxError() { + } + MsAjaxError.create = function (message, errorInfo) { + var err = new Error(message); + err.message = message; + if (errorInfo) { + for (var v in errorInfo) { + err[v] = errorInfo[v]; + } + } + err.popStackFrame(); + return err; + }; + MsAjaxError.parameterCount = function (message) { + var displayMessage = "Sys.ParameterCountException: " + (message ? message : "Parameter count mismatch."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.ParameterCountException' }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argument = function (paramName, message) { + var displayMessage = "Sys.ArgumentException: " + (message ? message : "Value does not fall within the expected range."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentNull = function (paramName, message) { + var displayMessage = "Sys.ArgumentNullException: " + (message ? message : "Value cannot be null."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentOutOfRange = function (paramName, actualValue, message) { + var displayMessage = "Sys.ArgumentOutOfRangeException: " + (message ? message : "Specified argument was out of the range of valid values."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + if (typeof (actualValue) !== "undefined" && actualValue !== null) { + displayMessage += "\n" + MsAjaxString.format("Actual value was {0}.", actualValue); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentType = function (paramName, actualType, expectedType, message) { + var displayMessage = "Sys.ArgumentTypeException: "; + if (message) { + displayMessage += message; + } + else if (actualType && expectedType) { + displayMessage += MsAjaxString.format("Object of type '{0}' cannot be converted to type '{1}'.", actualType.getName ? actualType.getName() : actualType, expectedType.getName ? expectedType.getName() : expectedType); + } + else { + displayMessage += "Object cannot be converted to the required type."; + } + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentUndefined = function (paramName, message) { + var displayMessage = "Sys.ArgumentUndefinedException: " + (message ? message : "Value cannot be undefined."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.invalidOperation = function (message) { + var displayMessage = "Sys.InvalidOperationException: " + (message ? message : "Operation is not valid due to the current state of the object."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.InvalidOperationException' }); + err.popStackFrame(); + return err; + }; + return MsAjaxError; + }()); + OfficeExt.MsAjaxError = MsAjaxError; + var MsAjaxString = (function () { + function MsAjaxString() { + } + MsAjaxString.format = function (format) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var source = format; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10); + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }; + MsAjaxString.startsWith = function (str, prefix) { + return (str.substr(0, prefix.length) === prefix); + }; + return MsAjaxString; + }()); + OfficeExt.MsAjaxString = MsAjaxString; + var MsAjaxDebug = (function () { + function MsAjaxDebug() { + } + MsAjaxDebug.trace = function (text) { + if (typeof Debug !== "undefined" && Debug.writeln) + Debug.writeln(text); + if (window.console && window.console.log) + window.console.log(text); + if (window.opera && window.opera.postError) + window.opera.postError(text); + if (window.debugService && window.debugService.trace) + window.debugService.trace(text); + var a = document.getElementById("TraceConsole"); + if (a && a.tagName.toUpperCase() === "TEXTAREA") { + a.appendChild(document.createTextNode(text + "\n")); + } + }; + return MsAjaxDebug; + }()); + OfficeExt.MsAjaxDebug = MsAjaxDebug; + if (!loadMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) { + var registerTypeInternal = function registerTypeInternal(type, name, isClass) { + if (type.__typeName === undefined || type.__typeName === null) { + type.__typeName = name; + } + if (type.__class === undefined || type.__class === null) { + type.__class = isClass; + } + }; + registerTypeInternal(Function, "Function", true); + registerTypeInternal(Error, "Error", true); + registerTypeInternal(Object, "Object", true); + registerTypeInternal(String, "String", true); + registerTypeInternal(Boolean, "Boolean", true); + registerTypeInternal(Date, "Date", true); + registerTypeInternal(Number, "Number", true); + registerTypeInternal(RegExp, "RegExp", true); + registerTypeInternal(Array, "Array", true); + if (!Function.createCallback) { + Function.createCallback = function Function$createCallback(method, context) { + var e = Function._validateParams(arguments, [ + { name: "method", type: Function }, + { name: "context", mayBeNull: true } + ]); + if (e) + throw e; + return function () { + var l = arguments.length; + if (l > 0) { + var args = []; + for (var i = 0; i < l; i++) { + args[i] = arguments[i]; + } + args[l] = context; + return method.apply(this, args); + } + return method.call(this, context); + }; + }; + } + if (!Function.createDelegate) { + Function.createDelegate = function Function$createDelegate(instance, method) { + var e = Function._validateParams(arguments, [ + { name: "instance", mayBeNull: true }, + { name: "method", type: Function } + ]); + if (e) + throw e; + return function () { + return method.apply(instance, arguments); + }; + }; + } + if (!Function._validateParams) { + Function._validateParams = function (params, expectedParams, validateParameterCount) { + var e, expectedLength = expectedParams.length; + validateParameterCount = validateParameterCount || (typeof (validateParameterCount) === "undefined"); + e = Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i = 0, l = params.length; i < l; i++) { + var expectedParam = expectedParams[Math.min(i, expectedLength - 1)], paramName = expectedParam.name; + if (expectedParam.parameterArray) { + paramName += "[" + (i - expectedLength + 1) + "]"; + } + else if (!validateParameterCount && (i >= expectedLength)) { + break; + } + e = Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; + }; + } + if (!Function._validateParameterCount) { + Function._validateParameterCount = function (params, expectedParams, validateParameterCount) { + var i, error, expectedLen = expectedParams.length, actualLen = params.length; + if (actualLen < expectedLen) { + var minParams = expectedLen; + for (i = 0; i < expectedLen; i++) { + var param = expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error = true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error = true; + for (i = 0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error = false; + break; + } + } + } + if (error) { + var e = MsAjaxError.parameterCount(); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!Function._validateParameter) { + Function._validateParameter = function (param, expectedParam, paramName) { + var e, expectedType = expectedParam.type, expectedInteger = !!expectedParam.integer, expectedDomElement = !!expectedParam.domElement, mayBeNull = !!expectedParam.mayBeNull; + e = Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType = expectedParam.elementType, elementMayBeNull = !!expectedParam.elementMayBeNull; + if (expectedType === Array && typeof (param) !== "undefined" && param !== null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger = !!expectedParam.elementInteger, expectedElementDomElement = !!expectedParam.elementDomElement; + for (var i = 0; i < param.length; i++) { + var elem = param[i]; + e = Function._validateParameterType(elem, expectedElementType, expectedElementInteger, expectedElementDomElement, elementMayBeNull, paramName + "[" + i + "]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; + }; + } + if (!Function._validateParameterType) { + Function._validateParameterType = function (param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof (param) === "undefined") { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param === null) { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && !OfficeExt.MsAjaxTypeHelper.isInstanceOfType(expectedType, param)) { + e = OfficeExt.MsAjaxError.argumentType(paramName, typeof (param), expectedType); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!window.Type) { + window.Type = Function; + } + if (!Type.registerNamespace) { + Type.registerNamespace = function (ns) { + var namespaceParts = ns.split('.'); + var currentNamespace = window; + for (var i = 0; i < namespaceParts.length; i++) { + currentNamespace[namespaceParts[i]] = currentNamespace[namespaceParts[i]] || {}; + currentNamespace = currentNamespace[namespaceParts[i]]; + } + }; + } + if (!Type.prototype.registerClass) { + Type.prototype.registerClass = function (cls) { cls = {}; }; + } + if (typeof (Sys) === "undefined") { + Type.registerNamespace('Sys'); + } + if (!Error.prototype.popStackFrame) { + Error.prototype.popStackFrame = function () { + if (arguments.length !== 0) + throw MsAjaxError.parameterCount(); + if (typeof (this.stack) === "undefined" || this.stack === null || + typeof (this.fileName) === "undefined" || this.fileName === null || + typeof (this.lineNumber) === "undefined" || this.lineNumber === null) { + return; + } + var stackFrames = this.stack.split("\n"); + var currentFrame = stackFrames[0]; + var pattern = this.fileName + ":" + this.lineNumber; + while (typeof (currentFrame) !== "undefined" && + currentFrame !== null && + currentFrame.indexOf(pattern) === -1) { + stackFrames.shift(); + currentFrame = stackFrames[0]; + } + var nextFrame = stackFrames[1]; + if (typeof (nextFrame) === "undefined" || nextFrame === null) { + return; + } + var nextFrameParts = nextFrame.match(/@(.*):(\d+)$/); + if (typeof (nextFrameParts) === "undefined" || nextFrameParts === null) { + return; + } + this.fileName = nextFrameParts[1]; + this.lineNumber = parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack = stackFrames.join("\n"); + }; + } + OsfMsAjaxFactory.msAjaxError = MsAjaxError; + OsfMsAjaxFactory.msAjaxString = MsAjaxString; + OsfMsAjaxFactory.msAjaxDebug = MsAjaxDebug; + } +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Common", Microsoft.Office); +Microsoft.Office.Common.InvokeType = { + "async": 0, + "sync": 1, + "asyncRegisterEvent": 2, + "asyncUnregisterEvent": 3, + "syncRegisterEvent": 4, + "syncUnregisterEvent": 5 +}; +OSF.SerializerVersion = { + MsAjax: 0, + Browser: 1 +}; +(function (OfficeExt) { + function appSpecificCheckOriginFunction(allowed_domains, eventObj, origin, checkOriginFunction) { + return false; + } + ; + OfficeExt.appSpecificCheckOrigin = appSpecificCheckOriginFunction; +})(OfficeExt || (OfficeExt = {})); +Microsoft.Office.Common.InvokeType = { "async": 0, + "sync": 1, + "asyncRegisterEvent": 2, + "asyncUnregisterEvent": 3, + "syncRegisterEvent": 4, + "syncUnregisterEvent": 5 +}; +Microsoft.Office.Common.InvokeResultCode = { + "noError": 0, + "errorInRequest": -1, + "errorHandlingRequest": -2, + "errorInResponse": -3, + "errorHandlingResponse": -4, + "errorHandlingRequestAccessDenied": -5, + "errorHandlingMethodCallTimedout": -6 +}; +Microsoft.Office.Common.MessageType = { "request": 0, + "response": 1 +}; +Microsoft.Office.Common.ActionType = { "invoke": 0, + "registerEvent": 1, + "unregisterEvent": 2 }; +Microsoft.Office.Common.ResponseType = { "forCalling": 0, + "forEventing": 1 +}; +Microsoft.Office.Common.HostTrustStatus = { + "unknown": 0, + "untrusted": 1, + "nothttps": 2, + "trusted": 3 +}; +Microsoft.Office.Common.MethodObject = function Microsoft_Office_Common_MethodObject(method, invokeType, blockingOthers) { + this._method = method; + this._invokeType = invokeType; + this._blockingOthers = blockingOthers; +}; +Microsoft.Office.Common.MethodObject.prototype = { + getMethod: function Microsoft_Office_Common_MethodObject$getMethod() { + return this._method; + }, + getInvokeType: function Microsoft_Office_Common_MethodObject$getInvokeType() { + return this._invokeType; + }, + getBlockingFlag: function Microsoft_Office_Common_MethodObject$getBlockingFlag() { + return this._blockingOthers; + } +}; +Microsoft.Office.Common.EventMethodObject = function Microsoft_Office_Common_EventMethodObject(registerMethodObject, unregisterMethodObject) { + this._registerMethodObject = registerMethodObject; + this._unregisterMethodObject = unregisterMethodObject; +}; +Microsoft.Office.Common.EventMethodObject.prototype = { + getRegisterMethodObject: function Microsoft_Office_Common_EventMethodObject$getRegisterMethodObject() { + return this._registerMethodObject; + }, + getUnregisterMethodObject: function Microsoft_Office_Common_EventMethodObject$getUnregisterMethodObject() { + return this._unregisterMethodObject; + } +}; +Microsoft.Office.Common.ServiceEndPoint = function Microsoft_Office_Common_ServiceEndPoint(serviceEndPointId) { + var e = Function._validateParams(arguments, [ + { name: "serviceEndPointId", type: String, mayBeNull: false } + ]); + if (e) + throw e; + this._methodObjectList = {}; + this._eventHandlerProxyList = {}; + this._Id = serviceEndPointId; + this._conversations = {}; + this._policyManager = null; + this._appDomains = {}; + this._onHandleRequestError = null; +}; +Microsoft.Office.Common.ServiceEndPoint.prototype = { + registerMethod: function Microsoft_Office_Common_ServiceEndPoint$registerMethod(methodName, method, invokeType, blockingOthers) { + var e = Function._validateParams(arguments, [{ name: "methodName", type: String, mayBeNull: false }, + { name: "method", type: Function, mayBeNull: false }, + { name: "invokeType", type: Number, mayBeNull: false }, + { name: "blockingOthers", type: Boolean, mayBeNull: false } + ]); + if (e) + throw e; + if (invokeType !== Microsoft.Office.Common.InvokeType.async + && invokeType !== Microsoft.Office.Common.InvokeType.sync) { + throw OsfMsAjaxFactory.msAjaxError.argument("invokeType"); + } + var methodObject = new Microsoft.Office.Common.MethodObject(method, invokeType, blockingOthers); + this._methodObjectList[methodName] = methodObject; + }, + unregisterMethod: function Microsoft_Office_Common_ServiceEndPoint$unregisterMethod(methodName) { + var e = Function._validateParams(arguments, [ + { name: "methodName", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete this._methodObjectList[methodName]; + }, + registerEvent: function Microsoft_Office_Common_ServiceEndPoint$registerEvent(eventName, registerMethod, unregisterMethod) { + var e = Function._validateParams(arguments, [{ name: "eventName", type: String, mayBeNull: false }, + { name: "registerMethod", type: Function, mayBeNull: false }, + { name: "unregisterMethod", type: Function, mayBeNull: false } + ]); + if (e) + throw e; + var methodObject = new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(registerMethod, Microsoft.Office.Common.InvokeType.syncRegisterEvent, false), new Microsoft.Office.Common.MethodObject(unregisterMethod, Microsoft.Office.Common.InvokeType.syncUnregisterEvent, false)); + this._methodObjectList[eventName] = methodObject; + }, + registerEventEx: function Microsoft_Office_Common_ServiceEndPoint$registerEventEx(eventName, registerMethod, registerMethodInvokeType, unregisterMethod, unregisterMethodInvokeType) { + var e = Function._validateParams(arguments, [{ name: "eventName", type: String, mayBeNull: false }, + { name: "registerMethod", type: Function, mayBeNull: false }, + { name: "registerMethodInvokeType", type: Number, mayBeNull: false }, + { name: "unregisterMethod", type: Function, mayBeNull: false }, + { name: "unregisterMethodInvokeType", type: Number, mayBeNull: false } + ]); + if (e) + throw e; + var methodObject = new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(registerMethod, registerMethodInvokeType, false), new Microsoft.Office.Common.MethodObject(unregisterMethod, unregisterMethodInvokeType, false)); + this._methodObjectList[eventName] = methodObject; + }, + unregisterEvent: function (eventName) { + var e = Function._validateParams(arguments, [ + { name: "eventName", type: String, mayBeNull: false } + ]); + if (e) + throw e; + this.unregisterMethod(eventName); + }, + registerConversation: function Microsoft_Office_Common_ServiceEndPoint$registerConversation(conversationId, conversationUrl, appDomains, serializerVersion) { + var e = Function._validateParams(arguments, [ + { name: "conversationId", type: String, mayBeNull: false }, + { name: "conversationUrl", type: String, mayBeNull: false, optional: true }, + { name: "appDomains", type: Object, mayBeNull: true, optional: true }, + { name: "serializerVersion", type: Number, mayBeNull: true, optional: true } + ]); + if (e) + throw e; + if (appDomains) { + if (!(appDomains instanceof Array)) { + throw OsfMsAjaxFactory.msAjaxError.argument("appDomains"); + } + this._appDomains[conversationId] = appDomains; + } + this._conversations[conversationId] = { url: conversationUrl, serializerVersion: serializerVersion }; + }, + unregisterConversation: function Microsoft_Office_Common_ServiceEndPoint$unregisterConversation(conversationId) { + var e = Function._validateParams(arguments, [ + { name: "conversationId", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete this._conversations[conversationId]; + }, + setPolicyManager: function Microsoft_Office_Common_ServiceEndPoint$setPolicyManager(policyManager) { + var e = Function._validateParams(arguments, [ + { name: "policyManager", type: Object, mayBeNull: false } + ]); + if (e) + throw e; + if (!policyManager.checkPermission) { + throw OsfMsAjaxFactory.msAjaxError.argument("policyManager"); + } + this._policyManager = policyManager; + }, + getPolicyManager: function Microsoft_Office_Common_ServiceEndPoint$getPolicyManager() { + return this._policyManager; + }, + dispose: function Microsoft_Office_Common_ServiceEndPoint$dispose() { + this._methodObjectList = null; + this._eventHandlerProxyList = null; + this._Id = null; + this._conversations = null; + this._policyManager = null; + this._appDomains = null; + this._onHandleRequestError = null; + } +}; +Microsoft.Office.Common.ClientEndPoint = function Microsoft_Office_Common_ClientEndPoint(conversationId, targetWindow, targetUrl, serializerVersion) { + var e = Function._validateParams(arguments, [ + { name: "conversationId", type: String, mayBeNull: false }, + { name: "targetWindow", mayBeNull: false }, + { name: "targetUrl", type: String, mayBeNull: false }, + { name: "serializerVersion", type: Number, mayBeNull: true, optional: true } + ]); + if (e) + throw e; + try { + if (!targetWindow.postMessage) { + throw OsfMsAjaxFactory.msAjaxError.argument("targetWindow"); + } + } + catch (ex) { + if (!Object.prototype.hasOwnProperty.call(targetWindow, "postMessage")) { + throw OsfMsAjaxFactory.msAjaxError.argument("targetWindow"); + } + } + this._conversationId = conversationId; + this._targetWindow = targetWindow; + this._targetUrl = targetUrl; + this._callingIndex = 0; + this._callbackList = {}; + this._eventHandlerList = {}; + if (serializerVersion != null) { + this._serializerVersion = serializerVersion; + } + else { + this._serializerVersion = OSF.SerializerVersion.Browser; + } + this._checkReceiverOriginAndRun = null; + this._hostTrustCheckStatus = Microsoft.Office.Common.HostTrustStatus.unknown; + this._checkStatusLogged = false; +}; +Microsoft.Office.Common.ClientEndPoint.prototype = { + invoke: function Microsoft_Office_Common_ClientEndPoint$invoke(targetMethodName, callback, param) { + var e = Function._validateParams(arguments, [{ name: "targetMethodName", type: String, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true }, + { name: "param", mayBeNull: true } + ]); + if (e) + throw e; + var me = this; + var funcToRun = function () { + var correlationId = me._callingIndex++; + var now = new Date(); + var callbackEntry = { "callback": callback, "createdOn": now.getTime() }; + if (param && typeof param === "object" && typeof param.__timeout__ === "number") { + callbackEntry.timeout = param.__timeout__; + delete param.__timeout__; + } + me._callbackList[correlationId] = callbackEntry; + try { + if (me._hostTrustCheckStatus !== Microsoft.Office.Common.HostTrustStatus.trusted) { + if (targetMethodName !== "ContextActivationManager_getAppContextAsync") { + throw "Access Denied"; + } + } + var callRequest = new Microsoft.Office.Common.Request(targetMethodName, Microsoft.Office.Common.ActionType.invoke, me._conversationId, correlationId, param); + var msg = Microsoft.Office.Common.MessagePackager.envelope(callRequest, me._serializerVersion); + me._targetWindow.postMessage(msg, me._targetUrl); + Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer(); + } + catch (ex) { + try { + if (callback !== null) + callback(Microsoft.Office.Common.InvokeResultCode.errorInRequest, ex); + } + finally { + delete me._callbackList[correlationId]; + } + } + }; + if (me._checkReceiverOriginAndRun) { + me._checkReceiverOriginAndRun(funcToRun); + } + else { + me._hostTrustCheckStatus = Microsoft.Office.Common.HostTrustStatus.trusted; + funcToRun(); + } + }, + registerForEvent: function Microsoft_Office_Common_ClientEndPoint$registerForEvent(targetEventName, eventHandler, callback, data) { + var e = Function._validateParams(arguments, [{ name: "targetEventName", type: String, mayBeNull: false }, + { name: "eventHandler", type: Function, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true }, + { name: "data", mayBeNull: true, optional: true } + ]); + if (e) + throw e; + var correlationId = this._callingIndex++; + var now = new Date(); + this._callbackList[correlationId] = { "callback": callback, "createdOn": now.getTime() }; + try { + var callRequest = new Microsoft.Office.Common.Request(targetEventName, Microsoft.Office.Common.ActionType.registerEvent, this._conversationId, correlationId, data); + var msg = Microsoft.Office.Common.MessagePackager.envelope(callRequest, this._serializerVersion); + this._targetWindow.postMessage(msg, this._targetUrl); + Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer(); + this._eventHandlerList[targetEventName] = eventHandler; + } + catch (ex) { + try { + if (callback !== null) { + callback(Microsoft.Office.Common.InvokeResultCode.errorInRequest, ex); + } + } + finally { + delete this._callbackList[correlationId]; + } + } + }, + unregisterForEvent: function Microsoft_Office_Common_ClientEndPoint$unregisterForEvent(targetEventName, callback, data) { + var e = Function._validateParams(arguments, [{ name: "targetEventName", type: String, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true }, + { name: "data", mayBeNull: true, optional: true } + ]); + if (e) + throw e; + var correlationId = this._callingIndex++; + var now = new Date(); + this._callbackList[correlationId] = { "callback": callback, "createdOn": now.getTime() }; + try { + var callRequest = new Microsoft.Office.Common.Request(targetEventName, Microsoft.Office.Common.ActionType.unregisterEvent, this._conversationId, correlationId, data); + var msg = Microsoft.Office.Common.MessagePackager.envelope(callRequest, this._serializerVersion); + this._targetWindow.postMessage(msg, this._targetUrl); + Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer(); + } + catch (ex) { + try { + if (callback !== null) { + callback(Microsoft.Office.Common.InvokeResultCode.errorInRequest, ex); + } + } + finally { + delete this._callbackList[correlationId]; + } + } + finally { + delete this._eventHandlerList[targetEventName]; + } + } +}; +Microsoft.Office.Common.XdmCommunicationManager = (function () { + var _invokerQueue = []; + var _lastMessageProcessTime = null; + var _messageProcessingTimer = null; + var _processInterval = 10; + var _blockingFlag = false; + var _methodTimeoutTimer = null; + var _methodTimeoutProcessInterval = 2000; + var _methodTimeoutDefault = 65000; + var _methodTimeout = _methodTimeoutDefault; + var _serviceEndPoints = {}; + var _clientEndPoints = {}; + var _initialized = false; + function isOfficeJsTarget() { + return true; + } + ; + function _lookupServiceEndPoint(conversationId) { + for (var id in _serviceEndPoints) { + if (_serviceEndPoints[id]._conversations[conversationId]) { + return _serviceEndPoints[id]; + } + } + OsfMsAjaxFactory.msAjaxDebug.trace("Unknown conversation Id."); + throw OsfMsAjaxFactory.msAjaxError.argument("conversationId"); + } + ; + function _lookupClientEndPoint(conversationId) { + var clientEndPoint = _clientEndPoints[conversationId]; + if (!clientEndPoint) { + OsfMsAjaxFactory.msAjaxDebug.trace("Unknown conversation Id."); + } + return clientEndPoint; + } + ; + function _lookupMethodObject(serviceEndPoint, messageObject) { + var methodOrEventMethodObject = serviceEndPoint._methodObjectList[messageObject._actionName]; + if (!methodOrEventMethodObject) { + OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:" + messageObject._actionName); + throw OsfMsAjaxFactory.msAjaxError.argument("messageObject"); + } + var methodObject = null; + if (messageObject._actionType === Microsoft.Office.Common.ActionType.invoke) { + methodObject = methodOrEventMethodObject; + } + else if (messageObject._actionType === Microsoft.Office.Common.ActionType.registerEvent) { + methodObject = methodOrEventMethodObject.getRegisterMethodObject(); + } + else { + methodObject = methodOrEventMethodObject.getUnregisterMethodObject(); + } + return methodObject; + } + ; + function _enqueInvoker(invoker) { + _invokerQueue.push(invoker); + } + ; + function _dequeInvoker() { + if (_messageProcessingTimer !== null) { + if (!_blockingFlag) { + if (_invokerQueue.length > 0) { + var invoker = _invokerQueue.shift(); + _executeCommand(invoker); + } + else { + clearInterval(_messageProcessingTimer); + _messageProcessingTimer = null; + } + } + } + else { + OsfMsAjaxFactory.msAjaxDebug.trace("channel is not ready."); + } + } + ; + function _executeCommand(invoker) { + _blockingFlag = invoker.getInvokeBlockingFlag(); + invoker.invoke(); + _lastMessageProcessTime = (new Date()).getTime(); + } + ; + function _checkMethodTimeout() { + if (_methodTimeoutTimer) { + var clientEndPoint; + var methodCallsNotTimedout = 0; + var now = new Date(); + var timeoutValue; + for (var conversationId in _clientEndPoints) { + clientEndPoint = _clientEndPoints[conversationId]; + for (var correlationId in clientEndPoint._callbackList) { + var callbackEntry = clientEndPoint._callbackList[correlationId]; + timeoutValue = callbackEntry.timeout ? callbackEntry.timeout : _methodTimeout; + if (timeoutValue >= 0 && Math.abs(now.getTime() - callbackEntry.createdOn) >= timeoutValue) { + try { + if (callbackEntry.callback) { + callbackEntry.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout, null); + } + } + finally { + delete clientEndPoint._callbackList[correlationId]; + } + } + else { + methodCallsNotTimedout++; + } + ; + } + } + if (methodCallsNotTimedout === 0) { + clearInterval(_methodTimeoutTimer); + _methodTimeoutTimer = null; + } + } + else { + OsfMsAjaxFactory.msAjaxDebug.trace("channel is not ready."); + } + } + ; + function _postCallbackHandler() { + _blockingFlag = false; + } + ; + function _registerListener(listener) { + if (window.addEventListener) { + window.addEventListener("message", listener, false); + } + else if ((navigator.userAgent.indexOf("MSIE") > -1) && window.attachEvent) { + window.attachEvent("onmessage", listener); + } + else { + OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API."); + throw OsfMsAjaxFactory.msAjaxError.argument("Browser"); + } + } + ; + function _checkOrigin(url, origin) { + var res = false; + if (!url || !origin || url === "null" || origin === "null" || !url.length || !origin.length) { + return res; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + res = _urlCompareUsingUrlStrings(url, origin); + } + else { + var url_parser, org_parser; + url_parser = document.createElement('a'); + org_parser = document.createElement('a'); + url_parser.href = url; + org_parser.href = origin; + res = _urlCompare(url_parser, org_parser); + } + return res; + } + function _checkOriginWithAppDomains(allowed_domains, origin) { + var res = false; + if (!origin || origin === "null" || !origin.length || !(allowed_domains) || !(allowed_domains instanceof Array) || !allowed_domains.length) { + return res; + } + var org_parser = document.createElement('a'); + var app_domain_parser = document.createElement('a'); + org_parser.href = origin; + for (var i = 0; i < allowed_domains.length && !res; i++) { + if (allowed_domains[i].indexOf("://") !== -1) { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + res = _urlCompareUsingUrlStrings(origin, allowed_domains[i]); + } + else { + app_domain_parser.href = allowed_domains[i]; + res = _urlCompare(org_parser, app_domain_parser); + } + } + } + return res; + } + function _isHostNameValidWacDomain(hostName) { + if (!hostName || hostName === "null") { + return false; + } + var regexHostNameStringArray = new Array("^office-int\\.com$", "^officeapps\\.live-int\\.com$", "^.*\\.dod\\.online\\.office365\\.us$", "^.*\\.gov\\.online\\.office365\\.us$", "^.*\\.officeapps\\.live\\.com$", "^.*\\.officeapps\\.live-int\\.com$", "^.*\\.officeapps-df\\.live\\.com$", "^.*\\.office\\.net$", "^" + document.domain.replace(new RegExp("\\.", "g"), "\\.") + "$"); + if (!isOfficeJsTarget() || (typeof officeInitializationSettings === "object" && officeInitializationSettings.trustAllCloudEnvironments === true)) { + regexHostNameStringArray.push("^.*\\.partner\\.officewebapps\\.cn$", "^.*\\.online\\.office\\.de$"); + } + var regexHostName = new RegExp(regexHostNameStringArray.join("|")); + return regexHostName.test(hostName); + } + function _isTargetSubdomainOfSourceLocation(sourceLocation, messageOrigin) { + if (!sourceLocation || !messageOrigin || sourceLocation === "null" || messageOrigin === "null") { + return false; + } + var sourceLocationParser; + var messageOriginParser; + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + sourceLocationParser = OSF.OUtil.parseUrl(sourceLocation, true); + messageOriginParser = OSF.OUtil.parseUrl(messageOrigin, true); + } + else { + sourceLocationParser = document.createElement('a'); + sourceLocationParser.href = sourceLocation; + messageOriginParser = document.createElement('a'); + messageOriginParser.href = messageOrigin; + } + var isSameProtocol = sourceLocationParser.protocol === messageOriginParser.protocol; + var isSamePort = sourceLocationParser.port === messageOriginParser.port; + var originHostName = messageOriginParser.hostname; + var sourceLocationHostName = sourceLocationParser.hostname; + var isSameDomain = originHostName === sourceLocationHostName; + var isSubDomain = false; + if (!isSameDomain && originHostName.length > sourceLocationHostName.length + 1) { + isSubDomain = originHostName.slice(-(sourceLocationHostName.length + 1)) === '.' + sourceLocationHostName; + } + var isSameDomainOrSubdomain = isSameDomain || isSubDomain; + return isSamePort && isSameProtocol && isSameDomainOrSubdomain; + } + function _urlCompareUsingUrlStrings(url_str1, url_str2) { + var parsedUrl1 = OSF.OUtil.parseUrl(url_str1, true); + var parsedUrl2 = OSF.OUtil.parseUrl(url_str2, true); + return _urlCompare(parsedUrl1, parsedUrl2); + } + function _urlCompare(url_parser1, url_parser2) { + return ((url_parser1.hostname == url_parser2.hostname) && + (url_parser1.protocol == url_parser2.protocol) && + _hasSamePort(url_parser1, url_parser2)); + } + function _hasSamePort(url_parser1, url_parser2) { + var httpPort = "80"; + var httpsPort = "443"; + return ((url_parser1.port == url_parser2.port) || + (url_parser1.port == "" && url_parser1.protocol == "http:" && url_parser2.port == httpPort) || + (url_parser1.port == "" && url_parser1.protocol == "https:" && url_parser2.port == httpsPort) || + (url_parser2.port == "" && url_parser2.protocol == "http:" && url_parser1.port == httpPort) || + (url_parser2.port == "" && url_parser2.protocol == "https:" && url_parser1.port == httpsPort)); + } + function _receive(e) { + if (!OSF) { + return; + } + if (e.data != '') { + var messageObject; + var serializerVersion = OSF.SerializerVersion.Browser; + var serializedMessage = e.data; + try { + messageObject = Microsoft.Office.Common.MessagePackager.unenvelope(serializedMessage, OSF.SerializerVersion.Browser); + serializerVersion = messageObject._serializerVersion != null ? messageObject._serializerVersion : serializerVersion; + } + catch (ex) { + return; + } + if (messageObject._messageType === Microsoft.Office.Common.MessageType.request) { + var requesterUrl = (e.origin == null || e.origin === "null") ? messageObject._origin : e.origin; + try { + var serviceEndPoint = _lookupServiceEndPoint(messageObject._conversationId); + var conversation = serviceEndPoint._conversations[messageObject._conversationId]; + serializerVersion = conversation.serializerVersion != null ? conversation.serializerVersion : serializerVersion; + var allowedDomains = [conversation.url].concat(serviceEndPoint._appDomains[messageObject._conversationId]); + if (!_checkOriginWithAppDomains(allowedDomains, e.origin)) { + if (!OfficeExt.appSpecificCheckOrigin(allowedDomains, e, messageObject._origin, _checkOriginWithAppDomains)) { + var isOriginSubdomain = _isTargetSubdomainOfSourceLocation(conversation.url, e.origin); + if (!isOriginSubdomain) { + throw "Failed origin check"; + } + } + } + var dataWithOrigin = (messageObject._data != null) ? messageObject._data : {}; + dataWithOrigin.SecurityOrigin = e.origin; + var policyManager = serviceEndPoint.getPolicyManager(); + if (policyManager && !policyManager.checkPermission(messageObject._conversationId, messageObject._actionName, dataWithOrigin)) { + throw "Access Denied"; + } + var methodObject = _lookupMethodObject(serviceEndPoint, messageObject); + var invokeCompleteCallback = new Microsoft.Office.Common.InvokeCompleteCallback(e.source, requesterUrl, messageObject._actionName, messageObject._conversationId, messageObject._correlationId, _postCallbackHandler, serializerVersion); + var invoker = new Microsoft.Office.Common.Invoker(methodObject, dataWithOrigin, invokeCompleteCallback, serviceEndPoint._eventHandlerProxyList, messageObject._conversationId, messageObject._actionName, serializerVersion); + var shouldEnque = true; + if (_messageProcessingTimer == null) { + if ((_lastMessageProcessTime == null || (new Date()).getTime() - _lastMessageProcessTime > _processInterval) && !_blockingFlag) { + _executeCommand(invoker); + shouldEnque = false; + } + else { + _messageProcessingTimer = setInterval(_dequeInvoker, _processInterval); + } + } + if (shouldEnque) { + _enqueInvoker(invoker); + } + } + catch (ex) { + if (serviceEndPoint && serviceEndPoint._onHandleRequestError) { + serviceEndPoint._onHandleRequestError(messageObject, ex); + } + var errorCode = Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest; + if (ex == "Access Denied") { + errorCode = Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied; + } + var callResponse = new Microsoft.Office.Common.Response(messageObject._actionName, messageObject._conversationId, messageObject._correlationId, errorCode, Microsoft.Office.Common.ResponseType.forCalling, ex); + var envelopedResult = Microsoft.Office.Common.MessagePackager.envelope(callResponse, serializerVersion); + var canPostMessage = false; + try { + canPostMessage = !!(e.source && e.source.postMessage); + } + catch (ex) { + } + var isOriginValid = false; + if (window.location.href && e.origin && e.origin !== "null" && _isTargetSubdomainOfSourceLocation(window.location.href, e.origin)) { + isOriginValid = true; + } + else { + if (e.origin && e.origin !== "null") { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + var hostname = OSF.OUtil.parseUrl(e.origin, true).hostname; + isOriginValid = _isHostNameValidWacDomain(hostname); + } + else { + var parser = document.createElement("a"); + parser.href = e.origin; + isOriginValid = _isHostNameValidWacDomain(parser.hostname); + } + } + } + if (canPostMessage && isOriginValid) { + e.source.postMessage(envelopedResult, requesterUrl); + } + } + } + else if (messageObject._messageType === Microsoft.Office.Common.MessageType.response) { + var clientEndPoint = _lookupClientEndPoint(messageObject._conversationId); + if (!clientEndPoint) { + return; + } + clientEndPoint._serializerVersion = serializerVersion; + if (!_checkOrigin(clientEndPoint._targetUrl, e.origin)) { + throw "Failed orgin check"; + } + if (messageObject._responseType === Microsoft.Office.Common.ResponseType.forCalling) { + var callbackEntry = clientEndPoint._callbackList[messageObject._correlationId]; + if (callbackEntry) { + try { + if (callbackEntry.callback) + callbackEntry.callback(messageObject._errorCode, messageObject._data); + } + finally { + delete clientEndPoint._callbackList[messageObject._correlationId]; + } + } + } + else { + var eventhandler = clientEndPoint._eventHandlerList[messageObject._actionName]; + if (eventhandler !== undefined && eventhandler !== null) { + eventhandler(messageObject._data); + } + } + } + else { + return; + } + } + } + ; + function _initialize() { + if (!_initialized) { + _registerListener(_receive); + _initialized = true; + } + } + ; + return { + connect: function Microsoft_Office_Common_XdmCommunicationManager$connect(conversationId, targetWindow, targetUrl, serializerVersion) { + var clientEndPoint = _clientEndPoints[conversationId]; + if (!clientEndPoint) { + _initialize(); + clientEndPoint = new Microsoft.Office.Common.ClientEndPoint(conversationId, targetWindow, targetUrl, serializerVersion); + _clientEndPoints[conversationId] = clientEndPoint; + } + return clientEndPoint; + }, + getClientEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$getClientEndPoint(conversationId) { + var e = Function._validateParams(arguments, [ + { name: "conversationId", type: String, mayBeNull: false } + ]); + if (e) + throw e; + return _clientEndPoints[conversationId]; + }, + createServiceEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$createServiceEndPoint(serviceEndPointId) { + _initialize(); + var serviceEndPoint = new Microsoft.Office.Common.ServiceEndPoint(serviceEndPointId); + _serviceEndPoints[serviceEndPointId] = serviceEndPoint; + return serviceEndPoint; + }, + getServiceEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$getServiceEndPoint(serviceEndPointId) { + var e = Function._validateParams(arguments, [ + { name: "serviceEndPointId", type: String, mayBeNull: false } + ]); + if (e) + throw e; + return _serviceEndPoints[serviceEndPointId]; + }, + deleteClientEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$deleteClientEndPoint(conversationId) { + var e = Function._validateParams(arguments, [ + { name: "conversationId", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete _clientEndPoints[conversationId]; + }, + deleteServiceEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$deleteServiceEndPoint(serviceEndPointId) { + var e = Function._validateParams(arguments, [ + { name: "serviceEndPointId", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete _serviceEndPoints[serviceEndPointId]; + }, + urlCompare: function Microsoft_Office_Common_XdmCommunicationManager$_urlCompare(url_parser1, url_parser2) { + return _urlCompare(url_parser1, url_parser2); + }, + checkUrlWithAppDomains: function Microsoft_Office_Common_XdmCommunicationManager$_checkUrlWithAppDomains(appDomains, origin) { + return _checkOriginWithAppDomains(appDomains, origin); + }, + isTargetSubdomainOfSourceLocation: function Microsoft_Office_Common_XdmCommunicationManager$_isTargetSubdomainOfSourceLocation(sourceLocation, messageOrigin) { + return _isTargetSubdomainOfSourceLocation(sourceLocation, messageOrigin); + }, + _setMethodTimeout: function Microsoft_Office_Common_XdmCommunicationManager$_setMethodTimeout(methodTimeout) { + var e = Function._validateParams(arguments, [ + { name: "methodTimeout", type: Number, mayBeNull: false } + ]); + if (e) + throw e; + _methodTimeout = (methodTimeout <= 0) ? _methodTimeoutDefault : methodTimeout; + }, + _startMethodTimeoutTimer: function Microsoft_Office_Common_XdmCommunicationManager$_startMethodTimeoutTimer() { + if (!_methodTimeoutTimer) { + _methodTimeoutTimer = setInterval(_checkMethodTimeout, _methodTimeoutProcessInterval); + } + }, + isHostNameValidWacDomain: function Microsoft_Office_Common_XdmCommunicationManager$_isHostNameValidWacDomain(hostName) { + return _isHostNameValidWacDomain(hostName); + }, + _hasSamePort: function Microsoft_Office_Common_XdmCommunicationManager$_hasSamePort(url_parser1, url_parser2) { + return _hasSamePort(url_parser1, url_parser2); + } + }; +})(); +Microsoft.Office.Common.Message = function Microsoft_Office_Common_Message(messageType, actionName, conversationId, correlationId, data) { + var e = Function._validateParams(arguments, [{ name: "messageType", type: Number, mayBeNull: false }, + { name: "actionName", type: String, mayBeNull: false }, + { name: "conversationId", type: String, mayBeNull: false }, + { name: "correlationId", mayBeNull: false }, + { name: "data", mayBeNull: true, optional: true } + ]); + if (e) + throw e; + this._messageType = messageType; + this._actionName = actionName; + this._conversationId = conversationId; + this._correlationId = correlationId; + this._origin = window.location.origin; + if (typeof data == "undefined") { + this._data = null; + } + else { + this._data = data; + } +}; +Microsoft.Office.Common.Message.prototype = { + getActionName: function Microsoft_Office_Common_Message$getActionName() { + return this._actionName; + }, + getConversationId: function Microsoft_Office_Common_Message$getConversationId() { + return this._conversationId; + }, + getCorrelationId: function Microsoft_Office_Common_Message$getCorrelationId() { + return this._correlationId; + }, + getOrigin: function Microsoft_Office_Common_Message$getOrigin() { + return this._origin; + }, + getData: function Microsoft_Office_Common_Message$getData() { + return this._data; + }, + getMessageType: function Microsoft_Office_Common_Message$getMessageType() { + return this._messageType; + } +}; +Microsoft.Office.Common.Request = function Microsoft_Office_Common_Request(actionName, actionType, conversationId, correlationId, data) { + Microsoft.Office.Common.Request.uber.constructor.call(this, Microsoft.Office.Common.MessageType.request, actionName, conversationId, correlationId, data); + this._actionType = actionType; +}; +OSF.OUtil.extend(Microsoft.Office.Common.Request, Microsoft.Office.Common.Message); +Microsoft.Office.Common.Request.prototype.getActionType = function Microsoft_Office_Common_Request$getActionType() { + return this._actionType; +}; +Microsoft.Office.Common.Response = function Microsoft_Office_Common_Response(actionName, conversationId, correlationId, errorCode, responseType, data) { + Microsoft.Office.Common.Response.uber.constructor.call(this, Microsoft.Office.Common.MessageType.response, actionName, conversationId, correlationId, data); + this._errorCode = errorCode; + this._responseType = responseType; +}; +OSF.OUtil.extend(Microsoft.Office.Common.Response, Microsoft.Office.Common.Message); +Microsoft.Office.Common.Response.prototype.getErrorCode = function Microsoft_Office_Common_Response$getErrorCode() { + return this._errorCode; +}; +Microsoft.Office.Common.Response.prototype.getResponseType = function Microsoft_Office_Common_Response$getResponseType() { + return this._responseType; +}; +Microsoft.Office.Common.MessagePackager = { + envelope: function Microsoft_Office_Common_MessagePackager$envelope(messageObject, serializerVersion) { + if (typeof (messageObject) === "object") { + messageObject._serializerVersion = OSF.SerializerVersion.Browser; + } + return JSON.stringify(messageObject); + }, + unenvelope: function Microsoft_Office_Common_MessagePackager$unenvelope(messageObject, serializerVersion) { + return JSON.parse(messageObject); + } +}; +Microsoft.Office.Common.ResponseSender = function Microsoft_Office_Common_ResponseSender(requesterWindow, requesterUrl, actionName, conversationId, correlationId, responseType, serializerVersion) { + var e = Function._validateParams(arguments, [{ name: "requesterWindow", mayBeNull: false }, + { name: "requesterUrl", type: String, mayBeNull: false }, + { name: "actionName", type: String, mayBeNull: false }, + { name: "conversationId", type: String, mayBeNull: false }, + { name: "correlationId", mayBeNull: false }, + { name: "responsetype", type: Number, maybeNull: false }, + { name: "serializerVersion", type: Number, maybeNull: true, optional: true } + ]); + if (e) + throw e; + this._requesterWindow = requesterWindow; + this._requesterUrl = requesterUrl; + this._actionName = actionName; + this._conversationId = conversationId; + this._correlationId = correlationId; + this._invokeResultCode = Microsoft.Office.Common.InvokeResultCode.noError; + this._responseType = responseType; + var me = this; + this._send = function (result) { + try { + var postMessageTarget = me._requesterUrl; + if (me._actionName === "dialogMessageReceived" || me._actionName === "dialogParentMessageReceived") { + if (result.targetOrigin) { + postMessageTarget = result.targetOrigin; + } + } + var response = new Microsoft.Office.Common.Response(me._actionName, me._conversationId, me._correlationId, me._invokeResultCode, me._responseType, result); + var envelopedResult = Microsoft.Office.Common.MessagePackager.envelope(response, serializerVersion); + me._requesterWindow.postMessage(envelopedResult, postMessageTarget); + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:" + ex.message); + } + }; +}; +Microsoft.Office.Common.ResponseSender.prototype = { + getRequesterWindow: function Microsoft_Office_Common_ResponseSender$getRequesterWindow() { + return this._requesterWindow; + }, + getRequesterUrl: function Microsoft_Office_Common_ResponseSender$getRequesterUrl() { + return this._requesterUrl; + }, + getActionName: function Microsoft_Office_Common_ResponseSender$getActionName() { + return this._actionName; + }, + getConversationId: function Microsoft_Office_Common_ResponseSender$getConversationId() { + return this._conversationId; + }, + getCorrelationId: function Microsoft_Office_Common_ResponseSender$getCorrelationId() { + return this._correlationId; + }, + getSend: function Microsoft_Office_Common_ResponseSender$getSend() { + return this._send; + }, + setResultCode: function Microsoft_Office_Common_ResponseSender$setResultCode(resultCode) { + this._invokeResultCode = resultCode; + } +}; +Microsoft.Office.Common.InvokeCompleteCallback = function Microsoft_Office_Common_InvokeCompleteCallback(requesterWindow, requesterUrl, actionName, conversationId, correlationId, postCallbackHandler, serializerVersion) { + Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(this, requesterWindow, requesterUrl, actionName, conversationId, correlationId, Microsoft.Office.Common.ResponseType.forCalling, serializerVersion); + this._postCallbackHandler = postCallbackHandler; + var me = this; + this._send = function (result, responseCode) { + if (responseCode != undefined) { + me._invokeResultCode = responseCode; + } + try { + var response = new Microsoft.Office.Common.Response(me._actionName, me._conversationId, me._correlationId, me._invokeResultCode, me._responseType, result); + var envelopedResult = Microsoft.Office.Common.MessagePackager.envelope(response, serializerVersion); + me._requesterWindow.postMessage(envelopedResult, me._requesterUrl); + me._postCallbackHandler(); + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:" + ex.message); + } + }; +}; +OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback, Microsoft.Office.Common.ResponseSender); +Microsoft.Office.Common.Invoker = function Microsoft_Office_Common_Invoker(methodObject, paramValue, invokeCompleteCallback, eventHandlerProxyList, conversationId, eventName, serializerVersion) { + var e = Function._validateParams(arguments, [ + { name: "methodObject", mayBeNull: false }, + { name: "paramValue", mayBeNull: true }, + { name: "invokeCompleteCallback", mayBeNull: false }, + { name: "eventHandlerProxyList", mayBeNull: true }, + { name: "conversationId", type: String, mayBeNull: false }, + { name: "eventName", type: String, mayBeNull: false }, + { name: "serializerVersion", type: Number, mayBeNull: true, optional: true } + ]); + if (e) + throw e; + this._methodObject = methodObject; + this._param = paramValue; + this._invokeCompleteCallback = invokeCompleteCallback; + this._eventHandlerProxyList = eventHandlerProxyList; + this._conversationId = conversationId; + this._eventName = eventName; + this._serializerVersion = serializerVersion; +}; +Microsoft.Office.Common.Invoker.prototype = { + invoke: function Microsoft_Office_Common_Invoker$invoke() { + try { + var result; + switch (this._methodObject.getInvokeType()) { + case Microsoft.Office.Common.InvokeType.async: + this._methodObject.getMethod()(this._param, this._invokeCompleteCallback.getSend()); + break; + case Microsoft.Office.Common.InvokeType.sync: + result = this._methodObject.getMethod()(this._param); + this._invokeCompleteCallback.getSend()(result); + break; + case Microsoft.Office.Common.InvokeType.syncRegisterEvent: + var eventHandlerProxy = this._createEventHandlerProxyObject(this._invokeCompleteCallback); + result = this._methodObject.getMethod()(eventHandlerProxy.getSend(), this._param); + this._eventHandlerProxyList[this._conversationId + this._eventName] = eventHandlerProxy.getSend(); + this._invokeCompleteCallback.getSend()(result); + break; + case Microsoft.Office.Common.InvokeType.syncUnregisterEvent: + var eventHandler = this._eventHandlerProxyList[this._conversationId + this._eventName]; + result = this._methodObject.getMethod()(eventHandler, this._param); + delete this._eventHandlerProxyList[this._conversationId + this._eventName]; + this._invokeCompleteCallback.getSend()(result); + break; + case Microsoft.Office.Common.InvokeType.asyncRegisterEvent: + var eventHandlerProxyAsync = this._createEventHandlerProxyObject(this._invokeCompleteCallback); + this._methodObject.getMethod()(eventHandlerProxyAsync.getSend(), this._invokeCompleteCallback.getSend(), this._param); + this._eventHandlerProxyList[this._callerId + this._eventName] = eventHandlerProxyAsync.getSend(); + break; + case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent: + var eventHandlerAsync = this._eventHandlerProxyList[this._callerId + this._eventName]; + this._methodObject.getMethod()(eventHandlerAsync, this._invokeCompleteCallback.getSend(), this._param); + delete this._eventHandlerProxyList[this._callerId + this._eventName]; + break; + default: + break; + } + } + catch (ex) { + this._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse); + this._invokeCompleteCallback.getSend()(ex); + } + }, + getInvokeBlockingFlag: function Microsoft_Office_Common_Invoker$getInvokeBlockingFlag() { + return this._methodObject.getBlockingFlag(); + }, + _createEventHandlerProxyObject: function Microsoft_Office_Common_Invoker$_createEventHandlerProxyObject(invokeCompleteObject) { + return new Microsoft.Office.Common.ResponseSender(invokeCompleteObject.getRequesterWindow(), invokeCompleteObject.getRequesterUrl(), invokeCompleteObject.getActionName(), invokeCompleteObject.getConversationId(), invokeCompleteObject.getCorrelationId(), Microsoft.Office.Common.ResponseType.forEventing, this._serializerVersion); + } +}; +OSF.OUtil.setNamespace("WAC", OSF.DDA); +OSF.DDA.WAC.UniqueArguments = { + Data: "Data", + Properties: "Properties", + BindingRequest: "DdaBindingsMethod", + BindingResponse: "Bindings", + SingleBindingResponse: "singleBindingResponse", + GetData: "DdaGetBindingData", + AddRowsColumns: "DdaAddRowsColumns", + SetData: "DdaSetBindingData", + ClearFormats: "DdaClearBindingFormats", + SetFormats: "DdaSetBindingFormats", + SettingsRequest: "DdaSettingsMethod", + BindingEventSource: "ddaBinding", + ArrayData: "ArrayData" +}; +OSF.OUtil.setNamespace("Delegate", OSF.DDA.WAC); +OSF.DDA.WAC.Delegate.SpecialProcessor = function OSF_DDA_WAC_Delegate_SpecialProcessor() { + var complexTypes = [ + OSF.DDA.WAC.UniqueArguments.SingleBindingResponse, + OSF.DDA.WAC.UniqueArguments.BindingRequest, + OSF.DDA.WAC.UniqueArguments.BindingResponse, + OSF.DDA.WAC.UniqueArguments.GetData, + OSF.DDA.WAC.UniqueArguments.AddRowsColumns, + OSF.DDA.WAC.UniqueArguments.SetData, + OSF.DDA.WAC.UniqueArguments.ClearFormats, + OSF.DDA.WAC.UniqueArguments.SetFormats, + OSF.DDA.WAC.UniqueArguments.SettingsRequest, + OSF.DDA.WAC.UniqueArguments.BindingEventSource + ]; + var dynamicTypes = {}; + OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes); +}; +OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor); +OSF.DDA.WAC.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor(), []); +OSF.OUtil.setNamespace("WAC", OSF.DDA); +OSF.OUtil.setNamespace("Delegate", OSF.DDA.WAC); +OSF.DDA.WAC.getDelegateMethods = function OSF_DDA_WAC_getDelegateMethods() { + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.WAC.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.WAC.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.WAC.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.WAC.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.WAC.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.WAC.Delegate.sendMessage; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.WAC.Delegate.closeDialog; + return delegateMethods; +}; +OSF.DDA.WAC.Delegate.version = 1; +OSF.DDA.WAC.Delegate.executeAsync = function OSF_DDA_WAC_Delegate$executeAsync(args) { + if (!args.hostCallArgs) { + args.hostCallArgs = {}; + } + args.hostCallArgs["DdaMethod"] = { + "ControlId": OSF._OfficeAppFactory.getId(), + "Version": OSF.DDA.WAC.Delegate.version, + "DispatchId": args.dispId + }; + args.hostCallArgs["__timeout__"] = -1; + if (args.onCalling) { + args.onCalling(); + } + if (!OSF.getClientEndPoint()) { + return; + } + OSF.getClientEndPoint().invoke("executeMethod", function OSF_DDA_WAC_Delegate$OMFacade$OnResponse(xdmStatus, payload) { + if (args.onReceiving) { + args.onReceiving(); + } + var error; + if (xdmStatus == Microsoft.Office.Common.InvokeResultCode.noError) { + OSF.DDA.WAC.Delegate.version = payload["Version"]; + error = payload["Error"]; + } + else { + switch (xdmStatus) { + case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied: + error = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + default: + error = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + if (args.onComplete) { + args.onComplete(error, payload); + } + }, args.hostCallArgs); +}; +OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent = function OSF_DDA_WAC_Delegate$GetOnAfterRegisterEvent(register, args) { + var startTime = (new Date()).getTime(); + return function OSF_DDA_WAC_Delegate$OnAfterRegisterEvent(xdmStatus, payload) { + if (args.onReceiving) { + args.onReceiving(); + } + var status; + if (xdmStatus != Microsoft.Office.Common.InvokeResultCode.noError) { + switch (xdmStatus) { + case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + else { + if (payload) { + if (payload["Error"]) { + status = payload["Error"]; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + } + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + }; +}; +OSF.DDA.WAC.Delegate.registerEventAsync = function OSF_DDA_WAC_Delegate$RegisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + if (!OSF.getClientEndPoint()) { + return; + } + OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(args.targetId, args.eventType), function OSF_DDA_WACOMFacade$OnEvent(payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true, args), { + "controlId": OSF._OfficeAppFactory.getId(), + "eventDispId": args.dispId, + "targetId": args.targetId + }); +}; +OSF.DDA.WAC.Delegate.unregisterEventAsync = function OSF_DDA_WAC_Delegate$UnregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + if (!OSF.getClientEndPoint()) { + return; + } + OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(args.targetId, args.eventType), OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, args), { + "controlId": OSF._OfficeAppFactory.getId(), + "eventDispId": args.dispId, + "targetId": args.targetId + }); +}; +(function (OfficeExt) { + var SovereignHelper = (function () { + function SovereignHelper() { + this._configPromise = null; + } + SovereignHelper.isSovereignVersion = function () { + return (typeof isOsfSovereignVersion !== "undefined" && + isOsfSovereignVersion === true); + }; + SovereignHelper.prototype.getEnvironmentName = function () { + return this.getConfig().then(function (config) { + return (config && config.envName) ? config.envName : null; + }); + }; + SovereignHelper.prototype.getEnvironmentType = function () { + return this.getConfig().then(function (config) { + return (config && config.envType) ? config.envType : null; + }); + }; + SovereignHelper.prototype.getTrustedHostOrigins = function () { + return this.getConfig().then(function (config) { + return config != null ? config.trustedHostOrigins : null; + }); + }; + SovereignHelper.prototype.isConfigAvailable = function () { + return this.getConfig().then(function (config) { + return config != null; + }); + }; + SovereignHelper.prototype.isSovereignHostTrusted = function (hostName) { + if (!hostName) { + return Office.Promise.resolve(false); + } + else if (hostName === window.location.hostname) { + return Office.Promise.resolve(true); + } + return this.getTrustedHostOrigins().then(function (trustedHostOrigins) { + if (!trustedHostOrigins || trustedHostOrigins.length == 0) { + return false; + } + var regexHostName = new RegExp(trustedHostOrigins.join("|")); + return regexHostName.test(hostName); + }); + }; + SovereignHelper.prototype.getConfigPath = function () { + var basePath = OSF._OfficeAppFactory + .getLoadScriptHelper() + .getOfficeJsBasePath(); + if (basePath) { + basePath = basePath.toLowerCase(); + var configRoot = "/lib/"; + var indexofRoot = basePath.indexOf(configRoot); + if (indexofRoot > -1) { + return (basePath + .toLowerCase() + .substring(0, indexofRoot + configRoot.length) + "officeconfig.json"); + } + } + return ""; + }; + SovereignHelper.prototype.getConfig = function () { + if (!this._configPromise) { + this._configPromise = this.tryLoadConfig(); + } + return this._configPromise; + }; + SovereignHelper.prototype.tryLoadConfig = function () { + var configPath = this.getConfigPath(); + if (configPath) { + var _localStorage_1 = OSF.OUtil.getLocalStorage(); + var cacheKey_1 = configPath + "_cache"; + var cacheValue = _localStorage_1.getItem(cacheKey_1); + var cacheResult_1 = null; + if (cacheValue) { + try { + cacheResult_1 = JSON.parse(cacheValue); + } + catch (_a) { } + var maxAgeInMs = 1000 * 60 * 60 * 24; + var currentTime = new Date().getTime(); + if (cacheResult_1 && + cacheResult_1.config && + cacheResult_1.createTime <= currentTime && + cacheResult_1.createTime + maxAgeInMs >= currentTime) { + return Office.Promise.resolve(cacheResult_1.config); + } + } + return this.downloadConfig(configPath).then(function (config) { + if (config) { + cacheResult_1 = { createTime: new Date().getTime(), config: config }; + _localStorage_1.setItem(cacheKey_1, JSON.stringify(cacheResult_1)); + } + else if (cacheResult_1) { + config = cacheResult_1.config; + } + return config; + }); + } + return Office.Promise.resolve(null); + }; + SovereignHelper.prototype.downloadConfig = function (configUrl) { + return new Office.Promise(function (resolve, reject) { + OSF.OUtil.xhrGet(configUrl, function (content) { + try { + resolve(JSON.parse(content)); + } + catch (_a) { + resolve(null); + } + }, function () { + resolve(null); + }); + }); + }; + return SovereignHelper; + }()); + OfficeExt.SovereignHelper = SovereignHelper; +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.setNamespace("WebApp", OSF); +OSF.OUtil.setNamespace("Messaging", OSF); +OSF.OUtil.setNamespace("ExtensionLifeCycle", OSF); +OSF.OUtil.setNamespace("TaskPaneAction", OSF); +OSF.OUtil.setNamespace("RibbonGallery", OSF); +OSF.WebApp.AddHostInfoAndXdmInfo = function OSF_WebApp$AddHostInfoAndXdmInfo(url) { + if (OSF._OfficeAppFactory.getWindowLocationSearch && OSF._OfficeAppFactory.getWindowLocationHash) { + return url + OSF._OfficeAppFactory.getWindowLocationSearch() + OSF._OfficeAppFactory.getWindowLocationHash(); + } + else { + return url; + } +}; +OSF.WebApp._UpdateLinksForHostAndXdmInfo = function OSF_WebApp$_UpdateLinksForHostAndXdmInfo() { + var links = document.querySelectorAll("a[data-officejs-navigate]"); + for (var i = 0; i < links.length; i++) { + if (OSF.WebApp._isGoodUrl(links[i].href)) { + links[i].href = OSF.WebApp.AddHostInfoAndXdmInfo(links[i].href); + } + } + var forms = document.querySelectorAll("form[data-officejs-navigate]"); + for (var i = 0; i < forms.length; i++) { + var form = forms[i]; + if (OSF.WebApp._isGoodUrl(form.action)) { + form.action = OSF.WebApp.AddHostInfoAndXdmInfo(form.action); + } + } +}; +OSF.WebApp._isGoodUrl = function OSF_WebApp$_isGoodUrl(url) { + if (typeof url == 'undefined') + return false; + url = url.trim(); + var colonIndex = url.indexOf(':'); + var protocol = colonIndex > 0 ? url.substr(0, colonIndex) : null; + var goodUrl = protocol !== null ? protocol.toLowerCase() === "http" || protocol.toLowerCase() === "https" : true; + goodUrl = goodUrl && url != "#" && url != "/" && url != "" && url != OSF._OfficeAppFactory.getWebAppState().webAppUrl; + return goodUrl; +}; +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._appContext = {}; + this._tabbableElements = "a[href]:not([tabindex='-1'])," + "area[href]:not([tabindex='-1'])," + "button:not([disabled]):not([tabindex='-1'])," + "input:not([disabled]):not([tabindex='-1'])," + "select:not([disabled]):not([tabindex='-1'])," + "textarea:not([disabled]):not([tabindex='-1'])," + "*[tabindex]:not([tabindex='-1'])," + "*[contenteditable]:not([disabled]):not([tabindex='-1'])"; + this._initializeSettings = function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) { + var settings; + var serializedSettings = appContext.get_settings(); + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if (storageSettings) { + serializedSettings = JSON.parse(storageSettings); + } + else { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if (refreshSupported) { + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + } + else { + settings = new OSF.DDA.Settings(deserializedSettings); + } + return settings; + }; + var windowOpen = function OSF_InitializationHelper$windowOpen(windowObj) { + var proxy = window.open; + windowObj.open = function (strUrl, strWindowName, strWindowFeatures) { + var windowObject = null; + var hostInfoObj = OSF._OfficeAppFactory.getHostInfo(); + try { + if (hostInfoObj.hostType === 'outlook' && hostInfoObj.hostPlatform === 'web' && hostInfoObj.flags & OSF.HostInfoFlags.IsMonarch) { + windowObject = proxy('about:blank?unfiltered', strWindowName, strWindowFeatures); + if (windowObject) { + windowObject.location = strUrl; + } + else { + windowObject = proxy(strUrl, strWindowName, strWindowFeatures); + } + } + else { + windowObject = proxy(strUrl, strWindowName, strWindowFeatures); + } + } + catch (ex) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen." + ex); + } + } + if (!windowObject) { + var params = { + "strUrl": strUrl, + "strWindowName": strWindowName, + "strWindowFeatures": strWindowFeatures + }; + if (OSF._OfficeAppFactory.getClientEndPoint()) { + OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost", null, params); + } + } + if (OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.EnablingWindowOpenUsageLogging)) { + if (hostInfoObj && hostInfoObj.hostType === 'outlook' && hostInfoObj.hostPlatform === 'web') { + if (!strWindowName || (strWindowName && strWindowName.indexOf('hostInfo') == -1)) { + var additionalParams = strWindowFeatures && String(strWindowFeatures).toLowerCase(); + var hasAdditionalParams = (additionalParams && (additionalParams.indexOf("width") > -1 || additionalParams.indexOf("height") > -1)) ? 1 : 0; + var succeeded = windowObject != null ? 0 : 1; + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(-10, hasAdditionalParams, 0, succeeded); + } + } + } + } + return windowObject; + }; + }; + windowOpen(window); +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { + var getAppIdFromWindowLocation = function OSF_InitializationHelper$getAppIdFromWindowLocation() { + var xdmInfoValue = OSF.OUtil.parseXdmInfo(true); + if (xdmInfoValue) { + var items = xdmInfoValue.split("|"); + return items[1]; + } + return null; + }; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + if (!hostInfoValue) { + hostInfoValue = OSF.OUtil.parseHostInfoFromWindowName(true, OSF._OfficeAppFactory.getWindowName()); + } + if (hostInfoValue && hostInfoValue.indexOf("isDialog") > -1) { + var appId = getAppIdFromWindowLocation(); + if (appId != null) { + osfSessionStorage.setItem(appId + "IsDialog", "true"); + } + this._hostInfo.isDialog = true; + return; + } + this._hostInfo.isDialog = osfSessionStorage.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId, false) + "IsDialog") != null ? true : false; + } +}; +OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppCommonMessage("OsfControl activation lifecycle: getAppContext got called."); + } + var me = this; + var getInvocationCallbackWebApp = function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(errorCode, appContext) { + var settings; + if (appContext._appName === OSF.AppName.ExcelWebApp) { + var serializedSettings = appContext._settings; + settings = {}; + for (var index in serializedSettings) { + var setting = serializedSettings[index]; + settings[setting[0]] = setting[1]; + } + } + else { + settings = appContext._settings; + } + if (appContext._appName === OSF.AppName.OutlookWebApp && !!appContext._requirementMatrix && appContext._requirementMatrix.indexOf("react") == -1) { + OSF.AgaveHostAction.SendTelemetryEvent = undefined; + } + if (!me._hostInfo.isDialog || window.opener == null) { + var pageUrl = window.location.origin; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.UpdateTargetUrl, pageUrl]); + } + if (errorCode === 0 && appContext._id != undefined && appContext._appName != undefined && appContext._appVersion != undefined && appContext._appUILocale != undefined && appContext._dataLocale != undefined && + appContext._docUrl != undefined && appContext._clientMode != undefined && appContext._settings != undefined && appContext._reason != undefined) { + me._appContext = appContext; + var appInstanceId = (appContext._appInstanceId ? appContext._appInstanceId : appContext._id); + var touchEnabled = false; + var commerceAllowed = true; + var minorVersion = 0; + if (appContext._appMinorVersion != undefined) { + minorVersion = appContext._appMinorVersion; + } + var requirementMatrix = undefined; + if (appContext._requirementMatrix != undefined) { + requirementMatrix = appContext._requirementMatrix; + } + appContext.eToken = appContext.eToken ? appContext.eToken : ""; + var returnedContext = new OSF.OfficeAppContext(appContext._id, appContext._appName, appContext._appVersion, appContext._appUILocale, appContext._dataLocale, appContext._docUrl, appContext._clientMode, settings, appContext._reason, appContext._osfControlType, appContext._eToken, appContext._correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, appContext._hostCustomMessage, appContext._hostFullVersion, appContext._clientWindowHeight, appContext._clientWindowWidth, appContext._addinName, appContext._appDomains, appContext._dialogRequirementMatrix, appContext._featureGates, appContext._officeTheme, appContext._initialDisplayMode); + returnedContext._wacHostEnvironment = appContext._wacHostEnvironment || "0"; + returnedContext._isFromWacAutomation = !!appContext._isFromWacAutomation; + returnedContext._marketplaceType = appContext._marketplaceType; + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + } + else { + var errorMsg = "Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is " + errorCode + ", exception: " + appContext; + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException(errorMsg); + } + throw errorMsg; + } + }; + try { + if (this._hostInfo.isDialog && window.opener != null) { + var appContext = OfficeExt.WACUtils.parseAppContextFromWindowName(false, OSF._OfficeAppFactory.getWindowName()); + getInvocationCallbackWebApp(0, appContext); + } + else { + this._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync", getInvocationCallbackWebApp, this._webAppState.id); + } + } + catch (ex) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:[" + ex + "]"); + } + throw ex; + } +}; +OSF.InitializationHelper.prototype.isHostOriginTrusted = function OSF_InitializationHelper$isHostOriginTrusted(hostOrigin) { +}; +OSF.InitializationHelper.prototype.performUserTrustCheck = function OSF_InitializationHelper$performUserTrustCheck(hostName, isHttps, funcToRun) { + var me = this; + var notHttpsErrorMessage = "NotHttps"; + var loadAgaveErrorUX = function () { + var officejsCDNHost = OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath().match(/^https?:\/\/[^:/?#]*(?::([0-9]+))?/); + if (officejsCDNHost && officejsCDNHost[0]) { + var agaveErrorUXPath = OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + 'AgaveErrorUX/index.html#'; + var hashObj = { + error: "NotTrustedWAC", + locale: OSF.getSupportedLocale(me._hostInfo.hostLocale, OSF.ConstantNames.DefaultLocale), + hostname: hostName, + noHttps: !isHttps, + validate: false, + useHtmlPopup: OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.HostTrustDialog), + isConfirm: false + }; + var hostUserTrustIframe = document.createElement("iframe"); + hostUserTrustIframe.style.visibility = "hidden"; + hostUserTrustIframe.style.height = "0"; + hostUserTrustIframe.style.width = "0"; + function hostUserTrustCallback(event) { + if ((event.source == hostUserTrustIframe.contentWindow) && + (event.origin == officejsCDNHost[0])) { + try { + var receivedObj = JSON.parse(event.data); + var e = Function._validateParams(receivedObj, [{ name: "hostUserTrusted", type: Boolean, mayBeNull: false } + ]); + if (receivedObj.hostUserTrusted === true) { + me._webAppState.clientEndPoint._hostTrustCheckStatus = Microsoft.Office.Common.HostTrustStatus.trusted; + OSF.OUtil.removeEventListener(window, "message", hostUserTrustCallback); + document.body.removeChild(hostUserTrustIframe); + } + else { + hashObj.validate = false; + if (OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.HostTrustDialog)) { + if (window.innerHeight * window.innerWidth === 0) { + var dialogNotificationShownArgs = { + "dispId": OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent, + "eventType": OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown, + "onComplete": null, + "onCalling": null + }; + OSF.DDA.WAC.Delegate.registerEventAsync(dialogNotificationShownArgs); + } + } + window.location.replace(agaveErrorUXPath + encodeURIComponent(JSON.stringify(hashObj))); + } + funcToRun(); + } + catch (e) { + document.body.textContent = Strings.OfficeOM.L_NotTrustedWAC; + } + } + } + ; + OSF.OUtil.addEventListener(window, "message", hostUserTrustCallback); + hashObj.validate = true; + hostUserTrustIframe.setAttribute('src', agaveErrorUXPath + encodeURIComponent(JSON.stringify(hashObj))); + hostUserTrustIframe.onload = function () { + var postingObj = { + hostname: hostName, + noHttps: !isHttps + }; + hostUserTrustIframe.contentWindow.postMessage(JSON.stringify(postingObj), officejsCDNHost[0]); + }; + document.body.appendChild(hostUserTrustIframe); + } + else { + document.body.textContent = Strings.OfficeOM.L_NotTrustedWAC; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (!isHttps) + throw new Error(notHttpsErrorMessage); + } + }; + if (document.body) { + loadAgaveErrorUX(); + } + else { + var checkDone = false; + document.addEventListener('DOMContentLoaded', function () { + if (!checkDone) { + checkDone = true; + loadAgaveErrorUX(); + } + }); + } +}; +OSF.InitializationHelper.prototype.checkWellKnownOrigins = function OSF_InitializationHelper$checkWellKnownOrigins(hostName, isHttps, onOriginCheckComplete) { + var me = this; + if (me._webAppState.clientEndPoint._hostTrustCheckStatus === Microsoft.Office.Common.HostTrustStatus.unknown) { + if (!isHttps) + me._webAppState.clientEndPoint._hostTrustCheckStatus = Microsoft.Office.Common.HostTrustStatus.nothttps; + if (me._webAppState.clientEndPoint._hostTrustCheckStatus != Microsoft.Office.Common.HostTrustStatus.nothttps) { + var isSovereignVersion = OfficeExt.SovereignHelper.isSovereignVersion(); + var isOriginValid = false; + if (!isSovereignVersion || (typeof officeInitializationSettings === "object" && officeInitializationSettings.trustAllCloudEnvironments === true)) { + isOriginValid = Microsoft.Office.Common.XdmCommunicationManager.isHostNameValidWacDomain(hostName); + if (me.isHostOriginTrusted) { + isOriginValid = isOriginValid || me.isHostOriginTrusted(hostName); + } + if (isOriginValid) { + me._webAppState.clientEndPoint._hostTrustCheckStatus = Microsoft.Office.Common.HostTrustStatus.trusted; + } + } + if (!isOriginValid && isSovereignVersion) { + if (!me._sovereignHelper) { + me._sovereignHelper = new OfficeExt.SovereignHelper(); + } + var sovereignHelper = me._sovereignHelper; + sovereignHelper.isConfigAvailable().then(function (isConfigAvailable) { + if (isConfigAvailable) { + sovereignHelper.isSovereignHostTrusted(hostName).then(function (isOriginValid) { + if (isOriginValid) { + me._webAppState.clientEndPoint._hostTrustCheckStatus = Microsoft.Office.Common.HostTrustStatus.trusted; + } + onOriginCheckComplete(); + }); + } + }); + return; + } + } + } + onOriginCheckComplete(); +}; +OSF.InitializationHelper.prototype.checkReceiverOriginAndRun = function OSF_InitializationHelper$checkReceiverOriginAndRun(funcToRun) { + var me = this; + if (me._webAppState.clientEndPoint._hostTrustCheckStatus === Microsoft.Office.Common.HostTrustStatus.trusted) { + funcToRun(); + return; + } + var parsedHostname = OSF.OUtil.parseUrl(me._webAppState.clientEndPoint._targetUrl, false); + var hostName = parsedHostname.hostname; + var isHttps = parsedHostname.protocol == "https:"; + me.checkWellKnownOrigins(hostName, isHttps, function () { + if (!me._webAppState.clientEndPoint._checkStatusLogged && me._hostInfo != null && me._hostInfo !== undefined) { + var isLocalStorageAvailable = OSF.OUtil.getLocalStorage().isLocalStorageAvailable(); + OSF.AppTelemetry.onCheckWACHost(me._webAppState.clientEndPoint._hostTrustCheckStatus, me._webAppState.id, me._hostInfo.hostType, me._hostInfo.hostPlatform, me._webAppState.clientEndPoint._targetUrl, isLocalStorageAvailable); + me._webAppState.clientEndPoint._checkStatusLogged = true; + } + if (me._webAppState.clientEndPoint._hostTrustCheckStatus === Microsoft.Office.Common.HostTrustStatus.trusted) { + funcToRun(); + } + else { + me.performUserTrustCheck(hostName, isHttps, funcToRun); + } + }); +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication() { + try { + var me = this; + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(false, OSF._OfficeAppFactory.getWindowLocationHash()); + if (!xdmInfoValue && OSF._OfficeAppFactory.getWindowName) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(false, OSF._OfficeAppFactory.getWindowName()); + } + if (xdmInfoValue) { + var xdmItems = OSF.OUtil.getInfoItems(xdmInfoValue); + if (xdmItems != undefined && xdmItems.length >= 3) { + me._webAppState.conversationID = xdmItems[0]; + me._webAppState.id = xdmItems[1]; + me._webAppState.webAppUrl = xdmItems[2].indexOf(":") >= 0 ? xdmItems[2] : decodeURIComponent(xdmItems[2]); + } + } + me._webAppState.wnd = window.opener != null ? window.opener : window.parent; + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(false, OSF._OfficeAppFactory.getWindowLocationHash()); + if (isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(false, OSF._OfficeAppFactory.getWindowName()); + } + me._webAppState.serializerVersion = serializerVersion; + if (this._hostInfo.isDialog && window.opener != null) { + return; + } + me._webAppState.clientEndPoint = Microsoft.Office.Common.XdmCommunicationManager.connect(me._webAppState.conversationID, me._webAppState.wnd, me._webAppState.webAppUrl, me._webAppState.serializerVersion); + me._webAppState.serviceEndPoint = Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(me._webAppState.id); + me._webAppState.clientEndPoint._checkReceiverOriginAndRun = function (funcToRun) { + me.checkReceiverOriginAndRun(funcToRun); + }; + var notificationConversationId = me._webAppState.conversationID + OSF.SharedConstants.NotificationConversationIdSuffix; + me._webAppState.serviceEndPoint.registerConversation(notificationConversationId, me._webAppState.webAppUrl); + var notifyAgave = function OSF__OfficeAppFactory_initialize$notifyAgave(params) { + var actionId; + if (typeof params == "string") { + actionId = params; + } + else { + actionId = params[0]; + } + switch (actionId) { + case OSF.AgaveHostAction.Select: + me._webAppState.focused = true; + break; + case OSF.AgaveHostAction.UnSelect: + me._webAppState.focused = false; + break; + case OSF.AgaveHostAction.TabIn: + case OSF.AgaveHostAction.CtrlF6In: + window.focus(); + var list = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToFirstTabbable(list, false); + if (!focused) { + window.blur(); + me._webAppState.focused = false; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.ExitNoFocusable]); + } + break; + case OSF.AgaveHostAction.TabInShift: + window.focus(); + var list = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToFirstTabbable(list, true); + if (!focused) { + window.blur(); + me._webAppState.focused = false; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.ExitNoFocusableShift]); + } + break; + case OSF.AgaveHostAction.SendMessage: + if (window.Office.context.messaging.onMessage) { + var message = params[1]; + window.Office.context.messaging.onMessage(message); + } + break; + case OSF.AgaveHostAction.TaskPaneHeaderButtonClicked: + if (window.Office.context.ui.taskPaneAction.onHeaderButtonClick) { + window.Office.context.ui.taskPaneAction.onHeaderButtonClick(); + } + break; + default: + OsfMsAjaxFactory.msAjaxDebug.trace("actionId " + actionId + " notifyAgave is wrong."); + break; + } + }; + me._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave", notifyAgave, Microsoft.Office.Common.InvokeType.async, false); + me.addOrRemoveEventListenersForWindow(true); + } + catch (ex) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:[" + ex + "]"); + } + throw ex; + } +}; +OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow = function OSF_InitializationHelper$addOrRemoveEventListenersForWindow(isAdd) { + var me = this; + var onWindowFocus = function () { + if (!me._webAppState.focused) { + me._webAppState.focused = true; + } + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.Select]); + }; + var onWindowBlur = function () { + if (!OSF) { + return; + } + if (me._webAppState.focused) { + me._webAppState.focused = false; + } + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.UnSelect]); + }; + var onWindowKeydown = function (e) { + e.preventDefault = e.preventDefault || function () { + e.returnValue = false; + }; + if (e.keyCode == 117 && (e.ctrlKey || e.metaKey)) { + e.preventDefault(); + var actionId = OSF.AgaveHostAction.CtrlF6Exit; + if (e.shiftKey) { + actionId = OSF.AgaveHostAction.CtrlF6ExitShift; + } + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, actionId]); + } + else if (e.keyCode == 9) { + var isPowerPointModernSlideShow = me._appContext._isPowerPointModernSlideShowEnabled && + me._appContext._appName == OSF.AppName.PowerpointWebApp && + me._appContext._clientMode == OSF.ClientMode.ReadOnly && + me._appContext._osfControlType == OSF.OsfControlType.DocumentLevel; + if (!isPowerPointModernSlideShow) { + e.preventDefault(); + } + var allTabbableElements = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToNextTabbable(allTabbableElements, e.target || e.srcElement, e.shiftKey); + if (focused) { + if (isPowerPointModernSlideShow) { + e.preventDefault(); + } + } + else { + if (me._hostInfo.isDialog) { + OSF.OUtil.focusToFirstTabbable(allTabbableElements, e.shiftKey); + } + else { + if (e.shiftKey) { + if (!isPowerPointModernSlideShow) { + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.TabExitShift]); + } + } + else { + if (OSF.OUtil.checkFlight(OSF.FlightNames.SetFocusToTaskpaneIsEnabled) && e.target && e.target.tagName.toUpperCase() === "BODY") { + OSF.OUtil.focusToFirstTabbable(allTabbableElements, e.shiftKey); + } + else { + if (!isPowerPointModernSlideShow) { + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.TabExit]); + } + } + } + } + } + } + else if (e.keyCode == 27) { + e.preventDefault(); + me.dismissDialogNotification && me.dismissDialogNotification(); + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.EscExit]); + } + else if (e.keyCode == 113) { + e.preventDefault(); + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.F2Exit]); + } + else if ((e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) && e.keyCode >= 1 && e.keyCode <= 255) { + var params = { + "keyCode": e.keyCode, + "shiftKey": e.shiftKey, + "altKey": e.altKey, + "ctrlKey": e.ctrlKey, + "metaKey": e.metaKey + }; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.KeyboardShortcuts, params]); + } + }; + var onWindowKeypress = function (e) { + if (e.keyCode == 117 && e.ctrlKey) { + if (e.preventDefault) { + e.preventDefault(); + } + else { + e.returnValue = false; + } + } + }; + if (isAdd) { + OSF.OUtil.addEventListener(window, "focus", onWindowFocus); + OSF.OUtil.addEventListener(window, "blur", onWindowBlur); + OSF.OUtil.addEventListener(window, "keydown", onWindowKeydown); + OSF.OUtil.addEventListener(window, "keypress", onWindowKeypress); + } + else { + OSF.OUtil.removeEventListener(window, "focus", onWindowFocus); + OSF.OUtil.removeEventListener(window, "blur", onWindowBlur); + OSF.OUtil.removeEventListener(window, "keydown", onWindowKeydown); + OSF.OUtil.removeEventListener(window, "keypress", onWindowKeypress); + } +}; +OSF.InitializationHelper.prototype.initWebDialog = function OSF_InitializationHelper$initWebDialog(appContext) { + if (appContext.get_isDialog()) { + if (OSF.DDA.UI.ChildUI) { + var isPopupWindow = (window.opener != null); + appContext.ui = new OSF.DDA.UI.ChildUI(isPopupWindow); + if (isPopupWindow) { + this.registerMessageReceivedEventForWindowDialog && this.registerMessageReceivedEventForWindowDialog(); + } + } + } + else { + if (OSF.DDA.UI.ParentUI) { + appContext.ui = new OSF.DDA.UI.ParentUI(); + if (OfficeExt.Container) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.CloseContainerAsync]); + } + } + } +}; +OSF.InitializationHelper.prototype.initWebAuth = function OSF_InitializationHelper$initWebAuth(appContext) { + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + var asyncMethods = []; + var getAccessTokenMethod = OSF.DDA.AsyncMethodNames.GetAccessTokenAsync; + if (getAccessTokenMethod) { + asyncMethods.push(getAccessTokenMethod); + } + var authContextMethod = OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync; + if (authContextMethod) { + asyncMethods.push(authContextMethod); + } + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, asyncMethods); + } +}; +OSF.InitializationHelper.prototype.initWebAuthImplicit = function OSF_InitializationHelper$initWebAuthImplicit(appContext) { + if (OSF.DDA.WebAuth) { + appContext.webAuth = new OSF.DDA.WebAuth(); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.webAuth, [OSF.DDA.AsyncMethodNames.GetAuthContextAsync]); + } +}; +OSF.getClientEndPoint = function OSF$getClientEndPoint() { + var initializationHelper = OSF._OfficeAppFactory.getInitializationHelper(); + return initializationHelper._webAppState.clientEndPoint; +}; +OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() { + if (this._hostInfo.isDialog) { + window.focus(); + var list = document.querySelectorAll(this._tabbableElements); + var focused = OSF.OUtil.focusToFirstTabbable(list, false); + if (!focused) { + window.blur(); + this._webAppState.focused = false; + if (this._webAppState.clientEndPoint) { + this._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [this._webAppState.id, OSF.AgaveHostAction.ExitNoFocusable]); + } + } + } +}; +OSF.Messaging.sendMessage = function OSF_Messaging$sendMessage(message) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.SendMessage, message]); +}; +OSF.ExtensionLifeCycle.launchExtensionComponent = function OSF_ExtensionLifeCycle$launchExtensionComponent(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.LaunchExtensionComponent, params]); +}; +OSF.ExtensionLifeCycle.stopExtensionComponent = function OSF_ExtensionLifeCycle$stopExtensionComponent(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.StopExtensionComponent, params]); +}; +OSF.ExtensionLifeCycle.restartExtensionComponent = function OSF_ExtensionLifeCycle$restartExtensionComponent(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.RestartExtensionComponent, params]); +}; +OSF.ExtensionLifeCycle.close = function OSF_ExtensionLifeCycle$close(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.CloseSDXDialog, params]); +}; +OSF.TaskPaneAction.enableHeaderButton = function OSF_TaskPaneAction$enableHeaderButton(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.EnableTaskPaneHeaderButton, params]); +}; +OSF.TaskPaneAction.disableHeaderButton = function OSF_TaskPaneAction$disableHeaderButton() { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.DisableTaskPaneHeaderButton]); +}; +OSF.RibbonGallery.refreshRibbon = function OSF_RibbonGallery$refreshRibbon(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.RefreshRibbonGallery, params]); +}; +OSF.CommonUI = { + HostButtonBorderColor: "#86bfa0", + HostButtonBackgroundColor: "#d3f0e0" +}; +var OSFLog; +(function (OSFLog) { + var BaseUsageData = (function () { + function BaseUsageData(table) { + this._table = table; + this._fields = {}; + } + Object.defineProperty(BaseUsageData.prototype, "Fields", { + get: function () { + return this._fields; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype, "Table", { + get: function () { + return this._table; + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function () { + }; + BaseUsageData.prototype.SetSerializedField = function (key, value) { + if (typeof (value) !== "undefined" && value !== null) { + this._serializedFields[key] = value.toString(); + } + }; + BaseUsageData.prototype.SerializeRow = function () { + this._serializedFields = {}; + this.SetSerializedField("Table", this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields); + }; + return BaseUsageData; + }()); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = (function (_super) { + __extends(AppActivatedUsageData, _super); + function AppActivatedUsageData() { + return _super.call(this, "AppActivated") || this; + } + Object.defineProperty(AppActivatedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppId", { + get: function () { return this.Fields["AppId"]; }, + set: function (value) { this.Fields["AppId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppInstanceId", { + get: function () { return this.Fields["AppInstanceId"]; }, + set: function (value) { this.Fields["AppInstanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppURL", { + get: function () { return this.Fields["AppURL"]; }, + set: function (value) { this.Fields["AppURL"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AssetId", { + get: function () { return this.Fields["AssetId"]; }, + set: function (value) { this.Fields["AssetId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Browser", { + get: function () { return this.Fields["Browser"]; }, + set: function (value) { this.Fields["Browser"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "UserId", { + get: function () { return this.Fields["UserId"]; }, + set: function (value) { this.Fields["UserId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Host", { + get: function () { return this.Fields["Host"]; }, + set: function (value) { this.Fields["Host"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostVersion", { + get: function () { return this.Fields["HostVersion"]; }, + set: function (value) { this.Fields["HostVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "ClientId", { + get: function () { return this.Fields["ClientId"]; }, + set: function (value) { this.Fields["ClientId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeWidth", { + get: function () { return this.Fields["AppSizeWidth"]; }, + set: function (value) { this.Fields["AppSizeWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeHeight", { + get: function () { return this.Fields["AppSizeHeight"]; }, + set: function (value) { this.Fields["AppSizeHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "DocUrl", { + get: function () { return this.Fields["DocUrl"]; }, + set: function (value) { this.Fields["DocUrl"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "OfficeJSVersion", { + get: function () { return this.Fields["OfficeJSVersion"]; }, + set: function (value) { this.Fields["OfficeJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostJSVersion", { + get: function () { return this.Fields["HostJSVersion"]; }, + set: function (value) { this.Fields["HostJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "WacHostEnvironment", { + get: function () { return this.Fields["WacHostEnvironment"]; }, + set: function (value) { this.Fields["WacHostEnvironment"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsFromWacAutomation", { + get: function () { return this.Fields["IsFromWacAutomation"]; }, + set: function (value) { this.Fields["IsFromWacAutomation"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsMOS", { + get: function () { return this.Fields["IsMOS"]; }, + set: function (value) { this.Fields["IsMOS"] = value; }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("AppId", this.AppId); + this.SetSerializedField("AppInstanceId", this.AppInstanceId); + this.SetSerializedField("AppURL", this.AppURL); + this.SetSerializedField("AssetId", this.AssetId); + this.SetSerializedField("Browser", this.Browser); + this.SetSerializedField("UserId", this.UserId); + this.SetSerializedField("Host", this.Host); + this.SetSerializedField("HostVersion", this.HostVersion); + this.SetSerializedField("ClientId", this.ClientId); + this.SetSerializedField("AppSizeWidth", this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight", this.AppSizeHeight); + this.SetSerializedField("Message", this.Message); + this.SetSerializedField("DocUrl", this.DocUrl); + this.SetSerializedField("OfficeJSVersion", this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion", this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment", this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation", this.IsFromWacAutomation); + this.SetSerializedField("IsMOS", this.IsMOS); + }; + return AppActivatedUsageData; + }(BaseUsageData)); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = (function (_super) { + __extends(ScriptLoadUsageData, _super); + function ScriptLoadUsageData() { + return _super.call(this, "ScriptLoad") || this; + } + Object.defineProperty(ScriptLoadUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ScriptId", { + get: function () { return this.Fields["ScriptId"]; }, + set: function (value) { this.Fields["ScriptId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "StartTime", { + get: function () { return this.Fields["StartTime"]; }, + set: function (value) { this.Fields["StartTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("ScriptId", this.ScriptId); + this.SetSerializedField("StartTime", this.StartTime); + this.SetSerializedField("ResponseTime", this.ResponseTime); + }; + return ScriptLoadUsageData; + }(BaseUsageData)); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = (function (_super) { + __extends(AppClosedUsageData, _super); + function AppClosedUsageData() { + return _super.call(this, "AppClosed") || this; + } + Object.defineProperty(AppClosedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "FocusTime", { + get: function () { return this.Fields["FocusTime"]; }, + set: function (value) { this.Fields["FocusTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalWidth", { + get: function () { return this.Fields["AppSizeFinalWidth"]; }, + set: function (value) { this.Fields["AppSizeFinalWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalHeight", { + get: function () { return this.Fields["AppSizeFinalHeight"]; }, + set: function (value) { this.Fields["AppSizeFinalHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "OpenTime", { + get: function () { return this.Fields["OpenTime"]; }, + set: function (value) { this.Fields["OpenTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "CloseMethod", { + get: function () { return this.Fields["CloseMethod"]; }, + set: function (value) { this.Fields["CloseMethod"] = value; }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("FocusTime", this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth", this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight", this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime", this.OpenTime); + this.SetSerializedField("CloseMethod", this.CloseMethod); + }; + return AppClosedUsageData; + }(BaseUsageData)); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = (function (_super) { + __extends(APIUsageUsageData, _super); + function APIUsageUsageData() { + return _super.call(this, "APIUsage") || this; + } + Object.defineProperty(APIUsageUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIType", { + get: function () { return this.Fields["APIType"]; }, + set: function (value) { this.Fields["APIType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIID", { + get: function () { return this.Fields["APIID"]; }, + set: function (value) { this.Fields["APIID"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "Parameters", { + get: function () { return this.Fields["Parameters"]; }, + set: function (value) { this.Fields["Parameters"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ErrorType", { + get: function () { return this.Fields["ErrorType"]; }, + set: function (value) { this.Fields["ErrorType"] = value; }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("APIType", this.APIType); + this.SetSerializedField("APIID", this.APIID); + this.SetSerializedField("Parameters", this.Parameters); + this.SetSerializedField("ResponseTime", this.ResponseTime); + this.SetSerializedField("ErrorType", this.ErrorType); + }; + return APIUsageUsageData; + }(BaseUsageData)); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = (function (_super) { + __extends(AppInitializationUsageData, _super); + function AppInitializationUsageData() { + return _super.call(this, "AppInitialization") || this; + } + Object.defineProperty(AppInitializationUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SuccessCode", { + get: function () { return this.Fields["SuccessCode"]; }, + set: function (value) { this.Fields["SuccessCode"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("SuccessCode", this.SuccessCode); + this.SetSerializedField("Message", this.Message); + }; + return AppInitializationUsageData; + }(BaseUsageData)); + OSFLog.AppInitializationUsageData = AppInitializationUsageData; + var CheckWACHostUsageData = (function (_super) { + __extends(CheckWACHostUsageData, _super); + function CheckWACHostUsageData() { + return _super.call(this, "CheckWACHost") || this; + } + Object.defineProperty(CheckWACHostUsageData.prototype, "isWacKnownHost", { + get: function () { return this.Fields["isWacKnownHost"]; }, + set: function (value) { this.Fields["isWacKnownHost"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "instanceId", { + get: function () { return this.Fields["instanceId"]; }, + set: function (value) { this.Fields["instanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostType", { + get: function () { return this.Fields["hostType"]; }, + set: function (value) { this.Fields["hostType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostPlatform", { + get: function () { return this.Fields["hostPlatform"]; }, + set: function (value) { this.Fields["hostPlatform"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "wacDomain", { + get: function () { return this.Fields["wacDomain"]; }, + set: function (value) { this.Fields["wacDomain"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "isLocalStorageAvailable", { + get: function () { return this.Fields["isLocalStorageAvailable"]; }, + set: function (value) { this.Fields["isLocalStorageAvailable"] = value; }, + enumerable: true, + configurable: true + }); + CheckWACHostUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("isWacKnownHost", this.isWacKnownHost); + this.SetSerializedField("instanceId", this.instanceId); + this.SetSerializedField("hostType", this.hostType); + this.SetSerializedField("hostPlatform", this.hostPlatform); + this.SetSerializedField("wacDomain", this.wacDomain); + this.SetSerializedField("isLocalStorageAvailable", this.isLocalStorageAvailable); + }; + return CheckWACHostUsageData; + }(BaseUsageData)); + OSFLog.CheckWACHostUsageData = CheckWACHostUsageData; +})(OSFLog || (OSFLog = {})); +var Logger; +(function (Logger) { + "use strict"; + var TraceLevel; + (function (TraceLevel) { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error"; + })(TraceLevel = Logger.TraceLevel || (Logger.TraceLevel = {})); + var SendFlag; + (function (SendFlag) { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush"; + })(SendFlag = Logger.SendFlag || (Logger.SendFlag = {})); + function allowUploadingData() { + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) { + } + Logger.sendLog = sendLog; + function creatULSEndpoint() { + try { + return new ULSEndpointProxy(); + } + catch (e) { + return null; + } + } + var ULSEndpointProxy = (function () { + function ULSEndpointProxy() { + } + ULSEndpointProxy.prototype.writeLog = function (log) { + }; + ULSEndpointProxy.prototype.loadProxyFrame = function () { + }; + return ULSEndpointProxy; + }()); + if (!OSF.Logger) { + OSF.Logger = Logger; + } + Logger.ulsEndpoint = creatULSEndpoint(); +})(Logger || (Logger = {})); +var OSFAriaLogger; +(function (OSFAriaLogger) { + var TelemetryEventAppActivated = { name: "AppActivated", enabled: true, critical: true, points: [ + { name: "Browser", type: "string" }, + { name: "Message", type: "string" }, + { name: "Host", type: "string" }, + { name: "AppSizeWidth", type: "int64" }, + { name: "AppSizeHeight", type: "int64" }, + { name: "IsFromWacAutomation", type: "string" }, + { name: "IsMOS", type: "int64" }, + ] }; + var TelemetryEventScriptLoad = { name: "ScriptLoad", enabled: true, critical: false, points: [ + { name: "ScriptId", type: "string" }, + { name: "StartTime", type: "double" }, + { name: "ResponseTime", type: "double" }, + ] }; + var enableAPIUsage = shouldAPIUsageBeEnabled(); + var TelemetryEventApiUsage = { name: "APIUsage", enabled: enableAPIUsage, critical: false, points: [ + { name: "APIType", type: "string" }, + { name: "APIID", type: "int64" }, + { name: "Parameters", type: "string" }, + { name: "ResponseTime", type: "int64" }, + { name: "ErrorType", type: "int64" }, + ] }; + var TelemetryEventAppInitialization = { name: "AppInitialization", enabled: true, critical: false, points: [ + { name: "SuccessCode", type: "int64" }, + { name: "Message", type: "string" }, + ] }; + var TelemetryEventAppClosed = { name: "AppClosed", enabled: true, critical: false, points: [ + { name: "FocusTime", type: "int64" }, + { name: "AppSizeFinalWidth", type: "int64" }, + { name: "AppSizeFinalHeight", type: "int64" }, + { name: "OpenTime", type: "int64" }, + ] }; + var TelemetryEventCheckWACHost = { name: "CheckWACHost", enabled: true, critical: false, points: [ + { name: "isWacKnownHost", type: "int64" }, + { name: "solutionId", type: "string" }, + { name: "hostType", type: "string" }, + { name: "hostPlatform", type: "string" }, + { name: "correlationId", type: "string" }, + { name: "isLocalStorageAvailable", type: "boolean" }, + ] }; + var TelemetryEvents = [ + TelemetryEventAppActivated, + TelemetryEventScriptLoad, + TelemetryEventApiUsage, + TelemetryEventAppInitialization, + TelemetryEventAppClosed, + TelemetryEventCheckWACHost, + ]; + function createDataField(value, point) { + var key = point.rename === undefined ? point.name : point.rename; + var type = point.type; + var field = undefined; + switch (type) { + case "string": + field = oteljs.makeStringDataField(key, value); + break; + case "double": + if (typeof value === "string") { + value = parseFloat(value); + } + field = oteljs.makeDoubleDataField(key, value); + break; + case "int64": + if (typeof value === "string") { + value = parseInt(value); + } + field = oteljs.makeInt64DataField(key, value); + break; + case "boolean": + if (typeof value === "string") { + value = value === "true"; + } + field = oteljs.makeBooleanDataField(key, value); + break; + } + return field; + } + function getEventDefinition(eventName) { + for (var _i = 0, TelemetryEvents_1 = TelemetryEvents; _i < TelemetryEvents_1.length; _i++) { + var event_1 = TelemetryEvents_1[_i]; + if (event_1.name === eventName) { + return event_1; + } + } + return undefined; + } + function eventEnabled(eventName) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return false; + } + return eventDefinition.enabled; + } + function shouldAPIUsageBeEnabled() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function generateTelemetryEvent(eventName, telemetryData) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return undefined; + } + var dataFields = []; + for (var _i = 0, _a = eventDefinition.points; _i < _a.length; _i++) { + var point = _a[_i]; + var key = point.name; + var value = telemetryData[key]; + if (value === undefined) { + continue; + } + var field = createDataField(value, point); + if (field !== undefined) { + dataFields.push(field); + } + } + var flags = { dataCategories: oteljs.DataCategories.ProductServiceUsage }; + if (eventDefinition.critical) { + flags.samplingPolicy = oteljs.SamplingPolicy.CriticalBusinessImpact; + } + flags.diagnosticLevel = oteljs.DiagnosticLevel.NecessaryServiceDataEvent; + var eventNameFull = "Office.Extensibility.OfficeJs." + eventName + "X"; + var event = { eventName: eventNameFull, dataFields: dataFields, eventFlags: flags }; + return event; + } + function sendOtelTelemetryEvent(eventName, telemetryData) { + if (eventEnabled(eventName)) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var event = generateTelemetryEvent(eventName, telemetryData); + if (event === undefined) { + return; + } + Microsoft.Office.WebExtension.sendTelemetryEvent(event); + }); + } + } + } + var AriaLogger = (function () { + function AriaLogger() { + } + AriaLogger.prototype.getAriaCDNLocation = function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "ariatelemetry/aria-web-telemetry.js"); + }; + AriaLogger.getInstance = function () { + if (AriaLogger.AriaLoggerObj === undefined) { + AriaLogger.AriaLoggerObj = new AriaLogger(); + } + return AriaLogger.AriaLoggerObj; + }; + AriaLogger.prototype.isIUsageData = function (arg) { + return arg["Fields"] !== undefined; + }; + AriaLogger.prototype.shouldSendDirectToAria = function (flavor, version) { + var BASE10 = 10; + var MAX_VERSION_WIN32 = [16, 0, 11601]; + var MAX_VERSION_MAC = [16, 28]; + var max_version; + if (!flavor) { + return false; + } + else if (flavor.toLowerCase() === "win32") { + max_version = MAX_VERSION_WIN32; + } + else if (flavor.toLowerCase() === "mac") { + max_version = MAX_VERSION_MAC; + } + else { + return true; + } + if (!version) { + return false; + } + var versionTokens = version.split('.'); + for (var i = 0; i < max_version.length && i < versionTokens.length; i++) { + var versionToken = parseInt(versionTokens[i], BASE10); + if (isNaN(versionToken)) { + return false; + } + if (versionToken < max_version[i]) { + return true; + } + if (versionToken > max_version[i]) { + return false; + } + } + return false; + }; + AriaLogger.prototype.isDirectToAriaEnabled = function () { + if (this.EnableDirectToAria === undefined || this.EnableDirectToAria === null) { + var flavor = void 0; + var version = void 0; + if (OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo) { + flavor = OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]; + } + if (window.external && typeof window.external.GetContext !== "undefined" && typeof window.external.GetContext().GetHostFullVersion !== "undefined") { + version = window.external.GetContext().GetHostFullVersion(); + } + this.EnableDirectToAria = this.shouldSendDirectToAria(flavor, version); + } + return this.EnableDirectToAria; + }; + AriaLogger.prototype.sendTelemetry = function (tableName, telemetryData) { + var startAfterMs = 1000; + var sendAriaEnabled = AriaLogger.EnableSendingTelemetryWithLegacyAria && this.isDirectToAriaEnabled(); + if (sendAriaEnabled) { + OSF.OUtil.loadScript(this.getAriaCDNLocation(), function () { + try { + if (!this.ALogger) { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); + } + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for (var key in telemetryData) { + if (key.toLowerCase() !== "table") { + eventProperties.setProperty(key, telemetryData[key]); + } + } + var today = new Date(); + eventProperties.setProperty("Date", today.toISOString()); + this.ALogger.logEvent(eventProperties); + } + catch (e) { + } + }, startAfterMs); + } + if (AriaLogger.EnableSendingTelemetryWithOTel) { + sendOtelTelemetryEvent(tableName, telemetryData); + } + }; + AriaLogger.prototype.logData = function (data) { + if (this.isIUsageData(data)) { + this.sendTelemetry(data["Table"], data["Fields"]); + } + else { + this.sendTelemetry(data["Table"], data); + } + }; + AriaLogger.EnableSendingTelemetryWithOTel = true; + AriaLogger.EnableSendingTelemetryWithLegacyAria = false; + return AriaLogger; + }()); + OSFAriaLogger.AriaLogger = AriaLogger; +})(OSFAriaLogger || (OSFAriaLogger = {})); +var OSFAppTelemetry; +(function (OSFAppTelemetry) { + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + var privateAddinId = "PRIVATE"; + OSFAppTelemetry.enableTelemetry = true; + ; + var AppInfo = (function () { + function AppInfo() { + } + return AppInfo; + }()); + OSFAppTelemetry.AppInfo = AppInfo; + var Event = (function () { + function Event(name, handler) { + this.name = name; + this.handler = handler; + } + return Event; + }()); + var AppStorage = (function () { + function AppStorage() { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set"; + } + AppStorage.prototype.getClientId = function () { + var clientId = this.getValue(this.clientIDKey); + if (!clientId || clientId.length <= 0 || clientId.length > 40) { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey, clientId); + } + return clientId; + }; + AppStorage.prototype.saveLog = function (logId, log) { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = ((logIdSet && logIdSet.length > 0) ? (logIdSet + ";") : "") + logId; + this.setValue(this.logIdSetKey, logIdSet); + this.setValue(logId, log); + }; + AppStorage.prototype.enumerateLog = function (callback, clean) { + var logIdSet = this.getValue(this.logIdSetKey); + if (logIdSet) { + var ids = logIdSet.split(";"); + for (var id in ids) { + var logId = ids[id]; + var log = this.getValue(logId); + if (log) { + if (callback) { + callback(logId, log); + } + if (clean) { + this.remove(logId); + } + } + } + if (clean) { + this.remove(this.logIdSetKey); + } + } + }; + AppStorage.prototype.getValue = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if (osfLocalStorage) { + value = osfLocalStorage.getItem(key); + } + return value; + }; + AppStorage.prototype.setValue = function (key, value) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + osfLocalStorage.setItem(key, value); + } + }; + AppStorage.prototype.remove = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + try { + osfLocalStorage.removeItem(key); + } + catch (ex) { + } + } + }; + return AppStorage; + }()); + var AppLogger = (function () { + function AppLogger() { + } + AppLogger.prototype.LogData = function (data) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } + }; + AppLogger.prototype.LogRawData = function (log) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); + } + catch (e) { + } + }; + return AppLogger; + }()); + function trimStringToLowerCase(input) { + if (input) { + input = input.replace(/[{}]/g, "").toLowerCase(); + } + return (input || ""); + } + function initialize(context) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + if (appInfo) { + return; + } + appInfo = new AppInfo(); + if (context.get_hostFullVersion()) { + appInfo.hostVersion = context.get_hostFullVersion(); + } + else { + appInfo.hostVersion = context.get_appVersion(); + } + appInfo.appId = canSendAddinId() ? context.get_id() : privateAddinId; + appInfo.marketplaceType = context._marketplaceType; + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage()).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if (appInfo.appInstanceId) { + appInfo.appInstanceId = trimStringToLowerCase(appInfo.appInstanceId); + appInfo.appInstanceId = getCompliantAppInstanceId(context.get_id(), appInfo.appInstanceId); + } + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "0.0.0.0"; + if (context._wacHostEnvironment) { + appInfo.wacHostEnvironment = context._wacHostEnvironment; + } + if (context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) { + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + } + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if (url) { + url = url.split("?")[0].split("#")[0]; + } + appInfo.isMos = isMos(); + appInfo.appURL = ""; + (function getUserIdAndAssetIdFromToken(token, appInfo) { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try { + xmlContent = decodeURIComponent(token); + parser = new DOMParser(); + xmlDoc = parser.parseFromString(xmlContent, "text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if (cidNode && cidNode.nodeValue) { + appInfo.userId = cidNode.nodeValue; + } + else if (oidNode && oidNode.nodeValue) { + appInfo.userId = oidNode.nodeValue; + } + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue; + } + catch (e) { + } + finally { + xmlContent = null; + xmlDoc = null; + parser = null; + } + })(context.get_eToken(), appInfo); + appInfo.sessionId = sessionId; + if (typeof OTel !== "undefined") { + OTel.OTelLogger.initialize(appInfo); + } + (function handleLifecycle() { + var startTime = new Date(); + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function () { + if (document.hasFocus()) { + if (lastFocus == null) { + lastFocus = new Date(); + } + } + else if (lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + }; + var eventList = []; + eventList.push(new Event("focus", adjustFocusTime)); + eventList.push(new Event("blur", adjustFocusTime)); + eventList.push(new Event("focusout", adjustFocusTime)); + eventList.push(new Event("focusin", adjustFocusTime)); + var exitFunction = function () { + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.removeEventListener(window, eventList[i].name, eventList[i].handler); + } + eventList.length = 0; + if (!finished) { + if (document.hasFocus() && lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date()).getTime() - startTime.getTime()), focusTime); + finished = true; + } + }; + eventList.push(new Event("beforeunload", exitFunction)); + eventList.push(new Event("unload", exitFunction)); + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.addEventListener(window, eventList[i].name, eventList[i].handler); + } + adjustFocusTime(); + })(); + OSFAppTelemetry.onAppActivated(); + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() { + if (!appInfo) { + return; + } + (new AppStorage()).enumerateLog(function (id, log) { return (new AppLogger()).LogRawData(log); }, true); + var data = new OSFLog.AppActivatedUsageData(); + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = ""; + data.UserId = ""; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if (appInfo.wacHostEnvironment) { + data.WacHostEnvironment = appInfo.wacHostEnvironment; + } + if (appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) { + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + } + data.IsMOS = appInfo.isMos ? 1 : 0; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) { + var data = new OSFLog.ScriptLoadUsageData(); + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) { + if (!appInfo) { + return; + } + if (!isAllowedHost() || !isAPIUsageEnabledDispId(id, apiType)) { + return; + } + var data = new OSFLog.APIUsageUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCallDone = onCallDone; + ; + function onMethodDone(id, args, msResponseTime, errorType) { + var parameters = null; + if (args) { + if (typeof args == "number") { + parameters = String(args); + } + else if (typeof args === "object") { + for (var index in args) { + if (parameters !== null) { + parameters += ","; + } + else { + parameters = ""; + } + if (typeof args[index] == "number") { + parameters += String(args[index]); + } + } + } + else { + parameters = ""; + } + } + OSF.AppTelemetry.onCallDone("method", id, parameters, msResponseTime, errorType); + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) { + OSF.AppTelemetry.onCallDone("property", -1, propertyName, msResponseTime); + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onCheckWACHost(isWacKnownHost, instanceId, hostType, hostPlatform, wacDomain, isLocalStorageAvailable) { + var data = new OSFLog.CheckWACHostUsageData(); + data.isWacKnownHost = isWacKnownHost; + data.instanceId = instanceId; + data.hostType = hostType; + data.hostPlatform = hostPlatform; + data.isLocalStorageAvailable = isLocalStorageAvailable; + data.wacDomain = ""; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCheckWACHost = onCheckWACHost; + function onEventDone(id, errorType) { + OSF.AppTelemetry.onCallDone("event", id, null, 0, errorType); + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent", id, null, msResponseTime, errorType); + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) { + if (!appInfo) { + return; + } + var data = new OSFLog.AppClosedUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage()).saveLog(sessionId, data.SerializeRow()); + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId); + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) { + var data = new OSFLog.AppInitializationUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) { + doAppInitializationLogging(false, message); + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) { + doAppInitializationLogging(true, errorMessage); + } + OSFAppTelemetry.logAppException = logAppException; + function isAllowedHost() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function isAPIUsageEnabledDispId(dispId, apiType) { + if (apiType === "method") { + switch (dispId) { + case 4: + case 38: + case 37: + case 10: + case 12: + case -10: + return true; + default: + return false; + } + } + return false; + } + function canSendAddinId() { + var isPublic = (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.PublicAddin) != 0; + if (isPublic) { + return isPublic; + } + if (!appInfo) { + return false; + } + var hostPlatform = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + var hostVersion = appInfo.hostVersion; + return _isComplianceExceptedHost(hostPlatform, hostVersion); + } + OSFAppTelemetry.canSendAddinId = canSendAddinId; + function getCompliantAppInstanceId(addinId, appInstanceId) { + if (!canSendAddinId() && appInstanceId === addinId) { + return privateAddinId; + } + return appInstanceId; + } + OSFAppTelemetry.getCompliantAppInstanceId = getCompliantAppInstanceId; + function _isComplianceExceptedHost(hostPlatform, hostVersion) { + var excepted = false; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(hostVersion); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (hostPlatform == "win32") { + if (major < 16 || major == 16 && build < 14225) { + excepted = true; + } + } + else if (hostPlatform == "mac") { + if (major < 16 || (major == 16 && (minor < 52 || minor == 52 && build < 808))) { + excepted = true; + } + } + } + return excepted; + } + OSFAppTelemetry._isComplianceExceptedHost = _isComplianceExceptedHost; + function isMos() { + return (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.IsMos) != 0; + } + OSFAppTelemetry.isMos = isMos; + OSF.AppTelemetry = OSFAppTelemetry; +})(OSFAppTelemetry || (OSFAppTelemetry = {})); +var OSFPerfUtil; +(function (OSFPerfUtil) { + function prepareDataFieldsForOtel(resource, name) { + name = name + "_Resource"; + if (oteljs !== undefined) { + return [ + oteljs.makeDoubleDataField(name + "_responseEnd", resource.responseEnd), + oteljs.makeDoubleDataField(name + "_responseStart", resource.responseStart), + oteljs.makeDoubleDataField(name + "_startTime", resource.startTime), + oteljs.makeDoubleDataField(name + "_transferSize", resource.transferSize) + ]; + } + } + function sendPerformanceTelemetry() { + if (typeof OTel !== "undefined" && OSF.AppTelemetry.enableTelemetry && typeof OSFPerformance !== "undefined" && typeof (performance) != "undefined" && performance.getEntriesByType) { + var hostPerfResource_1; + var officePerfResource_1; + var resources = performance.getEntriesByType("resource"); + resources.forEach(function (resource) { + var resourceName = resource.name.toLowerCase(); + if (OSF.OUtil.stringEndsWith(resourceName, OSFPerformance.hostSpecificFileName)) { + hostPerfResource_1 = resource; + } + else if (OSF.OUtil.stringEndsWith(resourceName, OSF.ConstantNames.OfficeDebugJS) || + OSF.OUtil.stringEndsWith(resourceName, OSF.ConstantNames.OfficeJS)) { + officePerfResource_1 = resource; + } + }); + OTel.OTelLogger.onTelemetryLoaded(function () { + var dataFields = prepareDataFieldsForOtel(hostPerfResource_1, "HostJs"); + dataFields = dataFields.concat(prepareDataFieldsForOtel(officePerfResource_1, "OfficeJs")); + dataFields = dataFields.concat([ + oteljs.makeDoubleDataField("officeExecuteStartDate", OSFPerformance.officeExecuteStartDate), + oteljs.makeDoubleDataField("officeExecuteStart", OSFPerformance.officeExecuteStart), + oteljs.makeDoubleDataField("officeExecuteEnd", OSFPerformance.officeExecuteEnd), + oteljs.makeDoubleDataField("hostInitializationStart", OSFPerformance.hostInitializationStart), + oteljs.makeDoubleDataField("hostInitializationEnd", OSFPerformance.hostInitializationEnd), + oteljs.makeDoubleDataField("totalJSHeapSize", OSFPerformance.totalJSHeapSize), + oteljs.makeDoubleDataField("usedJSHeapSize", OSFPerformance.usedJSHeapSize), + oteljs.makeDoubleDataField("jsHeapSizeLimit", OSFPerformance.jsHeapSizeLimit), + oteljs.makeDoubleDataField("getAppContextStart", OSFPerformance.getAppContextStart), + oteljs.makeDoubleDataField("getAppContextEnd", OSFPerformance.getAppContextEnd), + oteljs.makeDoubleDataField("createOMEnd", OSFPerformance.createOMEnd), + oteljs.makeDoubleDataField("officeOnReady", OSFPerformance.officeOnReady), + oteljs.makeBooleanDataField("isSharedRuntime", (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.SharedApp) !== 0) + ]); + Microsoft.Office.WebExtension.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.JSPerformanceTelemetryV06", + dataFields: dataFields, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage, + diagnosticLevel: oteljs.DiagnosticLevel.NecessaryServiceDataEvent + } + }); + }); + } + } + OSFPerfUtil.sendPerformanceTelemetry = sendPerformanceTelemetry; +})(OSFPerfUtil || (OSFPerfUtil = {})); +var OfficeExtension; +(function (OfficeExtension) { +})(OfficeExtension || (OfficeExtension = {})); +var OSFWebAuth; +(function (OSFWebAuth) { + var AuthFlow; + (function (AuthFlow) { + AuthFlow["AuthCode"] = "authcode"; + AuthFlow["Broker"] = "broker"; + AuthFlow["Implicit"] = "implicit"; + })(AuthFlow = OSFWebAuth.AuthFlow || (OSFWebAuth.AuthFlow = {})); + OSFWebAuth.loadAttempts = 0; + var browserAuthPath = 'webauth/'; + var browserAuthJsDebug = 'webauth.browserauth.debug.js'; + var browserAuthJsShip = 'webauth.browserauth.js'; + function load() { + if (OSFWebAuth.config && OSFWebAuth.config.authFlow === AuthFlow.AuthCode) { + OSFWebAuth.loadAttempts++; + return new OfficeExtension.Promise(function (resolve, reject) { + var browserAuth_cdn_path = (OSFWebAuth.config && OSFWebAuth.config.authVersion) + ? OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + browserAuthPath + OSFWebAuth.config.authVersion + "/" + ((OSFWebAuth.config && OSFWebAuth.config.debugging) ? browserAuthJsDebug : browserAuthJsShip) + : OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + browserAuthPath + ((OSFWebAuth.config && OSFWebAuth.config.debugging) ? browserAuthJsDebug : browserAuthJsShip); + var loadJs = function (targetUrl, isLoaded, allowedDelay) { + return new OfficeExtension.Promise(function (resolveLoad, rejectLoad) { + if (!targetUrl) { + resolveLoad(null); + return; + } + OSF.OUtil.loadScript(targetUrl, function (event) { + if (typeof event === 'boolean' && !event) { + rejectLoad(new Event("loadScript: failed to load '" + targetUrl + "'")); + return; + } + if (event instanceof Event && event) { + rejectLoad(new Event("loadScript: " + event.type + " '" + targetUrl + "'")); + return; + } + if (allowedDelay && !isLoaded) { + var waited_1 = 0; + var interval_1 = 500; + var waiter_1 = setInterval(function () { + waited_1 += interval_1; + if (isLoaded || waited_1 > allowedDelay) { + clearInterval(waiter_1); + if (!isLoaded) { + rejectLoad(new Event("Missing expected object after loaded.")); + return; + } + } + }, interval_1); + } + else { + resolveLoad(null); + return; + } + }, allowedDelay); + }); + }; + OfficeExtension.Promise.all([ + loadJs(OSFWebAuth.config.msal, function () { return (!!msal); }, OSFWebAuth.config.delayMsal), + loadJs(browserAuth_cdn_path, function () { return (!!BrowserAuth); }, OSFWebAuth.config.delayWebAuth) + ]).then(function () { + if (OSFWebAuth.config) { + BrowserAuth.Load(OSFWebAuth.config, OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId).then(function (result) { resolve(result); }, function (result) { reject(result); }); + } + else { + BrowserAuth.GetAuthConfig().then(function (configParent) { + OSFWebAuth.config = configParent; + BrowserAuth.Load(OSFWebAuth.config, OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId).then(function (result) { resolve(result); }, function (result) { reject(result); }); + }, function () { reject(new Event("BrowserAuth.GetAuthConfig was failed")); }); + } + }, function (error) { + reject(error); + return; + }); + }); + } + else { + return new OfficeExtension.Promise(function (resolve, reject) { return (reject(new Event("'authcode' as authFlow is only supported"))); }); + } + } + OSFWebAuth.load = load; + function getToken(target, applicationId, correlationId, popup, authChallenge) { + if (OSFWebAuth.config && OSFWebAuth.config.authFlow === AuthFlow.AuthCode) { + return BrowserAuth.GetToken(target, applicationId, correlationId, !!popup, !!popup, false, authChallenge); + } + else { + return new OfficeExtension.Promise(function (resolve, reject) { return (reject(new Event("'authcode' as authFlow is only supported"))); }); + } + } + OSFWebAuth.getToken = getToken; + OSF.WebAuth = OSFWebAuth; +})(OSFWebAuth || (OSFWebAuth = {})); +(function (OfficeExt) { + var LifeCycle; + (function (LifeCycle) { + var ExtensionIdentity = (function () { + function ExtensionIdentity(id, storeId, storeType, appVersion) { + this.Id = id; + this.StoreId = storeId; + this.StoreType = storeType; + this.AppVersion = appVersion; + } + return ExtensionIdentity; + }()); + LifeCycle.ExtensionIdentity = ExtensionIdentity; + var HostProperties = (function () { + function HostProperties(hostType, formFactor, locale) { + this.HostType = hostType; + this.FormFactor = formFactor; + this.Locale = locale; + } + return HostProperties; + }()); + LifeCycle.HostProperties = HostProperties; + var ExtensionLaunchProperties = (function () { + function ExtensionLaunchProperties(optionalProperties, devProperties) { + this.OptionalProperties = optionalProperties; + this.DevProperties = devProperties; + } + return ExtensionLaunchProperties; + }()); + LifeCycle.ExtensionLaunchProperties = ExtensionLaunchProperties; + var LaunchParameters = (function () { + function LaunchParameters(extId, componentType, componentId, hostProps, optionalProps) { + this.ExtId = extId; + this.ComponentType = componentType; + this.ComponentId = componentId; + this.HostProps = hostProps; + this.OptionalProps = optionalProps; + } + return LaunchParameters; + }()); + LifeCycle.LaunchParameters = LaunchParameters; + var ExtensionComponentInstance = (function () { + function ExtensionComponentInstance(extId, componentType, componentId, instanceToken, launchProps) { + this.Id = extId; + this.ComponentType = componentType; + this.ComponentId = componentId; + this.InstanceToken = instanceToken; + this.LaunchProperties = launchProps; + } + ExtensionComponentInstance.prototype.SetLaunchProperties = function (launchProps) { + this.LaunchProperties = launchProps; + }; + ExtensionComponentInstance.prototype.stop = function () { + if (OSF.ExtensionLifeCycle && OSF.ExtensionLifeCycle.stopExtensionComponent) { + OSF.ExtensionLifeCycle.stopExtensionComponent(this); + } + }; + ExtensionComponentInstance.prototype.restart = function () { + if (OSF.ExtensionLifeCycle && OSF.ExtensionLifeCycle.restartExtensionComponent) { + OSF.ExtensionLifeCycle.restartExtensionComponent(this); + } + }; + ExtensionComponentInstance.prototype.closeSDXDialog = function (param) { + if (OSF.ExtensionLifeCycle && OSF.ExtensionLifeCycle.close) { + OSF.ExtensionLifeCycle.close({ "DialogCloseCallbackParam": param, "InstanceId": this.InstanceToken }); + } + }; + return ExtensionComponentInstance; + }()); + LifeCycle.ExtensionComponentInstance = ExtensionComponentInstance; + var ExtensionLifeCycleManager = (function () { + function ExtensionLifeCycleManager() { + } + ExtensionLifeCycleManager.prototype.launchExtensionComponent = function (extId, componentType, componentId, hostProps, optionalProps) { + if (OSF.ExtensionLifeCycle && OSF.ExtensionLifeCycle.launchExtensionComponent) { + var instanceToken = OSF.OUtil.Guid.generateNewGuid(); + if (optionalProps == null) { + optionalProps = new ExtensionLaunchProperties({}, {}); + } + optionalProps.OptionalProperties.InstanceToken = instanceToken; + var params = new LaunchParameters(extId, componentType, componentId, hostProps, optionalProps); + OSF.ExtensionLifeCycle.launchExtensionComponent(params); + var instance = new ExtensionComponentInstance(extId, componentType, componentId, instanceToken, optionalProps); + instance.SetLaunchProperties(optionalProps); + return instance; + } + }; + return ExtensionLifeCycleManager; + }()); + LifeCycle.ExtensionLifeCycleManager = ExtensionLifeCycleManager; + })(LifeCycle = OfficeExt.LifeCycle || (OfficeExt.LifeCycle = {})); +})(OfficeExt || (OfficeExt = {})); +Microsoft.Office.WebExtension.FileType = { + Text: "text", + Compressed: "compressed", + Pdf: "pdf" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FileProperties: "FileProperties", + FileSliceProperties: "FileSliceProperties" +}); +OSF.DDA.FileProperties = { + Handle: "FileHandle", + FileSize: "FileSize", + SliceSize: Microsoft.Office.WebExtension.Parameters.SliceSize +}; +OSF.DDA.File = function OSF_DDA_File(handle, fileSize, sliceSize) { + OSF.OUtil.defineEnumerableProperties(this, { + "size": { + value: fileSize + }, + "sliceCount": { + value: Math.ceil(fileSize / sliceSize) + } + }); + var privateState = {}; + privateState[OSF.DDA.FileProperties.Handle] = handle; + privateState[OSF.DDA.FileProperties.SliceSize] = sliceSize; + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDocumentCopyChunkAsync, + am.ReleaseDocumentCopyAsync + ], privateState); +}; +OSF.DDA.FileSliceOffset = "fileSliceoffset"; +OSF.DDA.AsyncMethodNames.addNames({ + GetDocumentCopyAsync: "getFileAsync", + GetDocumentCopyChunkAsync: "getSliceAsync", + ReleaseDocumentCopyAsync: "closeAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.FileType, + "enum": Microsoft.Office.WebExtension.FileType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SliceSize, + value: { + "types": ["number"], + "defaultValue": 4 * 1024 * 1024 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var sliceSize = callArgs[Microsoft.Office.WebExtension.Parameters.SliceSize]; + if (sliceSize <= 0 || sliceSize > (4 * 1024 * 1024)) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize; + } + return callArgs; + }, + onSucceeded: function (fileDescriptor, caller, callArgs) { + return new OSF.DDA.File(fileDescriptor[OSF.DDA.FileProperties.Handle], fileDescriptor[OSF.DDA.FileProperties.FileSize], callArgs[Microsoft.Office.WebExtension.Parameters.SliceSize]); + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.SliceIndex, + "types": ["number"] + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.FileProperties.Handle, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.Handle]; } + }, + { + name: OSF.DDA.FileProperties.SliceSize, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.SliceSize]; } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var index = callArgs[Microsoft.Office.WebExtension.Parameters.SliceIndex]; + if (index < 0 || index >= caller.sliceCount) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange; + } + callArgs[OSF.DDA.FileSliceOffset] = parseInt((index * stateInfo[OSF.DDA.FileProperties.SliceSize]).toString()); + return callArgs; + }, + onSucceeded: function (sliceDescriptor, caller, callArgs) { + var slice = {}; + OSF.OUtil.defineEnumerableProperties(slice, { + "data": { + value: sliceDescriptor[Microsoft.Office.WebExtension.Parameters.Data] + }, + "index": { + value: callArgs[Microsoft.Office.WebExtension.Parameters.SliceIndex] + }, + "size": { + value: sliceDescriptor[OSF.DDA.FileProperties.SliceSize] + } + }); + return slice; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync, + privateStateCallbacks: [ + { + name: OSF.DDA.FileProperties.Handle, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.Handle]; } + } + ] +}); +OSF.OUtil.setNamespace("Marshaling", OSF.DDA); +OSF.OUtil.setNamespace("File", OSF.DDA.Marshaling); +var OSF_DDA_Marshaling_File_FilePropertiesKeys; +(function (OSF_DDA_Marshaling_File_FilePropertiesKeys) { + OSF_DDA_Marshaling_File_FilePropertiesKeys[OSF_DDA_Marshaling_File_FilePropertiesKeys["Handle"] = 0] = "Handle"; + OSF_DDA_Marshaling_File_FilePropertiesKeys[OSF_DDA_Marshaling_File_FilePropertiesKeys["FileSize"] = 1] = "FileSize"; +})(OSF_DDA_Marshaling_File_FilePropertiesKeys || (OSF_DDA_Marshaling_File_FilePropertiesKeys = {})); +; +OSF.DDA.Marshaling.File.FilePropertiesKeys = OSF_DDA_Marshaling_File_FilePropertiesKeys; +var OSF_DDA_Marshaling_File_SlicePropertiesKeys; +(function (OSF_DDA_Marshaling_File_SlicePropertiesKeys) { + OSF_DDA_Marshaling_File_SlicePropertiesKeys[OSF_DDA_Marshaling_File_SlicePropertiesKeys["Data"] = 0] = "Data"; + OSF_DDA_Marshaling_File_SlicePropertiesKeys[OSF_DDA_Marshaling_File_SlicePropertiesKeys["SliceSize"] = 1] = "SliceSize"; +})(OSF_DDA_Marshaling_File_SlicePropertiesKeys || (OSF_DDA_Marshaling_File_SlicePropertiesKeys = {})); +; +OSF.DDA.Marshaling.File.SlicePropertiesKeys = OSF_DDA_Marshaling_File_SlicePropertiesKeys; +var OSF_DDA_Marshaling_File_FileType; +(function (OSF_DDA_Marshaling_File_FileType) { + OSF_DDA_Marshaling_File_FileType[OSF_DDA_Marshaling_File_FileType["Text"] = 0] = "Text"; + OSF_DDA_Marshaling_File_FileType[OSF_DDA_Marshaling_File_FileType["Compressed"] = 1] = "Compressed"; + OSF_DDA_Marshaling_File_FileType[OSF_DDA_Marshaling_File_FileType["Pdf"] = 2] = "Pdf"; +})(OSF_DDA_Marshaling_File_FileType || (OSF_DDA_Marshaling_File_FileType = {})); +; +OSF.DDA.Marshaling.File.FileType = OSF_DDA_Marshaling_File_FileType; +var OSF_DDA_Marshaling_File_ParameterKeys; +(function (OSF_DDA_Marshaling_File_ParameterKeys) { + OSF_DDA_Marshaling_File_ParameterKeys[OSF_DDA_Marshaling_File_ParameterKeys["FileType"] = 0] = "FileType"; + OSF_DDA_Marshaling_File_ParameterKeys[OSF_DDA_Marshaling_File_ParameterKeys["SliceSize"] = 1] = "SliceSize"; + OSF_DDA_Marshaling_File_ParameterKeys[OSF_DDA_Marshaling_File_ParameterKeys["Handle"] = 2] = "Handle"; + OSF_DDA_Marshaling_File_ParameterKeys[OSF_DDA_Marshaling_File_ParameterKeys["SliceIndex"] = 3] = "SliceIndex"; +})(OSF_DDA_Marshaling_File_ParameterKeys || (OSF_DDA_Marshaling_File_ParameterKeys = {})); +; +OSF.DDA.Marshaling.File.ParameterKeys = OSF_DDA_Marshaling_File_ParameterKeys; +OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties); +OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FileProperties, + fromHost: [ + { name: OSF.DDA.FileProperties.Handle, value: OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle }, + { name: OSF.DDA.FileProperties.FileSize, value: OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FileSliceProperties, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data }, + { name: OSF.DDA.FileProperties.SliceSize, value: OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.FileType, + toHost: [ + { name: Microsoft.Office.WebExtension.FileType.Text, value: OSF.DDA.Marshaling.File.FileType.Text }, + { name: Microsoft.Office.WebExtension.FileType.Compressed, value: OSF.DDA.Marshaling.File.FileType.Compressed }, + { name: Microsoft.Office.WebExtension.FileType.Pdf, value: OSF.DDA.Marshaling.File.FileType.Pdf } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.FileType, value: OSF.DDA.Marshaling.File.ParameterKeys.FileType }, + { name: Microsoft.Office.WebExtension.Parameters.SliceSize, value: OSF.DDA.Marshaling.File.ParameterKeys.SliceSize } + ], + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FileProperties, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod, + toHost: [ + { name: OSF.DDA.FileProperties.Handle, value: OSF.DDA.Marshaling.File.ParameterKeys.Handle }, + { name: Microsoft.Office.WebExtension.Parameters.SliceIndex, value: OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex } + ], + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FileSliceProperties, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod, + toHost: [{ name: OSF.DDA.FileProperties.Handle, value: OSF.DDA.Marshaling.File.ParameterKeys.Handle }] +}); +Microsoft.Office.WebExtension.TableData = function Microsoft_Office_WebExtension_TableData(rows, headers) { + function fixData(data) { + if (data == null || data == undefined) { + return null; + } + try { + for (var dim = OSF.DDA.DataCoercion.findArrayDimensionality(data, 2); dim < 2; dim++) { + data = [data]; + } + return data; + } + catch (ex) { + } + } + ; + OSF.OUtil.defineEnumerableProperties(this, { + "headers": { + get: function () { return headers; }, + set: function (value) { + headers = fixData(value); + } + }, + "rows": { + get: function () { return rows; }, + set: function (value) { + rows = (value == null || (OSF.OUtil.isArray(value) && (value.length == 0))) ? + [] : + fixData(value); + } + } + }); + this.headers = headers; + this.rows = rows; +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureTableData = function OSF_DDA_OMFactory$manufactureTableData(tableDataProperties) { + return new Microsoft.Office.WebExtension.TableData(tableDataProperties[OSF.DDA.TableDataProperties.TableRows], tableDataProperties[OSF.DDA.TableDataProperties.TableHeaders]); +}; +Microsoft.Office.WebExtension.CoercionType = { + Text: "text", + Matrix: "matrix", + Table: "table" +}; +OSF.DDA.DataCoercion = (function OSF_DDA_DataCoercion() { + return { + findArrayDimensionality: function OSF_DDA_DataCoercion$findArrayDimensionality(obj) { + if (OSF.OUtil.isArray(obj)) { + var dim = 0; + for (var index = 0; index < obj.length; index++) { + dim = Math.max(dim, OSF.DDA.DataCoercion.findArrayDimensionality(obj[index])); + } + return dim + 1; + } + else { + return 0; + } + }, + getCoercionDefaultForBinding: function OSF_DDA_DataCoercion$getCoercionDefaultForBinding(bindingType) { + switch (bindingType) { + case Microsoft.Office.WebExtension.BindingType.Matrix: return Microsoft.Office.WebExtension.CoercionType.Matrix; + case Microsoft.Office.WebExtension.BindingType.Table: return Microsoft.Office.WebExtension.CoercionType.Table; + case Microsoft.Office.WebExtension.BindingType.Text: + default: + return Microsoft.Office.WebExtension.CoercionType.Text; + } + }, + getBindingDefaultForCoercion: function OSF_DDA_DataCoercion$getBindingDefaultForCoercion(coercionType) { + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Matrix: return Microsoft.Office.WebExtension.BindingType.Matrix; + case Microsoft.Office.WebExtension.CoercionType.Table: return Microsoft.Office.WebExtension.BindingType.Table; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + return Microsoft.Office.WebExtension.BindingType.Text; + } + }, + determineCoercionType: function OSF_DDA_DataCoercion$determineCoercionType(data) { + if (data == null || data == undefined) + return null; + var sourceType = null; + var runtimeType = typeof data; + if (data.rows !== undefined) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Table; + } + else if (OSF.OUtil.isArray(data)) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Matrix; + } + else if (runtimeType == "string" || runtimeType == "number" || runtimeType == "boolean" || OSF.OUtil.isDate(data)) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Text; + } + else { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject; + } + return sourceType; + }, + coerceData: function OSF_DDA_DataCoercion$coerceData(data, destinationType, sourceType) { + sourceType = sourceType || OSF.DDA.DataCoercion.determineCoercionType(data); + if (sourceType && sourceType != destinationType) { + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin); + data = OSF.DDA.DataCoercion._coerceDataFromTable(destinationType, OSF.DDA.DataCoercion._coerceDataToTable(data, sourceType)); + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd); + } + return data; + }, + _matrixToText: function OSF_DDA_DataCoercion$_matrixToText(matrix) { + if (matrix.length == 1 && matrix[0].length == 1) + return "" + matrix[0][0]; + var val = ""; + for (var i = 0; i < matrix.length; i++) { + val += matrix[i].join("\t") + "\n"; + } + return val.substring(0, val.length - 1); + }, + _textToMatrix: function OSF_DDA_DataCoercion$_textToMatrix(text) { + var ret = text.split("\n"); + for (var i = 0; i < ret.length; i++) + ret[i] = ret[i].split("\t"); + return ret; + }, + _tableToText: function OSF_DDA_DataCoercion$_tableToText(table) { + var headers = ""; + if (table.headers != null) { + headers = OSF.DDA.DataCoercion._matrixToText([table.headers]) + "\n"; + } + var rows = OSF.DDA.DataCoercion._matrixToText(table.rows); + if (rows == "") { + headers = headers.substring(0, headers.length - 1); + } + return headers + rows; + }, + _tableToMatrix: function OSF_DDA_DataCoercion$_tableToMatrix(table) { + var matrix = table.rows; + if (table.headers != null) { + matrix.unshift(table.headers); + } + return matrix; + }, + _coerceDataFromTable: function OSF_DDA_DataCoercion$_coerceDataFromTable(coercionType, table) { + var value; + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value = table; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value = OSF.DDA.DataCoercion._tableToMatrix(table); + break; + case Microsoft.Office.WebExtension.CoercionType.SlideRange: + value = null; + if (OSF.DDA.OMFactory.manufactureSlideRange) { + value = OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(table)); + } + if (value == null) { + value = OSF.DDA.DataCoercion._tableToText(table); + } + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value = OSF.DDA.DataCoercion._tableToText(table); + break; + } + return value; + }, + _coerceDataToTable: function OSF_DDA_DataCoercion$_coerceDataToTable(data, sourceType) { + if (sourceType == undefined) { + sourceType = OSF.DDA.DataCoercion.determineCoercionType(data); + } + var value; + switch (sourceType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value = data; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value = new Microsoft.Office.WebExtension.TableData(data); + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value = new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(data)); + break; + } + return value; + } + }; +})(); +(function (OfficeExt) { + var Messaging; + (function (Messaging) { + var ExtensionMessage = (function () { + function ExtensionMessage(id, payload, targetId) { + this.id = id; + this.payload = payload; + this.targetId = targetId; + } + return ExtensionMessage; + }()); + Messaging.ExtensionMessage = ExtensionMessage; + var ExtensionCommunicationManager = (function () { + function ExtensionCommunicationManager() { + this.onMessage = null; + } + ExtensionCommunicationManager.prototype.sendMessage = function (message) { + if (OSF.Messaging && OSF.Messaging.sendMessage) { + OSF.Messaging.sendMessage(message); + } + }; + return ExtensionCommunicationManager; + }()); + Messaging.ExtensionCommunicationManager = ExtensionCommunicationManager; + })(Messaging = OfficeExt.Messaging || (OfficeExt.Messaging = {})); +})(OfficeExt || (OfficeExt = {})); +(function (OfficeExt) { + var UI; + (function (UI) { + var RibbonGallery = (function () { + function RibbonGallery() { + } + RibbonGallery.prototype.refreshRibbon = function (jsParam) { + if (OSF.RibbonGallery && OSF.RibbonGallery.refreshRibbon) { + OSF.RibbonGallery.refreshRibbon(jsParam); + } + }; + return RibbonGallery; + }()); + UI.RibbonGallery = RibbonGallery; + })(UI = OfficeExt.UI || (OfficeExt.UI = {})); +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.AsyncMethodNames.addNames({ + GetSelectedDataAsync: "getSelectedDataAsync", + SetSelectedDataAsync: "setSelectedDataAsync" +}); +(function () { + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] != undefined || data[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) { + data = OSF.DDA.OMFactory.manufactureTableData(data); + } + data = OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data == undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CoercionType, + "enum": Microsoft.Office.WebExtension.CoercionType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + } + ], + privateStateCallbacks: [], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageLeft, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageTop, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.WAC.UniqueArguments.GetData, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: "BindingId" }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: "CoerceType" }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: "ValueFormat" }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: "FilterType" }, + { name: Microsoft.Office.WebExtension.Parameters.Rows, value: "Rows" }, + { name: Microsoft.Office.WebExtension.Parameters.Columns, value: "Columns" }, + { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: "StartRow" }, + { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: "StartCol" }, + { name: Microsoft.Office.WebExtension.Parameters.RowCount, value: "RowCount" }, + { name: Microsoft.Office.WebExtension.Parameters.ColumnCount, value: "ColCount" } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.WAC.UniqueArguments.SetData, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: "BindingId" }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: "CoerceType" }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.Data }, + { name: Microsoft.Office.WebExtension.Parameters.Rows, value: "Rows" }, + { name: Microsoft.Office.WebExtension.Parameters.Columns, value: "Columns" }, + { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: "StartRow" }, + { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: "StartCol" }, + { name: Microsoft.Office.WebExtension.Parameters.ImageLeft, value: "ImageLeft" }, + { name: Microsoft.Office.WebExtension.Parameters.ImageTop, value: "ImageTop" }, + { name: Microsoft.Office.WebExtension.Parameters.ImageWidth, value: "ImageWidth" }, + { name: Microsoft.Office.WebExtension.Parameters.ImageHeight, value: "ImageHeight" } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetSelectedDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.Data } + ], + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.GetData, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.SetData, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SettingsManager = { + SerializedSettings: "serializedSettings", + RefreshingSettings: "refreshingSettings", + DateJSONPrefix: "Date(", + DataJSONSuffix: ")", + serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { + return OSF.OUtil.serializeSettings(settingsCollection); + }, + deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { + return OSF.OUtil.deserializeSettings(serializedSettings); + } +}; +OSF.DDA.Settings = function OSF_DDA_Settings(settings) { + settings = settings || {}; + var cacheSessionSettings = function (settings) { + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var serializedSettings = OSF.DDA.SettingsManager.serializeSettings(settings); + var storageSettings = JSON ? JSON.stringify(serializedSettings) : Sys.Serialization.JavaScriptSerializer.serialize(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + }; + OSF.OUtil.defineEnumerableProperties(this, { + "get": { + value: function OSF_DDA_Settings$get(name) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + var setting = settings[name]; + return typeof (setting) === 'undefined' ? null : setting; + } + }, + "set": { + value: function OSF_DDA_Settings$set(name, value) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false }, + { name: "value", mayBeNull: true } + ]); + if (e) + throw e; + settings[name] = value; + cacheSessionSettings(settings); + } + }, + "remove": { + value: function OSF_DDA_Settings$remove(name) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete settings[name]; + cacheSessionSettings(settings); + } + } + }); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.SaveAsync], settings); +}; +OSF.DDA.RefreshableSettings = function OSF_DDA_RefreshableSettings(settings) { + OSF.DDA.RefreshableSettings.uber.constructor.call(this, settings); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.RefreshAsync], settings); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged])); +}; +OSF.OUtil.extend(OSF.DDA.RefreshableSettings, OSF.DDA.Settings); +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } + } +}; +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() { + var events = []; + for (var eventName in this._eventHandlers) + events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); + return events; + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) { + for (var eventName in this._eventHandlers) { + if (event == eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event == eventName) + return true; + } + return false; + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) + return true; + } + } + return false; + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._eventHandlers[eventType]; + if (handlers && !this.hasEventHandler(eventType, handler)) { + handlers.push(handler); + return true; + } + else { + return false; + } + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true; + } + return false; + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType, handler); + if (isFirstHandler && succeed) { + this.fireQueuedEvent(eventType); + } + return succeed; + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var index = 0; index < handlers.length; index++) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + return true; + } + } + } + return false; + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { + if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { + this._eventHandlers[eventType] = []; + return true; + } + return false; + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) { + this._objectEventHandlers[eventType][objectId] = []; + return true; + } + return false; + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } + return true; + } + else { + return false; + } + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if (_handlers != null) { + for (var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length == 0) { + queuedEvents.push(eventArgs); + } + else { + this.fireEvent(eventArgs); + } + return true; + } + else { + return false; + } + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length > 0) { + var eventHandler = eventHandlers[0]; + while (queuedEvents.length > 0) { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs); + } + return true; + } + } + return false; + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var queuedEvents = this._queuedEventsArgs[eventType]; + if (queuedEvents) { + this._queuedEventsArgs[eventType] = []; + } + } + } +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { + var args; + switch (eventType) { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties, target.document), eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties, target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" && OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + OSF.DDA.convertOlkAppointmentTimeToDateFormat(args); + } + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecurrenceChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecurrenceChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AttachmentsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAttachmentsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.InfobarClicked: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkInfobarClickedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSelectedItemsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSensitivityLabelChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + return args; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + "types": ["function", "object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + SettingsChanged: "settingsChanged" +}); +OSF.DDA.SettingsChangedEventArgs = function OSF_DDA_SettingsChangedEventArgs(settingsInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.SettingsChanged + }, + "settings": { + value: settingsInstance + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ + RefreshAsync: "refreshAsync", + SaveAsync: "saveAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RefreshAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.RefreshingSettings, + value: function getRefreshingSettings(settingsInstance, settingsCollection) { + return settingsCollection; + } + } + ], + onSucceeded: function deserializeSettings(serializedSettingsDescriptor, refreshingSettings, refreshingSettingsArgs) { + var serializedSettings = serializedSettingsDescriptor[OSF.DDA.SettingsManager.SerializedSettings]; + var newSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + var oldSettings = refreshingSettingsArgs[OSF.DDA.SettingsManager.RefreshingSettings]; + for (var setting in oldSettings) { + refreshingSettings.remove(setting); + } + for (var setting in newSettings) { + refreshingSettings.set(setting, newSettings[setting]); + } + return refreshingSettings; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SaveAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, + value: { + "types": ["boolean"], + "defaultValue": true + } + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.SerializedSettings, + value: function serializeSettings(settingsInstance, settingsCollection) { + return OSF.DDA.SettingsManager.serializeSettings(settingsCollection); + } + } + ] +}); +OSF.DDA.WAC.SettingsTranslator = (function () { + var keyIndex = 0; + var valueIndex = 1; + return { + read: function OSF_DDA_WAC_SettingsTranslator$read(payload) { + var isExcelApp = OSF.DDA.ExcelDocument && Microsoft.Office.WebExtension.context.document + && (Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument); + var serializedSettings = {}; + var settingsPayload = payload.Settings; + for (var index in settingsPayload) { + var setting = settingsPayload[index]; + if (isExcelApp) { + serializedSettings[setting.Name] = setting.Value; + } + else { + serializedSettings[setting[keyIndex]] = setting[valueIndex]; + } + } + return serializedSettings; + }, + write: function OSF_DDA_WAC_SettingsTranslator$write(serializedSettings) { + var settingsPayload = []; + for (var key in serializedSettings) { + var setting = []; + setting[keyIndex] = key; + setting[valueIndex] = serializedSettings[key]; + settingsPayload.push(setting); + } + return settingsPayload; + } + }; +})(); +OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(OSF.DDA.SettingsManager.SerializedSettings, { + toHost: OSF.DDA.WAC.SettingsTranslator.write, + fromHost: OSF.DDA.WAC.SettingsTranslator.read +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.WAC.UniqueArguments.SettingsRequest, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, value: "OverwriteIfStale" }, + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.WAC.UniqueArguments.Properties } + ], + invertible: true +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidLoadSettingsMethod, + fromHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.WAC.UniqueArguments.Properties } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSaveSettingsMethod, + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.SettingsRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidSettingsChangedEvent }); +Microsoft.Office.WebExtension.BindingType = { + Table: "table", + Text: "text", + Matrix: "matrix" +}; +OSF.DDA.BindingProperties = { + Id: "BindingId", + Type: Microsoft.Office.WebExtension.Parameters.BindingType +}; +OSF.OUtil.augmentList(OSF.DDA.ListDescriptors, { BindingList: "BindingList" }); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + Subset: "subset", + BindingProperties: "BindingProperties" +}); +OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList, OSF.DDA.PropertyDescriptors.BindingProperties); +OSF.DDA.BindingPromise = function OSF_DDA_BindingPromise(bindingId, errorCallback) { + this._id = bindingId; + OSF.OUtil.defineEnumerableProperty(this, "onFail", { + get: function () { + return errorCallback; + }, + set: function (onError) { + var t = typeof onError; + if (t != "undefined" && t != "function") { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, t); + } + errorCallback = onError; + } + }); +}; +OSF.DDA.BindingPromise.prototype = { + _fetch: function OSF_DDA_BindingPromise$_fetch(onComplete) { + if (this.binding) { + if (onComplete) + onComplete(this.binding); + } + else { + if (!this._binding) { + var me = this; + Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(this._id, function (asyncResult) { + if (asyncResult.status == Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded) { + OSF.OUtil.defineEnumerableProperty(me, "binding", { + value: asyncResult.value + }); + if (onComplete) + onComplete(me.binding); + } + else { + if (me.onFail) + me.onFail(asyncResult); + } + }); + } + } + return this; + }, + getDataAsync: function OSF_DDA_BindingPromise$getDataAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.getDataAsync.apply(binding, args); }); + return this; + }, + setDataAsync: function OSF_DDA_BindingPromise$setDataAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setDataAsync.apply(binding, args); }); + return this; + }, + addHandlerAsync: function OSF_DDA_BindingPromise$addHandlerAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.addHandlerAsync.apply(binding, args); }); + return this; + }, + removeHandlerAsync: function OSF_DDA_BindingPromise$removeHandlerAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.removeHandlerAsync.apply(binding, args); }); + return this; + } +}; +OSF.DDA.BindingFacade = function OSF_DDA_BindingFacade(docInstance) { + this._eventDispatches = []; + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: docInstance + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddFromSelectionAsync, + am.AddFromNamedItemAsync, + am.GetAllAsync, + am.GetByIdAsync, + am.ReleaseByIdAsync + ]); +}; +OSF.DDA.UnknownBinding = function OSF_DDA_UknonwnBinding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { value: docInstance }, + "id": { value: id } + }); +}; +OSF.DDA.Binding = function OSF_DDA_Binding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { + value: docInstance + }, + "id": { + value: id + } + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDataAsync, + am.SetDataAsync + ]); + var et = Microsoft.Office.WebExtension.EventType; + var bindingEventDispatches = docInstance.bindings._eventDispatches; + if (!bindingEventDispatches[id]) { + bindingEventDispatches[id] = new OSF.EventDispatch([ + et.BindingSelectionChanged, + et.BindingDataChanged + ]); + } + var eventDispatch = bindingEventDispatches[id]; + OSF.DDA.DispIdHost.addEventSupport(this, eventDispatch); +}; +OSF.DDA.generateBindingId = function OSF_DDA$GenerateBindingId() { + return "UnnamedBinding_" + OSF.OUtil.getUniqueId() + "_" + new Date().getTime(); +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureBinding = function OSF_DDA_OMFactory$manufactureBinding(bindingProperties, containingDocument) { + var id = bindingProperties[OSF.DDA.BindingProperties.Id]; + var rows = bindingProperties[OSF.DDA.BindingProperties.RowCount]; + var cols = bindingProperties[OSF.DDA.BindingProperties.ColumnCount]; + var hasHeaders = bindingProperties[OSF.DDA.BindingProperties.HasHeaders]; + var binding; + switch (bindingProperties[OSF.DDA.BindingProperties.Type]) { + case Microsoft.Office.WebExtension.BindingType.Text: + binding = new OSF.DDA.TextBinding(id, containingDocument); + break; + case Microsoft.Office.WebExtension.BindingType.Matrix: + binding = new OSF.DDA.MatrixBinding(id, containingDocument, rows, cols); + break; + case Microsoft.Office.WebExtension.BindingType.Table: + var isExcelApp = function () { + return (OSF.DDA.ExcelDocument) + && (Microsoft.Office.WebExtension.context.document) + && (Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument); + }; + var tableBindingObject; + if (isExcelApp() && OSF.DDA.ExcelTableBinding) { + tableBindingObject = OSF.DDA.ExcelTableBinding; + } + else { + tableBindingObject = OSF.DDA.TableBinding; + } + binding = new tableBindingObject(id, containingDocument, rows, cols, hasHeaders); + break; + default: + binding = new OSF.DDA.UnknownBinding(id, containingDocument); + } + return binding; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddFromSelectionAsync: "addFromSelectionAsync", + AddFromNamedItemAsync: "addFromNamedItemAsync", + GetAllAsync: "getAllAsync", + GetByIdAsync: "getByIdAsync", + ReleaseByIdAsync: "releaseByIdAsync", + GetDataAsync: "getDataAsync", + SetDataAsync: "setDataAsync" +}); +(function () { + function processBinding(bindingDescriptor) { + return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); + } + function getObjectId(obj) { return obj.id; } + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] != undefined || data[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) { + data = OSF.DDA.OMFactory.manufactureTableData(data); + } + data = OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data == undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromSelectionAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.ItemName, + "types": ["string"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, + value: function () { return true; } + } + ], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAllAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response) { return OSF.OUtil.mapList(response[OSF.DDA.ListDescriptors.BindingList], processBinding); } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response, caller, callArgs) { + var id = callArgs[Microsoft.Office.WebExtension.Parameters.Id]; + delete caller._eventDispatches[id]; + } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDataAsync, + requiredArguments: [], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs, binding) { return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(binding.type); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RowCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ColumnCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount] == 0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.RowCount]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] || + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] || + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { TableDataProperties: "TableDataProperties" }); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.TableDataProperties = { + TableRows: "TableRows", + TableHeaders: "TableHeaders" +}; +OSF.DDA.TableBinding = function OSF_DDA_TableBinding(id, docInstance, rows, cols, hasHeaders) { + OSF.DDA.TableBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Table + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + }, + "hasHeaders": { + value: hasHeaders ? hasHeaders : false + } + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddRowsAsync, + am.AddColumnsAsync, + am.DeleteAllDataValuesAsync + ]); +}; +OSF.OUtil.extend(OSF.DDA.TableBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ + AddRowsAsync: "addRowsAsync", + AddColumnsAsync: "addColumnsAsync", + DeleteAllDataValuesAsync: "deleteAllDataValuesAsync" +}); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddRowsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddColumnsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.BindingProperties); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.WAC.UniqueArguments.BindingRequest, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ItemName, value: "ItemName" }, + { name: Microsoft.Office.WebExtension.Parameters.Id, value: "BindingId" }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: "BindingType" }, + { name: Microsoft.Office.WebExtension.Parameters.PromptText, value: "PromptText" }, + { name: Microsoft.Office.WebExtension.Parameters.Columns, value: "Columns" }, + { name: Microsoft.Office.WebExtension.Parameters.SampleData, value: "SampleData" }, + { name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, value: "FailOnCollision" } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.BindingType, + toHost: [ + { name: Microsoft.Office.WebExtension.BindingType.Text, value: 2 }, + { name: Microsoft.Office.WebExtension.BindingType.Matrix, value: 3 }, + { name: Microsoft.Office.WebExtension.BindingType.Table, value: 1 } + ], + invertible: true +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.BindingProperties, + fromHost: [ + { name: OSF.DDA.BindingProperties.Id, value: "Name" }, + { name: OSF.DDA.BindingProperties.Type, value: "BindingType" }, + { name: OSF.DDA.BindingProperties.RowCount, value: "RowCount" }, + { name: OSF.DDA.BindingProperties.ColumnCount, value: "ColCount" }, + { name: OSF.DDA.BindingProperties.HasHeaders, value: "HasHeaders" } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.WAC.UniqueArguments.SingleBindingResponse, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: 0 } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod, + fromHost: [ + { name: OSF.DDA.WAC.UniqueArguments.SingleBindingResponse, value: OSF.DDA.WAC.UniqueArguments.BindingResponse } + ], + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.BindingRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod, + fromHost: [ + { name: OSF.DDA.WAC.UniqueArguments.SingleBindingResponse, value: OSF.DDA.WAC.UniqueArguments.BindingResponse } + ], + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.BindingRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseBindingMethod, + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.BindingRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingMethod, + fromHost: [ + { name: OSF.DDA.WAC.UniqueArguments.SingleBindingResponse, value: OSF.DDA.WAC.UniqueArguments.BindingResponse } + ], + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.BindingRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAllBindingsMethod, + fromHost: [ + { name: OSF.DDA.ListDescriptors.BindingList, value: OSF.DDA.WAC.UniqueArguments.BindingResponse } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.Data } + ], + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.GetData, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.SetData, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddRowsMethod, + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.AddRowsColumns, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddColumnsMethod, + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.AddRowsColumns, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearAllRowsMethod, + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.BindingRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.WAC.UniqueArguments.AddRowsColumns, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: "BindingId" }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.Data } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.Subset, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: "StartRow" }, + { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: "StartCol" }, + { name: Microsoft.Office.WebExtension.Parameters.RowCount, value: "RowCount" }, + { name: Microsoft.Office.WebExtension.Parameters.ColumnCount, value: "ColCount" } + ] +}); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.MatrixBinding = function OSF_DDA_MatrixBinding(id, docInstance, rows, cols) { + OSF.DDA.MatrixBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Matrix + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + } + }); +}; +OSF.OUtil.extend(OSF.DDA.MatrixBinding, OSF.DDA.Binding); +OSF.DDA.TextBinding = function OSF_DDA_TextBinding(id, docInstance) { + OSF.DDA.TextBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperty(this, "type", { + value: Microsoft.Office.WebExtension.BindingType.Text + }); +}; +OSF.OUtil.extend(OSF.DDA.TextBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ AddFromPromptAsync: "addFromPromptAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromPromptAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptText, + value: { + "types": ["string"], + "calculate": function () { return Strings.OfficeOM.L_AddBindingFromPromptDefaultText; } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.SampleData, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: function (bindingDescriptor) { return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); } +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod, + fromHost: [ + { name: OSF.DDA.WAC.UniqueArguments.SingleBindingResponse, value: OSF.DDA.WAC.UniqueArguments.BindingResponse } + ], + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.BindingRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DocumentSelectionChanged: "documentSelectionChanged" }); +OSF.DDA.DocumentSelectionChangedEventArgs = function OSF_DDA_DocumentSelectionChangedEventArgs(docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged + }, + "document": { + value: docInstance + } + }); +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs = function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; +OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + BindingSelectionChanged: "bindingSelectionChanged", + BindingDataChanged: "bindingDataChanged" +}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { BindingSelectionChangedEvent: "BindingSelectionChangedEvent" }); +OSF.DDA.BindingSelectionChangedEventArgs = function OSF_DDA_BindingSelectionChangedEventArgs(bindingInstance, subset) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingSelectionChanged + }, + "binding": { + value: bindingInstance + } + }); + for (var prop in subset) { + OSF.OUtil.defineEnumerableProperty(this, prop, { + value: subset[prop] + }); + } +}; +OSF.DDA.BindingDataChangedEventArgs = function OSF_DDA_BindingDataChangedEventArgs(bindingInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingDataChanged + }, + "binding": { + value: bindingInstance + } + }); +}; +OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.BindingSelectionChangedEvent); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.WAC.UniqueArguments.BindingEventSource }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: OSF.DDA.PropertyDescriptors.Subset } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingDataChangedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.WAC.UniqueArguments.BindingEventSource } + ] +}); +OSF.DDA.FilePropertiesDescriptor = { + Url: "Url" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FilePropertiesDescriptor: "FilePropertiesDescriptor" +}); +Microsoft.Office.WebExtension.FileProperties = function Microsoft_Office_WebExtension_FileProperties(filePropertiesDescriptor) { + OSF.OUtil.defineEnumerableProperties(this, { + "url": { + value: filePropertiesDescriptor[OSF.DDA.FilePropertiesDescriptor.Url] + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ GetFilePropertiesAsync: "getFilePropertiesAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: 0 } + ], + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (filePropertiesDescriptor, caller, callArgs) { + return new Microsoft.Office.WebExtension.FileProperties(filePropertiesDescriptor); + } +}); +OSF.OUtil.setNamespace("Marshaling", OSF.DDA); +var OSF_DDA_Marshaling_FilePropertiesKeys; +(function (OSF_DDA_Marshaling_FilePropertiesKeys) { + OSF_DDA_Marshaling_FilePropertiesKeys[OSF_DDA_Marshaling_FilePropertiesKeys["Properties"] = 0] = "Properties"; + OSF_DDA_Marshaling_FilePropertiesKeys[OSF_DDA_Marshaling_FilePropertiesKeys["Url"] = 1] = "Url"; +})(OSF_DDA_Marshaling_FilePropertiesKeys || (OSF_DDA_Marshaling_FilePropertiesKeys = {})); +; +OSF.DDA.Marshaling.FilePropertiesKeys = OSF_DDA_Marshaling_FilePropertiesKeys; +OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, + fromHost: [ + { name: OSF.DDA.FilePropertiesDescriptor.Url, value: OSF.DDA.Marshaling.FilePropertiesKeys.Url } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: OSF.DDA.Marshaling.FilePropertiesKeys.Properties } + ] +}); +Microsoft.Office.WebExtension.GoToType = { + Binding: "binding", + NamedItem: "namedItem", + Slide: "slide", + Index: "index" +}; +Microsoft.Office.WebExtension.SelectionMode = { + Default: "default", + Selected: "selected", + None: "none" +}; +Microsoft.Office.WebExtension.Index = { + First: "first", + Last: "last", + Next: "next", + Previous: "previous" +}; +OSF.DDA.AsyncMethodNames.addNames({ GoToByIdAsync: "goToByIdAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GoToByIdAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string", "number"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.GoToType, + "enum": Microsoft.Office.WebExtension.GoToType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SelectionMode, + value: { + "enum": Microsoft.Office.WebExtension.SelectionMode, + "defaultValue": Microsoft.Office.WebExtension.SelectionMode.Default + } + } + ] +}); +OSF.OUtil.setNamespace("Marshaling", OSF.DDA); +OSF.DDA.Marshaling.NavigationKeys = { + NavigationRequest: "DdaGoToByIdMethod", + Id: "Id", + GoToType: "GoToType", + SelectionMode: "SelectionMode" +}; +var OSF_DDA_Marshaling_GoToType; +(function (OSF_DDA_Marshaling_GoToType) { + OSF_DDA_Marshaling_GoToType[OSF_DDA_Marshaling_GoToType["Binding"] = 0] = "Binding"; + OSF_DDA_Marshaling_GoToType[OSF_DDA_Marshaling_GoToType["NamedItem"] = 1] = "NamedItem"; + OSF_DDA_Marshaling_GoToType[OSF_DDA_Marshaling_GoToType["Slide"] = 2] = "Slide"; + OSF_DDA_Marshaling_GoToType[OSF_DDA_Marshaling_GoToType["Index"] = 3] = "Index"; +})(OSF_DDA_Marshaling_GoToType || (OSF_DDA_Marshaling_GoToType = {})); +; +OSF.DDA.Marshaling.GoToType = OSF_DDA_Marshaling_GoToType; +var OSF_DDA_Marshaling_SelectionMode; +(function (OSF_DDA_Marshaling_SelectionMode) { + OSF_DDA_Marshaling_SelectionMode[OSF_DDA_Marshaling_SelectionMode["Default"] = 0] = "Default"; + OSF_DDA_Marshaling_SelectionMode[OSF_DDA_Marshaling_SelectionMode["Selected"] = 1] = "Selected"; + OSF_DDA_Marshaling_SelectionMode[OSF_DDA_Marshaling_SelectionMode["None"] = 2] = "None"; +})(OSF_DDA_Marshaling_SelectionMode || (OSF_DDA_Marshaling_SelectionMode = {})); +; +OSF.DDA.Marshaling.SelectionMode = OSF_DDA_Marshaling_SelectionMode; +OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.Marshaling.NavigationKeys.NavigationRequest); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.Marshaling.NavigationKeys.NavigationRequest, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.Marshaling.NavigationKeys.Id }, + { name: Microsoft.Office.WebExtension.Parameters.GoToType, value: OSF.DDA.Marshaling.NavigationKeys.GoToType }, + { name: Microsoft.Office.WebExtension.Parameters.SelectionMode, value: OSF.DDA.Marshaling.NavigationKeys.SelectionMode } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.GoToType, + toHost: [ + { name: Microsoft.Office.WebExtension.GoToType.Binding, value: OSF.DDA.Marshaling.GoToType.Binding }, + { name: Microsoft.Office.WebExtension.GoToType.NamedItem, value: OSF.DDA.Marshaling.GoToType.NamedItem }, + { name: Microsoft.Office.WebExtension.GoToType.Slide, value: OSF.DDA.Marshaling.GoToType.Slide }, + { name: Microsoft.Office.WebExtension.GoToType.Index, value: OSF.DDA.Marshaling.GoToType.Index } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.SelectionMode, + toHost: [ + { name: Microsoft.Office.WebExtension.SelectionMode.Default, value: OSF.DDA.Marshaling.SelectionMode.Default }, + { name: Microsoft.Office.WebExtension.SelectionMode.Selected, value: OSF.DDA.Marshaling.SelectionMode.Selected }, + { name: Microsoft.Office.WebExtension.SelectionMode.None, value: OSF.DDA.Marshaling.SelectionMode.None } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidNavigateToMethod, + toHost: [ + { name: OSF.DDA.Marshaling.NavigationKeys.NavigationRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.ExcelTableBinding = function OSF_DDA_ExcelTableBinding(id, docInstance, rows, cols, hasHeaders) { + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.ClearFormatsAsync, + am.SetTableOptionsAsync, + am.SetFormatsAsync + ]); + OSF.DDA.ExcelTableBinding.uber.constructor.call(this, id, docInstance, rows, cols, hasHeaders); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelTableBinding, OSF.DDA.TableBinding); +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + privateStateCallbacks: [] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var Parameters = Microsoft.Office.WebExtension.Parameters; + if (callArgs[Parameters.StartRow] == 0 && + callArgs[Parameters.StartColumn] == 0 && + OSF.OUtil.isArray(callArgs[Parameters.CellFormat]) && callArgs[Parameters.CellFormat].length === 0 && + OSF.OUtil.isArray(callArgs[Parameters.TableOptions]) && callArgs[Parameters.TableOptions].length === 0) { + delete callArgs[Parameters.StartRow]; + delete callArgs[Parameters.StartColumn]; + delete callArgs[Parameters.CellFormat]; + delete callArgs[Parameters.TableOptions]; + } + if (callArgs[Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + ((callArgs[Parameters.StartRow] && callArgs[Parameters.StartRow] != 0) || + (callArgs[Parameters.StartColumn] && callArgs[Parameters.StartColumn] != 0) || + callArgs[Parameters.CellFormat] || + callArgs[Parameters.TableOptions])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: function (obj) { return obj.id; } + } + ] + }); + OSF.DDA.BindingPromise.prototype.setTableOptionsAsync = function OSF_DDA_BindingPromise$setTableOptionsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setTableOptionsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.setFormatsAsync = function OSF_DDA_BindingPromise$setFormatsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setFormatsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.clearFormatsAsync = function OSF_DDA_BindingPromise$clearFormatsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.clearFormatsAsync.apply(binding, args); }); + return this; + }; +})(); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodNames.addNames({ + ClearFormatsAsync: "clearFormatsAsync", + SetTableOptionsAsync: "setTableOptionsAsync", + SetFormatsAsync: "setFormatsAsync" + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ClearFormatsAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetTableOptionsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.TableOptions, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetFormatsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CellFormat, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.OUtil.setNamespace("Marshaling", OSF.DDA); +OSF.DDA.Marshaling.FormatKeys = { + Id: "BindingId", + CellFormat: "CellFormat", + TableOptions: "TableOptions" +}; +var OSF_DDA_Marshaling_TableOptionProperties; +(function (OSF_DDA_Marshaling_TableOptionProperties) { + OSF_DDA_Marshaling_TableOptionProperties[OSF_DDA_Marshaling_TableOptionProperties["headerRow"] = 0] = "headerRow"; + OSF_DDA_Marshaling_TableOptionProperties[OSF_DDA_Marshaling_TableOptionProperties["bandedRows"] = 1] = "bandedRows"; + OSF_DDA_Marshaling_TableOptionProperties[OSF_DDA_Marshaling_TableOptionProperties["firstColumn"] = 2] = "firstColumn"; + OSF_DDA_Marshaling_TableOptionProperties[OSF_DDA_Marshaling_TableOptionProperties["lastColumn"] = 3] = "lastColumn"; + OSF_DDA_Marshaling_TableOptionProperties[OSF_DDA_Marshaling_TableOptionProperties["bandedColumns"] = 4] = "bandedColumns"; + OSF_DDA_Marshaling_TableOptionProperties[OSF_DDA_Marshaling_TableOptionProperties["filterButton"] = 5] = "filterButton"; + OSF_DDA_Marshaling_TableOptionProperties[OSF_DDA_Marshaling_TableOptionProperties["style"] = 6] = "style"; + OSF_DDA_Marshaling_TableOptionProperties[OSF_DDA_Marshaling_TableOptionProperties["totalRow"] = 7] = "totalRow"; +})(OSF_DDA_Marshaling_TableOptionProperties || (OSF_DDA_Marshaling_TableOptionProperties = {})); +; +OSF.DDA.Marshaling.TableOptionProperties = OSF_DDA_Marshaling_TableOptionProperties; +var OSF_DDA_Marshaling_CellProperties; +(function (OSF_DDA_Marshaling_CellProperties) { + OSF_DDA_Marshaling_CellProperties[OSF_DDA_Marshaling_CellProperties["row"] = 0] = "row"; + OSF_DDA_Marshaling_CellProperties[OSF_DDA_Marshaling_CellProperties["column"] = 1] = "column"; +})(OSF_DDA_Marshaling_CellProperties || (OSF_DDA_Marshaling_CellProperties = {})); +; +OSF.DDA.Marshaling.CellProperties = OSF_DDA_Marshaling_CellProperties; +var OSF_DDA_Marshaling_CellFormatProperties; +(function (OSF_DDA_Marshaling_CellFormatProperties) { + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["alignHorizontal"] = 1] = "alignHorizontal"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["alignVertical"] = 2] = "alignVertical"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["backgroundColor"] = 101] = "backgroundColor"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderStyle"] = 201] = "borderStyle"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderColor"] = 202] = "borderColor"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderTopStyle"] = 203] = "borderTopStyle"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderTopColor"] = 204] = "borderTopColor"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderBottomStyle"] = 205] = "borderBottomStyle"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderBottomColor"] = 206] = "borderBottomColor"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderLeftStyle"] = 207] = "borderLeftStyle"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderLeftColor"] = 208] = "borderLeftColor"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderRightStyle"] = 209] = "borderRightStyle"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderRightColor"] = 210] = "borderRightColor"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderOutlineStyle"] = 211] = "borderOutlineStyle"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderOutlineColor"] = 212] = "borderOutlineColor"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderInlineStyle"] = 213] = "borderInlineStyle"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["borderInlineColor"] = 214] = "borderInlineColor"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["fontFamily"] = 301] = "fontFamily"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["fontStyle"] = 302] = "fontStyle"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["fontSize"] = 303] = "fontSize"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["fontUnderlineStyle"] = 304] = "fontUnderlineStyle"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["fontColor"] = 305] = "fontColor"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["fontDirection"] = 306] = "fontDirection"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["fontStrikethrough"] = 307] = "fontStrikethrough"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["fontSuperscript"] = 308] = "fontSuperscript"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["fontSubscript"] = 309] = "fontSubscript"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["fontNormal"] = 310] = "fontNormal"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["indentLeft"] = 401] = "indentLeft"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["indentRight"] = 402] = "indentRight"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["numberFormat"] = 501] = "numberFormat"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["width"] = 701] = "width"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["height"] = 702] = "height"; + OSF_DDA_Marshaling_CellFormatProperties[OSF_DDA_Marshaling_CellFormatProperties["wrapping"] = 703] = "wrapping"; +})(OSF_DDA_Marshaling_CellFormatProperties || (OSF_DDA_Marshaling_CellFormatProperties = {})); +; +OSF.DDA.Marshaling.CellFormatProperties = OSF_DDA_Marshaling_CellFormatProperties; +var OSF_DDA_Marshaling_BorderStyleType; +(function (OSF_DDA_Marshaling_BorderStyleType) { + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["none"] = 0] = "none"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["thin"] = 1] = "thin"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["medium"] = 2] = "medium"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["dashed"] = 3] = "dashed"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["dotted"] = 4] = "dotted"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["thick"] = 5] = "thick"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["double"] = 6] = "double"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["hair"] = 7] = "hair"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["mediumDashed"] = 8] = "mediumDashed"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["dashDot"] = 9] = "dashDot"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["mediumDashDot"] = 10] = "mediumDashDot"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["dashDotDot"] = 11] = "dashDotDot"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["mediumDashDotDot"] = 12] = "mediumDashDotDot"; + OSF_DDA_Marshaling_BorderStyleType[OSF_DDA_Marshaling_BorderStyleType["slantDashDot"] = 13] = "slantDashDot"; +})(OSF_DDA_Marshaling_BorderStyleType || (OSF_DDA_Marshaling_BorderStyleType = {})); +; +OSF.DDA.Marshaling.BorderStyleType = OSF_DDA_Marshaling_BorderStyleType; +var OSF_DDA_Marshaling_ColorType; +(function (OSF_DDA_Marshaling_ColorType) { + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["none"] = 0] = "none"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["black"] = 1] = "black"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["blue"] = 2] = "blue"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["gray"] = 3] = "gray"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["green"] = 4] = "green"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["orange"] = 5] = "orange"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["pink"] = 6] = "pink"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["purple"] = 7] = "purple"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["red"] = 8] = "red"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["teal"] = 9] = "teal"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["turquoise"] = 10] = "turquoise"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["violet"] = 11] = "violet"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["white"] = 12] = "white"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["yellow"] = 13] = "yellow"; + OSF_DDA_Marshaling_ColorType[OSF_DDA_Marshaling_ColorType["automatic"] = 14] = "automatic"; +})(OSF_DDA_Marshaling_ColorType || (OSF_DDA_Marshaling_ColorType = {})); +; +OSF.DDA.Marshaling.ColorType = OSF_DDA_Marshaling_ColorType; +var OSF_DDA_Marshaling_AlignHorizontalType; +(function (OSF_DDA_Marshaling_AlignHorizontalType) { + OSF_DDA_Marshaling_AlignHorizontalType[OSF_DDA_Marshaling_AlignHorizontalType["general"] = 0] = "general"; + OSF_DDA_Marshaling_AlignHorizontalType[OSF_DDA_Marshaling_AlignHorizontalType["left"] = 1] = "left"; + OSF_DDA_Marshaling_AlignHorizontalType[OSF_DDA_Marshaling_AlignHorizontalType["center"] = 2] = "center"; + OSF_DDA_Marshaling_AlignHorizontalType[OSF_DDA_Marshaling_AlignHorizontalType["right"] = 3] = "right"; + OSF_DDA_Marshaling_AlignHorizontalType[OSF_DDA_Marshaling_AlignHorizontalType["fill"] = 4] = "fill"; + OSF_DDA_Marshaling_AlignHorizontalType[OSF_DDA_Marshaling_AlignHorizontalType["justify"] = 5] = "justify"; + OSF_DDA_Marshaling_AlignHorizontalType[OSF_DDA_Marshaling_AlignHorizontalType["centerAcrossSelection"] = 6] = "centerAcrossSelection"; + OSF_DDA_Marshaling_AlignHorizontalType[OSF_DDA_Marshaling_AlignHorizontalType["distributed"] = 7] = "distributed"; +})(OSF_DDA_Marshaling_AlignHorizontalType || (OSF_DDA_Marshaling_AlignHorizontalType = {})); +; +OSF.DDA.Marshaling.AlignHorizontalType = OSF_DDA_Marshaling_AlignHorizontalType; +var OSF_DDA_Marshaling_AlignVerticalType; +(function (OSF_DDA_Marshaling_AlignVerticalType) { + OSF_DDA_Marshaling_AlignVerticalType[OSF_DDA_Marshaling_AlignVerticalType["top"] = 0] = "top"; + OSF_DDA_Marshaling_AlignVerticalType[OSF_DDA_Marshaling_AlignVerticalType["center"] = 1] = "center"; + OSF_DDA_Marshaling_AlignVerticalType[OSF_DDA_Marshaling_AlignVerticalType["bottom"] = 2] = "bottom"; + OSF_DDA_Marshaling_AlignVerticalType[OSF_DDA_Marshaling_AlignVerticalType["justify"] = 3] = "justify"; + OSF_DDA_Marshaling_AlignVerticalType[OSF_DDA_Marshaling_AlignVerticalType["distributed"] = 4] = "distributed"; +})(OSF_DDA_Marshaling_AlignVerticalType || (OSF_DDA_Marshaling_AlignVerticalType = {})); +; +OSF.DDA.Marshaling.AlignVerticalType = OSF_DDA_Marshaling_AlignVerticalType; +var OSF_DDA_Marshaling_FontStyleType; +(function (OSF_DDA_Marshaling_FontStyleType) { + OSF_DDA_Marshaling_FontStyleType[OSF_DDA_Marshaling_FontStyleType["regular"] = 0] = "regular"; + OSF_DDA_Marshaling_FontStyleType[OSF_DDA_Marshaling_FontStyleType["italic"] = 1] = "italic"; + OSF_DDA_Marshaling_FontStyleType[OSF_DDA_Marshaling_FontStyleType["bold"] = 2] = "bold"; + OSF_DDA_Marshaling_FontStyleType[OSF_DDA_Marshaling_FontStyleType["boldItalic"] = 3] = "boldItalic"; +})(OSF_DDA_Marshaling_FontStyleType || (OSF_DDA_Marshaling_FontStyleType = {})); +; +OSF.DDA.Marshaling.FontStyleType = OSF_DDA_Marshaling_FontStyleType; +var OSF_DDA_Marshaling_FontUnderlineStyleType; +(function (OSF_DDA_Marshaling_FontUnderlineStyleType) { + OSF_DDA_Marshaling_FontUnderlineStyleType[OSF_DDA_Marshaling_FontUnderlineStyleType["none"] = 0] = "none"; + OSF_DDA_Marshaling_FontUnderlineStyleType[OSF_DDA_Marshaling_FontUnderlineStyleType["single"] = 1] = "single"; + OSF_DDA_Marshaling_FontUnderlineStyleType[OSF_DDA_Marshaling_FontUnderlineStyleType["double"] = 2] = "double"; + OSF_DDA_Marshaling_FontUnderlineStyleType[OSF_DDA_Marshaling_FontUnderlineStyleType["singleAccounting"] = 3] = "singleAccounting"; + OSF_DDA_Marshaling_FontUnderlineStyleType[OSF_DDA_Marshaling_FontUnderlineStyleType["doubleAccounting"] = 4] = "doubleAccounting"; +})(OSF_DDA_Marshaling_FontUnderlineStyleType || (OSF_DDA_Marshaling_FontUnderlineStyleType = {})); +; +OSF.DDA.Marshaling.FontUnderlineStyleType = OSF_DDA_Marshaling_FontUnderlineStyleType; +var OSF_DDA_Marshaling_FontDirectionType; +(function (OSF_DDA_Marshaling_FontDirectionType) { + OSF_DDA_Marshaling_FontDirectionType[OSF_DDA_Marshaling_FontDirectionType["context"] = 0] = "context"; + OSF_DDA_Marshaling_FontDirectionType[OSF_DDA_Marshaling_FontDirectionType["leftToRight"] = 1] = "leftToRight"; + OSF_DDA_Marshaling_FontDirectionType[OSF_DDA_Marshaling_FontDirectionType["rightToLeft"] = 2] = "rightToLeft"; +})(OSF_DDA_Marshaling_FontDirectionType || (OSF_DDA_Marshaling_FontDirectionType = {})); +; +OSF.DDA.Marshaling.FontDirectionType = OSF_DDA_Marshaling_FontDirectionType; +var OSF_DDA_Marshaling_WidthType; +(function (OSF_DDA_Marshaling_WidthType) { + OSF_DDA_Marshaling_WidthType[OSF_DDA_Marshaling_WidthType["autoFit"] = -1] = "autoFit"; +})(OSF_DDA_Marshaling_WidthType || (OSF_DDA_Marshaling_WidthType = {})); +; +OSF.DDA.Marshaling.WidthType = OSF_DDA_Marshaling_WidthType; +var OSF_DDA_Marshaling_HeightType; +(function (OSF_DDA_Marshaling_HeightType) { + OSF_DDA_Marshaling_HeightType[OSF_DDA_Marshaling_HeightType["autoFit"] = -1] = "autoFit"; +})(OSF_DDA_Marshaling_HeightType || (OSF_DDA_Marshaling_HeightType = {})); +; +OSF.DDA.Marshaling.HeightType = OSF_DDA_Marshaling_HeightType; +var AgaveFormatAPI; +(function (AgaveFormatAPI) { + var alignHorizontalType = OSF.DDA.Marshaling.AlignHorizontalType; + var alignVerticalType = OSF.DDA.Marshaling.AlignVerticalType; + var borderStyleType = OSF.DDA.Marshaling.BorderStyleType; + var cellFormatProperties = OSF.DDA.Marshaling.CellFormatProperties; + var cellProperties = OSF.DDA.Marshaling.CellProperties; + var colorType = OSF.DDA.Marshaling.ColorType; + var fontDirectionType = OSF.DDA.Marshaling.FontDirectionType; + var fontStyleType = OSF.DDA.Marshaling.FontStyleType; + var fontUnderlineStyleType = OSF.DDA.Marshaling.FontUnderlineStyleType; + var heightType = OSF.DDA.Marshaling.HeightType; + var hostKeys = OSF.DDA.Marshaling.FormatKeys; + var hostParameters = Microsoft.Office.WebExtension.Parameters; + var ns = OSF.DDA.WAC.Delegate.ParameterMap; + var tableOptionProperties = OSF.DDA.Marshaling.TableOptionProperties; + var widthType = OSF.DDA.Marshaling.WidthType; + Microsoft.Office.WebExtension.Table = { + All: 0, + Data: 1, + Headers: 2 + }; + ns.define({ + type: OSF.DDA.WAC.UniqueArguments.ClearFormats, + toHost: [ + { name: hostParameters.Id, value: hostKeys.Id } + ] + }); + ns.define({ + type: OSF.DDA.MethodDispId.dispidClearFormatsMethod, + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.ClearFormats, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] + }); + ns.define({ + type: OSF.DDA.WAC.UniqueArguments.SetFormats, + toHost: [ + { name: hostParameters.Id, value: hostKeys.Id }, + { name: hostParameters.CellFormat, value: hostKeys.CellFormat }, + { name: hostParameters.TableOptions, value: hostKeys.TableOptions } + ] + }); + ns.define({ + type: OSF.DDA.MethodDispId.dispidSetTableOptionsMethod, + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.SetFormats, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] + }); + ns.define({ + type: OSF.DDA.MethodDispId.dispidSetFormatsMethod, + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.SetFormats, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] + }); + ns.define({ + type: OSF.DDA.WAC.UniqueArguments.SetData, + toHost: [ + { name: hostParameters.Id, value: hostKeys.Id }, + { name: hostParameters.CoercionType, value: "CoerceType" }, + { name: hostParameters.Data, value: OSF.DDA.WAC.UniqueArguments.Data }, + { name: hostParameters.Rows, value: "Rows" }, + { name: hostParameters.Columns, value: "Columns" }, + { name: hostParameters.StartRow, value: "StartRow" }, + { name: hostParameters.StartColumn, value: "StartCol" }, + { name: hostParameters.CellFormat, value: hostKeys.CellFormat }, + { name: hostParameters.TableOptions, value: hostKeys.TableOptions } + ] + }); + ns.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.SetData, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] + }); + ns.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: OSF.DDA.WAC.UniqueArguments.SetData, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] + }); + var formatProperties = { + alignHorizontal: { text: "alignHorizontal", type: cellFormatProperties.alignHorizontal }, + alignVertical: { text: "alignVertical", type: cellFormatProperties.alignVertical }, + backgroundColor: { text: "backgroundColor", type: cellFormatProperties.backgroundColor }, + borderStyle: { text: "borderStyle", type: cellFormatProperties.borderStyle }, + borderColor: { text: "borderColor", type: cellFormatProperties.borderColor }, + borderTopStyle: { text: "borderTopStyle", type: cellFormatProperties.borderTopStyle }, + borderTopColor: { text: "borderTopColor", type: cellFormatProperties.borderTopColor }, + borderBottomStyle: { text: "borderBottomStyle", type: cellFormatProperties.borderBottomStyle }, + borderBottomColor: { text: "borderBottomColor", type: cellFormatProperties.borderBottomColor }, + borderLeftStyle: { text: "borderLeftStyle", type: cellFormatProperties.borderLeftStyle }, + borderLeftColor: { text: "borderLeftColor", type: cellFormatProperties.borderLeftColor }, + borderRightStyle: { text: "borderRightStyle", type: cellFormatProperties.borderRightStyle }, + borderRightColor: { text: "borderRightColor", type: cellFormatProperties.borderRightColor }, + borderOutlineStyle: { text: "borderOutlineStyle", type: cellFormatProperties.borderOutlineStyle }, + borderOutlineColor: { text: "borderOutlineColor", type: cellFormatProperties.borderOutlineColor }, + borderInlineStyle: { text: "borderInlineStyle", type: cellFormatProperties.borderInlineStyle }, + borderInlineColor: { text: "borderInlineColor", type: cellFormatProperties.borderInlineColor }, + fontFamily: { text: "fontFamily", type: cellFormatProperties.fontFamily }, + fontStyle: { text: "fontStyle", type: cellFormatProperties.fontStyle }, + fontSize: { text: "fontSize", type: cellFormatProperties.fontSize }, + fontUnderlineStyle: { text: "fontUnderlineStyle", type: cellFormatProperties.fontUnderlineStyle }, + fontColor: { text: "fontColor", type: cellFormatProperties.fontColor }, + fontDirection: { text: "fontDirection", type: cellFormatProperties.fontDirection }, + fontStrikethrough: { text: "fontStrikethrough", type: cellFormatProperties.fontStrikethrough }, + fontSuperscript: { text: "fontSuperscript", type: cellFormatProperties.fontSuperscript }, + fontSubscript: { text: "fontSubscript", type: cellFormatProperties.fontSubscript }, + fontNormal: { text: "fontNormal", type: cellFormatProperties.fontNormal }, + indentLeft: { text: "indentLeft", type: cellFormatProperties.indentLeft }, + indentRight: { text: "indentRight", type: cellFormatProperties.indentRight }, + numberFormat: { text: "numberFormat", type: cellFormatProperties.numberFormat }, + width: { text: "width", type: cellFormatProperties.width }, + height: { text: "height", type: cellFormatProperties.height }, + wrapping: { text: "wrapping", type: cellFormatProperties.wrapping } + }; + var borderStyleSet = [ + { name: "none", value: borderStyleType.none }, + { name: "thin", value: borderStyleType.thin }, + { name: "medium", value: borderStyleType.medium }, + { name: "dashed", value: borderStyleType.dashed }, + { name: "dotted", value: borderStyleType.dotted }, + { name: "thick", value: borderStyleType.thick }, + { name: "double", value: borderStyleType.double }, + { name: "hair", value: borderStyleType.hair }, + { name: "medium dashed", value: borderStyleType.mediumDashed }, + { name: "dash dot", value: borderStyleType.dashDot }, + { name: "medium dash dot", value: borderStyleType.mediumDashDot }, + { name: "dash dot dot", value: borderStyleType.dashDotDot }, + { name: "medium dash dot dot", value: borderStyleType.mediumDashDotDot }, + { name: "slant dash dot", value: borderStyleType.slantDashDot }, + ]; + var colorSet = [ + { name: "none", value: colorType.none }, + { name: "black", value: colorType.black }, + { name: "blue", value: colorType.blue }, + { name: "gray", value: colorType.gray }, + { name: "green", value: colorType.green }, + { name: "orange", value: colorType.orange }, + { name: "pink", value: colorType.pink }, + { name: "purple", value: colorType.purple }, + { name: "red", value: colorType.red }, + { name: "teal", value: colorType.teal }, + { name: "turquoise", value: colorType.turquoise }, + { name: "violet", value: colorType.violet }, + { name: "white", value: colorType.white }, + { name: "yellow", value: colorType.yellow }, + { name: "automatic", value: colorType.automatic }, + ]; + ns.define({ + type: formatProperties.alignHorizontal.text, + toHost: [ + { name: "general", value: alignHorizontalType.general }, + { name: "left", value: alignHorizontalType.left }, + { name: "center", value: alignHorizontalType.center }, + { name: "right", value: alignHorizontalType.right }, + { name: "fill", value: alignHorizontalType.fill }, + { name: "justify", value: alignHorizontalType.justify }, + { name: "center across selection", value: alignHorizontalType.centerAcrossSelection }, + { name: "distributed", value: alignHorizontalType.distributed }, + ] + }); + ns.define({ + type: formatProperties.alignVertical.text, + toHost: [ + { name: "top", value: alignVerticalType.top }, + { name: "center", value: alignVerticalType.center }, + { name: "bottom", value: alignVerticalType.bottom }, + { name: "justify", value: alignVerticalType.justify }, + { name: "distributed", value: alignVerticalType.distributed }, + ] + }); + ns.define({ + type: formatProperties.backgroundColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderTopStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderTopColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderBottomStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderBottomColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderLeftStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderLeftColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderRightStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderRightColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderOutlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderOutlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderInlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderInlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontStyle.text, + toHost: [ + { name: "regular", value: fontStyleType.regular }, + { name: "italic", value: fontStyleType.italic }, + { name: "bold", value: fontStyleType.bold }, + { name: "bold italic", value: fontStyleType.boldItalic }, + ] + }); + ns.define({ + type: formatProperties.fontUnderlineStyle.text, + toHost: [ + { name: "none", value: fontUnderlineStyleType.none }, + { name: "single", value: fontUnderlineStyleType.single }, + { name: "double", value: fontUnderlineStyleType.double }, + { name: "single accounting", value: fontUnderlineStyleType.singleAccounting }, + { name: "double accounting", value: fontUnderlineStyleType.doubleAccounting }, + ] + }); + ns.define({ + type: formatProperties.fontColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontDirection.text, + toHost: [ + { name: "context", value: fontDirectionType.context }, + { name: "left-to-right", value: fontDirectionType.leftToRight }, + { name: "right-to-left", value: fontDirectionType.rightToLeft }, + ] + }); + ns.define({ + type: formatProperties.width.text, + toHost: [ + { name: "auto fit", value: widthType.autoFit }, + ] + }); + ns.define({ + type: formatProperties.height.text, + toHost: [ + { name: "auto fit", value: heightType.autoFit }, + ] + }); + ns.define({ + type: hostParameters.TableOptions, + toHost: [ + { name: "headerRow", value: tableOptionProperties.headerRow }, + { name: "bandedRows", value: tableOptionProperties.bandedRows }, + { name: "firstColumn", value: tableOptionProperties.firstColumn }, + { name: "lastColumn", value: tableOptionProperties.lastColumn }, + { name: "bandedColumns", value: tableOptionProperties.bandedCoumns }, + { name: "filterButton", value: tableOptionProperties.filterButton }, + { name: "style", value: tableOptionProperties.style }, + { name: "totalRow", value: tableOptionProperties.totalRow } + ] + }); + ns.dynamicTypes[hostParameters.CellFormat] = { + toHost: function (data) { + for (var entry in data) { + if (data[entry].format) { + data[entry].format = ns.doMapValues(data[entry].format, "toHost"); + } + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + ns.setDynamicType(hostParameters.CellFormat, { + toHost: function OSF_DDA_WAC_Delegate_SpecialProcessor_CellFormat$toHost(cellFormats) { + var textCells = "cells"; + var textFormat = "format"; + var posCells = 0; + var posFormat = 1; + var ret = []; + for (var index in cellFormats) { + var cfOld = cellFormats[index]; + var cfNew = []; + if (typeof (cfOld[textCells]) !== "undefined") { + var cellsOld = cfOld[textCells]; + var cellsNew; + if (typeof cfOld[textCells] === "object") { + cellsNew = []; + for (var entry in cellsOld) { + if (typeof (cellProperties[entry]) !== "undefined") { + cellsNew[cellProperties[entry]] = cellsOld[entry]; + } + } + } + else { + cellsNew = cellsOld; + } + cfNew[posCells] = cellsNew; + } + if (cfOld[textFormat]) { + var formatOld = cfOld[textFormat]; + var formatNew = []; + for (var entry2 in formatOld) { + if (typeof (formatProperties[entry2]) !== "undefined") { + formatNew.push([ + formatProperties[entry2].type, + formatOld[entry2] + ]); + } + } + cfNew[posFormat] = formatNew; + } + ret[index] = cfNew; + } + return ret; + }, + fromHost: function OSF_DDA_WAC_Delegate_SpecialProcessor_CellFormat$fromHost(hostArgs) { + return hostArgs; + } + }); + ns.setDynamicType(hostParameters.TableOptions, { + toHost: function OSF_DDA_WAC_Delegate_SpecialProcessor_TableOptions$toHost(tableOptions) { + var ret = []; + for (var entry in tableOptions) { + if (typeof (tableOptionProperties[entry]) != "undefined") { + ret[tableOptionProperties[entry]] = tableOptions[entry]; + } + } + return ret; + }, + fromHost: function OSF_DDA_WAC_Delegate_SpecialProcessor_TableOptions$fromHost(hostArgs) { + return hostArgs; + } + }); + alignHorizontalType = null; + alignVerticalType = null; + borderStyleType = null; + cellFormatProperties = null; + colorType = null; + fontDirectionType = null; + fontStyleType = null; + fontUnderlineStyleType = null; + heightType = null; + hostKeys = null; + widthType = null; +})(AgaveFormatAPI || (AgaveFormatAPI = {})); +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync, + requiredArguments: [ + { + name: Microsoft.Office.WebExtension.Parameters.Data, + types: ["object"] + } + ], + supportedOptions: [] +}); +OSF.OUtil.setNamespace("RichApi", OSF.DDA); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.ArrayData } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.Data } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { RichApiMessage: "richApiMessage" }); +OSF.DDA.RichApiMessageEventArgs = function OSF_DDA_RichApiMessageEventArgs(eventType, eventProperties) { + var entryArray = eventProperties[Microsoft.Office.WebExtension.Parameters.Data]; + var entries = []; + if (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var elem = entryArray[i]; + if (elem.toArray) { + elem = elem.toArray(); + } + entries.push({ + messageCategory: elem[0], + messageType: elem[1], + targetId: elem[2], + message: elem[3], + id: elem[4], + isRemoteOverride: elem[5] + }); + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: Microsoft.Office.WebExtension.EventType.RichApiMessage }, + "entries": { value: entries } + }); +}; +(function (OfficeExt) { + var RichApiMessageManager = (function () { + function RichApiMessageManager() { + this._eventDispatch = null; + this._registerHandlers = []; + this._eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.RichApiMessage, + ]); + OSF.DDA.DispIdHost.addEventSupport(this, this._eventDispatch); + } + RichApiMessageManager.prototype.register = function (handler) { + var _this = this; + if (!this._registerWithHostPromise) { + this._registerWithHostPromise = new Office.Promise(function (resolve, reject) { + _this.addHandlerAsync(Microsoft.Office.WebExtension.EventType.RichApiMessage, function (args) { + _this._registerHandlers.forEach(function (value) { + if (value) { + value(args); + } + }); + }, function (asyncResult) { + if (asyncResult.status == 'failed') { + reject(asyncResult.error); + } + else { + resolve(); + } + }); + }); + } + return this._registerWithHostPromise.then(function () { + _this._registerHandlers.push(handler); + }); + }; + return RichApiMessageManager; + }()); + OfficeExt.RichApiMessageManager = RichApiMessageManager; +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidRichApiMessageEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.ArrayData } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.ArrayData } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType, { OnlyVisible: "onlyVisible" }); +(function (OfficeExt) { + var AppCommand; + (function (AppCommand) { + var AppCommandManager = (function () { + function AppCommandManager() { + var _this = this; + this._pseudoDocument = null; + this._eventDispatch = null; + this._useAssociatedActionsOnly = null; + this._processAppCommandInvocation = function (args) { + var verifyResult = _this._verifyManifestCallback(args.callbackName); + if (verifyResult.errorCode != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + _this._invokeAppCommandCompletedMethod(args.appCommandId, verifyResult.errorCode, ""); + return; + } + var eventObj = _this._constructEventObjectForCallback(args); + if (eventObj) { + window.setTimeout(function () { verifyResult.callback(eventObj); }, 0); + } + else { + _this._invokeAppCommandCompletedMethod(args.appCommandId, OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError, ""); + } + }; + } + AppCommandManager.initializeOsfDda = function () { + OSF.DDA.AsyncMethodNames.addNames({ + AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync" + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Status, + "types": ["number"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, + "types": ["string"] + } + ] + }); + OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + AppCommandInvokedEvent: "AppCommandInvokedEvent" + }); + OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + AppCommandInvoked: "appCommandInvoked" + }); + OSF.OUtil.setNamespace("AppCommand", OSF.DDA); + OSF.DDA.AppCommand.AppCommandInvokedEventArgs = OfficeExt.AppCommand.AppCommandInvokedEventArgs; + }; + AppCommandManager.prototype.initializeAndChangeOnce = function (callback) { + AppCommand.registerDdaFacade(); + this._pseudoDocument = {}; + OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument, [ + OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, + ]); + this._eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.AppCommandInvoked, + ]); + var onRegisterCompleted = function (result) { + if (callback) { + if (result.status == "succeeded") { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + } + }; + OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument, this._eventDispatch); + this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked, this._processAppCommandInvocation, onRegisterCompleted); + }; + AppCommandManager.prototype._verifyManifestCallback = function (callbackName) { + var defaultResult = { callback: null, errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback }; + callbackName = callbackName.trim(); + try { + var callbackFunc = this._getCallbackFunc(callbackName); + if (typeof callbackFunc != "function") { + return defaultResult; + } + } + catch (e) { + return defaultResult; + } + return { callback: callbackFunc, errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess }; + }; + AppCommandManager.prototype._getUseAssociatedActionsOnly = function () { + if (this._useAssociatedActionsOnly == null) { + this._useAssociatedActionsOnly = false; + try { + if (window["useAssociatedActionsOnly"] === true) { + this._useAssociatedActionsOnly = true; + } + else { + this._useAssociatedActionsOnly = OSF._OfficeAppFactory.getLoadScriptHelper().getUseAssociatedActionsOnlyDefined(); + } + } + catch (e) { } + } + return this._useAssociatedActionsOnly; + }; + AppCommandManager.prototype._getCallbackFuncFromWindow = function (callbackName) { + var callList = callbackName.split("."); + var parentObject = window; + for (var i = 0; i < callList.length - 1; i++) { + if (parentObject[callList[i]] && (typeof parentObject[callList[i]] == "object" || typeof parentObject[callList[i]] == "function")) { + parentObject = parentObject[callList[i]]; + } + else { + return null; + } + } + var callbackFunc = parentObject[callList[callList.length - 1]]; + return callbackFunc; + }; + AppCommandManager.prototype._getCallbackFuncFromActionAssociateTable = function (callbackName) { + var nameUpperCase = callbackName.toUpperCase(); + return Office.actions._association.mappings[nameUpperCase]; + }; + AppCommandManager.prototype._getCallbackFunc = function (callbackName) { + var _this = this; + var callbackFunc = null; + var useAssociateTable = false; + if (!this._getUseAssociatedActionsOnly()) { + callbackFunc = this._getCallbackFuncFromWindow(callbackName); + } + if (!callbackFunc) { + callbackFunc = this._getCallbackFuncFromActionAssociateTable(callbackName); + if (callbackFunc) { + useAssociateTable = true; + } + } + if (!AppCommandManager.isTelemetrySubmitted) { + AppCommandManager.isTelemetrySubmitted = true; + try { + if (OTel && oteljs && Microsoft.Office.WebExtension.sendTelemetryEvent) { + var telSampleRate = OTel.OTelLogger.getHost() == "Outlook" ? 0.1 : 0.2; + if (Math.random() < telSampleRate) { + OTel.OTelLogger.onTelemetryLoaded(function () { + var dataFields = [ + oteljs.makeBooleanDataField("UseAction", _this._useAssociatedActionsOnly === true), + oteljs.makeBooleanDataField("UseAssociateTable", useAssociateTable) + ]; + Microsoft.Office.WebExtension.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.AppCommandDefinition", + dataFields: dataFields, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage, + diagnosticLevel: oteljs.DiagnosticLevel.NecessaryServiceDataEvent + } + }); + }); + } + } + } + catch (e) { } + } + return callbackFunc; + }; + AppCommandManager.prototype._invokeAppCommandCompletedMethod = function (appCommandId, resultCode, data) { + this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId, resultCode, data); + }; + AppCommandManager.prototype._constructEventObjectForCallback = function (args) { + var _this = this; + var eventObj = new AppCommandCallbackEventArgs(); + try { + var jsonData = JSON.parse(args.eventObjStr); + this._translateEventObjectInternal(jsonData, eventObj); + Object.defineProperty(eventObj, 'completed', { + value: function (completedContext) { + eventObj.completedContext = completedContext; + var jsonString = JSON.stringify(eventObj); + _this._invokeAppCommandCompletedMethod(args.appCommandId, OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, jsonString); + }, + enumerable: true + }); + } + catch (e) { + eventObj = null; + } + return eventObj; + }; + AppCommandManager.prototype._translateEventObjectInternal = function (input, output) { + for (var key in input) { + if (!input.hasOwnProperty(key)) + continue; + var inputChild = input[key]; + if (typeof inputChild == "object" && inputChild != null) { + OSF.OUtil.defineEnumerableProperty(output, key, { + value: {} + }); + this._translateEventObjectInternal(inputChild, output[key]); + } + else { + Object.defineProperty(output, key, { + value: inputChild, + enumerable: true, + writable: true + }); + } + } + }; + AppCommandManager.prototype._constructObjectByTemplate = function (template, input) { + var output = {}; + if (!template || !input) + return output; + for (var key in template) { + if (template.hasOwnProperty(key)) { + output[key] = null; + if (input[key] != null) { + var templateChild = template[key]; + var inputChild = input[key]; + var inputChildType = typeof inputChild; + if (typeof templateChild == "object" && templateChild != null) { + output[key] = this._constructObjectByTemplate(templateChild, inputChild); + } + else if (inputChildType == "number" || inputChildType == "string" || inputChildType == "boolean") { + output[key] = inputChild; + } + } + } + } + return output; + }; + AppCommandManager.instance = function () { + if (AppCommandManager._instance == null) { + AppCommandManager._instance = new AppCommandManager(); + } + return AppCommandManager._instance; + }; + AppCommandManager.isTelemetrySubmitted = false; + AppCommandManager._instance = null; + return AppCommandManager; + }()); + AppCommand.AppCommandManager = AppCommandManager; + var AppCommandInvokedEventArgs = (function () { + function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr) { + this.type = Microsoft.Office.WebExtension.EventType.AppCommandInvoked; + this.appCommandId = appCommandId; + this.callbackName = callbackName; + this.eventObjStr = eventObjStr; + } + AppCommandInvokedEventArgs.create = function (eventProperties) { + return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId], eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName], eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr]); + }; + return AppCommandInvokedEventArgs; + }()); + AppCommand.AppCommandInvokedEventArgs = AppCommandInvokedEventArgs; + var AppCommandCallbackEventArgs = (function () { + function AppCommandCallbackEventArgs() { + } + return AppCommandCallbackEventArgs; + }()); + AppCommand.AppCommandCallbackEventArgs = AppCommandCallbackEventArgs; + AppCommand.AppCommandInvokedEventEnums = { + AppCommandId: "appCommandId", + CallbackName: "callbackName", + EventObjStr: "eventObjStr" + }; + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})); +})(OfficeExt || (OfficeExt = {})); +OfficeExt.AppCommand.AppCommandManager.initializeOsfDda(); +OSF.OUtil.setNamespace("Marshaling", OSF.DDA); +OSF.OUtil.setNamespace("AppCommand", OSF.DDA.Marshaling); +var OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys; +(function (OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys) { + OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys[OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys["AppCommandId"] = 0] = "AppCommandId"; + OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys[OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys["CallbackName"] = 1] = "CallbackName"; + OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys[OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys["EventObjStr"] = 2] = "EventObjStr"; +})(OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys || (OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys = {})); +; +OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys = OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys; +var OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys; +(function (OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys) { + OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys[OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys["Id"] = 0] = "Id"; + OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys[OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys["Status"] = 1] = "Status"; + OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys[OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys["Data"] = 2] = "Data"; +})(OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys || (OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys = {})); +; +OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys = OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys; +(function (OfficeExt) { + var AppCommand; + (function (AppCommand) { + function registerDdaFacade() { + if (OSF.DDA.WAC) { + var parameterMap = OSF.DDA.WAC.Delegate.ParameterMap; + parameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Id }, + { name: Microsoft.Office.WebExtension.Parameters.Status, value: OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Status }, + { name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, value: OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Data } + ] + }); + parameterMap.define({ + type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, value: parameterMap.self } + ] + }); + parameterMap.addComplexType(OSF.DDA.EventDescriptors.AppCommandInvokedEvent); + parameterMap.define({ + type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, + fromHost: [ + { name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId, value: OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.AppCommandId }, + { name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName, value: OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.CallbackName }, + { name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr, value: OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.EventObjStr }, + ] + }); + } + } + AppCommand.registerDdaFacade = registerDdaFacade; + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})); +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogParentMessageReceivedEvent: "DialogParentMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogParentMessageReceived: "dialogParentMessageReceived", + DialogParentEventReceived: "dialogParentEventReceived" +}); +OSF.DialogParentMessageEventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogParentEventReceived +]); +OSF.DDA.UI.EnableMessageChildDialogAPI = true; +OSF.DialogShownStatus = { hasDialogShown: false, isWindowDialog: false }; +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogMessageReceivedEvent: "DialogMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + MessageType: "messageType", + MessageContent: "messageContent", + MessageOrigin: "messageOrigin" +}); +OSF.DDA.DialogEventType = {}; +OSF.OUtil.augmentList(OSF.DDA.DialogEventType, { + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" +}); +OSF.DDA.AsyncMethodNames.addNames({ + DisplayDialogAsync: "displayDialogAsync", + DisplayModalDialogAsync: "displayModalDialogAsync", + CloseAsync: "close" +}); +OSF.DDA.SyncMethodNames.addNames({ + MessageParent: "messageParent", + MessageChild: "messageChild", + SendMessage: "sendMessage", + AddMessageHandler: "addEventHandler" +}); +OSF.DDA.UI.ParentUI = function OSF_DDA_ParentUI() { + var eventDispatch; + if (Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived != null) { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived, + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + ]); + } + else { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived + ]); + } + var target = this; + var defineDialogApi = function (apiName, isModalApi) { + if (!target[apiName]) { + OSF.OUtil.defineEnumerableProperty(target, apiName, { + value: function () { + var openDialog = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments, eventDispatch, target, isModalApi); + } + }); + } + }; + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName, false); + if (Microsoft.Office.WebExtension.FeatureGates["ModalWebDialogAPI"]) { + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName, true); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DDA.UI.ChildUI = function OSF_DDA_ChildUI(isPopupWindow) { + var messageParentName = OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target = this; + if (!target[messageParentName]) { + OSF.OUtil.defineEnumerableProperty(target, messageParentName, { + value: function () { + var messageParent = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments, target); + } + }); + } + var addEventHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if (!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch != "undefined") { + OSF.DDA.DispIdHost.addEventSupport(target, OSF.DialogParentMessageEventDispatch, isPopupWindow); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DialogHandler = function OSF_DialogHandler() { }; +OSF.DDA.DialogEventArgs = function OSF_DDA_DialogEventArgs(message) { + if (message[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogMessageReceived) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); + } + else { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogEventReceived + }, + "error": { + value: message[OSF.DDA.PropertyDescriptors.MessageType] + } + }); + } +}; +OSF.DDA.DialogParentEventArgs = function OSF_DDA_DialogParentEventArgs(message) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); +}; +var DialogApiManager = (function () { + function DialogApiManager() { + } + DialogApiManager.defineApi = function (apiName, supportedOptions) { + var asyncMethodCalls = OSF.DDA.AsyncMethodCalls; + asyncMethodCalls.define({ + method: apiName, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: supportedOptions, + privateStateCallbacks: [], + onSucceeded: function (args, caller, callArgs) { + var targetId = args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch = args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog = new OSF.DialogHandler(); + var closeDialog = OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, closeDialog, { + value: function () { + var closeDialogfunction = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments, targetId, eventDispatch, dialog); + } + }); + var addHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, addHandler, { + value: function () { + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(arguments, dialog, eventDispatch); + var eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType, handler); + } + }); + if (OSF.DDA.UI.EnableSendMessageDialogAPI === true) { + var sendMessage = OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, sendMessage, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var messageChild = OSF.DDA.SyncMethodNames.MessageChild.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, messageChild, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + return dialog; + }, + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs] = true; + } + return callArgs; + } + }); + }; + DialogApiManager.messageChildRichApiBridge = function () { + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, null, null); + } + }; + DialogApiManager.initOnce = function () { + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync, DialogApiManager.displayDialogAsyncApiSupportedOptions); + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync, DialogApiManager.displayModalDialogAsyncApiSupportedOptions); + }; + DialogApiManager.displayDialogAsyncApiSupportedOptions = [ + { + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.EnforceAppDomain, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]; + DialogApiManager.displayModalDialogAsyncApiSupportedOptions = DialogApiManager.displayDialogAsyncApiSupportedOptions.concat([ + { + name: "abortWhenParentIsMinimized", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: "abortWhenDocIsInactive", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]); + return DialogApiManager; +}()); +DialogApiManager.initOnce(); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageToParent, + "types": ["string", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageContent, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + privateStateCallbacks: [] +}); +OSF.OUtil.setNamespace("Marshaling", OSF.DDA); +OSF.OUtil.setNamespace("Dialog", OSF.DDA.Marshaling); +OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys = { + MessageType: "messageType", + MessageContent: "messageContent", + MessageOrigin: "messageOrigin", + TargetOrigin: "targetOrigin" +}; +OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys = { + MessageType: "messageType", + MessageContent: "messageContent", + MessageOrigin: "messageOrigin", + TargetOrigin: "targetOrigin" +}; +OSF.DDA.Marshaling.MessageParentKeys = { + MessageToParent: "messageToParent", + TargetOrigin: "targetOrigin" +}; +OSF.DDA.Marshaling.DialogNotificationShownEventType = { + DialogNotificationShown: "dialogNotificationShown" +}; +OSF.DDA.Marshaling.SendMessageKeys = { + MessageContent: "messageContent", + TargetOrigin: "targetOrigin" +}; +(function (OfficeExt) { + var WacCommonUICssManager; + (function (WacCommonUICssManager) { + var hostType = { + Excel: "excel", + Word: "word", + PowerPoint: "powerpoint", + Outlook: "outlook", + Visio: "visio" + }; + function getDialogCssManager(applicationHostType) { + switch (applicationHostType) { + case hostType.Excel: + case hostType.Word: + case hostType.PowerPoint: + case hostType.Outlook: + case hostType.Visio: + return new DefaultDialogCSSManager(); + default: + return new DefaultDialogCSSManager(); + } + return null; + } + WacCommonUICssManager.getDialogCssManager = getDialogCssManager; + var DefaultDialogCSSManager = (function () { + function DefaultDialogCSSManager() { + this.overlayElementCSS = [ + "position: absolute", + "top: 0", + "left: 0", + "width: 100%", + "height: 100%", + "background-color: rgba(198, 198, 198, 0.5)", + "z-index: 99998" + ]; + this.dialogNotificationPanelCSS = [ + "width: 100%", + "height: 190px", + "position: absolute", + "z-index: 99999", + "background-color: rgba(255, 255, 255, 1)", + "left: 0px", + "top: 50%", + "margin-top: -95px" + ]; + this.newWindowNotificationTextPanelCSS = [ + "margin: 20px 14px", + "font-family: Segoe UI,Arial,Verdana,sans-serif", + "font-size: 14px", + "height: 100px", + "line-height: 100px" + ]; + this.newWindowNotificationTextSpanCSS = [ + "display: inline-block", + "line-height: normal", + "vertical-align: middle" + ]; + this.crossZoneNotificationTextPanelCSS = [ + "margin: 20px 14px", + "font-family: Segoe UI,Arial,Verdana,sans-serif", + "font-size: 14px", + "height: 100px", + ]; + this.dialogNotificationButtonPanelCSS = "margin:0px 9px"; + this.buttonStyleCSS = [ + "text-align: center", + "width: 70px", + "height: 25px", + "font-size: 14px", + "font-family: Segoe UI,Arial,Verdana,sans-serif", + "margin: 0px 5px", + "border-width: 1px", + "border-style: solid" + ]; + } + DefaultDialogCSSManager.prototype.getOverlayElementCSS = function () { + return this.overlayElementCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getDialogNotificationPanelCSS = function () { + return this.dialogNotificationPanelCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getNewWindowNotificationTextPanelCSS = function () { + return this.newWindowNotificationTextPanelCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getNewWindowNotificationTextSpanCSS = function () { + return this.newWindowNotificationTextSpanCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getCrossZoneNotificationTextPanelCSS = function () { + return this.crossZoneNotificationTextPanelCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getDialogNotificationButtonPanelCSS = function () { + return this.dialogNotificationButtonPanelCSS; + }; + DefaultDialogCSSManager.prototype.getDialogButtonCSS = function () { + return this.buttonStyleCSS.join(";"); + }; + return DefaultDialogCSSManager; + }()); + WacCommonUICssManager.DefaultDialogCSSManager = DefaultDialogCSSManager; + })(WacCommonUICssManager = OfficeExt.WacCommonUICssManager || (OfficeExt.WacCommonUICssManager = {})); +})(OfficeExt || (OfficeExt = {})); +(function (OfficeExt) { + var AddinNativeAction; + (function (AddinNativeAction) { + var Dialog; + (function (Dialog) { + var windowInstance = null; + var handler = null; + var overlayElement = null; + var dialogNotificationPanel = null; + var closeDialogKey = "osfDialogInternal:action=closeDialog"; + var showDialogCallback = null; + var hasCrossZoneNotification = false; + var checkWindowDialogCloseInterval = -1; + var messageParentKey = "messageParentKey"; + var hostThemeButtonStyle = null; + var commonButtonBorderColor = "#ababab"; + var commonButtonBackgroundColor = "#ffffff"; + var commonEventInButtonBackgroundColor = "#ccc"; + var newWindowNotificationId = "newWindowNotificaiton"; + var crossZoneNotificationId = "crossZoneNotification"; + var configureBrowserLinkId = "configureBrowserLink"; + var dialogNotificationTextPanelId = "dialogNotificationTextPanel"; + var shouldUseLocalStorageToPassMessage = OfficeExt.WACUtils.shouldUseLocalStorageToPassMessage(); + var registerDialogNotificationShownArgs = { + "dispId": OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent, + "eventType": OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown, + "onComplete": null, + "onCalling": null + }; + function setHostThemeButtonStyle(args) { + var hostThemeButtonStyleArgs = args.input; + if (hostThemeButtonStyleArgs != null) { + hostThemeButtonStyle = { + HostButtonBorderColor: hostThemeButtonStyleArgs[OSF.HostThemeButtonStyleKeys.ButtonBorderColor], + HostButtonBackgroundColor: hostThemeButtonStyleArgs[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor] + }; + } + args.completed(); + } + Dialog.setHostThemeButtonStyle = setHostThemeButtonStyle; + function removeEventListenersForDialog(args) { + OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(false); + args.completed(); + } + Dialog.removeEventListenersForDialog = removeEventListenersForDialog; + function handleNewWindowDialog(dialogInfo) { + try { + if (!checkAppDomain(dialogInfo)) { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains); + return; + } + if (!dialogInfo[OSF.ShowWindowDialogParameterKeys.PromptBeforeOpen]) { + showDialog(dialogInfo); + return; + } + hasCrossZoneNotification = false; + var ignoreButtonKeyDownClick = false; + var hostInfoObj = OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; + var dialogCssManager = OfficeExt.WacCommonUICssManager.getDialogCssManager(hostInfoObj.hostType); + var notificationText = OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification, OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName); + overlayElement = createOverlayElement(dialogCssManager); + document.body.insertBefore(overlayElement, document.body.firstChild); + dialogNotificationPanel = createNotificationPanel(dialogCssManager, notificationText); + dialogNotificationPanel.id = newWindowNotificationId; + var dialogNotificationButtonPanel = createButtonPanel(dialogCssManager); + var allowButton = createButtonControl(dialogCssManager, Strings.OfficeOM.L_ShowWindowDialogNotificationAllow); + var ignoreButton = createButtonControl(dialogCssManager, Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore); + dialogNotificationButtonPanel.appendChild(allowButton); + dialogNotificationButtonPanel.appendChild(ignoreButton); + dialogNotificationPanel.appendChild(dialogNotificationButtonPanel); + document.body.insertBefore(dialogNotificationPanel, document.body.firstChild); + allowButton.onclick = function (event) { + showDialog(dialogInfo); + if (!hasCrossZoneNotification) { + dismissDialogNotification(); + } + event.preventDefault(); + event.stopPropagation(); + }; + function ignoreButtonClickEventHandler(event) { + function unregisterDialogNotificationShownEventCallback(status) { + removeDialogNotificationElement(); + setFocusOnFirstElement(status); + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore); + } + registerDialogNotificationShownArgs.onCalling = unregisterDialogNotificationShownEventCallback; + OSF.DDA.WAC.Delegate.unregisterEventAsync(registerDialogNotificationShownArgs); + event.preventDefault(); + event.stopPropagation(); + } + ignoreButton.onclick = ignoreButtonClickEventHandler; + allowButton.addEventListener("keydown", function (event) { + if (event.shiftKey && event.keyCode == 9) { + handleButtonControlEventOut(allowButton); + handleButtonControlEventIn(ignoreButton); + ignoreButton.focus(); + event.preventDefault(); + event.stopPropagation(); + } + }, false); + ignoreButton.addEventListener("keydown", function (event) { + if (!event.shiftKey && event.keyCode == 9) { + handleButtonControlEventOut(ignoreButton); + handleButtonControlEventIn(allowButton); + allowButton.focus(); + event.preventDefault(); + event.stopPropagation(); + } + else if (event.keyCode == 13) { + ignoreButtonKeyDownClick = true; + event.preventDefault(); + event.stopPropagation(); + } + }, false); + ignoreButton.addEventListener("keyup", function (event) { + if (event.keyCode == 13 && ignoreButtonKeyDownClick) { + ignoreButtonKeyDownClick = false; + ignoreButtonClickEventHandler(event); + } + }, false); + window.focus(); + function registerDialogNotificationShownEventCallback(status) { + allowButton.focus(); + } + registerDialogNotificationShownArgs.onCalling = registerDialogNotificationShownEventCallback; + OSF.DDA.WAC.Delegate.registerEventAsync(registerDialogNotificationShownArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at new window dialog." + e); + } + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + } + Dialog.handleNewWindowDialog = handleNewWindowDialog; + function closeDialog(callback) { + try { + if (windowInstance != null) { + var appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + if (appDomains) { + for (var i = 0; i < appDomains.length && appDomains[i].indexOf("://") !== -1; i++) { + windowInstance.postMessage(closeDialogKey, appDomains[i]); + } + } + if (windowInstance != null && !windowInstance.closed) { + windowInstance.close(); + } + if (shouldUseLocalStorageToPassMessage) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } + window.clearInterval(checkWindowDialogCloseInterval); + windowInstance = null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at close window dialog." + e); + } + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + } + Dialog.closeDialog = closeDialog; + function messageParent(params) { + var message = params.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + var targetOrigin = params.hostCallArgs[Microsoft.Office.WebExtension.Parameters.TargetOrigin] || null; + if (!targetOrigin) { + var currentOrigin = window.location.origin; + if (!currentOrigin) { + currentOrigin = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + targetOrigin = currentOrigin; + } + if (shouldUseLocalStorageToPassMessage) { + try { + var messageKey = OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id + messageParentKey; + window.localStorage.setItem(messageKey, message); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during messageParent method:" + e); + } + } + } + else { + window.opener.postMessage(message, targetOrigin); + } + } + Dialog.messageParent = messageParent; + function sendMessage(params) { + if (windowInstance != null) { + var message = params.hostCallArgs; + var targetOrigin = message[Microsoft.Office.WebExtension.Parameters.TargetOrigin] || null; + delete message[Microsoft.Office.WebExtension.Parameters.TargetOrigin]; + if (!targetOrigin) { + var currentOrigin = window.location.origin; + if (!currentOrigin) { + currentOrigin = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + targetOrigin = currentOrigin; + } + if (typeof message != "string") { + message = JSON.stringify(message); + } + windowInstance.postMessage(message, targetOrigin); + } + } + Dialog.sendMessage = sendMessage; + function registerMessageReceivedEvent() { + function receiveCloseDialogMessage(event) { + if (event.source == window.opener) { + if (typeof event.data === "string" && event.data.indexOf(closeDialogKey) > -1) { + window.close(); + } + else { + var rawMessage = event.data, type = typeof rawMessage; + if (rawMessage && (type == "object" || type == "string")) { + var parsedMessage = (type == "string") ? JSON.parse(rawMessage) : rawMessage; + var message = {}; + message[OSF.DDA.PropertyDescriptors.MessageContent] = parsedMessage.messageContent; + message[OSF.DDA.PropertyDescriptors.MessageOrigin] = event.origin; + var eventArgs = OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived, null, message); + OSF.DialogParentMessageEventDispatch.fireEvent(eventArgs); + } + } + } + } + window.addEventListener("message", receiveCloseDialogMessage); + } + Dialog.registerMessageReceivedEvent = registerMessageReceivedEvent; + function setHandlerAndShowDialogCallback(onEventHandler, callback) { + handler = onEventHandler; + showDialogCallback = callback; + } + Dialog.setHandlerAndShowDialogCallback = setHandlerAndShowDialogCallback; + function escDismissDialogNotification() { + try { + if (dialogNotificationPanel && (dialogNotificationPanel.id == newWindowNotificationId) && showDialogCallback) { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore); + } + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback." + e); + } + } + dismissDialogNotification(); + } + Dialog.escDismissDialogNotification = escDismissDialogNotification; + function showCrossZoneNotification(windowUrl, hostType) { + var okButtonKeyDownClick = false; + var dialogCssManager = OfficeExt.WacCommonUICssManager.getDialogCssManager(hostType); + overlayElement = createOverlayElement(dialogCssManager); + document.body.insertBefore(overlayElement, document.body.firstChild); + dialogNotificationPanel = createNotificationPanelForCrossZoneIssue(dialogCssManager, windowUrl); + dialogNotificationPanel.id = crossZoneNotificationId; + var dialogNotificationButtonPanel = createButtonPanel(dialogCssManager); + var okButton = createButtonControl(dialogCssManager, Strings.OfficeOM.L_DialogOK ? Strings.OfficeOM.L_DialogOK : "OK"); + dialogNotificationButtonPanel.appendChild(okButton); + dialogNotificationPanel.appendChild(dialogNotificationButtonPanel); + document.body.insertBefore(dialogNotificationPanel, document.body.firstChild); + hasCrossZoneNotification = true; + okButton.onclick = function () { + dismissDialogNotification(); + }; + okButton.addEventListener("keydown", function (event) { + if (event.keyCode == 9) { + document.getElementById(configureBrowserLinkId).focus(); + event.preventDefault(); + event.stopPropagation(); + } + else if (event.keyCode == 13) { + okButtonKeyDownClick = true; + event.preventDefault(); + event.stopPropagation(); + } + }, false); + okButton.addEventListener("keyup", function (event) { + if (event.keyCode == 13 && okButtonKeyDownClick) { + okButtonKeyDownClick = false; + dismissDialogNotification(); + event.preventDefault(); + event.stopPropagation(); + } + }, false); + document.getElementById(configureBrowserLinkId).addEventListener("keydown", function (event) { + if (event.keyCode == 9) { + okButton.focus(); + event.preventDefault(); + event.stopPropagation(); + } + }, false); + window.focus(); + okButton.focus(); + } + Dialog.showCrossZoneNotification = showCrossZoneNotification; + function validateDialogDomain(dialogUrl, taskpaneUrl, allowSubdomains) { + if (allowSubdomains === void 0) { + allowSubdomains = true; + } + if (!dialogUrl || !taskpaneUrl) { + return false; + } + var httpsIdentifyString = "https:"; + var parsedDialogUrl = OSF.OUtil.parseUrl(dialogUrl); + var parsedTaskpaneUrl = OSF.OUtil.parseUrl(taskpaneUrl); + var appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + var isHttps = parsedDialogUrl.protocol === httpsIdentifyString; + if (!isHttps) { + return false; + } + var isSameDomain = parsedDialogUrl.protocol === parsedTaskpaneUrl.protocol + && parsedDialogUrl.hostname === parsedTaskpaneUrl.hostname + && parsedDialogUrl.port === parsedTaskpaneUrl.port; + var isInAppDomains = Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(appDomains, dialogUrl); + var isTrustedDomain = isSameDomain || isInAppDomains; + if (!isTrustedDomain && allowSubdomains) { + isTrustedDomain = Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(taskpaneUrl, dialogUrl); + } + return isTrustedDomain; + } + function receiveMessage(event) { + if (event.source == windowInstance) { + try { + var dialogOrigin = event.origin; + var taskpaneUrl = OSF._OfficeAppFactory.getInitializationHelper()._appContext._addInSourceUrl; + if (!taskpaneUrl) { + taskpaneUrl = window.location.origin; + if (!taskpaneUrl) { + taskpaneUrl = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + } + var isTrustedDomain = validateDialogDomain(dialogOrigin, taskpaneUrl, true); + if (!isTrustedDomain) { + throw new Error("Received a message from a dialog with an untrusted domain."); + } + var dialogMessageReceivedArgs = {}; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogMessageReceived; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent] = event.data; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin] = dialogOrigin; + handler(dialogMessageReceivedArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during receive message handler." + e); + } + } + } + } + function storageChangedHandler(event) { + var messageKey = OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id + messageParentKey; + if (event.key == messageKey) { + try { + var dialogMessageReceivedArgs = {}; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogMessageReceived; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent] = event.newValue; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin] = event.origin; + handler(dialogMessageReceivedArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during storage changed handler." + e); + } + } + } + } + function checkAppDomain(dialogInfo) { + var appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + var url = dialogInfo[OSF.ShowWindowDialogParameterKeys.Url]; + var fInDomain = Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(appDomains, url); + if (!fInDomain) { + var taskpaneUrl = OSF._OfficeAppFactory.getInitializationHelper()._appContext._addInSourceUrl; + if (!taskpaneUrl) { + taskpaneUrl = window.location.origin; + if (!taskpaneUrl) { + taskpaneUrl = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + } + return taskpaneUrl && Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(taskpaneUrl, url); + } + return fInDomain; + } + function showDialog(dialogInfo) { + var hostInfoObj = OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; + var hostInfoVals = [ + hostInfoObj.hostType, + hostInfoObj.hostPlatform, + hostInfoObj.hostSpecificFileVersion, + hostInfoObj.hostLocale, + hostInfoObj.osfControlAppCorrelationId, + "isDialog", + hostInfoObj.disableLogging ? "disableLogging" : "", + (hostInfoObj.flags & OSF.HostInfoFlags.PublicAddin) + ]; + var hostInfo = hostInfoVals.join("$"); + var appContext = OSF._OfficeAppFactory.getInitializationHelper()._appContext; + appContext._taskpaneUrl = window.location.origin; + if (!appContext._taskpaneUrl) { + appContext._taskpaneUrl = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + var windowUrl = dialogInfo[OSF.ShowWindowDialogParameterKeys.Url]; + if (!dialogInfo[OSF.ShowWindowDialogParameterKeys.UrlNoHostInfo]) { + windowUrl = OfficeExt.WACUtils.addHostInfoAsQueryParam(windowUrl, hostInfo); + } + var windowName = JSON.parse(window.name); + windowName[OSF.WindowNameItemKeys.HostInfo] = hostInfo; + windowName[OSF.WindowNameItemKeys.AppContext] = appContext; + var width = dialogInfo[OSF.ShowWindowDialogParameterKeys.Width] * screen.width / 100; + var height = dialogInfo[OSF.ShowWindowDialogParameterKeys.Height] * screen.height / 100; + var left = appContext._clientWindowWidth / 2 - width / 2; + var top = appContext._clientWindowHeight / 2 - height / 2; + var windowSpecs = "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top + ",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no"; + if (hostInfoObj.hostType === 'outlook' && hostInfoObj.hostPlatform === 'web' && hostInfoObj.flags & OSF.HostInfoFlags.IsMonarch) { + windowInstance = window.open('about:blank?unfiltered', OfficeExt.WACUtils.serializeObjectToString(windowName), windowSpecs); + if (windowInstance) { + windowInstance.location = windowUrl; + } + else { + windowInstance = window.open(windowUrl, OfficeExt.WACUtils.serializeObjectToString(windowName), windowSpecs); + } + } + else { + windowInstance = window.open(windowUrl, OfficeExt.WACUtils.serializeObjectToString(windowName), windowSpecs); + } + if (windowInstance == null) { + OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api."); + removeDialogNotificationElement(); + showCrossZoneNotification(windowUrl, hostInfoObj.hostType); + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone); + return; + } + if (shouldUseLocalStorageToPassMessage) { + window.addEventListener("storage", storageChangedHandler); + } + else { + window.addEventListener("message", receiveMessage); + } + function checkWindowClose() { + try { + if (windowInstance == null || windowInstance.closed) { + window.clearInterval(checkWindowDialogCloseInterval); + if (shouldUseLocalStorageToPassMessage) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } + var dialogClosedArgs = {}; + dialogClosedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogClosed; + handler(dialogClosedArgs); + } + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during check or handle window close." + e); + } + } + } + checkWindowDialogCloseInterval = window.setInterval(checkWindowClose, 1000); + if (showDialogCallback != null) { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("showDialogCallback can not be null."); + } + } + } + function createButtonControl(dialogCssManager, buttonValue) { + var buttonControl = document.createElement("input"); + buttonControl.setAttribute("type", "button"); + buttonControl.style.cssText = dialogCssManager.getDialogButtonCSS(); + buttonControl.style.borderColor = commonButtonBorderColor; + buttonControl.style.backgroundColor = commonButtonBackgroundColor; + buttonControl.setAttribute("value", buttonValue); + var buttonControlEventInHandler = function () { + handleButtonControlEventIn(buttonControl); + }; + var buttonControlEventOutHandler = function () { + handleButtonControlEventOut(buttonControl); + }; + buttonControl.addEventListener("mouseover", buttonControlEventInHandler); + buttonControl.addEventListener("focus", buttonControlEventInHandler); + buttonControl.addEventListener("mouseout", buttonControlEventOutHandler); + buttonControl.addEventListener("focusout", buttonControlEventOutHandler); + return buttonControl; + } + function handleButtonControlEventIn(buttonControl) { + if (hostThemeButtonStyle != null) { + buttonControl.style.borderColor = hostThemeButtonStyle.HostButtonBorderColor; + buttonControl.style.backgroundColor = hostThemeButtonStyle.HostButtonBackgroundColor; + } + else if (OSF.CommonUI && OSF.CommonUI.HostButtonBorderColor && OSF.CommonUI.HostButtonBackgroundColor) { + buttonControl.style.borderColor = OSF.CommonUI.HostButtonBorderColor; + buttonControl.style.backgroundColor = OSF.CommonUI.HostButtonBackgroundColor; + } + else { + buttonControl.style.backgroundColor = commonEventInButtonBackgroundColor; + } + } + function handleButtonControlEventOut(buttonControl) { + buttonControl.style.borderColor = commonButtonBorderColor; + buttonControl.style.backgroundColor = commonButtonBackgroundColor; + } + function dismissDialogNotification() { + function unregisterDialogNotificationShownEventCallback(status) { + removeDialogNotificationElement(); + setFocusOnFirstElement(status); + } + registerDialogNotificationShownArgs.onCalling = unregisterDialogNotificationShownEventCallback; + OSF.DDA.WAC.Delegate.unregisterEventAsync(registerDialogNotificationShownArgs); + } + function removeDialogNotificationElement() { + if (dialogNotificationPanel != null) { + document.body.removeChild(dialogNotificationPanel); + dialogNotificationPanel = null; + } + if (overlayElement != null) { + document.body.removeChild(overlayElement); + overlayElement = null; + } + } + function createOverlayElement(dialogCssManager) { + var overlayElement = document.createElement("div"); + overlayElement.style.cssText = dialogCssManager.getOverlayElementCSS(); + return overlayElement; + } + function createNotificationPanel(dialogCssManager, notificationString) { + var dialogNotificationPanel = document.createElement("div"); + dialogNotificationPanel.style.cssText = dialogCssManager.getDialogNotificationPanelCSS(); + setAttributeForDialogNotificationPanel(dialogNotificationPanel); + var dialogNotificationTextPanel = document.createElement("div"); + dialogNotificationTextPanel.style.cssText = dialogCssManager.getNewWindowNotificationTextPanelCSS(); + dialogNotificationTextPanel.id = dialogNotificationTextPanelId; + if (document.documentElement.getAttribute("dir") == "rtl") { + dialogNotificationTextPanel.style.paddingRight = "30px"; + } + else { + dialogNotificationTextPanel.style.paddingLeft = "30px"; + } + var dialogNotificationTextSpan = document.createElement("span"); + dialogNotificationTextSpan.style.cssText = dialogCssManager.getNewWindowNotificationTextSpanCSS(); + dialogNotificationTextSpan.innerText = notificationString; + dialogNotificationTextPanel.appendChild(dialogNotificationTextSpan); + dialogNotificationPanel.appendChild(dialogNotificationTextPanel); + return dialogNotificationPanel; + } + function createButtonPanel(dialogCssManager) { + var dialogNotificationButtonPanel = document.createElement("div"); + dialogNotificationButtonPanel.style.cssText = dialogCssManager.getDialogNotificationButtonPanelCSS(); + if (document.documentElement.getAttribute("dir") == "rtl") { + dialogNotificationButtonPanel.style.cssFloat = "left"; + } + else { + dialogNotificationButtonPanel.style.cssFloat = "right"; + } + return dialogNotificationButtonPanel; + } + function setFocusOnFirstElement(status) { + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var list = document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements); + OSF.OUtil.focusToFirstTabbable(list, false); + } + } + function createNotificationPanelForCrossZoneIssue(dialogCssManager, windowUrl) { + var dialogNotificationPanel = document.createElement("div"); + dialogNotificationPanel.style.cssText = dialogCssManager.getDialogNotificationPanelCSS(); + setAttributeForDialogNotificationPanel(dialogNotificationPanel); + var dialogNotificationTextPanel = document.createElement("div"); + dialogNotificationTextPanel.style.cssText = dialogCssManager.getCrossZoneNotificationTextPanelCSS(); + dialogNotificationTextPanel.id = dialogNotificationTextPanelId; + var configureBrowserLink = document.createElement("a"); + configureBrowserLink.id = configureBrowserLinkId; + configureBrowserLink.href = "#"; + configureBrowserLink.innerText = Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink; + configureBrowserLink.setAttribute("onclick", "window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"); + var dialogNotificationTextSpan = document.createElement("span"); + if (Strings.OfficeOM.L_NewWindowCrossZone) { + var dialogNotificationText = Strings.OfficeOM.L_NewWindowCrossZone.replace(/{1+}/gm, OfficeExt.WACUtils.getDomainForUrl(windowUrl)); + var dialogNotificationTextParts = dialogNotificationText.split("{0}"); + dialogNotificationTextSpan.appendChild(document.createTextNode(dialogNotificationTextParts[0])); + dialogNotificationTextSpan.appendChild(configureBrowserLink); + dialogNotificationTextSpan.appendChild(document.createTextNode(dialogNotificationTextParts[1])); + } + dialogNotificationTextPanel.appendChild(dialogNotificationTextSpan); + dialogNotificationPanel.appendChild(dialogNotificationTextPanel); + return dialogNotificationPanel; + } + function setAttributeForDialogNotificationPanel(dialogNotificationDiv) { + dialogNotificationDiv.setAttribute("role", "dialog"); + dialogNotificationDiv.setAttribute("aria-describedby", dialogNotificationTextPanelId); + } + })(Dialog = AddinNativeAction.Dialog || (AddinNativeAction.Dialog = {})); + })(AddinNativeAction = OfficeExt.AddinNativeAction || (OfficeExt.AddinNativeAction = {})); +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent }, + { name: OSF.DDA.PropertyDescriptors.MessageOrigin, value: OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent }, + { name: OSF.DDA.PropertyDescriptors.MessageOrigin, value: OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageOrigin } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidMessageParentMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.MessageToParent, value: OSF.DDA.Marshaling.MessageParentKeys.MessageToParent }, + { name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, value: OSF.DDA.Marshaling.MessageParentKeys.TargetOrigin } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSendMessageMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.MessageContent, value: OSF.DDA.Marshaling.SendMessageKeys.MessageContent }, + { name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, value: OSF.DDA.Marshaling.MessageParentKeys.TargetOrigin } + ] +}); +OSF.DDA.WAC.Delegate.openDialog = function OSF_DDA_WAC_Delegate$OpenDialog(args) { + var httpsIdentifyString = "https://"; + var httpIdentifyString = "http://"; + var dialogInfo = JSON.parse(args.targetId); + var callback = OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true, args); + function showDialogCallback(status) { + var payload = { "Error": status }; + try { + callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback." + e); + } + } + } + if (OSF.DialogShownStatus.hasDialogShown) { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); + return; + } + var dialogUrl = dialogInfo[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(); + var taskpaneUrl = (window.location.href).toLowerCase(); + if (OSF.AppTelemetry) { + var isSameDomain = false; + var parentIsSubdomain = false; + var childIsSubdomain = false; + var isAppDomain = false; + var dialogUrlPortionAllowedToLog = ""; + var taskpaneUrlPortionAllowedToLog = ""; + if (OSF.OUtil) { + var parsedDialogUrl = OSF.OUtil.parseUrl(dialogUrl); + var parsedTaskpaneUrl = OSF.OUtil.parseUrl(taskpaneUrl); + isSameDomain = parsedDialogUrl.protocol === parsedTaskpaneUrl.protocol + && parsedDialogUrl.hostname === parsedTaskpaneUrl.hostname + && parsedDialogUrl.port === parsedTaskpaneUrl.port; + dialogUrlPortionAllowedToLog = OSF.OUtil.getHostnamePortionForLogging(parsedDialogUrl.hostname); + if (isSameDomain) { + taskpaneUrlPortionAllowedToLog = dialogUrlPortionAllowedToLog; + } + else { + taskpaneUrlPortionAllowedToLog = OSF.OUtil.getHostnamePortionForLogging(parsedTaskpaneUrl.hostname); + parentIsSubdomain = Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(dialogUrl, taskpaneUrl); + childIsSubdomain = Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(taskpaneUrl, dialogUrl); + } + var appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + isAppDomain = Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(appDomains, dialogUrl); + } + var logJsonAsString = "openDialog isInline: " + dialogInfo[OSF.ShowWindowDialogParameterKeys.DisplayInIframe].toString() + ", " + "taskpaneHostname: " + taskpaneUrlPortionAllowedToLog + ", " + "dialogHostName: " + dialogUrlPortionAllowedToLog + ", " + "isSameDomain: " + isSameDomain.toString() + ", " + "parentIsSubdomain: " + parentIsSubdomain.toString() + ", " + "childIsSubdomain: " + childIsSubdomain.toString() + ", " + "isAppDomain: " + isAppDomain.toString(); + OSF.AppTelemetry.logAppCommonMessage(logJsonAsString); + } + if (dialogUrl == null || !(dialogUrl.substr(0, httpsIdentifyString.length) === httpsIdentifyString)) { + if (dialogUrl.substr(0, httpIdentifyString.length) === httpIdentifyString) { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS); + } + else { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme); + } + return; + } + if (!dialogInfo[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]) { + OSF.DialogShownStatus.isWindowDialog = true; + OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function OSF_DDA_WACDelegate$RegisterEventAsync_OnEvent(payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, showDialogCallback); + OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(dialogInfo); + } + else { + OSF.DialogShownStatus.isWindowDialog = false; + OSF.DDA.WAC.Delegate.registerEventAsync(args); + } +}; +OSF.DDA.WAC.Delegate.messageParent = function OSF_DDA_WAC_Delegate$MessageParent(args) { + if (window.opener != null) { + OfficeExt.AddinNativeAction.Dialog.messageParent(args); + } + else { + OSF.DDA.WAC.Delegate.executeAsync(args); + } +}; +OSF.DDA.WAC.Delegate.sendMessage = function OSF_DDA_WAC_Delegate$SendMessage(args) { + if (OSF.DialogShownStatus.hasDialogShown) { + if (OSF.DialogShownStatus.isWindowDialog) { + OfficeExt.AddinNativeAction.Dialog.sendMessage(args); + } + else { + OSF.DDA.WAC.Delegate.executeAsync(args); + } + } +}; +OSF.DDA.WAC.Delegate.closeDialog = function OSF_DDA_WAC_Delegate$CloseDialog(args) { + var callback = OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, args); + function closeDialogCallback(status) { + var payload = { "Error": status }; + try { + callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback." + e); + } + } + } + if (!OSF.DialogShownStatus.hasDialogShown) { + closeDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed); + } + else { + if (OSF.DialogShownStatus.isWindowDialog) { + if (args.onCalling) { + args.onCalling(); + } + OfficeExt.AddinNativeAction.Dialog.closeDialog(closeDialogCallback); + } + else { + OSF.DDA.WAC.Delegate.unregisterEventAsync(args); + } + } +}; +OSF.InitializationHelper.prototype.dismissDialogNotification = function OSF_InitializationHelper$dismissDialogNotification() { + OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification(); +}; +OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog = function OSF_InitializationHelper$registerMessageReceivedEventForWindowDialog() { + OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent(); +}; +Microsoft.Office.WebExtension.AccountTypeFilter = { + NoFilter: "noFilter", + AAD: "aad", + MSA: "msa" +}; +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth = function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.EnableNewHosts, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AccountTypeFilter, + value: { + "enum": Microsoft.Office.WebExtension.AccountTypeFilter, + "defaultValue": Microsoft.Office.WebExtension.AccountTypeFilter.NoFilter + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var _a; + var appContext = OSF._OfficeAppFactory.getInitializationHelper()._appContext; + if (appContext && appContext._wopiHostOriginForSingleSignOn) { + var addinTrustId = OSF.OUtil.Guid.generateNewGuid(); + window.parent.parent.postMessage("{\"MessageId\":\"AddinTrustedOrigin\",\"AddinTrustId\":\"" + addinTrustId + "\"}", appContext._wopiHostOriginForSingleSignOn); + callArgs[Microsoft.Office.WebExtension.Parameters.AddinTrustId] = addinTrustId; + } + if (window.Office.context.requirements.isSetSupported("JsonPayloadSSO")) { + var jsonParameterMap = (_a = {}, + _a[Microsoft.Office.WebExtension.Parameters.ForceConsent] = false, + _a[Microsoft.Office.WebExtension.Parameters.ForceAddAccount] = false, + _a[Microsoft.Office.WebExtension.Parameters.AuthChallenge] = true, + _a[Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt] = true, + _a[Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess] = true, + _a[Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt] = true, + _a[Microsoft.Office.WebExtension.Parameters.EnableNewHosts] = true, + _a[Microsoft.Office.WebExtension.Parameters.AccountTypeFilter] = true, + _a); + var jsonPayload = {}; + for (var _i = 0, _b = Object.keys(jsonParameterMap); _i < _b.length; _i++) { + var key = _b[_i]; + if (jsonParameterMap[key]) { + jsonPayload[key] = callArgs[key]; + } + delete callArgs[key]; + } + callArgs[Microsoft.Office.WebExtension.Parameters.JsonPayload] = JSON.stringify(jsonPayload); + } + return callArgs; + }, + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.OUtil.setNamespace("Marshaling", OSF.DDA); +OSF.OUtil.setNamespace("SingleSignOn", OSF.DDA.Marshaling); +OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys = { + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + AllowConsentPrompt: "allowConsentPrompt", + ForMSGraphAccess: "forMSGraphAccess", + AllowSignInPrompt: "allowSignInPrompt", + EnableNewHosts: "enableNewHosts", + AccountTypeFilter: "accountTypeFilter", + AddinTrustId: "addinTrustId" +}; +OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys = { + AccessToken: "accessToken" +}; +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AuthChallenge }, + { name: Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AllowConsentPrompt }, + { name: Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForMSGraphAccess }, + { name: Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AllowSignInPrompt }, + { name: Microsoft.Office.WebExtension.Parameters.EnableNewHosts, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.EnableNewHosts }, + { name: Microsoft.Office.WebExtension.Parameters.AccountTypeFilter, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AccountTypeFilter }, + { name: Microsoft.Office.WebExtension.Parameters.AddinTrustId, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AddinTrustId } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys.AccessToken } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ GetNestedAppAuthContextAsync: "getAuthContextAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync, + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.JsonData]; + var userObjectId = data.userObjectId || ""; + var tenantId = data.tenantId || ""; + var userPrincipalName = data.userPrincipalName || ""; + var authorityType = data.authorityType || ""; + return { + userObjectId: userObjectId, + tenantId: tenantId, + userPrincipalName: userPrincipalName, + authorityType: authorityType + }; + } +}); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetNestedAppAuthContextMethod, + toHost: [], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.JsonData, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ GetAuthContextAsync: "getAuthContextAsync" }); +OSF.DDA.WebAuth = function OSF_DDA_WebAuth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAuthContextAsync, + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.OUtil.setNamespace("Marshaling", OSF.DDA); +OSF.OUtil.setNamespace("WebAuth", OSF.DDA.Marshaling); +OSF.DDA.Marshaling.WebAuth.GetAuthContextKeys = {}; +OSF.DDA.Marshaling.WebAuth.GetAuthContextResultKeys = { + AuthContext: "authContext", + AppId: "appId", + MsaAppId: "msaAppId", + Upn: "upn", + UserId: "userId", + Authority: "authority", + AuthorityType: "authorityType", + IsAnonymous: "isAnonymous", + TenantId: "tenantId", + Error: "error", + SupportsAuthToken: "supportsAuthToken" +}; +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAuthContextMethod, + toHost: [], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.Marshaling.WebAuth.GetAuthContextResultKeys.AuthContext } + ] +}); +OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(Microsoft.Office.WebExtension.Parameters.Data, (function () { + var tableRows = "Rows"; + var tableHeaders = "Headers"; + return { + toHost: function OSF_DDA_XLS_Delegate_SpecialProcessor_Data$toHost(data) { + if (typeof data != "string" && data[OSF.DDA.TableDataProperties.TableRows] !== undefined) { + var tableData = {}; + tableData[tableRows] = data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.DDA.TableDataProperties.TableHeaders]; + data = tableData; + } + else if (OSF.DDA.DataCoercion.determineCoercionType(data) == Microsoft.Office.WebExtension.CoercionType.Text) { + data = [[data]]; + } + return data; + }, + fromHost: function OSF_DDA_XLS_Delegate_SpecialProcessor_Data$fromHost(hostArgs) { + var ret; + if (hostArgs[tableRows] != undefined) { + ret = {}; + ret[OSF.DDA.TableDataProperties.TableRows] = hostArgs[tableRows]; + ret[OSF.DDA.TableDataProperties.TableHeaders] = hostArgs[tableHeaders]; + } + else { + ret = hostArgs; + } + return ret; + } + }; +})()); +OSF.DDA.ExcelDocument = function Microsoft_Office_WebExtension_ExcelDocument(officeAppContext, settings) { + var bf = new OSF.DDA.BindingFacade(this); + OSF.DDA.DispIdHost.addAsyncMethods(bf, [OSF.DDA.AsyncMethodNames.AddFromPromptAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GoToByIdAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync]); + OSF.DDA.ExcelDocument.uber.constructor.call(this, officeAppContext, bf, settings); + if (this.mode == OSF.ClientMode.ReadOnly) { + this.url = document.URL; + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelDocument, OSF.DDA.JsomDocument); +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + appContext.doc = new OSF.DDA.ExcelDocument(appContext, this._initializeSettings(appContext, true)); + OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + OSF.DDA.RichApi.richApiMessageManager = new OfficeExt.RichApiMessageManager(); + appReady(); +}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)); +}; +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { + OSF.WebApp._UpdateLinksForHostAndXdmInfo(); + var license = new OSF.DDA.License(appContext.get_eToken()); + this.initWebDialog(appContext); + this.initWebAuth(appContext); + this.initWebAuthImplicit(appContext); + appContext.messaging = new OfficeExt.Messaging.ExtensionCommunicationManager(); + appContext.extensionLifeCycle = new OfficeExt.LifeCycle.ExtensionLifeCycleManager(); + if (!appContext.ui) { + appContext.ui = {}; + } + appContext.ui.ribbonGallery = new OfficeExt.UI.RibbonGallery(); + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license)); + var getDelegateMethods = OSF.DDA.WAC.getDelegateMethods; + var parameterMap = OSF.DDA.WAC.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods, parameterMap)); + var appCommandHandler = OfficeExt.AppCommand.AppCommandManager.instance(); + appCommandHandler.initializeAndChangeOnce(); +}; +OSF.InitializationHelper.prototype.getInitializationReason = function (appContext) { return appContext.get_reason(); }; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExtension; +(function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire = function () { + return null; + }(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + var PromiseImpl; + (function (PromiseImpl) { + function Init() { + return (function () { + "use strict"; + function lib$es6$promise$utils$$objectOrFunction(x) { + return typeof x === 'function' || (typeof x === 'object' && x !== null); + } + function lib$es6$promise$utils$$isFunction(x) { + return typeof x === 'function'; + } + function lib$es6$promise$utils$$isMaybeThenable(x) { + return typeof x === 'object' && x !== null; + } + var lib$es6$promise$utils$$_isArray; + if (!Array.isArray) { + lib$es6$promise$utils$$_isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; + } + else { + lib$es6$promise$utils$$_isArray = Array.isArray; + } + var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray; + var lib$es6$promise$asap$$len = 0; + var lib$es6$promise$asap$$toString = {}.toString; + var lib$es6$promise$asap$$vertxNext; + var lib$es6$promise$asap$$customSchedulerFn; + var lib$es6$promise$asap$$asap = function asap(callback, arg) { + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback; + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg; + lib$es6$promise$asap$$len += 2; + if (lib$es6$promise$asap$$len === 2) { + if (lib$es6$promise$asap$$customSchedulerFn) { + lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush); + } + else { + lib$es6$promise$asap$$scheduleFlush(); + } + } + }; + function lib$es6$promise$asap$$setScheduler(scheduleFn) { + lib$es6$promise$asap$$customSchedulerFn = scheduleFn; + } + function lib$es6$promise$asap$$setAsap(asapFn) { + lib$es6$promise$asap$$asap = asapFn; + } + var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined; + var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {}; + var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver; + var lib$es6$promise$asap$$isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && + typeof importScripts !== 'undefined' && + typeof MessageChannel !== 'undefined'; + function lib$es6$promise$asap$$useNextTick() { + var nextTick = process.nextTick; + var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); + if (Array.isArray(version) && version[1] === '0' && version[2] === '10') { + nextTick = window.setImmediate; + } + return function () { + nextTick(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useVertxTimer() { + return function () { + lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useMutationObserver() { + var iterations = 0; + var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + return function () { + node.data = (iterations = ++iterations % 2); + }; + } + function lib$es6$promise$asap$$useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = lib$es6$promise$asap$$flush; + return function () { + channel.port2.postMessage(0); + }; + } + function lib$es6$promise$asap$$useSetTimeout() { + return function () { + setTimeout(lib$es6$promise$asap$$flush, 1); + }; + } + var lib$es6$promise$asap$$queue = new Array(1000); + function lib$es6$promise$asap$$flush() { + for (var i = 0; i < lib$es6$promise$asap$$len; i += 2) { + var callback = lib$es6$promise$asap$$queue[i]; + var arg = lib$es6$promise$asap$$queue[i + 1]; + callback(arg); + lib$es6$promise$asap$$queue[i] = undefined; + lib$es6$promise$asap$$queue[i + 1] = undefined; + } + lib$es6$promise$asap$$len = 0; + } + var lib$es6$promise$asap$$scheduleFlush; + if (lib$es6$promise$asap$$isNode) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick(); + } + else if (lib$es6$promise$asap$$isWorker) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel(); + } + else { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout(); + } + function lib$es6$promise$$internal$$noop() { } + var lib$es6$promise$$internal$$PENDING = void 0; + var lib$es6$promise$$internal$$FULFILLED = 1; + var lib$es6$promise$$internal$$REJECTED = 2; + var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$selfFullfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function lib$es6$promise$$internal$$cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); + } + function lib$es6$promise$$internal$$getThen(promise) { + try { + return promise.then; + } + catch (error) { + lib$es6$promise$$internal$$GET_THEN_ERROR.error = error; + return lib$es6$promise$$internal$$GET_THEN_ERROR; + } + } + function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } + catch (e) { + return e; + } + } + function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) { + lib$es6$promise$asap$$asap(function (promise) { + var sealed = false; + var error = lib$es6$promise$$internal$$tryThen(then, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + lib$es6$promise$$internal$$reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + if (!sealed && error) { + sealed = true; + lib$es6$promise$$internal$$reject(promise, error); + } + }, promise); + } + function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) { + if (thenable._state === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, thenable._result); + } + else if (thenable._state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, thenable._result); + } + else { + lib$es6$promise$$internal$$subscribe(thenable, undefined, function (value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function (reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + } + function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable) { + if (maybeThenable.constructor === promise.constructor) { + lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable); + } + else { + var then = lib$es6$promise$$internal$$getThen(maybeThenable); + if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error); + } + else if (then === undefined) { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + else if (lib$es6$promise$utils$$isFunction(then)) { + lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then); + } + else { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + } + } + function lib$es6$promise$$internal$$resolve(promise, value) { + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFullfillment()); + } + else if (lib$es6$promise$utils$$objectOrFunction(value)) { + lib$es6$promise$$internal$$handleMaybeThenable(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + } + function lib$es6$promise$$internal$$publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + lib$es6$promise$$internal$$publish(promise); + } + function lib$es6$promise$$internal$$fulfill(promise, value) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._result = value; + promise._state = lib$es6$promise$$internal$$FULFILLED; + if (promise._subscribers.length !== 0) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise); + } + } + function lib$es6$promise$$internal$$reject(promise, reason) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._state = lib$es6$promise$$internal$$REJECTED; + promise._result = reason; + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise); + } + function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) { + var subscribers = parent._subscribers; + var length = subscribers.length; + parent._onerror = null; + subscribers[length] = child; + subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment; + subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection; + if (length === 0 && parent._state) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent); + } + } + function lib$es6$promise$$internal$$publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + if (subscribers.length === 0) { + return; + } + var child, callback, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + if (child) { + lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail); + } + else { + callback(detail); + } + } + promise._subscribers.length = 0; + } + function lib$es6$promise$$internal$$ErrorObject() { + this.error = null; + } + var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$tryCatch(callback, detail) { + try { + return callback(detail); + } + catch (e) { + lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e; + return lib$es6$promise$$internal$$TRY_CATCH_ERROR; + } + } + function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) { + var hasCallback = lib$es6$promise$utils$$isFunction(callback), value, error, succeeded, failed; + if (hasCallback) { + value = lib$es6$promise$$internal$$tryCatch(callback, detail); + if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value = null; + } + else { + succeeded = true; + } + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn()); + return; + } + } + else { + value = detail; + succeeded = true; + } + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + } + else if (hasCallback && succeeded) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else if (failed) { + lib$es6$promise$$internal$$reject(promise, error); + } + else if (settled === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, value); + } + else if (settled === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + } + function lib$es6$promise$$internal$$initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function rejectPromise(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + catch (e) { + lib$es6$promise$$internal$$reject(promise, e); + } + } + function lib$es6$promise$enumerator$$Enumerator(Constructor, input) { + var enumerator = this; + enumerator._instanceConstructor = Constructor; + enumerator.promise = new Constructor(lib$es6$promise$$internal$$noop); + if (enumerator._validateInput(input)) { + enumerator._input = input; + enumerator.length = input.length; + enumerator._remaining = input.length; + enumerator._init(); + if (enumerator.length === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + else { + enumerator.length = enumerator.length || 0; + enumerator._enumerate(); + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + } + } + else { + lib$es6$promise$$internal$$reject(enumerator.promise, enumerator._validationError()); + } + } + lib$es6$promise$enumerator$$Enumerator.prototype._validateInput = function (input) { + return lib$es6$promise$utils$$isArray(input); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._validationError = function () { + return new _Internal.Error('Array Methods must be provided an Array'); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._init = function () { + this._result = new Array(this.length); + }; + var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator; + lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function () { + var enumerator = this; + var length = enumerator.length; + var promise = enumerator.promise; + var input = enumerator._input; + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + enumerator._eachEntry(input[i], i); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function (entry, i) { + var enumerator = this; + var c = enumerator._instanceConstructor; + if (lib$es6$promise$utils$$isMaybeThenable(entry)) { + if (entry.constructor === c && entry._state !== lib$es6$promise$$internal$$PENDING) { + entry._onerror = null; + enumerator._settledAt(entry._state, i, entry._result); + } + else { + enumerator._willSettleAt(c.resolve(entry), i); + } + } + else { + enumerator._remaining--; + enumerator._result[i] = entry; + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function (state, i, value) { + var enumerator = this; + var promise = enumerator.promise; + if (promise._state === lib$es6$promise$$internal$$PENDING) { + enumerator._remaining--; + if (state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + else { + enumerator._result[i] = value; + } + } + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(promise, enumerator._result); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function (promise, i) { + var enumerator = this; + lib$es6$promise$$internal$$subscribe(promise, undefined, function (value) { + enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value); + }, function (reason) { + enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason); + }); + }; + function lib$es6$promise$promise$all$$all(entries) { + return new lib$es6$promise$enumerator$$default(this, entries).promise; + } + var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all; + function lib$es6$promise$promise$race$$race(entries) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + if (!lib$es6$promise$utils$$isArray(entries)) { + lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.')); + return promise; + } + var length = entries.length; + function onFulfillment(value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + function onRejection(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + } + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); + } + return promise; + } + var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race; + function lib$es6$promise$promise$resolve$$resolve(object) { + var Constructor = this; + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$resolve(promise, object); + return promise; + } + var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve; + function lib$es6$promise$promise$reject$$reject(reason) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$reject(promise, reason); + return promise; + } + var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject; + var lib$es6$promise$promise$$counter = 0; + function lib$es6$promise$promise$$needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); + } + function lib$es6$promise$promise$$needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise; + function lib$es6$promise$promise$$Promise(resolver) { + this._id = lib$es6$promise$promise$$counter++; + this._state = undefined; + this._result = undefined; + this._subscribers = []; + if (lib$es6$promise$$internal$$noop !== resolver) { + if (!lib$es6$promise$utils$$isFunction(resolver)) { + lib$es6$promise$promise$$needsResolver(); + } + if (!(this instanceof lib$es6$promise$promise$$Promise)) { + lib$es6$promise$promise$$needsNew(); + } + lib$es6$promise$$internal$$initializePromise(this, resolver); + } + } + lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default; + lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default; + lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default; + lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default; + lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler; + lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap; + lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap; + lib$es6$promise$promise$$Promise.prototype = { + constructor: lib$es6$promise$promise$$Promise, + then: function (onFulfillment, onRejection) { + var parent = this; + var state = parent._state; + if (state === lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state === lib$es6$promise$$internal$$REJECTED && !onRejection) { + return this; + } + var child = new this.constructor(lib$es6$promise$$internal$$noop); + var result = parent._result; + if (state) { + var callback = arguments[state - 1]; + lib$es6$promise$asap$$asap(function () { + lib$es6$promise$$internal$$invokeCallback(state, child, callback, result); + }); + } + else { + lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection); + } + return child; + }, + 'catch': function (onRejection) { + return this.then(null, onRejection); + } + }; + return lib$es6$promise$promise$$default; + }).call(this); + } + PromiseImpl.Init = Init; + })(PromiseImpl = _Internal.PromiseImpl || (_Internal.PromiseImpl = {})); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + function isEdgeLessThan14() { + var userAgent = window.navigator.userAgent; + var versionIdx = userAgent.indexOf("Edge/"); + if (versionIdx >= 0) { + userAgent = userAgent.substring(versionIdx + 5, userAgent.length); + if (userAgent < "14.14393") + return true; + else + return false; + } + return false; + } + function determinePromise() { + if (typeof (window) === "undefined" && typeof (Promise) === "function") { + return Promise; + } + if (typeof (window) !== "undefined" && window.Promise) { + if (isEdgeLessThan14()) { + return _Internal.PromiseImpl.Init(); + } + else { + return window.Promise; + } + } + else { + return _Internal.PromiseImpl.Init(); + } + } + _Internal.OfficePromise = determinePromise(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + var OfficePromise = _Internal.OfficePromise; + OfficeExtension.Promise = OfficePromise; +})(OfficeExtension || (OfficeExtension = {})); +var OfficeExtension; +(function (OfficeExtension_1) { + var SessionBase = (function () { + function SessionBase() { + } + SessionBase.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + SessionBase.prototype._createRequestExecutorOrNull = function () { + return null; + }; + SessionBase.prototype.getEventRegistration = function (controlId) { + return null; + }; + return SessionBase; + }()); + OfficeExtension_1.SessionBase = SessionBase; + var HttpUtility = (function () { + function HttpUtility() { + } + HttpUtility.setCustomSendRequestFunc = function (func) { + HttpUtility.s_customSendRequestFunc = func; + }; + HttpUtility.xhrSendRequestFunc = function (request) { + return CoreUtility.createPromise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open(request.method, request.url); + xhr.onload = function () { + var resp = { + statusCode: xhr.status, + headers: CoreUtility._parseHttpResponseHeaders(xhr.getAllResponseHeaders()), + body: xhr.responseText + }; + resolve(resp); + }; + xhr.onerror = function () { + reject(new _Internal.RuntimeError({ + code: CoreErrorCodes.connectionFailure, + httpStatusCode: xhr.status, + message: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, xhr.statusText) + })); + }; + if (request.headers) { + for (var key in request.headers) { + xhr.setRequestHeader(key, request.headers[key]); + } + } + xhr.send(CoreUtility._getRequestBodyText(request)); + }); + }; + HttpUtility.fetchSendRequestFunc = function (request) { + var requestBodyText = CoreUtility._getRequestBodyText(request); + if (requestBodyText === '') { + requestBodyText = undefined; + } + return fetch(request.url, { + method: request.method, + headers: request.headers, + body: requestBodyText + }) + .then(function (resp) { + return resp.text() + .then(function (body) { + var statusCode = resp.status; + var headers = {}; + resp.headers.forEach(function (value, name) { + headers[name] = value; + }); + var ret = { statusCode: statusCode, headers: headers, body: body }; + return ret; + }); + }); + }; + HttpUtility.sendRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func = HttpUtility.s_customSendRequestFunc; + if (!func) { + if (typeof (fetch) !== 'undefined') { + func = HttpUtility.fetchSendRequestFunc; + } + else { + func = HttpUtility.xhrSendRequestFunc; + } + } + return func(request); + }; + HttpUtility.setCustomSendLocalDocumentRequestFunc = function (func) { + HttpUtility.s_customSendLocalDocumentRequestFunc = func; + }; + HttpUtility.sendLocalDocumentRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func; + func = HttpUtility.s_customSendLocalDocumentRequestFunc || HttpUtility.officeJsSendLocalDocumentRequestFunc; + return func(request); + }; + HttpUtility.officeJsSendLocalDocumentRequestFunc = function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestSafeArray = CoreUtility._buildRequestMessageSafeArray(request); + return CoreUtility.createPromise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { + var response; + if (asyncResult.status == 'succeeded') { + response = { + statusCode: RichApiMessageUtility.getResponseStatusCode(asyncResult), + headers: RichApiMessageUtility.getResponseHeaders(asyncResult), + body: RichApiMessageUtility.getResponseBody(asyncResult) + }; + } + else { + response = RichApiMessageUtility.buildHttpResponseFromOfficeJsError(asyncResult.error.code, asyncResult.error.message); + } + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(response)); + resolve(response); + }); + }); + }; + HttpUtility.validateAndNormalizeRequest = function (request) { + if (CoreUtility.isNullOrUndefined(request)) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + if (CoreUtility.isNullOrEmptyString(request.method)) { + request.method = 'GET'; + } + request.method = request.method.toUpperCase(); + var alreadyHasTestName = false; + if (typeof (request.headers) === 'object' && request.headers[CoreConstants.testRequestNameHeader]) { + alreadyHasTestName = true; + } + if (!alreadyHasTestName) { + var currentTestName = TestUtility._getCurrentTestNameWithSequenceId(); + if (currentTestName) { + if (!request.headers) { + request.headers = {}; + } + request.headers[CoreConstants.testRequestNameHeader] = currentTestName; + } + } + }; + HttpUtility.logRequest = function (request) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Request---'); + CoreUtility.log(request.method + ' ' + request.url); + if (request.headers) { + for (var key in request.headers) { + CoreUtility.log(key + ': ' + request.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(CoreUtility._getRequestBodyText(request)); + } + } + }; + HttpUtility.logResponse = function (response) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Response---'); + CoreUtility.log('' + response.statusCode); + if (response.headers) { + for (var key in response.headers) { + CoreUtility.log(key + ': ' + response.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(response.body); + } + } + }; + HttpUtility._logBodyEnabled = false; + return HttpUtility; + }()); + OfficeExtension_1.HttpUtility = HttpUtility; + var HostBridge = (function () { + function HostBridge(m_bridge) { + var _this = this; + this.m_bridge = m_bridge; + this.m_promiseResolver = {}; + this.m_handlers = []; + this.m_bridge.onMessageFromHost = function (messageText) { + var message = JSON.parse(messageText); + if (message.type == 3) { + var genericMessageBody = message.message; + if (genericMessageBody && genericMessageBody.entries) { + for (var i = 0; i < genericMessageBody.entries.length; i++) { + var entryObjectOrArray = genericMessageBody.entries[i]; + if (Array.isArray(entryObjectOrArray)) { + var entry = { + messageCategory: entryObjectOrArray[0], + messageType: entryObjectOrArray[1], + targetId: entryObjectOrArray[2], + message: entryObjectOrArray[3], + id: entryObjectOrArray[4] + }; + genericMessageBody.entries[i] = entry; + } + } + } + } + _this.dispatchMessage(message); + }; + } + HostBridge.init = function (bridge) { + if (typeof bridge !== 'object' || !bridge) { + return; + } + var instance = new HostBridge(bridge); + HostBridge.s_instance = instance; + HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var index = request.url.indexOf('?'); + if (index >= 0) { + var query = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(query); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + } + if (typeof (request.body) === "string") { + request.body = JSON.parse(request.body); + } + var bridgeMessage = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + message: request + }; + return instance.sendMessageToHostAndExpectResponse(bridgeMessage).then(function (bridgeResponse) { + var responseInfo = bridgeResponse.message; + return responseInfo; + }); + }); + for (var i = 0; i < HostBridge.s_onInitedHandlers.length; i++) { + HostBridge.s_onInitedHandlers[i](instance); + } + }; + Object.defineProperty(HostBridge, "instance", { + get: function () { + return HostBridge.s_instance; + }, + enumerable: true, + configurable: true + }); + HostBridge.prototype.sendMessageToHost = function (message) { + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + }; + HostBridge.prototype.sendMessageToHostAndExpectResponse = function (message) { + var _this = this; + var ret = CoreUtility.createPromise(function (resolve, reject) { + _this.m_promiseResolver[message.id] = resolve; + }); + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + return ret; + }; + HostBridge.prototype.addHostMessageHandler = function (handler) { + this.m_handlers.push(handler); + }; + HostBridge.prototype.removeHostMessageHandler = function (handler) { + var index = this.m_handlers.indexOf(handler); + if (index >= 0) { + this.m_handlers.splice(index, 1); + } + }; + HostBridge.onInited = function (handler) { + HostBridge.s_onInitedHandlers.push(handler); + if (HostBridge.s_instance) { + handler(HostBridge.s_instance); + } + }; + HostBridge.prototype.dispatchMessage = function (message) { + if (typeof message.id === 'number') { + var resolve = this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + delete this.m_promiseResolver[message.id]; + return; + } + } + for (var i = 0; i < this.m_handlers.length; i++) { + this.m_handlers[i](message); + } + }; + HostBridge.nextId = function () { + return HostBridge.s_nextId++; + }; + HostBridge.s_onInitedHandlers = []; + HostBridge.s_nextId = 1; + return HostBridge; + }()); + OfficeExtension_1.HostBridge = HostBridge; + if (typeof _richApiNativeBridge === 'object' && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var _Internal; + (function (_Internal) { + var RuntimeError = (function (_super) { + __extends(RuntimeError, _super); + function RuntimeError(error) { + var _this = _super.call(this, typeof error === 'string' ? error : error.message) || this; + Object.setPrototypeOf(_this, RuntimeError.prototype); + _this.name = 'RichApi.Error'; + if (typeof error === 'string') { + _this.message = error; + } + else { + _this.code = error.code; + _this.message = error.message; + _this.traceMessages = error.traceMessages || []; + _this.innerError = error.innerError || null; + _this.debugInfo = _this._createDebugInfo(error.debugInfo || {}); + _this.httpStatusCode = error.httpStatusCode; + _this.data = error.data; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode) || _this.httpStatusCode === 200) { + var mapping = {}; + mapping[CoreErrorCodes.accessDenied] = 401; + mapping[CoreErrorCodes.connectionFailure] = 500; + mapping[CoreErrorCodes.generalException] = 500; + mapping[CoreErrorCodes.invalidArgument] = 400; + mapping[CoreErrorCodes.invalidObjectPath] = 400; + mapping[CoreErrorCodes.invalidOrTimedOutSession] = 408; + mapping[CoreErrorCodes.invalidRequestContext] = 400; + mapping[CoreErrorCodes.timeout] = 408; + mapping[CoreErrorCodes.valueNotLoaded] = 400; + _this.httpStatusCode = mapping[_this.code]; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode)) { + _this.httpStatusCode = 500; + } + return _this; + } + RuntimeError.prototype.toString = function () { + return this.code + ': ' + this.message; + }; + RuntimeError.prototype._createDebugInfo = function (partialDebugInfo) { + var debugInfo = { + code: this.code, + message: this.message + }; + debugInfo.toString = function () { + return JSON.stringify(this); + }; + for (var key in partialDebugInfo) { + debugInfo[key] = partialDebugInfo[key]; + } + if (this.innerError) { + if (this.innerError instanceof _Internal.RuntimeError) { + debugInfo.innerError = this.innerError.debugInfo; + } + else { + debugInfo.innerError = this.innerError; + } + } + return debugInfo; + }; + RuntimeError._createInvalidArgError = function (error) { + return new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility.isNullOrEmptyString(error.argumentName) + ? CoreUtility._getResourceString(CoreResourceStrings.invalidArgumentGeneric) + : CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, error.argumentName), + debugInfo: error.errorLocation ? { errorLocation: error.errorLocation } : {}, + innerError: error.innerError + }); + }; + return RuntimeError; + }(Error)); + _Internal.RuntimeError = RuntimeError; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + OfficeExtension_1.Error = _Internal.RuntimeError; + var CoreErrorCodes = (function () { + function CoreErrorCodes() { + } + CoreErrorCodes.apiNotFound = 'ApiNotFound'; + CoreErrorCodes.accessDenied = 'AccessDenied'; + CoreErrorCodes.generalException = 'GeneralException'; + CoreErrorCodes.activityLimitReached = 'ActivityLimitReached'; + CoreErrorCodes.invalidArgument = 'InvalidArgument'; + CoreErrorCodes.connectionFailure = 'ConnectionFailure'; + CoreErrorCodes.timeout = 'Timeout'; + CoreErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + CoreErrorCodes.invalidObjectPath = 'InvalidObjectPath'; + CoreErrorCodes.invalidRequestContext = 'InvalidRequestContext'; + CoreErrorCodes.valueNotLoaded = 'ValueNotLoaded'; + CoreErrorCodes.requestPayloadSizeLimitExceeded = 'RequestPayloadSizeLimitExceeded'; + CoreErrorCodes.responsePayloadSizeLimitExceeded = 'ResponsePayloadSizeLimitExceeded'; + CoreErrorCodes.writeNotSupportedWhenModalDialogOpen = 'WriteNotSupportedWhenModalDialogOpen'; + return CoreErrorCodes; + }()); + OfficeExtension_1.CoreErrorCodes = CoreErrorCodes; + var CoreResourceStrings = (function () { + function CoreResourceStrings() { + } + CoreResourceStrings.apiNotFoundDetails = 'ApiNotFoundDetails'; + CoreResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + CoreResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + CoreResourceStrings.invalidArgument = 'InvalidArgument'; + CoreResourceStrings.invalidArgumentGeneric = 'InvalidArgumentGeneric'; + CoreResourceStrings.timeout = 'Timeout'; + CoreResourceStrings.invalidOrTimedOutSessionMessage = 'InvalidOrTimedOutSessionMessage'; + CoreResourceStrings.invalidSheetName = 'InvalidSheetName'; + CoreResourceStrings.invalidObjectPath = 'InvalidObjectPath'; + CoreResourceStrings.invalidRequestContext = 'InvalidRequestContext'; + CoreResourceStrings.valueNotLoaded = 'ValueNotLoaded'; + return CoreResourceStrings; + }()); + OfficeExtension_1.CoreResourceStrings = CoreResourceStrings; + var CoreConstants = (function () { + function CoreConstants() { + } + CoreConstants.flags = 'flags'; + CoreConstants.sourceLibHeader = 'SdkVersion'; + CoreConstants.processQuery = 'ProcessQuery'; + CoreConstants.localDocument = 'http://document.localhost/'; + CoreConstants.localDocumentApiPrefix = 'http://document.localhost/_api/'; + CoreConstants.customData = 'customdata'; + CoreConstants.testRequestNameHeader = 'x-test-request-name'; + return CoreConstants; + }()); + OfficeExtension_1.CoreConstants = CoreConstants; + var RichApiMessageUtility = (function () { + function RichApiMessageUtility() { + } + RichApiMessageUtility.buildMessageArrayForIRequestExecutor = function (customData, requestFlags, requestMessage, sourceLibHeaderValue) { + var requestMessageText = JSON.stringify(requestMessage.Body); + CoreUtility.log('Request:'); + CoreUtility.log(requestMessageText); + var headers = {}; + CoreUtility._copyHeaders(requestMessage.Headers, headers); + headers[CoreConstants.sourceLibHeader] = sourceLibHeaderValue; + var messageSafearray = RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, 'POST', CoreConstants.processQuery, headers, requestMessageText); + return messageSafearray; + }; + RichApiMessageUtility.buildResponseOnSuccess = function (responseBody, responseHeaders) { + var response = { HttpStatusCode: 200, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.Body = JSON.parse(responseBody); + response.Headers = responseHeaders; + return response; + }; + RichApiMessageUtility.buildResponseOnError = function (errorCode, message) { + var response = { HttpStatusCode: 500, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.ErrorCode = CoreErrorCodes.generalException; + response.ErrorMessage = message; + if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + response.ErrorCode = CoreErrorCodes.accessDenied; + response.HttpStatusCode = 401; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + response.ErrorCode = CoreErrorCodes.activityLimitReached; + response.HttpStatusCode = 429; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession) { + response.ErrorCode = CoreErrorCodes.invalidOrTimedOutSession; + response.HttpStatusCode = 408; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidOrTimedOutSessionMessage); + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.requestPayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.responsePayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen) { + response.ErrorCode = CoreErrorCodes.writeNotSupportedWhenModalDialogOpen; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName) { + response.ErrorCode = CoreErrorCodes.invalidRequestContext; + response.HttpStatusCode = 400; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidSheetName); + } + return response; + }; + RichApiMessageUtility.buildHttpResponseFromOfficeJsError = function (errorCode, message) { + var statusCode = 500; + var errorBody = {}; + errorBody['error'] = {}; + errorBody['error']['code'] = CoreErrorCodes.generalException; + errorBody['error']['message'] = message; + if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + statusCode = 403; + errorBody['error']['code'] = CoreErrorCodes.accessDenied; + } + else if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + statusCode = 429; + errorBody['error']['code'] = CoreErrorCodes.activityLimitReached; + } + return { statusCode: statusCode, headers: {}, body: JSON.stringify(errorBody) }; + }; + RichApiMessageUtility.buildRequestMessageSafeArray = function (customData, requestFlags, method, path, headers, body) { + var headerArray = []; + if (headers) { + for (var headerName in headers) { + headerArray.push(headerName); + headerArray.push(headers[headerName]); + } + } + var appPermission = 0; + var solutionId = ''; + var instanceId = ''; + var marketplaceType = ''; + var solutionVersion = ''; + var storeLocation = ''; + var compliantSolutionId = ''; + return [ + customData, + method, + path, + headerArray, + body, + appPermission, + requestFlags, + solutionId, + instanceId, + marketplaceType, + solutionVersion, + storeLocation, + compliantSolutionId + ]; + }; + RichApiMessageUtility.getResponseBody = function (result) { + return RichApiMessageUtility.getResponseBodyFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseHeaders = function (result) { + return RichApiMessageUtility.getResponseHeadersFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseBodyFromSafeArray = function (data) { + var ret = data[2]; + if (typeof ret === 'string') { + return ret; + } + var arr = ret; + return arr.join(''); + }; + RichApiMessageUtility.getResponseHeadersFromSafeArray = function (data) { + var arrayHeader = data[1]; + if (!arrayHeader) { + return null; + } + var headers = {}; + for (var i = 0; i < arrayHeader.length - 1; i += 2) { + headers[arrayHeader[i]] = arrayHeader[i + 1]; + } + return headers; + }; + RichApiMessageUtility.getResponseStatusCode = function (result) { + return RichApiMessageUtility.getResponseStatusCodeFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseStatusCodeFromSafeArray = function (data) { + return data[0]; + }; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession = 5012; + RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached = 5102; + RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability = 7000; + RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded = 5103; + RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded = 5104; + RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen = 5016; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName = 1014; + return RichApiMessageUtility; + }()); + OfficeExtension_1.RichApiMessageUtility = RichApiMessageUtility; + (function (_Internal) { + function getPromiseType() { + if (typeof Promise !== 'undefined') { + return Promise; + } + if (typeof Office !== 'undefined') { + if (Office.Promise) { + return Office.Promise; + } + } + if (typeof OfficeExtension !== 'undefined') { + if (OfficeExtension.Promise) { + return OfficeExtension.Promise; + } + } + throw new _Internal.Error('No Promise implementation found'); + } + _Internal.getPromiseType = getPromiseType; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var CoreUtility = (function () { + function CoreUtility() { + } + CoreUtility.log = function (message) { + if (CoreUtility._logEnabled && typeof console !== 'undefined' && console.log) { + console.log(message); + } + }; + CoreUtility.checkArgumentNull = function (value, name) { + if (CoreUtility.isNullOrUndefined(value)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: name }); + } + }; + CoreUtility.isNullOrUndefined = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isUndefined = function (value) { + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isNullOrEmptyString = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + if (value.length == 0) { + return true; + } + return false; + }; + CoreUtility.isPlainJsonObject = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return false; + } + if (typeof value !== 'object') { + return false; + } + if (Object.prototype.toString.apply(value) !== '[object Object]') { + return false; + } + if (value.constructor && + !Object.prototype.hasOwnProperty.call(value, 'constructor') && + !Object.prototype.hasOwnProperty.call(value.constructor.prototype, 'hasOwnProperty')) { + return false; + } + for (var key in value) { + if (!Object.prototype.hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + }; + CoreUtility.trim = function (str) { + return str.replace(new RegExp('^\\s+|\\s+$', 'g'), ''); + }; + CoreUtility.caseInsensitiveCompareString = function (str1, str2) { + if (CoreUtility.isNullOrUndefined(str1)) { + return CoreUtility.isNullOrUndefined(str2); + } + else { + if (CoreUtility.isNullOrUndefined(str2)) { + return false; + } + else { + return str1.toUpperCase() == str2.toUpperCase(); + } + } + }; + CoreUtility.isReadonlyRestRequest = function (method) { + return CoreUtility.caseInsensitiveCompareString(method, 'GET'); + }; + CoreUtility._getResourceString = function (resourceId, arg) { + var ret; + if (typeof window !== 'undefined' && window.Strings && window.Strings.OfficeOM) { + var stringName = 'L_' + resourceId; + var stringValue = window.Strings.OfficeOM[stringName]; + if (stringValue) { + ret = stringValue; + } + } + if (!ret) { + ret = CoreUtility.s_resourceStringValues[resourceId]; + } + if (!ret) { + ret = resourceId; + } + if (!CoreUtility.isNullOrUndefined(arg)) { + if (Array.isArray(arg)) { + var arrArg = arg; + ret = CoreUtility._formatString(ret, arrArg); + } + else { + ret = ret.replace('{0}', arg); + } + } + return ret; + }; + CoreUtility._formatString = function (format, arrArg) { + return format.replace(/\{\d\}/g, function (v) { + var position = parseInt(v.substr(1, v.length - 2)); + if (position < arrArg.length) { + return arrArg[position]; + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'format' }); + } + }); + }; + Object.defineProperty(CoreUtility, "Promise", { + get: function () { + return _Internal.getPromiseType(); + }, + enumerable: true, + configurable: true + }); + CoreUtility.createPromise = function (executor) { + var ret = new CoreUtility.Promise(executor); + return ret; + }; + CoreUtility._createPromiseFromResult = function (value) { + return CoreUtility.createPromise(function (resolve, reject) { + resolve(value); + }); + }; + CoreUtility._createPromiseFromException = function (reason) { + return CoreUtility.createPromise(function (resolve, reject) { + reject(reason); + }); + }; + CoreUtility._createTimeoutPromise = function (timeout) { + return CoreUtility.createPromise(function (resolve, reject) { + setTimeout(function () { + resolve(null); + }, timeout); + }); + }; + CoreUtility._createInvalidArgError = function (error) { + return _Internal.RuntimeError._createInvalidArgError(error); + }; + CoreUtility._isLocalDocumentUrl = function (url) { + return CoreUtility._getLocalDocumentUrlPrefixLength(url) > 0; + }; + CoreUtility._getLocalDocumentUrlPrefixLength = function (url) { + var localDocumentPrefixes = [ + 'http://document.localhost', + 'https://document.localhost', + '//document.localhost' + ]; + var urlLower = url.toLowerCase().trim(); + for (var i = 0; i < localDocumentPrefixes.length; i++) { + if (urlLower === localDocumentPrefixes[i]) { + return localDocumentPrefixes[i].length; + } + else if (urlLower.substr(0, localDocumentPrefixes[i].length + 1) === localDocumentPrefixes[i] + '/') { + return localDocumentPrefixes[i].length + 1; + } + } + return 0; + }; + CoreUtility._validateLocalDocumentRequest = function (request) { + var index = CoreUtility._getLocalDocumentUrlPrefixLength(request.url); + if (index <= 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + var path = request.url.substr(index); + var pathLower = path.toLowerCase(); + if (pathLower === '_api') { + path = ''; + } + else if (pathLower.substr(0, '_api/'.length) === '_api/') { + path = path.substr('_api/'.length); + } + return { + method: request.method, + url: path, + headers: request.headers, + body: request.body + }; + }; + CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny = function (queryString) { + var ret = { flags: -1, customData: '' }; + var parts = queryString.split('&'); + for (var i = 0; i < parts.length; i++) { + var keyvalue = parts[i].split('='); + if (keyvalue[0].toLowerCase() === CoreConstants.flags) { + var flags = parseInt(keyvalue[1]); + flags = flags & 8191; + ret.flags = flags; + } + else if (keyvalue[0].toLowerCase() === CoreConstants.customData) { + ret.customData = decodeURIComponent(keyvalue[1]); + } + } + return ret; + }; + CoreUtility._getRequestBodyText = function (request) { + var body = ''; + if (typeof request.body === 'string') { + body = request.body; + } + else if (request.body && typeof request.body === 'object') { + body = JSON.stringify(request.body); + } + return body; + }; + CoreUtility._parseResponseBody = function (response) { + if (typeof response.body === 'string') { + var bodyText = CoreUtility.trim(response.body); + return JSON.parse(bodyText); + } + else { + return response.body; + } + }; + CoreUtility._buildRequestMessageSafeArray = function (request) { + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var customData = ''; + if (request.url.substr(0, CoreConstants.processQuery.length).toLowerCase() === + CoreConstants.processQuery.toLowerCase()) { + var index = request.url.indexOf('?'); + if (index > 0) { + var queryString = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(queryString); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + customData = flagsAndCustomData.customData; + } + } + return RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, request.method, request.url, request.headers, CoreUtility._getRequestBodyText(request)); + }; + CoreUtility._parseHttpResponseHeaders = function (allResponseHeaders) { + var responseHeaders = {}; + if (!CoreUtility.isNullOrEmptyString(allResponseHeaders)) { + var regex = new RegExp('\r?\n'); + var entries = allResponseHeaders.split(regex); + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + if (entry != null) { + var index = entry.indexOf(':'); + if (index > 0) { + var key = entry.substr(0, index); + var value = entry.substr(index + 1); + key = CoreUtility.trim(key); + value = CoreUtility.trim(value); + responseHeaders[key.toUpperCase()] = value; + } + } + } + } + return responseHeaders; + }; + CoreUtility._parseErrorResponse = function (responseInfo) { + var errorObj = CoreUtility._parseErrorResponseBody(responseInfo); + var statusCode = responseInfo.statusCode.toString(); + if (CoreUtility.isNullOrUndefined(errorObj) || typeof errorObj !== 'object' || !errorObj.error) { + return CoreUtility._createDefaultErrorResponse(statusCode); + } + var error = errorObj.error; + var innerError = error.innerError; + if (innerError && innerError.code) { + return CoreUtility._createErrorResponse(innerError.code, statusCode, innerError.message); + } + if (error.code) { + return CoreUtility._createErrorResponse(error.code, statusCode, error.message); + } + return CoreUtility._createDefaultErrorResponse(statusCode); + }; + CoreUtility._parseErrorResponseBody = function (responseInfo) { + if (CoreUtility.isPlainJsonObject(responseInfo.body)) { + return responseInfo.body; + } + else if (!CoreUtility.isNullOrEmptyString(responseInfo.body)) { + var errorResponseBody = CoreUtility.trim(responseInfo.body); + try { + return JSON.parse(errorResponseBody); + } + catch (e) { + CoreUtility.log('Error when parse ' + errorResponseBody); + } + } + }; + CoreUtility._createDefaultErrorResponse = function (statusCode) { + return { + errorCode: CoreErrorCodes.connectionFailure, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, statusCode) + }; + }; + CoreUtility._createErrorResponse = function (code, statusCode, message) { + return { + errorCode: code, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithDetails, [ + statusCode, + code, + message + ]) + }; + }; + CoreUtility._copyHeaders = function (src, dest) { + if (src && dest) { + for (var key in src) { + dest[key] = src[key]; + } + } + }; + CoreUtility.addResourceStringValues = function (values) { + for (var key in values) { + CoreUtility.s_resourceStringValues[key] = values[key]; + } + }; + CoreUtility._logEnabled = false; + CoreUtility.s_resourceStringValues = { + ApiNotFoundDetails: 'The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.', + ConnectionFailureWithStatus: 'The request failed with status code of {0}.', + ConnectionFailureWithDetails: 'The request failed with status code of {0}, error code {1} and the following error message: {2}', + InvalidArgument: "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.", + InvalidObjectPath: 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.', + InvalidRequestContext: 'Cannot use the object across different request contexts.', + Timeout: 'The operation has timed out.', + ValueNotLoaded: 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.' + }; + return CoreUtility; + }()); + OfficeExtension_1.CoreUtility = CoreUtility; + var TestUtility = (function () { + function TestUtility() { + } + TestUtility.setMock = function (value) { + TestUtility.s_isMock = value; + }; + TestUtility.isMock = function () { + return TestUtility.s_isMock; + }; + TestUtility._setCurrentTestName = function (value) { + TestUtility.s_currentTestName = value; + TestUtility.s_currentTestSequenceId = 0; + }; + TestUtility._getCurrentTestNameWithSequenceId = function () { + if (TestUtility.s_currentTestName) { + TestUtility.s_currentTestSequenceId++; + return TestUtility.s_currentTestName + "." + TestUtility.s_currentTestSequenceId; + } + return null; + }; + return TestUtility; + }()); + OfficeExtension_1.TestUtility = TestUtility; + OfficeExtension_1._internalConfig = { + showDisposeInfoInDebugInfo: false, + showInternalApiInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectUpdateMethod: false, + alwaysPolyfillClientObjectRetrieveMethod: false, + enableConcurrentFlag: true, + enableUndoableFlag: true, + appendTypeNameToObjectPathInfo: false, + enablePreviewExecution: false + }; + OfficeExtension_1.config = { + extendedErrorLogging: false + }; + var CommonActionFactory = (function () { + function CommonActionFactory() { + } + CommonActionFactory.createSetPropertyAction = function (context, parent, propertyName, value, flags) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var args = [value]; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + CommonUtility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var action = new Action(actionInfo, 0, flags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (flags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectId: '', + ObjectType: '', + Arguments: [value] + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return parent._addAction(action); + }; + CommonActionFactory.createQueryAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 2, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createQueryAsJsonAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 7, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createUpdateAction = function (context, parent, objectState) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 9, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 0, 0); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action); + }; + return CommonActionFactory; + }()); + OfficeExtension_1.CommonActionFactory = CommonActionFactory; + var ClientObjectBase = (function () { + function ClientObjectBase(contextBase, objectPath) { + this.m_contextBase = contextBase; + this.m_objectPath = objectPath; + } + Object.defineProperty(ClientObjectBase.prototype, "_objectPath", { + get: function () { + return this.m_objectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObjectBase.prototype, "_context", { + get: function () { + return this.m_contextBase; + }, + enumerable: true, + configurable: true + }); + ClientObjectBase.prototype._addAction = function (action, resultHandler) { + var _this = this; + if (resultHandler === void 0) { + resultHandler = null; + } + return CoreUtility.createPromise(function (resolve, reject) { + _this._context._addServiceApiAction(action, resultHandler, resolve, reject); + }); + }; + ClientObjectBase.prototype._addPreviewExecutionAction = function (action) { + }; + ClientObjectBase.prototype._retrieve = function (option, resultHandler) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var queryOption = ClientRequestContextBase._parseQueryOption(option); + if (shouldPolyfill) { + return CommonActionFactory.createQueryAction(this._context, this, queryOption, resultHandler); + } + return CommonActionFactory.createQueryAsJsonAction(this._context, this, queryOption, resultHandler); + }; + ClientObjectBase.prototype._recursivelyUpdate = function (properties) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectUpdateMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.2'); + } + try { + var scalarPropNames = this[CommonConstants.scalarPropertyNames]; + if (!scalarPropNames) { + scalarPropNames = []; + } + var scalarPropUpdatable = this[CommonConstants.scalarPropertyUpdateable]; + if (!scalarPropUpdatable) { + scalarPropUpdatable = []; + for (var i = 0; i < scalarPropNames.length; i++) { + scalarPropUpdatable.push(false); + } + } + var navigationPropNames = this[CommonConstants.navigationPropertyNames]; + if (!navigationPropNames) { + navigationPropNames = []; + } + var scalarProps = {}; + var navigationProps = {}; + var scalarPropCount = 0; + for (var propName in properties) { + var index = scalarPropNames.indexOf(propName); + if (index >= 0) { + if (!scalarPropUpdatable[index]) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, propName), + debugInfo: { + errorLocation: propName + } + }); + } + scalarProps[propName] = properties[propName]; + ++scalarPropCount; + } + else if (navigationPropNames.indexOf(propName) >= 0) { + navigationProps[propName] = properties[propName]; + } + else { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, propName), + debugInfo: { + errorLocation: propName + } + }); + } + } + if (scalarPropCount > 0) { + if (shouldPolyfill) { + for (var i = 0; i < scalarPropNames.length; i++) { + var propName = scalarPropNames[i]; + var propValue = scalarProps[propName]; + if (!CommonUtility.isUndefined(propValue)) { + CommonActionFactory.createSetPropertyAction(this._context, this, propName, propValue); + } + } + } + else { + CommonActionFactory.createUpdateAction(this._context, this, scalarProps); + } + } + for (var propName in navigationProps) { + var navigationPropProxy = this[propName]; + var navigationPropValue = navigationProps[propName]; + navigationPropProxy._recursivelyUpdate(navigationPropValue); + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.update' + }, + innerError: innerError + }); + } + }; + return ClientObjectBase; + }()); + OfficeExtension_1.ClientObjectBase = ClientObjectBase; + var Action = (function () { + function Action(actionInfo, operationType, flags) { + this.m_actionInfo = actionInfo; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(Action.prototype, "actionInfo", { + get: function () { + return this.m_actionInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + return Action; + }()); + OfficeExtension_1.Action = Action; + var ObjectPath = (function () { + function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest, operationType, flags) { + this.m_objectPathInfo = objectPathInfo; + this.m_parentObjectPath = parentObjectPath; + this.m_isCollection = isCollection; + this.m_isInvalidAfterRequest = isInvalidAfterRequest; + this.m_isValid = true; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(ObjectPath.prototype, "id", { + get: function () { + var argumentInfo = this.m_objectPathInfo.ArgumentInfo; + if (!argumentInfo) { + return undefined; + } + var argument = argumentInfo.Arguments; + if (!argument) { + return undefined; + } + return argument[0]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parent", { + get: function () { + var parent = this.m_parentObjectPath; + if (!parent) { + return undefined; + } + return parent; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentId", { + get: function () { + return this.parent ? this.parent.id : undefined; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "objectPathInfo", { + get: function () { + return this.m_objectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isCollection", { + get: function () { + return this.m_isCollection; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isInvalidAfterRequest", { + get: function () { + return this.m_isInvalidAfterRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentObjectPath", { + get: function () { + return this.m_parentObjectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "argumentObjectPaths", { + get: function () { + return this.m_argumentObjectPaths; + }, + set: function (value) { + this.m_argumentObjectPaths = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isValid", { + get: function () { + return this.m_isValid; + }, + set: function (value) { + this.m_isValid = value; + if (!value && + this.m_objectPathInfo.ObjectPathType === 6 && + this.m_savedObjectPathInfo) { + ObjectPath.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo, this.m_objectPathInfo); + this.m_parentObjectPath = this.m_savedObjectPathInfo.parent; + this.m_isValid = true; + this.m_savedObjectPathInfo = null; + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "originalObjectPathInfo", { + get: function () { + return this.m_originalObjectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "getByIdMethodName", { + get: function () { + return this.m_getByIdMethodName; + }, + set: function (value) { + this.m_getByIdMethodName = value; + }, + enumerable: true, + configurable: true + }); + ObjectPath.prototype._updateAsNullObject = function () { + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 7; + this.m_objectPathInfo.Name = ''; + this.m_parentObjectPath = null; + }; + ObjectPath.prototype.saveOriginalObjectPathInfo = function () { + if (OfficeExtension_1.config.extendedErrorLogging && !this.m_originalObjectPathInfo) { + this.m_originalObjectPathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, this.m_originalObjectPathInfo); + } + }; + ObjectPath.prototype.updateUsingObjectData = function (value, clientObject) { + var referenceId = value[CommonConstants.referenceId]; + if (!CoreUtility.isNullOrEmptyString(referenceId)) { + if (!this.m_savedObjectPathInfo && + !this.isInvalidAfterRequest && + ObjectPath.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)) { + var pathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, pathInfo); + this.m_savedObjectPathInfo = { + pathInfo: pathInfo, + parent: this.m_parentObjectPath + }; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 6; + this.m_objectPathInfo.Name = referenceId; + delete this.m_objectPathInfo.ParentObjectPathId; + this.m_parentObjectPath = null; + return; + } + if (clientObject) { + var collectionPropertyPath = clientObject[CommonConstants.collectionPropertyPath]; + if (!CoreUtility.isNullOrEmptyString(collectionPropertyPath) && clientObject.context) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + var propNames = collectionPropertyPath.split('.'); + var parent_1 = clientObject.context[propNames[0]]; + for (var i = 1; i < propNames.length; i++) { + parent_1 = parent_1[propNames[i]]; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_parentObjectPath = parent_1._objectPath; + this.m_objectPathInfo.ParentObjectPathId = this.m_parentObjectPath.objectPathInfo.Id; + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + } + var parentIsCollection = this.parentObjectPath && this.parentObjectPath.isCollection; + var getByIdMethodName = this.getByIdMethodName; + if (parentIsCollection || !CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + if (!CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + this.m_objectPathInfo.ObjectPathType = 3; + this.m_objectPathInfo.Name = getByIdMethodName; + } + else { + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + } + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + }; + ObjectPath.prototype.resetForUpdateUsingObjectData = function () { + this.m_isInvalidAfterRequest = false; + this.m_isValid = true; + this.m_operationType = 1; + this.m_flags = 4; + this.m_objectPathInfo.ArgumentInfo = {}; + this.m_argumentObjectPaths = null; + this.m_getByIdMethodName = null; + }; + ObjectPath.isRestorableObjectPath = function (objectPathType) { + return (objectPathType === 1 || + objectPathType === 5 || + objectPathType === 3 || + objectPathType === 4); + }; + ObjectPath.copyObjectPathInfo = function (src, dest) { + dest.Id = src.Id; + dest.ArgumentInfo = src.ArgumentInfo; + dest.Name = src.Name; + dest.ObjectPathType = src.ObjectPathType; + dest.ParentObjectPathId = src.ParentObjectPathId; + }; + return ObjectPath; + }()); + OfficeExtension_1.ObjectPath = ObjectPath; + var ClientRequestContextBase = (function () { + function ClientRequestContextBase() { + this.m_nextId = 0; + } + ClientRequestContextBase.prototype._nextId = function () { + return ++this.m_nextId; + }; + ClientRequestContextBase.prototype._addServiceApiAction = function (action, resultHandler, resolve, reject) { + if (!this.m_serviceApiQueue) { + this.m_serviceApiQueue = new ServiceApiQueue(this); + } + this.m_serviceApiQueue.add(action, resultHandler, resolve, reject); + }; + ClientRequestContextBase._parseQueryOption = function (option) { + var queryOption = {}; + if (typeof option === 'string') { + var select = option; + queryOption.Select = CommonUtility._parseSelectExpand(select); + } + else if (Array.isArray(option)) { + queryOption.Select = option; + } + else if (typeof option === 'object') { + var loadOption = option; + if (ClientRequestContextBase.isLoadOption(loadOption)) { + if (typeof loadOption.select === 'string') { + queryOption.Select = CommonUtility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select = loadOption.select; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.select)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.select' }); + } + if (typeof loadOption.expand === 'string') { + queryOption.Expand = CommonUtility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand = loadOption.expand; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.expand)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.expand' }); + } + if (typeof loadOption.top === 'number') { + queryOption.Top = loadOption.top; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.top)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.top' }); + } + if (typeof loadOption.skip === 'number') { + queryOption.Skip = loadOption.skip; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.skip)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.skip' }); + } + } + else { + queryOption = ClientRequestContextBase.parseStrictLoadOption(option); + } + } + else if (!CommonUtility.isNullOrUndefined(option)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option' }); + } + return queryOption; + }; + ClientRequestContextBase.isLoadOption = function (loadOption) { + if (!CommonUtility.isUndefined(loadOption.select) && + (typeof loadOption.select === 'string' || Array.isArray(loadOption.select))) + return true; + if (!CommonUtility.isUndefined(loadOption.expand) && + (typeof loadOption.expand === 'string' || Array.isArray(loadOption.expand))) + return true; + if (!CommonUtility.isUndefined(loadOption.top) && typeof loadOption.top === 'number') + return true; + if (!CommonUtility.isUndefined(loadOption.skip) && typeof loadOption.skip === 'number') + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContextBase.parseStrictLoadOption = function (option) { + var ret = { Select: [] }; + ClientRequestContextBase.parseStrictLoadOptionHelper(ret, '', 'option', option); + return ret; + }; + ClientRequestContextBase.combineQueryPath = function (pathPrefix, key, separator) { + if (pathPrefix.length === 0) { + return key; + } + else { + return pathPrefix + separator + key; + } + }; + ClientRequestContextBase.parseStrictLoadOptionHelper = function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value = option[key]; + if (key === '$all') { + if (typeof value !== 'boolean') { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, '*', '/')); + } + } + else if (key === '$top') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Top = value; + } + else if (key === '$skip') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Skip = value; + } + else { + if (typeof value === 'boolean') { + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/')); + } + } + else if (typeof value === 'object') { + ClientRequestContextBase.parseStrictLoadOptionHelper(queryInfo, ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/'), ClientRequestContextBase.combineQueryPath(argPrefix, key, '.'), value); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + } + } + }; + return ClientRequestContextBase; + }()); + OfficeExtension_1.ClientRequestContextBase = ClientRequestContextBase; + var InstantiateActionUpdateObjectPathHandler = (function () { + function InstantiateActionUpdateObjectPathHandler(m_objectPath) { + this.m_objectPath = m_objectPath; + } + InstantiateActionUpdateObjectPathHandler.prototype._handleResult = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + this.m_objectPath._updateAsNullObject(); + } + else { + this.m_objectPath.updateUsingObjectData(value, null); + } + }; + return InstantiateActionUpdateObjectPathHandler; + }()); + var ClientRequestBase = (function () { + function ClientRequestBase(context) { + this.m_contextBase = context; + this.m_actions = []; + this.m_actionResultHandler = {}; + this.m_referencedObjectPaths = {}; + this.m_instantiatedObjectPaths = {}; + this.m_preSyncPromises = []; + this.m_previewExecutionActions = []; + } + ClientRequestBase.prototype.addAction = function (action) { + this.m_actions.push(action); + if (action.actionInfo.ActionType == 1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId] = action; + } + }; + ClientRequestBase.prototype.addPreviewExecutionAction = function (action) { + this.m_previewExecutionActions.push(action); + }; + Object.defineProperty(ClientRequestBase.prototype, "hasActions", { + get: function () { + return this.m_actions.length > 0; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._getLastAction = function () { + return this.m_actions[this.m_actions.length - 1]; + }; + ClientRequestBase.prototype.ensureInstantiateObjectPath = function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo = { + Id: this.m_contextBase._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction = new Action(actionInfo, 1, 4); + instantiateAction.referencedObjectPath = objectPath; + this.addReferencedObjectPath(objectPath); + this.addAction(instantiateAction); + var resultHandler = new InstantiateActionUpdateObjectPathHandler(objectPath); + this.addActionResultHandler(instantiateAction, resultHandler); + } + } + }; + ClientRequestBase.prototype.ensureInstantiateObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addReferencedObjectPath = function (objectPath) { + if (!objectPath || this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + while (objectPath) { + this.m_referencedObjectPaths[objectPath.objectPathInfo.Id] = objectPath; + if (objectPath.objectPathInfo.ObjectPathType == 3) { + this.addReferencedObjectPaths(objectPath.argumentObjectPaths); + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase.prototype.addReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.addReferencedObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addActionResultHandler = function (action, resultHandler) { + this.m_actionResultHandler[action.actionInfo.Id] = resultHandler; + }; + ClientRequestBase.prototype.aggregrateRequestFlags = function (requestFlags, operationType, flags) { + if (operationType === 0) { + requestFlags = requestFlags | 1; + if ((flags & 2) === 0) { + requestFlags = requestFlags & ~16; + } + if ((flags & 8) === 0) { + requestFlags = requestFlags & ~256; + } + requestFlags = requestFlags & ~4; + } + if (flags & 1) { + requestFlags = requestFlags | 2; + } + if ((flags & 4) === 0) { + requestFlags = requestFlags & ~4; + } + return requestFlags; + }; + ClientRequestBase.prototype.finallyNormalizeFlags = function (requestFlags) { + if ((requestFlags & 1) === 0) { + requestFlags = requestFlags & ~16; + requestFlags = requestFlags & ~256; + } + if (!OfficeExtension_1._internalConfig.enableConcurrentFlag) { + requestFlags = requestFlags & ~4; + } + if (!OfficeExtension_1._internalConfig.enableUndoableFlag) { + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.1')) { + requestFlags = requestFlags & ~4; + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.2')) { + requestFlags = requestFlags & ~256; + } + if (typeof this.m_flagsForTesting === 'number') { + requestFlags = this.m_flagsForTesting; + } + return requestFlags; + }; + ClientRequestBase.prototype.buildRequestMessageBodyAndRequestFlags = function () { + if (OfficeExtension_1._internalConfig.enableEarlyDispose) { + ClientRequestBase._calculateLastUsedObjectPathIds(this.m_actions); + } + var requestFlags = 4 | + 16 | + 256; + var objectPaths = {}; + for (var i in this.m_referencedObjectPaths) { + requestFlags = this.aggregrateRequestFlags(requestFlags, this.m_referencedObjectPaths[i].operationType, this.m_referencedObjectPaths[i].flags); + objectPaths[i] = this.m_referencedObjectPaths[i].objectPathInfo; + } + var actions = []; + var hasKeepReference = false; + for (var index = 0; index < this.m_actions.length; index++) { + var action = this.m_actions[index]; + if (action.actionInfo.ActionType === 3 && + action.actionInfo.Name === CommonConstants.keepReference) { + hasKeepReference = true; + } + requestFlags = this.aggregrateRequestFlags(requestFlags, action.operationType, action.flags); + actions.push(action.actionInfo); + } + requestFlags = this.finallyNormalizeFlags(requestFlags); + var body = { + AutoKeepReference: this.m_contextBase._autoCleanup && hasKeepReference, + Actions: actions, + ObjectPaths: objectPaths + }; + if (this.m_previewExecutionActions.length > 0) { + body.PreviewExecutionActions = this.m_previewExecutionActions; + requestFlags = requestFlags | 4096; + } + return { + body: body, + flags: requestFlags + }; + }; + ClientRequestBase.prototype.processResponse = function (actionResults) { + if (actionResults) { + for (var i = 0; i < actionResults.length; i++) { + var actionResult = actionResults[i]; + var handler = this.m_actionResultHandler[actionResult.ActionId]; + if (handler) { + handler._handleResult(actionResult.Value); + } + } + } + }; + ClientRequestBase.prototype.invalidatePendingInvalidObjectPaths = function () { + for (var i in this.m_referencedObjectPaths) { + if (this.m_referencedObjectPaths[i].isInvalidAfterRequest) { + this.m_referencedObjectPaths[i].isValid = false; + } + } + }; + ClientRequestBase.prototype._addPreSyncPromise = function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequestBase.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._removeKeepReferenceAction = function (objectPathId) { + for (var i = this.m_actions.length - 1; i >= 0; i--) { + var actionInfo = this.m_actions[i].actionInfo; + if (actionInfo.ObjectPathId === objectPathId && + actionInfo.ActionType === 3 && + actionInfo.Name === CommonConstants.keepReference) { + this.m_actions.splice(i, 1); + break; + } + } + }; + ClientRequestBase._updateLastUsedActionIdOfObjectPathId = function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id] = actionId; + var argumentObjectPaths = objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength = argumentObjectPaths.length; + for (var i = 0; i < argumentObjectPathsLength; i++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase._calculateLastUsedObjectPathIds = function (actions) { + var lastUsedActionIdOfObjectPathId = {}; + var actionsLength = actions.length; + for (var index = actionsLength - 1; index >= 0; --index) { + var action = actions[index]; + var actionId = action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths = action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength = referencedObjectPaths.length; + for (var refIndex = 0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction = {}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId = lastUsedActionIdOfObjectPathId[key]; + var objectPathIds = lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds = []; + lastUsedObjectPathIdsOfAction[actionId] = objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index = 0; index < actionsLength; index++) { + var action = actions[index]; + var lastUsedObjectPathIds = lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L = lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; + return ClientRequestBase; + }()); + OfficeExtension_1.ClientRequestBase = ClientRequestBase; + var ClientResult = (function () { + function ClientResult(m_type) { + this.m_type = m_type; + } + Object.defineProperty(ClientResult.prototype, "value", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'clientResult.value' + } + }); + } + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ClientResult.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (typeof value === 'object' && value && value._IsNull) { + return; + } + if (this.m_type === 1) { + this.m_value = CommonUtility.adjustToDateTime(value); + } + else { + this.m_value = value; + } + }; + return ClientResult; + }()); + OfficeExtension_1.ClientResult = ClientResult; + var ServiceApiQueue = (function () { + function ServiceApiQueue(m_context) { + this.m_context = m_context; + this.m_actions = []; + } + ServiceApiQueue.prototype.add = function (action, resultHandler, resolve, reject) { + var _this = this; + this.m_actions.push({ action: action, resultHandler: resultHandler, resolve: resolve, reject: reject }); + if (this.m_actions.length === 1) { + setTimeout(function () { return _this.processActions(); }, 0); + } + }; + ServiceApiQueue.prototype.processActions = function () { + var _this = this; + if (this.m_actions.length === 0) { + return; + } + var actions = this.m_actions; + this.m_actions = []; + var request = new ClientRequestBase(this.m_context); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + request.ensureInstantiateObjectPath(action.action.referencedObjectPath); + request.ensureInstantiateObjectPaths(action.action.referencedArgumentObjectPaths); + request.addAction(action.action); + request.addReferencedObjectPath(action.action.referencedObjectPath); + request.addReferencedObjectPaths(action.action.referencedArgumentObjectPaths); + } + var _a = request.buildRequestMessageBodyAndRequestFlags(), body = _a.body, flags = _a.flags; + var requestMessage = { + Url: CoreConstants.localDocumentApiPrefix, + Headers: null, + Body: body + }; + CoreUtility.log('Request:'); + CoreUtility.log(JSON.stringify(body)); + var executor = new HttpRequestExecutor(); + executor + .executeAsync(this.m_context._customData, flags, requestMessage) + .then(function (response) { + _this.processResponse(request, actions, response); + })["catch"](function (ex) { + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + action.reject(ex); + } + }); + }; + ServiceApiQueue.prototype.processResponse = function (request, actions, response) { + var error = this.getErrorFromResponse(response); + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (!actionResults) { + actionResults = []; + } + this.processActionResults(request, actions, actionResults, error); + }; + ServiceApiQueue.prototype.getErrorFromResponse = function (response) { + if (!CoreUtility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage + }); + } + if (response.Body && response.Body.Error) { + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message + }); + } + return null; + }; + ServiceApiQueue.prototype.processActionResults = function (request, actions, actionResults, err) { + request.processResponse(actionResults); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + var actionId = action.action.actionInfo.Id; + var hasResult = false; + for (var j = 0; j < actionResults.length; j++) { + if (actionId == actionResults[j].ActionId) { + var resultValue = actionResults[j].Value; + if (action.resultHandler) { + action.resultHandler._handleResult(resultValue); + resultValue = action.resultHandler.value; + } + if (action.resolve) { + action.resolve(resultValue); + } + hasResult = true; + break; + } + } + if (!hasResult && action.reject) { + if (err) { + action.reject(err); + } + else { + action.reject('No response for the action.'); + } + } + } + }; + return ServiceApiQueue; + }()); + var HttpRequestExecutor = (function () { + function HttpRequestExecutor() { + } + HttpRequestExecutor.prototype.getRequestUrl = function (baseUrl, requestFlags) { + if (baseUrl.charAt(baseUrl.length - 1) != '/') { + baseUrl = baseUrl + '/'; + } + baseUrl = baseUrl + CoreConstants.processQuery; + baseUrl = baseUrl + '?' + CoreConstants.flags + '=' + requestFlags.toString(); + return baseUrl; + }; + HttpRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var url = this.getRequestUrl(requestMessage.Url, requestFlags); + var requestInfo = { + method: 'POST', + url: url, + headers: {}, + body: requestMessage.Body + }; + requestInfo.headers[CoreConstants.sourceLibHeader] = HttpRequestExecutor.SourceLibHeaderValue; + requestInfo.headers['CONTENT-TYPE'] = 'application/json'; + if (requestMessage.Headers) { + for (var key in requestMessage.Headers) { + requestInfo.headers[key] = requestMessage.Headers[key]; + } + } + var sendRequestFunc = CoreUtility._isLocalDocumentUrl(requestInfo.url) + ? HttpUtility.sendLocalDocumentRequest + : HttpUtility.sendRequest; + return sendRequestFunc(requestInfo).then(function (responseInfo) { + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null, + RawErrorResponseBody: CoreUtility._parseErrorResponseBody(responseInfo) + }; + } + return response; + }); + }; + HttpRequestExecutor.SourceLibHeaderValue = 'officejs-rest'; + return HttpRequestExecutor; + }()); + OfficeExtension_1.HttpRequestExecutor = HttpRequestExecutor; + var CommonConstants = (function (_super) { + __extends(CommonConstants, _super); + function CommonConstants() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonConstants.collectionPropertyPath = '_collectionPropertyPath'; + CommonConstants.id = 'Id'; + CommonConstants.idLowerCase = 'id'; + CommonConstants.idPrivate = '_Id'; + CommonConstants.keepReference = '_KeepReference'; + CommonConstants.objectPathIdPrivate = '_ObjectPathId'; + CommonConstants.referenceId = '_ReferenceId'; + CommonConstants.items = '_Items'; + CommonConstants.itemsLowerCase = 'items'; + CommonConstants.scalarPropertyNames = '_scalarPropertyNames'; + CommonConstants.scalarPropertyOriginalNames = '_scalarPropertyOriginalNames'; + CommonConstants.navigationPropertyNames = '_navigationPropertyNames'; + CommonConstants.scalarPropertyUpdateable = '_scalarPropertyUpdateable'; + CommonConstants.previewExecutionObjectId = '_previewExecutionObjectId'; + return CommonConstants; + }(CoreConstants)); + OfficeExtension_1.CommonConstants = CommonConstants; + var CommonUtility = (function (_super) { + __extends(CommonUtility, _super); + function CommonUtility() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonUtility.validateObjectPath = function (clientObject) { + var objectPath = clientObject._objectPath; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + objectPath = objectPath.parentObjectPath; + } + }; + CommonUtility.validateReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + var objectPath = objectPaths[i]; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)) + }); + } + objectPath = objectPath.parentObjectPath; + } + } + } + }; + CommonUtility._toCamelLowerCase = function (name) { + if (CoreUtility.isNullOrEmptyString(name)) { + return name; + } + var index = 0; + while (index < name.length && name.charCodeAt(index) >= 65 && name.charCodeAt(index) <= 90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase() + name.substr(index); + } + else { + return name.toLowerCase(); + } + }; + CommonUtility.adjustToDateTime = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return null; + } + if (typeof value === 'string') { + return new Date(value); + } + if (Array.isArray(value)) { + var arr = value; + for (var i = 0; i < arr.length; i++) { + arr[i] = CommonUtility.adjustToDateTime(arr[i]); + } + return arr; + } + throw CoreUtility._createInvalidArgError({ argumentName: 'date' }); + }; + CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult = function (value) { + var id = value[CommonConstants.id]; + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idLowerCase]; + } + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idPrivate]; + } + return id; + }; + CommonUtility.getObjectPathExpression = function (objectPath) { + var ret = ''; + while (objectPath) { + switch (objectPath.objectPathInfo.ObjectPathType) { + case 1: + ret = ret; + break; + case 2: + ret = 'new()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 3: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + '()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 4: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + (ret.length > 0 ? '.' : '') + ret; + break; + case 5: + ret = 'getItem()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 6: + ret = '_reference()' + (ret.length > 0 ? '.' : '') + ret; + break; + } + objectPath = objectPath.parentObjectPath; + } + return ret; + }; + CommonUtility.setMethodArguments = function (context, argumentInfo, args) { + if (CoreUtility.isNullOrUndefined(args)) { + return null; + } + var referencedObjectPaths = new Array(); + var referencedObjectPathIds = new Array(); + var hasOne = CommonUtility.collectObjectPathInfos(context, args, referencedObjectPaths, referencedObjectPathIds); + argumentInfo.Arguments = args; + if (hasOne) { + argumentInfo.ReferencedObjectPathIds = referencedObjectPathIds; + } + return referencedObjectPaths; + }; + CommonUtility.validateContext = function (context, obj) { + if (context && obj && obj._context !== context) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidRequestContext, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidRequestContext) + }); + } + }; + CommonUtility.isSetSupported = function (apiSetName, apiSetVersion) { + if (typeof CommonUtility.isSetSupportedOverride === "function") { + return CommonUtility.isSetSupportedOverride(apiSetName, apiSetVersion); + } + if (typeof window !== 'undefined' && + window.Office && + window.Office.context && + window.Office.context.requirements) { + return window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion); + } + return true; + }; + CommonUtility.throwIfApiNotSupported = function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!CommonUtility._doApiNotSupportedCheck) { + return; + } + if (!CommonUtility.isSetSupported(apiSetName, apiSetVersion)) { + var message = CoreUtility._getResourceString(CoreResourceStrings.apiNotFoundDetails, [ + apiFullName, + apiSetName + ' ' + apiSetVersion, + hostName + ]); + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.apiNotFound, + httpStatusCode: 404, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + }; + CommonUtility.calculateApiFlags = function (apiFlags, undoableApiSetName, undoableApiSetVersion) { + var undoable = false; + var inMakerRuntime = (window + && window.location + && window.location.href + && window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc") !== -1); + if (typeof CommonUtility.isSetSupportedOverride === "function") { + undoable = CommonUtility.isSetSupportedOverride(undoableApiSetName, undoableApiSetVersion); + } + else if (inMakerRuntime) { + undoable = false; + } + else { + undoable = CommonUtility.isSetSupported(undoableApiSetName, undoableApiSetVersion); + } + if (!undoable) { + apiFlags = apiFlags & (~2); + } + return apiFlags; + }; + CommonUtility._parseSelectExpand = function (select) { + var args = []; + if (!CoreUtility.isNullOrEmptyString(select)) { + var propertyNames = select.split(','); + for (var i = 0; i < propertyNames.length; i++) { + var propertyName = propertyNames[i]; + propertyName = sanitizeForAnyItemsSlash(propertyName.trim()); + if (propertyName.length > 0) { + args.push(propertyName); + } + } + } + return args; + function sanitizeForAnyItemsSlash(propertyName) { + var propertyNameLower = propertyName.toLowerCase(); + if (propertyNameLower === 'items' || propertyNameLower === 'items/') { + return '*'; + } + var itemsSlashLength = 6; + var isItemsSlashOrItemsDot = propertyNameLower.substr(0, itemsSlashLength) === 'items/' || + propertyNameLower.substr(0, itemsSlashLength) === 'items.'; + if (isItemsSlashOrItemsDot) { + propertyName = propertyName.substr(itemsSlashLength); + } + return propertyName.replace(new RegExp('[/.]items[/.]', 'gi'), '/'); + } + }; + CommonUtility.changePropertyNameToCamelLowerCase = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + var propValue = value[key]; + if (key === CommonConstants.items) { + ret = {}; + ret[CommonConstants.itemsLowerCase] = this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else { + var propName = CommonUtility._toCamelLowerCase(key); + ret[propName] = this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.purifyJson = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.purifyJson(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + if (key.charCodeAt(0) !== charCodeUnderscore) { + var propValue = value[key]; + if (typeof propValue === 'object' && propValue !== null && Array.isArray(propValue['items'])) { + propValue = propValue['items']; + } + ret[key] = this.purifyJson(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.collectObjectPathInfos = function (context, args, referencedObjectPaths, referencedObjectPathIds) { + var hasOne = false; + for (var i = 0; i < args.length; i++) { + if (args[i] instanceof ClientObjectBase) { + var clientObject = args[i]; + CommonUtility.validateContext(context, clientObject); + args[i] = clientObject._objectPath.objectPathInfo.Id; + referencedObjectPathIds.push(clientObject._objectPath.objectPathInfo.Id); + referencedObjectPaths.push(clientObject._objectPath); + hasOne = true; + } + else if (Array.isArray(args[i])) { + var childArrayObjectPathIds = new Array(); + var childArrayHasOne = CommonUtility.collectObjectPathInfos(context, args[i], referencedObjectPaths, childArrayObjectPathIds); + if (childArrayHasOne) { + referencedObjectPathIds.push(childArrayObjectPathIds); + hasOne = true; + } + else { + referencedObjectPathIds.push(0); + } + } + else if (CoreUtility.isPlainJsonObject(args[i])) { + referencedObjectPathIds.push(0); + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(args[i], referencedObjectPaths); + } + else { + referencedObjectPathIds.push(0); + } + } + return hasOne; + }; + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds = function (value, referencedObjectPaths) { + var _a, _b; + for (var key in value) { + var propValue = value[key]; + if (propValue instanceof ClientObjectBase) { + referencedObjectPaths.push(propValue._objectPath); + value[key] = (_a = {}, _a[CommonConstants.objectPathIdPrivate] = propValue._objectPath.objectPathInfo.Id, _a); + } + else if (Array.isArray(propValue)) { + for (var i = 0; i < propValue.length; i++) { + if (propValue[i] instanceof ClientObjectBase) { + var elem = propValue[i]; + referencedObjectPaths.push(elem._objectPath); + propValue[i] = (_b = {}, _b[CommonConstants.objectPathIdPrivate] = elem._objectPath.objectPathInfo.Id, _b); + } + else if (CoreUtility.isPlainJsonObject(propValue[i])) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue[i], referencedObjectPaths); + } + } + } + else if (CoreUtility.isPlainJsonObject(propValue)) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue, referencedObjectPaths); + } + else { + } + } + }; + CommonUtility.normalizeName = function (name) { + return name.substr(0, 1).toLowerCase() + name.substr(1); + }; + CommonUtility._doApiNotSupportedCheck = false; + return CommonUtility; + }(CoreUtility)); + OfficeExtension_1.CommonUtility = CommonUtility; + var CommonResourceStrings = (function (_super) { + __extends(CommonResourceStrings, _super); + function CommonResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonResourceStrings.propertyDoesNotExist = 'PropertyDoesNotExist'; + CommonResourceStrings.attemptingToSetReadOnlyProperty = 'AttemptingToSetReadOnlyProperty'; + return CommonResourceStrings; + }(CoreResourceStrings)); + OfficeExtension_1.CommonResourceStrings = CommonResourceStrings; + var ClientRetrieveResult = (function (_super) { + __extends(ClientRetrieveResult, _super); + function ClientRetrieveResult(m_shouldPolyfill) { + var _this = _super.call(this) || this; + _this.m_shouldPolyfill = m_shouldPolyfill; + return _this; + } + ClientRetrieveResult.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (this.m_shouldPolyfill) { + this.m_value = CommonUtility.changePropertyNameToCamelLowerCase(this.m_value); + } + this.m_value = this.removeItemNodes(this.m_value); + }; + ClientRetrieveResult.prototype.removeItemNodes = function (value) { + if (typeof value === 'object' && value !== null && value[CommonConstants.itemsLowerCase]) { + value = value[CommonConstants.itemsLowerCase]; + } + return CommonUtility.purifyJson(value); + }; + return ClientRetrieveResult; + }(ClientResult)); + OfficeExtension_1.ClientRetrieveResult = ClientRetrieveResult; + var TraceActionResultHandler = (function () { + function TraceActionResultHandler(callback) { + this.callback = callback; + } + TraceActionResultHandler.prototype._handleResult = function (value) { + if (this.callback) { + this.callback(); + } + }; + return TraceActionResultHandler; + }()); + var ClientResultCallback = (function (_super) { + __extends(ClientResultCallback, _super); + function ClientResultCallback(callback) { + var _this = _super.call(this) || this; + _this.callback = callback; + return _this; + } + ClientResultCallback.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + this.callback(); + }; + return ClientResultCallback; + }(ClientResult)); + OfficeExtension_1.ClientResultCallback = ClientResultCallback; + var OperationalApiHelper = (function () { + function OperationalApiHelper() { + } + OperationalApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + if (operationType === void 0) { + operationType = 0; + } + if (args === void 0) { + args = []; + } + if (flags === void 0) { + flags = 0; + } + if (resultProcessType === void 0) { + resultProcessType = 0; + } + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResult(); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeMethodWithClientResultCallback = function (callback, obj, methodName) { + var operationType = 0; + var args = []; + var flags = 0; + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResultCallback(callback); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeRetrieve = function (obj, select) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var option; + if (typeof select[0] === 'object' && select[0].hasOwnProperty('$all')) { + if (!select[0]['$all']) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + option = select[0]; + } + else { + option = OperationalApiHelper._parseSelectOption(select); + } + return obj._retrieve(option, new ClientRetrieveResult(shouldPolyfill)); + }; + OperationalApiHelper._parseSelectOption = function (select) { + if (!select || !select[0]) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + var parsedSelect = select[0] && typeof select[0] !== 'string' ? select[0] : select; + return Array.isArray(parsedSelect) ? parsedSelect : OperationalApiHelper.parseRecursiveSelect(parsedSelect); + }; + OperationalApiHelper.parseRecursiveSelect = function (select) { + var deconstruct = function (selectObj) { + return Object.keys(selectObj).reduce(function (scalars, name) { + var value = selectObj[name]; + if (typeof value === 'object') { + return scalars.concat(deconstruct(value).map(function (postfix) { return name + "/" + postfix; })); + } + if (value) { + return scalars.concat(name); + } + return scalars; + }, []); + }; + return deconstruct(select); + }; + OperationalApiHelper.invokeRecursiveUpdate = function (obj, properties) { + return CoreUtility.createPromise(function (resolve, reject) { + obj._recursivelyUpdate(properties); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + obj._context._addServiceApiAction(action, null, resolve, reject); + }); + }; + OperationalApiHelper.createRootServiceObject = function (type, context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + var objectPath = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var objectPath = new ObjectPath(objectPathInfo, null, isCollection, false, 1, flags | 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, false, 1, flags | 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createIndexerObject = function (type, parent, args) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var id = parent._context._nextId(); + var objectPathInfo = { + Id: id, + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var o = new type(parent._context, objectPath); + return o; + }; + OperationalApiHelper.createAndInstantiateMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + return CoreUtility.createPromise(function (resolve, reject) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var result = new ClientResult(); + var actionInfo = { + Id: parent._context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id, + QueryInfo: {} + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = objectPath; + parent._context._addServiceApiAction(action, result, function () { return resolve(new type(parent._context, objectPath)); }, reject); + }); + }; + OperationalApiHelper.createTraceAction = function (context, callback) { + return CoreUtility.createPromise(function (resolve, reject) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + var result = new TraceActionResultHandler(callback); + context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.localDocumentContext = new ClientRequestContextBase(); + return OperationalApiHelper; + }()); + OfficeExtension_1.OperationalApiHelper = OperationalApiHelper; + var GenericEventRegistryOperational = (function () { + function GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform) { + this.eventId = eventId; + this.targetId = targetId; + this.eventArgumentTransform = eventArgumentTransform; + this.registeredCallbacks = []; + } + GenericEventRegistryOperational.prototype.add = function (callback) { + if (this.hasZero()) { + GenericEventRegistration.getGenericEventRegistration('').register(this.eventId, this.targetId, this.registerCallback); + } + this.registeredCallbacks.push(callback); + }; + GenericEventRegistryOperational.prototype.remove = function (callback) { + var index = this.registeredCallbacks.lastIndexOf(callback); + if (index !== -1) { + this.registeredCallbacks.splice(index, 1); + } + }; + GenericEventRegistryOperational.prototype.removeAll = function () { + this.registeredCallbacks = []; + GenericEventRegistration.getGenericEventRegistration('').unregister(this.eventId, this.targetId, this.registerCallback); + }; + GenericEventRegistryOperational.prototype.hasZero = function () { + return this.registeredCallbacks.length === 0; + }; + Object.defineProperty(GenericEventRegistryOperational.prototype, "registerCallback", { + get: function () { + var i = this; + if (!this.outsideCallback) { + this.outsideCallback = function (argument) { + i.call(argument); + }; + } + return this.outsideCallback; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistryOperational.prototype.call = function (rawEventArguments) { + var _this = this; + this.eventArgumentTransform(rawEventArguments).then(function (eventArguments) { + var promises = _this.registeredCallbacks.map(function (callback) { return GenericEventRegistryOperational.callCallback(callback, eventArguments); }); + CoreUtility.Promise.all(promises); + }); + }; + GenericEventRegistryOperational.callCallback = function (callback, eventArguments) { + return CoreUtility._createPromiseFromResult(null) + .then(GenericEventRegistryOperational.wrapCallbackInFunction(callback, eventArguments))["catch"](function (e) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(e)); + }); + }; + GenericEventRegistryOperational.wrapCallbackInFunction = function (callback, args) { + return function () { return callback(args); }; + }; + return GenericEventRegistryOperational; + }()); + OfficeExtension_1.GenericEventRegistryOperational = GenericEventRegistryOperational; + var GlobalEventRegistryOperational = (function () { + function GlobalEventRegistryOperational() { + this.eventToTargetToHandlerMap = {}; + } + Object.defineProperty(GlobalEventRegistryOperational, "globalEventRegistry", { + get: function () { + if (!GlobalEventRegistryOperational.singleton) { + GlobalEventRegistryOperational.singleton = new GlobalEventRegistryOperational(); + } + return GlobalEventRegistryOperational.singleton; + }, + enumerable: true, + configurable: true + }); + GlobalEventRegistryOperational.getGlobalEventRegistry = function (eventId, targetId, eventArgumentTransform) { + var global = GlobalEventRegistryOperational.globalEventRegistry; + var mapGlobal = global.eventToTargetToHandlerMap; + if (!mapGlobal.hasOwnProperty(eventId)) { + mapGlobal[eventId] = {}; + } + var mapEvent = mapGlobal[eventId]; + if (!mapEvent.hasOwnProperty(targetId)) { + mapEvent[targetId] = new GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform); + } + var target = mapEvent[targetId]; + return target; + }; + GlobalEventRegistryOperational.singleton = undefined; + return GlobalEventRegistryOperational; + }()); + OfficeExtension_1.GlobalEventRegistryOperational = GlobalEventRegistryOperational; + var GenericEventHandlerOperational = (function () { + function GenericEventHandlerOperational(genericEventInfo) { + this.genericEventInfo = genericEventInfo; + } + GenericEventHandlerOperational.prototype.add = function (callback) { + var _this = this; + var eventRegistered = undefined; + var promise = CoreUtility.createPromise(function (resolve) { + eventRegistered = resolve; + }); + var addCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.add(callback); + eventRegistered(); + }; + this.register(); + this.createTrace(addCallback); + return promise; + }; + GenericEventHandlerOperational.prototype.remove = function (callback) { + var _this = this; + var removeCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.remove(callback); + }; + this.register(); + this.createTrace(removeCallback); + }; + GenericEventHandlerOperational.prototype.removeAll = function () { + var _this = this; + var removeAllCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.removeAll(); + }; + this.unregister(); + this.createTrace(removeAllCallback); + }; + GenericEventHandlerOperational.prototype.createTrace = function (callback) { + OperationalApiHelper.createTraceAction(this.genericEventInfo.object._context, callback); + }; + GenericEventHandlerOperational.prototype.register = function () { + var operationType = 0; + var args = []; + var flags = 0; + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.register, operationType, args, flags); + if (!GenericEventRegistration.getGenericEventRegistration('').isReady) { + GenericEventRegistration.getGenericEventRegistration('').ready(); + } + }; + GenericEventHandlerOperational.prototype.unregister = function () { + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.unregister); + }; + return GenericEventHandlerOperational; + }()); + OfficeExtension_1.GenericEventHandlerOperational = GenericEventHandlerOperational; + var EventHelper = (function () { + function EventHelper() { + } + EventHelper.invokeOn = function (eventHandler, callback, options) { + var promiseResolve = undefined; + var promise = CoreUtility.createPromise(function (resolve, reject) { + promiseResolve = resolve; + }); + eventHandler.add(callback).then(function () { + promiseResolve({}); + }); + return promise; + }; + EventHelper.invokeOff = function (genericEventHandlersOpObj, eventHandler, eventName, callback) { + if (!eventName && !callback) { + var allGenericEventHandlersOp = Object.keys(genericEventHandlersOpObj).map(function (eventName) { return genericEventHandlersOpObj[eventName]; }); + return EventHelper.invokeAllOff(allGenericEventHandlersOp); + } + if (!eventName) { + return CoreUtility._createPromiseFromException(eventName + " must be supplied if handler is supplied."); + } + if (callback) { + eventHandler.remove(callback); + } + else { + eventHandler.removeAll(); + } + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + EventHelper.invokeAllOff = function (allGenericEventHandlersOperational) { + allGenericEventHandlersOperational.forEach(function (genericEventHandlerOperational) { + genericEventHandlerOperational.removeAll(); + }); + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + return EventHelper; + }()); + OfficeExtension_1.EventHelper = EventHelper; + var ErrorCodes = (function (_super) { + __extends(ErrorCodes, _super); + function ErrorCodes() { + return _super !== null && _super.apply(this, arguments) || this; + } + ErrorCodes.propertyNotLoaded = 'PropertyNotLoaded'; + ErrorCodes.runMustReturnPromise = 'RunMustReturnPromise'; + ErrorCodes.cannotRegisterEvent = 'CannotRegisterEvent'; + ErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + ErrorCodes.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ErrorCodes; + }(CoreErrorCodes)); + OfficeExtension_1.ErrorCodes = ErrorCodes; + var TraceMarkerActionResultHandler = (function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback = callback; + } + TraceMarkerActionResultHandler.prototype._handleResult = function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); + var ActionFactory = (function (_super) { + __extends(ActionFactory, _super); + function ActionFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + ActionFactory.createMethodAction = function (context, parent, methodName, operationType, args, flags) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var fixedFlags = Utility._fixupApiFlags(flags); + var action = new Action(actionInfo, operationType, fixedFlags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + parent._addAction(action); + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (fixedFlags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + Arguments: args, + ObjectId: '', + ObjectType: '' + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return action; + }; + ActionFactory.createRecursiveQueryAction = function (context, parent, query) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 6, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + RecursiveQueryInfo: query + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createEnsureUnchangedAction = function (context, parent, objectState) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 8, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createInstantiateAction = function (context, obj) { + Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); + var actionInfo = { + Id: context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: obj._objectPath.objectPathInfo.Id + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = obj._objectPath; + obj._addAction(action, new InstantiateActionResultHandler(obj), true); + return action; + }; + ActionFactory.createTraceAction = function (context, message, addTraceMessage) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var ret = new Action(actionInfo, 1, 4); + context._pendingRequest.addAction(ret); + if (addTraceMessage) { + context._pendingRequest.addTrace(actionInfo.Id, message); + } + return ret; + }; + ActionFactory.createTraceMarkerForCallback = function (context, callback) { + var action = ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; + return ActionFactory; + }(CommonActionFactory)); + OfficeExtension_1.ActionFactory = ActionFactory; + var ClientObject = (function (_super) { + __extends(ClientObject, _super); + function ClientObject(context, objectPath) { + var _this = _super.call(this, context, objectPath) || this; + Utility.checkArgumentNull(context, 'context'); + _this.m_context = context; + if (_this._objectPath) { + if (!context._processingResult && context._pendingRequest) { + ActionFactory.createInstantiateAction(context, _this); + if (context._autoCleanup && _this._KeepReference) { + context.trackedObjects._autoAdd(_this); + } + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo && _this._objectPath.objectPathInfo && _this._className) { + _this._objectPath.objectPathInfo.T = _this._className; + } + } + return _this; + } + Object.defineProperty(ClientObject.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNull", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNull', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNullObject", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNullObject', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "_isNull", { + get: function () { + return this.m_isNull; + }, + set: function (value) { + this.m_isNull = value; + if (value && this._objectPath) { + this._objectPath._updateAsNullObject(); + } + }, + enumerable: true, + configurable: true + }); + ClientObject.prototype._addAction = function (action, resultHandler, isInstantiationEnsured) { + if (resultHandler === void 0) { + resultHandler = null; + } + if (!isInstantiationEnsured) { + this.context._pendingRequest.ensureInstantiateObjectPath(this._objectPath); + this.context._pendingRequest.ensureInstantiateObjectPaths(action.referencedArgumentObjectPaths); + } + this.context._pendingRequest.addAction(action); + this.context._pendingRequest.addReferencedObjectPath(this._objectPath); + this.context._pendingRequest.addReferencedObjectPaths(action.referencedArgumentObjectPaths); + this.context._pendingRequest.addActionResultHandler(action, resultHandler); + return CoreUtility._createPromiseFromResult(null); + }; + ClientObject.prototype._addPreviewExecutionAction = function (action) { + if (!Utility.isUndefined(this._className)) { + action.ObjectType = this._className; + var objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idLowerCase); + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idPrivate); + } + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.previewExecutionObjectId); + } + action.ObjectId = objectId; + this.context._pendingRequest.addPreviewExecutionAction(action); + } + }; + ClientObject.prototype._handleResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleIdResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + Utility.fixObjectPathIfNecessary(this, value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleRetrieveResult = function (value, result) { + this._handleIdResult(value); + }; + ClientObject.prototype._recursivelySet = function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { + var isClientObject = input instanceof ClientObject; + var originalInput = input; + if (isClientObject) { + if (Object.getPrototypeOf(this) === Object.getPrototypeOf(input)) { + input = JSON.parse(JSON.stringify(input)); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'properties', + errorLocation: this._className + '.set' + }); + } + } + try { + var prop; + for (var i = 0; i < scalarWriteablePropertyNames.length; i++) { + prop = scalarWriteablePropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + this[prop] = input[prop]; + } + } + } + for (var i = 0; i < objectPropertyNames.length; i++) { + prop = objectPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + var dataToPassToSet = isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } + } + } + var throwOnReadOnly = !isClientObject; + if (options && !Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly = options.throwOnReadOnly; + } + for (var i = 0; i < notAllowedToBeSetPropertyNames.length; i++) { + prop = notAllowedToBeSetPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined' && throwOnReadOnly) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + for (prop in input) { + if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); + if (!propertyDescriptor) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, prop), + debugInfo: { + errorLocation: prop + } + }); + } + if (throwOnReadOnly && !propertyDescriptor.set) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.set' + }, + innerError: innerError + }); + } + }; + return ClientObject; + }(ClientObjectBase)); + OfficeExtension_1.ClientObject = ClientObject; + var HostBridgeRequestExecutor = (function () { + function HostBridgeRequestExecutor(session) { + this.m_session = session; + } + HostBridgeRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var httpRequestInfo = { + url: CoreConstants.processQuery, + method: 'POST', + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var controlId = ''; + if (requestMessage.Headers) { + controlId = requestMessage.Headers[Constants.officeControlId]; + } + var message = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + controlId: controlId, + message: httpRequestInfo + }; + CoreUtility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message).then(function (nativeBridgeResponse) { + CoreUtility.log('Received response: ' + JSON.stringify(nativeBridgeResponse)); + var responseInfo = nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession = (function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(m_bridge) { + var _this = _super.call(this) || this; + _this.m_bridge = m_bridge; + _this.m_bridge.addHostMessageHandler(function (message) { + if (message.type === 3) { + var controlId = message.controlId; + if (CoreUtility.isNullOrEmptyString(controlId)) { + GenericEventRegistration.getGenericEventRegistration(controlId)._handleRichApiMessage(message.message); + } + else { + var eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(controlId); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(''); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + } + } + }); + return _this; + } + HostBridgeSession.getInstanceIfHostBridgeInited = function () { + if (HostBridge.instance) { + if (CoreUtility.isNullOrUndefined(HostBridgeSession.s_instance) || + HostBridgeSession.s_instance.m_bridge !== HostBridge.instance) { + HostBridgeSession.s_instance = new HostBridgeSession(HostBridge.instance); + } + return HostBridgeSession.s_instance; + } + return null; + }; + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull = function () { + CoreUtility.log('NativeBridgeSession::CreateRequestExecutor'); + return new HostBridgeRequestExecutor(this); + }; + HostBridgeSession.prototype.getEventRegistration = function (controlId) { + return GenericEventRegistration.getGenericEventRegistration(controlId); + }; + HostBridgeSession.prototype.sendMessageToHost = function (message) { + return this.m_bridge.sendMessageToHostAndExpectResponse(message); + }; + return HostBridgeSession; + }(SessionBase)); + OfficeExtension_1.HostBridgeSession = HostBridgeSession; + var ClientRequestContext = (function (_super) { + __extends(ClientRequestContext, _super); + function ClientRequestContext(url) { + var _this = _super.call(this) || this; + _this.m_customRequestHeaders = {}; + _this.m_batchMode = 0; + _this._onRunFinishedNotifiers = []; + if (SessionBase._overrideSession) { + _this.m_requestUrlAndHeaderInfoResolver = SessionBase._overrideSession; + } + else { + if (Utility.isNullOrUndefined(url) || (typeof url === 'string' && url.length === 0)) { + url = ClientRequestContext.defaultRequestUrlAndHeaders; + if (!url) { + url = { url: CoreConstants.localDocument, headers: {} }; + } + } + if (typeof url === 'string') { + _this.m_requestUrlAndHeaderInfo = { url: url, headers: {} }; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfoResolver(url)) { + _this.m_requestUrlAndHeaderInfoResolver = url; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfo(url)) { + var requestInfo = url; + _this.m_requestUrlAndHeaderInfo = { url: requestInfo.url, headers: {} }; + CoreUtility._copyHeaders(requestInfo.headers, _this.m_requestUrlAndHeaderInfo.headers); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'url' }); + } + } + if (!_this.m_requestUrlAndHeaderInfoResolver && + _this.m_requestUrlAndHeaderInfo && + CoreUtility._isLocalDocumentUrl(_this.m_requestUrlAndHeaderInfo.url) && + HostBridgeSession.getInstanceIfHostBridgeInited()) { + _this.m_requestUrlAndHeaderInfo = null; + _this.m_requestUrlAndHeaderInfoResolver = HostBridgeSession.getInstanceIfHostBridgeInited(); + } + if (_this.m_requestUrlAndHeaderInfoResolver instanceof SessionBase) { + _this.m_session = _this.m_requestUrlAndHeaderInfoResolver; + } + _this._processingResult = false; + _this._customData = Constants.iterativeExecutor; + _this.sync = _this.sync.bind(_this); + return _this; + } + Object.defineProperty(ClientRequestContext.prototype, "session", { + get: function () { + return this.m_session; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "eventRegistration", { + get: function () { + if (this.m_session) { + return this.m_session.getEventRegistration(this._controlId); + } + return _Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_url", { + get: function () { + if (this.m_requestUrlAndHeaderInfo) { + return this.m_requestUrlAndHeaderInfo.url; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_pendingRequest", { + get: function () { + if (this.m_pendingRequest == null) { + this.m_pendingRequest = new ClientRequest(this); + } + return this.m_pendingRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_controlId", { + get: function () { + var ret = this.m_customRequestHeaders[Constants.officeControlId]; + if (CoreUtility.isNullOrUndefined(ret)) { + ret = ''; + } + return ret; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension_1._internalConfig.showDisposeInfoInDebugInfo); + var statements = prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { + get: function () { + if (!this.m_trackedObjects) { + this.m_trackedObjects = new TrackedObjects(this); + } + return this.m_trackedObjects; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "requestHeaders", { + get: function () { + return this.m_customRequestHeaders; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "batchMode", { + get: function () { + return this.m_batchMode; + }, + enumerable: true, + configurable: true + }); + ClientRequestContext.prototype.ensureInProgressBatchIfBatchMode = function () { + if (this.m_batchMode === 1 && !this.m_explicitBatchInProgress) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.notInsideBatch), null); + } + }; + ClientRequestContext.prototype.load = function (clientObj, option) { + Utility.validateContext(this, clientObj); + var queryOption = ClientRequestContext._parseQueryOption(option); + CommonActionFactory.createQueryAction(this, clientObj, queryOption, clientObj); + }; + ClientRequestContext.prototype.loadRecursive = function (clientObj, options, maxDepth) { + if (!Utility.isPlainJsonObject(options)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'options' }); + } + var quries = {}; + for (var key in options) { + quries[key] = ClientRequestContext._parseQueryOption(options[key]); + } + var action = ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); + this._pendingRequest.addActionResultHandler(action, clientObj); + }; + ClientRequestContext.prototype.trace = function (message) { + ActionFactory.createTraceAction(this, message, true); + }; + ClientRequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { }; + ClientRequestContext.prototype.ensureRequestUrlAndHeaderInfo = function () { + var _this = this; + return Utility._createPromiseFromResult(null).then(function () { + if (!_this.m_requestUrlAndHeaderInfo) { + return _this.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function (value) { + _this.m_requestUrlAndHeaderInfo = value; + if (!_this.m_requestUrlAndHeaderInfo) { + _this.m_requestUrlAndHeaderInfo = { url: CoreConstants.localDocument, headers: {} }; + } + if (Utility.isNullOrEmptyString(_this.m_requestUrlAndHeaderInfo.url)) { + _this.m_requestUrlAndHeaderInfo.url = CoreConstants.localDocument; + } + if (!_this.m_requestUrlAndHeaderInfo.headers) { + _this.m_requestUrlAndHeaderInfo.headers = {}; + } + if (typeof _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull === 'function') { + var executor = _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull(); + if (executor) { + _this._requestExecutor = executor; + } + } + }); + } + }); + }; + ClientRequestContext.prototype.syncPrivateMain = function () { + var _this = this; + return this.ensureRequestUrlAndHeaderInfo().then(function () { + var req = _this._pendingRequest; + _this.m_pendingRequest = null; + return _this.processPreSyncPromises(req).then(function () { return _this.syncPrivate(req); }); + }); + }; + ClientRequestContext.prototype.syncPrivate = function (req) { + var _this = this; + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(null); + } + if (!req.hasActions) { + return this.processPendingEventHandlers(req); + } + var _a = req.buildRequestMessageBodyAndRequestFlags(), msgBody = _a.body, requestFlags = _a.flags; + if (this._requestFlagModifier) { + requestFlags |= this._requestFlagModifier; + } + if (!this._requestExecutor) { + if (CoreUtility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + this._requestExecutor = new OfficeJsRequestExecutor(this); + } + else { + this._requestExecutor = new HttpRequestExecutor(); + } + } + var requestExecutor = this._requestExecutor; + var headers = {}; + CoreUtility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + CoreUtility._copyHeaders(this.m_customRequestHeaders, headers); + delete this.m_customRequestHeaders[Constants.officeScriptEventId]; + var testNameWithSequenceId = TestUtility._getCurrentTestNameWithSequenceId(); + if (testNameWithSequenceId) { + headers[CoreConstants.testRequestNameHeader] = testNameWithSequenceId; + } + var requestExecutorRequestMessage = { + Url: this.m_requestUrlAndHeaderInfo.url, + Headers: headers, + Body: msgBody + }; + req.invalidatePendingInvalidObjectPaths(); + var errorFromResponse = null; + var errorFromProcessEventHandlers = null; + this._lastSyncStart = typeof performance === 'undefined' ? Date.now() : performance.now(); + this._lastRequestFlags = requestFlags; + return requestExecutor + .executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) + .then(function (response) { + _this._lastSyncEnd = typeof performance === 'undefined' ? Date.now() : performance.now(); + if (OfficeExtension_1.config.executePerfLogFunc) { + OfficeExtension_1.config.executePerfLogFunc({ syncStart: _this._lastSyncStart, + syncEnd: _this._lastSyncEnd + }); + } + errorFromResponse = _this.processRequestExecutorResponseMessage(req, response); + return _this.processPendingEventHandlers(req)["catch"](function (ex) { + CoreUtility.log('Error in processPendingEventHandlers'); + CoreUtility.log(JSON.stringify(ex)); + errorFromProcessEventHandlers = ex; + }); + }) + .then(function () { + if (errorFromResponse) { + CoreUtility.log('Throw error from response: ' + JSON.stringify(errorFromResponse)); + throw errorFromResponse; + } + if (errorFromProcessEventHandlers) { + CoreUtility.log('Throw error from ProcessEventHandler: ' + JSON.stringify(errorFromProcessEventHandlers)); + var transformedError = null; + if (errorFromProcessEventHandlers instanceof _Internal.RuntimeError) { + transformedError = errorFromProcessEventHandlers; + transformedError.traceMessages = req._responseTraceMessages; + } + else { + var message = null; + if (typeof errorFromProcessEventHandlers === 'string') { + message = errorFromProcessEventHandlers; + } + else { + message = errorFromProcessEventHandlers.message; + } + if (Utility.isNullOrEmptyString(message)) { + message = CoreUtility._getResourceString(ResourceStrings.cannotRegisterEvent); + } + transformedError = new _Internal.RuntimeError({ + code: ErrorCodes.cannotRegisterEvent, + httpStatusCode: 400, + message: message, + traceMessages: req._responseTraceMessages + }); + } + throw transformedError; + } + }); + }; + ClientRequestContext.prototype.processRequestExecutorResponseMessage = function (req, response) { + if (response.Body && response.Body.TraceIds) { + req._setResponseTraceIds(response.Body.TraceIds); + } + var traceMessages = req._responseTraceMessages; + var errorStatementInfo = null; + if (response.Body) { + if (response.Body.Error && response.Body.Error.ActionIndex >= 0) { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, true); + var debugInfoStatementInfo = prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + errorStatementInfo = { + statement: debugInfoStatementInfo.statement, + surroundingStatements: debugInfoStatementInfo.surroundingStatements, + fullStatements: ['Please enable config.extendedErrorLogging to see full statements.'] + }; + if (OfficeExtension_1.config.extendedErrorLogging) { + prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, false); + errorStatementInfo.fullStatements = prettyPrinter.process(); + } + } + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (actionResults) { + this._processingResult = true; + try { + req.processResponse(actionResults); + } + finally { + this._processingResult = false; + } + } + } + if (!Utility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage, + traceMessages: traceMessages, + data: { responseBody: response.RawErrorResponseBody } + }); + } + else if (response.Body && response.Body.Error) { + var debugInfo = { + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement = errorStatementInfo.statement; + debugInfo.surroundingStatements = errorStatementInfo.surroundingStatements; + debugInfo.fullStatements = errorStatementInfo.fullStatements; + } + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message, + traceMessages: traceMessages, + debugInfo: debugInfo + }); + } + return null; + }; + ClientRequestContext.prototype.processPendingEventHandlers = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._pendingProcessEventHandlers.length; i++) { + var eventHandlers = req._pendingProcessEventHandlers[i]; + ret = ret.then(this.createProcessOneEventHandlersFunc(eventHandlers, req)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneEventHandlersFunc = function (eventHandlers, req) { + return function () { return eventHandlers._processRegistration(req); }; + }; + ClientRequestContext.prototype.processPreSyncPromises = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._preSyncPromises.length; i++) { + var p = req._preSyncPromises[i]; + ret = ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc = function (p) { + return function () { return p; }; + }; + ClientRequestContext.prototype.sync = function (passThroughValue) { + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(passThroughValue); + } + return this.syncPrivateMain().then(function () { return passThroughValue; }); + }; + ClientRequestContext.prototype.batch = function (batchBody) { + var _this = this; + if (this.m_batchMode !== 1) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, null, null)); + } + if (this.m_explicitBatchInProgress) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.pendingBatchInProgress), null)); + } + if (Utility.isNullOrUndefined(batchBody)) { + return Utility._createPromiseFromResult(null); + } + this.m_explicitBatchInProgress = true; + var previousRequest = this.m_pendingRequest; + this.m_pendingRequest = new ClientRequest(this); + var batchBodyResult; + try { + batchBodyResult = batchBody(this._rootObject, this); + } + catch (ex) { + this.m_explicitBatchInProgress = false; + this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + } + var request; + var batchBodyResultPromise; + if (typeof batchBodyResult === 'object' && batchBodyResult && typeof batchBodyResult.then === 'function') { + batchBodyResultPromise = Utility._createPromiseFromResult(null) + .then(function () { + return batchBodyResult; + }) + .then(function (result) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return result; + })["catch"](function (ex) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + }); + } + else { + this.m_explicitBatchInProgress = false; + request = this.m_pendingRequest; + this.m_pendingRequest = previousRequest; + batchBodyResultPromise = Utility._createPromiseFromResult(batchBodyResult); + } + return batchBodyResultPromise.then(function (result) { + return _this.ensureRequestUrlAndHeaderInfo() + .then(function () { + return _this.syncPrivate(request); + }) + .then(function () { + return result; + }); + }); + }; + ClientRequestContext._run = function (ctxInitializer, runBody, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runCommon('run', null, ctxInitializer, 0, runBody, numCleanupAttempts, retryDelay, null, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.isValidRequestInfo = function (value) { + return (typeof value === 'string' || + ClientRequestContext.isRequestUrlAndHeaderInfo(value) || + ClientRequestContext.isRequestUrlAndHeaderInfoResolver(value)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfo = function (value) { + return (typeof value === 'object' && + value !== null && + Object.getPrototypeOf(value) === Object.getPrototypeOf({}) && + !Utility.isNullOrUndefined(value.url)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfoResolver = function (value) { + return typeof value === 'object' && value !== null && typeof value._resolveRequestUrlAndHeaderInfo === 'function'; + }; + ClientRequestContext._runBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(0, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runExplicitBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(1, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runBatchCommon = function (batchMode, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + var ctxRetriever; + var batch; + var requestInfo = null; + var previousObjects = null; + var argOffset = 0; + var options = null; + if (receivedRunArgs.length > 0) { + if (ClientRequestContext.isValidRequestInfo(receivedRunArgs[0])) { + requestInfo = receivedRunArgs[0]; + argOffset = 1; + } + else if (Utility.isPlainJsonObject(receivedRunArgs[0])) { + options = receivedRunArgs[0]; + requestInfo = options.session; + if (requestInfo != null && !ClientRequestContext.isValidRequestInfo(requestInfo)) { + return ClientRequestContext.createErrorPromise(functionName); + } + previousObjects = options.previousObjects; + argOffset = 1; + } + } + if (receivedRunArgs.length == argOffset + 1) { + batch = receivedRunArgs[argOffset + 0]; + } + else if (options == null && receivedRunArgs.length == argOffset + 2) { + previousObjects = receivedRunArgs[argOffset + 0]; + batch = receivedRunArgs[argOffset + 1]; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + if (previousObjects != null) { + if (previousObjects instanceof ClientObject) { + ctxRetriever = function () { return previousObjects.context; }; + } + else if (previousObjects instanceof ClientRequestContext) { + ctxRetriever = function () { return previousObjects; }; + } + else if (Array.isArray(previousObjects)) { + var array = previousObjects; + if (array.length == 0) { + return ClientRequestContext.createErrorPromise(functionName); + } + for (var i = 0; i < array.length; i++) { + if (!(array[i] instanceof ClientObject)) { + return ClientRequestContext.createErrorPromise(functionName); + } + if (array[i].context != array[0].context) { + return ClientRequestContext.createErrorPromise(functionName, ResourceStrings.invalidRequestContext); + } + } + ctxRetriever = function () { return array[0].context; }; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + } + else { + ctxRetriever = ctxInitializer; + } + var onBeforeRunWithOptions = null; + if (onBeforeRun) { + onBeforeRunWithOptions = function (context) { return onBeforeRun(options || {}, context); }; + } + return ClientRequestContext._runCommon(functionName, requestInfo, ctxRetriever, batchMode, batch, numCleanupAttempts, retryDelay, onBeforeRunWithOptions, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.createErrorPromise = function (functionName, code) { + if (code === void 0) { + code = CoreResourceStrings.invalidArgument; + } + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(code, CoreUtility._getResourceString(code), functionName)); + }; + ClientRequestContext._runCommon = function (functionName, requestInfo, ctxRetriever, batchMode, runBody, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (SessionBase._overrideSession) { + requestInfo = SessionBase._overrideSession; + } + var starterPromise = CoreUtility.createPromise(function (resolve, reject) { + resolve(); + }); + var ctx; + var succeeded = false; + var resultOrError; + var previousBatchMode; + return starterPromise + .then(function () { + ctx = ctxRetriever(requestInfo); + if (ctx._autoCleanup) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + ctx._onRunFinishedNotifiers.push(function () { + ctx._autoCleanup = true; + resolve(); + }); + }); + } + else { + ctx._autoCleanup = true; + } + }) + .then(function () { + if (typeof runBody !== 'function') { + return ClientRequestContext.createErrorPromise(functionName); + } + previousBatchMode = ctx.m_batchMode; + ctx.m_batchMode = batchMode; + if (onBeforeRun) { + onBeforeRun(ctx); + } + var runBodyResult; + if (batchMode == 1) { + runBodyResult = runBody(ctx.batch.bind(ctx)); + } + else { + runBodyResult = runBody(ctx); + } + if (Utility.isNullOrUndefined(runBodyResult) || typeof runBodyResult.then !== 'function') { + Utility.throwError(ResourceStrings.runMustReturnPromise); + } + return runBodyResult; + }) + .then(function (runBodyResult) { + if (batchMode === 1) { + return runBodyResult; + } + else { + return ctx.sync(runBodyResult); + } + }) + .then(function (result) { + succeeded = true; + resultOrError = result; + })["catch"](function (error) { + resultOrError = error; + }) + .then(function () { + var itemsToRemove = ctx.trackedObjects._retrieveAndClearAutoCleanupList(); + ctx._autoCleanup = false; + ctx.m_batchMode = previousBatchMode; + for (var key in itemsToRemove) { + itemsToRemove[key]._objectPath.isValid = false; + } + var cleanupCounter = 0; + if (Utility._synchronousCleanup || ClientRequestContext.isRequestUrlAndHeaderInfoResolver(requestInfo)) { + return attemptCleanup(); + } + else { + attemptCleanup(); + } + function attemptCleanup() { + cleanupCounter++; + var savedPendingRequest = ctx.m_pendingRequest; + var savedBatchMode = ctx.m_batchMode; + var request = new ClientRequest(ctx); + ctx.m_pendingRequest = request; + ctx.m_batchMode = 0; + try { + for (var key in itemsToRemove) { + ctx.trackedObjects.remove(itemsToRemove[key]); + } + } + finally { + ctx.m_batchMode = savedBatchMode; + ctx.m_pendingRequest = savedPendingRequest; + } + return ctx + .syncPrivate(request) + .then(function () { + if (onCleanupSuccess) { + onCleanupSuccess(cleanupCounter); + } + })["catch"](function () { + if (onCleanupFailure) { + onCleanupFailure(cleanupCounter); + } + if (cleanupCounter < numCleanupAttempts) { + setTimeout(function () { + attemptCleanup(); + }, retryDelay); + } + }); + } + }) + .then(function () { + if (ctx._onRunFinishedNotifiers && ctx._onRunFinishedNotifiers.length > 0) { + var func = ctx._onRunFinishedNotifiers.shift(); + func(); + } + if (succeeded) { + return resultOrError; + } + else { + throw resultOrError; + } + }); + }; + return ClientRequestContext; + }(ClientRequestContextBase)); + OfficeExtension_1.ClientRequestContext = ClientRequestContext; + var RetrieveResultImpl = (function () { + function RetrieveResultImpl(m_proxy, m_shouldPolyfill) { + this.m_proxy = m_proxy; + this.m_shouldPolyfill = m_shouldPolyfill; + var scalarPropertyNames = m_proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = m_proxy[Constants.navigationPropertyNames]; + var typeName = m_proxy[Constants.className]; + var isCollection = m_proxy[Constants.isCollection]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, scalarPropertyNames[i]); + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, navigationPropertyNames[i]); + } + } + if (isCollection) { + Utility.definePropertyThrowUnloadedException(this, typeName, Constants.itemsLowerCase); + } + } + Object.defineProperty(RetrieveResultImpl.prototype, "$proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResultImpl.prototype, "$isNullObject", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: ErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'retrieveResult.$isNullObject' + } + }); + } + return this.m_isNullObject; + }, + enumerable: true, + configurable: true + }); + RetrieveResultImpl.prototype.toJSON = function () { + if (!this.m_isLoaded) { + return undefined; + } + if (this.m_isNullObject) { + return null; + } + if (Utility.isUndefined(this.m_json)) { + this.m_json = Utility.purifyJson(this.m_value); + } + return this.m_json; + }; + RetrieveResultImpl.prototype.toString = function () { + return JSON.stringify(this.toJSON()); + }; + RetrieveResultImpl.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (value === null || (typeof value === 'object' && value && value._IsNull)) { + this.m_isNullObject = true; + value = null; + } + else { + this.m_isNullObject = false; + } + if (this.m_shouldPolyfill) { + value = Utility.changePropertyNameToCamelLowerCase(value); + } + this.m_value = value; + this.m_proxy._handleRetrieveResult(value, this); + }; + return RetrieveResultImpl; + }()); + var Constants = (function (_super) { + __extends(Constants, _super); + function Constants() { + return _super !== null && _super.apply(this, arguments) || this; + } + Constants.getItemAt = 'GetItemAt'; + Constants.index = '_Index'; + Constants.iterativeExecutor = 'IterativeExecutor'; + Constants.isTracked = '_IsTracked'; + Constants.eventMessageCategory = 65536; + Constants.eventWorkbookId = 'Workbook'; + Constants.eventSourceRemote = 'Remote'; + Constants.proxy = '$proxy'; + Constants.className = '_className'; + Constants.isCollection = '_isCollection'; + Constants.collectionPropertyPath = '_collectionPropertyPath'; + Constants.objectPathInfoDoNotKeepReferenceFieldName = 'D'; + Constants.officeScriptEventId = 'X-OfficeScriptEventId'; + Constants.officeScriptFireRecordingEvent = 'X-OfficeScriptFireRecordingEvent'; + Constants.officeControlId = 'X-OfficeControlId'; + return Constants; + }(CommonConstants)); + OfficeExtension_1.Constants = Constants; + var ClientRequest = (function (_super) { + __extends(ClientRequest, _super); + function ClientRequest(context) { + var _this = _super.call(this, context) || this; + _this.m_context = context; + _this.m_pendingProcessEventHandlers = []; + _this.m_pendingEventHandlerActions = {}; + _this.m_traceInfos = {}; + _this.m_responseTraceIds = {}; + _this.m_responseTraceMessages = []; + return _this; + } + Object.defineProperty(ClientRequest.prototype, "traceInfos", { + get: function () { + return this.m_traceInfos; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceMessages", { + get: function () { + return this.m_responseTraceMessages; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceIds", { + get: function () { + return this.m_responseTraceIds; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._setResponseTraceIds = function (value) { + if (value) { + for (var i = 0; i < value.length; i++) { + var traceId = value[i]; + this.m_responseTraceIds[traceId] = traceId; + var message = this.m_traceInfos[traceId]; + if (!CoreUtility.isNullOrUndefined(message)) { + this.m_responseTraceMessages.push(message); + } + } + } + }; + ClientRequest.prototype.addTrace = function (actionId, message) { + this.m_traceInfos[actionId] = message; + }; + ClientRequest.prototype._addPendingEventHandlerAction = function (eventHandlers, action) { + if (!this.m_pendingEventHandlerActions[eventHandlers._id]) { + this.m_pendingEventHandlerActions[eventHandlers._id] = []; + this.m_pendingProcessEventHandlers.push(eventHandlers); + } + this.m_pendingEventHandlerActions[eventHandlers._id].push(action); + }; + Object.defineProperty(ClientRequest.prototype, "_pendingProcessEventHandlers", { + get: function () { + return this.m_pendingProcessEventHandlers; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._getPendingEventHandlerActions = function (eventHandlers) { + return this.m_pendingEventHandlerActions[eventHandlers._id]; + }; + return ClientRequest; + }(ClientRequestBase)); + OfficeExtension_1.ClientRequest = ClientRequest; + var EventHandlers = (function () { + function EventHandlers(context, parentObject, name, eventInfo) { + var _this = this; + this.m_id = context._nextId(); + this.m_context = context; + this.m_name = name; + this.m_handlers = []; + this.m_registered = false; + this.m_eventInfo = eventInfo; + this.m_callback = function (args) { + _this.m_eventInfo.eventArgsTransformFunc(args).then(function (newArgs) { return _this.fireEvent(newArgs); }); + }; + } + Object.defineProperty(EventHandlers.prototype, "_registered", { + get: function () { + return this.m_registered; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_id", { + get: function () { + return this.m_id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_handlers", { + get: function () { + return this.m_handlers; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); + EventHandlers.prototype.add = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 0 + }); + return new EventHandlerResult(this.m_context, this, handler); + }; + EventHandlers.prototype.remove = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 1 + }); + }; + EventHandlers.prototype.removeAll = function () { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: null, + operation: 2 + }); + }; + EventHandlers.prototype._processRegistration = function (req) { + var _this = this; + var ret = CoreUtility._createPromiseFromResult(null); + var actions = req._getPendingEventHandlerActions(this); + if (!actions) { + return ret; + } + var handlersResult = []; + for (var i = 0; i < this.m_handlers.length; i++) { + handlersResult.push(this.m_handlers[i]); + } + var hasChange = false; + for (var i = 0; i < actions.length; i++) { + if (req._responseTraceIds[actions[i].id]) { + hasChange = true; + switch (actions[i].operation) { + case 0: + handlersResult.push(actions[i].handler); + break; + case 1: + for (var index = handlersResult.length - 1; index >= 0; index--) { + if (handlersResult[index] === actions[i].handler) { + handlersResult.splice(index, 1); + break; + } + } + break; + case 2: + handlersResult = []; + break; + } + } + } + if (hasChange) { + if (!this.m_registered && handlersResult.length > 0) { + ret = ret.then(function () { return _this.m_eventInfo.registerFunc(_this.m_callback); }).then(function () { return (_this.m_registered = true); }); + } + else if (this.m_registered && handlersResult.length == 0) { + ret = ret + .then(function () { return _this.m_eventInfo.unregisterFunc(_this.m_callback); })["catch"](function (ex) { + CoreUtility.log('Error when unregister event: ' + JSON.stringify(ex)); + }) + .then(function () { return (_this.m_registered = false); }); + } + ret = ret.then(function () { return (_this.m_handlers = handlersResult); }); + } + return ret; + }; + EventHandlers.prototype.fireEvent = function (args) { + var promises = []; + for (var i = 0; i < this.m_handlers.length; i++) { + var handler = this.m_handlers[i]; + var p = CoreUtility._createPromiseFromResult(null) + .then(this.createFireOneEventHandlerFunc(handler, args))["catch"](function (ex) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(ex)); + }); + promises.push(p); + } + CoreUtility.Promise.all(promises); + }; + EventHandlers.prototype.createFireOneEventHandlerFunc = function (handler, args) { + return function () { return handler(args); }; + }; + return EventHandlers; + }()); + OfficeExtension_1.EventHandlers = EventHandlers; + var EventHandlerResult = (function () { + function EventHandlerResult(context, handlers, handler) { + this.m_context = context; + this.m_allHandlers = handlers; + this.m_handler = handler; + } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + EventHandlerResult.prototype.remove = function () { + if (this.m_allHandlers && this.m_handler) { + this.m_allHandlers.remove(this.m_handler); + this.m_allHandlers = null; + this.m_handler = null; + } + }; + return EventHandlerResult; + }()); + OfficeExtension_1.EventHandlerResult = EventHandlerResult; + (function (_Internal) { + var OfficeJsEventRegistration = (function () { + function OfficeJsEventRegistration() { + } + OfficeJsEventRegistration.prototype.register = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingDataChanged, handler, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingSelectionChanged, handler, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); + }); + case 5: + return OSF.DDA.RichApi.richApiMessageManager.register(handler); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { id: targetId }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { id: targetId }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { id: targetId }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + OfficeJsEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingDataChanged, { handler: handler }, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingSelectionChanged, { handler: handler }, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); + }); + case 5: + return Utility.promisify(function (callback) { + return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync('richApiMessage', { handler: handler }, callback); + }); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { id: targetId, handler: handler }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { id: targetId, handler: handler }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { id: targetId, handler: handler }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + return OfficeJsEventRegistration; + }()); + _Internal.officeJsEventRegistration = new OfficeJsEventRegistration(); + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var EventRegistration = (function () { + function EventRegistration(registerEventImpl, unregisterEventImpl) { + this.m_handlersByEventByTarget = {}; + this.m_registerEventImpl = registerEventImpl; + this.m_unregisterEventImpl = unregisterEventImpl; + } + EventRegistration.getTargetIdOrDefault = function (targetId) { + if (Utility.isNullOrUndefined(targetId)) { + return ''; + } + return targetId; + }; + EventRegistration.prototype.getHandlers = function (eventId, targetId) { + targetId = EventRegistration.getTargetIdOrDefault(targetId); + var handlersById = this.m_handlersByEventByTarget[eventId]; + if (!handlersById) { + handlersById = {}; + this.m_handlersByEventByTarget[eventId] = handlersById; + } + var handlers = handlersById[targetId]; + if (!handlers) { + handlers = []; + handlersById[targetId] = handlers; + } + return handlers; + }; + EventRegistration.prototype.callHandlers = function (eventId, targetId, argument) { + var funcs = this.getHandlers(eventId, targetId); + for (var i = 0; i < funcs.length; i++) { + funcs[i](argument); + } + }; + EventRegistration.prototype.hasHandlers = function (eventId, targetId) { + return this.getHandlers(eventId, targetId).length > 0; + }; + EventRegistration.prototype.register = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + handlers.push(handler); + if (handlers.length === 1) { + return this.m_registerEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + EventRegistration.prototype.unregister = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length === 0) { + return this.m_unregisterEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + return EventRegistration; + }()); + OfficeExtension_1.EventRegistration = EventRegistration; + var GenericEventRegistration = (function () { + function GenericEventRegistration() { + this.m_eventRegistration = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler = this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready = function () { + var _this = this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready = GenericEventRegistration._testReadyImpl().then(function () { + _this.m_isReady = true; + }); + } + else if (HostBridge.instance) { + this.m_ready = Utility._createPromiseFromResult(null).then(function () { + _this.m_isReady = true; + }); + } + else { + this.m_ready = _Internal.officeJsEventRegistration + .register(5, '', this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady = true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage = function (msg) { + if (msg && msg.entries) { + for (var entryIndex = 0; entryIndex < msg.entries.length; entryIndex++) { + var entry = msg.entries[entryIndex]; + if (entry.messageCategory == Constants.eventMessageCategory) { + if (CoreUtility._logEnabled) { + CoreUtility.log(JSON.stringify(entry)); + } + var eventId = entry.messageType; + var targetId = entry.targetId; + var hasHandlers = this.m_eventRegistration.hasHandlers(eventId, targetId); + if (hasHandlers) { + var arg = JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source = Constants.eventSourceRemote; + } + this.m_eventRegistration.callHandlers(eventId, targetId, arg); + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + if (!ret) { + ret = new GenericEventRegistration(); + GenericEventRegistration.s_genericEventRegistrations[controlId] = ret; + } + return ret; + }; + GenericEventRegistration.peekGenericEventRegistrationOrNull = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + return ret; + }; + GenericEventRegistration.richApiMessageEventCategory = 65536; + GenericEventRegistration.s_genericEventRegistrations = {}; + return GenericEventRegistration; + }()); + OfficeExtension_1.GenericEventRegistration = GenericEventRegistration; + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl = impl; + } + OfficeExtension_1._testSetRichApiMessageReadyImpl = _testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration('')._handleRichApiMessage(msg); + } + OfficeExtension_1._testTriggerRichApiMessageEvent = _testTriggerRichApiMessageEvent; + var GenericEventHandlers = (function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + var _this = _super.call(this, context, parentObject, name, eventInfo) || this; + _this.m_genericEventInfo = eventInfo; + return _this; + } + GenericEventHandlers.prototype.add = function (handler) { + var _this = this; + if (this._handlers.length == 0 && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + var controlId = this._context._controlId; + if (!GenericEventRegistration.getGenericEventRegistration(controlId).isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration(controlId).ready()); + } + ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length == 1) { + GenericEventRegistration.getGenericEventRegistration(controlId).register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove = function (handler) { + var _this = this; + if (this._handlers.length == 1 && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + var controlId = this._context._controlId; + ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers = _this._handlers; + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length == 0) { + GenericEventRegistration.getGenericEventRegistration(controlId).unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll = function () { }; + return GenericEventHandlers; + }(EventHandlers)); + OfficeExtension_1.GenericEventHandlers = GenericEventHandlers; + var InstantiateActionResultHandler = (function () { + function InstantiateActionResultHandler(clientObject) { + this.m_clientObject = clientObject; + } + InstantiateActionResultHandler.prototype._handleResult = function (value) { + this.m_clientObject._handleIdResult(value); + }; + return InstantiateActionResultHandler; + }()); + var ObjectPathFactory = (function () { + function ObjectPathFactory() { + } + ObjectPathFactory.createGlobalObjectObjectPath = function (context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + return new ObjectPath(objectPathInfo, null, false, false, 1, 4); + }; + ObjectPathFactory.createNewObjectObjectPath = function (context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var ret = new ObjectPath(objectPathInfo, null, isCollection, false, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createPropertyObjectPath = function (context, parent, propertyName, isCollection, isInvalidAfterRequest, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createIndexerObjectPath = function (context, parent, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createIndexerObjectPathUsingParentPath = function (context, parentObjectPath, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parentObjectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parentObjectPath, false, false, 1, 4); + }; + ObjectPathFactory.createMethodObjectPath = function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = Utility.setMethodArguments(context, objectPathInfo.ArgumentInfo, args); + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, Utility._fixupApiFlags(flags)); + ret.argumentObjectPaths = argumentObjectPaths; + ret.getByIdMethodName = getByIdMethodName; + return ret; + }; + ObjectPathFactory.createReferenceIdObjectPath = function (context, referenceId) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + var ret = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return ret; + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt = function (hasIndexerMethod, context, parent, childItem, index) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + if (hasIndexerMethod && !Utility.isNullOrUndefined(id)) { + return ObjectPathFactory.createChildItemObjectPathUsingIndexer(context, parent, childItem); + } + else { + return ObjectPathFactory.createChildItemObjectPathUsingGetItemAt(context, parent, childItem, index); + } + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexer = function (context, parent, childItem) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + var objectPathInfo = (objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }); + objectPathInfo.ArgumentInfo.Arguments = [id]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createChildItemObjectPathUsingGetItemAt = function (context, parent, childItem, index) { + var indexFromServer = childItem[Constants.index]; + if (indexFromServer) { + index = indexFromServer; + } + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: Constants.getItemAt, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = [index]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + return ObjectPathFactory; + }()); + OfficeExtension_1.ObjectPathFactory = ObjectPathFactory; + var OfficeJsRequestExecutor = (function () { + function OfficeJsRequestExecutor(context) { + this.m_context = context; + } + OfficeJsRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); + return new OfficeExtension_1.Promise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (result.status == 'succeeded') { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBody(result), RichApiMessageUtility.getResponseHeaders(result)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); + } + resolve(response); + }); + }); + }; + OfficeJsRequestExecutor.SourceLibHeaderValue = 'officejs'; + return OfficeJsRequestExecutor; + }()); + var TrackedObjects = (function () { + function TrackedObjects(context) { + this._autoCleanupList = {}; + this.m_context = context; + } + TrackedObjects.prototype.add = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._addCommon(item, true); }); + } + else { + this._addCommon(param, true); + } + }; + TrackedObjects.prototype._autoAdd = function (object) { + this._addCommon(object, false); + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + }; + TrackedObjects.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue = function (object, resultValue) { + var shouldAutoTrack = this.m_context._autoCleanup && + !object[Constants.isTracked] && + object !== this.m_context._rootObject && + resultValue && + !Utility.isNullOrEmptyString(resultValue[Constants.referenceId]); + if (shouldAutoTrack) { + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype._addCommon = function (object, isExplicitlyAdded) { + if (object[Constants.isTracked]) { + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + return; + } + var referenceId = object[Constants.referenceId]; + var donotKeepReference = object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName]; + if (donotKeepReference) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.objectIsUntracked), null); + } + if (Utility.isNullOrEmptyString(referenceId) && object._KeepReference) { + object._KeepReference(); + ActionFactory.createInstantiateAction(this.m_context, object); + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype.remove = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._removeCommon(item); }); + } + else { + this._removeCommon(param); + } + }; + TrackedObjects.prototype._removeCommon = function (object) { + object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName] = true; + object.context._pendingRequest._removeKeepReferenceAction(object._objectPath.objectPathInfo.Id); + var referenceId = object[Constants.referenceId]; + if (!Utility.isNullOrEmptyString(referenceId)) { + var rootObject = this.m_context._rootObject; + if (rootObject._RemoveReference) { + rootObject._RemoveReference(referenceId); + } + } + delete object[Constants.isTracked]; + }; + TrackedObjects.prototype._retrieveAndClearAutoCleanupList = function () { + var list = this._autoCleanupList; + this._autoCleanupList = {}; + return list; + }; + return TrackedObjects; + }()); + OfficeExtension_1.TrackedObjects = TrackedObjects; + var RequestPrettyPrinter = (function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose, removePII) { + if (!globalObjName) { + globalObjName = 'root'; + } + this.m_globalObjName = globalObjName; + this.m_referencedObjectPaths = referencedObjectPaths; + this.m_actions = actions; + this.m_statements = []; + this.m_variableNameForObjectPathMap = {}; + this.m_variableNameToObjectPathMap = {}; + this.m_declaredObjectPathMap = {}; + this.m_showDispose = showDispose; + this.m_removePII = removePII; + } + RequestPrettyPrinter.prototype.process = function () { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo = function (actionIndex) { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount = 5; + this.m_statements = []; + var oneStatement = ''; + var statementIndex = -1; + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex == i) { + statementIndex = this.m_statements.length - 1; + } + if (statementIndex >= 0 && this.m_statements.length > statementIndex + surroundingCount + 1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex = statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex = 0; + } + var endIndex = statementIndex + 1 + surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex = this.m_statements.length; + } + var surroundingStatements = []; + if (startIndex != 0) { + surroundingStatements.push('...'); + } + for (var i_1 = startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push('// >>>>>'); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push('// <<<<<'); + for (var i_2 = statementIndex + 1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push('...'); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction = function (action) { + var actionInfo = action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + case 9: + this.processUpdateAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction = function (action) { + var objId = action.actionInfo.ObjectPathId; + var objPath = this.m_referencedObjectPaths[objId]; + var varName = this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement = 'var ' + varName + ' = ' + this.buildObjectPathExpressionWithParent(objPath) + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId] = varName; + } + else { + var statement = '// Instantiate {' + varName + '}'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction = function (action) { + var methodName = action.actionInfo.Name; + if (methodName === '_KeepReference') { + if (!OfficeExtension_1._internalConfig.showInternalApiInDebugInfo) { + return; + } + methodName = 'track'; + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(methodName) + + '(' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.load(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.retrieve(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction = function (action) { + var queryExp = ''; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp = JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.loadRecursive(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(action.actionInfo.Name) + + ' = ' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction = function (action) { + var statement = 'context.trace();'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.ensureUnchanged(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processUpdateAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.update(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant = function (statement, action) { + var _this = this; + if (this.m_showDispose) { + var lastUsedObjectPathIds = action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose = lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(', '); + return statement + ' // And then dispose {' + objectNamesToDispose + '}'; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression = function (action) { + if (action.actionInfo.QueryInfo) { + var option = {}; + option.select = action.actionInfo.QueryInfo.Select; + option.expand = action.actionInfo.QueryInfo.Expand; + option.skip = action.actionInfo.QueryInfo.Skip; + option.top = action.actionInfo.QueryInfo.Top; + if (typeof option.top === 'undefined' && + typeof option.skip === 'undefined' && + typeof option.expand === 'undefined') { + if (typeof option.select === 'undefined') { + return ''; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ''; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent = function (objPath) { + var hasParent = objPath.objectPathInfo.ObjectPathType == 5 || + objPath.objectPathInfo.ObjectPathType == 3 || + objPath.objectPathInfo.ObjectPathType == 4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return (this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId) + '.' + this.buildObjectPathExpression(objPath)); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression = function (objPath) { + var expr = this.buildObjectPathInfoExpression(objPath.objectPathInfo); + var originalObjectPathInfo = objPath.originalObjectPathInfo; + if (originalObjectPathInfo) { + expr = expr + ' /* originally ' + this.buildObjectPathInfoExpression(originalObjectPathInfo) + ' */'; + } + return expr; + }; + RequestPrettyPrinter.prototype.buildObjectPathInfoExpression = function (objectPathInfo) { + switch (objectPathInfo.ObjectPathType) { + case 1: + return 'context.' + this.m_globalObjName; + case 5: + return 'getItem(' + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + ')'; + case 3: + return (Utility._toCamelLowerCase(objectPathInfo.Name) + + '(' + + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + + ')'); + case 2: + return objectPathInfo.Name + '.newObject()'; + case 7: + return 'null'; + case 4: + return Utility._toCamelLowerCase(objectPathInfo.Name); + case 6: + return ('context.' + this.m_globalObjName + '._getObjectByReferenceId(' + JSON.stringify(objectPathInfo.Name) + ')'); + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression = function (args) { + var ret = ''; + if (!args.Arguments || args.Arguments.length === 0) { + return ret; + } + if (this.m_removePII) { + if (typeof args.Arguments[0] === 'undefined') { + return ret; + } + return '...'; + } + for (var i = 0; i < args.Arguments.length; i++) { + if (i > 0) { + ret = ret + ', '; + } + ret = + ret + + this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret === 'undefined') { + ret = ''; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral = function (value, objectPathId) { + if (typeof value == 'number' && value === objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase = function (objectPathId) { + var ret = 'v'; + var objPath = this.m_referencedObjectPaths[objectPathId]; + if (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret = this.m_globalObjName; + break; + case 4: + ret = Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName = objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3) === 'Get') { + methodName = methodName.substr(3); + } + ret = Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName = this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1) === 's') { + ret = parentName.substr(0, parentName.length - 1); + } + else { + ret = parentName + 'Item'; + } + break; + } + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName = function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret = this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + } + var i = 1; + while (this.m_variableNameToObjectPathMap[ret + i.toString()]) { + i++; + } + ret = ret + i.toString(); + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + var ResourceStrings = (function (_super) { + __extends(ResourceStrings, _super); + function ResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + ResourceStrings.cannotRegisterEvent = 'CannotRegisterEvent'; + ResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + ResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + ResourceStrings.propertyNotLoaded = 'PropertyNotLoaded'; + ResourceStrings.runMustReturnPromise = 'RunMustReturnPromise'; + ResourceStrings.moreInfoInnerError = 'MoreInfoInnerError'; + ResourceStrings.cannotApplyPropertyThroughSetMethod = 'CannotApplyPropertyThroughSetMethod'; + ResourceStrings.invalidOperationInCellEditMode = 'InvalidOperationInCellEditMode'; + ResourceStrings.objectIsUntracked = 'ObjectIsUntracked'; + ResourceStrings.customFunctionDefintionMissing = 'CustomFunctionDefintionMissing'; + ResourceStrings.customFunctionImplementationMissing = 'CustomFunctionImplementationMissing'; + ResourceStrings.customFunctionNameContainsBadChars = 'CustomFunctionNameContainsBadChars'; + ResourceStrings.customFunctionNameCannotSplit = 'CustomFunctionNameCannotSplit'; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch = 'CustomFunctionUnexpectedNumberOfEntriesInResultBatch'; + ResourceStrings.customFunctionCancellationHandlerMissing = 'CustomFunctionCancellationHandlerMissing'; + ResourceStrings.customFunctionInvalidFunction = 'CustomFunctionInvalidFunction'; + ResourceStrings.customFunctionInvalidFunctionMapping = 'CustomFunctionInvalidFunctionMapping'; + ResourceStrings.customFunctionWindowMissing = 'CustomFunctionWindowMissing'; + ResourceStrings.customFunctionDefintionMissingOnWindow = 'CustomFunctionDefintionMissingOnWindow'; + ResourceStrings.pendingBatchInProgress = 'PendingBatchInProgress'; + ResourceStrings.notInsideBatch = 'NotInsideBatch'; + ResourceStrings.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ResourceStrings; + }(CommonResourceStrings)); + OfficeExtension_1.ResourceStrings = ResourceStrings; + CoreUtility.addResourceStringValues({ + CannotRegisterEvent: 'The event handler cannot be registered.', + PropertyNotLoaded: "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.", + RunMustReturnPromise: 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".', + InvalidOrTimedOutSessionMessage: 'Your Office Online session has expired or is invalid. To continue, refresh the page.', + InvalidOperationInCellEditMode: 'Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.', + InvalidSheetName: 'The request cannot be processed because the specified worksheet cannot be found. Please try again.', + CustomFunctionDefintionMissing: "A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.", + CustomFunctionDefintionMissingOnWindow: "A property with the name '{0}' that represents the function's definition must exist on the window object.", + CustomFunctionImplementationMissing: "The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.", + CustomFunctionNameContainsBadChars: 'The function name may only contain letters, digits, underscores, and periods.', + CustomFunctionNameCannotSplit: 'The function name must contain a non-empty namespace and a non-empty short name.', + CustomFunctionUnexpectedNumberOfEntriesInResultBatch: "The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.", + CustomFunctionCancellationHandlerMissing: 'The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.', + CustomFunctionInvalidFunction: "The property with the name '{0}' that represents the function's definition is not a valid function.", + CustomFunctionInvalidFunctionMapping: "The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.", + CustomFunctionWindowMissing: 'The window object was not found.', + PendingBatchInProgress: 'There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.', + NotInsideBatch: 'Operations may not be invoked outside of a batch method.', + CannotUpdateReadOnlyProperty: "The property '{0}' is read-only and it cannot be updated.", + ObjectIsUntracked: 'The object is untracked.' + }); + var Utility = (function (_super) { + __extends(Utility, _super); + function Utility() { + return _super !== null && _super.apply(this, arguments) || this; + } + Utility.fixObjectPathIfNecessary = function (clientObject, value) { + if (clientObject && clientObject._objectPath && value) { + clientObject._objectPath.updateUsingObjectData(value, clientObject); + } + }; + Utility.load = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve = function (clientObj, option) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !Utility.isSetSupported('RichApiRuntime', '1.1'); + } + var result = new RetrieveResultImpl(clientObj, shouldPolyfill); + clientObj._retrieve(option, result); + return result; + }; + Utility.retrieveAndSync = function (clientObj, option) { + var result = Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); + }; + Utility.toJson = function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result = {}; + for (var prop in scalarProperties) { + var value = scalarProperties[prop]; + if (typeof value !== 'undefined') { + result[prop] = value; + } + } + for (var prop in navigationProperties) { + var value = navigationProperties[prop]; + if (typeof value !== 'undefined') { + if (value[Utility.fieldName_isCollection] && typeof value[Utility.fieldName_m__items] !== 'undefined') { + result[prop] = value.toJSON()['items']; + } + else { + result[prop] = value.toJSON(); + } + } + } + if (collectionItemsIfAny) { + result['items'] = collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; + }; + Utility.throwError = function (resourceId, arg, errorLocation) { + throw new _Internal.RuntimeError({ + code: resourceId, + httpStatusCode: 400, + message: CoreUtility._getResourceString(resourceId, arg), + debugInfo: errorLocation ? { errorLocation: errorLocation } : undefined + }); + }; + Utility.createRuntimeError = function (code, message, location, httpStatusCode, data) { + return new _Internal.RuntimeError({ + code: code, + httpStatusCode: httpStatusCode, + message: message, + debugInfo: { errorLocation: location }, + data: data + }); + }; + Utility.throwIfNotLoaded = function (propertyName, fieldValue, entityName, isNull) { + if (!isNull && + CoreUtility.isUndefined(fieldValue) && + propertyName.charCodeAt(0) != Utility.s_underscoreCharCode && + !Utility.s_suppressPropertyNotLoadedException) { + throw Utility.createPropertyNotLoadedException(entityName, propertyName); + } + }; + Utility._getPropertyValueWithoutCheckLoaded = function (object, propertyName) { + Utility.s_suppressPropertyNotLoadedException = true; + try { + return object[propertyName]; + } + finally { + Utility.s_suppressPropertyNotLoadedException = false; + } + }; + Utility.createPropertyNotLoadedException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.propertyNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.propertyNotLoaded, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.createCannotUpdateReadOnlyPropertyException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.cannotUpdateReadOnlyProperty, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotUpdateReadOnlyProperty, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.promisify = function (action) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + var callback = function (result) { + if (result.status == 'failed') { + reject(result.error); + } + else { + resolve(result.value); + } + }; + action(callback); + }); + }; + Utility._addActionResultHandler = function (clientObj, action, resultHandler) { + clientObj.context._pendingRequest.addActionResultHandler(action, resultHandler); + }; + Utility._handleNavigationPropertyResults = function (clientObj, objectValue, propertyNames) { + for (var i = 0; i < propertyNames.length - 1; i += 2) { + if (!CoreUtility.isUndefined(objectValue[propertyNames[i + 1]])) { + clientObj[propertyNames[i]]._handleResult(objectValue[propertyNames[i + 1]]); + } + } + }; + Utility._fixupApiFlags = function (flags) { + if (typeof flags === 'boolean') { + if (flags) { + flags = 1; + } + else { + flags = 0; + } + } + return flags; + }; + Utility.definePropertyThrowUnloadedException = function (obj, typeName, propertyName) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + throw Utility.createPropertyNotLoadedException(typeName, propertyName); + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(typeName, propertyName); + } + }); + }; + Utility.defineReadOnlyPropertyWithValue = function (obj, propertyName, value) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + return value; + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(null, propertyName); + } + }); + }; + Utility.processRetrieveResult = function (proxy, value, result, childItemCreateFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + return; + } + if (childItemCreateFunc) { + var data = value[Constants.itemsLowerCase]; + if (Array.isArray(data)) { + var itemsResult = []; + for (var i = 0; i < data.length; i++) { + var itemProxy = childItemCreateFunc(data[i], i); + var itemResult = {}; + itemResult[Constants.proxy] = itemProxy; + itemProxy._handleRetrieveResult(data[i], itemResult); + itemsResult.push(itemResult); + } + Utility.defineReadOnlyPropertyWithValue(result, Constants.itemsLowerCase, itemsResult); + } + } + else { + var scalarPropertyNames = proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = proxy[Constants.navigationPropertyNames]; + var typeName = proxy[Constants.className]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + var propName = scalarPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + Utility.defineReadOnlyPropertyWithValue(result, propName, propValue); + } + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + var propName = navigationPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + var propProxy = proxy[propName]; + var propResult = {}; + propProxy._handleRetrieveResult(propValue, propResult); + propResult[Constants.proxy] = propProxy; + if (Array.isArray(propResult[Constants.itemsLowerCase])) { + propResult = propResult[Constants.itemsLowerCase]; + } + Utility.defineReadOnlyPropertyWithValue(result, propName, propResult); + } + } + } + } + }; + Utility.setMockData = function (clientObj, value, childItemCreateFunc, setItemsFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + clientObj._handleResult(value); + return; + } + if (clientObj[Constants.scalarPropertyOriginalNames]) { + var result = {}; + var scalarPropertyOriginalNames = clientObj[Constants.scalarPropertyOriginalNames]; + var scalarPropertyNames = clientObj[Constants.scalarPropertyNames]; + for (var i = 0; i < scalarPropertyNames.length; i++) { + if (typeof (value[scalarPropertyNames[i]]) !== 'undefined') { + result[scalarPropertyOriginalNames[i]] = value[scalarPropertyNames[i]]; + } + } + clientObj._handleResult(result); + } + if (clientObj[Constants.navigationPropertyNames]) { + var navigationPropertyNames = clientObj[Constants.navigationPropertyNames]; + for (var i = 0; i < navigationPropertyNames.length; i++) { + if (typeof (value[navigationPropertyNames[i]]) !== 'undefined') { + var navigationPropValue = clientObj[navigationPropertyNames[i]]; + if (navigationPropValue.setMockData) { + navigationPropValue.setMockData(value[navigationPropertyNames[i]]); + } + } + } + } + if (clientObj[Constants.isCollection] && childItemCreateFunc) { + var itemsData = Array.isArray(value) ? value : value[Constants.itemsLowerCase]; + if (Array.isArray(itemsData)) { + var items = []; + for (var i = 0; i < itemsData.length; i++) { + var item = childItemCreateFunc(itemsData, i); + Utility.setMockData(item, itemsData[i]); + items.push(item); + } + setItemsFunc(items); + } + } + }; + Utility.applyMixin = function (derived, base) { + Object.getOwnPropertyNames(base.prototype).forEach(function (name) { + if (name !== 'constructor') { + Object.defineProperty(derived.prototype, name, Object.getOwnPropertyDescriptor(base.prototype, name)); + } + }); + }; + Utility.ensureTypeInitialized = function (type) { + var context = new ClientRequestContext(); + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, "Temp", false, 0); + new type(context, objectPath); + }; + Utility.fieldName_m__items = 'm__items'; + Utility.fieldName_isCollection = '_isCollection'; + Utility._synchronousCleanup = false; + Utility.s_underscoreCharCode = '_'.charCodeAt(0); + Utility.s_suppressPropertyNotLoadedException = false; + return Utility; + }(CommonUtility)); + OfficeExtension_1.Utility = Utility; + var BatchApiHelper = (function () { + function BatchApiHelper() { + } + BatchApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + var action = ActionFactory.createMethodAction(obj.context, obj, methodName, operationType, args, flags); + var result = new ClientResult(resultProcessType); + Utility._addActionResultHandler(obj, action, result); + return result; + }; + BatchApiHelper.invokeEnsureUnchanged = function (obj, objectState) { + ActionFactory.createEnsureUnchangedAction(obj.context, obj, objectState); + }; + BatchApiHelper.invokeSetProperty = function (obj, propName, propValue, flags) { + ActionFactory.createSetPropertyAction(obj.context, obj, propName, propValue, flags); + }; + BatchApiHelper.createRootServiceObject = function (type, context) { + var objectPath = ObjectPathFactory.createGlobalObjectObjectPath(context); + return new type(context, objectPath); + }; + BatchApiHelper.createObjectFromReferenceId = function (type, context, referenceId) { + var objectPath = ObjectPathFactory.createReferenceIdObjectPath(context, referenceId); + return new type(context, objectPath); + }; + BatchApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, typeName, isCollection, flags); + return new type(context, objectPath); + }; + BatchApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPath = ObjectPathFactory.createPropertyObjectPath(parent.context, parent, propertyName, isCollection, false, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createIndexerObject = function (type, parent, args) { + var objectPath = ObjectPathFactory.createIndexerObjectPath(parent.context, parent, args); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPath = ObjectPathFactory.createMethodObjectPath(parent.context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createChildItemObject = function (type, hasIndexerMethod, parent, chileItem, index) { + var objectPath = ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt(hasIndexerMethod, parent.context, parent, chileItem, index); + return new type(parent.context, objectPath); + }; + return BatchApiHelper; + }()); + OfficeExtension_1.BatchApiHelper = BatchApiHelper; + var LibraryBuilder = (function () { + function LibraryBuilder(options) { + this.m_namespaceMap = {}; + this.m_namespace = options.metadata.name; + this.m_targetNamespaceObject = options.targetNamespaceObject; + this.m_namespaceMap[this.m_namespace] = options.targetNamespaceObject; + if (options.namespaceMap) { + for (var ns in options.namespaceMap) { + this.m_namespaceMap[ns] = options.namespaceMap[ns]; + } + } + this.m_defaultApiSetName = options.metadata.defaultApiSetName; + this.m_hostName = options.metadata.hostName; + var metadata = options.metadata; + if (metadata.enumTypes) { + for (var i = 0; i < metadata.enumTypes.length; i++) { + this.buildEnumType(metadata.enumTypes[i]); + } + } + if (metadata.apiSets) { + for (var i = 0; i < metadata.apiSets.length; i++) { + var elem = metadata.apiSets[i]; + if (Array.isArray(elem)) { + metadata.apiSets[i] = { + version: elem[0], + name: elem[1] || this.m_defaultApiSetName + }; + } + } + this.m_apiSets = metadata.apiSets; + } + this.m_strings = metadata.strings; + if (metadata.clientObjectTypes) { + for (var i = 0; i < metadata.clientObjectTypes.length; i++) { + var elem = metadata.clientObjectTypes[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 11); + metadata.clientObjectTypes[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + collectionPropertyPath: this.getString(elem[6]), + newObjectServerTypeFullName: this.getString(elem[9]), + newObjectApiFlags: elem[10], + childItemTypeFullName: this.getString(elem[7]), + scalarProperties: elem[2], + navigationProperties: elem[3], + scalarMethods: elem[4], + navigationMethods: elem[5], + events: elem[8] + }; + } + this.buildClientObjectType(metadata.clientObjectTypes[i], options.fullyInitialize); + } + } + } + LibraryBuilder.prototype.ensureArraySize = function (value, size) { + var count = size - value.length; + while (count > 0) { + value.push(0); + count--; + } + }; + LibraryBuilder.prototype.getString = function (ordinalOrValue) { + if (typeof (ordinalOrValue) === "number") { + if (ordinalOrValue > 0) { + return this.m_strings[ordinalOrValue - 1]; + } + return null; + } + return ordinalOrValue; + }; + LibraryBuilder.prototype.buildEnumType = function (elem) { + var enumType; + if (Array.isArray(elem)) { + enumType = { + name: elem[0], + fields: elem[2] + }; + if (!enumType.fields) { + enumType.fields = {}; + } + var fieldsWithCamelUpperCaseValue = elem[1]; + if (Array.isArray(fieldsWithCamelUpperCaseValue)) { + for (var index = 0; index < fieldsWithCamelUpperCaseValue.length; index++) { + enumType.fields[fieldsWithCamelUpperCaseValue[index]] = this.toSimpleCamelUpperCase(fieldsWithCamelUpperCaseValue[index]); + } + } + } + else { + enumType = elem; + } + this.m_targetNamespaceObject[enumType.name] = enumType.fields; + }; + LibraryBuilder.prototype.buildClientObjectType = function (typeInfo, fullyInitialize) { + var thisBuilder = this; + var type = function (context, objectPath) { + ClientObject.apply(this, arguments); + if (!thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited) { + thisBuilder.buildPrototype(thisBuilder.m_targetNamespaceObject[typeInfo.name], typeInfo); + thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited = true; + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo) { + if (this._objectPath && this._objectPath.objectPathInfo && this._className) { + this._objectPath.objectPathInfo.T = this._className; + } + } + }; + this.m_targetNamespaceObject[typeInfo.name] = type; + this.extendsType(type, ClientObject); + this.buildNewObject(type, typeInfo); + if ((typeInfo.behaviorFlags & 2) !== 0) { + type.prototype._KeepReference = function () { + BatchApiHelper.invokeMethod(this, "_KeepReference", 1, [], 0, 0); + }; + } + if ((typeInfo.behaviorFlags & 32) !== 0) { + var func = this.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_StaticCustomize"); + func.call(null, type); + } + if (fullyInitialize) { + this.buildPrototype(type, typeInfo); + type._typeInited = true; + } + }; + LibraryBuilder.prototype.extendsType = function (d, b) { + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + LibraryBuilder.prototype.findObjectUnderPath = function (top, paths, pathStartIndex) { + var obj = top; + for (var i = pathStartIndex; i < paths.length; i++) { + if (typeof (obj) !== 'object') { + throw new OfficeExtension_1.Error("Cannot find " + paths.join(".")); + } + obj = obj[paths[i]]; + } + return obj; + }; + LibraryBuilder.prototype.getFunction = function (fullName) { + var ret = this.resolveObjectByFullName(fullName); + if (typeof (ret) !== 'function') { + throw new OfficeExtension_1.Error("Cannot find function or type: " + fullName); + } + return ret; + }; + LibraryBuilder.prototype.resolveObjectByFullName = function (fullName) { + var parts = fullName.split('.'); + if (parts.length === 1) { + return this.m_targetNamespaceObject[parts[0]]; + } + var rootName = parts[0]; + if (rootName === this.m_namespace) { + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 1); + } + if (this.m_namespaceMap[rootName]) { + return this.findObjectUnderPath(this.m_namespaceMap[rootName], parts, 1); + } + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 0); + }; + LibraryBuilder.prototype.evaluateSimpleExpression = function (expression, thisObj) { + if (Utility.isNullOrUndefined(expression)) { + return null; + } + var paths = expression.split('.'); + if (paths.length === 3 && paths[0] === 'OfficeExtension' && paths[1] === 'Constants') { + return Constants[paths[2]]; + } + if (paths[0] === 'this') { + var obj = thisObj; + for (var i = 1; i < paths.length; i++) { + if (paths[i] == 'toString()') { + obj = obj.toString(); + } + else if (paths[i].substr(paths[i].length - 2) === "()") { + obj = obj[paths[i].substr(0, paths[i].length - 2)](); + } + else { + obj = obj[paths[i]]; + } + } + return obj; + } + throw new OfficeExtension_1.Error("Cannot evaluate: " + expression); + }; + LibraryBuilder.prototype.evaluateEventTargetId = function (targetIdExpression, thisObj) { + if (Utility.isNullOrEmptyString(targetIdExpression)) { + return ''; + } + return this.evaluateSimpleExpression(targetIdExpression, thisObj); + }; + LibraryBuilder.prototype.isAllDigits = function (expression) { + var charZero = '0'.charCodeAt(0); + var charNine = '9'.charCodeAt(0); + for (var i = 0; i < expression.length; i++) { + if (expression.charCodeAt(i) < charZero || + expression.charCodeAt(i) > charNine) { + return false; + } + } + return true; + }; + LibraryBuilder.prototype.evaluateEventType = function (eventTypeExpression) { + if (Utility.isNullOrEmptyString(eventTypeExpression)) { + return 0; + } + if (this.isAllDigits(eventTypeExpression)) { + return parseInt(eventTypeExpression); + } + var ret = this.resolveObjectByFullName(eventTypeExpression); + if (typeof (ret) !== 'number') { + throw new OfficeExtension_1.Error("Invalid event type: " + eventTypeExpression); + } + return ret; + }; + LibraryBuilder.prototype.buildPrototype = function (type, typeInfo) { + this.buildScalarProperties(type, typeInfo); + this.buildNavigationProperties(type, typeInfo); + this.buildScalarMethods(type, typeInfo); + this.buildNavigationMethods(type, typeInfo); + this.buildEvents(type, typeInfo); + this.buildHandleResult(type, typeInfo); + this.buildHandleIdResult(type, typeInfo); + this.buildHandleRetrieveResult(type, typeInfo); + this.buildLoad(type, typeInfo); + this.buildRetrieve(type, typeInfo); + this.buildSetMockData(type, typeInfo); + this.buildEnsureUnchanged(type, typeInfo); + this.buildUpdate(type, typeInfo); + this.buildSet(type, typeInfo); + this.buildToJSON(type, typeInfo); + this.buildItems(type, typeInfo); + this.buildTypeMetadataInfo(type, typeInfo); + this.buildTrackUntrack(type, typeInfo); + this.buildMixin(type, typeInfo); + }; + LibraryBuilder.prototype.toSimpleCamelUpperCase = function (name) { + return name.substr(0, 1).toUpperCase() + name.substr(1); + }; + LibraryBuilder.prototype.ensureOriginalName = function (member) { + if (member.originalName === null) { + member.originalName = this.toSimpleCamelUpperCase(member.name); + } + }; + LibraryBuilder.prototype.getFieldName = function (member) { + return "m_" + member.name; + }; + LibraryBuilder.prototype.throwIfApiNotSupported = function (typeInfo, member) { + if (this.m_apiSets && member.apiSetInfoOrdinal > 0) { + var apiSetInfo = this.m_apiSets[member.apiSetInfoOrdinal - 1]; + if (apiSetInfo) { + Utility.throwIfApiNotSupported(typeInfo.name + "." + member.name, apiSetInfo.name, apiSetInfo.version, this.m_hostName); + } + } + }; + LibraryBuilder.prototype.buildScalarProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarProperties)) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var elem = typeInfo.scalarProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 6); + typeInfo.scalarProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + originalName: this.getString(elem[3]), + setMethodApiFlags: elem[4], + undoableApiSetInfoOrdinal: elem[5] + }; + } + this.buildScalarProperty(type, typeInfo, typeInfo.scalarProperties[i]); + } + } + }; + LibraryBuilder.prototype.calculateApiFlags = function (apiFlags, undoableApiSetInfoOrdinal) { + if (undoableApiSetInfoOrdinal > 0) { + var undoableApiSetInfo = this.m_apiSets[undoableApiSetInfoOrdinal - 1]; + if (undoableApiSetInfo) { + apiFlags = CommonUtility.calculateApiFlags(apiFlags, undoableApiSetInfo.name, undoableApiSetInfo.version); + } + } + return apiFlags; + }; + LibraryBuilder.prototype.buildScalarProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + Utility.throwIfNotLoaded(propInfo.name, this[fieldName], typeInfo.name, this._isNull); + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildNavigationProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationProperties)) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + var elem = typeInfo.navigationProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 8); + typeInfo.navigationProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[4]), + getMethodApiFlags: elem[5], + setMethodApiFlags: elem[6], + propertyTypeFullName: this.getString(elem[1]), + undoableApiSetInfoOrdinal: elem[7] + }; + } + this.buildNavigationProperty(type, typeInfo, typeInfo.navigationProperties[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + if (!this[thisBuilder.getFieldName(propInfo)]) { + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + this[fieldName] = BatchApiHelper.createPropertyObject(thisBuilder.getFunction(propInfo.propertyTypeFullName), this, propInfo.originalName, (propInfo.behaviorFlags & 16) !== 0, propInfo.getMethodApiFlags); + } + if (propInfo.behaviorFlags & 64) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Get"); + customizationFunc.call(this, this, this[fieldName]); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildScalarMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarMethods)) { + for (var i = 0; i < typeInfo.scalarMethods.length; i++) { + var elem = typeInfo.scalarMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.scalarMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[5]), + apiFlags: elem[4], + parameterCount: elem[1], + undoableApiSetInfoOrdinal: elem[6] + }; + } + this.buildScalarMethod(type, typeInfo, typeInfo.scalarMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildScalarMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + var resultProcessType = 0; + if (methodInfo.behaviorFlags & 32) { + resultProcessType = 1; + } + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.invokeMethod(this, methodInfo.originalName, operationType, args, apiFlags, resultProcessType); + }; + }; + LibraryBuilder.prototype.buildNavigationMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationMethods)) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + var elem = typeInfo.navigationMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 9); + typeInfo.navigationMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[3], + apiSetInfoOrdinal: elem[4], + originalName: this.getString(elem[6]), + apiFlags: elem[5], + parameterCount: elem[2], + returnTypeFullName: this.getString(elem[1]), + returnObjectGetByIdMethodName: this.getString(elem[7]), + undoableApiSetInfoOrdinal: elem[8] + }; + } + this.buildNavigationMethod(type, typeInfo, typeInfo.navigationMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + if ((methodInfo.behaviorFlags & 16) !== 0) { + return BatchApiHelper.createIndexerObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, args); + } + else { + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.createMethodObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, methodInfo.originalName, operationType, args, (methodInfo.behaviorFlags & 4) !== 0, (methodInfo.behaviorFlags & 8) !== 0, methodInfo.returnObjectGetByIdMethodName, apiFlags); + } + }; + }; + LibraryBuilder.prototype.buildHandleResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleResult = function (value) { + ClientObject.prototype._handleResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + Utility.fixObjectPathIfNecessary(this, value); + if (typeInfo.behaviorFlags & 8) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i_3 = 0; i_3 < typeInfo.scalarProperties.length; i_3++) { + if (!Utility.isUndefined(value[typeInfo.scalarProperties[i_3].originalName])) { + if ((typeInfo.scalarProperties[i_3].behaviorFlags & 8) !== 0) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i_3].originalName]); + } + else { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = value[typeInfo.scalarProperties[i_3].originalName]; + } + } + } + } + if (typeInfo.navigationProperties) { + var propNames = []; + for (var i_4 = 0; i_4 < typeInfo.navigationProperties.length; i_4++) { + propNames.push(typeInfo.navigationProperties[i_4].name); + propNames.push(typeInfo.navigationProperties[i_4].originalName); + } + Utility._handleNavigationPropertyResults(this, value, propNames); + } + if ((typeInfo.behaviorFlags & 1) !== 0) { + var hasIndexerMethod = thisBuilder.hasIndexMethod(typeInfo); + if (!Utility.isNullOrUndefined(value[Constants.items])) { + this.m__items = []; + var _data = value[Constants.items]; + var childItemType = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + for (var i = 0; i < _data.length; i++) { + var _item = BatchApiHelper.createChildItemObject(childItemType, hasIndexerMethod, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + } + }; + }; + LibraryBuilder.prototype.buildHandleRetrieveResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleRetrieveResult = function (value, result) { + ClientObject.prototype._handleRetrieveResult.call(this, value, result); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if (typeInfo.scalarProperties[i].behaviorFlags & 8) { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].name])) { + value[typeInfo.scalarProperties[i].name] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i].name]); + } + } + } + } + if (typeInfo.behaviorFlags & 1) { + var hasIndexerMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + var childItemType_1 = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + var thisObj_1 = this; + Utility.processRetrieveResult(thisObj_1, value, result, function (childItemData, index) { return BatchApiHelper.createChildItemObject(childItemType_1, hasIndexerMethod_1, thisObj_1, childItemData, index); }); + } + else { + Utility.processRetrieveResult(this, value, result); + } + }; + }; + LibraryBuilder.prototype.buildHandleIdResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleIdResult = function (value) { + ClientObject.prototype._handleIdResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.behaviorFlags & 16) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleIdResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var propName = typeInfo.scalarProperties[i].originalName; + if (propName === "Id" || propName === "_Id" || propName === "_ReferenceId") { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].originalName])) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])] = value[typeInfo.scalarProperties[i].originalName]; + } + } + } + } + }; + }; + LibraryBuilder.prototype.buildLoad = function (type, typeInfo) { + type.prototype.load = function (options) { + return Utility.load(this, options); + }; + }; + LibraryBuilder.prototype.buildRetrieve = function (type, typeInfo) { + type.prototype.retrieve = function (options) { + return Utility.retrieve(this, options); + }; + }; + LibraryBuilder.prototype.buildNewObject = function (type, typeInfo) { + if (!Utility.isNullOrEmptyString(typeInfo.newObjectServerTypeFullName)) { + type.newObject = function (context) { + return BatchApiHelper.createTopLevelServiceObject(type, context, typeInfo.newObjectServerTypeFullName, (typeInfo.behaviorFlags & 1) !== 0, typeInfo.newObjectApiFlags); + }; + } + }; + LibraryBuilder.prototype.buildSetMockData = function (type, typeInfo) { + var thisBuilder = this; + if (typeInfo.behaviorFlags & 1) { + var hasIndexMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + type.prototype.setMockData = function (data) { + var thisObj = this; + Utility.setMockData(thisObj, data, function (childItemData, index) { + return BatchApiHelper.createChildItemObject(thisBuilder.getFunction(typeInfo.childItemTypeFullName), hasIndexMethod_1, thisObj, childItemData, index); + }, function (items) { + thisObj.m__items = items; + }); + }; + } + else { + type.prototype.setMockData = function (data) { + Utility.setMockData(this, data); + }; + } + }; + LibraryBuilder.prototype.buildEnsureUnchanged = function (type, typeInfo) { + type.prototype.ensureUnchanged = function (data) { + BatchApiHelper.invokeEnsureUnchanged(this, data); + }; + }; + LibraryBuilder.prototype.buildUpdate = function (type, typeInfo) { + type.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + }; + LibraryBuilder.prototype.buildSet = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) !== 0) { + return; + } + var notAllowedToBeSetPropertyNames = []; + var allowedScalarPropertyNames = []; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 2) === 0 && + (typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + allowedScalarPropertyNames.push(typeInfo.scalarProperties[i].name); + } + else { + notAllowedToBeSetPropertyNames.push(typeInfo.scalarProperties[i].name); + } + } + } + var allowedNavigationPropertyNames = []; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 16) !== 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 1) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 32) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else { + allowedNavigationPropertyNames.push(typeInfo.navigationProperties[i].name); + } + } + } + if (allowedNavigationPropertyNames.length === 0 && allowedScalarPropertyNames.length === 0) { + return; + } + type.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, allowedScalarPropertyNames, allowedNavigationPropertyNames, notAllowedToBeSetPropertyNames); + }; + }; + LibraryBuilder.prototype.buildItems = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) === 0) { + return; + } + Object.defineProperty(type.prototype, "items", { + get: function () { + Utility.throwIfNotLoaded("items", this.m__items, typeInfo.name, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildToJSON = function (type, typeInfo) { + var thisBuilder = this; + if ((typeInfo.behaviorFlags & 1) !== 0) { + type.prototype.toJSON = function () { + return Utility.toJson(this, {}, {}, this.m__items); + }; + return; + } + else { + type.prototype.toJSON = function () { + var scalarProperties = {}; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + scalarProperties[typeInfo.scalarProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])]; + } + } + } + var navProperties = {}; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 1) !== 0) { + navProperties[typeInfo.navigationProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.navigationProperties[i])]; + } + } + } + return Utility.toJson(this, scalarProperties, navProperties); + }; + } + }; + LibraryBuilder.prototype.buildTypeMetadataInfo = function (type, typeInfo) { + Object.defineProperty(type.prototype, "_className", { + get: function () { + return typeInfo.name; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_isCollection", { + get: function () { + return (typeInfo.behaviorFlags & 1) !== 0; + }, + enumerable: true, + configurable: true + }); + if (!Utility.isNullOrEmptyString(typeInfo.collectionPropertyPath)) { + Object.defineProperty(type.prototype, "_collectionPropertyPath", { + get: function () { + return typeInfo.collectionPropertyPath; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.scalarProperties && typeInfo.scalarProperties.length > 0) { + Object.defineProperty(type.prototype, "_scalarPropertyNames", { + get: function () { + if (!this.m__scalarPropertyNames) { + this.m__scalarPropertyNames = typeInfo.scalarProperties.map(function (p) { return p.name; }); + } + return this.m__scalarPropertyNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyOriginalNames", { + get: function () { + if (!this.m__scalarPropertyOriginalNames) { + this.m__scalarPropertyOriginalNames = typeInfo.scalarProperties.map(function (p) { return p.originalName; }); + } + return this.m__scalarPropertyOriginalNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyUpdateable", { + get: function () { + if (!this.m__scalarPropertyUpdateable) { + this.m__scalarPropertyUpdateable = typeInfo.scalarProperties.map(function (p) { return (p.behaviorFlags & 2) === 0; }); + } + return this.m__scalarPropertyUpdateable; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.navigationProperties && typeInfo.navigationProperties.length > 0) { + Object.defineProperty(type.prototype, "_navigationPropertyNames", { + get: function () { + if (!this.m__navigationPropertyNames) { + this.m__navigationPropertyNames = typeInfo.navigationProperties.map(function (p) { return p.name; }); + } + return this.m__navigationPropertyNames; + }, + enumerable: true, + configurable: true + }); + } + }; + LibraryBuilder.prototype.buildTrackUntrack = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 2) { + type.prototype.track = function () { + this.context.trackedObjects.add(this); + return this; + }; + type.prototype.untrack = function () { + this.context.trackedObjects.remove(this); + return this; + }; + } + }; + LibraryBuilder.prototype.buildMixin = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 4) { + var mixinType = this.getFunction(typeInfo.name + 'Custom'); + Utility.applyMixin(type, mixinType); + } + }; + LibraryBuilder.prototype.getOnEventName = function (name) { + if (name[0] === '_') { + return '_on' + name.substr(1); + } + return 'on' + name; + }; + LibraryBuilder.prototype.buildEvents = function (type, typeInfo) { + if (typeInfo.events) { + for (var i = 0; i < typeInfo.events.length; i++) { + var elem = typeInfo.events[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.events[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + typeExpression: this.getString(elem[3]), + targetIdExpression: this.getString(elem[4]), + register: this.getString(elem[5]), + unregister: this.getString(elem[6]) + }; + } + this.buildEvent(type, typeInfo, typeInfo.events[i]); + } + } + }; + LibraryBuilder.prototype.buildEvent = function (type, typeInfo, evt) { + if (evt.behaviorFlags & 1) { + this.buildV0Event(type, typeInfo, evt); + } + else { + this.buildV2Event(type, typeInfo, evt); + } + }; + LibraryBuilder.prototype.buildV2Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (evt.register !== 'null') { + registerFunc = this[evt.register].bind(this); + } + var unregisterFunc = null; + if (evt.unregister !== 'null') { + unregisterFunc = this[evt.unregister].bind(this); + } + var getTargetIdFunc = function () { + return thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + }; + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + var eventType = thisBuilder.evaluateEventType(evt.typeExpression); + this[fieldName] = new GenericEventHandlers(this.context, this, evt.name, { + eventType: eventType, + getTargetIdFunc: getTargetIdFunc, + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildV0Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (Utility.isNullOrEmptyString(evt.register)) { + var eventType_1 = thisBuilder.evaluateEventType(evt.typeExpression); + registerFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.register(eventType_1, targetId, handlerCallback); + }; + } + else if (evt.register !== 'null') { + var func_1 = thisBuilder.getFunction(evt.register); + registerFunc = + function (handlerCallback) { + return func_1.call(thisObj, thisObj, handlerCallback); + }; + } + var unregisterFunc = null; + if (Utility.isNullOrEmptyString(evt.unregister)) { + var eventType_2 = thisBuilder.evaluateEventType(evt.typeExpression); + unregisterFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.unregister(eventType_2, targetId, handlerCallback); + }; + } + else if (evt.unregister !== 'null') { + var func_2 = thisBuilder.getFunction(evt.unregister); + unregisterFunc = + function (handlerCallback) { + return func_2.call(thisObj, thisObj, handlerCallback); + }; + } + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + this[fieldName] = new EventHandlers(this.context, this, evt.name, { + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.hasIndexMethod = function (typeInfo) { + var ret = false; + if (typeInfo.navigationMethods) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + if ((typeInfo.navigationMethods[i].behaviorFlags & 16) !== 0) { + ret = true; + break; + } + } + } + return ret; + }; + LibraryBuilder.CustomizationCodeNamespace = "_CC"; + return LibraryBuilder; + }()); + OfficeExtension_1.LibraryBuilder = LibraryBuilder; + var versionToken = 1; + var internalConfiguration = { + invokeRequestModifier: function (request) { + request.DdaMethod.Version = versionToken; + return request; + }, + invokeResponseModifier: function (args) { + versionToken = args.Version; + if (args.Error) { + args.error = {}; + args.error.Code = args.Error; + } + return args; + } + }; + var CommunicationConstants; + (function (CommunicationConstants) { + CommunicationConstants["SendingId"] = "sId"; + CommunicationConstants["RespondingId"] = "rId"; + CommunicationConstants["CommandKey"] = "command"; + CommunicationConstants["SessionInfoKey"] = "sessionInfo"; + CommunicationConstants["ParamsKey"] = "params"; + CommunicationConstants["ApiReadyCommand"] = "apiready"; + CommunicationConstants["ExecuteMethodCommand"] = "executeMethod"; + CommunicationConstants["GetAppContextCommand"] = "getAppContext"; + CommunicationConstants["RegisterEventCommand"] = "registerEvent"; + CommunicationConstants["UnregisterEventCommand"] = "unregisterEvent"; + CommunicationConstants["FireEventCommand"] = "fireEvent"; + })(CommunicationConstants || (CommunicationConstants = {})); + var EmbeddedConstants = (function () { + function EmbeddedConstants() { + } + EmbeddedConstants.sessionContext = 'sc'; + EmbeddedConstants.embeddingPageOrigin = 'EmbeddingPageOrigin'; + EmbeddedConstants.embeddingPageSessionInfo = 'EmbeddingPageSessionInfo'; + return EmbeddedConstants; + }()); + OfficeExtension_1.EmbeddedConstants = EmbeddedConstants; + var EmbeddedSession = (function (_super) { + __extends(EmbeddedSession, _super); + function EmbeddedSession(url, options) { + var _this = _super.call(this) || this; + _this.m_chosenWindow = null; + _this.m_chosenOrigin = null; + _this.m_enabled = true; + _this.m_onMessageHandler = _this._onMessage.bind(_this); + _this.m_callbackList = {}; + _this.m_id = 0; + _this.m_timeoutId = -1; + _this.m_appContext = null; + _this.m_url = url; + _this.m_options = options; + if (!_this.m_options) { + _this.m_options = { sessionKey: Math.random().toString() }; + } + if (!_this.m_options.sessionKey) { + _this.m_options.sessionKey = Math.random().toString(); + } + if (!_this.m_options.container) { + _this.m_options.container = document.body; + } + if (!_this.m_options.timeoutInMilliseconds) { + _this.m_options.timeoutInMilliseconds = 60000; + } + if (!_this.m_options.height) { + _this.m_options.height = '400px'; + } + if (!_this.m_options.width) { + _this.m_options.width = '100%'; + } + if (!(_this.m_options.webApplication && + _this.m_options.webApplication.accessToken && + _this.m_options.webApplication.accessTokenTtl)) { + _this.m_options.webApplication = null; + } + return _this; + } + EmbeddedSession.prototype._getIFrameSrc = function () { + var origin = window.location.protocol + '//' + window.location.host; + var toAppend = EmbeddedConstants.embeddingPageOrigin + + '=' + + encodeURIComponent(origin) + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + encodeURIComponent(this.m_options.sessionKey); + var useHash = false; + if (this.m_url.toLowerCase().indexOf('/_layouts/preauth.aspx') > 0 || + this.m_url.toLowerCase().indexOf('/_layouts/15/preauth.aspx') > 0) { + useHash = true; + } + var a = document.createElement('a'); + a.href = this.m_url; + if (this.m_options.webApplication) { + var toAppendWAC = EmbeddedConstants.embeddingPageOrigin + + '=' + + origin + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + this.m_options.sessionKey; + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + else { + a.search = a.search + '&' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + } + else if (useHash) { + if (a.hash.length === 0 || a.hash === '#') { + a.hash = '#' + toAppend; + } + else { + a.hash = a.hash + '&' + toAppend; + } + } + else { + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + toAppend; + } + else { + a.search = a.search + '&' + toAppend; + } + } + var iframeSrc = a.href; + return iframeSrc; + }; + EmbeddedSession.prototype.init = function () { + var _this = this; + window.addEventListener('message', this.m_onMessageHandler); + var iframeSrc = this._getIFrameSrc(); + return CoreUtility.createPromise(function (resolve, reject) { + var iframeElement = document.createElement('iframe'); + if (_this.m_options.id) { + iframeElement.id = _this.m_options.id; + iframeElement.name = _this.m_options.id; + } + iframeElement.style.height = _this.m_options.height; + iframeElement.style.width = _this.m_options.width; + if (!_this.m_options.webApplication) { + iframeElement.src = iframeSrc; + _this.m_options.container.appendChild(iframeElement); + } + else { + var webApplicationForm = document.createElement('form'); + webApplicationForm.setAttribute('action', iframeSrc); + webApplicationForm.setAttribute('method', 'post'); + webApplicationForm.setAttribute('target', iframeElement.name); + _this.m_options.container.appendChild(webApplicationForm); + var token_input = document.createElement('input'); + token_input.setAttribute('type', 'hidden'); + token_input.setAttribute('name', 'access_token'); + token_input.setAttribute('value', _this.m_options.webApplication.accessToken); + webApplicationForm.appendChild(token_input); + var token_ttl_input = document.createElement('input'); + token_ttl_input.setAttribute('type', 'hidden'); + token_ttl_input.setAttribute('name', 'access_token_ttl'); + token_ttl_input.setAttribute('value', _this.m_options.webApplication.accessTokenTtl); + webApplicationForm.appendChild(token_ttl_input); + _this.m_options.container.appendChild(iframeElement); + webApplicationForm.submit(); + } + _this.m_timeoutId = window.setTimeout(function () { + _this.close(); + var err = Utility.createRuntimeError(CoreErrorCodes.timeout, CoreUtility._getResourceString(CoreResourceStrings.timeout), 'EmbeddedSession.init'); + reject(err); + }, _this.m_options.timeoutInMilliseconds); + _this.m_promiseResolver = resolve; + }); + }; + EmbeddedSession.prototype._invoke = function (method, callback, params) { + if (!this.m_enabled) { + callback(5001, null); + return; + } + if (internalConfiguration.invokeRequestModifier) { + params = internalConfiguration.invokeRequestModifier(params); + } + this._sendMessageWithCallback(this.m_id++, method, params, function (args) { + if (internalConfiguration.invokeResponseModifier) { + args = internalConfiguration.invokeResponseModifier(args); + } + var errorCode = args['Error']; + delete args['Error']; + callback(errorCode || 0, args); + }); + }; + EmbeddedSession.prototype.close = function () { + window.removeEventListener('message', this.m_onMessageHandler); + window.clearTimeout(this.m_timeoutId); + this.m_enabled = false; + }; + EmbeddedSession.prototype.getEventRegistration = function (controlId) { + if (!this.m_sessionEventManager) { + this.m_sessionEventManager = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + } + return this.m_sessionEventManager; + }; + EmbeddedSession.prototype._createRequestExecutorOrNull = function () { + return new EmbeddedRequestExecutor(this); + }; + EmbeddedSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + EmbeddedSession.prototype._registerEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.RegisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(null); + }); + }); + }; + EmbeddedSession.prototype._unregisterEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.UnregisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(); + }); + }); + }; + EmbeddedSession.prototype._onMessage = function (event) { + var _this = this; + if (!this.m_enabled) { + return; + } + if (this.m_chosenWindow && (this.m_chosenWindow !== event.source || this.m_chosenOrigin !== event.origin)) { + return; + } + var eventData = event.data; + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.ApiReadyCommand) { + if (!this.m_chosenWindow && + this._isValidDescendant(event.source) && + eventData[CommunicationConstants.SessionInfoKey] === this.m_options.sessionKey) { + this.m_chosenWindow = event.source; + this.m_chosenOrigin = event.origin; + this._sendMessageWithCallback(this.m_id++, CommunicationConstants.GetAppContextCommand, null, function (appContext) { + _this._setupContext(appContext); + window.clearTimeout(_this.m_timeoutId); + _this.m_promiseResolver(); + }); + } + return; + } + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.FireEventCommand) { + var msg = eventData[CommunicationConstants.ParamsKey]; + var eventId = msg['EventId']; + var targetId = msg['TargetId']; + var data = msg['Data']; + if (this.m_sessionEventManager) { + var handlers = this.m_sessionEventManager.getHandlers(eventId, targetId); + for (var i = 0; i < handlers.length; i++) { + handlers[i](data); + } + } + return; + } + if (eventData && eventData.hasOwnProperty(CommunicationConstants.RespondingId)) { + var rId = eventData[CommunicationConstants.RespondingId]; + if (this.m_callbackList.hasOwnProperty(rId)) { + var callback = this.m_callbackList[rId]; + if (typeof callback === 'function') { + callback(eventData[CommunicationConstants.ParamsKey]); + } + delete this.m_callbackList[rId]; + } + } + }; + EmbeddedSession.prototype._sendMessageWithCallback = function (id, command, data, callback) { + this.m_callbackList[id] = callback; + var message = {}; + message[CommunicationConstants.SendingId] = id; + message[CommunicationConstants.CommandKey] = command; + message[CommunicationConstants.ParamsKey] = data; + this.m_chosenWindow.postMessage(JSON.stringify(message), this.m_chosenOrigin); + }; + EmbeddedSession.prototype._isValidDescendant = function (wnd) { + var container = this.m_options.container || document.body; + function doesFrameWindow(containerWindow) { + if (containerWindow === wnd) { + return true; + } + for (var i = 0, len = containerWindow.frames.length; i < len; i++) { + if (doesFrameWindow(containerWindow.frames[i])) { + return true; + } + } + return false; + } + var iframes = container.getElementsByTagName('iframe'); + for (var i = 0, len = iframes.length; i < len; i++) { + if (doesFrameWindow(iframes[i].contentWindow)) { + return true; + } + } + return false; + }; + EmbeddedSession.prototype._setupContext = function (appContext) { + if (!(this.m_appContext = appContext)) { + return; + } + }; + return EmbeddedSession; + }(SessionBase)); + OfficeExtension_1.EmbeddedSession = EmbeddedSession; + var EmbeddedRequestExecutor = (function () { + function EmbeddedRequestExecutor(session) { + this.m_session = session; + } + EmbeddedRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, EmbeddedRequestExecutor.SourceLibHeaderValue); + return CoreUtility.createPromise(function (resolve, reject) { + _this.m_session._invoke(CommunicationConstants.ExecuteMethodCommand, function (status, result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (status == 0) { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBodyFromSafeArray(result.Data), RichApiMessageUtility.getResponseHeadersFromSafeArray(result.Data)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.Code, result.error.Message); + } + resolve(response); + }, EmbeddedRequestExecutor._transformMessageArrayIntoParams(messageSafearray)); + }); + }; + EmbeddedRequestExecutor._transformMessageArrayIntoParams = function (msgArray) { + return { + ArrayData: msgArray, + DdaMethod: { + DispatchId: EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod + } + }; + }; + EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod = 93; + EmbeddedRequestExecutor.SourceLibHeaderValue = 'Embedded'; + return EmbeddedRequestExecutor; + }()); +})(OfficeExtension || (OfficeExtension = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { + step(generator.next(value)); + } + catch (e) { + reject(e); + } } + function rejected(value) { try { + step(generator["throw"](value)); + } + catch (e) { + reject(e); + } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function () { if (t[0] & 1) + throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } + catch (e) { + op = [6, e]; + y = 0; + } + finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "AgaveVisualApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeBiShim = "BiShim"; + var BiShim = (function (_super) { + __extends(BiShim, _super); + function BiShim() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BiShim.prototype, "_className", { + get: function () { + return "BiShim"; + }, + enumerable: true, + configurable: true + }); + BiShim.prototype.initialize = function (capabilities) { + _invokeMethod(this, "Initialize", 0, [capabilities], 0, 0); + }; + BiShim.prototype.getData = function () { + return _invokeMethod(this, "getData", 1, [], 4, 0); + }; + BiShim.prototype.setVisualObjects = function (visualObjects) { + _invokeMethod(this, "setVisualObjects", 0, [visualObjects], 2, 0); + }; + BiShim.prototype.setVisualObjectsToPersist = function (visualObjectsToPersist) { + _invokeMethod(this, "setVisualObjectsToPersist", 0, [visualObjectsToPersist], 2, 0); + }; + BiShim.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BiShim.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BiShim.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BiShim, context, "Microsoft.AgaveVisual.BiShim", false, 4); + }; + BiShim.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BiShim; + }(OfficeExtension.ClientObject)); + OfficeCore.BiShim = BiShim; + var AgaveVisualErrorCodes; + (function (AgaveVisualErrorCodes) { + AgaveVisualErrorCodes["generalException1"] = "GeneralException"; + })(AgaveVisualErrorCodes = OfficeCore.AgaveVisualErrorCodes || (OfficeCore.AgaveVisualErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "ExperimentApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeFlightingService = "FlightingService"; + var FlightingService = (function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId = function () { + return _invokeMethod(this, "GetClientSessionId", 1, [], 4, 0); + }; + FlightingService.prototype.getDeferredFlights = function () { + return _invokeMethod(this, "GetDeferredFlights", 1, [], 4, 0); + }; + FlightingService.prototype.getFeature = function (featureName, type, defaultValue, possibleValues) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null, 4); + }; + FlightingService.prototype.getFeatureGate = function (featureName, scope) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeatureGate", 1, [featureName, scope], false, false, null, 4); + }; + FlightingService.prototype.resetOverride = function (featureName) { + _invokeMethod(this, "ResetOverride", 0, [featureName], 0, 0); + }; + FlightingService.prototype.setOverride = function (featureName, type, value) { + _invokeMethod(this, "SetOverride", 0, [featureName, type, value], 0, 0); + }; + FlightingService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FlightingService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FlightingService, context, "Microsoft.Experiment.FlightingService", false, 4); + }; + FlightingService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService = FlightingService; + var _typeABType = "ABType"; + var ABType = (function (_super) { + __extends(ABType, _super); + function ABType() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeABType, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + ABType.prototype.load = function (option) { + return _load(this, option); + }; + ABType.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + ABType.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ABType.prototype.toJSON = function () { + return _toJson(this, { + "value": this._V + }, {}); + }; + ABType.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType = ABType; + var FeatureType; + (function (FeatureType) { + FeatureType["boolean"] = "Boolean"; + FeatureType["integer"] = "Integer"; + FeatureType["string"] = "String"; + })(FeatureType = OfficeCore.FeatureType || (OfficeCore.FeatureType = {})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes["generalException"] = "GeneralException"; + })(ExperimentErrorCodes = OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyDialog; +(function (OfficeFirstPartyDialog) { + var Dialog = (function () { + function Dialog(_dialogService) { + this._dialogService = _dialogService; + } + Dialog.prototype.close = function () { + this._dialogService.close(); + return this._dialogService.context.sync(); + }; + Dialog.prototype.messageChild = function (message, options) { + if (DialogApiManager && DialogApiManager.messageChildRichApiBridge) { + DialogApiManager.messageChildRichApiBridge(message, options); + } + }; + return Dialog; + }()); + OfficeFirstPartyDialog.Dialog = Dialog; + function lookupErrorCodeAndMessage(internalCode) { + var _a; + var table = (_a = {}, + _a[12002] = { code: "InvalidUrl", message: "Cannot load URL, no such page or bad URL syntax." }, + _a[12003] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12004] = { code: "Untrusted", message: "Domain is not trusted." }, + _a[12005] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12007] = { code: "FailedToOpen", message: "Another dialog is already opened." }, + _a); + if (table[internalCode]) { + return table[internalCode]; + } + else { + return { code: "Unknown", message: "An unknown error has occured with code: " + internalCode }; + } + } + function displayWebDialog(url, options) { + if (options === void 0) { + options = {}; + } + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) { + throw new OfficeExtension.Error({ code: "InvalidArgument", message: 'Dimensions must be "number%" or number.' }); + } + var ctx = new OfficeExtension.ClientRequestContext(); + var dialogService = OfficeCore.FirstPartyDialogService.newObject(ctx); + var dialog = new OfficeFirstPartyDialog.Dialog(dialogService); + var eventResult = dialogService.onDialogMessage.add(function (args) { + OfficeExtension.Utility.log("dialogMessageHandler:" + JSON.stringify(args)); + var parsedMessage = JSON.parse(args.message); + var eventError = parsedMessage.errorCode + ? new OfficeExtension.Error(lookupErrorCodeAndMessage(parsedMessage.errorCode)) + : null; + var messageType = parsedMessage.type; + var origin = parsedMessage.origin; + var messageContent = parsedMessage.message; + switch (messageType) { + case 17: + if (eventError) { + reject(eventError); + } + else { + resolve(dialog); + } + break; + case 12: + if (options.onMessage) { + options.onMessage(messageContent, dialog, origin); + } + break; + case 10: + default: + if (parsedMessage.errorCode === 12006) { + if (eventResult) { + eventResult.remove(); + ctx.sync(); + } + if (options.onClose) { + options.onClose(); + } + } + else { + if (options.onRuntimeError) { + options.onRuntimeError(eventError, dialog); + reject(eventError); + } + } + } + return OfficeExtension.CoreUtility.Promise.resolve(); + }); + return ctx.sync() + .then(function () { + var dialogOptions = { + width: options.width ? parseInt(options.width) : 50, + height: options.height ? parseInt(options.height) : 50, + displayInIFrame: options.displayInIFrame, + dialogTitle: options.dialogTitle + }; + dialogService.displayDialog(url, dialogOptions); + return ctx.sync(); + })["catch"](function (e) { + reject(e); + }); + }); + function isInt(value) { + return (/^(\-|\+)?([0-9]+)%?$/.test(value)); + } + } + OfficeFirstPartyDialog.displayWebDialog = displayWebDialog; + var DialogEventType; + (function (DialogEventType) { + DialogEventType[DialogEventType["dialogMessageReceived"] = 0] = "dialogMessageReceived"; + DialogEventType[DialogEventType["dialogEventReceived"] = 1] = "dialogEventReceived"; + })(DialogEventType || (DialogEventType = {})); +})(OfficeFirstPartyDialog || (OfficeFirstPartyDialog = {})); +var OfficeCore; +(function (OfficeCore) { + OfficeCore.OfficeOnlineDomainList = [ + "*.dod.online.office365.us", + "*.gov.online.office365.us", + "*.officeapps-df.live.com", + "*.officeapps.live.com", + "*.online.office.de", + "*.partner.officewebapps.cn" + ]; + function isHostOriginTrusted() { + if (typeof window.external === 'undefined' || + typeof window.external.GetContext === 'undefined') { + var hostUrl = OSF.getClientEndPoint()._targetUrl; + var hostname_1 = getHostNameFromUrl(hostUrl); + if (hostUrl.indexOf("https:") != 0) { + return false; + } + OfficeCore.OfficeOnlineDomainList.forEach(function (domain) { + if (domain.indexOf("*.") == 0) { + domain = domain.substring(2); + } + if (hostname_1.indexOf(domain) == hostname_1.length - domain.length) { + return true; + } + }); + return false; + } + return true; + } + OfficeCore.isHostOriginTrusted = isHostOriginTrusted; + function getHostNameFromUrl(url) { + var hostName = ""; + hostName = url.split("/")[2]; + hostName = hostName.split(":")[0]; + hostName = hostName.split("?")[0]; + return hostName; + } +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var FirstPartyApis = (function () { + function FirstPartyApis(context) { + this.context = context; + } + Object.defineProperty(FirstPartyApis.prototype, "roamingSettings", { + get: function () { + if (!this.m_roamingSettings) { + this.m_roamingSettings = OfficeCore.AuthenticationService.newObject(this.context).roamingSettings; + } + return this.m_roamingSettings; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "tap", { + get: function () { + if (!this.m_tap) { + this.m_tap = OfficeCore.Tap.newObject(this.context); + } + return this.m_tap; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "skill", { + get: function () { + if (!this.m_skill) { + this.m_skill = OfficeCore.Skill.newObject(this.context); + } + return this.m_skill; + }, + enumerable: true, + configurable: true + }); + return FirstPartyApis; + }()); + OfficeCore.FirstPartyApis = FirstPartyApis; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + return _super.call(this, url) || this; + } + Object.defineProperty(RequestContext.prototype, "firstParty", { + get: function () { + if (!this.m_firstPartyApis) { + this.m_firstPartyApis = new FirstPartyApis(this); + } + return this.m_firstPartyApis; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry = OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "ribbon", { + get: function () { + if (!this.m_ribbon) { + this.m_ribbon = OfficeCore.DynamicRibbon.newObject(this); + } + return this.m_ribbon; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "bi", { + get: function () { + if (!this.m_biShim) { + this.m_biShim = OfficeCore.BiShim.newObject(this); + } + return this.m_biShim; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService = OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext = RequestContext; + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("OfficeCore.run", arguments, function (requestInfo) { return new OfficeCore.RequestContext(requestInfo); }); + } + OfficeCore.run = run; +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var license; + (function (license_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function isFeatureEnabled(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, isEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isEnabled = license.isFeatureEnabled(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isEnabled.value]; + } + }); + }); + } + license_1.isFeatureEnabled = isFeatureEnabled; + function getFeatureTier(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, tier; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + tier = license.getFeatureTier(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, tier.value]; + } + }); + }); + } + license_1.getFeatureTier = getFeatureTier; + function isFreemiumUpsellEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, license, isFreemiumUpsellEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isFreemiumUpsellEnabled = license.isFreemiumUpsellEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isFreemiumUpsellEnabled.value]; + } + }); + }); + } + license_1.isFreemiumUpsellEnabled = isFreemiumUpsellEnabled; + function launchUpsellExperience(experienceId) { + return __awaiter(this, void 0, void 0, function () { + var context, license; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + license.launchUpsellExperience(experienceId); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + license_1.launchUpsellExperience = launchUpsellExperience; + function onFeatureStateChanged(feature, listener) { + return __awaiter(this, void 0, void 0, function () { + var context, license, licenseFeature, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + licenseFeature = license.getLicenseFeature(feature); + licenseFeature.onStateChanged.add(listener); + removeListener = function () { + licenseFeature.onStateChanged.remove(listener); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + license_1.onFeatureStateChanged = onFeatureStateChanged; + function getMsaDeviceTicket(resource, policy, options) { + return __awaiter(this, void 0, void 0, function () { + var context, license, msaDeviceTicket; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + msaDeviceTicket = license.getMsaDeviceTicket(resource, policy, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, msaDeviceTicket.value]; + } + }); + }); + } + license_1.getMsaDeviceTicket = getMsaDeviceTicket; + })(license = Office.license || (Office.license = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeSkill = "Skill"; + var Skill = (function (_super) { + __extends(Skill, _super); + function Skill() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Skill.prototype, "_className", { + get: function () { + return "Skill"; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.executeAction = function (paneId, actionId, actionDescriptor) { + return _invokeMethod(this, "ExecuteAction", 1, [paneId, actionId, actionDescriptor], 4 | 1, 0); + }; + Skill.prototype.notifyPaneEvent = function (paneId, eventDescriptor) { + _invokeMethod(this, "NotifyPaneEvent", 1, [paneId, eventDescriptor], 4 | 1, 0); + }; + Skill.prototype.registerHostSkillEvent = function () { + _invokeMethod(this, "RegisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype.testFireEvent = function () { + _invokeMethod(this, "TestFireEvent", 0, [], 1, 0); + }; + Skill.prototype.unregisterHostSkillEvent = function () { + _invokeMethod(this, "UnregisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Skill.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Skill.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Skill, context, "Microsoft.SkillApi.Skill", false, 4); + }; + Object.defineProperty(Skill.prototype, "onHostSkillEvent", { + get: function () { + var _this = this; + if (!this.m_hostSkillEvent) { + this.m_hostSkillEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "HostSkillEvent", { + eventType: 65538, + registerFunc: function () { return _this.registerHostSkillEvent(); }, + unregisterFunc: function () { return _this.unregisterHostSkillEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.Skill_HostSkillEvent_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostSkillEvent; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Skill; + }(OfficeExtension.ClientObject)); + OfficeCore.Skill = Skill; + var _CC; + (function (_CC) { + function Skill_HostSkillEvent_EventArgsTransform(thisObj, args) { + var transformedArgs = { + type: args.type, + data: args.data + }; + return transformedArgs; + } + _CC.Skill_HostSkillEvent_EventArgsTransform = Skill_HostSkillEvent_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var SkillErrorCodes; + (function (SkillErrorCodes) { + SkillErrorCodes["generalException"] = "GeneralException"; + })(SkillErrorCodes = OfficeCore.SkillErrorCodes || (OfficeCore.SkillErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "TelemetryApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeTelemetryService = "TelemetryService"; + var TelemetryService = (function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendCustomerContent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _throwIfApiNotSupported("TelemetryService.sendCustomerContent", "Telemetry", "1.3", _hostName); + _invokeMethod(this, "SendCustomerContent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype.sendTelemetryEvent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _invokeMethod(this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + TelemetryService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.TelemetryService, context, "Microsoft.Telemetry.TelemetryService", false, 4); + }; + TelemetryService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService = TelemetryService; + var DataFieldType; + (function (DataFieldType) { + DataFieldType["unset"] = "Unset"; + DataFieldType["string"] = "String"; + DataFieldType["boolean"] = "Boolean"; + DataFieldType["int64"] = "Int64"; + DataFieldType["double"] = "Double"; + })(DataFieldType = OfficeCore.DataFieldType || (OfficeCore.DataFieldType = {})); + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes["generalException"] = "GeneralException"; + })(TelemetryErrorCodes = OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyAuth; +(function (OfficeFirstPartyAuth) { + var WebAuthReplyUrlsStorageKey = "officeWebAuthReplyUrls"; + var loaded = false; + OfficeFirstPartyAuth.authFlow = "authcode"; + OfficeFirstPartyAuth.autoPopup = false; + OfficeFirstPartyAuth.upnCheck = true; + OfficeFirstPartyAuth.msal = "https://alcdn.msauth.net/browser-1p/2.28.1/js/msal-browser-1p.min.js"; + OfficeFirstPartyAuth.debugging = false; + OfficeFirstPartyAuth.delay = 0; + OfficeFirstPartyAuth.delayMsal = 0; + function load(replyUrl, prefetch) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF.WebAuth && OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + var retrievedAuthContext = false; + try { + if (!Office || !Office.context || !Office.context.webAuth) { + reject({ + code: "GetAuthContextAsyncMissing", + message: "Office:[" + !Office + "],Office.context:[" + !Office.context + "],Office.context.webAuth:[" + !Office.context.webAuth + "]" + }); + return; + } + Office.context.webAuth.getAuthContextAsync(function (result) { + if (result.status === "succeeded") { + retrievedAuthContext = true; + var authContext = result.value; + if (!authContext || authContext.isAnonymous) { + reject({ + code: "CannotGetAuthContext", + message: authContext.Error + }); + return; + } + var isMsa = authContext.authorityType.toLowerCase() === 'msa'; + OSF.WebAuth.config = { + authFlow: OfficeFirstPartyAuth.authFlow, + authVersion: (OfficeFirstPartyAuth.authVersion) ? OfficeFirstPartyAuth.authVersion : null, + msal: OfficeFirstPartyAuth.msal, + delayWebAuth: OfficeFirstPartyAuth.delay, + delayMsal: OfficeFirstPartyAuth.delayMsal, + debugging: OfficeFirstPartyAuth.debugging, + authority: (OfficeFirstPartyAuth.authorityOverride) ? OfficeFirstPartyAuth.authorityOverride : authContext.authority, + idp: authContext.authorityType.toLowerCase(), + appIds: [isMsa ? (authContext.msaAppId) ? authContext.msaAppId : authContext.appId : authContext.appId], + redirectUri: (replyUrl) ? replyUrl : null, + upn: authContext.upn, + puid: authContext.userId, + prefetch: prefetch, + telemetryInstance: 'otel', + autoPopup: OfficeFirstPartyAuth.autoPopup, + enableUpnCheck: OfficeFirstPartyAuth.upnCheck, + enableConsoleLogging: OfficeFirstPartyAuth.debugging + }; + OSF.WebAuth.load().then(function (result) { + loaded = true; + logLoadEvent(result, loaded); + resolve(); + })["catch"](function (result) { + logLoadEvent(result, loaded); + reject({ + code: "PackageNotLoaded", + message: (result instanceof Event) ? result.type : result + }); + }); + if (OfficeFirstPartyAuth.authFlow === "implicit") { + var finalReplyUrl = (replyUrl) ? replyUrl : window.location.href.split("?")[0]; + var replyUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (replyUrls || replyUrls === "") { + replyUrls = finalReplyUrl; + } + else { + replyUrls += ", " + finalReplyUrl; + } + if (replyUrls) + sessionStorage.setItem(WebAuthReplyUrlsStorageKey, replyUrls); + } + } + else { + OSF.WebAuth.config = null; + reject({ + code: "CannotGetAuthContext", + message: result.status + }); + } + }); + } + catch (e) { + OSF.WebAuth.config = null; + OSF.WebAuth.load().then(function () { + resolve(); + })["catch"](function () { + reject({ + code: retrievedAuthContext ? "CannotGetAuthContext" : "FailedToLoad", + message: e + }); + }); + } + } + else { + resolve(); + } + }); + } + OfficeFirstPartyAuth.load = load; + function getAccessToken(options, behaviorOption) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + Office.context.webAuth.getAuthContextAsync(function (result) { + var supportsAuthToken = false; + if (result.status === "succeeded") { + var authContext = result.value; + if (authContext.supportsAuthToken) { + supportsAuthToken = true; + } + } + if (!supportsAuthToken) { + if (OSF.WebAuth && loaded) { + if (OSF.WebAuth.config.appIds[0]) { + OSF.WebAuth.getToken(options.resource, OSF.WebAuth.config.appIds[0], OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : null, (options && options.authChallenge) ? options.authChallenge : null).then(function (result) { + logAcquireEvent(result, true, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + resolve({ + accessToken: result.Token, + tokenIdenityType: (OSF.WebAuth.config.idp.toLowerCase() == "msa") + ? OfficeCore.IdentityType.microsoftAccount + : OfficeCore.IdentityType.organizationAccount + }); + })["catch"](function (result) { + logAcquireEvent(result, false, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + reject({ + code: result.ErrorCode, + message: (result instanceof Event) ? result.type : result.ErrorMessage + }); + }); + } + } + else { + logUnexpectedAcquire(loaded, OSF.WebAuth.loadAttempts); + } + } + else { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result_1 = auth.getAccessToken(options, null); + context.sync().then(function () { + resolve(result_1.value); + }); + } + }); + } + else { + var context_1 = new OfficeCore.RequestContext(); + var auth_1 = OfficeCore.AuthenticationService.newObject(context_1); + var handler_1 = auth_1.onTokenReceived.add(function (arg) { + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + handler_1.remove(); + context_1.sync()["catch"](function () { + }); + if (arg.code == 0) { + resolve(arg.tokenValue); + } + else { + if (OfficeExtension.CoreUtility.isNullOrUndefined(arg.errorInfo)) { + reject({ code: arg.code }); + } + else { + try { + reject(JSON.parse(arg.errorInfo)); + } + catch (e) { + reject({ code: arg.code, message: arg.errorInfo }); + } + } + } + } + return null; + }); + context_1.sync() + .then(function () { + var apiResult = auth_1.getAccessToken(options, auth_1._targetId); + return context_1.sync() + .then(function () { + if (OfficeExtension.CoreUtility.isNullOrUndefined(apiResult.value)) { + return null; + } + var tokenValue = apiResult.value.accessToken; + if (!OfficeExtension.CoreUtility.isNullOrUndefined(tokenValue)) { + resolve(apiResult.value); + } + }); + })["catch"](function (e) { + reject(e); + }); + } + }); + } + OfficeFirstPartyAuth.getAccessToken = getAccessToken; + function getPrimaryIdentityInfo() { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result = auth.getPrimaryIdentityInfo(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getPrimaryIdentityInfo = getPrimaryIdentityInfo; + function getIdentities() { + var context = new OfficeCore.RequestContext(); + var auth_service = OfficeCore.AuthenticationService.newObject(context); + var result = auth_service.getIdentities(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getIdentities = getIdentities; + function logLoadEvent(result, succeeded) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : "") + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'loadedApplicationCount': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + case 'timeToLoad': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.Load", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logAcquireEvent(result, succeeded, popup) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Popup', (typeof popup === "boolean") ? popup : false), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : result.ErrorCode), + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'timeToGetToken': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.GetAccessToken", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logUnexpectedAcquire(loadResult, loadAttempts) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeBooleanDataField('Loaded', loadResult), + oteljs.makeInt64DataField('LoadAttempts', (typeof loadAttempts === "number") ? loadAttempts : 0) + ]; + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.UnexpectedAcquire", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function loadWebAuthForReplyPage() { + try { + if (typeof (window) === "undefined" || !window.sessionStorage) { + return; + } + var webAuthRedirectUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (webAuthRedirectUrls !== null && webAuthRedirectUrls.indexOf(window.location.origin + window.location.pathname) !== -1) { + load(); + } + } + catch (ex) { + console.error(ex); + } + } + if (typeof (window) !== "undefined" && window.OSF) { + loadWebAuthForReplyPage(); + } +})(OfficeFirstPartyAuth || (OfficeFirstPartyAuth = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var IdentityType; + (function (IdentityType) { + IdentityType["organizationAccount"] = "OrganizationAccount"; + IdentityType["microsoftAccount"] = "MicrosoftAccount"; + IdentityType["unsupported"] = "Unsupported"; + })(IdentityType = OfficeCore.IdentityType || (OfficeCore.IdentityType = {})); + var _typeAuthenticationService = "AuthenticationService"; + var AuthenticationService = (function (_super) { + __extends(AuthenticationService, _super); + function AuthenticationService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AuthenticationService.prototype, "_className", { + get: function () { + return "AuthenticationService"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "_navigationPropertyNames", { + get: function () { + return ["roamingSettings"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "roamingSettings", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.RoamingSettingCollection, this, "RoamingSettings", false, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.getAccessToken = function (tokenParameters, targetId) { + return _invokeMethod(this, "GetAccessToken", 1, [tokenParameters, targetId], 4 | 1, 0); + }; + AuthenticationService.prototype.getIdentities = function () { + _throwIfApiNotSupported("AuthenticationService.getIdentities", "FirstPartyAuthentication", "1.3", _hostName); + return _invokeMethod(this, "GetIdentities", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.getPrimaryIdentityInfo = function () { + _throwIfApiNotSupported("AuthenticationService.getPrimaryIdentityInfo", "FirstPartyAuthentication", "1.2", _hostName); + return _invokeMethod(this, "GetPrimaryIdentityInfo", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.registerIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.registerIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "RegisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype.unregisterIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.unregisterIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "UnregisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["roamingSettings", "RoamingSettings"]); + }; + AuthenticationService.prototype.load = function (options) { + return _load(this, options); + }; + AuthenticationService.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + AuthenticationService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AuthenticationService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AuthenticationService, context, "Microsoft.Authentication.AuthenticationService", false, 4); + }; + Object.defineProperty(AuthenticationService.prototype, "onIdentityChanged", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onIdentityChanged", "FirstPartyAuthentication", "1.5", _hostName); + if (!this.m_identityChanged) { + this.m_identityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityChanged", { + eventType: 65545, + registerFunc: function () { return _this.registerIdentityChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterIdentityChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + email: value.email, + environment: value.environment, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "onTokenReceived", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onTokenReceived", "FirstPartyAuthentication", "1.2", _hostName); + if (!this.m_tokenReceived) { + this.m_tokenReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "TokenReceived", { + eventType: 3001, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return _this._targetId; }, + eventArgsTransformFunc: function (value) { + var event = _CC.AuthenticationService_TokenReceived_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_tokenReceived; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AuthenticationService; + }(OfficeExtension.ClientObject)); + OfficeCore.AuthenticationService = AuthenticationService; + var AuthenticationServiceCustom = (function () { + function AuthenticationServiceCustom() { + } + Object.defineProperty(AuthenticationServiceCustom.prototype, "_targetId", { + get: function () { + if (this.m_targetId == undefined) { + if (typeof (OSF) !== 'undefined' && OSF.OUtil) { + this.m_targetId = OSF.OUtil.Guid.generateNewGuid(); + } + else { + this.m_targetId = "" + this.context._nextId(); + } + } + return this.m_targetId; + }, + enumerable: true, + configurable: true + }); + return AuthenticationServiceCustom; + }()); + OfficeCore.AuthenticationServiceCustom = AuthenticationServiceCustom; + OfficeExtension.Utility.applyMixin(AuthenticationService, AuthenticationServiceCustom); + var _CC; + (function (_CC) { + function AuthenticationService_TokenReceived_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + tokenValue: value.tokenValue, + code: value.code, + errorInfo: value.errorInfo + }; + return newArgs; + } + _CC.AuthenticationService_TokenReceived_EventArgsTransform = AuthenticationService_TokenReceived_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeRoamingSetting = "RoamingSetting"; + var RoamingSetting = (function (_super) { + __extends(RoamingSetting, _super); + function RoamingSetting() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSetting.prototype, "_className", { + get: function () { + return "RoamingSetting"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRoamingSetting, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeRoamingSetting, this._isNull); + return this._V; + }, + set: function (value) { + this._V = value; + _invokeSetProperty(this, "Value", value, 0); + }, + enumerable: true, + configurable: true + }); + RoamingSetting.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["value"], [], []); + }; + RoamingSetting.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RoamingSetting.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + RoamingSetting.prototype.load = function (options) { + return _load(this, options); + }; + RoamingSetting.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RoamingSetting.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RoamingSetting.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSetting.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I, + "value": this._V + }, {}); + }; + RoamingSetting.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RoamingSetting.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RoamingSetting; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSetting = RoamingSetting; + var _typeRoamingSettingCollection = "RoamingSettingCollection"; + var RoamingSettingCollection = (function (_super) { + __extends(RoamingSettingCollection, _super); + function RoamingSettingCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSettingCollection.prototype, "_className", { + get: function () { + return "RoamingSettingCollection"; + }, + enumerable: true, + configurable: true + }); + RoamingSettingCollection.prototype.getItem = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItem", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype.getItemOrNullObject = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItemOrNullObject", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RoamingSettingCollection.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSettingCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RoamingSettingCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSettingCollection = RoamingSettingCollection; + var _typeBeforeDocumentCloseNotification = "BeforeDocumentCloseNotification"; + var BeforeDocumentCloseNotification = (function (_super) { + __extends(BeforeDocumentCloseNotification, _super); + function BeforeDocumentCloseNotification() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "_className", { + get: function () { + return "BeforeDocumentCloseNotification"; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.disable = function () { + _invokeMethod(this, "Disable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype.enable = function () { + _invokeMethod(this, "Enable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BeforeDocumentCloseNotification.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BeforeDocumentCloseNotification.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BeforeDocumentCloseNotification, context, "Microsoft.BeforeDocumentCloseNotification.BeforeDocumentCloseNotification", false, 4); + }; + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "onBeforeCloseNotificationCancelled", { + get: function () { + if (!this.m_beforeCloseNotificationCancelled) { + this.m_beforeCloseNotificationCancelled = new OfficeExtension.GenericEventHandlers(this.context, this, "BeforeCloseNotificationCancelled", { + eventType: 65540, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_beforeCloseNotificationCancelled; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BeforeDocumentCloseNotification; + }(OfficeExtension.ClientObject)); + OfficeCore.BeforeDocumentCloseNotification = BeforeDocumentCloseNotification; + var ServiceProvider; + (function (ServiceProvider) { + ServiceProvider["ariaBrowserPipeUrl"] = "AriaBrowserPipeUrl"; + ServiceProvider["ariaUploadUrl"] = "AriaUploadUrl"; + ServiceProvider["ariaVNextUploadUrl"] = "AriaVNextUploadUrl"; + ServiceProvider["lokiAutoDiscoverUrl"] = "LokiAutoDiscoverUrl"; + })(ServiceProvider = OfficeCore.ServiceProvider || (OfficeCore.ServiceProvider = {})); + var _typeServiceUrlProvider = "ServiceUrlProvider"; + var ServiceUrlProvider = (function (_super) { + __extends(ServiceUrlProvider, _super); + function ServiceUrlProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceUrlProvider.prototype, "_className", { + get: function () { + return "ServiceUrlProvider"; + }, + enumerable: true, + configurable: true + }); + ServiceUrlProvider.prototype.getServiceUrl = function (emailAddress, provider) { + return _invokeMethod(this, "GetServiceUrl", 1, [emailAddress, provider], 4, 0); + }; + ServiceUrlProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceUrlProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceUrlProvider.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceUrlProvider, context, "Microsoft.DesktopCompliance.ServiceUrlProvider", false, 4); + }; + ServiceUrlProvider.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceUrlProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceUrlProvider = ServiceUrlProvider; + var _typeLinkedIn = "LinkedIn"; + var LinkedIn = (function (_super) { + __extends(LinkedIn, _super); + function LinkedIn() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LinkedIn.prototype, "_className", { + get: function () { + return "LinkedIn"; + }, + enumerable: true, + configurable: true + }); + LinkedIn.prototype.isEnabledForOffice = function () { + return _invokeMethod(this, "IsEnabledForOffice", 1, [], 4, 0); + }; + LinkedIn.prototype.recordLinkedInSettingsCompliance = function (featureName, isEnabled) { + _invokeMethod(this, "RecordLinkedInSettingsCompliance", 0, [featureName, isEnabled], 0, 0); + }; + LinkedIn.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LinkedIn.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LinkedIn.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LinkedIn, context, "Microsoft.DesktopCompliance.LinkedIn", false, 4); + }; + LinkedIn.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LinkedIn; + }(OfficeExtension.ClientObject)); + OfficeCore.LinkedIn = LinkedIn; + var _typeNetworkUsage = "NetworkUsage"; + var NetworkUsage = (function (_super) { + __extends(NetworkUsage, _super); + function NetworkUsage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(NetworkUsage.prototype, "_className", { + get: function () { + return "NetworkUsage"; + }, + enumerable: true, + configurable: true + }); + NetworkUsage.prototype.isInDisconnectedMode = function () { + return _invokeMethod(this, "IsInDisconnectedMode", 1, [], 4, 0); + }; + NetworkUsage.prototype.isInOnlineMode = function () { + return _invokeMethod(this, "IsInOnlineMode", 1, [], 4, 0); + }; + NetworkUsage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + NetworkUsage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + NetworkUsage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.NetworkUsage, context, "Microsoft.DesktopCompliance.NetworkUsage", false, 4); + }; + NetworkUsage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return NetworkUsage; + }(OfficeExtension.ClientObject)); + OfficeCore.NetworkUsage = NetworkUsage; + var _typeDynamicRibbon = "DynamicRibbon"; + var DynamicRibbon = (function (_super) { + __extends(DynamicRibbon, _super); + function DynamicRibbon() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DynamicRibbon.prototype, "_className", { + get: function () { + return "DynamicRibbon"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "_navigationPropertyNames", { + get: function () { + return ["buttons"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "buttons", { + get: function () { + if (!this._B) { + this._B = _createPropertyObject(OfficeCore.RibbonButtonCollection, this, "Buttons", true, 4); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + DynamicRibbon.prototype.executeRequestCreate = function (jsonCreate) { + _throwIfApiNotSupported("DynamicRibbon.executeRequestCreate", "DynamicRibbon", "1.2", _hostName); + _invokeMethod(this, "ExecuteRequestCreate", 1, [jsonCreate], 4, 0); + }; + DynamicRibbon.prototype.executeRequestUpdate = function (jsonUpdate) { + _invokeMethod(this, "ExecuteRequestUpdate", 1, [jsonUpdate], 4, 0); + }; + DynamicRibbon.prototype.getButton = function (id) { + return _createMethodObject(OfficeCore.RibbonButton, this, "GetButton", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype.getTab = function (id) { + return _createMethodObject(OfficeCore.RibbonTab, this, "GetTab", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["buttons", "Buttons"]); + }; + DynamicRibbon.prototype.load = function (options) { + return _load(this, options); + }; + DynamicRibbon.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + DynamicRibbon.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DynamicRibbon.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DynamicRibbon, context, "Microsoft.DynamicRibbon.DynamicRibbon", false, 4); + }; + DynamicRibbon.prototype.toJSON = function () { + return _toJson(this, {}, { + "buttons": this._B + }); + }; + return DynamicRibbon; + }(OfficeExtension.ClientObject)); + OfficeCore.DynamicRibbon = DynamicRibbon; + var _typeRibbonTab = "RibbonTab"; + var RibbonTab = (function (_super) { + __extends(RibbonTab, _super); + function RibbonTab() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonTab.prototype, "_className", { + get: function () { + return "RibbonTab"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonTab, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + RibbonTab.prototype.setVisibility = function (visibility) { + _invokeMethod(this, "SetVisibility", 0, [visibility], 0, 0); + }; + RibbonTab.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + RibbonTab.prototype.load = function (options) { + return _load(this, options); + }; + RibbonTab.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonTab.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonTab.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonTab.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + RibbonTab.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonTab.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonTab; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonTab = RibbonTab; + var _typeRibbonButton = "RibbonButton"; + var RibbonButton = (function (_super) { + __extends(RibbonButton, _super); + function RibbonButton() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButton.prototype, "_className", { + get: function () { + return "RibbonButton"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "enabled", "label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Enabled", "Label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "enabled", { + get: function () { + _throwIfNotLoaded("enabled", this._E, _typeRibbonButton, this._isNull); + return this._E; + }, + set: function (value) { + this._E = value; + _invokeSetProperty(this, "Enabled", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonButton, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "label", { + get: function () { + _throwIfNotLoaded("label", this._L, _typeRibbonButton, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + RibbonButton.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["enabled"], [], []); + }; + RibbonButton.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RibbonButton.prototype.setEnabled = function (enabled) { + _invokeMethod(this, "SetEnabled", 0, [enabled], 0, 0); + }; + RibbonButton.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Enabled"])) { + this._E = obj["Enabled"]; + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Label"])) { + this._L = obj["Label"]; + } + }; + RibbonButton.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButton.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButton.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonButton.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonButton.prototype.toJSON = function () { + return _toJson(this, { + "enabled": this._E, + "id": this._I, + "label": this._L + }, {}); + }; + RibbonButton.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonButton.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonButton; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButton = RibbonButton; + var _typeRibbonButtonCollection = "RibbonButtonCollection"; + var RibbonButtonCollection = (function (_super) { + __extends(RibbonButtonCollection, _super); + function RibbonButtonCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButtonCollection.prototype, "_className", { + get: function () { + return "RibbonButtonCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeRibbonButtonCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + RibbonButtonCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + RibbonButtonCollection.prototype.getItem = function (key) { + return _createIndexerObject(OfficeCore.RibbonButton, this, [key]); + }; + RibbonButtonCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.RibbonButton, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + RibbonButtonCollection.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButtonCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButtonCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }); + }; + RibbonButtonCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + RibbonButtonCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return RibbonButtonCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButtonCollection = RibbonButtonCollection; + var _typeFirstPartyDialogService = "FirstPartyDialogService"; + var FirstPartyDialogService = (function (_super) { + __extends(FirstPartyDialogService, _super); + function FirstPartyDialogService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FirstPartyDialogService.prototype, "_className", { + get: function () { + return "FirstPartyDialogService"; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4 | 1, 0); + }; + FirstPartyDialogService.prototype.displayDialog = function (url, options) { + _invokeMethod(this, "DisplayDialog", 1, [url, options], 4 | 1, 0); + }; + FirstPartyDialogService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FirstPartyDialogService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FirstPartyDialogService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FirstPartyDialogService, context, "Microsoft.FirstPartyDialog.FirstPartyDialogService", false, 4); + }; + Object.defineProperty(FirstPartyDialogService.prototype, "onDialogMessage", { + get: function () { + var _this = this; + if (!this.m_dialogMessage) { + this.m_dialogMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "DialogMessage", { + eventType: 65536, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_dialogMessage; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FirstPartyDialogService; + }(OfficeExtension.ClientObject)); + OfficeCore.FirstPartyDialogService = FirstPartyDialogService; + (function (_CC) { + function FirstPartyDialogService_DialogMessage_EventArgsTransform(thisObj, args) { + return { + message: args.message + }; + } + _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform = FirstPartyDialogService_DialogMessage_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var TimeStringFormat; + (function (TimeStringFormat) { + TimeStringFormat["shortTime"] = "ShortTime"; + TimeStringFormat["longTime"] = "LongTime"; + TimeStringFormat["shortDate"] = "ShortDate"; + TimeStringFormat["longDate"] = "LongDate"; + })(TimeStringFormat = OfficeCore.TimeStringFormat || (OfficeCore.TimeStringFormat = {})); + var _typeLocaleApi = "LocaleApi"; + var LocaleApi = (function (_super) { + __extends(LocaleApi, _super); + function LocaleApi() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LocaleApi.prototype, "_className", { + get: function () { + return "LocaleApi"; + }, + enumerable: true, + configurable: true + }); + LocaleApi.prototype.formatDateTimeString = function (localeName, value, format) { + return _invokeMethod(this, "FormatDateTimeString", 1, [localeName, value, format], 4, 0); + }; + LocaleApi.prototype.getLocaleDateTimeFormattingInfo = function (localeName) { + return _invokeMethod(this, "GetLocaleDateTimeFormattingInfo", 1, [localeName], 4, 0); + }; + LocaleApi.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LocaleApi.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LocaleApi.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LocaleApi, context, "Microsoft.LocaleApi.LocaleApi", false, 4); + }; + LocaleApi.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LocaleApi; + }(OfficeExtension.ClientObject)); + OfficeCore.LocaleApi = LocaleApi; + var _typeComment = "Comment"; + var Comment = (function (_super) { + __extends(Comment, _super); + function Comment() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Comment.prototype, "_className", { + get: function () { + return "Comment"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "text", "created", "level", "resolved", "author", "mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Text", "Created", "Level", "Resolved", "Author", "Mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false, false, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_navigationPropertyNames", { + get: function () { + return ["parent", "parentOrNullObject", "replies"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parent", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.Comment, this, "Parent", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parentOrNullObject", { + get: function () { + if (!this._Pa) { + this._Pa = _createPropertyObject(OfficeCore.Comment, this, "ParentOrNullObject", false, 4); + } + return this._Pa; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "replies", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.CommentCollection, this, "Replies", true, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "author", { + get: function () { + _throwIfNotLoaded("author", this._A, _typeComment, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "created", { + get: function () { + _throwIfNotLoaded("created", this._C, _typeComment, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeComment, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "level", { + get: function () { + _throwIfNotLoaded("level", this._L, _typeComment, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "mentions", { + get: function () { + _throwIfNotLoaded("mentions", this._M, _typeComment, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "resolved", { + get: function () { + _throwIfNotLoaded("resolved", this._Re, _typeComment, this._isNull); + return this._Re; + }, + set: function (value) { + this._Re = value; + _invokeSetProperty(this, "Resolved", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeComment, this._isNull); + return this._T; + }, + set: function (value) { + this._T = value; + _invokeSetProperty(this, "Text", value, 0); + }, + enumerable: true, + configurable: true + }); + Comment.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["text", "resolved"], [], [ + "parent", + "parentOrNullObject", + "replies" + ]); + }; + Comment.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Comment.prototype["delete"] = function () { + _invokeMethod(this, "Delete", 0, [], 0, 0); + }; + Comment.prototype.getParentOrSelf = function () { + return _createMethodObject(OfficeCore.Comment, this, "GetParentOrSelf", 1, [], false, false, null, 4); + }; + Comment.prototype.getRichText = function (format) { + return _invokeMethod(this, "GetRichText", 1, [format], 4, 0); + }; + Comment.prototype.reply = function (text, format) { + return _createMethodObject(OfficeCore.Comment, this, "Reply", 0, [text, format], false, false, null, 0); + }; + Comment.prototype.setRichText = function (text, format) { + return _invokeMethod(this, "SetRichText", 0, [text, format], 0, 0); + }; + Comment.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Author"])) { + this._A = obj["Author"]; + } + if (!_isUndefined(obj["Created"])) { + this._C = _adjustToDateTime(obj["Created"]); + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Level"])) { + this._L = obj["Level"]; + } + if (!_isUndefined(obj["Mentions"])) { + this._M = obj["Mentions"]; + } + if (!_isUndefined(obj["Resolved"])) { + this._Re = obj["Resolved"]; + } + if (!_isUndefined(obj["Text"])) { + this._T = obj["Text"]; + } + _handleNavigationPropertyResults(this, obj, ["parent", "Parent", "parentOrNullObject", "ParentOrNullObject", "replies", "Replies"]); + }; + Comment.prototype.load = function (options) { + return _load(this, options); + }; + Comment.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Comment.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + Comment.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Created"])) { + obj["created"] = _adjustToDateTime(obj["created"]); + } + _processRetrieveResult(this, value, result); + }; + Comment.prototype.toJSON = function () { + return _toJson(this, { + "author": this._A, + "created": this._C, + "id": this._I, + "level": this._L, + "mentions": this._M, + "resolved": this._Re, + "text": this._T + }, { + "replies": this._R + }); + }; + Comment.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Comment.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Comment; + }(OfficeExtension.ClientObject)); + OfficeCore.Comment = Comment; + var _typeCommentCollection = "CommentCollection"; + var CommentCollection = (function (_super) { + __extends(CommentCollection, _super); + function CommentCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CommentCollection.prototype, "_className", { + get: function () { + return "CommentCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeCommentCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + CommentCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + CommentCollection.prototype.getItem = function (id) { + return _createIndexerObject(OfficeCore.Comment, this, [id]); + }; + CommentCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Comment, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + CommentCollection.prototype.load = function (options) { + return _load(this, options); + }; + CommentCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + CommentCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }); + }; + CommentCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + CommentCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return CommentCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.CommentCollection = CommentCollection; + var _typeExtensionLifeCycle = "ExtensionLifeCycle"; + var ExtensionLifeCycle = (function (_super) { + __extends(ExtensionLifeCycle, _super); + function ExtensionLifeCycle() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ExtensionLifeCycle.prototype, "_className", { + get: function () { + return "ExtensionLifeCycle"; + }, + enumerable: true, + configurable: true + }); + ExtensionLifeCycle.prototype.launchExtensionComponent = function (componentId, componentType, launchProperties) { + _invokeMethod(this, "LaunchExtensionComponent", 1, [componentId, componentType, launchProperties], 4 | 1, 0); + }; + ExtensionLifeCycle.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ExtensionLifeCycle.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ExtensionLifeCycle.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ExtensionLifeCycle, context, "Microsoft.OfficeSharedApi.ExtensionLifeCycle", false, 4); + }; + ExtensionLifeCycle.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ExtensionLifeCycle; + }(OfficeExtension.ClientObject)); + OfficeCore.ExtensionLifeCycle = ExtensionLifeCycle; + var CommentTextFormat; + (function (CommentTextFormat) { + CommentTextFormat["plain"] = "Plain"; + CommentTextFormat["markdown"] = "Markdown"; + CommentTextFormat["delta"] = "Delta"; + })(CommentTextFormat = OfficeCore.CommentTextFormat || (OfficeCore.CommentTextFormat = {})); + var PersonaCardPerfPoint; + (function (PersonaCardPerfPoint) { + PersonaCardPerfPoint["placeHolderRendered"] = "PlaceHolderRendered"; + PersonaCardPerfPoint["initialCardRendered"] = "InitialCardRendered"; + })(PersonaCardPerfPoint = OfficeCore.PersonaCardPerfPoint || (OfficeCore.PersonaCardPerfPoint = {})); + var UnifiedCommunicationAvailability; + (function (UnifiedCommunicationAvailability) { + UnifiedCommunicationAvailability["notSet"] = "NotSet"; + UnifiedCommunicationAvailability["free"] = "Free"; + UnifiedCommunicationAvailability["idle"] = "Idle"; + UnifiedCommunicationAvailability["busy"] = "Busy"; + UnifiedCommunicationAvailability["idleBusy"] = "IdleBusy"; + UnifiedCommunicationAvailability["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationAvailability["unalertable"] = "Unalertable"; + UnifiedCommunicationAvailability["unavailable"] = "Unavailable"; + })(UnifiedCommunicationAvailability = OfficeCore.UnifiedCommunicationAvailability || (OfficeCore.UnifiedCommunicationAvailability = {})); + var UnifiedCommunicationStatus; + (function (UnifiedCommunicationStatus) { + UnifiedCommunicationStatus["online"] = "Online"; + UnifiedCommunicationStatus["notOnline"] = "NotOnline"; + UnifiedCommunicationStatus["away"] = "Away"; + UnifiedCommunicationStatus["busy"] = "Busy"; + UnifiedCommunicationStatus["beRightBack"] = "BeRightBack"; + UnifiedCommunicationStatus["onThePhone"] = "OnThePhone"; + UnifiedCommunicationStatus["outToLunch"] = "OutToLunch"; + UnifiedCommunicationStatus["inAMeeting"] = "InAMeeting"; + UnifiedCommunicationStatus["outOfOffice"] = "OutOfOffice"; + UnifiedCommunicationStatus["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationStatus["inAConference"] = "InAConference"; + UnifiedCommunicationStatus["getting"] = "Getting"; + UnifiedCommunicationStatus["notABuddy"] = "NotABuddy"; + UnifiedCommunicationStatus["disconnected"] = "Disconnected"; + UnifiedCommunicationStatus["notInstalled"] = "NotInstalled"; + UnifiedCommunicationStatus["urgentInterruptionsOnly"] = "UrgentInterruptionsOnly"; + UnifiedCommunicationStatus["mayBeAvailable"] = "MayBeAvailable"; + UnifiedCommunicationStatus["idle"] = "Idle"; + UnifiedCommunicationStatus["inPresentation"] = "InPresentation"; + })(UnifiedCommunicationStatus = OfficeCore.UnifiedCommunicationStatus || (OfficeCore.UnifiedCommunicationStatus = {})); + var UnifiedCommunicationPresence; + (function (UnifiedCommunicationPresence) { + UnifiedCommunicationPresence["free"] = "Free"; + UnifiedCommunicationPresence["busy"] = "Busy"; + UnifiedCommunicationPresence["idle"] = "Idle"; + UnifiedCommunicationPresence["doNotDistrub"] = "DoNotDistrub"; + UnifiedCommunicationPresence["blocked"] = "Blocked"; + UnifiedCommunicationPresence["notSet"] = "NotSet"; + UnifiedCommunicationPresence["outOfOffice"] = "OutOfOffice"; + })(UnifiedCommunicationPresence = OfficeCore.UnifiedCommunicationPresence || (OfficeCore.UnifiedCommunicationPresence = {})); + var FreeBusyCalendarState; + (function (FreeBusyCalendarState) { + FreeBusyCalendarState["unknown"] = "Unknown"; + FreeBusyCalendarState["free"] = "Free"; + FreeBusyCalendarState["busy"] = "Busy"; + FreeBusyCalendarState["elsewhere"] = "Elsewhere"; + FreeBusyCalendarState["tentative"] = "Tentative"; + FreeBusyCalendarState["outOfOffice"] = "OutOfOffice"; + })(FreeBusyCalendarState = OfficeCore.FreeBusyCalendarState || (OfficeCore.FreeBusyCalendarState = {})); + var PersonaType; + (function (PersonaType) { + PersonaType["unknown"] = "Unknown"; + PersonaType["enterprise"] = "Enterprise"; + PersonaType["contact"] = "Contact"; + PersonaType["bot"] = "Bot"; + PersonaType["phoneOnly"] = "PhoneOnly"; + PersonaType["oneOff"] = "OneOff"; + PersonaType["distributionList"] = "DistributionList"; + PersonaType["personalDistributionList"] = "PersonalDistributionList"; + PersonaType["anonymous"] = "Anonymous"; + PersonaType["unifiedGroup"] = "UnifiedGroup"; + })(PersonaType = OfficeCore.PersonaType || (OfficeCore.PersonaType = {})); + var PhoneType; + (function (PhoneType) { + PhoneType["workPhone"] = "WorkPhone"; + PhoneType["homePhone"] = "HomePhone"; + PhoneType["mobilePhone"] = "MobilePhone"; + PhoneType["businessFax"] = "BusinessFax"; + PhoneType["otherPhone"] = "OtherPhone"; + })(PhoneType = OfficeCore.PhoneType || (OfficeCore.PhoneType = {})); + var AddressType; + (function (AddressType) { + AddressType["workAddress"] = "WorkAddress"; + AddressType["homeAddress"] = "HomeAddress"; + AddressType["otherAddress"] = "OtherAddress"; + })(AddressType = OfficeCore.AddressType || (OfficeCore.AddressType = {})); + var MemberType; + (function (MemberType) { + MemberType["unknown"] = "Unknown"; + MemberType["individual"] = "Individual"; + MemberType["group"] = "Group"; + })(MemberType = OfficeCore.MemberType || (OfficeCore.MemberType = {})); + var _typeMemberInfoList = "MemberInfoList"; + var MemberInfoList = (function (_super) { + __extends(MemberInfoList, _super); + function MemberInfoList() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MemberInfoList.prototype, "_className", { + get: function () { + return "MemberInfoList"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typeMemberInfoList, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typeMemberInfoList, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + MemberInfoList.prototype.getPersonaForMember = function (memberCookie) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForMember", 1, [memberCookie], false, false, null, 4); + }; + MemberInfoList.prototype.items = function () { + return _invokeMethod(this, "Items", 1, [], 4, 0); + }; + MemberInfoList.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + }; + MemberInfoList.prototype.load = function (options) { + return _load(this, options); + }; + MemberInfoList.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MemberInfoList.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MemberInfoList.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + MemberInfoList.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MemberInfoList.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MemberInfoList; + }(OfficeExtension.ClientObject)); + OfficeCore.MemberInfoList = MemberInfoList; + var PersonaDataUpdated; + (function (PersonaDataUpdated) { + PersonaDataUpdated["hostId"] = "HostId"; + PersonaDataUpdated["type"] = "Type"; + PersonaDataUpdated["photo"] = "Photo"; + PersonaDataUpdated["personaInfo"] = "PersonaInfo"; + PersonaDataUpdated["unifiedCommunicationInfo"] = "UnifiedCommunicationInfo"; + PersonaDataUpdated["organization"] = "Organization"; + PersonaDataUpdated["unifiedGroupInfo"] = "UnifiedGroupInfo"; + PersonaDataUpdated["members"] = "Members"; + PersonaDataUpdated["membership"] = "Membership"; + PersonaDataUpdated["capabilities"] = "Capabilities"; + PersonaDataUpdated["customizations"] = "Customizations"; + PersonaDataUpdated["viewableSources"] = "ViewableSources"; + PersonaDataUpdated["placeholder"] = "Placeholder"; + })(PersonaDataUpdated = OfficeCore.PersonaDataUpdated || (OfficeCore.PersonaDataUpdated = {})); + var _typePersonaActions = "PersonaActions"; + var PersonaActions = (function (_super) { + __extends(PersonaActions, _super); + function PersonaActions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaActions.prototype, "_className", { + get: function () { + return "PersonaActions"; + }, + enumerable: true, + configurable: true + }); + PersonaActions.prototype.addContact = function () { + _invokeMethod(this, "AddContact", 0, [], 0, 0); + }; + PersonaActions.prototype.callPhoneNumber = function (contactNumber) { + _invokeMethod(this, "CallPhoneNumber", 0, [contactNumber], 0, 0); + }; + PersonaActions.prototype.composeEmail = function (emailAddress) { + _invokeMethod(this, "ComposeEmail", 0, [emailAddress], 0, 0); + }; + PersonaActions.prototype.composeInstantMessage = function (sipAddress) { + _invokeMethod(this, "ComposeInstantMessage", 0, [sipAddress], 0, 0); + }; + PersonaActions.prototype.editContact = function () { + _invokeMethod(this, "EditContact", 0, [], 0, 0); + }; + PersonaActions.prototype.editContactByIdentifier = function (identifier) { + _invokeMethod(this, "EditContactByIdentifier", 0, [identifier], 0, 0); + }; + PersonaActions.prototype.editUnifiedGroup = function () { + _invokeMethod(this, "EditUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.getChangePhotoUrlAndOpenInBrowser = function () { + _invokeMethod(this, "GetChangePhotoUrlAndOpenInBrowser", 0, [], 0, 0); + }; + PersonaActions.prototype.hideHoverCardForPersona = function () { + _invokeMethod(this, "HideHoverCardForPersona", 0, [], 0, 0); + }; + PersonaActions.prototype.joinUnifiedGroup = function () { + _invokeMethod(this, "JoinUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.leaveUnifiedGroup = function () { + _invokeMethod(this, "LeaveUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.openGroupCalendar = function () { + _invokeMethod(this, "OpenGroupCalendar", 0, [], 0, 0); + }; + PersonaActions.prototype.openLinkContactUx = function () { + _invokeMethod(this, "OpenLinkContactUx", 0, [], 0, 0); + }; + PersonaActions.prototype.openOutlookProperties = function () { + _invokeMethod(this, "OpenOutlookProperties", 0, [], 0, 0); + }; + PersonaActions.prototype.pinPersonaToQuickContacts = function () { + _invokeMethod(this, "PinPersonaToQuickContacts", 0, [], 0, 0); + }; + PersonaActions.prototype.scheduleMeeting = function () { + _invokeMethod(this, "ScheduleMeeting", 0, [], 0, 0); + }; + PersonaActions.prototype.showContactCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContactCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showContextMenu = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContextMenu", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showExpandedCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowExpandedCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showHoverCardForPersona = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowHoverCardForPersona", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.startAudioCall = function () { + _invokeMethod(this, "StartAudioCall", 0, [], 0, 0); + }; + PersonaActions.prototype.startVideoCall = function () { + _invokeMethod(this, "StartVideoCall", 0, [], 0, 0); + }; + PersonaActions.prototype.subscribeToGroup = function () { + _invokeMethod(this, "SubscribeToGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.toggleTagForAlerts = function () { + _invokeMethod(this, "ToggleTagForAlerts", 0, [], 0, 0); + }; + PersonaActions.prototype.unsubscribeFromGroup = function () { + _invokeMethod(this, "UnsubscribeFromGroup", 0, [], 0, 0); + }; + PersonaActions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaActions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaActions.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaActions; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaActions = PersonaActions; + var _typePersonaInfoSource = "PersonaInfoSource"; + var PersonaInfoSource = (function (_super) { + __extends(PersonaInfoSource, _super); + function PersonaInfoSource() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfoSource.prototype, "_className", { + get: function () { + return "PersonaInfoSource"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "phones", "addresses", "webSites", "notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "Phones", "Addresses", "WebSites", "Notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "addresses", { + get: function () { + _throwIfNotLoaded("addresses", this._A, _typePersonaInfoSource, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfoSource, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfoSource, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfoSource, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfoSource, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfoSource, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfoSource, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfoSource, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfoSource, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfoSource, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfoSource, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfoSource, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfoSource, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfoSource, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "phones", { + get: function () { + _throwIfNotLoaded("phones", this._P, _typePersonaInfoSource, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfoSource, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfoSource, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfoSource, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfoSource.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Addresses"])) { + this._A = obj["Addresses"]; + } + if (!_isUndefined(obj["Birthday"])) { + this._B = obj["Birthday"]; + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = obj["Birthdays"]; + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["Phones"])) { + this._P = obj["Phones"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + }; + PersonaInfoSource.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfoSource.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfoSource.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaInfoSource.prototype.toJSON = function () { + return _toJson(this, { + "addresses": this._A, + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "phones": this._P, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, {}); + }; + PersonaInfoSource.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfoSource.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfoSource; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfoSource = PersonaInfoSource; + var _typePersonaInfo = "PersonaInfo"; + var PersonaInfo = (function (_super) { + __extends(PersonaInfo, _super); + function PersonaInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfo.prototype, "_className", { + get: function () { + return "PersonaInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "webSites", "notes", "isPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "WebSites", "Notes", "IsPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["sources"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sources", { + get: function () { + if (!this._So) { + this._So = _createPropertyObject(OfficeCore.PersonaInfoSource, this, "Sources", false, 4); + } + return this._So; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfo, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfo, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfo, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfo, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfo, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "isPersonResolved", { + get: function () { + _throwIfNotLoaded("isPersonResolved", this._I, _typePersonaInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfo, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfo, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfo, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfo, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfo, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfo, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfo, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfo.prototype.getAddresses = function () { + return _invokeMethod(this, "GetAddresses", 1, [], 4, 0); + }; + PersonaInfo.prototype.getPhones = function () { + return _invokeMethod(this, "GetPhones", 1, [], 4, 0); + }; + PersonaInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Birthday"])) { + this._B = _adjustToDateTime(obj["Birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = _adjustToDateTime(obj["Birthdays"]); + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["IsPersonResolved"])) { + this._I = obj["IsPersonResolved"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + _handleNavigationPropertyResults(this, obj, ["sources", "Sources"]); + }; + PersonaInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Birthday"])) { + obj["birthday"] = _adjustToDateTime(obj["birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + obj["birthdays"] = _adjustToDateTime(obj["birthdays"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaInfo.prototype.toJSON = function () { + return _toJson(this, { + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "isPersonResolved": this._I, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, { + "sources": this._So + }); + }; + PersonaInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfo = PersonaInfo; + var _typePersonaUnifiedCommunicationInfo = "PersonaUnifiedCommunicationInfo"; + var PersonaUnifiedCommunicationInfo = (function (_super) { + __extends(PersonaUnifiedCommunicationInfo, _super); + function PersonaUnifiedCommunicationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_className", { + get: function () { + return "PersonaUnifiedCommunicationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["availability", "status", "isSelf", "isTagged", "customStatusString", "isBlocked", "presenceTooltip", "isOutOfOffice", "outOfOfficeNote", "timezone", "meetingLocation", "meetingSubject", "timezoneBias", "idleStartTime", "overallCapability", "isOnBuddyList", "presenceNote", "voiceMailUri", "availabilityText", "availabilityTooltip", "isDurationInAvailabilityText", "freeBusyStatus", "calendarState", "presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Availability", "Status", "IsSelf", "IsTagged", "CustomStatusString", "IsBlocked", "PresenceTooltip", "IsOutOfOffice", "OutOfOfficeNote", "Timezone", "MeetingLocation", "MeetingSubject", "TimezoneBias", "IdleStartTime", "OverallCapability", "IsOnBuddyList", "PresenceNote", "VoiceMailUri", "AvailabilityText", "AvailabilityTooltip", "IsDurationInAvailabilityText", "FreeBusyStatus", "CalendarState", "Presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availability", { + get: function () { + _throwIfNotLoaded("availability", this._A, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityText", { + get: function () { + _throwIfNotLoaded("availabilityText", this._Av, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Av; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityTooltip", { + get: function () { + _throwIfNotLoaded("availabilityTooltip", this._Ava, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ava; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "calendarState", { + get: function () { + _throwIfNotLoaded("calendarState", this._C, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "customStatusString", { + get: function () { + _throwIfNotLoaded("customStatusString", this._Cu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Cu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "freeBusyStatus", { + get: function () { + _throwIfNotLoaded("freeBusyStatus", this._F, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "idleStartTime", { + get: function () { + _throwIfNotLoaded("idleStartTime", this._I, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isBlocked", { + get: function () { + _throwIfNotLoaded("isBlocked", this._Is, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isDurationInAvailabilityText", { + get: function () { + _throwIfNotLoaded("isDurationInAvailabilityText", this._IsD, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsD; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOnBuddyList", { + get: function () { + _throwIfNotLoaded("isOnBuddyList", this._IsO, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsO; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOutOfOffice", { + get: function () { + _throwIfNotLoaded("isOutOfOffice", this._IsOu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsOu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isSelf", { + get: function () { + _throwIfNotLoaded("isSelf", this._IsS, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsS; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isTagged", { + get: function () { + _throwIfNotLoaded("isTagged", this._IsT, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsT; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingLocation", { + get: function () { + _throwIfNotLoaded("meetingLocation", this._M, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingSubject", { + get: function () { + _throwIfNotLoaded("meetingSubject", this._Me, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Me; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "outOfOfficeNote", { + get: function () { + _throwIfNotLoaded("outOfOfficeNote", this._O, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "overallCapability", { + get: function () { + _throwIfNotLoaded("overallCapability", this._Ov, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ov; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presence", { + get: function () { + _throwIfNotLoaded("presence", this._P, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceNote", { + get: function () { + _throwIfNotLoaded("presenceNote", this._Pr, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pr; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceTooltip", { + get: function () { + _throwIfNotLoaded("presenceTooltip", this._Pre, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pre; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "status", { + get: function () { + _throwIfNotLoaded("status", this._S, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezone", { + get: function () { + _throwIfNotLoaded("timezone", this._T, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezoneBias", { + get: function () { + _throwIfNotLoaded("timezoneBias", this._Ti, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ti; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "voiceMailUri", { + get: function () { + _throwIfNotLoaded("voiceMailUri", this._V, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + PersonaUnifiedCommunicationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Availability"])) { + this._A = obj["Availability"]; + } + if (!_isUndefined(obj["AvailabilityText"])) { + this._Av = obj["AvailabilityText"]; + } + if (!_isUndefined(obj["AvailabilityTooltip"])) { + this._Ava = obj["AvailabilityTooltip"]; + } + if (!_isUndefined(obj["CalendarState"])) { + this._C = obj["CalendarState"]; + } + if (!_isUndefined(obj["CustomStatusString"])) { + this._Cu = obj["CustomStatusString"]; + } + if (!_isUndefined(obj["FreeBusyStatus"])) { + this._F = obj["FreeBusyStatus"]; + } + if (!_isUndefined(obj["IdleStartTime"])) { + this._I = _adjustToDateTime(obj["IdleStartTime"]); + } + if (!_isUndefined(obj["IsBlocked"])) { + this._Is = obj["IsBlocked"]; + } + if (!_isUndefined(obj["IsDurationInAvailabilityText"])) { + this._IsD = obj["IsDurationInAvailabilityText"]; + } + if (!_isUndefined(obj["IsOnBuddyList"])) { + this._IsO = obj["IsOnBuddyList"]; + } + if (!_isUndefined(obj["IsOutOfOffice"])) { + this._IsOu = obj["IsOutOfOffice"]; + } + if (!_isUndefined(obj["IsSelf"])) { + this._IsS = obj["IsSelf"]; + } + if (!_isUndefined(obj["IsTagged"])) { + this._IsT = obj["IsTagged"]; + } + if (!_isUndefined(obj["MeetingLocation"])) { + this._M = obj["MeetingLocation"]; + } + if (!_isUndefined(obj["MeetingSubject"])) { + this._Me = obj["MeetingSubject"]; + } + if (!_isUndefined(obj["OutOfOfficeNote"])) { + this._O = obj["OutOfOfficeNote"]; + } + if (!_isUndefined(obj["OverallCapability"])) { + this._Ov = obj["OverallCapability"]; + } + if (!_isUndefined(obj["Presence"])) { + this._P = obj["Presence"]; + } + if (!_isUndefined(obj["PresenceNote"])) { + this._Pr = obj["PresenceNote"]; + } + if (!_isUndefined(obj["PresenceTooltip"])) { + this._Pre = obj["PresenceTooltip"]; + } + if (!_isUndefined(obj["Status"])) { + this._S = obj["Status"]; + } + if (!_isUndefined(obj["Timezone"])) { + this._T = obj["Timezone"]; + } + if (!_isUndefined(obj["TimezoneBias"])) { + this._Ti = obj["TimezoneBias"]; + } + if (!_isUndefined(obj["VoiceMailUri"])) { + this._V = obj["VoiceMailUri"]; + } + }; + PersonaUnifiedCommunicationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaUnifiedCommunicationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaUnifiedCommunicationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["IdleStartTime"])) { + obj["idleStartTime"] = _adjustToDateTime(obj["idleStartTime"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaUnifiedCommunicationInfo.prototype.toJSON = function () { + return _toJson(this, { + "availability": this._A, + "availabilityText": this._Av, + "availabilityTooltip": this._Ava, + "calendarState": this._C, + "customStatusString": this._Cu, + "freeBusyStatus": this._F, + "idleStartTime": this._I, + "isBlocked": this._Is, + "isDurationInAvailabilityText": this._IsD, + "isOnBuddyList": this._IsO, + "isOutOfOffice": this._IsOu, + "isSelf": this._IsS, + "isTagged": this._IsT, + "meetingLocation": this._M, + "meetingSubject": this._Me, + "outOfOfficeNote": this._O, + "overallCapability": this._Ov, + "presence": this._P, + "presenceNote": this._Pr, + "presenceTooltip": this._Pre, + "status": this._S, + "timezone": this._T, + "timezoneBias": this._Ti, + "voiceMailUri": this._V + }, {}); + }; + PersonaUnifiedCommunicationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaUnifiedCommunicationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaUnifiedCommunicationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaUnifiedCommunicationInfo = PersonaUnifiedCommunicationInfo; + var _typePersonaPhotoInfo = "PersonaPhotoInfo"; + var PersonaPhotoInfo = (function (_super) { + __extends(PersonaPhotoInfo, _super); + function PersonaPhotoInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaPhotoInfo.prototype, "_className", { + get: function () { + return "PersonaPhotoInfo"; + }, + enumerable: true, + configurable: true + }); + PersonaPhotoInfo.prototype.getImageUri = function (uriScheme) { + return _invokeMethod(this, "getImageUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getImageUriWithMetadata = function (uriScheme) { + return _invokeMethod(this, "getImageUriWithMetadata", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getPlaceholderUri = function (uriScheme) { + return _invokeMethod(this, "getPlaceholderUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.setPlaceholderColor = function (color) { + _invokeMethod(this, "setPlaceholderColor", 0, [color], 0, 0); + }; + PersonaPhotoInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaPhotoInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaPhotoInfo.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaPhotoInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaPhotoInfo = PersonaPhotoInfo; + var _typePersonaCollection = "PersonaCollection"; + var PersonaCollection = (function (_super) { + __extends(PersonaCollection, _super); + function PersonaCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaCollection.prototype, "_className", { + get: function () { + return "PersonaCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typePersonaCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + PersonaCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + PersonaCollection.prototype.getItem = function (index) { + return _createIndexerObject(OfficeCore.Persona, this, [index]); + }; + PersonaCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Persona, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + PersonaCollection.prototype.load = function (options) { + return _load(this, options); + }; + PersonaCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }); + }; + PersonaCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + PersonaCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return PersonaCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaCollection = PersonaCollection; + var _typePersonaOrganizationInfo = "PersonaOrganizationInfo"; + var PersonaOrganizationInfo = (function (_super) { + __extends(PersonaOrganizationInfo, _super); + function PersonaOrganizationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaOrganizationInfo.prototype, "_className", { + get: function () { + return "PersonaOrganizationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["hierarchy", "manager", "directReports"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "directReports", { + get: function () { + if (!this._D) { + this._D = _createPropertyObject(OfficeCore.PersonaCollection, this, "DirectReports", true, 4); + } + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "hierarchy", { + get: function () { + if (!this._H) { + this._H = _createPropertyObject(OfficeCore.PersonaCollection, this, "Hierarchy", true, 4); + } + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "manager", { + get: function () { + if (!this._M) { + this._M = _createPropertyObject(OfficeCore.Persona, this, "Manager", false, 4); + } + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typePersonaOrganizationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typePersonaOrganizationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + PersonaOrganizationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + _handleNavigationPropertyResults(this, obj, ["directReports", "DirectReports", "hierarchy", "Hierarchy", "manager", "Manager"]); + }; + PersonaOrganizationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaOrganizationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaOrganizationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaOrganizationInfo.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + PersonaOrganizationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaOrganizationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaOrganizationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaOrganizationInfo = PersonaOrganizationInfo; + var CustomizedData; + (function (CustomizedData) { + CustomizedData["email"] = "Email"; + CustomizedData["workPhone"] = "WorkPhone"; + CustomizedData["workPhone2"] = "WorkPhone2"; + CustomizedData["workFax"] = "WorkFax"; + CustomizedData["mobilePhone"] = "MobilePhone"; + CustomizedData["homePhone"] = "HomePhone"; + CustomizedData["homePhone2"] = "HomePhone2"; + CustomizedData["otherPhone"] = "OtherPhone"; + CustomizedData["sipAddress"] = "SipAddress"; + CustomizedData["profile"] = "Profile"; + CustomizedData["office"] = "Office"; + CustomizedData["company"] = "Company"; + CustomizedData["workAddress"] = "WorkAddress"; + CustomizedData["homeAddress"] = "HomeAddress"; + CustomizedData["otherAddress"] = "OtherAddress"; + CustomizedData["birthday"] = "Birthday"; + })(CustomizedData = OfficeCore.CustomizedData || (OfficeCore.CustomizedData = {})); + var _typeUnifiedGroupInfo = "UnifiedGroupInfo"; + var UnifiedGroupInfo = (function (_super) { + __extends(UnifiedGroupInfo, _super); + function UnifiedGroupInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UnifiedGroupInfo.prototype, "_className", { + get: function () { + return "UnifiedGroupInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Description", "OneDrive", "OneNote", "IsPublic", "AmIOwner", "AmIMember", "AmISubscribed", "MemberCount", "OwnerCount", "HasGuests", "Site", "Planner", "Classification", "SubscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIMember", { + get: function () { + _throwIfNotLoaded("amIMember", this._A, _typeUnifiedGroupInfo, this._isNull); + return this._A; + }, + set: function (value) { + this._A = value; + _invokeSetProperty(this, "AmIMember", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIOwner", { + get: function () { + _throwIfNotLoaded("amIOwner", this._Am, _typeUnifiedGroupInfo, this._isNull); + return this._Am; + }, + set: function (value) { + this._Am = value; + _invokeSetProperty(this, "AmIOwner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amISubscribed", { + get: function () { + _throwIfNotLoaded("amISubscribed", this._AmI, _typeUnifiedGroupInfo, this._isNull); + return this._AmI; + }, + set: function (value) { + this._AmI = value; + _invokeSetProperty(this, "AmISubscribed", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "classification", { + get: function () { + _throwIfNotLoaded("classification", this._C, _typeUnifiedGroupInfo, this._isNull); + return this._C; + }, + set: function (value) { + this._C = value; + _invokeSetProperty(this, "Classification", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "description", { + get: function () { + _throwIfNotLoaded("description", this._D, _typeUnifiedGroupInfo, this._isNull); + return this._D; + }, + set: function (value) { + this._D = value; + _invokeSetProperty(this, "Description", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "hasGuests", { + get: function () { + _throwIfNotLoaded("hasGuests", this._H, _typeUnifiedGroupInfo, this._isNull); + return this._H; + }, + set: function (value) { + this._H = value; + _invokeSetProperty(this, "HasGuests", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "isPublic", { + get: function () { + _throwIfNotLoaded("isPublic", this._I, _typeUnifiedGroupInfo, this._isNull); + return this._I; + }, + set: function (value) { + this._I = value; + _invokeSetProperty(this, "IsPublic", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "memberCount", { + get: function () { + _throwIfNotLoaded("memberCount", this._M, _typeUnifiedGroupInfo, this._isNull); + return this._M; + }, + set: function (value) { + this._M = value; + _invokeSetProperty(this, "MemberCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneDrive", { + get: function () { + _throwIfNotLoaded("oneDrive", this._O, _typeUnifiedGroupInfo, this._isNull); + return this._O; + }, + set: function (value) { + this._O = value; + _invokeSetProperty(this, "OneDrive", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneNote", { + get: function () { + _throwIfNotLoaded("oneNote", this._On, _typeUnifiedGroupInfo, this._isNull); + return this._On; + }, + set: function (value) { + this._On = value; + _invokeSetProperty(this, "OneNote", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "ownerCount", { + get: function () { + _throwIfNotLoaded("ownerCount", this._Ow, _typeUnifiedGroupInfo, this._isNull); + return this._Ow; + }, + set: function (value) { + this._Ow = value; + _invokeSetProperty(this, "OwnerCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "planner", { + get: function () { + _throwIfNotLoaded("planner", this._P, _typeUnifiedGroupInfo, this._isNull); + return this._P; + }, + set: function (value) { + this._P = value; + _invokeSetProperty(this, "Planner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "site", { + get: function () { + _throwIfNotLoaded("site", this._S, _typeUnifiedGroupInfo, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Site", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "subscriptionEnabled", { + get: function () { + _throwIfNotLoaded("subscriptionEnabled", this._Su, _typeUnifiedGroupInfo, this._isNull); + return this._Su; + }, + set: function (value) { + this._Su = value; + _invokeSetProperty(this, "SubscriptionEnabled", value, 0); + }, + enumerable: true, + configurable: true + }); + UnifiedGroupInfo.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"], [], []); + }; + UnifiedGroupInfo.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + UnifiedGroupInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["AmIMember"])) { + this._A = obj["AmIMember"]; + } + if (!_isUndefined(obj["AmIOwner"])) { + this._Am = obj["AmIOwner"]; + } + if (!_isUndefined(obj["AmISubscribed"])) { + this._AmI = obj["AmISubscribed"]; + } + if (!_isUndefined(obj["Classification"])) { + this._C = obj["Classification"]; + } + if (!_isUndefined(obj["Description"])) { + this._D = obj["Description"]; + } + if (!_isUndefined(obj["HasGuests"])) { + this._H = obj["HasGuests"]; + } + if (!_isUndefined(obj["IsPublic"])) { + this._I = obj["IsPublic"]; + } + if (!_isUndefined(obj["MemberCount"])) { + this._M = obj["MemberCount"]; + } + if (!_isUndefined(obj["OneDrive"])) { + this._O = obj["OneDrive"]; + } + if (!_isUndefined(obj["OneNote"])) { + this._On = obj["OneNote"]; + } + if (!_isUndefined(obj["OwnerCount"])) { + this._Ow = obj["OwnerCount"]; + } + if (!_isUndefined(obj["Planner"])) { + this._P = obj["Planner"]; + } + if (!_isUndefined(obj["Site"])) { + this._S = obj["Site"]; + } + if (!_isUndefined(obj["SubscriptionEnabled"])) { + this._Su = obj["SubscriptionEnabled"]; + } + }; + UnifiedGroupInfo.prototype.load = function (options) { + return _load(this, options); + }; + UnifiedGroupInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + UnifiedGroupInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UnifiedGroupInfo.prototype.toJSON = function () { + return _toJson(this, { + "amIMember": this._A, + "amIOwner": this._Am, + "amISubscribed": this._AmI, + "classification": this._C, + "description": this._D, + "hasGuests": this._H, + "isPublic": this._I, + "memberCount": this._M, + "oneDrive": this._O, + "oneNote": this._On, + "ownerCount": this._Ow, + "planner": this._P, + "site": this._S, + "subscriptionEnabled": this._Su + }, {}); + }; + UnifiedGroupInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + UnifiedGroupInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return UnifiedGroupInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.UnifiedGroupInfo = UnifiedGroupInfo; + var _typePersona = "Persona"; + var PersonaPromiseType; + (function (PersonaPromiseType) { + PersonaPromiseType[PersonaPromiseType["immediate"] = 0] = "immediate"; + PersonaPromiseType[PersonaPromiseType["load"] = 3] = "load"; + })(PersonaPromiseType = OfficeCore.PersonaPromiseType || (OfficeCore.PersonaPromiseType = {})); + var PersonaInfoAndSource = (function () { + function PersonaInfoAndSource() { + } + return PersonaInfoAndSource; + }()); + OfficeCore.PersonaInfoAndSource = PersonaInfoAndSource; + ; + var Persona = (function (_super) { + __extends(Persona, _super); + function Persona() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Persona.prototype, "_className", { + get: function () { + return "Persona"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyNames", { + get: function () { + return ["hostId", "type", "capabilities", "diagnosticId", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["HostId", "Type", "Capabilities", "DiagnosticId", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_navigationPropertyNames", { + get: function () { + return ["photo", "personaInfo", "unifiedCommunicationInfo", "organization", "unifiedGroupInfo", "actions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "actions", { + get: function () { + if (!this._A) { + this._A = _createPropertyObject(OfficeCore.PersonaActions, this, "Actions", false, 4); + } + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "organization", { + get: function () { + if (!this._O) { + this._O = _createPropertyObject(OfficeCore.PersonaOrganizationInfo, this, "Organization", false, 4); + } + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "personaInfo", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.PersonaInfo, this, "PersonaInfo", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "photo", { + get: function () { + if (!this._Ph) { + this._Ph = _createPropertyObject(OfficeCore.PersonaPhotoInfo, this, "Photo", false, 4); + } + return this._Ph; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedCommunicationInfo", { + get: function () { + if (!this._U) { + this._U = _createPropertyObject(OfficeCore.PersonaUnifiedCommunicationInfo, this, "UnifiedCommunicationInfo", false, 4); + } + return this._U; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedGroupInfo", { + get: function () { + if (!this._Un) { + this._Un = _createPropertyObject(OfficeCore.UnifiedGroupInfo, this, "UnifiedGroupInfo", false, 4); + } + return this._Un; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "capabilities", { + get: function () { + _throwIfNotLoaded("capabilities", this._C, _typePersona, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "diagnosticId", { + get: function () { + _throwIfNotLoaded("diagnosticId", this._D, _typePersona, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "hostId", { + get: function () { + _throwIfNotLoaded("hostId", this._H, _typePersona, this._isNull); + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersona, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typePersona, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Persona.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, [], ["unifiedGroupInfo"], [ + "actions", + "organization", + "personaInfo", + "photo", + "unifiedCommunicationInfo" + ]); + }; + Persona.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Persona.prototype.dispose = function () { + _invokeMethod(this, "Dispose", 0, [], 0, 0); + }; + Persona.prototype.getCustomizations = function () { + return _invokeMethod(this, "GetCustomizations", 1, [], 4, 0); + }; + Persona.prototype.getMembers = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembers", 1, [], false, false, null, 4); + }; + Persona.prototype.getMembership = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembership", 1, [], false, false, null, 4); + }; + Persona.prototype.getViewableSources = function () { + return _invokeMethod(this, "GetViewableSources", 1, [], 4, 0); + }; + Persona.prototype.reportTimeForRender = function (perfpoint, millisecUTC) { + _invokeMethod(this, "ReportTimeForRender", 0, [perfpoint, millisecUTC], 0, 0); + }; + Persona.prototype.warmup = function (dataToWarmUp) { + _invokeMethod(this, "Warmup", 0, [dataToWarmUp], 0, 0); + }; + Persona.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Capabilities"])) { + this._C = obj["Capabilities"]; + } + if (!_isUndefined(obj["DiagnosticId"])) { + this._D = obj["DiagnosticId"]; + } + if (!_isUndefined(obj["HostId"])) { + this._H = obj["HostId"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + if (!_isUndefined(obj["Type"])) { + this._T = obj["Type"]; + } + _handleNavigationPropertyResults(this, obj, ["actions", "Actions", "organization", "Organization", "personaInfo", "PersonaInfo", "photo", "Photo", "unifiedCommunicationInfo", "UnifiedCommunicationInfo", "unifiedGroupInfo", "UnifiedGroupInfo"]); + }; + Persona.prototype.load = function (options) { + return _load(this, options); + }; + Persona.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Persona.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Persona.prototype.toJSON = function () { + return _toJson(this, { + "capabilities": this._C, + "diagnosticId": this._D, + "hostId": this._H, + "instanceId": this._I, + "type": this._T + }, { + "organization": this._O, + "personaInfo": this._P, + "unifiedCommunicationInfo": this._U, + "unifiedGroupInfo": this._Un + }); + }; + Persona.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Persona.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Persona; + }(OfficeExtension.ClientObject)); + OfficeCore.Persona = Persona; + var PersonaCustom = (function () { + function PersonaCustom() { + } + PersonaCustom.prototype.performAsyncOperation = function (type, waitFor, action, check) { + var _this = this; + if (type == PersonaPromiseType.immediate) { + action(); + return; + } + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + } + else { + var persona = _this; + persona.load("hostId"); + persona.context.sync().then(function () { + var hostId = persona.hostId; + _this.getPersonaLifetime().then(function (personaLifetime) { + var eventHandler = function (args) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (args.sendingPersonaHostId == hostId) { + for (var index = 0; index < args.dataUpdated.length; ++index) { + var updated = args.dataUpdated[index]; + if (waitFor == updated) { + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + personaLifetime.onPersonaUpdated.remove(eventHandler); + persona.context.sync(); + } + resolve(isWarmedUp); + }); + return; + } + } + } + resolve(false); + }); + }; + personaLifetime.onPersonaUpdated.add(eventHandler); + persona.context.sync(); + }); + }); + } + }); + }; + PersonaCustom.prototype.getOrganizationAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var organization = persona.organization; + organization.load("*"); + persona.context.sync().then(function () { + resolve(organization); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var organization = persona.organization; + organization.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(organization.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.organization, action, check); + }); + }; + PersonaCustom.prototype.getIsPersonaInfoResolvedCheck = function () { + var persona = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var info = persona.personaInfo; + info.load("isPersonResolved"); + persona.context.sync().then(function () { + resolve(info.isPersonResolved); + }); + }); + }; + PersonaCustom.prototype.getPersonaInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var info = persona.personaInfo; + info.load(); + persona.context.sync().then(function () { + resolve(info); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getPersonaInfoWithSourceAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var result = new PersonaInfoAndSource(); + result.info = persona.personaInfo; + result.info.load(); + result.source = persona.personaInfo.sources; + result.source.load(); + persona.context.sync().then(function () { + resolve(result); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedCommunicationInfo = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var ucInfo = persona.unifiedCommunicationInfo; + ucInfo.load("*"); + persona.context.sync().then(function () { + resolve(ucInfo); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedGroupInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var group = persona.unifiedGroupInfo; + group.load("*"); + persona.context.sync().then(function () { + resolve(group); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getTypeAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + persona.load("type"); + persona.context.sync().then(function () { + resolve(OfficeCore.PersonaType[persona.type.valueOf()]); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getCustomizationsAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var customizations = persona.getCustomizations(); + persona.context.sync().then(function () { + resolve(customizations.value); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getMembersAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, rejcet) { + var persona = _this; + var action = function () { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + resolve(members); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(members.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.members, action, check); + }); + }; + PersonaCustom.prototype.getMembershipAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var membership = persona.getMembership(); + membership.load("*"); + persona.context.sync().then(function () { + resolve(membership); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve) { + var membership = persona.getMembership(); + membership.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(membership.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.membership, action, check); + }); + }; + PersonaCustom.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + persona.load("instanceId"); + persona.context.sync().then(function () { + var peopleApi = new PeopleApiContext(persona.context, persona.instanceId); + peopleApi.getPersonaLifetime().then(function (lifetime) { + resolve(lifetime); + }); + }); + }); + }; + return PersonaCustom; + }()); + OfficeCore.PersonaCustom = PersonaCustom; + OfficeExtension.Utility.applyMixin(Persona, PersonaCustom); + var _typePersonaLifetime = "PersonaLifetime"; + var PersonaLifetime = (function (_super) { + __extends(PersonaLifetime, _super); + function PersonaLifetime() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaLifetime.prototype, "_className", { + get: function () { + return "PersonaLifetime"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyNames", { + get: function () { + return ["instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersonaLifetime, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.getPersona = function (hostId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersona", 1, [hostId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgByEntryId = function (entryId, name, sip, smtp) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgByEntryId", 1, [entryId, name, sip, smtp], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgEntry = function (name, sip, smtp, entryId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgEntry", 1, [name, sip, smtp, entryId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPolicies = function () { + return _invokeMethod(this, "GetPolicies", 1, [], 4, 0); + }; + PersonaLifetime.prototype.getTextScaleFactor = function () { + return _invokeMethod(this, "GetTextScaleFactor", 1, [], 4, 0); + }; + PersonaLifetime.prototype._RegisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_RegisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._UnregisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_UnregisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + PersonaLifetime.prototype.load = function (options) { + return _load(this, options); + }; + PersonaLifetime.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaLifetime.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(PersonaLifetime.prototype, "onPersonaUpdated", { + get: function () { + var _this = this; + if (!this.m_personaUpdated) { + this.m_personaUpdated = new OfficeExtension.GenericEventHandlers(this.context, this, "PersonaUpdated", { + eventType: 3502, + registerFunc: function () { return _this._RegisterPersonaUpdatedEvent(); }, + unregisterFunc: function () { return _this._UnregisterPersonaUpdatedEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + dataUpdated: value.dataUpdated, + sendingPersonaHostId: value.sendingPersonaHostId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_personaUpdated; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.toJSON = function () { + return _toJson(this, { + "instanceId": this._I + }, {}); + }; + PersonaLifetime.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaLifetime.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaLifetime; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaLifetime = PersonaLifetime; + var _typeLokiTokenProvider = "LokiTokenProvider"; + var LokiTokenProvider = (function (_super) { + __extends(LokiTokenProvider, _super); + function LokiTokenProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProvider.prototype, "_className", { + get: function () { + return "LokiTokenProvider"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyNames", { + get: function () { + return ["emailOrUpn", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["EmailOrUpn", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "emailOrUpn", { + get: function () { + _throwIfNotLoaded("emailOrUpn", this._E, _typeLokiTokenProvider, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typeLokiTokenProvider, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.requestClientAccessToken = function () { + _invokeMethod(this, "RequestClientAccessToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestIdentityUniqueId = function () { + _invokeMethod(this, "RequestIdentityUniqueId", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestToken = function () { + _invokeMethod(this, "RequestToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_RegisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_UnregisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["EmailOrUpn"])) { + this._E = obj["EmailOrUpn"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + LokiTokenProvider.prototype.load = function (options) { + return _load(this, options); + }; + LokiTokenProvider.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LokiTokenProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LokiTokenProvider.prototype, "onClientAccessTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_clientAccessTokenAvailable) { + this.m_clientAccessTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "ClientAccessTokenAvailable", { + eventType: 3505, + registerFunc: function () { return _this._RegisterClientAccessTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterClientAccessTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + clientAccessToken: value.clientAccessToken, + isAvailable: value.isAvailable, + tokenTTLInSeconds: value.tokenTTLInSeconds + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_clientAccessTokenAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onIdentityUniqueIdAvailable", { + get: function () { + var _this = this; + if (!this.m_identityUniqueIdAvailable) { + this.m_identityUniqueIdAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityUniqueIdAvailable", { + eventType: 3504, + registerFunc: function () { return _this._RegisterIdentityUniqueIdAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterIdentityUniqueIdAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityUniqueIdAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onLokiTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_lokiTokenAvailable) { + this.m_lokiTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "LokiTokenAvailable", { + eventType: 3503, + registerFunc: function () { return _this._RegisterLokiTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterLokiTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + lokiAutoDiscoverUrl: value.lokiAutoDiscoverUrl, + lokiToken: value.lokiToken + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_lokiTokenAvailable; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.toJSON = function () { + return _toJson(this, { + "emailOrUpn": this._E, + "instanceId": this._I + }, {}); + }; + LokiTokenProvider.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LokiTokenProvider.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LokiTokenProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProvider = LokiTokenProvider; + var _typeLokiTokenProviderFactory = "LokiTokenProviderFactory"; + var LokiTokenProviderFactory = (function (_super) { + __extends(LokiTokenProviderFactory, _super); + function LokiTokenProviderFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProviderFactory.prototype, "_className", { + get: function () { + return "LokiTokenProviderFactory"; + }, + enumerable: true, + configurable: true + }); + LokiTokenProviderFactory.prototype.getLokiTokenProvider = function (accountName) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [accountName], false, false, null, 4); + }; + LokiTokenProviderFactory.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LokiTokenProviderFactory.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LokiTokenProviderFactory.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LokiTokenProviderFactory, context, "Microsoft.People.LokiTokenProviderFactory", false, 4); + }; + LokiTokenProviderFactory.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LokiTokenProviderFactory; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProviderFactory = LokiTokenProviderFactory; + var _typeServiceContext = "ServiceContext"; + var PeopleApiContext = (function () { + function PeopleApiContext(context, instanceId) { + this.context = context; + this.instanceId = instanceId; + } + Object.defineProperty(PeopleApiContext.prototype, "serviceContext", { + get: function () { + if (!this.m_serviceConext) { + this.m_serviceConext = OfficeCore.ServiceContext.newObject(this.context); + } + return this.m_serviceConext; + }, + enumerable: true, + configurable: true + }); + PeopleApiContext.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var lifetime = _this.serviceContext.getPersonaLifetime(_this.instanceId); + _this.context.sync().then(function () { + lifetime.load("instanceId"); + _this.context.sync().then(function () { + resolve(lifetime); + }); + }); + }); + }; + PeopleApiContext.prototype.getInitialPersona = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this.serviceContext.getInitialPersona(_this.instanceId); + _this.context.sync().then(function () { + resolve(persona); + }); + }); + }; + PeopleApiContext.prototype.getLokiTokenProvider = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var provider = _this.serviceContext.getLokiTokenProvider(_this.instanceId); + _this.context.sync().then(function () { + provider.load("instanceId"); + _this.context.sync().then(function () { + resolve(provider); + }); + }); + }); + }; + return PeopleApiContext; + }()); + OfficeCore.PeopleApiContext = PeopleApiContext; + var ServiceContext = (function (_super) { + __extends(ServiceContext, _super); + function ServiceContext() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceContext.prototype, "_className", { + get: function () { + return "ServiceContext"; + }, + enumerable: true, + configurable: true + }); + ServiceContext.prototype.accountEmailOrUpn = function (instanceId) { + return _invokeMethod(this, "AccountEmailOrUpn", 1, [instanceId], 4, 0); + }; + ServiceContext.prototype.dispose = function (instance) { + _invokeMethod(this, "Dispose", 0, [instance], 0, 0); + }; + ServiceContext.prototype.getInitialPersona = function (instanceId) { + return _createMethodObject(OfficeCore.Persona, this, "GetInitialPersona", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getLokiTokenProvider = function (instanceId) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaLifetime = function (instanceId) { + return _createMethodObject(OfficeCore.PersonaLifetime, this, "GetPersonaLifetime", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaPolicies = function () { + return _invokeMethod(this, "GetPersonaPolicies", 1, [], 4, 0); + }; + ServiceContext.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceContext.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceContext.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceContext, context, "Microsoft.People.ServiceContext", false, 4); + }; + ServiceContext.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceContext; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceContext = ServiceContext; + var _typeRichapiPcxFeatureChecks = "RichapiPcxFeatureChecks"; + var RichapiPcxFeatureChecks = (function (_super) { + __extends(RichapiPcxFeatureChecks, _super); + function RichapiPcxFeatureChecks() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RichapiPcxFeatureChecks.prototype, "_className", { + get: function () { + return "RichapiPcxFeatureChecks"; + }, + enumerable: true, + configurable: true + }); + RichapiPcxFeatureChecks.prototype.isAddChangePhotoLinkOnLpcPersonaImageFlightEnabled = function () { + return _invokeMethod(this, "IsAddChangePhotoLinkOnLpcPersonaImageFlightEnabled", 1, [], 4, 0); + }; + RichapiPcxFeatureChecks.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RichapiPcxFeatureChecks.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RichapiPcxFeatureChecks.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.RichapiPcxFeatureChecks, context, "Microsoft.People.RichapiPcxFeatureChecks", false, 4); + }; + RichapiPcxFeatureChecks.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RichapiPcxFeatureChecks; + }(OfficeExtension.ClientObject)); + OfficeCore.RichapiPcxFeatureChecks = RichapiPcxFeatureChecks; + var _typeTap = "Tap"; + var Tap = (function (_super) { + __extends(Tap, _super); + function Tap() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Tap.prototype, "_className", { + get: function () { + return "Tap"; + }, + enumerable: true, + configurable: true + }); + Tap.prototype.getEnterpriseUserInfo = function () { + return _invokeMethod(this, "GetEnterpriseUserInfo", 1, [], 4 | 1, 0); + }; + Tap.prototype.getMruFriendlyPath = function (documentUrl) { + return _invokeMethod(this, "GetMruFriendlyPath", 1, [documentUrl], 4 | 1, 0); + }; + Tap.prototype.launchFileUrlInOfficeApp = function (documentUrl, useUniversalAsBackup) { + return _invokeMethod(this, "LaunchFileUrlInOfficeApp", 1, [documentUrl, useUniversalAsBackup], 4 | 1, 0); + }; + Tap.prototype.performLocalSearch = function (query, numResultsRequested, supportedFileExtensions, documentUrlToExclude) { + return _invokeMethod(this, "PerformLocalSearch", 1, [query, numResultsRequested, supportedFileExtensions, documentUrlToExclude], 4 | 1, 0); + }; + Tap.prototype.readSearchCache = function (keyword, expiredHours, filterObjectType) { + return _invokeMethod(this, "ReadSearchCache", 1, [keyword, expiredHours, filterObjectType], 4 | 1, 0); + }; + Tap.prototype.writeSearchCache = function (fileContent, keyword, filterObjectType) { + return _invokeMethod(this, "WriteSearchCache", 1, [fileContent, keyword, filterObjectType], 4 | 1, 0); + }; + Tap.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Tap.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Tap.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Tap, context, "Microsoft.TapRichApi.Tap", false, 4); + }; + Tap.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Tap; + }(OfficeExtension.ClientObject)); + OfficeCore.Tap = Tap; + var ObjectType; + (function (ObjectType) { + ObjectType["unknown"] = "Unknown"; + ObjectType["chart"] = "Chart"; + ObjectType["smartArt"] = "SmartArt"; + ObjectType["table"] = "Table"; + ObjectType["image"] = "Image"; + ObjectType["slide"] = "Slide"; + ObjectType["ole"] = "OLE"; + ObjectType["text"] = "Text"; + })(ObjectType = OfficeCore.ObjectType || (OfficeCore.ObjectType = {})); + var _typeThemeService = "ThemeService"; + var ThemeService = (function (_super) { + __extends(ThemeService, _super); + function ThemeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ThemeService.prototype, "_className", { + get: function () { + return "ThemeService"; + }, + enumerable: true, + configurable: true + }); + ThemeService.prototype.registerOfficeThemeChangedEvent = function () { + _invokeMethod(this, "RegisterOfficeThemeChangedEvent", 0, [], 0, 0); + }; + ThemeService.prototype.unregisterOfficeThemeChangedEvent = function () { + _invokeMethod(this, "UnregisterOfficeThemeChangedEvent", 0, [], 0, 0); + }; + ThemeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ThemeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ThemeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ThemeService, context, "Microsoft.Theme.ThemeService", false, 4); + }; + Object.defineProperty(ThemeService.prototype, "onOfficeThemeChanged", { + get: function () { + var _this = this; + if (!this.m_officeThemeChanged) { + this.m_officeThemeChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "OfficeThemeChanged", { + eventType: 65548, + registerFunc: function () { return _this.registerOfficeThemeChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterOfficeThemeChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.ThemeService_OfficeThemeChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_officeThemeChanged; + }, + enumerable: true, + configurable: true + }); + ThemeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ThemeService; + }(OfficeExtension.ClientObject)); + OfficeCore.ThemeService = ThemeService; + (function (_CC) { + function ThemeService_OfficeThemeChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + bodyBackgroundColor: args.bodyBackgroundColor, + bodyForegroundColor: args.bodyForegroundColor, + controlBackgroundColor: args.controlBackgroundColor, + controlForegroundColor: args.controlForegroundColor + }; + return newArgs; + } + _CC.ThemeService_OfficeThemeChanged_EventArgsTransform = ThemeService_OfficeThemeChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeAppRuntimePersistenceService = "AppRuntimePersistenceService"; + var AppRuntimePersistenceService = (function (_super) { + __extends(AppRuntimePersistenceService, _super); + function AppRuntimePersistenceService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimePersistenceService.prototype, "_className", { + get: function () { + return "AppRuntimePersistenceService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimePersistenceService.prototype.getAppRuntimeStartState = function () { + return _invokeMethod(this, "GetAppRuntimeStartState", 1, [], 4, 0); + }; + AppRuntimePersistenceService.prototype.setAppRuntimeStartState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeStartState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimePersistenceService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimePersistenceService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimePersistenceService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimePersistenceService, context, "Microsoft.AppRuntime.AppRuntimePersistenceService", false, 4); + }; + AppRuntimePersistenceService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimePersistenceService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimePersistenceService = AppRuntimePersistenceService; + var _typeAppRuntimeService = "AppRuntimeService"; + var AppRuntimeService = (function (_super) { + __extends(AppRuntimeService, _super); + function AppRuntimeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimeService.prototype, "_className", { + get: function () { + return "AppRuntimeService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.getAppRuntimeState = function () { + return _invokeMethod(this, "GetAppRuntimeState", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getContentSnapshotAsBase64 = function () { + _throwIfApiNotSupported("AppRuntimeService.getContentSnapshotAsBase64", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetContentSnapshotAsBase64", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getSnapshotEnabled = function () { + _throwIfApiNotSupported("AppRuntimeService.getSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetSnapshotEnabled", 1, [], 4, 0); + }; + AppRuntimeService.prototype.setAppRuntimeState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimeService.prototype.setSnapshotEnabled = function (enabled) { + _throwIfApiNotSupported("AppRuntimeService.setSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + _invokeMethod(this, "SetSnapshotEnabled", 1, [enabled], 4, 0); + }; + AppRuntimeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimeService, context, "Microsoft.AppRuntime.AppRuntimeService", false, 4); + }; + Object.defineProperty(AppRuntimeService.prototype, "onSnapshotImageReady", { + get: function () { + _throwIfApiNotSupported("AppRuntimeService.onSnapshotImageReady", "SnapshotControl", "1.1", _hostName); + if (!this.m_snapshotImageReady) { + this.m_snapshotImageReady = new OfficeExtension.GenericEventHandlers(this.context, this, "SnapshotImageReady", { + eventType: 65547, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + imageBase64: value.imageBase64 + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_snapshotImageReady; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppRuntimeService.prototype, "onVisibilityChanged", { + get: function () { + if (!this.m_visibilityChanged) { + this.m_visibilityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "VisibilityChanged", { + eventType: 65539, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + visibility: value.visibility + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_visibilityChanged; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimeService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimeService = AppRuntimeService; + var AppRuntimeState; + (function (AppRuntimeState) { + AppRuntimeState["inactive"] = "Inactive"; + AppRuntimeState["background"] = "Background"; + AppRuntimeState["visible"] = "Visible"; + })(AppRuntimeState = OfficeCore.AppRuntimeState || (OfficeCore.AppRuntimeState = {})); + var Visibility; + (function (Visibility) { + Visibility["hidden"] = "Hidden"; + Visibility["visible"] = "Visible"; + })(Visibility = OfficeCore.Visibility || (OfficeCore.Visibility = {})); + var LicenseFeatureTier; + (function (LicenseFeatureTier) { + LicenseFeatureTier["unknown"] = "Unknown"; + LicenseFeatureTier["basic"] = "Basic"; + LicenseFeatureTier["premium"] = "Premium"; + })(LicenseFeatureTier = OfficeCore.LicenseFeatureTier || (OfficeCore.LicenseFeatureTier = {})); + var _typeLicense = "License"; + var License = (function (_super) { + __extends(License, _super); + function License() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(License.prototype, "_className", { + get: function () { + return "License"; + }, + enumerable: true, + configurable: true + }); + License.prototype.getFeatureTier = function (feature, fallbackValue) { + return _invokeMethod(this, "GetFeatureTier", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.getLicenseFeature = function (feature) { + return _createMethodObject(OfficeCore.LicenseFeature, this, "GetLicenseFeature", 1, [feature], false, false, null, 4); + }; + License.prototype.getMsaDeviceTicket = function (resource, policy, options) { + return _invokeMethod(this, "GetMsaDeviceTicket", 1, [resource, policy, options], 4 | 1, 0); + }; + License.prototype.isFeatureEnabled = function (feature, fallbackValue) { + return _invokeMethod(this, "IsFeatureEnabled", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.isFreemiumUpsellEnabled = function () { + return _invokeMethod(this, "IsFreemiumUpsellEnabled", 1, [], 4, 0); + }; + License.prototype.launchUpsellExperience = function (experienceId) { + _invokeMethod(this, "LaunchUpsellExperience", 1, [experienceId], 4, 0); + }; + License.prototype._TestFireStateChangedEvent = function (feature) { + _invokeMethod(this, "_TestFireStateChangedEvent", 0, [feature], 1, 0); + }; + License.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + License.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + License.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.License, context, "Microsoft.Office.Licensing.License", false, 4); + }; + License.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return License; + }(OfficeExtension.ClientObject)); + OfficeCore.License = License; + var _typeLicenseFeature = "LicenseFeature"; + var LicenseFeature = (function (_super) { + __extends(LicenseFeature, _super); + function LicenseFeature() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LicenseFeature.prototype, "_className", { + get: function () { + return "LicenseFeature"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeLicenseFeature, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype._RegisterStateChange = function () { + _invokeMethod(this, "_RegisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._UnregisterStateChange = function () { + _invokeMethod(this, "_UnregisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + LicenseFeature.prototype.load = function (options) { + return _load(this, options); + }; + LicenseFeature.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LicenseFeature.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + LicenseFeature.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LicenseFeature.prototype, "onStateChanged", { + get: function () { + var _this = this; + if (!this.m_stateChanged) { + this.m_stateChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "StateChanged", { + eventType: 1, + registerFunc: function () { return _this._RegisterStateChange(); }, + unregisterFunc: function () { return _this._UnregisterStateChange(); }, + getTargetIdFunc: function () { return _this.id; }, + eventArgsTransformFunc: function (value) { + var event = _CC.LicenseFeature_StateChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_stateChanged; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + LicenseFeature.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LicenseFeature.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LicenseFeature; + }(OfficeExtension.ClientObject)); + OfficeCore.LicenseFeature = LicenseFeature; + (function (_CC) { + function LicenseFeature_StateChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + feature: args.featureName, + isEnabled: args.isEnabled, + tier: args.tierName + }; + if (args.tierName) { + newArgs.tier = args.tierName == 0 ? LicenseFeatureTier.unknown : + args.tierName == 1 ? LicenseFeatureTier.basic : + args.tierName == 2 ? LicenseFeatureTier.premium : + args.tierName; + } + return newArgs; + } + _CC.LicenseFeature_StateChanged_EventArgsTransform = LicenseFeature_StateChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeMsaDeviceTicketOptions = "MsaDeviceTicketOptions"; + var MsaDeviceTicketOptions = (function (_super) { + __extends(MsaDeviceTicketOptions, _super); + function MsaDeviceTicketOptions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_className", { + get: function () { + return "MsaDeviceTicketOptions"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyNames", { + get: function () { + return ["scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "scopes", { + get: function () { + _throwIfNotLoaded("scopes", this._S, _typeMsaDeviceTicketOptions, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Scopes", value, 0); + }, + enumerable: true, + configurable: true + }); + MsaDeviceTicketOptions.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["scopes"], [], []); + }; + MsaDeviceTicketOptions.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + MsaDeviceTicketOptions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Scopes"])) { + this._S = obj["Scopes"]; + } + }; + MsaDeviceTicketOptions.prototype.load = function (options) { + return _load(this, options); + }; + MsaDeviceTicketOptions.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MsaDeviceTicketOptions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MsaDeviceTicketOptions.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.MsaDeviceTicketOptions, context, "Microsoft.Office.Licensing.MsaDeviceTicketOptions", false, 4); + }; + MsaDeviceTicketOptions.prototype.toJSON = function () { + return _toJson(this, { + "scopes": this._S + }, {}); + }; + MsaDeviceTicketOptions.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MsaDeviceTicketOptions.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MsaDeviceTicketOptions; + }(OfficeExtension.ClientObject)); + OfficeCore.MsaDeviceTicketOptions = MsaDeviceTicketOptions; + var _typeDialogPage = "DialogPage"; + var DialogPage = (function (_super) { + __extends(DialogPage, _super); + function DialogPage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DialogPage.prototype, "_className", { + get: function () { + return "DialogPage"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_Id", { + get: function () { + _throwIfNotLoaded("_Id", this.__I, _typeDialogPage, this._isNull); + return this.__I; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4, 0); + }; + DialogPage.prototype.readyToShow = function () { + _invokeMethod(this, "ReadyToShow", 1, [], 4, 0); + }; + DialogPage.prototype.registerOnShow = function () { + _invokeMethod(this, "RegisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype.sendMessageToHost = function (message) { + _invokeMethod(this, "SendMessageToHost", 1, [message], 4, 0); + }; + DialogPage.prototype.unregisterOnShow = function () { + _invokeMethod(this, "UnregisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["_Id"])) { + this.__I = obj["_Id"]; + } + }; + DialogPage.prototype.load = function (options) { + return _load(this, options); + }; + DialogPage.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_Id"])) { + this.__I = value["_Id"]; + } + }; + DialogPage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DialogPage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DialogPage, context, "Microsoft.Office.DialogPage.DialogPage", false, 4); + }; + Object.defineProperty(DialogPage.prototype, "onOnShowEvent", { + get: function () { + var _this = this; + if (!this.m_onShowEvent) { + this.m_onShowEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "OnShowEvent", { + eventType: 1, + registerFunc: function () { return _this.registerOnShow(); }, + unregisterFunc: function () { return _this.unregisterOnShow(); }, + getTargetIdFunc: function () { return _this._Id; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_onShowEvent; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return DialogPage; + }(OfficeExtension.ClientObject)); + OfficeCore.DialogPage = DialogPage; + var _typeSharedFilePicker = "SharedFilePicker"; + var SharedFilePicker = (function (_super) { + __extends(SharedFilePicker, _super); + function SharedFilePicker() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(SharedFilePicker.prototype, "_className", { + get: function () { + return "SharedFilePicker"; + }, + enumerable: true, + configurable: true + }); + SharedFilePicker.prototype.getSharedFilePickerResponse = function (pickerCustomizationJsonString) { + return _invokeMethod(this, "GetSharedFilePickerResponse", 1, [pickerCustomizationJsonString], 4, 0); + }; + SharedFilePicker.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + SharedFilePicker.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + SharedFilePicker.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.SharedFilePicker, context, "Microsoft.Office.SharedFilePicker", false, 4); + }; + SharedFilePicker.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return SharedFilePicker; + }(OfficeExtension.ClientObject)); + OfficeCore.SharedFilePicker = SharedFilePicker; + var _typeActionService = "ActionService"; + var ActionService = (function (_super) { + __extends(ActionService, _super); + function ActionService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ActionService.prototype, "_className", { + get: function () { + return "ActionService"; + }, + enumerable: true, + configurable: true + }); + ActionService.prototype.areShortcutsInUse = function (shortcuts) { + return _invokeMethod(this, "AreShortcutsInUse", 0, [shortcuts], 0, 0); + }; + ActionService.prototype.getShortcuts = function () { + return _invokeMethod(this, "GetShortcuts", 1, [], 4, 0); + }; + ActionService.prototype.replaceShortcuts = function (shortcuts) { + _invokeMethod(this, "ReplaceShortcuts", 0, [shortcuts], 0, 0); + }; + ActionService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ActionService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ActionService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ActionService, context, "Microsoft.Office.ActionService", false, 4); + }; + ActionService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ActionService; + }(OfficeExtension.ClientObject)); + OfficeCore.ActionService = ActionService; + var _typeAuth = "Auth"; + var Auth = (function (_super) { + __extends(Auth, _super); + function Auth() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Auth.prototype, "_className", { + get: function () { + return "Auth"; + }, + enumerable: true, + configurable: true + }); + Auth.prototype.getAccessTokenFirstPartyOAuth = function (appName, target) { + return _invokeMethod(this, "GetAccessTokenFirstPartyOAuth", 1, [appName, target], 4 | 1, 0); + }; + Auth.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Auth.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Auth.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Auth, context, "Microsoft.Office.Auth", false, 1 | 4); + }; + Auth.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Auth; + }(OfficeExtension.ClientObject)); + OfficeCore.Auth = Auth; + var _typeAugLoopEventService = "AugLoopEventService"; + var AugLoopEventService = (function (_super) { + __extends(AugLoopEventService, _super); + function AugLoopEventService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AugLoopEventService.prototype, "_className", { + get: function () { + return "AugLoopEventService"; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.sendMessage = function (data) { + _invokeMethod(this, "SendMessage", 1, [data], 4 | 1, 0); + }; + AugLoopEventService.prototype._RegisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_RegisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._UnregisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_UnregisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AugLoopEventService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AugLoopEventService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AugLoopEventService, context, "Microsoft.Office.AugLoopEventService", false, 1 | 4); + }; + Object.defineProperty(AugLoopEventService.prototype, "onHostMessageReceived", { + get: function () { + var _this = this; + if (!this.m_hostMessageReceived) { + this.m_hostMessageReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "HostMessageReceived", { + eventType: 65542, + registerFunc: function () { return _this._RegisterHostMessageReceivedEvent(); }, + unregisterFunc: function () { return _this._UnregisterHostMessageReceivedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + data: value.data + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostMessageReceived; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AugLoopEventService; + }(OfficeExtension.ClientObject)); + OfficeCore.AugLoopEventService = AugLoopEventService; + var _typeUndoService = "UndoService"; + var UndoService = (function (_super) { + __extends(UndoService, _super); + function UndoService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UndoService.prototype, "_className", { + get: function () { + return "UndoService"; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.endCopilotOperation = function (batchId) { + _invokeMethod(this, "EndCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.startCopilotOperation = function (batchId) { + return _invokeMethod(this, "StartCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.undo = function () { + return _invokeMethod(this, "Undo", 0, [], 1, 0); + }; + UndoService.prototype._RegisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_RegisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._UnregisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_UnregisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UndoService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UndoService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UndoService, context, "Microsoft.Office.UndoService", false, 1 | 4); + }; + Object.defineProperty(UndoService.prototype, "onCopilotOperationStarted", { + get: function () { + if (!this.m_copilotOperationStarted) { + this.m_copilotOperationStarted = new OfficeExtension.GenericEventHandlers(this.context, this, "CopilotOperationStarted", { + eventType: 65544, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + batchId: value.batchId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_copilotOperationStarted; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UndoService.prototype, "onUndoStackChanged", { + get: function () { + var _this = this; + if (!this.m_undoStackChanged) { + this.m_undoStackChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "UndoStackChanged", { + eventType: 65543, + registerFunc: function () { return _this._RegisterUndoStackChangedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUndoStackChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_undoStackChanged; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UndoService; + }(OfficeExtension.ClientObject)); + OfficeCore.UndoService = UndoService; + var TriStateOption; + (function (TriStateOption) { + TriStateOption["notSet"] = "NotSet"; + TriStateOption["true"] = "True"; + TriStateOption["false"] = "False"; + })(TriStateOption = OfficeCore.TriStateOption || (OfficeCore.TriStateOption = {})); + var UserFeedbackType; + (function (UserFeedbackType) { + UserFeedbackType["like"] = "Like"; + UserFeedbackType["dislike"] = "Dislike"; + UserFeedbackType["idea"] = "Idea"; + UserFeedbackType["unclassified"] = "Unclassified"; + })(UserFeedbackType = OfficeCore.UserFeedbackType || (OfficeCore.UserFeedbackType = {})); + var UserFeedbackUIType; + (function (UserFeedbackUIType) { + UserFeedbackUIType["modalDialog"] = "ModalDialog"; + UserFeedbackUIType["taskpane"] = "Taskpane"; + })(UserFeedbackUIType = OfficeCore.UserFeedbackUIType || (OfficeCore.UserFeedbackUIType = {})); + var _typeUserFeedbackService = "UserFeedbackService"; + var UserFeedbackService = (function (_super) { + __extends(UserFeedbackService, _super); + function UserFeedbackService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UserFeedbackService.prototype, "_className", { + get: function () { + return "UserFeedbackService"; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.collectUserFeedback = function (feedbacktype, UIType, featureArea, options) { + _invokeMethod(this, "CollectUserFeedback", 1, [feedbacktype, UIType, featureArea, options], 4 | 1, 0); + }; + UserFeedbackService.prototype._RegisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_RegisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._UnregisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_UnregisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UserFeedbackService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UserFeedbackService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UserFeedbackService, context, "Microsoft.Office.UserFeedbackService", false, 1 | 4); + }; + Object.defineProperty(UserFeedbackService.prototype, "onUserFeedbackUIDismissed", { + get: function () { + var _this = this; + if (!this.m_userFeedbackUIDismissed) { + this.m_userFeedbackUIDismissed = new OfficeExtension.GenericEventHandlers(this.context, this, "UserFeedbackUIDismissed", { + eventType: 65546, + registerFunc: function () { return _this._RegisterUserFeedbackUIDismissedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUserFeedbackUIDismissedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + isFeedbackSent: value.isFeedbackSent + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_userFeedbackUIDismissed; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UserFeedbackService; + }(OfficeExtension.ClientObject)); + OfficeCore.UserFeedbackService = UserFeedbackService; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["apiNotAvailable"] = "ApiNotAvailable"; + ErrorCodes["clientError"] = "ClientError"; + ErrorCodes["controlIdNotFound"] = "ControlIdNotFound"; + ErrorCodes["entryIdRequired"] = "EntryIdRequired"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["hostRestartNeeded"] = "HostRestartNeeded"; + ErrorCodes["instanceNotFound"] = "InstanceNotFound"; + ErrorCodes["interactiveFlowAborted"] = "InteractiveFlowAborted"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidGrant"] = "InvalidGrant"; + ErrorCodes["invalidResourceUrl"] = "InvalidResourceUrl"; + ErrorCodes["invalidRibbonDefinition"] = "InvalidRibbonDefinition"; + ErrorCodes["objectNotFound"] = "ObjectNotFound"; + ErrorCodes["resourceNotSupported"] = "ResourceNotSupported"; + ErrorCodes["serverError"] = "ServerError"; + ErrorCodes["serviceUrlNotFound"] = "ServiceUrlNotFound"; + ErrorCodes["sharedRuntimeNotAvailable"] = "SharedRuntimeNotAvailable"; + ErrorCodes["ticketInvalidParams"] = "TicketInvalidParams"; + ErrorCodes["ticketNetworkError"] = "TicketNetworkError"; + ErrorCodes["ticketUnauthorized"] = "TicketUnauthorized"; + ErrorCodes["ticketUninitialized"] = "TicketUninitialized"; + ErrorCodes["ticketUnknownError"] = "TicketUnknownError"; + ErrorCodes["unexpectedError"] = "UnexpectedError"; + ErrorCodes["unsupportedUserIdentity"] = "UnsupportedUserIdentity"; + ErrorCodes["userNotSignedIn"] = "UserNotSignedIn"; + })(ErrorCodes = OfficeCore.ErrorCodes || (OfficeCore.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = OfficeCore.Interfaces || (OfficeCore.Interfaces = {})); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var VisibilityMode; + (function (VisibilityMode) { + VisibilityMode["hidden"] = "Hidden"; + VisibilityMode["taskpane"] = "Taskpane"; + })(VisibilityMode = Office.VisibilityMode || (Office.VisibilityMode = {})); + var StartupBehavior; + (function (StartupBehavior) { + StartupBehavior["none"] = "None"; + StartupBehavior["load"] = "Load"; + })(StartupBehavior = Office.StartupBehavior || (Office.StartupBehavior = {})); + var addin; + (function (addin) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function setStartupBehavior(behavior) { + return __awaiter(this, void 0, void 0, function () { + var state, context, appRuntimePersistenceService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (behavior !== StartupBehavior.load && behavior !== StartupBehavior.none) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.invalidArgument, null, null); + } + state = (behavior == StartupBehavior.load ? OfficeCore.AppRuntimeState.background : OfficeCore.AppRuntimeState.inactive); + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + appRuntimePersistenceService.setAppRuntimeStartState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + addin.setStartupBehavior = setStartupBehavior; + function getStartupBehavior() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimePersistenceService, stateResult, state, ret; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + stateResult = appRuntimePersistenceService.getAppRuntimeStartState(); + return [4, context.sync()]; + case 1: + _a.sent(); + state = stateResult.value; + ret = (state == OfficeCore.AppRuntimeState.inactive ? StartupBehavior.none : StartupBehavior.load); + return [2, ret]; + } + }); + }); + } + addin.getStartupBehavior = getStartupBehavior; + function setSnapshotEnabled(enabled) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setSnapshotEnabled(enabled); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, Promise.resolve()]; + } + }); + }); + } + addin.setSnapshotEnabled = setSnapshotEnabled; + function getSnapshotEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + result = appRuntimeService.getSnapshotEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + addin.getSnapshotEnabled = getSnapshotEnabled; + function getContentSnapshotAsBase64() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2, new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var context = _createRequestContext(true); + var appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + var timeoutId = setTimeout(function () { + handler.remove(); + context.sync()["catch"](function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "timeout", "getContentSnapshotAsBase64")); + }, 7000); + var handler = appRuntimeService.onSnapshotImageReady.add(function (arg) { + clearTimeout(timeoutId); + handler.remove(); + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + context.sync()["catch"](function () { }); + resolve(arg.imageBase64); + } + else { + context.sync()["catch"](function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "execution failed", "getContentSnapshotAsBase64")); + } + return null; + }); + context.sync().then(function () { + var apiResult = appRuntimeService.getContentSnapshotAsBase64(); + return context.sync().then(function () { return null; }); + })["catch"](function (e) { reject(e); }); + })]; + }); + }); + } + addin.getContentSnapshotAsBase64 = getContentSnapshotAsBase64; + function _setState(state) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setAppRuntimeState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + function _getState() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, stateResult; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + stateResult = appRuntimeService.getAppRuntimeState(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, stateResult.value]; + } + }); + }); + } + addin._getState = _getState; + function showAsTaskpane() { + return _setState(OfficeCore.AppRuntimeState.visible); + } + addin.showAsTaskpane = showAsTaskpane; + function hide() { + return _setState(OfficeCore.AppRuntimeState.background); + } + addin.hide = hide; + var _appRuntimeEvent; + function _getAppRuntimeEventService() { + if (!_appRuntimeEvent) { + var context = _createRequestContext(true); + _appRuntimeEvent = OfficeCore.AppRuntimeService.newObject(context); + } + return _appRuntimeEvent; + } + function _convertVisibilityToVisibilityMode(visibility) { + if (visibility === OfficeCore.Visibility.visible) { + return VisibilityMode.taskpane; + } + return VisibilityMode.hidden; + } + function onVisibilityModeChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var eventService, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + eventService = _getAppRuntimeEventService(); + registrationToken = eventService.onVisibilityChanged.add(function (args) { + if (listener) { + var msg = { + visibilityMode: _convertVisibilityToVisibilityMode(args.visibility) + }; + listener(msg); + } + return null; + }); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + addin.onVisibilityModeChanged = onVisibilityModeChanged; + var beforeDocumentCloseNotification; + (function (beforeDocumentCloseNotification) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function enable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.enable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.enable = enable; + function disable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.disable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.disable = disable; + function onCloseActionCancelled(listener) { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + registrationToken = beforeCloseNotification.onBeforeCloseNotificationCancelled.add(function (args) { + if (listener) { + listener(); + } + return null; + }); + return [4, context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + beforeDocumentCloseNotification.onCloseActionCancelled = onCloseActionCancelled; + })(beforeDocumentCloseNotification = addin.beforeDocumentCloseNotification || (addin.beforeDocumentCloseNotification = {})); + })(addin = Office.addin || (Office.addin = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ExtensionComponentType; + (function (ExtensionComponentType) { + ExtensionComponentType["taskpane"] = "Taskpane"; + })(ExtensionComponentType || (ExtensionComponentType = {})); + var extensionLifeCycle; + (function (extensionLifeCycle) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + return context; + } + function launchTaskpane(launchOptions) { + return __awaiter(this, void 0, void 0, function () { + var context, extensionLifecycle, settings; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + extensionLifecycle = OfficeCore.ExtensionLifeCycle.newObject(context); + settings = launchOptions.settings; + if (settings != undefined) { + launchOptions.settings = OSF.OUtil.serializeSettings(settings); + } + extensionLifecycle.launchExtensionComponent("", ExtensionComponentType.taskpane, launchOptions); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + extensionLifeCycle.launchTaskpane = launchTaskpane; + })(extensionLifeCycle = Office.extensionLifeCycle || (Office.extensionLifeCycle = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ribbon; + (function (ribbon_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function requestUpdate(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + function processControls(parent) { + if (parent.controls !== undefined + && parent.controls.length !== undefined + && !!parent.controls.length) { + parent.controls + .filter(function (control) { return !(!control.id); }) + .forEach(function (control) { + var ribbonControl = ribbon.getButton(control.id); + if (control.enabled !== undefined && control.enabled !== null) { + ribbonControl.enabled = control.enabled; + } + }); + } + } + input.tabs + .filter(function (tab) { return !(!tab.id); }) + .forEach(function (tab) { + var ribbonTab = ribbon.getTab(tab.id); + if (tab.visible !== undefined && tab.visible !== null) { + ribbonTab.setVisibility(tab.visible); + } + if (!!tab.groups && !!tab.groups.length) { + tab.groups + .filter(function (group) { return !(!group.id); }) + .forEach(function (group) { + processControls(group); + }); + } + else { + processControls(tab); + } + }); + return requestContext.sync(); + } + ribbon_1.requestUpdate = requestUpdate; + function requestCreateControls(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + var delay = function (milliseconds) { + return new Promise(function (resolve, _) { return setTimeout(function () { return resolve(); }, milliseconds); }); + }; + ribbon.executeRequestCreate(JSON.stringify(input)); + return delay(250) + .then(function () { return requestContext.sync(); }); + } + ribbon_1.requestCreateControls = requestCreateControls; + })(ribbon = Office.ribbon || (Office.ribbon = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var AddinInternalServiceErrorCodes; + (function (AddinInternalServiceErrorCodes) { + AddinInternalServiceErrorCodes["generalException"] = "GeneralException"; + })(AddinInternalServiceErrorCodes || (AddinInternalServiceErrorCodes = {})); + var _libraryMetadataInternalServiceApi = { "version": "1.0.0", + "name": "OfficeCore", + "defaultApiSetName": "OfficeSharedApi", + "hostName": "Office", + "apiSets": [], + "strings": ["AddinInternalService"], + "enumTypes": [], + "clientObjectTypes": [[1, + 0, + 0, + 0, + [["notifyActionHandlerReady", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + 0, + "Microsoft.InternalService.AddinInternalService", + 4]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataInternalServiceApi, targetNamespaceObject: OfficeCore }); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var actionProxy; + (function (actionProxy) { + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _association; + var ActionMessageCategory = 2; + var ActionDispatchMessageType = 1000; + function init() { + if (typeof (OSF) !== "undefined" && OSF.DDA && OSF.DDA.RichApi && OSF.DDA.RichApi.richApiMessageManager) { + var context = new OfficeExtension.ClientRequestContext(); + return context.eventRegistration.register(5, "", _handleMessage); + } + } + function setActionAssociation(association) { + _association = association; + } + function _getFunction(functionName) { + if (functionName) { + var nameUpperCase = functionName.toUpperCase(); + var call = _association.mappings[nameUpperCase]; + if (!_isNullOrUndefined(call) && typeof (call) === "function") { + return call; + } + } + throw OfficeExtension.Utility.createRuntimeError("invalidOperation", "sourceData", "ActionProxy._getFunction"); + } + function _handleMessage(args) { + try { + OfficeExtension.Utility.log('ActionProxy._handleMessage'); + OfficeExtension.Utility.checkArgumentNull(args, "args"); + var entryArray = args.entries; + var invocationArray = []; + for (var i = 0; i < entryArray.length; i++) { + if (entryArray[i].messageCategory !== ActionMessageCategory) { + continue; + } + if (typeof (entryArray[i].message) === 'string') { + entryArray[i].message = JSON.parse(entryArray[i].message); + } + if (entryArray[i].messageType === ActionDispatchMessageType) { + var actionsArgs = null; + var actionName = entryArray[i].message[0]; + var call = _getFunction(actionName); + if (entryArray[i].message.length >= 2) { + var actionArgsJson = entryArray[i].message[1]; + if (actionArgsJson) { + if (_isJsonObjectString(actionArgsJson)) { + actionsArgs = JSON.parse(actionArgsJson); + } + else { + actionsArgs = actionArgsJson; + } + } + } + if (typeof (OSF) !== 'undefined' && + OSF.AppTelemetry && + OSF.AppTelemetry.CallOnAppActivatedIfPending) { + OSF.AppTelemetry.CallOnAppActivatedIfPending(); + } + call.apply(null, [actionsArgs]); + } + else { + OfficeExtension.Utility.log('ActionProxy._handleMessage unknown message type ' + entryArray[i].messageType); + } + } + } + catch (ex) { + _tryLog(ex); + throw ex; + } + return OfficeExtension.Utility._createPromiseFromResult(null); + } + function _isJsonObjectString(value) { + if (typeof value === 'string' && value[0] === '{') { + return true; + } + return false; + } + function toLogMessage(ex) { + var ret = 'Unknown Error'; + if (ex) { + try { + if (ex.toString) { + ret = ex.toString(); + } + ret = ret + ' ' + JSON.stringify(ex); + } + catch (otherEx) { + ret = 'Unexpected Error'; + } + } + return ret; + } + function _tryLog(ex) { + var message = toLogMessage(ex); + OfficeExtension.Utility.log(message); + } + function notifyActionHandlerReady() { + var context = new OfficeExtension.ClientRequestContext(); + var addinInternalService = OfficeCore.AddinInternalService.newObject(context); + context._customData = 'WacPartition'; + addinInternalService.notifyActionHandlerReady(); + return context.sync(); + } + function handlerOnReadyInternal() { + try { + Microsoft.Office.WebExtension.onReadyInternal() + .then(function () { + return init(); + }) + .then(function () { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.isDialog === true || (hostInfo.hostPlatform === "web" && hostInfo.hostType !== "word" && hostInfo.hostType !== "excel")) { + return; + } + else { + return notifyActionHandlerReady(); + } + }); + } + catch (ex) { + } + } + function initFromHostBridge(hostBridge) { + hostBridge.addHostMessageHandler(function (bridgeMessage) { + if (bridgeMessage.type === 3) { + _handleMessage(bridgeMessage.message); + } + }); + } + function initOnce() { + OfficeExtension.Utility.log('ActionProxy.initOnce'); + if (typeof (Office.actions) != 'undefined') { + setActionAssociation(Office.actions._association); + } + if (typeof (document) !== 'undefined') { + if (document.readyState && document.readyState !== 'loading') { + OfficeExtension.Utility.log('ActionProxy.initOnce: document.readyState is not loading state'); + handlerOnReadyInternal(); + } + else if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", function () { + OfficeExtension.Utility.log('ActionProxy.initOnce: DOMContentLoaded event triggered'); + handlerOnReadyInternal(); + }); + } + } + OfficeExtension.HostBridge.onInited(function (hostBridge) { + initFromHostBridge(hostBridge); + }); + } + initOnce(); + })(actionProxy || (actionProxy = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var actions; + (function (actions) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function areShortcutsInUse(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, inUseArray, inUseInfoArray, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + inUseArray = actionService.areShortcutsInUse(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + inUseInfoArray = []; + for (i = 0; i < shortcuts.length; i++) { + inUseInfoArray.push({ + shortcut: shortcuts[i], + inUse: inUseArray.value[i] + }); + } + return [2, inUseInfoArray]; + } + }); + }); + } + actions.areShortcutsInUse = areShortcutsInUse; + function replaceShortcuts(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + actionService.replaceShortcuts(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + actions.replaceShortcuts = replaceShortcuts; + function getShortcuts() { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, shortcuts; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + shortcuts = actionService.getShortcuts(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, shortcuts.value]; + } + }); + }); + } + actions.getShortcuts = getShortcuts; + })(actions = Office.actions || (Office.actions = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var AugLoop; + (function (AugLoop) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function SendMessage(message) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + augLoopEventService.sendMessage(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + AugLoop.SendMessage = SendMessage; + function onHostMessageReceived(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService, callback, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + callback = function (args) { + if (listener) { + var message = args.data; + listener(message); + } + return null; + }; + augLoopEventService.onHostMessageReceived.add(callback); + return [4, augLoopEventService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + augLoopEventService.onHostMessageReceived.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + AugLoop.onHostMessageReceived = onHostMessageReceived; + })(AugLoop = OfficeFirstParty.AugLoop || (OfficeFirstParty.AugLoop = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var Undo; + (function (Undo) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + context._customData = 'SkipUndoRecording'; + return context; + } + var resolver; + function onCopilotOperationStartedEventReceived() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (typeof resolver !== "undefined") { + resolver(); + resolver = undefined; + } + return [2]; + }); + }); + } + function undo() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + result = undoService.undo(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + Undo.undo = undo; + function onUndoStackChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onUndoStackChanged.add(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + undoService.onUndoStackChanged.remove(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + Undo.onUndoStackChanged = onUndoStackChanged; + function startCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var waitForEventPromise, context, undoService, shouldWaitForEvent, e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (typeof resolver !== "undefined") { + throw new Error("startCopilotOperation is already inprogress"); + } + waitForEventPromise = new Promise(function (resolve) { resolver = resolve; }); + _a.label = 1; + case 1: + _a.trys.push([1, 4, , 5]); + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onCopilotOperationStarted.add(onCopilotOperationStartedEventReceived); + return [4, context.sync()]; + case 2: + _a.sent(); + shouldWaitForEvent = undoService.startCopilotOperation(""); + return [4, context.sync()]; + case 3: + _a.sent(); + if (shouldWaitForEvent.value) { + return [2, waitForEventPromise]; + } + else { + resolver = undefined; + } + return [3, 5]; + case 4: + e_1 = _a.sent(); + resolver = undefined; + throw e_1; + case 5: return [2]; + } + }); + }); + } + Undo.startCopilotOperation = startCopilotOperation; + function endCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.endCopilotOperation(""); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + Undo.endCopilotOperation = endCopilotOperation; + })(Undo = OfficeFirstParty.Undo || (OfficeFirstParty.Undo = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var Office; +(function (Office) { + var dialogPage; + (function (dialogPage_1) { + function close() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.close(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.close = close; + function readyToShow() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.readyToShow(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.readyToShow = readyToShow; + function onShow(callback) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.onOnShowEvent.add(callback); + removeListener = function () { + dialogPage.onOnShowEvent.remove(callback); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + dialogPage_1.onShow = onShow; + function sendMessageToHost(message) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.sendMessageToHost(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.sendMessageToHost = sendMessageToHost; + })(dialogPage = Office.dialogPage || (Office.dialogPage = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var UserFeedback; + (function (UserFeedback) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function CollectUserFeedback(feedbacktype, uiType, featureArea, options) { + return __awaiter(this, void 0, void 0, function () { + var context, userFeedbackService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.collectUserFeedback(feedbacktype, uiType, featureArea, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + UserFeedback.CollectUserFeedback = CollectUserFeedback; + function onUserFeedbackUIDismissed(listener) { + return __awaiter(this, void 0, void 0, function () { + var callback, context, userFeedbackService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + callback = function (args) { + if (listener) { + var isFeedbackSent = args.isFeedbackSent; + listener(isFeedbackSent); + } + return null; + }; + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.onUserFeedbackUIDismissed.add(callback); + return [4, userFeedbackService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + userFeedbackService.onUserFeedbackUIDismissed.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + UserFeedback.onUserFeedbackUIDismissed = onUserFeedbackUIDismissed; + })(UserFeedback = OfficeFirstParty.UserFeedback || (OfficeFirstParty.UserFeedback = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var _BeginExcel = "_BeginExcel"; +var Excel; +(function (Excel) { + var Base64EncodingType; + (function (Base64EncodingType) { + Base64EncodingType["JPG"] = "JPG"; + Base64EncodingType["PNG"] = "PNG"; + })(Base64EncodingType = Excel.Base64EncodingType || (Excel.Base64EncodingType = {})); + var BlockedErrorCellValueSubType; + (function (BlockedErrorCellValueSubType) { + BlockedErrorCellValueSubType["unknown"] = "Unknown"; + BlockedErrorCellValueSubType["dataTypeRestrictedDomain"] = "DataTypeRestrictedDomain"; + BlockedErrorCellValueSubType["dataTypePrivacySetting"] = "DataTypePrivacySetting"; + BlockedErrorCellValueSubType["dataTypeUnsupportedApp"] = "DataTypeUnsupportedApp"; + BlockedErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BlockedErrorCellValueSubType["richDataLinkDisabled"] = "RichDataLinkDisabled"; + BlockedErrorCellValueSubType["signInError"] = "SignInError"; + BlockedErrorCellValueSubType["noLicense"] = "NoLicense"; + })(BlockedErrorCellValueSubType = Excel.BlockedErrorCellValueSubType || (Excel.BlockedErrorCellValueSubType = {})); + var BusyErrorCellValueSubType; + (function (BusyErrorCellValueSubType) { + BusyErrorCellValueSubType["unknown"] = "Unknown"; + BusyErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BusyErrorCellValueSubType["loadingImage"] = "LoadingImage"; + })(BusyErrorCellValueSubType = Excel.BusyErrorCellValueSubType || (Excel.BusyErrorCellValueSubType = {})); + var CalcErrorCellValueSubType; + (function (CalcErrorCellValueSubType) { + CalcErrorCellValueSubType["unknown"] = "Unknown"; + CalcErrorCellValueSubType["arrayOfArrays"] = "ArrayOfArrays"; + CalcErrorCellValueSubType["arrayOfRanges"] = "ArrayOfRanges"; + CalcErrorCellValueSubType["emptyArray"] = "EmptyArray"; + CalcErrorCellValueSubType["unsupportedLifting"] = "UnsupportedLifting"; + CalcErrorCellValueSubType["dataTableReferencedPendingFormula"] = "DataTableReferencedPendingFormula"; + CalcErrorCellValueSubType["tooManyCells"] = "TooManyCells"; + CalcErrorCellValueSubType["lambdaInCell"] = "LambdaInCell"; + CalcErrorCellValueSubType["tooDeeplyNested"] = "TooDeeplyNested"; + CalcErrorCellValueSubType["textOverflow"] = "TextOverflow"; + })(CalcErrorCellValueSubType = Excel.CalcErrorCellValueSubType || (Excel.CalcErrorCellValueSubType = {})); + var EntityCardLayoutType; + (function (EntityCardLayoutType) { + EntityCardLayoutType["entity"] = "Entity"; + EntityCardLayoutType["array"] = "Array"; + })(EntityCardLayoutType = Excel.EntityCardLayoutType || (Excel.EntityCardLayoutType = {})); + var EntityCompactLayoutIcons; + (function (EntityCompactLayoutIcons) { + EntityCompactLayoutIcons["generic"] = "Generic"; + EntityCompactLayoutIcons["accessibility"] = "Accessibility"; + EntityCompactLayoutIcons["airplane"] = "Airplane"; + EntityCompactLayoutIcons["airplaneTakeOff"] = "AirplaneTakeOff"; + EntityCompactLayoutIcons["album"] = "Album"; + EntityCompactLayoutIcons["alert"] = "Alert"; + EntityCompactLayoutIcons["alertUrgent"] = "AlertUrgent"; + EntityCompactLayoutIcons["animal"] = "Animal"; + EntityCompactLayoutIcons["animalCat"] = "AnimalCat"; + EntityCompactLayoutIcons["animalDog"] = "AnimalDog"; + EntityCompactLayoutIcons["animalRabbit"] = "AnimalRabbit"; + EntityCompactLayoutIcons["animalTurtle"] = "AnimalTurtle"; + EntityCompactLayoutIcons["appFolder"] = "AppFolder"; + EntityCompactLayoutIcons["appGeneric"] = "AppGeneric"; + EntityCompactLayoutIcons["apple"] = "Apple"; + EntityCompactLayoutIcons["approvalsApp"] = "ApprovalsApp"; + EntityCompactLayoutIcons["archive"] = "Archive"; + EntityCompactLayoutIcons["archiveMultiple"] = "ArchiveMultiple"; + EntityCompactLayoutIcons["arrowTrendingLines"] = "ArrowTrendingLines"; + EntityCompactLayoutIcons["art"] = "Art"; + EntityCompactLayoutIcons["atom"] = "Atom"; + EntityCompactLayoutIcons["attach"] = "Attach"; + EntityCompactLayoutIcons["automobile"] = "Automobile"; + EntityCompactLayoutIcons["autosum"] = "Autosum"; + EntityCompactLayoutIcons["backpack"] = "Backpack"; + EntityCompactLayoutIcons["badge"] = "Badge"; + EntityCompactLayoutIcons["balloon"] = "Balloon"; + EntityCompactLayoutIcons["bank"] = "Bank"; + EntityCompactLayoutIcons["barcodeScanner"] = "BarcodeScanner"; + EntityCompactLayoutIcons["basketball"] = "Basketball"; + EntityCompactLayoutIcons["battery0"] = "Battery0"; + EntityCompactLayoutIcons["battery10"] = "Battery10"; + EntityCompactLayoutIcons["beach"] = "Beach"; + EntityCompactLayoutIcons["beaker"] = "Beaker"; + EntityCompactLayoutIcons["bed"] = "Bed"; + EntityCompactLayoutIcons["binFull"] = "BinFull"; + EntityCompactLayoutIcons["bird"] = "Bird"; + EntityCompactLayoutIcons["bluetooth"] = "Bluetooth"; + EntityCompactLayoutIcons["board"] = "Board"; + EntityCompactLayoutIcons["boardGames"] = "BoardGames"; + EntityCompactLayoutIcons["book"] = "Book"; + EntityCompactLayoutIcons["bookmark"] = "Bookmark"; + EntityCompactLayoutIcons["bookmarkMultiple"] = "BookmarkMultiple"; + EntityCompactLayoutIcons["bot"] = "Bot"; + EntityCompactLayoutIcons["bowlChopsticks"] = "BowlChopsticks"; + EntityCompactLayoutIcons["box"] = "Box"; + EntityCompactLayoutIcons["boxMultiple"] = "BoxMultiple"; + EntityCompactLayoutIcons["brainCircuit"] = "BrainCircuit"; + EntityCompactLayoutIcons["branch"] = "Branch"; + EntityCompactLayoutIcons["branchFork"] = "BranchFork"; + EntityCompactLayoutIcons["branchRequest"] = "BranchRequest"; + EntityCompactLayoutIcons["bridge"] = "Bridge"; + EntityCompactLayoutIcons["briefcase"] = "Briefcase"; + EntityCompactLayoutIcons["briefcaseMedical"] = "BriefcaseMedical"; + EntityCompactLayoutIcons["broadActivityFeed"] = "BroadActivityFeed"; + EntityCompactLayoutIcons["broom"] = "Broom"; + EntityCompactLayoutIcons["bug"] = "Bug"; + EntityCompactLayoutIcons["building"] = "Building"; + EntityCompactLayoutIcons["buildingBank"] = "BuildingBank"; + EntityCompactLayoutIcons["buildingFactory"] = "BuildingFactory"; + EntityCompactLayoutIcons["buildingGovernment"] = "BuildingGovernment"; + EntityCompactLayoutIcons["buildingHome"] = "BuildingHome"; + EntityCompactLayoutIcons["buildingLighthouse"] = "BuildingLighthouse"; + EntityCompactLayoutIcons["buildingMultiple"] = "BuildingMultiple"; + EntityCompactLayoutIcons["buildingRetail"] = "BuildingRetail"; + EntityCompactLayoutIcons["buildingRetailMore"] = "BuildingRetailMore"; + EntityCompactLayoutIcons["buildingRetailToolbox"] = "BuildingRetailToolbox"; + EntityCompactLayoutIcons["buildingShop"] = "BuildingShop"; + EntityCompactLayoutIcons["buildingSkyscraper"] = "BuildingSkyscraper"; + EntityCompactLayoutIcons["calculator"] = "Calculator"; + EntityCompactLayoutIcons["calendarLtr"] = "CalendarLtr"; + EntityCompactLayoutIcons["calendarRtl"] = "CalendarRtl"; + EntityCompactLayoutIcons["call"] = "Call"; + EntityCompactLayoutIcons["calligraphyPen"] = "CalligraphyPen"; + EntityCompactLayoutIcons["camera"] = "Camera"; + EntityCompactLayoutIcons["cameraDome"] = "CameraDome"; + EntityCompactLayoutIcons["car"] = "Car"; + EntityCompactLayoutIcons["cart"] = "Cart"; + EntityCompactLayoutIcons["cat"] = "Cat"; + EntityCompactLayoutIcons["certificate"] = "Certificate"; + EntityCompactLayoutIcons["chartMultiple"] = "ChartMultiple"; + EntityCompactLayoutIcons["chat"] = "Chat"; + EntityCompactLayoutIcons["chatMultiple"] = "ChatMultiple"; + EntityCompactLayoutIcons["chatVideo"] = "ChatVideo"; + EntityCompactLayoutIcons["check"] = "Check"; + EntityCompactLayoutIcons["checkboxChecked"] = "CheckboxChecked"; + EntityCompactLayoutIcons["checkboxUnchecked"] = "CheckboxUnchecked"; + EntityCompactLayoutIcons["checkmark"] = "Checkmark"; + EntityCompactLayoutIcons["chess"] = "Chess"; + EntityCompactLayoutIcons["city"] = "City"; + EntityCompactLayoutIcons["class"] = "Class"; + EntityCompactLayoutIcons["classification"] = "Classification"; + EntityCompactLayoutIcons["clipboard"] = "Clipboard"; + EntityCompactLayoutIcons["clipboardDataBar"] = "ClipboardDataBar"; + EntityCompactLayoutIcons["clipboardPulse"] = "ClipboardPulse"; + EntityCompactLayoutIcons["clipboardTask"] = "ClipboardTask"; + EntityCompactLayoutIcons["clock"] = "Clock"; + EntityCompactLayoutIcons["clockAlarm"] = "ClockAlarm"; + EntityCompactLayoutIcons["cloud"] = "Cloud"; + EntityCompactLayoutIcons["cloudWords"] = "CloudWords"; + EntityCompactLayoutIcons["code"] = "Code"; + EntityCompactLayoutIcons["collections"] = "Collections"; + EntityCompactLayoutIcons["comment"] = "Comment"; + EntityCompactLayoutIcons["commentMultiple"] = "CommentMultiple"; + EntityCompactLayoutIcons["communication"] = "Communication"; + EntityCompactLayoutIcons["compassNorthwest"] = "CompassNorthwest"; + EntityCompactLayoutIcons["conferenceRoom"] = "ConferenceRoom"; + EntityCompactLayoutIcons["connector"] = "Connector"; + EntityCompactLayoutIcons["constellation"] = "Constellation"; + EntityCompactLayoutIcons["contactCard"] = "ContactCard"; + EntityCompactLayoutIcons["cookies"] = "Cookies"; + EntityCompactLayoutIcons["couch"] = "Couch"; + EntityCompactLayoutIcons["creditCardPerson"] = "CreditCardPerson"; + EntityCompactLayoutIcons["creditCardToolbox"] = "CreditCardToolbox"; + EntityCompactLayoutIcons["cube"] = "Cube"; + EntityCompactLayoutIcons["cubeMultiple"] = "CubeMultiple"; + EntityCompactLayoutIcons["cubeTree"] = "CubeTree"; + EntityCompactLayoutIcons["currencyDollarEuro"] = "CurrencyDollarEuro"; + EntityCompactLayoutIcons["currencyDollarRupee"] = "CurrencyDollarRupee"; + EntityCompactLayoutIcons["dataArea"] = "DataArea"; + EntityCompactLayoutIcons["database"] = "Database"; + EntityCompactLayoutIcons["databaseMultiple"] = "DatabaseMultiple"; + EntityCompactLayoutIcons["dataFunnel"] = "DataFunnel"; + EntityCompactLayoutIcons["dataHistogram"] = "DataHistogram"; + EntityCompactLayoutIcons["dataLine"] = "DataLine"; + EntityCompactLayoutIcons["dataPie"] = "DataPie"; + EntityCompactLayoutIcons["dataScatter"] = "DataScatter"; + EntityCompactLayoutIcons["dataSunburst"] = "DataSunburst"; + EntityCompactLayoutIcons["dataTreemap"] = "DataTreemap"; + EntityCompactLayoutIcons["dataWaterfall"] = "DataWaterfall"; + EntityCompactLayoutIcons["dataWhisker"] = "DataWhisker"; + EntityCompactLayoutIcons["dentist"] = "Dentist"; + EntityCompactLayoutIcons["designIdeas"] = "DesignIdeas"; + EntityCompactLayoutIcons["desktop"] = "Desktop"; + EntityCompactLayoutIcons["desktopMac"] = "DesktopMac"; + EntityCompactLayoutIcons["developerBoard"] = "DeveloperBoard"; + EntityCompactLayoutIcons["deviceMeetingRoom"] = "DeviceMeetingRoom"; + EntityCompactLayoutIcons["diagram"] = "Diagram"; + EntityCompactLayoutIcons["dialpad"] = "Dialpad"; + EntityCompactLayoutIcons["diamond"] = "Diamond"; + EntityCompactLayoutIcons["dinosaur"] = "Dinosaur"; + EntityCompactLayoutIcons["directions"] = "Directions"; + EntityCompactLayoutIcons["disaster"] = "Disaster"; + EntityCompactLayoutIcons["diversity"] = "Diversity"; + EntityCompactLayoutIcons["dNA"] = "DNA"; + EntityCompactLayoutIcons["doctor"] = "Doctor"; + EntityCompactLayoutIcons["document"] = "Document"; + EntityCompactLayoutIcons["documentData"] = "DocumentData"; + EntityCompactLayoutIcons["documentLandscape"] = "DocumentLandscape"; + EntityCompactLayoutIcons["documentMultiple"] = "DocumentMultiple"; + EntityCompactLayoutIcons["documentPdf"] = "DocumentPdf"; + EntityCompactLayoutIcons["documentQueue"] = "DocumentQueue"; + EntityCompactLayoutIcons["documentText"] = "DocumentText"; + EntityCompactLayoutIcons["dog"] = "Dog"; + EntityCompactLayoutIcons["door"] = "Door"; + EntityCompactLayoutIcons["doorTag"] = "DoorTag"; + EntityCompactLayoutIcons["drafts"] = "Drafts"; + EntityCompactLayoutIcons["drama"] = "Drama"; + EntityCompactLayoutIcons["drinkBeer"] = "DrinkBeer"; + EntityCompactLayoutIcons["drinkCoffee"] = "DrinkCoffee"; + EntityCompactLayoutIcons["drinkMargarita"] = "DrinkMargarita"; + EntityCompactLayoutIcons["drinkToGo"] = "DrinkToGo"; + EntityCompactLayoutIcons["drinkWine"] = "DrinkWine"; + EntityCompactLayoutIcons["driveTrain"] = "DriveTrain"; + EntityCompactLayoutIcons["drop"] = "Drop"; + EntityCompactLayoutIcons["dualScreen"] = "DualScreen"; + EntityCompactLayoutIcons["dumbbell"] = "Dumbbell"; + EntityCompactLayoutIcons["earth"] = "Earth"; + EntityCompactLayoutIcons["emoji"] = "Emoji"; + EntityCompactLayoutIcons["emojiAngry"] = "EmojiAngry"; + EntityCompactLayoutIcons["emojiHand"] = "EmojiHand"; + EntityCompactLayoutIcons["emojiLaugh"] = "EmojiLaugh"; + EntityCompactLayoutIcons["emojiMeh"] = "EmojiMeh"; + EntityCompactLayoutIcons["emojiMultiple"] = "EmojiMultiple"; + EntityCompactLayoutIcons["emojiSad"] = "EmojiSad"; + EntityCompactLayoutIcons["emojiSadSlight"] = "EmojiSadSlight"; + EntityCompactLayoutIcons["emojiSmileSlight"] = "EmojiSmileSlight"; + EntityCompactLayoutIcons["emojiSparkle"] = "EmojiSparkle"; + EntityCompactLayoutIcons["emojiSurprise"] = "EmojiSurprise"; + EntityCompactLayoutIcons["engine"] = "Engine"; + EntityCompactLayoutIcons["eraser"] = "Eraser"; + EntityCompactLayoutIcons["eye"] = "Eye"; + EntityCompactLayoutIcons["eyedropper"] = "Eyedropper"; + EntityCompactLayoutIcons["fax"] = "Fax"; + EntityCompactLayoutIcons["fingerprint"] = "Fingerprint"; + EntityCompactLayoutIcons["firstAid"] = "FirstAid"; + EntityCompactLayoutIcons["flag"] = "Flag"; + EntityCompactLayoutIcons["flash"] = "Flash"; + EntityCompactLayoutIcons["flashlight"] = "Flashlight"; + EntityCompactLayoutIcons["flow"] = "Flow"; + EntityCompactLayoutIcons["flowchart"] = "Flowchart"; + EntityCompactLayoutIcons["folder"] = "Folder"; + EntityCompactLayoutIcons["folderOpen"] = "FolderOpen"; + EntityCompactLayoutIcons["folderOpenVertical"] = "FolderOpenVertical"; + EntityCompactLayoutIcons["folderPerson"] = "FolderPerson"; + EntityCompactLayoutIcons["folderZip"] = "FolderZip"; + EntityCompactLayoutIcons["food"] = "Food"; + EntityCompactLayoutIcons["foodApple"] = "FoodApple"; + EntityCompactLayoutIcons["foodCake"] = "FoodCake"; + EntityCompactLayoutIcons["foodEgg"] = "FoodEgg"; + EntityCompactLayoutIcons["foodGrains"] = "FoodGrains"; + EntityCompactLayoutIcons["foodPizza"] = "FoodPizza"; + EntityCompactLayoutIcons["foodToast"] = "FoodToast"; + EntityCompactLayoutIcons["galaxy"] = "Galaxy"; + EntityCompactLayoutIcons["games"] = "Games"; + EntityCompactLayoutIcons["ganttChart"] = "GanttChart"; + EntityCompactLayoutIcons["gas"] = "Gas"; + EntityCompactLayoutIcons["gasPump"] = "GasPump"; + EntityCompactLayoutIcons["gauge"] = "Gauge"; + EntityCompactLayoutIcons["gavel"] = "Gavel"; + EntityCompactLayoutIcons["gift"] = "Gift"; + EntityCompactLayoutIcons["giftCard"] = "GiftCard"; + EntityCompactLayoutIcons["glasses"] = "Glasses"; + EntityCompactLayoutIcons["globe"] = "Globe"; + EntityCompactLayoutIcons["globeSurface"] = "GlobeSurface"; + EntityCompactLayoutIcons["grid"] = "Grid"; + EntityCompactLayoutIcons["gridDots"] = "GridDots"; + EntityCompactLayoutIcons["gridKanban"] = "GridKanban"; + EntityCompactLayoutIcons["guardian"] = "Guardian"; + EntityCompactLayoutIcons["guest"] = "Guest"; + EntityCompactLayoutIcons["guitar"] = "Guitar"; + EntityCompactLayoutIcons["handLeft"] = "HandLeft"; + EntityCompactLayoutIcons["handRight"] = "HandRight"; + EntityCompactLayoutIcons["handshake"] = "Handshake"; + EntityCompactLayoutIcons["hardDrive"] = "HardDrive"; + EntityCompactLayoutIcons["hatGraduation"] = "HatGraduation"; + EntityCompactLayoutIcons["headphones"] = "Headphones"; + EntityCompactLayoutIcons["headphonesSoundWave"] = "HeadphonesSoundWave"; + EntityCompactLayoutIcons["headset"] = "Headset"; + EntityCompactLayoutIcons["headsetVr"] = "HeadsetVr"; + EntityCompactLayoutIcons["heart"] = "Heart"; + EntityCompactLayoutIcons["heartBroken"] = "HeartBroken"; + EntityCompactLayoutIcons["heartCircle"] = "HeartCircle"; + EntityCompactLayoutIcons["heartHuman"] = "HeartHuman"; + EntityCompactLayoutIcons["heartPulse"] = "HeartPulse"; + EntityCompactLayoutIcons["history"] = "History"; + EntityCompactLayoutIcons["home"] = "Home"; + EntityCompactLayoutIcons["homeMore"] = "HomeMore"; + EntityCompactLayoutIcons["homePerson"] = "HomePerson"; + EntityCompactLayoutIcons["icons"] = "Icons"; + EntityCompactLayoutIcons["image"] = "Image"; + EntityCompactLayoutIcons["imageGlobe"] = "ImageGlobe"; + EntityCompactLayoutIcons["imageMultiple"] = "ImageMultiple"; + EntityCompactLayoutIcons["iot"] = "Iot"; + EntityCompactLayoutIcons["joystick"] = "Joystick"; + EntityCompactLayoutIcons["justice"] = "Justice"; + EntityCompactLayoutIcons["key"] = "Key"; + EntityCompactLayoutIcons["keyboard"] = "Keyboard"; + EntityCompactLayoutIcons["keyboardLayoutSplit"] = "KeyboardLayoutSplit"; + EntityCompactLayoutIcons["keyMultiple"] = "KeyMultiple"; + EntityCompactLayoutIcons["languages"] = "Languages"; + EntityCompactLayoutIcons["laptop"] = "Laptop"; + EntityCompactLayoutIcons["lasso"] = "Lasso"; + EntityCompactLayoutIcons["launcherSettings"] = "LauncherSettings"; + EntityCompactLayoutIcons["layer"] = "Layer"; + EntityCompactLayoutIcons["leaf"] = "Leaf"; + EntityCompactLayoutIcons["leafOne"] = "LeafOne"; + EntityCompactLayoutIcons["leafThree"] = "LeafThree"; + EntityCompactLayoutIcons["leafTwo"] = "LeafTwo"; + EntityCompactLayoutIcons["library"] = "Library"; + EntityCompactLayoutIcons["lightbulb"] = "Lightbulb"; + EntityCompactLayoutIcons["lightbulbFilament"] = "LightbulbFilament"; + EntityCompactLayoutIcons["likert"] = "Likert"; + EntityCompactLayoutIcons["link"] = "Link"; + EntityCompactLayoutIcons["localLanguage"] = "LocalLanguage"; + EntityCompactLayoutIcons["location"] = "Location"; + EntityCompactLayoutIcons["lockClosed"] = "LockClosed"; + EntityCompactLayoutIcons["lockMultiple"] = "LockMultiple"; + EntityCompactLayoutIcons["lockOpen"] = "LockOpen"; + EntityCompactLayoutIcons["lottery"] = "Lottery"; + EntityCompactLayoutIcons["luggage"] = "Luggage"; + EntityCompactLayoutIcons["mail"] = "Mail"; + EntityCompactLayoutIcons["mailInbox"] = "MailInbox"; + EntityCompactLayoutIcons["mailMultiple"] = "MailMultiple"; + EntityCompactLayoutIcons["map"] = "Map"; + EntityCompactLayoutIcons["mapPin"] = "MapPin"; + EntityCompactLayoutIcons["markdown"] = "Markdown"; + EntityCompactLayoutIcons["mathFormula"] = "MathFormula"; + EntityCompactLayoutIcons["mathSymbols"] = "MathSymbols"; + EntityCompactLayoutIcons["max"] = "Max"; + EntityCompactLayoutIcons["megaphone"] = "Megaphone"; + EntityCompactLayoutIcons["megaphoneLoud"] = "MegaphoneLoud"; + EntityCompactLayoutIcons["mention"] = "Mention"; + EntityCompactLayoutIcons["mic"] = "Mic"; + EntityCompactLayoutIcons["microscope"] = "Microscope"; + EntityCompactLayoutIcons["midi"] = "Midi"; + EntityCompactLayoutIcons["molecule"] = "Molecule"; + EntityCompactLayoutIcons["money"] = "Money"; + EntityCompactLayoutIcons["moneyHand"] = "MoneyHand"; + EntityCompactLayoutIcons["mountain"] = "Mountain"; + EntityCompactLayoutIcons["movieCamera"] = "MovieCamera"; + EntityCompactLayoutIcons["moviesAndTv"] = "MoviesAndTv"; + EntityCompactLayoutIcons["musicNote"] = "MusicNote"; + EntityCompactLayoutIcons["musicNote1"] = "MusicNote1"; + EntityCompactLayoutIcons["musicNote2"] = "MusicNote2"; + EntityCompactLayoutIcons["myLocation"] = "MyLocation"; + EntityCompactLayoutIcons["nByN"] = "NByN"; + EntityCompactLayoutIcons["nByOne"] = "NByOne"; + EntityCompactLayoutIcons["news"] = "News"; + EntityCompactLayoutIcons["notablePeople"] = "NotablePeople"; + EntityCompactLayoutIcons["note"] = "Note"; + EntityCompactLayoutIcons["notebook"] = "Notebook"; + EntityCompactLayoutIcons["notepad"] = "Notepad"; + EntityCompactLayoutIcons["notepadPerson"] = "NotepadPerson"; + EntityCompactLayoutIcons["oneByN"] = "OneByN"; + EntityCompactLayoutIcons["oneByOne"] = "OneByOne"; + EntityCompactLayoutIcons["options"] = "Options"; + EntityCompactLayoutIcons["organization"] = "Organization"; + EntityCompactLayoutIcons["organizationHorizontal"] = "OrganizationHorizontal"; + EntityCompactLayoutIcons["oval"] = "Oval"; + EntityCompactLayoutIcons["paintBrush"] = "PaintBrush"; + EntityCompactLayoutIcons["paintBucket"] = "PaintBucket"; + EntityCompactLayoutIcons["partlySunnyWeather"] = "PartlySunnyWeather"; + EntityCompactLayoutIcons["password"] = "Password"; + EntityCompactLayoutIcons["patch"] = "Patch"; + EntityCompactLayoutIcons["patient"] = "Patient"; + EntityCompactLayoutIcons["payment"] = "Payment"; + EntityCompactLayoutIcons["pen"] = "Pen"; + EntityCompactLayoutIcons["pentagon"] = "Pentagon"; + EntityCompactLayoutIcons["people"] = "People"; + EntityCompactLayoutIcons["peopleAudience"] = "PeopleAudience"; + EntityCompactLayoutIcons["peopleCall"] = "PeopleCall"; + EntityCompactLayoutIcons["peopleCommunity"] = "PeopleCommunity"; + EntityCompactLayoutIcons["peopleMoney"] = "PeopleMoney"; + EntityCompactLayoutIcons["peopleQueue"] = "PeopleQueue"; + EntityCompactLayoutIcons["peopleTeam"] = "PeopleTeam"; + EntityCompactLayoutIcons["peopleToolbox"] = "PeopleToolbox"; + EntityCompactLayoutIcons["person"] = "Person"; + EntityCompactLayoutIcons["personBoard"] = "PersonBoard"; + EntityCompactLayoutIcons["personCall"] = "PersonCall"; + EntityCompactLayoutIcons["personChat"] = "PersonChat"; + EntityCompactLayoutIcons["personFeedback"] = "PersonFeedback"; + EntityCompactLayoutIcons["personSupport"] = "PersonSupport"; + EntityCompactLayoutIcons["personVoice"] = "PersonVoice"; + EntityCompactLayoutIcons["phone"] = "Phone"; + EntityCompactLayoutIcons["phoneDesktop"] = "PhoneDesktop"; + EntityCompactLayoutIcons["phoneLaptop"] = "PhoneLaptop"; + EntityCompactLayoutIcons["phoneShake"] = "PhoneShake"; + EntityCompactLayoutIcons["phoneTablet"] = "PhoneTablet"; + EntityCompactLayoutIcons["phoneVibrate"] = "PhoneVibrate"; + EntityCompactLayoutIcons["photoFilter"] = "PhotoFilter"; + EntityCompactLayoutIcons["pi"] = "Pi"; + EntityCompactLayoutIcons["pictureInPicture"] = "PictureInPicture"; + EntityCompactLayoutIcons["pilates"] = "Pilates"; + EntityCompactLayoutIcons["pill"] = "Pill"; + EntityCompactLayoutIcons["pin"] = "Pin"; + EntityCompactLayoutIcons["pipeline"] = "Pipeline"; + EntityCompactLayoutIcons["planet"] = "Planet"; + EntityCompactLayoutIcons["playingCards"] = "PlayingCards"; + EntityCompactLayoutIcons["plugConnected"] = "PlugConnected"; + EntityCompactLayoutIcons["plugDisconnected"] = "PlugDisconnected"; + EntityCompactLayoutIcons["pointScan"] = "PointScan"; + EntityCompactLayoutIcons["poll"] = "Poll"; + EntityCompactLayoutIcons["power"] = "Power"; + EntityCompactLayoutIcons["predictions"] = "Predictions"; + EntityCompactLayoutIcons["premium"] = "Premium"; + EntityCompactLayoutIcons["presenter"] = "Presenter"; + EntityCompactLayoutIcons["previewLink"] = "PreviewLink"; + EntityCompactLayoutIcons["print"] = "Print"; + EntityCompactLayoutIcons["production"] = "Production"; + EntityCompactLayoutIcons["prohibited"] = "Prohibited"; + EntityCompactLayoutIcons["projectionScreen"] = "ProjectionScreen"; + EntityCompactLayoutIcons["protocolHandler"] = "ProtocolHandler"; + EntityCompactLayoutIcons["pulse"] = "Pulse"; + EntityCompactLayoutIcons["pulseSquare"] = "PulseSquare"; + EntityCompactLayoutIcons["puzzlePiece"] = "PuzzlePiece"; + EntityCompactLayoutIcons["qrCode"] = "QrCode"; + EntityCompactLayoutIcons["radar"] = "Radar"; + EntityCompactLayoutIcons["ram"] = "Ram"; + EntityCompactLayoutIcons["readingList"] = "ReadingList"; + EntityCompactLayoutIcons["realEstate"] = "RealEstate"; + EntityCompactLayoutIcons["receipt"] = "Receipt"; + EntityCompactLayoutIcons["reward"] = "Reward"; + EntityCompactLayoutIcons["rhombus"] = "Rhombus"; + EntityCompactLayoutIcons["ribbon"] = "Ribbon"; + EntityCompactLayoutIcons["ribbonStar"] = "RibbonStar"; + EntityCompactLayoutIcons["roadCone"] = "RoadCone"; + EntityCompactLayoutIcons["rocket"] = "Rocket"; + EntityCompactLayoutIcons["router"] = "Router"; + EntityCompactLayoutIcons["rss"] = "Rss"; + EntityCompactLayoutIcons["ruler"] = "Ruler"; + EntityCompactLayoutIcons["run"] = "Run"; + EntityCompactLayoutIcons["running"] = "Running"; + EntityCompactLayoutIcons["satellite"] = "Satellite"; + EntityCompactLayoutIcons["save"] = "Save"; + EntityCompactLayoutIcons["savings"] = "Savings"; + EntityCompactLayoutIcons["scales"] = "Scales"; + EntityCompactLayoutIcons["scan"] = "Scan"; + EntityCompactLayoutIcons["scratchpad"] = "Scratchpad"; + EntityCompactLayoutIcons["screenPerson"] = "ScreenPerson"; + EntityCompactLayoutIcons["screenshot"] = "Screenshot"; + EntityCompactLayoutIcons["search"] = "Search"; + EntityCompactLayoutIcons["serialPort"] = "SerialPort"; + EntityCompactLayoutIcons["server"] = "Server"; + EntityCompactLayoutIcons["serverMultiple"] = "ServerMultiple"; + EntityCompactLayoutIcons["serviceBell"] = "ServiceBell"; + EntityCompactLayoutIcons["settings"] = "Settings"; + EntityCompactLayoutIcons["shapes"] = "Shapes"; + EntityCompactLayoutIcons["shield"] = "Shield"; + EntityCompactLayoutIcons["shieldTask"] = "ShieldTask"; + EntityCompactLayoutIcons["shoppingBag"] = "ShoppingBag"; + EntityCompactLayoutIcons["signature"] = "Signature"; + EntityCompactLayoutIcons["sim"] = "Sim"; + EntityCompactLayoutIcons["sleep"] = "Sleep"; + EntityCompactLayoutIcons["smartwatch"] = "Smartwatch"; + EntityCompactLayoutIcons["soundSource"] = "SoundSource"; + EntityCompactLayoutIcons["soundWaveCircle"] = "SoundWaveCircle"; + EntityCompactLayoutIcons["sparkle"] = "Sparkle"; + EntityCompactLayoutIcons["speaker0"] = "Speaker0"; + EntityCompactLayoutIcons["speaker2"] = "Speaker2"; + EntityCompactLayoutIcons["sport"] = "Sport"; + EntityCompactLayoutIcons["sportAmericanFootball"] = "SportAmericanFootball"; + EntityCompactLayoutIcons["sportBaseball"] = "SportBaseball"; + EntityCompactLayoutIcons["sportBasketball"] = "SportBasketball"; + EntityCompactLayoutIcons["sportHockey"] = "SportHockey"; + EntityCompactLayoutIcons["sportSoccer"] = "SportSoccer"; + EntityCompactLayoutIcons["squareMultiple"] = "SquareMultiple"; + EntityCompactLayoutIcons["squareShadow"] = "SquareShadow"; + EntityCompactLayoutIcons["squaresNested"] = "SquaresNested"; + EntityCompactLayoutIcons["stack"] = "Stack"; + EntityCompactLayoutIcons["stackStar"] = "StackStar"; + EntityCompactLayoutIcons["star"] = "Star"; + EntityCompactLayoutIcons["starFilled"] = "StarFilled"; + EntityCompactLayoutIcons["starHalf"] = "StarHalf"; + EntityCompactLayoutIcons["starLineHorizontal3"] = "StarLineHorizontal3"; + EntityCompactLayoutIcons["starOneQuarter"] = "StarOneQuarter"; + EntityCompactLayoutIcons["starThreeQuarter"] = "StarThreeQuarter"; + EntityCompactLayoutIcons["status"] = "Status"; + EntityCompactLayoutIcons["steps"] = "Steps"; + EntityCompactLayoutIcons["stethoscope"] = "Stethoscope"; + EntityCompactLayoutIcons["sticker"] = "Sticker"; + EntityCompactLayoutIcons["storage"] = "Storage"; + EntityCompactLayoutIcons["stream"] = "Stream"; + EntityCompactLayoutIcons["streamInput"] = "StreamInput"; + EntityCompactLayoutIcons["streamInputOutput"] = "StreamInputOutput"; + EntityCompactLayoutIcons["streamOutput"] = "StreamOutput"; + EntityCompactLayoutIcons["styleGuide"] = "StyleGuide"; + EntityCompactLayoutIcons["subGrid"] = "SubGrid"; + EntityCompactLayoutIcons["subtitles"] = "Subtitles"; + EntityCompactLayoutIcons["surfaceEarbuds"] = "SurfaceEarbuds"; + EntityCompactLayoutIcons["surfaceHub"] = "SurfaceHub"; + EntityCompactLayoutIcons["symbols"] = "Symbols"; + EntityCompactLayoutIcons["syringe"] = "Syringe"; + EntityCompactLayoutIcons["system"] = "System"; + EntityCompactLayoutIcons["tabDesktop"] = "TabDesktop"; + EntityCompactLayoutIcons["tabInprivateAccount"] = "TabInprivateAccount"; + EntityCompactLayoutIcons["table"] = "Table"; + EntityCompactLayoutIcons["tableImage"] = "TableImage"; + EntityCompactLayoutIcons["tableMultiple"] = "TableMultiple"; + EntityCompactLayoutIcons["tablet"] = "Tablet"; + EntityCompactLayoutIcons["tabs"] = "Tabs"; + EntityCompactLayoutIcons["tag"] = "Tag"; + EntityCompactLayoutIcons["tagCircle"] = "TagCircle"; + EntityCompactLayoutIcons["tagMultiple"] = "TagMultiple"; + EntityCompactLayoutIcons["target"] = "Target"; + EntityCompactLayoutIcons["targetArrow"] = "TargetArrow"; + EntityCompactLayoutIcons["teddy"] = "Teddy"; + EntityCompactLayoutIcons["temperature"] = "Temperature"; + EntityCompactLayoutIcons["tent"] = "Tent"; + EntityCompactLayoutIcons["tetrisApp"] = "TetrisApp"; + EntityCompactLayoutIcons["textbox"] = "Textbox"; + EntityCompactLayoutIcons["textQuote"] = "TextQuote"; + EntityCompactLayoutIcons["thinking"] = "Thinking"; + EntityCompactLayoutIcons["thumbDislike"] = "ThumbDislike"; + EntityCompactLayoutIcons["thumbLike"] = "ThumbLike"; + EntityCompactLayoutIcons["ticketDiagonal"] = "TicketDiagonal"; + EntityCompactLayoutIcons["ticketHorizontal"] = "TicketHorizontal"; + EntityCompactLayoutIcons["timeAndWeather"] = "TimeAndWeather"; + EntityCompactLayoutIcons["timeline"] = "Timeline"; + EntityCompactLayoutIcons["timer"] = "Timer"; + EntityCompactLayoutIcons["toolbox"] = "Toolbox"; + EntityCompactLayoutIcons["topSpeed"] = "TopSpeed"; + EntityCompactLayoutIcons["translate"] = "Translate"; + EntityCompactLayoutIcons["transmission"] = "Transmission"; + EntityCompactLayoutIcons["treeDeciduous"] = "TreeDeciduous"; + EntityCompactLayoutIcons["treeEvergreen"] = "TreeEvergreen"; + EntityCompactLayoutIcons["trophy"] = "Trophy"; + EntityCompactLayoutIcons["tv"] = "Tv"; + EntityCompactLayoutIcons["tvUsb"] = "TvUsb"; + EntityCompactLayoutIcons["umbrella"] = "Umbrella"; + EntityCompactLayoutIcons["usbPlug"] = "UsbPlug"; + EntityCompactLayoutIcons["usbStick"] = "UsbStick"; + EntityCompactLayoutIcons["vault"] = "Vault"; + EntityCompactLayoutIcons["vehicleBicycle"] = "VehicleBicycle"; + EntityCompactLayoutIcons["vehicleBus"] = "VehicleBus"; + EntityCompactLayoutIcons["vehicleCab"] = "VehicleCab"; + EntityCompactLayoutIcons["vehicleCar"] = "VehicleCar"; + EntityCompactLayoutIcons["vehicleCarCollision"] = "VehicleCarCollision"; + EntityCompactLayoutIcons["vehicleCarProfileLtr"] = "VehicleCarProfileLtr"; + EntityCompactLayoutIcons["vehicleCarProfileRtl"] = "VehicleCarProfileRtl"; + EntityCompactLayoutIcons["vehicleShip"] = "VehicleShip"; + EntityCompactLayoutIcons["vehicleSubway"] = "VehicleSubway"; + EntityCompactLayoutIcons["vehicleTruck"] = "VehicleTruck"; + EntityCompactLayoutIcons["vehicleTruckBag"] = "VehicleTruckBag"; + EntityCompactLayoutIcons["vehicleTruckCube"] = "VehicleTruckCube"; + EntityCompactLayoutIcons["vehicleTruckProfile"] = "VehicleTruckProfile"; + EntityCompactLayoutIcons["video"] = "Video"; + EntityCompactLayoutIcons["video360"] = "Video360"; + EntityCompactLayoutIcons["videoChat"] = "VideoChat"; + EntityCompactLayoutIcons["videoClip"] = "VideoClip"; + EntityCompactLayoutIcons["videoClipMultiple"] = "VideoClipMultiple"; + EntityCompactLayoutIcons["videoPerson"] = "VideoPerson"; + EntityCompactLayoutIcons["videoRecording"] = "VideoRecording"; + EntityCompactLayoutIcons["videoSecurity"] = "VideoSecurity"; + EntityCompactLayoutIcons["viewDesktop"] = "ViewDesktop"; + EntityCompactLayoutIcons["viewDesktopMobile"] = "ViewDesktopMobile"; + EntityCompactLayoutIcons["violin"] = "Violin"; + EntityCompactLayoutIcons["virtualNetwork"] = "VirtualNetwork"; + EntityCompactLayoutIcons["voicemail"] = "Voicemail"; + EntityCompactLayoutIcons["vote"] = "Vote"; + EntityCompactLayoutIcons["walkieTalkie"] = "WalkieTalkie"; + EntityCompactLayoutIcons["wallet"] = "Wallet"; + EntityCompactLayoutIcons["walletCreditCard"] = "WalletCreditCard"; + EntityCompactLayoutIcons["wallpaper"] = "Wallpaper"; + EntityCompactLayoutIcons["wand"] = "Wand"; + EntityCompactLayoutIcons["warning"] = "Warning"; + EntityCompactLayoutIcons["weatherBlowingSnow"] = "WeatherBlowingSnow"; + EntityCompactLayoutIcons["weatherCloudy"] = "WeatherCloudy"; + EntityCompactLayoutIcons["weatherDrizzle"] = "WeatherDrizzle"; + EntityCompactLayoutIcons["weatherDuststorm"] = "WeatherDuststorm"; + EntityCompactLayoutIcons["weatherFog"] = "WeatherFog"; + EntityCompactLayoutIcons["weatherHailDay"] = "WeatherHailDay"; + EntityCompactLayoutIcons["weatherHailNight"] = "WeatherHailNight"; + EntityCompactLayoutIcons["weatherHaze"] = "WeatherHaze"; + EntityCompactLayoutIcons["weatherMoon"] = "WeatherMoon"; + EntityCompactLayoutIcons["weatherPartlyCloudyDay"] = "WeatherPartlyCloudyDay"; + EntityCompactLayoutIcons["weatherPartlyCloudyNight"] = "WeatherPartlyCloudyNight"; + EntityCompactLayoutIcons["weatherRain"] = "WeatherRain"; + EntityCompactLayoutIcons["weatherRainShowersDay"] = "WeatherRainShowersDay"; + EntityCompactLayoutIcons["weatherRainShowersNight"] = "WeatherRainShowersNight"; + EntityCompactLayoutIcons["weatherRainSnow"] = "WeatherRainSnow"; + EntityCompactLayoutIcons["weatherSnow"] = "WeatherSnow"; + EntityCompactLayoutIcons["weatherSnowflake"] = "WeatherSnowflake"; + EntityCompactLayoutIcons["weatherSnowShowerDay"] = "WeatherSnowShowerDay"; + EntityCompactLayoutIcons["weatherSnowShowerNight"] = "WeatherSnowShowerNight"; + EntityCompactLayoutIcons["weatherSqualls"] = "WeatherSqualls"; + EntityCompactLayoutIcons["weatherSunnyHigh"] = "WeatherSunnyHigh"; + EntityCompactLayoutIcons["weatherSunnyLow"] = "WeatherSunnyLow"; + EntityCompactLayoutIcons["weatherThunderstorm"] = "WeatherThunderstorm"; + EntityCompactLayoutIcons["webAsset"] = "WebAsset"; + EntityCompactLayoutIcons["whiteboard"] = "Whiteboard"; + EntityCompactLayoutIcons["wifi1"] = "Wifi1"; + EntityCompactLayoutIcons["wifi2"] = "Wifi2"; + EntityCompactLayoutIcons["window"] = "Window"; + EntityCompactLayoutIcons["windowMultiple"] = "WindowMultiple"; + EntityCompactLayoutIcons["windowWrench"] = "WindowWrench"; + EntityCompactLayoutIcons["wrench"] = "Wrench"; + EntityCompactLayoutIcons["wrenchScrewdriver"] = "WrenchScrewdriver"; + EntityCompactLayoutIcons["xray"] = "Xray"; + EntityCompactLayoutIcons["yoga"] = "Yoga"; + })(EntityCompactLayoutIcons = Excel.EntityCompactLayoutIcons || (Excel.EntityCompactLayoutIcons = {})); + var ReferenceValueType; + (function (ReferenceValueType) { + ReferenceValueType["array"] = "Array"; + ReferenceValueType["entity"] = "Entity"; + ReferenceValueType["root"] = "Root"; + })(ReferenceValueType = Excel.ReferenceValueType || (Excel.ReferenceValueType = {})); + var CellValueType; + (function (CellValueType) { + CellValueType["array"] = "Array"; + CellValueType["boolean"] = "Boolean"; + CellValueType["double"] = "Double"; + CellValueType["entity"] = "Entity"; + CellValueType["empty"] = "Empty"; + CellValueType["error"] = "Error"; + CellValueType["formattedNumber"] = "FormattedNumber"; + CellValueType["linkedEntity"] = "LinkedEntity"; + CellValueType["localImage"] = "LocalImage"; + CellValueType["reference"] = "Reference"; + CellValueType["string"] = "String"; + CellValueType["notAvailable"] = "NotAvailable"; + CellValueType["webImage"] = "WebImage"; + })(CellValueType = Excel.CellValueType || (Excel.CellValueType = {})); + var ConnectErrorCellValueSubType; + (function (ConnectErrorCellValueSubType) { + ConnectErrorCellValueSubType["unknown"] = "Unknown"; + ConnectErrorCellValueSubType["serviceError"] = "ServiceError"; + ConnectErrorCellValueSubType["externalLinks"] = "ExternalLinks"; + ConnectErrorCellValueSubType["externalLinksNonCloudLocation"] = "ExternalLinksNonCloudLocation"; + ConnectErrorCellValueSubType["dataTypeNoConnection"] = "DataTypeNoConnection"; + ConnectErrorCellValueSubType["dataTypeServiceError"] = "DataTypeServiceError"; + ConnectErrorCellValueSubType["missingContent"] = "MissingContent"; + ConnectErrorCellValueSubType["requestThrottle"] = "RequestThrottle"; + ConnectErrorCellValueSubType["externalLinksFailedToRefresh"] = "ExternalLinksFailedToRefresh"; + ConnectErrorCellValueSubType["externalLinksAccessFailed"] = "ExternalLinksAccessFailed"; + ConnectErrorCellValueSubType["externalLinksServerError"] = "ExternalLinksServerError"; + ConnectErrorCellValueSubType["externalLinksInvalidRequest"] = "ExternalLinksInvalidRequest"; + ConnectErrorCellValueSubType["externalLinksUnAuthenticated"] = "ExternalLinksUnAuthenticated"; + ConnectErrorCellValueSubType["externalLinksThrottledByHost"] = "ExternalLinksThrottledByHost"; + ConnectErrorCellValueSubType["externalLinksFileTooLarge"] = "ExternalLinksFileTooLarge"; + ConnectErrorCellValueSubType["outdatedLinkedEntity"] = "OutdatedLinkedEntity"; + ConnectErrorCellValueSubType["genericServerError"] = "GenericServerError"; + })(ConnectErrorCellValueSubType = Excel.ConnectErrorCellValueSubType || (Excel.ConnectErrorCellValueSubType = {})); + var ErrorCellValueType; + (function (ErrorCellValueType) { + ErrorCellValueType["blocked"] = "Blocked"; + ErrorCellValueType["busy"] = "Busy"; + ErrorCellValueType["calc"] = "Calc"; + ErrorCellValueType["connect"] = "Connect"; + ErrorCellValueType["div0"] = "Div0"; + ErrorCellValueType["external"] = "External"; + ErrorCellValueType["field"] = "Field"; + ErrorCellValueType["gettingData"] = "GettingData"; + ErrorCellValueType["notAvailable"] = "NotAvailable"; + ErrorCellValueType["name"] = "Name"; + ErrorCellValueType["null"] = "Null"; + ErrorCellValueType["num"] = "Num"; + ErrorCellValueType["placeholder"] = "Placeholder"; + ErrorCellValueType["ref"] = "Ref"; + ErrorCellValueType["spill"] = "Spill"; + ErrorCellValueType["value"] = "Value"; + })(ErrorCellValueType = Excel.ErrorCellValueType || (Excel.ErrorCellValueType = {})); + var ExternalErrorCellValueSubType; + (function (ExternalErrorCellValueSubType) { + ExternalErrorCellValueSubType["unknown"] = "Unknown"; + })(ExternalErrorCellValueSubType = Excel.ExternalErrorCellValueSubType || (Excel.ExternalErrorCellValueSubType = {})); + var FieldErrorCellValueSubType; + (function (FieldErrorCellValueSubType) { + FieldErrorCellValueSubType["unknown"] = "Unknown"; + FieldErrorCellValueSubType["webImageMissingFilePart"] = "WebImageMissingFilePart"; + FieldErrorCellValueSubType["dataProviderError"] = "DataProviderError"; + FieldErrorCellValueSubType["richValueRelMissingFilePart"] = "RichValueRelMissingFilePart"; + })(FieldErrorCellValueSubType = Excel.FieldErrorCellValueSubType || (Excel.FieldErrorCellValueSubType = {})); + var NumErrorCellValueSubType; + (function (NumErrorCellValueSubType) { + NumErrorCellValueSubType["unknown"] = "Unknown"; + NumErrorCellValueSubType["arrayTooLarge"] = "ArrayTooLarge"; + })(NumErrorCellValueSubType = Excel.NumErrorCellValueSubType || (Excel.NumErrorCellValueSubType = {})); + var RefErrorCellValueSubType; + (function (RefErrorCellValueSubType) { + RefErrorCellValueSubType["unknown"] = "Unknown"; + RefErrorCellValueSubType["externalLinksStructuredRef"] = "ExternalLinksStructuredRef"; + RefErrorCellValueSubType["externalLinksCalculatedRef"] = "ExternalLinksCalculatedRef"; + })(RefErrorCellValueSubType = Excel.RefErrorCellValueSubType || (Excel.RefErrorCellValueSubType = {})); + var SpillErrorCellValueSubType; + (function (SpillErrorCellValueSubType) { + SpillErrorCellValueSubType["unknown"] = "Unknown"; + SpillErrorCellValueSubType["collision"] = "Collision"; + SpillErrorCellValueSubType["indeterminateSize"] = "IndeterminateSize"; + SpillErrorCellValueSubType["worksheetEdge"] = "WorksheetEdge"; + SpillErrorCellValueSubType["outOfMemoryWhileCalc"] = "OutOfMemoryWhileCalc"; + SpillErrorCellValueSubType["table"] = "Table"; + SpillErrorCellValueSubType["mergedCell"] = "MergedCell"; + })(SpillErrorCellValueSubType = Excel.SpillErrorCellValueSubType || (Excel.SpillErrorCellValueSubType = {})); + var ValueErrorCellValueSubType; + (function (ValueErrorCellValueSubType) { + ValueErrorCellValueSubType["unknown"] = "Unknown"; + ValueErrorCellValueSubType["vlookupColumnIndexLessThanOne"] = "VlookupColumnIndexLessThanOne"; + ValueErrorCellValueSubType["vlookupResultNotFound"] = "VlookupResultNotFound"; + ValueErrorCellValueSubType["hlookupRowIndexLessThanOne"] = "HlookupRowIndexLessThanOne"; + ValueErrorCellValueSubType["hlookupResultNotFound"] = "HlookupResultNotFound"; + ValueErrorCellValueSubType["coerceStringToNumberInvalid"] = "CoerceStringToNumberInvalid"; + ValueErrorCellValueSubType["coerceStringToBoolInvalid"] = "CoerceStringToBoolInvalid"; + ValueErrorCellValueSubType["coerceStringToInvalidType"] = "CoerceStringToInvalidType"; + ValueErrorCellValueSubType["subArrayStartRowMissingEndRowNot"] = "SubArrayStartRowMissingEndRowNot"; + ValueErrorCellValueSubType["subArrayStartColumnMissingEndColumnNot"] = "SubArrayStartColumnMissingEndColumnNot"; + ValueErrorCellValueSubType["invalidImageUrl"] = "InvalidImageUrl"; + ValueErrorCellValueSubType["stockHistoryNonTradingDays"] = "StockHistoryNonTradingDays"; + ValueErrorCellValueSubType["stockHistoryNotAStock"] = "StockHistoryNotAStock"; + ValueErrorCellValueSubType["stockHistoryInvalidDate"] = "StockHistoryInvalidDate"; + ValueErrorCellValueSubType["stockHistoryEndBeforeStart"] = "StockHistoryEndBeforeStart"; + ValueErrorCellValueSubType["stockHistoryStartInFuture"] = "StockHistoryStartInFuture"; + ValueErrorCellValueSubType["stockHistoryInvalidEnum"] = "StockHistoryInvalidEnum"; + ValueErrorCellValueSubType["stockHistoryOnlyDateRequested"] = "StockHistoryOnlyDateRequested"; + ValueErrorCellValueSubType["stockHistoryNotFound"] = "StockHistoryNotFound"; + ValueErrorCellValueSubType["lambdaWrongParamCount"] = "LambdaWrongParamCount"; + })(ValueErrorCellValueSubType = Excel.ValueErrorCellValueSubType || (Excel.ValueErrorCellValueSubType = {})); + function _runOnRegularOrWacContext(options, callback) { + var context = isOfficePlatform("OfficeOnline") + ? new WacSpecificRequestContext() + : new RequestContext(); + onBeforeExcelRun(options, context); + return OfficeExtension.CoreUtility.Promise.resolve() + .then(function () { return callback(context); }) + .then(context.sync); + } + var WacSpecificRequestContext = (function (_super) { + __extends(WacSpecificRequestContext, _super); + function WacSpecificRequestContext(url) { + var _this = _super.call(this, url) || this; + _this._customData = "WacPartition"; + _this.m_wacWorkbook = _createRootServiceObject(WacWorkbook, _this); + _this._rootObject = _this.m_wacWorkbook; + _this._rootObjectPropertyName = "wacWorkbook"; + return _this; + } + Object.defineProperty(WacSpecificRequestContext.prototype, "wacWorkbook", { + get: function () { + return this.m_wacWorkbook; + }, + enumerable: true, + configurable: true + }); + return WacSpecificRequestContext; + }(OfficeCore.RequestContext)); + var WacWorkbook = (function (_super) { + __extends(WacWorkbook, _super); + function WacWorkbook() { + return _super !== null && _super.apply(this, arguments) || this; + } + WacWorkbook.prototype.createAndOpenWorkbook = function (base64) { + _invokeMethod(this, "CreateAndOpenWorkbook", 0, [base64], 0, 0); + }; + return WacWorkbook; + }(OfficeExtension.ClientObject)); + function createWorkbook(base64) { + _throwIfApiNotSupported("Excel.createWorkbook", _defaultApiSetName, "1.8", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + if (context instanceof WacSpecificRequestContext) { + context.wacWorkbook.createAndOpenWorkbook(base64); + } + else { + context.workbook.application.createWorkbook(base64).open(); + } + }); + } + Excel.createWorkbook = createWorkbook; + function lowerCaseFirst(str) { + return str[0].toLowerCase() + str.slice(1); + } + var iconSets = ["ThreeArrows", + "ThreeArrowsGray", + "ThreeFlags", + "ThreeTrafficLights1", + "ThreeTrafficLights2", + "ThreeSigns", + "ThreeSymbols", + "ThreeSymbols2", + "FourArrows", + "FourArrowsGray", + "FourRedToBlack", + "FourRating", + "FourTrafficLights", + "FiveArrows", + "FiveArrowsGray", + "FiveRating", + "FiveQuarters", + "ThreeStars", + "ThreeTriangles", + "FiveBoxes"]; + var iconNames = [["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], + ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], + ["RedFlag", "YellowFlag", "GreenFlag"], + ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], + ["RedDiamond", "YellowTriangle", "GreenCircle"], + ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], + ["RedCross", "YellowExclamation", "GreenCheck"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], + ["OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], + ["SilverStar", "HalfGoldStar", "GoldStar"], + ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], + ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; + Excel.icons = {}; + iconSets.map(function (title, i) { + var camelTitle = lowerCaseFirst(title); + Excel.icons[camelTitle] = []; + iconNames[i].map(function (iconName, j) { + iconName = lowerCaseFirst(iconName); + var obj = { set: title, index: j }; + Excel.icons[camelTitle].push(obj); + Excel.icons[camelTitle][iconName] = obj; + }); + }); + function setRangePropertiesInBulk(range, propertyName, values, apiFlags) { + var maxCellCount = 1500; + if (Array.isArray(values) && values.length > 0 && Array.isArray(values[0]) && (values.length * values[0].length > maxCellCount) && isExcel1_3OrAbove()) { + var maxRowCount = Math.max(1, Math.round(maxCellCount / values[0].length)); + range._ValidateArraySize(values.length, values[0].length); + for (var startRowIndex = 0; startRowIndex < values.length; startRowIndex += maxRowCount) { + var rowCount = maxRowCount; + if (startRowIndex + rowCount > values.length) { + rowCount = values.length - startRowIndex; + } + var chunk = range.getRow(startRowIndex).untrack().getBoundingRect(range.getRow(startRowIndex + rowCount - 1).untrack()).untrack(); + var valueSlice = values.slice(startRowIndex, startRowIndex + rowCount); + _invokeSetProperty(chunk, propertyName, valueSlice, apiFlags != null ? apiFlags : 0); + } + return true; + } + return false; + } + function isExcelApiSetSupported(version) { + return OfficeExtension.Utility.isSetSupported("ExcelApi", version.toString()); + } + function isExcel1_3OrAbove() { + return isExcelApiSetSupported(1.3); + } + function isOfficePlatform(platform) { + if (typeof (window) !== "undefined" && window.Office && window.Office.context) { + return window.Office.context.platform === platform; + } + return false; + } + var OperationStatus; + (function (OperationStatus) { + OperationStatus["NotStarted"] = "notStarted"; + OperationStatus["Running"] = "running"; + OperationStatus["Succeeded"] = "succeeded"; + OperationStatus["Failed"] = "failed"; + })(OperationStatus || (OperationStatus = {})); + var HttpStatusCode; + (function (HttpStatusCode) { + HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK"; + HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created"; + HttpStatusCode[HttpStatusCode["Accepted"] = 202] = "Accepted"; + HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent"; + HttpStatusCode[HttpStatusCode["HighestSuccessCode"] = 299] = "HighestSuccessCode"; + HttpStatusCode[HttpStatusCode["TooManyRequests"] = 429] = "TooManyRequests"; + HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError"; + HttpStatusCode[HttpStatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpStatusCode || (HttpStatusCode = {})); + var SessionOperation; + (function (SessionOperation) { + SessionOperation["Close"] = "Session.close"; + SessionOperation["CommitChanges"] = "Session.commitChanges"; + SessionOperation["Create"] = "Session.resolveRequestUrlAndHeaderInfo"; + SessionOperation["Refresh"] = "Session.refreshSession"; + })(SessionOperation = Excel.SessionOperation || (Excel.SessionOperation = {})); + var Session = (function () { + function Session(workbookUrl, requestHeaders, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.persistChanges, persistChanges = _c === void 0 ? true : _c, _d = _b.commitExplicitly, commitExplicitly = _d === void 0 ? true : _d; + this.m_requestId = ''; + this.m_workbookUrl = !workbookUrl ? '' : this.ensureUrlFormatEndWithSlash(workbookUrl); + this.m_requestHeaders = !requestHeaders ? {} : requestHeaders; + this.m_persistChanges = persistChanges; + this.m_commitExplicitly = commitExplicitly; + } + Object.defineProperty(Session.prototype, "requestId", { + get: function () { + return this.m_requestId; + }, + enumerable: true, + configurable: true + }); + Session.prototype.close = function () { + var _this = this; + if (this.m_requestUrlAndHeaderInfo && + !OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + var url = this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url) + Session.CLOSE_SESSION; + var req = { + method: 'POST', + url: url, + headers: this.m_requestUrlAndHeaderInfo.headers, + body: '' + }; + return OfficeExtension.HttpUtility.sendRequest(req).then(function (resp) { + if (resp.statusCode !== HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(resp, SessionOperation.Close); + } + _this.m_requestUrlAndHeaderInfo = null; + for (var key in _this.m_requestHeaders) { + if (key.toLowerCase() === Session.WorkbookSessionIdHeaderNameLower) { + delete _this.m_requestHeaders[key]; + break; + } + } + }); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + Session.prototype.commitChanges = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (!this.m_commitExplicitly) { + throw this.createError(HttpStatusCode.InternalServerError, 'Can not call commitChanges() if commitExplicitly is not set.', SessionOperation.CommitChanges); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.CommitChanges); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.CommitChanges); + } + var commitChangesRequestInfo = this.createCommitChangesRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(commitChangesRequestInfo).then(function (commitChangesResponseInfo) { + var statusCode = commitChangesResponseInfo.statusCode; + if (statusCode === HttpStatusCode.Accepted) { + return _this.delay(Session.POLL_DELAY) + .then(function (_) { + return _this.pollResourceLocation(_this.getHeaderIgnoreCase(commitChangesResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.CommitChanges, additionalRequestHeaders); + }) + .then(function (commitChangesResourceLocationResponseInfo) { + var operationStatusBody = JSON.parse(commitChangesResourceLocationResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(commitChangesResourceLocationResponseInfo, SessionOperation.CommitChanges); + } + return _this.parseCooldownTime(commitChangesResourceLocationResponseInfo); + }); + } + if (statusCode >= HttpStatusCode.OK && statusCode <= HttpStatusCode.HighestSuccessCode) { + return _this.parseCooldownTime(commitChangesResponseInfo); + } + throw _this.createErrorFromResponseInfo(commitChangesResponseInfo, SessionOperation.CommitChanges); + }); + }; + Session.prototype._resolveRequestUrlAndHeaderInfo = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (this.m_requestUrlAndHeaderInfo) { + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (this.getHeaderIgnoreCase(this.m_requestHeaders, Session.WorkbookSessionIdHeaderNameLower)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + var sessionRequestInfo = this.createAsyncGraphSessionRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(sessionRequestInfo).then(function (sessionResponseInfo) { + _this.m_requestId = _this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.REQUEST_ID_HEADER); + if (sessionResponseInfo.statusCode !== HttpStatusCode.Accepted && + sessionResponseInfo.statusCode !== HttpStatusCode.Created) { + throw _this.createErrorFromResponseInfo(sessionResponseInfo, SessionOperation.Create); + } + if (sessionResponseInfo.statusCode === HttpStatusCode.Created) { + _this.formatRequestUrlAndHeaderInfo(sessionResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + } + return _this.delay(Session.POLL_DELAY) + .then(function (_) { return _this.pollResourceLocation(_this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.Create, additionalRequestHeaders); }) + .then(function (operationStatusResponseInfo) { + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, SessionOperation.Create); + } + var sessionResourceLocationRequestInfo = { + method: 'GET', + url: operationStatusBody.resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: _this.getHeaderIgnoreCase(_this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined + }; + return OfficeExtension.HttpUtility.sendRequest(sessionResourceLocationRequestInfo).then(function (sessionResourceLocationResponseInfo) { + _this.formatRequestUrlAndHeaderInfo(sessionResourceLocationResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + }); + }); + }); + }; + Session.prototype.refreshSession = function () { + var _this = this; + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.Refresh); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.Refresh); + } + var refreshSessionRequestInfo = this.createRefreshSessionRequestInfo(); + return OfficeExtension.HttpUtility.sendRequest(refreshSessionRequestInfo).then(function (refreshSessionResponseInfo) { + var statusCode = refreshSessionResponseInfo.statusCode; + if (statusCode != HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(refreshSessionResponseInfo, SessionOperation.Refresh); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + }; + Session.prototype.getHeaderIgnoreCase = function (headers, headerName) { + var foundHeaders = Object.keys(headers).filter(function (key) { return key.toLowerCase() === headerName.toLowerCase(); }); + return foundHeaders.length > 0 ? headers[foundHeaders[0]] : undefined; + }; + Session.prototype.createCommitChangesRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + var url = this.getCorrectGraphVersionUrl() + Session.COMMIT_CHANGES; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.createAsyncGraphSessionRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + var url = this.getCorrectGraphVersionUrl() + Session.CREATE_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: { persistChanges: this.m_persistChanges, commitExplicitly: this.m_commitExplicitly } + }; + }; + Session.prototype.createRefreshSessionRequestInfo = function () { + var url = this.getCorrectGraphVersionUrl() + Session.REFRESH_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.getCorrectGraphVersionUrl = function () { + return this.m_workbookUrl.replace(new RegExp('graph\.microsoft\.com\/.*?\/'), "graph.microsoft.com/" + Session.ASYNC_API_GRAPH_VERSION + "/"); + }; + Session.prototype.pollResourceLocation = function (resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (pollAttempt === void 0) { + pollAttempt = 0; + } + if (pollAttempt >= Session.MAX_POLL_ATTEMPTS) { + throw this.createError(HttpStatusCode.InternalServerError, 'Timout while polling for the resource location.', sessionOperation); + } + var operationStatusRequestInfo = { + method: 'GET', + url: resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: this.getHeaderIgnoreCase(this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined + }; + return OfficeExtension.HttpUtility.sendRequest(operationStatusRequestInfo).then(function (operationStatusResponseInfo) { + if (operationStatusResponseInfo.statusCode !== HttpStatusCode.OK) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + } + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + switch (operationStatusBody.status) { + case OperationStatus.Succeeded: + return operationStatusResponseInfo; + case OperationStatus.Failed: + return operationStatusResponseInfo; + case OperationStatus.NotStarted: + case OperationStatus.Running: + return _this.delay(Session.POLL_DELAY).then(function (_) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + }); + default: + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, sessionOperation); + } + }); + }; + Session.prototype.parseCooldownTime = function (responseInfo) { + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + return !retryAfter + ? Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER + : parseInt(retryAfter) * 1000; + }; + Session.prototype.formatRequestUrlAndHeaderInfo = function (responseInfo) { + if (responseInfo.statusCode !== HttpStatusCode.OK && responseInfo.statusCode !== HttpStatusCode.Created) { + throw this.createErrorFromResponseInfo(responseInfo, SessionOperation.Create); + } + var session = JSON.parse(responseInfo.body); + var sessionId = session.id; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + headers[Session.WorkbookSessionIdHeaderName] = sessionId; + this.m_requestUrlAndHeaderInfo = { url: this.getCorrectGraphVersionUrl(), headers: headers }; + }; + Session.prototype.ensureUrlFormatEndWithSlash = function (url) { + if (url.charAt(url.length - 1) !== '/') { + url += '/'; + } + return url; + }; + Session.prototype.delay = function (milliseconds) { + return new OfficeExtension.CoreUtility.Promise(function (res, _) { return setTimeout(function () { return res(); }, milliseconds); }); + }; + Session.prototype.createErrorFromResponseInfo = function (responseInfo, locationThrown) { + var err = OfficeExtension.Utility._parseErrorResponse(responseInfo); + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + var data = { + retryAfter: retryAfter, + responseBody: OfficeExtension.Utility._parseErrorResponseBody(responseInfo) + }; + return OfficeExtension.Utility.createRuntimeError(err.errorCode, err.errorMessage, locationThrown, responseInfo.statusCode, data); + }; + Session.prototype.createError = function (code, message, locationThrown) { + return OfficeExtension.Utility.createRuntimeError('' + code, message, locationThrown); + }; + Session.WorkbookSessionIdHeaderName = 'Workbook-Session-Id'; + Session.WorkbookSessionIdHeaderNameLower = 'workbook-session-id'; + Session.ASYNC_API_GRAPH_VERSION = 'beta'; + Session.POLL_DELAY = 10000; + Session.MAX_POLL_ATTEMPTS = 10; + Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER = 10000; + Session.LOCATION_HEADER = 'location'; + Session.AUTHORIZATION_HEADER = 'authorization'; + Session.REQUEST_ID_HEADER = 'request-id'; + Session.RETRY_AFTER_HEADER = 'retry-after'; + Session.PREFER_HEADER = 'Prefer'; + Session.PREFER_HEADER_VAL = 'respond-async'; + Session.CONTENT_TYPE_HEADER = 'Content-Type'; + Session.CONTENT_TYPE_HEADER_VAL = 'application/json'; + Session.CLOSE_SESSION = 'closeSession'; + Session.COMMIT_CHANGES = 'commitChanges'; + Session.CREATE_SESSION = 'createSession'; + Session.REFRESH_SESSION = 'refreshSession'; + return Session; + }()); + Excel.Session = Session; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + var _this = _super.call(this, url) || this; + _this.m_workbook = _createRootServiceObject(Excel.Workbook, _this); + _this._rootObject = _this.m_workbook; + _this._rootObjectPropertyName = "workbook"; + return _this; + } + RequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext = 5004; + if (officeJsErrorCode === ooeInvalidApiCallInContext) { + response.ErrorCode = ErrorCodes.invalidOperationInCellEditMode; + response.HttpStatusCode = 400; + response.ErrorMessage = OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; + Object.defineProperty(RequestContext.prototype, "workbook", { + get: function () { + return this.m_workbook; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "application", { + get: function () { + return this.workbook.application; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "runtime", { + get: function () { + return this.workbook._Runtime; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeCore.RequestContext)); + Excel.RequestContext = RequestContext; + var Recorder = (function () { + function Recorder() { + } + Recorder.enableMacroRecordingEvent = function (context) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = true; + var registerEventHandler = function (context) { + context.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent] = "true"; + context.workbook.onRecordingStateChangedEvent.add(function (args) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = args.recording; + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + if (context !== undefined && context !== null) { + return registerEventHandler(context); + } + return run(function (context) { + return registerEventHandler(context); + }); + }; + return Recorder; + }()); + Excel.Recorder = Recorder; + function onBeforeExcelRun(options, context) { + var excelOptions = options; + if (excelOptions.delayForCellEdit && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + context._requestFlagModifier |= 64; + } + else { + context._requestFlagModifier &= ~64; + } + if (excelOptions._makerSafe) { + context._requestFlagModifier |= 1024; + } + } + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.run = run; + function runBatch(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.runBatch = runBatch; + Excel._RedirectV1APIs = false; + Excel._V1APIMap = { + "GetDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GetSelectedDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.getSelectedData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GoToByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.gotoById(callArgs); } + }, + "AddColumnsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddColumns(callArgs); } + }, + "AddFromSelectionAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromSelection(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromNamedItemAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromNamedItem(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromPromptAsync": { + call: function (ctx, callArgs) { + if (versionNumberIsEarlierThan({ ios: { desiredMajor: 2, desiredMinor: 20, desiredBuild: 0 } }) && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + ctx._requestFlagModifier |= 64; + } + return ctx.workbook._V1Api.bindingAddFromPrompt(callArgs); + }, + postprocess: postprocessBindingDescriptor + }, + "AddRowsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddRows(callArgs); } + }, + "GetByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetById(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "ReleaseByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingReleaseById(callArgs); } + }, + "GetAllAsync": { + call: function (ctx) { return ctx.workbook._V1Api.bindingGetAll(); }, + postprocess: function (response) { + return response.bindings.map(function (descriptor) { return postprocessBindingDescriptor(descriptor); }); + } + }, + "DeleteAllDataValuesAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingDeleteAllDataValues(callArgs); } + }, + "SetSelectedDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.setSelectedData(callArgs); } + }, + "SetDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetData(callArgs); } + }, + "SetFormatsAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetFormats(callArgs); } + }, + "SetTableOptionsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetTableOptions(callArgs); } + }, + "ClearFormatsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } + }, + "GetFilePropertiesAsync": { + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } + } + }; + function postprocessBindingDescriptor(response) { + var bindingDescriptor = { + BindingColumnCount: response.bindingColumnCount, + BindingId: response.bindingId, + BindingRowCount: response.bindingRowCount, + bindingType: response.bindingType, + HasHeaders: response.hasHeaders + }; + return window.OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, window.Microsoft.Office.WebExtension.context.document); + } + function getDataCommonPostprocess(response, callArgs) { + var isPlainData = response.headers == null; + var data; + if (isPlainData) { + data = response.rows; + } + else { + data = response; + } + data = window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data === undefined ? null : data; + } + function versionNumberIsEarlierThan(versionsForPlatformMap) { + var hasOfficeVersion = typeof (window) !== "undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var platform = window.Office.context.diagnostics.platform.toLowerCase(); + if (platform === 'officeonline') { + return false; + } + var versionForCurrentPlatform = versionsForPlatformMap[platform]; + if (versionForCurrentPlatform == null) { + versionForCurrentPlatform = versionsForPlatformMap.general; + } + var version = window.Office.context.diagnostics.version; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(version); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (major < versionForCurrentPlatform.desiredMajor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor < versionForCurrentPlatform.desiredMinor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor === versionForCurrentPlatform.desiredMinor && build < versionForCurrentPlatform.desiredBuild) { + var revisionString = result[4]; + var devBuildValidation = /^3\d\d\d+$/; + var isDevBuild = devBuildValidation.exec(revisionString); + if (isDevBuild) { + return true; + } + } + } + return false; + } + var ALWAYS_TRUE_PLACEHOLDER_OVERRIDE = true; + var _CC; + (function (_CC) { + _CC.office10EventIdBindingSelectionChangedEvent = 3; + _CC.office10EventIdBindingDataChangedEvent = 4; + _CC.office10EventIdDocumentSelectionChangedEvent = 2; + _CC.office10EventIdRichApiMessageEvent = 5; + _CC.office10EventIdSettingsChangedEvent = 1; + })(_CC = Excel._CC || (Excel._CC = {})); + var _hostName = "Excel"; + var _defaultApiSetName = "ExcelApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var RangeValuesPreviewCustom = (function () { + function RangeValuesPreviewCustom() { + } + Object.defineProperty(RangeValuesPreviewCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return RangeValuesPreviewCustom; + }()); + Excel.RangeValuesPreviewCustom = RangeValuesPreviewCustom; + (function (_CC) { + function Application_SuspendApiCalculationUntilNextSync(thisObj) { + if (isOfficePlatform("Mac") && isExcelApiSetSupported(1.6) && !isExcelApiSetSupported(1.7)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Application_SuspendApiCalculationUntilNextSync = Application_SuspendApiCalculationUntilNextSync; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Workbook_EnableOfficeScriptRecording(thisObj, eventId) { + this.context.eventId = eventId; + return { handled: false }; + } + _CC.Workbook_EnableOfficeScriptRecording = Workbook_EnableOfficeScriptRecording; + function Workbook_RecordAction(thisObj, payload) { + this.context.sdxPayload = payload; + return { handled: false }; + } + _CC.Workbook_RecordAction = Workbook_RecordAction; + function Workbook_SelectionChanged_EventArgsTransform(thisObj, args) { + return { workbook: thisObj }; + } + _CC.Workbook_SelectionChanged_EventArgsTransform = Workbook_SelectionChanged_EventArgsTransform; + function Workbook_WACOperationEvent_EventArgsTransform(thisObj, args) { + var event = { + eventId: args.eventId, + payload: args.payload, + type: Excel.EventType.wacoperationEvent + }; + return event; + } + _CC.Workbook_WACOperationEvent_EventArgsTransform = Workbook_WACOperationEvent_EventArgsTransform; + function Workbook__Message_EventArgsTransform(thisObj, args) { + return { + entries: args.entries, + workbook: thisObj + }; + } + _CC.Workbook__Message_EventArgsTransform = Workbook__Message_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Worksheet_Charts_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Charts_Get = Worksheet_Charts_Get; + function Worksheet_Comments_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Comments_Get = Worksheet_Comments_Get; + function Worksheet_Names_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Names_Get = Worksheet_Names_Get; + function Worksheet_PivotTables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_PivotTables_Get = Worksheet_PivotTables_Get; + function Worksheet_RangeValuesPreview_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_RangeValuesPreview_Get = Worksheet_RangeValuesPreview_Get; + function Worksheet_Shapes_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Shapes_Get = Worksheet_Shapes_Get; + function Worksheet_ShowGridlines_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showGridlines = value; + _invokeSetProperty(thisObj, "Gridlines", value, _calculateApiFlags(2, "ExcelApiUndo", "1.16")); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowGridlines_Set = Worksheet_ShowGridlines_Set; + function Worksheet_ShowHeadings_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showHeadings = value; + _invokeSetProperty(thisObj, "Headings", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowHeadings_Set = Worksheet_ShowHeadings_Set; + function Worksheet_Tables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Tables_Get = Worksheet_Tables_Get; + function Worksheet_Visuals_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Visuals_Get = Worksheet_Visuals_Get; + function Worksheet_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState + }; + return newArgs; + } + _CC.Worksheet_Changed_EventArgsTransform = Worksheet_Changed_EventArgsTransform; + function Worksheet_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.Worksheet_FormatChanged_EventArgsTransform = Worksheet_FormatChanged_EventArgsTransform; + function Worksheet_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.Worksheet_FormulaChanged_EventArgsTransform = Worksheet_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function _overrideWorksheetCollectionEventMethod(thisObj, methodName, apiVersion) { + if ((!isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.12)) || + (isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.11))) { + _throwIfApiNotSupported("WorksheetCollection." + methodName, _defaultApiSetName, apiVersion, _hostName); + _invokeMethod(thisObj, methodName, 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + function WorksheetCollection__RegisterActivatedEvent(thisObj) { + if (!isExcelApiSetSupported(1.9)) { + _throwIfApiNotSupported("WorksheetCollection._RegisterActivatedEvent", _defaultApiSetName, "1.7", _hostName); + _invokeMethod(thisObj, "_RegisterActivatedEvent", 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetCollection__RegisterActivatedEvent = WorksheetCollection__RegisterActivatedEvent; + function WorksheetCollection__RegisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterAddedEvent = WorksheetCollection__RegisterAddedEvent; + function WorksheetCollection__RegisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterColumnSortedEvent = WorksheetCollection__RegisterColumnSortedEvent; + function WorksheetCollection__RegisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__RegisterDataChangedEvent = WorksheetCollection__RegisterDataChangedEvent; + function WorksheetCollection__RegisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterDeletedEvent = WorksheetCollection__RegisterDeletedEvent; + function WorksheetCollection__RegisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterRowSortedEvent = WorksheetCollection__RegisterRowSortedEvent; + function WorksheetCollection__UnregisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterAddedEvent = WorksheetCollection__UnregisterAddedEvent; + function WorksheetCollection__UnregisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterColumnSortedEvent = WorksheetCollection__UnregisterColumnSortedEvent; + function WorksheetCollection__UnregisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__UnregisterDataChangedEvent = WorksheetCollection__UnregisterDataChangedEvent; + function WorksheetCollection__UnregisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterDeletedEvent = WorksheetCollection__UnregisterDeletedEvent; + function WorksheetCollection__UnregisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterRowSortedEvent = WorksheetCollection__UnregisterRowSortedEvent; + function WorksheetCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState + }; + return newArgs; + } + _CC.WorksheetCollection_Changed_EventArgsTransform = WorksheetCollection_Changed_EventArgsTransform; + function WorksheetCollection_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.WorksheetCollection_FormatChanged_EventArgsTransform = WorksheetCollection_FormatChanged_EventArgsTransform; + function WorksheetCollection_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.WorksheetCollection_FormulaChanged_EventArgsTransform = WorksheetCollection_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function WorksheetProtection_Protect(thisObj, options, password) { + if (versionNumberIsEarlierThan({ + mac: { desiredMajor: 16, desiredMinor: 7, desiredBuild: 17101600 }, + ios: { desiredMajor: 2, desiredMinor: 7, desiredBuild: 1016 }, + general: { desiredMajor: 16, desiredMinor: 0, desiredBuild: 8716 } + })) { + _invokeMethod(thisObj, "Protect", 0, [options], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetProtection_Protect = WorksheetProtection_Protect; + })(_CC = Excel._CC || (Excel._CC = {})); + var RangeCustom = (function () { + function RangeCustom() { + } + RangeCustom.prototype._ensureInteger = function (num, methodName) { + if (!(typeof num === "number" && isFinite(num) && Math.floor(num) === num)) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + } + }; + RangeCustom.prototype._getAdjacentRange = function (functionName, count, referenceRange, rowDirection, columnDirection) { + if (count == null) { + count = 1; + } + this._ensureInteger(count, functionName); + var startRange; + var rowOffset = 0; + var columnOffset = 0; + if (count > 0) { + startRange = referenceRange.getOffsetRange(rowDirection, columnDirection); + } + else { + startRange = referenceRange; + rowOffset = rowDirection; + columnOffset = columnDirection; + } + if (Math.abs(count) === 1) { + return startRange; + } + return startRange.getBoundingRect(referenceRange.getOffsetRange(rowDirection * count + rowOffset, columnDirection * count + columnOffset)); + }; + return RangeCustom; + }()); + Excel.RangeCustom = RangeCustom; + (function (_CC) { + function Range_HandleResult(thisObj, value) { + if (!_isUndefined(value["isEntireColumn"])) { + thisObj.m_isEntireColumn = value["isEntireColumn"]; + } + if (!_isUndefined(value["isEntireRow"])) { + thisObj.m_isEntireRow = value["isEntireRow"]; + } + } + _CC.Range_HandleResult = Range_HandleResult; + function Range_GetColumnsAfter(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsAfter", count, thisObj.getLastColumn(), 0, 1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsAfter = Range_GetColumnsAfter; + function Range_GetColumnsBefore(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsBefore", count, thisObj.getColumn(0), 0, -1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsBefore = Range_GetColumnsBefore; + function Range_GetResizedRange(thisObj, deltaRows, deltaColumns) { + if (!isExcel1_3OrAbove()) { + thisObj._ensureInteger(deltaRows, "getResizedRange"); + thisObj._ensureInteger(deltaColumns, "getResizedRange"); + var referenceRange = (deltaRows >= 0 && deltaColumns >= 0) ? thisObj : thisObj.getCell(0, 0); + var result = referenceRange.getBoundingRect(thisObj.getLastCell().getOffsetRange(deltaRows, deltaColumns)); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetResizedRange = Range_GetResizedRange; + function Range_GetRowsAbove(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = thisObj._getAdjacentRange("getRowsAbove", count, thisObj.getRow(0), -1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsAbove = Range_GetRowsAbove; + function Range_GetRowsBelow(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = this._getAdjacentRange("getRowsBelow", count, thisObj.getLastRow(), 1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsBelow = Range_GetRowsBelow; + function Range_Formulas_Set(thisObj, value) { + thisObj.m_formulas = value; + if (setRangePropertiesInBulk(thisObj, "Formulas", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Formulas_Set = Range_Formulas_Set; + function Range_FormulasLocal_Set(thisObj, value) { + thisObj.m_formulasLocal = value; + if (setRangePropertiesInBulk(thisObj, "FormulasLocal", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasLocal_Set = Range_FormulasLocal_Set; + function Range_FormulasR1C1_Set(thisObj, value) { + thisObj.m_formulasR1C1 = value; + if (setRangePropertiesInBulk(thisObj, "FormulasR1C1", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasR1C1_Set = Range_FormulasR1C1_Set; + function Range_NumberFormat_Set(thisObj, value) { + thisObj.m_numberFormat = value; + if (setRangePropertiesInBulk(thisObj, "NumberFormat", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_NumberFormat_Set = Range_NumberFormat_Set; + function Range_Values_Set(thisObj, value) { + thisObj.m_values = value; + if (setRangePropertiesInBulk(thisObj, "Values", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Values_Set = Range_Values_Set; + function Range_ValuesAsJson_Set(thisObj, value) { + thisObj.m_valuesAsJson = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJson", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJson_Set = Range_ValuesAsJson_Set; + function Range_ValuesAsJsonLocal_Set(thisObj, value) { + thisObj.m_valuesAsJsonLocal = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJsonLocal", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJsonLocal_Set = Range_ValuesAsJsonLocal_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function SettingCollection_Add(thisObj, key, value) { + value = _CC._replaceDateWithStringDate(value); + var result = _createMethodObject(Excel.Setting, thisObj, "Add", 0, [key, value], false, true, null, 0); + return { handled: true, result: result }; + } + _CC.SettingCollection_Add = SettingCollection_Add; + function SettingCollection_SettingsChanged_EventArgsTransform(thisObj, args) { + return { + settings: thisObj + }; + } + _CC.SettingCollection_SettingsChanged_EventArgsTransform = SettingCollection_SettingsChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + var DateJSONPrefix = "Date("; + var DateJSONSuffix = ")"; + function _replaceStringDateWithDate(value) { + var strValue = JSON.stringify(value); + value = JSON.parse(strValue, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === DateJSONPrefix && v.slice(-1) === DateJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + return value; + } + function _replaceDateWithStringDate(value) { + var strValue = JSON.stringify(value, function dateReplacer(k, v) { + return (this[k] instanceof Date) ? (DateJSONPrefix + this[k].getTime() + DateJSONSuffix) : v; + }); + value = JSON.parse(strValue); + return value; + } + _CC._replaceDateWithStringDate = _replaceDateWithStringDate; + function Setting_HandleResult(thisObj, value) { + if (!_isUndefined(value["Value"])) { + value["Value"] = _replaceStringDateWithDate(value["Value"]); + } + ; + } + _CC.Setting_HandleResult = Setting_HandleResult; + function Setting_Value_Set(thisObj, value) { + if (!_isNullOrUndefined(value)) { + thisObj.m_value = value; + var newValue = _replaceDateWithStringDate(value); + _invokeSetProperty(thisObj, "Value", newValue, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Setting_Value_Set = Setting_Value_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + var NamedItemCollectionCustom = (function () { + function NamedItemCollectionCustom() { + } + Object.defineProperty(NamedItemCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItemCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return NamedItemCollectionCustom; + }()); + Excel.NamedItemCollectionCustom = NamedItemCollectionCustom; + (function (_CC) { + function Binding_DataChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj + }; + return evt; + } + _CC.Binding_DataChanged_EventArgsTransform = Binding_DataChanged_EventArgsTransform; + function Binding_SelectionChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj, + columnCount: args.columnCount, + rowCount: args.rowCount, + startColumn: args.startColumn, + startRow: args.startRow + }; + return evt; + } + _CC.Binding_SelectionChanged_EventArgsTransform = Binding_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var TableCollectionCustom = (function () { + function TableCollectionCustom() { + } + Object.defineProperty(TableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return TableCollectionCustom; + }()); + Excel.TableCollectionCustom = TableCollectionCustom; + (function (_CC) { + function TableCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.TableCollection_Changed_EventArgsTransform = TableCollection_Changed_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Table_HandleIdResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleIdResult = Table_HandleIdResult; + function Table_HandleResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleResult = Table_HandleResult; + function Table_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.Table_Changed_EventArgsTransform = Table_Changed_EventArgsTransform; + function Table_SelectionChanged_EventArgsTransform(thisObj, args) { + var value = args; + var isAddressNullOrEmpty = (!value.address || value.address.length === 0); + var newArgs = { + type: Excel.EventType.tableSelectionChanged, + isInsideTable: !isAddressNullOrEmpty, + worksheetId: value.worksheetId, + tableId: thisObj.id, + address: value.address + }; + return newArgs; + } + _CC.Table_SelectionChanged_EventArgsTransform = Table_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartCollectionCustom = (function () { + function ChartCollectionCustom() { + } + Object.defineProperty(ChartCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ChartCollectionCustom; + }()); + Excel.ChartCollectionCustom = ChartCollectionCustom; + (function (_CC) { + function ChartCollection_Add(thisObj, type, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); + } + return { handled: false, result: null }; + } + _CC.ChartCollection_Add = ChartCollection_Add; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Chart_SetData(thisObj, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); + } + return { handled: false }; + } + _CC.Chart_SetData = Chart_SetData; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartFillCustom = (function () { + function ChartFillCustom() { + } + ChartFillCustom.prototype.load = function (option) { + _load(this, option); + return this; + }; + return ChartFillCustom; + }()); + Excel.ChartFillCustom = ChartFillCustom; + var VisualCollectionCustom = (function () { + function VisualCollectionCustom() { + } + Object.defineProperty(VisualCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return VisualCollectionCustom; + }()); + Excel.VisualCollectionCustom = VisualCollectionCustom; + (function (_CC) { + function VisualCollection_AgaveVisualUpdate_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: value.type, + payload: value.payload + }; + return newArgs; + } + _CC.VisualCollection_AgaveVisualUpdate_EventArgsTransform = VisualCollection_AgaveVisualUpdate_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Visual_ChangeNotification_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + targetId: value.targetId, + changeType: value.changeType, + payload: value.payload, + type: Excel.EventType.visualChange + }; + return newArgs; + } + _CC.Visual_ChangeNotification_EventArgsTransform = Visual_ChangeNotification_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var PivotTableCollectionCustom = (function () { + function PivotTableCollectionCustom() { + } + Object.defineProperty(PivotTableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return PivotTableCollectionCustom; + }()); + Excel.PivotTableCollectionCustom = PivotTableCollectionCustom; + (function (_CC) { + function PivotLayout_GetColumnLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetColumnLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetColumnLabelRange = PivotLayout_GetColumnLabelRange; + function PivotLayout_GetDataBodyRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetDataBodyRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataBodyRange = PivotLayout_GetDataBodyRange; + function PivotLayout_GetDataHierarchy(thisObj, cell) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + _throwIfApiNotSupported("PivotLayout.getDataHierarchy", _defaultApiSetName, "1.9", _hostName); + var result = _createMethodObject(Excel.DataPivotHierarchy, thisObj, "GetDataHierarchy", 0, [cell], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataHierarchy = PivotLayout_GetDataHierarchy; + function PivotLayout_GetFilterAxisRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetFilterAxisRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetFilterAxisRange = PivotLayout_GetFilterAxisRange; + function PivotLayout_GetRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRange = PivotLayout_GetRange; + function PivotLayout_GetRowLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRowLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRowLabelRange = PivotLayout_GetRowLabelRange; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function PivotField_SortByLabels(thisObj, sortBy) { + if (typeof sortBy === "string") { + sortBy = (sortBy.toLowerCase() === "ascending"); + } + _invokeMethod(thisObj, "SortByLabels", 0, [sortBy], 0, 0); + return { handled: true }; + } + _CC.PivotField_SortByLabels = PivotField_SortByLabels; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormattingService_GetFormatter(thisObj, format) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatting.GetFormatter", "NumberFormatting", "1.1", _hostName); + var result = _createMethodObject(Excel.NumberFormatter, thisObj, "GetFormatter", 0, [format], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormattingService_GetFormatter = NumberFormattingService_GetFormatter; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormatter_Format(thisObj, value) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatter.Format", "NumberFormatting", "1.1", _hostName); + var result = _invokeMethod(thisObj, "Format", 0, [value], 0, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormatter_Format = NumberFormatter_Format; + })(_CC = Excel._CC || (Excel._CC = {})); + var CustomFunctionManagerCustom = (function () { + function CustomFunctionManagerCustom() { + } + CustomFunctionManagerCustom.register = function (metadata, javascript) { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { return Excel.CustomFunctionManager.newObject(context).register(metadata, javascript); }); + }; + CustomFunctionManagerCustom.getStatus = function () { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + var manager = Excel.CustomFunctionManager.newObject(context).load("status"); + return context.sync().then(function () { return manager.status; }); + }); + }; + return CustomFunctionManagerCustom; + }()); + Excel.CustomFunctionManagerCustom = CustomFunctionManagerCustom; + (function (_CC) { + function CustomFunctionManager_StaticCustomize(type) { + type.register = CustomFunctionManagerCustom.register; + type.getStatus = CustomFunctionManagerCustom.getStatus; + } + _CC.CustomFunctionManager_StaticCustomize = CustomFunctionManager_StaticCustomize; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Style_TextOrientation_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_textOrientation = value; + _invokeSetProperty(thisObj, "Orientation", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Style_TextOrientation_Set = Style_TextOrientation_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function InternalTest_Test1Event_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_Test1Event_EventArgsTransform = InternalTest_Test1Event_EventArgsTransform; + function InternalTest_TestEvent_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_TestEvent_EventArgsTransform = InternalTest_TestEvent_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var CommentCollectionCustom = (function () { + function CommentCollectionCustom() { + } + Object.defineProperty(CommentCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return CommentCollectionCustom; + }()); + Excel.CommentCollectionCustom = CommentCollectionCustom; + var ShapeCollectionCustom = (function () { + function ShapeCollectionCustom() { + } + Object.defineProperty(ShapeCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ShapeCollectionCustom; + }()); + Excel.ShapeCollectionCustom = ShapeCollectionCustom; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["accessDenied"] = "AccessDenied"; + ErrorCodes["apiNotFound"] = "ApiNotFound"; + ErrorCodes["conflict"] = "Conflict"; + ErrorCodes["emptyChartSeries"] = "EmptyChartSeries"; + ErrorCodes["filteredRangeConflict"] = "FilteredRangeConflict"; + ErrorCodes["formulaLengthExceedsLimit"] = "FormulaLengthExceedsLimit"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["inactiveWorkbook"] = "InactiveWorkbook"; + ErrorCodes["insertDeleteConflict"] = "InsertDeleteConflict"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidBinding"] = "InvalidBinding"; + ErrorCodes["invalidOperation"] = "InvalidOperation"; + ErrorCodes["invalidReference"] = "InvalidReference"; + ErrorCodes["invalidSelection"] = "InvalidSelection"; + ErrorCodes["itemAlreadyExists"] = "ItemAlreadyExists"; + ErrorCodes["itemNotFound"] = "ItemNotFound"; + ErrorCodes["mergedRangeConflict"] = "MergedRangeConflict"; + ErrorCodes["nonBlankCellOffSheet"] = "NonBlankCellOffSheet"; + ErrorCodes["notImplemented"] = "NotImplemented"; + ErrorCodes["openWorkbookLinksBlocked"] = "OpenWorkbookLinksBlocked"; + ErrorCodes["operationCellsExceedLimit"] = "OperationCellsExceedLimit"; + ErrorCodes["pivotTableRangeConflict"] = "PivotTableRangeConflict"; + ErrorCodes["powerQueryRefreshResourceChallenge"] = "PowerQueryRefreshResourceChallenge"; + ErrorCodes["rangeExceedsLimit"] = "RangeExceedsLimit"; + ErrorCodes["refreshWorkbookLinksBlocked"] = "RefreshWorkbookLinksBlocked"; + ErrorCodes["requestAborted"] = "RequestAborted"; + ErrorCodes["responsePayloadSizeLimitExceeded"] = "ResponsePayloadSizeLimitExceeded"; + ErrorCodes["unsupportedFeature"] = "UnsupportedFeature"; + ErrorCodes["unsupportedFillType"] = "UnsupportedFillType"; + ErrorCodes["unsupportedOperation"] = "UnsupportedOperation"; + ErrorCodes["unsupportedSheet"] = "UnsupportedSheet"; + ErrorCodes["invalidOperationInCellEditMode"] = "InvalidOperationInCellEditMode"; + })(ErrorCodes = Excel.ErrorCodes || (Excel.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = {})); + var _libraryMetadataXlapi = { "version": "1.0.0", + "name": "Excel", + "defaultApiSetName": "ExcelApi", + "hostName": "Excel", + "apiSets": [["1.19", "ExcelApiUndo"], ["1.1", "Recorder"], ["99.9"], ["1.4", "ExcelApiUndo"], ["1.8"], ["1.9"], ["1.11"], ["1.18"], ["1.6"], ["1.6", "ExcelApiUndo"], ["1.7"], ["1.1", "ExcelApiUndo"], ["1.2"], ["1.3"], ["1.4"], ["1.5"], ["1.10"], ["1.14"], ["1.1", "ExcelApiOnline"], ["1.1", "CustomFunctions"], ["1.1", "WACOperationEvents"], ["1.3", "ExcelApiUndo"], ["1.13"], ["1.16"], ["1.8", "ExcelApiUndo"], ["1.16", "ExcelApiUndo"], ["1.12"], ["1.2", "ExcelApiOnline"], ["1.2", "ExcelApiUndo"], ["1.17"], ["1.7", "ExcelApiUndo"], ["1.10", "ExcelApiUndo"], ["1.14", "ExcelApiUndo"], ["1.15", "ExcelApiUndo"], ["1.15"], ["1.17", "ExcelApiUndo"], ["99.99", "ExcelApiUndo"], ["1.9", "ExcelApiUndo"], ["1.11", "ExcelApiUndo"], ["1.12", "ExcelApiUndo"], ["1.13", "ExcelApiUndo"], ["1.18", "ExcelApiUndo"]], + "strings": [], + "enumTypes": [["UndoChangeType", ["undoAction", "redoAction", "undoOrRedoCleared", "undoGroupAdded"]], + ["SDX", ["guidedReapply"]], + ["BusinessBarEntryType", [], { "officeScriptsRunningStatus": 0, "msFormsDataSyncRunningStatus": 1 }], + ["FormulaReferenceStyle", ["a1", "r1C1"]], + ["NavigationObjectType", ["table", "pivotTable", "chart", "shape", "namedRange"]], + ["UserActivityType", ["none", "insertSheet", "deleteSheet", "renameSheet", "changeCell", "insertRow", "insertColumn", "deleteRow", "deleteColumn", "insertPartialRow", "insertPartialColumn", "insertPartialColumnRightToLeft", "deletePartialRow", "deletePartialColumn", "deletePartialColumnRightToLeft", "move", "sort", "mergeCells", "unmergeCells", "unknownOperation", "genericEdit"]], + ["LineageEndOfLogStatus", ["loadInProgress", "success", "endOfLog", "purged", "trimmed", "unsupported", "cleared", "error"]], + ["LineageLoadType", ["new", "next", "previous", "latest"]], + ["LoadToType", ["connectionOnly", "table", "pivotTable", "pivotChart"]], + ["QueryError", ["unknown", "none", "failedLoadToWorksheet", "failedLoadToDataModel", "failedDownload", "failedToCompleteDownload"]], + ["RangeOptimizationType", ["other", "numberFormat", "textAlignment", "textProperties", "cellBorder", "fillColor", "sheetProtection", "rowHeight", "rowVisibility"]], + ["WorkbookLinksHardToFindMessages", ["none", "containsDefinedNames", "hiddenOrVeryHiddenSheet", "hiddenFloatingObjects", "lockedFloatingObjectsThroughVba", "protectedSheet", "containsConditionalFormatting", "containsDataValidation", "hiddenRowsAndColumns"]], + ["WorkbookLinksIconState", ["ok", "moreInfo", "warning"]], + ["WorkbookLinksRefreshSettings", ["ask", "always", "never"]], + ["WorkbookConditionalFormattingRulesManagerScope", ["defaultScope", "selectedRange", "activatedWorksheet", "activatedTable", "activatedPivotTable"]], + ["WorkbookLinksRefreshMode", ["manual", "automatic"]], + ["HelpTopic", ["showChanges", "guidedReapply", "externalCodeServiceDiagnostics"]], + ["DocumentTaskChangeAction", [], { "unknown": "unknown", "create": "create", "assign": "assign", "unassign": "unassign", "unassignAll": "unassignAll", "setSchedule": "setSchedule", "setPercentComplete": "setPercentComplete", "setPriority": "setPriority", "remove": "remove", "restore": "restore", "setTitle": "setTitle", "undo": "undo" }], + ["DataSourceType", ["unknown", "cube", "localRange", "localTable", "oledbDefault"]], + ["DateFilterCondition", ["unknown", "equals", "before", "beforeOrEqualTo", "after", "afterOrEqualTo", "between", "tomorrow", "today", "yesterday", "nextWeek", "thisWeek", "lastWeek", "nextMonth", "thisMonth", "lastMonth", "nextQuarter", "thisQuarter", "lastQuarter", "nextYear", "thisYear", "lastYear", "yearToDate", "allDatesInPeriodQuarter1", "allDatesInPeriodQuarter2", "allDatesInPeriodQuarter3", "allDatesInPeriodQuarter4", "allDatesInPeriodJanuary", "allDatesInPeriodFebruary", "allDatesInPeriodMarch", "allDatesInPeriodApril", "allDatesInPeriodMay", "allDatesInPeriodJune", "allDatesInPeriodJuly", "allDatesInPeriodAugust", "allDatesInPeriodSeptember", "allDatesInPeriodOctober", "allDatesInPeriodNovember", "allDatesInPeriodDecember"]], + ["LabelFilterCondition", ["unknown", "equals", "beginsWith", "endsWith", "contains", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between"]], + ["PivotFilterType", ["unknown", "value", "manual", "label", "date"]], + ["TopBottomSelectionType", ["items", "percent", "sum"]], + ["ValueFilterCondition", ["unknown", "equals", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between", "topN", "bottomN"]], + ["BuiltInPivotTableStyle", ["none", "light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "light22", "light23", "light24", "light25", "light26", "light27", "light28", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11", "dark12", "dark13", "dark14", "dark15", "dark16", "dark17", "dark18", "dark19", "dark20", "dark21", "dark22", "dark23", "dark24", "dark25", "dark26", "dark27", "dark28"]], + ["BuiltInSlicerStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "other1", "other2", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6"]], + ["BuiltInTableStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11"]], + ["ChartSeriesDimension", ["categories", "values", "bubbleSizes"], { "xvalues": "XValues", "yvalues": "YValues" }], + ["PivotTableDateGroupBy", ["invalid", "bySeconds", "byMinutes", "byHours", "byDays", "byMonths", "byQuarters", "byYears"]], + ["PivotFilterTopBottomCriterion", ["invalid", "topItems", "topPercent", "topSum", "bottomItems", "bottomPercent", "bottomSum"]], + ["SortBy", ["ascending", "descending"]], + ["AggregationFunction", ["unknown", "automatic", "sum", "count", "average", "max", "min", "product", "countNumbers", "standardDeviation", "standardDeviationP", "variance", "varianceP"]], + ["ShowAsCalculation", ["unknown", "none", "percentOfGrandTotal", "percentOfRowTotal", "percentOfColumnTotal", "percentOfParentRowTotal", "percentOfParentColumnTotal", "percentOfParentTotal", "percentOf", "runningTotal", "percentRunningTotal", "differenceFrom", "percentDifferenceFrom", "rankAscending", "rankDecending", "index"]], + ["PivotAxis", ["unknown", "row", "column", "data", "filter"]], + ["LinkedDataTypeRefreshMode", ["unknown", "manual", "onLoad", "periodic"]], + ["AxisType", ["invalid", "category", "value", "series"]], + ["AxisGroup", ["primary", "secondary"]], + ["AxisScaleType", ["linear", "logarithmic"]], + ["AxisCrosses", ["automatic", "maximum", "minimum", "custom"]], + ["AxisTickMark", ["none", "cross", "inside", "outside"]], + ["AxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["TrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ChartAxisType", ["invalid", "category", "value", "series"]], + ["ChartAxisGroup", ["primary", "secondary"]], + ["ChartAxisScaleType", ["linear", "logarithmic"]], + ["ChartAxisPosition", ["automatic", "maximum", "minimum", "custom"]], + ["ChartAxisTickMark", ["none", "cross", "inside", "outside"]], + ["CalculationState", ["done", "calculating", "pending"]], + ["ChartAxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["ChartAxisDisplayUnit", ["none", "hundreds", "thousands", "tenThousands", "hundredThousands", "millions", "tenMillions", "hundredMillions", "billions", "trillions", "custom"]], + ["ChartAxisTimeUnit", ["days", "months", "years"]], + ["ChartBoxQuartileCalculation", ["inclusive", "exclusive"]], + ["ChartAxisCategoryType", ["automatic", "textAxis", "dateAxis"]], + ["ChartBinType", ["category", "auto", "binWidth", "binCount"]], + ["ChartLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "grey25", "grey50", "grey75", "automatic", "roundDot"]], + ["ChartDataLabelPosition", ["invalid", "none", "center", "insideEnd", "insideBase", "outsideEnd", "left", "right", "top", "bottom", "bestFit", "callout"]], + ["ChartErrorBarsInclude", ["both", "minusValues", "plusValues"]], + ["ChartErrorBarsType", ["fixedValue", "percent", "stDev", "stError", "custom"]], + ["ChartMapAreaLevel", ["automatic", "dataOnly", "city", "county", "state", "country", "continent", "world"]], + ["ChartGradientStyle", ["twoPhaseColor", "threePhaseColor"]], + ["ChartGradientStyleType", ["extremeValue", "number", "percent"]], + ["ChartTitlePosition", ["automatic", "top", "bottom", "left", "right"]], + ["ChartLegendPosition", ["invalid", "top", "bottom", "left", "right", "corner", "custom"]], + ["ChartMarkerStyle", ["invalid", "automatic", "none", "square", "diamond", "triangle", "star", "dot", "dash", "circle", "plus", "picture"], { "x": "X" }], + ["ChartPlotAreaPosition", ["automatic", "custom"]], + ["ChartMapLabelStrategy", ["none", "bestFit", "showAll"]], + ["ChartMapProjectionType", ["automatic", "mercator", "miller", "robinson", "albers"]], + ["ChartParentLabelStrategy", ["none", "banner", "overlapping"]], + ["ChartSeriesBy", ["auto", "columns", "rows"]], + ["ChartDataSourceType", ["localRange", "externalRange", "list", "unknown"]], + ["ChartTextHorizontalAlignment", ["center", "left", "right", "justify", "distributed"]], + ["ChartTextVerticalAlignment", ["center", "bottom", "top", "justify", "distributed"]], + ["ChartTickLabelAlignment", ["center", "left", "right"]], + ["ChartType", ["invalid", "columnClustered", "columnStacked", "columnStacked100", "barClustered", "barStacked", "barStacked100", "lineStacked", "lineStacked100", "lineMarkers", "lineMarkersStacked", "lineMarkersStacked100", "pieOfPie", "pieExploded", "barOfPie", "areaStacked", "areaStacked100", "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", "line", "pie", "area", "doughnut", "radar", "histogram", "boxwhisker", "pareto", "regionMap", "treemap", "waterfall", "sunburst", "funnel"], { "_3DColumnClustered": "3DColumnClustered", "_3DColumnStacked": "3DColumnStacked", "_3DColumnStacked100": "3DColumnStacked100", "_3DBarClustered": "3DBarClustered", "_3DBarStacked": "3DBarStacked", "_3DBarStacked100": "3DBarStacked100", "_3DPieExploded": "3DPieExploded", "xyscatterSmooth": "XYScatterSmooth", "xyscatterSmoothNoMarkers": "XYScatterSmoothNoMarkers", "xyscatterLines": "XYScatterLines", "xyscatterLinesNoMarkers": "XYScatterLinesNoMarkers", "_3DAreaStacked": "3DAreaStacked", "_3DAreaStacked100": "3DAreaStacked100", "_3DColumn": "3DColumn", "_3DLine": "3DLine", "_3DPie": "3DPie", "xyscatter": "XYScatter", "_3DArea": "3DArea" }], + ["ChartUnderlineStyle", ["none", "single"]], + ["ChartDisplayBlanksAs", ["notPlotted", "zero", "interplotted"]], + ["ChartPlotBy", ["rows", "columns"]], + ["ChartSplitType", ["splitByPosition", "splitByValue", "splitByPercentValue", "splitByCustomSplit"]], + ["ChartColorScheme", ["colorfulPalette1", "colorfulPalette2", "colorfulPalette3", "colorfulPalette4", "monochromaticPalette1", "monochromaticPalette2", "monochromaticPalette3", "monochromaticPalette4", "monochromaticPalette5", "monochromaticPalette6", "monochromaticPalette7", "monochromaticPalette8", "monochromaticPalette9", "monochromaticPalette10", "monochromaticPalette11", "monochromaticPalette12", "monochromaticPalette13"]], + ["ChartTrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ShapeZOrder", ["bringToFront", "bringForward", "sendToBack", "sendBackward"]], + ["ShapeType", ["unsupported", "image", "geometricShape", "group", "line"]], + ["ShapeScaleType", ["currentSize", "originalSize"]], + ["ShapeScaleFrom", ["scaleFromTopLeft", "scaleFromMiddle", "scaleFromBottomRight"]], + ["ShapeFillType", ["noFill", "solid", "gradient", "pattern", "pictureAndTexture", "mixed"]], + ["ShapeFontUnderlineStyle", ["none", "single", "double", "heavy", "dotted", "dottedHeavy", "dash", "dashHeavy", "dashLong", "dashLongHeavy", "dotDash", "dotDashHeavy", "dotDotDash", "dotDotDashHeavy", "wavy", "wavyHeavy", "wavyDouble"]], + ["PictureFormat", [], { "unknown": "UNKNOWN", "bmp": "BMP", "jpeg": "JPEG", "gif": "GIF", "png": "PNG", "svg": "SVG" }], + ["ShapeLineStyle", ["single", "thickBetweenThin", "thickThin", "thinThick", "thinThin"]], + ["ShapeLineDashStyle", ["dash", "dashDot", "dashDotDot", "longDash", "longDashDot", "roundDot", "solid", "squareDot", "longDashDotDot", "systemDash", "systemDot", "systemDashDot"]], + ["ArrowheadLength", ["short", "medium", "long"]], + ["ArrowheadStyle", ["none", "triangle", "stealth", "diamond", "oval", "open"]], + ["ArrowheadWidth", ["narrow", "medium", "wide"]], + ["PremiumLicenseName", ["python"]], + ["BindingType", ["range", "table", "text"]], + ["BorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight", "insideVertical", "insideHorizontal", "diagonalDown", "diagonalUp"]], + ["BorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "double", "slantDashDot"]], + ["BorderWeight", ["hairline", "thin", "medium", "thick"]], + ["CalculationMode", ["automatic", "automaticExceptTables", "manual"]], + ["RuntimeCalculationMode", [], { "undefined": 0, "automatic": 1, "automaticExceptTables": 2, "manual": 3 }], + ["CalculationType", ["recalculate", "full", "fullRebuild"]], + ["ClearApplyTo", ["all", "formats", "contents", "hyperlinks", "removeHyperlinks"]], + ["VisualCategory", ["column", "bar", "line", "area", "pie", "donut", "scatter", "bubble", "statistical", "stock", "combo", "hierarchy", "surface", "map", "funnel", "radar", "waterfall", "threeD", "other"]], + ["VisualPropertyType", ["object", "collection", "string", "double", "int", "bool", "enum", "color"]], + ["VisualChangeType", ["dataChange", "propertyChange", "genericChange", "selectionChange"]], + ["BoolMetaPropertyType", ["writeOnly", "readOnly", "hideEntireSubtreeUI", "hideMeButShowChildrenUI", "expandableUI", "nextPropOnSameLine", "hideLabel", "showResetUI", "hasOwnExpandableSection", "nextPropOnSameLineFOTP", "showResetUIFOTP", "untransferable", "ignoreDuringChangeChartType", "notTriviallyUndoable", "volatileEnum", "exceptionCollection", "metaOnly", "showHideCollection", "errorMessage", "infoMessage"]], + ["ConditionalDataBarAxisFormat", ["automatic", "none", "cellMidPoint"]], + ["ConditionalDataBarDirection", ["context", "leftToRight", "rightToLeft"]], + ["ConditionalFormatDirection", ["top", "bottom"]], + ["ConditionalFormatType", ["custom", "dataBar", "colorScale", "iconSet", "topBottom", "presetCriteria", "containsText", "cellValue"]], + ["ConditionalFormatRuleType", ["invalid", "automatic", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatIconRuleType", ["invalid", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatColorCriterionType", ["invalid", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalTopBottomCriterionType", ["invalid", "topItems", "topPercent", "bottomItems", "bottomPercent"]], + ["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"]], + ["ConditionalTextOperator", ["invalid", "contains", "notContains", "beginsWith", "endsWith"]], + ["ConditionalCellValueOperator", ["invalid", "between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqual", "lessThanOrEqual"]], + ["ConditionalIconCriterionOperator", ["invalid", "greaterThan", "greaterThanOrEqual"]], + ["ConditionalRangeBorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight"]], + ["ConditionalRangeBorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot"]], + ["ConditionalRangeFontUnderlineStyle", ["none", "single", "double"]], + ["CustomFunctionType", ["invalid", "script", "webService"]], + ["CustomFunctionMetadataFormat", ["invalid", "openApi"]], + ["DataValidationType", ["none", "wholeNumber", "decimal", "list", "date", "time", "textLength", "custom", "inconsistent", "mixedCriteria"]], + ["DataValidationOperator", ["between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqualTo", "lessThanOrEqualTo"]], + ["DataValidationAlertStyle", ["stop", "warning", "information"]], + ["DeleteShiftDirection", ["up", "left"]], + ["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"]], + ["FilterDatetimeSpecificity", ["year", "month", "day", "hour", "minute", "second"]], + ["FilterOn", ["bottomItems", "bottomPercent", "cellColor", "dynamic", "fontColor", "values", "topItems", "topPercent", "icon", "custom"]], + ["FilterOperator", ["and", "or"]], + ["HorizontalAlignment", ["general", "left", "center", "right", "fill", "justify", "centerAcrossSelection", "distributed"]], + ["IconSet", ["invalid", "threeArrows", "threeArrowsGray", "threeFlags", "threeTrafficLights1", "threeTrafficLights2", "threeSigns", "threeSymbols", "threeSymbols2", "fourArrows", "fourArrowsGray", "fourRedToBlack", "fourRating", "fourTrafficLights", "fiveArrows", "fiveArrowsGray", "fiveRating", "fiveQuarters", "threeStars", "threeTriangles", "fiveBoxes"]], + ["ImageFittingMode", ["fit", "fitAndCenter", "fill"]], + ["InsertShiftDirection", ["down", "right"]], + ["NamedItemScope", ["worksheet", "workbook"]], + ["NamedItemType", ["string", "integer", "double", "boolean", "range", "error", "array"]], + ["RangeUnderlineStyle", ["none", "single", "double", "singleAccountant", "doubleAccountant"]], + ["SheetVisibility", ["visible", "hidden", "veryHidden"]], + ["EventTriggerSource", ["unknown", "thisLocalAddin"]], + ["RangeValueType", ["unknown", "empty", "string", "integer", "double", "boolean", "error", "richValue"]], + ["KeyboardDirection", ["left", "right", "up", "down"]], + ["SearchDirection", ["forward", "backwards"]], + ["SortOrientation", ["rows", "columns"]], + ["SortOn", ["value", "cellColor", "fontColor", "icon"]], + ["SortDataOption", ["normal", "textAsNumber"]], + ["SortMethod", ["pinYin", "strokeCount"]], + ["VerticalAlignment", ["top", "center", "bottom", "justify", "distributed"]], + ["MessageCategory", [], { "none": 0, "customFunction": 1, "action": 2, "event": 65536 }], + ["MessageType", [], { "none": 0, "testEvent": 1, "test1Event": 2, "worksheetDataChangedEvent": 10, "worksheetActivatedEvent": 11, "worksheetDeactivatedEvent": 12, "worksheetAddedEvent": 13, "worksheetSelectionChangedEvent": 14, "worksheetDeletedEvent": 15, "worksheetCalculatedEvent": 16, "worksheetFilteredEvent": 17, "worksheetFormatChangedEvent": 18, "worksheetRowSortedEvent": 19, "worksheetColumnSortedEvent": 20, "worksheetSingleClickedEvent": 21, "worksheetRowHiddenChangedEvent": 22, "worksheetFormulaChangedEvent": 23, "worksheetProtectionChangedEvent": 24, "worksheetNameChangedEvent": 25, "worksheetVisibilityChangedEvent": 26, "worksheetMovedEvent": 27, "worksheetNavigationObjectChangedEvent": 28, "worksheetRowHeightChangedEvent": 29, "workbookFormulaReferenceStyleChangedEvent": 30, "chartAddedEvent": 50, "chartActivatedEvent": 51, "chartDeactivatedEvent": 52, "chartDeletedEvent": 53, "tableSelectionChangedEvent": 100, "tableDataChangedEvent": 101, "tableAddedEvent": 102, "tableDeletedEvent": 103, "tableFilteredEvent": 104, "agaveVisualUpdateEvent": 150, "customFunctionExecutionBeginEvent": 200, "customFunctionExecutionEndEvent": 201, "commentAddedEvent": 250, "commentDeletedEvent": 251, "commentChangedEvent": 252, "invocationMessage": 1000, "cancellationMessage": 1001, "metadataMessage": 1002, "visualSelectionChangedEvent": 2000, "visualChangeEvent": 2001, "visualTrackerModelChangedEvent": 2002, "shapeSelectionChangedEvent": 2100, "shapeActivatedEvent": 2101, "shapeDeactivatedEvent": 2102, "shapeAddedEvent": 2103, "shapeDeletedEvent": 2104, "workbookAutoSaveSettingChangedEvent": 2200, "wacoperationEvent": 2201, "recordingStateChangedEvent": 2202, "workbookActivatedEvent": 2203, "workbookNavigationObjectChangedEvent": 2204, "ribbonCommandExecutedEvent": 2300, "linkedDataTypeRefreshRequestCompletedEvent": 2500, "linkedDataTypeRefreshModeChangedEvent": 2501, "linkedDataTypeLinkedDataTypeAddedEvent": 2502, "linkedWorkbookWorkbookLinksChangedEvent": 2600, "linkedWorkbookRefreshCompletedEvent": 2601, "rangePickerSelectionChangedEvent": 2700, "rangePickerDeactivatedEvent": 2701, "lineageActivityUpdateAvailableEvent": 2800, "lineageActivityFilterUpdatedEvent": 2801, "lineageActivityLoadCompletedEvent": 2802, "pivotTableAddedEvent": 2900, "pivotTableDeletedEvent": 2901, "namedItemAddedEvent": 3000, "namedItemDeletedEvent": 3001, "guidedReapplyManagerUpdateAvailableEvent": 3100, "vbaRecorderRecordingChangedEvent": 3200, "vbaRecorderRecordingChanged2Event": 3202, "workbookActionRecordedEvent": 3201, "externalCodeServiceDiagnosticsNewEntryEvent": 3300, "externalCodeServiceDiagnosticsFilterUpdatedEvent": 3301, "rangeValuesPreviewDismissedEvent": 3400, "applicationUndoChangedEvent": 3500, "appRuntimeVisibilityChangedEvent": 65539, "beforeCloseNotifiactionCancelledEvent": 65540, "augmentationLoopAnnotationAddedEvent": 65541 }], + ["InsertDeleteCellsShiftDirection", ["none", "shiftCellLeft", "shiftCellUp", "shiftCellRight", "shiftCellDown"]], + ["DocumentPropertyType", ["number", "boolean", "date", "string", "float"]], + ["EventSource", ["local", "remote"]], + ["DataChangeType", ["unknown", "rangeEdited", "rowInserted", "rowDeleted", "columnInserted", "columnDeleted", "cellInserted", "cellDeleted"]], + ["RowHiddenChangeType", ["unhidden", "hidden"]], + ["CommentChangeType", ["commentEdited", "commentResolved", "commentReopened", "replyAdded", "replyDeleted", "replyEdited"]], + ["EventType", ["worksheetChanged", "worksheetSelectionChanged", "worksheetAdded", "worksheetActivated", "worksheetDeactivated", "tableChanged", "tableSelectionChanged", "worksheetDeleted", "chartAdded", "chartActivated", "chartDeactivated", "chartDeleted", "worksheetCalculated", "visualSelectionChanged", "agaveVisualUpdate", "tableAdded", "tableDeleted", "tableFiltered", "worksheetFiltered", "shapeActivated", "shapeDeactivated", "visualChange", "workbookAutoSaveSettingChanged", "worksheetFormatChanged", "ribbonCommandExecuted", "worksheetRowSorted", "worksheetColumnSorted", "worksheetSingleClicked", "worksheetRowHiddenChanged", "recordingStateChangedEvent", "commentAdded", "commentDeleted", "commentChanged", "linkedDataTypeRefreshRequestCompleted", "linkedDataTypeRefreshModeChanged", "linkedDataTypeLinkedDataTypeAdded", "worksheetFormulaChanged", "workbookActivated", "linkedWorkbookWorkbookLinksChanged", "linkedWorkbookRefreshCompleted", "worksheetProtectionChanged", "worksheetNameChanged", "worksheetVisibilityChanged", "worksheetMoved", "lineageActivityUpdateAvailable", "lineageActivityFilterUpdated", "lineageActivityLoadCompleted", "shapeAdded", "shapeDeleted", "pivotTableAdded", "pivotTableDeleted", "namedItemAdded", "namedItemDeleted", "worksheetNavigationObjectChanged", "workbookNavigationObjectChanged", "worksheetRowHeightChanged", "workbookFormulaReferenceStyleChanged", "guidedReapplyManagerUpdateAvailable", "vbaRecorderRecordingChanged", "rangeValuesPreviewDismissed", "annotationAdded", "workbookActionRecorded", "applicationUndoChanged", "vbaRecorderRecordingChanged2"], { "wacoperationEvent": "WACOperationEvent" }], + ["DocumentPropertyItem", ["title", "subject", "author", "keywords", "comments", "template", "lastAuth", "revision", "appName", "lastPrint", "creation", "lastSave", "category", "format", "manager", "company"]], + ["SubtotalLocationType", ["atTop", "atBottom", "off"]], + ["PivotLayoutType", ["compact", "tabular", "outline"]], + ["ProtectionSelectionMode", ["normal", "unlocked", "none"]], + ["PageOrientation", ["portrait", "landscape"]], + ["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"]], + ["ReadingOrder", ["context", "leftToRight", "rightToLeft"]], + ["BuiltInStyle", ["normal", "comma", "currency", "percent", "wholeComma", "wholeDollar", "hlink", "hlinkTrav", "note", "warningText", "emphasis1", "emphasis2", "emphasis3", "sheetTitle", "heading1", "heading2", "heading3", "heading4", "input", "output", "calculation", "checkCell", "linkedCell", "total", "good", "bad", "neutral", "accent1", "accent1_20", "accent1_40", "accent1_60", "accent2", "accent2_20", "accent2_40", "accent2_60", "accent3", "accent3_20", "accent3_40", "accent3_60", "accent4", "accent4_20", "accent4_40", "accent4_60", "accent5", "accent5_20", "accent5_40", "accent5_60", "accent6", "accent6_20", "accent6_40", "accent6_60", "explanatoryText"]], + ["PrintErrorType", ["asDisplayed", "blank", "dash", "notAvailable"]], + ["WorksheetPositionType", ["none", "before", "after", "beginning", "end"]], + ["PrintComments", ["noComments", "endSheet", "inPlace"]], + ["PrintOrder", ["downThenOver", "overThenDown"]], + ["PrintMarginUnit", ["points", "inches", "centimeters"]], + ["HeaderFooterState", ["default", "firstAndDefault", "oddAndEven", "firstOddAndEven"]], + ["AutoFillType", ["fillDefault", "fillCopy", "fillSeries", "fillFormats", "fillValues", "fillDays", "fillWeekdays", "fillMonths", "fillYears", "linearTrend", "growthTrend", "flashFill"]], + ["GroupOption", ["byRows", "byColumns"]], + ["RangeCopyType", ["all", "formulas", "values", "formats", "link"]], + ["LinkedDataTypeState", ["none", "validLinkedData", "disambiguationNeeded", "brokenLinkedData", "fetchingData"]], + ["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"]], + ["ConnectorType", ["straight", "elbow", "curve"]], + ["ContentType", ["plain", "mention"]], + ["SpecialCellType", ["conditionalFormats", "dataValidations", "blanks", "constants", "formulas", "sameConditionalFormat", "sameDataValidation", "visible"]], + ["SpecialCellValueType", ["all", "errors", "errorsLogical", "errorsNumbers", "errorsText", "errorsLogicalNumber", "errorsLogicalText", "errorsNumberText", "logical", "logicalNumbers", "logicalText", "logicalNumbersText", "numbers", "numbersText", "text"]], + ["Placement", ["twoCell", "oneCell", "absolute"]], + ["FillPattern", ["none", "solid", "gray50", "gray75", "gray25", "horizontal", "vertical", "down", "up", "checker", "semiGray75", "lightHorizontal", "lightVertical", "lightDown", "lightUp", "grid", "crissCross", "gray16", "gray8", "linearGradient", "rectangularGradient"]], + ["ShapeTextHorizontalAlignment", ["left", "center", "right", "justify", "justifyLow", "distributed", "thaiDistributed"]], + ["ShapeTextVerticalAlignment", ["top", "middle", "bottom", "justified", "distributed"]], + ["ShapeTextVerticalOverflow", ["overflow", "ellipsis", "clip"]], + ["ShapeTextHorizontalOverflow", ["overflow", "clip"]], + ["ShapeTextReadingOrder", ["leftToRight", "rightToLeft"]], + ["ShapeTextOrientation", ["horizontal", "vertical", "vertical270", "wordArtVertical", "eastAsianVertical", "mongolianVertical", "wordArtVerticalRTL"]], + ["ShapeAutoSize", ["autoSizeNone", "autoSizeTextToFitShape", "autoSizeShapeToFitText", "autoSizeMixed"]], + ["CloseBehavior", ["save", "skipSave"]], + ["SaveBehavior", ["save", "prompt"]], + ["SlicerSortType", ["dataSourceOrder", "ascending", "descending"]], + ["RibbonTab", ["others", "home", "insert", "draw", "pageLayout", "formulas", "data", "review", "view", "developer", "addIns", "help"]], + ["NumberFormatCategory", ["general", "number", "currency", "accounting", "date", "time", "percentage", "fraction", "scientific", "text", "special", "custom"]]], + "clientObjectTypes": [["UndoScope", + 0, + 0, + 0, + [["close", + 0, + 0, + 0, + 2], + ["open", + 1, + 0, + 0, + 2]]], + ["RangeValuesPreview", + 4, + 0, + 0, + [["_RegisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["dismiss", + 0, + 2, + 0, + 4], + ["show", + 3, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Dismissed", + 0, + 0, + "MessageType.rangeValuesPreviewDismissedEvent", + "this._ParentObject.id", + "_RegisterEventDismissed", + "_UnregisterEventDismissed"]]], + ["AugmentationLoop", + 0, + 0, + 0, + [["_RegisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["activateAnnotation", + 1, + 2, + 0, + 4], + ["submitSignal", + 1, + 2, + 0, + 4]], + 0, + 0, + 0, + [["AnnotationAdded", + 0, + 0, + "MessageType.augmentationLoopAnnotationAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAnnotationAddedEvent", + "_UnregisterAnnotationAddedEvent"]]], + ["ExternalCodeService", + 0, + 0, + [["diagnostics", + "ExternalCodeServiceDiagnostics", + 2, + 0, + 0, + 4]]], + ["ExternalCodeServiceDiagnostics", + 0, + [["id", + 2]], + 0, + [["_RegisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["clear", + 0, + 2, + 0, + 4], + ["fireStoredEntries", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1]], + 0, + 0, + 0, + [["FilterUpdated", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent", + "this.id", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["NewEntry", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsNewEntryEvent", + "this.id", + "_RegisterEventNewEntry", + "_UnregisterEventNewEntry"]]], + ["VbaRecorder", + 0, + [["id", + 2]], + 0, + [["_RegisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterEventRecordingChanged2", + 0, + 2, + 2, + 4], + ["_UnregisterEventRecordingChanged2", + 0, + 2, + 2, + 4]], + 0, + 0, + 0, + [["RecordingChanged", + 0, + 0, + "MessageType.vbaRecorderRecordingChangedEvent", + "this.id", + "_RegisterEventRecordingChanged", + "_UnregisterEventRecordingChanged"], + ["RecordingChanged2", + 0, + 2, + "MessageType.vbaRecorderRecordingChanged2Event", + "this.id", + "_RegisterEventRecordingChanged2", + "_UnregisterEventRecordingChanged2"]]], + ["WorksheetOptimizationScanResult", + 0, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + [["ranges", + "RangeOptimizationCollection", + 18, + 0, + 0, + 4]]], + ["UserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity"], + ["GuidedReapplyManager", + 0, + 0, + [["activities", + "UserActivityCollection", + 18, + 0, + 0, + 4], + ["summaryCardUserActivity", + "SummaryCardUserActivity", + 2, + 0, + 0, + 4]], + [["openSavedFile", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["discardActivites", + 0, + 2, + 0, + 4], + ["reapplyActivity", + 1, + 2, + 0, + 4], + ["saveActivities", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["UpdateAvailable", + 0, + 0, + "MessageType.guidedReapplyManagerUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["BusinessBar", + 0, + 0, + 0, + [["hide", + 2], + ["show", + 2]]], + ["UserActivity", + 0, + [["activityId", + 2], + ["activityType", + 2], + ["author", + 2], + ["createdDateTime", + 10], + ["guid", + 2], + ["rangeAddress", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2], + ["authorEmail", + 2], + ["locationDeleted", + 2]], + [["highlightRangeAreas", + "RangeAreas", + 2, + 0, + 0, + 4]]], + ["LineageActivityCollection", + 1, + 0, + 0, + [["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["clear", + 0, + 2, + 0, + 4], + ["getCount", + 0, + 2, + 0, + 4], + ["getState", + 0, + 2, + 0, + 4], + ["loadActivities", + 1, + 2, + 0, + 4], + ["loadLatestActivities", + 0, + 2, + 0, + 4], + ["loadNextActivities", + 0, + 2, + 0, + 4], + ["loadPreviousActivities", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_RegisterEventLoadCompleted", + 0, + 2, + 0, + 4], + ["_UnregisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_UnregisterEventLoadCompleted", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity", + [["FilterUpdated", + 0, + 0, + "MessageType.lineageActivityFilterUpdatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["LoadCompleted", + 0, + 0, + "MessageType.lineageActivityLoadCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventLoadCompleted", + "_UnregisterEventLoadCompleted"], + ["UpdateAvailable", + 0, + 0, + "MessageType.lineageActivityUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["SummaryItemUserActivity", + 0, + [["activityType", + 2], + ["rangeAddresses", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2]]], + ["SummaryItemUserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SummaryItemUserActivity", + 1, + 2, + 0, + 4]], + 0, + "SummaryItemUserActivity"], + ["SummaryCardUserActivity", + 0, + [["authors", + 2], + ["currentUser", + 2], + ["displayTime", + 10], + ["numberOfDetailedCard", + 2], + ["summaryUnviewableData", + 2]], + [["summaryItemUserActivities", + "SummaryItemUserActivityCollection", + 18, + 0, + 0, + 4]]], + ["AllowEditRange", + 0, + [["address", + 1], + ["isPasswordProtected", + 3], + ["title", + 1]], + 0, + [["delete"], + ["pauseProtection", + 1], + ["setPassword", + 1]]], + ["AllowEditRangeCollection", + 1, + 0, + 0, + [["add", + 3], + ["getCount", + 0, + 2, + 0, + 4], + ["pauseProtection", + 1]], + [["getItem", + "AllowEditRange", + 1, + 18, + 0, + 4], + ["getItemAt", + "AllowEditRange", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "AllowEditRange", + 1, + 2, + 0, + 4]], + 0, + "AllowEditRange"], + ["Query", + 0, + [["loadedTo", + 2], + ["loadedToDataModel", + 2], + ["name", + 2], + ["refreshDate", + 10], + ["rowsLoadedCount", + 2], + ["error", + 2]]], + ["QueryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Query", + 1, + 18, + 0, + 4]], + 0, + "Query"], + ["VisualTracker", + 0, + [["id", + 2]], + 0, + [["_RegisterEventModelChanged", + 0, + 2], + ["_UnregisterEventModelChanged", + 0, + 2], + ["requestTrackingAlteration", + 2, + 2, + 0, + 4]], + 0, + 0, + 0, + [["ModelChanged", + 0, + 0, + "MessageType.visualTrackerModelChangedEvent", + "this.id", + "_RegisterEventModelChanged", + "_UnregisterEventModelChanged"]]], + ["NumberFormatProperty", + 0, + [["key", + 3], + ["currency", + 3], + ["dateTime", + 3], + ["dateTimeHasDayOfWeek", + 3], + ["dateTimeHasMonth", + 3], + ["dateTimeHasYear", + 3], + ["numeric", + 3], + ["percent", + 3], + ["text", + 3]]], + ["NumberFormatPropertyCollection", + 1, + 0, + 0, + 0, + [["getItemAt", + "NumberFormatProperty", + 1, + 2, + 0, + 4]], + 0, + "NumberFormatProperty"], + ["RangeOptimization", + 0, + [["optimizationTypes", + 2], + ["range", + 2]]], + ["RangeOptimizationCollection", + 1, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeOptimization", + 1, + 2, + 0, + 4]], + 0, + "RangeOptimization"], + ["WorksheetOptimization", + 0, + 0, + 0, + 0, + [["optimize", + "WorksheetOptimizationResult", + 0, + 0, + 0, + 2], + ["scan", + "RangeOptimizationCollection", + 0, + 6, + 0, + 4], + ["scanExtended", + "WorksheetOptimizationScanResult", + 0, + 2, + 0, + 4]]], + ["WorksheetOptimizationResult", + 0, + [["allocatedCells", + 2], + ["optimizedCells", + 2]]], + ["LinkedWorkbook", + 0, + [["displayUrl", + 2, + 3], + ["fileName", + 3, + 3], + ["id", + 2], + ["longErrorDescription", + 2, + 3], + ["refreshEnabled", + 2, + 3], + ["refreshing", + 2, + 3], + ["statusMessage", + 2, + 3], + ["excelIconState", + 2, + 3], + ["hardToFindErrorMessages", + 2, + 3], + ["lastUpdated", + 10, + 3]], + 0, + [["_RegisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["breakLinks"], + ["changeSource", + 1, + 0, + 3], + ["findNextLink", + 0, + 2, + 3, + 4], + ["openWorkbook", + 0, + 2, + 3, + 4], + ["refresh"], + ["openChangeSourceDialog", + 0, + 0, + 3], + ["closeChangeSourceDialog", + 0, + 0, + 3]], + 0, + 0, + 0, + [["RefreshCompleted", + 0, + 3, + "MessageType.linkedWorkbookRefreshCompletedEvent", + "this.id", + "_RegisterRefreshCompletedEvent", + "_UnregisterRefreshCompletedEvent"]]], + ["LinkedWorkbookCollection", + 1, + [["breakAllLinksEnabled", + 0, + 3], + ["refreshAllEnabled", + 0, + 3], + ["workbookLinksRefreshMode"], + ["workbookLinksRefreshSettings", + 0, + 3], + ["containsNonWorkbookLinks", + 0, + 3]], + 0, + [["_RegisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["_UnregisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["breakAllLinks"], + ["getCount", + 0, + 2, + 3, + 4], + ["refreshAll"], + ["openEditLinksDialog", + 0, + 2, + 3, + 4]], + [["getItem", + "LinkedWorkbook", + 1, + 18, + 0, + 4], + ["getItemAt", + "LinkedWorkbook", + 1, + 2, + 3, + 4], + ["getItemOrNullObject", + "LinkedWorkbook", + 1]], + 0, + "LinkedWorkbook", + [["WorkbookLinksChanged", + 0, + 3, + "MessageType.linkedWorkbookWorkbookLinksChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWorkbookLinksChangedEvent", + "_UnregisterWorkbookLinksChangedEvent"]]], + ["DocumentTaskChange", + 0, + [["type", + 2], + ["changedBy", + 2], + ["commentId", + 2], + ["createdDateTime", + 10], + ["id", + 2], + ["assignee", + 2], + ["undoChangeId", + 2], + ["priority", + 2], + ["title", + 2], + ["percentComplete", + 2], + ["startDateTime", + 10], + ["dueDateTime", + 10]], + 0, + 0, + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.DocumentTaskChange", + 4], + ["DocumentTaskChangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "DocumentTaskChange", + 1, + 2, + 0, + 4]], + 0, + "DocumentTaskChange"], + ["RangePicker", + 0, + 0, + 0, + [["activate", + 1, + 0, + 0, + 2, + 0, + 4], + ["deactivate", + 0, + 0, + 0, + 2, + 0, + 4], + ["updateSelection", + 1, + 0, + 0, + 2, + 0, + 4], + ["updateSelectionWithNavigation", + 4, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_UnregisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventDeactivated", + 0, + 2, + 0, + 4], + ["_UnregisterEventDeactivated", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Deactivated", + 0, + 0, + "MessageType.rangePickerDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventDeactivated", + "_UnregisterEventDeactivated"], + ["SelectionChanged", + 0, + 0, + "MessageType.rangePickerSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventSelectionChanged", + "_UnregisterEventSelectionChanged"]]], + ["DocumentTask", + 0, + [["startAndDueDateTime"], + ["id", + 2], + ["percentComplete"], + ["priority"], + ["title"], + ["assignees", + 2], + ["completedBy", + 2], + ["completedDateTime", + 10], + ["createdBy", + 2], + ["createdDateTime", + 10]], + [["changes", + "DocumentTaskChangeCollection", + 18, + 0, + 0, + 4], + ["comment", + "Comment", + 2, + 0, + 0, + 4]], + [["assign", + 1], + ["unassign", + 1], + ["unassignAll"]]], + ["DocumentTaskCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "DocumentTask", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DocumentTask", + 1, + 2, + 0, + 4], + ["getItemAt", + "DocumentTask", + 1, + 2, + 0, + 4]], + 0, + "DocumentTask"], + ["DataConnection", + 0, + [["connectionString", + 2], + ["name", + 2], + ["commandText", + 2], + ["dataSourceType", + 2]]], + ["Runtime", + 0, + [["enableEvents", + 1, + 5]]], + ["Application", + 0, + [["calculationMode", + 1], + ["calculationEngineVersion", + 3, + 6], + ["calculationState", + 3, + 6], + ["decimalSeparator", + 3, + 7], + ["thousandsSeparator", + 3, + 7], + ["useSystemSeparators", + 3, + 7], + ["formatStaleValues", + 1, + 8]], + [["iterativeCalculation", + "IterativeCalculation", + 35, + 6, + 0, + 4], + ["ribbon", + "Ribbon", + 35, + 6, + 0, + 4], + ["cultureInfo", + "CultureInfo", + 3, + 7, + 0, + 4], + ["undoScope", + "UndoScope", + 3, + 3, + 0, + 4]], + [["calculate", + 1], + ["suspendApiCalculationUntilNextSync", + 0, + 1, + 9, + 2, + 0, + 10], + ["suspendScreenUpdatingUntilNextSync", + 0, + 0, + 6, + 2, + 0, + 10], + ["hasLicense", + 1, + 2, + 8, + 4], + ["redo", + 0, + 0, + 3, + 2], + ["explorePremiumLicense", + 1, + 2, + 8, + 4], + ["undo", + 0, + 0, + 3, + 2], + ["_RegisterEventUndoChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventUndoChanged", + 0, + 2, + 3, + 4]], + [["createWorkbook", + "WorkbookCreated", + 1, + 10, + 5, + 0, + 0, + "_GetWorkbookCreatedById"], + ["_GetWorkbookCreatedById", + "WorkbookCreated", + 1, + 2, + 5, + 4]], + 0, + 0, + [["UndoChanged", + 0, + 3, + "MessageType.applicationUndoChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUndoChanged", + "_UnregisterEventUndoChanged"]]], + ["IterativeCalculation", + 0, + [["enabled", + 1], + ["maxIteration", + 1], + ["maxChange", + 1]]], + ["Workbook", + 0, + [["name", + 3, + 11], + ["readOnly", + 3, + 5], + ["isDirty", + 1, + 6], + ["use1904DateSystem", + 1, + 8], + ["chartDataPointTrack", + 1, + 6], + ["usePrecisionAsDisplayed", + 1, + 6], + ["calculationEngineVersion", + 3, + 6], + ["autoSave", + 3, + 6], + ["previouslySaved", + 3, + 6], + ["showPivotFieldList", + 0, + 8, + 0, + 2, + 12], + ["formulaReferenceStyle", + 2, + 3]], + [["worksheets", + "WorksheetCollection", + 19, + 0, + 0, + 4], + ["names", + "NamedItemCollection", + 19, + 0, + 0, + 4], + ["tables", + "TableCollection", + 19, + 0, + 0, + 4], + ["application", + "Application", + 2, + 0, + 0, + 4], + ["bindings", + "BindingCollection", + 19, + 0, + 0, + 4], + ["functions", + "Functions", + 2, + 13, + 0, + 4], + ["_V1Api", + "_V1Api", + 2, + 14, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 19, + 14, + 0, + 4], + ["settings", + "SettingCollection", + 19, + 15, + 0, + 4], + ["customXmlParts", + "CustomXmlPartCollection", + 19, + 16, + 0, + 4], + ["internalTest", + "InternalTest", + 2, + 9, + 0, + 4], + ["properties", + "DocumentProperties", + 35, + 11, + 0, + 4], + ["styles", + "StyleCollection", + 19, + 11, + 0, + 4], + ["protection", + "WorkbookProtection", + 3, + 11, + 0, + 4], + ["dataConnections", + "DataConnectionCollection", + 3, + 11, + 0, + 4], + ["_Runtime", + "Runtime", + 2, + 16, + 0, + 4], + ["comments", + "CommentCollection", + 19, + 17, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["tableStyles", + "TableStyleCollection", + 19, + 17, + 0, + 4], + ["pivotTableStyles", + "PivotTableStyleCollection", + 19, + 17, + 0, + 4], + ["slicerStyles", + "SlicerStyleCollection", + 19, + 17, + 0, + 4], + ["timelineStyles", + "TimelineStyleCollection", + 19, + 17, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["linkedDataTypes", + "LinkedDataTypeCollection", + 18, + 8, + 0, + 4], + ["queries", + "QueryCollection", + 18, + 18, + 0, + 4], + ["linkedWorkbooks", + "LinkedWorkbookCollection", + 18, + 19, + 0, + 4], + ["rangePicker", + "RangePicker", + 2, + 8, + 0, + 4, + 0, + 4], + ["lineageActivities", + "LineageActivityCollection", + 18, + 3, + 0, + 4], + ["businessBar", + "BusinessBar", + 2, + 8, + 0, + 4], + ["guidedReapply", + "GuidedReapplyManager", + 2, + 3, + 0, + 4], + ["vbaRecorder", + "VbaRecorder", + 2, + 8, + 0, + 4], + ["externalCodeService", + "ExternalCodeService", + 2, + 8, + 0, + 4], + ["augmentationLoop", + "AugmentationLoop", + 2, + 8, + 0, + 4]], + [["_RemoveReference", + 1, + 2], + ["_GetObjectByReferenceId", + 1, + 2, + 0, + 4], + ["_GetObjectTypeNameByReferenceId", + 1, + 2, + 0, + 4], + ["_RemoveAllReferences", + 0, + 2], + ["_GetReferenceCount", + 0, + 2, + 0, + 4], + ["getIsActiveCollabSession", + 0, + 0, + 6], + ["registerCustomFunctions", + 7, + 0, + 20, + 8], + ["_SetOsfControlContainerReadyForCustomFunctions", + 0, + 0, + 20], + ["close", + 1, + 0, + 7], + ["save", + 1, + 0, + 7], + ["_RegisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_UnregisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_RegisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_UnregisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_RegisterActivatedEvent", + 0, + 2, + 23], + ["_UnregisterActivatedEvent", + 0, + 2, + 23], + ["insertWorksheetsFromBase64", + 2, + 0, + 23], + ["enableOfficeScriptRecording", + 1, + 1, + 19], + ["recordAction", + 1, + 3, + 0, + 4], + ["focus", + 0, + 2, + 3, + 4], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["showHelp", + 1, + 2, + 3, + 4], + ["getLinkedEntityCellValue", + 1, + 2, + 24, + 4], + ["getThemeColors", + 0, + 2, + 8, + 4], + ["_RegisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["notifySDXLoaded", + 1, + 2, + 3, + 4], + ["openConditionalFormattingRulesManager", + 1, + 0, + 3], + ["openNameManager", + 0, + 0, + 3], + ["_RegisterEventActionRecorded", + 0, + 2, + 2, + 4], + ["_UnregisterEventActionRecorded", + 0, + 2, + 2, + 4]], + [["getSelectedRange", + "Range", + 0, + 10, + 0, + 4], + ["getActiveCell", + "Range", + 0, + 10, + 11, + 4], + ["_GetRangeForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["_GetRangeOrNullObjectForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["getActiveChart", + "Chart", + 0, + 2, + 6, + 4], + ["getActiveChartOrNullObject", + "Chart", + 0, + 2, + 6, + 4], + ["getSelectedRanges", + "RangeAreas", + 0, + 10, + 6, + 4], + ["_GetRangesForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["_GetRangesOrNullObjectForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["getActiveSlicer", + "Slicer", + 0, + 2, + 17, + 4], + ["getActiveSlicerOrNullObject", + "Slicer", + 0, + 2, + 17, + 4]], + 0, + 0, + [["ActionRecorded", + 0, + 2, + "MessageType.workbookActionRecordedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventActionRecorded", + "_UnregisterEventActionRecorded"], + ["Activated", + 0, + 23, + "MessageType.workbookActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["AutoSaveSettingChanged", + 0, + 6, + "MessageType.workbookAutoSaveSettingChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAutoSaveSettingChangedEvent", + "_UnregisterAutoSaveSettingChangedEvent"], + ["FormulaReferenceStyleChanged", + 0, + 3, + "MessageType.workbookFormulaReferenceStyleChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFormulaReferenceStyleChanged", + "_UnregisterEventFormulaReferenceStyleChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.workbookNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["RecordingStateChangedEvent", + 0, + 21, + "MessageType.recordingStateChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRecordingStateChangedEvent", + "_UnregisterRecordingStateChangedEvent"], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdDocumentSelectionChangedEvent", + "", + "", + ""], + ["WACOperationEvent", + 2, + 21, + "MessageType.wacoperationEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWACOperationEvent", + "_UnregisterWACOperationEvent"], + ["_Message", + 3, + 11, + "_CC.office10EventIdRichApiMessageEvent", + "", + "", + ""]]], + ["WorkbookProtection", + 0, + [["protected", + 3]], + 0, + [["protect", + 1], + ["unprotect", + 1]]], + ["WorkbookCreated", + 0, + [["id", + 3]], + 0, + [["open", + 0, + 2, + 0, + 4]]], + ["Worksheet", + 0, + [["name", + 1], + ["id", + 3], + ["position", + 1], + ["visibility", + 1], + ["tabColor", + 1, + 11, + 0, + 2, + 25], + ["standardWidth", + 1, + 11], + ["standardHeight", + 3, + 11], + ["showGridlines", + 5, + 5, + 0, + 2, + 26], + ["showHeadings", + 5, + 5], + ["enableCalculation", + 1, + 6], + ["tabId", + 3, + 18]], + [["charts", + "ChartCollection", + 83, + 0, + 0, + 4], + ["tables", + "TableCollection", + 83, + 0, + 0, + 4], + ["protection", + "WorksheetProtection", + 3, + 13, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 83, + 14, + 0, + 4], + ["names", + "NamedItemCollection", + 83, + 15, + 0, + 4], + ["freezePanes", + "WorksheetFreezePanes", + 3, + 11, + 0, + 4], + ["pageLayout", + "PageLayout", + 35, + 6, + 0, + 4], + ["visuals", + "VisualCollection", + 83, + 17, + 0, + 4], + ["shapes", + "ShapeCollection", + 83, + 6, + 0, + 4], + ["horizontalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["verticalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["comments", + "CommentCollection", + 83, + 17, + 0, + 4], + ["customProperties", + "WorksheetCustomPropertyCollection", + 19, + 27, + 0, + 4], + ["namedSheetViews", + "NamedSheetViewCollection", + 18, + 19, + 0, + 4], + ["optimization", + "WorksheetOptimization", + 2, + 8, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["visualTracker", + "VisualTracker", + 2, + 28, + 0, + 4], + ["rangeValuesPreview", + "RangeValuesPreview", + 66, + 8, + 0, + 4]], + [["delete"], + ["activate", + 0, + 2], + ["calculate", + 1, + 0, + 9], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_RegisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["replaceAll", + 3, + 0, + 6], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["showOutlineLevels", + 2, + 0, + 17], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getRange", + "Range", + 1, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRangeByIndexes", + "Range", + 4, + 10, + 11, + 4], + ["getPrevious", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getPreviousOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNext", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNextOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["_GetSheetById", + "Worksheet", + 1, + 2, + 11, + 4], + ["copy", + "Worksheet", + 2, + 0, + 11, + 0, + 0, + "_GetAnotherWorksheetById"], + ["_GetAnotherWorksheetById", + "Worksheet", + 1, + 0, + 11], + ["findAll", + "RangeAreas", + 2, + 10, + 6, + 4], + ["findAllOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getRanges", + "RangeAreas", + 1, + 10, + 6, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 0, + 3], + ["getRangeR1C1", + "Range", + 1, + 2, + 3, + 4], + ["getRangesR1C1", + "RangeAreas", + 1, + 2, + 3, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 0, + 3]], + "workbook.worksheets", + 0, + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "this.id", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 11, + "MessageType.worksheetDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "this.id", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "this.id", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "this.id", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "this.id", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.worksheetNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "this.id", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "this.id", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "this.id", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "this.id", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 11, + "MessageType.worksheetSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "this.id", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "this.id", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetCollection", + 1, + 0, + 0, + [["getCount", + 1, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 3, + 11], + ["_UnregisterAddedEvent", + 0, + 3, + 11], + ["_RegisterActivatedEvent", + 0, + 3, + 11], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 3, + 11], + ["_UnregisterDeletedEvent", + 0, + 3, + 11], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 3, + 6], + ["_UnregisterDataChangedEvent", + 0, + 3, + 6], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["addFromBase64", + 4, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 3, + 17], + ["_UnregisterRowSortedEvent", + 0, + 3, + 17], + ["_RegisterColumnSortedEvent", + 0, + 3, + 17], + ["_UnregisterColumnSortedEvent", + 0, + 3, + 17], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getItem", + "Worksheet", + 1, + 18, + 0, + 4], + ["add", + "Worksheet", + 1, + 8, + 0, + 2, + 0, + 0, + 29], + ["getActiveWorksheet", + "Worksheet", + 0, + 2, + 0, + 4], + ["getItemOrNullObject", + "Worksheet", + 1, + 2, + 15, + 4], + ["getFirst", + "Worksheet", + 1, + 10, + 16, + 4], + ["getLast", + "Worksheet", + 1, + 10, + 16, + 4]], + 0, + "Worksheet", + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 11, + "MessageType.worksheetAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 6, + "MessageType.worksheetDataChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 11, + "MessageType.worksheetDeletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["Moved", + 0, + 30, + "MessageType.worksheetMovedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventMoved", + "_UnregisterEventMoved"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 6, + "MessageType.worksheetSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetProtection", + 0, + [["protected", + 3], + ["options", + 3], + ["canPauseProtection", + 3, + 19], + ["isPasswordProtected", + 3, + 19], + ["isPaused", + 3, + 19], + ["savedOptions", + 3, + 19]], + [["allowEditRanges", + "AllowEditRangeCollection", + 19, + 19, + 0, + 4]], + [["protect", + 2, + 1], + ["unprotect", + 1], + ["checkPassword", + 1, + 2, + 19, + 4], + ["pauseProtection", + 1, + 0, + 19], + ["resumeProtection", + 0, + 0, + 19], + ["setPassword", + 1, + 0, + 19], + ["updateOptions", + 1, + 0, + 19]]], + ["WorksheetFreezePanes", + 0, + 0, + 0, + [["unfreeze"], + ["freezeAt", + 1], + ["freezeRows", + 1], + ["freezeColumns", + 1]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getLocationOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["Range", + 14, + [["numberFormat", + 5, + 0, + 0, + 2, + 31], + ["numberFormatLocal", + 1, + 11, + 0, + 2, + 31], + ["values", + 5, + 0, + 0, + 2, + 31], + ["text", + 3], + ["formulas", + 5, + 0, + 0, + 2, + 32], + ["formulasLocal", + 5, + 0, + 0, + 2, + 32], + ["rowIndex", + 3], + ["columnIndex", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["address", + 3], + ["addressLocal", + 3], + ["cellCount", + 3], + ["_ReferenceId", + 2], + ["valueTypes", + 3], + ["formulasR1C1", + 5, + 13], + ["hidden", + 3, + 13], + ["rowHidden", + 1, + 13, + 0, + 2, + 32], + ["columnHidden", + 1, + 13, + 0, + 2, + 32], + ["isEntireColumn", + 3, + 11], + ["isEntireRow", + 3, + 11], + ["hyperlink", + 1, + 11, + 0, + 2, + 33], + ["style", + 1, + 11, + 0, + 2, + 32], + ["linkedDataTypeState", + 3, + 6], + ["hasSpill", + 3, + 27], + ["top", + 3, + 17], + ["left", + 3, + 17], + ["height", + 3, + 17], + ["width", + 3, + 17], + ["savedAsArray", + 3, + 27], + ["numberFormatCategories", + 3, + 27], + ["valuesAsJson", + 5, + 24], + ["valuesAsJsonLocal", + 5, + 24], + ["addressR1C1", + 2, + 3]], + [["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["sort", + "RangeSort", + 3, + 13, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 9, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 5, + 0, + 4]], + [["clear", + 1, + 0, + 0, + 2, + 0, + 32], + ["delete", + 1, + 0, + 0, + 2, + 0, + 34], + ["select", + 0, + 2], + ["_KeepReference", + 0, + 2], + ["merge", + 1, + 0, + 13, + 2, + 0, + 32], + ["unmerge", + 0, + 0, + 13], + ["_ValidateArraySize", + 2, + 2, + 14, + 4], + ["calculate", + 0, + 0, + 9], + ["showCard", + 0, + 0, + 11], + ["getImage", + 0, + 2, + 11, + 4], + ["replaceAll", + 3, + 0, + 6, + 2, + 0, + 32], + ["copyFrom", + 4, + 0, + 6, + 2, + 0, + 26], + ["convertToLinkedDataType", + 2, + 0, + 6], + ["convertDataTypeToText", + 0, + 0, + 6], + ["setDirty", + 0, + 0, + 6], + ["getCellProperties", + 1, + 0, + 6], + ["getRowProperties", + 1, + 0, + 6], + ["getColumnProperties", + 1, + 0, + 6], + ["setCellProperties", + 1, + 0, + 6], + ["setRowProperties", + 1, + 0, + 6], + ["setColumnProperties", + 1, + 0, + 6], + ["autoFill", + 2, + 0, + 6], + ["showTeachingCallout", + 2, + 0, + 6], + ["flashFill", + 0, + 0, + 6], + ["group", + 1, + 0, + 17], + ["ungroup", + 1, + 0, + 17], + ["showGroupDetails", + 1, + 0, + 17], + ["hideGroupDetails", + 1, + 0, + 17], + ["moveTo", + 1, + 0, + 7, + 2, + 0, + 26], + ["getDataClassificationIds", + 0, + 2, + 19, + 4]], + [["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["insert", + "Range", + 1, + 8, + 0, + 2, + 0, + 0, + 34], + ["getEntireColumn", + "Range", + 0, + 10, + 0, + 4], + ["getEntireRow", + "Range", + 0, + 10, + 0, + 4], + ["getOffsetRange", + "Range", + 2, + 10, + 0, + 4], + ["getRow", + "Range", + 1, + 10, + 0, + 4], + ["getColumn", + "Range", + 1, + 10, + 0, + 4], + ["getIntersection", + "Range", + 1, + 10, + 0, + 4], + ["getBoundingRect", + "Range", + 1, + 10, + 0, + 4], + ["getLastCell", + "Range", + 0, + 10, + 0, + 4], + ["getLastColumn", + "Range", + 0, + 10, + 0, + 4], + ["getLastRow", + "Range", + 0, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRowsAbove", + "Range", + 1, + 11, + 14, + 4], + ["getRowsBelow", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsBefore", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsAfter", + "Range", + 1, + 11, + 14, + 4], + ["getResizedRange", + "Range", + 2, + 11, + 14, + 4], + ["getVisibleView", + "RangeView", + 0, + 2, + 14, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getSurroundingRegion", + "Range", + 0, + 10, + 11, + 4], + ["getAbsoluteResizedRange", + "Range", + 2, + 10, + 11, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 6, + 4], + ["find", + "Range", + 2, + 10, + 6, + 4], + ["findOrNullObject", + "Range", + 2, + 10, + 6, + 4], + ["removeDuplicates", + "RemoveDuplicatesResult", + 2, + 8, + 6, + 2, + 0, + 0, + 33], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpillingToRange", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParent", + "Range", + 0, + 10, + 27, + 4], + ["getSpillingToRangeOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParentOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getMergedAreas", + "RangeAreas", + 0, + 10, + 19, + 4], + ["getPivotTables", + "PivotTableScopedCollection", + 1, + 6, + 27, + 4], + ["getPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 18, + 4], + ["getDirectPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 27, + 4], + ["getDependents", + "WorkbookRangeAreas", + 0, + 10, + 35, + 4], + ["getDirectDependents", + "WorkbookRangeAreas", + 0, + 10, + 23, + 4], + ["getExtendedRange", + "Range", + 2, + 10, + 23, + 4], + ["getRangeEdge", + "Range", + 2, + 10, + 23, + 4], + ["getNumberFormatProperties", + "NumberFormatPropertyCollection", + 0, + 6, + 8, + 4], + ["getSurroundingDataRegion", + "Range", + 0, + 2, + 8, + 4], + ["getMergedAreasOrNullObject", + "RangeAreas", + 0, + 0, + 23, + 2, + 0, + 0, + 31]]], + ["RangeAreas", + 2, + [["_ReferenceId", + 2], + ["address", + 3], + ["addressLocal", + 3], + ["areaCount", + 3], + ["cellCount", + 3], + ["isEntireColumn", + 3], + ["isEntireRow", + 3], + ["style", + 1], + ["addressR1C1", + 2, + 3]], + [["areas", + "RangeCollection", + 19, + 0, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 0, + 0, + 4], + ["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2], + ["calculate"], + ["clear", + 1], + ["setDirty"], + ["copyFrom", + 4], + ["convertToLinkedDataType", + 2], + ["convertDataTypeToText"], + ["select", + 0, + 2, + 8]], + [["getEntireColumn", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getEntireRow", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getIntersection", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getOffsetRangeAreas", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 0, + 4], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 0, + 4]]], + ["WorkbookRangeAreas", + 2, + [["_ReferenceId", + 2], + ["addresses", + 3]], + [["ranges", + "RangeCollection", + 19, + 0, + 0, + 4], + ["areas", + "RangeAreasCollection", + 19, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2]], + [["getRangeAreasBySheet", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getRangeAreasOrNullObjectBySheet", + "RangeAreas", + 1, + 10, + 0, + 4]]], + ["RangeView", + 0, + [["numberFormat", + 1], + ["values", + 1], + ["text", + 3], + ["formulas", + 1], + ["formulasLocal", + 1], + ["formulasR1C1", + 1], + ["valueTypes", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["cellAddresses", + 3], + ["index", + 3], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["rows", + "RangeViewCollection", + 19, + 0, + 0, + 4]], + 0, + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["RangeViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "RangeView", + 1, + 2, + 0, + 4]], + 0, + "RangeView"], + ["SettingCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Setting", + 1, + 18, + 0, + 4], + ["add", + "Setting", + 2, + 9], + ["getItemOrNullObject", + "Setting", + 1, + 2, + 0, + 4]], + 0, + "Setting", + [["SettingsChanged", + 3, + 0, + "_CC.office10EventIdSettingsChangedEvent", + "", + "", + ""]]], + ["Setting", + 8, + [["key", + 3], + ["value", + 5], + ["_Id", + 2]], + 0, + [["delete"]]], + ["NamedItemCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "NamedItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "NamedItem", + 1, + 2, + 15, + 4], + ["add", + "NamedItem", + 3, + 8, + 15], + ["addFormulaLocal", + "NamedItem", + 3, + 0, + 15]], + 0, + "NamedItem", + [["Added", + 0, + 3, + "MessageType.namedItemAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.namedItemDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["NamedItem", + 0, + [["name", + 3], + ["type", + 3], + ["value", + 3], + ["visible", + 1], + ["_Id", + 2], + ["comment", + 1, + 15], + ["scope", + 3, + 15], + ["formula", + 1, + 11], + ["valueAsJson", + 3, + 24], + ["valueAsJsonLocal", + 3, + 24]], + [["worksheet", + "Worksheet", + 2, + 15, + 0, + 4], + ["worksheetOrNullObject", + "Worksheet", + 2, + 15, + 0, + 4], + ["arrayValues", + "NamedItemArrayValues", + 3, + 11, + 0, + 4]], + [["delete", + 0, + 0, + 15]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 15, + 4]]], + ["NamedItemArrayValues", + 0, + [["values", + 3], + ["types", + 3], + ["valuesAsJson", + 3, + 24], + ["valuesAsJsonLocal", + 3, + 24]]], + ["Binding", + 0, + [["id", + 3], + ["type", + 3]], + 0, + [["getText", + 0, + 2, + 0, + 4], + ["delete", + 0, + 0, + 14]], + [["getTable", + "Table", + 0, + 2, + 0, + 4], + ["getRange", + "Range", + 0, + 2, + 0, + 4]], + 0, + 0, + [["DataChanged", + 3, + 14, + "_CC.office10EventIdBindingDataChangedEvent", + "this.id", + "", + ""], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdBindingSelectionChangedEvent", + "this.id", + "", + ""]]], + ["BindingCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "Binding", + 1, + 18, + 0, + 4], + ["getItemAt", + "Binding", + 1, + 2, + 0, + 4], + ["add", + "Binding", + 3, + 8, + 14], + ["addFromNamedItem", + "Binding", + 3, + 0, + 14], + ["addFromSelection", + "Binding", + 2, + 0, + 14], + ["getItemOrNullObject", + "Binding", + 1, + 2, + 15, + 4]], + 0, + "Binding"], + ["TableCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1]], + [["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemAt", + "Table", + 1, + 2, + 0, + 4], + ["add", + "Table", + 2, + 8, + 0, + 2, + 0, + 0, + 33], + ["getItemOrNullObject", + "Table", + 1, + 2, + 15, + 4], + ["addQueryTable", + "Table", + 2, + 0, + 8]], + 0, + "Table", + [["Added", + 0, + 6, + "MessageType.tableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this._eventTargetId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Deleted", + 0, + 6, + "MessageType.tableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this._eventTargetId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"]]], + ["TableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getFirst", + "Table", + 0, + 10, + 0, + 4], + ["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Table", + 1, + 2, + 18, + 4]], + 0, + "Table"], + ["Table", + 24, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 26], + ["showHeaders", + 1, + 0, + 0, + 2, + 33], + ["showTotals", + 1, + 0, + 0, + 2, + 33], + ["style", + 1, + 0, + 0, + 2, + 33], + ["highlightFirstColumn", + 1, + 14, + 0, + 2, + 33], + ["highlightLastColumn", + 1, + 14, + 0, + 2, + 33], + ["showBandedRows", + 1, + 14, + 0, + 2, + 33], + ["showBandedColumns", + 1, + 14, + 0, + 2, + 33], + ["showFilterButton", + 1, + 14, + 0, + 2, + 33], + ["legacyId", + 3, + 5]], + [["columns", + "TableColumnCollection", + 19, + 0, + 0, + 4], + ["rows", + "TableRowCollection", + 19, + 0, + 0, + 4], + ["sort", + "TableSort", + 3, + 13, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["tableStyle", + "TableStyle", + 35, + 8, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearFilters", + 0, + 0, + 13], + ["reapplyFilters", + 0, + 0, + 13, + 2, + 0, + 26], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["clearStyle", + 0, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["resize", + 1, + 0, + 23, + 2, + 0, + 26], + ["setStyle", + 1, + 0, + 8]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4], + ["convertToRange", + "Range", + 0, + 8, + 13, + 2, + 0, + 0, + 26]], + "workbook.tables", + 0, + [["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["SelectionChanged", + 2, + 11, + "MessageType.tableSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["TableColumnCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "TableColumn", + 1, + 18, + 0, + 4], + ["getItemAt", + "TableColumn", + 1, + 2, + 0, + 4], + ["add", + "TableColumn", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["getItemOrNullObject", + "TableColumn", + 1, + 2, + 15, + 4], + ["addAsJson", + "TableColumn", + 3, + 0, + 24]], + 0, + "TableColumn"], + ["TableColumn", + 0, + [["id", + 3], + ["index", + 3], + ["values", + 1], + ["name", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["filter", + "Filter", + 3, + 13, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4]]], + ["TableRowCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["deleteRows", + 1, + 0, + 19], + ["deleteRowsAt", + 2, + 0, + 19, + 2, + 0, + 26]], + [["getItemAt", + "TableRow", + 1, + 2, + 0, + 4], + ["add", + "TableRow", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["addAsJson", + "TableRow", + 3, + 0, + 24]], + 0, + "TableRow"], + ["TableRow", + 0, + [["index", + 3], + ["values", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + 0, + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["DataValidation", + 0, + [["type", + 3], + ["rule", + 1], + ["prompt", + 1], + ["errorAlert", + 1], + ["ignoreBlanks", + 1], + ["valid", + 3]], + 0, + [["clear"]], + [["getInvalidCells", + "RangeAreas", + 0, + 10, + 6, + 4], + ["getInvalidCellsOrNullObject", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["RemoveDuplicatesResult", + 0, + [["removed", + 3], + ["uniqueRemaining", + 3]]], + ["RangeFormat", + 0, + [["wrapText", + 1, + 0, + 0, + 2, + 32], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 32], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 32], + ["columnWidth", + 1, + 13, + 0, + 2, + 32], + ["rowHeight", + 1, + 13, + 0, + 2, + 32], + ["textOrientation", + 1, + 11, + 0, + 2, + 32], + ["useStandardHeight", + 1, + 11], + ["useStandardWidth", + 1, + 11], + ["readingOrder", + 1, + 6], + ["shrinkToFit", + 1, + 6], + ["indentLevel", + 1, + 6, + 0, + 2, + 32], + ["autoIndent", + 1, + 6]], + [["fill", + "RangeFill", + 35, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["protection", + "FormatProtection", + 35, + 13, + 0, + 4]], + [["autofitColumns", + 0, + 0, + 13, + 2, + 0, + 32], + ["autofitRows", + 0, + 0, + 13, + 2, + 0, + 32], + ["adjustIndent", + 1, + 0, + 7, + 2, + 0, + 34]]], + ["FormatProtection", + 0, + [["locked", + 1], + ["formulaHidden", + 1]]], + ["RangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6], + ["patternTintAndShade", + 1, + 6], + ["pattern", + 1, + 6], + ["patternColor", + 1, + 6]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 32]]], + ["RangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 32], + ["weight", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6]]], + ["RangeBorderCollection", + 1, + [["count", + 3], + ["tintAndShade", + 1, + 6]], + 0, + 0, + [["getItem", + "RangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "RangeBorder", + 1, + 2, + 0, + 4]], + 0, + "RangeBorder"], + ["RangeFont", + 0, + [["name", + 1, + 0, + 0, + 2, + 32], + ["size", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 12], + ["italic", + 1, + 0, + 0, + 2, + 32], + ["bold", + 1, + 0, + 0, + 2, + 32], + ["underline", + 1, + 0, + 0, + 2, + 32], + ["strikethrough", + 1, + 6, + 0, + 2, + 32], + ["subscript", + 1, + 6], + ["superscript", + 1, + 6], + ["tintAndShade", + 1, + 6]]], + ["ChartCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29]], + [["add", + "Chart", + 3, + 9, + 0, + 2, + 0, + 0, + 36], + ["getItemAt", + "Chart", + 1, + 2, + 0, + 4], + ["_GetItem", + "Chart", + 1, + 18, + 0, + 4], + ["getItem", + "Chart", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Chart", + 1, + 2, + 15, + 4]], + 0, + "Chart", + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this._ParentObject.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 5, + "MessageType.chartAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this._ParentObject.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 5, + "MessageType.chartDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Chart", + 0, + [["name", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 36], + ["left", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["height", + 1, + 0, + 0, + 2, + 36], + ["id", + 3, + 11], + ["showAllFieldButtons", + 1, + 11, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 37], + ["showDataLabelsOverMaximum", + 1, + 5, + 0, + 2, + 37], + ["categoryLabelLevel", + 1, + 5, + 0, + 2, + 37], + ["style", + 1, + 5, + 0, + 2, + 37], + ["displayBlanksAs", + 1, + 5, + 0, + 2, + 37], + ["plotBy", + 1, + 5, + 0, + 2, + 37], + ["plotVisibleOnly", + 1, + 5, + 0, + 2, + 37], + ["seriesNameLevel", + 1, + 5, + 0, + 2, + 37]], + [["title", + "ChartTitle", + 35, + 0, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 0, + 0, + 4], + ["legend", + "ChartLegend", + 35, + 0, + 0, + 4], + ["series", + "ChartSeriesCollection", + 19, + 0, + 0, + 4], + ["axes", + "ChartAxes", + 35, + 0, + 0, + 4], + ["format", + "ChartAreaFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["plotArea", + "ChartPlotArea", + 35, + 5, + 0, + 4], + ["pivotOptions", + "ChartPivotOptions", + 35, + 6, + 0, + 4]], + [["setData", + 2, + 1, + 0, + 2, + 0, + 36], + ["delete", + 0, + 0, + 0, + 2, + 0, + 36], + ["setPosition", + 2, + 0, + 0, + 2, + 0, + 36], + ["getImage", + 3, + 2, + 13, + 4], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["activate", + 0, + 2, + 6], + ["getDataRange", + 0, + 0, + 28], + ["getDataRangeOrNullObject", + 0, + 0, + 28]], + [["getDataTable", + "ChartDataTable", + 0, + 2, + 18, + 4], + ["getDataTableOrNullObject", + "ChartDataTable", + 0, + 2, + 18, + 4]], + 0, + 0, + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["ChartPivotOptions", + 0, + [["showAxisFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showLegendFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showReportFilterFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showValueFieldButtons", + 1, + 0, + 0, + 2, + 37]]], + ["ChartAreaFormat", + 0, + [["roundedCorners", + 1, + 6, + 0, + 2, + 37], + ["colorScheme", + 1, + 6, + 0, + 2, + 37]], + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartSeriesCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartSeries", + 1, + 2, + 0, + 4], + ["add", + "ChartSeries", + 2, + 8, + 11, + 2, + 0, + 0, + 36]], + 0, + "ChartSeries"], + ["ChartSeries", + 0, + [["name", + 1, + 0, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 10], + ["hasDataLabels", + 1, + 11, + 0, + 2, + 37], + ["filtered", + 1, + 11, + 0, + 2, + 37], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["showShadow", + 1, + 11, + 0, + 2, + 37], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36], + ["smooth", + 1, + 11, + 0, + 2, + 37], + ["plotOrder", + 1, + 11, + 0, + 2, + 37], + ["gapWidth", + 1, + 11, + 0, + 2, + 36], + ["doughnutHoleSize", + 1, + 11, + 0, + 2, + 36], + ["axisGroup", + 1, + 5, + 0, + 2, + 36], + ["explosion", + 1, + 5, + 0, + 2, + 37], + ["firstSliceAngle", + 1, + 5, + 0, + 2, + 37], + ["invertIfNegative", + 1, + 5, + 0, + 2, + 37], + ["bubbleScale", + 1, + 6, + 0, + 2, + 37], + ["secondPlotSize", + 1, + 5, + 0, + 2, + 37], + ["splitType", + 1, + 5, + 0, + 2, + 37], + ["splitValue", + 1, + 6, + 0, + 2, + 37], + ["varyByCategories", + 1, + 5, + 0, + 2, + 37], + ["showLeaderLines", + 1, + 6, + 0, + 2, + 37], + ["overlap", + 1, + 5, + 0, + 2, + 36], + ["gradientStyle", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointType", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumColor", + 1, + 6, + 0, + 2, + 37], + ["parentLabelStrategy", + 1, + 6, + 0, + 2, + 37], + ["showConnectorLines", + 1, + 6, + 0, + 2, + 37], + ["invertColor", + 1, + 6, + 0, + 2, + 37]], + [["points", + "ChartPointsCollection", + 19, + 0, + 0, + 4], + ["format", + "ChartSeriesFormat", + 35, + 0, + 0, + 4], + ["trendlines", + "ChartTrendlineCollection", + 19, + 11, + 0, + 4], + ["xErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["yErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 5, + 0, + 4], + ["binOptions", + "ChartBinOptions", + 35, + 6, + 0, + 4], + ["mapOptions", + "ChartMapOptions", + 35, + 6, + 0, + 4], + ["boxwhiskerOptions", + "ChartBoxwhiskerOptions", + 35, + 6, + 0, + 4]], + [["delete", + 0, + 0, + 11, + 2, + 0, + 36], + ["setXAxisValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setBubbleSizes", + 1, + 0, + 11, + 2, + 0, + 37], + ["getDimensionValues", + 1, + 0, + 27, + 2, + 0, + 37], + ["getDimensionDataSourceString", + 1, + 0, + 35], + ["getDimensionDataSourceType", + 1, + 0, + 35]]], + ["ChartSeriesFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartPointsCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartPoint", + 1, + 2, + 0, + 4]], + 0, + "ChartPoint"], + ["ChartPoint", + 0, + [["value", + 3], + ["hasDataLabel", + 1, + 11, + 0, + 2, + 37], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36]], + [["format", + "ChartPointFormat", + 35, + 0, + 0, + 4], + ["dataLabel", + "ChartDataLabel", + 35, + 11, + 0, + 4]]], + ["ChartPointFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartAxes", + 0, + 0, + [["categoryAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["seriesAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["valueAxis", + "ChartAxis", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ChartAxis", + 2, + 2, + 11, + 4]]], + ["ChartAxis", + 0, + [["majorUnit", + 1, + 0, + 0, + 2, + 37], + ["maximum", + 1, + 0, + 0, + 2, + 36], + ["minimum", + 1, + 0, + 0, + 2, + 36], + ["minorUnit", + 1, + 0, + 0, + 2, + 37], + ["displayUnit", + 1, + 11, + 0, + 2, + 36], + ["showDisplayUnitLabel", + 1, + 11, + 0, + 2, + 37], + ["customDisplayUnit", + 3, + 11], + ["type", + 3, + 11], + ["minorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["majorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["baseTimeUnit", + 1, + 11, + 0, + 2, + 37], + ["categoryType", + 1, + 11, + 0, + 2, + 37], + ["axisGroup", + 3, + 11], + ["scaleType", + 1, + 11, + 0, + 2, + 37], + ["logBase", + 1, + 11, + 0, + 2, + 37], + ["left", + 3, + 11], + ["top", + 3, + 11], + ["height", + 3, + 11], + ["width", + 3, + 11], + ["reversePlotOrder", + 1, + 11, + 0, + 2, + 36], + ["crosses", + 1, + 11, + 0, + 2, + 36], + ["crossesAt", + 3, + 11], + ["visible", + 1, + 11, + 0, + 2, + 37], + ["isBetweenCategories", + 1, + 5, + 0, + 2, + 36], + ["majorTickMark", + 1, + 11, + 0, + 2, + 37], + ["minorTickMark", + 1, + 11, + 0, + 2, + 37], + ["tickMarkSpacing", + 1, + 11, + 0, + 2, + 37], + ["tickLabelPosition", + 1, + 11, + 0, + 2, + 36], + ["tickLabelSpacing", + 1, + 11, + 0, + 2, + 37], + ["alignment", + 1, + 5, + 0, + 2, + 37], + ["multiLevel", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["offset", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["position", + 1, + 5, + 0, + 2, + 36], + ["positionAt", + 3, + 5]], + [["majorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["minorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["title", + "ChartAxisTitle", + 35, + 0, + 0, + 4], + ["format", + "ChartAxisFormat", + 35, + 0, + 0, + 4]], + [["setCategoryNames", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCustomDisplayUnit", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCrossesAt", + 1, + 0, + 11, + 2, + 0, + 37], + ["setPositionAt", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4]]], + ["ChartAxisTitle", + 0, + [["text", + 1, + 0, + 0, + 2, + 36], + ["visible", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 27, + 0, + 2, + 37]], + [["format", + "ChartAxisTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataLabels", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataLabel", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 5, + 0, + 2, + 37], + ["left", + 1, + 5, + 0, + 2, + 37], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["formula", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["text", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 5, + 0, + 4]], + 0, + [["getSubstring", + "ChartFormatString", + 2, + 2, + 8, + 4]]], + ["ChartDataLabelFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataTable", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showHorizontalBorder", + 1, + 0, + 0, + 2, + 37], + ["showVerticalBorder", + 1, + 0, + 0, + 2, + 37], + ["showOutlineBorder", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartDataTableFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataTableFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4]]], + ["ChartErrorBars", + 0, + [["endStyleCap", + 1, + 0, + 0, + 2, + 37], + ["include", + 1, + 0, + 0, + 2, + 37], + ["type", + 1, + 0, + 0, + 2, + 37], + ["visible", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartErrorBarsFormat", + 35, + 0, + 0, + 4]]], + ["ChartErrorBarsFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlines", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36]], + [["format", + "ChartGridlinesFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlinesFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartLegend", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36], + ["position", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["width", + 1, + 11, + 0, + 2, + 37], + ["height", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartLegendFormat", + 35, + 0, + 0, + 4], + ["legendEntries", + "ChartLegendEntryCollection", + 19, + 11, + 0, + 4]]], + ["ChartLegendEntry", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["left", + 3, + 5], + ["top", + 3, + 5], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["index", + 3, + 5]]], + ["ChartLegendEntryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "ChartLegendEntry", + 1, + 2, + 0, + 4]], + 0, + "ChartLegendEntry"], + ["ChartLegendFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartMapOptions", + 0, + [["level", + 1, + 0, + 0, + 2, + 37], + ["labelStrategy", + 1, + 0, + 0, + 2, + 37], + ["projectionType", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTitle", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["width", + 3, + 11], + ["height", + 3, + 11], + ["verticalAlignment", + 1, + 11, + 0, + 2, + 37], + ["textOrientation", + 1, + 11, + 0, + 2, + 37], + ["position", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 11, + 2, + 0, + 37]], + [["getSubstring", + "ChartFormatString", + 2, + 2, + 11, + 4]]], + ["ChartFormatString", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartFill", + 4, + 0, + 0, + [["setSolidColor", + 1, + 0, + 0, + 2, + 0, + 36], + ["clear", + 0, + 0, + 0, + 2, + 0, + 37], + ["getSolidColor", + 0, + 0, + 24, + 2, + 0, + 37]]], + ["ChartBorder", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 0, + 0, + 2, + 36], + ["weight", + 1, + 0, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 5, + 2, + 0, + 37]]], + ["ChartBinOptions", + 0, + [["type", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["count", + 1, + 0, + 0, + 2, + 36], + ["allowOverflow", + 1, + 0, + 0, + 2, + 37], + ["allowUnderflow", + 1, + 0, + 0, + 2, + 37], + ["overflowValue", + 1, + 0, + 0, + 2, + 36], + ["underflowValue", + 1, + 0, + 0, + 2, + 36]]], + ["ChartBoxwhiskerOptions", + 0, + [["showInnerPoints", + 1, + 0, + 0, + 2, + 37], + ["showOutlierPoints", + 1, + 0, + 0, + 2, + 37], + ["showMeanMarker", + 1, + 0, + 0, + 2, + 37], + ["showMeanLine", + 1, + 0, + 0, + 2, + 37], + ["quartileCalculation", + 1, + 0, + 0, + 2, + 37]]], + ["ChartLineFormat", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 11, + 0, + 2, + 36], + ["weight", + 1, + 11, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartFont", + 0, + [["bold", + 1, + 0, + 0, + 2, + 37], + ["color", + 1, + 0, + 0, + 2, + 36], + ["italic", + 1, + 0, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["size", + 1, + 0, + 0, + 2, + 37], + ["underline", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTrendline", + 0, + [["type", + 1, + 0, + 0, + 2, + 37], + ["polynomialOrder", + 1, + 0, + 0, + 2, + 37], + ["movingAveragePeriod", + 1, + 0, + 0, + 2, + 37], + ["_Id", + 2], + ["showEquation", + 1, + 5, + 0, + 2, + 37], + ["showRSquared", + 1, + 5, + 0, + 2, + 37], + ["forwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["backwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["intercept", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartTrendlineFormat", + 35, + 0, + 0, + 4], + ["label", + "ChartTrendlineLabel", + 35, + 5, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartTrendlineCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "ChartTrendline", + 1, + 8, + 0, + 2, + 0, + 0, + 36], + ["getItem", + "ChartTrendline", + 1, + 18, + 0, + 4]], + 0, + "ChartTrendline"], + ["ChartTrendlineFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabel", + 0, + [["top", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 0, + 0, + 2, + 37], + ["width", + 3], + ["height", + 3], + ["formula", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 37], + ["autoText", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 0, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37]], + [["format", + "ChartTrendlineLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabelFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartPlotArea", + 0, + [["left", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 37], + ["width", + 1, + 0, + 0, + 2, + 37], + ["height", + 1, + 0, + 0, + 2, + 37], + ["insideLeft", + 1, + 0, + 0, + 2, + 37], + ["insideTop", + 1, + 0, + 0, + 2, + 37], + ["insideWidth", + 1, + 0, + 0, + 2, + 37], + ["insideHeight", + 1, + 0, + 0, + 2, + 37], + ["position", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartPlotAreaFormat", + 35, + 0, + 0, + 4]]], + ["ChartPlotAreaFormat", + 0, + 0, + [["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4]]], + ["VisualCollection", + 5, + 0, + 0, + [["getDefinitions", + 0, + 2, + 0, + 4], + ["getPreview", + 4, + 2, + 0, + 4], + ["bootstrapAgaveVisual", + 0, + 0, + 0, + 2], + ["getCount", + 0, + 2, + 0, + 4], + ["_RegisterSelectionChangedEvent", + 0, + 2], + ["_UnregisterSelectionChangedEvent", + 0, + 2]], + [["add", + "Visual", + 3, + 8, + 0, + 2], + ["_GetItem", + "Visual", + 1, + 18, + 0, + 4], + ["getSelectedOrNullObject", + "Visual", + 0, + 2, + 0, + 4]], + 0, + "Visual", + [["AgaveVisualUpdate", + 2, + 0, + "MessageType.agaveVisualUpdateEvent", + "", + "null", + "null"], + ["SelectionChanged", + 0, + 0, + "MessageType.visualSelectionChangedEvent", + "this._ParentObject.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["Visual", + 0, + [["id", + 3], + ["isSupportedInVisualTaskpane", + 3]], + [["properties", + "VisualPropertyCollection", + 18, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2], + ["getProperty", + 1, + 2, + 0, + 4], + ["setProperty", + 2, + 0, + 0, + 2], + ["changeDataSource", + 2, + 0, + 0, + 2], + ["getDataSource", + 0, + 2, + 0, + 4], + ["setPropertyToDefault", + 1, + 0, + 0, + 2], + ["_RegisterChangeEvent", + 0, + 2], + ["_UnregisterChangeEvent", + 0, + 2], + ["serializeProperties", + 0, + 2, + 0, + 4], + ["deserializeProperties", + 1, + 0, + 0, + 2], + ["addChildProperty", + 2, + 0, + 19, + 2], + ["removeChildProperty", + 2, + 0, + 19, + 2], + ["getDataFieldAssignments", + 0, + 0, + 3], + ["getDataConfig", + 0, + 2, + 3, + 4], + ["modifyDataConfig", + 1, + 0, + 3, + 2]], + [["getChildProperties", + "VisualPropertyCollection", + 2, + 6, + 0, + 4], + ["getDataControllerClient", + "DataControllerClient", + 0, + 2, + 0, + 4], + ["getElementChildProperties", + "VisualPropertyCollection", + 3, + 6, + 0, + 4]], + 0, + 0, + [["ChangeNotification", + 2, + 0, + "MessageType.visualChangeEvent", + "this.id", + "_RegisterChangeEvent", + "_UnregisterChangeEvent"]]], + ["VisualProperty", + 0, + [["type", + 3], + ["value", + 3], + ["id", + 3], + ["localizedName", + 3], + ["options", + 3], + ["localizedOptions", + 3], + ["hasDefault", + 3], + ["isDefault", + 3], + ["min", + 3], + ["max", + 3], + ["stepSize", + 3], + ["hideMeButShowChildrenUI", + 3], + ["expandableUI", + 3], + ["nextPropOnSameLine", + 3], + ["showResetUI", + 3], + ["size", + 3, + 19], + ["minSize", + 3, + 19], + ["maxSize", + 3, + 19], + ["index", + 3, + 19], + ["parentName", + 3, + 19]], + 0, + [["getBoolMetaProperty", + 1, + 2, + 0, + 4]]], + ["VisualPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "VisualProperty", + 1, + 18, + 0, + 4], + ["getItemAt", + "VisualProperty", + 1, + 2, + 0, + 4]], + 0, + "VisualProperty"], + ["DataControllerClient", + 0, + 0, + 0, + [["getWells", + 0, + 2, + 0, + 4], + ["getAssociatedFields", + 1, + 2, + 0, + 4], + ["getAvailableFields", + 1, + 2, + 0, + 4], + ["addField", + 3, + 0, + 0, + 2], + ["removeField", + 2, + 0, + 0, + 2], + ["moveField", + 3, + 0, + 0, + 2]]], + ["RangeSort", + 0, + 0, + 0, + [["apply", + 5, + 0, + 0, + 2, + 0, + 32]]], + ["TableSort", + 0, + [["matchCase", + 3], + ["method", + 3], + ["fields", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 26], + ["clear"], + ["reapply"]]], + ["Filter", + 0, + [["criteria", + 3]], + 0, + [["apply", + 1], + ["clear", + 0, + 0, + 0, + 2, + 0, + 34], + ["applyBottomItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyBottomPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCellColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyDynamicFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyFontColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyValuesFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyIconFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCustomFilter", + 3, + 0, + 0, + 2, + 0, + 34]]], + ["AutoFilter", + 0, + [["enabled", + 3], + ["isDataFiltered", + 3], + ["criteria", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 33], + ["reapply", + 0, + 0, + 0, + 2, + 0, + 26], + ["remove", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearCriteria", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearColumnCriteria", + 1, + 0, + 18]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["CultureInfo", + 0, + [["name", + 3]], + [["numberFormat", + "NumberFormatInfo", + 3, + 0, + 0, + 4], + ["datetimeFormat", + "DatetimeFormatInfo", + 3, + 27, + 0, + 4]]], + ["NumberFormatInfo", + 0, + [["numberDecimalSeparator", + 3], + ["numberGroupSeparator", + 3], + ["currencySymbol", + 3, + 30]]], + ["DatetimeFormatInfo", + 0, + [["dateSeparator", + 3], + ["longDatePattern", + 3], + ["shortDatePattern", + 3], + ["timeSeparator", + 3], + ["longTimePattern", + 3]]], + ["CustomXmlPartScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4], + ["getOnlyItem", + "CustomXmlPart", + 0, + 2, + 0, + 4], + ["getOnlyItemOrNullObject", + "CustomXmlPart", + 0, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPartCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["add", + "CustomXmlPart", + 1, + 8], + ["getByNamespace", + "CustomXmlPartScopedCollection", + 1, + 6, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPart", + 0, + [["id", + 3], + ["namespaceUri", + 3]], + 0, + [["delete"], + ["getXml", + 0, + 2, + 0, + 4], + ["setXml", + 1]]], + ["_V1Api", + 0, + 0, + 0, + [["bindingGetData", + 1, + 2, + 0, + 4], + ["getSelectedData", + 1, + 2, + 0, + 4], + ["gotoById", + 1, + 2, + 0, + 4], + ["bindingAddFromSelection", + 1, + 2], + ["bindingGetById", + 1, + 2, + 0, + 4], + ["bindingReleaseById", + 1, + 2], + ["bindingGetAll", + 0, + 2, + 0, + 4], + ["bindingAddFromNamedItem", + 1, + 2], + ["bindingAddFromPrompt", + 1, + 2], + ["bindingDeleteAllDataValues", + 1], + ["setSelectedData", + 1], + ["bindingClearFormats", + 1], + ["bindingSetData", + 1], + ["bindingSetFormats", + 1], + ["bindingSetTableOptions", + 1], + ["bindingAddRows", + 1], + ["bindingAddColumns", + 1], + ["getFilePropertiesAsync", + 0, + 2, + 9, + 4]]], + ["PivotTableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getFirst", + "PivotTable", + 0, + 10, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 0, + 4], + ["getFirstOrNullObject", + "PivotTable", + 0, + 2, + 35, + 4]], + 0, + "PivotTable"], + ["PivotTableCollection", + 5, + 0, + 0, + [["refreshAll", + 0, + 0, + 0, + 2, + 0, + 12], + ["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 15, + 4], + ["add", + "PivotTable", + 3, + 8, + 5, + 2, + 0, + 0, + 12]], + 0, + "PivotTable", + [["Added", + 0, + 3, + "MessageType.pivotTableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.pivotTableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["PivotTable", + 0, + [["name", + 1, + 0, + 0, + 2, + 12], + ["id", + 3, + 16], + ["useCustomSortLists", + 1, + 6, + 0, + 2, + 12], + ["enableDataValueEditing", + 1, + 6, + 0, + 2, + 12], + ["refreshOnOpen", + 0, + 23, + 0, + 2, + 29], + ["allowMultipleFiltersPerField", + 0, + 27, + 0, + 2, + 12]], + [["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["hierarchies", + "PivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["rowHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["columnHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["dataHierarchies", + "DataPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["filterHierarchies", + "FilterPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["layout", + "PivotLayout", + 2, + 5, + 0, + 4]], + [["refresh", + 0, + 0, + 0, + 2, + 0, + 12], + ["delete", + 0, + 0, + 5, + 2, + 0, + 12], + ["getDataSourceString", + 0, + 2, + 35, + 4], + ["getDataSourceType", + 0, + 2, + 35, + 4]], + [["addDateGroup", + "PivotHierarchy", + 2, + 0, + 8, + 2, + 0, + 0, + 38]]], + ["PivotLayout", + 0, + [["showColumnGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["showRowGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["enableFieldList", + 1, + 17, + 0, + 2, + 12], + ["subtotalLocation", + 1, + 0, + 0, + 2, + 12], + ["layoutType", + 1, + 0, + 0, + 2, + 12], + ["autoFormat", + 1, + 6, + 0, + 2, + 12], + ["preserveFormatting", + 1, + 6, + 0, + 2, + 12], + ["altTextDescription", + 0, + 23, + 0, + 2, + 29], + ["altTextTitle", + 0, + 23, + 0, + 2, + 29], + ["emptyCellText", + 0, + 23, + 0, + 2, + 29], + ["fillEmptyCells", + 0, + 23, + 0, + 2, + 29], + ["showFieldHeaders", + 0, + 23, + 0, + 2, + 29], + ["tabularValues", + 3, + 8], + ["tabularText", + 3, + 8], + ["tabularNumberFormat", + 3, + 8], + ["tabularNumberFormatLocal", + 3, + 8]], + [["pivotStyle", + "PivotTableStyle", + 35, + 8, + 0, + 4]], + [["setAutoSortOnCell", + 2, + 0, + 6, + 2, + 0, + 12], + ["setStyle", + 1, + 0, + 8, + 2, + 0, + 12], + ["displayBlankLineAfterEachItem", + 1, + 0, + 23, + 2, + 0, + 29], + ["repeatAllItemLabels", + 1, + 0, + 23, + 2, + 0, + 29]], + [["getRange", + "Range", + 0, + 3], + ["getRowLabelRange", + "Range", + 0, + 3], + ["getColumnLabelRange", + "Range", + 0, + 3], + ["getFilterAxisRange", + "Range", + 0, + 3], + ["getDataBodyRange", + "Range", + 0, + 3], + ["getCell", + "Range", + 3, + 2, + 8], + ["getPivotItems", + "PivotItemCollection", + 2, + 4, + 6], + ["getDataHierarchy", + "DataPivotHierarchy", + 1, + 3, + 6]]], + ["PivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotHierarchy", + 1, + 2, + 0, + 4]], + 0, + "PivotHierarchy"], + ["PivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]]], + ["RowColumnPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "RowColumnPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "RowColumnPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "RowColumnPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "RowColumnPivotHierarchy"], + ["RowColumnPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["FilterPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "FilterPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "FilterPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "FilterPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "FilterPivotHierarchy"], + ["FilterPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["enableMultipleFilterItems", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["DataPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "DataPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DataPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "DataPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "DataPivotHierarchy"], + ["DataPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["numberFormat", + 1, + 0, + 0, + 2, + 12], + ["summarizeBy", + 1, + 0, + 0, + 2, + 12], + ["showAs", + 1, + 0, + 0, + 2, + 12]], + [["field", + "PivotField", + 35, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["PivotFieldCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotField", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotField", + 1, + 2, + 0, + 4]], + 0, + "PivotField"], + ["PivotField", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["subtotals", + 1, + 0, + 0, + 2, + 12], + ["showAllItems", + 1, + 0, + 0, + 2, + 12]], + [["items", + "PivotItemCollection", + 19, + 0, + 0, + 4]], + [["sortByLabels", + 1, + 1, + 0, + 2, + 0, + 12], + ["sortByValues", + 3, + 0, + 6, + 2, + 0, + 12], + ["applyFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["clearAllFilters", + 0, + 0, + 27, + 2, + 0, + 12], + ["clearFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["getFilters", + 0, + 0, + 27], + ["isFiltered", + 1, + 0, + 27]]], + ["PivotItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotItem", + 1, + 2, + 0, + 4]], + 0, + "PivotItem"], + ["PivotItem", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["isExpanded", + 1, + 0, + 0, + 2, + 12], + ["visible", + 1, + 0, + 0, + 2, + 12]]], + ["WorksheetCustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["_Id", + 2]], + 0, + [["delete"]]], + ["WorksheetCustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "WorksheetCustomProperty", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "WorksheetCustomProperty", + 1], + ["add", + "WorksheetCustomProperty", + 2, + 8]], + 0, + "WorksheetCustomProperty"], + ["DocumentProperties", + 0, + [["title", + 1], + ["subject", + 1], + ["author", + 1], + ["keywords", + 1], + ["comments", + 1], + ["lastAuthor", + 3], + ["revisionNumber", + 1], + ["creationDate", + 11], + ["category", + 1], + ["manager", + 1], + ["company", + 1]], + [["custom", + "CustomPropertyCollection", + 19, + 0, + 0, + 4]]], + ["CustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["type", + 3]], + 0, + [["delete"]]], + ["CustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["deleteAll"]], + [["getItemOrNullObject", + "CustomProperty", + 1, + 2, + 0, + 4], + ["add", + "CustomProperty", + 2, + 8], + ["getItem", + "CustomProperty", + 1, + 18, + 0, + 4]], + 0, + "CustomProperty"], + ["ConditionalFormatCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["clearAll", + 0, + 0, + 0, + 2, + 0, + 39]], + [["getItemAt", + "ConditionalFormat", + 1, + 2, + 0, + 4], + ["add", + "ConditionalFormat", + 1, + 8, + 0, + 2, + 0, + 0, + 39], + ["getItem", + "ConditionalFormat", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "ConditionalFormat", + 1, + 2, + 18, + 4]], + 0, + "ConditionalFormat"], + ["ConditionalFormat", + 0, + [["stopIfTrue", + 1], + ["priority", + 1], + ["type", + 3], + ["id", + 3]], + [["dataBarOrNullObject", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["dataBar", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["customOrNullObject", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["custom", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSet", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSetOrNullObject", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScale", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScaleOrNullObject", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottom", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottomOrNullObject", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["preset", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["presetOrNullObject", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparison", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparisonOrNullObject", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValue", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValueOrNullObject", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 40], + ["changeRuleToCellValue", + 1, + 0, + 30], + ["changeRuleToColorScale", + 0, + 0, + 30], + ["changeRuleToContainsText", + 1, + 0, + 30], + ["changeRuleToCustom", + 1, + 0, + 30], + ["changeRuleToDataBar", + 0, + 0, + 30], + ["changeRuleToIconSet", + 0, + 0, + 30], + ["changeRuleToPresetCriteria", + 1, + 0, + 30], + ["changeRuleToTopBottom", + 1, + 0, + 30], + ["setRanges", + 1, + 0, + 30]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getRanges", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["DataBarConditionalFormat", + 0, + [["showDataBarOnly", + 1, + 0, + 0, + 2, + 40], + ["barDirection", + 1, + 0, + 0, + 2, + 41], + ["axisFormat", + 1, + 0, + 0, + 2, + 41], + ["axisColor", + 1, + 0, + 0, + 2, + 41], + ["lowerBoundRule", + 1, + 0, + 0, + 2, + 41], + ["upperBoundRule", + 1, + 0, + 0, + 2, + 41]], + [["positiveFormat", + "ConditionalDataBarPositiveFormat", + 35, + 0, + 0, + 4], + ["negativeFormat", + "ConditionalDataBarNegativeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalDataBarPositiveFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["gradientFill", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40]]], + ["ConditionalDataBarNegativeFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveFillColor", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveBorderColor", + 1, + 0, + 0, + 2, + 40]]], + ["CustomConditionalFormat", + 0, + 0, + [["rule", + "ConditionalFormatRule", + 35, + 0, + 0, + 4], + ["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalFormatRule", + 0, + [["formula", + 1, + 0, + 0, + 2, + 41], + ["formulaLocal", + 1], + ["formulaR1C1", + 1]]], + ["IconSetConditionalFormat", + 0, + [["reverseIconOrder", + 1, + 0, + 0, + 2, + 41], + ["showIconOnly", + 1, + 0, + 0, + 2, + 41], + ["style", + 1, + 0, + 0, + 2, + 41], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["ColorScaleConditionalFormat", + 0, + [["threeColorScale", + 3], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["TopBottomConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["PresetCriteriaConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["TextConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["CellValueConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalRangeFormat", + 0, + [["numberFormat", + 1]], + [["fill", + "ConditionalRangeFill", + 35, + 0, + 0, + 4], + ["font", + "ConditionalRangeFont", + 35, + 0, + 0, + 4], + ["borders", + "ConditionalRangeBorderCollection", + 51, + 0, + 0, + 4]], + [["clearFormat", + 0, + 0, + 30]]], + ["ConditionalRangeFont", + 0, + [["color", + 1, + 0, + 0, + 2, + 42], + ["italic", + 1, + 0, + 0, + 2, + 42], + ["bold", + 1, + 0, + 0, + 2, + 42], + ["underline", + 1, + 0, + 0, + 2, + 42], + ["strikethrough", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 42], + ["color", + 1, + 0, + 0, + 2, + 42]]], + ["ConditionalRangeBorderCollection", + 1, + [["count", + 3]], + [["top", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["bottom", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["left", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["right", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ConditionalRangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "ConditionalRangeBorder", + 1, + 2, + 0, + 4]], + 0, + "ConditionalRangeBorder"], + ["NumberFormattingService", + 0, + 0, + 0, + 0, + [["getFormatter", + "NumberFormatter", + 1, + 3]], + 0, + 0, + 0, + "Microsoft.ExcelServices.NumberFormattingService", + 4], + ["NumberFormatter", + 0, + [["isDateTime", + 3], + ["isPercent", + 3], + ["isCurrency", + 3], + ["isNumeric", + 3], + ["isText", + 3], + ["hasYear", + 3], + ["hasMonth", + 3], + ["hasDayOfWeek", + 3]], + 0, + [["format", + 1, + 3]]], + ["CustomFunctionManager", + 36, + [["status", + 2]], + 0, + [["register", + 2]], + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.CustomFunctionManager", + 4], + ["Style", + 0, + [["builtIn", + 3], + ["formulaHidden", + 1], + ["horizontalAlignment", + 1], + ["includeAlignment", + 1], + ["includeBorder", + 1], + ["includeFont", + 1], + ["includeNumber", + 1], + ["includePatterns", + 1], + ["includeProtection", + 1], + ["indentLevel", + 1], + ["locked", + 1], + ["name", + 3], + ["numberFormat", + 1], + ["numberFormatLocal", + 1], + ["readingOrder", + 1], + ["shrinkToFit", + 1], + ["verticalAlignment", + 1], + ["wrapText", + 1], + ["textOrientation", + 5, + 5], + ["autoIndent", + 1, + 5]], + [["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["fill", + "RangeFill", + 35, + 0, + 0, + 4]], + [["delete"]]], + ["StyleCollection", + 1, + 0, + 0, + [["add", + 1], + ["getCount", + 0, + 2, + 6, + 4]], + [["getItem", + "Style", + 1, + 18, + 0, + 4], + ["getItemAt", + "Style", + 1, + 2, + 6, + 4], + ["getItemOrNullObject", + "Style", + 1, + 2, + 18, + 4]], + 0, + "Style"], + ["TableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TableStyle", + 1, + 2, + 0, + 4], + ["add", + "TableStyle", + 2, + 8], + ["getDefault", + "TableStyle"]], + 0, + "TableStyle"], + ["TableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TableStyle"]]], + ["PivotTableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "PivotTableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTableStyle", + 1, + 2, + 0, + 4], + ["add", + "PivotTableStyle", + 2, + 8], + ["getDefault", + "PivotTableStyle"]], + 0, + "PivotTableStyle"], + ["PivotTableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "PivotTableStyle"]]], + ["SlicerStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "SlicerStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerStyle", + 1, + 2, + 0, + 4], + ["add", + "SlicerStyle", + 2, + 8], + ["getDefault", + "SlicerStyle"]], + 0, + "SlicerStyle"], + ["SlicerStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "SlicerStyle"]]], + ["TimelineStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TimelineStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TimelineStyle", + 1, + 2, + 0, + 4], + ["add", + "TimelineStyle", + 2, + 8], + ["getDefault", + "TimelineStyle"]], + 0, + "TimelineStyle"], + ["TimelineStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TimelineStyle"]]], + ["InternalTest", + 0, + 0, + 0, + [["delay", + 1], + ["triggerMessage", + 4, + 0, + 11], + ["_RegisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEvent", + 2, + 0, + 11], + ["triggerPostProcess", + 0, + 0, + 11], + ["_RegisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEventWithFilter", + 3, + 0, + 11], + ["firstPartyMethod", + 0, + 2, + 11, + 5], + ["_RegisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_RegisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["unregisterAllCustomFunctionExecutionEvents", + 0, + 0, + 20], + ["updateRangeValueOnCurrentSheet", + 2, + 0, + 3, + 2], + ["triggerUserUndo", + 0, + 2, + 3], + ["triggerUserRedo", + 0, + 2, + 3], + ["enterCellEdit", + 1, + 0, + 6], + ["installCustomFunctionsFromCache", + 0, + 0, + 6], + ["recalc", + 2, + 0, + 6], + ["recalcBySolutionId", + 1, + 0, + 6], + ["safeForCellEditModeMethod", + 1, + 0, + 6], + ["exitCellEdit", + 0, + 0, + 6], + ["noPermissionMethod", + 1, + 0, + 6], + ["verifyCustomFunctionListExist", + 0, + 0, + 6], + ["enableContentWorkbookLink", + 0, + 0, + 3], + ["previewExecutionMethod", + 1, + 0, + 8, + 16], + ["setRapidJsonEnabled", + 1, + 0, + 8], + ["triggerVbaRecorderRecordingChanged", + 2, + 0, + 8]], + 0, + 0, + 0, + [["CustomFunctionExecutionBeginEvent", + 0, + 20, + "MessageType.customFunctionExecutionBeginEvent", + "", + "_RegisterCustomFunctionExecutionBeginEvent", + "_UnregisterCustomFunctionExecutionBeginEvent"], + ["CustomFunctionExecutionEndEvent", + 0, + 20, + "MessageType.customFunctionExecutionEndEvent", + "", + "_RegisterCustomFunctionExecutionEndEvent", + "_UnregisterCustomFunctionExecutionEndEvent"], + ["Test1Event", + 2, + 11, + "MessageType.test1Event", + "", + "_RegisterTest1Event", + "_UnregisterTest1Event"], + ["TestEvent", + 2, + 11, + "MessageType.testEvent", + "", + "_RegisterTestEvent", + "_UnregisterTestEvent"]], + "Microsoft.ExcelServices.InternalTest", + 4], + ["PageLayout", + 0, + [["orientation", + 1], + ["paperSize", + 1], + ["blackAndWhite", + 1], + ["printErrors", + 1], + ["zoom", + 1], + ["centerHorizontally", + 1], + ["centerVertically", + 1], + ["printHeadings", + 1], + ["printGridlines", + 1], + ["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["headerMargin", + 1], + ["footerMargin", + 1], + ["printComments", + 1], + ["draftMode", + 1], + ["firstPageNumber", + 1], + ["printOrder", + 1]], + [["headersFooters", + "HeaderFooterGroup", + 35, + 0, + 0, + 4]], + [["setPrintMargins", + 2], + ["setPrintArea", + 1], + ["setPrintTitleRows", + 1], + ["setPrintTitleColumns", + 1]], + [["getPrintArea", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintAreaOrNullObject", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintTitleRows", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleRowsOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumns", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumnsOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["HeaderFooter", + 0, + [["leftHeader", + 1], + ["centerHeader", + 1], + ["rightHeader", + 1], + ["leftFooter", + 1], + ["centerFooter", + 1], + ["rightFooter", + 1]]], + ["HeaderFooterGroup", + 0, + [["state", + 1], + ["useSheetMargins", + 1], + ["useSheetScale", + 1]], + [["defaultForAllPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["firstPage", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["evenPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["oddPages", + "HeaderFooter", + 35, + 0, + 0, + 4]]], + ["PageBreak", + 0, + [["_Id", + 2], + ["columnIndex", + 3], + ["rowIndex", + 3]], + 0, + [["delete"]], + [["getCellAfterBreak", + "Range", + 0, + 10, + 0, + 4]]], + ["PageBreakCollection", + 1, + 0, + 0, + [["removePageBreaks"], + ["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PageBreak", + 1, + 18, + 0, + 4], + ["add", + "PageBreak", + 1, + 8]], + 0, + "PageBreak"], + ["DataConnectionCollection", + 0, + 0, + 0, + [["refreshAll"]], + [["add", + "DataConnection", + 4, + 8, + 8, + 2, + 0, + 0, + 12]]], + ["RangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "Range", + 1, + 2, + 0, + 4]], + 0, + "Range"], + ["RangeAreasCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeAreas", + 1, + 2, + 0, + 4]], + 0, + "RangeAreas"], + ["CommentCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 2, + 27], + ["_UnregisterAddedEvent", + 0, + 2, + 27], + ["_RegisterDeletedEvent", + 0, + 2, + 27], + ["_UnregisterDeletedEvent", + 0, + 2, + 27], + ["_RegisterChangedEvent", + 0, + 2, + 27], + ["_UnregisterChangedEvent", + 0, + 2, + 27]], + [["getItem", + "Comment", + 1, + 18, + 0, + 4], + ["getItemAt", + "Comment", + 1, + 2, + 0, + 4], + ["add", + "Comment", + 3, + 8], + ["getItemByReplyId", + "Comment", + 1, + 2, + 0, + 4], + ["getItemByCell", + "Comment", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Comment", + 1, + 2, + 18, + 4]], + 0, + "Comment", + [["Added", + 0, + 27, + "MessageType.commentAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 0, + 27, + "MessageType.commentChangedEvent", + "this._eventTargetId", + "_RegisterChangedEvent", + "_UnregisterChangedEvent"], + ["Deleted", + 0, + 27, + "MessageType.commentDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Comment", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 1, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + [["replies", + "CommentReplyCollection", + 19, + 0, + 0, + 4]], + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["CommentReplyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "CommentReply", + 2, + 8], + ["getItem", + "CommentReply", + 1, + 18, + 0, + 4], + ["getItemAt", + "CommentReply", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "CommentReply", + 1, + 2, + 18, + 4]], + 0, + "CommentReply"], + ["CommentReply", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 3, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + 0, + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getParentComment", + "Comment"], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["ShapeCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["addImage", + "Shape", + 1], + ["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["addGeometricShape", + "Shape", + 1], + ["addTextBox", + "Shape", + 1], + ["addSvg", + "Shape", + 1, + 0, + 8], + ["addGroup", + "Shape", + 1], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["addLine", + "Shape", + 5], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape", + [["Added", + 0, + 3, + "MessageType.shapeAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.shapeDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Shape", + 0, + [["id", + 3], + ["name", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["rotation", + 1], + ["zOrderPosition", + 3], + ["altTextTitle", + 1], + ["altTextDescription", + 1, + 0, + 0, + 2, + 36], + ["type", + 3], + ["lockAspectRatio", + 1], + ["placement", + 1, + 17], + ["geometricShapeType", + 1], + ["visible", + 1], + ["level", + 3], + ["connectionSiteCount", + 3], + ["scriptLink", + 1, + 8, + 0, + 2, + 37], + ["displayName", + 3, + 35]], + [["geometricShape", + "GeometricShape", + 2, + 0, + 0, + 4], + ["image", + "Image", + 2, + 0, + 0, + 4], + ["textFrame", + "TextFrame", + 2, + 0, + 0, + 4], + ["fill", + "ShapeFill", + 35, + 0, + 0, + 4], + ["group", + "ShapeGroup", + 2, + 0, + 0, + 4], + ["parentGroup", + "Shape", + 2, + 0, + 0, + 4], + ["line", + "Line", + 2, + 0, + 0, + 4], + ["lineFormat", + "ShapeLineFormat", + 35, + 0, + 0, + 4]], + [["setZOrder", + 1], + ["incrementLeft", + 1], + ["incrementTop", + 1], + ["incrementRotation", + 1], + ["scaleHeight", + 3], + ["scaleWidth", + 3], + ["delete"], + ["getAsImage", + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["activate", + 0, + 0, + 3]], + [["copyTo", + "Shape", + 1, + 8, + 17, + 0, + 0, + "_GetShapeById"], + ["_GetShapeById", + "Shape", + 1, + 2, + 17, + 4]], + 0, + 0, + [["Activated", + 0, + 0, + "MessageType.shapeActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 0, + "MessageType.shapeDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["GeometricShape", + 0, + [["id", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["Image", + 0, + [["id", + 3], + ["format", + 3, + 0, + "format"]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["ShapeGroup", + 0, + [["id", + 3]], + [["shapes", + "GroupShapeCollection", + 19, + 0, + 0, + 4], + ["shape", + "Shape", + 2, + 0, + 0, + 4]], + [["ungroup"]]], + ["GroupShapeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape"], + ["Line", + 0, + [["id", + 3], + ["connectorType", + 1, + 0, + "connectorType"], + ["beginArrowheadLength", + 1], + ["beginArrowheadStyle", + 1], + ["beginArrowheadWidth", + 1], + ["endArrowheadLength", + 1], + ["endArrowheadStyle", + 1], + ["endArrowheadWidth", + 1], + ["isBeginConnected", + 3], + ["beginConnectedSite", + 3], + ["isEndConnected", + 3], + ["endConnectedSite", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4], + ["beginConnectedShape", + "Shape", + 2, + 0, + 0, + 4], + ["endConnectedShape", + "Shape", + 2, + 0, + 0, + 4]], + [["connectBeginShape", + 2], + ["disconnectBeginShape"], + ["connectEndShape", + 2], + ["disconnectEndShape"]]], + ["ShapeFill", + 0, + [["foregroundColor", + 1], + ["type", + 3], + ["transparency", + 1]], + 0, + [["clear"], + ["setSolidColor", + 1]]], + ["ShapeLineFormat", + 0, + [["visible", + 1], + ["color", + 1], + ["style", + 1], + ["weight", + 1], + ["dashStyle", + 1], + ["transparency", + 1]]], + ["TextFrame", + 0, + [["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["horizontalAlignment", + 1], + ["horizontalOverflow", + 1], + ["verticalAlignment", + 1], + ["verticalOverflow", + 1], + ["orientation", + 1], + ["readingOrder", + 1], + ["hasText", + 3], + ["autoSizeSetting", + 1]], + [["textRange", + "TextRange", + 2, + 0, + 0, + 4]], + [["deleteText"]]], + ["TextRange", + 0, + [["text", + 1]], + [["font", + "ShapeFont", + 35, + 0, + 0, + 4]], + 0, + [["getSubstring", + "TextRange", + 2]]], + ["ShapeFont", + 0, + [["size", + 1], + ["name", + 1], + ["color", + 1], + ["bold", + 1], + ["italic", + 1], + ["underline", + 1]]], + ["Slicer", + 0, + [["id", + 3], + ["name", + 1], + ["caption", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["nameInFormula", + 1, + 8], + ["isFilterCleared", + 3], + ["style", + 1], + ["sortBy", + 1], + ["sortUsingCustomLists", + 1, + 3], + ["columnCount", + 1, + 3], + ["disableMoveResizeUI", + 1, + 3], + ["displayHeader", + 1, + 3], + ["rowHeight", + 1, + 3], + ["shapeId", + 2, + 3]], + [["slicerItems", + "SlicerItemCollection", + 19, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 35, + 0, + 0, + 4], + ["slicerStyle", + "SlicerStyle", + 35, + 8, + 0, + 4]], + [["delete"], + ["clearFilters"], + ["getSelectedItems"], + ["selectItems", + 1], + ["activate", + 0, + 2, + 3], + ["setStyle", + 1, + 0, + 8]]], + ["SlicerCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "Slicer", + 3, + 8], + ["getItemAt", + "Slicer", + 1, + 2, + 0, + 4], + ["getItem", + "Slicer", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Slicer", + 1, + 2, + 0, + 4]], + 0, + "Slicer"], + ["SlicerItem", + 0, + [["key", + 3], + ["name", + 3], + ["isSelected", + 1], + ["hasData", + 3]]], + ["SlicerItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SlicerItem", + 1, + 2, + 0, + 4], + ["getItem", + "SlicerItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerItem", + 1, + 2, + 0, + 4]], + 0, + "SlicerItem"], + ["Ribbon", + 0, + [["activeTab", + 1]], + 0, + [["executeCommand", + 2], + ["showTeachingCallout", + 3], + ["_RegisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["showChartDialog", + 1, + 2, + 8, + 4]], + 0, + 0, + 0, + [["CommandExecuted", + 0, + 0, + "MessageType.ribbonCommandExecutedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCommandExecutedEvent", + "_UnregisterCommandExecutedEvent"]]], + ["LinkedDataType", + 0, + [["dataProvider", + 2], + ["serviceId", + 2], + ["lastRefreshed", + 10], + ["name", + 2], + ["periodicRefreshInterval", + 2], + ["refreshDataLoadWarnings", + 2], + ["refreshMode", + 2], + ["supportedRefreshModes", + 2], + ["refreshErrors", + 2]], + 0, + [["requestRefresh", + 0, + 0, + 0, + 2], + ["requestSetRefreshMode", + 1, + 0, + 0, + 2]]], + ["LinkedDataTypeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["requestRefreshAll", + 0, + 0, + 0, + 2], + ["_RegisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_RegisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_RegisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4]], + [["getItem", + "LinkedDataType", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "LinkedDataType", + 1], + ["getItemAt", + "LinkedDataType", + 1, + 2, + 0, + 4]], + 0, + "LinkedDataType", + [["LinkedDataTypeAdded", + 0, + 0, + "MessageType.linkedDataTypeLinkedDataTypeAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterLinkedDataTypeAddedEvent", + "_UnregisterLinkedDataTypeAddedEvent"], + ["RefreshModeChanged", + 0, + 0, + "MessageType.linkedDataTypeRefreshModeChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshModeChangedEvent", + "_UnregisterRefreshModeChangedEvent"], + ["RefreshRequestCompleted", + 0, + 0, + "MessageType.linkedDataTypeRefreshRequestCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshRequestCompletedEvent", + "_UnregisterRefreshRequestCompletedEvent"]]], + ["SheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "SheetView", + 1]]], + ["SheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "SheetView", + 1, + 8], + ["enterTemporary", + "SheetView"], + ["getActive", + "SheetView"], + ["getItem", + "SheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "SheetView", + 1, + 2, + 0, + 4]], + 0, + "SheetView"], + ["NamedSheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "NamedSheetView", + 1]]], + ["NamedSheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "NamedSheetView", + 1, + 8], + ["enterTemporary", + "NamedSheetView"], + ["getActive", + "NamedSheetView"], + ["getItem", + "NamedSheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "NamedSheetView", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "NamedSheetView", + 1, + 2, + 28, + 4]], + 0, + "NamedSheetView"], + ["FunctionResult", + 0, + [["error", + 3], + ["value", + 3]]], + ["Functions", + 0, + 0, + 0, + 0, + [["count", + "FunctionResult", + 1, + 72], + ["if", + "FunctionResult", + 3, + 8], + ["isNA", + "FunctionResult", + 1, + 8], + ["isError", + "FunctionResult", + 1, + 8], + ["sum", + "FunctionResult", + 1, + 72], + ["average", + "FunctionResult", + 1, + 72], + ["min", + "FunctionResult", + 1, + 72], + ["max", + "FunctionResult", + 1, + 72], + ["na", + "FunctionResult", + 0, + 8], + ["npv", + "FunctionResult", + 2, + 72], + ["dollar", + "FunctionResult", + 2, + 8], + ["fixed", + "FunctionResult", + 3, + 8], + ["sin", + "FunctionResult", + 1, + 8], + ["cos", + "FunctionResult", + 1, + 8], + ["tan", + "FunctionResult", + 1, + 8], + ["atan", + "FunctionResult", + 1, + 8], + ["pi", + "FunctionResult", + 0, + 8], + ["sqrt", + "FunctionResult", + 1, + 8], + ["exp", + "FunctionResult", + 1, + 8], + ["ln", + "FunctionResult", + 1, + 8], + ["log10", + "FunctionResult", + 1, + 8], + ["abs", + "FunctionResult", + 1, + 8], + ["int", + "FunctionResult", + 1, + 8], + ["sign", + "FunctionResult", + 1, + 8], + ["round", + "FunctionResult", + 2, + 8], + ["lookup", + "FunctionResult", + 3, + 8], + ["rept", + "FunctionResult", + 2, + 8], + ["mid", + "FunctionResult", + 3, + 8], + ["len", + "FunctionResult", + 1, + 8], + ["value", + "FunctionResult", + 1, + 8], + ["true", + "FunctionResult", + 0, + 8], + ["false", + "FunctionResult", + 0, + 8], + ["and", + "FunctionResult", + 1, + 72], + ["or", + "FunctionResult", + 1, + 72], + ["not", + "FunctionResult", + 1, + 8], + ["mod", + "FunctionResult", + 2, + 8], + ["dcount", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCount"], + ["dsum", + "FunctionResult", + 3, + 8, + 0, + 0, + "DSum"], + ["daverage", + "FunctionResult", + 3, + 8, + 0, + 0, + "DAverage"], + ["dmin", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMin"], + ["dmax", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMax"], + ["dstDev", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDev"], + ["dvar", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVar"], + ["text", + "FunctionResult", + 2, + 8], + ["pv", + "FunctionResult", + 5, + 8], + ["fv", + "FunctionResult", + 5, + 8], + ["nper", + "FunctionResult", + 5, + 8, + 0, + 0, + "NPer"], + ["pmt", + "FunctionResult", + 5, + 8], + ["rate", + "FunctionResult", + 6, + 8], + ["mirr", + "FunctionResult", + 3, + 8, + 0, + 0, + "MIrr"], + ["irr", + "FunctionResult", + 2, + 8], + ["rand", + "FunctionResult", + 0, + 8], + ["match", + "FunctionResult", + 3, + 8], + ["date", + "FunctionResult", + 3, + 8], + ["time", + "FunctionResult", + 3, + 8], + ["day", + "FunctionResult", + 1, + 8], + ["month", + "FunctionResult", + 1, + 8], + ["year", + "FunctionResult", + 1, + 8], + ["weekday", + "FunctionResult", + 2, + 8], + ["hour", + "FunctionResult", + 1, + 8], + ["minute", + "FunctionResult", + 1, + 8], + ["second", + "FunctionResult", + 1, + 8], + ["now", + "FunctionResult", + 0, + 8], + ["areas", + "FunctionResult", + 1, + 8], + ["rows", + "FunctionResult", + 1, + 8], + ["columns", + "FunctionResult", + 1, + 8], + ["type", + "FunctionResult", + 1, + 8], + ["atan2", + "FunctionResult", + 2, + 8], + ["asin", + "FunctionResult", + 1, + 8], + ["acos", + "FunctionResult", + 1, + 8], + ["choose", + "FunctionResult", + 2, + 72], + ["hlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "HLookup"], + ["vlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "VLookup"], + ["isref", + "FunctionResult", + 1, + 8], + ["log", + "FunctionResult", + 2, + 8], + ["char", + "FunctionResult", + 1, + 8], + ["lower", + "FunctionResult", + 1, + 8], + ["upper", + "FunctionResult", + 1, + 8], + ["proper", + "FunctionResult", + 1, + 8], + ["left", + "FunctionResult", + 2, + 8], + ["right", + "FunctionResult", + 2, + 8], + ["exact", + "FunctionResult", + 2, + 8], + ["trim", + "FunctionResult", + 1, + 8], + ["replace", + "FunctionResult", + 4, + 8], + ["substitute", + "FunctionResult", + 4, + 8], + ["code", + "FunctionResult", + 1, + 8], + ["find", + "FunctionResult", + 3, + 8], + ["isErr", + "FunctionResult", + 1, + 8], + ["isText", + "FunctionResult", + 1, + 8], + ["isNumber", + "FunctionResult", + 1, + 8], + ["t", + "FunctionResult", + 1, + 8, + 0, + 0, + "T"], + ["n", + "FunctionResult", + 1, + 8, + 0, + 0, + "N"], + ["datevalue", + "FunctionResult", + 1, + 8], + ["timevalue", + "FunctionResult", + 1, + 8], + ["sln", + "FunctionResult", + 3, + 8], + ["syd", + "FunctionResult", + 4, + 8], + ["ddb", + "FunctionResult", + 5, + 8], + ["clean", + "FunctionResult", + 1, + 8], + ["ipmt", + "FunctionResult", + 6, + 8], + ["ppmt", + "FunctionResult", + 6, + 8], + ["countA", + "FunctionResult", + 1, + 72], + ["product", + "FunctionResult", + 1, + 72], + ["fact", + "FunctionResult", + 1, + 8], + ["dproduct", + "FunctionResult", + 3, + 8, + 0, + 0, + "DProduct"], + ["isNonText", + "FunctionResult", + 1, + 8], + ["dstDevP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDevP"], + ["dvarP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVarP"], + ["trunc", + "FunctionResult", + 2, + 8], + ["isLogical", + "FunctionResult", + 1, + 8], + ["dcountA", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCountA"], + ["usdollar", + "FunctionResult", + 2, + 8, + 0, + 0, + "USDollar"], + ["findB", + "FunctionResult", + 3, + 8], + ["replaceB", + "FunctionResult", + 4, + 8], + ["leftb", + "FunctionResult", + 2, + 8], + ["rightb", + "FunctionResult", + 2, + 8], + ["midb", + "FunctionResult", + 3, + 8], + ["lenb", + "FunctionResult", + 1, + 8], + ["roundUp", + "FunctionResult", + 2, + 8], + ["roundDown", + "FunctionResult", + 2, + 8], + ["asc", + "FunctionResult", + 1, + 8], + ["dbcs", + "FunctionResult", + 1, + 8], + ["days360", + "FunctionResult", + 3, + 8], + ["today", + "FunctionResult", + 0, + 8], + ["vdb", + "FunctionResult", + 7, + 8], + ["median", + "FunctionResult", + 1, + 72], + ["sinh", + "FunctionResult", + 1, + 8], + ["cosh", + "FunctionResult", + 1, + 8], + ["tanh", + "FunctionResult", + 1, + 8], + ["asinh", + "FunctionResult", + 1, + 8], + ["acosh", + "FunctionResult", + 1, + 8], + ["atanh", + "FunctionResult", + 1, + 8], + ["dget", + "FunctionResult", + 3, + 8, + 0, + 0, + "DGet"], + ["db", + "FunctionResult", + 5, + 8], + ["error_Type", + "FunctionResult", + 1, + 8], + ["aveDev", + "FunctionResult", + 1, + 72], + ["gammaLn", + "FunctionResult", + 1, + 8], + ["combin", + "FunctionResult", + 2, + 8], + ["even", + "FunctionResult", + 1, + 8], + ["fisher", + "FunctionResult", + 1, + 8], + ["fisherInv", + "FunctionResult", + 1, + 8], + ["standardize", + "FunctionResult", + 3, + 8], + ["odd", + "FunctionResult", + 1, + 8], + ["permut", + "FunctionResult", + 2, + 8], + ["devSq", + "FunctionResult", + 1, + 72], + ["geoMean", + "FunctionResult", + 1, + 72], + ["harMean", + "FunctionResult", + 1, + 72], + ["sumSq", + "FunctionResult", + 1, + 72], + ["kurt", + "FunctionResult", + 1, + 72], + ["skew", + "FunctionResult", + 1, + 72], + ["large", + "FunctionResult", + 2, + 8], + ["small", + "FunctionResult", + 2, + 8], + ["trimMean", + "FunctionResult", + 2, + 8], + ["concatenate", + "FunctionResult", + 1, + 72], + ["power", + "FunctionResult", + 2, + 8], + ["radians", + "FunctionResult", + 1, + 8], + ["degrees", + "FunctionResult", + 1, + 8], + ["subtotal", + "FunctionResult", + 2, + 72], + ["sumIf", + "FunctionResult", + 3, + 8], + ["countIf", + "FunctionResult", + 2, + 8], + ["countBlank", + "FunctionResult", + 1, + 8], + ["ispmt", + "FunctionResult", + 4, + 8], + ["roman", + "FunctionResult", + 2, + 8], + ["hyperlink", + "FunctionResult", + 2, + 8], + ["averageA", + "FunctionResult", + 1, + 72], + ["maxA", + "FunctionResult", + 1, + 72], + ["minA", + "FunctionResult", + 1, + 72], + ["stDevPA", + "FunctionResult", + 1, + 72], + ["varPA", + "FunctionResult", + 1, + 72], + ["stDevA", + "FunctionResult", + 1, + 72], + ["varA", + "FunctionResult", + 1, + 72], + ["bahtText", + "FunctionResult", + 1, + 8], + ["hex2Bin", + "FunctionResult", + 2, + 8], + ["hex2Dec", + "FunctionResult", + 1, + 8], + ["hex2Oct", + "FunctionResult", + 2, + 8], + ["dec2Bin", + "FunctionResult", + 2, + 8], + ["dec2Hex", + "FunctionResult", + 2, + 8], + ["dec2Oct", + "FunctionResult", + 2, + 8], + ["oct2Bin", + "FunctionResult", + 2, + 8], + ["oct2Hex", + "FunctionResult", + 2, + 8], + ["oct2Dec", + "FunctionResult", + 1, + 8], + ["bin2Dec", + "FunctionResult", + 1, + 8], + ["bin2Oct", + "FunctionResult", + 2, + 8], + ["bin2Hex", + "FunctionResult", + 2, + 8], + ["imSub", + "FunctionResult", + 2, + 8], + ["imDiv", + "FunctionResult", + 2, + 8], + ["imPower", + "FunctionResult", + 2, + 8], + ["imAbs", + "FunctionResult", + 1, + 8], + ["imSqrt", + "FunctionResult", + 1, + 8], + ["imLn", + "FunctionResult", + 1, + 8], + ["imLog2", + "FunctionResult", + 1, + 8], + ["imLog10", + "FunctionResult", + 1, + 8], + ["imSin", + "FunctionResult", + 1, + 8], + ["imCos", + "FunctionResult", + 1, + 8], + ["imExp", + "FunctionResult", + 1, + 8], + ["imArgument", + "FunctionResult", + 1, + 8], + ["imConjugate", + "FunctionResult", + 1, + 8], + ["imaginary", + "FunctionResult", + 1, + 8], + ["imReal", + "FunctionResult", + 1, + 8], + ["complex", + "FunctionResult", + 3, + 8], + ["imSum", + "FunctionResult", + 1, + 72], + ["imProduct", + "FunctionResult", + 1, + 72], + ["seriesSum", + "FunctionResult", + 4, + 8], + ["factDouble", + "FunctionResult", + 1, + 8], + ["sqrtPi", + "FunctionResult", + 1, + 8], + ["quotient", + "FunctionResult", + 2, + 8], + ["delta", + "FunctionResult", + 2, + 8], + ["geStep", + "FunctionResult", + 2, + 8], + ["isEven", + "FunctionResult", + 1, + 8], + ["isOdd", + "FunctionResult", + 1, + 8], + ["mround", + "FunctionResult", + 2, + 8, + 0, + 0, + "MRound"], + ["erf", + "FunctionResult", + 2, + 8], + ["erfC", + "FunctionResult", + 1, + 8], + ["besselJ", + "FunctionResult", + 2, + 8], + ["besselK", + "FunctionResult", + 2, + 8], + ["besselY", + "FunctionResult", + 2, + 8], + ["besselI", + "FunctionResult", + 2, + 8], + ["xirr", + "FunctionResult", + 3, + 8], + ["xnpv", + "FunctionResult", + 3, + 8], + ["priceMat", + "FunctionResult", + 6, + 8], + ["yieldMat", + "FunctionResult", + 6, + 8], + ["intRate", + "FunctionResult", + 5, + 8], + ["received", + "FunctionResult", + 5, + 8], + ["disc", + "FunctionResult", + 5, + 8], + ["priceDisc", + "FunctionResult", + 5, + 8], + ["yieldDisc", + "FunctionResult", + 5, + 8], + ["tbillEq", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillEq"], + ["tbillPrice", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillPrice"], + ["tbillYield", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillYield"], + ["price", + "FunctionResult", + 7, + 8], + ["yield", + "FunctionResult", + 7, + 8], + ["dollarDe", + "FunctionResult", + 2, + 8], + ["dollarFr", + "FunctionResult", + 2, + 8], + ["nominal", + "FunctionResult", + 2, + 8], + ["effect", + "FunctionResult", + 2, + 8], + ["cumPrinc", + "FunctionResult", + 6, + 8], + ["cumIPmt", + "FunctionResult", + 6, + 8], + ["edate", + "FunctionResult", + 2, + 8, + 0, + 0, + "EDate"], + ["eoMonth", + "FunctionResult", + 2, + 8], + ["yearFrac", + "FunctionResult", + 3, + 8], + ["coupDayBs", + "FunctionResult", + 4, + 8], + ["coupDays", + "FunctionResult", + 4, + 8], + ["coupDaysNc", + "FunctionResult", + 4, + 8], + ["coupNcd", + "FunctionResult", + 4, + 8], + ["coupNum", + "FunctionResult", + 4, + 8], + ["coupPcd", + "FunctionResult", + 4, + 8], + ["duration", + "FunctionResult", + 6, + 8], + ["mduration", + "FunctionResult", + 6, + 8, + 0, + 0, + "MDuration"], + ["oddLPrice", + "FunctionResult", + 8, + 8], + ["oddLYield", + "FunctionResult", + 8, + 8], + ["oddFPrice", + "FunctionResult", + 9, + 8], + ["oddFYield", + "FunctionResult", + 9, + 8], + ["randBetween", + "FunctionResult", + 2, + 8], + ["weekNum", + "FunctionResult", + 2, + 8], + ["amorDegrc", + "FunctionResult", + 7, + 8], + ["amorLinc", + "FunctionResult", + 7, + 8], + ["convert", + "FunctionResult", + 3, + 8], + ["accrInt", + "FunctionResult", + 8, + 8], + ["accrIntM", + "FunctionResult", + 5, + 8], + ["workDay", + "FunctionResult", + 3, + 8], + ["networkDays", + "FunctionResult", + 3, + 8], + ["gcd", + "FunctionResult", + 1, + 72], + ["multiNomial", + "FunctionResult", + 1, + 72], + ["lcm", + "FunctionResult", + 1, + 72], + ["fvschedule", + "FunctionResult", + 2, + 8, + 0, + 0, + "FVSchedule"], + ["countIfs", + "FunctionResult", + 1, + 72], + ["sumIfs", + "FunctionResult", + 2, + 72], + ["averageIf", + "FunctionResult", + 3, + 8], + ["averageIfs", + "FunctionResult", + 2, + 72], + ["binom_Dist", + "FunctionResult", + 4, + 8], + ["binom_Inv", + "FunctionResult", + 3, + 8], + ["confidence_Norm", + "FunctionResult", + 3, + 8], + ["confidence_T", + "FunctionResult", + 3, + 8], + ["expon_Dist", + "FunctionResult", + 3, + 8], + ["gamma_Dist", + "FunctionResult", + 4, + 8], + ["gamma_Inv", + "FunctionResult", + 3, + 8], + ["norm_Dist", + "FunctionResult", + 4, + 8], + ["norm_Inv", + "FunctionResult", + 3, + 8], + ["percentile_Exc", + "FunctionResult", + 2, + 8], + ["percentile_Inc", + "FunctionResult", + 2, + 8], + ["percentRank_Exc", + "FunctionResult", + 3, + 8], + ["percentRank_Inc", + "FunctionResult", + 3, + 8], + ["poisson_Dist", + "FunctionResult", + 3, + 8], + ["quartile_Exc", + "FunctionResult", + 2, + 8], + ["quartile_Inc", + "FunctionResult", + 2, + 8], + ["rank_Avg", + "FunctionResult", + 3, + 8], + ["rank_Eq", + "FunctionResult", + 3, + 8], + ["stDev_S", + "FunctionResult", + 1, + 72], + ["stDev_P", + "FunctionResult", + 1, + 72], + ["t_Dist", + "FunctionResult", + 3, + 8], + ["t_Dist_2T", + "FunctionResult", + 2, + 8], + ["t_Dist_RT", + "FunctionResult", + 2, + 8], + ["t_Inv", + "FunctionResult", + 2, + 8], + ["t_Inv_2T", + "FunctionResult", + 2, + 8], + ["var_S", + "FunctionResult", + 1, + 72], + ["var_P", + "FunctionResult", + 1, + 72], + ["weibull_Dist", + "FunctionResult", + 4, + 8], + ["networkDays_Intl", + "FunctionResult", + 4, + 8], + ["workDay_Intl", + "FunctionResult", + 4, + 8], + ["ecma_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ECMA_Ceiling"], + ["iso_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ISO_Ceiling"], + ["beta_Dist", + "FunctionResult", + 6, + 8], + ["beta_Inv", + "FunctionResult", + 5, + 8], + ["chiSq_Dist", + "FunctionResult", + 3, + 8], + ["chiSq_Dist_RT", + "FunctionResult", + 2, + 8], + ["chiSq_Inv", + "FunctionResult", + 2, + 8], + ["chiSq_Inv_RT", + "FunctionResult", + 2, + 8], + ["f_Dist", + "FunctionResult", + 4, + 8], + ["f_Dist_RT", + "FunctionResult", + 3, + 8], + ["f_Inv", + "FunctionResult", + 3, + 8], + ["f_Inv_RT", + "FunctionResult", + 3, + 8], + ["hypGeom_Dist", + "FunctionResult", + 5, + 8], + ["logNorm_Dist", + "FunctionResult", + 4, + 8], + ["logNorm_Inv", + "FunctionResult", + 3, + 8], + ["negBinom_Dist", + "FunctionResult", + 4, + 8], + ["norm_S_Dist", + "FunctionResult", + 2, + 8], + ["norm_S_Inv", + "FunctionResult", + 1, + 8], + ["z_Test", + "FunctionResult", + 3, + 8], + ["erf_Precise", + "FunctionResult", + 1, + 8], + ["erfC_Precise", + "FunctionResult", + 1, + 8], + ["gammaLn_Precise", + "FunctionResult", + 1, + 8], + ["ceiling_Precise", + "FunctionResult", + 2, + 8], + ["floor_Precise", + "FunctionResult", + 2, + 8], + ["acot", + "FunctionResult", + 1, + 8], + ["acoth", + "FunctionResult", + 1, + 8], + ["cot", + "FunctionResult", + 1, + 8], + ["coth", + "FunctionResult", + 1, + 8], + ["csc", + "FunctionResult", + 1, + 8], + ["csch", + "FunctionResult", + 1, + 8], + ["sec", + "FunctionResult", + 1, + 8], + ["sech", + "FunctionResult", + 1, + 8], + ["imTan", + "FunctionResult", + 1, + 8], + ["imCot", + "FunctionResult", + 1, + 8], + ["imCsc", + "FunctionResult", + 1, + 8], + ["imCsch", + "FunctionResult", + 1, + 8], + ["imSec", + "FunctionResult", + 1, + 8], + ["imSech", + "FunctionResult", + 1, + 8], + ["bitand", + "FunctionResult", + 2, + 8], + ["bitor", + "FunctionResult", + 2, + 8], + ["bitxor", + "FunctionResult", + 2, + 8], + ["bitlshift", + "FunctionResult", + 2, + 8], + ["bitrshift", + "FunctionResult", + 2, + 8], + ["permutationa", + "FunctionResult", + 2, + 8], + ["combina", + "FunctionResult", + 2, + 8], + ["xor", + "FunctionResult", + 1, + 72], + ["pduration", + "FunctionResult", + 3, + 8, + 0, + 0, + "PDuration"], + ["base", + "FunctionResult", + 3, + 8], + ["decimal", + "FunctionResult", + 2, + 8], + ["days", + "FunctionResult", + 2, + 8], + ["binom_Dist_Range", + "FunctionResult", + 4, + 8], + ["gamma", + "FunctionResult", + 1, + 8], + ["skew_p", + "FunctionResult", + 1, + 72], + ["gauss", + "FunctionResult", + 1, + 8], + ["phi", + "FunctionResult", + 1, + 8], + ["rri", + "FunctionResult", + 3, + 8], + ["unichar", + "FunctionResult", + 1, + 8], + ["unicode", + "FunctionResult", + 1, + 8], + ["arabic", + "FunctionResult", + 1, + 8], + ["isoWeekNum", + "FunctionResult", + 1, + 8], + ["numberValue", + "FunctionResult", + 3, + 8], + ["sheet", + "FunctionResult", + 1, + 8], + ["sheets", + "FunctionResult", + 1, + 8], + ["isFormula", + "FunctionResult", + 1, + 8], + ["ceiling_Math", + "FunctionResult", + 3, + 8], + ["floor_Math", + "FunctionResult", + 3, + 8], + ["imSinh", + "FunctionResult", + 1, + 8], + ["imCosh", + "FunctionResult", + 1, + 8]]]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataXlapi, targetNamespaceObject: Excel }); +})(Excel || (Excel = {})); +var _EndExcel = "_EndExcel"; +if (typeof (window) !== "undefined" && + window.OSF && + window.OSF._OfficeAppFactory && + window.OSF._OfficeAppFactory.getHostInfo && + window.OSF._OfficeAppFactory.getHostInfo()) { + var hostPlatform = window.OSF._OfficeAppFactory.getHostInfo().hostPlatform; + if (hostPlatform === "web") { + OfficeExtension._internalConfig.enablePreviewExecution = true; + } +} +!function (modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) + return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + i: moduleId, + l: !1, + exports: {} + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.l = !0, module.exports; + } + __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function (exports, name, getter) { + __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { + enumerable: !0, + get: getter + }); + }, __webpack_require__.r = function (exports) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(exports, "__esModule", { + value: !0 + }); + }, __webpack_require__.t = function (value, mode) { + if (1 & mode && (value = __webpack_require__(value)), 8 & mode) + return value; + if (4 & mode && "object" == typeof value && value && value.__esModule) + return value; + var ns = Object.create(null); + if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { + enumerable: !0, + value: value + }), 2 & mode && "string" != typeof value) + for (var key in value) + __webpack_require__.d(ns, key, function (key) { + return value[key]; + }.bind(null, key)); + return ns; + }, __webpack_require__.n = function (module) { + var getter = module && module.__esModule ? function () { + return module["default"]; + } : function () { + return module; + }; + return __webpack_require__.d(getter, "a", getter), getter; + }, __webpack_require__.o = function (object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 1); +}([function (module, exports) { + module.exports = OfficeExtensionBatch; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), __webpack_require__(2), "undefined" == typeof CustomFunctionMappings && (window.CustomFunctionMappings = {}), + "undefined" == typeof Promise && (window.Promise = Office.Promise), window.OfficeExtensionBatch = window.OfficeExtensionBatch || window.OfficeExtension; + var customfunctions_agave_initialize_1 = __webpack_require__(3); + !function () { + var shouldInitialize = !1; + "undefined" != typeof OSF && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo && (0 != (2 & (OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo().flags)) && (shouldInitialize = !0)); + (0, customfunctions_agave_initialize_1["default"])(shouldInitialize); + }(); + }, function (module, exports) { + !function (self) { + "use strict"; + if (!self.fetch) { + var support_searchParams = "URLSearchParams" in self, support_iterable = "Symbol" in self && "iterator" in Symbol, support_blob = "FileReader" in self && "Blob" in self && function () { + try { + return new Blob, !0; + } + catch (e) { + return !1; + } + }(), support_formData = "FormData" in self, support_arrayBuffer = "ArrayBuffer" in self; + if (support_arrayBuffer) + var viewClasses = ["[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]"], isDataView = function (obj) { + return obj && DataView.prototype.isPrototypeOf(obj); + }, isArrayBufferView = ArrayBuffer.isView || function (obj) { + return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1; + }; + Headers.prototype.append = function (name, value) { + name = normalizeName(name), value = normalizeValue(value); + var oldValue = this.map[name]; + this.map[name] = oldValue ? oldValue + "," + value : value; + }, Headers.prototype["delete"] = function (name) { + delete this.map[normalizeName(name)]; + }, Headers.prototype.get = function (name) { + return name = normalizeName(name), this.has(name) ? this.map[name] : null; + }, Headers.prototype.has = function (name) { + return this.map.hasOwnProperty(normalizeName(name)); + }, Headers.prototype.set = function (name, value) { + this.map[normalizeName(name)] = normalizeValue(value); + }, Headers.prototype.forEach = function (callback, thisArg) { + for (var name in this.map) + this.map.hasOwnProperty(name) && callback.call(thisArg, this.map[name], name, this); + }, Headers.prototype.keys = function () { + var items = []; + return this.forEach((function (value, name) { + items.push(name); + })), iteratorFor(items); + }, Headers.prototype.values = function () { + var items = []; + return this.forEach((function (value) { + items.push(value); + })), iteratorFor(items); + }, Headers.prototype.entries = function () { + var items = []; + return this.forEach((function (value, name) { + items.push([name, value]); + })), iteratorFor(items); + }, support_iterable && (Headers.prototype[Symbol.iterator] = Headers.prototype.entries); + var methods = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"]; + Request.prototype.clone = function () { + return new Request(this, { + body: this._bodyInit + }); + }, Body.call(Request.prototype), Body.call(Response.prototype), Response.prototype.clone = function () { + return new Response(this._bodyInit, { + status: this.status, + statusText: this.statusText, + headers: new Headers(this.headers), + url: this.url + }); + }, Response.error = function () { + var response = new Response(null, { + status: 0, + statusText: "" + }); + return response.type = "error", response; + }; + var redirectStatuses = [301, 302, 303, 307, 308]; + Response.redirect = function (url, status) { + if (-1 === redirectStatuses.indexOf(status)) + throw new RangeError("Invalid status code"); + return new Response(null, { + status: status, + headers: { + location: url + } + }); + }, self.Headers = Headers, self.Request = Request, self.Response = Response, self.fetch = function (input, init) { + return new Promise((function (resolve, reject) { + var request = new Request(input, init), xhr = new XMLHttpRequest; + xhr.onload = function () { + var rawHeaders, headers, options = { + status: xhr.status, + statusText: xhr.statusText, + headers: (rawHeaders = xhr.getAllResponseHeaders() || "", headers = new Headers, + rawHeaders.split(/\r?\n/).forEach((function (line) { + var parts = line.split(":"), key = parts.shift().trim(); + if (key) { + var value = parts.join(":").trim(); + headers.append(key, value); + } + })), headers) + }; + options.url = "responseURL" in xhr ? xhr.responseURL : options.headers.get("X-Request-URL"); + var body = "response" in xhr ? xhr.response : xhr.responseText; + resolve(new Response(body, options)); + }, xhr.onerror = function () { + reject(new TypeError("Network request failed")); + }, xhr.ontimeout = function () { + reject(new TypeError("Network request failed")); + }, xhr.open(request.method, request.url, !0), "include" === request.credentials && (xhr.withCredentials = !0), + "responseType" in xhr && support_blob && (xhr.responseType = "blob"), request.headers.forEach((function (value, name) { + xhr.setRequestHeader(name, value); + })), xhr.send(void 0 === request._bodyInit ? null : request._bodyInit); + })); + }, self.fetch.polyfill = !0; + } + function normalizeName(name) { + if ("string" != typeof name && (name = String(name)), /[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) + throw new TypeError("Invalid character in header field name"); + return name.toLowerCase(); + } + function normalizeValue(value) { + return "string" != typeof value && (value = String(value)), value; + } + function iteratorFor(items) { + var iterator = { + next: function () { + var value = items.shift(); + return { + done: void 0 === value, + value: value + }; + } + }; + return support_iterable && (iterator[Symbol.iterator] = function () { + return iterator; + }), iterator; + } + function Headers(headers) { + this.map = {}, headers instanceof Headers ? headers.forEach((function (value, name) { + this.append(name, value); + }), this) : Array.isArray(headers) ? headers.forEach((function (header) { + this.append(header[0], header[1]); + }), this) : headers && Object.getOwnPropertyNames(headers).forEach((function (name) { + this.append(name, headers[name]); + }), this); + } + function consumed(body) { + if (body.bodyUsed) + return Promise.reject(new TypeError("Already read")); + body.bodyUsed = !0; + } + function fileReaderReady(reader) { + return new Promise((function (resolve, reject) { + reader.onload = function () { + resolve(reader.result); + }, reader.onerror = function () { + reject(reader.error); + }; + })); + } + function readBlobAsArrayBuffer(blob) { + var reader = new FileReader, promise = fileReaderReady(reader); + return reader.readAsArrayBuffer(blob), promise; + } + function bufferClone(buf) { + if (buf.slice) + return buf.slice(0); + var view = new Uint8Array(buf.byteLength); + return view.set(new Uint8Array(buf)), view.buffer; + } + function Body() { + return this.bodyUsed = !1, this._initBody = function (body) { + if (this._bodyInit = body, body) + if ("string" == typeof body) + this._bodyText = body; + else if (support_blob && Blob.prototype.isPrototypeOf(body)) + this._bodyBlob = body; + else if (support_formData && FormData.prototype.isPrototypeOf(body)) + this._bodyFormData = body; + else if (support_searchParams && URLSearchParams.prototype.isPrototypeOf(body)) + this._bodyText = body.toString(); + else if (support_arrayBuffer && support_blob && isDataView(body)) + this._bodyArrayBuffer = bufferClone(body.buffer), + this._bodyInit = new Blob([this._bodyArrayBuffer]); + else { + if (!support_arrayBuffer || !ArrayBuffer.prototype.isPrototypeOf(body) && !isArrayBufferView(body)) + throw new Error("unsupported BodyInit type"); + this._bodyArrayBuffer = bufferClone(body); + } + else + this._bodyText = ""; + this.headers.get("content-type") || ("string" == typeof body ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : support_searchParams && URLSearchParams.prototype.isPrototypeOf(body) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8")); + }, support_blob && (this.blob = function () { + var rejected = consumed(this); + if (rejected) + return rejected; + if (this._bodyBlob) + return Promise.resolve(this._bodyBlob); + if (this._bodyArrayBuffer) + return Promise.resolve(new Blob([this._bodyArrayBuffer])); + if (this._bodyFormData) + throw new Error("could not read FormData body as blob"); + return Promise.resolve(new Blob([this._bodyText])); + }, this.arrayBuffer = function () { + return this._bodyArrayBuffer ? consumed(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(readBlobAsArrayBuffer); + }), this.text = function () { + var blob, reader, promise, rejected = consumed(this); + if (rejected) + return rejected; + if (this._bodyBlob) + return blob = this._bodyBlob, reader = new FileReader, promise = fileReaderReady(reader), + reader.readAsText(blob), promise; + if (this._bodyArrayBuffer) + return Promise.resolve(function (buf) { + for (var view = new Uint8Array(buf), chars = new Array(view.length), i = 0; i < view.length; i++) + chars[i] = String.fromCharCode(view[i]); + return chars.join(""); + }(this._bodyArrayBuffer)); + if (this._bodyFormData) + throw new Error("could not read FormData body as text"); + return Promise.resolve(this._bodyText); + }, support_formData && (this.formData = function () { + return this.text().then(decode); + }), this.json = function () { + return this.text().then(JSON.parse); + }, this; + } + function Request(input, options) { + var method, upcased, body = (options = options || {}).body; + if (input instanceof Request) { + if (input.bodyUsed) + throw new TypeError("Already read"); + this.url = input.url, this.credentials = input.credentials, options.headers || (this.headers = new Headers(input.headers)), + this.method = input.method, this.mode = input.mode, body || null == input._bodyInit || (body = input._bodyInit, + input.bodyUsed = !0); + } + else + this.url = String(input); + if (this.credentials = options.credentials || this.credentials || "omit", !options.headers && this.headers || (this.headers = new Headers(options.headers)), + this.method = (method = options.method || this.method || "GET", upcased = method.toUpperCase(), + methods.indexOf(upcased) > -1 ? upcased : method), this.mode = options.mode || this.mode || null, + this.referrer = null, ("GET" === this.method || "HEAD" === this.method) && body) + throw new TypeError("Body not allowed for GET or HEAD requests"); + this._initBody(body); + } + function decode(body) { + var form = new FormData; + return body.trim().split("&").forEach((function (bytes) { + if (bytes) { + var split = bytes.split("="), name = split.shift().replace(/\+/g, " "), value = split.join("=").replace(/\+/g, " "); + form.append(decodeURIComponent(name), decodeURIComponent(value)); + } + })), form; + } + function Response(bodyInit, options) { + options || (options = {}), this.type = "default", this.status = "status" in options ? options.status : 200, + this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in options ? options.statusText : "OK", + this.headers = new Headers(options.headers), this.url = options.url || "", this._initBody(bodyInit); + } + }("undefined" != typeof self ? self : this); + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var CFRuntime = __webpack_require__(4); + exports["default"] = function (shouldInitRuntime) { + function documentReadyCallback() { + Office.onReady((function (hostInfo) { + hostInfo.host === Office.HostType.Excel ? function initializeCustomFunctionsOrDelay() { + CustomFunctionMappings && CustomFunctionMappings.__delay__ ? setTimeout(initializeCustomFunctionsOrDelay, 50) : CFRuntime.CustomFunctions.initialize(); + }() : console.warn("Warning: Expected to be loaded inside of an Excel add-in."); + })); + } + window.CustomFunctions = window.CustomFunctions || {}, window.CustomFunctions.setCustomFunctionInvoker = CFRuntime.setCustomFunctionInvoker, + window.CustomFunctions.Error = CFRuntime.CustomFunctionError, window.CustomFunctions.ErrorCode = CFRuntime.ErrorCode, + window.CustomFunctions.FormattedNumber = CFRuntime.CustomFunctionFormattedNumber, + window.CustomFunctions.Entity = CFRuntime.CustomFunctionEntity, window.CustomFunctions.WebImage = CFRuntime.CustomFunctionWebImage, + window.CustomFunctions.Attribution = CFRuntime.CustomFunctionAttribution, window.CustomFunctions.Provider = CFRuntime.CustomFunctionProvider, + CFRuntime.setCustomFunctionAssociation(window.CustomFunctions._association), shouldInitRuntime && ("loading" === document.readyState ? document.addEventListener("DOMContentLoaded", documentReadyCallback) : documentReadyCallback()); + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function (d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) + Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function (d, b) { + if ("function" != typeof b && null !== b) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }); + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.CustomFunctionsContainer = exports.CustomFunctions = exports.setCustomFunctionInvoker = exports.setCustomFunctionAssociation = exports.customFunctionProxy = exports.CustomFunctionProxy = exports.CreateCustomFunctionInstance = exports.CustomFunctionProvider = exports.CustomFunctionAttribution = exports.CustomFunctionWebImage = exports.CustomFunctionFormattedNumber = exports.CustomFunctionEntity = exports.CustomFunctionError = exports.ErrorCode = exports.InvocationContext = exports.Script = void 0; + var OfficeExtension = __webpack_require__(0), Core = __webpack_require__(0), _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject, _createRootServiceObject = (OfficeExtension.BatchApiHelper.createMethodObject, + OfficeExtension.BatchApiHelper.createIndexerObject, OfficeExtension.BatchApiHelper.createRootServiceObject), _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject, _invokeMethod = (OfficeExtension.BatchApiHelper.createChildItemObject, + OfficeExtension.BatchApiHelper.invokeMethod), _isNullOrUndefined = (OfficeExtension.BatchApiHelper.invokeEnsureUnchanged, + OfficeExtension.BatchApiHelper.invokeSetProperty, OfficeExtension.Utility.isNullOrUndefined), _throwIfApiNotSupported = (OfficeExtension.Utility.isUndefined, + OfficeExtension.Utility.throwIfNotLoaded, OfficeExtension.Utility.throwIfApiNotSupported), _load = OfficeExtension.Utility.load, _toJson = (OfficeExtension.Utility.retrieve, + OfficeExtension.Utility.toJson), _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary, _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults, _processRetrieveResult = (OfficeExtension.Utility.adjustToDateTime, + OfficeExtension.Utility.processRetrieveResult), CustomFunctionRequestContext = (OfficeExtension.Utility.setMockData, + OfficeExtension.CommonUtility.calculateApiFlags, function (_super) { + function CustomFunctionRequestContext(requestInfo) { + var _this = _super.call(this, requestInfo) || this; + return _this.m_customFunctions = CustomFunctions.newObject(_this), _this.m_container = _createRootServiceObject(CustomFunctionsContainer, _this), + _this._rootObject = _this.m_container, _this._rootObjectPropertyName = "customFunctionsContainer", + _this._requestFlagModifier = 2176, _this; + } + return __extends(CustomFunctionRequestContext, _super), Object.defineProperty(CustomFunctionRequestContext.prototype, "customFunctions", { + get: function () { + return this.m_customFunctions; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(CustomFunctionRequestContext.prototype, "customFunctionsContainer", { + get: function () { + return this.m_container; + }, + enumerable: !1, + configurable: !0 + }), CustomFunctionRequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { + 5004 === officeJsErrorCode && (response.ErrorCode = CustomFunctionRuntimeErrorCode.invalidOperationInCellEditMode, + response.ErrorMessage = OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode)); + }, CustomFunctionRequestContext; + }(OfficeExtension.ClientRequestContext)); + exports.Script = { + _CustomFunctionMetadata: {} + }; + var CustomFunctionLoggingSeverity, InvocationContext = function () { + function InvocationContext(functionName, address, parameterAddresses, setResultHandler, setErrorHandler) { + this._functionName = functionName, _isNullOrUndefined(address) || (this._address = address), + _isNullOrUndefined(parameterAddresses) || (this._parameterAddresses = parameterAddresses), + this.setResult = setResultHandler, this.setError = setErrorHandler; + } + return Object.defineProperty(InvocationContext.prototype, "onCanceled", { + get: function () { + if (!_isNullOrUndefined(this._onCanceled) && "function" == typeof this._onCanceled) + return this._onCanceled; + }, + set: function (handler) { + this._onCanceled = handler; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(InvocationContext.prototype, "functionName", { + get: function () { + return this._functionName; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(InvocationContext.prototype, "address", { + get: function () { + return this._address; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(InvocationContext.prototype, "parameterAddresses", { + get: function () { + return this._parameterAddresses; + }, + enumerable: !1, + configurable: !0 + }), InvocationContext; + }(); + exports.InvocationContext = InvocationContext, function (CustomFunctionLoggingSeverity) { + CustomFunctionLoggingSeverity.Info = "Medium", CustomFunctionLoggingSeverity.Error = "Unexpected", + CustomFunctionLoggingSeverity.Verbose = "Verbose"; + }(CustomFunctionLoggingSeverity || (CustomFunctionLoggingSeverity = {})); + var ErrorCode, CustomFunctionLog = function (Severity, Message) { + this.Severity = Severity, this.Message = Message; + }, CustomFunctionsLogger = function () { + function CustomFunctionsLogger() { } + return CustomFunctionsLogger.logEvent = function (log, data, data2) { + if (CustomFunctionsLogger.s_shouldLog || OfficeExtension.CoreUtility._logEnabled) { + var logMessage = log.Severity + " " + log.Message + data; + if (data2 && (logMessage = logMessage + " " + data2), OfficeExtension.Utility.log(logMessage), + CustomFunctionsLogger.s_shouldLog) + switch (log.Severity) { + case CustomFunctionLoggingSeverity.Verbose: + null !== console.log && console.log(logMessage); + break; + case CustomFunctionLoggingSeverity.Info: + null !== console.info && console.info(logMessage); + break; + case CustomFunctionLoggingSeverity.Error: + null !== console.error && console.error(logMessage); + } + } + }, CustomFunctionsLogger.shouldLog = function () { + try { + return !_isNullOrUndefined(console) && !_isNullOrUndefined(window) && window.name && "string" == typeof window.name && JSON.parse(window.name)[CustomFunctionsLogger.CustomFunctionLoggingFlag]; + } + catch (ex) { + return OfficeExtension.Utility.log(JSON.stringify(ex)), !1; + } + }, CustomFunctionsLogger.CustomFunctionLoggingFlag = "CustomFunctionsRuntimeLogging", + CustomFunctionsLogger.s_shouldLog = CustomFunctionsLogger.shouldLog(), CustomFunctionsLogger; + }(); + !function (ErrorCode) { + ErrorCode.invalidValue = "#VALUE!", ErrorCode.notAvailable = "#N/A", ErrorCode.divisionByZero = "#DIV/0!", + ErrorCode.invalidNumber = "#NUM!", ErrorCode.nullReference = "#NULL!", ErrorCode.invalidName = "#NAME?", + ErrorCode.invalidReference = "#REF!"; + }(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {})); + var CustomFunctionError = function (_super) { + function CustomFunctionError(errorCode, errorMessage, errorSubType) { + var _this = _super.call(this, errorMessage || "") || this; + return _this.type = CustomFunctionError.valueType, _this.basicType = CustomFunctionError.valueType, + Object.setPrototypeOf(_this, CustomFunctionError.prototype), _this.code = errorCode || ErrorCode.invalidValue, + _this.basicValue = errorCode || ErrorCode.invalidValue, _this.errorSubType = errorSubType, + _this.stack = void 0, _this; + } + return __extends(CustomFunctionError, _super), CustomFunctionError.prototype.toJSON = function () { + return { + valueType: "CustomFunctionError", + code: this.code, + type: this.type, + basicValue: this.basicValue, + basicType: this.type, + errorSubType: this.errorSubType, + message: this._getMessage(), + errorType: this._getErrorType() + }; + }, CustomFunctionError.prototype._getErrorType = function () { + switch (this.basicValue) { + case ErrorCode.invalidValue: + return "Value"; + case ErrorCode.divisionByZero: + return "Div0"; + case ErrorCode.notAvailable: + return "NotAvailable"; + case ErrorCode.invalidNumber: + return "Num"; + case ErrorCode.invalidName: + return "Name"; + case ErrorCode.invalidReference: + return "Ref"; + case ErrorCode.nullReference: + return "Null"; + default: + return; + } + }, CustomFunctionError.prototype._getMessage = function () { + switch (this.basicValue) { + case ErrorCode.invalidValue: + case ErrorCode.notAvailable: + return "" == this.message ? void 0 : this.message; + case ErrorCode.divisionByZero: + case ErrorCode.invalidNumber: + case ErrorCode.invalidName: + case ErrorCode.invalidReference: + case ErrorCode.nullReference: + default: + return; + } + }, CustomFunctionError.valueType = "Error", CustomFunctionError; + }(Error); + exports.CustomFunctionError = CustomFunctionError; + var CustomFunctionEntity = function () { + function CustomFunctionEntity(text, properties) { + this.type = CustomFunctionEntity.valueType, this.basicValue = "#VALUE!", this.basicType = "Error", + Object.setPrototypeOf(this, CustomFunctionEntity.prototype), this.text = text, this.properties = properties; + } + return CustomFunctionEntity.prototype.toJSON = function () { + return { + type: this.type, + text: this.text, + basicValue: this.basicValue, + basicType: this.basicType, + properties: this.properties + }; + }, CustomFunctionEntity.valueType = "Entity", CustomFunctionEntity; + }(); + exports.CustomFunctionEntity = CustomFunctionEntity; + var CustomFunctionFormattedNumber = function () { + function CustomFunctionFormattedNumber(basicValue, numberFormat) { + this.type = CustomFunctionFormattedNumber.valueType, this.basicValue = basicValue, + this.numberFormat = numberFormat; + } + return CustomFunctionFormattedNumber.prototype.toJSON = function () { + return { + type: this.type, + basicValue: this.basicValue, + numberFormat: this.numberFormat + }; + }, CustomFunctionFormattedNumber.valueType = "FormattedNumber", CustomFunctionFormattedNumber; + }(); + exports.CustomFunctionFormattedNumber = CustomFunctionFormattedNumber; + var CustomFunctionWebImage = function () { + function CustomFunctionWebImage(address, altText, relatedImagesAddress, attribution, provider) { + this.type = CustomFunctionWebImage.valueType, this.basicValue = "#VALUE!", this.basicType = "Error", + this.address = address, null != attribution && (this.attribution = attribution), + null != provider && (this.provider = provider), null != altText && (this.altText = altText), + null != relatedImagesAddress && (this.relatedImagesAddress = relatedImagesAddress); + } + return CustomFunctionWebImage.prototype.toJSON = function () { + return { + type: this.type, + basicValue: this.basicValue, + basicType: this.basicType, + address: this.address, + altText: this.altText, + relatedImagesAddress: this.relatedImagesAddress, + attribution: null == this.attribution ? void 0 : this.attribution.map((function (attr) { + return attr.toJSON(); + })), + provider: null == this.provider ? void 0 : this.provider.toJSON() + }; + }, CustomFunctionWebImage.valueType = "WebImage", CustomFunctionWebImage; + }(); + exports.CustomFunctionWebImage = CustomFunctionWebImage; + var CustomFunctionAttribution = function () { + function CustomFunctionAttribution(licenseAddress, licenseText, sourceAddress, sourceText) { + null != licenseAddress && (this.licenseAddress = licenseAddress), null != licenseText && (this.licenseText = licenseText), + null != sourceAddress && (this.sourceAddress = sourceAddress), null != sourceText && (this.sourceText = sourceText); + } + return CustomFunctionAttribution.prototype.toJSON = function () { + return { + licenseAddress: this.licenseAddress, + licenseText: this.licenseText, + sourceAddress: this.sourceAddress, + sourceText: this.sourceText + }; + }, CustomFunctionAttribution; + }(); + exports.CustomFunctionAttribution = CustomFunctionAttribution; + var CustomFunctionProvider = function () { + function CustomFunctionProvider(description, logoSourceAddress, logoTargetAddress) { + this.description = description, null != logoSourceAddress && (this.logoSourceAddress = logoSourceAddress), + null != logoTargetAddress && (this.logoTargetAddress = logoTargetAddress); + } + return CustomFunctionProvider.prototype.toJSON = function () { + return { + description: this.description, + logoSourceAddress: this.logoSourceAddress, + logoTargetAddress: this.logoTargetAddress + }; + }, CustomFunctionProvider; + }(); + exports.CustomFunctionProvider = CustomFunctionProvider, exports.CreateCustomFunctionInstance = function CreateCustomFunctionInstance(parameterValues) { + if (parameterValues instanceof Array) + return parameterValues.map((function (item) { + return CreateCustomFunctionInstance(item); + })); + if (!(parameterValues instanceof Object)) + return parameterValues; + var obj = JSON.parse(parameterValues.value); + switch (obj.type) { + case CustomFunctionEntity.valueType: + return new CustomFunctionEntity(obj.text, obj.properties); + case CustomFunctionFormattedNumber.valueType: + return new CustomFunctionFormattedNumber(obj.primitive, obj.numberFormat); + case CustomFunctionError.valueType: + return new CustomFunctionError(obj.primitive, void 0, obj.errorSubCode); + case CustomFunctionWebImage.valueType: + return new CustomFunctionWebImage(obj.address, obj.altText, obj.relatedImagesAddress, obj.attribution, obj.provider); + case "Double": + case "String": + case "Boolean": + return obj.primitive; + default: + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy.createRichDataFromJsonString"); + } + }; + var CustomFunctionProxy = function () { + function CustomFunctionProxy() { + this._whenInit = void 0, this._isInit = !1, this._setResultsDelayMillis = 50, this._setResultsOverdueDelayMillis = 2e3, + this._maxContextSyncExecutionDurationMills = 15e3, this._minContextSyncIntervalMills = 500, + this._smallerMinContextSyncIntervalMills = 200, this._maxContextSyncIntervalMills = 2e3, + this._setResultsLifeMillis = 6e4, this._ensureInitRetryDelayMillis = 500, this._resultEntryBuffer = {}, + this._resultEntryRetryBuffer = {}, this._retryBufferBodySize = 0, this._isSetResultsTaskScheduled = !1, + this._setResultsTaskOverdueTime = 0, this._inProgressContextSyncExpectedFinishTime = 0, + this._batchQuotaMillis = 1e3, this._invocationContextMap = {}, this._maxResultSize = 2e6; + } + return CustomFunctionProxy.prototype._initSettings = function () { + if ("object" == typeof exports.Script && "object" == typeof exports.Script._CustomFunctionSettings) { + if ("number" == typeof exports.Script._CustomFunctionSettings.setResultsDelayMillis) { + var setResultsDelayMillis = exports.Script._CustomFunctionSettings.setResultsDelayMillis; + setResultsDelayMillis = Math.max(0, setResultsDelayMillis), setResultsDelayMillis = Math.min(1e3, setResultsDelayMillis), + this._setResultsDelayMillis = setResultsDelayMillis; + } + if ("number" == typeof exports.Script._CustomFunctionSettings.ensureInitRetryDelayMillis) { + var ensureInitRetryDelayMillis = exports.Script._CustomFunctionSettings.ensureInitRetryDelayMillis; + ensureInitRetryDelayMillis = Math.max(0, ensureInitRetryDelayMillis), ensureInitRetryDelayMillis = Math.min(2e3, ensureInitRetryDelayMillis), + this._ensureInitRetryDelayMillis = ensureInitRetryDelayMillis; + } + if ("number" == typeof exports.Script._CustomFunctionSettings.setResultsLifeMillis) { + var setResultsLifeMillis = exports.Script._CustomFunctionSettings.setResultsLifeMillis; + setResultsLifeMillis = Math.max(0, setResultsLifeMillis), setResultsLifeMillis = Math.min(6e5, setResultsLifeMillis), + this._setResultsLifeMillis = setResultsLifeMillis; + } + if ("number" == typeof exports.Script._CustomFunctionSettings.batchQuotaMillis) { + var batchQuotaMillis = exports.Script._CustomFunctionSettings.batchQuotaMillis; + batchQuotaMillis = Math.max(0, batchQuotaMillis), batchQuotaMillis = Math.min(1e3, batchQuotaMillis), + this._batchQuotaMillis = batchQuotaMillis; + } + } + }, CustomFunctionProxy.prototype.ensureInit = function (context) { + var _this = this; + return this._initSettings(), void 0 === this._whenInit && (this._whenInit = OfficeExtension.Utility._createPromiseFromResult(null).then((function () { + if (!_this._isInit) + return context.eventRegistration.register(5, "", _this._handleMessage.bind(_this)); + })).then((function () { + _this._isInit = !0; + }))), this._isInit || context._pendingRequest._addPreSyncPromise(this._whenInit), + this._whenInit; + }, CustomFunctionProxy.prototype.setCustomFunctionInvoker = function (invoker) { + "object" == typeof CustomFunctionMappings && delete CustomFunctionMappings.__delay__, + this._invoker = invoker; + }, CustomFunctionProxy.prototype.setCustomFunctionAssociation = function (association) { + var _this = this; + this._customFunctionMappingsUpperCase = void 0, this._association = association, + this._association && this._association.onchange((function () { + _this._customFunctionMappingsUpperCase = void 0; + })); + }, CustomFunctionProxy.prototype._initFromHostBridge = function (hostBridge) { + var _this = this; + this._initSettings(), hostBridge.addHostMessageHandler((function (bridgeMessage) { + 3 === bridgeMessage.type ? _this._handleMessage(bridgeMessage.message) : 4 === bridgeMessage.type && _this._handleSettings(bridgeMessage.message); + })), this._isInit = !0, this._whenInit = OfficeExtension.CoreUtility.Promise.resolve(); + }, CustomFunctionProxy.prototype._handleSettings = function (args) { + OfficeExtension.Utility.log("CustomFunctionProxy._handleSettings:" + JSON.stringify(args)), + args && "object" == typeof args && (CustomFunctionsLogger.s_shouldLog = args[CustomFunctionsLogger.CustomFunctionLoggingFlag]); + }, CustomFunctionProxy.prototype._handleMessage = function (args) { + try { + OfficeExtension.Utility.log("CustomFunctionProxy._handleMessage"), OfficeExtension.Utility.checkArgumentNull(args, "args"); + for (var entryArray = args.entries, invocationArray = [], cancellationArray = [], metadataArray = [], i = 0; i < entryArray.length; i++) + 1 === entryArray[i].messageCategory && ("string" == typeof entryArray[i].message && (entryArray[i].message = JSON.parse(entryArray[i].message)), + 1e3 === entryArray[i].messageType ? invocationArray.push(entryArray[i]) : 1001 === entryArray[i].messageType ? cancellationArray.push(entryArray[i]) : 1002 === entryArray[i].messageType ? metadataArray.push(entryArray[i]) : OfficeExtension.Utility.log("CustomFunctionProxy._handleMessage unknown message type " + entryArray[i].messageType)); + if (metadataArray.length > 0 && this._handleMetadataEntries(metadataArray), invocationArray.length > 0) { + var batchArray = this._batchInvocationEntries(invocationArray); + batchArray.length > 0 && this._invokeRemainingBatchEntries(batchArray, 0); + } + cancellationArray.length > 0 && this._handleCancellationEntries(cancellationArray); + } + catch (ex) { + throw CustomFunctionProxy._tryLog(ex), ex; + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }, CustomFunctionProxy.toLogMessage = function (ex) { + var ret = "Unknown Error"; + if (ex) + try { + ex.toString && (ret = ex.toString()), ret = ret + " " + JSON.stringify(ex); + } + catch (otherEx) { + ret = "Unexpected Error"; + } + return ret; + }, CustomFunctionProxy._tryLog = function (ex) { + var message = CustomFunctionProxy.toLogMessage(ex); + OfficeExtension.Utility.log(message); + }, CustomFunctionProxy.prototype._handleMetadataEntries = function (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var message = entryArray[i].message; + if (_isNullOrUndefined(message)) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy._handleMetadataEntries"); + exports.Script._CustomFunctionMetadata[message.functionName] = { + options: { + stream: message.isStream, + cancelable: message.isCancelable + } + }; + } + }, CustomFunctionProxy.prototype._handleCancellationEntries = function (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var message = entryArray[i].message; + if (_isNullOrUndefined(message)) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy._handleCancellationEntries"); + var invocationId = message.invocationId, invocationContext = this._invocationContextMap[invocationId]; + _isNullOrUndefined(invocationContext) || (delete this._invocationContextMap[invocationId], + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionCancellation, invocationContext.functionName), + _isNullOrUndefined(invocationContext.onCanceled) || invocationContext.onCanceled()); + } + }, CustomFunctionProxy.prototype._transferCustomFunctionError = function (entryArray) { + var _this = this; + return entryArray.map((function (value, index) { + return null === value ? value : null != value.code && "CustomFunctionError" == value.type ? new CustomFunctionError(value.code) : value instanceof Array ? _this._transferCustomFunctionError(value) : value; + })); + }, CustomFunctionProxy.prototype._transferCustomFunctionRichData = function (entryArray) { + var _this = this; + return entryArray.map((function (element, index) { + return element instanceof Array ? _this._transferCustomFunctionRichData(element) : element instanceof Object ? JSON.parse(element.value) : element; + })); + }, CustomFunctionProxy.prototype._batchInvocationEntries = function (entryArray) { + for (var _this = this, batchArray = [], _loop_1 = function (i) { + var message, arrayOrObjectMessage = entryArray[i].message; + if (Array.isArray(arrayOrObjectMessage) ? (message = { + invocationId: arrayOrObjectMessage[0], + functionName: arrayOrObjectMessage[1], + parameterValues: arrayOrObjectMessage[2], + address: arrayOrObjectMessage[3], + flags: arrayOrObjectMessage[4], + parameterAddresses: null + }, _isNullOrUndefined(arrayOrObjectMessage[5]) || (message.parameterAddresses = arrayOrObjectMessage[5])) : message = arrayOrObjectMessage, + _isNullOrUndefined(message)) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy._batchInvocationEntries"); + if (_isNullOrUndefined(message.invocationId) || message.invocationId < 0) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "invocationId", "CustomFunctionProxy._batchInvocationEntries"); + if (_isNullOrUndefined(message.functionName)) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "functionName", "CustomFunctionProxy._batchInvocationEntries"); + var call = null, isCancelable = !1, isStreaming = !1, isAllowError = !1; + if ("number" == typeof message.flags) + isCancelable = 0 != (1 & message.flags), isStreaming = 0 != (2 & message.flags), + isAllowError = 0 != (4 & message.flags), 0 != (8 & message.flags) && (message.parameterValues = this_1._transferCustomFunctionRichData(message.parameterValues)), + isAllowError && (message.parameterValues = this_1._transferCustomFunctionError(message.parameterValues)); + else { + var metadata = exports.Script._CustomFunctionMetadata[message.functionName]; + if (_isNullOrUndefined(metadata)) + return CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionNotFoundLog, message.functionName), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.8") ? this_1._setError(message.invocationId, null, 9) : this_1._setError(message.invocationId, "N/A", 1), + "continue"; + isCancelable = metadata.options.cancelable, isStreaming = metadata.options.stream; + } + if (this_1._invoker && !this_1._customFunctionMappingsContains(message.functionName)) + return this_1._invokeFunctionUsingInvoker(message), + "continue"; + try { + call = this_1._getFunction(message.functionName); + } + catch (ex) { + return CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionNotFoundLog, message.functionName), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.8") ? this_1._setError(message.invocationId, ex, 10) : this_1._setError(message.invocationId, ex, 1), + "continue"; + } + var invocationContext = void 0; + if (isStreaming || isCancelable) { + var setResult = void 0, setError = void 0; + isStreaming && (setResult = function (result) { + _this._invocationContextMap[message.invocationId] ? _this._setResult(message.invocationId, result) : CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionAlreadyCancelled, message.functionName); + }, setError = function (error) { + _this._invocationContextMap[message.invocationId] ? _this._setError(message.invocationId, error.message, _this._getCustomFunctionResultErrorCodeFromErrorCode(error.code)) : CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionAlreadyCancelled, message.functionName); + }), invocationContext = new InvocationContext(message.functionName, message.address, message.parameterAddresses, setResult, setError), + this_1._invocationContextMap[message.invocationId] = invocationContext; + } + else + invocationContext = new InvocationContext(message.functionName, message.address, message.parameterAddresses); + message.parameterValues.push(invocationContext), batchArray.push({ + call: call, + isBatching: !1, + isStreaming: isStreaming, + invocationIds: [message.invocationId], + parameterValueSets: [message.parameterValues], + functionName: message.functionName + }); + }, this_1 = this, i = 0; i < entryArray.length; i++) + _loop_1(i); + return batchArray; + }, CustomFunctionProxy.prototype._invokeFunctionUsingInvoker = function (message) { + var _this = this, isCancelable = 0 != (1 & message.flags), isStreaming = 0 != (2 & message.flags), invocationId = message.invocationId, setResult = void 0, setError = void 0; + if (isStreaming) + setResult = function (result) { + _this._invocationContextMap[invocationId] && _this._setResult(invocationId, result); + }, setError = function (error) { + _this._invocationContextMap[invocationId] && _this._setError(invocationId, error.message, _this._getCustomFunctionResultErrorCodeFromErrorCode(error.code)); + }; + else { + var setResultCalled_1 = !1; + setResult = function (result) { + setResultCalled_1 || _this._setResult(invocationId, result), setResultCalled_1 = !0; + }, setError = function (error) { + setResultCalled_1 || _this._setError(invocationId, error.message, _this._getCustomFunctionResultErrorCodeFromErrorCode(error.code)), + setResultCalled_1 = !0; + }; + } + var invocationContext = new InvocationContext(message.functionName, message.address, message.parameterAddresses, setResult, setError); + (isStreaming || isCancelable) && (this._invocationContextMap[invocationId] = invocationContext), + this._invoker.invoke(message.functionName, message.parameterValues, invocationContext); + }, CustomFunctionProxy.prototype._ensureCustomFunctionMappingsUpperCase = function () { + if (_isNullOrUndefined(this._customFunctionMappingsUpperCase)) { + if (this._customFunctionMappingsUpperCase = {}, "object" == typeof CustomFunctionMappings) + for (var key in OfficeExtension.CoreUtility.log("CustomFunctionMappings.Keys=" + JSON.stringify(Object.keys(CustomFunctionMappings))), + CustomFunctionMappings) + this._customFunctionMappingsUpperCase[key.toUpperCase()] && CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionDuplicatedName, key), + this._customFunctionMappingsUpperCase[key.toUpperCase()] = CustomFunctionMappings[key]; + if (this._association) + for (var key in OfficeExtension.CoreUtility.log("CustomFunctionAssociateMappings.Keys=" + JSON.stringify(Object.keys(this._association.mappings))), + this._association.mappings) + this._customFunctionMappingsUpperCase[key.toUpperCase()] && CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionDuplicatedName, key), + this._customFunctionMappingsUpperCase[key.toUpperCase()] = this._association.mappings[key]; + } + }, CustomFunctionProxy.prototype._customFunctionMappingsContains = function (functionName) { + this._ensureCustomFunctionMappingsUpperCase(); + var functionNameUpperCase = functionName.toUpperCase(); + if (!_isNullOrUndefined(this._customFunctionMappingsUpperCase[functionNameUpperCase])) + return !0; + if ("undefined" != typeof window) { + for (var functionParent = window, functionNameSegments = functionName.split("."), i = 0; i < functionNameSegments.length - 1; i++) + if (functionParent = functionParent[functionNameSegments[i]], + _isNullOrUndefined(functionParent) || "object" != typeof functionParent) + return !1; + if ("function" == typeof functionParent[functionNameSegments[functionNameSegments.length - 1]]) + return !0; + } + return !1; + }, CustomFunctionProxy.prototype._getCustomFunctionMappings = function (functionName) { + this._ensureCustomFunctionMappingsUpperCase(); + var functionNameUpperCase = functionName.toUpperCase(); + if (!_isNullOrUndefined(this._customFunctionMappingsUpperCase[functionNameUpperCase])) { + if ("function" == typeof this._customFunctionMappingsUpperCase[functionNameUpperCase]) + return this._customFunctionMappingsUpperCase[functionNameUpperCase]; + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.invalidOperation, OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.customFunctionInvalidFunctionMapping, functionName), "CustomFunctionProxy._getCustomFunctionMappings"); + } + }, CustomFunctionProxy.prototype._getFunction = function (functionName) { + return this._getCustomFunctionMappings(functionName); + }, CustomFunctionProxy.prototype._invokeRemainingBatchEntries = function (batchArray, startIndex) { + OfficeExtension.Utility.log("CustomFunctionProxy._invokeRemainingBatchEntries"); + for (var startTimeMillis = Date.now(), i = startIndex; i < batchArray.length; i++) { + if (!(Date.now() - startTimeMillis < this._batchQuotaMillis)) { + OfficeExtension.Utility.log("setTimeout(CustomFunctionProxy._invokeRemainingBatchEntries)"), + setTimeout(this._invokeRemainingBatchEntries.bind(this), 0, batchArray, i); + break; + } + this._invokeFunctionAndSetResult(batchArray[i]); + } + }, CustomFunctionProxy.prototype._invokeFunctionAndSetResult = function (batch) { + var results, _this = this; + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionStartLog, batch.functionName); + var startTime = Date.now(); + try { + results = batch.isBatching ? batch.call.call(null, batch.parameterValueSets) : [batch.call.apply(null, batch.parameterValueSets[0])]; + } + catch (ex) { + var outboundData_1 = []; + outboundData_1.push(Date.now() - startTime); + for (var i = 0; i < batch.invocationIds.length; i++) + ex instanceof CustomFunctionError ? this._setErrorWithOutboundData(batch.invocationIds[i], ex.message, this._getCustomFunctionResultErrorCodeFromErrorCode(ex.code), outboundData_1) : this._setErrorWithOutboundData(batch.invocationIds[i], ex, 2, outboundData_1); + return void CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionExceptionThrownLog, batch.functionName, CustomFunctionProxy.toLogMessage(ex)); + } + var outboundData = []; + if (CustomFunctions.isFeatureEnabled(3) || outboundData.push(Date.now() - startTime), + batch.isStreaming) + ; + else if (results.length === batch.parameterValueSets.length) { + var _loop_2 = function (i) { + _isNullOrUndefined(results[i]) || "object" != typeof results[i] || "function" != typeof results[i].then ? (CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionFinishLog, batch.functionName), + this_2._setResultWithOutboundData(batch.invocationIds[i], results[i], outboundData)) : results[i].then((function (value) { + CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionFinishLog, batch.functionName), + _this._setResultWithOutboundData(batch.invocationIds[i], value, outboundData); + }), (function (reason) { + CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionRejectedPromoseLog, batch.functionName, CustomFunctionProxy.toLogMessage(reason)), + reason instanceof CustomFunctionError ? _this._setErrorWithOutboundData(batch.invocationIds[i], reason, _this._getCustomFunctionResultErrorCodeFromErrorCode(reason.code), outboundData) : _this._setErrorWithOutboundData(batch.invocationIds[i], reason, 3, outboundData); + })); + }, this_2 = this; + for (i = 0; i < results.length; i++) + _loop_2(i); + } + else { + CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionBatchMismatchLog, batch.functionName); + for (i = 0; i < batch.invocationIds.length; i++) + this._setErrorWithOutboundData(batch.invocationIds[i], OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch), 4, outboundData); + } + }, CustomFunctionProxy.prototype._setResult = function (invocationId, result) { + var outboundData = []; + outboundData.push(0), this._setResultWithOutboundData(invocationId, result, outboundData); + }, CustomFunctionProxy.prototype._setResultWithOutboundData = function (invocationId, result, outboundData) { + var invocationResult = { + id: invocationId, + value: result, + outboundData: outboundData + }; + "number" == typeof result ? isNaN(result) ? (invocationResult.failed = !0, invocationResult.value = "NaN") : isFinite(result) || (invocationResult.failed = !0, + invocationResult.value = "Infinity", invocationResult.errorCode = 6) : result instanceof CustomFunctionError || result instanceof CustomFunctionEntity || result instanceof CustomFunctionFormattedNumber || result instanceof CustomFunctionWebImage ? (invocationResult.failed = !1, + invocationResult.value = result.toJSON()) : result instanceof Error && (invocationResult.failed = !0, + invocationResult.value = CustomFunctionProxy.toLogMessage(result), invocationResult.errorCode = 0); + var timeNow = Date.now(); + this._resultEntryBuffer[invocationId] = { + timeCreated: timeNow, + result: invocationResult + }, this._ensureSetResultsTaskIsScheduled(timeNow); + }, CustomFunctionProxy.prototype._setError = function (invocationId, error, errorCode) { + var outboundData = []; + outboundData.push(0), this._setErrorWithOutboundData(invocationId, error, errorCode, outboundData); + }, CustomFunctionProxy.prototype._setErrorWithOutboundData = function (invocationId, error, errorCode, outboundData) { + var message = ""; + _isNullOrUndefined(error) || (error instanceof CustomFunctionError && !_isNullOrUndefined(error.message) ? message = error.message : "string" == typeof error && (message = error)); + var result = { + id: invocationId, + failed: !0, + value: message, + errorCode: errorCode, + outboundData: outboundData + }, timeNow = Date.now(); + this._resultEntryBuffer[invocationId] = { + timeCreated: timeNow, + result: result + }, this._ensureSetResultsTaskIsScheduled(timeNow); + }, CustomFunctionProxy.prototype._getCustomFunctionResultErrorCodeFromErrorCode = function (errorCode) { + var internalCode; + switch (errorCode) { + case ErrorCode.notAvailable: + internalCode = 1; + break; + case ErrorCode.divisionByZero: + internalCode = 5; + break; + case ErrorCode.invalidValue: + internalCode = 7; + break; + case ErrorCode.invalidNumber: + internalCode = 6; + break; + case ErrorCode.nullReference: + internalCode = 8; + break; + default: + internalCode = 7; + } + return internalCode; + }, CustomFunctionProxy.prototype._ensureSetResultsTaskIsScheduled = function (timeNow) { + if (this._setResultsTaskOverdueTime > 0 && timeNow > this._setResultsTaskOverdueTime) + return OfficeExtension.Utility.log("SetResultsTask overdue"), + void this._executeSetResultsTask(); + this._isSetResultsTaskScheduled || (OfficeExtension.Utility.log("setTimeout(CustomFunctionProxy._executeSetResultsTask)"), + setTimeout(this._executeSetResultsTask.bind(this), this._setResultsDelayMillis), + this._isSetResultsTaskScheduled = !0, this._setResultsTaskOverdueTime = timeNow + this._setResultsDelayMillis + this._setResultsOverdueDelayMillis); + }, CustomFunctionProxy.prototype._convertCustomFunctionInvocationResultToArray = function (result) { + var ret = []; + return ret.push(result.id), ret.push(!result.failed), OfficeExtension.CoreUtility.isUndefined(result.value) ? ret.push(null) : ret.push(result.value), + result.failed && (OfficeExtension.CoreUtility.isUndefined(result.errorCode) ? ret.push(0) : ret.push(result.errorCode)), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.9") && ret.push(result.outboundData), + ret; + }, CustomFunctionProxy.prototype._executeSetResultsTask = function () { + var _this = this; + OfficeExtension.Utility.log("CustomFunctionProxy._executeSetResultsTask"); + var timeNow = Date.now(); + if (this._inProgressContextSyncExpectedFinishTime > 0 && this._inProgressContextSyncExpectedFinishTime > timeNow) + return OfficeExtension.Utility.log("context.sync() is in progress. setTimeout(CustomFunctionProxy._executeSetResultsTask)"), + setTimeout(this._executeSetResultsTask.bind(this), this._setResultsDelayMillis), + void (this._setResultsTaskOverdueTime = timeNow + this._setResultsDelayMillis + this._setResultsOverdueDelayMillis); + this._isSetResultsTaskScheduled = !1, this._setResultsTaskOverdueTime = 0; + var resultEntryBufferCopy = {}, isSizeRetry = !1; + CustomFunctions.isFeatureEnabled(1) && Object.keys(this._resultEntryRetryBuffer).length > 0 ? (resultEntryBufferCopy = this._resultEntryRetryBuffer, + this._resultEntryRetryBuffer = {}, this._retryBufferBodySize = 2, isSizeRetry = !0) : (resultEntryBufferCopy = this._resultEntryBuffer, + this._resultEntryBuffer = {}); + var useArrayResult = OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.7"), invocationResults = []; + for (var key in resultEntryBufferCopy) + useArrayResult ? invocationResults.push(this._convertCustomFunctionInvocationResultToArray(resultEntryBufferCopy[key].result)) : invocationResults.push(resultEntryBufferCopy[key].result); + if (0 !== invocationResults.length) { + var context = new CustomFunctionRequestContext; + useArrayResult ? context.customFunctions.setInvocationArrayResults(invocationResults) : context.customFunctions.setInvocationResults(invocationResults); + var contextSyncStartTime = Date.now(); + this._inProgressContextSyncExpectedFinishTime = contextSyncStartTime + this._maxContextSyncExecutionDurationMills, + context.sync().then((function (value) { + var timeNow = Date.now(); + _this._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(timeNow - contextSyncStartTime), + isSizeRetry && _this._ensureSetResultsTaskIsScheduled(timeNow); + }), (function (reason) { + var timeNow = Date.now(); + _this._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(timeNow - contextSyncStartTime), + CustomFunctions.isFeatureEnabled(1) && reason.code == OfficeExtension.ErrorCodes.requestPayloadSizeLimitExceeded ? _this._restoreAndSliceResultEntries(timeNow, resultEntryBufferCopy) : _this._restoreResultEntries(timeNow, resultEntryBufferCopy), + _this._ensureSetResultsTaskIsScheduled(timeNow); + })); + } + }, CustomFunctionProxy.prototype._restoreResultEntries = function (timeNow, resultEntryBufferCopy) { + for (var key in resultEntryBufferCopy) { + var resultSetter = resultEntryBufferCopy[key]; + timeNow - resultSetter.timeCreated <= this._setResultsLifeMillis && (this._resultEntryBuffer[key] || (this._resultEntryBuffer[key] = resultSetter)); + } + }, CustomFunctionProxy.prototype._restoreAndSliceResultEntries = function (timeNow, resultEntryBufferCopy) { + for (var key in resultEntryBufferCopy) { + var resultSetter = resultEntryBufferCopy[key], resultSize = void 0; + if (timeNow - resultSetter.timeCreated <= this._setResultsLifeMillis && !this._resultEntryBuffer[key]) { + try { + resultSize = JSON.stringify(this._convertCustomFunctionInvocationResultToArray(resultSetter.result)).length + 1; + } + catch (ex) { + this._resultEntryBuffer[key] = resultSetter, OfficeExtension.Utility.log("Result can't pass in JSON.stringify"); + continue; + } + this._retryBufferBodySize + resultSize < this._maxResultSize ? (this._resultEntryRetryBuffer[key] = resultSetter, + this._retryBufferBodySize += resultSize) : this._resultEntryBuffer[key] = resultSetter; + } + } + }, CustomFunctionProxy.prototype._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval = function (lastContextSyncDurationMills) { + var _this = this, contextSyncInterval = CustomFunctions.isFeatureEnabled(2) ? this._smallerMinContextSyncIntervalMills : this._minContextSyncIntervalMills, interval = Math.max(contextSyncInterval, 2 * lastContextSyncDurationMills), intervalMax = CustomFunctions.isFeatureEnabled(4) ? Math.min(this._maxContextSyncIntervalMills, interval) : interval; + OfficeExtension.Utility.log("setTimeout(clearInProgressContestSyncExpectedFinishedTime," + interval + ")"), + setTimeout((function () { + OfficeExtension.Utility.log("clearInProgressContestSyncExpectedFinishedTime"), _this._inProgressContextSyncExpectedFinishTime = 0; + }), intervalMax); + }, CustomFunctionProxy.CustomFunctionExecutionStartLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Verbose, "CustomFunctions [Execution] [Begin] Function="), + CustomFunctionProxy.CustomFunctionExecutionFailureLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] Function="), + CustomFunctionProxy.CustomFunctionExecutionRejectedPromoseLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] [RejectedPromise] Function="), + CustomFunctionProxy.CustomFunctionExecutionExceptionThrownLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] [ExceptionThrown] Function="), + CustomFunctionProxy.CustomFunctionExecutionBatchMismatchLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] [BatchMismatch] Function="), + CustomFunctionProxy.CustomFunctionExecutionFinishLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Info, "CustomFunctions [Execution] [End] [Success] Function="), + CustomFunctionProxy.CustomFunctionExecutionNotFoundLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [NotFound] Function="), + CustomFunctionProxy.CustomFunctionCancellation = new CustomFunctionLog(CustomFunctionLoggingSeverity.Info, "CustomFunctions [Cancellation] Function="), + CustomFunctionProxy.CustomFunctionAlreadyCancelled = new CustomFunctionLog(CustomFunctionLoggingSeverity.Info, "CustomFunctions [AlreadyCancelled] Function="), + CustomFunctionProxy.CustomFunctionDuplicatedName = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [DuplicatedName] Function="), + CustomFunctionProxy.CustomFunctionInvalidArg = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [InvalidArg] Name="), + CustomFunctionProxy; + }(); + exports.CustomFunctionProxy = CustomFunctionProxy, exports.customFunctionProxy = new CustomFunctionProxy, + exports.setCustomFunctionAssociation = exports.customFunctionProxy.setCustomFunctionAssociation.bind(exports.customFunctionProxy), + exports.setCustomFunctionInvoker = exports.customFunctionProxy.setCustomFunctionInvoker.bind(exports.customFunctionProxy), + Core.HostBridge.onInited((function (hostBridge) { + exports.customFunctionProxy._initFromHostBridge(hostBridge); + })); + var CustomFunctions = function (_super) { + function CustomFunctions() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(CustomFunctions, _super), Object.defineProperty(CustomFunctions.prototype, "_className", { + get: function () { + return "CustomFunctions"; + }, + enumerable: !1, + configurable: !0 + }), CustomFunctions.isFeatureEnabled = function (args) { + return this._enabledFeature instanceof Array && this._enabledFeature.indexOf(args) >= 0; + }, CustomFunctions.initialize = function () { + var _this = this, context = new CustomFunctionRequestContext; + return exports.customFunctionProxy.ensureInit(context).then((function () { + var enabledFeature; + return context.customFunctions._SetOsfControlContainerReadyForCustomFunctions(), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.9") && (enabledFeature = context.customFunctions._GetEnabledFeatures()), + OfficeExtension.Utility.log("OsfControl activation lifecycle: Set OsfControlContainer ready for CustomFunctions"), + context._customData = "SetOsfControlContainerReadyForCustomFunctions", context.sync().then((function () { + _isNullOrUndefined(enabledFeature) || (_this._enabledFeature = enabledFeature.value); + }))["catch"]((function (error) { + !function (error, rethrowOtherError) { + var isCellEditModeError = error instanceof OfficeExtension.Error && error.code === CustomFunctionRuntimeErrorCode.invalidOperationInCellEditMode; + if (OfficeExtension.CoreUtility.log("Error on starting custom functions: " + error), + isCellEditModeError) { + OfficeExtension.CoreUtility.log("Was in cell-edit mode, will try again"); + var delay_1 = exports.customFunctionProxy._ensureInitRetryDelayMillis; + return new OfficeExtension.CoreUtility.Promise((function (resolve) { + return setTimeout(resolve, delay_1); + })).then((function () { + return CustomFunctions.initialize(); + })); + } + if (rethrowOtherError) + throw error; + }(error, !0); + })); + })); + }, CustomFunctions.prototype.setInvocationArrayResults = function (results) { + _throwIfApiNotSupported("CustomFunctions.setInvocationArrayResults", "CustomFunctions", "1.4", "Excel"), + _invokeMethod(this, "SetInvocationArrayResults", 0, [results], 2, 0); + }, CustomFunctions.prototype.setInvocationResults = function (results) { + _invokeMethod(this, "SetInvocationResults", 0, [results], 2, 0); + }, CustomFunctions.prototype._GetEnabledFeatures = function () { + return _throwIfApiNotSupported("CustomFunctions._GetEnabledFeatures", "CustomFunctions", "1.4", "Excel"), + _invokeMethod(this, "_GetEnabledFeatures", 1, [], 4, 0); + }, CustomFunctions.prototype._SetInvocationError = function (invocationId, message) { + _invokeMethod(this, "_SetInvocationError", 0, [invocationId, message], 2, 0); + }, CustomFunctions.prototype._SetInvocationResult = function (invocationId, result) { + _invokeMethod(this, "_SetInvocationResult", 0, [invocationId, result], 2, 0); + }, CustomFunctions.prototype._SetOsfControlContainerReadyForCustomFunctions = function () { + _invokeMethod(this, "_SetOsfControlContainerReadyForCustomFunctions", 0, [], 10, 0); + }, CustomFunctions.prototype._handleResult = function (value) { + (_super.prototype._handleResult.call(this, value), _isNullOrUndefined(value)) || _fixObjectPathIfNecessary(this, value); + }, CustomFunctions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, CustomFunctions.newObject = function (context) { + return _createTopLevelServiceObject(CustomFunctions, context, "Microsoft.ExcelServices.CustomFunctions", !1, 4); + }, CustomFunctions.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }, CustomFunctions; + }(OfficeExtension.ClientObject); + exports.CustomFunctions = CustomFunctions; + var CustomFunctionRuntimeErrorCode, CustomFunctionsContainer = function (_super) { + function CustomFunctionsContainer() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(CustomFunctionsContainer, _super), Object.defineProperty(CustomFunctionsContainer.prototype, "_className", { + get: function () { + return "CustomFunctionsContainer"; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(CustomFunctionsContainer.prototype, "_navigationPropertyNames", { + get: function () { + return ["customFunctions"]; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(CustomFunctionsContainer.prototype, "customFunctions", { + get: function () { + return _throwIfApiNotSupported("CustomFunctionsContainer.customFunctions", "CustomFunctions", "1.2", "Excel"), + this._C || (this._C = _createPropertyObject(CustomFunctions, this, "CustomFunctions", !1, 4)), + this._C; + }, + enumerable: !1, + configurable: !0 + }), CustomFunctionsContainer.prototype._handleResult = function (value) { + if (_super.prototype._handleResult.call(this, value), !_isNullOrUndefined(value)) { + var obj = value; + _fixObjectPathIfNecessary(this, obj), _handleNavigationPropertyResults(this, obj, ["customFunctions", "CustomFunctions"]); + } + }, CustomFunctionsContainer.prototype.load = function (options) { + return _load(this, options); + }, CustomFunctionsContainer.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, CustomFunctionsContainer.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }, CustomFunctionsContainer; + }(OfficeExtension.ClientObject); + exports.CustomFunctionsContainer = CustomFunctionsContainer, function (CustomFunctionRuntimeErrorCode) { + CustomFunctionRuntimeErrorCode.generalException = "GeneralException", CustomFunctionRuntimeErrorCode.invalidOperation = "InvalidOperation", + CustomFunctionRuntimeErrorCode.invalidOperationInCellEditMode = "InvalidOperationInCellEditMode"; + }(CustomFunctionRuntimeErrorCode || (CustomFunctionRuntimeErrorCode = {})); + }]); +OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel = true; +OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria = false; +window.OfficeExtensionBatch = window.OfficeExtension; +!function (modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) + return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + i: moduleId, + l: !1, + exports: {} + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.l = !0, module.exports; + } + __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function (exports, name, getter) { + __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { + enumerable: !0, + get: getter + }); + }, __webpack_require__.r = function (exports) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(exports, "__esModule", { + value: !0 + }); + }, __webpack_require__.t = function (value, mode) { + if (1 & mode && (value = __webpack_require__(value)), 8 & mode) + return value; + if (4 & mode && "object" == typeof value && value && value.__esModule) + return value; + var ns = Object.create(null); + if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { + enumerable: !0, + value: value + }), 2 & mode && "string" != typeof value) + for (var key in value) + __webpack_require__.d(ns, key, function (key) { + return value[key]; + }.bind(null, key)); + return ns; + }, __webpack_require__.n = function (module) { + var getter = module && module.__esModule ? function () { + return module["default"]; + } : function () { + return module; + }; + return __webpack_require__.d(getter, "a", getter), getter; + }, __webpack_require__.o = function (object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 1); +}([function (module, exports) { + module.exports = OfficeExtensionBatch; + }, function (module, exports, __webpack_require__) { + "use strict"; + var __assign = this && this.__assign || function () { + return (__assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) + for (var p in s = arguments[i]) + Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]); + return t; + }).apply(this, arguments); + }; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var office_apiinformation_web_1 = __webpack_require__(2), AsyncStorage = __webpack_require__(3), DialogApi = __webpack_require__(4), officeruntime_storage_web_1 = __webpack_require__(5), Experimentation = __webpack_require__(6), officeruntime_message_1 = __webpack_require__(7), officeruntime_auth_1 = __webpack_require__(10), DynamicRibbon = __webpack_require__(11); + window._OfficeRuntimeWeb = __assign(__assign({}, window.OfficeRuntime), { + displayWebDialog: DialogApi.displayWebDialog, + AsyncStorage: AsyncStorage, + storage: officeruntime_storage_web_1.storage, + experimentation: Experimentation.experimentation, + apiInformation: office_apiinformation_web_1.apiInformation, + message: officeruntime_message_1.Message.instance, + ui: DynamicRibbon.ui, + auth: officeruntime_auth_1.Auth.instance + }), Object.freeze(window._OfficeRuntimeWeb); + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.apiInformation = void 0, exports.apiInformation = { + isSetSupported: function (capability, version) { + try { + return !!(Office && Office.context && Office.context.requirements) && Office.context.requirements.isSetSupported(capability, version); + } + catch (e) { + return !1; + } + } + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.multiGet = exports.multiRemove = exports.multiSet = exports.getAllKeys = exports.clear = exports.removeItem = exports.setItem = exports.getItem = void 0; + var prefix = "_Office_AsyncStorage_"; + function ensureFreshLocalStorage() { + window.localStorage.setItem("_Office_AsyncStorage_|_unusedKey_", null), window.localStorage.removeItem("_Office_AsyncStorage_|_unusedKey_"); + } + function performAction(action, callback) { + return void 0 === callback && (callback = function () { }), new Promise((function (resolve, reject) { + try { + ensureFreshLocalStorage(), action(), callback(null), resolve(); + } + catch (e) { + callback(e), reject(e); + } + })); + } + function performActionAndReturnResult(action, callback) { + return void 0 === callback && (callback = function () { }), new Promise((function (resolve, reject) { + try { + ensureFreshLocalStorage(); + var result = action(); + callback(null, result), resolve(result); + } + catch (e) { + callback(e, null), reject(e); + } + })); + } + function performMultiAction(collection, action, callback) { + return void 0 === callback && (callback = function () { }), new Promise((function (resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } + catch (e) { + errors.push(e); + } + collection.forEach((function (item) { + try { + action(item); + } + catch (e) { + errors.push(e); + } + })), callback(errors), errors.length > 0 ? reject(errors) : resolve(); + })); + } + exports.getItem = function (key, callback) { + return performActionAndReturnResult((function () { + return window.localStorage.getItem(prefix + key); + }), callback); + }, exports.setItem = function (key, value, callback) { + return performAction((function () { + return window.localStorage.setItem(prefix + key, value); + }), callback); + }, exports.removeItem = function (key, callback) { + return performAction((function () { + return window.localStorage.removeItem(prefix + key); + }), callback); + }, exports.clear = function (callback) { + return performAction((function () { + Object.keys(window.localStorage).filter((function (fullKey) { + return 0 === fullKey.indexOf(prefix); + })).forEach((function (fullKey) { + return window.localStorage.removeItem(fullKey); + })); + }), callback); + }, exports.getAllKeys = function (callback) { + return performActionAndReturnResult((function () { + return Object.keys(window.localStorage).filter((function (fullKey) { + return 0 === fullKey.indexOf(prefix); + })).map((function (fullKey) { + return fullKey.substr(prefix.length); + })); + }), callback); + }, exports.multiSet = function (keyValuePairs, callback) { + return performMultiAction(keyValuePairs, (function (_a) { + var key = _a[0], value = _a[1]; + return window.localStorage.setItem(prefix + key, value); + }), callback); + }, exports.multiRemove = function (keys, callback) { + return performMultiAction(keys, (function (key) { + return window.localStorage.removeItem(prefix + key); + }), callback); + }, exports.multiGet = function (keys, callback) { + return new Promise((function (resolve, reject) { + callback || (callback = function () { }); + var errors = [], results = keys.map((function (key) { + try { + return [key, window.localStorage.getItem(prefix + key)]; + } + catch (e) { + errors.push(e); + } + })).filter((function (pair) { + return pair; + })); + errors.length > 0 ? (callback(errors, results), reject(errors)) : (callback(null, results), + resolve(results)); + })); + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.displayWebDialog = exports.Dialog = void 0; + var OfficeExtension = __webpack_require__(0), Dialog = function () { + function Dialog(_dialog) { + this._dialog = _dialog; + } + return Dialog.prototype.close = function () { + return this._dialog.close(), OfficeExtension.CoreUtility.Promise.resolve(); + }, Dialog; + }(); + exports.Dialog = Dialog, exports.displayWebDialog = function (url, options) { + return new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) + throw new OfficeExtension.Error({ + code: "InvalidArgument", + message: 'Dimensions must be "number%" or number.' + }); + var dialog, dialogOptions = { + width: options.width ? parseInt(options.width, 10) : 50, + height: options.height ? parseInt(options.height, 10) : 50, + displayInIframe: options.displayInIFrame || !1 + }; + function messageHandler(args) { + options.onMessage && options.onMessage(args.message, dialog, args.origin); + } + function eventHandler(args) { + 12006 === args.error ? options.onClose && options.onClose() : options.onRuntimeError && options.onRuntimeError(new OfficeExtension.Error(lookupErrorCodeAndMessage(args.error)), dialog); + } + function isInt(value) { + return /^(\-|\+)?([0-9]+)%?$/.test(value); + } + function lookupErrorCodeAndMessage(internalCode) { + var _a, table = ((_a = {})[12002] = { + code: "InvalidUrl", + message: "Cannot load URL, no such page or bad URL syntax." + }, _a[12003] = { + code: "InvalidUrl", + message: "HTTPS is required." + }, _a[12004] = { + code: "Untrusted", + message: "Domain is not trusted." + }, _a[12005] = { + code: "InvalidUrl", + message: "HTTPS is required." + }, _a[12007] = { + code: "FailedToOpen", + message: "Another dialog is already opened." + }, _a); + return table[internalCode] ? table[internalCode] : { + code: "Unknown", + message: "An unknown error has occured" + }; + } + Office.context.ui.displayDialogAsync(url, dialogOptions, (function (asyncResult) { + "failed" === asyncResult.status ? reject(new OfficeExtension.Error(lookupErrorCodeAndMessage(asyncResult.error.code))) : ((dialog = asyncResult.value).addEventHandler(Office.EventType.DialogMessageReceived, messageHandler), + dialog.addEventHandler(Office.EventType.DialogEventReceived, eventHandler), resolve(new Dialog(dialog))); + })); + })); + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.storage = void 0; + var prefix = "_OfficeRuntime_Storage_"; + function ensureFreshLocalStorage() { + window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_", null), window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_"); + } + function performAction(action) { + return new Promise((function (resolve, reject) { + try { + ensureFreshLocalStorage(), action(), resolve(); + } + catch (e) { + reject(e); + } + })); + } + function performActionAndReturnResult(action) { + return new Promise((function (resolve, reject) { + try { + ensureFreshLocalStorage(), resolve(action()); + } + catch (e) { + reject(e); + } + })); + } + function performMultiAction(collection, action) { + return new Promise((function (resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } + catch (e) { + errors.push(e); + } + for (var key in collection) + if (collection.hasOwnProperty(key) || Array.isArray(collection)) + try { + Array.isArray(collection) ? action(collection[key]) : action(key); + } + catch (e) { + errors.push(e); + } + errors.length > 0 ? reject(new Error("Unknown error.")) : resolve(); + })); + } + exports.storage = { + getItem: function (key) { + return performActionAndReturnResult((function () { + return window.localStorage.getItem(prefix + key); + })); + }, + setItem: function (key, value) { + return performAction((function () { + return window.localStorage.setItem(prefix + key, value); + })); + }, + removeItem: function (key) { + return performAction((function () { + return window.localStorage.removeItem(prefix + key); + })); + }, + getItems: function (keys) { + return new Promise((function (resolve, reject) { + var result = {}, errors = []; + try { + ensureFreshLocalStorage(); + } + catch (e) { + reject(e); + } + keys.forEach((function (key) { + try { + var value = window.localStorage.getItem(prefix + key); + result[key] = value || null; + } + catch (e) { + errors.push(e); + } + })), errors.length > 0 ? reject(new Error("Unknown error.")) : resolve(result); + })); + }, + setItems: function (keyValues) { + return performMultiAction(keyValues, (function (key) { + return window.localStorage.setItem(prefix + key, keyValues[key]); + })); + }, + removeItems: function (keys) { + return performMultiAction(keys, (function (key) { + window.localStorage.removeItem(prefix + key); + })); + }, + getKeys: function () { + return performActionAndReturnResult((function () { + return Object.keys(window.localStorage).filter((function (fullKey) { + return 0 === fullKey.indexOf(prefix); + })).map((function (fullKey) { + return fullKey.substr(prefix.length); + })); + })); + } + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.experimentation = void 0; + var ExperimentationWeb = function () { + function ExperimentationWeb() { } + return ExperimentationWeb.prototype.getBooleanFeatureGate = function (featureName, defaultValue) { + try { + var featureGateValue = Microsoft.Office.WebExtension.FeatureGates[featureName]; + return null == featureGateValue ? defaultValue : "true" === featureGateValue.toString().toLowerCase(); + } + catch (error) { + return defaultValue; + } + }, ExperimentationWeb.prototype.getIntFeatureGate = function (featureName, defaultValue) { + try { + var featureGateValue = parseInt(Microsoft.Office.WebExtension.FeatureGates[featureName]); + return isNaN(featureGateValue) ? defaultValue : featureGateValue; + } + catch (error) { + return defaultValue; + } + }, ExperimentationWeb.prototype.getStringFeatureGate = function (featureName, defaultValue) { + try { + var featureGateValue = Microsoft.Office.WebExtension.FeatureGates[featureName]; + return null == featureGateValue ? defaultValue : featureGateValue; + } + catch (error) { + return defaultValue; + } + }, ExperimentationWeb.prototype.getChangeGate = function (changeGateName) { + return this.getBooleanFeatureGate(changeGateName, !0); + }, ExperimentationWeb.prototype.getBooleanFeatureGateAsync = function (featureName, defaultValue) { + return Promise.resolve(this.getBooleanFeatureGate(featureName, defaultValue)); + }, ExperimentationWeb.prototype.getIntFeatureGateAsync = function (featureName, defaultValue) { + return Promise.resolve(this.getIntFeatureGate(featureName, defaultValue)); + }, ExperimentationWeb.prototype.getStringFeatureGateAsync = function (featureName, defaultValue) { + return Promise.resolve(this.getStringFeatureGate(featureName, defaultValue)); + }, ExperimentationWeb; + }(); + exports.experimentation = new ExperimentationWeb; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Message = void 0; + var Message_1 = __webpack_require__(8); + Object.defineProperty(exports, "Message", { + enumerable: !0, + get: function () { + return Message_1.Message; + } + }); + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Message = void 0; + var ListenerManager_1 = __webpack_require__(9), Message = function () { + function Message() { + this.listeners = {}; + } + return Message.prototype.on = function (eventName, listener) { + return this.add(eventName, listener), new Promise((function (resolve) { + resolve(); + })); + }, Message.prototype.off = function (eventName, listener) { + return this.remove(eventName, listener), new Promise((function (resolve) { + resolve(); + })); + }, Message.prototype.emit = function (eventName, message) { + return this.send(eventName, message), new Promise((function (resolve) { + resolve(); + })); + }, Object.defineProperty(Message, "instance", { + get: function () { + return Message.singleton || (Message.singleton = new Message), this.singleton; + }, + enumerable: !1, + configurable: !0 + }), Message.prototype.setupReceive = function () { + Office && Office.context && Office.context.messaging && !Office.context.messaging.onMessage && (Office.context.messaging.onMessage = this.receiveMessage.bind(this)); + }, Message.prototype.add = function (eventName, listener) { + this.listeners.hasOwnProperty(eventName) || (this.listeners[eventName] = new ListenerManager_1.ListenerManager, + this.setupReceive()), this.listeners[eventName].add(listener); + }, Message.prototype.remove = function (eventName, listener) { + this.listeners.hasOwnProperty(eventName) && (listener ? this.listeners[eventName].remove(listener) : delete this.listeners[eventName]); + }, Message.prototype.send = function (eventName, message) { + var wrapped = { + eventName: eventName, + message: message + }; + Office && Office.context && Office.context.messaging && Office.context.messaging.sendMessage && Office.context.messaging.sendMessage(wrapped); + }, Message.prototype.receiveMessage = function (wrapped) { + var eventName = wrapped.eventName, message = wrapped.message; + this.listeners.hasOwnProperty(eventName) && this.listeners[eventName].call(message); + }, Message; + }(); + exports.Message = Message; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ListenerManager = void 0; + var ListenerManager = function () { + function ListenerManager() { + this.listeners = []; + } + return ListenerManager.prototype.add = function (listener) { + this.listeners.push(listener); + }, ListenerManager.prototype.remove = function (listener) { + var index = this.listeners.lastIndexOf(listener); + -1 !== index && this.listeners.splice(index, 1); + }, ListenerManager.prototype.call = function (message) { + this.listeners.forEach((function (listener) { + return listener(message); + })); + }, ListenerManager; + }(); + exports.ListenerManager = ListenerManager; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Auth = void 0; + var OfficeExtension = __webpack_require__(0), Auth = function () { + function Auth() { } + return Auth.prototype.getAccessToken = function (params) { + return new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + try { + Office.context.auth.getAccessTokenAsync(params || {}, (function (result) { + "succeeded" === result.status ? resolve(result.value) : reject(result.error); + })); + } + catch (error) { + reject(error); + } + })); + }, Auth.prototype.getAuthContext = function () { + return new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + try { + Office.context.auth.getAuthContextAsync((function (result) { + "succeeded" === result.status ? resolve(result.value) : reject(result.error); + })); + } + catch (error) { + reject(error); + } + })); + }, Object.defineProperty(Auth, "instance", { + get: function () { + return Auth.singleton || (Auth.singleton = new Auth), Auth.singleton; + }, + enumerable: !1, + configurable: !0 + }), Auth; + }(); + exports.Auth = Auth; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Ribbon = exports.ui = void 0, exports.ui = { + getRibbon: function () { + return new Promise((function (resolve, reject) { + resolve(new Ribbon); + })); + } + }; + var Ribbon = function () { + function Ribbon() { + this.requestContext = new OfficeCore.RequestContext, OSF.WebAuth && "web" == OSF._OfficeAppFactory.getHostInfo().hostPlatform && (this.requestContext._customData = "WacPartition"); + } + return Ribbon.prototype.requestUpdate = function (input) { + var ribbon = this.requestContext.ribbon; + return input.tabs.filter((function (tab) { + return !!tab.id; + })).forEach((function (tab) { + var ribbonTab = ribbon.getTab(tab.id); + void 0 !== tab.visible && null !== tab.visible && ribbonTab.setVisibility(tab.visible), + tab.controls.filter((function (control) { + return !!control.id; + })).forEach((function (control) { + var ribbonControl = ribbon.getButton(control.id); + void 0 !== control.enabled && null !== control.enabled && (ribbonControl.enabled = control.enabled); + })); + })), this.requestContext.sync(); + }, Ribbon; + }(); + exports.Ribbon = Ribbon; + }]); +window.OfficeRuntime = window._OfficeRuntimeWeb; +function exposeOfficeRuntimeThroughOfficeNamespace(OfficeRuntime, Office) { + var _a, _b; + if (typeof OfficeRuntime === "undefined") { + if (typeof window !== "undefined") { + OfficeRuntime = window === null || window === void 0 ? void 0 : window.OfficeRuntime; + } + } + if (typeof OfficeRuntime === "undefined") { + OfficeRuntime = {}; + } + if (typeof Office !== "undefined") { + Office.storage = Office.storage || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.storage); + Office.auth = Office.auth || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.auth); + Office.getAccessToken = Office.getAccessToken || ((_a = OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.auth) === null || _a === void 0 ? void 0 : _a.getAccessToken); + Office.addin = Office.addin || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.addin); + Office.isSetSupported = Office.isSetSupported || ((_b = OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.apiInformation) === null || _b === void 0 ? void 0 : _b.isSetSupported); + Office.license = Office.license || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.license); + Office.message = Office.message || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.message); + } +} +exposeOfficeRuntimeThroughOfficeNamespace(typeof OfficeRuntime !== "undefined" ? OfficeRuntime || undefined : undefined, typeof Office !== "undefined" ? Office || undefined : undefined); +if (typeof OSFPerformance !== "undefined") { + OSFPerformance.hostInitializationEnd = OSFPerformance.now(); + OSFPerformance.totalJSHeapSize = OSFPerformance.getTotalJSHeapSize(); + OSFPerformance.usedJSHeapSize = OSFPerformance.getUsedJSHeapSize(); + OSFPerformance.jsHeapSizeLimit = OSFPerformance.getJSHeapSizeLimit(); +} diff --git a/dist/excel-web-16.00.js b/dist/excel-web-16.00.js new file mode 100644 index 000000000..b0f9e344c --- /dev/null +++ b/dist/excel-web-16.00.js @@ -0,0 +1,26 @@ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md +*/ + +/* +* @overview es6-promise - a tiny implementation of Promises/A+. +* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +* @license Licensed under MIT license +* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE +* @version 2.3.0 +*/ + + +// Sources: +// osfweb: 16.0\16801.10000 +// runtime: 16.0\16801.10000 +// core: 16.0\16801.10000 +// host: custom + + + +"undefined"!==typeof OSFPerformance&&(OSFPerformance.hostInitializationStart=OSFPerformance.now());var OfficeExt,__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(e){var t=function(){function e(){}return e.prototype.isMsAjaxLoaded=function(){return!!("undefined"!==typeof Sys&&"undefined"!==typeof Type&&Sys.StringBuilder&&"function"===typeof Sys.StringBuilder&&Type.registerNamespace&&"function"===typeof Type.registerNamespace&&Type.registerClass&&"function"===typeof Type.registerClass&&"function"===typeof Function._validateParams&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&"function"===typeof Sys.Serialization.JavaScriptSerializer.serialize)},e.prototype.loadMsAjaxFull=function(e){var t=("https:"===window.location.protocol.toLowerCase()?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,e)},Object.defineProperty(e.prototype,"msAjaxError",{get:function(){return null==this._msAjaxError&&this.isMsAjaxLoaded()&&(this._msAjaxError=Error),this._msAjaxError},set:function(e){this._msAjaxError=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxString",{get:function(){return null==this._msAjaxString&&this.isMsAjaxLoaded()&&(this._msAjaxString=String),this._msAjaxString},set:function(e){this._msAjaxString=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxDebug",{get:function(){return null==this._msAjaxDebug&&this.isMsAjaxLoaded()&&(this._msAjaxDebug=Sys.Debug),this._msAjaxDebug},set:function(e){this._msAjaxDebug=e},enumerable:!0,configurable:!0}),e}();e.MicrosoftAjaxFactory=t}(OfficeExt||(OfficeExt={}));var OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OSFPerfUtil,OSFWebAuth,OSF_DDA_Marshaling_File_FilePropertiesKeys,OSF_DDA_Marshaling_File_SlicePropertiesKeys,OSF_DDA_Marshaling_File_FileType,OSF_DDA_Marshaling_File_ParameterKeys,OSF_DDA_Marshaling_FilePropertiesKeys,OSF_DDA_Marshaling_GoToType,OSF_DDA_Marshaling_SelectionMode,OSF_DDA_Marshaling_TableOptionProperties,OSF_DDA_Marshaling_CellProperties,OSF_DDA_Marshaling_CellFormatProperties,OSF_DDA_Marshaling_BorderStyleType,OSF_DDA_Marshaling_ColorType,OSF_DDA_Marshaling_AlignHorizontalType,OSF_DDA_Marshaling_AlignVerticalType,OSF_DDA_Marshaling_FontStyleType,OSF_DDA_Marshaling_FontUnderlineStyleType,OSF_DDA_Marshaling_FontDirectionType,OSF_DDA_Marshaling_WidthType,OSF_DDA_Marshaling_HeightType,AgaveFormatAPI,OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys,OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys,OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};!function(e){var t=function(){function e(e){this._internalStorage=e}return e.prototype.getItem=function(e){try{return this._internalStorage&&this._internalStorage.getItem(e)}catch(e){return null}},e.prototype.setItem=function(e,t){try{this._internalStorage&&this._internalStorage.setItem(e,t)}catch(e){}},e.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(e){}},e.prototype.removeItem=function(e){try{this._internalStorage&&this._internalStorage.removeItem(e)}catch(e){}},e.prototype.getKeysWithPrefix=function(e){var t=[];try{for(var n=this._internalStorage&&this._internalStorage.length||0,o=0;o0?i.push(n):0===n.tabIndex&&o.push(n):o.push(n);return i=i.sort((function(e,t){var n=e.tabIndex-t.tabIndex;return 0===n&&(n=i.indexOf(e)-i.indexOf(t)),n})),[].concat(i,o)}return{set_entropy:function(e){if("string"==typeof e)for(var t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(n=new Date(parseInt(t.slice(5,-1))))?n:t})):Sys.Serialization.JavaScriptSerializer.deserialize(o,!0),t[n]=o}catch(e){}}return t},loadScript:function(e,t,o){if(e&&t){var i=window.document,r=n[e];if(r)r.loaded?t():r.pendingCallbacks.push(t);else{var a=i.createElement("script");a.type="text/javascript",r={loaded:!1,pendingCallbacks:[t],timer:null},n[e]=r;var s=function(){null!=r.timer&&(clearTimeout(r.timer),delete r.timer),r.loaded=!0;for(var e=r.pendingCallbacks.length,t=0;t0?l(null):l(new Event("Script load timed out"))}),o),a.setAttribute("crossOrigin","anonymous"),a.src=e,i.getElementsByTagName("head")[0].appendChild(a)}}},loadCSS:function(e){if(e){var t=window.document,n=t.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.getElementsByTagName("head")[0].appendChild(n)}},parseEnum:function(e,t){var n=t[e.trim()];if("undefined"==typeof n)throw OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+e),OsfMsAjaxFactory.msAjaxError.argument("str");return n},delayExecutionAndCache:function(){var e={calc:arguments[0]};return function(){return e.calc&&(e.val=e.calc.apply(this,arguments),delete e.calc),e.val}},getUniqueId:function(){return(e+=1).toString()},formatString:function(){var e=arguments,t=e[0];return t.replace(/{(\d+)}/gm,(function(t,n){var o=parseInt(n,10)+1;return void 0===e[o]?"{"+n+"}":e[o]}))},generateConversationId:function(){return[a(),a(),(new Date).getTime().toString()].join("_")},getFrameName:function(e){return"_xdm_"+e+this.generateConversationId()},addXdmInfoAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_xdm_Info=",t,!1)},addSerializerVersionAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_serializer_version=",t,!0)},addFlightsAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_flights=",t,!0)},addInfoAsHash:function(e,n,o,i){var r,a=(e=e.trim()||"").split(t),s=a.shift(),l=a.join(t);return r=i?[n,encodeURIComponent(o),l].join(""):[l,n,o].join(""),[s,t,r].join("")},parseHostInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(e){var t=OSF.OUtil.parseXdmInfoWithGivenFragment(e,window.location.hash);return t||(t=OSF.OUtil.parseXdmInfoFromWindowName(e,window.name)),t},parseXdmInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(e,t){return OSF.OUtil.parseInfoWithGivenFragment("&_xdm_Info=","_xdm_",!1,e,t)},parseSerializerVersion:function(e){var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(e,window.location.hash);return isNaN(t)&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(e,window.name)),t},parseSerializerVersionFromWindowName:function(e,t){return parseInt(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(e,t){return parseInt(OSF.OUtil.parseInfoWithGivenFragment("&_serializer_version=","_serializer_version=",!0,e,t))},parseFlights:function(e){var t=OSF.OUtil.parseFlightsWithGivenFragment(e,window.location.hash);return 0==t.length&&(t=OSF.OUtil.parseFlightsFromWindowName(e,window.name)),t},checkFlight:function(e){return OSF.Flights&&OSF.Flights.indexOf(e)>=0},pushFlight:function(e){return OSF.Flights.indexOf(e)<0&&(OSF.Flights.push(e),!0)},getBooleanSetting:function(e){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,e)},getBooleanFromDictionary:function(e,t){var n=e&&t&&void 0!==e[t]&&e[t]&&("string"===typeof e[t]&&"TRUE"===e[t].toUpperCase()||"boolean"===typeof e[t]&&e[t]);return void 0!==n&&n},getIntFromDictionary:function(e,t){return e&&t&&void 0!==e[t]&&"string"===typeof e[t]?parseInt(e[t]):NaN},pushIntFlight:function(e,t){return!(e in OSF.IntFlights)&&(OSF.IntFlights[e]=t,!0)},getIntFlight:function(e){return OSF.IntFlights&&e in OSF.IntFlights?OSF.IntFlights[e]:NaN},parseFlightsFromWindowName:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment("&_flights=","_flights=",!0,e,t))},parseArrayWithDefault:function(e){var t=[];try{t=JSON.parse(e)}catch(e){}return Array.isArray(t)||(t=[]),t},parseInfoFromWindowName:function(e,t,n){try{var o=JSON.parse(t),i=null!=o?o[n]:null,r=s();if(!e&&r&&null!=o){var a=o[OSF.WindowNameItemKeys.BaseFrameName]+n;i?r.setItem(a,i):i=r.getItem(a)}return i}catch(e){return null}},parseInfoWithGivenFragment:function(e,t,n,o,i){var r=i.split(e),a=r.length>1?r[r.length-1]:null;n&&null!=a&&(a.indexOf("&")>=0&&(a=a.split("&")[0]),a=decodeURIComponent(a));var l=s();if(!o&&l){var c=window.name.indexOf(t);if(c>-1){var u=window.name.indexOf(";",c);-1==u&&(u=window.name.length);var d=window.name.substring(c,u);a?l.setItem(d,a):a=l.getItem(d)}}return a},getConversationId:function(){var e=window.location.search,t=null;if(e){var n=e.indexOf("&");(t=n>0?e.substring(1,n):e.substr(1))&&"="===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1))&&(t=decodeURIComponent(t))}return t},getInfoItems:function(e){var t=e.split("$");return"undefined"==typeof t[1]&&(t=e.split("|")),"undefined"==typeof t[1]&&(t=e.split("%7C")),t},getXdmFieldValue:function(e,t){var n="",o=OSF.OUtil.parseXdmInfo(t);if(o){var i=OSF.OUtil.getInfoItems(o);if(void 0!=i&&i.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:n=i[2];break;case OSF.XdmFieldName.AppId:n=i[1]}}return n},validateParamObject:function(e,t,n){var o=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:!1},{name:"expectedProperties",type:Object,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0}]);if(o)throw o;for(var i in t)if(o=Function._validateParameter(e[i],t[i],i))throw o},writeProfilerMark:function(e){window.msWriteProfilerMark&&(window.msWriteProfilerMark(e),OsfMsAjaxFactory.msAjaxDebug.trace(e))},outputDebug:function(e){"undefined"!==typeof OsfMsAjaxFactory&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(e)},defineNondefaultProperty:function(e,t,n,o){for(var i in n=n||{},o){var r=o[i];void 0==n[r]&&(n[r]=!0)}return Object.defineProperty(e,t,n),e},defineNondefaultProperties:function(e,t,n){for(var o in t=t||{})OSF.OUtil.defineNondefaultProperty(e,o,t[o],n);return e},defineEnumerableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["enumerable"])},defineEnumerableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["enumerable"])},defineMutableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["writable","enumerable","configurable"])},defineMutableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["writable","enumerable","configurable"])},finalizeProperties:function(e,t){t=t||{};for(var n=Object.getOwnPropertyNames(e),o=n.length,i=0;i>8,a=255&n,u[s++]=i>>2,u[s++]=(3&i)<<4|r>>4,u[s++]=(15&r)<<2|a>>6,u[s++]=63&a,isNaN(n)||(i=n>>8,r=255&o,a=o>>8,u[s++]=i>>2,u[s++]=(3&i)<<4|r>>4,u[s++]=(15&r)<<2|a>>6,u[s++]=63&a),isNaN(n)?u[s-1]=64:isNaN(o)&&(u[s-2]=64,u[s-1]=64);for(var p=0;p=2?n[o-2]+"."+n[o-1]:1==o?n[0]:void 0},isiOS:function(){return!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)},isChrome:function(){return window.navigator.userAgent.indexOf("Chrome")>0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},startsWith:function(e,t,n){return n?e.substr(0,t.length)===t:e.startsWith(t)},containsPort:function(e,t,n,o){return this.startsWith(e,t+"//"+n+":"+o,!0)||this.startsWith(e,n+":"+o,!0)},getRedundandPortString:function(e,t){return e&&t?"https:"==t.protocol&&this.containsPort(e,"https:",t.hostname,"443")?":443":"http:"==t.protocol&&this.containsPort(e,"http:",t.hostname,"80")?":80":"":""},removeChar:function(e,t){return t=e.length)return this.removeChar(e,n);if("/"===t){if("?"===e.charAt(n+1)||"#"===e.charAt(n+1))return this.removeChar(e,n)}else if("?"===t&&"#"===e.charAt(n+1))return this.removeChar(e,n)}return e},cleanUrl:function(e){if(e=this.cleanUrlOfChar(e,"/"),e=this.cleanUrlOfChar(e,"?"),"https://"==(e=this.cleanUrlOfChar(e,"#")).substr(0,8))-1!=(t=e.indexOf(":443"))&&(t!=e.length-4&&"/"!=e.charAt(t+4)&&"?"!=e.charAt(t+4)&&"#"!=e.charAt(t+4)||(e=e.substring(0,t)+e.substring(t+4)));else if("http://"==e.substr(0,7)){var t;-1!=(t=e.indexOf(":80"))&&(t!=e.length-3&&"/"!=e.charAt(t+3)&&"?"!=e.charAt(t+3)&&"#"!=e.charAt(t+3)||(e=e.substring(0,t)+e.substring(t+3)))}return e},parseUrl:function(e,t){if(void 0===t&&(t=!1),"undefined"!==typeof e&&e){var n=this.isIE(),o={protocol:void 0,hostname:void 0,host:void 0,port:void 0,pathname:void 0,search:void 0,hash:void 0,isPortPartOfUrl:void 0};try{if(n){var i=document.createElement("a");if(i.href=e,!i||!i.protocol||!i.host||!i.hostname||!i.href||this.cleanUrl(i.href).toLowerCase()!==this.cleanUrl(e).toLowerCase())throw"InvalidUrl";if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=i.protocol)throw new Error("NotHttps");var r=this.getRedundandPortString(e,i);o.protocol=i.protocol,o.hostname=i.hostname,o.port=""==r?i.port:"",o.host=""!=r?i.hostname:i.host,o.pathname=(n?"/":"")+i.pathname,o.search=i.search,o.hash=i.hash,o.isPortPartOfUrl=this.containsPort(e,i.protocol,i.hostname,i.port)}else{var a=new URL(e);if(a&&a.protocol&&a.host&&a.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=a.protocol)throw new Error("NotHttps");o.protocol=a.protocol,o.hostname=a.hostname,o.port=a.port,o.host=a.host,o.pathname=a.pathname,o.search=a.search,o.hash=a.hash,o.isPortPartOfUrl=a.host.lastIndexOf(":"+a.port)==a.host.length-a.port.length-1}}}catch(e){if("NotHttps"===e.message)throw e}return o}},shallowCopy:function(e){if(null==e)return null;if(e instanceof Object){if(Array.isArray(e)){for(var t=[],n=0;ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(e=l(e),n=t?e.length-1:0,0===e.length)return null;for(;!i&&n>=0&&ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(o=function(e,t){for(var n=0;n=0&&ie.length)return!1;if(e.substr(e.length-t.length)===t)return!0}return!1},hashCode:function(e){var t=0;if(!OSF.OUtil.isNullOrUndefined(e))for(var n=0,o=e.length;n0;o++)8!=o&&12!=o&&16!=o&&20!=o||(t+="-"),t+=e[n%16],n=Math.floor(n/16);for(;o<32;o++)8!=o&&12!=o&&16!=o&&20!=o||(t+="-"),t+=e[Math.floor(16*Math.random())];return t}}}();try{!function(){OSF.Flights=OSF.OUtil.parseFlights(!0)}()}catch(e){}window.OSF=OSF,OSF.OUtil.setNamespace("OSF",window),OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3},OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614,Visio:8388615,OneNoteAndroid:4194305},OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"},OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"},OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20,UpdateTargetUrl:21,InstallCustomFunctions:22,SendTelemetryEvent:23,UninstallCustomFunctions:24,SendMessage:25,LaunchExtensionComponent:26,StopExtensionComponent:27,RestartExtensionComponent:28,EnableTaskPaneHeaderButton:29,DisableTaskPaneHeaderButton:30,TaskPaneHeaderButtonClicked:31,RemoveAppCommandsAddin:32,RefreshRibbonGallery:33,GetOriginalControlId:34,OfficeJsReady:35,InsertDevManifest:36,InsertDevManifestError:37,SendCustomerContent:38,KeyboardShortcuts:39},OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"},OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006},OSF.OfficeAppContext=function(e,t,n,o,i,r,a,s,l,c,u,d,f,p,h,m,g,y,v,O,b,S,C,A,_,D,F){this._id=e,this._appName=t,this._appVersion=n,this._appUILocale=o,this._dataLocale=i,this._docUrl=r,this._clientMode=a,this._settings=s,this._reason=l,this._osfControlType=c,this._eToken=u,this._correlationId=d,this._appInstanceId=f,this._touchEnabled=p,this._commerceAllowed=h,this._appMinorVersion=m,this._requirementMatrix=g,this._hostCustomMessage=y,this._hostFullVersion=v,this._isDialog=!1,this._clientWindowHeight=O,this._clientWindowWidth=b,this._addinName=S,this._appDomains=C,this._dialogRequirementMatrix=A,this._featureGates=_,this._officeTheme=D,this._initialDisplayMode=F,this.get_id=function(){return this._id},this.get_appName=function(){return this._appName},this.get_appVersion=function(){return this._appVersion},this.get_appUILocale=function(){return this._appUILocale},this.get_dataLocale=function(){return this._dataLocale},this.get_docUrl=function(){return this._docUrl},this.get_clientMode=function(){return this._clientMode},this.get_bindings=function(){return this._bindings},this.get_settings=function(){return this._settings},this.get_reason=function(){return this._reason},this.get_osfControlType=function(){return this._osfControlType},this.get_eToken=function(){return this._eToken},this.get_correlationId=function(){return this._correlationId},this.get_appInstanceId=function(){return this._appInstanceId},this.get_touchEnabled=function(){return this._touchEnabled},this.get_commerceAllowed=function(){return this._commerceAllowed},this.get_appMinorVersion=function(){return this._appMinorVersion},this.get_requirementMatrix=function(){return this._requirementMatrix},this.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix},this.get_hostCustomMessage=function(){return this._hostCustomMessage},this.get_hostFullVersion=function(){return this._hostFullVersion},this.get_isDialog=function(){return this._isDialog},this.get_clientWindowHeight=function(){return this._clientWindowHeight},this.get_clientWindowWidth=function(){return this._clientWindowWidth},this.get_addinName=function(){return this._addinName},this.get_appDomains=function(){return this._appDomains},this.get_featureGates=function(){return this._featureGates},this.get_officeTheme=function(){return this._officeTheme},this.get_initialDisplayMode=function(){return this._initialDisplayMode?this._initialDisplayMode:0}},OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1},OSF.ClientMode={ReadOnly:0,ReadWrite:1},OSF.OUtil.setNamespace("Microsoft",window),OSF.OUtil.setNamespace("Office",Microsoft),OSF.OUtil.setNamespace("Client",Microsoft.Office),OSF.OUtil.setNamespace("WebExtension",Microsoft.Office),Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",ControlActivation:"controlActivation"},Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"},Microsoft.Office.WebExtension.FilterType={All:"all"},Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",JsonData:"jsonData",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",AllowConsentPrompt:"allowConsentPrompt",ForMSGraphAccess:"forMSGraphAccess",AllowSignInPrompt:"allowSignInPrompt",JsonPayload:"jsonPayload",EnableNewHosts:"enableNewHosts",AccountTypeFilter:"accountTypeFilter",AddinTrustId:"addinTrustId",Reserved:"reserved",Tcid:"tcid",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo",TargetOrigin:"targetOrigin",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64",FormId:"formId"},OSF.OUtil.setNamespace("DDA",OSF),OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0},OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"},OSF.DDA.EventDescriptors={},OSF.DDA.ListDescriptors={},OSF.DDA.UI={},OSF.DDA.getXdmEventName=function(e,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?e+"_"+t:t},OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetAuthContextMethod:99,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidInsertFormMethod:106,dispidDisplayRibbonCalloutAsyncMethod:109,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidExecuteFeature:146,dispidQueryFeature:147,dispidGetNestedAppAuthContextMethod:205,dispidMethodMax:205},OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidOlkRecurrenceChangedEvent:49,dispidOlkAttachmentsChangedEvent:50,dispidOlkEnhancedLocationsChangedEvent:51,dispidOlkInfobarClickedEvent:52,dispidOlkSelectedItemsChangedEvent:53,dispidOlkSensitivityLabelChangedEvent:54,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63},OSF.DDA.ErrorCodeManager=function(){var e={};return{getErrorArgs:function(t){var n=e[t];return n?(n.name||(n.name=e[this.errorCodes.ooeInternalError].name),n.message||(n.message=e[this.errorCodes.ooeInternalError].message)):n=e[this.errorCodes.ooeInternalError],n},addErrorMessage:function(t,n){e[t]=n},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeOperationCancelled:5014,ooeWorkbookHidden:5015,ooeWriteNotSupportedWhenModalDialogOpen:5016,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeRequestPayloadSizeLimitExceeded:5103,ooeResponsePayloadSizeLimitExceeded:5104,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeModalDialogOpen:12012,ooeDocumentIsInactive:12013,ooeDialogParentIsMinimized:12014,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010,ooeResourceNotAllowed:13011,ooeSSOUnsupportedPlatform:13012,ooeSSOCallThrottled:13013,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(t){e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden]={name:t.L_APICallFailed,message:t.L_WorkbookHiddenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen]={name:t.L_APICallFailed,message:t.L_WriteNotSupportedWhenModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_RequestPayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_ResponsePayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen]={name:t.L_DisplayDialogError,message:t.L_ModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive]={name:t.L_DisplayDialogError,message:t.L_DocumentIsInactive},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized]={name:t.L_DisplayDialogError,message:t.L_DialogParentIsMinimized},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:t.L_APINotSupported,message:t.L_SSOUnsupportedPlatform},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:t.L_OperationCancelledError,message:t.L_OperationCancelledErrorMessage}}}}(),function(e){!function(e){var t=function(){return function(){}}();e.RequirementVersion=t;var n=function(){return function(e){this.isSetSupported=function(e,t){if(void 0==e)return!1;void 0==t&&(t=0);var n=this._setMap._sets;if(n.hasOwnProperty(e.toLowerCase())){var o=n[e.toLowerCase()];try{var i=this._getVersion(o);t+="";var r=this._getVersion(t);if(i.major>0&&i.major>r.major)return!0;if(i.major>0&&i.minor>=0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(e){return!1}}return!1},this._getVersion=function(e){var t=(e+="").split("."),n=0,o=0;if(t.length<2&&isNaN(Number(e)))throw"version format incorrect";if(n=Number(t[0]),t.length>=2&&(o=Number(t[1])),isNaN(n)||isNaN(o))throw"version format incorrect";return{minor:o,major:n}},this._setMap=e,this.isSetSupported=this.isSetSupported.bind(this)}}();e.RequirementMatrix=n;var o=function(){return function(e){this._addSetMap=function(e){for(var t in e)this._sets[t]=e[t]},this._sets=e}}();e.DefaultSetRequirement=o;var i=function(e){function t(){return e.call(this,{dialogapi:1.1})||this}return __extends(t,e),t}(o);e.DefaultRequiredDialogSetRequirement=i;var r=function(e){function t(){return e.call(this,{dialogorigin:1.1})||this}return __extends(t,e),t}(o);e.DefaultOptionalDialogSetRequirement=r;var a=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,excelapi:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(o);e.ExcelClientDefaultSetRequirement=a;var s=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(a);e.ExcelClientV1DefaultSetRequirement=s;var l=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(o);e.OutlookClientDefaultSetRequirement=l;var c=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1,wordapi:1.1})||this}return __extends(t,e),t}(o);e.WordClientDefaultSetRequirement=c;var u=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:1.1}),t}return __extends(t,e),t}(c);e.WordClientV1DefaultSetRequirement=u;var d=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(o);e.PowerpointClientDefaultSetRequirement=d;var f=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(d);e.PowerpointClientV1DefaultSetRequirement=f;var p=function(e){function t(){return e.call(this,{selection:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(o);e.ProjectClientDefaultSetRequirement=p;var h=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,file:1.1})||this}return __extends(t,e),t}(o);e.ExcelWebDefaultSetRequirement=h;var m=function(e){function t(){return e.call(this,{compressedfile:1.1,documentevents:1.1,file:1.1,imagecoercion:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablecoercion:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(o);e.WordWebDefaultSetRequirement=m;var g=function(e){function t(){return e.call(this,{activeview:1.1,settings:1.1})||this}return __extends(t,e),t}(o);e.PowerpointWebDefaultSetRequirement=g;var y=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(o);e.OutlookWebDefaultSetRequirement=y;var v=function(e){function t(){return e.call(this,{activeview:1.1,documentevents:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(o);e.SwayWebDefaultSetRequirement=v;var O=function(e){function t(){return e.call(this,{bindingevents:1.1,partialtablebindings:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1})||this}return __extends(t,e),t}(o);e.AccessWebDefaultSetRequirement=O;var b=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(o);e.ExcelIOSDefaultSetRequirement=b;var S=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(o);e.WordIOSDefaultSetRequirement=S;var C=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2}),t}return __extends(t,e),t}(S);e.WordIOSV1DefaultSetRequirement=C;var A=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(o);e.PowerpointIOSDefaultSetRequirement=A;var _=function(e){function t(){return e.call(this,{mailbox:1.1})||this}return __extends(t,e),t}(o);e.OutlookIOSDefaultSetRequirement=_;var D=function(){function e(){}return e.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},e.getDefaultRequirementMatrix=function(t){this.initializeDefaultSetMatrix();var i=void 0,r=t.get_requirementMatrix();if(void 0!=r&&r.length>0&&"undefined"!==typeof JSON){var a=JSON.parse(t.get_requirementMatrix().toLowerCase());try{a.hasOwnProperty("dialogorigin")||(a.dialogorigin=1.1)}catch(e){}i=new n(new o(a))}else{var s=e.getClientFullVersionString(t);i=void 0!=e.DefaultSetArrayMatrix&&void 0!=e.DefaultSetArrayMatrix[s]?new n(e.DefaultSetArrayMatrix[s]):new n(new o({}))}return i},e.getDefaultDialogRequirementMatrix=function(e){var t=void 0,a=e.get_dialogRequirementMatrix();if(void 0!=a&&a.length>0&&"undefined"!==typeof JSON){var s=JSON.parse(e.get_requirementMatrix().toLowerCase());t=new o(s)}else{t=new i;var l=e.get_requirementMatrix();if(void 0!=l&&l.length>0&&"undefined"!==typeof JSON){s=JSON.parse(l.toLowerCase());for(var c in t._sets)s.hasOwnProperty(c)&&(t._sets[c]=s[c]);var u=new r;for(var c in u._sets)s.hasOwnProperty(c)&&(t._sets[c]=s[c])}}try{!t._sets.hasOwnProperty("dialogorigin")&&window.opener&&(t._sets.dialogorigin=1.1)}catch(e){}return new n(t)},e.getClientFullVersionString=function(e){var t=e.get_appMinorVersion(),n="",o="",i=e.get_appName();return(1024==i||4096==i||8192==i||65536==i)&&1==e.get_appVersion()?o=4096==i&&t>=15?"16.00.01":"16.00":64==e.get_appName()?o=e.get_appVersion():(n=t<10?"0"+t:""+t,o=e.get_appVersion()+"."+n),e.get_appName()+"-"+o},e.initializeDefaultSetMatrix=function(){e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1600]=new a,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1600]=new c,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1600]=new d,e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1601]=new s,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1601]=new u,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1601]=new f,e.DefaultSetArrayMatrix[e.Outlook_RCLIENT_1600]=new l,e.DefaultSetArrayMatrix[e.Excel_WAC_1600]=new h,e.DefaultSetArrayMatrix[e.Word_WAC_1600]=new m,e.DefaultSetArrayMatrix[e.Outlook_WAC_1600]=new y,e.DefaultSetArrayMatrix[e.Outlook_WAC_1601]=new y,e.DefaultSetArrayMatrix[e.Project_RCLIENT_1600]=new p,e.DefaultSetArrayMatrix[e.Access_WAC_1600]=new O,e.DefaultSetArrayMatrix[e.PowerPoint_WAC_1600]=new g,e.DefaultSetArrayMatrix[e.Excel_IOS_1600]=new b,e.DefaultSetArrayMatrix[e.SWAY_WAC_1600]=new v,e.DefaultSetArrayMatrix[e.Word_IOS_1600]=new S,e.DefaultSetArrayMatrix[e.Word_IOS_16001]=new C,e.DefaultSetArrayMatrix[e.PowerPoint_IOS_1600]=new A,e.DefaultSetArrayMatrix[e.Outlook_IOS_1600]=new _},e.Excel_RCLIENT_1600="1-16.00",e.Excel_RCLIENT_1601="1-16.01",e.Word_RCLIENT_1600="2-16.00",e.Word_RCLIENT_1601="2-16.01",e.PowerPoint_RCLIENT_1600="4-16.00",e.PowerPoint_RCLIENT_1601="4-16.01",e.Outlook_RCLIENT_1600="8-16.00",e.Excel_WAC_1600="16-16.00",e.Word_WAC_1600="32-16.00",e.Outlook_WAC_1600="64-16.00",e.Outlook_WAC_1601="64-16.01",e.Project_RCLIENT_1600="128-16.00",e.Access_WAC_1600="256-16.00",e.PowerPoint_WAC_1600="512-16.00",e.Excel_IOS_1600="1024-16.00",e.SWAY_WAC_1600="2048-16.00",e.Word_IOS_1600="4096-16.00",e.Word_IOS_16001="4096-16.00.01",e.PowerPoint_IOS_1600="8192-16.00",e.Outlook_IOS_1600="65536-16.00",e.DefaultSetArrayMatrix={},e}();e.RequirementsMatrixFactory=D}(e.Requirement||(e.Requirement={}))}(OfficeExt||(OfficeExt={})),OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"},Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"},OSF.NamespaceManager=function(){var e,t=!1;return{enableShortcut:function(){t||(window.Office?e=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,t=!0)},disableShortcut:function(){t&&(e?window.Office=e:OSF.OUtil.unsetNamespace("Office",window),t=!1)}}}(),OSF.NamespaceManager.enableShortcut(),Microsoft.Office.WebExtension.useShortNamespace=function(e){e?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()},Microsoft.Office.WebExtension.select=function(e,t){var n;if(e&&"string"==typeof e){var o=e.indexOf("#");if(-1!=o){var i=e.substring(0,o),r=e.substring(o+1);switch(i){case"binding":case"bindings":r&&(n=new OSF.DDA.BindingPromise(r))}}}if(n)return n.onFail=t,n;if(t){var a=typeof t;if("function"!=a)throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,a);var s={};s[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}},OSF.DDA.Context=function(e,t,n,o,i){if(OSF.OUtil.defineEnumerableProperties(this,{contentLanguage:{value:e.get_dataLocale()},displayLanguage:{value:e.get_appUILocale()},touchEnabled:{value:e.get_touchEnabled()},commerceAllowed:{value:e.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},isDialog:{value:OSF._OfficeAppFactory.getHostInfo().isDialog},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(e.get_hostFullVersion())}}),n&&OSF.OUtil.defineEnumerableProperty(this,"license",{value:n}),e.ui&&OSF.OUtil.defineEnumerableProperty(this,"ui",{value:e.ui}),e.auth&&OSF.OUtil.defineEnumerableProperty(this,"auth",{value:e.auth}),e.webAuth&&OSF.OUtil.defineEnumerableProperty(this,"webAuth",{value:e.webAuth}),e.application&&OSF.OUtil.defineEnumerableProperty(this,"application",{value:e.application}),e.extensionLifeCycle&&OSF.OUtil.defineEnumerableProperty(this,"extensionLifeCycle",{value:e.extensionLifeCycle}),e.messaging&&OSF.OUtil.defineEnumerableProperty(this,"messaging",{value:e.messaging}),e.ui&&e.ui.taskPaneAction&&OSF.OUtil.defineEnumerableProperty(this,"taskPaneAction",{value:e.ui.taskPaneAction}),e.ui&&e.ui.ribbonGallery&&OSF.OUtil.defineEnumerableProperty(this,"ribbonGallery",{value:e.ui.ribbonGallery}),e.get_isDialog()){var r=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(e);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:r})}else{if(t&&OSF.OUtil.defineEnumerableProperty(this,"document",{value:t}),o){var a=o.displayName||"appOM";delete o.displayName,OSF.OUtil.defineEnumerableProperty(this,a,{value:o})}e.get_officeTheme()?OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return e.get_officeTheme()}}):i&&OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return i()}});r=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(e);if(OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:r}),e.get_featureGates){var s=e.get_featureGates();if(s&&s.EnablePublicThemeManager){var l=new OSF.DDA.Theming.InternalThemeHandler;l.InitializeThemeManager(),OSF.OUtil.defineEnumerableProperty(this,"themeManager",{value:l})}}}},OSF.DDA.OutlookContext=function(e,t,n,o,i){OSF.DDA.OutlookContext.uber.constructor.call(this,e,null,n,o,i),t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t}),e.sensitivityLabelsCatalog&&OSF.OUtil.defineEnumerableProperty(this,"sensitivityLabelsCatalog",{value:e.sensitivityLabelsCatalog()})},OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context),OSF.DDA.OutlookAppOm=function(e,t,n){},OSF.DDA.Application=function(e){},OSF.DDA.Document=function(e,t){var n;switch(e.get_clientMode()){case OSF.ClientMode.ReadOnly:n=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:n=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t}),OSF.OUtil.defineMutableProperties(this,{mode:{value:n},url:{value:e.get_docUrl()}})},OSF.DDA.JsomDocument=function(e,t,n){OSF.DDA.JsomDocument.uber.constructor.call(this,e,n),t&&OSF.OUtil.defineEnumerableProperty(this,"bindings",{get:function(){return t}});var o=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[o.GetSelectedDataAsync,o.SetSelectedDataAsync]),OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))},OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document),OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var e;return OSF&&OSF._OfficeAppFactory&&(e=OSF._OfficeAppFactory.getContext()),e}}),OSF.DDA.License=function(e){OSF.OUtil.defineEnumerableProperty(this,"value",{value:e})},OSF.DDA.ApiMethodCall=function(e,t,n,o,i){var r=e.length,a=OSF.OUtil.delayExecutionAndCache((function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,i)}));this.verifyArguments=function(e,t){for(var n in e){var o=e[n],i=t[n];if(o.enum)switch(typeof i){case"string":if(OSF.OUtil.listContainsValue(o.enum,i))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw a()}if(o.types&&!OSF.OUtil.listContainsValue(o.types,typeof i))throw a()}},this.extractRequiredArguments=function(t,n,o){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var r,a,c=e.length-1;c>=s;c--){var u=e[c];switch(typeof u){case"object":if(r)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);r=u;break;case"function":if(a)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);a=u;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}if(r=l.fillOptions(r,n,o,i),a){if(r[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;r[Microsoft.Office.WebExtension.Parameters.Callback]=a}return l.verifyArguments(t,r),r}(e,i,n,o);return l.constructCallArgs(i,r,n,o)},this.processResponse=function(e,t,n,r){return e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?o?o(t,n,r):t:i?i(e,t):OSF.DDA.ErrorCodeManager.getErrorArgs(e)},this.getCallArgs=function(e){for(var t,n,o=e.length-1;o>=s;o--){var i=e[o];switch(typeof i){case"object":t=i;break;case"function":n=i}}return t=t||{},n&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=n),t}},OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[],n=e.privateStateCallbacks?OSF.OUtil.createObject(e.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(e.requiredArguments||[],t,n,e.onSucceeded,e.onFailed,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.AsyncMethodCalls={},OSF.DDA.AsyncMethodCalls.define=function(e){OSF.DDA.AsyncMethodCalls[e.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(e)},OSF.DDA.Error=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{name:{value:e},message:{value:t},code:{value:n}})},OSF.DDA.AsyncResult=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:e[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}}),e[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:e[OSF.DDA.AsyncResultEnum.Properties.Context]}),t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})},OSF.DDA.issueAsyncResult=function(e,t,n){var o=e[Microsoft.Office.WebExtension.Parameters.Callback];if(o){var i,r={};r[OSF.DDA.AsyncResultEnum.Properties.Context]=e[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r[OSF.DDA.AsyncResultEnum.Properties.Value]=n:(i={},n=n||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=n.name||n,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=n.message||n),o(new OSF.DDA.AsyncResult(r,i))}},OSF.DDA.SyncMethodNames={},OSF.DDA.SyncMethodNames.addNames=function(e){for(var t in e){var n={};OSF.OUtil.defineEnumerableProperties(n,{id:{value:t},displayName:{value:e[t]}}),OSF.DDA.SyncMethodNames[t]=n}},OSF.DDA.SyncMethodCall=function(e,t,n,o,i){var r=e.length,a=new OSF.DDA.ApiMethodCall(e,t,n,o,i);this.verifyAndExtractCall=function(e,n,o){var i=a.extractRequiredArguments(e,n,o),s=function(e,n,o,i){if(e.length>r+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var s,l=e.length-1;l>=r;l--){var c=e[l];switch(typeof c){case"object":if(s)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);s=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}return s=a.fillOptions(s,n,o,i),a.verifyArguments(t,s),s}(e,i,n,o);return a.constructCallArgs(i,s,n,o)}},OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[];return new OSF.DDA.SyncMethodCall(e.requiredArguments||[],t,e.privateStateCallbacks,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.SyncMethodCalls={},OSF.DDA.SyncMethodCalls.define=function(e){OSF.DDA.SyncMethodCalls[e.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(e)},OSF.DDA.ListType=function(){var e={};return{setListType:function(t,n){e[t]=n},isListType:function(t){return OSF.OUtil.listContainsKey(e,t)},getDescriptor:function(t){return e[t]}}}(),OSF.DDA.HostParameterMap=function(e,t){var n={};function o(i,r){var a=i?{}:void 0;for(var s in i){var l,c=i[s];if(OSF.DDA.ListType.isListType(s))for(var u in l=[],c)l.push(o(c[u],r));else if(OSF.OUtil.listContainsKey(n,s))l=n[s][r](c);else if("fromHost"==r&&e.preserveNesting(s))l=o(c,r);else{var d=t[s];if(d){var f=d[r];f&&void 0===(l=f[c])&&(l=c)}else l=c}a[s]=l}return a}function i(n,i,r){var a,s=t[n][r];if("toHost"==r)a=function n(o,i){var r;for(var a in i){var s;if(void 0!=(s=e.isComplexType(a)?n(o,t[a].toHost):o[a])){r||(r={});var l=i[a];"self"==l&&(l=a),r[l]=e.pack(a,s)}}return r}(o(i,r),s);else if("fromHost"==r){a=o(function n(o,i,r){for(var a in r||(r={}),i){var s,l,c=i[a];if("self"==c)s=o;else{if("sourceData"==c){r[a]=o.toArray();continue}s=o[c]}if(null===s||void 0===s)r[a]=void 0;else if(s=e.unpack(a,s),e.isComplexType(a))l=t[a].fromHost,e.preserveNesting(a)?r[a]=n(s,l):n(s,l,r);else if(OSF.DDA.ListType.isListType(a)){(l={})[OSF.DDA.ListType.getDescriptor(a)]="self";var u=new Array(s.length);for(var d in s)u[d]=n(s[d],l);r[a]=u}else r[a]=s}return r}(i,s),r)}return a}n[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(e){if(null!=e&&void 0!==e.rows){var t={};t[OSF.DDA.TableDataProperties.TableRows]=e.rows,t[OSF.DDA.TableDataProperties.TableHeaders]=e.headers,e=t}return e},fromHost:function(e){return e}},n[Microsoft.Office.WebExtension.Parameters.JsonData]={toHost:function(e){return e},fromHost:function(e){return"string"===typeof e?JSON.parse(e):e}},n[Microsoft.Office.WebExtension.Parameters.SampleData]=n[Microsoft.Office.WebExtension.Parameters.Data],t||(t={}),this.addMapping=function(e,n){var o,i;if(n.map)for(var r in i={},o=n.map){var a=o[r];"self"==a&&(a=r),i[a]=r}else o=n.toHost,i=n.fromHost;var s=t[e];if(s){var l=s.toHost;for(var c in l)o[c]=l[c];for(var u in l=s.fromHost)i[u]=l[u]}else s=t[e]={};s.toHost=o,s.fromHost=i},this.toHost=function(e,t){return i(e,t,"toHost")},this.fromHost=function(e,t){return i(e,t,"fromHost")},this.self="self",this.sourceData="sourceData",this.addComplexType=function(t){e.addComplexType(t)},this.getDynamicType=function(t){return e.getDynamicType(t)},this.setDynamicType=function(t,n){e.setDynamicType(t,n)},this.dynamicTypes=n,this.doMapValues=function(e,t){return o(e,t)}},OSF.DDA.SpecialProcessor=function(e,t){this.addComplexType=function(t){e.push(t)},this.getDynamicType=function(e){return t[e]},this.setDynamicType=function(e,n){t[e]=n},this.isComplexType=function(t){return OSF.OUtil.listContainsValue(e,t)},this.isDynamicType=function(e){return OSF.OUtil.listContainsKey(t,e)},this.preserveNesting=function(e){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,e)},this.pack=function(e,n){return this.isDynamicType(e)?t[e].toHost(n):n},this.unpack=function(e,n){return this.isDynamicType(e)?t[e].fromHost(n):n}},OSF.DDA.getDecoratedParameterMap=function(e,t){var n=new OSF.DDA.HostParameterMap(e);n.self;function o(e){var t=null;if(e){t={};for(var n=e.length,o=0;o-1||e.indexOf("Trident/")>-1||e.indexOf("Edge/")>-1}catch(e){return o("Error happens in isInternetExplorer.",e),!1}}function o(e,n){OsfMsAjaxFactory.msAjaxDebug.trace(e+" Exception details: "+t(n))}e.parseAppContextFromWindowName=function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.AppContext)},e.serializeObjectToString=t,e.isHostTrusted=function(){return new RegExp("^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/").test(OSF.getClientEndPoint()._targetUrl.toLowerCase())},e.addHostInfoAsQueryParam=function(e,t){if(!e)return null;var n,o="#",i=(e=e.trim()||"").split(o),r=i.shift(),a=i.join(o),s=r.split("?");return s.length>1?n=r+"&_host_Info="+t:s.length>0&&(n=r+"?_host_Info="+t),a?[n,o,a].join(""):n},e.getDomainForUrl=function(e){if(!e)return null;var t=document.createElement("a");return t.href=e,t.protocol+"//"+t.host},e.shouldUseLocalStorageToPassMessage=function(){try{for(var e=["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3","Windows NT 10.0"],t=window.navigator.userAgent,i=0,r=e.length;i-1)return n();return!1}catch(e){return o("Error happens in shouldUseLocalStorageToPassMessage.",e),!1}},e.isInternetExplorer=n,e.removeMatchesFromLocalStorage=function(e){for(var t=OSF.OUtil.getLocalStorage(),n=t.getKeysWithPrefix(""),o=0,i=n.length;o0){for(var o=[],i=0;i=i)break;if(o=Function._validateParameter(e[r],s,l))return o.popStackFrame(),o}return null}),Function._validateParameterCount||(Function._validateParameterCount=function(e,t,o){var i,r,a=t.length,s=e.length;if(sa)for(r=!0,i=0;i0?u(e.shift()):(clearInterval(n),n=null)):OsfMsAjaxFactory.msAjaxDebug.trace("channel is not ready.")}function u(e){o=e.getInvokeBlockingFlag(),e.invoke(),t=(new Date).getTime()}function d(){if(i){var e,t,n=0,o=new Date;for(var a in s)for(var l in(e=s[a])._callbackList){var c=e._callbackList[l];if((t=c.timeout?c.timeout:r)>=0&&Math.abs(o.getTime()-c.createdOn)>=t)try{c.callback&&c.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,null)}finally{delete e._callbackList[l]}else n++}0===n&&(clearInterval(i),i=null)}else OsfMsAjaxFactory.msAjaxDebug.trace("channel is not ready.")}function f(){o=!1}function p(e,t){var n=!1;if(!t||"null"===t||!t.length||!e||!(e instanceof Array)||!e.length)return n;var o=document.createElement("a"),i=document.createElement("a");o.href=t;for(var r=0;rs.length+1&&(c=a.slice(-(s.length+1))==="."+s),r&&i&&(l||c)}function g(e,t){return y(OSF.OUtil.parseUrl(e,!0),OSF.OUtil.parseUrl(t,!0))}function y(e,t){return e.hostname==t.hostname&&e.protocol==t.protocol&&v(e,t)}function v(e,t){return e.port==t.port||""==e.port&&"http:"==e.protocol&&"80"==t.port||""==e.port&&"https:"==e.protocol&&"443"==t.port||""==t.port&&"http:"==t.protocol&&"80"==e.port||""==t.port&&"https:"==t.protocol&&"443"==e.port}function O(i){if(OSF&&""!=i.data){var r,l=OSF.SerializerVersion.Browser,d=i.data;try{l=null!=(r=Microsoft.Office.Common.MessagePackager.unenvelope(d,OSF.SerializerVersion.Browser))._serializerVersion?r._serializerVersion:l}catch(e){return}if(r._messageType===Microsoft.Office.Common.MessageType.request){var v=null==i.origin||"null"===i.origin?r._origin:i.origin;try{var O=function(e){for(var t in a)if(a[t]._conversations[e])return a[t];throw OsfMsAjaxFactory.msAjaxDebug.trace("Unknown conversation Id."),OsfMsAjaxFactory.msAjaxError.argument("conversationId")}(r._conversationId),b=O._conversations[r._conversationId];l=null!=b.serializerVersion?b.serializerVersion:l;var S=[b.url].concat(O._appDomains[r._conversationId]);if(!p(S,i.origin))if(!OfficeExt.appSpecificCheckOrigin(S,i,r._origin,p))if(!m(b.url,i.origin))throw"Failed origin check";var C=null!=r._data?r._data:{};C.SecurityOrigin=i.origin;var A=O.getPolicyManager();if(A&&!A.checkPermission(r._conversationId,r._actionName,C))throw"Access Denied";var _=function(e,t){var n=e._methodObjectList[t._actionName];if(!n)throw OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:"+t._actionName),OsfMsAjaxFactory.msAjaxError.argument("messageObject");return t._actionType===Microsoft.Office.Common.ActionType.invoke?n:t._actionType===Microsoft.Office.Common.ActionType.registerEvent?n.getRegisterMethodObject():n.getUnregisterMethodObject()}(O,r),D=new Microsoft.Office.Common.InvokeCompleteCallback(i.source,v,r._actionName,r._conversationId,r._correlationId,f,l),F=new Microsoft.Office.Common.Invoker(_,C,D,O._eventHandlerProxyList,r._conversationId,r._actionName,l),E=!0;null==n&&((null==t||(new Date).getTime()-t>10)&&!o?(u(F),E=!1):n=setInterval(c,10)),E&&function(t){e.push(t)}(F)}catch(e){O&&O._onHandleRequestError&&O._onHandleRequestError(r,e);var P=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;"Access Denied"==e&&(P=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);var I=new Microsoft.Office.Common.Response(r._actionName,r._conversationId,r._correlationId,P,Microsoft.Office.Common.ResponseType.forCalling,e),R=Microsoft.Office.Common.MessagePackager.envelope(I,l),w=!1;try{w=!(!i.source||!i.source.postMessage)}catch(e){}var M=!1;if(window.location.href&&i.origin&&"null"!==i.origin&&m(window.location.href,i.origin))M=!0;else if(i.origin&&"null"!==i.origin)if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)){M=h(OSF.OUtil.parseUrl(i.origin,!0).hostname)}else{var x=document.createElement("a");x.href=i.origin,M=h(x.hostname)}w&&M&&i.source.postMessage(R,v)}}else{if(r._messageType!==Microsoft.Office.Common.MessageType.response)return;var T=function(e){var t=s[e];return t||OsfMsAjaxFactory.msAjaxDebug.trace("Unknown conversation Id."),t}(r._conversationId);if(!T)return;if(T._serializerVersion=l,!function(e,t){var n,o,i=!1;return e&&t&&"null"!==e&&"null"!==t&&e.length&&t.length?(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)?i=g(e,t):(n=document.createElement("a"),o=document.createElement("a"),n.href=e,o.href=t,i=y(n,o)),i):i}(T._targetUrl,i.origin))throw"Failed orgin check";if(r._responseType===Microsoft.Office.Common.ResponseType.forCalling){var k=T._callbackList[r._correlationId];if(k)try{k.callback&&k.callback(r._errorCode,r._data)}finally{delete T._callbackList[r._correlationId]}}else{var N=T._eventHandlerList[r._actionName];void 0!==N&&null!==N&&N(r._data)}}}}function b(){l||(!function(e){if(window.addEventListener)window.addEventListener("message",e,!1);else{if(!(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent))throw OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API."),OsfMsAjaxFactory.msAjaxError.argument("Browser");window.attachEvent("onmessage",e)}}(O),l=!0)}return{connect:function(e,t,n,o){var i=s[e];return i||(b(),i=new Microsoft.Office.Common.ClientEndPoint(e,t,n,o),s[e]=i),i},getClientEndPoint:function(e){var t=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1}]);if(t)throw t;return s[e]},createServiceEndPoint:function(e){b();var t=new Microsoft.Office.Common.ServiceEndPoint(e);return a[e]=t,t},getServiceEndPoint:function(e){var t=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:!1}]);if(t)throw t;return a[e]},deleteClientEndPoint:function(e){var t=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1}]);if(t)throw t;delete s[e]},deleteServiceEndPoint:function(e){var t=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:!1}]);if(t)throw t;delete a[e]},urlCompare:function(e,t){return y(e,t)},checkUrlWithAppDomains:function(e,t){return p(e,t)},isTargetSubdomainOfSourceLocation:function(e,t){return m(e,t)},_setMethodTimeout:function(e){var t=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:!1}]);if(t)throw t;r=e<=0?65e3:e},_startMethodTimeoutTimer:function(){i||(i=setInterval(d,2e3))},isHostNameValidWacDomain:function(e){return h(e)},_hasSamePort:function(e,t){return v(e,t)}}}(),Microsoft.Office.Common.Message=function(e,t,n,o,i){var r=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:!1},{name:"actionName",type:String,mayBeNull:!1},{name:"conversationId",type:String,mayBeNull:!1},{name:"correlationId",mayBeNull:!1},{name:"data",mayBeNull:!0,optional:!0}]);if(r)throw r;this._messageType=e,this._actionName=t,this._conversationId=n,this._correlationId=o,this._origin=window.location.origin,this._data="undefined"==typeof i?null:i},Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}},Microsoft.Office.Common.Request=function(e,t,n,o,i){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,e,n,o,i),this._actionType=t},OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message),Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType},Microsoft.Office.Common.Response=function(e,t,n,o,i,r){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,e,t,n,r),this._errorCode=o,this._responseType=i},OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message),Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode},Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType},Microsoft.Office.Common.MessagePackager={envelope:function(e,t){return"object"===typeof e&&(e._serializerVersion=OSF.SerializerVersion.Browser),JSON.stringify(e)},unenvelope:function(e,t){return JSON.parse(e)}},Microsoft.Office.Common.ResponseSender=function(e,t,n,o,i,r,a){var s=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:!1},{name:"requesterUrl",type:String,mayBeNull:!1},{name:"actionName",type:String,mayBeNull:!1},{name:"conversationId",type:String,mayBeNull:!1},{name:"correlationId",mayBeNull:!1},{name:"responsetype",type:Number,maybeNull:!1},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]);if(s)throw s;this._requesterWindow=e,this._requesterUrl=t,this._actionName=n,this._conversationId=o,this._correlationId=i,this._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError,this._responseType=r;var l=this;this._send=function(e){try{var t=l._requesterUrl;"dialogMessageReceived"!==l._actionName&&"dialogParentMessageReceived"!==l._actionName||e.targetOrigin&&(t=e.targetOrigin);var n=new Microsoft.Office.Common.Response(l._actionName,l._conversationId,l._correlationId,l._invokeResultCode,l._responseType,e),o=Microsoft.Office.Common.MessagePackager.envelope(n,a);l._requesterWindow.postMessage(o,t)}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+e.message)}}},Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(e){this._invokeResultCode=e}},Microsoft.Office.Common.InvokeCompleteCallback=function(e,t,n,o,i,r,a){Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(this,e,t,n,o,i,Microsoft.Office.Common.ResponseType.forCalling,a),this._postCallbackHandler=r;var s=this;this._send=function(e,t){void 0!=t&&(s._invokeResultCode=t);try{var n=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,e),o=Microsoft.Office.Common.MessagePackager.envelope(n,a);s._requesterWindow.postMessage(o,s._requesterUrl),s._postCallbackHandler()}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+e.message)}}},OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender),Microsoft.Office.Common.Invoker=function(e,t,n,o,i,r,a){var s=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:!1},{name:"paramValue",mayBeNull:!0},{name:"invokeCompleteCallback",mayBeNull:!1},{name:"eventHandlerProxyList",mayBeNull:!0},{name:"conversationId",type:String,mayBeNull:!1},{name:"eventName",type:String,mayBeNull:!1},{name:"serializerVersion",type:Number,mayBeNull:!0,optional:!0}]);if(s)throw s;this._methodObject=e,this._param=t,this._invokeCompleteCallback=n,this._eventHandlerProxyList=o,this._conversationId=i,this._eventName=r,this._serializerVersion=a},Microsoft.Office.Common.Invoker.prototype={invoke:function(){try{var e;switch(this._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:this._methodObject.getMethod()(this._param,this._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:e=this._methodObject.getMethod()(this._param),this._invokeCompleteCallback.getSend()(e);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:var t=this._createEventHandlerProxyObject(this._invokeCompleteCallback);e=this._methodObject.getMethod()(t.getSend(),this._param),this._eventHandlerProxyList[this._conversationId+this._eventName]=t.getSend(),this._invokeCompleteCallback.getSend()(e);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:var n=this._eventHandlerProxyList[this._conversationId+this._eventName];e=this._methodObject.getMethod()(n,this._param),delete this._eventHandlerProxyList[this._conversationId+this._eventName],this._invokeCompleteCallback.getSend()(e);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:var o=this._createEventHandlerProxyObject(this._invokeCompleteCallback);this._methodObject.getMethod()(o.getSend(),this._invokeCompleteCallback.getSend(),this._param),this._eventHandlerProxyList[this._callerId+this._eventName]=o.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:var i=this._eventHandlerProxyList[this._callerId+this._eventName];this._methodObject.getMethod()(i,this._invokeCompleteCallback.getSend(),this._param),delete this._eventHandlerProxyList[this._callerId+this._eventName]}}catch(e){this._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse),this._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(e){return new Microsoft.Office.Common.ResponseSender(e.getRequesterWindow(),e.getRequesterUrl(),e.getActionName(),e.getConversationId(),e.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}},OSF.OUtil.setNamespace("WAC",OSF.DDA),OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"},OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC),OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var e=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource];OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,e,{})},OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor),OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]),OSF.OUtil.setNamespace("WAC",OSF.DDA),OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC),OSF.DDA.WAC.getDelegateMethods=function(){var e={};return e[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync,e[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync,e[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync,e[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog,e[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent,e[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage,e[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog,e},OSF.DDA.WAC.Delegate.version=1,OSF.DDA.WAC.Delegate.executeAsync=function(e){e.hostCallArgs||(e.hostCallArgs={}),e.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:e.dispId},e.hostCallArgs.__timeout__=-1,e.onCalling&&e.onCalling(),OSF.getClientEndPoint()&&OSF.getClientEndPoint().invoke("executeMethod",(function(t,n){var o;if(e.onReceiving&&e.onReceiving(),t==Microsoft.Office.Common.InvokeResultCode.noError)OSF.DDA.WAC.Delegate.version=n.Version,o=n.Error;else switch(t){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:o=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:o=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}e.onComplete&&e.onComplete(o,n)}),e.hostCallArgs)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(e,t){var n=(new Date).getTime();return function(o,i){var r;if(t.onReceiving&&t.onReceiving(),o!=Microsoft.Office.Common.InvokeResultCode.noError)switch(o){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else r=i?i.Error?i.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(r),OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(e,t.dispId,Math.abs((new Date).getTime()-n),r)}},OSF.DDA.WAC.Delegate.registerEventAsync=function(e){e.onCalling&&e.onCalling(),OSF.getClientEndPoint()&&OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(e.targetId,e.eventType),(function(t){e.onEvent&&e.onEvent(t),OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(e.dispId)}),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,e),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:e.dispId,targetId:e.targetId})},OSF.DDA.WAC.Delegate.unregisterEventAsync=function(e){e.onCalling&&e.onCalling(),OSF.getClientEndPoint()&&OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(e.targetId,e.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,e),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:e.dispId,targetId:e.targetId})},function(e){var t=function(){function e(){this._configPromise=null}return e.isSovereignVersion=function(){return"undefined"!==typeof isOsfSovereignVersion&&!0===isOsfSovereignVersion},e.prototype.getEnvironmentName=function(){return this.getConfig().then((function(e){return e&&e.envName?e.envName:null}))},e.prototype.getEnvironmentType=function(){return this.getConfig().then((function(e){return e&&e.envType?e.envType:null}))},e.prototype.getTrustedHostOrigins=function(){return this.getConfig().then((function(e){return null!=e?e.trustedHostOrigins:null}))},e.prototype.isConfigAvailable=function(){return this.getConfig().then((function(e){return null!=e}))},e.prototype.isSovereignHostTrusted=function(e){return e?e===window.location.hostname?Office.Promise.resolve(!0):this.getTrustedHostOrigins().then((function(t){return!(!t||0==t.length)&&new RegExp(t.join("|")).test(e)})):Office.Promise.resolve(!1)},e.prototype.getConfigPath=function(){var e=OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath();if(e){var t=(e=e.toLowerCase()).indexOf("/lib/");if(t>-1)return e.toLowerCase().substring(0,t+"/lib/".length)+"officeconfig.json"}return""},e.prototype.getConfig=function(){return this._configPromise||(this._configPromise=this.tryLoadConfig()),this._configPromise},e.prototype.tryLoadConfig=function(){var e=this.getConfigPath();if(e){var t=OSF.OUtil.getLocalStorage(),n=e+"_cache",o=t.getItem(n),i=null;if(o){try{i=JSON.parse(o)}catch(e){}var r=(new Date).getTime();if(i&&i.config&&i.createTime<=r&&i.createTime+864e5>=r)return Office.Promise.resolve(i.config)}return this.downloadConfig(e).then((function(e){return e?(i={createTime:(new Date).getTime(),config:e},t.setItem(n,JSON.stringify(i))):i&&(e=i.config),e}))}return Office.Promise.resolve(null)},e.prototype.downloadConfig=function(e){return new Office.Promise((function(t,n){OSF.OUtil.xhrGet(e,(function(e){try{t(JSON.parse(e))}catch(e){t(null)}}),(function(){t(null)}))}))},e}();e.SovereignHelper=t}(OfficeExt||(OfficeExt={})),OSF.OUtil.setNamespace("WebApp",OSF),OSF.OUtil.setNamespace("Messaging",OSF),OSF.OUtil.setNamespace("ExtensionLifeCycle",OSF),OSF.OUtil.setNamespace("TaskPaneAction",OSF),OSF.OUtil.setNamespace("RibbonGallery",OSF),OSF.WebApp.AddHostInfoAndXdmInfo=function(e){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?e+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():e},OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var e=document.querySelectorAll("a[data-officejs-navigate]"),t=0;t0?e.substr(0,t):null,o=null===n||("http"===n.toLowerCase()||"https"===n.toLowerCase());return o=o&&"#"!=e&&"/"!=e&&""!=e&&e!=OSF._OfficeAppFactory.getWebAppState().webAppUrl},OSF.InitializationHelper=function(e,t,n,o,i){this._hostInfo=e,this._webAppState=t,this._context=n,this._settings=o,this._hostFacade=i,this._appContext={},this._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])",this._initializeSettings=function(e,t){var n=e.get_settings(),o=OSF.OUtil.getSessionStorage();if(o){var i=o.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey());i?n=JSON.parse(i):(i=JSON.stringify(n),o.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i))}var r=OSF.DDA.SettingsManager.deserializeSettings(n);return t?new OSF.DDA.RefreshableSettings(r):new OSF.DDA.Settings(r)};!function(e){var t=window.open;e.open=function(e,n,o){var i=null,r=OSF._OfficeAppFactory.getHostInfo();try{"outlook"===r.hostType&&"web"===r.hostPlatform&&r.flags&OSF.HostInfoFlags.IsMonarch&&(i=t("about:blank?unfiltered",n,o))?i.location=e:i=t(e,n,o)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}if(!i){var a={strUrl:e,strWindowName:n,strWindowFeatures:o};OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,a)}if(OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.EnablingWindowOpenUsageLogging)&&r&&"outlook"===r.hostType&&"web"===r.hostPlatform&&(!n||n&&-1==n.indexOf("hostInfo"))){var s=o&&String(o).toLowerCase(),l=s&&(s.indexOf("width")>-1||s.indexOf("height")>-1)?1:0,c=null!=i?0:1;OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(-10,l,0,c)}return i}}(window)},OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(e){var t=OSF.OUtil.getSessionStorage();if(t){if(e||(e=OSF.OUtil.parseHostInfoFromWindowName(!0,OSF._OfficeAppFactory.getWindowName())),e&&e.indexOf("isDialog")>-1){var n=function(){var e=OSF.OUtil.parseXdmInfo(!0);return e?e.split("|")[1]:null}();return null!=n&&t.setItem(n+"IsDialog","true"),void(this._hostInfo.isDialog=!0)}this._hostInfo.isDialog=null!=t.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,!1)+"IsDialog")}},OSF.InitializationHelper.prototype.getAppContext=function(e,t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("OsfControl activation lifecycle: getAppContext got called.");var n=this,o=function(e,o){var i;if(o._appName===OSF.AppName.ExcelWebApp){var r=o._settings;for(var a in i={},r){var s=r[a];i[s[0]]=s[1]}}else i=o._settings;if(o._appName===OSF.AppName.OutlookWebApp&&o._requirementMatrix&&-1==o._requirementMatrix.indexOf("react")&&(OSF.AgaveHostAction.SendTelemetryEvent=void 0),!n._hostInfo.isDialog||null==window.opener){var l=window.location.origin;n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,OSF.AgaveHostAction.UpdateTargetUrl,l])}if(0!==e||void 0==o._id||void 0==o._appName||void 0==o._appVersion||void 0==o._appUILocale||void 0==o._dataLocale||void 0==o._docUrl||void 0==o._clientMode||void 0==o._settings||void 0==o._reason){var c="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+e+", exception: "+o;throw OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(c),c}n._appContext=o;var u=o._appInstanceId?o._appInstanceId:o._id,d=0;void 0!=o._appMinorVersion&&(d=o._appMinorVersion);var f=void 0;void 0!=o._requirementMatrix&&(f=o._requirementMatrix),o.eToken=o.eToken?o.eToken:"";var p=new OSF.OfficeAppContext(o._id,o._appName,o._appVersion,o._appUILocale,o._dataLocale,o._docUrl,o._clientMode,i,o._reason,o._osfControlType,o._eToken,o._correlationId,u,!1,!0,d,f,o._hostCustomMessage,o._hostFullVersion,o._clientWindowHeight,o._clientWindowWidth,o._addinName,o._appDomains,o._dialogRequirementMatrix,o._featureGates,o._officeTheme,o._initialDisplayMode);p._wacHostEnvironment=o._wacHostEnvironment||"0",p._isFromWacAutomation=!!o._isFromWacAutomation,p._marketplaceType=o._marketplaceType,OSF.AppTelemetry&&OSF.AppTelemetry.initialize(p),t(p)};try{if(this._hostInfo.isDialog&&null!=window.opener)o(0,OfficeExt.WACUtils.parseAppContextFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()));else this._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",o,this._webAppState.id)}catch(e){throw OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+e+"]"),e}},OSF.InitializationHelper.prototype.isHostOriginTrusted=function(e){},OSF.InitializationHelper.prototype.performUserTrustCheck=function(e,t,n){var o=this,i=function(){var i=OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath().match(/^https?:\/\/[^:/?#]*(?::([0-9]+))?/);if(i&&i[0]){var r=OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"AgaveErrorUX/index.html#",a={error:"NotTrustedWAC",locale:OSF.getSupportedLocale(o._hostInfo.hostLocale,OSF.ConstantNames.DefaultLocale),hostname:e,noHttps:!t,validate:!1,useHtmlPopup:OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.HostTrustDialog),isConfirm:!1},s=document.createElement("iframe");s.style.visibility="hidden",s.style.height="0",s.style.width="0",OSF.OUtil.addEventListener(window,"message",(function e(t){if(t.source==s.contentWindow&&t.origin==i[0])try{var l=JSON.parse(t.data);Function._validateParams(l,[{name:"hostUserTrusted",type:Boolean,mayBeNull:!1}]);if(!0===l.hostUserTrusted)o._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.trusted,OSF.OUtil.removeEventListener(window,"message",e),document.body.removeChild(s);else{if(a.validate=!1,OSF.OUtil.checkFlight(OSF.FlightTreatmentNames.HostTrustDialog)&&window.innerHeight*window.innerWidth===0){var c={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:null,onCalling:null};OSF.DDA.WAC.Delegate.registerEventAsync(c)}window.location.replace(r+encodeURIComponent(JSON.stringify(a)))}n()}catch(e){document.body.textContent=Strings.OfficeOM.L_NotTrustedWAC}})),a.validate=!0,s.setAttribute("src",r+encodeURIComponent(JSON.stringify(a))),s.onload=function(){var n={hostname:e,noHttps:!t};s.contentWindow.postMessage(JSON.stringify(n),i[0])},document.body.appendChild(s)}else document.body.textContent=Strings.OfficeOM.L_NotTrustedWAC;if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&!t)throw new Error("NotHttps")};if(document.body)i();else{var r=!1;document.addEventListener("DOMContentLoaded",(function(){r||(r=!0,i())}))}},OSF.InitializationHelper.prototype.checkWellKnownOrigins=function(e,t,n){var o=this;if(o._webAppState.clientEndPoint._hostTrustCheckStatus===Microsoft.Office.Common.HostTrustStatus.unknown&&(t||(o._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.nothttps),o._webAppState.clientEndPoint._hostTrustCheckStatus!=Microsoft.Office.Common.HostTrustStatus.nothttps)){var i=OfficeExt.SovereignHelper.isSovereignVersion(),r=!1;if((!i||"object"===typeof officeInitializationSettings&&!0===officeInitializationSettings.trustAllCloudEnvironments)&&(r=Microsoft.Office.Common.XdmCommunicationManager.isHostNameValidWacDomain(e),o.isHostOriginTrusted&&(r=r||o.isHostOriginTrusted(e)),r&&(o._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.trusted)),!r&&i){o._sovereignHelper||(o._sovereignHelper=new OfficeExt.SovereignHelper);var a=o._sovereignHelper;return void a.isConfigAvailable().then((function(t){t&&a.isSovereignHostTrusted(e).then((function(e){e&&(o._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.trusted),n()}))}))}}n()},OSF.InitializationHelper.prototype.checkReceiverOriginAndRun=function(e){var t=this;if(t._webAppState.clientEndPoint._hostTrustCheckStatus!==Microsoft.Office.Common.HostTrustStatus.trusted){var n=OSF.OUtil.parseUrl(t._webAppState.clientEndPoint._targetUrl,!1),o=n.hostname,i="https:"==n.protocol;t.checkWellKnownOrigins(o,i,(function(){if(!t._webAppState.clientEndPoint._checkStatusLogged&&null!=t._hostInfo&&void 0!==t._hostInfo){var n=OSF.OUtil.getLocalStorage().isLocalStorageAvailable();OSF.AppTelemetry.onCheckWACHost(t._webAppState.clientEndPoint._hostTrustCheckStatus,t._webAppState.id,t._hostInfo.hostType,t._hostInfo.hostPlatform,t._webAppState.clientEndPoint._targetUrl,n),t._webAppState.clientEndPoint._checkStatusLogged=!0}t._webAppState.clientEndPoint._hostTrustCheckStatus===Microsoft.Office.Common.HostTrustStatus.trusted?e():t.performUserTrustCheck(o,i,e)}))}else e()},OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){try{var e=this,t=OSF.OUtil.parseXdmInfoWithGivenFragment(!1,OSF._OfficeAppFactory.getWindowLocationHash());if(!t&&OSF._OfficeAppFactory.getWindowName&&(t=OSF.OUtil.parseXdmInfoFromWindowName(!1,OSF._OfficeAppFactory.getWindowName())),t){var n=OSF.OUtil.getInfoItems(t);void 0!=n&&n.length>=3&&(e._webAppState.conversationID=n[0],e._webAppState.id=n[1],e._webAppState.webAppUrl=n[2].indexOf(":")>=0?n[2]:decodeURIComponent(n[2]))}e._webAppState.wnd=null!=window.opener?window.opener:window.parent;var o=OSF.OUtil.parseSerializerVersionWithGivenFragment(!1,OSF._OfficeAppFactory.getWindowLocationHash());if(isNaN(o)&&OSF._OfficeAppFactory.getWindowName&&(o=OSF.OUtil.parseSerializerVersionFromWindowName(!1,OSF._OfficeAppFactory.getWindowName())),e._webAppState.serializerVersion=o,this._hostInfo.isDialog&&null!=window.opener)return;e._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(e._webAppState.conversationID,e._webAppState.wnd,e._webAppState.webAppUrl,e._webAppState.serializerVersion),e._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(e._webAppState.id),e._webAppState.clientEndPoint._checkReceiverOriginAndRun=function(t){e.checkReceiverOriginAndRun(t)};var i=e._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;e._webAppState.serviceEndPoint.registerConversation(i,e._webAppState.webAppUrl);e._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",(function(t){var n;switch(n="string"==typeof t?t:t[0]){case OSF.AgaveHostAction.Select:e._webAppState.focused=!0;break;case OSF.AgaveHostAction.UnSelect:e._webAppState.focused=!1;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();var o=document.querySelectorAll(e._tabbableElements);OSF.OUtil.focusToFirstTabbable(o,!1)||(window.blur(),e._webAppState.focused=!1,e._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[e._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]));break;case OSF.AgaveHostAction.TabInShift:window.focus();o=document.querySelectorAll(e._tabbableElements);OSF.OUtil.focusToFirstTabbable(o,!0)||(window.blur(),e._webAppState.focused=!1,e._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[e._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift]));break;case OSF.AgaveHostAction.SendMessage:if(window.Office.context.messaging.onMessage){var i=t[1];window.Office.context.messaging.onMessage(i)}break;case OSF.AgaveHostAction.TaskPaneHeaderButtonClicked:window.Office.context.ui.taskPaneAction.onHeaderButtonClick&&window.Office.context.ui.taskPaneAction.onHeaderButtonClick();break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+n+" notifyAgave is wrong.")}}),Microsoft.Office.Common.InvokeType.async,!1),e.addOrRemoveEventListenersForWindow(!0)}catch(e){throw OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+e+"]"),e}},OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(e){var t=this,n=function(){t._webAppState.focused||(t._webAppState.focused=!0),t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.Select])},o=function(){OSF&&(t._webAppState.focused&&(t._webAppState.focused=!1),t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.UnSelect]))},i=function(e){if(e.preventDefault=e.preventDefault||function(){e.returnValue=!1},117==e.keyCode&&(e.ctrlKey||e.metaKey)){e.preventDefault();var n=OSF.AgaveHostAction.CtrlF6Exit;e.shiftKey&&(n=OSF.AgaveHostAction.CtrlF6ExitShift),t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,n])}else if(9==e.keyCode){var o=t._appContext._isPowerPointModernSlideShowEnabled&&t._appContext._appName==OSF.AppName.PowerpointWebApp&&t._appContext._clientMode==OSF.ClientMode.ReadOnly&&t._appContext._osfControlType==OSF.OsfControlType.DocumentLevel;o||e.preventDefault();var i=document.querySelectorAll(t._tabbableElements);OSF.OUtil.focusToNextTabbable(i,e.target||e.srcElement,e.shiftKey)?o&&e.preventDefault():t._hostInfo.isDialog?OSF.OUtil.focusToFirstTabbable(i,e.shiftKey):e.shiftKey?o||t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.TabExitShift]):OSF.OUtil.checkFlight(OSF.FlightNames.SetFocusToTaskpaneIsEnabled)&&e.target&&"BODY"===e.target.tagName.toUpperCase()?OSF.OUtil.focusToFirstTabbable(i,e.shiftKey):o||t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.TabExit])}else if(27==e.keyCode)e.preventDefault(),t.dismissDialogNotification&&t.dismissDialogNotification(),t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.EscExit]);else if(113==e.keyCode)e.preventDefault(),t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.F2Exit]);else if((e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)&&e.keyCode>=1&&e.keyCode<=255){var r={keyCode:e.keyCode,shiftKey:e.shiftKey,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey};t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.KeyboardShortcuts,r])}},r=function(e){117==e.keyCode&&e.ctrlKey&&(e.preventDefault?e.preventDefault():e.returnValue=!1)};e?(OSF.OUtil.addEventListener(window,"focus",n),OSF.OUtil.addEventListener(window,"blur",o),OSF.OUtil.addEventListener(window,"keydown",i),OSF.OUtil.addEventListener(window,"keypress",r)):(OSF.OUtil.removeEventListener(window,"focus",n),OSF.OUtil.removeEventListener(window,"blur",o),OSF.OUtil.removeEventListener(window,"keydown",i),OSF.OUtil.removeEventListener(window,"keypress",r))},OSF.InitializationHelper.prototype.initWebDialog=function(e){if(e.get_isDialog()){if(OSF.DDA.UI.ChildUI){var t=null!=window.opener;e.ui=new OSF.DDA.UI.ChildUI(t),t&&this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else OSF.DDA.UI.ParentUI&&(e.ui=new OSF.DDA.UI.ParentUI,OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(e.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]))},OSF.InitializationHelper.prototype.initWebAuth=function(e){if(OSF.DDA.Auth){e.auth=new OSF.DDA.Auth;var t=[],n=OSF.DDA.AsyncMethodNames.GetAccessTokenAsync;n&&t.push(n);var o=OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync;o&&t.push(o),OSF.DDA.DispIdHost.addAsyncMethods(e.auth,t)}},OSF.InitializationHelper.prototype.initWebAuthImplicit=function(e){OSF.DDA.WebAuth&&(e.webAuth=new OSF.DDA.WebAuth,OSF.DDA.DispIdHost.addAsyncMethods(e.webAuth,[OSF.DDA.AsyncMethodNames.GetAuthContextAsync]))},OSF.getClientEndPoint=function(){return OSF._OfficeAppFactory.getInitializationHelper()._webAppState.clientEndPoint},OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){if(this._hostInfo.isDialog){window.focus();var e=document.querySelectorAll(this._tabbableElements);OSF.OUtil.focusToFirstTabbable(e,!1)||(window.blur(),this._webAppState.focused=!1,this._webAppState.clientEndPoint&&this._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[this._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]))}},OSF.Messaging.sendMessage=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.SendMessage,e])},OSF.ExtensionLifeCycle.launchExtensionComponent=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.LaunchExtensionComponent,e])},OSF.ExtensionLifeCycle.stopExtensionComponent=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.StopExtensionComponent,e])},OSF.ExtensionLifeCycle.restartExtensionComponent=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.RestartExtensionComponent,e])},OSF.ExtensionLifeCycle.close=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.CloseSDXDialog,e])},OSF.TaskPaneAction.enableHeaderButton=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.EnableTaskPaneHeaderButton,e])},OSF.TaskPaneAction.disableHeaderButton=function(){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.DisableTaskPaneHeaderButton])},OSF.RibbonGallery.refreshRibbon=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.RefreshRibbonGallery,e])},OSF.CommonUI={HostButtonBorderColor:"#86bfa0",HostButtonBackgroundColor:"#d3f0e0"},function(e){var t=function(){function e(e){this._table=e,this._fields={}}return Object.defineProperty(e.prototype,"Fields",{get:function(){return this._fields},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Table",{get:function(){return this._table},enumerable:!0,configurable:!0}),e.prototype.SerializeFields=function(){},e.prototype.SetSerializedField=function(e,t){"undefined"!==typeof t&&null!==t&&(this._serializedFields[e]=t.toString())},e.prototype.SerializeRow=function(){return this._serializedFields={},this.SetSerializedField("Table",this._table),this.SerializeFields(),JSON.stringify(this._serializedFields)},e}();e.BaseUsageData=t;var n=function(e){function t(){return e.call(this,"AppActivated")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppId",{get:function(){return this.Fields.AppId},set:function(e){this.Fields.AppId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppInstanceId",{get:function(){return this.Fields.AppInstanceId},set:function(e){this.Fields.AppInstanceId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppURL",{get:function(){return this.Fields.AppURL},set:function(e){this.Fields.AppURL=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AssetId",{get:function(){return this.Fields.AssetId},set:function(e){this.Fields.AssetId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Browser",{get:function(){return this.Fields.Browser},set:function(e){this.Fields.Browser=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"UserId",{get:function(){return this.Fields.UserId},set:function(e){this.Fields.UserId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Host",{get:function(){return this.Fields.Host},set:function(e){this.Fields.Host=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HostVersion",{get:function(){return this.Fields.HostVersion},set:function(e){this.Fields.HostVersion=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ClientId",{get:function(){return this.Fields.ClientId},set:function(e){this.Fields.ClientId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeWidth",{get:function(){return this.Fields.AppSizeWidth},set:function(e){this.Fields.AppSizeWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeHeight",{get:function(){return this.Fields.AppSizeHeight},set:function(e){this.Fields.AppSizeHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Message",{get:function(){return this.Fields.Message},set:function(e){this.Fields.Message=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"DocUrl",{get:function(){return this.Fields.DocUrl},set:function(e){this.Fields.DocUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OfficeJSVersion",{get:function(){return this.Fields.OfficeJSVersion},set:function(e){this.Fields.OfficeJSVersion=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HostJSVersion",{get:function(){return this.Fields.HostJSVersion},set:function(e){this.Fields.HostJSVersion=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"WacHostEnvironment",{get:function(){return this.Fields.WacHostEnvironment},set:function(e){this.Fields.WacHostEnvironment=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"IsFromWacAutomation",{get:function(){return this.Fields.IsFromWacAutomation},set:function(e){this.Fields.IsFromWacAutomation=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"IsMOS",{get:function(){return this.Fields.IsMOS},set:function(e){this.Fields.IsMOS=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("AppId",this.AppId),this.SetSerializedField("AppInstanceId",this.AppInstanceId),this.SetSerializedField("AppURL",this.AppURL),this.SetSerializedField("AssetId",this.AssetId),this.SetSerializedField("Browser",this.Browser),this.SetSerializedField("UserId",this.UserId),this.SetSerializedField("Host",this.Host),this.SetSerializedField("HostVersion",this.HostVersion),this.SetSerializedField("ClientId",this.ClientId),this.SetSerializedField("AppSizeWidth",this.AppSizeWidth),this.SetSerializedField("AppSizeHeight",this.AppSizeHeight),this.SetSerializedField("Message",this.Message),this.SetSerializedField("DocUrl",this.DocUrl),this.SetSerializedField("OfficeJSVersion",this.OfficeJSVersion),this.SetSerializedField("HostJSVersion",this.HostJSVersion),this.SetSerializedField("WacHostEnvironment",this.WacHostEnvironment),this.SetSerializedField("IsFromWacAutomation",this.IsFromWacAutomation),this.SetSerializedField("IsMOS",this.IsMOS)},t}(t);e.AppActivatedUsageData=n;var o=function(e){function t(){return e.call(this,"ScriptLoad")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ScriptId",{get:function(){return this.Fields.ScriptId},set:function(e){this.Fields.ScriptId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"StartTime",{get:function(){return this.Fields.StartTime},set:function(e){this.Fields.StartTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ResponseTime",{get:function(){return this.Fields.ResponseTime},set:function(e){this.Fields.ResponseTime=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("ScriptId",this.ScriptId),this.SetSerializedField("StartTime",this.StartTime),this.SetSerializedField("ResponseTime",this.ResponseTime)},t}(t);e.ScriptLoadUsageData=o;var i=function(e){function t(){return e.call(this,"AppClosed")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"FocusTime",{get:function(){return this.Fields.FocusTime},set:function(e){this.Fields.FocusTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeFinalWidth",{get:function(){return this.Fields.AppSizeFinalWidth},set:function(e){this.Fields.AppSizeFinalWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeFinalHeight",{get:function(){return this.Fields.AppSizeFinalHeight},set:function(e){this.Fields.AppSizeFinalHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OpenTime",{get:function(){return this.Fields.OpenTime},set:function(e){this.Fields.OpenTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"CloseMethod",{get:function(){return this.Fields.CloseMethod},set:function(e){this.Fields.CloseMethod=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("FocusTime",this.FocusTime),this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth),this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight),this.SetSerializedField("OpenTime",this.OpenTime),this.SetSerializedField("CloseMethod",this.CloseMethod)},t}(t);e.AppClosedUsageData=i;var r=function(e){function t(){return e.call(this,"APIUsage")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"APIType",{get:function(){return this.Fields.APIType},set:function(e){this.Fields.APIType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"APIID",{get:function(){return this.Fields.APIID},set:function(e){this.Fields.APIID=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Parameters",{get:function(){return this.Fields.Parameters},set:function(e){this.Fields.Parameters=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ResponseTime",{get:function(){return this.Fields.ResponseTime},set:function(e){this.Fields.ResponseTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ErrorType",{get:function(){return this.Fields.ErrorType},set:function(e){this.Fields.ErrorType=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("APIType",this.APIType),this.SetSerializedField("APIID",this.APIID),this.SetSerializedField("Parameters",this.Parameters),this.SetSerializedField("ResponseTime",this.ResponseTime),this.SetSerializedField("ErrorType",this.ErrorType)},t}(t);e.APIUsageUsageData=r;var a=function(e){function t(){return e.call(this,"AppInitialization")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SuccessCode",{get:function(){return this.Fields.SuccessCode},set:function(e){this.Fields.SuccessCode=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Message",{get:function(){return this.Fields.Message},set:function(e){this.Fields.Message=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("SuccessCode",this.SuccessCode),this.SetSerializedField("Message",this.Message)},t}(t);e.AppInitializationUsageData=a;var s=function(e){function t(){return e.call(this,"CheckWACHost")||this}return __extends(t,e),Object.defineProperty(t.prototype,"isWacKnownHost",{get:function(){return this.Fields.isWacKnownHost},set:function(e){this.Fields.isWacKnownHost=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this.Fields.instanceId},set:function(e){this.Fields.instanceId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostType",{get:function(){return this.Fields.hostType},set:function(e){this.Fields.hostType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostPlatform",{get:function(){return this.Fields.hostPlatform},set:function(e){this.Fields.hostPlatform=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wacDomain",{get:function(){return this.Fields.wacDomain},set:function(e){this.Fields.wacDomain=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLocalStorageAvailable",{get:function(){return this.Fields.isLocalStorageAvailable},set:function(e){this.Fields.isLocalStorageAvailable=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("isWacKnownHost",this.isWacKnownHost),this.SetSerializedField("instanceId",this.instanceId),this.SetSerializedField("hostType",this.hostType),this.SetSerializedField("hostPlatform",this.hostPlatform),this.SetSerializedField("wacDomain",this.wacDomain),this.SetSerializedField("isLocalStorageAvailable",this.isLocalStorageAvailable)},t}(t);e.CheckWACHostUsageData=s}(OSFLog||(OSFLog={})),function(e){"use strict";!function(e){e[e.info=0]="info",e[e.warning=1]="warning",e[e.error=2]="error"}(e.TraceLevel||(e.TraceLevel={})),function(e){e[e.none=0]="none",e[e.flush=1]="flush"}(e.SendFlag||(e.SendFlag={})),e.allowUploadingData=function(){},e.sendLog=function(e,t,n){};var t=function(){function e(){}return e.prototype.writeLog=function(e){},e.prototype.loadProxyFrame=function(){},e}();OSF.Logger||(OSF.Logger=e),e.ulsEndpoint=function(){try{return new t}catch(e){return null}}()}(Logger||(Logger={})),function(e){var t=[{name:"AppActivated",enabled:!0,critical:!0,points:[{name:"Browser",type:"string"},{name:"Message",type:"string"},{name:"Host",type:"string"},{name:"AppSizeWidth",type:"int64"},{name:"AppSizeHeight",type:"int64"},{name:"IsFromWacAutomation",type:"string"},{name:"IsMOS",type:"int64"}]},{name:"ScriptLoad",enabled:!0,critical:!1,points:[{name:"ScriptId",type:"string"},{name:"StartTime",type:"double"},{name:"ResponseTime",type:"double"}]},{name:"APIUsage",enabled:function(){if(!OSF._OfficeAppFactory||!OSF._OfficeAppFactory.getHostInfo)return!1;var e=OSF._OfficeAppFactory.getHostInfo();if(!e)return!1;switch(e.hostType){case"outlook":switch(e.hostPlatform){case"mac":case"web":return!0;default:return!1}default:return!1}}(),critical:!1,points:[{name:"APIType",type:"string"},{name:"APIID",type:"int64"},{name:"Parameters",type:"string"},{name:"ResponseTime",type:"int64"},{name:"ErrorType",type:"int64"}]},{name:"AppInitialization",enabled:!0,critical:!1,points:[{name:"SuccessCode",type:"int64"},{name:"Message",type:"string"}]},{name:"AppClosed",enabled:!0,critical:!1,points:[{name:"FocusTime",type:"int64"},{name:"AppSizeFinalWidth",type:"int64"},{name:"AppSizeFinalHeight",type:"int64"},{name:"OpenTime",type:"int64"}]},{name:"CheckWACHost",enabled:!0,critical:!1,points:[{name:"isWacKnownHost",type:"int64"},{name:"solutionId",type:"string"},{name:"hostType",type:"string"},{name:"hostPlatform",type:"string"},{name:"correlationId",type:"string"},{name:"isLocalStorageAvailable",type:"boolean"}]}];function n(e,t){var n=void 0===t.rename?t.name:t.rename,o=void 0;switch(t.type){case"string":o=oteljs.makeStringDataField(n,e);break;case"double":"string"===typeof e&&(e=parseFloat(e)),o=oteljs.makeDoubleDataField(n,e);break;case"int64":"string"===typeof e&&(e=parseInt(e)),o=oteljs.makeInt64DataField(n,e);break;case"boolean":"string"===typeof e&&(e="true"===e),o=oteljs.makeBooleanDataField(n,e)}return o}function o(e){for(var n=0,o=t;nn[i])return!1}return!1},e.prototype.isDirectToAriaEnabled=function(){if(void 0===this.EnableDirectToAria||null===this.EnableDirectToAria){var e=void 0,t=void 0;OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&(e=OSF._OfficeAppFactory.getHostInfo().hostPlatform),window.external&&"undefined"!==typeof window.external.GetContext&&"undefined"!==typeof window.external.GetContext().GetHostFullVersion&&(t=window.external.GetContext().GetHostFullVersion()),this.EnableDirectToAria=this.shouldSendDirectToAria(e,t)}return this.EnableDirectToAria},e.prototype.sendTelemetry=function(t,n){e.EnableSendingTelemetryWithLegacyAria&&this.isDirectToAriaEnabled()&&OSF.OUtil.loadScript(this.getAriaCDNLocation(),(function(){try{if(!this.ALogger){this.ALogger=AWTLogManager.initialize("db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439")}var e=new AWTEventProperties;for(var o in e.setName("Office.Extensibility.OfficeJS."+t),n)"table"!==o.toLowerCase()&&e.setProperty(o,n[o]);var i=new Date;e.setProperty("Date",i.toISOString()),this.ALogger.logEvent(e)}catch(e){}}),1e3),e.EnableSendingTelemetryWithOTel&&i(t,n)},e.prototype.logData=function(e){this.isIUsageData(e)?this.sendTelemetry(e.Table,e.Fields):this.sendTelemetry(e.Table,e)},e.EnableSendingTelemetryWithOTel=!0,e.EnableSendingTelemetryWithLegacyAria=!1,e}();e.AriaLogger=r}(OSFAriaLogger||(OSFAriaLogger={})),function(e){"use strict";var t,n=OSF.OUtil.Guid.generateNewGuid(),o="",i=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i");e.enableTelemetry=!0;var r=function(){return function(){}}();e.AppInfo=r;var a=function(){return function(e,t){this.name=e,this.handler=t}}(),s=function(){function e(){this.clientIDKey="Office API client",this.logIdSetKey="Office App Log Id Set"}return e.prototype.getClientId=function(){var e=this.getValue(this.clientIDKey);return(!e||e.length<=0||e.length>40)&&(e=OSF.OUtil.Guid.generateNewGuid(),this.setValue(this.clientIDKey,e)),e},e.prototype.saveLog=function(e,t){var n=this.getValue(this.logIdSetKey);n=(n&&n.length>0?n+";":"")+e,this.setValue(this.logIdSetKey,n),this.setValue(e,t)},e.prototype.enumerateLog=function(e,t){var n=this.getValue(this.logIdSetKey);if(n){var o=n.split(";");for(var i in o){var r=o[i],a=this.getValue(r);a&&(e&&e(r,a),t&&this.remove(r))}t&&this.remove(this.logIdSetKey)}},e.prototype.getValue=function(e){var t=OSF.OUtil.getLocalStorage(),n="";return t&&(n=t.getItem(e)),n},e.prototype.setValue=function(e,t){var n=OSF.OUtil.getLocalStorage();n&&n.setItem(e,t)},e.prototype.remove=function(e){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(e)}catch(e){}},e}(),l=function(){function t(){}return t.prototype.LogData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(e){}},t.prototype.LogRawData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(e){}},t}();function c(e){return e&&(e=e.replace(/[{}]/g,"").toLowerCase()),e||""}function u(e,t){var i=new OSFLog.AppInitializationUsageData;i.CorrelationId=c(o),i.SessionId=n,i.SuccessCode=e?1:0,i.Message=t,(new l).LogData(i)}function d(){var e=0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.PublicAddin);return e||!!t&&p(OSF._OfficeAppFactory.getHostInfo().hostPlatform,t.hostVersion)}function f(e,t){return d()||t!==e?t:"PRIVATE"}function p(e,t){var n=!1,o=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(t);if(o){var i=parseInt(o[1]),r=parseInt(o[2]),a=parseInt(o[3]);"win32"==e?(i<16||16==i&&a<14225)&&(n=!0):"mac"==e&&(i<16||16==i&&(r<52||52==r&&a<808))&&(n=!0)}return n}function h(){return 0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.IsMos)}e.initialize=function(o){if(e.enableTelemetry&&!t){t=new r,o.get_hostFullVersion()?t.hostVersion=o.get_hostFullVersion():t.hostVersion=o.get_appVersion(),t.appId=d()?o.get_id():"PRIVATE",t.marketplaceType=o._marketplaceType,t.browser=window.navigator.userAgent,t.correlationId=c(o.get_correlationId()),t.clientId=(new s).getClientId(),t.appInstanceId=o.get_appInstanceId(),t.appInstanceId&&(t.appInstanceId=c(t.appInstanceId),t.appInstanceId=f(o.get_id(),t.appInstanceId)),t.message=o.get_hostCustomMessage(),t.officeJSVersion=OSF.ConstantNames.FileVersion,t.hostJSVersion="0.0.0.0",o._wacHostEnvironment&&(t.wacHostEnvironment=o._wacHostEnvironment),void 0!==o._isFromWacAutomation&&null!==o._isFromWacAutomation&&(t.isFromWacAutomation=o._isFromWacAutomation.toString().toLowerCase());var l=o.get_docUrl();t.docUrl=i.test(l)?l:"";var u=location.href;u&&(u=u.split("?")[0].split("#")[0]),t.isMos=h(),t.appURL="",function(e,t){var n,o;t.assetId="",t.userId="";try{n=decodeURIComponent(e);var i=(o=(new DOMParser).parseFromString(n,"text/xml")).getElementsByTagName("t")[0].attributes.getNamedItem("cid"),r=o.getElementsByTagName("t")[0].attributes.getNamedItem("oid");i&&i.nodeValue?t.userId=i.nodeValue:r&&r.nodeValue&&(t.userId=r.nodeValue),t.assetId=o.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(e){}finally{n=null,o=null,null}}(o.get_eToken(),t),t.sessionId=n,"undefined"!==typeof OTel&&OTel.OTelLogger.initialize(t),function(){var t=new Date,n=null,o=0,i=!1,r=function(){document.hasFocus()?null==n&&(n=new Date):n&&(o+=Math.abs((new Date).getTime()-n.getTime()),n=null)},s=[];s.push(new a("focus",r)),s.push(new a("blur",r)),s.push(new a("focusout",r)),s.push(new a("focusin",r));var l=function(){for(var r=0;rn)||(clearInterval(s),t)||i(new Event("Missing expected object after loaded."))}),500);else o(null);else i(new Event("loadScript: failed to load '"+e+"'"))}),n):o(null)}))};OfficeExtension.Promise.all([i(e.config.msal,(function(){return!!msal}),e.config.delayMsal),i(o,(function(){return!!BrowserAuth}),e.config.delayWebAuth)]).then((function(){e.config?BrowserAuth.Load(e.config,OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId).then((function(e){t(e)}),(function(e){n(e)})):BrowserAuth.GetAuthConfig().then((function(o){e.config=o,BrowserAuth.Load(e.config,OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId).then((function(e){t(e)}),(function(e){n(e)}))}),(function(){n(new Event("BrowserAuth.GetAuthConfig was failed"))}))}),(function(e){n(e)}))}))):new OfficeExtension.Promise((function(e,t){return t(new Event("'authcode' as authFlow is only supported"))}))},e.getToken=function(n,o,i,r,a){return e.config&&e.config.authFlow===t.AuthCode?BrowserAuth.GetToken(n,o,i,!!r,!!r,!1,a):new OfficeExtension.Promise((function(e,t){return t(new Event("'authcode' as authFlow is only supported"))}))},OSF.WebAuth=e}(OSFWebAuth||(OSFWebAuth={})),function(e){!function(e){var t=function(){return function(e,t,n,o){this.Id=e,this.StoreId=t,this.StoreType=n,this.AppVersion=o}}();e.ExtensionIdentity=t;var n=function(){return function(e,t,n){this.HostType=e,this.FormFactor=t,this.Locale=n}}();e.HostProperties=n;var o=function(){return function(e,t){this.OptionalProperties=e,this.DevProperties=t}}();e.ExtensionLaunchProperties=o;var i=function(){return function(e,t,n,o,i){this.ExtId=e,this.ComponentType=t,this.ComponentId=n,this.HostProps=o,this.OptionalProps=i}}();e.LaunchParameters=i;var r=function(){function e(e,t,n,o,i){this.Id=e,this.ComponentType=t,this.ComponentId=n,this.InstanceToken=o,this.LaunchProperties=i}return e.prototype.SetLaunchProperties=function(e){this.LaunchProperties=e},e.prototype.stop=function(){OSF.ExtensionLifeCycle&&OSF.ExtensionLifeCycle.stopExtensionComponent&&OSF.ExtensionLifeCycle.stopExtensionComponent(this)},e.prototype.restart=function(){OSF.ExtensionLifeCycle&&OSF.ExtensionLifeCycle.restartExtensionComponent&&OSF.ExtensionLifeCycle.restartExtensionComponent(this)},e.prototype.closeSDXDialog=function(e){OSF.ExtensionLifeCycle&&OSF.ExtensionLifeCycle.close&&OSF.ExtensionLifeCycle.close({DialogCloseCallbackParam:e,InstanceId:this.InstanceToken})},e}();e.ExtensionComponentInstance=r;var a=function(){function e(){}return e.prototype.launchExtensionComponent=function(e,t,n,a,s){if(OSF.ExtensionLifeCycle&&OSF.ExtensionLifeCycle.launchExtensionComponent){var l=OSF.OUtil.Guid.generateNewGuid();null==s&&(s=new o({},{})),s.OptionalProperties.InstanceToken=l;var c=new i(e,t,n,a,s);OSF.ExtensionLifeCycle.launchExtensionComponent(c);var u=new r(e,t,n,l,s);return u.SetLaunchProperties(s),u}},e}();e.ExtensionLifeCycleManager=a}(e.LifeCycle||(e.LifeCycle={}))}(OfficeExt||(OfficeExt={})),Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"},OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"}),OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize},OSF.DDA.File=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/n)}});var o={};o[OSF.DDA.FileProperties.Handle]=e,o[OSF.DDA.FileProperties.SliceSize]=n;var i=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[i.GetDocumentCopyChunkAsync,i.ReleaseDocumentCopyAsync],o)},OSF.DDA.FileSliceOffset="fileSliceoffset",OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,enum:Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(e,t,n){var o=e[Microsoft.Office.WebExtension.Parameters.SliceSize];if(o<=0||o>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return e},onSucceeded:function(e,t,n){return new OSF.DDA.File(e[OSF.DDA.FileProperties.Handle],e[OSF.DDA.FileProperties.FileSize],n[Microsoft.Office.WebExtension.Parameters.SliceSize])}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(e,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(e,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(e,t,n){var o=e[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(o<0||o>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return e[OSF.DDA.FileSliceOffset]=parseInt((o*n[OSF.DDA.FileProperties.SliceSize]).toString()),e},onSucceeded:function(e,t,n){var o={};return OSF.OUtil.defineEnumerableProperties(o,{data:{value:e[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:n[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:e[OSF.DDA.FileProperties.SliceSize]}}),o}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(e,t){return t[OSF.DDA.FileProperties.Handle]}}]}),OSF.OUtil.setNamespace("Marshaling",OSF.DDA),OSF.OUtil.setNamespace("File",OSF.DDA.Marshaling),function(e){e[e.Handle=0]="Handle",e[e.FileSize=1]="FileSize"}(OSF_DDA_Marshaling_File_FilePropertiesKeys||(OSF_DDA_Marshaling_File_FilePropertiesKeys={})),OSF.DDA.Marshaling.File.FilePropertiesKeys=OSF_DDA_Marshaling_File_FilePropertiesKeys,function(e){e[e.Data=0]="Data",e[e.SliceSize=1]="SliceSize"}(OSF_DDA_Marshaling_File_SlicePropertiesKeys||(OSF_DDA_Marshaling_File_SlicePropertiesKeys={})),OSF.DDA.Marshaling.File.SlicePropertiesKeys=OSF_DDA_Marshaling_File_SlicePropertiesKeys,function(e){e[e.Text=0]="Text",e[e.Compressed=1]="Compressed",e[e.Pdf=2]="Pdf"}(OSF_DDA_Marshaling_File_FileType||(OSF_DDA_Marshaling_File_FileType={})),OSF.DDA.Marshaling.File.FileType=OSF_DDA_Marshaling_File_FileType,function(e){e[e.FileType=0]="FileType",e[e.SliceSize=1]="SliceSize",e[e.Handle=2]="Handle",e[e.SliceIndex=3]="SliceIndex"}(OSF_DDA_Marshaling_File_ParameterKeys||(OSF_DDA_Marshaling_File_ParameterKeys={})),OSF.DDA.Marshaling.File.ParameterKeys=OSF_DDA_Marshaling_File_ParameterKeys,OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties),OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle},{name:OSF.DDA.FileProperties.FileSize,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data},{name:OSF.DDA.FileProperties.SliceSize,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:OSF.DDA.Marshaling.File.FileType.Text},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:OSF.DDA.Marshaling.File.FileType.Compressed},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:OSF.DDA.Marshaling.File.FileType.Pdf}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:OSF.DDA.Marshaling.File.ParameterKeys.FileType},{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceSize}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle},{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle}]}),Microsoft.Office.WebExtension.TableData=function(e,t){function n(e){if(null==e||void 0==e)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(e,2);t<2;t++)e=[e];return e}catch(e){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(e){t=n(e)}},rows:{get:function(){return e},set:function(t){e=null==t||OSF.OUtil.isArray(t)&&0==t.length?[]:n(t)}}}),this.headers=t,this.rows=e},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureTableData=function(e){return new Microsoft.Office.WebExtension.TableData(e[OSF.DDA.TableDataProperties.TableRows],e[OSF.DDA.TableDataProperties.TableHeaders])},Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"},OSF.DDA.DataCoercion=function(){return{findArrayDimensionality:function(e){if(OSF.OUtil.isArray(e)){for(var t=0,n=0;n0)for(var o=0;o0)for(var o=0;o0&&(this._eventHandlers[e]=[],!0)},clearObjectEventHandlers:function(e,t){return null!=this._objectEventHandlers[e]&&null!=this._objectEventHandlers[e][t]&&(this._objectEventHandlers[e][t]=[],!0)},getEventHandlerCount:function(e){return void 0!=this._eventHandlers[e]?this._eventHandlers[e].length:-1},getObjectEventHandlerCount:function(e,t){return null==this._objectEventHandlers[e]||null==this._objectEventHandlers[e][t]?0:this._objectEventHandlers[e][t].length},fireEvent:function(e){if(void 0==e.type)return!1;var t=e.type;if(t&&this._eventHandlers[t]){for(var n=this._eventHandlers[t],o=0;o0){for(var o=t[0];n.length>0;){o(n.shift())}return!0}}return!1},clearQueuedEvent:function(e){e&&this._eventHandlers[e]&&(this._queuedEventsArgs[e]&&(this._queuedEventsArgs[e]=[]))}},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureEventArgs=function(e,t,n){var o;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:o=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:o=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(n,t.document),n[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:o=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(n,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:o=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:o=new OSF.DDA.ActiveViewChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:o=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:o=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:o=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(n),"outlook"==OSF._OfficeAppFactory.getHostInfo().hostType&&"mac"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&OSF.DDA.convertOlkAppointmentTimeToDateFormat(o);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:o=new OSF.DDA.ObjectEventArgs(e,n[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:o=new OSF.DDA.RichApiMessageEventArgs(e,n);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:o=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:o=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:o=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:o=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:o=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:o=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:o=new OSF.DDA.DialogEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:o=new OSF.DDA.DialogParentEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkItemSelectedChangedEventArgs(n),t.initialize(o.initialData),"win32"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform&&"mac"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform||t.setCurrentItemNumber(o.itemNumber.itemNumber);break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkRecipientsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkRecurrenceChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkAttachmentsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.InfobarClicked:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkInfobarClickedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkSelectedItemsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkSensitivityLabelChangedEventArgs(n);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return o},OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"}),OSF.DDA.SettingsChangedEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:e}})},OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(e,t){return t}}],onSucceeded:function(e,t,n){var o=e[OSF.DDA.SettingsManager.SerializedSettings],i=OSF.DDA.SettingsManager.deserializeSettings(o),r=n[OSF.DDA.SettingsManager.RefreshingSettings];for(var a in r)t.remove(a);for(var a in i)t.set(a,i[a]);return t}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(e,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]}),OSF.DDA.WAC.SettingsTranslator=function(){return{read:function(e){var t=OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument,n={},o=e.Settings;for(var i in o){var r=o[i];t?n[r.Name]=r.Value:n[r[0]]=r[1]}return n},write:function(e){var t=[];for(var n in e){var o=[];o[0]=n,o[1]=e[n],t.push(o)}return t}}}(),OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(OSF.DDA.SettingsManager.SerializedSettings,{toHost:OSF.DDA.WAC.SettingsTranslator.write,fromHost:OSF.DDA.WAC.SettingsTranslator.read}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SettingsRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:"OverwriteIfStale"},{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}],invertible:!0}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SettingsRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent}),Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"},OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType},OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"}),OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"}),OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties),OSF.DDA.BindingPromise=function(e,t){this._id=e,OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(e){var n=typeof e;if("undefined"!=n&&"function"!=n)throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,n);t=e}})},OSF.DDA.BindingPromise.prototype={_fetch:function(e){if(this.binding)e&&e(this.binding);else if(!this._binding){var t=this;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(this._id,(function(n){n.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(t,"binding",{value:n.value}),e&&e(t.binding)):t.onFail&&t.onFail(n)}))}return this},getDataAsync:function(){var e=arguments;return this._fetch((function(t){t.getDataAsync.apply(t,e)})),this},setDataAsync:function(){var e=arguments;return this._fetch((function(t){t.setDataAsync.apply(t,e)})),this},addHandlerAsync:function(){var e=arguments;return this._fetch((function(t){t.addHandlerAsync.apply(t,e)})),this},removeHandlerAsync:function(){var e=arguments;return this._fetch((function(t){t.removeHandlerAsync.apply(t,e)})),this}},OSF.DDA.BindingFacade=function(e){this._eventDispatches=[],OSF.OUtil.defineEnumerableProperty(this,"document",{value:e});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])},OSF.DDA.UnknownBinding=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:e}})},OSF.DDA.Binding=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:e}});var n=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[n.GetDataAsync,n.SetDataAsync]);var o=Microsoft.Office.WebExtension.EventType,i=t.bindings._eventDispatches;i[e]||(i[e]=new OSF.EventDispatch([o.BindingSelectionChanged,o.BindingDataChanged]));var r=i[e];OSF.DDA.DispIdHost.addEventSupport(this,r)},OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureBinding=function(e,t){var n,o=e[OSF.DDA.BindingProperties.Id],i=e[OSF.DDA.BindingProperties.RowCount],r=e[OSF.DDA.BindingProperties.ColumnCount],a=e[OSF.DDA.BindingProperties.HasHeaders];switch(e[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:n=new OSF.DDA.TextBinding(o,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:n=new OSF.DDA.MatrixBinding(o,t,i,r);break;case Microsoft.Office.WebExtension.BindingType.Table:n=new(function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument}()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding)(o,t,i,r,a);break;default:n=new OSF.DDA.UnknownBinding(o,t)}return n},OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function e(e){return OSF.DDA.OMFactory.manufactureBinding(e,Microsoft.Office.WebExtension.context.document)}function t(e){return e.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,enum:Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:e}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,enum:Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:e}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(t){return OSF.OUtil.mapList(t[OSF.DDA.ListDescriptors.BindingList],e)}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(e,t,n){var o=n[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[o]}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{enum:Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{enum:Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:["object","string"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:["number"],defaultValue:0}}],checkCallArgs:function(e,t,n){if(0==e[Microsoft.Office.WebExtension.Parameters.StartRow]&&0==e[Microsoft.Office.WebExtension.Parameters.StartColumn]&&0==e[Microsoft.Office.WebExtension.Parameters.RowCount]&&0==e[Microsoft.Office.WebExtension.Parameters.ColumnCount]&&(delete e[Microsoft.Office.WebExtension.Parameters.StartRow],delete e[Microsoft.Office.WebExtension.Parameters.StartColumn],delete e[Microsoft.Office.WebExtension.Parameters.RowCount],delete e[Microsoft.Office.WebExtension.Parameters.ColumnCount]),e[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(e[Microsoft.Office.WebExtension.Parameters.StartRow]||e[Microsoft.Office.WebExtension.Parameters.StartColumn]||e[Microsoft.Office.WebExtension.Parameters.RowCount]||e[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return e},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:t}],onSucceeded:function(e,t,n){var o=e[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&o&&(void 0!=o[OSF.DDA.TableDataProperties.TableRows]||void 0!=o[OSF.DDA.TableDataProperties.TableHeaders])&&(o=OSF.DDA.OMFactory.manufactureTableData(o)),void 0==(o=OSF.DDA.DataCoercion.coerceData(o,n[Microsoft.Office.WebExtension.Parameters.CoercionType]))?null:o}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e){return OSF.DDA.DataCoercion.determineCoercionType(e[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:["object","string"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:["number"],defaultValue:0}}],checkCallArgs:function(e,t,n){if(0==e[Microsoft.Office.WebExtension.Parameters.StartRow]&&0==e[Microsoft.Office.WebExtension.Parameters.StartColumn]&&(delete e[Microsoft.Office.WebExtension.Parameters.StartRow],delete e[Microsoft.Office.WebExtension.Parameters.StartColumn]),e[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(e[Microsoft.Office.WebExtension.Parameters.StartRow]||e[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return e},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:t}]})}(),OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"}),OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"}),OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"},OSF.DDA.TableBinding=function(e,t,n,o,i){OSF.DDA.TableBinding.uber.constructor.call(this,e,t),OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:n||0},columnCount:{value:o||0},hasHeaders:{value:i||!1}});var r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.AddRowsAsync,r.AddColumnsAsync,r.DeleteAllDataValuesAsync])},OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding),OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function e(e){return e.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]})}(),OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.BindingProperties),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.BindingRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:"ItemName"},{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:"BindingType"},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:"PromptText"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:"SampleData"},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:"FailOnCollision"}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:2},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:3},{name:Microsoft.Office.WebExtension.BindingType.Table,value:1}],invertible:!0}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:"Name"},{name:OSF.DDA.BindingProperties.Type,value:"BindingType"},{name:OSF.DDA.BindingProperties.RowCount,value:"RowCount"},{name:OSF.DDA.BindingProperties.ColumnCount,value:"ColCount"},{name:OSF.DDA.BindingProperties.HasHeaders,value:"HasHeaders"}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]}),OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"}),OSF.DDA.MatrixBinding=function(e,t,n,o){OSF.DDA.MatrixBinding.uber.constructor.call(this,e,t),OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:n||0},columnCount:{value:o||0}})},OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding),OSF.DDA.TextBinding=function(e,t){OSF.DDA.TextBinding.uber.constructor.call(this,e,t),OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})},OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding),OSF.DDA.AsyncMethodNames.addNames({AddFromPromptAsync:"addFromPromptAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,enum:Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:["string"],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:function(e){return OSF.DDA.OMFactory.manufactureBinding(e,Microsoft.Office.WebExtension.context.document)}}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"}),OSF.DDA.DocumentSelectionChangedEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:e}})},OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"}),OSF.DDA.ObjectEventArgs=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:e},object:{value:t}})},OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"}),OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"}),OSF.DDA.BindingSelectionChangedEventArgs=function(e,t){for(var n in OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:e}}),t)OSF.OUtil.defineEnumerableProperty(this,n,{value:t[n]})},OSF.DDA.BindingDataChangedEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:e}})},OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.BindingSelectionChangedEvent),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.WAC.UniqueArguments.BindingEventSource},{name:OSF.DDA.PropertyDescriptors.Subset,value:OSF.DDA.PropertyDescriptors.Subset}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.WAC.UniqueArguments.BindingEventSource}]}),OSF.DDA.FilePropertiesDescriptor={Url:"Url"},OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"}),Microsoft.Office.WebExtension.FileProperties=function(e){OSF.OUtil.defineEnumerableProperties(this,{url:{value:e[OSF.DDA.FilePropertiesDescriptor.Url]}})},OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(e,t,n){return new Microsoft.Office.WebExtension.FileProperties(e)}}),OSF.OUtil.setNamespace("Marshaling",OSF.DDA),function(e){e[e.Properties=0]="Properties",e[e.Url=1]="Url"}(OSF_DDA_Marshaling_FilePropertiesKeys||(OSF_DDA_Marshaling_FilePropertiesKeys={})),OSF.DDA.Marshaling.FilePropertiesKeys=OSF_DDA_Marshaling_FilePropertiesKeys,OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:OSF.DDA.Marshaling.FilePropertiesKeys.Url}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.Marshaling.FilePropertiesKeys.Properties}]}),Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"},Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"},Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"},OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,enum:Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{enum:Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]}),OSF.OUtil.setNamespace("Marshaling",OSF.DDA),OSF.DDA.Marshaling.NavigationKeys={NavigationRequest:"DdaGoToByIdMethod",Id:"Id",GoToType:"GoToType",SelectionMode:"SelectionMode"},function(e){e[e.Binding=0]="Binding",e[e.NamedItem=1]="NamedItem",e[e.Slide=2]="Slide",e[e.Index=3]="Index"}(OSF_DDA_Marshaling_GoToType||(OSF_DDA_Marshaling_GoToType={})),OSF.DDA.Marshaling.GoToType=OSF_DDA_Marshaling_GoToType,function(e){e[e.Default=0]="Default",e[e.Selected=1]="Selected",e[e.None=2]="None"}(OSF_DDA_Marshaling_SelectionMode||(OSF_DDA_Marshaling_SelectionMode={})),OSF.DDA.Marshaling.SelectionMode=OSF_DDA_Marshaling_SelectionMode,OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.Marshaling.NavigationKeys.NavigationRequest),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.NavigationKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:OSF.DDA.Marshaling.NavigationKeys.GoToType},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:OSF.DDA.Marshaling.NavigationKeys.SelectionMode}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:OSF.DDA.Marshaling.GoToType.Binding},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:OSF.DDA.Marshaling.GoToType.NamedItem},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:OSF.DDA.Marshaling.GoToType.Slide},{name:Microsoft.Office.WebExtension.GoToType.Index,value:OSF.DDA.Marshaling.GoToType.Index}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:OSF.DDA.Marshaling.SelectionMode.Default},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:OSF.DDA.Marshaling.SelectionMode.Selected},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:OSF.DDA.Marshaling.SelectionMode.None}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.ExcelTableBinding=function(e,t,n,o,i){var r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.ClearFormatsAsync,r.SetTableOptionsAsync,r.SetFormatsAsync]),OSF.DDA.ExcelTableBinding.uber.constructor.call(this,e,t,n,o,i),OSF.OUtil.finalizeProperties(this)},OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e){return OSF.DDA.DataCoercion.determineCoercionType(e[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:["object"],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:["object"],defaultValue:[]}}],privateStateCallbacks:[]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e){return OSF.DDA.DataCoercion.determineCoercionType(e[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:["object","string"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:["object"],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:["object"],defaultValue:[]}}],checkCallArgs:function(e,t,n){var o=Microsoft.Office.WebExtension.Parameters;if(0==e[o.StartRow]&&0==e[o.StartColumn]&&OSF.OUtil.isArray(e[o.CellFormat])&&0===e[o.CellFormat].length&&OSF.OUtil.isArray(e[o.TableOptions])&&0===e[o.TableOptions].length&&(delete e[o.StartRow],delete e[o.StartColumn],delete e[o.CellFormat],delete e[o.TableOptions]),e[o.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(e[o.StartRow]&&0!=e[o.StartRow]||e[o.StartColumn]&&0!=e[o.StartColumn]||e[o.CellFormat]||e[o.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return e},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(e){return e.id}}]}),OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var e=arguments;return this._fetch((function(t){t.setTableOptionsAsync.apply(t,e)})),this},OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var e=arguments;return this._fetch((function(t){t.setFormatsAsync.apply(t,e)})),this},OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var e=arguments;return this._fetch((function(t){t.clearFormatsAsync.apply(t,e)})),this}}(),function(){function e(e){return e.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]})}(),OSF.OUtil.setNamespace("Marshaling",OSF.DDA),OSF.DDA.Marshaling.FormatKeys={Id:"BindingId",CellFormat:"CellFormat",TableOptions:"TableOptions"},function(e){e[e.headerRow=0]="headerRow",e[e.bandedRows=1]="bandedRows",e[e.firstColumn=2]="firstColumn",e[e.lastColumn=3]="lastColumn",e[e.bandedColumns=4]="bandedColumns",e[e.filterButton=5]="filterButton",e[e.style=6]="style",e[e.totalRow=7]="totalRow"}(OSF_DDA_Marshaling_TableOptionProperties||(OSF_DDA_Marshaling_TableOptionProperties={})),OSF.DDA.Marshaling.TableOptionProperties=OSF_DDA_Marshaling_TableOptionProperties,function(e){e[e.row=0]="row",e[e.column=1]="column"}(OSF_DDA_Marshaling_CellProperties||(OSF_DDA_Marshaling_CellProperties={})),OSF.DDA.Marshaling.CellProperties=OSF_DDA_Marshaling_CellProperties,function(e){e[e.alignHorizontal=1]="alignHorizontal",e[e.alignVertical=2]="alignVertical",e[e.backgroundColor=101]="backgroundColor",e[e.borderStyle=201]="borderStyle",e[e.borderColor=202]="borderColor",e[e.borderTopStyle=203]="borderTopStyle",e[e.borderTopColor=204]="borderTopColor",e[e.borderBottomStyle=205]="borderBottomStyle",e[e.borderBottomColor=206]="borderBottomColor",e[e.borderLeftStyle=207]="borderLeftStyle",e[e.borderLeftColor=208]="borderLeftColor",e[e.borderRightStyle=209]="borderRightStyle",e[e.borderRightColor=210]="borderRightColor",e[e.borderOutlineStyle=211]="borderOutlineStyle",e[e.borderOutlineColor=212]="borderOutlineColor",e[e.borderInlineStyle=213]="borderInlineStyle",e[e.borderInlineColor=214]="borderInlineColor",e[e.fontFamily=301]="fontFamily",e[e.fontStyle=302]="fontStyle",e[e.fontSize=303]="fontSize",e[e.fontUnderlineStyle=304]="fontUnderlineStyle",e[e.fontColor=305]="fontColor",e[e.fontDirection=306]="fontDirection",e[e.fontStrikethrough=307]="fontStrikethrough",e[e.fontSuperscript=308]="fontSuperscript",e[e.fontSubscript=309]="fontSubscript",e[e.fontNormal=310]="fontNormal",e[e.indentLeft=401]="indentLeft",e[e.indentRight=402]="indentRight",e[e.numberFormat=501]="numberFormat",e[e.width=701]="width",e[e.height=702]="height",e[e.wrapping=703]="wrapping"}(OSF_DDA_Marshaling_CellFormatProperties||(OSF_DDA_Marshaling_CellFormatProperties={})),OSF.DDA.Marshaling.CellFormatProperties=OSF_DDA_Marshaling_CellFormatProperties,function(e){e[e.none=0]="none",e[e.thin=1]="thin",e[e.medium=2]="medium",e[e.dashed=3]="dashed",e[e.dotted=4]="dotted",e[e.thick=5]="thick",e[e.double=6]="double",e[e.hair=7]="hair",e[e.mediumDashed=8]="mediumDashed",e[e.dashDot=9]="dashDot",e[e.mediumDashDot=10]="mediumDashDot",e[e.dashDotDot=11]="dashDotDot",e[e.mediumDashDotDot=12]="mediumDashDotDot",e[e.slantDashDot=13]="slantDashDot"}(OSF_DDA_Marshaling_BorderStyleType||(OSF_DDA_Marshaling_BorderStyleType={})),OSF.DDA.Marshaling.BorderStyleType=OSF_DDA_Marshaling_BorderStyleType,function(e){e[e.none=0]="none",e[e.black=1]="black",e[e.blue=2]="blue",e[e.gray=3]="gray",e[e.green=4]="green",e[e.orange=5]="orange",e[e.pink=6]="pink",e[e.purple=7]="purple",e[e.red=8]="red",e[e.teal=9]="teal",e[e.turquoise=10]="turquoise",e[e.violet=11]="violet",e[e.white=12]="white",e[e.yellow=13]="yellow",e[e.automatic=14]="automatic"}(OSF_DDA_Marshaling_ColorType||(OSF_DDA_Marshaling_ColorType={})),OSF.DDA.Marshaling.ColorType=OSF_DDA_Marshaling_ColorType,function(e){e[e.general=0]="general",e[e.left=1]="left",e[e.center=2]="center",e[e.right=3]="right",e[e.fill=4]="fill",e[e.justify=5]="justify",e[e.centerAcrossSelection=6]="centerAcrossSelection",e[e.distributed=7]="distributed"}(OSF_DDA_Marshaling_AlignHorizontalType||(OSF_DDA_Marshaling_AlignHorizontalType={})),OSF.DDA.Marshaling.AlignHorizontalType=OSF_DDA_Marshaling_AlignHorizontalType,function(e){e[e.top=0]="top",e[e.center=1]="center",e[e.bottom=2]="bottom",e[e.justify=3]="justify",e[e.distributed=4]="distributed"}(OSF_DDA_Marshaling_AlignVerticalType||(OSF_DDA_Marshaling_AlignVerticalType={})),OSF.DDA.Marshaling.AlignVerticalType=OSF_DDA_Marshaling_AlignVerticalType,function(e){e[e.regular=0]="regular",e[e.italic=1]="italic",e[e.bold=2]="bold",e[e.boldItalic=3]="boldItalic"}(OSF_DDA_Marshaling_FontStyleType||(OSF_DDA_Marshaling_FontStyleType={})),OSF.DDA.Marshaling.FontStyleType=OSF_DDA_Marshaling_FontStyleType,function(e){e[e.none=0]="none",e[e.single=1]="single",e[e.double=2]="double",e[e.singleAccounting=3]="singleAccounting",e[e.doubleAccounting=4]="doubleAccounting"}(OSF_DDA_Marshaling_FontUnderlineStyleType||(OSF_DDA_Marshaling_FontUnderlineStyleType={})),OSF.DDA.Marshaling.FontUnderlineStyleType=OSF_DDA_Marshaling_FontUnderlineStyleType,function(e){e[e.context=0]="context",e[e.leftToRight=1]="leftToRight",e[e.rightToLeft=2]="rightToLeft"}(OSF_DDA_Marshaling_FontDirectionType||(OSF_DDA_Marshaling_FontDirectionType={})),OSF.DDA.Marshaling.FontDirectionType=OSF_DDA_Marshaling_FontDirectionType,function(e){e[e.autoFit=-1]="autoFit"}(OSF_DDA_Marshaling_WidthType||(OSF_DDA_Marshaling_WidthType={})),OSF.DDA.Marshaling.WidthType=OSF_DDA_Marshaling_WidthType,function(e){e[e.autoFit=-1]="autoFit"}(OSF_DDA_Marshaling_HeightType||(OSF_DDA_Marshaling_HeightType={})),OSF.DDA.Marshaling.HeightType=OSF_DDA_Marshaling_HeightType,function(e){var t=OSF.DDA.Marshaling.AlignHorizontalType,n=OSF.DDA.Marshaling.AlignVerticalType,o=OSF.DDA.Marshaling.BorderStyleType,i=OSF.DDA.Marshaling.CellFormatProperties,r=OSF.DDA.Marshaling.CellProperties,a=OSF.DDA.Marshaling.ColorType,s=OSF.DDA.Marshaling.FontDirectionType,l=OSF.DDA.Marshaling.FontStyleType,c=OSF.DDA.Marshaling.FontUnderlineStyleType,u=OSF.DDA.Marshaling.HeightType,d=OSF.DDA.Marshaling.FormatKeys,f=Microsoft.Office.WebExtension.Parameters,p=OSF.DDA.WAC.Delegate.ParameterMap,h=OSF.DDA.Marshaling.TableOptionProperties,m=OSF.DDA.Marshaling.WidthType;Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2},p.define({type:OSF.DDA.WAC.UniqueArguments.ClearFormats,toHost:[{name:f.Id,value:d.Id}]}),p.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.ClearFormats,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),p.define({type:OSF.DDA.WAC.UniqueArguments.SetFormats,toHost:[{name:f.Id,value:d.Id},{name:f.CellFormat,value:d.CellFormat},{name:f.TableOptions,value:d.TableOptions}]}),p.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetFormats,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),p.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetFormats,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),p.define({type:OSF.DDA.WAC.UniqueArguments.SetData,toHost:[{name:f.Id,value:d.Id},{name:f.CoercionType,value:"CoerceType"},{name:f.Data,value:OSF.DDA.WAC.UniqueArguments.Data},{name:f.Rows,value:"Rows"},{name:f.Columns,value:"Columns"},{name:f.StartRow,value:"StartRow"},{name:f.StartColumn,value:"StartCol"},{name:f.CellFormat,value:d.CellFormat},{name:f.TableOptions,value:d.TableOptions}]}),p.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),p.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});var g={alignHorizontal:{text:"alignHorizontal",type:i.alignHorizontal},alignVertical:{text:"alignVertical",type:i.alignVertical},backgroundColor:{text:"backgroundColor",type:i.backgroundColor},borderStyle:{text:"borderStyle",type:i.borderStyle},borderColor:{text:"borderColor",type:i.borderColor},borderTopStyle:{text:"borderTopStyle",type:i.borderTopStyle},borderTopColor:{text:"borderTopColor",type:i.borderTopColor},borderBottomStyle:{text:"borderBottomStyle",type:i.borderBottomStyle},borderBottomColor:{text:"borderBottomColor",type:i.borderBottomColor},borderLeftStyle:{text:"borderLeftStyle",type:i.borderLeftStyle},borderLeftColor:{text:"borderLeftColor",type:i.borderLeftColor},borderRightStyle:{text:"borderRightStyle",type:i.borderRightStyle},borderRightColor:{text:"borderRightColor",type:i.borderRightColor},borderOutlineStyle:{text:"borderOutlineStyle",type:i.borderOutlineStyle},borderOutlineColor:{text:"borderOutlineColor",type:i.borderOutlineColor},borderInlineStyle:{text:"borderInlineStyle",type:i.borderInlineStyle},borderInlineColor:{text:"borderInlineColor",type:i.borderInlineColor},fontFamily:{text:"fontFamily",type:i.fontFamily},fontStyle:{text:"fontStyle",type:i.fontStyle},fontSize:{text:"fontSize",type:i.fontSize},fontUnderlineStyle:{text:"fontUnderlineStyle",type:i.fontUnderlineStyle},fontColor:{text:"fontColor",type:i.fontColor},fontDirection:{text:"fontDirection",type:i.fontDirection},fontStrikethrough:{text:"fontStrikethrough",type:i.fontStrikethrough},fontSuperscript:{text:"fontSuperscript",type:i.fontSuperscript},fontSubscript:{text:"fontSubscript",type:i.fontSubscript},fontNormal:{text:"fontNormal",type:i.fontNormal},indentLeft:{text:"indentLeft",type:i.indentLeft},indentRight:{text:"indentRight",type:i.indentRight},numberFormat:{text:"numberFormat",type:i.numberFormat},width:{text:"width",type:i.width},height:{text:"height",type:i.height},wrapping:{text:"wrapping",type:i.wrapping}},y=[{name:"none",value:o.none},{name:"thin",value:o.thin},{name:"medium",value:o.medium},{name:"dashed",value:o.dashed},{name:"dotted",value:o.dotted},{name:"thick",value:o.thick},{name:"double",value:o.double},{name:"hair",value:o.hair},{name:"medium dashed",value:o.mediumDashed},{name:"dash dot",value:o.dashDot},{name:"medium dash dot",value:o.mediumDashDot},{name:"dash dot dot",value:o.dashDotDot},{name:"medium dash dot dot",value:o.mediumDashDotDot},{name:"slant dash dot",value:o.slantDashDot}],v=[{name:"none",value:a.none},{name:"black",value:a.black},{name:"blue",value:a.blue},{name:"gray",value:a.gray},{name:"green",value:a.green},{name:"orange",value:a.orange},{name:"pink",value:a.pink},{name:"purple",value:a.purple},{name:"red",value:a.red},{name:"teal",value:a.teal},{name:"turquoise",value:a.turquoise},{name:"violet",value:a.violet},{name:"white",value:a.white},{name:"yellow",value:a.yellow},{name:"automatic",value:a.automatic}];p.define({type:g.alignHorizontal.text,toHost:[{name:"general",value:t.general},{name:"left",value:t.left},{name:"center",value:t.center},{name:"right",value:t.right},{name:"fill",value:t.fill},{name:"justify",value:t.justify},{name:"center across selection",value:t.centerAcrossSelection},{name:"distributed",value:t.distributed}]}),p.define({type:g.alignVertical.text,toHost:[{name:"top",value:n.top},{name:"center",value:n.center},{name:"bottom",value:n.bottom},{name:"justify",value:n.justify},{name:"distributed",value:n.distributed}]}),p.define({type:g.backgroundColor.text,toHost:v}),p.define({type:g.borderStyle.text,toHost:y}),p.define({type:g.borderColor.text,toHost:v}),p.define({type:g.borderTopStyle.text,toHost:y}),p.define({type:g.borderTopColor.text,toHost:v}),p.define({type:g.borderBottomStyle.text,toHost:y}),p.define({type:g.borderBottomColor.text,toHost:v}),p.define({type:g.borderLeftStyle.text,toHost:y}),p.define({type:g.borderLeftColor.text,toHost:v}),p.define({type:g.borderRightStyle.text,toHost:y}),p.define({type:g.borderRightColor.text,toHost:v}),p.define({type:g.borderOutlineStyle.text,toHost:y}),p.define({type:g.borderOutlineColor.text,toHost:v}),p.define({type:g.borderInlineStyle.text,toHost:y}),p.define({type:g.borderInlineColor.text,toHost:v}),p.define({type:g.fontStyle.text,toHost:[{name:"regular",value:l.regular},{name:"italic",value:l.italic},{name:"bold",value:l.bold},{name:"bold italic",value:l.boldItalic}]}),p.define({type:g.fontUnderlineStyle.text,toHost:[{name:"none",value:c.none},{name:"single",value:c.single},{name:"double",value:c.double},{name:"single accounting",value:c.singleAccounting},{name:"double accounting",value:c.doubleAccounting}]}),p.define({type:g.fontColor.text,toHost:v}),p.define({type:g.fontDirection.text,toHost:[{name:"context",value:s.context},{name:"left-to-right",value:s.leftToRight},{name:"right-to-left",value:s.rightToLeft}]}),p.define({type:g.width.text,toHost:[{name:"auto fit",value:m.autoFit}]}),p.define({type:g.height.text,toHost:[{name:"auto fit",value:u.autoFit}]}),p.define({type:f.TableOptions,toHost:[{name:"headerRow",value:h.headerRow},{name:"bandedRows",value:h.bandedRows},{name:"firstColumn",value:h.firstColumn},{name:"lastColumn",value:h.lastColumn},{name:"bandedColumns",value:h.bandedCoumns},{name:"filterButton",value:h.filterButton},{name:"style",value:h.style},{name:"totalRow",value:h.totalRow}]}),p.dynamicTypes[f.CellFormat]={toHost:function(e){for(var t in e)e[t].format&&(e[t].format=p.doMapValues(e[t].format,"toHost"));return e},fromHost:function(e){return e}},p.setDynamicType(f.CellFormat,{toHost:function(e){var t=[];for(var n in e){var o=e[n],i=[];if("undefined"!==typeof o.cells){var a,s=o.cells;if("object"===typeof o.cells)for(var l in a=[],s)"undefined"!==typeof r[l]&&(a[r[l]]=s[l]);else a=s;i[0]=a}if(o.format){var c=o.format,u=[];for(var d in c)"undefined"!==typeof g[d]&&u.push([g[d].type,c[d]]);i[1]=u}t[n]=i}return t},fromHost:function(e){return e}}),p.setDynamicType(f.TableOptions,{toHost:function(e){var t=[];for(var n in e)"undefined"!=typeof h[n]&&(t[h[n]]=e[n]);return t},fromHost:function(e){return e}}),t=null,n=null,o=null,i=null,a=null,s=null,l=null,c=null,u=null,d=null,m=null}(AgaveFormatAPI||(AgaveFormatAPI={})),OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]}),OSF.OUtil.setNamespace("RichApi",OSF.DDA),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.ArrayData}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RichApiMessage:"richApiMessage"}),OSF.DDA.RichApiMessageEventArgs=function(e,t){var n=t[Microsoft.Office.WebExtension.Parameters.Data],o=[];if(n)for(var i=0;i100&&(e[Microsoft.Office.WebExtension.Parameters.Width]=99),e[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Height]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Height]>100&&(e[Microsoft.Office.WebExtension.Parameters.Height]=99),e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),e}})},e.messageChildRichApiBridge=function(){if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,null,null)}},e.initOnce=function(){e.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync,e.displayDialogAsyncApiSupportedOptions),e.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync,e.displayModalDialogAsyncApiSupportedOptions)},e.displayDialogAsyncApiSupportedOptions=[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.EnforceAppDomain,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo,value:{types:["boolean"],defaultValue:!1}}],e.displayModalDialogAsyncApiSupportedOptions=e.displayDialogAsyncApiSupportedOptions.concat([{name:"abortWhenParentIsMinimized",value:{types:["boolean"],defaultValue:!1}},{name:"abortWhenDocIsInactive",value:{types:["boolean"],defaultValue:!1}}]),e}();DialogApiManager.initOnce(),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}],privateStateCallbacks:[]}),OSF.OUtil.setNamespace("Marshaling",OSF.DDA),OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling),OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent",MessageOrigin:"messageOrigin",TargetOrigin:"targetOrigin"},OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent",MessageOrigin:"messageOrigin",TargetOrigin:"targetOrigin"},OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent",TargetOrigin:"targetOrigin"},OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"},OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent",TargetOrigin:"targetOrigin"},function(e){!function(e){var t="excel",n="word",o="powerpoint",i="outlook",r="visio";e.getDialogCssManager=function(e){switch(e){case t:case n:case o:case i:case r:default:return new a}return null};var a=function(){function e(){this.overlayElementCSS=["position: absolute","top: 0","left: 0","width: 100%","height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"],this.dialogNotificationPanelCSS=["width: 100%","height: 190px","position: absolute","z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"],this.newWindowNotificationTextPanelCSS=["margin: 20px 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","font-size: 14px","height: 100px","line-height: 100px"],this.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"],this.crossZoneNotificationTextPanelCSS=["margin: 20px 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","font-size: 14px","height: 100px"],this.dialogNotificationButtonPanelCSS="margin:0px 9px",this.buttonStyleCSS=["text-align: center","width: 70px","height: 25px","font-size: 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","margin: 0px 5px","border-width: 1px","border-style: solid"]}return e.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(";")},e.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(";")},e.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(";")},e.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(";")},e.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(";")},e.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS},e.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(";")},e}();e.DefaultDialogCSSManager=a}(e.WacCommonUICssManager||(e.WacCommonUICssManager={}))}(OfficeExt||(OfficeExt={})),function(e){!function(t){!function(t){var n=null,o=null,i=null,r=null,a=null,s=!1,l=-1,c=null,u=e.WACUtils.shouldUseLocalStorageToPassMessage(),d={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:null,onCalling:null};function f(t,n){var o=!1,a=e.WacCommonUICssManager.getDialogCssManager(n);i=S(a),document.body.insertBefore(i,document.body.firstChild),(r=function(t,n){var o=document.createElement("div");o.style.cssText=t.getDialogNotificationPanelCSS(),_(o);var i=document.createElement("div");i.style.cssText=t.getCrossZoneNotificationTextPanelCSS(),i.id="dialogNotificationTextPanel";var r=document.createElement("a");r.id="configureBrowserLink",r.href="#",r.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink,r.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')");var a=document.createElement("span");if(Strings.OfficeOM.L_NewWindowCrossZone){var s=Strings.OfficeOM.L_NewWindowCrossZone.replace(/{1+}/gm,e.WACUtils.getDomainForUrl(n)).split("{0}");a.appendChild(document.createTextNode(s[0])),a.appendChild(r),a.appendChild(document.createTextNode(s[1]))}return i.appendChild(a),o.appendChild(i),o}(a,t)).id="crossZoneNotification";var l=C(a),c=g(a,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");l.appendChild(c),r.appendChild(l),document.body.insertBefore(r,document.body.firstChild),s=!0,c.onclick=function(){O()},c.addEventListener("keydown",(function(e){9==e.keyCode?(document.getElementById("configureBrowserLink").focus(),e.preventDefault(),e.stopPropagation()):13==e.keyCode&&(o=!0,e.preventDefault(),e.stopPropagation())}),!1),c.addEventListener("keyup",(function(e){13==e.keyCode&&o&&(o=!1,O(),e.preventDefault(),e.stopPropagation())}),!1),document.getElementById("configureBrowserLink").addEventListener("keydown",(function(e){9==e.keyCode&&(c.focus(),e.preventDefault(),e.stopPropagation())}),!1),window.focus(),c.focus()}function p(e){if(e.source==n)try{var t=e.origin,i=OSF._OfficeAppFactory.getInitializationHelper()._appContext._addInSourceUrl;if(i||(i=window.location.origin)||(i=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),!function(e,t,n){if(void 0===n&&(n=!0),!e||!t)return!1;var o=OSF.OUtil.parseUrl(e),i=OSF.OUtil.parseUrl(t),r=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;if(!("https:"===o.protocol))return!1;var a=o.protocol===i.protocol&&o.hostname===i.hostname&&o.port===i.port,s=Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(r,e),l=a||s;return!l&&n&&(l=Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(t,e)),l}(t,i,!0))throw new Error("Received a message from a dialog with an untrusted domain.");var r={};r[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived,r[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=e.data,r[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin]=t,o(r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+e)}}function h(e){var t=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+"messageParentKey";if(e.key==t)try{var n={};n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived,n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=e.newValue,n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin]=e.origin,o(n)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+e)}}function m(t){var i=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,r=[i.hostType,i.hostPlatform,i.hostSpecificFileVersion,i.hostLocale,i.osfControlAppCorrelationId,"isDialog",i.disableLogging?"disableLogging":"",i.flags&OSF.HostInfoFlags.PublicAddin].join("$"),s=OSF._OfficeAppFactory.getInitializationHelper()._appContext;s._taskpaneUrl=window.location.origin,s._taskpaneUrl||(s._taskpaneUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""));var c=t[OSF.ShowWindowDialogParameterKeys.Url];t[OSF.ShowWindowDialogParameterKeys.UrlNoHostInfo]||(c=e.WACUtils.addHostInfoAsQueryParam(c,r));var d=JSON.parse(window.name);d[OSF.WindowNameItemKeys.HostInfo]=r,d[OSF.WindowNameItemKeys.AppContext]=s;var m=t[OSF.ShowWindowDialogParameterKeys.Width]*screen.width/100,g=t[OSF.ShowWindowDialogParameterKeys.Height]*screen.height/100,y="width="+m+", height="+g+", left="+(s._clientWindowWidth/2-m/2)+", top="+(s._clientWindowHeight/2-g/2)+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";if("outlook"===i.hostType&&"web"===i.hostPlatform&&i.flags&OSF.HostInfoFlags.IsMonarch&&(n=window.open("about:blank?unfiltered",e.WACUtils.serializeObjectToString(d),y))?n.location=c:n=window.open(c,e.WACUtils.serializeObjectToString(d),y),null==n)return OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api."),b(),f(c,i.hostType),void a(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);u?window.addEventListener("storage",h):window.addEventListener("message",p),l=window.setInterval((function(){try{if(null==n||n.closed){window.clearInterval(l),u?window.removeEventListener("storage",h):window.removeEventListener("message",p);var e={};e[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed,o(e)}}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+e)}}),1e3),null!=a?a(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function g(e,t){var n=document.createElement("input");n.setAttribute("type","button"),n.style.cssText=e.getDialogButtonCSS(),n.style.borderColor="#ababab",n.style.backgroundColor="#ffffff",n.setAttribute("value",t);var o=function(){y(n)},i=function(){v(n)};return n.addEventListener("mouseover",o),n.addEventListener("focus",o),n.addEventListener("mouseout",i),n.addEventListener("focusout",i),n}function y(e){null!=c?(e.style.borderColor=c.HostButtonBorderColor,e.style.backgroundColor=c.HostButtonBackgroundColor):OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor?(e.style.borderColor=OSF.CommonUI.HostButtonBorderColor,e.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor):e.style.backgroundColor="#ccc"}function v(e){e.style.borderColor="#ababab",e.style.backgroundColor="#ffffff"}function O(){d.onCalling=function(e){b(),A(e)},OSF.DDA.WAC.Delegate.unregisterEventAsync(d)}function b(){null!=r&&(document.body.removeChild(r),r=null),null!=i&&(document.body.removeChild(i),i=null)}function S(e){var t=document.createElement("div");return t.style.cssText=e.getOverlayElementCSS(),t}function C(e){var t=document.createElement("div");return t.style.cssText=e.getDialogNotificationButtonPanelCSS(),"rtl"==document.documentElement.getAttribute("dir")?t.style.cssFloat="left":t.style.cssFloat="right",t}function A(e){if(e!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var t=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(t,!1)}}function _(e){e.setAttribute("role","dialog"),e.setAttribute("aria-describedby","dialogNotificationTextPanel")}t.setHostThemeButtonStyle=function(e){var t=e.input;null!=t&&(c={HostButtonBorderColor:t[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:t[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]}),e.completed()},t.removeEventListenersForDialog=function(e){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(!1),e.completed()},t.handleNewWindowDialog=function(t){try{if(!function(e){var t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,n=e[OSF.ShowWindowDialogParameterKeys.Url],o=Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(t,n);if(!o){var i=OSF._OfficeAppFactory.getInitializationHelper()._appContext._addInSourceUrl;return i||(i=window.location.origin)||(i=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),i&&Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(i,n)}return o}(t))return void a(OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains);if(!t[OSF.ShowWindowDialogParameterKeys.PromptBeforeOpen])return void m(t);s=!1;var n=!1,o=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,l=e.WacCommonUICssManager.getDialogCssManager(o.hostType),c=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);i=S(l),document.body.insertBefore(i,document.body.firstChild),(r=function(e,t){var n=document.createElement("div");n.style.cssText=e.getDialogNotificationPanelCSS(),_(n);var o=document.createElement("div");o.style.cssText=e.getNewWindowNotificationTextPanelCSS(),o.id="dialogNotificationTextPanel","rtl"==document.documentElement.getAttribute("dir")?o.style.paddingRight="30px":o.style.paddingLeft="30px";var i=document.createElement("span");return i.style.cssText=e.getNewWindowNotificationTextSpanCSS(),i.innerText=t,o.appendChild(i),n.appendChild(o),n}(l,c)).id="newWindowNotificaiton";var u=C(l),f=g(l,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),p=g(l,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);function h(e){d.onCalling=function(e){b(),A(e),a(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)},OSF.DDA.WAC.Delegate.unregisterEventAsync(d),e.preventDefault(),e.stopPropagation()}u.appendChild(f),u.appendChild(p),r.appendChild(u),document.body.insertBefore(r,document.body.firstChild),f.onclick=function(e){m(t),s||O(),e.preventDefault(),e.stopPropagation()},p.onclick=h,f.addEventListener("keydown",(function(e){e.shiftKey&&9==e.keyCode&&(v(f),y(p),p.focus(),e.preventDefault(),e.stopPropagation())}),!1),p.addEventListener("keydown",(function(e){e.shiftKey||9!=e.keyCode?13==e.keyCode&&(n=!0,e.preventDefault(),e.stopPropagation()):(v(p),y(f),f.focus(),e.preventDefault(),e.stopPropagation())}),!1),p.addEventListener("keyup",(function(e){13==e.keyCode&&n&&(n=!1,h(e))}),!1),window.focus(),d.onCalling=function(e){f.focus()},OSF.DDA.WAC.Delegate.registerEventAsync(d)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+e),a(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}},t.closeDialog=function(e){try{if(null!=n){var t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;if(t)for(var o=0;o-1)window.close();else{var t=e.data,n=typeof t;if(t&&("object"==n||"string"==n)){var o="string"==n?JSON.parse(t):t,i={};i[OSF.DDA.PropertyDescriptors.MessageContent]=o.messageContent,i[OSF.DDA.PropertyDescriptors.MessageOrigin]=e.origin;var r=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,null,i);OSF.DialogParentMessageEventDispatch.fireEvent(r)}}}))},t.setHandlerAndShowDialogCallback=function(e,t){o=e,a=t},t.escDismissDialogNotification=function(){try{r&&"newWindowNotificaiton"==r.id&&a&&a(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+e)}O()},t.showCrossZoneNotification=f}(t.Dialog||(t.Dialog={}))}(e.AddinNativeAction||(e.AddinNativeAction={}))}(OfficeExt||(OfficeExt={})),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageOrigin}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent},{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:OSF.DDA.Marshaling.MessageParentKeys.TargetOrigin}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent},{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:OSF.DDA.Marshaling.MessageParentKeys.TargetOrigin}]}),OSF.DDA.WAC.Delegate.openDialog=function(e){var t=JSON.parse(e.targetId),n=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,e);function o(e){var t={Error:e};try{n(Microsoft.Office.Common.InvokeResultCode.noError,t)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+e)}}if(OSF.DialogShownStatus.hasDialogShown)o(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);else{var i=t[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(),r=window.location.href.toLowerCase();if(OSF.AppTelemetry){var a=!1,s=!1,l=!1,c=!1,u="",d="";if(OSF.OUtil){var f=OSF.OUtil.parseUrl(i),p=OSF.OUtil.parseUrl(r);a=f.protocol===p.protocol&&f.hostname===p.hostname&&f.port===p.port,u=OSF.OUtil.getHostnamePortionForLogging(f.hostname),a?d=u:(d=OSF.OUtil.getHostnamePortionForLogging(p.hostname),s=Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(i,r),l=Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(r,i));var h=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;c=Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(h,i)}var m="openDialog isInline: "+t[OSF.ShowWindowDialogParameterKeys.DisplayInIframe].toString()+", taskpaneHostname: "+d+", dialogHostName: "+u+", isSameDomain: "+a.toString()+", parentIsSubdomain: "+s.toString()+", childIsSubdomain: "+l.toString()+", isAppDomain: "+c.toString();OSF.AppTelemetry.logAppCommonMessage(m)}null!=i&&"https://"===i.substr(0,"https://".length)?t[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]?(OSF.DialogShownStatus.isWindowDialog=!1,OSF.DDA.WAC.Delegate.registerEventAsync(e)):(OSF.DialogShownStatus.isWindowDialog=!0,OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback((function(t){e.onEvent&&e.onEvent(t),OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(e.dispId)}),o),OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(t)):"http://"===i.substr(0,"http://".length)?o(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS):o(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme)}},OSF.DDA.WAC.Delegate.messageParent=function(e){null!=window.opener?OfficeExt.AddinNativeAction.Dialog.messageParent(e):OSF.DDA.WAC.Delegate.executeAsync(e)},OSF.DDA.WAC.Delegate.sendMessage=function(e){OSF.DialogShownStatus.hasDialogShown&&(OSF.DialogShownStatus.isWindowDialog?OfficeExt.AddinNativeAction.Dialog.sendMessage(e):OSF.DDA.WAC.Delegate.executeAsync(e))},OSF.DDA.WAC.Delegate.closeDialog=function(e){var t=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,e);function n(e){var n={Error:e};try{t(Microsoft.Office.Common.InvokeResultCode.noError,n)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+e)}}OSF.DialogShownStatus.hasDialogShown?OSF.DialogShownStatus.isWindowDialog?(e.onCalling&&e.onCalling(),OfficeExt.AddinNativeAction.Dialog.closeDialog(n)):OSF.DDA.WAC.Delegate.unregisterEventAsync(e):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed)},OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()},OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()},Microsoft.Office.WebExtension.AccountTypeFilter={NoFilter:"noFilter",AAD:"aad",MSA:"msa"},OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync:"getAccessTokenAsync"}),OSF.DDA.Auth=function(){},OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAccessTokenAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:{types:["string"],defaultValue:""}},{name:Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.EnableNewHosts,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.AccountTypeFilter,value:{enum:Microsoft.Office.WebExtension.AccountTypeFilter,defaultValue:Microsoft.Office.WebExtension.AccountTypeFilter.NoFilter}}],checkCallArgs:function(e,t,n){var o,i=OSF._OfficeAppFactory.getInitializationHelper()._appContext;if(i&&i._wopiHostOriginForSingleSignOn){var r=OSF.OUtil.Guid.generateNewGuid();window.parent.parent.postMessage('{"MessageId":"AddinTrustedOrigin","AddinTrustId":"'+r+'"}',i._wopiHostOriginForSingleSignOn),e[Microsoft.Office.WebExtension.Parameters.AddinTrustId]=r}if(window.Office.context.requirements.isSetSupported("JsonPayloadSSO")){for(var a=((o={})[Microsoft.Office.WebExtension.Parameters.ForceConsent]=!1,o[Microsoft.Office.WebExtension.Parameters.ForceAddAccount]=!1,o[Microsoft.Office.WebExtension.Parameters.AuthChallenge]=!0,o[Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt]=!0,o[Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess]=!0,o[Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt]=!0,o[Microsoft.Office.WebExtension.Parameters.EnableNewHosts]=!0,o[Microsoft.Office.WebExtension.Parameters.AccountTypeFilter]=!0,o),s={},l=0,c=Object.keys(a);l=0&&(e=e.substring(t+5,e.length))<"14.14393"}()?e.PromiseImpl.Init():window.Promise:e.PromiseImpl.Init()}()}(t=e._Internal||(e._Internal={}));var n=t.OfficePromise;e.Promise=n}(OfficeExtension||(OfficeExtension={})),function(e){var t=function(){function e(){}return e.prototype._resolveRequestUrlAndHeaderInfo=function(){return c._createPromiseFromResult(null)},e.prototype._createRequestExecutorOrNull=function(){return null},e.prototype.getEventRegistration=function(e){return null},e}();e.SessionBase=t;var n=function(){function e(){}return e.setCustomSendRequestFunc=function(t){e.s_customSendRequestFunc=t},e.xhrSendRequestFunc=function(e){return c.createPromise((function(t,n){var i=new XMLHttpRequest;if(i.open(e.method,e.url),i.onload=function(){var e={statusCode:i.status,headers:c._parseHttpResponseHeaders(i.getAllResponseHeaders()),body:i.responseText};t(e)},i.onerror=function(){n(new o.RuntimeError({code:r.connectionFailure,httpStatusCode:i.status,message:c._getResourceString(a.connectionFailureWithStatus,i.statusText)}))},e.headers)for(var s in e.headers)i.setRequestHeader(s,e.headers[s]);i.send(c._getRequestBodyText(e))}))},e.fetchSendRequestFunc=function(e){var t=c._getRequestBodyText(e);return""===t&&(t=void 0),fetch(e.url,{method:e.method,headers:e.headers,body:t}).then((function(e){return e.text().then((function(t){var n=e.status,o={};return e.headers.forEach((function(e,t){o[t]=e})),{statusCode:n,headers:o,body:t}}))}))},e.sendRequest=function(t){e.validateAndNormalizeRequest(t);var n=e.s_customSendRequestFunc;return n||(n="undefined"!==typeof fetch?e.fetchSendRequestFunc:e.xhrSendRequestFunc),n(t)},e.setCustomSendLocalDocumentRequestFunc=function(t){e.s_customSendLocalDocumentRequestFunc=t},e.sendLocalDocumentRequest=function(t){return e.validateAndNormalizeRequest(t),(e.s_customSendLocalDocumentRequestFunc||e.officeJsSendLocalDocumentRequestFunc)(t)},e.officeJsSendLocalDocumentRequestFunc=function(e){e=c._validateLocalDocumentRequest(e);var t=c._buildRequestMessageSafeArray(e);return c.createPromise((function(e,n){OSF.DDA.RichApi.executeRichApiRequestAsync(t,(function(t){var n;n="succeeded"==t.status?{statusCode:l.getResponseStatusCode(t),headers:l.getResponseHeaders(t),body:l.getResponseBody(t)}:l.buildHttpResponseFromOfficeJsError(t.error.code,t.error.message),c.log("Response:"),c.log(JSON.stringify(n)),e(n)}))}))},e.validateAndNormalizeRequest=function(e){if(c.isNullOrUndefined(e))throw o.RuntimeError._createInvalidArgError({argumentName:"request"});c.isNullOrEmptyString(e.method)&&(e.method="GET"),e.method=e.method.toUpperCase();var t=!1;if("object"===typeof e.headers&&e.headers[s.testRequestNameHeader]&&(t=!0),!t){var n=u._getCurrentTestNameWithSequenceId();n&&(e.headers||(e.headers={}),e.headers[s.testRequestNameHeader]=n)}},e.logRequest=function(t){if(c._logEnabled){if(c.log("---HTTP Request---"),c.log(t.method+" "+t.url),t.headers)for(var n in t.headers)c.log(n+": "+t.headers[n]);e._logBodyEnabled&&c.log(c._getRequestBodyText(t))}},e.logResponse=function(t){if(c._logEnabled){if(c.log("---HTTP Response---"),c.log(""+t.statusCode),t.headers)for(var n in t.headers)c.log(n+": "+t.headers[n]);e._logBodyEnabled&&c.log(t.body)}},e._logBodyEnabled=!1,e}();e.HttpUtility=n;var o,i=function(){function e(e){var t=this;this.m_bridge=e,this.m_promiseResolver={},this.m_handlers=[],this.m_bridge.onMessageFromHost=function(e){var n=JSON.parse(e);if(3==n.type){var o=n.message;if(o&&o.entries)for(var i=0;i=0){var r=t.url.substr(i+1),a=c._parseRequestFlagsAndCustomDataFromQueryStringIfAny(r);a.flags>=0&&(n=a.flags)}"string"===typeof t.body&&(t.body=JSON.parse(t.body));var s={id:e.nextId(),type:1,flags:n,message:t};return o.sendMessageToHostAndExpectResponse(s).then((function(e){return e.message}))}));for(var i=0;i=0&&this.m_handlers.splice(t,1)},e.onInited=function(t){e.s_onInitedHandlers.push(t),e.s_instance&&t(e.s_instance)},e.prototype.dispatchMessage=function(e){if("number"===typeof e.id){var t=this.m_promiseResolver[e.id];if(t)return t(e),void delete this.m_promiseResolver[e.id]}for(var n=0;n0},e._getLocalDocumentUrlPrefixLength=function(e){for(var t=["http://document.localhost","https://document.localhost","//document.localhost"],n=e.toLowerCase().trim(),o=0;o0){var r=t.url.substr(i+1),a=e._parseRequestFlagsAndCustomDataFromQueryStringIfAny(r);a.flags>=0&&(n=a.flags),o=a.customData}}return l.buildRequestMessageSafeArray(o,n,t.method,t.url,t.headers,e._getRequestBodyText(t))},e._parseHttpResponseHeaders=function(t){var n={};if(!e.isNullOrEmptyString(t))for(var o=new RegExp("\r?\n"),i=t.split(o),r=0;r0){var l=a.substr(0,s),c=a.substr(s+1);l=e.trim(l),c=e.trim(c),n[l.toUpperCase()]=c}}}return n},e._parseErrorResponse=function(t){var n=e._parseErrorResponseBody(t),o=t.statusCode.toString();if(e.isNullOrUndefined(n)||"object"!==typeof n||!n.error)return e._createDefaultErrorResponse(o);var i=n.error,r=i.innerError;return r&&r.code?e._createErrorResponse(r.code,o,r.message):i.code?e._createErrorResponse(i.code,o,i.message):e._createDefaultErrorResponse(o)},e._parseErrorResponseBody=function(t){if(e.isPlainJsonObject(t.body))return t.body;if(!e.isNullOrEmptyString(t.body)){var n=e.trim(t.body);try{return JSON.parse(n)}catch(t){e.log("Error when parse "+n)}}},e._createDefaultErrorResponse=function(t){return{errorCode:r.connectionFailure,errorMessage:e._getResourceString(a.connectionFailureWithStatus,t)}},e._createErrorResponse=function(t,n,o){return{errorCode:t,errorMessage:e._getResourceString(a.connectionFailureWithDetails,[n,t,o])}},e._copyHeaders=function(e,t){if(e&&t)for(var n in e)t[n]=e[n]},e.addResourceStringValues=function(t){for(var n in t)e.s_resourceStringValues[n]=t[n]},e._logEnabled=!1,e.s_resourceStringValues={ApiNotFoundDetails:"The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",ConnectionFailureWithStatus:"The request failed with status code of {0}.",ConnectionFailureWithDetails:"The request failed with status code of {0}, error code {1} and the following error message: {2}",InvalidArgument:"The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",InvalidObjectPath:'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',InvalidRequestContext:"Cannot use the object across different request contexts.",Timeout:"The operation has timed out.",ValueNotLoaded:'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'},e}();e.CoreUtility=c;var u=function(){function e(){}return e.setMock=function(t){e.s_isMock=t},e.isMock=function(){return e.s_isMock},e._setCurrentTestName=function(t){e.s_currentTestName=t,e.s_currentTestSequenceId=0},e._getCurrentTestNameWithSequenceId=function(){return e.s_currentTestName?(e.s_currentTestSequenceId++,e.s_currentTestName+"."+e.s_currentTestSequenceId):null},e}();e.TestUtility=u,e._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!0,enableUndoableFlag:!0,appendTypeNameToObjectPathInfo:!1,enablePreviewExecution:!1},e.config={extendedErrorLogging:!1};var d=function(){function t(){}return t.createSetPropertyAction=function(t,n,o,i,r){C.validateObjectPath(n);var a={Id:t._nextId(),ActionType:4,Name:o,ObjectPathId:n._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[i],l=C.setMethodArguments(t,a.ArgumentInfo,s);C.validateReferencedObjectPaths(l);var c=new p(a,0,r);if(c.referencedObjectPath=n._objectPath,c.referencedArgumentObjectPaths=l,e._internalConfig.enablePreviewExecution&&0!==(16&r)){var u={Id:t._nextId(),ActionType:4,Name:o,ObjectId:"",ObjectType:"",Arguments:[i]};n._addPreviewExecutionAction(u)}return n._addAction(c)},t.createQueryAction=function(e,t,n,o){C.validateObjectPath(t);var i={Id:e._nextId(),ActionType:2,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},r=new p(i,1,4);return r.referencedObjectPath=t._objectPath,t._addAction(r,o)},t.createQueryAsJsonAction=function(e,t,n,o){C.validateObjectPath(t);var i={Id:e._nextId(),ActionType:7,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},r=new p(i,1,4);return r.referencedObjectPath=t._objectPath,t._addAction(r,o)},t.createUpdateAction=function(e,t,n){C.validateObjectPath(t);var o={Id:e._nextId(),ActionType:9,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},i=new p(o,0,0);return i.referencedObjectPath=t._objectPath,t._addAction(i)},t}();e.CommonActionFactory=d;var f=function(){function t(e,t){this.m_contextBase=e,this.m_objectPath=t}return Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_context",{get:function(){return this.m_contextBase},enumerable:!0,configurable:!0}),t.prototype._addAction=function(e,t){var n=this;return void 0===t&&(t=null),c.createPromise((function(o,i){n._context._addServiceApiAction(e,t,o,i)}))},t.prototype._addPreviewExecutionAction=function(e){},t.prototype._retrieve=function(t,n){var o=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;o||(o=!C.isSetSupported("RichApiRuntime","1.1"));var i=m._parseQueryOption(t);return o?d.createQueryAction(this._context,this,i,n):d.createQueryAsJsonAction(this._context,this,i,n)},t.prototype._recursivelyUpdate=function(t){var n=e._internalConfig.alwaysPolyfillClientObjectUpdateMethod;n||(n=!C.isSetSupported("RichApiRuntime","1.2"));try{var i=this[S.scalarPropertyNames];i||(i=[]);var s=this[S.scalarPropertyUpdateable];if(!s){s=[];for(var l=0;l=0){if(!s[g])throw new o.RuntimeError({code:r.invalidArgument,httpStatusCode:400,message:c._getResourceString(A.attemptingToSetReadOnlyProperty,m),debugInfo:{errorLocation:m}});f[m]=t[m],++h}else{if(!(u.indexOf(m)>=0))throw new o.RuntimeError({code:r.invalidArgument,httpStatusCode:400,message:c._getResourceString(A.propertyDoesNotExist,m),debugInfo:{errorLocation:m}});p[m]=t[m]}}if(h>0)if(n)for(l=0;l0)throw o.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});t.Top=s}else if("$skip"===a){if("number"!==typeof s||n.length>0)throw o.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});t.Skip=s}else if("boolean"===typeof s)s&&t.Select.push(e.combineQueryPath(n,a,"/"));else{if("object"!==typeof s)throw o.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});e.parseStrictLoadOptionHelper(t,e.combineQueryPath(n,a,"/"),e.combineQueryPath(i,a,"."),s)}}},e}();e.ClientRequestContextBase=m;var g=function(){function e(e){this.m_objectPath=e}return e.prototype._handleResult=function(e){c.isNullOrUndefined(e)?this.m_objectPath._updateAsNullObject():this.m_objectPath.updateUsingObjectData(e,null)},e}(),y=function(){function t(e){this.m_contextBase=e,this.m_actions=[],this.m_actionResultHandler={},this.m_referencedObjectPaths={},this.m_instantiatedObjectPaths={},this.m_preSyncPromises=[],this.m_previewExecutionActions=[]}return t.prototype.addAction=function(e){this.m_actions.push(e),1==e.actionInfo.ActionType&&(this.m_instantiatedObjectPaths[e.actionInfo.ObjectPathId]=e)},t.prototype.addPreviewExecutionAction=function(e){this.m_previewExecutionActions.push(e)},Object.defineProperty(t.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.ensureInstantiateObjectPath=function(e){if(e){if(this.m_instantiatedObjectPaths[e.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(e.parentObjectPath),this.ensureInstantiateObjectPaths(e.argumentObjectPaths),!this.m_instantiatedObjectPaths[e.objectPathInfo.Id]){var t={Id:this.m_contextBase._nextId(),ActionType:1,Name:"",ObjectPathId:e.objectPathInfo.Id},n=new p(t,1,4);n.referencedObjectPath=e,this.addReferencedObjectPath(e),this.addAction(n);var o=new g(e);this.addActionResultHandler(n,o)}}},t.prototype.ensureInstantiateObjectPaths=function(e){if(e)for(var t=0;t0&&(c.PreviewExecutionActions=this.m_previewExecutionActions,n|=4096),{body:c,flags:n}},t.prototype.processResponse=function(e){if(e)for(var t=0;t=0;t--){var n=this.m_actions[t].actionInfo;if(n.ObjectPathId===e&&3===n.ActionType&&n.Name===S.keepReference){this.m_actions.splice(t,1);break}}},t._updateLastUsedActionIdOfObjectPathId=function(e,n,o){for(;n;){if(e[n.objectPathInfo.Id])return;e[n.objectPathInfo.Id]=o;var i=n.argumentObjectPaths;if(i)for(var r=i.length,a=0;a=0;--i){var r=(f=e[i]).actionInfo.Id;f.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(n,f.referencedObjectPath,r);var a=f.referencedArgumentObjectPaths;if(a)for(var s=a.length,l=0;l0?f.actionInfo.L=p:f.actionInfo.L&&delete f.actionInfo.L}},t}();e.ClientRequestBase=y;var v=function(){function e(e){this.m_type=e}return Object.defineProperty(e.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new o.RuntimeError({code:r.valueNotLoaded,httpStatusCode:400,message:c._getResourceString(a.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),e.prototype._handleResult=function(e){this.m_isLoaded=!0,"object"===typeof e&&e&&e._IsNull||(1===this.m_type?this.m_value=C.adjustToDateTime(e):this.m_value=e)},e}();e.ClientResult=v;var O=function(){function e(e){this.m_context=e,this.m_actions=[]}return e.prototype.add=function(e,t,n,o){var i=this;this.m_actions.push({action:e,resultHandler:t,resolve:n,reject:o}),1===this.m_actions.length&&setTimeout((function(){return i.processActions()}),0)},e.prototype.processActions=function(){var e=this;if(0!==this.m_actions.length){var t=this.m_actions;this.m_actions=[];for(var n=new y(this.m_context),o=0;o=65&&e.charCodeAt(t)<=90;)t++;return t0?".":"")+n;break;case 3:n=t.normalizeName(e.objectPathInfo.Name)+"()"+(n.length>0?".":"")+n;break;case 4:n=t.normalizeName(e.objectPathInfo.Name)+(n.length>0?".":"")+n;break;case 5:n="getItem()"+(n.length>0?".":"")+n;break;case 6:n="_reference()"+(n.length>0?".":"")+n}e=e.parentObjectPath}return n},t.setMethodArguments=function(e,n,o){if(c.isNullOrUndefined(o))return null;var i=new Array,r=new Array,a=t.collectObjectPathInfos(e,o,i,r);return n.Arguments=o,a&&(n.ReferencedObjectPathIds=r),i},t.validateContext=function(e,t){if(e&&t&&t._context!==e)throw new o.RuntimeError({code:r.invalidRequestContext,httpStatusCode:400,message:c._getResourceString(a.invalidRequestContext)})},t.isSetSupported=function(e,n){return"function"===typeof t.isSetSupportedOverride?t.isSetSupportedOverride(e,n):!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)||window.Office.context.requirements.isSetSupported(e,n)},t.throwIfApiNotSupported=function(e,n,i,s){if(t._doApiNotSupportedCheck&&!t.isSetSupported(n,i)){var l=c._getResourceString(a.apiNotFoundDetails,[e,n+" "+i,s]);throw new o.RuntimeError({code:r.apiNotFound,httpStatusCode:404,message:l,debugInfo:{errorLocation:e}})}},t.calculateApiFlags=function(e,n,o){var i=window&&window.location&&window.location.href&&-1!==window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc");return("function"===typeof t.isSetSupportedOverride?t.isSetSupportedOverride(n,o):!i&&t.isSetSupported(n,o))||(e&=-3),e},t._parseSelectExpand=function(e){var t=[];if(!c.isNullOrEmptyString(e))for(var n=e.split(","),o=0;o0&&t.push(i)}return t;function r(e){var t=e.toLowerCase();if("items"===t||"items/"===t)return"*";return("items/"===t.substr(0,6)||"items."===t.substr(0,6))&&(e=e.substr(6)),e.replace(new RegExp("[/.]items[/.]","gi"),"/")}},t.changePropertyNameToCamelLowerCase=function(e){if(Array.isArray(e)){for(var n=[],o=0;o=0){var a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!0),s=a.processForDebugStatementInfo(n.Body.Error.ActionIndex);r={statement:s.statement,surroundingStatements:s.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},e.config.extendedErrorLogging&&(a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!1),r.fullStatements=a.process())}var l=null;if(n.Body.Results?l=n.Body.Results:n.Body.ProcessedResults&&n.Body.ProcessedResults.Results&&(l=n.Body.ProcessedResults.Results),l){this._processingResult=!0;try{t.processResponse(l)}finally{this._processingResult=!1}}}if(!Z.isNullOrEmptyString(n.ErrorCode))return new o.RuntimeError({code:n.ErrorCode,httpStatusCode:n.HttpStatusCode,message:n.ErrorMessage,traceMessages:i,data:{responseBody:n.RawErrorResponseBody}});if(n.Body&&n.Body.Error){var c={errorLocation:n.Body.Error.Location};return r&&(c.statement=r.statement,c.surroundingStatements=r.surroundingStatements,c.fullStatements=r.fullStatements),new o.RuntimeError({code:n.Body.Error.Code,httpStatusCode:n.Body.Error.HttpStatusCode,message:n.Body.Error.Message,traceMessages:i,debugInfo:c})}return null},i.prototype.processPendingEventHandlers=function(e){for(var t=Z._createPromiseFromResult(null),n=0;n0)if(i.isValidRequestInfo(n[0]))f=n[0],h=1;else if(Z.isPlainJsonObject(n[0])){if(null!=(f=(m=n[0]).session)&&!i.isValidRequestInfo(f))return i.createErrorPromise(t);p=m.previousObjects,h=1}if(n.length==h+1)d=n[h+0];else{if(null!=m||n.length!=h+2)return i.createErrorPromise(t);p=n[h+0],d=n[h+1]}if(null!=p)if(p instanceof k)u=function(){return p.context};else if(p instanceof i)u=function(){return p};else{if(!Array.isArray(p))return i.createErrorPromise(t);var g=p;if(0==g.length)return i.createErrorPromise(t);for(var y=0;y0&&h._onRunFinishedNotifiers.shift()();if(v)return m;throw m}))},i}(m);e.ClientRequestContext=j;var L=function(){function e(e,t){this.m_proxy=e,this.m_shouldPolyfill=t;var n=e[W.scalarPropertyNames],o=e[W.navigationPropertyNames],i=e[W.className],r=e[W.isCollection];if(n)for(var a=0;a=0;s--)if(i[s]===o[r].handler){i.splice(s,1);break}break;case 2:i=[]}return a&&(!this.m_registered&&i.length>0?n=n.then((function(){return t.m_eventInfo.registerFunc(t.m_callback)})).then((function(){return t.m_registered=!0})):this.m_registered&&0==i.length&&(n=n.then((function(){return t.m_eventInfo.unregisterFunc(t.m_callback)})).catch((function(e){c.log("Error when unregister event: "+JSON.stringify(e))})).then((function(){return t.m_registered=!1}))),n=n.then((function(){return t.m_handlers=i}))),n},e.prototype.fireEvent=function(e){for(var t=[],n=0;n0},e.prototype.register=function(e,t,n){if(!n)throw o.RuntimeError._createInvalidArgError({argumentName:"handler"});var i=this.getHandlers(e,t);return i.push(n),1===i.length?this.m_registerEventImpl(e,t):Z._createPromiseFromResult(null)},e.prototype.unregister=function(e,t,n){if(!n)throw o.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var i=this.getHandlers(e,t),r=i.length-1;r>=0;r--)if(i[r]===n){i.splice(r,1);break}return 0===i.length?this.m_unregisterEventImpl(e,t):Z._createPromiseFromResult(null)},e}();e.EventRegistration=q;var G=function(){function e(){this.m_eventRegistration=new q(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this)),this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return e.prototype.ready=function(){var t=this;return this.m_ready||(e._testReadyImpl?this.m_ready=e._testReadyImpl().then((function(){t.m_isReady=!0})):i.instance?this.m_ready=Z._createPromiseFromResult(null).then((function(){t.m_isReady=!0})):this.m_ready=o.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then((function(){t.m_isReady=!0}))),this.m_ready},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t,n){var o=this;return this.ready().then((function(){return o.m_eventRegistration.register(e,t,n)}))},e.prototype.unregister=function(e,t,n){var o=this;return this.ready().then((function(){return o.m_eventRegistration.unregister(e,t,n)}))},e.prototype._registerEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._unregisterEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._handleRichApiMessage=function(e){if(e&&e.entries)for(var t=0;t=0;i--)if(o[i]===e){o.splice(i,1);break}0==o.length&&G.getGenericEventRegistration(n).unregister(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)}))},t.prototype.removeAll=function(){},t}(B);e.GenericEventHandlers=z;var J=function(){function e(e){this.m_clientObject=e}return e.prototype._handleResult=function(e){this.m_clientObject._handleIdResult(e)},e}(),K=function(){function e(){}return e.createGlobalObjectObjectPath=function(e){var t={Id:e._nextId(),ObjectPathType:1,Name:""};return new h(t,null,!1,!1,1,4)},e.createNewObjectObjectPath=function(e,t,n,o){var i={Id:e._nextId(),ObjectPathType:2,Name:t};return new h(i,null,n,!1,1,Z._fixupApiFlags(o))},e.createPropertyObjectPath=function(e,t,n,o,i,r){var a={Id:e._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id};return new h(a,t._objectPath,o,i,1,Z._fixupApiFlags(r))},e.createIndexerObjectPath=function(e,t,n){var o={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=n,new h(o,t._objectPath,!1,!1,1,4)},e.createIndexerObjectPathUsingParentPath=function(e,t,n){var o={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=n,new h(o,t,!1,!1,1,4)},e.createMethodObjectPath=function(e,t,n,o,i,r,a,s,l){var c={Id:e._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u=Z.setMethodArguments(e,c.ArgumentInfo,i),d=new h(c,t._objectPath,r,a,o,Z._fixupApiFlags(l));return d.argumentObjectPaths=u,d.getByIdMethodName=s,d},e.createReferenceIdObjectPath=function(e,t){var n={Id:e._nextId(),ObjectPathType:6,Name:t,ArgumentInfo:{}};return new h(n,null,!1,!1,1,4)},e.createChildItemObjectPathUsingIndexerOrGetItemAt=function(t,n,o,i,r){var a=Z.tryGetObjectIdFromLoadOrRetrieveResult(i);return t&&!Z.isNullOrUndefined(a)?e.createChildItemObjectPathUsingIndexer(n,o,i):e.createChildItemObjectPathUsingGetItemAt(n,o,i,r)},e.createChildItemObjectPathUsingIndexer=function(e,t,n){var o=Z.tryGetObjectIdFromLoadOrRetrieveResult(n),i=i={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return i.ArgumentInfo.Arguments=[o],new h(i,t._objectPath,!1,!1,1,4)},e.createChildItemObjectPathUsingGetItemAt=function(e,t,n,o){var i=n[W.index];i&&(o=i);var r={Id:e._nextId(),ObjectPathType:3,Name:W.getItemAt,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=[o],new h(r,t._objectPath,!1,!1,1,4)},e}();e.ObjectPathFactory=K;var Q=function(){function t(e){this.m_context=e}return t.prototype.executeAsync=function(n,o,i){var r=this,a=l.buildMessageArrayForIRequestExecutor(n,o,i,t.SourceLibHeaderValue);return new e.Promise((function(e,t){OSF.DDA.RichApi.executeRichApiRequestAsync(a,(function(t){var n;c.log("Response:"),c.log(JSON.stringify(t)),"succeeded"==t.status?n=l.buildResponseOnSuccess(l.getResponseBody(t),l.getResponseHeaders(t)):(n=l.buildResponseOnError(t.error.code,t.error.message),r.m_context._processOfficeJsErrorResponse(t.error.code,n)),e(n)}))}))},t.SourceLibHeaderValue="officejs",t}(),X=function(){function e(e){this._autoCleanupList={},this.m_context=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._addCommon(e,!0)})):this._addCommon(e,!0)},e.prototype._autoAdd=function(e){this._addCommon(e,!1),this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e},e.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(e,t){this.m_context._autoCleanup&&!e[W.isTracked]&&e!==this.m_context._rootObject&&t&&!Z.isNullOrEmptyString(t[W.referenceId])&&(this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e,e[W.isTracked]=!0)},e.prototype._addCommon=function(e,t){if(e[W.isTracked])t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id];else{var n=e[W.referenceId];if(e._objectPath.objectPathInfo[W.objectPathInfoDoNotKeepReferenceFieldName])throw Z.createRuntimeError(r.generalException,c._getResourceString($.objectIsUntracked),null);Z.isNullOrEmptyString(n)&&e._KeepReference&&(e._KeepReference(),T.createInstantiateAction(this.m_context,e),t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id],e[W.isTracked]=!0)}},e.prototype.remove=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._removeCommon(e)})):this._removeCommon(e)},e.prototype._removeCommon=function(e){e._objectPath.objectPathInfo[W.objectPathInfoDoNotKeepReferenceFieldName]=!0,e.context._pendingRequest._removeKeepReferenceAction(e._objectPath.objectPathInfo.Id);var t=e[W.referenceId];if(!Z.isNullOrEmptyString(t)){var n=this.m_context._rootObject;n._RemoveReference&&n._RemoveReference(t)}delete e[W.isTracked]},e.prototype._retrieveAndClearAutoCleanupList=function(){var e=this._autoCleanupList;return this._autoCleanupList={},e},e}();e.TrackedObjects=X;var Y=function(){function t(e,t,n,o,i){e||(e="root"),this.m_globalObjName=e,this.m_referencedObjectPaths=t,this.m_actions=n,this.m_statements=[],this.m_variableNameForObjectPathMap={},this.m_variableNameToObjectPathMap={},this.m_declaredObjectPathMap={},this.m_showDispose=o,this.m_removePII=i}return t.prototype.process=function(){this.m_showDispose&&H._calculateLastUsedObjectPathIds(this.m_actions);for(var e=0;e=0&&this.m_statements.length>t+5+1));n++);if(t<0)return null;var o=t-5;o<0&&(o=0);var i=t+1+5;i>this.m_statements.length&&(i=this.m_statements.length);var r=[];0!=o&&r.push("...");for(var a=o;a>>>>"),r.push(this.m_statements[t]),r.push("// <<<<<");for(var s=t+1;s0)return e+" // And then dispose {"+o.map((function(e){return n.getObjVarName(e)})).join(", ")+"}"}return e},t.prototype.buildQueryExpression=function(e){if(e.actionInfo.QueryInfo){var t={};return t.select=e.actionInfo.QueryInfo.Select,t.expand=e.actionInfo.QueryInfo.Expand,t.skip=e.actionInfo.QueryInfo.Skip,t.top=e.actionInfo.QueryInfo.Top,"undefined"===typeof t.top&&"undefined"===typeof t.skip&&"undefined"===typeof t.expand?"undefined"===typeof t.select?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(e){return(5==e.objectPathInfo.ObjectPathType||3==e.objectPathInfo.ObjectPathType||4==e.objectPathInfo.ObjectPathType)&&e.objectPathInfo.ParentObjectPathId?this.getObjVarName(e.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(e):this.buildObjectPathExpression(e)},t.prototype.buildObjectPathExpression=function(e){var t=this.buildObjectPathInfoExpression(e.objectPathInfo),n=e.originalObjectPathInfo;return n&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(n)+" */"),t},t.prototype.buildObjectPathInfoExpression=function(e){switch(e.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 3:return Z._toCamelLowerCase(e.Name)+"("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 2:return e.Name+".newObject()";case 7:return"null";case 4:return Z._toCamelLowerCase(e.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(e.Name)+")"}},t.prototype.buildArgumentsExpression=function(e){var t="";if(!e.Arguments||0===e.Arguments.length)return t;if(this.m_removePII)return"undefined"===typeof e.Arguments[0]?t:"...";for(var n=0;n0&&(t+=", "),t+=this.buildArgumentLiteral(e.Arguments[n],e.ReferencedObjectPathIds?e.ReferencedObjectPathIds[n]:null);return"undefined"===t&&(t=""),t},t.prototype.buildArgumentLiteral=function(e,t){return"number"==typeof e&&e===t?this.getObjVarName(t):JSON.stringify(e)},t.prototype.getObjVarNameBase=function(e){var t="v",n=this.m_referencedObjectPaths[e];if(n)switch(n.objectPathInfo.ObjectPathType){case 1:t=this.m_globalObjName;break;case 4:t=Z._toCamelLowerCase(n.objectPathInfo.Name);break;case 3:var o=n.objectPathInfo.Name;o.length>3&&"Get"===o.substr(0,3)&&(o=o.substr(3)),t=Z._toCamelLowerCase(o);break;case 5:var i=this.getObjVarNameBase(n.objectPathInfo.ParentObjectPathId);t="s"===i.charAt(i.length-1)?i.substr(0,i.length-1):i+"Item"}return t},t.prototype.getObjVarName=function(e){if(this.m_variableNameForObjectPathMap[e])return this.m_variableNameForObjectPathMap[e];var t=this.getObjVarNameBase(e);if(!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t;for(var n=1;this.m_variableNameToObjectPathMap[t+n.toString()];)n++;return t+=n.toString(),this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t},t}(),$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.cannotRegisterEvent="CannotRegisterEvent",t.connectionFailureWithStatus="ConnectionFailureWithStatus",t.connectionFailureWithDetails="ConnectionFailureWithDetails",t.propertyNotLoaded="PropertyNotLoaded",t.runMustReturnPromise="RunMustReturnPromise",t.moreInfoInnerError="MoreInfoInnerError",t.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",t.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",t.objectIsUntracked="ObjectIsUntracked",t.customFunctionDefintionMissing="CustomFunctionDefintionMissing",t.customFunctionImplementationMissing="CustomFunctionImplementationMissing",t.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",t.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",t.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",t.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",t.customFunctionInvalidFunction="CustomFunctionInvalidFunction",t.customFunctionInvalidFunctionMapping="CustomFunctionInvalidFunctionMapping",t.customFunctionWindowMissing="CustomFunctionWindowMissing",t.customFunctionDefintionMissingOnWindow="CustomFunctionDefintionMissingOnWindow",t.pendingBatchInProgress="PendingBatchInProgress",t.notInsideBatch="NotInsideBatch",t.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",t}(A);e.ResourceStrings=$,c.addResourceStringValues({CannotRegisterEvent:"The event handler cannot be registered.",PropertyNotLoaded:"The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",RunMustReturnPromise:'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',InvalidOrTimedOutSessionMessage:"Your Office Online session has expired or is invalid. To continue, refresh the page.",InvalidOperationInCellEditMode:"Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",InvalidSheetName:"The request cannot be processed because the specified worksheet cannot be found. Please try again.",CustomFunctionDefintionMissing:"A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.",CustomFunctionDefintionMissingOnWindow:"A property with the name '{0}' that represents the function's definition must exist on the window object.",CustomFunctionImplementationMissing:"The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",CustomFunctionNameContainsBadChars:"The function name may only contain letters, digits, underscores, and periods.",CustomFunctionNameCannotSplit:"The function name must contain a non-empty namespace and a non-empty short name.",CustomFunctionUnexpectedNumberOfEntriesInResultBatch:"The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",CustomFunctionCancellationHandlerMissing:"The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",CustomFunctionInvalidFunction:"The property with the name '{0}' that represents the function's definition is not a valid function.",CustomFunctionInvalidFunctionMapping:"The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.",CustomFunctionWindowMissing:"The window object was not found.",PendingBatchInProgress:"There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",NotInsideBatch:"Operations may not be invoked outside of a batch method.",CannotUpdateReadOnlyProperty:"The property '{0}' is read-only and it cannot be updated.",ObjectIsUntracked:"The object is untracked."});var Z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.fixObjectPathIfNecessary=function(e,t){e&&e._objectPath&&t&&e._objectPath.updateUsingObjectData(t,e)},n.load=function(e,t){return e.context.load(e,t),e},n.loadAndSync=function(e,t){return e.context.load(e,t),e.context.sync().then((function(){return e}))},n.retrieve=function(t,o){var i=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;i||(i=!n.isSetSupported("RichApiRuntime","1.1"));var r=new L(t,i);return t._retrieve(o,r),r},n.retrieveAndSync=function(e,t){var o=n.retrieve(e,t);return e.context.sync().then((function(){return o}))},n.toJson=function(e,t,o,i){var r={};for(var a in t){"undefined"!==typeof(s=t[a])&&(r[a]=s)}for(var a in o){var s;"undefined"!==typeof(s=o[a])&&(s[n.fieldName_isCollection]&&"undefined"!==typeof s[n.fieldName_m__items]?r[a]=s.toJSON().items:r[a]=s.toJSON())}return i&&(r.items=i.map((function(e){return e.toJSON()}))),r},n.throwError=function(e,t,n){throw new o.RuntimeError({code:e,httpStatusCode:400,message:c._getResourceString(e,t),debugInfo:n?{errorLocation:n}:void 0})},n.createRuntimeError=function(e,t,n,i,r){return new o.RuntimeError({code:e,httpStatusCode:i,message:t,debugInfo:{errorLocation:n},data:r})},n.throwIfNotLoaded=function(e,t,o,i){if(!i&&c.isUndefined(t)&&e.charCodeAt(0)!=n.s_underscoreCharCode&&!n.s_suppressPropertyNotLoadedException)throw n.createPropertyNotLoadedException(o,e)},n._getPropertyValueWithoutCheckLoaded=function(e,t){n.s_suppressPropertyNotLoadedException=!0;try{return e[t]}finally{n.s_suppressPropertyNotLoadedException=!1}},n.createPropertyNotLoadedException=function(e,t){return new o.RuntimeError({code:M.propertyNotLoaded,httpStatusCode:400,message:c._getResourceString($.propertyNotLoaded,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.createCannotUpdateReadOnlyPropertyException=function(e,t){return new o.RuntimeError({code:M.cannotUpdateReadOnlyProperty,httpStatusCode:400,message:c._getResourceString($.cannotUpdateReadOnlyProperty,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.promisify=function(t){return new e.Promise((function(e,n){t((function(t){"failed"==t.status?n(t.error):e(t.value)}))}))},n._addActionResultHandler=function(e,t,n){e.context._pendingRequest.addActionResultHandler(t,n)},n._handleNavigationPropertyResults=function(e,t,n){for(var o=0;o0;)e.push(0),n--},t.prototype.getString=function(e){return"number"===typeof e?e>0?this.m_strings[e-1]:null:e},t.prototype.buildEnumType=function(e){var t;if(Array.isArray(e)){(t={name:e[0],fields:e[2]}).fields||(t.fields={});var n=e[1];if(Array.isArray(n))for(var o=0;on)return!1;return!0},t.prototype.evaluateEventType=function(t){if(Z.isNullOrEmptyString(t))return 0;if(this.isAllDigits(t))return parseInt(t);var n=this.resolveObjectByFullName(t);if("number"!==typeof n)throw new e.Error("Invalid event type: "+t);return n},t.prototype.buildPrototype=function(e,t){this.buildScalarProperties(e,t),this.buildNavigationProperties(e,t),this.buildScalarMethods(e,t),this.buildNavigationMethods(e,t),this.buildEvents(e,t),this.buildHandleResult(e,t),this.buildHandleIdResult(e,t),this.buildHandleRetrieveResult(e,t),this.buildLoad(e,t),this.buildRetrieve(e,t),this.buildSetMockData(e,t),this.buildEnsureUnchanged(e,t),this.buildUpdate(e,t),this.buildSet(e,t),this.buildToJSON(e,t),this.buildItems(e,t),this.buildTypeMetadataInfo(e,t),this.buildTrackUntrack(e,t),this.buildMixin(e,t)},t.prototype.toSimpleCamelUpperCase=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)},t.prototype.ensureOriginalName=function(e){null===e.originalName&&(e.originalName=this.toSimpleCamelUpperCase(e.name))},t.prototype.getFieldName=function(e){return"m_"+e.name},t.prototype.throwIfApiNotSupported=function(e,t){if(this.m_apiSets&&t.apiSetInfoOrdinal>0){var n=this.m_apiSets[t.apiSetInfoOrdinal-1];n&&Z.throwIfApiNotSupported(e.name+"."+t.name,n.name,n.version,this.m_hostName)}},t.prototype.buildScalarProperties=function(e,t){if(Array.isArray(t.scalarProperties))for(var n=0;n0){var n=this.m_apiSets[t-1];n&&(e=C.calculateApiFlags(e,n.name,n.version))}return e},t.prototype.buildScalarProperty=function(e,n,o){this.ensureOriginalName(o);var i=this,r=this.getFieldName(o),a={get:function(){return Z.throwIfNotLoaded(o.name,this[r],n.name,this._isNull),i.throwIfApiNotSupported(n,o),this[r]},enumerable:!0,configurable:!0};0===(2&o.behaviorFlags)&&(a.set=function(e){if(4&o.behaviorFlags&&i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+o.originalName+"_Set").call(this,this,e).handled)return;this[r]=e;var a=i.calculateApiFlags(o.setMethodApiFlags,o.undoableApiSetInfoOrdinal);ee.invokeSetProperty(this,o.originalName,e,a)}),Object.defineProperty(e.prototype,o.name,a)},t.prototype.buildNavigationProperties=function(e,t){if(Array.isArray(t.navigationProperties))for(var n=0;n0){for(var r=0;r0){for(var r=0;r0&&(Object.defineProperty(e.prototype,"_scalarPropertyNames",{get:function(){return this.m__scalarPropertyNames||(this.m__scalarPropertyNames=t.scalarProperties.map((function(e){return e.name}))),this.m__scalarPropertyNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyOriginalNames",{get:function(){return this.m__scalarPropertyOriginalNames||(this.m__scalarPropertyOriginalNames=t.scalarProperties.map((function(e){return e.originalName}))),this.m__scalarPropertyOriginalNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyUpdateable",{get:function(){return this.m__scalarPropertyUpdateable||(this.m__scalarPropertyUpdateable=t.scalarProperties.map((function(e){return 0===(2&e.behaviorFlags)}))),this.m__scalarPropertyUpdateable},enumerable:!0,configurable:!0})),t.navigationProperties&&t.navigationProperties.length>0&&Object.defineProperty(e.prototype,"_navigationPropertyNames",{get:function(){return this.m__navigationPropertyNames||(this.m__navigationPropertyNames=t.navigationProperties.map((function(e){return e.name}))),this.m__navigationPropertyNames},enumerable:!0,configurable:!0})},t.prototype.buildTrackUntrack=function(e,t){2&t.behaviorFlags&&(e.prototype.track=function(){return this.context.trackedObjects.add(this),this},e.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this})},t.prototype.buildMixin=function(e,t){if(4&t.behaviorFlags){var n=this.getFunction(t.name+"Custom");Z.applyMixin(e,n)}},t.prototype.getOnEventName=function(e){return"_"===e[0]?"_on"+e.substr(1):"on"+e},t.prototype.buildEvents=function(e,t){if(t.events)for(var n=0;n0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)&&(n=!0);var o=document.createElement("a");if(o.href=this.m_url,this.m_options.webApplication){var i=ae.embeddingPageOrigin+"="+e+"&"+ae.embeddingPageSessionInfo+"="+this.m_options.sessionKey;0===o.search.length||"?"===o.search?o.search="?"+ae.sessionContext+"="+encodeURIComponent(i):o.search=o.search+"&"+ae.sessionContext+"="+encodeURIComponent(i)}else n?0===o.hash.length||"#"===o.hash?o.hash="#"+t:o.hash=o.hash+"&"+t:0===o.search.length||"?"===o.search?o.search="?"+t:o.search=o.search+"&"+t;return o.href},t.prototype.init=function(){var e=this;window.addEventListener("message",this.m_onMessageHandler);var t=this._getIFrameSrc();return c.createPromise((function(n,o){var i=document.createElement("iframe");if(e.m_options.id&&(i.id=e.m_options.id,i.name=e.m_options.id),i.style.height=e.m_options.height,i.style.width=e.m_options.width,e.m_options.webApplication){var s=document.createElement("form");s.setAttribute("action",t),s.setAttribute("method","post"),s.setAttribute("target",i.name),e.m_options.container.appendChild(s);var l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name","access_token"),l.setAttribute("value",e.m_options.webApplication.accessToken),s.appendChild(l);var u=document.createElement("input");u.setAttribute("type","hidden"),u.setAttribute("name","access_token_ttl"),u.setAttribute("value",e.m_options.webApplication.accessTokenTtl),s.appendChild(u),e.m_options.container.appendChild(i),s.submit()}else i.src=t,e.m_options.container.appendChild(i);e.m_timeoutId=window.setTimeout((function(){e.close();var t=Z.createRuntimeError(r.timeout,c._getResourceString(a.timeout),"EmbeddedSession.init");o(t)}),e.m_options.timeoutInMilliseconds),e.m_promiseResolver=n}))},t.prototype._invoke=function(e,t,n){this.m_enabled?(ie&&(n=ie(n)),this._sendMessageWithCallback(this.m_id++,e,n,(function(e){re&&(e=re(e));var n=e.Error;delete e.Error,t(n||0,e)}))):t(5001,null)},t.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler),window.clearTimeout(this.m_timeoutId),this.m_enabled=!1},t.prototype.getEventRegistration=function(e){return this.m_sessionEventManager||(this.m_sessionEventManager=new q(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},t.prototype._createRequestExecutorOrNull=function(){return new le(this)},t.prototype._resolveRequestUrlAndHeaderInfo=function(){return c._createPromiseFromResult(null)},t.prototype._registerEventImpl=function(e,t){var n=this;return c.createPromise((function(o,i){n._sendMessageWithCallback(n.m_id++,ne.RegisterEventCommand,{EventId:e,TargetId:t},(function(){o(null)}))}))},t.prototype._unregisterEventImpl=function(e,t){var n=this;return c.createPromise((function(o,i){n._sendMessageWithCallback(n.m_id++,ne.UnregisterEventCommand,{EventId:e,TargetId:t},(function(){o()}))}))},t.prototype._onMessage=function(e){var t=this;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===e.source&&this.m_chosenOrigin===e.origin)){var n=e.data;if(n&&n[ne.CommandKey]===ne.ApiReadyCommand)!this.m_chosenWindow&&this._isValidDescendant(e.source)&&n[ne.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=e.source,this.m_chosenOrigin=e.origin,this._sendMessageWithCallback(this.m_id++,ne.GetAppContextCommand,null,(function(e){t._setupContext(e),window.clearTimeout(t.m_timeoutId),t.m_promiseResolver()})));else if(n&&n[ne.CommandKey]===ne.FireEventCommand){var o=n[ne.ParamsKey],i=o.EventId,r=o.TargetId,a=o.Data;if(this.m_sessionEventManager)for(var s=this.m_sessionEventManager.getHandlers(i,r),l=0;l0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]=2){var s=t[n].message[1];s&&(o=a(s)?JSON.parse(s):s)}"undefined"!==typeof OSF&&OSF.AppTelemetry&&OSF.AppTelemetry.CallOnAppActivatedIfPending&&OSF.AppTelemetry.CallOnAppActivatedIfPending(),r.apply(null,[o])}else OfficeExtension.Utility.log("ActionProxy._handleMessage unknown message type "+t[n].messageType)}catch(e){throw function(e){var t=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t}(e);OfficeExtension.Utility.log(t)}(e),e}return OfficeExtension.Utility._createPromiseFromResult(null)}function a(e){return"string"===typeof e&&"{"===e[0]}function s(){try{Microsoft.Office.WebExtension.onReadyInternal().then((function(){return function(){if("undefined"!==typeof OSF&&OSF.DDA&&OSF.DDA.RichApi&&OSF.DDA.RichApi.richApiMessageManager)return(new OfficeExtension.ClientRequestContext).eventRegistration.register(5,"",r)}()})).then((function(){var e=OSF._OfficeAppFactory.getHostInfo();return!0===e.isDialog||"web"===e.hostPlatform&&"word"!==e.hostType&&"excel"!==e.hostType?void 0:function(){var e=new OfficeExtension.ClientRequestContext,t=OfficeCore.AddinInternalService.newObject(e);return e._customData="WacPartition",t.notifyActionHandlerReady(),e.sync()}()}))}catch(e){}}!function(){OfficeExtension.Utility.log("ActionProxy.initOnce"),"undefined"!=typeof e.actions&&function(e){n=e}(e.actions._association),"undefined"!==typeof document&&(document.readyState&&"loading"!==document.readyState?(OfficeExtension.Utility.log("ActionProxy.initOnce: document.readyState is not loading state"),s()):document.addEventListener&&document.addEventListener("DOMContentLoaded",(function(){OfficeExtension.Utility.log("ActionProxy.initOnce: DOMContentLoaded event triggered"),s()}))),OfficeExtension.HostBridge.onInited((function(e){!function(e){e.addHostMessageHandler((function(e){3===e.type&&r(e.message)}))}(e)}))}()}(t||(t={}))}(Office||(Office={})),function(e){!function(e){function t(){var e=new OfficeCore.RequestContext;return"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e._customData="WacPartition"),e}e.areShortcutsInUse=function(e){return __awaiter(this,void 0,void 0,(function(){var n,o,i,r,a;return __generator(this,(function(s){switch(s.label){case 0:return n=t(),o=OfficeCore.ActionService.newObject(n),i=o.areShortcutsInUse(e),[4,n.sync()];case 1:for(s.sent(),r=[],a=0;a0&&Array.isArray(n[0])&&n.length*n[0].length>1500&&d()){var i=Math.max(1,Math.round(1500/n[0].length));e._ValidateArraySize(n.length,n[0].length);for(var r=0;rn.length&&(a=n.length-r);var s=e.getRow(r).untrack().getBoundingRect(e.getRow(r+a-1).untrack()).untrack(),l=n.slice(r,r+a);F(s,t,l,null!=o?o:0)}return!0}return!1}function u(e){return OfficeExtension.Utility.isSetSupported("ExcelApi",e.toString())}function d(){return u(1.3)}function f(e){return!("undefined"===typeof window||!window.Office||!window.Office.context)&&window.Office.context.platform===e}e.icons={},["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"].map((function(t,n){var o=i(t);e.icons[o]=[],l[n].map((function(n,r){n=i(n);var a={set:t,index:r};e.icons[o].push(a),e.icons[o][n]=a}))})),function(e){e.NotStarted="notStarted",e.Running="running",e.Succeeded="succeeded",e.Failed="failed"}(r||(r={})),function(e){e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NoContent=204]="NoContent",e[e.HighestSuccessCode=299]="HighestSuccessCode",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout"}(a||(a={})),function(e){e.Close="Session.close",e.CommitChanges="Session.commitChanges",e.Create="Session.resolveRequestUrlAndHeaderInfo",e.Refresh="Session.refreshSession"}(s=e.SessionOperation||(e.SessionOperation={}));var p=function(){function e(e,t,n){var o=void 0===n?{}:n,i=o.persistChanges,r=void 0===i||i,a=o.commitExplicitly,s=void 0===a||a;this.m_requestId="",this.m_workbookUrl=e?this.ensureUrlFormatEndWithSlash(e):"",this.m_requestHeaders=t||{},this.m_persistChanges=r,this.m_commitExplicitly=s}return Object.defineProperty(e.prototype,"requestId",{get:function(){return this.m_requestId},enumerable:!0,configurable:!0}),e.prototype.close=function(){var t=this;if(this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)){var n={method:"POST",url:this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url)+e.CLOSE_SESSION,headers:this.m_requestUrlAndHeaderInfo.headers,body:""};return OfficeExtension.HttpUtility.sendRequest(n).then((function(n){if(n.statusCode!==a.NoContent)throw t.createErrorFromResponseInfo(n,s.Close);for(var o in t.m_requestUrlAndHeaderInfo=null,t.m_requestHeaders)if(o.toLowerCase()===e.WorkbookSessionIdHeaderNameLower){delete t.m_requestHeaders[o];break}}))}return OfficeExtension.Utility._createPromiseFromResult(null)},e.prototype.commitChanges=function(t){var n=this;if(void 0===t&&(t={}),!this.m_commitExplicitly)throw this.createError(a.InternalServerError,"Can not call commitChanges() if commitExplicitly is not set.",s.CommitChanges);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.CommitChanges);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.CommitChanges);var o=this.createCommitChangesRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(o).then((function(o){var i=o.statusCode;if(i===a.Accepted)return n.delay(e.POLL_DELAY).then((function(i){return n.pollResourceLocation(n.getHeaderIgnoreCase(o.headers,e.LOCATION_HEADER),s.CommitChanges,t)})).then((function(e){if(JSON.parse(e.body).status===r.Failed)throw n.createErrorFromResponseInfo(e,s.CommitChanges);return n.parseCooldownTime(e)}));if(i>=a.OK&&i<=a.HighestSuccessCode)return n.parseCooldownTime(o);throw n.createErrorFromResponseInfo(o,s.CommitChanges)}))},e.prototype._resolveRequestUrlAndHeaderInfo=function(t){var n=this;if(void 0===t&&(t={}),this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(this.getHeaderIgnoreCase(this.m_requestHeaders,e.WorkbookSessionIdHeaderNameLower))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);var o=this.createAsyncGraphSessionRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(o).then((function(o){if(n.m_requestId=n.getHeaderIgnoreCase(o.headers,e.REQUEST_ID_HEADER),o.statusCode!==a.Accepted&&o.statusCode!==a.Created)throw n.createErrorFromResponseInfo(o,s.Create);return o.statusCode===a.Created?(n.formatRequestUrlAndHeaderInfo(o),n.m_requestUrlAndHeaderInfo):n.delay(e.POLL_DELAY).then((function(i){return n.pollResourceLocation(n.getHeaderIgnoreCase(o.headers,e.LOCATION_HEADER),s.Create,t)})).then((function(o){var i=JSON.parse(o.body);if(i.status===r.Failed)throw n.createErrorFromResponseInfo(o,s.Create);var a={method:"GET",url:i.resourceLocation,headers:__assign({},t,{Authorization:n.getHeaderIgnoreCase(n.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(a).then((function(e){return n.formatRequestUrlAndHeaderInfo(e),n.m_requestUrlAndHeaderInfo}))}))}))},e.prototype.refreshSession=function(){var e=this;if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.Refresh);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.Refresh);var t=this.createRefreshSessionRequestInfo();return OfficeExtension.HttpUtility.sendRequest(t).then((function(t){if(t.statusCode!=a.NoContent)throw e.createErrorFromResponseInfo(t,s.Refresh);return OfficeExtension.Utility._createPromiseFromResult(null)}))},e.prototype.getHeaderIgnoreCase=function(e,t){var n=Object.keys(e).filter((function(e){return e.toLowerCase()===t.toLowerCase()}));return n.length>0?e[n[0]]:void 0},e.prototype.createCommitChangesRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.COMMIT_CHANGES,o={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,o),OfficeExtension.Utility._copyHeaders(t,o),o[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:o,body:{}}},e.prototype.createAsyncGraphSessionRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.CREATE_SESSION,o={};return OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,o),OfficeExtension.Utility._copyHeaders(t,o),o[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,o[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:o,body:{persistChanges:this.m_persistChanges,commitExplicitly:this.m_commitExplicitly}}},e.prototype.createRefreshSessionRequestInfo=function(){var t=this.getCorrectGraphVersionUrl()+e.REFRESH_SESSION,n={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,n),n[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,{url:t,method:"POST",headers:n,body:{}}},e.prototype.getCorrectGraphVersionUrl=function(){return this.m_workbookUrl.replace(new RegExp("graph.microsoft.com/.*?/"),"graph.microsoft.com/"+e.ASYNC_API_GRAPH_VERSION+"/")},e.prototype.pollResourceLocation=function(t,n,o,i){var s=this;if(void 0===o&&(o={}),void 0===i&&(i=0),i>=e.MAX_POLL_ATTEMPTS)throw this.createError(a.InternalServerError,"Timout while polling for the resource location.",n);var l={method:"GET",url:t,headers:__assign({},o,{Authorization:this.getHeaderIgnoreCase(this.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(l).then((function(l){if(l.statusCode!==a.OK)return s.pollResourceLocation(t,n,o,i+1);switch(JSON.parse(l.body).status){case r.Succeeded:case r.Failed:return l;case r.NotStarted:case r.Running:return s.delay(e.POLL_DELAY).then((function(e){return s.pollResourceLocation(t,n,o,i+1)}));default:throw s.createErrorFromResponseInfo(l,n)}}))},e.prototype.parseCooldownTime=function(t){var n=this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER);return n?1e3*parseInt(n):e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER},e.prototype.formatRequestUrlAndHeaderInfo=function(t){if(t.statusCode!==a.OK&&t.statusCode!==a.Created)throw this.createErrorFromResponseInfo(t,s.Create);var n=JSON.parse(t.body).id,o={};OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,o),o[e.WorkbookSessionIdHeaderName]=n,this.m_requestUrlAndHeaderInfo={url:this.getCorrectGraphVersionUrl(),headers:o}},e.prototype.ensureUrlFormatEndWithSlash=function(e){return"/"!==e.charAt(e.length-1)&&(e+="/"),e},e.prototype.delay=function(e){return new OfficeExtension.CoreUtility.Promise((function(t,n){return setTimeout((function(){return t()}),e)}))},e.prototype.createErrorFromResponseInfo=function(t,n){var o=OfficeExtension.Utility._parseErrorResponse(t),i={retryAfter:this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER),responseBody:OfficeExtension.Utility._parseErrorResponseBody(t)};return OfficeExtension.Utility.createRuntimeError(o.errorCode,o.errorMessage,n,t.statusCode,i)},e.prototype.createError=function(e,t,n){return OfficeExtension.Utility.createRuntimeError(""+e,t,n)},e.WorkbookSessionIdHeaderName="Workbook-Session-Id",e.WorkbookSessionIdHeaderNameLower="workbook-session-id",e.ASYNC_API_GRAPH_VERSION="beta",e.POLL_DELAY=1e4,e.MAX_POLL_ATTEMPTS=10,e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER=1e4,e.LOCATION_HEADER="location",e.AUTHORIZATION_HEADER="authorization",e.REQUEST_ID_HEADER="request-id",e.RETRY_AFTER_HEADER="retry-after",e.PREFER_HEADER="Prefer",e.PREFER_HEADER_VAL="respond-async",e.CONTENT_TYPE_HEADER="Content-Type",e.CONTENT_TYPE_HEADER_VAL="application/json",e.CLOSE_SESSION="closeSession",e.COMMIT_CHANGES="commitChanges",e.CREATE_SESSION="createSession",e.REFRESH_SESSION="refreshSession",e}();e.Session=p;var h=function(t){function n(n){var o=t.call(this,n)||this;return o.m_workbook=_(e.Workbook,o),o._rootObject=o.m_workbook,o._rootObjectPropertyName="workbook",o}return __extends(n,t),n.prototype._processOfficeJsErrorResponse=function(e,t){5004===e&&(t.ErrorCode=B.invalidOperationInCellEditMode,t.HttpStatusCode=400,t.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode))},Object.defineProperty(n.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"runtime",{get:function(){return this.workbook._Runtime},enumerable:!0,configurable:!0}),n}(OfficeCore.RequestContext);e.RequestContext=h;var m=function(){function e(){}return e.enableMacroRecordingEvent=function(e){OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=!0;var t=function(e){return e.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent]="true",e.workbook.onRecordingStateChangedEvent.add((function(e){return OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=e.recording,OfficeExtension.Utility._createPromiseFromResult(null)})),OfficeExtension.Utility._createPromiseFromResult(null)};return void 0!==e&&null!==e?t(e):y((function(e){return t(e)}))},e}();function g(e,t){var n=e;n.delayForCellEdit&&OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")?t._requestFlagModifier|=64:t._requestFlagModifier&=-65,n._makerSafe&&(t._requestFlagModifier|=1024)}function y(t,n){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,(function(t){return new e.RequestContext(t)}),g)}function v(e){var t={BindingColumnCount:e.bindingColumnCount,BindingId:e.bindingId,BindingRowCount:e.bindingRowCount,bindingType:e.bindingType,HasHeaders:e.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function O(e,t){var n;return n=null==e.headers?e.rows:e,void 0===(n=window.OSF.DDA.DataCoercion.coerceData(n,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]))?null:n}function b(e){if(!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version))return!1;var t=window.Office.context.diagnostics.platform.toLowerCase();if("officeonline"===t)return!1;var n=e[t];null==n&&(n=e.general);var o=window.Office.context.diagnostics.version,i=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(o);if(i){var r=parseInt(i[1]),a=parseInt(i[2]),s=parseInt(i[3]);if(r0?r=n.getOffsetRange(o,i):(r=n,a=o,s=i),1===Math.abs(t)?r:r.getBoundingRect(n.getOffsetRange(o*t+a,i*t+s))},t}();e.RangeCustom=x,function(t){t.Range_HandleResult=function(e,t){P(t.isEntireColumn)||(e.m_isEntireColumn=t.isEntireColumn),P(t.isEntireRow)||(e.m_isEntireRow=t.isEntireRow)},t.Range_GetColumnsAfter=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsAfter",n,t.getLastColumn(),0,1)})},t.Range_GetColumnsBefore=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsBefore",n,t.getColumn(0),0,-1)})},t.Range_GetResizedRange=function(e,t,n){return d()?{handled:!1,result:null}:(e._ensureInteger(t,"getResizedRange"),e._ensureInteger(n,"getResizedRange"),{handled:!0,result:(t>=0&&n>=0?e:e.getCell(0,0)).getBoundingRect(e.getLastCell().getOffsetRange(t,n))})},t.Range_GetRowsAbove=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getRowsAbove",n,t.getRow(0),-1,0)})},t.Range_GetRowsBelow=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:this._getAdjacentRange("getRowsBelow",n,t.getLastRow(),1,0)})},t.Range_Formulas_Set=function(e,t){return e.m_formulas=t,c(e,"Formulas",t)?{handled:!0}:{handled:!1}},t.Range_FormulasLocal_Set=function(e,t){return e.m_formulasLocal=t,c(e,"FormulasLocal",t)?{handled:!0}:{handled:!1}},t.Range_FormulasR1C1_Set=function(e,t){return e.m_formulasR1C1=t,c(e,"FormulasR1C1",t)?{handled:!0}:{handled:!1}},t.Range_NumberFormat_Set=function(e,t){return e.m_numberFormat=t,c(e,"NumberFormat",t,w(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_Values_Set=function(e,t){return e.m_values=t,c(e,"Values",t,w(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJson_Set=function(e,t){return e.m_valuesAsJson=t,c(e,"ValuesAsJson",t,w(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJsonLocal_Set=function(e,t){return e.m_valuesAsJsonLocal=t,c(e,"ValuesAsJsonLocal",t,w(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}}}(e._CC||(e._CC={})),function(t){t.SettingCollection_Add=function(n,o,i){return i=t._replaceDateWithStringDate(i),{handled:!0,result:A(e.Setting,n,"Add",0,[o,i],!1,!0,null,0)}},t.SettingCollection_SettingsChanged_EventArgsTransform=function(e,t){return{settings:e}}}(e._CC||(e._CC={})),function(e){function t(e){var t=JSON.stringify(e,(function(e,t){return this[e]instanceof Date?"Date("+this[e].getTime()+")":t}));return e=JSON.parse(t)}e._replaceDateWithStringDate=t,e.Setting_HandleResult=function(e,t){P(t.Value)||(t.Value=function(e){var t=JSON.stringify(e);return e=JSON.parse(t,(function(e,t){var n;return"string"===typeof t&&t&&t.length>6&&"Date("===t.slice(0,5)&&")"===t.slice(-1)&&(n=new Date(parseInt(t.slice(5,-1))))?n:t}))}(t.Value))},e.Setting_Value_Set=function(e,n){if(!E(n)){e.m_value=n;var o=t(n);return F(e,"Value",o,0),{handled:!0}}return{handled:!1}}}(e._CC||(e._CC={}));var T=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.NamedItemCollectionCustom=T,function(e){e.Binding_DataChanged_EventArgsTransform=function(e,t){return{binding:e}},e.Binding_SelectionChanged_EventArgsTransform=function(e,t){return{binding:e,columnCount:t.columnCount,rowCount:t.rowCount,startColumn:t.startColumn,startRow:t.startRow}}}(e._CC||(e._CC={}));var k=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.TableCollectionCustom=k,function(t){t.TableCollection_Changed_EventArgsTransform=function(t,n){var o,i=n;return null==i.valueBefore&&null==i.valueAfter||(o={valueBefore:i.valueBefore,valueAfter:i.valueAfter,valueTypeBefore:i.valueTypeBefore,valueTypeAfter:i.valueTypeAfter,valueAsJsonBefore:i.valueAsJsonBefore,valueAsJsonAfter:i.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:i.changeType,source:i.source,worksheetId:i.worksheetId,tableId:i.tableId,address:i.address,getRange:function(e){return I("TableChangedEventArgs.getRange",C,"1.8",S),e.workbook._GetRangeForEventByReferenceId(i.referenceId)},getRangeOrNullObject:function(e){return I("TableChangedEventArgs.getRangeOrNullObject",C,"1.8",S),e.workbook._GetRangeOrNullObjectForEventByReferenceId(i.referenceId)},details:o}}}(e._CC||(e._CC={})),function(t){t.Table_HandleIdResult=function(e,t){P(t.Id)||(t.Id=t.Id.toString())},t.Table_HandleResult=function(e,t){P(t.Id)||(t.Id=t.Id.toString())},t.Table_Changed_EventArgsTransform=function(t,n){var o,i=n;return null==i.valueBefore&&null==i.valueAfter||(o={valueBefore:i.valueBefore,valueAfter:i.valueAfter,valueTypeBefore:i.valueTypeBefore,valueTypeAfter:i.valueTypeAfter,valueAsJsonBefore:i.valueAsJsonBefore,valueAsJsonAfter:i.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:i.changeType,source:i.source,worksheetId:i.worksheetId,tableId:i.tableId,address:i.address,getRange:function(e){return I("TableChangedEventArgs.getRange",C,"1.8",S),e.workbook._GetRangeForEventByReferenceId(i.referenceId)},getRangeOrNullObject:function(e){return I("TableChangedEventArgs.getRangeOrNullObject",C,"1.8",S),e.workbook._GetRangeOrNullObjectForEventByReferenceId(i.referenceId)},details:o}},t.Table_SelectionChanged_EventArgsTransform=function(t,n){var o=n,i=!o.address||0===o.address.length;return{type:e.EventType.tableSelectionChanged,isInsideTable:!i,worksheetId:o.worksheetId,tableId:t.id,address:o.address}}}(e._CC||(e._CC={}));var N=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ChartCollectionCustom=N,function(t){t.ChartCollection_Add=function(t,n,o,i){if(!(o instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Charts.Add");return{handled:!1,result:null}}}(e._CC||(e._CC={})),function(t){t.Chart_SetData=function(t,n,o){if(!(n instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Chart.setData");return{handled:!1}}}(e._CC||(e._CC={}));var U=function(){function e(){}return e.prototype.load=function(e){return R(this,e),this},e}();e.ChartFillCustom=U;var j=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.VisualCollectionCustom=j,function(e){e.VisualCollection_AgaveVisualUpdate_EventArgsTransform=function(e,t){var n=t;return{type:n.type,payload:n.payload}}}(e._CC||(e._CC={})),function(t){t.Visual_ChangeNotification_EventArgsTransform=function(t,n){var o=n;return{targetId:o.targetId,changeType:o.changeType,payload:o.payload,type:e.EventType.visualChange}}}(e._CC||(e._CC={}));var L=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.PivotTableCollectionCustom=L,function(t){t.PivotLayout_GetColumnLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetColumnLabelRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataBodyRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetDataBodyRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataHierarchy=function(t,n){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:(I("PivotLayout.getDataHierarchy",C,"1.9",S),{handled:!0,result:A(e.DataPivotHierarchy,t,"GetDataHierarchy",0,[n],!1,!1,null,0)})},t.PivotLayout_GetFilterAxisRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetFilterAxisRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRowLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetRowLabelRange",0,[],!1,!1,null,0)}}}(e._CC||(e._CC={})),function(e){e.PivotField_SortByLabels=function(e,t){return"string"===typeof t&&(t="ascending"===t.toLowerCase()),D(e,"SortByLabels",0,[t],0,0),{handled:!0}}}(e._CC||(e._CC={})),function(t){t.NumberFormattingService_GetFormatter=function(t,n){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(I("NumberFormatting.GetFormatter","NumberFormatting","1.1",S),{handled:!0,result:A(e.NumberFormatter,t,"GetFormatter",0,[n],!1,!1,null,0)})}}(e._CC||(e._CC={})),function(e){e.NumberFormatter_Format=function(e,t){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(I("NumberFormatter.Format","NumberFormatting","1.1",S),{handled:!0,result:D(e,"Format",0,[t],0,0)})}}(e._CC||(e._CC={}));var W=function(){function n(){}return n.register=function(n,o){return I("CustomFunctionManager.register","CustomFunctions","1.3",S),t({delayForCellEdit:!0},(function(t){return e.CustomFunctionManager.newObject(t).register(n,o)}))},n.getStatus=function(){return I("CustomFunctionManager.register","CustomFunctions","1.3",S),t({delayForCellEdit:!0},(function(t){var n=e.CustomFunctionManager.newObject(t).load("status");return t.sync().then((function(){return n.status}))}))},n}();e.CustomFunctionManagerCustom=W,function(e){e.CustomFunctionManager_StaticCustomize=function(e){e.register=W.register,e.getStatus=W.getStatus}}(e._CC||(e._CC={})),function(e){e.Style_TextOrientation_Set=function(e,t){return e.m_textOrientation=t,F(e,"Orientation",t,0),{handled:!0}}}(e._CC||(e._CC={})),function(e){e.InternalTest_Test1Event_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}},e.InternalTest_TestEvent_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}}}(e._CC||(e._CC={}));var H=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.CommentCollectionCustom=H;var B,V=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ShapeCollectionCustom=V,function(e){e.accessDenied="AccessDenied",e.apiNotFound="ApiNotFound",e.conflict="Conflict",e.emptyChartSeries="EmptyChartSeries",e.filteredRangeConflict="FilteredRangeConflict",e.formulaLengthExceedsLimit="FormulaLengthExceedsLimit",e.generalException="GeneralException",e.inactiveWorkbook="InactiveWorkbook",e.insertDeleteConflict="InsertDeleteConflict",e.invalidArgument="InvalidArgument",e.invalidBinding="InvalidBinding",e.invalidOperation="InvalidOperation",e.invalidReference="InvalidReference",e.invalidSelection="InvalidSelection",e.itemAlreadyExists="ItemAlreadyExists",e.itemNotFound="ItemNotFound",e.mergedRangeConflict="MergedRangeConflict",e.nonBlankCellOffSheet="NonBlankCellOffSheet",e.notImplemented="NotImplemented",e.openWorkbookLinksBlocked="OpenWorkbookLinksBlocked",e.operationCellsExceedLimit="OperationCellsExceedLimit",e.pivotTableRangeConflict="PivotTableRangeConflict",e.powerQueryRefreshResourceChallenge="PowerQueryRefreshResourceChallenge",e.rangeExceedsLimit="RangeExceedsLimit",e.refreshWorkbookLinksBlocked="RefreshWorkbookLinksBlocked",e.requestAborted="RequestAborted",e.responsePayloadSizeLimitExceeded="ResponsePayloadSizeLimitExceeded",e.unsupportedFeature="UnsupportedFeature",e.unsupportedFillType="UnsupportedFillType",e.unsupportedOperation="UnsupportedOperation",e.unsupportedSheet="UnsupportedSheet",e.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"}(B=e.ErrorCodes||(e.ErrorCodes={})),e.Interfaces||(e.Interfaces={});new OfficeExtension.LibraryBuilder({metadata:{version:"1.0.0",name:"Excel",defaultApiSetName:"ExcelApi",hostName:"Excel",apiSets:[["1.19","ExcelApiUndo"],["1.1","Recorder"],["99.9"],["1.4","ExcelApiUndo"],["1.8"],["1.9"],["1.11"],["1.18"],["1.6"],["1.6","ExcelApiUndo"],["1.7"],["1.1","ExcelApiUndo"],["1.2"],["1.3"],["1.4"],["1.5"],["1.10"],["1.14"],["1.1","ExcelApiOnline"],["1.1","CustomFunctions"],["1.1","WACOperationEvents"],["1.3","ExcelApiUndo"],["1.13"],["1.16"],["1.8","ExcelApiUndo"],["1.16","ExcelApiUndo"],["1.12"],["1.2","ExcelApiOnline"],["1.2","ExcelApiUndo"],["1.17"],["1.7","ExcelApiUndo"],["1.10","ExcelApiUndo"],["1.14","ExcelApiUndo"],["1.15","ExcelApiUndo"],["1.15"],["1.17","ExcelApiUndo"],["99.99","ExcelApiUndo"],["1.9","ExcelApiUndo"],["1.11","ExcelApiUndo"],["1.12","ExcelApiUndo"],["1.13","ExcelApiUndo"],["1.18","ExcelApiUndo"]],strings:[],enumTypes:[["UndoChangeType",["undoAction","redoAction","undoOrRedoCleared","undoGroupAdded"]],["SDX",["guidedReapply"]],["BusinessBarEntryType",[],{officeScriptsRunningStatus:0,msFormsDataSyncRunningStatus:1}],["FormulaReferenceStyle",["a1","r1C1"]],["NavigationObjectType",["table","pivotTable","chart","shape","namedRange"]],["UserActivityType",["none","insertSheet","deleteSheet","renameSheet","changeCell","insertRow","insertColumn","deleteRow","deleteColumn","insertPartialRow","insertPartialColumn","insertPartialColumnRightToLeft","deletePartialRow","deletePartialColumn","deletePartialColumnRightToLeft","move","sort","mergeCells","unmergeCells","unknownOperation","genericEdit"]],["LineageEndOfLogStatus",["loadInProgress","success","endOfLog","purged","trimmed","unsupported","cleared","error"]],["LineageLoadType",["new","next","previous","latest"]],["LoadToType",["connectionOnly","table","pivotTable","pivotChart"]],["QueryError",["unknown","none","failedLoadToWorksheet","failedLoadToDataModel","failedDownload","failedToCompleteDownload"]],["RangeOptimizationType",["other","numberFormat","textAlignment","textProperties","cellBorder","fillColor","sheetProtection","rowHeight","rowVisibility"]],["WorkbookLinksHardToFindMessages",["none","containsDefinedNames","hiddenOrVeryHiddenSheet","hiddenFloatingObjects","lockedFloatingObjectsThroughVba","protectedSheet","containsConditionalFormatting","containsDataValidation","hiddenRowsAndColumns"]],["WorkbookLinksIconState",["ok","moreInfo","warning"]],["WorkbookLinksRefreshSettings",["ask","always","never"]],["WorkbookConditionalFormattingRulesManagerScope",["defaultScope","selectedRange","activatedWorksheet","activatedTable","activatedPivotTable"]],["WorkbookLinksRefreshMode",["manual","automatic"]],["HelpTopic",["showChanges","guidedReapply","externalCodeServiceDiagnostics"]],["DocumentTaskChangeAction",[],{unknown:"unknown",create:"create",assign:"assign",unassign:"unassign",unassignAll:"unassignAll",setSchedule:"setSchedule",setPercentComplete:"setPercentComplete",setPriority:"setPriority",remove:"remove",restore:"restore",setTitle:"setTitle",undo:"undo"}],["DataSourceType",["unknown","cube","localRange","localTable","oledbDefault"]],["DateFilterCondition",["unknown","equals","before","beforeOrEqualTo","after","afterOrEqualTo","between","tomorrow","today","yesterday","nextWeek","thisWeek","lastWeek","nextMonth","thisMonth","lastMonth","nextQuarter","thisQuarter","lastQuarter","nextYear","thisYear","lastYear","yearToDate","allDatesInPeriodQuarter1","allDatesInPeriodQuarter2","allDatesInPeriodQuarter3","allDatesInPeriodQuarter4","allDatesInPeriodJanuary","allDatesInPeriodFebruary","allDatesInPeriodMarch","allDatesInPeriodApril","allDatesInPeriodMay","allDatesInPeriodJune","allDatesInPeriodJuly","allDatesInPeriodAugust","allDatesInPeriodSeptember","allDatesInPeriodOctober","allDatesInPeriodNovember","allDatesInPeriodDecember"]],["LabelFilterCondition",["unknown","equals","beginsWith","endsWith","contains","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between"]],["PivotFilterType",["unknown","value","manual","label","date"]],["TopBottomSelectionType",["items","percent","sum"]],["ValueFilterCondition",["unknown","equals","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between","topN","bottomN"]],["BuiltInPivotTableStyle",["none","light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","light22","light23","light24","light25","light26","light27","light28","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11","dark12","dark13","dark14","dark15","dark16","dark17","dark18","dark19","dark20","dark21","dark22","dark23","dark24","dark25","dark26","dark27","dark28"]],["BuiltInSlicerStyle",["light1","light2","light3","light4","light5","light6","other1","other2","dark1","dark2","dark3","dark4","dark5","dark6"]],["BuiltInTableStyle",["light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11"]],["ChartSeriesDimension",["categories","values","bubbleSizes"],{xvalues:"XValues",yvalues:"YValues"}],["PivotTableDateGroupBy",["invalid","bySeconds","byMinutes","byHours","byDays","byMonths","byQuarters","byYears"]],["PivotFilterTopBottomCriterion",["invalid","topItems","topPercent","topSum","bottomItems","bottomPercent","bottomSum"]],["SortBy",["ascending","descending"]],["AggregationFunction",["unknown","automatic","sum","count","average","max","min","product","countNumbers","standardDeviation","standardDeviationP","variance","varianceP"]],["ShowAsCalculation",["unknown","none","percentOfGrandTotal","percentOfRowTotal","percentOfColumnTotal","percentOfParentRowTotal","percentOfParentColumnTotal","percentOfParentTotal","percentOf","runningTotal","percentRunningTotal","differenceFrom","percentDifferenceFrom","rankAscending","rankDecending","index"]],["PivotAxis",["unknown","row","column","data","filter"]],["LinkedDataTypeRefreshMode",["unknown","manual","onLoad","periodic"]],["AxisType",["invalid","category","value","series"]],["AxisGroup",["primary","secondary"]],["AxisScaleType",["linear","logarithmic"]],["AxisCrosses",["automatic","maximum","minimum","custom"]],["AxisTickMark",["none","cross","inside","outside"]],["AxisTickLabelPosition",["nextToAxis","high","low","none"]],["TrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ChartAxisType",["invalid","category","value","series"]],["ChartAxisGroup",["primary","secondary"]],["ChartAxisScaleType",["linear","logarithmic"]],["ChartAxisPosition",["automatic","maximum","minimum","custom"]],["ChartAxisTickMark",["none","cross","inside","outside"]],["CalculationState",["done","calculating","pending"]],["ChartAxisTickLabelPosition",["nextToAxis","high","low","none"]],["ChartAxisDisplayUnit",["none","hundreds","thousands","tenThousands","hundredThousands","millions","tenMillions","hundredMillions","billions","trillions","custom"]],["ChartAxisTimeUnit",["days","months","years"]],["ChartBoxQuartileCalculation",["inclusive","exclusive"]],["ChartAxisCategoryType",["automatic","textAxis","dateAxis"]],["ChartBinType",["category","auto","binWidth","binCount"]],["ChartLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","grey25","grey50","grey75","automatic","roundDot"]],["ChartDataLabelPosition",["invalid","none","center","insideEnd","insideBase","outsideEnd","left","right","top","bottom","bestFit","callout"]],["ChartErrorBarsInclude",["both","minusValues","plusValues"]],["ChartErrorBarsType",["fixedValue","percent","stDev","stError","custom"]],["ChartMapAreaLevel",["automatic","dataOnly","city","county","state","country","continent","world"]],["ChartGradientStyle",["twoPhaseColor","threePhaseColor"]],["ChartGradientStyleType",["extremeValue","number","percent"]],["ChartTitlePosition",["automatic","top","bottom","left","right"]],["ChartLegendPosition",["invalid","top","bottom","left","right","corner","custom"]],["ChartMarkerStyle",["invalid","automatic","none","square","diamond","triangle","star","dot","dash","circle","plus","picture"],{x:"X"}],["ChartPlotAreaPosition",["automatic","custom"]],["ChartMapLabelStrategy",["none","bestFit","showAll"]],["ChartMapProjectionType",["automatic","mercator","miller","robinson","albers"]],["ChartParentLabelStrategy",["none","banner","overlapping"]],["ChartSeriesBy",["auto","columns","rows"]],["ChartDataSourceType",["localRange","externalRange","list","unknown"]],["ChartTextHorizontalAlignment",["center","left","right","justify","distributed"]],["ChartTextVerticalAlignment",["center","bottom","top","justify","distributed"]],["ChartTickLabelAlignment",["center","left","right"]],["ChartType",["invalid","columnClustered","columnStacked","columnStacked100","barClustered","barStacked","barStacked100","lineStacked","lineStacked100","lineMarkers","lineMarkersStacked","lineMarkersStacked100","pieOfPie","pieExploded","barOfPie","areaStacked","areaStacked100","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","line","pie","area","doughnut","radar","histogram","boxwhisker","pareto","regionMap","treemap","waterfall","sunburst","funnel"],{_3DColumnClustered:"3DColumnClustered",_3DColumnStacked:"3DColumnStacked",_3DColumnStacked100:"3DColumnStacked100",_3DBarClustered:"3DBarClustered",_3DBarStacked:"3DBarStacked",_3DBarStacked100:"3DBarStacked100",_3DPieExploded:"3DPieExploded",xyscatterSmooth:"XYScatterSmooth",xyscatterSmoothNoMarkers:"XYScatterSmoothNoMarkers",xyscatterLines:"XYScatterLines",xyscatterLinesNoMarkers:"XYScatterLinesNoMarkers",_3DAreaStacked:"3DAreaStacked",_3DAreaStacked100:"3DAreaStacked100",_3DColumn:"3DColumn",_3DLine:"3DLine",_3DPie:"3DPie",xyscatter:"XYScatter",_3DArea:"3DArea"}],["ChartUnderlineStyle",["none","single"]],["ChartDisplayBlanksAs",["notPlotted","zero","interplotted"]],["ChartPlotBy",["rows","columns"]],["ChartSplitType",["splitByPosition","splitByValue","splitByPercentValue","splitByCustomSplit"]],["ChartColorScheme",["colorfulPalette1","colorfulPalette2","colorfulPalette3","colorfulPalette4","monochromaticPalette1","monochromaticPalette2","monochromaticPalette3","monochromaticPalette4","monochromaticPalette5","monochromaticPalette6","monochromaticPalette7","monochromaticPalette8","monochromaticPalette9","monochromaticPalette10","monochromaticPalette11","monochromaticPalette12","monochromaticPalette13"]],["ChartTrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ShapeZOrder",["bringToFront","bringForward","sendToBack","sendBackward"]],["ShapeType",["unsupported","image","geometricShape","group","line"]],["ShapeScaleType",["currentSize","originalSize"]],["ShapeScaleFrom",["scaleFromTopLeft","scaleFromMiddle","scaleFromBottomRight"]],["ShapeFillType",["noFill","solid","gradient","pattern","pictureAndTexture","mixed"]],["ShapeFontUnderlineStyle",["none","single","double","heavy","dotted","dottedHeavy","dash","dashHeavy","dashLong","dashLongHeavy","dotDash","dotDashHeavy","dotDotDash","dotDotDashHeavy","wavy","wavyHeavy","wavyDouble"]],["PictureFormat",[],{unknown:"UNKNOWN",bmp:"BMP",jpeg:"JPEG",gif:"GIF",png:"PNG",svg:"SVG"}],["ShapeLineStyle",["single","thickBetweenThin","thickThin","thinThick","thinThin"]],["ShapeLineDashStyle",["dash","dashDot","dashDotDot","longDash","longDashDot","roundDot","solid","squareDot","longDashDotDot","systemDash","systemDot","systemDashDot"]],["ArrowheadLength",["short","medium","long"]],["ArrowheadStyle",["none","triangle","stealth","diamond","oval","open"]],["ArrowheadWidth",["narrow","medium","wide"]],["PremiumLicenseName",["python"]],["BindingType",["range","table","text"]],["BorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight","insideVertical","insideHorizontal","diagonalDown","diagonalUp"]],["BorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","double","slantDashDot"]],["BorderWeight",["hairline","thin","medium","thick"]],["CalculationMode",["automatic","automaticExceptTables","manual"]],["RuntimeCalculationMode",[],{undefined:0,automatic:1,automaticExceptTables:2,manual:3}],["CalculationType",["recalculate","full","fullRebuild"]],["ClearApplyTo",["all","formats","contents","hyperlinks","removeHyperlinks"]],["VisualCategory",["column","bar","line","area","pie","donut","scatter","bubble","statistical","stock","combo","hierarchy","surface","map","funnel","radar","waterfall","threeD","other"]],["VisualPropertyType",["object","collection","string","double","int","bool","enum","color"]],["VisualChangeType",["dataChange","propertyChange","genericChange","selectionChange"]],["BoolMetaPropertyType",["writeOnly","readOnly","hideEntireSubtreeUI","hideMeButShowChildrenUI","expandableUI","nextPropOnSameLine","hideLabel","showResetUI","hasOwnExpandableSection","nextPropOnSameLineFOTP","showResetUIFOTP","untransferable","ignoreDuringChangeChartType","notTriviallyUndoable","volatileEnum","exceptionCollection","metaOnly","showHideCollection","errorMessage","infoMessage"]],["ConditionalDataBarAxisFormat",["automatic","none","cellMidPoint"]],["ConditionalDataBarDirection",["context","leftToRight","rightToLeft"]],["ConditionalFormatDirection",["top","bottom"]],["ConditionalFormatType",["custom","dataBar","colorScale","iconSet","topBottom","presetCriteria","containsText","cellValue"]],["ConditionalFormatRuleType",["invalid","automatic","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalFormatIconRuleType",["invalid","number","percent","formula","percentile"]],["ConditionalFormatColorCriterionType",["invalid","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalTopBottomCriterionType",["invalid","topItems","topPercent","bottomItems","bottomPercent"]],["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"]],["ConditionalTextOperator",["invalid","contains","notContains","beginsWith","endsWith"]],["ConditionalCellValueOperator",["invalid","between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual"]],["ConditionalIconCriterionOperator",["invalid","greaterThan","greaterThanOrEqual"]],["ConditionalRangeBorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight"]],["ConditionalRangeBorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot"]],["ConditionalRangeFontUnderlineStyle",["none","single","double"]],["CustomFunctionType",["invalid","script","webService"]],["CustomFunctionMetadataFormat",["invalid","openApi"]],["DataValidationType",["none","wholeNumber","decimal","list","date","time","textLength","custom","inconsistent","mixedCriteria"]],["DataValidationOperator",["between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqualTo","lessThanOrEqualTo"]],["DataValidationAlertStyle",["stop","warning","information"]],["DeleteShiftDirection",["up","left"]],["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"]],["FilterDatetimeSpecificity",["year","month","day","hour","minute","second"]],["FilterOn",["bottomItems","bottomPercent","cellColor","dynamic","fontColor","values","topItems","topPercent","icon","custom"]],["FilterOperator",["and","or"]],["HorizontalAlignment",["general","left","center","right","fill","justify","centerAcrossSelection","distributed"]],["IconSet",["invalid","threeArrows","threeArrowsGray","threeFlags","threeTrafficLights1","threeTrafficLights2","threeSigns","threeSymbols","threeSymbols2","fourArrows","fourArrowsGray","fourRedToBlack","fourRating","fourTrafficLights","fiveArrows","fiveArrowsGray","fiveRating","fiveQuarters","threeStars","threeTriangles","fiveBoxes"]],["ImageFittingMode",["fit","fitAndCenter","fill"]],["InsertShiftDirection",["down","right"]],["NamedItemScope",["worksheet","workbook"]],["NamedItemType",["string","integer","double","boolean","range","error","array"]],["RangeUnderlineStyle",["none","single","double","singleAccountant","doubleAccountant"]],["SheetVisibility",["visible","hidden","veryHidden"]],["EventTriggerSource",["unknown","thisLocalAddin"]],["RangeValueType",["unknown","empty","string","integer","double","boolean","error","richValue"]],["KeyboardDirection",["left","right","up","down"]],["SearchDirection",["forward","backwards"]],["SortOrientation",["rows","columns"]],["SortOn",["value","cellColor","fontColor","icon"]],["SortDataOption",["normal","textAsNumber"]],["SortMethod",["pinYin","strokeCount"]],["VerticalAlignment",["top","center","bottom","justify","distributed"]],["MessageCategory",[],{none:0,customFunction:1,action:2,event:65536}],["MessageType",[],{none:0,testEvent:1,test1Event:2,worksheetDataChangedEvent:10,worksheetActivatedEvent:11,worksheetDeactivatedEvent:12,worksheetAddedEvent:13,worksheetSelectionChangedEvent:14,worksheetDeletedEvent:15,worksheetCalculatedEvent:16,worksheetFilteredEvent:17,worksheetFormatChangedEvent:18,worksheetRowSortedEvent:19,worksheetColumnSortedEvent:20,worksheetSingleClickedEvent:21,worksheetRowHiddenChangedEvent:22,worksheetFormulaChangedEvent:23,worksheetProtectionChangedEvent:24,worksheetNameChangedEvent:25,worksheetVisibilityChangedEvent:26,worksheetMovedEvent:27,worksheetNavigationObjectChangedEvent:28,worksheetRowHeightChangedEvent:29,workbookFormulaReferenceStyleChangedEvent:30,chartAddedEvent:50,chartActivatedEvent:51,chartDeactivatedEvent:52,chartDeletedEvent:53,tableSelectionChangedEvent:100,tableDataChangedEvent:101,tableAddedEvent:102,tableDeletedEvent:103,tableFilteredEvent:104,agaveVisualUpdateEvent:150,customFunctionExecutionBeginEvent:200,customFunctionExecutionEndEvent:201,commentAddedEvent:250,commentDeletedEvent:251,commentChangedEvent:252,invocationMessage:1e3,cancellationMessage:1001,metadataMessage:1002,visualSelectionChangedEvent:2e3,visualChangeEvent:2001,visualTrackerModelChangedEvent:2002,shapeSelectionChangedEvent:2100,shapeActivatedEvent:2101,shapeDeactivatedEvent:2102,shapeAddedEvent:2103,shapeDeletedEvent:2104,workbookAutoSaveSettingChangedEvent:2200,wacoperationEvent:2201,recordingStateChangedEvent:2202,workbookActivatedEvent:2203,workbookNavigationObjectChangedEvent:2204,ribbonCommandExecutedEvent:2300,linkedDataTypeRefreshRequestCompletedEvent:2500,linkedDataTypeRefreshModeChangedEvent:2501,linkedDataTypeLinkedDataTypeAddedEvent:2502,linkedWorkbookWorkbookLinksChangedEvent:2600,linkedWorkbookRefreshCompletedEvent:2601,rangePickerSelectionChangedEvent:2700,rangePickerDeactivatedEvent:2701,lineageActivityUpdateAvailableEvent:2800,lineageActivityFilterUpdatedEvent:2801,lineageActivityLoadCompletedEvent:2802,pivotTableAddedEvent:2900,pivotTableDeletedEvent:2901,namedItemAddedEvent:3e3,namedItemDeletedEvent:3001,guidedReapplyManagerUpdateAvailableEvent:3100,vbaRecorderRecordingChangedEvent:3200,vbaRecorderRecordingChanged2Event:3202,workbookActionRecordedEvent:3201,externalCodeServiceDiagnosticsNewEntryEvent:3300,externalCodeServiceDiagnosticsFilterUpdatedEvent:3301,rangeValuesPreviewDismissedEvent:3400,applicationUndoChangedEvent:3500,appRuntimeVisibilityChangedEvent:65539,beforeCloseNotifiactionCancelledEvent:65540,augmentationLoopAnnotationAddedEvent:65541}],["InsertDeleteCellsShiftDirection",["none","shiftCellLeft","shiftCellUp","shiftCellRight","shiftCellDown"]],["DocumentPropertyType",["number","boolean","date","string","float"]],["EventSource",["local","remote"]],["DataChangeType",["unknown","rangeEdited","rowInserted","rowDeleted","columnInserted","columnDeleted","cellInserted","cellDeleted"]],["RowHiddenChangeType",["unhidden","hidden"]],["CommentChangeType",["commentEdited","commentResolved","commentReopened","replyAdded","replyDeleted","replyEdited"]],["EventType",["worksheetChanged","worksheetSelectionChanged","worksheetAdded","worksheetActivated","worksheetDeactivated","tableChanged","tableSelectionChanged","worksheetDeleted","chartAdded","chartActivated","chartDeactivated","chartDeleted","worksheetCalculated","visualSelectionChanged","agaveVisualUpdate","tableAdded","tableDeleted","tableFiltered","worksheetFiltered","shapeActivated","shapeDeactivated","visualChange","workbookAutoSaveSettingChanged","worksheetFormatChanged","ribbonCommandExecuted","worksheetRowSorted","worksheetColumnSorted","worksheetSingleClicked","worksheetRowHiddenChanged","recordingStateChangedEvent","commentAdded","commentDeleted","commentChanged","linkedDataTypeRefreshRequestCompleted","linkedDataTypeRefreshModeChanged","linkedDataTypeLinkedDataTypeAdded","worksheetFormulaChanged","workbookActivated","linkedWorkbookWorkbookLinksChanged","linkedWorkbookRefreshCompleted","worksheetProtectionChanged","worksheetNameChanged","worksheetVisibilityChanged","worksheetMoved","lineageActivityUpdateAvailable","lineageActivityFilterUpdated","lineageActivityLoadCompleted","shapeAdded","shapeDeleted","pivotTableAdded","pivotTableDeleted","namedItemAdded","namedItemDeleted","worksheetNavigationObjectChanged","workbookNavigationObjectChanged","worksheetRowHeightChanged","workbookFormulaReferenceStyleChanged","guidedReapplyManagerUpdateAvailable","vbaRecorderRecordingChanged","rangeValuesPreviewDismissed","annotationAdded","workbookActionRecorded","applicationUndoChanged","vbaRecorderRecordingChanged2"],{wacoperationEvent:"WACOperationEvent"}],["DocumentPropertyItem",["title","subject","author","keywords","comments","template","lastAuth","revision","appName","lastPrint","creation","lastSave","category","format","manager","company"]],["SubtotalLocationType",["atTop","atBottom","off"]],["PivotLayoutType",["compact","tabular","outline"]],["ProtectionSelectionMode",["normal","unlocked","none"]],["PageOrientation",["portrait","landscape"]],["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"]],["ReadingOrder",["context","leftToRight","rightToLeft"]],["BuiltInStyle",["normal","comma","currency","percent","wholeComma","wholeDollar","hlink","hlinkTrav","note","warningText","emphasis1","emphasis2","emphasis3","sheetTitle","heading1","heading2","heading3","heading4","input","output","calculation","checkCell","linkedCell","total","good","bad","neutral","accent1","accent1_20","accent1_40","accent1_60","accent2","accent2_20","accent2_40","accent2_60","accent3","accent3_20","accent3_40","accent3_60","accent4","accent4_20","accent4_40","accent4_60","accent5","accent5_20","accent5_40","accent5_60","accent6","accent6_20","accent6_40","accent6_60","explanatoryText"]],["PrintErrorType",["asDisplayed","blank","dash","notAvailable"]],["WorksheetPositionType",["none","before","after","beginning","end"]],["PrintComments",["noComments","endSheet","inPlace"]],["PrintOrder",["downThenOver","overThenDown"]],["PrintMarginUnit",["points","inches","centimeters"]],["HeaderFooterState",["default","firstAndDefault","oddAndEven","firstOddAndEven"]],["AutoFillType",["fillDefault","fillCopy","fillSeries","fillFormats","fillValues","fillDays","fillWeekdays","fillMonths","fillYears","linearTrend","growthTrend","flashFill"]],["GroupOption",["byRows","byColumns"]],["RangeCopyType",["all","formulas","values","formats","link"]],["LinkedDataTypeState",["none","validLinkedData","disambiguationNeeded","brokenLinkedData","fetchingData"]],["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"]],["ConnectorType",["straight","elbow","curve"]],["ContentType",["plain","mention"]],["SpecialCellType",["conditionalFormats","dataValidations","blanks","constants","formulas","sameConditionalFormat","sameDataValidation","visible"]],["SpecialCellValueType",["all","errors","errorsLogical","errorsNumbers","errorsText","errorsLogicalNumber","errorsLogicalText","errorsNumberText","logical","logicalNumbers","logicalText","logicalNumbersText","numbers","numbersText","text"]],["Placement",["twoCell","oneCell","absolute"]],["FillPattern",["none","solid","gray50","gray75","gray25","horizontal","vertical","down","up","checker","semiGray75","lightHorizontal","lightVertical","lightDown","lightUp","grid","crissCross","gray16","gray8","linearGradient","rectangularGradient"]],["ShapeTextHorizontalAlignment",["left","center","right","justify","justifyLow","distributed","thaiDistributed"]],["ShapeTextVerticalAlignment",["top","middle","bottom","justified","distributed"]],["ShapeTextVerticalOverflow",["overflow","ellipsis","clip"]],["ShapeTextHorizontalOverflow",["overflow","clip"]],["ShapeTextReadingOrder",["leftToRight","rightToLeft"]],["ShapeTextOrientation",["horizontal","vertical","vertical270","wordArtVertical","eastAsianVertical","mongolianVertical","wordArtVerticalRTL"]],["ShapeAutoSize",["autoSizeNone","autoSizeTextToFitShape","autoSizeShapeToFitText","autoSizeMixed"]],["CloseBehavior",["save","skipSave"]],["SaveBehavior",["save","prompt"]],["SlicerSortType",["dataSourceOrder","ascending","descending"]],["RibbonTab",["others","home","insert","draw","pageLayout","formulas","data","review","view","developer","addIns","help"]],["NumberFormatCategory",["general","number","currency","accounting","date","time","percentage","fraction","scientific","text","special","custom"]]],clientObjectTypes:[["UndoScope",0,0,0,[["close",0,0,0,2],["open",1,0,0,2]]],["RangeValuesPreview",4,0,0,[["_RegisterEventDismissed",0,0,0,2,0,1],["_UnregisterEventDismissed",0,0,0,2,0,1],["dismiss",0,2,0,4],["show",3,2,0,4]],0,0,0,[["Dismissed",0,0,"MessageType.rangeValuesPreviewDismissedEvent","this._ParentObject.id","_RegisterEventDismissed","_UnregisterEventDismissed"]]],["AugmentationLoop",0,0,0,[["_RegisterAnnotationAddedEvent",0,2,0,4],["_UnregisterAnnotationAddedEvent",0,2,0,4],["activateAnnotation",1,2,0,4],["submitSignal",1,2,0,4]],0,0,0,[["AnnotationAdded",0,0,"MessageType.augmentationLoopAnnotationAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAnnotationAddedEvent","_UnregisterAnnotationAddedEvent"]]],["ExternalCodeService",0,0,[["diagnostics","ExternalCodeServiceDiagnostics",2,0,0,4]]],["ExternalCodeServiceDiagnostics",0,[["id",2]],0,[["_RegisterEventNewEntry",0,0,0,2,0,1],["_UnregisterEventNewEntry",0,0,0,2,0,1],["clear",0,2,0,4],["fireStoredEntries",0,2,0,4],["_RegisterEventFilterUpdated",0,0,0,2,0,1],["_UnregisterEventFilterUpdated",0,0,0,2,0,1]],0,0,0,[["FilterUpdated",0,0,"MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent","this.id","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["NewEntry",0,0,"MessageType.externalCodeServiceDiagnosticsNewEntryEvent","this.id","_RegisterEventNewEntry","_UnregisterEventNewEntry"]]],["VbaRecorder",0,[["id",2]],0,[["_RegisterEventRecordingChanged",0,0,0,2,0,1],["_UnregisterEventRecordingChanged",0,0,0,2,0,1],["_RegisterEventRecordingChanged2",0,2,2,4],["_UnregisterEventRecordingChanged2",0,2,2,4]],0,0,0,[["RecordingChanged",0,0,"MessageType.vbaRecorderRecordingChangedEvent","this.id","_RegisterEventRecordingChanged","_UnregisterEventRecordingChanged"],["RecordingChanged2",0,2,"MessageType.vbaRecorderRecordingChanged2Event","this.id","_RegisterEventRecordingChanged2","_UnregisterEventRecordingChanged2"]]],["WorksheetOptimizationScanResult",0,[["allocatedCells",2],["optimizableCells",2]],[["ranges","RangeOptimizationCollection",18,0,0,4]]],["UserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity"],["GuidedReapplyManager",0,0,[["activities","UserActivityCollection",18,0,0,4],["summaryCardUserActivity","SummaryCardUserActivity",2,0,0,4]],[["openSavedFile",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["discardActivites",0,2,0,4],["reapplyActivity",1,2,0,4],["saveActivities",0,2,0,4]],0,0,0,[["UpdateAvailable",0,0,"MessageType.guidedReapplyManagerUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["BusinessBar",0,0,0,[["hide",2],["show",2]]],["UserActivity",0,[["activityId",2],["activityType",2],["author",2],["createdDateTime",10],["guid",2],["rangeAddress",2],["sheetName",2],["valueChangeData",2],["authorEmail",2],["locationDeleted",2]],[["highlightRangeAreas","RangeAreas",2,0,0,4]]],["LineageActivityCollection",1,0,0,[["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["clear",0,2,0,4],["getCount",0,2,0,4],["getState",0,2,0,4],["loadActivities",1,2,0,4],["loadLatestActivities",0,2,0,4],["loadNextActivities",0,2,0,4],["loadPreviousActivities",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventFilterUpdated",0,2,0,4],["_RegisterEventLoadCompleted",0,2,0,4],["_UnregisterEventFilterUpdated",0,2,0,4],["_UnregisterEventLoadCompleted",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity",[["FilterUpdated",0,0,"MessageType.lineageActivityFilterUpdatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["LoadCompleted",0,0,"MessageType.lineageActivityLoadCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventLoadCompleted","_UnregisterEventLoadCompleted"],["UpdateAvailable",0,0,"MessageType.lineageActivityUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["SummaryItemUserActivity",0,[["activityType",2],["rangeAddresses",2],["sheetName",2],["valueChangeData",2]]],["SummaryItemUserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SummaryItemUserActivity",1,2,0,4]],0,"SummaryItemUserActivity"],["SummaryCardUserActivity",0,[["authors",2],["currentUser",2],["displayTime",10],["numberOfDetailedCard",2],["summaryUnviewableData",2]],[["summaryItemUserActivities","SummaryItemUserActivityCollection",18,0,0,4]]],["AllowEditRange",0,[["address",1],["isPasswordProtected",3],["title",1]],0,[["delete"],["pauseProtection",1],["setPassword",1]]],["AllowEditRangeCollection",1,0,0,[["add",3],["getCount",0,2,0,4],["pauseProtection",1]],[["getItem","AllowEditRange",1,18,0,4],["getItemAt","AllowEditRange",1,2,0,4],["getItemOrNullObject","AllowEditRange",1,2,0,4]],0,"AllowEditRange"],["Query",0,[["loadedTo",2],["loadedToDataModel",2],["name",2],["refreshDate",10],["rowsLoadedCount",2],["error",2]]],["QueryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Query",1,18,0,4]],0,"Query"],["VisualTracker",0,[["id",2]],0,[["_RegisterEventModelChanged",0,2],["_UnregisterEventModelChanged",0,2],["requestTrackingAlteration",2,2,0,4]],0,0,0,[["ModelChanged",0,0,"MessageType.visualTrackerModelChangedEvent","this.id","_RegisterEventModelChanged","_UnregisterEventModelChanged"]]],["NumberFormatProperty",0,[["key",3],["currency",3],["dateTime",3],["dateTimeHasDayOfWeek",3],["dateTimeHasMonth",3],["dateTimeHasYear",3],["numeric",3],["percent",3],["text",3]]],["NumberFormatPropertyCollection",1,0,0,0,[["getItemAt","NumberFormatProperty",1,2,0,4]],0,"NumberFormatProperty"],["RangeOptimization",0,[["optimizationTypes",2],["range",2]]],["RangeOptimizationCollection",1,[["allocatedCells",2],["optimizableCells",2]],0,[["getCount",0,2,0,4]],[["getItemAt","RangeOptimization",1,2,0,4]],0,"RangeOptimization"],["WorksheetOptimization",0,0,0,0,[["optimize","WorksheetOptimizationResult",0,0,0,2],["scan","RangeOptimizationCollection",0,6,0,4],["scanExtended","WorksheetOptimizationScanResult",0,2,0,4]]],["WorksheetOptimizationResult",0,[["allocatedCells",2],["optimizedCells",2]]],["LinkedWorkbook",0,[["displayUrl",2,3],["fileName",3,3],["id",2],["longErrorDescription",2,3],["refreshEnabled",2,3],["refreshing",2,3],["statusMessage",2,3],["excelIconState",2,3],["hardToFindErrorMessages",2,3],["lastUpdated",10,3]],0,[["_RegisterRefreshCompletedEvent",0,0,3,2,0,1],["_UnregisterRefreshCompletedEvent",0,0,3,2,0,1],["breakLinks"],["changeSource",1,0,3],["findNextLink",0,2,3,4],["openWorkbook",0,2,3,4],["refresh"],["openChangeSourceDialog",0,0,3],["closeChangeSourceDialog",0,0,3]],0,0,0,[["RefreshCompleted",0,3,"MessageType.linkedWorkbookRefreshCompletedEvent","this.id","_RegisterRefreshCompletedEvent","_UnregisterRefreshCompletedEvent"]]],["LinkedWorkbookCollection",1,[["breakAllLinksEnabled",0,3],["refreshAllEnabled",0,3],["workbookLinksRefreshMode"],["workbookLinksRefreshSettings",0,3],["containsNonWorkbookLinks",0,3]],0,[["_RegisterWorkbookLinksChangedEvent",0,2,3,4],["_UnregisterWorkbookLinksChangedEvent",0,2,3,4],["breakAllLinks"],["getCount",0,2,3,4],["refreshAll"],["openEditLinksDialog",0,2,3,4]],[["getItem","LinkedWorkbook",1,18,0,4],["getItemAt","LinkedWorkbook",1,2,3,4],["getItemOrNullObject","LinkedWorkbook",1]],0,"LinkedWorkbook",[["WorkbookLinksChanged",0,3,"MessageType.linkedWorkbookWorkbookLinksChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWorkbookLinksChangedEvent","_UnregisterWorkbookLinksChangedEvent"]]],["DocumentTaskChange",0,[["type",2],["changedBy",2],["commentId",2],["createdDateTime",10],["id",2],["assignee",2],["undoChangeId",2],["priority",2],["title",2],["percentComplete",2],["startDateTime",10],["dueDateTime",10]],0,0,0,0,0,0,"Microsoft.ExcelServices.DocumentTaskChange",4],["DocumentTaskChangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","DocumentTaskChange",1,2,0,4]],0,"DocumentTaskChange"],["RangePicker",0,0,0,[["activate",1,0,0,2,0,4],["deactivate",0,0,0,2,0,4],["updateSelection",1,0,0,2,0,4],["updateSelectionWithNavigation",4,0,0,2,0,4],["_RegisterEventSelectionChanged",0,0,0,2,0,4],["_UnregisterEventSelectionChanged",0,0,0,2,0,4],["_RegisterEventDeactivated",0,2,0,4],["_UnregisterEventDeactivated",0,2,0,4]],0,0,0,[["Deactivated",0,0,"MessageType.rangePickerDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventDeactivated","_UnregisterEventDeactivated"],["SelectionChanged",0,0,"MessageType.rangePickerSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventSelectionChanged","_UnregisterEventSelectionChanged"]]],["DocumentTask",0,[["startAndDueDateTime"],["id",2],["percentComplete"],["priority"],["title"],["assignees",2],["completedBy",2],["completedDateTime",10],["createdBy",2],["createdDateTime",10]],[["changes","DocumentTaskChangeCollection",18,0,0,4],["comment","Comment",2,0,0,4]],[["assign",1],["unassign",1],["unassignAll"]]],["DocumentTaskCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","DocumentTask",1,18,0,4],["getItemOrNullObject","DocumentTask",1,2,0,4],["getItemAt","DocumentTask",1,2,0,4]],0,"DocumentTask"],["DataConnection",0,[["connectionString",2],["name",2],["commandText",2],["dataSourceType",2]]],["Runtime",0,[["enableEvents",1,5]]],["Application",0,[["calculationMode",1],["calculationEngineVersion",3,6],["calculationState",3,6],["decimalSeparator",3,7],["thousandsSeparator",3,7],["useSystemSeparators",3,7],["formatStaleValues",1,8]],[["iterativeCalculation","IterativeCalculation",35,6,0,4],["ribbon","Ribbon",35,6,0,4],["cultureInfo","CultureInfo",3,7,0,4],["undoScope","UndoScope",3,3,0,4]],[["calculate",1],["suspendApiCalculationUntilNextSync",0,1,9,2,0,10],["suspendScreenUpdatingUntilNextSync",0,0,6,2,0,10],["hasLicense",1,2,8,4],["redo",0,0,3,2],["explorePremiumLicense",1,2,8,4],["undo",0,0,3,2],["_RegisterEventUndoChanged",0,2,3,4],["_UnregisterEventUndoChanged",0,2,3,4]],[["createWorkbook","WorkbookCreated",1,10,5,0,0,"_GetWorkbookCreatedById"],["_GetWorkbookCreatedById","WorkbookCreated",1,2,5,4]],0,0,[["UndoChanged",0,3,"MessageType.applicationUndoChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUndoChanged","_UnregisterEventUndoChanged"]]],["IterativeCalculation",0,[["enabled",1],["maxIteration",1],["maxChange",1]]],["Workbook",0,[["name",3,11],["readOnly",3,5],["isDirty",1,6],["use1904DateSystem",1,8],["chartDataPointTrack",1,6],["usePrecisionAsDisplayed",1,6],["calculationEngineVersion",3,6],["autoSave",3,6],["previouslySaved",3,6],["showPivotFieldList",0,8,0,2,12],["formulaReferenceStyle",2,3]],[["worksheets","WorksheetCollection",19,0,0,4],["names","NamedItemCollection",19,0,0,4],["tables","TableCollection",19,0,0,4],["application","Application",2,0,0,4],["bindings","BindingCollection",19,0,0,4],["functions","Functions",2,13,0,4],["_V1Api","_V1Api",2,14,0,4],["pivotTables","PivotTableCollection",19,14,0,4],["settings","SettingCollection",19,15,0,4],["customXmlParts","CustomXmlPartCollection",19,16,0,4],["internalTest","InternalTest",2,9,0,4],["properties","DocumentProperties",35,11,0,4],["styles","StyleCollection",19,11,0,4],["protection","WorkbookProtection",3,11,0,4],["dataConnections","DataConnectionCollection",3,11,0,4],["_Runtime","Runtime",2,16,0,4],["comments","CommentCollection",19,17,0,4],["slicers","SlicerCollection",19,17,0,4],["tableStyles","TableStyleCollection",19,17,0,4],["pivotTableStyles","PivotTableStyleCollection",19,17,0,4],["slicerStyles","SlicerStyleCollection",19,17,0,4],["timelineStyles","TimelineStyleCollection",19,17,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["linkedDataTypes","LinkedDataTypeCollection",18,8,0,4],["queries","QueryCollection",18,18,0,4],["linkedWorkbooks","LinkedWorkbookCollection",18,19,0,4],["rangePicker","RangePicker",2,8,0,4,0,4],["lineageActivities","LineageActivityCollection",18,3,0,4],["businessBar","BusinessBar",2,8,0,4],["guidedReapply","GuidedReapplyManager",2,3,0,4],["vbaRecorder","VbaRecorder",2,8,0,4],["externalCodeService","ExternalCodeService",2,8,0,4],["augmentationLoop","AugmentationLoop",2,8,0,4]],[["_RemoveReference",1,2],["_GetObjectByReferenceId",1,2,0,4],["_GetObjectTypeNameByReferenceId",1,2,0,4],["_RemoveAllReferences",0,2],["_GetReferenceCount",0,2,0,4],["getIsActiveCollabSession",0,0,6],["registerCustomFunctions",7,0,20,8],["_SetOsfControlContainerReadyForCustomFunctions",0,0,20],["close",1,0,7],["save",1,0,7],["_RegisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_UnregisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_RegisterWACOperationEvent",0,2,21,4],["_UnregisterWACOperationEvent",0,2,21,4],["_RegisterRecordingStateChangedEvent",0,0,21,2,0,22],["_UnregisterRecordingStateChangedEvent",0,0,21,2,0,22],["_RegisterActivatedEvent",0,2,23],["_UnregisterActivatedEvent",0,2,23],["insertWorksheetsFromBase64",2,0,23],["enableOfficeScriptRecording",1,1,19],["recordAction",1,3,0,4],["focus",0,2,3,4],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["showHelp",1,2,3,4],["getLinkedEntityCellValue",1,2,24,4],["getThemeColors",0,2,8,4],["_RegisterEventFormulaReferenceStyleChanged",0,2,3,4],["_UnregisterEventFormulaReferenceStyleChanged",0,2,3,4],["notifySDXLoaded",1,2,3,4],["openConditionalFormattingRulesManager",1,0,3],["openNameManager",0,0,3],["_RegisterEventActionRecorded",0,2,2,4],["_UnregisterEventActionRecorded",0,2,2,4]],[["getSelectedRange","Range",0,10,0,4],["getActiveCell","Range",0,10,11,4],["_GetRangeForEventByReferenceId","Range",1,2,0,4],["_GetRangeOrNullObjectForEventByReferenceId","Range",1,2,0,4],["getActiveChart","Chart",0,2,6,4],["getActiveChartOrNullObject","Chart",0,2,6,4],["getSelectedRanges","RangeAreas",0,10,6,4],["_GetRangesForEventByReferenceId","RangeAreas",1,2,6,4],["_GetRangesOrNullObjectForEventByReferenceId","RangeAreas",1,2,6,4],["getActiveSlicer","Slicer",0,2,17,4],["getActiveSlicerOrNullObject","Slicer",0,2,17,4]],0,0,[["ActionRecorded",0,2,"MessageType.workbookActionRecordedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventActionRecorded","_UnregisterEventActionRecorded"],["Activated",0,23,"MessageType.workbookActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["AutoSaveSettingChanged",0,6,"MessageType.workbookAutoSaveSettingChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAutoSaveSettingChangedEvent","_UnregisterAutoSaveSettingChangedEvent"],["FormulaReferenceStyleChanged",0,3,"MessageType.workbookFormulaReferenceStyleChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFormulaReferenceStyleChanged","_UnregisterEventFormulaReferenceStyleChanged"],["NavigationObjectChanged",0,3,"MessageType.workbookNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["RecordingStateChangedEvent",0,21,"MessageType.recordingStateChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRecordingStateChangedEvent","_UnregisterRecordingStateChangedEvent"],["SelectionChanged",3,14,"_CC.office10EventIdDocumentSelectionChangedEvent","","",""],["WACOperationEvent",2,21,"MessageType.wacoperationEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWACOperationEvent","_UnregisterWACOperationEvent"],["_Message",3,11,"_CC.office10EventIdRichApiMessageEvent","","",""]]],["WorkbookProtection",0,[["protected",3]],0,[["protect",1],["unprotect",1]]],["WorkbookCreated",0,[["id",3]],0,[["open",0,2,0,4]]],["Worksheet",0,[["name",1],["id",3],["position",1],["visibility",1],["tabColor",1,11,0,2,25],["standardWidth",1,11],["standardHeight",3,11],["showGridlines",5,5,0,2,26],["showHeadings",5,5],["enableCalculation",1,6],["tabId",3,18]],[["charts","ChartCollection",83,0,0,4],["tables","TableCollection",83,0,0,4],["protection","WorksheetProtection",3,13,0,4],["pivotTables","PivotTableCollection",83,14,0,4],["names","NamedItemCollection",83,15,0,4],["freezePanes","WorksheetFreezePanes",3,11,0,4],["pageLayout","PageLayout",35,6,0,4],["visuals","VisualCollection",83,17,0,4],["shapes","ShapeCollection",83,6,0,4],["horizontalPageBreaks","PageBreakCollection",19,6,0,4],["verticalPageBreaks","PageBreakCollection",19,6,0,4],["autoFilter","AutoFilter",3,6,0,4],["slicers","SlicerCollection",19,17,0,4],["comments","CommentCollection",83,17,0,4],["customProperties","WorksheetCustomPropertyCollection",19,27,0,4],["namedSheetViews","NamedSheetViewCollection",18,19,0,4],["optimization","WorksheetOptimization",2,8,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["visualTracker","VisualTracker",2,28,0,4],["rangeValuesPreview","RangeValuesPreview",66,8,0,4]],[["delete"],["activate",0,2],["calculate",1,0,9],["_RegisterDataChangedEvent",0,0,11,2,0,10],["_UnregisterDataChangedEvent",0,0,11,2,0,10],["_RegisterActivatedEvent",0,0,11,2,0,1],["_UnregisterActivatedEvent",0,0,11,2,0,1],["_RegisterDeactivatedEvent",0,0,11,2,0,1],["_UnregisterDeactivatedEvent",0,0,11,2,0,1],["_RegisterSelectionChangedEvent",0,0,11,2,0,29],["_UnregisterSelectionChangedEvent",0,0,11,2,0,29],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["replaceAll",3,0,6],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,0,17,2,0,1],["_UnregisterRowSortedEvent",0,0,17,2,0,1],["_RegisterColumnSortedEvent",0,0,17,2,0,1],["_UnregisterColumnSortedEvent",0,0,17,2,0,1],["_RegisterSingleClickedEvent",0,0,17,2,0,1],["_UnregisterSingleClickedEvent",0,0,17,2,0,1],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["showOutlineLevels",2,0,17],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,0,30,2,0,1],["_RegisterEventVisibilityChanged",0,0,30,2,0,1],["_UnregisterEventNameChanged",0,0,30,2,0,1],["_UnregisterEventVisibilityChanged",0,0,30,2,0,1],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getRange","Range",1,10,0,4],["getUsedRange","Range",1,10,0,4],["getCell","Range",2,10,0,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getRangeByIndexes","Range",4,10,11,4],["getPrevious","Worksheet",1,10,16,4,0,"_GetSheetById"],["getPreviousOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNext","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNextOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["_GetSheetById","Worksheet",1,2,11,4],["copy","Worksheet",2,0,11,0,0,"_GetAnotherWorksheetById"],["_GetAnotherWorksheetById","Worksheet",1,0,11],["findAll","RangeAreas",2,10,6,4],["findAllOrNullObject","RangeAreas",2,10,6,4],["getRanges","RangeAreas",1,10,6,4],["getUsedRangeAreas","RangeAreas",1,0,3],["getRangeR1C1","Range",1,2,3,4],["getRangesR1C1","RangeAreas",1,2,3,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,0,3]],"workbook.worksheets",0,[["Activated",0,11,"MessageType.worksheetActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","this.id","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,11,"MessageType.worksheetDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","this.id","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","this.id","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","this.id","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","this.id","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["NavigationObjectChanged",0,3,"MessageType.worksheetNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","this.id","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","this.id","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","this.id","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","this.id","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,11,"MessageType.worksheetSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","this.id","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","this.id","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetCollection",1,0,0,[["getCount",1,2,15,4],["_RegisterAddedEvent",0,3,11],["_UnregisterAddedEvent",0,3,11],["_RegisterActivatedEvent",0,3,11],["_UnregisterActivatedEvent",0,0,11,2,0,29],["_RegisterDeactivatedEvent",0,0,11,2,0,29],["_UnregisterDeactivatedEvent",0,0,11,2,0,29],["_RegisterDeletedEvent",0,3,11],["_UnregisterDeletedEvent",0,3,11],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["_RegisterDataChangedEvent",0,3,6],["_UnregisterDataChangedEvent",0,3,6],["_RegisterSelectionChangedEvent",0,0,6,2,0,29],["_UnregisterSelectionChangedEvent",0,0,6,2,0,29],["addFromBase64",4,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,3,17],["_UnregisterRowSortedEvent",0,3,17],["_RegisterColumnSortedEvent",0,3,17],["_UnregisterColumnSortedEvent",0,3,17],["_RegisterSingleClickedEvent",0,0,17,2,0,29],["_UnregisterSingleClickedEvent",0,0,17,2,0,29],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,2,30,4],["_RegisterEventVisibilityChanged",0,2,30,4],["_UnregisterEventNameChanged",0,2,30,4],["_UnregisterEventVisibilityChanged",0,2,30,4],["_RegisterEventMoved",0,0,30,2,0,1],["_UnregisterEventMoved",0,0,30,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getItem","Worksheet",1,18,0,4],["add","Worksheet",1,8,0,2,0,0,29],["getActiveWorksheet","Worksheet",0,2,0,4],["getItemOrNullObject","Worksheet",1,2,15,4],["getFirst","Worksheet",1,10,16,4],["getLast","Worksheet",1,10,16,4]],0,"Worksheet",[["Activated",0,11,"MessageType.worksheetActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,11,"MessageType.worksheetAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,6,"MessageType.worksheetDataChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,11,"MessageType.worksheetDeletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["Moved",0,30,"MessageType.worksheetMovedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventMoved","_UnregisterEventMoved"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,6,"MessageType.worksheetSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetProtection",0,[["protected",3],["options",3],["canPauseProtection",3,19],["isPasswordProtected",3,19],["isPaused",3,19],["savedOptions",3,19]],[["allowEditRanges","AllowEditRangeCollection",19,19,0,4]],[["protect",2,1],["unprotect",1],["checkPassword",1,2,19,4],["pauseProtection",1,0,19],["resumeProtection",0,0,19],["setPassword",1,0,19],["updateOptions",1,0,19]]],["WorksheetFreezePanes",0,0,0,[["unfreeze"],["freezeAt",1],["freezeRows",1],["freezeColumns",1]],[["getLocation","Range",0,10,0,4],["getLocationOrNullObject","Range",0,10,0,4]]],["Range",14,[["numberFormat",5,0,0,2,31],["numberFormatLocal",1,11,0,2,31],["values",5,0,0,2,31],["text",3],["formulas",5,0,0,2,32],["formulasLocal",5,0,0,2,32],["rowIndex",3],["columnIndex",3],["rowCount",3],["columnCount",3],["address",3],["addressLocal",3],["cellCount",3],["_ReferenceId",2],["valueTypes",3],["formulasR1C1",5,13],["hidden",3,13],["rowHidden",1,13,0,2,32],["columnHidden",1,13,0,2,32],["isEntireColumn",3,11],["isEntireRow",3,11],["hyperlink",1,11,0,2,33],["style",1,11,0,2,32],["linkedDataTypeState",3,6],["hasSpill",3,27],["top",3,17],["left",3,17],["height",3,17],["width",3,17],["savedAsArray",3,27],["numberFormatCategories",3,27],["valuesAsJson",5,24],["valuesAsJsonLocal",5,24],["addressR1C1",2,3]],[["format","RangeFormat",35,0,0,4],["worksheet","Worksheet",2,0,0,4],["sort","RangeSort",3,13,0,4],["conditionalFormats","ConditionalFormatCollection",19,9,0,4],["dataValidation","DataValidation",35,5,0,4]],[["clear",1,0,0,2,0,32],["delete",1,0,0,2,0,34],["select",0,2],["_KeepReference",0,2],["merge",1,0,13,2,0,32],["unmerge",0,0,13],["_ValidateArraySize",2,2,14,4],["calculate",0,0,9],["showCard",0,0,11],["getImage",0,2,11,4],["replaceAll",3,0,6,2,0,32],["copyFrom",4,0,6,2,0,26],["convertToLinkedDataType",2,0,6],["convertDataTypeToText",0,0,6],["setDirty",0,0,6],["getCellProperties",1,0,6],["getRowProperties",1,0,6],["getColumnProperties",1,0,6],["setCellProperties",1,0,6],["setRowProperties",1,0,6],["setColumnProperties",1,0,6],["autoFill",2,0,6],["showTeachingCallout",2,0,6],["flashFill",0,0,6],["group",1,0,17],["ungroup",1,0,17],["showGroupDetails",1,0,17],["hideGroupDetails",1,0,17],["moveTo",1,0,7,2,0,26],["getDataClassificationIds",0,2,19,4]],[["getCell","Range",2,10,0,4],["getUsedRange","Range",1,10,0,4],["insert","Range",1,8,0,2,0,0,34],["getEntireColumn","Range",0,10,0,4],["getEntireRow","Range",0,10,0,4],["getOffsetRange","Range",2,10,0,4],["getRow","Range",1,10,0,4],["getColumn","Range",1,10,0,4],["getIntersection","Range",1,10,0,4],["getBoundingRect","Range",1,10,0,4],["getLastCell","Range",0,10,0,4],["getLastColumn","Range",0,10,0,4],["getLastRow","Range",0,10,0,4],["getIntersectionOrNullObject","Range",1,10,15,4],["getRowsAbove","Range",1,11,14,4],["getRowsBelow","Range",1,11,14,4],["getColumnsBefore","Range",1,11,14,4],["getColumnsAfter","Range",1,11,14,4],["getResizedRange","Range",2,11,14,4],["getVisibleView","RangeView",0,2,14,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getSurroundingRegion","Range",0,10,11,4],["getAbsoluteResizedRange","Range",2,10,11,4],["getTables","TableScopedCollection",1,6,6,4],["find","Range",2,10,6,4],["findOrNullObject","Range",2,10,6,4],["removeDuplicates","RemoveDuplicatesResult",2,8,6,2,0,0,33],["getSpecialCells","RangeAreas",2,10,6,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,6,4],["getSpillingToRange","Range",0,10,27,4],["getSpillParent","Range",0,10,27,4],["getSpillingToRangeOrNullObject","Range",0,10,27,4],["getSpillParentOrNullObject","Range",0,10,27,4],["getMergedAreas","RangeAreas",0,10,19,4],["getPivotTables","PivotTableScopedCollection",1,6,27,4],["getPrecedents","WorkbookRangeAreas",0,10,18,4],["getDirectPrecedents","WorkbookRangeAreas",0,10,27,4],["getDependents","WorkbookRangeAreas",0,10,35,4],["getDirectDependents","WorkbookRangeAreas",0,10,23,4],["getExtendedRange","Range",2,10,23,4],["getRangeEdge","Range",2,10,23,4],["getNumberFormatProperties","NumberFormatPropertyCollection",0,6,8,4],["getSurroundingDataRegion","Range",0,2,8,4],["getMergedAreasOrNullObject","RangeAreas",0,0,23,2,0,0,31]]],["RangeAreas",2,[["_ReferenceId",2],["address",3],["addressLocal",3],["areaCount",3],["cellCount",3],["isEntireColumn",3],["isEntireRow",3],["style",1],["addressR1C1",2,3]],[["areas","RangeCollection",19,0,0,4],["conditionalFormats","ConditionalFormatCollection",19,0,0,4],["format","RangeFormat",35,0,0,4],["dataValidation","DataValidation",35,0,0,4],["worksheet","Worksheet",2,0,0,4]],[["_KeepReference",0,2],["calculate"],["clear",1],["setDirty"],["copyFrom",4],["convertToLinkedDataType",2],["convertDataTypeToText"],["select",0,2,8]],[["getEntireColumn","RangeAreas",0,10,0,4],["getEntireRow","RangeAreas",0,10,0,4],["getIntersection","RangeAreas",1,10,0,4],["getIntersectionOrNullObject","RangeAreas",1,10,0,4],["getOffsetRangeAreas","RangeAreas",2,10,0,4],["getUsedRangeAreas","RangeAreas",1,10,0,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,10,0,4],["getTables","TableScopedCollection",1,6,0,4],["getSpecialCells","RangeAreas",2,10,0,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,0,4]]],["WorkbookRangeAreas",2,[["_ReferenceId",2],["addresses",3]],[["ranges","RangeCollection",19,0,0,4],["areas","RangeAreasCollection",19,0,0,4]],[["_KeepReference",0,2]],[["getRangeAreasBySheet","RangeAreas",1,10,0,4],["getRangeAreasOrNullObjectBySheet","RangeAreas",1,10,0,4]]],["RangeView",0,[["numberFormat",1],["values",1],["text",3],["formulas",1],["formulasLocal",1],["formulasR1C1",1],["valueTypes",3],["rowCount",3],["columnCount",3],["cellAddresses",3],["index",3],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["rows","RangeViewCollection",19,0,0,4]],0,[["getRange","Range",0,10,0,4]]],["RangeViewCollection",1,0,0,[["getCount",0,2,15,4]],[["getItemAt","RangeView",1,2,0,4]],0,"RangeView"],["SettingCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Setting",1,18,0,4],["add","Setting",2,9],["getItemOrNullObject","Setting",1,2,0,4]],0,"Setting",[["SettingsChanged",3,0,"_CC.office10EventIdSettingsChangedEvent","","",""]]],["Setting",8,[["key",3],["value",5],["_Id",2]],0,[["delete"]]],["NamedItemCollection",5,0,0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","NamedItem",1,18,0,4],["getItemOrNullObject","NamedItem",1,2,15,4],["add","NamedItem",3,8,15],["addFormulaLocal","NamedItem",3,0,15]],0,"NamedItem",[["Added",0,3,"MessageType.namedItemAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.namedItemDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["NamedItem",0,[["name",3],["type",3],["value",3],["visible",1],["_Id",2],["comment",1,15],["scope",3,15],["formula",1,11],["valueAsJson",3,24],["valueAsJsonLocal",3,24]],[["worksheet","Worksheet",2,15,0,4],["worksheetOrNullObject","Worksheet",2,15,0,4],["arrayValues","NamedItemArrayValues",3,11,0,4]],[["delete",0,0,15]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,15,4]]],["NamedItemArrayValues",0,[["values",3],["types",3],["valuesAsJson",3,24],["valuesAsJsonLocal",3,24]]],["Binding",0,[["id",3],["type",3]],0,[["getText",0,2,0,4],["delete",0,0,14]],[["getTable","Table",0,2,0,4],["getRange","Range",0,2,0,4]],0,0,[["DataChanged",3,14,"_CC.office10EventIdBindingDataChangedEvent","this.id","",""],["SelectionChanged",3,14,"_CC.office10EventIdBindingSelectionChangedEvent","this.id","",""]]],["BindingCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","Binding",1,18,0,4],["getItemAt","Binding",1,2,0,4],["add","Binding",3,8,14],["addFromNamedItem","Binding",3,0,14],["addFromSelection","Binding",2,0,14],["getItemOrNullObject","Binding",1,2,15,4]],0,"Binding"],["TableCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["_RegisterAddedEvent",0,0,6,2,0,1],["_UnregisterAddedEvent",0,0,6,2,0,1],["_RegisterDeletedEvent",0,0,6,2,0,1],["_UnregisterDeletedEvent",0,0,6,2,0,1],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1]],[["getItem","Table",1,18,0,4],["getItemAt","Table",1,2,0,4],["add","Table",2,8,0,2,0,0,33],["getItemOrNullObject","Table",1,2,15,4],["addQueryTable","Table",2,0,8]],0,"Table",[["Added",0,6,"MessageType.tableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",2,11,"MessageType.tableDataChangedEvent","this._eventTargetId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Deleted",0,6,"MessageType.tableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this._eventTargetId","_RegisterFilteredEvent","_UnregisterFilteredEvent"]]],["TableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getFirst","Table",0,10,0,4],["getItem","Table",1,18,0,4],["getItemOrNullObject","Table",1,2,18,4]],0,"Table"],["Table",24,[["id",3],["name",1,0,0,2,26],["showHeaders",1,0,0,2,33],["showTotals",1,0,0,2,33],["style",1,0,0,2,33],["highlightFirstColumn",1,14,0,2,33],["highlightLastColumn",1,14,0,2,33],["showBandedRows",1,14,0,2,33],["showBandedColumns",1,14,0,2,33],["showFilterButton",1,14,0,2,33],["legacyId",3,5]],[["columns","TableColumnCollection",19,0,0,4],["rows","TableRowCollection",19,0,0,4],["sort","TableSort",3,13,0,4],["worksheet","Worksheet",2,13,0,4],["autoFilter","AutoFilter",3,6,0,4],["tableStyle","TableStyle",35,8,0,4]],[["delete",0,0,0,2,0,26],["clearFilters",0,0,13],["reapplyFilters",0,0,13,2,0,26],["_RegisterSelectionChangedEvent",0,0,11,2,0,1],["_UnregisterSelectionChangedEvent",0,0,11,2,0,1],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["clearStyle",0,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["resize",1,0,23,2,0,26],["setStyle",1,0,8]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4],["convertToRange","Range",0,8,13,2,0,0,26]],"workbook.tables",0,[["Changed",2,11,"MessageType.tableDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["SelectionChanged",2,11,"MessageType.tableSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["TableColumnCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","TableColumn",1,18,0,4],["getItemAt","TableColumn",1,2,0,4],["add","TableColumn",3,8,0,2,0,0,34],["getItemOrNullObject","TableColumn",1,2,15,4],["addAsJson","TableColumn",3,0,24]],0,"TableColumn"],["TableColumn",0,[["id",3],["index",3],["values",1],["name",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["filter","Filter",3,13,0,4]],[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4]]],["TableRowCollection",1,[["count",3]],0,[["getCount",0,2,15,4],["deleteRows",1,0,19],["deleteRowsAt",2,0,19,2,0,26]],[["getItemAt","TableRow",1,2,0,4],["add","TableRow",3,8,0,2,0,0,34],["addAsJson","TableRow",3,0,24]],0,"TableRow"],["TableRow",0,[["index",3],["values",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],0,[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4]]],["DataValidation",0,[["type",3],["rule",1],["prompt",1],["errorAlert",1],["ignoreBlanks",1],["valid",3]],0,[["clear"]],[["getInvalidCells","RangeAreas",0,10,6,4],["getInvalidCellsOrNullObject","RangeAreas",0,10,6,4]]],["RemoveDuplicatesResult",0,[["removed",3],["uniqueRemaining",3]]],["RangeFormat",0,[["wrapText",1,0,0,2,32],["horizontalAlignment",1,0,0,2,32],["verticalAlignment",1,0,0,2,32],["columnWidth",1,13,0,2,32],["rowHeight",1,13,0,2,32],["textOrientation",1,11,0,2,32],["useStandardHeight",1,11],["useStandardWidth",1,11],["readingOrder",1,6],["shrinkToFit",1,6],["indentLevel",1,6,0,2,32],["autoIndent",1,6]],[["fill","RangeFill",35,0,0,4],["font","RangeFont",35,0,0,4],["borders","RangeBorderCollection",51,0,0,4],["protection","FormatProtection",35,13,0,4]],[["autofitColumns",0,0,13,2,0,32],["autofitRows",0,0,13,2,0,32],["adjustIndent",1,0,7,2,0,34]]],["FormatProtection",0,[["locked",1],["formulaHidden",1]]],["RangeFill",0,[["color",1,0,0,2,32],["tintAndShade",1,6],["patternTintAndShade",1,6],["pattern",1,6],["patternColor",1,6]],0,[["clear",0,0,0,2,0,32]]],["RangeBorder",0,[["sideIndex",3],["style",1,0,0,2,32],["weight",1,0,0,2,32],["color",1,0,0,2,32],["tintAndShade",1,6]]],["RangeBorderCollection",1,[["count",3],["tintAndShade",1,6]],0,0,[["getItem","RangeBorder",1,18,0,4],["getItemAt","RangeBorder",1,2,0,4]],0,"RangeBorder"],["RangeFont",0,[["name",1,0,0,2,32],["size",1,0,0,2,32],["color",1,0,0,2,12],["italic",1,0,0,2,32],["bold",1,0,0,2,32],["underline",1,0,0,2,32],["strikethrough",1,6,0,2,32],["subscript",1,6],["superscript",1,6],["tintAndShade",1,6]]],["ChartCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,5,2,0,1],["_UnregisterAddedEvent",0,0,5,2,0,1],["_RegisterActivatedEvent",0,0,5,2,0,29],["_UnregisterActivatedEvent",0,0,5,2,0,29],["_RegisterDeactivatedEvent",0,0,5,2,0,29],["_UnregisterDeactivatedEvent",0,0,5,2,0,29],["_RegisterDeletedEvent",0,0,5,2,0,29],["_UnregisterDeletedEvent",0,0,5,2,0,29]],[["add","Chart",3,9,0,2,0,0,36],["getItemAt","Chart",1,2,0,4],["_GetItem","Chart",1,18,0,4],["getItem","Chart",1,2,0,4],["getItemOrNullObject","Chart",1,2,15,4]],0,"Chart",[["Activated",0,5,"MessageType.chartActivatedEvent","this._ParentObject.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,5,"MessageType.chartAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this._ParentObject.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,5,"MessageType.chartDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Chart",0,[["name",1,0,0,2,37],["top",1,0,0,2,36],["left",1,0,0,2,36],["width",1,0,0,2,36],["height",1,0,0,2,36],["id",3,11],["showAllFieldButtons",1,11,0,2,36],["chartType",1,11,0,2,37],["showDataLabelsOverMaximum",1,5,0,2,37],["categoryLabelLevel",1,5,0,2,37],["style",1,5,0,2,37],["displayBlanksAs",1,5,0,2,37],["plotBy",1,5,0,2,37],["plotVisibleOnly",1,5,0,2,37],["seriesNameLevel",1,5,0,2,37]],[["title","ChartTitle",35,0,0,4],["dataLabels","ChartDataLabels",35,0,0,4],["legend","ChartLegend",35,0,0,4],["series","ChartSeriesCollection",19,0,0,4],["axes","ChartAxes",35,0,0,4],["format","ChartAreaFormat",35,0,0,4],["worksheet","Worksheet",2,13,0,4],["plotArea","ChartPlotArea",35,5,0,4],["pivotOptions","ChartPivotOptions",35,6,0,4]],[["setData",2,1,0,2,0,36],["delete",0,0,0,2,0,36],["setPosition",2,0,0,2,0,36],["getImage",3,2,13,4],["_RegisterActivatedEvent",0,0,5,2,0,1],["_UnregisterActivatedEvent",0,0,5,2,0,1],["_RegisterDeactivatedEvent",0,0,5,2,0,1],["_UnregisterDeactivatedEvent",0,0,5,2,0,1],["activate",0,2,6],["getDataRange",0,0,28],["getDataRangeOrNullObject",0,0,28]],[["getDataTable","ChartDataTable",0,2,18,4],["getDataTableOrNullObject","ChartDataTable",0,2,18,4]],0,0,[["Activated",0,5,"MessageType.chartActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["ChartPivotOptions",0,[["showAxisFieldButtons",1,0,0,2,37],["showLegendFieldButtons",1,0,0,2,37],["showReportFilterFieldButtons",1,0,0,2,37],["showValueFieldButtons",1,0,0,2,37]]],["ChartAreaFormat",0,[["roundedCorners",1,6,0,2,37],["colorScheme",1,6,0,2,37]],[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartSeriesCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartSeries",1,2,0,4],["add","ChartSeries",2,8,11,2,0,0,36]],0,"ChartSeries"],["ChartSeries",0,[["name",1,0,0,2,36],["chartType",1,11,0,2,10],["hasDataLabels",1,11,0,2,37],["filtered",1,11,0,2,37],["markerSize",1,11,0,2,36],["markerStyle",1,11,0,2,36],["showShadow",1,11,0,2,37],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36],["smooth",1,11,0,2,37],["plotOrder",1,11,0,2,37],["gapWidth",1,11,0,2,36],["doughnutHoleSize",1,11,0,2,36],["axisGroup",1,5,0,2,36],["explosion",1,5,0,2,37],["firstSliceAngle",1,5,0,2,37],["invertIfNegative",1,5,0,2,37],["bubbleScale",1,6,0,2,37],["secondPlotSize",1,5,0,2,37],["splitType",1,5,0,2,37],["splitValue",1,6,0,2,37],["varyByCategories",1,5,0,2,37],["showLeaderLines",1,6,0,2,37],["overlap",1,5,0,2,36],["gradientStyle",1,6,0,2,37],["gradientMinimumType",1,6,0,2,37],["gradientMidpointType",1,6,0,2,37],["gradientMaximumType",1,6,0,2,37],["gradientMinimumValue",1,6,0,2,37],["gradientMidpointValue",1,6,0,2,37],["gradientMaximumValue",1,6,0,2,37],["gradientMinimumColor",1,6,0,2,37],["gradientMidpointColor",1,6,0,2,37],["gradientMaximumColor",1,6,0,2,37],["parentLabelStrategy",1,6,0,2,37],["showConnectorLines",1,6,0,2,37],["invertColor",1,6,0,2,37]],[["points","ChartPointsCollection",19,0,0,4],["format","ChartSeriesFormat",35,0,0,4],["trendlines","ChartTrendlineCollection",19,11,0,4],["xErrorBars","ChartErrorBars",35,6,0,4],["yErrorBars","ChartErrorBars",35,6,0,4],["dataLabels","ChartDataLabels",35,5,0,4],["binOptions","ChartBinOptions",35,6,0,4],["mapOptions","ChartMapOptions",35,6,0,4],["boxwhiskerOptions","ChartBoxwhiskerOptions",35,6,0,4]],[["delete",0,0,11,2,0,36],["setXAxisValues",1,0,11,2,0,36],["setValues",1,0,11,2,0,36],["setBubbleSizes",1,0,11,2,0,37],["getDimensionValues",1,0,27,2,0,37],["getDimensionDataSourceString",1,0,35],["getDimensionDataSourceType",1,0,35]]],["ChartSeriesFormat",0,0,[["fill","ChartFill",3,0,0,4],["line","ChartLineFormat",35,0,0,4]]],["ChartPointsCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartPoint",1,2,0,4]],0,"ChartPoint"],["ChartPoint",0,[["value",3],["hasDataLabel",1,11,0,2,37],["markerStyle",1,11,0,2,36],["markerSize",1,11,0,2,36],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36]],[["format","ChartPointFormat",35,0,0,4],["dataLabel","ChartDataLabel",35,11,0,4]]],["ChartPointFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartAxes",0,0,[["categoryAxis","ChartAxis",35,0,0,4],["seriesAxis","ChartAxis",35,0,0,4],["valueAxis","ChartAxis",35,0,0,4]],0,[["getItem","ChartAxis",2,2,11,4]]],["ChartAxis",0,[["majorUnit",1,0,0,2,37],["maximum",1,0,0,2,36],["minimum",1,0,0,2,36],["minorUnit",1,0,0,2,37],["displayUnit",1,11,0,2,36],["showDisplayUnitLabel",1,11,0,2,37],["customDisplayUnit",3,11],["type",3,11],["minorTimeUnitScale",1,11,0,2,37],["majorTimeUnitScale",1,11,0,2,37],["baseTimeUnit",1,11,0,2,37],["categoryType",1,11,0,2,37],["axisGroup",3,11],["scaleType",1,11,0,2,37],["logBase",1,11,0,2,37],["left",3,11],["top",3,11],["height",3,11],["width",3,11],["reversePlotOrder",1,11,0,2,36],["crosses",1,11,0,2,36],["crossesAt",3,11],["visible",1,11,0,2,37],["isBetweenCategories",1,5,0,2,36],["majorTickMark",1,11,0,2,37],["minorTickMark",1,11,0,2,37],["tickMarkSpacing",1,11,0,2,37],["tickLabelPosition",1,11,0,2,36],["tickLabelSpacing",1,11,0,2,37],["alignment",1,5,0,2,37],["multiLevel",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["offset",1,5,0,2,37],["textOrientation",1,5,0,2,37],["position",1,5,0,2,36],["positionAt",3,5]],[["majorGridlines","ChartGridlines",35,0,0,4],["minorGridlines","ChartGridlines",35,0,0,4],["title","ChartAxisTitle",35,0,0,4],["format","ChartAxisFormat",35,0,0,4]],[["setCategoryNames",1,0,11,2,0,37],["setCustomDisplayUnit",1,0,11,2,0,37],["setCrossesAt",1,0,11,2,0,37],["setPositionAt",1,0,5,2,0,37]]],["ChartAxisFormat",0,0,[["font","ChartFont",35,0,0,4],["line","ChartLineFormat",35,0,0,4],["fill","ChartFill",3,5,0,4]]],["ChartAxisTitle",0,[["text",1,0,0,2,36],["visible",1,0,0,2,37],["textOrientation",1,27,0,2,37]],[["format","ChartAxisTitleFormat",35,0,0,4]],[["setFormula",1,0,5,2,0,37]]],["ChartAxisTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,5,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataLabels",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["textOrientation",1,5,0,2,37],["autoText",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["showAsDataCallout",3,8,0,2,37],["geometricShapeType",1,8,0,2,37]],[["format","ChartDataLabelFormat",35,0,0,4]]],["ChartDataLabel",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["top",1,5,0,2,37],["left",1,5,0,2,37],["width",3,5],["height",3,5],["formula",1,5,0,2,37],["textOrientation",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["text",1,5,0,2,37],["autoText",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["geometricShapeType",1,8,0,2,37],["showAsDataCallout",3,8,0,2,37]],[["format","ChartDataLabelFormat",35,5,0,4]],0,[["getSubstring","ChartFormatString",2,2,8,4]]],["ChartDataLabelFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataTable",0,[["visible",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showHorizontalBorder",1,0,0,2,37],["showVerticalBorder",1,0,0,2,37],["showOutlineBorder",1,0,0,2,37]],[["format","ChartDataTableFormat",35,0,0,4]]],["ChartDataTableFormat",0,0,[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,0,0,4]]],["ChartErrorBars",0,[["endStyleCap",1,0,0,2,37],["include",1,0,0,2,37],["type",1,0,0,2,37],["visible",1,0,0,2,37]],[["format","ChartErrorBarsFormat",35,0,0,4]]],["ChartErrorBarsFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartGridlines",0,[["visible",1,0,0,2,36]],[["format","ChartGridlinesFormat",35,0,0,4]]],["ChartGridlinesFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartLegend",0,[["visible",1,0,0,2,36],["position",1,0,0,2,36],["overlay",1,0,0,2,37],["left",1,11,0,2,37],["top",1,11,0,2,37],["width",1,11,0,2,37],["height",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartLegendFormat",35,0,0,4],["legendEntries","ChartLegendEntryCollection",19,11,0,4]]],["ChartLegendEntry",0,[["visible",1,0,0,2,37],["left",3,5],["top",3,5],["width",3,5],["height",3,5],["index",3,5]]],["ChartLegendEntryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","ChartLegendEntry",1,2,0,4]],0,"ChartLegendEntry"],["ChartLegendFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartMapOptions",0,[["level",1,0,0,2,37],["labelStrategy",1,0,0,2,37],["projectionType",1,0,0,2,37]]],["ChartTitle",0,[["visible",1,0,0,2,37],["text",1,0,0,2,36],["overlay",1,0,0,2,37],["horizontalAlignment",1,11,0,2,37],["top",1,11,0,2,37],["left",1,11,0,2,37],["width",3,11],["height",3,11],["verticalAlignment",1,11,0,2,37],["textOrientation",1,11,0,2,37],["position",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartTitleFormat",35,0,0,4]],[["setFormula",1,0,11,2,0,37]],[["getSubstring","ChartFormatString",2,2,11,4]]],["ChartFormatString",0,0,[["font","ChartFont",35,0,0,4]]],["ChartTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartFill",4,0,0,[["setSolidColor",1,0,0,2,0,36],["clear",0,0,0,2,0,37],["getSolidColor",0,0,24,2,0,37]]],["ChartBorder",0,[["color",1,0,0,2,36],["lineStyle",1,0,0,2,36],["weight",1,0,0,2,36]],0,[["clear",0,0,5,2,0,37]]],["ChartBinOptions",0,[["type",1,0,0,2,36],["width",1,0,0,2,36],["count",1,0,0,2,36],["allowOverflow",1,0,0,2,37],["allowUnderflow",1,0,0,2,37],["overflowValue",1,0,0,2,36],["underflowValue",1,0,0,2,36]]],["ChartBoxwhiskerOptions",0,[["showInnerPoints",1,0,0,2,37],["showOutlierPoints",1,0,0,2,37],["showMeanMarker",1,0,0,2,37],["showMeanLine",1,0,0,2,37],["quartileCalculation",1,0,0,2,37]]],["ChartLineFormat",0,[["color",1,0,0,2,36],["lineStyle",1,11,0,2,36],["weight",1,11,0,2,36]],0,[["clear",0,0,0,2,0,37]]],["ChartFont",0,[["bold",1,0,0,2,37],["color",1,0,0,2,36],["italic",1,0,0,2,37],["name",1,0,0,2,37],["size",1,0,0,2,37],["underline",1,0,0,2,37]]],["ChartTrendline",0,[["type",1,0,0,2,37],["polynomialOrder",1,0,0,2,37],["movingAveragePeriod",1,0,0,2,37],["_Id",2],["showEquation",1,5,0,2,37],["showRSquared",1,5,0,2,37],["forwardPeriod",1,5,0,2,37],["backwardPeriod",1,5,0,2,37],["name",1,0,0,2,37],["intercept",1,0,0,2,37]],[["format","ChartTrendlineFormat",35,0,0,4],["label","ChartTrendlineLabel",35,5,0,4]],[["delete",0,0,0,2,0,37]]],["ChartTrendlineCollection",1,0,0,[["getCount",0,2,0,4]],[["add","ChartTrendline",1,8,0,2,0,0,36],["getItem","ChartTrendline",1,18,0,4]],0,"ChartTrendline"],["ChartTrendlineFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartTrendlineLabel",0,[["top",1,0,0,2,37],["left",1,0,0,2,37],["width",3],["height",3],["formula",1,0,0,2,37],["textOrientation",1,0,0,2,37],["horizontalAlignment",1,0,0,2,37],["verticalAlignment",1,0,0,2,37],["text",1,0,0,2,37],["autoText",1,0,0,2,37],["numberFormat",1,0,0,2,37],["linkNumberFormat",1,6,0,2,37]],[["format","ChartTrendlineLabelFormat",35,0,0,4]]],["ChartTrendlineLabelFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,0,0,4],["font","ChartFont",35,0,0,4]]],["ChartPlotArea",0,[["left",1,0,0,2,37],["top",1,0,0,2,37],["width",1,0,0,2,37],["height",1,0,0,2,37],["insideLeft",1,0,0,2,37],["insideTop",1,0,0,2,37],["insideWidth",1,0,0,2,37],["insideHeight",1,0,0,2,37],["position",1,0,0,2,37]],[["format","ChartPlotAreaFormat",35,0,0,4]]],["ChartPlotAreaFormat",0,0,[["border","ChartBorder",35,0,0,4],["fill","ChartFill",3,0,0,4]]],["VisualCollection",5,0,0,[["getDefinitions",0,2,0,4],["getPreview",4,2,0,4],["bootstrapAgaveVisual",0,0,0,2],["getCount",0,2,0,4],["_RegisterSelectionChangedEvent",0,2],["_UnregisterSelectionChangedEvent",0,2]],[["add","Visual",3,8,0,2],["_GetItem","Visual",1,18,0,4],["getSelectedOrNullObject","Visual",0,2,0,4]],0,"Visual",[["AgaveVisualUpdate",2,0,"MessageType.agaveVisualUpdateEvent","","null","null"],["SelectionChanged",0,0,"MessageType.visualSelectionChangedEvent","this._ParentObject.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["Visual",0,[["id",3],["isSupportedInVisualTaskpane",3]],[["properties","VisualPropertyCollection",18,0,0,4]],[["delete",0,0,0,2],["getProperty",1,2,0,4],["setProperty",2,0,0,2],["changeDataSource",2,0,0,2],["getDataSource",0,2,0,4],["setPropertyToDefault",1,0,0,2],["_RegisterChangeEvent",0,2],["_UnregisterChangeEvent",0,2],["serializeProperties",0,2,0,4],["deserializeProperties",1,0,0,2],["addChildProperty",2,0,19,2],["removeChildProperty",2,0,19,2],["getDataFieldAssignments",0,0,3],["getDataConfig",0,2,3,4],["modifyDataConfig",1,0,3,2]],[["getChildProperties","VisualPropertyCollection",2,6,0,4],["getDataControllerClient","DataControllerClient",0,2,0,4],["getElementChildProperties","VisualPropertyCollection",3,6,0,4]],0,0,[["ChangeNotification",2,0,"MessageType.visualChangeEvent","this.id","_RegisterChangeEvent","_UnregisterChangeEvent"]]],["VisualProperty",0,[["type",3],["value",3],["id",3],["localizedName",3],["options",3],["localizedOptions",3],["hasDefault",3],["isDefault",3],["min",3],["max",3],["stepSize",3],["hideMeButShowChildrenUI",3],["expandableUI",3],["nextPropOnSameLine",3],["showResetUI",3],["size",3,19],["minSize",3,19],["maxSize",3,19],["index",3,19],["parentName",3,19]],0,[["getBoolMetaProperty",1,2,0,4]]],["VisualPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","VisualProperty",1,18,0,4],["getItemAt","VisualProperty",1,2,0,4]],0,"VisualProperty"],["DataControllerClient",0,0,0,[["getWells",0,2,0,4],["getAssociatedFields",1,2,0,4],["getAvailableFields",1,2,0,4],["addField",3,0,0,2],["removeField",2,0,0,2],["moveField",3,0,0,2]]],["RangeSort",0,0,0,[["apply",5,0,0,2,0,32]]],["TableSort",0,[["matchCase",3],["method",3],["fields",3]],0,[["apply",3,0,0,2,0,26],["clear"],["reapply"]]],["Filter",0,[["criteria",3]],0,[["apply",1],["clear",0,0,0,2,0,34],["applyBottomItemsFilter",1,0,0,2,0,34],["applyBottomPercentFilter",1,0,0,2,0,34],["applyCellColorFilter",1,0,0,2,0,34],["applyDynamicFilter",1,0,0,2,0,34],["applyFontColorFilter",1,0,0,2,0,34],["applyValuesFilter",1,0,0,2,0,34],["applyTopItemsFilter",1,0,0,2,0,34],["applyTopPercentFilter",1,0,0,2,0,34],["applyIconFilter",1,0,0,2,0,34],["applyCustomFilter",3,0,0,2,0,34]]],["AutoFilter",0,[["enabled",3],["isDataFiltered",3],["criteria",3]],0,[["apply",3,0,0,2,0,33],["reapply",0,0,0,2,0,26],["remove",0,0,0,2,0,26],["clearCriteria",0,0,0,2,0,26],["clearColumnCriteria",1,0,18]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4]]],["CultureInfo",0,[["name",3]],[["numberFormat","NumberFormatInfo",3,0,0,4],["datetimeFormat","DatetimeFormatInfo",3,27,0,4]]],["NumberFormatInfo",0,[["numberDecimalSeparator",3],["numberGroupSeparator",3],["currencySymbol",3,30]]],["DatetimeFormatInfo",0,[["dateSeparator",3],["longDatePattern",3],["shortDatePattern",3],["timeSeparator",3],["longTimePattern",3]]],["CustomXmlPartScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4],["getOnlyItem","CustomXmlPart",0,2,0,4],["getOnlyItemOrNullObject","CustomXmlPart",0,2,0,4]],0,"CustomXmlPart"],["CustomXmlPartCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["add","CustomXmlPart",1,8],["getByNamespace","CustomXmlPartScopedCollection",1,6,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4]],0,"CustomXmlPart"],["CustomXmlPart",0,[["id",3],["namespaceUri",3]],0,[["delete"],["getXml",0,2,0,4],["setXml",1]]],["_V1Api",0,0,0,[["bindingGetData",1,2,0,4],["getSelectedData",1,2,0,4],["gotoById",1,2,0,4],["bindingAddFromSelection",1,2],["bindingGetById",1,2,0,4],["bindingReleaseById",1,2],["bindingGetAll",0,2,0,4],["bindingAddFromNamedItem",1,2],["bindingAddFromPrompt",1,2],["bindingDeleteAllDataValues",1],["setSelectedData",1],["bindingClearFormats",1],["bindingSetData",1],["bindingSetFormats",1],["bindingSetTableOptions",1],["bindingAddRows",1],["bindingAddColumns",1],["getFilePropertiesAsync",0,2,9,4]]],["PivotTableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotTable",1,18,0,4],["getFirst","PivotTable",0,10,0,4],["getItemOrNullObject","PivotTable",1,2,0,4],["getFirstOrNullObject","PivotTable",0,2,35,4]],0,"PivotTable"],["PivotTableCollection",5,0,0,[["refreshAll",0,0,0,2,0,12],["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","PivotTable",1,18,0,4],["getItemOrNullObject","PivotTable",1,2,15,4],["add","PivotTable",3,8,5,2,0,0,12]],0,"PivotTable",[["Added",0,3,"MessageType.pivotTableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.pivotTableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["PivotTable",0,[["name",1,0,0,2,12],["id",3,16],["useCustomSortLists",1,6,0,2,12],["enableDataValueEditing",1,6,0,2,12],["refreshOnOpen",0,23,0,2,29],["allowMultipleFiltersPerField",0,27,0,2,12]],[["worksheet","Worksheet",2,0,0,4],["hierarchies","PivotHierarchyCollection",19,5,0,4],["rowHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["columnHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["dataHierarchies","DataPivotHierarchyCollection",19,5,0,4],["filterHierarchies","FilterPivotHierarchyCollection",19,5,0,4],["layout","PivotLayout",2,5,0,4]],[["refresh",0,0,0,2,0,12],["delete",0,0,5,2,0,12],["getDataSourceString",0,2,35,4],["getDataSourceType",0,2,35,4]],[["addDateGroup","PivotHierarchy",2,0,8,2,0,0,38]]],["PivotLayout",0,[["showColumnGrandTotals",1,0,0,2,12],["showRowGrandTotals",1,0,0,2,12],["enableFieldList",1,17,0,2,12],["subtotalLocation",1,0,0,2,12],["layoutType",1,0,0,2,12],["autoFormat",1,6,0,2,12],["preserveFormatting",1,6,0,2,12],["altTextDescription",0,23,0,2,29],["altTextTitle",0,23,0,2,29],["emptyCellText",0,23,0,2,29],["fillEmptyCells",0,23,0,2,29],["showFieldHeaders",0,23,0,2,29],["tabularValues",3,8],["tabularText",3,8],["tabularNumberFormat",3,8],["tabularNumberFormatLocal",3,8]],[["pivotStyle","PivotTableStyle",35,8,0,4]],[["setAutoSortOnCell",2,0,6,2,0,12],["setStyle",1,0,8,2,0,12],["displayBlankLineAfterEachItem",1,0,23,2,0,29],["repeatAllItemLabels",1,0,23,2,0,29]],[["getRange","Range",0,3],["getRowLabelRange","Range",0,3],["getColumnLabelRange","Range",0,3],["getFilterAxisRange","Range",0,3],["getDataBodyRange","Range",0,3],["getCell","Range",3,2,8],["getPivotItems","PivotItemCollection",2,4,6],["getDataHierarchy","DataPivotHierarchy",1,3,6]]],["PivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotHierarchy",1,18,0,4],["getItemOrNullObject","PivotHierarchy",1,2,0,4]],0,"PivotHierarchy"],["PivotHierarchy",0,[["id",3],["name",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]]],["RowColumnPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","RowColumnPivotHierarchy",1,18,0,4],["getItemOrNullObject","RowColumnPivotHierarchy",1,2,0,4],["add","RowColumnPivotHierarchy",1,8,0,2,0,0,12]],0,"RowColumnPivotHierarchy"],["RowColumnPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["FilterPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","FilterPivotHierarchy",1,18,0,4],["getItemOrNullObject","FilterPivotHierarchy",1,2,0,4],["add","FilterPivotHierarchy",1,8,0,2,0,0,12]],0,"FilterPivotHierarchy"],["FilterPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["enableMultipleFilterItems",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["DataPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","DataPivotHierarchy",1,18,0,4],["getItemOrNullObject","DataPivotHierarchy",1,2,0,4],["add","DataPivotHierarchy",1,8,0,2,0,0,12]],0,"DataPivotHierarchy"],["DataPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["numberFormat",1,0,0,2,12],["summarizeBy",1,0,0,2,12],["showAs",1,0,0,2,12]],[["field","PivotField",35,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["PivotFieldCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotField",1,18,0,4],["getItemOrNullObject","PivotField",1,2,0,4]],0,"PivotField"],["PivotField",0,[["id",3],["name",1,0,0,2,12],["subtotals",1,0,0,2,12],["showAllItems",1,0,0,2,12]],[["items","PivotItemCollection",19,0,0,4]],[["sortByLabels",1,1,0,2,0,12],["sortByValues",3,0,6,2,0,12],["applyFilter",1,0,27,2,0,12],["clearAllFilters",0,0,27,2,0,12],["clearFilter",1,0,27,2,0,12],["getFilters",0,0,27],["isFiltered",1,0,27]]],["PivotItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotItem",1,18,0,4],["getItemOrNullObject","PivotItem",1,2,0,4]],0,"PivotItem"],["PivotItem",0,[["id",3],["name",1,0,0,2,12],["isExpanded",1,0,0,2,12],["visible",1,0,0,2,12]]],["WorksheetCustomProperty",0,[["key",3],["value",1],["_Id",2]],0,[["delete"]]],["WorksheetCustomPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","WorksheetCustomProperty",1,18,0,4],["getItemOrNullObject","WorksheetCustomProperty",1],["add","WorksheetCustomProperty",2,8]],0,"WorksheetCustomProperty"],["DocumentProperties",0,[["title",1],["subject",1],["author",1],["keywords",1],["comments",1],["lastAuthor",3],["revisionNumber",1],["creationDate",11],["category",1],["manager",1],["company",1]],[["custom","CustomPropertyCollection",19,0,0,4]]],["CustomProperty",0,[["key",3],["value",1],["type",3]],0,[["delete"]]],["CustomPropertyCollection",1,0,0,[["getCount",0,2,0,4],["deleteAll"]],[["getItemOrNullObject","CustomProperty",1,2,0,4],["add","CustomProperty",2,8],["getItem","CustomProperty",1,18,0,4]],0,"CustomProperty"],["ConditionalFormatCollection",1,0,0,[["getCount",0,2,0,4],["clearAll",0,0,0,2,0,39]],[["getItemAt","ConditionalFormat",1,2,0,4],["add","ConditionalFormat",1,8,0,2,0,0,39],["getItem","ConditionalFormat",1,18,0,4],["getItemOrNullObject","ConditionalFormat",1,2,18,4]],0,"ConditionalFormat"],["ConditionalFormat",0,[["stopIfTrue",1],["priority",1],["type",3],["id",3]],[["dataBarOrNullObject","DataBarConditionalFormat",35,0,0,4],["dataBar","DataBarConditionalFormat",35,0,0,4],["customOrNullObject","CustomConditionalFormat",35,0,0,4],["custom","CustomConditionalFormat",35,0,0,4],["iconSet","IconSetConditionalFormat",35,0,0,4],["iconSetOrNullObject","IconSetConditionalFormat",35,0,0,4],["colorScale","ColorScaleConditionalFormat",35,0,0,4],["colorScaleOrNullObject","ColorScaleConditionalFormat",35,0,0,4],["topBottom","TopBottomConditionalFormat",35,0,0,4],["topBottomOrNullObject","TopBottomConditionalFormat",35,0,0,4],["preset","PresetCriteriaConditionalFormat",35,0,0,4],["presetOrNullObject","PresetCriteriaConditionalFormat",35,0,0,4],["textComparison","TextConditionalFormat",35,0,0,4],["textComparisonOrNullObject","TextConditionalFormat",35,0,0,4],["cellValue","CellValueConditionalFormat",35,0,0,4],["cellValueOrNullObject","CellValueConditionalFormat",35,0,0,4]],[["delete",0,0,0,2,0,40],["changeRuleToCellValue",1,0,30],["changeRuleToColorScale",0,0,30],["changeRuleToContainsText",1,0,30],["changeRuleToCustom",1,0,30],["changeRuleToDataBar",0,0,30],["changeRuleToIconSet",0,0,30],["changeRuleToPresetCriteria",1,0,30],["changeRuleToTopBottom",1,0,30],["setRanges",1,0,30]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4],["getRanges","RangeAreas",0,10,6,4]]],["DataBarConditionalFormat",0,[["showDataBarOnly",1,0,0,2,40],["barDirection",1,0,0,2,41],["axisFormat",1,0,0,2,41],["axisColor",1,0,0,2,41],["lowerBoundRule",1,0,0,2,41],["upperBoundRule",1,0,0,2,41]],[["positiveFormat","ConditionalDataBarPositiveFormat",35,0,0,4],["negativeFormat","ConditionalDataBarNegativeFormat",35,0,0,4]]],["ConditionalDataBarPositiveFormat",0,[["fillColor",1,0,0,2,40],["gradientFill",1,0,0,2,40],["borderColor",1,0,0,2,40]]],["ConditionalDataBarNegativeFormat",0,[["fillColor",1,0,0,2,40],["matchPositiveFillColor",1,0,0,2,40],["borderColor",1,0,0,2,40],["matchPositiveBorderColor",1,0,0,2,40]]],["CustomConditionalFormat",0,0,[["rule","ConditionalFormatRule",35,0,0,4],["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalFormatRule",0,[["formula",1,0,0,2,41],["formulaLocal",1],["formulaR1C1",1]]],["IconSetConditionalFormat",0,[["reverseIconOrder",1,0,0,2,41],["showIconOnly",1,0,0,2,41],["style",1,0,0,2,41],["criteria",1,0,0,2,41]]],["ColorScaleConditionalFormat",0,[["threeColorScale",3],["criteria",1,0,0,2,41]]],["TopBottomConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["PresetCriteriaConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["TextConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["CellValueConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalRangeFormat",0,[["numberFormat",1]],[["fill","ConditionalRangeFill",35,0,0,4],["font","ConditionalRangeFont",35,0,0,4],["borders","ConditionalRangeBorderCollection",51,0,0,4]],[["clearFormat",0,0,30]]],["ConditionalRangeFont",0,[["color",1,0,0,2,42],["italic",1,0,0,2,42],["bold",1,0,0,2,42],["underline",1,0,0,2,42],["strikethrough",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeFill",0,[["color",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeBorder",0,[["sideIndex",3],["style",1,0,0,2,42],["color",1,0,0,2,42]]],["ConditionalRangeBorderCollection",1,[["count",3]],[["top","ConditionalRangeBorder",35,0,0,4],["bottom","ConditionalRangeBorder",35,0,0,4],["left","ConditionalRangeBorder",35,0,0,4],["right","ConditionalRangeBorder",35,0,0,4]],0,[["getItem","ConditionalRangeBorder",1,18,0,4],["getItemAt","ConditionalRangeBorder",1,2,0,4]],0,"ConditionalRangeBorder"],["NumberFormattingService",0,0,0,0,[["getFormatter","NumberFormatter",1,3]],0,0,0,"Microsoft.ExcelServices.NumberFormattingService",4],["NumberFormatter",0,[["isDateTime",3],["isPercent",3],["isCurrency",3],["isNumeric",3],["isText",3],["hasYear",3],["hasMonth",3],["hasDayOfWeek",3]],0,[["format",1,3]]],["CustomFunctionManager",36,[["status",2]],0,[["register",2]],0,0,0,0,"Microsoft.ExcelServices.CustomFunctionManager",4],["Style",0,[["builtIn",3],["formulaHidden",1],["horizontalAlignment",1],["includeAlignment",1],["includeBorder",1],["includeFont",1],["includeNumber",1],["includePatterns",1],["includeProtection",1],["indentLevel",1],["locked",1],["name",3],["numberFormat",1],["numberFormatLocal",1],["readingOrder",1],["shrinkToFit",1],["verticalAlignment",1],["wrapText",1],["textOrientation",5,5],["autoIndent",1,5]],[["borders","RangeBorderCollection",51,0,0,4],["font","RangeFont",35,0,0,4],["fill","RangeFill",35,0,0,4]],[["delete"]]],["StyleCollection",1,0,0,[["add",1],["getCount",0,2,6,4]],[["getItem","Style",1,18,0,4],["getItemAt","Style",1,2,6,4],["getItemOrNullObject","Style",1,2,18,4]],0,"Style"],["TableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TableStyle",1,18,0,4],["getItemOrNullObject","TableStyle",1,2,0,4],["add","TableStyle",2,8],["getDefault","TableStyle"]],0,"TableStyle"],["TableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TableStyle"]]],["PivotTableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","PivotTableStyle",1,18,0,4],["getItemOrNullObject","PivotTableStyle",1,2,0,4],["add","PivotTableStyle",2,8],["getDefault","PivotTableStyle"]],0,"PivotTableStyle"],["PivotTableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","PivotTableStyle"]]],["SlicerStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","SlicerStyle",1,18,0,4],["getItemOrNullObject","SlicerStyle",1,2,0,4],["add","SlicerStyle",2,8],["getDefault","SlicerStyle"]],0,"SlicerStyle"],["SlicerStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","SlicerStyle"]]],["TimelineStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TimelineStyle",1,18,0,4],["getItemOrNullObject","TimelineStyle",1,2,0,4],["add","TimelineStyle",2,8],["getDefault","TimelineStyle"]],0,"TimelineStyle"],["TimelineStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TimelineStyle"]]],["InternalTest",0,0,0,[["delay",1],["triggerMessage",4,0,11],["_RegisterTestEvent",0,0,11,2,0,1],["_UnregisterTestEvent",0,0,11,2,0,1],["triggerTestEvent",2,0,11],["triggerPostProcess",0,0,11],["_RegisterTest1Event",0,0,11,2,0,1],["_UnregisterTest1Event",0,0,11,2,0,1],["triggerTestEventWithFilter",3,0,11],["firstPartyMethod",0,2,11,5],["_RegisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_RegisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["unregisterAllCustomFunctionExecutionEvents",0,0,20],["updateRangeValueOnCurrentSheet",2,0,3,2],["triggerUserUndo",0,2,3],["triggerUserRedo",0,2,3],["enterCellEdit",1,0,6],["installCustomFunctionsFromCache",0,0,6],["recalc",2,0,6],["recalcBySolutionId",1,0,6],["safeForCellEditModeMethod",1,0,6],["exitCellEdit",0,0,6],["noPermissionMethod",1,0,6],["verifyCustomFunctionListExist",0,0,6],["enableContentWorkbookLink",0,0,3],["previewExecutionMethod",1,0,8,16],["setRapidJsonEnabled",1,0,8],["triggerVbaRecorderRecordingChanged",2,0,8]],0,0,0,[["CustomFunctionExecutionBeginEvent",0,20,"MessageType.customFunctionExecutionBeginEvent","","_RegisterCustomFunctionExecutionBeginEvent","_UnregisterCustomFunctionExecutionBeginEvent"],["CustomFunctionExecutionEndEvent",0,20,"MessageType.customFunctionExecutionEndEvent","","_RegisterCustomFunctionExecutionEndEvent","_UnregisterCustomFunctionExecutionEndEvent"],["Test1Event",2,11,"MessageType.test1Event","","_RegisterTest1Event","_UnregisterTest1Event"],["TestEvent",2,11,"MessageType.testEvent","","_RegisterTestEvent","_UnregisterTestEvent"]],"Microsoft.ExcelServices.InternalTest",4],["PageLayout",0,[["orientation",1],["paperSize",1],["blackAndWhite",1],["printErrors",1],["zoom",1],["centerHorizontally",1],["centerVertically",1],["printHeadings",1],["printGridlines",1],["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["headerMargin",1],["footerMargin",1],["printComments",1],["draftMode",1],["firstPageNumber",1],["printOrder",1]],[["headersFooters","HeaderFooterGroup",35,0,0,4]],[["setPrintMargins",2],["setPrintArea",1],["setPrintTitleRows",1],["setPrintTitleColumns",1]],[["getPrintArea","RangeAreas",0,10,0,4],["getPrintAreaOrNullObject","RangeAreas",0,10,0,4],["getPrintTitleRows","Range",0,10,0,4],["getPrintTitleRowsOrNullObject","Range",0,10,0,4],["getPrintTitleColumns","Range",0,10,0,4],["getPrintTitleColumnsOrNullObject","Range",0,10,0,4]]],["HeaderFooter",0,[["leftHeader",1],["centerHeader",1],["rightHeader",1],["leftFooter",1],["centerFooter",1],["rightFooter",1]]],["HeaderFooterGroup",0,[["state",1],["useSheetMargins",1],["useSheetScale",1]],[["defaultForAllPages","HeaderFooter",35,0,0,4],["firstPage","HeaderFooter",35,0,0,4],["evenPages","HeaderFooter",35,0,0,4],["oddPages","HeaderFooter",35,0,0,4]]],["PageBreak",0,[["_Id",2],["columnIndex",3],["rowIndex",3]],0,[["delete"]],[["getCellAfterBreak","Range",0,10,0,4]]],["PageBreakCollection",1,0,0,[["removePageBreaks"],["getCount",0,2,0,4]],[["getItem","PageBreak",1,18,0,4],["add","PageBreak",1,8]],0,"PageBreak"],["DataConnectionCollection",0,0,0,[["refreshAll"]],[["add","DataConnection",4,8,8,2,0,0,12]]],["RangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","Range",1,2,0,4]],0,"Range"],["RangeAreasCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","RangeAreas",1,2,0,4]],0,"RangeAreas"],["CommentCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,2,27],["_UnregisterAddedEvent",0,2,27],["_RegisterDeletedEvent",0,2,27],["_UnregisterDeletedEvent",0,2,27],["_RegisterChangedEvent",0,2,27],["_UnregisterChangedEvent",0,2,27]],[["getItem","Comment",1,18,0,4],["getItemAt","Comment",1,2,0,4],["add","Comment",3,8],["getItemByReplyId","Comment",1,2,0,4],["getItemByCell","Comment",1,2,0,4],["getItemOrNullObject","Comment",1,2,18,4]],0,"Comment",[["Added",0,27,"MessageType.commentAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",0,27,"MessageType.commentChangedEvent","this._eventTargetId","_RegisterChangedEvent","_UnregisterChangedEvent"],["Deleted",0,27,"MessageType.commentDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Comment",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",1,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],[["replies","CommentReplyCollection",19,0,0,4]],[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["CommentReplyCollection",1,0,0,[["getCount",0,2,0,4]],[["add","CommentReply",2,8],["getItem","CommentReply",1,18,0,4],["getItemAt","CommentReply",1,2,0,4],["getItemOrNullObject","CommentReply",1,2,18,4]],0,"CommentReply"],["CommentReply",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",3,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],0,[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["getParentComment","Comment"],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["ShapeCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["addImage","Shape",1],["_GetItem","Shape",1,18,0,4],["addGeometricShape","Shape",1],["addTextBox","Shape",1],["addSvg","Shape",1,0,8],["addGroup","Shape",1],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["addLine","Shape",5],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape",[["Added",0,3,"MessageType.shapeAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.shapeDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Shape",0,[["id",3],["name",1],["left",1],["top",1],["width",1],["height",1],["rotation",1],["zOrderPosition",3],["altTextTitle",1],["altTextDescription",1,0,0,2,36],["type",3],["lockAspectRatio",1],["placement",1,17],["geometricShapeType",1],["visible",1],["level",3],["connectionSiteCount",3],["scriptLink",1,8,0,2,37],["displayName",3,35]],[["geometricShape","GeometricShape",2,0,0,4],["image","Image",2,0,0,4],["textFrame","TextFrame",2,0,0,4],["fill","ShapeFill",35,0,0,4],["group","ShapeGroup",2,0,0,4],["parentGroup","Shape",2,0,0,4],["line","Line",2,0,0,4],["lineFormat","ShapeLineFormat",35,0,0,4]],[["setZOrder",1],["incrementLeft",1],["incrementTop",1],["incrementRotation",1],["scaleHeight",3],["scaleWidth",3],["delete"],["getAsImage",1],["_RegisterActivatedEvent",0,0,0,2,0,1],["_UnregisterActivatedEvent",0,0,0,2,0,1],["_RegisterDeactivatedEvent",0,0,0,2,0,1],["_UnregisterDeactivatedEvent",0,0,0,2,0,1],["activate",0,0,3]],[["copyTo","Shape",1,8,17,0,0,"_GetShapeById"],["_GetShapeById","Shape",1,2,17,4]],0,0,[["Activated",0,0,"MessageType.shapeActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,0,"MessageType.shapeDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["GeometricShape",0,[["id",3]],[["shape","Shape",2,0,0,4]]],["Image",0,[["id",3],["format",3,0,"format"]],[["shape","Shape",2,0,0,4]]],["ShapeGroup",0,[["id",3]],[["shapes","GroupShapeCollection",19,0,0,4],["shape","Shape",2,0,0,4]],[["ungroup"]]],["GroupShapeCollection",1,0,0,[["getCount",0,2,0,4]],[["_GetItem","Shape",1,18,0,4],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape"],["Line",0,[["id",3],["connectorType",1,0,"connectorType"],["beginArrowheadLength",1],["beginArrowheadStyle",1],["beginArrowheadWidth",1],["endArrowheadLength",1],["endArrowheadStyle",1],["endArrowheadWidth",1],["isBeginConnected",3],["beginConnectedSite",3],["isEndConnected",3],["endConnectedSite",3]],[["shape","Shape",2,0,0,4],["beginConnectedShape","Shape",2,0,0,4],["endConnectedShape","Shape",2,0,0,4]],[["connectBeginShape",2],["disconnectBeginShape"],["connectEndShape",2],["disconnectEndShape"]]],["ShapeFill",0,[["foregroundColor",1],["type",3],["transparency",1]],0,[["clear"],["setSolidColor",1]]],["ShapeLineFormat",0,[["visible",1],["color",1],["style",1],["weight",1],["dashStyle",1],["transparency",1]]],["TextFrame",0,[["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["horizontalAlignment",1],["horizontalOverflow",1],["verticalAlignment",1],["verticalOverflow",1],["orientation",1],["readingOrder",1],["hasText",3],["autoSizeSetting",1]],[["textRange","TextRange",2,0,0,4]],[["deleteText"]]],["TextRange",0,[["text",1]],[["font","ShapeFont",35,0,0,4]],0,[["getSubstring","TextRange",2]]],["ShapeFont",0,[["size",1],["name",1],["color",1],["bold",1],["italic",1],["underline",1]]],["Slicer",0,[["id",3],["name",1],["caption",1],["left",1],["top",1],["width",1],["height",1],["nameInFormula",1,8],["isFilterCleared",3],["style",1],["sortBy",1],["sortUsingCustomLists",1,3],["columnCount",1,3],["disableMoveResizeUI",1,3],["displayHeader",1,3],["rowHeight",1,3],["shapeId",2,3]],[["slicerItems","SlicerItemCollection",19,0,0,4],["worksheet","Worksheet",35,0,0,4],["slicerStyle","SlicerStyle",35,8,0,4]],[["delete"],["clearFilters"],["getSelectedItems"],["selectItems",1],["activate",0,2,3],["setStyle",1,0,8]]],["SlicerCollection",1,0,0,[["getCount",0,2,0,4]],[["add","Slicer",3,8],["getItemAt","Slicer",1,2,0,4],["getItem","Slicer",1,18,0,4],["getItemOrNullObject","Slicer",1,2,0,4]],0,"Slicer"],["SlicerItem",0,[["key",3],["name",3],["isSelected",1],["hasData",3]]],["SlicerItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SlicerItem",1,2,0,4],["getItem","SlicerItem",1,18,0,4],["getItemOrNullObject","SlicerItem",1,2,0,4]],0,"SlicerItem"],["Ribbon",0,[["activeTab",1]],0,[["executeCommand",2],["showTeachingCallout",3],["_RegisterCommandExecutedEvent",0,0,0,2,0,1],["_UnregisterCommandExecutedEvent",0,0,0,2,0,1],["showChartDialog",1,2,8,4]],0,0,0,[["CommandExecuted",0,0,"MessageType.ribbonCommandExecutedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCommandExecutedEvent","_UnregisterCommandExecutedEvent"]]],["LinkedDataType",0,[["dataProvider",2],["serviceId",2],["lastRefreshed",10],["name",2],["periodicRefreshInterval",2],["refreshDataLoadWarnings",2],["refreshMode",2],["supportedRefreshModes",2],["refreshErrors",2]],0,[["requestRefresh",0,0,0,2],["requestSetRefreshMode",1,0,0,2]]],["LinkedDataTypeCollection",1,0,0,[["getCount",0,2,0,4],["requestRefreshAll",0,0,0,2],["_RegisterRefreshRequestCompletedEvent",0,2,0,4],["_UnregisterRefreshRequestCompletedEvent",0,2,0,4],["_RegisterRefreshModeChangedEvent",0,2,0,4],["_UnregisterRefreshModeChangedEvent",0,2,0,4],["_RegisterLinkedDataTypeAddedEvent",0,2,0,4],["_UnregisterLinkedDataTypeAddedEvent",0,2,0,4]],[["getItem","LinkedDataType",1,18,0,4],["getItemOrNullObject","LinkedDataType",1],["getItemAt","LinkedDataType",1,2,0,4]],0,"LinkedDataType",[["LinkedDataTypeAdded",0,0,"MessageType.linkedDataTypeLinkedDataTypeAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterLinkedDataTypeAddedEvent","_UnregisterLinkedDataTypeAddedEvent"],["RefreshModeChanged",0,0,"MessageType.linkedDataTypeRefreshModeChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshModeChangedEvent","_UnregisterRefreshModeChangedEvent"],["RefreshRequestCompleted",0,0,"MessageType.linkedDataTypeRefreshRequestCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshRequestCompletedEvent","_UnregisterRefreshRequestCompletedEvent"]]],["SheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","SheetView",1]]],["SheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","SheetView",1,8],["enterTemporary","SheetView"],["getActive","SheetView"],["getItem","SheetView",1,18,0,4],["getItemAt","SheetView",1,2,0,4]],0,"SheetView"],["NamedSheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","NamedSheetView",1]]],["NamedSheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","NamedSheetView",1,8],["enterTemporary","NamedSheetView"],["getActive","NamedSheetView"],["getItem","NamedSheetView",1,18,0,4],["getItemAt","NamedSheetView",1,2,0,4],["getItemOrNullObject","NamedSheetView",1,2,28,4]],0,"NamedSheetView"],["FunctionResult",0,[["error",3],["value",3]]],["Functions",0,0,0,0,[["count","FunctionResult",1,72],["if","FunctionResult",3,8],["isNA","FunctionResult",1,8],["isError","FunctionResult",1,8],["sum","FunctionResult",1,72],["average","FunctionResult",1,72],["min","FunctionResult",1,72],["max","FunctionResult",1,72],["na","FunctionResult",0,8],["npv","FunctionResult",2,72],["dollar","FunctionResult",2,8],["fixed","FunctionResult",3,8],["sin","FunctionResult",1,8],["cos","FunctionResult",1,8],["tan","FunctionResult",1,8],["atan","FunctionResult",1,8],["pi","FunctionResult",0,8],["sqrt","FunctionResult",1,8],["exp","FunctionResult",1,8],["ln","FunctionResult",1,8],["log10","FunctionResult",1,8],["abs","FunctionResult",1,8],["int","FunctionResult",1,8],["sign","FunctionResult",1,8],["round","FunctionResult",2,8],["lookup","FunctionResult",3,8],["rept","FunctionResult",2,8],["mid","FunctionResult",3,8],["len","FunctionResult",1,8],["value","FunctionResult",1,8],["true","FunctionResult",0,8],["false","FunctionResult",0,8],["and","FunctionResult",1,72],["or","FunctionResult",1,72],["not","FunctionResult",1,8],["mod","FunctionResult",2,8],["dcount","FunctionResult",3,8,0,0,"DCount"],["dsum","FunctionResult",3,8,0,0,"DSum"],["daverage","FunctionResult",3,8,0,0,"DAverage"],["dmin","FunctionResult",3,8,0,0,"DMin"],["dmax","FunctionResult",3,8,0,0,"DMax"],["dstDev","FunctionResult",3,8,0,0,"DStDev"],["dvar","FunctionResult",3,8,0,0,"DVar"],["text","FunctionResult",2,8],["pv","FunctionResult",5,8],["fv","FunctionResult",5,8],["nper","FunctionResult",5,8,0,0,"NPer"],["pmt","FunctionResult",5,8],["rate","FunctionResult",6,8],["mirr","FunctionResult",3,8,0,0,"MIrr"],["irr","FunctionResult",2,8],["rand","FunctionResult",0,8],["match","FunctionResult",3,8],["date","FunctionResult",3,8],["time","FunctionResult",3,8],["day","FunctionResult",1,8],["month","FunctionResult",1,8],["year","FunctionResult",1,8],["weekday","FunctionResult",2,8],["hour","FunctionResult",1,8],["minute","FunctionResult",1,8],["second","FunctionResult",1,8],["now","FunctionResult",0,8],["areas","FunctionResult",1,8],["rows","FunctionResult",1,8],["columns","FunctionResult",1,8],["type","FunctionResult",1,8],["atan2","FunctionResult",2,8],["asin","FunctionResult",1,8],["acos","FunctionResult",1,8],["choose","FunctionResult",2,72],["hlookup","FunctionResult",4,8,0,0,"HLookup"],["vlookup","FunctionResult",4,8,0,0,"VLookup"],["isref","FunctionResult",1,8],["log","FunctionResult",2,8],["char","FunctionResult",1,8],["lower","FunctionResult",1,8],["upper","FunctionResult",1,8],["proper","FunctionResult",1,8],["left","FunctionResult",2,8],["right","FunctionResult",2,8],["exact","FunctionResult",2,8],["trim","FunctionResult",1,8],["replace","FunctionResult",4,8],["substitute","FunctionResult",4,8],["code","FunctionResult",1,8],["find","FunctionResult",3,8],["isErr","FunctionResult",1,8],["isText","FunctionResult",1,8],["isNumber","FunctionResult",1,8],["t","FunctionResult",1,8,0,0,"T"],["n","FunctionResult",1,8,0,0,"N"],["datevalue","FunctionResult",1,8],["timevalue","FunctionResult",1,8],["sln","FunctionResult",3,8],["syd","FunctionResult",4,8],["ddb","FunctionResult",5,8],["clean","FunctionResult",1,8],["ipmt","FunctionResult",6,8],["ppmt","FunctionResult",6,8],["countA","FunctionResult",1,72],["product","FunctionResult",1,72],["fact","FunctionResult",1,8],["dproduct","FunctionResult",3,8,0,0,"DProduct"],["isNonText","FunctionResult",1,8],["dstDevP","FunctionResult",3,8,0,0,"DStDevP"],["dvarP","FunctionResult",3,8,0,0,"DVarP"],["trunc","FunctionResult",2,8],["isLogical","FunctionResult",1,8],["dcountA","FunctionResult",3,8,0,0,"DCountA"],["usdollar","FunctionResult",2,8,0,0,"USDollar"],["findB","FunctionResult",3,8],["replaceB","FunctionResult",4,8],["leftb","FunctionResult",2,8],["rightb","FunctionResult",2,8],["midb","FunctionResult",3,8],["lenb","FunctionResult",1,8],["roundUp","FunctionResult",2,8],["roundDown","FunctionResult",2,8],["asc","FunctionResult",1,8],["dbcs","FunctionResult",1,8],["days360","FunctionResult",3,8],["today","FunctionResult",0,8],["vdb","FunctionResult",7,8],["median","FunctionResult",1,72],["sinh","FunctionResult",1,8],["cosh","FunctionResult",1,8],["tanh","FunctionResult",1,8],["asinh","FunctionResult",1,8],["acosh","FunctionResult",1,8],["atanh","FunctionResult",1,8],["dget","FunctionResult",3,8,0,0,"DGet"],["db","FunctionResult",5,8],["error_Type","FunctionResult",1,8],["aveDev","FunctionResult",1,72],["gammaLn","FunctionResult",1,8],["combin","FunctionResult",2,8],["even","FunctionResult",1,8],["fisher","FunctionResult",1,8],["fisherInv","FunctionResult",1,8],["standardize","FunctionResult",3,8],["odd","FunctionResult",1,8],["permut","FunctionResult",2,8],["devSq","FunctionResult",1,72],["geoMean","FunctionResult",1,72],["harMean","FunctionResult",1,72],["sumSq","FunctionResult",1,72],["kurt","FunctionResult",1,72],["skew","FunctionResult",1,72],["large","FunctionResult",2,8],["small","FunctionResult",2,8],["trimMean","FunctionResult",2,8],["concatenate","FunctionResult",1,72],["power","FunctionResult",2,8],["radians","FunctionResult",1,8],["degrees","FunctionResult",1,8],["subtotal","FunctionResult",2,72],["sumIf","FunctionResult",3,8],["countIf","FunctionResult",2,8],["countBlank","FunctionResult",1,8],["ispmt","FunctionResult",4,8],["roman","FunctionResult",2,8],["hyperlink","FunctionResult",2,8],["averageA","FunctionResult",1,72],["maxA","FunctionResult",1,72],["minA","FunctionResult",1,72],["stDevPA","FunctionResult",1,72],["varPA","FunctionResult",1,72],["stDevA","FunctionResult",1,72],["varA","FunctionResult",1,72],["bahtText","FunctionResult",1,8],["hex2Bin","FunctionResult",2,8],["hex2Dec","FunctionResult",1,8],["hex2Oct","FunctionResult",2,8],["dec2Bin","FunctionResult",2,8],["dec2Hex","FunctionResult",2,8],["dec2Oct","FunctionResult",2,8],["oct2Bin","FunctionResult",2,8],["oct2Hex","FunctionResult",2,8],["oct2Dec","FunctionResult",1,8],["bin2Dec","FunctionResult",1,8],["bin2Oct","FunctionResult",2,8],["bin2Hex","FunctionResult",2,8],["imSub","FunctionResult",2,8],["imDiv","FunctionResult",2,8],["imPower","FunctionResult",2,8],["imAbs","FunctionResult",1,8],["imSqrt","FunctionResult",1,8],["imLn","FunctionResult",1,8],["imLog2","FunctionResult",1,8],["imLog10","FunctionResult",1,8],["imSin","FunctionResult",1,8],["imCos","FunctionResult",1,8],["imExp","FunctionResult",1,8],["imArgument","FunctionResult",1,8],["imConjugate","FunctionResult",1,8],["imaginary","FunctionResult",1,8],["imReal","FunctionResult",1,8],["complex","FunctionResult",3,8],["imSum","FunctionResult",1,72],["imProduct","FunctionResult",1,72],["seriesSum","FunctionResult",4,8],["factDouble","FunctionResult",1,8],["sqrtPi","FunctionResult",1,8],["quotient","FunctionResult",2,8],["delta","FunctionResult",2,8],["geStep","FunctionResult",2,8],["isEven","FunctionResult",1,8],["isOdd","FunctionResult",1,8],["mround","FunctionResult",2,8,0,0,"MRound"],["erf","FunctionResult",2,8],["erfC","FunctionResult",1,8],["besselJ","FunctionResult",2,8],["besselK","FunctionResult",2,8],["besselY","FunctionResult",2,8],["besselI","FunctionResult",2,8],["xirr","FunctionResult",3,8],["xnpv","FunctionResult",3,8],["priceMat","FunctionResult",6,8],["yieldMat","FunctionResult",6,8],["intRate","FunctionResult",5,8],["received","FunctionResult",5,8],["disc","FunctionResult",5,8],["priceDisc","FunctionResult",5,8],["yieldDisc","FunctionResult",5,8],["tbillEq","FunctionResult",3,8,0,0,"TBillEq"],["tbillPrice","FunctionResult",3,8,0,0,"TBillPrice"],["tbillYield","FunctionResult",3,8,0,0,"TBillYield"],["price","FunctionResult",7,8],["yield","FunctionResult",7,8],["dollarDe","FunctionResult",2,8],["dollarFr","FunctionResult",2,8],["nominal","FunctionResult",2,8],["effect","FunctionResult",2,8],["cumPrinc","FunctionResult",6,8],["cumIPmt","FunctionResult",6,8],["edate","FunctionResult",2,8,0,0,"EDate"],["eoMonth","FunctionResult",2,8],["yearFrac","FunctionResult",3,8],["coupDayBs","FunctionResult",4,8],["coupDays","FunctionResult",4,8],["coupDaysNc","FunctionResult",4,8],["coupNcd","FunctionResult",4,8],["coupNum","FunctionResult",4,8],["coupPcd","FunctionResult",4,8],["duration","FunctionResult",6,8],["mduration","FunctionResult",6,8,0,0,"MDuration"],["oddLPrice","FunctionResult",8,8],["oddLYield","FunctionResult",8,8],["oddFPrice","FunctionResult",9,8],["oddFYield","FunctionResult",9,8],["randBetween","FunctionResult",2,8],["weekNum","FunctionResult",2,8],["amorDegrc","FunctionResult",7,8],["amorLinc","FunctionResult",7,8],["convert","FunctionResult",3,8],["accrInt","FunctionResult",8,8],["accrIntM","FunctionResult",5,8],["workDay","FunctionResult",3,8],["networkDays","FunctionResult",3,8],["gcd","FunctionResult",1,72],["multiNomial","FunctionResult",1,72],["lcm","FunctionResult",1,72],["fvschedule","FunctionResult",2,8,0,0,"FVSchedule"],["countIfs","FunctionResult",1,72],["sumIfs","FunctionResult",2,72],["averageIf","FunctionResult",3,8],["averageIfs","FunctionResult",2,72],["binom_Dist","FunctionResult",4,8],["binom_Inv","FunctionResult",3,8],["confidence_Norm","FunctionResult",3,8],["confidence_T","FunctionResult",3,8],["expon_Dist","FunctionResult",3,8],["gamma_Dist","FunctionResult",4,8],["gamma_Inv","FunctionResult",3,8],["norm_Dist","FunctionResult",4,8],["norm_Inv","FunctionResult",3,8],["percentile_Exc","FunctionResult",2,8],["percentile_Inc","FunctionResult",2,8],["percentRank_Exc","FunctionResult",3,8],["percentRank_Inc","FunctionResult",3,8],["poisson_Dist","FunctionResult",3,8],["quartile_Exc","FunctionResult",2,8],["quartile_Inc","FunctionResult",2,8],["rank_Avg","FunctionResult",3,8],["rank_Eq","FunctionResult",3,8],["stDev_S","FunctionResult",1,72],["stDev_P","FunctionResult",1,72],["t_Dist","FunctionResult",3,8],["t_Dist_2T","FunctionResult",2,8],["t_Dist_RT","FunctionResult",2,8],["t_Inv","FunctionResult",2,8],["t_Inv_2T","FunctionResult",2,8],["var_S","FunctionResult",1,72],["var_P","FunctionResult",1,72],["weibull_Dist","FunctionResult",4,8],["networkDays_Intl","FunctionResult",4,8],["workDay_Intl","FunctionResult",4,8],["ecma_Ceiling","FunctionResult",2,8,0,0,"ECMA_Ceiling"],["iso_Ceiling","FunctionResult",2,8,0,0,"ISO_Ceiling"],["beta_Dist","FunctionResult",6,8],["beta_Inv","FunctionResult",5,8],["chiSq_Dist","FunctionResult",3,8],["chiSq_Dist_RT","FunctionResult",2,8],["chiSq_Inv","FunctionResult",2,8],["chiSq_Inv_RT","FunctionResult",2,8],["f_Dist","FunctionResult",4,8],["f_Dist_RT","FunctionResult",3,8],["f_Inv","FunctionResult",3,8],["f_Inv_RT","FunctionResult",3,8],["hypGeom_Dist","FunctionResult",5,8],["logNorm_Dist","FunctionResult",4,8],["logNorm_Inv","FunctionResult",3,8],["negBinom_Dist","FunctionResult",4,8],["norm_S_Dist","FunctionResult",2,8],["norm_S_Inv","FunctionResult",1,8],["z_Test","FunctionResult",3,8],["erf_Precise","FunctionResult",1,8],["erfC_Precise","FunctionResult",1,8],["gammaLn_Precise","FunctionResult",1,8],["ceiling_Precise","FunctionResult",2,8],["floor_Precise","FunctionResult",2,8],["acot","FunctionResult",1,8],["acoth","FunctionResult",1,8],["cot","FunctionResult",1,8],["coth","FunctionResult",1,8],["csc","FunctionResult",1,8],["csch","FunctionResult",1,8],["sec","FunctionResult",1,8],["sech","FunctionResult",1,8],["imTan","FunctionResult",1,8],["imCot","FunctionResult",1,8],["imCsc","FunctionResult",1,8],["imCsch","FunctionResult",1,8],["imSec","FunctionResult",1,8],["imSech","FunctionResult",1,8],["bitand","FunctionResult",2,8],["bitor","FunctionResult",2,8],["bitxor","FunctionResult",2,8],["bitlshift","FunctionResult",2,8],["bitrshift","FunctionResult",2,8],["permutationa","FunctionResult",2,8],["combina","FunctionResult",2,8],["xor","FunctionResult",1,72],["pduration","FunctionResult",3,8,0,0,"PDuration"],["base","FunctionResult",3,8],["decimal","FunctionResult",2,8],["days","FunctionResult",2,8],["binom_Dist_Range","FunctionResult",4,8],["gamma","FunctionResult",1,8],["skew_p","FunctionResult",1,72],["gauss","FunctionResult",1,8],["phi","FunctionResult",1,8],["rri","FunctionResult",3,8],["unichar","FunctionResult",1,8],["unicode","FunctionResult",1,8],["arabic","FunctionResult",1,8],["isoWeekNum","FunctionResult",1,8],["numberValue","FunctionResult",3,8],["sheet","FunctionResult",1,8],["sheets","FunctionResult",1,8],["isFormula","FunctionResult",1,8],["ceiling_Math","FunctionResult",3,8],["floor_Math","FunctionResult",3,8],["imSinh","FunctionResult",1,8],["imCosh","FunctionResult",1,8]]]]},targetNamespaceObject:e})}(Excel||(Excel={}));var _EndExcel="_EndExcel";if("undefined"!==typeof window&&window.OSF&&window.OSF._OfficeAppFactory&&window.OSF._OfficeAppFactory.getHostInfo&&window.OSF._OfficeAppFactory.getHostInfo()){var hostPlatform=window.OSF._OfficeAppFactory.getHostInfo().hostPlatform;"web"===hostPlatform&&(OfficeExtension._internalConfig.enablePreviewExecution=!0)}function exposeOfficeRuntimeThroughOfficeNamespace(e,t){var n,o;"undefined"===typeof e&&"undefined"!==typeof window&&(e=null===window||void 0===window?void 0:window.OfficeRuntime),"undefined"===typeof e&&(e={}),"undefined"!==typeof t&&(t.storage=t.storage||(null===e||void 0===e?void 0:e.storage),t.auth=t.auth||(null===e||void 0===e?void 0:e.auth),t.getAccessToken=t.getAccessToken||(null===(n=null===e||void 0===e?void 0:e.auth)||void 0===n?void 0:n.getAccessToken),t.addin=t.addin||(null===e||void 0===e?void 0:e.addin),t.isSetSupported=t.isSetSupported||(null===(o=null===e||void 0===e?void 0:e.apiInformation)||void 0===o?void 0:o.isSetSupported),t.license=t.license||(null===e||void 0===e?void 0:e.license),t.message=t.message||(null===e||void 0===e?void 0:e.message))}!function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=OfficeExtensionBatch},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(2),"undefined"==typeof CustomFunctionMappings&&(window.CustomFunctionMappings={}),"undefined"==typeof Promise&&(window.Promise=Office.Promise),window.OfficeExtensionBatch=window.OfficeExtensionBatch||window.OfficeExtension;var o=n(3);!function(){var e=!1;"undefined"!=typeof OSF&&OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&0!=(2&(OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo().flags))&&(e=!0),(0,o.default)(e)}()},function(e,t){!function(e){"use strict";if(!e.fetch){var t="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in e,r="ArrayBuffer"in e;if(r)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=function(e){return e&&DataView.prototype.isPrototypeOf(e)},l=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};h.prototype.append=function(e,t){e=d(e),t=f(t);var n=this.map[e];this.map[e]=n?n+","+t:t},h.prototype.delete=function(e){delete this.map[d(e)]},h.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},h.prototype.set=function(e,t){this.map[d(e)]=f(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),p(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),p(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),p(e)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var c=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},O.call(b.prototype),O.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},C.error=function(){var e=new C(null,{status:0,statusText:""});return e.type="error",e};var u=[301,302,303,307,308];C.redirect=function(e,t){if(-1===u.indexOf(t))throw new RangeError("Invalid status code");return new C(null,{status:t,headers:{location:e}})},e.Headers=h,e.Request=b,e.Response=C,e.fetch=function(e,t){return new Promise((function(n,i){var r=new b(e,t),a=new XMLHttpRequest;a.onload=function(){var e,t,o={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new h,e.split(/\r?\n/).forEach((function(e){var n=e.split(":"),o=n.shift().trim();if(o){var i=n.join(":").trim();t.append(o,i)}})),t)};o.url="responseURL"in a?a.responseURL:o.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;n(new C(i,o))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(r.method,r.url,!0),"include"===r.credentials&&(a.withCredentials=!0),"responseType"in a&&o&&(a.responseType="blob"),r.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),a.send(void 0===r._bodyInit?null:r._bodyInit)}))},e.fetch.polyfill=!0}function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function f(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function m(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function y(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function O(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(o&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(i&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(r&&o&&s(e))this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!r||!ArrayBuffer.prototype.isPrototypeOf(e)&&!l(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=v(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,n,o=m(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,n=g(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),o=0;o-1?o:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function S(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),o=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(i))}})),t}function C(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(4);t.default=function(e){function t(){Office.onReady((function(e){e.host===Office.HostType.Excel?function e(){CustomFunctionMappings&&CustomFunctionMappings.__delay__?setTimeout(e,50):o.CustomFunctions.initialize()}():console.warn("Warning: Expected to be loaded inside of an Excel add-in.")}))}window.CustomFunctions=window.CustomFunctions||{},window.CustomFunctions.setCustomFunctionInvoker=o.setCustomFunctionInvoker,window.CustomFunctions.Error=o.CustomFunctionError,window.CustomFunctions.ErrorCode=o.ErrorCode,window.CustomFunctions.FormattedNumber=o.CustomFunctionFormattedNumber,window.CustomFunctions.Entity=o.CustomFunctionEntity,window.CustomFunctions.WebImage=o.CustomFunctionWebImage,window.CustomFunctions.Attribution=o.CustomFunctionAttribution,window.CustomFunctions.Provider=o.CustomFunctionProvider,o.setCustomFunctionAssociation(window.CustomFunctions._association),e&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t())}},function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CustomFunctionsContainer=t.CustomFunctions=t.setCustomFunctionInvoker=t.setCustomFunctionAssociation=t.customFunctionProxy=t.CustomFunctionProxy=t.CreateCustomFunctionInstance=t.CustomFunctionProvider=t.CustomFunctionAttribution=t.CustomFunctionWebImage=t.CustomFunctionFormattedNumber=t.CustomFunctionEntity=t.CustomFunctionError=t.ErrorCode=t.InvocationContext=t.Script=void 0;var r=n(0),a=n(0),s=r.BatchApiHelper.createPropertyObject,l=(r.BatchApiHelper.createMethodObject,r.BatchApiHelper.createIndexerObject,r.BatchApiHelper.createRootServiceObject),c=r.BatchApiHelper.createTopLevelServiceObject,u=(r.BatchApiHelper.createChildItemObject,r.BatchApiHelper.invokeMethod),d=(r.BatchApiHelper.invokeEnsureUnchanged,r.BatchApiHelper.invokeSetProperty,r.Utility.isNullOrUndefined),f=(r.Utility.isUndefined,r.Utility.throwIfNotLoaded,r.Utility.throwIfApiNotSupported),p=r.Utility.load,h=(r.Utility.retrieve,r.Utility.toJson),m=r.Utility.fixObjectPathIfNecessary,g=r.Utility._handleNavigationPropertyResults,y=(r.Utility.adjustToDateTime,r.Utility.processRetrieveResult),v=(r.Utility.setMockData,r.CommonUtility.calculateApiFlags,function(e){function t(t){var n=e.call(this,t)||this;return n.m_customFunctions=w.newObject(n),n.m_container=l(x,n),n._rootObject=n.m_container,n._rootObjectPropertyName="customFunctionsContainer",n._requestFlagModifier=2176,n}return i(t,e),Object.defineProperty(t.prototype,"customFunctions",{get:function(){return this.m_customFunctions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customFunctionsContainer",{get:function(){return this.m_container},enumerable:!1,configurable:!0}),t.prototype._processOfficeJsErrorResponse=function(e,t){5004===e&&(t.ErrorCode=M.invalidOperationInCellEditMode,t.ErrorMessage=r.Utility._getResourceString(r.ResourceStrings.invalidOperationInCellEditMode))},t}(r.ClientRequestContext));t.Script={_CustomFunctionMetadata:{}};var O,b=function(){function e(e,t,n,o,i){this._functionName=e,d(t)||(this._address=t),d(n)||(this._parameterAddresses=n),this.setResult=o,this.setError=i}return Object.defineProperty(e.prototype,"onCanceled",{get:function(){if(!d(this._onCanceled)&&"function"==typeof this._onCanceled)return this._onCanceled},set:function(e){this._onCanceled=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"functionName",{get:function(){return this._functionName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parameterAddresses",{get:function(){return this._parameterAddresses},enumerable:!1,configurable:!0}),e}();t.InvocationContext=b,function(e){e.Info="Medium",e.Error="Unexpected",e.Verbose="Verbose"}(O||(O={}));var S,C=function(e,t){this.Severity=e,this.Message=t},A=function(){function e(){}return e.logEvent=function(t,n,o){if(e.s_shouldLog||r.CoreUtility._logEnabled){var i=t.Severity+" "+t.Message+n;if(o&&(i=i+" "+o),r.Utility.log(i),e.s_shouldLog)switch(t.Severity){case O.Verbose:null!==console.log&&console.log(i);break;case O.Info:null!==console.info&&console.info(i);break;case O.Error:null!==console.error&&console.error(i)}}},e.shouldLog=function(){try{return!d(console)&&!d(window)&&window.name&&"string"==typeof window.name&&JSON.parse(window.name)[e.CustomFunctionLoggingFlag]}catch(e){return r.Utility.log(JSON.stringify(e)),!1}},e.CustomFunctionLoggingFlag="CustomFunctionsRuntimeLogging",e.s_shouldLog=e.shouldLog(),e}();!function(e){e.invalidValue="#VALUE!",e.notAvailable="#N/A",e.divisionByZero="#DIV/0!",e.invalidNumber="#NUM!",e.nullReference="#NULL!",e.invalidName="#NAME?",e.invalidReference="#REF!"}(S=t.ErrorCode||(t.ErrorCode={}));var _=function(e){function t(n,o,i){var r=e.call(this,o||"")||this;return r.type=t.valueType,r.basicType=t.valueType,Object.setPrototypeOf(r,t.prototype),r.code=n||S.invalidValue,r.basicValue=n||S.invalidValue,r.errorSubType=i,r.stack=void 0,r}return i(t,e),t.prototype.toJSON=function(){return{valueType:"CustomFunctionError",code:this.code,type:this.type,basicValue:this.basicValue,basicType:this.type,errorSubType:this.errorSubType,message:this._getMessage(),errorType:this._getErrorType()}},t.prototype._getErrorType=function(){switch(this.basicValue){case S.invalidValue:return"Value";case S.divisionByZero:return"Div0";case S.notAvailable:return"NotAvailable";case S.invalidNumber:return"Num";case S.invalidName:return"Name";case S.invalidReference:return"Ref";case S.nullReference:return"Null";default:return}},t.prototype._getMessage=function(){switch(this.basicValue){case S.invalidValue:case S.notAvailable:return""==this.message?void 0:this.message;case S.divisionByZero:case S.invalidNumber:case S.invalidName:case S.invalidReference:case S.nullReference:default:return}},t.valueType="Error",t}(Error);t.CustomFunctionError=_;var D=function(){function e(t,n){this.type=e.valueType,this.basicValue="#VALUE!",this.basicType="Error",Object.setPrototypeOf(this,e.prototype),this.text=t,this.properties=n}return e.prototype.toJSON=function(){return{type:this.type,text:this.text,basicValue:this.basicValue,basicType:this.basicType,properties:this.properties}},e.valueType="Entity",e}();t.CustomFunctionEntity=D;var F=function(){function e(t,n){this.type=e.valueType,this.basicValue=t,this.numberFormat=n}return e.prototype.toJSON=function(){return{type:this.type,basicValue:this.basicValue,numberFormat:this.numberFormat}},e.valueType="FormattedNumber",e}();t.CustomFunctionFormattedNumber=F;var E=function(){function e(t,n,o,i,r){this.type=e.valueType,this.basicValue="#VALUE!",this.basicType="Error",this.address=t,null!=i&&(this.attribution=i),null!=r&&(this.provider=r),null!=n&&(this.altText=n),null!=o&&(this.relatedImagesAddress=o)}return e.prototype.toJSON=function(){return{type:this.type,basicValue:this.basicValue,basicType:this.basicType,address:this.address,altText:this.altText,relatedImagesAddress:this.relatedImagesAddress,attribution:null==this.attribution?void 0:this.attribution.map((function(e){return e.toJSON()})),provider:null==this.provider?void 0:this.provider.toJSON()}},e.valueType="WebImage",e}();t.CustomFunctionWebImage=E;var P=function(){function e(e,t,n,o){null!=e&&(this.licenseAddress=e),null!=t&&(this.licenseText=t),null!=n&&(this.sourceAddress=n),null!=o&&(this.sourceText=o)}return e.prototype.toJSON=function(){return{licenseAddress:this.licenseAddress,licenseText:this.licenseText,sourceAddress:this.sourceAddress,sourceText:this.sourceText}},e}();t.CustomFunctionAttribution=P;var I=function(){function e(e,t,n){this.description=e,null!=t&&(this.logoSourceAddress=t),null!=n&&(this.logoTargetAddress=n)}return e.prototype.toJSON=function(){return{description:this.description,logoSourceAddress:this.logoSourceAddress,logoTargetAddress:this.logoTargetAddress}},e}();t.CustomFunctionProvider=I,t.CreateCustomFunctionInstance=function e(t){if(t instanceof Array)return t.map((function(t){return e(t)}));if(!(t instanceof Object))return t;var n=JSON.parse(t.value);switch(n.type){case D.valueType:return new D(n.text,n.properties);case F.valueType:return new F(n.primitive,n.numberFormat);case _.valueType:return new _(n.primitive,void 0,n.errorSubCode);case E.valueType:return new E(n.address,n.altText,n.relatedImagesAddress,n.attribution,n.provider);case"Double":case"String":case"Boolean":return n.primitive;default:throw r.Utility.createRuntimeError(M.generalException,"message","CustomFunctionProxy.createRichDataFromJsonString")}};var R=function(){function e(){this._whenInit=void 0,this._isInit=!1,this._setResultsDelayMillis=50,this._setResultsOverdueDelayMillis=2e3,this._maxContextSyncExecutionDurationMills=15e3,this._minContextSyncIntervalMills=500,this._smallerMinContextSyncIntervalMills=200,this._maxContextSyncIntervalMills=2e3,this._setResultsLifeMillis=6e4,this._ensureInitRetryDelayMillis=500,this._resultEntryBuffer={},this._resultEntryRetryBuffer={},this._retryBufferBodySize=0,this._isSetResultsTaskScheduled=!1,this._setResultsTaskOverdueTime=0,this._inProgressContextSyncExpectedFinishTime=0,this._batchQuotaMillis=1e3,this._invocationContextMap={},this._maxResultSize=2e6}return e.prototype._initSettings=function(){if("object"==typeof t.Script&&"object"==typeof t.Script._CustomFunctionSettings){if("number"==typeof t.Script._CustomFunctionSettings.setResultsDelayMillis){var e=t.Script._CustomFunctionSettings.setResultsDelayMillis;e=Math.max(0,e),e=Math.min(1e3,e),this._setResultsDelayMillis=e}if("number"==typeof t.Script._CustomFunctionSettings.ensureInitRetryDelayMillis){var n=t.Script._CustomFunctionSettings.ensureInitRetryDelayMillis;n=Math.max(0,n),n=Math.min(2e3,n),this._ensureInitRetryDelayMillis=n}if("number"==typeof t.Script._CustomFunctionSettings.setResultsLifeMillis){var o=t.Script._CustomFunctionSettings.setResultsLifeMillis;o=Math.max(0,o),o=Math.min(6e5,o),this._setResultsLifeMillis=o}if("number"==typeof t.Script._CustomFunctionSettings.batchQuotaMillis){var i=t.Script._CustomFunctionSettings.batchQuotaMillis;i=Math.max(0,i),i=Math.min(1e3,i),this._batchQuotaMillis=i}}},e.prototype.ensureInit=function(e){var t=this;return this._initSettings(),void 0===this._whenInit&&(this._whenInit=r.Utility._createPromiseFromResult(null).then((function(){if(!t._isInit)return e.eventRegistration.register(5,"",t._handleMessage.bind(t))})).then((function(){t._isInit=!0}))),this._isInit||e._pendingRequest._addPreSyncPromise(this._whenInit),this._whenInit},e.prototype.setCustomFunctionInvoker=function(e){"object"==typeof CustomFunctionMappings&&delete CustomFunctionMappings.__delay__,this._invoker=e},e.prototype.setCustomFunctionAssociation=function(e){var t=this;this._customFunctionMappingsUpperCase=void 0,this._association=e,this._association&&this._association.onchange((function(){t._customFunctionMappingsUpperCase=void 0}))},e.prototype._initFromHostBridge=function(e){var t=this;this._initSettings(),e.addHostMessageHandler((function(e){3===e.type?t._handleMessage(e.message):4===e.type&&t._handleSettings(e.message)})),this._isInit=!0,this._whenInit=r.CoreUtility.Promise.resolve()},e.prototype._handleSettings=function(e){r.Utility.log("CustomFunctionProxy._handleSettings:"+JSON.stringify(e)),e&&"object"==typeof e&&(A.s_shouldLog=e[A.CustomFunctionLoggingFlag])},e.prototype._handleMessage=function(t){try{r.Utility.log("CustomFunctionProxy._handleMessage"),r.Utility.checkArgumentNull(t,"args");for(var n=t.entries,o=[],i=[],a=[],s=0;s0&&this._handleMetadataEntries(a),o.length>0){var l=this._batchInvocationEntries(o);l.length>0&&this._invokeRemainingBatchEntries(l,0)}i.length>0&&this._handleCancellationEntries(i)}catch(t){throw e._tryLog(t),t}return r.Utility._createPromiseFromResult(null)},e.toLogMessage=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t},e._tryLog=function(t){var n=e.toLogMessage(t);r.Utility.log(n)},e.prototype._handleMetadataEntries=function(e){for(var n=0;n0&&e>this._setResultsTaskOverdueTime)return r.Utility.log("SetResultsTask overdue"),void this._executeSetResultsTask();this._isSetResultsTaskScheduled||(r.Utility.log("setTimeout(CustomFunctionProxy._executeSetResultsTask)"),setTimeout(this._executeSetResultsTask.bind(this),this._setResultsDelayMillis),this._isSetResultsTaskScheduled=!0,this._setResultsTaskOverdueTime=e+this._setResultsDelayMillis+this._setResultsOverdueDelayMillis)},e.prototype._convertCustomFunctionInvocationResultToArray=function(e){var t=[];return t.push(e.id),t.push(!e.failed),r.CoreUtility.isUndefined(e.value)?t.push(null):t.push(e.value),e.failed&&(r.CoreUtility.isUndefined(e.errorCode)?t.push(0):t.push(e.errorCode)),r.Utility.isSetSupported("CustomFunctions","1.9")&&t.push(e.outboundData),t},e.prototype._executeSetResultsTask=function(){var e=this;r.Utility.log("CustomFunctionProxy._executeSetResultsTask");var t=Date.now();if(this._inProgressContextSyncExpectedFinishTime>0&&this._inProgressContextSyncExpectedFinishTime>t)return r.Utility.log("context.sync() is in progress. setTimeout(CustomFunctionProxy._executeSetResultsTask)"),setTimeout(this._executeSetResultsTask.bind(this),this._setResultsDelayMillis),void(this._setResultsTaskOverdueTime=t+this._setResultsDelayMillis+this._setResultsOverdueDelayMillis);this._isSetResultsTaskScheduled=!1,this._setResultsTaskOverdueTime=0;var n={},o=!1;w.isFeatureEnabled(1)&&Object.keys(this._resultEntryRetryBuffer).length>0?(n=this._resultEntryRetryBuffer,this._resultEntryRetryBuffer={},this._retryBufferBodySize=2,o=!0):(n=this._resultEntryBuffer,this._resultEntryBuffer={});var i=r.Utility.isSetSupported("CustomFunctions","1.7"),a=[];for(var s in n)i?a.push(this._convertCustomFunctionInvocationResultToArray(n[s].result)):a.push(n[s].result);if(0!==a.length){var l=new v;i?l.customFunctions.setInvocationArrayResults(a):l.customFunctions.setInvocationResults(a);var c=Date.now();this._inProgressContextSyncExpectedFinishTime=c+this._maxContextSyncExecutionDurationMills,l.sync().then((function(t){var n=Date.now();e._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(n-c),o&&e._ensureSetResultsTaskIsScheduled(n)}),(function(t){var o=Date.now();e._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(o-c),w.isFeatureEnabled(1)&&t.code==r.ErrorCodes.requestPayloadSizeLimitExceeded?e._restoreAndSliceResultEntries(o,n):e._restoreResultEntries(o,n),e._ensureSetResultsTaskIsScheduled(o)}))}},e.prototype._restoreResultEntries=function(e,t){for(var n in t){var o=t[n];e-o.timeCreated<=this._setResultsLifeMillis&&(this._resultEntryBuffer[n]||(this._resultEntryBuffer[n]=o))}},e.prototype._restoreAndSliceResultEntries=function(e,t){for(var n in t){var o=t[n],i=void 0;if(e-o.timeCreated<=this._setResultsLifeMillis&&!this._resultEntryBuffer[n]){try{i=JSON.stringify(this._convertCustomFunctionInvocationResultToArray(o.result)).length+1}catch(e){this._resultEntryBuffer[n]=o,r.Utility.log("Result can't pass in JSON.stringify");continue}this._retryBufferBodySize+i=0},n.initialize=function(){var e=this,o=new v;return t.customFunctionProxy.ensureInit(o).then((function(){var i;return o.customFunctions._SetOsfControlContainerReadyForCustomFunctions(),r.Utility.isSetSupported("CustomFunctions","1.9")&&(i=o.customFunctions._GetEnabledFeatures()),r.Utility.log("OsfControl activation lifecycle: Set OsfControlContainer ready for CustomFunctions"),o._customData="SetOsfControlContainerReadyForCustomFunctions",o.sync().then((function(){d(i)||(e._enabledFeature=i.value)})).catch((function(e){!function(e,o){var i=e instanceof r.Error&&e.code===M.invalidOperationInCellEditMode;if(r.CoreUtility.log("Error on starting custom functions: "+e),i){r.CoreUtility.log("Was in cell-edit mode, will try again");var a=t.customFunctionProxy._ensureInitRetryDelayMillis;return new r.CoreUtility.Promise((function(e){return setTimeout(e,a)})).then((function(){return n.initialize()}))}throw e}(e)}))}))},n.prototype.setInvocationArrayResults=function(e){f("CustomFunctions.setInvocationArrayResults","CustomFunctions","1.4","Excel"),u(this,"SetInvocationArrayResults",0,[e],2,0)},n.prototype.setInvocationResults=function(e){u(this,"SetInvocationResults",0,[e],2,0)},n.prototype._GetEnabledFeatures=function(){return f("CustomFunctions._GetEnabledFeatures","CustomFunctions","1.4","Excel"),u(this,"_GetEnabledFeatures",1,[],4,0)},n.prototype._SetInvocationError=function(e,t){u(this,"_SetInvocationError",0,[e,t],2,0)},n.prototype._SetInvocationResult=function(e,t){u(this,"_SetInvocationResult",0,[e,t],2,0)},n.prototype._SetOsfControlContainerReadyForCustomFunctions=function(){u(this,"_SetOsfControlContainerReadyForCustomFunctions",0,[],10,0)},n.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),d(t)||m(this,t)},n.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),y(this,t,n)},n.newObject=function(e){return c(n,e,"Microsoft.ExcelServices.CustomFunctions",!1,4)},n.prototype.toJSON=function(){return h(this,{},{})},n}(r.ClientObject);t.CustomFunctions=w;var M,x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"CustomFunctionsContainer"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_navigationPropertyNames",{get:function(){return["customFunctions"]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customFunctions",{get:function(){return f("CustomFunctionsContainer.customFunctions","CustomFunctions","1.2","Excel"),this._C||(this._C=s(w,this,"CustomFunctions",!1,4)),this._C},enumerable:!1,configurable:!0}),t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!d(t)){var n=t;m(this,n),g(this,n,["customFunctions","CustomFunctions"])}},t.prototype.load=function(e){return p(this,e)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),y(this,t,n)},t.prototype.toJSON=function(){return h(this,{},{})},t}(r.ClientObject);t.CustomFunctionsContainer=x,function(e){e.generalException="GeneralException",e.invalidOperation="InvalidOperation",e.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"}(M||(M={}))}]),OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel=!0,OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria=!1,window.OfficeExtensionBatch=window.OfficeExtension,function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=OfficeExtensionBatch},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?r(a):o()}))}t.getItem=function(e,t){return a((function(){return window.localStorage.getItem(o+e)}),t)},t.setItem=function(e,t,n){return r((function(){return window.localStorage.setItem(o+e,t)}),n)},t.removeItem=function(e,t){return r((function(){return window.localStorage.removeItem(o+e)}),t)},t.clear=function(e){return r((function(){Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(o)})).forEach((function(e){return window.localStorage.removeItem(e)}))}),e)},t.getAllKeys=function(e){return a((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(o)})).map((function(e){return e.substr(o.length)}))}),e)},t.multiSet=function(e,t){return s(e,(function(e){var t=e[0],n=e[1];return window.localStorage.setItem(o+t,n)}),t)},t.multiRemove=function(e,t){return s(e,(function(e){return window.localStorage.removeItem(o+e)}),t)},t.multiGet=function(e,t){return new Promise((function(n,i){t||(t=function(){});var r=[],a=e.map((function(e){try{return[e,window.localStorage.getItem(o+e)]}catch(e){r.push(e)}})).filter((function(e){return e}));r.length>0?(t(r,a),i(r)):(t(null,a),n(a))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.displayWebDialog=t.Dialog=void 0;var o=n(0),i=function(){function e(e){this._dialog=e}return e.prototype.close=function(){return this._dialog.close(),o.CoreUtility.Promise.resolve()},e}();t.Dialog=i,t.displayWebDialog=function(e,t){return new o.CoreUtility.Promise((function(n,r){if(t.width&&t.height&&(!u(t.width)||!u(t.height)))throw new o.Error({code:"InvalidArgument",message:'Dimensions must be "number%" or number.'});var a,s={width:t.width?parseInt(t.width,10):50,height:t.height?parseInt(t.height,10):50,displayInIframe:t.displayInIFrame||!1};function l(e){t.onMessage&&t.onMessage(e.message,a,e.origin)}function c(e){12006===e.error?t.onClose&&t.onClose():t.onRuntimeError&&t.onRuntimeError(new o.Error(d(e.error)),a)}function u(e){return/^(\-|\+)?([0-9]+)%?$/.test(e)}function d(e){var t,n=((t={})[12002]={code:"InvalidUrl",message:"Cannot load URL, no such page or bad URL syntax."},t[12003]={code:"InvalidUrl",message:"HTTPS is required."},t[12004]={code:"Untrusted",message:"Domain is not trusted."},t[12005]={code:"InvalidUrl",message:"HTTPS is required."},t[12007]={code:"FailedToOpen",message:"Another dialog is already opened."},t);return n[e]?n[e]:{code:"Unknown",message:"An unknown error has occured"}}Office.context.ui.displayDialogAsync(e,s,(function(e){"failed"===e.status?r(new o.Error(d(e.error.code))):((a=e.value).addEventHandler(Office.EventType.DialogMessageReceived,l),a.addEventHandler(Office.EventType.DialogEventReceived,c),n(new i(a)))}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storage=void 0;var o="_OfficeRuntime_Storage_";function i(){window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_",null),window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_")}function r(e){return new Promise((function(t,n){try{i(),e(),t()}catch(e){n(e)}}))}function a(e){return new Promise((function(t,n){try{i(),t(e())}catch(e){n(e)}}))}function s(e,t){return new Promise((function(n,o){var r=[];try{i()}catch(e){r.push(e)}for(var a in e)if(e.hasOwnProperty(a)||Array.isArray(e))try{Array.isArray(e)?t(e[a]):t(a)}catch(e){r.push(e)}r.length>0?o(new Error("Unknown error.")):n()}))}t.storage={getItem:function(e){return a((function(){return window.localStorage.getItem(o+e)}))},setItem:function(e,t){return r((function(){return window.localStorage.setItem(o+e,t)}))},removeItem:function(e){return r((function(){return window.localStorage.removeItem(o+e)}))},getItems:function(e){return new Promise((function(t,n){var r={},a=[];try{i()}catch(e){n(e)}e.forEach((function(e){try{var t=window.localStorage.getItem(o+e);r[e]=t||null}catch(e){a.push(e)}})),a.length>0?n(new Error("Unknown error.")):t(r)}))},setItems:function(e){return s(e,(function(t){return window.localStorage.setItem(o+t,e[t])}))},removeItems:function(e){return s(e,(function(e){window.localStorage.removeItem(o+e)}))},getKeys:function(){return a((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(o)})).map((function(e){return e.substr(o.length)}))}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.experimentation=void 0;var o=function(){function e(){}return e.prototype.getBooleanFeatureGate=function(e,t){try{var n=Microsoft.Office.WebExtension.FeatureGates[e];return null==n?t:"true"===n.toString().toLowerCase()}catch(e){return t}},e.prototype.getIntFeatureGate=function(e,t){try{var n=parseInt(Microsoft.Office.WebExtension.FeatureGates[e]);return isNaN(n)?t:n}catch(e){return t}},e.prototype.getStringFeatureGate=function(e,t){try{var n=Microsoft.Office.WebExtension.FeatureGates[e];return null==n?t:n}catch(e){return t}},e.prototype.getChangeGate=function(e){return this.getBooleanFeatureGate(e,!0)},e.prototype.getBooleanFeatureGateAsync=function(e,t){return Promise.resolve(this.getBooleanFeatureGate(e,t))},e.prototype.getIntFeatureGateAsync=function(e,t){return Promise.resolve(this.getIntFeatureGate(e,t))},e.prototype.getStringFeatureGateAsync=function(e,t){return Promise.resolve(this.getStringFeatureGate(e,t))},e}();t.experimentation=new o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var o=n(8);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return o.Message}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var o=n(9),i=function(){function e(){this.listeners={}}return e.prototype.on=function(e,t){return this.add(e,t),new Promise((function(e){e()}))},e.prototype.off=function(e,t){return this.remove(e,t),new Promise((function(e){e()}))},e.prototype.emit=function(e,t){return this.send(e,t),new Promise((function(e){e()}))},Object.defineProperty(e,"instance",{get:function(){return e.singleton||(e.singleton=new e),this.singleton},enumerable:!1,configurable:!0}),e.prototype.setupReceive=function(){Office&&Office.context&&Office.context.messaging&&!Office.context.messaging.onMessage&&(Office.context.messaging.onMessage=this.receiveMessage.bind(this))},e.prototype.add=function(e,t){this.listeners.hasOwnProperty(e)||(this.listeners[e]=new o.ListenerManager,this.setupReceive()),this.listeners[e].add(t)},e.prototype.remove=function(e,t){this.listeners.hasOwnProperty(e)&&(t?this.listeners[e].remove(t):delete this.listeners[e])},e.prototype.send=function(e,t){var n={eventName:e,message:t};Office&&Office.context&&Office.context.messaging&&Office.context.messaging.sendMessage&&Office.context.messaging.sendMessage(n)},e.prototype.receiveMessage=function(e){var t=e.eventName,n=e.message;this.listeners.hasOwnProperty(t)&&this.listeners[t].call(n)},e}();t.Message=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListenerManager=void 0;var o=function(){function e(){this.listeners=[]}return e.prototype.add=function(e){this.listeners.push(e)},e.prototype.remove=function(e){var t=this.listeners.lastIndexOf(e);-1!==t&&this.listeners.splice(t,1)},e.prototype.call=function(e){this.listeners.forEach((function(t){return t(e)}))},e}();t.ListenerManager=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Auth=void 0;var o=n(0),i=function(){function e(){}return e.prototype.getAccessToken=function(e){return new o.CoreUtility.Promise((function(t,n){try{Office.context.auth.getAccessTokenAsync(e||{},(function(e){"succeeded"===e.status?t(e.value):n(e.error)}))}catch(e){n(e)}}))},e.prototype.getAuthContext=function(){return new o.CoreUtility.Promise((function(e,t){try{Office.context.auth.getAuthContextAsync((function(n){"succeeded"===n.status?e(n.value):t(n.error)}))}catch(e){t(e)}}))},Object.defineProperty(e,"instance",{get:function(){return e.singleton||(e.singleton=new e),e.singleton},enumerable:!1,configurable:!0}),e}();t.Auth=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ribbon=t.ui=void 0,t.ui={getRibbon:function(){return new Promise((function(e,t){e(new o)}))}};var o=function(){function e(){this.requestContext=new OfficeCore.RequestContext,OSF.WebAuth&&"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(this.requestContext._customData="WacPartition")}return e.prototype.requestUpdate=function(e){var t=this.requestContext.ribbon;return e.tabs.filter((function(e){return!!e.id})).forEach((function(e){var n=t.getTab(e.id);void 0!==e.visible&&null!==e.visible&&n.setVisibility(e.visible),e.controls.filter((function(e){return!!e.id})).forEach((function(e){var n=t.getButton(e.id);void 0!==e.enabled&&null!==e.enabled&&(n.enabled=e.enabled)}))})),this.requestContext.sync()},e}();t.Ribbon=o}]),window.OfficeRuntime=window._OfficeRuntimeWeb,exposeOfficeRuntimeThroughOfficeNamespace("undefined"!==typeof OfficeRuntime&&OfficeRuntime||void 0,"undefined"!==typeof Office&&Office||void 0),"undefined"!==typeof OSFPerformance&&(OSFPerformance.hostInitializationEnd=OSFPerformance.now(),OSFPerformance.totalJSHeapSize=OSFPerformance.getTotalJSHeapSize(),OSFPerformance.usedJSHeapSize=OSFPerformance.getUsedJSHeapSize(),OSFPerformance.jsHeapSizeLimit=OSFPerformance.getJSHeapSizeLimit()); \ No newline at end of file diff --git a/dist/excel-win32-16.01-core.debug.js b/dist/excel-win32-16.01-core.debug.js new file mode 100644 index 000000000..e15694fb5 --- /dev/null +++ b/dist/excel-win32-16.01-core.debug.js @@ -0,0 +1,8002 @@ +/* Excel specific API library (Core APIs only) */ + +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + + This file also contains the following Promise implementation (with a few small modifications): + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 2.3.0 +*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExt; +(function (OfficeExt) { + var MicrosoftAjaxFactory = (function () { + function MicrosoftAjaxFactory() { + } + MicrosoftAjaxFactory.prototype.isMsAjaxLoaded = function () { + if (typeof (Sys) !== 'undefined' && typeof (Type) !== 'undefined' && + Sys.StringBuilder && typeof (Sys.StringBuilder) === "function" && + Type.registerNamespace && typeof (Type.registerNamespace) === "function" && + Type.registerClass && typeof (Type.registerClass) === "function" && + typeof (Function._validateParams) === "function" && + Sys.Serialization && Sys.Serialization.JavaScriptSerializer && typeof (Sys.Serialization.JavaScriptSerializer.serialize) === "function") { + return true; + } + else { + return false; + } + }; + MicrosoftAjaxFactory.prototype.loadMsAjaxFull = function (callback) { + var msAjaxCDNPath = (window.location.protocol.toLowerCase() === 'https:' ? 'https:' : 'http:') + '//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js'; + OSF.OUtil.loadScript(msAjaxCDNPath, callback); + }; + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxError", { + get: function () { + if (this._msAjaxError == null && this.isMsAjaxLoaded()) { + this._msAjaxError = Error; + } + return this._msAjaxError; + }, + set: function (errorClass) { + this._msAjaxError = errorClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxString", { + get: function () { + if (this._msAjaxString == null && this.isMsAjaxLoaded()) { + this._msAjaxString = String; + } + return this._msAjaxString; + }, + set: function (stringClass) { + this._msAjaxString = stringClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxDebug", { + get: function () { + if (this._msAjaxDebug == null && this.isMsAjaxLoaded()) { + this._msAjaxDebug = Sys.Debug; + } + return this._msAjaxDebug; + }, + set: function (debugClass) { + this._msAjaxDebug = debugClass; + }, + enumerable: true, + configurable: true + }); + return MicrosoftAjaxFactory; + }()); + OfficeExt.MicrosoftAjaxFactory = MicrosoftAjaxFactory; +})(OfficeExt || (OfficeExt = {})); +var OsfMsAjaxFactory = new OfficeExt.MicrosoftAjaxFactory(); +var OSF = OSF || {}; +(function (OfficeExt) { + var SafeStorage = (function () { + function SafeStorage(_internalStorage) { + this._internalStorage = _internalStorage; + } + SafeStorage.prototype.getItem = function (key) { + try { + return this._internalStorage && this._internalStorage.getItem(key); + } + catch (e) { + return null; + } + }; + SafeStorage.prototype.setItem = function (key, data) { + try { + this._internalStorage && this._internalStorage.setItem(key, data); + } + catch (e) { + } + }; + SafeStorage.prototype.clear = function () { + try { + this._internalStorage && this._internalStorage.clear(); + } + catch (e) { + } + }; + SafeStorage.prototype.removeItem = function (key) { + try { + this._internalStorage && this._internalStorage.removeItem(key); + } + catch (e) { + } + }; + SafeStorage.prototype.getKeysWithPrefix = function (keyPrefix) { + var keyList = []; + try { + var len = this._internalStorage && this._internalStorage.length || 0; + for (var i = 0; i < len; i++) { + var key = this._internalStorage.key(i); + if (key.indexOf(keyPrefix) === 0) { + keyList.push(key); + } + } + } + catch (e) { + } + return keyList; + }; + SafeStorage.prototype.isLocalStorageAvailable = function () { + return (this._internalStorage != null); + }; + return SafeStorage; + }()); + OfficeExt.SafeStorage = SafeStorage; +})(OfficeExt || (OfficeExt = {})); +OSF.XdmFieldName = { + ConversationUrl: "ConversationUrl", + AppId: "AppId" +}; +OSF.TestFlightStart = 1000; +OSF.TestFlightEnd = 1009; +OSF.FlightNames = { + UseOriginNotUrl: 0, + AddinEnforceHttps: 2, + FirstPartyAnonymousProxyReadyCheckTimeout: 6, + AddinRibbonIdAllowUnknown: 9, + ManifestParserDevConsoleLog: 15, + AddinActionDefinitionHybridMode: 18, + UseActionIdForUILessCommand: 20, + RequirementSetRibbonApiOnePointTwo: 21, + SetFocusToTaskpaneIsEnabled: 22, + ShortcutInfoArrayInUserPreferenceData: 23, + OSFTestFlight1000: OSF.TestFlightStart, + OSFTestFlight1001: OSF.TestFlightStart + 1, + OSFTestFlight1002: OSF.TestFlightStart + 2, + OSFTestFlight1003: OSF.TestFlightStart + 3, + OSFTestFlight1004: OSF.TestFlightStart + 4, + OSFTestFlight1005: OSF.TestFlightStart + 5, + OSFTestFlight1006: OSF.TestFlightStart + 6, + OSFTestFlight1007: OSF.TestFlightStart + 7, + OSFTestFlight1008: OSF.TestFlightStart + 8, + OSFTestFlight1009: OSF.TestFlightEnd +}; +OSF.TrustUXFlightValues = { + TrustUXControlA: 0, + TrustUXExperimentB: 1, + TrustUXExperimentC: 2 +}; +OSF.FlightTreatmentNames = { + AddinTrustUXImprovement: "Microsoft.Office.SharedOnline.AddinTrustUXImprovement", + BlockAutoOpenAddInIfStoreDisabled: "Microsoft.Office.SharedOnline.BlockAutoOpenAddInIfStoreDisabled", + Bug7083046KillSwitch: "Microsoft.Office.SharedOnline.Bug7083046KillSwitch", + CheckProxyIsReadyRetry: "Microsoft.Office.SharedOnline.OEP.CheckProxyIsReadyRetry", + InsertionDialogFixesEnabled: "Microsoft.Office.SharedOnline.InsertionDialogFixesEnabled", + WopiPreinstalledAddInsEnabled: "Microsoft.Office.SharedOnline.WopiPreinstalledAddInsEnabled", + WopiUseNewActivate: "Microsoft.Office.SharedOnline.WopiUseNewActivate", + MosManifestEnabled: "Microsoft.Office.SharedOnline.OEP.MosManifest", + RemoveGetTrustNoPrompt: "Microsoft.Office.SharedOnline.removeGetTrustNoPrompt", + HostTrustDialog: "Microsoft.Office.SharedOnline.HostTrustDialog", + AddinDetailsServiceSupportEnabled: "Microsoft.Office.SharedOnline.AddinDetailsServiceSupportEnabled", + GetAddinFlyoutEnabled: "Microsoft.Office.SharedOnline.GetAddinFlyoutEnabled", + BackstageEnabled: "Microsoft.Office.SharedOnline.NewBackstageEnabled", + EnablingWindowOpenUsageLogging: "Microsoft.Office.SharedOnline.EnablingWindowOpenUsageLogging" +}; +OSF.Flights = []; +OSF.IntFlights = {}; +OSF.Settings = {}; +OSF.WindowNameItemKeys = { + BaseFrameName: "baseFrameName", + HostInfo: "hostInfo", + XdmInfo: "xdmInfo", + SerializerVersion: "serializerVersion", + AppContext: "appContext", + Flights: "flights" +}; +OSF.OUtil = (function () { + var _uniqueId = -1; + var _xdmInfoKey = '&_xdm_Info='; + var _serializerVersionKey = '&_serializer_version='; + var _flightsKey = '&_flights='; + var _xdmSessionKeyPrefix = '_xdm_'; + var _serializerVersionKeyPrefix = '_serializer_version='; + var _flightsKeyPrefix = '_flights='; + var _fragmentSeparator = '#'; + var _fragmentInfoDelimiter = '&'; + var _classN = "class"; + var _loadedScripts = {}; + var _defaultScriptLoadingTimeout = 30000; + var _safeSessionStorage = null; + var _safeLocalStorage = null; + var _rndentropy = new Date().getTime(); + function _random() { + var nextrand = 0x7fffffff * (Math.random()); + nextrand ^= _rndentropy ^ ((new Date().getMilliseconds()) << Math.floor(Math.random() * (31 - 10))); + return nextrand.toString(16); + } + ; + function _getSessionStorage() { + if (!_safeSessionStorage) { + try { + var sessionStorage = window.sessionStorage; + } + catch (ex) { + sessionStorage = null; + } + _safeSessionStorage = new OfficeExt.SafeStorage(sessionStorage); + } + return _safeSessionStorage; + } + ; + function _reOrderTabbableElements(elements) { + var bucket0 = []; + var bucketPositive = []; + var i; + var len = elements.length; + var ele; + for (i = 0; i < len; i++) { + ele = elements[i]; + if (ele.tabIndex) { + if (ele.tabIndex > 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex === 0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive = bucketPositive.sort(function (left, right) { + var diff = left.tabIndex - right.tabIndex; + if (diff === 0) { + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + return { + set_entropy: function OSF_OUtil$set_entropy(entropy) { + if (typeof entropy == "string") { + for (var i = 0; i < entropy.length; i += 4) { + var temp = 0; + for (var j = 0; j < 4 && i + j < entropy.length; j++) { + temp = (temp << 8) + entropy.charCodeAt(i + j); + } + _rndentropy ^= temp; + } + } + else if (typeof entropy == "number") { + _rndentropy ^= entropy; + } + else { + _rndentropy ^= 0x7fffffff * Math.random(); + } + _rndentropy &= 0x7fffffff; + }, + extend: function OSF_OUtil$extend(child, parent) { + var F = function () { }; + F.prototype = parent.prototype; + child.prototype = new F(); + child.prototype.constructor = child; + child.uber = parent.prototype; + if (parent.prototype.constructor === Object.prototype.constructor) { + parent.prototype.constructor = parent; + } + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name] = {}; + } + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { + if (parent && name && parent[name]) { + delete parent[name]; + } + }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret = {}; + for (var key in settingsCollection) { + var value = settingsCollection[key]; + try { + if (JSON) { + value = JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret = {}; + serializedSettings = serializedSettings || {}; + for (var key in serializedSettings) { + var value = serializedSettings[key]; + try { + if (JSON) { + value = JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if (!_loadedScriptEntry) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + var onLoadTimeOut = function OSF_OUtil_loadScript$onLoadTimeOut() { + if (window.navigator.userAgent.indexOf("Trident") > 0) { + onLoadError(null); + } + else { + onLoadError(new Event("Script load timed out")); + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError(errorEvent) { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(errorEvent); + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadTimeOut, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) { + if (url) { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link); + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { + var parsed = enumObject[str.trim()]; + if (typeof (parsed) == 'undefined') { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed; + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { + var obj = { calc: arguments[0] }; + return function () { + if (obj.calc) { + obj.val = obj.calc.apply(this, arguments); + delete obj.calc; + } + return obj.val; + }; + }, + getUniqueId: function OSF_OUtil$getUniqueId() { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString(); + }, + formatString: function OSF_OUtil$formatString() { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10) + 1; + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }, + generateConversationId: function OSF_OUtil$generateConversationId() { + return [_random(), _random(), (new Date()).getTime().toString()].join('_'); + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId(); + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { + return OSF.OUtil.addInfoAsHash(url, _xdmInfoKey, xdmInfoValue, false); + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) { + return OSF.OUtil.addInfoAsHash(url, _serializerVersionKey, serializerVersion, true); + }, + addFlightsAsHash: function OSF_OUtil$addFlightsAsHash(url, flights) { + return OSF.OUtil.addInfoAsHash(url, _flightsKey, flights, true); + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) { + url = url.trim() || ''; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if (encodeInfo) { + newFragment = [keyName, encodeURIComponent(infoValue), fragment].join(''); + } + else { + newFragment = [fragment, keyName, infoValue].join(''); + } + return [urlWithoutFragment, _fragmentSeparator, newFragment].join(''); + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.HostInfo); + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.XdmInfo); + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.SerializerVersion)); + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseFlights: function OSF_OUtil$parseFlights(skipSessionStorage) { + var flights = OSF.OUtil.parseFlightsWithGivenFragment(skipSessionStorage, window.location.hash); + if (flights.length == 0) { + flights = OSF.OUtil.parseFlightsFromWindowName(skipSessionStorage, window.name); + } + return flights; + }, + checkFlight: function OSF_OUtil$checkFlightEnabled(flight) { + return OSF.Flights && OSF.Flights.indexOf(flight) >= 0; + }, + pushFlight: function OSF_OUtil$pushFlight(flight) { + if (OSF.Flights.indexOf(flight) < 0) { + OSF.Flights.push(flight); + return true; + } + return false; + }, + getBooleanSetting: function OSF_OUtil$getSetting(settingName) { + return OSF.OUtil.getBooleanFromDictionary(OSF.Settings, settingName); + }, + getBooleanFromDictionary: function OSF_OUtil$getBooleanFromDictionary(settings, settingName) { + var result = (settings && settingName && settings[settingName] !== undefined && settings[settingName] && + ((typeof (settings[settingName]) === "string" && settings[settingName].toUpperCase() === 'TRUE') || + (typeof (settings[settingName]) === "boolean" && settings[settingName]))); + return result !== undefined ? result : false; + }, + getIntFromDictionary: function OSF_OUtil$getIntFromDictionary(settings, settingName) { + if (settings && settingName && settings[settingName] !== undefined && (typeof settings[settingName] === "string")) { + return parseInt(settings[settingName]); + } + else { + return NaN; + } + }, + pushIntFlight: function OSF_OUtil$pushIntFlight(flight, flightValue) { + if (!(flight in OSF.IntFlights)) { + OSF.IntFlights[flight] = flightValue; + return true; + } + return false; + }, + getIntFlight: function OSF_OUtil$getIntFlight(flight) { + if (OSF.IntFlights && (flight in OSF.IntFlights)) { + return OSF.IntFlights[flight]; + } + else { + return NaN; + } + }, + parseFlightsFromWindowName: function OSF_OUtil$parseFlightsFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.Flights)); + }, + parseFlightsWithGivenFragment: function OSF_OUtil$parseFlightsWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(_flightsKey, _flightsKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseArrayWithDefault: function OSF_OUtil$parseArrayWithDefault(jsonString) { + var array = []; + try { + array = JSON.parse(jsonString); + } + catch (ex) { } + if (!Array.isArray(array)) { + array = []; + } + return array; + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj != null) { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue != null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >= 0) { + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue = decodeURIComponent(infoValue); + } + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd = window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd == -1) { + sessionKeyEnd = window.name.length; + } + var sessionKey = window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString = window.location.search; + var conversationId = null; + if (searchString) { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1) === '=') { + conversationId = conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId = decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) { + var items = strInfo.split("$"); + if (typeof items[1] == "undefined") { + items = strInfo.split("|"); + } + if (typeof items[1] == "undefined") { + items = strInfo.split("%7C"); + } + return items; + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue = ''; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if (items != undefined && items.length >= 3) { + switch (xdmFieldName) { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break; + } + } + } + return fieldValue; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e = Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) + throw e; + for (var p in expectedProperties) { + e = Function._validateParameter(params[p], expectedProperties[p], p); + if (e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) { + if (typeof (OsfMsAjaxFactory) !== 'undefined' && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) { + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor = descriptor || {}; + for (var nd in attributes) { + var attribute = attributes[nd]; + if (descriptor[attribute] == undefined) { + descriptor[attribute] = true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors = descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for (var i = 0; i < propsLength; i++) { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable = descriptor.writable || false; + } + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret = []; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key == item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value == list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add = list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key] = value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2] = newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj) === "[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj) === "[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj) === "[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.attachEvent) { + element.attachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.detachEvent) { + element.detachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = null; + } + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) { + var xmlhttp; + try { + xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function () { + if (xmlhttp.readyState == 4) { + if (xmlhttp.status == 200) { + onSuccess(xmlhttp.responseText); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + if (!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, c2, c3, a, b, c; + var i; + var length = input.length; + do { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + if (!isNaN(c2)) { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + } + if (isNaN(c2)) { + temp[i - 1] = 64; + } + else if (isNaN(c3)) { + temp[i - 2] = 64; + temp[i - 1] = 64; + } + for (var t = 0; t < i; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getSessionStorage: function OSF_Outil$getSessionStorage() { + return _getSessionStorage(); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage = window.localStorage; + } + catch (ex) { + localStorage = null; + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage); + } + return _safeLocalStorage; + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) { + var hex = "#" + (Number(val) + 0x1000000).toString(16).slice(-6); + return hex; + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) { + element.onclick = function (e) { + handler(); + }; + element.ontouchend = function (e) { + handler(); + e.preventDefault(); + }; + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) { + var e = Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: false }, + { name: "paramName", type: String, mayBeNull: false } + ]); + if (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return ""; + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)", "i"); + if (!queryExp.test(queryString)) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return ""; + } + return queryExp.exec(queryString)[1]; + }, + getHostnamePortionForLogging: function OSF_Outil$getHostnamePortionForLogging(hostname) { + var e = Function._validateParams(arguments, [{ name: "hostname", type: String, mayBeNull: false } + ]); + if (e) { + return ""; + } + var hostnameSubstrings = hostname.split('.'); + var len = hostnameSubstrings.length; + if (len >= 2) { + return hostnameSubstrings[len - 2] + "." + hostnameSubstrings[len - 1]; + } + else if (len == 1) { + return hostnameSubstrings[0]; + } + }, + isiOS: function OSF_Outil$isiOS() { + return (window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false); + }, + isChrome: function OSF_Outil$isChrome() { + return (window.navigator.userAgent.indexOf("Chrome") > 0) && !OSF.OUtil.isEdge(); + }, + isEdge: function OSF_Outil$isEdge() { + return window.navigator.userAgent.indexOf("Edge") > 0; + }, + isIE: function OSF_Outil$isIE() { + return window.navigator.userAgent.indexOf("Trident") > 0; + }, + isFirefox: function OSF_Outil$isFirefox() { + return window.navigator.userAgent.indexOf("Firefox") > 0; + }, + startsWith: function OSF_Outil$startsWith(originalString, patternToCheck, browserIsIE) { + if (browserIsIE) { + return originalString.substr(0, patternToCheck.length) === patternToCheck; + } + else { + return originalString.startsWith(patternToCheck); + } + }, + containsPort: function OSF_Outil$containsPort(url, protocol, hostname, portNumber) { + return this.startsWith(url, protocol + "//" + hostname + ":" + portNumber, true) || this.startsWith(url, hostname + ":" + portNumber, true); + }, + getRedundandPortString: function OSF_Outil$getRedundandPortString(url, parser) { + if (!url || !parser) + return ""; + if (parser.protocol == "https:" && this.containsPort(url, "https:", parser.hostname, "443")) + return ":443"; + else if (parser.protocol == "http:" && this.containsPort(url, "http:", parser.hostname, "80")) + return ":80"; + return ""; + }, + removeChar: function OSF_Outil$removeChar(url, indexOfCharToRemove) { + if (indexOfCharToRemove < url.length - 1) + return url.substring(0, indexOfCharToRemove) + url.substring(indexOfCharToRemove + 1); + else if (indexOfCharToRemove == url.length - 1) + return url.substring(0, url.length - 1); + else + return url; + }, + cleanUrlOfChar: function OSF_Outil$cleanUrlOfChar(url, charToClean) { + var i; + for (i = 0; i < url.length; i++) { + if (url.charAt(i) === charToClean) { + if (i + 1 >= url.length) { + return this.removeChar(url, i); + } + else if (charToClean === '/') { + if (url.charAt(i + 1) === '?' || url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + else if (charToClean === '?') { + if (url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + } + } + return url; + }, + cleanUrl: function OSF_Outil$cleanUrl(url) { + url = this.cleanUrlOfChar(url, '/'); + url = this.cleanUrlOfChar(url, '?'); + url = this.cleanUrlOfChar(url, '#'); + if (url.substr(0, 8) == "https://") { + var portIndex = url.indexOf(":443"); + if (portIndex != -1) { + if (portIndex == url.length - 4 || url.charAt(portIndex + 4) == "/" || url.charAt(portIndex + 4) == "?" || url.charAt(portIndex + 4) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 4); + } + } + } + else if (url.substr(0, 7) == "http://") { + var portIndex = url.indexOf(":80"); + if (portIndex != -1) { + if (portIndex == url.length - 3 || url.charAt(portIndex + 3) == "/" || url.charAt(portIndex + 3) == "?" || url.charAt(portIndex + 3) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 3); + } + } + } + return url; + }, + parseUrl: function OSF_Outil$parseUrl(url, enforceHttps) { + if (enforceHttps === void 0) { enforceHttps = false; } + if (typeof url === "undefined" || !url) { + return undefined; + } + var notHttpsErrorMessage = "NotHttps"; + var invalidUrlErrorMessage = "InvalidUrl"; + var isIEBoolean = this.isIE(); + var parsedUrlObj = { + protocol: undefined, + hostname: undefined, + host: undefined, + port: undefined, + pathname: undefined, + search: undefined, + hash: undefined, + isPortPartOfUrl: undefined + }; + try { + if (isIEBoolean) { + var parser = document.createElement("a"); + parser.href = url; + if (!parser || !parser.protocol || !parser.host || !parser.hostname || !parser.href + || this.cleanUrl(parser.href).toLowerCase() !== this.cleanUrl(url).toLowerCase()) { + throw invalidUrlErrorMessage; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && parser.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + var redundandPortString = this.getRedundandPortString(url, parser); + parsedUrlObj.protocol = parser.protocol; + parsedUrlObj.hostname = parser.hostname; + parsedUrlObj.port = (redundandPortString == "") ? parser.port : ""; + parsedUrlObj.host = (redundandPortString != "") ? parser.hostname : parser.host; + parsedUrlObj.pathname = (isIEBoolean ? "/" : "") + parser.pathname; + parsedUrlObj.search = parser.search; + parsedUrlObj.hash = parser.hash; + parsedUrlObj.isPortPartOfUrl = this.containsPort(url, parser.protocol, parser.hostname, parser.port); + } + else { + var urlObj = new URL(url); + if (urlObj && urlObj.protocol && urlObj.host && urlObj.hostname) { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && urlObj.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + parsedUrlObj.protocol = urlObj.protocol; + parsedUrlObj.hostname = urlObj.hostname; + parsedUrlObj.port = urlObj.port; + parsedUrlObj.host = urlObj.host; + parsedUrlObj.pathname = urlObj.pathname; + parsedUrlObj.search = urlObj.search; + parsedUrlObj.hash = urlObj.hash; + parsedUrlObj.isPortPartOfUrl = urlObj.host.lastIndexOf(":" + urlObj.port) == (urlObj.host.length - urlObj.port.length - 1); + } + } + } + catch (err) { + if (err.message === notHttpsErrorMessage) + throw err; + } + return parsedUrlObj; + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) { + if (sourceObj == null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr = []; + for (var i = 0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj = sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property] = sourceObj[property]; + } + } + return copyObj; + } + }, + createObject: function OSF_Outil$createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + }, + addClass: function OSF_OUtil$addClass(elmt, val) { + if (!OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + if (className) { + elmt.setAttribute(_classN, className + " " + val); + } + else { + elmt.setAttribute(_classN, val); + } + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) { + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findNextPos = function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && backward) { + return -1; + } + else if (currPos === allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if (all.length === 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, backward); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findCurrPos = function (all, curr) { + var i = 0; + for (; i < all.length; i++) { + if (all[i] === curr) { + return i; + } + } + return -1; + }; + var findNextPos = function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && shift) { + return -1; + } + else if (currPos === allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all, curr); + next = findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, shift); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + isNullOrUndefined: function OSF_OUtil$isNullOrUndefined(value) { + if (typeof (value) === "undefined") { + return true; + } + if (value === null) { + return true; + } + return false; + }, + stringEndsWith: function OSF_OUtil$stringEndsWith(value, subString) { + if (!OSF.OUtil.isNullOrUndefined(value) && !OSF.OUtil.isNullOrUndefined(subString)) { + if (subString.length > value.length) { + return false; + } + if (value.substr(value.length - subString.length) === subString) { + return true; + } + } + return false; + }, + hashCode: function OSF_OUtil$hashCode(str) { + var hash = 0; + if (!OSF.OUtil.isNullOrUndefined(str)) { + var i = 0; + var len = str.length; + while (i < len) { + hash = (hash << 5) - hash + str.charCodeAt(i++) | 0; + } + } + return hash; + }, + getValue: function OSF_OUtil$getValue(value, defaultValue) { + if (OSF.OUtil.isNullOrUndefined(value)) { + return defaultValue; + } + return value; + }, + externalNativeFunctionExists: function OSF_OUtil$externalNativeFunctionExists(type) { + return type === 'unknown' || type !== 'undefined'; + } + }; +})(); +OSF.OUtil.Guid = (function () { + var hexCode = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result = ""; + var tick = (new Date()).getTime(); + var index = 0; + for (; index < 32 && tick > 0; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + }; +})(); +try { + (function () { + OSF.Flights = OSF.OUtil.parseFlights(true); + })(); +} +catch (ex) { } +window.OSF = OSF; +OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614, + Visio: 8388615, + OneNoteAndroid: 4194305 +}; +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +}; +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +}; +OSF.AgaveHostAction = { + "Select": 0, + "UnSelect": 1, + "CancelDialog": 2, + "InsertAgave": 3, + "CtrlF6In": 4, + "CtrlF6Exit": 5, + "CtrlF6ExitShift": 6, + "SelectWithError": 7, + "NotifyHostError": 8, + "RefreshAddinCommands": 9, + "PageIsReady": 10, + "TabIn": 11, + "TabInShift": 12, + "TabExit": 13, + "TabExitShift": 14, + "EscExit": 15, + "F2Exit": 16, + "ExitNoFocusable": 17, + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20, + "UpdateTargetUrl": 21, + "InstallCustomFunctions": 22, + "SendTelemetryEvent": 23, + "UninstallCustomFunctions": 24, + "SendMessage": 25, + "LaunchExtensionComponent": 26, + "StopExtensionComponent": 27, + "RestartExtensionComponent": 28, + "EnableTaskPaneHeaderButton": 29, + "DisableTaskPaneHeaderButton": 30, + "TaskPaneHeaderButtonClicked": 31, + "RemoveAppCommandsAddin": 32, + "RefreshRibbonGallery": 33, + "GetOriginalControlId": 34, + "OfficeJsReady": 35, + "InsertDevManifest": 36, + "InsertDevManifestError": 37, + "SendCustomerContent": 38, + "KeyboardShortcuts": 39 +}; +OSF.SharedConstants = { + "NotificationConversationIdSuffix": '_ntf' +}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix, featureGates, officeTheme, initialDisplayMode) { + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this._featureGates = featureGates; + this._officeTheme = officeTheme; + this._initialDisplayMode = initialDisplayMode; + this.get_id = function get_id() { return this._id; }; + this.get_appName = function get_appName() { return this._appName; }; + this.get_appVersion = function get_appVersion() { return this._appVersion; }; + this.get_appUILocale = function get_appUILocale() { return this._appUILocale; }; + this.get_dataLocale = function get_dataLocale() { return this._dataLocale; }; + this.get_docUrl = function get_docUrl() { return this._docUrl; }; + this.get_clientMode = function get_clientMode() { return this._clientMode; }; + this.get_bindings = function get_bindings() { return this._bindings; }; + this.get_settings = function get_settings() { return this._settings; }; + this.get_reason = function get_reason() { return this._reason; }; + this.get_osfControlType = function get_osfControlType() { return this._osfControlType; }; + this.get_eToken = function get_eToken() { return this._eToken; }; + this.get_correlationId = function get_correlationId() { return this._correlationId; }; + this.get_appInstanceId = function get_appInstanceId() { return this._appInstanceId; }; + this.get_touchEnabled = function get_touchEnabled() { return this._touchEnabled; }; + this.get_commerceAllowed = function get_commerceAllowed() { return this._commerceAllowed; }; + this.get_appMinorVersion = function get_appMinorVersion() { return this._appMinorVersion; }; + this.get_requirementMatrix = function get_requirementMatrix() { return this._requirementMatrix; }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() { return this._dialogRequirementMatrix; }; + this.get_hostCustomMessage = function get_hostCustomMessage() { return this._hostCustomMessage; }; + this.get_hostFullVersion = function get_hostFullVersion() { return this._hostFullVersion; }; + this.get_isDialog = function get_isDialog() { return this._isDialog; }; + this.get_clientWindowHeight = function get_clientWindowHeight() { return this._clientWindowHeight; }; + this.get_clientWindowWidth = function get_clientWindowWidth() { return this._clientWindowWidth; }; + this.get_addinName = function get_addinName() { return this._addinName; }; + this.get_appDomains = function get_appDomains() { return this._appDomains; }; + this.get_featureGates = function get_featureGates() { return this._featureGates; }; + this.get_officeTheme = function get_officeTheme() { return this._officeTheme; }; + this.get_initialDisplayMode = function get_initialDisplayMode() { return this._initialDisplayMode ? this._initialDisplayMode : 0; }; +}; +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 +}; +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 +}; +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Client", Microsoft.Office); +OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened", + ControlActivation: "controlActivation" +}; +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType = { + All: "all" +}; +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + JsonData: "jsonData", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + AllowConsentPrompt: "allowConsentPrompt", + ForMSGraphAccess: "forMSGraphAccess", + AllowSignInPrompt: "allowSignInPrompt", + JsonPayload: "jsonPayload", + EnableNewHosts: "enableNewHosts", + AccountTypeFilter: "accountTypeFilter", + AddinTrustId: "addinTrustId", + Reserved: "reserved", + Tcid: "tcid", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + PromptBeforeOpen: "promptBeforeOpen", + EnforceAppDomain: "enforceAppDomain", + UrlNoHostInfo: "urlNoHostInfo", + TargetOrigin: "targetOrigin", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64", + FormId: "formId" +}; +OSF.OUtil.setNamespace("DDA", OSF); +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 +}; +OSF.DDA.PropertyDescriptors = { + AsyncResultStatus: "AsyncResultStatus" +}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { + if (eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || + eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) { + return id + "_" + eventType; + } + else { + return eventType; + } +}; +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidGetAuthContextMethod: 99, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, + dispidInsertFormMethod: 106, + dispidDisplayRibbonCalloutAsyncMethod: 109, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidExecuteFeature: 146, + dispidQueryFeature: 147, + dispidGetNestedAppAuthContextMethod: 205, + dispidMethodMax: 205 +}; +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidOlkRecurrenceChangedEvent: 49, + dispidOlkAttachmentsChangedEvent: 50, + dispidOlkEnhancedLocationsChangedEvent: 51, + dispidOlkInfobarClickedEvent: 52, + dispidOlkSelectedItemsChangedEvent: 53, + dispidOlkSensitivityLabelChangedEvent: 54, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 +}; +OSF.DDA.ErrorCodeManager = (function () { + var _errorMappings = {}; + return { + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) { + var errorArgs = _errorMappings[errorCode]; + if (!errorArgs) { + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + } + else { + if (!errorArgs.name) { + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + } + if (!errorArgs.message) { + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message; + } + } + return errorArgs; + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) { + _errorMappings[errorCode] = errorNameMessage; + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1000, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2000, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3000, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4000, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5000, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeOperationCancelled: 5014, + ooeWorkbookHidden: 5015, + ooeWriteNotSupportedWhenModalDialogOpen: 5016, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeRequestPayloadSizeLimitExceeded: 5103, + ooeResponsePayloadSizeLimitExceeded: 5104, + ooeCustomXmlNodeNotFound: 6000, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7000, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8000, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11000, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12000, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeModalDialogOpen: 12012, + ooeDocumentIsInactive: 12013, + ooeDialogParentIsMinimized: 12014, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010, + ooeResourceNotAllowed: 13011, + ooeSSOUnsupportedPlatform: 13012, + ooeSSOCallThrottled: 13013, + ooeAccessDenied: 13990, + ooeGeneralException: 13991 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidReadForBlankRow }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnMatrixData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { name: stringNS.L_InvalidBinding, message: stringNS.L_InvalidColumnsForBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { name: stringNS.L_SaveSettingsError, message: stringNS.L_SettingsCannotSave }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { name: stringNS.L_SettingsStaleError, message: stringNS.L_SettingsAreStale }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { name: stringNS.L_HostError, message: stringNS.L_OperationNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { name: stringNS.L_InternalError, message: stringNS.L_InternalErrorDescription }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { name: stringNS.L_PermissionDenied, message: stringNS.L_DocumentReadOnly }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { name: stringNS.L_EventRegistrationError, message: stringNS.L_EventHandlerNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { name: stringNS.L_InvalidAPICall, message: stringNS.L_InvalidApiCallInContext }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { name: stringNS.L_ShuttingDown, message: stringNS.L_ShuttingDown }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { name: stringNS.L_UnsupportedEnumeration, message: stringNS.L_UnsupportedEnumerationMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden] = { name: stringNS.L_APICallFailed, message: stringNS.L_WorkbookHiddenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen] = { name: stringNS.L_APICallFailed, message: stringNS.L_WriteNotSupportedWhenModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestPayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_ResponsePayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { name: stringNS.L_CustomXmlOutOfDateName, message: stringNS.L_CustomXmlOutOfDateMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { name: stringNS.L_CannotNavigateTo, message: stringNS.L_CannotNavigateTo }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { name: stringNS.L_SpecifiedIdNotExist, message: stringNS.L_SpecifiedIdNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { name: stringNS.L_NavOutOfBound, message: stringNS.L_NavOutOfBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { name: stringNS.L_DataWriteReminder, message: stringNS.L_CellDataAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { name: stringNS.L_MissingParameter, message: stringNS.L_ElementMissing }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidCellsValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidTableOptionValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidFormatValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_RowIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_ColIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_FormatValueOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { name: stringNS.L_FormattingReminder, message: stringNS.L_CellFormatAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { name: stringNS.L_MemoryLimit, message: stringNS.L_CloseFileBeforeRetrieve }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { name: stringNS.L_NetworkProblem, message: stringNS.L_NetworkProblemRetrieveFile }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { name: stringNS.L_InvalidValue, message: stringNS.L_SliceSizeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAlreadyOpened }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NetworkProblem }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { name: stringNS.L_DialogNavigateError, message: stringNS.L_DialogInvalidScheme }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAddressNotTrusted }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_ModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DocumentIsInactive }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogParentIsMinimized }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform] = { name: stringNS.L_APINotSupported, message: stringNS.L_SSOUnsupportedPlatform }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled] = { name: stringNS.L_OperationCancelledError, message: stringNS.L_OperationCancelledErrorMessage }; + } + }; +})(); +(function (OfficeExt) { + var Requirement; + (function (Requirement) { + var RequirementVersion = (function () { + function RequirementVersion() { + } + return RequirementVersion; + }()); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = (function () { + function RequirementMatrix(_setMap) { + this.isSetSupported = function _isSetSupported(name, minVersion) { + if (name == undefined) { + return false; + } + if (minVersion == undefined) { + minVersion = 0; + } + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if (sets.hasOwnProperty(name.toLowerCase())) { + var setMaxVersion = sets[name.toLowerCase()]; + try { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.major > 0 && + setMaxVersionNum.minor >= 0 && + setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor >= minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion = function (version) { + version = version + ""; + var temp = version.split("."); + var major = 0; + var minor = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } + } + var result = { "minor": minor, "major": major }; + return result; + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this); + } + return RequirementMatrix; + }()); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = (function () { + function DefaultSetRequirement(setMap) { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) { + for (var name in addedSet) { + this._sets[name] = addedSet[name]; + } + }; + this._sets = setMap; + } + return DefaultSetRequirement; + }()); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultRequiredDialogSetRequirement = (function (_super) { + __extends(DefaultRequiredDialogSetRequirement, _super); + function DefaultRequiredDialogSetRequirement() { + return _super.call(this, { + "dialogapi": 1.1 + }) || this; + } + return DefaultRequiredDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultRequiredDialogSetRequirement = DefaultRequiredDialogSetRequirement; + var DefaultOptionalDialogSetRequirement = (function (_super) { + __extends(DefaultOptionalDialogSetRequirement, _super); + function DefaultOptionalDialogSetRequirement() { + return _super.call(this, { + "dialogorigin": 1.1 + }) || this; + } + return DefaultOptionalDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultOptionalDialogSetRequirement = DefaultOptionalDialogSetRequirement; + var ExcelClientDefaultSetRequirement = (function (_super) { + __extends(ExcelClientDefaultSetRequirement, _super); + function ExcelClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "excelapi": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = (function (_super) { + __extends(ExcelClientV1DefaultSetRequirement, _super); + function ExcelClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return ExcelClientV1DefaultSetRequirement; + }(ExcelClientDefaultSetRequirement)); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = (function (_super) { + __extends(OutlookClientDefaultSetRequirement, _super); + function OutlookClientDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = (function (_super) { + __extends(WordClientDefaultSetRequirement, _super); + function WordClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1, + "wordapi": 1.1 + }) || this; + } + return WordClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = (function (_super) { + __extends(WordClientV1DefaultSetRequirement, _super); + function WordClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2, + "imagecoercion": 1.1 + }); + return _this; + } + return WordClientV1DefaultSetRequirement; + }(WordClientDefaultSetRequirement)); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = (function (_super) { + __extends(PowerpointClientDefaultSetRequirement, _super); + function PowerpointClientDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = (function (_super) { + __extends(PowerpointClientV1DefaultSetRequirement, _super); + function PowerpointClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return PowerpointClientV1DefaultSetRequirement; + }(PowerpointClientDefaultSetRequirement)); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = (function (_super) { + __extends(ProjectClientDefaultSetRequirement, _super); + function ProjectClientDefaultSetRequirement() { + return _super.call(this, { + "selection": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ProjectClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = (function (_super) { + __extends(ExcelWebDefaultSetRequirement, _super); + function ExcelWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "file": 1.1 + }) || this; + } + return ExcelWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = (function (_super) { + __extends(WordWebDefaultSetRequirement, _super); + function WordWebDefaultSetRequirement() { + return _super.call(this, { + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "imagecoercion": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablecoercion": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = (function (_super) { + __extends(PowerpointWebDefaultSetRequirement, _super); + function PowerpointWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "settings": 1.1 + }) || this; + } + return PowerpointWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = (function (_super) { + __extends(OutlookWebDefaultSetRequirement, _super); + function OutlookWebDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = (function (_super) { + __extends(SwayWebDefaultSetRequirement, _super); + function SwayWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "documentevents": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return SwayWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = (function (_super) { + __extends(AccessWebDefaultSetRequirement, _super); + function AccessWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "partialtablebindings": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1 + }) || this; + } + return AccessWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = (function (_super) { + __extends(ExcelIOSDefaultSetRequirement, _super); + function ExcelIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = (function (_super) { + __extends(WordIOSDefaultSetRequirement, _super); + function WordIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = (function (_super) { + __extends(WordIOSV1DefaultSetRequirement, _super); + function WordIOSV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2 + }); + return _this; + } + return WordIOSV1DefaultSetRequirement; + }(WordIOSDefaultSetRequirement)); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = (function (_super) { + __extends(PowerpointIOSDefaultSetRequirement, _super); + function PowerpointIOSDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = (function (_super) { + __extends(OutlookIOSDefaultSetRequirement, _super); + function OutlookIOSDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.1 + }) || this; + } + return OutlookIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = (function () { + function RequirementsMatrixFactory() { + } + RequirementsMatrixFactory.initializeOsfDda = function () { + OSF.OUtil.setNamespace("Requirement", OSF.DDA); + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function (appContext) { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if (RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) { + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + } + else { + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})); + } + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function (appContext) { + var setRequirements = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + setRequirements = new DefaultSetRequirement(matrixItem); + } + else { + setRequirements = new DefaultRequiredDialogSetRequirement(); + var mainRequirement = appContext.get_requirementMatrix(); + if (mainRequirement != undefined && mainRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(mainRequirement.toLowerCase()); + for (var name in setRequirements._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + var dialogOptionalSetRequirement = new DefaultOptionalDialogSetRequirement(); + for (var name in dialogOptionalSetRequirement._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + } + } + return new RequirementMatrix(setRequirements); + }; + RequirementsMatrixFactory.getClientFullVersionString = function (appContext) { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || + appName == 4096 || + appName == 8192 || + appName == 65536; + if (isIOSClient && appContext.get_appVersion() == 1) { + if (appName == 4096 && appMinorVersion >= 15) { + appFullVersion = "16.00.01"; + } + else { + appFullVersion = "16.00"; + } + } + else if (appContext.get_appName() == 64) { + appFullVersion = appContext.get_appVersion(); + } + else { + if (appMinorVersion < 10) { + appMinorVersionString = "0" + appMinorVersion; + } + else { + appMinorVersionString = "" + appMinorVersion; + } + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString; + } + return appContext.get_appName() + "-" + appFullVersion; + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function () { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement(); + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory; + }()); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory; + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})); +})(OfficeExt || (OfficeExt = {})); +OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" +}; +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" +}; +OSF.NamespaceManager = (function OSF_NamespaceManager() { + var _userOffice; + var _useShortcut = false; + return { + enableShortcut: function OSF_NamespaceManager$enableShortcut() { + if (!_useShortcut) { + if (window.Office) { + _userOffice = window.Office; + } + else { + OSF.OUtil.setNamespace("Office", window); + } + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true; + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() { + if (_useShortcut) { + if (_userOffice) { + window.Office = _userOffice; + } + else { + OSF.OUtil.unsetNamespace("Office", window); + } + _useShortcut = false; + } + } + }; +})(); +OSF.NamespaceManager.enableShortcut(); +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { + if (useShortcut) { + OSF.NamespaceManager.enableShortcut(); + } + else { + OSF.NamespaceManager.disableShortcut(); + } +}; +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { + var promise; + if (str && typeof str == "string") { + var index = str.indexOf("#"); + if (index != -1) { + var op = str.substring(0, index); + var target = str.substring(index + 1); + switch (op) { + case "binding": + case "bindings": + if (target) { + promise = new OSF.DDA.BindingPromise(target); + } + break; + } + } + } + if (!promise) { + if (errorCallback) { + var callbackType = typeof errorCallback; + if (callbackType == "function") { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext, OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)); + } + else { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, callbackType); + } + } + } + else { + promise.onFail = errorCallback; + return promise; + } +}; +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { + OSF.OUtil.defineEnumerableProperties(this, { + "contentLanguage": { + value: officeAppContext.get_dataLocale() + }, + "displayLanguage": { + value: officeAppContext.get_appUILocale() + }, + "touchEnabled": { + value: officeAppContext.get_touchEnabled() + }, + "commerceAllowed": { + value: officeAppContext.get_commerceAllowed() + }, + "host": { + value: OfficeExt.HostName.Host.getInstance().getHost() + }, + "platform": { + value: OfficeExt.HostName.Host.getInstance().getPlatform() + }, + "isDialog": { + value: OSF._OfficeAppFactory.getHostInfo().isDialog + }, + "diagnostics": { + value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion()) + } + }); + if (license) { + OSF.OUtil.defineEnumerableProperty(this, "license", { + value: license + }); + } + if (officeAppContext.ui) { + OSF.OUtil.defineEnumerableProperty(this, "ui", { + value: officeAppContext.ui + }); + } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.webAuth) { + OSF.OUtil.defineEnumerableProperty(this, "webAuth", { + value: officeAppContext.webAuth + }); + } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } + if (officeAppContext.extensionLifeCycle) { + OSF.OUtil.defineEnumerableProperty(this, "extensionLifeCycle", { + value: officeAppContext.extensionLifeCycle + }); + } + if (officeAppContext.messaging) { + OSF.OUtil.defineEnumerableProperty(this, "messaging", { + value: officeAppContext.messaging + }); + } + if (officeAppContext.ui && officeAppContext.ui.taskPaneAction) { + OSF.OUtil.defineEnumerableProperty(this, "taskPaneAction", { + value: officeAppContext.ui.taskPaneAction + }); + } + if (officeAppContext.ui && officeAppContext.ui.ribbonGallery) { + OSF.OUtil.defineEnumerableProperty(this, "ribbonGallery", { + value: officeAppContext.ui.ribbonGallery + }); + } + if (officeAppContext.get_isDialog()) { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } + else { + if (document) { + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: document + }); + } + if (appOM) { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this, displayName, { + value: appOM + }); + } + if (officeAppContext.get_officeTheme()) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return officeAppContext.get_officeTheme(); + } + }); + } + else if (getOfficeTheme) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return getOfficeTheme(); + } + }); + } + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + if (officeAppContext.get_featureGates) { + var featureGates = officeAppContext.get_featureGates(); + if (featureGates && featureGates["EnablePublicThemeManager"]) { + var themeManager = new OSF.DDA.Theming.InternalThemeHandler(); + themeManager.InitializeThemeManager(); + OSF.OUtil.defineEnumerableProperty(this, "themeManager", { + value: themeManager + }); + } + } + } +}; +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { + OSF.DDA.OutlookContext.uber.constructor.call(this, appContext, null, license, appOM, getOfficeTheme); + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "roamingSettings", { + value: settings + }); + } + if (appContext.sensitivityLabelsCatalog) { + OSF.OUtil.defineEnumerableProperty(this, "sensitivityLabelsCatalog", { + value: appContext.sensitivityLabelsCatalog() + }); + } +}; +OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { + var mode; + switch (officeAppContext.get_clientMode()) { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break; + } + ; + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "settings", { + value: settings + }); + } + ; + OSF.OUtil.defineMutableProperties(this, { + "mode": { + value: mode + }, + "url": { + value: officeAppContext.get_docUrl() + } + }); +}; +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { + OSF.DDA.JsomDocument.uber.constructor.call(this, officeAppContext, settings); + if (bindingFacade) { + OSF.OUtil.defineEnumerableProperty(this, "bindings", { + get: function OSF_DDA_Document$GetBindings() { return bindingFacade; } + }); + } + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetSelectedDataAsync, + am.SetSelectedDataAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])); +}; +OSF.OUtil.extend(OSF.DDA.JsomDocument, OSF.DDA.Document); +OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension, "context", { + get: function Microsoft_Office_WebExtension$GetContext() { + var context; + if (OSF && OSF._OfficeAppFactory) { + context = OSF._OfficeAppFactory.getContext(); + } + return context; + } +}); +OSF.DDA.License = function OSF_DDA_License(eToken) { + OSF.OUtil.defineEnumerableProperty(this, "value", { + value: eToken + }); +}; +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function () { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, displayName); + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) { + for (var name in params) { + var param = params[name]; + var arg = args[name]; + if (param["enum"]) { + switch (typeof arg) { + case "string": + if (OSF.OUtil.listContainsValue(param["enum"], arg)) { + break; + } + case "undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + } + if (param["types"]) { + if (!OSF.OUtil.listContainsValue(param["types"], typeof arg)) { + throw getInvalidParameterString(); + } + } + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) { + if (userArgs.length < requiredCount) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + } + var requiredArgs = []; + var index; + for (index = 0; index < requiredCount; index++) { + requiredArgs.push(userArgs[index]); + } + this.verifyArguments(requiredParameters, requiredArgs); + var ret = {}; + for (index = 0; index < requiredCount; index++) { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if (param.verify) { + var isValid = param.verify(arg, caller, stateInfo); + if (!isValid) { + throw getInvalidParameterString(); + } + } + ret[param.name] = arg; + } + return ret; + }, + this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) { + options = options || {}; + for (var optionName in supportedOptions) { + if (!OSF.OUtil.listContainsKey(options, optionName)) { + var value = undefined; + var option = supportedOptions[optionName]; + if (option.calculate && requiredArgs) { + value = option.calculate(requiredArgs, caller, stateInfo); + } + if (!value && option.defaultValue !== undefined) { + value = option.defaultValue; + } + options[optionName] = value; + } + } + return options; + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) { + var callArgs = {}; + for (var r in required) { + callArgs[r] = required[r]; + } + for (var o in options) { + callArgs[o] = options[o]; + } + for (var s in privateStateCallbacks) { + callArgs[s] = privateStateCallbacks[s](caller, stateInfo); + } + if (checkCallArgs) { + callArgs = checkCallArgs(callArgs, caller, stateInfo); + } + return callArgs; + }; +}; +OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" +}; +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" +}; +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 +}; +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" +}; +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.AsyncMethodNames[entry] = am; + } +}; +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 2) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + case "function": + if (parameterCallback) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + } + else { + parameterCallback = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + if (parameterCallback) { + if (options[Microsoft.Office.WebExtension.Parameters.Callback]) { + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + } + else { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + } + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (onSucceeded) { + payload = onSucceeded(response, caller, callArgs); + } + else { + payload = response; + } + } + else { + if (onFailed) { + payload = onFailed(status, response); + } + else { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + } + return payload; + }; + this.getCallArgs = function (suppliedArgs) { + var options, parameterCallback; + for (var i = suppliedArgs.length - 1; i >= requiredCount; i--) { + var argument = suppliedArgs[i]; + switch (typeof argument) { + case "object": + options = argument; + break; + case "function": + parameterCallback = argument; + break; + } + } + options = options || {}; + if (parameterCallback) { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + return options; + }; +}; +OSF.DDA.AsyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [], supportedOptions, privateStateCallbacks, params.onSucceeded, params.onFailed, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function (callDefinition) { + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { + OSF.OUtil.defineEnumerableProperties(this, { + "name": { + value: name + }, + "message": { + value: message + }, + "code": { + value: code + } + }); +}; +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { + OSF.OUtil.defineEnumerableProperties(this, { + "value": { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value] + }, + "status": { + value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded + } + }); + if (initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) { + OSF.OUtil.defineEnumerableProperty(this, "asyncContext", { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context] + }); + } + if (errorArgs) { + OSF.OUtil.defineEnumerableProperty(this, "error", { + value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + }); + } +}; +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if (callback) { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + } + else { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs, errorArgs)); + } +}; +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.SyncMethodNames[entry] = am; + } +}; +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 1) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; +}; +OSF.DDA.SyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [], supportedOptions, params.privateStateCallbacks, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function (callDefinition) { + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.ListType = (function () { + var listTypes = {}; + return { + setListType: function OSF_DDA_ListType$AddListType(t, prop) { listTypes[t] = prop; }, + isListType: function OSF_DDA_ListType$IsListType(t) { return OSF.OUtil.listContainsKey(listTypes, t); }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) { return listTypes[t]; } + }; +})(); +OSF.DDA.HostParameterMap = function (specialProcessor, mappings) { + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function (data) { + if (data != null && data.rows !== undefined) { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData; + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.JsonData] = { + toHost: function (data) { return data; }, + fromHost: function (data) { return typeof data === "string" ? JSON.parse(data) : data; } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) { + var ret = preimageSet ? {} : undefined; + for (var entry in preimageSet) { + var preimage = preimageSet[entry]; + var image; + if (OSF.DDA.ListType.isListType(entry)) { + image = []; + for (var subEntry in preimage) { + image.push(mapValues(preimage[subEntry], mapping)); + } + } + else if (OSF.OUtil.listContainsKey(dynamicTypes, entry)) { + image = dynamicTypes[entry][mapping](preimage); + } + else if (mapping == fromHostMap && specialProcessor.preserveNesting(entry)) { + image = mapValues(preimage, mapping); + } + else { + var maps = mappings[entry]; + if (maps) { + var map = maps[mapping]; + if (map) { + image = map[preimage]; + if (image === undefined) { + image = preimage; + } + } + } + else { + image = preimage; + } + } + ret[entry] = image; + } + return ret; + } + ; + function generateArguments(imageSet, parameters) { + var ret; + for (var param in parameters) { + var arg; + if (specialProcessor.isComplexType(param)) { + arg = generateArguments(imageSet, mappings[param][toHostMap]); + } + else { + arg = imageSet[param]; + } + if (arg != undefined) { + if (!ret) { + ret = {}; + } + var index = parameters[param]; + if (index == self) { + index = param; + } + ret[index] = specialProcessor.pack(param, arg); + } + } + return ret; + } + ; + function extractArguments(source, parameters, extracted) { + if (!extracted) { + extracted = {}; + } + for (var param in parameters) { + var index = parameters[param]; + var value; + if (index == self) { + value = source; + } + else if (index == sourceData) { + extracted[param] = source.toArray(); + continue; + } + else { + value = source[index]; + } + if (value === null || value === undefined) { + extracted[param] = undefined; + } + else { + value = specialProcessor.unpack(param, value); + var map; + if (specialProcessor.isComplexType(param)) { + map = mappings[param][fromHostMap]; + if (specialProcessor.preserveNesting(param)) { + extracted[param] = extractArguments(value, map); + } + else { + extractArguments(value, map, extracted); + } + } + else { + if (OSF.DDA.ListType.isListType(param)) { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for (var item in value) { + extractedValues[item] = extractArguments(value[item], map); + } + extracted[param] = extractedValues; + } + else { + extracted[param] = value; + } + } + } + } + return extracted; + } + ; + function applyMap(mapName, preimage, mapping) { + var parameters = mappings[mapName][mapping]; + var image; + if (mapping == "toHost") { + var imageSet = mapValues(preimage, mapping); + image = generateArguments(imageSet, parameters); + } + else if (mapping == "fromHost") { + var argumentSet = extractArguments(preimage, parameters); + image = mapValues(argumentSet, mapping); + } + return image; + } + ; + if (!mappings) { + mappings = {}; + } + this.addMapping = function (mapName, description) { + var toHost, fromHost; + if (description.map) { + toHost = description.map; + fromHost = {}; + for (var preimage in toHost) { + var image = toHost[preimage]; + if (image == self) { + image = preimage; + } + fromHost[image] = preimage; + } + } + else { + toHost = description.toHost; + fromHost = description.fromHost; + } + var pair = mappings[mapName]; + if (pair) { + var currMap = pair[toHostMap]; + for (var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for (var fh in currMap) + fromHost[fh] = currMap[fh]; + } + else { + pair = mappings[mapName] = {}; + } + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost; + }; + this.toHost = function (mapName, preimage) { return applyMap(mapName, preimage, toHostMap); }; + this.fromHost = function (mapName, image) { return applyMap(mapName, image, fromHostMap); }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function (ct) { specialProcessor.addComplexType(ct); }; + this.getDynamicType = function (dt) { return specialProcessor.getDynamicType(dt); }; + this.setDynamicType = function (dt, handler) { specialProcessor.setDynamicType(dt, handler); }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function (preimageSet, mapping) { return mapValues(preimageSet, mapping); }; +}; +OSF.DDA.SpecialProcessor = function (complexTypes, dynamicTypes) { + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) { + complexTypes.push(ct); + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) { + return dynamicTypes[dt]; + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) { + dynamicTypes[dt] = handler; + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) { + return OSF.OUtil.listContainsValue(complexTypes, t); + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) { + return OSF.OUtil.listContainsKey(dynamicTypes, p); + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) { + var pn = []; + if (OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if (OSF.DDA.DataNodeEventProperties) { + pn = pn.concat([ + OSF.DDA.DataNodeEventProperties.OldNode, + OSF.DDA.DataNodeEventProperties.NewNode, + OSF.DDA.DataNodeEventProperties.NextSiblingNode + ]); + } + return OSF.OUtil.listContainsValue(pn, p); + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].toHost(arg); + } + else { + value = arg; + } + return value; + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.DDA.getDecoratedParameterMap = function (specialProcessor, initialDefs) { + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + } + parameterMap.define = function define(definition) { + var args = {}; + var toHost = createObject(definition.toHost); + if (definition.invertible) { + args.map = toHost; + } + else if (definition.canonical) { + args.toHost = args.fromHost = toHost; + } + else { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost); + } + parameterMap.addMapping(definition.type, args); + if (definition.isComplexType) + parameterMap.addComplexType(definition.type); + }; + for (var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap; +}; +OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + "GoToByIdAsync": did.dispidNavigateToMethod, + "GetSelectedDataAsync": did.dispidGetSelectedDataMethod, + "SetSelectedDataAsync": did.dispidSetSelectedDataMethod, + "GetDocumentCopyChunkAsync": did.dispidGetDocumentCopyChunkMethod, + "ReleaseDocumentCopyAsync": did.dispidReleaseDocumentCopyMethod, + "GetDocumentCopyAsync": did.dispidGetDocumentCopyMethod, + "AddFromSelectionAsync": did.dispidAddBindingFromSelectionMethod, + "AddFromPromptAsync": did.dispidAddBindingFromPromptMethod, + "AddFromNamedItemAsync": did.dispidAddBindingFromNamedItemMethod, + "GetAllAsync": did.dispidGetAllBindingsMethod, + "GetByIdAsync": did.dispidGetBindingMethod, + "ReleaseByIdAsync": did.dispidReleaseBindingMethod, + "GetDataAsync": did.dispidGetBindingDataMethod, + "SetDataAsync": did.dispidSetBindingDataMethod, + "AddRowsAsync": did.dispidAddRowsMethod, + "AddColumnsAsync": did.dispidAddColumnsMethod, + "DeleteAllDataValuesAsync": did.dispidClearAllRowsMethod, + "RefreshAsync": did.dispidLoadSettingsMethod, + "SaveAsync": did.dispidSaveSettingsMethod, + "GetActiveViewAsync": did.dispidGetActiveViewMethod, + "GetFilePropertiesAsync": did.dispidGetFilePropertiesMethod, + "GetOfficeThemeAsync": did.dispidGetOfficeThemeMethod, + "GetDocumentThemeAsync": did.dispidGetDocumentThemeMethod, + "ClearFormatsAsync": did.dispidClearFormatsMethod, + "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, + "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, + "GetAuthContextAsync": did.dispidGetAuthContextMethod, + "GetNestedAppAuthContextAsync": did.dispidGetNestedAppAuthContextMethod, + "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, + "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, + "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, + "InsertFormAsync": did.dispidInsertFormMethod, + "ExecuteFeature": did.dispidExecuteFeature, + "QueryFeature": did.dispidQueryFeature, + "AddDataPartAsync": did.dispidAddDataPartMethod, + "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, + "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, + "GetPartXmlAsync": did.dispidGetDataPartXmlMethod, + "GetPartNodesAsync": did.dispidGetDataPartNodesMethod, + "DeleteDataPartAsync": did.dispidDeleteDataPartMethod, + "GetNodeValueAsync": did.dispidGetDataNodeValueMethod, + "GetNodeXmlAsync": did.dispidGetDataNodeXmlMethod, + "GetRelativeNodesAsync": did.dispidGetDataNodesMethod, + "SetNodeValueAsync": did.dispidSetDataNodeValueMethod, + "SetNodeXmlAsync": did.dispidSetDataNodeXmlMethod, + "AddDataPartNamespaceAsync": did.dispidAddDataNamespaceMethod, + "GetDataPartNamespaceAsync": did.dispidGetDataUriByPrefixMethod, + "GetDataPartPrefixAsync": did.dispidGetDataPrefixByUriMethod, + "GetNodeTextAsync": did.dispidGetDataNodeTextMethod, + "SetNodeTextAsync": did.dispidSetDataNodeTextMethod, + "GetSelectedTask": did.dispidGetSelectedTaskMethod, + "GetTask": did.dispidGetTaskMethod, + "GetWSSUrl": did.dispidGetWSSUrlMethod, + "GetTaskField": did.dispidGetTaskFieldMethod, + "GetSelectedResource": did.dispidGetSelectedResourceMethod, + "GetResourceField": did.dispidGetResourceFieldMethod, + "GetProjectField": did.dispidGetProjectFieldMethod, + "GetSelectedView": did.dispidGetSelectedViewMethod, + "GetTaskByIndex": did.dispidGetTaskByIndexMethod, + "GetResourceByIndex": did.dispidGetResourceByIndexMethod, + "SetTaskField": did.dispidSetTaskFieldMethod, + "SetResourceField": did.dispidSetResourceFieldMethod, + "GetMaxTaskIndex": did.dispidGetMaxTaskIndexMethod, + "GetMaxResourceIndex": did.dispidGetMaxResourceIndexMethod, + "CreateTask": did.dispidCreateTaskMethod + }; + for (var method in methodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = methodMap[method]; + } + } + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var syncMethodMap = { + "MessageParent": did.dispidMessageParentMethod, + "SendMessage": did.dispidSendMessageMethod + }; + for (var method in syncMethodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = syncMethodMap[method]; + } + } + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + "SettingsChanged": did.dispidSettingsChangedEvent, + "DocumentSelectionChanged": did.dispidDocumentSelectionChangedEvent, + "BindingSelectionChanged": did.dispidBindingSelectionChangedEvent, + "BindingDataChanged": did.dispidBindingDataChangedEvent, + "ActiveViewChanged": did.dispidActiveViewChangedEvent, + "OfficeThemeChanged": did.dispidOfficeThemeChangedEvent, + "DocumentThemeChanged": did.dispidDocumentThemeChangedEvent, + "AppCommandInvoked": did.dispidAppCommandInvokedEvent, + "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, + "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, + "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, + "RecurrenceChanged": did.dispidOlkRecurrenceChangedEvent, + "AttachmentsChanged": did.dispidOlkAttachmentsChangedEvent, + "EnhancedLocationsChanged": did.dispidOlkEnhancedLocationsChangedEvent, + "InfobarClicked": did.dispidOlkInfobarClickedEvent, + "SelectedItemsChanged": did.dispidOlkSelectedItemsChangedEvent, + "SensitivityLabelChanged": did.dispidOlkSensitivityLabelChangedEvent, + "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, + "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, + "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, + "DataNodeInserted": did.dispidDataNodeAddedEvent, + "DataNodeReplaced": did.dispidDataNodeReplacedEvent, + "DataNodeDeleted": did.dispidDataNodeDeletedEvent + }; + for (var event in eventMap) { + if (jsom[event]) { + dispIdMap[jsom[event]] = eventMap[event]; + } + } + function IsObjectEvent(dispId) { + return (dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { + if (typeof ex == "number") { + if (!callArgs) { + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + } + OSF.DDA.issueAsyncResult(callArgs, ex, OSF.DDA.ErrorCodeManager.getErrorArgs(ex)); + } + else { + throw ex; + } + } + ; + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) { + var callArgs; + try { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) { + window.Excel._RedirectV1APIs = true; + } + if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if (richApiInExcelMethodSubstitution.preprocess) { + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + } + var ctx = new window.Excel.RequestContext(); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); + ctx.sync() + .then(function () { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if (richApiInExcelMethodSubstitution.postprocess) { + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); + } + if (status != 0) { + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, response); + })["catch"](function (error) { + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure, null); + }); + } + else { + var hostCallArgs; + if (parameterMap.toHost) { + hostCallArgs = parameterMap.toHost(dispId, callArgs); + } + else { + hostCallArgs = callArgs; + } + var startTime = (new Date()).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + "dispId": dispId, + "hostCallArgs": hostCallArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": function (status, hostResponseArgs) { + var responseArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (parameterMap.fromHost) { + responseArgs = parameterMap.fromHost(dispId, hostResponseArgs); + } + else { + responseArgs = hostResponseArgs; + } + } + else { + responseArgs = hostResponseArgs; + } + var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); + OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry && !(OSF.ConstantNames && OSF.ConstantNames.IsCustomFunctionsRuntime)) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } + } + }); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); + if (!added) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; + } + } + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if (isPopupWindow) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return; + } + var dispId_1 = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId_1); + var targetId_1 = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId_1) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId_1, + "targetId": targetId_1, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = null; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web" && dispId_1 == OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent) { + args = hostArgs; + } + else { + args = parameterMap.fromHost(dispId_1, hostArgs); + } + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId_1, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId_1, args)); + } + }); + } + else { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var status, removeSuccess; + if (handler === null) { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + else { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration + }); + } + else { + onEnsureRegistration(status); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller, isModal) { + var callArgs; + var targetId; + var asyncMethodCall = null; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) { + var payload; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + else { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status, onSucceedArgs, caller, callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + } + OSF.DDA.issueAsyncResult(callArgs, status, payload); + } + try { + if (dialogMessageEvent == undefined || dialogOtherEvent == undefined) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + } + if (!isModal) { + if (OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + } + else { + if (OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.id]; + } + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + callArgs["isModal"] = isModal; + targetId = JSON.stringify(callArgs); + if (!OSF.DialogShownStatus.hasDialogShown) { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + } + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = parameterMap.fromHost(dispId, hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent, caller, args); + if (event.type == dialogOtherEvent) { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]); + } + eventDispatch.fireOrQueueEvent(event); + if (args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false; + } + } + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) { + var callArgs; + var dialogMessageEvent, dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false; + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": closeCallback + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + if (closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed, OSF.DDA.AsyncMethodNames.CloseAsync.displayName, closeStatus); + } + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; +}; +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { + for (var entry in asyncMethodNames) { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if (!target[name]) { + OSF.OUtil.defineEnumerableProperty(target, name, { + value: (function (asyncMethod) { + return function () { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod, arguments, target, privateState); + }; + })(method) + }); + } + } +}; +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if (!target[add]) { + OSF.OUtil.defineEnumerableProperty(target, add, { + value: function () { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments, eventDispatch, target, isPopupWindow); + } + }); + } + if (!target[remove]) { + OSF.OUtil.defineEnumerableProperty(target, remove, { + value: function () { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments, eventDispatch, target); + } + }); + } +}; +(function (OfficeExt) { + var loadMsAjax = false; + var MsAjaxTypeHelper = (function () { + function MsAjaxTypeHelper() { + } + MsAjaxTypeHelper.isInstanceOfType = function (type, instance) { + if (typeof (instance) === "undefined" || instance === null) + return false; + if (instance instanceof type) + return true; + var instanceType = instance.constructor; + if (!instanceType || (typeof (instanceType) !== "function") || !instanceType.__typeName || instanceType.__typeName === 'Object') { + instanceType = Object; + } + return !!(instanceType === type) || + (instanceType.__typeName && type.__typeName && instanceType.__typeName === type.__typeName); + }; + return MsAjaxTypeHelper; + }()); + OfficeExt.MsAjaxTypeHelper = MsAjaxTypeHelper; + var MsAjaxError = (function () { + function MsAjaxError() { + } + MsAjaxError.create = function (message, errorInfo) { + var err = new Error(message); + err.message = message; + if (errorInfo) { + for (var v in errorInfo) { + err[v] = errorInfo[v]; + } + } + err.popStackFrame(); + return err; + }; + MsAjaxError.parameterCount = function (message) { + var displayMessage = "Sys.ParameterCountException: " + (message ? message : "Parameter count mismatch."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.ParameterCountException' }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argument = function (paramName, message) { + var displayMessage = "Sys.ArgumentException: " + (message ? message : "Value does not fall within the expected range."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentNull = function (paramName, message) { + var displayMessage = "Sys.ArgumentNullException: " + (message ? message : "Value cannot be null."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentOutOfRange = function (paramName, actualValue, message) { + var displayMessage = "Sys.ArgumentOutOfRangeException: " + (message ? message : "Specified argument was out of the range of valid values."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + if (typeof (actualValue) !== "undefined" && actualValue !== null) { + displayMessage += "\n" + MsAjaxString.format("Actual value was {0}.", actualValue); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentType = function (paramName, actualType, expectedType, message) { + var displayMessage = "Sys.ArgumentTypeException: "; + if (message) { + displayMessage += message; + } + else if (actualType && expectedType) { + displayMessage += MsAjaxString.format("Object of type '{0}' cannot be converted to type '{1}'.", actualType.getName ? actualType.getName() : actualType, expectedType.getName ? expectedType.getName() : expectedType); + } + else { + displayMessage += "Object cannot be converted to the required type."; + } + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentUndefined = function (paramName, message) { + var displayMessage = "Sys.ArgumentUndefinedException: " + (message ? message : "Value cannot be undefined."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.invalidOperation = function (message) { + var displayMessage = "Sys.InvalidOperationException: " + (message ? message : "Operation is not valid due to the current state of the object."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.InvalidOperationException' }); + err.popStackFrame(); + return err; + }; + return MsAjaxError; + }()); + OfficeExt.MsAjaxError = MsAjaxError; + var MsAjaxString = (function () { + function MsAjaxString() { + } + MsAjaxString.format = function (format) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var source = format; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10); + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }; + MsAjaxString.startsWith = function (str, prefix) { + return (str.substr(0, prefix.length) === prefix); + }; + return MsAjaxString; + }()); + OfficeExt.MsAjaxString = MsAjaxString; + var MsAjaxDebug = (function () { + function MsAjaxDebug() { + } + MsAjaxDebug.trace = function (text) { + if (typeof Debug !== "undefined" && Debug.writeln) + Debug.writeln(text); + if (window.console && window.console.log) + window.console.log(text); + if (window.opera && window.opera.postError) + window.opera.postError(text); + if (window.debugService && window.debugService.trace) + window.debugService.trace(text); + var a = document.getElementById("TraceConsole"); + if (a && a.tagName.toUpperCase() === "TEXTAREA") { + a.appendChild(document.createTextNode(text + "\n")); + } + }; + return MsAjaxDebug; + }()); + OfficeExt.MsAjaxDebug = MsAjaxDebug; + if (!loadMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) { + var registerTypeInternal = function registerTypeInternal(type, name, isClass) { + if (type.__typeName === undefined || type.__typeName === null) { + type.__typeName = name; + } + if (type.__class === undefined || type.__class === null) { + type.__class = isClass; + } + }; + registerTypeInternal(Function, "Function", true); + registerTypeInternal(Error, "Error", true); + registerTypeInternal(Object, "Object", true); + registerTypeInternal(String, "String", true); + registerTypeInternal(Boolean, "Boolean", true); + registerTypeInternal(Date, "Date", true); + registerTypeInternal(Number, "Number", true); + registerTypeInternal(RegExp, "RegExp", true); + registerTypeInternal(Array, "Array", true); + if (!Function.createCallback) { + Function.createCallback = function Function$createCallback(method, context) { + var e = Function._validateParams(arguments, [ + { name: "method", type: Function }, + { name: "context", mayBeNull: true } + ]); + if (e) + throw e; + return function () { + var l = arguments.length; + if (l > 0) { + var args = []; + for (var i = 0; i < l; i++) { + args[i] = arguments[i]; + } + args[l] = context; + return method.apply(this, args); + } + return method.call(this, context); + }; + }; + } + if (!Function.createDelegate) { + Function.createDelegate = function Function$createDelegate(instance, method) { + var e = Function._validateParams(arguments, [ + { name: "instance", mayBeNull: true }, + { name: "method", type: Function } + ]); + if (e) + throw e; + return function () { + return method.apply(instance, arguments); + }; + }; + } + if (!Function._validateParams) { + Function._validateParams = function (params, expectedParams, validateParameterCount) { + var e, expectedLength = expectedParams.length; + validateParameterCount = validateParameterCount || (typeof (validateParameterCount) === "undefined"); + e = Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i = 0, l = params.length; i < l; i++) { + var expectedParam = expectedParams[Math.min(i, expectedLength - 1)], paramName = expectedParam.name; + if (expectedParam.parameterArray) { + paramName += "[" + (i - expectedLength + 1) + "]"; + } + else if (!validateParameterCount && (i >= expectedLength)) { + break; + } + e = Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; + }; + } + if (!Function._validateParameterCount) { + Function._validateParameterCount = function (params, expectedParams, validateParameterCount) { + var i, error, expectedLen = expectedParams.length, actualLen = params.length; + if (actualLen < expectedLen) { + var minParams = expectedLen; + for (i = 0; i < expectedLen; i++) { + var param = expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error = true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error = true; + for (i = 0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error = false; + break; + } + } + } + if (error) { + var e = MsAjaxError.parameterCount(); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!Function._validateParameter) { + Function._validateParameter = function (param, expectedParam, paramName) { + var e, expectedType = expectedParam.type, expectedInteger = !!expectedParam.integer, expectedDomElement = !!expectedParam.domElement, mayBeNull = !!expectedParam.mayBeNull; + e = Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType = expectedParam.elementType, elementMayBeNull = !!expectedParam.elementMayBeNull; + if (expectedType === Array && typeof (param) !== "undefined" && param !== null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger = !!expectedParam.elementInteger, expectedElementDomElement = !!expectedParam.elementDomElement; + for (var i = 0; i < param.length; i++) { + var elem = param[i]; + e = Function._validateParameterType(elem, expectedElementType, expectedElementInteger, expectedElementDomElement, elementMayBeNull, paramName + "[" + i + "]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; + }; + } + if (!Function._validateParameterType) { + Function._validateParameterType = function (param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof (param) === "undefined") { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param === null) { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && !OfficeExt.MsAjaxTypeHelper.isInstanceOfType(expectedType, param)) { + e = OfficeExt.MsAjaxError.argumentType(paramName, typeof (param), expectedType); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!window.Type) { + window.Type = Function; + } + if (!Type.registerNamespace) { + Type.registerNamespace = function (ns) { + var namespaceParts = ns.split('.'); + var currentNamespace = window; + for (var i = 0; i < namespaceParts.length; i++) { + currentNamespace[namespaceParts[i]] = currentNamespace[namespaceParts[i]] || {}; + currentNamespace = currentNamespace[namespaceParts[i]]; + } + }; + } + if (!Type.prototype.registerClass) { + Type.prototype.registerClass = function (cls) { cls = {}; }; + } + if (typeof (Sys) === "undefined") { + Type.registerNamespace('Sys'); + } + if (!Error.prototype.popStackFrame) { + Error.prototype.popStackFrame = function () { + if (arguments.length !== 0) + throw MsAjaxError.parameterCount(); + if (typeof (this.stack) === "undefined" || this.stack === null || + typeof (this.fileName) === "undefined" || this.fileName === null || + typeof (this.lineNumber) === "undefined" || this.lineNumber === null) { + return; + } + var stackFrames = this.stack.split("\n"); + var currentFrame = stackFrames[0]; + var pattern = this.fileName + ":" + this.lineNumber; + while (typeof (currentFrame) !== "undefined" && + currentFrame !== null && + currentFrame.indexOf(pattern) === -1) { + stackFrames.shift(); + currentFrame = stackFrames[0]; + } + var nextFrame = stackFrames[1]; + if (typeof (nextFrame) === "undefined" || nextFrame === null) { + return; + } + var nextFrameParts = nextFrame.match(/@(.*):(\d+)$/); + if (typeof (nextFrameParts) === "undefined" || nextFrameParts === null) { + return; + } + this.fileName = nextFrameParts[1]; + this.lineNumber = parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack = stackFrames.join("\n"); + }; + } + OsfMsAjaxFactory.msAjaxError = MsAjaxError; + OsfMsAjaxFactory.msAjaxString = MsAjaxString; + OsfMsAjaxFactory.msAjaxDebug = MsAjaxDebug; + } +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.setNamespace("SafeArray", OSF.DDA); +OSF.DDA.SafeArray.Response = { + Status: 0, + Payload: 1 +}; +OSF.DDA.SafeArray.UniqueArguments = { + Offset: "offset", + Run: "run", + BindingSpecificData: "bindingSpecificData", + MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" +}; +OSF.OUtil.setNamespace("Delegate", OSF.DDA.SafeArray); +OSF.DDA.SafeArray.Delegate._onException = function OSF_DDA_SafeArray_Delegate$OnException(ex, args) { + var status; + var statusNumber = ex.number; + if (statusNumber) { + switch (statusNumber) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2147467259: + if (args.dispId == OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + break; + case -2146828283: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147209089: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147208704: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + if (args.onComplete) { + args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } +}; +OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod = function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) { + var status; + var number = ex.number; + if (number) { + switch (number) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; +}; +OSF.DDA.SafeArray.Delegate.SpecialProcessor = function OSF_DDA_SafeArray_Delegate_SpecialProcessor() { + function _2DVBArrayToJaggedArray(vbArr) { + var ret; + try { + var rows = vbArr.ubound(1); + var cols = vbArr.ubound(2); + vbArr = vbArr.toArray(); + if (rows == 1 && cols == 1) { + ret = [vbArr]; + } + else { + ret = []; + for (var row = 0; row < rows; row++) { + var rowArr = []; + for (var col = 0; col < cols; col++) { + var datum = vbArr[row * cols + col]; + if (datum != OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) { + rowArr.push(datum); + } + } + if (rowArr.length > 0) { + ret.push(rowArr); + } + } + } + } + catch (ex) { + } + return ret; + } + var complexTypes = []; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = (function () { + var tableRows = 0; + var tableHeaders = 1; + return { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) { + if (OSF.DDA.TableDataProperties && typeof data != "string" && data[OSF.DDA.TableDataProperties.TableRows] !== undefined) { + var tableData = []; + tableData[tableRows] = data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.DDA.TableDataProperties.TableHeaders]; + data = tableData; + } + return data; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) { + var ret; + if (hostArgs.toArray) { + var dimensions = hostArgs.dimensions(); + if (dimensions === 2) { + ret = _2DVBArrayToJaggedArray(hostArgs); + } + else { + var array = hostArgs.toArray(); + if (array.length === 2 && ((array[0] != null && array[0].toArray) || (array[1] != null && array[1].toArray))) { + ret = {}; + ret[OSF.DDA.TableDataProperties.TableRows] = _2DVBArrayToJaggedArray(array[tableRows]); + ret[OSF.DDA.TableDataProperties.TableHeaders] = _2DVBArrayToJaggedArray(array[tableHeaders]); + } + else { + ret = array; + } + } + } + else { + ret = hostArgs; + } + return ret; + } + }; + })(); + OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes); + this.unpack = function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) { + var toArraySupported = arg !== undefined && arg.toArray !== undefined; + value = toArraySupported ? arg.toArray() : arg || {}; + } + else if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor); +OSF.DDA.SafeArray.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor(), [ + { + type: Microsoft.Office.WebExtension.Parameters.ValueFormat, + toHost: [ + { name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, value: 0 }, + { name: Microsoft.Office.WebExtension.ValueFormat.Formatted, value: 1 } + ] + }, + { + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [ + { name: Microsoft.Office.WebExtension.FilterType.All, value: 0 } + ] + } +]); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, + fromHost: [ + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, value: 0 }, + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) { + function toArray(args) { + var arrArgs = args; + if (OSF.OUtil.isArray(args)) { + var len = arrArgs.length; + for (var i = 0; i < len; i++) { + arrArgs[i] = toArray(arrArgs[i]); + } + } + else if (OSF.OUtil.isDate(args)) { + arrArgs = args.getVarDate(); + } + else if (typeof args === "object" && !OSF.OUtil.isArray(args)) { + arrArgs = []; + for (var index in args) { + if (!OSF.OUtil.isFunction(args[index])) { + arrArgs[index] = toArray(args[index]); + } + } + } + return arrArgs; + } + function fromSafeArray(value) { + var ret = value; + if (value != null && value.toArray) { + var arrayResult = value.toArray(); + ret = new Array(arrayResult.length); + for (var i = 0; i < arrayResult.length; i++) { + ret[i] = fromSafeArray(arrayResult[i]); + } + } + return ret; + } + try { + if (args.onCalling) { + args.onCalling(); + } + OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { + var result; + var status; + if (typeof hostResponseArgs === "number") { + result = []; + status = hostResponseArgs; + } + else { + result = hostResponseArgs.toArray(); + status = result[OSF.DDA.SafeArray.Response.Status]; + } + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) { + var payload = result[OSF.DDA.SafeArray.Response.Payload]; + payload = fromSafeArray(payload); + if (payload != null) { + if (!args._chunkResultData) { + args._chunkResultData = new Array(); + } + args._chunkResultData[payload[0]] = payload[1]; + } + return false; + } + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (result.length > 2) { + payload = []; + for (var i = 1; i < result.length; i++) + payload[i - 1] = result[i]; + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + if (args._chunkResultData) { + payload = fromSafeArray(payload); + if (payload != null) { + var expectedChunkCount = payload[payload.length - 1]; + if (args._chunkResultData.length == expectedChunkCount) { + payload[payload.length - 1] = args._chunkResultData; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + } + } + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + args.onComplete(status, payload); + } + return true; + }); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent = function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) { + var startTime = (new Date()).getTime(); + return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) { + if (args.onReceiving) { + args.onReceiving(); + } + var status = hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + }; +}; +OSF.DDA.SafeArray.Delegate.registerEventAsync = function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + try { + OSF.ClientHostController.registerEvent(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.unregisterEventAsync = function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.unregisterEvent(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.ClientMode = { + ReadWrite: 0, + ReadOnly: 1 +}; +OSF.DDA.RichInitializationReason = { + 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, + 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened +}; +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._initializeSettings = this.initializeSettings; +}; +OSF.InitializationHelper.prototype.deserializeSettings = function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) { + var settings; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if (storageSettings) { + serializedSettings = JSON.parse(storageSettings); + } + else { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if (refreshSupported) { + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + } + else { + settings = new OSF.DDA.Settings(deserializedSettings); + } + return settings; +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication() { +}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)); +}; +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { + var license = new OSF.DDA.License(appContext.get_eToken()); + var getOfficeThemeHandler = (OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme) ? OSF.DDA.OfficeTheme.getOfficeTheme : null; + if (appContext.get_isDialog()) { + if (OSF.DDA.UI.ChildUI) { + appContext.ui = new OSF.DDA.UI.ChildUI(); + } + } + else { + if (OSF.DDA.UI.ParentUI) { + appContext.ui = new OSF.DDA.UI.ParentUI(); + if (OfficeExt.Container) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.CloseContainerAsync]); + } + } + } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } + if (OSF.DDA.ExecuteFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.ExecuteFeature]); + } + if (OSF.DDA.QueryFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.QueryFeature]); + } + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + var asyncMethods = []; + var getAccessTokenMethod = OSF.DDA.AsyncMethodNames.GetAccessTokenAsync; + if (getAccessTokenMethod) { + asyncMethods.push(getAccessTokenMethod); + } + var authContextMethod = OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync; + if (authContextMethod) { + asyncMethods.push(authContextMethod); + } + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, asyncMethods); + } + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); + var getDelegateMethods, parameterMap; + getDelegateMethods = OSF.DDA.DispIdHost.getClientDelegateMethods; + parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods, parameterMap)); +}; +OSF.InitializationHelper.prototype.getInitializationReason = function (appContext) { return OSF.DDA.RichInitializationReason[appContext.get_reason()]; }; +OSF.DDA.DispIdHost.getClientDelegateMethods = function (actionId) { + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.SafeArray.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.SafeArray.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.SafeArray.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.SafeArray.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.SafeArray.Delegate.closeDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.SafeArray.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.SafeArray.Delegate.sendMessage; + if (OSF.DDA.AsyncMethodNames.RefreshAsync && actionId == OSF.DDA.AsyncMethodNames.RefreshAsync.id) { + var readSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + if (typeof (OSF.DDA.ClientSettingsManager.refresh) === "function") { + return OSF.DDA.ClientSettingsManager.refresh(onCalling, onReceiving); + } + else { + return OSF.DDA.ClientSettingsManager.read(onCalling, onReceiving); + } + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings); + } + if (OSF.DDA.AsyncMethodNames.SaveAsync && actionId == OSF.DDA.AsyncMethodNames.SaveAsync.id) { + var writeSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings], hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale], onCalling, onReceiving); + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings); + } + return delegateMethods; +}; +(function (OfficeExt) { + var RichClientHostController = (function () { + function RichClientHostController() { + } + RichClientHostController.prototype.execute = function (id, params, callback) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.Execute(id, params, callback, OsfOMToken); + } + else { + window.external.Execute(id, params, callback); + } + }; + RichClientHostController.prototype.registerEvent = function (id, targetId, handler, callback) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.RegisterEvent(id, targetId, handler, callback, OsfOMToken); + } + else { + window.external.RegisterEvent(id, targetId, handler, callback); + } + }; + RichClientHostController.prototype.unregisterEvent = function (id, targetId, callback) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.UnregisterEvent(id, targetId, callback, OsfOMToken); + } + else { + window.external.UnregisterEvent(id, targetId, callback); + } + }; + RichClientHostController.prototype.closeSdxDialog = function (context) { + if (OSF.OUtil.externalNativeFunctionExists(typeof window.external.closeSdxDialog)) { + window.external.closeSdxDialog(context); + } + }; + RichClientHostController.prototype.resizeSdxDialog = function (width, height) { + if (OSF.OUtil.externalNativeFunctionExists(typeof window.external.resizeSdxDialog)) { + window.external.resizeSdxDialog(width, height); + } + }; + return RichClientHostController; + }()); + OfficeExt.RichClientHostController = RichClientHostController; +})(OfficeExt || (OfficeExt = {})); +(function (OfficeExt) { + var Win32RichClientHostController = (function (_super) { + __extends(Win32RichClientHostController, _super); + function Win32RichClientHostController() { + return _super !== null && _super.apply(this, arguments) || this; + } + Win32RichClientHostController.prototype.messageParent = function (params) { + if (OSF.OUtil.externalNativeFunctionExists(typeof window.external.MessageParent2)) { + if (params) { + var messageToParent = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + if (typeof messageToParent === "boolean") { + if (messageToParent === true) { + params[Microsoft.Office.WebExtension.Parameters.MessageToParent] = "true"; + } + else if (messageToParent === false) { + params[Microsoft.Office.WebExtension.Parameters.MessageToParent] = ""; + } + } + } + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.MessageParent2(JSON.stringify(params), OsfOMToken); + } + else { + window.external.MessageParent2(JSON.stringify(params)); + } + } + else { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + window.external.MessageParent(message); + } + }; + Win32RichClientHostController.prototype.openDialog = function (id, targetId, handler, callback) { + this.registerEvent(id, targetId, handler, callback); + }; + Win32RichClientHostController.prototype.closeDialog = function (id, targetId, callback) { + this.unregisterEvent(id, targetId, callback); + }; + Win32RichClientHostController.prototype.sendMessage = function (params) { + if (OSF.OUtil.externalNativeFunctionExists(typeof window.external.MessageChild2)) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.MessageChild2(JSON.stringify(params), OsfOMToken); + } + else { + window.external.MessageChild2(JSON.stringify(params)); + } + } + else { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageContent]; + window.external.MessageChild(message); + } + }; + return Win32RichClientHostController; + }(OfficeExt.RichClientHostController)); + OfficeExt.Win32RichClientHostController = Win32RichClientHostController; +})(OfficeExt || (OfficeExt = {})); +(function (OfficeExt) { + var OfficeTheme; + (function (OfficeTheme) { + var OfficeThemeManager = (function () { + function OfficeThemeManager() { + this._osfOfficeTheme = null; + this._osfOfficeThemeTimeStamp = null; + } + OfficeThemeManager.prototype.getOfficeTheme = function () { + if (OSF.DDA._OsfControlContext) { + if (this._osfOfficeTheme && this._osfOfficeThemeTimeStamp && ((new Date()).getTime() - this._osfOfficeThemeTimeStamp < OfficeThemeManager._osfOfficeThemeCacheValidPeriod)) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo", 0); + } + } + else { + var startTime = (new Date()).getTime(); + var osfOfficeTheme = OSF.DDA._OsfControlContext.GetOfficeThemeInfo(); + var endTime = (new Date()).getTime(); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo", Math.abs(endTime - startTime)); + } + this._osfOfficeTheme = JSON.parse(osfOfficeTheme); + this._osfOfficeTheme = OSF.DDA.Theming.ConvertToOfficeTheme(this._osfOfficeTheme); + this._osfOfficeThemeTimeStamp = endTime; + } + return this._osfOfficeTheme; + } + }; + OfficeThemeManager.instance = function () { + if (OfficeThemeManager._instance == null) { + OfficeThemeManager._instance = new OfficeThemeManager(); + } + return OfficeThemeManager._instance; + }; + OfficeThemeManager._osfOfficeThemeCacheValidPeriod = 5000; + OfficeThemeManager._instance = null; + return OfficeThemeManager; + }()); + OfficeTheme.OfficeThemeManager = OfficeThemeManager; + OSF.OUtil.setNamespace("OfficeTheme", OSF.DDA); + OSF.DDA.OfficeTheme.getOfficeTheme = OfficeExt.OfficeTheme.OfficeThemeManager.instance().getOfficeTheme; + })(OfficeTheme = OfficeExt.OfficeTheme || (OfficeExt.OfficeTheme = {})); +})(OfficeExt || (OfficeExt = {})); +OSF.initializeRichCommon = function OSF_initializeRichCommon() { + OSF.DDA.ClientSettingsManager = { + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) { + return function (args) { + var onComplete = function onComplete(status, response) { + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + args.onComplete(status, response); + } + }; + var response; + try { + response = hostDelegateMethod(args.hostCallArgs, args.onCalling, onComplete); + } + catch (ex) { + var status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response = { name: Strings.OfficeOM.L_InternalError, message: ex }; + if (args.onComplete) { + args.onComplete(status, response); + } + } + }; + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + OSF.DDA._OsfControlContext.GetSettings(OsfOMToken).Read(keys, values); + } + else { + OSF.DDA._OsfControlContext.GetSettings().Read(keys, values); + } + var serializedSettings = {}; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, serializedSettings); + } + return serializedSettings; + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) { + var keys = []; + var values = []; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + if (onCalling) { + onCalling(); + } + var settingObj; + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + settingObj = OSF.DDA._OsfControlContext.GetSettings(OsfOMToken); + } + else { + settingObj = OSF.DDA._OsfControlContext.GetSettings(); + } + if (typeof settingObj.WriteAsync != 'undefined') { + settingObj.WriteAsync(keys, values, onComplete); + } + else { + settingObj.Write(keys, values); + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + }, + refresh: function OSF_DDA_ClientSettingsManager$refresh(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + var osfSettingsObj; + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + osfSettingsObj = OSF.DDA._OsfControlContext.GetSettings(OsfOMToken); + } + else { + osfSettingsObj = OSF.DDA._OsfControlContext.GetSettings(); + } + var readSettingsAndReturn = function () { + osfSettingsObj.Read(keys, values); + var serializedSettings = {}; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, serializedSettings); + } + }; + if (osfSettingsObj.RefreshAsync) { + osfSettingsObj.RefreshAsync(function () { + readSettingsAndReturn(); + }); + } + else { + readSettingsAndReturn(); + } + } + }; + OSF.InitializationHelper.prototype.initializeSettings = function OSF_InitializationHelper$initializeSettings(refreshSupported) { + var serializedSettings = OSF.DDA.ClientSettingsManager.read(); + var settings = this.deserializeSettings(serializedSettings, refreshSupported); + return settings; + }; + OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + var returnedContext; + var context; + var warningText = "Warning: Office.js is loaded outside of Office client"; + try { + if (window.external && OSF.OUtil.externalNativeFunctionExists(typeof window.external.GetContext)) { + context = OSF.DDA._OsfControlContext = window.external.GetContext(); + } + else { + OsfMsAjaxFactory.msAjaxDebug.trace(warningText); + return; + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace(warningText); + return; + } + var appType = context.GetAppType(); + var id = context.GetSolutionRef(); + var version = context.GetAppVersionMajor(); + var minorVersion = context.GetAppVersionMinor(); + var UILocale = context.GetAppUILocale(); + var dataLocale = context.GetAppDataLocale(); + var docUrl = context.GetDocUrl(); + var clientMode = context.GetAppCapabilities(); + var reason = context.GetActivationMode(); + var osfControlType = context.GetControlIntegrationLevel(); + var settings = []; + var eToken; + try { + eToken = context.GetSolutionToken(); + } + catch (ex) { + } + var correlationId; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetCorrelationId)) { + correlationId = context.GetCorrelationId(); + } + var appInstanceId; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetInstanceId)) { + appInstanceId = context.GetInstanceId(); + } + var touchEnabled; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetTouchEnabled)) { + touchEnabled = context.GetTouchEnabled(); + } + var commerceAllowed; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetCommerceAllowed)) { + commerceAllowed = context.GetCommerceAllowed(); + } + var requirementMatrix; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetSupportedMatrix)) { + requirementMatrix = context.GetSupportedMatrix(); + } + var hostCustomMessage; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetHostCustomMessage)) { + hostCustomMessage = context.GetHostCustomMessage(); + } + var hostFullVersion; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetHostFullVersion)) { + hostFullVersion = context.GetHostFullVersion(); + } + var dialogRequirementMatrix; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetDialogRequirementMatrix)) { + dialogRequirementMatrix = context.GetDialogRequirementMatrix(); + } + var sdxFeatureGates; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetFeaturesForSolution)) { + try { + var sdxFeatureGatesJson = context.GetFeaturesForSolution(); + if (sdxFeatureGatesJson) { + sdxFeatureGates = JSON.parse(sdxFeatureGatesJson); + } + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("Exception while creating the SDX FeatureGates object. Details: " + ex); + } + } + var initialDisplayMode = 0; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetInitialDisplayMode)) { + initialDisplayMode = context.GetInitialDisplayMode(); + } + eToken = eToken ? eToken.toString() : ""; + returnedContext = new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, undefined, undefined, undefined, undefined, dialogRequirementMatrix, sdxFeatureGates, undefined, initialDisplayMode); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + }; +}; +OSF.OUtil.setNamespace("ExtensionLifeCycle", OSF); +OSF.ExtensionLifeCycle.close = function OSF_ExtensionLifeCycle$close(context) { + OSF.ClientHostController.closeSdxDialog(context); +}; +OSF.ExtensionLifeCycle.resize = function OSF_ExtensionLifeCycle$resize(width, height) { + OSF.ClientHostController.resizeSdxDialog(width, height); +}; +OSF.ClientHostController = new OfficeExt.Win32RichClientHostController(); +OSF.initializeRichCommon(); +var OSFLog; +(function (OSFLog) { + var BaseUsageData = (function () { + function BaseUsageData(table) { + this._table = table; + this._fields = {}; + } + Object.defineProperty(BaseUsageData.prototype, "Fields", { + get: function () { + return this._fields; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype, "Table", { + get: function () { + return this._table; + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function () { + }; + BaseUsageData.prototype.SetSerializedField = function (key, value) { + if (typeof (value) !== "undefined" && value !== null) { + this._serializedFields[key] = value.toString(); + } + }; + BaseUsageData.prototype.SerializeRow = function () { + this._serializedFields = {}; + this.SetSerializedField("Table", this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields); + }; + return BaseUsageData; + }()); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = (function (_super) { + __extends(AppActivatedUsageData, _super); + function AppActivatedUsageData() { + return _super.call(this, "AppActivated") || this; + } + Object.defineProperty(AppActivatedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppId", { + get: function () { return this.Fields["AppId"]; }, + set: function (value) { this.Fields["AppId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppInstanceId", { + get: function () { return this.Fields["AppInstanceId"]; }, + set: function (value) { this.Fields["AppInstanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppURL", { + get: function () { return this.Fields["AppURL"]; }, + set: function (value) { this.Fields["AppURL"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AssetId", { + get: function () { return this.Fields["AssetId"]; }, + set: function (value) { this.Fields["AssetId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Browser", { + get: function () { return this.Fields["Browser"]; }, + set: function (value) { this.Fields["Browser"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "UserId", { + get: function () { return this.Fields["UserId"]; }, + set: function (value) { this.Fields["UserId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Host", { + get: function () { return this.Fields["Host"]; }, + set: function (value) { this.Fields["Host"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostVersion", { + get: function () { return this.Fields["HostVersion"]; }, + set: function (value) { this.Fields["HostVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "ClientId", { + get: function () { return this.Fields["ClientId"]; }, + set: function (value) { this.Fields["ClientId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeWidth", { + get: function () { return this.Fields["AppSizeWidth"]; }, + set: function (value) { this.Fields["AppSizeWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeHeight", { + get: function () { return this.Fields["AppSizeHeight"]; }, + set: function (value) { this.Fields["AppSizeHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "DocUrl", { + get: function () { return this.Fields["DocUrl"]; }, + set: function (value) { this.Fields["DocUrl"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "OfficeJSVersion", { + get: function () { return this.Fields["OfficeJSVersion"]; }, + set: function (value) { this.Fields["OfficeJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostJSVersion", { + get: function () { return this.Fields["HostJSVersion"]; }, + set: function (value) { this.Fields["HostJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "WacHostEnvironment", { + get: function () { return this.Fields["WacHostEnvironment"]; }, + set: function (value) { this.Fields["WacHostEnvironment"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsFromWacAutomation", { + get: function () { return this.Fields["IsFromWacAutomation"]; }, + set: function (value) { this.Fields["IsFromWacAutomation"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsMOS", { + get: function () { return this.Fields["IsMOS"]; }, + set: function (value) { this.Fields["IsMOS"] = value; }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("AppId", this.AppId); + this.SetSerializedField("AppInstanceId", this.AppInstanceId); + this.SetSerializedField("AppURL", this.AppURL); + this.SetSerializedField("AssetId", this.AssetId); + this.SetSerializedField("Browser", this.Browser); + this.SetSerializedField("UserId", this.UserId); + this.SetSerializedField("Host", this.Host); + this.SetSerializedField("HostVersion", this.HostVersion); + this.SetSerializedField("ClientId", this.ClientId); + this.SetSerializedField("AppSizeWidth", this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight", this.AppSizeHeight); + this.SetSerializedField("Message", this.Message); + this.SetSerializedField("DocUrl", this.DocUrl); + this.SetSerializedField("OfficeJSVersion", this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion", this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment", this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation", this.IsFromWacAutomation); + this.SetSerializedField("IsMOS", this.IsMOS); + }; + return AppActivatedUsageData; + }(BaseUsageData)); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = (function (_super) { + __extends(ScriptLoadUsageData, _super); + function ScriptLoadUsageData() { + return _super.call(this, "ScriptLoad") || this; + } + Object.defineProperty(ScriptLoadUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ScriptId", { + get: function () { return this.Fields["ScriptId"]; }, + set: function (value) { this.Fields["ScriptId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "StartTime", { + get: function () { return this.Fields["StartTime"]; }, + set: function (value) { this.Fields["StartTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("ScriptId", this.ScriptId); + this.SetSerializedField("StartTime", this.StartTime); + this.SetSerializedField("ResponseTime", this.ResponseTime); + }; + return ScriptLoadUsageData; + }(BaseUsageData)); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = (function (_super) { + __extends(AppClosedUsageData, _super); + function AppClosedUsageData() { + return _super.call(this, "AppClosed") || this; + } + Object.defineProperty(AppClosedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "FocusTime", { + get: function () { return this.Fields["FocusTime"]; }, + set: function (value) { this.Fields["FocusTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalWidth", { + get: function () { return this.Fields["AppSizeFinalWidth"]; }, + set: function (value) { this.Fields["AppSizeFinalWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalHeight", { + get: function () { return this.Fields["AppSizeFinalHeight"]; }, + set: function (value) { this.Fields["AppSizeFinalHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "OpenTime", { + get: function () { return this.Fields["OpenTime"]; }, + set: function (value) { this.Fields["OpenTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "CloseMethod", { + get: function () { return this.Fields["CloseMethod"]; }, + set: function (value) { this.Fields["CloseMethod"] = value; }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("FocusTime", this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth", this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight", this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime", this.OpenTime); + this.SetSerializedField("CloseMethod", this.CloseMethod); + }; + return AppClosedUsageData; + }(BaseUsageData)); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = (function (_super) { + __extends(APIUsageUsageData, _super); + function APIUsageUsageData() { + return _super.call(this, "APIUsage") || this; + } + Object.defineProperty(APIUsageUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIType", { + get: function () { return this.Fields["APIType"]; }, + set: function (value) { this.Fields["APIType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIID", { + get: function () { return this.Fields["APIID"]; }, + set: function (value) { this.Fields["APIID"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "Parameters", { + get: function () { return this.Fields["Parameters"]; }, + set: function (value) { this.Fields["Parameters"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ErrorType", { + get: function () { return this.Fields["ErrorType"]; }, + set: function (value) { this.Fields["ErrorType"] = value; }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("APIType", this.APIType); + this.SetSerializedField("APIID", this.APIID); + this.SetSerializedField("Parameters", this.Parameters); + this.SetSerializedField("ResponseTime", this.ResponseTime); + this.SetSerializedField("ErrorType", this.ErrorType); + }; + return APIUsageUsageData; + }(BaseUsageData)); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = (function (_super) { + __extends(AppInitializationUsageData, _super); + function AppInitializationUsageData() { + return _super.call(this, "AppInitialization") || this; + } + Object.defineProperty(AppInitializationUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SuccessCode", { + get: function () { return this.Fields["SuccessCode"]; }, + set: function (value) { this.Fields["SuccessCode"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("SuccessCode", this.SuccessCode); + this.SetSerializedField("Message", this.Message); + }; + return AppInitializationUsageData; + }(BaseUsageData)); + OSFLog.AppInitializationUsageData = AppInitializationUsageData; + var CheckWACHostUsageData = (function (_super) { + __extends(CheckWACHostUsageData, _super); + function CheckWACHostUsageData() { + return _super.call(this, "CheckWACHost") || this; + } + Object.defineProperty(CheckWACHostUsageData.prototype, "isWacKnownHost", { + get: function () { return this.Fields["isWacKnownHost"]; }, + set: function (value) { this.Fields["isWacKnownHost"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "instanceId", { + get: function () { return this.Fields["instanceId"]; }, + set: function (value) { this.Fields["instanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostType", { + get: function () { return this.Fields["hostType"]; }, + set: function (value) { this.Fields["hostType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostPlatform", { + get: function () { return this.Fields["hostPlatform"]; }, + set: function (value) { this.Fields["hostPlatform"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "wacDomain", { + get: function () { return this.Fields["wacDomain"]; }, + set: function (value) { this.Fields["wacDomain"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "isLocalStorageAvailable", { + get: function () { return this.Fields["isLocalStorageAvailable"]; }, + set: function (value) { this.Fields["isLocalStorageAvailable"] = value; }, + enumerable: true, + configurable: true + }); + CheckWACHostUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("isWacKnownHost", this.isWacKnownHost); + this.SetSerializedField("instanceId", this.instanceId); + this.SetSerializedField("hostType", this.hostType); + this.SetSerializedField("hostPlatform", this.hostPlatform); + this.SetSerializedField("wacDomain", this.wacDomain); + this.SetSerializedField("isLocalStorageAvailable", this.isLocalStorageAvailable); + }; + return CheckWACHostUsageData; + }(BaseUsageData)); + OSFLog.CheckWACHostUsageData = CheckWACHostUsageData; +})(OSFLog || (OSFLog = {})); +var Logger; +(function (Logger) { + "use strict"; + var TraceLevel; + (function (TraceLevel) { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error"; + })(TraceLevel = Logger.TraceLevel || (Logger.TraceLevel = {})); + var SendFlag; + (function (SendFlag) { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush"; + })(SendFlag = Logger.SendFlag || (Logger.SendFlag = {})); + function allowUploadingData() { + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) { + } + Logger.sendLog = sendLog; + function creatULSEndpoint() { + try { + return new ULSEndpointProxy(); + } + catch (e) { + return null; + } + } + var ULSEndpointProxy = (function () { + function ULSEndpointProxy() { + } + ULSEndpointProxy.prototype.writeLog = function (log) { + }; + ULSEndpointProxy.prototype.loadProxyFrame = function () { + }; + return ULSEndpointProxy; + }()); + if (!OSF.Logger) { + OSF.Logger = Logger; + } + Logger.ulsEndpoint = creatULSEndpoint(); +})(Logger || (Logger = {})); +var OSFAriaLogger; +(function (OSFAriaLogger) { + var TelemetryEventAppActivated = { name: "AppActivated", enabled: true, critical: true, points: [ + { name: "Browser", type: "string" }, + { name: "Message", type: "string" }, + { name: "Host", type: "string" }, + { name: "AppSizeWidth", type: "int64" }, + { name: "AppSizeHeight", type: "int64" }, + { name: "IsFromWacAutomation", type: "string" }, + { name: "IsMOS", type: "int64" }, + ] }; + var TelemetryEventScriptLoad = { name: "ScriptLoad", enabled: true, critical: false, points: [ + { name: "ScriptId", type: "string" }, + { name: "StartTime", type: "double" }, + { name: "ResponseTime", type: "double" }, + ] }; + var enableAPIUsage = shouldAPIUsageBeEnabled(); + var TelemetryEventApiUsage = { name: "APIUsage", enabled: enableAPIUsage, critical: false, points: [ + { name: "APIType", type: "string" }, + { name: "APIID", type: "int64" }, + { name: "Parameters", type: "string" }, + { name: "ResponseTime", type: "int64" }, + { name: "ErrorType", type: "int64" }, + ] }; + var TelemetryEventAppInitialization = { name: "AppInitialization", enabled: true, critical: false, points: [ + { name: "SuccessCode", type: "int64" }, + { name: "Message", type: "string" }, + ] }; + var TelemetryEventAppClosed = { name: "AppClosed", enabled: true, critical: false, points: [ + { name: "FocusTime", type: "int64" }, + { name: "AppSizeFinalWidth", type: "int64" }, + { name: "AppSizeFinalHeight", type: "int64" }, + { name: "OpenTime", type: "int64" }, + ] }; + var TelemetryEventCheckWACHost = { name: "CheckWACHost", enabled: true, critical: false, points: [ + { name: "isWacKnownHost", type: "int64" }, + { name: "solutionId", type: "string" }, + { name: "hostType", type: "string" }, + { name: "hostPlatform", type: "string" }, + { name: "correlationId", type: "string" }, + { name: "isLocalStorageAvailable", type: "boolean" }, + ] }; + var TelemetryEvents = [ + TelemetryEventAppActivated, + TelemetryEventScriptLoad, + TelemetryEventApiUsage, + TelemetryEventAppInitialization, + TelemetryEventAppClosed, + TelemetryEventCheckWACHost, + ]; + function createDataField(value, point) { + var key = point.rename === undefined ? point.name : point.rename; + var type = point.type; + var field = undefined; + switch (type) { + case "string": + field = oteljs.makeStringDataField(key, value); + break; + case "double": + if (typeof value === "string") { + value = parseFloat(value); + } + field = oteljs.makeDoubleDataField(key, value); + break; + case "int64": + if (typeof value === "string") { + value = parseInt(value); + } + field = oteljs.makeInt64DataField(key, value); + break; + case "boolean": + if (typeof value === "string") { + value = value === "true"; + } + field = oteljs.makeBooleanDataField(key, value); + break; + } + return field; + } + function getEventDefinition(eventName) { + for (var _i = 0, TelemetryEvents_1 = TelemetryEvents; _i < TelemetryEvents_1.length; _i++) { + var event_1 = TelemetryEvents_1[_i]; + if (event_1.name === eventName) { + return event_1; + } + } + return undefined; + } + function eventEnabled(eventName) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return false; + } + return eventDefinition.enabled; + } + function shouldAPIUsageBeEnabled() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function generateTelemetryEvent(eventName, telemetryData) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return undefined; + } + var dataFields = []; + for (var _i = 0, _a = eventDefinition.points; _i < _a.length; _i++) { + var point = _a[_i]; + var key = point.name; + var value = telemetryData[key]; + if (value === undefined) { + continue; + } + var field = createDataField(value, point); + if (field !== undefined) { + dataFields.push(field); + } + } + var flags = { dataCategories: oteljs.DataCategories.ProductServiceUsage }; + if (eventDefinition.critical) { + flags.samplingPolicy = oteljs.SamplingPolicy.CriticalBusinessImpact; + } + flags.diagnosticLevel = oteljs.DiagnosticLevel.NecessaryServiceDataEvent; + var eventNameFull = "Office.Extensibility.OfficeJs." + eventName + "X"; + var event = { eventName: eventNameFull, dataFields: dataFields, eventFlags: flags }; + return event; + } + function sendOtelTelemetryEvent(eventName, telemetryData) { + if (eventEnabled(eventName)) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var event = generateTelemetryEvent(eventName, telemetryData); + if (event === undefined) { + return; + } + Microsoft.Office.WebExtension.sendTelemetryEvent(event); + }); + } + } + } + var AriaLogger = (function () { + function AriaLogger() { + } + AriaLogger.prototype.getAriaCDNLocation = function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "ariatelemetry/aria-web-telemetry.js"); + }; + AriaLogger.getInstance = function () { + if (AriaLogger.AriaLoggerObj === undefined) { + AriaLogger.AriaLoggerObj = new AriaLogger(); + } + return AriaLogger.AriaLoggerObj; + }; + AriaLogger.prototype.isIUsageData = function (arg) { + return arg["Fields"] !== undefined; + }; + AriaLogger.prototype.shouldSendDirectToAria = function (flavor, version) { + var BASE10 = 10; + var MAX_VERSION_WIN32 = [16, 0, 11601]; + var MAX_VERSION_MAC = [16, 28]; + var max_version; + if (!flavor) { + return false; + } + else if (flavor.toLowerCase() === "win32") { + max_version = MAX_VERSION_WIN32; + } + else if (flavor.toLowerCase() === "mac") { + max_version = MAX_VERSION_MAC; + } + else { + return true; + } + if (!version) { + return false; + } + var versionTokens = version.split('.'); + for (var i = 0; i < max_version.length && i < versionTokens.length; i++) { + var versionToken = parseInt(versionTokens[i], BASE10); + if (isNaN(versionToken)) { + return false; + } + if (versionToken < max_version[i]) { + return true; + } + if (versionToken > max_version[i]) { + return false; + } + } + return false; + }; + AriaLogger.prototype.isDirectToAriaEnabled = function () { + if (this.EnableDirectToAria === undefined || this.EnableDirectToAria === null) { + var flavor = void 0; + var version = void 0; + if (OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo) { + flavor = OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]; + } + if (window.external && typeof window.external.GetContext !== "undefined" && typeof window.external.GetContext().GetHostFullVersion !== "undefined") { + version = window.external.GetContext().GetHostFullVersion(); + } + this.EnableDirectToAria = this.shouldSendDirectToAria(flavor, version); + } + return this.EnableDirectToAria; + }; + AriaLogger.prototype.sendTelemetry = function (tableName, telemetryData) { + var startAfterMs = 1000; + var sendAriaEnabled = AriaLogger.EnableSendingTelemetryWithLegacyAria && this.isDirectToAriaEnabled(); + if (sendAriaEnabled) { + OSF.OUtil.loadScript(this.getAriaCDNLocation(), function () { + try { + if (!this.ALogger) { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); + } + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for (var key in telemetryData) { + if (key.toLowerCase() !== "table") { + eventProperties.setProperty(key, telemetryData[key]); + } + } + var today = new Date(); + eventProperties.setProperty("Date", today.toISOString()); + this.ALogger.logEvent(eventProperties); + } + catch (e) { + } + }, startAfterMs); + } + if (AriaLogger.EnableSendingTelemetryWithOTel) { + sendOtelTelemetryEvent(tableName, telemetryData); + } + }; + AriaLogger.prototype.logData = function (data) { + if (this.isIUsageData(data)) { + this.sendTelemetry(data["Table"], data["Fields"]); + } + else { + this.sendTelemetry(data["Table"], data); + } + }; + AriaLogger.EnableSendingTelemetryWithOTel = true; + AriaLogger.EnableSendingTelemetryWithLegacyAria = false; + return AriaLogger; + }()); + OSFAriaLogger.AriaLogger = AriaLogger; +})(OSFAriaLogger || (OSFAriaLogger = {})); +var OSFAppTelemetry; +(function (OSFAppTelemetry) { + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + var privateAddinId = "PRIVATE"; + OSFAppTelemetry.enableTelemetry = true; + ; + var AppInfo = (function () { + function AppInfo() { + } + return AppInfo; + }()); + OSFAppTelemetry.AppInfo = AppInfo; + var Event = (function () { + function Event(name, handler) { + this.name = name; + this.handler = handler; + } + return Event; + }()); + var AppStorage = (function () { + function AppStorage() { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set"; + } + AppStorage.prototype.getClientId = function () { + var clientId = this.getValue(this.clientIDKey); + if (!clientId || clientId.length <= 0 || clientId.length > 40) { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey, clientId); + } + return clientId; + }; + AppStorage.prototype.saveLog = function (logId, log) { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = ((logIdSet && logIdSet.length > 0) ? (logIdSet + ";") : "") + logId; + this.setValue(this.logIdSetKey, logIdSet); + this.setValue(logId, log); + }; + AppStorage.prototype.enumerateLog = function (callback, clean) { + var logIdSet = this.getValue(this.logIdSetKey); + if (logIdSet) { + var ids = logIdSet.split(";"); + for (var id in ids) { + var logId = ids[id]; + var log = this.getValue(logId); + if (log) { + if (callback) { + callback(logId, log); + } + if (clean) { + this.remove(logId); + } + } + } + if (clean) { + this.remove(this.logIdSetKey); + } + } + }; + AppStorage.prototype.getValue = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if (osfLocalStorage) { + value = osfLocalStorage.getItem(key); + } + return value; + }; + AppStorage.prototype.setValue = function (key, value) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + osfLocalStorage.setItem(key, value); + } + }; + AppStorage.prototype.remove = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + try { + osfLocalStorage.removeItem(key); + } + catch (ex) { + } + } + }; + return AppStorage; + }()); + var AppLogger = (function () { + function AppLogger() { + } + AppLogger.prototype.LogData = function (data) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } + }; + AppLogger.prototype.LogRawData = function (log) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); + } + catch (e) { + } + }; + return AppLogger; + }()); + function trimStringToLowerCase(input) { + if (input) { + input = input.replace(/[{}]/g, "").toLowerCase(); + } + return (input || ""); + } + function initialize(context) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + if (appInfo) { + return; + } + appInfo = new AppInfo(); + if (context.get_hostFullVersion()) { + appInfo.hostVersion = context.get_hostFullVersion(); + } + else { + appInfo.hostVersion = context.get_appVersion(); + } + appInfo.appId = canSendAddinId() ? context.get_id() : privateAddinId; + appInfo.marketplaceType = context._marketplaceType; + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage()).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if (appInfo.appInstanceId) { + appInfo.appInstanceId = trimStringToLowerCase(appInfo.appInstanceId); + appInfo.appInstanceId = getCompliantAppInstanceId(context.get_id(), appInfo.appInstanceId); + } + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "0.0.0.0"; + if (context._wacHostEnvironment) { + appInfo.wacHostEnvironment = context._wacHostEnvironment; + } + if (context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) { + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + } + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if (url) { + url = url.split("?")[0].split("#")[0]; + } + appInfo.isMos = isMos(); + appInfo.appURL = ""; + (function getUserIdAndAssetIdFromToken(token, appInfo) { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try { + xmlContent = decodeURIComponent(token); + parser = new DOMParser(); + xmlDoc = parser.parseFromString(xmlContent, "text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if (cidNode && cidNode.nodeValue) { + appInfo.userId = cidNode.nodeValue; + } + else if (oidNode && oidNode.nodeValue) { + appInfo.userId = oidNode.nodeValue; + } + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue; + } + catch (e) { + } + finally { + xmlContent = null; + xmlDoc = null; + parser = null; + } + })(context.get_eToken(), appInfo); + appInfo.sessionId = sessionId; + if (typeof OTel !== "undefined") { + OTel.OTelLogger.initialize(appInfo); + } + (function handleLifecycle() { + var startTime = new Date(); + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function () { + if (document.hasFocus()) { + if (lastFocus == null) { + lastFocus = new Date(); + } + } + else if (lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + }; + var eventList = []; + eventList.push(new Event("focus", adjustFocusTime)); + eventList.push(new Event("blur", adjustFocusTime)); + eventList.push(new Event("focusout", adjustFocusTime)); + eventList.push(new Event("focusin", adjustFocusTime)); + var exitFunction = function () { + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.removeEventListener(window, eventList[i].name, eventList[i].handler); + } + eventList.length = 0; + if (!finished) { + if (document.hasFocus() && lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date()).getTime() - startTime.getTime()), focusTime); + finished = true; + } + }; + eventList.push(new Event("beforeunload", exitFunction)); + eventList.push(new Event("unload", exitFunction)); + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.addEventListener(window, eventList[i].name, eventList[i].handler); + } + adjustFocusTime(); + })(); + OSFAppTelemetry.onAppActivated(); + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() { + if (!appInfo) { + return; + } + (new AppStorage()).enumerateLog(function (id, log) { return (new AppLogger()).LogRawData(log); }, true); + var data = new OSFLog.AppActivatedUsageData(); + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = ""; + data.UserId = ""; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if (appInfo.wacHostEnvironment) { + data.WacHostEnvironment = appInfo.wacHostEnvironment; + } + if (appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) { + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + } + data.IsMOS = appInfo.isMos ? 1 : 0; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) { + var data = new OSFLog.ScriptLoadUsageData(); + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) { + if (!appInfo) { + return; + } + if (!isAllowedHost() || !isAPIUsageEnabledDispId(id, apiType)) { + return; + } + var data = new OSFLog.APIUsageUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCallDone = onCallDone; + ; + function onMethodDone(id, args, msResponseTime, errorType) { + var parameters = null; + if (args) { + if (typeof args == "number") { + parameters = String(args); + } + else if (typeof args === "object") { + for (var index in args) { + if (parameters !== null) { + parameters += ","; + } + else { + parameters = ""; + } + if (typeof args[index] == "number") { + parameters += String(args[index]); + } + } + } + else { + parameters = ""; + } + } + OSF.AppTelemetry.onCallDone("method", id, parameters, msResponseTime, errorType); + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) { + OSF.AppTelemetry.onCallDone("property", -1, propertyName, msResponseTime); + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onCheckWACHost(isWacKnownHost, instanceId, hostType, hostPlatform, wacDomain, isLocalStorageAvailable) { + var data = new OSFLog.CheckWACHostUsageData(); + data.isWacKnownHost = isWacKnownHost; + data.instanceId = instanceId; + data.hostType = hostType; + data.hostPlatform = hostPlatform; + data.isLocalStorageAvailable = isLocalStorageAvailable; + data.wacDomain = ""; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCheckWACHost = onCheckWACHost; + function onEventDone(id, errorType) { + OSF.AppTelemetry.onCallDone("event", id, null, 0, errorType); + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent", id, null, msResponseTime, errorType); + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) { + if (!appInfo) { + return; + } + var data = new OSFLog.AppClosedUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage()).saveLog(sessionId, data.SerializeRow()); + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId); + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) { + var data = new OSFLog.AppInitializationUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) { + doAppInitializationLogging(false, message); + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) { + doAppInitializationLogging(true, errorMessage); + } + OSFAppTelemetry.logAppException = logAppException; + function isAllowedHost() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function isAPIUsageEnabledDispId(dispId, apiType) { + if (apiType === "method") { + switch (dispId) { + case 4: + case 38: + case 37: + case 10: + case 12: + case -10: + return true; + default: + return false; + } + } + return false; + } + function canSendAddinId() { + var isPublic = (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.PublicAddin) != 0; + if (isPublic) { + return isPublic; + } + if (!appInfo) { + return false; + } + var hostPlatform = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + var hostVersion = appInfo.hostVersion; + return _isComplianceExceptedHost(hostPlatform, hostVersion); + } + OSFAppTelemetry.canSendAddinId = canSendAddinId; + function getCompliantAppInstanceId(addinId, appInstanceId) { + if (!canSendAddinId() && appInstanceId === addinId) { + return privateAddinId; + } + return appInstanceId; + } + OSFAppTelemetry.getCompliantAppInstanceId = getCompliantAppInstanceId; + function _isComplianceExceptedHost(hostPlatform, hostVersion) { + var excepted = false; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(hostVersion); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (hostPlatform == "win32") { + if (major < 16 || major == 16 && build < 14225) { + excepted = true; + } + } + else if (hostPlatform == "mac") { + if (major < 16 || (major == 16 && (minor < 52 || minor == 52 && build < 808))) { + excepted = true; + } + } + } + return excepted; + } + OSFAppTelemetry._isComplianceExceptedHost = _isComplianceExceptedHost; + function isMos() { + return (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.IsMos) != 0; + } + OSFAppTelemetry.isMos = isMos; + OSF.AppTelemetry = OSFAppTelemetry; +})(OSFAppTelemetry || (OSFAppTelemetry = {})); +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + OSF.DDA.RichApi.richApiMessageManager = new OfficeExt.RichApiMessageManager(); + appReady(); +}; +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync, + requiredArguments: [ + { + name: Microsoft.Office.WebExtension.Parameters.Data, + types: ["object"] + } + ], + supportedOptions: [] +}); +OSF.OUtil.setNamespace("RichApi", OSF.DDA); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } + } +}; +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() { + var events = []; + for (var eventName in this._eventHandlers) + events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); + return events; + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) { + for (var eventName in this._eventHandlers) { + if (event == eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event == eventName) + return true; + } + return false; + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) + return true; + } + } + return false; + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._eventHandlers[eventType]; + if (handlers && !this.hasEventHandler(eventType, handler)) { + handlers.push(handler); + return true; + } + else { + return false; + } + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true; + } + return false; + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType, handler); + if (isFirstHandler && succeed) { + this.fireQueuedEvent(eventType); + } + return succeed; + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var index = 0; index < handlers.length; index++) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + return true; + } + } + } + return false; + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { + if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { + this._eventHandlers[eventType] = []; + return true; + } + return false; + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) { + this._objectEventHandlers[eventType][objectId] = []; + return true; + } + return false; + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } + return true; + } + else { + return false; + } + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if (_handlers != null) { + for (var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length == 0) { + queuedEvents.push(eventArgs); + } + else { + this.fireEvent(eventArgs); + } + return true; + } + else { + return false; + } + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length > 0) { + var eventHandler = eventHandlers[0]; + while (queuedEvents.length > 0) { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs); + } + return true; + } + } + return false; + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var queuedEvents = this._queuedEventsArgs[eventType]; + if (queuedEvents) { + this._queuedEventsArgs[eventType] = []; + } + } + } +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { + var args; + switch (eventType) { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties, target.document), eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties, target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" && OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + OSF.DDA.convertOlkAppointmentTimeToDateFormat(args); + } + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecurrenceChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecurrenceChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AttachmentsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAttachmentsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.InfobarClicked: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkInfobarClickedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSelectedItemsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSensitivityLabelChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + return args; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + "types": ["function", "object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { RichApiMessage: "richApiMessage" }); +OSF.DDA.RichApiMessageEventArgs = function OSF_DDA_RichApiMessageEventArgs(eventType, eventProperties) { + var entryArray = eventProperties[Microsoft.Office.WebExtension.Parameters.Data]; + var entries = []; + if (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var elem = entryArray[i]; + if (elem.toArray) { + elem = elem.toArray(); + } + entries.push({ + messageCategory: elem[0], + messageType: elem[1], + targetId: elem[2], + message: elem[3], + id: elem[4], + isRemoteOverride: elem[5] + }); + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: Microsoft.Office.WebExtension.EventType.RichApiMessage }, + "entries": { value: entries } + }); +}; +(function (OfficeExt) { + var RichApiMessageManager = (function () { + function RichApiMessageManager() { + this._eventDispatch = null; + this._registerHandlers = []; + this._eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.RichApiMessage, + ]); + OSF.DDA.DispIdHost.addEventSupport(this, this._eventDispatch); + } + RichApiMessageManager.prototype.register = function (handler) { + var _this = this; + if (!this._registerWithHostPromise) { + this._registerWithHostPromise = new Office.Promise(function (resolve, reject) { + _this.addHandlerAsync(Microsoft.Office.WebExtension.EventType.RichApiMessage, function (args) { + _this._registerHandlers.forEach(function (value) { + if (value) { + value(args); + } + }); + }, function (asyncResult) { + if (asyncResult.status == 'failed') { + reject(asyncResult.error); + } + else { + resolve(); + } + }); + }); + } + return this._registerWithHostPromise.then(function () { + _this._registerHandlers.push(handler); + }); + }; + return RichApiMessageManager; + }()); + OfficeExt.RichApiMessageManager = RichApiMessageManager; +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidRichApiMessageEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); + + + +!function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + i: moduleId, + l: !1, + exports: {} + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.l = !0, module.exports; + } + __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function(exports, name, getter) { + __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { + enumerable: !0, + get: getter + }); + }, __webpack_require__.r = function(exports) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(exports, "__esModule", { + value: !0 + }); + }, __webpack_require__.t = function(value, mode) { + if (1 & mode && (value = __webpack_require__(value)), 8 & mode) return value; + if (4 & mode && "object" == typeof value && value && value.__esModule) return value; + var ns = Object.create(null); + if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { + enumerable: !0, + value: value + }), 2 & mode && "string" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }, __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function() { + return module.default; + } : function() { + return module; + }; + return __webpack_require__.d(getter, "a", getter), getter; + }, __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 1); +}([ function(module, exports) { + module.exports = OfficeExtensionBatch; +}, function(module, exports, __webpack_require__) { + "use strict"; + var __assign = this && this.__assign || function() { + return (__assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) for (var p in s = arguments[i]) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]); + return t; + }).apply(this, arguments); + }; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var AsyncStorage, Storage, ApiInformationApi = __webpack_require__(2), DialogApi = __webpack_require__(4), StorageApi = __webpack_require__(5), AsyncStorageWeb = __webpack_require__(6), StorageWeb = __webpack_require__(7), Experimentation = __webpack_require__(8), officeruntime_message_1 = __webpack_require__(9), DynamicRibbon = __webpack_require__(12), officeruntime_auth_1 = __webpack_require__(13); + "undefined" != typeof OSF && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo && 0 != (1 & OSF._OfficeAppFactory.getHostInfo().flags) ? (AsyncStorage = AsyncStorageWeb, + Storage = StorageWeb.storage) : (AsyncStorage = StorageApi.AsyncStorage, Storage = StorageApi.storage), + window._OfficeRuntimeNative = __assign(__assign({}, window.OfficeRuntime), { + displayWebDialog: DialogApi.displayWebDialog, + AsyncStorage: AsyncStorage, + storage: Storage, + experimentation: Experimentation.experimentation, + apiInformation: ApiInformationApi.apiInformation, + message: officeruntime_message_1.Message.instance, + ui: DynamicRibbon.ui, + auth: officeruntime_auth_1.Auth.instance + }), Object.freeze(window._OfficeRuntimeNative); +}, function(module, exports, __webpack_require__) { + "use strict"; + (function(global) { + function getVersion(version) { + var temp = version.split("."), major = 0, minor = 0, patch = 0; + if (temp.length < 2 && isNaN(Number(version))) throw "version format incorrect"; + if (major = Number(temp[0]), temp.length >= 2 && (minor = Number(temp[1])), temp.length >= 3 && (patch = Number(temp[2])), + isNaN(major) || isNaN(minor) || isNaN(patch)) throw "version format incorrect"; + return { + major: major, + minor: minor, + patch: patch + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.apiInformation = void 0, exports.apiInformation = { + isSetSupported: function(capability, version) { + if ("string" != typeof capability) return !1; + if (null == version && (version = "0.0.0"), void 0 === global.__apiSets) return !1; + var sets = global.__apiSets, index = Object.keys(sets).map((function(key) { + return key.toLowerCase(); + })).indexOf(capability.toLowerCase()); + if (index > -1) { + var setMaxVersion = sets[Object.keys(sets)[index]]; + try { + var minVersionNum = getVersion(version), setMaxVersionNum = void 0; + if ((setMaxVersionNum = Array.isArray(setMaxVersion) ? function(versions, majorVersion) { + for (var i = 0; i < versions.length; i++) { + var v = getVersion(versions[i]); + if (v.major == majorVersion) return v; + } + return { + major: 0, + minor: 0, + patch: 0 + }; + }(setMaxVersion, minVersionNum.major) : getVersion(setMaxVersion)).major > 0) { + if (setMaxVersionNum.major > minVersionNum.major) return !0; + if (setMaxVersionNum.major == minVersionNum.major && setMaxVersionNum.minor > minVersionNum.minor) return !0; + if (setMaxVersionNum.major == minVersionNum.major && setMaxVersionNum.minor == minVersionNum.minor && setMaxVersionNum.patch >= minVersionNum.patch) return !0; + } + } catch (e) { + return !1; + } + } + return !1; + } + }; + }).call(this, __webpack_require__(3)); +}, function(module, exports) { + var g; + g = function() { + return this; + }(); + try { + g = g || new Function("return this")(); + } catch (e) { + "object" == typeof window && (g = window); + } + module.exports = g; +}, function(module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function(d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function(d, b) { + if ("function" != typeof b && null !== b) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }); + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.DialogErrorCodes = exports.DialogService = exports.displayWebDialog = exports.Dialog = void 0; + var OfficeExtension = __webpack_require__(0), _createTopLevelServiceObject = (OfficeExtension.BatchApiHelper.createPropertyObject, + OfficeExtension.BatchApiHelper.createMethodObject, OfficeExtension.BatchApiHelper.createIndexerObject, + OfficeExtension.BatchApiHelper.createRootServiceObject, OfficeExtension.BatchApiHelper.createTopLevelServiceObject), _invokeMethod = (OfficeExtension.BatchApiHelper.createChildItemObject, + OfficeExtension.BatchApiHelper.invokeMethod), _isNullOrUndefined = (OfficeExtension.BatchApiHelper.invokeEnsureUnchanged, + OfficeExtension.BatchApiHelper.invokeSetProperty, OfficeExtension.Utility.isNullOrUndefined), _toJson = (OfficeExtension.Utility.isUndefined, + OfficeExtension.Utility.throwIfNotLoaded, OfficeExtension.Utility.throwIfApiNotSupported, + OfficeExtension.Utility.load, OfficeExtension.Utility.retrieve, OfficeExtension.Utility.toJson), _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary, _processRetrieveResult = (OfficeExtension.Utility._handleNavigationPropertyResults, + OfficeExtension.Utility.adjustToDateTime, OfficeExtension.Utility.processRetrieveResult), Dialog = (OfficeExtension.Utility.setMockData, + OfficeExtension.CommonUtility.calculateApiFlags, function() { + function Dialog(_dialogService) { + this._dialogService = _dialogService; + } + return Dialog.prototype.close = function() { + return this._dialogService.close(), this._dialogService.context.sync(); + }, Dialog; + }()); + exports.Dialog = Dialog, exports.displayWebDialog = function(url, options) { + return void 0 === options && (options = {}), new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) throw new OfficeExtension.Error({ + code: "InvalidArgument", + message: 'Dimensions must be "number%" or number.' + }); + var ctx = new OfficeExtension.ClientRequestContext, dialogService = DialogService.newObject(ctx), dialog = new Dialog(dialogService), eventResult = dialogService.onDialogMessage.add((function(args) { + switch (OfficeExtension.Utility.log("dialogMessageHandler:" + JSON.stringify(args)), + args.type) { + case 17: + args.error ? reject(args.error) : resolve(dialog); + break; + + case 12: + options.onMessage && options.onMessage(args.message, dialog, args.origin); + break; + + case 10: + default: + 12006 === args.originalErrorCode ? (eventResult && (eventResult.remove(), ctx.sync()), + options.onClose && options.onClose()) : options.onRuntimeError && (options.onRuntimeError(args.error, dialog), + reject(args.error)); + } + return OfficeExtension.CoreUtility.Promise.resolve(); + })); + return ctx.sync().then((function() { + var dialogOptions = { + width: options.width ? parseInt(options.width) : 50, + height: options.height ? parseInt(options.height) : 50, + displayInIFrame: options.displayInIFrame + }; + return dialogService.displayDialog(url, dialogOptions), ctx.sync(); + })).catch((function(e) { + reject(e); + })); + })); + function isInt(value) { + return /^(\-|\+)?([0-9]+)%?$/.test(value); + } + }; + var DialogEventType, DialogService = function(_super) { + function DialogService() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(DialogService, _super), Object.defineProperty(DialogService.prototype, "_className", { + get: function() { + return "DialogService"; + }, + enumerable: !1, + configurable: !0 + }), DialogService.prototype.close = function() { + _invokeMethod(this, "Close", 1, [], 4, 0); + }, DialogService.prototype.displayDialog = function(url, options) { + _invokeMethod(this, "DisplayDialog", 1, [ url, options ], 4, 0); + }, DialogService.prototype._handleResult = function(value) { + (_super.prototype._handleResult.call(this, value), _isNullOrUndefined(value)) || _fixObjectPathIfNecessary(this, value); + }, DialogService.prototype._handleRetrieveResult = function(value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, DialogService.newObject = function(context) { + return _createTopLevelServiceObject(DialogService, context, "Microsoft.Dialog.DialogService", !1, 4); + }, Object.defineProperty(DialogService.prototype, "onDialogMessage", { + get: function() { + return this.m_dialogMessage || (this.m_dialogMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "DialogMessage", { + eventType: 65536, + registerFunc: function() {}, + unregisterFunc: function() {}, + getTargetIdFunc: function() { + return null; + }, + eventArgsTransformFunc: function(args) { + var transformedArgs, internalCode, _a, table; + try { + var parsedMessage = JSON.parse(args.message), error = parsedMessage.errorCode ? new OfficeExtension.Error((internalCode = parsedMessage.errorCode, + (_a = {})[12002] = { + code: "InvalidUrl", + message: "Cannot load URL, no such page or bad URL syntax." + }, _a[12003] = { + code: "InvalidUrl", + message: "HTTPS is required." + }, _a[12004] = { + code: "Untrusted", + message: "Domain is not trusted." + }, _a[12005] = { + code: "InvalidUrl", + message: "HTTPS is required." + }, _a[12007] = { + code: "FailedToOpen", + message: "Another dialog is already opened." + }, (table = _a)[internalCode] ? table[internalCode] : { + code: "Unknown", + message: "An unknown error has occured with code: " + internalCode + })) : null; + transformedArgs = { + originalErrorCode: parsedMessage.errorCode, + type: parsedMessage.type, + error: error, + message: parsedMessage.message, + origin: parsedMessage.origin + }; + } catch (e) { + transformedArgs = { + originalErrorCode: null, + type: 17, + error: new OfficeExtension.Error({ + code: "GenericException", + message: "Unknown error" + }), + message: e.message + }; + } + return OfficeExtension.Utility._createPromiseFromResult(transformedArgs); + } + })), this.m_dialogMessage; + }, + enumerable: !1, + configurable: !0 + }), DialogService.prototype.toJSON = function() { + return _toJson(this, {}, {}); + }, DialogService; + }(OfficeExtension.ClientObject); + exports.DialogService = DialogService, function(DialogEventType) { + DialogEventType[DialogEventType.dialogMessageReceived = 0] = "dialogMessageReceived", + DialogEventType[DialogEventType.dialogEventReceived = 1] = "dialogEventReceived"; + }(DialogEventType || (DialogEventType = {})), function(DialogErrorCodes) { + DialogErrorCodes.generalException = "GeneralException"; + }(exports.DialogErrorCodes || (exports.DialogErrorCodes = {})); +}, function(module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function(d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function(d, b) { + if ("function" != typeof b && null !== b) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }); + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ErrorCodes = exports.PersistentKvStorageService = exports.storage = exports.AsyncStorage = void 0; + var OfficeExtension = __webpack_require__(0), _createTopLevelServiceObject = (OfficeExtension.BatchApiHelper.createPropertyObject, + OfficeExtension.BatchApiHelper.createMethodObject, OfficeExtension.BatchApiHelper.createIndexerObject, + OfficeExtension.BatchApiHelper.createRootServiceObject, OfficeExtension.BatchApiHelper.createTopLevelServiceObject), _invokeMethod = (OfficeExtension.BatchApiHelper.createChildItemObject, + OfficeExtension.BatchApiHelper.invokeMethod), _isNullOrUndefined = (OfficeExtension.BatchApiHelper.invokeEnsureUnchanged, + OfficeExtension.BatchApiHelper.invokeSetProperty, OfficeExtension.Utility.isNullOrUndefined), _toJson = (OfficeExtension.Utility.isUndefined, + OfficeExtension.Utility.throwIfNotLoaded, OfficeExtension.Utility.throwIfApiNotSupported, + OfficeExtension.Utility.load, OfficeExtension.Utility.retrieve, OfficeExtension.Utility.toJson), _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary, _processRetrieveResult = (OfficeExtension.Utility._handleNavigationPropertyResults, + OfficeExtension.Utility.adjustToDateTime, OfficeExtension.Utility.processRetrieveResult); + OfficeExtension.Utility.setMockData, OfficeExtension.CommonUtility.calculateApiFlags; + function callPersistentKvStorageManager(nativeCall, getValueOnSuccess) { + return new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + var storageManager = PersistentKvStorageManager.getInstance(), invokeId = storageManager.setCallBack((function(result, error) { + if (error) reject(error); else { + var value = getValueOnSuccess(result); + resolve(value); + } + })); + storageManager.ctx.sync().then((function() { + var storageService = storageManager.getPersistentKvStorageService(); + return nativeCall(storageService, invokeId), storageManager.ctx.sync(); + })).catch((function(e) { + reject(e); + })); + })); + } + function callStorageManager(nativeCall, getValueOnSuccess, callback) { + return new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + var storageManager = PersistentKvStorageManager.getInstance(), invokeId = storageManager.setCallBack((function(result, error) { + if (error) return callback && callback(error), void reject(error); + var value = getValueOnSuccess(result); + callback && callback(null, value), resolve(value); + })); + storageManager.ctx.sync().then((function() { + var storageService = storageManager.getPersistentKvStorageService(); + return nativeCall(storageService, invokeId), storageManager.ctx.sync(); + })).catch((function(e) { + reject(e); + })); + })); + } + exports.AsyncStorage = { + getItem: function(key, callback) { + return callStorageManager((function(storage, invokeId) { + return storage.multiGet(invokeId, JSON.stringify([ key ])); + }), (function(result) { + var parsedResult = JSON.parse(result); + return parsedResult && parsedResult[0] && parsedResult[0][1] ? parsedResult[0][1] : null; + }), callback); + }, + setItem: function(key, value, callback) { + return callStorageManager((function(storage, invokeId) { + return storage.multiSet(invokeId, JSON.stringify([ [ key, value ] ])); + }), (function() { + return null; + }), callback); + }, + removeItem: function(key, callback) { + return callStorageManager((function(storage, invokeId) { + return storage.multiRemove(invokeId, JSON.stringify([ key ])); + }), (function() { + return null; + }), callback); + }, + multiGet: function(keys, callback) { + return callStorageManager((function(storage, invokeId) { + return storage.multiGet(invokeId, JSON.stringify(keys)); + }), (function(result) { + var keyValues = JSON.parse(result), map = {}; + return keyValues && keyValues.forEach((function(_a) { + var key = _a[0], value = _a[1]; + return map[key] = value, value; + })), keys.map((function(key) { + return [ key, map[key] ? map[key] : null ]; + })); + }), callback); + }, + multiSet: function(keyValuePairs, callback) { + return callStorageManager((function(storage, invokeId) { + return storage.multiSet(invokeId, JSON.stringify(keyValuePairs)); + }), (function() { + return null; + }), callback); + }, + multiRemove: function(keys, callback) { + return callStorageManager((function(storage, invokeId) { + return storage.multiRemove(invokeId, JSON.stringify(keys)); + }), (function() { + return null; + }), callback); + }, + getAllKeys: function(callback) { + return callStorageManager((function(storage, invokeId) { + return storage.getAllKeys(invokeId); + }), (function(result) { + return JSON.parse(result); + }), callback); + }, + clear: function(callback) { + return callStorageManager((function(storage, invokeId) { + return storage.clear(invokeId); + }), (function() { + return null; + }), callback); + } + }, exports.storage = { + getItem: function(key) { + return callPersistentKvStorageManager((function(perStorage, invokeId) { + return perStorage.multiGet(invokeId, JSON.stringify([ key ])); + }), (function(result) { + var parsedResult = JSON.parse(result); + return parsedResult && parsedResult[0] && parsedResult[0][1] ? parsedResult[0][1] : null; + })); + }, + setItem: function(key, value) { + return callPersistentKvStorageManager((function(perStorage, invokeId) { + return perStorage.multiSet(invokeId, JSON.stringify([ [ key, value ] ])); + }), (function() { + return null; + })); + }, + removeItem: function(key) { + return callPersistentKvStorageManager((function(perStorage, invokeId) { + return perStorage.multiRemove(invokeId, JSON.stringify([ key ])); + }), (function() { + return null; + })); + }, + getItems: function(keys) { + return callPersistentKvStorageManager((function(perStorage, invokeId) { + return perStorage.multiGet(invokeId, JSON.stringify(keys)); + }), (function(result) { + var keyValues = JSON.parse(result), map = {}; + return keys.forEach((function(k) { + map[k] = null; + })), keyValues && keyValues.forEach((function(_a) { + var key = _a[0], value = _a[1]; + return map[key] = value, value; + })), map; + })); + }, + setItems: function(keyValues) { + var keyValuePairs = []; + for (var key in keyValues) keyValues.hasOwnProperty(key) && keyValuePairs.push([ key, keyValues[key] ]); + return callPersistentKvStorageManager((function(storage, invokeId) { + return storage.multiSet(invokeId, JSON.stringify(keyValuePairs)); + }), (function() { + return null; + })); + }, + removeItems: function(keys) { + return callPersistentKvStorageManager((function(perStorage, invokeId) { + return perStorage.multiRemove(invokeId, JSON.stringify(keys)); + }), (function() { + return null; + })); + }, + getKeys: function() { + return callPersistentKvStorageManager((function(perStorage, invokeId) { + return perStorage.getAllKeys(invokeId); + }), (function(result) { + return JSON.parse(result); + })); + } + }; + var PersistentKvStorageManager = function() { + function PersistentKvStorageManager() { + var _this = this; + this._invokeId = 0, this._callDict = {}, this.ctx = new OfficeExtension.ClientRequestContext, + this._perkvstorService = PersistentKvStorageService.newObject(this.ctx), this._eventResult = this._perkvstorService.onPersistentStorageMessage.add((function(args) { + OfficeExtension.Utility.log("persistentKvStoragegMessageHandler:" + JSON.stringify(args)); + var callback = _this._callDict[args.invokeId]; + callback && (callback(args.message, args.error), delete _this._callDict[args.invokeId]); + })); + } + return PersistentKvStorageManager.getInstance = function() { + return void 0 === PersistentKvStorageManager.instance ? PersistentKvStorageManager.instance = new PersistentKvStorageManager : PersistentKvStorageManager.instance._perkvstorService = PersistentKvStorageService.newObject(PersistentKvStorageManager.instance.ctx), + PersistentKvStorageManager.instance; + }, PersistentKvStorageManager.prototype.getPersistentKvStorageService = function() { + return this._perkvstorService; + }, PersistentKvStorageManager.prototype.getCallBack = function(callId) { + return this._callDict[callId]; + }, PersistentKvStorageManager.prototype.setCallBack = function(callback) { + var id = this._invokeId; + return this._callDict[this._invokeId++] = callback, id; + }, PersistentKvStorageManager; + }(), PersistentKvStorageService = function(_super) { + function PersistentKvStorageService() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(PersistentKvStorageService, _super), Object.defineProperty(PersistentKvStorageService.prototype, "_className", { + get: function() { + return "PersistentKvStorageService"; + }, + enumerable: !1, + configurable: !0 + }), PersistentKvStorageService.prototype.clear = function(id) { + _invokeMethod(this, "Clear", 1, [ id ], 4, 0); + }, PersistentKvStorageService.prototype.getAllKeys = function(id) { + _invokeMethod(this, "GetAllKeys", 1, [ id ], 4, 0); + }, PersistentKvStorageService.prototype.multiGet = function(id, jsonKeys) { + _invokeMethod(this, "MultiGet", 1, [ id, jsonKeys ], 4, 0); + }, PersistentKvStorageService.prototype.multiRemove = function(id, jsonKeys) { + _invokeMethod(this, "MultiRemove", 1, [ id, jsonKeys ], 4, 0); + }, PersistentKvStorageService.prototype.multiSet = function(id, jsonKeyValue) { + _invokeMethod(this, "MultiSet", 1, [ id, jsonKeyValue ], 4, 0); + }, PersistentKvStorageService.prototype._handleResult = function(value) { + (_super.prototype._handleResult.call(this, value), _isNullOrUndefined(value)) || _fixObjectPathIfNecessary(this, value); + }, PersistentKvStorageService.prototype._handleRetrieveResult = function(value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, PersistentKvStorageService.newObject = function(context) { + return _createTopLevelServiceObject(PersistentKvStorageService, context, "Microsoft.PersistentKvStorage.PersistentKvStorageService", !1, 4); + }, Object.defineProperty(PersistentKvStorageService.prototype, "onPersistentStorageMessage", { + get: function() { + return this.m_persistentStorageMessage || (this.m_persistentStorageMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "PersistentStorageMessage", { + eventType: 65537, + registerFunc: function() {}, + unregisterFunc: function() {}, + getTargetIdFunc: function() { + return null; + }, + eventArgsTransformFunc: function(args) { + var perkvstorArgs, internalCode, _a, table; + try { + var parsedMessage = JSON.parse(args.message), hr = parseInt(parsedMessage.errorCode), error = 0 != hr ? new OfficeExtension.Error((internalCode = hr, + (_a = {})[16389] = { + code: "GenericException", + message: "Unknown error." + }, _a[65535] = { + code: "Unexcepted", + message: "Catastrophic failure." + }, _a[14] = { + code: "OutOfMemory", + message: "Ran out of memory." + }, _a[87] = { + code: "InvalidArg", + message: "One or more arguments are invalid." + }, _a[16385] = { + code: "NotImplemented", + message: "Not implemented." + }, _a[6] = { + code: "BadHandle", + message: "File Handle is not Set." + }, _a[5] = { + code: "AccessDenied", + message: "Can't read the Storage File." + }, (table = _a)[internalCode] ? table[internalCode] : { + code: "Unknown", + message: "An unknown error has occured" + })) : null; + perkvstorArgs = { + invokeId: parsedMessage.invokeId, + message: parsedMessage.message, + error: error + }; + } catch (e) { + perkvstorArgs = { + invokeId: -1, + message: e.message, + error: new OfficeExtension.Error({ + code: "GenericException", + message: "Unknown error" + }) + }; + } + return OfficeExtension.Utility._createPromiseFromResult(perkvstorArgs); + } + })), this.m_persistentStorageMessage; + }, + enumerable: !1, + configurable: !0 + }), PersistentKvStorageService.prototype.toJSON = function() { + return _toJson(this, {}, {}); + }, PersistentKvStorageService; + }(OfficeExtension.ClientObject); + exports.PersistentKvStorageService = PersistentKvStorageService, function(ErrorCodes) { + ErrorCodes.generalException = "GeneralException"; + }(exports.ErrorCodes || (exports.ErrorCodes = {})); +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.multiGet = exports.multiRemove = exports.multiSet = exports.getAllKeys = exports.clear = exports.removeItem = exports.setItem = exports.getItem = void 0; + var prefix = "_Office_AsyncStorage_"; + function ensureFreshLocalStorage() { + window.localStorage.setItem("_Office_AsyncStorage_|_unusedKey_", null), window.localStorage.removeItem("_Office_AsyncStorage_|_unusedKey_"); + } + function performAction(action, callback) { + return void 0 === callback && (callback = function() {}), new Promise((function(resolve, reject) { + try { + ensureFreshLocalStorage(), action(), callback(null), resolve(); + } catch (e) { + callback(e), reject(e); + } + })); + } + function performActionAndReturnResult(action, callback) { + return void 0 === callback && (callback = function() {}), new Promise((function(resolve, reject) { + try { + ensureFreshLocalStorage(); + var result = action(); + callback(null, result), resolve(result); + } catch (e) { + callback(e, null), reject(e); + } + })); + } + function performMultiAction(collection, action, callback) { + return void 0 === callback && (callback = function() {}), new Promise((function(resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } catch (e) { + errors.push(e); + } + collection.forEach((function(item) { + try { + action(item); + } catch (e) { + errors.push(e); + } + })), callback(errors), errors.length > 0 ? reject(errors) : resolve(); + })); + } + exports.getItem = function(key, callback) { + return performActionAndReturnResult((function() { + return window.localStorage.getItem(prefix + key); + }), callback); + }, exports.setItem = function(key, value, callback) { + return performAction((function() { + return window.localStorage.setItem(prefix + key, value); + }), callback); + }, exports.removeItem = function(key, callback) { + return performAction((function() { + return window.localStorage.removeItem(prefix + key); + }), callback); + }, exports.clear = function(callback) { + return performAction((function() { + Object.keys(window.localStorage).filter((function(fullKey) { + return 0 === fullKey.indexOf(prefix); + })).forEach((function(fullKey) { + return window.localStorage.removeItem(fullKey); + })); + }), callback); + }, exports.getAllKeys = function(callback) { + return performActionAndReturnResult((function() { + return Object.keys(window.localStorage).filter((function(fullKey) { + return 0 === fullKey.indexOf(prefix); + })).map((function(fullKey) { + return fullKey.substr(prefix.length); + })); + }), callback); + }, exports.multiSet = function(keyValuePairs, callback) { + return performMultiAction(keyValuePairs, (function(_a) { + var key = _a[0], value = _a[1]; + return window.localStorage.setItem(prefix + key, value); + }), callback); + }, exports.multiRemove = function(keys, callback) { + return performMultiAction(keys, (function(key) { + return window.localStorage.removeItem(prefix + key); + }), callback); + }, exports.multiGet = function(keys, callback) { + return new Promise((function(resolve, reject) { + callback || (callback = function() {}); + var errors = [], results = keys.map((function(key) { + try { + return [ key, window.localStorage.getItem(prefix + key) ]; + } catch (e) { + errors.push(e); + } + })).filter((function(pair) { + return pair; + })); + errors.length > 0 ? (callback(errors, results), reject(errors)) : (callback(null, results), + resolve(results)); + })); + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.storage = void 0; + var prefix = "_OfficeRuntime_Storage_"; + function ensureFreshLocalStorage() { + window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_", null), window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_"); + } + function performAction(action) { + return new Promise((function(resolve, reject) { + try { + ensureFreshLocalStorage(), action(), resolve(); + } catch (e) { + reject(e); + } + })); + } + function performActionAndReturnResult(action) { + return new Promise((function(resolve, reject) { + try { + ensureFreshLocalStorage(), resolve(action()); + } catch (e) { + reject(e); + } + })); + } + function performMultiAction(collection, action) { + return new Promise((function(resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } catch (e) { + errors.push(e); + } + for (var key in collection) if (collection.hasOwnProperty(key) || Array.isArray(collection)) try { + Array.isArray(collection) ? action(collection[key]) : action(key); + } catch (e) { + errors.push(e); + } + errors.length > 0 ? reject(new Error("Unknown error.")) : resolve(); + })); + } + exports.storage = { + getItem: function(key) { + return performActionAndReturnResult((function() { + return window.localStorage.getItem(prefix + key); + })); + }, + setItem: function(key, value) { + return performAction((function() { + return window.localStorage.setItem(prefix + key, value); + })); + }, + removeItem: function(key) { + return performAction((function() { + return window.localStorage.removeItem(prefix + key); + })); + }, + getItems: function(keys) { + return new Promise((function(resolve, reject) { + var result = {}, errors = []; + try { + ensureFreshLocalStorage(); + } catch (e) { + reject(e); + } + keys.forEach((function(key) { + try { + var value = window.localStorage.getItem(prefix + key); + result[key] = value || null; + } catch (e) { + errors.push(e); + } + })), errors.length > 0 ? reject(new Error("Unknown error.")) : resolve(result); + })); + }, + setItems: function(keyValues) { + return performMultiAction(keyValues, (function(key) { + return window.localStorage.setItem(prefix + key, keyValues[key]); + })); + }, + removeItems: function(keys) { + return performMultiAction(keys, (function(key) { + window.localStorage.removeItem(prefix + key); + })); + }, + getKeys: function() { + return performActionAndReturnResult((function() { + return Object.keys(window.localStorage).filter((function(fullKey) { + return 0 === fullKey.indexOf(prefix); + })).map((function(fullKey) { + return fullKey.substr(prefix.length); + })); + })); + } + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))((function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + } + function step(result) { + var value; + result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P((function(resolve) { + resolve(value); + }))).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + })); + }, __generator = this && this.__generator || function(thisArg, body) { + var f, y, t, g, _ = { + label: 0, + sent: function() { + if (1 & t[0]) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }; + return g = { + next: verb(0), + throw: verb(1), + return: verb(2) + }, "function" == typeof Symbol && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return function(op) { + if (f) throw new TypeError("Generator is already executing."); + for (;_; ) try { + if (f = 1, y && (t = 2 & op[0] ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), + 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + switch (y = 0, t && (op = [ 2 & op[0], t.value ]), op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + return _.label++, { + value: op[1], + done: !1 + }; + + case 5: + _.label++, y = op[1], op = [ 0 ]; + continue; + + case 7: + op = _.ops.pop(), _.trys.pop(); + continue; + + default: + if (!(t = _.trys, (t = t.length > 0 && t[t.length - 1]) || 6 !== op[0] && 2 !== op[0])) { + _ = 0; + continue; + } + if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (6 === op[0] && _.label < t[1]) { + _.label = t[1], t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2], _.ops.push(op); + break; + } + t[2] && _.ops.pop(), _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [ 6, e ], y = 0; + } finally { + f = t = 0; + } + if (5 & op[0]) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: !0 + }; + }([ n, v ]); + }; + } + }; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.experimentation = void 0; + var ExperimentationNative = function() { + function ExperimentationNative() {} + return ExperimentationNative.prototype.getBooleanFeatureGate = function(featureName, defaultValue) { + try { + var featureGateValue = Microsoft.Office.WebExtension.FeatureGates[featureName]; + return "true" === featureGateValue.toString().toLowerCase() || !0 === featureGateValue; + } catch (error) { + return defaultValue; + } + }, ExperimentationNative.prototype.getIntFeatureGate = function(featureName, defaultValue) { + try { + var featureGateValue = parseInt(Microsoft.Office.WebExtension.FeatureGates[featureName]); + return isNaN(featureGateValue) ? defaultValue : featureGateValue; + } catch (error) { + return defaultValue; + } + }, ExperimentationNative.prototype.getStringFeatureGate = function(featureName, defaultValue) { + try { + var featureGateValue = Microsoft.Office.WebExtension.FeatureGates[featureName]; + return null == featureGateValue ? defaultValue : featureGateValue; + } catch (error) { + return defaultValue; + } + }, ExperimentationNative.prototype.getChangeGate = function(changeGateName) { + return this.getBooleanFeatureGate(changeGateName, !0); + }, ExperimentationNative.prototype.getBooleanFeatureGateAsync = function(featureName, defaultValue) { + return __awaiter(this, void 0, void 0, (function() { + var context, feature; + return __generator(this, (function(_b) { + switch (_b.label) { + case 0: + return _b.trys.push([ 0, 2, , 3 ]), context = this.getRequestContext(), feature = context.flighting.getFeature(featureName, "Boolean", defaultValue), + context.load(feature), [ 4, context.sync() ]; + + case 1: + return _b.sent(), [ 2, feature.value ]; + + case 2: + return _b.sent(), [ 2, Promise.resolve(defaultValue) ]; + + case 3: + return [ 2 ]; + } + })); + })); + }, ExperimentationNative.prototype.getStringFeatureGateAsync = function(featureName, defaultValue) { + return __awaiter(this, void 0, void 0, (function() { + var context, feature; + return __generator(this, (function(_b) { + switch (_b.label) { + case 0: + return _b.trys.push([ 0, 2, , 3 ]), context = this.getRequestContext(), feature = context.flighting.getFeature(featureName, "String", defaultValue), + context.load(feature), [ 4, context.sync() ]; + + case 1: + return _b.sent(), [ 2, feature.value ]; + + case 2: + return _b.sent(), [ 2, Promise.resolve(defaultValue) ]; + + case 3: + return [ 2 ]; + } + })); + })); + }, ExperimentationNative.prototype.getIntFeatureGateAsync = function(featureName, defaultValue) { + return __awaiter(this, void 0, void 0, (function() { + var context, feature; + return __generator(this, (function(_b) { + switch (_b.label) { + case 0: + return _b.trys.push([ 0, 2, , 3 ]), context = this.getRequestContext(), feature = context.flighting.getFeature(featureName, "Integer", defaultValue), + context.load(feature), [ 4, context.sync() ]; + + case 1: + return _b.sent(), [ 2, feature.value ]; + + case 2: + return _b.sent(), [ 2, Promise.resolve(defaultValue) ]; + + case 3: + return [ 2 ]; + } + })); + })); + }, ExperimentationNative.prototype.getRequestContext = function() { + var ctx; + if (Office.context.platform !== Office.PlatformType.OfficeOnline) { + switch (Office.context.host) { + case Office.HostType.Excel: + ctx = new Excel.RequestContext; + break; + + case Office.HostType.OneNote: + ctx = new OneNote.RequestContext; + break; + + case Office.HostType.PowerPoint: + ctx = new PowerPoint.RequestContext; + break; + + case Office.HostType.Word: + ctx = new Word.RequestContext; + break; + + default: + throw new Error("Unknown Application ".concat(Office.context.host)); + } + return ctx; + } + }, ExperimentationNative; + }(); + exports.experimentation = new ExperimentationNative; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Message = void 0; + var Message_1 = __webpack_require__(10); + Object.defineProperty(exports, "Message", { + enumerable: !0, + get: function() { + return Message_1.Message; + } + }); +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Message = void 0; + var ListenerManager_1 = __webpack_require__(11), Message = function() { + function Message() { + this.listeners = {}; + } + return Message.prototype.on = function(eventName, listener) { + return this.add(eventName, listener), new Promise((function(resolve) { + resolve(); + })); + }, Message.prototype.off = function(eventName, listener) { + return this.remove(eventName, listener), new Promise((function(resolve) { + resolve(); + })); + }, Message.prototype.emit = function(eventName, message) { + return this.send(eventName, message), new Promise((function(resolve) { + resolve(); + })); + }, Object.defineProperty(Message, "instance", { + get: function() { + return Message.singleton || (Message.singleton = new Message), this.singleton; + }, + enumerable: !1, + configurable: !0 + }), Message.prototype.setupReceive = function() { + Office && Office.context && Office.context.messaging && !Office.context.messaging.onMessage && (Office.context.messaging.onMessage = this.receiveMessage.bind(this)); + }, Message.prototype.add = function(eventName, listener) { + this.listeners.hasOwnProperty(eventName) || (this.listeners[eventName] = new ListenerManager_1.ListenerManager, + this.setupReceive()), this.listeners[eventName].add(listener); + }, Message.prototype.remove = function(eventName, listener) { + this.listeners.hasOwnProperty(eventName) && (listener ? this.listeners[eventName].remove(listener) : delete this.listeners[eventName]); + }, Message.prototype.send = function(eventName, message) { + var wrapped = { + eventName: eventName, + message: message + }; + Office && Office.context && Office.context.messaging && Office.context.messaging.sendMessage && Office.context.messaging.sendMessage(wrapped); + }, Message.prototype.receiveMessage = function(wrapped) { + var eventName = wrapped.eventName, message = wrapped.message; + this.listeners.hasOwnProperty(eventName) && this.listeners[eventName].call(message); + }, Message; + }(); + exports.Message = Message; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ListenerManager = void 0; + var ListenerManager = function() { + function ListenerManager() { + this.listeners = []; + } + return ListenerManager.prototype.add = function(listener) { + this.listeners.push(listener); + }, ListenerManager.prototype.remove = function(listener) { + var index = this.listeners.lastIndexOf(listener); + -1 !== index && this.listeners.splice(index, 1); + }, ListenerManager.prototype.call = function(message) { + this.listeners.forEach((function(listener) { + return listener(message); + })); + }, ListenerManager; + }(); + exports.ListenerManager = ListenerManager; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Ribbon = exports.ui = void 0, exports.ui = { + getRibbon: function() { + return new Promise((function(resolve, reject) { + resolve(new Ribbon); + })); + } + }; + var Ribbon = function() { + function Ribbon() { + this.requestContext = new OfficeCore.RequestContext, OSF.WebAuth && "web" == OSF._OfficeAppFactory.getHostInfo().hostPlatform && (this.requestContext._customData = "WacPartition"); + } + return Ribbon.prototype.requestUpdate = function(input) { + var ribbon = this.requestContext.ribbon; + return input.tabs.filter((function(tab) { + return !!tab.id; + })).forEach((function(tab) { + var ribbonTab = ribbon.getTab(tab.id); + void 0 !== tab.visible && null !== tab.visible && ribbonTab.setVisibility(tab.visible), + tab.controls.filter((function(control) { + return !!control.id; + })).forEach((function(control) { + var ribbonControl = ribbon.getButton(control.id); + void 0 !== control.enabled && null !== control.enabled && (ribbonControl.enabled = control.enabled); + })); + })), this.requestContext.sync(); + }, Ribbon; + }(); + exports.Ribbon = Ribbon; +}, function(module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Auth = void 0; + var OfficeExtension = __webpack_require__(0), Auth = function() { + function Auth() {} + return Auth.prototype.getAccessToken = function(params) { + return new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + try { + Office.context.auth.getAccessTokenAsync(params || {}, (function(result) { + "succeeded" === result.status ? resolve(result.value) : reject(result.error); + })); + } catch (error) { + reject(error); + } + })); + }, Auth.prototype.getAuthContext = function() { + return new OfficeExtension.CoreUtility.Promise((function(resolve, reject) { + try { + Office.context.auth.getAuthContextAsync((function(result) { + "succeeded" === result.status ? resolve(result.value) : reject(result.error); + })); + } catch (error) { + reject(error); + } + })); + }, Object.defineProperty(Auth, "instance", { + get: function() { + return Auth.singleton || (Auth.singleton = new Auth), Auth.singleton; + }, + enumerable: !1, + configurable: !0 + }), Auth; + }(); + exports.Auth = Auth; +} ]); \ No newline at end of file diff --git a/dist/excel-win32-16.01-core.js b/dist/excel-win32-16.01-core.js new file mode 100644 index 000000000..5466562c1 --- /dev/null +++ b/dist/excel-win32-16.01-core.js @@ -0,0 +1,22 @@ +/* Excel specific API library (Core APIs only) */ + +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + + This file also contains the following Promise implementation (with a few small modifications): + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 2.3.0 +*/ +var __extends=this&&this.__extends||function(){var a=function(c,b){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(c,a){for(var b in a)if(a.hasOwnProperty(b))c[b]=a[b]};return a(c,b)};return function(c,b){a(c,b);function d(){this.constructor=c}c.prototype=b===null?Object.create(b):(d.prototype=b.prototype,new d)}}(),OfficeExt;(function(b){var a=function(){var a=true;function b(){}b.prototype.isMsAjaxLoaded=function(){var b="function",c="undefined";if(typeof Sys!==c&&typeof Type!==c&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b&&typeof Function._validateParams===b&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===b)return a;else return false};b.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(b.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==null&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==null&&a.isMsAjaxLoaded())a._msAjaxString=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==null&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return b}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a==h)for(var b=0;b6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(d)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,d)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,b);f[e]=a}catch(g){}}return f},loadScript:function(f,g,i){if(f&&g){var k=window.document,d=v[f];if(!d){var e=k.createElement("script");e.type="text/javascript";d={loaded:c,pendingCallbacks:[g],timer:a};v[f]=d;var j=function(){if(d.timer!=a){clearTimeout(d.timer);delete d.timer}d.loaded=b;for(var e=d.pendingCallbacks.length,c=0;c0)h(a);else h(new Event("Script load timed out"))},h=function(g){delete v[f];if(d.timer!=a){clearTimeout(d.timer);delete d.timer}for(var c=d.pendingCallbacks.length,b=0;b=0},pushFlight:function(a){if(OSF.Flights.indexOf(a)<0){OSF.Flights.push(a);return b}return c},getBooleanSetting:function(a){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,a)},getBooleanFromDictionary:function(b,a){var d=b&&a&&b[a]!==undefined&&b[a]&&(typeof b[a]===h&&b[a].toUpperCase()==="TRUE"||typeof b[a]==="boolean"&&b[a]);return d!==undefined?d:c},getIntFromDictionary:function(b,a){if(b&&a&&b[a]!==undefined&&typeof b[a]===h)return parseInt(b[a]);else return NaN},pushIntFlight:function(a,d){if(!(a in OSF.IntFlights)){OSF.IntFlights[a]=d;return b}return c},getIntFlight:function(a){if(OSF.IntFlights&&a in OSF.IntFlights)return OSF.IntFlights[a];else return NaN},parseFlightsFromWindowName:function(a,b){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(a,b,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(a,c){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(B,G,b,a,c))},parseArrayWithDefault:function(b){var a=[];try{a=JSON.parse(b)}catch(c){}if(!Array.isArray(a))a=[];return a},parseInfoFromWindowName:function(g,h,f){try{var b=JSON.parse(h),c=b!=a?b[f]:a,d=t();if(!g&&d&&b!=a){var e=b[OSF.WindowNameItemKeys.BaseFrameName]+f;if(c)d.setItem(e,c);else c=d.getItem(e)}return c}catch(i){return a}},parseInfoWithGivenFragment:function(m,j,k,i,l){var f=l.split(m),b=f.length>1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(y)>=0)b=b.split(y)[0];b=decodeURIComponent(b)}var c=t();if(!i&&c){var e=window.name.indexOf(j);if(e>d){var g=window.name.indexOf(";",e);if(g==d)g=window.name.length;var h=window.name.substring(e,g);if(b)c.setItem(h,b);else b=c.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==f)a=b.split("|");if(typeof a[1]==f)a=b.split("%7C");return a},getXdmFieldValue:function(f,d){var b=e,c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(f){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:c},{name:"expectedProperties",type:Object,mayBeNull:c},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var d in e){a=Function._validateParameter(f[d],e[d],d);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==f&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[i])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[i])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[p,i,q])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[p,i,q])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;g=h&255;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63;if(!isNaN(h)){d=h>>8;f=j&255;g=j>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63}if(isNaN(h))b[a-1]=64;else if(isNaN(j)){b[a-2]=64;b[a-1]=64}for(var l=0;l=2)return a[b-2]+"."+a[b-1];else if(b==1)return a[0]},isiOS:function(){return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?b:c},isChrome:function(){return window.navigator.userAgent.indexOf("Chrome")>0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},startsWith:function(b,a,c){if(c)return b.substr(0,a.length)===a;else return b.startsWith(a)},containsPort:function(d,e,c,a){return this.startsWith(d,e+"//"+c+":"+a,b)||this.startsWith(d,c+":"+a,b)},getRedundandPortString:function(b,a){if(!b||!a)return e;if(a.protocol==k&&this.containsPort(b,k,a.hostname,"443"))return ":443";else if(a.protocol=="http:"&&this.containsPort(b,"http:",a.hostname,"80"))return ":80";return e},removeChar:function(a,b){if(b=a.length)return this.removeChar(a,b);else if(c==="/"){if(a.charAt(b+1)==="?"||a.charAt(b+1)===g)return this.removeChar(a,b)}else if(c==="?")if(a.charAt(b+1)===g)return this.removeChar(a,b);return a},cleanUrl:function(a){a=this.cleanUrlOfChar(a,"/");a=this.cleanUrlOfChar(a,"?");a=this.cleanUrlOfChar(a,g);if(a.substr(0,8)=="https://"){var b=a.indexOf(":443");if(b!=d)if(b==a.length-4||a.charAt(b+4)=="/"||a.charAt(b+4)=="?"||a.charAt(b+4)==g)a=a.substring(0,b)+a.substring(b+4)}else if(a.substr(0,7)=="http://"){var b=a.indexOf(":80");if(b!=d)if(b==a.length-3||a.charAt(b+3)=="/"||a.charAt(b+3)=="?"||a.charAt(b+3)==g)a=a.substring(0,b)+a.substring(b+3)}return a},parseUrl:function(g,i){var h=this;if(i===void 0)i=c;if(typeof g===f||!g)return undefined;var j="NotHttps",o="InvalidUrl",n=h.isIE(),b={protocol:undefined,hostname:undefined,host:undefined,port:undefined,pathname:undefined,search:undefined,hash:undefined,isPortPartOfUrl:undefined};try{if(n){var a=document.createElement("a");a.href=g;if(!a||!a.protocol||!a.host||!a.hostname||!a.href||h.cleanUrl(a.href).toLowerCase()!==h.cleanUrl(g).toLowerCase())throw o;if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps))if(i&&a.protocol!=k)throw new Error(j);var m=h.getRedundandPortString(g,a);b.protocol=a.protocol;b.hostname=a.hostname;b.port=m==e?a.port:e;b.host=m!=e?a.hostname:a.host;b.pathname=(n?"/":e)+a.pathname;b.search=a.search;b.hash=a.hash;b.isPortPartOfUrl=h.containsPort(g,a.protocol,a.hostname,a.port)}else{var d=new URL(g);if(d&&d.protocol&&d.host&&d.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps))if(i&&d.protocol!=k)throw new Error(j);b.protocol=d.protocol;b.hostname=d.hostname;b.port=d.port;b.host=d.host;b.pathname=d.pathname;b.search=d.search;b.hash=d.hash;b.isPortPartOfUrl=d.host.lastIndexOf(":"+d.port)==d.host.length-d.port.length-1}}}catch(l){if(l.message===j)throw l}return b},shallowCopy:function(b){if(b==a)return a;else if(!(b instanceof Object))return b;else if(Array.isArray(b)){for(var e=[],d=0;dc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};e=x(e);g=i?e.length-1:0;if(e.length===0)return a;while(!h&&g>=0&&gc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};f=x(f);j=n(f,o);e=i(f.length,j,m);if(e<0)return a;while(!h&&e>=0&&ed.length)return c;if(d.substr(d.length-a.length)===a)return b}return c},hashCode:function(b){var a=0;if(!OSF.OUtil.isNullOrUndefined(b)){var c=0,d=b.length;while(c0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();try{(function(){OSF.Flights=OSF.OUtil.parseFlights(true)})()}catch(ex){}window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614,Visio:8388615,OneNoteAndroid:4194305};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20,UpdateTargetUrl:21,InstallCustomFunctions:22,SendTelemetryEvent:23,UninstallCustomFunctions:24,SendMessage:25,LaunchExtensionComponent:26,StopExtensionComponent:27,RestartExtensionComponent:28,EnableTaskPaneHeaderButton:29,DisableTaskPaneHeaderButton:30,TaskPaneHeaderButtonClicked:31,RemoveAppCommandsAddin:32,RefreshRibbonGallery:33,GetOriginalControlId:34,OfficeJsReady:35,InsertDevManifest:36,InsertDevManifestError:37,SendCustomerContent:38,KeyboardShortcuts:39};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(B,x,s,p,u,y,t,w,A,k,z,m,l,o,i,h,g,f,j,c,e,v,r,b,n,q,d){var a=this;a._id=B;a._appName=x;a._appVersion=s;a._appUILocale=p;a._dataLocale=u;a._docUrl=y;a._clientMode=t;a._settings=w;a._reason=A;a._osfControlType=k;a._eToken=z;a._correlationId=m;a._appInstanceId=l;a._touchEnabled=o;a._commerceAllowed=i;a._appMinorVersion=h;a._requirementMatrix=g;a._hostCustomMessage=f;a._hostFullVersion=j;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=e;a._addinName=v;a._appDomains=r;a._dialogRequirementMatrix=b;a._featureGates=n;a._officeTheme=q;a._initialDisplayMode=d;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.get_appDomains=function(){return this._appDomains};a.get_featureGates=function(){return this._featureGates};a.get_officeTheme=function(){return this._officeTheme};a.get_initialDisplayMode=function(){return this._initialDisplayMode?this._initialDisplayMode:0}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",ControlActivation:"controlActivation"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",JsonData:"jsonData",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",AllowConsentPrompt:"allowConsentPrompt",ForMSGraphAccess:"forMSGraphAccess",AllowSignInPrompt:"allowSignInPrompt",JsonPayload:"jsonPayload",EnableNewHosts:"enableNewHosts",AccountTypeFilter:"accountTypeFilter",AddinTrustId:"addinTrustId",Reserved:"reserved",Tcid:"tcid",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo",TargetOrigin:"targetOrigin",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64",FormId:"formId"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetAuthContextMethod:99,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidInsertFormMethod:106,dispidDisplayRibbonCalloutAsyncMethod:109,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidExecuteFeature:146,dispidQueryFeature:147,dispidGetNestedAppAuthContextMethod:205,dispidMethodMax:205};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidOlkRecurrenceChangedEvent:49,dispidOlkAttachmentsChangedEvent:50,dispidOlkEnhancedLocationsChangedEvent:51,dispidOlkInfobarClickedEvent:52,dispidOlkSelectedItemsChangedEvent:53,dispidOlkSensitivityLabelChangedEvent:54,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeOperationCancelled:5014,ooeWorkbookHidden:5015,ooeWriteNotSupportedWhenModalDialogOpen:5016,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeRequestPayloadSizeLimitExceeded:5103,ooeResponsePayloadSizeLimitExceeded:5104,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeModalDialogOpen:12012,ooeDocumentIsInactive:12013,ooeDialogParentIsMinimized:12014,ooeNotSSOAgave:13000,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010,ooeResourceNotAllowed:13011,ooeSSOUnsupportedPlatform:13012,ooeSSOCallThrottled:13013,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:b.L_InvalidOrTimedOutSession,message:b.L_InvalidOrTimedOutSessionMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:b.L_APICallFailed,message:b.L_InvalidApiArgumentsMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden]={name:b.L_APICallFailed,message:b.L_WorkbookHiddenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen]={name:b.L_APICallFailed,message:b.L_WriteNotSupportedWhenModalDialogOpen};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded]={name:b.L_APICallFailed,message:b.L_RequestPayloadSizeLimitExceededMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded]={name:b.L_APICallFailed,message:b.L_ResponsePayloadSizeLimitExceededMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen]={name:b.L_DisplayDialogError,message:b.L_ModalDialogOpen};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive]={name:b.L_DisplayDialogError,message:b.L_DocumentIsInactive};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized]={name:b.L_DisplayDialogError,message:b.L_DialogParentIsMinimized};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:b.L_APINotSupported,message:b.L_InvalidSSOAddinMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:b.L_UserNotSignedIn,message:b.L_UserNotSignedIn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:b.L_UserAborted,message:b.L_UserAbortedMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:b.L_UnsupportedUserIdentity,message:b.L_UnsupportedUserIdentityMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:b.L_InvalidResourceUrl,message:b.L_InvalidResourceUrlMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:b.L_InvalidGrant,message:b.L_InvalidGrantMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:b.L_SSOClientError,message:b.L_SSOClientErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:b.L_SSOServerError,message:b.L_SSOServerErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:b.L_AddinIsAlreadyRequestingToken,message:b.L_AddinIsAlreadyRequestingTokenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:b.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:b.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:b.L_SSOConnectionLostError,message:b.L_SSOConnectionLostErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:b.L_APINotSupported,message:b.L_SSOUnsupportedPlatform};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:b.L_OperationCancelledError,message:b.L_OperationCancelledErrorMessage}}}}();(function(a){var b;(function(b){var a=1.1,A=function(){function a(){}return a}();b.RequirementVersion=A;var d=function(){function a(b){var a=this;a.isSetSupported=function(d,b){if(d==undefined)return false;if(b==undefined)b=0;var f=this._setMap,e=f._sets;if(e.hasOwnProperty(d.toLowerCase())){var g=e[d.toLowerCase()];try{var a=this._getVersion(g);b=b+"";var c=this._getVersion(b);if(a.major>0&&a.major>c.major)return true;if(a.major>0&&a.minor>=0&&a.major==c.major&&a.minor>=c.minor)return true}catch(h){return false}}return false};a._getVersion=function(b){var a="version format incorrect";b=b+"";var c=b.split("."),d=0,e=0;if(c.length<2&&isNaN(Number(b)))throw a;else{d=Number(c[0]);if(c.length>=2)e=Number(c[1]);if(isNaN(d)||isNaN(e))throw a}var f={minor:e,major:d};return f};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var l=function(c){__extends(b,c);function b(){return c.call(this,{dialogapi:a})||this}return b}(c);b.DefaultRequiredDialogSetRequirement=l;var k=function(c){__extends(b,c);function b(){return c.call(this,{dialogorigin:a})||this}return b}(c);b.DefaultOptionalDialogSetRequirement=k;var f=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})||this}return b}(c);b.ExcelClientDefaultSetRequirement=f;var m=function(c){__extends(b,c);function b(){var b=c.call(this)||this;b._addSetMap({imagecoercion:a});return b}return b}(f);b.ExcelClientV1DefaultSetRequirement=m;var n=function(b){__extends(a,b);function a(){return b.call(this,{mailbox:1.3})||this}return a}(c);b.OutlookClientDefaultSetRequirement=n;var h=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})||this}return b}(c);b.WordClientDefaultSetRequirement=h;var r=function(c){__extends(b,c);function b(){var b=c.call(this)||this;b._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a});return b}return b}(h);b.WordClientV1DefaultSetRequirement=r;var e=function(c){__extends(b,c);function b(){return c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})||this}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){var b=c.call(this)||this;b._addSetMap({imagecoercion:a});return b}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var q=function(c){__extends(b,c);function b(){return c.call(this,{selection:a,textcoercion:a})||this}return b}(c);b.ProjectClientDefaultSetRequirement=q;var w=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})||this}return b}(c);b.ExcelWebDefaultSetRequirement=w;var y=function(c){__extends(b,c);function b(){return c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})||this}return b}(c);b.WordWebDefaultSetRequirement=y;var p=function(c){__extends(b,c);function b(){return c.call(this,{activeview:a,settings:a})||this}return b}(c);b.PowerpointWebDefaultSetRequirement=p;var g=function(b){__extends(a,b);function a(){return b.call(this,{mailbox:1.3})||this}return a}(c);b.OutlookWebDefaultSetRequirement=g;var x=function(c){__extends(b,c);function b(){return c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})||this}return b}(c);b.SwayWebDefaultSetRequirement=x;var t=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})||this}return b}(c);b.AccessWebDefaultSetRequirement=t;var v=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})||this}return b}(c);b.ExcelIOSDefaultSetRequirement=v;var i=function(c){__extends(b,c);function b(){return c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})||this}return b}(c);b.WordIOSDefaultSetRequirement=i;var u=function(b){__extends(a,b);function a(){var a=b.call(this)||this;a._addSetMap({customxmlparts:1.2,wordapi:1.2});return a}return a}(i);b.WordIOSV1DefaultSetRequirement=u;var o=function(c){__extends(b,c);function b(){return c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})||this}return b}(c);b.PowerpointIOSDefaultSetRequirement=o;var s=function(c){__extends(b,c);function b(){return c.call(this,{mailbox:a})||this}return b}(c);b.OutlookIOSDefaultSetRequirement=s;var z=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var i=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(i))}else{var h=a.getClientFullVersionString(f);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDefaultDialogRequirementMatrix=function(h){var a=undefined,i=h.get_dialogRequirementMatrix();if(i!=undefined&&i.length>0&&typeof JSON!==b){var f=JSON.parse(h.get_requirementMatrix().toLowerCase());a=new c(f)}else{a=new l;var g=h.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var f=JSON.parse(g.toLowerCase());for(var e in a._sets)if(f.hasOwnProperty(e))a._sets[e]=f[e];var j=new k;for(var e in j._sets)if(f.hasOwnProperty(e))a._sets[e]=f[e]}}return new d(a)};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new f;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new h;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new m;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new n;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new w;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new y;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new g;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new g;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new q;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new t;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new p;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new v;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new x;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new i;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new u;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new o;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new s};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=z})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,j,k,c,d){var i="officeTheme",h="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},isDialog:{value:OSF._OfficeAppFactory.getHostInfo().isDialog},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});k&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:k});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});a.auth&&OSF.OUtil.defineEnumerableProperty(b,"auth",{value:a.auth});a.webAuth&&OSF.OUtil.defineEnumerableProperty(b,"webAuth",{value:a.webAuth});a.application&&OSF.OUtil.defineEnumerableProperty(b,"application",{value:a.application});a.extensionLifeCycle&&OSF.OUtil.defineEnumerableProperty(b,"extensionLifeCycle",{value:a.extensionLifeCycle});a.messaging&&OSF.OUtil.defineEnumerableProperty(b,"messaging",{value:a.messaging});a.ui&&a.ui.taskPaneAction&&OSF.OUtil.defineEnumerableProperty(b,"taskPaneAction",{value:a.ui.taskPaneAction});a.ui&&a.ui.ribbonGallery&&OSF.OUtil.defineEnumerableProperty(b,"ribbonGallery",{value:a.ui.ribbonGallery});if(a.get_isDialog()){var f=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,h,{value:f})}else{j&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:j});if(c){var l=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,l,{value:c})}if(a.get_officeTheme())OSF.OUtil.defineEnumerableProperty(b,i,{"get":function(){return a.get_officeTheme()}});else d&&OSF.OUtil.defineEnumerableProperty(b,i,{"get":function(){return d()}});var f=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,h,{value:f});if(a.get_featureGates){var e=a.get_featureGates();if(e&&e["EnablePublicThemeManager"]){var g=new OSF.DDA.Theming.InternalThemeHandler;g.InitializeThemeManager();OSF.OUtil.defineEnumerableProperty(b,"themeManager",{value:g})}}}};OSF.DDA.OutlookContext=function(a,b,d,e,c){OSF.DDA.OutlookContext.uber.constructor.call(this,a,null,d,e,c);b&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:b});a.sensitivityLabelsCatalog&&OSF.OUtil.defineEnumerableProperty(this,"sensitivityLabelsCatalog",{value:a.sensitivityLabelsCatalog()})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.JsonData]={toHost:function(a){return a},fromHost:function(a){return typeof a==="string"?JSON.parse(a):a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0&&b.push(c)}}}catch(i){}return b}var c=[],b={};b[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,b=1;return {toHost:function(a){if(OSF.DDA.TableDataProperties&&typeof a!="string"&&a[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=a[OSF.DDA.TableDataProperties.TableRows];d[b]=a[OSF.DDA.TableDataProperties.TableHeaders];a=d}return a},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=a(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=a(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=a(d[b])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,b);this.unpack=function(c,a){var d;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c)){var e=a!==undefined&&a.toArray!==undefined;d=e?a.toArray():a||{}}else if(this.isDynamicType(c))d=b[c].fromHost(a);else d=a;return d}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(a){function c(a){var b=a;if(OSF.OUtil.isArray(a))for(var f=b.length,d=0;d2){c=[];for(var f=1;fd[b])return a}return a};b.prototype.isDirectToAriaEnabled=function(){var a=this;if(a.EnableDirectToAria===undefined||a.EnableDirectToAria===null){var c=void 0,b=void 0;if(OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo)c=OSF._OfficeAppFactory.getHostInfo()[f];if(window.external&&typeof window.external.GetContext!==e&&typeof window.external.GetContext().GetHostFullVersion!==e)b=window.external.GetContext().GetHostFullVersion();a.EnableDirectToAria=a.shouldSendDirectToAria(c,b)}return a.EnableDirectToAria};b.prototype.sendTelemetry=function(c,a){var e=1e3,d=b.EnableSendingTelemetryWithLegacyAria&&this.isDirectToAriaEnabled();d&&OSF.OUtil.loadScript(this.getAriaCDNLocation(),function(){try{if(!this.ALogger){var e="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439";this.ALogger=AWTLogManager.initialize(e)}var b=new AWTEventProperties;b.setName("Office.Extensibility.OfficeJS."+c);for(var d in a)d.toLowerCase()!=="table"&&b.setProperty(d,a[d]);var f=new Date;b.setProperty("Date",f.toISOString());this.ALogger.logEvent(b)}catch(g){}},e);b.EnableSendingTelemetryWithOTel&&r(c,a)};b.prototype.logData=function(a){if(this.isIUsageData(a))this.sendTelemetry(a["Table"],a["Fields"]);else this.sendTelemetry(a["Table"],a)};b.EnableSendingTelemetryWithOTel=c;b.EnableSendingTelemetryWithLegacyAria=a;return b}();w.AriaLogger=y})(OSFAriaLogger||(OSFAriaLogger={}));var OSFAppTelemetry;(function(d){var e=false,b=null,f=true,c="";"use strict";var a,h=OSF.OUtil.Guid.generateNewGuid(),k=c,x=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"),q="PRIVATE";d.enableTelemetry=f;var r=function(){function a(){}return a}();d.AppInfo=r;var j=function(){function a(b,a){this.name=b;this.handler=a}return a}(),n=function(){function a(){this.clientIDKey="Office API client";this.logIdSetKey="Office App Log Id Set"}a.prototype.getClientId=function(){var b=this,a=b.getValue(b.clientIDKey);if(!a||a.length<=0||a.length>40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),i=function(){function a(){}a.prototype.LogData=function(a){if(!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(a)}catch(b){}};a.prototype.LogRawData=function(a){if(!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function g(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function H(i){if(!d.enableTelemetry)return;if(a)return;a=new r;if(i.get_hostFullVersion())a.hostVersion=i.get_hostFullVersion();else a.hostVersion=i.get_appVersion();a.appId=m()?i.get_id():q;a.marketplaceType=i._marketplaceType;a.browser=window.navigator.userAgent;a.correlationId=g(i.get_correlationId());a.clientId=(new n).getClientId();a.appInstanceId=i.get_appInstanceId();if(a.appInstanceId){a.appInstanceId=g(a.appInstanceId);a.appInstanceId=o(i.get_id(),a.appInstanceId)}a.message=i.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="0.0.0.0";if(i._wacHostEnvironment)a.wacHostEnvironment=i._wacHostEnvironment;if(i._isFromWacAutomation!==undefined&&i._isFromWacAutomation!==b)a.isFromWacAutomation=i._isFromWacAutomation.toString().toLowerCase();var l=i.get_docUrl();a.docUrl=x.test(l)?l:c;var k=location.href;if(k)k=k.split("?")[0].split("#")[0];a.isMos=s();a.appURL=c;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(i.get_eToken(),a);a.sessionId=h;typeof OTel!=="undefined"&&OTel.OTelLogger.initialize(a);(function(){var m=new Date,c=b,i=0,l=e,g=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){i+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new j("focus",g));a.push(new j("blur",g));a.push(new j("focusout",g));a.push(new j("focusin",g));var k=function(){for(var e=0;e0)for(var b=0;b0)for(var b=0;b0){this._eventHandlers[a]=[];return true}return false},clearObjectEventHandlers:function(a,b){if(this._objectEventHandlers[a]!=null&&this._objectEventHandlers[a][b]!=null){this._objectEventHandlers[a][b]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},getObjectEventHandlerCount:function(a,b){if(this._objectEventHandlers[a]==null||this._objectEventHandlers[a][b]==null)return 0;return this._objectEventHandlers[a][b].length},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){for(var d=this._eventHandlers[b],c=0;c0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(c,f,b){var h="hostPlatform",e="outlook",d="hostType",g=this,a;switch(c){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(g.manufactureBinding(b,f.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(g.manufactureBinding(b,f.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);OSF._OfficeAppFactory.getHostInfo()[d]==e&&OSF._OfficeAppFactory.getHostInfo()[h]=="mac"&&OSF.DDA.convertOlkAppointmentTimeToDateFormat(a);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:a=new OSF.DDA.ObjectEventArgs(c,b[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:a=new OSF.DDA.RichApiMessageEventArgs(c,b);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),g.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(f);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);f.initialize(a["initialData"]);(OSF._OfficeAppFactory.getHostInfo()[h]=="win32"||OSF._OfficeAppFactory.getHostInfo()[h]=="mac")&&f.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkRecipientsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkRecurrenceChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkAttachmentsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.InfobarClicked:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkInfobarClickedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkSelectedItemsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged:if(OSF._OfficeAppFactory.getHostInfo()[d]==e)a=new OSF.DDA.OlkSensitivityLabelChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,c))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RichApiMessage:"richApiMessage"});OSF.DDA.RichApiMessageEventArgs=function(f,e){var b=e[Microsoft.Office.WebExtension.Parameters.Data],d=[];if(b)for(var c=0;c=2&&(r=Number(n[1])),n.length>=3&&(o=Number(n[2])),isNaN(t)||isNaN(r)||isNaN(o))throw"version format incorrect";return{major:t,minor:r,patch:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.apiInformation=void 0,t.apiInformation={isSetSupported:function(t,r){if("string"!=typeof t)return!1;if(null==r&&(r="0.0.0"),void 0===e.__apiSets)return!1;var o=e.__apiSets,i=Object.keys(o).map((function(e){return e.toLowerCase()})).indexOf(t.toLowerCase());if(i>-1){var c=o[Object.keys(o)[i]];try{var u,s=n(r);if((u=Array.isArray(c)?function(e,t){for(var r=0;r0){if(u.major>s.major)return!0;if(u.major==s.major&&u.minor>s.minor)return!0;if(u.major==s.major&&u.minor==s.minor&&u.patch>=s.patch)return!0}}catch(e){return!1}}return!1}}}).call(this,n(3))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DialogErrorCodes=t.DialogService=t.displayWebDialog=t.Dialog=void 0;var i=n(0),c=(i.BatchApiHelper.createPropertyObject,i.BatchApiHelper.createMethodObject,i.BatchApiHelper.createIndexerObject,i.BatchApiHelper.createRootServiceObject,i.BatchApiHelper.createTopLevelServiceObject),u=(i.BatchApiHelper.createChildItemObject,i.BatchApiHelper.invokeMethod),s=(i.BatchApiHelper.invokeEnsureUnchanged,i.BatchApiHelper.invokeSetProperty,i.Utility.isNullOrUndefined),a=(i.Utility.isUndefined,i.Utility.throwIfNotLoaded,i.Utility.throwIfApiNotSupported,i.Utility.load,i.Utility.retrieve,i.Utility.toJson),l=i.Utility.fixObjectPathIfNecessary,f=(i.Utility._handleNavigationPropertyResults,i.Utility.adjustToDateTime,i.Utility.processRetrieveResult),p=(i.Utility.setMockData,i.CommonUtility.calculateApiFlags,function(){function e(e){this._dialogService=e}return e.prototype.close=function(){return this._dialogService.close(),this._dialogService.context.sync()},e}());t.Dialog=p,t.displayWebDialog=function(e,t){return void 0===t&&(t={}),new i.CoreUtility.Promise((function(r,o){if(t.width&&t.height&&(!n(t.width)||!n(t.height)))throw new i.Error({code:"InvalidArgument",message:'Dimensions must be "number%" or number.'});var c=new i.ClientRequestContext,u=d.newObject(c),s=new p(u),a=u.onDialogMessage.add((function(e){switch(i.Utility.log("dialogMessageHandler:"+JSON.stringify(e)),e.type){case 17:e.error?o(e.error):r(s);break;case 12:t.onMessage&&t.onMessage(e.message,s,e.origin);break;case 10:default:12006===e.originalErrorCode?(a&&(a.remove(),c.sync()),t.onClose&&t.onClose()):t.onRuntimeError&&(t.onRuntimeError(e.error,s),o(e.error))}return i.CoreUtility.Promise.resolve()}));return c.sync().then((function(){var n={width:t.width?parseInt(t.width):50,height:t.height?parseInt(t.height):50,displayInIFrame:t.displayInIFrame};return u.displayDialog(e,n),c.sync()})).catch((function(e){o(e)}))}));function n(e){return/^(\-|\+)?([0-9]+)%?$/.test(e)}};var g,d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"DialogService"},enumerable:!1,configurable:!0}),t.prototype.close=function(){u(this,"Close",1,[],4,0)},t.prototype.displayDialog=function(e,t){u(this,"DisplayDialog",1,[e,t],4,0)},t.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),s(t)||l(this,t)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),f(this,t,n)},t.newObject=function(e){return c(t,e,"Microsoft.Dialog.DialogService",!1,4)},Object.defineProperty(t.prototype,"onDialogMessage",{get:function(){return this.m_dialogMessage||(this.m_dialogMessage=new i.GenericEventHandlers(this.context,this,"DialogMessage",{eventType:65536,registerFunc:function(){},unregisterFunc:function(){},getTargetIdFunc:function(){return null},eventArgsTransformFunc:function(e){var t,n,r,o;try{var c=JSON.parse(e.message),u=c.errorCode?new i.Error((n=c.errorCode,(r={})[12002]={code:"InvalidUrl",message:"Cannot load URL, no such page or bad URL syntax."},r[12003]={code:"InvalidUrl",message:"HTTPS is required."},r[12004]={code:"Untrusted",message:"Domain is not trusted."},r[12005]={code:"InvalidUrl",message:"HTTPS is required."},r[12007]={code:"FailedToOpen",message:"Another dialog is already opened."},(o=r)[n]?o[n]:{code:"Unknown",message:"An unknown error has occured with code: "+n})):null;t={originalErrorCode:c.errorCode,type:c.type,error:u,message:c.message,origin:c.origin}}catch(e){t={originalErrorCode:null,type:17,error:new i.Error({code:"GenericException",message:"Unknown error"}),message:e.message}}return i.Utility._createPromiseFromResult(t)}})),this.m_dialogMessage},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return a(this,{},{})},t}(i.ClientObject);t.DialogService=d,function(e){e[e.dialogMessageReceived=0]="dialogMessageReceived",e[e.dialogEventReceived=1]="dialogEventReceived"}(g||(g={})),function(e){e.generalException="GeneralException"}(t.DialogErrorCodes||(t.DialogErrorCodes={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCodes=t.PersistentKvStorageService=t.storage=t.AsyncStorage=void 0;var i=n(0),c=(i.BatchApiHelper.createPropertyObject,i.BatchApiHelper.createMethodObject,i.BatchApiHelper.createIndexerObject,i.BatchApiHelper.createRootServiceObject,i.BatchApiHelper.createTopLevelServiceObject),u=(i.BatchApiHelper.createChildItemObject,i.BatchApiHelper.invokeMethod),s=(i.BatchApiHelper.invokeEnsureUnchanged,i.BatchApiHelper.invokeSetProperty,i.Utility.isNullOrUndefined),a=(i.Utility.isUndefined,i.Utility.throwIfNotLoaded,i.Utility.throwIfApiNotSupported,i.Utility.load,i.Utility.retrieve,i.Utility.toJson),l=i.Utility.fixObjectPathIfNecessary,f=(i.Utility._handleNavigationPropertyResults,i.Utility.adjustToDateTime,i.Utility.processRetrieveResult);function p(e,t){return new i.CoreUtility.Promise((function(n,r){var o=d.getInstance(),i=o.setCallBack((function(e,o){if(o)r(o);else{var i=t(e);n(i)}}));o.ctx.sync().then((function(){var t=o.getPersistentKvStorageService();return e(t,i),o.ctx.sync()})).catch((function(e){r(e)}))}))}function g(e,t,n){return new i.CoreUtility.Promise((function(r,o){var i=d.getInstance(),c=i.setCallBack((function(e,i){if(i)return n&&n(i),void o(i);var c=t(e);n&&n(null,c),r(c)}));i.ctx.sync().then((function(){var t=i.getPersistentKvStorageService();return e(t,c),i.ctx.sync()})).catch((function(e){o(e)}))}))}i.Utility.setMockData,i.CommonUtility.calculateApiFlags,t.AsyncStorage={getItem:function(e,t){return g((function(t,n){return t.multiGet(n,JSON.stringify([e]))}),(function(e){var t=JSON.parse(e);return t&&t[0]&&t[0][1]?t[0][1]:null}),t)},setItem:function(e,t,n){return g((function(n,r){return n.multiSet(r,JSON.stringify([[e,t]]))}),(function(){return null}),n)},removeItem:function(e,t){return g((function(t,n){return t.multiRemove(n,JSON.stringify([e]))}),(function(){return null}),t)},multiGet:function(e,t){return g((function(t,n){return t.multiGet(n,JSON.stringify(e))}),(function(t){var n=JSON.parse(t),r={};return n&&n.forEach((function(e){var t=e[0],n=e[1];return r[t]=n,n})),e.map((function(e){return[e,r[e]?r[e]:null]}))}),t)},multiSet:function(e,t){return g((function(t,n){return t.multiSet(n,JSON.stringify(e))}),(function(){return null}),t)},multiRemove:function(e,t){return g((function(t,n){return t.multiRemove(n,JSON.stringify(e))}),(function(){return null}),t)},getAllKeys:function(e){return g((function(e,t){return e.getAllKeys(t)}),(function(e){return JSON.parse(e)}),e)},clear:function(e){return g((function(e,t){return e.clear(t)}),(function(){return null}),e)}},t.storage={getItem:function(e){return p((function(t,n){return t.multiGet(n,JSON.stringify([e]))}),(function(e){var t=JSON.parse(e);return t&&t[0]&&t[0][1]?t[0][1]:null}))},setItem:function(e,t){return p((function(n,r){return n.multiSet(r,JSON.stringify([[e,t]]))}),(function(){return null}))},removeItem:function(e){return p((function(t,n){return t.multiRemove(n,JSON.stringify([e]))}),(function(){return null}))},getItems:function(e){return p((function(t,n){return t.multiGet(n,JSON.stringify(e))}),(function(t){var n=JSON.parse(t),r={};return e.forEach((function(e){r[e]=null})),n&&n.forEach((function(e){var t=e[0],n=e[1];return r[t]=n,n})),r}))},setItems:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push([n,e[n]]);return p((function(e,n){return e.multiSet(n,JSON.stringify(t))}),(function(){return null}))},removeItems:function(e){return p((function(t,n){return t.multiRemove(n,JSON.stringify(e))}),(function(){return null}))},getKeys:function(){return p((function(e,t){return e.getAllKeys(t)}),(function(e){return JSON.parse(e)}))}};var d=function(){function e(){var e=this;this._invokeId=0,this._callDict={},this.ctx=new i.ClientRequestContext,this._perkvstorService=y.newObject(this.ctx),this._eventResult=this._perkvstorService.onPersistentStorageMessage.add((function(t){i.Utility.log("persistentKvStoragegMessageHandler:"+JSON.stringify(t));var n=e._callDict[t.invokeId];n&&(n(t.message,t.error),delete e._callDict[t.invokeId])}))}return e.getInstance=function(){return void 0===e.instance?e.instance=new e:e.instance._perkvstorService=y.newObject(e.instance.ctx),e.instance},e.prototype.getPersistentKvStorageService=function(){return this._perkvstorService},e.prototype.getCallBack=function(e){return this._callDict[e]},e.prototype.setCallBack=function(e){var t=this._invokeId;return this._callDict[this._invokeId++]=e,t},e}(),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"PersistentKvStorageService"},enumerable:!1,configurable:!0}),t.prototype.clear=function(e){u(this,"Clear",1,[e],4,0)},t.prototype.getAllKeys=function(e){u(this,"GetAllKeys",1,[e],4,0)},t.prototype.multiGet=function(e,t){u(this,"MultiGet",1,[e,t],4,0)},t.prototype.multiRemove=function(e,t){u(this,"MultiRemove",1,[e,t],4,0)},t.prototype.multiSet=function(e,t){u(this,"MultiSet",1,[e,t],4,0)},t.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),s(t)||l(this,t)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),f(this,t,n)},t.newObject=function(e){return c(t,e,"Microsoft.PersistentKvStorage.PersistentKvStorageService",!1,4)},Object.defineProperty(t.prototype,"onPersistentStorageMessage",{get:function(){return this.m_persistentStorageMessage||(this.m_persistentStorageMessage=new i.GenericEventHandlers(this.context,this,"PersistentStorageMessage",{eventType:65537,registerFunc:function(){},unregisterFunc:function(){},getTargetIdFunc:function(){return null},eventArgsTransformFunc:function(e){var t,n,r,o;try{var c=JSON.parse(e.message),u=parseInt(c.errorCode),s=0!=u?new i.Error((n=u,(r={})[16389]={code:"GenericException",message:"Unknown error."},r[65535]={code:"Unexcepted",message:"Catastrophic failure."},r[14]={code:"OutOfMemory",message:"Ran out of memory."},r[87]={code:"InvalidArg",message:"One or more arguments are invalid."},r[16385]={code:"NotImplemented",message:"Not implemented."},r[6]={code:"BadHandle",message:"File Handle is not Set."},r[5]={code:"AccessDenied",message:"Can't read the Storage File."},(o=r)[n]?o[n]:{code:"Unknown",message:"An unknown error has occured"})):null;t={invokeId:c.invokeId,message:c.message,error:s}}catch(e){t={invokeId:-1,message:e.message,error:new i.Error({code:"GenericException",message:"Unknown error"})}}return i.Utility._createPromiseFromResult(t)}})),this.m_persistentStorageMessage},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return a(this,{},{})},t}(i.ClientObject);t.PersistentKvStorageService=y,function(e){e.generalException="GeneralException"}(t.ErrorCodes||(t.ErrorCodes={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiGet=t.multiRemove=t.multiSet=t.getAllKeys=t.clear=t.removeItem=t.setItem=t.getItem=void 0;var r="_Office_AsyncStorage_";function o(){window.localStorage.setItem("_Office_AsyncStorage_|_unusedKey_",null),window.localStorage.removeItem("_Office_AsyncStorage_|_unusedKey_")}function i(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,r){try{o(),e(),t(null),n()}catch(e){t(e),r(e)}}))}function c(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,r){try{o();var i=e();t(null,i),n(i)}catch(e){t(e,null),r(e)}}))}function u(e,t,n){return void 0===n&&(n=function(){}),new Promise((function(r,i){var c=[];try{o()}catch(e){c.push(e)}e.forEach((function(e){try{t(e)}catch(e){c.push(e)}})),n(c),c.length>0?i(c):r()}))}t.getItem=function(e,t){return c((function(){return window.localStorage.getItem(r+e)}),t)},t.setItem=function(e,t,n){return i((function(){return window.localStorage.setItem(r+e,t)}),n)},t.removeItem=function(e,t){return i((function(){return window.localStorage.removeItem(r+e)}),t)},t.clear=function(e){return i((function(){Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).forEach((function(e){return window.localStorage.removeItem(e)}))}),e)},t.getAllKeys=function(e){return c((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).map((function(e){return e.substr(r.length)}))}),e)},t.multiSet=function(e,t){return u(e,(function(e){var t=e[0],n=e[1];return window.localStorage.setItem(r+t,n)}),t)},t.multiRemove=function(e,t){return u(e,(function(e){return window.localStorage.removeItem(r+e)}),t)},t.multiGet=function(e,t){return new Promise((function(n,o){t||(t=function(){});var i=[],c=e.map((function(e){try{return[e,window.localStorage.getItem(r+e)]}catch(e){i.push(e)}})).filter((function(e){return e}));i.length>0?(t(i,c),o(i)):(t(null,c),n(c))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storage=void 0;var r="_OfficeRuntime_Storage_";function o(){window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_",null),window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_")}function i(e){return new Promise((function(t,n){try{o(),e(),t()}catch(e){n(e)}}))}function c(e){return new Promise((function(t,n){try{o(),t(e())}catch(e){n(e)}}))}function u(e,t){return new Promise((function(n,r){var i=[];try{o()}catch(e){i.push(e)}for(var c in e)if(e.hasOwnProperty(c)||Array.isArray(e))try{Array.isArray(e)?t(e[c]):t(c)}catch(e){i.push(e)}i.length>0?r(new Error("Unknown error.")):n()}))}t.storage={getItem:function(e){return c((function(){return window.localStorage.getItem(r+e)}))},setItem:function(e,t){return i((function(){return window.localStorage.setItem(r+e,t)}))},removeItem:function(e){return i((function(){return window.localStorage.removeItem(r+e)}))},getItems:function(e){return new Promise((function(t,n){var i={},c=[];try{o()}catch(e){n(e)}e.forEach((function(e){try{var t=window.localStorage.getItem(r+e);i[e]=t||null}catch(e){c.push(e)}})),c.length>0?n(new Error("Unknown error.")):t(i)}))},setItems:function(e){return u(e,(function(t){return window.localStorage.setItem(r+t,e[t])}))},removeItems:function(e){return u(e,(function(e){window.localStorage.removeItem(r+e)}))},getKeys:function(){return c((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).map((function(e){return e.substr(r.length)}))}))}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function c(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,u)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!((o=(o=c.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex === 0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive = bucketPositive.sort(function (left, right) { + var diff = left.tabIndex - right.tabIndex; + if (diff === 0) { + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + return { + set_entropy: function OSF_OUtil$set_entropy(entropy) { + if (typeof entropy == "string") { + for (var i = 0; i < entropy.length; i += 4) { + var temp = 0; + for (var j = 0; j < 4 && i + j < entropy.length; j++) { + temp = (temp << 8) + entropy.charCodeAt(i + j); + } + _rndentropy ^= temp; + } + } + else if (typeof entropy == "number") { + _rndentropy ^= entropy; + } + else { + _rndentropy ^= 0x7fffffff * Math.random(); + } + _rndentropy &= 0x7fffffff; + }, + extend: function OSF_OUtil$extend(child, parent) { + var F = function () { }; + F.prototype = parent.prototype; + child.prototype = new F(); + child.prototype.constructor = child; + child.uber = parent.prototype; + if (parent.prototype.constructor === Object.prototype.constructor) { + parent.prototype.constructor = parent; + } + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name] = {}; + } + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { + if (parent && name && parent[name]) { + delete parent[name]; + } + }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret = {}; + for (var key in settingsCollection) { + var value = settingsCollection[key]; + try { + if (JSON) { + value = JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret = {}; + serializedSettings = serializedSettings || {}; + for (var key in serializedSettings) { + var value = serializedSettings[key]; + try { + if (JSON) { + value = JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if (!_loadedScriptEntry) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + var onLoadTimeOut = function OSF_OUtil_loadScript$onLoadTimeOut() { + if (window.navigator.userAgent.indexOf("Trident") > 0) { + onLoadError(null); + } + else { + onLoadError(new Event("Script load timed out")); + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError(errorEvent) { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(errorEvent); + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadTimeOut, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) { + if (url) { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link); + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { + var parsed = enumObject[str.trim()]; + if (typeof (parsed) == 'undefined') { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed; + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { + var obj = { calc: arguments[0] }; + return function () { + if (obj.calc) { + obj.val = obj.calc.apply(this, arguments); + delete obj.calc; + } + return obj.val; + }; + }, + getUniqueId: function OSF_OUtil$getUniqueId() { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString(); + }, + formatString: function OSF_OUtil$formatString() { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10) + 1; + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }, + generateConversationId: function OSF_OUtil$generateConversationId() { + return [_random(), _random(), (new Date()).getTime().toString()].join('_'); + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId(); + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { + return OSF.OUtil.addInfoAsHash(url, _xdmInfoKey, xdmInfoValue, false); + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) { + return OSF.OUtil.addInfoAsHash(url, _serializerVersionKey, serializerVersion, true); + }, + addFlightsAsHash: function OSF_OUtil$addFlightsAsHash(url, flights) { + return OSF.OUtil.addInfoAsHash(url, _flightsKey, flights, true); + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) { + url = url.trim() || ''; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if (encodeInfo) { + newFragment = [keyName, encodeURIComponent(infoValue), fragment].join(''); + } + else { + newFragment = [fragment, keyName, infoValue].join(''); + } + return [urlWithoutFragment, _fragmentSeparator, newFragment].join(''); + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.HostInfo); + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.XdmInfo); + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.SerializerVersion)); + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseFlights: function OSF_OUtil$parseFlights(skipSessionStorage) { + var flights = OSF.OUtil.parseFlightsWithGivenFragment(skipSessionStorage, window.location.hash); + if (flights.length == 0) { + flights = OSF.OUtil.parseFlightsFromWindowName(skipSessionStorage, window.name); + } + return flights; + }, + checkFlight: function OSF_OUtil$checkFlightEnabled(flight) { + return OSF.Flights && OSF.Flights.indexOf(flight) >= 0; + }, + pushFlight: function OSF_OUtil$pushFlight(flight) { + if (OSF.Flights.indexOf(flight) < 0) { + OSF.Flights.push(flight); + return true; + } + return false; + }, + getBooleanSetting: function OSF_OUtil$getSetting(settingName) { + return OSF.OUtil.getBooleanFromDictionary(OSF.Settings, settingName); + }, + getBooleanFromDictionary: function OSF_OUtil$getBooleanFromDictionary(settings, settingName) { + var result = (settings && settingName && settings[settingName] !== undefined && settings[settingName] && + ((typeof (settings[settingName]) === "string" && settings[settingName].toUpperCase() === 'TRUE') || + (typeof (settings[settingName]) === "boolean" && settings[settingName]))); + return result !== undefined ? result : false; + }, + getIntFromDictionary: function OSF_OUtil$getIntFromDictionary(settings, settingName) { + if (settings && settingName && settings[settingName] !== undefined && (typeof settings[settingName] === "string")) { + return parseInt(settings[settingName]); + } + else { + return NaN; + } + }, + pushIntFlight: function OSF_OUtil$pushIntFlight(flight, flightValue) { + if (!(flight in OSF.IntFlights)) { + OSF.IntFlights[flight] = flightValue; + return true; + } + return false; + }, + getIntFlight: function OSF_OUtil$getIntFlight(flight) { + if (OSF.IntFlights && (flight in OSF.IntFlights)) { + return OSF.IntFlights[flight]; + } + else { + return NaN; + } + }, + parseFlightsFromWindowName: function OSF_OUtil$parseFlightsFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.Flights)); + }, + parseFlightsWithGivenFragment: function OSF_OUtil$parseFlightsWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(_flightsKey, _flightsKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseArrayWithDefault: function OSF_OUtil$parseArrayWithDefault(jsonString) { + var array = []; + try { + array = JSON.parse(jsonString); + } + catch (ex) { } + if (!Array.isArray(array)) { + array = []; + } + return array; + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj != null) { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue != null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >= 0) { + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue = decodeURIComponent(infoValue); + } + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd = window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd == -1) { + sessionKeyEnd = window.name.length; + } + var sessionKey = window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString = window.location.search; + var conversationId = null; + if (searchString) { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1) === '=') { + conversationId = conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId = decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) { + var items = strInfo.split("$"); + if (typeof items[1] == "undefined") { + items = strInfo.split("|"); + } + if (typeof items[1] == "undefined") { + items = strInfo.split("%7C"); + } + return items; + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue = ''; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if (items != undefined && items.length >= 3) { + switch (xdmFieldName) { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break; + } + } + } + return fieldValue; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e = Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) + throw e; + for (var p in expectedProperties) { + e = Function._validateParameter(params[p], expectedProperties[p], p); + if (e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) { + if (typeof (OsfMsAjaxFactory) !== 'undefined' && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) { + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor = descriptor || {}; + for (var nd in attributes) { + var attribute = attributes[nd]; + if (descriptor[attribute] == undefined) { + descriptor[attribute] = true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors = descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for (var i = 0; i < propsLength; i++) { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable = descriptor.writable || false; + } + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret = []; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key == item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value == list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add = list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key] = value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2] = newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj) === "[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj) === "[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj) === "[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.attachEvent) { + element.attachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.detachEvent) { + element.detachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = null; + } + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) { + var xmlhttp; + try { + xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function () { + if (xmlhttp.readyState == 4) { + if (xmlhttp.status == 200) { + onSuccess(xmlhttp.responseText); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + if (!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, c2, c3, a, b, c; + var i; + var length = input.length; + do { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + if (!isNaN(c2)) { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + } + if (isNaN(c2)) { + temp[i - 1] = 64; + } + else if (isNaN(c3)) { + temp[i - 2] = 64; + temp[i - 1] = 64; + } + for (var t = 0; t < i; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getSessionStorage: function OSF_Outil$getSessionStorage() { + return _getSessionStorage(); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage = window.localStorage; + } + catch (ex) { + localStorage = null; + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage); + } + return _safeLocalStorage; + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) { + var hex = "#" + (Number(val) + 0x1000000).toString(16).slice(-6); + return hex; + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) { + element.onclick = function (e) { + handler(); + }; + element.ontouchend = function (e) { + handler(); + e.preventDefault(); + }; + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) { + var e = Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: false }, + { name: "paramName", type: String, mayBeNull: false } + ]); + if (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return ""; + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)", "i"); + if (!queryExp.test(queryString)) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return ""; + } + return queryExp.exec(queryString)[1]; + }, + getHostnamePortionForLogging: function OSF_Outil$getHostnamePortionForLogging(hostname) { + var e = Function._validateParams(arguments, [{ name: "hostname", type: String, mayBeNull: false } + ]); + if (e) { + return ""; + } + var hostnameSubstrings = hostname.split('.'); + var len = hostnameSubstrings.length; + if (len >= 2) { + return hostnameSubstrings[len - 2] + "." + hostnameSubstrings[len - 1]; + } + else if (len == 1) { + return hostnameSubstrings[0]; + } + }, + isiOS: function OSF_Outil$isiOS() { + return (window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false); + }, + isChrome: function OSF_Outil$isChrome() { + return (window.navigator.userAgent.indexOf("Chrome") > 0) && !OSF.OUtil.isEdge(); + }, + isEdge: function OSF_Outil$isEdge() { + return window.navigator.userAgent.indexOf("Edge") > 0; + }, + isIE: function OSF_Outil$isIE() { + return window.navigator.userAgent.indexOf("Trident") > 0; + }, + isFirefox: function OSF_Outil$isFirefox() { + return window.navigator.userAgent.indexOf("Firefox") > 0; + }, + startsWith: function OSF_Outil$startsWith(originalString, patternToCheck, browserIsIE) { + if (browserIsIE) { + return originalString.substr(0, patternToCheck.length) === patternToCheck; + } + else { + return originalString.startsWith(patternToCheck); + } + }, + containsPort: function OSF_Outil$containsPort(url, protocol, hostname, portNumber) { + return this.startsWith(url, protocol + "//" + hostname + ":" + portNumber, true) || this.startsWith(url, hostname + ":" + portNumber, true); + }, + getRedundandPortString: function OSF_Outil$getRedundandPortString(url, parser) { + if (!url || !parser) + return ""; + if (parser.protocol == "https:" && this.containsPort(url, "https:", parser.hostname, "443")) + return ":443"; + else if (parser.protocol == "http:" && this.containsPort(url, "http:", parser.hostname, "80")) + return ":80"; + return ""; + }, + removeChar: function OSF_Outil$removeChar(url, indexOfCharToRemove) { + if (indexOfCharToRemove < url.length - 1) + return url.substring(0, indexOfCharToRemove) + url.substring(indexOfCharToRemove + 1); + else if (indexOfCharToRemove == url.length - 1) + return url.substring(0, url.length - 1); + else + return url; + }, + cleanUrlOfChar: function OSF_Outil$cleanUrlOfChar(url, charToClean) { + var i; + for (i = 0; i < url.length; i++) { + if (url.charAt(i) === charToClean) { + if (i + 1 >= url.length) { + return this.removeChar(url, i); + } + else if (charToClean === '/') { + if (url.charAt(i + 1) === '?' || url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + else if (charToClean === '?') { + if (url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + } + } + return url; + }, + cleanUrl: function OSF_Outil$cleanUrl(url) { + url = this.cleanUrlOfChar(url, '/'); + url = this.cleanUrlOfChar(url, '?'); + url = this.cleanUrlOfChar(url, '#'); + if (url.substr(0, 8) == "https://") { + var portIndex = url.indexOf(":443"); + if (portIndex != -1) { + if (portIndex == url.length - 4 || url.charAt(portIndex + 4) == "/" || url.charAt(portIndex + 4) == "?" || url.charAt(portIndex + 4) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 4); + } + } + } + else if (url.substr(0, 7) == "http://") { + var portIndex = url.indexOf(":80"); + if (portIndex != -1) { + if (portIndex == url.length - 3 || url.charAt(portIndex + 3) == "/" || url.charAt(portIndex + 3) == "?" || url.charAt(portIndex + 3) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 3); + } + } + } + return url; + }, + parseUrl: function OSF_Outil$parseUrl(url, enforceHttps) { + if (enforceHttps === void 0) { + enforceHttps = false; + } + if (typeof url === "undefined" || !url) { + return undefined; + } + var notHttpsErrorMessage = "NotHttps"; + var invalidUrlErrorMessage = "InvalidUrl"; + var isIEBoolean = this.isIE(); + var parsedUrlObj = { + protocol: undefined, + hostname: undefined, + host: undefined, + port: undefined, + pathname: undefined, + search: undefined, + hash: undefined, + isPortPartOfUrl: undefined + }; + try { + if (isIEBoolean) { + var parser = document.createElement("a"); + parser.href = url; + if (!parser || !parser.protocol || !parser.host || !parser.hostname || !parser.href + || this.cleanUrl(parser.href).toLowerCase() !== this.cleanUrl(url).toLowerCase()) { + throw invalidUrlErrorMessage; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && parser.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + var redundandPortString = this.getRedundandPortString(url, parser); + parsedUrlObj.protocol = parser.protocol; + parsedUrlObj.hostname = parser.hostname; + parsedUrlObj.port = (redundandPortString == "") ? parser.port : ""; + parsedUrlObj.host = (redundandPortString != "") ? parser.hostname : parser.host; + parsedUrlObj.pathname = (isIEBoolean ? "/" : "") + parser.pathname; + parsedUrlObj.search = parser.search; + parsedUrlObj.hash = parser.hash; + parsedUrlObj.isPortPartOfUrl = this.containsPort(url, parser.protocol, parser.hostname, parser.port); + } + else { + var urlObj = new URL(url); + if (urlObj && urlObj.protocol && urlObj.host && urlObj.hostname) { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && urlObj.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + parsedUrlObj.protocol = urlObj.protocol; + parsedUrlObj.hostname = urlObj.hostname; + parsedUrlObj.port = urlObj.port; + parsedUrlObj.host = urlObj.host; + parsedUrlObj.pathname = urlObj.pathname; + parsedUrlObj.search = urlObj.search; + parsedUrlObj.hash = urlObj.hash; + parsedUrlObj.isPortPartOfUrl = urlObj.host.lastIndexOf(":" + urlObj.port) == (urlObj.host.length - urlObj.port.length - 1); + } + } + } + catch (err) { + if (err.message === notHttpsErrorMessage) + throw err; + } + return parsedUrlObj; + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) { + if (sourceObj == null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr = []; + for (var i = 0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj = sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property] = sourceObj[property]; + } + } + return copyObj; + } + }, + createObject: function OSF_Outil$createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + }, + addClass: function OSF_OUtil$addClass(elmt, val) { + if (!OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + if (className) { + elmt.setAttribute(_classN, className + " " + val); + } + else { + elmt.setAttribute(_classN, val); + } + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) { + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findNextPos = function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && backward) { + return -1; + } + else if (currPos === allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if (all.length === 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, backward); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findCurrPos = function (all, curr) { + var i = 0; + for (; i < all.length; i++) { + if (all[i] === curr) { + return i; + } + } + return -1; + }; + var findNextPos = function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && shift) { + return -1; + } + else if (currPos === allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all, curr); + next = findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, shift); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + isNullOrUndefined: function OSF_OUtil$isNullOrUndefined(value) { + if (typeof (value) === "undefined") { + return true; + } + if (value === null) { + return true; + } + return false; + }, + stringEndsWith: function OSF_OUtil$stringEndsWith(value, subString) { + if (!OSF.OUtil.isNullOrUndefined(value) && !OSF.OUtil.isNullOrUndefined(subString)) { + if (subString.length > value.length) { + return false; + } + if (value.substr(value.length - subString.length) === subString) { + return true; + } + } + return false; + }, + hashCode: function OSF_OUtil$hashCode(str) { + var hash = 0; + if (!OSF.OUtil.isNullOrUndefined(str)) { + var i = 0; + var len = str.length; + while (i < len) { + hash = (hash << 5) - hash + str.charCodeAt(i++) | 0; + } + } + return hash; + }, + getValue: function OSF_OUtil$getValue(value, defaultValue) { + if (OSF.OUtil.isNullOrUndefined(value)) { + return defaultValue; + } + return value; + }, + externalNativeFunctionExists: function OSF_OUtil$externalNativeFunctionExists(type) { + return type === 'unknown' || type !== 'undefined'; + } + }; +})(); +OSF.OUtil.Guid = (function () { + var hexCode = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result = ""; + var tick = (new Date()).getTime(); + var index = 0; + for (; index < 32 && tick > 0; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + }; +})(); +try { + (function () { + OSF.Flights = OSF.OUtil.parseFlights(true); + })(); +} +catch (ex) { } +window.OSF = OSF; +OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614, + Visio: 8388615, + OneNoteAndroid: 4194305 +}; +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +}; +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +}; +OSF.AgaveHostAction = { + "Select": 0, + "UnSelect": 1, + "CancelDialog": 2, + "InsertAgave": 3, + "CtrlF6In": 4, + "CtrlF6Exit": 5, + "CtrlF6ExitShift": 6, + "SelectWithError": 7, + "NotifyHostError": 8, + "RefreshAddinCommands": 9, + "PageIsReady": 10, + "TabIn": 11, + "TabInShift": 12, + "TabExit": 13, + "TabExitShift": 14, + "EscExit": 15, + "F2Exit": 16, + "ExitNoFocusable": 17, + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20, + "UpdateTargetUrl": 21, + "InstallCustomFunctions": 22, + "SendTelemetryEvent": 23, + "UninstallCustomFunctions": 24, + "SendMessage": 25, + "LaunchExtensionComponent": 26, + "StopExtensionComponent": 27, + "RestartExtensionComponent": 28, + "EnableTaskPaneHeaderButton": 29, + "DisableTaskPaneHeaderButton": 30, + "TaskPaneHeaderButtonClicked": 31, + "RemoveAppCommandsAddin": 32, + "RefreshRibbonGallery": 33, + "GetOriginalControlId": 34, + "OfficeJsReady": 35, + "InsertDevManifest": 36, + "InsertDevManifestError": 37, + "SendCustomerContent": 38, + "KeyboardShortcuts": 39 +}; +OSF.SharedConstants = { + "NotificationConversationIdSuffix": '_ntf' +}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix, featureGates, officeTheme, initialDisplayMode) { + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this._featureGates = featureGates; + this._officeTheme = officeTheme; + this._initialDisplayMode = initialDisplayMode; + this.get_id = function get_id() { return this._id; }; + this.get_appName = function get_appName() { return this._appName; }; + this.get_appVersion = function get_appVersion() { return this._appVersion; }; + this.get_appUILocale = function get_appUILocale() { return this._appUILocale; }; + this.get_dataLocale = function get_dataLocale() { return this._dataLocale; }; + this.get_docUrl = function get_docUrl() { return this._docUrl; }; + this.get_clientMode = function get_clientMode() { return this._clientMode; }; + this.get_bindings = function get_bindings() { return this._bindings; }; + this.get_settings = function get_settings() { return this._settings; }; + this.get_reason = function get_reason() { return this._reason; }; + this.get_osfControlType = function get_osfControlType() { return this._osfControlType; }; + this.get_eToken = function get_eToken() { return this._eToken; }; + this.get_correlationId = function get_correlationId() { return this._correlationId; }; + this.get_appInstanceId = function get_appInstanceId() { return this._appInstanceId; }; + this.get_touchEnabled = function get_touchEnabled() { return this._touchEnabled; }; + this.get_commerceAllowed = function get_commerceAllowed() { return this._commerceAllowed; }; + this.get_appMinorVersion = function get_appMinorVersion() { return this._appMinorVersion; }; + this.get_requirementMatrix = function get_requirementMatrix() { return this._requirementMatrix; }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() { return this._dialogRequirementMatrix; }; + this.get_hostCustomMessage = function get_hostCustomMessage() { return this._hostCustomMessage; }; + this.get_hostFullVersion = function get_hostFullVersion() { return this._hostFullVersion; }; + this.get_isDialog = function get_isDialog() { return this._isDialog; }; + this.get_clientWindowHeight = function get_clientWindowHeight() { return this._clientWindowHeight; }; + this.get_clientWindowWidth = function get_clientWindowWidth() { return this._clientWindowWidth; }; + this.get_addinName = function get_addinName() { return this._addinName; }; + this.get_appDomains = function get_appDomains() { return this._appDomains; }; + this.get_featureGates = function get_featureGates() { return this._featureGates; }; + this.get_officeTheme = function get_officeTheme() { return this._officeTheme; }; + this.get_initialDisplayMode = function get_initialDisplayMode() { return this._initialDisplayMode ? this._initialDisplayMode : 0; }; +}; +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 +}; +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 +}; +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Client", Microsoft.Office); +OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened", + ControlActivation: "controlActivation" +}; +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType = { + All: "all" +}; +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + JsonData: "jsonData", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + AllowConsentPrompt: "allowConsentPrompt", + ForMSGraphAccess: "forMSGraphAccess", + AllowSignInPrompt: "allowSignInPrompt", + JsonPayload: "jsonPayload", + EnableNewHosts: "enableNewHosts", + AccountTypeFilter: "accountTypeFilter", + AddinTrustId: "addinTrustId", + Reserved: "reserved", + Tcid: "tcid", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + PromptBeforeOpen: "promptBeforeOpen", + EnforceAppDomain: "enforceAppDomain", + UrlNoHostInfo: "urlNoHostInfo", + TargetOrigin: "targetOrigin", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64", + FormId: "formId" +}; +OSF.OUtil.setNamespace("DDA", OSF); +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 +}; +OSF.DDA.PropertyDescriptors = { + AsyncResultStatus: "AsyncResultStatus" +}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { + if (eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || + eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) { + return id + "_" + eventType; + } + else { + return eventType; + } +}; +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidGetAuthContextMethod: 99, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, + dispidInsertFormMethod: 106, + dispidDisplayRibbonCalloutAsyncMethod: 109, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidExecuteFeature: 146, + dispidQueryFeature: 147, + dispidGetNestedAppAuthContextMethod: 205, + dispidMethodMax: 205 +}; +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidOlkRecurrenceChangedEvent: 49, + dispidOlkAttachmentsChangedEvent: 50, + dispidOlkEnhancedLocationsChangedEvent: 51, + dispidOlkInfobarClickedEvent: 52, + dispidOlkSelectedItemsChangedEvent: 53, + dispidOlkSensitivityLabelChangedEvent: 54, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 +}; +OSF.DDA.ErrorCodeManager = (function () { + var _errorMappings = {}; + return { + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) { + var errorArgs = _errorMappings[errorCode]; + if (!errorArgs) { + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + } + else { + if (!errorArgs.name) { + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + } + if (!errorArgs.message) { + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message; + } + } + return errorArgs; + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) { + _errorMappings[errorCode] = errorNameMessage; + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1000, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2000, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3000, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4000, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5000, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeOperationCancelled: 5014, + ooeWorkbookHidden: 5015, + ooeWriteNotSupportedWhenModalDialogOpen: 5016, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeRequestPayloadSizeLimitExceeded: 5103, + ooeResponsePayloadSizeLimitExceeded: 5104, + ooeCustomXmlNodeNotFound: 6000, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7000, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8000, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11000, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12000, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeModalDialogOpen: 12012, + ooeDocumentIsInactive: 12013, + ooeDialogParentIsMinimized: 12014, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010, + ooeResourceNotAllowed: 13011, + ooeSSOUnsupportedPlatform: 13012, + ooeSSOCallThrottled: 13013, + ooeAccessDenied: 13990, + ooeGeneralException: 13991 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidReadForBlankRow }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnMatrixData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { name: stringNS.L_InvalidBinding, message: stringNS.L_InvalidColumnsForBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { name: stringNS.L_SaveSettingsError, message: stringNS.L_SettingsCannotSave }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { name: stringNS.L_SettingsStaleError, message: stringNS.L_SettingsAreStale }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { name: stringNS.L_HostError, message: stringNS.L_OperationNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { name: stringNS.L_InternalError, message: stringNS.L_InternalErrorDescription }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { name: stringNS.L_PermissionDenied, message: stringNS.L_DocumentReadOnly }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { name: stringNS.L_EventRegistrationError, message: stringNS.L_EventHandlerNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { name: stringNS.L_InvalidAPICall, message: stringNS.L_InvalidApiCallInContext }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { name: stringNS.L_ShuttingDown, message: stringNS.L_ShuttingDown }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { name: stringNS.L_UnsupportedEnumeration, message: stringNS.L_UnsupportedEnumerationMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden] = { name: stringNS.L_APICallFailed, message: stringNS.L_WorkbookHiddenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen] = { name: stringNS.L_APICallFailed, message: stringNS.L_WriteNotSupportedWhenModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestPayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_ResponsePayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { name: stringNS.L_CustomXmlOutOfDateName, message: stringNS.L_CustomXmlOutOfDateMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { name: stringNS.L_CannotNavigateTo, message: stringNS.L_CannotNavigateTo }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { name: stringNS.L_SpecifiedIdNotExist, message: stringNS.L_SpecifiedIdNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { name: stringNS.L_NavOutOfBound, message: stringNS.L_NavOutOfBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { name: stringNS.L_DataWriteReminder, message: stringNS.L_CellDataAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { name: stringNS.L_MissingParameter, message: stringNS.L_ElementMissing }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidCellsValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidTableOptionValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidFormatValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_RowIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_ColIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_FormatValueOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { name: stringNS.L_FormattingReminder, message: stringNS.L_CellFormatAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { name: stringNS.L_MemoryLimit, message: stringNS.L_CloseFileBeforeRetrieve }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { name: stringNS.L_NetworkProblem, message: stringNS.L_NetworkProblemRetrieveFile }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { name: stringNS.L_InvalidValue, message: stringNS.L_SliceSizeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAlreadyOpened }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NetworkProblem }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { name: stringNS.L_DialogNavigateError, message: stringNS.L_DialogInvalidScheme }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAddressNotTrusted }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_ModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DocumentIsInactive }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogParentIsMinimized }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform] = { name: stringNS.L_APINotSupported, message: stringNS.L_SSOUnsupportedPlatform }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled] = { name: stringNS.L_OperationCancelledError, message: stringNS.L_OperationCancelledErrorMessage }; + } + }; +})(); +(function (OfficeExt) { + var Requirement; + (function (Requirement) { + var RequirementVersion = (function () { + function RequirementVersion() { + } + return RequirementVersion; + }()); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = (function () { + function RequirementMatrix(_setMap) { + this.isSetSupported = function _isSetSupported(name, minVersion) { + if (name == undefined) { + return false; + } + if (minVersion == undefined) { + minVersion = 0; + } + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if (sets.hasOwnProperty(name.toLowerCase())) { + var setMaxVersion = sets[name.toLowerCase()]; + try { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.major > 0 && + setMaxVersionNum.minor >= 0 && + setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor >= minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion = function (version) { + version = version + ""; + var temp = version.split("."); + var major = 0; + var minor = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } + } + var result = { "minor": minor, "major": major }; + return result; + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this); + } + return RequirementMatrix; + }()); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = (function () { + function DefaultSetRequirement(setMap) { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) { + for (var name in addedSet) { + this._sets[name] = addedSet[name]; + } + }; + this._sets = setMap; + } + return DefaultSetRequirement; + }()); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultRequiredDialogSetRequirement = (function (_super) { + __extends(DefaultRequiredDialogSetRequirement, _super); + function DefaultRequiredDialogSetRequirement() { + return _super.call(this, { + "dialogapi": 1.1 + }) || this; + } + return DefaultRequiredDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultRequiredDialogSetRequirement = DefaultRequiredDialogSetRequirement; + var DefaultOptionalDialogSetRequirement = (function (_super) { + __extends(DefaultOptionalDialogSetRequirement, _super); + function DefaultOptionalDialogSetRequirement() { + return _super.call(this, { + "dialogorigin": 1.1 + }) || this; + } + return DefaultOptionalDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultOptionalDialogSetRequirement = DefaultOptionalDialogSetRequirement; + var ExcelClientDefaultSetRequirement = (function (_super) { + __extends(ExcelClientDefaultSetRequirement, _super); + function ExcelClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "excelapi": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = (function (_super) { + __extends(ExcelClientV1DefaultSetRequirement, _super); + function ExcelClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return ExcelClientV1DefaultSetRequirement; + }(ExcelClientDefaultSetRequirement)); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = (function (_super) { + __extends(OutlookClientDefaultSetRequirement, _super); + function OutlookClientDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = (function (_super) { + __extends(WordClientDefaultSetRequirement, _super); + function WordClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1, + "wordapi": 1.1 + }) || this; + } + return WordClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = (function (_super) { + __extends(WordClientV1DefaultSetRequirement, _super); + function WordClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2, + "imagecoercion": 1.1 + }); + return _this; + } + return WordClientV1DefaultSetRequirement; + }(WordClientDefaultSetRequirement)); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = (function (_super) { + __extends(PowerpointClientDefaultSetRequirement, _super); + function PowerpointClientDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = (function (_super) { + __extends(PowerpointClientV1DefaultSetRequirement, _super); + function PowerpointClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return PowerpointClientV1DefaultSetRequirement; + }(PowerpointClientDefaultSetRequirement)); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = (function (_super) { + __extends(ProjectClientDefaultSetRequirement, _super); + function ProjectClientDefaultSetRequirement() { + return _super.call(this, { + "selection": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ProjectClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = (function (_super) { + __extends(ExcelWebDefaultSetRequirement, _super); + function ExcelWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "file": 1.1 + }) || this; + } + return ExcelWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = (function (_super) { + __extends(WordWebDefaultSetRequirement, _super); + function WordWebDefaultSetRequirement() { + return _super.call(this, { + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "imagecoercion": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablecoercion": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = (function (_super) { + __extends(PowerpointWebDefaultSetRequirement, _super); + function PowerpointWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "settings": 1.1 + }) || this; + } + return PowerpointWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = (function (_super) { + __extends(OutlookWebDefaultSetRequirement, _super); + function OutlookWebDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = (function (_super) { + __extends(SwayWebDefaultSetRequirement, _super); + function SwayWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "documentevents": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return SwayWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = (function (_super) { + __extends(AccessWebDefaultSetRequirement, _super); + function AccessWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "partialtablebindings": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1 + }) || this; + } + return AccessWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = (function (_super) { + __extends(ExcelIOSDefaultSetRequirement, _super); + function ExcelIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = (function (_super) { + __extends(WordIOSDefaultSetRequirement, _super); + function WordIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = (function (_super) { + __extends(WordIOSV1DefaultSetRequirement, _super); + function WordIOSV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2 + }); + return _this; + } + return WordIOSV1DefaultSetRequirement; + }(WordIOSDefaultSetRequirement)); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = (function (_super) { + __extends(PowerpointIOSDefaultSetRequirement, _super); + function PowerpointIOSDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = (function (_super) { + __extends(OutlookIOSDefaultSetRequirement, _super); + function OutlookIOSDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.1 + }) || this; + } + return OutlookIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = (function () { + function RequirementsMatrixFactory() { + } + RequirementsMatrixFactory.initializeOsfDda = function () { + OSF.OUtil.setNamespace("Requirement", OSF.DDA); + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function (appContext) { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if (RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) { + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + } + else { + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})); + } + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function (appContext) { + var setRequirements = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + setRequirements = new DefaultSetRequirement(matrixItem); + } + else { + setRequirements = new DefaultRequiredDialogSetRequirement(); + var mainRequirement = appContext.get_requirementMatrix(); + if (mainRequirement != undefined && mainRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(mainRequirement.toLowerCase()); + for (var name in setRequirements._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + var dialogOptionalSetRequirement = new DefaultOptionalDialogSetRequirement(); + for (var name in dialogOptionalSetRequirement._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + } + } + return new RequirementMatrix(setRequirements); + }; + RequirementsMatrixFactory.getClientFullVersionString = function (appContext) { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || + appName == 4096 || + appName == 8192 || + appName == 65536; + if (isIOSClient && appContext.get_appVersion() == 1) { + if (appName == 4096 && appMinorVersion >= 15) { + appFullVersion = "16.00.01"; + } + else { + appFullVersion = "16.00"; + } + } + else if (appContext.get_appName() == 64) { + appFullVersion = appContext.get_appVersion(); + } + else { + if (appMinorVersion < 10) { + appMinorVersionString = "0" + appMinorVersion; + } + else { + appMinorVersionString = "" + appMinorVersion; + } + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString; + } + return appContext.get_appName() + "-" + appFullVersion; + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function () { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement(); + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory; + }()); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory; + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})); +})(OfficeExt || (OfficeExt = {})); +OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" +}; +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" +}; +OSF.NamespaceManager = (function OSF_NamespaceManager() { + var _userOffice; + var _useShortcut = false; + return { + enableShortcut: function OSF_NamespaceManager$enableShortcut() { + if (!_useShortcut) { + if (window.Office) { + _userOffice = window.Office; + } + else { + OSF.OUtil.setNamespace("Office", window); + } + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true; + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() { + if (_useShortcut) { + if (_userOffice) { + window.Office = _userOffice; + } + else { + OSF.OUtil.unsetNamespace("Office", window); + } + _useShortcut = false; + } + } + }; +})(); +OSF.NamespaceManager.enableShortcut(); +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { + if (useShortcut) { + OSF.NamespaceManager.enableShortcut(); + } + else { + OSF.NamespaceManager.disableShortcut(); + } +}; +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { + var promise; + if (str && typeof str == "string") { + var index = str.indexOf("#"); + if (index != -1) { + var op = str.substring(0, index); + var target = str.substring(index + 1); + switch (op) { + case "binding": + case "bindings": + if (target) { + promise = new OSF.DDA.BindingPromise(target); + } + break; + } + } + } + if (!promise) { + if (errorCallback) { + var callbackType = typeof errorCallback; + if (callbackType == "function") { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext, OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)); + } + else { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, callbackType); + } + } + } + else { + promise.onFail = errorCallback; + return promise; + } +}; +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { + OSF.OUtil.defineEnumerableProperties(this, { + "contentLanguage": { + value: officeAppContext.get_dataLocale() + }, + "displayLanguage": { + value: officeAppContext.get_appUILocale() + }, + "touchEnabled": { + value: officeAppContext.get_touchEnabled() + }, + "commerceAllowed": { + value: officeAppContext.get_commerceAllowed() + }, + "host": { + value: OfficeExt.HostName.Host.getInstance().getHost() + }, + "platform": { + value: OfficeExt.HostName.Host.getInstance().getPlatform() + }, + "isDialog": { + value: OSF._OfficeAppFactory.getHostInfo().isDialog + }, + "diagnostics": { + value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion()) + } + }); + if (license) { + OSF.OUtil.defineEnumerableProperty(this, "license", { + value: license + }); + } + if (officeAppContext.ui) { + OSF.OUtil.defineEnumerableProperty(this, "ui", { + value: officeAppContext.ui + }); + } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.webAuth) { + OSF.OUtil.defineEnumerableProperty(this, "webAuth", { + value: officeAppContext.webAuth + }); + } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } + if (officeAppContext.extensionLifeCycle) { + OSF.OUtil.defineEnumerableProperty(this, "extensionLifeCycle", { + value: officeAppContext.extensionLifeCycle + }); + } + if (officeAppContext.messaging) { + OSF.OUtil.defineEnumerableProperty(this, "messaging", { + value: officeAppContext.messaging + }); + } + if (officeAppContext.ui && officeAppContext.ui.taskPaneAction) { + OSF.OUtil.defineEnumerableProperty(this, "taskPaneAction", { + value: officeAppContext.ui.taskPaneAction + }); + } + if (officeAppContext.ui && officeAppContext.ui.ribbonGallery) { + OSF.OUtil.defineEnumerableProperty(this, "ribbonGallery", { + value: officeAppContext.ui.ribbonGallery + }); + } + if (officeAppContext.get_isDialog()) { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } + else { + if (document) { + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: document + }); + } + if (appOM) { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this, displayName, { + value: appOM + }); + } + if (officeAppContext.get_officeTheme()) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return officeAppContext.get_officeTheme(); + } + }); + } + else if (getOfficeTheme) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return getOfficeTheme(); + } + }); + } + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + if (officeAppContext.get_featureGates) { + var featureGates = officeAppContext.get_featureGates(); + if (featureGates && featureGates["EnablePublicThemeManager"]) { + var themeManager = new OSF.DDA.Theming.InternalThemeHandler(); + themeManager.InitializeThemeManager(); + OSF.OUtil.defineEnumerableProperty(this, "themeManager", { + value: themeManager + }); + } + } + } +}; +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { + OSF.DDA.OutlookContext.uber.constructor.call(this, appContext, null, license, appOM, getOfficeTheme); + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "roamingSettings", { + value: settings + }); + } + if (appContext.sensitivityLabelsCatalog) { + OSF.OUtil.defineEnumerableProperty(this, "sensitivityLabelsCatalog", { + value: appContext.sensitivityLabelsCatalog() + }); + } +}; +OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { + var mode; + switch (officeAppContext.get_clientMode()) { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break; + } + ; + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "settings", { + value: settings + }); + } + ; + OSF.OUtil.defineMutableProperties(this, { + "mode": { + value: mode + }, + "url": { + value: officeAppContext.get_docUrl() + } + }); +}; +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { + OSF.DDA.JsomDocument.uber.constructor.call(this, officeAppContext, settings); + if (bindingFacade) { + OSF.OUtil.defineEnumerableProperty(this, "bindings", { + get: function OSF_DDA_Document$GetBindings() { return bindingFacade; } + }); + } + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetSelectedDataAsync, + am.SetSelectedDataAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])); +}; +OSF.OUtil.extend(OSF.DDA.JsomDocument, OSF.DDA.Document); +OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension, "context", { + get: function Microsoft_Office_WebExtension$GetContext() { + var context; + if (OSF && OSF._OfficeAppFactory) { + context = OSF._OfficeAppFactory.getContext(); + } + return context; + } +}); +OSF.DDA.License = function OSF_DDA_License(eToken) { + OSF.OUtil.defineEnumerableProperty(this, "value", { + value: eToken + }); +}; +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function () { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, displayName); + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) { + for (var name in params) { + var param = params[name]; + var arg = args[name]; + if (param["enum"]) { + switch (typeof arg) { + case "string": + if (OSF.OUtil.listContainsValue(param["enum"], arg)) { + break; + } + case "undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + } + if (param["types"]) { + if (!OSF.OUtil.listContainsValue(param["types"], typeof arg)) { + throw getInvalidParameterString(); + } + } + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) { + if (userArgs.length < requiredCount) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + } + var requiredArgs = []; + var index; + for (index = 0; index < requiredCount; index++) { + requiredArgs.push(userArgs[index]); + } + this.verifyArguments(requiredParameters, requiredArgs); + var ret = {}; + for (index = 0; index < requiredCount; index++) { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if (param.verify) { + var isValid = param.verify(arg, caller, stateInfo); + if (!isValid) { + throw getInvalidParameterString(); + } + } + ret[param.name] = arg; + } + return ret; + }, + this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) { + options = options || {}; + for (var optionName in supportedOptions) { + if (!OSF.OUtil.listContainsKey(options, optionName)) { + var value = undefined; + var option = supportedOptions[optionName]; + if (option.calculate && requiredArgs) { + value = option.calculate(requiredArgs, caller, stateInfo); + } + if (!value && option.defaultValue !== undefined) { + value = option.defaultValue; + } + options[optionName] = value; + } + } + return options; + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) { + var callArgs = {}; + for (var r in required) { + callArgs[r] = required[r]; + } + for (var o in options) { + callArgs[o] = options[o]; + } + for (var s in privateStateCallbacks) { + callArgs[s] = privateStateCallbacks[s](caller, stateInfo); + } + if (checkCallArgs) { + callArgs = checkCallArgs(callArgs, caller, stateInfo); + } + return callArgs; + }; +}; +OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" +}; +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" +}; +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 +}; +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" +}; +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.AsyncMethodNames[entry] = am; + } +}; +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 2) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + case "function": + if (parameterCallback) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + } + else { + parameterCallback = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + if (parameterCallback) { + if (options[Microsoft.Office.WebExtension.Parameters.Callback]) { + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + } + else { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + } + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (onSucceeded) { + payload = onSucceeded(response, caller, callArgs); + } + else { + payload = response; + } + } + else { + if (onFailed) { + payload = onFailed(status, response); + } + else { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + } + return payload; + }; + this.getCallArgs = function (suppliedArgs) { + var options, parameterCallback; + for (var i = suppliedArgs.length - 1; i >= requiredCount; i--) { + var argument = suppliedArgs[i]; + switch (typeof argument) { + case "object": + options = argument; + break; + case "function": + parameterCallback = argument; + break; + } + } + options = options || {}; + if (parameterCallback) { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + return options; + }; +}; +OSF.DDA.AsyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [], supportedOptions, privateStateCallbacks, params.onSucceeded, params.onFailed, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function (callDefinition) { + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { + OSF.OUtil.defineEnumerableProperties(this, { + "name": { + value: name + }, + "message": { + value: message + }, + "code": { + value: code + } + }); +}; +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { + OSF.OUtil.defineEnumerableProperties(this, { + "value": { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value] + }, + "status": { + value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded + } + }); + if (initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) { + OSF.OUtil.defineEnumerableProperty(this, "asyncContext", { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context] + }); + } + if (errorArgs) { + OSF.OUtil.defineEnumerableProperty(this, "error", { + value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + }); + } +}; +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if (callback) { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + } + else { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs, errorArgs)); + } +}; +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.SyncMethodNames[entry] = am; + } +}; +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 1) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; +}; +OSF.DDA.SyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [], supportedOptions, params.privateStateCallbacks, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function (callDefinition) { + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.ListType = (function () { + var listTypes = {}; + return { + setListType: function OSF_DDA_ListType$AddListType(t, prop) { listTypes[t] = prop; }, + isListType: function OSF_DDA_ListType$IsListType(t) { return OSF.OUtil.listContainsKey(listTypes, t); }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) { return listTypes[t]; } + }; +})(); +OSF.DDA.HostParameterMap = function (specialProcessor, mappings) { + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function (data) { + if (data != null && data.rows !== undefined) { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData; + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.JsonData] = { + toHost: function (data) { return data; }, + fromHost: function (data) { return typeof data === "string" ? JSON.parse(data) : data; } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) { + var ret = preimageSet ? {} : undefined; + for (var entry in preimageSet) { + var preimage = preimageSet[entry]; + var image; + if (OSF.DDA.ListType.isListType(entry)) { + image = []; + for (var subEntry in preimage) { + image.push(mapValues(preimage[subEntry], mapping)); + } + } + else if (OSF.OUtil.listContainsKey(dynamicTypes, entry)) { + image = dynamicTypes[entry][mapping](preimage); + } + else if (mapping == fromHostMap && specialProcessor.preserveNesting(entry)) { + image = mapValues(preimage, mapping); + } + else { + var maps = mappings[entry]; + if (maps) { + var map = maps[mapping]; + if (map) { + image = map[preimage]; + if (image === undefined) { + image = preimage; + } + } + } + else { + image = preimage; + } + } + ret[entry] = image; + } + return ret; + } + ; + function generateArguments(imageSet, parameters) { + var ret; + for (var param in parameters) { + var arg; + if (specialProcessor.isComplexType(param)) { + arg = generateArguments(imageSet, mappings[param][toHostMap]); + } + else { + arg = imageSet[param]; + } + if (arg != undefined) { + if (!ret) { + ret = {}; + } + var index = parameters[param]; + if (index == self) { + index = param; + } + ret[index] = specialProcessor.pack(param, arg); + } + } + return ret; + } + ; + function extractArguments(source, parameters, extracted) { + if (!extracted) { + extracted = {}; + } + for (var param in parameters) { + var index = parameters[param]; + var value; + if (index == self) { + value = source; + } + else if (index == sourceData) { + extracted[param] = source.toArray(); + continue; + } + else { + value = source[index]; + } + if (value === null || value === undefined) { + extracted[param] = undefined; + } + else { + value = specialProcessor.unpack(param, value); + var map; + if (specialProcessor.isComplexType(param)) { + map = mappings[param][fromHostMap]; + if (specialProcessor.preserveNesting(param)) { + extracted[param] = extractArguments(value, map); + } + else { + extractArguments(value, map, extracted); + } + } + else { + if (OSF.DDA.ListType.isListType(param)) { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for (var item in value) { + extractedValues[item] = extractArguments(value[item], map); + } + extracted[param] = extractedValues; + } + else { + extracted[param] = value; + } + } + } + } + return extracted; + } + ; + function applyMap(mapName, preimage, mapping) { + var parameters = mappings[mapName][mapping]; + var image; + if (mapping == "toHost") { + var imageSet = mapValues(preimage, mapping); + image = generateArguments(imageSet, parameters); + } + else if (mapping == "fromHost") { + var argumentSet = extractArguments(preimage, parameters); + image = mapValues(argumentSet, mapping); + } + return image; + } + ; + if (!mappings) { + mappings = {}; + } + this.addMapping = function (mapName, description) { + var toHost, fromHost; + if (description.map) { + toHost = description.map; + fromHost = {}; + for (var preimage in toHost) { + var image = toHost[preimage]; + if (image == self) { + image = preimage; + } + fromHost[image] = preimage; + } + } + else { + toHost = description.toHost; + fromHost = description.fromHost; + } + var pair = mappings[mapName]; + if (pair) { + var currMap = pair[toHostMap]; + for (var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for (var fh in currMap) + fromHost[fh] = currMap[fh]; + } + else { + pair = mappings[mapName] = {}; + } + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost; + }; + this.toHost = function (mapName, preimage) { return applyMap(mapName, preimage, toHostMap); }; + this.fromHost = function (mapName, image) { return applyMap(mapName, image, fromHostMap); }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function (ct) { specialProcessor.addComplexType(ct); }; + this.getDynamicType = function (dt) { return specialProcessor.getDynamicType(dt); }; + this.setDynamicType = function (dt, handler) { specialProcessor.setDynamicType(dt, handler); }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function (preimageSet, mapping) { return mapValues(preimageSet, mapping); }; +}; +OSF.DDA.SpecialProcessor = function (complexTypes, dynamicTypes) { + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) { + complexTypes.push(ct); + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) { + return dynamicTypes[dt]; + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) { + dynamicTypes[dt] = handler; + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) { + return OSF.OUtil.listContainsValue(complexTypes, t); + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) { + return OSF.OUtil.listContainsKey(dynamicTypes, p); + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) { + var pn = []; + if (OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if (OSF.DDA.DataNodeEventProperties) { + pn = pn.concat([ + OSF.DDA.DataNodeEventProperties.OldNode, + OSF.DDA.DataNodeEventProperties.NewNode, + OSF.DDA.DataNodeEventProperties.NextSiblingNode + ]); + } + return OSF.OUtil.listContainsValue(pn, p); + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].toHost(arg); + } + else { + value = arg; + } + return value; + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.DDA.getDecoratedParameterMap = function (specialProcessor, initialDefs) { + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + } + parameterMap.define = function define(definition) { + var args = {}; + var toHost = createObject(definition.toHost); + if (definition.invertible) { + args.map = toHost; + } + else if (definition.canonical) { + args.toHost = args.fromHost = toHost; + } + else { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost); + } + parameterMap.addMapping(definition.type, args); + if (definition.isComplexType) + parameterMap.addComplexType(definition.type); + }; + for (var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap; +}; +OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + "GoToByIdAsync": did.dispidNavigateToMethod, + "GetSelectedDataAsync": did.dispidGetSelectedDataMethod, + "SetSelectedDataAsync": did.dispidSetSelectedDataMethod, + "GetDocumentCopyChunkAsync": did.dispidGetDocumentCopyChunkMethod, + "ReleaseDocumentCopyAsync": did.dispidReleaseDocumentCopyMethod, + "GetDocumentCopyAsync": did.dispidGetDocumentCopyMethod, + "AddFromSelectionAsync": did.dispidAddBindingFromSelectionMethod, + "AddFromPromptAsync": did.dispidAddBindingFromPromptMethod, + "AddFromNamedItemAsync": did.dispidAddBindingFromNamedItemMethod, + "GetAllAsync": did.dispidGetAllBindingsMethod, + "GetByIdAsync": did.dispidGetBindingMethod, + "ReleaseByIdAsync": did.dispidReleaseBindingMethod, + "GetDataAsync": did.dispidGetBindingDataMethod, + "SetDataAsync": did.dispidSetBindingDataMethod, + "AddRowsAsync": did.dispidAddRowsMethod, + "AddColumnsAsync": did.dispidAddColumnsMethod, + "DeleteAllDataValuesAsync": did.dispidClearAllRowsMethod, + "RefreshAsync": did.dispidLoadSettingsMethod, + "SaveAsync": did.dispidSaveSettingsMethod, + "GetActiveViewAsync": did.dispidGetActiveViewMethod, + "GetFilePropertiesAsync": did.dispidGetFilePropertiesMethod, + "GetOfficeThemeAsync": did.dispidGetOfficeThemeMethod, + "GetDocumentThemeAsync": did.dispidGetDocumentThemeMethod, + "ClearFormatsAsync": did.dispidClearFormatsMethod, + "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, + "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, + "GetAuthContextAsync": did.dispidGetAuthContextMethod, + "GetNestedAppAuthContextAsync": did.dispidGetNestedAppAuthContextMethod, + "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, + "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, + "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, + "InsertFormAsync": did.dispidInsertFormMethod, + "ExecuteFeature": did.dispidExecuteFeature, + "QueryFeature": did.dispidQueryFeature, + "AddDataPartAsync": did.dispidAddDataPartMethod, + "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, + "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, + "GetPartXmlAsync": did.dispidGetDataPartXmlMethod, + "GetPartNodesAsync": did.dispidGetDataPartNodesMethod, + "DeleteDataPartAsync": did.dispidDeleteDataPartMethod, + "GetNodeValueAsync": did.dispidGetDataNodeValueMethod, + "GetNodeXmlAsync": did.dispidGetDataNodeXmlMethod, + "GetRelativeNodesAsync": did.dispidGetDataNodesMethod, + "SetNodeValueAsync": did.dispidSetDataNodeValueMethod, + "SetNodeXmlAsync": did.dispidSetDataNodeXmlMethod, + "AddDataPartNamespaceAsync": did.dispidAddDataNamespaceMethod, + "GetDataPartNamespaceAsync": did.dispidGetDataUriByPrefixMethod, + "GetDataPartPrefixAsync": did.dispidGetDataPrefixByUriMethod, + "GetNodeTextAsync": did.dispidGetDataNodeTextMethod, + "SetNodeTextAsync": did.dispidSetDataNodeTextMethod, + "GetSelectedTask": did.dispidGetSelectedTaskMethod, + "GetTask": did.dispidGetTaskMethod, + "GetWSSUrl": did.dispidGetWSSUrlMethod, + "GetTaskField": did.dispidGetTaskFieldMethod, + "GetSelectedResource": did.dispidGetSelectedResourceMethod, + "GetResourceField": did.dispidGetResourceFieldMethod, + "GetProjectField": did.dispidGetProjectFieldMethod, + "GetSelectedView": did.dispidGetSelectedViewMethod, + "GetTaskByIndex": did.dispidGetTaskByIndexMethod, + "GetResourceByIndex": did.dispidGetResourceByIndexMethod, + "SetTaskField": did.dispidSetTaskFieldMethod, + "SetResourceField": did.dispidSetResourceFieldMethod, + "GetMaxTaskIndex": did.dispidGetMaxTaskIndexMethod, + "GetMaxResourceIndex": did.dispidGetMaxResourceIndexMethod, + "CreateTask": did.dispidCreateTaskMethod + }; + for (var method in methodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = methodMap[method]; + } + } + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var syncMethodMap = { + "MessageParent": did.dispidMessageParentMethod, + "SendMessage": did.dispidSendMessageMethod + }; + for (var method in syncMethodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = syncMethodMap[method]; + } + } + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + "SettingsChanged": did.dispidSettingsChangedEvent, + "DocumentSelectionChanged": did.dispidDocumentSelectionChangedEvent, + "BindingSelectionChanged": did.dispidBindingSelectionChangedEvent, + "BindingDataChanged": did.dispidBindingDataChangedEvent, + "ActiveViewChanged": did.dispidActiveViewChangedEvent, + "OfficeThemeChanged": did.dispidOfficeThemeChangedEvent, + "DocumentThemeChanged": did.dispidDocumentThemeChangedEvent, + "AppCommandInvoked": did.dispidAppCommandInvokedEvent, + "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, + "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, + "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, + "RecurrenceChanged": did.dispidOlkRecurrenceChangedEvent, + "AttachmentsChanged": did.dispidOlkAttachmentsChangedEvent, + "EnhancedLocationsChanged": did.dispidOlkEnhancedLocationsChangedEvent, + "InfobarClicked": did.dispidOlkInfobarClickedEvent, + "SelectedItemsChanged": did.dispidOlkSelectedItemsChangedEvent, + "SensitivityLabelChanged": did.dispidOlkSensitivityLabelChangedEvent, + "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, + "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, + "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, + "DataNodeInserted": did.dispidDataNodeAddedEvent, + "DataNodeReplaced": did.dispidDataNodeReplacedEvent, + "DataNodeDeleted": did.dispidDataNodeDeletedEvent + }; + for (var event in eventMap) { + if (jsom[event]) { + dispIdMap[jsom[event]] = eventMap[event]; + } + } + function IsObjectEvent(dispId) { + return (dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { + if (typeof ex == "number") { + if (!callArgs) { + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + } + OSF.DDA.issueAsyncResult(callArgs, ex, OSF.DDA.ErrorCodeManager.getErrorArgs(ex)); + } + else { + throw ex; + } + } + ; + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) { + var callArgs; + try { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) { + window.Excel._RedirectV1APIs = true; + } + if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if (richApiInExcelMethodSubstitution.preprocess) { + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + } + var ctx = new window.Excel.RequestContext(); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); + ctx.sync() + .then(function () { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if (richApiInExcelMethodSubstitution.postprocess) { + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); + } + if (status != 0) { + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, response); + })["catch"](function (error) { + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure, null); + }); + } + else { + var hostCallArgs; + if (parameterMap.toHost) { + hostCallArgs = parameterMap.toHost(dispId, callArgs); + } + else { + hostCallArgs = callArgs; + } + var startTime = (new Date()).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + "dispId": dispId, + "hostCallArgs": hostCallArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": function (status, hostResponseArgs) { + var responseArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (parameterMap.fromHost) { + responseArgs = parameterMap.fromHost(dispId, hostResponseArgs); + } + else { + responseArgs = hostResponseArgs; + } + } + else { + responseArgs = hostResponseArgs; + } + var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); + OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry && !(OSF.ConstantNames && OSF.ConstantNames.IsCustomFunctionsRuntime)) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } + } + }); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); + if (!added) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; + } + } + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if (isPopupWindow) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return; + } + var dispId_1 = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId_1); + var targetId_1 = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId_1) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId_1, + "targetId": targetId_1, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = null; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web" && dispId_1 == OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent) { + args = hostArgs; + } + else { + args = parameterMap.fromHost(dispId_1, hostArgs); + } + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId_1, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId_1, args)); + } + }); + } + else { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var status, removeSuccess; + if (handler === null) { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + else { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration + }); + } + else { + onEnsureRegistration(status); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller, isModal) { + var callArgs; + var targetId; + var asyncMethodCall = null; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) { + var payload; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + else { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status, onSucceedArgs, caller, callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + } + OSF.DDA.issueAsyncResult(callArgs, status, payload); + } + try { + if (dialogMessageEvent == undefined || dialogOtherEvent == undefined) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + } + if (!isModal) { + if (OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + } + else { + if (OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.id]; + } + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + callArgs["isModal"] = isModal; + targetId = JSON.stringify(callArgs); + if (!OSF.DialogShownStatus.hasDialogShown) { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + } + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = parameterMap.fromHost(dispId, hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent, caller, args); + if (event.type == dialogOtherEvent) { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]); + } + eventDispatch.fireOrQueueEvent(event); + if (args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false; + } + } + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) { + var callArgs; + var dialogMessageEvent, dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false; + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": closeCallback + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + if (closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed, OSF.DDA.AsyncMethodNames.CloseAsync.displayName, closeStatus); + } + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; +}; +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { + for (var entry in asyncMethodNames) { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if (!target[name]) { + OSF.OUtil.defineEnumerableProperty(target, name, { + value: (function (asyncMethod) { + return function () { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod, arguments, target, privateState); + }; + })(method) + }); + } + } +}; +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if (!target[add]) { + OSF.OUtil.defineEnumerableProperty(target, add, { + value: function () { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments, eventDispatch, target, isPopupWindow); + } + }); + } + if (!target[remove]) { + OSF.OUtil.defineEnumerableProperty(target, remove, { + value: function () { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments, eventDispatch, target); + } + }); + } +}; +(function (OfficeExt) { + var loadMsAjax = false; + var MsAjaxTypeHelper = (function () { + function MsAjaxTypeHelper() { + } + MsAjaxTypeHelper.isInstanceOfType = function (type, instance) { + if (typeof (instance) === "undefined" || instance === null) + return false; + if (instance instanceof type) + return true; + var instanceType = instance.constructor; + if (!instanceType || (typeof (instanceType) !== "function") || !instanceType.__typeName || instanceType.__typeName === 'Object') { + instanceType = Object; + } + return !!(instanceType === type) || + (instanceType.__typeName && type.__typeName && instanceType.__typeName === type.__typeName); + }; + return MsAjaxTypeHelper; + }()); + OfficeExt.MsAjaxTypeHelper = MsAjaxTypeHelper; + var MsAjaxError = (function () { + function MsAjaxError() { + } + MsAjaxError.create = function (message, errorInfo) { + var err = new Error(message); + err.message = message; + if (errorInfo) { + for (var v in errorInfo) { + err[v] = errorInfo[v]; + } + } + err.popStackFrame(); + return err; + }; + MsAjaxError.parameterCount = function (message) { + var displayMessage = "Sys.ParameterCountException: " + (message ? message : "Parameter count mismatch."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.ParameterCountException' }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argument = function (paramName, message) { + var displayMessage = "Sys.ArgumentException: " + (message ? message : "Value does not fall within the expected range."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentNull = function (paramName, message) { + var displayMessage = "Sys.ArgumentNullException: " + (message ? message : "Value cannot be null."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentOutOfRange = function (paramName, actualValue, message) { + var displayMessage = "Sys.ArgumentOutOfRangeException: " + (message ? message : "Specified argument was out of the range of valid values."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + if (typeof (actualValue) !== "undefined" && actualValue !== null) { + displayMessage += "\n" + MsAjaxString.format("Actual value was {0}.", actualValue); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentType = function (paramName, actualType, expectedType, message) { + var displayMessage = "Sys.ArgumentTypeException: "; + if (message) { + displayMessage += message; + } + else if (actualType && expectedType) { + displayMessage += MsAjaxString.format("Object of type '{0}' cannot be converted to type '{1}'.", actualType.getName ? actualType.getName() : actualType, expectedType.getName ? expectedType.getName() : expectedType); + } + else { + displayMessage += "Object cannot be converted to the required type."; + } + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentUndefined = function (paramName, message) { + var displayMessage = "Sys.ArgumentUndefinedException: " + (message ? message : "Value cannot be undefined."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.invalidOperation = function (message) { + var displayMessage = "Sys.InvalidOperationException: " + (message ? message : "Operation is not valid due to the current state of the object."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.InvalidOperationException' }); + err.popStackFrame(); + return err; + }; + return MsAjaxError; + }()); + OfficeExt.MsAjaxError = MsAjaxError; + var MsAjaxString = (function () { + function MsAjaxString() { + } + MsAjaxString.format = function (format) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var source = format; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10); + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }; + MsAjaxString.startsWith = function (str, prefix) { + return (str.substr(0, prefix.length) === prefix); + }; + return MsAjaxString; + }()); + OfficeExt.MsAjaxString = MsAjaxString; + var MsAjaxDebug = (function () { + function MsAjaxDebug() { + } + MsAjaxDebug.trace = function (text) { + if (typeof Debug !== "undefined" && Debug.writeln) + Debug.writeln(text); + if (window.console && window.console.log) + window.console.log(text); + if (window.opera && window.opera.postError) + window.opera.postError(text); + if (window.debugService && window.debugService.trace) + window.debugService.trace(text); + var a = document.getElementById("TraceConsole"); + if (a && a.tagName.toUpperCase() === "TEXTAREA") { + a.appendChild(document.createTextNode(text + "\n")); + } + }; + return MsAjaxDebug; + }()); + OfficeExt.MsAjaxDebug = MsAjaxDebug; + if (!loadMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) { + var registerTypeInternal = function registerTypeInternal(type, name, isClass) { + if (type.__typeName === undefined || type.__typeName === null) { + type.__typeName = name; + } + if (type.__class === undefined || type.__class === null) { + type.__class = isClass; + } + }; + registerTypeInternal(Function, "Function", true); + registerTypeInternal(Error, "Error", true); + registerTypeInternal(Object, "Object", true); + registerTypeInternal(String, "String", true); + registerTypeInternal(Boolean, "Boolean", true); + registerTypeInternal(Date, "Date", true); + registerTypeInternal(Number, "Number", true); + registerTypeInternal(RegExp, "RegExp", true); + registerTypeInternal(Array, "Array", true); + if (!Function.createCallback) { + Function.createCallback = function Function$createCallback(method, context) { + var e = Function._validateParams(arguments, [ + { name: "method", type: Function }, + { name: "context", mayBeNull: true } + ]); + if (e) + throw e; + return function () { + var l = arguments.length; + if (l > 0) { + var args = []; + for (var i = 0; i < l; i++) { + args[i] = arguments[i]; + } + args[l] = context; + return method.apply(this, args); + } + return method.call(this, context); + }; + }; + } + if (!Function.createDelegate) { + Function.createDelegate = function Function$createDelegate(instance, method) { + var e = Function._validateParams(arguments, [ + { name: "instance", mayBeNull: true }, + { name: "method", type: Function } + ]); + if (e) + throw e; + return function () { + return method.apply(instance, arguments); + }; + }; + } + if (!Function._validateParams) { + Function._validateParams = function (params, expectedParams, validateParameterCount) { + var e, expectedLength = expectedParams.length; + validateParameterCount = validateParameterCount || (typeof (validateParameterCount) === "undefined"); + e = Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i = 0, l = params.length; i < l; i++) { + var expectedParam = expectedParams[Math.min(i, expectedLength - 1)], paramName = expectedParam.name; + if (expectedParam.parameterArray) { + paramName += "[" + (i - expectedLength + 1) + "]"; + } + else if (!validateParameterCount && (i >= expectedLength)) { + break; + } + e = Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; + }; + } + if (!Function._validateParameterCount) { + Function._validateParameterCount = function (params, expectedParams, validateParameterCount) { + var i, error, expectedLen = expectedParams.length, actualLen = params.length; + if (actualLen < expectedLen) { + var minParams = expectedLen; + for (i = 0; i < expectedLen; i++) { + var param = expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error = true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error = true; + for (i = 0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error = false; + break; + } + } + } + if (error) { + var e = MsAjaxError.parameterCount(); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!Function._validateParameter) { + Function._validateParameter = function (param, expectedParam, paramName) { + var e, expectedType = expectedParam.type, expectedInteger = !!expectedParam.integer, expectedDomElement = !!expectedParam.domElement, mayBeNull = !!expectedParam.mayBeNull; + e = Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType = expectedParam.elementType, elementMayBeNull = !!expectedParam.elementMayBeNull; + if (expectedType === Array && typeof (param) !== "undefined" && param !== null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger = !!expectedParam.elementInteger, expectedElementDomElement = !!expectedParam.elementDomElement; + for (var i = 0; i < param.length; i++) { + var elem = param[i]; + e = Function._validateParameterType(elem, expectedElementType, expectedElementInteger, expectedElementDomElement, elementMayBeNull, paramName + "[" + i + "]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; + }; + } + if (!Function._validateParameterType) { + Function._validateParameterType = function (param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof (param) === "undefined") { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param === null) { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && !OfficeExt.MsAjaxTypeHelper.isInstanceOfType(expectedType, param)) { + e = OfficeExt.MsAjaxError.argumentType(paramName, typeof (param), expectedType); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!window.Type) { + window.Type = Function; + } + if (!Type.registerNamespace) { + Type.registerNamespace = function (ns) { + var namespaceParts = ns.split('.'); + var currentNamespace = window; + for (var i = 0; i < namespaceParts.length; i++) { + currentNamespace[namespaceParts[i]] = currentNamespace[namespaceParts[i]] || {}; + currentNamespace = currentNamespace[namespaceParts[i]]; + } + }; + } + if (!Type.prototype.registerClass) { + Type.prototype.registerClass = function (cls) { cls = {}; }; + } + if (typeof (Sys) === "undefined") { + Type.registerNamespace('Sys'); + } + if (!Error.prototype.popStackFrame) { + Error.prototype.popStackFrame = function () { + if (arguments.length !== 0) + throw MsAjaxError.parameterCount(); + if (typeof (this.stack) === "undefined" || this.stack === null || + typeof (this.fileName) === "undefined" || this.fileName === null || + typeof (this.lineNumber) === "undefined" || this.lineNumber === null) { + return; + } + var stackFrames = this.stack.split("\n"); + var currentFrame = stackFrames[0]; + var pattern = this.fileName + ":" + this.lineNumber; + while (typeof (currentFrame) !== "undefined" && + currentFrame !== null && + currentFrame.indexOf(pattern) === -1) { + stackFrames.shift(); + currentFrame = stackFrames[0]; + } + var nextFrame = stackFrames[1]; + if (typeof (nextFrame) === "undefined" || nextFrame === null) { + return; + } + var nextFrameParts = nextFrame.match(/@(.*):(\d+)$/); + if (typeof (nextFrameParts) === "undefined" || nextFrameParts === null) { + return; + } + this.fileName = nextFrameParts[1]; + this.lineNumber = parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack = stackFrames.join("\n"); + }; + } + OsfMsAjaxFactory.msAjaxError = MsAjaxError; + OsfMsAjaxFactory.msAjaxString = MsAjaxString; + OsfMsAjaxFactory.msAjaxDebug = MsAjaxDebug; + } +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.setNamespace("SafeArray", OSF.DDA); +OSF.DDA.SafeArray.Response = { + Status: 0, + Payload: 1 +}; +OSF.DDA.SafeArray.UniqueArguments = { + Offset: "offset", + Run: "run", + BindingSpecificData: "bindingSpecificData", + MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" +}; +OSF.OUtil.setNamespace("Delegate", OSF.DDA.SafeArray); +OSF.DDA.SafeArray.Delegate._onException = function OSF_DDA_SafeArray_Delegate$OnException(ex, args) { + var status; + var statusNumber = ex.number; + if (statusNumber) { + switch (statusNumber) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2147467259: + if (args.dispId == OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + break; + case -2146828283: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147209089: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147208704: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + if (args.onComplete) { + args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } +}; +OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod = function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) { + var status; + var number = ex.number; + if (number) { + switch (number) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; +}; +OSF.DDA.SafeArray.Delegate.SpecialProcessor = function OSF_DDA_SafeArray_Delegate_SpecialProcessor() { + function _2DVBArrayToJaggedArray(vbArr) { + var ret; + try { + var rows = vbArr.ubound(1); + var cols = vbArr.ubound(2); + vbArr = vbArr.toArray(); + if (rows == 1 && cols == 1) { + ret = [vbArr]; + } + else { + ret = []; + for (var row = 0; row < rows; row++) { + var rowArr = []; + for (var col = 0; col < cols; col++) { + var datum = vbArr[row * cols + col]; + if (datum != OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) { + rowArr.push(datum); + } + } + if (rowArr.length > 0) { + ret.push(rowArr); + } + } + } + } + catch (ex) { + } + return ret; + } + var complexTypes = []; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = (function () { + var tableRows = 0; + var tableHeaders = 1; + return { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) { + if (OSF.DDA.TableDataProperties && typeof data != "string" && data[OSF.DDA.TableDataProperties.TableRows] !== undefined) { + var tableData = []; + tableData[tableRows] = data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.DDA.TableDataProperties.TableHeaders]; + data = tableData; + } + return data; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) { + var ret; + if (hostArgs.toArray) { + var dimensions = hostArgs.dimensions(); + if (dimensions === 2) { + ret = _2DVBArrayToJaggedArray(hostArgs); + } + else { + var array = hostArgs.toArray(); + if (array.length === 2 && ((array[0] != null && array[0].toArray) || (array[1] != null && array[1].toArray))) { + ret = {}; + ret[OSF.DDA.TableDataProperties.TableRows] = _2DVBArrayToJaggedArray(array[tableRows]); + ret[OSF.DDA.TableDataProperties.TableHeaders] = _2DVBArrayToJaggedArray(array[tableHeaders]); + } + else { + ret = array; + } + } + } + else { + ret = hostArgs; + } + return ret; + } + }; + })(); + OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes); + this.unpack = function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) { + var toArraySupported = arg !== undefined && arg.toArray !== undefined; + value = toArraySupported ? arg.toArray() : arg || {}; + } + else if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor); +OSF.DDA.SafeArray.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor(), [ + { + type: Microsoft.Office.WebExtension.Parameters.ValueFormat, + toHost: [ + { name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, value: 0 }, + { name: Microsoft.Office.WebExtension.ValueFormat.Formatted, value: 1 } + ] + }, + { + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [ + { name: Microsoft.Office.WebExtension.FilterType.All, value: 0 } + ] + } +]); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, + fromHost: [ + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, value: 0 }, + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) { + function toArray(args) { + var arrArgs = args; + if (OSF.OUtil.isArray(args)) { + var len = arrArgs.length; + for (var i = 0; i < len; i++) { + arrArgs[i] = toArray(arrArgs[i]); + } + } + else if (OSF.OUtil.isDate(args)) { + arrArgs = args.getVarDate(); + } + else if (typeof args === "object" && !OSF.OUtil.isArray(args)) { + arrArgs = []; + for (var index in args) { + if (!OSF.OUtil.isFunction(args[index])) { + arrArgs[index] = toArray(args[index]); + } + } + } + return arrArgs; + } + function fromSafeArray(value) { + var ret = value; + if (value != null && value.toArray) { + var arrayResult = value.toArray(); + ret = new Array(arrayResult.length); + for (var i = 0; i < arrayResult.length; i++) { + ret[i] = fromSafeArray(arrayResult[i]); + } + } + return ret; + } + try { + if (args.onCalling) { + args.onCalling(); + } + OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { + var result; + var status; + if (typeof hostResponseArgs === "number") { + result = []; + status = hostResponseArgs; + } + else { + result = hostResponseArgs.toArray(); + status = result[OSF.DDA.SafeArray.Response.Status]; + } + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) { + var payload = result[OSF.DDA.SafeArray.Response.Payload]; + payload = fromSafeArray(payload); + if (payload != null) { + if (!args._chunkResultData) { + args._chunkResultData = new Array(); + } + args._chunkResultData[payload[0]] = payload[1]; + } + return false; + } + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (result.length > 2) { + payload = []; + for (var i = 1; i < result.length; i++) + payload[i - 1] = result[i]; + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + if (args._chunkResultData) { + payload = fromSafeArray(payload); + if (payload != null) { + var expectedChunkCount = payload[payload.length - 1]; + if (args._chunkResultData.length == expectedChunkCount) { + payload[payload.length - 1] = args._chunkResultData; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + } + } + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + args.onComplete(status, payload); + } + return true; + }); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent = function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) { + var startTime = (new Date()).getTime(); + return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) { + if (args.onReceiving) { + args.onReceiving(); + } + var status = hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + }; +}; +OSF.DDA.SafeArray.Delegate.registerEventAsync = function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + try { + OSF.ClientHostController.registerEvent(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.unregisterEventAsync = function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.unregisterEvent(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.ClientMode = { + ReadWrite: 0, + ReadOnly: 1 +}; +OSF.DDA.RichInitializationReason = { + 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, + 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened +}; +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._initializeSettings = this.initializeSettings; +}; +OSF.InitializationHelper.prototype.deserializeSettings = function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) { + var settings; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if (storageSettings) { + serializedSettings = JSON.parse(storageSettings); + } + else { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if (refreshSupported) { + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + } + else { + settings = new OSF.DDA.Settings(deserializedSettings); + } + return settings; +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication() { +}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)); +}; +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { + var license = new OSF.DDA.License(appContext.get_eToken()); + var getOfficeThemeHandler = (OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme) ? OSF.DDA.OfficeTheme.getOfficeTheme : null; + if (appContext.get_isDialog()) { + if (OSF.DDA.UI.ChildUI) { + appContext.ui = new OSF.DDA.UI.ChildUI(); + } + } + else { + if (OSF.DDA.UI.ParentUI) { + appContext.ui = new OSF.DDA.UI.ParentUI(); + if (OfficeExt.Container) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.CloseContainerAsync]); + } + } + } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } + if (OSF.DDA.ExecuteFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.ExecuteFeature]); + } + if (OSF.DDA.QueryFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.QueryFeature]); + } + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + var asyncMethods = []; + var getAccessTokenMethod = OSF.DDA.AsyncMethodNames.GetAccessTokenAsync; + if (getAccessTokenMethod) { + asyncMethods.push(getAccessTokenMethod); + } + var authContextMethod = OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync; + if (authContextMethod) { + asyncMethods.push(authContextMethod); + } + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, asyncMethods); + } + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); + var getDelegateMethods, parameterMap; + getDelegateMethods = OSF.DDA.DispIdHost.getClientDelegateMethods; + parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods, parameterMap)); +}; +OSF.InitializationHelper.prototype.getInitializationReason = function (appContext) { return OSF.DDA.RichInitializationReason[appContext.get_reason()]; }; +OSF.DDA.DispIdHost.getClientDelegateMethods = function (actionId) { + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.SafeArray.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.SafeArray.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.SafeArray.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.SafeArray.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.SafeArray.Delegate.closeDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.SafeArray.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.SafeArray.Delegate.sendMessage; + if (OSF.DDA.AsyncMethodNames.RefreshAsync && actionId == OSF.DDA.AsyncMethodNames.RefreshAsync.id) { + var readSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + if (typeof (OSF.DDA.ClientSettingsManager.refresh) === "function") { + return OSF.DDA.ClientSettingsManager.refresh(onCalling, onReceiving); + } + else { + return OSF.DDA.ClientSettingsManager.read(onCalling, onReceiving); + } + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings); + } + if (OSF.DDA.AsyncMethodNames.SaveAsync && actionId == OSF.DDA.AsyncMethodNames.SaveAsync.id) { + var writeSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings], hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale], onCalling, onReceiving); + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings); + } + return delegateMethods; +}; +(function (OfficeExt) { + var RichClientHostController = (function () { + function RichClientHostController() { + } + RichClientHostController.prototype.execute = function (id, params, callback) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.Execute(id, params, callback, OsfOMToken); + } + else { + window.external.Execute(id, params, callback); + } + }; + RichClientHostController.prototype.registerEvent = function (id, targetId, handler, callback) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.RegisterEvent(id, targetId, handler, callback, OsfOMToken); + } + else { + window.external.RegisterEvent(id, targetId, handler, callback); + } + }; + RichClientHostController.prototype.unregisterEvent = function (id, targetId, callback) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.UnregisterEvent(id, targetId, callback, OsfOMToken); + } + else { + window.external.UnregisterEvent(id, targetId, callback); + } + }; + RichClientHostController.prototype.closeSdxDialog = function (context) { + if (OSF.OUtil.externalNativeFunctionExists(typeof window.external.closeSdxDialog)) { + window.external.closeSdxDialog(context); + } + }; + RichClientHostController.prototype.resizeSdxDialog = function (width, height) { + if (OSF.OUtil.externalNativeFunctionExists(typeof window.external.resizeSdxDialog)) { + window.external.resizeSdxDialog(width, height); + } + }; + return RichClientHostController; + }()); + OfficeExt.RichClientHostController = RichClientHostController; +})(OfficeExt || (OfficeExt = {})); +(function (OfficeExt) { + var Win32RichClientHostController = (function (_super) { + __extends(Win32RichClientHostController, _super); + function Win32RichClientHostController() { + return _super !== null && _super.apply(this, arguments) || this; + } + Win32RichClientHostController.prototype.messageParent = function (params) { + if (OSF.OUtil.externalNativeFunctionExists(typeof window.external.MessageParent2)) { + if (params) { + var messageToParent = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + if (typeof messageToParent === "boolean") { + if (messageToParent === true) { + params[Microsoft.Office.WebExtension.Parameters.MessageToParent] = "true"; + } + else if (messageToParent === false) { + params[Microsoft.Office.WebExtension.Parameters.MessageToParent] = ""; + } + } + } + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.MessageParent2(JSON.stringify(params), OsfOMToken); + } + else { + window.external.MessageParent2(JSON.stringify(params)); + } + } + else { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + window.external.MessageParent(message); + } + }; + Win32RichClientHostController.prototype.openDialog = function (id, targetId, handler, callback) { + this.registerEvent(id, targetId, handler, callback); + }; + Win32RichClientHostController.prototype.closeDialog = function (id, targetId, callback) { + this.unregisterEvent(id, targetId, callback); + }; + Win32RichClientHostController.prototype.sendMessage = function (params) { + if (OSF.OUtil.externalNativeFunctionExists(typeof window.external.MessageChild2)) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.MessageChild2(JSON.stringify(params), OsfOMToken); + } + else { + window.external.MessageChild2(JSON.stringify(params)); + } + } + else { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageContent]; + window.external.MessageChild(message); + } + }; + return Win32RichClientHostController; + }(OfficeExt.RichClientHostController)); + OfficeExt.Win32RichClientHostController = Win32RichClientHostController; +})(OfficeExt || (OfficeExt = {})); +(function (OfficeExt) { + var OfficeTheme; + (function (OfficeTheme) { + var OfficeThemeManager = (function () { + function OfficeThemeManager() { + this._osfOfficeTheme = null; + this._osfOfficeThemeTimeStamp = null; + } + OfficeThemeManager.prototype.getOfficeTheme = function () { + if (OSF.DDA._OsfControlContext) { + if (this._osfOfficeTheme && this._osfOfficeThemeTimeStamp && ((new Date()).getTime() - this._osfOfficeThemeTimeStamp < OfficeThemeManager._osfOfficeThemeCacheValidPeriod)) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo", 0); + } + } + else { + var startTime = (new Date()).getTime(); + var osfOfficeTheme = OSF.DDA._OsfControlContext.GetOfficeThemeInfo(); + var endTime = (new Date()).getTime(); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo", Math.abs(endTime - startTime)); + } + this._osfOfficeTheme = JSON.parse(osfOfficeTheme); + this._osfOfficeTheme = OSF.DDA.Theming.ConvertToOfficeTheme(this._osfOfficeTheme); + this._osfOfficeThemeTimeStamp = endTime; + } + return this._osfOfficeTheme; + } + }; + OfficeThemeManager.instance = function () { + if (OfficeThemeManager._instance == null) { + OfficeThemeManager._instance = new OfficeThemeManager(); + } + return OfficeThemeManager._instance; + }; + OfficeThemeManager._osfOfficeThemeCacheValidPeriod = 5000; + OfficeThemeManager._instance = null; + return OfficeThemeManager; + }()); + OfficeTheme.OfficeThemeManager = OfficeThemeManager; + OSF.OUtil.setNamespace("OfficeTheme", OSF.DDA); + OSF.DDA.OfficeTheme.getOfficeTheme = OfficeExt.OfficeTheme.OfficeThemeManager.instance().getOfficeTheme; + })(OfficeTheme = OfficeExt.OfficeTheme || (OfficeExt.OfficeTheme = {})); +})(OfficeExt || (OfficeExt = {})); +OSF.initializeRichCommon = function OSF_initializeRichCommon() { + OSF.DDA.ClientSettingsManager = { + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) { + return function (args) { + var onComplete = function onComplete(status, response) { + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + args.onComplete(status, response); + } + }; + var response; + try { + response = hostDelegateMethod(args.hostCallArgs, args.onCalling, onComplete); + } + catch (ex) { + var status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response = { name: Strings.OfficeOM.L_InternalError, message: ex }; + if (args.onComplete) { + args.onComplete(status, response); + } + } + }; + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + OSF.DDA._OsfControlContext.GetSettings(OsfOMToken).Read(keys, values); + } + else { + OSF.DDA._OsfControlContext.GetSettings().Read(keys, values); + } + var serializedSettings = {}; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, serializedSettings); + } + return serializedSettings; + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) { + var keys = []; + var values = []; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + if (onCalling) { + onCalling(); + } + var settingObj; + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + settingObj = OSF.DDA._OsfControlContext.GetSettings(OsfOMToken); + } + else { + settingObj = OSF.DDA._OsfControlContext.GetSettings(); + } + if (typeof settingObj.WriteAsync != 'undefined') { + settingObj.WriteAsync(keys, values, onComplete); + } + else { + settingObj.Write(keys, values); + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + }, + refresh: function OSF_DDA_ClientSettingsManager$refresh(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + var osfSettingsObj; + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + osfSettingsObj = OSF.DDA._OsfControlContext.GetSettings(OsfOMToken); + } + else { + osfSettingsObj = OSF.DDA._OsfControlContext.GetSettings(); + } + var readSettingsAndReturn = function () { + osfSettingsObj.Read(keys, values); + var serializedSettings = {}; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, serializedSettings); + } + }; + if (osfSettingsObj.RefreshAsync) { + osfSettingsObj.RefreshAsync(function () { + readSettingsAndReturn(); + }); + } + else { + readSettingsAndReturn(); + } + } + }; + OSF.InitializationHelper.prototype.initializeSettings = function OSF_InitializationHelper$initializeSettings(refreshSupported) { + var serializedSettings = OSF.DDA.ClientSettingsManager.read(); + var settings = this.deserializeSettings(serializedSettings, refreshSupported); + return settings; + }; + OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + var returnedContext; + var context; + var warningText = "Warning: Office.js is loaded outside of Office client"; + try { + if (window.external && OSF.OUtil.externalNativeFunctionExists(typeof window.external.GetContext)) { + context = OSF.DDA._OsfControlContext = window.external.GetContext(); + } + else { + OsfMsAjaxFactory.msAjaxDebug.trace(warningText); + return; + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace(warningText); + return; + } + var appType = context.GetAppType(); + var id = context.GetSolutionRef(); + var version = context.GetAppVersionMajor(); + var minorVersion = context.GetAppVersionMinor(); + var UILocale = context.GetAppUILocale(); + var dataLocale = context.GetAppDataLocale(); + var docUrl = context.GetDocUrl(); + var clientMode = context.GetAppCapabilities(); + var reason = context.GetActivationMode(); + var osfControlType = context.GetControlIntegrationLevel(); + var settings = []; + var eToken; + try { + eToken = context.GetSolutionToken(); + } + catch (ex) { + } + var correlationId; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetCorrelationId)) { + correlationId = context.GetCorrelationId(); + } + var appInstanceId; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetInstanceId)) { + appInstanceId = context.GetInstanceId(); + } + var touchEnabled; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetTouchEnabled)) { + touchEnabled = context.GetTouchEnabled(); + } + var commerceAllowed; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetCommerceAllowed)) { + commerceAllowed = context.GetCommerceAllowed(); + } + var requirementMatrix; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetSupportedMatrix)) { + requirementMatrix = context.GetSupportedMatrix(); + } + var hostCustomMessage; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetHostCustomMessage)) { + hostCustomMessage = context.GetHostCustomMessage(); + } + var hostFullVersion; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetHostFullVersion)) { + hostFullVersion = context.GetHostFullVersion(); + } + var dialogRequirementMatrix; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetDialogRequirementMatrix)) { + dialogRequirementMatrix = context.GetDialogRequirementMatrix(); + } + var sdxFeatureGates; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetFeaturesForSolution)) { + try { + var sdxFeatureGatesJson = context.GetFeaturesForSolution(); + if (sdxFeatureGatesJson) { + sdxFeatureGates = JSON.parse(sdxFeatureGatesJson); + } + } + catch (ex) { + OsfMsAjaxFactory.msAjaxDebug.trace("Exception while creating the SDX FeatureGates object. Details: " + ex); + } + } + var initialDisplayMode = 0; + if (OSF.OUtil.externalNativeFunctionExists(typeof context.GetInitialDisplayMode)) { + initialDisplayMode = context.GetInitialDisplayMode(); + } + eToken = eToken ? eToken.toString() : ""; + returnedContext = new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, undefined, undefined, undefined, undefined, dialogRequirementMatrix, sdxFeatureGates, undefined, initialDisplayMode); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + }; +}; +OSF.OUtil.setNamespace("ExtensionLifeCycle", OSF); +OSF.ExtensionLifeCycle.close = function OSF_ExtensionLifeCycle$close(context) { + OSF.ClientHostController.closeSdxDialog(context); +}; +OSF.ExtensionLifeCycle.resize = function OSF_ExtensionLifeCycle$resize(width, height) { + OSF.ClientHostController.resizeSdxDialog(width, height); +}; +OSF.ClientHostController = new OfficeExt.Win32RichClientHostController(); +OSF.initializeRichCommon(); +var OSFLog; +(function (OSFLog) { + var BaseUsageData = (function () { + function BaseUsageData(table) { + this._table = table; + this._fields = {}; + } + Object.defineProperty(BaseUsageData.prototype, "Fields", { + get: function () { + return this._fields; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype, "Table", { + get: function () { + return this._table; + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function () { + }; + BaseUsageData.prototype.SetSerializedField = function (key, value) { + if (typeof (value) !== "undefined" && value !== null) { + this._serializedFields[key] = value.toString(); + } + }; + BaseUsageData.prototype.SerializeRow = function () { + this._serializedFields = {}; + this.SetSerializedField("Table", this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields); + }; + return BaseUsageData; + }()); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = (function (_super) { + __extends(AppActivatedUsageData, _super); + function AppActivatedUsageData() { + return _super.call(this, "AppActivated") || this; + } + Object.defineProperty(AppActivatedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppId", { + get: function () { return this.Fields["AppId"]; }, + set: function (value) { this.Fields["AppId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppInstanceId", { + get: function () { return this.Fields["AppInstanceId"]; }, + set: function (value) { this.Fields["AppInstanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppURL", { + get: function () { return this.Fields["AppURL"]; }, + set: function (value) { this.Fields["AppURL"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AssetId", { + get: function () { return this.Fields["AssetId"]; }, + set: function (value) { this.Fields["AssetId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Browser", { + get: function () { return this.Fields["Browser"]; }, + set: function (value) { this.Fields["Browser"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "UserId", { + get: function () { return this.Fields["UserId"]; }, + set: function (value) { this.Fields["UserId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Host", { + get: function () { return this.Fields["Host"]; }, + set: function (value) { this.Fields["Host"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostVersion", { + get: function () { return this.Fields["HostVersion"]; }, + set: function (value) { this.Fields["HostVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "ClientId", { + get: function () { return this.Fields["ClientId"]; }, + set: function (value) { this.Fields["ClientId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeWidth", { + get: function () { return this.Fields["AppSizeWidth"]; }, + set: function (value) { this.Fields["AppSizeWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeHeight", { + get: function () { return this.Fields["AppSizeHeight"]; }, + set: function (value) { this.Fields["AppSizeHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "DocUrl", { + get: function () { return this.Fields["DocUrl"]; }, + set: function (value) { this.Fields["DocUrl"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "OfficeJSVersion", { + get: function () { return this.Fields["OfficeJSVersion"]; }, + set: function (value) { this.Fields["OfficeJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostJSVersion", { + get: function () { return this.Fields["HostJSVersion"]; }, + set: function (value) { this.Fields["HostJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "WacHostEnvironment", { + get: function () { return this.Fields["WacHostEnvironment"]; }, + set: function (value) { this.Fields["WacHostEnvironment"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsFromWacAutomation", { + get: function () { return this.Fields["IsFromWacAutomation"]; }, + set: function (value) { this.Fields["IsFromWacAutomation"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsMOS", { + get: function () { return this.Fields["IsMOS"]; }, + set: function (value) { this.Fields["IsMOS"] = value; }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("AppId", this.AppId); + this.SetSerializedField("AppInstanceId", this.AppInstanceId); + this.SetSerializedField("AppURL", this.AppURL); + this.SetSerializedField("AssetId", this.AssetId); + this.SetSerializedField("Browser", this.Browser); + this.SetSerializedField("UserId", this.UserId); + this.SetSerializedField("Host", this.Host); + this.SetSerializedField("HostVersion", this.HostVersion); + this.SetSerializedField("ClientId", this.ClientId); + this.SetSerializedField("AppSizeWidth", this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight", this.AppSizeHeight); + this.SetSerializedField("Message", this.Message); + this.SetSerializedField("DocUrl", this.DocUrl); + this.SetSerializedField("OfficeJSVersion", this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion", this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment", this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation", this.IsFromWacAutomation); + this.SetSerializedField("IsMOS", this.IsMOS); + }; + return AppActivatedUsageData; + }(BaseUsageData)); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = (function (_super) { + __extends(ScriptLoadUsageData, _super); + function ScriptLoadUsageData() { + return _super.call(this, "ScriptLoad") || this; + } + Object.defineProperty(ScriptLoadUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ScriptId", { + get: function () { return this.Fields["ScriptId"]; }, + set: function (value) { this.Fields["ScriptId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "StartTime", { + get: function () { return this.Fields["StartTime"]; }, + set: function (value) { this.Fields["StartTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("ScriptId", this.ScriptId); + this.SetSerializedField("StartTime", this.StartTime); + this.SetSerializedField("ResponseTime", this.ResponseTime); + }; + return ScriptLoadUsageData; + }(BaseUsageData)); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = (function (_super) { + __extends(AppClosedUsageData, _super); + function AppClosedUsageData() { + return _super.call(this, "AppClosed") || this; + } + Object.defineProperty(AppClosedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "FocusTime", { + get: function () { return this.Fields["FocusTime"]; }, + set: function (value) { this.Fields["FocusTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalWidth", { + get: function () { return this.Fields["AppSizeFinalWidth"]; }, + set: function (value) { this.Fields["AppSizeFinalWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalHeight", { + get: function () { return this.Fields["AppSizeFinalHeight"]; }, + set: function (value) { this.Fields["AppSizeFinalHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "OpenTime", { + get: function () { return this.Fields["OpenTime"]; }, + set: function (value) { this.Fields["OpenTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "CloseMethod", { + get: function () { return this.Fields["CloseMethod"]; }, + set: function (value) { this.Fields["CloseMethod"] = value; }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("FocusTime", this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth", this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight", this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime", this.OpenTime); + this.SetSerializedField("CloseMethod", this.CloseMethod); + }; + return AppClosedUsageData; + }(BaseUsageData)); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = (function (_super) { + __extends(APIUsageUsageData, _super); + function APIUsageUsageData() { + return _super.call(this, "APIUsage") || this; + } + Object.defineProperty(APIUsageUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIType", { + get: function () { return this.Fields["APIType"]; }, + set: function (value) { this.Fields["APIType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIID", { + get: function () { return this.Fields["APIID"]; }, + set: function (value) { this.Fields["APIID"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "Parameters", { + get: function () { return this.Fields["Parameters"]; }, + set: function (value) { this.Fields["Parameters"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ErrorType", { + get: function () { return this.Fields["ErrorType"]; }, + set: function (value) { this.Fields["ErrorType"] = value; }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("APIType", this.APIType); + this.SetSerializedField("APIID", this.APIID); + this.SetSerializedField("Parameters", this.Parameters); + this.SetSerializedField("ResponseTime", this.ResponseTime); + this.SetSerializedField("ErrorType", this.ErrorType); + }; + return APIUsageUsageData; + }(BaseUsageData)); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = (function (_super) { + __extends(AppInitializationUsageData, _super); + function AppInitializationUsageData() { + return _super.call(this, "AppInitialization") || this; + } + Object.defineProperty(AppInitializationUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SuccessCode", { + get: function () { return this.Fields["SuccessCode"]; }, + set: function (value) { this.Fields["SuccessCode"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("SuccessCode", this.SuccessCode); + this.SetSerializedField("Message", this.Message); + }; + return AppInitializationUsageData; + }(BaseUsageData)); + OSFLog.AppInitializationUsageData = AppInitializationUsageData; + var CheckWACHostUsageData = (function (_super) { + __extends(CheckWACHostUsageData, _super); + function CheckWACHostUsageData() { + return _super.call(this, "CheckWACHost") || this; + } + Object.defineProperty(CheckWACHostUsageData.prototype, "isWacKnownHost", { + get: function () { return this.Fields["isWacKnownHost"]; }, + set: function (value) { this.Fields["isWacKnownHost"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "instanceId", { + get: function () { return this.Fields["instanceId"]; }, + set: function (value) { this.Fields["instanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostType", { + get: function () { return this.Fields["hostType"]; }, + set: function (value) { this.Fields["hostType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostPlatform", { + get: function () { return this.Fields["hostPlatform"]; }, + set: function (value) { this.Fields["hostPlatform"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "wacDomain", { + get: function () { return this.Fields["wacDomain"]; }, + set: function (value) { this.Fields["wacDomain"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "isLocalStorageAvailable", { + get: function () { return this.Fields["isLocalStorageAvailable"]; }, + set: function (value) { this.Fields["isLocalStorageAvailable"] = value; }, + enumerable: true, + configurable: true + }); + CheckWACHostUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("isWacKnownHost", this.isWacKnownHost); + this.SetSerializedField("instanceId", this.instanceId); + this.SetSerializedField("hostType", this.hostType); + this.SetSerializedField("hostPlatform", this.hostPlatform); + this.SetSerializedField("wacDomain", this.wacDomain); + this.SetSerializedField("isLocalStorageAvailable", this.isLocalStorageAvailable); + }; + return CheckWACHostUsageData; + }(BaseUsageData)); + OSFLog.CheckWACHostUsageData = CheckWACHostUsageData; +})(OSFLog || (OSFLog = {})); +var Logger; +(function (Logger) { + "use strict"; + var TraceLevel; + (function (TraceLevel) { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error"; + })(TraceLevel = Logger.TraceLevel || (Logger.TraceLevel = {})); + var SendFlag; + (function (SendFlag) { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush"; + })(SendFlag = Logger.SendFlag || (Logger.SendFlag = {})); + function allowUploadingData() { + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) { + } + Logger.sendLog = sendLog; + function creatULSEndpoint() { + try { + return new ULSEndpointProxy(); + } + catch (e) { + return null; + } + } + var ULSEndpointProxy = (function () { + function ULSEndpointProxy() { + } + ULSEndpointProxy.prototype.writeLog = function (log) { + }; + ULSEndpointProxy.prototype.loadProxyFrame = function () { + }; + return ULSEndpointProxy; + }()); + if (!OSF.Logger) { + OSF.Logger = Logger; + } + Logger.ulsEndpoint = creatULSEndpoint(); +})(Logger || (Logger = {})); +var OSFAriaLogger; +(function (OSFAriaLogger) { + var TelemetryEventAppActivated = { name: "AppActivated", enabled: true, critical: true, points: [ + { name: "Browser", type: "string" }, + { name: "Message", type: "string" }, + { name: "Host", type: "string" }, + { name: "AppSizeWidth", type: "int64" }, + { name: "AppSizeHeight", type: "int64" }, + { name: "IsFromWacAutomation", type: "string" }, + { name: "IsMOS", type: "int64" }, + ] }; + var TelemetryEventScriptLoad = { name: "ScriptLoad", enabled: true, critical: false, points: [ + { name: "ScriptId", type: "string" }, + { name: "StartTime", type: "double" }, + { name: "ResponseTime", type: "double" }, + ] }; + var enableAPIUsage = shouldAPIUsageBeEnabled(); + var TelemetryEventApiUsage = { name: "APIUsage", enabled: enableAPIUsage, critical: false, points: [ + { name: "APIType", type: "string" }, + { name: "APIID", type: "int64" }, + { name: "Parameters", type: "string" }, + { name: "ResponseTime", type: "int64" }, + { name: "ErrorType", type: "int64" }, + ] }; + var TelemetryEventAppInitialization = { name: "AppInitialization", enabled: true, critical: false, points: [ + { name: "SuccessCode", type: "int64" }, + { name: "Message", type: "string" }, + ] }; + var TelemetryEventAppClosed = { name: "AppClosed", enabled: true, critical: false, points: [ + { name: "FocusTime", type: "int64" }, + { name: "AppSizeFinalWidth", type: "int64" }, + { name: "AppSizeFinalHeight", type: "int64" }, + { name: "OpenTime", type: "int64" }, + ] }; + var TelemetryEventCheckWACHost = { name: "CheckWACHost", enabled: true, critical: false, points: [ + { name: "isWacKnownHost", type: "int64" }, + { name: "solutionId", type: "string" }, + { name: "hostType", type: "string" }, + { name: "hostPlatform", type: "string" }, + { name: "correlationId", type: "string" }, + { name: "isLocalStorageAvailable", type: "boolean" }, + ] }; + var TelemetryEvents = [ + TelemetryEventAppActivated, + TelemetryEventScriptLoad, + TelemetryEventApiUsage, + TelemetryEventAppInitialization, + TelemetryEventAppClosed, + TelemetryEventCheckWACHost, + ]; + function createDataField(value, point) { + var key = point.rename === undefined ? point.name : point.rename; + var type = point.type; + var field = undefined; + switch (type) { + case "string": + field = oteljs.makeStringDataField(key, value); + break; + case "double": + if (typeof value === "string") { + value = parseFloat(value); + } + field = oteljs.makeDoubleDataField(key, value); + break; + case "int64": + if (typeof value === "string") { + value = parseInt(value); + } + field = oteljs.makeInt64DataField(key, value); + break; + case "boolean": + if (typeof value === "string") { + value = value === "true"; + } + field = oteljs.makeBooleanDataField(key, value); + break; + } + return field; + } + function getEventDefinition(eventName) { + for (var _i = 0, TelemetryEvents_1 = TelemetryEvents; _i < TelemetryEvents_1.length; _i++) { + var event_1 = TelemetryEvents_1[_i]; + if (event_1.name === eventName) { + return event_1; + } + } + return undefined; + } + function eventEnabled(eventName) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return false; + } + return eventDefinition.enabled; + } + function shouldAPIUsageBeEnabled() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function generateTelemetryEvent(eventName, telemetryData) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return undefined; + } + var dataFields = []; + for (var _i = 0, _a = eventDefinition.points; _i < _a.length; _i++) { + var point = _a[_i]; + var key = point.name; + var value = telemetryData[key]; + if (value === undefined) { + continue; + } + var field = createDataField(value, point); + if (field !== undefined) { + dataFields.push(field); + } + } + var flags = { dataCategories: oteljs.DataCategories.ProductServiceUsage }; + if (eventDefinition.critical) { + flags.samplingPolicy = oteljs.SamplingPolicy.CriticalBusinessImpact; + } + flags.diagnosticLevel = oteljs.DiagnosticLevel.NecessaryServiceDataEvent; + var eventNameFull = "Office.Extensibility.OfficeJs." + eventName + "X"; + var event = { eventName: eventNameFull, dataFields: dataFields, eventFlags: flags }; + return event; + } + function sendOtelTelemetryEvent(eventName, telemetryData) { + if (eventEnabled(eventName)) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var event = generateTelemetryEvent(eventName, telemetryData); + if (event === undefined) { + return; + } + Microsoft.Office.WebExtension.sendTelemetryEvent(event); + }); + } + } + } + var AriaLogger = (function () { + function AriaLogger() { + } + AriaLogger.prototype.getAriaCDNLocation = function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "ariatelemetry/aria-web-telemetry.js"); + }; + AriaLogger.getInstance = function () { + if (AriaLogger.AriaLoggerObj === undefined) { + AriaLogger.AriaLoggerObj = new AriaLogger(); + } + return AriaLogger.AriaLoggerObj; + }; + AriaLogger.prototype.isIUsageData = function (arg) { + return arg["Fields"] !== undefined; + }; + AriaLogger.prototype.shouldSendDirectToAria = function (flavor, version) { + var BASE10 = 10; + var MAX_VERSION_WIN32 = [16, 0, 11601]; + var MAX_VERSION_MAC = [16, 28]; + var max_version; + if (!flavor) { + return false; + } + else if (flavor.toLowerCase() === "win32") { + max_version = MAX_VERSION_WIN32; + } + else if (flavor.toLowerCase() === "mac") { + max_version = MAX_VERSION_MAC; + } + else { + return true; + } + if (!version) { + return false; + } + var versionTokens = version.split('.'); + for (var i = 0; i < max_version.length && i < versionTokens.length; i++) { + var versionToken = parseInt(versionTokens[i], BASE10); + if (isNaN(versionToken)) { + return false; + } + if (versionToken < max_version[i]) { + return true; + } + if (versionToken > max_version[i]) { + return false; + } + } + return false; + }; + AriaLogger.prototype.isDirectToAriaEnabled = function () { + if (this.EnableDirectToAria === undefined || this.EnableDirectToAria === null) { + var flavor = void 0; + var version = void 0; + if (OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo) { + flavor = OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]; + } + if (window.external && typeof window.external.GetContext !== "undefined" && typeof window.external.GetContext().GetHostFullVersion !== "undefined") { + version = window.external.GetContext().GetHostFullVersion(); + } + this.EnableDirectToAria = this.shouldSendDirectToAria(flavor, version); + } + return this.EnableDirectToAria; + }; + AriaLogger.prototype.sendTelemetry = function (tableName, telemetryData) { + var startAfterMs = 1000; + var sendAriaEnabled = AriaLogger.EnableSendingTelemetryWithLegacyAria && this.isDirectToAriaEnabled(); + if (sendAriaEnabled) { + OSF.OUtil.loadScript(this.getAriaCDNLocation(), function () { + try { + if (!this.ALogger) { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); + } + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for (var key in telemetryData) { + if (key.toLowerCase() !== "table") { + eventProperties.setProperty(key, telemetryData[key]); + } + } + var today = new Date(); + eventProperties.setProperty("Date", today.toISOString()); + this.ALogger.logEvent(eventProperties); + } + catch (e) { + } + }, startAfterMs); + } + if (AriaLogger.EnableSendingTelemetryWithOTel) { + sendOtelTelemetryEvent(tableName, telemetryData); + } + }; + AriaLogger.prototype.logData = function (data) { + if (this.isIUsageData(data)) { + this.sendTelemetry(data["Table"], data["Fields"]); + } + else { + this.sendTelemetry(data["Table"], data); + } + }; + AriaLogger.EnableSendingTelemetryWithOTel = true; + AriaLogger.EnableSendingTelemetryWithLegacyAria = false; + return AriaLogger; + }()); + OSFAriaLogger.AriaLogger = AriaLogger; +})(OSFAriaLogger || (OSFAriaLogger = {})); +var OSFAppTelemetry; +(function (OSFAppTelemetry) { + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + var privateAddinId = "PRIVATE"; + OSFAppTelemetry.enableTelemetry = true; + ; + var AppInfo = (function () { + function AppInfo() { + } + return AppInfo; + }()); + OSFAppTelemetry.AppInfo = AppInfo; + var Event = (function () { + function Event(name, handler) { + this.name = name; + this.handler = handler; + } + return Event; + }()); + var AppStorage = (function () { + function AppStorage() { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set"; + } + AppStorage.prototype.getClientId = function () { + var clientId = this.getValue(this.clientIDKey); + if (!clientId || clientId.length <= 0 || clientId.length > 40) { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey, clientId); + } + return clientId; + }; + AppStorage.prototype.saveLog = function (logId, log) { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = ((logIdSet && logIdSet.length > 0) ? (logIdSet + ";") : "") + logId; + this.setValue(this.logIdSetKey, logIdSet); + this.setValue(logId, log); + }; + AppStorage.prototype.enumerateLog = function (callback, clean) { + var logIdSet = this.getValue(this.logIdSetKey); + if (logIdSet) { + var ids = logIdSet.split(";"); + for (var id in ids) { + var logId = ids[id]; + var log = this.getValue(logId); + if (log) { + if (callback) { + callback(logId, log); + } + if (clean) { + this.remove(logId); + } + } + } + if (clean) { + this.remove(this.logIdSetKey); + } + } + }; + AppStorage.prototype.getValue = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if (osfLocalStorage) { + value = osfLocalStorage.getItem(key); + } + return value; + }; + AppStorage.prototype.setValue = function (key, value) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + osfLocalStorage.setItem(key, value); + } + }; + AppStorage.prototype.remove = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + try { + osfLocalStorage.removeItem(key); + } + catch (ex) { + } + } + }; + return AppStorage; + }()); + var AppLogger = (function () { + function AppLogger() { + } + AppLogger.prototype.LogData = function (data) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } + }; + AppLogger.prototype.LogRawData = function (log) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); + } + catch (e) { + } + }; + return AppLogger; + }()); + function trimStringToLowerCase(input) { + if (input) { + input = input.replace(/[{}]/g, "").toLowerCase(); + } + return (input || ""); + } + function initialize(context) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + if (appInfo) { + return; + } + appInfo = new AppInfo(); + if (context.get_hostFullVersion()) { + appInfo.hostVersion = context.get_hostFullVersion(); + } + else { + appInfo.hostVersion = context.get_appVersion(); + } + appInfo.appId = canSendAddinId() ? context.get_id() : privateAddinId; + appInfo.marketplaceType = context._marketplaceType; + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage()).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if (appInfo.appInstanceId) { + appInfo.appInstanceId = trimStringToLowerCase(appInfo.appInstanceId); + appInfo.appInstanceId = getCompliantAppInstanceId(context.get_id(), appInfo.appInstanceId); + } + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "0.0.0.0"; + if (context._wacHostEnvironment) { + appInfo.wacHostEnvironment = context._wacHostEnvironment; + } + if (context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) { + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + } + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if (url) { + url = url.split("?")[0].split("#")[0]; + } + appInfo.isMos = isMos(); + appInfo.appURL = ""; + (function getUserIdAndAssetIdFromToken(token, appInfo) { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try { + xmlContent = decodeURIComponent(token); + parser = new DOMParser(); + xmlDoc = parser.parseFromString(xmlContent, "text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if (cidNode && cidNode.nodeValue) { + appInfo.userId = cidNode.nodeValue; + } + else if (oidNode && oidNode.nodeValue) { + appInfo.userId = oidNode.nodeValue; + } + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue; + } + catch (e) { + } + finally { + xmlContent = null; + xmlDoc = null; + parser = null; + } + })(context.get_eToken(), appInfo); + appInfo.sessionId = sessionId; + if (typeof OTel !== "undefined") { + OTel.OTelLogger.initialize(appInfo); + } + (function handleLifecycle() { + var startTime = new Date(); + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function () { + if (document.hasFocus()) { + if (lastFocus == null) { + lastFocus = new Date(); + } + } + else if (lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + }; + var eventList = []; + eventList.push(new Event("focus", adjustFocusTime)); + eventList.push(new Event("blur", adjustFocusTime)); + eventList.push(new Event("focusout", adjustFocusTime)); + eventList.push(new Event("focusin", adjustFocusTime)); + var exitFunction = function () { + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.removeEventListener(window, eventList[i].name, eventList[i].handler); + } + eventList.length = 0; + if (!finished) { + if (document.hasFocus() && lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date()).getTime() - startTime.getTime()), focusTime); + finished = true; + } + }; + eventList.push(new Event("beforeunload", exitFunction)); + eventList.push(new Event("unload", exitFunction)); + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.addEventListener(window, eventList[i].name, eventList[i].handler); + } + adjustFocusTime(); + })(); + OSFAppTelemetry.onAppActivated(); + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() { + if (!appInfo) { + return; + } + (new AppStorage()).enumerateLog(function (id, log) { return (new AppLogger()).LogRawData(log); }, true); + var data = new OSFLog.AppActivatedUsageData(); + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = ""; + data.UserId = ""; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if (appInfo.wacHostEnvironment) { + data.WacHostEnvironment = appInfo.wacHostEnvironment; + } + if (appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) { + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + } + data.IsMOS = appInfo.isMos ? 1 : 0; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) { + var data = new OSFLog.ScriptLoadUsageData(); + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) { + if (!appInfo) { + return; + } + if (!isAllowedHost() || !isAPIUsageEnabledDispId(id, apiType)) { + return; + } + var data = new OSFLog.APIUsageUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCallDone = onCallDone; + ; + function onMethodDone(id, args, msResponseTime, errorType) { + var parameters = null; + if (args) { + if (typeof args == "number") { + parameters = String(args); + } + else if (typeof args === "object") { + for (var index in args) { + if (parameters !== null) { + parameters += ","; + } + else { + parameters = ""; + } + if (typeof args[index] == "number") { + parameters += String(args[index]); + } + } + } + else { + parameters = ""; + } + } + OSF.AppTelemetry.onCallDone("method", id, parameters, msResponseTime, errorType); + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) { + OSF.AppTelemetry.onCallDone("property", -1, propertyName, msResponseTime); + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onCheckWACHost(isWacKnownHost, instanceId, hostType, hostPlatform, wacDomain, isLocalStorageAvailable) { + var data = new OSFLog.CheckWACHostUsageData(); + data.isWacKnownHost = isWacKnownHost; + data.instanceId = instanceId; + data.hostType = hostType; + data.hostPlatform = hostPlatform; + data.isLocalStorageAvailable = isLocalStorageAvailable; + data.wacDomain = ""; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCheckWACHost = onCheckWACHost; + function onEventDone(id, errorType) { + OSF.AppTelemetry.onCallDone("event", id, null, 0, errorType); + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent", id, null, msResponseTime, errorType); + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) { + if (!appInfo) { + return; + } + var data = new OSFLog.AppClosedUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage()).saveLog(sessionId, data.SerializeRow()); + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId); + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) { + var data = new OSFLog.AppInitializationUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) { + doAppInitializationLogging(false, message); + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) { + doAppInitializationLogging(true, errorMessage); + } + OSFAppTelemetry.logAppException = logAppException; + function isAllowedHost() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function isAPIUsageEnabledDispId(dispId, apiType) { + if (apiType === "method") { + switch (dispId) { + case 4: + case 38: + case 37: + case 10: + case 12: + case -10: + return true; + default: + return false; + } + } + return false; + } + function canSendAddinId() { + var isPublic = (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.PublicAddin) != 0; + if (isPublic) { + return isPublic; + } + if (!appInfo) { + return false; + } + var hostPlatform = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + var hostVersion = appInfo.hostVersion; + return _isComplianceExceptedHost(hostPlatform, hostVersion); + } + OSFAppTelemetry.canSendAddinId = canSendAddinId; + function getCompliantAppInstanceId(addinId, appInstanceId) { + if (!canSendAddinId() && appInstanceId === addinId) { + return privateAddinId; + } + return appInstanceId; + } + OSFAppTelemetry.getCompliantAppInstanceId = getCompliantAppInstanceId; + function _isComplianceExceptedHost(hostPlatform, hostVersion) { + var excepted = false; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(hostVersion); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (hostPlatform == "win32") { + if (major < 16 || major == 16 && build < 14225) { + excepted = true; + } + } + else if (hostPlatform == "mac") { + if (major < 16 || (major == 16 && (minor < 52 || minor == 52 && build < 808))) { + excepted = true; + } + } + } + return excepted; + } + OSFAppTelemetry._isComplianceExceptedHost = _isComplianceExceptedHost; + function isMos() { + return (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.IsMos) != 0; + } + OSFAppTelemetry.isMos = isMos; + OSF.AppTelemetry = OSFAppTelemetry; +})(OSFAppTelemetry || (OSFAppTelemetry = {})); +var OSFPerfUtil; +(function (OSFPerfUtil) { + function prepareDataFieldsForOtel(resource, name) { + name = name + "_Resource"; + if (oteljs !== undefined) { + return [ + oteljs.makeDoubleDataField(name + "_responseEnd", resource.responseEnd), + oteljs.makeDoubleDataField(name + "_responseStart", resource.responseStart), + oteljs.makeDoubleDataField(name + "_startTime", resource.startTime), + oteljs.makeDoubleDataField(name + "_transferSize", resource.transferSize) + ]; + } + } + function sendPerformanceTelemetry() { + if (typeof OTel !== "undefined" && OSF.AppTelemetry.enableTelemetry && typeof OSFPerformance !== "undefined" && typeof (performance) != "undefined" && performance.getEntriesByType) { + var hostPerfResource_1; + var officePerfResource_1; + var resources = performance.getEntriesByType("resource"); + resources.forEach(function (resource) { + var resourceName = resource.name.toLowerCase(); + if (OSF.OUtil.stringEndsWith(resourceName, OSFPerformance.hostSpecificFileName)) { + hostPerfResource_1 = resource; + } + else if (OSF.OUtil.stringEndsWith(resourceName, OSF.ConstantNames.OfficeDebugJS) || + OSF.OUtil.stringEndsWith(resourceName, OSF.ConstantNames.OfficeJS)) { + officePerfResource_1 = resource; + } + }); + OTel.OTelLogger.onTelemetryLoaded(function () { + var dataFields = prepareDataFieldsForOtel(hostPerfResource_1, "HostJs"); + dataFields = dataFields.concat(prepareDataFieldsForOtel(officePerfResource_1, "OfficeJs")); + dataFields = dataFields.concat([ + oteljs.makeDoubleDataField("officeExecuteStartDate", OSFPerformance.officeExecuteStartDate), + oteljs.makeDoubleDataField("officeExecuteStart", OSFPerformance.officeExecuteStart), + oteljs.makeDoubleDataField("officeExecuteEnd", OSFPerformance.officeExecuteEnd), + oteljs.makeDoubleDataField("hostInitializationStart", OSFPerformance.hostInitializationStart), + oteljs.makeDoubleDataField("hostInitializationEnd", OSFPerformance.hostInitializationEnd), + oteljs.makeDoubleDataField("totalJSHeapSize", OSFPerformance.totalJSHeapSize), + oteljs.makeDoubleDataField("usedJSHeapSize", OSFPerformance.usedJSHeapSize), + oteljs.makeDoubleDataField("jsHeapSizeLimit", OSFPerformance.jsHeapSizeLimit), + oteljs.makeDoubleDataField("getAppContextStart", OSFPerformance.getAppContextStart), + oteljs.makeDoubleDataField("getAppContextEnd", OSFPerformance.getAppContextEnd), + oteljs.makeDoubleDataField("createOMEnd", OSFPerformance.createOMEnd), + oteljs.makeDoubleDataField("officeOnReady", OSFPerformance.officeOnReady), + oteljs.makeBooleanDataField("isSharedRuntime", (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.SharedApp) !== 0) + ]); + Microsoft.Office.WebExtension.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.JSPerformanceTelemetryV06", + dataFields: dataFields, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage, + diagnosticLevel: oteljs.DiagnosticLevel.NecessaryServiceDataEvent + } + }); + }); + } + } + OSFPerfUtil.sendPerformanceTelemetry = sendPerformanceTelemetry; +})(OSFPerfUtil || (OSFPerfUtil = {})); +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } + } +}; +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() { + var events = []; + for (var eventName in this._eventHandlers) + events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); + return events; + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) { + for (var eventName in this._eventHandlers) { + if (event == eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event == eventName) + return true; + } + return false; + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) + return true; + } + } + return false; + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._eventHandlers[eventType]; + if (handlers && !this.hasEventHandler(eventType, handler)) { + handlers.push(handler); + return true; + } + else { + return false; + } + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true; + } + return false; + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType, handler); + if (isFirstHandler && succeed) { + this.fireQueuedEvent(eventType); + } + return succeed; + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var index = 0; index < handlers.length; index++) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + return true; + } + } + } + return false; + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { + if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { + this._eventHandlers[eventType] = []; + return true; + } + return false; + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) { + this._objectEventHandlers[eventType][objectId] = []; + return true; + } + return false; + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } + return true; + } + else { + return false; + } + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if (_handlers != null) { + for (var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length == 0) { + queuedEvents.push(eventArgs); + } + else { + this.fireEvent(eventArgs); + } + return true; + } + else { + return false; + } + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length > 0) { + var eventHandler = eventHandlers[0]; + while (queuedEvents.length > 0) { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs); + } + return true; + } + } + return false; + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var queuedEvents = this._queuedEventsArgs[eventType]; + if (queuedEvents) { + this._queuedEventsArgs[eventType] = []; + } + } + } +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { + var args; + switch (eventType) { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties, target.document), eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties, target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" && OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + OSF.DDA.convertOlkAppointmentTimeToDateFormat(args); + } + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecurrenceChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecurrenceChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AttachmentsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAttachmentsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.InfobarClicked: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkInfobarClickedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSelectedItemsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSensitivityLabelChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + return args; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + "types": ["function", "object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [] +}); +OSF.DialogShownStatus = { hasDialogShown: false, isWindowDialog: false }; +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogMessageReceivedEvent: "DialogMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + MessageType: "messageType", + MessageContent: "messageContent", + MessageOrigin: "messageOrigin" +}); +OSF.DDA.DialogEventType = {}; +OSF.OUtil.augmentList(OSF.DDA.DialogEventType, { + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" +}); +OSF.DDA.AsyncMethodNames.addNames({ + DisplayDialogAsync: "displayDialogAsync", + DisplayModalDialogAsync: "displayModalDialogAsync", + CloseAsync: "close" +}); +OSF.DDA.SyncMethodNames.addNames({ + MessageParent: "messageParent", + MessageChild: "messageChild", + SendMessage: "sendMessage", + AddMessageHandler: "addEventHandler" +}); +OSF.DDA.UI.ParentUI = function OSF_DDA_ParentUI() { + var eventDispatch; + if (Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived != null) { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived, + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + ]); + } + else { + eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived + ]); + } + var target = this; + var defineDialogApi = function (apiName, isModalApi) { + if (!target[apiName]) { + OSF.OUtil.defineEnumerableProperty(target, apiName, { + value: function () { + var openDialog = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments, eventDispatch, target, isModalApi); + } + }); + } + }; + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName, false); + if (Microsoft.Office.WebExtension.FeatureGates["ModalWebDialogAPI"]) { + defineDialogApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName, true); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DDA.UI.ChildUI = function OSF_DDA_ChildUI(isPopupWindow) { + var messageParentName = OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target = this; + if (!target[messageParentName]) { + OSF.OUtil.defineEnumerableProperty(target, messageParentName, { + value: function () { + var messageParent = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments, target); + } + }); + } + var addEventHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if (!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch != "undefined") { + OSF.DDA.DispIdHost.addEventSupport(target, OSF.DialogParentMessageEventDispatch, isPopupWindow); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DialogHandler = function OSF_DialogHandler() { }; +OSF.DDA.DialogEventArgs = function OSF_DDA_DialogEventArgs(message) { + if (message[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogMessageReceived) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); + } + else { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogEventReceived + }, + "error": { + value: message[OSF.DDA.PropertyDescriptors.MessageType] + } + }); + } +}; +OSF.DDA.DialogParentEventArgs = function OSF_DDA_DialogParentEventArgs(message) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.DDA.PropertyDescriptors.MessageOrigin] + } + }); +}; +var DialogApiManager = (function () { + function DialogApiManager() { + } + DialogApiManager.defineApi = function (apiName, supportedOptions) { + var asyncMethodCalls = OSF.DDA.AsyncMethodCalls; + asyncMethodCalls.define({ + method: apiName, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: supportedOptions, + privateStateCallbacks: [], + onSucceeded: function (args, caller, callArgs) { + var targetId = args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch = args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog = new OSF.DialogHandler(); + var closeDialog = OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, closeDialog, { + value: function () { + var closeDialogfunction = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments, targetId, eventDispatch, dialog); + } + }); + var addHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, addHandler, { + value: function () { + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(arguments, dialog, eventDispatch); + var eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType, handler); + } + }); + if (OSF.DDA.UI.EnableSendMessageDialogAPI === true) { + var sendMessage = OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, sendMessage, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var messageChild = OSF.DDA.SyncMethodNames.MessageChild.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, messageChild, { + value: function () { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + } + return dialog; + }, + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs] = true; + } + return callArgs; + } + }); + }; + DialogApiManager.messageChildRichApiBridge = function () { + if (OSF.DDA.UI.EnableMessageChildDialogAPI === true) { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, null, null); + } + }; + DialogApiManager.initOnce = function () { + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync, DialogApiManager.displayDialogAsyncApiSupportedOptions); + DialogApiManager.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync, DialogApiManager.displayModalDialogAsyncApiSupportedOptions); + }; + DialogApiManager.displayDialogAsyncApiSupportedOptions = [ + { + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.EnforceAppDomain, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]; + DialogApiManager.displayModalDialogAsyncApiSupportedOptions = DialogApiManager.displayDialogAsyncApiSupportedOptions.concat([ + { + name: "abortWhenParentIsMinimized", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: "abortWhenDocIsInactive", + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + ]); + return DialogApiManager; +}()); +DialogApiManager.initOnce(); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageToParent, + "types": ["string", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageContent, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.openDialog = function OSF_DDA_SafeArray_Delegate$OpenDialog(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + OSF.ClientHostController.openDialog(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.closeDialog = function OSF_DDA_SafeArray_Delegate$CloseDialog(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.closeDialog(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.messageParent = function OSF_DDA_SafeArray_Delegate$MessageParent(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime = (new Date()).getTime(); + var result = OSF.ClientHostController.messageParent(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), result); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: 1 }, + { name: OSF.DDA.PropertyDescriptors.MessageOrigin, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.sendMessage = function OSF_DDA_SafeArray_Delegate$SendMessage(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime = (new Date()).getTime(); + var result = OSF.ClientHostController.sendMessage(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogParentMessageReceivedEvent: "DialogParentMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogParentMessageReceived: "dialogParentMessageReceived", + DialogParentEventReceived: "dialogParentEventReceived" +}); +OSF.DialogParentMessageEventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogParentEventReceived +]); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: 1 }, + { name: OSF.DDA.PropertyDescriptors.MessageOrigin, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.UI.EnableMessageChildDialogAPI = true; +Microsoft.Office.WebExtension.TableData = function Microsoft_Office_WebExtension_TableData(rows, headers) { + function fixData(data) { + if (data == null || data == undefined) { + return null; + } + try { + for (var dim = OSF.DDA.DataCoercion.findArrayDimensionality(data, 2); dim < 2; dim++) { + data = [data]; + } + return data; + } + catch (ex) { + } + } + ; + OSF.OUtil.defineEnumerableProperties(this, { + "headers": { + get: function () { return headers; }, + set: function (value) { + headers = fixData(value); + } + }, + "rows": { + get: function () { return rows; }, + set: function (value) { + rows = (value == null || (OSF.OUtil.isArray(value) && (value.length == 0))) ? + [] : + fixData(value); + } + } + }); + this.headers = headers; + this.rows = rows; +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureTableData = function OSF_DDA_OMFactory$manufactureTableData(tableDataProperties) { + return new Microsoft.Office.WebExtension.TableData(tableDataProperties[OSF.DDA.TableDataProperties.TableRows], tableDataProperties[OSF.DDA.TableDataProperties.TableHeaders]); +}; +Microsoft.Office.WebExtension.CoercionType = { + Text: "text", + Matrix: "matrix", + Table: "table" +}; +OSF.DDA.DataCoercion = (function OSF_DDA_DataCoercion() { + return { + findArrayDimensionality: function OSF_DDA_DataCoercion$findArrayDimensionality(obj) { + if (OSF.OUtil.isArray(obj)) { + var dim = 0; + for (var index = 0; index < obj.length; index++) { + dim = Math.max(dim, OSF.DDA.DataCoercion.findArrayDimensionality(obj[index])); + } + return dim + 1; + } + else { + return 0; + } + }, + getCoercionDefaultForBinding: function OSF_DDA_DataCoercion$getCoercionDefaultForBinding(bindingType) { + switch (bindingType) { + case Microsoft.Office.WebExtension.BindingType.Matrix: return Microsoft.Office.WebExtension.CoercionType.Matrix; + case Microsoft.Office.WebExtension.BindingType.Table: return Microsoft.Office.WebExtension.CoercionType.Table; + case Microsoft.Office.WebExtension.BindingType.Text: + default: + return Microsoft.Office.WebExtension.CoercionType.Text; + } + }, + getBindingDefaultForCoercion: function OSF_DDA_DataCoercion$getBindingDefaultForCoercion(coercionType) { + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Matrix: return Microsoft.Office.WebExtension.BindingType.Matrix; + case Microsoft.Office.WebExtension.CoercionType.Table: return Microsoft.Office.WebExtension.BindingType.Table; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + return Microsoft.Office.WebExtension.BindingType.Text; + } + }, + determineCoercionType: function OSF_DDA_DataCoercion$determineCoercionType(data) { + if (data == null || data == undefined) + return null; + var sourceType = null; + var runtimeType = typeof data; + if (data.rows !== undefined) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Table; + } + else if (OSF.OUtil.isArray(data)) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Matrix; + } + else if (runtimeType == "string" || runtimeType == "number" || runtimeType == "boolean" || OSF.OUtil.isDate(data)) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Text; + } + else { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject; + } + return sourceType; + }, + coerceData: function OSF_DDA_DataCoercion$coerceData(data, destinationType, sourceType) { + sourceType = sourceType || OSF.DDA.DataCoercion.determineCoercionType(data); + if (sourceType && sourceType != destinationType) { + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin); + data = OSF.DDA.DataCoercion._coerceDataFromTable(destinationType, OSF.DDA.DataCoercion._coerceDataToTable(data, sourceType)); + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd); + } + return data; + }, + _matrixToText: function OSF_DDA_DataCoercion$_matrixToText(matrix) { + if (matrix.length == 1 && matrix[0].length == 1) + return "" + matrix[0][0]; + var val = ""; + for (var i = 0; i < matrix.length; i++) { + val += matrix[i].join("\t") + "\n"; + } + return val.substring(0, val.length - 1); + }, + _textToMatrix: function OSF_DDA_DataCoercion$_textToMatrix(text) { + var ret = text.split("\n"); + for (var i = 0; i < ret.length; i++) + ret[i] = ret[i].split("\t"); + return ret; + }, + _tableToText: function OSF_DDA_DataCoercion$_tableToText(table) { + var headers = ""; + if (table.headers != null) { + headers = OSF.DDA.DataCoercion._matrixToText([table.headers]) + "\n"; + } + var rows = OSF.DDA.DataCoercion._matrixToText(table.rows); + if (rows == "") { + headers = headers.substring(0, headers.length - 1); + } + return headers + rows; + }, + _tableToMatrix: function OSF_DDA_DataCoercion$_tableToMatrix(table) { + var matrix = table.rows; + if (table.headers != null) { + matrix.unshift(table.headers); + } + return matrix; + }, + _coerceDataFromTable: function OSF_DDA_DataCoercion$_coerceDataFromTable(coercionType, table) { + var value; + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value = table; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value = OSF.DDA.DataCoercion._tableToMatrix(table); + break; + case Microsoft.Office.WebExtension.CoercionType.SlideRange: + value = null; + if (OSF.DDA.OMFactory.manufactureSlideRange) { + value = OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(table)); + } + if (value == null) { + value = OSF.DDA.DataCoercion._tableToText(table); + } + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value = OSF.DDA.DataCoercion._tableToText(table); + break; + } + return value; + }, + _coerceDataToTable: function OSF_DDA_DataCoercion$_coerceDataToTable(data, sourceType) { + if (sourceType == undefined) { + sourceType = OSF.DDA.DataCoercion.determineCoercionType(data); + } + var value; + switch (sourceType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value = data; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value = new Microsoft.Office.WebExtension.TableData(data); + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value = new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(data)); + break; + } + return value; + } + }; +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.CoercionType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.CoercionType.Table, value: 2 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + GetSelectedDataAsync: "getSelectedDataAsync", + SetSelectedDataAsync: "setSelectedDataAsync" +}); +(function () { + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] != undefined || data[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) { + data = OSF.DDA.OMFactory.manufactureTableData(data); + } + data = OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data == undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CoercionType, + "enum": Microsoft.Office.WebExtension.CoercionType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + } + ], + privateStateCallbacks: [], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageLeft, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageTop, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetSelectedDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageLeft, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageTop, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageWidth, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageHeight, value: 5 }, + ] +}); +OSF.DDA.SettingsManager = { + SerializedSettings: "serializedSettings", + RefreshingSettings: "refreshingSettings", + DateJSONPrefix: "Date(", + DataJSONSuffix: ")", + serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { + return OSF.OUtil.serializeSettings(settingsCollection); + }, + deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { + return OSF.OUtil.deserializeSettings(serializedSettings); + } +}; +OSF.DDA.Settings = function OSF_DDA_Settings(settings) { + settings = settings || {}; + var cacheSessionSettings = function (settings) { + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var serializedSettings = OSF.DDA.SettingsManager.serializeSettings(settings); + var storageSettings = JSON ? JSON.stringify(serializedSettings) : Sys.Serialization.JavaScriptSerializer.serialize(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + }; + OSF.OUtil.defineEnumerableProperties(this, { + "get": { + value: function OSF_DDA_Settings$get(name) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + var setting = settings[name]; + return typeof (setting) === 'undefined' ? null : setting; + } + }, + "set": { + value: function OSF_DDA_Settings$set(name, value) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false }, + { name: "value", mayBeNull: true } + ]); + if (e) + throw e; + settings[name] = value; + cacheSessionSettings(settings); + } + }, + "remove": { + value: function OSF_DDA_Settings$remove(name) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete settings[name]; + cacheSessionSettings(settings); + } + } + }); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.SaveAsync], settings); +}; +OSF.DDA.RefreshableSettings = function OSF_DDA_RefreshableSettings(settings) { + OSF.DDA.RefreshableSettings.uber.constructor.call(this, settings); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.RefreshAsync], settings); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged])); +}; +OSF.OUtil.extend(OSF.DDA.RefreshableSettings, OSF.DDA.Settings); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + SettingsChanged: "settingsChanged" +}); +OSF.DDA.SettingsChangedEventArgs = function OSF_DDA_SettingsChangedEventArgs(settingsInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.SettingsChanged + }, + "settings": { + value: settingsInstance + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ + RefreshAsync: "refreshAsync", + SaveAsync: "saveAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RefreshAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.RefreshingSettings, + value: function getRefreshingSettings(settingsInstance, settingsCollection) { + return settingsCollection; + } + } + ], + onSucceeded: function deserializeSettings(serializedSettingsDescriptor, refreshingSettings, refreshingSettingsArgs) { + var serializedSettings = serializedSettingsDescriptor[OSF.DDA.SettingsManager.SerializedSettings]; + var newSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + var oldSettings = refreshingSettingsArgs[OSF.DDA.SettingsManager.RefreshingSettings]; + for (var setting in oldSettings) { + refreshingSettings.remove(setting); + } + for (var setting in newSettings) { + refreshingSettings.set(setting, newSettings[setting]); + } + return refreshingSettings; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SaveAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, + value: { + "types": ["boolean"], + "defaultValue": true + } + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.SerializedSettings, + value: function serializeSettings(settingsInstance, settingsCollection) { + return OSF.DDA.SettingsManager.serializeSettings(settingsCollection); + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidLoadSettingsMethod, + fromHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSaveSettingsMethod, + toHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SettingsManager.SerializedSettings }, + { name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, value: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidSettingsChangedEvent }); +OSF.DDA.AsyncMethodNames.addNames({ + GetOfficeThemeAsync: "getOfficeThemeAsync", + GetDocumentThemeAsync: "getDocumentThemeAsync" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + OfficeThemeChanged: "officeThemeChanged", + DocumentThemeChanged: "documentThemeChanged" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.Parameters, { + DocumentTheme: "documentTheme", + OfficeTheme: "officeTheme" +}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DocumentThemeChangedEvent: "DocumentThemeChangedEvent", + OfficeThemeChangedEvent: "OfficeThemeChangedEvent" +}); +OSF.OUtil.setNamespace("Theming", OSF.DDA); +OSF.DDA.Theming.OfficeThemeEnum = { + BodyForegroundColor: "bodyForegroundColor", + BodyBackgroundColor: "bodyBackgroundColor", + ControlForegroundColor: "controlForegroundColor", + ControlBackgroundColor: "controlBackgroundColor", + ThemeId: "themeId", + IsDarkTheme: "isDarkTheme" +}; +OSF.DDA.Theming.OfficeThemeEnumWac = { + PrimaryFontColor: "primaryFontColor", + PrimaryBackgroundColor: "primaryBackgroundColor", + SecondaryFontColor: "secondaryFontColor", + SecondaryBackgroundColor: "secondaryBackgroundColor", + IsDarkTheme: "isDarkTheme" +}; +OSF.DDA.Theming.DocumentThemeEnum = { + PrimaryFontColor: "primaryFontColor", + PrimaryBackgroundColor: "primaryBackgroundColor", + SecondaryFontColor: "secondaryFontColor", + SecondaryBackgroundColor: "secondaryBackgroundColor", + Accent1: "accent1", + Accent2: "accent2", + Accent3: "accent3", + Accent4: "accent4", + Accent5: "accent5", + Accent6: "accent6", + Hyperlink: "hyperlink", + FollowedHyperlink: "followedHyperlink", + HeaderLatinFont: "headerLatinFont", + HeaderEastAsianFont: "headerEastAsianFont", + HeaderScriptFont: "headerScriptFont", + HeaderLocalizedFont: "headerLocalizedFont", + BodyLatinFont: "bodyLatinFont", + BodyEastAsianFont: "bodyEastAsianFont", + BodyScriptFont: "bodyScriptFont", + BodyLocalizedFont: "bodyLocalizedFont" +}; +OSF.DDA.Theming.GetIsDarkThemeFromCSSHexColor = function OSF_DDA_Theming_GetIsDarkThemeFromCSSHexColor(themeColor) { + var color = themeColor.charAt(0) === "#" ? themeColor.substring(1, 7) : themeColor; + var r = parseInt(color.substring(0, 2), 16); + var g = parseInt(color.substring(2, 4), 16); + var b = parseInt(color.substring(4, 6), 16); + var fIsDarkTheme = r * 0.299 + g * 0.587 + b * 0.114 < 186 ? true : false; + return fIsDarkTheme; +}; +OSF.DDA.Theming.ConvertToDocumentTheme = function OSF_DDA_Theming_ConvertToDocumentTheme(response) { + var mappingDocumentTheme = [ + { name: "primaryFontColor", needToConvertToHex: true }, + { name: "primaryBackgroundColor", needToConvertToHex: true }, + { name: "secondaryFontColor", needToConvertToHex: true }, + { name: "secondaryBackgroundColor", needToConvertToHex: true }, + { name: "accent1", needToConvertToHex: true }, + { name: "accent2", needToConvertToHex: true }, + { name: "accent3", needToConvertToHex: true }, + { name: "accent4", needToConvertToHex: true }, + { name: "accent5", needToConvertToHex: true }, + { name: "accent6", needToConvertToHex: true }, + { name: "hyperlink", needToConvertToHex: true }, + { name: "followedHyperlink", needToConvertToHex: true }, + { name: "headerLatinFont", needToConvertToHex: false }, + { name: "headerEastAsianFont", needToConvertToHex: false }, + { name: "headerScriptFont", needToConvertToHex: false }, + { name: "headerLocalizedFont", needToConvertToHex: false }, + { name: "bodyLatinFont", needToConvertToHex: false }, + { name: "bodyEastAsianFont", needToConvertToHex: false }, + { name: "bodyScriptFont", needToConvertToHex: false }, + { name: "bodyLocalizedFont", needToConvertToHex: false } + ]; + var result = {}; + for (var i = 0; i < mappingDocumentTheme.length; i++) { + if (mappingDocumentTheme[i].needToConvertToHex) { + result[mappingDocumentTheme[i].name] = OSF.OUtil.convertIntToCssHexColor(response[mappingDocumentTheme[i].name]); + } + else { + result[mappingDocumentTheme[i].name] = response[mappingDocumentTheme[i].name]; + } + } + return result; +}; +OSF.DDA.Theming.ConvertToOfficeTheme = function OSF_DDA_Theming_ConvertToOfficeTheme(response) { + var officeThemeInfo = {}; + if (response) { + var themeKeys = OSF.DDA.Theming.OfficeThemeEnum; + var themeNameMapping = { + bodyBackgroundColor: { name: themeKeys.BodyBackgroundColor, convertToHex: true }, + bodyForegroundColor: { name: themeKeys.BodyForegroundColor, convertToHex: true }, + controlBackgroundColor: { name: themeKeys.ControlBackgroundColor, convertToHex: true }, + controlForegroundColor: { name: themeKeys.ControlForegroundColor, convertToHex: true }, + primaryFontColor: { name: themeKeys.BodyForegroundColor, convertToHex: true }, + primaryBackgroundColor: { name: themeKeys.BodyBackgroundColor, convertToHex: true }, + secondaryFontColor: { name: themeKeys.ControlBackgroundColor, convertToHex: true }, + secondaryBackgroundColor: { name: themeKeys.ControlForegroundColor, convertToHex: true } + }; + for (var srcThemePropName in response) { + var fNeedToConvertToCSSHex = false; + var targetThemePropName = srcThemePropName; + if (themeNameMapping[srcThemePropName]) { + targetThemePropName = themeNameMapping[srcThemePropName].name; + fNeedToConvertToCSSHex = themeNameMapping[srcThemePropName].convertToHex; + } + officeThemeInfo[targetThemePropName] = fNeedToConvertToCSSHex ? OSF.OUtil.convertIntToCssHexColor(response[srcThemePropName]) : response[srcThemePropName]; + } + if (officeThemeInfo[themeKeys.IsDarkTheme] == undefined) { + officeThemeInfo[themeKeys.IsDarkTheme] = OSF.DDA.Theming.GetIsDarkThemeFromCSSHexColor(officeThemeInfo[themeKeys.BodyBackgroundColor]); + } + } + return officeThemeInfo; +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: OSF.DDA.Theming.ConvertToDocumentTheme +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: OSF.DDA.Theming.ConvertToOfficeTheme +}); +OSF.DDA.Theming.OfficeThemeChangedEventArgs = function OSF_DDA_Theming_OfficeThemeChangedEventArgs(officeThemeData) { + var ret = null; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web") { + ret = officeThemeData; + } + else { + ret = OSF.DDA.Theming.ConvertToOfficeTheme(officeThemeData); + } + ret.isDarkTheme = OSF.DDA.Theming.GetIsDarkThemeFromCSSHexColor(ret.bodyBackgroundColor); + if ((hostInfo.hostPlatform.toLowerCase() == "web") || + (hostInfo.hostPlatform.toLowerCase() == "mac") || + (hostInfo.hostPlatform.toLowerCase() == "ios")) { + var context = OSF._OfficeAppFactory.getContext(); + if (context && context.officeTheme) { + context.officeTheme.bodyBackgroundColor = ret.bodyBackgroundColor; + context.officeTheme.bodyForegroundColor = ret.bodyForegroundColor; + context.officeTheme.controlBackgroundColor = ret.controlBackgroundColor; + context.officeTheme.controlBackgroundColor = ret.controlBackgroundColor; + context.officeTheme.isDarkTheme = ret.isDarkTheme; + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.OfficeThemeChanged + }, + "officeTheme": { + value: ret + } + }); +}; +OSF.DDA.Theming.DocumentThemeChangedEventArgs = function OSF_DDA_Theming_DocumentThemeChangedEventArgs(documentTheme) { + var ret = OSF.DDA.Theming.ConvertToDocumentTheme(documentTheme); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DocumentThemeChanged + }, + "documentTheme": { + value: ret + } + }); +}; +var OSF_DDA_Theming_InternalThemeHandler = (function () { + function OSF_DDA_Theming_InternalThemeHandler() { + this._pseudoDocumentObject = null; + this._eventTarget = null; + this._previousDocumentThemeData = null; + this._previousOfficeThemeData = null; + this._officeCss = null; + this._asyncCallsCompleted = null; + this._isPublicThemeManager = false; + this._onAsyncCallsCompleted = null; + } + OSF_DDA_Theming_InternalThemeHandler.prototype.InitializeThemeManager = function () { + this._isPublicThemeManager = true; + this._eventTarget = this; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync, + OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.OfficeThemeChanged, + Microsoft.Office.WebExtension.EventType.DocumentThemeChanged + ])); + }; + OSF_DDA_Theming_InternalThemeHandler.prototype.InitializeAndChangeOnce = function (callback) { + this._officeCss = this._getOfficeThemesCss(); + if (!this._officeCss) { + if (callback) { + callback(); + } + return; + } + this._onAsyncCallsCompleted = callback; + this._pseudoDocumentObject = {}; + var pseudoDoc = this._pseudoDocumentObject; + if (!this._isPublicThemeManager) { + OSF.DDA.DispIdHost.addAsyncMethods(pseudoDoc, [ + OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync, + OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(pseudoDoc, new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.OfficeThemeChanged, + Microsoft.Office.WebExtension.EventType.DocumentThemeChanged + ])); + } + this._asyncCallsCompleted = {}; + this._asyncCallsCompleted[OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync] = false; + this._asyncCallsCompleted[OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync] = false; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (this._isPublicThemeManager) { + if (hostInfo && (hostInfo.hostType.toLowerCase() != Microsoft.Office.WebExtension.HostType.Word.toLowerCase())) { + this._getAndProcessThemeData(this._eventTarget.getDocumentThemeAsync, Function.createDelegate(this, this._processDocumentThemeData), OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync); + } + this._getAndProcessThemeData(this._eventTarget.getOfficeThemeAsync, Function.createDelegate(this, this._processOfficeThemeData), OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync); + } + else { + if (hostInfo && (hostInfo.hostType.toLowerCase() != Microsoft.Office.WebExtension.HostType.Word.toLowerCase())) { + this._getAndProcessThemeData(pseudoDoc.getDocumentThemeAsync, Function.createDelegate(this, this._processDocumentThemeData), OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync); + } + this._getAndProcessThemeData(pseudoDoc.getOfficeThemeAsync, Function.createDelegate(this, this._processOfficeThemeData), OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync); + } + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._getOfficeThemesCss = function () { + function getOfficeThemesCssInternal() { + var cssFileName = "officethemes.css"; + for (var i = 0; i < document.styleSheets.length; i++) { + var ss = document.styleSheets[i]; + if (!ss.disabled + && ss.href + && cssFileName == ss.href.substring(ss.href.length - cssFileName.length, ss.href.length).toLowerCase()) { + if ((!ss.cssRules) && (!ss.rules)) { + return null; + } + else { + return ss; + } + } + } + } + try { + return getOfficeThemesCssInternal(); + } + catch (e) { + return null; + } + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._changeCss = function (officeCss, selector, newRule) { + var length = officeCss.cssRules ? officeCss.cssRules.length : officeCss.rules.length; + for (var i = 0; i < length; i++) { + var rule; + if (officeCss.cssRules) { + rule = officeCss.cssRules[i]; + } + else { + rule = officeCss.rules[i]; + } + var ruleSelector = rule.selectorText; + if (ruleSelector && ruleSelector.toLowerCase() == selector.toLowerCase()) { + if (officeCss.cssRules) { + officeCss.deleteRule(i); + officeCss.insertRule(ruleSelector + newRule, i); + } + else { + officeCss.removeRule(i); + officeCss.addRule(ruleSelector, newRule, i); + } + } + } + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._changeDocumentThemeData = function (data) { + var documentThemeCssMapping = [ + { name: "primaryFontColor", cssSelector: ".office-docTheme-primary-fontColor", cssProperty: "color" }, + { name: "primaryBackgroundColor", cssSelector: ".office-docTheme-primary-bgColor", cssProperty: "background-color" }, + { name: "secondaryFontColor", cssSelector: ".office-docTheme-secondary-fontColor", cssProperty: "color" }, + { name: "secondaryBackgroundColor", cssSelector: ".office-docTheme-secondary-bgColor", cssProperty: "background-color" }, + { name: "accent1", cssSelector: ".office-contentAccent1-color", cssProperty: "color" }, + { name: "accent2", cssSelector: ".office-contentAccent2-color", cssProperty: "color" }, + { name: "accent3", cssSelector: ".office-contentAccent3-color", cssProperty: "color" }, + { name: "accent4", cssSelector: ".office-contentAccent4-color", cssProperty: "color" }, + { name: "accent5", cssSelector: ".office-contentAccent5-color", cssProperty: "color" }, + { name: "accent6", cssSelector: ".office-contentAccent6-color", cssProperty: "color" }, + { name: "accent1", cssSelector: ".office-contentAccent1-bgColor", cssProperty: "background-color" }, + { name: "accent2", cssSelector: ".office-contentAccent2-bgColor", cssProperty: "background-color" }, + { name: "accent3", cssSelector: ".office-contentAccent3-bgColor", cssProperty: "background-color" }, + { name: "accent4", cssSelector: ".office-contentAccent4-bgColor", cssProperty: "background-color" }, + { name: "accent5", cssSelector: ".office-contentAccent5-bgColor", cssProperty: "background-color" }, + { name: "accent6", cssSelector: ".office-contentAccent6-bgColor", cssProperty: "background-color" }, + { name: "accent1", cssSelector: ".office-contentAccent1-borderColor", cssProperty: "border-color" }, + { name: "accent2", cssSelector: ".office-contentAccent2-borderColor", cssProperty: "border-color" }, + { name: "accent3", cssSelector: ".office-contentAccent3-borderColor", cssProperty: "border-color" }, + { name: "accent4", cssSelector: ".office-contentAccent4-borderColor", cssProperty: "border-color" }, + { name: "accent5", cssSelector: ".office-contentAccent5-borderColor", cssProperty: "border-color" }, + { name: "accent6", cssSelector: ".office-contentAccent6-borderColor", cssProperty: "border-color" }, + { name: "hyperlink", cssSelector: ".office-a", cssProperty: "color" }, + { name: "followedHyperlink", cssSelector: ".office-a:visited", cssProperty: "color" }, + { name: "headerLatinFont", cssSelector: ".office-headerFont-latin", cssProperty: "font-family" }, + { name: "headerEastAsianFont", cssSelector: ".office-headerFont-eastAsian", cssProperty: "font-family" }, + { name: "headerScriptFont", cssSelector: ".office-headerFont-script", cssProperty: "font-family" }, + { name: "headerLocalizedFont", cssSelector: ".office-headerFont-localized", cssProperty: "font-family" }, + { name: "bodyLatinFont", cssSelector: ".office-bodyFont-latin", cssProperty: "font-family" }, + { name: "bodyEastAsianFont", cssSelector: ".office-bodyFont-eastAsian", cssProperty: "font-family" }, + { name: "bodyScriptFont", cssSelector: ".office-bodyFont-script", cssProperty: "font-family" }, + { name: "bodyLocalizedFont", cssSelector: ".office-bodyFont-localized", cssProperty: "font-family" } + ]; + var realData = data.type == Microsoft.Office.WebExtension.EventType.DocumentThemeChanged ? data.documentTheme : data; + for (var i = 0; i < documentThemeCssMapping.length; i++) { + if (this._previousDocumentThemeData === null || this._previousDocumentThemeData[documentThemeCssMapping[i].name] != realData[documentThemeCssMapping[i].name]) { + if (realData[documentThemeCssMapping[i].name] != null && realData[documentThemeCssMapping[i].name] != "") { + var insertableText = realData[documentThemeCssMapping[i].name]; + if (documentThemeCssMapping[i].cssProperty === "font-family") { + insertableText = '"' + insertableText.replace(new RegExp("\"", "g"), '\\"') + '"'; + } + this._changeCss(this._officeCss, documentThemeCssMapping[i].cssSelector, "{" + documentThemeCssMapping[i].cssProperty + ":" + insertableText + ";}"); + } + else { + this._changeCss(this._officeCss, documentThemeCssMapping[i].cssSelector, "{}"); + } + } + } + this._previousDocumentThemeData = realData; + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._changeOfficeThemeData = function (data) { + var officeThemeKeys = OSF.DDA.Theming.OfficeThemeEnum; + var officeThemeCssMapping = [ + { name: officeThemeKeys.BodyForegroundColor, cssSelector: ".office-officeTheme-primary-fontColor", cssProperty: "color" }, + { name: officeThemeKeys.BodyBackgroundColor, cssSelector: ".office-officeTheme-primary-bgColor", cssProperty: "background-color" }, + { name: officeThemeKeys.ControlForegroundColor, cssSelector: ".office-officeTheme-secondary-fontColor", cssProperty: "color" }, + { name: officeThemeKeys.ControlBackgroundColor, cssSelector: ".office-officeTheme-secondary-bgColor", cssProperty: "background-color" } + ]; + var realData = data.type == Microsoft.Office.WebExtension.EventType.OfficeThemeChanged ? data.officeTheme : data; + for (var i = 0; i < officeThemeCssMapping.length; i++) { + if (this._previousOfficeThemeData === null || this._previousOfficeThemeData[officeThemeCssMapping[i].name] != realData[officeThemeCssMapping[i].name]) { + if (realData[officeThemeCssMapping[i].name] !== undefined) { + this._changeCss(this._officeCss, officeThemeCssMapping[i].cssSelector, "{" + officeThemeCssMapping[i].cssProperty + ":" + realData[officeThemeCssMapping[i].name] + ";}"); + } + } + } + this._previousOfficeThemeData = realData; + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._getAndProcessThemeData = function (getThemeMethod, processResultCallback, getThemeMethodIdentifier) { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web") { + if (getThemeMethodIdentifier == OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync) { + var officeThemeData = {}; + var context = OSF._OfficeAppFactory.getContext(); + if (context && context.officeTheme) { + var officeThemeKeys = OSF.DDA.Theming.OfficeThemeEnum; + officeThemeData[officeThemeKeys.BodyBackgroundColor] = context.officeTheme.bodyBackgroundColor; + officeThemeData[officeThemeKeys.BodyForegroundColor] = context.officeTheme.bodyForegroundColor; + officeThemeData[officeThemeKeys.ControlBackgroundColor] = context.officeTheme.controlBackgroundColor; + officeThemeData[officeThemeKeys.ControlForegroundColor] = context.officeTheme.controlForegroundColor; + officeThemeData[officeThemeKeys.IsDarkTheme] = context.officeTheme.isDarkTheme; + } + processResultCallback(officeThemeData); + } + return; + } + getThemeMethod(Function.createDelegate(this, function (asyncResult) { + if (asyncResult.status == "succeeded") { + var data = asyncResult.value; + processResultCallback(data); + } + if (this._areAllCallsCompleted(getThemeMethodIdentifier) && this._onAsyncCallsCompleted) { + this._onAsyncCallsCompleted(); + this._onAsyncCallsCompleted = null; + } + })); + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._processOfficeThemeData = function (data) { + this._changeOfficeThemeData(data); + if (this._isPublicThemeManager) { + this._eventTarget.addHandlerAsync(Microsoft.Office.WebExtension.EventType.OfficeThemeChanged, Function.createDelegate(this, this._changeOfficeThemeData), null); + } + else { + this._pseudoDocumentObject.addHandlerAsync(Microsoft.Office.WebExtension.EventType.OfficeThemeChanged, Function.createDelegate(this, this._changeOfficeThemeData), null); + } + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._processDocumentThemeData = function (data) { + this._changeDocumentThemeData(data); + if (this._isPublicThemeManager) { + this._eventTarget.addHandlerAsync(Microsoft.Office.WebExtension.EventType.DocumentThemeChanged, Function.createDelegate(this, this._changeDocumentThemeData), null); + } + else { + this._pseudoDocumentObject.addHandlerAsync(Microsoft.Office.WebExtension.EventType.DocumentThemeChanged, Function.createDelegate(this, this._changeDocumentThemeData), null); + } + }; + OSF_DDA_Theming_InternalThemeHandler.prototype._areAllCallsCompleted = function (completedCall) { + var asyncCallsCompleted; + if (!(asyncCallsCompleted = this._asyncCallsCompleted)) { + return true; + } + if (completedCall && asyncCallsCompleted.hasOwnProperty(completedCall)) { + asyncCallsCompleted[completedCall] = true; + } + for (var call in asyncCallsCompleted) { + if (asyncCallsCompleted.hasOwnProperty(call) && asyncCallsCompleted[call]) { + continue; + } + return false; + } + return true; + }; + return OSF_DDA_Theming_InternalThemeHandler; +}()); +OSF.DDA.Theming.InternalThemeHandler = OSF_DDA_Theming_InternalThemeHandler; +var parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; +parameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetDocumentThemeMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.DocumentTheme, value: parameterMap.self } + ] +}); +parameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetOfficeThemeMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.OfficeTheme, value: parameterMap.self } + ] +}); +parameterMap.define({ + type: OSF.DDA.EventDispId.dispidDocumentThemeChangedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DocumentThemeChangedEvent, value: parameterMap.self } + ], + isComplexType: true +}); +parameterMap.define({ + type: OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.OfficeThemeChangedEvent, value: parameterMap.self } + ], + isComplexType: true +}); +var destKeys = OSF.DDA.Theming.DocumentThemeEnum; +parameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.DocumentTheme, + fromHost: [ + { name: destKeys.PrimaryBackgroundColor, value: 0 }, + { name: destKeys.PrimaryFontColor, value: 1 }, + { name: destKeys.SecondaryBackgroundColor, value: 2 }, + { name: destKeys.SecondaryFontColor, value: 3 }, + { name: destKeys.Accent1, value: 4 }, + { name: destKeys.Accent2, value: 5 }, + { name: destKeys.Accent3, value: 6 }, + { name: destKeys.Accent4, value: 7 }, + { name: destKeys.Accent5, value: 8 }, + { name: destKeys.Accent6, value: 9 }, + { name: destKeys.Hyperlink, value: 10 }, + { name: destKeys.FollowedHyperlink, value: 11 }, + { name: destKeys.HeaderLatinFont, value: 12 }, + { name: destKeys.HeaderEastAsianFont, value: 13 }, + { name: destKeys.HeaderScriptFont, value: 14 }, + { name: destKeys.HeaderLocalizedFont, value: 15 }, + { name: destKeys.BodyLatinFont, value: 16 }, + { name: destKeys.BodyEastAsianFont, value: 17 }, + { name: destKeys.BodyScriptFont, value: 18 }, + { name: destKeys.BodyLocalizedFont, value: 19 } + ], + isComplexType: true +}); +destKeys = OSF.DDA.Theming.OfficeThemeEnum; +parameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.OfficeTheme, + fromHost: [ + { name: destKeys.BodyForegroundColor, value: 0 }, + { name: destKeys.BodyBackgroundColor, value: 1 }, + { name: destKeys.ControlForegroundColor, value: 2 }, + { name: destKeys.ControlBackgroundColor, value: 3 } + ], + isComplexType: true +}); +parameterMap.define({ + type: OSF.DDA.EventDescriptors.DocumentThemeChangedEvent, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.DocumentTheme, value: parameterMap.self } + ], + isComplexType: true +}); +parameterMap.define({ + type: OSF.DDA.EventDescriptors.OfficeThemeChangedEvent, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.OfficeTheme, value: parameterMap.self } + ], + isComplexType: true +}); +Microsoft.Office.WebExtension.BindingType = { + Table: "table", + Text: "text", + Matrix: "matrix" +}; +OSF.DDA.BindingProperties = { + Id: "BindingId", + Type: Microsoft.Office.WebExtension.Parameters.BindingType +}; +OSF.OUtil.augmentList(OSF.DDA.ListDescriptors, { BindingList: "BindingList" }); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + Subset: "subset", + BindingProperties: "BindingProperties" +}); +OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList, OSF.DDA.PropertyDescriptors.BindingProperties); +OSF.DDA.BindingPromise = function OSF_DDA_BindingPromise(bindingId, errorCallback) { + this._id = bindingId; + OSF.OUtil.defineEnumerableProperty(this, "onFail", { + get: function () { + return errorCallback; + }, + set: function (onError) { + var t = typeof onError; + if (t != "undefined" && t != "function") { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, t); + } + errorCallback = onError; + } + }); +}; +OSF.DDA.BindingPromise.prototype = { + _fetch: function OSF_DDA_BindingPromise$_fetch(onComplete) { + if (this.binding) { + if (onComplete) + onComplete(this.binding); + } + else { + if (!this._binding) { + var me = this; + Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(this._id, function (asyncResult) { + if (asyncResult.status == Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded) { + OSF.OUtil.defineEnumerableProperty(me, "binding", { + value: asyncResult.value + }); + if (onComplete) + onComplete(me.binding); + } + else { + if (me.onFail) + me.onFail(asyncResult); + } + }); + } + } + return this; + }, + getDataAsync: function OSF_DDA_BindingPromise$getDataAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.getDataAsync.apply(binding, args); }); + return this; + }, + setDataAsync: function OSF_DDA_BindingPromise$setDataAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setDataAsync.apply(binding, args); }); + return this; + }, + addHandlerAsync: function OSF_DDA_BindingPromise$addHandlerAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.addHandlerAsync.apply(binding, args); }); + return this; + }, + removeHandlerAsync: function OSF_DDA_BindingPromise$removeHandlerAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.removeHandlerAsync.apply(binding, args); }); + return this; + } +}; +OSF.DDA.BindingFacade = function OSF_DDA_BindingFacade(docInstance) { + this._eventDispatches = []; + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: docInstance + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddFromSelectionAsync, + am.AddFromNamedItemAsync, + am.GetAllAsync, + am.GetByIdAsync, + am.ReleaseByIdAsync + ]); +}; +OSF.DDA.UnknownBinding = function OSF_DDA_UknonwnBinding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { value: docInstance }, + "id": { value: id } + }); +}; +OSF.DDA.Binding = function OSF_DDA_Binding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { + value: docInstance + }, + "id": { + value: id + } + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDataAsync, + am.SetDataAsync + ]); + var et = Microsoft.Office.WebExtension.EventType; + var bindingEventDispatches = docInstance.bindings._eventDispatches; + if (!bindingEventDispatches[id]) { + bindingEventDispatches[id] = new OSF.EventDispatch([ + et.BindingSelectionChanged, + et.BindingDataChanged + ]); + } + var eventDispatch = bindingEventDispatches[id]; + OSF.DDA.DispIdHost.addEventSupport(this, eventDispatch); +}; +OSF.DDA.generateBindingId = function OSF_DDA$GenerateBindingId() { + return "UnnamedBinding_" + OSF.OUtil.getUniqueId() + "_" + new Date().getTime(); +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureBinding = function OSF_DDA_OMFactory$manufactureBinding(bindingProperties, containingDocument) { + var id = bindingProperties[OSF.DDA.BindingProperties.Id]; + var rows = bindingProperties[OSF.DDA.BindingProperties.RowCount]; + var cols = bindingProperties[OSF.DDA.BindingProperties.ColumnCount]; + var hasHeaders = bindingProperties[OSF.DDA.BindingProperties.HasHeaders]; + var binding; + switch (bindingProperties[OSF.DDA.BindingProperties.Type]) { + case Microsoft.Office.WebExtension.BindingType.Text: + binding = new OSF.DDA.TextBinding(id, containingDocument); + break; + case Microsoft.Office.WebExtension.BindingType.Matrix: + binding = new OSF.DDA.MatrixBinding(id, containingDocument, rows, cols); + break; + case Microsoft.Office.WebExtension.BindingType.Table: + var isExcelApp = function () { + return (OSF.DDA.ExcelDocument) + && (Microsoft.Office.WebExtension.context.document) + && (Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument); + }; + var tableBindingObject; + if (isExcelApp() && OSF.DDA.ExcelTableBinding) { + tableBindingObject = OSF.DDA.ExcelTableBinding; + } + else { + tableBindingObject = OSF.DDA.TableBinding; + } + binding = new tableBindingObject(id, containingDocument, rows, cols, hasHeaders); + break; + default: + binding = new OSF.DDA.UnknownBinding(id, containingDocument); + } + return binding; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddFromSelectionAsync: "addFromSelectionAsync", + AddFromNamedItemAsync: "addFromNamedItemAsync", + GetAllAsync: "getAllAsync", + GetByIdAsync: "getByIdAsync", + ReleaseByIdAsync: "releaseByIdAsync", + GetDataAsync: "getDataAsync", + SetDataAsync: "setDataAsync" +}); +(function () { + function processBinding(bindingDescriptor) { + return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); + } + function getObjectId(obj) { return obj.id; } + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] != undefined || data[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) { + data = OSF.DDA.OMFactory.manufactureTableData(data); + } + data = OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data == undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromSelectionAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.ItemName, + "types": ["string"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, + value: function () { return true; } + } + ], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAllAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response) { return OSF.OUtil.mapList(response[OSF.DDA.ListDescriptors.BindingList], processBinding); } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response, caller, callArgs) { + var id = callArgs[Microsoft.Office.WebExtension.Parameters.Id]; + delete caller._eventDispatches[id]; + } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDataAsync, + requiredArguments: [], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs, binding) { return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(binding.type); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RowCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ColumnCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount] == 0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.RowCount]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] || + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] || + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.MatrixBinding = function OSF_DDA_MatrixBinding(id, docInstance, rows, cols) { + OSF.DDA.MatrixBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Matrix + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + } + }); +}; +OSF.OUtil.extend(OSF.DDA.MatrixBinding, OSF.DDA.Binding); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.BindingProperties, + fromHost: [ + { name: OSF.DDA.BindingProperties.Id, value: 0 }, + { name: OSF.DDA.BindingProperties.Type, value: 1 }, + { name: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.BindingType, + toHost: [ + { name: Microsoft.Office.WebExtension.BindingType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.BindingType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.BindingType.Table, value: 2 } + ], + invertible: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ItemName, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseBindingMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAllBindingsMethod, + fromHost: [ + { name: OSF.DDA.ListDescriptors.BindingList, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 3 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 4 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, + fromHost: [ + { name: OSF.DDA.BindingProperties.RowCount, value: 0 }, + { name: OSF.DDA.BindingProperties.ColumnCount, value: 1 }, + { name: OSF.DDA.BindingProperties.HasHeaders, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.Subset, + toHost: [ + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 0 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Run, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Offset, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Run, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.RowCount, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ColumnCount, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddColumnsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearAllRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { TableDataProperties: "TableDataProperties" }); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.TableDataProperties = { + TableRows: "TableRows", + TableHeaders: "TableHeaders" +}; +OSF.DDA.TableBinding = function OSF_DDA_TableBinding(id, docInstance, rows, cols, hasHeaders) { + OSF.DDA.TableBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Table + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + }, + "hasHeaders": { + value: hasHeaders ? hasHeaders : false + } + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddRowsAsync, + am.AddColumnsAsync, + am.DeleteAllDataValuesAsync + ]); +}; +OSF.OUtil.extend(OSF.DDA.TableBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ + AddRowsAsync: "addRowsAsync", + AddColumnsAsync: "addColumnsAsync", + DeleteAllDataValuesAsync: "deleteAllDataValuesAsync" +}); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddRowsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddColumnsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.DDA.TextBinding = function OSF_DDA_TextBinding(id, docInstance) { + OSF.DDA.TextBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperty(this, "type", { + value: Microsoft.Office.WebExtension.BindingType.Text + }); +}; +OSF.OUtil.extend(OSF.DDA.TextBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ AddFromPromptAsync: "addFromPromptAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromPromptAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptText, + value: { + "types": ["string"], + "calculate": function () { return Strings.OfficeOM.L_AddBindingFromPromptDefaultText; } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.SampleData, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: function (bindingDescriptor) { return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.PromptText, value: 2 } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DocumentSelectionChanged: "documentSelectionChanged" }); +OSF.DDA.DocumentSelectionChangedEventArgs = function OSF_DDA_DocumentSelectionChangedEventArgs(docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged + }, + "document": { + value: docInstance + } + }); +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs = function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDeletedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDataChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidContentControlAddedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + BindingSelectionChanged: "bindingSelectionChanged", + BindingDataChanged: "bindingDataChanged" +}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { BindingSelectionChangedEvent: "BindingSelectionChangedEvent" }); +OSF.DDA.BindingSelectionChangedEventArgs = function OSF_DDA_BindingSelectionChangedEventArgs(bindingInstance, subset) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingSelectionChanged + }, + "binding": { + value: bindingInstance + } + }); + for (var prop in subset) { + OSF.OUtil.defineEnumerableProperty(this, prop, { + value: subset[prop] + }); + } +}; +OSF.DDA.BindingDataChangedEventArgs = function OSF_DDA_BindingDataChangedEventArgs(bindingInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingDataChanged + }, + "binding": { + value: bindingInstance + } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingDataChangedEvent, + fromHost: [{ name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self }] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType, { OnlyVisible: "onlyVisible" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [{ name: Microsoft.Office.WebExtension.FilterType.OnlyVisible, value: 1 }] +}); +Microsoft.Office.WebExtension.GoToType = { + Binding: "binding", + NamedItem: "namedItem", + Slide: "slide", + Index: "index" +}; +Microsoft.Office.WebExtension.SelectionMode = { + Default: "default", + Selected: "selected", + None: "none" +}; +Microsoft.Office.WebExtension.Index = { + First: "first", + Last: "last", + Next: "next", + Previous: "previous" +}; +OSF.DDA.AsyncMethodNames.addNames({ GoToByIdAsync: "goToByIdAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GoToByIdAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string", "number"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.GoToType, + "enum": Microsoft.Office.WebExtension.GoToType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SelectionMode, + value: { + "enum": Microsoft.Office.WebExtension.SelectionMode, + "defaultValue": Microsoft.Office.WebExtension.SelectionMode.Default + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.GoToType, + toHost: [ + { name: Microsoft.Office.WebExtension.GoToType.Binding, value: 0 }, + { name: Microsoft.Office.WebExtension.GoToType.NamedItem, value: 1 }, + { name: Microsoft.Office.WebExtension.GoToType.Slide, value: 2 }, + { name: Microsoft.Office.WebExtension.GoToType.Index, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.SelectionMode, + toHost: [ + { name: Microsoft.Office.WebExtension.SelectionMode.Default, value: 0 }, + { name: Microsoft.Office.WebExtension.SelectionMode.Selected, value: 1 }, + { name: Microsoft.Office.WebExtension.SelectionMode.None, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidNavigateToMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.GoToType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.SelectionMode, value: 2 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync, + requiredArguments: [ + { + name: Microsoft.Office.WebExtension.Parameters.Data, + types: ["object"] + } + ], + supportedOptions: [] +}); +OSF.OUtil.setNamespace("RichApi", OSF.DDA); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { RichApiMessage: "richApiMessage" }); +OSF.DDA.RichApiMessageEventArgs = function OSF_DDA_RichApiMessageEventArgs(eventType, eventProperties) { + var entryArray = eventProperties[Microsoft.Office.WebExtension.Parameters.Data]; + var entries = []; + if (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var elem = entryArray[i]; + if (elem.toArray) { + elem = elem.toArray(); + } + entries.push({ + messageCategory: elem[0], + messageType: elem[1], + targetId: elem[2], + message: elem[3], + id: elem[4], + isRemoteOverride: elem[5] + }); + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: Microsoft.Office.WebExtension.EventType.RichApiMessage }, + "entries": { value: entries } + }); +}; +(function (OfficeExt) { + var RichApiMessageManager = (function () { + function RichApiMessageManager() { + this._eventDispatch = null; + this._registerHandlers = []; + this._eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.RichApiMessage, + ]); + OSF.DDA.DispIdHost.addEventSupport(this, this._eventDispatch); + } + RichApiMessageManager.prototype.register = function (handler) { + var _this = this; + if (!this._registerWithHostPromise) { + this._registerWithHostPromise = new Office.Promise(function (resolve, reject) { + _this.addHandlerAsync(Microsoft.Office.WebExtension.EventType.RichApiMessage, function (args) { + _this._registerHandlers.forEach(function (value) { + if (value) { + value(args); + } + }); + }, function (asyncResult) { + if (asyncResult.status == 'failed') { + reject(asyncResult.error); + } + else { + resolve(); + } + }); + }); + } + return this._registerWithHostPromise.then(function () { + _this._registerHandlers.push(handler); + }); + }; + return RichApiMessageManager; + }()); + OfficeExt.RichApiMessageManager = RichApiMessageManager; +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidRichApiMessageEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +Microsoft.Office.WebExtension.FileType = { + Text: "text", + Compressed: "compressed", + Pdf: "pdf" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FileProperties: "FileProperties", + FileSliceProperties: "FileSliceProperties" +}); +OSF.DDA.FileProperties = { + Handle: "FileHandle", + FileSize: "FileSize", + SliceSize: Microsoft.Office.WebExtension.Parameters.SliceSize +}; +OSF.DDA.File = function OSF_DDA_File(handle, fileSize, sliceSize) { + OSF.OUtil.defineEnumerableProperties(this, { + "size": { + value: fileSize + }, + "sliceCount": { + value: Math.ceil(fileSize / sliceSize) + } + }); + var privateState = {}; + privateState[OSF.DDA.FileProperties.Handle] = handle; + privateState[OSF.DDA.FileProperties.SliceSize] = sliceSize; + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDocumentCopyChunkAsync, + am.ReleaseDocumentCopyAsync + ], privateState); +}; +OSF.DDA.FileSliceOffset = "fileSliceoffset"; +OSF.DDA.AsyncMethodNames.addNames({ + GetDocumentCopyAsync: "getFileAsync", + GetDocumentCopyChunkAsync: "getSliceAsync", + ReleaseDocumentCopyAsync: "closeAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.FileType, + "enum": Microsoft.Office.WebExtension.FileType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SliceSize, + value: { + "types": ["number"], + "defaultValue": 4 * 1024 * 1024 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var sliceSize = callArgs[Microsoft.Office.WebExtension.Parameters.SliceSize]; + if (sliceSize <= 0 || sliceSize > (4 * 1024 * 1024)) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize; + } + return callArgs; + }, + onSucceeded: function (fileDescriptor, caller, callArgs) { + return new OSF.DDA.File(fileDescriptor[OSF.DDA.FileProperties.Handle], fileDescriptor[OSF.DDA.FileProperties.FileSize], callArgs[Microsoft.Office.WebExtension.Parameters.SliceSize]); + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.SliceIndex, + "types": ["number"] + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.FileProperties.Handle, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.Handle]; } + }, + { + name: OSF.DDA.FileProperties.SliceSize, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.SliceSize]; } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var index = callArgs[Microsoft.Office.WebExtension.Parameters.SliceIndex]; + if (index < 0 || index >= caller.sliceCount) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange; + } + callArgs[OSF.DDA.FileSliceOffset] = parseInt((index * stateInfo[OSF.DDA.FileProperties.SliceSize]).toString()); + return callArgs; + }, + onSucceeded: function (sliceDescriptor, caller, callArgs) { + var slice = {}; + OSF.OUtil.defineEnumerableProperties(slice, { + "data": { + value: sliceDescriptor[Microsoft.Office.WebExtension.Parameters.Data] + }, + "index": { + value: callArgs[Microsoft.Office.WebExtension.Parameters.SliceIndex] + }, + "size": { + value: sliceDescriptor[OSF.DDA.FileProperties.SliceSize] + } + }); + return slice; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync, + privateStateCallbacks: [ + { + name: OSF.DDA.FileProperties.Handle, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.Handle]; } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FileProperties, + fromHost: [ + { name: OSF.DDA.FileProperties.Handle, value: 0 }, + { name: OSF.DDA.FileProperties.FileSize, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FileSliceProperties, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 }, + { name: OSF.DDA.FileProperties.SliceSize, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.FileType, + toHost: [ + { name: Microsoft.Office.WebExtension.FileType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.FileType.Compressed, value: 5 }, + { name: Microsoft.Office.WebExtension.FileType.Pdf, value: 6 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod, + toHost: [{ name: Microsoft.Office.WebExtension.Parameters.FileType, value: 0 }], + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FileProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod, + toHost: [ + { name: OSF.DDA.FileProperties.Handle, value: 0 }, + { name: OSF.DDA.FileSliceOffset, value: 1 }, + { name: OSF.DDA.FileProperties.SliceSize, value: 2 } + ], + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FileSliceProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod, + toHost: [{ name: OSF.DDA.FileProperties.Handle, value: 0 }] +}); +OSF.DDA.FilePropertiesDescriptor = { + Url: "Url" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FilePropertiesDescriptor: "FilePropertiesDescriptor" +}); +Microsoft.Office.WebExtension.FileProperties = function Microsoft_Office_WebExtension_FileProperties(filePropertiesDescriptor) { + OSF.OUtil.defineEnumerableProperties(this, { + "url": { + value: filePropertiesDescriptor[OSF.DDA.FilePropertiesDescriptor.Url] + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ GetFilePropertiesAsync: "getFilePropertiesAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: 0 } + ], + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (filePropertiesDescriptor, caller, callArgs) { + return new Microsoft.Office.WebExtension.FileProperties(filePropertiesDescriptor); + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, + fromHost: [ + { name: OSF.DDA.FilePropertiesDescriptor.Url, value: 0 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.ExcelTableBinding = function OSF_DDA_ExcelTableBinding(id, docInstance, rows, cols, hasHeaders) { + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.ClearFormatsAsync, + am.SetTableOptionsAsync, + am.SetFormatsAsync + ]); + OSF.DDA.ExcelTableBinding.uber.constructor.call(this, id, docInstance, rows, cols, hasHeaders); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelTableBinding, OSF.DDA.TableBinding); +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + privateStateCallbacks: [] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var Parameters = Microsoft.Office.WebExtension.Parameters; + if (callArgs[Parameters.StartRow] == 0 && + callArgs[Parameters.StartColumn] == 0 && + OSF.OUtil.isArray(callArgs[Parameters.CellFormat]) && callArgs[Parameters.CellFormat].length === 0 && + OSF.OUtil.isArray(callArgs[Parameters.TableOptions]) && callArgs[Parameters.TableOptions].length === 0) { + delete callArgs[Parameters.StartRow]; + delete callArgs[Parameters.StartColumn]; + delete callArgs[Parameters.CellFormat]; + delete callArgs[Parameters.TableOptions]; + } + if (callArgs[Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + ((callArgs[Parameters.StartRow] && callArgs[Parameters.StartRow] != 0) || + (callArgs[Parameters.StartColumn] && callArgs[Parameters.StartColumn] != 0) || + callArgs[Parameters.CellFormat] || + callArgs[Parameters.TableOptions])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: function (obj) { return obj.id; } + } + ] + }); + OSF.DDA.BindingPromise.prototype.setTableOptionsAsync = function OSF_DDA_BindingPromise$setTableOptionsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setTableOptionsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.setFormatsAsync = function OSF_DDA_BindingPromise$setFormatsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setFormatsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.clearFormatsAsync = function OSF_DDA_BindingPromise$clearFormatsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.clearFormatsAsync.apply(binding, args); }); + return this; + }; +})(); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodNames.addNames({ + ClearFormatsAsync: "clearFormatsAsync", + SetTableOptionsAsync: "setTableOptionsAsync", + SetFormatsAsync: "setFormatsAsync" + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ClearFormatsAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetTableOptionsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.TableOptions, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetFormatsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CellFormat, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +Microsoft.Office.WebExtension.Table = { + All: 0, + Data: 1, + Headers: 2 +}; +(function () { + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetTableOptionsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 3 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 5 } + ] + }); + var tableOptionProperties = { + headerRow: 0, + bandedRows: 1, + firstColumn: 2, + lastColumn: 3, + bandedColumns: 4, + filterButton: 5, + style: 6, + totalRow: 7 + }; + var cellProperties = { + row: 0, + column: 1 + }; + var formatProperties = { + alignHorizontal: { text: "alignHorizontal", type: 1 }, + alignVertical: { text: "alignVertical", type: 2 }, + backgroundColor: { text: "backgroundColor", type: 101 }, + borderStyle: { text: "borderStyle", type: 201 }, + borderColor: { text: "borderColor", type: 202 }, + borderTopStyle: { text: "borderTopStyle", type: 203 }, + borderTopColor: { text: "borderTopColor", type: 204 }, + borderBottomStyle: { text: "borderBottomStyle", type: 205 }, + borderBottomColor: { text: "borderBottomColor", type: 206 }, + borderLeftStyle: { text: "borderLeftStyle", type: 207 }, + borderLeftColor: { text: "borderLeftColor", type: 208 }, + borderRightStyle: { text: "borderRightStyle", type: 209 }, + borderRightColor: { text: "borderRightColor", type: 210 }, + borderOutlineStyle: { text: "borderOutlineStyle", type: 211 }, + borderOutlineColor: { text: "borderOutlineColor", type: 212 }, + borderInlineStyle: { text: "borderInlineStyle", type: 213 }, + borderInlineColor: { text: "borderInlineColor", type: 214 }, + fontFamily: { text: "fontFamily", type: 301 }, + fontStyle: { text: "fontStyle", type: 302 }, + fontSize: { text: "fontSize", type: 303 }, + fontUnderlineStyle: { text: "fontUnderlineStyle", type: 304 }, + fontColor: { text: "fontColor", type: 305 }, + fontDirection: { text: "fontDirection", type: 306 }, + fontStrikethrough: { text: "fontStrikethrough", type: 307 }, + fontSuperscript: { text: "fontSuperscript", type: 308 }, + fontSubscript: { text: "fontSubscript", type: 309 }, + fontNormal: { text: "fontNormal", type: 310 }, + indentLeft: { text: "indentLeft", type: 401 }, + indentRight: { text: "indentRight", type: 402 }, + numberFormat: { text: "numberFormat", type: 501 }, + width: { text: "width", type: 701 }, + height: { text: "height", type: 702 }, + wrapping: { text: "wrapping", type: 703 } + }; + var borderStyleSet = [ + { name: "none", value: 0 }, + { name: "thin", value: 1 }, + { name: "medium", value: 2 }, + { name: "dashed", value: 3 }, + { name: "dotted", value: 4 }, + { name: "thick", value: 5 }, + { name: "double", value: 6 }, + { name: "hair", value: 7 }, + { name: "medium dashed", value: 8 }, + { name: "dash dot", value: 9 }, + { name: "medium dash dot", value: 10 }, + { name: "dash dot dot", value: 11 }, + { name: "medium dash dot dot", value: 12 }, + { name: "slant dash dot", value: 13 }, + ]; + var colorSet = [ + { name: "none", value: 0 }, + { name: "black", value: 1 }, + { name: "blue", value: 2 }, + { name: "gray", value: 3 }, + { name: "green", value: 4 }, + { name: "orange", value: 5 }, + { name: "pink", value: 6 }, + { name: "purple", value: 7 }, + { name: "red", value: 8 }, + { name: "teal", value: 9 }, + { name: "turquoise", value: 10 }, + { name: "violet", value: 11 }, + { name: "white", value: 12 }, + { name: "yellow", value: 13 }, + { name: "automatic", value: 14 }, + ]; + var ns = OSF.DDA.SafeArray.Delegate.ParameterMap; + ns.define({ + type: formatProperties.alignHorizontal.text, + toHost: [ + { name: "general", value: 0 }, + { name: "left", value: 1 }, + { name: "center", value: 2 }, + { name: "right", value: 3 }, + { name: "fill", value: 4 }, + { name: "justify", value: 5 }, + { name: "center across selection", value: 6 }, + { name: "distributed", value: 7 }, + ] + }); + ns.define({ + type: formatProperties.alignVertical.text, + toHost: [ + { name: "top", value: 0 }, + { name: "center", value: 1 }, + { name: "bottom", value: 2 }, + { name: "justify", value: 3 }, + { name: "distributed", value: 4 }, + ] + }); + ns.define({ + type: formatProperties.backgroundColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderTopStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderTopColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderBottomStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderBottomColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderLeftStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderLeftColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderRightStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderRightColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderOutlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderOutlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderInlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderInlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontStyle.text, + toHost: [ + { name: "regular", value: 0 }, + { name: "italic", value: 1 }, + { name: "bold", value: 2 }, + { name: "bold italic", value: 3 }, + ] + }); + ns.define({ + type: formatProperties.fontUnderlineStyle.text, + toHost: [ + { name: "none", value: 0 }, + { name: "single", value: 1 }, + { name: "double", value: 2 }, + { name: "single accounting", value: 3 }, + { name: "double accounting", value: 4 }, + ] + }); + ns.define({ + type: formatProperties.fontColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontDirection.text, + toHost: [ + { name: "context", value: 0 }, + { name: "left-to-right", value: 1 }, + { name: "right-to-left", value: 2 }, + ] + }); + ns.define({ + type: formatProperties.width.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] + }); + ns.define({ + type: formatProperties.height.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] + }); + ns.define({ + type: Microsoft.Office.WebExtension.Parameters.TableOptions, + toHost: [ + { name: "headerRow", value: 0 }, + { name: "bandedRows", value: 1 }, + { name: "firstColumn", value: 2 }, + { name: "lastColumn", value: 3 }, + { name: "bandedColumns", value: 4 }, + { name: "filterButton", value: 5 }, + { name: "style", value: 6 }, + { name: "totalRow", value: 7 } + ] + }); + ns.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat] = { + toHost: function (data) { + for (var entry in data) { + if (data[entry].format) { + data[entry].format = ns.doMapValues(data[entry].format, "toHost"); + } + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$toHost(cellFormats) { + var textCells = "cells"; + var textFormat = "format"; + var posCells = 0; + var posFormat = 1; + var ret = []; + for (var index in cellFormats) { + var cfOld = cellFormats[index]; + var cfNew = []; + if (typeof (cfOld[textCells]) !== 'undefined') { + var cellsOld = cfOld[textCells]; + var cellsNew; + if (typeof cfOld[textCells] === "object") { + cellsNew = []; + for (var entry in cellsOld) { + if (typeof (cellProperties[entry]) !== 'undefined') { + cellsNew[cellProperties[entry]] = cellsOld[entry]; + } + } + } + else { + cellsNew = cellsOld; + } + cfNew[posCells] = cellsNew; + } + if (cfOld[textFormat]) { + var formatOld = cfOld[textFormat]; + var formatNew = []; + for (var entry2 in formatOld) { + if (typeof (formatProperties[entry2]) !== 'undefined') { + formatNew.push([ + formatProperties[entry2].type, + formatOld[entry2] + ]); + } + } + cfNew[posFormat] = formatNew; + } + ret[index] = cfNew; + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$fromHost(hostArgs) { + return hostArgs; + } + }); + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$toHost(tableOptions) { + var ret = []; + for (var entry in tableOptions) { + if (typeof (tableOptionProperties[entry]) !== 'undefined') { + ret[tableOptionProperties[entry]] = tableOptions[entry]; + } + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$fromHost(hostArgs) { + return hostArgs; + } + }); +})(); +(function (OfficeExt) { + var AppCommand; + (function (AppCommand) { + var AppCommandManager = (function () { + function AppCommandManager() { + var _this = this; + this._pseudoDocument = null; + this._eventDispatch = null; + this._useAssociatedActionsOnly = null; + this._processAppCommandInvocation = function (args) { + var verifyResult = _this._verifyManifestCallback(args.callbackName); + if (verifyResult.errorCode != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + _this._invokeAppCommandCompletedMethod(args.appCommandId, verifyResult.errorCode, ""); + return; + } + var eventObj = _this._constructEventObjectForCallback(args); + if (eventObj) { + window.setTimeout(function () { verifyResult.callback(eventObj); }, 0); + } + else { + _this._invokeAppCommandCompletedMethod(args.appCommandId, OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError, ""); + } + }; + } + AppCommandManager.initializeOsfDda = function () { + OSF.DDA.AsyncMethodNames.addNames({ + AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync" + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Status, + "types": ["number"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, + "types": ["string"] + } + ] + }); + OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + AppCommandInvokedEvent: "AppCommandInvokedEvent" + }); + OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + AppCommandInvoked: "appCommandInvoked" + }); + OSF.OUtil.setNamespace("AppCommand", OSF.DDA); + OSF.DDA.AppCommand.AppCommandInvokedEventArgs = OfficeExt.AppCommand.AppCommandInvokedEventArgs; + }; + AppCommandManager.prototype.initializeAndChangeOnce = function (callback) { + AppCommand.registerDdaFacade(); + this._pseudoDocument = {}; + OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument, [ + OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, + ]); + this._eventDispatch = new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.AppCommandInvoked, + ]); + var onRegisterCompleted = function (result) { + if (callback) { + if (result.status == "succeeded") { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + } + }; + OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument, this._eventDispatch); + this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked, this._processAppCommandInvocation, onRegisterCompleted); + }; + AppCommandManager.prototype._verifyManifestCallback = function (callbackName) { + var defaultResult = { callback: null, errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback }; + callbackName = callbackName.trim(); + try { + var callbackFunc = this._getCallbackFunc(callbackName); + if (typeof callbackFunc != "function") { + return defaultResult; + } + } + catch (e) { + return defaultResult; + } + return { callback: callbackFunc, errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess }; + }; + AppCommandManager.prototype._getUseAssociatedActionsOnly = function () { + if (this._useAssociatedActionsOnly == null) { + this._useAssociatedActionsOnly = false; + try { + if (window["useAssociatedActionsOnly"] === true) { + this._useAssociatedActionsOnly = true; + } + else { + this._useAssociatedActionsOnly = OSF._OfficeAppFactory.getLoadScriptHelper().getUseAssociatedActionsOnlyDefined(); + } + } + catch (e) { } + } + return this._useAssociatedActionsOnly; + }; + AppCommandManager.prototype._getCallbackFuncFromWindow = function (callbackName) { + var callList = callbackName.split("."); + var parentObject = window; + for (var i = 0; i < callList.length - 1; i++) { + if (parentObject[callList[i]] && (typeof parentObject[callList[i]] == "object" || typeof parentObject[callList[i]] == "function")) { + parentObject = parentObject[callList[i]]; + } + else { + return null; + } + } + var callbackFunc = parentObject[callList[callList.length - 1]]; + return callbackFunc; + }; + AppCommandManager.prototype._getCallbackFuncFromActionAssociateTable = function (callbackName) { + var nameUpperCase = callbackName.toUpperCase(); + return Office.actions._association.mappings[nameUpperCase]; + }; + AppCommandManager.prototype._getCallbackFunc = function (callbackName) { + var _this = this; + var callbackFunc = null; + var useAssociateTable = false; + if (!this._getUseAssociatedActionsOnly()) { + callbackFunc = this._getCallbackFuncFromWindow(callbackName); + } + if (!callbackFunc) { + callbackFunc = this._getCallbackFuncFromActionAssociateTable(callbackName); + if (callbackFunc) { + useAssociateTable = true; + } + } + if (!AppCommandManager.isTelemetrySubmitted) { + AppCommandManager.isTelemetrySubmitted = true; + try { + if (OTel && oteljs && Microsoft.Office.WebExtension.sendTelemetryEvent) { + var telSampleRate = OTel.OTelLogger.getHost() == "Outlook" ? 0.1 : 0.2; + if (Math.random() < telSampleRate) { + OTel.OTelLogger.onTelemetryLoaded(function () { + var dataFields = [ + oteljs.makeBooleanDataField("UseAction", _this._useAssociatedActionsOnly === true), + oteljs.makeBooleanDataField("UseAssociateTable", useAssociateTable) + ]; + Microsoft.Office.WebExtension.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.AppCommandDefinition", + dataFields: dataFields, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage, + diagnosticLevel: oteljs.DiagnosticLevel.NecessaryServiceDataEvent + } + }); + }); + } + } + } + catch (e) { } + } + return callbackFunc; + }; + AppCommandManager.prototype._invokeAppCommandCompletedMethod = function (appCommandId, resultCode, data) { + this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId, resultCode, data); + }; + AppCommandManager.prototype._constructEventObjectForCallback = function (args) { + var _this = this; + var eventObj = new AppCommandCallbackEventArgs(); + try { + var jsonData = JSON.parse(args.eventObjStr); + this._translateEventObjectInternal(jsonData, eventObj); + Object.defineProperty(eventObj, 'completed', { + value: function (completedContext) { + eventObj.completedContext = completedContext; + var jsonString = JSON.stringify(eventObj); + _this._invokeAppCommandCompletedMethod(args.appCommandId, OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, jsonString); + }, + enumerable: true + }); + } + catch (e) { + eventObj = null; + } + return eventObj; + }; + AppCommandManager.prototype._translateEventObjectInternal = function (input, output) { + for (var key in input) { + if (!input.hasOwnProperty(key)) + continue; + var inputChild = input[key]; + if (typeof inputChild == "object" && inputChild != null) { + OSF.OUtil.defineEnumerableProperty(output, key, { + value: {} + }); + this._translateEventObjectInternal(inputChild, output[key]); + } + else { + Object.defineProperty(output, key, { + value: inputChild, + enumerable: true, + writable: true + }); + } + } + }; + AppCommandManager.prototype._constructObjectByTemplate = function (template, input) { + var output = {}; + if (!template || !input) + return output; + for (var key in template) { + if (template.hasOwnProperty(key)) { + output[key] = null; + if (input[key] != null) { + var templateChild = template[key]; + var inputChild = input[key]; + var inputChildType = typeof inputChild; + if (typeof templateChild == "object" && templateChild != null) { + output[key] = this._constructObjectByTemplate(templateChild, inputChild); + } + else if (inputChildType == "number" || inputChildType == "string" || inputChildType == "boolean") { + output[key] = inputChild; + } + } + } + } + return output; + }; + AppCommandManager.instance = function () { + if (AppCommandManager._instance == null) { + AppCommandManager._instance = new AppCommandManager(); + } + return AppCommandManager._instance; + }; + AppCommandManager.isTelemetrySubmitted = false; + AppCommandManager._instance = null; + return AppCommandManager; + }()); + AppCommand.AppCommandManager = AppCommandManager; + var AppCommandInvokedEventArgs = (function () { + function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr) { + this.type = Microsoft.Office.WebExtension.EventType.AppCommandInvoked; + this.appCommandId = appCommandId; + this.callbackName = callbackName; + this.eventObjStr = eventObjStr; + } + AppCommandInvokedEventArgs.create = function (eventProperties) { + return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId], eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName], eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr]); + }; + return AppCommandInvokedEventArgs; + }()); + AppCommand.AppCommandInvokedEventArgs = AppCommandInvokedEventArgs; + var AppCommandCallbackEventArgs = (function () { + function AppCommandCallbackEventArgs() { + } + return AppCommandCallbackEventArgs; + }()); + AppCommand.AppCommandCallbackEventArgs = AppCommandCallbackEventArgs; + AppCommand.AppCommandInvokedEventEnums = { + AppCommandId: "appCommandId", + CallbackName: "callbackName", + EventObjStr: "eventObjStr" + }; + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})); +})(OfficeExt || (OfficeExt = {})); +OfficeExt.AppCommand.AppCommandManager.initializeOsfDda(); +(function (OfficeExt) { + var AppCommand; + (function (AppCommand) { + function registerDdaFacade() { + if (OSF.DDA.SafeArray) { + var parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + parameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Status, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, value: 2 } + ] + }); + parameterMap.define({ + type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, value: parameterMap.self } + ], + isComplexType: true + }); + parameterMap.define({ + type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, + fromHost: [ + { name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId, value: 0 }, + { name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName, value: 1 }, + { name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr, value: 2 }, + ], + isComplexType: true + }); + } + } + AppCommand.registerDdaFacade = registerDdaFacade; + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})); +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType, { Image: "image" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType, { XmlSvg: "xmlSvg" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Image, value: 8 }, + { name: Microsoft.Office.WebExtension.CoercionType.XmlSvg, value: 9 } + ] +}); +Microsoft.Office.WebExtension.AccountTypeFilter = { + NoFilter: "noFilter", + AAD: "aad", + MSA: "msa" +}; +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth = function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.EnableNewHosts, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AccountTypeFilter, + value: { + "enum": Microsoft.Office.WebExtension.AccountTypeFilter, + "defaultValue": Microsoft.Office.WebExtension.AccountTypeFilter.NoFilter + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var _a; + var appContext = OSF._OfficeAppFactory.getInitializationHelper()._appContext; + if (appContext && appContext._wopiHostOriginForSingleSignOn) { + var addinTrustId = OSF.OUtil.Guid.generateNewGuid(); + window.parent.parent.postMessage("{\"MessageId\":\"AddinTrustedOrigin\",\"AddinTrustId\":\"" + addinTrustId + "\"}", appContext._wopiHostOriginForSingleSignOn); + callArgs[Microsoft.Office.WebExtension.Parameters.AddinTrustId] = addinTrustId; + } + if (window.Office.context.requirements.isSetSupported("JsonPayloadSSO")) { + var jsonParameterMap = (_a = {}, + _a[Microsoft.Office.WebExtension.Parameters.ForceConsent] = false, + _a[Microsoft.Office.WebExtension.Parameters.ForceAddAccount] = false, + _a[Microsoft.Office.WebExtension.Parameters.AuthChallenge] = true, + _a[Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt] = true, + _a[Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess] = true, + _a[Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt] = true, + _a[Microsoft.Office.WebExtension.Parameters.EnableNewHosts] = true, + _a[Microsoft.Office.WebExtension.Parameters.AccountTypeFilter] = true, + _a); + var jsonPayload = {}; + for (var _i = 0, _b = Object.keys(jsonParameterMap); _i < _b.length; _i++) { + var key = _b[_i]; + if (jsonParameterMap[key]) { + jsonPayload[key] = callArgs[key]; + } + delete callArgs[key]; + } + callArgs[Microsoft.Office.WebExtension.Parameters.JsonPayload] = JSON.stringify(jsonPayload); + } + return callArgs; + }, + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.JsonPayload, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.AllowConsentPrompt, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.ForMSGraphAccess, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.AllowSignInPrompt, value: 5 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ GetNestedAppAuthContextAsync: "getAuthContextAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync, + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.JsonData]; + var userObjectId = data.userObjectId || ""; + var tenantId = data.tenantId || ""; + var userPrincipalName = data.userPrincipalName || ""; + var authorityType = data.authorityType || ""; + return { + userObjectId: userObjectId, + tenantId: tenantId, + userPrincipalName: userPrincipalName, + authorityType: authorityType + }; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetNestedAppAuthContextMethod, + toHost: [], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.JsonData, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + OpenBrowserWindow: "openBrowserWindow" +}); +OSF.DDA.OpenBrowser = function OSF_DDA_OpenBrowser() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.OpenBrowserWindow, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Reserved, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidOpenBrowserWindow, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Reserved, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Url, value: 1 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteFeature: "executeFeatureAsync", + QueryFeature: "queryFeatureAsync" +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FeatureProperties: "FeatureProperties", + TcidEnabled: "TcidEnabled", + TcidVisible: "TcidVisible" +}); +OSF.DDA.ExecuteFeature = function OSF_DDA_ExecuteFeature() { +}; +OSF.DDA.QueryFeature = function OSF_DDA_QueryFeature() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteFeature, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Tcid, + "types": ["number"] + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.QueryFeature, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Tcid, + "types": ["number"] + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FeatureProperties, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.TcidEnabled, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.TcidVisible, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteFeature, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Tcid, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidQueryFeature, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FeatureProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Tcid, value: 0 } + ] +}); +OSF.DDA.ExcelDocument = function OSF_DDA_ExcelDocument(officeAppContext, settings) { + var bf = new OSF.DDA.BindingFacade(this); + OSF.DDA.DispIdHost.addAsyncMethods(bf, [OSF.DDA.AsyncMethodNames.AddFromPromptAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GoToByIdAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]); + OSF.DDA.ExcelDocument.uber.constructor.call(this, officeAppContext, bf, settings); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelDocument, OSF.DDA.JsomDocument); +OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize(appContext) { + if (!(appContext && appContext.get_isDialog())) { + var appCommandHandler = OfficeExt.AppCommand.AppCommandManager.instance(); + appCommandHandler.initializeAndChangeOnce(); + } + if (appContext && appContext.get_featureGates) { + var featureGates = appContext.get_featureGates(); + if (featureGates && featureGates["EnableExcelAddInTheme"]) { + if (featureGates["EnablePublicThemeManager"]) { + if (typeof window !== 'undefined' && + window.Office && + window.Office.context && + window.Office.context.themeManager) { + window.Office.context.themeManager.InitializeAndChangeOnce(); + } + } + else { + var themeHandler = new OSF.DDA.Theming.InternalThemeHandler(); + themeHandler.InitializeAndChangeOnce(); + } + } + } +}; +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + appContext.doc = new OSF.DDA.ExcelDocument(appContext, this._initializeSettings(true)); + OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + if (!appContext.get_isDialog()) { + OSF.DDA.RichApi.richApiMessageManager = new OfficeExt.RichApiMessageManager(); + } + appReady(); +}; +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["number", "object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["number", "object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExtension; +(function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire = function () { + return null; + }(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + var PromiseImpl; + (function (PromiseImpl) { + function Init() { + return (function () { + "use strict"; + function lib$es6$promise$utils$$objectOrFunction(x) { + return typeof x === 'function' || (typeof x === 'object' && x !== null); + } + function lib$es6$promise$utils$$isFunction(x) { + return typeof x === 'function'; + } + function lib$es6$promise$utils$$isMaybeThenable(x) { + return typeof x === 'object' && x !== null; + } + var lib$es6$promise$utils$$_isArray; + if (!Array.isArray) { + lib$es6$promise$utils$$_isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; + } + else { + lib$es6$promise$utils$$_isArray = Array.isArray; + } + var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray; + var lib$es6$promise$asap$$len = 0; + var lib$es6$promise$asap$$toString = {}.toString; + var lib$es6$promise$asap$$vertxNext; + var lib$es6$promise$asap$$customSchedulerFn; + var lib$es6$promise$asap$$asap = function asap(callback, arg) { + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback; + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg; + lib$es6$promise$asap$$len += 2; + if (lib$es6$promise$asap$$len === 2) { + if (lib$es6$promise$asap$$customSchedulerFn) { + lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush); + } + else { + lib$es6$promise$asap$$scheduleFlush(); + } + } + }; + function lib$es6$promise$asap$$setScheduler(scheduleFn) { + lib$es6$promise$asap$$customSchedulerFn = scheduleFn; + } + function lib$es6$promise$asap$$setAsap(asapFn) { + lib$es6$promise$asap$$asap = asapFn; + } + var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined; + var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {}; + var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver; + var lib$es6$promise$asap$$isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && + typeof importScripts !== 'undefined' && + typeof MessageChannel !== 'undefined'; + function lib$es6$promise$asap$$useNextTick() { + var nextTick = process.nextTick; + var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); + if (Array.isArray(version) && version[1] === '0' && version[2] === '10') { + nextTick = window.setImmediate; + } + return function () { + nextTick(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useVertxTimer() { + return function () { + lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useMutationObserver() { + var iterations = 0; + var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + return function () { + node.data = (iterations = ++iterations % 2); + }; + } + function lib$es6$promise$asap$$useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = lib$es6$promise$asap$$flush; + return function () { + channel.port2.postMessage(0); + }; + } + function lib$es6$promise$asap$$useSetTimeout() { + return function () { + setTimeout(lib$es6$promise$asap$$flush, 1); + }; + } + var lib$es6$promise$asap$$queue = new Array(1000); + function lib$es6$promise$asap$$flush() { + for (var i = 0; i < lib$es6$promise$asap$$len; i += 2) { + var callback = lib$es6$promise$asap$$queue[i]; + var arg = lib$es6$promise$asap$$queue[i + 1]; + callback(arg); + lib$es6$promise$asap$$queue[i] = undefined; + lib$es6$promise$asap$$queue[i + 1] = undefined; + } + lib$es6$promise$asap$$len = 0; + } + var lib$es6$promise$asap$$scheduleFlush; + if (lib$es6$promise$asap$$isNode) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick(); + } + else if (lib$es6$promise$asap$$isWorker) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel(); + } + else { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout(); + } + function lib$es6$promise$$internal$$noop() { } + var lib$es6$promise$$internal$$PENDING = void 0; + var lib$es6$promise$$internal$$FULFILLED = 1; + var lib$es6$promise$$internal$$REJECTED = 2; + var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$selfFullfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function lib$es6$promise$$internal$$cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); + } + function lib$es6$promise$$internal$$getThen(promise) { + try { + return promise.then; + } + catch (error) { + lib$es6$promise$$internal$$GET_THEN_ERROR.error = error; + return lib$es6$promise$$internal$$GET_THEN_ERROR; + } + } + function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } + catch (e) { + return e; + } + } + function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) { + lib$es6$promise$asap$$asap(function (promise) { + var sealed = false; + var error = lib$es6$promise$$internal$$tryThen(then, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + lib$es6$promise$$internal$$reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + if (!sealed && error) { + sealed = true; + lib$es6$promise$$internal$$reject(promise, error); + } + }, promise); + } + function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) { + if (thenable._state === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, thenable._result); + } + else if (thenable._state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, thenable._result); + } + else { + lib$es6$promise$$internal$$subscribe(thenable, undefined, function (value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function (reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + } + function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable) { + if (maybeThenable.constructor === promise.constructor) { + lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable); + } + else { + var then = lib$es6$promise$$internal$$getThen(maybeThenable); + if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error); + } + else if (then === undefined) { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + else if (lib$es6$promise$utils$$isFunction(then)) { + lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then); + } + else { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + } + } + function lib$es6$promise$$internal$$resolve(promise, value) { + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFullfillment()); + } + else if (lib$es6$promise$utils$$objectOrFunction(value)) { + lib$es6$promise$$internal$$handleMaybeThenable(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + } + function lib$es6$promise$$internal$$publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + lib$es6$promise$$internal$$publish(promise); + } + function lib$es6$promise$$internal$$fulfill(promise, value) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._result = value; + promise._state = lib$es6$promise$$internal$$FULFILLED; + if (promise._subscribers.length !== 0) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise); + } + } + function lib$es6$promise$$internal$$reject(promise, reason) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._state = lib$es6$promise$$internal$$REJECTED; + promise._result = reason; + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise); + } + function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) { + var subscribers = parent._subscribers; + var length = subscribers.length; + parent._onerror = null; + subscribers[length] = child; + subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment; + subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection; + if (length === 0 && parent._state) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent); + } + } + function lib$es6$promise$$internal$$publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + if (subscribers.length === 0) { + return; + } + var child, callback, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + if (child) { + lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail); + } + else { + callback(detail); + } + } + promise._subscribers.length = 0; + } + function lib$es6$promise$$internal$$ErrorObject() { + this.error = null; + } + var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$tryCatch(callback, detail) { + try { + return callback(detail); + } + catch (e) { + lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e; + return lib$es6$promise$$internal$$TRY_CATCH_ERROR; + } + } + function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) { + var hasCallback = lib$es6$promise$utils$$isFunction(callback), value, error, succeeded, failed; + if (hasCallback) { + value = lib$es6$promise$$internal$$tryCatch(callback, detail); + if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value = null; + } + else { + succeeded = true; + } + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn()); + return; + } + } + else { + value = detail; + succeeded = true; + } + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + } + else if (hasCallback && succeeded) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else if (failed) { + lib$es6$promise$$internal$$reject(promise, error); + } + else if (settled === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, value); + } + else if (settled === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + } + function lib$es6$promise$$internal$$initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function rejectPromise(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + catch (e) { + lib$es6$promise$$internal$$reject(promise, e); + } + } + function lib$es6$promise$enumerator$$Enumerator(Constructor, input) { + var enumerator = this; + enumerator._instanceConstructor = Constructor; + enumerator.promise = new Constructor(lib$es6$promise$$internal$$noop); + if (enumerator._validateInput(input)) { + enumerator._input = input; + enumerator.length = input.length; + enumerator._remaining = input.length; + enumerator._init(); + if (enumerator.length === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + else { + enumerator.length = enumerator.length || 0; + enumerator._enumerate(); + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + } + } + else { + lib$es6$promise$$internal$$reject(enumerator.promise, enumerator._validationError()); + } + } + lib$es6$promise$enumerator$$Enumerator.prototype._validateInput = function (input) { + return lib$es6$promise$utils$$isArray(input); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._validationError = function () { + return new _Internal.Error('Array Methods must be provided an Array'); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._init = function () { + this._result = new Array(this.length); + }; + var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator; + lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function () { + var enumerator = this; + var length = enumerator.length; + var promise = enumerator.promise; + var input = enumerator._input; + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + enumerator._eachEntry(input[i], i); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function (entry, i) { + var enumerator = this; + var c = enumerator._instanceConstructor; + if (lib$es6$promise$utils$$isMaybeThenable(entry)) { + if (entry.constructor === c && entry._state !== lib$es6$promise$$internal$$PENDING) { + entry._onerror = null; + enumerator._settledAt(entry._state, i, entry._result); + } + else { + enumerator._willSettleAt(c.resolve(entry), i); + } + } + else { + enumerator._remaining--; + enumerator._result[i] = entry; + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function (state, i, value) { + var enumerator = this; + var promise = enumerator.promise; + if (promise._state === lib$es6$promise$$internal$$PENDING) { + enumerator._remaining--; + if (state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + else { + enumerator._result[i] = value; + } + } + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(promise, enumerator._result); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function (promise, i) { + var enumerator = this; + lib$es6$promise$$internal$$subscribe(promise, undefined, function (value) { + enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value); + }, function (reason) { + enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason); + }); + }; + function lib$es6$promise$promise$all$$all(entries) { + return new lib$es6$promise$enumerator$$default(this, entries).promise; + } + var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all; + function lib$es6$promise$promise$race$$race(entries) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + if (!lib$es6$promise$utils$$isArray(entries)) { + lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.')); + return promise; + } + var length = entries.length; + function onFulfillment(value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + function onRejection(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + } + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); + } + return promise; + } + var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race; + function lib$es6$promise$promise$resolve$$resolve(object) { + var Constructor = this; + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$resolve(promise, object); + return promise; + } + var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve; + function lib$es6$promise$promise$reject$$reject(reason) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$reject(promise, reason); + return promise; + } + var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject; + var lib$es6$promise$promise$$counter = 0; + function lib$es6$promise$promise$$needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); + } + function lib$es6$promise$promise$$needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise; + function lib$es6$promise$promise$$Promise(resolver) { + this._id = lib$es6$promise$promise$$counter++; + this._state = undefined; + this._result = undefined; + this._subscribers = []; + if (lib$es6$promise$$internal$$noop !== resolver) { + if (!lib$es6$promise$utils$$isFunction(resolver)) { + lib$es6$promise$promise$$needsResolver(); + } + if (!(this instanceof lib$es6$promise$promise$$Promise)) { + lib$es6$promise$promise$$needsNew(); + } + lib$es6$promise$$internal$$initializePromise(this, resolver); + } + } + lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default; + lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default; + lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default; + lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default; + lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler; + lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap; + lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap; + lib$es6$promise$promise$$Promise.prototype = { + constructor: lib$es6$promise$promise$$Promise, + then: function (onFulfillment, onRejection) { + var parent = this; + var state = parent._state; + if (state === lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state === lib$es6$promise$$internal$$REJECTED && !onRejection) { + return this; + } + var child = new this.constructor(lib$es6$promise$$internal$$noop); + var result = parent._result; + if (state) { + var callback = arguments[state - 1]; + lib$es6$promise$asap$$asap(function () { + lib$es6$promise$$internal$$invokeCallback(state, child, callback, result); + }); + } + else { + lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection); + } + return child; + }, + 'catch': function (onRejection) { + return this.then(null, onRejection); + } + }; + return lib$es6$promise$promise$$default; + }).call(this); + } + PromiseImpl.Init = Init; + })(PromiseImpl = _Internal.PromiseImpl || (_Internal.PromiseImpl = {})); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + function isEdgeLessThan14() { + var userAgent = window.navigator.userAgent; + var versionIdx = userAgent.indexOf("Edge/"); + if (versionIdx >= 0) { + userAgent = userAgent.substring(versionIdx + 5, userAgent.length); + if (userAgent < "14.14393") + return true; + else + return false; + } + return false; + } + function determinePromise() { + if (typeof (window) === "undefined" && typeof (Promise) === "function") { + return Promise; + } + if (typeof (window) !== "undefined" && window.Promise) { + if (isEdgeLessThan14()) { + return _Internal.PromiseImpl.Init(); + } + else { + return window.Promise; + } + } + else { + return _Internal.PromiseImpl.Init(); + } + } + _Internal.OfficePromise = determinePromise(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + var OfficePromise = _Internal.OfficePromise; + OfficeExtension.Promise = OfficePromise; +})(OfficeExtension || (OfficeExtension = {})); +var OfficeExtension; +(function (OfficeExtension_1) { + var SessionBase = (function () { + function SessionBase() { + } + SessionBase.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + SessionBase.prototype._createRequestExecutorOrNull = function () { + return null; + }; + SessionBase.prototype.getEventRegistration = function (controlId) { + return null; + }; + return SessionBase; + }()); + OfficeExtension_1.SessionBase = SessionBase; + var HttpUtility = (function () { + function HttpUtility() { + } + HttpUtility.setCustomSendRequestFunc = function (func) { + HttpUtility.s_customSendRequestFunc = func; + }; + HttpUtility.xhrSendRequestFunc = function (request) { + return CoreUtility.createPromise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open(request.method, request.url); + xhr.onload = function () { + var resp = { + statusCode: xhr.status, + headers: CoreUtility._parseHttpResponseHeaders(xhr.getAllResponseHeaders()), + body: xhr.responseText + }; + resolve(resp); + }; + xhr.onerror = function () { + reject(new _Internal.RuntimeError({ + code: CoreErrorCodes.connectionFailure, + httpStatusCode: xhr.status, + message: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, xhr.statusText) + })); + }; + if (request.headers) { + for (var key in request.headers) { + xhr.setRequestHeader(key, request.headers[key]); + } + } + xhr.send(CoreUtility._getRequestBodyText(request)); + }); + }; + HttpUtility.fetchSendRequestFunc = function (request) { + var requestBodyText = CoreUtility._getRequestBodyText(request); + if (requestBodyText === '') { + requestBodyText = undefined; + } + return fetch(request.url, { + method: request.method, + headers: request.headers, + body: requestBodyText + }) + .then(function (resp) { + return resp.text() + .then(function (body) { + var statusCode = resp.status; + var headers = {}; + resp.headers.forEach(function (value, name) { + headers[name] = value; + }); + var ret = { statusCode: statusCode, headers: headers, body: body }; + return ret; + }); + }); + }; + HttpUtility.sendRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func = HttpUtility.s_customSendRequestFunc; + if (!func) { + if (typeof (fetch) !== 'undefined') { + func = HttpUtility.fetchSendRequestFunc; + } + else { + func = HttpUtility.xhrSendRequestFunc; + } + } + return func(request); + }; + HttpUtility.setCustomSendLocalDocumentRequestFunc = function (func) { + HttpUtility.s_customSendLocalDocumentRequestFunc = func; + }; + HttpUtility.sendLocalDocumentRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func; + func = HttpUtility.s_customSendLocalDocumentRequestFunc || HttpUtility.officeJsSendLocalDocumentRequestFunc; + return func(request); + }; + HttpUtility.officeJsSendLocalDocumentRequestFunc = function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestSafeArray = CoreUtility._buildRequestMessageSafeArray(request); + return CoreUtility.createPromise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { + var response; + if (asyncResult.status == 'succeeded') { + response = { + statusCode: RichApiMessageUtility.getResponseStatusCode(asyncResult), + headers: RichApiMessageUtility.getResponseHeaders(asyncResult), + body: RichApiMessageUtility.getResponseBody(asyncResult) + }; + } + else { + response = RichApiMessageUtility.buildHttpResponseFromOfficeJsError(asyncResult.error.code, asyncResult.error.message); + } + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(response)); + resolve(response); + }); + }); + }; + HttpUtility.validateAndNormalizeRequest = function (request) { + if (CoreUtility.isNullOrUndefined(request)) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + if (CoreUtility.isNullOrEmptyString(request.method)) { + request.method = 'GET'; + } + request.method = request.method.toUpperCase(); + var alreadyHasTestName = false; + if (typeof (request.headers) === 'object' && request.headers[CoreConstants.testRequestNameHeader]) { + alreadyHasTestName = true; + } + if (!alreadyHasTestName) { + var currentTestName = TestUtility._getCurrentTestNameWithSequenceId(); + if (currentTestName) { + if (!request.headers) { + request.headers = {}; + } + request.headers[CoreConstants.testRequestNameHeader] = currentTestName; + } + } + }; + HttpUtility.logRequest = function (request) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Request---'); + CoreUtility.log(request.method + ' ' + request.url); + if (request.headers) { + for (var key in request.headers) { + CoreUtility.log(key + ': ' + request.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(CoreUtility._getRequestBodyText(request)); + } + } + }; + HttpUtility.logResponse = function (response) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Response---'); + CoreUtility.log('' + response.statusCode); + if (response.headers) { + for (var key in response.headers) { + CoreUtility.log(key + ': ' + response.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(response.body); + } + } + }; + HttpUtility._logBodyEnabled = false; + return HttpUtility; + }()); + OfficeExtension_1.HttpUtility = HttpUtility; + var HostBridge = (function () { + function HostBridge(m_bridge) { + var _this = this; + this.m_bridge = m_bridge; + this.m_promiseResolver = {}; + this.m_handlers = []; + this.m_bridge.onMessageFromHost = function (messageText) { + var message = JSON.parse(messageText); + if (message.type == 3) { + var genericMessageBody = message.message; + if (genericMessageBody && genericMessageBody.entries) { + for (var i = 0; i < genericMessageBody.entries.length; i++) { + var entryObjectOrArray = genericMessageBody.entries[i]; + if (Array.isArray(entryObjectOrArray)) { + var entry = { + messageCategory: entryObjectOrArray[0], + messageType: entryObjectOrArray[1], + targetId: entryObjectOrArray[2], + message: entryObjectOrArray[3], + id: entryObjectOrArray[4] + }; + genericMessageBody.entries[i] = entry; + } + } + } + } + _this.dispatchMessage(message); + }; + } + HostBridge.init = function (bridge) { + if (typeof bridge !== 'object' || !bridge) { + return; + } + var instance = new HostBridge(bridge); + HostBridge.s_instance = instance; + HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var index = request.url.indexOf('?'); + if (index >= 0) { + var query = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(query); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + } + if (typeof (request.body) === "string") { + request.body = JSON.parse(request.body); + } + var bridgeMessage = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + message: request + }; + return instance.sendMessageToHostAndExpectResponse(bridgeMessage).then(function (bridgeResponse) { + var responseInfo = bridgeResponse.message; + return responseInfo; + }); + }); + for (var i = 0; i < HostBridge.s_onInitedHandlers.length; i++) { + HostBridge.s_onInitedHandlers[i](instance); + } + }; + Object.defineProperty(HostBridge, "instance", { + get: function () { + return HostBridge.s_instance; + }, + enumerable: true, + configurable: true + }); + HostBridge.prototype.sendMessageToHost = function (message) { + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + }; + HostBridge.prototype.sendMessageToHostAndExpectResponse = function (message) { + var _this = this; + var ret = CoreUtility.createPromise(function (resolve, reject) { + _this.m_promiseResolver[message.id] = resolve; + }); + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + return ret; + }; + HostBridge.prototype.addHostMessageHandler = function (handler) { + this.m_handlers.push(handler); + }; + HostBridge.prototype.removeHostMessageHandler = function (handler) { + var index = this.m_handlers.indexOf(handler); + if (index >= 0) { + this.m_handlers.splice(index, 1); + } + }; + HostBridge.onInited = function (handler) { + HostBridge.s_onInitedHandlers.push(handler); + if (HostBridge.s_instance) { + handler(HostBridge.s_instance); + } + }; + HostBridge.prototype.dispatchMessage = function (message) { + if (typeof message.id === 'number') { + var resolve = this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + delete this.m_promiseResolver[message.id]; + return; + } + } + for (var i = 0; i < this.m_handlers.length; i++) { + this.m_handlers[i](message); + } + }; + HostBridge.nextId = function () { + return HostBridge.s_nextId++; + }; + HostBridge.s_onInitedHandlers = []; + HostBridge.s_nextId = 1; + return HostBridge; + }()); + OfficeExtension_1.HostBridge = HostBridge; + if (typeof _richApiNativeBridge === 'object' && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var _Internal; + (function (_Internal) { + var RuntimeError = (function (_super) { + __extends(RuntimeError, _super); + function RuntimeError(error) { + var _this = _super.call(this, typeof error === 'string' ? error : error.message) || this; + Object.setPrototypeOf(_this, RuntimeError.prototype); + _this.name = 'RichApi.Error'; + if (typeof error === 'string') { + _this.message = error; + } + else { + _this.code = error.code; + _this.message = error.message; + _this.traceMessages = error.traceMessages || []; + _this.innerError = error.innerError || null; + _this.debugInfo = _this._createDebugInfo(error.debugInfo || {}); + _this.httpStatusCode = error.httpStatusCode; + _this.data = error.data; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode) || _this.httpStatusCode === 200) { + var mapping = {}; + mapping[CoreErrorCodes.accessDenied] = 401; + mapping[CoreErrorCodes.connectionFailure] = 500; + mapping[CoreErrorCodes.generalException] = 500; + mapping[CoreErrorCodes.invalidArgument] = 400; + mapping[CoreErrorCodes.invalidObjectPath] = 400; + mapping[CoreErrorCodes.invalidOrTimedOutSession] = 408; + mapping[CoreErrorCodes.invalidRequestContext] = 400; + mapping[CoreErrorCodes.timeout] = 408; + mapping[CoreErrorCodes.valueNotLoaded] = 400; + _this.httpStatusCode = mapping[_this.code]; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode)) { + _this.httpStatusCode = 500; + } + return _this; + } + RuntimeError.prototype.toString = function () { + return this.code + ': ' + this.message; + }; + RuntimeError.prototype._createDebugInfo = function (partialDebugInfo) { + var debugInfo = { + code: this.code, + message: this.message + }; + debugInfo.toString = function () { + return JSON.stringify(this); + }; + for (var key in partialDebugInfo) { + debugInfo[key] = partialDebugInfo[key]; + } + if (this.innerError) { + if (this.innerError instanceof _Internal.RuntimeError) { + debugInfo.innerError = this.innerError.debugInfo; + } + else { + debugInfo.innerError = this.innerError; + } + } + return debugInfo; + }; + RuntimeError._createInvalidArgError = function (error) { + return new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility.isNullOrEmptyString(error.argumentName) + ? CoreUtility._getResourceString(CoreResourceStrings.invalidArgumentGeneric) + : CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, error.argumentName), + debugInfo: error.errorLocation ? { errorLocation: error.errorLocation } : {}, + innerError: error.innerError + }); + }; + return RuntimeError; + }(Error)); + _Internal.RuntimeError = RuntimeError; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + OfficeExtension_1.Error = _Internal.RuntimeError; + var CoreErrorCodes = (function () { + function CoreErrorCodes() { + } + CoreErrorCodes.apiNotFound = 'ApiNotFound'; + CoreErrorCodes.accessDenied = 'AccessDenied'; + CoreErrorCodes.generalException = 'GeneralException'; + CoreErrorCodes.activityLimitReached = 'ActivityLimitReached'; + CoreErrorCodes.invalidArgument = 'InvalidArgument'; + CoreErrorCodes.connectionFailure = 'ConnectionFailure'; + CoreErrorCodes.timeout = 'Timeout'; + CoreErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + CoreErrorCodes.invalidObjectPath = 'InvalidObjectPath'; + CoreErrorCodes.invalidRequestContext = 'InvalidRequestContext'; + CoreErrorCodes.valueNotLoaded = 'ValueNotLoaded'; + CoreErrorCodes.requestPayloadSizeLimitExceeded = 'RequestPayloadSizeLimitExceeded'; + CoreErrorCodes.responsePayloadSizeLimitExceeded = 'ResponsePayloadSizeLimitExceeded'; + CoreErrorCodes.writeNotSupportedWhenModalDialogOpen = 'WriteNotSupportedWhenModalDialogOpen'; + return CoreErrorCodes; + }()); + OfficeExtension_1.CoreErrorCodes = CoreErrorCodes; + var CoreResourceStrings = (function () { + function CoreResourceStrings() { + } + CoreResourceStrings.apiNotFoundDetails = 'ApiNotFoundDetails'; + CoreResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + CoreResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + CoreResourceStrings.invalidArgument = 'InvalidArgument'; + CoreResourceStrings.invalidArgumentGeneric = 'InvalidArgumentGeneric'; + CoreResourceStrings.timeout = 'Timeout'; + CoreResourceStrings.invalidOrTimedOutSessionMessage = 'InvalidOrTimedOutSessionMessage'; + CoreResourceStrings.invalidSheetName = 'InvalidSheetName'; + CoreResourceStrings.invalidObjectPath = 'InvalidObjectPath'; + CoreResourceStrings.invalidRequestContext = 'InvalidRequestContext'; + CoreResourceStrings.valueNotLoaded = 'ValueNotLoaded'; + return CoreResourceStrings; + }()); + OfficeExtension_1.CoreResourceStrings = CoreResourceStrings; + var CoreConstants = (function () { + function CoreConstants() { + } + CoreConstants.flags = 'flags'; + CoreConstants.sourceLibHeader = 'SdkVersion'; + CoreConstants.processQuery = 'ProcessQuery'; + CoreConstants.localDocument = 'http://document.localhost/'; + CoreConstants.localDocumentApiPrefix = 'http://document.localhost/_api/'; + CoreConstants.customData = 'customdata'; + CoreConstants.testRequestNameHeader = 'x-test-request-name'; + return CoreConstants; + }()); + OfficeExtension_1.CoreConstants = CoreConstants; + var RichApiMessageUtility = (function () { + function RichApiMessageUtility() { + } + RichApiMessageUtility.buildMessageArrayForIRequestExecutor = function (customData, requestFlags, requestMessage, sourceLibHeaderValue) { + var requestMessageText = JSON.stringify(requestMessage.Body); + CoreUtility.log('Request:'); + CoreUtility.log(requestMessageText); + var headers = {}; + CoreUtility._copyHeaders(requestMessage.Headers, headers); + headers[CoreConstants.sourceLibHeader] = sourceLibHeaderValue; + var messageSafearray = RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, 'POST', CoreConstants.processQuery, headers, requestMessageText); + return messageSafearray; + }; + RichApiMessageUtility.buildResponseOnSuccess = function (responseBody, responseHeaders) { + var response = { HttpStatusCode: 200, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.Body = JSON.parse(responseBody); + response.Headers = responseHeaders; + return response; + }; + RichApiMessageUtility.buildResponseOnError = function (errorCode, message) { + var response = { HttpStatusCode: 500, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.ErrorCode = CoreErrorCodes.generalException; + response.ErrorMessage = message; + if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + response.ErrorCode = CoreErrorCodes.accessDenied; + response.HttpStatusCode = 401; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + response.ErrorCode = CoreErrorCodes.activityLimitReached; + response.HttpStatusCode = 429; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession) { + response.ErrorCode = CoreErrorCodes.invalidOrTimedOutSession; + response.HttpStatusCode = 408; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidOrTimedOutSessionMessage); + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.requestPayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.responsePayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen) { + response.ErrorCode = CoreErrorCodes.writeNotSupportedWhenModalDialogOpen; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName) { + response.ErrorCode = CoreErrorCodes.invalidRequestContext; + response.HttpStatusCode = 400; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidSheetName); + } + return response; + }; + RichApiMessageUtility.buildHttpResponseFromOfficeJsError = function (errorCode, message) { + var statusCode = 500; + var errorBody = {}; + errorBody['error'] = {}; + errorBody['error']['code'] = CoreErrorCodes.generalException; + errorBody['error']['message'] = message; + if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + statusCode = 403; + errorBody['error']['code'] = CoreErrorCodes.accessDenied; + } + else if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + statusCode = 429; + errorBody['error']['code'] = CoreErrorCodes.activityLimitReached; + } + return { statusCode: statusCode, headers: {}, body: JSON.stringify(errorBody) }; + }; + RichApiMessageUtility.buildRequestMessageSafeArray = function (customData, requestFlags, method, path, headers, body) { + var headerArray = []; + if (headers) { + for (var headerName in headers) { + headerArray.push(headerName); + headerArray.push(headers[headerName]); + } + } + var appPermission = 0; + var solutionId = ''; + var instanceId = ''; + var marketplaceType = ''; + var solutionVersion = ''; + var storeLocation = ''; + var compliantSolutionId = ''; + return [ + customData, + method, + path, + headerArray, + body, + appPermission, + requestFlags, + solutionId, + instanceId, + marketplaceType, + solutionVersion, + storeLocation, + compliantSolutionId + ]; + }; + RichApiMessageUtility.getResponseBody = function (result) { + return RichApiMessageUtility.getResponseBodyFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseHeaders = function (result) { + return RichApiMessageUtility.getResponseHeadersFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseBodyFromSafeArray = function (data) { + var ret = data[2]; + if (typeof ret === 'string') { + return ret; + } + var arr = ret; + return arr.join(''); + }; + RichApiMessageUtility.getResponseHeadersFromSafeArray = function (data) { + var arrayHeader = data[1]; + if (!arrayHeader) { + return null; + } + var headers = {}; + for (var i = 0; i < arrayHeader.length - 1; i += 2) { + headers[arrayHeader[i]] = arrayHeader[i + 1]; + } + return headers; + }; + RichApiMessageUtility.getResponseStatusCode = function (result) { + return RichApiMessageUtility.getResponseStatusCodeFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseStatusCodeFromSafeArray = function (data) { + return data[0]; + }; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession = 5012; + RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached = 5102; + RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability = 7000; + RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded = 5103; + RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded = 5104; + RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen = 5016; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName = 1014; + return RichApiMessageUtility; + }()); + OfficeExtension_1.RichApiMessageUtility = RichApiMessageUtility; + (function (_Internal) { + function getPromiseType() { + if (typeof Promise !== 'undefined') { + return Promise; + } + if (typeof Office !== 'undefined') { + if (Office.Promise) { + return Office.Promise; + } + } + if (typeof OfficeExtension !== 'undefined') { + if (OfficeExtension.Promise) { + return OfficeExtension.Promise; + } + } + throw new _Internal.Error('No Promise implementation found'); + } + _Internal.getPromiseType = getPromiseType; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var CoreUtility = (function () { + function CoreUtility() { + } + CoreUtility.log = function (message) { + if (CoreUtility._logEnabled && typeof console !== 'undefined' && console.log) { + console.log(message); + } + }; + CoreUtility.checkArgumentNull = function (value, name) { + if (CoreUtility.isNullOrUndefined(value)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: name }); + } + }; + CoreUtility.isNullOrUndefined = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isUndefined = function (value) { + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isNullOrEmptyString = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + if (value.length == 0) { + return true; + } + return false; + }; + CoreUtility.isPlainJsonObject = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return false; + } + if (typeof value !== 'object') { + return false; + } + if (Object.prototype.toString.apply(value) !== '[object Object]') { + return false; + } + if (value.constructor && + !Object.prototype.hasOwnProperty.call(value, 'constructor') && + !Object.prototype.hasOwnProperty.call(value.constructor.prototype, 'hasOwnProperty')) { + return false; + } + for (var key in value) { + if (!Object.prototype.hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + }; + CoreUtility.trim = function (str) { + return str.replace(new RegExp('^\\s+|\\s+$', 'g'), ''); + }; + CoreUtility.caseInsensitiveCompareString = function (str1, str2) { + if (CoreUtility.isNullOrUndefined(str1)) { + return CoreUtility.isNullOrUndefined(str2); + } + else { + if (CoreUtility.isNullOrUndefined(str2)) { + return false; + } + else { + return str1.toUpperCase() == str2.toUpperCase(); + } + } + }; + CoreUtility.isReadonlyRestRequest = function (method) { + return CoreUtility.caseInsensitiveCompareString(method, 'GET'); + }; + CoreUtility._getResourceString = function (resourceId, arg) { + var ret; + if (typeof window !== 'undefined' && window.Strings && window.Strings.OfficeOM) { + var stringName = 'L_' + resourceId; + var stringValue = window.Strings.OfficeOM[stringName]; + if (stringValue) { + ret = stringValue; + } + } + if (!ret) { + ret = CoreUtility.s_resourceStringValues[resourceId]; + } + if (!ret) { + ret = resourceId; + } + if (!CoreUtility.isNullOrUndefined(arg)) { + if (Array.isArray(arg)) { + var arrArg = arg; + ret = CoreUtility._formatString(ret, arrArg); + } + else { + ret = ret.replace('{0}', arg); + } + } + return ret; + }; + CoreUtility._formatString = function (format, arrArg) { + return format.replace(/\{\d\}/g, function (v) { + var position = parseInt(v.substr(1, v.length - 2)); + if (position < arrArg.length) { + return arrArg[position]; + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'format' }); + } + }); + }; + Object.defineProperty(CoreUtility, "Promise", { + get: function () { + return _Internal.getPromiseType(); + }, + enumerable: true, + configurable: true + }); + CoreUtility.createPromise = function (executor) { + var ret = new CoreUtility.Promise(executor); + return ret; + }; + CoreUtility._createPromiseFromResult = function (value) { + return CoreUtility.createPromise(function (resolve, reject) { + resolve(value); + }); + }; + CoreUtility._createPromiseFromException = function (reason) { + return CoreUtility.createPromise(function (resolve, reject) { + reject(reason); + }); + }; + CoreUtility._createTimeoutPromise = function (timeout) { + return CoreUtility.createPromise(function (resolve, reject) { + setTimeout(function () { + resolve(null); + }, timeout); + }); + }; + CoreUtility._createInvalidArgError = function (error) { + return _Internal.RuntimeError._createInvalidArgError(error); + }; + CoreUtility._isLocalDocumentUrl = function (url) { + return CoreUtility._getLocalDocumentUrlPrefixLength(url) > 0; + }; + CoreUtility._getLocalDocumentUrlPrefixLength = function (url) { + var localDocumentPrefixes = [ + 'http://document.localhost', + 'https://document.localhost', + '//document.localhost' + ]; + var urlLower = url.toLowerCase().trim(); + for (var i = 0; i < localDocumentPrefixes.length; i++) { + if (urlLower === localDocumentPrefixes[i]) { + return localDocumentPrefixes[i].length; + } + else if (urlLower.substr(0, localDocumentPrefixes[i].length + 1) === localDocumentPrefixes[i] + '/') { + return localDocumentPrefixes[i].length + 1; + } + } + return 0; + }; + CoreUtility._validateLocalDocumentRequest = function (request) { + var index = CoreUtility._getLocalDocumentUrlPrefixLength(request.url); + if (index <= 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + var path = request.url.substr(index); + var pathLower = path.toLowerCase(); + if (pathLower === '_api') { + path = ''; + } + else if (pathLower.substr(0, '_api/'.length) === '_api/') { + path = path.substr('_api/'.length); + } + return { + method: request.method, + url: path, + headers: request.headers, + body: request.body + }; + }; + CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny = function (queryString) { + var ret = { flags: -1, customData: '' }; + var parts = queryString.split('&'); + for (var i = 0; i < parts.length; i++) { + var keyvalue = parts[i].split('='); + if (keyvalue[0].toLowerCase() === CoreConstants.flags) { + var flags = parseInt(keyvalue[1]); + flags = flags & 8191; + ret.flags = flags; + } + else if (keyvalue[0].toLowerCase() === CoreConstants.customData) { + ret.customData = decodeURIComponent(keyvalue[1]); + } + } + return ret; + }; + CoreUtility._getRequestBodyText = function (request) { + var body = ''; + if (typeof request.body === 'string') { + body = request.body; + } + else if (request.body && typeof request.body === 'object') { + body = JSON.stringify(request.body); + } + return body; + }; + CoreUtility._parseResponseBody = function (response) { + if (typeof response.body === 'string') { + var bodyText = CoreUtility.trim(response.body); + return JSON.parse(bodyText); + } + else { + return response.body; + } + }; + CoreUtility._buildRequestMessageSafeArray = function (request) { + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var customData = ''; + if (request.url.substr(0, CoreConstants.processQuery.length).toLowerCase() === + CoreConstants.processQuery.toLowerCase()) { + var index = request.url.indexOf('?'); + if (index > 0) { + var queryString = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(queryString); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + customData = flagsAndCustomData.customData; + } + } + return RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, request.method, request.url, request.headers, CoreUtility._getRequestBodyText(request)); + }; + CoreUtility._parseHttpResponseHeaders = function (allResponseHeaders) { + var responseHeaders = {}; + if (!CoreUtility.isNullOrEmptyString(allResponseHeaders)) { + var regex = new RegExp('\r?\n'); + var entries = allResponseHeaders.split(regex); + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + if (entry != null) { + var index = entry.indexOf(':'); + if (index > 0) { + var key = entry.substr(0, index); + var value = entry.substr(index + 1); + key = CoreUtility.trim(key); + value = CoreUtility.trim(value); + responseHeaders[key.toUpperCase()] = value; + } + } + } + } + return responseHeaders; + }; + CoreUtility._parseErrorResponse = function (responseInfo) { + var errorObj = CoreUtility._parseErrorResponseBody(responseInfo); + var statusCode = responseInfo.statusCode.toString(); + if (CoreUtility.isNullOrUndefined(errorObj) || typeof errorObj !== 'object' || !errorObj.error) { + return CoreUtility._createDefaultErrorResponse(statusCode); + } + var error = errorObj.error; + var innerError = error.innerError; + if (innerError && innerError.code) { + return CoreUtility._createErrorResponse(innerError.code, statusCode, innerError.message); + } + if (error.code) { + return CoreUtility._createErrorResponse(error.code, statusCode, error.message); + } + return CoreUtility._createDefaultErrorResponse(statusCode); + }; + CoreUtility._parseErrorResponseBody = function (responseInfo) { + if (CoreUtility.isPlainJsonObject(responseInfo.body)) { + return responseInfo.body; + } + else if (!CoreUtility.isNullOrEmptyString(responseInfo.body)) { + var errorResponseBody = CoreUtility.trim(responseInfo.body); + try { + return JSON.parse(errorResponseBody); + } + catch (e) { + CoreUtility.log('Error when parse ' + errorResponseBody); + } + } + }; + CoreUtility._createDefaultErrorResponse = function (statusCode) { + return { + errorCode: CoreErrorCodes.connectionFailure, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, statusCode) + }; + }; + CoreUtility._createErrorResponse = function (code, statusCode, message) { + return { + errorCode: code, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithDetails, [ + statusCode, + code, + message + ]) + }; + }; + CoreUtility._copyHeaders = function (src, dest) { + if (src && dest) { + for (var key in src) { + dest[key] = src[key]; + } + } + }; + CoreUtility.addResourceStringValues = function (values) { + for (var key in values) { + CoreUtility.s_resourceStringValues[key] = values[key]; + } + }; + CoreUtility._logEnabled = false; + CoreUtility.s_resourceStringValues = { + ApiNotFoundDetails: 'The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.', + ConnectionFailureWithStatus: 'The request failed with status code of {0}.', + ConnectionFailureWithDetails: 'The request failed with status code of {0}, error code {1} and the following error message: {2}', + InvalidArgument: "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.", + InvalidObjectPath: 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.', + InvalidRequestContext: 'Cannot use the object across different request contexts.', + Timeout: 'The operation has timed out.', + ValueNotLoaded: 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.' + }; + return CoreUtility; + }()); + OfficeExtension_1.CoreUtility = CoreUtility; + var TestUtility = (function () { + function TestUtility() { + } + TestUtility.setMock = function (value) { + TestUtility.s_isMock = value; + }; + TestUtility.isMock = function () { + return TestUtility.s_isMock; + }; + TestUtility._setCurrentTestName = function (value) { + TestUtility.s_currentTestName = value; + TestUtility.s_currentTestSequenceId = 0; + }; + TestUtility._getCurrentTestNameWithSequenceId = function () { + if (TestUtility.s_currentTestName) { + TestUtility.s_currentTestSequenceId++; + return TestUtility.s_currentTestName + "." + TestUtility.s_currentTestSequenceId; + } + return null; + }; + return TestUtility; + }()); + OfficeExtension_1.TestUtility = TestUtility; + OfficeExtension_1._internalConfig = { + showDisposeInfoInDebugInfo: false, + showInternalApiInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectUpdateMethod: false, + alwaysPolyfillClientObjectRetrieveMethod: false, + enableConcurrentFlag: true, + enableUndoableFlag: true, + appendTypeNameToObjectPathInfo: false, + enablePreviewExecution: false + }; + OfficeExtension_1.config = { + extendedErrorLogging: false + }; + var CommonActionFactory = (function () { + function CommonActionFactory() { + } + CommonActionFactory.createSetPropertyAction = function (context, parent, propertyName, value, flags) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var args = [value]; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + CommonUtility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var action = new Action(actionInfo, 0, flags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (flags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectId: '', + ObjectType: '', + Arguments: [value] + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return parent._addAction(action); + }; + CommonActionFactory.createQueryAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 2, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createQueryAsJsonAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 7, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createUpdateAction = function (context, parent, objectState) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 9, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 0, 0); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action); + }; + return CommonActionFactory; + }()); + OfficeExtension_1.CommonActionFactory = CommonActionFactory; + var ClientObjectBase = (function () { + function ClientObjectBase(contextBase, objectPath) { + this.m_contextBase = contextBase; + this.m_objectPath = objectPath; + } + Object.defineProperty(ClientObjectBase.prototype, "_objectPath", { + get: function () { + return this.m_objectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObjectBase.prototype, "_context", { + get: function () { + return this.m_contextBase; + }, + enumerable: true, + configurable: true + }); + ClientObjectBase.prototype._addAction = function (action, resultHandler) { + var _this = this; + if (resultHandler === void 0) { + resultHandler = null; + } + return CoreUtility.createPromise(function (resolve, reject) { + _this._context._addServiceApiAction(action, resultHandler, resolve, reject); + }); + }; + ClientObjectBase.prototype._addPreviewExecutionAction = function (action) { + }; + ClientObjectBase.prototype._retrieve = function (option, resultHandler) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var queryOption = ClientRequestContextBase._parseQueryOption(option); + if (shouldPolyfill) { + return CommonActionFactory.createQueryAction(this._context, this, queryOption, resultHandler); + } + return CommonActionFactory.createQueryAsJsonAction(this._context, this, queryOption, resultHandler); + }; + ClientObjectBase.prototype._recursivelyUpdate = function (properties) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectUpdateMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.2'); + } + try { + var scalarPropNames = this[CommonConstants.scalarPropertyNames]; + if (!scalarPropNames) { + scalarPropNames = []; + } + var scalarPropUpdatable = this[CommonConstants.scalarPropertyUpdateable]; + if (!scalarPropUpdatable) { + scalarPropUpdatable = []; + for (var i = 0; i < scalarPropNames.length; i++) { + scalarPropUpdatable.push(false); + } + } + var navigationPropNames = this[CommonConstants.navigationPropertyNames]; + if (!navigationPropNames) { + navigationPropNames = []; + } + var scalarProps = {}; + var navigationProps = {}; + var scalarPropCount = 0; + for (var propName in properties) { + var index = scalarPropNames.indexOf(propName); + if (index >= 0) { + if (!scalarPropUpdatable[index]) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, propName), + debugInfo: { + errorLocation: propName + } + }); + } + scalarProps[propName] = properties[propName]; + ++scalarPropCount; + } + else if (navigationPropNames.indexOf(propName) >= 0) { + navigationProps[propName] = properties[propName]; + } + else { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, propName), + debugInfo: { + errorLocation: propName + } + }); + } + } + if (scalarPropCount > 0) { + if (shouldPolyfill) { + for (var i = 0; i < scalarPropNames.length; i++) { + var propName = scalarPropNames[i]; + var propValue = scalarProps[propName]; + if (!CommonUtility.isUndefined(propValue)) { + CommonActionFactory.createSetPropertyAction(this._context, this, propName, propValue); + } + } + } + else { + CommonActionFactory.createUpdateAction(this._context, this, scalarProps); + } + } + for (var propName in navigationProps) { + var navigationPropProxy = this[propName]; + var navigationPropValue = navigationProps[propName]; + navigationPropProxy._recursivelyUpdate(navigationPropValue); + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.update' + }, + innerError: innerError + }); + } + }; + return ClientObjectBase; + }()); + OfficeExtension_1.ClientObjectBase = ClientObjectBase; + var Action = (function () { + function Action(actionInfo, operationType, flags) { + this.m_actionInfo = actionInfo; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(Action.prototype, "actionInfo", { + get: function () { + return this.m_actionInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + return Action; + }()); + OfficeExtension_1.Action = Action; + var ObjectPath = (function () { + function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest, operationType, flags) { + this.m_objectPathInfo = objectPathInfo; + this.m_parentObjectPath = parentObjectPath; + this.m_isCollection = isCollection; + this.m_isInvalidAfterRequest = isInvalidAfterRequest; + this.m_isValid = true; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(ObjectPath.prototype, "id", { + get: function () { + var argumentInfo = this.m_objectPathInfo.ArgumentInfo; + if (!argumentInfo) { + return undefined; + } + var argument = argumentInfo.Arguments; + if (!argument) { + return undefined; + } + return argument[0]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parent", { + get: function () { + var parent = this.m_parentObjectPath; + if (!parent) { + return undefined; + } + return parent; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentId", { + get: function () { + return this.parent ? this.parent.id : undefined; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "objectPathInfo", { + get: function () { + return this.m_objectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isCollection", { + get: function () { + return this.m_isCollection; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isInvalidAfterRequest", { + get: function () { + return this.m_isInvalidAfterRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentObjectPath", { + get: function () { + return this.m_parentObjectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "argumentObjectPaths", { + get: function () { + return this.m_argumentObjectPaths; + }, + set: function (value) { + this.m_argumentObjectPaths = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isValid", { + get: function () { + return this.m_isValid; + }, + set: function (value) { + this.m_isValid = value; + if (!value && + this.m_objectPathInfo.ObjectPathType === 6 && + this.m_savedObjectPathInfo) { + ObjectPath.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo, this.m_objectPathInfo); + this.m_parentObjectPath = this.m_savedObjectPathInfo.parent; + this.m_isValid = true; + this.m_savedObjectPathInfo = null; + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "originalObjectPathInfo", { + get: function () { + return this.m_originalObjectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "getByIdMethodName", { + get: function () { + return this.m_getByIdMethodName; + }, + set: function (value) { + this.m_getByIdMethodName = value; + }, + enumerable: true, + configurable: true + }); + ObjectPath.prototype._updateAsNullObject = function () { + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 7; + this.m_objectPathInfo.Name = ''; + this.m_parentObjectPath = null; + }; + ObjectPath.prototype.saveOriginalObjectPathInfo = function () { + if (OfficeExtension_1.config.extendedErrorLogging && !this.m_originalObjectPathInfo) { + this.m_originalObjectPathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, this.m_originalObjectPathInfo); + } + }; + ObjectPath.prototype.updateUsingObjectData = function (value, clientObject) { + var referenceId = value[CommonConstants.referenceId]; + if (!CoreUtility.isNullOrEmptyString(referenceId)) { + if (!this.m_savedObjectPathInfo && + !this.isInvalidAfterRequest && + ObjectPath.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)) { + var pathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, pathInfo); + this.m_savedObjectPathInfo = { + pathInfo: pathInfo, + parent: this.m_parentObjectPath + }; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 6; + this.m_objectPathInfo.Name = referenceId; + delete this.m_objectPathInfo.ParentObjectPathId; + this.m_parentObjectPath = null; + return; + } + if (clientObject) { + var collectionPropertyPath = clientObject[CommonConstants.collectionPropertyPath]; + if (!CoreUtility.isNullOrEmptyString(collectionPropertyPath) && clientObject.context) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + var propNames = collectionPropertyPath.split('.'); + var parent_1 = clientObject.context[propNames[0]]; + for (var i = 1; i < propNames.length; i++) { + parent_1 = parent_1[propNames[i]]; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_parentObjectPath = parent_1._objectPath; + this.m_objectPathInfo.ParentObjectPathId = this.m_parentObjectPath.objectPathInfo.Id; + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + } + var parentIsCollection = this.parentObjectPath && this.parentObjectPath.isCollection; + var getByIdMethodName = this.getByIdMethodName; + if (parentIsCollection || !CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + if (!CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + this.m_objectPathInfo.ObjectPathType = 3; + this.m_objectPathInfo.Name = getByIdMethodName; + } + else { + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + } + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + }; + ObjectPath.prototype.resetForUpdateUsingObjectData = function () { + this.m_isInvalidAfterRequest = false; + this.m_isValid = true; + this.m_operationType = 1; + this.m_flags = 4; + this.m_objectPathInfo.ArgumentInfo = {}; + this.m_argumentObjectPaths = null; + this.m_getByIdMethodName = null; + }; + ObjectPath.isRestorableObjectPath = function (objectPathType) { + return (objectPathType === 1 || + objectPathType === 5 || + objectPathType === 3 || + objectPathType === 4); + }; + ObjectPath.copyObjectPathInfo = function (src, dest) { + dest.Id = src.Id; + dest.ArgumentInfo = src.ArgumentInfo; + dest.Name = src.Name; + dest.ObjectPathType = src.ObjectPathType; + dest.ParentObjectPathId = src.ParentObjectPathId; + }; + return ObjectPath; + }()); + OfficeExtension_1.ObjectPath = ObjectPath; + var ClientRequestContextBase = (function () { + function ClientRequestContextBase() { + this.m_nextId = 0; + } + ClientRequestContextBase.prototype._nextId = function () { + return ++this.m_nextId; + }; + ClientRequestContextBase.prototype._addServiceApiAction = function (action, resultHandler, resolve, reject) { + if (!this.m_serviceApiQueue) { + this.m_serviceApiQueue = new ServiceApiQueue(this); + } + this.m_serviceApiQueue.add(action, resultHandler, resolve, reject); + }; + ClientRequestContextBase._parseQueryOption = function (option) { + var queryOption = {}; + if (typeof option === 'string') { + var select = option; + queryOption.Select = CommonUtility._parseSelectExpand(select); + } + else if (Array.isArray(option)) { + queryOption.Select = option; + } + else if (typeof option === 'object') { + var loadOption = option; + if (ClientRequestContextBase.isLoadOption(loadOption)) { + if (typeof loadOption.select === 'string') { + queryOption.Select = CommonUtility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select = loadOption.select; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.select)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.select' }); + } + if (typeof loadOption.expand === 'string') { + queryOption.Expand = CommonUtility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand = loadOption.expand; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.expand)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.expand' }); + } + if (typeof loadOption.top === 'number') { + queryOption.Top = loadOption.top; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.top)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.top' }); + } + if (typeof loadOption.skip === 'number') { + queryOption.Skip = loadOption.skip; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.skip)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.skip' }); + } + } + else { + queryOption = ClientRequestContextBase.parseStrictLoadOption(option); + } + } + else if (!CommonUtility.isNullOrUndefined(option)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option' }); + } + return queryOption; + }; + ClientRequestContextBase.isLoadOption = function (loadOption) { + if (!CommonUtility.isUndefined(loadOption.select) && + (typeof loadOption.select === 'string' || Array.isArray(loadOption.select))) + return true; + if (!CommonUtility.isUndefined(loadOption.expand) && + (typeof loadOption.expand === 'string' || Array.isArray(loadOption.expand))) + return true; + if (!CommonUtility.isUndefined(loadOption.top) && typeof loadOption.top === 'number') + return true; + if (!CommonUtility.isUndefined(loadOption.skip) && typeof loadOption.skip === 'number') + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContextBase.parseStrictLoadOption = function (option) { + var ret = { Select: [] }; + ClientRequestContextBase.parseStrictLoadOptionHelper(ret, '', 'option', option); + return ret; + }; + ClientRequestContextBase.combineQueryPath = function (pathPrefix, key, separator) { + if (pathPrefix.length === 0) { + return key; + } + else { + return pathPrefix + separator + key; + } + }; + ClientRequestContextBase.parseStrictLoadOptionHelper = function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value = option[key]; + if (key === '$all') { + if (typeof value !== 'boolean') { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, '*', '/')); + } + } + else if (key === '$top') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Top = value; + } + else if (key === '$skip') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Skip = value; + } + else { + if (typeof value === 'boolean') { + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/')); + } + } + else if (typeof value === 'object') { + ClientRequestContextBase.parseStrictLoadOptionHelper(queryInfo, ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/'), ClientRequestContextBase.combineQueryPath(argPrefix, key, '.'), value); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + } + } + }; + return ClientRequestContextBase; + }()); + OfficeExtension_1.ClientRequestContextBase = ClientRequestContextBase; + var InstantiateActionUpdateObjectPathHandler = (function () { + function InstantiateActionUpdateObjectPathHandler(m_objectPath) { + this.m_objectPath = m_objectPath; + } + InstantiateActionUpdateObjectPathHandler.prototype._handleResult = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + this.m_objectPath._updateAsNullObject(); + } + else { + this.m_objectPath.updateUsingObjectData(value, null); + } + }; + return InstantiateActionUpdateObjectPathHandler; + }()); + var ClientRequestBase = (function () { + function ClientRequestBase(context) { + this.m_contextBase = context; + this.m_actions = []; + this.m_actionResultHandler = {}; + this.m_referencedObjectPaths = {}; + this.m_instantiatedObjectPaths = {}; + this.m_preSyncPromises = []; + this.m_previewExecutionActions = []; + } + ClientRequestBase.prototype.addAction = function (action) { + this.m_actions.push(action); + if (action.actionInfo.ActionType == 1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId] = action; + } + }; + ClientRequestBase.prototype.addPreviewExecutionAction = function (action) { + this.m_previewExecutionActions.push(action); + }; + Object.defineProperty(ClientRequestBase.prototype, "hasActions", { + get: function () { + return this.m_actions.length > 0; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._getLastAction = function () { + return this.m_actions[this.m_actions.length - 1]; + }; + ClientRequestBase.prototype.ensureInstantiateObjectPath = function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo = { + Id: this.m_contextBase._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction = new Action(actionInfo, 1, 4); + instantiateAction.referencedObjectPath = objectPath; + this.addReferencedObjectPath(objectPath); + this.addAction(instantiateAction); + var resultHandler = new InstantiateActionUpdateObjectPathHandler(objectPath); + this.addActionResultHandler(instantiateAction, resultHandler); + } + } + }; + ClientRequestBase.prototype.ensureInstantiateObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addReferencedObjectPath = function (objectPath) { + if (!objectPath || this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + while (objectPath) { + this.m_referencedObjectPaths[objectPath.objectPathInfo.Id] = objectPath; + if (objectPath.objectPathInfo.ObjectPathType == 3) { + this.addReferencedObjectPaths(objectPath.argumentObjectPaths); + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase.prototype.addReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.addReferencedObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addActionResultHandler = function (action, resultHandler) { + this.m_actionResultHandler[action.actionInfo.Id] = resultHandler; + }; + ClientRequestBase.prototype.aggregrateRequestFlags = function (requestFlags, operationType, flags) { + if (operationType === 0) { + requestFlags = requestFlags | 1; + if ((flags & 2) === 0) { + requestFlags = requestFlags & ~16; + } + if ((flags & 8) === 0) { + requestFlags = requestFlags & ~256; + } + requestFlags = requestFlags & ~4; + } + if (flags & 1) { + requestFlags = requestFlags | 2; + } + if ((flags & 4) === 0) { + requestFlags = requestFlags & ~4; + } + return requestFlags; + }; + ClientRequestBase.prototype.finallyNormalizeFlags = function (requestFlags) { + if ((requestFlags & 1) === 0) { + requestFlags = requestFlags & ~16; + requestFlags = requestFlags & ~256; + } + if (!OfficeExtension_1._internalConfig.enableConcurrentFlag) { + requestFlags = requestFlags & ~4; + } + if (!OfficeExtension_1._internalConfig.enableUndoableFlag) { + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.1')) { + requestFlags = requestFlags & ~4; + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.2')) { + requestFlags = requestFlags & ~256; + } + if (typeof this.m_flagsForTesting === 'number') { + requestFlags = this.m_flagsForTesting; + } + return requestFlags; + }; + ClientRequestBase.prototype.buildRequestMessageBodyAndRequestFlags = function () { + if (OfficeExtension_1._internalConfig.enableEarlyDispose) { + ClientRequestBase._calculateLastUsedObjectPathIds(this.m_actions); + } + var requestFlags = 4 | + 16 | + 256; + var objectPaths = {}; + for (var i in this.m_referencedObjectPaths) { + requestFlags = this.aggregrateRequestFlags(requestFlags, this.m_referencedObjectPaths[i].operationType, this.m_referencedObjectPaths[i].flags); + objectPaths[i] = this.m_referencedObjectPaths[i].objectPathInfo; + } + var actions = []; + var hasKeepReference = false; + for (var index = 0; index < this.m_actions.length; index++) { + var action = this.m_actions[index]; + if (action.actionInfo.ActionType === 3 && + action.actionInfo.Name === CommonConstants.keepReference) { + hasKeepReference = true; + } + requestFlags = this.aggregrateRequestFlags(requestFlags, action.operationType, action.flags); + actions.push(action.actionInfo); + } + requestFlags = this.finallyNormalizeFlags(requestFlags); + var body = { + AutoKeepReference: this.m_contextBase._autoCleanup && hasKeepReference, + Actions: actions, + ObjectPaths: objectPaths + }; + if (this.m_previewExecutionActions.length > 0) { + body.PreviewExecutionActions = this.m_previewExecutionActions; + requestFlags = requestFlags | 4096; + } + return { + body: body, + flags: requestFlags + }; + }; + ClientRequestBase.prototype.processResponse = function (actionResults) { + if (actionResults) { + for (var i = 0; i < actionResults.length; i++) { + var actionResult = actionResults[i]; + var handler = this.m_actionResultHandler[actionResult.ActionId]; + if (handler) { + handler._handleResult(actionResult.Value); + } + } + } + }; + ClientRequestBase.prototype.invalidatePendingInvalidObjectPaths = function () { + for (var i in this.m_referencedObjectPaths) { + if (this.m_referencedObjectPaths[i].isInvalidAfterRequest) { + this.m_referencedObjectPaths[i].isValid = false; + } + } + }; + ClientRequestBase.prototype._addPreSyncPromise = function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequestBase.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._removeKeepReferenceAction = function (objectPathId) { + for (var i = this.m_actions.length - 1; i >= 0; i--) { + var actionInfo = this.m_actions[i].actionInfo; + if (actionInfo.ObjectPathId === objectPathId && + actionInfo.ActionType === 3 && + actionInfo.Name === CommonConstants.keepReference) { + this.m_actions.splice(i, 1); + break; + } + } + }; + ClientRequestBase._updateLastUsedActionIdOfObjectPathId = function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id] = actionId; + var argumentObjectPaths = objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength = argumentObjectPaths.length; + for (var i = 0; i < argumentObjectPathsLength; i++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase._calculateLastUsedObjectPathIds = function (actions) { + var lastUsedActionIdOfObjectPathId = {}; + var actionsLength = actions.length; + for (var index = actionsLength - 1; index >= 0; --index) { + var action = actions[index]; + var actionId = action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths = action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength = referencedObjectPaths.length; + for (var refIndex = 0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction = {}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId = lastUsedActionIdOfObjectPathId[key]; + var objectPathIds = lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds = []; + lastUsedObjectPathIdsOfAction[actionId] = objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index = 0; index < actionsLength; index++) { + var action = actions[index]; + var lastUsedObjectPathIds = lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L = lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; + return ClientRequestBase; + }()); + OfficeExtension_1.ClientRequestBase = ClientRequestBase; + var ClientResult = (function () { + function ClientResult(m_type) { + this.m_type = m_type; + } + Object.defineProperty(ClientResult.prototype, "value", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'clientResult.value' + } + }); + } + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ClientResult.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (typeof value === 'object' && value && value._IsNull) { + return; + } + if (this.m_type === 1) { + this.m_value = CommonUtility.adjustToDateTime(value); + } + else { + this.m_value = value; + } + }; + return ClientResult; + }()); + OfficeExtension_1.ClientResult = ClientResult; + var ServiceApiQueue = (function () { + function ServiceApiQueue(m_context) { + this.m_context = m_context; + this.m_actions = []; + } + ServiceApiQueue.prototype.add = function (action, resultHandler, resolve, reject) { + var _this = this; + this.m_actions.push({ action: action, resultHandler: resultHandler, resolve: resolve, reject: reject }); + if (this.m_actions.length === 1) { + setTimeout(function () { return _this.processActions(); }, 0); + } + }; + ServiceApiQueue.prototype.processActions = function () { + var _this = this; + if (this.m_actions.length === 0) { + return; + } + var actions = this.m_actions; + this.m_actions = []; + var request = new ClientRequestBase(this.m_context); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + request.ensureInstantiateObjectPath(action.action.referencedObjectPath); + request.ensureInstantiateObjectPaths(action.action.referencedArgumentObjectPaths); + request.addAction(action.action); + request.addReferencedObjectPath(action.action.referencedObjectPath); + request.addReferencedObjectPaths(action.action.referencedArgumentObjectPaths); + } + var _a = request.buildRequestMessageBodyAndRequestFlags(), body = _a.body, flags = _a.flags; + var requestMessage = { + Url: CoreConstants.localDocumentApiPrefix, + Headers: null, + Body: body + }; + CoreUtility.log('Request:'); + CoreUtility.log(JSON.stringify(body)); + var executor = new HttpRequestExecutor(); + executor + .executeAsync(this.m_context._customData, flags, requestMessage) + .then(function (response) { + _this.processResponse(request, actions, response); + })["catch"](function (ex) { + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + action.reject(ex); + } + }); + }; + ServiceApiQueue.prototype.processResponse = function (request, actions, response) { + var error = this.getErrorFromResponse(response); + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (!actionResults) { + actionResults = []; + } + this.processActionResults(request, actions, actionResults, error); + }; + ServiceApiQueue.prototype.getErrorFromResponse = function (response) { + if (!CoreUtility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage + }); + } + if (response.Body && response.Body.Error) { + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message + }); + } + return null; + }; + ServiceApiQueue.prototype.processActionResults = function (request, actions, actionResults, err) { + request.processResponse(actionResults); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + var actionId = action.action.actionInfo.Id; + var hasResult = false; + for (var j = 0; j < actionResults.length; j++) { + if (actionId == actionResults[j].ActionId) { + var resultValue = actionResults[j].Value; + if (action.resultHandler) { + action.resultHandler._handleResult(resultValue); + resultValue = action.resultHandler.value; + } + if (action.resolve) { + action.resolve(resultValue); + } + hasResult = true; + break; + } + } + if (!hasResult && action.reject) { + if (err) { + action.reject(err); + } + else { + action.reject('No response for the action.'); + } + } + } + }; + return ServiceApiQueue; + }()); + var HttpRequestExecutor = (function () { + function HttpRequestExecutor() { + } + HttpRequestExecutor.prototype.getRequestUrl = function (baseUrl, requestFlags) { + if (baseUrl.charAt(baseUrl.length - 1) != '/') { + baseUrl = baseUrl + '/'; + } + baseUrl = baseUrl + CoreConstants.processQuery; + baseUrl = baseUrl + '?' + CoreConstants.flags + '=' + requestFlags.toString(); + return baseUrl; + }; + HttpRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var url = this.getRequestUrl(requestMessage.Url, requestFlags); + var requestInfo = { + method: 'POST', + url: url, + headers: {}, + body: requestMessage.Body + }; + requestInfo.headers[CoreConstants.sourceLibHeader] = HttpRequestExecutor.SourceLibHeaderValue; + requestInfo.headers['CONTENT-TYPE'] = 'application/json'; + if (requestMessage.Headers) { + for (var key in requestMessage.Headers) { + requestInfo.headers[key] = requestMessage.Headers[key]; + } + } + var sendRequestFunc = CoreUtility._isLocalDocumentUrl(requestInfo.url) + ? HttpUtility.sendLocalDocumentRequest + : HttpUtility.sendRequest; + return sendRequestFunc(requestInfo).then(function (responseInfo) { + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null, + RawErrorResponseBody: CoreUtility._parseErrorResponseBody(responseInfo) + }; + } + return response; + }); + }; + HttpRequestExecutor.SourceLibHeaderValue = 'officejs-rest'; + return HttpRequestExecutor; + }()); + OfficeExtension_1.HttpRequestExecutor = HttpRequestExecutor; + var CommonConstants = (function (_super) { + __extends(CommonConstants, _super); + function CommonConstants() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonConstants.collectionPropertyPath = '_collectionPropertyPath'; + CommonConstants.id = 'Id'; + CommonConstants.idLowerCase = 'id'; + CommonConstants.idPrivate = '_Id'; + CommonConstants.keepReference = '_KeepReference'; + CommonConstants.objectPathIdPrivate = '_ObjectPathId'; + CommonConstants.referenceId = '_ReferenceId'; + CommonConstants.items = '_Items'; + CommonConstants.itemsLowerCase = 'items'; + CommonConstants.scalarPropertyNames = '_scalarPropertyNames'; + CommonConstants.scalarPropertyOriginalNames = '_scalarPropertyOriginalNames'; + CommonConstants.navigationPropertyNames = '_navigationPropertyNames'; + CommonConstants.scalarPropertyUpdateable = '_scalarPropertyUpdateable'; + CommonConstants.previewExecutionObjectId = '_previewExecutionObjectId'; + return CommonConstants; + }(CoreConstants)); + OfficeExtension_1.CommonConstants = CommonConstants; + var CommonUtility = (function (_super) { + __extends(CommonUtility, _super); + function CommonUtility() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonUtility.validateObjectPath = function (clientObject) { + var objectPath = clientObject._objectPath; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + objectPath = objectPath.parentObjectPath; + } + }; + CommonUtility.validateReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + var objectPath = objectPaths[i]; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)) + }); + } + objectPath = objectPath.parentObjectPath; + } + } + } + }; + CommonUtility._toCamelLowerCase = function (name) { + if (CoreUtility.isNullOrEmptyString(name)) { + return name; + } + var index = 0; + while (index < name.length && name.charCodeAt(index) >= 65 && name.charCodeAt(index) <= 90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase() + name.substr(index); + } + else { + return name.toLowerCase(); + } + }; + CommonUtility.adjustToDateTime = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return null; + } + if (typeof value === 'string') { + return new Date(value); + } + if (Array.isArray(value)) { + var arr = value; + for (var i = 0; i < arr.length; i++) { + arr[i] = CommonUtility.adjustToDateTime(arr[i]); + } + return arr; + } + throw CoreUtility._createInvalidArgError({ argumentName: 'date' }); + }; + CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult = function (value) { + var id = value[CommonConstants.id]; + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idLowerCase]; + } + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idPrivate]; + } + return id; + }; + CommonUtility.getObjectPathExpression = function (objectPath) { + var ret = ''; + while (objectPath) { + switch (objectPath.objectPathInfo.ObjectPathType) { + case 1: + ret = ret; + break; + case 2: + ret = 'new()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 3: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + '()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 4: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + (ret.length > 0 ? '.' : '') + ret; + break; + case 5: + ret = 'getItem()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 6: + ret = '_reference()' + (ret.length > 0 ? '.' : '') + ret; + break; + } + objectPath = objectPath.parentObjectPath; + } + return ret; + }; + CommonUtility.setMethodArguments = function (context, argumentInfo, args) { + if (CoreUtility.isNullOrUndefined(args)) { + return null; + } + var referencedObjectPaths = new Array(); + var referencedObjectPathIds = new Array(); + var hasOne = CommonUtility.collectObjectPathInfos(context, args, referencedObjectPaths, referencedObjectPathIds); + argumentInfo.Arguments = args; + if (hasOne) { + argumentInfo.ReferencedObjectPathIds = referencedObjectPathIds; + } + return referencedObjectPaths; + }; + CommonUtility.validateContext = function (context, obj) { + if (context && obj && obj._context !== context) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidRequestContext, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidRequestContext) + }); + } + }; + CommonUtility.isSetSupported = function (apiSetName, apiSetVersion) { + if (typeof CommonUtility.isSetSupportedOverride === "function") { + return CommonUtility.isSetSupportedOverride(apiSetName, apiSetVersion); + } + if (typeof window !== 'undefined' && + window.Office && + window.Office.context && + window.Office.context.requirements) { + return window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion); + } + return true; + }; + CommonUtility.throwIfApiNotSupported = function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!CommonUtility._doApiNotSupportedCheck) { + return; + } + if (!CommonUtility.isSetSupported(apiSetName, apiSetVersion)) { + var message = CoreUtility._getResourceString(CoreResourceStrings.apiNotFoundDetails, [ + apiFullName, + apiSetName + ' ' + apiSetVersion, + hostName + ]); + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.apiNotFound, + httpStatusCode: 404, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + }; + CommonUtility.calculateApiFlags = function (apiFlags, undoableApiSetName, undoableApiSetVersion) { + var undoable = false; + var inMakerRuntime = (window + && window.location + && window.location.href + && window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc") !== -1); + if (typeof CommonUtility.isSetSupportedOverride === "function") { + undoable = CommonUtility.isSetSupportedOverride(undoableApiSetName, undoableApiSetVersion); + } + else if (inMakerRuntime) { + undoable = false; + } + else { + undoable = CommonUtility.isSetSupported(undoableApiSetName, undoableApiSetVersion); + } + if (!undoable) { + apiFlags = apiFlags & (~2); + } + return apiFlags; + }; + CommonUtility._parseSelectExpand = function (select) { + var args = []; + if (!CoreUtility.isNullOrEmptyString(select)) { + var propertyNames = select.split(','); + for (var i = 0; i < propertyNames.length; i++) { + var propertyName = propertyNames[i]; + propertyName = sanitizeForAnyItemsSlash(propertyName.trim()); + if (propertyName.length > 0) { + args.push(propertyName); + } + } + } + return args; + function sanitizeForAnyItemsSlash(propertyName) { + var propertyNameLower = propertyName.toLowerCase(); + if (propertyNameLower === 'items' || propertyNameLower === 'items/') { + return '*'; + } + var itemsSlashLength = 6; + var isItemsSlashOrItemsDot = propertyNameLower.substr(0, itemsSlashLength) === 'items/' || + propertyNameLower.substr(0, itemsSlashLength) === 'items.'; + if (isItemsSlashOrItemsDot) { + propertyName = propertyName.substr(itemsSlashLength); + } + return propertyName.replace(new RegExp('[/.]items[/.]', 'gi'), '/'); + } + }; + CommonUtility.changePropertyNameToCamelLowerCase = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + var propValue = value[key]; + if (key === CommonConstants.items) { + ret = {}; + ret[CommonConstants.itemsLowerCase] = this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else { + var propName = CommonUtility._toCamelLowerCase(key); + ret[propName] = this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.purifyJson = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.purifyJson(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + if (key.charCodeAt(0) !== charCodeUnderscore) { + var propValue = value[key]; + if (typeof propValue === 'object' && propValue !== null && Array.isArray(propValue['items'])) { + propValue = propValue['items']; + } + ret[key] = this.purifyJson(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.collectObjectPathInfos = function (context, args, referencedObjectPaths, referencedObjectPathIds) { + var hasOne = false; + for (var i = 0; i < args.length; i++) { + if (args[i] instanceof ClientObjectBase) { + var clientObject = args[i]; + CommonUtility.validateContext(context, clientObject); + args[i] = clientObject._objectPath.objectPathInfo.Id; + referencedObjectPathIds.push(clientObject._objectPath.objectPathInfo.Id); + referencedObjectPaths.push(clientObject._objectPath); + hasOne = true; + } + else if (Array.isArray(args[i])) { + var childArrayObjectPathIds = new Array(); + var childArrayHasOne = CommonUtility.collectObjectPathInfos(context, args[i], referencedObjectPaths, childArrayObjectPathIds); + if (childArrayHasOne) { + referencedObjectPathIds.push(childArrayObjectPathIds); + hasOne = true; + } + else { + referencedObjectPathIds.push(0); + } + } + else if (CoreUtility.isPlainJsonObject(args[i])) { + referencedObjectPathIds.push(0); + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(args[i], referencedObjectPaths); + } + else { + referencedObjectPathIds.push(0); + } + } + return hasOne; + }; + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds = function (value, referencedObjectPaths) { + var _a, _b; + for (var key in value) { + var propValue = value[key]; + if (propValue instanceof ClientObjectBase) { + referencedObjectPaths.push(propValue._objectPath); + value[key] = (_a = {}, _a[CommonConstants.objectPathIdPrivate] = propValue._objectPath.objectPathInfo.Id, _a); + } + else if (Array.isArray(propValue)) { + for (var i = 0; i < propValue.length; i++) { + if (propValue[i] instanceof ClientObjectBase) { + var elem = propValue[i]; + referencedObjectPaths.push(elem._objectPath); + propValue[i] = (_b = {}, _b[CommonConstants.objectPathIdPrivate] = elem._objectPath.objectPathInfo.Id, _b); + } + else if (CoreUtility.isPlainJsonObject(propValue[i])) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue[i], referencedObjectPaths); + } + } + } + else if (CoreUtility.isPlainJsonObject(propValue)) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue, referencedObjectPaths); + } + else { + } + } + }; + CommonUtility.normalizeName = function (name) { + return name.substr(0, 1).toLowerCase() + name.substr(1); + }; + CommonUtility._doApiNotSupportedCheck = false; + return CommonUtility; + }(CoreUtility)); + OfficeExtension_1.CommonUtility = CommonUtility; + var CommonResourceStrings = (function (_super) { + __extends(CommonResourceStrings, _super); + function CommonResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonResourceStrings.propertyDoesNotExist = 'PropertyDoesNotExist'; + CommonResourceStrings.attemptingToSetReadOnlyProperty = 'AttemptingToSetReadOnlyProperty'; + return CommonResourceStrings; + }(CoreResourceStrings)); + OfficeExtension_1.CommonResourceStrings = CommonResourceStrings; + var ClientRetrieveResult = (function (_super) { + __extends(ClientRetrieveResult, _super); + function ClientRetrieveResult(m_shouldPolyfill) { + var _this = _super.call(this) || this; + _this.m_shouldPolyfill = m_shouldPolyfill; + return _this; + } + ClientRetrieveResult.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (this.m_shouldPolyfill) { + this.m_value = CommonUtility.changePropertyNameToCamelLowerCase(this.m_value); + } + this.m_value = this.removeItemNodes(this.m_value); + }; + ClientRetrieveResult.prototype.removeItemNodes = function (value) { + if (typeof value === 'object' && value !== null && value[CommonConstants.itemsLowerCase]) { + value = value[CommonConstants.itemsLowerCase]; + } + return CommonUtility.purifyJson(value); + }; + return ClientRetrieveResult; + }(ClientResult)); + OfficeExtension_1.ClientRetrieveResult = ClientRetrieveResult; + var TraceActionResultHandler = (function () { + function TraceActionResultHandler(callback) { + this.callback = callback; + } + TraceActionResultHandler.prototype._handleResult = function (value) { + if (this.callback) { + this.callback(); + } + }; + return TraceActionResultHandler; + }()); + var ClientResultCallback = (function (_super) { + __extends(ClientResultCallback, _super); + function ClientResultCallback(callback) { + var _this = _super.call(this) || this; + _this.callback = callback; + return _this; + } + ClientResultCallback.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + this.callback(); + }; + return ClientResultCallback; + }(ClientResult)); + OfficeExtension_1.ClientResultCallback = ClientResultCallback; + var OperationalApiHelper = (function () { + function OperationalApiHelper() { + } + OperationalApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + if (operationType === void 0) { + operationType = 0; + } + if (args === void 0) { + args = []; + } + if (flags === void 0) { + flags = 0; + } + if (resultProcessType === void 0) { + resultProcessType = 0; + } + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResult(); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeMethodWithClientResultCallback = function (callback, obj, methodName) { + var operationType = 0; + var args = []; + var flags = 0; + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResultCallback(callback); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeRetrieve = function (obj, select) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var option; + if (typeof select[0] === 'object' && select[0].hasOwnProperty('$all')) { + if (!select[0]['$all']) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + option = select[0]; + } + else { + option = OperationalApiHelper._parseSelectOption(select); + } + return obj._retrieve(option, new ClientRetrieveResult(shouldPolyfill)); + }; + OperationalApiHelper._parseSelectOption = function (select) { + if (!select || !select[0]) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + var parsedSelect = select[0] && typeof select[0] !== 'string' ? select[0] : select; + return Array.isArray(parsedSelect) ? parsedSelect : OperationalApiHelper.parseRecursiveSelect(parsedSelect); + }; + OperationalApiHelper.parseRecursiveSelect = function (select) { + var deconstruct = function (selectObj) { + return Object.keys(selectObj).reduce(function (scalars, name) { + var value = selectObj[name]; + if (typeof value === 'object') { + return scalars.concat(deconstruct(value).map(function (postfix) { return name + "/" + postfix; })); + } + if (value) { + return scalars.concat(name); + } + return scalars; + }, []); + }; + return deconstruct(select); + }; + OperationalApiHelper.invokeRecursiveUpdate = function (obj, properties) { + return CoreUtility.createPromise(function (resolve, reject) { + obj._recursivelyUpdate(properties); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + obj._context._addServiceApiAction(action, null, resolve, reject); + }); + }; + OperationalApiHelper.createRootServiceObject = function (type, context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + var objectPath = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var objectPath = new ObjectPath(objectPathInfo, null, isCollection, false, 1, flags | 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, false, 1, flags | 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createIndexerObject = function (type, parent, args) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var id = parent._context._nextId(); + var objectPathInfo = { + Id: id, + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var o = new type(parent._context, objectPath); + return o; + }; + OperationalApiHelper.createAndInstantiateMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + return CoreUtility.createPromise(function (resolve, reject) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var result = new ClientResult(); + var actionInfo = { + Id: parent._context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id, + QueryInfo: {} + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = objectPath; + parent._context._addServiceApiAction(action, result, function () { return resolve(new type(parent._context, objectPath)); }, reject); + }); + }; + OperationalApiHelper.createTraceAction = function (context, callback) { + return CoreUtility.createPromise(function (resolve, reject) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + var result = new TraceActionResultHandler(callback); + context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.localDocumentContext = new ClientRequestContextBase(); + return OperationalApiHelper; + }()); + OfficeExtension_1.OperationalApiHelper = OperationalApiHelper; + var GenericEventRegistryOperational = (function () { + function GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform) { + this.eventId = eventId; + this.targetId = targetId; + this.eventArgumentTransform = eventArgumentTransform; + this.registeredCallbacks = []; + } + GenericEventRegistryOperational.prototype.add = function (callback) { + if (this.hasZero()) { + GenericEventRegistration.getGenericEventRegistration('').register(this.eventId, this.targetId, this.registerCallback); + } + this.registeredCallbacks.push(callback); + }; + GenericEventRegistryOperational.prototype.remove = function (callback) { + var index = this.registeredCallbacks.lastIndexOf(callback); + if (index !== -1) { + this.registeredCallbacks.splice(index, 1); + } + }; + GenericEventRegistryOperational.prototype.removeAll = function () { + this.registeredCallbacks = []; + GenericEventRegistration.getGenericEventRegistration('').unregister(this.eventId, this.targetId, this.registerCallback); + }; + GenericEventRegistryOperational.prototype.hasZero = function () { + return this.registeredCallbacks.length === 0; + }; + Object.defineProperty(GenericEventRegistryOperational.prototype, "registerCallback", { + get: function () { + var i = this; + if (!this.outsideCallback) { + this.outsideCallback = function (argument) { + i.call(argument); + }; + } + return this.outsideCallback; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistryOperational.prototype.call = function (rawEventArguments) { + var _this = this; + this.eventArgumentTransform(rawEventArguments).then(function (eventArguments) { + var promises = _this.registeredCallbacks.map(function (callback) { return GenericEventRegistryOperational.callCallback(callback, eventArguments); }); + CoreUtility.Promise.all(promises); + }); + }; + GenericEventRegistryOperational.callCallback = function (callback, eventArguments) { + return CoreUtility._createPromiseFromResult(null) + .then(GenericEventRegistryOperational.wrapCallbackInFunction(callback, eventArguments))["catch"](function (e) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(e)); + }); + }; + GenericEventRegistryOperational.wrapCallbackInFunction = function (callback, args) { + return function () { return callback(args); }; + }; + return GenericEventRegistryOperational; + }()); + OfficeExtension_1.GenericEventRegistryOperational = GenericEventRegistryOperational; + var GlobalEventRegistryOperational = (function () { + function GlobalEventRegistryOperational() { + this.eventToTargetToHandlerMap = {}; + } + Object.defineProperty(GlobalEventRegistryOperational, "globalEventRegistry", { + get: function () { + if (!GlobalEventRegistryOperational.singleton) { + GlobalEventRegistryOperational.singleton = new GlobalEventRegistryOperational(); + } + return GlobalEventRegistryOperational.singleton; + }, + enumerable: true, + configurable: true + }); + GlobalEventRegistryOperational.getGlobalEventRegistry = function (eventId, targetId, eventArgumentTransform) { + var global = GlobalEventRegistryOperational.globalEventRegistry; + var mapGlobal = global.eventToTargetToHandlerMap; + if (!mapGlobal.hasOwnProperty(eventId)) { + mapGlobal[eventId] = {}; + } + var mapEvent = mapGlobal[eventId]; + if (!mapEvent.hasOwnProperty(targetId)) { + mapEvent[targetId] = new GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform); + } + var target = mapEvent[targetId]; + return target; + }; + GlobalEventRegistryOperational.singleton = undefined; + return GlobalEventRegistryOperational; + }()); + OfficeExtension_1.GlobalEventRegistryOperational = GlobalEventRegistryOperational; + var GenericEventHandlerOperational = (function () { + function GenericEventHandlerOperational(genericEventInfo) { + this.genericEventInfo = genericEventInfo; + } + GenericEventHandlerOperational.prototype.add = function (callback) { + var _this = this; + var eventRegistered = undefined; + var promise = CoreUtility.createPromise(function (resolve) { + eventRegistered = resolve; + }); + var addCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.add(callback); + eventRegistered(); + }; + this.register(); + this.createTrace(addCallback); + return promise; + }; + GenericEventHandlerOperational.prototype.remove = function (callback) { + var _this = this; + var removeCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.remove(callback); + }; + this.register(); + this.createTrace(removeCallback); + }; + GenericEventHandlerOperational.prototype.removeAll = function () { + var _this = this; + var removeAllCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.removeAll(); + }; + this.unregister(); + this.createTrace(removeAllCallback); + }; + GenericEventHandlerOperational.prototype.createTrace = function (callback) { + OperationalApiHelper.createTraceAction(this.genericEventInfo.object._context, callback); + }; + GenericEventHandlerOperational.prototype.register = function () { + var operationType = 0; + var args = []; + var flags = 0; + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.register, operationType, args, flags); + if (!GenericEventRegistration.getGenericEventRegistration('').isReady) { + GenericEventRegistration.getGenericEventRegistration('').ready(); + } + }; + GenericEventHandlerOperational.prototype.unregister = function () { + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.unregister); + }; + return GenericEventHandlerOperational; + }()); + OfficeExtension_1.GenericEventHandlerOperational = GenericEventHandlerOperational; + var EventHelper = (function () { + function EventHelper() { + } + EventHelper.invokeOn = function (eventHandler, callback, options) { + var promiseResolve = undefined; + var promise = CoreUtility.createPromise(function (resolve, reject) { + promiseResolve = resolve; + }); + eventHandler.add(callback).then(function () { + promiseResolve({}); + }); + return promise; + }; + EventHelper.invokeOff = function (genericEventHandlersOpObj, eventHandler, eventName, callback) { + if (!eventName && !callback) { + var allGenericEventHandlersOp = Object.keys(genericEventHandlersOpObj).map(function (eventName) { return genericEventHandlersOpObj[eventName]; }); + return EventHelper.invokeAllOff(allGenericEventHandlersOp); + } + if (!eventName) { + return CoreUtility._createPromiseFromException(eventName + " must be supplied if handler is supplied."); + } + if (callback) { + eventHandler.remove(callback); + } + else { + eventHandler.removeAll(); + } + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + EventHelper.invokeAllOff = function (allGenericEventHandlersOperational) { + allGenericEventHandlersOperational.forEach(function (genericEventHandlerOperational) { + genericEventHandlerOperational.removeAll(); + }); + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + return EventHelper; + }()); + OfficeExtension_1.EventHelper = EventHelper; + var ErrorCodes = (function (_super) { + __extends(ErrorCodes, _super); + function ErrorCodes() { + return _super !== null && _super.apply(this, arguments) || this; + } + ErrorCodes.propertyNotLoaded = 'PropertyNotLoaded'; + ErrorCodes.runMustReturnPromise = 'RunMustReturnPromise'; + ErrorCodes.cannotRegisterEvent = 'CannotRegisterEvent'; + ErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + ErrorCodes.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ErrorCodes; + }(CoreErrorCodes)); + OfficeExtension_1.ErrorCodes = ErrorCodes; + var TraceMarkerActionResultHandler = (function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback = callback; + } + TraceMarkerActionResultHandler.prototype._handleResult = function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); + var ActionFactory = (function (_super) { + __extends(ActionFactory, _super); + function ActionFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + ActionFactory.createMethodAction = function (context, parent, methodName, operationType, args, flags) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var fixedFlags = Utility._fixupApiFlags(flags); + var action = new Action(actionInfo, operationType, fixedFlags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + parent._addAction(action); + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (fixedFlags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + Arguments: args, + ObjectId: '', + ObjectType: '' + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return action; + }; + ActionFactory.createRecursiveQueryAction = function (context, parent, query) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 6, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + RecursiveQueryInfo: query + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createEnsureUnchangedAction = function (context, parent, objectState) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 8, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createInstantiateAction = function (context, obj) { + Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); + var actionInfo = { + Id: context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: obj._objectPath.objectPathInfo.Id + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = obj._objectPath; + obj._addAction(action, new InstantiateActionResultHandler(obj), true); + return action; + }; + ActionFactory.createTraceAction = function (context, message, addTraceMessage) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var ret = new Action(actionInfo, 1, 4); + context._pendingRequest.addAction(ret); + if (addTraceMessage) { + context._pendingRequest.addTrace(actionInfo.Id, message); + } + return ret; + }; + ActionFactory.createTraceMarkerForCallback = function (context, callback) { + var action = ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; + return ActionFactory; + }(CommonActionFactory)); + OfficeExtension_1.ActionFactory = ActionFactory; + var ClientObject = (function (_super) { + __extends(ClientObject, _super); + function ClientObject(context, objectPath) { + var _this = _super.call(this, context, objectPath) || this; + Utility.checkArgumentNull(context, 'context'); + _this.m_context = context; + if (_this._objectPath) { + if (!context._processingResult && context._pendingRequest) { + ActionFactory.createInstantiateAction(context, _this); + if (context._autoCleanup && _this._KeepReference) { + context.trackedObjects._autoAdd(_this); + } + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo && _this._objectPath.objectPathInfo && _this._className) { + _this._objectPath.objectPathInfo.T = _this._className; + } + } + return _this; + } + Object.defineProperty(ClientObject.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNull", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNull', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNullObject", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNullObject', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "_isNull", { + get: function () { + return this.m_isNull; + }, + set: function (value) { + this.m_isNull = value; + if (value && this._objectPath) { + this._objectPath._updateAsNullObject(); + } + }, + enumerable: true, + configurable: true + }); + ClientObject.prototype._addAction = function (action, resultHandler, isInstantiationEnsured) { + if (resultHandler === void 0) { + resultHandler = null; + } + if (!isInstantiationEnsured) { + this.context._pendingRequest.ensureInstantiateObjectPath(this._objectPath); + this.context._pendingRequest.ensureInstantiateObjectPaths(action.referencedArgumentObjectPaths); + } + this.context._pendingRequest.addAction(action); + this.context._pendingRequest.addReferencedObjectPath(this._objectPath); + this.context._pendingRequest.addReferencedObjectPaths(action.referencedArgumentObjectPaths); + this.context._pendingRequest.addActionResultHandler(action, resultHandler); + return CoreUtility._createPromiseFromResult(null); + }; + ClientObject.prototype._addPreviewExecutionAction = function (action) { + if (!Utility.isUndefined(this._className)) { + action.ObjectType = this._className; + var objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idLowerCase); + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idPrivate); + } + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.previewExecutionObjectId); + } + action.ObjectId = objectId; + this.context._pendingRequest.addPreviewExecutionAction(action); + } + }; + ClientObject.prototype._handleResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleIdResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + Utility.fixObjectPathIfNecessary(this, value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleRetrieveResult = function (value, result) { + this._handleIdResult(value); + }; + ClientObject.prototype._recursivelySet = function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { + var isClientObject = input instanceof ClientObject; + var originalInput = input; + if (isClientObject) { + if (Object.getPrototypeOf(this) === Object.getPrototypeOf(input)) { + input = JSON.parse(JSON.stringify(input)); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'properties', + errorLocation: this._className + '.set' + }); + } + } + try { + var prop; + for (var i = 0; i < scalarWriteablePropertyNames.length; i++) { + prop = scalarWriteablePropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + this[prop] = input[prop]; + } + } + } + for (var i = 0; i < objectPropertyNames.length; i++) { + prop = objectPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + var dataToPassToSet = isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } + } + } + var throwOnReadOnly = !isClientObject; + if (options && !Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly = options.throwOnReadOnly; + } + for (var i = 0; i < notAllowedToBeSetPropertyNames.length; i++) { + prop = notAllowedToBeSetPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined' && throwOnReadOnly) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + for (prop in input) { + if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); + if (!propertyDescriptor) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, prop), + debugInfo: { + errorLocation: prop + } + }); + } + if (throwOnReadOnly && !propertyDescriptor.set) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.set' + }, + innerError: innerError + }); + } + }; + return ClientObject; + }(ClientObjectBase)); + OfficeExtension_1.ClientObject = ClientObject; + var HostBridgeRequestExecutor = (function () { + function HostBridgeRequestExecutor(session) { + this.m_session = session; + } + HostBridgeRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var httpRequestInfo = { + url: CoreConstants.processQuery, + method: 'POST', + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var controlId = ''; + if (requestMessage.Headers) { + controlId = requestMessage.Headers[Constants.officeControlId]; + } + var message = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + controlId: controlId, + message: httpRequestInfo + }; + CoreUtility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message).then(function (nativeBridgeResponse) { + CoreUtility.log('Received response: ' + JSON.stringify(nativeBridgeResponse)); + var responseInfo = nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession = (function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(m_bridge) { + var _this = _super.call(this) || this; + _this.m_bridge = m_bridge; + _this.m_bridge.addHostMessageHandler(function (message) { + if (message.type === 3) { + var controlId = message.controlId; + if (CoreUtility.isNullOrEmptyString(controlId)) { + GenericEventRegistration.getGenericEventRegistration(controlId)._handleRichApiMessage(message.message); + } + else { + var eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(controlId); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(''); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + } + } + }); + return _this; + } + HostBridgeSession.getInstanceIfHostBridgeInited = function () { + if (HostBridge.instance) { + if (CoreUtility.isNullOrUndefined(HostBridgeSession.s_instance) || + HostBridgeSession.s_instance.m_bridge !== HostBridge.instance) { + HostBridgeSession.s_instance = new HostBridgeSession(HostBridge.instance); + } + return HostBridgeSession.s_instance; + } + return null; + }; + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull = function () { + CoreUtility.log('NativeBridgeSession::CreateRequestExecutor'); + return new HostBridgeRequestExecutor(this); + }; + HostBridgeSession.prototype.getEventRegistration = function (controlId) { + return GenericEventRegistration.getGenericEventRegistration(controlId); + }; + HostBridgeSession.prototype.sendMessageToHost = function (message) { + return this.m_bridge.sendMessageToHostAndExpectResponse(message); + }; + return HostBridgeSession; + }(SessionBase)); + OfficeExtension_1.HostBridgeSession = HostBridgeSession; + var ClientRequestContext = (function (_super) { + __extends(ClientRequestContext, _super); + function ClientRequestContext(url) { + var _this = _super.call(this) || this; + _this.m_customRequestHeaders = {}; + _this.m_batchMode = 0; + _this._onRunFinishedNotifiers = []; + if (SessionBase._overrideSession) { + _this.m_requestUrlAndHeaderInfoResolver = SessionBase._overrideSession; + } + else { + if (Utility.isNullOrUndefined(url) || (typeof url === 'string' && url.length === 0)) { + url = ClientRequestContext.defaultRequestUrlAndHeaders; + if (!url) { + url = { url: CoreConstants.localDocument, headers: {} }; + } + } + if (typeof url === 'string') { + _this.m_requestUrlAndHeaderInfo = { url: url, headers: {} }; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfoResolver(url)) { + _this.m_requestUrlAndHeaderInfoResolver = url; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfo(url)) { + var requestInfo = url; + _this.m_requestUrlAndHeaderInfo = { url: requestInfo.url, headers: {} }; + CoreUtility._copyHeaders(requestInfo.headers, _this.m_requestUrlAndHeaderInfo.headers); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'url' }); + } + } + if (!_this.m_requestUrlAndHeaderInfoResolver && + _this.m_requestUrlAndHeaderInfo && + CoreUtility._isLocalDocumentUrl(_this.m_requestUrlAndHeaderInfo.url) && + HostBridgeSession.getInstanceIfHostBridgeInited()) { + _this.m_requestUrlAndHeaderInfo = null; + _this.m_requestUrlAndHeaderInfoResolver = HostBridgeSession.getInstanceIfHostBridgeInited(); + } + if (_this.m_requestUrlAndHeaderInfoResolver instanceof SessionBase) { + _this.m_session = _this.m_requestUrlAndHeaderInfoResolver; + } + _this._processingResult = false; + _this._customData = Constants.iterativeExecutor; + _this.sync = _this.sync.bind(_this); + return _this; + } + Object.defineProperty(ClientRequestContext.prototype, "session", { + get: function () { + return this.m_session; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "eventRegistration", { + get: function () { + if (this.m_session) { + return this.m_session.getEventRegistration(this._controlId); + } + return _Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_url", { + get: function () { + if (this.m_requestUrlAndHeaderInfo) { + return this.m_requestUrlAndHeaderInfo.url; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_pendingRequest", { + get: function () { + if (this.m_pendingRequest == null) { + this.m_pendingRequest = new ClientRequest(this); + } + return this.m_pendingRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_controlId", { + get: function () { + var ret = this.m_customRequestHeaders[Constants.officeControlId]; + if (CoreUtility.isNullOrUndefined(ret)) { + ret = ''; + } + return ret; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension_1._internalConfig.showDisposeInfoInDebugInfo); + var statements = prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { + get: function () { + if (!this.m_trackedObjects) { + this.m_trackedObjects = new TrackedObjects(this); + } + return this.m_trackedObjects; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "requestHeaders", { + get: function () { + return this.m_customRequestHeaders; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "batchMode", { + get: function () { + return this.m_batchMode; + }, + enumerable: true, + configurable: true + }); + ClientRequestContext.prototype.ensureInProgressBatchIfBatchMode = function () { + if (this.m_batchMode === 1 && !this.m_explicitBatchInProgress) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.notInsideBatch), null); + } + }; + ClientRequestContext.prototype.load = function (clientObj, option) { + Utility.validateContext(this, clientObj); + var queryOption = ClientRequestContext._parseQueryOption(option); + CommonActionFactory.createQueryAction(this, clientObj, queryOption, clientObj); + }; + ClientRequestContext.prototype.loadRecursive = function (clientObj, options, maxDepth) { + if (!Utility.isPlainJsonObject(options)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'options' }); + } + var quries = {}; + for (var key in options) { + quries[key] = ClientRequestContext._parseQueryOption(options[key]); + } + var action = ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); + this._pendingRequest.addActionResultHandler(action, clientObj); + }; + ClientRequestContext.prototype.trace = function (message) { + ActionFactory.createTraceAction(this, message, true); + }; + ClientRequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { }; + ClientRequestContext.prototype.ensureRequestUrlAndHeaderInfo = function () { + var _this = this; + return Utility._createPromiseFromResult(null).then(function () { + if (!_this.m_requestUrlAndHeaderInfo) { + return _this.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function (value) { + _this.m_requestUrlAndHeaderInfo = value; + if (!_this.m_requestUrlAndHeaderInfo) { + _this.m_requestUrlAndHeaderInfo = { url: CoreConstants.localDocument, headers: {} }; + } + if (Utility.isNullOrEmptyString(_this.m_requestUrlAndHeaderInfo.url)) { + _this.m_requestUrlAndHeaderInfo.url = CoreConstants.localDocument; + } + if (!_this.m_requestUrlAndHeaderInfo.headers) { + _this.m_requestUrlAndHeaderInfo.headers = {}; + } + if (typeof _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull === 'function') { + var executor = _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull(); + if (executor) { + _this._requestExecutor = executor; + } + } + }); + } + }); + }; + ClientRequestContext.prototype.syncPrivateMain = function () { + var _this = this; + return this.ensureRequestUrlAndHeaderInfo().then(function () { + var req = _this._pendingRequest; + _this.m_pendingRequest = null; + return _this.processPreSyncPromises(req).then(function () { return _this.syncPrivate(req); }); + }); + }; + ClientRequestContext.prototype.syncPrivate = function (req) { + var _this = this; + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(null); + } + if (!req.hasActions) { + return this.processPendingEventHandlers(req); + } + var _a = req.buildRequestMessageBodyAndRequestFlags(), msgBody = _a.body, requestFlags = _a.flags; + if (this._requestFlagModifier) { + requestFlags |= this._requestFlagModifier; + } + if (!this._requestExecutor) { + if (CoreUtility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + this._requestExecutor = new OfficeJsRequestExecutor(this); + } + else { + this._requestExecutor = new HttpRequestExecutor(); + } + } + var requestExecutor = this._requestExecutor; + var headers = {}; + CoreUtility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + CoreUtility._copyHeaders(this.m_customRequestHeaders, headers); + delete this.m_customRequestHeaders[Constants.officeScriptEventId]; + var testNameWithSequenceId = TestUtility._getCurrentTestNameWithSequenceId(); + if (testNameWithSequenceId) { + headers[CoreConstants.testRequestNameHeader] = testNameWithSequenceId; + } + var requestExecutorRequestMessage = { + Url: this.m_requestUrlAndHeaderInfo.url, + Headers: headers, + Body: msgBody + }; + req.invalidatePendingInvalidObjectPaths(); + var errorFromResponse = null; + var errorFromProcessEventHandlers = null; + this._lastSyncStart = typeof performance === 'undefined' ? Date.now() : performance.now(); + this._lastRequestFlags = requestFlags; + return requestExecutor + .executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) + .then(function (response) { + _this._lastSyncEnd = typeof performance === 'undefined' ? Date.now() : performance.now(); + if (OfficeExtension_1.config.executePerfLogFunc) { + OfficeExtension_1.config.executePerfLogFunc({ syncStart: _this._lastSyncStart, + syncEnd: _this._lastSyncEnd + }); + } + errorFromResponse = _this.processRequestExecutorResponseMessage(req, response); + return _this.processPendingEventHandlers(req)["catch"](function (ex) { + CoreUtility.log('Error in processPendingEventHandlers'); + CoreUtility.log(JSON.stringify(ex)); + errorFromProcessEventHandlers = ex; + }); + }) + .then(function () { + if (errorFromResponse) { + CoreUtility.log('Throw error from response: ' + JSON.stringify(errorFromResponse)); + throw errorFromResponse; + } + if (errorFromProcessEventHandlers) { + CoreUtility.log('Throw error from ProcessEventHandler: ' + JSON.stringify(errorFromProcessEventHandlers)); + var transformedError = null; + if (errorFromProcessEventHandlers instanceof _Internal.RuntimeError) { + transformedError = errorFromProcessEventHandlers; + transformedError.traceMessages = req._responseTraceMessages; + } + else { + var message = null; + if (typeof errorFromProcessEventHandlers === 'string') { + message = errorFromProcessEventHandlers; + } + else { + message = errorFromProcessEventHandlers.message; + } + if (Utility.isNullOrEmptyString(message)) { + message = CoreUtility._getResourceString(ResourceStrings.cannotRegisterEvent); + } + transformedError = new _Internal.RuntimeError({ + code: ErrorCodes.cannotRegisterEvent, + httpStatusCode: 400, + message: message, + traceMessages: req._responseTraceMessages + }); + } + throw transformedError; + } + }); + }; + ClientRequestContext.prototype.processRequestExecutorResponseMessage = function (req, response) { + if (response.Body && response.Body.TraceIds) { + req._setResponseTraceIds(response.Body.TraceIds); + } + var traceMessages = req._responseTraceMessages; + var errorStatementInfo = null; + if (response.Body) { + if (response.Body.Error && response.Body.Error.ActionIndex >= 0) { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, true); + var debugInfoStatementInfo = prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + errorStatementInfo = { + statement: debugInfoStatementInfo.statement, + surroundingStatements: debugInfoStatementInfo.surroundingStatements, + fullStatements: ['Please enable config.extendedErrorLogging to see full statements.'] + }; + if (OfficeExtension_1.config.extendedErrorLogging) { + prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, false); + errorStatementInfo.fullStatements = prettyPrinter.process(); + } + } + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (actionResults) { + this._processingResult = true; + try { + req.processResponse(actionResults); + } + finally { + this._processingResult = false; + } + } + } + if (!Utility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage, + traceMessages: traceMessages, + data: { responseBody: response.RawErrorResponseBody } + }); + } + else if (response.Body && response.Body.Error) { + var debugInfo = { + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement = errorStatementInfo.statement; + debugInfo.surroundingStatements = errorStatementInfo.surroundingStatements; + debugInfo.fullStatements = errorStatementInfo.fullStatements; + } + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message, + traceMessages: traceMessages, + debugInfo: debugInfo + }); + } + return null; + }; + ClientRequestContext.prototype.processPendingEventHandlers = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._pendingProcessEventHandlers.length; i++) { + var eventHandlers = req._pendingProcessEventHandlers[i]; + ret = ret.then(this.createProcessOneEventHandlersFunc(eventHandlers, req)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneEventHandlersFunc = function (eventHandlers, req) { + return function () { return eventHandlers._processRegistration(req); }; + }; + ClientRequestContext.prototype.processPreSyncPromises = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._preSyncPromises.length; i++) { + var p = req._preSyncPromises[i]; + ret = ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc = function (p) { + return function () { return p; }; + }; + ClientRequestContext.prototype.sync = function (passThroughValue) { + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(passThroughValue); + } + return this.syncPrivateMain().then(function () { return passThroughValue; }); + }; + ClientRequestContext.prototype.batch = function (batchBody) { + var _this = this; + if (this.m_batchMode !== 1) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, null, null)); + } + if (this.m_explicitBatchInProgress) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.pendingBatchInProgress), null)); + } + if (Utility.isNullOrUndefined(batchBody)) { + return Utility._createPromiseFromResult(null); + } + this.m_explicitBatchInProgress = true; + var previousRequest = this.m_pendingRequest; + this.m_pendingRequest = new ClientRequest(this); + var batchBodyResult; + try { + batchBodyResult = batchBody(this._rootObject, this); + } + catch (ex) { + this.m_explicitBatchInProgress = false; + this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + } + var request; + var batchBodyResultPromise; + if (typeof batchBodyResult === 'object' && batchBodyResult && typeof batchBodyResult.then === 'function') { + batchBodyResultPromise = Utility._createPromiseFromResult(null) + .then(function () { + return batchBodyResult; + }) + .then(function (result) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return result; + })["catch"](function (ex) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + }); + } + else { + this.m_explicitBatchInProgress = false; + request = this.m_pendingRequest; + this.m_pendingRequest = previousRequest; + batchBodyResultPromise = Utility._createPromiseFromResult(batchBodyResult); + } + return batchBodyResultPromise.then(function (result) { + return _this.ensureRequestUrlAndHeaderInfo() + .then(function () { + return _this.syncPrivate(request); + }) + .then(function () { + return result; + }); + }); + }; + ClientRequestContext._run = function (ctxInitializer, runBody, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runCommon('run', null, ctxInitializer, 0, runBody, numCleanupAttempts, retryDelay, null, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.isValidRequestInfo = function (value) { + return (typeof value === 'string' || + ClientRequestContext.isRequestUrlAndHeaderInfo(value) || + ClientRequestContext.isRequestUrlAndHeaderInfoResolver(value)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfo = function (value) { + return (typeof value === 'object' && + value !== null && + Object.getPrototypeOf(value) === Object.getPrototypeOf({}) && + !Utility.isNullOrUndefined(value.url)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfoResolver = function (value) { + return typeof value === 'object' && value !== null && typeof value._resolveRequestUrlAndHeaderInfo === 'function'; + }; + ClientRequestContext._runBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(0, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runExplicitBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(1, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runBatchCommon = function (batchMode, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + var ctxRetriever; + var batch; + var requestInfo = null; + var previousObjects = null; + var argOffset = 0; + var options = null; + if (receivedRunArgs.length > 0) { + if (ClientRequestContext.isValidRequestInfo(receivedRunArgs[0])) { + requestInfo = receivedRunArgs[0]; + argOffset = 1; + } + else if (Utility.isPlainJsonObject(receivedRunArgs[0])) { + options = receivedRunArgs[0]; + requestInfo = options.session; + if (requestInfo != null && !ClientRequestContext.isValidRequestInfo(requestInfo)) { + return ClientRequestContext.createErrorPromise(functionName); + } + previousObjects = options.previousObjects; + argOffset = 1; + } + } + if (receivedRunArgs.length == argOffset + 1) { + batch = receivedRunArgs[argOffset + 0]; + } + else if (options == null && receivedRunArgs.length == argOffset + 2) { + previousObjects = receivedRunArgs[argOffset + 0]; + batch = receivedRunArgs[argOffset + 1]; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + if (previousObjects != null) { + if (previousObjects instanceof ClientObject) { + ctxRetriever = function () { return previousObjects.context; }; + } + else if (previousObjects instanceof ClientRequestContext) { + ctxRetriever = function () { return previousObjects; }; + } + else if (Array.isArray(previousObjects)) { + var array = previousObjects; + if (array.length == 0) { + return ClientRequestContext.createErrorPromise(functionName); + } + for (var i = 0; i < array.length; i++) { + if (!(array[i] instanceof ClientObject)) { + return ClientRequestContext.createErrorPromise(functionName); + } + if (array[i].context != array[0].context) { + return ClientRequestContext.createErrorPromise(functionName, ResourceStrings.invalidRequestContext); + } + } + ctxRetriever = function () { return array[0].context; }; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + } + else { + ctxRetriever = ctxInitializer; + } + var onBeforeRunWithOptions = null; + if (onBeforeRun) { + onBeforeRunWithOptions = function (context) { return onBeforeRun(options || {}, context); }; + } + return ClientRequestContext._runCommon(functionName, requestInfo, ctxRetriever, batchMode, batch, numCleanupAttempts, retryDelay, onBeforeRunWithOptions, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.createErrorPromise = function (functionName, code) { + if (code === void 0) { + code = CoreResourceStrings.invalidArgument; + } + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(code, CoreUtility._getResourceString(code), functionName)); + }; + ClientRequestContext._runCommon = function (functionName, requestInfo, ctxRetriever, batchMode, runBody, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (SessionBase._overrideSession) { + requestInfo = SessionBase._overrideSession; + } + var starterPromise = CoreUtility.createPromise(function (resolve, reject) { + resolve(); + }); + var ctx; + var succeeded = false; + var resultOrError; + var previousBatchMode; + return starterPromise + .then(function () { + ctx = ctxRetriever(requestInfo); + if (ctx._autoCleanup) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + ctx._onRunFinishedNotifiers.push(function () { + ctx._autoCleanup = true; + resolve(); + }); + }); + } + else { + ctx._autoCleanup = true; + } + }) + .then(function () { + if (typeof runBody !== 'function') { + return ClientRequestContext.createErrorPromise(functionName); + } + previousBatchMode = ctx.m_batchMode; + ctx.m_batchMode = batchMode; + if (onBeforeRun) { + onBeforeRun(ctx); + } + var runBodyResult; + if (batchMode == 1) { + runBodyResult = runBody(ctx.batch.bind(ctx)); + } + else { + runBodyResult = runBody(ctx); + } + if (Utility.isNullOrUndefined(runBodyResult) || typeof runBodyResult.then !== 'function') { + Utility.throwError(ResourceStrings.runMustReturnPromise); + } + return runBodyResult; + }) + .then(function (runBodyResult) { + if (batchMode === 1) { + return runBodyResult; + } + else { + return ctx.sync(runBodyResult); + } + }) + .then(function (result) { + succeeded = true; + resultOrError = result; + })["catch"](function (error) { + resultOrError = error; + }) + .then(function () { + var itemsToRemove = ctx.trackedObjects._retrieveAndClearAutoCleanupList(); + ctx._autoCleanup = false; + ctx.m_batchMode = previousBatchMode; + for (var key in itemsToRemove) { + itemsToRemove[key]._objectPath.isValid = false; + } + var cleanupCounter = 0; + if (Utility._synchronousCleanup || ClientRequestContext.isRequestUrlAndHeaderInfoResolver(requestInfo)) { + return attemptCleanup(); + } + else { + attemptCleanup(); + } + function attemptCleanup() { + cleanupCounter++; + var savedPendingRequest = ctx.m_pendingRequest; + var savedBatchMode = ctx.m_batchMode; + var request = new ClientRequest(ctx); + ctx.m_pendingRequest = request; + ctx.m_batchMode = 0; + try { + for (var key in itemsToRemove) { + ctx.trackedObjects.remove(itemsToRemove[key]); + } + } + finally { + ctx.m_batchMode = savedBatchMode; + ctx.m_pendingRequest = savedPendingRequest; + } + return ctx + .syncPrivate(request) + .then(function () { + if (onCleanupSuccess) { + onCleanupSuccess(cleanupCounter); + } + })["catch"](function () { + if (onCleanupFailure) { + onCleanupFailure(cleanupCounter); + } + if (cleanupCounter < numCleanupAttempts) { + setTimeout(function () { + attemptCleanup(); + }, retryDelay); + } + }); + } + }) + .then(function () { + if (ctx._onRunFinishedNotifiers && ctx._onRunFinishedNotifiers.length > 0) { + var func = ctx._onRunFinishedNotifiers.shift(); + func(); + } + if (succeeded) { + return resultOrError; + } + else { + throw resultOrError; + } + }); + }; + return ClientRequestContext; + }(ClientRequestContextBase)); + OfficeExtension_1.ClientRequestContext = ClientRequestContext; + var RetrieveResultImpl = (function () { + function RetrieveResultImpl(m_proxy, m_shouldPolyfill) { + this.m_proxy = m_proxy; + this.m_shouldPolyfill = m_shouldPolyfill; + var scalarPropertyNames = m_proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = m_proxy[Constants.navigationPropertyNames]; + var typeName = m_proxy[Constants.className]; + var isCollection = m_proxy[Constants.isCollection]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, scalarPropertyNames[i]); + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, navigationPropertyNames[i]); + } + } + if (isCollection) { + Utility.definePropertyThrowUnloadedException(this, typeName, Constants.itemsLowerCase); + } + } + Object.defineProperty(RetrieveResultImpl.prototype, "$proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResultImpl.prototype, "$isNullObject", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: ErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'retrieveResult.$isNullObject' + } + }); + } + return this.m_isNullObject; + }, + enumerable: true, + configurable: true + }); + RetrieveResultImpl.prototype.toJSON = function () { + if (!this.m_isLoaded) { + return undefined; + } + if (this.m_isNullObject) { + return null; + } + if (Utility.isUndefined(this.m_json)) { + this.m_json = Utility.purifyJson(this.m_value); + } + return this.m_json; + }; + RetrieveResultImpl.prototype.toString = function () { + return JSON.stringify(this.toJSON()); + }; + RetrieveResultImpl.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (value === null || (typeof value === 'object' && value && value._IsNull)) { + this.m_isNullObject = true; + value = null; + } + else { + this.m_isNullObject = false; + } + if (this.m_shouldPolyfill) { + value = Utility.changePropertyNameToCamelLowerCase(value); + } + this.m_value = value; + this.m_proxy._handleRetrieveResult(value, this); + }; + return RetrieveResultImpl; + }()); + var Constants = (function (_super) { + __extends(Constants, _super); + function Constants() { + return _super !== null && _super.apply(this, arguments) || this; + } + Constants.getItemAt = 'GetItemAt'; + Constants.index = '_Index'; + Constants.iterativeExecutor = 'IterativeExecutor'; + Constants.isTracked = '_IsTracked'; + Constants.eventMessageCategory = 65536; + Constants.eventWorkbookId = 'Workbook'; + Constants.eventSourceRemote = 'Remote'; + Constants.proxy = '$proxy'; + Constants.className = '_className'; + Constants.isCollection = '_isCollection'; + Constants.collectionPropertyPath = '_collectionPropertyPath'; + Constants.objectPathInfoDoNotKeepReferenceFieldName = 'D'; + Constants.officeScriptEventId = 'X-OfficeScriptEventId'; + Constants.officeScriptFireRecordingEvent = 'X-OfficeScriptFireRecordingEvent'; + Constants.officeControlId = 'X-OfficeControlId'; + return Constants; + }(CommonConstants)); + OfficeExtension_1.Constants = Constants; + var ClientRequest = (function (_super) { + __extends(ClientRequest, _super); + function ClientRequest(context) { + var _this = _super.call(this, context) || this; + _this.m_context = context; + _this.m_pendingProcessEventHandlers = []; + _this.m_pendingEventHandlerActions = {}; + _this.m_traceInfos = {}; + _this.m_responseTraceIds = {}; + _this.m_responseTraceMessages = []; + return _this; + } + Object.defineProperty(ClientRequest.prototype, "traceInfos", { + get: function () { + return this.m_traceInfos; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceMessages", { + get: function () { + return this.m_responseTraceMessages; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceIds", { + get: function () { + return this.m_responseTraceIds; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._setResponseTraceIds = function (value) { + if (value) { + for (var i = 0; i < value.length; i++) { + var traceId = value[i]; + this.m_responseTraceIds[traceId] = traceId; + var message = this.m_traceInfos[traceId]; + if (!CoreUtility.isNullOrUndefined(message)) { + this.m_responseTraceMessages.push(message); + } + } + } + }; + ClientRequest.prototype.addTrace = function (actionId, message) { + this.m_traceInfos[actionId] = message; + }; + ClientRequest.prototype._addPendingEventHandlerAction = function (eventHandlers, action) { + if (!this.m_pendingEventHandlerActions[eventHandlers._id]) { + this.m_pendingEventHandlerActions[eventHandlers._id] = []; + this.m_pendingProcessEventHandlers.push(eventHandlers); + } + this.m_pendingEventHandlerActions[eventHandlers._id].push(action); + }; + Object.defineProperty(ClientRequest.prototype, "_pendingProcessEventHandlers", { + get: function () { + return this.m_pendingProcessEventHandlers; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._getPendingEventHandlerActions = function (eventHandlers) { + return this.m_pendingEventHandlerActions[eventHandlers._id]; + }; + return ClientRequest; + }(ClientRequestBase)); + OfficeExtension_1.ClientRequest = ClientRequest; + var EventHandlers = (function () { + function EventHandlers(context, parentObject, name, eventInfo) { + var _this = this; + this.m_id = context._nextId(); + this.m_context = context; + this.m_name = name; + this.m_handlers = []; + this.m_registered = false; + this.m_eventInfo = eventInfo; + this.m_callback = function (args) { + _this.m_eventInfo.eventArgsTransformFunc(args).then(function (newArgs) { return _this.fireEvent(newArgs); }); + }; + } + Object.defineProperty(EventHandlers.prototype, "_registered", { + get: function () { + return this.m_registered; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_id", { + get: function () { + return this.m_id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_handlers", { + get: function () { + return this.m_handlers; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); + EventHandlers.prototype.add = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 0 + }); + return new EventHandlerResult(this.m_context, this, handler); + }; + EventHandlers.prototype.remove = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 1 + }); + }; + EventHandlers.prototype.removeAll = function () { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: null, + operation: 2 + }); + }; + EventHandlers.prototype._processRegistration = function (req) { + var _this = this; + var ret = CoreUtility._createPromiseFromResult(null); + var actions = req._getPendingEventHandlerActions(this); + if (!actions) { + return ret; + } + var handlersResult = []; + for (var i = 0; i < this.m_handlers.length; i++) { + handlersResult.push(this.m_handlers[i]); + } + var hasChange = false; + for (var i = 0; i < actions.length; i++) { + if (req._responseTraceIds[actions[i].id]) { + hasChange = true; + switch (actions[i].operation) { + case 0: + handlersResult.push(actions[i].handler); + break; + case 1: + for (var index = handlersResult.length - 1; index >= 0; index--) { + if (handlersResult[index] === actions[i].handler) { + handlersResult.splice(index, 1); + break; + } + } + break; + case 2: + handlersResult = []; + break; + } + } + } + if (hasChange) { + if (!this.m_registered && handlersResult.length > 0) { + ret = ret.then(function () { return _this.m_eventInfo.registerFunc(_this.m_callback); }).then(function () { return (_this.m_registered = true); }); + } + else if (this.m_registered && handlersResult.length == 0) { + ret = ret + .then(function () { return _this.m_eventInfo.unregisterFunc(_this.m_callback); })["catch"](function (ex) { + CoreUtility.log('Error when unregister event: ' + JSON.stringify(ex)); + }) + .then(function () { return (_this.m_registered = false); }); + } + ret = ret.then(function () { return (_this.m_handlers = handlersResult); }); + } + return ret; + }; + EventHandlers.prototype.fireEvent = function (args) { + var promises = []; + for (var i = 0; i < this.m_handlers.length; i++) { + var handler = this.m_handlers[i]; + var p = CoreUtility._createPromiseFromResult(null) + .then(this.createFireOneEventHandlerFunc(handler, args))["catch"](function (ex) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(ex)); + }); + promises.push(p); + } + CoreUtility.Promise.all(promises); + }; + EventHandlers.prototype.createFireOneEventHandlerFunc = function (handler, args) { + return function () { return handler(args); }; + }; + return EventHandlers; + }()); + OfficeExtension_1.EventHandlers = EventHandlers; + var EventHandlerResult = (function () { + function EventHandlerResult(context, handlers, handler) { + this.m_context = context; + this.m_allHandlers = handlers; + this.m_handler = handler; + } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + EventHandlerResult.prototype.remove = function () { + if (this.m_allHandlers && this.m_handler) { + this.m_allHandlers.remove(this.m_handler); + this.m_allHandlers = null; + this.m_handler = null; + } + }; + return EventHandlerResult; + }()); + OfficeExtension_1.EventHandlerResult = EventHandlerResult; + (function (_Internal) { + var OfficeJsEventRegistration = (function () { + function OfficeJsEventRegistration() { + } + OfficeJsEventRegistration.prototype.register = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingDataChanged, handler, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingSelectionChanged, handler, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); + }); + case 5: + return OSF.DDA.RichApi.richApiMessageManager.register(handler); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { id: targetId }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { id: targetId }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { id: targetId }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + OfficeJsEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingDataChanged, { handler: handler }, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingSelectionChanged, { handler: handler }, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); + }); + case 5: + return Utility.promisify(function (callback) { + return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync('richApiMessage', { handler: handler }, callback); + }); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { id: targetId, handler: handler }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { id: targetId, handler: handler }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { id: targetId, handler: handler }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + return OfficeJsEventRegistration; + }()); + _Internal.officeJsEventRegistration = new OfficeJsEventRegistration(); + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var EventRegistration = (function () { + function EventRegistration(registerEventImpl, unregisterEventImpl) { + this.m_handlersByEventByTarget = {}; + this.m_registerEventImpl = registerEventImpl; + this.m_unregisterEventImpl = unregisterEventImpl; + } + EventRegistration.getTargetIdOrDefault = function (targetId) { + if (Utility.isNullOrUndefined(targetId)) { + return ''; + } + return targetId; + }; + EventRegistration.prototype.getHandlers = function (eventId, targetId) { + targetId = EventRegistration.getTargetIdOrDefault(targetId); + var handlersById = this.m_handlersByEventByTarget[eventId]; + if (!handlersById) { + handlersById = {}; + this.m_handlersByEventByTarget[eventId] = handlersById; + } + var handlers = handlersById[targetId]; + if (!handlers) { + handlers = []; + handlersById[targetId] = handlers; + } + return handlers; + }; + EventRegistration.prototype.callHandlers = function (eventId, targetId, argument) { + var funcs = this.getHandlers(eventId, targetId); + for (var i = 0; i < funcs.length; i++) { + funcs[i](argument); + } + }; + EventRegistration.prototype.hasHandlers = function (eventId, targetId) { + return this.getHandlers(eventId, targetId).length > 0; + }; + EventRegistration.prototype.register = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + handlers.push(handler); + if (handlers.length === 1) { + return this.m_registerEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + EventRegistration.prototype.unregister = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length === 0) { + return this.m_unregisterEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + return EventRegistration; + }()); + OfficeExtension_1.EventRegistration = EventRegistration; + var GenericEventRegistration = (function () { + function GenericEventRegistration() { + this.m_eventRegistration = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler = this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready = function () { + var _this = this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready = GenericEventRegistration._testReadyImpl().then(function () { + _this.m_isReady = true; + }); + } + else if (HostBridge.instance) { + this.m_ready = Utility._createPromiseFromResult(null).then(function () { + _this.m_isReady = true; + }); + } + else { + this.m_ready = _Internal.officeJsEventRegistration + .register(5, '', this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady = true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage = function (msg) { + if (msg && msg.entries) { + for (var entryIndex = 0; entryIndex < msg.entries.length; entryIndex++) { + var entry = msg.entries[entryIndex]; + if (entry.messageCategory == Constants.eventMessageCategory) { + if (CoreUtility._logEnabled) { + CoreUtility.log(JSON.stringify(entry)); + } + var eventId = entry.messageType; + var targetId = entry.targetId; + var hasHandlers = this.m_eventRegistration.hasHandlers(eventId, targetId); + if (hasHandlers) { + var arg = JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source = Constants.eventSourceRemote; + } + this.m_eventRegistration.callHandlers(eventId, targetId, arg); + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + if (!ret) { + ret = new GenericEventRegistration(); + GenericEventRegistration.s_genericEventRegistrations[controlId] = ret; + } + return ret; + }; + GenericEventRegistration.peekGenericEventRegistrationOrNull = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + return ret; + }; + GenericEventRegistration.richApiMessageEventCategory = 65536; + GenericEventRegistration.s_genericEventRegistrations = {}; + return GenericEventRegistration; + }()); + OfficeExtension_1.GenericEventRegistration = GenericEventRegistration; + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl = impl; + } + OfficeExtension_1._testSetRichApiMessageReadyImpl = _testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration('')._handleRichApiMessage(msg); + } + OfficeExtension_1._testTriggerRichApiMessageEvent = _testTriggerRichApiMessageEvent; + var GenericEventHandlers = (function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + var _this = _super.call(this, context, parentObject, name, eventInfo) || this; + _this.m_genericEventInfo = eventInfo; + return _this; + } + GenericEventHandlers.prototype.add = function (handler) { + var _this = this; + if (this._handlers.length == 0 && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + var controlId = this._context._controlId; + if (!GenericEventRegistration.getGenericEventRegistration(controlId).isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration(controlId).ready()); + } + ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length == 1) { + GenericEventRegistration.getGenericEventRegistration(controlId).register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove = function (handler) { + var _this = this; + if (this._handlers.length == 1 && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + var controlId = this._context._controlId; + ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers = _this._handlers; + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length == 0) { + GenericEventRegistration.getGenericEventRegistration(controlId).unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll = function () { }; + return GenericEventHandlers; + }(EventHandlers)); + OfficeExtension_1.GenericEventHandlers = GenericEventHandlers; + var InstantiateActionResultHandler = (function () { + function InstantiateActionResultHandler(clientObject) { + this.m_clientObject = clientObject; + } + InstantiateActionResultHandler.prototype._handleResult = function (value) { + this.m_clientObject._handleIdResult(value); + }; + return InstantiateActionResultHandler; + }()); + var ObjectPathFactory = (function () { + function ObjectPathFactory() { + } + ObjectPathFactory.createGlobalObjectObjectPath = function (context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + return new ObjectPath(objectPathInfo, null, false, false, 1, 4); + }; + ObjectPathFactory.createNewObjectObjectPath = function (context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var ret = new ObjectPath(objectPathInfo, null, isCollection, false, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createPropertyObjectPath = function (context, parent, propertyName, isCollection, isInvalidAfterRequest, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createIndexerObjectPath = function (context, parent, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createIndexerObjectPathUsingParentPath = function (context, parentObjectPath, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parentObjectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parentObjectPath, false, false, 1, 4); + }; + ObjectPathFactory.createMethodObjectPath = function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = Utility.setMethodArguments(context, objectPathInfo.ArgumentInfo, args); + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, Utility._fixupApiFlags(flags)); + ret.argumentObjectPaths = argumentObjectPaths; + ret.getByIdMethodName = getByIdMethodName; + return ret; + }; + ObjectPathFactory.createReferenceIdObjectPath = function (context, referenceId) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + var ret = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return ret; + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt = function (hasIndexerMethod, context, parent, childItem, index) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + if (hasIndexerMethod && !Utility.isNullOrUndefined(id)) { + return ObjectPathFactory.createChildItemObjectPathUsingIndexer(context, parent, childItem); + } + else { + return ObjectPathFactory.createChildItemObjectPathUsingGetItemAt(context, parent, childItem, index); + } + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexer = function (context, parent, childItem) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + var objectPathInfo = (objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }); + objectPathInfo.ArgumentInfo.Arguments = [id]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createChildItemObjectPathUsingGetItemAt = function (context, parent, childItem, index) { + var indexFromServer = childItem[Constants.index]; + if (indexFromServer) { + index = indexFromServer; + } + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: Constants.getItemAt, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = [index]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + return ObjectPathFactory; + }()); + OfficeExtension_1.ObjectPathFactory = ObjectPathFactory; + var OfficeJsRequestExecutor = (function () { + function OfficeJsRequestExecutor(context) { + this.m_context = context; + } + OfficeJsRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); + return new OfficeExtension_1.Promise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (result.status == 'succeeded') { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBody(result), RichApiMessageUtility.getResponseHeaders(result)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); + } + resolve(response); + }); + }); + }; + OfficeJsRequestExecutor.SourceLibHeaderValue = 'officejs'; + return OfficeJsRequestExecutor; + }()); + var TrackedObjects = (function () { + function TrackedObjects(context) { + this._autoCleanupList = {}; + this.m_context = context; + } + TrackedObjects.prototype.add = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._addCommon(item, true); }); + } + else { + this._addCommon(param, true); + } + }; + TrackedObjects.prototype._autoAdd = function (object) { + this._addCommon(object, false); + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + }; + TrackedObjects.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue = function (object, resultValue) { + var shouldAutoTrack = this.m_context._autoCleanup && + !object[Constants.isTracked] && + object !== this.m_context._rootObject && + resultValue && + !Utility.isNullOrEmptyString(resultValue[Constants.referenceId]); + if (shouldAutoTrack) { + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype._addCommon = function (object, isExplicitlyAdded) { + if (object[Constants.isTracked]) { + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + return; + } + var referenceId = object[Constants.referenceId]; + var donotKeepReference = object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName]; + if (donotKeepReference) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.objectIsUntracked), null); + } + if (Utility.isNullOrEmptyString(referenceId) && object._KeepReference) { + object._KeepReference(); + ActionFactory.createInstantiateAction(this.m_context, object); + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype.remove = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._removeCommon(item); }); + } + else { + this._removeCommon(param); + } + }; + TrackedObjects.prototype._removeCommon = function (object) { + object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName] = true; + object.context._pendingRequest._removeKeepReferenceAction(object._objectPath.objectPathInfo.Id); + var referenceId = object[Constants.referenceId]; + if (!Utility.isNullOrEmptyString(referenceId)) { + var rootObject = this.m_context._rootObject; + if (rootObject._RemoveReference) { + rootObject._RemoveReference(referenceId); + } + } + delete object[Constants.isTracked]; + }; + TrackedObjects.prototype._retrieveAndClearAutoCleanupList = function () { + var list = this._autoCleanupList; + this._autoCleanupList = {}; + return list; + }; + return TrackedObjects; + }()); + OfficeExtension_1.TrackedObjects = TrackedObjects; + var RequestPrettyPrinter = (function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose, removePII) { + if (!globalObjName) { + globalObjName = 'root'; + } + this.m_globalObjName = globalObjName; + this.m_referencedObjectPaths = referencedObjectPaths; + this.m_actions = actions; + this.m_statements = []; + this.m_variableNameForObjectPathMap = {}; + this.m_variableNameToObjectPathMap = {}; + this.m_declaredObjectPathMap = {}; + this.m_showDispose = showDispose; + this.m_removePII = removePII; + } + RequestPrettyPrinter.prototype.process = function () { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo = function (actionIndex) { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount = 5; + this.m_statements = []; + var oneStatement = ''; + var statementIndex = -1; + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex == i) { + statementIndex = this.m_statements.length - 1; + } + if (statementIndex >= 0 && this.m_statements.length > statementIndex + surroundingCount + 1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex = statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex = 0; + } + var endIndex = statementIndex + 1 + surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex = this.m_statements.length; + } + var surroundingStatements = []; + if (startIndex != 0) { + surroundingStatements.push('...'); + } + for (var i_1 = startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push('// >>>>>'); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push('// <<<<<'); + for (var i_2 = statementIndex + 1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push('...'); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction = function (action) { + var actionInfo = action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + case 9: + this.processUpdateAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction = function (action) { + var objId = action.actionInfo.ObjectPathId; + var objPath = this.m_referencedObjectPaths[objId]; + var varName = this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement = 'var ' + varName + ' = ' + this.buildObjectPathExpressionWithParent(objPath) + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId] = varName; + } + else { + var statement = '// Instantiate {' + varName + '}'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction = function (action) { + var methodName = action.actionInfo.Name; + if (methodName === '_KeepReference') { + if (!OfficeExtension_1._internalConfig.showInternalApiInDebugInfo) { + return; + } + methodName = 'track'; + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(methodName) + + '(' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.load(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.retrieve(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction = function (action) { + var queryExp = ''; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp = JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.loadRecursive(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(action.actionInfo.Name) + + ' = ' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction = function (action) { + var statement = 'context.trace();'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.ensureUnchanged(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processUpdateAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.update(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant = function (statement, action) { + var _this = this; + if (this.m_showDispose) { + var lastUsedObjectPathIds = action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose = lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(', '); + return statement + ' // And then dispose {' + objectNamesToDispose + '}'; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression = function (action) { + if (action.actionInfo.QueryInfo) { + var option = {}; + option.select = action.actionInfo.QueryInfo.Select; + option.expand = action.actionInfo.QueryInfo.Expand; + option.skip = action.actionInfo.QueryInfo.Skip; + option.top = action.actionInfo.QueryInfo.Top; + if (typeof option.top === 'undefined' && + typeof option.skip === 'undefined' && + typeof option.expand === 'undefined') { + if (typeof option.select === 'undefined') { + return ''; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ''; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent = function (objPath) { + var hasParent = objPath.objectPathInfo.ObjectPathType == 5 || + objPath.objectPathInfo.ObjectPathType == 3 || + objPath.objectPathInfo.ObjectPathType == 4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return (this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId) + '.' + this.buildObjectPathExpression(objPath)); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression = function (objPath) { + var expr = this.buildObjectPathInfoExpression(objPath.objectPathInfo); + var originalObjectPathInfo = objPath.originalObjectPathInfo; + if (originalObjectPathInfo) { + expr = expr + ' /* originally ' + this.buildObjectPathInfoExpression(originalObjectPathInfo) + ' */'; + } + return expr; + }; + RequestPrettyPrinter.prototype.buildObjectPathInfoExpression = function (objectPathInfo) { + switch (objectPathInfo.ObjectPathType) { + case 1: + return 'context.' + this.m_globalObjName; + case 5: + return 'getItem(' + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + ')'; + case 3: + return (Utility._toCamelLowerCase(objectPathInfo.Name) + + '(' + + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + + ')'); + case 2: + return objectPathInfo.Name + '.newObject()'; + case 7: + return 'null'; + case 4: + return Utility._toCamelLowerCase(objectPathInfo.Name); + case 6: + return ('context.' + this.m_globalObjName + '._getObjectByReferenceId(' + JSON.stringify(objectPathInfo.Name) + ')'); + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression = function (args) { + var ret = ''; + if (!args.Arguments || args.Arguments.length === 0) { + return ret; + } + if (this.m_removePII) { + if (typeof args.Arguments[0] === 'undefined') { + return ret; + } + return '...'; + } + for (var i = 0; i < args.Arguments.length; i++) { + if (i > 0) { + ret = ret + ', '; + } + ret = + ret + + this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret === 'undefined') { + ret = ''; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral = function (value, objectPathId) { + if (typeof value == 'number' && value === objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase = function (objectPathId) { + var ret = 'v'; + var objPath = this.m_referencedObjectPaths[objectPathId]; + if (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret = this.m_globalObjName; + break; + case 4: + ret = Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName = objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3) === 'Get') { + methodName = methodName.substr(3); + } + ret = Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName = this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1) === 's') { + ret = parentName.substr(0, parentName.length - 1); + } + else { + ret = parentName + 'Item'; + } + break; + } + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName = function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret = this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + } + var i = 1; + while (this.m_variableNameToObjectPathMap[ret + i.toString()]) { + i++; + } + ret = ret + i.toString(); + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + var ResourceStrings = (function (_super) { + __extends(ResourceStrings, _super); + function ResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + ResourceStrings.cannotRegisterEvent = 'CannotRegisterEvent'; + ResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + ResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + ResourceStrings.propertyNotLoaded = 'PropertyNotLoaded'; + ResourceStrings.runMustReturnPromise = 'RunMustReturnPromise'; + ResourceStrings.moreInfoInnerError = 'MoreInfoInnerError'; + ResourceStrings.cannotApplyPropertyThroughSetMethod = 'CannotApplyPropertyThroughSetMethod'; + ResourceStrings.invalidOperationInCellEditMode = 'InvalidOperationInCellEditMode'; + ResourceStrings.objectIsUntracked = 'ObjectIsUntracked'; + ResourceStrings.customFunctionDefintionMissing = 'CustomFunctionDefintionMissing'; + ResourceStrings.customFunctionImplementationMissing = 'CustomFunctionImplementationMissing'; + ResourceStrings.customFunctionNameContainsBadChars = 'CustomFunctionNameContainsBadChars'; + ResourceStrings.customFunctionNameCannotSplit = 'CustomFunctionNameCannotSplit'; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch = 'CustomFunctionUnexpectedNumberOfEntriesInResultBatch'; + ResourceStrings.customFunctionCancellationHandlerMissing = 'CustomFunctionCancellationHandlerMissing'; + ResourceStrings.customFunctionInvalidFunction = 'CustomFunctionInvalidFunction'; + ResourceStrings.customFunctionInvalidFunctionMapping = 'CustomFunctionInvalidFunctionMapping'; + ResourceStrings.customFunctionWindowMissing = 'CustomFunctionWindowMissing'; + ResourceStrings.customFunctionDefintionMissingOnWindow = 'CustomFunctionDefintionMissingOnWindow'; + ResourceStrings.pendingBatchInProgress = 'PendingBatchInProgress'; + ResourceStrings.notInsideBatch = 'NotInsideBatch'; + ResourceStrings.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ResourceStrings; + }(CommonResourceStrings)); + OfficeExtension_1.ResourceStrings = ResourceStrings; + CoreUtility.addResourceStringValues({ + CannotRegisterEvent: 'The event handler cannot be registered.', + PropertyNotLoaded: "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.", + RunMustReturnPromise: 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".', + InvalidOrTimedOutSessionMessage: 'Your Office Online session has expired or is invalid. To continue, refresh the page.', + InvalidOperationInCellEditMode: 'Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.', + InvalidSheetName: 'The request cannot be processed because the specified worksheet cannot be found. Please try again.', + CustomFunctionDefintionMissing: "A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.", + CustomFunctionDefintionMissingOnWindow: "A property with the name '{0}' that represents the function's definition must exist on the window object.", + CustomFunctionImplementationMissing: "The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.", + CustomFunctionNameContainsBadChars: 'The function name may only contain letters, digits, underscores, and periods.', + CustomFunctionNameCannotSplit: 'The function name must contain a non-empty namespace and a non-empty short name.', + CustomFunctionUnexpectedNumberOfEntriesInResultBatch: "The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.", + CustomFunctionCancellationHandlerMissing: 'The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.', + CustomFunctionInvalidFunction: "The property with the name '{0}' that represents the function's definition is not a valid function.", + CustomFunctionInvalidFunctionMapping: "The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.", + CustomFunctionWindowMissing: 'The window object was not found.', + PendingBatchInProgress: 'There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.', + NotInsideBatch: 'Operations may not be invoked outside of a batch method.', + CannotUpdateReadOnlyProperty: "The property '{0}' is read-only and it cannot be updated.", + ObjectIsUntracked: 'The object is untracked.' + }); + var Utility = (function (_super) { + __extends(Utility, _super); + function Utility() { + return _super !== null && _super.apply(this, arguments) || this; + } + Utility.fixObjectPathIfNecessary = function (clientObject, value) { + if (clientObject && clientObject._objectPath && value) { + clientObject._objectPath.updateUsingObjectData(value, clientObject); + } + }; + Utility.load = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve = function (clientObj, option) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !Utility.isSetSupported('RichApiRuntime', '1.1'); + } + var result = new RetrieveResultImpl(clientObj, shouldPolyfill); + clientObj._retrieve(option, result); + return result; + }; + Utility.retrieveAndSync = function (clientObj, option) { + var result = Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); + }; + Utility.toJson = function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result = {}; + for (var prop in scalarProperties) { + var value = scalarProperties[prop]; + if (typeof value !== 'undefined') { + result[prop] = value; + } + } + for (var prop in navigationProperties) { + var value = navigationProperties[prop]; + if (typeof value !== 'undefined') { + if (value[Utility.fieldName_isCollection] && typeof value[Utility.fieldName_m__items] !== 'undefined') { + result[prop] = value.toJSON()['items']; + } + else { + result[prop] = value.toJSON(); + } + } + } + if (collectionItemsIfAny) { + result['items'] = collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; + }; + Utility.throwError = function (resourceId, arg, errorLocation) { + throw new _Internal.RuntimeError({ + code: resourceId, + httpStatusCode: 400, + message: CoreUtility._getResourceString(resourceId, arg), + debugInfo: errorLocation ? { errorLocation: errorLocation } : undefined + }); + }; + Utility.createRuntimeError = function (code, message, location, httpStatusCode, data) { + return new _Internal.RuntimeError({ + code: code, + httpStatusCode: httpStatusCode, + message: message, + debugInfo: { errorLocation: location }, + data: data + }); + }; + Utility.throwIfNotLoaded = function (propertyName, fieldValue, entityName, isNull) { + if (!isNull && + CoreUtility.isUndefined(fieldValue) && + propertyName.charCodeAt(0) != Utility.s_underscoreCharCode && + !Utility.s_suppressPropertyNotLoadedException) { + throw Utility.createPropertyNotLoadedException(entityName, propertyName); + } + }; + Utility._getPropertyValueWithoutCheckLoaded = function (object, propertyName) { + Utility.s_suppressPropertyNotLoadedException = true; + try { + return object[propertyName]; + } + finally { + Utility.s_suppressPropertyNotLoadedException = false; + } + }; + Utility.createPropertyNotLoadedException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.propertyNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.propertyNotLoaded, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.createCannotUpdateReadOnlyPropertyException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.cannotUpdateReadOnlyProperty, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotUpdateReadOnlyProperty, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.promisify = function (action) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + var callback = function (result) { + if (result.status == 'failed') { + reject(result.error); + } + else { + resolve(result.value); + } + }; + action(callback); + }); + }; + Utility._addActionResultHandler = function (clientObj, action, resultHandler) { + clientObj.context._pendingRequest.addActionResultHandler(action, resultHandler); + }; + Utility._handleNavigationPropertyResults = function (clientObj, objectValue, propertyNames) { + for (var i = 0; i < propertyNames.length - 1; i += 2) { + if (!CoreUtility.isUndefined(objectValue[propertyNames[i + 1]])) { + clientObj[propertyNames[i]]._handleResult(objectValue[propertyNames[i + 1]]); + } + } + }; + Utility._fixupApiFlags = function (flags) { + if (typeof flags === 'boolean') { + if (flags) { + flags = 1; + } + else { + flags = 0; + } + } + return flags; + }; + Utility.definePropertyThrowUnloadedException = function (obj, typeName, propertyName) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + throw Utility.createPropertyNotLoadedException(typeName, propertyName); + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(typeName, propertyName); + } + }); + }; + Utility.defineReadOnlyPropertyWithValue = function (obj, propertyName, value) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + return value; + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(null, propertyName); + } + }); + }; + Utility.processRetrieveResult = function (proxy, value, result, childItemCreateFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + return; + } + if (childItemCreateFunc) { + var data = value[Constants.itemsLowerCase]; + if (Array.isArray(data)) { + var itemsResult = []; + for (var i = 0; i < data.length; i++) { + var itemProxy = childItemCreateFunc(data[i], i); + var itemResult = {}; + itemResult[Constants.proxy] = itemProxy; + itemProxy._handleRetrieveResult(data[i], itemResult); + itemsResult.push(itemResult); + } + Utility.defineReadOnlyPropertyWithValue(result, Constants.itemsLowerCase, itemsResult); + } + } + else { + var scalarPropertyNames = proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = proxy[Constants.navigationPropertyNames]; + var typeName = proxy[Constants.className]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + var propName = scalarPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + Utility.defineReadOnlyPropertyWithValue(result, propName, propValue); + } + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + var propName = navigationPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + var propProxy = proxy[propName]; + var propResult = {}; + propProxy._handleRetrieveResult(propValue, propResult); + propResult[Constants.proxy] = propProxy; + if (Array.isArray(propResult[Constants.itemsLowerCase])) { + propResult = propResult[Constants.itemsLowerCase]; + } + Utility.defineReadOnlyPropertyWithValue(result, propName, propResult); + } + } + } + } + }; + Utility.setMockData = function (clientObj, value, childItemCreateFunc, setItemsFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + clientObj._handleResult(value); + return; + } + if (clientObj[Constants.scalarPropertyOriginalNames]) { + var result = {}; + var scalarPropertyOriginalNames = clientObj[Constants.scalarPropertyOriginalNames]; + var scalarPropertyNames = clientObj[Constants.scalarPropertyNames]; + for (var i = 0; i < scalarPropertyNames.length; i++) { + if (typeof (value[scalarPropertyNames[i]]) !== 'undefined') { + result[scalarPropertyOriginalNames[i]] = value[scalarPropertyNames[i]]; + } + } + clientObj._handleResult(result); + } + if (clientObj[Constants.navigationPropertyNames]) { + var navigationPropertyNames = clientObj[Constants.navigationPropertyNames]; + for (var i = 0; i < navigationPropertyNames.length; i++) { + if (typeof (value[navigationPropertyNames[i]]) !== 'undefined') { + var navigationPropValue = clientObj[navigationPropertyNames[i]]; + if (navigationPropValue.setMockData) { + navigationPropValue.setMockData(value[navigationPropertyNames[i]]); + } + } + } + } + if (clientObj[Constants.isCollection] && childItemCreateFunc) { + var itemsData = Array.isArray(value) ? value : value[Constants.itemsLowerCase]; + if (Array.isArray(itemsData)) { + var items = []; + for (var i = 0; i < itemsData.length; i++) { + var item = childItemCreateFunc(itemsData, i); + Utility.setMockData(item, itemsData[i]); + items.push(item); + } + setItemsFunc(items); + } + } + }; + Utility.applyMixin = function (derived, base) { + Object.getOwnPropertyNames(base.prototype).forEach(function (name) { + if (name !== 'constructor') { + Object.defineProperty(derived.prototype, name, Object.getOwnPropertyDescriptor(base.prototype, name)); + } + }); + }; + Utility.ensureTypeInitialized = function (type) { + var context = new ClientRequestContext(); + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, "Temp", false, 0); + new type(context, objectPath); + }; + Utility.fieldName_m__items = 'm__items'; + Utility.fieldName_isCollection = '_isCollection'; + Utility._synchronousCleanup = false; + Utility.s_underscoreCharCode = '_'.charCodeAt(0); + Utility.s_suppressPropertyNotLoadedException = false; + return Utility; + }(CommonUtility)); + OfficeExtension_1.Utility = Utility; + var BatchApiHelper = (function () { + function BatchApiHelper() { + } + BatchApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + var action = ActionFactory.createMethodAction(obj.context, obj, methodName, operationType, args, flags); + var result = new ClientResult(resultProcessType); + Utility._addActionResultHandler(obj, action, result); + return result; + }; + BatchApiHelper.invokeEnsureUnchanged = function (obj, objectState) { + ActionFactory.createEnsureUnchangedAction(obj.context, obj, objectState); + }; + BatchApiHelper.invokeSetProperty = function (obj, propName, propValue, flags) { + ActionFactory.createSetPropertyAction(obj.context, obj, propName, propValue, flags); + }; + BatchApiHelper.createRootServiceObject = function (type, context) { + var objectPath = ObjectPathFactory.createGlobalObjectObjectPath(context); + return new type(context, objectPath); + }; + BatchApiHelper.createObjectFromReferenceId = function (type, context, referenceId) { + var objectPath = ObjectPathFactory.createReferenceIdObjectPath(context, referenceId); + return new type(context, objectPath); + }; + BatchApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, typeName, isCollection, flags); + return new type(context, objectPath); + }; + BatchApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPath = ObjectPathFactory.createPropertyObjectPath(parent.context, parent, propertyName, isCollection, false, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createIndexerObject = function (type, parent, args) { + var objectPath = ObjectPathFactory.createIndexerObjectPath(parent.context, parent, args); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPath = ObjectPathFactory.createMethodObjectPath(parent.context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createChildItemObject = function (type, hasIndexerMethod, parent, chileItem, index) { + var objectPath = ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt(hasIndexerMethod, parent.context, parent, chileItem, index); + return new type(parent.context, objectPath); + }; + return BatchApiHelper; + }()); + OfficeExtension_1.BatchApiHelper = BatchApiHelper; + var LibraryBuilder = (function () { + function LibraryBuilder(options) { + this.m_namespaceMap = {}; + this.m_namespace = options.metadata.name; + this.m_targetNamespaceObject = options.targetNamespaceObject; + this.m_namespaceMap[this.m_namespace] = options.targetNamespaceObject; + if (options.namespaceMap) { + for (var ns in options.namespaceMap) { + this.m_namespaceMap[ns] = options.namespaceMap[ns]; + } + } + this.m_defaultApiSetName = options.metadata.defaultApiSetName; + this.m_hostName = options.metadata.hostName; + var metadata = options.metadata; + if (metadata.enumTypes) { + for (var i = 0; i < metadata.enumTypes.length; i++) { + this.buildEnumType(metadata.enumTypes[i]); + } + } + if (metadata.apiSets) { + for (var i = 0; i < metadata.apiSets.length; i++) { + var elem = metadata.apiSets[i]; + if (Array.isArray(elem)) { + metadata.apiSets[i] = { + version: elem[0], + name: elem[1] || this.m_defaultApiSetName + }; + } + } + this.m_apiSets = metadata.apiSets; + } + this.m_strings = metadata.strings; + if (metadata.clientObjectTypes) { + for (var i = 0; i < metadata.clientObjectTypes.length; i++) { + var elem = metadata.clientObjectTypes[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 11); + metadata.clientObjectTypes[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + collectionPropertyPath: this.getString(elem[6]), + newObjectServerTypeFullName: this.getString(elem[9]), + newObjectApiFlags: elem[10], + childItemTypeFullName: this.getString(elem[7]), + scalarProperties: elem[2], + navigationProperties: elem[3], + scalarMethods: elem[4], + navigationMethods: elem[5], + events: elem[8] + }; + } + this.buildClientObjectType(metadata.clientObjectTypes[i], options.fullyInitialize); + } + } + } + LibraryBuilder.prototype.ensureArraySize = function (value, size) { + var count = size - value.length; + while (count > 0) { + value.push(0); + count--; + } + }; + LibraryBuilder.prototype.getString = function (ordinalOrValue) { + if (typeof (ordinalOrValue) === "number") { + if (ordinalOrValue > 0) { + return this.m_strings[ordinalOrValue - 1]; + } + return null; + } + return ordinalOrValue; + }; + LibraryBuilder.prototype.buildEnumType = function (elem) { + var enumType; + if (Array.isArray(elem)) { + enumType = { + name: elem[0], + fields: elem[2] + }; + if (!enumType.fields) { + enumType.fields = {}; + } + var fieldsWithCamelUpperCaseValue = elem[1]; + if (Array.isArray(fieldsWithCamelUpperCaseValue)) { + for (var index = 0; index < fieldsWithCamelUpperCaseValue.length; index++) { + enumType.fields[fieldsWithCamelUpperCaseValue[index]] = this.toSimpleCamelUpperCase(fieldsWithCamelUpperCaseValue[index]); + } + } + } + else { + enumType = elem; + } + this.m_targetNamespaceObject[enumType.name] = enumType.fields; + }; + LibraryBuilder.prototype.buildClientObjectType = function (typeInfo, fullyInitialize) { + var thisBuilder = this; + var type = function (context, objectPath) { + ClientObject.apply(this, arguments); + if (!thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited) { + thisBuilder.buildPrototype(thisBuilder.m_targetNamespaceObject[typeInfo.name], typeInfo); + thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited = true; + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo) { + if (this._objectPath && this._objectPath.objectPathInfo && this._className) { + this._objectPath.objectPathInfo.T = this._className; + } + } + }; + this.m_targetNamespaceObject[typeInfo.name] = type; + this.extendsType(type, ClientObject); + this.buildNewObject(type, typeInfo); + if ((typeInfo.behaviorFlags & 2) !== 0) { + type.prototype._KeepReference = function () { + BatchApiHelper.invokeMethod(this, "_KeepReference", 1, [], 0, 0); + }; + } + if ((typeInfo.behaviorFlags & 32) !== 0) { + var func = this.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_StaticCustomize"); + func.call(null, type); + } + if (fullyInitialize) { + this.buildPrototype(type, typeInfo); + type._typeInited = true; + } + }; + LibraryBuilder.prototype.extendsType = function (d, b) { + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + LibraryBuilder.prototype.findObjectUnderPath = function (top, paths, pathStartIndex) { + var obj = top; + for (var i = pathStartIndex; i < paths.length; i++) { + if (typeof (obj) !== 'object') { + throw new OfficeExtension_1.Error("Cannot find " + paths.join(".")); + } + obj = obj[paths[i]]; + } + return obj; + }; + LibraryBuilder.prototype.getFunction = function (fullName) { + var ret = this.resolveObjectByFullName(fullName); + if (typeof (ret) !== 'function') { + throw new OfficeExtension_1.Error("Cannot find function or type: " + fullName); + } + return ret; + }; + LibraryBuilder.prototype.resolveObjectByFullName = function (fullName) { + var parts = fullName.split('.'); + if (parts.length === 1) { + return this.m_targetNamespaceObject[parts[0]]; + } + var rootName = parts[0]; + if (rootName === this.m_namespace) { + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 1); + } + if (this.m_namespaceMap[rootName]) { + return this.findObjectUnderPath(this.m_namespaceMap[rootName], parts, 1); + } + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 0); + }; + LibraryBuilder.prototype.evaluateSimpleExpression = function (expression, thisObj) { + if (Utility.isNullOrUndefined(expression)) { + return null; + } + var paths = expression.split('.'); + if (paths.length === 3 && paths[0] === 'OfficeExtension' && paths[1] === 'Constants') { + return Constants[paths[2]]; + } + if (paths[0] === 'this') { + var obj = thisObj; + for (var i = 1; i < paths.length; i++) { + if (paths[i] == 'toString()') { + obj = obj.toString(); + } + else if (paths[i].substr(paths[i].length - 2) === "()") { + obj = obj[paths[i].substr(0, paths[i].length - 2)](); + } + else { + obj = obj[paths[i]]; + } + } + return obj; + } + throw new OfficeExtension_1.Error("Cannot evaluate: " + expression); + }; + LibraryBuilder.prototype.evaluateEventTargetId = function (targetIdExpression, thisObj) { + if (Utility.isNullOrEmptyString(targetIdExpression)) { + return ''; + } + return this.evaluateSimpleExpression(targetIdExpression, thisObj); + }; + LibraryBuilder.prototype.isAllDigits = function (expression) { + var charZero = '0'.charCodeAt(0); + var charNine = '9'.charCodeAt(0); + for (var i = 0; i < expression.length; i++) { + if (expression.charCodeAt(i) < charZero || + expression.charCodeAt(i) > charNine) { + return false; + } + } + return true; + }; + LibraryBuilder.prototype.evaluateEventType = function (eventTypeExpression) { + if (Utility.isNullOrEmptyString(eventTypeExpression)) { + return 0; + } + if (this.isAllDigits(eventTypeExpression)) { + return parseInt(eventTypeExpression); + } + var ret = this.resolveObjectByFullName(eventTypeExpression); + if (typeof (ret) !== 'number') { + throw new OfficeExtension_1.Error("Invalid event type: " + eventTypeExpression); + } + return ret; + }; + LibraryBuilder.prototype.buildPrototype = function (type, typeInfo) { + this.buildScalarProperties(type, typeInfo); + this.buildNavigationProperties(type, typeInfo); + this.buildScalarMethods(type, typeInfo); + this.buildNavigationMethods(type, typeInfo); + this.buildEvents(type, typeInfo); + this.buildHandleResult(type, typeInfo); + this.buildHandleIdResult(type, typeInfo); + this.buildHandleRetrieveResult(type, typeInfo); + this.buildLoad(type, typeInfo); + this.buildRetrieve(type, typeInfo); + this.buildSetMockData(type, typeInfo); + this.buildEnsureUnchanged(type, typeInfo); + this.buildUpdate(type, typeInfo); + this.buildSet(type, typeInfo); + this.buildToJSON(type, typeInfo); + this.buildItems(type, typeInfo); + this.buildTypeMetadataInfo(type, typeInfo); + this.buildTrackUntrack(type, typeInfo); + this.buildMixin(type, typeInfo); + }; + LibraryBuilder.prototype.toSimpleCamelUpperCase = function (name) { + return name.substr(0, 1).toUpperCase() + name.substr(1); + }; + LibraryBuilder.prototype.ensureOriginalName = function (member) { + if (member.originalName === null) { + member.originalName = this.toSimpleCamelUpperCase(member.name); + } + }; + LibraryBuilder.prototype.getFieldName = function (member) { + return "m_" + member.name; + }; + LibraryBuilder.prototype.throwIfApiNotSupported = function (typeInfo, member) { + if (this.m_apiSets && member.apiSetInfoOrdinal > 0) { + var apiSetInfo = this.m_apiSets[member.apiSetInfoOrdinal - 1]; + if (apiSetInfo) { + Utility.throwIfApiNotSupported(typeInfo.name + "." + member.name, apiSetInfo.name, apiSetInfo.version, this.m_hostName); + } + } + }; + LibraryBuilder.prototype.buildScalarProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarProperties)) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var elem = typeInfo.scalarProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 6); + typeInfo.scalarProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + originalName: this.getString(elem[3]), + setMethodApiFlags: elem[4], + undoableApiSetInfoOrdinal: elem[5] + }; + } + this.buildScalarProperty(type, typeInfo, typeInfo.scalarProperties[i]); + } + } + }; + LibraryBuilder.prototype.calculateApiFlags = function (apiFlags, undoableApiSetInfoOrdinal) { + if (undoableApiSetInfoOrdinal > 0) { + var undoableApiSetInfo = this.m_apiSets[undoableApiSetInfoOrdinal - 1]; + if (undoableApiSetInfo) { + apiFlags = CommonUtility.calculateApiFlags(apiFlags, undoableApiSetInfo.name, undoableApiSetInfo.version); + } + } + return apiFlags; + }; + LibraryBuilder.prototype.buildScalarProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + Utility.throwIfNotLoaded(propInfo.name, this[fieldName], typeInfo.name, this._isNull); + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildNavigationProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationProperties)) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + var elem = typeInfo.navigationProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 8); + typeInfo.navigationProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[4]), + getMethodApiFlags: elem[5], + setMethodApiFlags: elem[6], + propertyTypeFullName: this.getString(elem[1]), + undoableApiSetInfoOrdinal: elem[7] + }; + } + this.buildNavigationProperty(type, typeInfo, typeInfo.navigationProperties[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + if (!this[thisBuilder.getFieldName(propInfo)]) { + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + this[fieldName] = BatchApiHelper.createPropertyObject(thisBuilder.getFunction(propInfo.propertyTypeFullName), this, propInfo.originalName, (propInfo.behaviorFlags & 16) !== 0, propInfo.getMethodApiFlags); + } + if (propInfo.behaviorFlags & 64) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Get"); + customizationFunc.call(this, this, this[fieldName]); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildScalarMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarMethods)) { + for (var i = 0; i < typeInfo.scalarMethods.length; i++) { + var elem = typeInfo.scalarMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.scalarMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[5]), + apiFlags: elem[4], + parameterCount: elem[1], + undoableApiSetInfoOrdinal: elem[6] + }; + } + this.buildScalarMethod(type, typeInfo, typeInfo.scalarMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildScalarMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + var resultProcessType = 0; + if (methodInfo.behaviorFlags & 32) { + resultProcessType = 1; + } + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.invokeMethod(this, methodInfo.originalName, operationType, args, apiFlags, resultProcessType); + }; + }; + LibraryBuilder.prototype.buildNavigationMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationMethods)) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + var elem = typeInfo.navigationMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 9); + typeInfo.navigationMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[3], + apiSetInfoOrdinal: elem[4], + originalName: this.getString(elem[6]), + apiFlags: elem[5], + parameterCount: elem[2], + returnTypeFullName: this.getString(elem[1]), + returnObjectGetByIdMethodName: this.getString(elem[7]), + undoableApiSetInfoOrdinal: elem[8] + }; + } + this.buildNavigationMethod(type, typeInfo, typeInfo.navigationMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + if ((methodInfo.behaviorFlags & 16) !== 0) { + return BatchApiHelper.createIndexerObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, args); + } + else { + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.createMethodObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, methodInfo.originalName, operationType, args, (methodInfo.behaviorFlags & 4) !== 0, (methodInfo.behaviorFlags & 8) !== 0, methodInfo.returnObjectGetByIdMethodName, apiFlags); + } + }; + }; + LibraryBuilder.prototype.buildHandleResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleResult = function (value) { + ClientObject.prototype._handleResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + Utility.fixObjectPathIfNecessary(this, value); + if (typeInfo.behaviorFlags & 8) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i_3 = 0; i_3 < typeInfo.scalarProperties.length; i_3++) { + if (!Utility.isUndefined(value[typeInfo.scalarProperties[i_3].originalName])) { + if ((typeInfo.scalarProperties[i_3].behaviorFlags & 8) !== 0) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i_3].originalName]); + } + else { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = value[typeInfo.scalarProperties[i_3].originalName]; + } + } + } + } + if (typeInfo.navigationProperties) { + var propNames = []; + for (var i_4 = 0; i_4 < typeInfo.navigationProperties.length; i_4++) { + propNames.push(typeInfo.navigationProperties[i_4].name); + propNames.push(typeInfo.navigationProperties[i_4].originalName); + } + Utility._handleNavigationPropertyResults(this, value, propNames); + } + if ((typeInfo.behaviorFlags & 1) !== 0) { + var hasIndexerMethod = thisBuilder.hasIndexMethod(typeInfo); + if (!Utility.isNullOrUndefined(value[Constants.items])) { + this.m__items = []; + var _data = value[Constants.items]; + var childItemType = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + for (var i = 0; i < _data.length; i++) { + var _item = BatchApiHelper.createChildItemObject(childItemType, hasIndexerMethod, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + } + }; + }; + LibraryBuilder.prototype.buildHandleRetrieveResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleRetrieveResult = function (value, result) { + ClientObject.prototype._handleRetrieveResult.call(this, value, result); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if (typeInfo.scalarProperties[i].behaviorFlags & 8) { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].name])) { + value[typeInfo.scalarProperties[i].name] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i].name]); + } + } + } + } + if (typeInfo.behaviorFlags & 1) { + var hasIndexerMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + var childItemType_1 = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + var thisObj_1 = this; + Utility.processRetrieveResult(thisObj_1, value, result, function (childItemData, index) { return BatchApiHelper.createChildItemObject(childItemType_1, hasIndexerMethod_1, thisObj_1, childItemData, index); }); + } + else { + Utility.processRetrieveResult(this, value, result); + } + }; + }; + LibraryBuilder.prototype.buildHandleIdResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleIdResult = function (value) { + ClientObject.prototype._handleIdResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.behaviorFlags & 16) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleIdResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var propName = typeInfo.scalarProperties[i].originalName; + if (propName === "Id" || propName === "_Id" || propName === "_ReferenceId") { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].originalName])) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])] = value[typeInfo.scalarProperties[i].originalName]; + } + } + } + } + }; + }; + LibraryBuilder.prototype.buildLoad = function (type, typeInfo) { + type.prototype.load = function (options) { + return Utility.load(this, options); + }; + }; + LibraryBuilder.prototype.buildRetrieve = function (type, typeInfo) { + type.prototype.retrieve = function (options) { + return Utility.retrieve(this, options); + }; + }; + LibraryBuilder.prototype.buildNewObject = function (type, typeInfo) { + if (!Utility.isNullOrEmptyString(typeInfo.newObjectServerTypeFullName)) { + type.newObject = function (context) { + return BatchApiHelper.createTopLevelServiceObject(type, context, typeInfo.newObjectServerTypeFullName, (typeInfo.behaviorFlags & 1) !== 0, typeInfo.newObjectApiFlags); + }; + } + }; + LibraryBuilder.prototype.buildSetMockData = function (type, typeInfo) { + var thisBuilder = this; + if (typeInfo.behaviorFlags & 1) { + var hasIndexMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + type.prototype.setMockData = function (data) { + var thisObj = this; + Utility.setMockData(thisObj, data, function (childItemData, index) { + return BatchApiHelper.createChildItemObject(thisBuilder.getFunction(typeInfo.childItemTypeFullName), hasIndexMethod_1, thisObj, childItemData, index); + }, function (items) { + thisObj.m__items = items; + }); + }; + } + else { + type.prototype.setMockData = function (data) { + Utility.setMockData(this, data); + }; + } + }; + LibraryBuilder.prototype.buildEnsureUnchanged = function (type, typeInfo) { + type.prototype.ensureUnchanged = function (data) { + BatchApiHelper.invokeEnsureUnchanged(this, data); + }; + }; + LibraryBuilder.prototype.buildUpdate = function (type, typeInfo) { + type.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + }; + LibraryBuilder.prototype.buildSet = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) !== 0) { + return; + } + var notAllowedToBeSetPropertyNames = []; + var allowedScalarPropertyNames = []; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 2) === 0 && + (typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + allowedScalarPropertyNames.push(typeInfo.scalarProperties[i].name); + } + else { + notAllowedToBeSetPropertyNames.push(typeInfo.scalarProperties[i].name); + } + } + } + var allowedNavigationPropertyNames = []; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 16) !== 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 1) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 32) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else { + allowedNavigationPropertyNames.push(typeInfo.navigationProperties[i].name); + } + } + } + if (allowedNavigationPropertyNames.length === 0 && allowedScalarPropertyNames.length === 0) { + return; + } + type.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, allowedScalarPropertyNames, allowedNavigationPropertyNames, notAllowedToBeSetPropertyNames); + }; + }; + LibraryBuilder.prototype.buildItems = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) === 0) { + return; + } + Object.defineProperty(type.prototype, "items", { + get: function () { + Utility.throwIfNotLoaded("items", this.m__items, typeInfo.name, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildToJSON = function (type, typeInfo) { + var thisBuilder = this; + if ((typeInfo.behaviorFlags & 1) !== 0) { + type.prototype.toJSON = function () { + return Utility.toJson(this, {}, {}, this.m__items); + }; + return; + } + else { + type.prototype.toJSON = function () { + var scalarProperties = {}; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + scalarProperties[typeInfo.scalarProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])]; + } + } + } + var navProperties = {}; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 1) !== 0) { + navProperties[typeInfo.navigationProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.navigationProperties[i])]; + } + } + } + return Utility.toJson(this, scalarProperties, navProperties); + }; + } + }; + LibraryBuilder.prototype.buildTypeMetadataInfo = function (type, typeInfo) { + Object.defineProperty(type.prototype, "_className", { + get: function () { + return typeInfo.name; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_isCollection", { + get: function () { + return (typeInfo.behaviorFlags & 1) !== 0; + }, + enumerable: true, + configurable: true + }); + if (!Utility.isNullOrEmptyString(typeInfo.collectionPropertyPath)) { + Object.defineProperty(type.prototype, "_collectionPropertyPath", { + get: function () { + return typeInfo.collectionPropertyPath; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.scalarProperties && typeInfo.scalarProperties.length > 0) { + Object.defineProperty(type.prototype, "_scalarPropertyNames", { + get: function () { + if (!this.m__scalarPropertyNames) { + this.m__scalarPropertyNames = typeInfo.scalarProperties.map(function (p) { return p.name; }); + } + return this.m__scalarPropertyNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyOriginalNames", { + get: function () { + if (!this.m__scalarPropertyOriginalNames) { + this.m__scalarPropertyOriginalNames = typeInfo.scalarProperties.map(function (p) { return p.originalName; }); + } + return this.m__scalarPropertyOriginalNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyUpdateable", { + get: function () { + if (!this.m__scalarPropertyUpdateable) { + this.m__scalarPropertyUpdateable = typeInfo.scalarProperties.map(function (p) { return (p.behaviorFlags & 2) === 0; }); + } + return this.m__scalarPropertyUpdateable; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.navigationProperties && typeInfo.navigationProperties.length > 0) { + Object.defineProperty(type.prototype, "_navigationPropertyNames", { + get: function () { + if (!this.m__navigationPropertyNames) { + this.m__navigationPropertyNames = typeInfo.navigationProperties.map(function (p) { return p.name; }); + } + return this.m__navigationPropertyNames; + }, + enumerable: true, + configurable: true + }); + } + }; + LibraryBuilder.prototype.buildTrackUntrack = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 2) { + type.prototype.track = function () { + this.context.trackedObjects.add(this); + return this; + }; + type.prototype.untrack = function () { + this.context.trackedObjects.remove(this); + return this; + }; + } + }; + LibraryBuilder.prototype.buildMixin = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 4) { + var mixinType = this.getFunction(typeInfo.name + 'Custom'); + Utility.applyMixin(type, mixinType); + } + }; + LibraryBuilder.prototype.getOnEventName = function (name) { + if (name[0] === '_') { + return '_on' + name.substr(1); + } + return 'on' + name; + }; + LibraryBuilder.prototype.buildEvents = function (type, typeInfo) { + if (typeInfo.events) { + for (var i = 0; i < typeInfo.events.length; i++) { + var elem = typeInfo.events[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.events[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + typeExpression: this.getString(elem[3]), + targetIdExpression: this.getString(elem[4]), + register: this.getString(elem[5]), + unregister: this.getString(elem[6]) + }; + } + this.buildEvent(type, typeInfo, typeInfo.events[i]); + } + } + }; + LibraryBuilder.prototype.buildEvent = function (type, typeInfo, evt) { + if (evt.behaviorFlags & 1) { + this.buildV0Event(type, typeInfo, evt); + } + else { + this.buildV2Event(type, typeInfo, evt); + } + }; + LibraryBuilder.prototype.buildV2Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (evt.register !== 'null') { + registerFunc = this[evt.register].bind(this); + } + var unregisterFunc = null; + if (evt.unregister !== 'null') { + unregisterFunc = this[evt.unregister].bind(this); + } + var getTargetIdFunc = function () { + return thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + }; + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + var eventType = thisBuilder.evaluateEventType(evt.typeExpression); + this[fieldName] = new GenericEventHandlers(this.context, this, evt.name, { + eventType: eventType, + getTargetIdFunc: getTargetIdFunc, + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildV0Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (Utility.isNullOrEmptyString(evt.register)) { + var eventType_1 = thisBuilder.evaluateEventType(evt.typeExpression); + registerFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.register(eventType_1, targetId, handlerCallback); + }; + } + else if (evt.register !== 'null') { + var func_1 = thisBuilder.getFunction(evt.register); + registerFunc = + function (handlerCallback) { + return func_1.call(thisObj, thisObj, handlerCallback); + }; + } + var unregisterFunc = null; + if (Utility.isNullOrEmptyString(evt.unregister)) { + var eventType_2 = thisBuilder.evaluateEventType(evt.typeExpression); + unregisterFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.unregister(eventType_2, targetId, handlerCallback); + }; + } + else if (evt.unregister !== 'null') { + var func_2 = thisBuilder.getFunction(evt.unregister); + unregisterFunc = + function (handlerCallback) { + return func_2.call(thisObj, thisObj, handlerCallback); + }; + } + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + this[fieldName] = new EventHandlers(this.context, this, evt.name, { + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.hasIndexMethod = function (typeInfo) { + var ret = false; + if (typeInfo.navigationMethods) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + if ((typeInfo.navigationMethods[i].behaviorFlags & 16) !== 0) { + ret = true; + break; + } + } + } + return ret; + }; + LibraryBuilder.CustomizationCodeNamespace = "_CC"; + return LibraryBuilder; + }()); + OfficeExtension_1.LibraryBuilder = LibraryBuilder; + var versionToken = 1; + var internalConfiguration = { + invokeRequestModifier: function (request) { + request.DdaMethod.Version = versionToken; + return request; + }, + invokeResponseModifier: function (args) { + versionToken = args.Version; + if (args.Error) { + args.error = {}; + args.error.Code = args.Error; + } + return args; + } + }; + var CommunicationConstants; + (function (CommunicationConstants) { + CommunicationConstants["SendingId"] = "sId"; + CommunicationConstants["RespondingId"] = "rId"; + CommunicationConstants["CommandKey"] = "command"; + CommunicationConstants["SessionInfoKey"] = "sessionInfo"; + CommunicationConstants["ParamsKey"] = "params"; + CommunicationConstants["ApiReadyCommand"] = "apiready"; + CommunicationConstants["ExecuteMethodCommand"] = "executeMethod"; + CommunicationConstants["GetAppContextCommand"] = "getAppContext"; + CommunicationConstants["RegisterEventCommand"] = "registerEvent"; + CommunicationConstants["UnregisterEventCommand"] = "unregisterEvent"; + CommunicationConstants["FireEventCommand"] = "fireEvent"; + })(CommunicationConstants || (CommunicationConstants = {})); + var EmbeddedConstants = (function () { + function EmbeddedConstants() { + } + EmbeddedConstants.sessionContext = 'sc'; + EmbeddedConstants.embeddingPageOrigin = 'EmbeddingPageOrigin'; + EmbeddedConstants.embeddingPageSessionInfo = 'EmbeddingPageSessionInfo'; + return EmbeddedConstants; + }()); + OfficeExtension_1.EmbeddedConstants = EmbeddedConstants; + var EmbeddedSession = (function (_super) { + __extends(EmbeddedSession, _super); + function EmbeddedSession(url, options) { + var _this = _super.call(this) || this; + _this.m_chosenWindow = null; + _this.m_chosenOrigin = null; + _this.m_enabled = true; + _this.m_onMessageHandler = _this._onMessage.bind(_this); + _this.m_callbackList = {}; + _this.m_id = 0; + _this.m_timeoutId = -1; + _this.m_appContext = null; + _this.m_url = url; + _this.m_options = options; + if (!_this.m_options) { + _this.m_options = { sessionKey: Math.random().toString() }; + } + if (!_this.m_options.sessionKey) { + _this.m_options.sessionKey = Math.random().toString(); + } + if (!_this.m_options.container) { + _this.m_options.container = document.body; + } + if (!_this.m_options.timeoutInMilliseconds) { + _this.m_options.timeoutInMilliseconds = 60000; + } + if (!_this.m_options.height) { + _this.m_options.height = '400px'; + } + if (!_this.m_options.width) { + _this.m_options.width = '100%'; + } + if (!(_this.m_options.webApplication && + _this.m_options.webApplication.accessToken && + _this.m_options.webApplication.accessTokenTtl)) { + _this.m_options.webApplication = null; + } + return _this; + } + EmbeddedSession.prototype._getIFrameSrc = function () { + var origin = window.location.protocol + '//' + window.location.host; + var toAppend = EmbeddedConstants.embeddingPageOrigin + + '=' + + encodeURIComponent(origin) + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + encodeURIComponent(this.m_options.sessionKey); + var useHash = false; + if (this.m_url.toLowerCase().indexOf('/_layouts/preauth.aspx') > 0 || + this.m_url.toLowerCase().indexOf('/_layouts/15/preauth.aspx') > 0) { + useHash = true; + } + var a = document.createElement('a'); + a.href = this.m_url; + if (this.m_options.webApplication) { + var toAppendWAC = EmbeddedConstants.embeddingPageOrigin + + '=' + + origin + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + this.m_options.sessionKey; + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + else { + a.search = a.search + '&' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + } + else if (useHash) { + if (a.hash.length === 0 || a.hash === '#') { + a.hash = '#' + toAppend; + } + else { + a.hash = a.hash + '&' + toAppend; + } + } + else { + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + toAppend; + } + else { + a.search = a.search + '&' + toAppend; + } + } + var iframeSrc = a.href; + return iframeSrc; + }; + EmbeddedSession.prototype.init = function () { + var _this = this; + window.addEventListener('message', this.m_onMessageHandler); + var iframeSrc = this._getIFrameSrc(); + return CoreUtility.createPromise(function (resolve, reject) { + var iframeElement = document.createElement('iframe'); + if (_this.m_options.id) { + iframeElement.id = _this.m_options.id; + iframeElement.name = _this.m_options.id; + } + iframeElement.style.height = _this.m_options.height; + iframeElement.style.width = _this.m_options.width; + if (!_this.m_options.webApplication) { + iframeElement.src = iframeSrc; + _this.m_options.container.appendChild(iframeElement); + } + else { + var webApplicationForm = document.createElement('form'); + webApplicationForm.setAttribute('action', iframeSrc); + webApplicationForm.setAttribute('method', 'post'); + webApplicationForm.setAttribute('target', iframeElement.name); + _this.m_options.container.appendChild(webApplicationForm); + var token_input = document.createElement('input'); + token_input.setAttribute('type', 'hidden'); + token_input.setAttribute('name', 'access_token'); + token_input.setAttribute('value', _this.m_options.webApplication.accessToken); + webApplicationForm.appendChild(token_input); + var token_ttl_input = document.createElement('input'); + token_ttl_input.setAttribute('type', 'hidden'); + token_ttl_input.setAttribute('name', 'access_token_ttl'); + token_ttl_input.setAttribute('value', _this.m_options.webApplication.accessTokenTtl); + webApplicationForm.appendChild(token_ttl_input); + _this.m_options.container.appendChild(iframeElement); + webApplicationForm.submit(); + } + _this.m_timeoutId = window.setTimeout(function () { + _this.close(); + var err = Utility.createRuntimeError(CoreErrorCodes.timeout, CoreUtility._getResourceString(CoreResourceStrings.timeout), 'EmbeddedSession.init'); + reject(err); + }, _this.m_options.timeoutInMilliseconds); + _this.m_promiseResolver = resolve; + }); + }; + EmbeddedSession.prototype._invoke = function (method, callback, params) { + if (!this.m_enabled) { + callback(5001, null); + return; + } + if (internalConfiguration.invokeRequestModifier) { + params = internalConfiguration.invokeRequestModifier(params); + } + this._sendMessageWithCallback(this.m_id++, method, params, function (args) { + if (internalConfiguration.invokeResponseModifier) { + args = internalConfiguration.invokeResponseModifier(args); + } + var errorCode = args['Error']; + delete args['Error']; + callback(errorCode || 0, args); + }); + }; + EmbeddedSession.prototype.close = function () { + window.removeEventListener('message', this.m_onMessageHandler); + window.clearTimeout(this.m_timeoutId); + this.m_enabled = false; + }; + EmbeddedSession.prototype.getEventRegistration = function (controlId) { + if (!this.m_sessionEventManager) { + this.m_sessionEventManager = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + } + return this.m_sessionEventManager; + }; + EmbeddedSession.prototype._createRequestExecutorOrNull = function () { + return new EmbeddedRequestExecutor(this); + }; + EmbeddedSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + EmbeddedSession.prototype._registerEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.RegisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(null); + }); + }); + }; + EmbeddedSession.prototype._unregisterEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.UnregisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(); + }); + }); + }; + EmbeddedSession.prototype._onMessage = function (event) { + var _this = this; + if (!this.m_enabled) { + return; + } + if (this.m_chosenWindow && (this.m_chosenWindow !== event.source || this.m_chosenOrigin !== event.origin)) { + return; + } + var eventData = event.data; + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.ApiReadyCommand) { + if (!this.m_chosenWindow && + this._isValidDescendant(event.source) && + eventData[CommunicationConstants.SessionInfoKey] === this.m_options.sessionKey) { + this.m_chosenWindow = event.source; + this.m_chosenOrigin = event.origin; + this._sendMessageWithCallback(this.m_id++, CommunicationConstants.GetAppContextCommand, null, function (appContext) { + _this._setupContext(appContext); + window.clearTimeout(_this.m_timeoutId); + _this.m_promiseResolver(); + }); + } + return; + } + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.FireEventCommand) { + var msg = eventData[CommunicationConstants.ParamsKey]; + var eventId = msg['EventId']; + var targetId = msg['TargetId']; + var data = msg['Data']; + if (this.m_sessionEventManager) { + var handlers = this.m_sessionEventManager.getHandlers(eventId, targetId); + for (var i = 0; i < handlers.length; i++) { + handlers[i](data); + } + } + return; + } + if (eventData && eventData.hasOwnProperty(CommunicationConstants.RespondingId)) { + var rId = eventData[CommunicationConstants.RespondingId]; + if (this.m_callbackList.hasOwnProperty(rId)) { + var callback = this.m_callbackList[rId]; + if (typeof callback === 'function') { + callback(eventData[CommunicationConstants.ParamsKey]); + } + delete this.m_callbackList[rId]; + } + } + }; + EmbeddedSession.prototype._sendMessageWithCallback = function (id, command, data, callback) { + this.m_callbackList[id] = callback; + var message = {}; + message[CommunicationConstants.SendingId] = id; + message[CommunicationConstants.CommandKey] = command; + message[CommunicationConstants.ParamsKey] = data; + this.m_chosenWindow.postMessage(JSON.stringify(message), this.m_chosenOrigin); + }; + EmbeddedSession.prototype._isValidDescendant = function (wnd) { + var container = this.m_options.container || document.body; + function doesFrameWindow(containerWindow) { + if (containerWindow === wnd) { + return true; + } + for (var i = 0, len = containerWindow.frames.length; i < len; i++) { + if (doesFrameWindow(containerWindow.frames[i])) { + return true; + } + } + return false; + } + var iframes = container.getElementsByTagName('iframe'); + for (var i = 0, len = iframes.length; i < len; i++) { + if (doesFrameWindow(iframes[i].contentWindow)) { + return true; + } + } + return false; + }; + EmbeddedSession.prototype._setupContext = function (appContext) { + if (!(this.m_appContext = appContext)) { + return; + } + }; + return EmbeddedSession; + }(SessionBase)); + OfficeExtension_1.EmbeddedSession = EmbeddedSession; + var EmbeddedRequestExecutor = (function () { + function EmbeddedRequestExecutor(session) { + this.m_session = session; + } + EmbeddedRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, EmbeddedRequestExecutor.SourceLibHeaderValue); + return CoreUtility.createPromise(function (resolve, reject) { + _this.m_session._invoke(CommunicationConstants.ExecuteMethodCommand, function (status, result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (status == 0) { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBodyFromSafeArray(result.Data), RichApiMessageUtility.getResponseHeadersFromSafeArray(result.Data)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.Code, result.error.Message); + } + resolve(response); + }, EmbeddedRequestExecutor._transformMessageArrayIntoParams(messageSafearray)); + }); + }; + EmbeddedRequestExecutor._transformMessageArrayIntoParams = function (msgArray) { + return { + ArrayData: msgArray, + DdaMethod: { + DispatchId: EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod + } + }; + }; + EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod = 93; + EmbeddedRequestExecutor.SourceLibHeaderValue = 'Embedded'; + return EmbeddedRequestExecutor; + }()); +})(OfficeExtension || (OfficeExtension = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { + step(generator.next(value)); + } + catch (e) { + reject(e); + } } + function rejected(value) { try { + step(generator["throw"](value)); + } + catch (e) { + reject(e); + } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function () { if (t[0] & 1) + throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } + catch (e) { + op = [6, e]; + y = 0; + } + finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "AgaveVisualApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeBiShim = "BiShim"; + var BiShim = (function (_super) { + __extends(BiShim, _super); + function BiShim() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BiShim.prototype, "_className", { + get: function () { + return "BiShim"; + }, + enumerable: true, + configurable: true + }); + BiShim.prototype.initialize = function (capabilities) { + _invokeMethod(this, "Initialize", 0, [capabilities], 0, 0); + }; + BiShim.prototype.getData = function () { + return _invokeMethod(this, "getData", 1, [], 4, 0); + }; + BiShim.prototype.setVisualObjects = function (visualObjects) { + _invokeMethod(this, "setVisualObjects", 0, [visualObjects], 2, 0); + }; + BiShim.prototype.setVisualObjectsToPersist = function (visualObjectsToPersist) { + _invokeMethod(this, "setVisualObjectsToPersist", 0, [visualObjectsToPersist], 2, 0); + }; + BiShim.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BiShim.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BiShim.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BiShim, context, "Microsoft.AgaveVisual.BiShim", false, 4); + }; + BiShim.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BiShim; + }(OfficeExtension.ClientObject)); + OfficeCore.BiShim = BiShim; + var AgaveVisualErrorCodes; + (function (AgaveVisualErrorCodes) { + AgaveVisualErrorCodes["generalException1"] = "GeneralException"; + })(AgaveVisualErrorCodes = OfficeCore.AgaveVisualErrorCodes || (OfficeCore.AgaveVisualErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "ExperimentApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeFlightingService = "FlightingService"; + var FlightingService = (function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId = function () { + return _invokeMethod(this, "GetClientSessionId", 1, [], 4, 0); + }; + FlightingService.prototype.getDeferredFlights = function () { + return _invokeMethod(this, "GetDeferredFlights", 1, [], 4, 0); + }; + FlightingService.prototype.getFeature = function (featureName, type, defaultValue, possibleValues) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null, 4); + }; + FlightingService.prototype.getFeatureGate = function (featureName, scope) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeatureGate", 1, [featureName, scope], false, false, null, 4); + }; + FlightingService.prototype.resetOverride = function (featureName) { + _invokeMethod(this, "ResetOverride", 0, [featureName], 0, 0); + }; + FlightingService.prototype.setOverride = function (featureName, type, value) { + _invokeMethod(this, "SetOverride", 0, [featureName, type, value], 0, 0); + }; + FlightingService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FlightingService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FlightingService, context, "Microsoft.Experiment.FlightingService", false, 4); + }; + FlightingService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService = FlightingService; + var _typeABType = "ABType"; + var ABType = (function (_super) { + __extends(ABType, _super); + function ABType() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeABType, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + ABType.prototype.load = function (option) { + return _load(this, option); + }; + ABType.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + ABType.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ABType.prototype.toJSON = function () { + return _toJson(this, { + "value": this._V + }, {}); + }; + ABType.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType = ABType; + var FeatureType; + (function (FeatureType) { + FeatureType["boolean"] = "Boolean"; + FeatureType["integer"] = "Integer"; + FeatureType["string"] = "String"; + })(FeatureType = OfficeCore.FeatureType || (OfficeCore.FeatureType = {})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes["generalException"] = "GeneralException"; + })(ExperimentErrorCodes = OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyDialog; +(function (OfficeFirstPartyDialog) { + var Dialog = (function () { + function Dialog(_dialogService) { + this._dialogService = _dialogService; + } + Dialog.prototype.close = function () { + this._dialogService.close(); + return this._dialogService.context.sync(); + }; + Dialog.prototype.messageChild = function (message, options) { + if (DialogApiManager && DialogApiManager.messageChildRichApiBridge) { + DialogApiManager.messageChildRichApiBridge(message, options); + } + }; + return Dialog; + }()); + OfficeFirstPartyDialog.Dialog = Dialog; + function lookupErrorCodeAndMessage(internalCode) { + var _a; + var table = (_a = {}, + _a[12002] = { code: "InvalidUrl", message: "Cannot load URL, no such page or bad URL syntax." }, + _a[12003] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12004] = { code: "Untrusted", message: "Domain is not trusted." }, + _a[12005] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12007] = { code: "FailedToOpen", message: "Another dialog is already opened." }, + _a); + if (table[internalCode]) { + return table[internalCode]; + } + else { + return { code: "Unknown", message: "An unknown error has occured with code: " + internalCode }; + } + } + function displayWebDialog(url, options) { + if (options === void 0) { + options = {}; + } + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) { + throw new OfficeExtension.Error({ code: "InvalidArgument", message: 'Dimensions must be "number%" or number.' }); + } + var ctx = new OfficeExtension.ClientRequestContext(); + var dialogService = OfficeCore.FirstPartyDialogService.newObject(ctx); + var dialog = new OfficeFirstPartyDialog.Dialog(dialogService); + var eventResult = dialogService.onDialogMessage.add(function (args) { + OfficeExtension.Utility.log("dialogMessageHandler:" + JSON.stringify(args)); + var parsedMessage = JSON.parse(args.message); + var eventError = parsedMessage.errorCode + ? new OfficeExtension.Error(lookupErrorCodeAndMessage(parsedMessage.errorCode)) + : null; + var messageType = parsedMessage.type; + var origin = parsedMessage.origin; + var messageContent = parsedMessage.message; + switch (messageType) { + case 17: + if (eventError) { + reject(eventError); + } + else { + resolve(dialog); + } + break; + case 12: + if (options.onMessage) { + options.onMessage(messageContent, dialog, origin); + } + break; + case 10: + default: + if (parsedMessage.errorCode === 12006) { + if (eventResult) { + eventResult.remove(); + ctx.sync(); + } + if (options.onClose) { + options.onClose(); + } + } + else { + if (options.onRuntimeError) { + options.onRuntimeError(eventError, dialog); + reject(eventError); + } + } + } + return OfficeExtension.CoreUtility.Promise.resolve(); + }); + return ctx.sync() + .then(function () { + var dialogOptions = { + width: options.width ? parseInt(options.width) : 50, + height: options.height ? parseInt(options.height) : 50, + displayInIFrame: options.displayInIFrame, + dialogTitle: options.dialogTitle + }; + dialogService.displayDialog(url, dialogOptions); + return ctx.sync(); + })["catch"](function (e) { + reject(e); + }); + }); + function isInt(value) { + return (/^(\-|\+)?([0-9]+)%?$/.test(value)); + } + } + OfficeFirstPartyDialog.displayWebDialog = displayWebDialog; + var DialogEventType; + (function (DialogEventType) { + DialogEventType[DialogEventType["dialogMessageReceived"] = 0] = "dialogMessageReceived"; + DialogEventType[DialogEventType["dialogEventReceived"] = 1] = "dialogEventReceived"; + })(DialogEventType || (DialogEventType = {})); +})(OfficeFirstPartyDialog || (OfficeFirstPartyDialog = {})); +var OfficeCore; +(function (OfficeCore) { + OfficeCore.OfficeOnlineDomainList = [ + "*.dod.online.office365.us", + "*.gov.online.office365.us", + "*.officeapps-df.live.com", + "*.officeapps.live.com", + "*.online.office.de", + "*.partner.officewebapps.cn" + ]; + function isHostOriginTrusted() { + if (typeof window.external === 'undefined' || + typeof window.external.GetContext === 'undefined') { + var hostUrl = OSF.getClientEndPoint()._targetUrl; + var hostname_1 = getHostNameFromUrl(hostUrl); + if (hostUrl.indexOf("https:") != 0) { + return false; + } + OfficeCore.OfficeOnlineDomainList.forEach(function (domain) { + if (domain.indexOf("*.") == 0) { + domain = domain.substring(2); + } + if (hostname_1.indexOf(domain) == hostname_1.length - domain.length) { + return true; + } + }); + return false; + } + return true; + } + OfficeCore.isHostOriginTrusted = isHostOriginTrusted; + function getHostNameFromUrl(url) { + var hostName = ""; + hostName = url.split("/")[2]; + hostName = hostName.split(":")[0]; + hostName = hostName.split("?")[0]; + return hostName; + } +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var FirstPartyApis = (function () { + function FirstPartyApis(context) { + this.context = context; + } + Object.defineProperty(FirstPartyApis.prototype, "roamingSettings", { + get: function () { + if (!this.m_roamingSettings) { + this.m_roamingSettings = OfficeCore.AuthenticationService.newObject(this.context).roamingSettings; + } + return this.m_roamingSettings; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "tap", { + get: function () { + if (!this.m_tap) { + this.m_tap = OfficeCore.Tap.newObject(this.context); + } + return this.m_tap; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "skill", { + get: function () { + if (!this.m_skill) { + this.m_skill = OfficeCore.Skill.newObject(this.context); + } + return this.m_skill; + }, + enumerable: true, + configurable: true + }); + return FirstPartyApis; + }()); + OfficeCore.FirstPartyApis = FirstPartyApis; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + return _super.call(this, url) || this; + } + Object.defineProperty(RequestContext.prototype, "firstParty", { + get: function () { + if (!this.m_firstPartyApis) { + this.m_firstPartyApis = new FirstPartyApis(this); + } + return this.m_firstPartyApis; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry = OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "ribbon", { + get: function () { + if (!this.m_ribbon) { + this.m_ribbon = OfficeCore.DynamicRibbon.newObject(this); + } + return this.m_ribbon; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "bi", { + get: function () { + if (!this.m_biShim) { + this.m_biShim = OfficeCore.BiShim.newObject(this); + } + return this.m_biShim; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService = OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext = RequestContext; + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("OfficeCore.run", arguments, function (requestInfo) { return new OfficeCore.RequestContext(requestInfo); }); + } + OfficeCore.run = run; +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var license; + (function (license_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function isFeatureEnabled(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, isEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isEnabled = license.isFeatureEnabled(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isEnabled.value]; + } + }); + }); + } + license_1.isFeatureEnabled = isFeatureEnabled; + function getFeatureTier(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, tier; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + tier = license.getFeatureTier(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, tier.value]; + } + }); + }); + } + license_1.getFeatureTier = getFeatureTier; + function isFreemiumUpsellEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, license, isFreemiumUpsellEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isFreemiumUpsellEnabled = license.isFreemiumUpsellEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isFreemiumUpsellEnabled.value]; + } + }); + }); + } + license_1.isFreemiumUpsellEnabled = isFreemiumUpsellEnabled; + function launchUpsellExperience(experienceId) { + return __awaiter(this, void 0, void 0, function () { + var context, license; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + license.launchUpsellExperience(experienceId); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + license_1.launchUpsellExperience = launchUpsellExperience; + function onFeatureStateChanged(feature, listener) { + return __awaiter(this, void 0, void 0, function () { + var context, license, licenseFeature, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + licenseFeature = license.getLicenseFeature(feature); + licenseFeature.onStateChanged.add(listener); + removeListener = function () { + licenseFeature.onStateChanged.remove(listener); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + license_1.onFeatureStateChanged = onFeatureStateChanged; + function getMsaDeviceTicket(resource, policy, options) { + return __awaiter(this, void 0, void 0, function () { + var context, license, msaDeviceTicket; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + msaDeviceTicket = license.getMsaDeviceTicket(resource, policy, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, msaDeviceTicket.value]; + } + }); + }); + } + license_1.getMsaDeviceTicket = getMsaDeviceTicket; + })(license = Office.license || (Office.license = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeSkill = "Skill"; + var Skill = (function (_super) { + __extends(Skill, _super); + function Skill() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Skill.prototype, "_className", { + get: function () { + return "Skill"; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.executeAction = function (paneId, actionId, actionDescriptor) { + return _invokeMethod(this, "ExecuteAction", 1, [paneId, actionId, actionDescriptor], 4 | 1, 0); + }; + Skill.prototype.notifyPaneEvent = function (paneId, eventDescriptor) { + _invokeMethod(this, "NotifyPaneEvent", 1, [paneId, eventDescriptor], 4 | 1, 0); + }; + Skill.prototype.registerHostSkillEvent = function () { + _invokeMethod(this, "RegisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype.testFireEvent = function () { + _invokeMethod(this, "TestFireEvent", 0, [], 1, 0); + }; + Skill.prototype.unregisterHostSkillEvent = function () { + _invokeMethod(this, "UnregisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Skill.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Skill.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Skill, context, "Microsoft.SkillApi.Skill", false, 4); + }; + Object.defineProperty(Skill.prototype, "onHostSkillEvent", { + get: function () { + var _this = this; + if (!this.m_hostSkillEvent) { + this.m_hostSkillEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "HostSkillEvent", { + eventType: 65538, + registerFunc: function () { return _this.registerHostSkillEvent(); }, + unregisterFunc: function () { return _this.unregisterHostSkillEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.Skill_HostSkillEvent_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostSkillEvent; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Skill; + }(OfficeExtension.ClientObject)); + OfficeCore.Skill = Skill; + var _CC; + (function (_CC) { + function Skill_HostSkillEvent_EventArgsTransform(thisObj, args) { + var transformedArgs = { + type: args.type, + data: args.data + }; + return transformedArgs; + } + _CC.Skill_HostSkillEvent_EventArgsTransform = Skill_HostSkillEvent_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var SkillErrorCodes; + (function (SkillErrorCodes) { + SkillErrorCodes["generalException"] = "GeneralException"; + })(SkillErrorCodes = OfficeCore.SkillErrorCodes || (OfficeCore.SkillErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "TelemetryApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeTelemetryService = "TelemetryService"; + var TelemetryService = (function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendCustomerContent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _throwIfApiNotSupported("TelemetryService.sendCustomerContent", "Telemetry", "1.3", _hostName); + _invokeMethod(this, "SendCustomerContent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype.sendTelemetryEvent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _invokeMethod(this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + TelemetryService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.TelemetryService, context, "Microsoft.Telemetry.TelemetryService", false, 4); + }; + TelemetryService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService = TelemetryService; + var DataFieldType; + (function (DataFieldType) { + DataFieldType["unset"] = "Unset"; + DataFieldType["string"] = "String"; + DataFieldType["boolean"] = "Boolean"; + DataFieldType["int64"] = "Int64"; + DataFieldType["double"] = "Double"; + })(DataFieldType = OfficeCore.DataFieldType || (OfficeCore.DataFieldType = {})); + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes["generalException"] = "GeneralException"; + })(TelemetryErrorCodes = OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyAuth; +(function (OfficeFirstPartyAuth) { + var WebAuthReplyUrlsStorageKey = "officeWebAuthReplyUrls"; + var loaded = false; + OfficeFirstPartyAuth.authFlow = "authcode"; + OfficeFirstPartyAuth.autoPopup = false; + OfficeFirstPartyAuth.upnCheck = true; + OfficeFirstPartyAuth.msal = "https://alcdn.msauth.net/browser-1p/2.28.1/js/msal-browser-1p.min.js"; + OfficeFirstPartyAuth.debugging = false; + OfficeFirstPartyAuth.delay = 0; + OfficeFirstPartyAuth.delayMsal = 0; + function load(replyUrl, prefetch) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF.WebAuth && OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + var retrievedAuthContext = false; + try { + if (!Office || !Office.context || !Office.context.webAuth) { + reject({ + code: "GetAuthContextAsyncMissing", + message: "Office:[" + !Office + "],Office.context:[" + !Office.context + "],Office.context.webAuth:[" + !Office.context.webAuth + "]" + }); + return; + } + Office.context.webAuth.getAuthContextAsync(function (result) { + if (result.status === "succeeded") { + retrievedAuthContext = true; + var authContext = result.value; + if (!authContext || authContext.isAnonymous) { + reject({ + code: "CannotGetAuthContext", + message: authContext.Error + }); + return; + } + var isMsa = authContext.authorityType.toLowerCase() === 'msa'; + OSF.WebAuth.config = { + authFlow: OfficeFirstPartyAuth.authFlow, + authVersion: (OfficeFirstPartyAuth.authVersion) ? OfficeFirstPartyAuth.authVersion : null, + msal: OfficeFirstPartyAuth.msal, + delayWebAuth: OfficeFirstPartyAuth.delay, + delayMsal: OfficeFirstPartyAuth.delayMsal, + debugging: OfficeFirstPartyAuth.debugging, + authority: (OfficeFirstPartyAuth.authorityOverride) ? OfficeFirstPartyAuth.authorityOverride : authContext.authority, + idp: authContext.authorityType.toLowerCase(), + appIds: [isMsa ? (authContext.msaAppId) ? authContext.msaAppId : authContext.appId : authContext.appId], + redirectUri: (replyUrl) ? replyUrl : null, + upn: authContext.upn, + puid: authContext.userId, + prefetch: prefetch, + telemetryInstance: 'otel', + autoPopup: OfficeFirstPartyAuth.autoPopup, + enableUpnCheck: OfficeFirstPartyAuth.upnCheck, + enableConsoleLogging: OfficeFirstPartyAuth.debugging + }; + OSF.WebAuth.load().then(function (result) { + loaded = true; + logLoadEvent(result, loaded); + resolve(); + })["catch"](function (result) { + logLoadEvent(result, loaded); + reject({ + code: "PackageNotLoaded", + message: (result instanceof Event) ? result.type : result + }); + }); + if (OfficeFirstPartyAuth.authFlow === "implicit") { + var finalReplyUrl = (replyUrl) ? replyUrl : window.location.href.split("?")[0]; + var replyUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (replyUrls || replyUrls === "") { + replyUrls = finalReplyUrl; + } + else { + replyUrls += ", " + finalReplyUrl; + } + if (replyUrls) + sessionStorage.setItem(WebAuthReplyUrlsStorageKey, replyUrls); + } + } + else { + OSF.WebAuth.config = null; + reject({ + code: "CannotGetAuthContext", + message: result.status + }); + } + }); + } + catch (e) { + OSF.WebAuth.config = null; + OSF.WebAuth.load().then(function () { + resolve(); + })["catch"](function () { + reject({ + code: retrievedAuthContext ? "CannotGetAuthContext" : "FailedToLoad", + message: e + }); + }); + } + } + else { + resolve(); + } + }); + } + OfficeFirstPartyAuth.load = load; + function getAccessToken(options, behaviorOption) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + Office.context.webAuth.getAuthContextAsync(function (result) { + var supportsAuthToken = false; + if (result.status === "succeeded") { + var authContext = result.value; + if (authContext.supportsAuthToken) { + supportsAuthToken = true; + } + } + if (!supportsAuthToken) { + if (OSF.WebAuth && loaded) { + if (OSF.WebAuth.config.appIds[0]) { + OSF.WebAuth.getToken(options.resource, OSF.WebAuth.config.appIds[0], OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : null, (options && options.authChallenge) ? options.authChallenge : null).then(function (result) { + logAcquireEvent(result, true, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + resolve({ + accessToken: result.Token, + tokenIdenityType: (OSF.WebAuth.config.idp.toLowerCase() == "msa") + ? OfficeCore.IdentityType.microsoftAccount + : OfficeCore.IdentityType.organizationAccount + }); + })["catch"](function (result) { + logAcquireEvent(result, false, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + reject({ + code: result.ErrorCode, + message: (result instanceof Event) ? result.type : result.ErrorMessage + }); + }); + } + } + else { + logUnexpectedAcquire(loaded, OSF.WebAuth.loadAttempts); + } + } + else { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result_1 = auth.getAccessToken(options, null); + context.sync().then(function () { + resolve(result_1.value); + }); + } + }); + } + else { + var context_1 = new OfficeCore.RequestContext(); + var auth_1 = OfficeCore.AuthenticationService.newObject(context_1); + var handler_1 = auth_1.onTokenReceived.add(function (arg) { + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + handler_1.remove(); + context_1.sync()["catch"](function () { + }); + if (arg.code == 0) { + resolve(arg.tokenValue); + } + else { + if (OfficeExtension.CoreUtility.isNullOrUndefined(arg.errorInfo)) { + reject({ code: arg.code }); + } + else { + try { + reject(JSON.parse(arg.errorInfo)); + } + catch (e) { + reject({ code: arg.code, message: arg.errorInfo }); + } + } + } + } + return null; + }); + context_1.sync() + .then(function () { + var apiResult = auth_1.getAccessToken(options, auth_1._targetId); + return context_1.sync() + .then(function () { + if (OfficeExtension.CoreUtility.isNullOrUndefined(apiResult.value)) { + return null; + } + var tokenValue = apiResult.value.accessToken; + if (!OfficeExtension.CoreUtility.isNullOrUndefined(tokenValue)) { + resolve(apiResult.value); + } + }); + })["catch"](function (e) { + reject(e); + }); + } + }); + } + OfficeFirstPartyAuth.getAccessToken = getAccessToken; + function getPrimaryIdentityInfo() { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result = auth.getPrimaryIdentityInfo(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getPrimaryIdentityInfo = getPrimaryIdentityInfo; + function getIdentities() { + var context = new OfficeCore.RequestContext(); + var auth_service = OfficeCore.AuthenticationService.newObject(context); + var result = auth_service.getIdentities(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getIdentities = getIdentities; + function logLoadEvent(result, succeeded) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : "") + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'loadedApplicationCount': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + case 'timeToLoad': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.Load", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logAcquireEvent(result, succeeded, popup) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Popup', (typeof popup === "boolean") ? popup : false), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : result.ErrorCode), + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'timeToGetToken': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.GetAccessToken", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logUnexpectedAcquire(loadResult, loadAttempts) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeBooleanDataField('Loaded', loadResult), + oteljs.makeInt64DataField('LoadAttempts', (typeof loadAttempts === "number") ? loadAttempts : 0) + ]; + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.UnexpectedAcquire", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function loadWebAuthForReplyPage() { + try { + if (typeof (window) === "undefined" || !window.sessionStorage) { + return; + } + var webAuthRedirectUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (webAuthRedirectUrls !== null && webAuthRedirectUrls.indexOf(window.location.origin + window.location.pathname) !== -1) { + load(); + } + } + catch (ex) { + console.error(ex); + } + } + if (typeof (window) !== "undefined" && window.OSF) { + loadWebAuthForReplyPage(); + } +})(OfficeFirstPartyAuth || (OfficeFirstPartyAuth = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var IdentityType; + (function (IdentityType) { + IdentityType["organizationAccount"] = "OrganizationAccount"; + IdentityType["microsoftAccount"] = "MicrosoftAccount"; + IdentityType["unsupported"] = "Unsupported"; + })(IdentityType = OfficeCore.IdentityType || (OfficeCore.IdentityType = {})); + var _typeAuthenticationService = "AuthenticationService"; + var AuthenticationService = (function (_super) { + __extends(AuthenticationService, _super); + function AuthenticationService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AuthenticationService.prototype, "_className", { + get: function () { + return "AuthenticationService"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "_navigationPropertyNames", { + get: function () { + return ["roamingSettings"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "roamingSettings", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.RoamingSettingCollection, this, "RoamingSettings", false, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.getAccessToken = function (tokenParameters, targetId) { + return _invokeMethod(this, "GetAccessToken", 1, [tokenParameters, targetId], 4 | 1, 0); + }; + AuthenticationService.prototype.getIdentities = function () { + _throwIfApiNotSupported("AuthenticationService.getIdentities", "FirstPartyAuthentication", "1.3", _hostName); + return _invokeMethod(this, "GetIdentities", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.getPrimaryIdentityInfo = function () { + _throwIfApiNotSupported("AuthenticationService.getPrimaryIdentityInfo", "FirstPartyAuthentication", "1.2", _hostName); + return _invokeMethod(this, "GetPrimaryIdentityInfo", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.registerIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.registerIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "RegisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype.unregisterIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.unregisterIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "UnregisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["roamingSettings", "RoamingSettings"]); + }; + AuthenticationService.prototype.load = function (options) { + return _load(this, options); + }; + AuthenticationService.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + AuthenticationService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AuthenticationService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AuthenticationService, context, "Microsoft.Authentication.AuthenticationService", false, 4); + }; + Object.defineProperty(AuthenticationService.prototype, "onIdentityChanged", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onIdentityChanged", "FirstPartyAuthentication", "1.5", _hostName); + if (!this.m_identityChanged) { + this.m_identityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityChanged", { + eventType: 65545, + registerFunc: function () { return _this.registerIdentityChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterIdentityChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + email: value.email, + environment: value.environment, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "onTokenReceived", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onTokenReceived", "FirstPartyAuthentication", "1.2", _hostName); + if (!this.m_tokenReceived) { + this.m_tokenReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "TokenReceived", { + eventType: 3001, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return _this._targetId; }, + eventArgsTransformFunc: function (value) { + var event = _CC.AuthenticationService_TokenReceived_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_tokenReceived; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AuthenticationService; + }(OfficeExtension.ClientObject)); + OfficeCore.AuthenticationService = AuthenticationService; + var AuthenticationServiceCustom = (function () { + function AuthenticationServiceCustom() { + } + Object.defineProperty(AuthenticationServiceCustom.prototype, "_targetId", { + get: function () { + if (this.m_targetId == undefined) { + if (typeof (OSF) !== 'undefined' && OSF.OUtil) { + this.m_targetId = OSF.OUtil.Guid.generateNewGuid(); + } + else { + this.m_targetId = "" + this.context._nextId(); + } + } + return this.m_targetId; + }, + enumerable: true, + configurable: true + }); + return AuthenticationServiceCustom; + }()); + OfficeCore.AuthenticationServiceCustom = AuthenticationServiceCustom; + OfficeExtension.Utility.applyMixin(AuthenticationService, AuthenticationServiceCustom); + var _CC; + (function (_CC) { + function AuthenticationService_TokenReceived_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + tokenValue: value.tokenValue, + code: value.code, + errorInfo: value.errorInfo + }; + return newArgs; + } + _CC.AuthenticationService_TokenReceived_EventArgsTransform = AuthenticationService_TokenReceived_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeRoamingSetting = "RoamingSetting"; + var RoamingSetting = (function (_super) { + __extends(RoamingSetting, _super); + function RoamingSetting() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSetting.prototype, "_className", { + get: function () { + return "RoamingSetting"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRoamingSetting, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeRoamingSetting, this._isNull); + return this._V; + }, + set: function (value) { + this._V = value; + _invokeSetProperty(this, "Value", value, 0); + }, + enumerable: true, + configurable: true + }); + RoamingSetting.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["value"], [], []); + }; + RoamingSetting.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RoamingSetting.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + RoamingSetting.prototype.load = function (options) { + return _load(this, options); + }; + RoamingSetting.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RoamingSetting.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RoamingSetting.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSetting.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I, + "value": this._V + }, {}); + }; + RoamingSetting.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RoamingSetting.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RoamingSetting; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSetting = RoamingSetting; + var _typeRoamingSettingCollection = "RoamingSettingCollection"; + var RoamingSettingCollection = (function (_super) { + __extends(RoamingSettingCollection, _super); + function RoamingSettingCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSettingCollection.prototype, "_className", { + get: function () { + return "RoamingSettingCollection"; + }, + enumerable: true, + configurable: true + }); + RoamingSettingCollection.prototype.getItem = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItem", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype.getItemOrNullObject = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItemOrNullObject", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RoamingSettingCollection.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSettingCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RoamingSettingCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSettingCollection = RoamingSettingCollection; + var _typeBeforeDocumentCloseNotification = "BeforeDocumentCloseNotification"; + var BeforeDocumentCloseNotification = (function (_super) { + __extends(BeforeDocumentCloseNotification, _super); + function BeforeDocumentCloseNotification() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "_className", { + get: function () { + return "BeforeDocumentCloseNotification"; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.disable = function () { + _invokeMethod(this, "Disable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype.enable = function () { + _invokeMethod(this, "Enable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BeforeDocumentCloseNotification.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BeforeDocumentCloseNotification.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BeforeDocumentCloseNotification, context, "Microsoft.BeforeDocumentCloseNotification.BeforeDocumentCloseNotification", false, 4); + }; + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "onBeforeCloseNotificationCancelled", { + get: function () { + if (!this.m_beforeCloseNotificationCancelled) { + this.m_beforeCloseNotificationCancelled = new OfficeExtension.GenericEventHandlers(this.context, this, "BeforeCloseNotificationCancelled", { + eventType: 65540, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_beforeCloseNotificationCancelled; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BeforeDocumentCloseNotification; + }(OfficeExtension.ClientObject)); + OfficeCore.BeforeDocumentCloseNotification = BeforeDocumentCloseNotification; + var ServiceProvider; + (function (ServiceProvider) { + ServiceProvider["ariaBrowserPipeUrl"] = "AriaBrowserPipeUrl"; + ServiceProvider["ariaUploadUrl"] = "AriaUploadUrl"; + ServiceProvider["ariaVNextUploadUrl"] = "AriaVNextUploadUrl"; + ServiceProvider["lokiAutoDiscoverUrl"] = "LokiAutoDiscoverUrl"; + })(ServiceProvider = OfficeCore.ServiceProvider || (OfficeCore.ServiceProvider = {})); + var _typeServiceUrlProvider = "ServiceUrlProvider"; + var ServiceUrlProvider = (function (_super) { + __extends(ServiceUrlProvider, _super); + function ServiceUrlProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceUrlProvider.prototype, "_className", { + get: function () { + return "ServiceUrlProvider"; + }, + enumerable: true, + configurable: true + }); + ServiceUrlProvider.prototype.getServiceUrl = function (emailAddress, provider) { + return _invokeMethod(this, "GetServiceUrl", 1, [emailAddress, provider], 4, 0); + }; + ServiceUrlProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceUrlProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceUrlProvider.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceUrlProvider, context, "Microsoft.DesktopCompliance.ServiceUrlProvider", false, 4); + }; + ServiceUrlProvider.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceUrlProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceUrlProvider = ServiceUrlProvider; + var _typeLinkedIn = "LinkedIn"; + var LinkedIn = (function (_super) { + __extends(LinkedIn, _super); + function LinkedIn() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LinkedIn.prototype, "_className", { + get: function () { + return "LinkedIn"; + }, + enumerable: true, + configurable: true + }); + LinkedIn.prototype.isEnabledForOffice = function () { + return _invokeMethod(this, "IsEnabledForOffice", 1, [], 4, 0); + }; + LinkedIn.prototype.recordLinkedInSettingsCompliance = function (featureName, isEnabled) { + _invokeMethod(this, "RecordLinkedInSettingsCompliance", 0, [featureName, isEnabled], 0, 0); + }; + LinkedIn.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LinkedIn.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LinkedIn.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LinkedIn, context, "Microsoft.DesktopCompliance.LinkedIn", false, 4); + }; + LinkedIn.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LinkedIn; + }(OfficeExtension.ClientObject)); + OfficeCore.LinkedIn = LinkedIn; + var _typeNetworkUsage = "NetworkUsage"; + var NetworkUsage = (function (_super) { + __extends(NetworkUsage, _super); + function NetworkUsage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(NetworkUsage.prototype, "_className", { + get: function () { + return "NetworkUsage"; + }, + enumerable: true, + configurable: true + }); + NetworkUsage.prototype.isInDisconnectedMode = function () { + return _invokeMethod(this, "IsInDisconnectedMode", 1, [], 4, 0); + }; + NetworkUsage.prototype.isInOnlineMode = function () { + return _invokeMethod(this, "IsInOnlineMode", 1, [], 4, 0); + }; + NetworkUsage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + NetworkUsage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + NetworkUsage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.NetworkUsage, context, "Microsoft.DesktopCompliance.NetworkUsage", false, 4); + }; + NetworkUsage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return NetworkUsage; + }(OfficeExtension.ClientObject)); + OfficeCore.NetworkUsage = NetworkUsage; + var _typeDynamicRibbon = "DynamicRibbon"; + var DynamicRibbon = (function (_super) { + __extends(DynamicRibbon, _super); + function DynamicRibbon() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DynamicRibbon.prototype, "_className", { + get: function () { + return "DynamicRibbon"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "_navigationPropertyNames", { + get: function () { + return ["buttons"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "buttons", { + get: function () { + if (!this._B) { + this._B = _createPropertyObject(OfficeCore.RibbonButtonCollection, this, "Buttons", true, 4); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + DynamicRibbon.prototype.executeRequestCreate = function (jsonCreate) { + _throwIfApiNotSupported("DynamicRibbon.executeRequestCreate", "DynamicRibbon", "1.2", _hostName); + _invokeMethod(this, "ExecuteRequestCreate", 1, [jsonCreate], 4, 0); + }; + DynamicRibbon.prototype.executeRequestUpdate = function (jsonUpdate) { + _invokeMethod(this, "ExecuteRequestUpdate", 1, [jsonUpdate], 4, 0); + }; + DynamicRibbon.prototype.getButton = function (id) { + return _createMethodObject(OfficeCore.RibbonButton, this, "GetButton", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype.getTab = function (id) { + return _createMethodObject(OfficeCore.RibbonTab, this, "GetTab", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["buttons", "Buttons"]); + }; + DynamicRibbon.prototype.load = function (options) { + return _load(this, options); + }; + DynamicRibbon.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + DynamicRibbon.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DynamicRibbon.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DynamicRibbon, context, "Microsoft.DynamicRibbon.DynamicRibbon", false, 4); + }; + DynamicRibbon.prototype.toJSON = function () { + return _toJson(this, {}, { + "buttons": this._B + }); + }; + return DynamicRibbon; + }(OfficeExtension.ClientObject)); + OfficeCore.DynamicRibbon = DynamicRibbon; + var _typeRibbonTab = "RibbonTab"; + var RibbonTab = (function (_super) { + __extends(RibbonTab, _super); + function RibbonTab() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonTab.prototype, "_className", { + get: function () { + return "RibbonTab"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonTab, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + RibbonTab.prototype.setVisibility = function (visibility) { + _invokeMethod(this, "SetVisibility", 0, [visibility], 0, 0); + }; + RibbonTab.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + RibbonTab.prototype.load = function (options) { + return _load(this, options); + }; + RibbonTab.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonTab.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonTab.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonTab.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + RibbonTab.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonTab.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonTab; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonTab = RibbonTab; + var _typeRibbonButton = "RibbonButton"; + var RibbonButton = (function (_super) { + __extends(RibbonButton, _super); + function RibbonButton() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButton.prototype, "_className", { + get: function () { + return "RibbonButton"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "enabled", "label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Enabled", "Label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "enabled", { + get: function () { + _throwIfNotLoaded("enabled", this._E, _typeRibbonButton, this._isNull); + return this._E; + }, + set: function (value) { + this._E = value; + _invokeSetProperty(this, "Enabled", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonButton, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "label", { + get: function () { + _throwIfNotLoaded("label", this._L, _typeRibbonButton, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + RibbonButton.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["enabled"], [], []); + }; + RibbonButton.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RibbonButton.prototype.setEnabled = function (enabled) { + _invokeMethod(this, "SetEnabled", 0, [enabled], 0, 0); + }; + RibbonButton.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Enabled"])) { + this._E = obj["Enabled"]; + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Label"])) { + this._L = obj["Label"]; + } + }; + RibbonButton.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButton.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButton.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonButton.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonButton.prototype.toJSON = function () { + return _toJson(this, { + "enabled": this._E, + "id": this._I, + "label": this._L + }, {}); + }; + RibbonButton.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonButton.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonButton; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButton = RibbonButton; + var _typeRibbonButtonCollection = "RibbonButtonCollection"; + var RibbonButtonCollection = (function (_super) { + __extends(RibbonButtonCollection, _super); + function RibbonButtonCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButtonCollection.prototype, "_className", { + get: function () { + return "RibbonButtonCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeRibbonButtonCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + RibbonButtonCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + RibbonButtonCollection.prototype.getItem = function (key) { + return _createIndexerObject(OfficeCore.RibbonButton, this, [key]); + }; + RibbonButtonCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.RibbonButton, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + RibbonButtonCollection.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButtonCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButtonCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }); + }; + RibbonButtonCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + RibbonButtonCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return RibbonButtonCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButtonCollection = RibbonButtonCollection; + var _typeFirstPartyDialogService = "FirstPartyDialogService"; + var FirstPartyDialogService = (function (_super) { + __extends(FirstPartyDialogService, _super); + function FirstPartyDialogService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FirstPartyDialogService.prototype, "_className", { + get: function () { + return "FirstPartyDialogService"; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4 | 1, 0); + }; + FirstPartyDialogService.prototype.displayDialog = function (url, options) { + _invokeMethod(this, "DisplayDialog", 1, [url, options], 4 | 1, 0); + }; + FirstPartyDialogService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FirstPartyDialogService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FirstPartyDialogService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FirstPartyDialogService, context, "Microsoft.FirstPartyDialog.FirstPartyDialogService", false, 4); + }; + Object.defineProperty(FirstPartyDialogService.prototype, "onDialogMessage", { + get: function () { + var _this = this; + if (!this.m_dialogMessage) { + this.m_dialogMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "DialogMessage", { + eventType: 65536, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_dialogMessage; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FirstPartyDialogService; + }(OfficeExtension.ClientObject)); + OfficeCore.FirstPartyDialogService = FirstPartyDialogService; + (function (_CC) { + function FirstPartyDialogService_DialogMessage_EventArgsTransform(thisObj, args) { + return { + message: args.message + }; + } + _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform = FirstPartyDialogService_DialogMessage_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var TimeStringFormat; + (function (TimeStringFormat) { + TimeStringFormat["shortTime"] = "ShortTime"; + TimeStringFormat["longTime"] = "LongTime"; + TimeStringFormat["shortDate"] = "ShortDate"; + TimeStringFormat["longDate"] = "LongDate"; + })(TimeStringFormat = OfficeCore.TimeStringFormat || (OfficeCore.TimeStringFormat = {})); + var _typeLocaleApi = "LocaleApi"; + var LocaleApi = (function (_super) { + __extends(LocaleApi, _super); + function LocaleApi() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LocaleApi.prototype, "_className", { + get: function () { + return "LocaleApi"; + }, + enumerable: true, + configurable: true + }); + LocaleApi.prototype.formatDateTimeString = function (localeName, value, format) { + return _invokeMethod(this, "FormatDateTimeString", 1, [localeName, value, format], 4, 0); + }; + LocaleApi.prototype.getLocaleDateTimeFormattingInfo = function (localeName) { + return _invokeMethod(this, "GetLocaleDateTimeFormattingInfo", 1, [localeName], 4, 0); + }; + LocaleApi.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LocaleApi.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LocaleApi.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LocaleApi, context, "Microsoft.LocaleApi.LocaleApi", false, 4); + }; + LocaleApi.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LocaleApi; + }(OfficeExtension.ClientObject)); + OfficeCore.LocaleApi = LocaleApi; + var _typeComment = "Comment"; + var Comment = (function (_super) { + __extends(Comment, _super); + function Comment() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Comment.prototype, "_className", { + get: function () { + return "Comment"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "text", "created", "level", "resolved", "author", "mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Text", "Created", "Level", "Resolved", "Author", "Mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false, false, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_navigationPropertyNames", { + get: function () { + return ["parent", "parentOrNullObject", "replies"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parent", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.Comment, this, "Parent", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parentOrNullObject", { + get: function () { + if (!this._Pa) { + this._Pa = _createPropertyObject(OfficeCore.Comment, this, "ParentOrNullObject", false, 4); + } + return this._Pa; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "replies", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.CommentCollection, this, "Replies", true, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "author", { + get: function () { + _throwIfNotLoaded("author", this._A, _typeComment, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "created", { + get: function () { + _throwIfNotLoaded("created", this._C, _typeComment, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeComment, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "level", { + get: function () { + _throwIfNotLoaded("level", this._L, _typeComment, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "mentions", { + get: function () { + _throwIfNotLoaded("mentions", this._M, _typeComment, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "resolved", { + get: function () { + _throwIfNotLoaded("resolved", this._Re, _typeComment, this._isNull); + return this._Re; + }, + set: function (value) { + this._Re = value; + _invokeSetProperty(this, "Resolved", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeComment, this._isNull); + return this._T; + }, + set: function (value) { + this._T = value; + _invokeSetProperty(this, "Text", value, 0); + }, + enumerable: true, + configurable: true + }); + Comment.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["text", "resolved"], [], [ + "parent", + "parentOrNullObject", + "replies" + ]); + }; + Comment.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Comment.prototype["delete"] = function () { + _invokeMethod(this, "Delete", 0, [], 0, 0); + }; + Comment.prototype.getParentOrSelf = function () { + return _createMethodObject(OfficeCore.Comment, this, "GetParentOrSelf", 1, [], false, false, null, 4); + }; + Comment.prototype.getRichText = function (format) { + return _invokeMethod(this, "GetRichText", 1, [format], 4, 0); + }; + Comment.prototype.reply = function (text, format) { + return _createMethodObject(OfficeCore.Comment, this, "Reply", 0, [text, format], false, false, null, 0); + }; + Comment.prototype.setRichText = function (text, format) { + return _invokeMethod(this, "SetRichText", 0, [text, format], 0, 0); + }; + Comment.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Author"])) { + this._A = obj["Author"]; + } + if (!_isUndefined(obj["Created"])) { + this._C = _adjustToDateTime(obj["Created"]); + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Level"])) { + this._L = obj["Level"]; + } + if (!_isUndefined(obj["Mentions"])) { + this._M = obj["Mentions"]; + } + if (!_isUndefined(obj["Resolved"])) { + this._Re = obj["Resolved"]; + } + if (!_isUndefined(obj["Text"])) { + this._T = obj["Text"]; + } + _handleNavigationPropertyResults(this, obj, ["parent", "Parent", "parentOrNullObject", "ParentOrNullObject", "replies", "Replies"]); + }; + Comment.prototype.load = function (options) { + return _load(this, options); + }; + Comment.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Comment.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + Comment.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Created"])) { + obj["created"] = _adjustToDateTime(obj["created"]); + } + _processRetrieveResult(this, value, result); + }; + Comment.prototype.toJSON = function () { + return _toJson(this, { + "author": this._A, + "created": this._C, + "id": this._I, + "level": this._L, + "mentions": this._M, + "resolved": this._Re, + "text": this._T + }, { + "replies": this._R + }); + }; + Comment.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Comment.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Comment; + }(OfficeExtension.ClientObject)); + OfficeCore.Comment = Comment; + var _typeCommentCollection = "CommentCollection"; + var CommentCollection = (function (_super) { + __extends(CommentCollection, _super); + function CommentCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CommentCollection.prototype, "_className", { + get: function () { + return "CommentCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeCommentCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + CommentCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + CommentCollection.prototype.getItem = function (id) { + return _createIndexerObject(OfficeCore.Comment, this, [id]); + }; + CommentCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Comment, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + CommentCollection.prototype.load = function (options) { + return _load(this, options); + }; + CommentCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + CommentCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }); + }; + CommentCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + CommentCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return CommentCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.CommentCollection = CommentCollection; + var _typeExtensionLifeCycle = "ExtensionLifeCycle"; + var ExtensionLifeCycle = (function (_super) { + __extends(ExtensionLifeCycle, _super); + function ExtensionLifeCycle() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ExtensionLifeCycle.prototype, "_className", { + get: function () { + return "ExtensionLifeCycle"; + }, + enumerable: true, + configurable: true + }); + ExtensionLifeCycle.prototype.launchExtensionComponent = function (componentId, componentType, launchProperties) { + _invokeMethod(this, "LaunchExtensionComponent", 1, [componentId, componentType, launchProperties], 4 | 1, 0); + }; + ExtensionLifeCycle.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ExtensionLifeCycle.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ExtensionLifeCycle.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ExtensionLifeCycle, context, "Microsoft.OfficeSharedApi.ExtensionLifeCycle", false, 4); + }; + ExtensionLifeCycle.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ExtensionLifeCycle; + }(OfficeExtension.ClientObject)); + OfficeCore.ExtensionLifeCycle = ExtensionLifeCycle; + var CommentTextFormat; + (function (CommentTextFormat) { + CommentTextFormat["plain"] = "Plain"; + CommentTextFormat["markdown"] = "Markdown"; + CommentTextFormat["delta"] = "Delta"; + })(CommentTextFormat = OfficeCore.CommentTextFormat || (OfficeCore.CommentTextFormat = {})); + var PersonaCardPerfPoint; + (function (PersonaCardPerfPoint) { + PersonaCardPerfPoint["placeHolderRendered"] = "PlaceHolderRendered"; + PersonaCardPerfPoint["initialCardRendered"] = "InitialCardRendered"; + })(PersonaCardPerfPoint = OfficeCore.PersonaCardPerfPoint || (OfficeCore.PersonaCardPerfPoint = {})); + var UnifiedCommunicationAvailability; + (function (UnifiedCommunicationAvailability) { + UnifiedCommunicationAvailability["notSet"] = "NotSet"; + UnifiedCommunicationAvailability["free"] = "Free"; + UnifiedCommunicationAvailability["idle"] = "Idle"; + UnifiedCommunicationAvailability["busy"] = "Busy"; + UnifiedCommunicationAvailability["idleBusy"] = "IdleBusy"; + UnifiedCommunicationAvailability["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationAvailability["unalertable"] = "Unalertable"; + UnifiedCommunicationAvailability["unavailable"] = "Unavailable"; + })(UnifiedCommunicationAvailability = OfficeCore.UnifiedCommunicationAvailability || (OfficeCore.UnifiedCommunicationAvailability = {})); + var UnifiedCommunicationStatus; + (function (UnifiedCommunicationStatus) { + UnifiedCommunicationStatus["online"] = "Online"; + UnifiedCommunicationStatus["notOnline"] = "NotOnline"; + UnifiedCommunicationStatus["away"] = "Away"; + UnifiedCommunicationStatus["busy"] = "Busy"; + UnifiedCommunicationStatus["beRightBack"] = "BeRightBack"; + UnifiedCommunicationStatus["onThePhone"] = "OnThePhone"; + UnifiedCommunicationStatus["outToLunch"] = "OutToLunch"; + UnifiedCommunicationStatus["inAMeeting"] = "InAMeeting"; + UnifiedCommunicationStatus["outOfOffice"] = "OutOfOffice"; + UnifiedCommunicationStatus["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationStatus["inAConference"] = "InAConference"; + UnifiedCommunicationStatus["getting"] = "Getting"; + UnifiedCommunicationStatus["notABuddy"] = "NotABuddy"; + UnifiedCommunicationStatus["disconnected"] = "Disconnected"; + UnifiedCommunicationStatus["notInstalled"] = "NotInstalled"; + UnifiedCommunicationStatus["urgentInterruptionsOnly"] = "UrgentInterruptionsOnly"; + UnifiedCommunicationStatus["mayBeAvailable"] = "MayBeAvailable"; + UnifiedCommunicationStatus["idle"] = "Idle"; + UnifiedCommunicationStatus["inPresentation"] = "InPresentation"; + })(UnifiedCommunicationStatus = OfficeCore.UnifiedCommunicationStatus || (OfficeCore.UnifiedCommunicationStatus = {})); + var UnifiedCommunicationPresence; + (function (UnifiedCommunicationPresence) { + UnifiedCommunicationPresence["free"] = "Free"; + UnifiedCommunicationPresence["busy"] = "Busy"; + UnifiedCommunicationPresence["idle"] = "Idle"; + UnifiedCommunicationPresence["doNotDistrub"] = "DoNotDistrub"; + UnifiedCommunicationPresence["blocked"] = "Blocked"; + UnifiedCommunicationPresence["notSet"] = "NotSet"; + UnifiedCommunicationPresence["outOfOffice"] = "OutOfOffice"; + })(UnifiedCommunicationPresence = OfficeCore.UnifiedCommunicationPresence || (OfficeCore.UnifiedCommunicationPresence = {})); + var FreeBusyCalendarState; + (function (FreeBusyCalendarState) { + FreeBusyCalendarState["unknown"] = "Unknown"; + FreeBusyCalendarState["free"] = "Free"; + FreeBusyCalendarState["busy"] = "Busy"; + FreeBusyCalendarState["elsewhere"] = "Elsewhere"; + FreeBusyCalendarState["tentative"] = "Tentative"; + FreeBusyCalendarState["outOfOffice"] = "OutOfOffice"; + })(FreeBusyCalendarState = OfficeCore.FreeBusyCalendarState || (OfficeCore.FreeBusyCalendarState = {})); + var PersonaType; + (function (PersonaType) { + PersonaType["unknown"] = "Unknown"; + PersonaType["enterprise"] = "Enterprise"; + PersonaType["contact"] = "Contact"; + PersonaType["bot"] = "Bot"; + PersonaType["phoneOnly"] = "PhoneOnly"; + PersonaType["oneOff"] = "OneOff"; + PersonaType["distributionList"] = "DistributionList"; + PersonaType["personalDistributionList"] = "PersonalDistributionList"; + PersonaType["anonymous"] = "Anonymous"; + PersonaType["unifiedGroup"] = "UnifiedGroup"; + })(PersonaType = OfficeCore.PersonaType || (OfficeCore.PersonaType = {})); + var PhoneType; + (function (PhoneType) { + PhoneType["workPhone"] = "WorkPhone"; + PhoneType["homePhone"] = "HomePhone"; + PhoneType["mobilePhone"] = "MobilePhone"; + PhoneType["businessFax"] = "BusinessFax"; + PhoneType["otherPhone"] = "OtherPhone"; + })(PhoneType = OfficeCore.PhoneType || (OfficeCore.PhoneType = {})); + var AddressType; + (function (AddressType) { + AddressType["workAddress"] = "WorkAddress"; + AddressType["homeAddress"] = "HomeAddress"; + AddressType["otherAddress"] = "OtherAddress"; + })(AddressType = OfficeCore.AddressType || (OfficeCore.AddressType = {})); + var MemberType; + (function (MemberType) { + MemberType["unknown"] = "Unknown"; + MemberType["individual"] = "Individual"; + MemberType["group"] = "Group"; + })(MemberType = OfficeCore.MemberType || (OfficeCore.MemberType = {})); + var _typeMemberInfoList = "MemberInfoList"; + var MemberInfoList = (function (_super) { + __extends(MemberInfoList, _super); + function MemberInfoList() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MemberInfoList.prototype, "_className", { + get: function () { + return "MemberInfoList"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typeMemberInfoList, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typeMemberInfoList, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + MemberInfoList.prototype.getPersonaForMember = function (memberCookie) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForMember", 1, [memberCookie], false, false, null, 4); + }; + MemberInfoList.prototype.items = function () { + return _invokeMethod(this, "Items", 1, [], 4, 0); + }; + MemberInfoList.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + }; + MemberInfoList.prototype.load = function (options) { + return _load(this, options); + }; + MemberInfoList.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MemberInfoList.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MemberInfoList.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + MemberInfoList.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MemberInfoList.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MemberInfoList; + }(OfficeExtension.ClientObject)); + OfficeCore.MemberInfoList = MemberInfoList; + var PersonaDataUpdated; + (function (PersonaDataUpdated) { + PersonaDataUpdated["hostId"] = "HostId"; + PersonaDataUpdated["type"] = "Type"; + PersonaDataUpdated["photo"] = "Photo"; + PersonaDataUpdated["personaInfo"] = "PersonaInfo"; + PersonaDataUpdated["unifiedCommunicationInfo"] = "UnifiedCommunicationInfo"; + PersonaDataUpdated["organization"] = "Organization"; + PersonaDataUpdated["unifiedGroupInfo"] = "UnifiedGroupInfo"; + PersonaDataUpdated["members"] = "Members"; + PersonaDataUpdated["membership"] = "Membership"; + PersonaDataUpdated["capabilities"] = "Capabilities"; + PersonaDataUpdated["customizations"] = "Customizations"; + PersonaDataUpdated["viewableSources"] = "ViewableSources"; + PersonaDataUpdated["placeholder"] = "Placeholder"; + })(PersonaDataUpdated = OfficeCore.PersonaDataUpdated || (OfficeCore.PersonaDataUpdated = {})); + var _typePersonaActions = "PersonaActions"; + var PersonaActions = (function (_super) { + __extends(PersonaActions, _super); + function PersonaActions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaActions.prototype, "_className", { + get: function () { + return "PersonaActions"; + }, + enumerable: true, + configurable: true + }); + PersonaActions.prototype.addContact = function () { + _invokeMethod(this, "AddContact", 0, [], 0, 0); + }; + PersonaActions.prototype.callPhoneNumber = function (contactNumber) { + _invokeMethod(this, "CallPhoneNumber", 0, [contactNumber], 0, 0); + }; + PersonaActions.prototype.composeEmail = function (emailAddress) { + _invokeMethod(this, "ComposeEmail", 0, [emailAddress], 0, 0); + }; + PersonaActions.prototype.composeInstantMessage = function (sipAddress) { + _invokeMethod(this, "ComposeInstantMessage", 0, [sipAddress], 0, 0); + }; + PersonaActions.prototype.editContact = function () { + _invokeMethod(this, "EditContact", 0, [], 0, 0); + }; + PersonaActions.prototype.editContactByIdentifier = function (identifier) { + _invokeMethod(this, "EditContactByIdentifier", 0, [identifier], 0, 0); + }; + PersonaActions.prototype.editUnifiedGroup = function () { + _invokeMethod(this, "EditUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.getChangePhotoUrlAndOpenInBrowser = function () { + _invokeMethod(this, "GetChangePhotoUrlAndOpenInBrowser", 0, [], 0, 0); + }; + PersonaActions.prototype.hideHoverCardForPersona = function () { + _invokeMethod(this, "HideHoverCardForPersona", 0, [], 0, 0); + }; + PersonaActions.prototype.joinUnifiedGroup = function () { + _invokeMethod(this, "JoinUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.leaveUnifiedGroup = function () { + _invokeMethod(this, "LeaveUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.openGroupCalendar = function () { + _invokeMethod(this, "OpenGroupCalendar", 0, [], 0, 0); + }; + PersonaActions.prototype.openLinkContactUx = function () { + _invokeMethod(this, "OpenLinkContactUx", 0, [], 0, 0); + }; + PersonaActions.prototype.openOutlookProperties = function () { + _invokeMethod(this, "OpenOutlookProperties", 0, [], 0, 0); + }; + PersonaActions.prototype.pinPersonaToQuickContacts = function () { + _invokeMethod(this, "PinPersonaToQuickContacts", 0, [], 0, 0); + }; + PersonaActions.prototype.scheduleMeeting = function () { + _invokeMethod(this, "ScheduleMeeting", 0, [], 0, 0); + }; + PersonaActions.prototype.showContactCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContactCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showContextMenu = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContextMenu", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showExpandedCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowExpandedCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showHoverCardForPersona = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowHoverCardForPersona", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.startAudioCall = function () { + _invokeMethod(this, "StartAudioCall", 0, [], 0, 0); + }; + PersonaActions.prototype.startVideoCall = function () { + _invokeMethod(this, "StartVideoCall", 0, [], 0, 0); + }; + PersonaActions.prototype.subscribeToGroup = function () { + _invokeMethod(this, "SubscribeToGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.toggleTagForAlerts = function () { + _invokeMethod(this, "ToggleTagForAlerts", 0, [], 0, 0); + }; + PersonaActions.prototype.unsubscribeFromGroup = function () { + _invokeMethod(this, "UnsubscribeFromGroup", 0, [], 0, 0); + }; + PersonaActions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaActions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaActions.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaActions; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaActions = PersonaActions; + var _typePersonaInfoSource = "PersonaInfoSource"; + var PersonaInfoSource = (function (_super) { + __extends(PersonaInfoSource, _super); + function PersonaInfoSource() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfoSource.prototype, "_className", { + get: function () { + return "PersonaInfoSource"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "phones", "addresses", "webSites", "notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "Phones", "Addresses", "WebSites", "Notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "addresses", { + get: function () { + _throwIfNotLoaded("addresses", this._A, _typePersonaInfoSource, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfoSource, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfoSource, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfoSource, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfoSource, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfoSource, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfoSource, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfoSource, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfoSource, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfoSource, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfoSource, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfoSource, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfoSource, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfoSource, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "phones", { + get: function () { + _throwIfNotLoaded("phones", this._P, _typePersonaInfoSource, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfoSource, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfoSource, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfoSource, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfoSource.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Addresses"])) { + this._A = obj["Addresses"]; + } + if (!_isUndefined(obj["Birthday"])) { + this._B = obj["Birthday"]; + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = obj["Birthdays"]; + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["Phones"])) { + this._P = obj["Phones"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + }; + PersonaInfoSource.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfoSource.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfoSource.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaInfoSource.prototype.toJSON = function () { + return _toJson(this, { + "addresses": this._A, + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "phones": this._P, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, {}); + }; + PersonaInfoSource.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfoSource.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfoSource; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfoSource = PersonaInfoSource; + var _typePersonaInfo = "PersonaInfo"; + var PersonaInfo = (function (_super) { + __extends(PersonaInfo, _super); + function PersonaInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfo.prototype, "_className", { + get: function () { + return "PersonaInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "webSites", "notes", "isPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "WebSites", "Notes", "IsPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["sources"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sources", { + get: function () { + if (!this._So) { + this._So = _createPropertyObject(OfficeCore.PersonaInfoSource, this, "Sources", false, 4); + } + return this._So; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfo, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfo, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfo, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfo, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfo, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "isPersonResolved", { + get: function () { + _throwIfNotLoaded("isPersonResolved", this._I, _typePersonaInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfo, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfo, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfo, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfo, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfo, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfo, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfo, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfo.prototype.getAddresses = function () { + return _invokeMethod(this, "GetAddresses", 1, [], 4, 0); + }; + PersonaInfo.prototype.getPhones = function () { + return _invokeMethod(this, "GetPhones", 1, [], 4, 0); + }; + PersonaInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Birthday"])) { + this._B = _adjustToDateTime(obj["Birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = _adjustToDateTime(obj["Birthdays"]); + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["IsPersonResolved"])) { + this._I = obj["IsPersonResolved"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + _handleNavigationPropertyResults(this, obj, ["sources", "Sources"]); + }; + PersonaInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Birthday"])) { + obj["birthday"] = _adjustToDateTime(obj["birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + obj["birthdays"] = _adjustToDateTime(obj["birthdays"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaInfo.prototype.toJSON = function () { + return _toJson(this, { + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "isPersonResolved": this._I, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, { + "sources": this._So + }); + }; + PersonaInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfo = PersonaInfo; + var _typePersonaUnifiedCommunicationInfo = "PersonaUnifiedCommunicationInfo"; + var PersonaUnifiedCommunicationInfo = (function (_super) { + __extends(PersonaUnifiedCommunicationInfo, _super); + function PersonaUnifiedCommunicationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_className", { + get: function () { + return "PersonaUnifiedCommunicationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["availability", "status", "isSelf", "isTagged", "customStatusString", "isBlocked", "presenceTooltip", "isOutOfOffice", "outOfOfficeNote", "timezone", "meetingLocation", "meetingSubject", "timezoneBias", "idleStartTime", "overallCapability", "isOnBuddyList", "presenceNote", "voiceMailUri", "availabilityText", "availabilityTooltip", "isDurationInAvailabilityText", "freeBusyStatus", "calendarState", "presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Availability", "Status", "IsSelf", "IsTagged", "CustomStatusString", "IsBlocked", "PresenceTooltip", "IsOutOfOffice", "OutOfOfficeNote", "Timezone", "MeetingLocation", "MeetingSubject", "TimezoneBias", "IdleStartTime", "OverallCapability", "IsOnBuddyList", "PresenceNote", "VoiceMailUri", "AvailabilityText", "AvailabilityTooltip", "IsDurationInAvailabilityText", "FreeBusyStatus", "CalendarState", "Presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availability", { + get: function () { + _throwIfNotLoaded("availability", this._A, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityText", { + get: function () { + _throwIfNotLoaded("availabilityText", this._Av, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Av; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityTooltip", { + get: function () { + _throwIfNotLoaded("availabilityTooltip", this._Ava, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ava; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "calendarState", { + get: function () { + _throwIfNotLoaded("calendarState", this._C, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "customStatusString", { + get: function () { + _throwIfNotLoaded("customStatusString", this._Cu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Cu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "freeBusyStatus", { + get: function () { + _throwIfNotLoaded("freeBusyStatus", this._F, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "idleStartTime", { + get: function () { + _throwIfNotLoaded("idleStartTime", this._I, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isBlocked", { + get: function () { + _throwIfNotLoaded("isBlocked", this._Is, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isDurationInAvailabilityText", { + get: function () { + _throwIfNotLoaded("isDurationInAvailabilityText", this._IsD, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsD; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOnBuddyList", { + get: function () { + _throwIfNotLoaded("isOnBuddyList", this._IsO, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsO; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOutOfOffice", { + get: function () { + _throwIfNotLoaded("isOutOfOffice", this._IsOu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsOu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isSelf", { + get: function () { + _throwIfNotLoaded("isSelf", this._IsS, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsS; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isTagged", { + get: function () { + _throwIfNotLoaded("isTagged", this._IsT, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsT; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingLocation", { + get: function () { + _throwIfNotLoaded("meetingLocation", this._M, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingSubject", { + get: function () { + _throwIfNotLoaded("meetingSubject", this._Me, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Me; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "outOfOfficeNote", { + get: function () { + _throwIfNotLoaded("outOfOfficeNote", this._O, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "overallCapability", { + get: function () { + _throwIfNotLoaded("overallCapability", this._Ov, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ov; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presence", { + get: function () { + _throwIfNotLoaded("presence", this._P, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceNote", { + get: function () { + _throwIfNotLoaded("presenceNote", this._Pr, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pr; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceTooltip", { + get: function () { + _throwIfNotLoaded("presenceTooltip", this._Pre, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pre; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "status", { + get: function () { + _throwIfNotLoaded("status", this._S, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezone", { + get: function () { + _throwIfNotLoaded("timezone", this._T, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezoneBias", { + get: function () { + _throwIfNotLoaded("timezoneBias", this._Ti, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ti; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "voiceMailUri", { + get: function () { + _throwIfNotLoaded("voiceMailUri", this._V, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + PersonaUnifiedCommunicationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Availability"])) { + this._A = obj["Availability"]; + } + if (!_isUndefined(obj["AvailabilityText"])) { + this._Av = obj["AvailabilityText"]; + } + if (!_isUndefined(obj["AvailabilityTooltip"])) { + this._Ava = obj["AvailabilityTooltip"]; + } + if (!_isUndefined(obj["CalendarState"])) { + this._C = obj["CalendarState"]; + } + if (!_isUndefined(obj["CustomStatusString"])) { + this._Cu = obj["CustomStatusString"]; + } + if (!_isUndefined(obj["FreeBusyStatus"])) { + this._F = obj["FreeBusyStatus"]; + } + if (!_isUndefined(obj["IdleStartTime"])) { + this._I = _adjustToDateTime(obj["IdleStartTime"]); + } + if (!_isUndefined(obj["IsBlocked"])) { + this._Is = obj["IsBlocked"]; + } + if (!_isUndefined(obj["IsDurationInAvailabilityText"])) { + this._IsD = obj["IsDurationInAvailabilityText"]; + } + if (!_isUndefined(obj["IsOnBuddyList"])) { + this._IsO = obj["IsOnBuddyList"]; + } + if (!_isUndefined(obj["IsOutOfOffice"])) { + this._IsOu = obj["IsOutOfOffice"]; + } + if (!_isUndefined(obj["IsSelf"])) { + this._IsS = obj["IsSelf"]; + } + if (!_isUndefined(obj["IsTagged"])) { + this._IsT = obj["IsTagged"]; + } + if (!_isUndefined(obj["MeetingLocation"])) { + this._M = obj["MeetingLocation"]; + } + if (!_isUndefined(obj["MeetingSubject"])) { + this._Me = obj["MeetingSubject"]; + } + if (!_isUndefined(obj["OutOfOfficeNote"])) { + this._O = obj["OutOfOfficeNote"]; + } + if (!_isUndefined(obj["OverallCapability"])) { + this._Ov = obj["OverallCapability"]; + } + if (!_isUndefined(obj["Presence"])) { + this._P = obj["Presence"]; + } + if (!_isUndefined(obj["PresenceNote"])) { + this._Pr = obj["PresenceNote"]; + } + if (!_isUndefined(obj["PresenceTooltip"])) { + this._Pre = obj["PresenceTooltip"]; + } + if (!_isUndefined(obj["Status"])) { + this._S = obj["Status"]; + } + if (!_isUndefined(obj["Timezone"])) { + this._T = obj["Timezone"]; + } + if (!_isUndefined(obj["TimezoneBias"])) { + this._Ti = obj["TimezoneBias"]; + } + if (!_isUndefined(obj["VoiceMailUri"])) { + this._V = obj["VoiceMailUri"]; + } + }; + PersonaUnifiedCommunicationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaUnifiedCommunicationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaUnifiedCommunicationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["IdleStartTime"])) { + obj["idleStartTime"] = _adjustToDateTime(obj["idleStartTime"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaUnifiedCommunicationInfo.prototype.toJSON = function () { + return _toJson(this, { + "availability": this._A, + "availabilityText": this._Av, + "availabilityTooltip": this._Ava, + "calendarState": this._C, + "customStatusString": this._Cu, + "freeBusyStatus": this._F, + "idleStartTime": this._I, + "isBlocked": this._Is, + "isDurationInAvailabilityText": this._IsD, + "isOnBuddyList": this._IsO, + "isOutOfOffice": this._IsOu, + "isSelf": this._IsS, + "isTagged": this._IsT, + "meetingLocation": this._M, + "meetingSubject": this._Me, + "outOfOfficeNote": this._O, + "overallCapability": this._Ov, + "presence": this._P, + "presenceNote": this._Pr, + "presenceTooltip": this._Pre, + "status": this._S, + "timezone": this._T, + "timezoneBias": this._Ti, + "voiceMailUri": this._V + }, {}); + }; + PersonaUnifiedCommunicationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaUnifiedCommunicationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaUnifiedCommunicationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaUnifiedCommunicationInfo = PersonaUnifiedCommunicationInfo; + var _typePersonaPhotoInfo = "PersonaPhotoInfo"; + var PersonaPhotoInfo = (function (_super) { + __extends(PersonaPhotoInfo, _super); + function PersonaPhotoInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaPhotoInfo.prototype, "_className", { + get: function () { + return "PersonaPhotoInfo"; + }, + enumerable: true, + configurable: true + }); + PersonaPhotoInfo.prototype.getImageUri = function (uriScheme) { + return _invokeMethod(this, "getImageUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getImageUriWithMetadata = function (uriScheme) { + return _invokeMethod(this, "getImageUriWithMetadata", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getPlaceholderUri = function (uriScheme) { + return _invokeMethod(this, "getPlaceholderUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.setPlaceholderColor = function (color) { + _invokeMethod(this, "setPlaceholderColor", 0, [color], 0, 0); + }; + PersonaPhotoInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaPhotoInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaPhotoInfo.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaPhotoInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaPhotoInfo = PersonaPhotoInfo; + var _typePersonaCollection = "PersonaCollection"; + var PersonaCollection = (function (_super) { + __extends(PersonaCollection, _super); + function PersonaCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaCollection.prototype, "_className", { + get: function () { + return "PersonaCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typePersonaCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + PersonaCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + PersonaCollection.prototype.getItem = function (index) { + return _createIndexerObject(OfficeCore.Persona, this, [index]); + }; + PersonaCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Persona, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + PersonaCollection.prototype.load = function (options) { + return _load(this, options); + }; + PersonaCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }); + }; + PersonaCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + PersonaCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return PersonaCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaCollection = PersonaCollection; + var _typePersonaOrganizationInfo = "PersonaOrganizationInfo"; + var PersonaOrganizationInfo = (function (_super) { + __extends(PersonaOrganizationInfo, _super); + function PersonaOrganizationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaOrganizationInfo.prototype, "_className", { + get: function () { + return "PersonaOrganizationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["hierarchy", "manager", "directReports"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "directReports", { + get: function () { + if (!this._D) { + this._D = _createPropertyObject(OfficeCore.PersonaCollection, this, "DirectReports", true, 4); + } + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "hierarchy", { + get: function () { + if (!this._H) { + this._H = _createPropertyObject(OfficeCore.PersonaCollection, this, "Hierarchy", true, 4); + } + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "manager", { + get: function () { + if (!this._M) { + this._M = _createPropertyObject(OfficeCore.Persona, this, "Manager", false, 4); + } + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typePersonaOrganizationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typePersonaOrganizationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + PersonaOrganizationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + _handleNavigationPropertyResults(this, obj, ["directReports", "DirectReports", "hierarchy", "Hierarchy", "manager", "Manager"]); + }; + PersonaOrganizationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaOrganizationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaOrganizationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaOrganizationInfo.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + PersonaOrganizationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaOrganizationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaOrganizationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaOrganizationInfo = PersonaOrganizationInfo; + var CustomizedData; + (function (CustomizedData) { + CustomizedData["email"] = "Email"; + CustomizedData["workPhone"] = "WorkPhone"; + CustomizedData["workPhone2"] = "WorkPhone2"; + CustomizedData["workFax"] = "WorkFax"; + CustomizedData["mobilePhone"] = "MobilePhone"; + CustomizedData["homePhone"] = "HomePhone"; + CustomizedData["homePhone2"] = "HomePhone2"; + CustomizedData["otherPhone"] = "OtherPhone"; + CustomizedData["sipAddress"] = "SipAddress"; + CustomizedData["profile"] = "Profile"; + CustomizedData["office"] = "Office"; + CustomizedData["company"] = "Company"; + CustomizedData["workAddress"] = "WorkAddress"; + CustomizedData["homeAddress"] = "HomeAddress"; + CustomizedData["otherAddress"] = "OtherAddress"; + CustomizedData["birthday"] = "Birthday"; + })(CustomizedData = OfficeCore.CustomizedData || (OfficeCore.CustomizedData = {})); + var _typeUnifiedGroupInfo = "UnifiedGroupInfo"; + var UnifiedGroupInfo = (function (_super) { + __extends(UnifiedGroupInfo, _super); + function UnifiedGroupInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UnifiedGroupInfo.prototype, "_className", { + get: function () { + return "UnifiedGroupInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Description", "OneDrive", "OneNote", "IsPublic", "AmIOwner", "AmIMember", "AmISubscribed", "MemberCount", "OwnerCount", "HasGuests", "Site", "Planner", "Classification", "SubscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIMember", { + get: function () { + _throwIfNotLoaded("amIMember", this._A, _typeUnifiedGroupInfo, this._isNull); + return this._A; + }, + set: function (value) { + this._A = value; + _invokeSetProperty(this, "AmIMember", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIOwner", { + get: function () { + _throwIfNotLoaded("amIOwner", this._Am, _typeUnifiedGroupInfo, this._isNull); + return this._Am; + }, + set: function (value) { + this._Am = value; + _invokeSetProperty(this, "AmIOwner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amISubscribed", { + get: function () { + _throwIfNotLoaded("amISubscribed", this._AmI, _typeUnifiedGroupInfo, this._isNull); + return this._AmI; + }, + set: function (value) { + this._AmI = value; + _invokeSetProperty(this, "AmISubscribed", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "classification", { + get: function () { + _throwIfNotLoaded("classification", this._C, _typeUnifiedGroupInfo, this._isNull); + return this._C; + }, + set: function (value) { + this._C = value; + _invokeSetProperty(this, "Classification", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "description", { + get: function () { + _throwIfNotLoaded("description", this._D, _typeUnifiedGroupInfo, this._isNull); + return this._D; + }, + set: function (value) { + this._D = value; + _invokeSetProperty(this, "Description", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "hasGuests", { + get: function () { + _throwIfNotLoaded("hasGuests", this._H, _typeUnifiedGroupInfo, this._isNull); + return this._H; + }, + set: function (value) { + this._H = value; + _invokeSetProperty(this, "HasGuests", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "isPublic", { + get: function () { + _throwIfNotLoaded("isPublic", this._I, _typeUnifiedGroupInfo, this._isNull); + return this._I; + }, + set: function (value) { + this._I = value; + _invokeSetProperty(this, "IsPublic", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "memberCount", { + get: function () { + _throwIfNotLoaded("memberCount", this._M, _typeUnifiedGroupInfo, this._isNull); + return this._M; + }, + set: function (value) { + this._M = value; + _invokeSetProperty(this, "MemberCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneDrive", { + get: function () { + _throwIfNotLoaded("oneDrive", this._O, _typeUnifiedGroupInfo, this._isNull); + return this._O; + }, + set: function (value) { + this._O = value; + _invokeSetProperty(this, "OneDrive", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneNote", { + get: function () { + _throwIfNotLoaded("oneNote", this._On, _typeUnifiedGroupInfo, this._isNull); + return this._On; + }, + set: function (value) { + this._On = value; + _invokeSetProperty(this, "OneNote", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "ownerCount", { + get: function () { + _throwIfNotLoaded("ownerCount", this._Ow, _typeUnifiedGroupInfo, this._isNull); + return this._Ow; + }, + set: function (value) { + this._Ow = value; + _invokeSetProperty(this, "OwnerCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "planner", { + get: function () { + _throwIfNotLoaded("planner", this._P, _typeUnifiedGroupInfo, this._isNull); + return this._P; + }, + set: function (value) { + this._P = value; + _invokeSetProperty(this, "Planner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "site", { + get: function () { + _throwIfNotLoaded("site", this._S, _typeUnifiedGroupInfo, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Site", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "subscriptionEnabled", { + get: function () { + _throwIfNotLoaded("subscriptionEnabled", this._Su, _typeUnifiedGroupInfo, this._isNull); + return this._Su; + }, + set: function (value) { + this._Su = value; + _invokeSetProperty(this, "SubscriptionEnabled", value, 0); + }, + enumerable: true, + configurable: true + }); + UnifiedGroupInfo.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"], [], []); + }; + UnifiedGroupInfo.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + UnifiedGroupInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["AmIMember"])) { + this._A = obj["AmIMember"]; + } + if (!_isUndefined(obj["AmIOwner"])) { + this._Am = obj["AmIOwner"]; + } + if (!_isUndefined(obj["AmISubscribed"])) { + this._AmI = obj["AmISubscribed"]; + } + if (!_isUndefined(obj["Classification"])) { + this._C = obj["Classification"]; + } + if (!_isUndefined(obj["Description"])) { + this._D = obj["Description"]; + } + if (!_isUndefined(obj["HasGuests"])) { + this._H = obj["HasGuests"]; + } + if (!_isUndefined(obj["IsPublic"])) { + this._I = obj["IsPublic"]; + } + if (!_isUndefined(obj["MemberCount"])) { + this._M = obj["MemberCount"]; + } + if (!_isUndefined(obj["OneDrive"])) { + this._O = obj["OneDrive"]; + } + if (!_isUndefined(obj["OneNote"])) { + this._On = obj["OneNote"]; + } + if (!_isUndefined(obj["OwnerCount"])) { + this._Ow = obj["OwnerCount"]; + } + if (!_isUndefined(obj["Planner"])) { + this._P = obj["Planner"]; + } + if (!_isUndefined(obj["Site"])) { + this._S = obj["Site"]; + } + if (!_isUndefined(obj["SubscriptionEnabled"])) { + this._Su = obj["SubscriptionEnabled"]; + } + }; + UnifiedGroupInfo.prototype.load = function (options) { + return _load(this, options); + }; + UnifiedGroupInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + UnifiedGroupInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UnifiedGroupInfo.prototype.toJSON = function () { + return _toJson(this, { + "amIMember": this._A, + "amIOwner": this._Am, + "amISubscribed": this._AmI, + "classification": this._C, + "description": this._D, + "hasGuests": this._H, + "isPublic": this._I, + "memberCount": this._M, + "oneDrive": this._O, + "oneNote": this._On, + "ownerCount": this._Ow, + "planner": this._P, + "site": this._S, + "subscriptionEnabled": this._Su + }, {}); + }; + UnifiedGroupInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + UnifiedGroupInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return UnifiedGroupInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.UnifiedGroupInfo = UnifiedGroupInfo; + var _typePersona = "Persona"; + var PersonaPromiseType; + (function (PersonaPromiseType) { + PersonaPromiseType[PersonaPromiseType["immediate"] = 0] = "immediate"; + PersonaPromiseType[PersonaPromiseType["load"] = 3] = "load"; + })(PersonaPromiseType = OfficeCore.PersonaPromiseType || (OfficeCore.PersonaPromiseType = {})); + var PersonaInfoAndSource = (function () { + function PersonaInfoAndSource() { + } + return PersonaInfoAndSource; + }()); + OfficeCore.PersonaInfoAndSource = PersonaInfoAndSource; + ; + var Persona = (function (_super) { + __extends(Persona, _super); + function Persona() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Persona.prototype, "_className", { + get: function () { + return "Persona"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyNames", { + get: function () { + return ["hostId", "type", "capabilities", "diagnosticId", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["HostId", "Type", "Capabilities", "DiagnosticId", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_navigationPropertyNames", { + get: function () { + return ["photo", "personaInfo", "unifiedCommunicationInfo", "organization", "unifiedGroupInfo", "actions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "actions", { + get: function () { + if (!this._A) { + this._A = _createPropertyObject(OfficeCore.PersonaActions, this, "Actions", false, 4); + } + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "organization", { + get: function () { + if (!this._O) { + this._O = _createPropertyObject(OfficeCore.PersonaOrganizationInfo, this, "Organization", false, 4); + } + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "personaInfo", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.PersonaInfo, this, "PersonaInfo", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "photo", { + get: function () { + if (!this._Ph) { + this._Ph = _createPropertyObject(OfficeCore.PersonaPhotoInfo, this, "Photo", false, 4); + } + return this._Ph; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedCommunicationInfo", { + get: function () { + if (!this._U) { + this._U = _createPropertyObject(OfficeCore.PersonaUnifiedCommunicationInfo, this, "UnifiedCommunicationInfo", false, 4); + } + return this._U; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedGroupInfo", { + get: function () { + if (!this._Un) { + this._Un = _createPropertyObject(OfficeCore.UnifiedGroupInfo, this, "UnifiedGroupInfo", false, 4); + } + return this._Un; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "capabilities", { + get: function () { + _throwIfNotLoaded("capabilities", this._C, _typePersona, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "diagnosticId", { + get: function () { + _throwIfNotLoaded("diagnosticId", this._D, _typePersona, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "hostId", { + get: function () { + _throwIfNotLoaded("hostId", this._H, _typePersona, this._isNull); + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersona, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typePersona, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Persona.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, [], ["unifiedGroupInfo"], [ + "actions", + "organization", + "personaInfo", + "photo", + "unifiedCommunicationInfo" + ]); + }; + Persona.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Persona.prototype.dispose = function () { + _invokeMethod(this, "Dispose", 0, [], 0, 0); + }; + Persona.prototype.getCustomizations = function () { + return _invokeMethod(this, "GetCustomizations", 1, [], 4, 0); + }; + Persona.prototype.getMembers = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembers", 1, [], false, false, null, 4); + }; + Persona.prototype.getMembership = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembership", 1, [], false, false, null, 4); + }; + Persona.prototype.getViewableSources = function () { + return _invokeMethod(this, "GetViewableSources", 1, [], 4, 0); + }; + Persona.prototype.reportTimeForRender = function (perfpoint, millisecUTC) { + _invokeMethod(this, "ReportTimeForRender", 0, [perfpoint, millisecUTC], 0, 0); + }; + Persona.prototype.warmup = function (dataToWarmUp) { + _invokeMethod(this, "Warmup", 0, [dataToWarmUp], 0, 0); + }; + Persona.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Capabilities"])) { + this._C = obj["Capabilities"]; + } + if (!_isUndefined(obj["DiagnosticId"])) { + this._D = obj["DiagnosticId"]; + } + if (!_isUndefined(obj["HostId"])) { + this._H = obj["HostId"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + if (!_isUndefined(obj["Type"])) { + this._T = obj["Type"]; + } + _handleNavigationPropertyResults(this, obj, ["actions", "Actions", "organization", "Organization", "personaInfo", "PersonaInfo", "photo", "Photo", "unifiedCommunicationInfo", "UnifiedCommunicationInfo", "unifiedGroupInfo", "UnifiedGroupInfo"]); + }; + Persona.prototype.load = function (options) { + return _load(this, options); + }; + Persona.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Persona.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Persona.prototype.toJSON = function () { + return _toJson(this, { + "capabilities": this._C, + "diagnosticId": this._D, + "hostId": this._H, + "instanceId": this._I, + "type": this._T + }, { + "organization": this._O, + "personaInfo": this._P, + "unifiedCommunicationInfo": this._U, + "unifiedGroupInfo": this._Un + }); + }; + Persona.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Persona.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Persona; + }(OfficeExtension.ClientObject)); + OfficeCore.Persona = Persona; + var PersonaCustom = (function () { + function PersonaCustom() { + } + PersonaCustom.prototype.performAsyncOperation = function (type, waitFor, action, check) { + var _this = this; + if (type == PersonaPromiseType.immediate) { + action(); + return; + } + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + } + else { + var persona = _this; + persona.load("hostId"); + persona.context.sync().then(function () { + var hostId = persona.hostId; + _this.getPersonaLifetime().then(function (personaLifetime) { + var eventHandler = function (args) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (args.sendingPersonaHostId == hostId) { + for (var index = 0; index < args.dataUpdated.length; ++index) { + var updated = args.dataUpdated[index]; + if (waitFor == updated) { + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + personaLifetime.onPersonaUpdated.remove(eventHandler); + persona.context.sync(); + } + resolve(isWarmedUp); + }); + return; + } + } + } + resolve(false); + }); + }; + personaLifetime.onPersonaUpdated.add(eventHandler); + persona.context.sync(); + }); + }); + } + }); + }; + PersonaCustom.prototype.getOrganizationAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var organization = persona.organization; + organization.load("*"); + persona.context.sync().then(function () { + resolve(organization); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var organization = persona.organization; + organization.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(organization.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.organization, action, check); + }); + }; + PersonaCustom.prototype.getIsPersonaInfoResolvedCheck = function () { + var persona = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var info = persona.personaInfo; + info.load("isPersonResolved"); + persona.context.sync().then(function () { + resolve(info.isPersonResolved); + }); + }); + }; + PersonaCustom.prototype.getPersonaInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var info = persona.personaInfo; + info.load(); + persona.context.sync().then(function () { + resolve(info); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getPersonaInfoWithSourceAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var result = new PersonaInfoAndSource(); + result.info = persona.personaInfo; + result.info.load(); + result.source = persona.personaInfo.sources; + result.source.load(); + persona.context.sync().then(function () { + resolve(result); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedCommunicationInfo = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var ucInfo = persona.unifiedCommunicationInfo; + ucInfo.load("*"); + persona.context.sync().then(function () { + resolve(ucInfo); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedGroupInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var group = persona.unifiedGroupInfo; + group.load("*"); + persona.context.sync().then(function () { + resolve(group); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getTypeAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + persona.load("type"); + persona.context.sync().then(function () { + resolve(OfficeCore.PersonaType[persona.type.valueOf()]); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getCustomizationsAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var customizations = persona.getCustomizations(); + persona.context.sync().then(function () { + resolve(customizations.value); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getMembersAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, rejcet) { + var persona = _this; + var action = function () { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + resolve(members); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(members.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.members, action, check); + }); + }; + PersonaCustom.prototype.getMembershipAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var membership = persona.getMembership(); + membership.load("*"); + persona.context.sync().then(function () { + resolve(membership); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve) { + var membership = persona.getMembership(); + membership.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(membership.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.membership, action, check); + }); + }; + PersonaCustom.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + persona.load("instanceId"); + persona.context.sync().then(function () { + var peopleApi = new PeopleApiContext(persona.context, persona.instanceId); + peopleApi.getPersonaLifetime().then(function (lifetime) { + resolve(lifetime); + }); + }); + }); + }; + return PersonaCustom; + }()); + OfficeCore.PersonaCustom = PersonaCustom; + OfficeExtension.Utility.applyMixin(Persona, PersonaCustom); + var _typePersonaLifetime = "PersonaLifetime"; + var PersonaLifetime = (function (_super) { + __extends(PersonaLifetime, _super); + function PersonaLifetime() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaLifetime.prototype, "_className", { + get: function () { + return "PersonaLifetime"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyNames", { + get: function () { + return ["instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersonaLifetime, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.getPersona = function (hostId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersona", 1, [hostId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgByEntryId = function (entryId, name, sip, smtp) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgByEntryId", 1, [entryId, name, sip, smtp], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgEntry = function (name, sip, smtp, entryId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgEntry", 1, [name, sip, smtp, entryId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPolicies = function () { + return _invokeMethod(this, "GetPolicies", 1, [], 4, 0); + }; + PersonaLifetime.prototype.getTextScaleFactor = function () { + return _invokeMethod(this, "GetTextScaleFactor", 1, [], 4, 0); + }; + PersonaLifetime.prototype._RegisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_RegisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._UnregisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_UnregisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + PersonaLifetime.prototype.load = function (options) { + return _load(this, options); + }; + PersonaLifetime.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaLifetime.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(PersonaLifetime.prototype, "onPersonaUpdated", { + get: function () { + var _this = this; + if (!this.m_personaUpdated) { + this.m_personaUpdated = new OfficeExtension.GenericEventHandlers(this.context, this, "PersonaUpdated", { + eventType: 3502, + registerFunc: function () { return _this._RegisterPersonaUpdatedEvent(); }, + unregisterFunc: function () { return _this._UnregisterPersonaUpdatedEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + dataUpdated: value.dataUpdated, + sendingPersonaHostId: value.sendingPersonaHostId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_personaUpdated; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.toJSON = function () { + return _toJson(this, { + "instanceId": this._I + }, {}); + }; + PersonaLifetime.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaLifetime.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaLifetime; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaLifetime = PersonaLifetime; + var _typeLokiTokenProvider = "LokiTokenProvider"; + var LokiTokenProvider = (function (_super) { + __extends(LokiTokenProvider, _super); + function LokiTokenProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProvider.prototype, "_className", { + get: function () { + return "LokiTokenProvider"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyNames", { + get: function () { + return ["emailOrUpn", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["EmailOrUpn", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "emailOrUpn", { + get: function () { + _throwIfNotLoaded("emailOrUpn", this._E, _typeLokiTokenProvider, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typeLokiTokenProvider, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.requestClientAccessToken = function () { + _invokeMethod(this, "RequestClientAccessToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestIdentityUniqueId = function () { + _invokeMethod(this, "RequestIdentityUniqueId", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestToken = function () { + _invokeMethod(this, "RequestToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_RegisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_UnregisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["EmailOrUpn"])) { + this._E = obj["EmailOrUpn"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + LokiTokenProvider.prototype.load = function (options) { + return _load(this, options); + }; + LokiTokenProvider.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LokiTokenProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LokiTokenProvider.prototype, "onClientAccessTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_clientAccessTokenAvailable) { + this.m_clientAccessTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "ClientAccessTokenAvailable", { + eventType: 3505, + registerFunc: function () { return _this._RegisterClientAccessTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterClientAccessTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + clientAccessToken: value.clientAccessToken, + isAvailable: value.isAvailable, + tokenTTLInSeconds: value.tokenTTLInSeconds + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_clientAccessTokenAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onIdentityUniqueIdAvailable", { + get: function () { + var _this = this; + if (!this.m_identityUniqueIdAvailable) { + this.m_identityUniqueIdAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityUniqueIdAvailable", { + eventType: 3504, + registerFunc: function () { return _this._RegisterIdentityUniqueIdAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterIdentityUniqueIdAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityUniqueIdAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onLokiTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_lokiTokenAvailable) { + this.m_lokiTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "LokiTokenAvailable", { + eventType: 3503, + registerFunc: function () { return _this._RegisterLokiTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterLokiTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + lokiAutoDiscoverUrl: value.lokiAutoDiscoverUrl, + lokiToken: value.lokiToken + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_lokiTokenAvailable; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.toJSON = function () { + return _toJson(this, { + "emailOrUpn": this._E, + "instanceId": this._I + }, {}); + }; + LokiTokenProvider.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LokiTokenProvider.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LokiTokenProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProvider = LokiTokenProvider; + var _typeLokiTokenProviderFactory = "LokiTokenProviderFactory"; + var LokiTokenProviderFactory = (function (_super) { + __extends(LokiTokenProviderFactory, _super); + function LokiTokenProviderFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProviderFactory.prototype, "_className", { + get: function () { + return "LokiTokenProviderFactory"; + }, + enumerable: true, + configurable: true + }); + LokiTokenProviderFactory.prototype.getLokiTokenProvider = function (accountName) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [accountName], false, false, null, 4); + }; + LokiTokenProviderFactory.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LokiTokenProviderFactory.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LokiTokenProviderFactory.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LokiTokenProviderFactory, context, "Microsoft.People.LokiTokenProviderFactory", false, 4); + }; + LokiTokenProviderFactory.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LokiTokenProviderFactory; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProviderFactory = LokiTokenProviderFactory; + var _typeServiceContext = "ServiceContext"; + var PeopleApiContext = (function () { + function PeopleApiContext(context, instanceId) { + this.context = context; + this.instanceId = instanceId; + } + Object.defineProperty(PeopleApiContext.prototype, "serviceContext", { + get: function () { + if (!this.m_serviceConext) { + this.m_serviceConext = OfficeCore.ServiceContext.newObject(this.context); + } + return this.m_serviceConext; + }, + enumerable: true, + configurable: true + }); + PeopleApiContext.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var lifetime = _this.serviceContext.getPersonaLifetime(_this.instanceId); + _this.context.sync().then(function () { + lifetime.load("instanceId"); + _this.context.sync().then(function () { + resolve(lifetime); + }); + }); + }); + }; + PeopleApiContext.prototype.getInitialPersona = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this.serviceContext.getInitialPersona(_this.instanceId); + _this.context.sync().then(function () { + resolve(persona); + }); + }); + }; + PeopleApiContext.prototype.getLokiTokenProvider = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var provider = _this.serviceContext.getLokiTokenProvider(_this.instanceId); + _this.context.sync().then(function () { + provider.load("instanceId"); + _this.context.sync().then(function () { + resolve(provider); + }); + }); + }); + }; + return PeopleApiContext; + }()); + OfficeCore.PeopleApiContext = PeopleApiContext; + var ServiceContext = (function (_super) { + __extends(ServiceContext, _super); + function ServiceContext() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceContext.prototype, "_className", { + get: function () { + return "ServiceContext"; + }, + enumerable: true, + configurable: true + }); + ServiceContext.prototype.accountEmailOrUpn = function (instanceId) { + return _invokeMethod(this, "AccountEmailOrUpn", 1, [instanceId], 4, 0); + }; + ServiceContext.prototype.dispose = function (instance) { + _invokeMethod(this, "Dispose", 0, [instance], 0, 0); + }; + ServiceContext.prototype.getInitialPersona = function (instanceId) { + return _createMethodObject(OfficeCore.Persona, this, "GetInitialPersona", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getLokiTokenProvider = function (instanceId) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaLifetime = function (instanceId) { + return _createMethodObject(OfficeCore.PersonaLifetime, this, "GetPersonaLifetime", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaPolicies = function () { + return _invokeMethod(this, "GetPersonaPolicies", 1, [], 4, 0); + }; + ServiceContext.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceContext.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceContext.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceContext, context, "Microsoft.People.ServiceContext", false, 4); + }; + ServiceContext.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceContext; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceContext = ServiceContext; + var _typeRichapiPcxFeatureChecks = "RichapiPcxFeatureChecks"; + var RichapiPcxFeatureChecks = (function (_super) { + __extends(RichapiPcxFeatureChecks, _super); + function RichapiPcxFeatureChecks() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RichapiPcxFeatureChecks.prototype, "_className", { + get: function () { + return "RichapiPcxFeatureChecks"; + }, + enumerable: true, + configurable: true + }); + RichapiPcxFeatureChecks.prototype.isAddChangePhotoLinkOnLpcPersonaImageFlightEnabled = function () { + return _invokeMethod(this, "IsAddChangePhotoLinkOnLpcPersonaImageFlightEnabled", 1, [], 4, 0); + }; + RichapiPcxFeatureChecks.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RichapiPcxFeatureChecks.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RichapiPcxFeatureChecks.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.RichapiPcxFeatureChecks, context, "Microsoft.People.RichapiPcxFeatureChecks", false, 4); + }; + RichapiPcxFeatureChecks.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RichapiPcxFeatureChecks; + }(OfficeExtension.ClientObject)); + OfficeCore.RichapiPcxFeatureChecks = RichapiPcxFeatureChecks; + var _typeTap = "Tap"; + var Tap = (function (_super) { + __extends(Tap, _super); + function Tap() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Tap.prototype, "_className", { + get: function () { + return "Tap"; + }, + enumerable: true, + configurable: true + }); + Tap.prototype.getEnterpriseUserInfo = function () { + return _invokeMethod(this, "GetEnterpriseUserInfo", 1, [], 4 | 1, 0); + }; + Tap.prototype.getMruFriendlyPath = function (documentUrl) { + return _invokeMethod(this, "GetMruFriendlyPath", 1, [documentUrl], 4 | 1, 0); + }; + Tap.prototype.launchFileUrlInOfficeApp = function (documentUrl, useUniversalAsBackup) { + return _invokeMethod(this, "LaunchFileUrlInOfficeApp", 1, [documentUrl, useUniversalAsBackup], 4 | 1, 0); + }; + Tap.prototype.performLocalSearch = function (query, numResultsRequested, supportedFileExtensions, documentUrlToExclude) { + return _invokeMethod(this, "PerformLocalSearch", 1, [query, numResultsRequested, supportedFileExtensions, documentUrlToExclude], 4 | 1, 0); + }; + Tap.prototype.readSearchCache = function (keyword, expiredHours, filterObjectType) { + return _invokeMethod(this, "ReadSearchCache", 1, [keyword, expiredHours, filterObjectType], 4 | 1, 0); + }; + Tap.prototype.writeSearchCache = function (fileContent, keyword, filterObjectType) { + return _invokeMethod(this, "WriteSearchCache", 1, [fileContent, keyword, filterObjectType], 4 | 1, 0); + }; + Tap.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Tap.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Tap.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Tap, context, "Microsoft.TapRichApi.Tap", false, 4); + }; + Tap.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Tap; + }(OfficeExtension.ClientObject)); + OfficeCore.Tap = Tap; + var ObjectType; + (function (ObjectType) { + ObjectType["unknown"] = "Unknown"; + ObjectType["chart"] = "Chart"; + ObjectType["smartArt"] = "SmartArt"; + ObjectType["table"] = "Table"; + ObjectType["image"] = "Image"; + ObjectType["slide"] = "Slide"; + ObjectType["ole"] = "OLE"; + ObjectType["text"] = "Text"; + })(ObjectType = OfficeCore.ObjectType || (OfficeCore.ObjectType = {})); + var _typeThemeService = "ThemeService"; + var ThemeService = (function (_super) { + __extends(ThemeService, _super); + function ThemeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ThemeService.prototype, "_className", { + get: function () { + return "ThemeService"; + }, + enumerable: true, + configurable: true + }); + ThemeService.prototype.registerOfficeThemeChangedEvent = function () { + _invokeMethod(this, "RegisterOfficeThemeChangedEvent", 0, [], 0, 0); + }; + ThemeService.prototype.unregisterOfficeThemeChangedEvent = function () { + _invokeMethod(this, "UnregisterOfficeThemeChangedEvent", 0, [], 0, 0); + }; + ThemeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ThemeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ThemeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ThemeService, context, "Microsoft.Theme.ThemeService", false, 4); + }; + Object.defineProperty(ThemeService.prototype, "onOfficeThemeChanged", { + get: function () { + var _this = this; + if (!this.m_officeThemeChanged) { + this.m_officeThemeChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "OfficeThemeChanged", { + eventType: 65548, + registerFunc: function () { return _this.registerOfficeThemeChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterOfficeThemeChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.ThemeService_OfficeThemeChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_officeThemeChanged; + }, + enumerable: true, + configurable: true + }); + ThemeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ThemeService; + }(OfficeExtension.ClientObject)); + OfficeCore.ThemeService = ThemeService; + (function (_CC) { + function ThemeService_OfficeThemeChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + bodyBackgroundColor: args.bodyBackgroundColor, + bodyForegroundColor: args.bodyForegroundColor, + controlBackgroundColor: args.controlBackgroundColor, + controlForegroundColor: args.controlForegroundColor + }; + return newArgs; + } + _CC.ThemeService_OfficeThemeChanged_EventArgsTransform = ThemeService_OfficeThemeChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeAppRuntimePersistenceService = "AppRuntimePersistenceService"; + var AppRuntimePersistenceService = (function (_super) { + __extends(AppRuntimePersistenceService, _super); + function AppRuntimePersistenceService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimePersistenceService.prototype, "_className", { + get: function () { + return "AppRuntimePersistenceService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimePersistenceService.prototype.getAppRuntimeStartState = function () { + return _invokeMethod(this, "GetAppRuntimeStartState", 1, [], 4, 0); + }; + AppRuntimePersistenceService.prototype.setAppRuntimeStartState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeStartState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimePersistenceService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimePersistenceService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimePersistenceService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimePersistenceService, context, "Microsoft.AppRuntime.AppRuntimePersistenceService", false, 4); + }; + AppRuntimePersistenceService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimePersistenceService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimePersistenceService = AppRuntimePersistenceService; + var _typeAppRuntimeService = "AppRuntimeService"; + var AppRuntimeService = (function (_super) { + __extends(AppRuntimeService, _super); + function AppRuntimeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimeService.prototype, "_className", { + get: function () { + return "AppRuntimeService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.getAppRuntimeState = function () { + return _invokeMethod(this, "GetAppRuntimeState", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getContentSnapshotAsBase64 = function () { + _throwIfApiNotSupported("AppRuntimeService.getContentSnapshotAsBase64", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetContentSnapshotAsBase64", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getSnapshotEnabled = function () { + _throwIfApiNotSupported("AppRuntimeService.getSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetSnapshotEnabled", 1, [], 4, 0); + }; + AppRuntimeService.prototype.setAppRuntimeState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimeService.prototype.setSnapshotEnabled = function (enabled) { + _throwIfApiNotSupported("AppRuntimeService.setSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + _invokeMethod(this, "SetSnapshotEnabled", 1, [enabled], 4, 0); + }; + AppRuntimeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimeService, context, "Microsoft.AppRuntime.AppRuntimeService", false, 4); + }; + Object.defineProperty(AppRuntimeService.prototype, "onSnapshotImageReady", { + get: function () { + _throwIfApiNotSupported("AppRuntimeService.onSnapshotImageReady", "SnapshotControl", "1.1", _hostName); + if (!this.m_snapshotImageReady) { + this.m_snapshotImageReady = new OfficeExtension.GenericEventHandlers(this.context, this, "SnapshotImageReady", { + eventType: 65547, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + imageBase64: value.imageBase64 + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_snapshotImageReady; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppRuntimeService.prototype, "onVisibilityChanged", { + get: function () { + if (!this.m_visibilityChanged) { + this.m_visibilityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "VisibilityChanged", { + eventType: 65539, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + visibility: value.visibility + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_visibilityChanged; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimeService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimeService = AppRuntimeService; + var AppRuntimeState; + (function (AppRuntimeState) { + AppRuntimeState["inactive"] = "Inactive"; + AppRuntimeState["background"] = "Background"; + AppRuntimeState["visible"] = "Visible"; + })(AppRuntimeState = OfficeCore.AppRuntimeState || (OfficeCore.AppRuntimeState = {})); + var Visibility; + (function (Visibility) { + Visibility["hidden"] = "Hidden"; + Visibility["visible"] = "Visible"; + })(Visibility = OfficeCore.Visibility || (OfficeCore.Visibility = {})); + var LicenseFeatureTier; + (function (LicenseFeatureTier) { + LicenseFeatureTier["unknown"] = "Unknown"; + LicenseFeatureTier["basic"] = "Basic"; + LicenseFeatureTier["premium"] = "Premium"; + })(LicenseFeatureTier = OfficeCore.LicenseFeatureTier || (OfficeCore.LicenseFeatureTier = {})); + var _typeLicense = "License"; + var License = (function (_super) { + __extends(License, _super); + function License() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(License.prototype, "_className", { + get: function () { + return "License"; + }, + enumerable: true, + configurable: true + }); + License.prototype.getFeatureTier = function (feature, fallbackValue) { + return _invokeMethod(this, "GetFeatureTier", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.getLicenseFeature = function (feature) { + return _createMethodObject(OfficeCore.LicenseFeature, this, "GetLicenseFeature", 1, [feature], false, false, null, 4); + }; + License.prototype.getMsaDeviceTicket = function (resource, policy, options) { + return _invokeMethod(this, "GetMsaDeviceTicket", 1, [resource, policy, options], 4 | 1, 0); + }; + License.prototype.isFeatureEnabled = function (feature, fallbackValue) { + return _invokeMethod(this, "IsFeatureEnabled", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.isFreemiumUpsellEnabled = function () { + return _invokeMethod(this, "IsFreemiumUpsellEnabled", 1, [], 4, 0); + }; + License.prototype.launchUpsellExperience = function (experienceId) { + _invokeMethod(this, "LaunchUpsellExperience", 1, [experienceId], 4, 0); + }; + License.prototype._TestFireStateChangedEvent = function (feature) { + _invokeMethod(this, "_TestFireStateChangedEvent", 0, [feature], 1, 0); + }; + License.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + License.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + License.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.License, context, "Microsoft.Office.Licensing.License", false, 4); + }; + License.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return License; + }(OfficeExtension.ClientObject)); + OfficeCore.License = License; + var _typeLicenseFeature = "LicenseFeature"; + var LicenseFeature = (function (_super) { + __extends(LicenseFeature, _super); + function LicenseFeature() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LicenseFeature.prototype, "_className", { + get: function () { + return "LicenseFeature"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeLicenseFeature, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype._RegisterStateChange = function () { + _invokeMethod(this, "_RegisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._UnregisterStateChange = function () { + _invokeMethod(this, "_UnregisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + LicenseFeature.prototype.load = function (options) { + return _load(this, options); + }; + LicenseFeature.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LicenseFeature.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + LicenseFeature.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LicenseFeature.prototype, "onStateChanged", { + get: function () { + var _this = this; + if (!this.m_stateChanged) { + this.m_stateChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "StateChanged", { + eventType: 1, + registerFunc: function () { return _this._RegisterStateChange(); }, + unregisterFunc: function () { return _this._UnregisterStateChange(); }, + getTargetIdFunc: function () { return _this.id; }, + eventArgsTransformFunc: function (value) { + var event = _CC.LicenseFeature_StateChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_stateChanged; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + LicenseFeature.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LicenseFeature.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LicenseFeature; + }(OfficeExtension.ClientObject)); + OfficeCore.LicenseFeature = LicenseFeature; + (function (_CC) { + function LicenseFeature_StateChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + feature: args.featureName, + isEnabled: args.isEnabled, + tier: args.tierName + }; + if (args.tierName) { + newArgs.tier = args.tierName == 0 ? LicenseFeatureTier.unknown : + args.tierName == 1 ? LicenseFeatureTier.basic : + args.tierName == 2 ? LicenseFeatureTier.premium : + args.tierName; + } + return newArgs; + } + _CC.LicenseFeature_StateChanged_EventArgsTransform = LicenseFeature_StateChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeMsaDeviceTicketOptions = "MsaDeviceTicketOptions"; + var MsaDeviceTicketOptions = (function (_super) { + __extends(MsaDeviceTicketOptions, _super); + function MsaDeviceTicketOptions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_className", { + get: function () { + return "MsaDeviceTicketOptions"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyNames", { + get: function () { + return ["scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "scopes", { + get: function () { + _throwIfNotLoaded("scopes", this._S, _typeMsaDeviceTicketOptions, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Scopes", value, 0); + }, + enumerable: true, + configurable: true + }); + MsaDeviceTicketOptions.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["scopes"], [], []); + }; + MsaDeviceTicketOptions.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + MsaDeviceTicketOptions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Scopes"])) { + this._S = obj["Scopes"]; + } + }; + MsaDeviceTicketOptions.prototype.load = function (options) { + return _load(this, options); + }; + MsaDeviceTicketOptions.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MsaDeviceTicketOptions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MsaDeviceTicketOptions.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.MsaDeviceTicketOptions, context, "Microsoft.Office.Licensing.MsaDeviceTicketOptions", false, 4); + }; + MsaDeviceTicketOptions.prototype.toJSON = function () { + return _toJson(this, { + "scopes": this._S + }, {}); + }; + MsaDeviceTicketOptions.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MsaDeviceTicketOptions.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MsaDeviceTicketOptions; + }(OfficeExtension.ClientObject)); + OfficeCore.MsaDeviceTicketOptions = MsaDeviceTicketOptions; + var _typeDialogPage = "DialogPage"; + var DialogPage = (function (_super) { + __extends(DialogPage, _super); + function DialogPage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DialogPage.prototype, "_className", { + get: function () { + return "DialogPage"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_Id", { + get: function () { + _throwIfNotLoaded("_Id", this.__I, _typeDialogPage, this._isNull); + return this.__I; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4, 0); + }; + DialogPage.prototype.readyToShow = function () { + _invokeMethod(this, "ReadyToShow", 1, [], 4, 0); + }; + DialogPage.prototype.registerOnShow = function () { + _invokeMethod(this, "RegisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype.sendMessageToHost = function (message) { + _invokeMethod(this, "SendMessageToHost", 1, [message], 4, 0); + }; + DialogPage.prototype.unregisterOnShow = function () { + _invokeMethod(this, "UnregisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["_Id"])) { + this.__I = obj["_Id"]; + } + }; + DialogPage.prototype.load = function (options) { + return _load(this, options); + }; + DialogPage.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_Id"])) { + this.__I = value["_Id"]; + } + }; + DialogPage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DialogPage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DialogPage, context, "Microsoft.Office.DialogPage.DialogPage", false, 4); + }; + Object.defineProperty(DialogPage.prototype, "onOnShowEvent", { + get: function () { + var _this = this; + if (!this.m_onShowEvent) { + this.m_onShowEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "OnShowEvent", { + eventType: 1, + registerFunc: function () { return _this.registerOnShow(); }, + unregisterFunc: function () { return _this.unregisterOnShow(); }, + getTargetIdFunc: function () { return _this._Id; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_onShowEvent; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return DialogPage; + }(OfficeExtension.ClientObject)); + OfficeCore.DialogPage = DialogPage; + var _typeSharedFilePicker = "SharedFilePicker"; + var SharedFilePicker = (function (_super) { + __extends(SharedFilePicker, _super); + function SharedFilePicker() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(SharedFilePicker.prototype, "_className", { + get: function () { + return "SharedFilePicker"; + }, + enumerable: true, + configurable: true + }); + SharedFilePicker.prototype.getSharedFilePickerResponse = function (pickerCustomizationJsonString) { + return _invokeMethod(this, "GetSharedFilePickerResponse", 1, [pickerCustomizationJsonString], 4, 0); + }; + SharedFilePicker.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + SharedFilePicker.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + SharedFilePicker.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.SharedFilePicker, context, "Microsoft.Office.SharedFilePicker", false, 4); + }; + SharedFilePicker.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return SharedFilePicker; + }(OfficeExtension.ClientObject)); + OfficeCore.SharedFilePicker = SharedFilePicker; + var _typeActionService = "ActionService"; + var ActionService = (function (_super) { + __extends(ActionService, _super); + function ActionService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ActionService.prototype, "_className", { + get: function () { + return "ActionService"; + }, + enumerable: true, + configurable: true + }); + ActionService.prototype.areShortcutsInUse = function (shortcuts) { + return _invokeMethod(this, "AreShortcutsInUse", 0, [shortcuts], 0, 0); + }; + ActionService.prototype.getShortcuts = function () { + return _invokeMethod(this, "GetShortcuts", 1, [], 4, 0); + }; + ActionService.prototype.replaceShortcuts = function (shortcuts) { + _invokeMethod(this, "ReplaceShortcuts", 0, [shortcuts], 0, 0); + }; + ActionService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ActionService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ActionService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ActionService, context, "Microsoft.Office.ActionService", false, 4); + }; + ActionService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ActionService; + }(OfficeExtension.ClientObject)); + OfficeCore.ActionService = ActionService; + var _typeAuth = "Auth"; + var Auth = (function (_super) { + __extends(Auth, _super); + function Auth() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Auth.prototype, "_className", { + get: function () { + return "Auth"; + }, + enumerable: true, + configurable: true + }); + Auth.prototype.getAccessTokenFirstPartyOAuth = function (appName, target) { + return _invokeMethod(this, "GetAccessTokenFirstPartyOAuth", 1, [appName, target], 4 | 1, 0); + }; + Auth.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Auth.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Auth.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Auth, context, "Microsoft.Office.Auth", false, 1 | 4); + }; + Auth.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Auth; + }(OfficeExtension.ClientObject)); + OfficeCore.Auth = Auth; + var _typeAugLoopEventService = "AugLoopEventService"; + var AugLoopEventService = (function (_super) { + __extends(AugLoopEventService, _super); + function AugLoopEventService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AugLoopEventService.prototype, "_className", { + get: function () { + return "AugLoopEventService"; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.sendMessage = function (data) { + _invokeMethod(this, "SendMessage", 1, [data], 4 | 1, 0); + }; + AugLoopEventService.prototype._RegisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_RegisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._UnregisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_UnregisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AugLoopEventService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AugLoopEventService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AugLoopEventService, context, "Microsoft.Office.AugLoopEventService", false, 1 | 4); + }; + Object.defineProperty(AugLoopEventService.prototype, "onHostMessageReceived", { + get: function () { + var _this = this; + if (!this.m_hostMessageReceived) { + this.m_hostMessageReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "HostMessageReceived", { + eventType: 65542, + registerFunc: function () { return _this._RegisterHostMessageReceivedEvent(); }, + unregisterFunc: function () { return _this._UnregisterHostMessageReceivedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + data: value.data + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostMessageReceived; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AugLoopEventService; + }(OfficeExtension.ClientObject)); + OfficeCore.AugLoopEventService = AugLoopEventService; + var _typeUndoService = "UndoService"; + var UndoService = (function (_super) { + __extends(UndoService, _super); + function UndoService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UndoService.prototype, "_className", { + get: function () { + return "UndoService"; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.endCopilotOperation = function (batchId) { + _invokeMethod(this, "EndCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.startCopilotOperation = function (batchId) { + return _invokeMethod(this, "StartCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.undo = function () { + return _invokeMethod(this, "Undo", 0, [], 1, 0); + }; + UndoService.prototype._RegisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_RegisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._UnregisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_UnregisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UndoService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UndoService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UndoService, context, "Microsoft.Office.UndoService", false, 1 | 4); + }; + Object.defineProperty(UndoService.prototype, "onCopilotOperationStarted", { + get: function () { + if (!this.m_copilotOperationStarted) { + this.m_copilotOperationStarted = new OfficeExtension.GenericEventHandlers(this.context, this, "CopilotOperationStarted", { + eventType: 65544, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + batchId: value.batchId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_copilotOperationStarted; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UndoService.prototype, "onUndoStackChanged", { + get: function () { + var _this = this; + if (!this.m_undoStackChanged) { + this.m_undoStackChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "UndoStackChanged", { + eventType: 65543, + registerFunc: function () { return _this._RegisterUndoStackChangedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUndoStackChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_undoStackChanged; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UndoService; + }(OfficeExtension.ClientObject)); + OfficeCore.UndoService = UndoService; + var TriStateOption; + (function (TriStateOption) { + TriStateOption["notSet"] = "NotSet"; + TriStateOption["true"] = "True"; + TriStateOption["false"] = "False"; + })(TriStateOption = OfficeCore.TriStateOption || (OfficeCore.TriStateOption = {})); + var UserFeedbackType; + (function (UserFeedbackType) { + UserFeedbackType["like"] = "Like"; + UserFeedbackType["dislike"] = "Dislike"; + UserFeedbackType["idea"] = "Idea"; + UserFeedbackType["unclassified"] = "Unclassified"; + })(UserFeedbackType = OfficeCore.UserFeedbackType || (OfficeCore.UserFeedbackType = {})); + var UserFeedbackUIType; + (function (UserFeedbackUIType) { + UserFeedbackUIType["modalDialog"] = "ModalDialog"; + UserFeedbackUIType["taskpane"] = "Taskpane"; + })(UserFeedbackUIType = OfficeCore.UserFeedbackUIType || (OfficeCore.UserFeedbackUIType = {})); + var _typeUserFeedbackService = "UserFeedbackService"; + var UserFeedbackService = (function (_super) { + __extends(UserFeedbackService, _super); + function UserFeedbackService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UserFeedbackService.prototype, "_className", { + get: function () { + return "UserFeedbackService"; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.collectUserFeedback = function (feedbacktype, UIType, featureArea, options) { + _invokeMethod(this, "CollectUserFeedback", 1, [feedbacktype, UIType, featureArea, options], 4 | 1, 0); + }; + UserFeedbackService.prototype._RegisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_RegisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._UnregisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_UnregisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UserFeedbackService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UserFeedbackService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UserFeedbackService, context, "Microsoft.Office.UserFeedbackService", false, 1 | 4); + }; + Object.defineProperty(UserFeedbackService.prototype, "onUserFeedbackUIDismissed", { + get: function () { + var _this = this; + if (!this.m_userFeedbackUIDismissed) { + this.m_userFeedbackUIDismissed = new OfficeExtension.GenericEventHandlers(this.context, this, "UserFeedbackUIDismissed", { + eventType: 65546, + registerFunc: function () { return _this._RegisterUserFeedbackUIDismissedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUserFeedbackUIDismissedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + isFeedbackSent: value.isFeedbackSent + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_userFeedbackUIDismissed; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UserFeedbackService; + }(OfficeExtension.ClientObject)); + OfficeCore.UserFeedbackService = UserFeedbackService; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["apiNotAvailable"] = "ApiNotAvailable"; + ErrorCodes["clientError"] = "ClientError"; + ErrorCodes["controlIdNotFound"] = "ControlIdNotFound"; + ErrorCodes["entryIdRequired"] = "EntryIdRequired"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["hostRestartNeeded"] = "HostRestartNeeded"; + ErrorCodes["instanceNotFound"] = "InstanceNotFound"; + ErrorCodes["interactiveFlowAborted"] = "InteractiveFlowAborted"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidGrant"] = "InvalidGrant"; + ErrorCodes["invalidResourceUrl"] = "InvalidResourceUrl"; + ErrorCodes["invalidRibbonDefinition"] = "InvalidRibbonDefinition"; + ErrorCodes["objectNotFound"] = "ObjectNotFound"; + ErrorCodes["resourceNotSupported"] = "ResourceNotSupported"; + ErrorCodes["serverError"] = "ServerError"; + ErrorCodes["serviceUrlNotFound"] = "ServiceUrlNotFound"; + ErrorCodes["sharedRuntimeNotAvailable"] = "SharedRuntimeNotAvailable"; + ErrorCodes["ticketInvalidParams"] = "TicketInvalidParams"; + ErrorCodes["ticketNetworkError"] = "TicketNetworkError"; + ErrorCodes["ticketUnauthorized"] = "TicketUnauthorized"; + ErrorCodes["ticketUninitialized"] = "TicketUninitialized"; + ErrorCodes["ticketUnknownError"] = "TicketUnknownError"; + ErrorCodes["unexpectedError"] = "UnexpectedError"; + ErrorCodes["unsupportedUserIdentity"] = "UnsupportedUserIdentity"; + ErrorCodes["userNotSignedIn"] = "UserNotSignedIn"; + })(ErrorCodes = OfficeCore.ErrorCodes || (OfficeCore.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = OfficeCore.Interfaces || (OfficeCore.Interfaces = {})); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var VisibilityMode; + (function (VisibilityMode) { + VisibilityMode["hidden"] = "Hidden"; + VisibilityMode["taskpane"] = "Taskpane"; + })(VisibilityMode = Office.VisibilityMode || (Office.VisibilityMode = {})); + var StartupBehavior; + (function (StartupBehavior) { + StartupBehavior["none"] = "None"; + StartupBehavior["load"] = "Load"; + })(StartupBehavior = Office.StartupBehavior || (Office.StartupBehavior = {})); + var addin; + (function (addin) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function setStartupBehavior(behavior) { + return __awaiter(this, void 0, void 0, function () { + var state, context, appRuntimePersistenceService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (behavior !== StartupBehavior.load && behavior !== StartupBehavior.none) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.invalidArgument, null, null); + } + state = (behavior == StartupBehavior.load ? OfficeCore.AppRuntimeState.background : OfficeCore.AppRuntimeState.inactive); + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + appRuntimePersistenceService.setAppRuntimeStartState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + addin.setStartupBehavior = setStartupBehavior; + function getStartupBehavior() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimePersistenceService, stateResult, state, ret; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + stateResult = appRuntimePersistenceService.getAppRuntimeStartState(); + return [4, context.sync()]; + case 1: + _a.sent(); + state = stateResult.value; + ret = (state == OfficeCore.AppRuntimeState.inactive ? StartupBehavior.none : StartupBehavior.load); + return [2, ret]; + } + }); + }); + } + addin.getStartupBehavior = getStartupBehavior; + function setSnapshotEnabled(enabled) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setSnapshotEnabled(enabled); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, Promise.resolve()]; + } + }); + }); + } + addin.setSnapshotEnabled = setSnapshotEnabled; + function getSnapshotEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + result = appRuntimeService.getSnapshotEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + addin.getSnapshotEnabled = getSnapshotEnabled; + function getContentSnapshotAsBase64() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2, new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var context = _createRequestContext(true); + var appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + var timeoutId = setTimeout(function () { + handler.remove(); + context.sync()["catch"](function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "timeout", "getContentSnapshotAsBase64")); + }, 7000); + var handler = appRuntimeService.onSnapshotImageReady.add(function (arg) { + clearTimeout(timeoutId); + handler.remove(); + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + context.sync()["catch"](function () { }); + resolve(arg.imageBase64); + } + else { + context.sync()["catch"](function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "execution failed", "getContentSnapshotAsBase64")); + } + return null; + }); + context.sync().then(function () { + var apiResult = appRuntimeService.getContentSnapshotAsBase64(); + return context.sync().then(function () { return null; }); + })["catch"](function (e) { reject(e); }); + })]; + }); + }); + } + addin.getContentSnapshotAsBase64 = getContentSnapshotAsBase64; + function _setState(state) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setAppRuntimeState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + function _getState() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, stateResult; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + stateResult = appRuntimeService.getAppRuntimeState(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, stateResult.value]; + } + }); + }); + } + addin._getState = _getState; + function showAsTaskpane() { + return _setState(OfficeCore.AppRuntimeState.visible); + } + addin.showAsTaskpane = showAsTaskpane; + function hide() { + return _setState(OfficeCore.AppRuntimeState.background); + } + addin.hide = hide; + var _appRuntimeEvent; + function _getAppRuntimeEventService() { + if (!_appRuntimeEvent) { + var context = _createRequestContext(true); + _appRuntimeEvent = OfficeCore.AppRuntimeService.newObject(context); + } + return _appRuntimeEvent; + } + function _convertVisibilityToVisibilityMode(visibility) { + if (visibility === OfficeCore.Visibility.visible) { + return VisibilityMode.taskpane; + } + return VisibilityMode.hidden; + } + function onVisibilityModeChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var eventService, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + eventService = _getAppRuntimeEventService(); + registrationToken = eventService.onVisibilityChanged.add(function (args) { + if (listener) { + var msg = { + visibilityMode: _convertVisibilityToVisibilityMode(args.visibility) + }; + listener(msg); + } + return null; + }); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + addin.onVisibilityModeChanged = onVisibilityModeChanged; + var beforeDocumentCloseNotification; + (function (beforeDocumentCloseNotification) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function enable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.enable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.enable = enable; + function disable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.disable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.disable = disable; + function onCloseActionCancelled(listener) { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + registrationToken = beforeCloseNotification.onBeforeCloseNotificationCancelled.add(function (args) { + if (listener) { + listener(); + } + return null; + }); + return [4, context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + beforeDocumentCloseNotification.onCloseActionCancelled = onCloseActionCancelled; + })(beforeDocumentCloseNotification = addin.beforeDocumentCloseNotification || (addin.beforeDocumentCloseNotification = {})); + })(addin = Office.addin || (Office.addin = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ExtensionComponentType; + (function (ExtensionComponentType) { + ExtensionComponentType["taskpane"] = "Taskpane"; + })(ExtensionComponentType || (ExtensionComponentType = {})); + var extensionLifeCycle; + (function (extensionLifeCycle) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + return context; + } + function launchTaskpane(launchOptions) { + return __awaiter(this, void 0, void 0, function () { + var context, extensionLifecycle, settings; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + extensionLifecycle = OfficeCore.ExtensionLifeCycle.newObject(context); + settings = launchOptions.settings; + if (settings != undefined) { + launchOptions.settings = OSF.OUtil.serializeSettings(settings); + } + extensionLifecycle.launchExtensionComponent("", ExtensionComponentType.taskpane, launchOptions); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + extensionLifeCycle.launchTaskpane = launchTaskpane; + })(extensionLifeCycle = Office.extensionLifeCycle || (Office.extensionLifeCycle = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ribbon; + (function (ribbon_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function requestUpdate(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + function processControls(parent) { + if (parent.controls !== undefined + && parent.controls.length !== undefined + && !!parent.controls.length) { + parent.controls + .filter(function (control) { return !(!control.id); }) + .forEach(function (control) { + var ribbonControl = ribbon.getButton(control.id); + if (control.enabled !== undefined && control.enabled !== null) { + ribbonControl.enabled = control.enabled; + } + }); + } + } + input.tabs + .filter(function (tab) { return !(!tab.id); }) + .forEach(function (tab) { + var ribbonTab = ribbon.getTab(tab.id); + if (tab.visible !== undefined && tab.visible !== null) { + ribbonTab.setVisibility(tab.visible); + } + if (!!tab.groups && !!tab.groups.length) { + tab.groups + .filter(function (group) { return !(!group.id); }) + .forEach(function (group) { + processControls(group); + }); + } + else { + processControls(tab); + } + }); + return requestContext.sync(); + } + ribbon_1.requestUpdate = requestUpdate; + function requestCreateControls(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + var delay = function (milliseconds) { + return new Promise(function (resolve, _) { return setTimeout(function () { return resolve(); }, milliseconds); }); + }; + ribbon.executeRequestCreate(JSON.stringify(input)); + return delay(250) + .then(function () { return requestContext.sync(); }); + } + ribbon_1.requestCreateControls = requestCreateControls; + })(ribbon = Office.ribbon || (Office.ribbon = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var AddinInternalServiceErrorCodes; + (function (AddinInternalServiceErrorCodes) { + AddinInternalServiceErrorCodes["generalException"] = "GeneralException"; + })(AddinInternalServiceErrorCodes || (AddinInternalServiceErrorCodes = {})); + var _libraryMetadataInternalServiceApi = { "version": "1.0.0", + "name": "OfficeCore", + "defaultApiSetName": "OfficeSharedApi", + "hostName": "Office", + "apiSets": [], + "strings": ["AddinInternalService"], + "enumTypes": [], + "clientObjectTypes": [[1, + 0, + 0, + 0, + [["notifyActionHandlerReady", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + 0, + "Microsoft.InternalService.AddinInternalService", + 4]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataInternalServiceApi, targetNamespaceObject: OfficeCore }); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var actionProxy; + (function (actionProxy) { + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _association; + var ActionMessageCategory = 2; + var ActionDispatchMessageType = 1000; + function init() { + if (typeof (OSF) !== "undefined" && OSF.DDA && OSF.DDA.RichApi && OSF.DDA.RichApi.richApiMessageManager) { + var context = new OfficeExtension.ClientRequestContext(); + return context.eventRegistration.register(5, "", _handleMessage); + } + } + function setActionAssociation(association) { + _association = association; + } + function _getFunction(functionName) { + if (functionName) { + var nameUpperCase = functionName.toUpperCase(); + var call = _association.mappings[nameUpperCase]; + if (!_isNullOrUndefined(call) && typeof (call) === "function") { + return call; + } + } + throw OfficeExtension.Utility.createRuntimeError("invalidOperation", "sourceData", "ActionProxy._getFunction"); + } + function _handleMessage(args) { + try { + OfficeExtension.Utility.log('ActionProxy._handleMessage'); + OfficeExtension.Utility.checkArgumentNull(args, "args"); + var entryArray = args.entries; + var invocationArray = []; + for (var i = 0; i < entryArray.length; i++) { + if (entryArray[i].messageCategory !== ActionMessageCategory) { + continue; + } + if (typeof (entryArray[i].message) === 'string') { + entryArray[i].message = JSON.parse(entryArray[i].message); + } + if (entryArray[i].messageType === ActionDispatchMessageType) { + var actionsArgs = null; + var actionName = entryArray[i].message[0]; + var call = _getFunction(actionName); + if (entryArray[i].message.length >= 2) { + var actionArgsJson = entryArray[i].message[1]; + if (actionArgsJson) { + if (_isJsonObjectString(actionArgsJson)) { + actionsArgs = JSON.parse(actionArgsJson); + } + else { + actionsArgs = actionArgsJson; + } + } + } + if (typeof (OSF) !== 'undefined' && + OSF.AppTelemetry && + OSF.AppTelemetry.CallOnAppActivatedIfPending) { + OSF.AppTelemetry.CallOnAppActivatedIfPending(); + } + call.apply(null, [actionsArgs]); + } + else { + OfficeExtension.Utility.log('ActionProxy._handleMessage unknown message type ' + entryArray[i].messageType); + } + } + } + catch (ex) { + _tryLog(ex); + throw ex; + } + return OfficeExtension.Utility._createPromiseFromResult(null); + } + function _isJsonObjectString(value) { + if (typeof value === 'string' && value[0] === '{') { + return true; + } + return false; + } + function toLogMessage(ex) { + var ret = 'Unknown Error'; + if (ex) { + try { + if (ex.toString) { + ret = ex.toString(); + } + ret = ret + ' ' + JSON.stringify(ex); + } + catch (otherEx) { + ret = 'Unexpected Error'; + } + } + return ret; + } + function _tryLog(ex) { + var message = toLogMessage(ex); + OfficeExtension.Utility.log(message); + } + function notifyActionHandlerReady() { + var context = new OfficeExtension.ClientRequestContext(); + var addinInternalService = OfficeCore.AddinInternalService.newObject(context); + context._customData = 'WacPartition'; + addinInternalService.notifyActionHandlerReady(); + return context.sync(); + } + function handlerOnReadyInternal() { + try { + Microsoft.Office.WebExtension.onReadyInternal() + .then(function () { + return init(); + }) + .then(function () { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.isDialog === true || (hostInfo.hostPlatform === "web" && hostInfo.hostType !== "word" && hostInfo.hostType !== "excel")) { + return; + } + else { + return notifyActionHandlerReady(); + } + }); + } + catch (ex) { + } + } + function initFromHostBridge(hostBridge) { + hostBridge.addHostMessageHandler(function (bridgeMessage) { + if (bridgeMessage.type === 3) { + _handleMessage(bridgeMessage.message); + } + }); + } + function initOnce() { + OfficeExtension.Utility.log('ActionProxy.initOnce'); + if (typeof (Office.actions) != 'undefined') { + setActionAssociation(Office.actions._association); + } + if (typeof (document) !== 'undefined') { + if (document.readyState && document.readyState !== 'loading') { + OfficeExtension.Utility.log('ActionProxy.initOnce: document.readyState is not loading state'); + handlerOnReadyInternal(); + } + else if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", function () { + OfficeExtension.Utility.log('ActionProxy.initOnce: DOMContentLoaded event triggered'); + handlerOnReadyInternal(); + }); + } + } + OfficeExtension.HostBridge.onInited(function (hostBridge) { + initFromHostBridge(hostBridge); + }); + } + initOnce(); + })(actionProxy || (actionProxy = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var actions; + (function (actions) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function areShortcutsInUse(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, inUseArray, inUseInfoArray, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + inUseArray = actionService.areShortcutsInUse(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + inUseInfoArray = []; + for (i = 0; i < shortcuts.length; i++) { + inUseInfoArray.push({ + shortcut: shortcuts[i], + inUse: inUseArray.value[i] + }); + } + return [2, inUseInfoArray]; + } + }); + }); + } + actions.areShortcutsInUse = areShortcutsInUse; + function replaceShortcuts(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + actionService.replaceShortcuts(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + actions.replaceShortcuts = replaceShortcuts; + function getShortcuts() { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, shortcuts; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + shortcuts = actionService.getShortcuts(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, shortcuts.value]; + } + }); + }); + } + actions.getShortcuts = getShortcuts; + })(actions = Office.actions || (Office.actions = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var AugLoop; + (function (AugLoop) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function SendMessage(message) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + augLoopEventService.sendMessage(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + AugLoop.SendMessage = SendMessage; + function onHostMessageReceived(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService, callback, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + callback = function (args) { + if (listener) { + var message = args.data; + listener(message); + } + return null; + }; + augLoopEventService.onHostMessageReceived.add(callback); + return [4, augLoopEventService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + augLoopEventService.onHostMessageReceived.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + AugLoop.onHostMessageReceived = onHostMessageReceived; + })(AugLoop = OfficeFirstParty.AugLoop || (OfficeFirstParty.AugLoop = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var Undo; + (function (Undo) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + context._customData = 'SkipUndoRecording'; + return context; + } + var resolver; + function onCopilotOperationStartedEventReceived() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (typeof resolver !== "undefined") { + resolver(); + resolver = undefined; + } + return [2]; + }); + }); + } + function undo() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + result = undoService.undo(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + Undo.undo = undo; + function onUndoStackChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onUndoStackChanged.add(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + undoService.onUndoStackChanged.remove(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + Undo.onUndoStackChanged = onUndoStackChanged; + function startCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var waitForEventPromise, context, undoService, shouldWaitForEvent, e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (typeof resolver !== "undefined") { + throw new Error("startCopilotOperation is already inprogress"); + } + waitForEventPromise = new Promise(function (resolve) { resolver = resolve; }); + _a.label = 1; + case 1: + _a.trys.push([1, 4, , 5]); + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onCopilotOperationStarted.add(onCopilotOperationStartedEventReceived); + return [4, context.sync()]; + case 2: + _a.sent(); + shouldWaitForEvent = undoService.startCopilotOperation(""); + return [4, context.sync()]; + case 3: + _a.sent(); + if (shouldWaitForEvent.value) { + return [2, waitForEventPromise]; + } + else { + resolver = undefined; + } + return [3, 5]; + case 4: + e_1 = _a.sent(); + resolver = undefined; + throw e_1; + case 5: return [2]; + } + }); + }); + } + Undo.startCopilotOperation = startCopilotOperation; + function endCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.endCopilotOperation(""); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + Undo.endCopilotOperation = endCopilotOperation; + })(Undo = OfficeFirstParty.Undo || (OfficeFirstParty.Undo = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var Office; +(function (Office) { + var dialogPage; + (function (dialogPage_1) { + function close() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.close(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.close = close; + function readyToShow() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.readyToShow(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.readyToShow = readyToShow; + function onShow(callback) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.onOnShowEvent.add(callback); + removeListener = function () { + dialogPage.onOnShowEvent.remove(callback); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + dialogPage_1.onShow = onShow; + function sendMessageToHost(message) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.sendMessageToHost(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.sendMessageToHost = sendMessageToHost; + })(dialogPage = Office.dialogPage || (Office.dialogPage = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var UserFeedback; + (function (UserFeedback) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function CollectUserFeedback(feedbacktype, uiType, featureArea, options) { + return __awaiter(this, void 0, void 0, function () { + var context, userFeedbackService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.collectUserFeedback(feedbacktype, uiType, featureArea, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + UserFeedback.CollectUserFeedback = CollectUserFeedback; + function onUserFeedbackUIDismissed(listener) { + return __awaiter(this, void 0, void 0, function () { + var callback, context, userFeedbackService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + callback = function (args) { + if (listener) { + var isFeedbackSent = args.isFeedbackSent; + listener(isFeedbackSent); + } + return null; + }; + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.onUserFeedbackUIDismissed.add(callback); + return [4, userFeedbackService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + userFeedbackService.onUserFeedbackUIDismissed.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + UserFeedback.onUserFeedbackUIDismissed = onUserFeedbackUIDismissed; + })(UserFeedback = OfficeFirstParty.UserFeedback || (OfficeFirstParty.UserFeedback = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var _BeginExcel = "_BeginExcel"; +var Excel; +(function (Excel) { + var Base64EncodingType; + (function (Base64EncodingType) { + Base64EncodingType["JPG"] = "JPG"; + Base64EncodingType["PNG"] = "PNG"; + })(Base64EncodingType = Excel.Base64EncodingType || (Excel.Base64EncodingType = {})); + var BlockedErrorCellValueSubType; + (function (BlockedErrorCellValueSubType) { + BlockedErrorCellValueSubType["unknown"] = "Unknown"; + BlockedErrorCellValueSubType["dataTypeRestrictedDomain"] = "DataTypeRestrictedDomain"; + BlockedErrorCellValueSubType["dataTypePrivacySetting"] = "DataTypePrivacySetting"; + BlockedErrorCellValueSubType["dataTypeUnsupportedApp"] = "DataTypeUnsupportedApp"; + BlockedErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BlockedErrorCellValueSubType["richDataLinkDisabled"] = "RichDataLinkDisabled"; + BlockedErrorCellValueSubType["signInError"] = "SignInError"; + BlockedErrorCellValueSubType["noLicense"] = "NoLicense"; + })(BlockedErrorCellValueSubType = Excel.BlockedErrorCellValueSubType || (Excel.BlockedErrorCellValueSubType = {})); + var BusyErrorCellValueSubType; + (function (BusyErrorCellValueSubType) { + BusyErrorCellValueSubType["unknown"] = "Unknown"; + BusyErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BusyErrorCellValueSubType["loadingImage"] = "LoadingImage"; + })(BusyErrorCellValueSubType = Excel.BusyErrorCellValueSubType || (Excel.BusyErrorCellValueSubType = {})); + var CalcErrorCellValueSubType; + (function (CalcErrorCellValueSubType) { + CalcErrorCellValueSubType["unknown"] = "Unknown"; + CalcErrorCellValueSubType["arrayOfArrays"] = "ArrayOfArrays"; + CalcErrorCellValueSubType["arrayOfRanges"] = "ArrayOfRanges"; + CalcErrorCellValueSubType["emptyArray"] = "EmptyArray"; + CalcErrorCellValueSubType["unsupportedLifting"] = "UnsupportedLifting"; + CalcErrorCellValueSubType["dataTableReferencedPendingFormula"] = "DataTableReferencedPendingFormula"; + CalcErrorCellValueSubType["tooManyCells"] = "TooManyCells"; + CalcErrorCellValueSubType["lambdaInCell"] = "LambdaInCell"; + CalcErrorCellValueSubType["tooDeeplyNested"] = "TooDeeplyNested"; + CalcErrorCellValueSubType["textOverflow"] = "TextOverflow"; + })(CalcErrorCellValueSubType = Excel.CalcErrorCellValueSubType || (Excel.CalcErrorCellValueSubType = {})); + var EntityCardLayoutType; + (function (EntityCardLayoutType) { + EntityCardLayoutType["entity"] = "Entity"; + EntityCardLayoutType["array"] = "Array"; + })(EntityCardLayoutType = Excel.EntityCardLayoutType || (Excel.EntityCardLayoutType = {})); + var EntityCompactLayoutIcons; + (function (EntityCompactLayoutIcons) { + EntityCompactLayoutIcons["generic"] = "Generic"; + EntityCompactLayoutIcons["accessibility"] = "Accessibility"; + EntityCompactLayoutIcons["airplane"] = "Airplane"; + EntityCompactLayoutIcons["airplaneTakeOff"] = "AirplaneTakeOff"; + EntityCompactLayoutIcons["album"] = "Album"; + EntityCompactLayoutIcons["alert"] = "Alert"; + EntityCompactLayoutIcons["alertUrgent"] = "AlertUrgent"; + EntityCompactLayoutIcons["animal"] = "Animal"; + EntityCompactLayoutIcons["animalCat"] = "AnimalCat"; + EntityCompactLayoutIcons["animalDog"] = "AnimalDog"; + EntityCompactLayoutIcons["animalRabbit"] = "AnimalRabbit"; + EntityCompactLayoutIcons["animalTurtle"] = "AnimalTurtle"; + EntityCompactLayoutIcons["appFolder"] = "AppFolder"; + EntityCompactLayoutIcons["appGeneric"] = "AppGeneric"; + EntityCompactLayoutIcons["apple"] = "Apple"; + EntityCompactLayoutIcons["approvalsApp"] = "ApprovalsApp"; + EntityCompactLayoutIcons["archive"] = "Archive"; + EntityCompactLayoutIcons["archiveMultiple"] = "ArchiveMultiple"; + EntityCompactLayoutIcons["arrowTrendingLines"] = "ArrowTrendingLines"; + EntityCompactLayoutIcons["art"] = "Art"; + EntityCompactLayoutIcons["atom"] = "Atom"; + EntityCompactLayoutIcons["attach"] = "Attach"; + EntityCompactLayoutIcons["automobile"] = "Automobile"; + EntityCompactLayoutIcons["autosum"] = "Autosum"; + EntityCompactLayoutIcons["backpack"] = "Backpack"; + EntityCompactLayoutIcons["badge"] = "Badge"; + EntityCompactLayoutIcons["balloon"] = "Balloon"; + EntityCompactLayoutIcons["bank"] = "Bank"; + EntityCompactLayoutIcons["barcodeScanner"] = "BarcodeScanner"; + EntityCompactLayoutIcons["basketball"] = "Basketball"; + EntityCompactLayoutIcons["battery0"] = "Battery0"; + EntityCompactLayoutIcons["battery10"] = "Battery10"; + EntityCompactLayoutIcons["beach"] = "Beach"; + EntityCompactLayoutIcons["beaker"] = "Beaker"; + EntityCompactLayoutIcons["bed"] = "Bed"; + EntityCompactLayoutIcons["binFull"] = "BinFull"; + EntityCompactLayoutIcons["bird"] = "Bird"; + EntityCompactLayoutIcons["bluetooth"] = "Bluetooth"; + EntityCompactLayoutIcons["board"] = "Board"; + EntityCompactLayoutIcons["boardGames"] = "BoardGames"; + EntityCompactLayoutIcons["book"] = "Book"; + EntityCompactLayoutIcons["bookmark"] = "Bookmark"; + EntityCompactLayoutIcons["bookmarkMultiple"] = "BookmarkMultiple"; + EntityCompactLayoutIcons["bot"] = "Bot"; + EntityCompactLayoutIcons["bowlChopsticks"] = "BowlChopsticks"; + EntityCompactLayoutIcons["box"] = "Box"; + EntityCompactLayoutIcons["boxMultiple"] = "BoxMultiple"; + EntityCompactLayoutIcons["brainCircuit"] = "BrainCircuit"; + EntityCompactLayoutIcons["branch"] = "Branch"; + EntityCompactLayoutIcons["branchFork"] = "BranchFork"; + EntityCompactLayoutIcons["branchRequest"] = "BranchRequest"; + EntityCompactLayoutIcons["bridge"] = "Bridge"; + EntityCompactLayoutIcons["briefcase"] = "Briefcase"; + EntityCompactLayoutIcons["briefcaseMedical"] = "BriefcaseMedical"; + EntityCompactLayoutIcons["broadActivityFeed"] = "BroadActivityFeed"; + EntityCompactLayoutIcons["broom"] = "Broom"; + EntityCompactLayoutIcons["bug"] = "Bug"; + EntityCompactLayoutIcons["building"] = "Building"; + EntityCompactLayoutIcons["buildingBank"] = "BuildingBank"; + EntityCompactLayoutIcons["buildingFactory"] = "BuildingFactory"; + EntityCompactLayoutIcons["buildingGovernment"] = "BuildingGovernment"; + EntityCompactLayoutIcons["buildingHome"] = "BuildingHome"; + EntityCompactLayoutIcons["buildingLighthouse"] = "BuildingLighthouse"; + EntityCompactLayoutIcons["buildingMultiple"] = "BuildingMultiple"; + EntityCompactLayoutIcons["buildingRetail"] = "BuildingRetail"; + EntityCompactLayoutIcons["buildingRetailMore"] = "BuildingRetailMore"; + EntityCompactLayoutIcons["buildingRetailToolbox"] = "BuildingRetailToolbox"; + EntityCompactLayoutIcons["buildingShop"] = "BuildingShop"; + EntityCompactLayoutIcons["buildingSkyscraper"] = "BuildingSkyscraper"; + EntityCompactLayoutIcons["calculator"] = "Calculator"; + EntityCompactLayoutIcons["calendarLtr"] = "CalendarLtr"; + EntityCompactLayoutIcons["calendarRtl"] = "CalendarRtl"; + EntityCompactLayoutIcons["call"] = "Call"; + EntityCompactLayoutIcons["calligraphyPen"] = "CalligraphyPen"; + EntityCompactLayoutIcons["camera"] = "Camera"; + EntityCompactLayoutIcons["cameraDome"] = "CameraDome"; + EntityCompactLayoutIcons["car"] = "Car"; + EntityCompactLayoutIcons["cart"] = "Cart"; + EntityCompactLayoutIcons["cat"] = "Cat"; + EntityCompactLayoutIcons["certificate"] = "Certificate"; + EntityCompactLayoutIcons["chartMultiple"] = "ChartMultiple"; + EntityCompactLayoutIcons["chat"] = "Chat"; + EntityCompactLayoutIcons["chatMultiple"] = "ChatMultiple"; + EntityCompactLayoutIcons["chatVideo"] = "ChatVideo"; + EntityCompactLayoutIcons["check"] = "Check"; + EntityCompactLayoutIcons["checkboxChecked"] = "CheckboxChecked"; + EntityCompactLayoutIcons["checkboxUnchecked"] = "CheckboxUnchecked"; + EntityCompactLayoutIcons["checkmark"] = "Checkmark"; + EntityCompactLayoutIcons["chess"] = "Chess"; + EntityCompactLayoutIcons["city"] = "City"; + EntityCompactLayoutIcons["class"] = "Class"; + EntityCompactLayoutIcons["classification"] = "Classification"; + EntityCompactLayoutIcons["clipboard"] = "Clipboard"; + EntityCompactLayoutIcons["clipboardDataBar"] = "ClipboardDataBar"; + EntityCompactLayoutIcons["clipboardPulse"] = "ClipboardPulse"; + EntityCompactLayoutIcons["clipboardTask"] = "ClipboardTask"; + EntityCompactLayoutIcons["clock"] = "Clock"; + EntityCompactLayoutIcons["clockAlarm"] = "ClockAlarm"; + EntityCompactLayoutIcons["cloud"] = "Cloud"; + EntityCompactLayoutIcons["cloudWords"] = "CloudWords"; + EntityCompactLayoutIcons["code"] = "Code"; + EntityCompactLayoutIcons["collections"] = "Collections"; + EntityCompactLayoutIcons["comment"] = "Comment"; + EntityCompactLayoutIcons["commentMultiple"] = "CommentMultiple"; + EntityCompactLayoutIcons["communication"] = "Communication"; + EntityCompactLayoutIcons["compassNorthwest"] = "CompassNorthwest"; + EntityCompactLayoutIcons["conferenceRoom"] = "ConferenceRoom"; + EntityCompactLayoutIcons["connector"] = "Connector"; + EntityCompactLayoutIcons["constellation"] = "Constellation"; + EntityCompactLayoutIcons["contactCard"] = "ContactCard"; + EntityCompactLayoutIcons["cookies"] = "Cookies"; + EntityCompactLayoutIcons["couch"] = "Couch"; + EntityCompactLayoutIcons["creditCardPerson"] = "CreditCardPerson"; + EntityCompactLayoutIcons["creditCardToolbox"] = "CreditCardToolbox"; + EntityCompactLayoutIcons["cube"] = "Cube"; + EntityCompactLayoutIcons["cubeMultiple"] = "CubeMultiple"; + EntityCompactLayoutIcons["cubeTree"] = "CubeTree"; + EntityCompactLayoutIcons["currencyDollarEuro"] = "CurrencyDollarEuro"; + EntityCompactLayoutIcons["currencyDollarRupee"] = "CurrencyDollarRupee"; + EntityCompactLayoutIcons["dataArea"] = "DataArea"; + EntityCompactLayoutIcons["database"] = "Database"; + EntityCompactLayoutIcons["databaseMultiple"] = "DatabaseMultiple"; + EntityCompactLayoutIcons["dataFunnel"] = "DataFunnel"; + EntityCompactLayoutIcons["dataHistogram"] = "DataHistogram"; + EntityCompactLayoutIcons["dataLine"] = "DataLine"; + EntityCompactLayoutIcons["dataPie"] = "DataPie"; + EntityCompactLayoutIcons["dataScatter"] = "DataScatter"; + EntityCompactLayoutIcons["dataSunburst"] = "DataSunburst"; + EntityCompactLayoutIcons["dataTreemap"] = "DataTreemap"; + EntityCompactLayoutIcons["dataWaterfall"] = "DataWaterfall"; + EntityCompactLayoutIcons["dataWhisker"] = "DataWhisker"; + EntityCompactLayoutIcons["dentist"] = "Dentist"; + EntityCompactLayoutIcons["designIdeas"] = "DesignIdeas"; + EntityCompactLayoutIcons["desktop"] = "Desktop"; + EntityCompactLayoutIcons["desktopMac"] = "DesktopMac"; + EntityCompactLayoutIcons["developerBoard"] = "DeveloperBoard"; + EntityCompactLayoutIcons["deviceMeetingRoom"] = "DeviceMeetingRoom"; + EntityCompactLayoutIcons["diagram"] = "Diagram"; + EntityCompactLayoutIcons["dialpad"] = "Dialpad"; + EntityCompactLayoutIcons["diamond"] = "Diamond"; + EntityCompactLayoutIcons["dinosaur"] = "Dinosaur"; + EntityCompactLayoutIcons["directions"] = "Directions"; + EntityCompactLayoutIcons["disaster"] = "Disaster"; + EntityCompactLayoutIcons["diversity"] = "Diversity"; + EntityCompactLayoutIcons["dNA"] = "DNA"; + EntityCompactLayoutIcons["doctor"] = "Doctor"; + EntityCompactLayoutIcons["document"] = "Document"; + EntityCompactLayoutIcons["documentData"] = "DocumentData"; + EntityCompactLayoutIcons["documentLandscape"] = "DocumentLandscape"; + EntityCompactLayoutIcons["documentMultiple"] = "DocumentMultiple"; + EntityCompactLayoutIcons["documentPdf"] = "DocumentPdf"; + EntityCompactLayoutIcons["documentQueue"] = "DocumentQueue"; + EntityCompactLayoutIcons["documentText"] = "DocumentText"; + EntityCompactLayoutIcons["dog"] = "Dog"; + EntityCompactLayoutIcons["door"] = "Door"; + EntityCompactLayoutIcons["doorTag"] = "DoorTag"; + EntityCompactLayoutIcons["drafts"] = "Drafts"; + EntityCompactLayoutIcons["drama"] = "Drama"; + EntityCompactLayoutIcons["drinkBeer"] = "DrinkBeer"; + EntityCompactLayoutIcons["drinkCoffee"] = "DrinkCoffee"; + EntityCompactLayoutIcons["drinkMargarita"] = "DrinkMargarita"; + EntityCompactLayoutIcons["drinkToGo"] = "DrinkToGo"; + EntityCompactLayoutIcons["drinkWine"] = "DrinkWine"; + EntityCompactLayoutIcons["driveTrain"] = "DriveTrain"; + EntityCompactLayoutIcons["drop"] = "Drop"; + EntityCompactLayoutIcons["dualScreen"] = "DualScreen"; + EntityCompactLayoutIcons["dumbbell"] = "Dumbbell"; + EntityCompactLayoutIcons["earth"] = "Earth"; + EntityCompactLayoutIcons["emoji"] = "Emoji"; + EntityCompactLayoutIcons["emojiAngry"] = "EmojiAngry"; + EntityCompactLayoutIcons["emojiHand"] = "EmojiHand"; + EntityCompactLayoutIcons["emojiLaugh"] = "EmojiLaugh"; + EntityCompactLayoutIcons["emojiMeh"] = "EmojiMeh"; + EntityCompactLayoutIcons["emojiMultiple"] = "EmojiMultiple"; + EntityCompactLayoutIcons["emojiSad"] = "EmojiSad"; + EntityCompactLayoutIcons["emojiSadSlight"] = "EmojiSadSlight"; + EntityCompactLayoutIcons["emojiSmileSlight"] = "EmojiSmileSlight"; + EntityCompactLayoutIcons["emojiSparkle"] = "EmojiSparkle"; + EntityCompactLayoutIcons["emojiSurprise"] = "EmojiSurprise"; + EntityCompactLayoutIcons["engine"] = "Engine"; + EntityCompactLayoutIcons["eraser"] = "Eraser"; + EntityCompactLayoutIcons["eye"] = "Eye"; + EntityCompactLayoutIcons["eyedropper"] = "Eyedropper"; + EntityCompactLayoutIcons["fax"] = "Fax"; + EntityCompactLayoutIcons["fingerprint"] = "Fingerprint"; + EntityCompactLayoutIcons["firstAid"] = "FirstAid"; + EntityCompactLayoutIcons["flag"] = "Flag"; + EntityCompactLayoutIcons["flash"] = "Flash"; + EntityCompactLayoutIcons["flashlight"] = "Flashlight"; + EntityCompactLayoutIcons["flow"] = "Flow"; + EntityCompactLayoutIcons["flowchart"] = "Flowchart"; + EntityCompactLayoutIcons["folder"] = "Folder"; + EntityCompactLayoutIcons["folderOpen"] = "FolderOpen"; + EntityCompactLayoutIcons["folderOpenVertical"] = "FolderOpenVertical"; + EntityCompactLayoutIcons["folderPerson"] = "FolderPerson"; + EntityCompactLayoutIcons["folderZip"] = "FolderZip"; + EntityCompactLayoutIcons["food"] = "Food"; + EntityCompactLayoutIcons["foodApple"] = "FoodApple"; + EntityCompactLayoutIcons["foodCake"] = "FoodCake"; + EntityCompactLayoutIcons["foodEgg"] = "FoodEgg"; + EntityCompactLayoutIcons["foodGrains"] = "FoodGrains"; + EntityCompactLayoutIcons["foodPizza"] = "FoodPizza"; + EntityCompactLayoutIcons["foodToast"] = "FoodToast"; + EntityCompactLayoutIcons["galaxy"] = "Galaxy"; + EntityCompactLayoutIcons["games"] = "Games"; + EntityCompactLayoutIcons["ganttChart"] = "GanttChart"; + EntityCompactLayoutIcons["gas"] = "Gas"; + EntityCompactLayoutIcons["gasPump"] = "GasPump"; + EntityCompactLayoutIcons["gauge"] = "Gauge"; + EntityCompactLayoutIcons["gavel"] = "Gavel"; + EntityCompactLayoutIcons["gift"] = "Gift"; + EntityCompactLayoutIcons["giftCard"] = "GiftCard"; + EntityCompactLayoutIcons["glasses"] = "Glasses"; + EntityCompactLayoutIcons["globe"] = "Globe"; + EntityCompactLayoutIcons["globeSurface"] = "GlobeSurface"; + EntityCompactLayoutIcons["grid"] = "Grid"; + EntityCompactLayoutIcons["gridDots"] = "GridDots"; + EntityCompactLayoutIcons["gridKanban"] = "GridKanban"; + EntityCompactLayoutIcons["guardian"] = "Guardian"; + EntityCompactLayoutIcons["guest"] = "Guest"; + EntityCompactLayoutIcons["guitar"] = "Guitar"; + EntityCompactLayoutIcons["handLeft"] = "HandLeft"; + EntityCompactLayoutIcons["handRight"] = "HandRight"; + EntityCompactLayoutIcons["handshake"] = "Handshake"; + EntityCompactLayoutIcons["hardDrive"] = "HardDrive"; + EntityCompactLayoutIcons["hatGraduation"] = "HatGraduation"; + EntityCompactLayoutIcons["headphones"] = "Headphones"; + EntityCompactLayoutIcons["headphonesSoundWave"] = "HeadphonesSoundWave"; + EntityCompactLayoutIcons["headset"] = "Headset"; + EntityCompactLayoutIcons["headsetVr"] = "HeadsetVr"; + EntityCompactLayoutIcons["heart"] = "Heart"; + EntityCompactLayoutIcons["heartBroken"] = "HeartBroken"; + EntityCompactLayoutIcons["heartCircle"] = "HeartCircle"; + EntityCompactLayoutIcons["heartHuman"] = "HeartHuman"; + EntityCompactLayoutIcons["heartPulse"] = "HeartPulse"; + EntityCompactLayoutIcons["history"] = "History"; + EntityCompactLayoutIcons["home"] = "Home"; + EntityCompactLayoutIcons["homeMore"] = "HomeMore"; + EntityCompactLayoutIcons["homePerson"] = "HomePerson"; + EntityCompactLayoutIcons["icons"] = "Icons"; + EntityCompactLayoutIcons["image"] = "Image"; + EntityCompactLayoutIcons["imageGlobe"] = "ImageGlobe"; + EntityCompactLayoutIcons["imageMultiple"] = "ImageMultiple"; + EntityCompactLayoutIcons["iot"] = "Iot"; + EntityCompactLayoutIcons["joystick"] = "Joystick"; + EntityCompactLayoutIcons["justice"] = "Justice"; + EntityCompactLayoutIcons["key"] = "Key"; + EntityCompactLayoutIcons["keyboard"] = "Keyboard"; + EntityCompactLayoutIcons["keyboardLayoutSplit"] = "KeyboardLayoutSplit"; + EntityCompactLayoutIcons["keyMultiple"] = "KeyMultiple"; + EntityCompactLayoutIcons["languages"] = "Languages"; + EntityCompactLayoutIcons["laptop"] = "Laptop"; + EntityCompactLayoutIcons["lasso"] = "Lasso"; + EntityCompactLayoutIcons["launcherSettings"] = "LauncherSettings"; + EntityCompactLayoutIcons["layer"] = "Layer"; + EntityCompactLayoutIcons["leaf"] = "Leaf"; + EntityCompactLayoutIcons["leafOne"] = "LeafOne"; + EntityCompactLayoutIcons["leafThree"] = "LeafThree"; + EntityCompactLayoutIcons["leafTwo"] = "LeafTwo"; + EntityCompactLayoutIcons["library"] = "Library"; + EntityCompactLayoutIcons["lightbulb"] = "Lightbulb"; + EntityCompactLayoutIcons["lightbulbFilament"] = "LightbulbFilament"; + EntityCompactLayoutIcons["likert"] = "Likert"; + EntityCompactLayoutIcons["link"] = "Link"; + EntityCompactLayoutIcons["localLanguage"] = "LocalLanguage"; + EntityCompactLayoutIcons["location"] = "Location"; + EntityCompactLayoutIcons["lockClosed"] = "LockClosed"; + EntityCompactLayoutIcons["lockMultiple"] = "LockMultiple"; + EntityCompactLayoutIcons["lockOpen"] = "LockOpen"; + EntityCompactLayoutIcons["lottery"] = "Lottery"; + EntityCompactLayoutIcons["luggage"] = "Luggage"; + EntityCompactLayoutIcons["mail"] = "Mail"; + EntityCompactLayoutIcons["mailInbox"] = "MailInbox"; + EntityCompactLayoutIcons["mailMultiple"] = "MailMultiple"; + EntityCompactLayoutIcons["map"] = "Map"; + EntityCompactLayoutIcons["mapPin"] = "MapPin"; + EntityCompactLayoutIcons["markdown"] = "Markdown"; + EntityCompactLayoutIcons["mathFormula"] = "MathFormula"; + EntityCompactLayoutIcons["mathSymbols"] = "MathSymbols"; + EntityCompactLayoutIcons["max"] = "Max"; + EntityCompactLayoutIcons["megaphone"] = "Megaphone"; + EntityCompactLayoutIcons["megaphoneLoud"] = "MegaphoneLoud"; + EntityCompactLayoutIcons["mention"] = "Mention"; + EntityCompactLayoutIcons["mic"] = "Mic"; + EntityCompactLayoutIcons["microscope"] = "Microscope"; + EntityCompactLayoutIcons["midi"] = "Midi"; + EntityCompactLayoutIcons["molecule"] = "Molecule"; + EntityCompactLayoutIcons["money"] = "Money"; + EntityCompactLayoutIcons["moneyHand"] = "MoneyHand"; + EntityCompactLayoutIcons["mountain"] = "Mountain"; + EntityCompactLayoutIcons["movieCamera"] = "MovieCamera"; + EntityCompactLayoutIcons["moviesAndTv"] = "MoviesAndTv"; + EntityCompactLayoutIcons["musicNote"] = "MusicNote"; + EntityCompactLayoutIcons["musicNote1"] = "MusicNote1"; + EntityCompactLayoutIcons["musicNote2"] = "MusicNote2"; + EntityCompactLayoutIcons["myLocation"] = "MyLocation"; + EntityCompactLayoutIcons["nByN"] = "NByN"; + EntityCompactLayoutIcons["nByOne"] = "NByOne"; + EntityCompactLayoutIcons["news"] = "News"; + EntityCompactLayoutIcons["notablePeople"] = "NotablePeople"; + EntityCompactLayoutIcons["note"] = "Note"; + EntityCompactLayoutIcons["notebook"] = "Notebook"; + EntityCompactLayoutIcons["notepad"] = "Notepad"; + EntityCompactLayoutIcons["notepadPerson"] = "NotepadPerson"; + EntityCompactLayoutIcons["oneByN"] = "OneByN"; + EntityCompactLayoutIcons["oneByOne"] = "OneByOne"; + EntityCompactLayoutIcons["options"] = "Options"; + EntityCompactLayoutIcons["organization"] = "Organization"; + EntityCompactLayoutIcons["organizationHorizontal"] = "OrganizationHorizontal"; + EntityCompactLayoutIcons["oval"] = "Oval"; + EntityCompactLayoutIcons["paintBrush"] = "PaintBrush"; + EntityCompactLayoutIcons["paintBucket"] = "PaintBucket"; + EntityCompactLayoutIcons["partlySunnyWeather"] = "PartlySunnyWeather"; + EntityCompactLayoutIcons["password"] = "Password"; + EntityCompactLayoutIcons["patch"] = "Patch"; + EntityCompactLayoutIcons["patient"] = "Patient"; + EntityCompactLayoutIcons["payment"] = "Payment"; + EntityCompactLayoutIcons["pen"] = "Pen"; + EntityCompactLayoutIcons["pentagon"] = "Pentagon"; + EntityCompactLayoutIcons["people"] = "People"; + EntityCompactLayoutIcons["peopleAudience"] = "PeopleAudience"; + EntityCompactLayoutIcons["peopleCall"] = "PeopleCall"; + EntityCompactLayoutIcons["peopleCommunity"] = "PeopleCommunity"; + EntityCompactLayoutIcons["peopleMoney"] = "PeopleMoney"; + EntityCompactLayoutIcons["peopleQueue"] = "PeopleQueue"; + EntityCompactLayoutIcons["peopleTeam"] = "PeopleTeam"; + EntityCompactLayoutIcons["peopleToolbox"] = "PeopleToolbox"; + EntityCompactLayoutIcons["person"] = "Person"; + EntityCompactLayoutIcons["personBoard"] = "PersonBoard"; + EntityCompactLayoutIcons["personCall"] = "PersonCall"; + EntityCompactLayoutIcons["personChat"] = "PersonChat"; + EntityCompactLayoutIcons["personFeedback"] = "PersonFeedback"; + EntityCompactLayoutIcons["personSupport"] = "PersonSupport"; + EntityCompactLayoutIcons["personVoice"] = "PersonVoice"; + EntityCompactLayoutIcons["phone"] = "Phone"; + EntityCompactLayoutIcons["phoneDesktop"] = "PhoneDesktop"; + EntityCompactLayoutIcons["phoneLaptop"] = "PhoneLaptop"; + EntityCompactLayoutIcons["phoneShake"] = "PhoneShake"; + EntityCompactLayoutIcons["phoneTablet"] = "PhoneTablet"; + EntityCompactLayoutIcons["phoneVibrate"] = "PhoneVibrate"; + EntityCompactLayoutIcons["photoFilter"] = "PhotoFilter"; + EntityCompactLayoutIcons["pi"] = "Pi"; + EntityCompactLayoutIcons["pictureInPicture"] = "PictureInPicture"; + EntityCompactLayoutIcons["pilates"] = "Pilates"; + EntityCompactLayoutIcons["pill"] = "Pill"; + EntityCompactLayoutIcons["pin"] = "Pin"; + EntityCompactLayoutIcons["pipeline"] = "Pipeline"; + EntityCompactLayoutIcons["planet"] = "Planet"; + EntityCompactLayoutIcons["playingCards"] = "PlayingCards"; + EntityCompactLayoutIcons["plugConnected"] = "PlugConnected"; + EntityCompactLayoutIcons["plugDisconnected"] = "PlugDisconnected"; + EntityCompactLayoutIcons["pointScan"] = "PointScan"; + EntityCompactLayoutIcons["poll"] = "Poll"; + EntityCompactLayoutIcons["power"] = "Power"; + EntityCompactLayoutIcons["predictions"] = "Predictions"; + EntityCompactLayoutIcons["premium"] = "Premium"; + EntityCompactLayoutIcons["presenter"] = "Presenter"; + EntityCompactLayoutIcons["previewLink"] = "PreviewLink"; + EntityCompactLayoutIcons["print"] = "Print"; + EntityCompactLayoutIcons["production"] = "Production"; + EntityCompactLayoutIcons["prohibited"] = "Prohibited"; + EntityCompactLayoutIcons["projectionScreen"] = "ProjectionScreen"; + EntityCompactLayoutIcons["protocolHandler"] = "ProtocolHandler"; + EntityCompactLayoutIcons["pulse"] = "Pulse"; + EntityCompactLayoutIcons["pulseSquare"] = "PulseSquare"; + EntityCompactLayoutIcons["puzzlePiece"] = "PuzzlePiece"; + EntityCompactLayoutIcons["qrCode"] = "QrCode"; + EntityCompactLayoutIcons["radar"] = "Radar"; + EntityCompactLayoutIcons["ram"] = "Ram"; + EntityCompactLayoutIcons["readingList"] = "ReadingList"; + EntityCompactLayoutIcons["realEstate"] = "RealEstate"; + EntityCompactLayoutIcons["receipt"] = "Receipt"; + EntityCompactLayoutIcons["reward"] = "Reward"; + EntityCompactLayoutIcons["rhombus"] = "Rhombus"; + EntityCompactLayoutIcons["ribbon"] = "Ribbon"; + EntityCompactLayoutIcons["ribbonStar"] = "RibbonStar"; + EntityCompactLayoutIcons["roadCone"] = "RoadCone"; + EntityCompactLayoutIcons["rocket"] = "Rocket"; + EntityCompactLayoutIcons["router"] = "Router"; + EntityCompactLayoutIcons["rss"] = "Rss"; + EntityCompactLayoutIcons["ruler"] = "Ruler"; + EntityCompactLayoutIcons["run"] = "Run"; + EntityCompactLayoutIcons["running"] = "Running"; + EntityCompactLayoutIcons["satellite"] = "Satellite"; + EntityCompactLayoutIcons["save"] = "Save"; + EntityCompactLayoutIcons["savings"] = "Savings"; + EntityCompactLayoutIcons["scales"] = "Scales"; + EntityCompactLayoutIcons["scan"] = "Scan"; + EntityCompactLayoutIcons["scratchpad"] = "Scratchpad"; + EntityCompactLayoutIcons["screenPerson"] = "ScreenPerson"; + EntityCompactLayoutIcons["screenshot"] = "Screenshot"; + EntityCompactLayoutIcons["search"] = "Search"; + EntityCompactLayoutIcons["serialPort"] = "SerialPort"; + EntityCompactLayoutIcons["server"] = "Server"; + EntityCompactLayoutIcons["serverMultiple"] = "ServerMultiple"; + EntityCompactLayoutIcons["serviceBell"] = "ServiceBell"; + EntityCompactLayoutIcons["settings"] = "Settings"; + EntityCompactLayoutIcons["shapes"] = "Shapes"; + EntityCompactLayoutIcons["shield"] = "Shield"; + EntityCompactLayoutIcons["shieldTask"] = "ShieldTask"; + EntityCompactLayoutIcons["shoppingBag"] = "ShoppingBag"; + EntityCompactLayoutIcons["signature"] = "Signature"; + EntityCompactLayoutIcons["sim"] = "Sim"; + EntityCompactLayoutIcons["sleep"] = "Sleep"; + EntityCompactLayoutIcons["smartwatch"] = "Smartwatch"; + EntityCompactLayoutIcons["soundSource"] = "SoundSource"; + EntityCompactLayoutIcons["soundWaveCircle"] = "SoundWaveCircle"; + EntityCompactLayoutIcons["sparkle"] = "Sparkle"; + EntityCompactLayoutIcons["speaker0"] = "Speaker0"; + EntityCompactLayoutIcons["speaker2"] = "Speaker2"; + EntityCompactLayoutIcons["sport"] = "Sport"; + EntityCompactLayoutIcons["sportAmericanFootball"] = "SportAmericanFootball"; + EntityCompactLayoutIcons["sportBaseball"] = "SportBaseball"; + EntityCompactLayoutIcons["sportBasketball"] = "SportBasketball"; + EntityCompactLayoutIcons["sportHockey"] = "SportHockey"; + EntityCompactLayoutIcons["sportSoccer"] = "SportSoccer"; + EntityCompactLayoutIcons["squareMultiple"] = "SquareMultiple"; + EntityCompactLayoutIcons["squareShadow"] = "SquareShadow"; + EntityCompactLayoutIcons["squaresNested"] = "SquaresNested"; + EntityCompactLayoutIcons["stack"] = "Stack"; + EntityCompactLayoutIcons["stackStar"] = "StackStar"; + EntityCompactLayoutIcons["star"] = "Star"; + EntityCompactLayoutIcons["starFilled"] = "StarFilled"; + EntityCompactLayoutIcons["starHalf"] = "StarHalf"; + EntityCompactLayoutIcons["starLineHorizontal3"] = "StarLineHorizontal3"; + EntityCompactLayoutIcons["starOneQuarter"] = "StarOneQuarter"; + EntityCompactLayoutIcons["starThreeQuarter"] = "StarThreeQuarter"; + EntityCompactLayoutIcons["status"] = "Status"; + EntityCompactLayoutIcons["steps"] = "Steps"; + EntityCompactLayoutIcons["stethoscope"] = "Stethoscope"; + EntityCompactLayoutIcons["sticker"] = "Sticker"; + EntityCompactLayoutIcons["storage"] = "Storage"; + EntityCompactLayoutIcons["stream"] = "Stream"; + EntityCompactLayoutIcons["streamInput"] = "StreamInput"; + EntityCompactLayoutIcons["streamInputOutput"] = "StreamInputOutput"; + EntityCompactLayoutIcons["streamOutput"] = "StreamOutput"; + EntityCompactLayoutIcons["styleGuide"] = "StyleGuide"; + EntityCompactLayoutIcons["subGrid"] = "SubGrid"; + EntityCompactLayoutIcons["subtitles"] = "Subtitles"; + EntityCompactLayoutIcons["surfaceEarbuds"] = "SurfaceEarbuds"; + EntityCompactLayoutIcons["surfaceHub"] = "SurfaceHub"; + EntityCompactLayoutIcons["symbols"] = "Symbols"; + EntityCompactLayoutIcons["syringe"] = "Syringe"; + EntityCompactLayoutIcons["system"] = "System"; + EntityCompactLayoutIcons["tabDesktop"] = "TabDesktop"; + EntityCompactLayoutIcons["tabInprivateAccount"] = "TabInprivateAccount"; + EntityCompactLayoutIcons["table"] = "Table"; + EntityCompactLayoutIcons["tableImage"] = "TableImage"; + EntityCompactLayoutIcons["tableMultiple"] = "TableMultiple"; + EntityCompactLayoutIcons["tablet"] = "Tablet"; + EntityCompactLayoutIcons["tabs"] = "Tabs"; + EntityCompactLayoutIcons["tag"] = "Tag"; + EntityCompactLayoutIcons["tagCircle"] = "TagCircle"; + EntityCompactLayoutIcons["tagMultiple"] = "TagMultiple"; + EntityCompactLayoutIcons["target"] = "Target"; + EntityCompactLayoutIcons["targetArrow"] = "TargetArrow"; + EntityCompactLayoutIcons["teddy"] = "Teddy"; + EntityCompactLayoutIcons["temperature"] = "Temperature"; + EntityCompactLayoutIcons["tent"] = "Tent"; + EntityCompactLayoutIcons["tetrisApp"] = "TetrisApp"; + EntityCompactLayoutIcons["textbox"] = "Textbox"; + EntityCompactLayoutIcons["textQuote"] = "TextQuote"; + EntityCompactLayoutIcons["thinking"] = "Thinking"; + EntityCompactLayoutIcons["thumbDislike"] = "ThumbDislike"; + EntityCompactLayoutIcons["thumbLike"] = "ThumbLike"; + EntityCompactLayoutIcons["ticketDiagonal"] = "TicketDiagonal"; + EntityCompactLayoutIcons["ticketHorizontal"] = "TicketHorizontal"; + EntityCompactLayoutIcons["timeAndWeather"] = "TimeAndWeather"; + EntityCompactLayoutIcons["timeline"] = "Timeline"; + EntityCompactLayoutIcons["timer"] = "Timer"; + EntityCompactLayoutIcons["toolbox"] = "Toolbox"; + EntityCompactLayoutIcons["topSpeed"] = "TopSpeed"; + EntityCompactLayoutIcons["translate"] = "Translate"; + EntityCompactLayoutIcons["transmission"] = "Transmission"; + EntityCompactLayoutIcons["treeDeciduous"] = "TreeDeciduous"; + EntityCompactLayoutIcons["treeEvergreen"] = "TreeEvergreen"; + EntityCompactLayoutIcons["trophy"] = "Trophy"; + EntityCompactLayoutIcons["tv"] = "Tv"; + EntityCompactLayoutIcons["tvUsb"] = "TvUsb"; + EntityCompactLayoutIcons["umbrella"] = "Umbrella"; + EntityCompactLayoutIcons["usbPlug"] = "UsbPlug"; + EntityCompactLayoutIcons["usbStick"] = "UsbStick"; + EntityCompactLayoutIcons["vault"] = "Vault"; + EntityCompactLayoutIcons["vehicleBicycle"] = "VehicleBicycle"; + EntityCompactLayoutIcons["vehicleBus"] = "VehicleBus"; + EntityCompactLayoutIcons["vehicleCab"] = "VehicleCab"; + EntityCompactLayoutIcons["vehicleCar"] = "VehicleCar"; + EntityCompactLayoutIcons["vehicleCarCollision"] = "VehicleCarCollision"; + EntityCompactLayoutIcons["vehicleCarProfileLtr"] = "VehicleCarProfileLtr"; + EntityCompactLayoutIcons["vehicleCarProfileRtl"] = "VehicleCarProfileRtl"; + EntityCompactLayoutIcons["vehicleShip"] = "VehicleShip"; + EntityCompactLayoutIcons["vehicleSubway"] = "VehicleSubway"; + EntityCompactLayoutIcons["vehicleTruck"] = "VehicleTruck"; + EntityCompactLayoutIcons["vehicleTruckBag"] = "VehicleTruckBag"; + EntityCompactLayoutIcons["vehicleTruckCube"] = "VehicleTruckCube"; + EntityCompactLayoutIcons["vehicleTruckProfile"] = "VehicleTruckProfile"; + EntityCompactLayoutIcons["video"] = "Video"; + EntityCompactLayoutIcons["video360"] = "Video360"; + EntityCompactLayoutIcons["videoChat"] = "VideoChat"; + EntityCompactLayoutIcons["videoClip"] = "VideoClip"; + EntityCompactLayoutIcons["videoClipMultiple"] = "VideoClipMultiple"; + EntityCompactLayoutIcons["videoPerson"] = "VideoPerson"; + EntityCompactLayoutIcons["videoRecording"] = "VideoRecording"; + EntityCompactLayoutIcons["videoSecurity"] = "VideoSecurity"; + EntityCompactLayoutIcons["viewDesktop"] = "ViewDesktop"; + EntityCompactLayoutIcons["viewDesktopMobile"] = "ViewDesktopMobile"; + EntityCompactLayoutIcons["violin"] = "Violin"; + EntityCompactLayoutIcons["virtualNetwork"] = "VirtualNetwork"; + EntityCompactLayoutIcons["voicemail"] = "Voicemail"; + EntityCompactLayoutIcons["vote"] = "Vote"; + EntityCompactLayoutIcons["walkieTalkie"] = "WalkieTalkie"; + EntityCompactLayoutIcons["wallet"] = "Wallet"; + EntityCompactLayoutIcons["walletCreditCard"] = "WalletCreditCard"; + EntityCompactLayoutIcons["wallpaper"] = "Wallpaper"; + EntityCompactLayoutIcons["wand"] = "Wand"; + EntityCompactLayoutIcons["warning"] = "Warning"; + EntityCompactLayoutIcons["weatherBlowingSnow"] = "WeatherBlowingSnow"; + EntityCompactLayoutIcons["weatherCloudy"] = "WeatherCloudy"; + EntityCompactLayoutIcons["weatherDrizzle"] = "WeatherDrizzle"; + EntityCompactLayoutIcons["weatherDuststorm"] = "WeatherDuststorm"; + EntityCompactLayoutIcons["weatherFog"] = "WeatherFog"; + EntityCompactLayoutIcons["weatherHailDay"] = "WeatherHailDay"; + EntityCompactLayoutIcons["weatherHailNight"] = "WeatherHailNight"; + EntityCompactLayoutIcons["weatherHaze"] = "WeatherHaze"; + EntityCompactLayoutIcons["weatherMoon"] = "WeatherMoon"; + EntityCompactLayoutIcons["weatherPartlyCloudyDay"] = "WeatherPartlyCloudyDay"; + EntityCompactLayoutIcons["weatherPartlyCloudyNight"] = "WeatherPartlyCloudyNight"; + EntityCompactLayoutIcons["weatherRain"] = "WeatherRain"; + EntityCompactLayoutIcons["weatherRainShowersDay"] = "WeatherRainShowersDay"; + EntityCompactLayoutIcons["weatherRainShowersNight"] = "WeatherRainShowersNight"; + EntityCompactLayoutIcons["weatherRainSnow"] = "WeatherRainSnow"; + EntityCompactLayoutIcons["weatherSnow"] = "WeatherSnow"; + EntityCompactLayoutIcons["weatherSnowflake"] = "WeatherSnowflake"; + EntityCompactLayoutIcons["weatherSnowShowerDay"] = "WeatherSnowShowerDay"; + EntityCompactLayoutIcons["weatherSnowShowerNight"] = "WeatherSnowShowerNight"; + EntityCompactLayoutIcons["weatherSqualls"] = "WeatherSqualls"; + EntityCompactLayoutIcons["weatherSunnyHigh"] = "WeatherSunnyHigh"; + EntityCompactLayoutIcons["weatherSunnyLow"] = "WeatherSunnyLow"; + EntityCompactLayoutIcons["weatherThunderstorm"] = "WeatherThunderstorm"; + EntityCompactLayoutIcons["webAsset"] = "WebAsset"; + EntityCompactLayoutIcons["whiteboard"] = "Whiteboard"; + EntityCompactLayoutIcons["wifi1"] = "Wifi1"; + EntityCompactLayoutIcons["wifi2"] = "Wifi2"; + EntityCompactLayoutIcons["window"] = "Window"; + EntityCompactLayoutIcons["windowMultiple"] = "WindowMultiple"; + EntityCompactLayoutIcons["windowWrench"] = "WindowWrench"; + EntityCompactLayoutIcons["wrench"] = "Wrench"; + EntityCompactLayoutIcons["wrenchScrewdriver"] = "WrenchScrewdriver"; + EntityCompactLayoutIcons["xray"] = "Xray"; + EntityCompactLayoutIcons["yoga"] = "Yoga"; + })(EntityCompactLayoutIcons = Excel.EntityCompactLayoutIcons || (Excel.EntityCompactLayoutIcons = {})); + var ReferenceValueType; + (function (ReferenceValueType) { + ReferenceValueType["array"] = "Array"; + ReferenceValueType["entity"] = "Entity"; + ReferenceValueType["root"] = "Root"; + })(ReferenceValueType = Excel.ReferenceValueType || (Excel.ReferenceValueType = {})); + var CellValueType; + (function (CellValueType) { + CellValueType["array"] = "Array"; + CellValueType["boolean"] = "Boolean"; + CellValueType["double"] = "Double"; + CellValueType["entity"] = "Entity"; + CellValueType["empty"] = "Empty"; + CellValueType["error"] = "Error"; + CellValueType["formattedNumber"] = "FormattedNumber"; + CellValueType["linkedEntity"] = "LinkedEntity"; + CellValueType["localImage"] = "LocalImage"; + CellValueType["reference"] = "Reference"; + CellValueType["string"] = "String"; + CellValueType["notAvailable"] = "NotAvailable"; + CellValueType["webImage"] = "WebImage"; + })(CellValueType = Excel.CellValueType || (Excel.CellValueType = {})); + var ConnectErrorCellValueSubType; + (function (ConnectErrorCellValueSubType) { + ConnectErrorCellValueSubType["unknown"] = "Unknown"; + ConnectErrorCellValueSubType["serviceError"] = "ServiceError"; + ConnectErrorCellValueSubType["externalLinks"] = "ExternalLinks"; + ConnectErrorCellValueSubType["externalLinksNonCloudLocation"] = "ExternalLinksNonCloudLocation"; + ConnectErrorCellValueSubType["dataTypeNoConnection"] = "DataTypeNoConnection"; + ConnectErrorCellValueSubType["dataTypeServiceError"] = "DataTypeServiceError"; + ConnectErrorCellValueSubType["missingContent"] = "MissingContent"; + ConnectErrorCellValueSubType["requestThrottle"] = "RequestThrottle"; + ConnectErrorCellValueSubType["externalLinksFailedToRefresh"] = "ExternalLinksFailedToRefresh"; + ConnectErrorCellValueSubType["externalLinksAccessFailed"] = "ExternalLinksAccessFailed"; + ConnectErrorCellValueSubType["externalLinksServerError"] = "ExternalLinksServerError"; + ConnectErrorCellValueSubType["externalLinksInvalidRequest"] = "ExternalLinksInvalidRequest"; + ConnectErrorCellValueSubType["externalLinksUnAuthenticated"] = "ExternalLinksUnAuthenticated"; + ConnectErrorCellValueSubType["externalLinksThrottledByHost"] = "ExternalLinksThrottledByHost"; + ConnectErrorCellValueSubType["externalLinksFileTooLarge"] = "ExternalLinksFileTooLarge"; + ConnectErrorCellValueSubType["outdatedLinkedEntity"] = "OutdatedLinkedEntity"; + ConnectErrorCellValueSubType["genericServerError"] = "GenericServerError"; + })(ConnectErrorCellValueSubType = Excel.ConnectErrorCellValueSubType || (Excel.ConnectErrorCellValueSubType = {})); + var ErrorCellValueType; + (function (ErrorCellValueType) { + ErrorCellValueType["blocked"] = "Blocked"; + ErrorCellValueType["busy"] = "Busy"; + ErrorCellValueType["calc"] = "Calc"; + ErrorCellValueType["connect"] = "Connect"; + ErrorCellValueType["div0"] = "Div0"; + ErrorCellValueType["external"] = "External"; + ErrorCellValueType["field"] = "Field"; + ErrorCellValueType["gettingData"] = "GettingData"; + ErrorCellValueType["notAvailable"] = "NotAvailable"; + ErrorCellValueType["name"] = "Name"; + ErrorCellValueType["null"] = "Null"; + ErrorCellValueType["num"] = "Num"; + ErrorCellValueType["placeholder"] = "Placeholder"; + ErrorCellValueType["ref"] = "Ref"; + ErrorCellValueType["spill"] = "Spill"; + ErrorCellValueType["value"] = "Value"; + })(ErrorCellValueType = Excel.ErrorCellValueType || (Excel.ErrorCellValueType = {})); + var ExternalErrorCellValueSubType; + (function (ExternalErrorCellValueSubType) { + ExternalErrorCellValueSubType["unknown"] = "Unknown"; + })(ExternalErrorCellValueSubType = Excel.ExternalErrorCellValueSubType || (Excel.ExternalErrorCellValueSubType = {})); + var FieldErrorCellValueSubType; + (function (FieldErrorCellValueSubType) { + FieldErrorCellValueSubType["unknown"] = "Unknown"; + FieldErrorCellValueSubType["webImageMissingFilePart"] = "WebImageMissingFilePart"; + FieldErrorCellValueSubType["dataProviderError"] = "DataProviderError"; + FieldErrorCellValueSubType["richValueRelMissingFilePart"] = "RichValueRelMissingFilePart"; + })(FieldErrorCellValueSubType = Excel.FieldErrorCellValueSubType || (Excel.FieldErrorCellValueSubType = {})); + var NumErrorCellValueSubType; + (function (NumErrorCellValueSubType) { + NumErrorCellValueSubType["unknown"] = "Unknown"; + NumErrorCellValueSubType["arrayTooLarge"] = "ArrayTooLarge"; + })(NumErrorCellValueSubType = Excel.NumErrorCellValueSubType || (Excel.NumErrorCellValueSubType = {})); + var RefErrorCellValueSubType; + (function (RefErrorCellValueSubType) { + RefErrorCellValueSubType["unknown"] = "Unknown"; + RefErrorCellValueSubType["externalLinksStructuredRef"] = "ExternalLinksStructuredRef"; + RefErrorCellValueSubType["externalLinksCalculatedRef"] = "ExternalLinksCalculatedRef"; + })(RefErrorCellValueSubType = Excel.RefErrorCellValueSubType || (Excel.RefErrorCellValueSubType = {})); + var SpillErrorCellValueSubType; + (function (SpillErrorCellValueSubType) { + SpillErrorCellValueSubType["unknown"] = "Unknown"; + SpillErrorCellValueSubType["collision"] = "Collision"; + SpillErrorCellValueSubType["indeterminateSize"] = "IndeterminateSize"; + SpillErrorCellValueSubType["worksheetEdge"] = "WorksheetEdge"; + SpillErrorCellValueSubType["outOfMemoryWhileCalc"] = "OutOfMemoryWhileCalc"; + SpillErrorCellValueSubType["table"] = "Table"; + SpillErrorCellValueSubType["mergedCell"] = "MergedCell"; + })(SpillErrorCellValueSubType = Excel.SpillErrorCellValueSubType || (Excel.SpillErrorCellValueSubType = {})); + var ValueErrorCellValueSubType; + (function (ValueErrorCellValueSubType) { + ValueErrorCellValueSubType["unknown"] = "Unknown"; + ValueErrorCellValueSubType["vlookupColumnIndexLessThanOne"] = "VlookupColumnIndexLessThanOne"; + ValueErrorCellValueSubType["vlookupResultNotFound"] = "VlookupResultNotFound"; + ValueErrorCellValueSubType["hlookupRowIndexLessThanOne"] = "HlookupRowIndexLessThanOne"; + ValueErrorCellValueSubType["hlookupResultNotFound"] = "HlookupResultNotFound"; + ValueErrorCellValueSubType["coerceStringToNumberInvalid"] = "CoerceStringToNumberInvalid"; + ValueErrorCellValueSubType["coerceStringToBoolInvalid"] = "CoerceStringToBoolInvalid"; + ValueErrorCellValueSubType["coerceStringToInvalidType"] = "CoerceStringToInvalidType"; + ValueErrorCellValueSubType["subArrayStartRowMissingEndRowNot"] = "SubArrayStartRowMissingEndRowNot"; + ValueErrorCellValueSubType["subArrayStartColumnMissingEndColumnNot"] = "SubArrayStartColumnMissingEndColumnNot"; + ValueErrorCellValueSubType["invalidImageUrl"] = "InvalidImageUrl"; + ValueErrorCellValueSubType["stockHistoryNonTradingDays"] = "StockHistoryNonTradingDays"; + ValueErrorCellValueSubType["stockHistoryNotAStock"] = "StockHistoryNotAStock"; + ValueErrorCellValueSubType["stockHistoryInvalidDate"] = "StockHistoryInvalidDate"; + ValueErrorCellValueSubType["stockHistoryEndBeforeStart"] = "StockHistoryEndBeforeStart"; + ValueErrorCellValueSubType["stockHistoryStartInFuture"] = "StockHistoryStartInFuture"; + ValueErrorCellValueSubType["stockHistoryInvalidEnum"] = "StockHistoryInvalidEnum"; + ValueErrorCellValueSubType["stockHistoryOnlyDateRequested"] = "StockHistoryOnlyDateRequested"; + ValueErrorCellValueSubType["stockHistoryNotFound"] = "StockHistoryNotFound"; + ValueErrorCellValueSubType["lambdaWrongParamCount"] = "LambdaWrongParamCount"; + })(ValueErrorCellValueSubType = Excel.ValueErrorCellValueSubType || (Excel.ValueErrorCellValueSubType = {})); + function _runOnRegularOrWacContext(options, callback) { + var context = isOfficePlatform("OfficeOnline") + ? new WacSpecificRequestContext() + : new RequestContext(); + onBeforeExcelRun(options, context); + return OfficeExtension.CoreUtility.Promise.resolve() + .then(function () { return callback(context); }) + .then(context.sync); + } + var WacSpecificRequestContext = (function (_super) { + __extends(WacSpecificRequestContext, _super); + function WacSpecificRequestContext(url) { + var _this = _super.call(this, url) || this; + _this._customData = "WacPartition"; + _this.m_wacWorkbook = _createRootServiceObject(WacWorkbook, _this); + _this._rootObject = _this.m_wacWorkbook; + _this._rootObjectPropertyName = "wacWorkbook"; + return _this; + } + Object.defineProperty(WacSpecificRequestContext.prototype, "wacWorkbook", { + get: function () { + return this.m_wacWorkbook; + }, + enumerable: true, + configurable: true + }); + return WacSpecificRequestContext; + }(OfficeCore.RequestContext)); + var WacWorkbook = (function (_super) { + __extends(WacWorkbook, _super); + function WacWorkbook() { + return _super !== null && _super.apply(this, arguments) || this; + } + WacWorkbook.prototype.createAndOpenWorkbook = function (base64) { + _invokeMethod(this, "CreateAndOpenWorkbook", 0, [base64], 0, 0); + }; + return WacWorkbook; + }(OfficeExtension.ClientObject)); + function createWorkbook(base64) { + _throwIfApiNotSupported("Excel.createWorkbook", _defaultApiSetName, "1.8", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + if (context instanceof WacSpecificRequestContext) { + context.wacWorkbook.createAndOpenWorkbook(base64); + } + else { + context.workbook.application.createWorkbook(base64).open(); + } + }); + } + Excel.createWorkbook = createWorkbook; + function lowerCaseFirst(str) { + return str[0].toLowerCase() + str.slice(1); + } + var iconSets = ["ThreeArrows", + "ThreeArrowsGray", + "ThreeFlags", + "ThreeTrafficLights1", + "ThreeTrafficLights2", + "ThreeSigns", + "ThreeSymbols", + "ThreeSymbols2", + "FourArrows", + "FourArrowsGray", + "FourRedToBlack", + "FourRating", + "FourTrafficLights", + "FiveArrows", + "FiveArrowsGray", + "FiveRating", + "FiveQuarters", + "ThreeStars", + "ThreeTriangles", + "FiveBoxes"]; + var iconNames = [["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], + ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], + ["RedFlag", "YellowFlag", "GreenFlag"], + ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], + ["RedDiamond", "YellowTriangle", "GreenCircle"], + ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], + ["RedCross", "YellowExclamation", "GreenCheck"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], + ["OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], + ["SilverStar", "HalfGoldStar", "GoldStar"], + ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], + ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; + Excel.icons = {}; + iconSets.map(function (title, i) { + var camelTitle = lowerCaseFirst(title); + Excel.icons[camelTitle] = []; + iconNames[i].map(function (iconName, j) { + iconName = lowerCaseFirst(iconName); + var obj = { set: title, index: j }; + Excel.icons[camelTitle].push(obj); + Excel.icons[camelTitle][iconName] = obj; + }); + }); + function setRangePropertiesInBulk(range, propertyName, values, apiFlags) { + var maxCellCount = 1500; + if (Array.isArray(values) && values.length > 0 && Array.isArray(values[0]) && (values.length * values[0].length > maxCellCount) && isExcel1_3OrAbove()) { + var maxRowCount = Math.max(1, Math.round(maxCellCount / values[0].length)); + range._ValidateArraySize(values.length, values[0].length); + for (var startRowIndex = 0; startRowIndex < values.length; startRowIndex += maxRowCount) { + var rowCount = maxRowCount; + if (startRowIndex + rowCount > values.length) { + rowCount = values.length - startRowIndex; + } + var chunk = range.getRow(startRowIndex).untrack().getBoundingRect(range.getRow(startRowIndex + rowCount - 1).untrack()).untrack(); + var valueSlice = values.slice(startRowIndex, startRowIndex + rowCount); + _invokeSetProperty(chunk, propertyName, valueSlice, apiFlags != null ? apiFlags : 0); + } + return true; + } + return false; + } + function isExcelApiSetSupported(version) { + return OfficeExtension.Utility.isSetSupported("ExcelApi", version.toString()); + } + function isExcel1_3OrAbove() { + return isExcelApiSetSupported(1.3); + } + function isOfficePlatform(platform) { + if (typeof (window) !== "undefined" && window.Office && window.Office.context) { + return window.Office.context.platform === platform; + } + return false; + } + var OperationStatus; + (function (OperationStatus) { + OperationStatus["NotStarted"] = "notStarted"; + OperationStatus["Running"] = "running"; + OperationStatus["Succeeded"] = "succeeded"; + OperationStatus["Failed"] = "failed"; + })(OperationStatus || (OperationStatus = {})); + var HttpStatusCode; + (function (HttpStatusCode) { + HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK"; + HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created"; + HttpStatusCode[HttpStatusCode["Accepted"] = 202] = "Accepted"; + HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent"; + HttpStatusCode[HttpStatusCode["HighestSuccessCode"] = 299] = "HighestSuccessCode"; + HttpStatusCode[HttpStatusCode["TooManyRequests"] = 429] = "TooManyRequests"; + HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError"; + HttpStatusCode[HttpStatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpStatusCode || (HttpStatusCode = {})); + var SessionOperation; + (function (SessionOperation) { + SessionOperation["Close"] = "Session.close"; + SessionOperation["CommitChanges"] = "Session.commitChanges"; + SessionOperation["Create"] = "Session.resolveRequestUrlAndHeaderInfo"; + SessionOperation["Refresh"] = "Session.refreshSession"; + })(SessionOperation = Excel.SessionOperation || (Excel.SessionOperation = {})); + var Session = (function () { + function Session(workbookUrl, requestHeaders, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.persistChanges, persistChanges = _c === void 0 ? true : _c, _d = _b.commitExplicitly, commitExplicitly = _d === void 0 ? true : _d; + this.m_requestId = ''; + this.m_workbookUrl = !workbookUrl ? '' : this.ensureUrlFormatEndWithSlash(workbookUrl); + this.m_requestHeaders = !requestHeaders ? {} : requestHeaders; + this.m_persistChanges = persistChanges; + this.m_commitExplicitly = commitExplicitly; + } + Object.defineProperty(Session.prototype, "requestId", { + get: function () { + return this.m_requestId; + }, + enumerable: true, + configurable: true + }); + Session.prototype.close = function () { + var _this = this; + if (this.m_requestUrlAndHeaderInfo && + !OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + var url = this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url) + Session.CLOSE_SESSION; + var req = { + method: 'POST', + url: url, + headers: this.m_requestUrlAndHeaderInfo.headers, + body: '' + }; + return OfficeExtension.HttpUtility.sendRequest(req).then(function (resp) { + if (resp.statusCode !== HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(resp, SessionOperation.Close); + } + _this.m_requestUrlAndHeaderInfo = null; + for (var key in _this.m_requestHeaders) { + if (key.toLowerCase() === Session.WorkbookSessionIdHeaderNameLower) { + delete _this.m_requestHeaders[key]; + break; + } + } + }); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + Session.prototype.commitChanges = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (!this.m_commitExplicitly) { + throw this.createError(HttpStatusCode.InternalServerError, 'Can not call commitChanges() if commitExplicitly is not set.', SessionOperation.CommitChanges); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.CommitChanges); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.CommitChanges); + } + var commitChangesRequestInfo = this.createCommitChangesRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(commitChangesRequestInfo).then(function (commitChangesResponseInfo) { + var statusCode = commitChangesResponseInfo.statusCode; + if (statusCode === HttpStatusCode.Accepted) { + return _this.delay(Session.POLL_DELAY) + .then(function (_) { + return _this.pollResourceLocation(_this.getHeaderIgnoreCase(commitChangesResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.CommitChanges, additionalRequestHeaders); + }) + .then(function (commitChangesResourceLocationResponseInfo) { + var operationStatusBody = JSON.parse(commitChangesResourceLocationResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(commitChangesResourceLocationResponseInfo, SessionOperation.CommitChanges); + } + return _this.parseCooldownTime(commitChangesResourceLocationResponseInfo); + }); + } + if (statusCode >= HttpStatusCode.OK && statusCode <= HttpStatusCode.HighestSuccessCode) { + return _this.parseCooldownTime(commitChangesResponseInfo); + } + throw _this.createErrorFromResponseInfo(commitChangesResponseInfo, SessionOperation.CommitChanges); + }); + }; + Session.prototype._resolveRequestUrlAndHeaderInfo = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (this.m_requestUrlAndHeaderInfo) { + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (this.getHeaderIgnoreCase(this.m_requestHeaders, Session.WorkbookSessionIdHeaderNameLower)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + var sessionRequestInfo = this.createAsyncGraphSessionRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(sessionRequestInfo).then(function (sessionResponseInfo) { + _this.m_requestId = _this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.REQUEST_ID_HEADER); + if (sessionResponseInfo.statusCode !== HttpStatusCode.Accepted && + sessionResponseInfo.statusCode !== HttpStatusCode.Created) { + throw _this.createErrorFromResponseInfo(sessionResponseInfo, SessionOperation.Create); + } + if (sessionResponseInfo.statusCode === HttpStatusCode.Created) { + _this.formatRequestUrlAndHeaderInfo(sessionResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + } + return _this.delay(Session.POLL_DELAY) + .then(function (_) { return _this.pollResourceLocation(_this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.Create, additionalRequestHeaders); }) + .then(function (operationStatusResponseInfo) { + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, SessionOperation.Create); + } + var sessionResourceLocationRequestInfo = { + method: 'GET', + url: operationStatusBody.resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: _this.getHeaderIgnoreCase(_this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined + }; + return OfficeExtension.HttpUtility.sendRequest(sessionResourceLocationRequestInfo).then(function (sessionResourceLocationResponseInfo) { + _this.formatRequestUrlAndHeaderInfo(sessionResourceLocationResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + }); + }); + }); + }; + Session.prototype.refreshSession = function () { + var _this = this; + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.Refresh); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.Refresh); + } + var refreshSessionRequestInfo = this.createRefreshSessionRequestInfo(); + return OfficeExtension.HttpUtility.sendRequest(refreshSessionRequestInfo).then(function (refreshSessionResponseInfo) { + var statusCode = refreshSessionResponseInfo.statusCode; + if (statusCode != HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(refreshSessionResponseInfo, SessionOperation.Refresh); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + }; + Session.prototype.getHeaderIgnoreCase = function (headers, headerName) { + var foundHeaders = Object.keys(headers).filter(function (key) { return key.toLowerCase() === headerName.toLowerCase(); }); + return foundHeaders.length > 0 ? headers[foundHeaders[0]] : undefined; + }; + Session.prototype.createCommitChangesRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + var url = this.getCorrectGraphVersionUrl() + Session.COMMIT_CHANGES; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.createAsyncGraphSessionRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + var url = this.getCorrectGraphVersionUrl() + Session.CREATE_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: { persistChanges: this.m_persistChanges, commitExplicitly: this.m_commitExplicitly } + }; + }; + Session.prototype.createRefreshSessionRequestInfo = function () { + var url = this.getCorrectGraphVersionUrl() + Session.REFRESH_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.getCorrectGraphVersionUrl = function () { + return this.m_workbookUrl.replace(new RegExp('graph\.microsoft\.com\/.*?\/'), "graph.microsoft.com/" + Session.ASYNC_API_GRAPH_VERSION + "/"); + }; + Session.prototype.pollResourceLocation = function (resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (pollAttempt === void 0) { + pollAttempt = 0; + } + if (pollAttempt >= Session.MAX_POLL_ATTEMPTS) { + throw this.createError(HttpStatusCode.InternalServerError, 'Timout while polling for the resource location.', sessionOperation); + } + var operationStatusRequestInfo = { + method: 'GET', + url: resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: this.getHeaderIgnoreCase(this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined + }; + return OfficeExtension.HttpUtility.sendRequest(operationStatusRequestInfo).then(function (operationStatusResponseInfo) { + if (operationStatusResponseInfo.statusCode !== HttpStatusCode.OK) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + } + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + switch (operationStatusBody.status) { + case OperationStatus.Succeeded: + return operationStatusResponseInfo; + case OperationStatus.Failed: + return operationStatusResponseInfo; + case OperationStatus.NotStarted: + case OperationStatus.Running: + return _this.delay(Session.POLL_DELAY).then(function (_) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + }); + default: + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, sessionOperation); + } + }); + }; + Session.prototype.parseCooldownTime = function (responseInfo) { + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + return !retryAfter + ? Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER + : parseInt(retryAfter) * 1000; + }; + Session.prototype.formatRequestUrlAndHeaderInfo = function (responseInfo) { + if (responseInfo.statusCode !== HttpStatusCode.OK && responseInfo.statusCode !== HttpStatusCode.Created) { + throw this.createErrorFromResponseInfo(responseInfo, SessionOperation.Create); + } + var session = JSON.parse(responseInfo.body); + var sessionId = session.id; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + headers[Session.WorkbookSessionIdHeaderName] = sessionId; + this.m_requestUrlAndHeaderInfo = { url: this.getCorrectGraphVersionUrl(), headers: headers }; + }; + Session.prototype.ensureUrlFormatEndWithSlash = function (url) { + if (url.charAt(url.length - 1) !== '/') { + url += '/'; + } + return url; + }; + Session.prototype.delay = function (milliseconds) { + return new OfficeExtension.CoreUtility.Promise(function (res, _) { return setTimeout(function () { return res(); }, milliseconds); }); + }; + Session.prototype.createErrorFromResponseInfo = function (responseInfo, locationThrown) { + var err = OfficeExtension.Utility._parseErrorResponse(responseInfo); + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + var data = { + retryAfter: retryAfter, + responseBody: OfficeExtension.Utility._parseErrorResponseBody(responseInfo) + }; + return OfficeExtension.Utility.createRuntimeError(err.errorCode, err.errorMessage, locationThrown, responseInfo.statusCode, data); + }; + Session.prototype.createError = function (code, message, locationThrown) { + return OfficeExtension.Utility.createRuntimeError('' + code, message, locationThrown); + }; + Session.WorkbookSessionIdHeaderName = 'Workbook-Session-Id'; + Session.WorkbookSessionIdHeaderNameLower = 'workbook-session-id'; + Session.ASYNC_API_GRAPH_VERSION = 'beta'; + Session.POLL_DELAY = 10000; + Session.MAX_POLL_ATTEMPTS = 10; + Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER = 10000; + Session.LOCATION_HEADER = 'location'; + Session.AUTHORIZATION_HEADER = 'authorization'; + Session.REQUEST_ID_HEADER = 'request-id'; + Session.RETRY_AFTER_HEADER = 'retry-after'; + Session.PREFER_HEADER = 'Prefer'; + Session.PREFER_HEADER_VAL = 'respond-async'; + Session.CONTENT_TYPE_HEADER = 'Content-Type'; + Session.CONTENT_TYPE_HEADER_VAL = 'application/json'; + Session.CLOSE_SESSION = 'closeSession'; + Session.COMMIT_CHANGES = 'commitChanges'; + Session.CREATE_SESSION = 'createSession'; + Session.REFRESH_SESSION = 'refreshSession'; + return Session; + }()); + Excel.Session = Session; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + var _this = _super.call(this, url) || this; + _this.m_workbook = _createRootServiceObject(Excel.Workbook, _this); + _this._rootObject = _this.m_workbook; + _this._rootObjectPropertyName = "workbook"; + return _this; + } + RequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext = 5004; + if (officeJsErrorCode === ooeInvalidApiCallInContext) { + response.ErrorCode = ErrorCodes.invalidOperationInCellEditMode; + response.HttpStatusCode = 400; + response.ErrorMessage = OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; + Object.defineProperty(RequestContext.prototype, "workbook", { + get: function () { + return this.m_workbook; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "application", { + get: function () { + return this.workbook.application; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "runtime", { + get: function () { + return this.workbook._Runtime; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeCore.RequestContext)); + Excel.RequestContext = RequestContext; + var Recorder = (function () { + function Recorder() { + } + Recorder.enableMacroRecordingEvent = function (context) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = true; + var registerEventHandler = function (context) { + context.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent] = "true"; + context.workbook.onRecordingStateChangedEvent.add(function (args) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = args.recording; + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + if (context !== undefined && context !== null) { + return registerEventHandler(context); + } + return run(function (context) { + return registerEventHandler(context); + }); + }; + return Recorder; + }()); + Excel.Recorder = Recorder; + function onBeforeExcelRun(options, context) { + var excelOptions = options; + if (excelOptions.delayForCellEdit && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + context._requestFlagModifier |= 64; + } + else { + context._requestFlagModifier &= ~64; + } + if (excelOptions._makerSafe) { + context._requestFlagModifier |= 1024; + } + } + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.run = run; + function runBatch(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.runBatch = runBatch; + Excel._RedirectV1APIs = false; + Excel._V1APIMap = { + "GetDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GetSelectedDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.getSelectedData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GoToByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.gotoById(callArgs); } + }, + "AddColumnsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddColumns(callArgs); } + }, + "AddFromSelectionAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromSelection(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromNamedItemAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromNamedItem(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromPromptAsync": { + call: function (ctx, callArgs) { + if (versionNumberIsEarlierThan({ ios: { desiredMajor: 2, desiredMinor: 20, desiredBuild: 0 } }) && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + ctx._requestFlagModifier |= 64; + } + return ctx.workbook._V1Api.bindingAddFromPrompt(callArgs); + }, + postprocess: postprocessBindingDescriptor + }, + "AddRowsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddRows(callArgs); } + }, + "GetByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetById(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "ReleaseByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingReleaseById(callArgs); } + }, + "GetAllAsync": { + call: function (ctx) { return ctx.workbook._V1Api.bindingGetAll(); }, + postprocess: function (response) { + return response.bindings.map(function (descriptor) { return postprocessBindingDescriptor(descriptor); }); + } + }, + "DeleteAllDataValuesAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingDeleteAllDataValues(callArgs); } + }, + "SetSelectedDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.setSelectedData(callArgs); } + }, + "SetDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetData(callArgs); } + }, + "SetFormatsAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetFormats(callArgs); } + }, + "SetTableOptionsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetTableOptions(callArgs); } + }, + "ClearFormatsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } + }, + "GetFilePropertiesAsync": { + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } + } + }; + function postprocessBindingDescriptor(response) { + var bindingDescriptor = { + BindingColumnCount: response.bindingColumnCount, + BindingId: response.bindingId, + BindingRowCount: response.bindingRowCount, + bindingType: response.bindingType, + HasHeaders: response.hasHeaders + }; + return window.OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, window.Microsoft.Office.WebExtension.context.document); + } + function getDataCommonPostprocess(response, callArgs) { + var isPlainData = response.headers == null; + var data; + if (isPlainData) { + data = response.rows; + } + else { + data = response; + } + data = window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data === undefined ? null : data; + } + function versionNumberIsEarlierThan(versionsForPlatformMap) { + var hasOfficeVersion = typeof (window) !== "undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var platform = window.Office.context.diagnostics.platform.toLowerCase(); + if (platform === 'officeonline') { + return false; + } + var versionForCurrentPlatform = versionsForPlatformMap[platform]; + if (versionForCurrentPlatform == null) { + versionForCurrentPlatform = versionsForPlatformMap.general; + } + var version = window.Office.context.diagnostics.version; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(version); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (major < versionForCurrentPlatform.desiredMajor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor < versionForCurrentPlatform.desiredMinor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor === versionForCurrentPlatform.desiredMinor && build < versionForCurrentPlatform.desiredBuild) { + var revisionString = result[4]; + var devBuildValidation = /^3\d\d\d+$/; + var isDevBuild = devBuildValidation.exec(revisionString); + if (isDevBuild) { + return true; + } + } + } + return false; + } + var ALWAYS_TRUE_PLACEHOLDER_OVERRIDE = true; + var _CC; + (function (_CC) { + _CC.office10EventIdBindingSelectionChangedEvent = 3; + _CC.office10EventIdBindingDataChangedEvent = 4; + _CC.office10EventIdDocumentSelectionChangedEvent = 2; + _CC.office10EventIdRichApiMessageEvent = 5; + _CC.office10EventIdSettingsChangedEvent = 1; + })(_CC = Excel._CC || (Excel._CC = {})); + var _hostName = "Excel"; + var _defaultApiSetName = "ExcelApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var RangeValuesPreviewCustom = (function () { + function RangeValuesPreviewCustom() { + } + Object.defineProperty(RangeValuesPreviewCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return RangeValuesPreviewCustom; + }()); + Excel.RangeValuesPreviewCustom = RangeValuesPreviewCustom; + (function (_CC) { + function Application_SuspendApiCalculationUntilNextSync(thisObj) { + if (isOfficePlatform("Mac") && isExcelApiSetSupported(1.6) && !isExcelApiSetSupported(1.7)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Application_SuspendApiCalculationUntilNextSync = Application_SuspendApiCalculationUntilNextSync; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Workbook_EnableOfficeScriptRecording(thisObj, eventId) { + this.context.eventId = eventId; + return { handled: false }; + } + _CC.Workbook_EnableOfficeScriptRecording = Workbook_EnableOfficeScriptRecording; + function Workbook_RecordAction(thisObj, payload) { + this.context.sdxPayload = payload; + return { handled: false }; + } + _CC.Workbook_RecordAction = Workbook_RecordAction; + function Workbook_SelectionChanged_EventArgsTransform(thisObj, args) { + return { workbook: thisObj }; + } + _CC.Workbook_SelectionChanged_EventArgsTransform = Workbook_SelectionChanged_EventArgsTransform; + function Workbook_WACOperationEvent_EventArgsTransform(thisObj, args) { + var event = { + eventId: args.eventId, + payload: args.payload, + type: Excel.EventType.wacoperationEvent + }; + return event; + } + _CC.Workbook_WACOperationEvent_EventArgsTransform = Workbook_WACOperationEvent_EventArgsTransform; + function Workbook__Message_EventArgsTransform(thisObj, args) { + return { + entries: args.entries, + workbook: thisObj + }; + } + _CC.Workbook__Message_EventArgsTransform = Workbook__Message_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Worksheet_Charts_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Charts_Get = Worksheet_Charts_Get; + function Worksheet_Comments_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Comments_Get = Worksheet_Comments_Get; + function Worksheet_Names_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Names_Get = Worksheet_Names_Get; + function Worksheet_PivotTables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_PivotTables_Get = Worksheet_PivotTables_Get; + function Worksheet_RangeValuesPreview_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_RangeValuesPreview_Get = Worksheet_RangeValuesPreview_Get; + function Worksheet_Shapes_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Shapes_Get = Worksheet_Shapes_Get; + function Worksheet_ShowGridlines_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showGridlines = value; + _invokeSetProperty(thisObj, "Gridlines", value, _calculateApiFlags(2, "ExcelApiUndo", "1.16")); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowGridlines_Set = Worksheet_ShowGridlines_Set; + function Worksheet_ShowHeadings_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showHeadings = value; + _invokeSetProperty(thisObj, "Headings", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowHeadings_Set = Worksheet_ShowHeadings_Set; + function Worksheet_Tables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Tables_Get = Worksheet_Tables_Get; + function Worksheet_Visuals_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Visuals_Get = Worksheet_Visuals_Get; + function Worksheet_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState + }; + return newArgs; + } + _CC.Worksheet_Changed_EventArgsTransform = Worksheet_Changed_EventArgsTransform; + function Worksheet_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.Worksheet_FormatChanged_EventArgsTransform = Worksheet_FormatChanged_EventArgsTransform; + function Worksheet_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.Worksheet_FormulaChanged_EventArgsTransform = Worksheet_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function _overrideWorksheetCollectionEventMethod(thisObj, methodName, apiVersion) { + if ((!isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.12)) || + (isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.11))) { + _throwIfApiNotSupported("WorksheetCollection." + methodName, _defaultApiSetName, apiVersion, _hostName); + _invokeMethod(thisObj, methodName, 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + function WorksheetCollection__RegisterActivatedEvent(thisObj) { + if (!isExcelApiSetSupported(1.9)) { + _throwIfApiNotSupported("WorksheetCollection._RegisterActivatedEvent", _defaultApiSetName, "1.7", _hostName); + _invokeMethod(thisObj, "_RegisterActivatedEvent", 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetCollection__RegisterActivatedEvent = WorksheetCollection__RegisterActivatedEvent; + function WorksheetCollection__RegisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterAddedEvent = WorksheetCollection__RegisterAddedEvent; + function WorksheetCollection__RegisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterColumnSortedEvent = WorksheetCollection__RegisterColumnSortedEvent; + function WorksheetCollection__RegisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__RegisterDataChangedEvent = WorksheetCollection__RegisterDataChangedEvent; + function WorksheetCollection__RegisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterDeletedEvent = WorksheetCollection__RegisterDeletedEvent; + function WorksheetCollection__RegisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterRowSortedEvent = WorksheetCollection__RegisterRowSortedEvent; + function WorksheetCollection__UnregisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterAddedEvent = WorksheetCollection__UnregisterAddedEvent; + function WorksheetCollection__UnregisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterColumnSortedEvent = WorksheetCollection__UnregisterColumnSortedEvent; + function WorksheetCollection__UnregisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__UnregisterDataChangedEvent = WorksheetCollection__UnregisterDataChangedEvent; + function WorksheetCollection__UnregisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterDeletedEvent = WorksheetCollection__UnregisterDeletedEvent; + function WorksheetCollection__UnregisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterRowSortedEvent = WorksheetCollection__UnregisterRowSortedEvent; + function WorksheetCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState + }; + return newArgs; + } + _CC.WorksheetCollection_Changed_EventArgsTransform = WorksheetCollection_Changed_EventArgsTransform; + function WorksheetCollection_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.WorksheetCollection_FormatChanged_EventArgsTransform = WorksheetCollection_FormatChanged_EventArgsTransform; + function WorksheetCollection_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.WorksheetCollection_FormulaChanged_EventArgsTransform = WorksheetCollection_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function WorksheetProtection_Protect(thisObj, options, password) { + if (versionNumberIsEarlierThan({ + mac: { desiredMajor: 16, desiredMinor: 7, desiredBuild: 17101600 }, + ios: { desiredMajor: 2, desiredMinor: 7, desiredBuild: 1016 }, + general: { desiredMajor: 16, desiredMinor: 0, desiredBuild: 8716 } + })) { + _invokeMethod(thisObj, "Protect", 0, [options], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetProtection_Protect = WorksheetProtection_Protect; + })(_CC = Excel._CC || (Excel._CC = {})); + var RangeCustom = (function () { + function RangeCustom() { + } + RangeCustom.prototype._ensureInteger = function (num, methodName) { + if (!(typeof num === "number" && isFinite(num) && Math.floor(num) === num)) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + } + }; + RangeCustom.prototype._getAdjacentRange = function (functionName, count, referenceRange, rowDirection, columnDirection) { + if (count == null) { + count = 1; + } + this._ensureInteger(count, functionName); + var startRange; + var rowOffset = 0; + var columnOffset = 0; + if (count > 0) { + startRange = referenceRange.getOffsetRange(rowDirection, columnDirection); + } + else { + startRange = referenceRange; + rowOffset = rowDirection; + columnOffset = columnDirection; + } + if (Math.abs(count) === 1) { + return startRange; + } + return startRange.getBoundingRect(referenceRange.getOffsetRange(rowDirection * count + rowOffset, columnDirection * count + columnOffset)); + }; + return RangeCustom; + }()); + Excel.RangeCustom = RangeCustom; + (function (_CC) { + function Range_HandleResult(thisObj, value) { + if (!_isUndefined(value["isEntireColumn"])) { + thisObj.m_isEntireColumn = value["isEntireColumn"]; + } + if (!_isUndefined(value["isEntireRow"])) { + thisObj.m_isEntireRow = value["isEntireRow"]; + } + } + _CC.Range_HandleResult = Range_HandleResult; + function Range_GetColumnsAfter(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsAfter", count, thisObj.getLastColumn(), 0, 1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsAfter = Range_GetColumnsAfter; + function Range_GetColumnsBefore(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsBefore", count, thisObj.getColumn(0), 0, -1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsBefore = Range_GetColumnsBefore; + function Range_GetResizedRange(thisObj, deltaRows, deltaColumns) { + if (!isExcel1_3OrAbove()) { + thisObj._ensureInteger(deltaRows, "getResizedRange"); + thisObj._ensureInteger(deltaColumns, "getResizedRange"); + var referenceRange = (deltaRows >= 0 && deltaColumns >= 0) ? thisObj : thisObj.getCell(0, 0); + var result = referenceRange.getBoundingRect(thisObj.getLastCell().getOffsetRange(deltaRows, deltaColumns)); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetResizedRange = Range_GetResizedRange; + function Range_GetRowsAbove(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = thisObj._getAdjacentRange("getRowsAbove", count, thisObj.getRow(0), -1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsAbove = Range_GetRowsAbove; + function Range_GetRowsBelow(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = this._getAdjacentRange("getRowsBelow", count, thisObj.getLastRow(), 1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsBelow = Range_GetRowsBelow; + function Range_Formulas_Set(thisObj, value) { + thisObj.m_formulas = value; + if (setRangePropertiesInBulk(thisObj, "Formulas", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Formulas_Set = Range_Formulas_Set; + function Range_FormulasLocal_Set(thisObj, value) { + thisObj.m_formulasLocal = value; + if (setRangePropertiesInBulk(thisObj, "FormulasLocal", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasLocal_Set = Range_FormulasLocal_Set; + function Range_FormulasR1C1_Set(thisObj, value) { + thisObj.m_formulasR1C1 = value; + if (setRangePropertiesInBulk(thisObj, "FormulasR1C1", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasR1C1_Set = Range_FormulasR1C1_Set; + function Range_NumberFormat_Set(thisObj, value) { + thisObj.m_numberFormat = value; + if (setRangePropertiesInBulk(thisObj, "NumberFormat", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_NumberFormat_Set = Range_NumberFormat_Set; + function Range_Values_Set(thisObj, value) { + thisObj.m_values = value; + if (setRangePropertiesInBulk(thisObj, "Values", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Values_Set = Range_Values_Set; + function Range_ValuesAsJson_Set(thisObj, value) { + thisObj.m_valuesAsJson = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJson", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJson_Set = Range_ValuesAsJson_Set; + function Range_ValuesAsJsonLocal_Set(thisObj, value) { + thisObj.m_valuesAsJsonLocal = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJsonLocal", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJsonLocal_Set = Range_ValuesAsJsonLocal_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function SettingCollection_Add(thisObj, key, value) { + value = _CC._replaceDateWithStringDate(value); + var result = _createMethodObject(Excel.Setting, thisObj, "Add", 0, [key, value], false, true, null, 0); + return { handled: true, result: result }; + } + _CC.SettingCollection_Add = SettingCollection_Add; + function SettingCollection_SettingsChanged_EventArgsTransform(thisObj, args) { + return { + settings: thisObj + }; + } + _CC.SettingCollection_SettingsChanged_EventArgsTransform = SettingCollection_SettingsChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + var DateJSONPrefix = "Date("; + var DateJSONSuffix = ")"; + function _replaceStringDateWithDate(value) { + var strValue = JSON.stringify(value); + value = JSON.parse(strValue, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === DateJSONPrefix && v.slice(-1) === DateJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + return value; + } + function _replaceDateWithStringDate(value) { + var strValue = JSON.stringify(value, function dateReplacer(k, v) { + return (this[k] instanceof Date) ? (DateJSONPrefix + this[k].getTime() + DateJSONSuffix) : v; + }); + value = JSON.parse(strValue); + return value; + } + _CC._replaceDateWithStringDate = _replaceDateWithStringDate; + function Setting_HandleResult(thisObj, value) { + if (!_isUndefined(value["Value"])) { + value["Value"] = _replaceStringDateWithDate(value["Value"]); + } + ; + } + _CC.Setting_HandleResult = Setting_HandleResult; + function Setting_Value_Set(thisObj, value) { + if (!_isNullOrUndefined(value)) { + thisObj.m_value = value; + var newValue = _replaceDateWithStringDate(value); + _invokeSetProperty(thisObj, "Value", newValue, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Setting_Value_Set = Setting_Value_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + var NamedItemCollectionCustom = (function () { + function NamedItemCollectionCustom() { + } + Object.defineProperty(NamedItemCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItemCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return NamedItemCollectionCustom; + }()); + Excel.NamedItemCollectionCustom = NamedItemCollectionCustom; + (function (_CC) { + function Binding_DataChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj + }; + return evt; + } + _CC.Binding_DataChanged_EventArgsTransform = Binding_DataChanged_EventArgsTransform; + function Binding_SelectionChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj, + columnCount: args.columnCount, + rowCount: args.rowCount, + startColumn: args.startColumn, + startRow: args.startRow + }; + return evt; + } + _CC.Binding_SelectionChanged_EventArgsTransform = Binding_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var TableCollectionCustom = (function () { + function TableCollectionCustom() { + } + Object.defineProperty(TableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return TableCollectionCustom; + }()); + Excel.TableCollectionCustom = TableCollectionCustom; + (function (_CC) { + function TableCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.TableCollection_Changed_EventArgsTransform = TableCollection_Changed_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Table_HandleIdResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleIdResult = Table_HandleIdResult; + function Table_HandleResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleResult = Table_HandleResult; + function Table_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.Table_Changed_EventArgsTransform = Table_Changed_EventArgsTransform; + function Table_SelectionChanged_EventArgsTransform(thisObj, args) { + var value = args; + var isAddressNullOrEmpty = (!value.address || value.address.length === 0); + var newArgs = { + type: Excel.EventType.tableSelectionChanged, + isInsideTable: !isAddressNullOrEmpty, + worksheetId: value.worksheetId, + tableId: thisObj.id, + address: value.address + }; + return newArgs; + } + _CC.Table_SelectionChanged_EventArgsTransform = Table_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartCollectionCustom = (function () { + function ChartCollectionCustom() { + } + Object.defineProperty(ChartCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ChartCollectionCustom; + }()); + Excel.ChartCollectionCustom = ChartCollectionCustom; + (function (_CC) { + function ChartCollection_Add(thisObj, type, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); + } + return { handled: false, result: null }; + } + _CC.ChartCollection_Add = ChartCollection_Add; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Chart_SetData(thisObj, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); + } + return { handled: false }; + } + _CC.Chart_SetData = Chart_SetData; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartFillCustom = (function () { + function ChartFillCustom() { + } + ChartFillCustom.prototype.load = function (option) { + _load(this, option); + return this; + }; + return ChartFillCustom; + }()); + Excel.ChartFillCustom = ChartFillCustom; + var VisualCollectionCustom = (function () { + function VisualCollectionCustom() { + } + Object.defineProperty(VisualCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return VisualCollectionCustom; + }()); + Excel.VisualCollectionCustom = VisualCollectionCustom; + (function (_CC) { + function VisualCollection_AgaveVisualUpdate_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: value.type, + payload: value.payload + }; + return newArgs; + } + _CC.VisualCollection_AgaveVisualUpdate_EventArgsTransform = VisualCollection_AgaveVisualUpdate_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Visual_ChangeNotification_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + targetId: value.targetId, + changeType: value.changeType, + payload: value.payload, + type: Excel.EventType.visualChange + }; + return newArgs; + } + _CC.Visual_ChangeNotification_EventArgsTransform = Visual_ChangeNotification_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var PivotTableCollectionCustom = (function () { + function PivotTableCollectionCustom() { + } + Object.defineProperty(PivotTableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return PivotTableCollectionCustom; + }()); + Excel.PivotTableCollectionCustom = PivotTableCollectionCustom; + (function (_CC) { + function PivotLayout_GetColumnLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetColumnLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetColumnLabelRange = PivotLayout_GetColumnLabelRange; + function PivotLayout_GetDataBodyRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetDataBodyRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataBodyRange = PivotLayout_GetDataBodyRange; + function PivotLayout_GetDataHierarchy(thisObj, cell) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + _throwIfApiNotSupported("PivotLayout.getDataHierarchy", _defaultApiSetName, "1.9", _hostName); + var result = _createMethodObject(Excel.DataPivotHierarchy, thisObj, "GetDataHierarchy", 0, [cell], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataHierarchy = PivotLayout_GetDataHierarchy; + function PivotLayout_GetFilterAxisRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetFilterAxisRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetFilterAxisRange = PivotLayout_GetFilterAxisRange; + function PivotLayout_GetRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRange = PivotLayout_GetRange; + function PivotLayout_GetRowLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRowLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRowLabelRange = PivotLayout_GetRowLabelRange; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function PivotField_SortByLabels(thisObj, sortBy) { + if (typeof sortBy === "string") { + sortBy = (sortBy.toLowerCase() === "ascending"); + } + _invokeMethod(thisObj, "SortByLabels", 0, [sortBy], 0, 0); + return { handled: true }; + } + _CC.PivotField_SortByLabels = PivotField_SortByLabels; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormattingService_GetFormatter(thisObj, format) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatting.GetFormatter", "NumberFormatting", "1.1", _hostName); + var result = _createMethodObject(Excel.NumberFormatter, thisObj, "GetFormatter", 0, [format], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormattingService_GetFormatter = NumberFormattingService_GetFormatter; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormatter_Format(thisObj, value) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatter.Format", "NumberFormatting", "1.1", _hostName); + var result = _invokeMethod(thisObj, "Format", 0, [value], 0, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormatter_Format = NumberFormatter_Format; + })(_CC = Excel._CC || (Excel._CC = {})); + var CustomFunctionManagerCustom = (function () { + function CustomFunctionManagerCustom() { + } + CustomFunctionManagerCustom.register = function (metadata, javascript) { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { return Excel.CustomFunctionManager.newObject(context).register(metadata, javascript); }); + }; + CustomFunctionManagerCustom.getStatus = function () { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + var manager = Excel.CustomFunctionManager.newObject(context).load("status"); + return context.sync().then(function () { return manager.status; }); + }); + }; + return CustomFunctionManagerCustom; + }()); + Excel.CustomFunctionManagerCustom = CustomFunctionManagerCustom; + (function (_CC) { + function CustomFunctionManager_StaticCustomize(type) { + type.register = CustomFunctionManagerCustom.register; + type.getStatus = CustomFunctionManagerCustom.getStatus; + } + _CC.CustomFunctionManager_StaticCustomize = CustomFunctionManager_StaticCustomize; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Style_TextOrientation_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_textOrientation = value; + _invokeSetProperty(thisObj, "Orientation", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Style_TextOrientation_Set = Style_TextOrientation_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function InternalTest_Test1Event_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_Test1Event_EventArgsTransform = InternalTest_Test1Event_EventArgsTransform; + function InternalTest_TestEvent_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_TestEvent_EventArgsTransform = InternalTest_TestEvent_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var CommentCollectionCustom = (function () { + function CommentCollectionCustom() { + } + Object.defineProperty(CommentCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return CommentCollectionCustom; + }()); + Excel.CommentCollectionCustom = CommentCollectionCustom; + var ShapeCollectionCustom = (function () { + function ShapeCollectionCustom() { + } + Object.defineProperty(ShapeCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ShapeCollectionCustom; + }()); + Excel.ShapeCollectionCustom = ShapeCollectionCustom; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["accessDenied"] = "AccessDenied"; + ErrorCodes["apiNotFound"] = "ApiNotFound"; + ErrorCodes["conflict"] = "Conflict"; + ErrorCodes["emptyChartSeries"] = "EmptyChartSeries"; + ErrorCodes["filteredRangeConflict"] = "FilteredRangeConflict"; + ErrorCodes["formulaLengthExceedsLimit"] = "FormulaLengthExceedsLimit"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["inactiveWorkbook"] = "InactiveWorkbook"; + ErrorCodes["insertDeleteConflict"] = "InsertDeleteConflict"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidBinding"] = "InvalidBinding"; + ErrorCodes["invalidOperation"] = "InvalidOperation"; + ErrorCodes["invalidReference"] = "InvalidReference"; + ErrorCodes["invalidSelection"] = "InvalidSelection"; + ErrorCodes["itemAlreadyExists"] = "ItemAlreadyExists"; + ErrorCodes["itemNotFound"] = "ItemNotFound"; + ErrorCodes["mergedRangeConflict"] = "MergedRangeConflict"; + ErrorCodes["nonBlankCellOffSheet"] = "NonBlankCellOffSheet"; + ErrorCodes["notImplemented"] = "NotImplemented"; + ErrorCodes["openWorkbookLinksBlocked"] = "OpenWorkbookLinksBlocked"; + ErrorCodes["operationCellsExceedLimit"] = "OperationCellsExceedLimit"; + ErrorCodes["pivotTableRangeConflict"] = "PivotTableRangeConflict"; + ErrorCodes["powerQueryRefreshResourceChallenge"] = "PowerQueryRefreshResourceChallenge"; + ErrorCodes["rangeExceedsLimit"] = "RangeExceedsLimit"; + ErrorCodes["refreshWorkbookLinksBlocked"] = "RefreshWorkbookLinksBlocked"; + ErrorCodes["requestAborted"] = "RequestAborted"; + ErrorCodes["responsePayloadSizeLimitExceeded"] = "ResponsePayloadSizeLimitExceeded"; + ErrorCodes["unsupportedFeature"] = "UnsupportedFeature"; + ErrorCodes["unsupportedFillType"] = "UnsupportedFillType"; + ErrorCodes["unsupportedOperation"] = "UnsupportedOperation"; + ErrorCodes["unsupportedSheet"] = "UnsupportedSheet"; + ErrorCodes["invalidOperationInCellEditMode"] = "InvalidOperationInCellEditMode"; + })(ErrorCodes = Excel.ErrorCodes || (Excel.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = {})); + var _libraryMetadataXlapi = { "version": "1.0.0", + "name": "Excel", + "defaultApiSetName": "ExcelApi", + "hostName": "Excel", + "apiSets": [["1.19", "ExcelApiUndo"], ["1.1", "Recorder"], ["99.9"], ["1.4", "ExcelApiUndo"], ["1.8"], ["1.9"], ["1.11"], ["1.18"], ["1.6"], ["1.6", "ExcelApiUndo"], ["1.7"], ["1.1", "ExcelApiUndo"], ["1.2"], ["1.3"], ["1.4"], ["1.5"], ["1.10"], ["1.14"], ["1.1", "ExcelApiOnline"], ["1.1", "CustomFunctions"], ["1.1", "WACOperationEvents"], ["1.3", "ExcelApiUndo"], ["1.13"], ["1.16"], ["1.8", "ExcelApiUndo"], ["1.16", "ExcelApiUndo"], ["1.12"], ["1.2", "ExcelApiOnline"], ["1.2", "ExcelApiUndo"], ["1.17"], ["1.7", "ExcelApiUndo"], ["1.10", "ExcelApiUndo"], ["1.14", "ExcelApiUndo"], ["1.15", "ExcelApiUndo"], ["1.15"], ["1.17", "ExcelApiUndo"], ["99.99", "ExcelApiUndo"], ["1.9", "ExcelApiUndo"], ["1.11", "ExcelApiUndo"], ["1.12", "ExcelApiUndo"], ["1.13", "ExcelApiUndo"], ["1.18", "ExcelApiUndo"]], + "strings": [], + "enumTypes": [["UndoChangeType", ["undoAction", "redoAction", "undoOrRedoCleared", "undoGroupAdded"]], + ["SDX", ["guidedReapply"]], + ["BusinessBarEntryType", [], { "officeScriptsRunningStatus": 0, "msFormsDataSyncRunningStatus": 1 }], + ["FormulaReferenceStyle", ["a1", "r1C1"]], + ["NavigationObjectType", ["table", "pivotTable", "chart", "shape", "namedRange"]], + ["UserActivityType", ["none", "insertSheet", "deleteSheet", "renameSheet", "changeCell", "insertRow", "insertColumn", "deleteRow", "deleteColumn", "insertPartialRow", "insertPartialColumn", "insertPartialColumnRightToLeft", "deletePartialRow", "deletePartialColumn", "deletePartialColumnRightToLeft", "move", "sort", "mergeCells", "unmergeCells", "unknownOperation", "genericEdit"]], + ["LineageEndOfLogStatus", ["loadInProgress", "success", "endOfLog", "purged", "trimmed", "unsupported", "cleared", "error"]], + ["LineageLoadType", ["new", "next", "previous", "latest"]], + ["LoadToType", ["connectionOnly", "table", "pivotTable", "pivotChart"]], + ["QueryError", ["unknown", "none", "failedLoadToWorksheet", "failedLoadToDataModel", "failedDownload", "failedToCompleteDownload"]], + ["RangeOptimizationType", ["other", "numberFormat", "textAlignment", "textProperties", "cellBorder", "fillColor", "sheetProtection", "rowHeight", "rowVisibility"]], + ["WorkbookLinksHardToFindMessages", ["none", "containsDefinedNames", "hiddenOrVeryHiddenSheet", "hiddenFloatingObjects", "lockedFloatingObjectsThroughVba", "protectedSheet", "containsConditionalFormatting", "containsDataValidation", "hiddenRowsAndColumns"]], + ["WorkbookLinksIconState", ["ok", "moreInfo", "warning"]], + ["WorkbookLinksRefreshSettings", ["ask", "always", "never"]], + ["WorkbookConditionalFormattingRulesManagerScope", ["defaultScope", "selectedRange", "activatedWorksheet", "activatedTable", "activatedPivotTable"]], + ["WorkbookLinksRefreshMode", ["manual", "automatic"]], + ["HelpTopic", ["showChanges", "guidedReapply", "externalCodeServiceDiagnostics"]], + ["DocumentTaskChangeAction", [], { "unknown": "unknown", "create": "create", "assign": "assign", "unassign": "unassign", "unassignAll": "unassignAll", "setSchedule": "setSchedule", "setPercentComplete": "setPercentComplete", "setPriority": "setPriority", "remove": "remove", "restore": "restore", "setTitle": "setTitle", "undo": "undo" }], + ["DataSourceType", ["unknown", "cube", "localRange", "localTable", "oledbDefault"]], + ["DateFilterCondition", ["unknown", "equals", "before", "beforeOrEqualTo", "after", "afterOrEqualTo", "between", "tomorrow", "today", "yesterday", "nextWeek", "thisWeek", "lastWeek", "nextMonth", "thisMonth", "lastMonth", "nextQuarter", "thisQuarter", "lastQuarter", "nextYear", "thisYear", "lastYear", "yearToDate", "allDatesInPeriodQuarter1", "allDatesInPeriodQuarter2", "allDatesInPeriodQuarter3", "allDatesInPeriodQuarter4", "allDatesInPeriodJanuary", "allDatesInPeriodFebruary", "allDatesInPeriodMarch", "allDatesInPeriodApril", "allDatesInPeriodMay", "allDatesInPeriodJune", "allDatesInPeriodJuly", "allDatesInPeriodAugust", "allDatesInPeriodSeptember", "allDatesInPeriodOctober", "allDatesInPeriodNovember", "allDatesInPeriodDecember"]], + ["LabelFilterCondition", ["unknown", "equals", "beginsWith", "endsWith", "contains", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between"]], + ["PivotFilterType", ["unknown", "value", "manual", "label", "date"]], + ["TopBottomSelectionType", ["items", "percent", "sum"]], + ["ValueFilterCondition", ["unknown", "equals", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between", "topN", "bottomN"]], + ["BuiltInPivotTableStyle", ["none", "light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "light22", "light23", "light24", "light25", "light26", "light27", "light28", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11", "dark12", "dark13", "dark14", "dark15", "dark16", "dark17", "dark18", "dark19", "dark20", "dark21", "dark22", "dark23", "dark24", "dark25", "dark26", "dark27", "dark28"]], + ["BuiltInSlicerStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "other1", "other2", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6"]], + ["BuiltInTableStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11"]], + ["ChartSeriesDimension", ["categories", "values", "bubbleSizes"], { "xvalues": "XValues", "yvalues": "YValues" }], + ["PivotTableDateGroupBy", ["invalid", "bySeconds", "byMinutes", "byHours", "byDays", "byMonths", "byQuarters", "byYears"]], + ["PivotFilterTopBottomCriterion", ["invalid", "topItems", "topPercent", "topSum", "bottomItems", "bottomPercent", "bottomSum"]], + ["SortBy", ["ascending", "descending"]], + ["AggregationFunction", ["unknown", "automatic", "sum", "count", "average", "max", "min", "product", "countNumbers", "standardDeviation", "standardDeviationP", "variance", "varianceP"]], + ["ShowAsCalculation", ["unknown", "none", "percentOfGrandTotal", "percentOfRowTotal", "percentOfColumnTotal", "percentOfParentRowTotal", "percentOfParentColumnTotal", "percentOfParentTotal", "percentOf", "runningTotal", "percentRunningTotal", "differenceFrom", "percentDifferenceFrom", "rankAscending", "rankDecending", "index"]], + ["PivotAxis", ["unknown", "row", "column", "data", "filter"]], + ["LinkedDataTypeRefreshMode", ["unknown", "manual", "onLoad", "periodic"]], + ["AxisType", ["invalid", "category", "value", "series"]], + ["AxisGroup", ["primary", "secondary"]], + ["AxisScaleType", ["linear", "logarithmic"]], + ["AxisCrosses", ["automatic", "maximum", "minimum", "custom"]], + ["AxisTickMark", ["none", "cross", "inside", "outside"]], + ["AxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["TrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ChartAxisType", ["invalid", "category", "value", "series"]], + ["ChartAxisGroup", ["primary", "secondary"]], + ["ChartAxisScaleType", ["linear", "logarithmic"]], + ["ChartAxisPosition", ["automatic", "maximum", "minimum", "custom"]], + ["ChartAxisTickMark", ["none", "cross", "inside", "outside"]], + ["CalculationState", ["done", "calculating", "pending"]], + ["ChartAxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["ChartAxisDisplayUnit", ["none", "hundreds", "thousands", "tenThousands", "hundredThousands", "millions", "tenMillions", "hundredMillions", "billions", "trillions", "custom"]], + ["ChartAxisTimeUnit", ["days", "months", "years"]], + ["ChartBoxQuartileCalculation", ["inclusive", "exclusive"]], + ["ChartAxisCategoryType", ["automatic", "textAxis", "dateAxis"]], + ["ChartBinType", ["category", "auto", "binWidth", "binCount"]], + ["ChartLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "grey25", "grey50", "grey75", "automatic", "roundDot"]], + ["ChartDataLabelPosition", ["invalid", "none", "center", "insideEnd", "insideBase", "outsideEnd", "left", "right", "top", "bottom", "bestFit", "callout"]], + ["ChartErrorBarsInclude", ["both", "minusValues", "plusValues"]], + ["ChartErrorBarsType", ["fixedValue", "percent", "stDev", "stError", "custom"]], + ["ChartMapAreaLevel", ["automatic", "dataOnly", "city", "county", "state", "country", "continent", "world"]], + ["ChartGradientStyle", ["twoPhaseColor", "threePhaseColor"]], + ["ChartGradientStyleType", ["extremeValue", "number", "percent"]], + ["ChartTitlePosition", ["automatic", "top", "bottom", "left", "right"]], + ["ChartLegendPosition", ["invalid", "top", "bottom", "left", "right", "corner", "custom"]], + ["ChartMarkerStyle", ["invalid", "automatic", "none", "square", "diamond", "triangle", "star", "dot", "dash", "circle", "plus", "picture"], { "x": "X" }], + ["ChartPlotAreaPosition", ["automatic", "custom"]], + ["ChartMapLabelStrategy", ["none", "bestFit", "showAll"]], + ["ChartMapProjectionType", ["automatic", "mercator", "miller", "robinson", "albers"]], + ["ChartParentLabelStrategy", ["none", "banner", "overlapping"]], + ["ChartSeriesBy", ["auto", "columns", "rows"]], + ["ChartDataSourceType", ["localRange", "externalRange", "list", "unknown"]], + ["ChartTextHorizontalAlignment", ["center", "left", "right", "justify", "distributed"]], + ["ChartTextVerticalAlignment", ["center", "bottom", "top", "justify", "distributed"]], + ["ChartTickLabelAlignment", ["center", "left", "right"]], + ["ChartType", ["invalid", "columnClustered", "columnStacked", "columnStacked100", "barClustered", "barStacked", "barStacked100", "lineStacked", "lineStacked100", "lineMarkers", "lineMarkersStacked", "lineMarkersStacked100", "pieOfPie", "pieExploded", "barOfPie", "areaStacked", "areaStacked100", "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", "line", "pie", "area", "doughnut", "radar", "histogram", "boxwhisker", "pareto", "regionMap", "treemap", "waterfall", "sunburst", "funnel"], { "_3DColumnClustered": "3DColumnClustered", "_3DColumnStacked": "3DColumnStacked", "_3DColumnStacked100": "3DColumnStacked100", "_3DBarClustered": "3DBarClustered", "_3DBarStacked": "3DBarStacked", "_3DBarStacked100": "3DBarStacked100", "_3DPieExploded": "3DPieExploded", "xyscatterSmooth": "XYScatterSmooth", "xyscatterSmoothNoMarkers": "XYScatterSmoothNoMarkers", "xyscatterLines": "XYScatterLines", "xyscatterLinesNoMarkers": "XYScatterLinesNoMarkers", "_3DAreaStacked": "3DAreaStacked", "_3DAreaStacked100": "3DAreaStacked100", "_3DColumn": "3DColumn", "_3DLine": "3DLine", "_3DPie": "3DPie", "xyscatter": "XYScatter", "_3DArea": "3DArea" }], + ["ChartUnderlineStyle", ["none", "single"]], + ["ChartDisplayBlanksAs", ["notPlotted", "zero", "interplotted"]], + ["ChartPlotBy", ["rows", "columns"]], + ["ChartSplitType", ["splitByPosition", "splitByValue", "splitByPercentValue", "splitByCustomSplit"]], + ["ChartColorScheme", ["colorfulPalette1", "colorfulPalette2", "colorfulPalette3", "colorfulPalette4", "monochromaticPalette1", "monochromaticPalette2", "monochromaticPalette3", "monochromaticPalette4", "monochromaticPalette5", "monochromaticPalette6", "monochromaticPalette7", "monochromaticPalette8", "monochromaticPalette9", "monochromaticPalette10", "monochromaticPalette11", "monochromaticPalette12", "monochromaticPalette13"]], + ["ChartTrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ShapeZOrder", ["bringToFront", "bringForward", "sendToBack", "sendBackward"]], + ["ShapeType", ["unsupported", "image", "geometricShape", "group", "line"]], + ["ShapeScaleType", ["currentSize", "originalSize"]], + ["ShapeScaleFrom", ["scaleFromTopLeft", "scaleFromMiddle", "scaleFromBottomRight"]], + ["ShapeFillType", ["noFill", "solid", "gradient", "pattern", "pictureAndTexture", "mixed"]], + ["ShapeFontUnderlineStyle", ["none", "single", "double", "heavy", "dotted", "dottedHeavy", "dash", "dashHeavy", "dashLong", "dashLongHeavy", "dotDash", "dotDashHeavy", "dotDotDash", "dotDotDashHeavy", "wavy", "wavyHeavy", "wavyDouble"]], + ["PictureFormat", [], { "unknown": "UNKNOWN", "bmp": "BMP", "jpeg": "JPEG", "gif": "GIF", "png": "PNG", "svg": "SVG" }], + ["ShapeLineStyle", ["single", "thickBetweenThin", "thickThin", "thinThick", "thinThin"]], + ["ShapeLineDashStyle", ["dash", "dashDot", "dashDotDot", "longDash", "longDashDot", "roundDot", "solid", "squareDot", "longDashDotDot", "systemDash", "systemDot", "systemDashDot"]], + ["ArrowheadLength", ["short", "medium", "long"]], + ["ArrowheadStyle", ["none", "triangle", "stealth", "diamond", "oval", "open"]], + ["ArrowheadWidth", ["narrow", "medium", "wide"]], + ["PremiumLicenseName", ["python"]], + ["BindingType", ["range", "table", "text"]], + ["BorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight", "insideVertical", "insideHorizontal", "diagonalDown", "diagonalUp"]], + ["BorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "double", "slantDashDot"]], + ["BorderWeight", ["hairline", "thin", "medium", "thick"]], + ["CalculationMode", ["automatic", "automaticExceptTables", "manual"]], + ["RuntimeCalculationMode", [], { "undefined": 0, "automatic": 1, "automaticExceptTables": 2, "manual": 3 }], + ["CalculationType", ["recalculate", "full", "fullRebuild"]], + ["ClearApplyTo", ["all", "formats", "contents", "hyperlinks", "removeHyperlinks"]], + ["VisualCategory", ["column", "bar", "line", "area", "pie", "donut", "scatter", "bubble", "statistical", "stock", "combo", "hierarchy", "surface", "map", "funnel", "radar", "waterfall", "threeD", "other"]], + ["VisualPropertyType", ["object", "collection", "string", "double", "int", "bool", "enum", "color"]], + ["VisualChangeType", ["dataChange", "propertyChange", "genericChange", "selectionChange"]], + ["BoolMetaPropertyType", ["writeOnly", "readOnly", "hideEntireSubtreeUI", "hideMeButShowChildrenUI", "expandableUI", "nextPropOnSameLine", "hideLabel", "showResetUI", "hasOwnExpandableSection", "nextPropOnSameLineFOTP", "showResetUIFOTP", "untransferable", "ignoreDuringChangeChartType", "notTriviallyUndoable", "volatileEnum", "exceptionCollection", "metaOnly", "showHideCollection", "errorMessage", "infoMessage"]], + ["ConditionalDataBarAxisFormat", ["automatic", "none", "cellMidPoint"]], + ["ConditionalDataBarDirection", ["context", "leftToRight", "rightToLeft"]], + ["ConditionalFormatDirection", ["top", "bottom"]], + ["ConditionalFormatType", ["custom", "dataBar", "colorScale", "iconSet", "topBottom", "presetCriteria", "containsText", "cellValue"]], + ["ConditionalFormatRuleType", ["invalid", "automatic", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatIconRuleType", ["invalid", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatColorCriterionType", ["invalid", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalTopBottomCriterionType", ["invalid", "topItems", "topPercent", "bottomItems", "bottomPercent"]], + ["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"]], + ["ConditionalTextOperator", ["invalid", "contains", "notContains", "beginsWith", "endsWith"]], + ["ConditionalCellValueOperator", ["invalid", "between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqual", "lessThanOrEqual"]], + ["ConditionalIconCriterionOperator", ["invalid", "greaterThan", "greaterThanOrEqual"]], + ["ConditionalRangeBorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight"]], + ["ConditionalRangeBorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot"]], + ["ConditionalRangeFontUnderlineStyle", ["none", "single", "double"]], + ["CustomFunctionType", ["invalid", "script", "webService"]], + ["CustomFunctionMetadataFormat", ["invalid", "openApi"]], + ["DataValidationType", ["none", "wholeNumber", "decimal", "list", "date", "time", "textLength", "custom", "inconsistent", "mixedCriteria"]], + ["DataValidationOperator", ["between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqualTo", "lessThanOrEqualTo"]], + ["DataValidationAlertStyle", ["stop", "warning", "information"]], + ["DeleteShiftDirection", ["up", "left"]], + ["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"]], + ["FilterDatetimeSpecificity", ["year", "month", "day", "hour", "minute", "second"]], + ["FilterOn", ["bottomItems", "bottomPercent", "cellColor", "dynamic", "fontColor", "values", "topItems", "topPercent", "icon", "custom"]], + ["FilterOperator", ["and", "or"]], + ["HorizontalAlignment", ["general", "left", "center", "right", "fill", "justify", "centerAcrossSelection", "distributed"]], + ["IconSet", ["invalid", "threeArrows", "threeArrowsGray", "threeFlags", "threeTrafficLights1", "threeTrafficLights2", "threeSigns", "threeSymbols", "threeSymbols2", "fourArrows", "fourArrowsGray", "fourRedToBlack", "fourRating", "fourTrafficLights", "fiveArrows", "fiveArrowsGray", "fiveRating", "fiveQuarters", "threeStars", "threeTriangles", "fiveBoxes"]], + ["ImageFittingMode", ["fit", "fitAndCenter", "fill"]], + ["InsertShiftDirection", ["down", "right"]], + ["NamedItemScope", ["worksheet", "workbook"]], + ["NamedItemType", ["string", "integer", "double", "boolean", "range", "error", "array"]], + ["RangeUnderlineStyle", ["none", "single", "double", "singleAccountant", "doubleAccountant"]], + ["SheetVisibility", ["visible", "hidden", "veryHidden"]], + ["EventTriggerSource", ["unknown", "thisLocalAddin"]], + ["RangeValueType", ["unknown", "empty", "string", "integer", "double", "boolean", "error", "richValue"]], + ["KeyboardDirection", ["left", "right", "up", "down"]], + ["SearchDirection", ["forward", "backwards"]], + ["SortOrientation", ["rows", "columns"]], + ["SortOn", ["value", "cellColor", "fontColor", "icon"]], + ["SortDataOption", ["normal", "textAsNumber"]], + ["SortMethod", ["pinYin", "strokeCount"]], + ["VerticalAlignment", ["top", "center", "bottom", "justify", "distributed"]], + ["MessageCategory", [], { "none": 0, "customFunction": 1, "action": 2, "event": 65536 }], + ["MessageType", [], { "none": 0, "testEvent": 1, "test1Event": 2, "worksheetDataChangedEvent": 10, "worksheetActivatedEvent": 11, "worksheetDeactivatedEvent": 12, "worksheetAddedEvent": 13, "worksheetSelectionChangedEvent": 14, "worksheetDeletedEvent": 15, "worksheetCalculatedEvent": 16, "worksheetFilteredEvent": 17, "worksheetFormatChangedEvent": 18, "worksheetRowSortedEvent": 19, "worksheetColumnSortedEvent": 20, "worksheetSingleClickedEvent": 21, "worksheetRowHiddenChangedEvent": 22, "worksheetFormulaChangedEvent": 23, "worksheetProtectionChangedEvent": 24, "worksheetNameChangedEvent": 25, "worksheetVisibilityChangedEvent": 26, "worksheetMovedEvent": 27, "worksheetNavigationObjectChangedEvent": 28, "worksheetRowHeightChangedEvent": 29, "workbookFormulaReferenceStyleChangedEvent": 30, "chartAddedEvent": 50, "chartActivatedEvent": 51, "chartDeactivatedEvent": 52, "chartDeletedEvent": 53, "tableSelectionChangedEvent": 100, "tableDataChangedEvent": 101, "tableAddedEvent": 102, "tableDeletedEvent": 103, "tableFilteredEvent": 104, "agaveVisualUpdateEvent": 150, "customFunctionExecutionBeginEvent": 200, "customFunctionExecutionEndEvent": 201, "commentAddedEvent": 250, "commentDeletedEvent": 251, "commentChangedEvent": 252, "invocationMessage": 1000, "cancellationMessage": 1001, "metadataMessage": 1002, "visualSelectionChangedEvent": 2000, "visualChangeEvent": 2001, "visualTrackerModelChangedEvent": 2002, "shapeSelectionChangedEvent": 2100, "shapeActivatedEvent": 2101, "shapeDeactivatedEvent": 2102, "shapeAddedEvent": 2103, "shapeDeletedEvent": 2104, "workbookAutoSaveSettingChangedEvent": 2200, "wacoperationEvent": 2201, "recordingStateChangedEvent": 2202, "workbookActivatedEvent": 2203, "workbookNavigationObjectChangedEvent": 2204, "ribbonCommandExecutedEvent": 2300, "linkedDataTypeRefreshRequestCompletedEvent": 2500, "linkedDataTypeRefreshModeChangedEvent": 2501, "linkedDataTypeLinkedDataTypeAddedEvent": 2502, "linkedWorkbookWorkbookLinksChangedEvent": 2600, "linkedWorkbookRefreshCompletedEvent": 2601, "rangePickerSelectionChangedEvent": 2700, "rangePickerDeactivatedEvent": 2701, "lineageActivityUpdateAvailableEvent": 2800, "lineageActivityFilterUpdatedEvent": 2801, "lineageActivityLoadCompletedEvent": 2802, "pivotTableAddedEvent": 2900, "pivotTableDeletedEvent": 2901, "namedItemAddedEvent": 3000, "namedItemDeletedEvent": 3001, "guidedReapplyManagerUpdateAvailableEvent": 3100, "vbaRecorderRecordingChangedEvent": 3200, "vbaRecorderRecordingChanged2Event": 3202, "workbookActionRecordedEvent": 3201, "externalCodeServiceDiagnosticsNewEntryEvent": 3300, "externalCodeServiceDiagnosticsFilterUpdatedEvent": 3301, "rangeValuesPreviewDismissedEvent": 3400, "applicationUndoChangedEvent": 3500, "appRuntimeVisibilityChangedEvent": 65539, "beforeCloseNotifiactionCancelledEvent": 65540, "augmentationLoopAnnotationAddedEvent": 65541 }], + ["InsertDeleteCellsShiftDirection", ["none", "shiftCellLeft", "shiftCellUp", "shiftCellRight", "shiftCellDown"]], + ["DocumentPropertyType", ["number", "boolean", "date", "string", "float"]], + ["EventSource", ["local", "remote"]], + ["DataChangeType", ["unknown", "rangeEdited", "rowInserted", "rowDeleted", "columnInserted", "columnDeleted", "cellInserted", "cellDeleted"]], + ["RowHiddenChangeType", ["unhidden", "hidden"]], + ["CommentChangeType", ["commentEdited", "commentResolved", "commentReopened", "replyAdded", "replyDeleted", "replyEdited"]], + ["EventType", ["worksheetChanged", "worksheetSelectionChanged", "worksheetAdded", "worksheetActivated", "worksheetDeactivated", "tableChanged", "tableSelectionChanged", "worksheetDeleted", "chartAdded", "chartActivated", "chartDeactivated", "chartDeleted", "worksheetCalculated", "visualSelectionChanged", "agaveVisualUpdate", "tableAdded", "tableDeleted", "tableFiltered", "worksheetFiltered", "shapeActivated", "shapeDeactivated", "visualChange", "workbookAutoSaveSettingChanged", "worksheetFormatChanged", "ribbonCommandExecuted", "worksheetRowSorted", "worksheetColumnSorted", "worksheetSingleClicked", "worksheetRowHiddenChanged", "recordingStateChangedEvent", "commentAdded", "commentDeleted", "commentChanged", "linkedDataTypeRefreshRequestCompleted", "linkedDataTypeRefreshModeChanged", "linkedDataTypeLinkedDataTypeAdded", "worksheetFormulaChanged", "workbookActivated", "linkedWorkbookWorkbookLinksChanged", "linkedWorkbookRefreshCompleted", "worksheetProtectionChanged", "worksheetNameChanged", "worksheetVisibilityChanged", "worksheetMoved", "lineageActivityUpdateAvailable", "lineageActivityFilterUpdated", "lineageActivityLoadCompleted", "shapeAdded", "shapeDeleted", "pivotTableAdded", "pivotTableDeleted", "namedItemAdded", "namedItemDeleted", "worksheetNavigationObjectChanged", "workbookNavigationObjectChanged", "worksheetRowHeightChanged", "workbookFormulaReferenceStyleChanged", "guidedReapplyManagerUpdateAvailable", "vbaRecorderRecordingChanged", "rangeValuesPreviewDismissed", "annotationAdded", "workbookActionRecorded", "applicationUndoChanged", "vbaRecorderRecordingChanged2"], { "wacoperationEvent": "WACOperationEvent" }], + ["DocumentPropertyItem", ["title", "subject", "author", "keywords", "comments", "template", "lastAuth", "revision", "appName", "lastPrint", "creation", "lastSave", "category", "format", "manager", "company"]], + ["SubtotalLocationType", ["atTop", "atBottom", "off"]], + ["PivotLayoutType", ["compact", "tabular", "outline"]], + ["ProtectionSelectionMode", ["normal", "unlocked", "none"]], + ["PageOrientation", ["portrait", "landscape"]], + ["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"]], + ["ReadingOrder", ["context", "leftToRight", "rightToLeft"]], + ["BuiltInStyle", ["normal", "comma", "currency", "percent", "wholeComma", "wholeDollar", "hlink", "hlinkTrav", "note", "warningText", "emphasis1", "emphasis2", "emphasis3", "sheetTitle", "heading1", "heading2", "heading3", "heading4", "input", "output", "calculation", "checkCell", "linkedCell", "total", "good", "bad", "neutral", "accent1", "accent1_20", "accent1_40", "accent1_60", "accent2", "accent2_20", "accent2_40", "accent2_60", "accent3", "accent3_20", "accent3_40", "accent3_60", "accent4", "accent4_20", "accent4_40", "accent4_60", "accent5", "accent5_20", "accent5_40", "accent5_60", "accent6", "accent6_20", "accent6_40", "accent6_60", "explanatoryText"]], + ["PrintErrorType", ["asDisplayed", "blank", "dash", "notAvailable"]], + ["WorksheetPositionType", ["none", "before", "after", "beginning", "end"]], + ["PrintComments", ["noComments", "endSheet", "inPlace"]], + ["PrintOrder", ["downThenOver", "overThenDown"]], + ["PrintMarginUnit", ["points", "inches", "centimeters"]], + ["HeaderFooterState", ["default", "firstAndDefault", "oddAndEven", "firstOddAndEven"]], + ["AutoFillType", ["fillDefault", "fillCopy", "fillSeries", "fillFormats", "fillValues", "fillDays", "fillWeekdays", "fillMonths", "fillYears", "linearTrend", "growthTrend", "flashFill"]], + ["GroupOption", ["byRows", "byColumns"]], + ["RangeCopyType", ["all", "formulas", "values", "formats", "link"]], + ["LinkedDataTypeState", ["none", "validLinkedData", "disambiguationNeeded", "brokenLinkedData", "fetchingData"]], + ["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"]], + ["ConnectorType", ["straight", "elbow", "curve"]], + ["ContentType", ["plain", "mention"]], + ["SpecialCellType", ["conditionalFormats", "dataValidations", "blanks", "constants", "formulas", "sameConditionalFormat", "sameDataValidation", "visible"]], + ["SpecialCellValueType", ["all", "errors", "errorsLogical", "errorsNumbers", "errorsText", "errorsLogicalNumber", "errorsLogicalText", "errorsNumberText", "logical", "logicalNumbers", "logicalText", "logicalNumbersText", "numbers", "numbersText", "text"]], + ["Placement", ["twoCell", "oneCell", "absolute"]], + ["FillPattern", ["none", "solid", "gray50", "gray75", "gray25", "horizontal", "vertical", "down", "up", "checker", "semiGray75", "lightHorizontal", "lightVertical", "lightDown", "lightUp", "grid", "crissCross", "gray16", "gray8", "linearGradient", "rectangularGradient"]], + ["ShapeTextHorizontalAlignment", ["left", "center", "right", "justify", "justifyLow", "distributed", "thaiDistributed"]], + ["ShapeTextVerticalAlignment", ["top", "middle", "bottom", "justified", "distributed"]], + ["ShapeTextVerticalOverflow", ["overflow", "ellipsis", "clip"]], + ["ShapeTextHorizontalOverflow", ["overflow", "clip"]], + ["ShapeTextReadingOrder", ["leftToRight", "rightToLeft"]], + ["ShapeTextOrientation", ["horizontal", "vertical", "vertical270", "wordArtVertical", "eastAsianVertical", "mongolianVertical", "wordArtVerticalRTL"]], + ["ShapeAutoSize", ["autoSizeNone", "autoSizeTextToFitShape", "autoSizeShapeToFitText", "autoSizeMixed"]], + ["CloseBehavior", ["save", "skipSave"]], + ["SaveBehavior", ["save", "prompt"]], + ["SlicerSortType", ["dataSourceOrder", "ascending", "descending"]], + ["RibbonTab", ["others", "home", "insert", "draw", "pageLayout", "formulas", "data", "review", "view", "developer", "addIns", "help"]], + ["NumberFormatCategory", ["general", "number", "currency", "accounting", "date", "time", "percentage", "fraction", "scientific", "text", "special", "custom"]]], + "clientObjectTypes": [["UndoScope", + 0, + 0, + 0, + [["close", + 0, + 0, + 0, + 2], + ["open", + 1, + 0, + 0, + 2]]], + ["RangeValuesPreview", + 4, + 0, + 0, + [["_RegisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["dismiss", + 0, + 2, + 0, + 4], + ["show", + 3, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Dismissed", + 0, + 0, + "MessageType.rangeValuesPreviewDismissedEvent", + "this._ParentObject.id", + "_RegisterEventDismissed", + "_UnregisterEventDismissed"]]], + ["AugmentationLoop", + 0, + 0, + 0, + [["_RegisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["activateAnnotation", + 1, + 2, + 0, + 4], + ["submitSignal", + 1, + 2, + 0, + 4]], + 0, + 0, + 0, + [["AnnotationAdded", + 0, + 0, + "MessageType.augmentationLoopAnnotationAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAnnotationAddedEvent", + "_UnregisterAnnotationAddedEvent"]]], + ["ExternalCodeService", + 0, + 0, + [["diagnostics", + "ExternalCodeServiceDiagnostics", + 2, + 0, + 0, + 4]]], + ["ExternalCodeServiceDiagnostics", + 0, + [["id", + 2]], + 0, + [["_RegisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["clear", + 0, + 2, + 0, + 4], + ["fireStoredEntries", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1]], + 0, + 0, + 0, + [["FilterUpdated", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent", + "this.id", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["NewEntry", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsNewEntryEvent", + "this.id", + "_RegisterEventNewEntry", + "_UnregisterEventNewEntry"]]], + ["VbaRecorder", + 0, + [["id", + 2]], + 0, + [["_RegisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterEventRecordingChanged2", + 0, + 2, + 2, + 4], + ["_UnregisterEventRecordingChanged2", + 0, + 2, + 2, + 4]], + 0, + 0, + 0, + [["RecordingChanged", + 0, + 0, + "MessageType.vbaRecorderRecordingChangedEvent", + "this.id", + "_RegisterEventRecordingChanged", + "_UnregisterEventRecordingChanged"], + ["RecordingChanged2", + 0, + 2, + "MessageType.vbaRecorderRecordingChanged2Event", + "this.id", + "_RegisterEventRecordingChanged2", + "_UnregisterEventRecordingChanged2"]]], + ["WorksheetOptimizationScanResult", + 0, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + [["ranges", + "RangeOptimizationCollection", + 18, + 0, + 0, + 4]]], + ["UserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity"], + ["GuidedReapplyManager", + 0, + 0, + [["activities", + "UserActivityCollection", + 18, + 0, + 0, + 4], + ["summaryCardUserActivity", + "SummaryCardUserActivity", + 2, + 0, + 0, + 4]], + [["openSavedFile", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["discardActivites", + 0, + 2, + 0, + 4], + ["reapplyActivity", + 1, + 2, + 0, + 4], + ["saveActivities", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["UpdateAvailable", + 0, + 0, + "MessageType.guidedReapplyManagerUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["BusinessBar", + 0, + 0, + 0, + [["hide", + 2], + ["show", + 2]]], + ["UserActivity", + 0, + [["activityId", + 2], + ["activityType", + 2], + ["author", + 2], + ["createdDateTime", + 10], + ["guid", + 2], + ["rangeAddress", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2], + ["authorEmail", + 2], + ["locationDeleted", + 2]], + [["highlightRangeAreas", + "RangeAreas", + 2, + 0, + 0, + 4]]], + ["LineageActivityCollection", + 1, + 0, + 0, + [["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["clear", + 0, + 2, + 0, + 4], + ["getCount", + 0, + 2, + 0, + 4], + ["getState", + 0, + 2, + 0, + 4], + ["loadActivities", + 1, + 2, + 0, + 4], + ["loadLatestActivities", + 0, + 2, + 0, + 4], + ["loadNextActivities", + 0, + 2, + 0, + 4], + ["loadPreviousActivities", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_RegisterEventLoadCompleted", + 0, + 2, + 0, + 4], + ["_UnregisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_UnregisterEventLoadCompleted", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity", + [["FilterUpdated", + 0, + 0, + "MessageType.lineageActivityFilterUpdatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["LoadCompleted", + 0, + 0, + "MessageType.lineageActivityLoadCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventLoadCompleted", + "_UnregisterEventLoadCompleted"], + ["UpdateAvailable", + 0, + 0, + "MessageType.lineageActivityUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["SummaryItemUserActivity", + 0, + [["activityType", + 2], + ["rangeAddresses", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2]]], + ["SummaryItemUserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SummaryItemUserActivity", + 1, + 2, + 0, + 4]], + 0, + "SummaryItemUserActivity"], + ["SummaryCardUserActivity", + 0, + [["authors", + 2], + ["currentUser", + 2], + ["displayTime", + 10], + ["numberOfDetailedCard", + 2], + ["summaryUnviewableData", + 2]], + [["summaryItemUserActivities", + "SummaryItemUserActivityCollection", + 18, + 0, + 0, + 4]]], + ["AllowEditRange", + 0, + [["address", + 1], + ["isPasswordProtected", + 3], + ["title", + 1]], + 0, + [["delete"], + ["pauseProtection", + 1], + ["setPassword", + 1]]], + ["AllowEditRangeCollection", + 1, + 0, + 0, + [["add", + 3], + ["getCount", + 0, + 2, + 0, + 4], + ["pauseProtection", + 1]], + [["getItem", + "AllowEditRange", + 1, + 18, + 0, + 4], + ["getItemAt", + "AllowEditRange", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "AllowEditRange", + 1, + 2, + 0, + 4]], + 0, + "AllowEditRange"], + ["Query", + 0, + [["loadedTo", + 2], + ["loadedToDataModel", + 2], + ["name", + 2], + ["refreshDate", + 10], + ["rowsLoadedCount", + 2], + ["error", + 2]]], + ["QueryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Query", + 1, + 18, + 0, + 4]], + 0, + "Query"], + ["VisualTracker", + 0, + [["id", + 2]], + 0, + [["_RegisterEventModelChanged", + 0, + 2], + ["_UnregisterEventModelChanged", + 0, + 2], + ["requestTrackingAlteration", + 2, + 2, + 0, + 4]], + 0, + 0, + 0, + [["ModelChanged", + 0, + 0, + "MessageType.visualTrackerModelChangedEvent", + "this.id", + "_RegisterEventModelChanged", + "_UnregisterEventModelChanged"]]], + ["NumberFormatProperty", + 0, + [["key", + 3], + ["currency", + 3], + ["dateTime", + 3], + ["dateTimeHasDayOfWeek", + 3], + ["dateTimeHasMonth", + 3], + ["dateTimeHasYear", + 3], + ["numeric", + 3], + ["percent", + 3], + ["text", + 3]]], + ["NumberFormatPropertyCollection", + 1, + 0, + 0, + 0, + [["getItemAt", + "NumberFormatProperty", + 1, + 2, + 0, + 4]], + 0, + "NumberFormatProperty"], + ["RangeOptimization", + 0, + [["optimizationTypes", + 2], + ["range", + 2]]], + ["RangeOptimizationCollection", + 1, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeOptimization", + 1, + 2, + 0, + 4]], + 0, + "RangeOptimization"], + ["WorksheetOptimization", + 0, + 0, + 0, + 0, + [["optimize", + "WorksheetOptimizationResult", + 0, + 0, + 0, + 2], + ["scan", + "RangeOptimizationCollection", + 0, + 6, + 0, + 4], + ["scanExtended", + "WorksheetOptimizationScanResult", + 0, + 2, + 0, + 4]]], + ["WorksheetOptimizationResult", + 0, + [["allocatedCells", + 2], + ["optimizedCells", + 2]]], + ["LinkedWorkbook", + 0, + [["displayUrl", + 2, + 3], + ["fileName", + 3, + 3], + ["id", + 2], + ["longErrorDescription", + 2, + 3], + ["refreshEnabled", + 2, + 3], + ["refreshing", + 2, + 3], + ["statusMessage", + 2, + 3], + ["excelIconState", + 2, + 3], + ["hardToFindErrorMessages", + 2, + 3], + ["lastUpdated", + 10, + 3]], + 0, + [["_RegisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["breakLinks"], + ["changeSource", + 1, + 0, + 3], + ["findNextLink", + 0, + 2, + 3, + 4], + ["openWorkbook", + 0, + 2, + 3, + 4], + ["refresh"], + ["openChangeSourceDialog", + 0, + 0, + 3], + ["closeChangeSourceDialog", + 0, + 0, + 3]], + 0, + 0, + 0, + [["RefreshCompleted", + 0, + 3, + "MessageType.linkedWorkbookRefreshCompletedEvent", + "this.id", + "_RegisterRefreshCompletedEvent", + "_UnregisterRefreshCompletedEvent"]]], + ["LinkedWorkbookCollection", + 1, + [["breakAllLinksEnabled", + 0, + 3], + ["refreshAllEnabled", + 0, + 3], + ["workbookLinksRefreshMode"], + ["workbookLinksRefreshSettings", + 0, + 3], + ["containsNonWorkbookLinks", + 0, + 3]], + 0, + [["_RegisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["_UnregisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["breakAllLinks"], + ["getCount", + 0, + 2, + 3, + 4], + ["refreshAll"], + ["openEditLinksDialog", + 0, + 2, + 3, + 4]], + [["getItem", + "LinkedWorkbook", + 1, + 18, + 0, + 4], + ["getItemAt", + "LinkedWorkbook", + 1, + 2, + 3, + 4], + ["getItemOrNullObject", + "LinkedWorkbook", + 1]], + 0, + "LinkedWorkbook", + [["WorkbookLinksChanged", + 0, + 3, + "MessageType.linkedWorkbookWorkbookLinksChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWorkbookLinksChangedEvent", + "_UnregisterWorkbookLinksChangedEvent"]]], + ["DocumentTaskChange", + 0, + [["type", + 2], + ["changedBy", + 2], + ["commentId", + 2], + ["createdDateTime", + 10], + ["id", + 2], + ["assignee", + 2], + ["undoChangeId", + 2], + ["priority", + 2], + ["title", + 2], + ["percentComplete", + 2], + ["startDateTime", + 10], + ["dueDateTime", + 10]], + 0, + 0, + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.DocumentTaskChange", + 4], + ["DocumentTaskChangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "DocumentTaskChange", + 1, + 2, + 0, + 4]], + 0, + "DocumentTaskChange"], + ["RangePicker", + 0, + 0, + 0, + [["activate", + 1, + 0, + 0, + 2, + 0, + 4], + ["deactivate", + 0, + 0, + 0, + 2, + 0, + 4], + ["updateSelection", + 1, + 0, + 0, + 2, + 0, + 4], + ["updateSelectionWithNavigation", + 4, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_UnregisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventDeactivated", + 0, + 2, + 0, + 4], + ["_UnregisterEventDeactivated", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Deactivated", + 0, + 0, + "MessageType.rangePickerDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventDeactivated", + "_UnregisterEventDeactivated"], + ["SelectionChanged", + 0, + 0, + "MessageType.rangePickerSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventSelectionChanged", + "_UnregisterEventSelectionChanged"]]], + ["DocumentTask", + 0, + [["startAndDueDateTime"], + ["id", + 2], + ["percentComplete"], + ["priority"], + ["title"], + ["assignees", + 2], + ["completedBy", + 2], + ["completedDateTime", + 10], + ["createdBy", + 2], + ["createdDateTime", + 10]], + [["changes", + "DocumentTaskChangeCollection", + 18, + 0, + 0, + 4], + ["comment", + "Comment", + 2, + 0, + 0, + 4]], + [["assign", + 1], + ["unassign", + 1], + ["unassignAll"]]], + ["DocumentTaskCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "DocumentTask", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DocumentTask", + 1, + 2, + 0, + 4], + ["getItemAt", + "DocumentTask", + 1, + 2, + 0, + 4]], + 0, + "DocumentTask"], + ["DataConnection", + 0, + [["connectionString", + 2], + ["name", + 2], + ["commandText", + 2], + ["dataSourceType", + 2]]], + ["Runtime", + 0, + [["enableEvents", + 1, + 5]]], + ["Application", + 0, + [["calculationMode", + 1], + ["calculationEngineVersion", + 3, + 6], + ["calculationState", + 3, + 6], + ["decimalSeparator", + 3, + 7], + ["thousandsSeparator", + 3, + 7], + ["useSystemSeparators", + 3, + 7], + ["formatStaleValues", + 1, + 8]], + [["iterativeCalculation", + "IterativeCalculation", + 35, + 6, + 0, + 4], + ["ribbon", + "Ribbon", + 35, + 6, + 0, + 4], + ["cultureInfo", + "CultureInfo", + 3, + 7, + 0, + 4], + ["undoScope", + "UndoScope", + 3, + 3, + 0, + 4]], + [["calculate", + 1], + ["suspendApiCalculationUntilNextSync", + 0, + 1, + 9, + 2, + 0, + 10], + ["suspendScreenUpdatingUntilNextSync", + 0, + 0, + 6, + 2, + 0, + 10], + ["hasLicense", + 1, + 2, + 8, + 4], + ["redo", + 0, + 0, + 3, + 2], + ["explorePremiumLicense", + 1, + 2, + 8, + 4], + ["undo", + 0, + 0, + 3, + 2], + ["_RegisterEventUndoChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventUndoChanged", + 0, + 2, + 3, + 4]], + [["createWorkbook", + "WorkbookCreated", + 1, + 10, + 5, + 0, + 0, + "_GetWorkbookCreatedById"], + ["_GetWorkbookCreatedById", + "WorkbookCreated", + 1, + 2, + 5, + 4]], + 0, + 0, + [["UndoChanged", + 0, + 3, + "MessageType.applicationUndoChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUndoChanged", + "_UnregisterEventUndoChanged"]]], + ["IterativeCalculation", + 0, + [["enabled", + 1], + ["maxIteration", + 1], + ["maxChange", + 1]]], + ["Workbook", + 0, + [["name", + 3, + 11], + ["readOnly", + 3, + 5], + ["isDirty", + 1, + 6], + ["use1904DateSystem", + 1, + 8], + ["chartDataPointTrack", + 1, + 6], + ["usePrecisionAsDisplayed", + 1, + 6], + ["calculationEngineVersion", + 3, + 6], + ["autoSave", + 3, + 6], + ["previouslySaved", + 3, + 6], + ["showPivotFieldList", + 0, + 8, + 0, + 2, + 12], + ["formulaReferenceStyle", + 2, + 3]], + [["worksheets", + "WorksheetCollection", + 19, + 0, + 0, + 4], + ["names", + "NamedItemCollection", + 19, + 0, + 0, + 4], + ["tables", + "TableCollection", + 19, + 0, + 0, + 4], + ["application", + "Application", + 2, + 0, + 0, + 4], + ["bindings", + "BindingCollection", + 19, + 0, + 0, + 4], + ["functions", + "Functions", + 2, + 13, + 0, + 4], + ["_V1Api", + "_V1Api", + 2, + 14, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 19, + 14, + 0, + 4], + ["settings", + "SettingCollection", + 19, + 15, + 0, + 4], + ["customXmlParts", + "CustomXmlPartCollection", + 19, + 16, + 0, + 4], + ["internalTest", + "InternalTest", + 2, + 9, + 0, + 4], + ["properties", + "DocumentProperties", + 35, + 11, + 0, + 4], + ["styles", + "StyleCollection", + 19, + 11, + 0, + 4], + ["protection", + "WorkbookProtection", + 3, + 11, + 0, + 4], + ["dataConnections", + "DataConnectionCollection", + 3, + 11, + 0, + 4], + ["_Runtime", + "Runtime", + 2, + 16, + 0, + 4], + ["comments", + "CommentCollection", + 19, + 17, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["tableStyles", + "TableStyleCollection", + 19, + 17, + 0, + 4], + ["pivotTableStyles", + "PivotTableStyleCollection", + 19, + 17, + 0, + 4], + ["slicerStyles", + "SlicerStyleCollection", + 19, + 17, + 0, + 4], + ["timelineStyles", + "TimelineStyleCollection", + 19, + 17, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["linkedDataTypes", + "LinkedDataTypeCollection", + 18, + 8, + 0, + 4], + ["queries", + "QueryCollection", + 18, + 18, + 0, + 4], + ["linkedWorkbooks", + "LinkedWorkbookCollection", + 18, + 19, + 0, + 4], + ["rangePicker", + "RangePicker", + 2, + 8, + 0, + 4, + 0, + 4], + ["lineageActivities", + "LineageActivityCollection", + 18, + 3, + 0, + 4], + ["businessBar", + "BusinessBar", + 2, + 8, + 0, + 4], + ["guidedReapply", + "GuidedReapplyManager", + 2, + 3, + 0, + 4], + ["vbaRecorder", + "VbaRecorder", + 2, + 8, + 0, + 4], + ["externalCodeService", + "ExternalCodeService", + 2, + 8, + 0, + 4], + ["augmentationLoop", + "AugmentationLoop", + 2, + 8, + 0, + 4]], + [["_RemoveReference", + 1, + 2], + ["_GetObjectByReferenceId", + 1, + 2, + 0, + 4], + ["_GetObjectTypeNameByReferenceId", + 1, + 2, + 0, + 4], + ["_RemoveAllReferences", + 0, + 2], + ["_GetReferenceCount", + 0, + 2, + 0, + 4], + ["getIsActiveCollabSession", + 0, + 0, + 6], + ["registerCustomFunctions", + 7, + 0, + 20, + 8], + ["_SetOsfControlContainerReadyForCustomFunctions", + 0, + 0, + 20], + ["close", + 1, + 0, + 7], + ["save", + 1, + 0, + 7], + ["_RegisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_UnregisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_RegisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_UnregisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_RegisterActivatedEvent", + 0, + 2, + 23], + ["_UnregisterActivatedEvent", + 0, + 2, + 23], + ["insertWorksheetsFromBase64", + 2, + 0, + 23], + ["enableOfficeScriptRecording", + 1, + 1, + 19], + ["recordAction", + 1, + 3, + 0, + 4], + ["focus", + 0, + 2, + 3, + 4], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["showHelp", + 1, + 2, + 3, + 4], + ["getLinkedEntityCellValue", + 1, + 2, + 24, + 4], + ["getThemeColors", + 0, + 2, + 8, + 4], + ["_RegisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["notifySDXLoaded", + 1, + 2, + 3, + 4], + ["openConditionalFormattingRulesManager", + 1, + 0, + 3], + ["openNameManager", + 0, + 0, + 3], + ["_RegisterEventActionRecorded", + 0, + 2, + 2, + 4], + ["_UnregisterEventActionRecorded", + 0, + 2, + 2, + 4]], + [["getSelectedRange", + "Range", + 0, + 10, + 0, + 4], + ["getActiveCell", + "Range", + 0, + 10, + 11, + 4], + ["_GetRangeForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["_GetRangeOrNullObjectForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["getActiveChart", + "Chart", + 0, + 2, + 6, + 4], + ["getActiveChartOrNullObject", + "Chart", + 0, + 2, + 6, + 4], + ["getSelectedRanges", + "RangeAreas", + 0, + 10, + 6, + 4], + ["_GetRangesForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["_GetRangesOrNullObjectForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["getActiveSlicer", + "Slicer", + 0, + 2, + 17, + 4], + ["getActiveSlicerOrNullObject", + "Slicer", + 0, + 2, + 17, + 4]], + 0, + 0, + [["ActionRecorded", + 0, + 2, + "MessageType.workbookActionRecordedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventActionRecorded", + "_UnregisterEventActionRecorded"], + ["Activated", + 0, + 23, + "MessageType.workbookActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["AutoSaveSettingChanged", + 0, + 6, + "MessageType.workbookAutoSaveSettingChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAutoSaveSettingChangedEvent", + "_UnregisterAutoSaveSettingChangedEvent"], + ["FormulaReferenceStyleChanged", + 0, + 3, + "MessageType.workbookFormulaReferenceStyleChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFormulaReferenceStyleChanged", + "_UnregisterEventFormulaReferenceStyleChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.workbookNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["RecordingStateChangedEvent", + 0, + 21, + "MessageType.recordingStateChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRecordingStateChangedEvent", + "_UnregisterRecordingStateChangedEvent"], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdDocumentSelectionChangedEvent", + "", + "", + ""], + ["WACOperationEvent", + 2, + 21, + "MessageType.wacoperationEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWACOperationEvent", + "_UnregisterWACOperationEvent"], + ["_Message", + 3, + 11, + "_CC.office10EventIdRichApiMessageEvent", + "", + "", + ""]]], + ["WorkbookProtection", + 0, + [["protected", + 3]], + 0, + [["protect", + 1], + ["unprotect", + 1]]], + ["WorkbookCreated", + 0, + [["id", + 3]], + 0, + [["open", + 0, + 2, + 0, + 4]]], + ["Worksheet", + 0, + [["name", + 1], + ["id", + 3], + ["position", + 1], + ["visibility", + 1], + ["tabColor", + 1, + 11, + 0, + 2, + 25], + ["standardWidth", + 1, + 11], + ["standardHeight", + 3, + 11], + ["showGridlines", + 5, + 5, + 0, + 2, + 26], + ["showHeadings", + 5, + 5], + ["enableCalculation", + 1, + 6], + ["tabId", + 3, + 18]], + [["charts", + "ChartCollection", + 83, + 0, + 0, + 4], + ["tables", + "TableCollection", + 83, + 0, + 0, + 4], + ["protection", + "WorksheetProtection", + 3, + 13, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 83, + 14, + 0, + 4], + ["names", + "NamedItemCollection", + 83, + 15, + 0, + 4], + ["freezePanes", + "WorksheetFreezePanes", + 3, + 11, + 0, + 4], + ["pageLayout", + "PageLayout", + 35, + 6, + 0, + 4], + ["visuals", + "VisualCollection", + 83, + 17, + 0, + 4], + ["shapes", + "ShapeCollection", + 83, + 6, + 0, + 4], + ["horizontalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["verticalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["comments", + "CommentCollection", + 83, + 17, + 0, + 4], + ["customProperties", + "WorksheetCustomPropertyCollection", + 19, + 27, + 0, + 4], + ["namedSheetViews", + "NamedSheetViewCollection", + 18, + 19, + 0, + 4], + ["optimization", + "WorksheetOptimization", + 2, + 8, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["visualTracker", + "VisualTracker", + 2, + 28, + 0, + 4], + ["rangeValuesPreview", + "RangeValuesPreview", + 66, + 8, + 0, + 4]], + [["delete"], + ["activate", + 0, + 2], + ["calculate", + 1, + 0, + 9], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_RegisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["replaceAll", + 3, + 0, + 6], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["showOutlineLevels", + 2, + 0, + 17], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getRange", + "Range", + 1, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRangeByIndexes", + "Range", + 4, + 10, + 11, + 4], + ["getPrevious", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getPreviousOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNext", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNextOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["_GetSheetById", + "Worksheet", + 1, + 2, + 11, + 4], + ["copy", + "Worksheet", + 2, + 0, + 11, + 0, + 0, + "_GetAnotherWorksheetById"], + ["_GetAnotherWorksheetById", + "Worksheet", + 1, + 0, + 11], + ["findAll", + "RangeAreas", + 2, + 10, + 6, + 4], + ["findAllOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getRanges", + "RangeAreas", + 1, + 10, + 6, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 0, + 3], + ["getRangeR1C1", + "Range", + 1, + 2, + 3, + 4], + ["getRangesR1C1", + "RangeAreas", + 1, + 2, + 3, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 0, + 3]], + "workbook.worksheets", + 0, + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "this.id", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 11, + "MessageType.worksheetDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "this.id", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "this.id", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "this.id", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "this.id", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.worksheetNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "this.id", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "this.id", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "this.id", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "this.id", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 11, + "MessageType.worksheetSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "this.id", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "this.id", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetCollection", + 1, + 0, + 0, + [["getCount", + 1, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 3, + 11], + ["_UnregisterAddedEvent", + 0, + 3, + 11], + ["_RegisterActivatedEvent", + 0, + 3, + 11], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 3, + 11], + ["_UnregisterDeletedEvent", + 0, + 3, + 11], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 3, + 6], + ["_UnregisterDataChangedEvent", + 0, + 3, + 6], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["addFromBase64", + 4, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 3, + 17], + ["_UnregisterRowSortedEvent", + 0, + 3, + 17], + ["_RegisterColumnSortedEvent", + 0, + 3, + 17], + ["_UnregisterColumnSortedEvent", + 0, + 3, + 17], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getItem", + "Worksheet", + 1, + 18, + 0, + 4], + ["add", + "Worksheet", + 1, + 8, + 0, + 2, + 0, + 0, + 29], + ["getActiveWorksheet", + "Worksheet", + 0, + 2, + 0, + 4], + ["getItemOrNullObject", + "Worksheet", + 1, + 2, + 15, + 4], + ["getFirst", + "Worksheet", + 1, + 10, + 16, + 4], + ["getLast", + "Worksheet", + 1, + 10, + 16, + 4]], + 0, + "Worksheet", + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 11, + "MessageType.worksheetAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 6, + "MessageType.worksheetDataChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 11, + "MessageType.worksheetDeletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["Moved", + 0, + 30, + "MessageType.worksheetMovedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventMoved", + "_UnregisterEventMoved"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 6, + "MessageType.worksheetSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetProtection", + 0, + [["protected", + 3], + ["options", + 3], + ["canPauseProtection", + 3, + 19], + ["isPasswordProtected", + 3, + 19], + ["isPaused", + 3, + 19], + ["savedOptions", + 3, + 19]], + [["allowEditRanges", + "AllowEditRangeCollection", + 19, + 19, + 0, + 4]], + [["protect", + 2, + 1], + ["unprotect", + 1], + ["checkPassword", + 1, + 2, + 19, + 4], + ["pauseProtection", + 1, + 0, + 19], + ["resumeProtection", + 0, + 0, + 19], + ["setPassword", + 1, + 0, + 19], + ["updateOptions", + 1, + 0, + 19]]], + ["WorksheetFreezePanes", + 0, + 0, + 0, + [["unfreeze"], + ["freezeAt", + 1], + ["freezeRows", + 1], + ["freezeColumns", + 1]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getLocationOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["Range", + 14, + [["numberFormat", + 5, + 0, + 0, + 2, + 31], + ["numberFormatLocal", + 1, + 11, + 0, + 2, + 31], + ["values", + 5, + 0, + 0, + 2, + 31], + ["text", + 3], + ["formulas", + 5, + 0, + 0, + 2, + 32], + ["formulasLocal", + 5, + 0, + 0, + 2, + 32], + ["rowIndex", + 3], + ["columnIndex", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["address", + 3], + ["addressLocal", + 3], + ["cellCount", + 3], + ["_ReferenceId", + 2], + ["valueTypes", + 3], + ["formulasR1C1", + 5, + 13], + ["hidden", + 3, + 13], + ["rowHidden", + 1, + 13, + 0, + 2, + 32], + ["columnHidden", + 1, + 13, + 0, + 2, + 32], + ["isEntireColumn", + 3, + 11], + ["isEntireRow", + 3, + 11], + ["hyperlink", + 1, + 11, + 0, + 2, + 33], + ["style", + 1, + 11, + 0, + 2, + 32], + ["linkedDataTypeState", + 3, + 6], + ["hasSpill", + 3, + 27], + ["top", + 3, + 17], + ["left", + 3, + 17], + ["height", + 3, + 17], + ["width", + 3, + 17], + ["savedAsArray", + 3, + 27], + ["numberFormatCategories", + 3, + 27], + ["valuesAsJson", + 5, + 24], + ["valuesAsJsonLocal", + 5, + 24], + ["addressR1C1", + 2, + 3]], + [["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["sort", + "RangeSort", + 3, + 13, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 9, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 5, + 0, + 4]], + [["clear", + 1, + 0, + 0, + 2, + 0, + 32], + ["delete", + 1, + 0, + 0, + 2, + 0, + 34], + ["select", + 0, + 2], + ["_KeepReference", + 0, + 2], + ["merge", + 1, + 0, + 13, + 2, + 0, + 32], + ["unmerge", + 0, + 0, + 13], + ["_ValidateArraySize", + 2, + 2, + 14, + 4], + ["calculate", + 0, + 0, + 9], + ["showCard", + 0, + 0, + 11], + ["getImage", + 0, + 2, + 11, + 4], + ["replaceAll", + 3, + 0, + 6, + 2, + 0, + 32], + ["copyFrom", + 4, + 0, + 6, + 2, + 0, + 26], + ["convertToLinkedDataType", + 2, + 0, + 6], + ["convertDataTypeToText", + 0, + 0, + 6], + ["setDirty", + 0, + 0, + 6], + ["getCellProperties", + 1, + 0, + 6], + ["getRowProperties", + 1, + 0, + 6], + ["getColumnProperties", + 1, + 0, + 6], + ["setCellProperties", + 1, + 0, + 6], + ["setRowProperties", + 1, + 0, + 6], + ["setColumnProperties", + 1, + 0, + 6], + ["autoFill", + 2, + 0, + 6], + ["showTeachingCallout", + 2, + 0, + 6], + ["flashFill", + 0, + 0, + 6], + ["group", + 1, + 0, + 17], + ["ungroup", + 1, + 0, + 17], + ["showGroupDetails", + 1, + 0, + 17], + ["hideGroupDetails", + 1, + 0, + 17], + ["moveTo", + 1, + 0, + 7, + 2, + 0, + 26], + ["getDataClassificationIds", + 0, + 2, + 19, + 4]], + [["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["insert", + "Range", + 1, + 8, + 0, + 2, + 0, + 0, + 34], + ["getEntireColumn", + "Range", + 0, + 10, + 0, + 4], + ["getEntireRow", + "Range", + 0, + 10, + 0, + 4], + ["getOffsetRange", + "Range", + 2, + 10, + 0, + 4], + ["getRow", + "Range", + 1, + 10, + 0, + 4], + ["getColumn", + "Range", + 1, + 10, + 0, + 4], + ["getIntersection", + "Range", + 1, + 10, + 0, + 4], + ["getBoundingRect", + "Range", + 1, + 10, + 0, + 4], + ["getLastCell", + "Range", + 0, + 10, + 0, + 4], + ["getLastColumn", + "Range", + 0, + 10, + 0, + 4], + ["getLastRow", + "Range", + 0, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRowsAbove", + "Range", + 1, + 11, + 14, + 4], + ["getRowsBelow", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsBefore", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsAfter", + "Range", + 1, + 11, + 14, + 4], + ["getResizedRange", + "Range", + 2, + 11, + 14, + 4], + ["getVisibleView", + "RangeView", + 0, + 2, + 14, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getSurroundingRegion", + "Range", + 0, + 10, + 11, + 4], + ["getAbsoluteResizedRange", + "Range", + 2, + 10, + 11, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 6, + 4], + ["find", + "Range", + 2, + 10, + 6, + 4], + ["findOrNullObject", + "Range", + 2, + 10, + 6, + 4], + ["removeDuplicates", + "RemoveDuplicatesResult", + 2, + 8, + 6, + 2, + 0, + 0, + 33], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpillingToRange", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParent", + "Range", + 0, + 10, + 27, + 4], + ["getSpillingToRangeOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParentOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getMergedAreas", + "RangeAreas", + 0, + 10, + 19, + 4], + ["getPivotTables", + "PivotTableScopedCollection", + 1, + 6, + 27, + 4], + ["getPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 18, + 4], + ["getDirectPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 27, + 4], + ["getDependents", + "WorkbookRangeAreas", + 0, + 10, + 35, + 4], + ["getDirectDependents", + "WorkbookRangeAreas", + 0, + 10, + 23, + 4], + ["getExtendedRange", + "Range", + 2, + 10, + 23, + 4], + ["getRangeEdge", + "Range", + 2, + 10, + 23, + 4], + ["getNumberFormatProperties", + "NumberFormatPropertyCollection", + 0, + 6, + 8, + 4], + ["getSurroundingDataRegion", + "Range", + 0, + 2, + 8, + 4], + ["getMergedAreasOrNullObject", + "RangeAreas", + 0, + 0, + 23, + 2, + 0, + 0, + 31]]], + ["RangeAreas", + 2, + [["_ReferenceId", + 2], + ["address", + 3], + ["addressLocal", + 3], + ["areaCount", + 3], + ["cellCount", + 3], + ["isEntireColumn", + 3], + ["isEntireRow", + 3], + ["style", + 1], + ["addressR1C1", + 2, + 3]], + [["areas", + "RangeCollection", + 19, + 0, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 0, + 0, + 4], + ["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2], + ["calculate"], + ["clear", + 1], + ["setDirty"], + ["copyFrom", + 4], + ["convertToLinkedDataType", + 2], + ["convertDataTypeToText"], + ["select", + 0, + 2, + 8]], + [["getEntireColumn", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getEntireRow", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getIntersection", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getOffsetRangeAreas", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 0, + 4], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 0, + 4]]], + ["WorkbookRangeAreas", + 2, + [["_ReferenceId", + 2], + ["addresses", + 3]], + [["ranges", + "RangeCollection", + 19, + 0, + 0, + 4], + ["areas", + "RangeAreasCollection", + 19, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2]], + [["getRangeAreasBySheet", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getRangeAreasOrNullObjectBySheet", + "RangeAreas", + 1, + 10, + 0, + 4]]], + ["RangeView", + 0, + [["numberFormat", + 1], + ["values", + 1], + ["text", + 3], + ["formulas", + 1], + ["formulasLocal", + 1], + ["formulasR1C1", + 1], + ["valueTypes", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["cellAddresses", + 3], + ["index", + 3], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["rows", + "RangeViewCollection", + 19, + 0, + 0, + 4]], + 0, + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["RangeViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "RangeView", + 1, + 2, + 0, + 4]], + 0, + "RangeView"], + ["SettingCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Setting", + 1, + 18, + 0, + 4], + ["add", + "Setting", + 2, + 9], + ["getItemOrNullObject", + "Setting", + 1, + 2, + 0, + 4]], + 0, + "Setting", + [["SettingsChanged", + 3, + 0, + "_CC.office10EventIdSettingsChangedEvent", + "", + "", + ""]]], + ["Setting", + 8, + [["key", + 3], + ["value", + 5], + ["_Id", + 2]], + 0, + [["delete"]]], + ["NamedItemCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "NamedItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "NamedItem", + 1, + 2, + 15, + 4], + ["add", + "NamedItem", + 3, + 8, + 15], + ["addFormulaLocal", + "NamedItem", + 3, + 0, + 15]], + 0, + "NamedItem", + [["Added", + 0, + 3, + "MessageType.namedItemAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.namedItemDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["NamedItem", + 0, + [["name", + 3], + ["type", + 3], + ["value", + 3], + ["visible", + 1], + ["_Id", + 2], + ["comment", + 1, + 15], + ["scope", + 3, + 15], + ["formula", + 1, + 11], + ["valueAsJson", + 3, + 24], + ["valueAsJsonLocal", + 3, + 24]], + [["worksheet", + "Worksheet", + 2, + 15, + 0, + 4], + ["worksheetOrNullObject", + "Worksheet", + 2, + 15, + 0, + 4], + ["arrayValues", + "NamedItemArrayValues", + 3, + 11, + 0, + 4]], + [["delete", + 0, + 0, + 15]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 15, + 4]]], + ["NamedItemArrayValues", + 0, + [["values", + 3], + ["types", + 3], + ["valuesAsJson", + 3, + 24], + ["valuesAsJsonLocal", + 3, + 24]]], + ["Binding", + 0, + [["id", + 3], + ["type", + 3]], + 0, + [["getText", + 0, + 2, + 0, + 4], + ["delete", + 0, + 0, + 14]], + [["getTable", + "Table", + 0, + 2, + 0, + 4], + ["getRange", + "Range", + 0, + 2, + 0, + 4]], + 0, + 0, + [["DataChanged", + 3, + 14, + "_CC.office10EventIdBindingDataChangedEvent", + "this.id", + "", + ""], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdBindingSelectionChangedEvent", + "this.id", + "", + ""]]], + ["BindingCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "Binding", + 1, + 18, + 0, + 4], + ["getItemAt", + "Binding", + 1, + 2, + 0, + 4], + ["add", + "Binding", + 3, + 8, + 14], + ["addFromNamedItem", + "Binding", + 3, + 0, + 14], + ["addFromSelection", + "Binding", + 2, + 0, + 14], + ["getItemOrNullObject", + "Binding", + 1, + 2, + 15, + 4]], + 0, + "Binding"], + ["TableCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1]], + [["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemAt", + "Table", + 1, + 2, + 0, + 4], + ["add", + "Table", + 2, + 8, + 0, + 2, + 0, + 0, + 33], + ["getItemOrNullObject", + "Table", + 1, + 2, + 15, + 4], + ["addQueryTable", + "Table", + 2, + 0, + 8]], + 0, + "Table", + [["Added", + 0, + 6, + "MessageType.tableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this._eventTargetId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Deleted", + 0, + 6, + "MessageType.tableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this._eventTargetId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"]]], + ["TableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getFirst", + "Table", + 0, + 10, + 0, + 4], + ["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Table", + 1, + 2, + 18, + 4]], + 0, + "Table"], + ["Table", + 24, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 26], + ["showHeaders", + 1, + 0, + 0, + 2, + 33], + ["showTotals", + 1, + 0, + 0, + 2, + 33], + ["style", + 1, + 0, + 0, + 2, + 33], + ["highlightFirstColumn", + 1, + 14, + 0, + 2, + 33], + ["highlightLastColumn", + 1, + 14, + 0, + 2, + 33], + ["showBandedRows", + 1, + 14, + 0, + 2, + 33], + ["showBandedColumns", + 1, + 14, + 0, + 2, + 33], + ["showFilterButton", + 1, + 14, + 0, + 2, + 33], + ["legacyId", + 3, + 5]], + [["columns", + "TableColumnCollection", + 19, + 0, + 0, + 4], + ["rows", + "TableRowCollection", + 19, + 0, + 0, + 4], + ["sort", + "TableSort", + 3, + 13, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["tableStyle", + "TableStyle", + 35, + 8, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearFilters", + 0, + 0, + 13], + ["reapplyFilters", + 0, + 0, + 13, + 2, + 0, + 26], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["clearStyle", + 0, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["resize", + 1, + 0, + 23, + 2, + 0, + 26], + ["setStyle", + 1, + 0, + 8]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4], + ["convertToRange", + "Range", + 0, + 8, + 13, + 2, + 0, + 0, + 26]], + "workbook.tables", + 0, + [["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["SelectionChanged", + 2, + 11, + "MessageType.tableSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["TableColumnCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "TableColumn", + 1, + 18, + 0, + 4], + ["getItemAt", + "TableColumn", + 1, + 2, + 0, + 4], + ["add", + "TableColumn", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["getItemOrNullObject", + "TableColumn", + 1, + 2, + 15, + 4], + ["addAsJson", + "TableColumn", + 3, + 0, + 24]], + 0, + "TableColumn"], + ["TableColumn", + 0, + [["id", + 3], + ["index", + 3], + ["values", + 1], + ["name", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["filter", + "Filter", + 3, + 13, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4]]], + ["TableRowCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["deleteRows", + 1, + 0, + 19], + ["deleteRowsAt", + 2, + 0, + 19, + 2, + 0, + 26]], + [["getItemAt", + "TableRow", + 1, + 2, + 0, + 4], + ["add", + "TableRow", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["addAsJson", + "TableRow", + 3, + 0, + 24]], + 0, + "TableRow"], + ["TableRow", + 0, + [["index", + 3], + ["values", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + 0, + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["DataValidation", + 0, + [["type", + 3], + ["rule", + 1], + ["prompt", + 1], + ["errorAlert", + 1], + ["ignoreBlanks", + 1], + ["valid", + 3]], + 0, + [["clear"]], + [["getInvalidCells", + "RangeAreas", + 0, + 10, + 6, + 4], + ["getInvalidCellsOrNullObject", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["RemoveDuplicatesResult", + 0, + [["removed", + 3], + ["uniqueRemaining", + 3]]], + ["RangeFormat", + 0, + [["wrapText", + 1, + 0, + 0, + 2, + 32], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 32], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 32], + ["columnWidth", + 1, + 13, + 0, + 2, + 32], + ["rowHeight", + 1, + 13, + 0, + 2, + 32], + ["textOrientation", + 1, + 11, + 0, + 2, + 32], + ["useStandardHeight", + 1, + 11], + ["useStandardWidth", + 1, + 11], + ["readingOrder", + 1, + 6], + ["shrinkToFit", + 1, + 6], + ["indentLevel", + 1, + 6, + 0, + 2, + 32], + ["autoIndent", + 1, + 6]], + [["fill", + "RangeFill", + 35, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["protection", + "FormatProtection", + 35, + 13, + 0, + 4]], + [["autofitColumns", + 0, + 0, + 13, + 2, + 0, + 32], + ["autofitRows", + 0, + 0, + 13, + 2, + 0, + 32], + ["adjustIndent", + 1, + 0, + 7, + 2, + 0, + 34]]], + ["FormatProtection", + 0, + [["locked", + 1], + ["formulaHidden", + 1]]], + ["RangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6], + ["patternTintAndShade", + 1, + 6], + ["pattern", + 1, + 6], + ["patternColor", + 1, + 6]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 32]]], + ["RangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 32], + ["weight", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6]]], + ["RangeBorderCollection", + 1, + [["count", + 3], + ["tintAndShade", + 1, + 6]], + 0, + 0, + [["getItem", + "RangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "RangeBorder", + 1, + 2, + 0, + 4]], + 0, + "RangeBorder"], + ["RangeFont", + 0, + [["name", + 1, + 0, + 0, + 2, + 32], + ["size", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 12], + ["italic", + 1, + 0, + 0, + 2, + 32], + ["bold", + 1, + 0, + 0, + 2, + 32], + ["underline", + 1, + 0, + 0, + 2, + 32], + ["strikethrough", + 1, + 6, + 0, + 2, + 32], + ["subscript", + 1, + 6], + ["superscript", + 1, + 6], + ["tintAndShade", + 1, + 6]]], + ["ChartCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29]], + [["add", + "Chart", + 3, + 9, + 0, + 2, + 0, + 0, + 36], + ["getItemAt", + "Chart", + 1, + 2, + 0, + 4], + ["_GetItem", + "Chart", + 1, + 18, + 0, + 4], + ["getItem", + "Chart", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Chart", + 1, + 2, + 15, + 4]], + 0, + "Chart", + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this._ParentObject.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 5, + "MessageType.chartAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this._ParentObject.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 5, + "MessageType.chartDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Chart", + 0, + [["name", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 36], + ["left", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["height", + 1, + 0, + 0, + 2, + 36], + ["id", + 3, + 11], + ["showAllFieldButtons", + 1, + 11, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 37], + ["showDataLabelsOverMaximum", + 1, + 5, + 0, + 2, + 37], + ["categoryLabelLevel", + 1, + 5, + 0, + 2, + 37], + ["style", + 1, + 5, + 0, + 2, + 37], + ["displayBlanksAs", + 1, + 5, + 0, + 2, + 37], + ["plotBy", + 1, + 5, + 0, + 2, + 37], + ["plotVisibleOnly", + 1, + 5, + 0, + 2, + 37], + ["seriesNameLevel", + 1, + 5, + 0, + 2, + 37]], + [["title", + "ChartTitle", + 35, + 0, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 0, + 0, + 4], + ["legend", + "ChartLegend", + 35, + 0, + 0, + 4], + ["series", + "ChartSeriesCollection", + 19, + 0, + 0, + 4], + ["axes", + "ChartAxes", + 35, + 0, + 0, + 4], + ["format", + "ChartAreaFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["plotArea", + "ChartPlotArea", + 35, + 5, + 0, + 4], + ["pivotOptions", + "ChartPivotOptions", + 35, + 6, + 0, + 4]], + [["setData", + 2, + 1, + 0, + 2, + 0, + 36], + ["delete", + 0, + 0, + 0, + 2, + 0, + 36], + ["setPosition", + 2, + 0, + 0, + 2, + 0, + 36], + ["getImage", + 3, + 2, + 13, + 4], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["activate", + 0, + 2, + 6], + ["getDataRange", + 0, + 0, + 28], + ["getDataRangeOrNullObject", + 0, + 0, + 28]], + [["getDataTable", + "ChartDataTable", + 0, + 2, + 18, + 4], + ["getDataTableOrNullObject", + "ChartDataTable", + 0, + 2, + 18, + 4]], + 0, + 0, + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["ChartPivotOptions", + 0, + [["showAxisFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showLegendFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showReportFilterFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showValueFieldButtons", + 1, + 0, + 0, + 2, + 37]]], + ["ChartAreaFormat", + 0, + [["roundedCorners", + 1, + 6, + 0, + 2, + 37], + ["colorScheme", + 1, + 6, + 0, + 2, + 37]], + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartSeriesCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartSeries", + 1, + 2, + 0, + 4], + ["add", + "ChartSeries", + 2, + 8, + 11, + 2, + 0, + 0, + 36]], + 0, + "ChartSeries"], + ["ChartSeries", + 0, + [["name", + 1, + 0, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 10], + ["hasDataLabels", + 1, + 11, + 0, + 2, + 37], + ["filtered", + 1, + 11, + 0, + 2, + 37], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["showShadow", + 1, + 11, + 0, + 2, + 37], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36], + ["smooth", + 1, + 11, + 0, + 2, + 37], + ["plotOrder", + 1, + 11, + 0, + 2, + 37], + ["gapWidth", + 1, + 11, + 0, + 2, + 36], + ["doughnutHoleSize", + 1, + 11, + 0, + 2, + 36], + ["axisGroup", + 1, + 5, + 0, + 2, + 36], + ["explosion", + 1, + 5, + 0, + 2, + 37], + ["firstSliceAngle", + 1, + 5, + 0, + 2, + 37], + ["invertIfNegative", + 1, + 5, + 0, + 2, + 37], + ["bubbleScale", + 1, + 6, + 0, + 2, + 37], + ["secondPlotSize", + 1, + 5, + 0, + 2, + 37], + ["splitType", + 1, + 5, + 0, + 2, + 37], + ["splitValue", + 1, + 6, + 0, + 2, + 37], + ["varyByCategories", + 1, + 5, + 0, + 2, + 37], + ["showLeaderLines", + 1, + 6, + 0, + 2, + 37], + ["overlap", + 1, + 5, + 0, + 2, + 36], + ["gradientStyle", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointType", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumColor", + 1, + 6, + 0, + 2, + 37], + ["parentLabelStrategy", + 1, + 6, + 0, + 2, + 37], + ["showConnectorLines", + 1, + 6, + 0, + 2, + 37], + ["invertColor", + 1, + 6, + 0, + 2, + 37]], + [["points", + "ChartPointsCollection", + 19, + 0, + 0, + 4], + ["format", + "ChartSeriesFormat", + 35, + 0, + 0, + 4], + ["trendlines", + "ChartTrendlineCollection", + 19, + 11, + 0, + 4], + ["xErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["yErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 5, + 0, + 4], + ["binOptions", + "ChartBinOptions", + 35, + 6, + 0, + 4], + ["mapOptions", + "ChartMapOptions", + 35, + 6, + 0, + 4], + ["boxwhiskerOptions", + "ChartBoxwhiskerOptions", + 35, + 6, + 0, + 4]], + [["delete", + 0, + 0, + 11, + 2, + 0, + 36], + ["setXAxisValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setBubbleSizes", + 1, + 0, + 11, + 2, + 0, + 37], + ["getDimensionValues", + 1, + 0, + 27, + 2, + 0, + 37], + ["getDimensionDataSourceString", + 1, + 0, + 35], + ["getDimensionDataSourceType", + 1, + 0, + 35]]], + ["ChartSeriesFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartPointsCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartPoint", + 1, + 2, + 0, + 4]], + 0, + "ChartPoint"], + ["ChartPoint", + 0, + [["value", + 3], + ["hasDataLabel", + 1, + 11, + 0, + 2, + 37], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36]], + [["format", + "ChartPointFormat", + 35, + 0, + 0, + 4], + ["dataLabel", + "ChartDataLabel", + 35, + 11, + 0, + 4]]], + ["ChartPointFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartAxes", + 0, + 0, + [["categoryAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["seriesAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["valueAxis", + "ChartAxis", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ChartAxis", + 2, + 2, + 11, + 4]]], + ["ChartAxis", + 0, + [["majorUnit", + 1, + 0, + 0, + 2, + 37], + ["maximum", + 1, + 0, + 0, + 2, + 36], + ["minimum", + 1, + 0, + 0, + 2, + 36], + ["minorUnit", + 1, + 0, + 0, + 2, + 37], + ["displayUnit", + 1, + 11, + 0, + 2, + 36], + ["showDisplayUnitLabel", + 1, + 11, + 0, + 2, + 37], + ["customDisplayUnit", + 3, + 11], + ["type", + 3, + 11], + ["minorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["majorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["baseTimeUnit", + 1, + 11, + 0, + 2, + 37], + ["categoryType", + 1, + 11, + 0, + 2, + 37], + ["axisGroup", + 3, + 11], + ["scaleType", + 1, + 11, + 0, + 2, + 37], + ["logBase", + 1, + 11, + 0, + 2, + 37], + ["left", + 3, + 11], + ["top", + 3, + 11], + ["height", + 3, + 11], + ["width", + 3, + 11], + ["reversePlotOrder", + 1, + 11, + 0, + 2, + 36], + ["crosses", + 1, + 11, + 0, + 2, + 36], + ["crossesAt", + 3, + 11], + ["visible", + 1, + 11, + 0, + 2, + 37], + ["isBetweenCategories", + 1, + 5, + 0, + 2, + 36], + ["majorTickMark", + 1, + 11, + 0, + 2, + 37], + ["minorTickMark", + 1, + 11, + 0, + 2, + 37], + ["tickMarkSpacing", + 1, + 11, + 0, + 2, + 37], + ["tickLabelPosition", + 1, + 11, + 0, + 2, + 36], + ["tickLabelSpacing", + 1, + 11, + 0, + 2, + 37], + ["alignment", + 1, + 5, + 0, + 2, + 37], + ["multiLevel", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["offset", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["position", + 1, + 5, + 0, + 2, + 36], + ["positionAt", + 3, + 5]], + [["majorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["minorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["title", + "ChartAxisTitle", + 35, + 0, + 0, + 4], + ["format", + "ChartAxisFormat", + 35, + 0, + 0, + 4]], + [["setCategoryNames", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCustomDisplayUnit", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCrossesAt", + 1, + 0, + 11, + 2, + 0, + 37], + ["setPositionAt", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4]]], + ["ChartAxisTitle", + 0, + [["text", + 1, + 0, + 0, + 2, + 36], + ["visible", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 27, + 0, + 2, + 37]], + [["format", + "ChartAxisTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataLabels", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataLabel", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 5, + 0, + 2, + 37], + ["left", + 1, + 5, + 0, + 2, + 37], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["formula", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["text", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 5, + 0, + 4]], + 0, + [["getSubstring", + "ChartFormatString", + 2, + 2, + 8, + 4]]], + ["ChartDataLabelFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataTable", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showHorizontalBorder", + 1, + 0, + 0, + 2, + 37], + ["showVerticalBorder", + 1, + 0, + 0, + 2, + 37], + ["showOutlineBorder", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartDataTableFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataTableFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4]]], + ["ChartErrorBars", + 0, + [["endStyleCap", + 1, + 0, + 0, + 2, + 37], + ["include", + 1, + 0, + 0, + 2, + 37], + ["type", + 1, + 0, + 0, + 2, + 37], + ["visible", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartErrorBarsFormat", + 35, + 0, + 0, + 4]]], + ["ChartErrorBarsFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlines", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36]], + [["format", + "ChartGridlinesFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlinesFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartLegend", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36], + ["position", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["width", + 1, + 11, + 0, + 2, + 37], + ["height", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartLegendFormat", + 35, + 0, + 0, + 4], + ["legendEntries", + "ChartLegendEntryCollection", + 19, + 11, + 0, + 4]]], + ["ChartLegendEntry", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["left", + 3, + 5], + ["top", + 3, + 5], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["index", + 3, + 5]]], + ["ChartLegendEntryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "ChartLegendEntry", + 1, + 2, + 0, + 4]], + 0, + "ChartLegendEntry"], + ["ChartLegendFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartMapOptions", + 0, + [["level", + 1, + 0, + 0, + 2, + 37], + ["labelStrategy", + 1, + 0, + 0, + 2, + 37], + ["projectionType", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTitle", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["width", + 3, + 11], + ["height", + 3, + 11], + ["verticalAlignment", + 1, + 11, + 0, + 2, + 37], + ["textOrientation", + 1, + 11, + 0, + 2, + 37], + ["position", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 11, + 2, + 0, + 37]], + [["getSubstring", + "ChartFormatString", + 2, + 2, + 11, + 4]]], + ["ChartFormatString", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartFill", + 4, + 0, + 0, + [["setSolidColor", + 1, + 0, + 0, + 2, + 0, + 36], + ["clear", + 0, + 0, + 0, + 2, + 0, + 37], + ["getSolidColor", + 0, + 0, + 24, + 2, + 0, + 37]]], + ["ChartBorder", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 0, + 0, + 2, + 36], + ["weight", + 1, + 0, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 5, + 2, + 0, + 37]]], + ["ChartBinOptions", + 0, + [["type", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["count", + 1, + 0, + 0, + 2, + 36], + ["allowOverflow", + 1, + 0, + 0, + 2, + 37], + ["allowUnderflow", + 1, + 0, + 0, + 2, + 37], + ["overflowValue", + 1, + 0, + 0, + 2, + 36], + ["underflowValue", + 1, + 0, + 0, + 2, + 36]]], + ["ChartBoxwhiskerOptions", + 0, + [["showInnerPoints", + 1, + 0, + 0, + 2, + 37], + ["showOutlierPoints", + 1, + 0, + 0, + 2, + 37], + ["showMeanMarker", + 1, + 0, + 0, + 2, + 37], + ["showMeanLine", + 1, + 0, + 0, + 2, + 37], + ["quartileCalculation", + 1, + 0, + 0, + 2, + 37]]], + ["ChartLineFormat", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 11, + 0, + 2, + 36], + ["weight", + 1, + 11, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartFont", + 0, + [["bold", + 1, + 0, + 0, + 2, + 37], + ["color", + 1, + 0, + 0, + 2, + 36], + ["italic", + 1, + 0, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["size", + 1, + 0, + 0, + 2, + 37], + ["underline", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTrendline", + 0, + [["type", + 1, + 0, + 0, + 2, + 37], + ["polynomialOrder", + 1, + 0, + 0, + 2, + 37], + ["movingAveragePeriod", + 1, + 0, + 0, + 2, + 37], + ["_Id", + 2], + ["showEquation", + 1, + 5, + 0, + 2, + 37], + ["showRSquared", + 1, + 5, + 0, + 2, + 37], + ["forwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["backwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["intercept", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartTrendlineFormat", + 35, + 0, + 0, + 4], + ["label", + "ChartTrendlineLabel", + 35, + 5, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartTrendlineCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "ChartTrendline", + 1, + 8, + 0, + 2, + 0, + 0, + 36], + ["getItem", + "ChartTrendline", + 1, + 18, + 0, + 4]], + 0, + "ChartTrendline"], + ["ChartTrendlineFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabel", + 0, + [["top", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 0, + 0, + 2, + 37], + ["width", + 3], + ["height", + 3], + ["formula", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 37], + ["autoText", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 0, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37]], + [["format", + "ChartTrendlineLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabelFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartPlotArea", + 0, + [["left", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 37], + ["width", + 1, + 0, + 0, + 2, + 37], + ["height", + 1, + 0, + 0, + 2, + 37], + ["insideLeft", + 1, + 0, + 0, + 2, + 37], + ["insideTop", + 1, + 0, + 0, + 2, + 37], + ["insideWidth", + 1, + 0, + 0, + 2, + 37], + ["insideHeight", + 1, + 0, + 0, + 2, + 37], + ["position", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartPlotAreaFormat", + 35, + 0, + 0, + 4]]], + ["ChartPlotAreaFormat", + 0, + 0, + [["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4]]], + ["VisualCollection", + 5, + 0, + 0, + [["getDefinitions", + 0, + 2, + 0, + 4], + ["getPreview", + 4, + 2, + 0, + 4], + ["bootstrapAgaveVisual", + 0, + 0, + 0, + 2], + ["getCount", + 0, + 2, + 0, + 4], + ["_RegisterSelectionChangedEvent", + 0, + 2], + ["_UnregisterSelectionChangedEvent", + 0, + 2]], + [["add", + "Visual", + 3, + 8, + 0, + 2], + ["_GetItem", + "Visual", + 1, + 18, + 0, + 4], + ["getSelectedOrNullObject", + "Visual", + 0, + 2, + 0, + 4]], + 0, + "Visual", + [["AgaveVisualUpdate", + 2, + 0, + "MessageType.agaveVisualUpdateEvent", + "", + "null", + "null"], + ["SelectionChanged", + 0, + 0, + "MessageType.visualSelectionChangedEvent", + "this._ParentObject.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["Visual", + 0, + [["id", + 3], + ["isSupportedInVisualTaskpane", + 3]], + [["properties", + "VisualPropertyCollection", + 18, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2], + ["getProperty", + 1, + 2, + 0, + 4], + ["setProperty", + 2, + 0, + 0, + 2], + ["changeDataSource", + 2, + 0, + 0, + 2], + ["getDataSource", + 0, + 2, + 0, + 4], + ["setPropertyToDefault", + 1, + 0, + 0, + 2], + ["_RegisterChangeEvent", + 0, + 2], + ["_UnregisterChangeEvent", + 0, + 2], + ["serializeProperties", + 0, + 2, + 0, + 4], + ["deserializeProperties", + 1, + 0, + 0, + 2], + ["addChildProperty", + 2, + 0, + 19, + 2], + ["removeChildProperty", + 2, + 0, + 19, + 2], + ["getDataFieldAssignments", + 0, + 0, + 3], + ["getDataConfig", + 0, + 2, + 3, + 4], + ["modifyDataConfig", + 1, + 0, + 3, + 2]], + [["getChildProperties", + "VisualPropertyCollection", + 2, + 6, + 0, + 4], + ["getDataControllerClient", + "DataControllerClient", + 0, + 2, + 0, + 4], + ["getElementChildProperties", + "VisualPropertyCollection", + 3, + 6, + 0, + 4]], + 0, + 0, + [["ChangeNotification", + 2, + 0, + "MessageType.visualChangeEvent", + "this.id", + "_RegisterChangeEvent", + "_UnregisterChangeEvent"]]], + ["VisualProperty", + 0, + [["type", + 3], + ["value", + 3], + ["id", + 3], + ["localizedName", + 3], + ["options", + 3], + ["localizedOptions", + 3], + ["hasDefault", + 3], + ["isDefault", + 3], + ["min", + 3], + ["max", + 3], + ["stepSize", + 3], + ["hideMeButShowChildrenUI", + 3], + ["expandableUI", + 3], + ["nextPropOnSameLine", + 3], + ["showResetUI", + 3], + ["size", + 3, + 19], + ["minSize", + 3, + 19], + ["maxSize", + 3, + 19], + ["index", + 3, + 19], + ["parentName", + 3, + 19]], + 0, + [["getBoolMetaProperty", + 1, + 2, + 0, + 4]]], + ["VisualPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "VisualProperty", + 1, + 18, + 0, + 4], + ["getItemAt", + "VisualProperty", + 1, + 2, + 0, + 4]], + 0, + "VisualProperty"], + ["DataControllerClient", + 0, + 0, + 0, + [["getWells", + 0, + 2, + 0, + 4], + ["getAssociatedFields", + 1, + 2, + 0, + 4], + ["getAvailableFields", + 1, + 2, + 0, + 4], + ["addField", + 3, + 0, + 0, + 2], + ["removeField", + 2, + 0, + 0, + 2], + ["moveField", + 3, + 0, + 0, + 2]]], + ["RangeSort", + 0, + 0, + 0, + [["apply", + 5, + 0, + 0, + 2, + 0, + 32]]], + ["TableSort", + 0, + [["matchCase", + 3], + ["method", + 3], + ["fields", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 26], + ["clear"], + ["reapply"]]], + ["Filter", + 0, + [["criteria", + 3]], + 0, + [["apply", + 1], + ["clear", + 0, + 0, + 0, + 2, + 0, + 34], + ["applyBottomItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyBottomPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCellColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyDynamicFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyFontColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyValuesFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyIconFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCustomFilter", + 3, + 0, + 0, + 2, + 0, + 34]]], + ["AutoFilter", + 0, + [["enabled", + 3], + ["isDataFiltered", + 3], + ["criteria", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 33], + ["reapply", + 0, + 0, + 0, + 2, + 0, + 26], + ["remove", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearCriteria", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearColumnCriteria", + 1, + 0, + 18]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["CultureInfo", + 0, + [["name", + 3]], + [["numberFormat", + "NumberFormatInfo", + 3, + 0, + 0, + 4], + ["datetimeFormat", + "DatetimeFormatInfo", + 3, + 27, + 0, + 4]]], + ["NumberFormatInfo", + 0, + [["numberDecimalSeparator", + 3], + ["numberGroupSeparator", + 3], + ["currencySymbol", + 3, + 30]]], + ["DatetimeFormatInfo", + 0, + [["dateSeparator", + 3], + ["longDatePattern", + 3], + ["shortDatePattern", + 3], + ["timeSeparator", + 3], + ["longTimePattern", + 3]]], + ["CustomXmlPartScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4], + ["getOnlyItem", + "CustomXmlPart", + 0, + 2, + 0, + 4], + ["getOnlyItemOrNullObject", + "CustomXmlPart", + 0, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPartCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["add", + "CustomXmlPart", + 1, + 8], + ["getByNamespace", + "CustomXmlPartScopedCollection", + 1, + 6, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPart", + 0, + [["id", + 3], + ["namespaceUri", + 3]], + 0, + [["delete"], + ["getXml", + 0, + 2, + 0, + 4], + ["setXml", + 1]]], + ["_V1Api", + 0, + 0, + 0, + [["bindingGetData", + 1, + 2, + 0, + 4], + ["getSelectedData", + 1, + 2, + 0, + 4], + ["gotoById", + 1, + 2, + 0, + 4], + ["bindingAddFromSelection", + 1, + 2], + ["bindingGetById", + 1, + 2, + 0, + 4], + ["bindingReleaseById", + 1, + 2], + ["bindingGetAll", + 0, + 2, + 0, + 4], + ["bindingAddFromNamedItem", + 1, + 2], + ["bindingAddFromPrompt", + 1, + 2], + ["bindingDeleteAllDataValues", + 1], + ["setSelectedData", + 1], + ["bindingClearFormats", + 1], + ["bindingSetData", + 1], + ["bindingSetFormats", + 1], + ["bindingSetTableOptions", + 1], + ["bindingAddRows", + 1], + ["bindingAddColumns", + 1], + ["getFilePropertiesAsync", + 0, + 2, + 9, + 4]]], + ["PivotTableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getFirst", + "PivotTable", + 0, + 10, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 0, + 4], + ["getFirstOrNullObject", + "PivotTable", + 0, + 2, + 35, + 4]], + 0, + "PivotTable"], + ["PivotTableCollection", + 5, + 0, + 0, + [["refreshAll", + 0, + 0, + 0, + 2, + 0, + 12], + ["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 15, + 4], + ["add", + "PivotTable", + 3, + 8, + 5, + 2, + 0, + 0, + 12]], + 0, + "PivotTable", + [["Added", + 0, + 3, + "MessageType.pivotTableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.pivotTableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["PivotTable", + 0, + [["name", + 1, + 0, + 0, + 2, + 12], + ["id", + 3, + 16], + ["useCustomSortLists", + 1, + 6, + 0, + 2, + 12], + ["enableDataValueEditing", + 1, + 6, + 0, + 2, + 12], + ["refreshOnOpen", + 0, + 23, + 0, + 2, + 29], + ["allowMultipleFiltersPerField", + 0, + 27, + 0, + 2, + 12]], + [["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["hierarchies", + "PivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["rowHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["columnHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["dataHierarchies", + "DataPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["filterHierarchies", + "FilterPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["layout", + "PivotLayout", + 2, + 5, + 0, + 4]], + [["refresh", + 0, + 0, + 0, + 2, + 0, + 12], + ["delete", + 0, + 0, + 5, + 2, + 0, + 12], + ["getDataSourceString", + 0, + 2, + 35, + 4], + ["getDataSourceType", + 0, + 2, + 35, + 4]], + [["addDateGroup", + "PivotHierarchy", + 2, + 0, + 8, + 2, + 0, + 0, + 38]]], + ["PivotLayout", + 0, + [["showColumnGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["showRowGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["enableFieldList", + 1, + 17, + 0, + 2, + 12], + ["subtotalLocation", + 1, + 0, + 0, + 2, + 12], + ["layoutType", + 1, + 0, + 0, + 2, + 12], + ["autoFormat", + 1, + 6, + 0, + 2, + 12], + ["preserveFormatting", + 1, + 6, + 0, + 2, + 12], + ["altTextDescription", + 0, + 23, + 0, + 2, + 29], + ["altTextTitle", + 0, + 23, + 0, + 2, + 29], + ["emptyCellText", + 0, + 23, + 0, + 2, + 29], + ["fillEmptyCells", + 0, + 23, + 0, + 2, + 29], + ["showFieldHeaders", + 0, + 23, + 0, + 2, + 29], + ["tabularValues", + 3, + 8], + ["tabularText", + 3, + 8], + ["tabularNumberFormat", + 3, + 8], + ["tabularNumberFormatLocal", + 3, + 8]], + [["pivotStyle", + "PivotTableStyle", + 35, + 8, + 0, + 4]], + [["setAutoSortOnCell", + 2, + 0, + 6, + 2, + 0, + 12], + ["setStyle", + 1, + 0, + 8, + 2, + 0, + 12], + ["displayBlankLineAfterEachItem", + 1, + 0, + 23, + 2, + 0, + 29], + ["repeatAllItemLabels", + 1, + 0, + 23, + 2, + 0, + 29]], + [["getRange", + "Range", + 0, + 3], + ["getRowLabelRange", + "Range", + 0, + 3], + ["getColumnLabelRange", + "Range", + 0, + 3], + ["getFilterAxisRange", + "Range", + 0, + 3], + ["getDataBodyRange", + "Range", + 0, + 3], + ["getCell", + "Range", + 3, + 2, + 8], + ["getPivotItems", + "PivotItemCollection", + 2, + 4, + 6], + ["getDataHierarchy", + "DataPivotHierarchy", + 1, + 3, + 6]]], + ["PivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotHierarchy", + 1, + 2, + 0, + 4]], + 0, + "PivotHierarchy"], + ["PivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]]], + ["RowColumnPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "RowColumnPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "RowColumnPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "RowColumnPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "RowColumnPivotHierarchy"], + ["RowColumnPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["FilterPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "FilterPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "FilterPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "FilterPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "FilterPivotHierarchy"], + ["FilterPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["enableMultipleFilterItems", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["DataPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "DataPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DataPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "DataPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "DataPivotHierarchy"], + ["DataPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["numberFormat", + 1, + 0, + 0, + 2, + 12], + ["summarizeBy", + 1, + 0, + 0, + 2, + 12], + ["showAs", + 1, + 0, + 0, + 2, + 12]], + [["field", + "PivotField", + 35, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["PivotFieldCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotField", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotField", + 1, + 2, + 0, + 4]], + 0, + "PivotField"], + ["PivotField", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["subtotals", + 1, + 0, + 0, + 2, + 12], + ["showAllItems", + 1, + 0, + 0, + 2, + 12]], + [["items", + "PivotItemCollection", + 19, + 0, + 0, + 4]], + [["sortByLabels", + 1, + 1, + 0, + 2, + 0, + 12], + ["sortByValues", + 3, + 0, + 6, + 2, + 0, + 12], + ["applyFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["clearAllFilters", + 0, + 0, + 27, + 2, + 0, + 12], + ["clearFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["getFilters", + 0, + 0, + 27], + ["isFiltered", + 1, + 0, + 27]]], + ["PivotItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotItem", + 1, + 2, + 0, + 4]], + 0, + "PivotItem"], + ["PivotItem", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["isExpanded", + 1, + 0, + 0, + 2, + 12], + ["visible", + 1, + 0, + 0, + 2, + 12]]], + ["WorksheetCustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["_Id", + 2]], + 0, + [["delete"]]], + ["WorksheetCustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "WorksheetCustomProperty", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "WorksheetCustomProperty", + 1], + ["add", + "WorksheetCustomProperty", + 2, + 8]], + 0, + "WorksheetCustomProperty"], + ["DocumentProperties", + 0, + [["title", + 1], + ["subject", + 1], + ["author", + 1], + ["keywords", + 1], + ["comments", + 1], + ["lastAuthor", + 3], + ["revisionNumber", + 1], + ["creationDate", + 11], + ["category", + 1], + ["manager", + 1], + ["company", + 1]], + [["custom", + "CustomPropertyCollection", + 19, + 0, + 0, + 4]]], + ["CustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["type", + 3]], + 0, + [["delete"]]], + ["CustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["deleteAll"]], + [["getItemOrNullObject", + "CustomProperty", + 1, + 2, + 0, + 4], + ["add", + "CustomProperty", + 2, + 8], + ["getItem", + "CustomProperty", + 1, + 18, + 0, + 4]], + 0, + "CustomProperty"], + ["ConditionalFormatCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["clearAll", + 0, + 0, + 0, + 2, + 0, + 39]], + [["getItemAt", + "ConditionalFormat", + 1, + 2, + 0, + 4], + ["add", + "ConditionalFormat", + 1, + 8, + 0, + 2, + 0, + 0, + 39], + ["getItem", + "ConditionalFormat", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "ConditionalFormat", + 1, + 2, + 18, + 4]], + 0, + "ConditionalFormat"], + ["ConditionalFormat", + 0, + [["stopIfTrue", + 1], + ["priority", + 1], + ["type", + 3], + ["id", + 3]], + [["dataBarOrNullObject", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["dataBar", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["customOrNullObject", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["custom", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSet", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSetOrNullObject", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScale", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScaleOrNullObject", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottom", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottomOrNullObject", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["preset", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["presetOrNullObject", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparison", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparisonOrNullObject", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValue", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValueOrNullObject", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 40], + ["changeRuleToCellValue", + 1, + 0, + 30], + ["changeRuleToColorScale", + 0, + 0, + 30], + ["changeRuleToContainsText", + 1, + 0, + 30], + ["changeRuleToCustom", + 1, + 0, + 30], + ["changeRuleToDataBar", + 0, + 0, + 30], + ["changeRuleToIconSet", + 0, + 0, + 30], + ["changeRuleToPresetCriteria", + 1, + 0, + 30], + ["changeRuleToTopBottom", + 1, + 0, + 30], + ["setRanges", + 1, + 0, + 30]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getRanges", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["DataBarConditionalFormat", + 0, + [["showDataBarOnly", + 1, + 0, + 0, + 2, + 40], + ["barDirection", + 1, + 0, + 0, + 2, + 41], + ["axisFormat", + 1, + 0, + 0, + 2, + 41], + ["axisColor", + 1, + 0, + 0, + 2, + 41], + ["lowerBoundRule", + 1, + 0, + 0, + 2, + 41], + ["upperBoundRule", + 1, + 0, + 0, + 2, + 41]], + [["positiveFormat", + "ConditionalDataBarPositiveFormat", + 35, + 0, + 0, + 4], + ["negativeFormat", + "ConditionalDataBarNegativeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalDataBarPositiveFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["gradientFill", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40]]], + ["ConditionalDataBarNegativeFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveFillColor", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveBorderColor", + 1, + 0, + 0, + 2, + 40]]], + ["CustomConditionalFormat", + 0, + 0, + [["rule", + "ConditionalFormatRule", + 35, + 0, + 0, + 4], + ["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalFormatRule", + 0, + [["formula", + 1, + 0, + 0, + 2, + 41], + ["formulaLocal", + 1], + ["formulaR1C1", + 1]]], + ["IconSetConditionalFormat", + 0, + [["reverseIconOrder", + 1, + 0, + 0, + 2, + 41], + ["showIconOnly", + 1, + 0, + 0, + 2, + 41], + ["style", + 1, + 0, + 0, + 2, + 41], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["ColorScaleConditionalFormat", + 0, + [["threeColorScale", + 3], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["TopBottomConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["PresetCriteriaConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["TextConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["CellValueConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalRangeFormat", + 0, + [["numberFormat", + 1]], + [["fill", + "ConditionalRangeFill", + 35, + 0, + 0, + 4], + ["font", + "ConditionalRangeFont", + 35, + 0, + 0, + 4], + ["borders", + "ConditionalRangeBorderCollection", + 51, + 0, + 0, + 4]], + [["clearFormat", + 0, + 0, + 30]]], + ["ConditionalRangeFont", + 0, + [["color", + 1, + 0, + 0, + 2, + 42], + ["italic", + 1, + 0, + 0, + 2, + 42], + ["bold", + 1, + 0, + 0, + 2, + 42], + ["underline", + 1, + 0, + 0, + 2, + 42], + ["strikethrough", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 42], + ["color", + 1, + 0, + 0, + 2, + 42]]], + ["ConditionalRangeBorderCollection", + 1, + [["count", + 3]], + [["top", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["bottom", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["left", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["right", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ConditionalRangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "ConditionalRangeBorder", + 1, + 2, + 0, + 4]], + 0, + "ConditionalRangeBorder"], + ["NumberFormattingService", + 0, + 0, + 0, + 0, + [["getFormatter", + "NumberFormatter", + 1, + 3]], + 0, + 0, + 0, + "Microsoft.ExcelServices.NumberFormattingService", + 4], + ["NumberFormatter", + 0, + [["isDateTime", + 3], + ["isPercent", + 3], + ["isCurrency", + 3], + ["isNumeric", + 3], + ["isText", + 3], + ["hasYear", + 3], + ["hasMonth", + 3], + ["hasDayOfWeek", + 3]], + 0, + [["format", + 1, + 3]]], + ["CustomFunctionManager", + 36, + [["status", + 2]], + 0, + [["register", + 2]], + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.CustomFunctionManager", + 4], + ["Style", + 0, + [["builtIn", + 3], + ["formulaHidden", + 1], + ["horizontalAlignment", + 1], + ["includeAlignment", + 1], + ["includeBorder", + 1], + ["includeFont", + 1], + ["includeNumber", + 1], + ["includePatterns", + 1], + ["includeProtection", + 1], + ["indentLevel", + 1], + ["locked", + 1], + ["name", + 3], + ["numberFormat", + 1], + ["numberFormatLocal", + 1], + ["readingOrder", + 1], + ["shrinkToFit", + 1], + ["verticalAlignment", + 1], + ["wrapText", + 1], + ["textOrientation", + 5, + 5], + ["autoIndent", + 1, + 5]], + [["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["fill", + "RangeFill", + 35, + 0, + 0, + 4]], + [["delete"]]], + ["StyleCollection", + 1, + 0, + 0, + [["add", + 1], + ["getCount", + 0, + 2, + 6, + 4]], + [["getItem", + "Style", + 1, + 18, + 0, + 4], + ["getItemAt", + "Style", + 1, + 2, + 6, + 4], + ["getItemOrNullObject", + "Style", + 1, + 2, + 18, + 4]], + 0, + "Style"], + ["TableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TableStyle", + 1, + 2, + 0, + 4], + ["add", + "TableStyle", + 2, + 8], + ["getDefault", + "TableStyle"]], + 0, + "TableStyle"], + ["TableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TableStyle"]]], + ["PivotTableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "PivotTableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTableStyle", + 1, + 2, + 0, + 4], + ["add", + "PivotTableStyle", + 2, + 8], + ["getDefault", + "PivotTableStyle"]], + 0, + "PivotTableStyle"], + ["PivotTableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "PivotTableStyle"]]], + ["SlicerStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "SlicerStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerStyle", + 1, + 2, + 0, + 4], + ["add", + "SlicerStyle", + 2, + 8], + ["getDefault", + "SlicerStyle"]], + 0, + "SlicerStyle"], + ["SlicerStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "SlicerStyle"]]], + ["TimelineStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TimelineStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TimelineStyle", + 1, + 2, + 0, + 4], + ["add", + "TimelineStyle", + 2, + 8], + ["getDefault", + "TimelineStyle"]], + 0, + "TimelineStyle"], + ["TimelineStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TimelineStyle"]]], + ["InternalTest", + 0, + 0, + 0, + [["delay", + 1], + ["triggerMessage", + 4, + 0, + 11], + ["_RegisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEvent", + 2, + 0, + 11], + ["triggerPostProcess", + 0, + 0, + 11], + ["_RegisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEventWithFilter", + 3, + 0, + 11], + ["firstPartyMethod", + 0, + 2, + 11, + 5], + ["_RegisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_RegisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["unregisterAllCustomFunctionExecutionEvents", + 0, + 0, + 20], + ["updateRangeValueOnCurrentSheet", + 2, + 0, + 3, + 2], + ["triggerUserUndo", + 0, + 2, + 3], + ["triggerUserRedo", + 0, + 2, + 3], + ["enterCellEdit", + 1, + 0, + 6], + ["installCustomFunctionsFromCache", + 0, + 0, + 6], + ["recalc", + 2, + 0, + 6], + ["recalcBySolutionId", + 1, + 0, + 6], + ["safeForCellEditModeMethod", + 1, + 0, + 6], + ["exitCellEdit", + 0, + 0, + 6], + ["noPermissionMethod", + 1, + 0, + 6], + ["verifyCustomFunctionListExist", + 0, + 0, + 6], + ["enableContentWorkbookLink", + 0, + 0, + 3], + ["previewExecutionMethod", + 1, + 0, + 8, + 16], + ["setRapidJsonEnabled", + 1, + 0, + 8], + ["triggerVbaRecorderRecordingChanged", + 2, + 0, + 8]], + 0, + 0, + 0, + [["CustomFunctionExecutionBeginEvent", + 0, + 20, + "MessageType.customFunctionExecutionBeginEvent", + "", + "_RegisterCustomFunctionExecutionBeginEvent", + "_UnregisterCustomFunctionExecutionBeginEvent"], + ["CustomFunctionExecutionEndEvent", + 0, + 20, + "MessageType.customFunctionExecutionEndEvent", + "", + "_RegisterCustomFunctionExecutionEndEvent", + "_UnregisterCustomFunctionExecutionEndEvent"], + ["Test1Event", + 2, + 11, + "MessageType.test1Event", + "", + "_RegisterTest1Event", + "_UnregisterTest1Event"], + ["TestEvent", + 2, + 11, + "MessageType.testEvent", + "", + "_RegisterTestEvent", + "_UnregisterTestEvent"]], + "Microsoft.ExcelServices.InternalTest", + 4], + ["PageLayout", + 0, + [["orientation", + 1], + ["paperSize", + 1], + ["blackAndWhite", + 1], + ["printErrors", + 1], + ["zoom", + 1], + ["centerHorizontally", + 1], + ["centerVertically", + 1], + ["printHeadings", + 1], + ["printGridlines", + 1], + ["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["headerMargin", + 1], + ["footerMargin", + 1], + ["printComments", + 1], + ["draftMode", + 1], + ["firstPageNumber", + 1], + ["printOrder", + 1]], + [["headersFooters", + "HeaderFooterGroup", + 35, + 0, + 0, + 4]], + [["setPrintMargins", + 2], + ["setPrintArea", + 1], + ["setPrintTitleRows", + 1], + ["setPrintTitleColumns", + 1]], + [["getPrintArea", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintAreaOrNullObject", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintTitleRows", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleRowsOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumns", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumnsOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["HeaderFooter", + 0, + [["leftHeader", + 1], + ["centerHeader", + 1], + ["rightHeader", + 1], + ["leftFooter", + 1], + ["centerFooter", + 1], + ["rightFooter", + 1]]], + ["HeaderFooterGroup", + 0, + [["state", + 1], + ["useSheetMargins", + 1], + ["useSheetScale", + 1]], + [["defaultForAllPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["firstPage", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["evenPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["oddPages", + "HeaderFooter", + 35, + 0, + 0, + 4]]], + ["PageBreak", + 0, + [["_Id", + 2], + ["columnIndex", + 3], + ["rowIndex", + 3]], + 0, + [["delete"]], + [["getCellAfterBreak", + "Range", + 0, + 10, + 0, + 4]]], + ["PageBreakCollection", + 1, + 0, + 0, + [["removePageBreaks"], + ["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PageBreak", + 1, + 18, + 0, + 4], + ["add", + "PageBreak", + 1, + 8]], + 0, + "PageBreak"], + ["DataConnectionCollection", + 0, + 0, + 0, + [["refreshAll"]], + [["add", + "DataConnection", + 4, + 8, + 8, + 2, + 0, + 0, + 12]]], + ["RangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "Range", + 1, + 2, + 0, + 4]], + 0, + "Range"], + ["RangeAreasCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeAreas", + 1, + 2, + 0, + 4]], + 0, + "RangeAreas"], + ["CommentCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 2, + 27], + ["_UnregisterAddedEvent", + 0, + 2, + 27], + ["_RegisterDeletedEvent", + 0, + 2, + 27], + ["_UnregisterDeletedEvent", + 0, + 2, + 27], + ["_RegisterChangedEvent", + 0, + 2, + 27], + ["_UnregisterChangedEvent", + 0, + 2, + 27]], + [["getItem", + "Comment", + 1, + 18, + 0, + 4], + ["getItemAt", + "Comment", + 1, + 2, + 0, + 4], + ["add", + "Comment", + 3, + 8], + ["getItemByReplyId", + "Comment", + 1, + 2, + 0, + 4], + ["getItemByCell", + "Comment", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Comment", + 1, + 2, + 18, + 4]], + 0, + "Comment", + [["Added", + 0, + 27, + "MessageType.commentAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 0, + 27, + "MessageType.commentChangedEvent", + "this._eventTargetId", + "_RegisterChangedEvent", + "_UnregisterChangedEvent"], + ["Deleted", + 0, + 27, + "MessageType.commentDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Comment", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 1, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + [["replies", + "CommentReplyCollection", + 19, + 0, + 0, + 4]], + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["CommentReplyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "CommentReply", + 2, + 8], + ["getItem", + "CommentReply", + 1, + 18, + 0, + 4], + ["getItemAt", + "CommentReply", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "CommentReply", + 1, + 2, + 18, + 4]], + 0, + "CommentReply"], + ["CommentReply", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 3, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + 0, + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getParentComment", + "Comment"], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["ShapeCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["addImage", + "Shape", + 1], + ["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["addGeometricShape", + "Shape", + 1], + ["addTextBox", + "Shape", + 1], + ["addSvg", + "Shape", + 1, + 0, + 8], + ["addGroup", + "Shape", + 1], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["addLine", + "Shape", + 5], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape", + [["Added", + 0, + 3, + "MessageType.shapeAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.shapeDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Shape", + 0, + [["id", + 3], + ["name", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["rotation", + 1], + ["zOrderPosition", + 3], + ["altTextTitle", + 1], + ["altTextDescription", + 1, + 0, + 0, + 2, + 36], + ["type", + 3], + ["lockAspectRatio", + 1], + ["placement", + 1, + 17], + ["geometricShapeType", + 1], + ["visible", + 1], + ["level", + 3], + ["connectionSiteCount", + 3], + ["scriptLink", + 1, + 8, + 0, + 2, + 37], + ["displayName", + 3, + 35]], + [["geometricShape", + "GeometricShape", + 2, + 0, + 0, + 4], + ["image", + "Image", + 2, + 0, + 0, + 4], + ["textFrame", + "TextFrame", + 2, + 0, + 0, + 4], + ["fill", + "ShapeFill", + 35, + 0, + 0, + 4], + ["group", + "ShapeGroup", + 2, + 0, + 0, + 4], + ["parentGroup", + "Shape", + 2, + 0, + 0, + 4], + ["line", + "Line", + 2, + 0, + 0, + 4], + ["lineFormat", + "ShapeLineFormat", + 35, + 0, + 0, + 4]], + [["setZOrder", + 1], + ["incrementLeft", + 1], + ["incrementTop", + 1], + ["incrementRotation", + 1], + ["scaleHeight", + 3], + ["scaleWidth", + 3], + ["delete"], + ["getAsImage", + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["activate", + 0, + 0, + 3]], + [["copyTo", + "Shape", + 1, + 8, + 17, + 0, + 0, + "_GetShapeById"], + ["_GetShapeById", + "Shape", + 1, + 2, + 17, + 4]], + 0, + 0, + [["Activated", + 0, + 0, + "MessageType.shapeActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 0, + "MessageType.shapeDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["GeometricShape", + 0, + [["id", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["Image", + 0, + [["id", + 3], + ["format", + 3, + 0, + "format"]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["ShapeGroup", + 0, + [["id", + 3]], + [["shapes", + "GroupShapeCollection", + 19, + 0, + 0, + 4], + ["shape", + "Shape", + 2, + 0, + 0, + 4]], + [["ungroup"]]], + ["GroupShapeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape"], + ["Line", + 0, + [["id", + 3], + ["connectorType", + 1, + 0, + "connectorType"], + ["beginArrowheadLength", + 1], + ["beginArrowheadStyle", + 1], + ["beginArrowheadWidth", + 1], + ["endArrowheadLength", + 1], + ["endArrowheadStyle", + 1], + ["endArrowheadWidth", + 1], + ["isBeginConnected", + 3], + ["beginConnectedSite", + 3], + ["isEndConnected", + 3], + ["endConnectedSite", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4], + ["beginConnectedShape", + "Shape", + 2, + 0, + 0, + 4], + ["endConnectedShape", + "Shape", + 2, + 0, + 0, + 4]], + [["connectBeginShape", + 2], + ["disconnectBeginShape"], + ["connectEndShape", + 2], + ["disconnectEndShape"]]], + ["ShapeFill", + 0, + [["foregroundColor", + 1], + ["type", + 3], + ["transparency", + 1]], + 0, + [["clear"], + ["setSolidColor", + 1]]], + ["ShapeLineFormat", + 0, + [["visible", + 1], + ["color", + 1], + ["style", + 1], + ["weight", + 1], + ["dashStyle", + 1], + ["transparency", + 1]]], + ["TextFrame", + 0, + [["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["horizontalAlignment", + 1], + ["horizontalOverflow", + 1], + ["verticalAlignment", + 1], + ["verticalOverflow", + 1], + ["orientation", + 1], + ["readingOrder", + 1], + ["hasText", + 3], + ["autoSizeSetting", + 1]], + [["textRange", + "TextRange", + 2, + 0, + 0, + 4]], + [["deleteText"]]], + ["TextRange", + 0, + [["text", + 1]], + [["font", + "ShapeFont", + 35, + 0, + 0, + 4]], + 0, + [["getSubstring", + "TextRange", + 2]]], + ["ShapeFont", + 0, + [["size", + 1], + ["name", + 1], + ["color", + 1], + ["bold", + 1], + ["italic", + 1], + ["underline", + 1]]], + ["Slicer", + 0, + [["id", + 3], + ["name", + 1], + ["caption", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["nameInFormula", + 1, + 8], + ["isFilterCleared", + 3], + ["style", + 1], + ["sortBy", + 1], + ["sortUsingCustomLists", + 1, + 3], + ["columnCount", + 1, + 3], + ["disableMoveResizeUI", + 1, + 3], + ["displayHeader", + 1, + 3], + ["rowHeight", + 1, + 3], + ["shapeId", + 2, + 3]], + [["slicerItems", + "SlicerItemCollection", + 19, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 35, + 0, + 0, + 4], + ["slicerStyle", + "SlicerStyle", + 35, + 8, + 0, + 4]], + [["delete"], + ["clearFilters"], + ["getSelectedItems"], + ["selectItems", + 1], + ["activate", + 0, + 2, + 3], + ["setStyle", + 1, + 0, + 8]]], + ["SlicerCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "Slicer", + 3, + 8], + ["getItemAt", + "Slicer", + 1, + 2, + 0, + 4], + ["getItem", + "Slicer", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Slicer", + 1, + 2, + 0, + 4]], + 0, + "Slicer"], + ["SlicerItem", + 0, + [["key", + 3], + ["name", + 3], + ["isSelected", + 1], + ["hasData", + 3]]], + ["SlicerItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SlicerItem", + 1, + 2, + 0, + 4], + ["getItem", + "SlicerItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerItem", + 1, + 2, + 0, + 4]], + 0, + "SlicerItem"], + ["Ribbon", + 0, + [["activeTab", + 1]], + 0, + [["executeCommand", + 2], + ["showTeachingCallout", + 3], + ["_RegisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["showChartDialog", + 1, + 2, + 8, + 4]], + 0, + 0, + 0, + [["CommandExecuted", + 0, + 0, + "MessageType.ribbonCommandExecutedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCommandExecutedEvent", + "_UnregisterCommandExecutedEvent"]]], + ["LinkedDataType", + 0, + [["dataProvider", + 2], + ["serviceId", + 2], + ["lastRefreshed", + 10], + ["name", + 2], + ["periodicRefreshInterval", + 2], + ["refreshDataLoadWarnings", + 2], + ["refreshMode", + 2], + ["supportedRefreshModes", + 2], + ["refreshErrors", + 2]], + 0, + [["requestRefresh", + 0, + 0, + 0, + 2], + ["requestSetRefreshMode", + 1, + 0, + 0, + 2]]], + ["LinkedDataTypeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["requestRefreshAll", + 0, + 0, + 0, + 2], + ["_RegisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_RegisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_RegisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4]], + [["getItem", + "LinkedDataType", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "LinkedDataType", + 1], + ["getItemAt", + "LinkedDataType", + 1, + 2, + 0, + 4]], + 0, + "LinkedDataType", + [["LinkedDataTypeAdded", + 0, + 0, + "MessageType.linkedDataTypeLinkedDataTypeAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterLinkedDataTypeAddedEvent", + "_UnregisterLinkedDataTypeAddedEvent"], + ["RefreshModeChanged", + 0, + 0, + "MessageType.linkedDataTypeRefreshModeChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshModeChangedEvent", + "_UnregisterRefreshModeChangedEvent"], + ["RefreshRequestCompleted", + 0, + 0, + "MessageType.linkedDataTypeRefreshRequestCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshRequestCompletedEvent", + "_UnregisterRefreshRequestCompletedEvent"]]], + ["SheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "SheetView", + 1]]], + ["SheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "SheetView", + 1, + 8], + ["enterTemporary", + "SheetView"], + ["getActive", + "SheetView"], + ["getItem", + "SheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "SheetView", + 1, + 2, + 0, + 4]], + 0, + "SheetView"], + ["NamedSheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "NamedSheetView", + 1]]], + ["NamedSheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "NamedSheetView", + 1, + 8], + ["enterTemporary", + "NamedSheetView"], + ["getActive", + "NamedSheetView"], + ["getItem", + "NamedSheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "NamedSheetView", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "NamedSheetView", + 1, + 2, + 28, + 4]], + 0, + "NamedSheetView"], + ["FunctionResult", + 0, + [["error", + 3], + ["value", + 3]]], + ["Functions", + 0, + 0, + 0, + 0, + [["count", + "FunctionResult", + 1, + 72], + ["if", + "FunctionResult", + 3, + 8], + ["isNA", + "FunctionResult", + 1, + 8], + ["isError", + "FunctionResult", + 1, + 8], + ["sum", + "FunctionResult", + 1, + 72], + ["average", + "FunctionResult", + 1, + 72], + ["min", + "FunctionResult", + 1, + 72], + ["max", + "FunctionResult", + 1, + 72], + ["na", + "FunctionResult", + 0, + 8], + ["npv", + "FunctionResult", + 2, + 72], + ["dollar", + "FunctionResult", + 2, + 8], + ["fixed", + "FunctionResult", + 3, + 8], + ["sin", + "FunctionResult", + 1, + 8], + ["cos", + "FunctionResult", + 1, + 8], + ["tan", + "FunctionResult", + 1, + 8], + ["atan", + "FunctionResult", + 1, + 8], + ["pi", + "FunctionResult", + 0, + 8], + ["sqrt", + "FunctionResult", + 1, + 8], + ["exp", + "FunctionResult", + 1, + 8], + ["ln", + "FunctionResult", + 1, + 8], + ["log10", + "FunctionResult", + 1, + 8], + ["abs", + "FunctionResult", + 1, + 8], + ["int", + "FunctionResult", + 1, + 8], + ["sign", + "FunctionResult", + 1, + 8], + ["round", + "FunctionResult", + 2, + 8], + ["lookup", + "FunctionResult", + 3, + 8], + ["rept", + "FunctionResult", + 2, + 8], + ["mid", + "FunctionResult", + 3, + 8], + ["len", + "FunctionResult", + 1, + 8], + ["value", + "FunctionResult", + 1, + 8], + ["true", + "FunctionResult", + 0, + 8], + ["false", + "FunctionResult", + 0, + 8], + ["and", + "FunctionResult", + 1, + 72], + ["or", + "FunctionResult", + 1, + 72], + ["not", + "FunctionResult", + 1, + 8], + ["mod", + "FunctionResult", + 2, + 8], + ["dcount", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCount"], + ["dsum", + "FunctionResult", + 3, + 8, + 0, + 0, + "DSum"], + ["daverage", + "FunctionResult", + 3, + 8, + 0, + 0, + "DAverage"], + ["dmin", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMin"], + ["dmax", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMax"], + ["dstDev", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDev"], + ["dvar", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVar"], + ["text", + "FunctionResult", + 2, + 8], + ["pv", + "FunctionResult", + 5, + 8], + ["fv", + "FunctionResult", + 5, + 8], + ["nper", + "FunctionResult", + 5, + 8, + 0, + 0, + "NPer"], + ["pmt", + "FunctionResult", + 5, + 8], + ["rate", + "FunctionResult", + 6, + 8], + ["mirr", + "FunctionResult", + 3, + 8, + 0, + 0, + "MIrr"], + ["irr", + "FunctionResult", + 2, + 8], + ["rand", + "FunctionResult", + 0, + 8], + ["match", + "FunctionResult", + 3, + 8], + ["date", + "FunctionResult", + 3, + 8], + ["time", + "FunctionResult", + 3, + 8], + ["day", + "FunctionResult", + 1, + 8], + ["month", + "FunctionResult", + 1, + 8], + ["year", + "FunctionResult", + 1, + 8], + ["weekday", + "FunctionResult", + 2, + 8], + ["hour", + "FunctionResult", + 1, + 8], + ["minute", + "FunctionResult", + 1, + 8], + ["second", + "FunctionResult", + 1, + 8], + ["now", + "FunctionResult", + 0, + 8], + ["areas", + "FunctionResult", + 1, + 8], + ["rows", + "FunctionResult", + 1, + 8], + ["columns", + "FunctionResult", + 1, + 8], + ["type", + "FunctionResult", + 1, + 8], + ["atan2", + "FunctionResult", + 2, + 8], + ["asin", + "FunctionResult", + 1, + 8], + ["acos", + "FunctionResult", + 1, + 8], + ["choose", + "FunctionResult", + 2, + 72], + ["hlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "HLookup"], + ["vlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "VLookup"], + ["isref", + "FunctionResult", + 1, + 8], + ["log", + "FunctionResult", + 2, + 8], + ["char", + "FunctionResult", + 1, + 8], + ["lower", + "FunctionResult", + 1, + 8], + ["upper", + "FunctionResult", + 1, + 8], + ["proper", + "FunctionResult", + 1, + 8], + ["left", + "FunctionResult", + 2, + 8], + ["right", + "FunctionResult", + 2, + 8], + ["exact", + "FunctionResult", + 2, + 8], + ["trim", + "FunctionResult", + 1, + 8], + ["replace", + "FunctionResult", + 4, + 8], + ["substitute", + "FunctionResult", + 4, + 8], + ["code", + "FunctionResult", + 1, + 8], + ["find", + "FunctionResult", + 3, + 8], + ["isErr", + "FunctionResult", + 1, + 8], + ["isText", + "FunctionResult", + 1, + 8], + ["isNumber", + "FunctionResult", + 1, + 8], + ["t", + "FunctionResult", + 1, + 8, + 0, + 0, + "T"], + ["n", + "FunctionResult", + 1, + 8, + 0, + 0, + "N"], + ["datevalue", + "FunctionResult", + 1, + 8], + ["timevalue", + "FunctionResult", + 1, + 8], + ["sln", + "FunctionResult", + 3, + 8], + ["syd", + "FunctionResult", + 4, + 8], + ["ddb", + "FunctionResult", + 5, + 8], + ["clean", + "FunctionResult", + 1, + 8], + ["ipmt", + "FunctionResult", + 6, + 8], + ["ppmt", + "FunctionResult", + 6, + 8], + ["countA", + "FunctionResult", + 1, + 72], + ["product", + "FunctionResult", + 1, + 72], + ["fact", + "FunctionResult", + 1, + 8], + ["dproduct", + "FunctionResult", + 3, + 8, + 0, + 0, + "DProduct"], + ["isNonText", + "FunctionResult", + 1, + 8], + ["dstDevP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDevP"], + ["dvarP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVarP"], + ["trunc", + "FunctionResult", + 2, + 8], + ["isLogical", + "FunctionResult", + 1, + 8], + ["dcountA", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCountA"], + ["usdollar", + "FunctionResult", + 2, + 8, + 0, + 0, + "USDollar"], + ["findB", + "FunctionResult", + 3, + 8], + ["replaceB", + "FunctionResult", + 4, + 8], + ["leftb", + "FunctionResult", + 2, + 8], + ["rightb", + "FunctionResult", + 2, + 8], + ["midb", + "FunctionResult", + 3, + 8], + ["lenb", + "FunctionResult", + 1, + 8], + ["roundUp", + "FunctionResult", + 2, + 8], + ["roundDown", + "FunctionResult", + 2, + 8], + ["asc", + "FunctionResult", + 1, + 8], + ["dbcs", + "FunctionResult", + 1, + 8], + ["days360", + "FunctionResult", + 3, + 8], + ["today", + "FunctionResult", + 0, + 8], + ["vdb", + "FunctionResult", + 7, + 8], + ["median", + "FunctionResult", + 1, + 72], + ["sinh", + "FunctionResult", + 1, + 8], + ["cosh", + "FunctionResult", + 1, + 8], + ["tanh", + "FunctionResult", + 1, + 8], + ["asinh", + "FunctionResult", + 1, + 8], + ["acosh", + "FunctionResult", + 1, + 8], + ["atanh", + "FunctionResult", + 1, + 8], + ["dget", + "FunctionResult", + 3, + 8, + 0, + 0, + "DGet"], + ["db", + "FunctionResult", + 5, + 8], + ["error_Type", + "FunctionResult", + 1, + 8], + ["aveDev", + "FunctionResult", + 1, + 72], + ["gammaLn", + "FunctionResult", + 1, + 8], + ["combin", + "FunctionResult", + 2, + 8], + ["even", + "FunctionResult", + 1, + 8], + ["fisher", + "FunctionResult", + 1, + 8], + ["fisherInv", + "FunctionResult", + 1, + 8], + ["standardize", + "FunctionResult", + 3, + 8], + ["odd", + "FunctionResult", + 1, + 8], + ["permut", + "FunctionResult", + 2, + 8], + ["devSq", + "FunctionResult", + 1, + 72], + ["geoMean", + "FunctionResult", + 1, + 72], + ["harMean", + "FunctionResult", + 1, + 72], + ["sumSq", + "FunctionResult", + 1, + 72], + ["kurt", + "FunctionResult", + 1, + 72], + ["skew", + "FunctionResult", + 1, + 72], + ["large", + "FunctionResult", + 2, + 8], + ["small", + "FunctionResult", + 2, + 8], + ["trimMean", + "FunctionResult", + 2, + 8], + ["concatenate", + "FunctionResult", + 1, + 72], + ["power", + "FunctionResult", + 2, + 8], + ["radians", + "FunctionResult", + 1, + 8], + ["degrees", + "FunctionResult", + 1, + 8], + ["subtotal", + "FunctionResult", + 2, + 72], + ["sumIf", + "FunctionResult", + 3, + 8], + ["countIf", + "FunctionResult", + 2, + 8], + ["countBlank", + "FunctionResult", + 1, + 8], + ["ispmt", + "FunctionResult", + 4, + 8], + ["roman", + "FunctionResult", + 2, + 8], + ["hyperlink", + "FunctionResult", + 2, + 8], + ["averageA", + "FunctionResult", + 1, + 72], + ["maxA", + "FunctionResult", + 1, + 72], + ["minA", + "FunctionResult", + 1, + 72], + ["stDevPA", + "FunctionResult", + 1, + 72], + ["varPA", + "FunctionResult", + 1, + 72], + ["stDevA", + "FunctionResult", + 1, + 72], + ["varA", + "FunctionResult", + 1, + 72], + ["bahtText", + "FunctionResult", + 1, + 8], + ["hex2Bin", + "FunctionResult", + 2, + 8], + ["hex2Dec", + "FunctionResult", + 1, + 8], + ["hex2Oct", + "FunctionResult", + 2, + 8], + ["dec2Bin", + "FunctionResult", + 2, + 8], + ["dec2Hex", + "FunctionResult", + 2, + 8], + ["dec2Oct", + "FunctionResult", + 2, + 8], + ["oct2Bin", + "FunctionResult", + 2, + 8], + ["oct2Hex", + "FunctionResult", + 2, + 8], + ["oct2Dec", + "FunctionResult", + 1, + 8], + ["bin2Dec", + "FunctionResult", + 1, + 8], + ["bin2Oct", + "FunctionResult", + 2, + 8], + ["bin2Hex", + "FunctionResult", + 2, + 8], + ["imSub", + "FunctionResult", + 2, + 8], + ["imDiv", + "FunctionResult", + 2, + 8], + ["imPower", + "FunctionResult", + 2, + 8], + ["imAbs", + "FunctionResult", + 1, + 8], + ["imSqrt", + "FunctionResult", + 1, + 8], + ["imLn", + "FunctionResult", + 1, + 8], + ["imLog2", + "FunctionResult", + 1, + 8], + ["imLog10", + "FunctionResult", + 1, + 8], + ["imSin", + "FunctionResult", + 1, + 8], + ["imCos", + "FunctionResult", + 1, + 8], + ["imExp", + "FunctionResult", + 1, + 8], + ["imArgument", + "FunctionResult", + 1, + 8], + ["imConjugate", + "FunctionResult", + 1, + 8], + ["imaginary", + "FunctionResult", + 1, + 8], + ["imReal", + "FunctionResult", + 1, + 8], + ["complex", + "FunctionResult", + 3, + 8], + ["imSum", + "FunctionResult", + 1, + 72], + ["imProduct", + "FunctionResult", + 1, + 72], + ["seriesSum", + "FunctionResult", + 4, + 8], + ["factDouble", + "FunctionResult", + 1, + 8], + ["sqrtPi", + "FunctionResult", + 1, + 8], + ["quotient", + "FunctionResult", + 2, + 8], + ["delta", + "FunctionResult", + 2, + 8], + ["geStep", + "FunctionResult", + 2, + 8], + ["isEven", + "FunctionResult", + 1, + 8], + ["isOdd", + "FunctionResult", + 1, + 8], + ["mround", + "FunctionResult", + 2, + 8, + 0, + 0, + "MRound"], + ["erf", + "FunctionResult", + 2, + 8], + ["erfC", + "FunctionResult", + 1, + 8], + ["besselJ", + "FunctionResult", + 2, + 8], + ["besselK", + "FunctionResult", + 2, + 8], + ["besselY", + "FunctionResult", + 2, + 8], + ["besselI", + "FunctionResult", + 2, + 8], + ["xirr", + "FunctionResult", + 3, + 8], + ["xnpv", + "FunctionResult", + 3, + 8], + ["priceMat", + "FunctionResult", + 6, + 8], + ["yieldMat", + "FunctionResult", + 6, + 8], + ["intRate", + "FunctionResult", + 5, + 8], + ["received", + "FunctionResult", + 5, + 8], + ["disc", + "FunctionResult", + 5, + 8], + ["priceDisc", + "FunctionResult", + 5, + 8], + ["yieldDisc", + "FunctionResult", + 5, + 8], + ["tbillEq", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillEq"], + ["tbillPrice", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillPrice"], + ["tbillYield", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillYield"], + ["price", + "FunctionResult", + 7, + 8], + ["yield", + "FunctionResult", + 7, + 8], + ["dollarDe", + "FunctionResult", + 2, + 8], + ["dollarFr", + "FunctionResult", + 2, + 8], + ["nominal", + "FunctionResult", + 2, + 8], + ["effect", + "FunctionResult", + 2, + 8], + ["cumPrinc", + "FunctionResult", + 6, + 8], + ["cumIPmt", + "FunctionResult", + 6, + 8], + ["edate", + "FunctionResult", + 2, + 8, + 0, + 0, + "EDate"], + ["eoMonth", + "FunctionResult", + 2, + 8], + ["yearFrac", + "FunctionResult", + 3, + 8], + ["coupDayBs", + "FunctionResult", + 4, + 8], + ["coupDays", + "FunctionResult", + 4, + 8], + ["coupDaysNc", + "FunctionResult", + 4, + 8], + ["coupNcd", + "FunctionResult", + 4, + 8], + ["coupNum", + "FunctionResult", + 4, + 8], + ["coupPcd", + "FunctionResult", + 4, + 8], + ["duration", + "FunctionResult", + 6, + 8], + ["mduration", + "FunctionResult", + 6, + 8, + 0, + 0, + "MDuration"], + ["oddLPrice", + "FunctionResult", + 8, + 8], + ["oddLYield", + "FunctionResult", + 8, + 8], + ["oddFPrice", + "FunctionResult", + 9, + 8], + ["oddFYield", + "FunctionResult", + 9, + 8], + ["randBetween", + "FunctionResult", + 2, + 8], + ["weekNum", + "FunctionResult", + 2, + 8], + ["amorDegrc", + "FunctionResult", + 7, + 8], + ["amorLinc", + "FunctionResult", + 7, + 8], + ["convert", + "FunctionResult", + 3, + 8], + ["accrInt", + "FunctionResult", + 8, + 8], + ["accrIntM", + "FunctionResult", + 5, + 8], + ["workDay", + "FunctionResult", + 3, + 8], + ["networkDays", + "FunctionResult", + 3, + 8], + ["gcd", + "FunctionResult", + 1, + 72], + ["multiNomial", + "FunctionResult", + 1, + 72], + ["lcm", + "FunctionResult", + 1, + 72], + ["fvschedule", + "FunctionResult", + 2, + 8, + 0, + 0, + "FVSchedule"], + ["countIfs", + "FunctionResult", + 1, + 72], + ["sumIfs", + "FunctionResult", + 2, + 72], + ["averageIf", + "FunctionResult", + 3, + 8], + ["averageIfs", + "FunctionResult", + 2, + 72], + ["binom_Dist", + "FunctionResult", + 4, + 8], + ["binom_Inv", + "FunctionResult", + 3, + 8], + ["confidence_Norm", + "FunctionResult", + 3, + 8], + ["confidence_T", + "FunctionResult", + 3, + 8], + ["expon_Dist", + "FunctionResult", + 3, + 8], + ["gamma_Dist", + "FunctionResult", + 4, + 8], + ["gamma_Inv", + "FunctionResult", + 3, + 8], + ["norm_Dist", + "FunctionResult", + 4, + 8], + ["norm_Inv", + "FunctionResult", + 3, + 8], + ["percentile_Exc", + "FunctionResult", + 2, + 8], + ["percentile_Inc", + "FunctionResult", + 2, + 8], + ["percentRank_Exc", + "FunctionResult", + 3, + 8], + ["percentRank_Inc", + "FunctionResult", + 3, + 8], + ["poisson_Dist", + "FunctionResult", + 3, + 8], + ["quartile_Exc", + "FunctionResult", + 2, + 8], + ["quartile_Inc", + "FunctionResult", + 2, + 8], + ["rank_Avg", + "FunctionResult", + 3, + 8], + ["rank_Eq", + "FunctionResult", + 3, + 8], + ["stDev_S", + "FunctionResult", + 1, + 72], + ["stDev_P", + "FunctionResult", + 1, + 72], + ["t_Dist", + "FunctionResult", + 3, + 8], + ["t_Dist_2T", + "FunctionResult", + 2, + 8], + ["t_Dist_RT", + "FunctionResult", + 2, + 8], + ["t_Inv", + "FunctionResult", + 2, + 8], + ["t_Inv_2T", + "FunctionResult", + 2, + 8], + ["var_S", + "FunctionResult", + 1, + 72], + ["var_P", + "FunctionResult", + 1, + 72], + ["weibull_Dist", + "FunctionResult", + 4, + 8], + ["networkDays_Intl", + "FunctionResult", + 4, + 8], + ["workDay_Intl", + "FunctionResult", + 4, + 8], + ["ecma_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ECMA_Ceiling"], + ["iso_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ISO_Ceiling"], + ["beta_Dist", + "FunctionResult", + 6, + 8], + ["beta_Inv", + "FunctionResult", + 5, + 8], + ["chiSq_Dist", + "FunctionResult", + 3, + 8], + ["chiSq_Dist_RT", + "FunctionResult", + 2, + 8], + ["chiSq_Inv", + "FunctionResult", + 2, + 8], + ["chiSq_Inv_RT", + "FunctionResult", + 2, + 8], + ["f_Dist", + "FunctionResult", + 4, + 8], + ["f_Dist_RT", + "FunctionResult", + 3, + 8], + ["f_Inv", + "FunctionResult", + 3, + 8], + ["f_Inv_RT", + "FunctionResult", + 3, + 8], + ["hypGeom_Dist", + "FunctionResult", + 5, + 8], + ["logNorm_Dist", + "FunctionResult", + 4, + 8], + ["logNorm_Inv", + "FunctionResult", + 3, + 8], + ["negBinom_Dist", + "FunctionResult", + 4, + 8], + ["norm_S_Dist", + "FunctionResult", + 2, + 8], + ["norm_S_Inv", + "FunctionResult", + 1, + 8], + ["z_Test", + "FunctionResult", + 3, + 8], + ["erf_Precise", + "FunctionResult", + 1, + 8], + ["erfC_Precise", + "FunctionResult", + 1, + 8], + ["gammaLn_Precise", + "FunctionResult", + 1, + 8], + ["ceiling_Precise", + "FunctionResult", + 2, + 8], + ["floor_Precise", + "FunctionResult", + 2, + 8], + ["acot", + "FunctionResult", + 1, + 8], + ["acoth", + "FunctionResult", + 1, + 8], + ["cot", + "FunctionResult", + 1, + 8], + ["coth", + "FunctionResult", + 1, + 8], + ["csc", + "FunctionResult", + 1, + 8], + ["csch", + "FunctionResult", + 1, + 8], + ["sec", + "FunctionResult", + 1, + 8], + ["sech", + "FunctionResult", + 1, + 8], + ["imTan", + "FunctionResult", + 1, + 8], + ["imCot", + "FunctionResult", + 1, + 8], + ["imCsc", + "FunctionResult", + 1, + 8], + ["imCsch", + "FunctionResult", + 1, + 8], + ["imSec", + "FunctionResult", + 1, + 8], + ["imSech", + "FunctionResult", + 1, + 8], + ["bitand", + "FunctionResult", + 2, + 8], + ["bitor", + "FunctionResult", + 2, + 8], + ["bitxor", + "FunctionResult", + 2, + 8], + ["bitlshift", + "FunctionResult", + 2, + 8], + ["bitrshift", + "FunctionResult", + 2, + 8], + ["permutationa", + "FunctionResult", + 2, + 8], + ["combina", + "FunctionResult", + 2, + 8], + ["xor", + "FunctionResult", + 1, + 72], + ["pduration", + "FunctionResult", + 3, + 8, + 0, + 0, + "PDuration"], + ["base", + "FunctionResult", + 3, + 8], + ["decimal", + "FunctionResult", + 2, + 8], + ["days", + "FunctionResult", + 2, + 8], + ["binom_Dist_Range", + "FunctionResult", + 4, + 8], + ["gamma", + "FunctionResult", + 1, + 8], + ["skew_p", + "FunctionResult", + 1, + 72], + ["gauss", + "FunctionResult", + 1, + 8], + ["phi", + "FunctionResult", + 1, + 8], + ["rri", + "FunctionResult", + 3, + 8], + ["unichar", + "FunctionResult", + 1, + 8], + ["unicode", + "FunctionResult", + 1, + 8], + ["arabic", + "FunctionResult", + 1, + 8], + ["isoWeekNum", + "FunctionResult", + 1, + 8], + ["numberValue", + "FunctionResult", + 3, + 8], + ["sheet", + "FunctionResult", + 1, + 8], + ["sheets", + "FunctionResult", + 1, + 8], + ["isFormula", + "FunctionResult", + 1, + 8], + ["ceiling_Math", + "FunctionResult", + 3, + 8], + ["floor_Math", + "FunctionResult", + 3, + 8], + ["imSinh", + "FunctionResult", + 1, + 8], + ["imCosh", + "FunctionResult", + 1, + 8]]]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataXlapi, targetNamespaceObject: Excel }); +})(Excel || (Excel = {})); +var _EndExcel = "_EndExcel"; +if (typeof (window) !== "undefined" && + window.OSF && + window.OSF._OfficeAppFactory && + window.OSF._OfficeAppFactory.getHostInfo && + window.OSF._OfficeAppFactory.getHostInfo()) { + var hostPlatform = window.OSF._OfficeAppFactory.getHostInfo().hostPlatform; + if (hostPlatform === "web") { + OfficeExtension._internalConfig.enablePreviewExecution = true; + } +} +!function (modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) + return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + i: moduleId, + l: !1, + exports: {} + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.l = !0, module.exports; + } + __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function (exports, name, getter) { + __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { + enumerable: !0, + get: getter + }); + }, __webpack_require__.r = function (exports) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(exports, "__esModule", { + value: !0 + }); + }, __webpack_require__.t = function (value, mode) { + if (1 & mode && (value = __webpack_require__(value)), 8 & mode) + return value; + if (4 & mode && "object" == typeof value && value && value.__esModule) + return value; + var ns = Object.create(null); + if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { + enumerable: !0, + value: value + }), 2 & mode && "string" != typeof value) + for (var key in value) + __webpack_require__.d(ns, key, function (key) { + return value[key]; + }.bind(null, key)); + return ns; + }, __webpack_require__.n = function (module) { + var getter = module && module.__esModule ? function () { + return module["default"]; + } : function () { + return module; + }; + return __webpack_require__.d(getter, "a", getter), getter; + }, __webpack_require__.o = function (object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 1); +}([function (module, exports) { + module.exports = OfficeExtensionBatch; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), __webpack_require__(2), "undefined" == typeof CustomFunctionMappings && (window.CustomFunctionMappings = {}), + "undefined" == typeof Promise && (window.Promise = Office.Promise), window.OfficeExtensionBatch = window.OfficeExtensionBatch || window.OfficeExtension; + var customfunctions_agave_initialize_1 = __webpack_require__(3); + !function () { + var shouldInitialize = !1; + "undefined" != typeof OSF && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo && (0 != (2 & (OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo().flags)) && (shouldInitialize = !0)); + (0, customfunctions_agave_initialize_1["default"])(shouldInitialize); + }(); + }, function (module, exports) { + !function (self) { + "use strict"; + if (!self.fetch) { + var support_searchParams = "URLSearchParams" in self, support_iterable = "Symbol" in self && "iterator" in Symbol, support_blob = "FileReader" in self && "Blob" in self && function () { + try { + return new Blob, !0; + } + catch (e) { + return !1; + } + }(), support_formData = "FormData" in self, support_arrayBuffer = "ArrayBuffer" in self; + if (support_arrayBuffer) + var viewClasses = ["[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]"], isDataView = function (obj) { + return obj && DataView.prototype.isPrototypeOf(obj); + }, isArrayBufferView = ArrayBuffer.isView || function (obj) { + return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1; + }; + Headers.prototype.append = function (name, value) { + name = normalizeName(name), value = normalizeValue(value); + var oldValue = this.map[name]; + this.map[name] = oldValue ? oldValue + "," + value : value; + }, Headers.prototype["delete"] = function (name) { + delete this.map[normalizeName(name)]; + }, Headers.prototype.get = function (name) { + return name = normalizeName(name), this.has(name) ? this.map[name] : null; + }, Headers.prototype.has = function (name) { + return this.map.hasOwnProperty(normalizeName(name)); + }, Headers.prototype.set = function (name, value) { + this.map[normalizeName(name)] = normalizeValue(value); + }, Headers.prototype.forEach = function (callback, thisArg) { + for (var name in this.map) + this.map.hasOwnProperty(name) && callback.call(thisArg, this.map[name], name, this); + }, Headers.prototype.keys = function () { + var items = []; + return this.forEach((function (value, name) { + items.push(name); + })), iteratorFor(items); + }, Headers.prototype.values = function () { + var items = []; + return this.forEach((function (value) { + items.push(value); + })), iteratorFor(items); + }, Headers.prototype.entries = function () { + var items = []; + return this.forEach((function (value, name) { + items.push([name, value]); + })), iteratorFor(items); + }, support_iterable && (Headers.prototype[Symbol.iterator] = Headers.prototype.entries); + var methods = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"]; + Request.prototype.clone = function () { + return new Request(this, { + body: this._bodyInit + }); + }, Body.call(Request.prototype), Body.call(Response.prototype), Response.prototype.clone = function () { + return new Response(this._bodyInit, { + status: this.status, + statusText: this.statusText, + headers: new Headers(this.headers), + url: this.url + }); + }, Response.error = function () { + var response = new Response(null, { + status: 0, + statusText: "" + }); + return response.type = "error", response; + }; + var redirectStatuses = [301, 302, 303, 307, 308]; + Response.redirect = function (url, status) { + if (-1 === redirectStatuses.indexOf(status)) + throw new RangeError("Invalid status code"); + return new Response(null, { + status: status, + headers: { + location: url + } + }); + }, self.Headers = Headers, self.Request = Request, self.Response = Response, self.fetch = function (input, init) { + return new Promise((function (resolve, reject) { + var request = new Request(input, init), xhr = new XMLHttpRequest; + xhr.onload = function () { + var rawHeaders, headers, options = { + status: xhr.status, + statusText: xhr.statusText, + headers: (rawHeaders = xhr.getAllResponseHeaders() || "", headers = new Headers, + rawHeaders.split(/\r?\n/).forEach((function (line) { + var parts = line.split(":"), key = parts.shift().trim(); + if (key) { + var value = parts.join(":").trim(); + headers.append(key, value); + } + })), headers) + }; + options.url = "responseURL" in xhr ? xhr.responseURL : options.headers.get("X-Request-URL"); + var body = "response" in xhr ? xhr.response : xhr.responseText; + resolve(new Response(body, options)); + }, xhr.onerror = function () { + reject(new TypeError("Network request failed")); + }, xhr.ontimeout = function () { + reject(new TypeError("Network request failed")); + }, xhr.open(request.method, request.url, !0), "include" === request.credentials && (xhr.withCredentials = !0), + "responseType" in xhr && support_blob && (xhr.responseType = "blob"), request.headers.forEach((function (value, name) { + xhr.setRequestHeader(name, value); + })), xhr.send(void 0 === request._bodyInit ? null : request._bodyInit); + })); + }, self.fetch.polyfill = !0; + } + function normalizeName(name) { + if ("string" != typeof name && (name = String(name)), /[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) + throw new TypeError("Invalid character in header field name"); + return name.toLowerCase(); + } + function normalizeValue(value) { + return "string" != typeof value && (value = String(value)), value; + } + function iteratorFor(items) { + var iterator = { + next: function () { + var value = items.shift(); + return { + done: void 0 === value, + value: value + }; + } + }; + return support_iterable && (iterator[Symbol.iterator] = function () { + return iterator; + }), iterator; + } + function Headers(headers) { + this.map = {}, headers instanceof Headers ? headers.forEach((function (value, name) { + this.append(name, value); + }), this) : Array.isArray(headers) ? headers.forEach((function (header) { + this.append(header[0], header[1]); + }), this) : headers && Object.getOwnPropertyNames(headers).forEach((function (name) { + this.append(name, headers[name]); + }), this); + } + function consumed(body) { + if (body.bodyUsed) + return Promise.reject(new TypeError("Already read")); + body.bodyUsed = !0; + } + function fileReaderReady(reader) { + return new Promise((function (resolve, reject) { + reader.onload = function () { + resolve(reader.result); + }, reader.onerror = function () { + reject(reader.error); + }; + })); + } + function readBlobAsArrayBuffer(blob) { + var reader = new FileReader, promise = fileReaderReady(reader); + return reader.readAsArrayBuffer(blob), promise; + } + function bufferClone(buf) { + if (buf.slice) + return buf.slice(0); + var view = new Uint8Array(buf.byteLength); + return view.set(new Uint8Array(buf)), view.buffer; + } + function Body() { + return this.bodyUsed = !1, this._initBody = function (body) { + if (this._bodyInit = body, body) + if ("string" == typeof body) + this._bodyText = body; + else if (support_blob && Blob.prototype.isPrototypeOf(body)) + this._bodyBlob = body; + else if (support_formData && FormData.prototype.isPrototypeOf(body)) + this._bodyFormData = body; + else if (support_searchParams && URLSearchParams.prototype.isPrototypeOf(body)) + this._bodyText = body.toString(); + else if (support_arrayBuffer && support_blob && isDataView(body)) + this._bodyArrayBuffer = bufferClone(body.buffer), + this._bodyInit = new Blob([this._bodyArrayBuffer]); + else { + if (!support_arrayBuffer || !ArrayBuffer.prototype.isPrototypeOf(body) && !isArrayBufferView(body)) + throw new Error("unsupported BodyInit type"); + this._bodyArrayBuffer = bufferClone(body); + } + else + this._bodyText = ""; + this.headers.get("content-type") || ("string" == typeof body ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : support_searchParams && URLSearchParams.prototype.isPrototypeOf(body) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8")); + }, support_blob && (this.blob = function () { + var rejected = consumed(this); + if (rejected) + return rejected; + if (this._bodyBlob) + return Promise.resolve(this._bodyBlob); + if (this._bodyArrayBuffer) + return Promise.resolve(new Blob([this._bodyArrayBuffer])); + if (this._bodyFormData) + throw new Error("could not read FormData body as blob"); + return Promise.resolve(new Blob([this._bodyText])); + }, this.arrayBuffer = function () { + return this._bodyArrayBuffer ? consumed(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(readBlobAsArrayBuffer); + }), this.text = function () { + var blob, reader, promise, rejected = consumed(this); + if (rejected) + return rejected; + if (this._bodyBlob) + return blob = this._bodyBlob, reader = new FileReader, promise = fileReaderReady(reader), + reader.readAsText(blob), promise; + if (this._bodyArrayBuffer) + return Promise.resolve(function (buf) { + for (var view = new Uint8Array(buf), chars = new Array(view.length), i = 0; i < view.length; i++) + chars[i] = String.fromCharCode(view[i]); + return chars.join(""); + }(this._bodyArrayBuffer)); + if (this._bodyFormData) + throw new Error("could not read FormData body as text"); + return Promise.resolve(this._bodyText); + }, support_formData && (this.formData = function () { + return this.text().then(decode); + }), this.json = function () { + return this.text().then(JSON.parse); + }, this; + } + function Request(input, options) { + var method, upcased, body = (options = options || {}).body; + if (input instanceof Request) { + if (input.bodyUsed) + throw new TypeError("Already read"); + this.url = input.url, this.credentials = input.credentials, options.headers || (this.headers = new Headers(input.headers)), + this.method = input.method, this.mode = input.mode, body || null == input._bodyInit || (body = input._bodyInit, + input.bodyUsed = !0); + } + else + this.url = String(input); + if (this.credentials = options.credentials || this.credentials || "omit", !options.headers && this.headers || (this.headers = new Headers(options.headers)), + this.method = (method = options.method || this.method || "GET", upcased = method.toUpperCase(), + methods.indexOf(upcased) > -1 ? upcased : method), this.mode = options.mode || this.mode || null, + this.referrer = null, ("GET" === this.method || "HEAD" === this.method) && body) + throw new TypeError("Body not allowed for GET or HEAD requests"); + this._initBody(body); + } + function decode(body) { + var form = new FormData; + return body.trim().split("&").forEach((function (bytes) { + if (bytes) { + var split = bytes.split("="), name = split.shift().replace(/\+/g, " "), value = split.join("=").replace(/\+/g, " "); + form.append(decodeURIComponent(name), decodeURIComponent(value)); + } + })), form; + } + function Response(bodyInit, options) { + options || (options = {}), this.type = "default", this.status = "status" in options ? options.status : 200, + this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in options ? options.statusText : "OK", + this.headers = new Headers(options.headers), this.url = options.url || "", this._initBody(bodyInit); + } + }("undefined" != typeof self ? self : this); + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var CFRuntime = __webpack_require__(4); + exports["default"] = function (shouldInitRuntime) { + function documentReadyCallback() { + Office.onReady((function (hostInfo) { + hostInfo.host === Office.HostType.Excel ? function initializeCustomFunctionsOrDelay() { + CustomFunctionMappings && CustomFunctionMappings.__delay__ ? setTimeout(initializeCustomFunctionsOrDelay, 50) : CFRuntime.CustomFunctions.initialize(); + }() : console.warn("Warning: Expected to be loaded inside of an Excel add-in."); + })); + } + window.CustomFunctions = window.CustomFunctions || {}, window.CustomFunctions.setCustomFunctionInvoker = CFRuntime.setCustomFunctionInvoker, + window.CustomFunctions.Error = CFRuntime.CustomFunctionError, window.CustomFunctions.ErrorCode = CFRuntime.ErrorCode, + window.CustomFunctions.FormattedNumber = CFRuntime.CustomFunctionFormattedNumber, + window.CustomFunctions.Entity = CFRuntime.CustomFunctionEntity, window.CustomFunctions.WebImage = CFRuntime.CustomFunctionWebImage, + window.CustomFunctions.Attribution = CFRuntime.CustomFunctionAttribution, window.CustomFunctions.Provider = CFRuntime.CustomFunctionProvider, + CFRuntime.setCustomFunctionAssociation(window.CustomFunctions._association), shouldInitRuntime && ("loading" === document.readyState ? document.addEventListener("DOMContentLoaded", documentReadyCallback) : documentReadyCallback()); + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function (d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) + Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function (d, b) { + if ("function" != typeof b && null !== b) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }); + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.CustomFunctionsContainer = exports.CustomFunctions = exports.setCustomFunctionInvoker = exports.setCustomFunctionAssociation = exports.customFunctionProxy = exports.CustomFunctionProxy = exports.CreateCustomFunctionInstance = exports.CustomFunctionProvider = exports.CustomFunctionAttribution = exports.CustomFunctionWebImage = exports.CustomFunctionFormattedNumber = exports.CustomFunctionEntity = exports.CustomFunctionError = exports.ErrorCode = exports.InvocationContext = exports.Script = void 0; + var OfficeExtension = __webpack_require__(0), Core = __webpack_require__(0), _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject, _createRootServiceObject = (OfficeExtension.BatchApiHelper.createMethodObject, + OfficeExtension.BatchApiHelper.createIndexerObject, OfficeExtension.BatchApiHelper.createRootServiceObject), _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject, _invokeMethod = (OfficeExtension.BatchApiHelper.createChildItemObject, + OfficeExtension.BatchApiHelper.invokeMethod), _isNullOrUndefined = (OfficeExtension.BatchApiHelper.invokeEnsureUnchanged, + OfficeExtension.BatchApiHelper.invokeSetProperty, OfficeExtension.Utility.isNullOrUndefined), _throwIfApiNotSupported = (OfficeExtension.Utility.isUndefined, + OfficeExtension.Utility.throwIfNotLoaded, OfficeExtension.Utility.throwIfApiNotSupported), _load = OfficeExtension.Utility.load, _toJson = (OfficeExtension.Utility.retrieve, + OfficeExtension.Utility.toJson), _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary, _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults, _processRetrieveResult = (OfficeExtension.Utility.adjustToDateTime, + OfficeExtension.Utility.processRetrieveResult), CustomFunctionRequestContext = (OfficeExtension.Utility.setMockData, + OfficeExtension.CommonUtility.calculateApiFlags, function (_super) { + function CustomFunctionRequestContext(requestInfo) { + var _this = _super.call(this, requestInfo) || this; + return _this.m_customFunctions = CustomFunctions.newObject(_this), _this.m_container = _createRootServiceObject(CustomFunctionsContainer, _this), + _this._rootObject = _this.m_container, _this._rootObjectPropertyName = "customFunctionsContainer", + _this._requestFlagModifier = 2176, _this; + } + return __extends(CustomFunctionRequestContext, _super), Object.defineProperty(CustomFunctionRequestContext.prototype, "customFunctions", { + get: function () { + return this.m_customFunctions; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(CustomFunctionRequestContext.prototype, "customFunctionsContainer", { + get: function () { + return this.m_container; + }, + enumerable: !1, + configurable: !0 + }), CustomFunctionRequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { + 5004 === officeJsErrorCode && (response.ErrorCode = CustomFunctionRuntimeErrorCode.invalidOperationInCellEditMode, + response.ErrorMessage = OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode)); + }, CustomFunctionRequestContext; + }(OfficeExtension.ClientRequestContext)); + exports.Script = { + _CustomFunctionMetadata: {} + }; + var CustomFunctionLoggingSeverity, InvocationContext = function () { + function InvocationContext(functionName, address, parameterAddresses, setResultHandler, setErrorHandler) { + this._functionName = functionName, _isNullOrUndefined(address) || (this._address = address), + _isNullOrUndefined(parameterAddresses) || (this._parameterAddresses = parameterAddresses), + this.setResult = setResultHandler, this.setError = setErrorHandler; + } + return Object.defineProperty(InvocationContext.prototype, "onCanceled", { + get: function () { + if (!_isNullOrUndefined(this._onCanceled) && "function" == typeof this._onCanceled) + return this._onCanceled; + }, + set: function (handler) { + this._onCanceled = handler; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(InvocationContext.prototype, "functionName", { + get: function () { + return this._functionName; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(InvocationContext.prototype, "address", { + get: function () { + return this._address; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(InvocationContext.prototype, "parameterAddresses", { + get: function () { + return this._parameterAddresses; + }, + enumerable: !1, + configurable: !0 + }), InvocationContext; + }(); + exports.InvocationContext = InvocationContext, function (CustomFunctionLoggingSeverity) { + CustomFunctionLoggingSeverity.Info = "Medium", CustomFunctionLoggingSeverity.Error = "Unexpected", + CustomFunctionLoggingSeverity.Verbose = "Verbose"; + }(CustomFunctionLoggingSeverity || (CustomFunctionLoggingSeverity = {})); + var ErrorCode, CustomFunctionLog = function (Severity, Message) { + this.Severity = Severity, this.Message = Message; + }, CustomFunctionsLogger = function () { + function CustomFunctionsLogger() { } + return CustomFunctionsLogger.logEvent = function (log, data, data2) { + if (CustomFunctionsLogger.s_shouldLog || OfficeExtension.CoreUtility._logEnabled) { + var logMessage = log.Severity + " " + log.Message + data; + if (data2 && (logMessage = logMessage + " " + data2), OfficeExtension.Utility.log(logMessage), + CustomFunctionsLogger.s_shouldLog) + switch (log.Severity) { + case CustomFunctionLoggingSeverity.Verbose: + null !== console.log && console.log(logMessage); + break; + case CustomFunctionLoggingSeverity.Info: + null !== console.info && console.info(logMessage); + break; + case CustomFunctionLoggingSeverity.Error: + null !== console.error && console.error(logMessage); + } + } + }, CustomFunctionsLogger.shouldLog = function () { + try { + return !_isNullOrUndefined(console) && !_isNullOrUndefined(window) && window.name && "string" == typeof window.name && JSON.parse(window.name)[CustomFunctionsLogger.CustomFunctionLoggingFlag]; + } + catch (ex) { + return OfficeExtension.Utility.log(JSON.stringify(ex)), !1; + } + }, CustomFunctionsLogger.CustomFunctionLoggingFlag = "CustomFunctionsRuntimeLogging", + CustomFunctionsLogger.s_shouldLog = CustomFunctionsLogger.shouldLog(), CustomFunctionsLogger; + }(); + !function (ErrorCode) { + ErrorCode.invalidValue = "#VALUE!", ErrorCode.notAvailable = "#N/A", ErrorCode.divisionByZero = "#DIV/0!", + ErrorCode.invalidNumber = "#NUM!", ErrorCode.nullReference = "#NULL!", ErrorCode.invalidName = "#NAME?", + ErrorCode.invalidReference = "#REF!"; + }(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {})); + var CustomFunctionError = function (_super) { + function CustomFunctionError(errorCode, errorMessage, errorSubType) { + var _this = _super.call(this, errorMessage || "") || this; + return _this.type = CustomFunctionError.valueType, _this.basicType = CustomFunctionError.valueType, + Object.setPrototypeOf(_this, CustomFunctionError.prototype), _this.code = errorCode || ErrorCode.invalidValue, + _this.basicValue = errorCode || ErrorCode.invalidValue, _this.errorSubType = errorSubType, + _this.stack = void 0, _this; + } + return __extends(CustomFunctionError, _super), CustomFunctionError.prototype.toJSON = function () { + return { + valueType: "CustomFunctionError", + code: this.code, + type: this.type, + basicValue: this.basicValue, + basicType: this.type, + errorSubType: this.errorSubType, + message: this._getMessage(), + errorType: this._getErrorType() + }; + }, CustomFunctionError.prototype._getErrorType = function () { + switch (this.basicValue) { + case ErrorCode.invalidValue: + return "Value"; + case ErrorCode.divisionByZero: + return "Div0"; + case ErrorCode.notAvailable: + return "NotAvailable"; + case ErrorCode.invalidNumber: + return "Num"; + case ErrorCode.invalidName: + return "Name"; + case ErrorCode.invalidReference: + return "Ref"; + case ErrorCode.nullReference: + return "Null"; + default: + return; + } + }, CustomFunctionError.prototype._getMessage = function () { + switch (this.basicValue) { + case ErrorCode.invalidValue: + case ErrorCode.notAvailable: + return "" == this.message ? void 0 : this.message; + case ErrorCode.divisionByZero: + case ErrorCode.invalidNumber: + case ErrorCode.invalidName: + case ErrorCode.invalidReference: + case ErrorCode.nullReference: + default: + return; + } + }, CustomFunctionError.valueType = "Error", CustomFunctionError; + }(Error); + exports.CustomFunctionError = CustomFunctionError; + var CustomFunctionEntity = function () { + function CustomFunctionEntity(text, properties) { + this.type = CustomFunctionEntity.valueType, this.basicValue = "#VALUE!", this.basicType = "Error", + Object.setPrototypeOf(this, CustomFunctionEntity.prototype), this.text = text, this.properties = properties; + } + return CustomFunctionEntity.prototype.toJSON = function () { + return { + type: this.type, + text: this.text, + basicValue: this.basicValue, + basicType: this.basicType, + properties: this.properties + }; + }, CustomFunctionEntity.valueType = "Entity", CustomFunctionEntity; + }(); + exports.CustomFunctionEntity = CustomFunctionEntity; + var CustomFunctionFormattedNumber = function () { + function CustomFunctionFormattedNumber(basicValue, numberFormat) { + this.type = CustomFunctionFormattedNumber.valueType, this.basicValue = basicValue, + this.numberFormat = numberFormat; + } + return CustomFunctionFormattedNumber.prototype.toJSON = function () { + return { + type: this.type, + basicValue: this.basicValue, + numberFormat: this.numberFormat + }; + }, CustomFunctionFormattedNumber.valueType = "FormattedNumber", CustomFunctionFormattedNumber; + }(); + exports.CustomFunctionFormattedNumber = CustomFunctionFormattedNumber; + var CustomFunctionWebImage = function () { + function CustomFunctionWebImage(address, altText, relatedImagesAddress, attribution, provider) { + this.type = CustomFunctionWebImage.valueType, this.basicValue = "#VALUE!", this.basicType = "Error", + this.address = address, null != attribution && (this.attribution = attribution), + null != provider && (this.provider = provider), null != altText && (this.altText = altText), + null != relatedImagesAddress && (this.relatedImagesAddress = relatedImagesAddress); + } + return CustomFunctionWebImage.prototype.toJSON = function () { + return { + type: this.type, + basicValue: this.basicValue, + basicType: this.basicType, + address: this.address, + altText: this.altText, + relatedImagesAddress: this.relatedImagesAddress, + attribution: null == this.attribution ? void 0 : this.attribution.map((function (attr) { + return attr.toJSON(); + })), + provider: null == this.provider ? void 0 : this.provider.toJSON() + }; + }, CustomFunctionWebImage.valueType = "WebImage", CustomFunctionWebImage; + }(); + exports.CustomFunctionWebImage = CustomFunctionWebImage; + var CustomFunctionAttribution = function () { + function CustomFunctionAttribution(licenseAddress, licenseText, sourceAddress, sourceText) { + null != licenseAddress && (this.licenseAddress = licenseAddress), null != licenseText && (this.licenseText = licenseText), + null != sourceAddress && (this.sourceAddress = sourceAddress), null != sourceText && (this.sourceText = sourceText); + } + return CustomFunctionAttribution.prototype.toJSON = function () { + return { + licenseAddress: this.licenseAddress, + licenseText: this.licenseText, + sourceAddress: this.sourceAddress, + sourceText: this.sourceText + }; + }, CustomFunctionAttribution; + }(); + exports.CustomFunctionAttribution = CustomFunctionAttribution; + var CustomFunctionProvider = function () { + function CustomFunctionProvider(description, logoSourceAddress, logoTargetAddress) { + this.description = description, null != logoSourceAddress && (this.logoSourceAddress = logoSourceAddress), + null != logoTargetAddress && (this.logoTargetAddress = logoTargetAddress); + } + return CustomFunctionProvider.prototype.toJSON = function () { + return { + description: this.description, + logoSourceAddress: this.logoSourceAddress, + logoTargetAddress: this.logoTargetAddress + }; + }, CustomFunctionProvider; + }(); + exports.CustomFunctionProvider = CustomFunctionProvider, exports.CreateCustomFunctionInstance = function CreateCustomFunctionInstance(parameterValues) { + if (parameterValues instanceof Array) + return parameterValues.map((function (item) { + return CreateCustomFunctionInstance(item); + })); + if (!(parameterValues instanceof Object)) + return parameterValues; + var obj = JSON.parse(parameterValues.value); + switch (obj.type) { + case CustomFunctionEntity.valueType: + return new CustomFunctionEntity(obj.text, obj.properties); + case CustomFunctionFormattedNumber.valueType: + return new CustomFunctionFormattedNumber(obj.primitive, obj.numberFormat); + case CustomFunctionError.valueType: + return new CustomFunctionError(obj.primitive, void 0, obj.errorSubCode); + case CustomFunctionWebImage.valueType: + return new CustomFunctionWebImage(obj.address, obj.altText, obj.relatedImagesAddress, obj.attribution, obj.provider); + case "Double": + case "String": + case "Boolean": + return obj.primitive; + default: + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy.createRichDataFromJsonString"); + } + }; + var CustomFunctionProxy = function () { + function CustomFunctionProxy() { + this._whenInit = void 0, this._isInit = !1, this._setResultsDelayMillis = 50, this._setResultsOverdueDelayMillis = 2e3, + this._maxContextSyncExecutionDurationMills = 15e3, this._minContextSyncIntervalMills = 500, + this._smallerMinContextSyncIntervalMills = 200, this._maxContextSyncIntervalMills = 2e3, + this._setResultsLifeMillis = 6e4, this._ensureInitRetryDelayMillis = 500, this._resultEntryBuffer = {}, + this._resultEntryRetryBuffer = {}, this._retryBufferBodySize = 0, this._isSetResultsTaskScheduled = !1, + this._setResultsTaskOverdueTime = 0, this._inProgressContextSyncExpectedFinishTime = 0, + this._batchQuotaMillis = 1e3, this._invocationContextMap = {}, this._maxResultSize = 2e6; + } + return CustomFunctionProxy.prototype._initSettings = function () { + if ("object" == typeof exports.Script && "object" == typeof exports.Script._CustomFunctionSettings) { + if ("number" == typeof exports.Script._CustomFunctionSettings.setResultsDelayMillis) { + var setResultsDelayMillis = exports.Script._CustomFunctionSettings.setResultsDelayMillis; + setResultsDelayMillis = Math.max(0, setResultsDelayMillis), setResultsDelayMillis = Math.min(1e3, setResultsDelayMillis), + this._setResultsDelayMillis = setResultsDelayMillis; + } + if ("number" == typeof exports.Script._CustomFunctionSettings.ensureInitRetryDelayMillis) { + var ensureInitRetryDelayMillis = exports.Script._CustomFunctionSettings.ensureInitRetryDelayMillis; + ensureInitRetryDelayMillis = Math.max(0, ensureInitRetryDelayMillis), ensureInitRetryDelayMillis = Math.min(2e3, ensureInitRetryDelayMillis), + this._ensureInitRetryDelayMillis = ensureInitRetryDelayMillis; + } + if ("number" == typeof exports.Script._CustomFunctionSettings.setResultsLifeMillis) { + var setResultsLifeMillis = exports.Script._CustomFunctionSettings.setResultsLifeMillis; + setResultsLifeMillis = Math.max(0, setResultsLifeMillis), setResultsLifeMillis = Math.min(6e5, setResultsLifeMillis), + this._setResultsLifeMillis = setResultsLifeMillis; + } + if ("number" == typeof exports.Script._CustomFunctionSettings.batchQuotaMillis) { + var batchQuotaMillis = exports.Script._CustomFunctionSettings.batchQuotaMillis; + batchQuotaMillis = Math.max(0, batchQuotaMillis), batchQuotaMillis = Math.min(1e3, batchQuotaMillis), + this._batchQuotaMillis = batchQuotaMillis; + } + } + }, CustomFunctionProxy.prototype.ensureInit = function (context) { + var _this = this; + return this._initSettings(), void 0 === this._whenInit && (this._whenInit = OfficeExtension.Utility._createPromiseFromResult(null).then((function () { + if (!_this._isInit) + return context.eventRegistration.register(5, "", _this._handleMessage.bind(_this)); + })).then((function () { + _this._isInit = !0; + }))), this._isInit || context._pendingRequest._addPreSyncPromise(this._whenInit), + this._whenInit; + }, CustomFunctionProxy.prototype.setCustomFunctionInvoker = function (invoker) { + "object" == typeof CustomFunctionMappings && delete CustomFunctionMappings.__delay__, + this._invoker = invoker; + }, CustomFunctionProxy.prototype.setCustomFunctionAssociation = function (association) { + var _this = this; + this._customFunctionMappingsUpperCase = void 0, this._association = association, + this._association && this._association.onchange((function () { + _this._customFunctionMappingsUpperCase = void 0; + })); + }, CustomFunctionProxy.prototype._initFromHostBridge = function (hostBridge) { + var _this = this; + this._initSettings(), hostBridge.addHostMessageHandler((function (bridgeMessage) { + 3 === bridgeMessage.type ? _this._handleMessage(bridgeMessage.message) : 4 === bridgeMessage.type && _this._handleSettings(bridgeMessage.message); + })), this._isInit = !0, this._whenInit = OfficeExtension.CoreUtility.Promise.resolve(); + }, CustomFunctionProxy.prototype._handleSettings = function (args) { + OfficeExtension.Utility.log("CustomFunctionProxy._handleSettings:" + JSON.stringify(args)), + args && "object" == typeof args && (CustomFunctionsLogger.s_shouldLog = args[CustomFunctionsLogger.CustomFunctionLoggingFlag]); + }, CustomFunctionProxy.prototype._handleMessage = function (args) { + try { + OfficeExtension.Utility.log("CustomFunctionProxy._handleMessage"), OfficeExtension.Utility.checkArgumentNull(args, "args"); + for (var entryArray = args.entries, invocationArray = [], cancellationArray = [], metadataArray = [], i = 0; i < entryArray.length; i++) + 1 === entryArray[i].messageCategory && ("string" == typeof entryArray[i].message && (entryArray[i].message = JSON.parse(entryArray[i].message)), + 1e3 === entryArray[i].messageType ? invocationArray.push(entryArray[i]) : 1001 === entryArray[i].messageType ? cancellationArray.push(entryArray[i]) : 1002 === entryArray[i].messageType ? metadataArray.push(entryArray[i]) : OfficeExtension.Utility.log("CustomFunctionProxy._handleMessage unknown message type " + entryArray[i].messageType)); + if (metadataArray.length > 0 && this._handleMetadataEntries(metadataArray), invocationArray.length > 0) { + var batchArray = this._batchInvocationEntries(invocationArray); + batchArray.length > 0 && this._invokeRemainingBatchEntries(batchArray, 0); + } + cancellationArray.length > 0 && this._handleCancellationEntries(cancellationArray); + } + catch (ex) { + throw CustomFunctionProxy._tryLog(ex), ex; + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }, CustomFunctionProxy.toLogMessage = function (ex) { + var ret = "Unknown Error"; + if (ex) + try { + ex.toString && (ret = ex.toString()), ret = ret + " " + JSON.stringify(ex); + } + catch (otherEx) { + ret = "Unexpected Error"; + } + return ret; + }, CustomFunctionProxy._tryLog = function (ex) { + var message = CustomFunctionProxy.toLogMessage(ex); + OfficeExtension.Utility.log(message); + }, CustomFunctionProxy.prototype._handleMetadataEntries = function (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var message = entryArray[i].message; + if (_isNullOrUndefined(message)) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy._handleMetadataEntries"); + exports.Script._CustomFunctionMetadata[message.functionName] = { + options: { + stream: message.isStream, + cancelable: message.isCancelable + } + }; + } + }, CustomFunctionProxy.prototype._handleCancellationEntries = function (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var message = entryArray[i].message; + if (_isNullOrUndefined(message)) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy._handleCancellationEntries"); + var invocationId = message.invocationId, invocationContext = this._invocationContextMap[invocationId]; + _isNullOrUndefined(invocationContext) || (delete this._invocationContextMap[invocationId], + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionCancellation, invocationContext.functionName), + _isNullOrUndefined(invocationContext.onCanceled) || invocationContext.onCanceled()); + } + }, CustomFunctionProxy.prototype._transferCustomFunctionError = function (entryArray) { + var _this = this; + return entryArray.map((function (value, index) { + return null === value ? value : null != value.code && "CustomFunctionError" == value.type ? new CustomFunctionError(value.code) : value instanceof Array ? _this._transferCustomFunctionError(value) : value; + })); + }, CustomFunctionProxy.prototype._transferCustomFunctionRichData = function (entryArray) { + var _this = this; + return entryArray.map((function (element, index) { + return element instanceof Array ? _this._transferCustomFunctionRichData(element) : element instanceof Object ? JSON.parse(element.value) : element; + })); + }, CustomFunctionProxy.prototype._batchInvocationEntries = function (entryArray) { + for (var _this = this, batchArray = [], _loop_1 = function (i) { + var message, arrayOrObjectMessage = entryArray[i].message; + if (Array.isArray(arrayOrObjectMessage) ? (message = { + invocationId: arrayOrObjectMessage[0], + functionName: arrayOrObjectMessage[1], + parameterValues: arrayOrObjectMessage[2], + address: arrayOrObjectMessage[3], + flags: arrayOrObjectMessage[4], + parameterAddresses: null + }, _isNullOrUndefined(arrayOrObjectMessage[5]) || (message.parameterAddresses = arrayOrObjectMessage[5])) : message = arrayOrObjectMessage, + _isNullOrUndefined(message)) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "message", "CustomFunctionProxy._batchInvocationEntries"); + if (_isNullOrUndefined(message.invocationId) || message.invocationId < 0) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "invocationId", "CustomFunctionProxy._batchInvocationEntries"); + if (_isNullOrUndefined(message.functionName)) + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.generalException, "functionName", "CustomFunctionProxy._batchInvocationEntries"); + var call = null, isCancelable = !1, isStreaming = !1, isAllowError = !1; + if ("number" == typeof message.flags) + isCancelable = 0 != (1 & message.flags), isStreaming = 0 != (2 & message.flags), + isAllowError = 0 != (4 & message.flags), 0 != (8 & message.flags) && (message.parameterValues = this_1._transferCustomFunctionRichData(message.parameterValues)), + isAllowError && (message.parameterValues = this_1._transferCustomFunctionError(message.parameterValues)); + else { + var metadata = exports.Script._CustomFunctionMetadata[message.functionName]; + if (_isNullOrUndefined(metadata)) + return CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionNotFoundLog, message.functionName), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.8") ? this_1._setError(message.invocationId, null, 9) : this_1._setError(message.invocationId, "N/A", 1), + "continue"; + isCancelable = metadata.options.cancelable, isStreaming = metadata.options.stream; + } + if (this_1._invoker && !this_1._customFunctionMappingsContains(message.functionName)) + return this_1._invokeFunctionUsingInvoker(message), + "continue"; + try { + call = this_1._getFunction(message.functionName); + } + catch (ex) { + return CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionNotFoundLog, message.functionName), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.8") ? this_1._setError(message.invocationId, ex, 10) : this_1._setError(message.invocationId, ex, 1), + "continue"; + } + var invocationContext = void 0; + if (isStreaming || isCancelable) { + var setResult = void 0, setError = void 0; + isStreaming && (setResult = function (result) { + _this._invocationContextMap[message.invocationId] ? _this._setResult(message.invocationId, result) : CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionAlreadyCancelled, message.functionName); + }, setError = function (error) { + _this._invocationContextMap[message.invocationId] ? _this._setError(message.invocationId, error.message, _this._getCustomFunctionResultErrorCodeFromErrorCode(error.code)) : CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionAlreadyCancelled, message.functionName); + }), invocationContext = new InvocationContext(message.functionName, message.address, message.parameterAddresses, setResult, setError), + this_1._invocationContextMap[message.invocationId] = invocationContext; + } + else + invocationContext = new InvocationContext(message.functionName, message.address, message.parameterAddresses); + message.parameterValues.push(invocationContext), batchArray.push({ + call: call, + isBatching: !1, + isStreaming: isStreaming, + invocationIds: [message.invocationId], + parameterValueSets: [message.parameterValues], + functionName: message.functionName + }); + }, this_1 = this, i = 0; i < entryArray.length; i++) + _loop_1(i); + return batchArray; + }, CustomFunctionProxy.prototype._invokeFunctionUsingInvoker = function (message) { + var _this = this, isCancelable = 0 != (1 & message.flags), isStreaming = 0 != (2 & message.flags), invocationId = message.invocationId, setResult = void 0, setError = void 0; + if (isStreaming) + setResult = function (result) { + _this._invocationContextMap[invocationId] && _this._setResult(invocationId, result); + }, setError = function (error) { + _this._invocationContextMap[invocationId] && _this._setError(invocationId, error.message, _this._getCustomFunctionResultErrorCodeFromErrorCode(error.code)); + }; + else { + var setResultCalled_1 = !1; + setResult = function (result) { + setResultCalled_1 || _this._setResult(invocationId, result), setResultCalled_1 = !0; + }, setError = function (error) { + setResultCalled_1 || _this._setError(invocationId, error.message, _this._getCustomFunctionResultErrorCodeFromErrorCode(error.code)), + setResultCalled_1 = !0; + }; + } + var invocationContext = new InvocationContext(message.functionName, message.address, message.parameterAddresses, setResult, setError); + (isStreaming || isCancelable) && (this._invocationContextMap[invocationId] = invocationContext), + this._invoker.invoke(message.functionName, message.parameterValues, invocationContext); + }, CustomFunctionProxy.prototype._ensureCustomFunctionMappingsUpperCase = function () { + if (_isNullOrUndefined(this._customFunctionMappingsUpperCase)) { + if (this._customFunctionMappingsUpperCase = {}, "object" == typeof CustomFunctionMappings) + for (var key in OfficeExtension.CoreUtility.log("CustomFunctionMappings.Keys=" + JSON.stringify(Object.keys(CustomFunctionMappings))), + CustomFunctionMappings) + this._customFunctionMappingsUpperCase[key.toUpperCase()] && CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionDuplicatedName, key), + this._customFunctionMappingsUpperCase[key.toUpperCase()] = CustomFunctionMappings[key]; + if (this._association) + for (var key in OfficeExtension.CoreUtility.log("CustomFunctionAssociateMappings.Keys=" + JSON.stringify(Object.keys(this._association.mappings))), + this._association.mappings) + this._customFunctionMappingsUpperCase[key.toUpperCase()] && CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionDuplicatedName, key), + this._customFunctionMappingsUpperCase[key.toUpperCase()] = this._association.mappings[key]; + } + }, CustomFunctionProxy.prototype._customFunctionMappingsContains = function (functionName) { + this._ensureCustomFunctionMappingsUpperCase(); + var functionNameUpperCase = functionName.toUpperCase(); + if (!_isNullOrUndefined(this._customFunctionMappingsUpperCase[functionNameUpperCase])) + return !0; + if ("undefined" != typeof window) { + for (var functionParent = window, functionNameSegments = functionName.split("."), i = 0; i < functionNameSegments.length - 1; i++) + if (functionParent = functionParent[functionNameSegments[i]], + _isNullOrUndefined(functionParent) || "object" != typeof functionParent) + return !1; + if ("function" == typeof functionParent[functionNameSegments[functionNameSegments.length - 1]]) + return !0; + } + return !1; + }, CustomFunctionProxy.prototype._getCustomFunctionMappings = function (functionName) { + this._ensureCustomFunctionMappingsUpperCase(); + var functionNameUpperCase = functionName.toUpperCase(); + if (!_isNullOrUndefined(this._customFunctionMappingsUpperCase[functionNameUpperCase])) { + if ("function" == typeof this._customFunctionMappingsUpperCase[functionNameUpperCase]) + return this._customFunctionMappingsUpperCase[functionNameUpperCase]; + throw OfficeExtension.Utility.createRuntimeError(CustomFunctionRuntimeErrorCode.invalidOperation, OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.customFunctionInvalidFunctionMapping, functionName), "CustomFunctionProxy._getCustomFunctionMappings"); + } + }, CustomFunctionProxy.prototype._getFunction = function (functionName) { + return this._getCustomFunctionMappings(functionName); + }, CustomFunctionProxy.prototype._invokeRemainingBatchEntries = function (batchArray, startIndex) { + OfficeExtension.Utility.log("CustomFunctionProxy._invokeRemainingBatchEntries"); + for (var startTimeMillis = Date.now(), i = startIndex; i < batchArray.length; i++) { + if (!(Date.now() - startTimeMillis < this._batchQuotaMillis)) { + OfficeExtension.Utility.log("setTimeout(CustomFunctionProxy._invokeRemainingBatchEntries)"), + setTimeout(this._invokeRemainingBatchEntries.bind(this), 0, batchArray, i); + break; + } + this._invokeFunctionAndSetResult(batchArray[i]); + } + }, CustomFunctionProxy.prototype._invokeFunctionAndSetResult = function (batch) { + var results, _this = this; + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionStartLog, batch.functionName); + var startTime = Date.now(); + try { + results = batch.isBatching ? batch.call.call(null, batch.parameterValueSets) : [batch.call.apply(null, batch.parameterValueSets[0])]; + } + catch (ex) { + var outboundData_1 = []; + outboundData_1.push(Date.now() - startTime); + for (var i = 0; i < batch.invocationIds.length; i++) + ex instanceof CustomFunctionError ? this._setErrorWithOutboundData(batch.invocationIds[i], ex.message, this._getCustomFunctionResultErrorCodeFromErrorCode(ex.code), outboundData_1) : this._setErrorWithOutboundData(batch.invocationIds[i], ex, 2, outboundData_1); + return void CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionExceptionThrownLog, batch.functionName, CustomFunctionProxy.toLogMessage(ex)); + } + var outboundData = []; + if (CustomFunctions.isFeatureEnabled(3) || outboundData.push(Date.now() - startTime), + batch.isStreaming) + ; + else if (results.length === batch.parameterValueSets.length) { + var _loop_2 = function (i) { + _isNullOrUndefined(results[i]) || "object" != typeof results[i] || "function" != typeof results[i].then ? (CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionFinishLog, batch.functionName), + this_2._setResultWithOutboundData(batch.invocationIds[i], results[i], outboundData)) : results[i].then((function (value) { + CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionFinishLog, batch.functionName), + _this._setResultWithOutboundData(batch.invocationIds[i], value, outboundData); + }), (function (reason) { + CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionRejectedPromoseLog, batch.functionName, CustomFunctionProxy.toLogMessage(reason)), + reason instanceof CustomFunctionError ? _this._setErrorWithOutboundData(batch.invocationIds[i], reason, _this._getCustomFunctionResultErrorCodeFromErrorCode(reason.code), outboundData) : _this._setErrorWithOutboundData(batch.invocationIds[i], reason, 3, outboundData); + })); + }, this_2 = this; + for (i = 0; i < results.length; i++) + _loop_2(i); + } + else { + CustomFunctions.isFeatureEnabled(3) && outboundData.push(Date.now() - startTime), + CustomFunctionsLogger.logEvent(CustomFunctionProxy.CustomFunctionExecutionBatchMismatchLog, batch.functionName); + for (i = 0; i < batch.invocationIds.length; i++) + this._setErrorWithOutboundData(batch.invocationIds[i], OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch), 4, outboundData); + } + }, CustomFunctionProxy.prototype._setResult = function (invocationId, result) { + var outboundData = []; + outboundData.push(0), this._setResultWithOutboundData(invocationId, result, outboundData); + }, CustomFunctionProxy.prototype._setResultWithOutboundData = function (invocationId, result, outboundData) { + var invocationResult = { + id: invocationId, + value: result, + outboundData: outboundData + }; + "number" == typeof result ? isNaN(result) ? (invocationResult.failed = !0, invocationResult.value = "NaN") : isFinite(result) || (invocationResult.failed = !0, + invocationResult.value = "Infinity", invocationResult.errorCode = 6) : result instanceof CustomFunctionError || result instanceof CustomFunctionEntity || result instanceof CustomFunctionFormattedNumber || result instanceof CustomFunctionWebImage ? (invocationResult.failed = !1, + invocationResult.value = result.toJSON()) : result instanceof Error && (invocationResult.failed = !0, + invocationResult.value = CustomFunctionProxy.toLogMessage(result), invocationResult.errorCode = 0); + var timeNow = Date.now(); + this._resultEntryBuffer[invocationId] = { + timeCreated: timeNow, + result: invocationResult + }, this._ensureSetResultsTaskIsScheduled(timeNow); + }, CustomFunctionProxy.prototype._setError = function (invocationId, error, errorCode) { + var outboundData = []; + outboundData.push(0), this._setErrorWithOutboundData(invocationId, error, errorCode, outboundData); + }, CustomFunctionProxy.prototype._setErrorWithOutboundData = function (invocationId, error, errorCode, outboundData) { + var message = ""; + _isNullOrUndefined(error) || (error instanceof CustomFunctionError && !_isNullOrUndefined(error.message) ? message = error.message : "string" == typeof error && (message = error)); + var result = { + id: invocationId, + failed: !0, + value: message, + errorCode: errorCode, + outboundData: outboundData + }, timeNow = Date.now(); + this._resultEntryBuffer[invocationId] = { + timeCreated: timeNow, + result: result + }, this._ensureSetResultsTaskIsScheduled(timeNow); + }, CustomFunctionProxy.prototype._getCustomFunctionResultErrorCodeFromErrorCode = function (errorCode) { + var internalCode; + switch (errorCode) { + case ErrorCode.notAvailable: + internalCode = 1; + break; + case ErrorCode.divisionByZero: + internalCode = 5; + break; + case ErrorCode.invalidValue: + internalCode = 7; + break; + case ErrorCode.invalidNumber: + internalCode = 6; + break; + case ErrorCode.nullReference: + internalCode = 8; + break; + default: + internalCode = 7; + } + return internalCode; + }, CustomFunctionProxy.prototype._ensureSetResultsTaskIsScheduled = function (timeNow) { + if (this._setResultsTaskOverdueTime > 0 && timeNow > this._setResultsTaskOverdueTime) + return OfficeExtension.Utility.log("SetResultsTask overdue"), + void this._executeSetResultsTask(); + this._isSetResultsTaskScheduled || (OfficeExtension.Utility.log("setTimeout(CustomFunctionProxy._executeSetResultsTask)"), + setTimeout(this._executeSetResultsTask.bind(this), this._setResultsDelayMillis), + this._isSetResultsTaskScheduled = !0, this._setResultsTaskOverdueTime = timeNow + this._setResultsDelayMillis + this._setResultsOverdueDelayMillis); + }, CustomFunctionProxy.prototype._convertCustomFunctionInvocationResultToArray = function (result) { + var ret = []; + return ret.push(result.id), ret.push(!result.failed), OfficeExtension.CoreUtility.isUndefined(result.value) ? ret.push(null) : ret.push(result.value), + result.failed && (OfficeExtension.CoreUtility.isUndefined(result.errorCode) ? ret.push(0) : ret.push(result.errorCode)), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.9") && ret.push(result.outboundData), + ret; + }, CustomFunctionProxy.prototype._executeSetResultsTask = function () { + var _this = this; + OfficeExtension.Utility.log("CustomFunctionProxy._executeSetResultsTask"); + var timeNow = Date.now(); + if (this._inProgressContextSyncExpectedFinishTime > 0 && this._inProgressContextSyncExpectedFinishTime > timeNow) + return OfficeExtension.Utility.log("context.sync() is in progress. setTimeout(CustomFunctionProxy._executeSetResultsTask)"), + setTimeout(this._executeSetResultsTask.bind(this), this._setResultsDelayMillis), + void (this._setResultsTaskOverdueTime = timeNow + this._setResultsDelayMillis + this._setResultsOverdueDelayMillis); + this._isSetResultsTaskScheduled = !1, this._setResultsTaskOverdueTime = 0; + var resultEntryBufferCopy = {}, isSizeRetry = !1; + CustomFunctions.isFeatureEnabled(1) && Object.keys(this._resultEntryRetryBuffer).length > 0 ? (resultEntryBufferCopy = this._resultEntryRetryBuffer, + this._resultEntryRetryBuffer = {}, this._retryBufferBodySize = 2, isSizeRetry = !0) : (resultEntryBufferCopy = this._resultEntryBuffer, + this._resultEntryBuffer = {}); + var useArrayResult = OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.7"), invocationResults = []; + for (var key in resultEntryBufferCopy) + useArrayResult ? invocationResults.push(this._convertCustomFunctionInvocationResultToArray(resultEntryBufferCopy[key].result)) : invocationResults.push(resultEntryBufferCopy[key].result); + if (0 !== invocationResults.length) { + var context = new CustomFunctionRequestContext; + useArrayResult ? context.customFunctions.setInvocationArrayResults(invocationResults) : context.customFunctions.setInvocationResults(invocationResults); + var contextSyncStartTime = Date.now(); + this._inProgressContextSyncExpectedFinishTime = contextSyncStartTime + this._maxContextSyncExecutionDurationMills, + context.sync().then((function (value) { + var timeNow = Date.now(); + _this._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(timeNow - contextSyncStartTime), + isSizeRetry && _this._ensureSetResultsTaskIsScheduled(timeNow); + }), (function (reason) { + var timeNow = Date.now(); + _this._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(timeNow - contextSyncStartTime), + CustomFunctions.isFeatureEnabled(1) && reason.code == OfficeExtension.ErrorCodes.requestPayloadSizeLimitExceeded ? _this._restoreAndSliceResultEntries(timeNow, resultEntryBufferCopy) : _this._restoreResultEntries(timeNow, resultEntryBufferCopy), + _this._ensureSetResultsTaskIsScheduled(timeNow); + })); + } + }, CustomFunctionProxy.prototype._restoreResultEntries = function (timeNow, resultEntryBufferCopy) { + for (var key in resultEntryBufferCopy) { + var resultSetter = resultEntryBufferCopy[key]; + timeNow - resultSetter.timeCreated <= this._setResultsLifeMillis && (this._resultEntryBuffer[key] || (this._resultEntryBuffer[key] = resultSetter)); + } + }, CustomFunctionProxy.prototype._restoreAndSliceResultEntries = function (timeNow, resultEntryBufferCopy) { + for (var key in resultEntryBufferCopy) { + var resultSetter = resultEntryBufferCopy[key], resultSize = void 0; + if (timeNow - resultSetter.timeCreated <= this._setResultsLifeMillis && !this._resultEntryBuffer[key]) { + try { + resultSize = JSON.stringify(this._convertCustomFunctionInvocationResultToArray(resultSetter.result)).length + 1; + } + catch (ex) { + this._resultEntryBuffer[key] = resultSetter, OfficeExtension.Utility.log("Result can't pass in JSON.stringify"); + continue; + } + this._retryBufferBodySize + resultSize < this._maxResultSize ? (this._resultEntryRetryBuffer[key] = resultSetter, + this._retryBufferBodySize += resultSize) : this._resultEntryBuffer[key] = resultSetter; + } + } + }, CustomFunctionProxy.prototype._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval = function (lastContextSyncDurationMills) { + var _this = this, contextSyncInterval = CustomFunctions.isFeatureEnabled(2) ? this._smallerMinContextSyncIntervalMills : this._minContextSyncIntervalMills, interval = Math.max(contextSyncInterval, 2 * lastContextSyncDurationMills), intervalMax = CustomFunctions.isFeatureEnabled(4) ? Math.min(this._maxContextSyncIntervalMills, interval) : interval; + OfficeExtension.Utility.log("setTimeout(clearInProgressContestSyncExpectedFinishedTime," + interval + ")"), + setTimeout((function () { + OfficeExtension.Utility.log("clearInProgressContestSyncExpectedFinishedTime"), _this._inProgressContextSyncExpectedFinishTime = 0; + }), intervalMax); + }, CustomFunctionProxy.CustomFunctionExecutionStartLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Verbose, "CustomFunctions [Execution] [Begin] Function="), + CustomFunctionProxy.CustomFunctionExecutionFailureLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] Function="), + CustomFunctionProxy.CustomFunctionExecutionRejectedPromoseLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] [RejectedPromise] Function="), + CustomFunctionProxy.CustomFunctionExecutionExceptionThrownLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] [ExceptionThrown] Function="), + CustomFunctionProxy.CustomFunctionExecutionBatchMismatchLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [End] [Failure] [BatchMismatch] Function="), + CustomFunctionProxy.CustomFunctionExecutionFinishLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Info, "CustomFunctions [Execution] [End] [Success] Function="), + CustomFunctionProxy.CustomFunctionExecutionNotFoundLog = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [Execution] [NotFound] Function="), + CustomFunctionProxy.CustomFunctionCancellation = new CustomFunctionLog(CustomFunctionLoggingSeverity.Info, "CustomFunctions [Cancellation] Function="), + CustomFunctionProxy.CustomFunctionAlreadyCancelled = new CustomFunctionLog(CustomFunctionLoggingSeverity.Info, "CustomFunctions [AlreadyCancelled] Function="), + CustomFunctionProxy.CustomFunctionDuplicatedName = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [DuplicatedName] Function="), + CustomFunctionProxy.CustomFunctionInvalidArg = new CustomFunctionLog(CustomFunctionLoggingSeverity.Error, "CustomFunctions [InvalidArg] Name="), + CustomFunctionProxy; + }(); + exports.CustomFunctionProxy = CustomFunctionProxy, exports.customFunctionProxy = new CustomFunctionProxy, + exports.setCustomFunctionAssociation = exports.customFunctionProxy.setCustomFunctionAssociation.bind(exports.customFunctionProxy), + exports.setCustomFunctionInvoker = exports.customFunctionProxy.setCustomFunctionInvoker.bind(exports.customFunctionProxy), + Core.HostBridge.onInited((function (hostBridge) { + exports.customFunctionProxy._initFromHostBridge(hostBridge); + })); + var CustomFunctions = function (_super) { + function CustomFunctions() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(CustomFunctions, _super), Object.defineProperty(CustomFunctions.prototype, "_className", { + get: function () { + return "CustomFunctions"; + }, + enumerable: !1, + configurable: !0 + }), CustomFunctions.isFeatureEnabled = function (args) { + return this._enabledFeature instanceof Array && this._enabledFeature.indexOf(args) >= 0; + }, CustomFunctions.initialize = function () { + var _this = this, context = new CustomFunctionRequestContext; + return exports.customFunctionProxy.ensureInit(context).then((function () { + var enabledFeature; + return context.customFunctions._SetOsfControlContainerReadyForCustomFunctions(), + OfficeExtension.Utility.isSetSupported("CustomFunctions", "1.9") && (enabledFeature = context.customFunctions._GetEnabledFeatures()), + OfficeExtension.Utility.log("OsfControl activation lifecycle: Set OsfControlContainer ready for CustomFunctions"), + context._customData = "SetOsfControlContainerReadyForCustomFunctions", context.sync().then((function () { + _isNullOrUndefined(enabledFeature) || (_this._enabledFeature = enabledFeature.value); + }))["catch"]((function (error) { + !function (error, rethrowOtherError) { + var isCellEditModeError = error instanceof OfficeExtension.Error && error.code === CustomFunctionRuntimeErrorCode.invalidOperationInCellEditMode; + if (OfficeExtension.CoreUtility.log("Error on starting custom functions: " + error), + isCellEditModeError) { + OfficeExtension.CoreUtility.log("Was in cell-edit mode, will try again"); + var delay_1 = exports.customFunctionProxy._ensureInitRetryDelayMillis; + return new OfficeExtension.CoreUtility.Promise((function (resolve) { + return setTimeout(resolve, delay_1); + })).then((function () { + return CustomFunctions.initialize(); + })); + } + if (rethrowOtherError) + throw error; + }(error, !0); + })); + })); + }, CustomFunctions.prototype.setInvocationArrayResults = function (results) { + _throwIfApiNotSupported("CustomFunctions.setInvocationArrayResults", "CustomFunctions", "1.4", "Excel"), + _invokeMethod(this, "SetInvocationArrayResults", 0, [results], 2, 0); + }, CustomFunctions.prototype.setInvocationResults = function (results) { + _invokeMethod(this, "SetInvocationResults", 0, [results], 2, 0); + }, CustomFunctions.prototype._GetEnabledFeatures = function () { + return _throwIfApiNotSupported("CustomFunctions._GetEnabledFeatures", "CustomFunctions", "1.4", "Excel"), + _invokeMethod(this, "_GetEnabledFeatures", 1, [], 4, 0); + }, CustomFunctions.prototype._SetInvocationError = function (invocationId, message) { + _invokeMethod(this, "_SetInvocationError", 0, [invocationId, message], 2, 0); + }, CustomFunctions.prototype._SetInvocationResult = function (invocationId, result) { + _invokeMethod(this, "_SetInvocationResult", 0, [invocationId, result], 2, 0); + }, CustomFunctions.prototype._SetOsfControlContainerReadyForCustomFunctions = function () { + _invokeMethod(this, "_SetOsfControlContainerReadyForCustomFunctions", 0, [], 10, 0); + }, CustomFunctions.prototype._handleResult = function (value) { + (_super.prototype._handleResult.call(this, value), _isNullOrUndefined(value)) || _fixObjectPathIfNecessary(this, value); + }, CustomFunctions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, CustomFunctions.newObject = function (context) { + return _createTopLevelServiceObject(CustomFunctions, context, "Microsoft.ExcelServices.CustomFunctions", !1, 4); + }, CustomFunctions.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }, CustomFunctions; + }(OfficeExtension.ClientObject); + exports.CustomFunctions = CustomFunctions; + var CustomFunctionRuntimeErrorCode, CustomFunctionsContainer = function (_super) { + function CustomFunctionsContainer() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(CustomFunctionsContainer, _super), Object.defineProperty(CustomFunctionsContainer.prototype, "_className", { + get: function () { + return "CustomFunctionsContainer"; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(CustomFunctionsContainer.prototype, "_navigationPropertyNames", { + get: function () { + return ["customFunctions"]; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(CustomFunctionsContainer.prototype, "customFunctions", { + get: function () { + return _throwIfApiNotSupported("CustomFunctionsContainer.customFunctions", "CustomFunctions", "1.2", "Excel"), + this._C || (this._C = _createPropertyObject(CustomFunctions, this, "CustomFunctions", !1, 4)), + this._C; + }, + enumerable: !1, + configurable: !0 + }), CustomFunctionsContainer.prototype._handleResult = function (value) { + if (_super.prototype._handleResult.call(this, value), !_isNullOrUndefined(value)) { + var obj = value; + _fixObjectPathIfNecessary(this, obj), _handleNavigationPropertyResults(this, obj, ["customFunctions", "CustomFunctions"]); + } + }, CustomFunctionsContainer.prototype.load = function (options) { + return _load(this, options); + }, CustomFunctionsContainer.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, CustomFunctionsContainer.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }, CustomFunctionsContainer; + }(OfficeExtension.ClientObject); + exports.CustomFunctionsContainer = CustomFunctionsContainer, function (CustomFunctionRuntimeErrorCode) { + CustomFunctionRuntimeErrorCode.generalException = "GeneralException", CustomFunctionRuntimeErrorCode.invalidOperation = "InvalidOperation", + CustomFunctionRuntimeErrorCode.invalidOperationInCellEditMode = "InvalidOperationInCellEditMode"; + }(CustomFunctionRuntimeErrorCode || (CustomFunctionRuntimeErrorCode = {})); + }]); +OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel = true; +OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria = false; +window.OfficeExtensionBatch = window.OfficeExtension; +!function (modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) + return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + i: moduleId, + l: !1, + exports: {} + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.l = !0, module.exports; + } + __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function (exports, name, getter) { + __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { + enumerable: !0, + get: getter + }); + }, __webpack_require__.r = function (exports) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(exports, "__esModule", { + value: !0 + }); + }, __webpack_require__.t = function (value, mode) { + if (1 & mode && (value = __webpack_require__(value)), 8 & mode) + return value; + if (4 & mode && "object" == typeof value && value && value.__esModule) + return value; + var ns = Object.create(null); + if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { + enumerable: !0, + value: value + }), 2 & mode && "string" != typeof value) + for (var key in value) + __webpack_require__.d(ns, key, function (key) { + return value[key]; + }.bind(null, key)); + return ns; + }, __webpack_require__.n = function (module) { + var getter = module && module.__esModule ? function () { + return module["default"]; + } : function () { + return module; + }; + return __webpack_require__.d(getter, "a", getter), getter; + }, __webpack_require__.o = function (object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 1); +}([function (module, exports) { + module.exports = OfficeExtensionBatch; + }, function (module, exports, __webpack_require__) { + "use strict"; + var __assign = this && this.__assign || function () { + return (__assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) + for (var p in s = arguments[i]) + Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]); + return t; + }).apply(this, arguments); + }; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var AsyncStorage, Storage, ApiInformationApi = __webpack_require__(2), DialogApi = __webpack_require__(4), StorageApi = __webpack_require__(5), AsyncStorageWeb = __webpack_require__(6), StorageWeb = __webpack_require__(7), Experimentation = __webpack_require__(8), officeruntime_message_1 = __webpack_require__(9), DynamicRibbon = __webpack_require__(12), officeruntime_auth_1 = __webpack_require__(13); + "undefined" != typeof OSF && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo && 0 != (1 & OSF._OfficeAppFactory.getHostInfo().flags) ? (AsyncStorage = AsyncStorageWeb, + Storage = StorageWeb.storage) : (AsyncStorage = StorageApi.AsyncStorage, Storage = StorageApi.storage), + window._OfficeRuntimeNative = __assign(__assign({}, window.OfficeRuntime), { + displayWebDialog: DialogApi.displayWebDialog, + AsyncStorage: AsyncStorage, + storage: Storage, + experimentation: Experimentation.experimentation, + apiInformation: ApiInformationApi.apiInformation, + message: officeruntime_message_1.Message.instance, + ui: DynamicRibbon.ui, + auth: officeruntime_auth_1.Auth.instance + }), Object.freeze(window._OfficeRuntimeNative); + }, function (module, exports, __webpack_require__) { + "use strict"; + (function (global) { + function getVersion(version) { + var temp = version.split("."), major = 0, minor = 0, patch = 0; + if (temp.length < 2 && isNaN(Number(version))) + throw "version format incorrect"; + if (major = Number(temp[0]), temp.length >= 2 && (minor = Number(temp[1])), temp.length >= 3 && (patch = Number(temp[2])), + isNaN(major) || isNaN(minor) || isNaN(patch)) + throw "version format incorrect"; + return { + major: major, + minor: minor, + patch: patch + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.apiInformation = void 0, exports.apiInformation = { + isSetSupported: function (capability, version) { + if ("string" != typeof capability) + return !1; + if (null == version && (version = "0.0.0"), void 0 === global.__apiSets) + return !1; + var sets = global.__apiSets, index = Object.keys(sets).map((function (key) { + return key.toLowerCase(); + })).indexOf(capability.toLowerCase()); + if (index > -1) { + var setMaxVersion = sets[Object.keys(sets)[index]]; + try { + var minVersionNum = getVersion(version), setMaxVersionNum = void 0; + if ((setMaxVersionNum = Array.isArray(setMaxVersion) ? function (versions, majorVersion) { + for (var i = 0; i < versions.length; i++) { + var v = getVersion(versions[i]); + if (v.major == majorVersion) + return v; + } + return { + major: 0, + minor: 0, + patch: 0 + }; + }(setMaxVersion, minVersionNum.major) : getVersion(setMaxVersion)).major > 0) { + if (setMaxVersionNum.major > minVersionNum.major) + return !0; + if (setMaxVersionNum.major == minVersionNum.major && setMaxVersionNum.minor > minVersionNum.minor) + return !0; + if (setMaxVersionNum.major == minVersionNum.major && setMaxVersionNum.minor == minVersionNum.minor && setMaxVersionNum.patch >= minVersionNum.patch) + return !0; + } + } + catch (e) { + return !1; + } + } + return !1; + } + }; + }).call(this, __webpack_require__(3)); + }, function (module, exports) { + var g; + g = function () { + return this; + }(); + try { + g = g || new Function("return this")(); + } + catch (e) { + "object" == typeof window && (g = window); + } + module.exports = g; + }, function (module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function (d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) + Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function (d, b) { + if ("function" != typeof b && null !== b) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }); + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.DialogErrorCodes = exports.DialogService = exports.displayWebDialog = exports.Dialog = void 0; + var OfficeExtension = __webpack_require__(0), _createTopLevelServiceObject = (OfficeExtension.BatchApiHelper.createPropertyObject, + OfficeExtension.BatchApiHelper.createMethodObject, OfficeExtension.BatchApiHelper.createIndexerObject, + OfficeExtension.BatchApiHelper.createRootServiceObject, OfficeExtension.BatchApiHelper.createTopLevelServiceObject), _invokeMethod = (OfficeExtension.BatchApiHelper.createChildItemObject, + OfficeExtension.BatchApiHelper.invokeMethod), _isNullOrUndefined = (OfficeExtension.BatchApiHelper.invokeEnsureUnchanged, + OfficeExtension.BatchApiHelper.invokeSetProperty, OfficeExtension.Utility.isNullOrUndefined), _toJson = (OfficeExtension.Utility.isUndefined, + OfficeExtension.Utility.throwIfNotLoaded, OfficeExtension.Utility.throwIfApiNotSupported, + OfficeExtension.Utility.load, OfficeExtension.Utility.retrieve, OfficeExtension.Utility.toJson), _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary, _processRetrieveResult = (OfficeExtension.Utility._handleNavigationPropertyResults, + OfficeExtension.Utility.adjustToDateTime, OfficeExtension.Utility.processRetrieveResult), Dialog = (OfficeExtension.Utility.setMockData, + OfficeExtension.CommonUtility.calculateApiFlags, function () { + function Dialog(_dialogService) { + this._dialogService = _dialogService; + } + return Dialog.prototype.close = function () { + return this._dialogService.close(), this._dialogService.context.sync(); + }, Dialog; + }()); + exports.Dialog = Dialog, exports.displayWebDialog = function (url, options) { + return void 0 === options && (options = {}), new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) + throw new OfficeExtension.Error({ + code: "InvalidArgument", + message: 'Dimensions must be "number%" or number.' + }); + var ctx = new OfficeExtension.ClientRequestContext, dialogService = DialogService.newObject(ctx), dialog = new Dialog(dialogService), eventResult = dialogService.onDialogMessage.add((function (args) { + switch (OfficeExtension.Utility.log("dialogMessageHandler:" + JSON.stringify(args)), + args.type) { + case 17: + args.error ? reject(args.error) : resolve(dialog); + break; + case 12: + options.onMessage && options.onMessage(args.message, dialog, args.origin); + break; + case 10: + default: + 12006 === args.originalErrorCode ? (eventResult && (eventResult.remove(), ctx.sync()), + options.onClose && options.onClose()) : options.onRuntimeError && (options.onRuntimeError(args.error, dialog), + reject(args.error)); + } + return OfficeExtension.CoreUtility.Promise.resolve(); + })); + return ctx.sync().then((function () { + var dialogOptions = { + width: options.width ? parseInt(options.width) : 50, + height: options.height ? parseInt(options.height) : 50, + displayInIFrame: options.displayInIFrame + }; + return dialogService.displayDialog(url, dialogOptions), ctx.sync(); + }))["catch"]((function (e) { + reject(e); + })); + })); + function isInt(value) { + return /^(\-|\+)?([0-9]+)%?$/.test(value); + } + }; + var DialogEventType, DialogService = function (_super) { + function DialogService() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(DialogService, _super), Object.defineProperty(DialogService.prototype, "_className", { + get: function () { + return "DialogService"; + }, + enumerable: !1, + configurable: !0 + }), DialogService.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4, 0); + }, DialogService.prototype.displayDialog = function (url, options) { + _invokeMethod(this, "DisplayDialog", 1, [url, options], 4, 0); + }, DialogService.prototype._handleResult = function (value) { + (_super.prototype._handleResult.call(this, value), _isNullOrUndefined(value)) || _fixObjectPathIfNecessary(this, value); + }, DialogService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, DialogService.newObject = function (context) { + return _createTopLevelServiceObject(DialogService, context, "Microsoft.Dialog.DialogService", !1, 4); + }, Object.defineProperty(DialogService.prototype, "onDialogMessage", { + get: function () { + return this.m_dialogMessage || (this.m_dialogMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "DialogMessage", { + eventType: 65536, + registerFunc: function () { }, + unregisterFunc: function () { }, + getTargetIdFunc: function () { + return null; + }, + eventArgsTransformFunc: function (args) { + var transformedArgs, internalCode, _a, table; + try { + var parsedMessage = JSON.parse(args.message), error = parsedMessage.errorCode ? new OfficeExtension.Error((internalCode = parsedMessage.errorCode, + (_a = {})[12002] = { + code: "InvalidUrl", + message: "Cannot load URL, no such page or bad URL syntax." + }, _a[12003] = { + code: "InvalidUrl", + message: "HTTPS is required." + }, _a[12004] = { + code: "Untrusted", + message: "Domain is not trusted." + }, _a[12005] = { + code: "InvalidUrl", + message: "HTTPS is required." + }, _a[12007] = { + code: "FailedToOpen", + message: "Another dialog is already opened." + }, (table = _a)[internalCode] ? table[internalCode] : { + code: "Unknown", + message: "An unknown error has occured with code: " + internalCode + })) : null; + transformedArgs = { + originalErrorCode: parsedMessage.errorCode, + type: parsedMessage.type, + error: error, + message: parsedMessage.message, + origin: parsedMessage.origin + }; + } + catch (e) { + transformedArgs = { + originalErrorCode: null, + type: 17, + error: new OfficeExtension.Error({ + code: "GenericException", + message: "Unknown error" + }), + message: e.message + }; + } + return OfficeExtension.Utility._createPromiseFromResult(transformedArgs); + } + })), this.m_dialogMessage; + }, + enumerable: !1, + configurable: !0 + }), DialogService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }, DialogService; + }(OfficeExtension.ClientObject); + exports.DialogService = DialogService, function (DialogEventType) { + DialogEventType[DialogEventType.dialogMessageReceived = 0] = "dialogMessageReceived", + DialogEventType[DialogEventType.dialogEventReceived = 1] = "dialogEventReceived"; + }(DialogEventType || (DialogEventType = {})), function (DialogErrorCodes) { + DialogErrorCodes.generalException = "GeneralException"; + }(exports.DialogErrorCodes || (exports.DialogErrorCodes = {})); + }, function (module, exports, __webpack_require__) { + "use strict"; + var extendStatics, __extends = this && this.__extends || (extendStatics = function (d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) + Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]); + })(d, b); + }, function (d, b) { + if ("function" != typeof b && null !== b) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }); + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ErrorCodes = exports.PersistentKvStorageService = exports.storage = exports.AsyncStorage = void 0; + var OfficeExtension = __webpack_require__(0), _createTopLevelServiceObject = (OfficeExtension.BatchApiHelper.createPropertyObject, + OfficeExtension.BatchApiHelper.createMethodObject, OfficeExtension.BatchApiHelper.createIndexerObject, + OfficeExtension.BatchApiHelper.createRootServiceObject, OfficeExtension.BatchApiHelper.createTopLevelServiceObject), _invokeMethod = (OfficeExtension.BatchApiHelper.createChildItemObject, + OfficeExtension.BatchApiHelper.invokeMethod), _isNullOrUndefined = (OfficeExtension.BatchApiHelper.invokeEnsureUnchanged, + OfficeExtension.BatchApiHelper.invokeSetProperty, OfficeExtension.Utility.isNullOrUndefined), _toJson = (OfficeExtension.Utility.isUndefined, + OfficeExtension.Utility.throwIfNotLoaded, OfficeExtension.Utility.throwIfApiNotSupported, + OfficeExtension.Utility.load, OfficeExtension.Utility.retrieve, OfficeExtension.Utility.toJson), _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary, _processRetrieveResult = (OfficeExtension.Utility._handleNavigationPropertyResults, + OfficeExtension.Utility.adjustToDateTime, OfficeExtension.Utility.processRetrieveResult); + OfficeExtension.Utility.setMockData, OfficeExtension.CommonUtility.calculateApiFlags; + function callPersistentKvStorageManager(nativeCall, getValueOnSuccess) { + return new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + var storageManager = PersistentKvStorageManager.getInstance(), invokeId = storageManager.setCallBack((function (result, error) { + if (error) + reject(error); + else { + var value = getValueOnSuccess(result); + resolve(value); + } + })); + storageManager.ctx.sync().then((function () { + var storageService = storageManager.getPersistentKvStorageService(); + return nativeCall(storageService, invokeId), storageManager.ctx.sync(); + }))["catch"]((function (e) { + reject(e); + })); + })); + } + function callStorageManager(nativeCall, getValueOnSuccess, callback) { + return new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + var storageManager = PersistentKvStorageManager.getInstance(), invokeId = storageManager.setCallBack((function (result, error) { + if (error) + return callback && callback(error), void reject(error); + var value = getValueOnSuccess(result); + callback && callback(null, value), resolve(value); + })); + storageManager.ctx.sync().then((function () { + var storageService = storageManager.getPersistentKvStorageService(); + return nativeCall(storageService, invokeId), storageManager.ctx.sync(); + }))["catch"]((function (e) { + reject(e); + })); + })); + } + exports.AsyncStorage = { + getItem: function (key, callback) { + return callStorageManager((function (storage, invokeId) { + return storage.multiGet(invokeId, JSON.stringify([key])); + }), (function (result) { + var parsedResult = JSON.parse(result); + return parsedResult && parsedResult[0] && parsedResult[0][1] ? parsedResult[0][1] : null; + }), callback); + }, + setItem: function (key, value, callback) { + return callStorageManager((function (storage, invokeId) { + return storage.multiSet(invokeId, JSON.stringify([[key, value]])); + }), (function () { + return null; + }), callback); + }, + removeItem: function (key, callback) { + return callStorageManager((function (storage, invokeId) { + return storage.multiRemove(invokeId, JSON.stringify([key])); + }), (function () { + return null; + }), callback); + }, + multiGet: function (keys, callback) { + return callStorageManager((function (storage, invokeId) { + return storage.multiGet(invokeId, JSON.stringify(keys)); + }), (function (result) { + var keyValues = JSON.parse(result), map = {}; + return keyValues && keyValues.forEach((function (_a) { + var key = _a[0], value = _a[1]; + return map[key] = value, value; + })), keys.map((function (key) { + return [key, map[key] ? map[key] : null]; + })); + }), callback); + }, + multiSet: function (keyValuePairs, callback) { + return callStorageManager((function (storage, invokeId) { + return storage.multiSet(invokeId, JSON.stringify(keyValuePairs)); + }), (function () { + return null; + }), callback); + }, + multiRemove: function (keys, callback) { + return callStorageManager((function (storage, invokeId) { + return storage.multiRemove(invokeId, JSON.stringify(keys)); + }), (function () { + return null; + }), callback); + }, + getAllKeys: function (callback) { + return callStorageManager((function (storage, invokeId) { + return storage.getAllKeys(invokeId); + }), (function (result) { + return JSON.parse(result); + }), callback); + }, + clear: function (callback) { + return callStorageManager((function (storage, invokeId) { + return storage.clear(invokeId); + }), (function () { + return null; + }), callback); + } + }, exports.storage = { + getItem: function (key) { + return callPersistentKvStorageManager((function (perStorage, invokeId) { + return perStorage.multiGet(invokeId, JSON.stringify([key])); + }), (function (result) { + var parsedResult = JSON.parse(result); + return parsedResult && parsedResult[0] && parsedResult[0][1] ? parsedResult[0][1] : null; + })); + }, + setItem: function (key, value) { + return callPersistentKvStorageManager((function (perStorage, invokeId) { + return perStorage.multiSet(invokeId, JSON.stringify([[key, value]])); + }), (function () { + return null; + })); + }, + removeItem: function (key) { + return callPersistentKvStorageManager((function (perStorage, invokeId) { + return perStorage.multiRemove(invokeId, JSON.stringify([key])); + }), (function () { + return null; + })); + }, + getItems: function (keys) { + return callPersistentKvStorageManager((function (perStorage, invokeId) { + return perStorage.multiGet(invokeId, JSON.stringify(keys)); + }), (function (result) { + var keyValues = JSON.parse(result), map = {}; + return keys.forEach((function (k) { + map[k] = null; + })), keyValues && keyValues.forEach((function (_a) { + var key = _a[0], value = _a[1]; + return map[key] = value, value; + })), map; + })); + }, + setItems: function (keyValues) { + var keyValuePairs = []; + for (var key in keyValues) + keyValues.hasOwnProperty(key) && keyValuePairs.push([key, keyValues[key]]); + return callPersistentKvStorageManager((function (storage, invokeId) { + return storage.multiSet(invokeId, JSON.stringify(keyValuePairs)); + }), (function () { + return null; + })); + }, + removeItems: function (keys) { + return callPersistentKvStorageManager((function (perStorage, invokeId) { + return perStorage.multiRemove(invokeId, JSON.stringify(keys)); + }), (function () { + return null; + })); + }, + getKeys: function () { + return callPersistentKvStorageManager((function (perStorage, invokeId) { + return perStorage.getAllKeys(invokeId); + }), (function (result) { + return JSON.parse(result); + })); + } + }; + var PersistentKvStorageManager = function () { + function PersistentKvStorageManager() { + var _this = this; + this._invokeId = 0, this._callDict = {}, this.ctx = new OfficeExtension.ClientRequestContext, + this._perkvstorService = PersistentKvStorageService.newObject(this.ctx), this._eventResult = this._perkvstorService.onPersistentStorageMessage.add((function (args) { + OfficeExtension.Utility.log("persistentKvStoragegMessageHandler:" + JSON.stringify(args)); + var callback = _this._callDict[args.invokeId]; + callback && (callback(args.message, args.error), delete _this._callDict[args.invokeId]); + })); + } + return PersistentKvStorageManager.getInstance = function () { + return void 0 === PersistentKvStorageManager.instance ? PersistentKvStorageManager.instance = new PersistentKvStorageManager : PersistentKvStorageManager.instance._perkvstorService = PersistentKvStorageService.newObject(PersistentKvStorageManager.instance.ctx), + PersistentKvStorageManager.instance; + }, PersistentKvStorageManager.prototype.getPersistentKvStorageService = function () { + return this._perkvstorService; + }, PersistentKvStorageManager.prototype.getCallBack = function (callId) { + return this._callDict[callId]; + }, PersistentKvStorageManager.prototype.setCallBack = function (callback) { + var id = this._invokeId; + return this._callDict[this._invokeId++] = callback, id; + }, PersistentKvStorageManager; + }(), PersistentKvStorageService = function (_super) { + function PersistentKvStorageService() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(PersistentKvStorageService, _super), Object.defineProperty(PersistentKvStorageService.prototype, "_className", { + get: function () { + return "PersistentKvStorageService"; + }, + enumerable: !1, + configurable: !0 + }), PersistentKvStorageService.prototype.clear = function (id) { + _invokeMethod(this, "Clear", 1, [id], 4, 0); + }, PersistentKvStorageService.prototype.getAllKeys = function (id) { + _invokeMethod(this, "GetAllKeys", 1, [id], 4, 0); + }, PersistentKvStorageService.prototype.multiGet = function (id, jsonKeys) { + _invokeMethod(this, "MultiGet", 1, [id, jsonKeys], 4, 0); + }, PersistentKvStorageService.prototype.multiRemove = function (id, jsonKeys) { + _invokeMethod(this, "MultiRemove", 1, [id, jsonKeys], 4, 0); + }, PersistentKvStorageService.prototype.multiSet = function (id, jsonKeyValue) { + _invokeMethod(this, "MultiSet", 1, [id, jsonKeyValue], 4, 0); + }, PersistentKvStorageService.prototype._handleResult = function (value) { + (_super.prototype._handleResult.call(this, value), _isNullOrUndefined(value)) || _fixObjectPathIfNecessary(this, value); + }, PersistentKvStorageService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result), _processRetrieveResult(this, value, result); + }, PersistentKvStorageService.newObject = function (context) { + return _createTopLevelServiceObject(PersistentKvStorageService, context, "Microsoft.PersistentKvStorage.PersistentKvStorageService", !1, 4); + }, Object.defineProperty(PersistentKvStorageService.prototype, "onPersistentStorageMessage", { + get: function () { + return this.m_persistentStorageMessage || (this.m_persistentStorageMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "PersistentStorageMessage", { + eventType: 65537, + registerFunc: function () { }, + unregisterFunc: function () { }, + getTargetIdFunc: function () { + return null; + }, + eventArgsTransformFunc: function (args) { + var perkvstorArgs, internalCode, _a, table; + try { + var parsedMessage = JSON.parse(args.message), hr = parseInt(parsedMessage.errorCode), error = 0 != hr ? new OfficeExtension.Error((internalCode = hr, + (_a = {})[16389] = { + code: "GenericException", + message: "Unknown error." + }, _a[65535] = { + code: "Unexcepted", + message: "Catastrophic failure." + }, _a[14] = { + code: "OutOfMemory", + message: "Ran out of memory." + }, _a[87] = { + code: "InvalidArg", + message: "One or more arguments are invalid." + }, _a[16385] = { + code: "NotImplemented", + message: "Not implemented." + }, _a[6] = { + code: "BadHandle", + message: "File Handle is not Set." + }, _a[5] = { + code: "AccessDenied", + message: "Can't read the Storage File." + }, (table = _a)[internalCode] ? table[internalCode] : { + code: "Unknown", + message: "An unknown error has occured" + })) : null; + perkvstorArgs = { + invokeId: parsedMessage.invokeId, + message: parsedMessage.message, + error: error + }; + } + catch (e) { + perkvstorArgs = { + invokeId: -1, + message: e.message, + error: new OfficeExtension.Error({ + code: "GenericException", + message: "Unknown error" + }) + }; + } + return OfficeExtension.Utility._createPromiseFromResult(perkvstorArgs); + } + })), this.m_persistentStorageMessage; + }, + enumerable: !1, + configurable: !0 + }), PersistentKvStorageService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }, PersistentKvStorageService; + }(OfficeExtension.ClientObject); + exports.PersistentKvStorageService = PersistentKvStorageService, function (ErrorCodes) { + ErrorCodes.generalException = "GeneralException"; + }(exports.ErrorCodes || (exports.ErrorCodes = {})); + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.multiGet = exports.multiRemove = exports.multiSet = exports.getAllKeys = exports.clear = exports.removeItem = exports.setItem = exports.getItem = void 0; + var prefix = "_Office_AsyncStorage_"; + function ensureFreshLocalStorage() { + window.localStorage.setItem("_Office_AsyncStorage_|_unusedKey_", null), window.localStorage.removeItem("_Office_AsyncStorage_|_unusedKey_"); + } + function performAction(action, callback) { + return void 0 === callback && (callback = function () { }), new Promise((function (resolve, reject) { + try { + ensureFreshLocalStorage(), action(), callback(null), resolve(); + } + catch (e) { + callback(e), reject(e); + } + })); + } + function performActionAndReturnResult(action, callback) { + return void 0 === callback && (callback = function () { }), new Promise((function (resolve, reject) { + try { + ensureFreshLocalStorage(); + var result = action(); + callback(null, result), resolve(result); + } + catch (e) { + callback(e, null), reject(e); + } + })); + } + function performMultiAction(collection, action, callback) { + return void 0 === callback && (callback = function () { }), new Promise((function (resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } + catch (e) { + errors.push(e); + } + collection.forEach((function (item) { + try { + action(item); + } + catch (e) { + errors.push(e); + } + })), callback(errors), errors.length > 0 ? reject(errors) : resolve(); + })); + } + exports.getItem = function (key, callback) { + return performActionAndReturnResult((function () { + return window.localStorage.getItem(prefix + key); + }), callback); + }, exports.setItem = function (key, value, callback) { + return performAction((function () { + return window.localStorage.setItem(prefix + key, value); + }), callback); + }, exports.removeItem = function (key, callback) { + return performAction((function () { + return window.localStorage.removeItem(prefix + key); + }), callback); + }, exports.clear = function (callback) { + return performAction((function () { + Object.keys(window.localStorage).filter((function (fullKey) { + return 0 === fullKey.indexOf(prefix); + })).forEach((function (fullKey) { + return window.localStorage.removeItem(fullKey); + })); + }), callback); + }, exports.getAllKeys = function (callback) { + return performActionAndReturnResult((function () { + return Object.keys(window.localStorage).filter((function (fullKey) { + return 0 === fullKey.indexOf(prefix); + })).map((function (fullKey) { + return fullKey.substr(prefix.length); + })); + }), callback); + }, exports.multiSet = function (keyValuePairs, callback) { + return performMultiAction(keyValuePairs, (function (_a) { + var key = _a[0], value = _a[1]; + return window.localStorage.setItem(prefix + key, value); + }), callback); + }, exports.multiRemove = function (keys, callback) { + return performMultiAction(keys, (function (key) { + return window.localStorage.removeItem(prefix + key); + }), callback); + }, exports.multiGet = function (keys, callback) { + return new Promise((function (resolve, reject) { + callback || (callback = function () { }); + var errors = [], results = keys.map((function (key) { + try { + return [key, window.localStorage.getItem(prefix + key)]; + } + catch (e) { + errors.push(e); + } + })).filter((function (pair) { + return pair; + })); + errors.length > 0 ? (callback(errors, results), reject(errors)) : (callback(null, results), + resolve(results)); + })); + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.storage = void 0; + var prefix = "_OfficeRuntime_Storage_"; + function ensureFreshLocalStorage() { + window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_", null), window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_"); + } + function performAction(action) { + return new Promise((function (resolve, reject) { + try { + ensureFreshLocalStorage(), action(), resolve(); + } + catch (e) { + reject(e); + } + })); + } + function performActionAndReturnResult(action) { + return new Promise((function (resolve, reject) { + try { + ensureFreshLocalStorage(), resolve(action()); + } + catch (e) { + reject(e); + } + })); + } + function performMultiAction(collection, action) { + return new Promise((function (resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } + catch (e) { + errors.push(e); + } + for (var key in collection) + if (collection.hasOwnProperty(key) || Array.isArray(collection)) + try { + Array.isArray(collection) ? action(collection[key]) : action(key); + } + catch (e) { + errors.push(e); + } + errors.length > 0 ? reject(new Error("Unknown error.")) : resolve(); + })); + } + exports.storage = { + getItem: function (key) { + return performActionAndReturnResult((function () { + return window.localStorage.getItem(prefix + key); + })); + }, + setItem: function (key, value) { + return performAction((function () { + return window.localStorage.setItem(prefix + key, value); + })); + }, + removeItem: function (key) { + return performAction((function () { + return window.localStorage.removeItem(prefix + key); + })); + }, + getItems: function (keys) { + return new Promise((function (resolve, reject) { + var result = {}, errors = []; + try { + ensureFreshLocalStorage(); + } + catch (e) { + reject(e); + } + keys.forEach((function (key) { + try { + var value = window.localStorage.getItem(prefix + key); + result[key] = value || null; + } + catch (e) { + errors.push(e); + } + })), errors.length > 0 ? reject(new Error("Unknown error.")) : resolve(result); + })); + }, + setItems: function (keyValues) { + return performMultiAction(keyValues, (function (key) { + return window.localStorage.setItem(prefix + key, keyValues[key]); + })); + }, + removeItems: function (keys) { + return performMultiAction(keys, (function (key) { + window.localStorage.removeItem(prefix + key); + })); + }, + getKeys: function () { + return performActionAndReturnResult((function () { + return Object.keys(window.localStorage).filter((function (fullKey) { + return 0 === fullKey.indexOf(prefix); + })).map((function (fullKey) { + return fullKey.substr(prefix.length); + })); + })); + } + }; + }, function (module, exports, __webpack_require__) { + "use strict"; + var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))((function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } + catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } + catch (e) { + reject(e); + } + } + function step(result) { + var value; + result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P((function (resolve) { + resolve(value); + }))).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + })); + }, __generator = this && this.__generator || function (thisArg, body) { + var f, y, t, g, _ = { + label: 0, + sent: function () { + if (1 & t[0]) + throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, "function" == typeof Symbol && (g[Symbol.iterator] = function () { + return this; + }), g; + function verb(n) { + return function (v) { + return function (op) { + if (f) + throw new TypeError("Generator is already executing."); + for (; _;) + try { + if (f = 1, y && (t = 2 & op[0] ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), + 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + switch (y = 0, t && (op = [2 & op[0], t.value]), op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + return _.label++, { + value: op[1], + done: !1 + }; + case 5: + _.label++, y = op[1], op = [0]; + continue; + case 7: + op = _.ops.pop(), _.trys.pop(); + continue; + default: + if (!(t = _.trys, (t = t.length > 0 && t[t.length - 1]) || 6 !== op[0] && 2 !== op[0])) { + _ = 0; + continue; + } + if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (6 === op[0] && _.label < t[1]) { + _.label = t[1], t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2], _.ops.push(op); + break; + } + t[2] && _.ops.pop(), _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } + catch (e) { + op = [6, e], y = 0; + } + finally { + f = t = 0; + } + if (5 & op[0]) + throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: !0 + }; + }([n, v]); + }; + } + }; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.experimentation = void 0; + var ExperimentationNative = function () { + function ExperimentationNative() { } + return ExperimentationNative.prototype.getBooleanFeatureGate = function (featureName, defaultValue) { + try { + var featureGateValue = Microsoft.Office.WebExtension.FeatureGates[featureName]; + return "true" === featureGateValue.toString().toLowerCase() || !0 === featureGateValue; + } + catch (error) { + return defaultValue; + } + }, ExperimentationNative.prototype.getIntFeatureGate = function (featureName, defaultValue) { + try { + var featureGateValue = parseInt(Microsoft.Office.WebExtension.FeatureGates[featureName]); + return isNaN(featureGateValue) ? defaultValue : featureGateValue; + } + catch (error) { + return defaultValue; + } + }, ExperimentationNative.prototype.getStringFeatureGate = function (featureName, defaultValue) { + try { + var featureGateValue = Microsoft.Office.WebExtension.FeatureGates[featureName]; + return null == featureGateValue ? defaultValue : featureGateValue; + } + catch (error) { + return defaultValue; + } + }, ExperimentationNative.prototype.getChangeGate = function (changeGateName) { + return this.getBooleanFeatureGate(changeGateName, !0); + }, ExperimentationNative.prototype.getBooleanFeatureGateAsync = function (featureName, defaultValue) { + return __awaiter(this, void 0, void 0, (function () { + var context, feature; + return __generator(this, (function (_b) { + switch (_b.label) { + case 0: + return _b.trys.push([0, 2, , 3]), context = this.getRequestContext(), feature = context.flighting.getFeature(featureName, "Boolean", defaultValue), + context.load(feature), [4, context.sync()]; + case 1: + return _b.sent(), [2, feature.value]; + case 2: + return _b.sent(), [2, Promise.resolve(defaultValue)]; + case 3: + return [2]; + } + })); + })); + }, ExperimentationNative.prototype.getStringFeatureGateAsync = function (featureName, defaultValue) { + return __awaiter(this, void 0, void 0, (function () { + var context, feature; + return __generator(this, (function (_b) { + switch (_b.label) { + case 0: + return _b.trys.push([0, 2, , 3]), context = this.getRequestContext(), feature = context.flighting.getFeature(featureName, "String", defaultValue), + context.load(feature), [4, context.sync()]; + case 1: + return _b.sent(), [2, feature.value]; + case 2: + return _b.sent(), [2, Promise.resolve(defaultValue)]; + case 3: + return [2]; + } + })); + })); + }, ExperimentationNative.prototype.getIntFeatureGateAsync = function (featureName, defaultValue) { + return __awaiter(this, void 0, void 0, (function () { + var context, feature; + return __generator(this, (function (_b) { + switch (_b.label) { + case 0: + return _b.trys.push([0, 2, , 3]), context = this.getRequestContext(), feature = context.flighting.getFeature(featureName, "Integer", defaultValue), + context.load(feature), [4, context.sync()]; + case 1: + return _b.sent(), [2, feature.value]; + case 2: + return _b.sent(), [2, Promise.resolve(defaultValue)]; + case 3: + return [2]; + } + })); + })); + }, ExperimentationNative.prototype.getRequestContext = function () { + var ctx; + if (Office.context.platform !== Office.PlatformType.OfficeOnline) { + switch (Office.context.host) { + case Office.HostType.Excel: + ctx = new Excel.RequestContext; + break; + case Office.HostType.OneNote: + ctx = new OneNote.RequestContext; + break; + case Office.HostType.PowerPoint: + ctx = new PowerPoint.RequestContext; + break; + case Office.HostType.Word: + ctx = new Word.RequestContext; + break; + default: + throw new Error("Unknown Application ".concat(Office.context.host)); + } + return ctx; + } + }, ExperimentationNative; + }(); + exports.experimentation = new ExperimentationNative; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Message = void 0; + var Message_1 = __webpack_require__(10); + Object.defineProperty(exports, "Message", { + enumerable: !0, + get: function () { + return Message_1.Message; + } + }); + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Message = void 0; + var ListenerManager_1 = __webpack_require__(11), Message = function () { + function Message() { + this.listeners = {}; + } + return Message.prototype.on = function (eventName, listener) { + return this.add(eventName, listener), new Promise((function (resolve) { + resolve(); + })); + }, Message.prototype.off = function (eventName, listener) { + return this.remove(eventName, listener), new Promise((function (resolve) { + resolve(); + })); + }, Message.prototype.emit = function (eventName, message) { + return this.send(eventName, message), new Promise((function (resolve) { + resolve(); + })); + }, Object.defineProperty(Message, "instance", { + get: function () { + return Message.singleton || (Message.singleton = new Message), this.singleton; + }, + enumerable: !1, + configurable: !0 + }), Message.prototype.setupReceive = function () { + Office && Office.context && Office.context.messaging && !Office.context.messaging.onMessage && (Office.context.messaging.onMessage = this.receiveMessage.bind(this)); + }, Message.prototype.add = function (eventName, listener) { + this.listeners.hasOwnProperty(eventName) || (this.listeners[eventName] = new ListenerManager_1.ListenerManager, + this.setupReceive()), this.listeners[eventName].add(listener); + }, Message.prototype.remove = function (eventName, listener) { + this.listeners.hasOwnProperty(eventName) && (listener ? this.listeners[eventName].remove(listener) : delete this.listeners[eventName]); + }, Message.prototype.send = function (eventName, message) { + var wrapped = { + eventName: eventName, + message: message + }; + Office && Office.context && Office.context.messaging && Office.context.messaging.sendMessage && Office.context.messaging.sendMessage(wrapped); + }, Message.prototype.receiveMessage = function (wrapped) { + var eventName = wrapped.eventName, message = wrapped.message; + this.listeners.hasOwnProperty(eventName) && this.listeners[eventName].call(message); + }, Message; + }(); + exports.Message = Message; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ListenerManager = void 0; + var ListenerManager = function () { + function ListenerManager() { + this.listeners = []; + } + return ListenerManager.prototype.add = function (listener) { + this.listeners.push(listener); + }, ListenerManager.prototype.remove = function (listener) { + var index = this.listeners.lastIndexOf(listener); + -1 !== index && this.listeners.splice(index, 1); + }, ListenerManager.prototype.call = function (message) { + this.listeners.forEach((function (listener) { + return listener(message); + })); + }, ListenerManager; + }(); + exports.ListenerManager = ListenerManager; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Ribbon = exports.ui = void 0, exports.ui = { + getRibbon: function () { + return new Promise((function (resolve, reject) { + resolve(new Ribbon); + })); + } + }; + var Ribbon = function () { + function Ribbon() { + this.requestContext = new OfficeCore.RequestContext, OSF.WebAuth && "web" == OSF._OfficeAppFactory.getHostInfo().hostPlatform && (this.requestContext._customData = "WacPartition"); + } + return Ribbon.prototype.requestUpdate = function (input) { + var ribbon = this.requestContext.ribbon; + return input.tabs.filter((function (tab) { + return !!tab.id; + })).forEach((function (tab) { + var ribbonTab = ribbon.getTab(tab.id); + void 0 !== tab.visible && null !== tab.visible && ribbonTab.setVisibility(tab.visible), + tab.controls.filter((function (control) { + return !!control.id; + })).forEach((function (control) { + var ribbonControl = ribbon.getButton(control.id); + void 0 !== control.enabled && null !== control.enabled && (ribbonControl.enabled = control.enabled); + })); + })), this.requestContext.sync(); + }, Ribbon; + }(); + exports.Ribbon = Ribbon; + }, function (module, exports, __webpack_require__) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Auth = void 0; + var OfficeExtension = __webpack_require__(0), Auth = function () { + function Auth() { } + return Auth.prototype.getAccessToken = function (params) { + return new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + try { + Office.context.auth.getAccessTokenAsync(params || {}, (function (result) { + "succeeded" === result.status ? resolve(result.value) : reject(result.error); + })); + } + catch (error) { + reject(error); + } + })); + }, Auth.prototype.getAuthContext = function () { + return new OfficeExtension.CoreUtility.Promise((function (resolve, reject) { + try { + Office.context.auth.getAuthContextAsync((function (result) { + "succeeded" === result.status ? resolve(result.value) : reject(result.error); + })); + } + catch (error) { + reject(error); + } + })); + }, Object.defineProperty(Auth, "instance", { + get: function () { + return Auth.singleton || (Auth.singleton = new Auth), Auth.singleton; + }, + enumerable: !1, + configurable: !0 + }), Auth; + }(); + exports.Auth = Auth; + }]); +window.OfficeRuntime = window._OfficeRuntimeNative; +function exposeOfficeRuntimeThroughOfficeNamespace(OfficeRuntime, Office) { + var _a, _b; + if (typeof OfficeRuntime === "undefined") { + if (typeof window !== "undefined") { + OfficeRuntime = window === null || window === void 0 ? void 0 : window.OfficeRuntime; + } + } + if (typeof OfficeRuntime === "undefined") { + OfficeRuntime = {}; + } + if (typeof Office !== "undefined") { + Office.storage = Office.storage || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.storage); + Office.auth = Office.auth || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.auth); + Office.getAccessToken = Office.getAccessToken || ((_a = OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.auth) === null || _a === void 0 ? void 0 : _a.getAccessToken); + Office.addin = Office.addin || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.addin); + Office.isSetSupported = Office.isSetSupported || ((_b = OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.apiInformation) === null || _b === void 0 ? void 0 : _b.isSetSupported); + Office.license = Office.license || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.license); + Office.message = Office.message || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.message); + } +} +exposeOfficeRuntimeThroughOfficeNamespace(typeof OfficeRuntime !== "undefined" ? OfficeRuntime || undefined : undefined, typeof Office !== "undefined" ? Office || undefined : undefined); +if (typeof OSFPerformance !== "undefined") { + OSFPerformance.hostInitializationEnd = OSFPerformance.now(); + OSFPerformance.totalJSHeapSize = OSFPerformance.getTotalJSHeapSize(); + OSFPerformance.usedJSHeapSize = OSFPerformance.getUsedJSHeapSize(); + OSFPerformance.jsHeapSizeLimit = OSFPerformance.getJSHeapSizeLimit(); +} diff --git a/dist/excel-win32-16.01.js b/dist/excel-win32-16.01.js new file mode 100644 index 000000000..73b8a8ef8 --- /dev/null +++ b/dist/excel-win32-16.01.js @@ -0,0 +1,26 @@ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md +*/ + +/* +* @overview es6-promise - a tiny implementation of Promises/A+. +* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +* @license Licensed under MIT license +* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE +* @version 2.3.0 +*/ + + +// Sources: +// osfweb: 16.0\16801.10000 +// runtime: 16.0\16801.10000 +// core: 16.0\16801.10000 +// host: custom + + + +"undefined"!==typeof OSFPerformance&&(OSFPerformance.hostInitializationStart=OSFPerformance.now());var OfficeExt,__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){var t=function(){function e(){}return e.prototype.isMsAjaxLoaded=function(){return!!("undefined"!==typeof Sys&&"undefined"!==typeof Type&&Sys.StringBuilder&&"function"===typeof Sys.StringBuilder&&Type.registerNamespace&&"function"===typeof Type.registerNamespace&&Type.registerClass&&"function"===typeof Type.registerClass&&"function"===typeof Function._validateParams&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&"function"===typeof Sys.Serialization.JavaScriptSerializer.serialize)},e.prototype.loadMsAjaxFull=function(e){var t=("https:"===window.location.protocol.toLowerCase()?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,e)},Object.defineProperty(e.prototype,"msAjaxError",{get:function(){return null==this._msAjaxError&&this.isMsAjaxLoaded()&&(this._msAjaxError=Error),this._msAjaxError},set:function(e){this._msAjaxError=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxString",{get:function(){return null==this._msAjaxString&&this.isMsAjaxLoaded()&&(this._msAjaxString=String),this._msAjaxString},set:function(e){this._msAjaxString=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxDebug",{get:function(){return null==this._msAjaxDebug&&this.isMsAjaxLoaded()&&(this._msAjaxDebug=Sys.Debug),this._msAjaxDebug},set:function(e){this._msAjaxDebug=e},enumerable:!0,configurable:!0}),e}();e.MicrosoftAjaxFactory=t}(OfficeExt||(OfficeExt={}));var OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OSFPerfUtil,OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};!function(e){var t=function(){function e(e){this._internalStorage=e}return e.prototype.getItem=function(e){try{return this._internalStorage&&this._internalStorage.getItem(e)}catch(e){return null}},e.prototype.setItem=function(e,t){try{this._internalStorage&&this._internalStorage.setItem(e,t)}catch(e){}},e.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(e){}},e.prototype.removeItem=function(e){try{this._internalStorage&&this._internalStorage.removeItem(e)}catch(e){}},e.prototype.getKeysWithPrefix=function(e){var t=[];try{for(var n=this._internalStorage&&this._internalStorage.length||0,r=0;r0?o.push(n):0===n.tabIndex&&r.push(n):r.push(n);return o=o.sort((function(e,t){var n=e.tabIndex-t.tabIndex;return 0===n&&(n=o.indexOf(e)-o.indexOf(t)),n})),[].concat(o,r)}return{set_entropy:function(e){if("string"==typeof e)for(var t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(n=new Date(parseInt(t.slice(5,-1))))?n:t})):Sys.Serialization.JavaScriptSerializer.deserialize(r,!0),t[n]=r}catch(e){}}return t},loadScript:function(e,t,r){if(e&&t){var o=window.document,i=n[e];if(i)i.loaded?t():i.pendingCallbacks.push(t);else{var a=o.createElement("script");a.type="text/javascript",i={loaded:!1,pendingCallbacks:[t],timer:null},n[e]=i;var s=function(){null!=i.timer&&(clearTimeout(i.timer),delete i.timer),i.loaded=!0;for(var e=i.pendingCallbacks.length,t=0;t0?c(null):c(new Event("Script load timed out"))}),r),a.setAttribute("crossOrigin","anonymous"),a.src=e,o.getElementsByTagName("head")[0].appendChild(a)}}},loadCSS:function(e){if(e){var t=window.document,n=t.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.getElementsByTagName("head")[0].appendChild(n)}},parseEnum:function(e,t){var n=t[e.trim()];if("undefined"==typeof n)throw OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+e),OsfMsAjaxFactory.msAjaxError.argument("str");return n},delayExecutionAndCache:function(){var e={calc:arguments[0]};return function(){return e.calc&&(e.val=e.calc.apply(this,arguments),delete e.calc),e.val}},getUniqueId:function(){return(e+=1).toString()},formatString:function(){var e=arguments,t=e[0];return t.replace(/{(\d+)}/gm,(function(t,n){var r=parseInt(n,10)+1;return void 0===e[r]?"{"+n+"}":e[r]}))},generateConversationId:function(){return[a(),a(),(new Date).getTime().toString()].join("_")},getFrameName:function(e){return"_xdm_"+e+this.generateConversationId()},addXdmInfoAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_xdm_Info=",t,!1)},addSerializerVersionAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_serializer_version=",t,!0)},addFlightsAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_flights=",t,!0)},addInfoAsHash:function(e,n,r,o){var i,a=(e=e.trim()||"").split(t),s=a.shift(),c=a.join(t);return i=o?[n,encodeURIComponent(r),c].join(""):[c,n,r].join(""),[s,t,i].join("")},parseHostInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(e){var t=OSF.OUtil.parseXdmInfoWithGivenFragment(e,window.location.hash);return t||(t=OSF.OUtil.parseXdmInfoFromWindowName(e,window.name)),t},parseXdmInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(e,t){return OSF.OUtil.parseInfoWithGivenFragment("&_xdm_Info=","_xdm_",!1,e,t)},parseSerializerVersion:function(e){var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(e,window.location.hash);return isNaN(t)&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(e,window.name)),t},parseSerializerVersionFromWindowName:function(e,t){return parseInt(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(e,t){return parseInt(OSF.OUtil.parseInfoWithGivenFragment("&_serializer_version=","_serializer_version=",!0,e,t))},parseFlights:function(e){var t=OSF.OUtil.parseFlightsWithGivenFragment(e,window.location.hash);return 0==t.length&&(t=OSF.OUtil.parseFlightsFromWindowName(e,window.name)),t},checkFlight:function(e){return OSF.Flights&&OSF.Flights.indexOf(e)>=0},pushFlight:function(e){return OSF.Flights.indexOf(e)<0&&(OSF.Flights.push(e),!0)},getBooleanSetting:function(e){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,e)},getBooleanFromDictionary:function(e,t){var n=e&&t&&void 0!==e[t]&&e[t]&&("string"===typeof e[t]&&"TRUE"===e[t].toUpperCase()||"boolean"===typeof e[t]&&e[t]);return void 0!==n&&n},getIntFromDictionary:function(e,t){return e&&t&&void 0!==e[t]&&"string"===typeof e[t]?parseInt(e[t]):NaN},pushIntFlight:function(e,t){return!(e in OSF.IntFlights)&&(OSF.IntFlights[e]=t,!0)},getIntFlight:function(e){return OSF.IntFlights&&e in OSF.IntFlights?OSF.IntFlights[e]:NaN},parseFlightsFromWindowName:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment("&_flights=","_flights=",!0,e,t))},parseArrayWithDefault:function(e){var t=[];try{t=JSON.parse(e)}catch(e){}return Array.isArray(t)||(t=[]),t},parseInfoFromWindowName:function(e,t,n){try{var r=JSON.parse(t),o=null!=r?r[n]:null,i=s();if(!e&&i&&null!=r){var a=r[OSF.WindowNameItemKeys.BaseFrameName]+n;o?i.setItem(a,o):o=i.getItem(a)}return o}catch(e){return null}},parseInfoWithGivenFragment:function(e,t,n,r,o){var i=o.split(e),a=i.length>1?i[i.length-1]:null;n&&null!=a&&(a.indexOf("&")>=0&&(a=a.split("&")[0]),a=decodeURIComponent(a));var c=s();if(!r&&c){var l=window.name.indexOf(t);if(l>-1){var u=window.name.indexOf(";",l);-1==u&&(u=window.name.length);var d=window.name.substring(l,u);a?c.setItem(d,a):a=c.getItem(d)}}return a},getConversationId:function(){var e=window.location.search,t=null;if(e){var n=e.indexOf("&");(t=n>0?e.substring(1,n):e.substr(1))&&"="===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1))&&(t=decodeURIComponent(t))}return t},getInfoItems:function(e){var t=e.split("$");return"undefined"==typeof t[1]&&(t=e.split("|")),"undefined"==typeof t[1]&&(t=e.split("%7C")),t},getXdmFieldValue:function(e,t){var n="",r=OSF.OUtil.parseXdmInfo(t);if(r){var o=OSF.OUtil.getInfoItems(r);if(void 0!=o&&o.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:n=o[2];break;case OSF.XdmFieldName.AppId:n=o[1]}}return n},validateParamObject:function(e,t,n){var r=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:!1},{name:"expectedProperties",type:Object,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0}]);if(r)throw r;for(var o in t)if(r=Function._validateParameter(e[o],t[o],o))throw r},writeProfilerMark:function(e){window.msWriteProfilerMark&&(window.msWriteProfilerMark(e),OsfMsAjaxFactory.msAjaxDebug.trace(e))},outputDebug:function(e){"undefined"!==typeof OsfMsAjaxFactory&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(e)},defineNondefaultProperty:function(e,t,n,r){for(var o in n=n||{},r){var i=r[o];void 0==n[i]&&(n[i]=!0)}return Object.defineProperty(e,t,n),e},defineNondefaultProperties:function(e,t,n){for(var r in t=t||{})OSF.OUtil.defineNondefaultProperty(e,r,t[r],n);return e},defineEnumerableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["enumerable"])},defineEnumerableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["enumerable"])},defineMutableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["writable","enumerable","configurable"])},defineMutableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["writable","enumerable","configurable"])},finalizeProperties:function(e,t){t=t||{};for(var n=Object.getOwnPropertyNames(e),r=n.length,o=0;o>8,a=255&n,u[s++]=o>>2,u[s++]=(3&o)<<4|i>>4,u[s++]=(15&i)<<2|a>>6,u[s++]=63&a,isNaN(n)||(o=n>>8,i=255&r,a=r>>8,u[s++]=o>>2,u[s++]=(3&o)<<4|i>>4,u[s++]=(15&i)<<2|a>>6,u[s++]=63&a),isNaN(n)?u[s-1]=64:isNaN(r)&&(u[s-2]=64,u[s-1]=64);for(var p=0;p=2?n[r-2]+"."+n[r-1]:1==r?n[0]:void 0},isiOS:function(){return!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)},isChrome:function(){return window.navigator.userAgent.indexOf("Chrome")>0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},startsWith:function(e,t,n){return n?e.substr(0,t.length)===t:e.startsWith(t)},containsPort:function(e,t,n,r){return this.startsWith(e,t+"//"+n+":"+r,!0)||this.startsWith(e,n+":"+r,!0)},getRedundandPortString:function(e,t){return e&&t?"https:"==t.protocol&&this.containsPort(e,"https:",t.hostname,"443")?":443":"http:"==t.protocol&&this.containsPort(e,"http:",t.hostname,"80")?":80":"":""},removeChar:function(e,t){return t=e.length)return this.removeChar(e,n);if("/"===t){if("?"===e.charAt(n+1)||"#"===e.charAt(n+1))return this.removeChar(e,n)}else if("?"===t&&"#"===e.charAt(n+1))return this.removeChar(e,n)}return e},cleanUrl:function(e){if(e=this.cleanUrlOfChar(e,"/"),e=this.cleanUrlOfChar(e,"?"),"https://"==(e=this.cleanUrlOfChar(e,"#")).substr(0,8))-1!=(t=e.indexOf(":443"))&&(t!=e.length-4&&"/"!=e.charAt(t+4)&&"?"!=e.charAt(t+4)&&"#"!=e.charAt(t+4)||(e=e.substring(0,t)+e.substring(t+4)));else if("http://"==e.substr(0,7)){var t;-1!=(t=e.indexOf(":80"))&&(t!=e.length-3&&"/"!=e.charAt(t+3)&&"?"!=e.charAt(t+3)&&"#"!=e.charAt(t+3)||(e=e.substring(0,t)+e.substring(t+3)))}return e},parseUrl:function(e,t){if(void 0===t&&(t=!1),"undefined"!==typeof e&&e){var n=this.isIE(),r={protocol:void 0,hostname:void 0,host:void 0,port:void 0,pathname:void 0,search:void 0,hash:void 0,isPortPartOfUrl:void 0};try{if(n){var o=document.createElement("a");if(o.href=e,!o||!o.protocol||!o.host||!o.hostname||!o.href||this.cleanUrl(o.href).toLowerCase()!==this.cleanUrl(e).toLowerCase())throw"InvalidUrl";if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=o.protocol)throw new Error("NotHttps");var i=this.getRedundandPortString(e,o);r.protocol=o.protocol,r.hostname=o.hostname,r.port=""==i?o.port:"",r.host=""!=i?o.hostname:o.host,r.pathname=(n?"/":"")+o.pathname,r.search=o.search,r.hash=o.hash,r.isPortPartOfUrl=this.containsPort(e,o.protocol,o.hostname,o.port)}else{var a=new URL(e);if(a&&a.protocol&&a.host&&a.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=a.protocol)throw new Error("NotHttps");r.protocol=a.protocol,r.hostname=a.hostname,r.port=a.port,r.host=a.host,r.pathname=a.pathname,r.search=a.search,r.hash=a.hash,r.isPortPartOfUrl=a.host.lastIndexOf(":"+a.port)==a.host.length-a.port.length-1}}}catch(e){if("NotHttps"===e.message)throw e}return r}},shallowCopy:function(e){if(null==e)return null;if(e instanceof Object){if(Array.isArray(e)){for(var t=[],n=0;ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(e=c(e),n=t?e.length-1:0,0===e.length)return null;for(;!o&&n>=0&&ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(r=function(e,t){for(var n=0;n=0&&oe.length)return!1;if(e.substr(e.length-t.length)===t)return!0}return!1},hashCode:function(e){var t=0;if(!OSF.OUtil.isNullOrUndefined(e))for(var n=0,r=e.length;n0;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[n%16],n=Math.floor(n/16);for(;r<32;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[Math.floor(16*Math.random())];return t}}}();try{!function(){OSF.Flights=OSF.OUtil.parseFlights(!0)}()}catch(e){}window.OSF=OSF,OSF.OUtil.setNamespace("OSF",window),OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3},OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614,Visio:8388615,OneNoteAndroid:4194305},OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"},OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"},OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20,UpdateTargetUrl:21,InstallCustomFunctions:22,SendTelemetryEvent:23,UninstallCustomFunctions:24,SendMessage:25,LaunchExtensionComponent:26,StopExtensionComponent:27,RestartExtensionComponent:28,EnableTaskPaneHeaderButton:29,DisableTaskPaneHeaderButton:30,TaskPaneHeaderButtonClicked:31,RemoveAppCommandsAddin:32,RefreshRibbonGallery:33,GetOriginalControlId:34,OfficeJsReady:35,InsertDevManifest:36,InsertDevManifestError:37,SendCustomerContent:38,KeyboardShortcuts:39},OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"},OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006},OSF.OfficeAppContext=function(e,t,n,r,o,i,a,s,c,l,u,d,f,p,h,m,g,y,v,O,b,S,C,A,_,D,F){this._id=e,this._appName=t,this._appVersion=n,this._appUILocale=r,this._dataLocale=o,this._docUrl=i,this._clientMode=a,this._settings=s,this._reason=c,this._osfControlType=l,this._eToken=u,this._correlationId=d,this._appInstanceId=f,this._touchEnabled=p,this._commerceAllowed=h,this._appMinorVersion=m,this._requirementMatrix=g,this._hostCustomMessage=y,this._hostFullVersion=v,this._isDialog=!1,this._clientWindowHeight=O,this._clientWindowWidth=b,this._addinName=S,this._appDomains=C,this._dialogRequirementMatrix=A,this._featureGates=_,this._officeTheme=D,this._initialDisplayMode=F,this.get_id=function(){return this._id},this.get_appName=function(){return this._appName},this.get_appVersion=function(){return this._appVersion},this.get_appUILocale=function(){return this._appUILocale},this.get_dataLocale=function(){return this._dataLocale},this.get_docUrl=function(){return this._docUrl},this.get_clientMode=function(){return this._clientMode},this.get_bindings=function(){return this._bindings},this.get_settings=function(){return this._settings},this.get_reason=function(){return this._reason},this.get_osfControlType=function(){return this._osfControlType},this.get_eToken=function(){return this._eToken},this.get_correlationId=function(){return this._correlationId},this.get_appInstanceId=function(){return this._appInstanceId},this.get_touchEnabled=function(){return this._touchEnabled},this.get_commerceAllowed=function(){return this._commerceAllowed},this.get_appMinorVersion=function(){return this._appMinorVersion},this.get_requirementMatrix=function(){return this._requirementMatrix},this.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix},this.get_hostCustomMessage=function(){return this._hostCustomMessage},this.get_hostFullVersion=function(){return this._hostFullVersion},this.get_isDialog=function(){return this._isDialog},this.get_clientWindowHeight=function(){return this._clientWindowHeight},this.get_clientWindowWidth=function(){return this._clientWindowWidth},this.get_addinName=function(){return this._addinName},this.get_appDomains=function(){return this._appDomains},this.get_featureGates=function(){return this._featureGates},this.get_officeTheme=function(){return this._officeTheme},this.get_initialDisplayMode=function(){return this._initialDisplayMode?this._initialDisplayMode:0}},OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1},OSF.ClientMode={ReadOnly:0,ReadWrite:1},OSF.OUtil.setNamespace("Microsoft",window),OSF.OUtil.setNamespace("Office",Microsoft),OSF.OUtil.setNamespace("Client",Microsoft.Office),OSF.OUtil.setNamespace("WebExtension",Microsoft.Office),Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",ControlActivation:"controlActivation"},Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"},Microsoft.Office.WebExtension.FilterType={All:"all"},Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",JsonData:"jsonData",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",AllowConsentPrompt:"allowConsentPrompt",ForMSGraphAccess:"forMSGraphAccess",AllowSignInPrompt:"allowSignInPrompt",JsonPayload:"jsonPayload",EnableNewHosts:"enableNewHosts",AccountTypeFilter:"accountTypeFilter",AddinTrustId:"addinTrustId",Reserved:"reserved",Tcid:"tcid",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo",TargetOrigin:"targetOrigin",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64",FormId:"formId"},OSF.OUtil.setNamespace("DDA",OSF),OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0},OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"},OSF.DDA.EventDescriptors={},OSF.DDA.ListDescriptors={},OSF.DDA.UI={},OSF.DDA.getXdmEventName=function(e,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?e+"_"+t:t},OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetAuthContextMethod:99,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidInsertFormMethod:106,dispidDisplayRibbonCalloutAsyncMethod:109,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidExecuteFeature:146,dispidQueryFeature:147,dispidGetNestedAppAuthContextMethod:205,dispidMethodMax:205},OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidOlkRecurrenceChangedEvent:49,dispidOlkAttachmentsChangedEvent:50,dispidOlkEnhancedLocationsChangedEvent:51,dispidOlkInfobarClickedEvent:52,dispidOlkSelectedItemsChangedEvent:53,dispidOlkSensitivityLabelChangedEvent:54,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63},OSF.DDA.ErrorCodeManager=function(){var e={};return{getErrorArgs:function(t){var n=e[t];return n?(n.name||(n.name=e[this.errorCodes.ooeInternalError].name),n.message||(n.message=e[this.errorCodes.ooeInternalError].message)):n=e[this.errorCodes.ooeInternalError],n},addErrorMessage:function(t,n){e[t]=n},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeOperationCancelled:5014,ooeWorkbookHidden:5015,ooeWriteNotSupportedWhenModalDialogOpen:5016,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeRequestPayloadSizeLimitExceeded:5103,ooeResponsePayloadSizeLimitExceeded:5104,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeModalDialogOpen:12012,ooeDocumentIsInactive:12013,ooeDialogParentIsMinimized:12014,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010,ooeResourceNotAllowed:13011,ooeSSOUnsupportedPlatform:13012,ooeSSOCallThrottled:13013,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(t){e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden]={name:t.L_APICallFailed,message:t.L_WorkbookHiddenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen]={name:t.L_APICallFailed,message:t.L_WriteNotSupportedWhenModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_RequestPayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_ResponsePayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen]={name:t.L_DisplayDialogError,message:t.L_ModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive]={name:t.L_DisplayDialogError,message:t.L_DocumentIsInactive},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized]={name:t.L_DisplayDialogError,message:t.L_DialogParentIsMinimized},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:t.L_APINotSupported,message:t.L_SSOUnsupportedPlatform},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:t.L_OperationCancelledError,message:t.L_OperationCancelledErrorMessage}}}}(),function(e){!function(e){var t=function(){return function(){}}();e.RequirementVersion=t;var n=function(){return function(e){this.isSetSupported=function(e,t){if(void 0==e)return!1;void 0==t&&(t=0);var n=this._setMap._sets;if(n.hasOwnProperty(e.toLowerCase())){var r=n[e.toLowerCase()];try{var o=this._getVersion(r);t+="";var i=this._getVersion(t);if(o.major>0&&o.major>i.major)return!0;if(o.major>0&&o.minor>=0&&o.major==i.major&&o.minor>=i.minor)return!0}catch(e){return!1}}return!1},this._getVersion=function(e){var t=(e+="").split("."),n=0,r=0;if(t.length<2&&isNaN(Number(e)))throw"version format incorrect";if(n=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(n)||isNaN(r))throw"version format incorrect";return{minor:r,major:n}},this._setMap=e,this.isSetSupported=this.isSetSupported.bind(this)}}();e.RequirementMatrix=n;var r=function(){return function(e){this._addSetMap=function(e){for(var t in e)this._sets[t]=e[t]},this._sets=e}}();e.DefaultSetRequirement=r;var o=function(e){function t(){return e.call(this,{dialogapi:1.1})||this}return __extends(t,e),t}(r);e.DefaultRequiredDialogSetRequirement=o;var i=function(e){function t(){return e.call(this,{dialogorigin:1.1})||this}return __extends(t,e),t}(r);e.DefaultOptionalDialogSetRequirement=i;var a=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,excelapi:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelClientDefaultSetRequirement=a;var s=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(a);e.ExcelClientV1DefaultSetRequirement=s;var c=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookClientDefaultSetRequirement=c;var l=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1,wordapi:1.1})||this}return __extends(t,e),t}(r);e.WordClientDefaultSetRequirement=l;var u=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:1.1}),t}return __extends(t,e),t}(l);e.WordClientV1DefaultSetRequirement=u;var d=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointClientDefaultSetRequirement=d;var f=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(d);e.PowerpointClientV1DefaultSetRequirement=f;var p=function(e){function t(){return e.call(this,{selection:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ProjectClientDefaultSetRequirement=p;var h=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,file:1.1})||this}return __extends(t,e),t}(r);e.ExcelWebDefaultSetRequirement=h;var m=function(e){function t(){return e.call(this,{compressedfile:1.1,documentevents:1.1,file:1.1,imagecoercion:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablecoercion:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordWebDefaultSetRequirement=m;var g=function(e){function t(){return e.call(this,{activeview:1.1,settings:1.1})||this}return __extends(t,e),t}(r);e.PowerpointWebDefaultSetRequirement=g;var y=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookWebDefaultSetRequirement=y;var v=function(e){function t(){return e.call(this,{activeview:1.1,documentevents:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.SwayWebDefaultSetRequirement=v;var O=function(e){function t(){return e.call(this,{bindingevents:1.1,partialtablebindings:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1})||this}return __extends(t,e),t}(r);e.AccessWebDefaultSetRequirement=O;var b=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelIOSDefaultSetRequirement=b;var S=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordIOSDefaultSetRequirement=S;var C=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2}),t}return __extends(t,e),t}(S);e.WordIOSV1DefaultSetRequirement=C;var A=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointIOSDefaultSetRequirement=A;var _=function(e){function t(){return e.call(this,{mailbox:1.1})||this}return __extends(t,e),t}(r);e.OutlookIOSDefaultSetRequirement=_;var D=function(){function e(){}return e.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},e.getDefaultRequirementMatrix=function(t){this.initializeDefaultSetMatrix();var o=void 0,i=t.get_requirementMatrix();if(void 0!=i&&i.length>0&&"undefined"!==typeof JSON){var a=JSON.parse(t.get_requirementMatrix().toLowerCase());o=new n(new r(a))}else{var s=e.getClientFullVersionString(t);o=void 0!=e.DefaultSetArrayMatrix&&void 0!=e.DefaultSetArrayMatrix[s]?new n(e.DefaultSetArrayMatrix[s]):new n(new r({}))}return o},e.getDefaultDialogRequirementMatrix=function(e){var t=void 0,a=e.get_dialogRequirementMatrix();if(void 0!=a&&a.length>0&&"undefined"!==typeof JSON){var s=JSON.parse(e.get_requirementMatrix().toLowerCase());t=new r(s)}else{t=new o;var c=e.get_requirementMatrix();if(void 0!=c&&c.length>0&&"undefined"!==typeof JSON){s=JSON.parse(c.toLowerCase());for(var l in t._sets)s.hasOwnProperty(l)&&(t._sets[l]=s[l]);var u=new i;for(var l in u._sets)s.hasOwnProperty(l)&&(t._sets[l]=s[l])}}return new n(t)},e.getClientFullVersionString=function(e){var t=e.get_appMinorVersion(),n="",r="",o=e.get_appName();return(1024==o||4096==o||8192==o||65536==o)&&1==e.get_appVersion()?r=4096==o&&t>=15?"16.00.01":"16.00":64==e.get_appName()?r=e.get_appVersion():(n=t<10?"0"+t:""+t,r=e.get_appVersion()+"."+n),e.get_appName()+"-"+r},e.initializeDefaultSetMatrix=function(){e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1600]=new a,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1600]=new l,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1600]=new d,e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1601]=new s,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1601]=new u,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1601]=new f,e.DefaultSetArrayMatrix[e.Outlook_RCLIENT_1600]=new c,e.DefaultSetArrayMatrix[e.Excel_WAC_1600]=new h,e.DefaultSetArrayMatrix[e.Word_WAC_1600]=new m,e.DefaultSetArrayMatrix[e.Outlook_WAC_1600]=new y,e.DefaultSetArrayMatrix[e.Outlook_WAC_1601]=new y,e.DefaultSetArrayMatrix[e.Project_RCLIENT_1600]=new p,e.DefaultSetArrayMatrix[e.Access_WAC_1600]=new O,e.DefaultSetArrayMatrix[e.PowerPoint_WAC_1600]=new g,e.DefaultSetArrayMatrix[e.Excel_IOS_1600]=new b,e.DefaultSetArrayMatrix[e.SWAY_WAC_1600]=new v,e.DefaultSetArrayMatrix[e.Word_IOS_1600]=new S,e.DefaultSetArrayMatrix[e.Word_IOS_16001]=new C,e.DefaultSetArrayMatrix[e.PowerPoint_IOS_1600]=new A,e.DefaultSetArrayMatrix[e.Outlook_IOS_1600]=new _},e.Excel_RCLIENT_1600="1-16.00",e.Excel_RCLIENT_1601="1-16.01",e.Word_RCLIENT_1600="2-16.00",e.Word_RCLIENT_1601="2-16.01",e.PowerPoint_RCLIENT_1600="4-16.00",e.PowerPoint_RCLIENT_1601="4-16.01",e.Outlook_RCLIENT_1600="8-16.00",e.Excel_WAC_1600="16-16.00",e.Word_WAC_1600="32-16.00",e.Outlook_WAC_1600="64-16.00",e.Outlook_WAC_1601="64-16.01",e.Project_RCLIENT_1600="128-16.00",e.Access_WAC_1600="256-16.00",e.PowerPoint_WAC_1600="512-16.00",e.Excel_IOS_1600="1024-16.00",e.SWAY_WAC_1600="2048-16.00",e.Word_IOS_1600="4096-16.00",e.Word_IOS_16001="4096-16.00.01",e.PowerPoint_IOS_1600="8192-16.00",e.Outlook_IOS_1600="65536-16.00",e.DefaultSetArrayMatrix={},e}();e.RequirementsMatrixFactory=D}(e.Requirement||(e.Requirement={}))}(OfficeExt||(OfficeExt={})),OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"},Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"},OSF.NamespaceManager=function(){var e,t=!1;return{enableShortcut:function(){t||(window.Office?e=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,t=!0)},disableShortcut:function(){t&&(e?window.Office=e:OSF.OUtil.unsetNamespace("Office",window),t=!1)}}}(),OSF.NamespaceManager.enableShortcut(),Microsoft.Office.WebExtension.useShortNamespace=function(e){e?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()},Microsoft.Office.WebExtension.select=function(e,t){var n;if(e&&"string"==typeof e){var r=e.indexOf("#");if(-1!=r){var o=e.substring(0,r),i=e.substring(r+1);switch(o){case"binding":case"bindings":i&&(n=new OSF.DDA.BindingPromise(i))}}}if(n)return n.onFail=t,n;if(t){var a=typeof t;if("function"!=a)throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,a);var s={};s[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}},OSF.DDA.Context=function(e,t,n,r,o){if(OSF.OUtil.defineEnumerableProperties(this,{contentLanguage:{value:e.get_dataLocale()},displayLanguage:{value:e.get_appUILocale()},touchEnabled:{value:e.get_touchEnabled()},commerceAllowed:{value:e.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},isDialog:{value:OSF._OfficeAppFactory.getHostInfo().isDialog},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(e.get_hostFullVersion())}}),n&&OSF.OUtil.defineEnumerableProperty(this,"license",{value:n}),e.ui&&OSF.OUtil.defineEnumerableProperty(this,"ui",{value:e.ui}),e.auth&&OSF.OUtil.defineEnumerableProperty(this,"auth",{value:e.auth}),e.webAuth&&OSF.OUtil.defineEnumerableProperty(this,"webAuth",{value:e.webAuth}),e.application&&OSF.OUtil.defineEnumerableProperty(this,"application",{value:e.application}),e.extensionLifeCycle&&OSF.OUtil.defineEnumerableProperty(this,"extensionLifeCycle",{value:e.extensionLifeCycle}),e.messaging&&OSF.OUtil.defineEnumerableProperty(this,"messaging",{value:e.messaging}),e.ui&&e.ui.taskPaneAction&&OSF.OUtil.defineEnumerableProperty(this,"taskPaneAction",{value:e.ui.taskPaneAction}),e.ui&&e.ui.ribbonGallery&&OSF.OUtil.defineEnumerableProperty(this,"ribbonGallery",{value:e.ui.ribbonGallery}),e.get_isDialog()){var i=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(e);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:i})}else{if(t&&OSF.OUtil.defineEnumerableProperty(this,"document",{value:t}),r){var a=r.displayName||"appOM";delete r.displayName,OSF.OUtil.defineEnumerableProperty(this,a,{value:r})}e.get_officeTheme()?OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return e.get_officeTheme()}}):o&&OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return o()}});i=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(e);if(OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:i}),e.get_featureGates){var s=e.get_featureGates();if(s&&s.EnablePublicThemeManager){var c=new OSF.DDA.Theming.InternalThemeHandler;c.InitializeThemeManager(),OSF.OUtil.defineEnumerableProperty(this,"themeManager",{value:c})}}}},OSF.DDA.OutlookContext=function(e,t,n,r,o){OSF.DDA.OutlookContext.uber.constructor.call(this,e,null,n,r,o),t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t}),e.sensitivityLabelsCatalog&&OSF.OUtil.defineEnumerableProperty(this,"sensitivityLabelsCatalog",{value:e.sensitivityLabelsCatalog()})},OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context),OSF.DDA.OutlookAppOm=function(e,t,n){},OSF.DDA.Application=function(e){},OSF.DDA.Document=function(e,t){var n;switch(e.get_clientMode()){case OSF.ClientMode.ReadOnly:n=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:n=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t}),OSF.OUtil.defineMutableProperties(this,{mode:{value:n},url:{value:e.get_docUrl()}})},OSF.DDA.JsomDocument=function(e,t,n){OSF.DDA.JsomDocument.uber.constructor.call(this,e,n),t&&OSF.OUtil.defineEnumerableProperty(this,"bindings",{get:function(){return t}});var r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetSelectedDataAsync,r.SetSelectedDataAsync]),OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))},OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document),OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var e;return OSF&&OSF._OfficeAppFactory&&(e=OSF._OfficeAppFactory.getContext()),e}}),OSF.DDA.License=function(e){OSF.OUtil.defineEnumerableProperty(this,"value",{value:e})},OSF.DDA.ApiMethodCall=function(e,t,n,r,o){var i=e.length,a=OSF.OUtil.delayExecutionAndCache((function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,o)}));this.verifyArguments=function(e,t){for(var n in e){var r=e[n],o=t[n];if(r.enum)switch(typeof o){case"string":if(OSF.OUtil.listContainsValue(r.enum,o))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw a()}if(r.types&&!OSF.OUtil.listContainsValue(r.types,typeof o))throw a()}},this.extractRequiredArguments=function(t,n,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var i,a,l=e.length-1;l>=s;l--){var u=e[l];switch(typeof u){case"object":if(i)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);i=u;break;case"function":if(a)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);a=u;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}if(i=c.fillOptions(i,n,r,o),a){if(i[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;i[Microsoft.Office.WebExtension.Parameters.Callback]=a}return c.verifyArguments(t,i),i}(e,o,n,r);return c.constructCallArgs(o,i,n,r)},this.processResponse=function(e,t,n,i){return e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,n,i):t:o?o(e,t):OSF.DDA.ErrorCodeManager.getErrorArgs(e)},this.getCallArgs=function(e){for(var t,n,r=e.length-1;r>=s;r--){var o=e[r];switch(typeof o){case"object":t=o;break;case"function":n=o}}return t=t||{},n&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=n),t}},OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[],n=e.privateStateCallbacks?OSF.OUtil.createObject(e.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(e.requiredArguments||[],t,n,e.onSucceeded,e.onFailed,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.AsyncMethodCalls={},OSF.DDA.AsyncMethodCalls.define=function(e){OSF.DDA.AsyncMethodCalls[e.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(e)},OSF.DDA.Error=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{name:{value:e},message:{value:t},code:{value:n}})},OSF.DDA.AsyncResult=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:e[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}}),e[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:e[OSF.DDA.AsyncResultEnum.Properties.Context]}),t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})},OSF.DDA.issueAsyncResult=function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Callback];if(r){var o,i={};i[OSF.DDA.AsyncResultEnum.Properties.Context]=e[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?i[OSF.DDA.AsyncResultEnum.Properties.Value]=n:(o={},n=n||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),o[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,o[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=n.name||n,o[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=n.message||n),r(new OSF.DDA.AsyncResult(i,o))}},OSF.DDA.SyncMethodNames={},OSF.DDA.SyncMethodNames.addNames=function(e){for(var t in e){var n={};OSF.OUtil.defineEnumerableProperties(n,{id:{value:t},displayName:{value:e[t]}}),OSF.DDA.SyncMethodNames[t]=n}},OSF.DDA.SyncMethodCall=function(e,t,n,r,o){var i=e.length,a=new OSF.DDA.ApiMethodCall(e,t,n,r,o);this.verifyAndExtractCall=function(e,n,r){var o=a.extractRequiredArguments(e,n,r),s=function(e,n,r,o){if(e.length>i+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var s,c=e.length-1;c>=i;c--){var l=e[c];switch(typeof l){case"object":if(s)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);s=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}return s=a.fillOptions(s,n,r,o),a.verifyArguments(t,s),s}(e,o,n,r);return a.constructCallArgs(o,s,n,r)}},OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[];return new OSF.DDA.SyncMethodCall(e.requiredArguments||[],t,e.privateStateCallbacks,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.SyncMethodCalls={},OSF.DDA.SyncMethodCalls.define=function(e){OSF.DDA.SyncMethodCalls[e.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(e)},OSF.DDA.ListType=function(){var e={};return{setListType:function(t,n){e[t]=n},isListType:function(t){return OSF.OUtil.listContainsKey(e,t)},getDescriptor:function(t){return e[t]}}}(),OSF.DDA.HostParameterMap=function(e,t){var n={};function r(o,i){var a=o?{}:void 0;for(var s in o){var c,l=o[s];if(OSF.DDA.ListType.isListType(s))for(var u in c=[],l)c.push(r(l[u],i));else if(OSF.OUtil.listContainsKey(n,s))c=n[s][i](l);else if("fromHost"==i&&e.preserveNesting(s))c=r(l,i);else{var d=t[s];if(d){var f=d[i];f&&void 0===(c=f[l])&&(c=l)}else c=l}a[s]=c}return a}function o(n,o,i){var a,s=t[n][i];if("toHost"==i)a=function n(r,o){var i;for(var a in o){var s;if(void 0!=(s=e.isComplexType(a)?n(r,t[a].toHost):r[a])){i||(i={});var c=o[a];"self"==c&&(c=a),i[c]=e.pack(a,s)}}return i}(r(o,i),s);else if("fromHost"==i){a=r(function n(r,o,i){for(var a in i||(i={}),o){var s,c,l=o[a];if("self"==l)s=r;else{if("sourceData"==l){i[a]=r.toArray();continue}s=r[l]}if(null===s||void 0===s)i[a]=void 0;else if(s=e.unpack(a,s),e.isComplexType(a))c=t[a].fromHost,e.preserveNesting(a)?i[a]=n(s,c):n(s,c,i);else if(OSF.DDA.ListType.isListType(a)){(c={})[OSF.DDA.ListType.getDescriptor(a)]="self";var u=new Array(s.length);for(var d in s)u[d]=n(s[d],c);i[a]=u}else i[a]=s}return i}(o,s),i)}return a}n[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(e){if(null!=e&&void 0!==e.rows){var t={};t[OSF.DDA.TableDataProperties.TableRows]=e.rows,t[OSF.DDA.TableDataProperties.TableHeaders]=e.headers,e=t}return e},fromHost:function(e){return e}},n[Microsoft.Office.WebExtension.Parameters.JsonData]={toHost:function(e){return e},fromHost:function(e){return"string"===typeof e?JSON.parse(e):e}},n[Microsoft.Office.WebExtension.Parameters.SampleData]=n[Microsoft.Office.WebExtension.Parameters.Data],t||(t={}),this.addMapping=function(e,n){var r,o;if(n.map)for(var i in o={},r=n.map){var a=r[i];"self"==a&&(a=i),o[a]=i}else r=n.toHost,o=n.fromHost;var s=t[e];if(s){var c=s.toHost;for(var l in c)r[l]=c[l];for(var u in c=s.fromHost)o[u]=c[u]}else s=t[e]={};s.toHost=r,s.fromHost=o},this.toHost=function(e,t){return o(e,t,"toHost")},this.fromHost=function(e,t){return o(e,t,"fromHost")},this.self="self",this.sourceData="sourceData",this.addComplexType=function(t){e.addComplexType(t)},this.getDynamicType=function(t){return e.getDynamicType(t)},this.setDynamicType=function(t,n){e.setDynamicType(t,n)},this.dynamicTypes=n,this.doMapValues=function(e,t){return r(e,t)}},OSF.DDA.SpecialProcessor=function(e,t){this.addComplexType=function(t){e.push(t)},this.getDynamicType=function(e){return t[e]},this.setDynamicType=function(e,n){t[e]=n},this.isComplexType=function(t){return OSF.OUtil.listContainsValue(e,t)},this.isDynamicType=function(e){return OSF.OUtil.listContainsKey(t,e)},this.preserveNesting=function(e){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,e)},this.pack=function(e,n){return this.isDynamicType(e)?t[e].toHost(n):n},this.unpack=function(e,n){return this.isDynamicType(e)?t[e].fromHost(n):n}},OSF.DDA.getDecoratedParameterMap=function(e,t){var n=new OSF.DDA.HostParameterMap(e);n.self;function r(e){var t=null;if(e){t={};for(var n=e.length,r=0;r0){for(var r=[],o=0;o=o)break;if(r=Function._validateParameter(e[i],s,c))return r.popStackFrame(),r}return null}),Function._validateParameterCount||(Function._validateParameterCount=function(e,t,r){var o,i,a=t.length,s=e.length;if(sa)for(i=!0,o=0;o0&&t.push(i)}}}catch(e){}return t}var t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){return{toHost:function(e){if(OSF.DDA.TableDataProperties&&"string"!=typeof e&&void 0!==e[OSF.DDA.TableDataProperties.TableRows]){var t=[];t[0]=e[OSF.DDA.TableDataProperties.TableRows],t[1]=e[OSF.DDA.TableDataProperties.TableHeaders],e=t}return e},fromHost:function(t){var n;if(t.toArray)if(2===t.dimensions())n=e(t);else{var r=t.toArray();2===r.length&&(null!=r[0]&&r[0].toArray||null!=r[1]&&r[1].toArray)?((n={})[OSF.DDA.TableDataProperties.TableRows]=e(r[0]),n[OSF.DDA.TableDataProperties.TableHeaders]=e(r[1])):n=r}else n=t;return n}}}(),OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,[],t),this.unpack=function(e,n){var r;this.isComplexType(e)||OSF.DDA.ListType.isListType(e)?r=void 0!==n&&void 0!==n.toArray?n.toArray():n||{}:r=this.isDynamicType(e)?t[e].fromHost(n):n;return r}},OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor),OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]}),OSF.DDA.SafeArray.Delegate.executeAsync=function(e){function t(e){var n=e;if(null!=e&&e.toArray){var r=e.toArray();n=new Array(r.length);for(var o=0;o2){a=[];for(var s=1;sn[o])return!1}return!1},e.prototype.isDirectToAriaEnabled=function(){if(void 0===this.EnableDirectToAria||null===this.EnableDirectToAria){var e=void 0,t=void 0;OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&(e=OSF._OfficeAppFactory.getHostInfo().hostPlatform),window.external&&"undefined"!==typeof window.external.GetContext&&"undefined"!==typeof window.external.GetContext().GetHostFullVersion&&(t=window.external.GetContext().GetHostFullVersion()),this.EnableDirectToAria=this.shouldSendDirectToAria(e,t)}return this.EnableDirectToAria},e.prototype.sendTelemetry=function(t,n){e.EnableSendingTelemetryWithLegacyAria&&this.isDirectToAriaEnabled()&&OSF.OUtil.loadScript(this.getAriaCDNLocation(),(function(){try{if(!this.ALogger){this.ALogger=AWTLogManager.initialize("db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439")}var e=new AWTEventProperties;for(var r in e.setName("Office.Extensibility.OfficeJS."+t),n)"table"!==r.toLowerCase()&&e.setProperty(r,n[r]);var o=new Date;e.setProperty("Date",o.toISOString()),this.ALogger.logEvent(e)}catch(e){}}),1e3),e.EnableSendingTelemetryWithOTel&&o(t,n)},e.prototype.logData=function(e){this.isIUsageData(e)?this.sendTelemetry(e.Table,e.Fields):this.sendTelemetry(e.Table,e)},e.EnableSendingTelemetryWithOTel=!0,e.EnableSendingTelemetryWithLegacyAria=!1,e}();e.AriaLogger=i}(OSFAriaLogger||(OSFAriaLogger={})),function(e){"use strict";var t,n=OSF.OUtil.Guid.generateNewGuid(),r="",o=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i");e.enableTelemetry=!0;var i=function(){return function(){}}();e.AppInfo=i;var a=function(){return function(e,t){this.name=e,this.handler=t}}(),s=function(){function e(){this.clientIDKey="Office API client",this.logIdSetKey="Office App Log Id Set"}return e.prototype.getClientId=function(){var e=this.getValue(this.clientIDKey);return(!e||e.length<=0||e.length>40)&&(e=OSF.OUtil.Guid.generateNewGuid(),this.setValue(this.clientIDKey,e)),e},e.prototype.saveLog=function(e,t){var n=this.getValue(this.logIdSetKey);n=(n&&n.length>0?n+";":"")+e,this.setValue(this.logIdSetKey,n),this.setValue(e,t)},e.prototype.enumerateLog=function(e,t){var n=this.getValue(this.logIdSetKey);if(n){var r=n.split(";");for(var o in r){var i=r[o],a=this.getValue(i);a&&(e&&e(i,a),t&&this.remove(i))}t&&this.remove(this.logIdSetKey)}},e.prototype.getValue=function(e){var t=OSF.OUtil.getLocalStorage(),n="";return t&&(n=t.getItem(e)),n},e.prototype.setValue=function(e,t){var n=OSF.OUtil.getLocalStorage();n&&n.setItem(e,t)},e.prototype.remove=function(e){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(e)}catch(e){}},e}(),c=function(){function t(){}return t.prototype.LogData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(e){}},t.prototype.LogRawData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(e){}},t}();function l(e){return e&&(e=e.replace(/[{}]/g,"").toLowerCase()),e||""}function u(e,t){var o=new OSFLog.AppInitializationUsageData;o.CorrelationId=l(r),o.SessionId=n,o.SuccessCode=e?1:0,o.Message=t,(new c).LogData(o)}function d(){var e=0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.PublicAddin);return e||!!t&&p(OSF._OfficeAppFactory.getHostInfo().hostPlatform,t.hostVersion)}function f(e,t){return d()||t!==e?t:"PRIVATE"}function p(e,t){var n=!1,r=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(t);if(r){var o=parseInt(r[1]),i=parseInt(r[2]),a=parseInt(r[3]);"win32"==e?(o<16||16==o&&a<14225)&&(n=!0):"mac"==e&&(o<16||16==o&&(i<52||52==i&&a<808))&&(n=!0)}return n}function h(){return 0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.IsMos)}e.initialize=function(r){if(e.enableTelemetry&&!t){t=new i,r.get_hostFullVersion()?t.hostVersion=r.get_hostFullVersion():t.hostVersion=r.get_appVersion(),t.appId=d()?r.get_id():"PRIVATE",t.marketplaceType=r._marketplaceType,t.browser=window.navigator.userAgent,t.correlationId=l(r.get_correlationId()),t.clientId=(new s).getClientId(),t.appInstanceId=r.get_appInstanceId(),t.appInstanceId&&(t.appInstanceId=l(t.appInstanceId),t.appInstanceId=f(r.get_id(),t.appInstanceId)),t.message=r.get_hostCustomMessage(),t.officeJSVersion=OSF.ConstantNames.FileVersion,t.hostJSVersion="0.0.0.0",r._wacHostEnvironment&&(t.wacHostEnvironment=r._wacHostEnvironment),void 0!==r._isFromWacAutomation&&null!==r._isFromWacAutomation&&(t.isFromWacAutomation=r._isFromWacAutomation.toString().toLowerCase());var c=r.get_docUrl();t.docUrl=o.test(c)?c:"";var u=location.href;u&&(u=u.split("?")[0].split("#")[0]),t.isMos=h(),t.appURL="",function(e,t){var n,r;t.assetId="",t.userId="";try{n=decodeURIComponent(e);var o=(r=(new DOMParser).parseFromString(n,"text/xml")).getElementsByTagName("t")[0].attributes.getNamedItem("cid"),i=r.getElementsByTagName("t")[0].attributes.getNamedItem("oid");o&&o.nodeValue?t.userId=o.nodeValue:i&&i.nodeValue&&(t.userId=i.nodeValue),t.assetId=r.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(e){}finally{n=null,r=null,null}}(r.get_eToken(),t),t.sessionId=n,"undefined"!==typeof OTel&&OTel.OTelLogger.initialize(t),function(){var t=new Date,n=null,r=0,o=!1,i=function(){document.hasFocus()?null==n&&(n=new Date):n&&(r+=Math.abs((new Date).getTime()-n.getTime()),n=null)},s=[];s.push(new a("focus",i)),s.push(new a("blur",i)),s.push(new a("focusout",i)),s.push(new a("focusin",i));var c=function(){for(var i=0;i0)for(var r=0;r0)for(var r=0;r0&&(this._eventHandlers[e]=[],!0)},clearObjectEventHandlers:function(e,t){return null!=this._objectEventHandlers[e]&&null!=this._objectEventHandlers[e][t]&&(this._objectEventHandlers[e][t]=[],!0)},getEventHandlerCount:function(e){return void 0!=this._eventHandlers[e]?this._eventHandlers[e].length:-1},getObjectEventHandlerCount:function(e,t){return null==this._objectEventHandlers[e]||null==this._objectEventHandlers[e][t]?0:this._objectEventHandlers[e][t].length},fireEvent:function(e){if(void 0==e.type)return!1;var t=e.type;if(t&&this._eventHandlers[t]){for(var n=this._eventHandlers[t],r=0;r0){for(var r=t[0];n.length>0;){r(n.shift())}return!0}}return!1},clearQueuedEvent:function(e){e&&this._eventHandlers[e]&&(this._queuedEventsArgs[e]&&(this._queuedEventsArgs[e]=[]))}},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureEventArgs=function(e,t,n){var r;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(n,t.document),n[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(n,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(n),"outlook"==OSF._OfficeAppFactory.getHostInfo().hostType&&"mac"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&OSF.DDA.convertOlkAppointmentTimeToDateFormat(r);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(e,n[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(e,n);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkItemSelectedChangedEventArgs(n),t.initialize(r.initialData),"win32"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform&&"mac"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform||t.setCurrentItemNumber(r.itemNumber.itemNumber);break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecipientsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecurrenceChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAttachmentsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.InfobarClicked:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkInfobarClickedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkSelectedItemsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkSensitivityLabelChangedEventArgs(n);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return r},OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]}),OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1},OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"}),OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent",MessageOrigin:"messageOrigin"}),OSF.DDA.DialogEventType={},OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"}),OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",DisplayModalDialogAsync:"displayModalDialogAsync",CloseAsync:"close"}),OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",MessageChild:"messageChild",SendMessage:"sendMessage",AddMessageHandler:"addEventHandler"}),OSF.DDA.UI.ParentUI=function(){var e;e=null!=Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived?new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]):new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]);var t=this,n=function(n,r){t[n]||OSF.OUtil.defineEnumerableProperty(t,n,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];n(arguments,e,t,r)}})};n(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,!1),Microsoft.Office.WebExtension.FeatureGates.ModalWebDialogAPI&&n(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName,!0),OSF.OUtil.finalizeProperties(this)},OSF.DDA.UI.ChildUI=function(e){var t=OSF.DDA.SyncMethodNames.MessageParent.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return e(arguments,n)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;n[r]||"undefined"==typeof OSF.DialogParentMessageEventDispatch||OSF.DDA.DispIdHost.addEventSupport(n,OSF.DialogParentMessageEventDispatch,e),OSF.OUtil.finalizeProperties(this)},OSF.DialogHandler=function(){},OSF.DDA.DialogEventArgs=function(e){e[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:e[OSF.DDA.PropertyDescriptors.MessageType]}})},OSF.DDA.DialogParentEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}})};var DialogApiManager=function(){function e(){}return e.defineApi=function(e,t){OSF.DDA.AsyncMethodCalls.define({method:e,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:t,privateStateCallbacks:[],onSucceeded:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Id],o=e[Microsoft.Office.WebExtension.Parameters.Data],i=new OSF.DialogHandler,a=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(i,a,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];e(arguments,r,o,i)}});var s=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;if(OSF.OUtil.defineEnumerableProperty(i,s,{value:function(){var e=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],t=e.verifyAndExtractCall(arguments,i,o),n=t[Microsoft.Office.WebExtension.Parameters.EventType],r=t[Microsoft.Office.WebExtension.Parameters.Handler];return o.addEventHandlerAndFireQueuedEvent(n,r)}}),!0===OSF.DDA.UI.EnableSendMessageDialogAPI){var c=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(i,c,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,o,i)}})}if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var l=OSF.DDA.SyncMethodNames.MessageChild.displayName;OSF.OUtil.defineEnumerableProperty(i,l,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,o,i)}})}return i},checkCallArgs:function(e,t,n){return e[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Width]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Width]>100&&(e[Microsoft.Office.WebExtension.Parameters.Width]=99),e[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Height]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Height]>100&&(e[Microsoft.Office.WebExtension.Parameters.Height]=99),e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),e}})},e.messageChildRichApiBridge=function(){if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,null,null)}},e.initOnce=function(){e.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync,e.displayDialogAsyncApiSupportedOptions),e.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync,e.displayModalDialogAsyncApiSupportedOptions)},e.displayDialogAsyncApiSupportedOptions=[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.EnforceAppDomain,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo,value:{types:["boolean"],defaultValue:!1}}],e.displayModalDialogAsyncApiSupportedOptions=e.displayDialogAsyncApiSupportedOptions.concat([{name:"abortWhenParentIsMinimized",value:{types:["boolean"],defaultValue:!1}},{name:"abortWhenDocIsInactive",value:{types:["boolean"],defaultValue:!1}}]),e}();DialogApiManager.initOnce(),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}],privateStateCallbacks:[]}),OSF.DDA.SafeArray.Delegate.openDialog=function(e){try{e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,e);OSF.ClientHostController.openDialog(e.dispId,e.targetId,(function(t,n){e.onEvent&&e.onEvent(n),OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(e.dispId)}),t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.closeDialog=function(e){e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,e);try{OSF.ClientHostController.closeDialog(e.dispId,e.targetId,t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.messageParent=function(e){try{e.onCalling&&e.onCalling();var t=(new Date).getTime(),n=OSF.ClientHostController.messageParent(e.hostCallArgs);return e.onReceiving&&e.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(e.dispId,e.hostCallArgs,Math.abs((new Date).getTime()-t),n),n}catch(e){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(e)}},OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.sendMessage=function(e){try{e.onCalling&&e.onCalling();(new Date).getTime();var t=OSF.ClientHostController.sendMessage(e.hostCallArgs);return e.onReceiving&&e.onReceiving(),t}catch(e){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(e)}},OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogParentMessageReceivedEvent:"DialogParentMessageReceivedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogParentMessageReceived:"dialogParentMessageReceived",DialogParentEventReceived:"dialogParentEventReceived"}),OSF.DialogParentMessageEventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,Microsoft.Office.WebExtension.EventType.DialogParentEventReceived]),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:!0}),OSF.DDA.UI.EnableMessageChildDialogAPI=!0,Microsoft.Office.WebExtension.TableData=function(e,t){function n(e){if(null==e||void 0==e)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(e,2);t<2;t++)e=[e];return e}catch(e){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(e){t=n(e)}},rows:{get:function(){return e},set:function(t){e=null==t||OSF.OUtil.isArray(t)&&0==t.length?[]:n(t)}}}),this.headers=t,this.rows=e},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureTableData=function(e){return new Microsoft.Office.WebExtension.TableData(e[OSF.DDA.TableDataProperties.TableRows],e[OSF.DDA.TableDataProperties.TableHeaders])},Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"},OSF.DDA.DataCoercion=function(){return{findArrayDimensionality:function(e){if(OSF.OUtil.isArray(e)){for(var t=0,n=0;n4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return e},onSucceeded:function(e,t,n){return new OSF.DDA.File(e[OSF.DDA.FileProperties.Handle],e[OSF.DDA.FileProperties.FileSize],n[Microsoft.Office.WebExtension.Parameters.SliceSize])}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(e,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(e,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return e[OSF.DDA.FileSliceOffset]=parseInt((r*n[OSF.DDA.FileProperties.SliceSize]).toString()),e},onSucceeded:function(e,t,n){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:e[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:n[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:e[OSF.DDA.FileProperties.SliceSize]}}),r}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(e,t){return t[OSF.DDA.FileProperties.Handle]}}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]}),OSF.DDA.FilePropertiesDescriptor={Url:"Url"},OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"}),Microsoft.Office.WebExtension.FileProperties=function(e){OSF.OUtil.defineEnumerableProperties(this,{url:{value:e[OSF.DDA.FilePropertiesDescriptor.Url]}})},OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(e,t,n){return new Microsoft.Office.WebExtension.FileProperties(e)}}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.ExcelTableBinding=function(e,t,n,r,o){var i=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[i.ClearFormatsAsync,i.SetTableOptionsAsync,i.SetFormatsAsync]),OSF.DDA.ExcelTableBinding.uber.constructor.call(this,e,t,n,r,o),OSF.OUtil.finalizeProperties(this)},OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e){return OSF.DDA.DataCoercion.determineCoercionType(e[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:["object"],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:["object"],defaultValue:[]}}],privateStateCallbacks:[]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e){return OSF.DDA.DataCoercion.determineCoercionType(e[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:["object","string"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:["object"],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:["object"],defaultValue:[]}}],checkCallArgs:function(e,t,n){var r=Microsoft.Office.WebExtension.Parameters;if(0==e[r.StartRow]&&0==e[r.StartColumn]&&OSF.OUtil.isArray(e[r.CellFormat])&&0===e[r.CellFormat].length&&OSF.OUtil.isArray(e[r.TableOptions])&&0===e[r.TableOptions].length&&(delete e[r.StartRow],delete e[r.StartColumn],delete e[r.CellFormat],delete e[r.TableOptions]),e[r.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(e[r.StartRow]&&0!=e[r.StartRow]||e[r.StartColumn]&&0!=e[r.StartColumn]||e[r.CellFormat]||e[r.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return e},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(e){return e.id}}]}),OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var e=arguments;return this._fetch((function(t){t.setTableOptionsAsync.apply(t,e)})),this},OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var e=arguments;return this._fetch((function(t){t.setFormatsAsync.apply(t,e)})),this},OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var e=arguments;return this._fetch((function(t){t.clearFormatsAsync.apply(t,e)})),this}}(),function(){function e(e){return e.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]})}(),Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2},function(){OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:3}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:4},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:5}]});var e={headerRow:0,bandedRows:1,firstColumn:2,lastColumn:3,bandedColumns:4,filterButton:5,style:6,totalRow:7},t={row:0,column:1},n={alignHorizontal:{text:"alignHorizontal",type:1},alignVertical:{text:"alignVertical",type:2},backgroundColor:{text:"backgroundColor",type:101},borderStyle:{text:"borderStyle",type:201},borderColor:{text:"borderColor",type:202},borderTopStyle:{text:"borderTopStyle",type:203},borderTopColor:{text:"borderTopColor",type:204},borderBottomStyle:{text:"borderBottomStyle",type:205},borderBottomColor:{text:"borderBottomColor",type:206},borderLeftStyle:{text:"borderLeftStyle",type:207},borderLeftColor:{text:"borderLeftColor",type:208},borderRightStyle:{text:"borderRightStyle",type:209},borderRightColor:{text:"borderRightColor",type:210},borderOutlineStyle:{text:"borderOutlineStyle",type:211},borderOutlineColor:{text:"borderOutlineColor",type:212},borderInlineStyle:{text:"borderInlineStyle",type:213},borderInlineColor:{text:"borderInlineColor",type:214},fontFamily:{text:"fontFamily",type:301},fontStyle:{text:"fontStyle",type:302},fontSize:{text:"fontSize",type:303},fontUnderlineStyle:{text:"fontUnderlineStyle",type:304},fontColor:{text:"fontColor",type:305},fontDirection:{text:"fontDirection",type:306},fontStrikethrough:{text:"fontStrikethrough",type:307},fontSuperscript:{text:"fontSuperscript",type:308},fontSubscript:{text:"fontSubscript",type:309},fontNormal:{text:"fontNormal",type:310},indentLeft:{text:"indentLeft",type:401},indentRight:{text:"indentRight",type:402},numberFormat:{text:"numberFormat",type:501},width:{text:"width",type:701},height:{text:"height",type:702},wrapping:{text:"wrapping",type:703}},r=[{name:"none",value:0},{name:"thin",value:1},{name:"medium",value:2},{name:"dashed",value:3},{name:"dotted",value:4},{name:"thick",value:5},{name:"double",value:6},{name:"hair",value:7},{name:"medium dashed",value:8},{name:"dash dot",value:9},{name:"medium dash dot",value:10},{name:"dash dot dot",value:11},{name:"medium dash dot dot",value:12},{name:"slant dash dot",value:13}],o=[{name:"none",value:0},{name:"black",value:1},{name:"blue",value:2},{name:"gray",value:3},{name:"green",value:4},{name:"orange",value:5},{name:"pink",value:6},{name:"purple",value:7},{name:"red",value:8},{name:"teal",value:9},{name:"turquoise",value:10},{name:"violet",value:11},{name:"white",value:12},{name:"yellow",value:13},{name:"automatic",value:14}],i=OSF.DDA.SafeArray.Delegate.ParameterMap;i.define({type:n.alignHorizontal.text,toHost:[{name:"general",value:0},{name:"left",value:1},{name:"center",value:2},{name:"right",value:3},{name:"fill",value:4},{name:"justify",value:5},{name:"center across selection",value:6},{name:"distributed",value:7}]}),i.define({type:n.alignVertical.text,toHost:[{name:"top",value:0},{name:"center",value:1},{name:"bottom",value:2},{name:"justify",value:3},{name:"distributed",value:4}]}),i.define({type:n.backgroundColor.text,toHost:o}),i.define({type:n.borderStyle.text,toHost:r}),i.define({type:n.borderColor.text,toHost:o}),i.define({type:n.borderTopStyle.text,toHost:r}),i.define({type:n.borderTopColor.text,toHost:o}),i.define({type:n.borderBottomStyle.text,toHost:r}),i.define({type:n.borderBottomColor.text,toHost:o}),i.define({type:n.borderLeftStyle.text,toHost:r}),i.define({type:n.borderLeftColor.text,toHost:o}),i.define({type:n.borderRightStyle.text,toHost:r}),i.define({type:n.borderRightColor.text,toHost:o}),i.define({type:n.borderOutlineStyle.text,toHost:r}),i.define({type:n.borderOutlineColor.text,toHost:o}),i.define({type:n.borderInlineStyle.text,toHost:r}),i.define({type:n.borderInlineColor.text,toHost:o}),i.define({type:n.fontStyle.text,toHost:[{name:"regular",value:0},{name:"italic",value:1},{name:"bold",value:2},{name:"bold italic",value:3}]}),i.define({type:n.fontUnderlineStyle.text,toHost:[{name:"none",value:0},{name:"single",value:1},{name:"double",value:2},{name:"single accounting",value:3},{name:"double accounting",value:4}]}),i.define({type:n.fontColor.text,toHost:o}),i.define({type:n.fontDirection.text,toHost:[{name:"context",value:0},{name:"left-to-right",value:1},{name:"right-to-left",value:2}]}),i.define({type:n.width.text,toHost:[{name:"auto fit",value:-1}]}),i.define({type:n.height.text,toHost:[{name:"auto fit",value:-1}]}),i.define({type:Microsoft.Office.WebExtension.Parameters.TableOptions,toHost:[{name:"headerRow",value:0},{name:"bandedRows",value:1},{name:"firstColumn",value:2},{name:"lastColumn",value:3},{name:"bandedColumns",value:4},{name:"filterButton",value:5},{name:"style",value:6},{name:"totalRow",value:7}]}),i.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={toHost:function(e){for(var t in e)e[t].format&&(e[t].format=i.doMapValues(e[t].format,"toHost"));return e},fromHost:function(e){return e}},i.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat,{toHost:function(e){var r=[];for(var o in e){var i=e[o],a=[];if("undefined"!==typeof i.cells){var s,c=i.cells;if("object"===typeof i.cells)for(var l in s=[],c)"undefined"!==typeof t[l]&&(s[t[l]]=c[l]);else s=c;a[0]=s}if(i.format){var u=i.format,d=[];for(var f in u)"undefined"!==typeof n[f]&&d.push([n[f].type,u[f]]);a[1]=d}r[o]=a}return r},fromHost:function(e){return e}}),i.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions,{toHost:function(t){var n=[];for(var r in t)"undefined"!==typeof e[r]&&(n[e[r]]=t[r]);return n},fromHost:function(e){return e}})}(),function(e){!function(t){var n=function(){function n(){var e=this;this._pseudoDocument=null,this._eventDispatch=null,this._useAssociatedActionsOnly=null,this._processAppCommandInvocation=function(t){var n=e._verifyManifestCallback(t.callbackName);if(n.errorCode==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var r=e._constructEventObjectForCallback(t);r?window.setTimeout((function(){n.callback(r)}),0):e._invokeAppCommandCompletedMethod(t.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}else e._invokeAppCommandCompletedMethod(t.appCommandId,n.errorCode,"")}}return n.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:["string"]}]}),OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"}),OSF.OUtil.setNamespace("AppCommand",OSF.DDA),OSF.DDA.AppCommand.AppCommandInvokedEventArgs=e.AppCommand.AppCommandInvokedEventArgs},n.prototype.initializeAndChangeOnce=function(e){t.registerDdaFacade(),this._pseudoDocument={},OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]),this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch),this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,(function(t){e&&("succeeded"==t.status?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))}))},n.prototype._verifyManifestCallback=function(e){var t={callback:null,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback};e=e.trim();try{var n=this._getCallbackFunc(e);if("function"!=typeof n)return t}catch(e){return t}return{callback:n,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}},n.prototype._getUseAssociatedActionsOnly=function(){if(null==this._useAssociatedActionsOnly){this._useAssociatedActionsOnly=!1;try{!0===window.useAssociatedActionsOnly?this._useAssociatedActionsOnly=!0:this._useAssociatedActionsOnly=OSF._OfficeAppFactory.getLoadScriptHelper().getUseAssociatedActionsOnlyDefined()}catch(e){}}return this._useAssociatedActionsOnly},n.prototype._getCallbackFuncFromWindow=function(e){for(var t=e.split("."),n=window,r=0;r=0&&(e=e.substring(t+5,e.length))<"14.14393"}()?e.PromiseImpl.Init():window.Promise:e.PromiseImpl.Init()}()}(t=e._Internal||(e._Internal={}));var n=t.OfficePromise;e.Promise=n}(OfficeExtension||(OfficeExtension={})),function(e){var t=function(){function e(){}return e.prototype._resolveRequestUrlAndHeaderInfo=function(){return l._createPromiseFromResult(null)},e.prototype._createRequestExecutorOrNull=function(){return null},e.prototype.getEventRegistration=function(e){return null},e}();e.SessionBase=t;var n=function(){function e(){}return e.setCustomSendRequestFunc=function(t){e.s_customSendRequestFunc=t},e.xhrSendRequestFunc=function(e){return l.createPromise((function(t,n){var o=new XMLHttpRequest;if(o.open(e.method,e.url),o.onload=function(){var e={statusCode:o.status,headers:l._parseHttpResponseHeaders(o.getAllResponseHeaders()),body:o.responseText};t(e)},o.onerror=function(){n(new r.RuntimeError({code:i.connectionFailure,httpStatusCode:o.status,message:l._getResourceString(a.connectionFailureWithStatus,o.statusText)}))},e.headers)for(var s in e.headers)o.setRequestHeader(s,e.headers[s]);o.send(l._getRequestBodyText(e))}))},e.fetchSendRequestFunc=function(e){var t=l._getRequestBodyText(e);return""===t&&(t=void 0),fetch(e.url,{method:e.method,headers:e.headers,body:t}).then((function(e){return e.text().then((function(t){var n=e.status,r={};return e.headers.forEach((function(e,t){r[t]=e})),{statusCode:n,headers:r,body:t}}))}))},e.sendRequest=function(t){e.validateAndNormalizeRequest(t);var n=e.s_customSendRequestFunc;return n||(n="undefined"!==typeof fetch?e.fetchSendRequestFunc:e.xhrSendRequestFunc),n(t)},e.setCustomSendLocalDocumentRequestFunc=function(t){e.s_customSendLocalDocumentRequestFunc=t},e.sendLocalDocumentRequest=function(t){return e.validateAndNormalizeRequest(t),(e.s_customSendLocalDocumentRequestFunc||e.officeJsSendLocalDocumentRequestFunc)(t)},e.officeJsSendLocalDocumentRequestFunc=function(e){e=l._validateLocalDocumentRequest(e);var t=l._buildRequestMessageSafeArray(e);return l.createPromise((function(e,n){OSF.DDA.RichApi.executeRichApiRequestAsync(t,(function(t){var n;n="succeeded"==t.status?{statusCode:c.getResponseStatusCode(t),headers:c.getResponseHeaders(t),body:c.getResponseBody(t)}:c.buildHttpResponseFromOfficeJsError(t.error.code,t.error.message),l.log("Response:"),l.log(JSON.stringify(n)),e(n)}))}))},e.validateAndNormalizeRequest=function(e){if(l.isNullOrUndefined(e))throw r.RuntimeError._createInvalidArgError({argumentName:"request"});l.isNullOrEmptyString(e.method)&&(e.method="GET"),e.method=e.method.toUpperCase();var t=!1;if("object"===typeof e.headers&&e.headers[s.testRequestNameHeader]&&(t=!0),!t){var n=u._getCurrentTestNameWithSequenceId();n&&(e.headers||(e.headers={}),e.headers[s.testRequestNameHeader]=n)}},e.logRequest=function(t){if(l._logEnabled){if(l.log("---HTTP Request---"),l.log(t.method+" "+t.url),t.headers)for(var n in t.headers)l.log(n+": "+t.headers[n]);e._logBodyEnabled&&l.log(l._getRequestBodyText(t))}},e.logResponse=function(t){if(l._logEnabled){if(l.log("---HTTP Response---"),l.log(""+t.statusCode),t.headers)for(var n in t.headers)l.log(n+": "+t.headers[n]);e._logBodyEnabled&&l.log(t.body)}},e._logBodyEnabled=!1,e}();e.HttpUtility=n;var r,o=function(){function e(e){var t=this;this.m_bridge=e,this.m_promiseResolver={},this.m_handlers=[],this.m_bridge.onMessageFromHost=function(e){var n=JSON.parse(e);if(3==n.type){var r=n.message;if(r&&r.entries)for(var o=0;o=0){var i=t.url.substr(o+1),a=l._parseRequestFlagsAndCustomDataFromQueryStringIfAny(i);a.flags>=0&&(n=a.flags)}"string"===typeof t.body&&(t.body=JSON.parse(t.body));var s={id:e.nextId(),type:1,flags:n,message:t};return r.sendMessageToHostAndExpectResponse(s).then((function(e){return e.message}))}));for(var o=0;o=0&&this.m_handlers.splice(t,1)},e.onInited=function(t){e.s_onInitedHandlers.push(t),e.s_instance&&t(e.s_instance)},e.prototype.dispatchMessage=function(e){if("number"===typeof e.id){var t=this.m_promiseResolver[e.id];if(t)return t(e),void delete this.m_promiseResolver[e.id]}for(var n=0;n0},e._getLocalDocumentUrlPrefixLength=function(e){for(var t=["http://document.localhost","https://document.localhost","//document.localhost"],n=e.toLowerCase().trim(),r=0;r0){var i=t.url.substr(o+1),a=e._parseRequestFlagsAndCustomDataFromQueryStringIfAny(i);a.flags>=0&&(n=a.flags),r=a.customData}}return c.buildRequestMessageSafeArray(r,n,t.method,t.url,t.headers,e._getRequestBodyText(t))},e._parseHttpResponseHeaders=function(t){var n={};if(!e.isNullOrEmptyString(t))for(var r=new RegExp("\r?\n"),o=t.split(r),i=0;i0){var c=a.substr(0,s),l=a.substr(s+1);c=e.trim(c),l=e.trim(l),n[c.toUpperCase()]=l}}}return n},e._parseErrorResponse=function(t){var n=e._parseErrorResponseBody(t),r=t.statusCode.toString();if(e.isNullOrUndefined(n)||"object"!==typeof n||!n.error)return e._createDefaultErrorResponse(r);var o=n.error,i=o.innerError;return i&&i.code?e._createErrorResponse(i.code,r,i.message):o.code?e._createErrorResponse(o.code,r,o.message):e._createDefaultErrorResponse(r)},e._parseErrorResponseBody=function(t){if(e.isPlainJsonObject(t.body))return t.body;if(!e.isNullOrEmptyString(t.body)){var n=e.trim(t.body);try{return JSON.parse(n)}catch(t){e.log("Error when parse "+n)}}},e._createDefaultErrorResponse=function(t){return{errorCode:i.connectionFailure,errorMessage:e._getResourceString(a.connectionFailureWithStatus,t)}},e._createErrorResponse=function(t,n,r){return{errorCode:t,errorMessage:e._getResourceString(a.connectionFailureWithDetails,[n,t,r])}},e._copyHeaders=function(e,t){if(e&&t)for(var n in e)t[n]=e[n]},e.addResourceStringValues=function(t){for(var n in t)e.s_resourceStringValues[n]=t[n]},e._logEnabled=!1,e.s_resourceStringValues={ApiNotFoundDetails:"The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",ConnectionFailureWithStatus:"The request failed with status code of {0}.",ConnectionFailureWithDetails:"The request failed with status code of {0}, error code {1} and the following error message: {2}",InvalidArgument:"The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",InvalidObjectPath:'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',InvalidRequestContext:"Cannot use the object across different request contexts.",Timeout:"The operation has timed out.",ValueNotLoaded:'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'},e}();e.CoreUtility=l;var u=function(){function e(){}return e.setMock=function(t){e.s_isMock=t},e.isMock=function(){return e.s_isMock},e._setCurrentTestName=function(t){e.s_currentTestName=t,e.s_currentTestSequenceId=0},e._getCurrentTestNameWithSequenceId=function(){return e.s_currentTestName?(e.s_currentTestSequenceId++,e.s_currentTestName+"."+e.s_currentTestSequenceId):null},e}();e.TestUtility=u,e._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!0,enableUndoableFlag:!0,appendTypeNameToObjectPathInfo:!1,enablePreviewExecution:!1},e.config={extendedErrorLogging:!1};var d=function(){function t(){}return t.createSetPropertyAction=function(t,n,r,o,i){C.validateObjectPath(n);var a={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:n._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[o],c=C.setMethodArguments(t,a.ArgumentInfo,s);C.validateReferencedObjectPaths(c);var l=new p(a,0,i);if(l.referencedObjectPath=n._objectPath,l.referencedArgumentObjectPaths=c,e._internalConfig.enablePreviewExecution&&0!==(16&i)){var u={Id:t._nextId(),ActionType:4,Name:r,ObjectId:"",ObjectType:"",Arguments:[o]};n._addPreviewExecutionAction(u)}return n._addAction(l)},t.createQueryAction=function(e,t,n,r){C.validateObjectPath(t);var o={Id:e._nextId(),ActionType:2,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},i=new p(o,1,4);return i.referencedObjectPath=t._objectPath,t._addAction(i,r)},t.createQueryAsJsonAction=function(e,t,n,r){C.validateObjectPath(t);var o={Id:e._nextId(),ActionType:7,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},i=new p(o,1,4);return i.referencedObjectPath=t._objectPath,t._addAction(i,r)},t.createUpdateAction=function(e,t,n){C.validateObjectPath(t);var r={Id:e._nextId(),ActionType:9,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},o=new p(r,0,0);return o.referencedObjectPath=t._objectPath,t._addAction(o)},t}();e.CommonActionFactory=d;var f=function(){function t(e,t){this.m_contextBase=e,this.m_objectPath=t}return Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_context",{get:function(){return this.m_contextBase},enumerable:!0,configurable:!0}),t.prototype._addAction=function(e,t){var n=this;return void 0===t&&(t=null),l.createPromise((function(r,o){n._context._addServiceApiAction(e,t,r,o)}))},t.prototype._addPreviewExecutionAction=function(e){},t.prototype._retrieve=function(t,n){var r=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;r||(r=!C.isSetSupported("RichApiRuntime","1.1"));var o=m._parseQueryOption(t);return r?d.createQueryAction(this._context,this,o,n):d.createQueryAsJsonAction(this._context,this,o,n)},t.prototype._recursivelyUpdate=function(t){var n=e._internalConfig.alwaysPolyfillClientObjectUpdateMethod;n||(n=!C.isSetSupported("RichApiRuntime","1.2"));try{var o=this[S.scalarPropertyNames];o||(o=[]);var s=this[S.scalarPropertyUpdateable];if(!s){s=[];for(var c=0;c=0){if(!s[g])throw new r.RuntimeError({code:i.invalidArgument,httpStatusCode:400,message:l._getResourceString(A.attemptingToSetReadOnlyProperty,m),debugInfo:{errorLocation:m}});f[m]=t[m],++h}else{if(!(u.indexOf(m)>=0))throw new r.RuntimeError({code:i.invalidArgument,httpStatusCode:400,message:l._getResourceString(A.propertyDoesNotExist,m),debugInfo:{errorLocation:m}});p[m]=t[m]}}if(h>0)if(n)for(c=0;c0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(o,a,".")});t.Top=s}else if("$skip"===a){if("number"!==typeof s||n.length>0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(o,a,".")});t.Skip=s}else if("boolean"===typeof s)s&&t.Select.push(e.combineQueryPath(n,a,"/"));else{if("object"!==typeof s)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(o,a,".")});e.parseStrictLoadOptionHelper(t,e.combineQueryPath(n,a,"/"),e.combineQueryPath(o,a,"."),s)}}},e}();e.ClientRequestContextBase=m;var g=function(){function e(e){this.m_objectPath=e}return e.prototype._handleResult=function(e){l.isNullOrUndefined(e)?this.m_objectPath._updateAsNullObject():this.m_objectPath.updateUsingObjectData(e,null)},e}(),y=function(){function t(e){this.m_contextBase=e,this.m_actions=[],this.m_actionResultHandler={},this.m_referencedObjectPaths={},this.m_instantiatedObjectPaths={},this.m_preSyncPromises=[],this.m_previewExecutionActions=[]}return t.prototype.addAction=function(e){this.m_actions.push(e),1==e.actionInfo.ActionType&&(this.m_instantiatedObjectPaths[e.actionInfo.ObjectPathId]=e)},t.prototype.addPreviewExecutionAction=function(e){this.m_previewExecutionActions.push(e)},Object.defineProperty(t.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.ensureInstantiateObjectPath=function(e){if(e){if(this.m_instantiatedObjectPaths[e.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(e.parentObjectPath),this.ensureInstantiateObjectPaths(e.argumentObjectPaths),!this.m_instantiatedObjectPaths[e.objectPathInfo.Id]){var t={Id:this.m_contextBase._nextId(),ActionType:1,Name:"",ObjectPathId:e.objectPathInfo.Id},n=new p(t,1,4);n.referencedObjectPath=e,this.addReferencedObjectPath(e),this.addAction(n);var r=new g(e);this.addActionResultHandler(n,r)}}},t.prototype.ensureInstantiateObjectPaths=function(e){if(e)for(var t=0;t0&&(l.PreviewExecutionActions=this.m_previewExecutionActions,n|=4096),{body:l,flags:n}},t.prototype.processResponse=function(e){if(e)for(var t=0;t=0;t--){var n=this.m_actions[t].actionInfo;if(n.ObjectPathId===e&&3===n.ActionType&&n.Name===S.keepReference){this.m_actions.splice(t,1);break}}},t._updateLastUsedActionIdOfObjectPathId=function(e,n,r){for(;n;){if(e[n.objectPathInfo.Id])return;e[n.objectPathInfo.Id]=r;var o=n.argumentObjectPaths;if(o)for(var i=o.length,a=0;a=0;--o){var i=(f=e[o]).actionInfo.Id;f.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(n,f.referencedObjectPath,i);var a=f.referencedArgumentObjectPaths;if(a)for(var s=a.length,c=0;c0?f.actionInfo.L=p:f.actionInfo.L&&delete f.actionInfo.L}},t}();e.ClientRequestBase=y;var v=function(){function e(e){this.m_type=e}return Object.defineProperty(e.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new r.RuntimeError({code:i.valueNotLoaded,httpStatusCode:400,message:l._getResourceString(a.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),e.prototype._handleResult=function(e){this.m_isLoaded=!0,"object"===typeof e&&e&&e._IsNull||(1===this.m_type?this.m_value=C.adjustToDateTime(e):this.m_value=e)},e}();e.ClientResult=v;var O=function(){function e(e){this.m_context=e,this.m_actions=[]}return e.prototype.add=function(e,t,n,r){var o=this;this.m_actions.push({action:e,resultHandler:t,resolve:n,reject:r}),1===this.m_actions.length&&setTimeout((function(){return o.processActions()}),0)},e.prototype.processActions=function(){var e=this;if(0!==this.m_actions.length){var t=this.m_actions;this.m_actions=[];for(var n=new y(this.m_context),r=0;r=65&&e.charCodeAt(t)<=90;)t++;return t0?".":"")+n;break;case 3:n=t.normalizeName(e.objectPathInfo.Name)+"()"+(n.length>0?".":"")+n;break;case 4:n=t.normalizeName(e.objectPathInfo.Name)+(n.length>0?".":"")+n;break;case 5:n="getItem()"+(n.length>0?".":"")+n;break;case 6:n="_reference()"+(n.length>0?".":"")+n}e=e.parentObjectPath}return n},t.setMethodArguments=function(e,n,r){if(l.isNullOrUndefined(r))return null;var o=new Array,i=new Array,a=t.collectObjectPathInfos(e,r,o,i);return n.Arguments=r,a&&(n.ReferencedObjectPathIds=i),o},t.validateContext=function(e,t){if(e&&t&&t._context!==e)throw new r.RuntimeError({code:i.invalidRequestContext,httpStatusCode:400,message:l._getResourceString(a.invalidRequestContext)})},t.isSetSupported=function(e,n){return"function"===typeof t.isSetSupportedOverride?t.isSetSupportedOverride(e,n):!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)||window.Office.context.requirements.isSetSupported(e,n)},t.throwIfApiNotSupported=function(e,n,o,s){if(t._doApiNotSupportedCheck&&!t.isSetSupported(n,o)){var c=l._getResourceString(a.apiNotFoundDetails,[e,n+" "+o,s]);throw new r.RuntimeError({code:i.apiNotFound,httpStatusCode:404,message:c,debugInfo:{errorLocation:e}})}},t.calculateApiFlags=function(e,n,r){var o=window&&window.location&&window.location.href&&-1!==window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc");return("function"===typeof t.isSetSupportedOverride?t.isSetSupportedOverride(n,r):!o&&t.isSetSupported(n,r))||(e&=-3),e},t._parseSelectExpand=function(e){var t=[];if(!l.isNullOrEmptyString(e))for(var n=e.split(","),r=0;r0&&t.push(o)}return t;function i(e){var t=e.toLowerCase();if("items"===t||"items/"===t)return"*";return("items/"===t.substr(0,6)||"items."===t.substr(0,6))&&(e=e.substr(6)),e.replace(new RegExp("[/.]items[/.]","gi"),"/")}},t.changePropertyNameToCamelLowerCase=function(e){if(Array.isArray(e)){for(var n=[],r=0;r=0){var a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!0),s=a.processForDebugStatementInfo(n.Body.Error.ActionIndex);i={statement:s.statement,surroundingStatements:s.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},e.config.extendedErrorLogging&&(a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!1),i.fullStatements=a.process())}var c=null;if(n.Body.Results?c=n.Body.Results:n.Body.ProcessedResults&&n.Body.ProcessedResults.Results&&(c=n.Body.ProcessedResults.Results),c){this._processingResult=!0;try{t.processResponse(c)}finally{this._processingResult=!1}}}if(!Z.isNullOrEmptyString(n.ErrorCode))return new r.RuntimeError({code:n.ErrorCode,httpStatusCode:n.HttpStatusCode,message:n.ErrorMessage,traceMessages:o,data:{responseBody:n.RawErrorResponseBody}});if(n.Body&&n.Body.Error){var l={errorLocation:n.Body.Error.Location};return i&&(l.statement=i.statement,l.surroundingStatements=i.surroundingStatements,l.fullStatements=i.fullStatements),new r.RuntimeError({code:n.Body.Error.Code,httpStatusCode:n.Body.Error.HttpStatusCode,message:n.Body.Error.Message,traceMessages:o,debugInfo:l})}return null},o.prototype.processPendingEventHandlers=function(e){for(var t=Z._createPromiseFromResult(null),n=0;n0)if(o.isValidRequestInfo(n[0]))f=n[0],h=1;else if(Z.isPlainJsonObject(n[0])){if(null!=(f=(m=n[0]).session)&&!o.isValidRequestInfo(f))return o.createErrorPromise(t);p=m.previousObjects,h=1}if(n.length==h+1)d=n[h+0];else{if(null!=m||n.length!=h+2)return o.createErrorPromise(t);p=n[h+0],d=n[h+1]}if(null!=p)if(p instanceof k)u=function(){return p.context};else if(p instanceof o)u=function(){return p};else{if(!Array.isArray(p))return o.createErrorPromise(t);var g=p;if(0==g.length)return o.createErrorPromise(t);for(var y=0;y0&&h._onRunFinishedNotifiers.shift()();if(v)return m;throw m}))},o}(m);e.ClientRequestContext=U;var L=function(){function e(e,t){this.m_proxy=e,this.m_shouldPolyfill=t;var n=e[H.scalarPropertyNames],r=e[H.navigationPropertyNames],o=e[H.className],i=e[H.isCollection];if(n)for(var a=0;a=0;s--)if(o[s]===r[i].handler){o.splice(s,1);break}break;case 2:o=[]}return a&&(!this.m_registered&&o.length>0?n=n.then((function(){return t.m_eventInfo.registerFunc(t.m_callback)})).then((function(){return t.m_registered=!0})):this.m_registered&&0==o.length&&(n=n.then((function(){return t.m_eventInfo.unregisterFunc(t.m_callback)})).catch((function(e){l.log("Error when unregister event: "+JSON.stringify(e))})).then((function(){return t.m_registered=!1}))),n=n.then((function(){return t.m_handlers=o}))),n},e.prototype.fireEvent=function(e){for(var t=[],n=0;n0},e.prototype.register=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});var o=this.getHandlers(e,t);return o.push(n),1===o.length?this.m_registerEventImpl(e,t):Z._createPromiseFromResult(null)},e.prototype.unregister=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var o=this.getHandlers(e,t),i=o.length-1;i>=0;i--)if(o[i]===n){o.splice(i,1);break}return 0===o.length?this.m_unregisterEventImpl(e,t):Z._createPromiseFromResult(null)},e}();e.EventRegistration=V;var q=function(){function e(){this.m_eventRegistration=new V(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this)),this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return e.prototype.ready=function(){var t=this;return this.m_ready||(e._testReadyImpl?this.m_ready=e._testReadyImpl().then((function(){t.m_isReady=!0})):o.instance?this.m_ready=Z._createPromiseFromResult(null).then((function(){t.m_isReady=!0})):this.m_ready=r.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then((function(){t.m_isReady=!0}))),this.m_ready},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.register(e,t,n)}))},e.prototype.unregister=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.unregister(e,t,n)}))},e.prototype._registerEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._unregisterEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._handleRichApiMessage=function(e){if(e&&e.entries)for(var t=0;t=0;o--)if(r[o]===e){r.splice(o,1);break}0==r.length&&q.getGenericEventRegistration(n).unregister(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)}))},t.prototype.removeAll=function(){},t}(W);e.GenericEventHandlers=z;var J=function(){function e(e){this.m_clientObject=e}return e.prototype._handleResult=function(e){this.m_clientObject._handleIdResult(e)},e}(),K=function(){function e(){}return e.createGlobalObjectObjectPath=function(e){var t={Id:e._nextId(),ObjectPathType:1,Name:""};return new h(t,null,!1,!1,1,4)},e.createNewObjectObjectPath=function(e,t,n,r){var o={Id:e._nextId(),ObjectPathType:2,Name:t};return new h(o,null,n,!1,1,Z._fixupApiFlags(r))},e.createPropertyObjectPath=function(e,t,n,r,o,i){var a={Id:e._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id};return new h(a,t._objectPath,r,o,1,Z._fixupApiFlags(i))},e.createIndexerObjectPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new h(r,t._objectPath,!1,!1,1,4)},e.createIndexerObjectPathUsingParentPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new h(r,t,!1,!1,1,4)},e.createMethodObjectPath=function(e,t,n,r,o,i,a,s,c){var l={Id:e._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u=Z.setMethodArguments(e,l.ArgumentInfo,o),d=new h(l,t._objectPath,i,a,r,Z._fixupApiFlags(c));return d.argumentObjectPaths=u,d.getByIdMethodName=s,d},e.createReferenceIdObjectPath=function(e,t){var n={Id:e._nextId(),ObjectPathType:6,Name:t,ArgumentInfo:{}};return new h(n,null,!1,!1,1,4)},e.createChildItemObjectPathUsingIndexerOrGetItemAt=function(t,n,r,o,i){var a=Z.tryGetObjectIdFromLoadOrRetrieveResult(o);return t&&!Z.isNullOrUndefined(a)?e.createChildItemObjectPathUsingIndexer(n,r,o):e.createChildItemObjectPathUsingGetItemAt(n,r,o,i)},e.createChildItemObjectPathUsingIndexer=function(e,t,n){var r=Z.tryGetObjectIdFromLoadOrRetrieveResult(n),o=o={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=[r],new h(o,t._objectPath,!1,!1,1,4)},e.createChildItemObjectPathUsingGetItemAt=function(e,t,n,r){var o=n[H.index];o&&(r=o);var i={Id:e._nextId(),ObjectPathType:3,Name:H.getItemAt,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return i.ArgumentInfo.Arguments=[r],new h(i,t._objectPath,!1,!1,1,4)},e}();e.ObjectPathFactory=K;var Q=function(){function t(e){this.m_context=e}return t.prototype.executeAsync=function(n,r,o){var i=this,a=c.buildMessageArrayForIRequestExecutor(n,r,o,t.SourceLibHeaderValue);return new e.Promise((function(e,t){OSF.DDA.RichApi.executeRichApiRequestAsync(a,(function(t){var n;l.log("Response:"),l.log(JSON.stringify(t)),"succeeded"==t.status?n=c.buildResponseOnSuccess(c.getResponseBody(t),c.getResponseHeaders(t)):(n=c.buildResponseOnError(t.error.code,t.error.message),i.m_context._processOfficeJsErrorResponse(t.error.code,n)),e(n)}))}))},t.SourceLibHeaderValue="officejs",t}(),X=function(){function e(e){this._autoCleanupList={},this.m_context=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._addCommon(e,!0)})):this._addCommon(e,!0)},e.prototype._autoAdd=function(e){this._addCommon(e,!1),this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e},e.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(e,t){this.m_context._autoCleanup&&!e[H.isTracked]&&e!==this.m_context._rootObject&&t&&!Z.isNullOrEmptyString(t[H.referenceId])&&(this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e,e[H.isTracked]=!0)},e.prototype._addCommon=function(e,t){if(e[H.isTracked])t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id];else{var n=e[H.referenceId];if(e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName])throw Z.createRuntimeError(i.generalException,l._getResourceString($.objectIsUntracked),null);Z.isNullOrEmptyString(n)&&e._KeepReference&&(e._KeepReference(),w.createInstantiateAction(this.m_context,e),t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id],e[H.isTracked]=!0)}},e.prototype.remove=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._removeCommon(e)})):this._removeCommon(e)},e.prototype._removeCommon=function(e){e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName]=!0,e.context._pendingRequest._removeKeepReferenceAction(e._objectPath.objectPathInfo.Id);var t=e[H.referenceId];if(!Z.isNullOrEmptyString(t)){var n=this.m_context._rootObject;n._RemoveReference&&n._RemoveReference(t)}delete e[H.isTracked]},e.prototype._retrieveAndClearAutoCleanupList=function(){var e=this._autoCleanupList;return this._autoCleanupList={},e},e}();e.TrackedObjects=X;var Y=function(){function t(e,t,n,r,o){e||(e="root"),this.m_globalObjName=e,this.m_referencedObjectPaths=t,this.m_actions=n,this.m_statements=[],this.m_variableNameForObjectPathMap={},this.m_variableNameToObjectPathMap={},this.m_declaredObjectPathMap={},this.m_showDispose=r,this.m_removePII=o}return t.prototype.process=function(){this.m_showDispose&&B._calculateLastUsedObjectPathIds(this.m_actions);for(var e=0;e=0&&this.m_statements.length>t+5+1));n++);if(t<0)return null;var r=t-5;r<0&&(r=0);var o=t+1+5;o>this.m_statements.length&&(o=this.m_statements.length);var i=[];0!=r&&i.push("...");for(var a=r;a>>>>"),i.push(this.m_statements[t]),i.push("// <<<<<");for(var s=t+1;s0)return e+" // And then dispose {"+r.map((function(e){return n.getObjVarName(e)})).join(", ")+"}"}return e},t.prototype.buildQueryExpression=function(e){if(e.actionInfo.QueryInfo){var t={};return t.select=e.actionInfo.QueryInfo.Select,t.expand=e.actionInfo.QueryInfo.Expand,t.skip=e.actionInfo.QueryInfo.Skip,t.top=e.actionInfo.QueryInfo.Top,"undefined"===typeof t.top&&"undefined"===typeof t.skip&&"undefined"===typeof t.expand?"undefined"===typeof t.select?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(e){return(5==e.objectPathInfo.ObjectPathType||3==e.objectPathInfo.ObjectPathType||4==e.objectPathInfo.ObjectPathType)&&e.objectPathInfo.ParentObjectPathId?this.getObjVarName(e.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(e):this.buildObjectPathExpression(e)},t.prototype.buildObjectPathExpression=function(e){var t=this.buildObjectPathInfoExpression(e.objectPathInfo),n=e.originalObjectPathInfo;return n&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(n)+" */"),t},t.prototype.buildObjectPathInfoExpression=function(e){switch(e.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 3:return Z._toCamelLowerCase(e.Name)+"("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 2:return e.Name+".newObject()";case 7:return"null";case 4:return Z._toCamelLowerCase(e.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(e.Name)+")"}},t.prototype.buildArgumentsExpression=function(e){var t="";if(!e.Arguments||0===e.Arguments.length)return t;if(this.m_removePII)return"undefined"===typeof e.Arguments[0]?t:"...";for(var n=0;n0&&(t+=", "),t+=this.buildArgumentLiteral(e.Arguments[n],e.ReferencedObjectPathIds?e.ReferencedObjectPathIds[n]:null);return"undefined"===t&&(t=""),t},t.prototype.buildArgumentLiteral=function(e,t){return"number"==typeof e&&e===t?this.getObjVarName(t):JSON.stringify(e)},t.prototype.getObjVarNameBase=function(e){var t="v",n=this.m_referencedObjectPaths[e];if(n)switch(n.objectPathInfo.ObjectPathType){case 1:t=this.m_globalObjName;break;case 4:t=Z._toCamelLowerCase(n.objectPathInfo.Name);break;case 3:var r=n.objectPathInfo.Name;r.length>3&&"Get"===r.substr(0,3)&&(r=r.substr(3)),t=Z._toCamelLowerCase(r);break;case 5:var o=this.getObjVarNameBase(n.objectPathInfo.ParentObjectPathId);t="s"===o.charAt(o.length-1)?o.substr(0,o.length-1):o+"Item"}return t},t.prototype.getObjVarName=function(e){if(this.m_variableNameForObjectPathMap[e])return this.m_variableNameForObjectPathMap[e];var t=this.getObjVarNameBase(e);if(!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t;for(var n=1;this.m_variableNameToObjectPathMap[t+n.toString()];)n++;return t+=n.toString(),this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t},t}(),$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.cannotRegisterEvent="CannotRegisterEvent",t.connectionFailureWithStatus="ConnectionFailureWithStatus",t.connectionFailureWithDetails="ConnectionFailureWithDetails",t.propertyNotLoaded="PropertyNotLoaded",t.runMustReturnPromise="RunMustReturnPromise",t.moreInfoInnerError="MoreInfoInnerError",t.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",t.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",t.objectIsUntracked="ObjectIsUntracked",t.customFunctionDefintionMissing="CustomFunctionDefintionMissing",t.customFunctionImplementationMissing="CustomFunctionImplementationMissing",t.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",t.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",t.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",t.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",t.customFunctionInvalidFunction="CustomFunctionInvalidFunction",t.customFunctionInvalidFunctionMapping="CustomFunctionInvalidFunctionMapping",t.customFunctionWindowMissing="CustomFunctionWindowMissing",t.customFunctionDefintionMissingOnWindow="CustomFunctionDefintionMissingOnWindow",t.pendingBatchInProgress="PendingBatchInProgress",t.notInsideBatch="NotInsideBatch",t.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",t}(A);e.ResourceStrings=$,l.addResourceStringValues({CannotRegisterEvent:"The event handler cannot be registered.",PropertyNotLoaded:"The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",RunMustReturnPromise:'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',InvalidOrTimedOutSessionMessage:"Your Office Online session has expired or is invalid. To continue, refresh the page.",InvalidOperationInCellEditMode:"Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",InvalidSheetName:"The request cannot be processed because the specified worksheet cannot be found. Please try again.",CustomFunctionDefintionMissing:"A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.",CustomFunctionDefintionMissingOnWindow:"A property with the name '{0}' that represents the function's definition must exist on the window object.",CustomFunctionImplementationMissing:"The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",CustomFunctionNameContainsBadChars:"The function name may only contain letters, digits, underscores, and periods.",CustomFunctionNameCannotSplit:"The function name must contain a non-empty namespace and a non-empty short name.",CustomFunctionUnexpectedNumberOfEntriesInResultBatch:"The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",CustomFunctionCancellationHandlerMissing:"The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",CustomFunctionInvalidFunction:"The property with the name '{0}' that represents the function's definition is not a valid function.",CustomFunctionInvalidFunctionMapping:"The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.",CustomFunctionWindowMissing:"The window object was not found.",PendingBatchInProgress:"There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",NotInsideBatch:"Operations may not be invoked outside of a batch method.",CannotUpdateReadOnlyProperty:"The property '{0}' is read-only and it cannot be updated.",ObjectIsUntracked:"The object is untracked."});var Z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.fixObjectPathIfNecessary=function(e,t){e&&e._objectPath&&t&&e._objectPath.updateUsingObjectData(t,e)},n.load=function(e,t){return e.context.load(e,t),e},n.loadAndSync=function(e,t){return e.context.load(e,t),e.context.sync().then((function(){return e}))},n.retrieve=function(t,r){var o=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;o||(o=!n.isSetSupported("RichApiRuntime","1.1"));var i=new L(t,o);return t._retrieve(r,i),i},n.retrieveAndSync=function(e,t){var r=n.retrieve(e,t);return e.context.sync().then((function(){return r}))},n.toJson=function(e,t,r,o){var i={};for(var a in t){"undefined"!==typeof(s=t[a])&&(i[a]=s)}for(var a in r){var s;"undefined"!==typeof(s=r[a])&&(s[n.fieldName_isCollection]&&"undefined"!==typeof s[n.fieldName_m__items]?i[a]=s.toJSON().items:i[a]=s.toJSON())}return o&&(i.items=o.map((function(e){return e.toJSON()}))),i},n.throwError=function(e,t,n){throw new r.RuntimeError({code:e,httpStatusCode:400,message:l._getResourceString(e,t),debugInfo:n?{errorLocation:n}:void 0})},n.createRuntimeError=function(e,t,n,o,i){return new r.RuntimeError({code:e,httpStatusCode:o,message:t,debugInfo:{errorLocation:n},data:i})},n.throwIfNotLoaded=function(e,t,r,o){if(!o&&l.isUndefined(t)&&e.charCodeAt(0)!=n.s_underscoreCharCode&&!n.s_suppressPropertyNotLoadedException)throw n.createPropertyNotLoadedException(r,e)},n._getPropertyValueWithoutCheckLoaded=function(e,t){n.s_suppressPropertyNotLoadedException=!0;try{return e[t]}finally{n.s_suppressPropertyNotLoadedException=!1}},n.createPropertyNotLoadedException=function(e,t){return new r.RuntimeError({code:x.propertyNotLoaded,httpStatusCode:400,message:l._getResourceString($.propertyNotLoaded,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.createCannotUpdateReadOnlyPropertyException=function(e,t){return new r.RuntimeError({code:x.cannotUpdateReadOnlyProperty,httpStatusCode:400,message:l._getResourceString($.cannotUpdateReadOnlyProperty,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.promisify=function(t){return new e.Promise((function(e,n){t((function(t){"failed"==t.status?n(t.error):e(t.value)}))}))},n._addActionResultHandler=function(e,t,n){e.context._pendingRequest.addActionResultHandler(t,n)},n._handleNavigationPropertyResults=function(e,t,n){for(var r=0;r0;)e.push(0),n--},t.prototype.getString=function(e){return"number"===typeof e?e>0?this.m_strings[e-1]:null:e},t.prototype.buildEnumType=function(e){var t;if(Array.isArray(e)){(t={name:e[0],fields:e[2]}).fields||(t.fields={});var n=e[1];if(Array.isArray(n))for(var r=0;rn)return!1;return!0},t.prototype.evaluateEventType=function(t){if(Z.isNullOrEmptyString(t))return 0;if(this.isAllDigits(t))return parseInt(t);var n=this.resolveObjectByFullName(t);if("number"!==typeof n)throw new e.Error("Invalid event type: "+t);return n},t.prototype.buildPrototype=function(e,t){this.buildScalarProperties(e,t),this.buildNavigationProperties(e,t),this.buildScalarMethods(e,t),this.buildNavigationMethods(e,t),this.buildEvents(e,t),this.buildHandleResult(e,t),this.buildHandleIdResult(e,t),this.buildHandleRetrieveResult(e,t),this.buildLoad(e,t),this.buildRetrieve(e,t),this.buildSetMockData(e,t),this.buildEnsureUnchanged(e,t),this.buildUpdate(e,t),this.buildSet(e,t),this.buildToJSON(e,t),this.buildItems(e,t),this.buildTypeMetadataInfo(e,t),this.buildTrackUntrack(e,t),this.buildMixin(e,t)},t.prototype.toSimpleCamelUpperCase=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)},t.prototype.ensureOriginalName=function(e){null===e.originalName&&(e.originalName=this.toSimpleCamelUpperCase(e.name))},t.prototype.getFieldName=function(e){return"m_"+e.name},t.prototype.throwIfApiNotSupported=function(e,t){if(this.m_apiSets&&t.apiSetInfoOrdinal>0){var n=this.m_apiSets[t.apiSetInfoOrdinal-1];n&&Z.throwIfApiNotSupported(e.name+"."+t.name,n.name,n.version,this.m_hostName)}},t.prototype.buildScalarProperties=function(e,t){if(Array.isArray(t.scalarProperties))for(var n=0;n0){var n=this.m_apiSets[t-1];n&&(e=C.calculateApiFlags(e,n.name,n.version))}return e},t.prototype.buildScalarProperty=function(e,n,r){this.ensureOriginalName(r);var o=this,i=this.getFieldName(r),a={get:function(){return Z.throwIfNotLoaded(r.name,this[i],n.name,this._isNull),o.throwIfApiNotSupported(n,r),this[i]},enumerable:!0,configurable:!0};0===(2&r.behaviorFlags)&&(a.set=function(e){if(4&r.behaviorFlags&&o.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName+"_Set").call(this,this,e).handled)return;this[i]=e;var a=o.calculateApiFlags(r.setMethodApiFlags,r.undoableApiSetInfoOrdinal);ee.invokeSetProperty(this,r.originalName,e,a)}),Object.defineProperty(e.prototype,r.name,a)},t.prototype.buildNavigationProperties=function(e,t){if(Array.isArray(t.navigationProperties))for(var n=0;n0){for(var i=0;i0){for(var i=0;i0&&(Object.defineProperty(e.prototype,"_scalarPropertyNames",{get:function(){return this.m__scalarPropertyNames||(this.m__scalarPropertyNames=t.scalarProperties.map((function(e){return e.name}))),this.m__scalarPropertyNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyOriginalNames",{get:function(){return this.m__scalarPropertyOriginalNames||(this.m__scalarPropertyOriginalNames=t.scalarProperties.map((function(e){return e.originalName}))),this.m__scalarPropertyOriginalNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyUpdateable",{get:function(){return this.m__scalarPropertyUpdateable||(this.m__scalarPropertyUpdateable=t.scalarProperties.map((function(e){return 0===(2&e.behaviorFlags)}))),this.m__scalarPropertyUpdateable},enumerable:!0,configurable:!0})),t.navigationProperties&&t.navigationProperties.length>0&&Object.defineProperty(e.prototype,"_navigationPropertyNames",{get:function(){return this.m__navigationPropertyNames||(this.m__navigationPropertyNames=t.navigationProperties.map((function(e){return e.name}))),this.m__navigationPropertyNames},enumerable:!0,configurable:!0})},t.prototype.buildTrackUntrack=function(e,t){2&t.behaviorFlags&&(e.prototype.track=function(){return this.context.trackedObjects.add(this),this},e.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this})},t.prototype.buildMixin=function(e,t){if(4&t.behaviorFlags){var n=this.getFunction(t.name+"Custom");Z.applyMixin(e,n)}},t.prototype.getOnEventName=function(e){return"_"===e[0]?"_on"+e.substr(1):"on"+e},t.prototype.buildEvents=function(e,t){if(t.events)for(var n=0;n0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)&&(n=!0);var r=document.createElement("a");if(r.href=this.m_url,this.m_options.webApplication){var o=ae.embeddingPageOrigin+"="+e+"&"+ae.embeddingPageSessionInfo+"="+this.m_options.sessionKey;0===r.search.length||"?"===r.search?r.search="?"+ae.sessionContext+"="+encodeURIComponent(o):r.search=r.search+"&"+ae.sessionContext+"="+encodeURIComponent(o)}else n?0===r.hash.length||"#"===r.hash?r.hash="#"+t:r.hash=r.hash+"&"+t:0===r.search.length||"?"===r.search?r.search="?"+t:r.search=r.search+"&"+t;return r.href},t.prototype.init=function(){var e=this;window.addEventListener("message",this.m_onMessageHandler);var t=this._getIFrameSrc();return l.createPromise((function(n,r){var o=document.createElement("iframe");if(e.m_options.id&&(o.id=e.m_options.id,o.name=e.m_options.id),o.style.height=e.m_options.height,o.style.width=e.m_options.width,e.m_options.webApplication){var s=document.createElement("form");s.setAttribute("action",t),s.setAttribute("method","post"),s.setAttribute("target",o.name),e.m_options.container.appendChild(s);var c=document.createElement("input");c.setAttribute("type","hidden"),c.setAttribute("name","access_token"),c.setAttribute("value",e.m_options.webApplication.accessToken),s.appendChild(c);var u=document.createElement("input");u.setAttribute("type","hidden"),u.setAttribute("name","access_token_ttl"),u.setAttribute("value",e.m_options.webApplication.accessTokenTtl),s.appendChild(u),e.m_options.container.appendChild(o),s.submit()}else o.src=t,e.m_options.container.appendChild(o);e.m_timeoutId=window.setTimeout((function(){e.close();var t=Z.createRuntimeError(i.timeout,l._getResourceString(a.timeout),"EmbeddedSession.init");r(t)}),e.m_options.timeoutInMilliseconds),e.m_promiseResolver=n}))},t.prototype._invoke=function(e,t,n){this.m_enabled?(oe&&(n=oe(n)),this._sendMessageWithCallback(this.m_id++,e,n,(function(e){ie&&(e=ie(e));var n=e.Error;delete e.Error,t(n||0,e)}))):t(5001,null)},t.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler),window.clearTimeout(this.m_timeoutId),this.m_enabled=!1},t.prototype.getEventRegistration=function(e){return this.m_sessionEventManager||(this.m_sessionEventManager=new V(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},t.prototype._createRequestExecutorOrNull=function(){return new ce(this)},t.prototype._resolveRequestUrlAndHeaderInfo=function(){return l._createPromiseFromResult(null)},t.prototype._registerEventImpl=function(e,t){var n=this;return l.createPromise((function(r,o){n._sendMessageWithCallback(n.m_id++,ne.RegisterEventCommand,{EventId:e,TargetId:t},(function(){r(null)}))}))},t.prototype._unregisterEventImpl=function(e,t){var n=this;return l.createPromise((function(r,o){n._sendMessageWithCallback(n.m_id++,ne.UnregisterEventCommand,{EventId:e,TargetId:t},(function(){r()}))}))},t.prototype._onMessage=function(e){var t=this;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===e.source&&this.m_chosenOrigin===e.origin)){var n=e.data;if(n&&n[ne.CommandKey]===ne.ApiReadyCommand)!this.m_chosenWindow&&this._isValidDescendant(e.source)&&n[ne.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=e.source,this.m_chosenOrigin=e.origin,this._sendMessageWithCallback(this.m_id++,ne.GetAppContextCommand,null,(function(e){t._setupContext(e),window.clearTimeout(t.m_timeoutId),t.m_promiseResolver()})));else if(n&&n[ne.CommandKey]===ne.FireEventCommand){var r=n[ne.ParamsKey],o=r.EventId,i=r.TargetId,a=r.Data;if(this.m_sessionEventManager)for(var s=this.m_sessionEventManager.getHandlers(o,i),c=0;c0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=2){var s=t[n].message[1];s&&(r=a(s)?JSON.parse(s):s)}"undefined"!==typeof OSF&&OSF.AppTelemetry&&OSF.AppTelemetry.CallOnAppActivatedIfPending&&OSF.AppTelemetry.CallOnAppActivatedIfPending(),i.apply(null,[r])}else OfficeExtension.Utility.log("ActionProxy._handleMessage unknown message type "+t[n].messageType)}catch(e){throw function(e){var t=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t}(e);OfficeExtension.Utility.log(t)}(e),e}return OfficeExtension.Utility._createPromiseFromResult(null)}function a(e){return"string"===typeof e&&"{"===e[0]}function s(){try{Microsoft.Office.WebExtension.onReadyInternal().then((function(){return function(){if("undefined"!==typeof OSF&&OSF.DDA&&OSF.DDA.RichApi&&OSF.DDA.RichApi.richApiMessageManager)return(new OfficeExtension.ClientRequestContext).eventRegistration.register(5,"",i)}()})).then((function(){var e=OSF._OfficeAppFactory.getHostInfo();return!0===e.isDialog||"web"===e.hostPlatform&&"word"!==e.hostType&&"excel"!==e.hostType?void 0:function(){var e=new OfficeExtension.ClientRequestContext,t=OfficeCore.AddinInternalService.newObject(e);return e._customData="WacPartition",t.notifyActionHandlerReady(),e.sync()}()}))}catch(e){}}!function(){OfficeExtension.Utility.log("ActionProxy.initOnce"),"undefined"!=typeof e.actions&&function(e){n=e}(e.actions._association),"undefined"!==typeof document&&(document.readyState&&"loading"!==document.readyState?(OfficeExtension.Utility.log("ActionProxy.initOnce: document.readyState is not loading state"),s()):document.addEventListener&&document.addEventListener("DOMContentLoaded",(function(){OfficeExtension.Utility.log("ActionProxy.initOnce: DOMContentLoaded event triggered"),s()}))),OfficeExtension.HostBridge.onInited((function(e){!function(e){e.addHostMessageHandler((function(e){3===e.type&&i(e.message)}))}(e)}))}()}(t||(t={}))}(Office||(Office={})),function(e){!function(e){function t(){var e=new OfficeCore.RequestContext;return"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e._customData="WacPartition"),e}e.areShortcutsInUse=function(e){return __awaiter(this,void 0,void 0,(function(){var n,r,o,i,a;return __generator(this,(function(s){switch(s.label){case 0:return n=t(),r=OfficeCore.ActionService.newObject(n),o=r.areShortcutsInUse(e),[4,n.sync()];case 1:for(s.sent(),i=[],a=0;a0&&Array.isArray(n[0])&&n.length*n[0].length>1500&&d()){var o=Math.max(1,Math.round(1500/n[0].length));e._ValidateArraySize(n.length,n[0].length);for(var i=0;in.length&&(a=n.length-i);var s=e.getRow(i).untrack().getBoundingRect(e.getRow(i+a-1).untrack()).untrack(),c=n.slice(i,i+a);F(s,t,c,null!=r?r:0)}return!0}return!1}function u(e){return OfficeExtension.Utility.isSetSupported("ExcelApi",e.toString())}function d(){return u(1.3)}function f(e){return!("undefined"===typeof window||!window.Office||!window.Office.context)&&window.Office.context.platform===e}e.icons={},["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"].map((function(t,n){var r=o(t);e.icons[r]=[],c[n].map((function(n,i){n=o(n);var a={set:t,index:i};e.icons[r].push(a),e.icons[r][n]=a}))})),function(e){e.NotStarted="notStarted",e.Running="running",e.Succeeded="succeeded",e.Failed="failed"}(i||(i={})),function(e){e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NoContent=204]="NoContent",e[e.HighestSuccessCode=299]="HighestSuccessCode",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout"}(a||(a={})),function(e){e.Close="Session.close",e.CommitChanges="Session.commitChanges",e.Create="Session.resolveRequestUrlAndHeaderInfo",e.Refresh="Session.refreshSession"}(s=e.SessionOperation||(e.SessionOperation={}));var p=function(){function e(e,t,n){var r=void 0===n?{}:n,o=r.persistChanges,i=void 0===o||o,a=r.commitExplicitly,s=void 0===a||a;this.m_requestId="",this.m_workbookUrl=e?this.ensureUrlFormatEndWithSlash(e):"",this.m_requestHeaders=t||{},this.m_persistChanges=i,this.m_commitExplicitly=s}return Object.defineProperty(e.prototype,"requestId",{get:function(){return this.m_requestId},enumerable:!0,configurable:!0}),e.prototype.close=function(){var t=this;if(this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)){var n={method:"POST",url:this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url)+e.CLOSE_SESSION,headers:this.m_requestUrlAndHeaderInfo.headers,body:""};return OfficeExtension.HttpUtility.sendRequest(n).then((function(n){if(n.statusCode!==a.NoContent)throw t.createErrorFromResponseInfo(n,s.Close);for(var r in t.m_requestUrlAndHeaderInfo=null,t.m_requestHeaders)if(r.toLowerCase()===e.WorkbookSessionIdHeaderNameLower){delete t.m_requestHeaders[r];break}}))}return OfficeExtension.Utility._createPromiseFromResult(null)},e.prototype.commitChanges=function(t){var n=this;if(void 0===t&&(t={}),!this.m_commitExplicitly)throw this.createError(a.InternalServerError,"Can not call commitChanges() if commitExplicitly is not set.",s.CommitChanges);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.CommitChanges);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.CommitChanges);var r=this.createCommitChangesRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(r).then((function(r){var o=r.statusCode;if(o===a.Accepted)return n.delay(e.POLL_DELAY).then((function(o){return n.pollResourceLocation(n.getHeaderIgnoreCase(r.headers,e.LOCATION_HEADER),s.CommitChanges,t)})).then((function(e){if(JSON.parse(e.body).status===i.Failed)throw n.createErrorFromResponseInfo(e,s.CommitChanges);return n.parseCooldownTime(e)}));if(o>=a.OK&&o<=a.HighestSuccessCode)return n.parseCooldownTime(r);throw n.createErrorFromResponseInfo(r,s.CommitChanges)}))},e.prototype._resolveRequestUrlAndHeaderInfo=function(t){var n=this;if(void 0===t&&(t={}),this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(this.getHeaderIgnoreCase(this.m_requestHeaders,e.WorkbookSessionIdHeaderNameLower))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);var r=this.createAsyncGraphSessionRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(r).then((function(r){if(n.m_requestId=n.getHeaderIgnoreCase(r.headers,e.REQUEST_ID_HEADER),r.statusCode!==a.Accepted&&r.statusCode!==a.Created)throw n.createErrorFromResponseInfo(r,s.Create);return r.statusCode===a.Created?(n.formatRequestUrlAndHeaderInfo(r),n.m_requestUrlAndHeaderInfo):n.delay(e.POLL_DELAY).then((function(o){return n.pollResourceLocation(n.getHeaderIgnoreCase(r.headers,e.LOCATION_HEADER),s.Create,t)})).then((function(r){var o=JSON.parse(r.body);if(o.status===i.Failed)throw n.createErrorFromResponseInfo(r,s.Create);var a={method:"GET",url:o.resourceLocation,headers:__assign({},t,{Authorization:n.getHeaderIgnoreCase(n.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(a).then((function(e){return n.formatRequestUrlAndHeaderInfo(e),n.m_requestUrlAndHeaderInfo}))}))}))},e.prototype.refreshSession=function(){var e=this;if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.Refresh);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.Refresh);var t=this.createRefreshSessionRequestInfo();return OfficeExtension.HttpUtility.sendRequest(t).then((function(t){if(t.statusCode!=a.NoContent)throw e.createErrorFromResponseInfo(t,s.Refresh);return OfficeExtension.Utility._createPromiseFromResult(null)}))},e.prototype.getHeaderIgnoreCase=function(e,t){var n=Object.keys(e).filter((function(e){return e.toLowerCase()===t.toLowerCase()}));return n.length>0?e[n[0]]:void 0},e.prototype.createCommitChangesRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.COMMIT_CHANGES,r={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,r),OfficeExtension.Utility._copyHeaders(t,r),r[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:r,body:{}}},e.prototype.createAsyncGraphSessionRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.CREATE_SESSION,r={};return OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,r),OfficeExtension.Utility._copyHeaders(t,r),r[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,r[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:r,body:{persistChanges:this.m_persistChanges,commitExplicitly:this.m_commitExplicitly}}},e.prototype.createRefreshSessionRequestInfo=function(){var t=this.getCorrectGraphVersionUrl()+e.REFRESH_SESSION,n={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,n),n[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,{url:t,method:"POST",headers:n,body:{}}},e.prototype.getCorrectGraphVersionUrl=function(){return this.m_workbookUrl.replace(new RegExp("graph.microsoft.com/.*?/"),"graph.microsoft.com/"+e.ASYNC_API_GRAPH_VERSION+"/")},e.prototype.pollResourceLocation=function(t,n,r,o){var s=this;if(void 0===r&&(r={}),void 0===o&&(o=0),o>=e.MAX_POLL_ATTEMPTS)throw this.createError(a.InternalServerError,"Timout while polling for the resource location.",n);var c={method:"GET",url:t,headers:__assign({},r,{Authorization:this.getHeaderIgnoreCase(this.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(c).then((function(c){if(c.statusCode!==a.OK)return s.pollResourceLocation(t,n,r,o+1);switch(JSON.parse(c.body).status){case i.Succeeded:case i.Failed:return c;case i.NotStarted:case i.Running:return s.delay(e.POLL_DELAY).then((function(e){return s.pollResourceLocation(t,n,r,o+1)}));default:throw s.createErrorFromResponseInfo(c,n)}}))},e.prototype.parseCooldownTime=function(t){var n=this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER);return n?1e3*parseInt(n):e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER},e.prototype.formatRequestUrlAndHeaderInfo=function(t){if(t.statusCode!==a.OK&&t.statusCode!==a.Created)throw this.createErrorFromResponseInfo(t,s.Create);var n=JSON.parse(t.body).id,r={};OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,r),r[e.WorkbookSessionIdHeaderName]=n,this.m_requestUrlAndHeaderInfo={url:this.getCorrectGraphVersionUrl(),headers:r}},e.prototype.ensureUrlFormatEndWithSlash=function(e){return"/"!==e.charAt(e.length-1)&&(e+="/"),e},e.prototype.delay=function(e){return new OfficeExtension.CoreUtility.Promise((function(t,n){return setTimeout((function(){return t()}),e)}))},e.prototype.createErrorFromResponseInfo=function(t,n){var r=OfficeExtension.Utility._parseErrorResponse(t),o={retryAfter:this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER),responseBody:OfficeExtension.Utility._parseErrorResponseBody(t)};return OfficeExtension.Utility.createRuntimeError(r.errorCode,r.errorMessage,n,t.statusCode,o)},e.prototype.createError=function(e,t,n){return OfficeExtension.Utility.createRuntimeError(""+e,t,n)},e.WorkbookSessionIdHeaderName="Workbook-Session-Id",e.WorkbookSessionIdHeaderNameLower="workbook-session-id",e.ASYNC_API_GRAPH_VERSION="beta",e.POLL_DELAY=1e4,e.MAX_POLL_ATTEMPTS=10,e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER=1e4,e.LOCATION_HEADER="location",e.AUTHORIZATION_HEADER="authorization",e.REQUEST_ID_HEADER="request-id",e.RETRY_AFTER_HEADER="retry-after",e.PREFER_HEADER="Prefer",e.PREFER_HEADER_VAL="respond-async",e.CONTENT_TYPE_HEADER="Content-Type",e.CONTENT_TYPE_HEADER_VAL="application/json",e.CLOSE_SESSION="closeSession",e.COMMIT_CHANGES="commitChanges",e.CREATE_SESSION="createSession",e.REFRESH_SESSION="refreshSession",e}();e.Session=p;var h=function(t){function n(n){var r=t.call(this,n)||this;return r.m_workbook=_(e.Workbook,r),r._rootObject=r.m_workbook,r._rootObjectPropertyName="workbook",r}return __extends(n,t),n.prototype._processOfficeJsErrorResponse=function(e,t){5004===e&&(t.ErrorCode=W.invalidOperationInCellEditMode,t.HttpStatusCode=400,t.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode))},Object.defineProperty(n.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"runtime",{get:function(){return this.workbook._Runtime},enumerable:!0,configurable:!0}),n}(OfficeCore.RequestContext);e.RequestContext=h;var m=function(){function e(){}return e.enableMacroRecordingEvent=function(e){OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=!0;var t=function(e){return e.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent]="true",e.workbook.onRecordingStateChangedEvent.add((function(e){return OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=e.recording,OfficeExtension.Utility._createPromiseFromResult(null)})),OfficeExtension.Utility._createPromiseFromResult(null)};return void 0!==e&&null!==e?t(e):y((function(e){return t(e)}))},e}();function g(e,t){var n=e;n.delayForCellEdit&&OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")?t._requestFlagModifier|=64:t._requestFlagModifier&=-65,n._makerSafe&&(t._requestFlagModifier|=1024)}function y(t,n){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,(function(t){return new e.RequestContext(t)}),g)}function v(e){var t={BindingColumnCount:e.bindingColumnCount,BindingId:e.bindingId,BindingRowCount:e.bindingRowCount,bindingType:e.bindingType,HasHeaders:e.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function O(e,t){var n;return n=null==e.headers?e.rows:e,void 0===(n=window.OSF.DDA.DataCoercion.coerceData(n,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]))?null:n}function b(e){if(!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version))return!1;var t=window.Office.context.diagnostics.platform.toLowerCase();if("officeonline"===t)return!1;var n=e[t];null==n&&(n=e.general);var r=window.Office.context.diagnostics.version,o=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(r);if(o){var i=parseInt(o[1]),a=parseInt(o[2]),s=parseInt(o[3]);if(i0?i=n.getOffsetRange(r,o):(i=n,a=r,s=o),1===Math.abs(t)?i:i.getBoundingRect(n.getOffsetRange(r*t+a,o*t+s))},t}();e.RangeCustom=M,function(t){t.Range_HandleResult=function(e,t){P(t.isEntireColumn)||(e.m_isEntireColumn=t.isEntireColumn),P(t.isEntireRow)||(e.m_isEntireRow=t.isEntireRow)},t.Range_GetColumnsAfter=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsAfter",n,t.getLastColumn(),0,1)})},t.Range_GetColumnsBefore=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsBefore",n,t.getColumn(0),0,-1)})},t.Range_GetResizedRange=function(e,t,n){return d()?{handled:!1,result:null}:(e._ensureInteger(t,"getResizedRange"),e._ensureInteger(n,"getResizedRange"),{handled:!0,result:(t>=0&&n>=0?e:e.getCell(0,0)).getBoundingRect(e.getLastCell().getOffsetRange(t,n))})},t.Range_GetRowsAbove=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getRowsAbove",n,t.getRow(0),-1,0)})},t.Range_GetRowsBelow=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:this._getAdjacentRange("getRowsBelow",n,t.getLastRow(),1,0)})},t.Range_Formulas_Set=function(e,t){return e.m_formulas=t,l(e,"Formulas",t)?{handled:!0}:{handled:!1}},t.Range_FormulasLocal_Set=function(e,t){return e.m_formulasLocal=t,l(e,"FormulasLocal",t)?{handled:!0}:{handled:!1}},t.Range_FormulasR1C1_Set=function(e,t){return e.m_formulasR1C1=t,l(e,"FormulasR1C1",t)?{handled:!0}:{handled:!1}},t.Range_NumberFormat_Set=function(e,t){return e.m_numberFormat=t,l(e,"NumberFormat",t,T(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_Values_Set=function(e,t){return e.m_values=t,l(e,"Values",t,T(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJson_Set=function(e,t){return e.m_valuesAsJson=t,l(e,"ValuesAsJson",t,T(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJsonLocal_Set=function(e,t){return e.m_valuesAsJsonLocal=t,l(e,"ValuesAsJsonLocal",t,T(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}}}(e._CC||(e._CC={})),function(t){t.SettingCollection_Add=function(n,r,o){return o=t._replaceDateWithStringDate(o),{handled:!0,result:A(e.Setting,n,"Add",0,[r,o],!1,!0,null,0)}},t.SettingCollection_SettingsChanged_EventArgsTransform=function(e,t){return{settings:e}}}(e._CC||(e._CC={})),function(e){function t(e){var t=JSON.stringify(e,(function(e,t){return this[e]instanceof Date?"Date("+this[e].getTime()+")":t}));return e=JSON.parse(t)}e._replaceDateWithStringDate=t,e.Setting_HandleResult=function(e,t){P(t.Value)||(t.Value=function(e){var t=JSON.stringify(e);return e=JSON.parse(t,(function(e,t){var n;return"string"===typeof t&&t&&t.length>6&&"Date("===t.slice(0,5)&&")"===t.slice(-1)&&(n=new Date(parseInt(t.slice(5,-1))))?n:t}))}(t.Value))},e.Setting_Value_Set=function(e,n){if(!E(n)){e.m_value=n;var r=t(n);return F(e,"Value",r,0),{handled:!0}}return{handled:!1}}}(e._CC||(e._CC={}));var w=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.NamedItemCollectionCustom=w,function(e){e.Binding_DataChanged_EventArgsTransform=function(e,t){return{binding:e}},e.Binding_SelectionChanged_EventArgsTransform=function(e,t){return{binding:e,columnCount:t.columnCount,rowCount:t.rowCount,startColumn:t.startColumn,startRow:t.startRow}}}(e._CC||(e._CC={}));var k=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.TableCollectionCustom=k,function(t){t.TableCollection_Changed_EventArgsTransform=function(t,n){var r,o=n;return null==o.valueBefore&&null==o.valueAfter||(r={valueBefore:o.valueBefore,valueAfter:o.valueAfter,valueTypeBefore:o.valueTypeBefore,valueTypeAfter:o.valueTypeAfter,valueAsJsonBefore:o.valueAsJsonBefore,valueAsJsonAfter:o.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:o.changeType,source:o.source,worksheetId:o.worksheetId,tableId:o.tableId,address:o.address,getRange:function(e){return I("TableChangedEventArgs.getRange",C,"1.8",S),e.workbook._GetRangeForEventByReferenceId(o.referenceId)},getRangeOrNullObject:function(e){return I("TableChangedEventArgs.getRangeOrNullObject",C,"1.8",S),e.workbook._GetRangeOrNullObjectForEventByReferenceId(o.referenceId)},details:r}}}(e._CC||(e._CC={})),function(t){t.Table_HandleIdResult=function(e,t){P(t.Id)||(t.Id=t.Id.toString())},t.Table_HandleResult=function(e,t){P(t.Id)||(t.Id=t.Id.toString())},t.Table_Changed_EventArgsTransform=function(t,n){var r,o=n;return null==o.valueBefore&&null==o.valueAfter||(r={valueBefore:o.valueBefore,valueAfter:o.valueAfter,valueTypeBefore:o.valueTypeBefore,valueTypeAfter:o.valueTypeAfter,valueAsJsonBefore:o.valueAsJsonBefore,valueAsJsonAfter:o.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:o.changeType,source:o.source,worksheetId:o.worksheetId,tableId:o.tableId,address:o.address,getRange:function(e){return I("TableChangedEventArgs.getRange",C,"1.8",S),e.workbook._GetRangeForEventByReferenceId(o.referenceId)},getRangeOrNullObject:function(e){return I("TableChangedEventArgs.getRangeOrNullObject",C,"1.8",S),e.workbook._GetRangeOrNullObjectForEventByReferenceId(o.referenceId)},details:r}},t.Table_SelectionChanged_EventArgsTransform=function(t,n){var r=n,o=!r.address||0===r.address.length;return{type:e.EventType.tableSelectionChanged,isInsideTable:!o,worksheetId:r.worksheetId,tableId:t.id,address:r.address}}}(e._CC||(e._CC={}));var N=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ChartCollectionCustom=N,function(t){t.ChartCollection_Add=function(t,n,r,o){if(!(r instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Charts.Add");return{handled:!1,result:null}}}(e._CC||(e._CC={})),function(t){t.Chart_SetData=function(t,n,r){if(!(n instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Chart.setData");return{handled:!1}}}(e._CC||(e._CC={}));var j=function(){function e(){}return e.prototype.load=function(e){return R(this,e),this},e}();e.ChartFillCustom=j;var U=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.VisualCollectionCustom=U,function(e){e.VisualCollection_AgaveVisualUpdate_EventArgsTransform=function(e,t){var n=t;return{type:n.type,payload:n.payload}}}(e._CC||(e._CC={})),function(t){t.Visual_ChangeNotification_EventArgsTransform=function(t,n){var r=n;return{targetId:r.targetId,changeType:r.changeType,payload:r.payload,type:e.EventType.visualChange}}}(e._CC||(e._CC={}));var L=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.PivotTableCollectionCustom=L,function(t){t.PivotLayout_GetColumnLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetColumnLabelRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataBodyRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetDataBodyRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataHierarchy=function(t,n){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:(I("PivotLayout.getDataHierarchy",C,"1.9",S),{handled:!0,result:A(e.DataPivotHierarchy,t,"GetDataHierarchy",0,[n],!1,!1,null,0)})},t.PivotLayout_GetFilterAxisRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetFilterAxisRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRowLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:A(e.Range,t,"GetRowLabelRange",0,[],!1,!1,null,0)}}}(e._CC||(e._CC={})),function(e){e.PivotField_SortByLabels=function(e,t){return"string"===typeof t&&(t="ascending"===t.toLowerCase()),D(e,"SortByLabels",0,[t],0,0),{handled:!0}}}(e._CC||(e._CC={})),function(t){t.NumberFormattingService_GetFormatter=function(t,n){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(I("NumberFormatting.GetFormatter","NumberFormatting","1.1",S),{handled:!0,result:A(e.NumberFormatter,t,"GetFormatter",0,[n],!1,!1,null,0)})}}(e._CC||(e._CC={})),function(e){e.NumberFormatter_Format=function(e,t){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(I("NumberFormatter.Format","NumberFormatting","1.1",S),{handled:!0,result:D(e,"Format",0,[t],0,0)})}}(e._CC||(e._CC={}));var H=function(){function n(){}return n.register=function(n,r){return I("CustomFunctionManager.register","CustomFunctions","1.3",S),t({delayForCellEdit:!0},(function(t){return e.CustomFunctionManager.newObject(t).register(n,r)}))},n.getStatus=function(){return I("CustomFunctionManager.register","CustomFunctions","1.3",S),t({delayForCellEdit:!0},(function(t){var n=e.CustomFunctionManager.newObject(t).load("status");return t.sync().then((function(){return n.status}))}))},n}();e.CustomFunctionManagerCustom=H,function(e){e.CustomFunctionManager_StaticCustomize=function(e){e.register=H.register,e.getStatus=H.getStatus}}(e._CC||(e._CC={})),function(e){e.Style_TextOrientation_Set=function(e,t){return e.m_textOrientation=t,F(e,"Orientation",t,0),{handled:!0}}}(e._CC||(e._CC={})),function(e){e.InternalTest_Test1Event_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}},e.InternalTest_TestEvent_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}}}(e._CC||(e._CC={}));var B=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.CommentCollectionCustom=B;var W,G=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ShapeCollectionCustom=G,function(e){e.accessDenied="AccessDenied",e.apiNotFound="ApiNotFound",e.conflict="Conflict",e.emptyChartSeries="EmptyChartSeries",e.filteredRangeConflict="FilteredRangeConflict",e.formulaLengthExceedsLimit="FormulaLengthExceedsLimit",e.generalException="GeneralException",e.inactiveWorkbook="InactiveWorkbook",e.insertDeleteConflict="InsertDeleteConflict",e.invalidArgument="InvalidArgument",e.invalidBinding="InvalidBinding",e.invalidOperation="InvalidOperation",e.invalidReference="InvalidReference",e.invalidSelection="InvalidSelection",e.itemAlreadyExists="ItemAlreadyExists",e.itemNotFound="ItemNotFound",e.mergedRangeConflict="MergedRangeConflict",e.nonBlankCellOffSheet="NonBlankCellOffSheet",e.notImplemented="NotImplemented",e.openWorkbookLinksBlocked="OpenWorkbookLinksBlocked",e.operationCellsExceedLimit="OperationCellsExceedLimit",e.pivotTableRangeConflict="PivotTableRangeConflict",e.powerQueryRefreshResourceChallenge="PowerQueryRefreshResourceChallenge",e.rangeExceedsLimit="RangeExceedsLimit",e.refreshWorkbookLinksBlocked="RefreshWorkbookLinksBlocked",e.requestAborted="RequestAborted",e.responsePayloadSizeLimitExceeded="ResponsePayloadSizeLimitExceeded",e.unsupportedFeature="UnsupportedFeature",e.unsupportedFillType="UnsupportedFillType",e.unsupportedOperation="UnsupportedOperation",e.unsupportedSheet="UnsupportedSheet",e.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"}(W=e.ErrorCodes||(e.ErrorCodes={})),e.Interfaces||(e.Interfaces={});new OfficeExtension.LibraryBuilder({metadata:{version:"1.0.0",name:"Excel",defaultApiSetName:"ExcelApi",hostName:"Excel",apiSets:[["1.19","ExcelApiUndo"],["1.1","Recorder"],["99.9"],["1.4","ExcelApiUndo"],["1.8"],["1.9"],["1.11"],["1.18"],["1.6"],["1.6","ExcelApiUndo"],["1.7"],["1.1","ExcelApiUndo"],["1.2"],["1.3"],["1.4"],["1.5"],["1.10"],["1.14"],["1.1","ExcelApiOnline"],["1.1","CustomFunctions"],["1.1","WACOperationEvents"],["1.3","ExcelApiUndo"],["1.13"],["1.16"],["1.8","ExcelApiUndo"],["1.16","ExcelApiUndo"],["1.12"],["1.2","ExcelApiOnline"],["1.2","ExcelApiUndo"],["1.17"],["1.7","ExcelApiUndo"],["1.10","ExcelApiUndo"],["1.14","ExcelApiUndo"],["1.15","ExcelApiUndo"],["1.15"],["1.17","ExcelApiUndo"],["99.99","ExcelApiUndo"],["1.9","ExcelApiUndo"],["1.11","ExcelApiUndo"],["1.12","ExcelApiUndo"],["1.13","ExcelApiUndo"],["1.18","ExcelApiUndo"]],strings:[],enumTypes:[["UndoChangeType",["undoAction","redoAction","undoOrRedoCleared","undoGroupAdded"]],["SDX",["guidedReapply"]],["BusinessBarEntryType",[],{officeScriptsRunningStatus:0,msFormsDataSyncRunningStatus:1}],["FormulaReferenceStyle",["a1","r1C1"]],["NavigationObjectType",["table","pivotTable","chart","shape","namedRange"]],["UserActivityType",["none","insertSheet","deleteSheet","renameSheet","changeCell","insertRow","insertColumn","deleteRow","deleteColumn","insertPartialRow","insertPartialColumn","insertPartialColumnRightToLeft","deletePartialRow","deletePartialColumn","deletePartialColumnRightToLeft","move","sort","mergeCells","unmergeCells","unknownOperation","genericEdit"]],["LineageEndOfLogStatus",["loadInProgress","success","endOfLog","purged","trimmed","unsupported","cleared","error"]],["LineageLoadType",["new","next","previous","latest"]],["LoadToType",["connectionOnly","table","pivotTable","pivotChart"]],["QueryError",["unknown","none","failedLoadToWorksheet","failedLoadToDataModel","failedDownload","failedToCompleteDownload"]],["RangeOptimizationType",["other","numberFormat","textAlignment","textProperties","cellBorder","fillColor","sheetProtection","rowHeight","rowVisibility"]],["WorkbookLinksHardToFindMessages",["none","containsDefinedNames","hiddenOrVeryHiddenSheet","hiddenFloatingObjects","lockedFloatingObjectsThroughVba","protectedSheet","containsConditionalFormatting","containsDataValidation","hiddenRowsAndColumns"]],["WorkbookLinksIconState",["ok","moreInfo","warning"]],["WorkbookLinksRefreshSettings",["ask","always","never"]],["WorkbookConditionalFormattingRulesManagerScope",["defaultScope","selectedRange","activatedWorksheet","activatedTable","activatedPivotTable"]],["WorkbookLinksRefreshMode",["manual","automatic"]],["HelpTopic",["showChanges","guidedReapply","externalCodeServiceDiagnostics"]],["DocumentTaskChangeAction",[],{unknown:"unknown",create:"create",assign:"assign",unassign:"unassign",unassignAll:"unassignAll",setSchedule:"setSchedule",setPercentComplete:"setPercentComplete",setPriority:"setPriority",remove:"remove",restore:"restore",setTitle:"setTitle",undo:"undo"}],["DataSourceType",["unknown","cube","localRange","localTable","oledbDefault"]],["DateFilterCondition",["unknown","equals","before","beforeOrEqualTo","after","afterOrEqualTo","between","tomorrow","today","yesterday","nextWeek","thisWeek","lastWeek","nextMonth","thisMonth","lastMonth","nextQuarter","thisQuarter","lastQuarter","nextYear","thisYear","lastYear","yearToDate","allDatesInPeriodQuarter1","allDatesInPeriodQuarter2","allDatesInPeriodQuarter3","allDatesInPeriodQuarter4","allDatesInPeriodJanuary","allDatesInPeriodFebruary","allDatesInPeriodMarch","allDatesInPeriodApril","allDatesInPeriodMay","allDatesInPeriodJune","allDatesInPeriodJuly","allDatesInPeriodAugust","allDatesInPeriodSeptember","allDatesInPeriodOctober","allDatesInPeriodNovember","allDatesInPeriodDecember"]],["LabelFilterCondition",["unknown","equals","beginsWith","endsWith","contains","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between"]],["PivotFilterType",["unknown","value","manual","label","date"]],["TopBottomSelectionType",["items","percent","sum"]],["ValueFilterCondition",["unknown","equals","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between","topN","bottomN"]],["BuiltInPivotTableStyle",["none","light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","light22","light23","light24","light25","light26","light27","light28","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11","dark12","dark13","dark14","dark15","dark16","dark17","dark18","dark19","dark20","dark21","dark22","dark23","dark24","dark25","dark26","dark27","dark28"]],["BuiltInSlicerStyle",["light1","light2","light3","light4","light5","light6","other1","other2","dark1","dark2","dark3","dark4","dark5","dark6"]],["BuiltInTableStyle",["light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11"]],["ChartSeriesDimension",["categories","values","bubbleSizes"],{xvalues:"XValues",yvalues:"YValues"}],["PivotTableDateGroupBy",["invalid","bySeconds","byMinutes","byHours","byDays","byMonths","byQuarters","byYears"]],["PivotFilterTopBottomCriterion",["invalid","topItems","topPercent","topSum","bottomItems","bottomPercent","bottomSum"]],["SortBy",["ascending","descending"]],["AggregationFunction",["unknown","automatic","sum","count","average","max","min","product","countNumbers","standardDeviation","standardDeviationP","variance","varianceP"]],["ShowAsCalculation",["unknown","none","percentOfGrandTotal","percentOfRowTotal","percentOfColumnTotal","percentOfParentRowTotal","percentOfParentColumnTotal","percentOfParentTotal","percentOf","runningTotal","percentRunningTotal","differenceFrom","percentDifferenceFrom","rankAscending","rankDecending","index"]],["PivotAxis",["unknown","row","column","data","filter"]],["LinkedDataTypeRefreshMode",["unknown","manual","onLoad","periodic"]],["AxisType",["invalid","category","value","series"]],["AxisGroup",["primary","secondary"]],["AxisScaleType",["linear","logarithmic"]],["AxisCrosses",["automatic","maximum","minimum","custom"]],["AxisTickMark",["none","cross","inside","outside"]],["AxisTickLabelPosition",["nextToAxis","high","low","none"]],["TrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ChartAxisType",["invalid","category","value","series"]],["ChartAxisGroup",["primary","secondary"]],["ChartAxisScaleType",["linear","logarithmic"]],["ChartAxisPosition",["automatic","maximum","minimum","custom"]],["ChartAxisTickMark",["none","cross","inside","outside"]],["CalculationState",["done","calculating","pending"]],["ChartAxisTickLabelPosition",["nextToAxis","high","low","none"]],["ChartAxisDisplayUnit",["none","hundreds","thousands","tenThousands","hundredThousands","millions","tenMillions","hundredMillions","billions","trillions","custom"]],["ChartAxisTimeUnit",["days","months","years"]],["ChartBoxQuartileCalculation",["inclusive","exclusive"]],["ChartAxisCategoryType",["automatic","textAxis","dateAxis"]],["ChartBinType",["category","auto","binWidth","binCount"]],["ChartLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","grey25","grey50","grey75","automatic","roundDot"]],["ChartDataLabelPosition",["invalid","none","center","insideEnd","insideBase","outsideEnd","left","right","top","bottom","bestFit","callout"]],["ChartErrorBarsInclude",["both","minusValues","plusValues"]],["ChartErrorBarsType",["fixedValue","percent","stDev","stError","custom"]],["ChartMapAreaLevel",["automatic","dataOnly","city","county","state","country","continent","world"]],["ChartGradientStyle",["twoPhaseColor","threePhaseColor"]],["ChartGradientStyleType",["extremeValue","number","percent"]],["ChartTitlePosition",["automatic","top","bottom","left","right"]],["ChartLegendPosition",["invalid","top","bottom","left","right","corner","custom"]],["ChartMarkerStyle",["invalid","automatic","none","square","diamond","triangle","star","dot","dash","circle","plus","picture"],{x:"X"}],["ChartPlotAreaPosition",["automatic","custom"]],["ChartMapLabelStrategy",["none","bestFit","showAll"]],["ChartMapProjectionType",["automatic","mercator","miller","robinson","albers"]],["ChartParentLabelStrategy",["none","banner","overlapping"]],["ChartSeriesBy",["auto","columns","rows"]],["ChartDataSourceType",["localRange","externalRange","list","unknown"]],["ChartTextHorizontalAlignment",["center","left","right","justify","distributed"]],["ChartTextVerticalAlignment",["center","bottom","top","justify","distributed"]],["ChartTickLabelAlignment",["center","left","right"]],["ChartType",["invalid","columnClustered","columnStacked","columnStacked100","barClustered","barStacked","barStacked100","lineStacked","lineStacked100","lineMarkers","lineMarkersStacked","lineMarkersStacked100","pieOfPie","pieExploded","barOfPie","areaStacked","areaStacked100","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","line","pie","area","doughnut","radar","histogram","boxwhisker","pareto","regionMap","treemap","waterfall","sunburst","funnel"],{_3DColumnClustered:"3DColumnClustered",_3DColumnStacked:"3DColumnStacked",_3DColumnStacked100:"3DColumnStacked100",_3DBarClustered:"3DBarClustered",_3DBarStacked:"3DBarStacked",_3DBarStacked100:"3DBarStacked100",_3DPieExploded:"3DPieExploded",xyscatterSmooth:"XYScatterSmooth",xyscatterSmoothNoMarkers:"XYScatterSmoothNoMarkers",xyscatterLines:"XYScatterLines",xyscatterLinesNoMarkers:"XYScatterLinesNoMarkers",_3DAreaStacked:"3DAreaStacked",_3DAreaStacked100:"3DAreaStacked100",_3DColumn:"3DColumn",_3DLine:"3DLine",_3DPie:"3DPie",xyscatter:"XYScatter",_3DArea:"3DArea"}],["ChartUnderlineStyle",["none","single"]],["ChartDisplayBlanksAs",["notPlotted","zero","interplotted"]],["ChartPlotBy",["rows","columns"]],["ChartSplitType",["splitByPosition","splitByValue","splitByPercentValue","splitByCustomSplit"]],["ChartColorScheme",["colorfulPalette1","colorfulPalette2","colorfulPalette3","colorfulPalette4","monochromaticPalette1","monochromaticPalette2","monochromaticPalette3","monochromaticPalette4","monochromaticPalette5","monochromaticPalette6","monochromaticPalette7","monochromaticPalette8","monochromaticPalette9","monochromaticPalette10","monochromaticPalette11","monochromaticPalette12","monochromaticPalette13"]],["ChartTrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ShapeZOrder",["bringToFront","bringForward","sendToBack","sendBackward"]],["ShapeType",["unsupported","image","geometricShape","group","line"]],["ShapeScaleType",["currentSize","originalSize"]],["ShapeScaleFrom",["scaleFromTopLeft","scaleFromMiddle","scaleFromBottomRight"]],["ShapeFillType",["noFill","solid","gradient","pattern","pictureAndTexture","mixed"]],["ShapeFontUnderlineStyle",["none","single","double","heavy","dotted","dottedHeavy","dash","dashHeavy","dashLong","dashLongHeavy","dotDash","dotDashHeavy","dotDotDash","dotDotDashHeavy","wavy","wavyHeavy","wavyDouble"]],["PictureFormat",[],{unknown:"UNKNOWN",bmp:"BMP",jpeg:"JPEG",gif:"GIF",png:"PNG",svg:"SVG"}],["ShapeLineStyle",["single","thickBetweenThin","thickThin","thinThick","thinThin"]],["ShapeLineDashStyle",["dash","dashDot","dashDotDot","longDash","longDashDot","roundDot","solid","squareDot","longDashDotDot","systemDash","systemDot","systemDashDot"]],["ArrowheadLength",["short","medium","long"]],["ArrowheadStyle",["none","triangle","stealth","diamond","oval","open"]],["ArrowheadWidth",["narrow","medium","wide"]],["PremiumLicenseName",["python"]],["BindingType",["range","table","text"]],["BorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight","insideVertical","insideHorizontal","diagonalDown","diagonalUp"]],["BorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","double","slantDashDot"]],["BorderWeight",["hairline","thin","medium","thick"]],["CalculationMode",["automatic","automaticExceptTables","manual"]],["RuntimeCalculationMode",[],{undefined:0,automatic:1,automaticExceptTables:2,manual:3}],["CalculationType",["recalculate","full","fullRebuild"]],["ClearApplyTo",["all","formats","contents","hyperlinks","removeHyperlinks"]],["VisualCategory",["column","bar","line","area","pie","donut","scatter","bubble","statistical","stock","combo","hierarchy","surface","map","funnel","radar","waterfall","threeD","other"]],["VisualPropertyType",["object","collection","string","double","int","bool","enum","color"]],["VisualChangeType",["dataChange","propertyChange","genericChange","selectionChange"]],["BoolMetaPropertyType",["writeOnly","readOnly","hideEntireSubtreeUI","hideMeButShowChildrenUI","expandableUI","nextPropOnSameLine","hideLabel","showResetUI","hasOwnExpandableSection","nextPropOnSameLineFOTP","showResetUIFOTP","untransferable","ignoreDuringChangeChartType","notTriviallyUndoable","volatileEnum","exceptionCollection","metaOnly","showHideCollection","errorMessage","infoMessage"]],["ConditionalDataBarAxisFormat",["automatic","none","cellMidPoint"]],["ConditionalDataBarDirection",["context","leftToRight","rightToLeft"]],["ConditionalFormatDirection",["top","bottom"]],["ConditionalFormatType",["custom","dataBar","colorScale","iconSet","topBottom","presetCriteria","containsText","cellValue"]],["ConditionalFormatRuleType",["invalid","automatic","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalFormatIconRuleType",["invalid","number","percent","formula","percentile"]],["ConditionalFormatColorCriterionType",["invalid","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalTopBottomCriterionType",["invalid","topItems","topPercent","bottomItems","bottomPercent"]],["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"]],["ConditionalTextOperator",["invalid","contains","notContains","beginsWith","endsWith"]],["ConditionalCellValueOperator",["invalid","between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual"]],["ConditionalIconCriterionOperator",["invalid","greaterThan","greaterThanOrEqual"]],["ConditionalRangeBorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight"]],["ConditionalRangeBorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot"]],["ConditionalRangeFontUnderlineStyle",["none","single","double"]],["CustomFunctionType",["invalid","script","webService"]],["CustomFunctionMetadataFormat",["invalid","openApi"]],["DataValidationType",["none","wholeNumber","decimal","list","date","time","textLength","custom","inconsistent","mixedCriteria"]],["DataValidationOperator",["between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqualTo","lessThanOrEqualTo"]],["DataValidationAlertStyle",["stop","warning","information"]],["DeleteShiftDirection",["up","left"]],["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"]],["FilterDatetimeSpecificity",["year","month","day","hour","minute","second"]],["FilterOn",["bottomItems","bottomPercent","cellColor","dynamic","fontColor","values","topItems","topPercent","icon","custom"]],["FilterOperator",["and","or"]],["HorizontalAlignment",["general","left","center","right","fill","justify","centerAcrossSelection","distributed"]],["IconSet",["invalid","threeArrows","threeArrowsGray","threeFlags","threeTrafficLights1","threeTrafficLights2","threeSigns","threeSymbols","threeSymbols2","fourArrows","fourArrowsGray","fourRedToBlack","fourRating","fourTrafficLights","fiveArrows","fiveArrowsGray","fiveRating","fiveQuarters","threeStars","threeTriangles","fiveBoxes"]],["ImageFittingMode",["fit","fitAndCenter","fill"]],["InsertShiftDirection",["down","right"]],["NamedItemScope",["worksheet","workbook"]],["NamedItemType",["string","integer","double","boolean","range","error","array"]],["RangeUnderlineStyle",["none","single","double","singleAccountant","doubleAccountant"]],["SheetVisibility",["visible","hidden","veryHidden"]],["EventTriggerSource",["unknown","thisLocalAddin"]],["RangeValueType",["unknown","empty","string","integer","double","boolean","error","richValue"]],["KeyboardDirection",["left","right","up","down"]],["SearchDirection",["forward","backwards"]],["SortOrientation",["rows","columns"]],["SortOn",["value","cellColor","fontColor","icon"]],["SortDataOption",["normal","textAsNumber"]],["SortMethod",["pinYin","strokeCount"]],["VerticalAlignment",["top","center","bottom","justify","distributed"]],["MessageCategory",[],{none:0,customFunction:1,action:2,event:65536}],["MessageType",[],{none:0,testEvent:1,test1Event:2,worksheetDataChangedEvent:10,worksheetActivatedEvent:11,worksheetDeactivatedEvent:12,worksheetAddedEvent:13,worksheetSelectionChangedEvent:14,worksheetDeletedEvent:15,worksheetCalculatedEvent:16,worksheetFilteredEvent:17,worksheetFormatChangedEvent:18,worksheetRowSortedEvent:19,worksheetColumnSortedEvent:20,worksheetSingleClickedEvent:21,worksheetRowHiddenChangedEvent:22,worksheetFormulaChangedEvent:23,worksheetProtectionChangedEvent:24,worksheetNameChangedEvent:25,worksheetVisibilityChangedEvent:26,worksheetMovedEvent:27,worksheetNavigationObjectChangedEvent:28,worksheetRowHeightChangedEvent:29,workbookFormulaReferenceStyleChangedEvent:30,chartAddedEvent:50,chartActivatedEvent:51,chartDeactivatedEvent:52,chartDeletedEvent:53,tableSelectionChangedEvent:100,tableDataChangedEvent:101,tableAddedEvent:102,tableDeletedEvent:103,tableFilteredEvent:104,agaveVisualUpdateEvent:150,customFunctionExecutionBeginEvent:200,customFunctionExecutionEndEvent:201,commentAddedEvent:250,commentDeletedEvent:251,commentChangedEvent:252,invocationMessage:1e3,cancellationMessage:1001,metadataMessage:1002,visualSelectionChangedEvent:2e3,visualChangeEvent:2001,visualTrackerModelChangedEvent:2002,shapeSelectionChangedEvent:2100,shapeActivatedEvent:2101,shapeDeactivatedEvent:2102,shapeAddedEvent:2103,shapeDeletedEvent:2104,workbookAutoSaveSettingChangedEvent:2200,wacoperationEvent:2201,recordingStateChangedEvent:2202,workbookActivatedEvent:2203,workbookNavigationObjectChangedEvent:2204,ribbonCommandExecutedEvent:2300,linkedDataTypeRefreshRequestCompletedEvent:2500,linkedDataTypeRefreshModeChangedEvent:2501,linkedDataTypeLinkedDataTypeAddedEvent:2502,linkedWorkbookWorkbookLinksChangedEvent:2600,linkedWorkbookRefreshCompletedEvent:2601,rangePickerSelectionChangedEvent:2700,rangePickerDeactivatedEvent:2701,lineageActivityUpdateAvailableEvent:2800,lineageActivityFilterUpdatedEvent:2801,lineageActivityLoadCompletedEvent:2802,pivotTableAddedEvent:2900,pivotTableDeletedEvent:2901,namedItemAddedEvent:3e3,namedItemDeletedEvent:3001,guidedReapplyManagerUpdateAvailableEvent:3100,vbaRecorderRecordingChangedEvent:3200,vbaRecorderRecordingChanged2Event:3202,workbookActionRecordedEvent:3201,externalCodeServiceDiagnosticsNewEntryEvent:3300,externalCodeServiceDiagnosticsFilterUpdatedEvent:3301,rangeValuesPreviewDismissedEvent:3400,applicationUndoChangedEvent:3500,appRuntimeVisibilityChangedEvent:65539,beforeCloseNotifiactionCancelledEvent:65540,augmentationLoopAnnotationAddedEvent:65541}],["InsertDeleteCellsShiftDirection",["none","shiftCellLeft","shiftCellUp","shiftCellRight","shiftCellDown"]],["DocumentPropertyType",["number","boolean","date","string","float"]],["EventSource",["local","remote"]],["DataChangeType",["unknown","rangeEdited","rowInserted","rowDeleted","columnInserted","columnDeleted","cellInserted","cellDeleted"]],["RowHiddenChangeType",["unhidden","hidden"]],["CommentChangeType",["commentEdited","commentResolved","commentReopened","replyAdded","replyDeleted","replyEdited"]],["EventType",["worksheetChanged","worksheetSelectionChanged","worksheetAdded","worksheetActivated","worksheetDeactivated","tableChanged","tableSelectionChanged","worksheetDeleted","chartAdded","chartActivated","chartDeactivated","chartDeleted","worksheetCalculated","visualSelectionChanged","agaveVisualUpdate","tableAdded","tableDeleted","tableFiltered","worksheetFiltered","shapeActivated","shapeDeactivated","visualChange","workbookAutoSaveSettingChanged","worksheetFormatChanged","ribbonCommandExecuted","worksheetRowSorted","worksheetColumnSorted","worksheetSingleClicked","worksheetRowHiddenChanged","recordingStateChangedEvent","commentAdded","commentDeleted","commentChanged","linkedDataTypeRefreshRequestCompleted","linkedDataTypeRefreshModeChanged","linkedDataTypeLinkedDataTypeAdded","worksheetFormulaChanged","workbookActivated","linkedWorkbookWorkbookLinksChanged","linkedWorkbookRefreshCompleted","worksheetProtectionChanged","worksheetNameChanged","worksheetVisibilityChanged","worksheetMoved","lineageActivityUpdateAvailable","lineageActivityFilterUpdated","lineageActivityLoadCompleted","shapeAdded","shapeDeleted","pivotTableAdded","pivotTableDeleted","namedItemAdded","namedItemDeleted","worksheetNavigationObjectChanged","workbookNavigationObjectChanged","worksheetRowHeightChanged","workbookFormulaReferenceStyleChanged","guidedReapplyManagerUpdateAvailable","vbaRecorderRecordingChanged","rangeValuesPreviewDismissed","annotationAdded","workbookActionRecorded","applicationUndoChanged","vbaRecorderRecordingChanged2"],{wacoperationEvent:"WACOperationEvent"}],["DocumentPropertyItem",["title","subject","author","keywords","comments","template","lastAuth","revision","appName","lastPrint","creation","lastSave","category","format","manager","company"]],["SubtotalLocationType",["atTop","atBottom","off"]],["PivotLayoutType",["compact","tabular","outline"]],["ProtectionSelectionMode",["normal","unlocked","none"]],["PageOrientation",["portrait","landscape"]],["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"]],["ReadingOrder",["context","leftToRight","rightToLeft"]],["BuiltInStyle",["normal","comma","currency","percent","wholeComma","wholeDollar","hlink","hlinkTrav","note","warningText","emphasis1","emphasis2","emphasis3","sheetTitle","heading1","heading2","heading3","heading4","input","output","calculation","checkCell","linkedCell","total","good","bad","neutral","accent1","accent1_20","accent1_40","accent1_60","accent2","accent2_20","accent2_40","accent2_60","accent3","accent3_20","accent3_40","accent3_60","accent4","accent4_20","accent4_40","accent4_60","accent5","accent5_20","accent5_40","accent5_60","accent6","accent6_20","accent6_40","accent6_60","explanatoryText"]],["PrintErrorType",["asDisplayed","blank","dash","notAvailable"]],["WorksheetPositionType",["none","before","after","beginning","end"]],["PrintComments",["noComments","endSheet","inPlace"]],["PrintOrder",["downThenOver","overThenDown"]],["PrintMarginUnit",["points","inches","centimeters"]],["HeaderFooterState",["default","firstAndDefault","oddAndEven","firstOddAndEven"]],["AutoFillType",["fillDefault","fillCopy","fillSeries","fillFormats","fillValues","fillDays","fillWeekdays","fillMonths","fillYears","linearTrend","growthTrend","flashFill"]],["GroupOption",["byRows","byColumns"]],["RangeCopyType",["all","formulas","values","formats","link"]],["LinkedDataTypeState",["none","validLinkedData","disambiguationNeeded","brokenLinkedData","fetchingData"]],["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"]],["ConnectorType",["straight","elbow","curve"]],["ContentType",["plain","mention"]],["SpecialCellType",["conditionalFormats","dataValidations","blanks","constants","formulas","sameConditionalFormat","sameDataValidation","visible"]],["SpecialCellValueType",["all","errors","errorsLogical","errorsNumbers","errorsText","errorsLogicalNumber","errorsLogicalText","errorsNumberText","logical","logicalNumbers","logicalText","logicalNumbersText","numbers","numbersText","text"]],["Placement",["twoCell","oneCell","absolute"]],["FillPattern",["none","solid","gray50","gray75","gray25","horizontal","vertical","down","up","checker","semiGray75","lightHorizontal","lightVertical","lightDown","lightUp","grid","crissCross","gray16","gray8","linearGradient","rectangularGradient"]],["ShapeTextHorizontalAlignment",["left","center","right","justify","justifyLow","distributed","thaiDistributed"]],["ShapeTextVerticalAlignment",["top","middle","bottom","justified","distributed"]],["ShapeTextVerticalOverflow",["overflow","ellipsis","clip"]],["ShapeTextHorizontalOverflow",["overflow","clip"]],["ShapeTextReadingOrder",["leftToRight","rightToLeft"]],["ShapeTextOrientation",["horizontal","vertical","vertical270","wordArtVertical","eastAsianVertical","mongolianVertical","wordArtVerticalRTL"]],["ShapeAutoSize",["autoSizeNone","autoSizeTextToFitShape","autoSizeShapeToFitText","autoSizeMixed"]],["CloseBehavior",["save","skipSave"]],["SaveBehavior",["save","prompt"]],["SlicerSortType",["dataSourceOrder","ascending","descending"]],["RibbonTab",["others","home","insert","draw","pageLayout","formulas","data","review","view","developer","addIns","help"]],["NumberFormatCategory",["general","number","currency","accounting","date","time","percentage","fraction","scientific","text","special","custom"]]],clientObjectTypes:[["UndoScope",0,0,0,[["close",0,0,0,2],["open",1,0,0,2]]],["RangeValuesPreview",4,0,0,[["_RegisterEventDismissed",0,0,0,2,0,1],["_UnregisterEventDismissed",0,0,0,2,0,1],["dismiss",0,2,0,4],["show",3,2,0,4]],0,0,0,[["Dismissed",0,0,"MessageType.rangeValuesPreviewDismissedEvent","this._ParentObject.id","_RegisterEventDismissed","_UnregisterEventDismissed"]]],["AugmentationLoop",0,0,0,[["_RegisterAnnotationAddedEvent",0,2,0,4],["_UnregisterAnnotationAddedEvent",0,2,0,4],["activateAnnotation",1,2,0,4],["submitSignal",1,2,0,4]],0,0,0,[["AnnotationAdded",0,0,"MessageType.augmentationLoopAnnotationAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAnnotationAddedEvent","_UnregisterAnnotationAddedEvent"]]],["ExternalCodeService",0,0,[["diagnostics","ExternalCodeServiceDiagnostics",2,0,0,4]]],["ExternalCodeServiceDiagnostics",0,[["id",2]],0,[["_RegisterEventNewEntry",0,0,0,2,0,1],["_UnregisterEventNewEntry",0,0,0,2,0,1],["clear",0,2,0,4],["fireStoredEntries",0,2,0,4],["_RegisterEventFilterUpdated",0,0,0,2,0,1],["_UnregisterEventFilterUpdated",0,0,0,2,0,1]],0,0,0,[["FilterUpdated",0,0,"MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent","this.id","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["NewEntry",0,0,"MessageType.externalCodeServiceDiagnosticsNewEntryEvent","this.id","_RegisterEventNewEntry","_UnregisterEventNewEntry"]]],["VbaRecorder",0,[["id",2]],0,[["_RegisterEventRecordingChanged",0,0,0,2,0,1],["_UnregisterEventRecordingChanged",0,0,0,2,0,1],["_RegisterEventRecordingChanged2",0,2,2,4],["_UnregisterEventRecordingChanged2",0,2,2,4]],0,0,0,[["RecordingChanged",0,0,"MessageType.vbaRecorderRecordingChangedEvent","this.id","_RegisterEventRecordingChanged","_UnregisterEventRecordingChanged"],["RecordingChanged2",0,2,"MessageType.vbaRecorderRecordingChanged2Event","this.id","_RegisterEventRecordingChanged2","_UnregisterEventRecordingChanged2"]]],["WorksheetOptimizationScanResult",0,[["allocatedCells",2],["optimizableCells",2]],[["ranges","RangeOptimizationCollection",18,0,0,4]]],["UserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity"],["GuidedReapplyManager",0,0,[["activities","UserActivityCollection",18,0,0,4],["summaryCardUserActivity","SummaryCardUserActivity",2,0,0,4]],[["openSavedFile",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["discardActivites",0,2,0,4],["reapplyActivity",1,2,0,4],["saveActivities",0,2,0,4]],0,0,0,[["UpdateAvailable",0,0,"MessageType.guidedReapplyManagerUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["BusinessBar",0,0,0,[["hide",2],["show",2]]],["UserActivity",0,[["activityId",2],["activityType",2],["author",2],["createdDateTime",10],["guid",2],["rangeAddress",2],["sheetName",2],["valueChangeData",2],["authorEmail",2],["locationDeleted",2]],[["highlightRangeAreas","RangeAreas",2,0,0,4]]],["LineageActivityCollection",1,0,0,[["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["clear",0,2,0,4],["getCount",0,2,0,4],["getState",0,2,0,4],["loadActivities",1,2,0,4],["loadLatestActivities",0,2,0,4],["loadNextActivities",0,2,0,4],["loadPreviousActivities",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventFilterUpdated",0,2,0,4],["_RegisterEventLoadCompleted",0,2,0,4],["_UnregisterEventFilterUpdated",0,2,0,4],["_UnregisterEventLoadCompleted",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity",[["FilterUpdated",0,0,"MessageType.lineageActivityFilterUpdatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["LoadCompleted",0,0,"MessageType.lineageActivityLoadCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventLoadCompleted","_UnregisterEventLoadCompleted"],["UpdateAvailable",0,0,"MessageType.lineageActivityUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["SummaryItemUserActivity",0,[["activityType",2],["rangeAddresses",2],["sheetName",2],["valueChangeData",2]]],["SummaryItemUserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SummaryItemUserActivity",1,2,0,4]],0,"SummaryItemUserActivity"],["SummaryCardUserActivity",0,[["authors",2],["currentUser",2],["displayTime",10],["numberOfDetailedCard",2],["summaryUnviewableData",2]],[["summaryItemUserActivities","SummaryItemUserActivityCollection",18,0,0,4]]],["AllowEditRange",0,[["address",1],["isPasswordProtected",3],["title",1]],0,[["delete"],["pauseProtection",1],["setPassword",1]]],["AllowEditRangeCollection",1,0,0,[["add",3],["getCount",0,2,0,4],["pauseProtection",1]],[["getItem","AllowEditRange",1,18,0,4],["getItemAt","AllowEditRange",1,2,0,4],["getItemOrNullObject","AllowEditRange",1,2,0,4]],0,"AllowEditRange"],["Query",0,[["loadedTo",2],["loadedToDataModel",2],["name",2],["refreshDate",10],["rowsLoadedCount",2],["error",2]]],["QueryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Query",1,18,0,4]],0,"Query"],["VisualTracker",0,[["id",2]],0,[["_RegisterEventModelChanged",0,2],["_UnregisterEventModelChanged",0,2],["requestTrackingAlteration",2,2,0,4]],0,0,0,[["ModelChanged",0,0,"MessageType.visualTrackerModelChangedEvent","this.id","_RegisterEventModelChanged","_UnregisterEventModelChanged"]]],["NumberFormatProperty",0,[["key",3],["currency",3],["dateTime",3],["dateTimeHasDayOfWeek",3],["dateTimeHasMonth",3],["dateTimeHasYear",3],["numeric",3],["percent",3],["text",3]]],["NumberFormatPropertyCollection",1,0,0,0,[["getItemAt","NumberFormatProperty",1,2,0,4]],0,"NumberFormatProperty"],["RangeOptimization",0,[["optimizationTypes",2],["range",2]]],["RangeOptimizationCollection",1,[["allocatedCells",2],["optimizableCells",2]],0,[["getCount",0,2,0,4]],[["getItemAt","RangeOptimization",1,2,0,4]],0,"RangeOptimization"],["WorksheetOptimization",0,0,0,0,[["optimize","WorksheetOptimizationResult",0,0,0,2],["scan","RangeOptimizationCollection",0,6,0,4],["scanExtended","WorksheetOptimizationScanResult",0,2,0,4]]],["WorksheetOptimizationResult",0,[["allocatedCells",2],["optimizedCells",2]]],["LinkedWorkbook",0,[["displayUrl",2,3],["fileName",3,3],["id",2],["longErrorDescription",2,3],["refreshEnabled",2,3],["refreshing",2,3],["statusMessage",2,3],["excelIconState",2,3],["hardToFindErrorMessages",2,3],["lastUpdated",10,3]],0,[["_RegisterRefreshCompletedEvent",0,0,3,2,0,1],["_UnregisterRefreshCompletedEvent",0,0,3,2,0,1],["breakLinks"],["changeSource",1,0,3],["findNextLink",0,2,3,4],["openWorkbook",0,2,3,4],["refresh"],["openChangeSourceDialog",0,0,3],["closeChangeSourceDialog",0,0,3]],0,0,0,[["RefreshCompleted",0,3,"MessageType.linkedWorkbookRefreshCompletedEvent","this.id","_RegisterRefreshCompletedEvent","_UnregisterRefreshCompletedEvent"]]],["LinkedWorkbookCollection",1,[["breakAllLinksEnabled",0,3],["refreshAllEnabled",0,3],["workbookLinksRefreshMode"],["workbookLinksRefreshSettings",0,3],["containsNonWorkbookLinks",0,3]],0,[["_RegisterWorkbookLinksChangedEvent",0,2,3,4],["_UnregisterWorkbookLinksChangedEvent",0,2,3,4],["breakAllLinks"],["getCount",0,2,3,4],["refreshAll"],["openEditLinksDialog",0,2,3,4]],[["getItem","LinkedWorkbook",1,18,0,4],["getItemAt","LinkedWorkbook",1,2,3,4],["getItemOrNullObject","LinkedWorkbook",1]],0,"LinkedWorkbook",[["WorkbookLinksChanged",0,3,"MessageType.linkedWorkbookWorkbookLinksChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWorkbookLinksChangedEvent","_UnregisterWorkbookLinksChangedEvent"]]],["DocumentTaskChange",0,[["type",2],["changedBy",2],["commentId",2],["createdDateTime",10],["id",2],["assignee",2],["undoChangeId",2],["priority",2],["title",2],["percentComplete",2],["startDateTime",10],["dueDateTime",10]],0,0,0,0,0,0,"Microsoft.ExcelServices.DocumentTaskChange",4],["DocumentTaskChangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","DocumentTaskChange",1,2,0,4]],0,"DocumentTaskChange"],["RangePicker",0,0,0,[["activate",1,0,0,2,0,4],["deactivate",0,0,0,2,0,4],["updateSelection",1,0,0,2,0,4],["updateSelectionWithNavigation",4,0,0,2,0,4],["_RegisterEventSelectionChanged",0,0,0,2,0,4],["_UnregisterEventSelectionChanged",0,0,0,2,0,4],["_RegisterEventDeactivated",0,2,0,4],["_UnregisterEventDeactivated",0,2,0,4]],0,0,0,[["Deactivated",0,0,"MessageType.rangePickerDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventDeactivated","_UnregisterEventDeactivated"],["SelectionChanged",0,0,"MessageType.rangePickerSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventSelectionChanged","_UnregisterEventSelectionChanged"]]],["DocumentTask",0,[["startAndDueDateTime"],["id",2],["percentComplete"],["priority"],["title"],["assignees",2],["completedBy",2],["completedDateTime",10],["createdBy",2],["createdDateTime",10]],[["changes","DocumentTaskChangeCollection",18,0,0,4],["comment","Comment",2,0,0,4]],[["assign",1],["unassign",1],["unassignAll"]]],["DocumentTaskCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","DocumentTask",1,18,0,4],["getItemOrNullObject","DocumentTask",1,2,0,4],["getItemAt","DocumentTask",1,2,0,4]],0,"DocumentTask"],["DataConnection",0,[["connectionString",2],["name",2],["commandText",2],["dataSourceType",2]]],["Runtime",0,[["enableEvents",1,5]]],["Application",0,[["calculationMode",1],["calculationEngineVersion",3,6],["calculationState",3,6],["decimalSeparator",3,7],["thousandsSeparator",3,7],["useSystemSeparators",3,7],["formatStaleValues",1,8]],[["iterativeCalculation","IterativeCalculation",35,6,0,4],["ribbon","Ribbon",35,6,0,4],["cultureInfo","CultureInfo",3,7,0,4],["undoScope","UndoScope",3,3,0,4]],[["calculate",1],["suspendApiCalculationUntilNextSync",0,1,9,2,0,10],["suspendScreenUpdatingUntilNextSync",0,0,6,2,0,10],["hasLicense",1,2,8,4],["redo",0,0,3,2],["explorePremiumLicense",1,2,8,4],["undo",0,0,3,2],["_RegisterEventUndoChanged",0,2,3,4],["_UnregisterEventUndoChanged",0,2,3,4]],[["createWorkbook","WorkbookCreated",1,10,5,0,0,"_GetWorkbookCreatedById"],["_GetWorkbookCreatedById","WorkbookCreated",1,2,5,4]],0,0,[["UndoChanged",0,3,"MessageType.applicationUndoChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUndoChanged","_UnregisterEventUndoChanged"]]],["IterativeCalculation",0,[["enabled",1],["maxIteration",1],["maxChange",1]]],["Workbook",0,[["name",3,11],["readOnly",3,5],["isDirty",1,6],["use1904DateSystem",1,8],["chartDataPointTrack",1,6],["usePrecisionAsDisplayed",1,6],["calculationEngineVersion",3,6],["autoSave",3,6],["previouslySaved",3,6],["showPivotFieldList",0,8,0,2,12],["formulaReferenceStyle",2,3]],[["worksheets","WorksheetCollection",19,0,0,4],["names","NamedItemCollection",19,0,0,4],["tables","TableCollection",19,0,0,4],["application","Application",2,0,0,4],["bindings","BindingCollection",19,0,0,4],["functions","Functions",2,13,0,4],["_V1Api","_V1Api",2,14,0,4],["pivotTables","PivotTableCollection",19,14,0,4],["settings","SettingCollection",19,15,0,4],["customXmlParts","CustomXmlPartCollection",19,16,0,4],["internalTest","InternalTest",2,9,0,4],["properties","DocumentProperties",35,11,0,4],["styles","StyleCollection",19,11,0,4],["protection","WorkbookProtection",3,11,0,4],["dataConnections","DataConnectionCollection",3,11,0,4],["_Runtime","Runtime",2,16,0,4],["comments","CommentCollection",19,17,0,4],["slicers","SlicerCollection",19,17,0,4],["tableStyles","TableStyleCollection",19,17,0,4],["pivotTableStyles","PivotTableStyleCollection",19,17,0,4],["slicerStyles","SlicerStyleCollection",19,17,0,4],["timelineStyles","TimelineStyleCollection",19,17,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["linkedDataTypes","LinkedDataTypeCollection",18,8,0,4],["queries","QueryCollection",18,18,0,4],["linkedWorkbooks","LinkedWorkbookCollection",18,19,0,4],["rangePicker","RangePicker",2,8,0,4,0,4],["lineageActivities","LineageActivityCollection",18,3,0,4],["businessBar","BusinessBar",2,8,0,4],["guidedReapply","GuidedReapplyManager",2,3,0,4],["vbaRecorder","VbaRecorder",2,8,0,4],["externalCodeService","ExternalCodeService",2,8,0,4],["augmentationLoop","AugmentationLoop",2,8,0,4]],[["_RemoveReference",1,2],["_GetObjectByReferenceId",1,2,0,4],["_GetObjectTypeNameByReferenceId",1,2,0,4],["_RemoveAllReferences",0,2],["_GetReferenceCount",0,2,0,4],["getIsActiveCollabSession",0,0,6],["registerCustomFunctions",7,0,20,8],["_SetOsfControlContainerReadyForCustomFunctions",0,0,20],["close",1,0,7],["save",1,0,7],["_RegisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_UnregisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_RegisterWACOperationEvent",0,2,21,4],["_UnregisterWACOperationEvent",0,2,21,4],["_RegisterRecordingStateChangedEvent",0,0,21,2,0,22],["_UnregisterRecordingStateChangedEvent",0,0,21,2,0,22],["_RegisterActivatedEvent",0,2,23],["_UnregisterActivatedEvent",0,2,23],["insertWorksheetsFromBase64",2,0,23],["enableOfficeScriptRecording",1,1,19],["recordAction",1,3,0,4],["focus",0,2,3,4],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["showHelp",1,2,3,4],["getLinkedEntityCellValue",1,2,24,4],["getThemeColors",0,2,8,4],["_RegisterEventFormulaReferenceStyleChanged",0,2,3,4],["_UnregisterEventFormulaReferenceStyleChanged",0,2,3,4],["notifySDXLoaded",1,2,3,4],["openConditionalFormattingRulesManager",1,0,3],["openNameManager",0,0,3],["_RegisterEventActionRecorded",0,2,2,4],["_UnregisterEventActionRecorded",0,2,2,4]],[["getSelectedRange","Range",0,10,0,4],["getActiveCell","Range",0,10,11,4],["_GetRangeForEventByReferenceId","Range",1,2,0,4],["_GetRangeOrNullObjectForEventByReferenceId","Range",1,2,0,4],["getActiveChart","Chart",0,2,6,4],["getActiveChartOrNullObject","Chart",0,2,6,4],["getSelectedRanges","RangeAreas",0,10,6,4],["_GetRangesForEventByReferenceId","RangeAreas",1,2,6,4],["_GetRangesOrNullObjectForEventByReferenceId","RangeAreas",1,2,6,4],["getActiveSlicer","Slicer",0,2,17,4],["getActiveSlicerOrNullObject","Slicer",0,2,17,4]],0,0,[["ActionRecorded",0,2,"MessageType.workbookActionRecordedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventActionRecorded","_UnregisterEventActionRecorded"],["Activated",0,23,"MessageType.workbookActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["AutoSaveSettingChanged",0,6,"MessageType.workbookAutoSaveSettingChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAutoSaveSettingChangedEvent","_UnregisterAutoSaveSettingChangedEvent"],["FormulaReferenceStyleChanged",0,3,"MessageType.workbookFormulaReferenceStyleChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFormulaReferenceStyleChanged","_UnregisterEventFormulaReferenceStyleChanged"],["NavigationObjectChanged",0,3,"MessageType.workbookNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["RecordingStateChangedEvent",0,21,"MessageType.recordingStateChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRecordingStateChangedEvent","_UnregisterRecordingStateChangedEvent"],["SelectionChanged",3,14,"_CC.office10EventIdDocumentSelectionChangedEvent","","",""],["WACOperationEvent",2,21,"MessageType.wacoperationEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWACOperationEvent","_UnregisterWACOperationEvent"],["_Message",3,11,"_CC.office10EventIdRichApiMessageEvent","","",""]]],["WorkbookProtection",0,[["protected",3]],0,[["protect",1],["unprotect",1]]],["WorkbookCreated",0,[["id",3]],0,[["open",0,2,0,4]]],["Worksheet",0,[["name",1],["id",3],["position",1],["visibility",1],["tabColor",1,11,0,2,25],["standardWidth",1,11],["standardHeight",3,11],["showGridlines",5,5,0,2,26],["showHeadings",5,5],["enableCalculation",1,6],["tabId",3,18]],[["charts","ChartCollection",83,0,0,4],["tables","TableCollection",83,0,0,4],["protection","WorksheetProtection",3,13,0,4],["pivotTables","PivotTableCollection",83,14,0,4],["names","NamedItemCollection",83,15,0,4],["freezePanes","WorksheetFreezePanes",3,11,0,4],["pageLayout","PageLayout",35,6,0,4],["visuals","VisualCollection",83,17,0,4],["shapes","ShapeCollection",83,6,0,4],["horizontalPageBreaks","PageBreakCollection",19,6,0,4],["verticalPageBreaks","PageBreakCollection",19,6,0,4],["autoFilter","AutoFilter",3,6,0,4],["slicers","SlicerCollection",19,17,0,4],["comments","CommentCollection",83,17,0,4],["customProperties","WorksheetCustomPropertyCollection",19,27,0,4],["namedSheetViews","NamedSheetViewCollection",18,19,0,4],["optimization","WorksheetOptimization",2,8,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["visualTracker","VisualTracker",2,28,0,4],["rangeValuesPreview","RangeValuesPreview",66,8,0,4]],[["delete"],["activate",0,2],["calculate",1,0,9],["_RegisterDataChangedEvent",0,0,11,2,0,10],["_UnregisterDataChangedEvent",0,0,11,2,0,10],["_RegisterActivatedEvent",0,0,11,2,0,1],["_UnregisterActivatedEvent",0,0,11,2,0,1],["_RegisterDeactivatedEvent",0,0,11,2,0,1],["_UnregisterDeactivatedEvent",0,0,11,2,0,1],["_RegisterSelectionChangedEvent",0,0,11,2,0,29],["_UnregisterSelectionChangedEvent",0,0,11,2,0,29],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["replaceAll",3,0,6],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,0,17,2,0,1],["_UnregisterRowSortedEvent",0,0,17,2,0,1],["_RegisterColumnSortedEvent",0,0,17,2,0,1],["_UnregisterColumnSortedEvent",0,0,17,2,0,1],["_RegisterSingleClickedEvent",0,0,17,2,0,1],["_UnregisterSingleClickedEvent",0,0,17,2,0,1],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["showOutlineLevels",2,0,17],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,0,30,2,0,1],["_RegisterEventVisibilityChanged",0,0,30,2,0,1],["_UnregisterEventNameChanged",0,0,30,2,0,1],["_UnregisterEventVisibilityChanged",0,0,30,2,0,1],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getRange","Range",1,10,0,4],["getUsedRange","Range",1,10,0,4],["getCell","Range",2,10,0,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getRangeByIndexes","Range",4,10,11,4],["getPrevious","Worksheet",1,10,16,4,0,"_GetSheetById"],["getPreviousOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNext","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNextOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["_GetSheetById","Worksheet",1,2,11,4],["copy","Worksheet",2,0,11,0,0,"_GetAnotherWorksheetById"],["_GetAnotherWorksheetById","Worksheet",1,0,11],["findAll","RangeAreas",2,10,6,4],["findAllOrNullObject","RangeAreas",2,10,6,4],["getRanges","RangeAreas",1,10,6,4],["getUsedRangeAreas","RangeAreas",1,0,3],["getRangeR1C1","Range",1,2,3,4],["getRangesR1C1","RangeAreas",1,2,3,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,0,3]],"workbook.worksheets",0,[["Activated",0,11,"MessageType.worksheetActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","this.id","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,11,"MessageType.worksheetDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","this.id","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","this.id","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","this.id","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","this.id","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["NavigationObjectChanged",0,3,"MessageType.worksheetNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","this.id","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","this.id","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","this.id","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","this.id","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,11,"MessageType.worksheetSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","this.id","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","this.id","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetCollection",1,0,0,[["getCount",1,2,15,4],["_RegisterAddedEvent",0,3,11],["_UnregisterAddedEvent",0,3,11],["_RegisterActivatedEvent",0,3,11],["_UnregisterActivatedEvent",0,0,11,2,0,29],["_RegisterDeactivatedEvent",0,0,11,2,0,29],["_UnregisterDeactivatedEvent",0,0,11,2,0,29],["_RegisterDeletedEvent",0,3,11],["_UnregisterDeletedEvent",0,3,11],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["_RegisterDataChangedEvent",0,3,6],["_UnregisterDataChangedEvent",0,3,6],["_RegisterSelectionChangedEvent",0,0,6,2,0,29],["_UnregisterSelectionChangedEvent",0,0,6,2,0,29],["addFromBase64",4,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,3,17],["_UnregisterRowSortedEvent",0,3,17],["_RegisterColumnSortedEvent",0,3,17],["_UnregisterColumnSortedEvent",0,3,17],["_RegisterSingleClickedEvent",0,0,17,2,0,29],["_UnregisterSingleClickedEvent",0,0,17,2,0,29],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,2,30,4],["_RegisterEventVisibilityChanged",0,2,30,4],["_UnregisterEventNameChanged",0,2,30,4],["_UnregisterEventVisibilityChanged",0,2,30,4],["_RegisterEventMoved",0,0,30,2,0,1],["_UnregisterEventMoved",0,0,30,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getItem","Worksheet",1,18,0,4],["add","Worksheet",1,8,0,2,0,0,29],["getActiveWorksheet","Worksheet",0,2,0,4],["getItemOrNullObject","Worksheet",1,2,15,4],["getFirst","Worksheet",1,10,16,4],["getLast","Worksheet",1,10,16,4]],0,"Worksheet",[["Activated",0,11,"MessageType.worksheetActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,11,"MessageType.worksheetAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,6,"MessageType.worksheetDataChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,11,"MessageType.worksheetDeletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["Moved",0,30,"MessageType.worksheetMovedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventMoved","_UnregisterEventMoved"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,6,"MessageType.worksheetSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetProtection",0,[["protected",3],["options",3],["canPauseProtection",3,19],["isPasswordProtected",3,19],["isPaused",3,19],["savedOptions",3,19]],[["allowEditRanges","AllowEditRangeCollection",19,19,0,4]],[["protect",2,1],["unprotect",1],["checkPassword",1,2,19,4],["pauseProtection",1,0,19],["resumeProtection",0,0,19],["setPassword",1,0,19],["updateOptions",1,0,19]]],["WorksheetFreezePanes",0,0,0,[["unfreeze"],["freezeAt",1],["freezeRows",1],["freezeColumns",1]],[["getLocation","Range",0,10,0,4],["getLocationOrNullObject","Range",0,10,0,4]]],["Range",14,[["numberFormat",5,0,0,2,31],["numberFormatLocal",1,11,0,2,31],["values",5,0,0,2,31],["text",3],["formulas",5,0,0,2,32],["formulasLocal",5,0,0,2,32],["rowIndex",3],["columnIndex",3],["rowCount",3],["columnCount",3],["address",3],["addressLocal",3],["cellCount",3],["_ReferenceId",2],["valueTypes",3],["formulasR1C1",5,13],["hidden",3,13],["rowHidden",1,13,0,2,32],["columnHidden",1,13,0,2,32],["isEntireColumn",3,11],["isEntireRow",3,11],["hyperlink",1,11,0,2,33],["style",1,11,0,2,32],["linkedDataTypeState",3,6],["hasSpill",3,27],["top",3,17],["left",3,17],["height",3,17],["width",3,17],["savedAsArray",3,27],["numberFormatCategories",3,27],["valuesAsJson",5,24],["valuesAsJsonLocal",5,24],["addressR1C1",2,3]],[["format","RangeFormat",35,0,0,4],["worksheet","Worksheet",2,0,0,4],["sort","RangeSort",3,13,0,4],["conditionalFormats","ConditionalFormatCollection",19,9,0,4],["dataValidation","DataValidation",35,5,0,4]],[["clear",1,0,0,2,0,32],["delete",1,0,0,2,0,34],["select",0,2],["_KeepReference",0,2],["merge",1,0,13,2,0,32],["unmerge",0,0,13],["_ValidateArraySize",2,2,14,4],["calculate",0,0,9],["showCard",0,0,11],["getImage",0,2,11,4],["replaceAll",3,0,6,2,0,32],["copyFrom",4,0,6,2,0,26],["convertToLinkedDataType",2,0,6],["convertDataTypeToText",0,0,6],["setDirty",0,0,6],["getCellProperties",1,0,6],["getRowProperties",1,0,6],["getColumnProperties",1,0,6],["setCellProperties",1,0,6],["setRowProperties",1,0,6],["setColumnProperties",1,0,6],["autoFill",2,0,6],["showTeachingCallout",2,0,6],["flashFill",0,0,6],["group",1,0,17],["ungroup",1,0,17],["showGroupDetails",1,0,17],["hideGroupDetails",1,0,17],["moveTo",1,0,7,2,0,26],["getDataClassificationIds",0,2,19,4]],[["getCell","Range",2,10,0,4],["getUsedRange","Range",1,10,0,4],["insert","Range",1,8,0,2,0,0,34],["getEntireColumn","Range",0,10,0,4],["getEntireRow","Range",0,10,0,4],["getOffsetRange","Range",2,10,0,4],["getRow","Range",1,10,0,4],["getColumn","Range",1,10,0,4],["getIntersection","Range",1,10,0,4],["getBoundingRect","Range",1,10,0,4],["getLastCell","Range",0,10,0,4],["getLastColumn","Range",0,10,0,4],["getLastRow","Range",0,10,0,4],["getIntersectionOrNullObject","Range",1,10,15,4],["getRowsAbove","Range",1,11,14,4],["getRowsBelow","Range",1,11,14,4],["getColumnsBefore","Range",1,11,14,4],["getColumnsAfter","Range",1,11,14,4],["getResizedRange","Range",2,11,14,4],["getVisibleView","RangeView",0,2,14,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getSurroundingRegion","Range",0,10,11,4],["getAbsoluteResizedRange","Range",2,10,11,4],["getTables","TableScopedCollection",1,6,6,4],["find","Range",2,10,6,4],["findOrNullObject","Range",2,10,6,4],["removeDuplicates","RemoveDuplicatesResult",2,8,6,2,0,0,33],["getSpecialCells","RangeAreas",2,10,6,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,6,4],["getSpillingToRange","Range",0,10,27,4],["getSpillParent","Range",0,10,27,4],["getSpillingToRangeOrNullObject","Range",0,10,27,4],["getSpillParentOrNullObject","Range",0,10,27,4],["getMergedAreas","RangeAreas",0,10,19,4],["getPivotTables","PivotTableScopedCollection",1,6,27,4],["getPrecedents","WorkbookRangeAreas",0,10,18,4],["getDirectPrecedents","WorkbookRangeAreas",0,10,27,4],["getDependents","WorkbookRangeAreas",0,10,35,4],["getDirectDependents","WorkbookRangeAreas",0,10,23,4],["getExtendedRange","Range",2,10,23,4],["getRangeEdge","Range",2,10,23,4],["getNumberFormatProperties","NumberFormatPropertyCollection",0,6,8,4],["getSurroundingDataRegion","Range",0,2,8,4],["getMergedAreasOrNullObject","RangeAreas",0,0,23,2,0,0,31]]],["RangeAreas",2,[["_ReferenceId",2],["address",3],["addressLocal",3],["areaCount",3],["cellCount",3],["isEntireColumn",3],["isEntireRow",3],["style",1],["addressR1C1",2,3]],[["areas","RangeCollection",19,0,0,4],["conditionalFormats","ConditionalFormatCollection",19,0,0,4],["format","RangeFormat",35,0,0,4],["dataValidation","DataValidation",35,0,0,4],["worksheet","Worksheet",2,0,0,4]],[["_KeepReference",0,2],["calculate"],["clear",1],["setDirty"],["copyFrom",4],["convertToLinkedDataType",2],["convertDataTypeToText"],["select",0,2,8]],[["getEntireColumn","RangeAreas",0,10,0,4],["getEntireRow","RangeAreas",0,10,0,4],["getIntersection","RangeAreas",1,10,0,4],["getIntersectionOrNullObject","RangeAreas",1,10,0,4],["getOffsetRangeAreas","RangeAreas",2,10,0,4],["getUsedRangeAreas","RangeAreas",1,10,0,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,10,0,4],["getTables","TableScopedCollection",1,6,0,4],["getSpecialCells","RangeAreas",2,10,0,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,0,4]]],["WorkbookRangeAreas",2,[["_ReferenceId",2],["addresses",3]],[["ranges","RangeCollection",19,0,0,4],["areas","RangeAreasCollection",19,0,0,4]],[["_KeepReference",0,2]],[["getRangeAreasBySheet","RangeAreas",1,10,0,4],["getRangeAreasOrNullObjectBySheet","RangeAreas",1,10,0,4]]],["RangeView",0,[["numberFormat",1],["values",1],["text",3],["formulas",1],["formulasLocal",1],["formulasR1C1",1],["valueTypes",3],["rowCount",3],["columnCount",3],["cellAddresses",3],["index",3],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["rows","RangeViewCollection",19,0,0,4]],0,[["getRange","Range",0,10,0,4]]],["RangeViewCollection",1,0,0,[["getCount",0,2,15,4]],[["getItemAt","RangeView",1,2,0,4]],0,"RangeView"],["SettingCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Setting",1,18,0,4],["add","Setting",2,9],["getItemOrNullObject","Setting",1,2,0,4]],0,"Setting",[["SettingsChanged",3,0,"_CC.office10EventIdSettingsChangedEvent","","",""]]],["Setting",8,[["key",3],["value",5],["_Id",2]],0,[["delete"]]],["NamedItemCollection",5,0,0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","NamedItem",1,18,0,4],["getItemOrNullObject","NamedItem",1,2,15,4],["add","NamedItem",3,8,15],["addFormulaLocal","NamedItem",3,0,15]],0,"NamedItem",[["Added",0,3,"MessageType.namedItemAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.namedItemDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["NamedItem",0,[["name",3],["type",3],["value",3],["visible",1],["_Id",2],["comment",1,15],["scope",3,15],["formula",1,11],["valueAsJson",3,24],["valueAsJsonLocal",3,24]],[["worksheet","Worksheet",2,15,0,4],["worksheetOrNullObject","Worksheet",2,15,0,4],["arrayValues","NamedItemArrayValues",3,11,0,4]],[["delete",0,0,15]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,15,4]]],["NamedItemArrayValues",0,[["values",3],["types",3],["valuesAsJson",3,24],["valuesAsJsonLocal",3,24]]],["Binding",0,[["id",3],["type",3]],0,[["getText",0,2,0,4],["delete",0,0,14]],[["getTable","Table",0,2,0,4],["getRange","Range",0,2,0,4]],0,0,[["DataChanged",3,14,"_CC.office10EventIdBindingDataChangedEvent","this.id","",""],["SelectionChanged",3,14,"_CC.office10EventIdBindingSelectionChangedEvent","this.id","",""]]],["BindingCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","Binding",1,18,0,4],["getItemAt","Binding",1,2,0,4],["add","Binding",3,8,14],["addFromNamedItem","Binding",3,0,14],["addFromSelection","Binding",2,0,14],["getItemOrNullObject","Binding",1,2,15,4]],0,"Binding"],["TableCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["_RegisterAddedEvent",0,0,6,2,0,1],["_UnregisterAddedEvent",0,0,6,2,0,1],["_RegisterDeletedEvent",0,0,6,2,0,1],["_UnregisterDeletedEvent",0,0,6,2,0,1],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1]],[["getItem","Table",1,18,0,4],["getItemAt","Table",1,2,0,4],["add","Table",2,8,0,2,0,0,33],["getItemOrNullObject","Table",1,2,15,4],["addQueryTable","Table",2,0,8]],0,"Table",[["Added",0,6,"MessageType.tableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",2,11,"MessageType.tableDataChangedEvent","this._eventTargetId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Deleted",0,6,"MessageType.tableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this._eventTargetId","_RegisterFilteredEvent","_UnregisterFilteredEvent"]]],["TableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getFirst","Table",0,10,0,4],["getItem","Table",1,18,0,4],["getItemOrNullObject","Table",1,2,18,4]],0,"Table"],["Table",24,[["id",3],["name",1,0,0,2,26],["showHeaders",1,0,0,2,33],["showTotals",1,0,0,2,33],["style",1,0,0,2,33],["highlightFirstColumn",1,14,0,2,33],["highlightLastColumn",1,14,0,2,33],["showBandedRows",1,14,0,2,33],["showBandedColumns",1,14,0,2,33],["showFilterButton",1,14,0,2,33],["legacyId",3,5]],[["columns","TableColumnCollection",19,0,0,4],["rows","TableRowCollection",19,0,0,4],["sort","TableSort",3,13,0,4],["worksheet","Worksheet",2,13,0,4],["autoFilter","AutoFilter",3,6,0,4],["tableStyle","TableStyle",35,8,0,4]],[["delete",0,0,0,2,0,26],["clearFilters",0,0,13],["reapplyFilters",0,0,13,2,0,26],["_RegisterSelectionChangedEvent",0,0,11,2,0,1],["_UnregisterSelectionChangedEvent",0,0,11,2,0,1],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["clearStyle",0,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["resize",1,0,23,2,0,26],["setStyle",1,0,8]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4],["convertToRange","Range",0,8,13,2,0,0,26]],"workbook.tables",0,[["Changed",2,11,"MessageType.tableDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["SelectionChanged",2,11,"MessageType.tableSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["TableColumnCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","TableColumn",1,18,0,4],["getItemAt","TableColumn",1,2,0,4],["add","TableColumn",3,8,0,2,0,0,34],["getItemOrNullObject","TableColumn",1,2,15,4],["addAsJson","TableColumn",3,0,24]],0,"TableColumn"],["TableColumn",0,[["id",3],["index",3],["values",1],["name",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["filter","Filter",3,13,0,4]],[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4]]],["TableRowCollection",1,[["count",3]],0,[["getCount",0,2,15,4],["deleteRows",1,0,19],["deleteRowsAt",2,0,19,2,0,26]],[["getItemAt","TableRow",1,2,0,4],["add","TableRow",3,8,0,2,0,0,34],["addAsJson","TableRow",3,0,24]],0,"TableRow"],["TableRow",0,[["index",3],["values",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],0,[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4]]],["DataValidation",0,[["type",3],["rule",1],["prompt",1],["errorAlert",1],["ignoreBlanks",1],["valid",3]],0,[["clear"]],[["getInvalidCells","RangeAreas",0,10,6,4],["getInvalidCellsOrNullObject","RangeAreas",0,10,6,4]]],["RemoveDuplicatesResult",0,[["removed",3],["uniqueRemaining",3]]],["RangeFormat",0,[["wrapText",1,0,0,2,32],["horizontalAlignment",1,0,0,2,32],["verticalAlignment",1,0,0,2,32],["columnWidth",1,13,0,2,32],["rowHeight",1,13,0,2,32],["textOrientation",1,11,0,2,32],["useStandardHeight",1,11],["useStandardWidth",1,11],["readingOrder",1,6],["shrinkToFit",1,6],["indentLevel",1,6,0,2,32],["autoIndent",1,6]],[["fill","RangeFill",35,0,0,4],["font","RangeFont",35,0,0,4],["borders","RangeBorderCollection",51,0,0,4],["protection","FormatProtection",35,13,0,4]],[["autofitColumns",0,0,13,2,0,32],["autofitRows",0,0,13,2,0,32],["adjustIndent",1,0,7,2,0,34]]],["FormatProtection",0,[["locked",1],["formulaHidden",1]]],["RangeFill",0,[["color",1,0,0,2,32],["tintAndShade",1,6],["patternTintAndShade",1,6],["pattern",1,6],["patternColor",1,6]],0,[["clear",0,0,0,2,0,32]]],["RangeBorder",0,[["sideIndex",3],["style",1,0,0,2,32],["weight",1,0,0,2,32],["color",1,0,0,2,32],["tintAndShade",1,6]]],["RangeBorderCollection",1,[["count",3],["tintAndShade",1,6]],0,0,[["getItem","RangeBorder",1,18,0,4],["getItemAt","RangeBorder",1,2,0,4]],0,"RangeBorder"],["RangeFont",0,[["name",1,0,0,2,32],["size",1,0,0,2,32],["color",1,0,0,2,12],["italic",1,0,0,2,32],["bold",1,0,0,2,32],["underline",1,0,0,2,32],["strikethrough",1,6,0,2,32],["subscript",1,6],["superscript",1,6],["tintAndShade",1,6]]],["ChartCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,5,2,0,1],["_UnregisterAddedEvent",0,0,5,2,0,1],["_RegisterActivatedEvent",0,0,5,2,0,29],["_UnregisterActivatedEvent",0,0,5,2,0,29],["_RegisterDeactivatedEvent",0,0,5,2,0,29],["_UnregisterDeactivatedEvent",0,0,5,2,0,29],["_RegisterDeletedEvent",0,0,5,2,0,29],["_UnregisterDeletedEvent",0,0,5,2,0,29]],[["add","Chart",3,9,0,2,0,0,36],["getItemAt","Chart",1,2,0,4],["_GetItem","Chart",1,18,0,4],["getItem","Chart",1,2,0,4],["getItemOrNullObject","Chart",1,2,15,4]],0,"Chart",[["Activated",0,5,"MessageType.chartActivatedEvent","this._ParentObject.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,5,"MessageType.chartAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this._ParentObject.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,5,"MessageType.chartDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Chart",0,[["name",1,0,0,2,37],["top",1,0,0,2,36],["left",1,0,0,2,36],["width",1,0,0,2,36],["height",1,0,0,2,36],["id",3,11],["showAllFieldButtons",1,11,0,2,36],["chartType",1,11,0,2,37],["showDataLabelsOverMaximum",1,5,0,2,37],["categoryLabelLevel",1,5,0,2,37],["style",1,5,0,2,37],["displayBlanksAs",1,5,0,2,37],["plotBy",1,5,0,2,37],["plotVisibleOnly",1,5,0,2,37],["seriesNameLevel",1,5,0,2,37]],[["title","ChartTitle",35,0,0,4],["dataLabels","ChartDataLabels",35,0,0,4],["legend","ChartLegend",35,0,0,4],["series","ChartSeriesCollection",19,0,0,4],["axes","ChartAxes",35,0,0,4],["format","ChartAreaFormat",35,0,0,4],["worksheet","Worksheet",2,13,0,4],["plotArea","ChartPlotArea",35,5,0,4],["pivotOptions","ChartPivotOptions",35,6,0,4]],[["setData",2,1,0,2,0,36],["delete",0,0,0,2,0,36],["setPosition",2,0,0,2,0,36],["getImage",3,2,13,4],["_RegisterActivatedEvent",0,0,5,2,0,1],["_UnregisterActivatedEvent",0,0,5,2,0,1],["_RegisterDeactivatedEvent",0,0,5,2,0,1],["_UnregisterDeactivatedEvent",0,0,5,2,0,1],["activate",0,2,6],["getDataRange",0,0,28],["getDataRangeOrNullObject",0,0,28]],[["getDataTable","ChartDataTable",0,2,18,4],["getDataTableOrNullObject","ChartDataTable",0,2,18,4]],0,0,[["Activated",0,5,"MessageType.chartActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["ChartPivotOptions",0,[["showAxisFieldButtons",1,0,0,2,37],["showLegendFieldButtons",1,0,0,2,37],["showReportFilterFieldButtons",1,0,0,2,37],["showValueFieldButtons",1,0,0,2,37]]],["ChartAreaFormat",0,[["roundedCorners",1,6,0,2,37],["colorScheme",1,6,0,2,37]],[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartSeriesCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartSeries",1,2,0,4],["add","ChartSeries",2,8,11,2,0,0,36]],0,"ChartSeries"],["ChartSeries",0,[["name",1,0,0,2,36],["chartType",1,11,0,2,10],["hasDataLabels",1,11,0,2,37],["filtered",1,11,0,2,37],["markerSize",1,11,0,2,36],["markerStyle",1,11,0,2,36],["showShadow",1,11,0,2,37],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36],["smooth",1,11,0,2,37],["plotOrder",1,11,0,2,37],["gapWidth",1,11,0,2,36],["doughnutHoleSize",1,11,0,2,36],["axisGroup",1,5,0,2,36],["explosion",1,5,0,2,37],["firstSliceAngle",1,5,0,2,37],["invertIfNegative",1,5,0,2,37],["bubbleScale",1,6,0,2,37],["secondPlotSize",1,5,0,2,37],["splitType",1,5,0,2,37],["splitValue",1,6,0,2,37],["varyByCategories",1,5,0,2,37],["showLeaderLines",1,6,0,2,37],["overlap",1,5,0,2,36],["gradientStyle",1,6,0,2,37],["gradientMinimumType",1,6,0,2,37],["gradientMidpointType",1,6,0,2,37],["gradientMaximumType",1,6,0,2,37],["gradientMinimumValue",1,6,0,2,37],["gradientMidpointValue",1,6,0,2,37],["gradientMaximumValue",1,6,0,2,37],["gradientMinimumColor",1,6,0,2,37],["gradientMidpointColor",1,6,0,2,37],["gradientMaximumColor",1,6,0,2,37],["parentLabelStrategy",1,6,0,2,37],["showConnectorLines",1,6,0,2,37],["invertColor",1,6,0,2,37]],[["points","ChartPointsCollection",19,0,0,4],["format","ChartSeriesFormat",35,0,0,4],["trendlines","ChartTrendlineCollection",19,11,0,4],["xErrorBars","ChartErrorBars",35,6,0,4],["yErrorBars","ChartErrorBars",35,6,0,4],["dataLabels","ChartDataLabels",35,5,0,4],["binOptions","ChartBinOptions",35,6,0,4],["mapOptions","ChartMapOptions",35,6,0,4],["boxwhiskerOptions","ChartBoxwhiskerOptions",35,6,0,4]],[["delete",0,0,11,2,0,36],["setXAxisValues",1,0,11,2,0,36],["setValues",1,0,11,2,0,36],["setBubbleSizes",1,0,11,2,0,37],["getDimensionValues",1,0,27,2,0,37],["getDimensionDataSourceString",1,0,35],["getDimensionDataSourceType",1,0,35]]],["ChartSeriesFormat",0,0,[["fill","ChartFill",3,0,0,4],["line","ChartLineFormat",35,0,0,4]]],["ChartPointsCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartPoint",1,2,0,4]],0,"ChartPoint"],["ChartPoint",0,[["value",3],["hasDataLabel",1,11,0,2,37],["markerStyle",1,11,0,2,36],["markerSize",1,11,0,2,36],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36]],[["format","ChartPointFormat",35,0,0,4],["dataLabel","ChartDataLabel",35,11,0,4]]],["ChartPointFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartAxes",0,0,[["categoryAxis","ChartAxis",35,0,0,4],["seriesAxis","ChartAxis",35,0,0,4],["valueAxis","ChartAxis",35,0,0,4]],0,[["getItem","ChartAxis",2,2,11,4]]],["ChartAxis",0,[["majorUnit",1,0,0,2,37],["maximum",1,0,0,2,36],["minimum",1,0,0,2,36],["minorUnit",1,0,0,2,37],["displayUnit",1,11,0,2,36],["showDisplayUnitLabel",1,11,0,2,37],["customDisplayUnit",3,11],["type",3,11],["minorTimeUnitScale",1,11,0,2,37],["majorTimeUnitScale",1,11,0,2,37],["baseTimeUnit",1,11,0,2,37],["categoryType",1,11,0,2,37],["axisGroup",3,11],["scaleType",1,11,0,2,37],["logBase",1,11,0,2,37],["left",3,11],["top",3,11],["height",3,11],["width",3,11],["reversePlotOrder",1,11,0,2,36],["crosses",1,11,0,2,36],["crossesAt",3,11],["visible",1,11,0,2,37],["isBetweenCategories",1,5,0,2,36],["majorTickMark",1,11,0,2,37],["minorTickMark",1,11,0,2,37],["tickMarkSpacing",1,11,0,2,37],["tickLabelPosition",1,11,0,2,36],["tickLabelSpacing",1,11,0,2,37],["alignment",1,5,0,2,37],["multiLevel",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["offset",1,5,0,2,37],["textOrientation",1,5,0,2,37],["position",1,5,0,2,36],["positionAt",3,5]],[["majorGridlines","ChartGridlines",35,0,0,4],["minorGridlines","ChartGridlines",35,0,0,4],["title","ChartAxisTitle",35,0,0,4],["format","ChartAxisFormat",35,0,0,4]],[["setCategoryNames",1,0,11,2,0,37],["setCustomDisplayUnit",1,0,11,2,0,37],["setCrossesAt",1,0,11,2,0,37],["setPositionAt",1,0,5,2,0,37]]],["ChartAxisFormat",0,0,[["font","ChartFont",35,0,0,4],["line","ChartLineFormat",35,0,0,4],["fill","ChartFill",3,5,0,4]]],["ChartAxisTitle",0,[["text",1,0,0,2,36],["visible",1,0,0,2,37],["textOrientation",1,27,0,2,37]],[["format","ChartAxisTitleFormat",35,0,0,4]],[["setFormula",1,0,5,2,0,37]]],["ChartAxisTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,5,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataLabels",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["textOrientation",1,5,0,2,37],["autoText",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["showAsDataCallout",3,8,0,2,37],["geometricShapeType",1,8,0,2,37]],[["format","ChartDataLabelFormat",35,0,0,4]]],["ChartDataLabel",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["top",1,5,0,2,37],["left",1,5,0,2,37],["width",3,5],["height",3,5],["formula",1,5,0,2,37],["textOrientation",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["text",1,5,0,2,37],["autoText",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["geometricShapeType",1,8,0,2,37],["showAsDataCallout",3,8,0,2,37]],[["format","ChartDataLabelFormat",35,5,0,4]],0,[["getSubstring","ChartFormatString",2,2,8,4]]],["ChartDataLabelFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataTable",0,[["visible",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showHorizontalBorder",1,0,0,2,37],["showVerticalBorder",1,0,0,2,37],["showOutlineBorder",1,0,0,2,37]],[["format","ChartDataTableFormat",35,0,0,4]]],["ChartDataTableFormat",0,0,[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,0,0,4]]],["ChartErrorBars",0,[["endStyleCap",1,0,0,2,37],["include",1,0,0,2,37],["type",1,0,0,2,37],["visible",1,0,0,2,37]],[["format","ChartErrorBarsFormat",35,0,0,4]]],["ChartErrorBarsFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartGridlines",0,[["visible",1,0,0,2,36]],[["format","ChartGridlinesFormat",35,0,0,4]]],["ChartGridlinesFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartLegend",0,[["visible",1,0,0,2,36],["position",1,0,0,2,36],["overlay",1,0,0,2,37],["left",1,11,0,2,37],["top",1,11,0,2,37],["width",1,11,0,2,37],["height",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartLegendFormat",35,0,0,4],["legendEntries","ChartLegendEntryCollection",19,11,0,4]]],["ChartLegendEntry",0,[["visible",1,0,0,2,37],["left",3,5],["top",3,5],["width",3,5],["height",3,5],["index",3,5]]],["ChartLegendEntryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","ChartLegendEntry",1,2,0,4]],0,"ChartLegendEntry"],["ChartLegendFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartMapOptions",0,[["level",1,0,0,2,37],["labelStrategy",1,0,0,2,37],["projectionType",1,0,0,2,37]]],["ChartTitle",0,[["visible",1,0,0,2,37],["text",1,0,0,2,36],["overlay",1,0,0,2,37],["horizontalAlignment",1,11,0,2,37],["top",1,11,0,2,37],["left",1,11,0,2,37],["width",3,11],["height",3,11],["verticalAlignment",1,11,0,2,37],["textOrientation",1,11,0,2,37],["position",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartTitleFormat",35,0,0,4]],[["setFormula",1,0,11,2,0,37]],[["getSubstring","ChartFormatString",2,2,11,4]]],["ChartFormatString",0,0,[["font","ChartFont",35,0,0,4]]],["ChartTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartFill",4,0,0,[["setSolidColor",1,0,0,2,0,36],["clear",0,0,0,2,0,37],["getSolidColor",0,0,24,2,0,37]]],["ChartBorder",0,[["color",1,0,0,2,36],["lineStyle",1,0,0,2,36],["weight",1,0,0,2,36]],0,[["clear",0,0,5,2,0,37]]],["ChartBinOptions",0,[["type",1,0,0,2,36],["width",1,0,0,2,36],["count",1,0,0,2,36],["allowOverflow",1,0,0,2,37],["allowUnderflow",1,0,0,2,37],["overflowValue",1,0,0,2,36],["underflowValue",1,0,0,2,36]]],["ChartBoxwhiskerOptions",0,[["showInnerPoints",1,0,0,2,37],["showOutlierPoints",1,0,0,2,37],["showMeanMarker",1,0,0,2,37],["showMeanLine",1,0,0,2,37],["quartileCalculation",1,0,0,2,37]]],["ChartLineFormat",0,[["color",1,0,0,2,36],["lineStyle",1,11,0,2,36],["weight",1,11,0,2,36]],0,[["clear",0,0,0,2,0,37]]],["ChartFont",0,[["bold",1,0,0,2,37],["color",1,0,0,2,36],["italic",1,0,0,2,37],["name",1,0,0,2,37],["size",1,0,0,2,37],["underline",1,0,0,2,37]]],["ChartTrendline",0,[["type",1,0,0,2,37],["polynomialOrder",1,0,0,2,37],["movingAveragePeriod",1,0,0,2,37],["_Id",2],["showEquation",1,5,0,2,37],["showRSquared",1,5,0,2,37],["forwardPeriod",1,5,0,2,37],["backwardPeriod",1,5,0,2,37],["name",1,0,0,2,37],["intercept",1,0,0,2,37]],[["format","ChartTrendlineFormat",35,0,0,4],["label","ChartTrendlineLabel",35,5,0,4]],[["delete",0,0,0,2,0,37]]],["ChartTrendlineCollection",1,0,0,[["getCount",0,2,0,4]],[["add","ChartTrendline",1,8,0,2,0,0,36],["getItem","ChartTrendline",1,18,0,4]],0,"ChartTrendline"],["ChartTrendlineFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartTrendlineLabel",0,[["top",1,0,0,2,37],["left",1,0,0,2,37],["width",3],["height",3],["formula",1,0,0,2,37],["textOrientation",1,0,0,2,37],["horizontalAlignment",1,0,0,2,37],["verticalAlignment",1,0,0,2,37],["text",1,0,0,2,37],["autoText",1,0,0,2,37],["numberFormat",1,0,0,2,37],["linkNumberFormat",1,6,0,2,37]],[["format","ChartTrendlineLabelFormat",35,0,0,4]]],["ChartTrendlineLabelFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,0,0,4],["font","ChartFont",35,0,0,4]]],["ChartPlotArea",0,[["left",1,0,0,2,37],["top",1,0,0,2,37],["width",1,0,0,2,37],["height",1,0,0,2,37],["insideLeft",1,0,0,2,37],["insideTop",1,0,0,2,37],["insideWidth",1,0,0,2,37],["insideHeight",1,0,0,2,37],["position",1,0,0,2,37]],[["format","ChartPlotAreaFormat",35,0,0,4]]],["ChartPlotAreaFormat",0,0,[["border","ChartBorder",35,0,0,4],["fill","ChartFill",3,0,0,4]]],["VisualCollection",5,0,0,[["getDefinitions",0,2,0,4],["getPreview",4,2,0,4],["bootstrapAgaveVisual",0,0,0,2],["getCount",0,2,0,4],["_RegisterSelectionChangedEvent",0,2],["_UnregisterSelectionChangedEvent",0,2]],[["add","Visual",3,8,0,2],["_GetItem","Visual",1,18,0,4],["getSelectedOrNullObject","Visual",0,2,0,4]],0,"Visual",[["AgaveVisualUpdate",2,0,"MessageType.agaveVisualUpdateEvent","","null","null"],["SelectionChanged",0,0,"MessageType.visualSelectionChangedEvent","this._ParentObject.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["Visual",0,[["id",3],["isSupportedInVisualTaskpane",3]],[["properties","VisualPropertyCollection",18,0,0,4]],[["delete",0,0,0,2],["getProperty",1,2,0,4],["setProperty",2,0,0,2],["changeDataSource",2,0,0,2],["getDataSource",0,2,0,4],["setPropertyToDefault",1,0,0,2],["_RegisterChangeEvent",0,2],["_UnregisterChangeEvent",0,2],["serializeProperties",0,2,0,4],["deserializeProperties",1,0,0,2],["addChildProperty",2,0,19,2],["removeChildProperty",2,0,19,2],["getDataFieldAssignments",0,0,3],["getDataConfig",0,2,3,4],["modifyDataConfig",1,0,3,2]],[["getChildProperties","VisualPropertyCollection",2,6,0,4],["getDataControllerClient","DataControllerClient",0,2,0,4],["getElementChildProperties","VisualPropertyCollection",3,6,0,4]],0,0,[["ChangeNotification",2,0,"MessageType.visualChangeEvent","this.id","_RegisterChangeEvent","_UnregisterChangeEvent"]]],["VisualProperty",0,[["type",3],["value",3],["id",3],["localizedName",3],["options",3],["localizedOptions",3],["hasDefault",3],["isDefault",3],["min",3],["max",3],["stepSize",3],["hideMeButShowChildrenUI",3],["expandableUI",3],["nextPropOnSameLine",3],["showResetUI",3],["size",3,19],["minSize",3,19],["maxSize",3,19],["index",3,19],["parentName",3,19]],0,[["getBoolMetaProperty",1,2,0,4]]],["VisualPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","VisualProperty",1,18,0,4],["getItemAt","VisualProperty",1,2,0,4]],0,"VisualProperty"],["DataControllerClient",0,0,0,[["getWells",0,2,0,4],["getAssociatedFields",1,2,0,4],["getAvailableFields",1,2,0,4],["addField",3,0,0,2],["removeField",2,0,0,2],["moveField",3,0,0,2]]],["RangeSort",0,0,0,[["apply",5,0,0,2,0,32]]],["TableSort",0,[["matchCase",3],["method",3],["fields",3]],0,[["apply",3,0,0,2,0,26],["clear"],["reapply"]]],["Filter",0,[["criteria",3]],0,[["apply",1],["clear",0,0,0,2,0,34],["applyBottomItemsFilter",1,0,0,2,0,34],["applyBottomPercentFilter",1,0,0,2,0,34],["applyCellColorFilter",1,0,0,2,0,34],["applyDynamicFilter",1,0,0,2,0,34],["applyFontColorFilter",1,0,0,2,0,34],["applyValuesFilter",1,0,0,2,0,34],["applyTopItemsFilter",1,0,0,2,0,34],["applyTopPercentFilter",1,0,0,2,0,34],["applyIconFilter",1,0,0,2,0,34],["applyCustomFilter",3,0,0,2,0,34]]],["AutoFilter",0,[["enabled",3],["isDataFiltered",3],["criteria",3]],0,[["apply",3,0,0,2,0,33],["reapply",0,0,0,2,0,26],["remove",0,0,0,2,0,26],["clearCriteria",0,0,0,2,0,26],["clearColumnCriteria",1,0,18]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4]]],["CultureInfo",0,[["name",3]],[["numberFormat","NumberFormatInfo",3,0,0,4],["datetimeFormat","DatetimeFormatInfo",3,27,0,4]]],["NumberFormatInfo",0,[["numberDecimalSeparator",3],["numberGroupSeparator",3],["currencySymbol",3,30]]],["DatetimeFormatInfo",0,[["dateSeparator",3],["longDatePattern",3],["shortDatePattern",3],["timeSeparator",3],["longTimePattern",3]]],["CustomXmlPartScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4],["getOnlyItem","CustomXmlPart",0,2,0,4],["getOnlyItemOrNullObject","CustomXmlPart",0,2,0,4]],0,"CustomXmlPart"],["CustomXmlPartCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["add","CustomXmlPart",1,8],["getByNamespace","CustomXmlPartScopedCollection",1,6,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4]],0,"CustomXmlPart"],["CustomXmlPart",0,[["id",3],["namespaceUri",3]],0,[["delete"],["getXml",0,2,0,4],["setXml",1]]],["_V1Api",0,0,0,[["bindingGetData",1,2,0,4],["getSelectedData",1,2,0,4],["gotoById",1,2,0,4],["bindingAddFromSelection",1,2],["bindingGetById",1,2,0,4],["bindingReleaseById",1,2],["bindingGetAll",0,2,0,4],["bindingAddFromNamedItem",1,2],["bindingAddFromPrompt",1,2],["bindingDeleteAllDataValues",1],["setSelectedData",1],["bindingClearFormats",1],["bindingSetData",1],["bindingSetFormats",1],["bindingSetTableOptions",1],["bindingAddRows",1],["bindingAddColumns",1],["getFilePropertiesAsync",0,2,9,4]]],["PivotTableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotTable",1,18,0,4],["getFirst","PivotTable",0,10,0,4],["getItemOrNullObject","PivotTable",1,2,0,4],["getFirstOrNullObject","PivotTable",0,2,35,4]],0,"PivotTable"],["PivotTableCollection",5,0,0,[["refreshAll",0,0,0,2,0,12],["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","PivotTable",1,18,0,4],["getItemOrNullObject","PivotTable",1,2,15,4],["add","PivotTable",3,8,5,2,0,0,12]],0,"PivotTable",[["Added",0,3,"MessageType.pivotTableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.pivotTableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["PivotTable",0,[["name",1,0,0,2,12],["id",3,16],["useCustomSortLists",1,6,0,2,12],["enableDataValueEditing",1,6,0,2,12],["refreshOnOpen",0,23,0,2,29],["allowMultipleFiltersPerField",0,27,0,2,12]],[["worksheet","Worksheet",2,0,0,4],["hierarchies","PivotHierarchyCollection",19,5,0,4],["rowHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["columnHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["dataHierarchies","DataPivotHierarchyCollection",19,5,0,4],["filterHierarchies","FilterPivotHierarchyCollection",19,5,0,4],["layout","PivotLayout",2,5,0,4]],[["refresh",0,0,0,2,0,12],["delete",0,0,5,2,0,12],["getDataSourceString",0,2,35,4],["getDataSourceType",0,2,35,4]],[["addDateGroup","PivotHierarchy",2,0,8,2,0,0,38]]],["PivotLayout",0,[["showColumnGrandTotals",1,0,0,2,12],["showRowGrandTotals",1,0,0,2,12],["enableFieldList",1,17,0,2,12],["subtotalLocation",1,0,0,2,12],["layoutType",1,0,0,2,12],["autoFormat",1,6,0,2,12],["preserveFormatting",1,6,0,2,12],["altTextDescription",0,23,0,2,29],["altTextTitle",0,23,0,2,29],["emptyCellText",0,23,0,2,29],["fillEmptyCells",0,23,0,2,29],["showFieldHeaders",0,23,0,2,29],["tabularValues",3,8],["tabularText",3,8],["tabularNumberFormat",3,8],["tabularNumberFormatLocal",3,8]],[["pivotStyle","PivotTableStyle",35,8,0,4]],[["setAutoSortOnCell",2,0,6,2,0,12],["setStyle",1,0,8,2,0,12],["displayBlankLineAfterEachItem",1,0,23,2,0,29],["repeatAllItemLabels",1,0,23,2,0,29]],[["getRange","Range",0,3],["getRowLabelRange","Range",0,3],["getColumnLabelRange","Range",0,3],["getFilterAxisRange","Range",0,3],["getDataBodyRange","Range",0,3],["getCell","Range",3,2,8],["getPivotItems","PivotItemCollection",2,4,6],["getDataHierarchy","DataPivotHierarchy",1,3,6]]],["PivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotHierarchy",1,18,0,4],["getItemOrNullObject","PivotHierarchy",1,2,0,4]],0,"PivotHierarchy"],["PivotHierarchy",0,[["id",3],["name",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]]],["RowColumnPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","RowColumnPivotHierarchy",1,18,0,4],["getItemOrNullObject","RowColumnPivotHierarchy",1,2,0,4],["add","RowColumnPivotHierarchy",1,8,0,2,0,0,12]],0,"RowColumnPivotHierarchy"],["RowColumnPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["FilterPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","FilterPivotHierarchy",1,18,0,4],["getItemOrNullObject","FilterPivotHierarchy",1,2,0,4],["add","FilterPivotHierarchy",1,8,0,2,0,0,12]],0,"FilterPivotHierarchy"],["FilterPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["enableMultipleFilterItems",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["DataPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","DataPivotHierarchy",1,18,0,4],["getItemOrNullObject","DataPivotHierarchy",1,2,0,4],["add","DataPivotHierarchy",1,8,0,2,0,0,12]],0,"DataPivotHierarchy"],["DataPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["numberFormat",1,0,0,2,12],["summarizeBy",1,0,0,2,12],["showAs",1,0,0,2,12]],[["field","PivotField",35,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["PivotFieldCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotField",1,18,0,4],["getItemOrNullObject","PivotField",1,2,0,4]],0,"PivotField"],["PivotField",0,[["id",3],["name",1,0,0,2,12],["subtotals",1,0,0,2,12],["showAllItems",1,0,0,2,12]],[["items","PivotItemCollection",19,0,0,4]],[["sortByLabels",1,1,0,2,0,12],["sortByValues",3,0,6,2,0,12],["applyFilter",1,0,27,2,0,12],["clearAllFilters",0,0,27,2,0,12],["clearFilter",1,0,27,2,0,12],["getFilters",0,0,27],["isFiltered",1,0,27]]],["PivotItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotItem",1,18,0,4],["getItemOrNullObject","PivotItem",1,2,0,4]],0,"PivotItem"],["PivotItem",0,[["id",3],["name",1,0,0,2,12],["isExpanded",1,0,0,2,12],["visible",1,0,0,2,12]]],["WorksheetCustomProperty",0,[["key",3],["value",1],["_Id",2]],0,[["delete"]]],["WorksheetCustomPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","WorksheetCustomProperty",1,18,0,4],["getItemOrNullObject","WorksheetCustomProperty",1],["add","WorksheetCustomProperty",2,8]],0,"WorksheetCustomProperty"],["DocumentProperties",0,[["title",1],["subject",1],["author",1],["keywords",1],["comments",1],["lastAuthor",3],["revisionNumber",1],["creationDate",11],["category",1],["manager",1],["company",1]],[["custom","CustomPropertyCollection",19,0,0,4]]],["CustomProperty",0,[["key",3],["value",1],["type",3]],0,[["delete"]]],["CustomPropertyCollection",1,0,0,[["getCount",0,2,0,4],["deleteAll"]],[["getItemOrNullObject","CustomProperty",1,2,0,4],["add","CustomProperty",2,8],["getItem","CustomProperty",1,18,0,4]],0,"CustomProperty"],["ConditionalFormatCollection",1,0,0,[["getCount",0,2,0,4],["clearAll",0,0,0,2,0,39]],[["getItemAt","ConditionalFormat",1,2,0,4],["add","ConditionalFormat",1,8,0,2,0,0,39],["getItem","ConditionalFormat",1,18,0,4],["getItemOrNullObject","ConditionalFormat",1,2,18,4]],0,"ConditionalFormat"],["ConditionalFormat",0,[["stopIfTrue",1],["priority",1],["type",3],["id",3]],[["dataBarOrNullObject","DataBarConditionalFormat",35,0,0,4],["dataBar","DataBarConditionalFormat",35,0,0,4],["customOrNullObject","CustomConditionalFormat",35,0,0,4],["custom","CustomConditionalFormat",35,0,0,4],["iconSet","IconSetConditionalFormat",35,0,0,4],["iconSetOrNullObject","IconSetConditionalFormat",35,0,0,4],["colorScale","ColorScaleConditionalFormat",35,0,0,4],["colorScaleOrNullObject","ColorScaleConditionalFormat",35,0,0,4],["topBottom","TopBottomConditionalFormat",35,0,0,4],["topBottomOrNullObject","TopBottomConditionalFormat",35,0,0,4],["preset","PresetCriteriaConditionalFormat",35,0,0,4],["presetOrNullObject","PresetCriteriaConditionalFormat",35,0,0,4],["textComparison","TextConditionalFormat",35,0,0,4],["textComparisonOrNullObject","TextConditionalFormat",35,0,0,4],["cellValue","CellValueConditionalFormat",35,0,0,4],["cellValueOrNullObject","CellValueConditionalFormat",35,0,0,4]],[["delete",0,0,0,2,0,40],["changeRuleToCellValue",1,0,30],["changeRuleToColorScale",0,0,30],["changeRuleToContainsText",1,0,30],["changeRuleToCustom",1,0,30],["changeRuleToDataBar",0,0,30],["changeRuleToIconSet",0,0,30],["changeRuleToPresetCriteria",1,0,30],["changeRuleToTopBottom",1,0,30],["setRanges",1,0,30]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4],["getRanges","RangeAreas",0,10,6,4]]],["DataBarConditionalFormat",0,[["showDataBarOnly",1,0,0,2,40],["barDirection",1,0,0,2,41],["axisFormat",1,0,0,2,41],["axisColor",1,0,0,2,41],["lowerBoundRule",1,0,0,2,41],["upperBoundRule",1,0,0,2,41]],[["positiveFormat","ConditionalDataBarPositiveFormat",35,0,0,4],["negativeFormat","ConditionalDataBarNegativeFormat",35,0,0,4]]],["ConditionalDataBarPositiveFormat",0,[["fillColor",1,0,0,2,40],["gradientFill",1,0,0,2,40],["borderColor",1,0,0,2,40]]],["ConditionalDataBarNegativeFormat",0,[["fillColor",1,0,0,2,40],["matchPositiveFillColor",1,0,0,2,40],["borderColor",1,0,0,2,40],["matchPositiveBorderColor",1,0,0,2,40]]],["CustomConditionalFormat",0,0,[["rule","ConditionalFormatRule",35,0,0,4],["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalFormatRule",0,[["formula",1,0,0,2,41],["formulaLocal",1],["formulaR1C1",1]]],["IconSetConditionalFormat",0,[["reverseIconOrder",1,0,0,2,41],["showIconOnly",1,0,0,2,41],["style",1,0,0,2,41],["criteria",1,0,0,2,41]]],["ColorScaleConditionalFormat",0,[["threeColorScale",3],["criteria",1,0,0,2,41]]],["TopBottomConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["PresetCriteriaConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["TextConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["CellValueConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalRangeFormat",0,[["numberFormat",1]],[["fill","ConditionalRangeFill",35,0,0,4],["font","ConditionalRangeFont",35,0,0,4],["borders","ConditionalRangeBorderCollection",51,0,0,4]],[["clearFormat",0,0,30]]],["ConditionalRangeFont",0,[["color",1,0,0,2,42],["italic",1,0,0,2,42],["bold",1,0,0,2,42],["underline",1,0,0,2,42],["strikethrough",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeFill",0,[["color",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeBorder",0,[["sideIndex",3],["style",1,0,0,2,42],["color",1,0,0,2,42]]],["ConditionalRangeBorderCollection",1,[["count",3]],[["top","ConditionalRangeBorder",35,0,0,4],["bottom","ConditionalRangeBorder",35,0,0,4],["left","ConditionalRangeBorder",35,0,0,4],["right","ConditionalRangeBorder",35,0,0,4]],0,[["getItem","ConditionalRangeBorder",1,18,0,4],["getItemAt","ConditionalRangeBorder",1,2,0,4]],0,"ConditionalRangeBorder"],["NumberFormattingService",0,0,0,0,[["getFormatter","NumberFormatter",1,3]],0,0,0,"Microsoft.ExcelServices.NumberFormattingService",4],["NumberFormatter",0,[["isDateTime",3],["isPercent",3],["isCurrency",3],["isNumeric",3],["isText",3],["hasYear",3],["hasMonth",3],["hasDayOfWeek",3]],0,[["format",1,3]]],["CustomFunctionManager",36,[["status",2]],0,[["register",2]],0,0,0,0,"Microsoft.ExcelServices.CustomFunctionManager",4],["Style",0,[["builtIn",3],["formulaHidden",1],["horizontalAlignment",1],["includeAlignment",1],["includeBorder",1],["includeFont",1],["includeNumber",1],["includePatterns",1],["includeProtection",1],["indentLevel",1],["locked",1],["name",3],["numberFormat",1],["numberFormatLocal",1],["readingOrder",1],["shrinkToFit",1],["verticalAlignment",1],["wrapText",1],["textOrientation",5,5],["autoIndent",1,5]],[["borders","RangeBorderCollection",51,0,0,4],["font","RangeFont",35,0,0,4],["fill","RangeFill",35,0,0,4]],[["delete"]]],["StyleCollection",1,0,0,[["add",1],["getCount",0,2,6,4]],[["getItem","Style",1,18,0,4],["getItemAt","Style",1,2,6,4],["getItemOrNullObject","Style",1,2,18,4]],0,"Style"],["TableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TableStyle",1,18,0,4],["getItemOrNullObject","TableStyle",1,2,0,4],["add","TableStyle",2,8],["getDefault","TableStyle"]],0,"TableStyle"],["TableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TableStyle"]]],["PivotTableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","PivotTableStyle",1,18,0,4],["getItemOrNullObject","PivotTableStyle",1,2,0,4],["add","PivotTableStyle",2,8],["getDefault","PivotTableStyle"]],0,"PivotTableStyle"],["PivotTableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","PivotTableStyle"]]],["SlicerStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","SlicerStyle",1,18,0,4],["getItemOrNullObject","SlicerStyle",1,2,0,4],["add","SlicerStyle",2,8],["getDefault","SlicerStyle"]],0,"SlicerStyle"],["SlicerStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","SlicerStyle"]]],["TimelineStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TimelineStyle",1,18,0,4],["getItemOrNullObject","TimelineStyle",1,2,0,4],["add","TimelineStyle",2,8],["getDefault","TimelineStyle"]],0,"TimelineStyle"],["TimelineStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TimelineStyle"]]],["InternalTest",0,0,0,[["delay",1],["triggerMessage",4,0,11],["_RegisterTestEvent",0,0,11,2,0,1],["_UnregisterTestEvent",0,0,11,2,0,1],["triggerTestEvent",2,0,11],["triggerPostProcess",0,0,11],["_RegisterTest1Event",0,0,11,2,0,1],["_UnregisterTest1Event",0,0,11,2,0,1],["triggerTestEventWithFilter",3,0,11],["firstPartyMethod",0,2,11,5],["_RegisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_RegisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["unregisterAllCustomFunctionExecutionEvents",0,0,20],["updateRangeValueOnCurrentSheet",2,0,3,2],["triggerUserUndo",0,2,3],["triggerUserRedo",0,2,3],["enterCellEdit",1,0,6],["installCustomFunctionsFromCache",0,0,6],["recalc",2,0,6],["recalcBySolutionId",1,0,6],["safeForCellEditModeMethod",1,0,6],["exitCellEdit",0,0,6],["noPermissionMethod",1,0,6],["verifyCustomFunctionListExist",0,0,6],["enableContentWorkbookLink",0,0,3],["previewExecutionMethod",1,0,8,16],["setRapidJsonEnabled",1,0,8],["triggerVbaRecorderRecordingChanged",2,0,8]],0,0,0,[["CustomFunctionExecutionBeginEvent",0,20,"MessageType.customFunctionExecutionBeginEvent","","_RegisterCustomFunctionExecutionBeginEvent","_UnregisterCustomFunctionExecutionBeginEvent"],["CustomFunctionExecutionEndEvent",0,20,"MessageType.customFunctionExecutionEndEvent","","_RegisterCustomFunctionExecutionEndEvent","_UnregisterCustomFunctionExecutionEndEvent"],["Test1Event",2,11,"MessageType.test1Event","","_RegisterTest1Event","_UnregisterTest1Event"],["TestEvent",2,11,"MessageType.testEvent","","_RegisterTestEvent","_UnregisterTestEvent"]],"Microsoft.ExcelServices.InternalTest",4],["PageLayout",0,[["orientation",1],["paperSize",1],["blackAndWhite",1],["printErrors",1],["zoom",1],["centerHorizontally",1],["centerVertically",1],["printHeadings",1],["printGridlines",1],["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["headerMargin",1],["footerMargin",1],["printComments",1],["draftMode",1],["firstPageNumber",1],["printOrder",1]],[["headersFooters","HeaderFooterGroup",35,0,0,4]],[["setPrintMargins",2],["setPrintArea",1],["setPrintTitleRows",1],["setPrintTitleColumns",1]],[["getPrintArea","RangeAreas",0,10,0,4],["getPrintAreaOrNullObject","RangeAreas",0,10,0,4],["getPrintTitleRows","Range",0,10,0,4],["getPrintTitleRowsOrNullObject","Range",0,10,0,4],["getPrintTitleColumns","Range",0,10,0,4],["getPrintTitleColumnsOrNullObject","Range",0,10,0,4]]],["HeaderFooter",0,[["leftHeader",1],["centerHeader",1],["rightHeader",1],["leftFooter",1],["centerFooter",1],["rightFooter",1]]],["HeaderFooterGroup",0,[["state",1],["useSheetMargins",1],["useSheetScale",1]],[["defaultForAllPages","HeaderFooter",35,0,0,4],["firstPage","HeaderFooter",35,0,0,4],["evenPages","HeaderFooter",35,0,0,4],["oddPages","HeaderFooter",35,0,0,4]]],["PageBreak",0,[["_Id",2],["columnIndex",3],["rowIndex",3]],0,[["delete"]],[["getCellAfterBreak","Range",0,10,0,4]]],["PageBreakCollection",1,0,0,[["removePageBreaks"],["getCount",0,2,0,4]],[["getItem","PageBreak",1,18,0,4],["add","PageBreak",1,8]],0,"PageBreak"],["DataConnectionCollection",0,0,0,[["refreshAll"]],[["add","DataConnection",4,8,8,2,0,0,12]]],["RangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","Range",1,2,0,4]],0,"Range"],["RangeAreasCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","RangeAreas",1,2,0,4]],0,"RangeAreas"],["CommentCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,2,27],["_UnregisterAddedEvent",0,2,27],["_RegisterDeletedEvent",0,2,27],["_UnregisterDeletedEvent",0,2,27],["_RegisterChangedEvent",0,2,27],["_UnregisterChangedEvent",0,2,27]],[["getItem","Comment",1,18,0,4],["getItemAt","Comment",1,2,0,4],["add","Comment",3,8],["getItemByReplyId","Comment",1,2,0,4],["getItemByCell","Comment",1,2,0,4],["getItemOrNullObject","Comment",1,2,18,4]],0,"Comment",[["Added",0,27,"MessageType.commentAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",0,27,"MessageType.commentChangedEvent","this._eventTargetId","_RegisterChangedEvent","_UnregisterChangedEvent"],["Deleted",0,27,"MessageType.commentDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Comment",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",1,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],[["replies","CommentReplyCollection",19,0,0,4]],[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["CommentReplyCollection",1,0,0,[["getCount",0,2,0,4]],[["add","CommentReply",2,8],["getItem","CommentReply",1,18,0,4],["getItemAt","CommentReply",1,2,0,4],["getItemOrNullObject","CommentReply",1,2,18,4]],0,"CommentReply"],["CommentReply",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",3,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],0,[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["getParentComment","Comment"],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["ShapeCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["addImage","Shape",1],["_GetItem","Shape",1,18,0,4],["addGeometricShape","Shape",1],["addTextBox","Shape",1],["addSvg","Shape",1,0,8],["addGroup","Shape",1],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["addLine","Shape",5],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape",[["Added",0,3,"MessageType.shapeAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.shapeDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Shape",0,[["id",3],["name",1],["left",1],["top",1],["width",1],["height",1],["rotation",1],["zOrderPosition",3],["altTextTitle",1],["altTextDescription",1,0,0,2,36],["type",3],["lockAspectRatio",1],["placement",1,17],["geometricShapeType",1],["visible",1],["level",3],["connectionSiteCount",3],["scriptLink",1,8,0,2,37],["displayName",3,35]],[["geometricShape","GeometricShape",2,0,0,4],["image","Image",2,0,0,4],["textFrame","TextFrame",2,0,0,4],["fill","ShapeFill",35,0,0,4],["group","ShapeGroup",2,0,0,4],["parentGroup","Shape",2,0,0,4],["line","Line",2,0,0,4],["lineFormat","ShapeLineFormat",35,0,0,4]],[["setZOrder",1],["incrementLeft",1],["incrementTop",1],["incrementRotation",1],["scaleHeight",3],["scaleWidth",3],["delete"],["getAsImage",1],["_RegisterActivatedEvent",0,0,0,2,0,1],["_UnregisterActivatedEvent",0,0,0,2,0,1],["_RegisterDeactivatedEvent",0,0,0,2,0,1],["_UnregisterDeactivatedEvent",0,0,0,2,0,1],["activate",0,0,3]],[["copyTo","Shape",1,8,17,0,0,"_GetShapeById"],["_GetShapeById","Shape",1,2,17,4]],0,0,[["Activated",0,0,"MessageType.shapeActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,0,"MessageType.shapeDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["GeometricShape",0,[["id",3]],[["shape","Shape",2,0,0,4]]],["Image",0,[["id",3],["format",3,0,"format"]],[["shape","Shape",2,0,0,4]]],["ShapeGroup",0,[["id",3]],[["shapes","GroupShapeCollection",19,0,0,4],["shape","Shape",2,0,0,4]],[["ungroup"]]],["GroupShapeCollection",1,0,0,[["getCount",0,2,0,4]],[["_GetItem","Shape",1,18,0,4],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape"],["Line",0,[["id",3],["connectorType",1,0,"connectorType"],["beginArrowheadLength",1],["beginArrowheadStyle",1],["beginArrowheadWidth",1],["endArrowheadLength",1],["endArrowheadStyle",1],["endArrowheadWidth",1],["isBeginConnected",3],["beginConnectedSite",3],["isEndConnected",3],["endConnectedSite",3]],[["shape","Shape",2,0,0,4],["beginConnectedShape","Shape",2,0,0,4],["endConnectedShape","Shape",2,0,0,4]],[["connectBeginShape",2],["disconnectBeginShape"],["connectEndShape",2],["disconnectEndShape"]]],["ShapeFill",0,[["foregroundColor",1],["type",3],["transparency",1]],0,[["clear"],["setSolidColor",1]]],["ShapeLineFormat",0,[["visible",1],["color",1],["style",1],["weight",1],["dashStyle",1],["transparency",1]]],["TextFrame",0,[["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["horizontalAlignment",1],["horizontalOverflow",1],["verticalAlignment",1],["verticalOverflow",1],["orientation",1],["readingOrder",1],["hasText",3],["autoSizeSetting",1]],[["textRange","TextRange",2,0,0,4]],[["deleteText"]]],["TextRange",0,[["text",1]],[["font","ShapeFont",35,0,0,4]],0,[["getSubstring","TextRange",2]]],["ShapeFont",0,[["size",1],["name",1],["color",1],["bold",1],["italic",1],["underline",1]]],["Slicer",0,[["id",3],["name",1],["caption",1],["left",1],["top",1],["width",1],["height",1],["nameInFormula",1,8],["isFilterCleared",3],["style",1],["sortBy",1],["sortUsingCustomLists",1,3],["columnCount",1,3],["disableMoveResizeUI",1,3],["displayHeader",1,3],["rowHeight",1,3],["shapeId",2,3]],[["slicerItems","SlicerItemCollection",19,0,0,4],["worksheet","Worksheet",35,0,0,4],["slicerStyle","SlicerStyle",35,8,0,4]],[["delete"],["clearFilters"],["getSelectedItems"],["selectItems",1],["activate",0,2,3],["setStyle",1,0,8]]],["SlicerCollection",1,0,0,[["getCount",0,2,0,4]],[["add","Slicer",3,8],["getItemAt","Slicer",1,2,0,4],["getItem","Slicer",1,18,0,4],["getItemOrNullObject","Slicer",1,2,0,4]],0,"Slicer"],["SlicerItem",0,[["key",3],["name",3],["isSelected",1],["hasData",3]]],["SlicerItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SlicerItem",1,2,0,4],["getItem","SlicerItem",1,18,0,4],["getItemOrNullObject","SlicerItem",1,2,0,4]],0,"SlicerItem"],["Ribbon",0,[["activeTab",1]],0,[["executeCommand",2],["showTeachingCallout",3],["_RegisterCommandExecutedEvent",0,0,0,2,0,1],["_UnregisterCommandExecutedEvent",0,0,0,2,0,1],["showChartDialog",1,2,8,4]],0,0,0,[["CommandExecuted",0,0,"MessageType.ribbonCommandExecutedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCommandExecutedEvent","_UnregisterCommandExecutedEvent"]]],["LinkedDataType",0,[["dataProvider",2],["serviceId",2],["lastRefreshed",10],["name",2],["periodicRefreshInterval",2],["refreshDataLoadWarnings",2],["refreshMode",2],["supportedRefreshModes",2],["refreshErrors",2]],0,[["requestRefresh",0,0,0,2],["requestSetRefreshMode",1,0,0,2]]],["LinkedDataTypeCollection",1,0,0,[["getCount",0,2,0,4],["requestRefreshAll",0,0,0,2],["_RegisterRefreshRequestCompletedEvent",0,2,0,4],["_UnregisterRefreshRequestCompletedEvent",0,2,0,4],["_RegisterRefreshModeChangedEvent",0,2,0,4],["_UnregisterRefreshModeChangedEvent",0,2,0,4],["_RegisterLinkedDataTypeAddedEvent",0,2,0,4],["_UnregisterLinkedDataTypeAddedEvent",0,2,0,4]],[["getItem","LinkedDataType",1,18,0,4],["getItemOrNullObject","LinkedDataType",1],["getItemAt","LinkedDataType",1,2,0,4]],0,"LinkedDataType",[["LinkedDataTypeAdded",0,0,"MessageType.linkedDataTypeLinkedDataTypeAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterLinkedDataTypeAddedEvent","_UnregisterLinkedDataTypeAddedEvent"],["RefreshModeChanged",0,0,"MessageType.linkedDataTypeRefreshModeChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshModeChangedEvent","_UnregisterRefreshModeChangedEvent"],["RefreshRequestCompleted",0,0,"MessageType.linkedDataTypeRefreshRequestCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshRequestCompletedEvent","_UnregisterRefreshRequestCompletedEvent"]]],["SheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","SheetView",1]]],["SheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","SheetView",1,8],["enterTemporary","SheetView"],["getActive","SheetView"],["getItem","SheetView",1,18,0,4],["getItemAt","SheetView",1,2,0,4]],0,"SheetView"],["NamedSheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","NamedSheetView",1]]],["NamedSheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","NamedSheetView",1,8],["enterTemporary","NamedSheetView"],["getActive","NamedSheetView"],["getItem","NamedSheetView",1,18,0,4],["getItemAt","NamedSheetView",1,2,0,4],["getItemOrNullObject","NamedSheetView",1,2,28,4]],0,"NamedSheetView"],["FunctionResult",0,[["error",3],["value",3]]],["Functions",0,0,0,0,[["count","FunctionResult",1,72],["if","FunctionResult",3,8],["isNA","FunctionResult",1,8],["isError","FunctionResult",1,8],["sum","FunctionResult",1,72],["average","FunctionResult",1,72],["min","FunctionResult",1,72],["max","FunctionResult",1,72],["na","FunctionResult",0,8],["npv","FunctionResult",2,72],["dollar","FunctionResult",2,8],["fixed","FunctionResult",3,8],["sin","FunctionResult",1,8],["cos","FunctionResult",1,8],["tan","FunctionResult",1,8],["atan","FunctionResult",1,8],["pi","FunctionResult",0,8],["sqrt","FunctionResult",1,8],["exp","FunctionResult",1,8],["ln","FunctionResult",1,8],["log10","FunctionResult",1,8],["abs","FunctionResult",1,8],["int","FunctionResult",1,8],["sign","FunctionResult",1,8],["round","FunctionResult",2,8],["lookup","FunctionResult",3,8],["rept","FunctionResult",2,8],["mid","FunctionResult",3,8],["len","FunctionResult",1,8],["value","FunctionResult",1,8],["true","FunctionResult",0,8],["false","FunctionResult",0,8],["and","FunctionResult",1,72],["or","FunctionResult",1,72],["not","FunctionResult",1,8],["mod","FunctionResult",2,8],["dcount","FunctionResult",3,8,0,0,"DCount"],["dsum","FunctionResult",3,8,0,0,"DSum"],["daverage","FunctionResult",3,8,0,0,"DAverage"],["dmin","FunctionResult",3,8,0,0,"DMin"],["dmax","FunctionResult",3,8,0,0,"DMax"],["dstDev","FunctionResult",3,8,0,0,"DStDev"],["dvar","FunctionResult",3,8,0,0,"DVar"],["text","FunctionResult",2,8],["pv","FunctionResult",5,8],["fv","FunctionResult",5,8],["nper","FunctionResult",5,8,0,0,"NPer"],["pmt","FunctionResult",5,8],["rate","FunctionResult",6,8],["mirr","FunctionResult",3,8,0,0,"MIrr"],["irr","FunctionResult",2,8],["rand","FunctionResult",0,8],["match","FunctionResult",3,8],["date","FunctionResult",3,8],["time","FunctionResult",3,8],["day","FunctionResult",1,8],["month","FunctionResult",1,8],["year","FunctionResult",1,8],["weekday","FunctionResult",2,8],["hour","FunctionResult",1,8],["minute","FunctionResult",1,8],["second","FunctionResult",1,8],["now","FunctionResult",0,8],["areas","FunctionResult",1,8],["rows","FunctionResult",1,8],["columns","FunctionResult",1,8],["type","FunctionResult",1,8],["atan2","FunctionResult",2,8],["asin","FunctionResult",1,8],["acos","FunctionResult",1,8],["choose","FunctionResult",2,72],["hlookup","FunctionResult",4,8,0,0,"HLookup"],["vlookup","FunctionResult",4,8,0,0,"VLookup"],["isref","FunctionResult",1,8],["log","FunctionResult",2,8],["char","FunctionResult",1,8],["lower","FunctionResult",1,8],["upper","FunctionResult",1,8],["proper","FunctionResult",1,8],["left","FunctionResult",2,8],["right","FunctionResult",2,8],["exact","FunctionResult",2,8],["trim","FunctionResult",1,8],["replace","FunctionResult",4,8],["substitute","FunctionResult",4,8],["code","FunctionResult",1,8],["find","FunctionResult",3,8],["isErr","FunctionResult",1,8],["isText","FunctionResult",1,8],["isNumber","FunctionResult",1,8],["t","FunctionResult",1,8,0,0,"T"],["n","FunctionResult",1,8,0,0,"N"],["datevalue","FunctionResult",1,8],["timevalue","FunctionResult",1,8],["sln","FunctionResult",3,8],["syd","FunctionResult",4,8],["ddb","FunctionResult",5,8],["clean","FunctionResult",1,8],["ipmt","FunctionResult",6,8],["ppmt","FunctionResult",6,8],["countA","FunctionResult",1,72],["product","FunctionResult",1,72],["fact","FunctionResult",1,8],["dproduct","FunctionResult",3,8,0,0,"DProduct"],["isNonText","FunctionResult",1,8],["dstDevP","FunctionResult",3,8,0,0,"DStDevP"],["dvarP","FunctionResult",3,8,0,0,"DVarP"],["trunc","FunctionResult",2,8],["isLogical","FunctionResult",1,8],["dcountA","FunctionResult",3,8,0,0,"DCountA"],["usdollar","FunctionResult",2,8,0,0,"USDollar"],["findB","FunctionResult",3,8],["replaceB","FunctionResult",4,8],["leftb","FunctionResult",2,8],["rightb","FunctionResult",2,8],["midb","FunctionResult",3,8],["lenb","FunctionResult",1,8],["roundUp","FunctionResult",2,8],["roundDown","FunctionResult",2,8],["asc","FunctionResult",1,8],["dbcs","FunctionResult",1,8],["days360","FunctionResult",3,8],["today","FunctionResult",0,8],["vdb","FunctionResult",7,8],["median","FunctionResult",1,72],["sinh","FunctionResult",1,8],["cosh","FunctionResult",1,8],["tanh","FunctionResult",1,8],["asinh","FunctionResult",1,8],["acosh","FunctionResult",1,8],["atanh","FunctionResult",1,8],["dget","FunctionResult",3,8,0,0,"DGet"],["db","FunctionResult",5,8],["error_Type","FunctionResult",1,8],["aveDev","FunctionResult",1,72],["gammaLn","FunctionResult",1,8],["combin","FunctionResult",2,8],["even","FunctionResult",1,8],["fisher","FunctionResult",1,8],["fisherInv","FunctionResult",1,8],["standardize","FunctionResult",3,8],["odd","FunctionResult",1,8],["permut","FunctionResult",2,8],["devSq","FunctionResult",1,72],["geoMean","FunctionResult",1,72],["harMean","FunctionResult",1,72],["sumSq","FunctionResult",1,72],["kurt","FunctionResult",1,72],["skew","FunctionResult",1,72],["large","FunctionResult",2,8],["small","FunctionResult",2,8],["trimMean","FunctionResult",2,8],["concatenate","FunctionResult",1,72],["power","FunctionResult",2,8],["radians","FunctionResult",1,8],["degrees","FunctionResult",1,8],["subtotal","FunctionResult",2,72],["sumIf","FunctionResult",3,8],["countIf","FunctionResult",2,8],["countBlank","FunctionResult",1,8],["ispmt","FunctionResult",4,8],["roman","FunctionResult",2,8],["hyperlink","FunctionResult",2,8],["averageA","FunctionResult",1,72],["maxA","FunctionResult",1,72],["minA","FunctionResult",1,72],["stDevPA","FunctionResult",1,72],["varPA","FunctionResult",1,72],["stDevA","FunctionResult",1,72],["varA","FunctionResult",1,72],["bahtText","FunctionResult",1,8],["hex2Bin","FunctionResult",2,8],["hex2Dec","FunctionResult",1,8],["hex2Oct","FunctionResult",2,8],["dec2Bin","FunctionResult",2,8],["dec2Hex","FunctionResult",2,8],["dec2Oct","FunctionResult",2,8],["oct2Bin","FunctionResult",2,8],["oct2Hex","FunctionResult",2,8],["oct2Dec","FunctionResult",1,8],["bin2Dec","FunctionResult",1,8],["bin2Oct","FunctionResult",2,8],["bin2Hex","FunctionResult",2,8],["imSub","FunctionResult",2,8],["imDiv","FunctionResult",2,8],["imPower","FunctionResult",2,8],["imAbs","FunctionResult",1,8],["imSqrt","FunctionResult",1,8],["imLn","FunctionResult",1,8],["imLog2","FunctionResult",1,8],["imLog10","FunctionResult",1,8],["imSin","FunctionResult",1,8],["imCos","FunctionResult",1,8],["imExp","FunctionResult",1,8],["imArgument","FunctionResult",1,8],["imConjugate","FunctionResult",1,8],["imaginary","FunctionResult",1,8],["imReal","FunctionResult",1,8],["complex","FunctionResult",3,8],["imSum","FunctionResult",1,72],["imProduct","FunctionResult",1,72],["seriesSum","FunctionResult",4,8],["factDouble","FunctionResult",1,8],["sqrtPi","FunctionResult",1,8],["quotient","FunctionResult",2,8],["delta","FunctionResult",2,8],["geStep","FunctionResult",2,8],["isEven","FunctionResult",1,8],["isOdd","FunctionResult",1,8],["mround","FunctionResult",2,8,0,0,"MRound"],["erf","FunctionResult",2,8],["erfC","FunctionResult",1,8],["besselJ","FunctionResult",2,8],["besselK","FunctionResult",2,8],["besselY","FunctionResult",2,8],["besselI","FunctionResult",2,8],["xirr","FunctionResult",3,8],["xnpv","FunctionResult",3,8],["priceMat","FunctionResult",6,8],["yieldMat","FunctionResult",6,8],["intRate","FunctionResult",5,8],["received","FunctionResult",5,8],["disc","FunctionResult",5,8],["priceDisc","FunctionResult",5,8],["yieldDisc","FunctionResult",5,8],["tbillEq","FunctionResult",3,8,0,0,"TBillEq"],["tbillPrice","FunctionResult",3,8,0,0,"TBillPrice"],["tbillYield","FunctionResult",3,8,0,0,"TBillYield"],["price","FunctionResult",7,8],["yield","FunctionResult",7,8],["dollarDe","FunctionResult",2,8],["dollarFr","FunctionResult",2,8],["nominal","FunctionResult",2,8],["effect","FunctionResult",2,8],["cumPrinc","FunctionResult",6,8],["cumIPmt","FunctionResult",6,8],["edate","FunctionResult",2,8,0,0,"EDate"],["eoMonth","FunctionResult",2,8],["yearFrac","FunctionResult",3,8],["coupDayBs","FunctionResult",4,8],["coupDays","FunctionResult",4,8],["coupDaysNc","FunctionResult",4,8],["coupNcd","FunctionResult",4,8],["coupNum","FunctionResult",4,8],["coupPcd","FunctionResult",4,8],["duration","FunctionResult",6,8],["mduration","FunctionResult",6,8,0,0,"MDuration"],["oddLPrice","FunctionResult",8,8],["oddLYield","FunctionResult",8,8],["oddFPrice","FunctionResult",9,8],["oddFYield","FunctionResult",9,8],["randBetween","FunctionResult",2,8],["weekNum","FunctionResult",2,8],["amorDegrc","FunctionResult",7,8],["amorLinc","FunctionResult",7,8],["convert","FunctionResult",3,8],["accrInt","FunctionResult",8,8],["accrIntM","FunctionResult",5,8],["workDay","FunctionResult",3,8],["networkDays","FunctionResult",3,8],["gcd","FunctionResult",1,72],["multiNomial","FunctionResult",1,72],["lcm","FunctionResult",1,72],["fvschedule","FunctionResult",2,8,0,0,"FVSchedule"],["countIfs","FunctionResult",1,72],["sumIfs","FunctionResult",2,72],["averageIf","FunctionResult",3,8],["averageIfs","FunctionResult",2,72],["binom_Dist","FunctionResult",4,8],["binom_Inv","FunctionResult",3,8],["confidence_Norm","FunctionResult",3,8],["confidence_T","FunctionResult",3,8],["expon_Dist","FunctionResult",3,8],["gamma_Dist","FunctionResult",4,8],["gamma_Inv","FunctionResult",3,8],["norm_Dist","FunctionResult",4,8],["norm_Inv","FunctionResult",3,8],["percentile_Exc","FunctionResult",2,8],["percentile_Inc","FunctionResult",2,8],["percentRank_Exc","FunctionResult",3,8],["percentRank_Inc","FunctionResult",3,8],["poisson_Dist","FunctionResult",3,8],["quartile_Exc","FunctionResult",2,8],["quartile_Inc","FunctionResult",2,8],["rank_Avg","FunctionResult",3,8],["rank_Eq","FunctionResult",3,8],["stDev_S","FunctionResult",1,72],["stDev_P","FunctionResult",1,72],["t_Dist","FunctionResult",3,8],["t_Dist_2T","FunctionResult",2,8],["t_Dist_RT","FunctionResult",2,8],["t_Inv","FunctionResult",2,8],["t_Inv_2T","FunctionResult",2,8],["var_S","FunctionResult",1,72],["var_P","FunctionResult",1,72],["weibull_Dist","FunctionResult",4,8],["networkDays_Intl","FunctionResult",4,8],["workDay_Intl","FunctionResult",4,8],["ecma_Ceiling","FunctionResult",2,8,0,0,"ECMA_Ceiling"],["iso_Ceiling","FunctionResult",2,8,0,0,"ISO_Ceiling"],["beta_Dist","FunctionResult",6,8],["beta_Inv","FunctionResult",5,8],["chiSq_Dist","FunctionResult",3,8],["chiSq_Dist_RT","FunctionResult",2,8],["chiSq_Inv","FunctionResult",2,8],["chiSq_Inv_RT","FunctionResult",2,8],["f_Dist","FunctionResult",4,8],["f_Dist_RT","FunctionResult",3,8],["f_Inv","FunctionResult",3,8],["f_Inv_RT","FunctionResult",3,8],["hypGeom_Dist","FunctionResult",5,8],["logNorm_Dist","FunctionResult",4,8],["logNorm_Inv","FunctionResult",3,8],["negBinom_Dist","FunctionResult",4,8],["norm_S_Dist","FunctionResult",2,8],["norm_S_Inv","FunctionResult",1,8],["z_Test","FunctionResult",3,8],["erf_Precise","FunctionResult",1,8],["erfC_Precise","FunctionResult",1,8],["gammaLn_Precise","FunctionResult",1,8],["ceiling_Precise","FunctionResult",2,8],["floor_Precise","FunctionResult",2,8],["acot","FunctionResult",1,8],["acoth","FunctionResult",1,8],["cot","FunctionResult",1,8],["coth","FunctionResult",1,8],["csc","FunctionResult",1,8],["csch","FunctionResult",1,8],["sec","FunctionResult",1,8],["sech","FunctionResult",1,8],["imTan","FunctionResult",1,8],["imCot","FunctionResult",1,8],["imCsc","FunctionResult",1,8],["imCsch","FunctionResult",1,8],["imSec","FunctionResult",1,8],["imSech","FunctionResult",1,8],["bitand","FunctionResult",2,8],["bitor","FunctionResult",2,8],["bitxor","FunctionResult",2,8],["bitlshift","FunctionResult",2,8],["bitrshift","FunctionResult",2,8],["permutationa","FunctionResult",2,8],["combina","FunctionResult",2,8],["xor","FunctionResult",1,72],["pduration","FunctionResult",3,8,0,0,"PDuration"],["base","FunctionResult",3,8],["decimal","FunctionResult",2,8],["days","FunctionResult",2,8],["binom_Dist_Range","FunctionResult",4,8],["gamma","FunctionResult",1,8],["skew_p","FunctionResult",1,72],["gauss","FunctionResult",1,8],["phi","FunctionResult",1,8],["rri","FunctionResult",3,8],["unichar","FunctionResult",1,8],["unicode","FunctionResult",1,8],["arabic","FunctionResult",1,8],["isoWeekNum","FunctionResult",1,8],["numberValue","FunctionResult",3,8],["sheet","FunctionResult",1,8],["sheets","FunctionResult",1,8],["isFormula","FunctionResult",1,8],["ceiling_Math","FunctionResult",3,8],["floor_Math","FunctionResult",3,8],["imSinh","FunctionResult",1,8],["imCosh","FunctionResult",1,8]]]]},targetNamespaceObject:e})}(Excel||(Excel={}));var _EndExcel="_EndExcel";if("undefined"!==typeof window&&window.OSF&&window.OSF._OfficeAppFactory&&window.OSF._OfficeAppFactory.getHostInfo&&window.OSF._OfficeAppFactory.getHostInfo()){var hostPlatform=window.OSF._OfficeAppFactory.getHostInfo().hostPlatform;"web"===hostPlatform&&(OfficeExtension._internalConfig.enablePreviewExecution=!0)}function exposeOfficeRuntimeThroughOfficeNamespace(e,t){var n,r;"undefined"===typeof e&&"undefined"!==typeof window&&(e=null===window||void 0===window?void 0:window.OfficeRuntime),"undefined"===typeof e&&(e={}),"undefined"!==typeof t&&(t.storage=t.storage||(null===e||void 0===e?void 0:e.storage),t.auth=t.auth||(null===e||void 0===e?void 0:e.auth),t.getAccessToken=t.getAccessToken||(null===(n=null===e||void 0===e?void 0:e.auth)||void 0===n?void 0:n.getAccessToken),t.addin=t.addin||(null===e||void 0===e?void 0:e.addin),t.isSetSupported=t.isSetSupported||(null===(r=null===e||void 0===e?void 0:e.apiInformation)||void 0===r?void 0:r.isSetSupported),t.license=t.license||(null===e||void 0===e?void 0:e.license),t.message=t.message||(null===e||void 0===e?void 0:e.message))}!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=OfficeExtensionBatch},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(2),"undefined"==typeof CustomFunctionMappings&&(window.CustomFunctionMappings={}),"undefined"==typeof Promise&&(window.Promise=Office.Promise),window.OfficeExtensionBatch=window.OfficeExtensionBatch||window.OfficeExtension;var r=n(3);!function(){var e=!1;"undefined"!=typeof OSF&&OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&0!=(2&(OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo().flags))&&(e=!0),(0,r.default)(e)}()},function(e,t){!function(e){"use strict";if(!e.fetch){var t="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,r="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,i="ArrayBuffer"in e;if(i)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=function(e){return e&&DataView.prototype.isPrototypeOf(e)},c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};h.prototype.append=function(e,t){e=d(e),t=f(t);var n=this.map[e];this.map[e]=n?n+","+t:t},h.prototype.delete=function(e){delete this.map[d(e)]},h.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},h.prototype.set=function(e,t){this.map[d(e)]=f(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),p(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),p(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),p(e)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var l=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},O.call(b.prototype),O.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},C.error=function(){var e=new C(null,{status:0,statusText:""});return e.type="error",e};var u=[301,302,303,307,308];C.redirect=function(e,t){if(-1===u.indexOf(t))throw new RangeError("Invalid status code");return new C(null,{status:t,headers:{location:e}})},e.Headers=h,e.Request=b,e.Response=C,e.fetch=function(e,t){return new Promise((function(n,o){var i=new b(e,t),a=new XMLHttpRequest;a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new h,e.split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new C(o,r))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials&&(a.withCredentials=!0),"responseType"in a&&r&&(a.responseType="blob"),i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),a.send(void 0===i._bodyInit?null:i._bodyInit)}))},e.fetch.polyfill=!0}function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function f(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function m(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function y(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function O(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(r&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(o&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(i&&r&&s(e))this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!i||!ArrayBuffer.prototype.isPrototypeOf(e)&&!c(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=v(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,n,r=m(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=g(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function S(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function C(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);t.default=function(e){function t(){Office.onReady((function(e){e.host===Office.HostType.Excel?function e(){CustomFunctionMappings&&CustomFunctionMappings.__delay__?setTimeout(e,50):r.CustomFunctions.initialize()}():console.warn("Warning: Expected to be loaded inside of an Excel add-in.")}))}window.CustomFunctions=window.CustomFunctions||{},window.CustomFunctions.setCustomFunctionInvoker=r.setCustomFunctionInvoker,window.CustomFunctions.Error=r.CustomFunctionError,window.CustomFunctions.ErrorCode=r.ErrorCode,window.CustomFunctions.FormattedNumber=r.CustomFunctionFormattedNumber,window.CustomFunctions.Entity=r.CustomFunctionEntity,window.CustomFunctions.WebImage=r.CustomFunctionWebImage,window.CustomFunctions.Attribution=r.CustomFunctionAttribution,window.CustomFunctions.Provider=r.CustomFunctionProvider,r.setCustomFunctionAssociation(window.CustomFunctions._association),e&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t())}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CustomFunctionsContainer=t.CustomFunctions=t.setCustomFunctionInvoker=t.setCustomFunctionAssociation=t.customFunctionProxy=t.CustomFunctionProxy=t.CreateCustomFunctionInstance=t.CustomFunctionProvider=t.CustomFunctionAttribution=t.CustomFunctionWebImage=t.CustomFunctionFormattedNumber=t.CustomFunctionEntity=t.CustomFunctionError=t.ErrorCode=t.InvocationContext=t.Script=void 0;var i=n(0),a=n(0),s=i.BatchApiHelper.createPropertyObject,c=(i.BatchApiHelper.createMethodObject,i.BatchApiHelper.createIndexerObject,i.BatchApiHelper.createRootServiceObject),l=i.BatchApiHelper.createTopLevelServiceObject,u=(i.BatchApiHelper.createChildItemObject,i.BatchApiHelper.invokeMethod),d=(i.BatchApiHelper.invokeEnsureUnchanged,i.BatchApiHelper.invokeSetProperty,i.Utility.isNullOrUndefined),f=(i.Utility.isUndefined,i.Utility.throwIfNotLoaded,i.Utility.throwIfApiNotSupported),p=i.Utility.load,h=(i.Utility.retrieve,i.Utility.toJson),m=i.Utility.fixObjectPathIfNecessary,g=i.Utility._handleNavigationPropertyResults,y=(i.Utility.adjustToDateTime,i.Utility.processRetrieveResult),v=(i.Utility.setMockData,i.CommonUtility.calculateApiFlags,function(e){function t(t){var n=e.call(this,t)||this;return n.m_customFunctions=T.newObject(n),n.m_container=c(M,n),n._rootObject=n.m_container,n._rootObjectPropertyName="customFunctionsContainer",n._requestFlagModifier=2176,n}return o(t,e),Object.defineProperty(t.prototype,"customFunctions",{get:function(){return this.m_customFunctions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customFunctionsContainer",{get:function(){return this.m_container},enumerable:!1,configurable:!0}),t.prototype._processOfficeJsErrorResponse=function(e,t){5004===e&&(t.ErrorCode=x.invalidOperationInCellEditMode,t.ErrorMessage=i.Utility._getResourceString(i.ResourceStrings.invalidOperationInCellEditMode))},t}(i.ClientRequestContext));t.Script={_CustomFunctionMetadata:{}};var O,b=function(){function e(e,t,n,r,o){this._functionName=e,d(t)||(this._address=t),d(n)||(this._parameterAddresses=n),this.setResult=r,this.setError=o}return Object.defineProperty(e.prototype,"onCanceled",{get:function(){if(!d(this._onCanceled)&&"function"==typeof this._onCanceled)return this._onCanceled},set:function(e){this._onCanceled=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"functionName",{get:function(){return this._functionName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parameterAddresses",{get:function(){return this._parameterAddresses},enumerable:!1,configurable:!0}),e}();t.InvocationContext=b,function(e){e.Info="Medium",e.Error="Unexpected",e.Verbose="Verbose"}(O||(O={}));var S,C=function(e,t){this.Severity=e,this.Message=t},A=function(){function e(){}return e.logEvent=function(t,n,r){if(e.s_shouldLog||i.CoreUtility._logEnabled){var o=t.Severity+" "+t.Message+n;if(r&&(o=o+" "+r),i.Utility.log(o),e.s_shouldLog)switch(t.Severity){case O.Verbose:null!==console.log&&console.log(o);break;case O.Info:null!==console.info&&console.info(o);break;case O.Error:null!==console.error&&console.error(o)}}},e.shouldLog=function(){try{return!d(console)&&!d(window)&&window.name&&"string"==typeof window.name&&JSON.parse(window.name)[e.CustomFunctionLoggingFlag]}catch(e){return i.Utility.log(JSON.stringify(e)),!1}},e.CustomFunctionLoggingFlag="CustomFunctionsRuntimeLogging",e.s_shouldLog=e.shouldLog(),e}();!function(e){e.invalidValue="#VALUE!",e.notAvailable="#N/A",e.divisionByZero="#DIV/0!",e.invalidNumber="#NUM!",e.nullReference="#NULL!",e.invalidName="#NAME?",e.invalidReference="#REF!"}(S=t.ErrorCode||(t.ErrorCode={}));var _=function(e){function t(n,r,o){var i=e.call(this,r||"")||this;return i.type=t.valueType,i.basicType=t.valueType,Object.setPrototypeOf(i,t.prototype),i.code=n||S.invalidValue,i.basicValue=n||S.invalidValue,i.errorSubType=o,i.stack=void 0,i}return o(t,e),t.prototype.toJSON=function(){return{valueType:"CustomFunctionError",code:this.code,type:this.type,basicValue:this.basicValue,basicType:this.type,errorSubType:this.errorSubType,message:this._getMessage(),errorType:this._getErrorType()}},t.prototype._getErrorType=function(){switch(this.basicValue){case S.invalidValue:return"Value";case S.divisionByZero:return"Div0";case S.notAvailable:return"NotAvailable";case S.invalidNumber:return"Num";case S.invalidName:return"Name";case S.invalidReference:return"Ref";case S.nullReference:return"Null";default:return}},t.prototype._getMessage=function(){switch(this.basicValue){case S.invalidValue:case S.notAvailable:return""==this.message?void 0:this.message;case S.divisionByZero:case S.invalidNumber:case S.invalidName:case S.invalidReference:case S.nullReference:default:return}},t.valueType="Error",t}(Error);t.CustomFunctionError=_;var D=function(){function e(t,n){this.type=e.valueType,this.basicValue="#VALUE!",this.basicType="Error",Object.setPrototypeOf(this,e.prototype),this.text=t,this.properties=n}return e.prototype.toJSON=function(){return{type:this.type,text:this.text,basicValue:this.basicValue,basicType:this.basicType,properties:this.properties}},e.valueType="Entity",e}();t.CustomFunctionEntity=D;var F=function(){function e(t,n){this.type=e.valueType,this.basicValue=t,this.numberFormat=n}return e.prototype.toJSON=function(){return{type:this.type,basicValue:this.basicValue,numberFormat:this.numberFormat}},e.valueType="FormattedNumber",e}();t.CustomFunctionFormattedNumber=F;var E=function(){function e(t,n,r,o,i){this.type=e.valueType,this.basicValue="#VALUE!",this.basicType="Error",this.address=t,null!=o&&(this.attribution=o),null!=i&&(this.provider=i),null!=n&&(this.altText=n),null!=r&&(this.relatedImagesAddress=r)}return e.prototype.toJSON=function(){return{type:this.type,basicValue:this.basicValue,basicType:this.basicType,address:this.address,altText:this.altText,relatedImagesAddress:this.relatedImagesAddress,attribution:null==this.attribution?void 0:this.attribution.map((function(e){return e.toJSON()})),provider:null==this.provider?void 0:this.provider.toJSON()}},e.valueType="WebImage",e}();t.CustomFunctionWebImage=E;var P=function(){function e(e,t,n,r){null!=e&&(this.licenseAddress=e),null!=t&&(this.licenseText=t),null!=n&&(this.sourceAddress=n),null!=r&&(this.sourceText=r)}return e.prototype.toJSON=function(){return{licenseAddress:this.licenseAddress,licenseText:this.licenseText,sourceAddress:this.sourceAddress,sourceText:this.sourceText}},e}();t.CustomFunctionAttribution=P;var I=function(){function e(e,t,n){this.description=e,null!=t&&(this.logoSourceAddress=t),null!=n&&(this.logoTargetAddress=n)}return e.prototype.toJSON=function(){return{description:this.description,logoSourceAddress:this.logoSourceAddress,logoTargetAddress:this.logoTargetAddress}},e}();t.CustomFunctionProvider=I,t.CreateCustomFunctionInstance=function e(t){if(t instanceof Array)return t.map((function(t){return e(t)}));if(!(t instanceof Object))return t;var n=JSON.parse(t.value);switch(n.type){case D.valueType:return new D(n.text,n.properties);case F.valueType:return new F(n.primitive,n.numberFormat);case _.valueType:return new _(n.primitive,void 0,n.errorSubCode);case E.valueType:return new E(n.address,n.altText,n.relatedImagesAddress,n.attribution,n.provider);case"Double":case"String":case"Boolean":return n.primitive;default:throw i.Utility.createRuntimeError(x.generalException,"message","CustomFunctionProxy.createRichDataFromJsonString")}};var R=function(){function e(){this._whenInit=void 0,this._isInit=!1,this._setResultsDelayMillis=50,this._setResultsOverdueDelayMillis=2e3,this._maxContextSyncExecutionDurationMills=15e3,this._minContextSyncIntervalMills=500,this._smallerMinContextSyncIntervalMills=200,this._maxContextSyncIntervalMills=2e3,this._setResultsLifeMillis=6e4,this._ensureInitRetryDelayMillis=500,this._resultEntryBuffer={},this._resultEntryRetryBuffer={},this._retryBufferBodySize=0,this._isSetResultsTaskScheduled=!1,this._setResultsTaskOverdueTime=0,this._inProgressContextSyncExpectedFinishTime=0,this._batchQuotaMillis=1e3,this._invocationContextMap={},this._maxResultSize=2e6}return e.prototype._initSettings=function(){if("object"==typeof t.Script&&"object"==typeof t.Script._CustomFunctionSettings){if("number"==typeof t.Script._CustomFunctionSettings.setResultsDelayMillis){var e=t.Script._CustomFunctionSettings.setResultsDelayMillis;e=Math.max(0,e),e=Math.min(1e3,e),this._setResultsDelayMillis=e}if("number"==typeof t.Script._CustomFunctionSettings.ensureInitRetryDelayMillis){var n=t.Script._CustomFunctionSettings.ensureInitRetryDelayMillis;n=Math.max(0,n),n=Math.min(2e3,n),this._ensureInitRetryDelayMillis=n}if("number"==typeof t.Script._CustomFunctionSettings.setResultsLifeMillis){var r=t.Script._CustomFunctionSettings.setResultsLifeMillis;r=Math.max(0,r),r=Math.min(6e5,r),this._setResultsLifeMillis=r}if("number"==typeof t.Script._CustomFunctionSettings.batchQuotaMillis){var o=t.Script._CustomFunctionSettings.batchQuotaMillis;o=Math.max(0,o),o=Math.min(1e3,o),this._batchQuotaMillis=o}}},e.prototype.ensureInit=function(e){var t=this;return this._initSettings(),void 0===this._whenInit&&(this._whenInit=i.Utility._createPromiseFromResult(null).then((function(){if(!t._isInit)return e.eventRegistration.register(5,"",t._handleMessage.bind(t))})).then((function(){t._isInit=!0}))),this._isInit||e._pendingRequest._addPreSyncPromise(this._whenInit),this._whenInit},e.prototype.setCustomFunctionInvoker=function(e){"object"==typeof CustomFunctionMappings&&delete CustomFunctionMappings.__delay__,this._invoker=e},e.prototype.setCustomFunctionAssociation=function(e){var t=this;this._customFunctionMappingsUpperCase=void 0,this._association=e,this._association&&this._association.onchange((function(){t._customFunctionMappingsUpperCase=void 0}))},e.prototype._initFromHostBridge=function(e){var t=this;this._initSettings(),e.addHostMessageHandler((function(e){3===e.type?t._handleMessage(e.message):4===e.type&&t._handleSettings(e.message)})),this._isInit=!0,this._whenInit=i.CoreUtility.Promise.resolve()},e.prototype._handleSettings=function(e){i.Utility.log("CustomFunctionProxy._handleSettings:"+JSON.stringify(e)),e&&"object"==typeof e&&(A.s_shouldLog=e[A.CustomFunctionLoggingFlag])},e.prototype._handleMessage=function(t){try{i.Utility.log("CustomFunctionProxy._handleMessage"),i.Utility.checkArgumentNull(t,"args");for(var n=t.entries,r=[],o=[],a=[],s=0;s0&&this._handleMetadataEntries(a),r.length>0){var c=this._batchInvocationEntries(r);c.length>0&&this._invokeRemainingBatchEntries(c,0)}o.length>0&&this._handleCancellationEntries(o)}catch(t){throw e._tryLog(t),t}return i.Utility._createPromiseFromResult(null)},e.toLogMessage=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t},e._tryLog=function(t){var n=e.toLogMessage(t);i.Utility.log(n)},e.prototype._handleMetadataEntries=function(e){for(var n=0;n0&&e>this._setResultsTaskOverdueTime)return i.Utility.log("SetResultsTask overdue"),void this._executeSetResultsTask();this._isSetResultsTaskScheduled||(i.Utility.log("setTimeout(CustomFunctionProxy._executeSetResultsTask)"),setTimeout(this._executeSetResultsTask.bind(this),this._setResultsDelayMillis),this._isSetResultsTaskScheduled=!0,this._setResultsTaskOverdueTime=e+this._setResultsDelayMillis+this._setResultsOverdueDelayMillis)},e.prototype._convertCustomFunctionInvocationResultToArray=function(e){var t=[];return t.push(e.id),t.push(!e.failed),i.CoreUtility.isUndefined(e.value)?t.push(null):t.push(e.value),e.failed&&(i.CoreUtility.isUndefined(e.errorCode)?t.push(0):t.push(e.errorCode)),i.Utility.isSetSupported("CustomFunctions","1.9")&&t.push(e.outboundData),t},e.prototype._executeSetResultsTask=function(){var e=this;i.Utility.log("CustomFunctionProxy._executeSetResultsTask");var t=Date.now();if(this._inProgressContextSyncExpectedFinishTime>0&&this._inProgressContextSyncExpectedFinishTime>t)return i.Utility.log("context.sync() is in progress. setTimeout(CustomFunctionProxy._executeSetResultsTask)"),setTimeout(this._executeSetResultsTask.bind(this),this._setResultsDelayMillis),void(this._setResultsTaskOverdueTime=t+this._setResultsDelayMillis+this._setResultsOverdueDelayMillis);this._isSetResultsTaskScheduled=!1,this._setResultsTaskOverdueTime=0;var n={},r=!1;T.isFeatureEnabled(1)&&Object.keys(this._resultEntryRetryBuffer).length>0?(n=this._resultEntryRetryBuffer,this._resultEntryRetryBuffer={},this._retryBufferBodySize=2,r=!0):(n=this._resultEntryBuffer,this._resultEntryBuffer={});var o=i.Utility.isSetSupported("CustomFunctions","1.7"),a=[];for(var s in n)o?a.push(this._convertCustomFunctionInvocationResultToArray(n[s].result)):a.push(n[s].result);if(0!==a.length){var c=new v;o?c.customFunctions.setInvocationArrayResults(a):c.customFunctions.setInvocationResults(a);var l=Date.now();this._inProgressContextSyncExpectedFinishTime=l+this._maxContextSyncExecutionDurationMills,c.sync().then((function(t){var n=Date.now();e._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(n-l),r&&e._ensureSetResultsTaskIsScheduled(n)}),(function(t){var r=Date.now();e._clearInProgressContextSyncExpectedFinishTimeAfterMinInterval(r-l),T.isFeatureEnabled(1)&&t.code==i.ErrorCodes.requestPayloadSizeLimitExceeded?e._restoreAndSliceResultEntries(r,n):e._restoreResultEntries(r,n),e._ensureSetResultsTaskIsScheduled(r)}))}},e.prototype._restoreResultEntries=function(e,t){for(var n in t){var r=t[n];e-r.timeCreated<=this._setResultsLifeMillis&&(this._resultEntryBuffer[n]||(this._resultEntryBuffer[n]=r))}},e.prototype._restoreAndSliceResultEntries=function(e,t){for(var n in t){var r=t[n],o=void 0;if(e-r.timeCreated<=this._setResultsLifeMillis&&!this._resultEntryBuffer[n]){try{o=JSON.stringify(this._convertCustomFunctionInvocationResultToArray(r.result)).length+1}catch(e){this._resultEntryBuffer[n]=r,i.Utility.log("Result can't pass in JSON.stringify");continue}this._retryBufferBodySize+o=0},n.initialize=function(){var e=this,r=new v;return t.customFunctionProxy.ensureInit(r).then((function(){var o;return r.customFunctions._SetOsfControlContainerReadyForCustomFunctions(),i.Utility.isSetSupported("CustomFunctions","1.9")&&(o=r.customFunctions._GetEnabledFeatures()),i.Utility.log("OsfControl activation lifecycle: Set OsfControlContainer ready for CustomFunctions"),r._customData="SetOsfControlContainerReadyForCustomFunctions",r.sync().then((function(){d(o)||(e._enabledFeature=o.value)})).catch((function(e){!function(e,r){var o=e instanceof i.Error&&e.code===x.invalidOperationInCellEditMode;if(i.CoreUtility.log("Error on starting custom functions: "+e),o){i.CoreUtility.log("Was in cell-edit mode, will try again");var a=t.customFunctionProxy._ensureInitRetryDelayMillis;return new i.CoreUtility.Promise((function(e){return setTimeout(e,a)})).then((function(){return n.initialize()}))}throw e}(e)}))}))},n.prototype.setInvocationArrayResults=function(e){f("CustomFunctions.setInvocationArrayResults","CustomFunctions","1.4","Excel"),u(this,"SetInvocationArrayResults",0,[e],2,0)},n.prototype.setInvocationResults=function(e){u(this,"SetInvocationResults",0,[e],2,0)},n.prototype._GetEnabledFeatures=function(){return f("CustomFunctions._GetEnabledFeatures","CustomFunctions","1.4","Excel"),u(this,"_GetEnabledFeatures",1,[],4,0)},n.prototype._SetInvocationError=function(e,t){u(this,"_SetInvocationError",0,[e,t],2,0)},n.prototype._SetInvocationResult=function(e,t){u(this,"_SetInvocationResult",0,[e,t],2,0)},n.prototype._SetOsfControlContainerReadyForCustomFunctions=function(){u(this,"_SetOsfControlContainerReadyForCustomFunctions",0,[],10,0)},n.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),d(t)||m(this,t)},n.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),y(this,t,n)},n.newObject=function(e){return l(n,e,"Microsoft.ExcelServices.CustomFunctions",!1,4)},n.prototype.toJSON=function(){return h(this,{},{})},n}(i.ClientObject);t.CustomFunctions=T;var x,M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"CustomFunctionsContainer"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_navigationPropertyNames",{get:function(){return["customFunctions"]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customFunctions",{get:function(){return f("CustomFunctionsContainer.customFunctions","CustomFunctions","1.2","Excel"),this._C||(this._C=s(T,this,"CustomFunctions",!1,4)),this._C},enumerable:!1,configurable:!0}),t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!d(t)){var n=t;m(this,n),g(this,n,["customFunctions","CustomFunctions"])}},t.prototype.load=function(e){return p(this,e)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),y(this,t,n)},t.prototype.toJSON=function(){return h(this,{},{})},t}(i.ClientObject);t.CustomFunctionsContainer=M,function(e){e.generalException="GeneralException",e.invalidOperation="InvalidOperation",e.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"}(x||(x={}))}]),OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel=!0,OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria=!1,window.OfficeExtensionBatch=window.OfficeExtension,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=OfficeExtensionBatch},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=2&&(r=Number(n[1])),n.length>=3&&(o=Number(n[2])),isNaN(t)||isNaN(r)||isNaN(o))throw"version format incorrect";return{major:t,minor:r,patch:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.apiInformation=void 0,t.apiInformation={isSetSupported:function(t,r){if("string"!=typeof t)return!1;if(null==r&&(r="0.0.0"),void 0===e.__apiSets)return!1;var o=e.__apiSets,i=Object.keys(o).map((function(e){return e.toLowerCase()})).indexOf(t.toLowerCase());if(i>-1){var a=o[Object.keys(o)[i]];try{var s,c=n(r);if((s=Array.isArray(a)?function(e,t){for(var r=0;r0){if(s.major>c.major)return!0;if(s.major==c.major&&s.minor>c.minor)return!0;if(s.major==c.major&&s.minor==c.minor&&s.patch>=c.patch)return!0}}catch(e){return!1}}return!1}}}).call(this,n(3))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DialogErrorCodes=t.DialogService=t.displayWebDialog=t.Dialog=void 0;var i=n(0),a=(i.BatchApiHelper.createPropertyObject,i.BatchApiHelper.createMethodObject,i.BatchApiHelper.createIndexerObject,i.BatchApiHelper.createRootServiceObject,i.BatchApiHelper.createTopLevelServiceObject),s=(i.BatchApiHelper.createChildItemObject,i.BatchApiHelper.invokeMethod),c=(i.BatchApiHelper.invokeEnsureUnchanged,i.BatchApiHelper.invokeSetProperty,i.Utility.isNullOrUndefined),l=(i.Utility.isUndefined,i.Utility.throwIfNotLoaded,i.Utility.throwIfApiNotSupported,i.Utility.load,i.Utility.retrieve,i.Utility.toJson),u=i.Utility.fixObjectPathIfNecessary,d=(i.Utility._handleNavigationPropertyResults,i.Utility.adjustToDateTime,i.Utility.processRetrieveResult),f=(i.Utility.setMockData,i.CommonUtility.calculateApiFlags,function(){function e(e){this._dialogService=e}return e.prototype.close=function(){return this._dialogService.close(),this._dialogService.context.sync()},e}());t.Dialog=f,t.displayWebDialog=function(e,t){return void 0===t&&(t={}),new i.CoreUtility.Promise((function(r,o){if(t.width&&t.height&&(!n(t.width)||!n(t.height)))throw new i.Error({code:"InvalidArgument",message:'Dimensions must be "number%" or number.'});var a=new i.ClientRequestContext,s=h.newObject(a),c=new f(s),l=s.onDialogMessage.add((function(e){switch(i.Utility.log("dialogMessageHandler:"+JSON.stringify(e)),e.type){case 17:e.error?o(e.error):r(c);break;case 12:t.onMessage&&t.onMessage(e.message,c,e.origin);break;case 10:default:12006===e.originalErrorCode?(l&&(l.remove(),a.sync()),t.onClose&&t.onClose()):t.onRuntimeError&&(t.onRuntimeError(e.error,c),o(e.error))}return i.CoreUtility.Promise.resolve()}));return a.sync().then((function(){var n={width:t.width?parseInt(t.width):50,height:t.height?parseInt(t.height):50,displayInIFrame:t.displayInIFrame};return s.displayDialog(e,n),a.sync()})).catch((function(e){o(e)}))}));function n(e){return/^(\-|\+)?([0-9]+)%?$/.test(e)}};var p,h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"DialogService"},enumerable:!1,configurable:!0}),t.prototype.close=function(){s(this,"Close",1,[],4,0)},t.prototype.displayDialog=function(e,t){s(this,"DisplayDialog",1,[e,t],4,0)},t.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),c(t)||u(this,t)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),d(this,t,n)},t.newObject=function(e){return a(t,e,"Microsoft.Dialog.DialogService",!1,4)},Object.defineProperty(t.prototype,"onDialogMessage",{get:function(){return this.m_dialogMessage||(this.m_dialogMessage=new i.GenericEventHandlers(this.context,this,"DialogMessage",{eventType:65536,registerFunc:function(){},unregisterFunc:function(){},getTargetIdFunc:function(){return null},eventArgsTransformFunc:function(e){var t,n,r,o;try{var a=JSON.parse(e.message),s=a.errorCode?new i.Error((n=a.errorCode,(r={})[12002]={code:"InvalidUrl",message:"Cannot load URL, no such page or bad URL syntax."},r[12003]={code:"InvalidUrl",message:"HTTPS is required."},r[12004]={code:"Untrusted",message:"Domain is not trusted."},r[12005]={code:"InvalidUrl",message:"HTTPS is required."},r[12007]={code:"FailedToOpen",message:"Another dialog is already opened."},(o=r)[n]?o[n]:{code:"Unknown",message:"An unknown error has occured with code: "+n})):null;t={originalErrorCode:a.errorCode,type:a.type,error:s,message:a.message,origin:a.origin}}catch(e){t={originalErrorCode:null,type:17,error:new i.Error({code:"GenericException",message:"Unknown error"}),message:e.message}}return i.Utility._createPromiseFromResult(t)}})),this.m_dialogMessage},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return l(this,{},{})},t}(i.ClientObject);t.DialogService=h,function(e){e[e.dialogMessageReceived=0]="dialogMessageReceived",e[e.dialogEventReceived=1]="dialogEventReceived"}(p||(p={})),function(e){e.generalException="GeneralException"}(t.DialogErrorCodes||(t.DialogErrorCodes={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCodes=t.PersistentKvStorageService=t.storage=t.AsyncStorage=void 0;var i=n(0),a=(i.BatchApiHelper.createPropertyObject,i.BatchApiHelper.createMethodObject,i.BatchApiHelper.createIndexerObject,i.BatchApiHelper.createRootServiceObject,i.BatchApiHelper.createTopLevelServiceObject),s=(i.BatchApiHelper.createChildItemObject,i.BatchApiHelper.invokeMethod),c=(i.BatchApiHelper.invokeEnsureUnchanged,i.BatchApiHelper.invokeSetProperty,i.Utility.isNullOrUndefined),l=(i.Utility.isUndefined,i.Utility.throwIfNotLoaded,i.Utility.throwIfApiNotSupported,i.Utility.load,i.Utility.retrieve,i.Utility.toJson),u=i.Utility.fixObjectPathIfNecessary,d=(i.Utility._handleNavigationPropertyResults,i.Utility.adjustToDateTime,i.Utility.processRetrieveResult);function f(e,t){return new i.CoreUtility.Promise((function(n,r){var o=h.getInstance(),i=o.setCallBack((function(e,o){if(o)r(o);else{var i=t(e);n(i)}}));o.ctx.sync().then((function(){var t=o.getPersistentKvStorageService();return e(t,i),o.ctx.sync()})).catch((function(e){r(e)}))}))}function p(e,t,n){return new i.CoreUtility.Promise((function(r,o){var i=h.getInstance(),a=i.setCallBack((function(e,i){if(i)return n&&n(i),void o(i);var a=t(e);n&&n(null,a),r(a)}));i.ctx.sync().then((function(){var t=i.getPersistentKvStorageService();return e(t,a),i.ctx.sync()})).catch((function(e){o(e)}))}))}i.Utility.setMockData,i.CommonUtility.calculateApiFlags,t.AsyncStorage={getItem:function(e,t){return p((function(t,n){return t.multiGet(n,JSON.stringify([e]))}),(function(e){var t=JSON.parse(e);return t&&t[0]&&t[0][1]?t[0][1]:null}),t)},setItem:function(e,t,n){return p((function(n,r){return n.multiSet(r,JSON.stringify([[e,t]]))}),(function(){return null}),n)},removeItem:function(e,t){return p((function(t,n){return t.multiRemove(n,JSON.stringify([e]))}),(function(){return null}),t)},multiGet:function(e,t){return p((function(t,n){return t.multiGet(n,JSON.stringify(e))}),(function(t){var n=JSON.parse(t),r={};return n&&n.forEach((function(e){var t=e[0],n=e[1];return r[t]=n,n})),e.map((function(e){return[e,r[e]?r[e]:null]}))}),t)},multiSet:function(e,t){return p((function(t,n){return t.multiSet(n,JSON.stringify(e))}),(function(){return null}),t)},multiRemove:function(e,t){return p((function(t,n){return t.multiRemove(n,JSON.stringify(e))}),(function(){return null}),t)},getAllKeys:function(e){return p((function(e,t){return e.getAllKeys(t)}),(function(e){return JSON.parse(e)}),e)},clear:function(e){return p((function(e,t){return e.clear(t)}),(function(){return null}),e)}},t.storage={getItem:function(e){return f((function(t,n){return t.multiGet(n,JSON.stringify([e]))}),(function(e){var t=JSON.parse(e);return t&&t[0]&&t[0][1]?t[0][1]:null}))},setItem:function(e,t){return f((function(n,r){return n.multiSet(r,JSON.stringify([[e,t]]))}),(function(){return null}))},removeItem:function(e){return f((function(t,n){return t.multiRemove(n,JSON.stringify([e]))}),(function(){return null}))},getItems:function(e){return f((function(t,n){return t.multiGet(n,JSON.stringify(e))}),(function(t){var n=JSON.parse(t),r={};return e.forEach((function(e){r[e]=null})),n&&n.forEach((function(e){var t=e[0],n=e[1];return r[t]=n,n})),r}))},setItems:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push([n,e[n]]);return f((function(e,n){return e.multiSet(n,JSON.stringify(t))}),(function(){return null}))},removeItems:function(e){return f((function(t,n){return t.multiRemove(n,JSON.stringify(e))}),(function(){return null}))},getKeys:function(){return f((function(e,t){return e.getAllKeys(t)}),(function(e){return JSON.parse(e)}))}};var h=function(){function e(){var e=this;this._invokeId=0,this._callDict={},this.ctx=new i.ClientRequestContext,this._perkvstorService=m.newObject(this.ctx),this._eventResult=this._perkvstorService.onPersistentStorageMessage.add((function(t){i.Utility.log("persistentKvStoragegMessageHandler:"+JSON.stringify(t));var n=e._callDict[t.invokeId];n&&(n(t.message,t.error),delete e._callDict[t.invokeId])}))}return e.getInstance=function(){return void 0===e.instance?e.instance=new e:e.instance._perkvstorService=m.newObject(e.instance.ctx),e.instance},e.prototype.getPersistentKvStorageService=function(){return this._perkvstorService},e.prototype.getCallBack=function(e){return this._callDict[e]},e.prototype.setCallBack=function(e){var t=this._invokeId;return this._callDict[this._invokeId++]=e,t},e}(),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"PersistentKvStorageService"},enumerable:!1,configurable:!0}),t.prototype.clear=function(e){s(this,"Clear",1,[e],4,0)},t.prototype.getAllKeys=function(e){s(this,"GetAllKeys",1,[e],4,0)},t.prototype.multiGet=function(e,t){s(this,"MultiGet",1,[e,t],4,0)},t.prototype.multiRemove=function(e,t){s(this,"MultiRemove",1,[e,t],4,0)},t.prototype.multiSet=function(e,t){s(this,"MultiSet",1,[e,t],4,0)},t.prototype._handleResult=function(t){e.prototype._handleResult.call(this,t),c(t)||u(this,t)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),d(this,t,n)},t.newObject=function(e){return a(t,e,"Microsoft.PersistentKvStorage.PersistentKvStorageService",!1,4)},Object.defineProperty(t.prototype,"onPersistentStorageMessage",{get:function(){return this.m_persistentStorageMessage||(this.m_persistentStorageMessage=new i.GenericEventHandlers(this.context,this,"PersistentStorageMessage",{eventType:65537,registerFunc:function(){},unregisterFunc:function(){},getTargetIdFunc:function(){return null},eventArgsTransformFunc:function(e){var t,n,r,o;try{var a=JSON.parse(e.message),s=parseInt(a.errorCode),c=0!=s?new i.Error((n=s,(r={})[16389]={code:"GenericException",message:"Unknown error."},r[65535]={code:"Unexcepted",message:"Catastrophic failure."},r[14]={code:"OutOfMemory",message:"Ran out of memory."},r[87]={code:"InvalidArg",message:"One or more arguments are invalid."},r[16385]={code:"NotImplemented",message:"Not implemented."},r[6]={code:"BadHandle",message:"File Handle is not Set."},r[5]={code:"AccessDenied",message:"Can't read the Storage File."},(o=r)[n]?o[n]:{code:"Unknown",message:"An unknown error has occured"})):null;t={invokeId:a.invokeId,message:a.message,error:c}}catch(e){t={invokeId:-1,message:e.message,error:new i.Error({code:"GenericException",message:"Unknown error"})}}return i.Utility._createPromiseFromResult(t)}})),this.m_persistentStorageMessage},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return l(this,{},{})},t}(i.ClientObject);t.PersistentKvStorageService=m,function(e){e.generalException="GeneralException"}(t.ErrorCodes||(t.ErrorCodes={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiGet=t.multiRemove=t.multiSet=t.getAllKeys=t.clear=t.removeItem=t.setItem=t.getItem=void 0;var r="_Office_AsyncStorage_";function o(){window.localStorage.setItem("_Office_AsyncStorage_|_unusedKey_",null),window.localStorage.removeItem("_Office_AsyncStorage_|_unusedKey_")}function i(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,r){try{o(),e(),t(null),n()}catch(e){t(e),r(e)}}))}function a(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,r){try{o();var i=e();t(null,i),n(i)}catch(e){t(e,null),r(e)}}))}function s(e,t,n){return void 0===n&&(n=function(){}),new Promise((function(r,i){var a=[];try{o()}catch(e){a.push(e)}e.forEach((function(e){try{t(e)}catch(e){a.push(e)}})),n(a),a.length>0?i(a):r()}))}t.getItem=function(e,t){return a((function(){return window.localStorage.getItem(r+e)}),t)},t.setItem=function(e,t,n){return i((function(){return window.localStorage.setItem(r+e,t)}),n)},t.removeItem=function(e,t){return i((function(){return window.localStorage.removeItem(r+e)}),t)},t.clear=function(e){return i((function(){Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).forEach((function(e){return window.localStorage.removeItem(e)}))}),e)},t.getAllKeys=function(e){return a((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).map((function(e){return e.substr(r.length)}))}),e)},t.multiSet=function(e,t){return s(e,(function(e){var t=e[0],n=e[1];return window.localStorage.setItem(r+t,n)}),t)},t.multiRemove=function(e,t){return s(e,(function(e){return window.localStorage.removeItem(r+e)}),t)},t.multiGet=function(e,t){return new Promise((function(n,o){t||(t=function(){});var i=[],a=e.map((function(e){try{return[e,window.localStorage.getItem(r+e)]}catch(e){i.push(e)}})).filter((function(e){return e}));i.length>0?(t(i,a),o(i)):(t(null,a),n(a))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storage=void 0;var r="_OfficeRuntime_Storage_";function o(){window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_",null),window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_")}function i(e){return new Promise((function(t,n){try{o(),e(),t()}catch(e){n(e)}}))}function a(e){return new Promise((function(t,n){try{o(),t(e())}catch(e){n(e)}}))}function s(e,t){return new Promise((function(n,r){var i=[];try{o()}catch(e){i.push(e)}for(var a in e)if(e.hasOwnProperty(a)||Array.isArray(e))try{Array.isArray(e)?t(e[a]):t(a)}catch(e){i.push(e)}i.length>0?r(new Error("Unknown error.")):n()}))}t.storage={getItem:function(e){return a((function(){return window.localStorage.getItem(r+e)}))},setItem:function(e,t){return i((function(){return window.localStorage.setItem(r+e,t)}))},removeItem:function(e){return i((function(){return window.localStorage.removeItem(r+e)}))},getItems:function(e){return new Promise((function(t,n){var i={},a=[];try{o()}catch(e){n(e)}e.forEach((function(e){try{var t=window.localStorage.getItem(r+e);i[e]=t||null}catch(e){a.push(e)}})),a.length>0?n(new Error("Unknown error.")):t(i)}))},setItems:function(e){return s(e,(function(t){return window.localStorage.setItem(r+t,e[t])}))},removeItems:function(e){return s(e,(function(e){window.localStorage.removeItem(r+e)}))},getKeys:function(){return a((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(r)})).map((function(e){return e.substr(r.length)}))}))}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex === 0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive = bucketPositive.sort(function (left, right) { + var diff = left.tabIndex - right.tabIndex; + if (diff === 0) { + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + return { + set_entropy: function OSF_OUtil$set_entropy(entropy) { + if (typeof entropy == "string") { + for (var i = 0; i < entropy.length; i += 4) { + var temp = 0; + for (var j = 0; j < 4 && i + j < entropy.length; j++) { + temp = (temp << 8) + entropy.charCodeAt(i + j); + } + _rndentropy ^= temp; + } + } + else if (typeof entropy == "number") { + _rndentropy ^= entropy; + } + else { + _rndentropy ^= 0x7fffffff * Math.random(); + } + _rndentropy &= 0x7fffffff; + }, + extend: function OSF_OUtil$extend(child, parent) { + var F = function () { }; + F.prototype = parent.prototype; + child.prototype = new F(); + child.prototype.constructor = child; + child.uber = parent.prototype; + if (parent.prototype.constructor === Object.prototype.constructor) { + parent.prototype.constructor = parent; + } + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name] = {}; + } + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { + if (parent && name && parent[name]) { + delete parent[name]; + } + }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret = {}; + for (var key in settingsCollection) { + var value = settingsCollection[key]; + try { + if (JSON) { + value = JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret = {}; + serializedSettings = serializedSettings || {}; + for (var key in serializedSettings) { + var value = serializedSettings[key]; + try { + if (JSON) { + value = JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if (!_loadedScriptEntry) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + var onLoadTimeOut = function OSF_OUtil_loadScript$onLoadTimeOut() { + if (window.navigator.userAgent.indexOf("Trident") > 0) { + onLoadError(null); + } + else { + onLoadError(new Event("Script load timed out")); + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError(errorEvent) { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(errorEvent); + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadTimeOut, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) { + if (url) { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link); + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { + var parsed = enumObject[str.trim()]; + if (typeof (parsed) == 'undefined') { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed; + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { + var obj = { calc: arguments[0] }; + return function () { + if (obj.calc) { + obj.val = obj.calc.apply(this, arguments); + delete obj.calc; + } + return obj.val; + }; + }, + getUniqueId: function OSF_OUtil$getUniqueId() { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString(); + }, + formatString: function OSF_OUtil$formatString() { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10) + 1; + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }, + generateConversationId: function OSF_OUtil$generateConversationId() { + return [_random(), _random(), (new Date()).getTime().toString()].join('_'); + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId(); + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { + return OSF.OUtil.addInfoAsHash(url, _xdmInfoKey, xdmInfoValue, false); + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) { + return OSF.OUtil.addInfoAsHash(url, _serializerVersionKey, serializerVersion, true); + }, + addFlightsAsHash: function OSF_OUtil$addFlightsAsHash(url, flights) { + return OSF.OUtil.addInfoAsHash(url, _flightsKey, flights, true); + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) { + url = url.trim() || ''; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if (encodeInfo) { + newFragment = [keyName, encodeURIComponent(infoValue), fragment].join(''); + } + else { + newFragment = [fragment, keyName, infoValue].join(''); + } + return [urlWithoutFragment, _fragmentSeparator, newFragment].join(''); + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.HostInfo); + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.XdmInfo); + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.SerializerVersion)); + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseFlights: function OSF_OUtil$parseFlights(skipSessionStorage) { + var flights = OSF.OUtil.parseFlightsWithGivenFragment(skipSessionStorage, window.location.hash); + if (flights.length == 0) { + flights = OSF.OUtil.parseFlightsFromWindowName(skipSessionStorage, window.name); + } + return flights; + }, + checkFlight: function OSF_OUtil$checkFlightEnabled(flight) { + return OSF.Flights && OSF.Flights.indexOf(flight) >= 0; + }, + pushFlight: function OSF_OUtil$pushFlight(flight) { + if (OSF.Flights.indexOf(flight) < 0) { + OSF.Flights.push(flight); + return true; + } + return false; + }, + getBooleanSetting: function OSF_OUtil$getSetting(settingName) { + return OSF.OUtil.getBooleanFromDictionary(OSF.Settings, settingName); + }, + getBooleanFromDictionary: function OSF_OUtil$getBooleanFromDictionary(settings, settingName) { + var result = (settings && settingName && settings[settingName] !== undefined && settings[settingName] && + ((typeof (settings[settingName]) === "string" && settings[settingName].toUpperCase() === 'TRUE') || + (typeof (settings[settingName]) === "boolean" && settings[settingName]))); + return result !== undefined ? result : false; + }, + getIntFromDictionary: function OSF_OUtil$getIntFromDictionary(settings, settingName) { + if (settings && settingName && settings[settingName] !== undefined && (typeof settings[settingName] === "string")) { + return parseInt(settings[settingName]); + } + else { + return NaN; + } + }, + pushIntFlight: function OSF_OUtil$pushIntFlight(flight, flightValue) { + if (!(flight in OSF.IntFlights)) { + OSF.IntFlights[flight] = flightValue; + return true; + } + return false; + }, + getIntFlight: function OSF_OUtil$getIntFlight(flight) { + if (OSF.IntFlights && (flight in OSF.IntFlights)) { + return OSF.IntFlights[flight]; + } + else { + return NaN; + } + }, + parseFlightsFromWindowName: function OSF_OUtil$parseFlightsFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.Flights)); + }, + parseFlightsWithGivenFragment: function OSF_OUtil$parseFlightsWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(_flightsKey, _flightsKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseArrayWithDefault: function OSF_OUtil$parseArrayWithDefault(jsonString) { + var array = []; + try { + array = JSON.parse(jsonString); + } + catch (ex) { } + if (!Array.isArray(array)) { + array = []; + } + return array; + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj != null) { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue != null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >= 0) { + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue = decodeURIComponent(infoValue); + } + var osfSessionStorage = _getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd = window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd == -1) { + sessionKeyEnd = window.name.length; + } + var sessionKey = window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString = window.location.search; + var conversationId = null; + if (searchString) { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1) === '=') { + conversationId = conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId = decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) { + var items = strInfo.split("$"); + if (typeof items[1] == "undefined") { + items = strInfo.split("|"); + } + if (typeof items[1] == "undefined") { + items = strInfo.split("%7C"); + } + return items; + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue = ''; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if (items != undefined && items.length >= 3) { + switch (xdmFieldName) { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break; + } + } + } + return fieldValue; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e = Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) + throw e; + for (var p in expectedProperties) { + e = Function._validateParameter(params[p], expectedProperties[p], p); + if (e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) { + if (typeof (OsfMsAjaxFactory) !== 'undefined' && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) { + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor = descriptor || {}; + for (var nd in attributes) { + var attribute = attributes[nd]; + if (descriptor[attribute] == undefined) { + descriptor[attribute] = true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors = descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for (var i = 0; i < propsLength; i++) { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable = descriptor.writable || false; + } + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret = []; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key == item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value == list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add = list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key] = value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2] = newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj) === "[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj) === "[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj) === "[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.attachEvent) { + element.attachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && element.detachEvent) { + element.detachEvent("on" + eventName, listener); + } + else { + element["on" + eventName] = null; + } + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) { + var xmlhttp; + try { + xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function () { + if (xmlhttp.readyState == 4) { + if (xmlhttp.status == 200) { + onSuccess(xmlhttp.responseText); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + if (!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, c2, c3, a, b, c; + var i; + var length = input.length; + do { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + if (!isNaN(c2)) { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = ((a & 3) << 4) | (b >> 4); + temp[i++] = ((b & 15) << 2) | (c >> 6); + temp[i++] = c & 63; + } + if (isNaN(c2)) { + temp[i - 1] = 64; + } + else if (isNaN(c3)) { + temp[i - 2] = 64; + temp[i - 1] = 64; + } + for (var t = 0; t < i; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getSessionStorage: function OSF_Outil$getSessionStorage() { + return _getSessionStorage(); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage = window.localStorage; + } + catch (ex) { + localStorage = null; + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage); + } + return _safeLocalStorage; + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) { + var hex = "#" + (Number(val) + 0x1000000).toString(16).slice(-6); + return hex; + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) { + element.onclick = function (e) { + handler(); + }; + element.ontouchend = function (e) { + handler(); + e.preventDefault(); + }; + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) { + var e = Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: false }, + { name: "paramName", type: String, mayBeNull: false } + ]); + if (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return ""; + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)", "i"); + if (!queryExp.test(queryString)) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return ""; + } + return queryExp.exec(queryString)[1]; + }, + getHostnamePortionForLogging: function OSF_Outil$getHostnamePortionForLogging(hostname) { + var e = Function._validateParams(arguments, [{ name: "hostname", type: String, mayBeNull: false } + ]); + if (e) { + return ""; + } + var hostnameSubstrings = hostname.split('.'); + var len = hostnameSubstrings.length; + if (len >= 2) { + return hostnameSubstrings[len - 2] + "." + hostnameSubstrings[len - 1]; + } + else if (len == 1) { + return hostnameSubstrings[0]; + } + }, + isiOS: function OSF_Outil$isiOS() { + return (window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false); + }, + isChrome: function OSF_Outil$isChrome() { + return (window.navigator.userAgent.indexOf("Chrome") > 0) && !OSF.OUtil.isEdge(); + }, + isEdge: function OSF_Outil$isEdge() { + return window.navigator.userAgent.indexOf("Edge") > 0; + }, + isIE: function OSF_Outil$isIE() { + return window.navigator.userAgent.indexOf("Trident") > 0; + }, + isFirefox: function OSF_Outil$isFirefox() { + return window.navigator.userAgent.indexOf("Firefox") > 0; + }, + startsWith: function OSF_Outil$startsWith(originalString, patternToCheck, browserIsIE) { + if (browserIsIE) { + return originalString.substr(0, patternToCheck.length) === patternToCheck; + } + else { + return originalString.startsWith(patternToCheck); + } + }, + containsPort: function OSF_Outil$containsPort(url, protocol, hostname, portNumber) { + return this.startsWith(url, protocol + "//" + hostname + ":" + portNumber, true) || this.startsWith(url, hostname + ":" + portNumber, true); + }, + getRedundandPortString: function OSF_Outil$getRedundandPortString(url, parser) { + if (!url || !parser) + return ""; + if (parser.protocol == "https:" && this.containsPort(url, "https:", parser.hostname, "443")) + return ":443"; + else if (parser.protocol == "http:" && this.containsPort(url, "http:", parser.hostname, "80")) + return ":80"; + return ""; + }, + removeChar: function OSF_Outil$removeChar(url, indexOfCharToRemove) { + if (indexOfCharToRemove < url.length - 1) + return url.substring(0, indexOfCharToRemove) + url.substring(indexOfCharToRemove + 1); + else if (indexOfCharToRemove == url.length - 1) + return url.substring(0, url.length - 1); + else + return url; + }, + cleanUrlOfChar: function OSF_Outil$cleanUrlOfChar(url, charToClean) { + var i; + for (i = 0; i < url.length; i++) { + if (url.charAt(i) === charToClean) { + if (i + 1 >= url.length) { + return this.removeChar(url, i); + } + else if (charToClean === '/') { + if (url.charAt(i + 1) === '?' || url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + else if (charToClean === '?') { + if (url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + } + } + return url; + }, + cleanUrl: function OSF_Outil$cleanUrl(url) { + url = this.cleanUrlOfChar(url, '/'); + url = this.cleanUrlOfChar(url, '?'); + url = this.cleanUrlOfChar(url, '#'); + if (url.substr(0, 8) == "https://") { + var portIndex = url.indexOf(":443"); + if (portIndex != -1) { + if (portIndex == url.length - 4 || url.charAt(portIndex + 4) == "/" || url.charAt(portIndex + 4) == "?" || url.charAt(portIndex + 4) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 4); + } + } + } + else if (url.substr(0, 7) == "http://") { + var portIndex = url.indexOf(":80"); + if (portIndex != -1) { + if (portIndex == url.length - 3 || url.charAt(portIndex + 3) == "/" || url.charAt(portIndex + 3) == "?" || url.charAt(portIndex + 3) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 3); + } + } + } + return url; + }, + parseUrl: function OSF_Outil$parseUrl(url, enforceHttps) { + if (enforceHttps === void 0) { + enforceHttps = false; + } + if (typeof url === "undefined" || !url) { + return undefined; + } + var notHttpsErrorMessage = "NotHttps"; + var invalidUrlErrorMessage = "InvalidUrl"; + var isIEBoolean = this.isIE(); + var parsedUrlObj = { + protocol: undefined, + hostname: undefined, + host: undefined, + port: undefined, + pathname: undefined, + search: undefined, + hash: undefined, + isPortPartOfUrl: undefined + }; + try { + if (isIEBoolean) { + var parser = document.createElement("a"); + parser.href = url; + if (!parser || !parser.protocol || !parser.host || !parser.hostname || !parser.href + || this.cleanUrl(parser.href).toLowerCase() !== this.cleanUrl(url).toLowerCase()) { + throw invalidUrlErrorMessage; + } + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && parser.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + var redundandPortString = this.getRedundandPortString(url, parser); + parsedUrlObj.protocol = parser.protocol; + parsedUrlObj.hostname = parser.hostname; + parsedUrlObj.port = (redundandPortString == "") ? parser.port : ""; + parsedUrlObj.host = (redundandPortString != "") ? parser.hostname : parser.host; + parsedUrlObj.pathname = (isIEBoolean ? "/" : "") + parser.pathname; + parsedUrlObj.search = parser.search; + parsedUrlObj.hash = parser.hash; + parsedUrlObj.isPortPartOfUrl = this.containsPort(url, parser.protocol, parser.hostname, parser.port); + } + else { + var urlObj = new URL(url); + if (urlObj && urlObj.protocol && urlObj.host && urlObj.hostname) { + if (OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)) { + if (enforceHttps && urlObj.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + parsedUrlObj.protocol = urlObj.protocol; + parsedUrlObj.hostname = urlObj.hostname; + parsedUrlObj.port = urlObj.port; + parsedUrlObj.host = urlObj.host; + parsedUrlObj.pathname = urlObj.pathname; + parsedUrlObj.search = urlObj.search; + parsedUrlObj.hash = urlObj.hash; + parsedUrlObj.isPortPartOfUrl = urlObj.host.lastIndexOf(":" + urlObj.port) == (urlObj.host.length - urlObj.port.length - 1); + } + } + } + catch (err) { + if (err.message === notHttpsErrorMessage) + throw err; + } + return parsedUrlObj; + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) { + if (sourceObj == null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr = []; + for (var i = 0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj = sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property] = sourceObj[property]; + } + } + return copyObj; + } + }, + createObject: function OSF_Outil$createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + }, + addClass: function OSF_OUtil$addClass(elmt, val) { + if (!OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + if (className) { + elmt.setAttribute(_classN, className + " " + val); + } + else { + elmt.setAttribute(_classN, val); + } + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) { + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findNextPos = function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && backward) { + return -1; + } + else if (currPos === allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if (all.length === 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, backward); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findCurrPos = function (all, curr) { + var i = 0; + for (; i < all.length; i++) { + if (all[i] === curr) { + return i; + } + } + return -1; + }; + var findNextPos = function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && shift) { + return -1; + } + else if (currPos === allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all, curr); + next = findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, shift); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + isNullOrUndefined: function OSF_OUtil$isNullOrUndefined(value) { + if (typeof (value) === "undefined") { + return true; + } + if (value === null) { + return true; + } + return false; + }, + stringEndsWith: function OSF_OUtil$stringEndsWith(value, subString) { + if (!OSF.OUtil.isNullOrUndefined(value) && !OSF.OUtil.isNullOrUndefined(subString)) { + if (subString.length > value.length) { + return false; + } + if (value.substr(value.length - subString.length) === subString) { + return true; + } + } + return false; + }, + hashCode: function OSF_OUtil$hashCode(str) { + var hash = 0; + if (!OSF.OUtil.isNullOrUndefined(str)) { + var i = 0; + var len = str.length; + while (i < len) { + hash = (hash << 5) - hash + str.charCodeAt(i++) | 0; + } + } + return hash; + }, + getValue: function OSF_OUtil$getValue(value, defaultValue) { + if (OSF.OUtil.isNullOrUndefined(value)) { + return defaultValue; + } + return value; + }, + externalNativeFunctionExists: function OSF_OUtil$externalNativeFunctionExists(type) { + return type === 'unknown' || type !== 'undefined'; + } + }; +})(); +OSF.OUtil.Guid = (function () { + var hexCode = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result = ""; + var tick = (new Date()).getTime(); + var index = 0; + for (; index < 32 && tick > 0; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + }; +})(); +try { + (function () { + OSF.Flights = OSF.OUtil.parseFlights(true); + })(); +} +catch (ex) { } +window.OSF = OSF; +OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614, + Visio: 8388615, + OneNoteAndroid: 4194305 +}; +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +}; +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +}; +OSF.AgaveHostAction = { + "Select": 0, + "UnSelect": 1, + "CancelDialog": 2, + "InsertAgave": 3, + "CtrlF6In": 4, + "CtrlF6Exit": 5, + "CtrlF6ExitShift": 6, + "SelectWithError": 7, + "NotifyHostError": 8, + "RefreshAddinCommands": 9, + "PageIsReady": 10, + "TabIn": 11, + "TabInShift": 12, + "TabExit": 13, + "TabExitShift": 14, + "EscExit": 15, + "F2Exit": 16, + "ExitNoFocusable": 17, + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20, + "UpdateTargetUrl": 21, + "InstallCustomFunctions": 22, + "SendTelemetryEvent": 23, + "UninstallCustomFunctions": 24, + "SendMessage": 25, + "LaunchExtensionComponent": 26, + "StopExtensionComponent": 27, + "RestartExtensionComponent": 28, + "EnableTaskPaneHeaderButton": 29, + "DisableTaskPaneHeaderButton": 30, + "TaskPaneHeaderButtonClicked": 31, + "RemoveAppCommandsAddin": 32, + "RefreshRibbonGallery": 33, + "GetOriginalControlId": 34, + "OfficeJsReady": 35, + "InsertDevManifest": 36, + "InsertDevManifestError": 37, + "SendCustomerContent": 38, + "KeyboardShortcuts": 39 +}; +OSF.SharedConstants = { + "NotificationConversationIdSuffix": '_ntf' +}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix, featureGates, officeTheme, initialDisplayMode) { + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this._featureGates = featureGates; + this._officeTheme = officeTheme; + this._initialDisplayMode = initialDisplayMode; + this.get_id = function get_id() { return this._id; }; + this.get_appName = function get_appName() { return this._appName; }; + this.get_appVersion = function get_appVersion() { return this._appVersion; }; + this.get_appUILocale = function get_appUILocale() { return this._appUILocale; }; + this.get_dataLocale = function get_dataLocale() { return this._dataLocale; }; + this.get_docUrl = function get_docUrl() { return this._docUrl; }; + this.get_clientMode = function get_clientMode() { return this._clientMode; }; + this.get_bindings = function get_bindings() { return this._bindings; }; + this.get_settings = function get_settings() { return this._settings; }; + this.get_reason = function get_reason() { return this._reason; }; + this.get_osfControlType = function get_osfControlType() { return this._osfControlType; }; + this.get_eToken = function get_eToken() { return this._eToken; }; + this.get_correlationId = function get_correlationId() { return this._correlationId; }; + this.get_appInstanceId = function get_appInstanceId() { return this._appInstanceId; }; + this.get_touchEnabled = function get_touchEnabled() { return this._touchEnabled; }; + this.get_commerceAllowed = function get_commerceAllowed() { return this._commerceAllowed; }; + this.get_appMinorVersion = function get_appMinorVersion() { return this._appMinorVersion; }; + this.get_requirementMatrix = function get_requirementMatrix() { return this._requirementMatrix; }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() { return this._dialogRequirementMatrix; }; + this.get_hostCustomMessage = function get_hostCustomMessage() { return this._hostCustomMessage; }; + this.get_hostFullVersion = function get_hostFullVersion() { return this._hostFullVersion; }; + this.get_isDialog = function get_isDialog() { return this._isDialog; }; + this.get_clientWindowHeight = function get_clientWindowHeight() { return this._clientWindowHeight; }; + this.get_clientWindowWidth = function get_clientWindowWidth() { return this._clientWindowWidth; }; + this.get_addinName = function get_addinName() { return this._addinName; }; + this.get_appDomains = function get_appDomains() { return this._appDomains; }; + this.get_featureGates = function get_featureGates() { return this._featureGates; }; + this.get_officeTheme = function get_officeTheme() { return this._officeTheme; }; + this.get_initialDisplayMode = function get_initialDisplayMode() { return this._initialDisplayMode ? this._initialDisplayMode : 0; }; +}; +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 +}; +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 +}; +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Client", Microsoft.Office); +OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened", + ControlActivation: "controlActivation" +}; +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType = { + All: "all" +}; +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + JsonData: "jsonData", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + AllowConsentPrompt: "allowConsentPrompt", + ForMSGraphAccess: "forMSGraphAccess", + AllowSignInPrompt: "allowSignInPrompt", + JsonPayload: "jsonPayload", + EnableNewHosts: "enableNewHosts", + AccountTypeFilter: "accountTypeFilter", + AddinTrustId: "addinTrustId", + Reserved: "reserved", + Tcid: "tcid", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + PromptBeforeOpen: "promptBeforeOpen", + EnforceAppDomain: "enforceAppDomain", + UrlNoHostInfo: "urlNoHostInfo", + TargetOrigin: "targetOrigin", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64", + FormId: "formId" +}; +OSF.OUtil.setNamespace("DDA", OSF); +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 +}; +OSF.DDA.PropertyDescriptors = { + AsyncResultStatus: "AsyncResultStatus" +}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { + if (eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || + eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || + eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) { + return id + "_" + eventType; + } + else { + return eventType; + } +}; +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidGetAuthContextMethod: 99, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, + dispidInsertFormMethod: 106, + dispidDisplayRibbonCalloutAsyncMethod: 109, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidExecuteFeature: 146, + dispidQueryFeature: 147, + dispidGetNestedAppAuthContextMethod: 205, + dispidMethodMax: 205 +}; +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidOlkRecurrenceChangedEvent: 49, + dispidOlkAttachmentsChangedEvent: 50, + dispidOlkEnhancedLocationsChangedEvent: 51, + dispidOlkInfobarClickedEvent: 52, + dispidOlkSelectedItemsChangedEvent: 53, + dispidOlkSensitivityLabelChangedEvent: 54, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 +}; +OSF.DDA.ErrorCodeManager = (function () { + var _errorMappings = {}; + return { + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) { + var errorArgs = _errorMappings[errorCode]; + if (!errorArgs) { + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + } + else { + if (!errorArgs.name) { + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + } + if (!errorArgs.message) { + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message; + } + } + return errorArgs; + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) { + _errorMappings[errorCode] = errorNameMessage; + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1000, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2000, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3000, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4000, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5000, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeOperationCancelled: 5014, + ooeWorkbookHidden: 5015, + ooeWriteNotSupportedWhenModalDialogOpen: 5016, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeRequestPayloadSizeLimitExceeded: 5103, + ooeResponsePayloadSizeLimitExceeded: 5104, + ooeCustomXmlNodeNotFound: 6000, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7000, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8000, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11000, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12000, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeModalDialogOpen: 12012, + ooeDocumentIsInactive: 12013, + ooeDialogParentIsMinimized: 12014, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010, + ooeResourceNotAllowed: 13011, + ooeSSOUnsupportedPlatform: 13012, + ooeSSOCallThrottled: 13013, + ooeAccessDenied: 13990, + ooeGeneralException: 13991 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidReadForBlankRow }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnMatrixData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { name: stringNS.L_InvalidBinding, message: stringNS.L_InvalidColumnsForBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { name: stringNS.L_SaveSettingsError, message: stringNS.L_SettingsCannotSave }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { name: stringNS.L_SettingsStaleError, message: stringNS.L_SettingsAreStale }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { name: stringNS.L_HostError, message: stringNS.L_OperationNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { name: stringNS.L_InternalError, message: stringNS.L_InternalErrorDescription }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { name: stringNS.L_PermissionDenied, message: stringNS.L_DocumentReadOnly }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { name: stringNS.L_EventRegistrationError, message: stringNS.L_EventHandlerNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { name: stringNS.L_InvalidAPICall, message: stringNS.L_InvalidApiCallInContext }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { name: stringNS.L_ShuttingDown, message: stringNS.L_ShuttingDown }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { name: stringNS.L_UnsupportedEnumeration, message: stringNS.L_UnsupportedEnumerationMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden] = { name: stringNS.L_APICallFailed, message: stringNS.L_WorkbookHiddenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen] = { name: stringNS.L_APICallFailed, message: stringNS.L_WriteNotSupportedWhenModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestPayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded] = { name: stringNS.L_APICallFailed, message: stringNS.L_ResponsePayloadSizeLimitExceededMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { name: stringNS.L_CustomXmlOutOfDateName, message: stringNS.L_CustomXmlOutOfDateMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { name: stringNS.L_CannotNavigateTo, message: stringNS.L_CannotNavigateTo }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { name: stringNS.L_SpecifiedIdNotExist, message: stringNS.L_SpecifiedIdNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { name: stringNS.L_NavOutOfBound, message: stringNS.L_NavOutOfBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { name: stringNS.L_DataWriteReminder, message: stringNS.L_CellDataAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { name: stringNS.L_MissingParameter, message: stringNS.L_ElementMissing }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidCellsValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidTableOptionValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidFormatValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_RowIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_ColIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { name: stringNS.L_OutOfRange, message: stringNS.L_FormatValueOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { name: stringNS.L_FormattingReminder, message: stringNS.L_CellFormatAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { name: stringNS.L_MemoryLimit, message: stringNS.L_CloseFileBeforeRetrieve }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { name: stringNS.L_NetworkProblem, message: stringNS.L_NetworkProblemRetrieveFile }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { name: stringNS.L_InvalidValue, message: stringNS.L_SliceSizeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAlreadyOpened }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NetworkProblem }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { name: stringNS.L_DialogNavigateError, message: stringNS.L_DialogInvalidScheme }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAddressNotTrusted }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_ModalDialogOpen }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DocumentIsInactive }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogParentIsMinimized }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform] = { name: stringNS.L_APINotSupported, message: stringNS.L_SSOUnsupportedPlatform }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled] = { name: stringNS.L_OperationCancelledError, message: stringNS.L_OperationCancelledErrorMessage }; + } + }; +})(); +(function (OfficeExt) { + var Requirement; + (function (Requirement) { + var RequirementVersion = (function () { + function RequirementVersion() { + } + return RequirementVersion; + }()); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = (function () { + function RequirementMatrix(_setMap) { + this.isSetSupported = function _isSetSupported(name, minVersion) { + if (name == undefined) { + return false; + } + if (minVersion == undefined) { + minVersion = 0; + } + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if (sets.hasOwnProperty(name.toLowerCase())) { + var setMaxVersion = sets[name.toLowerCase()]; + try { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.major > 0 && + setMaxVersionNum.minor >= 0 && + setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor >= minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion = function (version) { + version = version + ""; + var temp = version.split("."); + var major = 0; + var minor = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } + } + var result = { "minor": minor, "major": major }; + return result; + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this); + } + return RequirementMatrix; + }()); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = (function () { + function DefaultSetRequirement(setMap) { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) { + for (var name in addedSet) { + this._sets[name] = addedSet[name]; + } + }; + this._sets = setMap; + } + return DefaultSetRequirement; + }()); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultRequiredDialogSetRequirement = (function (_super) { + __extends(DefaultRequiredDialogSetRequirement, _super); + function DefaultRequiredDialogSetRequirement() { + return _super.call(this, { + "dialogapi": 1.1 + }) || this; + } + return DefaultRequiredDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultRequiredDialogSetRequirement = DefaultRequiredDialogSetRequirement; + var DefaultOptionalDialogSetRequirement = (function (_super) { + __extends(DefaultOptionalDialogSetRequirement, _super); + function DefaultOptionalDialogSetRequirement() { + return _super.call(this, { + "dialogorigin": 1.1 + }) || this; + } + return DefaultOptionalDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultOptionalDialogSetRequirement = DefaultOptionalDialogSetRequirement; + var ExcelClientDefaultSetRequirement = (function (_super) { + __extends(ExcelClientDefaultSetRequirement, _super); + function ExcelClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "excelapi": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = (function (_super) { + __extends(ExcelClientV1DefaultSetRequirement, _super); + function ExcelClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return ExcelClientV1DefaultSetRequirement; + }(ExcelClientDefaultSetRequirement)); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = (function (_super) { + __extends(OutlookClientDefaultSetRequirement, _super); + function OutlookClientDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = (function (_super) { + __extends(WordClientDefaultSetRequirement, _super); + function WordClientDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1, + "wordapi": 1.1 + }) || this; + } + return WordClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = (function (_super) { + __extends(WordClientV1DefaultSetRequirement, _super); + function WordClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2, + "imagecoercion": 1.1 + }); + return _this; + } + return WordClientV1DefaultSetRequirement; + }(WordClientDefaultSetRequirement)); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = (function (_super) { + __extends(PowerpointClientDefaultSetRequirement, _super); + function PowerpointClientDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = (function (_super) { + __extends(PowerpointClientV1DefaultSetRequirement, _super); + function PowerpointClientV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "imagecoercion": 1.1 + }); + return _this; + } + return PowerpointClientV1DefaultSetRequirement; + }(PowerpointClientDefaultSetRequirement)); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = (function (_super) { + __extends(ProjectClientDefaultSetRequirement, _super); + function ProjectClientDefaultSetRequirement() { + return _super.call(this, { + "selection": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ProjectClientDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = (function (_super) { + __extends(ExcelWebDefaultSetRequirement, _super); + function ExcelWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "file": 1.1 + }) || this; + } + return ExcelWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = (function (_super) { + __extends(WordWebDefaultSetRequirement, _super); + function WordWebDefaultSetRequirement() { + return _super.call(this, { + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "imagecoercion": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablecoercion": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = (function (_super) { + __extends(PowerpointWebDefaultSetRequirement, _super); + function PowerpointWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "settings": 1.1 + }) || this; + } + return PowerpointWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = (function (_super) { + __extends(OutlookWebDefaultSetRequirement, _super); + function OutlookWebDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.3 + }) || this; + } + return OutlookWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = (function (_super) { + __extends(SwayWebDefaultSetRequirement, _super); + function SwayWebDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "documentevents": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return SwayWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = (function (_super) { + __extends(AccessWebDefaultSetRequirement, _super); + function AccessWebDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "partialtablebindings": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1 + }) || this; + } + return AccessWebDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = (function (_super) { + __extends(ExcelIOSDefaultSetRequirement, _super); + function ExcelIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return ExcelIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = (function (_super) { + __extends(WordIOSDefaultSetRequirement, _super); + function WordIOSDefaultSetRequirement() { + return _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }) || this; + } + return WordIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = (function (_super) { + __extends(WordIOSV1DefaultSetRequirement, _super); + function WordIOSV1DefaultSetRequirement() { + var _this = _super.call(this) || this; + _this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2 + }); + return _this; + } + return WordIOSV1DefaultSetRequirement; + }(WordIOSDefaultSetRequirement)); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = (function (_super) { + __extends(PowerpointIOSDefaultSetRequirement, _super); + function PowerpointIOSDefaultSetRequirement() { + return _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }) || this; + } + return PowerpointIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = (function (_super) { + __extends(OutlookIOSDefaultSetRequirement, _super); + function OutlookIOSDefaultSetRequirement() { + return _super.call(this, { + "mailbox": 1.1 + }) || this; + } + return OutlookIOSDefaultSetRequirement; + }(DefaultSetRequirement)); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = (function () { + function RequirementsMatrixFactory() { + } + RequirementsMatrixFactory.initializeOsfDda = function () { + OSF.OUtil.setNamespace("Requirement", OSF.DDA); + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function (appContext) { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if (RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) { + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + } + else { + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})); + } + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function (appContext) { + var setRequirements = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + setRequirements = new DefaultSetRequirement(matrixItem); + } + else { + setRequirements = new DefaultRequiredDialogSetRequirement(); + var mainRequirement = appContext.get_requirementMatrix(); + if (mainRequirement != undefined && mainRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(mainRequirement.toLowerCase()); + for (var name in setRequirements._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + var dialogOptionalSetRequirement = new DefaultOptionalDialogSetRequirement(); + for (var name in dialogOptionalSetRequirement._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + } + } + return new RequirementMatrix(setRequirements); + }; + RequirementsMatrixFactory.getClientFullVersionString = function (appContext) { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || + appName == 4096 || + appName == 8192 || + appName == 65536; + if (isIOSClient && appContext.get_appVersion() == 1) { + if (appName == 4096 && appMinorVersion >= 15) { + appFullVersion = "16.00.01"; + } + else { + appFullVersion = "16.00"; + } + } + else if (appContext.get_appName() == 64) { + appFullVersion = appContext.get_appVersion(); + } + else { + if (appMinorVersion < 10) { + appMinorVersionString = "0" + appMinorVersion; + } + else { + appMinorVersionString = "" + appMinorVersion; + } + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString; + } + return appContext.get_appName() + "-" + appFullVersion; + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function () { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement(); + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory; + }()); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory; + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})); +})(OfficeExt || (OfficeExt = {})); +OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" +}; +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" +}; +OSF.NamespaceManager = (function OSF_NamespaceManager() { + var _userOffice; + var _useShortcut = false; + return { + enableShortcut: function OSF_NamespaceManager$enableShortcut() { + if (!_useShortcut) { + if (window.Office) { + _userOffice = window.Office; + } + else { + OSF.OUtil.setNamespace("Office", window); + } + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true; + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() { + if (_useShortcut) { + if (_userOffice) { + window.Office = _userOffice; + } + else { + OSF.OUtil.unsetNamespace("Office", window); + } + _useShortcut = false; + } + } + }; +})(); +OSF.NamespaceManager.enableShortcut(); +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { + if (useShortcut) { + OSF.NamespaceManager.enableShortcut(); + } + else { + OSF.NamespaceManager.disableShortcut(); + } +}; +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { + var promise; + if (str && typeof str == "string") { + var index = str.indexOf("#"); + if (index != -1) { + var op = str.substring(0, index); + var target = str.substring(index + 1); + switch (op) { + case "binding": + case "bindings": + if (target) { + promise = new OSF.DDA.BindingPromise(target); + } + break; + } + } + } + if (!promise) { + if (errorCallback) { + var callbackType = typeof errorCallback; + if (callbackType == "function") { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext, OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)); + } + else { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, callbackType); + } + } + } + else { + promise.onFail = errorCallback; + return promise; + } +}; +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { + OSF.OUtil.defineEnumerableProperties(this, { + "contentLanguage": { + value: officeAppContext.get_dataLocale() + }, + "displayLanguage": { + value: officeAppContext.get_appUILocale() + }, + "touchEnabled": { + value: officeAppContext.get_touchEnabled() + }, + "commerceAllowed": { + value: officeAppContext.get_commerceAllowed() + }, + "host": { + value: OfficeExt.HostName.Host.getInstance().getHost() + }, + "platform": { + value: OfficeExt.HostName.Host.getInstance().getPlatform() + }, + "isDialog": { + value: OSF._OfficeAppFactory.getHostInfo().isDialog + }, + "diagnostics": { + value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion()) + } + }); + if (license) { + OSF.OUtil.defineEnumerableProperty(this, "license", { + value: license + }); + } + if (officeAppContext.ui) { + OSF.OUtil.defineEnumerableProperty(this, "ui", { + value: officeAppContext.ui + }); + } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.webAuth) { + OSF.OUtil.defineEnumerableProperty(this, "webAuth", { + value: officeAppContext.webAuth + }); + } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } + if (officeAppContext.extensionLifeCycle) { + OSF.OUtil.defineEnumerableProperty(this, "extensionLifeCycle", { + value: officeAppContext.extensionLifeCycle + }); + } + if (officeAppContext.messaging) { + OSF.OUtil.defineEnumerableProperty(this, "messaging", { + value: officeAppContext.messaging + }); + } + if (officeAppContext.ui && officeAppContext.ui.taskPaneAction) { + OSF.OUtil.defineEnumerableProperty(this, "taskPaneAction", { + value: officeAppContext.ui.taskPaneAction + }); + } + if (officeAppContext.ui && officeAppContext.ui.ribbonGallery) { + OSF.OUtil.defineEnumerableProperty(this, "ribbonGallery", { + value: officeAppContext.ui.ribbonGallery + }); + } + if (officeAppContext.get_isDialog()) { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } + else { + if (document) { + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: document + }); + } + if (appOM) { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this, displayName, { + value: appOM + }); + } + if (officeAppContext.get_officeTheme()) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return officeAppContext.get_officeTheme(); + } + }); + } + else if (getOfficeTheme) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return getOfficeTheme(); + } + }); + } + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + if (officeAppContext.get_featureGates) { + var featureGates = officeAppContext.get_featureGates(); + if (featureGates && featureGates["EnablePublicThemeManager"]) { + var themeManager = new OSF.DDA.Theming.InternalThemeHandler(); + themeManager.InitializeThemeManager(); + OSF.OUtil.defineEnumerableProperty(this, "themeManager", { + value: themeManager + }); + } + } + } +}; +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { + OSF.DDA.OutlookContext.uber.constructor.call(this, appContext, null, license, appOM, getOfficeTheme); + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "roamingSettings", { + value: settings + }); + } + if (appContext.sensitivityLabelsCatalog) { + OSF.OUtil.defineEnumerableProperty(this, "sensitivityLabelsCatalog", { + value: appContext.sensitivityLabelsCatalog() + }); + } +}; +OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { + var mode; + switch (officeAppContext.get_clientMode()) { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break; + } + ; + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "settings", { + value: settings + }); + } + ; + OSF.OUtil.defineMutableProperties(this, { + "mode": { + value: mode + }, + "url": { + value: officeAppContext.get_docUrl() + } + }); +}; +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { + OSF.DDA.JsomDocument.uber.constructor.call(this, officeAppContext, settings); + if (bindingFacade) { + OSF.OUtil.defineEnumerableProperty(this, "bindings", { + get: function OSF_DDA_Document$GetBindings() { return bindingFacade; } + }); + } + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetSelectedDataAsync, + am.SetSelectedDataAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])); +}; +OSF.OUtil.extend(OSF.DDA.JsomDocument, OSF.DDA.Document); +OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension, "context", { + get: function Microsoft_Office_WebExtension$GetContext() { + var context; + if (OSF && OSF._OfficeAppFactory) { + context = OSF._OfficeAppFactory.getContext(); + } + return context; + } +}); +OSF.DDA.License = function OSF_DDA_License(eToken) { + OSF.OUtil.defineEnumerableProperty(this, "value", { + value: eToken + }); +}; +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function () { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, displayName); + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) { + for (var name in params) { + var param = params[name]; + var arg = args[name]; + if (param["enum"]) { + switch (typeof arg) { + case "string": + if (OSF.OUtil.listContainsValue(param["enum"], arg)) { + break; + } + case "undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + } + if (param["types"]) { + if (!OSF.OUtil.listContainsValue(param["types"], typeof arg)) { + throw getInvalidParameterString(); + } + } + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) { + if (userArgs.length < requiredCount) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + } + var requiredArgs = []; + var index; + for (index = 0; index < requiredCount; index++) { + requiredArgs.push(userArgs[index]); + } + this.verifyArguments(requiredParameters, requiredArgs); + var ret = {}; + for (index = 0; index < requiredCount; index++) { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if (param.verify) { + var isValid = param.verify(arg, caller, stateInfo); + if (!isValid) { + throw getInvalidParameterString(); + } + } + ret[param.name] = arg; + } + return ret; + }, + this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) { + options = options || {}; + for (var optionName in supportedOptions) { + if (!OSF.OUtil.listContainsKey(options, optionName)) { + var value = undefined; + var option = supportedOptions[optionName]; + if (option.calculate && requiredArgs) { + value = option.calculate(requiredArgs, caller, stateInfo); + } + if (!value && option.defaultValue !== undefined) { + value = option.defaultValue; + } + options[optionName] = value; + } + } + return options; + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) { + var callArgs = {}; + for (var r in required) { + callArgs[r] = required[r]; + } + for (var o in options) { + callArgs[o] = options[o]; + } + for (var s in privateStateCallbacks) { + callArgs[s] = privateStateCallbacks[s](caller, stateInfo); + } + if (checkCallArgs) { + callArgs = checkCallArgs(callArgs, caller, stateInfo); + } + return callArgs; + }; +}; +OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" +}; +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" +}; +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 +}; +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" +}; +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.AsyncMethodNames[entry] = am; + } +}; +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 2) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + case "function": + if (parameterCallback) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + } + else { + parameterCallback = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + if (parameterCallback) { + if (options[Microsoft.Office.WebExtension.Parameters.Callback]) { + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + } + else { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + } + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (onSucceeded) { + payload = onSucceeded(response, caller, callArgs); + } + else { + payload = response; + } + } + else { + if (onFailed) { + payload = onFailed(status, response); + } + else { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + } + return payload; + }; + this.getCallArgs = function (suppliedArgs) { + var options, parameterCallback; + for (var i = suppliedArgs.length - 1; i >= requiredCount; i--) { + var argument = suppliedArgs[i]; + switch (typeof argument) { + case "object": + options = argument; + break; + case "function": + parameterCallback = argument; + break; + } + } + options = options || {}; + if (parameterCallback) { + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + } + return options; + }; +}; +OSF.DDA.AsyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [], supportedOptions, privateStateCallbacks, params.onSucceeded, params.onFailed, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function (callDefinition) { + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { + OSF.OUtil.defineEnumerableProperties(this, { + "name": { + value: name + }, + "message": { + value: message + }, + "code": { + value: code + } + }); +}; +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { + OSF.OUtil.defineEnumerableProperties(this, { + "value": { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value] + }, + "status": { + value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded + } + }); + if (initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) { + OSF.OUtil.defineEnumerableProperty(this, "asyncContext", { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context] + }); + } + if (errorArgs) { + OSF.OUtil.defineEnumerableProperty(this, "error", { + value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + }); + } +}; +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if (callback) { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + } + else { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs, errorArgs)); + } +}; +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function (methodNames) { + for (var entry in methodNames) { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.SyncMethodNames[entry] = am; + } +}; +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount + 1) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required = apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs = apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; +}; +OSF.DDA.SyncMethodCallFactory = (function () { + return { + manufacture: function (params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [], supportedOptions, params.privateStateCallbacks, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function (callDefinition) { + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.ListType = (function () { + var listTypes = {}; + return { + setListType: function OSF_DDA_ListType$AddListType(t, prop) { listTypes[t] = prop; }, + isListType: function OSF_DDA_ListType$IsListType(t) { return OSF.OUtil.listContainsKey(listTypes, t); }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) { return listTypes[t]; } + }; +})(); +OSF.DDA.HostParameterMap = function (specialProcessor, mappings) { + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function (data) { + if (data != null && data.rows !== undefined) { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData; + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.JsonData] = { + toHost: function (data) { return data; }, + fromHost: function (data) { return typeof data === "string" ? JSON.parse(data) : data; } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) { + var ret = preimageSet ? {} : undefined; + for (var entry in preimageSet) { + var preimage = preimageSet[entry]; + var image; + if (OSF.DDA.ListType.isListType(entry)) { + image = []; + for (var subEntry in preimage) { + image.push(mapValues(preimage[subEntry], mapping)); + } + } + else if (OSF.OUtil.listContainsKey(dynamicTypes, entry)) { + image = dynamicTypes[entry][mapping](preimage); + } + else if (mapping == fromHostMap && specialProcessor.preserveNesting(entry)) { + image = mapValues(preimage, mapping); + } + else { + var maps = mappings[entry]; + if (maps) { + var map = maps[mapping]; + if (map) { + image = map[preimage]; + if (image === undefined) { + image = preimage; + } + } + } + else { + image = preimage; + } + } + ret[entry] = image; + } + return ret; + } + ; + function generateArguments(imageSet, parameters) { + var ret; + for (var param in parameters) { + var arg; + if (specialProcessor.isComplexType(param)) { + arg = generateArguments(imageSet, mappings[param][toHostMap]); + } + else { + arg = imageSet[param]; + } + if (arg != undefined) { + if (!ret) { + ret = {}; + } + var index = parameters[param]; + if (index == self) { + index = param; + } + ret[index] = specialProcessor.pack(param, arg); + } + } + return ret; + } + ; + function extractArguments(source, parameters, extracted) { + if (!extracted) { + extracted = {}; + } + for (var param in parameters) { + var index = parameters[param]; + var value; + if (index == self) { + value = source; + } + else if (index == sourceData) { + extracted[param] = source.toArray(); + continue; + } + else { + value = source[index]; + } + if (value === null || value === undefined) { + extracted[param] = undefined; + } + else { + value = specialProcessor.unpack(param, value); + var map; + if (specialProcessor.isComplexType(param)) { + map = mappings[param][fromHostMap]; + if (specialProcessor.preserveNesting(param)) { + extracted[param] = extractArguments(value, map); + } + else { + extractArguments(value, map, extracted); + } + } + else { + if (OSF.DDA.ListType.isListType(param)) { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for (var item in value) { + extractedValues[item] = extractArguments(value[item], map); + } + extracted[param] = extractedValues; + } + else { + extracted[param] = value; + } + } + } + } + return extracted; + } + ; + function applyMap(mapName, preimage, mapping) { + var parameters = mappings[mapName][mapping]; + var image; + if (mapping == "toHost") { + var imageSet = mapValues(preimage, mapping); + image = generateArguments(imageSet, parameters); + } + else if (mapping == "fromHost") { + var argumentSet = extractArguments(preimage, parameters); + image = mapValues(argumentSet, mapping); + } + return image; + } + ; + if (!mappings) { + mappings = {}; + } + this.addMapping = function (mapName, description) { + var toHost, fromHost; + if (description.map) { + toHost = description.map; + fromHost = {}; + for (var preimage in toHost) { + var image = toHost[preimage]; + if (image == self) { + image = preimage; + } + fromHost[image] = preimage; + } + } + else { + toHost = description.toHost; + fromHost = description.fromHost; + } + var pair = mappings[mapName]; + if (pair) { + var currMap = pair[toHostMap]; + for (var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for (var fh in currMap) + fromHost[fh] = currMap[fh]; + } + else { + pair = mappings[mapName] = {}; + } + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost; + }; + this.toHost = function (mapName, preimage) { return applyMap(mapName, preimage, toHostMap); }; + this.fromHost = function (mapName, image) { return applyMap(mapName, image, fromHostMap); }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function (ct) { specialProcessor.addComplexType(ct); }; + this.getDynamicType = function (dt) { return specialProcessor.getDynamicType(dt); }; + this.setDynamicType = function (dt, handler) { specialProcessor.setDynamicType(dt, handler); }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function (preimageSet, mapping) { return mapValues(preimageSet, mapping); }; +}; +OSF.DDA.SpecialProcessor = function (complexTypes, dynamicTypes) { + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) { + complexTypes.push(ct); + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) { + return dynamicTypes[dt]; + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) { + dynamicTypes[dt] = handler; + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) { + return OSF.OUtil.listContainsValue(complexTypes, t); + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) { + return OSF.OUtil.listContainsKey(dynamicTypes, p); + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) { + var pn = []; + if (OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if (OSF.DDA.DataNodeEventProperties) { + pn = pn.concat([ + OSF.DDA.DataNodeEventProperties.OldNode, + OSF.DDA.DataNodeEventProperties.NewNode, + OSF.DDA.DataNodeEventProperties.NextSiblingNode + ]); + } + return OSF.OUtil.listContainsValue(pn, p); + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].toHost(arg); + } + else { + value = arg; + } + return value; + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.DDA.getDecoratedParameterMap = function (specialProcessor, initialDefs) { + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + } + parameterMap.define = function define(definition) { + var args = {}; + var toHost = createObject(definition.toHost); + if (definition.invertible) { + args.map = toHost; + } + else if (definition.canonical) { + args.toHost = args.fromHost = toHost; + } + else { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost); + } + parameterMap.addMapping(definition.type, args); + if (definition.isComplexType) + parameterMap.addComplexType(definition.type); + }; + for (var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap; +}; +OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + "GoToByIdAsync": did.dispidNavigateToMethod, + "GetSelectedDataAsync": did.dispidGetSelectedDataMethod, + "SetSelectedDataAsync": did.dispidSetSelectedDataMethod, + "GetDocumentCopyChunkAsync": did.dispidGetDocumentCopyChunkMethod, + "ReleaseDocumentCopyAsync": did.dispidReleaseDocumentCopyMethod, + "GetDocumentCopyAsync": did.dispidGetDocumentCopyMethod, + "AddFromSelectionAsync": did.dispidAddBindingFromSelectionMethod, + "AddFromPromptAsync": did.dispidAddBindingFromPromptMethod, + "AddFromNamedItemAsync": did.dispidAddBindingFromNamedItemMethod, + "GetAllAsync": did.dispidGetAllBindingsMethod, + "GetByIdAsync": did.dispidGetBindingMethod, + "ReleaseByIdAsync": did.dispidReleaseBindingMethod, + "GetDataAsync": did.dispidGetBindingDataMethod, + "SetDataAsync": did.dispidSetBindingDataMethod, + "AddRowsAsync": did.dispidAddRowsMethod, + "AddColumnsAsync": did.dispidAddColumnsMethod, + "DeleteAllDataValuesAsync": did.dispidClearAllRowsMethod, + "RefreshAsync": did.dispidLoadSettingsMethod, + "SaveAsync": did.dispidSaveSettingsMethod, + "GetActiveViewAsync": did.dispidGetActiveViewMethod, + "GetFilePropertiesAsync": did.dispidGetFilePropertiesMethod, + "GetOfficeThemeAsync": did.dispidGetOfficeThemeMethod, + "GetDocumentThemeAsync": did.dispidGetDocumentThemeMethod, + "ClearFormatsAsync": did.dispidClearFormatsMethod, + "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, + "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, + "GetAuthContextAsync": did.dispidGetAuthContextMethod, + "GetNestedAppAuthContextAsync": did.dispidGetNestedAppAuthContextMethod, + "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, + "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, + "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, + "InsertFormAsync": did.dispidInsertFormMethod, + "ExecuteFeature": did.dispidExecuteFeature, + "QueryFeature": did.dispidQueryFeature, + "AddDataPartAsync": did.dispidAddDataPartMethod, + "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, + "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, + "GetPartXmlAsync": did.dispidGetDataPartXmlMethod, + "GetPartNodesAsync": did.dispidGetDataPartNodesMethod, + "DeleteDataPartAsync": did.dispidDeleteDataPartMethod, + "GetNodeValueAsync": did.dispidGetDataNodeValueMethod, + "GetNodeXmlAsync": did.dispidGetDataNodeXmlMethod, + "GetRelativeNodesAsync": did.dispidGetDataNodesMethod, + "SetNodeValueAsync": did.dispidSetDataNodeValueMethod, + "SetNodeXmlAsync": did.dispidSetDataNodeXmlMethod, + "AddDataPartNamespaceAsync": did.dispidAddDataNamespaceMethod, + "GetDataPartNamespaceAsync": did.dispidGetDataUriByPrefixMethod, + "GetDataPartPrefixAsync": did.dispidGetDataPrefixByUriMethod, + "GetNodeTextAsync": did.dispidGetDataNodeTextMethod, + "SetNodeTextAsync": did.dispidSetDataNodeTextMethod, + "GetSelectedTask": did.dispidGetSelectedTaskMethod, + "GetTask": did.dispidGetTaskMethod, + "GetWSSUrl": did.dispidGetWSSUrlMethod, + "GetTaskField": did.dispidGetTaskFieldMethod, + "GetSelectedResource": did.dispidGetSelectedResourceMethod, + "GetResourceField": did.dispidGetResourceFieldMethod, + "GetProjectField": did.dispidGetProjectFieldMethod, + "GetSelectedView": did.dispidGetSelectedViewMethod, + "GetTaskByIndex": did.dispidGetTaskByIndexMethod, + "GetResourceByIndex": did.dispidGetResourceByIndexMethod, + "SetTaskField": did.dispidSetTaskFieldMethod, + "SetResourceField": did.dispidSetResourceFieldMethod, + "GetMaxTaskIndex": did.dispidGetMaxTaskIndexMethod, + "GetMaxResourceIndex": did.dispidGetMaxResourceIndexMethod, + "CreateTask": did.dispidCreateTaskMethod + }; + for (var method in methodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = methodMap[method]; + } + } + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var syncMethodMap = { + "MessageParent": did.dispidMessageParentMethod, + "SendMessage": did.dispidSendMessageMethod + }; + for (var method in syncMethodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id] = syncMethodMap[method]; + } + } + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + "SettingsChanged": did.dispidSettingsChangedEvent, + "DocumentSelectionChanged": did.dispidDocumentSelectionChangedEvent, + "BindingSelectionChanged": did.dispidBindingSelectionChangedEvent, + "BindingDataChanged": did.dispidBindingDataChangedEvent, + "ActiveViewChanged": did.dispidActiveViewChangedEvent, + "OfficeThemeChanged": did.dispidOfficeThemeChangedEvent, + "DocumentThemeChanged": did.dispidDocumentThemeChangedEvent, + "AppCommandInvoked": did.dispidAppCommandInvokedEvent, + "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, + "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, + "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, + "RecurrenceChanged": did.dispidOlkRecurrenceChangedEvent, + "AttachmentsChanged": did.dispidOlkAttachmentsChangedEvent, + "EnhancedLocationsChanged": did.dispidOlkEnhancedLocationsChangedEvent, + "InfobarClicked": did.dispidOlkInfobarClickedEvent, + "SelectedItemsChanged": did.dispidOlkSelectedItemsChangedEvent, + "SensitivityLabelChanged": did.dispidOlkSensitivityLabelChangedEvent, + "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, + "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, + "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, + "DataNodeInserted": did.dispidDataNodeAddedEvent, + "DataNodeReplaced": did.dispidDataNodeReplacedEvent, + "DataNodeDeleted": did.dispidDataNodeDeletedEvent + }; + for (var event in eventMap) { + if (jsom[event]) { + dispIdMap[jsom[event]] = eventMap[event]; + } + } + function IsObjectEvent(dispId) { + return (dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { + if (typeof ex == "number") { + if (!callArgs) { + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + } + OSF.DDA.issueAsyncResult(callArgs, ex, OSF.DDA.ErrorCodeManager.getErrorArgs(ex)); + } + else { + throw ex; + } + } + ; + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) { + var callArgs; + try { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) { + window.Excel._RedirectV1APIs = true; + } + if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if (richApiInExcelMethodSubstitution.preprocess) { + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + } + var ctx = new window.Excel.RequestContext(); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); + ctx.sync() + .then(function () { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if (richApiInExcelMethodSubstitution.postprocess) { + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); + } + if (status != 0) { + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, response); + })["catch"](function (error) { + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure, null); + }); + } + else { + var hostCallArgs; + if (parameterMap.toHost) { + hostCallArgs = parameterMap.toHost(dispId, callArgs); + } + else { + hostCallArgs = callArgs; + } + var startTime = (new Date()).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + "dispId": dispId, + "hostCallArgs": hostCallArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": function (status, hostResponseArgs) { + var responseArgs; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (parameterMap.fromHost) { + responseArgs = parameterMap.fromHost(dispId, hostResponseArgs); + } + else { + responseArgs = hostResponseArgs; + } + } + else { + responseArgs = hostResponseArgs; + } + var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); + OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry && !(OSF.ConstantNames && OSF.ConstantNames.IsCustomFunctionsRuntime)) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } + } + }); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); + if (!added) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; + } + } + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if (isPopupWindow) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return; + } + var dispId_1 = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId_1); + var targetId_1 = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId_1) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId_1, + "targetId": targetId_1, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = null; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform.toLowerCase() == "web" && dispId_1 == OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent) { + args = hostArgs; + } + else { + args = parameterMap.fromHost(dispId_1, hostArgs); + } + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId_1, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId_1, args)); + } + }); + } + else { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + var error; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var status, removeSuccess; + if (handler === null) { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + else { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration + }); + } + else { + onEnsureRegistration(status); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller, isModal) { + var callArgs; + var targetId; + var asyncMethodCall = null; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) { + var payload; + if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + else { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status, onSucceedArgs, caller, callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + } + OSF.DDA.issueAsyncResult(callArgs, status, payload); + } + try { + if (dialogMessageEvent == undefined || dialogOtherEvent == undefined) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + } + if (!isModal) { + if (OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + } + else { + if (OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync == null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.id]; + } + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + callArgs["isModal"] = isModal; + targetId = JSON.stringify(callArgs); + if (!OSF.DialogShownStatus.hasDialogShown) { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + } + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = parameterMap.fromHost(dispId, hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent, caller, args); + if (event.type == dialogOtherEvent) { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]); + } + eventDispatch.fireOrQueueEvent(event); + if (args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false; + } + } + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) { + var callArgs; + var dialogMessageEvent, dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false; + } + try { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": closeCallback + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + if (closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed, OSF.DDA.AsyncMethodNames.CloseAsync.displayName, closeStatus); + } + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; +}; +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { + for (var entry in asyncMethodNames) { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if (!target[name]) { + OSF.OUtil.defineEnumerableProperty(target, name, { + value: (function (asyncMethod) { + return function () { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod, arguments, target, privateState); + }; + })(method) + }); + } + } +}; +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if (!target[add]) { + OSF.OUtil.defineEnumerableProperty(target, add, { + value: function () { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments, eventDispatch, target, isPopupWindow); + } + }); + } + if (!target[remove]) { + OSF.OUtil.defineEnumerableProperty(target, remove, { + value: function () { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments, eventDispatch, target); + } + }); + } +}; +(function (OfficeExt) { + var loadMsAjax = false; + var MsAjaxTypeHelper = (function () { + function MsAjaxTypeHelper() { + } + MsAjaxTypeHelper.isInstanceOfType = function (type, instance) { + if (typeof (instance) === "undefined" || instance === null) + return false; + if (instance instanceof type) + return true; + var instanceType = instance.constructor; + if (!instanceType || (typeof (instanceType) !== "function") || !instanceType.__typeName || instanceType.__typeName === 'Object') { + instanceType = Object; + } + return !!(instanceType === type) || + (instanceType.__typeName && type.__typeName && instanceType.__typeName === type.__typeName); + }; + return MsAjaxTypeHelper; + }()); + OfficeExt.MsAjaxTypeHelper = MsAjaxTypeHelper; + var MsAjaxError = (function () { + function MsAjaxError() { + } + MsAjaxError.create = function (message, errorInfo) { + var err = new Error(message); + err.message = message; + if (errorInfo) { + for (var v in errorInfo) { + err[v] = errorInfo[v]; + } + } + err.popStackFrame(); + return err; + }; + MsAjaxError.parameterCount = function (message) { + var displayMessage = "Sys.ParameterCountException: " + (message ? message : "Parameter count mismatch."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.ParameterCountException' }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argument = function (paramName, message) { + var displayMessage = "Sys.ArgumentException: " + (message ? message : "Value does not fall within the expected range."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentNull = function (paramName, message) { + var displayMessage = "Sys.ArgumentNullException: " + (message ? message : "Value cannot be null."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentOutOfRange = function (paramName, actualValue, message) { + var displayMessage = "Sys.ArgumentOutOfRangeException: " + (message ? message : "Specified argument was out of the range of valid values."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + if (typeof (actualValue) !== "undefined" && actualValue !== null) { + displayMessage += "\n" + MsAjaxString.format("Actual value was {0}.", actualValue); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentType = function (paramName, actualType, expectedType, message) { + var displayMessage = "Sys.ArgumentTypeException: "; + if (message) { + displayMessage += message; + } + else if (actualType && expectedType) { + displayMessage += MsAjaxString.format("Object of type '{0}' cannot be converted to type '{1}'.", actualType.getName ? actualType.getName() : actualType, expectedType.getName ? expectedType.getName() : expectedType); + } + else { + displayMessage += "Object cannot be converted to the required type."; + } + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentUndefined = function (paramName, message) { + var displayMessage = "Sys.ArgumentUndefinedException: " + (message ? message : "Value cannot be undefined."); + if (paramName) { + displayMessage += "\n" + MsAjaxString.format("Parameter name: {0}", paramName); + } + var err = MsAjaxError.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.invalidOperation = function (message) { + var displayMessage = "Sys.InvalidOperationException: " + (message ? message : "Operation is not valid due to the current state of the object."); + var err = MsAjaxError.create(displayMessage, { name: 'Sys.InvalidOperationException' }); + err.popStackFrame(); + return err; + }; + return MsAjaxError; + }()); + OfficeExt.MsAjaxError = MsAjaxError; + var MsAjaxString = (function () { + function MsAjaxString() { + } + MsAjaxString.format = function (format) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var source = format; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10); + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + }; + MsAjaxString.startsWith = function (str, prefix) { + return (str.substr(0, prefix.length) === prefix); + }; + return MsAjaxString; + }()); + OfficeExt.MsAjaxString = MsAjaxString; + var MsAjaxDebug = (function () { + function MsAjaxDebug() { + } + MsAjaxDebug.trace = function (text) { + if (typeof Debug !== "undefined" && Debug.writeln) + Debug.writeln(text); + if (window.console && window.console.log) + window.console.log(text); + if (window.opera && window.opera.postError) + window.opera.postError(text); + if (window.debugService && window.debugService.trace) + window.debugService.trace(text); + var a = document.getElementById("TraceConsole"); + if (a && a.tagName.toUpperCase() === "TEXTAREA") { + a.appendChild(document.createTextNode(text + "\n")); + } + }; + return MsAjaxDebug; + }()); + OfficeExt.MsAjaxDebug = MsAjaxDebug; + if (!loadMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) { + var registerTypeInternal = function registerTypeInternal(type, name, isClass) { + if (type.__typeName === undefined || type.__typeName === null) { + type.__typeName = name; + } + if (type.__class === undefined || type.__class === null) { + type.__class = isClass; + } + }; + registerTypeInternal(Function, "Function", true); + registerTypeInternal(Error, "Error", true); + registerTypeInternal(Object, "Object", true); + registerTypeInternal(String, "String", true); + registerTypeInternal(Boolean, "Boolean", true); + registerTypeInternal(Date, "Date", true); + registerTypeInternal(Number, "Number", true); + registerTypeInternal(RegExp, "RegExp", true); + registerTypeInternal(Array, "Array", true); + if (!Function.createCallback) { + Function.createCallback = function Function$createCallback(method, context) { + var e = Function._validateParams(arguments, [ + { name: "method", type: Function }, + { name: "context", mayBeNull: true } + ]); + if (e) + throw e; + return function () { + var l = arguments.length; + if (l > 0) { + var args = []; + for (var i = 0; i < l; i++) { + args[i] = arguments[i]; + } + args[l] = context; + return method.apply(this, args); + } + return method.call(this, context); + }; + }; + } + if (!Function.createDelegate) { + Function.createDelegate = function Function$createDelegate(instance, method) { + var e = Function._validateParams(arguments, [ + { name: "instance", mayBeNull: true }, + { name: "method", type: Function } + ]); + if (e) + throw e; + return function () { + return method.apply(instance, arguments); + }; + }; + } + if (!Function._validateParams) { + Function._validateParams = function (params, expectedParams, validateParameterCount) { + var e, expectedLength = expectedParams.length; + validateParameterCount = validateParameterCount || (typeof (validateParameterCount) === "undefined"); + e = Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i = 0, l = params.length; i < l; i++) { + var expectedParam = expectedParams[Math.min(i, expectedLength - 1)], paramName = expectedParam.name; + if (expectedParam.parameterArray) { + paramName += "[" + (i - expectedLength + 1) + "]"; + } + else if (!validateParameterCount && (i >= expectedLength)) { + break; + } + e = Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; + }; + } + if (!Function._validateParameterCount) { + Function._validateParameterCount = function (params, expectedParams, validateParameterCount) { + var i, error, expectedLen = expectedParams.length, actualLen = params.length; + if (actualLen < expectedLen) { + var minParams = expectedLen; + for (i = 0; i < expectedLen; i++) { + var param = expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error = true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error = true; + for (i = 0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error = false; + break; + } + } + } + if (error) { + var e = MsAjaxError.parameterCount(); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!Function._validateParameter) { + Function._validateParameter = function (param, expectedParam, paramName) { + var e, expectedType = expectedParam.type, expectedInteger = !!expectedParam.integer, expectedDomElement = !!expectedParam.domElement, mayBeNull = !!expectedParam.mayBeNull; + e = Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType = expectedParam.elementType, elementMayBeNull = !!expectedParam.elementMayBeNull; + if (expectedType === Array && typeof (param) !== "undefined" && param !== null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger = !!expectedParam.elementInteger, expectedElementDomElement = !!expectedParam.elementDomElement; + for (var i = 0; i < param.length; i++) { + var elem = param[i]; + e = Function._validateParameterType(elem, expectedElementType, expectedElementInteger, expectedElementDomElement, elementMayBeNull, paramName + "[" + i + "]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; + }; + } + if (!Function._validateParameterType) { + Function._validateParameterType = function (param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof (param) === "undefined") { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param === null) { + if (mayBeNull) { + return null; + } + else { + e = OfficeExt.MsAjaxError.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && !OfficeExt.MsAjaxTypeHelper.isInstanceOfType(expectedType, param)) { + e = OfficeExt.MsAjaxError.argumentType(paramName, typeof (param), expectedType); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!window.Type) { + window.Type = Function; + } + if (!Type.registerNamespace) { + Type.registerNamespace = function (ns) { + var namespaceParts = ns.split('.'); + var currentNamespace = window; + for (var i = 0; i < namespaceParts.length; i++) { + currentNamespace[namespaceParts[i]] = currentNamespace[namespaceParts[i]] || {}; + currentNamespace = currentNamespace[namespaceParts[i]]; + } + }; + } + if (!Type.prototype.registerClass) { + Type.prototype.registerClass = function (cls) { cls = {}; }; + } + if (typeof (Sys) === "undefined") { + Type.registerNamespace('Sys'); + } + if (!Error.prototype.popStackFrame) { + Error.prototype.popStackFrame = function () { + if (arguments.length !== 0) + throw MsAjaxError.parameterCount(); + if (typeof (this.stack) === "undefined" || this.stack === null || + typeof (this.fileName) === "undefined" || this.fileName === null || + typeof (this.lineNumber) === "undefined" || this.lineNumber === null) { + return; + } + var stackFrames = this.stack.split("\n"); + var currentFrame = stackFrames[0]; + var pattern = this.fileName + ":" + this.lineNumber; + while (typeof (currentFrame) !== "undefined" && + currentFrame !== null && + currentFrame.indexOf(pattern) === -1) { + stackFrames.shift(); + currentFrame = stackFrames[0]; + } + var nextFrame = stackFrames[1]; + if (typeof (nextFrame) === "undefined" || nextFrame === null) { + return; + } + var nextFrameParts = nextFrame.match(/@(.*):(\d+)$/); + if (typeof (nextFrameParts) === "undefined" || nextFrameParts === null) { + return; + } + this.fileName = nextFrameParts[1]; + this.lineNumber = parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack = stackFrames.join("\n"); + }; + } + OsfMsAjaxFactory.msAjaxError = MsAjaxError; + OsfMsAjaxFactory.msAjaxString = MsAjaxString; + OsfMsAjaxFactory.msAjaxDebug = MsAjaxDebug; + } +})(OfficeExt || (OfficeExt = {})); +OSF.OUtil.setNamespace("SafeArray", OSF.DDA); +OSF.DDA.SafeArray.Response = { + Status: 0, + Payload: 1 +}; +OSF.DDA.SafeArray.UniqueArguments = { + Offset: "offset", + Run: "run", + BindingSpecificData: "bindingSpecificData", + MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" +}; +OSF.OUtil.setNamespace("Delegate", OSF.DDA.SafeArray); +OSF.DDA.SafeArray.Delegate._onException = function OSF_DDA_SafeArray_Delegate$OnException(ex, args) { + var status; + var statusNumber = ex.number; + if (statusNumber) { + switch (statusNumber) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2147467259: + if (args.dispId == OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + break; + case -2146828283: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147209089: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147208704: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + if (args.onComplete) { + args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } +}; +OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod = function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) { + var status; + var number = ex.number; + if (number) { + switch (number) { + case -2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; +}; +OSF.DDA.SafeArray.Delegate.SpecialProcessor = function OSF_DDA_SafeArray_Delegate_SpecialProcessor() { + function _2DVBArrayToJaggedArray(vbArr) { + var ret; + try { + var rows = vbArr.ubound(1); + var cols = vbArr.ubound(2); + vbArr = vbArr.toArray(); + if (rows == 1 && cols == 1) { + ret = [vbArr]; + } + else { + ret = []; + for (var row = 0; row < rows; row++) { + var rowArr = []; + for (var col = 0; col < cols; col++) { + var datum = vbArr[row * cols + col]; + if (datum != OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) { + rowArr.push(datum); + } + } + if (rowArr.length > 0) { + ret.push(rowArr); + } + } + } + } + catch (ex) { + } + return ret; + } + var complexTypes = []; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = (function () { + var tableRows = 0; + var tableHeaders = 1; + return { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) { + if (OSF.DDA.TableDataProperties && typeof data != "string" && data[OSF.DDA.TableDataProperties.TableRows] !== undefined) { + var tableData = []; + tableData[tableRows] = data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.DDA.TableDataProperties.TableHeaders]; + data = tableData; + } + return data; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) { + var ret; + if (hostArgs.toArray) { + var dimensions = hostArgs.dimensions(); + if (dimensions === 2) { + ret = _2DVBArrayToJaggedArray(hostArgs); + } + else { + var array = hostArgs.toArray(); + if (array.length === 2 && ((array[0] != null && array[0].toArray) || (array[1] != null && array[1].toArray))) { + ret = {}; + ret[OSF.DDA.TableDataProperties.TableRows] = _2DVBArrayToJaggedArray(array[tableRows]); + ret[OSF.DDA.TableDataProperties.TableHeaders] = _2DVBArrayToJaggedArray(array[tableHeaders]); + } + else { + ret = array; + } + } + } + else { + ret = hostArgs; + } + return ret; + } + }; + })(); + OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes); + this.unpack = function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) { + var toArraySupported = arg !== undefined && arg.toArray !== undefined; + value = toArraySupported ? arg.toArray() : arg || {}; + } + else if (this.isDynamicType(param)) { + value = dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; +}; +OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor); +OSF.DDA.SafeArray.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor(), [ + { + type: Microsoft.Office.WebExtension.Parameters.ValueFormat, + toHost: [ + { name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, value: 0 }, + { name: Microsoft.Office.WebExtension.ValueFormat.Formatted, value: 1 } + ] + }, + { + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [ + { name: Microsoft.Office.WebExtension.FilterType.All, value: 0 } + ] + } +]); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, + fromHost: [ + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, value: 0 }, + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) { + function toArray(args) { + var arrArgs = args; + if (OSF.OUtil.isArray(args)) { + var len = arrArgs.length; + for (var i = 0; i < len; i++) { + arrArgs[i] = toArray(arrArgs[i]); + } + } + else if (OSF.OUtil.isDate(args)) { + arrArgs = args.getVarDate(); + } + else if (typeof args === "object" && !OSF.OUtil.isArray(args)) { + arrArgs = []; + for (var index in args) { + if (!OSF.OUtil.isFunction(args[index])) { + arrArgs[index] = toArray(args[index]); + } + } + } + return arrArgs; + } + function fromSafeArray(value) { + var ret = value; + if (value != null && value.toArray) { + var arrayResult = value.toArray(); + ret = new Array(arrayResult.length); + for (var i = 0; i < arrayResult.length; i++) { + ret[i] = fromSafeArray(arrayResult[i]); + } + } + return ret; + } + try { + if (args.onCalling) { + args.onCalling(); + } + OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { + var result; + var status; + if (typeof hostResponseArgs === "number") { + result = []; + status = hostResponseArgs; + } + else { + result = hostResponseArgs.toArray(); + status = result[OSF.DDA.SafeArray.Response.Status]; + } + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) { + var payload = result[OSF.DDA.SafeArray.Response.Payload]; + payload = fromSafeArray(payload); + if (payload != null) { + if (!args._chunkResultData) { + args._chunkResultData = new Array(); + } + args._chunkResultData[payload[0]] = payload[1]; + } + return false; + } + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + var payload; + if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (result.length > 2) { + payload = []; + for (var i = 1; i < result.length; i++) + payload[i - 1] = result[i]; + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + if (args._chunkResultData) { + payload = fromSafeArray(payload); + if (payload != null) { + var expectedChunkCount = payload[payload.length - 1]; + if (args._chunkResultData.length == expectedChunkCount) { + payload[payload.length - 1] = args._chunkResultData; + } + else { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + } + } + } + else { + payload = result[OSF.DDA.SafeArray.Response.Payload]; + } + args.onComplete(status, payload); + } + return true; + }); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent = function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) { + var startTime = (new Date()).getTime(); + return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) { + if (args.onReceiving) { + args.onReceiving(); + } + var status = hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + }; +}; +OSF.DDA.SafeArray.Delegate.registerEventAsync = function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + try { + OSF.ClientHostController.registerEvent(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.unregisterEventAsync = function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.unregisterEvent(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.ClientMode = { + ReadWrite: 0, + ReadOnly: 1 +}; +OSF.DDA.RichInitializationReason = { + 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, + 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened +}; +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._initializeSettings = this.initializeSettings; +}; +OSF.InitializationHelper.prototype.deserializeSettings = function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) { + var settings; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if (storageSettings) { + serializedSettings = JSON.parse(storageSettings); + } + else { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if (refreshSupported) { + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + } + else { + settings = new OSF.DDA.Settings(deserializedSettings); + } + return settings; +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication() { +}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)); +}; +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { + var license = new OSF.DDA.License(appContext.get_eToken()); + var getOfficeThemeHandler = (OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme) ? OSF.DDA.OfficeTheme.getOfficeTheme : null; + if (appContext.get_isDialog()) { + if (OSF.DDA.UI.ChildUI) { + appContext.ui = new OSF.DDA.UI.ChildUI(); + } + } + else { + if (OSF.DDA.UI.ParentUI) { + appContext.ui = new OSF.DDA.UI.ParentUI(); + if (OfficeExt.Container) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.CloseContainerAsync]); + } + } + } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } + if (OSF.DDA.ExecuteFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.ExecuteFeature]); + } + if (OSF.DDA.QueryFeature) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.QueryFeature]); + } + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + var asyncMethods = []; + var getAccessTokenMethod = OSF.DDA.AsyncMethodNames.GetAccessTokenAsync; + if (getAccessTokenMethod) { + asyncMethods.push(getAccessTokenMethod); + } + var authContextMethod = OSF.DDA.AsyncMethodNames.GetNestedAppAuthContextAsync; + if (authContextMethod) { + asyncMethods.push(authContextMethod); + } + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, asyncMethods); + } + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); + var getDelegateMethods, parameterMap; + getDelegateMethods = OSF.DDA.DispIdHost.getClientDelegateMethods; + parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods, parameterMap)); +}; +OSF.InitializationHelper.prototype.getInitializationReason = function (appContext) { return OSF.DDA.RichInitializationReason[appContext.get_reason()]; }; +OSF.DDA.DispIdHost.getClientDelegateMethods = function (actionId) { + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.SafeArray.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.SafeArray.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.SafeArray.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.SafeArray.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.SafeArray.Delegate.closeDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.SafeArray.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.SafeArray.Delegate.sendMessage; + if (OSF.DDA.AsyncMethodNames.RefreshAsync && actionId == OSF.DDA.AsyncMethodNames.RefreshAsync.id) { + var readSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + if (typeof (OSF.DDA.ClientSettingsManager.refresh) === "function") { + return OSF.DDA.ClientSettingsManager.refresh(onCalling, onReceiving); + } + else { + return OSF.DDA.ClientSettingsManager.read(onCalling, onReceiving); + } + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings); + } + if (OSF.DDA.AsyncMethodNames.SaveAsync && actionId == OSF.DDA.AsyncMethodNames.SaveAsync.id) { + var writeSerializedSettings = function (hostCallArgs, onCalling, onReceiving) { + return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings], hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale], onCalling, onReceiving); + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings); + } + return delegateMethods; +}; +var OSF = OSF || {}; +var OSFWebView; +(function (OSFWebView) { + var WebViewSafeArray = (function () { + function WebViewSafeArray(data) { + this.data = data; + this.safeArrayFlag = this.isSafeArray(data); + } + WebViewSafeArray.prototype.dimensions = function () { + var dimensions = 0; + if (this.safeArrayFlag) { + dimensions = this.data[0][0]; + } + else if (this.isArray()) { + dimensions = 2; + } + return dimensions; + }; + WebViewSafeArray.prototype.getItem = function () { + var array = []; + var element = null; + if (this.safeArrayFlag) { + array = this.toArray(); + } + else { + array = this.data; + } + element = array; + for (var i = 0; i < arguments.length; i++) { + element = element[arguments[i]]; + } + return element; + }; + WebViewSafeArray.prototype.lbound = function (dimension) { + return 0; + }; + WebViewSafeArray.prototype.ubound = function (dimension) { + var ubound = 0; + if (this.safeArrayFlag) { + ubound = this.data[0][dimension]; + } + else if (this.isArray()) { + if (dimension == 1) { + return this.data.length; + } + else if (dimension == 2) { + if (OSF.OUtil.isArray(this.data[0])) { + return this.data[0].length; + } + else if (this.data[0] != null) { + return 1; + } + } + } + return ubound; + }; + WebViewSafeArray.prototype.toArray = function () { + if (this.isArray() == false) { + return this.data; + } + var arr = []; + var startingIndex = this.safeArrayFlag ? 1 : 0; + for (var i = startingIndex; i < this.data.length; i++) { + var element = this.data[i]; + if (this.isSafeArray(element)) { + arr.push(new WebViewSafeArray(element)); + } + else { + arr.push(element); + } + } + return arr; + }; + WebViewSafeArray.prototype.isArray = function () { + return OSF.OUtil.isArray(this.data); + }; + WebViewSafeArray.prototype.isSafeArray = function (obj) { + var isSafeArray = false; + if (OSF.OUtil.isArray(obj) && OSF.OUtil.isArray(obj[0])) { + var bounds = obj[0]; + var dimensions = bounds[0]; + if (bounds.length != dimensions + 1) { + return false; + } + var expectedArraySize = 1; + for (var i = 1; i < bounds.length; i++) { + var dimension = bounds[i]; + if (isFinite(dimension) == false) { + return false; + } + expectedArraySize = expectedArraySize * dimension; + } + expectedArraySize++; + isSafeArray = (expectedArraySize == obj.length); + } + return isSafeArray; + }; + return WebViewSafeArray; + }()); + OSFWebView.WebViewSafeArray = WebViewSafeArray; +})(OSFWebView || (OSFWebView = {})); +(function (OSFWebView) { + var ScriptMessaging; + (function (ScriptMessaging) { + var scriptMessenger = null; + function agaveHostCallback(callbackId, params) { + scriptMessenger.agaveHostCallback(callbackId, params); + } + ScriptMessaging.agaveHostCallback = agaveHostCallback; + function agaveHostEventCallback(callbackId, params) { + scriptMessenger.agaveHostEventCallback(callbackId, params); + } + ScriptMessaging.agaveHostEventCallback = agaveHostEventCallback; + function GetScriptMessenger(agaveHostCallbackName, agaveHostEventCallbackName, poster) { + if (scriptMessenger == null) { + scriptMessenger = new Messenger(agaveHostCallbackName, agaveHostEventCallbackName, poster); + } + return scriptMessenger; + } + ScriptMessaging.GetScriptMessenger = GetScriptMessenger; + var EventHandlerCallback = (function () { + function EventHandlerCallback(id, targetId, handler) { + this.id = id; + this.targetId = targetId; + this.handler = handler; + } + return EventHandlerCallback; + }()); + var Messenger = (function () { + function Messenger(methodCallbackName, eventCallbackName, messagePoster) { + this.callingIndex = 0; + this.callbackList = {}; + this.eventHandlerList = {}; + this.asyncMethodCallbackFunctionName = methodCallbackName; + this.eventCallbackFunctionName = eventCallbackName; + this.poster = messagePoster; + this.conversationId = Messenger.getCurrentTimeMS().toString(); + } + Messenger.prototype.invokeMethod = function (handlerName, methodId, params, callback) { + var messagingArgs = {}; + this.postMessage(messagingArgs, handlerName, methodId, params, callback); + }; + Messenger.prototype.registerEvent = function (handlerName, methodId, dispId, targetId, handler, callback) { + var messagingArgs = { + eventCallbackFunction: this.eventCallbackFunctionName + }; + var hostArgs = { + id: dispId, + targetId: targetId + }; + var correlationId = this.postMessage(messagingArgs, handlerName, methodId, hostArgs, callback); + this.eventHandlerList[correlationId] = new EventHandlerCallback(dispId, targetId, handler); + }; + Messenger.prototype.unregisterEvent = function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + for (var key in this.eventHandlerList) { + if (this.eventHandlerList.hasOwnProperty(key)) { + var eventCallback = this.eventHandlerList[key]; + if (eventCallback.id == dispId && eventCallback.targetId == targetId) { + delete this.eventHandlerList[key]; + } + } + } + this.invokeMethod(handlerName, methodId, hostArgs, callback); + }; + Messenger.prototype.agaveHostCallback = function (callbackId, params) { + var callbackFunction = this.callbackList[callbackId]; + if (callbackFunction) { + var callbacksDone = callbackFunction(params); + if (callbacksDone === undefined || callbacksDone === true) { + delete this.callbackList[callbackId]; + } + } + }; + Messenger.prototype.agaveHostEventCallback = function (callbackId, params) { + var eventCallback = this.eventHandlerList[callbackId]; + if (eventCallback) { + eventCallback.handler(params); + } + }; + Messenger.prototype.postMessage = function (messagingArgs, handlerName, methodId, params, callback) { + var correlationId = this.generateCorrelationId(); + this.callbackList[correlationId] = callback; + messagingArgs.methodId = methodId; + messagingArgs.params = params; + messagingArgs.callbackId = correlationId; + messagingArgs.callbackFunction = this.asyncMethodCallbackFunctionName; + this.poster.postMessage(handlerName, JSON.stringify(messagingArgs)); + return correlationId; + }; + Messenger.prototype.generateCorrelationId = function () { + ++this.callingIndex; + return this.conversationId + this.callingIndex; + }; + Messenger.getCurrentTimeMS = function () { + return (new Date).getTime(); + }; + Messenger.MESSAGE_TIME_DELTA = 10; + return Messenger; + }()); + ScriptMessaging.Messenger = Messenger; + })(ScriptMessaging = OSFWebView.ScriptMessaging || (OSFWebView.ScriptMessaging = {})); +})(OSFWebView || (OSFWebView = {})); +OSF.ScriptMessaging = OSFWebView.ScriptMessaging; +(function (OSFWebView) { + OSFWebView.MessageHandlerName = "Agave"; + OSFWebView.PopupMessageHandlerName = "WefPopupHandler"; + var AppContextProperties; + (function (AppContextProperties) { + AppContextProperties[AppContextProperties["Settings"] = 0] = "Settings"; + AppContextProperties[AppContextProperties["SolutionReferenceId"] = 1] = "SolutionReferenceId"; + AppContextProperties[AppContextProperties["AppType"] = 2] = "AppType"; + AppContextProperties[AppContextProperties["MajorVersion"] = 3] = "MajorVersion"; + AppContextProperties[AppContextProperties["MinorVersion"] = 4] = "MinorVersion"; + AppContextProperties[AppContextProperties["RevisionVersion"] = 5] = "RevisionVersion"; + AppContextProperties[AppContextProperties["APIVersionSequence"] = 6] = "APIVersionSequence"; + AppContextProperties[AppContextProperties["AppCapabilities"] = 7] = "AppCapabilities"; + AppContextProperties[AppContextProperties["APPUILocale"] = 8] = "APPUILocale"; + AppContextProperties[AppContextProperties["AppDataLocale"] = 9] = "AppDataLocale"; + AppContextProperties[AppContextProperties["BindingCount"] = 10] = "BindingCount"; + AppContextProperties[AppContextProperties["DocumentUrl"] = 11] = "DocumentUrl"; + AppContextProperties[AppContextProperties["ActivationMode"] = 12] = "ActivationMode"; + AppContextProperties[AppContextProperties["ControlIntegrationLevel"] = 13] = "ControlIntegrationLevel"; + AppContextProperties[AppContextProperties["SolutionToken"] = 14] = "SolutionToken"; + AppContextProperties[AppContextProperties["APISetVersion"] = 15] = "APISetVersion"; + AppContextProperties[AppContextProperties["CorrelationId"] = 16] = "CorrelationId"; + AppContextProperties[AppContextProperties["InstanceId"] = 17] = "InstanceId"; + AppContextProperties[AppContextProperties["TouchEnabled"] = 18] = "TouchEnabled"; + AppContextProperties[AppContextProperties["CommerceAllowed"] = 19] = "CommerceAllowed"; + AppContextProperties[AppContextProperties["RequirementMatrix"] = 20] = "RequirementMatrix"; + AppContextProperties[AppContextProperties["OfficeThemeInfo"] = 21] = "OfficeThemeInfo"; + })(AppContextProperties = OSFWebView.AppContextProperties || (OSFWebView.AppContextProperties = {})); + var MethodId; + (function (MethodId) { + MethodId[MethodId["Execute"] = 1] = "Execute"; + MethodId[MethodId["RegisterEvent"] = 2] = "RegisterEvent"; + MethodId[MethodId["UnregisterEvent"] = 3] = "UnregisterEvent"; + MethodId[MethodId["WriteSettings"] = 4] = "WriteSettings"; + MethodId[MethodId["GetContext"] = 5] = "GetContext"; + MethodId[MethodId["OnKeydown"] = 6] = "OnKeydown"; + MethodId[MethodId["AddinInitialized"] = 7] = "AddinInitialized"; + MethodId[MethodId["OpenWindow"] = 8] = "OpenWindow"; + MethodId[MethodId["MessageParent"] = 9] = "MessageParent"; + MethodId[MethodId["SendMessage"] = 10] = "SendMessage"; + })(MethodId = OSFWebView.MethodId || (OSFWebView.MethodId = {})); + var WebViewHostController = (function () { + function WebViewHostController(hostScriptProxy) { + this.hostScriptProxy = hostScriptProxy; + } + WebViewHostController.prototype.execute = function (id, params, callback) { + var args = params; + if (args == null) { + args = []; + } + var hostParams = { + id: id, + apiArgs: args + }; + var agaveResponseCallback = function (payload) { + var safeArraySource = payload; + if (OSF.OUtil.isArray(payload) && payload.length >= 2) { + var hrStatus = payload[0]; + safeArraySource = payload[1]; + } + if (callback) { + return callback(new OSFWebView.WebViewSafeArray(safeArraySource)); + } + }; + this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.Execute, hostParams, agaveResponseCallback); + }; + WebViewHostController.prototype.registerEvent = function (id, targetId, handler, callback) { + var agaveEventHandlerCallback = function (payload) { + var safeArraySource = payload; + var eventId = 0; + if (OSF.OUtil.isArray(payload) && payload.length >= 2) { + eventId = payload[0]; + safeArraySource = payload[1]; + } + if (handler) { + handler(eventId, new OSFWebView.WebViewSafeArray(safeArraySource)); + } + }; + var agaveResponseCallback = function (payload) { + if (callback) { + return callback(new OSFWebView.WebViewSafeArray(payload)); + } + }; + this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.RegisterEvent, id, targetId, agaveEventHandlerCallback, agaveResponseCallback); + }; + WebViewHostController.prototype.unregisterEvent = function (id, targetId, callback) { + var agaveResponseCallback = function (response) { + return callback(new OSFWebView.WebViewSafeArray(response)); + }; + this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.UnregisterEvent, id, targetId, agaveResponseCallback); + }; + WebViewHostController.prototype.messageParent = function (params) { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message = message.toString(); + } + this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.MessageParent, message, null); + }; + WebViewHostController.prototype.openDialog = function (id, targetId, handler, callback) { + var callArgs = JSON.parse(targetId); + if (isNaN(callArgs.width) || callArgs.width <= 0 || (!callArgs.useDeviceIndependentPixels && callArgs.width > 100)) { + callArgs.width = 99; + } + if (isNaN(callArgs.height) || callArgs.height <= 0 || (!callArgs.useDeviceIndependentPixels && callArgs.height > 100)) { + callArgs.height = 99; + } + targetId = JSON.stringify(callArgs); + this.registerEvent(id, targetId, handler, callback); + }; + WebViewHostController.prototype.closeDialog = function (id, targetId, callback) { + this.unregisterEvent(id, targetId, callback); + }; + WebViewHostController.prototype.sendMessage = function (params) { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageContent]; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message = message.toString(); + } + this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.SendMessage, message, null); + }; + WebViewHostController.prototype.closeSdxDialog = function (context) { + }; + WebViewHostController.prototype.resizeSdxDialog = function (width, height) { + }; + return WebViewHostController; + }()); + OSFWebView.WebViewHostController = WebViewHostController; +})(OSFWebView || (OSFWebView = {})); +var CrossIFrameCommon; +(function (CrossIFrameCommon) { + var CallbackType; + (function (CallbackType) { + CallbackType[CallbackType["MethodCallback"] = 0] = "MethodCallback"; + CallbackType[CallbackType["EventCallback"] = 1] = "EventCallback"; + })(CallbackType = CrossIFrameCommon.CallbackType || (CrossIFrameCommon.CallbackType = {})); + var CallbackData = (function () { + function CallbackData(callbackType, callbackId, params) { + this.callbackType = callbackType; + this.callbackId = callbackId; + this.params = params; + } + return CallbackData; + }()); + CrossIFrameCommon.CallbackData = CallbackData; +})(CrossIFrameCommon || (CrossIFrameCommon = {})); +var WinRT; +(function (WinRT) { + var Poster = (function () { + function Poster() { + window.addEventListener("message", this.OnReceiveMessage); + } + Poster.prototype.postMessage = function (handlerName, message) { + window.parent.postMessage(message, "*"); + }; + Poster.prototype.OnReceiveMessage = function (event) { + if (event.source != window.parent || window.parent != window.top || !event.origin.startsWith("ms-appx-web://")) { + return; + } + var cbData; + try { + cbData = JSON.parse(event.data); + } + catch (ex) { + return; + } + switch (cbData.callbackType) { + case CrossIFrameCommon.CallbackType.MethodCallback: + OSFWebView.ScriptMessaging.agaveHostCallback(cbData.callbackId, JSON.parse(cbData.params)); + break; + case CrossIFrameCommon.CallbackType.EventCallback: + OSFWebView.ScriptMessaging.agaveHostEventCallback(cbData.callbackId, JSON.parse(cbData.params)); + break; + default: + break; + } + }; + return Poster; + }()); + WinRT.Poster = Poster; +})(WinRT || (WinRT = {})); +OSF.DDA.ClientSettingsManager = { + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) { + return function (args) { + var status, response; + var onComplete = function onComplete(status, response) { + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + args.onComplete(status, response); + } + }; + try { + hostDelegateMethod(args.hostCallArgs, args.onCalling, onComplete); + } + catch (ex) { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response = { name: Strings.OfficeOM.L_InternalError, message: ex }; + onComplete(status, response); + } + }; + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) { + var keys = []; + var values = []; + if (onCalling) { + onCalling(); + } + var initializationHelper = OSF._OfficeAppFactory.getInitializationHelper(); + var onReceivedContext = function onReceivedContext(appContext) { + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, appContext.get_settings()); + } + }; + initializationHelper.getAppContext(null, onReceivedContext); + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) { + var hostParams = {}; + var keys = []; + var values = []; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + hostParams["keys"] = keys; + hostParams["values"] = values; + if (onCalling) { + onCalling(); + } + var onWriteCompleted = function onWriteCompleted(status) { + if (onComplete) { + onComplete(status[0], null); + } + }; + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.WriteSettings, hostParams, onWriteCompleted); + } +}; +OSF.InitializationHelper.prototype.initializeSettings = function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) { + var serializedSettings = appContext.get_settings(); + var settings = this.deserializeSettings(serializedSettings, refreshSupported); + return settings; +}; +OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + var getInvocationCallback = function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(appContext) { + var returnedContext; + var appContextProperties = OSF.WebView.AppContextProperties; + var appType = appContext[appContextProperties.AppType]; + var appTypeSupported = false; + for (var appEntry in OSF.AppName) { + if (OSF.AppName[appEntry] == appType) { + appTypeSupported = true; + break; + } + } + if (!appTypeSupported) { + throw "Unsupported client type " + appType; + } + var hostSettings = appContext[appContextProperties.Settings]; + var serializedSettings = {}; + var keys = hostSettings[0]; + var values = hostSettings[1]; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + var id = appContext[appContextProperties.SolutionReferenceId]; + var version = appContext[appContextProperties.MajorVersion]; + var clientMode = appContext[appContextProperties.AppCapabilities]; + var UILocale = appContext[appContextProperties.APPUILocale]; + var dataLocale = appContext[appContextProperties.AppDataLocale]; + var docUrl = appContext[appContextProperties.DocumentUrl]; + var reason = appContext[appContextProperties.ActivationMode]; + var osfControlType = appContext[appContextProperties.ControlIntegrationLevel]; + var eToken = appContext[appContextProperties.SolutionToken]; + eToken = eToken ? eToken.toString() : ""; + var correlationId = appContext[appContextProperties.CorrelationId]; + var appInstanceId = appContext[appContextProperties.InstanceId]; + var touchEnabled = appContext[appContextProperties.TouchEnabled]; + var commerceAllowed = appContext[appContextProperties.CommerceAllowed]; + var minorVersion = appContext[appContextProperties.MinorVersion]; + var requirementMatrix = appContext[appContextProperties.RequirementMatrix]; + var revisionVersion = appContext[appContextProperties.RevisionVersion]; + var revisionSequence = appContext[appContextProperties.APIVersionSequence]; + var hostFullVersion = version + "." + minorVersion + "." + revisionVersion + "." + revisionSequence; + var officeThemeInfo = appContext[appContextProperties.OfficeThemeInfo]; + if (officeThemeInfo) { + officeThemeInfo = JSON.parse(officeThemeInfo); + for (var color in officeThemeInfo) { + officeThemeInfo[color] = OSF.OUtil.convertIntToCssHexColor(officeThemeInfo[color]); + } + } + returnedContext = new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, serializedSettings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, undefined, hostFullVersion, undefined, undefined, undefined, undefined, undefined, undefined, officeThemeInfo); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + }; + var handler; + if (this._hostInfo.isDialog) { + handler = OSF.WebView.PopupMessageHandlerName; + } + else { + handler = OSF.WebView.MessageHandlerName; + } + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler, OSF.WebView.MethodId.GetContext, [], getInvocationCallback); +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunicationOverride() { + var getAllTabElements = function () { + var tabbableElementsSelector = "a[href]:not([tabindex='-1'])," + + "area[href]:not([tabindex='-1'])," + + "button:not([disabled]):not([tabindex='-1'])," + + "input:not([disabled]):not([tabindex='-1'])," + + "select:not([disabled]):not([tabindex='-1'])," + + "textarea:not([disabled]):not([tabindex='-1'])," + + "*[tabindex]:not([tabindex='-1'])," + + "*[contenteditable]:not([disabled]):not([tabindex='-1'])"; + return document.querySelectorAll(tabbableElementsSelector); + }; + OSF.OUtil.addEventListener(window, "keydown", function (e) { + e.preventDefault = e.preventDefault || function () { + e.returnValue = false; + }; + if (e.keyCode == 117) { + e.preventDefault(); + e.stopPropagation(); + var actionId = OSF.AgaveHostAction.CtrlF6Exit; + if (e.shiftKey) { + actionId = OSF.AgaveHostAction.CtrlF6ExitShift; + } + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.OnKeydown, { "actionId": actionId }, null); + } + else if (e.keyCode == 27) { + e.preventDefault(); + e.stopPropagation(); + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.OnKeydown, { "actionId": OSF.AgaveHostAction.EscExit }, null); + } + else if (e.keyCode == 9) { + e.preventDefault(); + e.stopPropagation(); + var allTabbableElements = getAllTabElements(); + if (allTabbableElements.length == 0) { + return; + } + var focused = OSF.OUtil.focusToNextTabbable(allTabbableElements, e.target || e.srcElement, e.shiftKey); + if (!focused) { + OSF.OUtil.focusToFirstTabbable(allTabbableElements, e.shiftKey); + } + } + }); + var windowOpen = function OSF_InitializationHelper$windowOpen(windowObj) { + windowObj.open = function (strUrl) { + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.OpenWindow, strUrl); + }; + }; + windowOpen(window); + var setDefaultFocus = function OSF_InitializationHelper$setDefaultFocus() { + try { + if (document.activeElement == null || document.activeElement == document.body) { + var allTabbableElements = getAllTabElements(); + if (allTabbableElements && allTabbableElements.length > 0) { + OSF.OUtil.focusToFirstTabbable(allTabbableElements, false); + } + } + } + catch (err) { + OsfMsAjaxFactory.msAjaxDebug.trace("Setting Agave default focus failed. Exception:" + err); + } + }; + if (document.body) { + setDefaultFocus(); + } + else { + document.addEventListener('DOMContentLoaded', setDefaultFocus); + } + window.addEventListener("blur", function () { + try { + if (document.activeElement) { + document.activeElement.blur(); + } + } + catch (err) { + OsfMsAjaxFactory.msAjaxDebug.trace("Clearing Agave focus failed. Exception:" + err); + } + }); +}; +OSF.WebView = OSFWebView; +OSF.ClientHostController = new OSFWebView.WebViewHostController(OSF.ScriptMessaging.GetScriptMessenger("agaveHostCallback", "agaveHostEventCallback", new WinRT.Poster())); +var OSFLog; +(function (OSFLog) { + var BaseUsageData = (function () { + function BaseUsageData(table) { + this._table = table; + this._fields = {}; + } + Object.defineProperty(BaseUsageData.prototype, "Fields", { + get: function () { + return this._fields; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype, "Table", { + get: function () { + return this._table; + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function () { + }; + BaseUsageData.prototype.SetSerializedField = function (key, value) { + if (typeof (value) !== "undefined" && value !== null) { + this._serializedFields[key] = value.toString(); + } + }; + BaseUsageData.prototype.SerializeRow = function () { + this._serializedFields = {}; + this.SetSerializedField("Table", this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields); + }; + return BaseUsageData; + }()); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = (function (_super) { + __extends(AppActivatedUsageData, _super); + function AppActivatedUsageData() { + return _super.call(this, "AppActivated") || this; + } + Object.defineProperty(AppActivatedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppId", { + get: function () { return this.Fields["AppId"]; }, + set: function (value) { this.Fields["AppId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppInstanceId", { + get: function () { return this.Fields["AppInstanceId"]; }, + set: function (value) { this.Fields["AppInstanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppURL", { + get: function () { return this.Fields["AppURL"]; }, + set: function (value) { this.Fields["AppURL"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AssetId", { + get: function () { return this.Fields["AssetId"]; }, + set: function (value) { this.Fields["AssetId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Browser", { + get: function () { return this.Fields["Browser"]; }, + set: function (value) { this.Fields["Browser"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "UserId", { + get: function () { return this.Fields["UserId"]; }, + set: function (value) { this.Fields["UserId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Host", { + get: function () { return this.Fields["Host"]; }, + set: function (value) { this.Fields["Host"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostVersion", { + get: function () { return this.Fields["HostVersion"]; }, + set: function (value) { this.Fields["HostVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "ClientId", { + get: function () { return this.Fields["ClientId"]; }, + set: function (value) { this.Fields["ClientId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeWidth", { + get: function () { return this.Fields["AppSizeWidth"]; }, + set: function (value) { this.Fields["AppSizeWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeHeight", { + get: function () { return this.Fields["AppSizeHeight"]; }, + set: function (value) { this.Fields["AppSizeHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "DocUrl", { + get: function () { return this.Fields["DocUrl"]; }, + set: function (value) { this.Fields["DocUrl"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "OfficeJSVersion", { + get: function () { return this.Fields["OfficeJSVersion"]; }, + set: function (value) { this.Fields["OfficeJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostJSVersion", { + get: function () { return this.Fields["HostJSVersion"]; }, + set: function (value) { this.Fields["HostJSVersion"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "WacHostEnvironment", { + get: function () { return this.Fields["WacHostEnvironment"]; }, + set: function (value) { this.Fields["WacHostEnvironment"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsFromWacAutomation", { + get: function () { return this.Fields["IsFromWacAutomation"]; }, + set: function (value) { this.Fields["IsFromWacAutomation"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsMOS", { + get: function () { return this.Fields["IsMOS"]; }, + set: function (value) { this.Fields["IsMOS"] = value; }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("AppId", this.AppId); + this.SetSerializedField("AppInstanceId", this.AppInstanceId); + this.SetSerializedField("AppURL", this.AppURL); + this.SetSerializedField("AssetId", this.AssetId); + this.SetSerializedField("Browser", this.Browser); + this.SetSerializedField("UserId", this.UserId); + this.SetSerializedField("Host", this.Host); + this.SetSerializedField("HostVersion", this.HostVersion); + this.SetSerializedField("ClientId", this.ClientId); + this.SetSerializedField("AppSizeWidth", this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight", this.AppSizeHeight); + this.SetSerializedField("Message", this.Message); + this.SetSerializedField("DocUrl", this.DocUrl); + this.SetSerializedField("OfficeJSVersion", this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion", this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment", this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation", this.IsFromWacAutomation); + this.SetSerializedField("IsMOS", this.IsMOS); + }; + return AppActivatedUsageData; + }(BaseUsageData)); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = (function (_super) { + __extends(ScriptLoadUsageData, _super); + function ScriptLoadUsageData() { + return _super.call(this, "ScriptLoad") || this; + } + Object.defineProperty(ScriptLoadUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ScriptId", { + get: function () { return this.Fields["ScriptId"]; }, + set: function (value) { this.Fields["ScriptId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "StartTime", { + get: function () { return this.Fields["StartTime"]; }, + set: function (value) { this.Fields["StartTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("ScriptId", this.ScriptId); + this.SetSerializedField("StartTime", this.StartTime); + this.SetSerializedField("ResponseTime", this.ResponseTime); + }; + return ScriptLoadUsageData; + }(BaseUsageData)); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = (function (_super) { + __extends(AppClosedUsageData, _super); + function AppClosedUsageData() { + return _super.call(this, "AppClosed") || this; + } + Object.defineProperty(AppClosedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "FocusTime", { + get: function () { return this.Fields["FocusTime"]; }, + set: function (value) { this.Fields["FocusTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalWidth", { + get: function () { return this.Fields["AppSizeFinalWidth"]; }, + set: function (value) { this.Fields["AppSizeFinalWidth"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalHeight", { + get: function () { return this.Fields["AppSizeFinalHeight"]; }, + set: function (value) { this.Fields["AppSizeFinalHeight"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "OpenTime", { + get: function () { return this.Fields["OpenTime"]; }, + set: function (value) { this.Fields["OpenTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "CloseMethod", { + get: function () { return this.Fields["CloseMethod"]; }, + set: function (value) { this.Fields["CloseMethod"] = value; }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("FocusTime", this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth", this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight", this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime", this.OpenTime); + this.SetSerializedField("CloseMethod", this.CloseMethod); + }; + return AppClosedUsageData; + }(BaseUsageData)); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = (function (_super) { + __extends(APIUsageUsageData, _super); + function APIUsageUsageData() { + return _super.call(this, "APIUsage") || this; + } + Object.defineProperty(APIUsageUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIType", { + get: function () { return this.Fields["APIType"]; }, + set: function (value) { this.Fields["APIType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIID", { + get: function () { return this.Fields["APIID"]; }, + set: function (value) { this.Fields["APIID"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "Parameters", { + get: function () { return this.Fields["Parameters"]; }, + set: function (value) { this.Fields["Parameters"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ErrorType", { + get: function () { return this.Fields["ErrorType"]; }, + set: function (value) { this.Fields["ErrorType"] = value; }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("APIType", this.APIType); + this.SetSerializedField("APIID", this.APIID); + this.SetSerializedField("Parameters", this.Parameters); + this.SetSerializedField("ResponseTime", this.ResponseTime); + this.SetSerializedField("ErrorType", this.ErrorType); + }; + return APIUsageUsageData; + }(BaseUsageData)); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = (function (_super) { + __extends(AppInitializationUsageData, _super); + function AppInitializationUsageData() { + return _super.call(this, "AppInitialization") || this; + } + Object.defineProperty(AppInitializationUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SuccessCode", { + get: function () { return this.Fields["SuccessCode"]; }, + set: function (value) { this.Fields["SuccessCode"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"] = value; }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("SuccessCode", this.SuccessCode); + this.SetSerializedField("Message", this.Message); + }; + return AppInitializationUsageData; + }(BaseUsageData)); + OSFLog.AppInitializationUsageData = AppInitializationUsageData; + var CheckWACHostUsageData = (function (_super) { + __extends(CheckWACHostUsageData, _super); + function CheckWACHostUsageData() { + return _super.call(this, "CheckWACHost") || this; + } + Object.defineProperty(CheckWACHostUsageData.prototype, "isWacKnownHost", { + get: function () { return this.Fields["isWacKnownHost"]; }, + set: function (value) { this.Fields["isWacKnownHost"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "instanceId", { + get: function () { return this.Fields["instanceId"]; }, + set: function (value) { this.Fields["instanceId"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostType", { + get: function () { return this.Fields["hostType"]; }, + set: function (value) { this.Fields["hostType"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "hostPlatform", { + get: function () { return this.Fields["hostPlatform"]; }, + set: function (value) { this.Fields["hostPlatform"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "wacDomain", { + get: function () { return this.Fields["wacDomain"]; }, + set: function (value) { this.Fields["wacDomain"] = value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CheckWACHostUsageData.prototype, "isLocalStorageAvailable", { + get: function () { return this.Fields["isLocalStorageAvailable"]; }, + set: function (value) { this.Fields["isLocalStorageAvailable"] = value; }, + enumerable: true, + configurable: true + }); + CheckWACHostUsageData.prototype.SerializeFields = function () { + this.SetSerializedField("isWacKnownHost", this.isWacKnownHost); + this.SetSerializedField("instanceId", this.instanceId); + this.SetSerializedField("hostType", this.hostType); + this.SetSerializedField("hostPlatform", this.hostPlatform); + this.SetSerializedField("wacDomain", this.wacDomain); + this.SetSerializedField("isLocalStorageAvailable", this.isLocalStorageAvailable); + }; + return CheckWACHostUsageData; + }(BaseUsageData)); + OSFLog.CheckWACHostUsageData = CheckWACHostUsageData; +})(OSFLog || (OSFLog = {})); +var Logger; +(function (Logger) { + "use strict"; + var TraceLevel; + (function (TraceLevel) { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error"; + })(TraceLevel = Logger.TraceLevel || (Logger.TraceLevel = {})); + var SendFlag; + (function (SendFlag) { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush"; + })(SendFlag = Logger.SendFlag || (Logger.SendFlag = {})); + function allowUploadingData() { + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) { + } + Logger.sendLog = sendLog; + function creatULSEndpoint() { + try { + return new ULSEndpointProxy(); + } + catch (e) { + return null; + } + } + var ULSEndpointProxy = (function () { + function ULSEndpointProxy() { + } + ULSEndpointProxy.prototype.writeLog = function (log) { + }; + ULSEndpointProxy.prototype.loadProxyFrame = function () { + }; + return ULSEndpointProxy; + }()); + if (!OSF.Logger) { + OSF.Logger = Logger; + } + Logger.ulsEndpoint = creatULSEndpoint(); +})(Logger || (Logger = {})); +var OSFAriaLogger; +(function (OSFAriaLogger) { + var TelemetryEventAppActivated = { name: "AppActivated", enabled: true, critical: true, points: [ + { name: "Browser", type: "string" }, + { name: "Message", type: "string" }, + { name: "Host", type: "string" }, + { name: "AppSizeWidth", type: "int64" }, + { name: "AppSizeHeight", type: "int64" }, + { name: "IsFromWacAutomation", type: "string" }, + { name: "IsMOS", type: "int64" }, + ] }; + var TelemetryEventScriptLoad = { name: "ScriptLoad", enabled: true, critical: false, points: [ + { name: "ScriptId", type: "string" }, + { name: "StartTime", type: "double" }, + { name: "ResponseTime", type: "double" }, + ] }; + var enableAPIUsage = shouldAPIUsageBeEnabled(); + var TelemetryEventApiUsage = { name: "APIUsage", enabled: enableAPIUsage, critical: false, points: [ + { name: "APIType", type: "string" }, + { name: "APIID", type: "int64" }, + { name: "Parameters", type: "string" }, + { name: "ResponseTime", type: "int64" }, + { name: "ErrorType", type: "int64" }, + ] }; + var TelemetryEventAppInitialization = { name: "AppInitialization", enabled: true, critical: false, points: [ + { name: "SuccessCode", type: "int64" }, + { name: "Message", type: "string" }, + ] }; + var TelemetryEventAppClosed = { name: "AppClosed", enabled: true, critical: false, points: [ + { name: "FocusTime", type: "int64" }, + { name: "AppSizeFinalWidth", type: "int64" }, + { name: "AppSizeFinalHeight", type: "int64" }, + { name: "OpenTime", type: "int64" }, + ] }; + var TelemetryEventCheckWACHost = { name: "CheckWACHost", enabled: true, critical: false, points: [ + { name: "isWacKnownHost", type: "int64" }, + { name: "solutionId", type: "string" }, + { name: "hostType", type: "string" }, + { name: "hostPlatform", type: "string" }, + { name: "correlationId", type: "string" }, + { name: "isLocalStorageAvailable", type: "boolean" }, + ] }; + var TelemetryEvents = [ + TelemetryEventAppActivated, + TelemetryEventScriptLoad, + TelemetryEventApiUsage, + TelemetryEventAppInitialization, + TelemetryEventAppClosed, + TelemetryEventCheckWACHost, + ]; + function createDataField(value, point) { + var key = point.rename === undefined ? point.name : point.rename; + var type = point.type; + var field = undefined; + switch (type) { + case "string": + field = oteljs.makeStringDataField(key, value); + break; + case "double": + if (typeof value === "string") { + value = parseFloat(value); + } + field = oteljs.makeDoubleDataField(key, value); + break; + case "int64": + if (typeof value === "string") { + value = parseInt(value); + } + field = oteljs.makeInt64DataField(key, value); + break; + case "boolean": + if (typeof value === "string") { + value = value === "true"; + } + field = oteljs.makeBooleanDataField(key, value); + break; + } + return field; + } + function getEventDefinition(eventName) { + for (var _i = 0, TelemetryEvents_1 = TelemetryEvents; _i < TelemetryEvents_1.length; _i++) { + var event_1 = TelemetryEvents_1[_i]; + if (event_1.name === eventName) { + return event_1; + } + } + return undefined; + } + function eventEnabled(eventName) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return false; + } + return eventDefinition.enabled; + } + function shouldAPIUsageBeEnabled() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function generateTelemetryEvent(eventName, telemetryData) { + var eventDefinition = getEventDefinition(eventName); + if (eventDefinition === undefined) { + return undefined; + } + var dataFields = []; + for (var _i = 0, _a = eventDefinition.points; _i < _a.length; _i++) { + var point = _a[_i]; + var key = point.name; + var value = telemetryData[key]; + if (value === undefined) { + continue; + } + var field = createDataField(value, point); + if (field !== undefined) { + dataFields.push(field); + } + } + var flags = { dataCategories: oteljs.DataCategories.ProductServiceUsage }; + if (eventDefinition.critical) { + flags.samplingPolicy = oteljs.SamplingPolicy.CriticalBusinessImpact; + } + flags.diagnosticLevel = oteljs.DiagnosticLevel.NecessaryServiceDataEvent; + var eventNameFull = "Office.Extensibility.OfficeJs." + eventName + "X"; + var event = { eventName: eventNameFull, dataFields: dataFields, eventFlags: flags }; + return event; + } + function sendOtelTelemetryEvent(eventName, telemetryData) { + if (eventEnabled(eventName)) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var event = generateTelemetryEvent(eventName, telemetryData); + if (event === undefined) { + return; + } + Microsoft.Office.WebExtension.sendTelemetryEvent(event); + }); + } + } + } + var AriaLogger = (function () { + function AriaLogger() { + } + AriaLogger.prototype.getAriaCDNLocation = function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "ariatelemetry/aria-web-telemetry.js"); + }; + AriaLogger.getInstance = function () { + if (AriaLogger.AriaLoggerObj === undefined) { + AriaLogger.AriaLoggerObj = new AriaLogger(); + } + return AriaLogger.AriaLoggerObj; + }; + AriaLogger.prototype.isIUsageData = function (arg) { + return arg["Fields"] !== undefined; + }; + AriaLogger.prototype.shouldSendDirectToAria = function (flavor, version) { + var BASE10 = 10; + var MAX_VERSION_WIN32 = [16, 0, 11601]; + var MAX_VERSION_MAC = [16, 28]; + var max_version; + if (!flavor) { + return false; + } + else if (flavor.toLowerCase() === "win32") { + max_version = MAX_VERSION_WIN32; + } + else if (flavor.toLowerCase() === "mac") { + max_version = MAX_VERSION_MAC; + } + else { + return true; + } + if (!version) { + return false; + } + var versionTokens = version.split('.'); + for (var i = 0; i < max_version.length && i < versionTokens.length; i++) { + var versionToken = parseInt(versionTokens[i], BASE10); + if (isNaN(versionToken)) { + return false; + } + if (versionToken < max_version[i]) { + return true; + } + if (versionToken > max_version[i]) { + return false; + } + } + return false; + }; + AriaLogger.prototype.isDirectToAriaEnabled = function () { + if (this.EnableDirectToAria === undefined || this.EnableDirectToAria === null) { + var flavor = void 0; + var version = void 0; + if (OSF._OfficeAppFactory && OSF._OfficeAppFactory.getHostInfo) { + flavor = OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]; + } + if (window.external && typeof window.external.GetContext !== "undefined" && typeof window.external.GetContext().GetHostFullVersion !== "undefined") { + version = window.external.GetContext().GetHostFullVersion(); + } + this.EnableDirectToAria = this.shouldSendDirectToAria(flavor, version); + } + return this.EnableDirectToAria; + }; + AriaLogger.prototype.sendTelemetry = function (tableName, telemetryData) { + var startAfterMs = 1000; + var sendAriaEnabled = AriaLogger.EnableSendingTelemetryWithLegacyAria && this.isDirectToAriaEnabled(); + if (sendAriaEnabled) { + OSF.OUtil.loadScript(this.getAriaCDNLocation(), function () { + try { + if (!this.ALogger) { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); + } + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for (var key in telemetryData) { + if (key.toLowerCase() !== "table") { + eventProperties.setProperty(key, telemetryData[key]); + } + } + var today = new Date(); + eventProperties.setProperty("Date", today.toISOString()); + this.ALogger.logEvent(eventProperties); + } + catch (e) { + } + }, startAfterMs); + } + if (AriaLogger.EnableSendingTelemetryWithOTel) { + sendOtelTelemetryEvent(tableName, telemetryData); + } + }; + AriaLogger.prototype.logData = function (data) { + if (this.isIUsageData(data)) { + this.sendTelemetry(data["Table"], data["Fields"]); + } + else { + this.sendTelemetry(data["Table"], data); + } + }; + AriaLogger.EnableSendingTelemetryWithOTel = true; + AriaLogger.EnableSendingTelemetryWithLegacyAria = false; + return AriaLogger; + }()); + OSFAriaLogger.AriaLogger = AriaLogger; +})(OSFAriaLogger || (OSFAriaLogger = {})); +var OSFAppTelemetry; +(function (OSFAppTelemetry) { + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + var privateAddinId = "PRIVATE"; + OSFAppTelemetry.enableTelemetry = true; + ; + var AppInfo = (function () { + function AppInfo() { + } + return AppInfo; + }()); + OSFAppTelemetry.AppInfo = AppInfo; + var Event = (function () { + function Event(name, handler) { + this.name = name; + this.handler = handler; + } + return Event; + }()); + var AppStorage = (function () { + function AppStorage() { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set"; + } + AppStorage.prototype.getClientId = function () { + var clientId = this.getValue(this.clientIDKey); + if (!clientId || clientId.length <= 0 || clientId.length > 40) { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey, clientId); + } + return clientId; + }; + AppStorage.prototype.saveLog = function (logId, log) { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = ((logIdSet && logIdSet.length > 0) ? (logIdSet + ";") : "") + logId; + this.setValue(this.logIdSetKey, logIdSet); + this.setValue(logId, log); + }; + AppStorage.prototype.enumerateLog = function (callback, clean) { + var logIdSet = this.getValue(this.logIdSetKey); + if (logIdSet) { + var ids = logIdSet.split(";"); + for (var id in ids) { + var logId = ids[id]; + var log = this.getValue(logId); + if (log) { + if (callback) { + callback(logId, log); + } + if (clean) { + this.remove(logId); + } + } + } + if (clean) { + this.remove(this.logIdSetKey); + } + } + }; + AppStorage.prototype.getValue = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if (osfLocalStorage) { + value = osfLocalStorage.getItem(key); + } + return value; + }; + AppStorage.prototype.setValue = function (key, value) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + osfLocalStorage.setItem(key, value); + } + }; + AppStorage.prototype.remove = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + try { + osfLocalStorage.removeItem(key); + } + catch (ex) { + } + } + }; + return AppStorage; + }()); + var AppLogger = (function () { + function AppLogger() { + } + AppLogger.prototype.LogData = function (data) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } + }; + AppLogger.prototype.LogRawData = function (log) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); + } + catch (e) { + } + }; + return AppLogger; + }()); + function trimStringToLowerCase(input) { + if (input) { + input = input.replace(/[{}]/g, "").toLowerCase(); + } + return (input || ""); + } + function initialize(context) { + if (!OSFAppTelemetry.enableTelemetry) { + return; + } + if (appInfo) { + return; + } + appInfo = new AppInfo(); + if (context.get_hostFullVersion()) { + appInfo.hostVersion = context.get_hostFullVersion(); + } + else { + appInfo.hostVersion = context.get_appVersion(); + } + appInfo.appId = canSendAddinId() ? context.get_id() : privateAddinId; + appInfo.marketplaceType = context._marketplaceType; + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage()).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if (appInfo.appInstanceId) { + appInfo.appInstanceId = trimStringToLowerCase(appInfo.appInstanceId); + appInfo.appInstanceId = getCompliantAppInstanceId(context.get_id(), appInfo.appInstanceId); + } + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "0.0.0.0"; + if (context._wacHostEnvironment) { + appInfo.wacHostEnvironment = context._wacHostEnvironment; + } + if (context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) { + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + } + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if (url) { + url = url.split("?")[0].split("#")[0]; + } + appInfo.isMos = isMos(); + appInfo.appURL = ""; + (function getUserIdAndAssetIdFromToken(token, appInfo) { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try { + xmlContent = decodeURIComponent(token); + parser = new DOMParser(); + xmlDoc = parser.parseFromString(xmlContent, "text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if (cidNode && cidNode.nodeValue) { + appInfo.userId = cidNode.nodeValue; + } + else if (oidNode && oidNode.nodeValue) { + appInfo.userId = oidNode.nodeValue; + } + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue; + } + catch (e) { + } + finally { + xmlContent = null; + xmlDoc = null; + parser = null; + } + })(context.get_eToken(), appInfo); + appInfo.sessionId = sessionId; + if (typeof OTel !== "undefined") { + OTel.OTelLogger.initialize(appInfo); + } + (function handleLifecycle() { + var startTime = new Date(); + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function () { + if (document.hasFocus()) { + if (lastFocus == null) { + lastFocus = new Date(); + } + } + else if (lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + }; + var eventList = []; + eventList.push(new Event("focus", adjustFocusTime)); + eventList.push(new Event("blur", adjustFocusTime)); + eventList.push(new Event("focusout", adjustFocusTime)); + eventList.push(new Event("focusin", adjustFocusTime)); + var exitFunction = function () { + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.removeEventListener(window, eventList[i].name, eventList[i].handler); + } + eventList.length = 0; + if (!finished) { + if (document.hasFocus() && lastFocus) { + focusTime += Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus = null; + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date()).getTime() - startTime.getTime()), focusTime); + finished = true; + } + }; + eventList.push(new Event("beforeunload", exitFunction)); + eventList.push(new Event("unload", exitFunction)); + for (var i = 0; i < eventList.length; i++) { + OSF.OUtil.addEventListener(window, eventList[i].name, eventList[i].handler); + } + adjustFocusTime(); + })(); + OSFAppTelemetry.onAppActivated(); + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() { + if (!appInfo) { + return; + } + (new AppStorage()).enumerateLog(function (id, log) { return (new AppLogger()).LogRawData(log); }, true); + var data = new OSFLog.AppActivatedUsageData(); + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = ""; + data.UserId = ""; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if (appInfo.wacHostEnvironment) { + data.WacHostEnvironment = appInfo.wacHostEnvironment; + } + if (appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) { + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + } + data.IsMOS = appInfo.isMos ? 1 : 0; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) { + var data = new OSFLog.ScriptLoadUsageData(); + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) { + if (!appInfo) { + return; + } + if (!isAllowedHost() || !isAPIUsageEnabledDispId(id, apiType)) { + return; + } + var data = new OSFLog.APIUsageUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCallDone = onCallDone; + ; + function onMethodDone(id, args, msResponseTime, errorType) { + var parameters = null; + if (args) { + if (typeof args == "number") { + parameters = String(args); + } + else if (typeof args === "object") { + for (var index in args) { + if (parameters !== null) { + parameters += ","; + } + else { + parameters = ""; + } + if (typeof args[index] == "number") { + parameters += String(args[index]); + } + } + } + else { + parameters = ""; + } + } + OSF.AppTelemetry.onCallDone("method", id, parameters, msResponseTime, errorType); + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) { + OSF.AppTelemetry.onCallDone("property", -1, propertyName, msResponseTime); + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onCheckWACHost(isWacKnownHost, instanceId, hostType, hostPlatform, wacDomain, isLocalStorageAvailable) { + var data = new OSFLog.CheckWACHostUsageData(); + data.isWacKnownHost = isWacKnownHost; + data.instanceId = instanceId; + data.hostType = hostType; + data.hostPlatform = hostPlatform; + data.isLocalStorageAvailable = isLocalStorageAvailable; + data.wacDomain = ""; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCheckWACHost = onCheckWACHost; + function onEventDone(id, errorType) { + OSF.AppTelemetry.onCallDone("event", id, null, 0, errorType); + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent", id, null, msResponseTime, errorType); + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) { + if (!appInfo) { + return; + } + var data = new OSFLog.AppClosedUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage()).saveLog(sessionId, data.SerializeRow()); + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId); + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) { + var data = new OSFLog.AppInitializationUsageData(); + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) { + doAppInitializationLogging(false, message); + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) { + doAppInitializationLogging(true, errorMessage); + } + OSFAppTelemetry.logAppException = logAppException; + function isAllowedHost() { + if (!OSF._OfficeAppFactory || !OSF._OfficeAppFactory.getHostInfo) { + return false; + } + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!hostInfo) { + return false; + } + switch (hostInfo["hostType"]) { + case "outlook": + switch (hostInfo["hostPlatform"]) { + case "mac": + case "web": + return true; + default: + return false; + } + default: + return false; + } + } + function isAPIUsageEnabledDispId(dispId, apiType) { + if (apiType === "method") { + switch (dispId) { + case 4: + case 38: + case 37: + case 10: + case 12: + case -10: + return true; + default: + return false; + } + } + return false; + } + function canSendAddinId() { + var isPublic = (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.PublicAddin) != 0; + if (isPublic) { + return isPublic; + } + if (!appInfo) { + return false; + } + var hostPlatform = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + var hostVersion = appInfo.hostVersion; + return _isComplianceExceptedHost(hostPlatform, hostVersion); + } + OSFAppTelemetry.canSendAddinId = canSendAddinId; + function getCompliantAppInstanceId(addinId, appInstanceId) { + if (!canSendAddinId() && appInstanceId === addinId) { + return privateAddinId; + } + return appInstanceId; + } + OSFAppTelemetry.getCompliantAppInstanceId = getCompliantAppInstanceId; + function _isComplianceExceptedHost(hostPlatform, hostVersion) { + var excepted = false; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(hostVersion); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (hostPlatform == "win32") { + if (major < 16 || major == 16 && build < 14225) { + excepted = true; + } + } + else if (hostPlatform == "mac") { + if (major < 16 || (major == 16 && (minor < 52 || minor == 52 && build < 808))) { + excepted = true; + } + } + } + return excepted; + } + OSFAppTelemetry._isComplianceExceptedHost = _isComplianceExceptedHost; + function isMos() { + return (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.IsMos) != 0; + } + OSFAppTelemetry.isMos = isMos; + OSF.AppTelemetry = OSFAppTelemetry; +})(OSFAppTelemetry || (OSFAppTelemetry = {})); +Microsoft.Office.WebExtension.TableData = function Microsoft_Office_WebExtension_TableData(rows, headers) { + function fixData(data) { + if (data == null || data == undefined) { + return null; + } + try { + for (var dim = OSF.DDA.DataCoercion.findArrayDimensionality(data, 2); dim < 2; dim++) { + data = [data]; + } + return data; + } + catch (ex) { + } + } + ; + OSF.OUtil.defineEnumerableProperties(this, { + "headers": { + get: function () { return headers; }, + set: function (value) { + headers = fixData(value); + } + }, + "rows": { + get: function () { return rows; }, + set: function (value) { + rows = (value == null || (OSF.OUtil.isArray(value) && (value.length == 0))) ? + [] : + fixData(value); + } + } + }); + this.headers = headers; + this.rows = rows; +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureTableData = function OSF_DDA_OMFactory$manufactureTableData(tableDataProperties) { + return new Microsoft.Office.WebExtension.TableData(tableDataProperties[OSF.DDA.TableDataProperties.TableRows], tableDataProperties[OSF.DDA.TableDataProperties.TableHeaders]); +}; +Microsoft.Office.WebExtension.CoercionType = { + Text: "text", + Matrix: "matrix", + Table: "table" +}; +OSF.DDA.DataCoercion = (function OSF_DDA_DataCoercion() { + return { + findArrayDimensionality: function OSF_DDA_DataCoercion$findArrayDimensionality(obj) { + if (OSF.OUtil.isArray(obj)) { + var dim = 0; + for (var index = 0; index < obj.length; index++) { + dim = Math.max(dim, OSF.DDA.DataCoercion.findArrayDimensionality(obj[index])); + } + return dim + 1; + } + else { + return 0; + } + }, + getCoercionDefaultForBinding: function OSF_DDA_DataCoercion$getCoercionDefaultForBinding(bindingType) { + switch (bindingType) { + case Microsoft.Office.WebExtension.BindingType.Matrix: return Microsoft.Office.WebExtension.CoercionType.Matrix; + case Microsoft.Office.WebExtension.BindingType.Table: return Microsoft.Office.WebExtension.CoercionType.Table; + case Microsoft.Office.WebExtension.BindingType.Text: + default: + return Microsoft.Office.WebExtension.CoercionType.Text; + } + }, + getBindingDefaultForCoercion: function OSF_DDA_DataCoercion$getBindingDefaultForCoercion(coercionType) { + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Matrix: return Microsoft.Office.WebExtension.BindingType.Matrix; + case Microsoft.Office.WebExtension.CoercionType.Table: return Microsoft.Office.WebExtension.BindingType.Table; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + return Microsoft.Office.WebExtension.BindingType.Text; + } + }, + determineCoercionType: function OSF_DDA_DataCoercion$determineCoercionType(data) { + if (data == null || data == undefined) + return null; + var sourceType = null; + var runtimeType = typeof data; + if (data.rows !== undefined) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Table; + } + else if (OSF.OUtil.isArray(data)) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Matrix; + } + else if (runtimeType == "string" || runtimeType == "number" || runtimeType == "boolean" || OSF.OUtil.isDate(data)) { + sourceType = Microsoft.Office.WebExtension.CoercionType.Text; + } + else { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject; + } + return sourceType; + }, + coerceData: function OSF_DDA_DataCoercion$coerceData(data, destinationType, sourceType) { + sourceType = sourceType || OSF.DDA.DataCoercion.determineCoercionType(data); + if (sourceType && sourceType != destinationType) { + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin); + data = OSF.DDA.DataCoercion._coerceDataFromTable(destinationType, OSF.DDA.DataCoercion._coerceDataToTable(data, sourceType)); + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd); + } + return data; + }, + _matrixToText: function OSF_DDA_DataCoercion$_matrixToText(matrix) { + if (matrix.length == 1 && matrix[0].length == 1) + return "" + matrix[0][0]; + var val = ""; + for (var i = 0; i < matrix.length; i++) { + val += matrix[i].join("\t") + "\n"; + } + return val.substring(0, val.length - 1); + }, + _textToMatrix: function OSF_DDA_DataCoercion$_textToMatrix(text) { + var ret = text.split("\n"); + for (var i = 0; i < ret.length; i++) + ret[i] = ret[i].split("\t"); + return ret; + }, + _tableToText: function OSF_DDA_DataCoercion$_tableToText(table) { + var headers = ""; + if (table.headers != null) { + headers = OSF.DDA.DataCoercion._matrixToText([table.headers]) + "\n"; + } + var rows = OSF.DDA.DataCoercion._matrixToText(table.rows); + if (rows == "") { + headers = headers.substring(0, headers.length - 1); + } + return headers + rows; + }, + _tableToMatrix: function OSF_DDA_DataCoercion$_tableToMatrix(table) { + var matrix = table.rows; + if (table.headers != null) { + matrix.unshift(table.headers); + } + return matrix; + }, + _coerceDataFromTable: function OSF_DDA_DataCoercion$_coerceDataFromTable(coercionType, table) { + var value; + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value = table; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value = OSF.DDA.DataCoercion._tableToMatrix(table); + break; + case Microsoft.Office.WebExtension.CoercionType.SlideRange: + value = null; + if (OSF.DDA.OMFactory.manufactureSlideRange) { + value = OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(table)); + } + if (value == null) { + value = OSF.DDA.DataCoercion._tableToText(table); + } + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value = OSF.DDA.DataCoercion._tableToText(table); + break; + } + return value; + }, + _coerceDataToTable: function OSF_DDA_DataCoercion$_coerceDataToTable(data, sourceType) { + if (sourceType == undefined) { + sourceType = OSF.DDA.DataCoercion.determineCoercionType(data); + } + var value; + switch (sourceType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value = data; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value = new Microsoft.Office.WebExtension.TableData(data); + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value = new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(data)); + break; + } + return value; + } + }; +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.CoercionType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.CoercionType.Table, value: 2 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + GetSelectedDataAsync: "getSelectedDataAsync", + SetSelectedDataAsync: "setSelectedDataAsync" +}); +(function () { + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] != undefined || data[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) { + data = OSF.DDA.OMFactory.manufactureTableData(data); + } + data = OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data == undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CoercionType, + "enum": Microsoft.Office.WebExtension.CoercionType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + } + ], + privateStateCallbacks: [], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageLeft, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageTop, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetSelectedDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageLeft, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageTop, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageWidth, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageHeight, value: 5 }, + ] +}); +OSF.DDA.SettingsManager = { + SerializedSettings: "serializedSettings", + RefreshingSettings: "refreshingSettings", + DateJSONPrefix: "Date(", + DataJSONSuffix: ")", + serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { + return OSF.OUtil.serializeSettings(settingsCollection); + }, + deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { + return OSF.OUtil.deserializeSettings(serializedSettings); + } +}; +OSF.DDA.Settings = function OSF_DDA_Settings(settings) { + settings = settings || {}; + var cacheSessionSettings = function (settings) { + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var serializedSettings = OSF.DDA.SettingsManager.serializeSettings(settings); + var storageSettings = JSON ? JSON.stringify(serializedSettings) : Sys.Serialization.JavaScriptSerializer.serialize(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + }; + OSF.OUtil.defineEnumerableProperties(this, { + "get": { + value: function OSF_DDA_Settings$get(name) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + var setting = settings[name]; + return typeof (setting) === 'undefined' ? null : setting; + } + }, + "set": { + value: function OSF_DDA_Settings$set(name, value) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false }, + { name: "value", mayBeNull: true } + ]); + if (e) + throw e; + settings[name] = value; + cacheSessionSettings(settings); + } + }, + "remove": { + value: function OSF_DDA_Settings$remove(name) { + var e = Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete settings[name]; + cacheSessionSettings(settings); + } + } + }); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.SaveAsync], settings); +}; +OSF.DDA.RefreshableSettings = function OSF_DDA_RefreshableSettings(settings) { + OSF.DDA.RefreshableSettings.uber.constructor.call(this, settings); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.RefreshAsync], settings); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged])); +}; +OSF.OUtil.extend(OSF.DDA.RefreshableSettings, OSF.DDA.Settings); +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } + } +}; +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() { + var events = []; + for (var eventName in this._eventHandlers) + events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); + return events; + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) { + for (var eventName in this._eventHandlers) { + if (event == eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event == eventName) + return true; + } + return false; + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) + return true; + } + } + return false; + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._eventHandlers[eventType]; + if (handlers && !this.hasEventHandler(eventType, handler)) { + handlers.push(handler); + return true; + } + else { + return false; + } + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true; + } + return false; + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType, handler); + if (isFirstHandler && succeed) { + this.fireQueuedEvent(eventType); + } + return succeed; + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var index = 0; index < handlers.length; index++) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + return true; + } + } + } + return false; + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { + if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { + this._eventHandlers[eventType] = []; + return true; + } + return false; + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) { + this._objectEventHandlers[eventType][objectId] = []; + return true; + } + return false; + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } + return true; + } + else { + return false; + } + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if (_handlers != null) { + for (var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length == 0) { + queuedEvents.push(eventArgs); + } + else { + this.fireEvent(eventArgs); + } + return true; + } + else { + return false; + } + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length > 0) { + var eventHandler = eventHandlers[0]; + while (queuedEvents.length > 0) { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs); + } + return true; + } + } + return false; + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var queuedEvents = this._queuedEventsArgs[eventType]; + if (queuedEvents) { + this._queuedEventsArgs[eventType] = []; + } + } + } +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { + var args; + switch (eventType) { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties, target.document), eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties, target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" && OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + OSF.DDA.convertOlkAppointmentTimeToDateFormat(args); + } + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecurrenceChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecurrenceChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AttachmentsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAttachmentsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.InfobarClicked: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkInfobarClickedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSelectedItemsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkSensitivityLabelChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + return args; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + "types": ["function", "object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + SettingsChanged: "settingsChanged" +}); +OSF.DDA.SettingsChangedEventArgs = function OSF_DDA_SettingsChangedEventArgs(settingsInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.SettingsChanged + }, + "settings": { + value: settingsInstance + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ + RefreshAsync: "refreshAsync", + SaveAsync: "saveAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RefreshAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.RefreshingSettings, + value: function getRefreshingSettings(settingsInstance, settingsCollection) { + return settingsCollection; + } + } + ], + onSucceeded: function deserializeSettings(serializedSettingsDescriptor, refreshingSettings, refreshingSettingsArgs) { + var serializedSettings = serializedSettingsDescriptor[OSF.DDA.SettingsManager.SerializedSettings]; + var newSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + var oldSettings = refreshingSettingsArgs[OSF.DDA.SettingsManager.RefreshingSettings]; + for (var setting in oldSettings) { + refreshingSettings.remove(setting); + } + for (var setting in newSettings) { + refreshingSettings.set(setting, newSettings[setting]); + } + return refreshingSettings; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SaveAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, + value: { + "types": ["boolean"], + "defaultValue": true + } + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.SerializedSettings, + value: function serializeSettings(settingsInstance, settingsCollection) { + return OSF.DDA.SettingsManager.serializeSettings(settingsCollection); + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidLoadSettingsMethod, + fromHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSaveSettingsMethod, + toHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SettingsManager.SerializedSettings }, + { name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, value: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidSettingsChangedEvent }); +Microsoft.Office.WebExtension.BindingType = { + Table: "table", + Text: "text", + Matrix: "matrix" +}; +OSF.DDA.BindingProperties = { + Id: "BindingId", + Type: Microsoft.Office.WebExtension.Parameters.BindingType +}; +OSF.OUtil.augmentList(OSF.DDA.ListDescriptors, { BindingList: "BindingList" }); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + Subset: "subset", + BindingProperties: "BindingProperties" +}); +OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList, OSF.DDA.PropertyDescriptors.BindingProperties); +OSF.DDA.BindingPromise = function OSF_DDA_BindingPromise(bindingId, errorCallback) { + this._id = bindingId; + OSF.OUtil.defineEnumerableProperty(this, "onFail", { + get: function () { + return errorCallback; + }, + set: function (onError) { + var t = typeof onError; + if (t != "undefined" && t != "function") { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, t); + } + errorCallback = onError; + } + }); +}; +OSF.DDA.BindingPromise.prototype = { + _fetch: function OSF_DDA_BindingPromise$_fetch(onComplete) { + if (this.binding) { + if (onComplete) + onComplete(this.binding); + } + else { + if (!this._binding) { + var me = this; + Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(this._id, function (asyncResult) { + if (asyncResult.status == Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded) { + OSF.OUtil.defineEnumerableProperty(me, "binding", { + value: asyncResult.value + }); + if (onComplete) + onComplete(me.binding); + } + else { + if (me.onFail) + me.onFail(asyncResult); + } + }); + } + } + return this; + }, + getDataAsync: function OSF_DDA_BindingPromise$getDataAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.getDataAsync.apply(binding, args); }); + return this; + }, + setDataAsync: function OSF_DDA_BindingPromise$setDataAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setDataAsync.apply(binding, args); }); + return this; + }, + addHandlerAsync: function OSF_DDA_BindingPromise$addHandlerAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.addHandlerAsync.apply(binding, args); }); + return this; + }, + removeHandlerAsync: function OSF_DDA_BindingPromise$removeHandlerAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.removeHandlerAsync.apply(binding, args); }); + return this; + } +}; +OSF.DDA.BindingFacade = function OSF_DDA_BindingFacade(docInstance) { + this._eventDispatches = []; + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: docInstance + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddFromSelectionAsync, + am.AddFromNamedItemAsync, + am.GetAllAsync, + am.GetByIdAsync, + am.ReleaseByIdAsync + ]); +}; +OSF.DDA.UnknownBinding = function OSF_DDA_UknonwnBinding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { value: docInstance }, + "id": { value: id } + }); +}; +OSF.DDA.Binding = function OSF_DDA_Binding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { + value: docInstance + }, + "id": { + value: id + } + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDataAsync, + am.SetDataAsync + ]); + var et = Microsoft.Office.WebExtension.EventType; + var bindingEventDispatches = docInstance.bindings._eventDispatches; + if (!bindingEventDispatches[id]) { + bindingEventDispatches[id] = new OSF.EventDispatch([ + et.BindingSelectionChanged, + et.BindingDataChanged + ]); + } + var eventDispatch = bindingEventDispatches[id]; + OSF.DDA.DispIdHost.addEventSupport(this, eventDispatch); +}; +OSF.DDA.generateBindingId = function OSF_DDA$GenerateBindingId() { + return "UnnamedBinding_" + OSF.OUtil.getUniqueId() + "_" + new Date().getTime(); +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureBinding = function OSF_DDA_OMFactory$manufactureBinding(bindingProperties, containingDocument) { + var id = bindingProperties[OSF.DDA.BindingProperties.Id]; + var rows = bindingProperties[OSF.DDA.BindingProperties.RowCount]; + var cols = bindingProperties[OSF.DDA.BindingProperties.ColumnCount]; + var hasHeaders = bindingProperties[OSF.DDA.BindingProperties.HasHeaders]; + var binding; + switch (bindingProperties[OSF.DDA.BindingProperties.Type]) { + case Microsoft.Office.WebExtension.BindingType.Text: + binding = new OSF.DDA.TextBinding(id, containingDocument); + break; + case Microsoft.Office.WebExtension.BindingType.Matrix: + binding = new OSF.DDA.MatrixBinding(id, containingDocument, rows, cols); + break; + case Microsoft.Office.WebExtension.BindingType.Table: + var isExcelApp = function () { + return (OSF.DDA.ExcelDocument) + && (Microsoft.Office.WebExtension.context.document) + && (Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument); + }; + var tableBindingObject; + if (isExcelApp() && OSF.DDA.ExcelTableBinding) { + tableBindingObject = OSF.DDA.ExcelTableBinding; + } + else { + tableBindingObject = OSF.DDA.TableBinding; + } + binding = new tableBindingObject(id, containingDocument, rows, cols, hasHeaders); + break; + default: + binding = new OSF.DDA.UnknownBinding(id, containingDocument); + } + return binding; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddFromSelectionAsync: "addFromSelectionAsync", + AddFromNamedItemAsync: "addFromNamedItemAsync", + GetAllAsync: "getAllAsync", + GetByIdAsync: "getByIdAsync", + ReleaseByIdAsync: "releaseByIdAsync", + GetDataAsync: "getDataAsync", + SetDataAsync: "setDataAsync" +}); +(function () { + function processBinding(bindingDescriptor) { + return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); + } + function getObjectId(obj) { return obj.id; } + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] != undefined || data[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) { + data = OSF.DDA.OMFactory.manufactureTableData(data); + } + data = OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data == undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromSelectionAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.ItemName, + "types": ["string"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, + value: function () { return true; } + } + ], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAllAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response) { return OSF.OUtil.mapList(response[OSF.DDA.ListDescriptors.BindingList], processBinding); } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response, caller, callArgs) { + var id = callArgs[Microsoft.Office.WebExtension.Parameters.Id]; + delete caller._eventDispatches[id]; + } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDataAsync, + requiredArguments: [], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs, binding) { return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(binding.type); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RowCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ColumnCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount] == 0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.RowCount]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] || + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] || + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.MatrixBinding = function OSF_DDA_MatrixBinding(id, docInstance, rows, cols) { + OSF.DDA.MatrixBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Matrix + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + } + }); +}; +OSF.OUtil.extend(OSF.DDA.MatrixBinding, OSF.DDA.Binding); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.BindingProperties, + fromHost: [ + { name: OSF.DDA.BindingProperties.Id, value: 0 }, + { name: OSF.DDA.BindingProperties.Type, value: 1 }, + { name: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.BindingType, + toHost: [ + { name: Microsoft.Office.WebExtension.BindingType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.BindingType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.BindingType.Table, value: 2 } + ], + invertible: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ItemName, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseBindingMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAllBindingsMethod, + fromHost: [ + { name: OSF.DDA.ListDescriptors.BindingList, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 3 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 4 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, + fromHost: [ + { name: OSF.DDA.BindingProperties.RowCount, value: 0 }, + { name: OSF.DDA.BindingProperties.ColumnCount, value: 1 }, + { name: OSF.DDA.BindingProperties.HasHeaders, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.Subset, + toHost: [ + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 0 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Run, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Offset, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Run, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.RowCount, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ColumnCount, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddColumnsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearAllRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { TableDataProperties: "TableDataProperties" }); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.TableDataProperties = { + TableRows: "TableRows", + TableHeaders: "TableHeaders" +}; +OSF.DDA.TableBinding = function OSF_DDA_TableBinding(id, docInstance, rows, cols, hasHeaders) { + OSF.DDA.TableBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Table + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + }, + "hasHeaders": { + value: hasHeaders ? hasHeaders : false + } + }); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddRowsAsync, + am.AddColumnsAsync, + am.DeleteAllDataValuesAsync + ]); +}; +OSF.OUtil.extend(OSF.DDA.TableBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ + AddRowsAsync: "addRowsAsync", + AddColumnsAsync: "addColumnsAsync", + DeleteAllDataValuesAsync: "deleteAllDataValuesAsync" +}); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddRowsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddColumnsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.DDA.TextBinding = function OSF_DDA_TextBinding(id, docInstance) { + OSF.DDA.TextBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperty(this, "type", { + value: Microsoft.Office.WebExtension.BindingType.Text + }); +}; +OSF.OUtil.extend(OSF.DDA.TextBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ AddFromPromptAsync: "addFromPromptAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromPromptAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptText, + value: { + "types": ["string"], + "calculate": function () { return Strings.OfficeOM.L_AddBindingFromPromptDefaultText; } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.SampleData, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: function (bindingDescriptor) { return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.PromptText, value: 2 } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DocumentSelectionChanged: "documentSelectionChanged" }); +OSF.DDA.DocumentSelectionChangedEventArgs = function OSF_DDA_DocumentSelectionChangedEventArgs(docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged + }, + "document": { + value: docInstance + } + }); +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs = function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDeletedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDataChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidContentControlAddedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + BindingSelectionChanged: "bindingSelectionChanged", + BindingDataChanged: "bindingDataChanged" +}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { BindingSelectionChangedEvent: "BindingSelectionChangedEvent" }); +OSF.DDA.BindingSelectionChangedEventArgs = function OSF_DDA_BindingSelectionChangedEventArgs(bindingInstance, subset) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingSelectionChanged + }, + "binding": { + value: bindingInstance + } + }); + for (var prop in subset) { + OSF.OUtil.defineEnumerableProperty(this, prop, { + value: subset[prop] + }); + } +}; +OSF.DDA.BindingDataChangedEventArgs = function OSF_DDA_BindingDataChangedEventArgs(bindingInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingDataChanged + }, + "binding": { + value: bindingInstance + } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingDataChangedEvent, + fromHost: [{ name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self }] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType, { OnlyVisible: "onlyVisible" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [{ name: Microsoft.Office.WebExtension.FilterType.OnlyVisible, value: 1 }] +}); +Microsoft.Office.WebExtension.GoToType = { + Binding: "binding", + NamedItem: "namedItem", + Slide: "slide", + Index: "index" +}; +Microsoft.Office.WebExtension.SelectionMode = { + Default: "default", + Selected: "selected", + None: "none" +}; +Microsoft.Office.WebExtension.Index = { + First: "first", + Last: "last", + Next: "next", + Previous: "previous" +}; +OSF.DDA.AsyncMethodNames.addNames({ GoToByIdAsync: "goToByIdAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GoToByIdAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string", "number"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.GoToType, + "enum": Microsoft.Office.WebExtension.GoToType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SelectionMode, + value: { + "enum": Microsoft.Office.WebExtension.SelectionMode, + "defaultValue": Microsoft.Office.WebExtension.SelectionMode.Default + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.GoToType, + toHost: [ + { name: Microsoft.Office.WebExtension.GoToType.Binding, value: 0 }, + { name: Microsoft.Office.WebExtension.GoToType.NamedItem, value: 1 }, + { name: Microsoft.Office.WebExtension.GoToType.Slide, value: 2 }, + { name: Microsoft.Office.WebExtension.GoToType.Index, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.SelectionMode, + toHost: [ + { name: Microsoft.Office.WebExtension.SelectionMode.Default, value: 0 }, + { name: Microsoft.Office.WebExtension.SelectionMode.Selected, value: 1 }, + { name: Microsoft.Office.WebExtension.SelectionMode.None, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidNavigateToMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.GoToType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.SelectionMode, value: 2 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync, + requiredArguments: [ + { + name: Microsoft.Office.WebExtension.Parameters.Data, + types: ["object"] + } + ], + supportedOptions: [] +}); +OSF.OUtil.setNamespace("RichApi", OSF.DDA); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.FilePropertiesDescriptor = { + Url: "Url" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FilePropertiesDescriptor: "FilePropertiesDescriptor" +}); +Microsoft.Office.WebExtension.FileProperties = function Microsoft_Office_WebExtension_FileProperties(filePropertiesDescriptor) { + OSF.OUtil.defineEnumerableProperties(this, { + "url": { + value: filePropertiesDescriptor[OSF.DDA.FilePropertiesDescriptor.Url] + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ GetFilePropertiesAsync: "getFilePropertiesAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: 0 } + ], + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (filePropertiesDescriptor, caller, callArgs) { + return new Microsoft.Office.WebExtension.FileProperties(filePropertiesDescriptor); + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, + fromHost: [ + { name: OSF.DDA.FilePropertiesDescriptor.Url, value: 0 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.ExcelTableBinding = function OSF_DDA_ExcelTableBinding(id, docInstance, rows, cols, hasHeaders) { + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.ClearFormatsAsync, + am.SetTableOptionsAsync, + am.SetFormatsAsync + ]); + OSF.DDA.ExcelTableBinding.uber.constructor.call(this, id, docInstance, rows, cols, hasHeaders); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelTableBinding, OSF.DDA.TableBinding); +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + privateStateCallbacks: [] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var Parameters = Microsoft.Office.WebExtension.Parameters; + if (callArgs[Parameters.StartRow] == 0 && + callArgs[Parameters.StartColumn] == 0 && + OSF.OUtil.isArray(callArgs[Parameters.CellFormat]) && callArgs[Parameters.CellFormat].length === 0 && + OSF.OUtil.isArray(callArgs[Parameters.TableOptions]) && callArgs[Parameters.TableOptions].length === 0) { + delete callArgs[Parameters.StartRow]; + delete callArgs[Parameters.StartColumn]; + delete callArgs[Parameters.CellFormat]; + delete callArgs[Parameters.TableOptions]; + } + if (callArgs[Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + ((callArgs[Parameters.StartRow] && callArgs[Parameters.StartRow] != 0) || + (callArgs[Parameters.StartColumn] && callArgs[Parameters.StartColumn] != 0) || + callArgs[Parameters.CellFormat] || + callArgs[Parameters.TableOptions])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: function (obj) { return obj.id; } + } + ] + }); + OSF.DDA.BindingPromise.prototype.setTableOptionsAsync = function OSF_DDA_BindingPromise$setTableOptionsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setTableOptionsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.setFormatsAsync = function OSF_DDA_BindingPromise$setFormatsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setFormatsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.clearFormatsAsync = function OSF_DDA_BindingPromise$clearFormatsAsync() { + var args = arguments; + this._fetch(function onComplete(binding) { binding.clearFormatsAsync.apply(binding, args); }); + return this; + }; +})(); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodNames.addNames({ + ClearFormatsAsync: "clearFormatsAsync", + SetTableOptionsAsync: "setTableOptionsAsync", + SetFormatsAsync: "setFormatsAsync" + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ClearFormatsAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetTableOptionsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.TableOptions, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetFormatsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CellFormat, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +Microsoft.Office.WebExtension.Table = { + All: 0, + Data: 1, + Headers: 2 +}; +(function () { + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetTableOptionsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 3 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 5 } + ] + }); + var tableOptionProperties = { + headerRow: 0, + bandedRows: 1, + firstColumn: 2, + lastColumn: 3, + bandedColumns: 4, + filterButton: 5, + style: 6, + totalRow: 7 + }; + var cellProperties = { + row: 0, + column: 1 + }; + var formatProperties = { + alignHorizontal: { text: "alignHorizontal", type: 1 }, + alignVertical: { text: "alignVertical", type: 2 }, + backgroundColor: { text: "backgroundColor", type: 101 }, + borderStyle: { text: "borderStyle", type: 201 }, + borderColor: { text: "borderColor", type: 202 }, + borderTopStyle: { text: "borderTopStyle", type: 203 }, + borderTopColor: { text: "borderTopColor", type: 204 }, + borderBottomStyle: { text: "borderBottomStyle", type: 205 }, + borderBottomColor: { text: "borderBottomColor", type: 206 }, + borderLeftStyle: { text: "borderLeftStyle", type: 207 }, + borderLeftColor: { text: "borderLeftColor", type: 208 }, + borderRightStyle: { text: "borderRightStyle", type: 209 }, + borderRightColor: { text: "borderRightColor", type: 210 }, + borderOutlineStyle: { text: "borderOutlineStyle", type: 211 }, + borderOutlineColor: { text: "borderOutlineColor", type: 212 }, + borderInlineStyle: { text: "borderInlineStyle", type: 213 }, + borderInlineColor: { text: "borderInlineColor", type: 214 }, + fontFamily: { text: "fontFamily", type: 301 }, + fontStyle: { text: "fontStyle", type: 302 }, + fontSize: { text: "fontSize", type: 303 }, + fontUnderlineStyle: { text: "fontUnderlineStyle", type: 304 }, + fontColor: { text: "fontColor", type: 305 }, + fontDirection: { text: "fontDirection", type: 306 }, + fontStrikethrough: { text: "fontStrikethrough", type: 307 }, + fontSuperscript: { text: "fontSuperscript", type: 308 }, + fontSubscript: { text: "fontSubscript", type: 309 }, + fontNormal: { text: "fontNormal", type: 310 }, + indentLeft: { text: "indentLeft", type: 401 }, + indentRight: { text: "indentRight", type: 402 }, + numberFormat: { text: "numberFormat", type: 501 }, + width: { text: "width", type: 701 }, + height: { text: "height", type: 702 }, + wrapping: { text: "wrapping", type: 703 } + }; + var borderStyleSet = [ + { name: "none", value: 0 }, + { name: "thin", value: 1 }, + { name: "medium", value: 2 }, + { name: "dashed", value: 3 }, + { name: "dotted", value: 4 }, + { name: "thick", value: 5 }, + { name: "double", value: 6 }, + { name: "hair", value: 7 }, + { name: "medium dashed", value: 8 }, + { name: "dash dot", value: 9 }, + { name: "medium dash dot", value: 10 }, + { name: "dash dot dot", value: 11 }, + { name: "medium dash dot dot", value: 12 }, + { name: "slant dash dot", value: 13 }, + ]; + var colorSet = [ + { name: "none", value: 0 }, + { name: "black", value: 1 }, + { name: "blue", value: 2 }, + { name: "gray", value: 3 }, + { name: "green", value: 4 }, + { name: "orange", value: 5 }, + { name: "pink", value: 6 }, + { name: "purple", value: 7 }, + { name: "red", value: 8 }, + { name: "teal", value: 9 }, + { name: "turquoise", value: 10 }, + { name: "violet", value: 11 }, + { name: "white", value: 12 }, + { name: "yellow", value: 13 }, + { name: "automatic", value: 14 }, + ]; + var ns = OSF.DDA.SafeArray.Delegate.ParameterMap; + ns.define({ + type: formatProperties.alignHorizontal.text, + toHost: [ + { name: "general", value: 0 }, + { name: "left", value: 1 }, + { name: "center", value: 2 }, + { name: "right", value: 3 }, + { name: "fill", value: 4 }, + { name: "justify", value: 5 }, + { name: "center across selection", value: 6 }, + { name: "distributed", value: 7 }, + ] + }); + ns.define({ + type: formatProperties.alignVertical.text, + toHost: [ + { name: "top", value: 0 }, + { name: "center", value: 1 }, + { name: "bottom", value: 2 }, + { name: "justify", value: 3 }, + { name: "distributed", value: 4 }, + ] + }); + ns.define({ + type: formatProperties.backgroundColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderTopStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderTopColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderBottomStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderBottomColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderLeftStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderLeftColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderRightStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderRightColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderOutlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderOutlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderInlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderInlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontStyle.text, + toHost: [ + { name: "regular", value: 0 }, + { name: "italic", value: 1 }, + { name: "bold", value: 2 }, + { name: "bold italic", value: 3 }, + ] + }); + ns.define({ + type: formatProperties.fontUnderlineStyle.text, + toHost: [ + { name: "none", value: 0 }, + { name: "single", value: 1 }, + { name: "double", value: 2 }, + { name: "single accounting", value: 3 }, + { name: "double accounting", value: 4 }, + ] + }); + ns.define({ + type: formatProperties.fontColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontDirection.text, + toHost: [ + { name: "context", value: 0 }, + { name: "left-to-right", value: 1 }, + { name: "right-to-left", value: 2 }, + ] + }); + ns.define({ + type: formatProperties.width.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] + }); + ns.define({ + type: formatProperties.height.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] + }); + ns.define({ + type: Microsoft.Office.WebExtension.Parameters.TableOptions, + toHost: [ + { name: "headerRow", value: 0 }, + { name: "bandedRows", value: 1 }, + { name: "firstColumn", value: 2 }, + { name: "lastColumn", value: 3 }, + { name: "bandedColumns", value: 4 }, + { name: "filterButton", value: 5 }, + { name: "style", value: 6 }, + { name: "totalRow", value: 7 } + ] + }); + ns.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat] = { + toHost: function (data) { + for (var entry in data) { + if (data[entry].format) { + data[entry].format = ns.doMapValues(data[entry].format, "toHost"); + } + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$toHost(cellFormats) { + var textCells = "cells"; + var textFormat = "format"; + var posCells = 0; + var posFormat = 1; + var ret = []; + for (var index in cellFormats) { + var cfOld = cellFormats[index]; + var cfNew = []; + if (typeof (cfOld[textCells]) !== 'undefined') { + var cellsOld = cfOld[textCells]; + var cellsNew; + if (typeof cfOld[textCells] === "object") { + cellsNew = []; + for (var entry in cellsOld) { + if (typeof (cellProperties[entry]) !== 'undefined') { + cellsNew[cellProperties[entry]] = cellsOld[entry]; + } + } + } + else { + cellsNew = cellsOld; + } + cfNew[posCells] = cellsNew; + } + if (cfOld[textFormat]) { + var formatOld = cfOld[textFormat]; + var formatNew = []; + for (var entry2 in formatOld) { + if (typeof (formatProperties[entry2]) !== 'undefined') { + formatNew.push([ + formatProperties[entry2].type, + formatOld[entry2] + ]); + } + } + cfNew[posFormat] = formatNew; + } + ret[index] = cfNew; + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$fromHost(hostArgs) { + return hostArgs; + } + }); + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$toHost(tableOptions) { + var ret = []; + for (var entry in tableOptions) { + if (typeof (tableOptionProperties[entry]) !== 'undefined') { + ret[tableOptionProperties[entry]] = tableOptions[entry]; + } + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$fromHost(hostArgs) { + return hostArgs; + } + }); +})(); +OSF.DDA.ExcelDocument = function OSF_DDA_ExcelDocument(officeAppContext, settings) { + var bf = new OSF.DDA.BindingFacade(this); + OSF.DDA.DispIdHost.addAsyncMethods(bf, [OSF.DDA.AsyncMethodNames.AddFromPromptAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GoToByIdAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]); + OSF.DDA.ExcelDocument.uber.constructor.call(this, officeAppContext, bf, settings); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelDocument, OSF.DDA.JsomDocument); +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + appContext.doc = new OSF.DDA.ExcelDocument(appContext, this._initializeSettings(appContext, false)); + OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + appReady(); +}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExtension; +(function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire = function () { + return null; + }(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + var PromiseImpl; + (function (PromiseImpl) { + function Init() { + return (function () { + "use strict"; + function lib$es6$promise$utils$$objectOrFunction(x) { + return typeof x === 'function' || (typeof x === 'object' && x !== null); + } + function lib$es6$promise$utils$$isFunction(x) { + return typeof x === 'function'; + } + function lib$es6$promise$utils$$isMaybeThenable(x) { + return typeof x === 'object' && x !== null; + } + var lib$es6$promise$utils$$_isArray; + if (!Array.isArray) { + lib$es6$promise$utils$$_isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; + } + else { + lib$es6$promise$utils$$_isArray = Array.isArray; + } + var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray; + var lib$es6$promise$asap$$len = 0; + var lib$es6$promise$asap$$toString = {}.toString; + var lib$es6$promise$asap$$vertxNext; + var lib$es6$promise$asap$$customSchedulerFn; + var lib$es6$promise$asap$$asap = function asap(callback, arg) { + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback; + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg; + lib$es6$promise$asap$$len += 2; + if (lib$es6$promise$asap$$len === 2) { + if (lib$es6$promise$asap$$customSchedulerFn) { + lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush); + } + else { + lib$es6$promise$asap$$scheduleFlush(); + } + } + }; + function lib$es6$promise$asap$$setScheduler(scheduleFn) { + lib$es6$promise$asap$$customSchedulerFn = scheduleFn; + } + function lib$es6$promise$asap$$setAsap(asapFn) { + lib$es6$promise$asap$$asap = asapFn; + } + var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined; + var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {}; + var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver; + var lib$es6$promise$asap$$isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && + typeof importScripts !== 'undefined' && + typeof MessageChannel !== 'undefined'; + function lib$es6$promise$asap$$useNextTick() { + var nextTick = process.nextTick; + var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); + if (Array.isArray(version) && version[1] === '0' && version[2] === '10') { + nextTick = window.setImmediate; + } + return function () { + nextTick(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useVertxTimer() { + return function () { + lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useMutationObserver() { + var iterations = 0; + var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + return function () { + node.data = (iterations = ++iterations % 2); + }; + } + function lib$es6$promise$asap$$useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = lib$es6$promise$asap$$flush; + return function () { + channel.port2.postMessage(0); + }; + } + function lib$es6$promise$asap$$useSetTimeout() { + return function () { + setTimeout(lib$es6$promise$asap$$flush, 1); + }; + } + var lib$es6$promise$asap$$queue = new Array(1000); + function lib$es6$promise$asap$$flush() { + for (var i = 0; i < lib$es6$promise$asap$$len; i += 2) { + var callback = lib$es6$promise$asap$$queue[i]; + var arg = lib$es6$promise$asap$$queue[i + 1]; + callback(arg); + lib$es6$promise$asap$$queue[i] = undefined; + lib$es6$promise$asap$$queue[i + 1] = undefined; + } + lib$es6$promise$asap$$len = 0; + } + var lib$es6$promise$asap$$scheduleFlush; + if (lib$es6$promise$asap$$isNode) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick(); + } + else if (lib$es6$promise$asap$$isWorker) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel(); + } + else { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout(); + } + function lib$es6$promise$$internal$$noop() { } + var lib$es6$promise$$internal$$PENDING = void 0; + var lib$es6$promise$$internal$$FULFILLED = 1; + var lib$es6$promise$$internal$$REJECTED = 2; + var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$selfFullfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function lib$es6$promise$$internal$$cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); + } + function lib$es6$promise$$internal$$getThen(promise) { + try { + return promise.then; + } + catch (error) { + lib$es6$promise$$internal$$GET_THEN_ERROR.error = error; + return lib$es6$promise$$internal$$GET_THEN_ERROR; + } + } + function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } + catch (e) { + return e; + } + } + function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) { + lib$es6$promise$asap$$asap(function (promise) { + var sealed = false; + var error = lib$es6$promise$$internal$$tryThen(then, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + lib$es6$promise$$internal$$reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + if (!sealed && error) { + sealed = true; + lib$es6$promise$$internal$$reject(promise, error); + } + }, promise); + } + function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) { + if (thenable._state === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, thenable._result); + } + else if (thenable._state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, thenable._result); + } + else { + lib$es6$promise$$internal$$subscribe(thenable, undefined, function (value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function (reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + } + function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable) { + if (maybeThenable.constructor === promise.constructor) { + lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable); + } + else { + var then = lib$es6$promise$$internal$$getThen(maybeThenable); + if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error); + } + else if (then === undefined) { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + else if (lib$es6$promise$utils$$isFunction(then)) { + lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then); + } + else { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + } + } + function lib$es6$promise$$internal$$resolve(promise, value) { + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFullfillment()); + } + else if (lib$es6$promise$utils$$objectOrFunction(value)) { + lib$es6$promise$$internal$$handleMaybeThenable(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + } + function lib$es6$promise$$internal$$publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + lib$es6$promise$$internal$$publish(promise); + } + function lib$es6$promise$$internal$$fulfill(promise, value) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._result = value; + promise._state = lib$es6$promise$$internal$$FULFILLED; + if (promise._subscribers.length !== 0) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise); + } + } + function lib$es6$promise$$internal$$reject(promise, reason) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._state = lib$es6$promise$$internal$$REJECTED; + promise._result = reason; + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise); + } + function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) { + var subscribers = parent._subscribers; + var length = subscribers.length; + parent._onerror = null; + subscribers[length] = child; + subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment; + subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection; + if (length === 0 && parent._state) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent); + } + } + function lib$es6$promise$$internal$$publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + if (subscribers.length === 0) { + return; + } + var child, callback, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + if (child) { + lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail); + } + else { + callback(detail); + } + } + promise._subscribers.length = 0; + } + function lib$es6$promise$$internal$$ErrorObject() { + this.error = null; + } + var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$tryCatch(callback, detail) { + try { + return callback(detail); + } + catch (e) { + lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e; + return lib$es6$promise$$internal$$TRY_CATCH_ERROR; + } + } + function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) { + var hasCallback = lib$es6$promise$utils$$isFunction(callback), value, error, succeeded, failed; + if (hasCallback) { + value = lib$es6$promise$$internal$$tryCatch(callback, detail); + if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value = null; + } + else { + succeeded = true; + } + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn()); + return; + } + } + else { + value = detail; + succeeded = true; + } + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + } + else if (hasCallback && succeeded) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else if (failed) { + lib$es6$promise$$internal$$reject(promise, error); + } + else if (settled === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, value); + } + else if (settled === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + } + function lib$es6$promise$$internal$$initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function rejectPromise(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + catch (e) { + lib$es6$promise$$internal$$reject(promise, e); + } + } + function lib$es6$promise$enumerator$$Enumerator(Constructor, input) { + var enumerator = this; + enumerator._instanceConstructor = Constructor; + enumerator.promise = new Constructor(lib$es6$promise$$internal$$noop); + if (enumerator._validateInput(input)) { + enumerator._input = input; + enumerator.length = input.length; + enumerator._remaining = input.length; + enumerator._init(); + if (enumerator.length === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + else { + enumerator.length = enumerator.length || 0; + enumerator._enumerate(); + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + } + } + else { + lib$es6$promise$$internal$$reject(enumerator.promise, enumerator._validationError()); + } + } + lib$es6$promise$enumerator$$Enumerator.prototype._validateInput = function (input) { + return lib$es6$promise$utils$$isArray(input); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._validationError = function () { + return new _Internal.Error('Array Methods must be provided an Array'); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._init = function () { + this._result = new Array(this.length); + }; + var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator; + lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function () { + var enumerator = this; + var length = enumerator.length; + var promise = enumerator.promise; + var input = enumerator._input; + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + enumerator._eachEntry(input[i], i); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function (entry, i) { + var enumerator = this; + var c = enumerator._instanceConstructor; + if (lib$es6$promise$utils$$isMaybeThenable(entry)) { + if (entry.constructor === c && entry._state !== lib$es6$promise$$internal$$PENDING) { + entry._onerror = null; + enumerator._settledAt(entry._state, i, entry._result); + } + else { + enumerator._willSettleAt(c.resolve(entry), i); + } + } + else { + enumerator._remaining--; + enumerator._result[i] = entry; + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function (state, i, value) { + var enumerator = this; + var promise = enumerator.promise; + if (promise._state === lib$es6$promise$$internal$$PENDING) { + enumerator._remaining--; + if (state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + else { + enumerator._result[i] = value; + } + } + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(promise, enumerator._result); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function (promise, i) { + var enumerator = this; + lib$es6$promise$$internal$$subscribe(promise, undefined, function (value) { + enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value); + }, function (reason) { + enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason); + }); + }; + function lib$es6$promise$promise$all$$all(entries) { + return new lib$es6$promise$enumerator$$default(this, entries).promise; + } + var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all; + function lib$es6$promise$promise$race$$race(entries) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + if (!lib$es6$promise$utils$$isArray(entries)) { + lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.')); + return promise; + } + var length = entries.length; + function onFulfillment(value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + function onRejection(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + } + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); + } + return promise; + } + var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race; + function lib$es6$promise$promise$resolve$$resolve(object) { + var Constructor = this; + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$resolve(promise, object); + return promise; + } + var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve; + function lib$es6$promise$promise$reject$$reject(reason) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$reject(promise, reason); + return promise; + } + var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject; + var lib$es6$promise$promise$$counter = 0; + function lib$es6$promise$promise$$needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); + } + function lib$es6$promise$promise$$needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise; + function lib$es6$promise$promise$$Promise(resolver) { + this._id = lib$es6$promise$promise$$counter++; + this._state = undefined; + this._result = undefined; + this._subscribers = []; + if (lib$es6$promise$$internal$$noop !== resolver) { + if (!lib$es6$promise$utils$$isFunction(resolver)) { + lib$es6$promise$promise$$needsResolver(); + } + if (!(this instanceof lib$es6$promise$promise$$Promise)) { + lib$es6$promise$promise$$needsNew(); + } + lib$es6$promise$$internal$$initializePromise(this, resolver); + } + } + lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default; + lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default; + lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default; + lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default; + lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler; + lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap; + lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap; + lib$es6$promise$promise$$Promise.prototype = { + constructor: lib$es6$promise$promise$$Promise, + then: function (onFulfillment, onRejection) { + var parent = this; + var state = parent._state; + if (state === lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state === lib$es6$promise$$internal$$REJECTED && !onRejection) { + return this; + } + var child = new this.constructor(lib$es6$promise$$internal$$noop); + var result = parent._result; + if (state) { + var callback = arguments[state - 1]; + lib$es6$promise$asap$$asap(function () { + lib$es6$promise$$internal$$invokeCallback(state, child, callback, result); + }); + } + else { + lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection); + } + return child; + }, + 'catch': function (onRejection) { + return this.then(null, onRejection); + } + }; + return lib$es6$promise$promise$$default; + }).call(this); + } + PromiseImpl.Init = Init; + })(PromiseImpl = _Internal.PromiseImpl || (_Internal.PromiseImpl = {})); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + function isEdgeLessThan14() { + var userAgent = window.navigator.userAgent; + var versionIdx = userAgent.indexOf("Edge/"); + if (versionIdx >= 0) { + userAgent = userAgent.substring(versionIdx + 5, userAgent.length); + if (userAgent < "14.14393") + return true; + else + return false; + } + return false; + } + function determinePromise() { + if (typeof (window) === "undefined" && typeof (Promise) === "function") { + return Promise; + } + if (typeof (window) !== "undefined" && window.Promise) { + if (isEdgeLessThan14()) { + return _Internal.PromiseImpl.Init(); + } + else { + return window.Promise; + } + } + else { + return _Internal.PromiseImpl.Init(); + } + } + _Internal.OfficePromise = determinePromise(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + var OfficePromise = _Internal.OfficePromise; + OfficeExtension.Promise = OfficePromise; +})(OfficeExtension || (OfficeExtension = {})); +var OfficeExtension; +(function (OfficeExtension_1) { + var SessionBase = (function () { + function SessionBase() { + } + SessionBase.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + SessionBase.prototype._createRequestExecutorOrNull = function () { + return null; + }; + SessionBase.prototype.getEventRegistration = function (controlId) { + return null; + }; + return SessionBase; + }()); + OfficeExtension_1.SessionBase = SessionBase; + var HttpUtility = (function () { + function HttpUtility() { + } + HttpUtility.setCustomSendRequestFunc = function (func) { + HttpUtility.s_customSendRequestFunc = func; + }; + HttpUtility.xhrSendRequestFunc = function (request) { + return CoreUtility.createPromise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open(request.method, request.url); + xhr.onload = function () { + var resp = { + statusCode: xhr.status, + headers: CoreUtility._parseHttpResponseHeaders(xhr.getAllResponseHeaders()), + body: xhr.responseText + }; + resolve(resp); + }; + xhr.onerror = function () { + reject(new _Internal.RuntimeError({ + code: CoreErrorCodes.connectionFailure, + httpStatusCode: xhr.status, + message: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, xhr.statusText) + })); + }; + if (request.headers) { + for (var key in request.headers) { + xhr.setRequestHeader(key, request.headers[key]); + } + } + xhr.send(CoreUtility._getRequestBodyText(request)); + }); + }; + HttpUtility.fetchSendRequestFunc = function (request) { + var requestBodyText = CoreUtility._getRequestBodyText(request); + if (requestBodyText === '') { + requestBodyText = undefined; + } + return fetch(request.url, { + method: request.method, + headers: request.headers, + body: requestBodyText + }) + .then(function (resp) { + return resp.text() + .then(function (body) { + var statusCode = resp.status; + var headers = {}; + resp.headers.forEach(function (value, name) { + headers[name] = value; + }); + var ret = { statusCode: statusCode, headers: headers, body: body }; + return ret; + }); + }); + }; + HttpUtility.sendRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func = HttpUtility.s_customSendRequestFunc; + if (!func) { + if (typeof (fetch) !== 'undefined') { + func = HttpUtility.fetchSendRequestFunc; + } + else { + func = HttpUtility.xhrSendRequestFunc; + } + } + return func(request); + }; + HttpUtility.setCustomSendLocalDocumentRequestFunc = function (func) { + HttpUtility.s_customSendLocalDocumentRequestFunc = func; + }; + HttpUtility.sendLocalDocumentRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func; + func = HttpUtility.s_customSendLocalDocumentRequestFunc || HttpUtility.officeJsSendLocalDocumentRequestFunc; + return func(request); + }; + HttpUtility.officeJsSendLocalDocumentRequestFunc = function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestSafeArray = CoreUtility._buildRequestMessageSafeArray(request); + return CoreUtility.createPromise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { + var response; + if (asyncResult.status == 'succeeded') { + response = { + statusCode: RichApiMessageUtility.getResponseStatusCode(asyncResult), + headers: RichApiMessageUtility.getResponseHeaders(asyncResult), + body: RichApiMessageUtility.getResponseBody(asyncResult) + }; + } + else { + response = RichApiMessageUtility.buildHttpResponseFromOfficeJsError(asyncResult.error.code, asyncResult.error.message); + } + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(response)); + resolve(response); + }); + }); + }; + HttpUtility.validateAndNormalizeRequest = function (request) { + if (CoreUtility.isNullOrUndefined(request)) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + if (CoreUtility.isNullOrEmptyString(request.method)) { + request.method = 'GET'; + } + request.method = request.method.toUpperCase(); + var alreadyHasTestName = false; + if (typeof (request.headers) === 'object' && request.headers[CoreConstants.testRequestNameHeader]) { + alreadyHasTestName = true; + } + if (!alreadyHasTestName) { + var currentTestName = TestUtility._getCurrentTestNameWithSequenceId(); + if (currentTestName) { + if (!request.headers) { + request.headers = {}; + } + request.headers[CoreConstants.testRequestNameHeader] = currentTestName; + } + } + }; + HttpUtility.logRequest = function (request) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Request---'); + CoreUtility.log(request.method + ' ' + request.url); + if (request.headers) { + for (var key in request.headers) { + CoreUtility.log(key + ': ' + request.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(CoreUtility._getRequestBodyText(request)); + } + } + }; + HttpUtility.logResponse = function (response) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Response---'); + CoreUtility.log('' + response.statusCode); + if (response.headers) { + for (var key in response.headers) { + CoreUtility.log(key + ': ' + response.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(response.body); + } + } + }; + HttpUtility._logBodyEnabled = false; + return HttpUtility; + }()); + OfficeExtension_1.HttpUtility = HttpUtility; + var HostBridge = (function () { + function HostBridge(m_bridge) { + var _this = this; + this.m_bridge = m_bridge; + this.m_promiseResolver = {}; + this.m_handlers = []; + this.m_bridge.onMessageFromHost = function (messageText) { + var message = JSON.parse(messageText); + if (message.type == 3) { + var genericMessageBody = message.message; + if (genericMessageBody && genericMessageBody.entries) { + for (var i = 0; i < genericMessageBody.entries.length; i++) { + var entryObjectOrArray = genericMessageBody.entries[i]; + if (Array.isArray(entryObjectOrArray)) { + var entry = { + messageCategory: entryObjectOrArray[0], + messageType: entryObjectOrArray[1], + targetId: entryObjectOrArray[2], + message: entryObjectOrArray[3], + id: entryObjectOrArray[4] + }; + genericMessageBody.entries[i] = entry; + } + } + } + } + _this.dispatchMessage(message); + }; + } + HostBridge.init = function (bridge) { + if (typeof bridge !== 'object' || !bridge) { + return; + } + var instance = new HostBridge(bridge); + HostBridge.s_instance = instance; + HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var index = request.url.indexOf('?'); + if (index >= 0) { + var query = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(query); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + } + if (typeof (request.body) === "string") { + request.body = JSON.parse(request.body); + } + var bridgeMessage = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + message: request + }; + return instance.sendMessageToHostAndExpectResponse(bridgeMessage).then(function (bridgeResponse) { + var responseInfo = bridgeResponse.message; + return responseInfo; + }); + }); + for (var i = 0; i < HostBridge.s_onInitedHandlers.length; i++) { + HostBridge.s_onInitedHandlers[i](instance); + } + }; + Object.defineProperty(HostBridge, "instance", { + get: function () { + return HostBridge.s_instance; + }, + enumerable: true, + configurable: true + }); + HostBridge.prototype.sendMessageToHost = function (message) { + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + }; + HostBridge.prototype.sendMessageToHostAndExpectResponse = function (message) { + var _this = this; + var ret = CoreUtility.createPromise(function (resolve, reject) { + _this.m_promiseResolver[message.id] = resolve; + }); + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + return ret; + }; + HostBridge.prototype.addHostMessageHandler = function (handler) { + this.m_handlers.push(handler); + }; + HostBridge.prototype.removeHostMessageHandler = function (handler) { + var index = this.m_handlers.indexOf(handler); + if (index >= 0) { + this.m_handlers.splice(index, 1); + } + }; + HostBridge.onInited = function (handler) { + HostBridge.s_onInitedHandlers.push(handler); + if (HostBridge.s_instance) { + handler(HostBridge.s_instance); + } + }; + HostBridge.prototype.dispatchMessage = function (message) { + if (typeof message.id === 'number') { + var resolve = this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + delete this.m_promiseResolver[message.id]; + return; + } + } + for (var i = 0; i < this.m_handlers.length; i++) { + this.m_handlers[i](message); + } + }; + HostBridge.nextId = function () { + return HostBridge.s_nextId++; + }; + HostBridge.s_onInitedHandlers = []; + HostBridge.s_nextId = 1; + return HostBridge; + }()); + OfficeExtension_1.HostBridge = HostBridge; + if (typeof _richApiNativeBridge === 'object' && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var _Internal; + (function (_Internal) { + var RuntimeError = (function (_super) { + __extends(RuntimeError, _super); + function RuntimeError(error) { + var _this = _super.call(this, typeof error === 'string' ? error : error.message) || this; + Object.setPrototypeOf(_this, RuntimeError.prototype); + _this.name = 'RichApi.Error'; + if (typeof error === 'string') { + _this.message = error; + } + else { + _this.code = error.code; + _this.message = error.message; + _this.traceMessages = error.traceMessages || []; + _this.innerError = error.innerError || null; + _this.debugInfo = _this._createDebugInfo(error.debugInfo || {}); + _this.httpStatusCode = error.httpStatusCode; + _this.data = error.data; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode) || _this.httpStatusCode === 200) { + var mapping = {}; + mapping[CoreErrorCodes.accessDenied] = 401; + mapping[CoreErrorCodes.connectionFailure] = 500; + mapping[CoreErrorCodes.generalException] = 500; + mapping[CoreErrorCodes.invalidArgument] = 400; + mapping[CoreErrorCodes.invalidObjectPath] = 400; + mapping[CoreErrorCodes.invalidOrTimedOutSession] = 408; + mapping[CoreErrorCodes.invalidRequestContext] = 400; + mapping[CoreErrorCodes.timeout] = 408; + mapping[CoreErrorCodes.valueNotLoaded] = 400; + _this.httpStatusCode = mapping[_this.code]; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode)) { + _this.httpStatusCode = 500; + } + return _this; + } + RuntimeError.prototype.toString = function () { + return this.code + ': ' + this.message; + }; + RuntimeError.prototype._createDebugInfo = function (partialDebugInfo) { + var debugInfo = { + code: this.code, + message: this.message + }; + debugInfo.toString = function () { + return JSON.stringify(this); + }; + for (var key in partialDebugInfo) { + debugInfo[key] = partialDebugInfo[key]; + } + if (this.innerError) { + if (this.innerError instanceof _Internal.RuntimeError) { + debugInfo.innerError = this.innerError.debugInfo; + } + else { + debugInfo.innerError = this.innerError; + } + } + return debugInfo; + }; + RuntimeError._createInvalidArgError = function (error) { + return new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility.isNullOrEmptyString(error.argumentName) + ? CoreUtility._getResourceString(CoreResourceStrings.invalidArgumentGeneric) + : CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, error.argumentName), + debugInfo: error.errorLocation ? { errorLocation: error.errorLocation } : {}, + innerError: error.innerError + }); + }; + return RuntimeError; + }(Error)); + _Internal.RuntimeError = RuntimeError; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + OfficeExtension_1.Error = _Internal.RuntimeError; + var CoreErrorCodes = (function () { + function CoreErrorCodes() { + } + CoreErrorCodes.apiNotFound = 'ApiNotFound'; + CoreErrorCodes.accessDenied = 'AccessDenied'; + CoreErrorCodes.generalException = 'GeneralException'; + CoreErrorCodes.activityLimitReached = 'ActivityLimitReached'; + CoreErrorCodes.invalidArgument = 'InvalidArgument'; + CoreErrorCodes.connectionFailure = 'ConnectionFailure'; + CoreErrorCodes.timeout = 'Timeout'; + CoreErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + CoreErrorCodes.invalidObjectPath = 'InvalidObjectPath'; + CoreErrorCodes.invalidRequestContext = 'InvalidRequestContext'; + CoreErrorCodes.valueNotLoaded = 'ValueNotLoaded'; + CoreErrorCodes.requestPayloadSizeLimitExceeded = 'RequestPayloadSizeLimitExceeded'; + CoreErrorCodes.responsePayloadSizeLimitExceeded = 'ResponsePayloadSizeLimitExceeded'; + CoreErrorCodes.writeNotSupportedWhenModalDialogOpen = 'WriteNotSupportedWhenModalDialogOpen'; + return CoreErrorCodes; + }()); + OfficeExtension_1.CoreErrorCodes = CoreErrorCodes; + var CoreResourceStrings = (function () { + function CoreResourceStrings() { + } + CoreResourceStrings.apiNotFoundDetails = 'ApiNotFoundDetails'; + CoreResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + CoreResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + CoreResourceStrings.invalidArgument = 'InvalidArgument'; + CoreResourceStrings.invalidArgumentGeneric = 'InvalidArgumentGeneric'; + CoreResourceStrings.timeout = 'Timeout'; + CoreResourceStrings.invalidOrTimedOutSessionMessage = 'InvalidOrTimedOutSessionMessage'; + CoreResourceStrings.invalidSheetName = 'InvalidSheetName'; + CoreResourceStrings.invalidObjectPath = 'InvalidObjectPath'; + CoreResourceStrings.invalidRequestContext = 'InvalidRequestContext'; + CoreResourceStrings.valueNotLoaded = 'ValueNotLoaded'; + return CoreResourceStrings; + }()); + OfficeExtension_1.CoreResourceStrings = CoreResourceStrings; + var CoreConstants = (function () { + function CoreConstants() { + } + CoreConstants.flags = 'flags'; + CoreConstants.sourceLibHeader = 'SdkVersion'; + CoreConstants.processQuery = 'ProcessQuery'; + CoreConstants.localDocument = 'http://document.localhost/'; + CoreConstants.localDocumentApiPrefix = 'http://document.localhost/_api/'; + CoreConstants.customData = 'customdata'; + CoreConstants.testRequestNameHeader = 'x-test-request-name'; + return CoreConstants; + }()); + OfficeExtension_1.CoreConstants = CoreConstants; + var RichApiMessageUtility = (function () { + function RichApiMessageUtility() { + } + RichApiMessageUtility.buildMessageArrayForIRequestExecutor = function (customData, requestFlags, requestMessage, sourceLibHeaderValue) { + var requestMessageText = JSON.stringify(requestMessage.Body); + CoreUtility.log('Request:'); + CoreUtility.log(requestMessageText); + var headers = {}; + CoreUtility._copyHeaders(requestMessage.Headers, headers); + headers[CoreConstants.sourceLibHeader] = sourceLibHeaderValue; + var messageSafearray = RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, 'POST', CoreConstants.processQuery, headers, requestMessageText); + return messageSafearray; + }; + RichApiMessageUtility.buildResponseOnSuccess = function (responseBody, responseHeaders) { + var response = { HttpStatusCode: 200, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.Body = JSON.parse(responseBody); + response.Headers = responseHeaders; + return response; + }; + RichApiMessageUtility.buildResponseOnError = function (errorCode, message) { + var response = { HttpStatusCode: 500, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.ErrorCode = CoreErrorCodes.generalException; + response.ErrorMessage = message; + if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + response.ErrorCode = CoreErrorCodes.accessDenied; + response.HttpStatusCode = 401; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + response.ErrorCode = CoreErrorCodes.activityLimitReached; + response.HttpStatusCode = 429; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession) { + response.ErrorCode = CoreErrorCodes.invalidOrTimedOutSession; + response.HttpStatusCode = 408; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidOrTimedOutSessionMessage); + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.requestPayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.responsePayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen) { + response.ErrorCode = CoreErrorCodes.writeNotSupportedWhenModalDialogOpen; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName) { + response.ErrorCode = CoreErrorCodes.invalidRequestContext; + response.HttpStatusCode = 400; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidSheetName); + } + return response; + }; + RichApiMessageUtility.buildHttpResponseFromOfficeJsError = function (errorCode, message) { + var statusCode = 500; + var errorBody = {}; + errorBody['error'] = {}; + errorBody['error']['code'] = CoreErrorCodes.generalException; + errorBody['error']['message'] = message; + if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + statusCode = 403; + errorBody['error']['code'] = CoreErrorCodes.accessDenied; + } + else if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + statusCode = 429; + errorBody['error']['code'] = CoreErrorCodes.activityLimitReached; + } + return { statusCode: statusCode, headers: {}, body: JSON.stringify(errorBody) }; + }; + RichApiMessageUtility.buildRequestMessageSafeArray = function (customData, requestFlags, method, path, headers, body) { + var headerArray = []; + if (headers) { + for (var headerName in headers) { + headerArray.push(headerName); + headerArray.push(headers[headerName]); + } + } + var appPermission = 0; + var solutionId = ''; + var instanceId = ''; + var marketplaceType = ''; + var solutionVersion = ''; + var storeLocation = ''; + var compliantSolutionId = ''; + return [ + customData, + method, + path, + headerArray, + body, + appPermission, + requestFlags, + solutionId, + instanceId, + marketplaceType, + solutionVersion, + storeLocation, + compliantSolutionId + ]; + }; + RichApiMessageUtility.getResponseBody = function (result) { + return RichApiMessageUtility.getResponseBodyFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseHeaders = function (result) { + return RichApiMessageUtility.getResponseHeadersFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseBodyFromSafeArray = function (data) { + var ret = data[2]; + if (typeof ret === 'string') { + return ret; + } + var arr = ret; + return arr.join(''); + }; + RichApiMessageUtility.getResponseHeadersFromSafeArray = function (data) { + var arrayHeader = data[1]; + if (!arrayHeader) { + return null; + } + var headers = {}; + for (var i = 0; i < arrayHeader.length - 1; i += 2) { + headers[arrayHeader[i]] = arrayHeader[i + 1]; + } + return headers; + }; + RichApiMessageUtility.getResponseStatusCode = function (result) { + return RichApiMessageUtility.getResponseStatusCodeFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseStatusCodeFromSafeArray = function (data) { + return data[0]; + }; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession = 5012; + RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached = 5102; + RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability = 7000; + RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded = 5103; + RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded = 5104; + RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen = 5016; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName = 1014; + return RichApiMessageUtility; + }()); + OfficeExtension_1.RichApiMessageUtility = RichApiMessageUtility; + (function (_Internal) { + function getPromiseType() { + if (typeof Promise !== 'undefined') { + return Promise; + } + if (typeof Office !== 'undefined') { + if (Office.Promise) { + return Office.Promise; + } + } + if (typeof OfficeExtension !== 'undefined') { + if (OfficeExtension.Promise) { + return OfficeExtension.Promise; + } + } + throw new _Internal.Error('No Promise implementation found'); + } + _Internal.getPromiseType = getPromiseType; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var CoreUtility = (function () { + function CoreUtility() { + } + CoreUtility.log = function (message) { + if (CoreUtility._logEnabled && typeof console !== 'undefined' && console.log) { + console.log(message); + } + }; + CoreUtility.checkArgumentNull = function (value, name) { + if (CoreUtility.isNullOrUndefined(value)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: name }); + } + }; + CoreUtility.isNullOrUndefined = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isUndefined = function (value) { + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isNullOrEmptyString = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + if (value.length == 0) { + return true; + } + return false; + }; + CoreUtility.isPlainJsonObject = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return false; + } + if (typeof value !== 'object') { + return false; + } + if (Object.prototype.toString.apply(value) !== '[object Object]') { + return false; + } + if (value.constructor && + !Object.prototype.hasOwnProperty.call(value, 'constructor') && + !Object.prototype.hasOwnProperty.call(value.constructor.prototype, 'hasOwnProperty')) { + return false; + } + for (var key in value) { + if (!Object.prototype.hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + }; + CoreUtility.trim = function (str) { + return str.replace(new RegExp('^\\s+|\\s+$', 'g'), ''); + }; + CoreUtility.caseInsensitiveCompareString = function (str1, str2) { + if (CoreUtility.isNullOrUndefined(str1)) { + return CoreUtility.isNullOrUndefined(str2); + } + else { + if (CoreUtility.isNullOrUndefined(str2)) { + return false; + } + else { + return str1.toUpperCase() == str2.toUpperCase(); + } + } + }; + CoreUtility.isReadonlyRestRequest = function (method) { + return CoreUtility.caseInsensitiveCompareString(method, 'GET'); + }; + CoreUtility._getResourceString = function (resourceId, arg) { + var ret; + if (typeof window !== 'undefined' && window.Strings && window.Strings.OfficeOM) { + var stringName = 'L_' + resourceId; + var stringValue = window.Strings.OfficeOM[stringName]; + if (stringValue) { + ret = stringValue; + } + } + if (!ret) { + ret = CoreUtility.s_resourceStringValues[resourceId]; + } + if (!ret) { + ret = resourceId; + } + if (!CoreUtility.isNullOrUndefined(arg)) { + if (Array.isArray(arg)) { + var arrArg = arg; + ret = CoreUtility._formatString(ret, arrArg); + } + else { + ret = ret.replace('{0}', arg); + } + } + return ret; + }; + CoreUtility._formatString = function (format, arrArg) { + return format.replace(/\{\d\}/g, function (v) { + var position = parseInt(v.substr(1, v.length - 2)); + if (position < arrArg.length) { + return arrArg[position]; + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'format' }); + } + }); + }; + Object.defineProperty(CoreUtility, "Promise", { + get: function () { + return _Internal.getPromiseType(); + }, + enumerable: true, + configurable: true + }); + CoreUtility.createPromise = function (executor) { + var ret = new CoreUtility.Promise(executor); + return ret; + }; + CoreUtility._createPromiseFromResult = function (value) { + return CoreUtility.createPromise(function (resolve, reject) { + resolve(value); + }); + }; + CoreUtility._createPromiseFromException = function (reason) { + return CoreUtility.createPromise(function (resolve, reject) { + reject(reason); + }); + }; + CoreUtility._createTimeoutPromise = function (timeout) { + return CoreUtility.createPromise(function (resolve, reject) { + setTimeout(function () { + resolve(null); + }, timeout); + }); + }; + CoreUtility._createInvalidArgError = function (error) { + return _Internal.RuntimeError._createInvalidArgError(error); + }; + CoreUtility._isLocalDocumentUrl = function (url) { + return CoreUtility._getLocalDocumentUrlPrefixLength(url) > 0; + }; + CoreUtility._getLocalDocumentUrlPrefixLength = function (url) { + var localDocumentPrefixes = [ + 'http://document.localhost', + 'https://document.localhost', + '//document.localhost' + ]; + var urlLower = url.toLowerCase().trim(); + for (var i = 0; i < localDocumentPrefixes.length; i++) { + if (urlLower === localDocumentPrefixes[i]) { + return localDocumentPrefixes[i].length; + } + else if (urlLower.substr(0, localDocumentPrefixes[i].length + 1) === localDocumentPrefixes[i] + '/') { + return localDocumentPrefixes[i].length + 1; + } + } + return 0; + }; + CoreUtility._validateLocalDocumentRequest = function (request) { + var index = CoreUtility._getLocalDocumentUrlPrefixLength(request.url); + if (index <= 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + var path = request.url.substr(index); + var pathLower = path.toLowerCase(); + if (pathLower === '_api') { + path = ''; + } + else if (pathLower.substr(0, '_api/'.length) === '_api/') { + path = path.substr('_api/'.length); + } + return { + method: request.method, + url: path, + headers: request.headers, + body: request.body + }; + }; + CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny = function (queryString) { + var ret = { flags: -1, customData: '' }; + var parts = queryString.split('&'); + for (var i = 0; i < parts.length; i++) { + var keyvalue = parts[i].split('='); + if (keyvalue[0].toLowerCase() === CoreConstants.flags) { + var flags = parseInt(keyvalue[1]); + flags = flags & 8191; + ret.flags = flags; + } + else if (keyvalue[0].toLowerCase() === CoreConstants.customData) { + ret.customData = decodeURIComponent(keyvalue[1]); + } + } + return ret; + }; + CoreUtility._getRequestBodyText = function (request) { + var body = ''; + if (typeof request.body === 'string') { + body = request.body; + } + else if (request.body && typeof request.body === 'object') { + body = JSON.stringify(request.body); + } + return body; + }; + CoreUtility._parseResponseBody = function (response) { + if (typeof response.body === 'string') { + var bodyText = CoreUtility.trim(response.body); + return JSON.parse(bodyText); + } + else { + return response.body; + } + }; + CoreUtility._buildRequestMessageSafeArray = function (request) { + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var customData = ''; + if (request.url.substr(0, CoreConstants.processQuery.length).toLowerCase() === + CoreConstants.processQuery.toLowerCase()) { + var index = request.url.indexOf('?'); + if (index > 0) { + var queryString = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(queryString); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + customData = flagsAndCustomData.customData; + } + } + return RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, request.method, request.url, request.headers, CoreUtility._getRequestBodyText(request)); + }; + CoreUtility._parseHttpResponseHeaders = function (allResponseHeaders) { + var responseHeaders = {}; + if (!CoreUtility.isNullOrEmptyString(allResponseHeaders)) { + var regex = new RegExp('\r?\n'); + var entries = allResponseHeaders.split(regex); + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + if (entry != null) { + var index = entry.indexOf(':'); + if (index > 0) { + var key = entry.substr(0, index); + var value = entry.substr(index + 1); + key = CoreUtility.trim(key); + value = CoreUtility.trim(value); + responseHeaders[key.toUpperCase()] = value; + } + } + } + } + return responseHeaders; + }; + CoreUtility._parseErrorResponse = function (responseInfo) { + var errorObj = CoreUtility._parseErrorResponseBody(responseInfo); + var statusCode = responseInfo.statusCode.toString(); + if (CoreUtility.isNullOrUndefined(errorObj) || typeof errorObj !== 'object' || !errorObj.error) { + return CoreUtility._createDefaultErrorResponse(statusCode); + } + var error = errorObj.error; + var innerError = error.innerError; + if (innerError && innerError.code) { + return CoreUtility._createErrorResponse(innerError.code, statusCode, innerError.message); + } + if (error.code) { + return CoreUtility._createErrorResponse(error.code, statusCode, error.message); + } + return CoreUtility._createDefaultErrorResponse(statusCode); + }; + CoreUtility._parseErrorResponseBody = function (responseInfo) { + if (CoreUtility.isPlainJsonObject(responseInfo.body)) { + return responseInfo.body; + } + else if (!CoreUtility.isNullOrEmptyString(responseInfo.body)) { + var errorResponseBody = CoreUtility.trim(responseInfo.body); + try { + return JSON.parse(errorResponseBody); + } + catch (e) { + CoreUtility.log('Error when parse ' + errorResponseBody); + } + } + }; + CoreUtility._createDefaultErrorResponse = function (statusCode) { + return { + errorCode: CoreErrorCodes.connectionFailure, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, statusCode) + }; + }; + CoreUtility._createErrorResponse = function (code, statusCode, message) { + return { + errorCode: code, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithDetails, [ + statusCode, + code, + message + ]) + }; + }; + CoreUtility._copyHeaders = function (src, dest) { + if (src && dest) { + for (var key in src) { + dest[key] = src[key]; + } + } + }; + CoreUtility.addResourceStringValues = function (values) { + for (var key in values) { + CoreUtility.s_resourceStringValues[key] = values[key]; + } + }; + CoreUtility._logEnabled = false; + CoreUtility.s_resourceStringValues = { + ApiNotFoundDetails: 'The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.', + ConnectionFailureWithStatus: 'The request failed with status code of {0}.', + ConnectionFailureWithDetails: 'The request failed with status code of {0}, error code {1} and the following error message: {2}', + InvalidArgument: "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.", + InvalidObjectPath: 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.', + InvalidRequestContext: 'Cannot use the object across different request contexts.', + Timeout: 'The operation has timed out.', + ValueNotLoaded: 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.' + }; + return CoreUtility; + }()); + OfficeExtension_1.CoreUtility = CoreUtility; + var TestUtility = (function () { + function TestUtility() { + } + TestUtility.setMock = function (value) { + TestUtility.s_isMock = value; + }; + TestUtility.isMock = function () { + return TestUtility.s_isMock; + }; + TestUtility._setCurrentTestName = function (value) { + TestUtility.s_currentTestName = value; + TestUtility.s_currentTestSequenceId = 0; + }; + TestUtility._getCurrentTestNameWithSequenceId = function () { + if (TestUtility.s_currentTestName) { + TestUtility.s_currentTestSequenceId++; + return TestUtility.s_currentTestName + "." + TestUtility.s_currentTestSequenceId; + } + return null; + }; + return TestUtility; + }()); + OfficeExtension_1.TestUtility = TestUtility; + OfficeExtension_1._internalConfig = { + showDisposeInfoInDebugInfo: false, + showInternalApiInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectUpdateMethod: false, + alwaysPolyfillClientObjectRetrieveMethod: false, + enableConcurrentFlag: true, + enableUndoableFlag: true, + appendTypeNameToObjectPathInfo: false, + enablePreviewExecution: false + }; + OfficeExtension_1.config = { + extendedErrorLogging: false + }; + var CommonActionFactory = (function () { + function CommonActionFactory() { + } + CommonActionFactory.createSetPropertyAction = function (context, parent, propertyName, value, flags) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var args = [value]; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + CommonUtility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var action = new Action(actionInfo, 0, flags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (flags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectId: '', + ObjectType: '', + Arguments: [value] + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return parent._addAction(action); + }; + CommonActionFactory.createQueryAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 2, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createQueryAsJsonAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 7, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createUpdateAction = function (context, parent, objectState) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 9, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 0, 0); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action); + }; + return CommonActionFactory; + }()); + OfficeExtension_1.CommonActionFactory = CommonActionFactory; + var ClientObjectBase = (function () { + function ClientObjectBase(contextBase, objectPath) { + this.m_contextBase = contextBase; + this.m_objectPath = objectPath; + } + Object.defineProperty(ClientObjectBase.prototype, "_objectPath", { + get: function () { + return this.m_objectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObjectBase.prototype, "_context", { + get: function () { + return this.m_contextBase; + }, + enumerable: true, + configurable: true + }); + ClientObjectBase.prototype._addAction = function (action, resultHandler) { + var _this = this; + if (resultHandler === void 0) { + resultHandler = null; + } + return CoreUtility.createPromise(function (resolve, reject) { + _this._context._addServiceApiAction(action, resultHandler, resolve, reject); + }); + }; + ClientObjectBase.prototype._addPreviewExecutionAction = function (action) { + }; + ClientObjectBase.prototype._retrieve = function (option, resultHandler) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var queryOption = ClientRequestContextBase._parseQueryOption(option); + if (shouldPolyfill) { + return CommonActionFactory.createQueryAction(this._context, this, queryOption, resultHandler); + } + return CommonActionFactory.createQueryAsJsonAction(this._context, this, queryOption, resultHandler); + }; + ClientObjectBase.prototype._recursivelyUpdate = function (properties) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectUpdateMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.2'); + } + try { + var scalarPropNames = this[CommonConstants.scalarPropertyNames]; + if (!scalarPropNames) { + scalarPropNames = []; + } + var scalarPropUpdatable = this[CommonConstants.scalarPropertyUpdateable]; + if (!scalarPropUpdatable) { + scalarPropUpdatable = []; + for (var i = 0; i < scalarPropNames.length; i++) { + scalarPropUpdatable.push(false); + } + } + var navigationPropNames = this[CommonConstants.navigationPropertyNames]; + if (!navigationPropNames) { + navigationPropNames = []; + } + var scalarProps = {}; + var navigationProps = {}; + var scalarPropCount = 0; + for (var propName in properties) { + var index = scalarPropNames.indexOf(propName); + if (index >= 0) { + if (!scalarPropUpdatable[index]) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, propName), + debugInfo: { + errorLocation: propName + } + }); + } + scalarProps[propName] = properties[propName]; + ++scalarPropCount; + } + else if (navigationPropNames.indexOf(propName) >= 0) { + navigationProps[propName] = properties[propName]; + } + else { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, propName), + debugInfo: { + errorLocation: propName + } + }); + } + } + if (scalarPropCount > 0) { + if (shouldPolyfill) { + for (var i = 0; i < scalarPropNames.length; i++) { + var propName = scalarPropNames[i]; + var propValue = scalarProps[propName]; + if (!CommonUtility.isUndefined(propValue)) { + CommonActionFactory.createSetPropertyAction(this._context, this, propName, propValue); + } + } + } + else { + CommonActionFactory.createUpdateAction(this._context, this, scalarProps); + } + } + for (var propName in navigationProps) { + var navigationPropProxy = this[propName]; + var navigationPropValue = navigationProps[propName]; + navigationPropProxy._recursivelyUpdate(navigationPropValue); + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.update' + }, + innerError: innerError + }); + } + }; + return ClientObjectBase; + }()); + OfficeExtension_1.ClientObjectBase = ClientObjectBase; + var Action = (function () { + function Action(actionInfo, operationType, flags) { + this.m_actionInfo = actionInfo; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(Action.prototype, "actionInfo", { + get: function () { + return this.m_actionInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + return Action; + }()); + OfficeExtension_1.Action = Action; + var ObjectPath = (function () { + function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest, operationType, flags) { + this.m_objectPathInfo = objectPathInfo; + this.m_parentObjectPath = parentObjectPath; + this.m_isCollection = isCollection; + this.m_isInvalidAfterRequest = isInvalidAfterRequest; + this.m_isValid = true; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(ObjectPath.prototype, "id", { + get: function () { + var argumentInfo = this.m_objectPathInfo.ArgumentInfo; + if (!argumentInfo) { + return undefined; + } + var argument = argumentInfo.Arguments; + if (!argument) { + return undefined; + } + return argument[0]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parent", { + get: function () { + var parent = this.m_parentObjectPath; + if (!parent) { + return undefined; + } + return parent; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentId", { + get: function () { + return this.parent ? this.parent.id : undefined; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "objectPathInfo", { + get: function () { + return this.m_objectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isCollection", { + get: function () { + return this.m_isCollection; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isInvalidAfterRequest", { + get: function () { + return this.m_isInvalidAfterRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentObjectPath", { + get: function () { + return this.m_parentObjectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "argumentObjectPaths", { + get: function () { + return this.m_argumentObjectPaths; + }, + set: function (value) { + this.m_argumentObjectPaths = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isValid", { + get: function () { + return this.m_isValid; + }, + set: function (value) { + this.m_isValid = value; + if (!value && + this.m_objectPathInfo.ObjectPathType === 6 && + this.m_savedObjectPathInfo) { + ObjectPath.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo, this.m_objectPathInfo); + this.m_parentObjectPath = this.m_savedObjectPathInfo.parent; + this.m_isValid = true; + this.m_savedObjectPathInfo = null; + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "originalObjectPathInfo", { + get: function () { + return this.m_originalObjectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "getByIdMethodName", { + get: function () { + return this.m_getByIdMethodName; + }, + set: function (value) { + this.m_getByIdMethodName = value; + }, + enumerable: true, + configurable: true + }); + ObjectPath.prototype._updateAsNullObject = function () { + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 7; + this.m_objectPathInfo.Name = ''; + this.m_parentObjectPath = null; + }; + ObjectPath.prototype.saveOriginalObjectPathInfo = function () { + if (OfficeExtension_1.config.extendedErrorLogging && !this.m_originalObjectPathInfo) { + this.m_originalObjectPathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, this.m_originalObjectPathInfo); + } + }; + ObjectPath.prototype.updateUsingObjectData = function (value, clientObject) { + var referenceId = value[CommonConstants.referenceId]; + if (!CoreUtility.isNullOrEmptyString(referenceId)) { + if (!this.m_savedObjectPathInfo && + !this.isInvalidAfterRequest && + ObjectPath.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)) { + var pathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, pathInfo); + this.m_savedObjectPathInfo = { + pathInfo: pathInfo, + parent: this.m_parentObjectPath + }; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 6; + this.m_objectPathInfo.Name = referenceId; + delete this.m_objectPathInfo.ParentObjectPathId; + this.m_parentObjectPath = null; + return; + } + if (clientObject) { + var collectionPropertyPath = clientObject[CommonConstants.collectionPropertyPath]; + if (!CoreUtility.isNullOrEmptyString(collectionPropertyPath) && clientObject.context) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + var propNames = collectionPropertyPath.split('.'); + var parent_1 = clientObject.context[propNames[0]]; + for (var i = 1; i < propNames.length; i++) { + parent_1 = parent_1[propNames[i]]; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_parentObjectPath = parent_1._objectPath; + this.m_objectPathInfo.ParentObjectPathId = this.m_parentObjectPath.objectPathInfo.Id; + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + } + var parentIsCollection = this.parentObjectPath && this.parentObjectPath.isCollection; + var getByIdMethodName = this.getByIdMethodName; + if (parentIsCollection || !CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + if (!CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + this.m_objectPathInfo.ObjectPathType = 3; + this.m_objectPathInfo.Name = getByIdMethodName; + } + else { + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + } + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + }; + ObjectPath.prototype.resetForUpdateUsingObjectData = function () { + this.m_isInvalidAfterRequest = false; + this.m_isValid = true; + this.m_operationType = 1; + this.m_flags = 4; + this.m_objectPathInfo.ArgumentInfo = {}; + this.m_argumentObjectPaths = null; + this.m_getByIdMethodName = null; + }; + ObjectPath.isRestorableObjectPath = function (objectPathType) { + return (objectPathType === 1 || + objectPathType === 5 || + objectPathType === 3 || + objectPathType === 4); + }; + ObjectPath.copyObjectPathInfo = function (src, dest) { + dest.Id = src.Id; + dest.ArgumentInfo = src.ArgumentInfo; + dest.Name = src.Name; + dest.ObjectPathType = src.ObjectPathType; + dest.ParentObjectPathId = src.ParentObjectPathId; + }; + return ObjectPath; + }()); + OfficeExtension_1.ObjectPath = ObjectPath; + var ClientRequestContextBase = (function () { + function ClientRequestContextBase() { + this.m_nextId = 0; + } + ClientRequestContextBase.prototype._nextId = function () { + return ++this.m_nextId; + }; + ClientRequestContextBase.prototype._addServiceApiAction = function (action, resultHandler, resolve, reject) { + if (!this.m_serviceApiQueue) { + this.m_serviceApiQueue = new ServiceApiQueue(this); + } + this.m_serviceApiQueue.add(action, resultHandler, resolve, reject); + }; + ClientRequestContextBase._parseQueryOption = function (option) { + var queryOption = {}; + if (typeof option === 'string') { + var select = option; + queryOption.Select = CommonUtility._parseSelectExpand(select); + } + else if (Array.isArray(option)) { + queryOption.Select = option; + } + else if (typeof option === 'object') { + var loadOption = option; + if (ClientRequestContextBase.isLoadOption(loadOption)) { + if (typeof loadOption.select === 'string') { + queryOption.Select = CommonUtility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select = loadOption.select; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.select)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.select' }); + } + if (typeof loadOption.expand === 'string') { + queryOption.Expand = CommonUtility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand = loadOption.expand; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.expand)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.expand' }); + } + if (typeof loadOption.top === 'number') { + queryOption.Top = loadOption.top; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.top)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.top' }); + } + if (typeof loadOption.skip === 'number') { + queryOption.Skip = loadOption.skip; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.skip)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.skip' }); + } + } + else { + queryOption = ClientRequestContextBase.parseStrictLoadOption(option); + } + } + else if (!CommonUtility.isNullOrUndefined(option)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option' }); + } + return queryOption; + }; + ClientRequestContextBase.isLoadOption = function (loadOption) { + if (!CommonUtility.isUndefined(loadOption.select) && + (typeof loadOption.select === 'string' || Array.isArray(loadOption.select))) + return true; + if (!CommonUtility.isUndefined(loadOption.expand) && + (typeof loadOption.expand === 'string' || Array.isArray(loadOption.expand))) + return true; + if (!CommonUtility.isUndefined(loadOption.top) && typeof loadOption.top === 'number') + return true; + if (!CommonUtility.isUndefined(loadOption.skip) && typeof loadOption.skip === 'number') + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContextBase.parseStrictLoadOption = function (option) { + var ret = { Select: [] }; + ClientRequestContextBase.parseStrictLoadOptionHelper(ret, '', 'option', option); + return ret; + }; + ClientRequestContextBase.combineQueryPath = function (pathPrefix, key, separator) { + if (pathPrefix.length === 0) { + return key; + } + else { + return pathPrefix + separator + key; + } + }; + ClientRequestContextBase.parseStrictLoadOptionHelper = function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value = option[key]; + if (key === '$all') { + if (typeof value !== 'boolean') { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, '*', '/')); + } + } + else if (key === '$top') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Top = value; + } + else if (key === '$skip') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Skip = value; + } + else { + if (typeof value === 'boolean') { + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/')); + } + } + else if (typeof value === 'object') { + ClientRequestContextBase.parseStrictLoadOptionHelper(queryInfo, ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/'), ClientRequestContextBase.combineQueryPath(argPrefix, key, '.'), value); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + } + } + }; + return ClientRequestContextBase; + }()); + OfficeExtension_1.ClientRequestContextBase = ClientRequestContextBase; + var InstantiateActionUpdateObjectPathHandler = (function () { + function InstantiateActionUpdateObjectPathHandler(m_objectPath) { + this.m_objectPath = m_objectPath; + } + InstantiateActionUpdateObjectPathHandler.prototype._handleResult = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + this.m_objectPath._updateAsNullObject(); + } + else { + this.m_objectPath.updateUsingObjectData(value, null); + } + }; + return InstantiateActionUpdateObjectPathHandler; + }()); + var ClientRequestBase = (function () { + function ClientRequestBase(context) { + this.m_contextBase = context; + this.m_actions = []; + this.m_actionResultHandler = {}; + this.m_referencedObjectPaths = {}; + this.m_instantiatedObjectPaths = {}; + this.m_preSyncPromises = []; + this.m_previewExecutionActions = []; + } + ClientRequestBase.prototype.addAction = function (action) { + this.m_actions.push(action); + if (action.actionInfo.ActionType == 1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId] = action; + } + }; + ClientRequestBase.prototype.addPreviewExecutionAction = function (action) { + this.m_previewExecutionActions.push(action); + }; + Object.defineProperty(ClientRequestBase.prototype, "hasActions", { + get: function () { + return this.m_actions.length > 0; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._getLastAction = function () { + return this.m_actions[this.m_actions.length - 1]; + }; + ClientRequestBase.prototype.ensureInstantiateObjectPath = function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo = { + Id: this.m_contextBase._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction = new Action(actionInfo, 1, 4); + instantiateAction.referencedObjectPath = objectPath; + this.addReferencedObjectPath(objectPath); + this.addAction(instantiateAction); + var resultHandler = new InstantiateActionUpdateObjectPathHandler(objectPath); + this.addActionResultHandler(instantiateAction, resultHandler); + } + } + }; + ClientRequestBase.prototype.ensureInstantiateObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addReferencedObjectPath = function (objectPath) { + if (!objectPath || this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + while (objectPath) { + this.m_referencedObjectPaths[objectPath.objectPathInfo.Id] = objectPath; + if (objectPath.objectPathInfo.ObjectPathType == 3) { + this.addReferencedObjectPaths(objectPath.argumentObjectPaths); + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase.prototype.addReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.addReferencedObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addActionResultHandler = function (action, resultHandler) { + this.m_actionResultHandler[action.actionInfo.Id] = resultHandler; + }; + ClientRequestBase.prototype.aggregrateRequestFlags = function (requestFlags, operationType, flags) { + if (operationType === 0) { + requestFlags = requestFlags | 1; + if ((flags & 2) === 0) { + requestFlags = requestFlags & ~16; + } + if ((flags & 8) === 0) { + requestFlags = requestFlags & ~256; + } + requestFlags = requestFlags & ~4; + } + if (flags & 1) { + requestFlags = requestFlags | 2; + } + if ((flags & 4) === 0) { + requestFlags = requestFlags & ~4; + } + return requestFlags; + }; + ClientRequestBase.prototype.finallyNormalizeFlags = function (requestFlags) { + if ((requestFlags & 1) === 0) { + requestFlags = requestFlags & ~16; + requestFlags = requestFlags & ~256; + } + if (!OfficeExtension_1._internalConfig.enableConcurrentFlag) { + requestFlags = requestFlags & ~4; + } + if (!OfficeExtension_1._internalConfig.enableUndoableFlag) { + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.1')) { + requestFlags = requestFlags & ~4; + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.2')) { + requestFlags = requestFlags & ~256; + } + if (typeof this.m_flagsForTesting === 'number') { + requestFlags = this.m_flagsForTesting; + } + return requestFlags; + }; + ClientRequestBase.prototype.buildRequestMessageBodyAndRequestFlags = function () { + if (OfficeExtension_1._internalConfig.enableEarlyDispose) { + ClientRequestBase._calculateLastUsedObjectPathIds(this.m_actions); + } + var requestFlags = 4 | + 16 | + 256; + var objectPaths = {}; + for (var i in this.m_referencedObjectPaths) { + requestFlags = this.aggregrateRequestFlags(requestFlags, this.m_referencedObjectPaths[i].operationType, this.m_referencedObjectPaths[i].flags); + objectPaths[i] = this.m_referencedObjectPaths[i].objectPathInfo; + } + var actions = []; + var hasKeepReference = false; + for (var index = 0; index < this.m_actions.length; index++) { + var action = this.m_actions[index]; + if (action.actionInfo.ActionType === 3 && + action.actionInfo.Name === CommonConstants.keepReference) { + hasKeepReference = true; + } + requestFlags = this.aggregrateRequestFlags(requestFlags, action.operationType, action.flags); + actions.push(action.actionInfo); + } + requestFlags = this.finallyNormalizeFlags(requestFlags); + var body = { + AutoKeepReference: this.m_contextBase._autoCleanup && hasKeepReference, + Actions: actions, + ObjectPaths: objectPaths + }; + if (this.m_previewExecutionActions.length > 0) { + body.PreviewExecutionActions = this.m_previewExecutionActions; + requestFlags = requestFlags | 4096; + } + return { + body: body, + flags: requestFlags + }; + }; + ClientRequestBase.prototype.processResponse = function (actionResults) { + if (actionResults) { + for (var i = 0; i < actionResults.length; i++) { + var actionResult = actionResults[i]; + var handler = this.m_actionResultHandler[actionResult.ActionId]; + if (handler) { + handler._handleResult(actionResult.Value); + } + } + } + }; + ClientRequestBase.prototype.invalidatePendingInvalidObjectPaths = function () { + for (var i in this.m_referencedObjectPaths) { + if (this.m_referencedObjectPaths[i].isInvalidAfterRequest) { + this.m_referencedObjectPaths[i].isValid = false; + } + } + }; + ClientRequestBase.prototype._addPreSyncPromise = function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequestBase.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._removeKeepReferenceAction = function (objectPathId) { + for (var i = this.m_actions.length - 1; i >= 0; i--) { + var actionInfo = this.m_actions[i].actionInfo; + if (actionInfo.ObjectPathId === objectPathId && + actionInfo.ActionType === 3 && + actionInfo.Name === CommonConstants.keepReference) { + this.m_actions.splice(i, 1); + break; + } + } + }; + ClientRequestBase._updateLastUsedActionIdOfObjectPathId = function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id] = actionId; + var argumentObjectPaths = objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength = argumentObjectPaths.length; + for (var i = 0; i < argumentObjectPathsLength; i++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase._calculateLastUsedObjectPathIds = function (actions) { + var lastUsedActionIdOfObjectPathId = {}; + var actionsLength = actions.length; + for (var index = actionsLength - 1; index >= 0; --index) { + var action = actions[index]; + var actionId = action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths = action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength = referencedObjectPaths.length; + for (var refIndex = 0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction = {}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId = lastUsedActionIdOfObjectPathId[key]; + var objectPathIds = lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds = []; + lastUsedObjectPathIdsOfAction[actionId] = objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index = 0; index < actionsLength; index++) { + var action = actions[index]; + var lastUsedObjectPathIds = lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L = lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; + return ClientRequestBase; + }()); + OfficeExtension_1.ClientRequestBase = ClientRequestBase; + var ClientResult = (function () { + function ClientResult(m_type) { + this.m_type = m_type; + } + Object.defineProperty(ClientResult.prototype, "value", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'clientResult.value' + } + }); + } + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ClientResult.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (typeof value === 'object' && value && value._IsNull) { + return; + } + if (this.m_type === 1) { + this.m_value = CommonUtility.adjustToDateTime(value); + } + else { + this.m_value = value; + } + }; + return ClientResult; + }()); + OfficeExtension_1.ClientResult = ClientResult; + var ServiceApiQueue = (function () { + function ServiceApiQueue(m_context) { + this.m_context = m_context; + this.m_actions = []; + } + ServiceApiQueue.prototype.add = function (action, resultHandler, resolve, reject) { + var _this = this; + this.m_actions.push({ action: action, resultHandler: resultHandler, resolve: resolve, reject: reject }); + if (this.m_actions.length === 1) { + setTimeout(function () { return _this.processActions(); }, 0); + } + }; + ServiceApiQueue.prototype.processActions = function () { + var _this = this; + if (this.m_actions.length === 0) { + return; + } + var actions = this.m_actions; + this.m_actions = []; + var request = new ClientRequestBase(this.m_context); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + request.ensureInstantiateObjectPath(action.action.referencedObjectPath); + request.ensureInstantiateObjectPaths(action.action.referencedArgumentObjectPaths); + request.addAction(action.action); + request.addReferencedObjectPath(action.action.referencedObjectPath); + request.addReferencedObjectPaths(action.action.referencedArgumentObjectPaths); + } + var _a = request.buildRequestMessageBodyAndRequestFlags(), body = _a.body, flags = _a.flags; + var requestMessage = { + Url: CoreConstants.localDocumentApiPrefix, + Headers: null, + Body: body + }; + CoreUtility.log('Request:'); + CoreUtility.log(JSON.stringify(body)); + var executor = new HttpRequestExecutor(); + executor + .executeAsync(this.m_context._customData, flags, requestMessage) + .then(function (response) { + _this.processResponse(request, actions, response); + })["catch"](function (ex) { + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + action.reject(ex); + } + }); + }; + ServiceApiQueue.prototype.processResponse = function (request, actions, response) { + var error = this.getErrorFromResponse(response); + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (!actionResults) { + actionResults = []; + } + this.processActionResults(request, actions, actionResults, error); + }; + ServiceApiQueue.prototype.getErrorFromResponse = function (response) { + if (!CoreUtility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage + }); + } + if (response.Body && response.Body.Error) { + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message + }); + } + return null; + }; + ServiceApiQueue.prototype.processActionResults = function (request, actions, actionResults, err) { + request.processResponse(actionResults); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + var actionId = action.action.actionInfo.Id; + var hasResult = false; + for (var j = 0; j < actionResults.length; j++) { + if (actionId == actionResults[j].ActionId) { + var resultValue = actionResults[j].Value; + if (action.resultHandler) { + action.resultHandler._handleResult(resultValue); + resultValue = action.resultHandler.value; + } + if (action.resolve) { + action.resolve(resultValue); + } + hasResult = true; + break; + } + } + if (!hasResult && action.reject) { + if (err) { + action.reject(err); + } + else { + action.reject('No response for the action.'); + } + } + } + }; + return ServiceApiQueue; + }()); + var HttpRequestExecutor = (function () { + function HttpRequestExecutor() { + } + HttpRequestExecutor.prototype.getRequestUrl = function (baseUrl, requestFlags) { + if (baseUrl.charAt(baseUrl.length - 1) != '/') { + baseUrl = baseUrl + '/'; + } + baseUrl = baseUrl + CoreConstants.processQuery; + baseUrl = baseUrl + '?' + CoreConstants.flags + '=' + requestFlags.toString(); + return baseUrl; + }; + HttpRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var url = this.getRequestUrl(requestMessage.Url, requestFlags); + var requestInfo = { + method: 'POST', + url: url, + headers: {}, + body: requestMessage.Body + }; + requestInfo.headers[CoreConstants.sourceLibHeader] = HttpRequestExecutor.SourceLibHeaderValue; + requestInfo.headers['CONTENT-TYPE'] = 'application/json'; + if (requestMessage.Headers) { + for (var key in requestMessage.Headers) { + requestInfo.headers[key] = requestMessage.Headers[key]; + } + } + var sendRequestFunc = CoreUtility._isLocalDocumentUrl(requestInfo.url) + ? HttpUtility.sendLocalDocumentRequest + : HttpUtility.sendRequest; + return sendRequestFunc(requestInfo).then(function (responseInfo) { + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null, + RawErrorResponseBody: CoreUtility._parseErrorResponseBody(responseInfo) + }; + } + return response; + }); + }; + HttpRequestExecutor.SourceLibHeaderValue = 'officejs-rest'; + return HttpRequestExecutor; + }()); + OfficeExtension_1.HttpRequestExecutor = HttpRequestExecutor; + var CommonConstants = (function (_super) { + __extends(CommonConstants, _super); + function CommonConstants() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonConstants.collectionPropertyPath = '_collectionPropertyPath'; + CommonConstants.id = 'Id'; + CommonConstants.idLowerCase = 'id'; + CommonConstants.idPrivate = '_Id'; + CommonConstants.keepReference = '_KeepReference'; + CommonConstants.objectPathIdPrivate = '_ObjectPathId'; + CommonConstants.referenceId = '_ReferenceId'; + CommonConstants.items = '_Items'; + CommonConstants.itemsLowerCase = 'items'; + CommonConstants.scalarPropertyNames = '_scalarPropertyNames'; + CommonConstants.scalarPropertyOriginalNames = '_scalarPropertyOriginalNames'; + CommonConstants.navigationPropertyNames = '_navigationPropertyNames'; + CommonConstants.scalarPropertyUpdateable = '_scalarPropertyUpdateable'; + CommonConstants.previewExecutionObjectId = '_previewExecutionObjectId'; + return CommonConstants; + }(CoreConstants)); + OfficeExtension_1.CommonConstants = CommonConstants; + var CommonUtility = (function (_super) { + __extends(CommonUtility, _super); + function CommonUtility() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonUtility.validateObjectPath = function (clientObject) { + var objectPath = clientObject._objectPath; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + objectPath = objectPath.parentObjectPath; + } + }; + CommonUtility.validateReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + var objectPath = objectPaths[i]; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)) + }); + } + objectPath = objectPath.parentObjectPath; + } + } + } + }; + CommonUtility._toCamelLowerCase = function (name) { + if (CoreUtility.isNullOrEmptyString(name)) { + return name; + } + var index = 0; + while (index < name.length && name.charCodeAt(index) >= 65 && name.charCodeAt(index) <= 90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase() + name.substr(index); + } + else { + return name.toLowerCase(); + } + }; + CommonUtility.adjustToDateTime = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return null; + } + if (typeof value === 'string') { + return new Date(value); + } + if (Array.isArray(value)) { + var arr = value; + for (var i = 0; i < arr.length; i++) { + arr[i] = CommonUtility.adjustToDateTime(arr[i]); + } + return arr; + } + throw CoreUtility._createInvalidArgError({ argumentName: 'date' }); + }; + CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult = function (value) { + var id = value[CommonConstants.id]; + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idLowerCase]; + } + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idPrivate]; + } + return id; + }; + CommonUtility.getObjectPathExpression = function (objectPath) { + var ret = ''; + while (objectPath) { + switch (objectPath.objectPathInfo.ObjectPathType) { + case 1: + ret = ret; + break; + case 2: + ret = 'new()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 3: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + '()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 4: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + (ret.length > 0 ? '.' : '') + ret; + break; + case 5: + ret = 'getItem()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 6: + ret = '_reference()' + (ret.length > 0 ? '.' : '') + ret; + break; + } + objectPath = objectPath.parentObjectPath; + } + return ret; + }; + CommonUtility.setMethodArguments = function (context, argumentInfo, args) { + if (CoreUtility.isNullOrUndefined(args)) { + return null; + } + var referencedObjectPaths = new Array(); + var referencedObjectPathIds = new Array(); + var hasOne = CommonUtility.collectObjectPathInfos(context, args, referencedObjectPaths, referencedObjectPathIds); + argumentInfo.Arguments = args; + if (hasOne) { + argumentInfo.ReferencedObjectPathIds = referencedObjectPathIds; + } + return referencedObjectPaths; + }; + CommonUtility.validateContext = function (context, obj) { + if (context && obj && obj._context !== context) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidRequestContext, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidRequestContext) + }); + } + }; + CommonUtility.isSetSupported = function (apiSetName, apiSetVersion) { + if (typeof CommonUtility.isSetSupportedOverride === "function") { + return CommonUtility.isSetSupportedOverride(apiSetName, apiSetVersion); + } + if (typeof window !== 'undefined' && + window.Office && + window.Office.context && + window.Office.context.requirements) { + return window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion); + } + return true; + }; + CommonUtility.throwIfApiNotSupported = function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!CommonUtility._doApiNotSupportedCheck) { + return; + } + if (!CommonUtility.isSetSupported(apiSetName, apiSetVersion)) { + var message = CoreUtility._getResourceString(CoreResourceStrings.apiNotFoundDetails, [ + apiFullName, + apiSetName + ' ' + apiSetVersion, + hostName + ]); + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.apiNotFound, + httpStatusCode: 404, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + }; + CommonUtility.calculateApiFlags = function (apiFlags, undoableApiSetName, undoableApiSetVersion) { + var undoable = false; + var inMakerRuntime = (window + && window.location + && window.location.href + && window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc") !== -1); + if (typeof CommonUtility.isSetSupportedOverride === "function") { + undoable = CommonUtility.isSetSupportedOverride(undoableApiSetName, undoableApiSetVersion); + } + else if (inMakerRuntime) { + undoable = false; + } + else { + undoable = CommonUtility.isSetSupported(undoableApiSetName, undoableApiSetVersion); + } + if (!undoable) { + apiFlags = apiFlags & (~2); + } + return apiFlags; + }; + CommonUtility._parseSelectExpand = function (select) { + var args = []; + if (!CoreUtility.isNullOrEmptyString(select)) { + var propertyNames = select.split(','); + for (var i = 0; i < propertyNames.length; i++) { + var propertyName = propertyNames[i]; + propertyName = sanitizeForAnyItemsSlash(propertyName.trim()); + if (propertyName.length > 0) { + args.push(propertyName); + } + } + } + return args; + function sanitizeForAnyItemsSlash(propertyName) { + var propertyNameLower = propertyName.toLowerCase(); + if (propertyNameLower === 'items' || propertyNameLower === 'items/') { + return '*'; + } + var itemsSlashLength = 6; + var isItemsSlashOrItemsDot = propertyNameLower.substr(0, itemsSlashLength) === 'items/' || + propertyNameLower.substr(0, itemsSlashLength) === 'items.'; + if (isItemsSlashOrItemsDot) { + propertyName = propertyName.substr(itemsSlashLength); + } + return propertyName.replace(new RegExp('[/.]items[/.]', 'gi'), '/'); + } + }; + CommonUtility.changePropertyNameToCamelLowerCase = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + var propValue = value[key]; + if (key === CommonConstants.items) { + ret = {}; + ret[CommonConstants.itemsLowerCase] = this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else { + var propName = CommonUtility._toCamelLowerCase(key); + ret[propName] = this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.purifyJson = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.purifyJson(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + if (key.charCodeAt(0) !== charCodeUnderscore) { + var propValue = value[key]; + if (typeof propValue === 'object' && propValue !== null && Array.isArray(propValue['items'])) { + propValue = propValue['items']; + } + ret[key] = this.purifyJson(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.collectObjectPathInfos = function (context, args, referencedObjectPaths, referencedObjectPathIds) { + var hasOne = false; + for (var i = 0; i < args.length; i++) { + if (args[i] instanceof ClientObjectBase) { + var clientObject = args[i]; + CommonUtility.validateContext(context, clientObject); + args[i] = clientObject._objectPath.objectPathInfo.Id; + referencedObjectPathIds.push(clientObject._objectPath.objectPathInfo.Id); + referencedObjectPaths.push(clientObject._objectPath); + hasOne = true; + } + else if (Array.isArray(args[i])) { + var childArrayObjectPathIds = new Array(); + var childArrayHasOne = CommonUtility.collectObjectPathInfos(context, args[i], referencedObjectPaths, childArrayObjectPathIds); + if (childArrayHasOne) { + referencedObjectPathIds.push(childArrayObjectPathIds); + hasOne = true; + } + else { + referencedObjectPathIds.push(0); + } + } + else if (CoreUtility.isPlainJsonObject(args[i])) { + referencedObjectPathIds.push(0); + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(args[i], referencedObjectPaths); + } + else { + referencedObjectPathIds.push(0); + } + } + return hasOne; + }; + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds = function (value, referencedObjectPaths) { + var _a, _b; + for (var key in value) { + var propValue = value[key]; + if (propValue instanceof ClientObjectBase) { + referencedObjectPaths.push(propValue._objectPath); + value[key] = (_a = {}, _a[CommonConstants.objectPathIdPrivate] = propValue._objectPath.objectPathInfo.Id, _a); + } + else if (Array.isArray(propValue)) { + for (var i = 0; i < propValue.length; i++) { + if (propValue[i] instanceof ClientObjectBase) { + var elem = propValue[i]; + referencedObjectPaths.push(elem._objectPath); + propValue[i] = (_b = {}, _b[CommonConstants.objectPathIdPrivate] = elem._objectPath.objectPathInfo.Id, _b); + } + else if (CoreUtility.isPlainJsonObject(propValue[i])) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue[i], referencedObjectPaths); + } + } + } + else if (CoreUtility.isPlainJsonObject(propValue)) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue, referencedObjectPaths); + } + else { + } + } + }; + CommonUtility.normalizeName = function (name) { + return name.substr(0, 1).toLowerCase() + name.substr(1); + }; + CommonUtility._doApiNotSupportedCheck = false; + return CommonUtility; + }(CoreUtility)); + OfficeExtension_1.CommonUtility = CommonUtility; + var CommonResourceStrings = (function (_super) { + __extends(CommonResourceStrings, _super); + function CommonResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonResourceStrings.propertyDoesNotExist = 'PropertyDoesNotExist'; + CommonResourceStrings.attemptingToSetReadOnlyProperty = 'AttemptingToSetReadOnlyProperty'; + return CommonResourceStrings; + }(CoreResourceStrings)); + OfficeExtension_1.CommonResourceStrings = CommonResourceStrings; + var ClientRetrieveResult = (function (_super) { + __extends(ClientRetrieveResult, _super); + function ClientRetrieveResult(m_shouldPolyfill) { + var _this = _super.call(this) || this; + _this.m_shouldPolyfill = m_shouldPolyfill; + return _this; + } + ClientRetrieveResult.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (this.m_shouldPolyfill) { + this.m_value = CommonUtility.changePropertyNameToCamelLowerCase(this.m_value); + } + this.m_value = this.removeItemNodes(this.m_value); + }; + ClientRetrieveResult.prototype.removeItemNodes = function (value) { + if (typeof value === 'object' && value !== null && value[CommonConstants.itemsLowerCase]) { + value = value[CommonConstants.itemsLowerCase]; + } + return CommonUtility.purifyJson(value); + }; + return ClientRetrieveResult; + }(ClientResult)); + OfficeExtension_1.ClientRetrieveResult = ClientRetrieveResult; + var TraceActionResultHandler = (function () { + function TraceActionResultHandler(callback) { + this.callback = callback; + } + TraceActionResultHandler.prototype._handleResult = function (value) { + if (this.callback) { + this.callback(); + } + }; + return TraceActionResultHandler; + }()); + var ClientResultCallback = (function (_super) { + __extends(ClientResultCallback, _super); + function ClientResultCallback(callback) { + var _this = _super.call(this) || this; + _this.callback = callback; + return _this; + } + ClientResultCallback.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + this.callback(); + }; + return ClientResultCallback; + }(ClientResult)); + OfficeExtension_1.ClientResultCallback = ClientResultCallback; + var OperationalApiHelper = (function () { + function OperationalApiHelper() { + } + OperationalApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + if (operationType === void 0) { + operationType = 0; + } + if (args === void 0) { + args = []; + } + if (flags === void 0) { + flags = 0; + } + if (resultProcessType === void 0) { + resultProcessType = 0; + } + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResult(); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeMethodWithClientResultCallback = function (callback, obj, methodName) { + var operationType = 0; + var args = []; + var flags = 0; + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResultCallback(callback); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeRetrieve = function (obj, select) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var option; + if (typeof select[0] === 'object' && select[0].hasOwnProperty('$all')) { + if (!select[0]['$all']) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + option = select[0]; + } + else { + option = OperationalApiHelper._parseSelectOption(select); + } + return obj._retrieve(option, new ClientRetrieveResult(shouldPolyfill)); + }; + OperationalApiHelper._parseSelectOption = function (select) { + if (!select || !select[0]) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + var parsedSelect = select[0] && typeof select[0] !== 'string' ? select[0] : select; + return Array.isArray(parsedSelect) ? parsedSelect : OperationalApiHelper.parseRecursiveSelect(parsedSelect); + }; + OperationalApiHelper.parseRecursiveSelect = function (select) { + var deconstruct = function (selectObj) { + return Object.keys(selectObj).reduce(function (scalars, name) { + var value = selectObj[name]; + if (typeof value === 'object') { + return scalars.concat(deconstruct(value).map(function (postfix) { return name + "/" + postfix; })); + } + if (value) { + return scalars.concat(name); + } + return scalars; + }, []); + }; + return deconstruct(select); + }; + OperationalApiHelper.invokeRecursiveUpdate = function (obj, properties) { + return CoreUtility.createPromise(function (resolve, reject) { + obj._recursivelyUpdate(properties); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + obj._context._addServiceApiAction(action, null, resolve, reject); + }); + }; + OperationalApiHelper.createRootServiceObject = function (type, context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + var objectPath = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var objectPath = new ObjectPath(objectPathInfo, null, isCollection, false, 1, flags | 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, false, 1, flags | 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createIndexerObject = function (type, parent, args) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var id = parent._context._nextId(); + var objectPathInfo = { + Id: id, + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var o = new type(parent._context, objectPath); + return o; + }; + OperationalApiHelper.createAndInstantiateMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + return CoreUtility.createPromise(function (resolve, reject) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var result = new ClientResult(); + var actionInfo = { + Id: parent._context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id, + QueryInfo: {} + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = objectPath; + parent._context._addServiceApiAction(action, result, function () { return resolve(new type(parent._context, objectPath)); }, reject); + }); + }; + OperationalApiHelper.createTraceAction = function (context, callback) { + return CoreUtility.createPromise(function (resolve, reject) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + var result = new TraceActionResultHandler(callback); + context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.localDocumentContext = new ClientRequestContextBase(); + return OperationalApiHelper; + }()); + OfficeExtension_1.OperationalApiHelper = OperationalApiHelper; + var GenericEventRegistryOperational = (function () { + function GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform) { + this.eventId = eventId; + this.targetId = targetId; + this.eventArgumentTransform = eventArgumentTransform; + this.registeredCallbacks = []; + } + GenericEventRegistryOperational.prototype.add = function (callback) { + if (this.hasZero()) { + GenericEventRegistration.getGenericEventRegistration('').register(this.eventId, this.targetId, this.registerCallback); + } + this.registeredCallbacks.push(callback); + }; + GenericEventRegistryOperational.prototype.remove = function (callback) { + var index = this.registeredCallbacks.lastIndexOf(callback); + if (index !== -1) { + this.registeredCallbacks.splice(index, 1); + } + }; + GenericEventRegistryOperational.prototype.removeAll = function () { + this.registeredCallbacks = []; + GenericEventRegistration.getGenericEventRegistration('').unregister(this.eventId, this.targetId, this.registerCallback); + }; + GenericEventRegistryOperational.prototype.hasZero = function () { + return this.registeredCallbacks.length === 0; + }; + Object.defineProperty(GenericEventRegistryOperational.prototype, "registerCallback", { + get: function () { + var i = this; + if (!this.outsideCallback) { + this.outsideCallback = function (argument) { + i.call(argument); + }; + } + return this.outsideCallback; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistryOperational.prototype.call = function (rawEventArguments) { + var _this = this; + this.eventArgumentTransform(rawEventArguments).then(function (eventArguments) { + var promises = _this.registeredCallbacks.map(function (callback) { return GenericEventRegistryOperational.callCallback(callback, eventArguments); }); + CoreUtility.Promise.all(promises); + }); + }; + GenericEventRegistryOperational.callCallback = function (callback, eventArguments) { + return CoreUtility._createPromiseFromResult(null) + .then(GenericEventRegistryOperational.wrapCallbackInFunction(callback, eventArguments))["catch"](function (e) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(e)); + }); + }; + GenericEventRegistryOperational.wrapCallbackInFunction = function (callback, args) { + return function () { return callback(args); }; + }; + return GenericEventRegistryOperational; + }()); + OfficeExtension_1.GenericEventRegistryOperational = GenericEventRegistryOperational; + var GlobalEventRegistryOperational = (function () { + function GlobalEventRegistryOperational() { + this.eventToTargetToHandlerMap = {}; + } + Object.defineProperty(GlobalEventRegistryOperational, "globalEventRegistry", { + get: function () { + if (!GlobalEventRegistryOperational.singleton) { + GlobalEventRegistryOperational.singleton = new GlobalEventRegistryOperational(); + } + return GlobalEventRegistryOperational.singleton; + }, + enumerable: true, + configurable: true + }); + GlobalEventRegistryOperational.getGlobalEventRegistry = function (eventId, targetId, eventArgumentTransform) { + var global = GlobalEventRegistryOperational.globalEventRegistry; + var mapGlobal = global.eventToTargetToHandlerMap; + if (!mapGlobal.hasOwnProperty(eventId)) { + mapGlobal[eventId] = {}; + } + var mapEvent = mapGlobal[eventId]; + if (!mapEvent.hasOwnProperty(targetId)) { + mapEvent[targetId] = new GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform); + } + var target = mapEvent[targetId]; + return target; + }; + GlobalEventRegistryOperational.singleton = undefined; + return GlobalEventRegistryOperational; + }()); + OfficeExtension_1.GlobalEventRegistryOperational = GlobalEventRegistryOperational; + var GenericEventHandlerOperational = (function () { + function GenericEventHandlerOperational(genericEventInfo) { + this.genericEventInfo = genericEventInfo; + } + GenericEventHandlerOperational.prototype.add = function (callback) { + var _this = this; + var eventRegistered = undefined; + var promise = CoreUtility.createPromise(function (resolve) { + eventRegistered = resolve; + }); + var addCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.add(callback); + eventRegistered(); + }; + this.register(); + this.createTrace(addCallback); + return promise; + }; + GenericEventHandlerOperational.prototype.remove = function (callback) { + var _this = this; + var removeCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.remove(callback); + }; + this.register(); + this.createTrace(removeCallback); + }; + GenericEventHandlerOperational.prototype.removeAll = function () { + var _this = this; + var removeAllCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.removeAll(); + }; + this.unregister(); + this.createTrace(removeAllCallback); + }; + GenericEventHandlerOperational.prototype.createTrace = function (callback) { + OperationalApiHelper.createTraceAction(this.genericEventInfo.object._context, callback); + }; + GenericEventHandlerOperational.prototype.register = function () { + var operationType = 0; + var args = []; + var flags = 0; + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.register, operationType, args, flags); + if (!GenericEventRegistration.getGenericEventRegistration('').isReady) { + GenericEventRegistration.getGenericEventRegistration('').ready(); + } + }; + GenericEventHandlerOperational.prototype.unregister = function () { + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.unregister); + }; + return GenericEventHandlerOperational; + }()); + OfficeExtension_1.GenericEventHandlerOperational = GenericEventHandlerOperational; + var EventHelper = (function () { + function EventHelper() { + } + EventHelper.invokeOn = function (eventHandler, callback, options) { + var promiseResolve = undefined; + var promise = CoreUtility.createPromise(function (resolve, reject) { + promiseResolve = resolve; + }); + eventHandler.add(callback).then(function () { + promiseResolve({}); + }); + return promise; + }; + EventHelper.invokeOff = function (genericEventHandlersOpObj, eventHandler, eventName, callback) { + if (!eventName && !callback) { + var allGenericEventHandlersOp = Object.keys(genericEventHandlersOpObj).map(function (eventName) { return genericEventHandlersOpObj[eventName]; }); + return EventHelper.invokeAllOff(allGenericEventHandlersOp); + } + if (!eventName) { + return CoreUtility._createPromiseFromException(eventName + " must be supplied if handler is supplied."); + } + if (callback) { + eventHandler.remove(callback); + } + else { + eventHandler.removeAll(); + } + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + EventHelper.invokeAllOff = function (allGenericEventHandlersOperational) { + allGenericEventHandlersOperational.forEach(function (genericEventHandlerOperational) { + genericEventHandlerOperational.removeAll(); + }); + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + return EventHelper; + }()); + OfficeExtension_1.EventHelper = EventHelper; + var ErrorCodes = (function (_super) { + __extends(ErrorCodes, _super); + function ErrorCodes() { + return _super !== null && _super.apply(this, arguments) || this; + } + ErrorCodes.propertyNotLoaded = 'PropertyNotLoaded'; + ErrorCodes.runMustReturnPromise = 'RunMustReturnPromise'; + ErrorCodes.cannotRegisterEvent = 'CannotRegisterEvent'; + ErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + ErrorCodes.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ErrorCodes; + }(CoreErrorCodes)); + OfficeExtension_1.ErrorCodes = ErrorCodes; + var TraceMarkerActionResultHandler = (function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback = callback; + } + TraceMarkerActionResultHandler.prototype._handleResult = function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); + var ActionFactory = (function (_super) { + __extends(ActionFactory, _super); + function ActionFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + ActionFactory.createMethodAction = function (context, parent, methodName, operationType, args, flags) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var fixedFlags = Utility._fixupApiFlags(flags); + var action = new Action(actionInfo, operationType, fixedFlags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + parent._addAction(action); + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (fixedFlags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + Arguments: args, + ObjectId: '', + ObjectType: '' + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return action; + }; + ActionFactory.createRecursiveQueryAction = function (context, parent, query) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 6, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + RecursiveQueryInfo: query + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createEnsureUnchangedAction = function (context, parent, objectState) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 8, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createInstantiateAction = function (context, obj) { + Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); + var actionInfo = { + Id: context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: obj._objectPath.objectPathInfo.Id + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = obj._objectPath; + obj._addAction(action, new InstantiateActionResultHandler(obj), true); + return action; + }; + ActionFactory.createTraceAction = function (context, message, addTraceMessage) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var ret = new Action(actionInfo, 1, 4); + context._pendingRequest.addAction(ret); + if (addTraceMessage) { + context._pendingRequest.addTrace(actionInfo.Id, message); + } + return ret; + }; + ActionFactory.createTraceMarkerForCallback = function (context, callback) { + var action = ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; + return ActionFactory; + }(CommonActionFactory)); + OfficeExtension_1.ActionFactory = ActionFactory; + var ClientObject = (function (_super) { + __extends(ClientObject, _super); + function ClientObject(context, objectPath) { + var _this = _super.call(this, context, objectPath) || this; + Utility.checkArgumentNull(context, 'context'); + _this.m_context = context; + if (_this._objectPath) { + if (!context._processingResult && context._pendingRequest) { + ActionFactory.createInstantiateAction(context, _this); + if (context._autoCleanup && _this._KeepReference) { + context.trackedObjects._autoAdd(_this); + } + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo && _this._objectPath.objectPathInfo && _this._className) { + _this._objectPath.objectPathInfo.T = _this._className; + } + } + return _this; + } + Object.defineProperty(ClientObject.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNull", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNull', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNullObject", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNullObject', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "_isNull", { + get: function () { + return this.m_isNull; + }, + set: function (value) { + this.m_isNull = value; + if (value && this._objectPath) { + this._objectPath._updateAsNullObject(); + } + }, + enumerable: true, + configurable: true + }); + ClientObject.prototype._addAction = function (action, resultHandler, isInstantiationEnsured) { + if (resultHandler === void 0) { + resultHandler = null; + } + if (!isInstantiationEnsured) { + this.context._pendingRequest.ensureInstantiateObjectPath(this._objectPath); + this.context._pendingRequest.ensureInstantiateObjectPaths(action.referencedArgumentObjectPaths); + } + this.context._pendingRequest.addAction(action); + this.context._pendingRequest.addReferencedObjectPath(this._objectPath); + this.context._pendingRequest.addReferencedObjectPaths(action.referencedArgumentObjectPaths); + this.context._pendingRequest.addActionResultHandler(action, resultHandler); + return CoreUtility._createPromiseFromResult(null); + }; + ClientObject.prototype._addPreviewExecutionAction = function (action) { + if (!Utility.isUndefined(this._className)) { + action.ObjectType = this._className; + var objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idLowerCase); + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idPrivate); + } + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.previewExecutionObjectId); + } + action.ObjectId = objectId; + this.context._pendingRequest.addPreviewExecutionAction(action); + } + }; + ClientObject.prototype._handleResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleIdResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + Utility.fixObjectPathIfNecessary(this, value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleRetrieveResult = function (value, result) { + this._handleIdResult(value); + }; + ClientObject.prototype._recursivelySet = function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { + var isClientObject = input instanceof ClientObject; + var originalInput = input; + if (isClientObject) { + if (Object.getPrototypeOf(this) === Object.getPrototypeOf(input)) { + input = JSON.parse(JSON.stringify(input)); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'properties', + errorLocation: this._className + '.set' + }); + } + } + try { + var prop; + for (var i = 0; i < scalarWriteablePropertyNames.length; i++) { + prop = scalarWriteablePropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + this[prop] = input[prop]; + } + } + } + for (var i = 0; i < objectPropertyNames.length; i++) { + prop = objectPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + var dataToPassToSet = isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } + } + } + var throwOnReadOnly = !isClientObject; + if (options && !Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly = options.throwOnReadOnly; + } + for (var i = 0; i < notAllowedToBeSetPropertyNames.length; i++) { + prop = notAllowedToBeSetPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined' && throwOnReadOnly) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + for (prop in input) { + if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); + if (!propertyDescriptor) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, prop), + debugInfo: { + errorLocation: prop + } + }); + } + if (throwOnReadOnly && !propertyDescriptor.set) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.set' + }, + innerError: innerError + }); + } + }; + return ClientObject; + }(ClientObjectBase)); + OfficeExtension_1.ClientObject = ClientObject; + var HostBridgeRequestExecutor = (function () { + function HostBridgeRequestExecutor(session) { + this.m_session = session; + } + HostBridgeRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var httpRequestInfo = { + url: CoreConstants.processQuery, + method: 'POST', + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var controlId = ''; + if (requestMessage.Headers) { + controlId = requestMessage.Headers[Constants.officeControlId]; + } + var message = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + controlId: controlId, + message: httpRequestInfo + }; + CoreUtility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message).then(function (nativeBridgeResponse) { + CoreUtility.log('Received response: ' + JSON.stringify(nativeBridgeResponse)); + var responseInfo = nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession = (function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(m_bridge) { + var _this = _super.call(this) || this; + _this.m_bridge = m_bridge; + _this.m_bridge.addHostMessageHandler(function (message) { + if (message.type === 3) { + var controlId = message.controlId; + if (CoreUtility.isNullOrEmptyString(controlId)) { + GenericEventRegistration.getGenericEventRegistration(controlId)._handleRichApiMessage(message.message); + } + else { + var eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(controlId); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(''); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + } + } + }); + return _this; + } + HostBridgeSession.getInstanceIfHostBridgeInited = function () { + if (HostBridge.instance) { + if (CoreUtility.isNullOrUndefined(HostBridgeSession.s_instance) || + HostBridgeSession.s_instance.m_bridge !== HostBridge.instance) { + HostBridgeSession.s_instance = new HostBridgeSession(HostBridge.instance); + } + return HostBridgeSession.s_instance; + } + return null; + }; + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull = function () { + CoreUtility.log('NativeBridgeSession::CreateRequestExecutor'); + return new HostBridgeRequestExecutor(this); + }; + HostBridgeSession.prototype.getEventRegistration = function (controlId) { + return GenericEventRegistration.getGenericEventRegistration(controlId); + }; + HostBridgeSession.prototype.sendMessageToHost = function (message) { + return this.m_bridge.sendMessageToHostAndExpectResponse(message); + }; + return HostBridgeSession; + }(SessionBase)); + OfficeExtension_1.HostBridgeSession = HostBridgeSession; + var ClientRequestContext = (function (_super) { + __extends(ClientRequestContext, _super); + function ClientRequestContext(url) { + var _this = _super.call(this) || this; + _this.m_customRequestHeaders = {}; + _this.m_batchMode = 0; + _this._onRunFinishedNotifiers = []; + if (SessionBase._overrideSession) { + _this.m_requestUrlAndHeaderInfoResolver = SessionBase._overrideSession; + } + else { + if (Utility.isNullOrUndefined(url) || (typeof url === 'string' && url.length === 0)) { + url = ClientRequestContext.defaultRequestUrlAndHeaders; + if (!url) { + url = { url: CoreConstants.localDocument, headers: {} }; + } + } + if (typeof url === 'string') { + _this.m_requestUrlAndHeaderInfo = { url: url, headers: {} }; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfoResolver(url)) { + _this.m_requestUrlAndHeaderInfoResolver = url; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfo(url)) { + var requestInfo = url; + _this.m_requestUrlAndHeaderInfo = { url: requestInfo.url, headers: {} }; + CoreUtility._copyHeaders(requestInfo.headers, _this.m_requestUrlAndHeaderInfo.headers); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'url' }); + } + } + if (!_this.m_requestUrlAndHeaderInfoResolver && + _this.m_requestUrlAndHeaderInfo && + CoreUtility._isLocalDocumentUrl(_this.m_requestUrlAndHeaderInfo.url) && + HostBridgeSession.getInstanceIfHostBridgeInited()) { + _this.m_requestUrlAndHeaderInfo = null; + _this.m_requestUrlAndHeaderInfoResolver = HostBridgeSession.getInstanceIfHostBridgeInited(); + } + if (_this.m_requestUrlAndHeaderInfoResolver instanceof SessionBase) { + _this.m_session = _this.m_requestUrlAndHeaderInfoResolver; + } + _this._processingResult = false; + _this._customData = Constants.iterativeExecutor; + _this.sync = _this.sync.bind(_this); + return _this; + } + Object.defineProperty(ClientRequestContext.prototype, "session", { + get: function () { + return this.m_session; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "eventRegistration", { + get: function () { + if (this.m_session) { + return this.m_session.getEventRegistration(this._controlId); + } + return _Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_url", { + get: function () { + if (this.m_requestUrlAndHeaderInfo) { + return this.m_requestUrlAndHeaderInfo.url; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_pendingRequest", { + get: function () { + if (this.m_pendingRequest == null) { + this.m_pendingRequest = new ClientRequest(this); + } + return this.m_pendingRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_controlId", { + get: function () { + var ret = this.m_customRequestHeaders[Constants.officeControlId]; + if (CoreUtility.isNullOrUndefined(ret)) { + ret = ''; + } + return ret; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension_1._internalConfig.showDisposeInfoInDebugInfo); + var statements = prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { + get: function () { + if (!this.m_trackedObjects) { + this.m_trackedObjects = new TrackedObjects(this); + } + return this.m_trackedObjects; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "requestHeaders", { + get: function () { + return this.m_customRequestHeaders; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "batchMode", { + get: function () { + return this.m_batchMode; + }, + enumerable: true, + configurable: true + }); + ClientRequestContext.prototype.ensureInProgressBatchIfBatchMode = function () { + if (this.m_batchMode === 1 && !this.m_explicitBatchInProgress) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.notInsideBatch), null); + } + }; + ClientRequestContext.prototype.load = function (clientObj, option) { + Utility.validateContext(this, clientObj); + var queryOption = ClientRequestContext._parseQueryOption(option); + CommonActionFactory.createQueryAction(this, clientObj, queryOption, clientObj); + }; + ClientRequestContext.prototype.loadRecursive = function (clientObj, options, maxDepth) { + if (!Utility.isPlainJsonObject(options)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'options' }); + } + var quries = {}; + for (var key in options) { + quries[key] = ClientRequestContext._parseQueryOption(options[key]); + } + var action = ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); + this._pendingRequest.addActionResultHandler(action, clientObj); + }; + ClientRequestContext.prototype.trace = function (message) { + ActionFactory.createTraceAction(this, message, true); + }; + ClientRequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { }; + ClientRequestContext.prototype.ensureRequestUrlAndHeaderInfo = function () { + var _this = this; + return Utility._createPromiseFromResult(null).then(function () { + if (!_this.m_requestUrlAndHeaderInfo) { + return _this.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function (value) { + _this.m_requestUrlAndHeaderInfo = value; + if (!_this.m_requestUrlAndHeaderInfo) { + _this.m_requestUrlAndHeaderInfo = { url: CoreConstants.localDocument, headers: {} }; + } + if (Utility.isNullOrEmptyString(_this.m_requestUrlAndHeaderInfo.url)) { + _this.m_requestUrlAndHeaderInfo.url = CoreConstants.localDocument; + } + if (!_this.m_requestUrlAndHeaderInfo.headers) { + _this.m_requestUrlAndHeaderInfo.headers = {}; + } + if (typeof _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull === 'function') { + var executor = _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull(); + if (executor) { + _this._requestExecutor = executor; + } + } + }); + } + }); + }; + ClientRequestContext.prototype.syncPrivateMain = function () { + var _this = this; + return this.ensureRequestUrlAndHeaderInfo().then(function () { + var req = _this._pendingRequest; + _this.m_pendingRequest = null; + return _this.processPreSyncPromises(req).then(function () { return _this.syncPrivate(req); }); + }); + }; + ClientRequestContext.prototype.syncPrivate = function (req) { + var _this = this; + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(null); + } + if (!req.hasActions) { + return this.processPendingEventHandlers(req); + } + var _a = req.buildRequestMessageBodyAndRequestFlags(), msgBody = _a.body, requestFlags = _a.flags; + if (this._requestFlagModifier) { + requestFlags |= this._requestFlagModifier; + } + if (!this._requestExecutor) { + if (CoreUtility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + this._requestExecutor = new OfficeJsRequestExecutor(this); + } + else { + this._requestExecutor = new HttpRequestExecutor(); + } + } + var requestExecutor = this._requestExecutor; + var headers = {}; + CoreUtility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + CoreUtility._copyHeaders(this.m_customRequestHeaders, headers); + delete this.m_customRequestHeaders[Constants.officeScriptEventId]; + var testNameWithSequenceId = TestUtility._getCurrentTestNameWithSequenceId(); + if (testNameWithSequenceId) { + headers[CoreConstants.testRequestNameHeader] = testNameWithSequenceId; + } + var requestExecutorRequestMessage = { + Url: this.m_requestUrlAndHeaderInfo.url, + Headers: headers, + Body: msgBody + }; + req.invalidatePendingInvalidObjectPaths(); + var errorFromResponse = null; + var errorFromProcessEventHandlers = null; + this._lastSyncStart = typeof performance === 'undefined' ? Date.now() : performance.now(); + this._lastRequestFlags = requestFlags; + return requestExecutor + .executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) + .then(function (response) { + _this._lastSyncEnd = typeof performance === 'undefined' ? Date.now() : performance.now(); + if (OfficeExtension_1.config.executePerfLogFunc) { + OfficeExtension_1.config.executePerfLogFunc({ syncStart: _this._lastSyncStart, + syncEnd: _this._lastSyncEnd + }); + } + errorFromResponse = _this.processRequestExecutorResponseMessage(req, response); + return _this.processPendingEventHandlers(req)["catch"](function (ex) { + CoreUtility.log('Error in processPendingEventHandlers'); + CoreUtility.log(JSON.stringify(ex)); + errorFromProcessEventHandlers = ex; + }); + }) + .then(function () { + if (errorFromResponse) { + CoreUtility.log('Throw error from response: ' + JSON.stringify(errorFromResponse)); + throw errorFromResponse; + } + if (errorFromProcessEventHandlers) { + CoreUtility.log('Throw error from ProcessEventHandler: ' + JSON.stringify(errorFromProcessEventHandlers)); + var transformedError = null; + if (errorFromProcessEventHandlers instanceof _Internal.RuntimeError) { + transformedError = errorFromProcessEventHandlers; + transformedError.traceMessages = req._responseTraceMessages; + } + else { + var message = null; + if (typeof errorFromProcessEventHandlers === 'string') { + message = errorFromProcessEventHandlers; + } + else { + message = errorFromProcessEventHandlers.message; + } + if (Utility.isNullOrEmptyString(message)) { + message = CoreUtility._getResourceString(ResourceStrings.cannotRegisterEvent); + } + transformedError = new _Internal.RuntimeError({ + code: ErrorCodes.cannotRegisterEvent, + httpStatusCode: 400, + message: message, + traceMessages: req._responseTraceMessages + }); + } + throw transformedError; + } + }); + }; + ClientRequestContext.prototype.processRequestExecutorResponseMessage = function (req, response) { + if (response.Body && response.Body.TraceIds) { + req._setResponseTraceIds(response.Body.TraceIds); + } + var traceMessages = req._responseTraceMessages; + var errorStatementInfo = null; + if (response.Body) { + if (response.Body.Error && response.Body.Error.ActionIndex >= 0) { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, true); + var debugInfoStatementInfo = prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + errorStatementInfo = { + statement: debugInfoStatementInfo.statement, + surroundingStatements: debugInfoStatementInfo.surroundingStatements, + fullStatements: ['Please enable config.extendedErrorLogging to see full statements.'] + }; + if (OfficeExtension_1.config.extendedErrorLogging) { + prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, false); + errorStatementInfo.fullStatements = prettyPrinter.process(); + } + } + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (actionResults) { + this._processingResult = true; + try { + req.processResponse(actionResults); + } + finally { + this._processingResult = false; + } + } + } + if (!Utility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage, + traceMessages: traceMessages, + data: { responseBody: response.RawErrorResponseBody } + }); + } + else if (response.Body && response.Body.Error) { + var debugInfo = { + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement = errorStatementInfo.statement; + debugInfo.surroundingStatements = errorStatementInfo.surroundingStatements; + debugInfo.fullStatements = errorStatementInfo.fullStatements; + } + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message, + traceMessages: traceMessages, + debugInfo: debugInfo + }); + } + return null; + }; + ClientRequestContext.prototype.processPendingEventHandlers = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._pendingProcessEventHandlers.length; i++) { + var eventHandlers = req._pendingProcessEventHandlers[i]; + ret = ret.then(this.createProcessOneEventHandlersFunc(eventHandlers, req)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneEventHandlersFunc = function (eventHandlers, req) { + return function () { return eventHandlers._processRegistration(req); }; + }; + ClientRequestContext.prototype.processPreSyncPromises = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._preSyncPromises.length; i++) { + var p = req._preSyncPromises[i]; + ret = ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc = function (p) { + return function () { return p; }; + }; + ClientRequestContext.prototype.sync = function (passThroughValue) { + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(passThroughValue); + } + return this.syncPrivateMain().then(function () { return passThroughValue; }); + }; + ClientRequestContext.prototype.batch = function (batchBody) { + var _this = this; + if (this.m_batchMode !== 1) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, null, null)); + } + if (this.m_explicitBatchInProgress) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.pendingBatchInProgress), null)); + } + if (Utility.isNullOrUndefined(batchBody)) { + return Utility._createPromiseFromResult(null); + } + this.m_explicitBatchInProgress = true; + var previousRequest = this.m_pendingRequest; + this.m_pendingRequest = new ClientRequest(this); + var batchBodyResult; + try { + batchBodyResult = batchBody(this._rootObject, this); + } + catch (ex) { + this.m_explicitBatchInProgress = false; + this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + } + var request; + var batchBodyResultPromise; + if (typeof batchBodyResult === 'object' && batchBodyResult && typeof batchBodyResult.then === 'function') { + batchBodyResultPromise = Utility._createPromiseFromResult(null) + .then(function () { + return batchBodyResult; + }) + .then(function (result) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return result; + })["catch"](function (ex) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + }); + } + else { + this.m_explicitBatchInProgress = false; + request = this.m_pendingRequest; + this.m_pendingRequest = previousRequest; + batchBodyResultPromise = Utility._createPromiseFromResult(batchBodyResult); + } + return batchBodyResultPromise.then(function (result) { + return _this.ensureRequestUrlAndHeaderInfo() + .then(function () { + return _this.syncPrivate(request); + }) + .then(function () { + return result; + }); + }); + }; + ClientRequestContext._run = function (ctxInitializer, runBody, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runCommon('run', null, ctxInitializer, 0, runBody, numCleanupAttempts, retryDelay, null, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.isValidRequestInfo = function (value) { + return (typeof value === 'string' || + ClientRequestContext.isRequestUrlAndHeaderInfo(value) || + ClientRequestContext.isRequestUrlAndHeaderInfoResolver(value)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfo = function (value) { + return (typeof value === 'object' && + value !== null && + Object.getPrototypeOf(value) === Object.getPrototypeOf({}) && + !Utility.isNullOrUndefined(value.url)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfoResolver = function (value) { + return typeof value === 'object' && value !== null && typeof value._resolveRequestUrlAndHeaderInfo === 'function'; + }; + ClientRequestContext._runBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(0, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runExplicitBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(1, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runBatchCommon = function (batchMode, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + var ctxRetriever; + var batch; + var requestInfo = null; + var previousObjects = null; + var argOffset = 0; + var options = null; + if (receivedRunArgs.length > 0) { + if (ClientRequestContext.isValidRequestInfo(receivedRunArgs[0])) { + requestInfo = receivedRunArgs[0]; + argOffset = 1; + } + else if (Utility.isPlainJsonObject(receivedRunArgs[0])) { + options = receivedRunArgs[0]; + requestInfo = options.session; + if (requestInfo != null && !ClientRequestContext.isValidRequestInfo(requestInfo)) { + return ClientRequestContext.createErrorPromise(functionName); + } + previousObjects = options.previousObjects; + argOffset = 1; + } + } + if (receivedRunArgs.length == argOffset + 1) { + batch = receivedRunArgs[argOffset + 0]; + } + else if (options == null && receivedRunArgs.length == argOffset + 2) { + previousObjects = receivedRunArgs[argOffset + 0]; + batch = receivedRunArgs[argOffset + 1]; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + if (previousObjects != null) { + if (previousObjects instanceof ClientObject) { + ctxRetriever = function () { return previousObjects.context; }; + } + else if (previousObjects instanceof ClientRequestContext) { + ctxRetriever = function () { return previousObjects; }; + } + else if (Array.isArray(previousObjects)) { + var array = previousObjects; + if (array.length == 0) { + return ClientRequestContext.createErrorPromise(functionName); + } + for (var i = 0; i < array.length; i++) { + if (!(array[i] instanceof ClientObject)) { + return ClientRequestContext.createErrorPromise(functionName); + } + if (array[i].context != array[0].context) { + return ClientRequestContext.createErrorPromise(functionName, ResourceStrings.invalidRequestContext); + } + } + ctxRetriever = function () { return array[0].context; }; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + } + else { + ctxRetriever = ctxInitializer; + } + var onBeforeRunWithOptions = null; + if (onBeforeRun) { + onBeforeRunWithOptions = function (context) { return onBeforeRun(options || {}, context); }; + } + return ClientRequestContext._runCommon(functionName, requestInfo, ctxRetriever, batchMode, batch, numCleanupAttempts, retryDelay, onBeforeRunWithOptions, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.createErrorPromise = function (functionName, code) { + if (code === void 0) { + code = CoreResourceStrings.invalidArgument; + } + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(code, CoreUtility._getResourceString(code), functionName)); + }; + ClientRequestContext._runCommon = function (functionName, requestInfo, ctxRetriever, batchMode, runBody, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (SessionBase._overrideSession) { + requestInfo = SessionBase._overrideSession; + } + var starterPromise = CoreUtility.createPromise(function (resolve, reject) { + resolve(); + }); + var ctx; + var succeeded = false; + var resultOrError; + var previousBatchMode; + return starterPromise + .then(function () { + ctx = ctxRetriever(requestInfo); + if (ctx._autoCleanup) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + ctx._onRunFinishedNotifiers.push(function () { + ctx._autoCleanup = true; + resolve(); + }); + }); + } + else { + ctx._autoCleanup = true; + } + }) + .then(function () { + if (typeof runBody !== 'function') { + return ClientRequestContext.createErrorPromise(functionName); + } + previousBatchMode = ctx.m_batchMode; + ctx.m_batchMode = batchMode; + if (onBeforeRun) { + onBeforeRun(ctx); + } + var runBodyResult; + if (batchMode == 1) { + runBodyResult = runBody(ctx.batch.bind(ctx)); + } + else { + runBodyResult = runBody(ctx); + } + if (Utility.isNullOrUndefined(runBodyResult) || typeof runBodyResult.then !== 'function') { + Utility.throwError(ResourceStrings.runMustReturnPromise); + } + return runBodyResult; + }) + .then(function (runBodyResult) { + if (batchMode === 1) { + return runBodyResult; + } + else { + return ctx.sync(runBodyResult); + } + }) + .then(function (result) { + succeeded = true; + resultOrError = result; + })["catch"](function (error) { + resultOrError = error; + }) + .then(function () { + var itemsToRemove = ctx.trackedObjects._retrieveAndClearAutoCleanupList(); + ctx._autoCleanup = false; + ctx.m_batchMode = previousBatchMode; + for (var key in itemsToRemove) { + itemsToRemove[key]._objectPath.isValid = false; + } + var cleanupCounter = 0; + if (Utility._synchronousCleanup || ClientRequestContext.isRequestUrlAndHeaderInfoResolver(requestInfo)) { + return attemptCleanup(); + } + else { + attemptCleanup(); + } + function attemptCleanup() { + cleanupCounter++; + var savedPendingRequest = ctx.m_pendingRequest; + var savedBatchMode = ctx.m_batchMode; + var request = new ClientRequest(ctx); + ctx.m_pendingRequest = request; + ctx.m_batchMode = 0; + try { + for (var key in itemsToRemove) { + ctx.trackedObjects.remove(itemsToRemove[key]); + } + } + finally { + ctx.m_batchMode = savedBatchMode; + ctx.m_pendingRequest = savedPendingRequest; + } + return ctx + .syncPrivate(request) + .then(function () { + if (onCleanupSuccess) { + onCleanupSuccess(cleanupCounter); + } + })["catch"](function () { + if (onCleanupFailure) { + onCleanupFailure(cleanupCounter); + } + if (cleanupCounter < numCleanupAttempts) { + setTimeout(function () { + attemptCleanup(); + }, retryDelay); + } + }); + } + }) + .then(function () { + if (ctx._onRunFinishedNotifiers && ctx._onRunFinishedNotifiers.length > 0) { + var func = ctx._onRunFinishedNotifiers.shift(); + func(); + } + if (succeeded) { + return resultOrError; + } + else { + throw resultOrError; + } + }); + }; + return ClientRequestContext; + }(ClientRequestContextBase)); + OfficeExtension_1.ClientRequestContext = ClientRequestContext; + var RetrieveResultImpl = (function () { + function RetrieveResultImpl(m_proxy, m_shouldPolyfill) { + this.m_proxy = m_proxy; + this.m_shouldPolyfill = m_shouldPolyfill; + var scalarPropertyNames = m_proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = m_proxy[Constants.navigationPropertyNames]; + var typeName = m_proxy[Constants.className]; + var isCollection = m_proxy[Constants.isCollection]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, scalarPropertyNames[i]); + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, navigationPropertyNames[i]); + } + } + if (isCollection) { + Utility.definePropertyThrowUnloadedException(this, typeName, Constants.itemsLowerCase); + } + } + Object.defineProperty(RetrieveResultImpl.prototype, "$proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResultImpl.prototype, "$isNullObject", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: ErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'retrieveResult.$isNullObject' + } + }); + } + return this.m_isNullObject; + }, + enumerable: true, + configurable: true + }); + RetrieveResultImpl.prototype.toJSON = function () { + if (!this.m_isLoaded) { + return undefined; + } + if (this.m_isNullObject) { + return null; + } + if (Utility.isUndefined(this.m_json)) { + this.m_json = Utility.purifyJson(this.m_value); + } + return this.m_json; + }; + RetrieveResultImpl.prototype.toString = function () { + return JSON.stringify(this.toJSON()); + }; + RetrieveResultImpl.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (value === null || (typeof value === 'object' && value && value._IsNull)) { + this.m_isNullObject = true; + value = null; + } + else { + this.m_isNullObject = false; + } + if (this.m_shouldPolyfill) { + value = Utility.changePropertyNameToCamelLowerCase(value); + } + this.m_value = value; + this.m_proxy._handleRetrieveResult(value, this); + }; + return RetrieveResultImpl; + }()); + var Constants = (function (_super) { + __extends(Constants, _super); + function Constants() { + return _super !== null && _super.apply(this, arguments) || this; + } + Constants.getItemAt = 'GetItemAt'; + Constants.index = '_Index'; + Constants.iterativeExecutor = 'IterativeExecutor'; + Constants.isTracked = '_IsTracked'; + Constants.eventMessageCategory = 65536; + Constants.eventWorkbookId = 'Workbook'; + Constants.eventSourceRemote = 'Remote'; + Constants.proxy = '$proxy'; + Constants.className = '_className'; + Constants.isCollection = '_isCollection'; + Constants.collectionPropertyPath = '_collectionPropertyPath'; + Constants.objectPathInfoDoNotKeepReferenceFieldName = 'D'; + Constants.officeScriptEventId = 'X-OfficeScriptEventId'; + Constants.officeScriptFireRecordingEvent = 'X-OfficeScriptFireRecordingEvent'; + Constants.officeControlId = 'X-OfficeControlId'; + return Constants; + }(CommonConstants)); + OfficeExtension_1.Constants = Constants; + var ClientRequest = (function (_super) { + __extends(ClientRequest, _super); + function ClientRequest(context) { + var _this = _super.call(this, context) || this; + _this.m_context = context; + _this.m_pendingProcessEventHandlers = []; + _this.m_pendingEventHandlerActions = {}; + _this.m_traceInfos = {}; + _this.m_responseTraceIds = {}; + _this.m_responseTraceMessages = []; + return _this; + } + Object.defineProperty(ClientRequest.prototype, "traceInfos", { + get: function () { + return this.m_traceInfos; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceMessages", { + get: function () { + return this.m_responseTraceMessages; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceIds", { + get: function () { + return this.m_responseTraceIds; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._setResponseTraceIds = function (value) { + if (value) { + for (var i = 0; i < value.length; i++) { + var traceId = value[i]; + this.m_responseTraceIds[traceId] = traceId; + var message = this.m_traceInfos[traceId]; + if (!CoreUtility.isNullOrUndefined(message)) { + this.m_responseTraceMessages.push(message); + } + } + } + }; + ClientRequest.prototype.addTrace = function (actionId, message) { + this.m_traceInfos[actionId] = message; + }; + ClientRequest.prototype._addPendingEventHandlerAction = function (eventHandlers, action) { + if (!this.m_pendingEventHandlerActions[eventHandlers._id]) { + this.m_pendingEventHandlerActions[eventHandlers._id] = []; + this.m_pendingProcessEventHandlers.push(eventHandlers); + } + this.m_pendingEventHandlerActions[eventHandlers._id].push(action); + }; + Object.defineProperty(ClientRequest.prototype, "_pendingProcessEventHandlers", { + get: function () { + return this.m_pendingProcessEventHandlers; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._getPendingEventHandlerActions = function (eventHandlers) { + return this.m_pendingEventHandlerActions[eventHandlers._id]; + }; + return ClientRequest; + }(ClientRequestBase)); + OfficeExtension_1.ClientRequest = ClientRequest; + var EventHandlers = (function () { + function EventHandlers(context, parentObject, name, eventInfo) { + var _this = this; + this.m_id = context._nextId(); + this.m_context = context; + this.m_name = name; + this.m_handlers = []; + this.m_registered = false; + this.m_eventInfo = eventInfo; + this.m_callback = function (args) { + _this.m_eventInfo.eventArgsTransformFunc(args).then(function (newArgs) { return _this.fireEvent(newArgs); }); + }; + } + Object.defineProperty(EventHandlers.prototype, "_registered", { + get: function () { + return this.m_registered; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_id", { + get: function () { + return this.m_id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_handlers", { + get: function () { + return this.m_handlers; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); + EventHandlers.prototype.add = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 0 + }); + return new EventHandlerResult(this.m_context, this, handler); + }; + EventHandlers.prototype.remove = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 1 + }); + }; + EventHandlers.prototype.removeAll = function () { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: null, + operation: 2 + }); + }; + EventHandlers.prototype._processRegistration = function (req) { + var _this = this; + var ret = CoreUtility._createPromiseFromResult(null); + var actions = req._getPendingEventHandlerActions(this); + if (!actions) { + return ret; + } + var handlersResult = []; + for (var i = 0; i < this.m_handlers.length; i++) { + handlersResult.push(this.m_handlers[i]); + } + var hasChange = false; + for (var i = 0; i < actions.length; i++) { + if (req._responseTraceIds[actions[i].id]) { + hasChange = true; + switch (actions[i].operation) { + case 0: + handlersResult.push(actions[i].handler); + break; + case 1: + for (var index = handlersResult.length - 1; index >= 0; index--) { + if (handlersResult[index] === actions[i].handler) { + handlersResult.splice(index, 1); + break; + } + } + break; + case 2: + handlersResult = []; + break; + } + } + } + if (hasChange) { + if (!this.m_registered && handlersResult.length > 0) { + ret = ret.then(function () { return _this.m_eventInfo.registerFunc(_this.m_callback); }).then(function () { return (_this.m_registered = true); }); + } + else if (this.m_registered && handlersResult.length == 0) { + ret = ret + .then(function () { return _this.m_eventInfo.unregisterFunc(_this.m_callback); })["catch"](function (ex) { + CoreUtility.log('Error when unregister event: ' + JSON.stringify(ex)); + }) + .then(function () { return (_this.m_registered = false); }); + } + ret = ret.then(function () { return (_this.m_handlers = handlersResult); }); + } + return ret; + }; + EventHandlers.prototype.fireEvent = function (args) { + var promises = []; + for (var i = 0; i < this.m_handlers.length; i++) { + var handler = this.m_handlers[i]; + var p = CoreUtility._createPromiseFromResult(null) + .then(this.createFireOneEventHandlerFunc(handler, args))["catch"](function (ex) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(ex)); + }); + promises.push(p); + } + CoreUtility.Promise.all(promises); + }; + EventHandlers.prototype.createFireOneEventHandlerFunc = function (handler, args) { + return function () { return handler(args); }; + }; + return EventHandlers; + }()); + OfficeExtension_1.EventHandlers = EventHandlers; + var EventHandlerResult = (function () { + function EventHandlerResult(context, handlers, handler) { + this.m_context = context; + this.m_allHandlers = handlers; + this.m_handler = handler; + } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + EventHandlerResult.prototype.remove = function () { + if (this.m_allHandlers && this.m_handler) { + this.m_allHandlers.remove(this.m_handler); + this.m_allHandlers = null; + this.m_handler = null; + } + }; + return EventHandlerResult; + }()); + OfficeExtension_1.EventHandlerResult = EventHandlerResult; + (function (_Internal) { + var OfficeJsEventRegistration = (function () { + function OfficeJsEventRegistration() { + } + OfficeJsEventRegistration.prototype.register = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingDataChanged, handler, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingSelectionChanged, handler, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); + }); + case 5: + return OSF.DDA.RichApi.richApiMessageManager.register(handler); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { id: targetId }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { id: targetId }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { id: targetId }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + OfficeJsEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingDataChanged, { handler: handler }, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingSelectionChanged, { handler: handler }, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); + }); + case 5: + return Utility.promisify(function (callback) { + return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync('richApiMessage', { handler: handler }, callback); + }); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { id: targetId, handler: handler }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { id: targetId, handler: handler }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { id: targetId, handler: handler }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + return OfficeJsEventRegistration; + }()); + _Internal.officeJsEventRegistration = new OfficeJsEventRegistration(); + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var EventRegistration = (function () { + function EventRegistration(registerEventImpl, unregisterEventImpl) { + this.m_handlersByEventByTarget = {}; + this.m_registerEventImpl = registerEventImpl; + this.m_unregisterEventImpl = unregisterEventImpl; + } + EventRegistration.getTargetIdOrDefault = function (targetId) { + if (Utility.isNullOrUndefined(targetId)) { + return ''; + } + return targetId; + }; + EventRegistration.prototype.getHandlers = function (eventId, targetId) { + targetId = EventRegistration.getTargetIdOrDefault(targetId); + var handlersById = this.m_handlersByEventByTarget[eventId]; + if (!handlersById) { + handlersById = {}; + this.m_handlersByEventByTarget[eventId] = handlersById; + } + var handlers = handlersById[targetId]; + if (!handlers) { + handlers = []; + handlersById[targetId] = handlers; + } + return handlers; + }; + EventRegistration.prototype.callHandlers = function (eventId, targetId, argument) { + var funcs = this.getHandlers(eventId, targetId); + for (var i = 0; i < funcs.length; i++) { + funcs[i](argument); + } + }; + EventRegistration.prototype.hasHandlers = function (eventId, targetId) { + return this.getHandlers(eventId, targetId).length > 0; + }; + EventRegistration.prototype.register = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + handlers.push(handler); + if (handlers.length === 1) { + return this.m_registerEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + EventRegistration.prototype.unregister = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length === 0) { + return this.m_unregisterEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + return EventRegistration; + }()); + OfficeExtension_1.EventRegistration = EventRegistration; + var GenericEventRegistration = (function () { + function GenericEventRegistration() { + this.m_eventRegistration = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler = this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready = function () { + var _this = this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready = GenericEventRegistration._testReadyImpl().then(function () { + _this.m_isReady = true; + }); + } + else if (HostBridge.instance) { + this.m_ready = Utility._createPromiseFromResult(null).then(function () { + _this.m_isReady = true; + }); + } + else { + this.m_ready = _Internal.officeJsEventRegistration + .register(5, '', this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady = true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage = function (msg) { + if (msg && msg.entries) { + for (var entryIndex = 0; entryIndex < msg.entries.length; entryIndex++) { + var entry = msg.entries[entryIndex]; + if (entry.messageCategory == Constants.eventMessageCategory) { + if (CoreUtility._logEnabled) { + CoreUtility.log(JSON.stringify(entry)); + } + var eventId = entry.messageType; + var targetId = entry.targetId; + var hasHandlers = this.m_eventRegistration.hasHandlers(eventId, targetId); + if (hasHandlers) { + var arg = JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source = Constants.eventSourceRemote; + } + this.m_eventRegistration.callHandlers(eventId, targetId, arg); + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + if (!ret) { + ret = new GenericEventRegistration(); + GenericEventRegistration.s_genericEventRegistrations[controlId] = ret; + } + return ret; + }; + GenericEventRegistration.peekGenericEventRegistrationOrNull = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + return ret; + }; + GenericEventRegistration.richApiMessageEventCategory = 65536; + GenericEventRegistration.s_genericEventRegistrations = {}; + return GenericEventRegistration; + }()); + OfficeExtension_1.GenericEventRegistration = GenericEventRegistration; + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl = impl; + } + OfficeExtension_1._testSetRichApiMessageReadyImpl = _testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration('')._handleRichApiMessage(msg); + } + OfficeExtension_1._testTriggerRichApiMessageEvent = _testTriggerRichApiMessageEvent; + var GenericEventHandlers = (function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + var _this = _super.call(this, context, parentObject, name, eventInfo) || this; + _this.m_genericEventInfo = eventInfo; + return _this; + } + GenericEventHandlers.prototype.add = function (handler) { + var _this = this; + if (this._handlers.length == 0 && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + var controlId = this._context._controlId; + if (!GenericEventRegistration.getGenericEventRegistration(controlId).isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration(controlId).ready()); + } + ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length == 1) { + GenericEventRegistration.getGenericEventRegistration(controlId).register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove = function (handler) { + var _this = this; + if (this._handlers.length == 1 && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + var controlId = this._context._controlId; + ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers = _this._handlers; + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length == 0) { + GenericEventRegistration.getGenericEventRegistration(controlId).unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll = function () { }; + return GenericEventHandlers; + }(EventHandlers)); + OfficeExtension_1.GenericEventHandlers = GenericEventHandlers; + var InstantiateActionResultHandler = (function () { + function InstantiateActionResultHandler(clientObject) { + this.m_clientObject = clientObject; + } + InstantiateActionResultHandler.prototype._handleResult = function (value) { + this.m_clientObject._handleIdResult(value); + }; + return InstantiateActionResultHandler; + }()); + var ObjectPathFactory = (function () { + function ObjectPathFactory() { + } + ObjectPathFactory.createGlobalObjectObjectPath = function (context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + return new ObjectPath(objectPathInfo, null, false, false, 1, 4); + }; + ObjectPathFactory.createNewObjectObjectPath = function (context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var ret = new ObjectPath(objectPathInfo, null, isCollection, false, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createPropertyObjectPath = function (context, parent, propertyName, isCollection, isInvalidAfterRequest, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createIndexerObjectPath = function (context, parent, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createIndexerObjectPathUsingParentPath = function (context, parentObjectPath, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parentObjectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parentObjectPath, false, false, 1, 4); + }; + ObjectPathFactory.createMethodObjectPath = function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = Utility.setMethodArguments(context, objectPathInfo.ArgumentInfo, args); + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, Utility._fixupApiFlags(flags)); + ret.argumentObjectPaths = argumentObjectPaths; + ret.getByIdMethodName = getByIdMethodName; + return ret; + }; + ObjectPathFactory.createReferenceIdObjectPath = function (context, referenceId) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + var ret = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return ret; + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt = function (hasIndexerMethod, context, parent, childItem, index) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + if (hasIndexerMethod && !Utility.isNullOrUndefined(id)) { + return ObjectPathFactory.createChildItemObjectPathUsingIndexer(context, parent, childItem); + } + else { + return ObjectPathFactory.createChildItemObjectPathUsingGetItemAt(context, parent, childItem, index); + } + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexer = function (context, parent, childItem) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + var objectPathInfo = (objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }); + objectPathInfo.ArgumentInfo.Arguments = [id]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createChildItemObjectPathUsingGetItemAt = function (context, parent, childItem, index) { + var indexFromServer = childItem[Constants.index]; + if (indexFromServer) { + index = indexFromServer; + } + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: Constants.getItemAt, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = [index]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + return ObjectPathFactory; + }()); + OfficeExtension_1.ObjectPathFactory = ObjectPathFactory; + var OfficeJsRequestExecutor = (function () { + function OfficeJsRequestExecutor(context) { + this.m_context = context; + } + OfficeJsRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); + return new OfficeExtension_1.Promise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (result.status == 'succeeded') { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBody(result), RichApiMessageUtility.getResponseHeaders(result)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); + } + resolve(response); + }); + }); + }; + OfficeJsRequestExecutor.SourceLibHeaderValue = 'officejs'; + return OfficeJsRequestExecutor; + }()); + var TrackedObjects = (function () { + function TrackedObjects(context) { + this._autoCleanupList = {}; + this.m_context = context; + } + TrackedObjects.prototype.add = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._addCommon(item, true); }); + } + else { + this._addCommon(param, true); + } + }; + TrackedObjects.prototype._autoAdd = function (object) { + this._addCommon(object, false); + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + }; + TrackedObjects.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue = function (object, resultValue) { + var shouldAutoTrack = this.m_context._autoCleanup && + !object[Constants.isTracked] && + object !== this.m_context._rootObject && + resultValue && + !Utility.isNullOrEmptyString(resultValue[Constants.referenceId]); + if (shouldAutoTrack) { + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype._addCommon = function (object, isExplicitlyAdded) { + if (object[Constants.isTracked]) { + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + return; + } + var referenceId = object[Constants.referenceId]; + var donotKeepReference = object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName]; + if (donotKeepReference) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.objectIsUntracked), null); + } + if (Utility.isNullOrEmptyString(referenceId) && object._KeepReference) { + object._KeepReference(); + ActionFactory.createInstantiateAction(this.m_context, object); + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype.remove = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._removeCommon(item); }); + } + else { + this._removeCommon(param); + } + }; + TrackedObjects.prototype._removeCommon = function (object) { + object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName] = true; + object.context._pendingRequest._removeKeepReferenceAction(object._objectPath.objectPathInfo.Id); + var referenceId = object[Constants.referenceId]; + if (!Utility.isNullOrEmptyString(referenceId)) { + var rootObject = this.m_context._rootObject; + if (rootObject._RemoveReference) { + rootObject._RemoveReference(referenceId); + } + } + delete object[Constants.isTracked]; + }; + TrackedObjects.prototype._retrieveAndClearAutoCleanupList = function () { + var list = this._autoCleanupList; + this._autoCleanupList = {}; + return list; + }; + return TrackedObjects; + }()); + OfficeExtension_1.TrackedObjects = TrackedObjects; + var RequestPrettyPrinter = (function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose, removePII) { + if (!globalObjName) { + globalObjName = 'root'; + } + this.m_globalObjName = globalObjName; + this.m_referencedObjectPaths = referencedObjectPaths; + this.m_actions = actions; + this.m_statements = []; + this.m_variableNameForObjectPathMap = {}; + this.m_variableNameToObjectPathMap = {}; + this.m_declaredObjectPathMap = {}; + this.m_showDispose = showDispose; + this.m_removePII = removePII; + } + RequestPrettyPrinter.prototype.process = function () { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo = function (actionIndex) { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount = 5; + this.m_statements = []; + var oneStatement = ''; + var statementIndex = -1; + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex == i) { + statementIndex = this.m_statements.length - 1; + } + if (statementIndex >= 0 && this.m_statements.length > statementIndex + surroundingCount + 1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex = statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex = 0; + } + var endIndex = statementIndex + 1 + surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex = this.m_statements.length; + } + var surroundingStatements = []; + if (startIndex != 0) { + surroundingStatements.push('...'); + } + for (var i_1 = startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push('// >>>>>'); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push('// <<<<<'); + for (var i_2 = statementIndex + 1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push('...'); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction = function (action) { + var actionInfo = action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + case 9: + this.processUpdateAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction = function (action) { + var objId = action.actionInfo.ObjectPathId; + var objPath = this.m_referencedObjectPaths[objId]; + var varName = this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement = 'var ' + varName + ' = ' + this.buildObjectPathExpressionWithParent(objPath) + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId] = varName; + } + else { + var statement = '// Instantiate {' + varName + '}'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction = function (action) { + var methodName = action.actionInfo.Name; + if (methodName === '_KeepReference') { + if (!OfficeExtension_1._internalConfig.showInternalApiInDebugInfo) { + return; + } + methodName = 'track'; + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(methodName) + + '(' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.load(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.retrieve(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction = function (action) { + var queryExp = ''; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp = JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.loadRecursive(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(action.actionInfo.Name) + + ' = ' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction = function (action) { + var statement = 'context.trace();'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.ensureUnchanged(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processUpdateAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.update(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant = function (statement, action) { + var _this = this; + if (this.m_showDispose) { + var lastUsedObjectPathIds = action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose = lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(', '); + return statement + ' // And then dispose {' + objectNamesToDispose + '}'; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression = function (action) { + if (action.actionInfo.QueryInfo) { + var option = {}; + option.select = action.actionInfo.QueryInfo.Select; + option.expand = action.actionInfo.QueryInfo.Expand; + option.skip = action.actionInfo.QueryInfo.Skip; + option.top = action.actionInfo.QueryInfo.Top; + if (typeof option.top === 'undefined' && + typeof option.skip === 'undefined' && + typeof option.expand === 'undefined') { + if (typeof option.select === 'undefined') { + return ''; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ''; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent = function (objPath) { + var hasParent = objPath.objectPathInfo.ObjectPathType == 5 || + objPath.objectPathInfo.ObjectPathType == 3 || + objPath.objectPathInfo.ObjectPathType == 4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return (this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId) + '.' + this.buildObjectPathExpression(objPath)); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression = function (objPath) { + var expr = this.buildObjectPathInfoExpression(objPath.objectPathInfo); + var originalObjectPathInfo = objPath.originalObjectPathInfo; + if (originalObjectPathInfo) { + expr = expr + ' /* originally ' + this.buildObjectPathInfoExpression(originalObjectPathInfo) + ' */'; + } + return expr; + }; + RequestPrettyPrinter.prototype.buildObjectPathInfoExpression = function (objectPathInfo) { + switch (objectPathInfo.ObjectPathType) { + case 1: + return 'context.' + this.m_globalObjName; + case 5: + return 'getItem(' + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + ')'; + case 3: + return (Utility._toCamelLowerCase(objectPathInfo.Name) + + '(' + + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + + ')'); + case 2: + return objectPathInfo.Name + '.newObject()'; + case 7: + return 'null'; + case 4: + return Utility._toCamelLowerCase(objectPathInfo.Name); + case 6: + return ('context.' + this.m_globalObjName + '._getObjectByReferenceId(' + JSON.stringify(objectPathInfo.Name) + ')'); + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression = function (args) { + var ret = ''; + if (!args.Arguments || args.Arguments.length === 0) { + return ret; + } + if (this.m_removePII) { + if (typeof args.Arguments[0] === 'undefined') { + return ret; + } + return '...'; + } + for (var i = 0; i < args.Arguments.length; i++) { + if (i > 0) { + ret = ret + ', '; + } + ret = + ret + + this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret === 'undefined') { + ret = ''; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral = function (value, objectPathId) { + if (typeof value == 'number' && value === objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase = function (objectPathId) { + var ret = 'v'; + var objPath = this.m_referencedObjectPaths[objectPathId]; + if (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret = this.m_globalObjName; + break; + case 4: + ret = Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName = objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3) === 'Get') { + methodName = methodName.substr(3); + } + ret = Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName = this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1) === 's') { + ret = parentName.substr(0, parentName.length - 1); + } + else { + ret = parentName + 'Item'; + } + break; + } + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName = function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret = this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + } + var i = 1; + while (this.m_variableNameToObjectPathMap[ret + i.toString()]) { + i++; + } + ret = ret + i.toString(); + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + var ResourceStrings = (function (_super) { + __extends(ResourceStrings, _super); + function ResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + ResourceStrings.cannotRegisterEvent = 'CannotRegisterEvent'; + ResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + ResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + ResourceStrings.propertyNotLoaded = 'PropertyNotLoaded'; + ResourceStrings.runMustReturnPromise = 'RunMustReturnPromise'; + ResourceStrings.moreInfoInnerError = 'MoreInfoInnerError'; + ResourceStrings.cannotApplyPropertyThroughSetMethod = 'CannotApplyPropertyThroughSetMethod'; + ResourceStrings.invalidOperationInCellEditMode = 'InvalidOperationInCellEditMode'; + ResourceStrings.objectIsUntracked = 'ObjectIsUntracked'; + ResourceStrings.customFunctionDefintionMissing = 'CustomFunctionDefintionMissing'; + ResourceStrings.customFunctionImplementationMissing = 'CustomFunctionImplementationMissing'; + ResourceStrings.customFunctionNameContainsBadChars = 'CustomFunctionNameContainsBadChars'; + ResourceStrings.customFunctionNameCannotSplit = 'CustomFunctionNameCannotSplit'; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch = 'CustomFunctionUnexpectedNumberOfEntriesInResultBatch'; + ResourceStrings.customFunctionCancellationHandlerMissing = 'CustomFunctionCancellationHandlerMissing'; + ResourceStrings.customFunctionInvalidFunction = 'CustomFunctionInvalidFunction'; + ResourceStrings.customFunctionInvalidFunctionMapping = 'CustomFunctionInvalidFunctionMapping'; + ResourceStrings.customFunctionWindowMissing = 'CustomFunctionWindowMissing'; + ResourceStrings.customFunctionDefintionMissingOnWindow = 'CustomFunctionDefintionMissingOnWindow'; + ResourceStrings.pendingBatchInProgress = 'PendingBatchInProgress'; + ResourceStrings.notInsideBatch = 'NotInsideBatch'; + ResourceStrings.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ResourceStrings; + }(CommonResourceStrings)); + OfficeExtension_1.ResourceStrings = ResourceStrings; + CoreUtility.addResourceStringValues({ + CannotRegisterEvent: 'The event handler cannot be registered.', + PropertyNotLoaded: "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.", + RunMustReturnPromise: 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".', + InvalidOrTimedOutSessionMessage: 'Your Office Online session has expired or is invalid. To continue, refresh the page.', + InvalidOperationInCellEditMode: 'Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.', + InvalidSheetName: 'The request cannot be processed because the specified worksheet cannot be found. Please try again.', + CustomFunctionDefintionMissing: "A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.", + CustomFunctionDefintionMissingOnWindow: "A property with the name '{0}' that represents the function's definition must exist on the window object.", + CustomFunctionImplementationMissing: "The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.", + CustomFunctionNameContainsBadChars: 'The function name may only contain letters, digits, underscores, and periods.', + CustomFunctionNameCannotSplit: 'The function name must contain a non-empty namespace and a non-empty short name.', + CustomFunctionUnexpectedNumberOfEntriesInResultBatch: "The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.", + CustomFunctionCancellationHandlerMissing: 'The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.', + CustomFunctionInvalidFunction: "The property with the name '{0}' that represents the function's definition is not a valid function.", + CustomFunctionInvalidFunctionMapping: "The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.", + CustomFunctionWindowMissing: 'The window object was not found.', + PendingBatchInProgress: 'There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.', + NotInsideBatch: 'Operations may not be invoked outside of a batch method.', + CannotUpdateReadOnlyProperty: "The property '{0}' is read-only and it cannot be updated.", + ObjectIsUntracked: 'The object is untracked.' + }); + var Utility = (function (_super) { + __extends(Utility, _super); + function Utility() { + return _super !== null && _super.apply(this, arguments) || this; + } + Utility.fixObjectPathIfNecessary = function (clientObject, value) { + if (clientObject && clientObject._objectPath && value) { + clientObject._objectPath.updateUsingObjectData(value, clientObject); + } + }; + Utility.load = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve = function (clientObj, option) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !Utility.isSetSupported('RichApiRuntime', '1.1'); + } + var result = new RetrieveResultImpl(clientObj, shouldPolyfill); + clientObj._retrieve(option, result); + return result; + }; + Utility.retrieveAndSync = function (clientObj, option) { + var result = Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); + }; + Utility.toJson = function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result = {}; + for (var prop in scalarProperties) { + var value = scalarProperties[prop]; + if (typeof value !== 'undefined') { + result[prop] = value; + } + } + for (var prop in navigationProperties) { + var value = navigationProperties[prop]; + if (typeof value !== 'undefined') { + if (value[Utility.fieldName_isCollection] && typeof value[Utility.fieldName_m__items] !== 'undefined') { + result[prop] = value.toJSON()['items']; + } + else { + result[prop] = value.toJSON(); + } + } + } + if (collectionItemsIfAny) { + result['items'] = collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; + }; + Utility.throwError = function (resourceId, arg, errorLocation) { + throw new _Internal.RuntimeError({ + code: resourceId, + httpStatusCode: 400, + message: CoreUtility._getResourceString(resourceId, arg), + debugInfo: errorLocation ? { errorLocation: errorLocation } : undefined + }); + }; + Utility.createRuntimeError = function (code, message, location, httpStatusCode, data) { + return new _Internal.RuntimeError({ + code: code, + httpStatusCode: httpStatusCode, + message: message, + debugInfo: { errorLocation: location }, + data: data + }); + }; + Utility.throwIfNotLoaded = function (propertyName, fieldValue, entityName, isNull) { + if (!isNull && + CoreUtility.isUndefined(fieldValue) && + propertyName.charCodeAt(0) != Utility.s_underscoreCharCode && + !Utility.s_suppressPropertyNotLoadedException) { + throw Utility.createPropertyNotLoadedException(entityName, propertyName); + } + }; + Utility._getPropertyValueWithoutCheckLoaded = function (object, propertyName) { + Utility.s_suppressPropertyNotLoadedException = true; + try { + return object[propertyName]; + } + finally { + Utility.s_suppressPropertyNotLoadedException = false; + } + }; + Utility.createPropertyNotLoadedException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.propertyNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.propertyNotLoaded, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.createCannotUpdateReadOnlyPropertyException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.cannotUpdateReadOnlyProperty, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotUpdateReadOnlyProperty, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.promisify = function (action) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + var callback = function (result) { + if (result.status == 'failed') { + reject(result.error); + } + else { + resolve(result.value); + } + }; + action(callback); + }); + }; + Utility._addActionResultHandler = function (clientObj, action, resultHandler) { + clientObj.context._pendingRequest.addActionResultHandler(action, resultHandler); + }; + Utility._handleNavigationPropertyResults = function (clientObj, objectValue, propertyNames) { + for (var i = 0; i < propertyNames.length - 1; i += 2) { + if (!CoreUtility.isUndefined(objectValue[propertyNames[i + 1]])) { + clientObj[propertyNames[i]]._handleResult(objectValue[propertyNames[i + 1]]); + } + } + }; + Utility._fixupApiFlags = function (flags) { + if (typeof flags === 'boolean') { + if (flags) { + flags = 1; + } + else { + flags = 0; + } + } + return flags; + }; + Utility.definePropertyThrowUnloadedException = function (obj, typeName, propertyName) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + throw Utility.createPropertyNotLoadedException(typeName, propertyName); + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(typeName, propertyName); + } + }); + }; + Utility.defineReadOnlyPropertyWithValue = function (obj, propertyName, value) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + return value; + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(null, propertyName); + } + }); + }; + Utility.processRetrieveResult = function (proxy, value, result, childItemCreateFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + return; + } + if (childItemCreateFunc) { + var data = value[Constants.itemsLowerCase]; + if (Array.isArray(data)) { + var itemsResult = []; + for (var i = 0; i < data.length; i++) { + var itemProxy = childItemCreateFunc(data[i], i); + var itemResult = {}; + itemResult[Constants.proxy] = itemProxy; + itemProxy._handleRetrieveResult(data[i], itemResult); + itemsResult.push(itemResult); + } + Utility.defineReadOnlyPropertyWithValue(result, Constants.itemsLowerCase, itemsResult); + } + } + else { + var scalarPropertyNames = proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = proxy[Constants.navigationPropertyNames]; + var typeName = proxy[Constants.className]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + var propName = scalarPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + Utility.defineReadOnlyPropertyWithValue(result, propName, propValue); + } + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + var propName = navigationPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + var propProxy = proxy[propName]; + var propResult = {}; + propProxy._handleRetrieveResult(propValue, propResult); + propResult[Constants.proxy] = propProxy; + if (Array.isArray(propResult[Constants.itemsLowerCase])) { + propResult = propResult[Constants.itemsLowerCase]; + } + Utility.defineReadOnlyPropertyWithValue(result, propName, propResult); + } + } + } + } + }; + Utility.setMockData = function (clientObj, value, childItemCreateFunc, setItemsFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + clientObj._handleResult(value); + return; + } + if (clientObj[Constants.scalarPropertyOriginalNames]) { + var result = {}; + var scalarPropertyOriginalNames = clientObj[Constants.scalarPropertyOriginalNames]; + var scalarPropertyNames = clientObj[Constants.scalarPropertyNames]; + for (var i = 0; i < scalarPropertyNames.length; i++) { + if (typeof (value[scalarPropertyNames[i]]) !== 'undefined') { + result[scalarPropertyOriginalNames[i]] = value[scalarPropertyNames[i]]; + } + } + clientObj._handleResult(result); + } + if (clientObj[Constants.navigationPropertyNames]) { + var navigationPropertyNames = clientObj[Constants.navigationPropertyNames]; + for (var i = 0; i < navigationPropertyNames.length; i++) { + if (typeof (value[navigationPropertyNames[i]]) !== 'undefined') { + var navigationPropValue = clientObj[navigationPropertyNames[i]]; + if (navigationPropValue.setMockData) { + navigationPropValue.setMockData(value[navigationPropertyNames[i]]); + } + } + } + } + if (clientObj[Constants.isCollection] && childItemCreateFunc) { + var itemsData = Array.isArray(value) ? value : value[Constants.itemsLowerCase]; + if (Array.isArray(itemsData)) { + var items = []; + for (var i = 0; i < itemsData.length; i++) { + var item = childItemCreateFunc(itemsData, i); + Utility.setMockData(item, itemsData[i]); + items.push(item); + } + setItemsFunc(items); + } + } + }; + Utility.applyMixin = function (derived, base) { + Object.getOwnPropertyNames(base.prototype).forEach(function (name) { + if (name !== 'constructor') { + Object.defineProperty(derived.prototype, name, Object.getOwnPropertyDescriptor(base.prototype, name)); + } + }); + }; + Utility.ensureTypeInitialized = function (type) { + var context = new ClientRequestContext(); + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, "Temp", false, 0); + new type(context, objectPath); + }; + Utility.fieldName_m__items = 'm__items'; + Utility.fieldName_isCollection = '_isCollection'; + Utility._synchronousCleanup = false; + Utility.s_underscoreCharCode = '_'.charCodeAt(0); + Utility.s_suppressPropertyNotLoadedException = false; + return Utility; + }(CommonUtility)); + OfficeExtension_1.Utility = Utility; + var BatchApiHelper = (function () { + function BatchApiHelper() { + } + BatchApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + var action = ActionFactory.createMethodAction(obj.context, obj, methodName, operationType, args, flags); + var result = new ClientResult(resultProcessType); + Utility._addActionResultHandler(obj, action, result); + return result; + }; + BatchApiHelper.invokeEnsureUnchanged = function (obj, objectState) { + ActionFactory.createEnsureUnchangedAction(obj.context, obj, objectState); + }; + BatchApiHelper.invokeSetProperty = function (obj, propName, propValue, flags) { + ActionFactory.createSetPropertyAction(obj.context, obj, propName, propValue, flags); + }; + BatchApiHelper.createRootServiceObject = function (type, context) { + var objectPath = ObjectPathFactory.createGlobalObjectObjectPath(context); + return new type(context, objectPath); + }; + BatchApiHelper.createObjectFromReferenceId = function (type, context, referenceId) { + var objectPath = ObjectPathFactory.createReferenceIdObjectPath(context, referenceId); + return new type(context, objectPath); + }; + BatchApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, typeName, isCollection, flags); + return new type(context, objectPath); + }; + BatchApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPath = ObjectPathFactory.createPropertyObjectPath(parent.context, parent, propertyName, isCollection, false, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createIndexerObject = function (type, parent, args) { + var objectPath = ObjectPathFactory.createIndexerObjectPath(parent.context, parent, args); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPath = ObjectPathFactory.createMethodObjectPath(parent.context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createChildItemObject = function (type, hasIndexerMethod, parent, chileItem, index) { + var objectPath = ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt(hasIndexerMethod, parent.context, parent, chileItem, index); + return new type(parent.context, objectPath); + }; + return BatchApiHelper; + }()); + OfficeExtension_1.BatchApiHelper = BatchApiHelper; + var LibraryBuilder = (function () { + function LibraryBuilder(options) { + this.m_namespaceMap = {}; + this.m_namespace = options.metadata.name; + this.m_targetNamespaceObject = options.targetNamespaceObject; + this.m_namespaceMap[this.m_namespace] = options.targetNamespaceObject; + if (options.namespaceMap) { + for (var ns in options.namespaceMap) { + this.m_namespaceMap[ns] = options.namespaceMap[ns]; + } + } + this.m_defaultApiSetName = options.metadata.defaultApiSetName; + this.m_hostName = options.metadata.hostName; + var metadata = options.metadata; + if (metadata.enumTypes) { + for (var i = 0; i < metadata.enumTypes.length; i++) { + this.buildEnumType(metadata.enumTypes[i]); + } + } + if (metadata.apiSets) { + for (var i = 0; i < metadata.apiSets.length; i++) { + var elem = metadata.apiSets[i]; + if (Array.isArray(elem)) { + metadata.apiSets[i] = { + version: elem[0], + name: elem[1] || this.m_defaultApiSetName + }; + } + } + this.m_apiSets = metadata.apiSets; + } + this.m_strings = metadata.strings; + if (metadata.clientObjectTypes) { + for (var i = 0; i < metadata.clientObjectTypes.length; i++) { + var elem = metadata.clientObjectTypes[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 11); + metadata.clientObjectTypes[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + collectionPropertyPath: this.getString(elem[6]), + newObjectServerTypeFullName: this.getString(elem[9]), + newObjectApiFlags: elem[10], + childItemTypeFullName: this.getString(elem[7]), + scalarProperties: elem[2], + navigationProperties: elem[3], + scalarMethods: elem[4], + navigationMethods: elem[5], + events: elem[8] + }; + } + this.buildClientObjectType(metadata.clientObjectTypes[i], options.fullyInitialize); + } + } + } + LibraryBuilder.prototype.ensureArraySize = function (value, size) { + var count = size - value.length; + while (count > 0) { + value.push(0); + count--; + } + }; + LibraryBuilder.prototype.getString = function (ordinalOrValue) { + if (typeof (ordinalOrValue) === "number") { + if (ordinalOrValue > 0) { + return this.m_strings[ordinalOrValue - 1]; + } + return null; + } + return ordinalOrValue; + }; + LibraryBuilder.prototype.buildEnumType = function (elem) { + var enumType; + if (Array.isArray(elem)) { + enumType = { + name: elem[0], + fields: elem[2] + }; + if (!enumType.fields) { + enumType.fields = {}; + } + var fieldsWithCamelUpperCaseValue = elem[1]; + if (Array.isArray(fieldsWithCamelUpperCaseValue)) { + for (var index = 0; index < fieldsWithCamelUpperCaseValue.length; index++) { + enumType.fields[fieldsWithCamelUpperCaseValue[index]] = this.toSimpleCamelUpperCase(fieldsWithCamelUpperCaseValue[index]); + } + } + } + else { + enumType = elem; + } + this.m_targetNamespaceObject[enumType.name] = enumType.fields; + }; + LibraryBuilder.prototype.buildClientObjectType = function (typeInfo, fullyInitialize) { + var thisBuilder = this; + var type = function (context, objectPath) { + ClientObject.apply(this, arguments); + if (!thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited) { + thisBuilder.buildPrototype(thisBuilder.m_targetNamespaceObject[typeInfo.name], typeInfo); + thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited = true; + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo) { + if (this._objectPath && this._objectPath.objectPathInfo && this._className) { + this._objectPath.objectPathInfo.T = this._className; + } + } + }; + this.m_targetNamespaceObject[typeInfo.name] = type; + this.extendsType(type, ClientObject); + this.buildNewObject(type, typeInfo); + if ((typeInfo.behaviorFlags & 2) !== 0) { + type.prototype._KeepReference = function () { + BatchApiHelper.invokeMethod(this, "_KeepReference", 1, [], 0, 0); + }; + } + if ((typeInfo.behaviorFlags & 32) !== 0) { + var func = this.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_StaticCustomize"); + func.call(null, type); + } + if (fullyInitialize) { + this.buildPrototype(type, typeInfo); + type._typeInited = true; + } + }; + LibraryBuilder.prototype.extendsType = function (d, b) { + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + LibraryBuilder.prototype.findObjectUnderPath = function (top, paths, pathStartIndex) { + var obj = top; + for (var i = pathStartIndex; i < paths.length; i++) { + if (typeof (obj) !== 'object') { + throw new OfficeExtension_1.Error("Cannot find " + paths.join(".")); + } + obj = obj[paths[i]]; + } + return obj; + }; + LibraryBuilder.prototype.getFunction = function (fullName) { + var ret = this.resolveObjectByFullName(fullName); + if (typeof (ret) !== 'function') { + throw new OfficeExtension_1.Error("Cannot find function or type: " + fullName); + } + return ret; + }; + LibraryBuilder.prototype.resolveObjectByFullName = function (fullName) { + var parts = fullName.split('.'); + if (parts.length === 1) { + return this.m_targetNamespaceObject[parts[0]]; + } + var rootName = parts[0]; + if (rootName === this.m_namespace) { + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 1); + } + if (this.m_namespaceMap[rootName]) { + return this.findObjectUnderPath(this.m_namespaceMap[rootName], parts, 1); + } + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 0); + }; + LibraryBuilder.prototype.evaluateSimpleExpression = function (expression, thisObj) { + if (Utility.isNullOrUndefined(expression)) { + return null; + } + var paths = expression.split('.'); + if (paths.length === 3 && paths[0] === 'OfficeExtension' && paths[1] === 'Constants') { + return Constants[paths[2]]; + } + if (paths[0] === 'this') { + var obj = thisObj; + for (var i = 1; i < paths.length; i++) { + if (paths[i] == 'toString()') { + obj = obj.toString(); + } + else if (paths[i].substr(paths[i].length - 2) === "()") { + obj = obj[paths[i].substr(0, paths[i].length - 2)](); + } + else { + obj = obj[paths[i]]; + } + } + return obj; + } + throw new OfficeExtension_1.Error("Cannot evaluate: " + expression); + }; + LibraryBuilder.prototype.evaluateEventTargetId = function (targetIdExpression, thisObj) { + if (Utility.isNullOrEmptyString(targetIdExpression)) { + return ''; + } + return this.evaluateSimpleExpression(targetIdExpression, thisObj); + }; + LibraryBuilder.prototype.isAllDigits = function (expression) { + var charZero = '0'.charCodeAt(0); + var charNine = '9'.charCodeAt(0); + for (var i = 0; i < expression.length; i++) { + if (expression.charCodeAt(i) < charZero || + expression.charCodeAt(i) > charNine) { + return false; + } + } + return true; + }; + LibraryBuilder.prototype.evaluateEventType = function (eventTypeExpression) { + if (Utility.isNullOrEmptyString(eventTypeExpression)) { + return 0; + } + if (this.isAllDigits(eventTypeExpression)) { + return parseInt(eventTypeExpression); + } + var ret = this.resolveObjectByFullName(eventTypeExpression); + if (typeof (ret) !== 'number') { + throw new OfficeExtension_1.Error("Invalid event type: " + eventTypeExpression); + } + return ret; + }; + LibraryBuilder.prototype.buildPrototype = function (type, typeInfo) { + this.buildScalarProperties(type, typeInfo); + this.buildNavigationProperties(type, typeInfo); + this.buildScalarMethods(type, typeInfo); + this.buildNavigationMethods(type, typeInfo); + this.buildEvents(type, typeInfo); + this.buildHandleResult(type, typeInfo); + this.buildHandleIdResult(type, typeInfo); + this.buildHandleRetrieveResult(type, typeInfo); + this.buildLoad(type, typeInfo); + this.buildRetrieve(type, typeInfo); + this.buildSetMockData(type, typeInfo); + this.buildEnsureUnchanged(type, typeInfo); + this.buildUpdate(type, typeInfo); + this.buildSet(type, typeInfo); + this.buildToJSON(type, typeInfo); + this.buildItems(type, typeInfo); + this.buildTypeMetadataInfo(type, typeInfo); + this.buildTrackUntrack(type, typeInfo); + this.buildMixin(type, typeInfo); + }; + LibraryBuilder.prototype.toSimpleCamelUpperCase = function (name) { + return name.substr(0, 1).toUpperCase() + name.substr(1); + }; + LibraryBuilder.prototype.ensureOriginalName = function (member) { + if (member.originalName === null) { + member.originalName = this.toSimpleCamelUpperCase(member.name); + } + }; + LibraryBuilder.prototype.getFieldName = function (member) { + return "m_" + member.name; + }; + LibraryBuilder.prototype.throwIfApiNotSupported = function (typeInfo, member) { + if (this.m_apiSets && member.apiSetInfoOrdinal > 0) { + var apiSetInfo = this.m_apiSets[member.apiSetInfoOrdinal - 1]; + if (apiSetInfo) { + Utility.throwIfApiNotSupported(typeInfo.name + "." + member.name, apiSetInfo.name, apiSetInfo.version, this.m_hostName); + } + } + }; + LibraryBuilder.prototype.buildScalarProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarProperties)) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var elem = typeInfo.scalarProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 6); + typeInfo.scalarProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + originalName: this.getString(elem[3]), + setMethodApiFlags: elem[4], + undoableApiSetInfoOrdinal: elem[5] + }; + } + this.buildScalarProperty(type, typeInfo, typeInfo.scalarProperties[i]); + } + } + }; + LibraryBuilder.prototype.calculateApiFlags = function (apiFlags, undoableApiSetInfoOrdinal) { + if (undoableApiSetInfoOrdinal > 0) { + var undoableApiSetInfo = this.m_apiSets[undoableApiSetInfoOrdinal - 1]; + if (undoableApiSetInfo) { + apiFlags = CommonUtility.calculateApiFlags(apiFlags, undoableApiSetInfo.name, undoableApiSetInfo.version); + } + } + return apiFlags; + }; + LibraryBuilder.prototype.buildScalarProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + Utility.throwIfNotLoaded(propInfo.name, this[fieldName], typeInfo.name, this._isNull); + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildNavigationProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationProperties)) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + var elem = typeInfo.navigationProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 8); + typeInfo.navigationProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[4]), + getMethodApiFlags: elem[5], + setMethodApiFlags: elem[6], + propertyTypeFullName: this.getString(elem[1]), + undoableApiSetInfoOrdinal: elem[7] + }; + } + this.buildNavigationProperty(type, typeInfo, typeInfo.navigationProperties[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + if (!this[thisBuilder.getFieldName(propInfo)]) { + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + this[fieldName] = BatchApiHelper.createPropertyObject(thisBuilder.getFunction(propInfo.propertyTypeFullName), this, propInfo.originalName, (propInfo.behaviorFlags & 16) !== 0, propInfo.getMethodApiFlags); + } + if (propInfo.behaviorFlags & 64) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Get"); + customizationFunc.call(this, this, this[fieldName]); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildScalarMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarMethods)) { + for (var i = 0; i < typeInfo.scalarMethods.length; i++) { + var elem = typeInfo.scalarMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.scalarMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[5]), + apiFlags: elem[4], + parameterCount: elem[1], + undoableApiSetInfoOrdinal: elem[6] + }; + } + this.buildScalarMethod(type, typeInfo, typeInfo.scalarMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildScalarMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + var resultProcessType = 0; + if (methodInfo.behaviorFlags & 32) { + resultProcessType = 1; + } + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.invokeMethod(this, methodInfo.originalName, operationType, args, apiFlags, resultProcessType); + }; + }; + LibraryBuilder.prototype.buildNavigationMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationMethods)) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + var elem = typeInfo.navigationMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 9); + typeInfo.navigationMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[3], + apiSetInfoOrdinal: elem[4], + originalName: this.getString(elem[6]), + apiFlags: elem[5], + parameterCount: elem[2], + returnTypeFullName: this.getString(elem[1]), + returnObjectGetByIdMethodName: this.getString(elem[7]), + undoableApiSetInfoOrdinal: elem[8] + }; + } + this.buildNavigationMethod(type, typeInfo, typeInfo.navigationMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + if ((methodInfo.behaviorFlags & 16) !== 0) { + return BatchApiHelper.createIndexerObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, args); + } + else { + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.createMethodObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, methodInfo.originalName, operationType, args, (methodInfo.behaviorFlags & 4) !== 0, (methodInfo.behaviorFlags & 8) !== 0, methodInfo.returnObjectGetByIdMethodName, apiFlags); + } + }; + }; + LibraryBuilder.prototype.buildHandleResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleResult = function (value) { + ClientObject.prototype._handleResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + Utility.fixObjectPathIfNecessary(this, value); + if (typeInfo.behaviorFlags & 8) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i_3 = 0; i_3 < typeInfo.scalarProperties.length; i_3++) { + if (!Utility.isUndefined(value[typeInfo.scalarProperties[i_3].originalName])) { + if ((typeInfo.scalarProperties[i_3].behaviorFlags & 8) !== 0) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i_3].originalName]); + } + else { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = value[typeInfo.scalarProperties[i_3].originalName]; + } + } + } + } + if (typeInfo.navigationProperties) { + var propNames = []; + for (var i_4 = 0; i_4 < typeInfo.navigationProperties.length; i_4++) { + propNames.push(typeInfo.navigationProperties[i_4].name); + propNames.push(typeInfo.navigationProperties[i_4].originalName); + } + Utility._handleNavigationPropertyResults(this, value, propNames); + } + if ((typeInfo.behaviorFlags & 1) !== 0) { + var hasIndexerMethod = thisBuilder.hasIndexMethod(typeInfo); + if (!Utility.isNullOrUndefined(value[Constants.items])) { + this.m__items = []; + var _data = value[Constants.items]; + var childItemType = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + for (var i = 0; i < _data.length; i++) { + var _item = BatchApiHelper.createChildItemObject(childItemType, hasIndexerMethod, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + } + }; + }; + LibraryBuilder.prototype.buildHandleRetrieveResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleRetrieveResult = function (value, result) { + ClientObject.prototype._handleRetrieveResult.call(this, value, result); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if (typeInfo.scalarProperties[i].behaviorFlags & 8) { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].name])) { + value[typeInfo.scalarProperties[i].name] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i].name]); + } + } + } + } + if (typeInfo.behaviorFlags & 1) { + var hasIndexerMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + var childItemType_1 = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + var thisObj_1 = this; + Utility.processRetrieveResult(thisObj_1, value, result, function (childItemData, index) { return BatchApiHelper.createChildItemObject(childItemType_1, hasIndexerMethod_1, thisObj_1, childItemData, index); }); + } + else { + Utility.processRetrieveResult(this, value, result); + } + }; + }; + LibraryBuilder.prototype.buildHandleIdResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleIdResult = function (value) { + ClientObject.prototype._handleIdResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.behaviorFlags & 16) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleIdResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var propName = typeInfo.scalarProperties[i].originalName; + if (propName === "Id" || propName === "_Id" || propName === "_ReferenceId") { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].originalName])) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])] = value[typeInfo.scalarProperties[i].originalName]; + } + } + } + } + }; + }; + LibraryBuilder.prototype.buildLoad = function (type, typeInfo) { + type.prototype.load = function (options) { + return Utility.load(this, options); + }; + }; + LibraryBuilder.prototype.buildRetrieve = function (type, typeInfo) { + type.prototype.retrieve = function (options) { + return Utility.retrieve(this, options); + }; + }; + LibraryBuilder.prototype.buildNewObject = function (type, typeInfo) { + if (!Utility.isNullOrEmptyString(typeInfo.newObjectServerTypeFullName)) { + type.newObject = function (context) { + return BatchApiHelper.createTopLevelServiceObject(type, context, typeInfo.newObjectServerTypeFullName, (typeInfo.behaviorFlags & 1) !== 0, typeInfo.newObjectApiFlags); + }; + } + }; + LibraryBuilder.prototype.buildSetMockData = function (type, typeInfo) { + var thisBuilder = this; + if (typeInfo.behaviorFlags & 1) { + var hasIndexMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + type.prototype.setMockData = function (data) { + var thisObj = this; + Utility.setMockData(thisObj, data, function (childItemData, index) { + return BatchApiHelper.createChildItemObject(thisBuilder.getFunction(typeInfo.childItemTypeFullName), hasIndexMethod_1, thisObj, childItemData, index); + }, function (items) { + thisObj.m__items = items; + }); + }; + } + else { + type.prototype.setMockData = function (data) { + Utility.setMockData(this, data); + }; + } + }; + LibraryBuilder.prototype.buildEnsureUnchanged = function (type, typeInfo) { + type.prototype.ensureUnchanged = function (data) { + BatchApiHelper.invokeEnsureUnchanged(this, data); + }; + }; + LibraryBuilder.prototype.buildUpdate = function (type, typeInfo) { + type.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + }; + LibraryBuilder.prototype.buildSet = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) !== 0) { + return; + } + var notAllowedToBeSetPropertyNames = []; + var allowedScalarPropertyNames = []; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 2) === 0 && + (typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + allowedScalarPropertyNames.push(typeInfo.scalarProperties[i].name); + } + else { + notAllowedToBeSetPropertyNames.push(typeInfo.scalarProperties[i].name); + } + } + } + var allowedNavigationPropertyNames = []; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 16) !== 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 1) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 32) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else { + allowedNavigationPropertyNames.push(typeInfo.navigationProperties[i].name); + } + } + } + if (allowedNavigationPropertyNames.length === 0 && allowedScalarPropertyNames.length === 0) { + return; + } + type.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, allowedScalarPropertyNames, allowedNavigationPropertyNames, notAllowedToBeSetPropertyNames); + }; + }; + LibraryBuilder.prototype.buildItems = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) === 0) { + return; + } + Object.defineProperty(type.prototype, "items", { + get: function () { + Utility.throwIfNotLoaded("items", this.m__items, typeInfo.name, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildToJSON = function (type, typeInfo) { + var thisBuilder = this; + if ((typeInfo.behaviorFlags & 1) !== 0) { + type.prototype.toJSON = function () { + return Utility.toJson(this, {}, {}, this.m__items); + }; + return; + } + else { + type.prototype.toJSON = function () { + var scalarProperties = {}; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + scalarProperties[typeInfo.scalarProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])]; + } + } + } + var navProperties = {}; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 1) !== 0) { + navProperties[typeInfo.navigationProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.navigationProperties[i])]; + } + } + } + return Utility.toJson(this, scalarProperties, navProperties); + }; + } + }; + LibraryBuilder.prototype.buildTypeMetadataInfo = function (type, typeInfo) { + Object.defineProperty(type.prototype, "_className", { + get: function () { + return typeInfo.name; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_isCollection", { + get: function () { + return (typeInfo.behaviorFlags & 1) !== 0; + }, + enumerable: true, + configurable: true + }); + if (!Utility.isNullOrEmptyString(typeInfo.collectionPropertyPath)) { + Object.defineProperty(type.prototype, "_collectionPropertyPath", { + get: function () { + return typeInfo.collectionPropertyPath; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.scalarProperties && typeInfo.scalarProperties.length > 0) { + Object.defineProperty(type.prototype, "_scalarPropertyNames", { + get: function () { + if (!this.m__scalarPropertyNames) { + this.m__scalarPropertyNames = typeInfo.scalarProperties.map(function (p) { return p.name; }); + } + return this.m__scalarPropertyNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyOriginalNames", { + get: function () { + if (!this.m__scalarPropertyOriginalNames) { + this.m__scalarPropertyOriginalNames = typeInfo.scalarProperties.map(function (p) { return p.originalName; }); + } + return this.m__scalarPropertyOriginalNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyUpdateable", { + get: function () { + if (!this.m__scalarPropertyUpdateable) { + this.m__scalarPropertyUpdateable = typeInfo.scalarProperties.map(function (p) { return (p.behaviorFlags & 2) === 0; }); + } + return this.m__scalarPropertyUpdateable; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.navigationProperties && typeInfo.navigationProperties.length > 0) { + Object.defineProperty(type.prototype, "_navigationPropertyNames", { + get: function () { + if (!this.m__navigationPropertyNames) { + this.m__navigationPropertyNames = typeInfo.navigationProperties.map(function (p) { return p.name; }); + } + return this.m__navigationPropertyNames; + }, + enumerable: true, + configurable: true + }); + } + }; + LibraryBuilder.prototype.buildTrackUntrack = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 2) { + type.prototype.track = function () { + this.context.trackedObjects.add(this); + return this; + }; + type.prototype.untrack = function () { + this.context.trackedObjects.remove(this); + return this; + }; + } + }; + LibraryBuilder.prototype.buildMixin = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 4) { + var mixinType = this.getFunction(typeInfo.name + 'Custom'); + Utility.applyMixin(type, mixinType); + } + }; + LibraryBuilder.prototype.getOnEventName = function (name) { + if (name[0] === '_') { + return '_on' + name.substr(1); + } + return 'on' + name; + }; + LibraryBuilder.prototype.buildEvents = function (type, typeInfo) { + if (typeInfo.events) { + for (var i = 0; i < typeInfo.events.length; i++) { + var elem = typeInfo.events[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.events[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + typeExpression: this.getString(elem[3]), + targetIdExpression: this.getString(elem[4]), + register: this.getString(elem[5]), + unregister: this.getString(elem[6]) + }; + } + this.buildEvent(type, typeInfo, typeInfo.events[i]); + } + } + }; + LibraryBuilder.prototype.buildEvent = function (type, typeInfo, evt) { + if (evt.behaviorFlags & 1) { + this.buildV0Event(type, typeInfo, evt); + } + else { + this.buildV2Event(type, typeInfo, evt); + } + }; + LibraryBuilder.prototype.buildV2Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (evt.register !== 'null') { + registerFunc = this[evt.register].bind(this); + } + var unregisterFunc = null; + if (evt.unregister !== 'null') { + unregisterFunc = this[evt.unregister].bind(this); + } + var getTargetIdFunc = function () { + return thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + }; + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + var eventType = thisBuilder.evaluateEventType(evt.typeExpression); + this[fieldName] = new GenericEventHandlers(this.context, this, evt.name, { + eventType: eventType, + getTargetIdFunc: getTargetIdFunc, + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildV0Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (Utility.isNullOrEmptyString(evt.register)) { + var eventType_1 = thisBuilder.evaluateEventType(evt.typeExpression); + registerFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.register(eventType_1, targetId, handlerCallback); + }; + } + else if (evt.register !== 'null') { + var func_1 = thisBuilder.getFunction(evt.register); + registerFunc = + function (handlerCallback) { + return func_1.call(thisObj, thisObj, handlerCallback); + }; + } + var unregisterFunc = null; + if (Utility.isNullOrEmptyString(evt.unregister)) { + var eventType_2 = thisBuilder.evaluateEventType(evt.typeExpression); + unregisterFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.unregister(eventType_2, targetId, handlerCallback); + }; + } + else if (evt.unregister !== 'null') { + var func_2 = thisBuilder.getFunction(evt.unregister); + unregisterFunc = + function (handlerCallback) { + return func_2.call(thisObj, thisObj, handlerCallback); + }; + } + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + this[fieldName] = new EventHandlers(this.context, this, evt.name, { + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.hasIndexMethod = function (typeInfo) { + var ret = false; + if (typeInfo.navigationMethods) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + if ((typeInfo.navigationMethods[i].behaviorFlags & 16) !== 0) { + ret = true; + break; + } + } + } + return ret; + }; + LibraryBuilder.CustomizationCodeNamespace = "_CC"; + return LibraryBuilder; + }()); + OfficeExtension_1.LibraryBuilder = LibraryBuilder; + var versionToken = 1; + var internalConfiguration = { + invokeRequestModifier: function (request) { + request.DdaMethod.Version = versionToken; + return request; + }, + invokeResponseModifier: function (args) { + versionToken = args.Version; + if (args.Error) { + args.error = {}; + args.error.Code = args.Error; + } + return args; + } + }; + var CommunicationConstants; + (function (CommunicationConstants) { + CommunicationConstants["SendingId"] = "sId"; + CommunicationConstants["RespondingId"] = "rId"; + CommunicationConstants["CommandKey"] = "command"; + CommunicationConstants["SessionInfoKey"] = "sessionInfo"; + CommunicationConstants["ParamsKey"] = "params"; + CommunicationConstants["ApiReadyCommand"] = "apiready"; + CommunicationConstants["ExecuteMethodCommand"] = "executeMethod"; + CommunicationConstants["GetAppContextCommand"] = "getAppContext"; + CommunicationConstants["RegisterEventCommand"] = "registerEvent"; + CommunicationConstants["UnregisterEventCommand"] = "unregisterEvent"; + CommunicationConstants["FireEventCommand"] = "fireEvent"; + })(CommunicationConstants || (CommunicationConstants = {})); + var EmbeddedConstants = (function () { + function EmbeddedConstants() { + } + EmbeddedConstants.sessionContext = 'sc'; + EmbeddedConstants.embeddingPageOrigin = 'EmbeddingPageOrigin'; + EmbeddedConstants.embeddingPageSessionInfo = 'EmbeddingPageSessionInfo'; + return EmbeddedConstants; + }()); + OfficeExtension_1.EmbeddedConstants = EmbeddedConstants; + var EmbeddedSession = (function (_super) { + __extends(EmbeddedSession, _super); + function EmbeddedSession(url, options) { + var _this = _super.call(this) || this; + _this.m_chosenWindow = null; + _this.m_chosenOrigin = null; + _this.m_enabled = true; + _this.m_onMessageHandler = _this._onMessage.bind(_this); + _this.m_callbackList = {}; + _this.m_id = 0; + _this.m_timeoutId = -1; + _this.m_appContext = null; + _this.m_url = url; + _this.m_options = options; + if (!_this.m_options) { + _this.m_options = { sessionKey: Math.random().toString() }; + } + if (!_this.m_options.sessionKey) { + _this.m_options.sessionKey = Math.random().toString(); + } + if (!_this.m_options.container) { + _this.m_options.container = document.body; + } + if (!_this.m_options.timeoutInMilliseconds) { + _this.m_options.timeoutInMilliseconds = 60000; + } + if (!_this.m_options.height) { + _this.m_options.height = '400px'; + } + if (!_this.m_options.width) { + _this.m_options.width = '100%'; + } + if (!(_this.m_options.webApplication && + _this.m_options.webApplication.accessToken && + _this.m_options.webApplication.accessTokenTtl)) { + _this.m_options.webApplication = null; + } + return _this; + } + EmbeddedSession.prototype._getIFrameSrc = function () { + var origin = window.location.protocol + '//' + window.location.host; + var toAppend = EmbeddedConstants.embeddingPageOrigin + + '=' + + encodeURIComponent(origin) + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + encodeURIComponent(this.m_options.sessionKey); + var useHash = false; + if (this.m_url.toLowerCase().indexOf('/_layouts/preauth.aspx') > 0 || + this.m_url.toLowerCase().indexOf('/_layouts/15/preauth.aspx') > 0) { + useHash = true; + } + var a = document.createElement('a'); + a.href = this.m_url; + if (this.m_options.webApplication) { + var toAppendWAC = EmbeddedConstants.embeddingPageOrigin + + '=' + + origin + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + this.m_options.sessionKey; + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + else { + a.search = a.search + '&' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + } + else if (useHash) { + if (a.hash.length === 0 || a.hash === '#') { + a.hash = '#' + toAppend; + } + else { + a.hash = a.hash + '&' + toAppend; + } + } + else { + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + toAppend; + } + else { + a.search = a.search + '&' + toAppend; + } + } + var iframeSrc = a.href; + return iframeSrc; + }; + EmbeddedSession.prototype.init = function () { + var _this = this; + window.addEventListener('message', this.m_onMessageHandler); + var iframeSrc = this._getIFrameSrc(); + return CoreUtility.createPromise(function (resolve, reject) { + var iframeElement = document.createElement('iframe'); + if (_this.m_options.id) { + iframeElement.id = _this.m_options.id; + iframeElement.name = _this.m_options.id; + } + iframeElement.style.height = _this.m_options.height; + iframeElement.style.width = _this.m_options.width; + if (!_this.m_options.webApplication) { + iframeElement.src = iframeSrc; + _this.m_options.container.appendChild(iframeElement); + } + else { + var webApplicationForm = document.createElement('form'); + webApplicationForm.setAttribute('action', iframeSrc); + webApplicationForm.setAttribute('method', 'post'); + webApplicationForm.setAttribute('target', iframeElement.name); + _this.m_options.container.appendChild(webApplicationForm); + var token_input = document.createElement('input'); + token_input.setAttribute('type', 'hidden'); + token_input.setAttribute('name', 'access_token'); + token_input.setAttribute('value', _this.m_options.webApplication.accessToken); + webApplicationForm.appendChild(token_input); + var token_ttl_input = document.createElement('input'); + token_ttl_input.setAttribute('type', 'hidden'); + token_ttl_input.setAttribute('name', 'access_token_ttl'); + token_ttl_input.setAttribute('value', _this.m_options.webApplication.accessTokenTtl); + webApplicationForm.appendChild(token_ttl_input); + _this.m_options.container.appendChild(iframeElement); + webApplicationForm.submit(); + } + _this.m_timeoutId = window.setTimeout(function () { + _this.close(); + var err = Utility.createRuntimeError(CoreErrorCodes.timeout, CoreUtility._getResourceString(CoreResourceStrings.timeout), 'EmbeddedSession.init'); + reject(err); + }, _this.m_options.timeoutInMilliseconds); + _this.m_promiseResolver = resolve; + }); + }; + EmbeddedSession.prototype._invoke = function (method, callback, params) { + if (!this.m_enabled) { + callback(5001, null); + return; + } + if (internalConfiguration.invokeRequestModifier) { + params = internalConfiguration.invokeRequestModifier(params); + } + this._sendMessageWithCallback(this.m_id++, method, params, function (args) { + if (internalConfiguration.invokeResponseModifier) { + args = internalConfiguration.invokeResponseModifier(args); + } + var errorCode = args['Error']; + delete args['Error']; + callback(errorCode || 0, args); + }); + }; + EmbeddedSession.prototype.close = function () { + window.removeEventListener('message', this.m_onMessageHandler); + window.clearTimeout(this.m_timeoutId); + this.m_enabled = false; + }; + EmbeddedSession.prototype.getEventRegistration = function (controlId) { + if (!this.m_sessionEventManager) { + this.m_sessionEventManager = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + } + return this.m_sessionEventManager; + }; + EmbeddedSession.prototype._createRequestExecutorOrNull = function () { + return new EmbeddedRequestExecutor(this); + }; + EmbeddedSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + EmbeddedSession.prototype._registerEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.RegisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(null); + }); + }); + }; + EmbeddedSession.prototype._unregisterEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.UnregisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(); + }); + }); + }; + EmbeddedSession.prototype._onMessage = function (event) { + var _this = this; + if (!this.m_enabled) { + return; + } + if (this.m_chosenWindow && (this.m_chosenWindow !== event.source || this.m_chosenOrigin !== event.origin)) { + return; + } + var eventData = event.data; + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.ApiReadyCommand) { + if (!this.m_chosenWindow && + this._isValidDescendant(event.source) && + eventData[CommunicationConstants.SessionInfoKey] === this.m_options.sessionKey) { + this.m_chosenWindow = event.source; + this.m_chosenOrigin = event.origin; + this._sendMessageWithCallback(this.m_id++, CommunicationConstants.GetAppContextCommand, null, function (appContext) { + _this._setupContext(appContext); + window.clearTimeout(_this.m_timeoutId); + _this.m_promiseResolver(); + }); + } + return; + } + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.FireEventCommand) { + var msg = eventData[CommunicationConstants.ParamsKey]; + var eventId = msg['EventId']; + var targetId = msg['TargetId']; + var data = msg['Data']; + if (this.m_sessionEventManager) { + var handlers = this.m_sessionEventManager.getHandlers(eventId, targetId); + for (var i = 0; i < handlers.length; i++) { + handlers[i](data); + } + } + return; + } + if (eventData && eventData.hasOwnProperty(CommunicationConstants.RespondingId)) { + var rId = eventData[CommunicationConstants.RespondingId]; + if (this.m_callbackList.hasOwnProperty(rId)) { + var callback = this.m_callbackList[rId]; + if (typeof callback === 'function') { + callback(eventData[CommunicationConstants.ParamsKey]); + } + delete this.m_callbackList[rId]; + } + } + }; + EmbeddedSession.prototype._sendMessageWithCallback = function (id, command, data, callback) { + this.m_callbackList[id] = callback; + var message = {}; + message[CommunicationConstants.SendingId] = id; + message[CommunicationConstants.CommandKey] = command; + message[CommunicationConstants.ParamsKey] = data; + this.m_chosenWindow.postMessage(JSON.stringify(message), this.m_chosenOrigin); + }; + EmbeddedSession.prototype._isValidDescendant = function (wnd) { + var container = this.m_options.container || document.body; + function doesFrameWindow(containerWindow) { + if (containerWindow === wnd) { + return true; + } + for (var i = 0, len = containerWindow.frames.length; i < len; i++) { + if (doesFrameWindow(containerWindow.frames[i])) { + return true; + } + } + return false; + } + var iframes = container.getElementsByTagName('iframe'); + for (var i = 0, len = iframes.length; i < len; i++) { + if (doesFrameWindow(iframes[i].contentWindow)) { + return true; + } + } + return false; + }; + EmbeddedSession.prototype._setupContext = function (appContext) { + if (!(this.m_appContext = appContext)) { + return; + } + }; + return EmbeddedSession; + }(SessionBase)); + OfficeExtension_1.EmbeddedSession = EmbeddedSession; + var EmbeddedRequestExecutor = (function () { + function EmbeddedRequestExecutor(session) { + this.m_session = session; + } + EmbeddedRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, EmbeddedRequestExecutor.SourceLibHeaderValue); + return CoreUtility.createPromise(function (resolve, reject) { + _this.m_session._invoke(CommunicationConstants.ExecuteMethodCommand, function (status, result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (status == 0) { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBodyFromSafeArray(result.Data), RichApiMessageUtility.getResponseHeadersFromSafeArray(result.Data)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.Code, result.error.Message); + } + resolve(response); + }, EmbeddedRequestExecutor._transformMessageArrayIntoParams(messageSafearray)); + }); + }; + EmbeddedRequestExecutor._transformMessageArrayIntoParams = function (msgArray) { + return { + ArrayData: msgArray, + DdaMethod: { + DispatchId: EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod + } + }; + }; + EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod = 93; + EmbeddedRequestExecutor.SourceLibHeaderValue = 'Embedded'; + return EmbeddedRequestExecutor; + }()); +})(OfficeExtension || (OfficeExtension = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { + step(generator.next(value)); + } + catch (e) { + reject(e); + } } + function rejected(value) { try { + step(generator["throw"](value)); + } + catch (e) { + reject(e); + } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function () { if (t[0] & 1) + throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } + catch (e) { + op = [6, e]; + y = 0; + } + finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "AgaveVisualApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeBiShim = "BiShim"; + var BiShim = (function (_super) { + __extends(BiShim, _super); + function BiShim() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BiShim.prototype, "_className", { + get: function () { + return "BiShim"; + }, + enumerable: true, + configurable: true + }); + BiShim.prototype.initialize = function (capabilities) { + _invokeMethod(this, "Initialize", 0, [capabilities], 0, 0); + }; + BiShim.prototype.getData = function () { + return _invokeMethod(this, "getData", 1, [], 4, 0); + }; + BiShim.prototype.setVisualObjects = function (visualObjects) { + _invokeMethod(this, "setVisualObjects", 0, [visualObjects], 2, 0); + }; + BiShim.prototype.setVisualObjectsToPersist = function (visualObjectsToPersist) { + _invokeMethod(this, "setVisualObjectsToPersist", 0, [visualObjectsToPersist], 2, 0); + }; + BiShim.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BiShim.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BiShim.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BiShim, context, "Microsoft.AgaveVisual.BiShim", false, 4); + }; + BiShim.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BiShim; + }(OfficeExtension.ClientObject)); + OfficeCore.BiShim = BiShim; + var AgaveVisualErrorCodes; + (function (AgaveVisualErrorCodes) { + AgaveVisualErrorCodes["generalException1"] = "GeneralException"; + })(AgaveVisualErrorCodes = OfficeCore.AgaveVisualErrorCodes || (OfficeCore.AgaveVisualErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "ExperimentApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeFlightingService = "FlightingService"; + var FlightingService = (function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId = function () { + return _invokeMethod(this, "GetClientSessionId", 1, [], 4, 0); + }; + FlightingService.prototype.getDeferredFlights = function () { + return _invokeMethod(this, "GetDeferredFlights", 1, [], 4, 0); + }; + FlightingService.prototype.getFeature = function (featureName, type, defaultValue, possibleValues) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null, 4); + }; + FlightingService.prototype.getFeatureGate = function (featureName, scope) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeatureGate", 1, [featureName, scope], false, false, null, 4); + }; + FlightingService.prototype.resetOverride = function (featureName) { + _invokeMethod(this, "ResetOverride", 0, [featureName], 0, 0); + }; + FlightingService.prototype.setOverride = function (featureName, type, value) { + _invokeMethod(this, "SetOverride", 0, [featureName, type, value], 0, 0); + }; + FlightingService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FlightingService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FlightingService, context, "Microsoft.Experiment.FlightingService", false, 4); + }; + FlightingService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService = FlightingService; + var _typeABType = "ABType"; + var ABType = (function (_super) { + __extends(ABType, _super); + function ABType() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeABType, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + ABType.prototype.load = function (option) { + return _load(this, option); + }; + ABType.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + ABType.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ABType.prototype.toJSON = function () { + return _toJson(this, { + "value": this._V + }, {}); + }; + ABType.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType = ABType; + var FeatureType; + (function (FeatureType) { + FeatureType["boolean"] = "Boolean"; + FeatureType["integer"] = "Integer"; + FeatureType["string"] = "String"; + })(FeatureType = OfficeCore.FeatureType || (OfficeCore.FeatureType = {})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes["generalException"] = "GeneralException"; + })(ExperimentErrorCodes = OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyDialog; +(function (OfficeFirstPartyDialog) { + var Dialog = (function () { + function Dialog(_dialogService) { + this._dialogService = _dialogService; + } + Dialog.prototype.close = function () { + this._dialogService.close(); + return this._dialogService.context.sync(); + }; + Dialog.prototype.messageChild = function (message, options) { + if (DialogApiManager && DialogApiManager.messageChildRichApiBridge) { + DialogApiManager.messageChildRichApiBridge(message, options); + } + }; + return Dialog; + }()); + OfficeFirstPartyDialog.Dialog = Dialog; + function lookupErrorCodeAndMessage(internalCode) { + var _a; + var table = (_a = {}, + _a[12002] = { code: "InvalidUrl", message: "Cannot load URL, no such page or bad URL syntax." }, + _a[12003] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12004] = { code: "Untrusted", message: "Domain is not trusted." }, + _a[12005] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12007] = { code: "FailedToOpen", message: "Another dialog is already opened." }, + _a); + if (table[internalCode]) { + return table[internalCode]; + } + else { + return { code: "Unknown", message: "An unknown error has occured with code: " + internalCode }; + } + } + function displayWebDialog(url, options) { + if (options === void 0) { + options = {}; + } + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) { + throw new OfficeExtension.Error({ code: "InvalidArgument", message: 'Dimensions must be "number%" or number.' }); + } + var ctx = new OfficeExtension.ClientRequestContext(); + var dialogService = OfficeCore.FirstPartyDialogService.newObject(ctx); + var dialog = new OfficeFirstPartyDialog.Dialog(dialogService); + var eventResult = dialogService.onDialogMessage.add(function (args) { + OfficeExtension.Utility.log("dialogMessageHandler:" + JSON.stringify(args)); + var parsedMessage = JSON.parse(args.message); + var eventError = parsedMessage.errorCode + ? new OfficeExtension.Error(lookupErrorCodeAndMessage(parsedMessage.errorCode)) + : null; + var messageType = parsedMessage.type; + var origin = parsedMessage.origin; + var messageContent = parsedMessage.message; + switch (messageType) { + case 17: + if (eventError) { + reject(eventError); + } + else { + resolve(dialog); + } + break; + case 12: + if (options.onMessage) { + options.onMessage(messageContent, dialog, origin); + } + break; + case 10: + default: + if (parsedMessage.errorCode === 12006) { + if (eventResult) { + eventResult.remove(); + ctx.sync(); + } + if (options.onClose) { + options.onClose(); + } + } + else { + if (options.onRuntimeError) { + options.onRuntimeError(eventError, dialog); + reject(eventError); + } + } + } + return OfficeExtension.CoreUtility.Promise.resolve(); + }); + return ctx.sync() + .then(function () { + var dialogOptions = { + width: options.width ? parseInt(options.width) : 50, + height: options.height ? parseInt(options.height) : 50, + displayInIFrame: options.displayInIFrame, + dialogTitle: options.dialogTitle + }; + dialogService.displayDialog(url, dialogOptions); + return ctx.sync(); + })["catch"](function (e) { + reject(e); + }); + }); + function isInt(value) { + return (/^(\-|\+)?([0-9]+)%?$/.test(value)); + } + } + OfficeFirstPartyDialog.displayWebDialog = displayWebDialog; + var DialogEventType; + (function (DialogEventType) { + DialogEventType[DialogEventType["dialogMessageReceived"] = 0] = "dialogMessageReceived"; + DialogEventType[DialogEventType["dialogEventReceived"] = 1] = "dialogEventReceived"; + })(DialogEventType || (DialogEventType = {})); +})(OfficeFirstPartyDialog || (OfficeFirstPartyDialog = {})); +var OfficeCore; +(function (OfficeCore) { + OfficeCore.OfficeOnlineDomainList = [ + "*.dod.online.office365.us", + "*.gov.online.office365.us", + "*.officeapps-df.live.com", + "*.officeapps.live.com", + "*.online.office.de", + "*.partner.officewebapps.cn" + ]; + function isHostOriginTrusted() { + if (typeof window.external === 'undefined' || + typeof window.external.GetContext === 'undefined') { + var hostUrl = OSF.getClientEndPoint()._targetUrl; + var hostname_1 = getHostNameFromUrl(hostUrl); + if (hostUrl.indexOf("https:") != 0) { + return false; + } + OfficeCore.OfficeOnlineDomainList.forEach(function (domain) { + if (domain.indexOf("*.") == 0) { + domain = domain.substring(2); + } + if (hostname_1.indexOf(domain) == hostname_1.length - domain.length) { + return true; + } + }); + return false; + } + return true; + } + OfficeCore.isHostOriginTrusted = isHostOriginTrusted; + function getHostNameFromUrl(url) { + var hostName = ""; + hostName = url.split("/")[2]; + hostName = hostName.split(":")[0]; + hostName = hostName.split("?")[0]; + return hostName; + } +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var FirstPartyApis = (function () { + function FirstPartyApis(context) { + this.context = context; + } + Object.defineProperty(FirstPartyApis.prototype, "roamingSettings", { + get: function () { + if (!this.m_roamingSettings) { + this.m_roamingSettings = OfficeCore.AuthenticationService.newObject(this.context).roamingSettings; + } + return this.m_roamingSettings; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "tap", { + get: function () { + if (!this.m_tap) { + this.m_tap = OfficeCore.Tap.newObject(this.context); + } + return this.m_tap; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "skill", { + get: function () { + if (!this.m_skill) { + this.m_skill = OfficeCore.Skill.newObject(this.context); + } + return this.m_skill; + }, + enumerable: true, + configurable: true + }); + return FirstPartyApis; + }()); + OfficeCore.FirstPartyApis = FirstPartyApis; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + return _super.call(this, url) || this; + } + Object.defineProperty(RequestContext.prototype, "firstParty", { + get: function () { + if (!this.m_firstPartyApis) { + this.m_firstPartyApis = new FirstPartyApis(this); + } + return this.m_firstPartyApis; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry = OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "ribbon", { + get: function () { + if (!this.m_ribbon) { + this.m_ribbon = OfficeCore.DynamicRibbon.newObject(this); + } + return this.m_ribbon; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "bi", { + get: function () { + if (!this.m_biShim) { + this.m_biShim = OfficeCore.BiShim.newObject(this); + } + return this.m_biShim; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService = OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext = RequestContext; + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("OfficeCore.run", arguments, function (requestInfo) { return new OfficeCore.RequestContext(requestInfo); }); + } + OfficeCore.run = run; +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var license; + (function (license_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function isFeatureEnabled(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, isEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isEnabled = license.isFeatureEnabled(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isEnabled.value]; + } + }); + }); + } + license_1.isFeatureEnabled = isFeatureEnabled; + function getFeatureTier(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, tier; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + tier = license.getFeatureTier(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, tier.value]; + } + }); + }); + } + license_1.getFeatureTier = getFeatureTier; + function isFreemiumUpsellEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, license, isFreemiumUpsellEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isFreemiumUpsellEnabled = license.isFreemiumUpsellEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isFreemiumUpsellEnabled.value]; + } + }); + }); + } + license_1.isFreemiumUpsellEnabled = isFreemiumUpsellEnabled; + function launchUpsellExperience(experienceId) { + return __awaiter(this, void 0, void 0, function () { + var context, license; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + license.launchUpsellExperience(experienceId); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + license_1.launchUpsellExperience = launchUpsellExperience; + function onFeatureStateChanged(feature, listener) { + return __awaiter(this, void 0, void 0, function () { + var context, license, licenseFeature, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + licenseFeature = license.getLicenseFeature(feature); + licenseFeature.onStateChanged.add(listener); + removeListener = function () { + licenseFeature.onStateChanged.remove(listener); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + license_1.onFeatureStateChanged = onFeatureStateChanged; + function getMsaDeviceTicket(resource, policy, options) { + return __awaiter(this, void 0, void 0, function () { + var context, license, msaDeviceTicket; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + msaDeviceTicket = license.getMsaDeviceTicket(resource, policy, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, msaDeviceTicket.value]; + } + }); + }); + } + license_1.getMsaDeviceTicket = getMsaDeviceTicket; + })(license = Office.license || (Office.license = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeSkill = "Skill"; + var Skill = (function (_super) { + __extends(Skill, _super); + function Skill() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Skill.prototype, "_className", { + get: function () { + return "Skill"; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.executeAction = function (paneId, actionId, actionDescriptor) { + return _invokeMethod(this, "ExecuteAction", 1, [paneId, actionId, actionDescriptor], 4 | 1, 0); + }; + Skill.prototype.notifyPaneEvent = function (paneId, eventDescriptor) { + _invokeMethod(this, "NotifyPaneEvent", 1, [paneId, eventDescriptor], 4 | 1, 0); + }; + Skill.prototype.registerHostSkillEvent = function () { + _invokeMethod(this, "RegisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype.testFireEvent = function () { + _invokeMethod(this, "TestFireEvent", 0, [], 1, 0); + }; + Skill.prototype.unregisterHostSkillEvent = function () { + _invokeMethod(this, "UnregisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Skill.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Skill.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Skill, context, "Microsoft.SkillApi.Skill", false, 4); + }; + Object.defineProperty(Skill.prototype, "onHostSkillEvent", { + get: function () { + var _this = this; + if (!this.m_hostSkillEvent) { + this.m_hostSkillEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "HostSkillEvent", { + eventType: 65538, + registerFunc: function () { return _this.registerHostSkillEvent(); }, + unregisterFunc: function () { return _this.unregisterHostSkillEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.Skill_HostSkillEvent_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostSkillEvent; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Skill; + }(OfficeExtension.ClientObject)); + OfficeCore.Skill = Skill; + var _CC; + (function (_CC) { + function Skill_HostSkillEvent_EventArgsTransform(thisObj, args) { + var transformedArgs = { + type: args.type, + data: args.data + }; + return transformedArgs; + } + _CC.Skill_HostSkillEvent_EventArgsTransform = Skill_HostSkillEvent_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var SkillErrorCodes; + (function (SkillErrorCodes) { + SkillErrorCodes["generalException"] = "GeneralException"; + })(SkillErrorCodes = OfficeCore.SkillErrorCodes || (OfficeCore.SkillErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "TelemetryApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeTelemetryService = "TelemetryService"; + var TelemetryService = (function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendCustomerContent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _throwIfApiNotSupported("TelemetryService.sendCustomerContent", "Telemetry", "1.3", _hostName); + _invokeMethod(this, "SendCustomerContent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype.sendTelemetryEvent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _invokeMethod(this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + TelemetryService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.TelemetryService, context, "Microsoft.Telemetry.TelemetryService", false, 4); + }; + TelemetryService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService = TelemetryService; + var DataFieldType; + (function (DataFieldType) { + DataFieldType["unset"] = "Unset"; + DataFieldType["string"] = "String"; + DataFieldType["boolean"] = "Boolean"; + DataFieldType["int64"] = "Int64"; + DataFieldType["double"] = "Double"; + })(DataFieldType = OfficeCore.DataFieldType || (OfficeCore.DataFieldType = {})); + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes["generalException"] = "GeneralException"; + })(TelemetryErrorCodes = OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyAuth; +(function (OfficeFirstPartyAuth) { + var WebAuthReplyUrlsStorageKey = "officeWebAuthReplyUrls"; + var loaded = false; + OfficeFirstPartyAuth.authFlow = "authcode"; + OfficeFirstPartyAuth.autoPopup = false; + OfficeFirstPartyAuth.upnCheck = true; + OfficeFirstPartyAuth.msal = "https://alcdn.msauth.net/browser-1p/2.28.1/js/msal-browser-1p.min.js"; + OfficeFirstPartyAuth.debugging = false; + OfficeFirstPartyAuth.delay = 0; + OfficeFirstPartyAuth.delayMsal = 0; + function load(replyUrl, prefetch) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF.WebAuth && OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + var retrievedAuthContext = false; + try { + if (!Office || !Office.context || !Office.context.webAuth) { + reject({ + code: "GetAuthContextAsyncMissing", + message: "Office:[" + !Office + "],Office.context:[" + !Office.context + "],Office.context.webAuth:[" + !Office.context.webAuth + "]" + }); + return; + } + Office.context.webAuth.getAuthContextAsync(function (result) { + if (result.status === "succeeded") { + retrievedAuthContext = true; + var authContext = result.value; + if (!authContext || authContext.isAnonymous) { + reject({ + code: "CannotGetAuthContext", + message: authContext.Error + }); + return; + } + var isMsa = authContext.authorityType.toLowerCase() === 'msa'; + OSF.WebAuth.config = { + authFlow: OfficeFirstPartyAuth.authFlow, + authVersion: (OfficeFirstPartyAuth.authVersion) ? OfficeFirstPartyAuth.authVersion : null, + msal: OfficeFirstPartyAuth.msal, + delayWebAuth: OfficeFirstPartyAuth.delay, + delayMsal: OfficeFirstPartyAuth.delayMsal, + debugging: OfficeFirstPartyAuth.debugging, + authority: (OfficeFirstPartyAuth.authorityOverride) ? OfficeFirstPartyAuth.authorityOverride : authContext.authority, + idp: authContext.authorityType.toLowerCase(), + appIds: [isMsa ? (authContext.msaAppId) ? authContext.msaAppId : authContext.appId : authContext.appId], + redirectUri: (replyUrl) ? replyUrl : null, + upn: authContext.upn, + puid: authContext.userId, + prefetch: prefetch, + telemetryInstance: 'otel', + autoPopup: OfficeFirstPartyAuth.autoPopup, + enableUpnCheck: OfficeFirstPartyAuth.upnCheck, + enableConsoleLogging: OfficeFirstPartyAuth.debugging + }; + OSF.WebAuth.load().then(function (result) { + loaded = true; + logLoadEvent(result, loaded); + resolve(); + })["catch"](function (result) { + logLoadEvent(result, loaded); + reject({ + code: "PackageNotLoaded", + message: (result instanceof Event) ? result.type : result + }); + }); + if (OfficeFirstPartyAuth.authFlow === "implicit") { + var finalReplyUrl = (replyUrl) ? replyUrl : window.location.href.split("?")[0]; + var replyUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (replyUrls || replyUrls === "") { + replyUrls = finalReplyUrl; + } + else { + replyUrls += ", " + finalReplyUrl; + } + if (replyUrls) + sessionStorage.setItem(WebAuthReplyUrlsStorageKey, replyUrls); + } + } + else { + OSF.WebAuth.config = null; + reject({ + code: "CannotGetAuthContext", + message: result.status + }); + } + }); + } + catch (e) { + OSF.WebAuth.config = null; + OSF.WebAuth.load().then(function () { + resolve(); + })["catch"](function () { + reject({ + code: retrievedAuthContext ? "CannotGetAuthContext" : "FailedToLoad", + message: e + }); + }); + } + } + else { + resolve(); + } + }); + } + OfficeFirstPartyAuth.load = load; + function getAccessToken(options, behaviorOption) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + Office.context.webAuth.getAuthContextAsync(function (result) { + var supportsAuthToken = false; + if (result.status === "succeeded") { + var authContext = result.value; + if (authContext.supportsAuthToken) { + supportsAuthToken = true; + } + } + if (!supportsAuthToken) { + if (OSF.WebAuth && loaded) { + if (OSF.WebAuth.config.appIds[0]) { + OSF.WebAuth.getToken(options.resource, OSF.WebAuth.config.appIds[0], OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : null, (options && options.authChallenge) ? options.authChallenge : null).then(function (result) { + logAcquireEvent(result, true, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + resolve({ + accessToken: result.Token, + tokenIdenityType: (OSF.WebAuth.config.idp.toLowerCase() == "msa") + ? OfficeCore.IdentityType.microsoftAccount + : OfficeCore.IdentityType.organizationAccount + }); + })["catch"](function (result) { + logAcquireEvent(result, false, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + reject({ + code: result.ErrorCode, + message: (result instanceof Event) ? result.type : result.ErrorMessage + }); + }); + } + } + else { + logUnexpectedAcquire(loaded, OSF.WebAuth.loadAttempts); + } + } + else { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result_1 = auth.getAccessToken(options, null); + context.sync().then(function () { + resolve(result_1.value); + }); + } + }); + } + else { + var context_1 = new OfficeCore.RequestContext(); + var auth_1 = OfficeCore.AuthenticationService.newObject(context_1); + var handler_1 = auth_1.onTokenReceived.add(function (arg) { + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + handler_1.remove(); + context_1.sync()["catch"](function () { + }); + if (arg.code == 0) { + resolve(arg.tokenValue); + } + else { + if (OfficeExtension.CoreUtility.isNullOrUndefined(arg.errorInfo)) { + reject({ code: arg.code }); + } + else { + try { + reject(JSON.parse(arg.errorInfo)); + } + catch (e) { + reject({ code: arg.code, message: arg.errorInfo }); + } + } + } + } + return null; + }); + context_1.sync() + .then(function () { + var apiResult = auth_1.getAccessToken(options, auth_1._targetId); + return context_1.sync() + .then(function () { + if (OfficeExtension.CoreUtility.isNullOrUndefined(apiResult.value)) { + return null; + } + var tokenValue = apiResult.value.accessToken; + if (!OfficeExtension.CoreUtility.isNullOrUndefined(tokenValue)) { + resolve(apiResult.value); + } + }); + })["catch"](function (e) { + reject(e); + }); + } + }); + } + OfficeFirstPartyAuth.getAccessToken = getAccessToken; + function getPrimaryIdentityInfo() { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result = auth.getPrimaryIdentityInfo(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getPrimaryIdentityInfo = getPrimaryIdentityInfo; + function getIdentities() { + var context = new OfficeCore.RequestContext(); + var auth_service = OfficeCore.AuthenticationService.newObject(context); + var result = auth_service.getIdentities(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getIdentities = getIdentities; + function logLoadEvent(result, succeeded) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : "") + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'loadedApplicationCount': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + case 'timeToLoad': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.Load", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logAcquireEvent(result, succeeded, popup) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Popup', (typeof popup === "boolean") ? popup : false), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : result.ErrorCode), + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'timeToGetToken': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.GetAccessToken", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logUnexpectedAcquire(loadResult, loadAttempts) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeBooleanDataField('Loaded', loadResult), + oteljs.makeInt64DataField('LoadAttempts', (typeof loadAttempts === "number") ? loadAttempts : 0) + ]; + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.UnexpectedAcquire", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function loadWebAuthForReplyPage() { + try { + if (typeof (window) === "undefined" || !window.sessionStorage) { + return; + } + var webAuthRedirectUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (webAuthRedirectUrls !== null && webAuthRedirectUrls.indexOf(window.location.origin + window.location.pathname) !== -1) { + load(); + } + } + catch (ex) { + console.error(ex); + } + } + if (typeof (window) !== "undefined" && window.OSF) { + loadWebAuthForReplyPage(); + } +})(OfficeFirstPartyAuth || (OfficeFirstPartyAuth = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var IdentityType; + (function (IdentityType) { + IdentityType["organizationAccount"] = "OrganizationAccount"; + IdentityType["microsoftAccount"] = "MicrosoftAccount"; + IdentityType["unsupported"] = "Unsupported"; + })(IdentityType = OfficeCore.IdentityType || (OfficeCore.IdentityType = {})); + var _typeAuthenticationService = "AuthenticationService"; + var AuthenticationService = (function (_super) { + __extends(AuthenticationService, _super); + function AuthenticationService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AuthenticationService.prototype, "_className", { + get: function () { + return "AuthenticationService"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "_navigationPropertyNames", { + get: function () { + return ["roamingSettings"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "roamingSettings", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.RoamingSettingCollection, this, "RoamingSettings", false, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.getAccessToken = function (tokenParameters, targetId) { + return _invokeMethod(this, "GetAccessToken", 1, [tokenParameters, targetId], 4 | 1, 0); + }; + AuthenticationService.prototype.getIdentities = function () { + _throwIfApiNotSupported("AuthenticationService.getIdentities", "FirstPartyAuthentication", "1.3", _hostName); + return _invokeMethod(this, "GetIdentities", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.getPrimaryIdentityInfo = function () { + _throwIfApiNotSupported("AuthenticationService.getPrimaryIdentityInfo", "FirstPartyAuthentication", "1.2", _hostName); + return _invokeMethod(this, "GetPrimaryIdentityInfo", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.registerIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.registerIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "RegisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype.unregisterIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.unregisterIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "UnregisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["roamingSettings", "RoamingSettings"]); + }; + AuthenticationService.prototype.load = function (options) { + return _load(this, options); + }; + AuthenticationService.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + AuthenticationService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AuthenticationService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AuthenticationService, context, "Microsoft.Authentication.AuthenticationService", false, 4); + }; + Object.defineProperty(AuthenticationService.prototype, "onIdentityChanged", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onIdentityChanged", "FirstPartyAuthentication", "1.5", _hostName); + if (!this.m_identityChanged) { + this.m_identityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityChanged", { + eventType: 65545, + registerFunc: function () { return _this.registerIdentityChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterIdentityChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + email: value.email, + environment: value.environment, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "onTokenReceived", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onTokenReceived", "FirstPartyAuthentication", "1.2", _hostName); + if (!this.m_tokenReceived) { + this.m_tokenReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "TokenReceived", { + eventType: 3001, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return _this._targetId; }, + eventArgsTransformFunc: function (value) { + var event = _CC.AuthenticationService_TokenReceived_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_tokenReceived; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AuthenticationService; + }(OfficeExtension.ClientObject)); + OfficeCore.AuthenticationService = AuthenticationService; + var AuthenticationServiceCustom = (function () { + function AuthenticationServiceCustom() { + } + Object.defineProperty(AuthenticationServiceCustom.prototype, "_targetId", { + get: function () { + if (this.m_targetId == undefined) { + if (typeof (OSF) !== 'undefined' && OSF.OUtil) { + this.m_targetId = OSF.OUtil.Guid.generateNewGuid(); + } + else { + this.m_targetId = "" + this.context._nextId(); + } + } + return this.m_targetId; + }, + enumerable: true, + configurable: true + }); + return AuthenticationServiceCustom; + }()); + OfficeCore.AuthenticationServiceCustom = AuthenticationServiceCustom; + OfficeExtension.Utility.applyMixin(AuthenticationService, AuthenticationServiceCustom); + var _CC; + (function (_CC) { + function AuthenticationService_TokenReceived_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + tokenValue: value.tokenValue, + code: value.code, + errorInfo: value.errorInfo + }; + return newArgs; + } + _CC.AuthenticationService_TokenReceived_EventArgsTransform = AuthenticationService_TokenReceived_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeRoamingSetting = "RoamingSetting"; + var RoamingSetting = (function (_super) { + __extends(RoamingSetting, _super); + function RoamingSetting() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSetting.prototype, "_className", { + get: function () { + return "RoamingSetting"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRoamingSetting, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeRoamingSetting, this._isNull); + return this._V; + }, + set: function (value) { + this._V = value; + _invokeSetProperty(this, "Value", value, 0); + }, + enumerable: true, + configurable: true + }); + RoamingSetting.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["value"], [], []); + }; + RoamingSetting.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RoamingSetting.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + RoamingSetting.prototype.load = function (options) { + return _load(this, options); + }; + RoamingSetting.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RoamingSetting.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RoamingSetting.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSetting.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I, + "value": this._V + }, {}); + }; + RoamingSetting.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RoamingSetting.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RoamingSetting; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSetting = RoamingSetting; + var _typeRoamingSettingCollection = "RoamingSettingCollection"; + var RoamingSettingCollection = (function (_super) { + __extends(RoamingSettingCollection, _super); + function RoamingSettingCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSettingCollection.prototype, "_className", { + get: function () { + return "RoamingSettingCollection"; + }, + enumerable: true, + configurable: true + }); + RoamingSettingCollection.prototype.getItem = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItem", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype.getItemOrNullObject = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItemOrNullObject", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RoamingSettingCollection.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSettingCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RoamingSettingCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSettingCollection = RoamingSettingCollection; + var _typeBeforeDocumentCloseNotification = "BeforeDocumentCloseNotification"; + var BeforeDocumentCloseNotification = (function (_super) { + __extends(BeforeDocumentCloseNotification, _super); + function BeforeDocumentCloseNotification() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "_className", { + get: function () { + return "BeforeDocumentCloseNotification"; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.disable = function () { + _invokeMethod(this, "Disable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype.enable = function () { + _invokeMethod(this, "Enable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BeforeDocumentCloseNotification.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BeforeDocumentCloseNotification.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BeforeDocumentCloseNotification, context, "Microsoft.BeforeDocumentCloseNotification.BeforeDocumentCloseNotification", false, 4); + }; + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "onBeforeCloseNotificationCancelled", { + get: function () { + if (!this.m_beforeCloseNotificationCancelled) { + this.m_beforeCloseNotificationCancelled = new OfficeExtension.GenericEventHandlers(this.context, this, "BeforeCloseNotificationCancelled", { + eventType: 65540, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_beforeCloseNotificationCancelled; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BeforeDocumentCloseNotification; + }(OfficeExtension.ClientObject)); + OfficeCore.BeforeDocumentCloseNotification = BeforeDocumentCloseNotification; + var ServiceProvider; + (function (ServiceProvider) { + ServiceProvider["ariaBrowserPipeUrl"] = "AriaBrowserPipeUrl"; + ServiceProvider["ariaUploadUrl"] = "AriaUploadUrl"; + ServiceProvider["ariaVNextUploadUrl"] = "AriaVNextUploadUrl"; + ServiceProvider["lokiAutoDiscoverUrl"] = "LokiAutoDiscoverUrl"; + })(ServiceProvider = OfficeCore.ServiceProvider || (OfficeCore.ServiceProvider = {})); + var _typeServiceUrlProvider = "ServiceUrlProvider"; + var ServiceUrlProvider = (function (_super) { + __extends(ServiceUrlProvider, _super); + function ServiceUrlProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceUrlProvider.prototype, "_className", { + get: function () { + return "ServiceUrlProvider"; + }, + enumerable: true, + configurable: true + }); + ServiceUrlProvider.prototype.getServiceUrl = function (emailAddress, provider) { + return _invokeMethod(this, "GetServiceUrl", 1, [emailAddress, provider], 4, 0); + }; + ServiceUrlProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceUrlProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceUrlProvider.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceUrlProvider, context, "Microsoft.DesktopCompliance.ServiceUrlProvider", false, 4); + }; + ServiceUrlProvider.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceUrlProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceUrlProvider = ServiceUrlProvider; + var _typeLinkedIn = "LinkedIn"; + var LinkedIn = (function (_super) { + __extends(LinkedIn, _super); + function LinkedIn() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LinkedIn.prototype, "_className", { + get: function () { + return "LinkedIn"; + }, + enumerable: true, + configurable: true + }); + LinkedIn.prototype.isEnabledForOffice = function () { + return _invokeMethod(this, "IsEnabledForOffice", 1, [], 4, 0); + }; + LinkedIn.prototype.recordLinkedInSettingsCompliance = function (featureName, isEnabled) { + _invokeMethod(this, "RecordLinkedInSettingsCompliance", 0, [featureName, isEnabled], 0, 0); + }; + LinkedIn.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LinkedIn.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LinkedIn.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LinkedIn, context, "Microsoft.DesktopCompliance.LinkedIn", false, 4); + }; + LinkedIn.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LinkedIn; + }(OfficeExtension.ClientObject)); + OfficeCore.LinkedIn = LinkedIn; + var _typeNetworkUsage = "NetworkUsage"; + var NetworkUsage = (function (_super) { + __extends(NetworkUsage, _super); + function NetworkUsage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(NetworkUsage.prototype, "_className", { + get: function () { + return "NetworkUsage"; + }, + enumerable: true, + configurable: true + }); + NetworkUsage.prototype.isInDisconnectedMode = function () { + return _invokeMethod(this, "IsInDisconnectedMode", 1, [], 4, 0); + }; + NetworkUsage.prototype.isInOnlineMode = function () { + return _invokeMethod(this, "IsInOnlineMode", 1, [], 4, 0); + }; + NetworkUsage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + NetworkUsage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + NetworkUsage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.NetworkUsage, context, "Microsoft.DesktopCompliance.NetworkUsage", false, 4); + }; + NetworkUsage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return NetworkUsage; + }(OfficeExtension.ClientObject)); + OfficeCore.NetworkUsage = NetworkUsage; + var _typeDynamicRibbon = "DynamicRibbon"; + var DynamicRibbon = (function (_super) { + __extends(DynamicRibbon, _super); + function DynamicRibbon() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DynamicRibbon.prototype, "_className", { + get: function () { + return "DynamicRibbon"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "_navigationPropertyNames", { + get: function () { + return ["buttons"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "buttons", { + get: function () { + if (!this._B) { + this._B = _createPropertyObject(OfficeCore.RibbonButtonCollection, this, "Buttons", true, 4); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + DynamicRibbon.prototype.executeRequestCreate = function (jsonCreate) { + _throwIfApiNotSupported("DynamicRibbon.executeRequestCreate", "DynamicRibbon", "1.2", _hostName); + _invokeMethod(this, "ExecuteRequestCreate", 1, [jsonCreate], 4, 0); + }; + DynamicRibbon.prototype.executeRequestUpdate = function (jsonUpdate) { + _invokeMethod(this, "ExecuteRequestUpdate", 1, [jsonUpdate], 4, 0); + }; + DynamicRibbon.prototype.getButton = function (id) { + return _createMethodObject(OfficeCore.RibbonButton, this, "GetButton", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype.getTab = function (id) { + return _createMethodObject(OfficeCore.RibbonTab, this, "GetTab", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["buttons", "Buttons"]); + }; + DynamicRibbon.prototype.load = function (options) { + return _load(this, options); + }; + DynamicRibbon.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + DynamicRibbon.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DynamicRibbon.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DynamicRibbon, context, "Microsoft.DynamicRibbon.DynamicRibbon", false, 4); + }; + DynamicRibbon.prototype.toJSON = function () { + return _toJson(this, {}, { + "buttons": this._B + }); + }; + return DynamicRibbon; + }(OfficeExtension.ClientObject)); + OfficeCore.DynamicRibbon = DynamicRibbon; + var _typeRibbonTab = "RibbonTab"; + var RibbonTab = (function (_super) { + __extends(RibbonTab, _super); + function RibbonTab() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonTab.prototype, "_className", { + get: function () { + return "RibbonTab"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonTab, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + RibbonTab.prototype.setVisibility = function (visibility) { + _invokeMethod(this, "SetVisibility", 0, [visibility], 0, 0); + }; + RibbonTab.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + RibbonTab.prototype.load = function (options) { + return _load(this, options); + }; + RibbonTab.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonTab.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonTab.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonTab.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + RibbonTab.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonTab.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonTab; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonTab = RibbonTab; + var _typeRibbonButton = "RibbonButton"; + var RibbonButton = (function (_super) { + __extends(RibbonButton, _super); + function RibbonButton() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButton.prototype, "_className", { + get: function () { + return "RibbonButton"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "enabled", "label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Enabled", "Label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "enabled", { + get: function () { + _throwIfNotLoaded("enabled", this._E, _typeRibbonButton, this._isNull); + return this._E; + }, + set: function (value) { + this._E = value; + _invokeSetProperty(this, "Enabled", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonButton, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "label", { + get: function () { + _throwIfNotLoaded("label", this._L, _typeRibbonButton, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + RibbonButton.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["enabled"], [], []); + }; + RibbonButton.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RibbonButton.prototype.setEnabled = function (enabled) { + _invokeMethod(this, "SetEnabled", 0, [enabled], 0, 0); + }; + RibbonButton.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Enabled"])) { + this._E = obj["Enabled"]; + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Label"])) { + this._L = obj["Label"]; + } + }; + RibbonButton.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButton.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButton.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonButton.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonButton.prototype.toJSON = function () { + return _toJson(this, { + "enabled": this._E, + "id": this._I, + "label": this._L + }, {}); + }; + RibbonButton.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonButton.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonButton; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButton = RibbonButton; + var _typeRibbonButtonCollection = "RibbonButtonCollection"; + var RibbonButtonCollection = (function (_super) { + __extends(RibbonButtonCollection, _super); + function RibbonButtonCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButtonCollection.prototype, "_className", { + get: function () { + return "RibbonButtonCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeRibbonButtonCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + RibbonButtonCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + RibbonButtonCollection.prototype.getItem = function (key) { + return _createIndexerObject(OfficeCore.RibbonButton, this, [key]); + }; + RibbonButtonCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.RibbonButton, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + RibbonButtonCollection.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButtonCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButtonCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }); + }; + RibbonButtonCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + RibbonButtonCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return RibbonButtonCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButtonCollection = RibbonButtonCollection; + var _typeFirstPartyDialogService = "FirstPartyDialogService"; + var FirstPartyDialogService = (function (_super) { + __extends(FirstPartyDialogService, _super); + function FirstPartyDialogService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FirstPartyDialogService.prototype, "_className", { + get: function () { + return "FirstPartyDialogService"; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4 | 1, 0); + }; + FirstPartyDialogService.prototype.displayDialog = function (url, options) { + _invokeMethod(this, "DisplayDialog", 1, [url, options], 4 | 1, 0); + }; + FirstPartyDialogService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FirstPartyDialogService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FirstPartyDialogService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FirstPartyDialogService, context, "Microsoft.FirstPartyDialog.FirstPartyDialogService", false, 4); + }; + Object.defineProperty(FirstPartyDialogService.prototype, "onDialogMessage", { + get: function () { + var _this = this; + if (!this.m_dialogMessage) { + this.m_dialogMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "DialogMessage", { + eventType: 65536, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_dialogMessage; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FirstPartyDialogService; + }(OfficeExtension.ClientObject)); + OfficeCore.FirstPartyDialogService = FirstPartyDialogService; + (function (_CC) { + function FirstPartyDialogService_DialogMessage_EventArgsTransform(thisObj, args) { + return { + message: args.message + }; + } + _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform = FirstPartyDialogService_DialogMessage_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var TimeStringFormat; + (function (TimeStringFormat) { + TimeStringFormat["shortTime"] = "ShortTime"; + TimeStringFormat["longTime"] = "LongTime"; + TimeStringFormat["shortDate"] = "ShortDate"; + TimeStringFormat["longDate"] = "LongDate"; + })(TimeStringFormat = OfficeCore.TimeStringFormat || (OfficeCore.TimeStringFormat = {})); + var _typeLocaleApi = "LocaleApi"; + var LocaleApi = (function (_super) { + __extends(LocaleApi, _super); + function LocaleApi() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LocaleApi.prototype, "_className", { + get: function () { + return "LocaleApi"; + }, + enumerable: true, + configurable: true + }); + LocaleApi.prototype.formatDateTimeString = function (localeName, value, format) { + return _invokeMethod(this, "FormatDateTimeString", 1, [localeName, value, format], 4, 0); + }; + LocaleApi.prototype.getLocaleDateTimeFormattingInfo = function (localeName) { + return _invokeMethod(this, "GetLocaleDateTimeFormattingInfo", 1, [localeName], 4, 0); + }; + LocaleApi.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LocaleApi.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LocaleApi.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LocaleApi, context, "Microsoft.LocaleApi.LocaleApi", false, 4); + }; + LocaleApi.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LocaleApi; + }(OfficeExtension.ClientObject)); + OfficeCore.LocaleApi = LocaleApi; + var _typeComment = "Comment"; + var Comment = (function (_super) { + __extends(Comment, _super); + function Comment() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Comment.prototype, "_className", { + get: function () { + return "Comment"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "text", "created", "level", "resolved", "author", "mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Text", "Created", "Level", "Resolved", "Author", "Mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false, false, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_navigationPropertyNames", { + get: function () { + return ["parent", "parentOrNullObject", "replies"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parent", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.Comment, this, "Parent", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parentOrNullObject", { + get: function () { + if (!this._Pa) { + this._Pa = _createPropertyObject(OfficeCore.Comment, this, "ParentOrNullObject", false, 4); + } + return this._Pa; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "replies", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.CommentCollection, this, "Replies", true, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "author", { + get: function () { + _throwIfNotLoaded("author", this._A, _typeComment, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "created", { + get: function () { + _throwIfNotLoaded("created", this._C, _typeComment, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeComment, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "level", { + get: function () { + _throwIfNotLoaded("level", this._L, _typeComment, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "mentions", { + get: function () { + _throwIfNotLoaded("mentions", this._M, _typeComment, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "resolved", { + get: function () { + _throwIfNotLoaded("resolved", this._Re, _typeComment, this._isNull); + return this._Re; + }, + set: function (value) { + this._Re = value; + _invokeSetProperty(this, "Resolved", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeComment, this._isNull); + return this._T; + }, + set: function (value) { + this._T = value; + _invokeSetProperty(this, "Text", value, 0); + }, + enumerable: true, + configurable: true + }); + Comment.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["text", "resolved"], [], [ + "parent", + "parentOrNullObject", + "replies" + ]); + }; + Comment.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Comment.prototype["delete"] = function () { + _invokeMethod(this, "Delete", 0, [], 0, 0); + }; + Comment.prototype.getParentOrSelf = function () { + return _createMethodObject(OfficeCore.Comment, this, "GetParentOrSelf", 1, [], false, false, null, 4); + }; + Comment.prototype.getRichText = function (format) { + return _invokeMethod(this, "GetRichText", 1, [format], 4, 0); + }; + Comment.prototype.reply = function (text, format) { + return _createMethodObject(OfficeCore.Comment, this, "Reply", 0, [text, format], false, false, null, 0); + }; + Comment.prototype.setRichText = function (text, format) { + return _invokeMethod(this, "SetRichText", 0, [text, format], 0, 0); + }; + Comment.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Author"])) { + this._A = obj["Author"]; + } + if (!_isUndefined(obj["Created"])) { + this._C = _adjustToDateTime(obj["Created"]); + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Level"])) { + this._L = obj["Level"]; + } + if (!_isUndefined(obj["Mentions"])) { + this._M = obj["Mentions"]; + } + if (!_isUndefined(obj["Resolved"])) { + this._Re = obj["Resolved"]; + } + if (!_isUndefined(obj["Text"])) { + this._T = obj["Text"]; + } + _handleNavigationPropertyResults(this, obj, ["parent", "Parent", "parentOrNullObject", "ParentOrNullObject", "replies", "Replies"]); + }; + Comment.prototype.load = function (options) { + return _load(this, options); + }; + Comment.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Comment.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + Comment.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Created"])) { + obj["created"] = _adjustToDateTime(obj["created"]); + } + _processRetrieveResult(this, value, result); + }; + Comment.prototype.toJSON = function () { + return _toJson(this, { + "author": this._A, + "created": this._C, + "id": this._I, + "level": this._L, + "mentions": this._M, + "resolved": this._Re, + "text": this._T + }, { + "replies": this._R + }); + }; + Comment.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Comment.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Comment; + }(OfficeExtension.ClientObject)); + OfficeCore.Comment = Comment; + var _typeCommentCollection = "CommentCollection"; + var CommentCollection = (function (_super) { + __extends(CommentCollection, _super); + function CommentCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CommentCollection.prototype, "_className", { + get: function () { + return "CommentCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeCommentCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + CommentCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + CommentCollection.prototype.getItem = function (id) { + return _createIndexerObject(OfficeCore.Comment, this, [id]); + }; + CommentCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Comment, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + CommentCollection.prototype.load = function (options) { + return _load(this, options); + }; + CommentCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + CommentCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }); + }; + CommentCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + CommentCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return CommentCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.CommentCollection = CommentCollection; + var _typeExtensionLifeCycle = "ExtensionLifeCycle"; + var ExtensionLifeCycle = (function (_super) { + __extends(ExtensionLifeCycle, _super); + function ExtensionLifeCycle() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ExtensionLifeCycle.prototype, "_className", { + get: function () { + return "ExtensionLifeCycle"; + }, + enumerable: true, + configurable: true + }); + ExtensionLifeCycle.prototype.launchExtensionComponent = function (componentId, componentType, launchProperties) { + _invokeMethod(this, "LaunchExtensionComponent", 1, [componentId, componentType, launchProperties], 4 | 1, 0); + }; + ExtensionLifeCycle.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ExtensionLifeCycle.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ExtensionLifeCycle.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ExtensionLifeCycle, context, "Microsoft.OfficeSharedApi.ExtensionLifeCycle", false, 4); + }; + ExtensionLifeCycle.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ExtensionLifeCycle; + }(OfficeExtension.ClientObject)); + OfficeCore.ExtensionLifeCycle = ExtensionLifeCycle; + var CommentTextFormat; + (function (CommentTextFormat) { + CommentTextFormat["plain"] = "Plain"; + CommentTextFormat["markdown"] = "Markdown"; + CommentTextFormat["delta"] = "Delta"; + })(CommentTextFormat = OfficeCore.CommentTextFormat || (OfficeCore.CommentTextFormat = {})); + var PersonaCardPerfPoint; + (function (PersonaCardPerfPoint) { + PersonaCardPerfPoint["placeHolderRendered"] = "PlaceHolderRendered"; + PersonaCardPerfPoint["initialCardRendered"] = "InitialCardRendered"; + })(PersonaCardPerfPoint = OfficeCore.PersonaCardPerfPoint || (OfficeCore.PersonaCardPerfPoint = {})); + var UnifiedCommunicationAvailability; + (function (UnifiedCommunicationAvailability) { + UnifiedCommunicationAvailability["notSet"] = "NotSet"; + UnifiedCommunicationAvailability["free"] = "Free"; + UnifiedCommunicationAvailability["idle"] = "Idle"; + UnifiedCommunicationAvailability["busy"] = "Busy"; + UnifiedCommunicationAvailability["idleBusy"] = "IdleBusy"; + UnifiedCommunicationAvailability["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationAvailability["unalertable"] = "Unalertable"; + UnifiedCommunicationAvailability["unavailable"] = "Unavailable"; + })(UnifiedCommunicationAvailability = OfficeCore.UnifiedCommunicationAvailability || (OfficeCore.UnifiedCommunicationAvailability = {})); + var UnifiedCommunicationStatus; + (function (UnifiedCommunicationStatus) { + UnifiedCommunicationStatus["online"] = "Online"; + UnifiedCommunicationStatus["notOnline"] = "NotOnline"; + UnifiedCommunicationStatus["away"] = "Away"; + UnifiedCommunicationStatus["busy"] = "Busy"; + UnifiedCommunicationStatus["beRightBack"] = "BeRightBack"; + UnifiedCommunicationStatus["onThePhone"] = "OnThePhone"; + UnifiedCommunicationStatus["outToLunch"] = "OutToLunch"; + UnifiedCommunicationStatus["inAMeeting"] = "InAMeeting"; + UnifiedCommunicationStatus["outOfOffice"] = "OutOfOffice"; + UnifiedCommunicationStatus["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationStatus["inAConference"] = "InAConference"; + UnifiedCommunicationStatus["getting"] = "Getting"; + UnifiedCommunicationStatus["notABuddy"] = "NotABuddy"; + UnifiedCommunicationStatus["disconnected"] = "Disconnected"; + UnifiedCommunicationStatus["notInstalled"] = "NotInstalled"; + UnifiedCommunicationStatus["urgentInterruptionsOnly"] = "UrgentInterruptionsOnly"; + UnifiedCommunicationStatus["mayBeAvailable"] = "MayBeAvailable"; + UnifiedCommunicationStatus["idle"] = "Idle"; + UnifiedCommunicationStatus["inPresentation"] = "InPresentation"; + })(UnifiedCommunicationStatus = OfficeCore.UnifiedCommunicationStatus || (OfficeCore.UnifiedCommunicationStatus = {})); + var UnifiedCommunicationPresence; + (function (UnifiedCommunicationPresence) { + UnifiedCommunicationPresence["free"] = "Free"; + UnifiedCommunicationPresence["busy"] = "Busy"; + UnifiedCommunicationPresence["idle"] = "Idle"; + UnifiedCommunicationPresence["doNotDistrub"] = "DoNotDistrub"; + UnifiedCommunicationPresence["blocked"] = "Blocked"; + UnifiedCommunicationPresence["notSet"] = "NotSet"; + UnifiedCommunicationPresence["outOfOffice"] = "OutOfOffice"; + })(UnifiedCommunicationPresence = OfficeCore.UnifiedCommunicationPresence || (OfficeCore.UnifiedCommunicationPresence = {})); + var FreeBusyCalendarState; + (function (FreeBusyCalendarState) { + FreeBusyCalendarState["unknown"] = "Unknown"; + FreeBusyCalendarState["free"] = "Free"; + FreeBusyCalendarState["busy"] = "Busy"; + FreeBusyCalendarState["elsewhere"] = "Elsewhere"; + FreeBusyCalendarState["tentative"] = "Tentative"; + FreeBusyCalendarState["outOfOffice"] = "OutOfOffice"; + })(FreeBusyCalendarState = OfficeCore.FreeBusyCalendarState || (OfficeCore.FreeBusyCalendarState = {})); + var PersonaType; + (function (PersonaType) { + PersonaType["unknown"] = "Unknown"; + PersonaType["enterprise"] = "Enterprise"; + PersonaType["contact"] = "Contact"; + PersonaType["bot"] = "Bot"; + PersonaType["phoneOnly"] = "PhoneOnly"; + PersonaType["oneOff"] = "OneOff"; + PersonaType["distributionList"] = "DistributionList"; + PersonaType["personalDistributionList"] = "PersonalDistributionList"; + PersonaType["anonymous"] = "Anonymous"; + PersonaType["unifiedGroup"] = "UnifiedGroup"; + })(PersonaType = OfficeCore.PersonaType || (OfficeCore.PersonaType = {})); + var PhoneType; + (function (PhoneType) { + PhoneType["workPhone"] = "WorkPhone"; + PhoneType["homePhone"] = "HomePhone"; + PhoneType["mobilePhone"] = "MobilePhone"; + PhoneType["businessFax"] = "BusinessFax"; + PhoneType["otherPhone"] = "OtherPhone"; + })(PhoneType = OfficeCore.PhoneType || (OfficeCore.PhoneType = {})); + var AddressType; + (function (AddressType) { + AddressType["workAddress"] = "WorkAddress"; + AddressType["homeAddress"] = "HomeAddress"; + AddressType["otherAddress"] = "OtherAddress"; + })(AddressType = OfficeCore.AddressType || (OfficeCore.AddressType = {})); + var MemberType; + (function (MemberType) { + MemberType["unknown"] = "Unknown"; + MemberType["individual"] = "Individual"; + MemberType["group"] = "Group"; + })(MemberType = OfficeCore.MemberType || (OfficeCore.MemberType = {})); + var _typeMemberInfoList = "MemberInfoList"; + var MemberInfoList = (function (_super) { + __extends(MemberInfoList, _super); + function MemberInfoList() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MemberInfoList.prototype, "_className", { + get: function () { + return "MemberInfoList"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typeMemberInfoList, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typeMemberInfoList, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + MemberInfoList.prototype.getPersonaForMember = function (memberCookie) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForMember", 1, [memberCookie], false, false, null, 4); + }; + MemberInfoList.prototype.items = function () { + return _invokeMethod(this, "Items", 1, [], 4, 0); + }; + MemberInfoList.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + }; + MemberInfoList.prototype.load = function (options) { + return _load(this, options); + }; + MemberInfoList.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MemberInfoList.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MemberInfoList.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + MemberInfoList.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MemberInfoList.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MemberInfoList; + }(OfficeExtension.ClientObject)); + OfficeCore.MemberInfoList = MemberInfoList; + var PersonaDataUpdated; + (function (PersonaDataUpdated) { + PersonaDataUpdated["hostId"] = "HostId"; + PersonaDataUpdated["type"] = "Type"; + PersonaDataUpdated["photo"] = "Photo"; + PersonaDataUpdated["personaInfo"] = "PersonaInfo"; + PersonaDataUpdated["unifiedCommunicationInfo"] = "UnifiedCommunicationInfo"; + PersonaDataUpdated["organization"] = "Organization"; + PersonaDataUpdated["unifiedGroupInfo"] = "UnifiedGroupInfo"; + PersonaDataUpdated["members"] = "Members"; + PersonaDataUpdated["membership"] = "Membership"; + PersonaDataUpdated["capabilities"] = "Capabilities"; + PersonaDataUpdated["customizations"] = "Customizations"; + PersonaDataUpdated["viewableSources"] = "ViewableSources"; + PersonaDataUpdated["placeholder"] = "Placeholder"; + })(PersonaDataUpdated = OfficeCore.PersonaDataUpdated || (OfficeCore.PersonaDataUpdated = {})); + var _typePersonaActions = "PersonaActions"; + var PersonaActions = (function (_super) { + __extends(PersonaActions, _super); + function PersonaActions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaActions.prototype, "_className", { + get: function () { + return "PersonaActions"; + }, + enumerable: true, + configurable: true + }); + PersonaActions.prototype.addContact = function () { + _invokeMethod(this, "AddContact", 0, [], 0, 0); + }; + PersonaActions.prototype.callPhoneNumber = function (contactNumber) { + _invokeMethod(this, "CallPhoneNumber", 0, [contactNumber], 0, 0); + }; + PersonaActions.prototype.composeEmail = function (emailAddress) { + _invokeMethod(this, "ComposeEmail", 0, [emailAddress], 0, 0); + }; + PersonaActions.prototype.composeInstantMessage = function (sipAddress) { + _invokeMethod(this, "ComposeInstantMessage", 0, [sipAddress], 0, 0); + }; + PersonaActions.prototype.editContact = function () { + _invokeMethod(this, "EditContact", 0, [], 0, 0); + }; + PersonaActions.prototype.editContactByIdentifier = function (identifier) { + _invokeMethod(this, "EditContactByIdentifier", 0, [identifier], 0, 0); + }; + PersonaActions.prototype.editUnifiedGroup = function () { + _invokeMethod(this, "EditUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.getChangePhotoUrlAndOpenInBrowser = function () { + _invokeMethod(this, "GetChangePhotoUrlAndOpenInBrowser", 0, [], 0, 0); + }; + PersonaActions.prototype.hideHoverCardForPersona = function () { + _invokeMethod(this, "HideHoverCardForPersona", 0, [], 0, 0); + }; + PersonaActions.prototype.joinUnifiedGroup = function () { + _invokeMethod(this, "JoinUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.leaveUnifiedGroup = function () { + _invokeMethod(this, "LeaveUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.openGroupCalendar = function () { + _invokeMethod(this, "OpenGroupCalendar", 0, [], 0, 0); + }; + PersonaActions.prototype.openLinkContactUx = function () { + _invokeMethod(this, "OpenLinkContactUx", 0, [], 0, 0); + }; + PersonaActions.prototype.openOutlookProperties = function () { + _invokeMethod(this, "OpenOutlookProperties", 0, [], 0, 0); + }; + PersonaActions.prototype.pinPersonaToQuickContacts = function () { + _invokeMethod(this, "PinPersonaToQuickContacts", 0, [], 0, 0); + }; + PersonaActions.prototype.scheduleMeeting = function () { + _invokeMethod(this, "ScheduleMeeting", 0, [], 0, 0); + }; + PersonaActions.prototype.showContactCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContactCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showContextMenu = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContextMenu", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showExpandedCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowExpandedCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showHoverCardForPersona = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowHoverCardForPersona", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.startAudioCall = function () { + _invokeMethod(this, "StartAudioCall", 0, [], 0, 0); + }; + PersonaActions.prototype.startVideoCall = function () { + _invokeMethod(this, "StartVideoCall", 0, [], 0, 0); + }; + PersonaActions.prototype.subscribeToGroup = function () { + _invokeMethod(this, "SubscribeToGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.toggleTagForAlerts = function () { + _invokeMethod(this, "ToggleTagForAlerts", 0, [], 0, 0); + }; + PersonaActions.prototype.unsubscribeFromGroup = function () { + _invokeMethod(this, "UnsubscribeFromGroup", 0, [], 0, 0); + }; + PersonaActions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaActions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaActions.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaActions; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaActions = PersonaActions; + var _typePersonaInfoSource = "PersonaInfoSource"; + var PersonaInfoSource = (function (_super) { + __extends(PersonaInfoSource, _super); + function PersonaInfoSource() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfoSource.prototype, "_className", { + get: function () { + return "PersonaInfoSource"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "phones", "addresses", "webSites", "notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "Phones", "Addresses", "WebSites", "Notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "addresses", { + get: function () { + _throwIfNotLoaded("addresses", this._A, _typePersonaInfoSource, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfoSource, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfoSource, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfoSource, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfoSource, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfoSource, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfoSource, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfoSource, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfoSource, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfoSource, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfoSource, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfoSource, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfoSource, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfoSource, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "phones", { + get: function () { + _throwIfNotLoaded("phones", this._P, _typePersonaInfoSource, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfoSource, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfoSource, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfoSource, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfoSource.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Addresses"])) { + this._A = obj["Addresses"]; + } + if (!_isUndefined(obj["Birthday"])) { + this._B = obj["Birthday"]; + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = obj["Birthdays"]; + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["Phones"])) { + this._P = obj["Phones"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + }; + PersonaInfoSource.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfoSource.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfoSource.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaInfoSource.prototype.toJSON = function () { + return _toJson(this, { + "addresses": this._A, + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "phones": this._P, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, {}); + }; + PersonaInfoSource.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfoSource.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfoSource; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfoSource = PersonaInfoSource; + var _typePersonaInfo = "PersonaInfo"; + var PersonaInfo = (function (_super) { + __extends(PersonaInfo, _super); + function PersonaInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfo.prototype, "_className", { + get: function () { + return "PersonaInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "webSites", "notes", "isPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "WebSites", "Notes", "IsPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["sources"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sources", { + get: function () { + if (!this._So) { + this._So = _createPropertyObject(OfficeCore.PersonaInfoSource, this, "Sources", false, 4); + } + return this._So; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfo, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfo, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfo, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfo, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfo, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "isPersonResolved", { + get: function () { + _throwIfNotLoaded("isPersonResolved", this._I, _typePersonaInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfo, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfo, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfo, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfo, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfo, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfo, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfo, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfo.prototype.getAddresses = function () { + return _invokeMethod(this, "GetAddresses", 1, [], 4, 0); + }; + PersonaInfo.prototype.getPhones = function () { + return _invokeMethod(this, "GetPhones", 1, [], 4, 0); + }; + PersonaInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Birthday"])) { + this._B = _adjustToDateTime(obj["Birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = _adjustToDateTime(obj["Birthdays"]); + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["IsPersonResolved"])) { + this._I = obj["IsPersonResolved"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + _handleNavigationPropertyResults(this, obj, ["sources", "Sources"]); + }; + PersonaInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Birthday"])) { + obj["birthday"] = _adjustToDateTime(obj["birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + obj["birthdays"] = _adjustToDateTime(obj["birthdays"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaInfo.prototype.toJSON = function () { + return _toJson(this, { + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "isPersonResolved": this._I, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, { + "sources": this._So + }); + }; + PersonaInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfo = PersonaInfo; + var _typePersonaUnifiedCommunicationInfo = "PersonaUnifiedCommunicationInfo"; + var PersonaUnifiedCommunicationInfo = (function (_super) { + __extends(PersonaUnifiedCommunicationInfo, _super); + function PersonaUnifiedCommunicationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_className", { + get: function () { + return "PersonaUnifiedCommunicationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["availability", "status", "isSelf", "isTagged", "customStatusString", "isBlocked", "presenceTooltip", "isOutOfOffice", "outOfOfficeNote", "timezone", "meetingLocation", "meetingSubject", "timezoneBias", "idleStartTime", "overallCapability", "isOnBuddyList", "presenceNote", "voiceMailUri", "availabilityText", "availabilityTooltip", "isDurationInAvailabilityText", "freeBusyStatus", "calendarState", "presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Availability", "Status", "IsSelf", "IsTagged", "CustomStatusString", "IsBlocked", "PresenceTooltip", "IsOutOfOffice", "OutOfOfficeNote", "Timezone", "MeetingLocation", "MeetingSubject", "TimezoneBias", "IdleStartTime", "OverallCapability", "IsOnBuddyList", "PresenceNote", "VoiceMailUri", "AvailabilityText", "AvailabilityTooltip", "IsDurationInAvailabilityText", "FreeBusyStatus", "CalendarState", "Presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availability", { + get: function () { + _throwIfNotLoaded("availability", this._A, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityText", { + get: function () { + _throwIfNotLoaded("availabilityText", this._Av, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Av; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityTooltip", { + get: function () { + _throwIfNotLoaded("availabilityTooltip", this._Ava, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ava; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "calendarState", { + get: function () { + _throwIfNotLoaded("calendarState", this._C, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "customStatusString", { + get: function () { + _throwIfNotLoaded("customStatusString", this._Cu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Cu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "freeBusyStatus", { + get: function () { + _throwIfNotLoaded("freeBusyStatus", this._F, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "idleStartTime", { + get: function () { + _throwIfNotLoaded("idleStartTime", this._I, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isBlocked", { + get: function () { + _throwIfNotLoaded("isBlocked", this._Is, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isDurationInAvailabilityText", { + get: function () { + _throwIfNotLoaded("isDurationInAvailabilityText", this._IsD, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsD; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOnBuddyList", { + get: function () { + _throwIfNotLoaded("isOnBuddyList", this._IsO, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsO; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOutOfOffice", { + get: function () { + _throwIfNotLoaded("isOutOfOffice", this._IsOu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsOu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isSelf", { + get: function () { + _throwIfNotLoaded("isSelf", this._IsS, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsS; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isTagged", { + get: function () { + _throwIfNotLoaded("isTagged", this._IsT, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsT; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingLocation", { + get: function () { + _throwIfNotLoaded("meetingLocation", this._M, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingSubject", { + get: function () { + _throwIfNotLoaded("meetingSubject", this._Me, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Me; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "outOfOfficeNote", { + get: function () { + _throwIfNotLoaded("outOfOfficeNote", this._O, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "overallCapability", { + get: function () { + _throwIfNotLoaded("overallCapability", this._Ov, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ov; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presence", { + get: function () { + _throwIfNotLoaded("presence", this._P, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceNote", { + get: function () { + _throwIfNotLoaded("presenceNote", this._Pr, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pr; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceTooltip", { + get: function () { + _throwIfNotLoaded("presenceTooltip", this._Pre, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pre; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "status", { + get: function () { + _throwIfNotLoaded("status", this._S, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezone", { + get: function () { + _throwIfNotLoaded("timezone", this._T, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezoneBias", { + get: function () { + _throwIfNotLoaded("timezoneBias", this._Ti, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ti; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "voiceMailUri", { + get: function () { + _throwIfNotLoaded("voiceMailUri", this._V, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + PersonaUnifiedCommunicationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Availability"])) { + this._A = obj["Availability"]; + } + if (!_isUndefined(obj["AvailabilityText"])) { + this._Av = obj["AvailabilityText"]; + } + if (!_isUndefined(obj["AvailabilityTooltip"])) { + this._Ava = obj["AvailabilityTooltip"]; + } + if (!_isUndefined(obj["CalendarState"])) { + this._C = obj["CalendarState"]; + } + if (!_isUndefined(obj["CustomStatusString"])) { + this._Cu = obj["CustomStatusString"]; + } + if (!_isUndefined(obj["FreeBusyStatus"])) { + this._F = obj["FreeBusyStatus"]; + } + if (!_isUndefined(obj["IdleStartTime"])) { + this._I = _adjustToDateTime(obj["IdleStartTime"]); + } + if (!_isUndefined(obj["IsBlocked"])) { + this._Is = obj["IsBlocked"]; + } + if (!_isUndefined(obj["IsDurationInAvailabilityText"])) { + this._IsD = obj["IsDurationInAvailabilityText"]; + } + if (!_isUndefined(obj["IsOnBuddyList"])) { + this._IsO = obj["IsOnBuddyList"]; + } + if (!_isUndefined(obj["IsOutOfOffice"])) { + this._IsOu = obj["IsOutOfOffice"]; + } + if (!_isUndefined(obj["IsSelf"])) { + this._IsS = obj["IsSelf"]; + } + if (!_isUndefined(obj["IsTagged"])) { + this._IsT = obj["IsTagged"]; + } + if (!_isUndefined(obj["MeetingLocation"])) { + this._M = obj["MeetingLocation"]; + } + if (!_isUndefined(obj["MeetingSubject"])) { + this._Me = obj["MeetingSubject"]; + } + if (!_isUndefined(obj["OutOfOfficeNote"])) { + this._O = obj["OutOfOfficeNote"]; + } + if (!_isUndefined(obj["OverallCapability"])) { + this._Ov = obj["OverallCapability"]; + } + if (!_isUndefined(obj["Presence"])) { + this._P = obj["Presence"]; + } + if (!_isUndefined(obj["PresenceNote"])) { + this._Pr = obj["PresenceNote"]; + } + if (!_isUndefined(obj["PresenceTooltip"])) { + this._Pre = obj["PresenceTooltip"]; + } + if (!_isUndefined(obj["Status"])) { + this._S = obj["Status"]; + } + if (!_isUndefined(obj["Timezone"])) { + this._T = obj["Timezone"]; + } + if (!_isUndefined(obj["TimezoneBias"])) { + this._Ti = obj["TimezoneBias"]; + } + if (!_isUndefined(obj["VoiceMailUri"])) { + this._V = obj["VoiceMailUri"]; + } + }; + PersonaUnifiedCommunicationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaUnifiedCommunicationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaUnifiedCommunicationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["IdleStartTime"])) { + obj["idleStartTime"] = _adjustToDateTime(obj["idleStartTime"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaUnifiedCommunicationInfo.prototype.toJSON = function () { + return _toJson(this, { + "availability": this._A, + "availabilityText": this._Av, + "availabilityTooltip": this._Ava, + "calendarState": this._C, + "customStatusString": this._Cu, + "freeBusyStatus": this._F, + "idleStartTime": this._I, + "isBlocked": this._Is, + "isDurationInAvailabilityText": this._IsD, + "isOnBuddyList": this._IsO, + "isOutOfOffice": this._IsOu, + "isSelf": this._IsS, + "isTagged": this._IsT, + "meetingLocation": this._M, + "meetingSubject": this._Me, + "outOfOfficeNote": this._O, + "overallCapability": this._Ov, + "presence": this._P, + "presenceNote": this._Pr, + "presenceTooltip": this._Pre, + "status": this._S, + "timezone": this._T, + "timezoneBias": this._Ti, + "voiceMailUri": this._V + }, {}); + }; + PersonaUnifiedCommunicationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaUnifiedCommunicationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaUnifiedCommunicationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaUnifiedCommunicationInfo = PersonaUnifiedCommunicationInfo; + var _typePersonaPhotoInfo = "PersonaPhotoInfo"; + var PersonaPhotoInfo = (function (_super) { + __extends(PersonaPhotoInfo, _super); + function PersonaPhotoInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaPhotoInfo.prototype, "_className", { + get: function () { + return "PersonaPhotoInfo"; + }, + enumerable: true, + configurable: true + }); + PersonaPhotoInfo.prototype.getImageUri = function (uriScheme) { + return _invokeMethod(this, "getImageUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getImageUriWithMetadata = function (uriScheme) { + return _invokeMethod(this, "getImageUriWithMetadata", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getPlaceholderUri = function (uriScheme) { + return _invokeMethod(this, "getPlaceholderUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.setPlaceholderColor = function (color) { + _invokeMethod(this, "setPlaceholderColor", 0, [color], 0, 0); + }; + PersonaPhotoInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaPhotoInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaPhotoInfo.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaPhotoInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaPhotoInfo = PersonaPhotoInfo; + var _typePersonaCollection = "PersonaCollection"; + var PersonaCollection = (function (_super) { + __extends(PersonaCollection, _super); + function PersonaCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaCollection.prototype, "_className", { + get: function () { + return "PersonaCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typePersonaCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + PersonaCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + PersonaCollection.prototype.getItem = function (index) { + return _createIndexerObject(OfficeCore.Persona, this, [index]); + }; + PersonaCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Persona, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + PersonaCollection.prototype.load = function (options) { + return _load(this, options); + }; + PersonaCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }); + }; + PersonaCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + PersonaCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return PersonaCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaCollection = PersonaCollection; + var _typePersonaOrganizationInfo = "PersonaOrganizationInfo"; + var PersonaOrganizationInfo = (function (_super) { + __extends(PersonaOrganizationInfo, _super); + function PersonaOrganizationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaOrganizationInfo.prototype, "_className", { + get: function () { + return "PersonaOrganizationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["hierarchy", "manager", "directReports"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "directReports", { + get: function () { + if (!this._D) { + this._D = _createPropertyObject(OfficeCore.PersonaCollection, this, "DirectReports", true, 4); + } + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "hierarchy", { + get: function () { + if (!this._H) { + this._H = _createPropertyObject(OfficeCore.PersonaCollection, this, "Hierarchy", true, 4); + } + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "manager", { + get: function () { + if (!this._M) { + this._M = _createPropertyObject(OfficeCore.Persona, this, "Manager", false, 4); + } + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typePersonaOrganizationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typePersonaOrganizationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + PersonaOrganizationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + _handleNavigationPropertyResults(this, obj, ["directReports", "DirectReports", "hierarchy", "Hierarchy", "manager", "Manager"]); + }; + PersonaOrganizationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaOrganizationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaOrganizationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaOrganizationInfo.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + PersonaOrganizationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaOrganizationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaOrganizationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaOrganizationInfo = PersonaOrganizationInfo; + var CustomizedData; + (function (CustomizedData) { + CustomizedData["email"] = "Email"; + CustomizedData["workPhone"] = "WorkPhone"; + CustomizedData["workPhone2"] = "WorkPhone2"; + CustomizedData["workFax"] = "WorkFax"; + CustomizedData["mobilePhone"] = "MobilePhone"; + CustomizedData["homePhone"] = "HomePhone"; + CustomizedData["homePhone2"] = "HomePhone2"; + CustomizedData["otherPhone"] = "OtherPhone"; + CustomizedData["sipAddress"] = "SipAddress"; + CustomizedData["profile"] = "Profile"; + CustomizedData["office"] = "Office"; + CustomizedData["company"] = "Company"; + CustomizedData["workAddress"] = "WorkAddress"; + CustomizedData["homeAddress"] = "HomeAddress"; + CustomizedData["otherAddress"] = "OtherAddress"; + CustomizedData["birthday"] = "Birthday"; + })(CustomizedData = OfficeCore.CustomizedData || (OfficeCore.CustomizedData = {})); + var _typeUnifiedGroupInfo = "UnifiedGroupInfo"; + var UnifiedGroupInfo = (function (_super) { + __extends(UnifiedGroupInfo, _super); + function UnifiedGroupInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UnifiedGroupInfo.prototype, "_className", { + get: function () { + return "UnifiedGroupInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Description", "OneDrive", "OneNote", "IsPublic", "AmIOwner", "AmIMember", "AmISubscribed", "MemberCount", "OwnerCount", "HasGuests", "Site", "Planner", "Classification", "SubscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIMember", { + get: function () { + _throwIfNotLoaded("amIMember", this._A, _typeUnifiedGroupInfo, this._isNull); + return this._A; + }, + set: function (value) { + this._A = value; + _invokeSetProperty(this, "AmIMember", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIOwner", { + get: function () { + _throwIfNotLoaded("amIOwner", this._Am, _typeUnifiedGroupInfo, this._isNull); + return this._Am; + }, + set: function (value) { + this._Am = value; + _invokeSetProperty(this, "AmIOwner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amISubscribed", { + get: function () { + _throwIfNotLoaded("amISubscribed", this._AmI, _typeUnifiedGroupInfo, this._isNull); + return this._AmI; + }, + set: function (value) { + this._AmI = value; + _invokeSetProperty(this, "AmISubscribed", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "classification", { + get: function () { + _throwIfNotLoaded("classification", this._C, _typeUnifiedGroupInfo, this._isNull); + return this._C; + }, + set: function (value) { + this._C = value; + _invokeSetProperty(this, "Classification", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "description", { + get: function () { + _throwIfNotLoaded("description", this._D, _typeUnifiedGroupInfo, this._isNull); + return this._D; + }, + set: function (value) { + this._D = value; + _invokeSetProperty(this, "Description", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "hasGuests", { + get: function () { + _throwIfNotLoaded("hasGuests", this._H, _typeUnifiedGroupInfo, this._isNull); + return this._H; + }, + set: function (value) { + this._H = value; + _invokeSetProperty(this, "HasGuests", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "isPublic", { + get: function () { + _throwIfNotLoaded("isPublic", this._I, _typeUnifiedGroupInfo, this._isNull); + return this._I; + }, + set: function (value) { + this._I = value; + _invokeSetProperty(this, "IsPublic", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "memberCount", { + get: function () { + _throwIfNotLoaded("memberCount", this._M, _typeUnifiedGroupInfo, this._isNull); + return this._M; + }, + set: function (value) { + this._M = value; + _invokeSetProperty(this, "MemberCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneDrive", { + get: function () { + _throwIfNotLoaded("oneDrive", this._O, _typeUnifiedGroupInfo, this._isNull); + return this._O; + }, + set: function (value) { + this._O = value; + _invokeSetProperty(this, "OneDrive", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneNote", { + get: function () { + _throwIfNotLoaded("oneNote", this._On, _typeUnifiedGroupInfo, this._isNull); + return this._On; + }, + set: function (value) { + this._On = value; + _invokeSetProperty(this, "OneNote", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "ownerCount", { + get: function () { + _throwIfNotLoaded("ownerCount", this._Ow, _typeUnifiedGroupInfo, this._isNull); + return this._Ow; + }, + set: function (value) { + this._Ow = value; + _invokeSetProperty(this, "OwnerCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "planner", { + get: function () { + _throwIfNotLoaded("planner", this._P, _typeUnifiedGroupInfo, this._isNull); + return this._P; + }, + set: function (value) { + this._P = value; + _invokeSetProperty(this, "Planner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "site", { + get: function () { + _throwIfNotLoaded("site", this._S, _typeUnifiedGroupInfo, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Site", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "subscriptionEnabled", { + get: function () { + _throwIfNotLoaded("subscriptionEnabled", this._Su, _typeUnifiedGroupInfo, this._isNull); + return this._Su; + }, + set: function (value) { + this._Su = value; + _invokeSetProperty(this, "SubscriptionEnabled", value, 0); + }, + enumerable: true, + configurable: true + }); + UnifiedGroupInfo.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"], [], []); + }; + UnifiedGroupInfo.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + UnifiedGroupInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["AmIMember"])) { + this._A = obj["AmIMember"]; + } + if (!_isUndefined(obj["AmIOwner"])) { + this._Am = obj["AmIOwner"]; + } + if (!_isUndefined(obj["AmISubscribed"])) { + this._AmI = obj["AmISubscribed"]; + } + if (!_isUndefined(obj["Classification"])) { + this._C = obj["Classification"]; + } + if (!_isUndefined(obj["Description"])) { + this._D = obj["Description"]; + } + if (!_isUndefined(obj["HasGuests"])) { + this._H = obj["HasGuests"]; + } + if (!_isUndefined(obj["IsPublic"])) { + this._I = obj["IsPublic"]; + } + if (!_isUndefined(obj["MemberCount"])) { + this._M = obj["MemberCount"]; + } + if (!_isUndefined(obj["OneDrive"])) { + this._O = obj["OneDrive"]; + } + if (!_isUndefined(obj["OneNote"])) { + this._On = obj["OneNote"]; + } + if (!_isUndefined(obj["OwnerCount"])) { + this._Ow = obj["OwnerCount"]; + } + if (!_isUndefined(obj["Planner"])) { + this._P = obj["Planner"]; + } + if (!_isUndefined(obj["Site"])) { + this._S = obj["Site"]; + } + if (!_isUndefined(obj["SubscriptionEnabled"])) { + this._Su = obj["SubscriptionEnabled"]; + } + }; + UnifiedGroupInfo.prototype.load = function (options) { + return _load(this, options); + }; + UnifiedGroupInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + UnifiedGroupInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UnifiedGroupInfo.prototype.toJSON = function () { + return _toJson(this, { + "amIMember": this._A, + "amIOwner": this._Am, + "amISubscribed": this._AmI, + "classification": this._C, + "description": this._D, + "hasGuests": this._H, + "isPublic": this._I, + "memberCount": this._M, + "oneDrive": this._O, + "oneNote": this._On, + "ownerCount": this._Ow, + "planner": this._P, + "site": this._S, + "subscriptionEnabled": this._Su + }, {}); + }; + UnifiedGroupInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + UnifiedGroupInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return UnifiedGroupInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.UnifiedGroupInfo = UnifiedGroupInfo; + var _typePersona = "Persona"; + var PersonaPromiseType; + (function (PersonaPromiseType) { + PersonaPromiseType[PersonaPromiseType["immediate"] = 0] = "immediate"; + PersonaPromiseType[PersonaPromiseType["load"] = 3] = "load"; + })(PersonaPromiseType = OfficeCore.PersonaPromiseType || (OfficeCore.PersonaPromiseType = {})); + var PersonaInfoAndSource = (function () { + function PersonaInfoAndSource() { + } + return PersonaInfoAndSource; + }()); + OfficeCore.PersonaInfoAndSource = PersonaInfoAndSource; + ; + var Persona = (function (_super) { + __extends(Persona, _super); + function Persona() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Persona.prototype, "_className", { + get: function () { + return "Persona"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyNames", { + get: function () { + return ["hostId", "type", "capabilities", "diagnosticId", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["HostId", "Type", "Capabilities", "DiagnosticId", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_navigationPropertyNames", { + get: function () { + return ["photo", "personaInfo", "unifiedCommunicationInfo", "organization", "unifiedGroupInfo", "actions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "actions", { + get: function () { + if (!this._A) { + this._A = _createPropertyObject(OfficeCore.PersonaActions, this, "Actions", false, 4); + } + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "organization", { + get: function () { + if (!this._O) { + this._O = _createPropertyObject(OfficeCore.PersonaOrganizationInfo, this, "Organization", false, 4); + } + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "personaInfo", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.PersonaInfo, this, "PersonaInfo", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "photo", { + get: function () { + if (!this._Ph) { + this._Ph = _createPropertyObject(OfficeCore.PersonaPhotoInfo, this, "Photo", false, 4); + } + return this._Ph; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedCommunicationInfo", { + get: function () { + if (!this._U) { + this._U = _createPropertyObject(OfficeCore.PersonaUnifiedCommunicationInfo, this, "UnifiedCommunicationInfo", false, 4); + } + return this._U; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedGroupInfo", { + get: function () { + if (!this._Un) { + this._Un = _createPropertyObject(OfficeCore.UnifiedGroupInfo, this, "UnifiedGroupInfo", false, 4); + } + return this._Un; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "capabilities", { + get: function () { + _throwIfNotLoaded("capabilities", this._C, _typePersona, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "diagnosticId", { + get: function () { + _throwIfNotLoaded("diagnosticId", this._D, _typePersona, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "hostId", { + get: function () { + _throwIfNotLoaded("hostId", this._H, _typePersona, this._isNull); + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersona, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typePersona, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Persona.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, [], ["unifiedGroupInfo"], [ + "actions", + "organization", + "personaInfo", + "photo", + "unifiedCommunicationInfo" + ]); + }; + Persona.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Persona.prototype.dispose = function () { + _invokeMethod(this, "Dispose", 0, [], 0, 0); + }; + Persona.prototype.getCustomizations = function () { + return _invokeMethod(this, "GetCustomizations", 1, [], 4, 0); + }; + Persona.prototype.getMembers = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembers", 1, [], false, false, null, 4); + }; + Persona.prototype.getMembership = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembership", 1, [], false, false, null, 4); + }; + Persona.prototype.getViewableSources = function () { + return _invokeMethod(this, "GetViewableSources", 1, [], 4, 0); + }; + Persona.prototype.reportTimeForRender = function (perfpoint, millisecUTC) { + _invokeMethod(this, "ReportTimeForRender", 0, [perfpoint, millisecUTC], 0, 0); + }; + Persona.prototype.warmup = function (dataToWarmUp) { + _invokeMethod(this, "Warmup", 0, [dataToWarmUp], 0, 0); + }; + Persona.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Capabilities"])) { + this._C = obj["Capabilities"]; + } + if (!_isUndefined(obj["DiagnosticId"])) { + this._D = obj["DiagnosticId"]; + } + if (!_isUndefined(obj["HostId"])) { + this._H = obj["HostId"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + if (!_isUndefined(obj["Type"])) { + this._T = obj["Type"]; + } + _handleNavigationPropertyResults(this, obj, ["actions", "Actions", "organization", "Organization", "personaInfo", "PersonaInfo", "photo", "Photo", "unifiedCommunicationInfo", "UnifiedCommunicationInfo", "unifiedGroupInfo", "UnifiedGroupInfo"]); + }; + Persona.prototype.load = function (options) { + return _load(this, options); + }; + Persona.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Persona.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Persona.prototype.toJSON = function () { + return _toJson(this, { + "capabilities": this._C, + "diagnosticId": this._D, + "hostId": this._H, + "instanceId": this._I, + "type": this._T + }, { + "organization": this._O, + "personaInfo": this._P, + "unifiedCommunicationInfo": this._U, + "unifiedGroupInfo": this._Un + }); + }; + Persona.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Persona.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Persona; + }(OfficeExtension.ClientObject)); + OfficeCore.Persona = Persona; + var PersonaCustom = (function () { + function PersonaCustom() { + } + PersonaCustom.prototype.performAsyncOperation = function (type, waitFor, action, check) { + var _this = this; + if (type == PersonaPromiseType.immediate) { + action(); + return; + } + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + } + else { + var persona = _this; + persona.load("hostId"); + persona.context.sync().then(function () { + var hostId = persona.hostId; + _this.getPersonaLifetime().then(function (personaLifetime) { + var eventHandler = function (args) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (args.sendingPersonaHostId == hostId) { + for (var index = 0; index < args.dataUpdated.length; ++index) { + var updated = args.dataUpdated[index]; + if (waitFor == updated) { + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + personaLifetime.onPersonaUpdated.remove(eventHandler); + persona.context.sync(); + } + resolve(isWarmedUp); + }); + return; + } + } + } + resolve(false); + }); + }; + personaLifetime.onPersonaUpdated.add(eventHandler); + persona.context.sync(); + }); + }); + } + }); + }; + PersonaCustom.prototype.getOrganizationAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var organization = persona.organization; + organization.load("*"); + persona.context.sync().then(function () { + resolve(organization); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var organization = persona.organization; + organization.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(organization.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.organization, action, check); + }); + }; + PersonaCustom.prototype.getIsPersonaInfoResolvedCheck = function () { + var persona = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var info = persona.personaInfo; + info.load("isPersonResolved"); + persona.context.sync().then(function () { + resolve(info.isPersonResolved); + }); + }); + }; + PersonaCustom.prototype.getPersonaInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var info = persona.personaInfo; + info.load(); + persona.context.sync().then(function () { + resolve(info); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getPersonaInfoWithSourceAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var result = new PersonaInfoAndSource(); + result.info = persona.personaInfo; + result.info.load(); + result.source = persona.personaInfo.sources; + result.source.load(); + persona.context.sync().then(function () { + resolve(result); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedCommunicationInfo = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var ucInfo = persona.unifiedCommunicationInfo; + ucInfo.load("*"); + persona.context.sync().then(function () { + resolve(ucInfo); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedGroupInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var group = persona.unifiedGroupInfo; + group.load("*"); + persona.context.sync().then(function () { + resolve(group); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getTypeAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + persona.load("type"); + persona.context.sync().then(function () { + resolve(OfficeCore.PersonaType[persona.type.valueOf()]); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getCustomizationsAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var customizations = persona.getCustomizations(); + persona.context.sync().then(function () { + resolve(customizations.value); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getMembersAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, rejcet) { + var persona = _this; + var action = function () { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + resolve(members); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(members.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.members, action, check); + }); + }; + PersonaCustom.prototype.getMembershipAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var membership = persona.getMembership(); + membership.load("*"); + persona.context.sync().then(function () { + resolve(membership); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve) { + var membership = persona.getMembership(); + membership.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(membership.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.membership, action, check); + }); + }; + PersonaCustom.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + persona.load("instanceId"); + persona.context.sync().then(function () { + var peopleApi = new PeopleApiContext(persona.context, persona.instanceId); + peopleApi.getPersonaLifetime().then(function (lifetime) { + resolve(lifetime); + }); + }); + }); + }; + return PersonaCustom; + }()); + OfficeCore.PersonaCustom = PersonaCustom; + OfficeExtension.Utility.applyMixin(Persona, PersonaCustom); + var _typePersonaLifetime = "PersonaLifetime"; + var PersonaLifetime = (function (_super) { + __extends(PersonaLifetime, _super); + function PersonaLifetime() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaLifetime.prototype, "_className", { + get: function () { + return "PersonaLifetime"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyNames", { + get: function () { + return ["instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersonaLifetime, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.getPersona = function (hostId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersona", 1, [hostId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgByEntryId = function (entryId, name, sip, smtp) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgByEntryId", 1, [entryId, name, sip, smtp], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgEntry = function (name, sip, smtp, entryId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgEntry", 1, [name, sip, smtp, entryId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPolicies = function () { + return _invokeMethod(this, "GetPolicies", 1, [], 4, 0); + }; + PersonaLifetime.prototype.getTextScaleFactor = function () { + return _invokeMethod(this, "GetTextScaleFactor", 1, [], 4, 0); + }; + PersonaLifetime.prototype._RegisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_RegisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._UnregisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_UnregisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + PersonaLifetime.prototype.load = function (options) { + return _load(this, options); + }; + PersonaLifetime.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaLifetime.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(PersonaLifetime.prototype, "onPersonaUpdated", { + get: function () { + var _this = this; + if (!this.m_personaUpdated) { + this.m_personaUpdated = new OfficeExtension.GenericEventHandlers(this.context, this, "PersonaUpdated", { + eventType: 3502, + registerFunc: function () { return _this._RegisterPersonaUpdatedEvent(); }, + unregisterFunc: function () { return _this._UnregisterPersonaUpdatedEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + dataUpdated: value.dataUpdated, + sendingPersonaHostId: value.sendingPersonaHostId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_personaUpdated; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.toJSON = function () { + return _toJson(this, { + "instanceId": this._I + }, {}); + }; + PersonaLifetime.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaLifetime.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaLifetime; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaLifetime = PersonaLifetime; + var _typeLokiTokenProvider = "LokiTokenProvider"; + var LokiTokenProvider = (function (_super) { + __extends(LokiTokenProvider, _super); + function LokiTokenProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProvider.prototype, "_className", { + get: function () { + return "LokiTokenProvider"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyNames", { + get: function () { + return ["emailOrUpn", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["EmailOrUpn", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "emailOrUpn", { + get: function () { + _throwIfNotLoaded("emailOrUpn", this._E, _typeLokiTokenProvider, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typeLokiTokenProvider, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.requestClientAccessToken = function () { + _invokeMethod(this, "RequestClientAccessToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestIdentityUniqueId = function () { + _invokeMethod(this, "RequestIdentityUniqueId", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestToken = function () { + _invokeMethod(this, "RequestToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_RegisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_UnregisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["EmailOrUpn"])) { + this._E = obj["EmailOrUpn"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + LokiTokenProvider.prototype.load = function (options) { + return _load(this, options); + }; + LokiTokenProvider.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LokiTokenProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LokiTokenProvider.prototype, "onClientAccessTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_clientAccessTokenAvailable) { + this.m_clientAccessTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "ClientAccessTokenAvailable", { + eventType: 3505, + registerFunc: function () { return _this._RegisterClientAccessTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterClientAccessTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + clientAccessToken: value.clientAccessToken, + isAvailable: value.isAvailable, + tokenTTLInSeconds: value.tokenTTLInSeconds + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_clientAccessTokenAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onIdentityUniqueIdAvailable", { + get: function () { + var _this = this; + if (!this.m_identityUniqueIdAvailable) { + this.m_identityUniqueIdAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityUniqueIdAvailable", { + eventType: 3504, + registerFunc: function () { return _this._RegisterIdentityUniqueIdAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterIdentityUniqueIdAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityUniqueIdAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onLokiTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_lokiTokenAvailable) { + this.m_lokiTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "LokiTokenAvailable", { + eventType: 3503, + registerFunc: function () { return _this._RegisterLokiTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterLokiTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + lokiAutoDiscoverUrl: value.lokiAutoDiscoverUrl, + lokiToken: value.lokiToken + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_lokiTokenAvailable; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.toJSON = function () { + return _toJson(this, { + "emailOrUpn": this._E, + "instanceId": this._I + }, {}); + }; + LokiTokenProvider.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LokiTokenProvider.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LokiTokenProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProvider = LokiTokenProvider; + var _typeLokiTokenProviderFactory = "LokiTokenProviderFactory"; + var LokiTokenProviderFactory = (function (_super) { + __extends(LokiTokenProviderFactory, _super); + function LokiTokenProviderFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProviderFactory.prototype, "_className", { + get: function () { + return "LokiTokenProviderFactory"; + }, + enumerable: true, + configurable: true + }); + LokiTokenProviderFactory.prototype.getLokiTokenProvider = function (accountName) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [accountName], false, false, null, 4); + }; + LokiTokenProviderFactory.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LokiTokenProviderFactory.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LokiTokenProviderFactory.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LokiTokenProviderFactory, context, "Microsoft.People.LokiTokenProviderFactory", false, 4); + }; + LokiTokenProviderFactory.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LokiTokenProviderFactory; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProviderFactory = LokiTokenProviderFactory; + var _typeServiceContext = "ServiceContext"; + var PeopleApiContext = (function () { + function PeopleApiContext(context, instanceId) { + this.context = context; + this.instanceId = instanceId; + } + Object.defineProperty(PeopleApiContext.prototype, "serviceContext", { + get: function () { + if (!this.m_serviceConext) { + this.m_serviceConext = OfficeCore.ServiceContext.newObject(this.context); + } + return this.m_serviceConext; + }, + enumerable: true, + configurable: true + }); + PeopleApiContext.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var lifetime = _this.serviceContext.getPersonaLifetime(_this.instanceId); + _this.context.sync().then(function () { + lifetime.load("instanceId"); + _this.context.sync().then(function () { + resolve(lifetime); + }); + }); + }); + }; + PeopleApiContext.prototype.getInitialPersona = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this.serviceContext.getInitialPersona(_this.instanceId); + _this.context.sync().then(function () { + resolve(persona); + }); + }); + }; + PeopleApiContext.prototype.getLokiTokenProvider = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var provider = _this.serviceContext.getLokiTokenProvider(_this.instanceId); + _this.context.sync().then(function () { + provider.load("instanceId"); + _this.context.sync().then(function () { + resolve(provider); + }); + }); + }); + }; + return PeopleApiContext; + }()); + OfficeCore.PeopleApiContext = PeopleApiContext; + var ServiceContext = (function (_super) { + __extends(ServiceContext, _super); + function ServiceContext() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceContext.prototype, "_className", { + get: function () { + return "ServiceContext"; + }, + enumerable: true, + configurable: true + }); + ServiceContext.prototype.accountEmailOrUpn = function (instanceId) { + return _invokeMethod(this, "AccountEmailOrUpn", 1, [instanceId], 4, 0); + }; + ServiceContext.prototype.dispose = function (instance) { + _invokeMethod(this, "Dispose", 0, [instance], 0, 0); + }; + ServiceContext.prototype.getInitialPersona = function (instanceId) { + return _createMethodObject(OfficeCore.Persona, this, "GetInitialPersona", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getLokiTokenProvider = function (instanceId) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaLifetime = function (instanceId) { + return _createMethodObject(OfficeCore.PersonaLifetime, this, "GetPersonaLifetime", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaPolicies = function () { + return _invokeMethod(this, "GetPersonaPolicies", 1, [], 4, 0); + }; + ServiceContext.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceContext.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceContext.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceContext, context, "Microsoft.People.ServiceContext", false, 4); + }; + ServiceContext.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceContext; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceContext = ServiceContext; + var _typeRichapiPcxFeatureChecks = "RichapiPcxFeatureChecks"; + var RichapiPcxFeatureChecks = (function (_super) { + __extends(RichapiPcxFeatureChecks, _super); + function RichapiPcxFeatureChecks() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RichapiPcxFeatureChecks.prototype, "_className", { + get: function () { + return "RichapiPcxFeatureChecks"; + }, + enumerable: true, + configurable: true + }); + RichapiPcxFeatureChecks.prototype.isAddChangePhotoLinkOnLpcPersonaImageFlightEnabled = function () { + return _invokeMethod(this, "IsAddChangePhotoLinkOnLpcPersonaImageFlightEnabled", 1, [], 4, 0); + }; + RichapiPcxFeatureChecks.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RichapiPcxFeatureChecks.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RichapiPcxFeatureChecks.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.RichapiPcxFeatureChecks, context, "Microsoft.People.RichapiPcxFeatureChecks", false, 4); + }; + RichapiPcxFeatureChecks.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RichapiPcxFeatureChecks; + }(OfficeExtension.ClientObject)); + OfficeCore.RichapiPcxFeatureChecks = RichapiPcxFeatureChecks; + var _typeTap = "Tap"; + var Tap = (function (_super) { + __extends(Tap, _super); + function Tap() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Tap.prototype, "_className", { + get: function () { + return "Tap"; + }, + enumerable: true, + configurable: true + }); + Tap.prototype.getEnterpriseUserInfo = function () { + return _invokeMethod(this, "GetEnterpriseUserInfo", 1, [], 4 | 1, 0); + }; + Tap.prototype.getMruFriendlyPath = function (documentUrl) { + return _invokeMethod(this, "GetMruFriendlyPath", 1, [documentUrl], 4 | 1, 0); + }; + Tap.prototype.launchFileUrlInOfficeApp = function (documentUrl, useUniversalAsBackup) { + return _invokeMethod(this, "LaunchFileUrlInOfficeApp", 1, [documentUrl, useUniversalAsBackup], 4 | 1, 0); + }; + Tap.prototype.performLocalSearch = function (query, numResultsRequested, supportedFileExtensions, documentUrlToExclude) { + return _invokeMethod(this, "PerformLocalSearch", 1, [query, numResultsRequested, supportedFileExtensions, documentUrlToExclude], 4 | 1, 0); + }; + Tap.prototype.readSearchCache = function (keyword, expiredHours, filterObjectType) { + return _invokeMethod(this, "ReadSearchCache", 1, [keyword, expiredHours, filterObjectType], 4 | 1, 0); + }; + Tap.prototype.writeSearchCache = function (fileContent, keyword, filterObjectType) { + return _invokeMethod(this, "WriteSearchCache", 1, [fileContent, keyword, filterObjectType], 4 | 1, 0); + }; + Tap.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Tap.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Tap.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Tap, context, "Microsoft.TapRichApi.Tap", false, 4); + }; + Tap.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Tap; + }(OfficeExtension.ClientObject)); + OfficeCore.Tap = Tap; + var ObjectType; + (function (ObjectType) { + ObjectType["unknown"] = "Unknown"; + ObjectType["chart"] = "Chart"; + ObjectType["smartArt"] = "SmartArt"; + ObjectType["table"] = "Table"; + ObjectType["image"] = "Image"; + ObjectType["slide"] = "Slide"; + ObjectType["ole"] = "OLE"; + ObjectType["text"] = "Text"; + })(ObjectType = OfficeCore.ObjectType || (OfficeCore.ObjectType = {})); + var _typeThemeService = "ThemeService"; + var ThemeService = (function (_super) { + __extends(ThemeService, _super); + function ThemeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ThemeService.prototype, "_className", { + get: function () { + return "ThemeService"; + }, + enumerable: true, + configurable: true + }); + ThemeService.prototype.registerOfficeThemeChangedEvent = function () { + _invokeMethod(this, "RegisterOfficeThemeChangedEvent", 0, [], 0, 0); + }; + ThemeService.prototype.unregisterOfficeThemeChangedEvent = function () { + _invokeMethod(this, "UnregisterOfficeThemeChangedEvent", 0, [], 0, 0); + }; + ThemeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ThemeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ThemeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ThemeService, context, "Microsoft.Theme.ThemeService", false, 4); + }; + Object.defineProperty(ThemeService.prototype, "onOfficeThemeChanged", { + get: function () { + var _this = this; + if (!this.m_officeThemeChanged) { + this.m_officeThemeChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "OfficeThemeChanged", { + eventType: 65548, + registerFunc: function () { return _this.registerOfficeThemeChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterOfficeThemeChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.ThemeService_OfficeThemeChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_officeThemeChanged; + }, + enumerable: true, + configurable: true + }); + ThemeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ThemeService; + }(OfficeExtension.ClientObject)); + OfficeCore.ThemeService = ThemeService; + (function (_CC) { + function ThemeService_OfficeThemeChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + bodyBackgroundColor: args.bodyBackgroundColor, + bodyForegroundColor: args.bodyForegroundColor, + controlBackgroundColor: args.controlBackgroundColor, + controlForegroundColor: args.controlForegroundColor + }; + return newArgs; + } + _CC.ThemeService_OfficeThemeChanged_EventArgsTransform = ThemeService_OfficeThemeChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeAppRuntimePersistenceService = "AppRuntimePersistenceService"; + var AppRuntimePersistenceService = (function (_super) { + __extends(AppRuntimePersistenceService, _super); + function AppRuntimePersistenceService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimePersistenceService.prototype, "_className", { + get: function () { + return "AppRuntimePersistenceService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimePersistenceService.prototype.getAppRuntimeStartState = function () { + return _invokeMethod(this, "GetAppRuntimeStartState", 1, [], 4, 0); + }; + AppRuntimePersistenceService.prototype.setAppRuntimeStartState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeStartState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimePersistenceService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimePersistenceService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimePersistenceService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimePersistenceService, context, "Microsoft.AppRuntime.AppRuntimePersistenceService", false, 4); + }; + AppRuntimePersistenceService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimePersistenceService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimePersistenceService = AppRuntimePersistenceService; + var _typeAppRuntimeService = "AppRuntimeService"; + var AppRuntimeService = (function (_super) { + __extends(AppRuntimeService, _super); + function AppRuntimeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimeService.prototype, "_className", { + get: function () { + return "AppRuntimeService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.getAppRuntimeState = function () { + return _invokeMethod(this, "GetAppRuntimeState", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getContentSnapshotAsBase64 = function () { + _throwIfApiNotSupported("AppRuntimeService.getContentSnapshotAsBase64", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetContentSnapshotAsBase64", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getSnapshotEnabled = function () { + _throwIfApiNotSupported("AppRuntimeService.getSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetSnapshotEnabled", 1, [], 4, 0); + }; + AppRuntimeService.prototype.setAppRuntimeState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimeService.prototype.setSnapshotEnabled = function (enabled) { + _throwIfApiNotSupported("AppRuntimeService.setSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + _invokeMethod(this, "SetSnapshotEnabled", 1, [enabled], 4, 0); + }; + AppRuntimeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimeService, context, "Microsoft.AppRuntime.AppRuntimeService", false, 4); + }; + Object.defineProperty(AppRuntimeService.prototype, "onSnapshotImageReady", { + get: function () { + _throwIfApiNotSupported("AppRuntimeService.onSnapshotImageReady", "SnapshotControl", "1.1", _hostName); + if (!this.m_snapshotImageReady) { + this.m_snapshotImageReady = new OfficeExtension.GenericEventHandlers(this.context, this, "SnapshotImageReady", { + eventType: 65547, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + imageBase64: value.imageBase64 + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_snapshotImageReady; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppRuntimeService.prototype, "onVisibilityChanged", { + get: function () { + if (!this.m_visibilityChanged) { + this.m_visibilityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "VisibilityChanged", { + eventType: 65539, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + visibility: value.visibility + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_visibilityChanged; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimeService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimeService = AppRuntimeService; + var AppRuntimeState; + (function (AppRuntimeState) { + AppRuntimeState["inactive"] = "Inactive"; + AppRuntimeState["background"] = "Background"; + AppRuntimeState["visible"] = "Visible"; + })(AppRuntimeState = OfficeCore.AppRuntimeState || (OfficeCore.AppRuntimeState = {})); + var Visibility; + (function (Visibility) { + Visibility["hidden"] = "Hidden"; + Visibility["visible"] = "Visible"; + })(Visibility = OfficeCore.Visibility || (OfficeCore.Visibility = {})); + var LicenseFeatureTier; + (function (LicenseFeatureTier) { + LicenseFeatureTier["unknown"] = "Unknown"; + LicenseFeatureTier["basic"] = "Basic"; + LicenseFeatureTier["premium"] = "Premium"; + })(LicenseFeatureTier = OfficeCore.LicenseFeatureTier || (OfficeCore.LicenseFeatureTier = {})); + var _typeLicense = "License"; + var License = (function (_super) { + __extends(License, _super); + function License() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(License.prototype, "_className", { + get: function () { + return "License"; + }, + enumerable: true, + configurable: true + }); + License.prototype.getFeatureTier = function (feature, fallbackValue) { + return _invokeMethod(this, "GetFeatureTier", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.getLicenseFeature = function (feature) { + return _createMethodObject(OfficeCore.LicenseFeature, this, "GetLicenseFeature", 1, [feature], false, false, null, 4); + }; + License.prototype.getMsaDeviceTicket = function (resource, policy, options) { + return _invokeMethod(this, "GetMsaDeviceTicket", 1, [resource, policy, options], 4 | 1, 0); + }; + License.prototype.isFeatureEnabled = function (feature, fallbackValue) { + return _invokeMethod(this, "IsFeatureEnabled", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.isFreemiumUpsellEnabled = function () { + return _invokeMethod(this, "IsFreemiumUpsellEnabled", 1, [], 4, 0); + }; + License.prototype.launchUpsellExperience = function (experienceId) { + _invokeMethod(this, "LaunchUpsellExperience", 1, [experienceId], 4, 0); + }; + License.prototype._TestFireStateChangedEvent = function (feature) { + _invokeMethod(this, "_TestFireStateChangedEvent", 0, [feature], 1, 0); + }; + License.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + License.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + License.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.License, context, "Microsoft.Office.Licensing.License", false, 4); + }; + License.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return License; + }(OfficeExtension.ClientObject)); + OfficeCore.License = License; + var _typeLicenseFeature = "LicenseFeature"; + var LicenseFeature = (function (_super) { + __extends(LicenseFeature, _super); + function LicenseFeature() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LicenseFeature.prototype, "_className", { + get: function () { + return "LicenseFeature"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeLicenseFeature, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype._RegisterStateChange = function () { + _invokeMethod(this, "_RegisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._UnregisterStateChange = function () { + _invokeMethod(this, "_UnregisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + LicenseFeature.prototype.load = function (options) { + return _load(this, options); + }; + LicenseFeature.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LicenseFeature.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + LicenseFeature.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LicenseFeature.prototype, "onStateChanged", { + get: function () { + var _this = this; + if (!this.m_stateChanged) { + this.m_stateChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "StateChanged", { + eventType: 1, + registerFunc: function () { return _this._RegisterStateChange(); }, + unregisterFunc: function () { return _this._UnregisterStateChange(); }, + getTargetIdFunc: function () { return _this.id; }, + eventArgsTransformFunc: function (value) { + var event = _CC.LicenseFeature_StateChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_stateChanged; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + LicenseFeature.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LicenseFeature.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LicenseFeature; + }(OfficeExtension.ClientObject)); + OfficeCore.LicenseFeature = LicenseFeature; + (function (_CC) { + function LicenseFeature_StateChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + feature: args.featureName, + isEnabled: args.isEnabled, + tier: args.tierName + }; + if (args.tierName) { + newArgs.tier = args.tierName == 0 ? LicenseFeatureTier.unknown : + args.tierName == 1 ? LicenseFeatureTier.basic : + args.tierName == 2 ? LicenseFeatureTier.premium : + args.tierName; + } + return newArgs; + } + _CC.LicenseFeature_StateChanged_EventArgsTransform = LicenseFeature_StateChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeMsaDeviceTicketOptions = "MsaDeviceTicketOptions"; + var MsaDeviceTicketOptions = (function (_super) { + __extends(MsaDeviceTicketOptions, _super); + function MsaDeviceTicketOptions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_className", { + get: function () { + return "MsaDeviceTicketOptions"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyNames", { + get: function () { + return ["scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "scopes", { + get: function () { + _throwIfNotLoaded("scopes", this._S, _typeMsaDeviceTicketOptions, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Scopes", value, 0); + }, + enumerable: true, + configurable: true + }); + MsaDeviceTicketOptions.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["scopes"], [], []); + }; + MsaDeviceTicketOptions.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + MsaDeviceTicketOptions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Scopes"])) { + this._S = obj["Scopes"]; + } + }; + MsaDeviceTicketOptions.prototype.load = function (options) { + return _load(this, options); + }; + MsaDeviceTicketOptions.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MsaDeviceTicketOptions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MsaDeviceTicketOptions.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.MsaDeviceTicketOptions, context, "Microsoft.Office.Licensing.MsaDeviceTicketOptions", false, 4); + }; + MsaDeviceTicketOptions.prototype.toJSON = function () { + return _toJson(this, { + "scopes": this._S + }, {}); + }; + MsaDeviceTicketOptions.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MsaDeviceTicketOptions.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MsaDeviceTicketOptions; + }(OfficeExtension.ClientObject)); + OfficeCore.MsaDeviceTicketOptions = MsaDeviceTicketOptions; + var _typeDialogPage = "DialogPage"; + var DialogPage = (function (_super) { + __extends(DialogPage, _super); + function DialogPage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DialogPage.prototype, "_className", { + get: function () { + return "DialogPage"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_Id", { + get: function () { + _throwIfNotLoaded("_Id", this.__I, _typeDialogPage, this._isNull); + return this.__I; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4, 0); + }; + DialogPage.prototype.readyToShow = function () { + _invokeMethod(this, "ReadyToShow", 1, [], 4, 0); + }; + DialogPage.prototype.registerOnShow = function () { + _invokeMethod(this, "RegisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype.sendMessageToHost = function (message) { + _invokeMethod(this, "SendMessageToHost", 1, [message], 4, 0); + }; + DialogPage.prototype.unregisterOnShow = function () { + _invokeMethod(this, "UnregisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["_Id"])) { + this.__I = obj["_Id"]; + } + }; + DialogPage.prototype.load = function (options) { + return _load(this, options); + }; + DialogPage.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_Id"])) { + this.__I = value["_Id"]; + } + }; + DialogPage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DialogPage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DialogPage, context, "Microsoft.Office.DialogPage.DialogPage", false, 4); + }; + Object.defineProperty(DialogPage.prototype, "onOnShowEvent", { + get: function () { + var _this = this; + if (!this.m_onShowEvent) { + this.m_onShowEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "OnShowEvent", { + eventType: 1, + registerFunc: function () { return _this.registerOnShow(); }, + unregisterFunc: function () { return _this.unregisterOnShow(); }, + getTargetIdFunc: function () { return _this._Id; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_onShowEvent; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return DialogPage; + }(OfficeExtension.ClientObject)); + OfficeCore.DialogPage = DialogPage; + var _typeSharedFilePicker = "SharedFilePicker"; + var SharedFilePicker = (function (_super) { + __extends(SharedFilePicker, _super); + function SharedFilePicker() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(SharedFilePicker.prototype, "_className", { + get: function () { + return "SharedFilePicker"; + }, + enumerable: true, + configurable: true + }); + SharedFilePicker.prototype.getSharedFilePickerResponse = function (pickerCustomizationJsonString) { + return _invokeMethod(this, "GetSharedFilePickerResponse", 1, [pickerCustomizationJsonString], 4, 0); + }; + SharedFilePicker.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + SharedFilePicker.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + SharedFilePicker.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.SharedFilePicker, context, "Microsoft.Office.SharedFilePicker", false, 4); + }; + SharedFilePicker.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return SharedFilePicker; + }(OfficeExtension.ClientObject)); + OfficeCore.SharedFilePicker = SharedFilePicker; + var _typeActionService = "ActionService"; + var ActionService = (function (_super) { + __extends(ActionService, _super); + function ActionService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ActionService.prototype, "_className", { + get: function () { + return "ActionService"; + }, + enumerable: true, + configurable: true + }); + ActionService.prototype.areShortcutsInUse = function (shortcuts) { + return _invokeMethod(this, "AreShortcutsInUse", 0, [shortcuts], 0, 0); + }; + ActionService.prototype.getShortcuts = function () { + return _invokeMethod(this, "GetShortcuts", 1, [], 4, 0); + }; + ActionService.prototype.replaceShortcuts = function (shortcuts) { + _invokeMethod(this, "ReplaceShortcuts", 0, [shortcuts], 0, 0); + }; + ActionService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ActionService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ActionService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ActionService, context, "Microsoft.Office.ActionService", false, 4); + }; + ActionService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ActionService; + }(OfficeExtension.ClientObject)); + OfficeCore.ActionService = ActionService; + var _typeAuth = "Auth"; + var Auth = (function (_super) { + __extends(Auth, _super); + function Auth() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Auth.prototype, "_className", { + get: function () { + return "Auth"; + }, + enumerable: true, + configurable: true + }); + Auth.prototype.getAccessTokenFirstPartyOAuth = function (appName, target) { + return _invokeMethod(this, "GetAccessTokenFirstPartyOAuth", 1, [appName, target], 4 | 1, 0); + }; + Auth.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Auth.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Auth.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Auth, context, "Microsoft.Office.Auth", false, 1 | 4); + }; + Auth.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Auth; + }(OfficeExtension.ClientObject)); + OfficeCore.Auth = Auth; + var _typeAugLoopEventService = "AugLoopEventService"; + var AugLoopEventService = (function (_super) { + __extends(AugLoopEventService, _super); + function AugLoopEventService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AugLoopEventService.prototype, "_className", { + get: function () { + return "AugLoopEventService"; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.sendMessage = function (data) { + _invokeMethod(this, "SendMessage", 1, [data], 4 | 1, 0); + }; + AugLoopEventService.prototype._RegisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_RegisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._UnregisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_UnregisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AugLoopEventService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AugLoopEventService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AugLoopEventService, context, "Microsoft.Office.AugLoopEventService", false, 1 | 4); + }; + Object.defineProperty(AugLoopEventService.prototype, "onHostMessageReceived", { + get: function () { + var _this = this; + if (!this.m_hostMessageReceived) { + this.m_hostMessageReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "HostMessageReceived", { + eventType: 65542, + registerFunc: function () { return _this._RegisterHostMessageReceivedEvent(); }, + unregisterFunc: function () { return _this._UnregisterHostMessageReceivedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + data: value.data + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostMessageReceived; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AugLoopEventService; + }(OfficeExtension.ClientObject)); + OfficeCore.AugLoopEventService = AugLoopEventService; + var _typeUndoService = "UndoService"; + var UndoService = (function (_super) { + __extends(UndoService, _super); + function UndoService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UndoService.prototype, "_className", { + get: function () { + return "UndoService"; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.endCopilotOperation = function (batchId) { + _invokeMethod(this, "EndCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.startCopilotOperation = function (batchId) { + return _invokeMethod(this, "StartCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.undo = function () { + return _invokeMethod(this, "Undo", 0, [], 1, 0); + }; + UndoService.prototype._RegisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_RegisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._UnregisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_UnregisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UndoService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UndoService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UndoService, context, "Microsoft.Office.UndoService", false, 1 | 4); + }; + Object.defineProperty(UndoService.prototype, "onCopilotOperationStarted", { + get: function () { + if (!this.m_copilotOperationStarted) { + this.m_copilotOperationStarted = new OfficeExtension.GenericEventHandlers(this.context, this, "CopilotOperationStarted", { + eventType: 65544, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + batchId: value.batchId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_copilotOperationStarted; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UndoService.prototype, "onUndoStackChanged", { + get: function () { + var _this = this; + if (!this.m_undoStackChanged) { + this.m_undoStackChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "UndoStackChanged", { + eventType: 65543, + registerFunc: function () { return _this._RegisterUndoStackChangedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUndoStackChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_undoStackChanged; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UndoService; + }(OfficeExtension.ClientObject)); + OfficeCore.UndoService = UndoService; + var TriStateOption; + (function (TriStateOption) { + TriStateOption["notSet"] = "NotSet"; + TriStateOption["true"] = "True"; + TriStateOption["false"] = "False"; + })(TriStateOption = OfficeCore.TriStateOption || (OfficeCore.TriStateOption = {})); + var UserFeedbackType; + (function (UserFeedbackType) { + UserFeedbackType["like"] = "Like"; + UserFeedbackType["dislike"] = "Dislike"; + UserFeedbackType["idea"] = "Idea"; + UserFeedbackType["unclassified"] = "Unclassified"; + })(UserFeedbackType = OfficeCore.UserFeedbackType || (OfficeCore.UserFeedbackType = {})); + var UserFeedbackUIType; + (function (UserFeedbackUIType) { + UserFeedbackUIType["modalDialog"] = "ModalDialog"; + UserFeedbackUIType["taskpane"] = "Taskpane"; + })(UserFeedbackUIType = OfficeCore.UserFeedbackUIType || (OfficeCore.UserFeedbackUIType = {})); + var _typeUserFeedbackService = "UserFeedbackService"; + var UserFeedbackService = (function (_super) { + __extends(UserFeedbackService, _super); + function UserFeedbackService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UserFeedbackService.prototype, "_className", { + get: function () { + return "UserFeedbackService"; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.collectUserFeedback = function (feedbacktype, UIType, featureArea, options) { + _invokeMethod(this, "CollectUserFeedback", 1, [feedbacktype, UIType, featureArea, options], 4 | 1, 0); + }; + UserFeedbackService.prototype._RegisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_RegisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._UnregisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_UnregisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UserFeedbackService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UserFeedbackService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UserFeedbackService, context, "Microsoft.Office.UserFeedbackService", false, 1 | 4); + }; + Object.defineProperty(UserFeedbackService.prototype, "onUserFeedbackUIDismissed", { + get: function () { + var _this = this; + if (!this.m_userFeedbackUIDismissed) { + this.m_userFeedbackUIDismissed = new OfficeExtension.GenericEventHandlers(this.context, this, "UserFeedbackUIDismissed", { + eventType: 65546, + registerFunc: function () { return _this._RegisterUserFeedbackUIDismissedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUserFeedbackUIDismissedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + isFeedbackSent: value.isFeedbackSent + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_userFeedbackUIDismissed; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UserFeedbackService; + }(OfficeExtension.ClientObject)); + OfficeCore.UserFeedbackService = UserFeedbackService; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["apiNotAvailable"] = "ApiNotAvailable"; + ErrorCodes["clientError"] = "ClientError"; + ErrorCodes["controlIdNotFound"] = "ControlIdNotFound"; + ErrorCodes["entryIdRequired"] = "EntryIdRequired"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["hostRestartNeeded"] = "HostRestartNeeded"; + ErrorCodes["instanceNotFound"] = "InstanceNotFound"; + ErrorCodes["interactiveFlowAborted"] = "InteractiveFlowAborted"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidGrant"] = "InvalidGrant"; + ErrorCodes["invalidResourceUrl"] = "InvalidResourceUrl"; + ErrorCodes["invalidRibbonDefinition"] = "InvalidRibbonDefinition"; + ErrorCodes["objectNotFound"] = "ObjectNotFound"; + ErrorCodes["resourceNotSupported"] = "ResourceNotSupported"; + ErrorCodes["serverError"] = "ServerError"; + ErrorCodes["serviceUrlNotFound"] = "ServiceUrlNotFound"; + ErrorCodes["sharedRuntimeNotAvailable"] = "SharedRuntimeNotAvailable"; + ErrorCodes["ticketInvalidParams"] = "TicketInvalidParams"; + ErrorCodes["ticketNetworkError"] = "TicketNetworkError"; + ErrorCodes["ticketUnauthorized"] = "TicketUnauthorized"; + ErrorCodes["ticketUninitialized"] = "TicketUninitialized"; + ErrorCodes["ticketUnknownError"] = "TicketUnknownError"; + ErrorCodes["unexpectedError"] = "UnexpectedError"; + ErrorCodes["unsupportedUserIdentity"] = "UnsupportedUserIdentity"; + ErrorCodes["userNotSignedIn"] = "UserNotSignedIn"; + })(ErrorCodes = OfficeCore.ErrorCodes || (OfficeCore.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = OfficeCore.Interfaces || (OfficeCore.Interfaces = {})); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var VisibilityMode; + (function (VisibilityMode) { + VisibilityMode["hidden"] = "Hidden"; + VisibilityMode["taskpane"] = "Taskpane"; + })(VisibilityMode = Office.VisibilityMode || (Office.VisibilityMode = {})); + var StartupBehavior; + (function (StartupBehavior) { + StartupBehavior["none"] = "None"; + StartupBehavior["load"] = "Load"; + })(StartupBehavior = Office.StartupBehavior || (Office.StartupBehavior = {})); + var addin; + (function (addin) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function setStartupBehavior(behavior) { + return __awaiter(this, void 0, void 0, function () { + var state, context, appRuntimePersistenceService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (behavior !== StartupBehavior.load && behavior !== StartupBehavior.none) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.invalidArgument, null, null); + } + state = (behavior == StartupBehavior.load ? OfficeCore.AppRuntimeState.background : OfficeCore.AppRuntimeState.inactive); + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + appRuntimePersistenceService.setAppRuntimeStartState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + addin.setStartupBehavior = setStartupBehavior; + function getStartupBehavior() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimePersistenceService, stateResult, state, ret; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + stateResult = appRuntimePersistenceService.getAppRuntimeStartState(); + return [4, context.sync()]; + case 1: + _a.sent(); + state = stateResult.value; + ret = (state == OfficeCore.AppRuntimeState.inactive ? StartupBehavior.none : StartupBehavior.load); + return [2, ret]; + } + }); + }); + } + addin.getStartupBehavior = getStartupBehavior; + function setSnapshotEnabled(enabled) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setSnapshotEnabled(enabled); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, Promise.resolve()]; + } + }); + }); + } + addin.setSnapshotEnabled = setSnapshotEnabled; + function getSnapshotEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + result = appRuntimeService.getSnapshotEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + addin.getSnapshotEnabled = getSnapshotEnabled; + function getContentSnapshotAsBase64() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2, new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var context = _createRequestContext(true); + var appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + var timeoutId = setTimeout(function () { + handler.remove(); + context.sync()["catch"](function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "timeout", "getContentSnapshotAsBase64")); + }, 7000); + var handler = appRuntimeService.onSnapshotImageReady.add(function (arg) { + clearTimeout(timeoutId); + handler.remove(); + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + context.sync()["catch"](function () { }); + resolve(arg.imageBase64); + } + else { + context.sync()["catch"](function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "execution failed", "getContentSnapshotAsBase64")); + } + return null; + }); + context.sync().then(function () { + var apiResult = appRuntimeService.getContentSnapshotAsBase64(); + return context.sync().then(function () { return null; }); + })["catch"](function (e) { reject(e); }); + })]; + }); + }); + } + addin.getContentSnapshotAsBase64 = getContentSnapshotAsBase64; + function _setState(state) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setAppRuntimeState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + function _getState() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, stateResult; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + stateResult = appRuntimeService.getAppRuntimeState(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, stateResult.value]; + } + }); + }); + } + addin._getState = _getState; + function showAsTaskpane() { + return _setState(OfficeCore.AppRuntimeState.visible); + } + addin.showAsTaskpane = showAsTaskpane; + function hide() { + return _setState(OfficeCore.AppRuntimeState.background); + } + addin.hide = hide; + var _appRuntimeEvent; + function _getAppRuntimeEventService() { + if (!_appRuntimeEvent) { + var context = _createRequestContext(true); + _appRuntimeEvent = OfficeCore.AppRuntimeService.newObject(context); + } + return _appRuntimeEvent; + } + function _convertVisibilityToVisibilityMode(visibility) { + if (visibility === OfficeCore.Visibility.visible) { + return VisibilityMode.taskpane; + } + return VisibilityMode.hidden; + } + function onVisibilityModeChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var eventService, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + eventService = _getAppRuntimeEventService(); + registrationToken = eventService.onVisibilityChanged.add(function (args) { + if (listener) { + var msg = { + visibilityMode: _convertVisibilityToVisibilityMode(args.visibility) + }; + listener(msg); + } + return null; + }); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + addin.onVisibilityModeChanged = onVisibilityModeChanged; + var beforeDocumentCloseNotification; + (function (beforeDocumentCloseNotification) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function enable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.enable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.enable = enable; + function disable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.disable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.disable = disable; + function onCloseActionCancelled(listener) { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + registrationToken = beforeCloseNotification.onBeforeCloseNotificationCancelled.add(function (args) { + if (listener) { + listener(); + } + return null; + }); + return [4, context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + beforeDocumentCloseNotification.onCloseActionCancelled = onCloseActionCancelled; + })(beforeDocumentCloseNotification = addin.beforeDocumentCloseNotification || (addin.beforeDocumentCloseNotification = {})); + })(addin = Office.addin || (Office.addin = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ExtensionComponentType; + (function (ExtensionComponentType) { + ExtensionComponentType["taskpane"] = "Taskpane"; + })(ExtensionComponentType || (ExtensionComponentType = {})); + var extensionLifeCycle; + (function (extensionLifeCycle) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + return context; + } + function launchTaskpane(launchOptions) { + return __awaiter(this, void 0, void 0, function () { + var context, extensionLifecycle, settings; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + extensionLifecycle = OfficeCore.ExtensionLifeCycle.newObject(context); + settings = launchOptions.settings; + if (settings != undefined) { + launchOptions.settings = OSF.OUtil.serializeSettings(settings); + } + extensionLifecycle.launchExtensionComponent("", ExtensionComponentType.taskpane, launchOptions); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + extensionLifeCycle.launchTaskpane = launchTaskpane; + })(extensionLifeCycle = Office.extensionLifeCycle || (Office.extensionLifeCycle = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ribbon; + (function (ribbon_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function requestUpdate(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + function processControls(parent) { + if (parent.controls !== undefined + && parent.controls.length !== undefined + && !!parent.controls.length) { + parent.controls + .filter(function (control) { return !(!control.id); }) + .forEach(function (control) { + var ribbonControl = ribbon.getButton(control.id); + if (control.enabled !== undefined && control.enabled !== null) { + ribbonControl.enabled = control.enabled; + } + }); + } + } + input.tabs + .filter(function (tab) { return !(!tab.id); }) + .forEach(function (tab) { + var ribbonTab = ribbon.getTab(tab.id); + if (tab.visible !== undefined && tab.visible !== null) { + ribbonTab.setVisibility(tab.visible); + } + if (!!tab.groups && !!tab.groups.length) { + tab.groups + .filter(function (group) { return !(!group.id); }) + .forEach(function (group) { + processControls(group); + }); + } + else { + processControls(tab); + } + }); + return requestContext.sync(); + } + ribbon_1.requestUpdate = requestUpdate; + function requestCreateControls(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + var delay = function (milliseconds) { + return new Promise(function (resolve, _) { return setTimeout(function () { return resolve(); }, milliseconds); }); + }; + ribbon.executeRequestCreate(JSON.stringify(input)); + return delay(250) + .then(function () { return requestContext.sync(); }); + } + ribbon_1.requestCreateControls = requestCreateControls; + })(ribbon = Office.ribbon || (Office.ribbon = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var AddinInternalServiceErrorCodes; + (function (AddinInternalServiceErrorCodes) { + AddinInternalServiceErrorCodes["generalException"] = "GeneralException"; + })(AddinInternalServiceErrorCodes || (AddinInternalServiceErrorCodes = {})); + var _libraryMetadataInternalServiceApi = { "version": "1.0.0", + "name": "OfficeCore", + "defaultApiSetName": "OfficeSharedApi", + "hostName": "Office", + "apiSets": [], + "strings": ["AddinInternalService"], + "enumTypes": [], + "clientObjectTypes": [[1, + 0, + 0, + 0, + [["notifyActionHandlerReady", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + 0, + "Microsoft.InternalService.AddinInternalService", + 4]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataInternalServiceApi, targetNamespaceObject: OfficeCore }); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var actionProxy; + (function (actionProxy) { + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _association; + var ActionMessageCategory = 2; + var ActionDispatchMessageType = 1000; + function init() { + if (typeof (OSF) !== "undefined" && OSF.DDA && OSF.DDA.RichApi && OSF.DDA.RichApi.richApiMessageManager) { + var context = new OfficeExtension.ClientRequestContext(); + return context.eventRegistration.register(5, "", _handleMessage); + } + } + function setActionAssociation(association) { + _association = association; + } + function _getFunction(functionName) { + if (functionName) { + var nameUpperCase = functionName.toUpperCase(); + var call = _association.mappings[nameUpperCase]; + if (!_isNullOrUndefined(call) && typeof (call) === "function") { + return call; + } + } + throw OfficeExtension.Utility.createRuntimeError("invalidOperation", "sourceData", "ActionProxy._getFunction"); + } + function _handleMessage(args) { + try { + OfficeExtension.Utility.log('ActionProxy._handleMessage'); + OfficeExtension.Utility.checkArgumentNull(args, "args"); + var entryArray = args.entries; + var invocationArray = []; + for (var i = 0; i < entryArray.length; i++) { + if (entryArray[i].messageCategory !== ActionMessageCategory) { + continue; + } + if (typeof (entryArray[i].message) === 'string') { + entryArray[i].message = JSON.parse(entryArray[i].message); + } + if (entryArray[i].messageType === ActionDispatchMessageType) { + var actionsArgs = null; + var actionName = entryArray[i].message[0]; + var call = _getFunction(actionName); + if (entryArray[i].message.length >= 2) { + var actionArgsJson = entryArray[i].message[1]; + if (actionArgsJson) { + if (_isJsonObjectString(actionArgsJson)) { + actionsArgs = JSON.parse(actionArgsJson); + } + else { + actionsArgs = actionArgsJson; + } + } + } + if (typeof (OSF) !== 'undefined' && + OSF.AppTelemetry && + OSF.AppTelemetry.CallOnAppActivatedIfPending) { + OSF.AppTelemetry.CallOnAppActivatedIfPending(); + } + call.apply(null, [actionsArgs]); + } + else { + OfficeExtension.Utility.log('ActionProxy._handleMessage unknown message type ' + entryArray[i].messageType); + } + } + } + catch (ex) { + _tryLog(ex); + throw ex; + } + return OfficeExtension.Utility._createPromiseFromResult(null); + } + function _isJsonObjectString(value) { + if (typeof value === 'string' && value[0] === '{') { + return true; + } + return false; + } + function toLogMessage(ex) { + var ret = 'Unknown Error'; + if (ex) { + try { + if (ex.toString) { + ret = ex.toString(); + } + ret = ret + ' ' + JSON.stringify(ex); + } + catch (otherEx) { + ret = 'Unexpected Error'; + } + } + return ret; + } + function _tryLog(ex) { + var message = toLogMessage(ex); + OfficeExtension.Utility.log(message); + } + function notifyActionHandlerReady() { + var context = new OfficeExtension.ClientRequestContext(); + var addinInternalService = OfficeCore.AddinInternalService.newObject(context); + context._customData = 'WacPartition'; + addinInternalService.notifyActionHandlerReady(); + return context.sync(); + } + function handlerOnReadyInternal() { + try { + Microsoft.Office.WebExtension.onReadyInternal() + .then(function () { + return init(); + }) + .then(function () { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.isDialog === true || (hostInfo.hostPlatform === "web" && hostInfo.hostType !== "word" && hostInfo.hostType !== "excel")) { + return; + } + else { + return notifyActionHandlerReady(); + } + }); + } + catch (ex) { + } + } + function initFromHostBridge(hostBridge) { + hostBridge.addHostMessageHandler(function (bridgeMessage) { + if (bridgeMessage.type === 3) { + _handleMessage(bridgeMessage.message); + } + }); + } + function initOnce() { + OfficeExtension.Utility.log('ActionProxy.initOnce'); + if (typeof (Office.actions) != 'undefined') { + setActionAssociation(Office.actions._association); + } + if (typeof (document) !== 'undefined') { + if (document.readyState && document.readyState !== 'loading') { + OfficeExtension.Utility.log('ActionProxy.initOnce: document.readyState is not loading state'); + handlerOnReadyInternal(); + } + else if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", function () { + OfficeExtension.Utility.log('ActionProxy.initOnce: DOMContentLoaded event triggered'); + handlerOnReadyInternal(); + }); + } + } + OfficeExtension.HostBridge.onInited(function (hostBridge) { + initFromHostBridge(hostBridge); + }); + } + initOnce(); + })(actionProxy || (actionProxy = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var actions; + (function (actions) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function areShortcutsInUse(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, inUseArray, inUseInfoArray, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + inUseArray = actionService.areShortcutsInUse(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + inUseInfoArray = []; + for (i = 0; i < shortcuts.length; i++) { + inUseInfoArray.push({ + shortcut: shortcuts[i], + inUse: inUseArray.value[i] + }); + } + return [2, inUseInfoArray]; + } + }); + }); + } + actions.areShortcutsInUse = areShortcutsInUse; + function replaceShortcuts(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + actionService.replaceShortcuts(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + actions.replaceShortcuts = replaceShortcuts; + function getShortcuts() { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, shortcuts; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + shortcuts = actionService.getShortcuts(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, shortcuts.value]; + } + }); + }); + } + actions.getShortcuts = getShortcuts; + })(actions = Office.actions || (Office.actions = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var AugLoop; + (function (AugLoop) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function SendMessage(message) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + augLoopEventService.sendMessage(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + AugLoop.SendMessage = SendMessage; + function onHostMessageReceived(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService, callback, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + callback = function (args) { + if (listener) { + var message = args.data; + listener(message); + } + return null; + }; + augLoopEventService.onHostMessageReceived.add(callback); + return [4, augLoopEventService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + augLoopEventService.onHostMessageReceived.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + AugLoop.onHostMessageReceived = onHostMessageReceived; + })(AugLoop = OfficeFirstParty.AugLoop || (OfficeFirstParty.AugLoop = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var Undo; + (function (Undo) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + context._customData = 'SkipUndoRecording'; + return context; + } + var resolver; + function onCopilotOperationStartedEventReceived() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (typeof resolver !== "undefined") { + resolver(); + resolver = undefined; + } + return [2]; + }); + }); + } + function undo() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + result = undoService.undo(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + Undo.undo = undo; + function onUndoStackChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onUndoStackChanged.add(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + undoService.onUndoStackChanged.remove(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + Undo.onUndoStackChanged = onUndoStackChanged; + function startCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var waitForEventPromise, context, undoService, shouldWaitForEvent, e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (typeof resolver !== "undefined") { + throw new Error("startCopilotOperation is already inprogress"); + } + waitForEventPromise = new Promise(function (resolve) { resolver = resolve; }); + _a.label = 1; + case 1: + _a.trys.push([1, 4, , 5]); + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onCopilotOperationStarted.add(onCopilotOperationStartedEventReceived); + return [4, context.sync()]; + case 2: + _a.sent(); + shouldWaitForEvent = undoService.startCopilotOperation(""); + return [4, context.sync()]; + case 3: + _a.sent(); + if (shouldWaitForEvent.value) { + return [2, waitForEventPromise]; + } + else { + resolver = undefined; + } + return [3, 5]; + case 4: + e_1 = _a.sent(); + resolver = undefined; + throw e_1; + case 5: return [2]; + } + }); + }); + } + Undo.startCopilotOperation = startCopilotOperation; + function endCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.endCopilotOperation(""); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + Undo.endCopilotOperation = endCopilotOperation; + })(Undo = OfficeFirstParty.Undo || (OfficeFirstParty.Undo = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var Office; +(function (Office) { + var dialogPage; + (function (dialogPage_1) { + function close() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.close(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.close = close; + function readyToShow() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.readyToShow(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.readyToShow = readyToShow; + function onShow(callback) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.onOnShowEvent.add(callback); + removeListener = function () { + dialogPage.onOnShowEvent.remove(callback); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + dialogPage_1.onShow = onShow; + function sendMessageToHost(message) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.sendMessageToHost(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.sendMessageToHost = sendMessageToHost; + })(dialogPage = Office.dialogPage || (Office.dialogPage = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var UserFeedback; + (function (UserFeedback) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function CollectUserFeedback(feedbacktype, uiType, featureArea, options) { + return __awaiter(this, void 0, void 0, function () { + var context, userFeedbackService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.collectUserFeedback(feedbacktype, uiType, featureArea, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + UserFeedback.CollectUserFeedback = CollectUserFeedback; + function onUserFeedbackUIDismissed(listener) { + return __awaiter(this, void 0, void 0, function () { + var callback, context, userFeedbackService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + callback = function (args) { + if (listener) { + var isFeedbackSent = args.isFeedbackSent; + listener(isFeedbackSent); + } + return null; + }; + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.onUserFeedbackUIDismissed.add(callback); + return [4, userFeedbackService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + userFeedbackService.onUserFeedbackUIDismissed.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, removeListener]; + } + }); + }); + } + UserFeedback.onUserFeedbackUIDismissed = onUserFeedbackUIDismissed; + })(UserFeedback = OfficeFirstParty.UserFeedback || (OfficeFirstParty.UserFeedback = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var _BeginExcel = "_BeginExcel"; +var Excel; +(function (Excel) { + var Base64EncodingType; + (function (Base64EncodingType) { + Base64EncodingType["JPG"] = "JPG"; + Base64EncodingType["PNG"] = "PNG"; + })(Base64EncodingType = Excel.Base64EncodingType || (Excel.Base64EncodingType = {})); + var BlockedErrorCellValueSubType; + (function (BlockedErrorCellValueSubType) { + BlockedErrorCellValueSubType["unknown"] = "Unknown"; + BlockedErrorCellValueSubType["dataTypeRestrictedDomain"] = "DataTypeRestrictedDomain"; + BlockedErrorCellValueSubType["dataTypePrivacySetting"] = "DataTypePrivacySetting"; + BlockedErrorCellValueSubType["dataTypeUnsupportedApp"] = "DataTypeUnsupportedApp"; + BlockedErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BlockedErrorCellValueSubType["richDataLinkDisabled"] = "RichDataLinkDisabled"; + BlockedErrorCellValueSubType["signInError"] = "SignInError"; + BlockedErrorCellValueSubType["noLicense"] = "NoLicense"; + })(BlockedErrorCellValueSubType = Excel.BlockedErrorCellValueSubType || (Excel.BlockedErrorCellValueSubType = {})); + var BusyErrorCellValueSubType; + (function (BusyErrorCellValueSubType) { + BusyErrorCellValueSubType["unknown"] = "Unknown"; + BusyErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BusyErrorCellValueSubType["loadingImage"] = "LoadingImage"; + })(BusyErrorCellValueSubType = Excel.BusyErrorCellValueSubType || (Excel.BusyErrorCellValueSubType = {})); + var CalcErrorCellValueSubType; + (function (CalcErrorCellValueSubType) { + CalcErrorCellValueSubType["unknown"] = "Unknown"; + CalcErrorCellValueSubType["arrayOfArrays"] = "ArrayOfArrays"; + CalcErrorCellValueSubType["arrayOfRanges"] = "ArrayOfRanges"; + CalcErrorCellValueSubType["emptyArray"] = "EmptyArray"; + CalcErrorCellValueSubType["unsupportedLifting"] = "UnsupportedLifting"; + CalcErrorCellValueSubType["dataTableReferencedPendingFormula"] = "DataTableReferencedPendingFormula"; + CalcErrorCellValueSubType["tooManyCells"] = "TooManyCells"; + CalcErrorCellValueSubType["lambdaInCell"] = "LambdaInCell"; + CalcErrorCellValueSubType["tooDeeplyNested"] = "TooDeeplyNested"; + CalcErrorCellValueSubType["textOverflow"] = "TextOverflow"; + })(CalcErrorCellValueSubType = Excel.CalcErrorCellValueSubType || (Excel.CalcErrorCellValueSubType = {})); + var EntityCardLayoutType; + (function (EntityCardLayoutType) { + EntityCardLayoutType["entity"] = "Entity"; + EntityCardLayoutType["array"] = "Array"; + })(EntityCardLayoutType = Excel.EntityCardLayoutType || (Excel.EntityCardLayoutType = {})); + var EntityCompactLayoutIcons; + (function (EntityCompactLayoutIcons) { + EntityCompactLayoutIcons["generic"] = "Generic"; + EntityCompactLayoutIcons["accessibility"] = "Accessibility"; + EntityCompactLayoutIcons["airplane"] = "Airplane"; + EntityCompactLayoutIcons["airplaneTakeOff"] = "AirplaneTakeOff"; + EntityCompactLayoutIcons["album"] = "Album"; + EntityCompactLayoutIcons["alert"] = "Alert"; + EntityCompactLayoutIcons["alertUrgent"] = "AlertUrgent"; + EntityCompactLayoutIcons["animal"] = "Animal"; + EntityCompactLayoutIcons["animalCat"] = "AnimalCat"; + EntityCompactLayoutIcons["animalDog"] = "AnimalDog"; + EntityCompactLayoutIcons["animalRabbit"] = "AnimalRabbit"; + EntityCompactLayoutIcons["animalTurtle"] = "AnimalTurtle"; + EntityCompactLayoutIcons["appFolder"] = "AppFolder"; + EntityCompactLayoutIcons["appGeneric"] = "AppGeneric"; + EntityCompactLayoutIcons["apple"] = "Apple"; + EntityCompactLayoutIcons["approvalsApp"] = "ApprovalsApp"; + EntityCompactLayoutIcons["archive"] = "Archive"; + EntityCompactLayoutIcons["archiveMultiple"] = "ArchiveMultiple"; + EntityCompactLayoutIcons["arrowTrendingLines"] = "ArrowTrendingLines"; + EntityCompactLayoutIcons["art"] = "Art"; + EntityCompactLayoutIcons["atom"] = "Atom"; + EntityCompactLayoutIcons["attach"] = "Attach"; + EntityCompactLayoutIcons["automobile"] = "Automobile"; + EntityCompactLayoutIcons["autosum"] = "Autosum"; + EntityCompactLayoutIcons["backpack"] = "Backpack"; + EntityCompactLayoutIcons["badge"] = "Badge"; + EntityCompactLayoutIcons["balloon"] = "Balloon"; + EntityCompactLayoutIcons["bank"] = "Bank"; + EntityCompactLayoutIcons["barcodeScanner"] = "BarcodeScanner"; + EntityCompactLayoutIcons["basketball"] = "Basketball"; + EntityCompactLayoutIcons["battery0"] = "Battery0"; + EntityCompactLayoutIcons["battery10"] = "Battery10"; + EntityCompactLayoutIcons["beach"] = "Beach"; + EntityCompactLayoutIcons["beaker"] = "Beaker"; + EntityCompactLayoutIcons["bed"] = "Bed"; + EntityCompactLayoutIcons["binFull"] = "BinFull"; + EntityCompactLayoutIcons["bird"] = "Bird"; + EntityCompactLayoutIcons["bluetooth"] = "Bluetooth"; + EntityCompactLayoutIcons["board"] = "Board"; + EntityCompactLayoutIcons["boardGames"] = "BoardGames"; + EntityCompactLayoutIcons["book"] = "Book"; + EntityCompactLayoutIcons["bookmark"] = "Bookmark"; + EntityCompactLayoutIcons["bookmarkMultiple"] = "BookmarkMultiple"; + EntityCompactLayoutIcons["bot"] = "Bot"; + EntityCompactLayoutIcons["bowlChopsticks"] = "BowlChopsticks"; + EntityCompactLayoutIcons["box"] = "Box"; + EntityCompactLayoutIcons["boxMultiple"] = "BoxMultiple"; + EntityCompactLayoutIcons["brainCircuit"] = "BrainCircuit"; + EntityCompactLayoutIcons["branch"] = "Branch"; + EntityCompactLayoutIcons["branchFork"] = "BranchFork"; + EntityCompactLayoutIcons["branchRequest"] = "BranchRequest"; + EntityCompactLayoutIcons["bridge"] = "Bridge"; + EntityCompactLayoutIcons["briefcase"] = "Briefcase"; + EntityCompactLayoutIcons["briefcaseMedical"] = "BriefcaseMedical"; + EntityCompactLayoutIcons["broadActivityFeed"] = "BroadActivityFeed"; + EntityCompactLayoutIcons["broom"] = "Broom"; + EntityCompactLayoutIcons["bug"] = "Bug"; + EntityCompactLayoutIcons["building"] = "Building"; + EntityCompactLayoutIcons["buildingBank"] = "BuildingBank"; + EntityCompactLayoutIcons["buildingFactory"] = "BuildingFactory"; + EntityCompactLayoutIcons["buildingGovernment"] = "BuildingGovernment"; + EntityCompactLayoutIcons["buildingHome"] = "BuildingHome"; + EntityCompactLayoutIcons["buildingLighthouse"] = "BuildingLighthouse"; + EntityCompactLayoutIcons["buildingMultiple"] = "BuildingMultiple"; + EntityCompactLayoutIcons["buildingRetail"] = "BuildingRetail"; + EntityCompactLayoutIcons["buildingRetailMore"] = "BuildingRetailMore"; + EntityCompactLayoutIcons["buildingRetailToolbox"] = "BuildingRetailToolbox"; + EntityCompactLayoutIcons["buildingShop"] = "BuildingShop"; + EntityCompactLayoutIcons["buildingSkyscraper"] = "BuildingSkyscraper"; + EntityCompactLayoutIcons["calculator"] = "Calculator"; + EntityCompactLayoutIcons["calendarLtr"] = "CalendarLtr"; + EntityCompactLayoutIcons["calendarRtl"] = "CalendarRtl"; + EntityCompactLayoutIcons["call"] = "Call"; + EntityCompactLayoutIcons["calligraphyPen"] = "CalligraphyPen"; + EntityCompactLayoutIcons["camera"] = "Camera"; + EntityCompactLayoutIcons["cameraDome"] = "CameraDome"; + EntityCompactLayoutIcons["car"] = "Car"; + EntityCompactLayoutIcons["cart"] = "Cart"; + EntityCompactLayoutIcons["cat"] = "Cat"; + EntityCompactLayoutIcons["certificate"] = "Certificate"; + EntityCompactLayoutIcons["chartMultiple"] = "ChartMultiple"; + EntityCompactLayoutIcons["chat"] = "Chat"; + EntityCompactLayoutIcons["chatMultiple"] = "ChatMultiple"; + EntityCompactLayoutIcons["chatVideo"] = "ChatVideo"; + EntityCompactLayoutIcons["check"] = "Check"; + EntityCompactLayoutIcons["checkboxChecked"] = "CheckboxChecked"; + EntityCompactLayoutIcons["checkboxUnchecked"] = "CheckboxUnchecked"; + EntityCompactLayoutIcons["checkmark"] = "Checkmark"; + EntityCompactLayoutIcons["chess"] = "Chess"; + EntityCompactLayoutIcons["city"] = "City"; + EntityCompactLayoutIcons["class"] = "Class"; + EntityCompactLayoutIcons["classification"] = "Classification"; + EntityCompactLayoutIcons["clipboard"] = "Clipboard"; + EntityCompactLayoutIcons["clipboardDataBar"] = "ClipboardDataBar"; + EntityCompactLayoutIcons["clipboardPulse"] = "ClipboardPulse"; + EntityCompactLayoutIcons["clipboardTask"] = "ClipboardTask"; + EntityCompactLayoutIcons["clock"] = "Clock"; + EntityCompactLayoutIcons["clockAlarm"] = "ClockAlarm"; + EntityCompactLayoutIcons["cloud"] = "Cloud"; + EntityCompactLayoutIcons["cloudWords"] = "CloudWords"; + EntityCompactLayoutIcons["code"] = "Code"; + EntityCompactLayoutIcons["collections"] = "Collections"; + EntityCompactLayoutIcons["comment"] = "Comment"; + EntityCompactLayoutIcons["commentMultiple"] = "CommentMultiple"; + EntityCompactLayoutIcons["communication"] = "Communication"; + EntityCompactLayoutIcons["compassNorthwest"] = "CompassNorthwest"; + EntityCompactLayoutIcons["conferenceRoom"] = "ConferenceRoom"; + EntityCompactLayoutIcons["connector"] = "Connector"; + EntityCompactLayoutIcons["constellation"] = "Constellation"; + EntityCompactLayoutIcons["contactCard"] = "ContactCard"; + EntityCompactLayoutIcons["cookies"] = "Cookies"; + EntityCompactLayoutIcons["couch"] = "Couch"; + EntityCompactLayoutIcons["creditCardPerson"] = "CreditCardPerson"; + EntityCompactLayoutIcons["creditCardToolbox"] = "CreditCardToolbox"; + EntityCompactLayoutIcons["cube"] = "Cube"; + EntityCompactLayoutIcons["cubeMultiple"] = "CubeMultiple"; + EntityCompactLayoutIcons["cubeTree"] = "CubeTree"; + EntityCompactLayoutIcons["currencyDollarEuro"] = "CurrencyDollarEuro"; + EntityCompactLayoutIcons["currencyDollarRupee"] = "CurrencyDollarRupee"; + EntityCompactLayoutIcons["dataArea"] = "DataArea"; + EntityCompactLayoutIcons["database"] = "Database"; + EntityCompactLayoutIcons["databaseMultiple"] = "DatabaseMultiple"; + EntityCompactLayoutIcons["dataFunnel"] = "DataFunnel"; + EntityCompactLayoutIcons["dataHistogram"] = "DataHistogram"; + EntityCompactLayoutIcons["dataLine"] = "DataLine"; + EntityCompactLayoutIcons["dataPie"] = "DataPie"; + EntityCompactLayoutIcons["dataScatter"] = "DataScatter"; + EntityCompactLayoutIcons["dataSunburst"] = "DataSunburst"; + EntityCompactLayoutIcons["dataTreemap"] = "DataTreemap"; + EntityCompactLayoutIcons["dataWaterfall"] = "DataWaterfall"; + EntityCompactLayoutIcons["dataWhisker"] = "DataWhisker"; + EntityCompactLayoutIcons["dentist"] = "Dentist"; + EntityCompactLayoutIcons["designIdeas"] = "DesignIdeas"; + EntityCompactLayoutIcons["desktop"] = "Desktop"; + EntityCompactLayoutIcons["desktopMac"] = "DesktopMac"; + EntityCompactLayoutIcons["developerBoard"] = "DeveloperBoard"; + EntityCompactLayoutIcons["deviceMeetingRoom"] = "DeviceMeetingRoom"; + EntityCompactLayoutIcons["diagram"] = "Diagram"; + EntityCompactLayoutIcons["dialpad"] = "Dialpad"; + EntityCompactLayoutIcons["diamond"] = "Diamond"; + EntityCompactLayoutIcons["dinosaur"] = "Dinosaur"; + EntityCompactLayoutIcons["directions"] = "Directions"; + EntityCompactLayoutIcons["disaster"] = "Disaster"; + EntityCompactLayoutIcons["diversity"] = "Diversity"; + EntityCompactLayoutIcons["dNA"] = "DNA"; + EntityCompactLayoutIcons["doctor"] = "Doctor"; + EntityCompactLayoutIcons["document"] = "Document"; + EntityCompactLayoutIcons["documentData"] = "DocumentData"; + EntityCompactLayoutIcons["documentLandscape"] = "DocumentLandscape"; + EntityCompactLayoutIcons["documentMultiple"] = "DocumentMultiple"; + EntityCompactLayoutIcons["documentPdf"] = "DocumentPdf"; + EntityCompactLayoutIcons["documentQueue"] = "DocumentQueue"; + EntityCompactLayoutIcons["documentText"] = "DocumentText"; + EntityCompactLayoutIcons["dog"] = "Dog"; + EntityCompactLayoutIcons["door"] = "Door"; + EntityCompactLayoutIcons["doorTag"] = "DoorTag"; + EntityCompactLayoutIcons["drafts"] = "Drafts"; + EntityCompactLayoutIcons["drama"] = "Drama"; + EntityCompactLayoutIcons["drinkBeer"] = "DrinkBeer"; + EntityCompactLayoutIcons["drinkCoffee"] = "DrinkCoffee"; + EntityCompactLayoutIcons["drinkMargarita"] = "DrinkMargarita"; + EntityCompactLayoutIcons["drinkToGo"] = "DrinkToGo"; + EntityCompactLayoutIcons["drinkWine"] = "DrinkWine"; + EntityCompactLayoutIcons["driveTrain"] = "DriveTrain"; + EntityCompactLayoutIcons["drop"] = "Drop"; + EntityCompactLayoutIcons["dualScreen"] = "DualScreen"; + EntityCompactLayoutIcons["dumbbell"] = "Dumbbell"; + EntityCompactLayoutIcons["earth"] = "Earth"; + EntityCompactLayoutIcons["emoji"] = "Emoji"; + EntityCompactLayoutIcons["emojiAngry"] = "EmojiAngry"; + EntityCompactLayoutIcons["emojiHand"] = "EmojiHand"; + EntityCompactLayoutIcons["emojiLaugh"] = "EmojiLaugh"; + EntityCompactLayoutIcons["emojiMeh"] = "EmojiMeh"; + EntityCompactLayoutIcons["emojiMultiple"] = "EmojiMultiple"; + EntityCompactLayoutIcons["emojiSad"] = "EmojiSad"; + EntityCompactLayoutIcons["emojiSadSlight"] = "EmojiSadSlight"; + EntityCompactLayoutIcons["emojiSmileSlight"] = "EmojiSmileSlight"; + EntityCompactLayoutIcons["emojiSparkle"] = "EmojiSparkle"; + EntityCompactLayoutIcons["emojiSurprise"] = "EmojiSurprise"; + EntityCompactLayoutIcons["engine"] = "Engine"; + EntityCompactLayoutIcons["eraser"] = "Eraser"; + EntityCompactLayoutIcons["eye"] = "Eye"; + EntityCompactLayoutIcons["eyedropper"] = "Eyedropper"; + EntityCompactLayoutIcons["fax"] = "Fax"; + EntityCompactLayoutIcons["fingerprint"] = "Fingerprint"; + EntityCompactLayoutIcons["firstAid"] = "FirstAid"; + EntityCompactLayoutIcons["flag"] = "Flag"; + EntityCompactLayoutIcons["flash"] = "Flash"; + EntityCompactLayoutIcons["flashlight"] = "Flashlight"; + EntityCompactLayoutIcons["flow"] = "Flow"; + EntityCompactLayoutIcons["flowchart"] = "Flowchart"; + EntityCompactLayoutIcons["folder"] = "Folder"; + EntityCompactLayoutIcons["folderOpen"] = "FolderOpen"; + EntityCompactLayoutIcons["folderOpenVertical"] = "FolderOpenVertical"; + EntityCompactLayoutIcons["folderPerson"] = "FolderPerson"; + EntityCompactLayoutIcons["folderZip"] = "FolderZip"; + EntityCompactLayoutIcons["food"] = "Food"; + EntityCompactLayoutIcons["foodApple"] = "FoodApple"; + EntityCompactLayoutIcons["foodCake"] = "FoodCake"; + EntityCompactLayoutIcons["foodEgg"] = "FoodEgg"; + EntityCompactLayoutIcons["foodGrains"] = "FoodGrains"; + EntityCompactLayoutIcons["foodPizza"] = "FoodPizza"; + EntityCompactLayoutIcons["foodToast"] = "FoodToast"; + EntityCompactLayoutIcons["galaxy"] = "Galaxy"; + EntityCompactLayoutIcons["games"] = "Games"; + EntityCompactLayoutIcons["ganttChart"] = "GanttChart"; + EntityCompactLayoutIcons["gas"] = "Gas"; + EntityCompactLayoutIcons["gasPump"] = "GasPump"; + EntityCompactLayoutIcons["gauge"] = "Gauge"; + EntityCompactLayoutIcons["gavel"] = "Gavel"; + EntityCompactLayoutIcons["gift"] = "Gift"; + EntityCompactLayoutIcons["giftCard"] = "GiftCard"; + EntityCompactLayoutIcons["glasses"] = "Glasses"; + EntityCompactLayoutIcons["globe"] = "Globe"; + EntityCompactLayoutIcons["globeSurface"] = "GlobeSurface"; + EntityCompactLayoutIcons["grid"] = "Grid"; + EntityCompactLayoutIcons["gridDots"] = "GridDots"; + EntityCompactLayoutIcons["gridKanban"] = "GridKanban"; + EntityCompactLayoutIcons["guardian"] = "Guardian"; + EntityCompactLayoutIcons["guest"] = "Guest"; + EntityCompactLayoutIcons["guitar"] = "Guitar"; + EntityCompactLayoutIcons["handLeft"] = "HandLeft"; + EntityCompactLayoutIcons["handRight"] = "HandRight"; + EntityCompactLayoutIcons["handshake"] = "Handshake"; + EntityCompactLayoutIcons["hardDrive"] = "HardDrive"; + EntityCompactLayoutIcons["hatGraduation"] = "HatGraduation"; + EntityCompactLayoutIcons["headphones"] = "Headphones"; + EntityCompactLayoutIcons["headphonesSoundWave"] = "HeadphonesSoundWave"; + EntityCompactLayoutIcons["headset"] = "Headset"; + EntityCompactLayoutIcons["headsetVr"] = "HeadsetVr"; + EntityCompactLayoutIcons["heart"] = "Heart"; + EntityCompactLayoutIcons["heartBroken"] = "HeartBroken"; + EntityCompactLayoutIcons["heartCircle"] = "HeartCircle"; + EntityCompactLayoutIcons["heartHuman"] = "HeartHuman"; + EntityCompactLayoutIcons["heartPulse"] = "HeartPulse"; + EntityCompactLayoutIcons["history"] = "History"; + EntityCompactLayoutIcons["home"] = "Home"; + EntityCompactLayoutIcons["homeMore"] = "HomeMore"; + EntityCompactLayoutIcons["homePerson"] = "HomePerson"; + EntityCompactLayoutIcons["icons"] = "Icons"; + EntityCompactLayoutIcons["image"] = "Image"; + EntityCompactLayoutIcons["imageGlobe"] = "ImageGlobe"; + EntityCompactLayoutIcons["imageMultiple"] = "ImageMultiple"; + EntityCompactLayoutIcons["iot"] = "Iot"; + EntityCompactLayoutIcons["joystick"] = "Joystick"; + EntityCompactLayoutIcons["justice"] = "Justice"; + EntityCompactLayoutIcons["key"] = "Key"; + EntityCompactLayoutIcons["keyboard"] = "Keyboard"; + EntityCompactLayoutIcons["keyboardLayoutSplit"] = "KeyboardLayoutSplit"; + EntityCompactLayoutIcons["keyMultiple"] = "KeyMultiple"; + EntityCompactLayoutIcons["languages"] = "Languages"; + EntityCompactLayoutIcons["laptop"] = "Laptop"; + EntityCompactLayoutIcons["lasso"] = "Lasso"; + EntityCompactLayoutIcons["launcherSettings"] = "LauncherSettings"; + EntityCompactLayoutIcons["layer"] = "Layer"; + EntityCompactLayoutIcons["leaf"] = "Leaf"; + EntityCompactLayoutIcons["leafOne"] = "LeafOne"; + EntityCompactLayoutIcons["leafThree"] = "LeafThree"; + EntityCompactLayoutIcons["leafTwo"] = "LeafTwo"; + EntityCompactLayoutIcons["library"] = "Library"; + EntityCompactLayoutIcons["lightbulb"] = "Lightbulb"; + EntityCompactLayoutIcons["lightbulbFilament"] = "LightbulbFilament"; + EntityCompactLayoutIcons["likert"] = "Likert"; + EntityCompactLayoutIcons["link"] = "Link"; + EntityCompactLayoutIcons["localLanguage"] = "LocalLanguage"; + EntityCompactLayoutIcons["location"] = "Location"; + EntityCompactLayoutIcons["lockClosed"] = "LockClosed"; + EntityCompactLayoutIcons["lockMultiple"] = "LockMultiple"; + EntityCompactLayoutIcons["lockOpen"] = "LockOpen"; + EntityCompactLayoutIcons["lottery"] = "Lottery"; + EntityCompactLayoutIcons["luggage"] = "Luggage"; + EntityCompactLayoutIcons["mail"] = "Mail"; + EntityCompactLayoutIcons["mailInbox"] = "MailInbox"; + EntityCompactLayoutIcons["mailMultiple"] = "MailMultiple"; + EntityCompactLayoutIcons["map"] = "Map"; + EntityCompactLayoutIcons["mapPin"] = "MapPin"; + EntityCompactLayoutIcons["markdown"] = "Markdown"; + EntityCompactLayoutIcons["mathFormula"] = "MathFormula"; + EntityCompactLayoutIcons["mathSymbols"] = "MathSymbols"; + EntityCompactLayoutIcons["max"] = "Max"; + EntityCompactLayoutIcons["megaphone"] = "Megaphone"; + EntityCompactLayoutIcons["megaphoneLoud"] = "MegaphoneLoud"; + EntityCompactLayoutIcons["mention"] = "Mention"; + EntityCompactLayoutIcons["mic"] = "Mic"; + EntityCompactLayoutIcons["microscope"] = "Microscope"; + EntityCompactLayoutIcons["midi"] = "Midi"; + EntityCompactLayoutIcons["molecule"] = "Molecule"; + EntityCompactLayoutIcons["money"] = "Money"; + EntityCompactLayoutIcons["moneyHand"] = "MoneyHand"; + EntityCompactLayoutIcons["mountain"] = "Mountain"; + EntityCompactLayoutIcons["movieCamera"] = "MovieCamera"; + EntityCompactLayoutIcons["moviesAndTv"] = "MoviesAndTv"; + EntityCompactLayoutIcons["musicNote"] = "MusicNote"; + EntityCompactLayoutIcons["musicNote1"] = "MusicNote1"; + EntityCompactLayoutIcons["musicNote2"] = "MusicNote2"; + EntityCompactLayoutIcons["myLocation"] = "MyLocation"; + EntityCompactLayoutIcons["nByN"] = "NByN"; + EntityCompactLayoutIcons["nByOne"] = "NByOne"; + EntityCompactLayoutIcons["news"] = "News"; + EntityCompactLayoutIcons["notablePeople"] = "NotablePeople"; + EntityCompactLayoutIcons["note"] = "Note"; + EntityCompactLayoutIcons["notebook"] = "Notebook"; + EntityCompactLayoutIcons["notepad"] = "Notepad"; + EntityCompactLayoutIcons["notepadPerson"] = "NotepadPerson"; + EntityCompactLayoutIcons["oneByN"] = "OneByN"; + EntityCompactLayoutIcons["oneByOne"] = "OneByOne"; + EntityCompactLayoutIcons["options"] = "Options"; + EntityCompactLayoutIcons["organization"] = "Organization"; + EntityCompactLayoutIcons["organizationHorizontal"] = "OrganizationHorizontal"; + EntityCompactLayoutIcons["oval"] = "Oval"; + EntityCompactLayoutIcons["paintBrush"] = "PaintBrush"; + EntityCompactLayoutIcons["paintBucket"] = "PaintBucket"; + EntityCompactLayoutIcons["partlySunnyWeather"] = "PartlySunnyWeather"; + EntityCompactLayoutIcons["password"] = "Password"; + EntityCompactLayoutIcons["patch"] = "Patch"; + EntityCompactLayoutIcons["patient"] = "Patient"; + EntityCompactLayoutIcons["payment"] = "Payment"; + EntityCompactLayoutIcons["pen"] = "Pen"; + EntityCompactLayoutIcons["pentagon"] = "Pentagon"; + EntityCompactLayoutIcons["people"] = "People"; + EntityCompactLayoutIcons["peopleAudience"] = "PeopleAudience"; + EntityCompactLayoutIcons["peopleCall"] = "PeopleCall"; + EntityCompactLayoutIcons["peopleCommunity"] = "PeopleCommunity"; + EntityCompactLayoutIcons["peopleMoney"] = "PeopleMoney"; + EntityCompactLayoutIcons["peopleQueue"] = "PeopleQueue"; + EntityCompactLayoutIcons["peopleTeam"] = "PeopleTeam"; + EntityCompactLayoutIcons["peopleToolbox"] = "PeopleToolbox"; + EntityCompactLayoutIcons["person"] = "Person"; + EntityCompactLayoutIcons["personBoard"] = "PersonBoard"; + EntityCompactLayoutIcons["personCall"] = "PersonCall"; + EntityCompactLayoutIcons["personChat"] = "PersonChat"; + EntityCompactLayoutIcons["personFeedback"] = "PersonFeedback"; + EntityCompactLayoutIcons["personSupport"] = "PersonSupport"; + EntityCompactLayoutIcons["personVoice"] = "PersonVoice"; + EntityCompactLayoutIcons["phone"] = "Phone"; + EntityCompactLayoutIcons["phoneDesktop"] = "PhoneDesktop"; + EntityCompactLayoutIcons["phoneLaptop"] = "PhoneLaptop"; + EntityCompactLayoutIcons["phoneShake"] = "PhoneShake"; + EntityCompactLayoutIcons["phoneTablet"] = "PhoneTablet"; + EntityCompactLayoutIcons["phoneVibrate"] = "PhoneVibrate"; + EntityCompactLayoutIcons["photoFilter"] = "PhotoFilter"; + EntityCompactLayoutIcons["pi"] = "Pi"; + EntityCompactLayoutIcons["pictureInPicture"] = "PictureInPicture"; + EntityCompactLayoutIcons["pilates"] = "Pilates"; + EntityCompactLayoutIcons["pill"] = "Pill"; + EntityCompactLayoutIcons["pin"] = "Pin"; + EntityCompactLayoutIcons["pipeline"] = "Pipeline"; + EntityCompactLayoutIcons["planet"] = "Planet"; + EntityCompactLayoutIcons["playingCards"] = "PlayingCards"; + EntityCompactLayoutIcons["plugConnected"] = "PlugConnected"; + EntityCompactLayoutIcons["plugDisconnected"] = "PlugDisconnected"; + EntityCompactLayoutIcons["pointScan"] = "PointScan"; + EntityCompactLayoutIcons["poll"] = "Poll"; + EntityCompactLayoutIcons["power"] = "Power"; + EntityCompactLayoutIcons["predictions"] = "Predictions"; + EntityCompactLayoutIcons["premium"] = "Premium"; + EntityCompactLayoutIcons["presenter"] = "Presenter"; + EntityCompactLayoutIcons["previewLink"] = "PreviewLink"; + EntityCompactLayoutIcons["print"] = "Print"; + EntityCompactLayoutIcons["production"] = "Production"; + EntityCompactLayoutIcons["prohibited"] = "Prohibited"; + EntityCompactLayoutIcons["projectionScreen"] = "ProjectionScreen"; + EntityCompactLayoutIcons["protocolHandler"] = "ProtocolHandler"; + EntityCompactLayoutIcons["pulse"] = "Pulse"; + EntityCompactLayoutIcons["pulseSquare"] = "PulseSquare"; + EntityCompactLayoutIcons["puzzlePiece"] = "PuzzlePiece"; + EntityCompactLayoutIcons["qrCode"] = "QrCode"; + EntityCompactLayoutIcons["radar"] = "Radar"; + EntityCompactLayoutIcons["ram"] = "Ram"; + EntityCompactLayoutIcons["readingList"] = "ReadingList"; + EntityCompactLayoutIcons["realEstate"] = "RealEstate"; + EntityCompactLayoutIcons["receipt"] = "Receipt"; + EntityCompactLayoutIcons["reward"] = "Reward"; + EntityCompactLayoutIcons["rhombus"] = "Rhombus"; + EntityCompactLayoutIcons["ribbon"] = "Ribbon"; + EntityCompactLayoutIcons["ribbonStar"] = "RibbonStar"; + EntityCompactLayoutIcons["roadCone"] = "RoadCone"; + EntityCompactLayoutIcons["rocket"] = "Rocket"; + EntityCompactLayoutIcons["router"] = "Router"; + EntityCompactLayoutIcons["rss"] = "Rss"; + EntityCompactLayoutIcons["ruler"] = "Ruler"; + EntityCompactLayoutIcons["run"] = "Run"; + EntityCompactLayoutIcons["running"] = "Running"; + EntityCompactLayoutIcons["satellite"] = "Satellite"; + EntityCompactLayoutIcons["save"] = "Save"; + EntityCompactLayoutIcons["savings"] = "Savings"; + EntityCompactLayoutIcons["scales"] = "Scales"; + EntityCompactLayoutIcons["scan"] = "Scan"; + EntityCompactLayoutIcons["scratchpad"] = "Scratchpad"; + EntityCompactLayoutIcons["screenPerson"] = "ScreenPerson"; + EntityCompactLayoutIcons["screenshot"] = "Screenshot"; + EntityCompactLayoutIcons["search"] = "Search"; + EntityCompactLayoutIcons["serialPort"] = "SerialPort"; + EntityCompactLayoutIcons["server"] = "Server"; + EntityCompactLayoutIcons["serverMultiple"] = "ServerMultiple"; + EntityCompactLayoutIcons["serviceBell"] = "ServiceBell"; + EntityCompactLayoutIcons["settings"] = "Settings"; + EntityCompactLayoutIcons["shapes"] = "Shapes"; + EntityCompactLayoutIcons["shield"] = "Shield"; + EntityCompactLayoutIcons["shieldTask"] = "ShieldTask"; + EntityCompactLayoutIcons["shoppingBag"] = "ShoppingBag"; + EntityCompactLayoutIcons["signature"] = "Signature"; + EntityCompactLayoutIcons["sim"] = "Sim"; + EntityCompactLayoutIcons["sleep"] = "Sleep"; + EntityCompactLayoutIcons["smartwatch"] = "Smartwatch"; + EntityCompactLayoutIcons["soundSource"] = "SoundSource"; + EntityCompactLayoutIcons["soundWaveCircle"] = "SoundWaveCircle"; + EntityCompactLayoutIcons["sparkle"] = "Sparkle"; + EntityCompactLayoutIcons["speaker0"] = "Speaker0"; + EntityCompactLayoutIcons["speaker2"] = "Speaker2"; + EntityCompactLayoutIcons["sport"] = "Sport"; + EntityCompactLayoutIcons["sportAmericanFootball"] = "SportAmericanFootball"; + EntityCompactLayoutIcons["sportBaseball"] = "SportBaseball"; + EntityCompactLayoutIcons["sportBasketball"] = "SportBasketball"; + EntityCompactLayoutIcons["sportHockey"] = "SportHockey"; + EntityCompactLayoutIcons["sportSoccer"] = "SportSoccer"; + EntityCompactLayoutIcons["squareMultiple"] = "SquareMultiple"; + EntityCompactLayoutIcons["squareShadow"] = "SquareShadow"; + EntityCompactLayoutIcons["squaresNested"] = "SquaresNested"; + EntityCompactLayoutIcons["stack"] = "Stack"; + EntityCompactLayoutIcons["stackStar"] = "StackStar"; + EntityCompactLayoutIcons["star"] = "Star"; + EntityCompactLayoutIcons["starFilled"] = "StarFilled"; + EntityCompactLayoutIcons["starHalf"] = "StarHalf"; + EntityCompactLayoutIcons["starLineHorizontal3"] = "StarLineHorizontal3"; + EntityCompactLayoutIcons["starOneQuarter"] = "StarOneQuarter"; + EntityCompactLayoutIcons["starThreeQuarter"] = "StarThreeQuarter"; + EntityCompactLayoutIcons["status"] = "Status"; + EntityCompactLayoutIcons["steps"] = "Steps"; + EntityCompactLayoutIcons["stethoscope"] = "Stethoscope"; + EntityCompactLayoutIcons["sticker"] = "Sticker"; + EntityCompactLayoutIcons["storage"] = "Storage"; + EntityCompactLayoutIcons["stream"] = "Stream"; + EntityCompactLayoutIcons["streamInput"] = "StreamInput"; + EntityCompactLayoutIcons["streamInputOutput"] = "StreamInputOutput"; + EntityCompactLayoutIcons["streamOutput"] = "StreamOutput"; + EntityCompactLayoutIcons["styleGuide"] = "StyleGuide"; + EntityCompactLayoutIcons["subGrid"] = "SubGrid"; + EntityCompactLayoutIcons["subtitles"] = "Subtitles"; + EntityCompactLayoutIcons["surfaceEarbuds"] = "SurfaceEarbuds"; + EntityCompactLayoutIcons["surfaceHub"] = "SurfaceHub"; + EntityCompactLayoutIcons["symbols"] = "Symbols"; + EntityCompactLayoutIcons["syringe"] = "Syringe"; + EntityCompactLayoutIcons["system"] = "System"; + EntityCompactLayoutIcons["tabDesktop"] = "TabDesktop"; + EntityCompactLayoutIcons["tabInprivateAccount"] = "TabInprivateAccount"; + EntityCompactLayoutIcons["table"] = "Table"; + EntityCompactLayoutIcons["tableImage"] = "TableImage"; + EntityCompactLayoutIcons["tableMultiple"] = "TableMultiple"; + EntityCompactLayoutIcons["tablet"] = "Tablet"; + EntityCompactLayoutIcons["tabs"] = "Tabs"; + EntityCompactLayoutIcons["tag"] = "Tag"; + EntityCompactLayoutIcons["tagCircle"] = "TagCircle"; + EntityCompactLayoutIcons["tagMultiple"] = "TagMultiple"; + EntityCompactLayoutIcons["target"] = "Target"; + EntityCompactLayoutIcons["targetArrow"] = "TargetArrow"; + EntityCompactLayoutIcons["teddy"] = "Teddy"; + EntityCompactLayoutIcons["temperature"] = "Temperature"; + EntityCompactLayoutIcons["tent"] = "Tent"; + EntityCompactLayoutIcons["tetrisApp"] = "TetrisApp"; + EntityCompactLayoutIcons["textbox"] = "Textbox"; + EntityCompactLayoutIcons["textQuote"] = "TextQuote"; + EntityCompactLayoutIcons["thinking"] = "Thinking"; + EntityCompactLayoutIcons["thumbDislike"] = "ThumbDislike"; + EntityCompactLayoutIcons["thumbLike"] = "ThumbLike"; + EntityCompactLayoutIcons["ticketDiagonal"] = "TicketDiagonal"; + EntityCompactLayoutIcons["ticketHorizontal"] = "TicketHorizontal"; + EntityCompactLayoutIcons["timeAndWeather"] = "TimeAndWeather"; + EntityCompactLayoutIcons["timeline"] = "Timeline"; + EntityCompactLayoutIcons["timer"] = "Timer"; + EntityCompactLayoutIcons["toolbox"] = "Toolbox"; + EntityCompactLayoutIcons["topSpeed"] = "TopSpeed"; + EntityCompactLayoutIcons["translate"] = "Translate"; + EntityCompactLayoutIcons["transmission"] = "Transmission"; + EntityCompactLayoutIcons["treeDeciduous"] = "TreeDeciduous"; + EntityCompactLayoutIcons["treeEvergreen"] = "TreeEvergreen"; + EntityCompactLayoutIcons["trophy"] = "Trophy"; + EntityCompactLayoutIcons["tv"] = "Tv"; + EntityCompactLayoutIcons["tvUsb"] = "TvUsb"; + EntityCompactLayoutIcons["umbrella"] = "Umbrella"; + EntityCompactLayoutIcons["usbPlug"] = "UsbPlug"; + EntityCompactLayoutIcons["usbStick"] = "UsbStick"; + EntityCompactLayoutIcons["vault"] = "Vault"; + EntityCompactLayoutIcons["vehicleBicycle"] = "VehicleBicycle"; + EntityCompactLayoutIcons["vehicleBus"] = "VehicleBus"; + EntityCompactLayoutIcons["vehicleCab"] = "VehicleCab"; + EntityCompactLayoutIcons["vehicleCar"] = "VehicleCar"; + EntityCompactLayoutIcons["vehicleCarCollision"] = "VehicleCarCollision"; + EntityCompactLayoutIcons["vehicleCarProfileLtr"] = "VehicleCarProfileLtr"; + EntityCompactLayoutIcons["vehicleCarProfileRtl"] = "VehicleCarProfileRtl"; + EntityCompactLayoutIcons["vehicleShip"] = "VehicleShip"; + EntityCompactLayoutIcons["vehicleSubway"] = "VehicleSubway"; + EntityCompactLayoutIcons["vehicleTruck"] = "VehicleTruck"; + EntityCompactLayoutIcons["vehicleTruckBag"] = "VehicleTruckBag"; + EntityCompactLayoutIcons["vehicleTruckCube"] = "VehicleTruckCube"; + EntityCompactLayoutIcons["vehicleTruckProfile"] = "VehicleTruckProfile"; + EntityCompactLayoutIcons["video"] = "Video"; + EntityCompactLayoutIcons["video360"] = "Video360"; + EntityCompactLayoutIcons["videoChat"] = "VideoChat"; + EntityCompactLayoutIcons["videoClip"] = "VideoClip"; + EntityCompactLayoutIcons["videoClipMultiple"] = "VideoClipMultiple"; + EntityCompactLayoutIcons["videoPerson"] = "VideoPerson"; + EntityCompactLayoutIcons["videoRecording"] = "VideoRecording"; + EntityCompactLayoutIcons["videoSecurity"] = "VideoSecurity"; + EntityCompactLayoutIcons["viewDesktop"] = "ViewDesktop"; + EntityCompactLayoutIcons["viewDesktopMobile"] = "ViewDesktopMobile"; + EntityCompactLayoutIcons["violin"] = "Violin"; + EntityCompactLayoutIcons["virtualNetwork"] = "VirtualNetwork"; + EntityCompactLayoutIcons["voicemail"] = "Voicemail"; + EntityCompactLayoutIcons["vote"] = "Vote"; + EntityCompactLayoutIcons["walkieTalkie"] = "WalkieTalkie"; + EntityCompactLayoutIcons["wallet"] = "Wallet"; + EntityCompactLayoutIcons["walletCreditCard"] = "WalletCreditCard"; + EntityCompactLayoutIcons["wallpaper"] = "Wallpaper"; + EntityCompactLayoutIcons["wand"] = "Wand"; + EntityCompactLayoutIcons["warning"] = "Warning"; + EntityCompactLayoutIcons["weatherBlowingSnow"] = "WeatherBlowingSnow"; + EntityCompactLayoutIcons["weatherCloudy"] = "WeatherCloudy"; + EntityCompactLayoutIcons["weatherDrizzle"] = "WeatherDrizzle"; + EntityCompactLayoutIcons["weatherDuststorm"] = "WeatherDuststorm"; + EntityCompactLayoutIcons["weatherFog"] = "WeatherFog"; + EntityCompactLayoutIcons["weatherHailDay"] = "WeatherHailDay"; + EntityCompactLayoutIcons["weatherHailNight"] = "WeatherHailNight"; + EntityCompactLayoutIcons["weatherHaze"] = "WeatherHaze"; + EntityCompactLayoutIcons["weatherMoon"] = "WeatherMoon"; + EntityCompactLayoutIcons["weatherPartlyCloudyDay"] = "WeatherPartlyCloudyDay"; + EntityCompactLayoutIcons["weatherPartlyCloudyNight"] = "WeatherPartlyCloudyNight"; + EntityCompactLayoutIcons["weatherRain"] = "WeatherRain"; + EntityCompactLayoutIcons["weatherRainShowersDay"] = "WeatherRainShowersDay"; + EntityCompactLayoutIcons["weatherRainShowersNight"] = "WeatherRainShowersNight"; + EntityCompactLayoutIcons["weatherRainSnow"] = "WeatherRainSnow"; + EntityCompactLayoutIcons["weatherSnow"] = "WeatherSnow"; + EntityCompactLayoutIcons["weatherSnowflake"] = "WeatherSnowflake"; + EntityCompactLayoutIcons["weatherSnowShowerDay"] = "WeatherSnowShowerDay"; + EntityCompactLayoutIcons["weatherSnowShowerNight"] = "WeatherSnowShowerNight"; + EntityCompactLayoutIcons["weatherSqualls"] = "WeatherSqualls"; + EntityCompactLayoutIcons["weatherSunnyHigh"] = "WeatherSunnyHigh"; + EntityCompactLayoutIcons["weatherSunnyLow"] = "WeatherSunnyLow"; + EntityCompactLayoutIcons["weatherThunderstorm"] = "WeatherThunderstorm"; + EntityCompactLayoutIcons["webAsset"] = "WebAsset"; + EntityCompactLayoutIcons["whiteboard"] = "Whiteboard"; + EntityCompactLayoutIcons["wifi1"] = "Wifi1"; + EntityCompactLayoutIcons["wifi2"] = "Wifi2"; + EntityCompactLayoutIcons["window"] = "Window"; + EntityCompactLayoutIcons["windowMultiple"] = "WindowMultiple"; + EntityCompactLayoutIcons["windowWrench"] = "WindowWrench"; + EntityCompactLayoutIcons["wrench"] = "Wrench"; + EntityCompactLayoutIcons["wrenchScrewdriver"] = "WrenchScrewdriver"; + EntityCompactLayoutIcons["xray"] = "Xray"; + EntityCompactLayoutIcons["yoga"] = "Yoga"; + })(EntityCompactLayoutIcons = Excel.EntityCompactLayoutIcons || (Excel.EntityCompactLayoutIcons = {})); + var ReferenceValueType; + (function (ReferenceValueType) { + ReferenceValueType["array"] = "Array"; + ReferenceValueType["entity"] = "Entity"; + ReferenceValueType["root"] = "Root"; + })(ReferenceValueType = Excel.ReferenceValueType || (Excel.ReferenceValueType = {})); + var CellValueType; + (function (CellValueType) { + CellValueType["array"] = "Array"; + CellValueType["boolean"] = "Boolean"; + CellValueType["double"] = "Double"; + CellValueType["entity"] = "Entity"; + CellValueType["empty"] = "Empty"; + CellValueType["error"] = "Error"; + CellValueType["formattedNumber"] = "FormattedNumber"; + CellValueType["linkedEntity"] = "LinkedEntity"; + CellValueType["localImage"] = "LocalImage"; + CellValueType["reference"] = "Reference"; + CellValueType["string"] = "String"; + CellValueType["notAvailable"] = "NotAvailable"; + CellValueType["webImage"] = "WebImage"; + })(CellValueType = Excel.CellValueType || (Excel.CellValueType = {})); + var ConnectErrorCellValueSubType; + (function (ConnectErrorCellValueSubType) { + ConnectErrorCellValueSubType["unknown"] = "Unknown"; + ConnectErrorCellValueSubType["serviceError"] = "ServiceError"; + ConnectErrorCellValueSubType["externalLinks"] = "ExternalLinks"; + ConnectErrorCellValueSubType["externalLinksNonCloudLocation"] = "ExternalLinksNonCloudLocation"; + ConnectErrorCellValueSubType["dataTypeNoConnection"] = "DataTypeNoConnection"; + ConnectErrorCellValueSubType["dataTypeServiceError"] = "DataTypeServiceError"; + ConnectErrorCellValueSubType["missingContent"] = "MissingContent"; + ConnectErrorCellValueSubType["requestThrottle"] = "RequestThrottle"; + ConnectErrorCellValueSubType["externalLinksFailedToRefresh"] = "ExternalLinksFailedToRefresh"; + ConnectErrorCellValueSubType["externalLinksAccessFailed"] = "ExternalLinksAccessFailed"; + ConnectErrorCellValueSubType["externalLinksServerError"] = "ExternalLinksServerError"; + ConnectErrorCellValueSubType["externalLinksInvalidRequest"] = "ExternalLinksInvalidRequest"; + ConnectErrorCellValueSubType["externalLinksUnAuthenticated"] = "ExternalLinksUnAuthenticated"; + ConnectErrorCellValueSubType["externalLinksThrottledByHost"] = "ExternalLinksThrottledByHost"; + ConnectErrorCellValueSubType["externalLinksFileTooLarge"] = "ExternalLinksFileTooLarge"; + ConnectErrorCellValueSubType["outdatedLinkedEntity"] = "OutdatedLinkedEntity"; + ConnectErrorCellValueSubType["genericServerError"] = "GenericServerError"; + })(ConnectErrorCellValueSubType = Excel.ConnectErrorCellValueSubType || (Excel.ConnectErrorCellValueSubType = {})); + var ErrorCellValueType; + (function (ErrorCellValueType) { + ErrorCellValueType["blocked"] = "Blocked"; + ErrorCellValueType["busy"] = "Busy"; + ErrorCellValueType["calc"] = "Calc"; + ErrorCellValueType["connect"] = "Connect"; + ErrorCellValueType["div0"] = "Div0"; + ErrorCellValueType["external"] = "External"; + ErrorCellValueType["field"] = "Field"; + ErrorCellValueType["gettingData"] = "GettingData"; + ErrorCellValueType["notAvailable"] = "NotAvailable"; + ErrorCellValueType["name"] = "Name"; + ErrorCellValueType["null"] = "Null"; + ErrorCellValueType["num"] = "Num"; + ErrorCellValueType["placeholder"] = "Placeholder"; + ErrorCellValueType["ref"] = "Ref"; + ErrorCellValueType["spill"] = "Spill"; + ErrorCellValueType["value"] = "Value"; + })(ErrorCellValueType = Excel.ErrorCellValueType || (Excel.ErrorCellValueType = {})); + var ExternalErrorCellValueSubType; + (function (ExternalErrorCellValueSubType) { + ExternalErrorCellValueSubType["unknown"] = "Unknown"; + })(ExternalErrorCellValueSubType = Excel.ExternalErrorCellValueSubType || (Excel.ExternalErrorCellValueSubType = {})); + var FieldErrorCellValueSubType; + (function (FieldErrorCellValueSubType) { + FieldErrorCellValueSubType["unknown"] = "Unknown"; + FieldErrorCellValueSubType["webImageMissingFilePart"] = "WebImageMissingFilePart"; + FieldErrorCellValueSubType["dataProviderError"] = "DataProviderError"; + FieldErrorCellValueSubType["richValueRelMissingFilePart"] = "RichValueRelMissingFilePart"; + })(FieldErrorCellValueSubType = Excel.FieldErrorCellValueSubType || (Excel.FieldErrorCellValueSubType = {})); + var NumErrorCellValueSubType; + (function (NumErrorCellValueSubType) { + NumErrorCellValueSubType["unknown"] = "Unknown"; + NumErrorCellValueSubType["arrayTooLarge"] = "ArrayTooLarge"; + })(NumErrorCellValueSubType = Excel.NumErrorCellValueSubType || (Excel.NumErrorCellValueSubType = {})); + var RefErrorCellValueSubType; + (function (RefErrorCellValueSubType) { + RefErrorCellValueSubType["unknown"] = "Unknown"; + RefErrorCellValueSubType["externalLinksStructuredRef"] = "ExternalLinksStructuredRef"; + RefErrorCellValueSubType["externalLinksCalculatedRef"] = "ExternalLinksCalculatedRef"; + })(RefErrorCellValueSubType = Excel.RefErrorCellValueSubType || (Excel.RefErrorCellValueSubType = {})); + var SpillErrorCellValueSubType; + (function (SpillErrorCellValueSubType) { + SpillErrorCellValueSubType["unknown"] = "Unknown"; + SpillErrorCellValueSubType["collision"] = "Collision"; + SpillErrorCellValueSubType["indeterminateSize"] = "IndeterminateSize"; + SpillErrorCellValueSubType["worksheetEdge"] = "WorksheetEdge"; + SpillErrorCellValueSubType["outOfMemoryWhileCalc"] = "OutOfMemoryWhileCalc"; + SpillErrorCellValueSubType["table"] = "Table"; + SpillErrorCellValueSubType["mergedCell"] = "MergedCell"; + })(SpillErrorCellValueSubType = Excel.SpillErrorCellValueSubType || (Excel.SpillErrorCellValueSubType = {})); + var ValueErrorCellValueSubType; + (function (ValueErrorCellValueSubType) { + ValueErrorCellValueSubType["unknown"] = "Unknown"; + ValueErrorCellValueSubType["vlookupColumnIndexLessThanOne"] = "VlookupColumnIndexLessThanOne"; + ValueErrorCellValueSubType["vlookupResultNotFound"] = "VlookupResultNotFound"; + ValueErrorCellValueSubType["hlookupRowIndexLessThanOne"] = "HlookupRowIndexLessThanOne"; + ValueErrorCellValueSubType["hlookupResultNotFound"] = "HlookupResultNotFound"; + ValueErrorCellValueSubType["coerceStringToNumberInvalid"] = "CoerceStringToNumberInvalid"; + ValueErrorCellValueSubType["coerceStringToBoolInvalid"] = "CoerceStringToBoolInvalid"; + ValueErrorCellValueSubType["coerceStringToInvalidType"] = "CoerceStringToInvalidType"; + ValueErrorCellValueSubType["subArrayStartRowMissingEndRowNot"] = "SubArrayStartRowMissingEndRowNot"; + ValueErrorCellValueSubType["subArrayStartColumnMissingEndColumnNot"] = "SubArrayStartColumnMissingEndColumnNot"; + ValueErrorCellValueSubType["invalidImageUrl"] = "InvalidImageUrl"; + ValueErrorCellValueSubType["stockHistoryNonTradingDays"] = "StockHistoryNonTradingDays"; + ValueErrorCellValueSubType["stockHistoryNotAStock"] = "StockHistoryNotAStock"; + ValueErrorCellValueSubType["stockHistoryInvalidDate"] = "StockHistoryInvalidDate"; + ValueErrorCellValueSubType["stockHistoryEndBeforeStart"] = "StockHistoryEndBeforeStart"; + ValueErrorCellValueSubType["stockHistoryStartInFuture"] = "StockHistoryStartInFuture"; + ValueErrorCellValueSubType["stockHistoryInvalidEnum"] = "StockHistoryInvalidEnum"; + ValueErrorCellValueSubType["stockHistoryOnlyDateRequested"] = "StockHistoryOnlyDateRequested"; + ValueErrorCellValueSubType["stockHistoryNotFound"] = "StockHistoryNotFound"; + ValueErrorCellValueSubType["lambdaWrongParamCount"] = "LambdaWrongParamCount"; + })(ValueErrorCellValueSubType = Excel.ValueErrorCellValueSubType || (Excel.ValueErrorCellValueSubType = {})); + function _runOnRegularOrWacContext(options, callback) { + var context = isOfficePlatform("OfficeOnline") + ? new WacSpecificRequestContext() + : new RequestContext(); + onBeforeExcelRun(options, context); + return OfficeExtension.CoreUtility.Promise.resolve() + .then(function () { return callback(context); }) + .then(context.sync); + } + var WacSpecificRequestContext = (function (_super) { + __extends(WacSpecificRequestContext, _super); + function WacSpecificRequestContext(url) { + var _this = _super.call(this, url) || this; + _this._customData = "WacPartition"; + _this.m_wacWorkbook = _createRootServiceObject(WacWorkbook, _this); + _this._rootObject = _this.m_wacWorkbook; + _this._rootObjectPropertyName = "wacWorkbook"; + return _this; + } + Object.defineProperty(WacSpecificRequestContext.prototype, "wacWorkbook", { + get: function () { + return this.m_wacWorkbook; + }, + enumerable: true, + configurable: true + }); + return WacSpecificRequestContext; + }(OfficeCore.RequestContext)); + var WacWorkbook = (function (_super) { + __extends(WacWorkbook, _super); + function WacWorkbook() { + return _super !== null && _super.apply(this, arguments) || this; + } + WacWorkbook.prototype.createAndOpenWorkbook = function (base64) { + _invokeMethod(this, "CreateAndOpenWorkbook", 0, [base64], 0, 0); + }; + return WacWorkbook; + }(OfficeExtension.ClientObject)); + function createWorkbook(base64) { + _throwIfApiNotSupported("Excel.createWorkbook", _defaultApiSetName, "1.8", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + if (context instanceof WacSpecificRequestContext) { + context.wacWorkbook.createAndOpenWorkbook(base64); + } + else { + context.workbook.application.createWorkbook(base64).open(); + } + }); + } + Excel.createWorkbook = createWorkbook; + function lowerCaseFirst(str) { + return str[0].toLowerCase() + str.slice(1); + } + var iconSets = ["ThreeArrows", + "ThreeArrowsGray", + "ThreeFlags", + "ThreeTrafficLights1", + "ThreeTrafficLights2", + "ThreeSigns", + "ThreeSymbols", + "ThreeSymbols2", + "FourArrows", + "FourArrowsGray", + "FourRedToBlack", + "FourRating", + "FourTrafficLights", + "FiveArrows", + "FiveArrowsGray", + "FiveRating", + "FiveQuarters", + "ThreeStars", + "ThreeTriangles", + "FiveBoxes"]; + var iconNames = [["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], + ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], + ["RedFlag", "YellowFlag", "GreenFlag"], + ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], + ["RedDiamond", "YellowTriangle", "GreenCircle"], + ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], + ["RedCross", "YellowExclamation", "GreenCheck"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], + ["OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], + ["SilverStar", "HalfGoldStar", "GoldStar"], + ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], + ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; + Excel.icons = {}; + iconSets.map(function (title, i) { + var camelTitle = lowerCaseFirst(title); + Excel.icons[camelTitle] = []; + iconNames[i].map(function (iconName, j) { + iconName = lowerCaseFirst(iconName); + var obj = { set: title, index: j }; + Excel.icons[camelTitle].push(obj); + Excel.icons[camelTitle][iconName] = obj; + }); + }); + function setRangePropertiesInBulk(range, propertyName, values, apiFlags) { + var maxCellCount = 1500; + if (Array.isArray(values) && values.length > 0 && Array.isArray(values[0]) && (values.length * values[0].length > maxCellCount) && isExcel1_3OrAbove()) { + var maxRowCount = Math.max(1, Math.round(maxCellCount / values[0].length)); + range._ValidateArraySize(values.length, values[0].length); + for (var startRowIndex = 0; startRowIndex < values.length; startRowIndex += maxRowCount) { + var rowCount = maxRowCount; + if (startRowIndex + rowCount > values.length) { + rowCount = values.length - startRowIndex; + } + var chunk = range.getRow(startRowIndex).untrack().getBoundingRect(range.getRow(startRowIndex + rowCount - 1).untrack()).untrack(); + var valueSlice = values.slice(startRowIndex, startRowIndex + rowCount); + _invokeSetProperty(chunk, propertyName, valueSlice, apiFlags != null ? apiFlags : 0); + } + return true; + } + return false; + } + function isExcelApiSetSupported(version) { + return OfficeExtension.Utility.isSetSupported("ExcelApi", version.toString()); + } + function isExcel1_3OrAbove() { + return isExcelApiSetSupported(1.3); + } + function isOfficePlatform(platform) { + if (typeof (window) !== "undefined" && window.Office && window.Office.context) { + return window.Office.context.platform === platform; + } + return false; + } + var OperationStatus; + (function (OperationStatus) { + OperationStatus["NotStarted"] = "notStarted"; + OperationStatus["Running"] = "running"; + OperationStatus["Succeeded"] = "succeeded"; + OperationStatus["Failed"] = "failed"; + })(OperationStatus || (OperationStatus = {})); + var HttpStatusCode; + (function (HttpStatusCode) { + HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK"; + HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created"; + HttpStatusCode[HttpStatusCode["Accepted"] = 202] = "Accepted"; + HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent"; + HttpStatusCode[HttpStatusCode["HighestSuccessCode"] = 299] = "HighestSuccessCode"; + HttpStatusCode[HttpStatusCode["TooManyRequests"] = 429] = "TooManyRequests"; + HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError"; + HttpStatusCode[HttpStatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpStatusCode || (HttpStatusCode = {})); + var SessionOperation; + (function (SessionOperation) { + SessionOperation["Close"] = "Session.close"; + SessionOperation["CommitChanges"] = "Session.commitChanges"; + SessionOperation["Create"] = "Session.resolveRequestUrlAndHeaderInfo"; + SessionOperation["Refresh"] = "Session.refreshSession"; + })(SessionOperation = Excel.SessionOperation || (Excel.SessionOperation = {})); + var Session = (function () { + function Session(workbookUrl, requestHeaders, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.persistChanges, persistChanges = _c === void 0 ? true : _c, _d = _b.commitExplicitly, commitExplicitly = _d === void 0 ? true : _d; + this.m_requestId = ''; + this.m_workbookUrl = !workbookUrl ? '' : this.ensureUrlFormatEndWithSlash(workbookUrl); + this.m_requestHeaders = !requestHeaders ? {} : requestHeaders; + this.m_persistChanges = persistChanges; + this.m_commitExplicitly = commitExplicitly; + } + Object.defineProperty(Session.prototype, "requestId", { + get: function () { + return this.m_requestId; + }, + enumerable: true, + configurable: true + }); + Session.prototype.close = function () { + var _this = this; + if (this.m_requestUrlAndHeaderInfo && + !OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + var url = this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url) + Session.CLOSE_SESSION; + var req = { + method: 'POST', + url: url, + headers: this.m_requestUrlAndHeaderInfo.headers, + body: '' + }; + return OfficeExtension.HttpUtility.sendRequest(req).then(function (resp) { + if (resp.statusCode !== HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(resp, SessionOperation.Close); + } + _this.m_requestUrlAndHeaderInfo = null; + for (var key in _this.m_requestHeaders) { + if (key.toLowerCase() === Session.WorkbookSessionIdHeaderNameLower) { + delete _this.m_requestHeaders[key]; + break; + } + } + }); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + Session.prototype.commitChanges = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (!this.m_commitExplicitly) { + throw this.createError(HttpStatusCode.InternalServerError, 'Can not call commitChanges() if commitExplicitly is not set.', SessionOperation.CommitChanges); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.CommitChanges); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.CommitChanges); + } + var commitChangesRequestInfo = this.createCommitChangesRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(commitChangesRequestInfo).then(function (commitChangesResponseInfo) { + var statusCode = commitChangesResponseInfo.statusCode; + if (statusCode === HttpStatusCode.Accepted) { + return _this.delay(Session.POLL_DELAY) + .then(function (_) { + return _this.pollResourceLocation(_this.getHeaderIgnoreCase(commitChangesResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.CommitChanges, additionalRequestHeaders); + }) + .then(function (commitChangesResourceLocationResponseInfo) { + var operationStatusBody = JSON.parse(commitChangesResourceLocationResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(commitChangesResourceLocationResponseInfo, SessionOperation.CommitChanges); + } + return _this.parseCooldownTime(commitChangesResourceLocationResponseInfo); + }); + } + if (statusCode >= HttpStatusCode.OK && statusCode <= HttpStatusCode.HighestSuccessCode) { + return _this.parseCooldownTime(commitChangesResponseInfo); + } + throw _this.createErrorFromResponseInfo(commitChangesResponseInfo, SessionOperation.CommitChanges); + }); + }; + Session.prototype._resolveRequestUrlAndHeaderInfo = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (this.m_requestUrlAndHeaderInfo) { + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (this.getHeaderIgnoreCase(this.m_requestHeaders, Session.WorkbookSessionIdHeaderNameLower)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + var sessionRequestInfo = this.createAsyncGraphSessionRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(sessionRequestInfo).then(function (sessionResponseInfo) { + _this.m_requestId = _this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.REQUEST_ID_HEADER); + if (sessionResponseInfo.statusCode !== HttpStatusCode.Accepted && + sessionResponseInfo.statusCode !== HttpStatusCode.Created) { + throw _this.createErrorFromResponseInfo(sessionResponseInfo, SessionOperation.Create); + } + if (sessionResponseInfo.statusCode === HttpStatusCode.Created) { + _this.formatRequestUrlAndHeaderInfo(sessionResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + } + return _this.delay(Session.POLL_DELAY) + .then(function (_) { return _this.pollResourceLocation(_this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.Create, additionalRequestHeaders); }) + .then(function (operationStatusResponseInfo) { + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, SessionOperation.Create); + } + var sessionResourceLocationRequestInfo = { + method: 'GET', + url: operationStatusBody.resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: _this.getHeaderIgnoreCase(_this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined + }; + return OfficeExtension.HttpUtility.sendRequest(sessionResourceLocationRequestInfo).then(function (sessionResourceLocationResponseInfo) { + _this.formatRequestUrlAndHeaderInfo(sessionResourceLocationResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + }); + }); + }); + }; + Session.prototype.refreshSession = function () { + var _this = this; + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.Refresh); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.Refresh); + } + var refreshSessionRequestInfo = this.createRefreshSessionRequestInfo(); + return OfficeExtension.HttpUtility.sendRequest(refreshSessionRequestInfo).then(function (refreshSessionResponseInfo) { + var statusCode = refreshSessionResponseInfo.statusCode; + if (statusCode != HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(refreshSessionResponseInfo, SessionOperation.Refresh); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + }; + Session.prototype.getHeaderIgnoreCase = function (headers, headerName) { + var foundHeaders = Object.keys(headers).filter(function (key) { return key.toLowerCase() === headerName.toLowerCase(); }); + return foundHeaders.length > 0 ? headers[foundHeaders[0]] : undefined; + }; + Session.prototype.createCommitChangesRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + var url = this.getCorrectGraphVersionUrl() + Session.COMMIT_CHANGES; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.createAsyncGraphSessionRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + var url = this.getCorrectGraphVersionUrl() + Session.CREATE_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: { persistChanges: this.m_persistChanges, commitExplicitly: this.m_commitExplicitly } + }; + }; + Session.prototype.createRefreshSessionRequestInfo = function () { + var url = this.getCorrectGraphVersionUrl() + Session.REFRESH_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.getCorrectGraphVersionUrl = function () { + return this.m_workbookUrl.replace(new RegExp('graph\.microsoft\.com\/.*?\/'), "graph.microsoft.com/" + Session.ASYNC_API_GRAPH_VERSION + "/"); + }; + Session.prototype.pollResourceLocation = function (resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt) { + var _this = this; + if (additionalRequestHeaders === void 0) { + additionalRequestHeaders = {}; + } + if (pollAttempt === void 0) { + pollAttempt = 0; + } + if (pollAttempt >= Session.MAX_POLL_ATTEMPTS) { + throw this.createError(HttpStatusCode.InternalServerError, 'Timout while polling for the resource location.', sessionOperation); + } + var operationStatusRequestInfo = { + method: 'GET', + url: resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: this.getHeaderIgnoreCase(this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined + }; + return OfficeExtension.HttpUtility.sendRequest(operationStatusRequestInfo).then(function (operationStatusResponseInfo) { + if (operationStatusResponseInfo.statusCode !== HttpStatusCode.OK) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + } + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + switch (operationStatusBody.status) { + case OperationStatus.Succeeded: + return operationStatusResponseInfo; + case OperationStatus.Failed: + return operationStatusResponseInfo; + case OperationStatus.NotStarted: + case OperationStatus.Running: + return _this.delay(Session.POLL_DELAY).then(function (_) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + }); + default: + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, sessionOperation); + } + }); + }; + Session.prototype.parseCooldownTime = function (responseInfo) { + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + return !retryAfter + ? Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER + : parseInt(retryAfter) * 1000; + }; + Session.prototype.formatRequestUrlAndHeaderInfo = function (responseInfo) { + if (responseInfo.statusCode !== HttpStatusCode.OK && responseInfo.statusCode !== HttpStatusCode.Created) { + throw this.createErrorFromResponseInfo(responseInfo, SessionOperation.Create); + } + var session = JSON.parse(responseInfo.body); + var sessionId = session.id; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + headers[Session.WorkbookSessionIdHeaderName] = sessionId; + this.m_requestUrlAndHeaderInfo = { url: this.getCorrectGraphVersionUrl(), headers: headers }; + }; + Session.prototype.ensureUrlFormatEndWithSlash = function (url) { + if (url.charAt(url.length - 1) !== '/') { + url += '/'; + } + return url; + }; + Session.prototype.delay = function (milliseconds) { + return new OfficeExtension.CoreUtility.Promise(function (res, _) { return setTimeout(function () { return res(); }, milliseconds); }); + }; + Session.prototype.createErrorFromResponseInfo = function (responseInfo, locationThrown) { + var err = OfficeExtension.Utility._parseErrorResponse(responseInfo); + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + var data = { + retryAfter: retryAfter, + responseBody: OfficeExtension.Utility._parseErrorResponseBody(responseInfo) + }; + return OfficeExtension.Utility.createRuntimeError(err.errorCode, err.errorMessage, locationThrown, responseInfo.statusCode, data); + }; + Session.prototype.createError = function (code, message, locationThrown) { + return OfficeExtension.Utility.createRuntimeError('' + code, message, locationThrown); + }; + Session.WorkbookSessionIdHeaderName = 'Workbook-Session-Id'; + Session.WorkbookSessionIdHeaderNameLower = 'workbook-session-id'; + Session.ASYNC_API_GRAPH_VERSION = 'beta'; + Session.POLL_DELAY = 10000; + Session.MAX_POLL_ATTEMPTS = 10; + Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER = 10000; + Session.LOCATION_HEADER = 'location'; + Session.AUTHORIZATION_HEADER = 'authorization'; + Session.REQUEST_ID_HEADER = 'request-id'; + Session.RETRY_AFTER_HEADER = 'retry-after'; + Session.PREFER_HEADER = 'Prefer'; + Session.PREFER_HEADER_VAL = 'respond-async'; + Session.CONTENT_TYPE_HEADER = 'Content-Type'; + Session.CONTENT_TYPE_HEADER_VAL = 'application/json'; + Session.CLOSE_SESSION = 'closeSession'; + Session.COMMIT_CHANGES = 'commitChanges'; + Session.CREATE_SESSION = 'createSession'; + Session.REFRESH_SESSION = 'refreshSession'; + return Session; + }()); + Excel.Session = Session; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + var _this = _super.call(this, url) || this; + _this.m_workbook = _createRootServiceObject(Excel.Workbook, _this); + _this._rootObject = _this.m_workbook; + _this._rootObjectPropertyName = "workbook"; + return _this; + } + RequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext = 5004; + if (officeJsErrorCode === ooeInvalidApiCallInContext) { + response.ErrorCode = ErrorCodes.invalidOperationInCellEditMode; + response.HttpStatusCode = 400; + response.ErrorMessage = OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; + Object.defineProperty(RequestContext.prototype, "workbook", { + get: function () { + return this.m_workbook; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "application", { + get: function () { + return this.workbook.application; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "runtime", { + get: function () { + return this.workbook._Runtime; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeCore.RequestContext)); + Excel.RequestContext = RequestContext; + var Recorder = (function () { + function Recorder() { + } + Recorder.enableMacroRecordingEvent = function (context) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = true; + var registerEventHandler = function (context) { + context.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent] = "true"; + context.workbook.onRecordingStateChangedEvent.add(function (args) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = args.recording; + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + if (context !== undefined && context !== null) { + return registerEventHandler(context); + } + return run(function (context) { + return registerEventHandler(context); + }); + }; + return Recorder; + }()); + Excel.Recorder = Recorder; + function onBeforeExcelRun(options, context) { + var excelOptions = options; + if (excelOptions.delayForCellEdit && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + context._requestFlagModifier |= 64; + } + else { + context._requestFlagModifier &= ~64; + } + if (excelOptions._makerSafe) { + context._requestFlagModifier |= 1024; + } + } + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.run = run; + function runBatch(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.runBatch = runBatch; + Excel._RedirectV1APIs = false; + Excel._V1APIMap = { + "GetDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GetSelectedDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.getSelectedData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GoToByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.gotoById(callArgs); } + }, + "AddColumnsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddColumns(callArgs); } + }, + "AddFromSelectionAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromSelection(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromNamedItemAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromNamedItem(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromPromptAsync": { + call: function (ctx, callArgs) { + if (versionNumberIsEarlierThan({ ios: { desiredMajor: 2, desiredMinor: 20, desiredBuild: 0 } }) && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + ctx._requestFlagModifier |= 64; + } + return ctx.workbook._V1Api.bindingAddFromPrompt(callArgs); + }, + postprocess: postprocessBindingDescriptor + }, + "AddRowsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddRows(callArgs); } + }, + "GetByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetById(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "ReleaseByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingReleaseById(callArgs); } + }, + "GetAllAsync": { + call: function (ctx) { return ctx.workbook._V1Api.bindingGetAll(); }, + postprocess: function (response) { + return response.bindings.map(function (descriptor) { return postprocessBindingDescriptor(descriptor); }); + } + }, + "DeleteAllDataValuesAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingDeleteAllDataValues(callArgs); } + }, + "SetSelectedDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.setSelectedData(callArgs); } + }, + "SetDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetData(callArgs); } + }, + "SetFormatsAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetFormats(callArgs); } + }, + "SetTableOptionsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetTableOptions(callArgs); } + }, + "ClearFormatsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } + }, + "GetFilePropertiesAsync": { + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } + } + }; + function postprocessBindingDescriptor(response) { + var bindingDescriptor = { + BindingColumnCount: response.bindingColumnCount, + BindingId: response.bindingId, + BindingRowCount: response.bindingRowCount, + bindingType: response.bindingType, + HasHeaders: response.hasHeaders + }; + return window.OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, window.Microsoft.Office.WebExtension.context.document); + } + function getDataCommonPostprocess(response, callArgs) { + var isPlainData = response.headers == null; + var data; + if (isPlainData) { + data = response.rows; + } + else { + data = response; + } + data = window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data === undefined ? null : data; + } + function versionNumberIsEarlierThan(versionsForPlatformMap) { + var hasOfficeVersion = typeof (window) !== "undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var platform = window.Office.context.diagnostics.platform.toLowerCase(); + if (platform === 'officeonline') { + return false; + } + var versionForCurrentPlatform = versionsForPlatformMap[platform]; + if (versionForCurrentPlatform == null) { + versionForCurrentPlatform = versionsForPlatformMap.general; + } + var version = window.Office.context.diagnostics.version; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(version); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (major < versionForCurrentPlatform.desiredMajor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor < versionForCurrentPlatform.desiredMinor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor === versionForCurrentPlatform.desiredMinor && build < versionForCurrentPlatform.desiredBuild) { + var revisionString = result[4]; + var devBuildValidation = /^3\d\d\d+$/; + var isDevBuild = devBuildValidation.exec(revisionString); + if (isDevBuild) { + return true; + } + } + } + return false; + } + var ALWAYS_TRUE_PLACEHOLDER_OVERRIDE = true; + var _CC; + (function (_CC) { + _CC.office10EventIdBindingSelectionChangedEvent = 3; + _CC.office10EventIdBindingDataChangedEvent = 4; + _CC.office10EventIdDocumentSelectionChangedEvent = 2; + _CC.office10EventIdRichApiMessageEvent = 5; + _CC.office10EventIdSettingsChangedEvent = 1; + })(_CC = Excel._CC || (Excel._CC = {})); + var _hostName = "Excel"; + var _defaultApiSetName = "ExcelApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var RangeValuesPreviewCustom = (function () { + function RangeValuesPreviewCustom() { + } + Object.defineProperty(RangeValuesPreviewCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return RangeValuesPreviewCustom; + }()); + Excel.RangeValuesPreviewCustom = RangeValuesPreviewCustom; + (function (_CC) { + function Application_SuspendApiCalculationUntilNextSync(thisObj) { + if (isOfficePlatform("Mac") && isExcelApiSetSupported(1.6) && !isExcelApiSetSupported(1.7)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Application_SuspendApiCalculationUntilNextSync = Application_SuspendApiCalculationUntilNextSync; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Workbook_EnableOfficeScriptRecording(thisObj, eventId) { + this.context.eventId = eventId; + return { handled: false }; + } + _CC.Workbook_EnableOfficeScriptRecording = Workbook_EnableOfficeScriptRecording; + function Workbook_RecordAction(thisObj, payload) { + this.context.sdxPayload = payload; + return { handled: false }; + } + _CC.Workbook_RecordAction = Workbook_RecordAction; + function Workbook_SelectionChanged_EventArgsTransform(thisObj, args) { + return { workbook: thisObj }; + } + _CC.Workbook_SelectionChanged_EventArgsTransform = Workbook_SelectionChanged_EventArgsTransform; + function Workbook_WACOperationEvent_EventArgsTransform(thisObj, args) { + var event = { + eventId: args.eventId, + payload: args.payload, + type: Excel.EventType.wacoperationEvent + }; + return event; + } + _CC.Workbook_WACOperationEvent_EventArgsTransform = Workbook_WACOperationEvent_EventArgsTransform; + function Workbook__Message_EventArgsTransform(thisObj, args) { + return { + entries: args.entries, + workbook: thisObj + }; + } + _CC.Workbook__Message_EventArgsTransform = Workbook__Message_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Worksheet_Charts_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Charts_Get = Worksheet_Charts_Get; + function Worksheet_Comments_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Comments_Get = Worksheet_Comments_Get; + function Worksheet_Names_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Names_Get = Worksheet_Names_Get; + function Worksheet_PivotTables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_PivotTables_Get = Worksheet_PivotTables_Get; + function Worksheet_RangeValuesPreview_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_RangeValuesPreview_Get = Worksheet_RangeValuesPreview_Get; + function Worksheet_Shapes_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Shapes_Get = Worksheet_Shapes_Get; + function Worksheet_ShowGridlines_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showGridlines = value; + _invokeSetProperty(thisObj, "Gridlines", value, _calculateApiFlags(2, "ExcelApiUndo", "1.16")); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowGridlines_Set = Worksheet_ShowGridlines_Set; + function Worksheet_ShowHeadings_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showHeadings = value; + _invokeSetProperty(thisObj, "Headings", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowHeadings_Set = Worksheet_ShowHeadings_Set; + function Worksheet_Tables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Tables_Get = Worksheet_Tables_Get; + function Worksheet_Visuals_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Visuals_Get = Worksheet_Visuals_Get; + function Worksheet_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState + }; + return newArgs; + } + _CC.Worksheet_Changed_EventArgsTransform = Worksheet_Changed_EventArgsTransform; + function Worksheet_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.Worksheet_FormatChanged_EventArgsTransform = Worksheet_FormatChanged_EventArgsTransform; + function Worksheet_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.Worksheet_FormulaChanged_EventArgsTransform = Worksheet_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function _overrideWorksheetCollectionEventMethod(thisObj, methodName, apiVersion) { + if ((!isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.12)) || + (isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.11))) { + _throwIfApiNotSupported("WorksheetCollection." + methodName, _defaultApiSetName, apiVersion, _hostName); + _invokeMethod(thisObj, methodName, 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + function WorksheetCollection__RegisterActivatedEvent(thisObj) { + if (!isExcelApiSetSupported(1.9)) { + _throwIfApiNotSupported("WorksheetCollection._RegisterActivatedEvent", _defaultApiSetName, "1.7", _hostName); + _invokeMethod(thisObj, "_RegisterActivatedEvent", 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetCollection__RegisterActivatedEvent = WorksheetCollection__RegisterActivatedEvent; + function WorksheetCollection__RegisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterAddedEvent = WorksheetCollection__RegisterAddedEvent; + function WorksheetCollection__RegisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterColumnSortedEvent = WorksheetCollection__RegisterColumnSortedEvent; + function WorksheetCollection__RegisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__RegisterDataChangedEvent = WorksheetCollection__RegisterDataChangedEvent; + function WorksheetCollection__RegisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterDeletedEvent = WorksheetCollection__RegisterDeletedEvent; + function WorksheetCollection__RegisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterRowSortedEvent = WorksheetCollection__RegisterRowSortedEvent; + function WorksheetCollection__UnregisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterAddedEvent = WorksheetCollection__UnregisterAddedEvent; + function WorksheetCollection__UnregisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterColumnSortedEvent = WorksheetCollection__UnregisterColumnSortedEvent; + function WorksheetCollection__UnregisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__UnregisterDataChangedEvent = WorksheetCollection__UnregisterDataChangedEvent; + function WorksheetCollection__UnregisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterDeletedEvent = WorksheetCollection__UnregisterDeletedEvent; + function WorksheetCollection__UnregisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterRowSortedEvent = WorksheetCollection__UnregisterRowSortedEvent; + function WorksheetCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState + }; + return newArgs; + } + _CC.WorksheetCollection_Changed_EventArgsTransform = WorksheetCollection_Changed_EventArgsTransform; + function WorksheetCollection_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.WorksheetCollection_FormatChanged_EventArgsTransform = WorksheetCollection_FormatChanged_EventArgsTransform; + function WorksheetCollection_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.WorksheetCollection_FormulaChanged_EventArgsTransform = WorksheetCollection_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function WorksheetProtection_Protect(thisObj, options, password) { + if (versionNumberIsEarlierThan({ + mac: { desiredMajor: 16, desiredMinor: 7, desiredBuild: 17101600 }, + ios: { desiredMajor: 2, desiredMinor: 7, desiredBuild: 1016 }, + general: { desiredMajor: 16, desiredMinor: 0, desiredBuild: 8716 } + })) { + _invokeMethod(thisObj, "Protect", 0, [options], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetProtection_Protect = WorksheetProtection_Protect; + })(_CC = Excel._CC || (Excel._CC = {})); + var RangeCustom = (function () { + function RangeCustom() { + } + RangeCustom.prototype._ensureInteger = function (num, methodName) { + if (!(typeof num === "number" && isFinite(num) && Math.floor(num) === num)) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + } + }; + RangeCustom.prototype._getAdjacentRange = function (functionName, count, referenceRange, rowDirection, columnDirection) { + if (count == null) { + count = 1; + } + this._ensureInteger(count, functionName); + var startRange; + var rowOffset = 0; + var columnOffset = 0; + if (count > 0) { + startRange = referenceRange.getOffsetRange(rowDirection, columnDirection); + } + else { + startRange = referenceRange; + rowOffset = rowDirection; + columnOffset = columnDirection; + } + if (Math.abs(count) === 1) { + return startRange; + } + return startRange.getBoundingRect(referenceRange.getOffsetRange(rowDirection * count + rowOffset, columnDirection * count + columnOffset)); + }; + return RangeCustom; + }()); + Excel.RangeCustom = RangeCustom; + (function (_CC) { + function Range_HandleResult(thisObj, value) { + if (!_isUndefined(value["isEntireColumn"])) { + thisObj.m_isEntireColumn = value["isEntireColumn"]; + } + if (!_isUndefined(value["isEntireRow"])) { + thisObj.m_isEntireRow = value["isEntireRow"]; + } + } + _CC.Range_HandleResult = Range_HandleResult; + function Range_GetColumnsAfter(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsAfter", count, thisObj.getLastColumn(), 0, 1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsAfter = Range_GetColumnsAfter; + function Range_GetColumnsBefore(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsBefore", count, thisObj.getColumn(0), 0, -1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsBefore = Range_GetColumnsBefore; + function Range_GetResizedRange(thisObj, deltaRows, deltaColumns) { + if (!isExcel1_3OrAbove()) { + thisObj._ensureInteger(deltaRows, "getResizedRange"); + thisObj._ensureInteger(deltaColumns, "getResizedRange"); + var referenceRange = (deltaRows >= 0 && deltaColumns >= 0) ? thisObj : thisObj.getCell(0, 0); + var result = referenceRange.getBoundingRect(thisObj.getLastCell().getOffsetRange(deltaRows, deltaColumns)); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetResizedRange = Range_GetResizedRange; + function Range_GetRowsAbove(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = thisObj._getAdjacentRange("getRowsAbove", count, thisObj.getRow(0), -1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsAbove = Range_GetRowsAbove; + function Range_GetRowsBelow(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = this._getAdjacentRange("getRowsBelow", count, thisObj.getLastRow(), 1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsBelow = Range_GetRowsBelow; + function Range_Formulas_Set(thisObj, value) { + thisObj.m_formulas = value; + if (setRangePropertiesInBulk(thisObj, "Formulas", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Formulas_Set = Range_Formulas_Set; + function Range_FormulasLocal_Set(thisObj, value) { + thisObj.m_formulasLocal = value; + if (setRangePropertiesInBulk(thisObj, "FormulasLocal", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasLocal_Set = Range_FormulasLocal_Set; + function Range_FormulasR1C1_Set(thisObj, value) { + thisObj.m_formulasR1C1 = value; + if (setRangePropertiesInBulk(thisObj, "FormulasR1C1", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasR1C1_Set = Range_FormulasR1C1_Set; + function Range_NumberFormat_Set(thisObj, value) { + thisObj.m_numberFormat = value; + if (setRangePropertiesInBulk(thisObj, "NumberFormat", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_NumberFormat_Set = Range_NumberFormat_Set; + function Range_Values_Set(thisObj, value) { + thisObj.m_values = value; + if (setRangePropertiesInBulk(thisObj, "Values", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Values_Set = Range_Values_Set; + function Range_ValuesAsJson_Set(thisObj, value) { + thisObj.m_valuesAsJson = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJson", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJson_Set = Range_ValuesAsJson_Set; + function Range_ValuesAsJsonLocal_Set(thisObj, value) { + thisObj.m_valuesAsJsonLocal = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJsonLocal", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJsonLocal_Set = Range_ValuesAsJsonLocal_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function SettingCollection_Add(thisObj, key, value) { + value = _CC._replaceDateWithStringDate(value); + var result = _createMethodObject(Excel.Setting, thisObj, "Add", 0, [key, value], false, true, null, 0); + return { handled: true, result: result }; + } + _CC.SettingCollection_Add = SettingCollection_Add; + function SettingCollection_SettingsChanged_EventArgsTransform(thisObj, args) { + return { + settings: thisObj + }; + } + _CC.SettingCollection_SettingsChanged_EventArgsTransform = SettingCollection_SettingsChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + var DateJSONPrefix = "Date("; + var DateJSONSuffix = ")"; + function _replaceStringDateWithDate(value) { + var strValue = JSON.stringify(value); + value = JSON.parse(strValue, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === DateJSONPrefix && v.slice(-1) === DateJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + return value; + } + function _replaceDateWithStringDate(value) { + var strValue = JSON.stringify(value, function dateReplacer(k, v) { + return (this[k] instanceof Date) ? (DateJSONPrefix + this[k].getTime() + DateJSONSuffix) : v; + }); + value = JSON.parse(strValue); + return value; + } + _CC._replaceDateWithStringDate = _replaceDateWithStringDate; + function Setting_HandleResult(thisObj, value) { + if (!_isUndefined(value["Value"])) { + value["Value"] = _replaceStringDateWithDate(value["Value"]); + } + ; + } + _CC.Setting_HandleResult = Setting_HandleResult; + function Setting_Value_Set(thisObj, value) { + if (!_isNullOrUndefined(value)) { + thisObj.m_value = value; + var newValue = _replaceDateWithStringDate(value); + _invokeSetProperty(thisObj, "Value", newValue, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Setting_Value_Set = Setting_Value_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + var NamedItemCollectionCustom = (function () { + function NamedItemCollectionCustom() { + } + Object.defineProperty(NamedItemCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItemCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return NamedItemCollectionCustom; + }()); + Excel.NamedItemCollectionCustom = NamedItemCollectionCustom; + (function (_CC) { + function Binding_DataChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj + }; + return evt; + } + _CC.Binding_DataChanged_EventArgsTransform = Binding_DataChanged_EventArgsTransform; + function Binding_SelectionChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj, + columnCount: args.columnCount, + rowCount: args.rowCount, + startColumn: args.startColumn, + startRow: args.startRow + }; + return evt; + } + _CC.Binding_SelectionChanged_EventArgsTransform = Binding_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var TableCollectionCustom = (function () { + function TableCollectionCustom() { + } + Object.defineProperty(TableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return TableCollectionCustom; + }()); + Excel.TableCollectionCustom = TableCollectionCustom; + (function (_CC) { + function TableCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.TableCollection_Changed_EventArgsTransform = TableCollection_Changed_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Table_HandleIdResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleIdResult = Table_HandleIdResult; + function Table_HandleResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleResult = Table_HandleResult; + function Table_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.Table_Changed_EventArgsTransform = Table_Changed_EventArgsTransform; + function Table_SelectionChanged_EventArgsTransform(thisObj, args) { + var value = args; + var isAddressNullOrEmpty = (!value.address || value.address.length === 0); + var newArgs = { + type: Excel.EventType.tableSelectionChanged, + isInsideTable: !isAddressNullOrEmpty, + worksheetId: value.worksheetId, + tableId: thisObj.id, + address: value.address + }; + return newArgs; + } + _CC.Table_SelectionChanged_EventArgsTransform = Table_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartCollectionCustom = (function () { + function ChartCollectionCustom() { + } + Object.defineProperty(ChartCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ChartCollectionCustom; + }()); + Excel.ChartCollectionCustom = ChartCollectionCustom; + (function (_CC) { + function ChartCollection_Add(thisObj, type, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); + } + return { handled: false, result: null }; + } + _CC.ChartCollection_Add = ChartCollection_Add; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Chart_SetData(thisObj, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); + } + return { handled: false }; + } + _CC.Chart_SetData = Chart_SetData; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartFillCustom = (function () { + function ChartFillCustom() { + } + ChartFillCustom.prototype.load = function (option) { + _load(this, option); + return this; + }; + return ChartFillCustom; + }()); + Excel.ChartFillCustom = ChartFillCustom; + var VisualCollectionCustom = (function () { + function VisualCollectionCustom() { + } + Object.defineProperty(VisualCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return VisualCollectionCustom; + }()); + Excel.VisualCollectionCustom = VisualCollectionCustom; + (function (_CC) { + function VisualCollection_AgaveVisualUpdate_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: value.type, + payload: value.payload + }; + return newArgs; + } + _CC.VisualCollection_AgaveVisualUpdate_EventArgsTransform = VisualCollection_AgaveVisualUpdate_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Visual_ChangeNotification_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + targetId: value.targetId, + changeType: value.changeType, + payload: value.payload, + type: Excel.EventType.visualChange + }; + return newArgs; + } + _CC.Visual_ChangeNotification_EventArgsTransform = Visual_ChangeNotification_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var PivotTableCollectionCustom = (function () { + function PivotTableCollectionCustom() { + } + Object.defineProperty(PivotTableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return PivotTableCollectionCustom; + }()); + Excel.PivotTableCollectionCustom = PivotTableCollectionCustom; + (function (_CC) { + function PivotLayout_GetColumnLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetColumnLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetColumnLabelRange = PivotLayout_GetColumnLabelRange; + function PivotLayout_GetDataBodyRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetDataBodyRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataBodyRange = PivotLayout_GetDataBodyRange; + function PivotLayout_GetDataHierarchy(thisObj, cell) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + _throwIfApiNotSupported("PivotLayout.getDataHierarchy", _defaultApiSetName, "1.9", _hostName); + var result = _createMethodObject(Excel.DataPivotHierarchy, thisObj, "GetDataHierarchy", 0, [cell], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataHierarchy = PivotLayout_GetDataHierarchy; + function PivotLayout_GetFilterAxisRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetFilterAxisRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetFilterAxisRange = PivotLayout_GetFilterAxisRange; + function PivotLayout_GetRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRange = PivotLayout_GetRange; + function PivotLayout_GetRowLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRowLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRowLabelRange = PivotLayout_GetRowLabelRange; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function PivotField_SortByLabels(thisObj, sortBy) { + if (typeof sortBy === "string") { + sortBy = (sortBy.toLowerCase() === "ascending"); + } + _invokeMethod(thisObj, "SortByLabels", 0, [sortBy], 0, 0); + return { handled: true }; + } + _CC.PivotField_SortByLabels = PivotField_SortByLabels; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormattingService_GetFormatter(thisObj, format) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatting.GetFormatter", "NumberFormatting", "1.1", _hostName); + var result = _createMethodObject(Excel.NumberFormatter, thisObj, "GetFormatter", 0, [format], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormattingService_GetFormatter = NumberFormattingService_GetFormatter; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormatter_Format(thisObj, value) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatter.Format", "NumberFormatting", "1.1", _hostName); + var result = _invokeMethod(thisObj, "Format", 0, [value], 0, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormatter_Format = NumberFormatter_Format; + })(_CC = Excel._CC || (Excel._CC = {})); + var CustomFunctionManagerCustom = (function () { + function CustomFunctionManagerCustom() { + } + CustomFunctionManagerCustom.register = function (metadata, javascript) { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { return Excel.CustomFunctionManager.newObject(context).register(metadata, javascript); }); + }; + CustomFunctionManagerCustom.getStatus = function () { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + var manager = Excel.CustomFunctionManager.newObject(context).load("status"); + return context.sync().then(function () { return manager.status; }); + }); + }; + return CustomFunctionManagerCustom; + }()); + Excel.CustomFunctionManagerCustom = CustomFunctionManagerCustom; + (function (_CC) { + function CustomFunctionManager_StaticCustomize(type) { + type.register = CustomFunctionManagerCustom.register; + type.getStatus = CustomFunctionManagerCustom.getStatus; + } + _CC.CustomFunctionManager_StaticCustomize = CustomFunctionManager_StaticCustomize; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Style_TextOrientation_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_textOrientation = value; + _invokeSetProperty(thisObj, "Orientation", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Style_TextOrientation_Set = Style_TextOrientation_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function InternalTest_Test1Event_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_Test1Event_EventArgsTransform = InternalTest_Test1Event_EventArgsTransform; + function InternalTest_TestEvent_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_TestEvent_EventArgsTransform = InternalTest_TestEvent_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var CommentCollectionCustom = (function () { + function CommentCollectionCustom() { + } + Object.defineProperty(CommentCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return CommentCollectionCustom; + }()); + Excel.CommentCollectionCustom = CommentCollectionCustom; + var ShapeCollectionCustom = (function () { + function ShapeCollectionCustom() { + } + Object.defineProperty(ShapeCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ShapeCollectionCustom; + }()); + Excel.ShapeCollectionCustom = ShapeCollectionCustom; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["accessDenied"] = "AccessDenied"; + ErrorCodes["apiNotFound"] = "ApiNotFound"; + ErrorCodes["conflict"] = "Conflict"; + ErrorCodes["emptyChartSeries"] = "EmptyChartSeries"; + ErrorCodes["filteredRangeConflict"] = "FilteredRangeConflict"; + ErrorCodes["formulaLengthExceedsLimit"] = "FormulaLengthExceedsLimit"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["inactiveWorkbook"] = "InactiveWorkbook"; + ErrorCodes["insertDeleteConflict"] = "InsertDeleteConflict"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidBinding"] = "InvalidBinding"; + ErrorCodes["invalidOperation"] = "InvalidOperation"; + ErrorCodes["invalidReference"] = "InvalidReference"; + ErrorCodes["invalidSelection"] = "InvalidSelection"; + ErrorCodes["itemAlreadyExists"] = "ItemAlreadyExists"; + ErrorCodes["itemNotFound"] = "ItemNotFound"; + ErrorCodes["mergedRangeConflict"] = "MergedRangeConflict"; + ErrorCodes["nonBlankCellOffSheet"] = "NonBlankCellOffSheet"; + ErrorCodes["notImplemented"] = "NotImplemented"; + ErrorCodes["openWorkbookLinksBlocked"] = "OpenWorkbookLinksBlocked"; + ErrorCodes["operationCellsExceedLimit"] = "OperationCellsExceedLimit"; + ErrorCodes["pivotTableRangeConflict"] = "PivotTableRangeConflict"; + ErrorCodes["powerQueryRefreshResourceChallenge"] = "PowerQueryRefreshResourceChallenge"; + ErrorCodes["rangeExceedsLimit"] = "RangeExceedsLimit"; + ErrorCodes["refreshWorkbookLinksBlocked"] = "RefreshWorkbookLinksBlocked"; + ErrorCodes["requestAborted"] = "RequestAborted"; + ErrorCodes["responsePayloadSizeLimitExceeded"] = "ResponsePayloadSizeLimitExceeded"; + ErrorCodes["unsupportedFeature"] = "UnsupportedFeature"; + ErrorCodes["unsupportedFillType"] = "UnsupportedFillType"; + ErrorCodes["unsupportedOperation"] = "UnsupportedOperation"; + ErrorCodes["unsupportedSheet"] = "UnsupportedSheet"; + ErrorCodes["invalidOperationInCellEditMode"] = "InvalidOperationInCellEditMode"; + })(ErrorCodes = Excel.ErrorCodes || (Excel.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = {})); + var _libraryMetadataXlapi = { "version": "1.0.0", + "name": "Excel", + "defaultApiSetName": "ExcelApi", + "hostName": "Excel", + "apiSets": [["1.19", "ExcelApiUndo"], ["1.1", "Recorder"], ["99.9"], ["1.4", "ExcelApiUndo"], ["1.8"], ["1.9"], ["1.11"], ["1.18"], ["1.6"], ["1.6", "ExcelApiUndo"], ["1.7"], ["1.1", "ExcelApiUndo"], ["1.2"], ["1.3"], ["1.4"], ["1.5"], ["1.10"], ["1.14"], ["1.1", "ExcelApiOnline"], ["1.1", "CustomFunctions"], ["1.1", "WACOperationEvents"], ["1.3", "ExcelApiUndo"], ["1.13"], ["1.16"], ["1.8", "ExcelApiUndo"], ["1.16", "ExcelApiUndo"], ["1.12"], ["1.2", "ExcelApiOnline"], ["1.2", "ExcelApiUndo"], ["1.17"], ["1.7", "ExcelApiUndo"], ["1.10", "ExcelApiUndo"], ["1.14", "ExcelApiUndo"], ["1.15", "ExcelApiUndo"], ["1.15"], ["1.17", "ExcelApiUndo"], ["99.99", "ExcelApiUndo"], ["1.9", "ExcelApiUndo"], ["1.11", "ExcelApiUndo"], ["1.12", "ExcelApiUndo"], ["1.13", "ExcelApiUndo"], ["1.18", "ExcelApiUndo"]], + "strings": [], + "enumTypes": [["UndoChangeType", ["undoAction", "redoAction", "undoOrRedoCleared", "undoGroupAdded"]], + ["SDX", ["guidedReapply"]], + ["BusinessBarEntryType", [], { "officeScriptsRunningStatus": 0, "msFormsDataSyncRunningStatus": 1 }], + ["FormulaReferenceStyle", ["a1", "r1C1"]], + ["NavigationObjectType", ["table", "pivotTable", "chart", "shape", "namedRange"]], + ["UserActivityType", ["none", "insertSheet", "deleteSheet", "renameSheet", "changeCell", "insertRow", "insertColumn", "deleteRow", "deleteColumn", "insertPartialRow", "insertPartialColumn", "insertPartialColumnRightToLeft", "deletePartialRow", "deletePartialColumn", "deletePartialColumnRightToLeft", "move", "sort", "mergeCells", "unmergeCells", "unknownOperation", "genericEdit"]], + ["LineageEndOfLogStatus", ["loadInProgress", "success", "endOfLog", "purged", "trimmed", "unsupported", "cleared", "error"]], + ["LineageLoadType", ["new", "next", "previous", "latest"]], + ["LoadToType", ["connectionOnly", "table", "pivotTable", "pivotChart"]], + ["QueryError", ["unknown", "none", "failedLoadToWorksheet", "failedLoadToDataModel", "failedDownload", "failedToCompleteDownload"]], + ["RangeOptimizationType", ["other", "numberFormat", "textAlignment", "textProperties", "cellBorder", "fillColor", "sheetProtection", "rowHeight", "rowVisibility"]], + ["WorkbookLinksHardToFindMessages", ["none", "containsDefinedNames", "hiddenOrVeryHiddenSheet", "hiddenFloatingObjects", "lockedFloatingObjectsThroughVba", "protectedSheet", "containsConditionalFormatting", "containsDataValidation", "hiddenRowsAndColumns"]], + ["WorkbookLinksIconState", ["ok", "moreInfo", "warning"]], + ["WorkbookLinksRefreshSettings", ["ask", "always", "never"]], + ["WorkbookConditionalFormattingRulesManagerScope", ["defaultScope", "selectedRange", "activatedWorksheet", "activatedTable", "activatedPivotTable"]], + ["WorkbookLinksRefreshMode", ["manual", "automatic"]], + ["HelpTopic", ["showChanges", "guidedReapply", "externalCodeServiceDiagnostics"]], + ["DocumentTaskChangeAction", [], { "unknown": "unknown", "create": "create", "assign": "assign", "unassign": "unassign", "unassignAll": "unassignAll", "setSchedule": "setSchedule", "setPercentComplete": "setPercentComplete", "setPriority": "setPriority", "remove": "remove", "restore": "restore", "setTitle": "setTitle", "undo": "undo" }], + ["DataSourceType", ["unknown", "cube", "localRange", "localTable", "oledbDefault"]], + ["DateFilterCondition", ["unknown", "equals", "before", "beforeOrEqualTo", "after", "afterOrEqualTo", "between", "tomorrow", "today", "yesterday", "nextWeek", "thisWeek", "lastWeek", "nextMonth", "thisMonth", "lastMonth", "nextQuarter", "thisQuarter", "lastQuarter", "nextYear", "thisYear", "lastYear", "yearToDate", "allDatesInPeriodQuarter1", "allDatesInPeriodQuarter2", "allDatesInPeriodQuarter3", "allDatesInPeriodQuarter4", "allDatesInPeriodJanuary", "allDatesInPeriodFebruary", "allDatesInPeriodMarch", "allDatesInPeriodApril", "allDatesInPeriodMay", "allDatesInPeriodJune", "allDatesInPeriodJuly", "allDatesInPeriodAugust", "allDatesInPeriodSeptember", "allDatesInPeriodOctober", "allDatesInPeriodNovember", "allDatesInPeriodDecember"]], + ["LabelFilterCondition", ["unknown", "equals", "beginsWith", "endsWith", "contains", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between"]], + ["PivotFilterType", ["unknown", "value", "manual", "label", "date"]], + ["TopBottomSelectionType", ["items", "percent", "sum"]], + ["ValueFilterCondition", ["unknown", "equals", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between", "topN", "bottomN"]], + ["BuiltInPivotTableStyle", ["none", "light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "light22", "light23", "light24", "light25", "light26", "light27", "light28", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11", "dark12", "dark13", "dark14", "dark15", "dark16", "dark17", "dark18", "dark19", "dark20", "dark21", "dark22", "dark23", "dark24", "dark25", "dark26", "dark27", "dark28"]], + ["BuiltInSlicerStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "other1", "other2", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6"]], + ["BuiltInTableStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11"]], + ["ChartSeriesDimension", ["categories", "values", "bubbleSizes"], { "xvalues": "XValues", "yvalues": "YValues" }], + ["PivotTableDateGroupBy", ["invalid", "bySeconds", "byMinutes", "byHours", "byDays", "byMonths", "byQuarters", "byYears"]], + ["PivotFilterTopBottomCriterion", ["invalid", "topItems", "topPercent", "topSum", "bottomItems", "bottomPercent", "bottomSum"]], + ["SortBy", ["ascending", "descending"]], + ["AggregationFunction", ["unknown", "automatic", "sum", "count", "average", "max", "min", "product", "countNumbers", "standardDeviation", "standardDeviationP", "variance", "varianceP"]], + ["ShowAsCalculation", ["unknown", "none", "percentOfGrandTotal", "percentOfRowTotal", "percentOfColumnTotal", "percentOfParentRowTotal", "percentOfParentColumnTotal", "percentOfParentTotal", "percentOf", "runningTotal", "percentRunningTotal", "differenceFrom", "percentDifferenceFrom", "rankAscending", "rankDecending", "index"]], + ["PivotAxis", ["unknown", "row", "column", "data", "filter"]], + ["LinkedDataTypeRefreshMode", ["unknown", "manual", "onLoad", "periodic"]], + ["AxisType", ["invalid", "category", "value", "series"]], + ["AxisGroup", ["primary", "secondary"]], + ["AxisScaleType", ["linear", "logarithmic"]], + ["AxisCrosses", ["automatic", "maximum", "minimum", "custom"]], + ["AxisTickMark", ["none", "cross", "inside", "outside"]], + ["AxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["TrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ChartAxisType", ["invalid", "category", "value", "series"]], + ["ChartAxisGroup", ["primary", "secondary"]], + ["ChartAxisScaleType", ["linear", "logarithmic"]], + ["ChartAxisPosition", ["automatic", "maximum", "minimum", "custom"]], + ["ChartAxisTickMark", ["none", "cross", "inside", "outside"]], + ["CalculationState", ["done", "calculating", "pending"]], + ["ChartAxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["ChartAxisDisplayUnit", ["none", "hundreds", "thousands", "tenThousands", "hundredThousands", "millions", "tenMillions", "hundredMillions", "billions", "trillions", "custom"]], + ["ChartAxisTimeUnit", ["days", "months", "years"]], + ["ChartBoxQuartileCalculation", ["inclusive", "exclusive"]], + ["ChartAxisCategoryType", ["automatic", "textAxis", "dateAxis"]], + ["ChartBinType", ["category", "auto", "binWidth", "binCount"]], + ["ChartLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "grey25", "grey50", "grey75", "automatic", "roundDot"]], + ["ChartDataLabelPosition", ["invalid", "none", "center", "insideEnd", "insideBase", "outsideEnd", "left", "right", "top", "bottom", "bestFit", "callout"]], + ["ChartErrorBarsInclude", ["both", "minusValues", "plusValues"]], + ["ChartErrorBarsType", ["fixedValue", "percent", "stDev", "stError", "custom"]], + ["ChartMapAreaLevel", ["automatic", "dataOnly", "city", "county", "state", "country", "continent", "world"]], + ["ChartGradientStyle", ["twoPhaseColor", "threePhaseColor"]], + ["ChartGradientStyleType", ["extremeValue", "number", "percent"]], + ["ChartTitlePosition", ["automatic", "top", "bottom", "left", "right"]], + ["ChartLegendPosition", ["invalid", "top", "bottom", "left", "right", "corner", "custom"]], + ["ChartMarkerStyle", ["invalid", "automatic", "none", "square", "diamond", "triangle", "star", "dot", "dash", "circle", "plus", "picture"], { "x": "X" }], + ["ChartPlotAreaPosition", ["automatic", "custom"]], + ["ChartMapLabelStrategy", ["none", "bestFit", "showAll"]], + ["ChartMapProjectionType", ["automatic", "mercator", "miller", "robinson", "albers"]], + ["ChartParentLabelStrategy", ["none", "banner", "overlapping"]], + ["ChartSeriesBy", ["auto", "columns", "rows"]], + ["ChartDataSourceType", ["localRange", "externalRange", "list", "unknown"]], + ["ChartTextHorizontalAlignment", ["center", "left", "right", "justify", "distributed"]], + ["ChartTextVerticalAlignment", ["center", "bottom", "top", "justify", "distributed"]], + ["ChartTickLabelAlignment", ["center", "left", "right"]], + ["ChartType", ["invalid", "columnClustered", "columnStacked", "columnStacked100", "barClustered", "barStacked", "barStacked100", "lineStacked", "lineStacked100", "lineMarkers", "lineMarkersStacked", "lineMarkersStacked100", "pieOfPie", "pieExploded", "barOfPie", "areaStacked", "areaStacked100", "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", "line", "pie", "area", "doughnut", "radar", "histogram", "boxwhisker", "pareto", "regionMap", "treemap", "waterfall", "sunburst", "funnel"], { "_3DColumnClustered": "3DColumnClustered", "_3DColumnStacked": "3DColumnStacked", "_3DColumnStacked100": "3DColumnStacked100", "_3DBarClustered": "3DBarClustered", "_3DBarStacked": "3DBarStacked", "_3DBarStacked100": "3DBarStacked100", "_3DPieExploded": "3DPieExploded", "xyscatterSmooth": "XYScatterSmooth", "xyscatterSmoothNoMarkers": "XYScatterSmoothNoMarkers", "xyscatterLines": "XYScatterLines", "xyscatterLinesNoMarkers": "XYScatterLinesNoMarkers", "_3DAreaStacked": "3DAreaStacked", "_3DAreaStacked100": "3DAreaStacked100", "_3DColumn": "3DColumn", "_3DLine": "3DLine", "_3DPie": "3DPie", "xyscatter": "XYScatter", "_3DArea": "3DArea" }], + ["ChartUnderlineStyle", ["none", "single"]], + ["ChartDisplayBlanksAs", ["notPlotted", "zero", "interplotted"]], + ["ChartPlotBy", ["rows", "columns"]], + ["ChartSplitType", ["splitByPosition", "splitByValue", "splitByPercentValue", "splitByCustomSplit"]], + ["ChartColorScheme", ["colorfulPalette1", "colorfulPalette2", "colorfulPalette3", "colorfulPalette4", "monochromaticPalette1", "monochromaticPalette2", "monochromaticPalette3", "monochromaticPalette4", "monochromaticPalette5", "monochromaticPalette6", "monochromaticPalette7", "monochromaticPalette8", "monochromaticPalette9", "monochromaticPalette10", "monochromaticPalette11", "monochromaticPalette12", "monochromaticPalette13"]], + ["ChartTrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ShapeZOrder", ["bringToFront", "bringForward", "sendToBack", "sendBackward"]], + ["ShapeType", ["unsupported", "image", "geometricShape", "group", "line"]], + ["ShapeScaleType", ["currentSize", "originalSize"]], + ["ShapeScaleFrom", ["scaleFromTopLeft", "scaleFromMiddle", "scaleFromBottomRight"]], + ["ShapeFillType", ["noFill", "solid", "gradient", "pattern", "pictureAndTexture", "mixed"]], + ["ShapeFontUnderlineStyle", ["none", "single", "double", "heavy", "dotted", "dottedHeavy", "dash", "dashHeavy", "dashLong", "dashLongHeavy", "dotDash", "dotDashHeavy", "dotDotDash", "dotDotDashHeavy", "wavy", "wavyHeavy", "wavyDouble"]], + ["PictureFormat", [], { "unknown": "UNKNOWN", "bmp": "BMP", "jpeg": "JPEG", "gif": "GIF", "png": "PNG", "svg": "SVG" }], + ["ShapeLineStyle", ["single", "thickBetweenThin", "thickThin", "thinThick", "thinThin"]], + ["ShapeLineDashStyle", ["dash", "dashDot", "dashDotDot", "longDash", "longDashDot", "roundDot", "solid", "squareDot", "longDashDotDot", "systemDash", "systemDot", "systemDashDot"]], + ["ArrowheadLength", ["short", "medium", "long"]], + ["ArrowheadStyle", ["none", "triangle", "stealth", "diamond", "oval", "open"]], + ["ArrowheadWidth", ["narrow", "medium", "wide"]], + ["PremiumLicenseName", ["python"]], + ["BindingType", ["range", "table", "text"]], + ["BorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight", "insideVertical", "insideHorizontal", "diagonalDown", "diagonalUp"]], + ["BorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "double", "slantDashDot"]], + ["BorderWeight", ["hairline", "thin", "medium", "thick"]], + ["CalculationMode", ["automatic", "automaticExceptTables", "manual"]], + ["RuntimeCalculationMode", [], { "undefined": 0, "automatic": 1, "automaticExceptTables": 2, "manual": 3 }], + ["CalculationType", ["recalculate", "full", "fullRebuild"]], + ["ClearApplyTo", ["all", "formats", "contents", "hyperlinks", "removeHyperlinks"]], + ["VisualCategory", ["column", "bar", "line", "area", "pie", "donut", "scatter", "bubble", "statistical", "stock", "combo", "hierarchy", "surface", "map", "funnel", "radar", "waterfall", "threeD", "other"]], + ["VisualPropertyType", ["object", "collection", "string", "double", "int", "bool", "enum", "color"]], + ["VisualChangeType", ["dataChange", "propertyChange", "genericChange", "selectionChange"]], + ["BoolMetaPropertyType", ["writeOnly", "readOnly", "hideEntireSubtreeUI", "hideMeButShowChildrenUI", "expandableUI", "nextPropOnSameLine", "hideLabel", "showResetUI", "hasOwnExpandableSection", "nextPropOnSameLineFOTP", "showResetUIFOTP", "untransferable", "ignoreDuringChangeChartType", "notTriviallyUndoable", "volatileEnum", "exceptionCollection", "metaOnly", "showHideCollection", "errorMessage", "infoMessage"]], + ["ConditionalDataBarAxisFormat", ["automatic", "none", "cellMidPoint"]], + ["ConditionalDataBarDirection", ["context", "leftToRight", "rightToLeft"]], + ["ConditionalFormatDirection", ["top", "bottom"]], + ["ConditionalFormatType", ["custom", "dataBar", "colorScale", "iconSet", "topBottom", "presetCriteria", "containsText", "cellValue"]], + ["ConditionalFormatRuleType", ["invalid", "automatic", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatIconRuleType", ["invalid", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatColorCriterionType", ["invalid", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalTopBottomCriterionType", ["invalid", "topItems", "topPercent", "bottomItems", "bottomPercent"]], + ["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"]], + ["ConditionalTextOperator", ["invalid", "contains", "notContains", "beginsWith", "endsWith"]], + ["ConditionalCellValueOperator", ["invalid", "between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqual", "lessThanOrEqual"]], + ["ConditionalIconCriterionOperator", ["invalid", "greaterThan", "greaterThanOrEqual"]], + ["ConditionalRangeBorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight"]], + ["ConditionalRangeBorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot"]], + ["ConditionalRangeFontUnderlineStyle", ["none", "single", "double"]], + ["CustomFunctionType", ["invalid", "script", "webService"]], + ["CustomFunctionMetadataFormat", ["invalid", "openApi"]], + ["DataValidationType", ["none", "wholeNumber", "decimal", "list", "date", "time", "textLength", "custom", "inconsistent", "mixedCriteria"]], + ["DataValidationOperator", ["between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqualTo", "lessThanOrEqualTo"]], + ["DataValidationAlertStyle", ["stop", "warning", "information"]], + ["DeleteShiftDirection", ["up", "left"]], + ["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"]], + ["FilterDatetimeSpecificity", ["year", "month", "day", "hour", "minute", "second"]], + ["FilterOn", ["bottomItems", "bottomPercent", "cellColor", "dynamic", "fontColor", "values", "topItems", "topPercent", "icon", "custom"]], + ["FilterOperator", ["and", "or"]], + ["HorizontalAlignment", ["general", "left", "center", "right", "fill", "justify", "centerAcrossSelection", "distributed"]], + ["IconSet", ["invalid", "threeArrows", "threeArrowsGray", "threeFlags", "threeTrafficLights1", "threeTrafficLights2", "threeSigns", "threeSymbols", "threeSymbols2", "fourArrows", "fourArrowsGray", "fourRedToBlack", "fourRating", "fourTrafficLights", "fiveArrows", "fiveArrowsGray", "fiveRating", "fiveQuarters", "threeStars", "threeTriangles", "fiveBoxes"]], + ["ImageFittingMode", ["fit", "fitAndCenter", "fill"]], + ["InsertShiftDirection", ["down", "right"]], + ["NamedItemScope", ["worksheet", "workbook"]], + ["NamedItemType", ["string", "integer", "double", "boolean", "range", "error", "array"]], + ["RangeUnderlineStyle", ["none", "single", "double", "singleAccountant", "doubleAccountant"]], + ["SheetVisibility", ["visible", "hidden", "veryHidden"]], + ["EventTriggerSource", ["unknown", "thisLocalAddin"]], + ["RangeValueType", ["unknown", "empty", "string", "integer", "double", "boolean", "error", "richValue"]], + ["KeyboardDirection", ["left", "right", "up", "down"]], + ["SearchDirection", ["forward", "backwards"]], + ["SortOrientation", ["rows", "columns"]], + ["SortOn", ["value", "cellColor", "fontColor", "icon"]], + ["SortDataOption", ["normal", "textAsNumber"]], + ["SortMethod", ["pinYin", "strokeCount"]], + ["VerticalAlignment", ["top", "center", "bottom", "justify", "distributed"]], + ["MessageCategory", [], { "none": 0, "customFunction": 1, "action": 2, "event": 65536 }], + ["MessageType", [], { "none": 0, "testEvent": 1, "test1Event": 2, "worksheetDataChangedEvent": 10, "worksheetActivatedEvent": 11, "worksheetDeactivatedEvent": 12, "worksheetAddedEvent": 13, "worksheetSelectionChangedEvent": 14, "worksheetDeletedEvent": 15, "worksheetCalculatedEvent": 16, "worksheetFilteredEvent": 17, "worksheetFormatChangedEvent": 18, "worksheetRowSortedEvent": 19, "worksheetColumnSortedEvent": 20, "worksheetSingleClickedEvent": 21, "worksheetRowHiddenChangedEvent": 22, "worksheetFormulaChangedEvent": 23, "worksheetProtectionChangedEvent": 24, "worksheetNameChangedEvent": 25, "worksheetVisibilityChangedEvent": 26, "worksheetMovedEvent": 27, "worksheetNavigationObjectChangedEvent": 28, "worksheetRowHeightChangedEvent": 29, "workbookFormulaReferenceStyleChangedEvent": 30, "chartAddedEvent": 50, "chartActivatedEvent": 51, "chartDeactivatedEvent": 52, "chartDeletedEvent": 53, "tableSelectionChangedEvent": 100, "tableDataChangedEvent": 101, "tableAddedEvent": 102, "tableDeletedEvent": 103, "tableFilteredEvent": 104, "agaveVisualUpdateEvent": 150, "customFunctionExecutionBeginEvent": 200, "customFunctionExecutionEndEvent": 201, "commentAddedEvent": 250, "commentDeletedEvent": 251, "commentChangedEvent": 252, "invocationMessage": 1000, "cancellationMessage": 1001, "metadataMessage": 1002, "visualSelectionChangedEvent": 2000, "visualChangeEvent": 2001, "visualTrackerModelChangedEvent": 2002, "shapeSelectionChangedEvent": 2100, "shapeActivatedEvent": 2101, "shapeDeactivatedEvent": 2102, "shapeAddedEvent": 2103, "shapeDeletedEvent": 2104, "workbookAutoSaveSettingChangedEvent": 2200, "wacoperationEvent": 2201, "recordingStateChangedEvent": 2202, "workbookActivatedEvent": 2203, "workbookNavigationObjectChangedEvent": 2204, "ribbonCommandExecutedEvent": 2300, "linkedDataTypeRefreshRequestCompletedEvent": 2500, "linkedDataTypeRefreshModeChangedEvent": 2501, "linkedDataTypeLinkedDataTypeAddedEvent": 2502, "linkedWorkbookWorkbookLinksChangedEvent": 2600, "linkedWorkbookRefreshCompletedEvent": 2601, "rangePickerSelectionChangedEvent": 2700, "rangePickerDeactivatedEvent": 2701, "lineageActivityUpdateAvailableEvent": 2800, "lineageActivityFilterUpdatedEvent": 2801, "lineageActivityLoadCompletedEvent": 2802, "pivotTableAddedEvent": 2900, "pivotTableDeletedEvent": 2901, "namedItemAddedEvent": 3000, "namedItemDeletedEvent": 3001, "guidedReapplyManagerUpdateAvailableEvent": 3100, "vbaRecorderRecordingChangedEvent": 3200, "vbaRecorderRecordingChanged2Event": 3202, "workbookActionRecordedEvent": 3201, "externalCodeServiceDiagnosticsNewEntryEvent": 3300, "externalCodeServiceDiagnosticsFilterUpdatedEvent": 3301, "rangeValuesPreviewDismissedEvent": 3400, "applicationUndoChangedEvent": 3500, "appRuntimeVisibilityChangedEvent": 65539, "beforeCloseNotifiactionCancelledEvent": 65540, "augmentationLoopAnnotationAddedEvent": 65541 }], + ["InsertDeleteCellsShiftDirection", ["none", "shiftCellLeft", "shiftCellUp", "shiftCellRight", "shiftCellDown"]], + ["DocumentPropertyType", ["number", "boolean", "date", "string", "float"]], + ["EventSource", ["local", "remote"]], + ["DataChangeType", ["unknown", "rangeEdited", "rowInserted", "rowDeleted", "columnInserted", "columnDeleted", "cellInserted", "cellDeleted"]], + ["RowHiddenChangeType", ["unhidden", "hidden"]], + ["CommentChangeType", ["commentEdited", "commentResolved", "commentReopened", "replyAdded", "replyDeleted", "replyEdited"]], + ["EventType", ["worksheetChanged", "worksheetSelectionChanged", "worksheetAdded", "worksheetActivated", "worksheetDeactivated", "tableChanged", "tableSelectionChanged", "worksheetDeleted", "chartAdded", "chartActivated", "chartDeactivated", "chartDeleted", "worksheetCalculated", "visualSelectionChanged", "agaveVisualUpdate", "tableAdded", "tableDeleted", "tableFiltered", "worksheetFiltered", "shapeActivated", "shapeDeactivated", "visualChange", "workbookAutoSaveSettingChanged", "worksheetFormatChanged", "ribbonCommandExecuted", "worksheetRowSorted", "worksheetColumnSorted", "worksheetSingleClicked", "worksheetRowHiddenChanged", "recordingStateChangedEvent", "commentAdded", "commentDeleted", "commentChanged", "linkedDataTypeRefreshRequestCompleted", "linkedDataTypeRefreshModeChanged", "linkedDataTypeLinkedDataTypeAdded", "worksheetFormulaChanged", "workbookActivated", "linkedWorkbookWorkbookLinksChanged", "linkedWorkbookRefreshCompleted", "worksheetProtectionChanged", "worksheetNameChanged", "worksheetVisibilityChanged", "worksheetMoved", "lineageActivityUpdateAvailable", "lineageActivityFilterUpdated", "lineageActivityLoadCompleted", "shapeAdded", "shapeDeleted", "pivotTableAdded", "pivotTableDeleted", "namedItemAdded", "namedItemDeleted", "worksheetNavigationObjectChanged", "workbookNavigationObjectChanged", "worksheetRowHeightChanged", "workbookFormulaReferenceStyleChanged", "guidedReapplyManagerUpdateAvailable", "vbaRecorderRecordingChanged", "rangeValuesPreviewDismissed", "annotationAdded", "workbookActionRecorded", "applicationUndoChanged", "vbaRecorderRecordingChanged2"], { "wacoperationEvent": "WACOperationEvent" }], + ["DocumentPropertyItem", ["title", "subject", "author", "keywords", "comments", "template", "lastAuth", "revision", "appName", "lastPrint", "creation", "lastSave", "category", "format", "manager", "company"]], + ["SubtotalLocationType", ["atTop", "atBottom", "off"]], + ["PivotLayoutType", ["compact", "tabular", "outline"]], + ["ProtectionSelectionMode", ["normal", "unlocked", "none"]], + ["PageOrientation", ["portrait", "landscape"]], + ["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"]], + ["ReadingOrder", ["context", "leftToRight", "rightToLeft"]], + ["BuiltInStyle", ["normal", "comma", "currency", "percent", "wholeComma", "wholeDollar", "hlink", "hlinkTrav", "note", "warningText", "emphasis1", "emphasis2", "emphasis3", "sheetTitle", "heading1", "heading2", "heading3", "heading4", "input", "output", "calculation", "checkCell", "linkedCell", "total", "good", "bad", "neutral", "accent1", "accent1_20", "accent1_40", "accent1_60", "accent2", "accent2_20", "accent2_40", "accent2_60", "accent3", "accent3_20", "accent3_40", "accent3_60", "accent4", "accent4_20", "accent4_40", "accent4_60", "accent5", "accent5_20", "accent5_40", "accent5_60", "accent6", "accent6_20", "accent6_40", "accent6_60", "explanatoryText"]], + ["PrintErrorType", ["asDisplayed", "blank", "dash", "notAvailable"]], + ["WorksheetPositionType", ["none", "before", "after", "beginning", "end"]], + ["PrintComments", ["noComments", "endSheet", "inPlace"]], + ["PrintOrder", ["downThenOver", "overThenDown"]], + ["PrintMarginUnit", ["points", "inches", "centimeters"]], + ["HeaderFooterState", ["default", "firstAndDefault", "oddAndEven", "firstOddAndEven"]], + ["AutoFillType", ["fillDefault", "fillCopy", "fillSeries", "fillFormats", "fillValues", "fillDays", "fillWeekdays", "fillMonths", "fillYears", "linearTrend", "growthTrend", "flashFill"]], + ["GroupOption", ["byRows", "byColumns"]], + ["RangeCopyType", ["all", "formulas", "values", "formats", "link"]], + ["LinkedDataTypeState", ["none", "validLinkedData", "disambiguationNeeded", "brokenLinkedData", "fetchingData"]], + ["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"]], + ["ConnectorType", ["straight", "elbow", "curve"]], + ["ContentType", ["plain", "mention"]], + ["SpecialCellType", ["conditionalFormats", "dataValidations", "blanks", "constants", "formulas", "sameConditionalFormat", "sameDataValidation", "visible"]], + ["SpecialCellValueType", ["all", "errors", "errorsLogical", "errorsNumbers", "errorsText", "errorsLogicalNumber", "errorsLogicalText", "errorsNumberText", "logical", "logicalNumbers", "logicalText", "logicalNumbersText", "numbers", "numbersText", "text"]], + ["Placement", ["twoCell", "oneCell", "absolute"]], + ["FillPattern", ["none", "solid", "gray50", "gray75", "gray25", "horizontal", "vertical", "down", "up", "checker", "semiGray75", "lightHorizontal", "lightVertical", "lightDown", "lightUp", "grid", "crissCross", "gray16", "gray8", "linearGradient", "rectangularGradient"]], + ["ShapeTextHorizontalAlignment", ["left", "center", "right", "justify", "justifyLow", "distributed", "thaiDistributed"]], + ["ShapeTextVerticalAlignment", ["top", "middle", "bottom", "justified", "distributed"]], + ["ShapeTextVerticalOverflow", ["overflow", "ellipsis", "clip"]], + ["ShapeTextHorizontalOverflow", ["overflow", "clip"]], + ["ShapeTextReadingOrder", ["leftToRight", "rightToLeft"]], + ["ShapeTextOrientation", ["horizontal", "vertical", "vertical270", "wordArtVertical", "eastAsianVertical", "mongolianVertical", "wordArtVerticalRTL"]], + ["ShapeAutoSize", ["autoSizeNone", "autoSizeTextToFitShape", "autoSizeShapeToFitText", "autoSizeMixed"]], + ["CloseBehavior", ["save", "skipSave"]], + ["SaveBehavior", ["save", "prompt"]], + ["SlicerSortType", ["dataSourceOrder", "ascending", "descending"]], + ["RibbonTab", ["others", "home", "insert", "draw", "pageLayout", "formulas", "data", "review", "view", "developer", "addIns", "help"]], + ["NumberFormatCategory", ["general", "number", "currency", "accounting", "date", "time", "percentage", "fraction", "scientific", "text", "special", "custom"]]], + "clientObjectTypes": [["UndoScope", + 0, + 0, + 0, + [["close", + 0, + 0, + 0, + 2], + ["open", + 1, + 0, + 0, + 2]]], + ["RangeValuesPreview", + 4, + 0, + 0, + [["_RegisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["dismiss", + 0, + 2, + 0, + 4], + ["show", + 3, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Dismissed", + 0, + 0, + "MessageType.rangeValuesPreviewDismissedEvent", + "this._ParentObject.id", + "_RegisterEventDismissed", + "_UnregisterEventDismissed"]]], + ["AugmentationLoop", + 0, + 0, + 0, + [["_RegisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["activateAnnotation", + 1, + 2, + 0, + 4], + ["submitSignal", + 1, + 2, + 0, + 4]], + 0, + 0, + 0, + [["AnnotationAdded", + 0, + 0, + "MessageType.augmentationLoopAnnotationAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAnnotationAddedEvent", + "_UnregisterAnnotationAddedEvent"]]], + ["ExternalCodeService", + 0, + 0, + [["diagnostics", + "ExternalCodeServiceDiagnostics", + 2, + 0, + 0, + 4]]], + ["ExternalCodeServiceDiagnostics", + 0, + [["id", + 2]], + 0, + [["_RegisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["clear", + 0, + 2, + 0, + 4], + ["fireStoredEntries", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1]], + 0, + 0, + 0, + [["FilterUpdated", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent", + "this.id", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["NewEntry", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsNewEntryEvent", + "this.id", + "_RegisterEventNewEntry", + "_UnregisterEventNewEntry"]]], + ["VbaRecorder", + 0, + [["id", + 2]], + 0, + [["_RegisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterEventRecordingChanged2", + 0, + 2, + 2, + 4], + ["_UnregisterEventRecordingChanged2", + 0, + 2, + 2, + 4]], + 0, + 0, + 0, + [["RecordingChanged", + 0, + 0, + "MessageType.vbaRecorderRecordingChangedEvent", + "this.id", + "_RegisterEventRecordingChanged", + "_UnregisterEventRecordingChanged"], + ["RecordingChanged2", + 0, + 2, + "MessageType.vbaRecorderRecordingChanged2Event", + "this.id", + "_RegisterEventRecordingChanged2", + "_UnregisterEventRecordingChanged2"]]], + ["WorksheetOptimizationScanResult", + 0, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + [["ranges", + "RangeOptimizationCollection", + 18, + 0, + 0, + 4]]], + ["UserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity"], + ["GuidedReapplyManager", + 0, + 0, + [["activities", + "UserActivityCollection", + 18, + 0, + 0, + 4], + ["summaryCardUserActivity", + "SummaryCardUserActivity", + 2, + 0, + 0, + 4]], + [["openSavedFile", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["discardActivites", + 0, + 2, + 0, + 4], + ["reapplyActivity", + 1, + 2, + 0, + 4], + ["saveActivities", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["UpdateAvailable", + 0, + 0, + "MessageType.guidedReapplyManagerUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["BusinessBar", + 0, + 0, + 0, + [["hide", + 2], + ["show", + 2]]], + ["UserActivity", + 0, + [["activityId", + 2], + ["activityType", + 2], + ["author", + 2], + ["createdDateTime", + 10], + ["guid", + 2], + ["rangeAddress", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2], + ["authorEmail", + 2], + ["locationDeleted", + 2]], + [["highlightRangeAreas", + "RangeAreas", + 2, + 0, + 0, + 4]]], + ["LineageActivityCollection", + 1, + 0, + 0, + [["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["clear", + 0, + 2, + 0, + 4], + ["getCount", + 0, + 2, + 0, + 4], + ["getState", + 0, + 2, + 0, + 4], + ["loadActivities", + 1, + 2, + 0, + 4], + ["loadLatestActivities", + 0, + 2, + 0, + 4], + ["loadNextActivities", + 0, + 2, + 0, + 4], + ["loadPreviousActivities", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_RegisterEventLoadCompleted", + 0, + 2, + 0, + 4], + ["_UnregisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_UnregisterEventLoadCompleted", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity", + [["FilterUpdated", + 0, + 0, + "MessageType.lineageActivityFilterUpdatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["LoadCompleted", + 0, + 0, + "MessageType.lineageActivityLoadCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventLoadCompleted", + "_UnregisterEventLoadCompleted"], + ["UpdateAvailable", + 0, + 0, + "MessageType.lineageActivityUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["SummaryItemUserActivity", + 0, + [["activityType", + 2], + ["rangeAddresses", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2]]], + ["SummaryItemUserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SummaryItemUserActivity", + 1, + 2, + 0, + 4]], + 0, + "SummaryItemUserActivity"], + ["SummaryCardUserActivity", + 0, + [["authors", + 2], + ["currentUser", + 2], + ["displayTime", + 10], + ["numberOfDetailedCard", + 2], + ["summaryUnviewableData", + 2]], + [["summaryItemUserActivities", + "SummaryItemUserActivityCollection", + 18, + 0, + 0, + 4]]], + ["AllowEditRange", + 0, + [["address", + 1], + ["isPasswordProtected", + 3], + ["title", + 1]], + 0, + [["delete"], + ["pauseProtection", + 1], + ["setPassword", + 1]]], + ["AllowEditRangeCollection", + 1, + 0, + 0, + [["add", + 3], + ["getCount", + 0, + 2, + 0, + 4], + ["pauseProtection", + 1]], + [["getItem", + "AllowEditRange", + 1, + 18, + 0, + 4], + ["getItemAt", + "AllowEditRange", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "AllowEditRange", + 1, + 2, + 0, + 4]], + 0, + "AllowEditRange"], + ["Query", + 0, + [["loadedTo", + 2], + ["loadedToDataModel", + 2], + ["name", + 2], + ["refreshDate", + 10], + ["rowsLoadedCount", + 2], + ["error", + 2]]], + ["QueryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Query", + 1, + 18, + 0, + 4]], + 0, + "Query"], + ["VisualTracker", + 0, + [["id", + 2]], + 0, + [["_RegisterEventModelChanged", + 0, + 2], + ["_UnregisterEventModelChanged", + 0, + 2], + ["requestTrackingAlteration", + 2, + 2, + 0, + 4]], + 0, + 0, + 0, + [["ModelChanged", + 0, + 0, + "MessageType.visualTrackerModelChangedEvent", + "this.id", + "_RegisterEventModelChanged", + "_UnregisterEventModelChanged"]]], + ["NumberFormatProperty", + 0, + [["key", + 3], + ["currency", + 3], + ["dateTime", + 3], + ["dateTimeHasDayOfWeek", + 3], + ["dateTimeHasMonth", + 3], + ["dateTimeHasYear", + 3], + ["numeric", + 3], + ["percent", + 3], + ["text", + 3]]], + ["NumberFormatPropertyCollection", + 1, + 0, + 0, + 0, + [["getItemAt", + "NumberFormatProperty", + 1, + 2, + 0, + 4]], + 0, + "NumberFormatProperty"], + ["RangeOptimization", + 0, + [["optimizationTypes", + 2], + ["range", + 2]]], + ["RangeOptimizationCollection", + 1, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeOptimization", + 1, + 2, + 0, + 4]], + 0, + "RangeOptimization"], + ["WorksheetOptimization", + 0, + 0, + 0, + 0, + [["optimize", + "WorksheetOptimizationResult", + 0, + 0, + 0, + 2], + ["scan", + "RangeOptimizationCollection", + 0, + 6, + 0, + 4], + ["scanExtended", + "WorksheetOptimizationScanResult", + 0, + 2, + 0, + 4]]], + ["WorksheetOptimizationResult", + 0, + [["allocatedCells", + 2], + ["optimizedCells", + 2]]], + ["LinkedWorkbook", + 0, + [["displayUrl", + 2, + 3], + ["fileName", + 3, + 3], + ["id", + 2], + ["longErrorDescription", + 2, + 3], + ["refreshEnabled", + 2, + 3], + ["refreshing", + 2, + 3], + ["statusMessage", + 2, + 3], + ["excelIconState", + 2, + 3], + ["hardToFindErrorMessages", + 2, + 3], + ["lastUpdated", + 10, + 3]], + 0, + [["_RegisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["breakLinks"], + ["changeSource", + 1, + 0, + 3], + ["findNextLink", + 0, + 2, + 3, + 4], + ["openWorkbook", + 0, + 2, + 3, + 4], + ["refresh"], + ["openChangeSourceDialog", + 0, + 0, + 3], + ["closeChangeSourceDialog", + 0, + 0, + 3]], + 0, + 0, + 0, + [["RefreshCompleted", + 0, + 3, + "MessageType.linkedWorkbookRefreshCompletedEvent", + "this.id", + "_RegisterRefreshCompletedEvent", + "_UnregisterRefreshCompletedEvent"]]], + ["LinkedWorkbookCollection", + 1, + [["breakAllLinksEnabled", + 0, + 3], + ["refreshAllEnabled", + 0, + 3], + ["workbookLinksRefreshMode"], + ["workbookLinksRefreshSettings", + 0, + 3], + ["containsNonWorkbookLinks", + 0, + 3]], + 0, + [["_RegisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["_UnregisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["breakAllLinks"], + ["getCount", + 0, + 2, + 3, + 4], + ["refreshAll"], + ["openEditLinksDialog", + 0, + 2, + 3, + 4]], + [["getItem", + "LinkedWorkbook", + 1, + 18, + 0, + 4], + ["getItemAt", + "LinkedWorkbook", + 1, + 2, + 3, + 4], + ["getItemOrNullObject", + "LinkedWorkbook", + 1]], + 0, + "LinkedWorkbook", + [["WorkbookLinksChanged", + 0, + 3, + "MessageType.linkedWorkbookWorkbookLinksChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWorkbookLinksChangedEvent", + "_UnregisterWorkbookLinksChangedEvent"]]], + ["DocumentTaskChange", + 0, + [["type", + 2], + ["changedBy", + 2], + ["commentId", + 2], + ["createdDateTime", + 10], + ["id", + 2], + ["assignee", + 2], + ["undoChangeId", + 2], + ["priority", + 2], + ["title", + 2], + ["percentComplete", + 2], + ["startDateTime", + 10], + ["dueDateTime", + 10]], + 0, + 0, + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.DocumentTaskChange", + 4], + ["DocumentTaskChangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "DocumentTaskChange", + 1, + 2, + 0, + 4]], + 0, + "DocumentTaskChange"], + ["RangePicker", + 0, + 0, + 0, + [["activate", + 1, + 0, + 0, + 2, + 0, + 4], + ["deactivate", + 0, + 0, + 0, + 2, + 0, + 4], + ["updateSelection", + 1, + 0, + 0, + 2, + 0, + 4], + ["updateSelectionWithNavigation", + 4, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_UnregisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventDeactivated", + 0, + 2, + 0, + 4], + ["_UnregisterEventDeactivated", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Deactivated", + 0, + 0, + "MessageType.rangePickerDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventDeactivated", + "_UnregisterEventDeactivated"], + ["SelectionChanged", + 0, + 0, + "MessageType.rangePickerSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventSelectionChanged", + "_UnregisterEventSelectionChanged"]]], + ["DocumentTask", + 0, + [["startAndDueDateTime"], + ["id", + 2], + ["percentComplete"], + ["priority"], + ["title"], + ["assignees", + 2], + ["completedBy", + 2], + ["completedDateTime", + 10], + ["createdBy", + 2], + ["createdDateTime", + 10]], + [["changes", + "DocumentTaskChangeCollection", + 18, + 0, + 0, + 4], + ["comment", + "Comment", + 2, + 0, + 0, + 4]], + [["assign", + 1], + ["unassign", + 1], + ["unassignAll"]]], + ["DocumentTaskCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "DocumentTask", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DocumentTask", + 1, + 2, + 0, + 4], + ["getItemAt", + "DocumentTask", + 1, + 2, + 0, + 4]], + 0, + "DocumentTask"], + ["DataConnection", + 0, + [["connectionString", + 2], + ["name", + 2], + ["commandText", + 2], + ["dataSourceType", + 2]]], + ["Runtime", + 0, + [["enableEvents", + 1, + 5]]], + ["Application", + 0, + [["calculationMode", + 1], + ["calculationEngineVersion", + 3, + 6], + ["calculationState", + 3, + 6], + ["decimalSeparator", + 3, + 7], + ["thousandsSeparator", + 3, + 7], + ["useSystemSeparators", + 3, + 7], + ["formatStaleValues", + 1, + 8]], + [["iterativeCalculation", + "IterativeCalculation", + 35, + 6, + 0, + 4], + ["ribbon", + "Ribbon", + 35, + 6, + 0, + 4], + ["cultureInfo", + "CultureInfo", + 3, + 7, + 0, + 4], + ["undoScope", + "UndoScope", + 3, + 3, + 0, + 4]], + [["calculate", + 1], + ["suspendApiCalculationUntilNextSync", + 0, + 1, + 9, + 2, + 0, + 10], + ["suspendScreenUpdatingUntilNextSync", + 0, + 0, + 6, + 2, + 0, + 10], + ["hasLicense", + 1, + 2, + 8, + 4], + ["redo", + 0, + 0, + 3, + 2], + ["explorePremiumLicense", + 1, + 2, + 8, + 4], + ["undo", + 0, + 0, + 3, + 2], + ["_RegisterEventUndoChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventUndoChanged", + 0, + 2, + 3, + 4]], + [["createWorkbook", + "WorkbookCreated", + 1, + 10, + 5, + 0, + 0, + "_GetWorkbookCreatedById"], + ["_GetWorkbookCreatedById", + "WorkbookCreated", + 1, + 2, + 5, + 4]], + 0, + 0, + [["UndoChanged", + 0, + 3, + "MessageType.applicationUndoChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUndoChanged", + "_UnregisterEventUndoChanged"]]], + ["IterativeCalculation", + 0, + [["enabled", + 1], + ["maxIteration", + 1], + ["maxChange", + 1]]], + ["Workbook", + 0, + [["name", + 3, + 11], + ["readOnly", + 3, + 5], + ["isDirty", + 1, + 6], + ["use1904DateSystem", + 1, + 8], + ["chartDataPointTrack", + 1, + 6], + ["usePrecisionAsDisplayed", + 1, + 6], + ["calculationEngineVersion", + 3, + 6], + ["autoSave", + 3, + 6], + ["previouslySaved", + 3, + 6], + ["showPivotFieldList", + 0, + 8, + 0, + 2, + 12], + ["formulaReferenceStyle", + 2, + 3]], + [["worksheets", + "WorksheetCollection", + 19, + 0, + 0, + 4], + ["names", + "NamedItemCollection", + 19, + 0, + 0, + 4], + ["tables", + "TableCollection", + 19, + 0, + 0, + 4], + ["application", + "Application", + 2, + 0, + 0, + 4], + ["bindings", + "BindingCollection", + 19, + 0, + 0, + 4], + ["functions", + "Functions", + 2, + 13, + 0, + 4], + ["_V1Api", + "_V1Api", + 2, + 14, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 19, + 14, + 0, + 4], + ["settings", + "SettingCollection", + 19, + 15, + 0, + 4], + ["customXmlParts", + "CustomXmlPartCollection", + 19, + 16, + 0, + 4], + ["internalTest", + "InternalTest", + 2, + 9, + 0, + 4], + ["properties", + "DocumentProperties", + 35, + 11, + 0, + 4], + ["styles", + "StyleCollection", + 19, + 11, + 0, + 4], + ["protection", + "WorkbookProtection", + 3, + 11, + 0, + 4], + ["dataConnections", + "DataConnectionCollection", + 3, + 11, + 0, + 4], + ["_Runtime", + "Runtime", + 2, + 16, + 0, + 4], + ["comments", + "CommentCollection", + 19, + 17, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["tableStyles", + "TableStyleCollection", + 19, + 17, + 0, + 4], + ["pivotTableStyles", + "PivotTableStyleCollection", + 19, + 17, + 0, + 4], + ["slicerStyles", + "SlicerStyleCollection", + 19, + 17, + 0, + 4], + ["timelineStyles", + "TimelineStyleCollection", + 19, + 17, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["linkedDataTypes", + "LinkedDataTypeCollection", + 18, + 8, + 0, + 4], + ["queries", + "QueryCollection", + 18, + 18, + 0, + 4], + ["linkedWorkbooks", + "LinkedWorkbookCollection", + 18, + 19, + 0, + 4], + ["rangePicker", + "RangePicker", + 2, + 8, + 0, + 4, + 0, + 4], + ["lineageActivities", + "LineageActivityCollection", + 18, + 3, + 0, + 4], + ["businessBar", + "BusinessBar", + 2, + 8, + 0, + 4], + ["guidedReapply", + "GuidedReapplyManager", + 2, + 3, + 0, + 4], + ["vbaRecorder", + "VbaRecorder", + 2, + 8, + 0, + 4], + ["externalCodeService", + "ExternalCodeService", + 2, + 8, + 0, + 4], + ["augmentationLoop", + "AugmentationLoop", + 2, + 8, + 0, + 4]], + [["_RemoveReference", + 1, + 2], + ["_GetObjectByReferenceId", + 1, + 2, + 0, + 4], + ["_GetObjectTypeNameByReferenceId", + 1, + 2, + 0, + 4], + ["_RemoveAllReferences", + 0, + 2], + ["_GetReferenceCount", + 0, + 2, + 0, + 4], + ["getIsActiveCollabSession", + 0, + 0, + 6], + ["registerCustomFunctions", + 7, + 0, + 20, + 8], + ["_SetOsfControlContainerReadyForCustomFunctions", + 0, + 0, + 20], + ["close", + 1, + 0, + 7], + ["save", + 1, + 0, + 7], + ["_RegisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_UnregisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_RegisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_UnregisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_RegisterActivatedEvent", + 0, + 2, + 23], + ["_UnregisterActivatedEvent", + 0, + 2, + 23], + ["insertWorksheetsFromBase64", + 2, + 0, + 23], + ["enableOfficeScriptRecording", + 1, + 1, + 19], + ["recordAction", + 1, + 3, + 0, + 4], + ["focus", + 0, + 2, + 3, + 4], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["showHelp", + 1, + 2, + 3, + 4], + ["getLinkedEntityCellValue", + 1, + 2, + 24, + 4], + ["getThemeColors", + 0, + 2, + 8, + 4], + ["_RegisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["notifySDXLoaded", + 1, + 2, + 3, + 4], + ["openConditionalFormattingRulesManager", + 1, + 0, + 3], + ["openNameManager", + 0, + 0, + 3], + ["_RegisterEventActionRecorded", + 0, + 2, + 2, + 4], + ["_UnregisterEventActionRecorded", + 0, + 2, + 2, + 4]], + [["getSelectedRange", + "Range", + 0, + 10, + 0, + 4], + ["getActiveCell", + "Range", + 0, + 10, + 11, + 4], + ["_GetRangeForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["_GetRangeOrNullObjectForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["getActiveChart", + "Chart", + 0, + 2, + 6, + 4], + ["getActiveChartOrNullObject", + "Chart", + 0, + 2, + 6, + 4], + ["getSelectedRanges", + "RangeAreas", + 0, + 10, + 6, + 4], + ["_GetRangesForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["_GetRangesOrNullObjectForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["getActiveSlicer", + "Slicer", + 0, + 2, + 17, + 4], + ["getActiveSlicerOrNullObject", + "Slicer", + 0, + 2, + 17, + 4]], + 0, + 0, + [["ActionRecorded", + 0, + 2, + "MessageType.workbookActionRecordedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventActionRecorded", + "_UnregisterEventActionRecorded"], + ["Activated", + 0, + 23, + "MessageType.workbookActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["AutoSaveSettingChanged", + 0, + 6, + "MessageType.workbookAutoSaveSettingChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAutoSaveSettingChangedEvent", + "_UnregisterAutoSaveSettingChangedEvent"], + ["FormulaReferenceStyleChanged", + 0, + 3, + "MessageType.workbookFormulaReferenceStyleChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFormulaReferenceStyleChanged", + "_UnregisterEventFormulaReferenceStyleChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.workbookNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["RecordingStateChangedEvent", + 0, + 21, + "MessageType.recordingStateChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRecordingStateChangedEvent", + "_UnregisterRecordingStateChangedEvent"], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdDocumentSelectionChangedEvent", + "", + "", + ""], + ["WACOperationEvent", + 2, + 21, + "MessageType.wacoperationEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWACOperationEvent", + "_UnregisterWACOperationEvent"], + ["_Message", + 3, + 11, + "_CC.office10EventIdRichApiMessageEvent", + "", + "", + ""]]], + ["WorkbookProtection", + 0, + [["protected", + 3]], + 0, + [["protect", + 1], + ["unprotect", + 1]]], + ["WorkbookCreated", + 0, + [["id", + 3]], + 0, + [["open", + 0, + 2, + 0, + 4]]], + ["Worksheet", + 0, + [["name", + 1], + ["id", + 3], + ["position", + 1], + ["visibility", + 1], + ["tabColor", + 1, + 11, + 0, + 2, + 25], + ["standardWidth", + 1, + 11], + ["standardHeight", + 3, + 11], + ["showGridlines", + 5, + 5, + 0, + 2, + 26], + ["showHeadings", + 5, + 5], + ["enableCalculation", + 1, + 6], + ["tabId", + 3, + 18]], + [["charts", + "ChartCollection", + 83, + 0, + 0, + 4], + ["tables", + "TableCollection", + 83, + 0, + 0, + 4], + ["protection", + "WorksheetProtection", + 3, + 13, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 83, + 14, + 0, + 4], + ["names", + "NamedItemCollection", + 83, + 15, + 0, + 4], + ["freezePanes", + "WorksheetFreezePanes", + 3, + 11, + 0, + 4], + ["pageLayout", + "PageLayout", + 35, + 6, + 0, + 4], + ["visuals", + "VisualCollection", + 83, + 17, + 0, + 4], + ["shapes", + "ShapeCollection", + 83, + 6, + 0, + 4], + ["horizontalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["verticalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["comments", + "CommentCollection", + 83, + 17, + 0, + 4], + ["customProperties", + "WorksheetCustomPropertyCollection", + 19, + 27, + 0, + 4], + ["namedSheetViews", + "NamedSheetViewCollection", + 18, + 19, + 0, + 4], + ["optimization", + "WorksheetOptimization", + 2, + 8, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["visualTracker", + "VisualTracker", + 2, + 28, + 0, + 4], + ["rangeValuesPreview", + "RangeValuesPreview", + 66, + 8, + 0, + 4]], + [["delete"], + ["activate", + 0, + 2], + ["calculate", + 1, + 0, + 9], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_RegisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["replaceAll", + 3, + 0, + 6], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["showOutlineLevels", + 2, + 0, + 17], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getRange", + "Range", + 1, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRangeByIndexes", + "Range", + 4, + 10, + 11, + 4], + ["getPrevious", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getPreviousOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNext", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNextOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["_GetSheetById", + "Worksheet", + 1, + 2, + 11, + 4], + ["copy", + "Worksheet", + 2, + 0, + 11, + 0, + 0, + "_GetAnotherWorksheetById"], + ["_GetAnotherWorksheetById", + "Worksheet", + 1, + 0, + 11], + ["findAll", + "RangeAreas", + 2, + 10, + 6, + 4], + ["findAllOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getRanges", + "RangeAreas", + 1, + 10, + 6, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 0, + 3], + ["getRangeR1C1", + "Range", + 1, + 2, + 3, + 4], + ["getRangesR1C1", + "RangeAreas", + 1, + 2, + 3, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 0, + 3]], + "workbook.worksheets", + 0, + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "this.id", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 11, + "MessageType.worksheetDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "this.id", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "this.id", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "this.id", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "this.id", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.worksheetNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "this.id", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "this.id", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "this.id", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "this.id", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 11, + "MessageType.worksheetSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "this.id", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "this.id", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetCollection", + 1, + 0, + 0, + [["getCount", + 1, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 3, + 11], + ["_UnregisterAddedEvent", + 0, + 3, + 11], + ["_RegisterActivatedEvent", + 0, + 3, + 11], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 3, + 11], + ["_UnregisterDeletedEvent", + 0, + 3, + 11], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 3, + 6], + ["_UnregisterDataChangedEvent", + 0, + 3, + 6], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["addFromBase64", + 4, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 3, + 17], + ["_UnregisterRowSortedEvent", + 0, + 3, + 17], + ["_RegisterColumnSortedEvent", + 0, + 3, + 17], + ["_UnregisterColumnSortedEvent", + 0, + 3, + 17], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getItem", + "Worksheet", + 1, + 18, + 0, + 4], + ["add", + "Worksheet", + 1, + 8, + 0, + 2, + 0, + 0, + 29], + ["getActiveWorksheet", + "Worksheet", + 0, + 2, + 0, + 4], + ["getItemOrNullObject", + "Worksheet", + 1, + 2, + 15, + 4], + ["getFirst", + "Worksheet", + 1, + 10, + 16, + 4], + ["getLast", + "Worksheet", + 1, + 10, + 16, + 4]], + 0, + "Worksheet", + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 11, + "MessageType.worksheetAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 6, + "MessageType.worksheetDataChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 11, + "MessageType.worksheetDeletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["Moved", + 0, + 30, + "MessageType.worksheetMovedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventMoved", + "_UnregisterEventMoved"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 6, + "MessageType.worksheetSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetProtection", + 0, + [["protected", + 3], + ["options", + 3], + ["canPauseProtection", + 3, + 19], + ["isPasswordProtected", + 3, + 19], + ["isPaused", + 3, + 19], + ["savedOptions", + 3, + 19]], + [["allowEditRanges", + "AllowEditRangeCollection", + 19, + 19, + 0, + 4]], + [["protect", + 2, + 1], + ["unprotect", + 1], + ["checkPassword", + 1, + 2, + 19, + 4], + ["pauseProtection", + 1, + 0, + 19], + ["resumeProtection", + 0, + 0, + 19], + ["setPassword", + 1, + 0, + 19], + ["updateOptions", + 1, + 0, + 19]]], + ["WorksheetFreezePanes", + 0, + 0, + 0, + [["unfreeze"], + ["freezeAt", + 1], + ["freezeRows", + 1], + ["freezeColumns", + 1]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getLocationOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["Range", + 14, + [["numberFormat", + 5, + 0, + 0, + 2, + 31], + ["numberFormatLocal", + 1, + 11, + 0, + 2, + 31], + ["values", + 5, + 0, + 0, + 2, + 31], + ["text", + 3], + ["formulas", + 5, + 0, + 0, + 2, + 32], + ["formulasLocal", + 5, + 0, + 0, + 2, + 32], + ["rowIndex", + 3], + ["columnIndex", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["address", + 3], + ["addressLocal", + 3], + ["cellCount", + 3], + ["_ReferenceId", + 2], + ["valueTypes", + 3], + ["formulasR1C1", + 5, + 13], + ["hidden", + 3, + 13], + ["rowHidden", + 1, + 13, + 0, + 2, + 32], + ["columnHidden", + 1, + 13, + 0, + 2, + 32], + ["isEntireColumn", + 3, + 11], + ["isEntireRow", + 3, + 11], + ["hyperlink", + 1, + 11, + 0, + 2, + 33], + ["style", + 1, + 11, + 0, + 2, + 32], + ["linkedDataTypeState", + 3, + 6], + ["hasSpill", + 3, + 27], + ["top", + 3, + 17], + ["left", + 3, + 17], + ["height", + 3, + 17], + ["width", + 3, + 17], + ["savedAsArray", + 3, + 27], + ["numberFormatCategories", + 3, + 27], + ["valuesAsJson", + 5, + 24], + ["valuesAsJsonLocal", + 5, + 24], + ["addressR1C1", + 2, + 3]], + [["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["sort", + "RangeSort", + 3, + 13, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 9, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 5, + 0, + 4]], + [["clear", + 1, + 0, + 0, + 2, + 0, + 32], + ["delete", + 1, + 0, + 0, + 2, + 0, + 34], + ["select", + 0, + 2], + ["_KeepReference", + 0, + 2], + ["merge", + 1, + 0, + 13, + 2, + 0, + 32], + ["unmerge", + 0, + 0, + 13], + ["_ValidateArraySize", + 2, + 2, + 14, + 4], + ["calculate", + 0, + 0, + 9], + ["showCard", + 0, + 0, + 11], + ["getImage", + 0, + 2, + 11, + 4], + ["replaceAll", + 3, + 0, + 6, + 2, + 0, + 32], + ["copyFrom", + 4, + 0, + 6, + 2, + 0, + 26], + ["convertToLinkedDataType", + 2, + 0, + 6], + ["convertDataTypeToText", + 0, + 0, + 6], + ["setDirty", + 0, + 0, + 6], + ["getCellProperties", + 1, + 0, + 6], + ["getRowProperties", + 1, + 0, + 6], + ["getColumnProperties", + 1, + 0, + 6], + ["setCellProperties", + 1, + 0, + 6], + ["setRowProperties", + 1, + 0, + 6], + ["setColumnProperties", + 1, + 0, + 6], + ["autoFill", + 2, + 0, + 6], + ["showTeachingCallout", + 2, + 0, + 6], + ["flashFill", + 0, + 0, + 6], + ["group", + 1, + 0, + 17], + ["ungroup", + 1, + 0, + 17], + ["showGroupDetails", + 1, + 0, + 17], + ["hideGroupDetails", + 1, + 0, + 17], + ["moveTo", + 1, + 0, + 7, + 2, + 0, + 26], + ["getDataClassificationIds", + 0, + 2, + 19, + 4]], + [["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["insert", + "Range", + 1, + 8, + 0, + 2, + 0, + 0, + 34], + ["getEntireColumn", + "Range", + 0, + 10, + 0, + 4], + ["getEntireRow", + "Range", + 0, + 10, + 0, + 4], + ["getOffsetRange", + "Range", + 2, + 10, + 0, + 4], + ["getRow", + "Range", + 1, + 10, + 0, + 4], + ["getColumn", + "Range", + 1, + 10, + 0, + 4], + ["getIntersection", + "Range", + 1, + 10, + 0, + 4], + ["getBoundingRect", + "Range", + 1, + 10, + 0, + 4], + ["getLastCell", + "Range", + 0, + 10, + 0, + 4], + ["getLastColumn", + "Range", + 0, + 10, + 0, + 4], + ["getLastRow", + "Range", + 0, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRowsAbove", + "Range", + 1, + 11, + 14, + 4], + ["getRowsBelow", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsBefore", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsAfter", + "Range", + 1, + 11, + 14, + 4], + ["getResizedRange", + "Range", + 2, + 11, + 14, + 4], + ["getVisibleView", + "RangeView", + 0, + 2, + 14, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getSurroundingRegion", + "Range", + 0, + 10, + 11, + 4], + ["getAbsoluteResizedRange", + "Range", + 2, + 10, + 11, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 6, + 4], + ["find", + "Range", + 2, + 10, + 6, + 4], + ["findOrNullObject", + "Range", + 2, + 10, + 6, + 4], + ["removeDuplicates", + "RemoveDuplicatesResult", + 2, + 8, + 6, + 2, + 0, + 0, + 33], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpillingToRange", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParent", + "Range", + 0, + 10, + 27, + 4], + ["getSpillingToRangeOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParentOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getMergedAreas", + "RangeAreas", + 0, + 10, + 19, + 4], + ["getPivotTables", + "PivotTableScopedCollection", + 1, + 6, + 27, + 4], + ["getPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 18, + 4], + ["getDirectPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 27, + 4], + ["getDependents", + "WorkbookRangeAreas", + 0, + 10, + 35, + 4], + ["getDirectDependents", + "WorkbookRangeAreas", + 0, + 10, + 23, + 4], + ["getExtendedRange", + "Range", + 2, + 10, + 23, + 4], + ["getRangeEdge", + "Range", + 2, + 10, + 23, + 4], + ["getNumberFormatProperties", + "NumberFormatPropertyCollection", + 0, + 6, + 8, + 4], + ["getSurroundingDataRegion", + "Range", + 0, + 2, + 8, + 4], + ["getMergedAreasOrNullObject", + "RangeAreas", + 0, + 0, + 23, + 2, + 0, + 0, + 31]]], + ["RangeAreas", + 2, + [["_ReferenceId", + 2], + ["address", + 3], + ["addressLocal", + 3], + ["areaCount", + 3], + ["cellCount", + 3], + ["isEntireColumn", + 3], + ["isEntireRow", + 3], + ["style", + 1], + ["addressR1C1", + 2, + 3]], + [["areas", + "RangeCollection", + 19, + 0, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 0, + 0, + 4], + ["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2], + ["calculate"], + ["clear", + 1], + ["setDirty"], + ["copyFrom", + 4], + ["convertToLinkedDataType", + 2], + ["convertDataTypeToText"], + ["select", + 0, + 2, + 8]], + [["getEntireColumn", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getEntireRow", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getIntersection", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getOffsetRangeAreas", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 0, + 4], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 0, + 4]]], + ["WorkbookRangeAreas", + 2, + [["_ReferenceId", + 2], + ["addresses", + 3]], + [["ranges", + "RangeCollection", + 19, + 0, + 0, + 4], + ["areas", + "RangeAreasCollection", + 19, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2]], + [["getRangeAreasBySheet", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getRangeAreasOrNullObjectBySheet", + "RangeAreas", + 1, + 10, + 0, + 4]]], + ["RangeView", + 0, + [["numberFormat", + 1], + ["values", + 1], + ["text", + 3], + ["formulas", + 1], + ["formulasLocal", + 1], + ["formulasR1C1", + 1], + ["valueTypes", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["cellAddresses", + 3], + ["index", + 3], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["rows", + "RangeViewCollection", + 19, + 0, + 0, + 4]], + 0, + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["RangeViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "RangeView", + 1, + 2, + 0, + 4]], + 0, + "RangeView"], + ["SettingCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Setting", + 1, + 18, + 0, + 4], + ["add", + "Setting", + 2, + 9], + ["getItemOrNullObject", + "Setting", + 1, + 2, + 0, + 4]], + 0, + "Setting", + [["SettingsChanged", + 3, + 0, + "_CC.office10EventIdSettingsChangedEvent", + "", + "", + ""]]], + ["Setting", + 8, + [["key", + 3], + ["value", + 5], + ["_Id", + 2]], + 0, + [["delete"]]], + ["NamedItemCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "NamedItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "NamedItem", + 1, + 2, + 15, + 4], + ["add", + "NamedItem", + 3, + 8, + 15], + ["addFormulaLocal", + "NamedItem", + 3, + 0, + 15]], + 0, + "NamedItem", + [["Added", + 0, + 3, + "MessageType.namedItemAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.namedItemDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["NamedItem", + 0, + [["name", + 3], + ["type", + 3], + ["value", + 3], + ["visible", + 1], + ["_Id", + 2], + ["comment", + 1, + 15], + ["scope", + 3, + 15], + ["formula", + 1, + 11], + ["valueAsJson", + 3, + 24], + ["valueAsJsonLocal", + 3, + 24]], + [["worksheet", + "Worksheet", + 2, + 15, + 0, + 4], + ["worksheetOrNullObject", + "Worksheet", + 2, + 15, + 0, + 4], + ["arrayValues", + "NamedItemArrayValues", + 3, + 11, + 0, + 4]], + [["delete", + 0, + 0, + 15]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 15, + 4]]], + ["NamedItemArrayValues", + 0, + [["values", + 3], + ["types", + 3], + ["valuesAsJson", + 3, + 24], + ["valuesAsJsonLocal", + 3, + 24]]], + ["Binding", + 0, + [["id", + 3], + ["type", + 3]], + 0, + [["getText", + 0, + 2, + 0, + 4], + ["delete", + 0, + 0, + 14]], + [["getTable", + "Table", + 0, + 2, + 0, + 4], + ["getRange", + "Range", + 0, + 2, + 0, + 4]], + 0, + 0, + [["DataChanged", + 3, + 14, + "_CC.office10EventIdBindingDataChangedEvent", + "this.id", + "", + ""], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdBindingSelectionChangedEvent", + "this.id", + "", + ""]]], + ["BindingCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "Binding", + 1, + 18, + 0, + 4], + ["getItemAt", + "Binding", + 1, + 2, + 0, + 4], + ["add", + "Binding", + 3, + 8, + 14], + ["addFromNamedItem", + "Binding", + 3, + 0, + 14], + ["addFromSelection", + "Binding", + 2, + 0, + 14], + ["getItemOrNullObject", + "Binding", + 1, + 2, + 15, + 4]], + 0, + "Binding"], + ["TableCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1]], + [["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemAt", + "Table", + 1, + 2, + 0, + 4], + ["add", + "Table", + 2, + 8, + 0, + 2, + 0, + 0, + 33], + ["getItemOrNullObject", + "Table", + 1, + 2, + 15, + 4], + ["addQueryTable", + "Table", + 2, + 0, + 8]], + 0, + "Table", + [["Added", + 0, + 6, + "MessageType.tableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this._eventTargetId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Deleted", + 0, + 6, + "MessageType.tableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this._eventTargetId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"]]], + ["TableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getFirst", + "Table", + 0, + 10, + 0, + 4], + ["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Table", + 1, + 2, + 18, + 4]], + 0, + "Table"], + ["Table", + 24, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 26], + ["showHeaders", + 1, + 0, + 0, + 2, + 33], + ["showTotals", + 1, + 0, + 0, + 2, + 33], + ["style", + 1, + 0, + 0, + 2, + 33], + ["highlightFirstColumn", + 1, + 14, + 0, + 2, + 33], + ["highlightLastColumn", + 1, + 14, + 0, + 2, + 33], + ["showBandedRows", + 1, + 14, + 0, + 2, + 33], + ["showBandedColumns", + 1, + 14, + 0, + 2, + 33], + ["showFilterButton", + 1, + 14, + 0, + 2, + 33], + ["legacyId", + 3, + 5]], + [["columns", + "TableColumnCollection", + 19, + 0, + 0, + 4], + ["rows", + "TableRowCollection", + 19, + 0, + 0, + 4], + ["sort", + "TableSort", + 3, + 13, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["tableStyle", + "TableStyle", + 35, + 8, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearFilters", + 0, + 0, + 13], + ["reapplyFilters", + 0, + 0, + 13, + 2, + 0, + 26], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["clearStyle", + 0, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["resize", + 1, + 0, + 23, + 2, + 0, + 26], + ["setStyle", + 1, + 0, + 8]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4], + ["convertToRange", + "Range", + 0, + 8, + 13, + 2, + 0, + 0, + 26]], + "workbook.tables", + 0, + [["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["SelectionChanged", + 2, + 11, + "MessageType.tableSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["TableColumnCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "TableColumn", + 1, + 18, + 0, + 4], + ["getItemAt", + "TableColumn", + 1, + 2, + 0, + 4], + ["add", + "TableColumn", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["getItemOrNullObject", + "TableColumn", + 1, + 2, + 15, + 4], + ["addAsJson", + "TableColumn", + 3, + 0, + 24]], + 0, + "TableColumn"], + ["TableColumn", + 0, + [["id", + 3], + ["index", + 3], + ["values", + 1], + ["name", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["filter", + "Filter", + 3, + 13, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4]]], + ["TableRowCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["deleteRows", + 1, + 0, + 19], + ["deleteRowsAt", + 2, + 0, + 19, + 2, + 0, + 26]], + [["getItemAt", + "TableRow", + 1, + 2, + 0, + 4], + ["add", + "TableRow", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["addAsJson", + "TableRow", + 3, + 0, + 24]], + 0, + "TableRow"], + ["TableRow", + 0, + [["index", + 3], + ["values", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + 0, + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["DataValidation", + 0, + [["type", + 3], + ["rule", + 1], + ["prompt", + 1], + ["errorAlert", + 1], + ["ignoreBlanks", + 1], + ["valid", + 3]], + 0, + [["clear"]], + [["getInvalidCells", + "RangeAreas", + 0, + 10, + 6, + 4], + ["getInvalidCellsOrNullObject", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["RemoveDuplicatesResult", + 0, + [["removed", + 3], + ["uniqueRemaining", + 3]]], + ["RangeFormat", + 0, + [["wrapText", + 1, + 0, + 0, + 2, + 32], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 32], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 32], + ["columnWidth", + 1, + 13, + 0, + 2, + 32], + ["rowHeight", + 1, + 13, + 0, + 2, + 32], + ["textOrientation", + 1, + 11, + 0, + 2, + 32], + ["useStandardHeight", + 1, + 11], + ["useStandardWidth", + 1, + 11], + ["readingOrder", + 1, + 6], + ["shrinkToFit", + 1, + 6], + ["indentLevel", + 1, + 6, + 0, + 2, + 32], + ["autoIndent", + 1, + 6]], + [["fill", + "RangeFill", + 35, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["protection", + "FormatProtection", + 35, + 13, + 0, + 4]], + [["autofitColumns", + 0, + 0, + 13, + 2, + 0, + 32], + ["autofitRows", + 0, + 0, + 13, + 2, + 0, + 32], + ["adjustIndent", + 1, + 0, + 7, + 2, + 0, + 34]]], + ["FormatProtection", + 0, + [["locked", + 1], + ["formulaHidden", + 1]]], + ["RangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6], + ["patternTintAndShade", + 1, + 6], + ["pattern", + 1, + 6], + ["patternColor", + 1, + 6]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 32]]], + ["RangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 32], + ["weight", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6]]], + ["RangeBorderCollection", + 1, + [["count", + 3], + ["tintAndShade", + 1, + 6]], + 0, + 0, + [["getItem", + "RangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "RangeBorder", + 1, + 2, + 0, + 4]], + 0, + "RangeBorder"], + ["RangeFont", + 0, + [["name", + 1, + 0, + 0, + 2, + 32], + ["size", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 12], + ["italic", + 1, + 0, + 0, + 2, + 32], + ["bold", + 1, + 0, + 0, + 2, + 32], + ["underline", + 1, + 0, + 0, + 2, + 32], + ["strikethrough", + 1, + 6, + 0, + 2, + 32], + ["subscript", + 1, + 6], + ["superscript", + 1, + 6], + ["tintAndShade", + 1, + 6]]], + ["ChartCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29]], + [["add", + "Chart", + 3, + 9, + 0, + 2, + 0, + 0, + 36], + ["getItemAt", + "Chart", + 1, + 2, + 0, + 4], + ["_GetItem", + "Chart", + 1, + 18, + 0, + 4], + ["getItem", + "Chart", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Chart", + 1, + 2, + 15, + 4]], + 0, + "Chart", + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this._ParentObject.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 5, + "MessageType.chartAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this._ParentObject.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 5, + "MessageType.chartDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Chart", + 0, + [["name", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 36], + ["left", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["height", + 1, + 0, + 0, + 2, + 36], + ["id", + 3, + 11], + ["showAllFieldButtons", + 1, + 11, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 37], + ["showDataLabelsOverMaximum", + 1, + 5, + 0, + 2, + 37], + ["categoryLabelLevel", + 1, + 5, + 0, + 2, + 37], + ["style", + 1, + 5, + 0, + 2, + 37], + ["displayBlanksAs", + 1, + 5, + 0, + 2, + 37], + ["plotBy", + 1, + 5, + 0, + 2, + 37], + ["plotVisibleOnly", + 1, + 5, + 0, + 2, + 37], + ["seriesNameLevel", + 1, + 5, + 0, + 2, + 37]], + [["title", + "ChartTitle", + 35, + 0, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 0, + 0, + 4], + ["legend", + "ChartLegend", + 35, + 0, + 0, + 4], + ["series", + "ChartSeriesCollection", + 19, + 0, + 0, + 4], + ["axes", + "ChartAxes", + 35, + 0, + 0, + 4], + ["format", + "ChartAreaFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["plotArea", + "ChartPlotArea", + 35, + 5, + 0, + 4], + ["pivotOptions", + "ChartPivotOptions", + 35, + 6, + 0, + 4]], + [["setData", + 2, + 1, + 0, + 2, + 0, + 36], + ["delete", + 0, + 0, + 0, + 2, + 0, + 36], + ["setPosition", + 2, + 0, + 0, + 2, + 0, + 36], + ["getImage", + 3, + 2, + 13, + 4], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["activate", + 0, + 2, + 6], + ["getDataRange", + 0, + 0, + 28], + ["getDataRangeOrNullObject", + 0, + 0, + 28]], + [["getDataTable", + "ChartDataTable", + 0, + 2, + 18, + 4], + ["getDataTableOrNullObject", + "ChartDataTable", + 0, + 2, + 18, + 4]], + 0, + 0, + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["ChartPivotOptions", + 0, + [["showAxisFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showLegendFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showReportFilterFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showValueFieldButtons", + 1, + 0, + 0, + 2, + 37]]], + ["ChartAreaFormat", + 0, + [["roundedCorners", + 1, + 6, + 0, + 2, + 37], + ["colorScheme", + 1, + 6, + 0, + 2, + 37]], + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartSeriesCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartSeries", + 1, + 2, + 0, + 4], + ["add", + "ChartSeries", + 2, + 8, + 11, + 2, + 0, + 0, + 36]], + 0, + "ChartSeries"], + ["ChartSeries", + 0, + [["name", + 1, + 0, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 10], + ["hasDataLabels", + 1, + 11, + 0, + 2, + 37], + ["filtered", + 1, + 11, + 0, + 2, + 37], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["showShadow", + 1, + 11, + 0, + 2, + 37], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36], + ["smooth", + 1, + 11, + 0, + 2, + 37], + ["plotOrder", + 1, + 11, + 0, + 2, + 37], + ["gapWidth", + 1, + 11, + 0, + 2, + 36], + ["doughnutHoleSize", + 1, + 11, + 0, + 2, + 36], + ["axisGroup", + 1, + 5, + 0, + 2, + 36], + ["explosion", + 1, + 5, + 0, + 2, + 37], + ["firstSliceAngle", + 1, + 5, + 0, + 2, + 37], + ["invertIfNegative", + 1, + 5, + 0, + 2, + 37], + ["bubbleScale", + 1, + 6, + 0, + 2, + 37], + ["secondPlotSize", + 1, + 5, + 0, + 2, + 37], + ["splitType", + 1, + 5, + 0, + 2, + 37], + ["splitValue", + 1, + 6, + 0, + 2, + 37], + ["varyByCategories", + 1, + 5, + 0, + 2, + 37], + ["showLeaderLines", + 1, + 6, + 0, + 2, + 37], + ["overlap", + 1, + 5, + 0, + 2, + 36], + ["gradientStyle", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointType", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumColor", + 1, + 6, + 0, + 2, + 37], + ["parentLabelStrategy", + 1, + 6, + 0, + 2, + 37], + ["showConnectorLines", + 1, + 6, + 0, + 2, + 37], + ["invertColor", + 1, + 6, + 0, + 2, + 37]], + [["points", + "ChartPointsCollection", + 19, + 0, + 0, + 4], + ["format", + "ChartSeriesFormat", + 35, + 0, + 0, + 4], + ["trendlines", + "ChartTrendlineCollection", + 19, + 11, + 0, + 4], + ["xErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["yErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 5, + 0, + 4], + ["binOptions", + "ChartBinOptions", + 35, + 6, + 0, + 4], + ["mapOptions", + "ChartMapOptions", + 35, + 6, + 0, + 4], + ["boxwhiskerOptions", + "ChartBoxwhiskerOptions", + 35, + 6, + 0, + 4]], + [["delete", + 0, + 0, + 11, + 2, + 0, + 36], + ["setXAxisValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setBubbleSizes", + 1, + 0, + 11, + 2, + 0, + 37], + ["getDimensionValues", + 1, + 0, + 27, + 2, + 0, + 37], + ["getDimensionDataSourceString", + 1, + 0, + 35], + ["getDimensionDataSourceType", + 1, + 0, + 35]]], + ["ChartSeriesFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartPointsCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartPoint", + 1, + 2, + 0, + 4]], + 0, + "ChartPoint"], + ["ChartPoint", + 0, + [["value", + 3], + ["hasDataLabel", + 1, + 11, + 0, + 2, + 37], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36]], + [["format", + "ChartPointFormat", + 35, + 0, + 0, + 4], + ["dataLabel", + "ChartDataLabel", + 35, + 11, + 0, + 4]]], + ["ChartPointFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartAxes", + 0, + 0, + [["categoryAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["seriesAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["valueAxis", + "ChartAxis", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ChartAxis", + 2, + 2, + 11, + 4]]], + ["ChartAxis", + 0, + [["majorUnit", + 1, + 0, + 0, + 2, + 37], + ["maximum", + 1, + 0, + 0, + 2, + 36], + ["minimum", + 1, + 0, + 0, + 2, + 36], + ["minorUnit", + 1, + 0, + 0, + 2, + 37], + ["displayUnit", + 1, + 11, + 0, + 2, + 36], + ["showDisplayUnitLabel", + 1, + 11, + 0, + 2, + 37], + ["customDisplayUnit", + 3, + 11], + ["type", + 3, + 11], + ["minorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["majorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["baseTimeUnit", + 1, + 11, + 0, + 2, + 37], + ["categoryType", + 1, + 11, + 0, + 2, + 37], + ["axisGroup", + 3, + 11], + ["scaleType", + 1, + 11, + 0, + 2, + 37], + ["logBase", + 1, + 11, + 0, + 2, + 37], + ["left", + 3, + 11], + ["top", + 3, + 11], + ["height", + 3, + 11], + ["width", + 3, + 11], + ["reversePlotOrder", + 1, + 11, + 0, + 2, + 36], + ["crosses", + 1, + 11, + 0, + 2, + 36], + ["crossesAt", + 3, + 11], + ["visible", + 1, + 11, + 0, + 2, + 37], + ["isBetweenCategories", + 1, + 5, + 0, + 2, + 36], + ["majorTickMark", + 1, + 11, + 0, + 2, + 37], + ["minorTickMark", + 1, + 11, + 0, + 2, + 37], + ["tickMarkSpacing", + 1, + 11, + 0, + 2, + 37], + ["tickLabelPosition", + 1, + 11, + 0, + 2, + 36], + ["tickLabelSpacing", + 1, + 11, + 0, + 2, + 37], + ["alignment", + 1, + 5, + 0, + 2, + 37], + ["multiLevel", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["offset", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["position", + 1, + 5, + 0, + 2, + 36], + ["positionAt", + 3, + 5]], + [["majorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["minorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["title", + "ChartAxisTitle", + 35, + 0, + 0, + 4], + ["format", + "ChartAxisFormat", + 35, + 0, + 0, + 4]], + [["setCategoryNames", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCustomDisplayUnit", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCrossesAt", + 1, + 0, + 11, + 2, + 0, + 37], + ["setPositionAt", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4]]], + ["ChartAxisTitle", + 0, + [["text", + 1, + 0, + 0, + 2, + 36], + ["visible", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 27, + 0, + 2, + 37]], + [["format", + "ChartAxisTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataLabels", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataLabel", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 5, + 0, + 2, + 37], + ["left", + 1, + 5, + 0, + 2, + 37], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["formula", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["text", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 5, + 0, + 4]], + 0, + [["getSubstring", + "ChartFormatString", + 2, + 2, + 8, + 4]]], + ["ChartDataLabelFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataTable", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showHorizontalBorder", + 1, + 0, + 0, + 2, + 37], + ["showVerticalBorder", + 1, + 0, + 0, + 2, + 37], + ["showOutlineBorder", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartDataTableFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataTableFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4]]], + ["ChartErrorBars", + 0, + [["endStyleCap", + 1, + 0, + 0, + 2, + 37], + ["include", + 1, + 0, + 0, + 2, + 37], + ["type", + 1, + 0, + 0, + 2, + 37], + ["visible", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartErrorBarsFormat", + 35, + 0, + 0, + 4]]], + ["ChartErrorBarsFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlines", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36]], + [["format", + "ChartGridlinesFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlinesFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartLegend", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36], + ["position", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["width", + 1, + 11, + 0, + 2, + 37], + ["height", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartLegendFormat", + 35, + 0, + 0, + 4], + ["legendEntries", + "ChartLegendEntryCollection", + 19, + 11, + 0, + 4]]], + ["ChartLegendEntry", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["left", + 3, + 5], + ["top", + 3, + 5], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["index", + 3, + 5]]], + ["ChartLegendEntryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "ChartLegendEntry", + 1, + 2, + 0, + 4]], + 0, + "ChartLegendEntry"], + ["ChartLegendFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartMapOptions", + 0, + [["level", + 1, + 0, + 0, + 2, + 37], + ["labelStrategy", + 1, + 0, + 0, + 2, + 37], + ["projectionType", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTitle", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["width", + 3, + 11], + ["height", + 3, + 11], + ["verticalAlignment", + 1, + 11, + 0, + 2, + 37], + ["textOrientation", + 1, + 11, + 0, + 2, + 37], + ["position", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 11, + 2, + 0, + 37]], + [["getSubstring", + "ChartFormatString", + 2, + 2, + 11, + 4]]], + ["ChartFormatString", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartFill", + 4, + 0, + 0, + [["setSolidColor", + 1, + 0, + 0, + 2, + 0, + 36], + ["clear", + 0, + 0, + 0, + 2, + 0, + 37], + ["getSolidColor", + 0, + 0, + 24, + 2, + 0, + 37]]], + ["ChartBorder", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 0, + 0, + 2, + 36], + ["weight", + 1, + 0, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 5, + 2, + 0, + 37]]], + ["ChartBinOptions", + 0, + [["type", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["count", + 1, + 0, + 0, + 2, + 36], + ["allowOverflow", + 1, + 0, + 0, + 2, + 37], + ["allowUnderflow", + 1, + 0, + 0, + 2, + 37], + ["overflowValue", + 1, + 0, + 0, + 2, + 36], + ["underflowValue", + 1, + 0, + 0, + 2, + 36]]], + ["ChartBoxwhiskerOptions", + 0, + [["showInnerPoints", + 1, + 0, + 0, + 2, + 37], + ["showOutlierPoints", + 1, + 0, + 0, + 2, + 37], + ["showMeanMarker", + 1, + 0, + 0, + 2, + 37], + ["showMeanLine", + 1, + 0, + 0, + 2, + 37], + ["quartileCalculation", + 1, + 0, + 0, + 2, + 37]]], + ["ChartLineFormat", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 11, + 0, + 2, + 36], + ["weight", + 1, + 11, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartFont", + 0, + [["bold", + 1, + 0, + 0, + 2, + 37], + ["color", + 1, + 0, + 0, + 2, + 36], + ["italic", + 1, + 0, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["size", + 1, + 0, + 0, + 2, + 37], + ["underline", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTrendline", + 0, + [["type", + 1, + 0, + 0, + 2, + 37], + ["polynomialOrder", + 1, + 0, + 0, + 2, + 37], + ["movingAveragePeriod", + 1, + 0, + 0, + 2, + 37], + ["_Id", + 2], + ["showEquation", + 1, + 5, + 0, + 2, + 37], + ["showRSquared", + 1, + 5, + 0, + 2, + 37], + ["forwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["backwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["intercept", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartTrendlineFormat", + 35, + 0, + 0, + 4], + ["label", + "ChartTrendlineLabel", + 35, + 5, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartTrendlineCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "ChartTrendline", + 1, + 8, + 0, + 2, + 0, + 0, + 36], + ["getItem", + "ChartTrendline", + 1, + 18, + 0, + 4]], + 0, + "ChartTrendline"], + ["ChartTrendlineFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabel", + 0, + [["top", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 0, + 0, + 2, + 37], + ["width", + 3], + ["height", + 3], + ["formula", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 37], + ["autoText", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 0, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37]], + [["format", + "ChartTrendlineLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabelFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartPlotArea", + 0, + [["left", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 37], + ["width", + 1, + 0, + 0, + 2, + 37], + ["height", + 1, + 0, + 0, + 2, + 37], + ["insideLeft", + 1, + 0, + 0, + 2, + 37], + ["insideTop", + 1, + 0, + 0, + 2, + 37], + ["insideWidth", + 1, + 0, + 0, + 2, + 37], + ["insideHeight", + 1, + 0, + 0, + 2, + 37], + ["position", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartPlotAreaFormat", + 35, + 0, + 0, + 4]]], + ["ChartPlotAreaFormat", + 0, + 0, + [["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4]]], + ["VisualCollection", + 5, + 0, + 0, + [["getDefinitions", + 0, + 2, + 0, + 4], + ["getPreview", + 4, + 2, + 0, + 4], + ["bootstrapAgaveVisual", + 0, + 0, + 0, + 2], + ["getCount", + 0, + 2, + 0, + 4], + ["_RegisterSelectionChangedEvent", + 0, + 2], + ["_UnregisterSelectionChangedEvent", + 0, + 2]], + [["add", + "Visual", + 3, + 8, + 0, + 2], + ["_GetItem", + "Visual", + 1, + 18, + 0, + 4], + ["getSelectedOrNullObject", + "Visual", + 0, + 2, + 0, + 4]], + 0, + "Visual", + [["AgaveVisualUpdate", + 2, + 0, + "MessageType.agaveVisualUpdateEvent", + "", + "null", + "null"], + ["SelectionChanged", + 0, + 0, + "MessageType.visualSelectionChangedEvent", + "this._ParentObject.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["Visual", + 0, + [["id", + 3], + ["isSupportedInVisualTaskpane", + 3]], + [["properties", + "VisualPropertyCollection", + 18, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2], + ["getProperty", + 1, + 2, + 0, + 4], + ["setProperty", + 2, + 0, + 0, + 2], + ["changeDataSource", + 2, + 0, + 0, + 2], + ["getDataSource", + 0, + 2, + 0, + 4], + ["setPropertyToDefault", + 1, + 0, + 0, + 2], + ["_RegisterChangeEvent", + 0, + 2], + ["_UnregisterChangeEvent", + 0, + 2], + ["serializeProperties", + 0, + 2, + 0, + 4], + ["deserializeProperties", + 1, + 0, + 0, + 2], + ["addChildProperty", + 2, + 0, + 19, + 2], + ["removeChildProperty", + 2, + 0, + 19, + 2], + ["getDataFieldAssignments", + 0, + 0, + 3], + ["getDataConfig", + 0, + 2, + 3, + 4], + ["modifyDataConfig", + 1, + 0, + 3, + 2]], + [["getChildProperties", + "VisualPropertyCollection", + 2, + 6, + 0, + 4], + ["getDataControllerClient", + "DataControllerClient", + 0, + 2, + 0, + 4], + ["getElementChildProperties", + "VisualPropertyCollection", + 3, + 6, + 0, + 4]], + 0, + 0, + [["ChangeNotification", + 2, + 0, + "MessageType.visualChangeEvent", + "this.id", + "_RegisterChangeEvent", + "_UnregisterChangeEvent"]]], + ["VisualProperty", + 0, + [["type", + 3], + ["value", + 3], + ["id", + 3], + ["localizedName", + 3], + ["options", + 3], + ["localizedOptions", + 3], + ["hasDefault", + 3], + ["isDefault", + 3], + ["min", + 3], + ["max", + 3], + ["stepSize", + 3], + ["hideMeButShowChildrenUI", + 3], + ["expandableUI", + 3], + ["nextPropOnSameLine", + 3], + ["showResetUI", + 3], + ["size", + 3, + 19], + ["minSize", + 3, + 19], + ["maxSize", + 3, + 19], + ["index", + 3, + 19], + ["parentName", + 3, + 19]], + 0, + [["getBoolMetaProperty", + 1, + 2, + 0, + 4]]], + ["VisualPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "VisualProperty", + 1, + 18, + 0, + 4], + ["getItemAt", + "VisualProperty", + 1, + 2, + 0, + 4]], + 0, + "VisualProperty"], + ["DataControllerClient", + 0, + 0, + 0, + [["getWells", + 0, + 2, + 0, + 4], + ["getAssociatedFields", + 1, + 2, + 0, + 4], + ["getAvailableFields", + 1, + 2, + 0, + 4], + ["addField", + 3, + 0, + 0, + 2], + ["removeField", + 2, + 0, + 0, + 2], + ["moveField", + 3, + 0, + 0, + 2]]], + ["RangeSort", + 0, + 0, + 0, + [["apply", + 5, + 0, + 0, + 2, + 0, + 32]]], + ["TableSort", + 0, + [["matchCase", + 3], + ["method", + 3], + ["fields", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 26], + ["clear"], + ["reapply"]]], + ["Filter", + 0, + [["criteria", + 3]], + 0, + [["apply", + 1], + ["clear", + 0, + 0, + 0, + 2, + 0, + 34], + ["applyBottomItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyBottomPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCellColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyDynamicFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyFontColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyValuesFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyIconFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCustomFilter", + 3, + 0, + 0, + 2, + 0, + 34]]], + ["AutoFilter", + 0, + [["enabled", + 3], + ["isDataFiltered", + 3], + ["criteria", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 33], + ["reapply", + 0, + 0, + 0, + 2, + 0, + 26], + ["remove", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearCriteria", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearColumnCriteria", + 1, + 0, + 18]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["CultureInfo", + 0, + [["name", + 3]], + [["numberFormat", + "NumberFormatInfo", + 3, + 0, + 0, + 4], + ["datetimeFormat", + "DatetimeFormatInfo", + 3, + 27, + 0, + 4]]], + ["NumberFormatInfo", + 0, + [["numberDecimalSeparator", + 3], + ["numberGroupSeparator", + 3], + ["currencySymbol", + 3, + 30]]], + ["DatetimeFormatInfo", + 0, + [["dateSeparator", + 3], + ["longDatePattern", + 3], + ["shortDatePattern", + 3], + ["timeSeparator", + 3], + ["longTimePattern", + 3]]], + ["CustomXmlPartScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4], + ["getOnlyItem", + "CustomXmlPart", + 0, + 2, + 0, + 4], + ["getOnlyItemOrNullObject", + "CustomXmlPart", + 0, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPartCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["add", + "CustomXmlPart", + 1, + 8], + ["getByNamespace", + "CustomXmlPartScopedCollection", + 1, + 6, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPart", + 0, + [["id", + 3], + ["namespaceUri", + 3]], + 0, + [["delete"], + ["getXml", + 0, + 2, + 0, + 4], + ["setXml", + 1]]], + ["_V1Api", + 0, + 0, + 0, + [["bindingGetData", + 1, + 2, + 0, + 4], + ["getSelectedData", + 1, + 2, + 0, + 4], + ["gotoById", + 1, + 2, + 0, + 4], + ["bindingAddFromSelection", + 1, + 2], + ["bindingGetById", + 1, + 2, + 0, + 4], + ["bindingReleaseById", + 1, + 2], + ["bindingGetAll", + 0, + 2, + 0, + 4], + ["bindingAddFromNamedItem", + 1, + 2], + ["bindingAddFromPrompt", + 1, + 2], + ["bindingDeleteAllDataValues", + 1], + ["setSelectedData", + 1], + ["bindingClearFormats", + 1], + ["bindingSetData", + 1], + ["bindingSetFormats", + 1], + ["bindingSetTableOptions", + 1], + ["bindingAddRows", + 1], + ["bindingAddColumns", + 1], + ["getFilePropertiesAsync", + 0, + 2, + 9, + 4]]], + ["PivotTableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getFirst", + "PivotTable", + 0, + 10, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 0, + 4], + ["getFirstOrNullObject", + "PivotTable", + 0, + 2, + 35, + 4]], + 0, + "PivotTable"], + ["PivotTableCollection", + 5, + 0, + 0, + [["refreshAll", + 0, + 0, + 0, + 2, + 0, + 12], + ["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 15, + 4], + ["add", + "PivotTable", + 3, + 8, + 5, + 2, + 0, + 0, + 12]], + 0, + "PivotTable", + [["Added", + 0, + 3, + "MessageType.pivotTableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.pivotTableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["PivotTable", + 0, + [["name", + 1, + 0, + 0, + 2, + 12], + ["id", + 3, + 16], + ["useCustomSortLists", + 1, + 6, + 0, + 2, + 12], + ["enableDataValueEditing", + 1, + 6, + 0, + 2, + 12], + ["refreshOnOpen", + 0, + 23, + 0, + 2, + 29], + ["allowMultipleFiltersPerField", + 0, + 27, + 0, + 2, + 12]], + [["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["hierarchies", + "PivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["rowHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["columnHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["dataHierarchies", + "DataPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["filterHierarchies", + "FilterPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["layout", + "PivotLayout", + 2, + 5, + 0, + 4]], + [["refresh", + 0, + 0, + 0, + 2, + 0, + 12], + ["delete", + 0, + 0, + 5, + 2, + 0, + 12], + ["getDataSourceString", + 0, + 2, + 35, + 4], + ["getDataSourceType", + 0, + 2, + 35, + 4]], + [["addDateGroup", + "PivotHierarchy", + 2, + 0, + 8, + 2, + 0, + 0, + 38]]], + ["PivotLayout", + 0, + [["showColumnGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["showRowGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["enableFieldList", + 1, + 17, + 0, + 2, + 12], + ["subtotalLocation", + 1, + 0, + 0, + 2, + 12], + ["layoutType", + 1, + 0, + 0, + 2, + 12], + ["autoFormat", + 1, + 6, + 0, + 2, + 12], + ["preserveFormatting", + 1, + 6, + 0, + 2, + 12], + ["altTextDescription", + 0, + 23, + 0, + 2, + 29], + ["altTextTitle", + 0, + 23, + 0, + 2, + 29], + ["emptyCellText", + 0, + 23, + 0, + 2, + 29], + ["fillEmptyCells", + 0, + 23, + 0, + 2, + 29], + ["showFieldHeaders", + 0, + 23, + 0, + 2, + 29], + ["tabularValues", + 3, + 8], + ["tabularText", + 3, + 8], + ["tabularNumberFormat", + 3, + 8], + ["tabularNumberFormatLocal", + 3, + 8]], + [["pivotStyle", + "PivotTableStyle", + 35, + 8, + 0, + 4]], + [["setAutoSortOnCell", + 2, + 0, + 6, + 2, + 0, + 12], + ["setStyle", + 1, + 0, + 8, + 2, + 0, + 12], + ["displayBlankLineAfterEachItem", + 1, + 0, + 23, + 2, + 0, + 29], + ["repeatAllItemLabels", + 1, + 0, + 23, + 2, + 0, + 29]], + [["getRange", + "Range", + 0, + 3], + ["getRowLabelRange", + "Range", + 0, + 3], + ["getColumnLabelRange", + "Range", + 0, + 3], + ["getFilterAxisRange", + "Range", + 0, + 3], + ["getDataBodyRange", + "Range", + 0, + 3], + ["getCell", + "Range", + 3, + 2, + 8], + ["getPivotItems", + "PivotItemCollection", + 2, + 4, + 6], + ["getDataHierarchy", + "DataPivotHierarchy", + 1, + 3, + 6]]], + ["PivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotHierarchy", + 1, + 2, + 0, + 4]], + 0, + "PivotHierarchy"], + ["PivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]]], + ["RowColumnPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "RowColumnPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "RowColumnPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "RowColumnPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "RowColumnPivotHierarchy"], + ["RowColumnPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["FilterPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "FilterPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "FilterPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "FilterPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "FilterPivotHierarchy"], + ["FilterPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["enableMultipleFilterItems", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["DataPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "DataPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DataPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "DataPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "DataPivotHierarchy"], + ["DataPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["numberFormat", + 1, + 0, + 0, + 2, + 12], + ["summarizeBy", + 1, + 0, + 0, + 2, + 12], + ["showAs", + 1, + 0, + 0, + 2, + 12]], + [["field", + "PivotField", + 35, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["PivotFieldCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotField", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotField", + 1, + 2, + 0, + 4]], + 0, + "PivotField"], + ["PivotField", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["subtotals", + 1, + 0, + 0, + 2, + 12], + ["showAllItems", + 1, + 0, + 0, + 2, + 12]], + [["items", + "PivotItemCollection", + 19, + 0, + 0, + 4]], + [["sortByLabels", + 1, + 1, + 0, + 2, + 0, + 12], + ["sortByValues", + 3, + 0, + 6, + 2, + 0, + 12], + ["applyFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["clearAllFilters", + 0, + 0, + 27, + 2, + 0, + 12], + ["clearFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["getFilters", + 0, + 0, + 27], + ["isFiltered", + 1, + 0, + 27]]], + ["PivotItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotItem", + 1, + 2, + 0, + 4]], + 0, + "PivotItem"], + ["PivotItem", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["isExpanded", + 1, + 0, + 0, + 2, + 12], + ["visible", + 1, + 0, + 0, + 2, + 12]]], + ["WorksheetCustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["_Id", + 2]], + 0, + [["delete"]]], + ["WorksheetCustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "WorksheetCustomProperty", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "WorksheetCustomProperty", + 1], + ["add", + "WorksheetCustomProperty", + 2, + 8]], + 0, + "WorksheetCustomProperty"], + ["DocumentProperties", + 0, + [["title", + 1], + ["subject", + 1], + ["author", + 1], + ["keywords", + 1], + ["comments", + 1], + ["lastAuthor", + 3], + ["revisionNumber", + 1], + ["creationDate", + 11], + ["category", + 1], + ["manager", + 1], + ["company", + 1]], + [["custom", + "CustomPropertyCollection", + 19, + 0, + 0, + 4]]], + ["CustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["type", + 3]], + 0, + [["delete"]]], + ["CustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["deleteAll"]], + [["getItemOrNullObject", + "CustomProperty", + 1, + 2, + 0, + 4], + ["add", + "CustomProperty", + 2, + 8], + ["getItem", + "CustomProperty", + 1, + 18, + 0, + 4]], + 0, + "CustomProperty"], + ["ConditionalFormatCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["clearAll", + 0, + 0, + 0, + 2, + 0, + 39]], + [["getItemAt", + "ConditionalFormat", + 1, + 2, + 0, + 4], + ["add", + "ConditionalFormat", + 1, + 8, + 0, + 2, + 0, + 0, + 39], + ["getItem", + "ConditionalFormat", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "ConditionalFormat", + 1, + 2, + 18, + 4]], + 0, + "ConditionalFormat"], + ["ConditionalFormat", + 0, + [["stopIfTrue", + 1], + ["priority", + 1], + ["type", + 3], + ["id", + 3]], + [["dataBarOrNullObject", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["dataBar", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["customOrNullObject", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["custom", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSet", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSetOrNullObject", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScale", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScaleOrNullObject", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottom", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottomOrNullObject", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["preset", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["presetOrNullObject", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparison", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparisonOrNullObject", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValue", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValueOrNullObject", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 40], + ["changeRuleToCellValue", + 1, + 0, + 30], + ["changeRuleToColorScale", + 0, + 0, + 30], + ["changeRuleToContainsText", + 1, + 0, + 30], + ["changeRuleToCustom", + 1, + 0, + 30], + ["changeRuleToDataBar", + 0, + 0, + 30], + ["changeRuleToIconSet", + 0, + 0, + 30], + ["changeRuleToPresetCriteria", + 1, + 0, + 30], + ["changeRuleToTopBottom", + 1, + 0, + 30], + ["setRanges", + 1, + 0, + 30]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getRanges", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["DataBarConditionalFormat", + 0, + [["showDataBarOnly", + 1, + 0, + 0, + 2, + 40], + ["barDirection", + 1, + 0, + 0, + 2, + 41], + ["axisFormat", + 1, + 0, + 0, + 2, + 41], + ["axisColor", + 1, + 0, + 0, + 2, + 41], + ["lowerBoundRule", + 1, + 0, + 0, + 2, + 41], + ["upperBoundRule", + 1, + 0, + 0, + 2, + 41]], + [["positiveFormat", + "ConditionalDataBarPositiveFormat", + 35, + 0, + 0, + 4], + ["negativeFormat", + "ConditionalDataBarNegativeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalDataBarPositiveFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["gradientFill", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40]]], + ["ConditionalDataBarNegativeFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveFillColor", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveBorderColor", + 1, + 0, + 0, + 2, + 40]]], + ["CustomConditionalFormat", + 0, + 0, + [["rule", + "ConditionalFormatRule", + 35, + 0, + 0, + 4], + ["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalFormatRule", + 0, + [["formula", + 1, + 0, + 0, + 2, + 41], + ["formulaLocal", + 1], + ["formulaR1C1", + 1]]], + ["IconSetConditionalFormat", + 0, + [["reverseIconOrder", + 1, + 0, + 0, + 2, + 41], + ["showIconOnly", + 1, + 0, + 0, + 2, + 41], + ["style", + 1, + 0, + 0, + 2, + 41], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["ColorScaleConditionalFormat", + 0, + [["threeColorScale", + 3], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["TopBottomConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["PresetCriteriaConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["TextConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["CellValueConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalRangeFormat", + 0, + [["numberFormat", + 1]], + [["fill", + "ConditionalRangeFill", + 35, + 0, + 0, + 4], + ["font", + "ConditionalRangeFont", + 35, + 0, + 0, + 4], + ["borders", + "ConditionalRangeBorderCollection", + 51, + 0, + 0, + 4]], + [["clearFormat", + 0, + 0, + 30]]], + ["ConditionalRangeFont", + 0, + [["color", + 1, + 0, + 0, + 2, + 42], + ["italic", + 1, + 0, + 0, + 2, + 42], + ["bold", + 1, + 0, + 0, + 2, + 42], + ["underline", + 1, + 0, + 0, + 2, + 42], + ["strikethrough", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 42], + ["color", + 1, + 0, + 0, + 2, + 42]]], + ["ConditionalRangeBorderCollection", + 1, + [["count", + 3]], + [["top", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["bottom", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["left", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["right", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ConditionalRangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "ConditionalRangeBorder", + 1, + 2, + 0, + 4]], + 0, + "ConditionalRangeBorder"], + ["NumberFormattingService", + 0, + 0, + 0, + 0, + [["getFormatter", + "NumberFormatter", + 1, + 3]], + 0, + 0, + 0, + "Microsoft.ExcelServices.NumberFormattingService", + 4], + ["NumberFormatter", + 0, + [["isDateTime", + 3], + ["isPercent", + 3], + ["isCurrency", + 3], + ["isNumeric", + 3], + ["isText", + 3], + ["hasYear", + 3], + ["hasMonth", + 3], + ["hasDayOfWeek", + 3]], + 0, + [["format", + 1, + 3]]], + ["CustomFunctionManager", + 36, + [["status", + 2]], + 0, + [["register", + 2]], + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.CustomFunctionManager", + 4], + ["Style", + 0, + [["builtIn", + 3], + ["formulaHidden", + 1], + ["horizontalAlignment", + 1], + ["includeAlignment", + 1], + ["includeBorder", + 1], + ["includeFont", + 1], + ["includeNumber", + 1], + ["includePatterns", + 1], + ["includeProtection", + 1], + ["indentLevel", + 1], + ["locked", + 1], + ["name", + 3], + ["numberFormat", + 1], + ["numberFormatLocal", + 1], + ["readingOrder", + 1], + ["shrinkToFit", + 1], + ["verticalAlignment", + 1], + ["wrapText", + 1], + ["textOrientation", + 5, + 5], + ["autoIndent", + 1, + 5]], + [["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["fill", + "RangeFill", + 35, + 0, + 0, + 4]], + [["delete"]]], + ["StyleCollection", + 1, + 0, + 0, + [["add", + 1], + ["getCount", + 0, + 2, + 6, + 4]], + [["getItem", + "Style", + 1, + 18, + 0, + 4], + ["getItemAt", + "Style", + 1, + 2, + 6, + 4], + ["getItemOrNullObject", + "Style", + 1, + 2, + 18, + 4]], + 0, + "Style"], + ["TableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TableStyle", + 1, + 2, + 0, + 4], + ["add", + "TableStyle", + 2, + 8], + ["getDefault", + "TableStyle"]], + 0, + "TableStyle"], + ["TableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TableStyle"]]], + ["PivotTableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "PivotTableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTableStyle", + 1, + 2, + 0, + 4], + ["add", + "PivotTableStyle", + 2, + 8], + ["getDefault", + "PivotTableStyle"]], + 0, + "PivotTableStyle"], + ["PivotTableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "PivotTableStyle"]]], + ["SlicerStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "SlicerStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerStyle", + 1, + 2, + 0, + 4], + ["add", + "SlicerStyle", + 2, + 8], + ["getDefault", + "SlicerStyle"]], + 0, + "SlicerStyle"], + ["SlicerStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "SlicerStyle"]]], + ["TimelineStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TimelineStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TimelineStyle", + 1, + 2, + 0, + 4], + ["add", + "TimelineStyle", + 2, + 8], + ["getDefault", + "TimelineStyle"]], + 0, + "TimelineStyle"], + ["TimelineStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TimelineStyle"]]], + ["InternalTest", + 0, + 0, + 0, + [["delay", + 1], + ["triggerMessage", + 4, + 0, + 11], + ["_RegisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEvent", + 2, + 0, + 11], + ["triggerPostProcess", + 0, + 0, + 11], + ["_RegisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEventWithFilter", + 3, + 0, + 11], + ["firstPartyMethod", + 0, + 2, + 11, + 5], + ["_RegisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_RegisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["unregisterAllCustomFunctionExecutionEvents", + 0, + 0, + 20], + ["updateRangeValueOnCurrentSheet", + 2, + 0, + 3, + 2], + ["triggerUserUndo", + 0, + 2, + 3], + ["triggerUserRedo", + 0, + 2, + 3], + ["enterCellEdit", + 1, + 0, + 6], + ["installCustomFunctionsFromCache", + 0, + 0, + 6], + ["recalc", + 2, + 0, + 6], + ["recalcBySolutionId", + 1, + 0, + 6], + ["safeForCellEditModeMethod", + 1, + 0, + 6], + ["exitCellEdit", + 0, + 0, + 6], + ["noPermissionMethod", + 1, + 0, + 6], + ["verifyCustomFunctionListExist", + 0, + 0, + 6], + ["enableContentWorkbookLink", + 0, + 0, + 3], + ["previewExecutionMethod", + 1, + 0, + 8, + 16], + ["setRapidJsonEnabled", + 1, + 0, + 8], + ["triggerVbaRecorderRecordingChanged", + 2, + 0, + 8]], + 0, + 0, + 0, + [["CustomFunctionExecutionBeginEvent", + 0, + 20, + "MessageType.customFunctionExecutionBeginEvent", + "", + "_RegisterCustomFunctionExecutionBeginEvent", + "_UnregisterCustomFunctionExecutionBeginEvent"], + ["CustomFunctionExecutionEndEvent", + 0, + 20, + "MessageType.customFunctionExecutionEndEvent", + "", + "_RegisterCustomFunctionExecutionEndEvent", + "_UnregisterCustomFunctionExecutionEndEvent"], + ["Test1Event", + 2, + 11, + "MessageType.test1Event", + "", + "_RegisterTest1Event", + "_UnregisterTest1Event"], + ["TestEvent", + 2, + 11, + "MessageType.testEvent", + "", + "_RegisterTestEvent", + "_UnregisterTestEvent"]], + "Microsoft.ExcelServices.InternalTest", + 4], + ["PageLayout", + 0, + [["orientation", + 1], + ["paperSize", + 1], + ["blackAndWhite", + 1], + ["printErrors", + 1], + ["zoom", + 1], + ["centerHorizontally", + 1], + ["centerVertically", + 1], + ["printHeadings", + 1], + ["printGridlines", + 1], + ["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["headerMargin", + 1], + ["footerMargin", + 1], + ["printComments", + 1], + ["draftMode", + 1], + ["firstPageNumber", + 1], + ["printOrder", + 1]], + [["headersFooters", + "HeaderFooterGroup", + 35, + 0, + 0, + 4]], + [["setPrintMargins", + 2], + ["setPrintArea", + 1], + ["setPrintTitleRows", + 1], + ["setPrintTitleColumns", + 1]], + [["getPrintArea", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintAreaOrNullObject", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintTitleRows", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleRowsOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumns", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumnsOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["HeaderFooter", + 0, + [["leftHeader", + 1], + ["centerHeader", + 1], + ["rightHeader", + 1], + ["leftFooter", + 1], + ["centerFooter", + 1], + ["rightFooter", + 1]]], + ["HeaderFooterGroup", + 0, + [["state", + 1], + ["useSheetMargins", + 1], + ["useSheetScale", + 1]], + [["defaultForAllPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["firstPage", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["evenPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["oddPages", + "HeaderFooter", + 35, + 0, + 0, + 4]]], + ["PageBreak", + 0, + [["_Id", + 2], + ["columnIndex", + 3], + ["rowIndex", + 3]], + 0, + [["delete"]], + [["getCellAfterBreak", + "Range", + 0, + 10, + 0, + 4]]], + ["PageBreakCollection", + 1, + 0, + 0, + [["removePageBreaks"], + ["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PageBreak", + 1, + 18, + 0, + 4], + ["add", + "PageBreak", + 1, + 8]], + 0, + "PageBreak"], + ["DataConnectionCollection", + 0, + 0, + 0, + [["refreshAll"]], + [["add", + "DataConnection", + 4, + 8, + 8, + 2, + 0, + 0, + 12]]], + ["RangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "Range", + 1, + 2, + 0, + 4]], + 0, + "Range"], + ["RangeAreasCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeAreas", + 1, + 2, + 0, + 4]], + 0, + "RangeAreas"], + ["CommentCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 2, + 27], + ["_UnregisterAddedEvent", + 0, + 2, + 27], + ["_RegisterDeletedEvent", + 0, + 2, + 27], + ["_UnregisterDeletedEvent", + 0, + 2, + 27], + ["_RegisterChangedEvent", + 0, + 2, + 27], + ["_UnregisterChangedEvent", + 0, + 2, + 27]], + [["getItem", + "Comment", + 1, + 18, + 0, + 4], + ["getItemAt", + "Comment", + 1, + 2, + 0, + 4], + ["add", + "Comment", + 3, + 8], + ["getItemByReplyId", + "Comment", + 1, + 2, + 0, + 4], + ["getItemByCell", + "Comment", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Comment", + 1, + 2, + 18, + 4]], + 0, + "Comment", + [["Added", + 0, + 27, + "MessageType.commentAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 0, + 27, + "MessageType.commentChangedEvent", + "this._eventTargetId", + "_RegisterChangedEvent", + "_UnregisterChangedEvent"], + ["Deleted", + 0, + 27, + "MessageType.commentDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Comment", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 1, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + [["replies", + "CommentReplyCollection", + 19, + 0, + 0, + 4]], + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["CommentReplyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "CommentReply", + 2, + 8], + ["getItem", + "CommentReply", + 1, + 18, + 0, + 4], + ["getItemAt", + "CommentReply", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "CommentReply", + 1, + 2, + 18, + 4]], + 0, + "CommentReply"], + ["CommentReply", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 3, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + 0, + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getParentComment", + "Comment"], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["ShapeCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["addImage", + "Shape", + 1], + ["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["addGeometricShape", + "Shape", + 1], + ["addTextBox", + "Shape", + 1], + ["addSvg", + "Shape", + 1, + 0, + 8], + ["addGroup", + "Shape", + 1], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["addLine", + "Shape", + 5], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape", + [["Added", + 0, + 3, + "MessageType.shapeAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.shapeDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Shape", + 0, + [["id", + 3], + ["name", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["rotation", + 1], + ["zOrderPosition", + 3], + ["altTextTitle", + 1], + ["altTextDescription", + 1, + 0, + 0, + 2, + 36], + ["type", + 3], + ["lockAspectRatio", + 1], + ["placement", + 1, + 17], + ["geometricShapeType", + 1], + ["visible", + 1], + ["level", + 3], + ["connectionSiteCount", + 3], + ["scriptLink", + 1, + 8, + 0, + 2, + 37], + ["displayName", + 3, + 35]], + [["geometricShape", + "GeometricShape", + 2, + 0, + 0, + 4], + ["image", + "Image", + 2, + 0, + 0, + 4], + ["textFrame", + "TextFrame", + 2, + 0, + 0, + 4], + ["fill", + "ShapeFill", + 35, + 0, + 0, + 4], + ["group", + "ShapeGroup", + 2, + 0, + 0, + 4], + ["parentGroup", + "Shape", + 2, + 0, + 0, + 4], + ["line", + "Line", + 2, + 0, + 0, + 4], + ["lineFormat", + "ShapeLineFormat", + 35, + 0, + 0, + 4]], + [["setZOrder", + 1], + ["incrementLeft", + 1], + ["incrementTop", + 1], + ["incrementRotation", + 1], + ["scaleHeight", + 3], + ["scaleWidth", + 3], + ["delete"], + ["getAsImage", + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["activate", + 0, + 0, + 3]], + [["copyTo", + "Shape", + 1, + 8, + 17, + 0, + 0, + "_GetShapeById"], + ["_GetShapeById", + "Shape", + 1, + 2, + 17, + 4]], + 0, + 0, + [["Activated", + 0, + 0, + "MessageType.shapeActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 0, + "MessageType.shapeDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["GeometricShape", + 0, + [["id", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["Image", + 0, + [["id", + 3], + ["format", + 3, + 0, + "format"]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["ShapeGroup", + 0, + [["id", + 3]], + [["shapes", + "GroupShapeCollection", + 19, + 0, + 0, + 4], + ["shape", + "Shape", + 2, + 0, + 0, + 4]], + [["ungroup"]]], + ["GroupShapeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape"], + ["Line", + 0, + [["id", + 3], + ["connectorType", + 1, + 0, + "connectorType"], + ["beginArrowheadLength", + 1], + ["beginArrowheadStyle", + 1], + ["beginArrowheadWidth", + 1], + ["endArrowheadLength", + 1], + ["endArrowheadStyle", + 1], + ["endArrowheadWidth", + 1], + ["isBeginConnected", + 3], + ["beginConnectedSite", + 3], + ["isEndConnected", + 3], + ["endConnectedSite", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4], + ["beginConnectedShape", + "Shape", + 2, + 0, + 0, + 4], + ["endConnectedShape", + "Shape", + 2, + 0, + 0, + 4]], + [["connectBeginShape", + 2], + ["disconnectBeginShape"], + ["connectEndShape", + 2], + ["disconnectEndShape"]]], + ["ShapeFill", + 0, + [["foregroundColor", + 1], + ["type", + 3], + ["transparency", + 1]], + 0, + [["clear"], + ["setSolidColor", + 1]]], + ["ShapeLineFormat", + 0, + [["visible", + 1], + ["color", + 1], + ["style", + 1], + ["weight", + 1], + ["dashStyle", + 1], + ["transparency", + 1]]], + ["TextFrame", + 0, + [["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["horizontalAlignment", + 1], + ["horizontalOverflow", + 1], + ["verticalAlignment", + 1], + ["verticalOverflow", + 1], + ["orientation", + 1], + ["readingOrder", + 1], + ["hasText", + 3], + ["autoSizeSetting", + 1]], + [["textRange", + "TextRange", + 2, + 0, + 0, + 4]], + [["deleteText"]]], + ["TextRange", + 0, + [["text", + 1]], + [["font", + "ShapeFont", + 35, + 0, + 0, + 4]], + 0, + [["getSubstring", + "TextRange", + 2]]], + ["ShapeFont", + 0, + [["size", + 1], + ["name", + 1], + ["color", + 1], + ["bold", + 1], + ["italic", + 1], + ["underline", + 1]]], + ["Slicer", + 0, + [["id", + 3], + ["name", + 1], + ["caption", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["nameInFormula", + 1, + 8], + ["isFilterCleared", + 3], + ["style", + 1], + ["sortBy", + 1], + ["sortUsingCustomLists", + 1, + 3], + ["columnCount", + 1, + 3], + ["disableMoveResizeUI", + 1, + 3], + ["displayHeader", + 1, + 3], + ["rowHeight", + 1, + 3], + ["shapeId", + 2, + 3]], + [["slicerItems", + "SlicerItemCollection", + 19, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 35, + 0, + 0, + 4], + ["slicerStyle", + "SlicerStyle", + 35, + 8, + 0, + 4]], + [["delete"], + ["clearFilters"], + ["getSelectedItems"], + ["selectItems", + 1], + ["activate", + 0, + 2, + 3], + ["setStyle", + 1, + 0, + 8]]], + ["SlicerCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "Slicer", + 3, + 8], + ["getItemAt", + "Slicer", + 1, + 2, + 0, + 4], + ["getItem", + "Slicer", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Slicer", + 1, + 2, + 0, + 4]], + 0, + "Slicer"], + ["SlicerItem", + 0, + [["key", + 3], + ["name", + 3], + ["isSelected", + 1], + ["hasData", + 3]]], + ["SlicerItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SlicerItem", + 1, + 2, + 0, + 4], + ["getItem", + "SlicerItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerItem", + 1, + 2, + 0, + 4]], + 0, + "SlicerItem"], + ["Ribbon", + 0, + [["activeTab", + 1]], + 0, + [["executeCommand", + 2], + ["showTeachingCallout", + 3], + ["_RegisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["showChartDialog", + 1, + 2, + 8, + 4]], + 0, + 0, + 0, + [["CommandExecuted", + 0, + 0, + "MessageType.ribbonCommandExecutedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCommandExecutedEvent", + "_UnregisterCommandExecutedEvent"]]], + ["LinkedDataType", + 0, + [["dataProvider", + 2], + ["serviceId", + 2], + ["lastRefreshed", + 10], + ["name", + 2], + ["periodicRefreshInterval", + 2], + ["refreshDataLoadWarnings", + 2], + ["refreshMode", + 2], + ["supportedRefreshModes", + 2], + ["refreshErrors", + 2]], + 0, + [["requestRefresh", + 0, + 0, + 0, + 2], + ["requestSetRefreshMode", + 1, + 0, + 0, + 2]]], + ["LinkedDataTypeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["requestRefreshAll", + 0, + 0, + 0, + 2], + ["_RegisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_RegisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_RegisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4]], + [["getItem", + "LinkedDataType", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "LinkedDataType", + 1], + ["getItemAt", + "LinkedDataType", + 1, + 2, + 0, + 4]], + 0, + "LinkedDataType", + [["LinkedDataTypeAdded", + 0, + 0, + "MessageType.linkedDataTypeLinkedDataTypeAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterLinkedDataTypeAddedEvent", + "_UnregisterLinkedDataTypeAddedEvent"], + ["RefreshModeChanged", + 0, + 0, + "MessageType.linkedDataTypeRefreshModeChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshModeChangedEvent", + "_UnregisterRefreshModeChangedEvent"], + ["RefreshRequestCompleted", + 0, + 0, + "MessageType.linkedDataTypeRefreshRequestCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshRequestCompletedEvent", + "_UnregisterRefreshRequestCompletedEvent"]]], + ["SheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "SheetView", + 1]]], + ["SheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "SheetView", + 1, + 8], + ["enterTemporary", + "SheetView"], + ["getActive", + "SheetView"], + ["getItem", + "SheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "SheetView", + 1, + 2, + 0, + 4]], + 0, + "SheetView"], + ["NamedSheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "NamedSheetView", + 1]]], + ["NamedSheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "NamedSheetView", + 1, + 8], + ["enterTemporary", + "NamedSheetView"], + ["getActive", + "NamedSheetView"], + ["getItem", + "NamedSheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "NamedSheetView", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "NamedSheetView", + 1, + 2, + 28, + 4]], + 0, + "NamedSheetView"], + ["FunctionResult", + 0, + [["error", + 3], + ["value", + 3]]], + ["Functions", + 0, + 0, + 0, + 0, + [["count", + "FunctionResult", + 1, + 72], + ["if", + "FunctionResult", + 3, + 8], + ["isNA", + "FunctionResult", + 1, + 8], + ["isError", + "FunctionResult", + 1, + 8], + ["sum", + "FunctionResult", + 1, + 72], + ["average", + "FunctionResult", + 1, + 72], + ["min", + "FunctionResult", + 1, + 72], + ["max", + "FunctionResult", + 1, + 72], + ["na", + "FunctionResult", + 0, + 8], + ["npv", + "FunctionResult", + 2, + 72], + ["dollar", + "FunctionResult", + 2, + 8], + ["fixed", + "FunctionResult", + 3, + 8], + ["sin", + "FunctionResult", + 1, + 8], + ["cos", + "FunctionResult", + 1, + 8], + ["tan", + "FunctionResult", + 1, + 8], + ["atan", + "FunctionResult", + 1, + 8], + ["pi", + "FunctionResult", + 0, + 8], + ["sqrt", + "FunctionResult", + 1, + 8], + ["exp", + "FunctionResult", + 1, + 8], + ["ln", + "FunctionResult", + 1, + 8], + ["log10", + "FunctionResult", + 1, + 8], + ["abs", + "FunctionResult", + 1, + 8], + ["int", + "FunctionResult", + 1, + 8], + ["sign", + "FunctionResult", + 1, + 8], + ["round", + "FunctionResult", + 2, + 8], + ["lookup", + "FunctionResult", + 3, + 8], + ["rept", + "FunctionResult", + 2, + 8], + ["mid", + "FunctionResult", + 3, + 8], + ["len", + "FunctionResult", + 1, + 8], + ["value", + "FunctionResult", + 1, + 8], + ["true", + "FunctionResult", + 0, + 8], + ["false", + "FunctionResult", + 0, + 8], + ["and", + "FunctionResult", + 1, + 72], + ["or", + "FunctionResult", + 1, + 72], + ["not", + "FunctionResult", + 1, + 8], + ["mod", + "FunctionResult", + 2, + 8], + ["dcount", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCount"], + ["dsum", + "FunctionResult", + 3, + 8, + 0, + 0, + "DSum"], + ["daverage", + "FunctionResult", + 3, + 8, + 0, + 0, + "DAverage"], + ["dmin", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMin"], + ["dmax", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMax"], + ["dstDev", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDev"], + ["dvar", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVar"], + ["text", + "FunctionResult", + 2, + 8], + ["pv", + "FunctionResult", + 5, + 8], + ["fv", + "FunctionResult", + 5, + 8], + ["nper", + "FunctionResult", + 5, + 8, + 0, + 0, + "NPer"], + ["pmt", + "FunctionResult", + 5, + 8], + ["rate", + "FunctionResult", + 6, + 8], + ["mirr", + "FunctionResult", + 3, + 8, + 0, + 0, + "MIrr"], + ["irr", + "FunctionResult", + 2, + 8], + ["rand", + "FunctionResult", + 0, + 8], + ["match", + "FunctionResult", + 3, + 8], + ["date", + "FunctionResult", + 3, + 8], + ["time", + "FunctionResult", + 3, + 8], + ["day", + "FunctionResult", + 1, + 8], + ["month", + "FunctionResult", + 1, + 8], + ["year", + "FunctionResult", + 1, + 8], + ["weekday", + "FunctionResult", + 2, + 8], + ["hour", + "FunctionResult", + 1, + 8], + ["minute", + "FunctionResult", + 1, + 8], + ["second", + "FunctionResult", + 1, + 8], + ["now", + "FunctionResult", + 0, + 8], + ["areas", + "FunctionResult", + 1, + 8], + ["rows", + "FunctionResult", + 1, + 8], + ["columns", + "FunctionResult", + 1, + 8], + ["type", + "FunctionResult", + 1, + 8], + ["atan2", + "FunctionResult", + 2, + 8], + ["asin", + "FunctionResult", + 1, + 8], + ["acos", + "FunctionResult", + 1, + 8], + ["choose", + "FunctionResult", + 2, + 72], + ["hlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "HLookup"], + ["vlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "VLookup"], + ["isref", + "FunctionResult", + 1, + 8], + ["log", + "FunctionResult", + 2, + 8], + ["char", + "FunctionResult", + 1, + 8], + ["lower", + "FunctionResult", + 1, + 8], + ["upper", + "FunctionResult", + 1, + 8], + ["proper", + "FunctionResult", + 1, + 8], + ["left", + "FunctionResult", + 2, + 8], + ["right", + "FunctionResult", + 2, + 8], + ["exact", + "FunctionResult", + 2, + 8], + ["trim", + "FunctionResult", + 1, + 8], + ["replace", + "FunctionResult", + 4, + 8], + ["substitute", + "FunctionResult", + 4, + 8], + ["code", + "FunctionResult", + 1, + 8], + ["find", + "FunctionResult", + 3, + 8], + ["isErr", + "FunctionResult", + 1, + 8], + ["isText", + "FunctionResult", + 1, + 8], + ["isNumber", + "FunctionResult", + 1, + 8], + ["t", + "FunctionResult", + 1, + 8, + 0, + 0, + "T"], + ["n", + "FunctionResult", + 1, + 8, + 0, + 0, + "N"], + ["datevalue", + "FunctionResult", + 1, + 8], + ["timevalue", + "FunctionResult", + 1, + 8], + ["sln", + "FunctionResult", + 3, + 8], + ["syd", + "FunctionResult", + 4, + 8], + ["ddb", + "FunctionResult", + 5, + 8], + ["clean", + "FunctionResult", + 1, + 8], + ["ipmt", + "FunctionResult", + 6, + 8], + ["ppmt", + "FunctionResult", + 6, + 8], + ["countA", + "FunctionResult", + 1, + 72], + ["product", + "FunctionResult", + 1, + 72], + ["fact", + "FunctionResult", + 1, + 8], + ["dproduct", + "FunctionResult", + 3, + 8, + 0, + 0, + "DProduct"], + ["isNonText", + "FunctionResult", + 1, + 8], + ["dstDevP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDevP"], + ["dvarP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVarP"], + ["trunc", + "FunctionResult", + 2, + 8], + ["isLogical", + "FunctionResult", + 1, + 8], + ["dcountA", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCountA"], + ["usdollar", + "FunctionResult", + 2, + 8, + 0, + 0, + "USDollar"], + ["findB", + "FunctionResult", + 3, + 8], + ["replaceB", + "FunctionResult", + 4, + 8], + ["leftb", + "FunctionResult", + 2, + 8], + ["rightb", + "FunctionResult", + 2, + 8], + ["midb", + "FunctionResult", + 3, + 8], + ["lenb", + "FunctionResult", + 1, + 8], + ["roundUp", + "FunctionResult", + 2, + 8], + ["roundDown", + "FunctionResult", + 2, + 8], + ["asc", + "FunctionResult", + 1, + 8], + ["dbcs", + "FunctionResult", + 1, + 8], + ["days360", + "FunctionResult", + 3, + 8], + ["today", + "FunctionResult", + 0, + 8], + ["vdb", + "FunctionResult", + 7, + 8], + ["median", + "FunctionResult", + 1, + 72], + ["sinh", + "FunctionResult", + 1, + 8], + ["cosh", + "FunctionResult", + 1, + 8], + ["tanh", + "FunctionResult", + 1, + 8], + ["asinh", + "FunctionResult", + 1, + 8], + ["acosh", + "FunctionResult", + 1, + 8], + ["atanh", + "FunctionResult", + 1, + 8], + ["dget", + "FunctionResult", + 3, + 8, + 0, + 0, + "DGet"], + ["db", + "FunctionResult", + 5, + 8], + ["error_Type", + "FunctionResult", + 1, + 8], + ["aveDev", + "FunctionResult", + 1, + 72], + ["gammaLn", + "FunctionResult", + 1, + 8], + ["combin", + "FunctionResult", + 2, + 8], + ["even", + "FunctionResult", + 1, + 8], + ["fisher", + "FunctionResult", + 1, + 8], + ["fisherInv", + "FunctionResult", + 1, + 8], + ["standardize", + "FunctionResult", + 3, + 8], + ["odd", + "FunctionResult", + 1, + 8], + ["permut", + "FunctionResult", + 2, + 8], + ["devSq", + "FunctionResult", + 1, + 72], + ["geoMean", + "FunctionResult", + 1, + 72], + ["harMean", + "FunctionResult", + 1, + 72], + ["sumSq", + "FunctionResult", + 1, + 72], + ["kurt", + "FunctionResult", + 1, + 72], + ["skew", + "FunctionResult", + 1, + 72], + ["large", + "FunctionResult", + 2, + 8], + ["small", + "FunctionResult", + 2, + 8], + ["trimMean", + "FunctionResult", + 2, + 8], + ["concatenate", + "FunctionResult", + 1, + 72], + ["power", + "FunctionResult", + 2, + 8], + ["radians", + "FunctionResult", + 1, + 8], + ["degrees", + "FunctionResult", + 1, + 8], + ["subtotal", + "FunctionResult", + 2, + 72], + ["sumIf", + "FunctionResult", + 3, + 8], + ["countIf", + "FunctionResult", + 2, + 8], + ["countBlank", + "FunctionResult", + 1, + 8], + ["ispmt", + "FunctionResult", + 4, + 8], + ["roman", + "FunctionResult", + 2, + 8], + ["hyperlink", + "FunctionResult", + 2, + 8], + ["averageA", + "FunctionResult", + 1, + 72], + ["maxA", + "FunctionResult", + 1, + 72], + ["minA", + "FunctionResult", + 1, + 72], + ["stDevPA", + "FunctionResult", + 1, + 72], + ["varPA", + "FunctionResult", + 1, + 72], + ["stDevA", + "FunctionResult", + 1, + 72], + ["varA", + "FunctionResult", + 1, + 72], + ["bahtText", + "FunctionResult", + 1, + 8], + ["hex2Bin", + "FunctionResult", + 2, + 8], + ["hex2Dec", + "FunctionResult", + 1, + 8], + ["hex2Oct", + "FunctionResult", + 2, + 8], + ["dec2Bin", + "FunctionResult", + 2, + 8], + ["dec2Hex", + "FunctionResult", + 2, + 8], + ["dec2Oct", + "FunctionResult", + 2, + 8], + ["oct2Bin", + "FunctionResult", + 2, + 8], + ["oct2Hex", + "FunctionResult", + 2, + 8], + ["oct2Dec", + "FunctionResult", + 1, + 8], + ["bin2Dec", + "FunctionResult", + 1, + 8], + ["bin2Oct", + "FunctionResult", + 2, + 8], + ["bin2Hex", + "FunctionResult", + 2, + 8], + ["imSub", + "FunctionResult", + 2, + 8], + ["imDiv", + "FunctionResult", + 2, + 8], + ["imPower", + "FunctionResult", + 2, + 8], + ["imAbs", + "FunctionResult", + 1, + 8], + ["imSqrt", + "FunctionResult", + 1, + 8], + ["imLn", + "FunctionResult", + 1, + 8], + ["imLog2", + "FunctionResult", + 1, + 8], + ["imLog10", + "FunctionResult", + 1, + 8], + ["imSin", + "FunctionResult", + 1, + 8], + ["imCos", + "FunctionResult", + 1, + 8], + ["imExp", + "FunctionResult", + 1, + 8], + ["imArgument", + "FunctionResult", + 1, + 8], + ["imConjugate", + "FunctionResult", + 1, + 8], + ["imaginary", + "FunctionResult", + 1, + 8], + ["imReal", + "FunctionResult", + 1, + 8], + ["complex", + "FunctionResult", + 3, + 8], + ["imSum", + "FunctionResult", + 1, + 72], + ["imProduct", + "FunctionResult", + 1, + 72], + ["seriesSum", + "FunctionResult", + 4, + 8], + ["factDouble", + "FunctionResult", + 1, + 8], + ["sqrtPi", + "FunctionResult", + 1, + 8], + ["quotient", + "FunctionResult", + 2, + 8], + ["delta", + "FunctionResult", + 2, + 8], + ["geStep", + "FunctionResult", + 2, + 8], + ["isEven", + "FunctionResult", + 1, + 8], + ["isOdd", + "FunctionResult", + 1, + 8], + ["mround", + "FunctionResult", + 2, + 8, + 0, + 0, + "MRound"], + ["erf", + "FunctionResult", + 2, + 8], + ["erfC", + "FunctionResult", + 1, + 8], + ["besselJ", + "FunctionResult", + 2, + 8], + ["besselK", + "FunctionResult", + 2, + 8], + ["besselY", + "FunctionResult", + 2, + 8], + ["besselI", + "FunctionResult", + 2, + 8], + ["xirr", + "FunctionResult", + 3, + 8], + ["xnpv", + "FunctionResult", + 3, + 8], + ["priceMat", + "FunctionResult", + 6, + 8], + ["yieldMat", + "FunctionResult", + 6, + 8], + ["intRate", + "FunctionResult", + 5, + 8], + ["received", + "FunctionResult", + 5, + 8], + ["disc", + "FunctionResult", + 5, + 8], + ["priceDisc", + "FunctionResult", + 5, + 8], + ["yieldDisc", + "FunctionResult", + 5, + 8], + ["tbillEq", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillEq"], + ["tbillPrice", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillPrice"], + ["tbillYield", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillYield"], + ["price", + "FunctionResult", + 7, + 8], + ["yield", + "FunctionResult", + 7, + 8], + ["dollarDe", + "FunctionResult", + 2, + 8], + ["dollarFr", + "FunctionResult", + 2, + 8], + ["nominal", + "FunctionResult", + 2, + 8], + ["effect", + "FunctionResult", + 2, + 8], + ["cumPrinc", + "FunctionResult", + 6, + 8], + ["cumIPmt", + "FunctionResult", + 6, + 8], + ["edate", + "FunctionResult", + 2, + 8, + 0, + 0, + "EDate"], + ["eoMonth", + "FunctionResult", + 2, + 8], + ["yearFrac", + "FunctionResult", + 3, + 8], + ["coupDayBs", + "FunctionResult", + 4, + 8], + ["coupDays", + "FunctionResult", + 4, + 8], + ["coupDaysNc", + "FunctionResult", + 4, + 8], + ["coupNcd", + "FunctionResult", + 4, + 8], + ["coupNum", + "FunctionResult", + 4, + 8], + ["coupPcd", + "FunctionResult", + 4, + 8], + ["duration", + "FunctionResult", + 6, + 8], + ["mduration", + "FunctionResult", + 6, + 8, + 0, + 0, + "MDuration"], + ["oddLPrice", + "FunctionResult", + 8, + 8], + ["oddLYield", + "FunctionResult", + 8, + 8], + ["oddFPrice", + "FunctionResult", + 9, + 8], + ["oddFYield", + "FunctionResult", + 9, + 8], + ["randBetween", + "FunctionResult", + 2, + 8], + ["weekNum", + "FunctionResult", + 2, + 8], + ["amorDegrc", + "FunctionResult", + 7, + 8], + ["amorLinc", + "FunctionResult", + 7, + 8], + ["convert", + "FunctionResult", + 3, + 8], + ["accrInt", + "FunctionResult", + 8, + 8], + ["accrIntM", + "FunctionResult", + 5, + 8], + ["workDay", + "FunctionResult", + 3, + 8], + ["networkDays", + "FunctionResult", + 3, + 8], + ["gcd", + "FunctionResult", + 1, + 72], + ["multiNomial", + "FunctionResult", + 1, + 72], + ["lcm", + "FunctionResult", + 1, + 72], + ["fvschedule", + "FunctionResult", + 2, + 8, + 0, + 0, + "FVSchedule"], + ["countIfs", + "FunctionResult", + 1, + 72], + ["sumIfs", + "FunctionResult", + 2, + 72], + ["averageIf", + "FunctionResult", + 3, + 8], + ["averageIfs", + "FunctionResult", + 2, + 72], + ["binom_Dist", + "FunctionResult", + 4, + 8], + ["binom_Inv", + "FunctionResult", + 3, + 8], + ["confidence_Norm", + "FunctionResult", + 3, + 8], + ["confidence_T", + "FunctionResult", + 3, + 8], + ["expon_Dist", + "FunctionResult", + 3, + 8], + ["gamma_Dist", + "FunctionResult", + 4, + 8], + ["gamma_Inv", + "FunctionResult", + 3, + 8], + ["norm_Dist", + "FunctionResult", + 4, + 8], + ["norm_Inv", + "FunctionResult", + 3, + 8], + ["percentile_Exc", + "FunctionResult", + 2, + 8], + ["percentile_Inc", + "FunctionResult", + 2, + 8], + ["percentRank_Exc", + "FunctionResult", + 3, + 8], + ["percentRank_Inc", + "FunctionResult", + 3, + 8], + ["poisson_Dist", + "FunctionResult", + 3, + 8], + ["quartile_Exc", + "FunctionResult", + 2, + 8], + ["quartile_Inc", + "FunctionResult", + 2, + 8], + ["rank_Avg", + "FunctionResult", + 3, + 8], + ["rank_Eq", + "FunctionResult", + 3, + 8], + ["stDev_S", + "FunctionResult", + 1, + 72], + ["stDev_P", + "FunctionResult", + 1, + 72], + ["t_Dist", + "FunctionResult", + 3, + 8], + ["t_Dist_2T", + "FunctionResult", + 2, + 8], + ["t_Dist_RT", + "FunctionResult", + 2, + 8], + ["t_Inv", + "FunctionResult", + 2, + 8], + ["t_Inv_2T", + "FunctionResult", + 2, + 8], + ["var_S", + "FunctionResult", + 1, + 72], + ["var_P", + "FunctionResult", + 1, + 72], + ["weibull_Dist", + "FunctionResult", + 4, + 8], + ["networkDays_Intl", + "FunctionResult", + 4, + 8], + ["workDay_Intl", + "FunctionResult", + 4, + 8], + ["ecma_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ECMA_Ceiling"], + ["iso_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ISO_Ceiling"], + ["beta_Dist", + "FunctionResult", + 6, + 8], + ["beta_Inv", + "FunctionResult", + 5, + 8], + ["chiSq_Dist", + "FunctionResult", + 3, + 8], + ["chiSq_Dist_RT", + "FunctionResult", + 2, + 8], + ["chiSq_Inv", + "FunctionResult", + 2, + 8], + ["chiSq_Inv_RT", + "FunctionResult", + 2, + 8], + ["f_Dist", + "FunctionResult", + 4, + 8], + ["f_Dist_RT", + "FunctionResult", + 3, + 8], + ["f_Inv", + "FunctionResult", + 3, + 8], + ["f_Inv_RT", + "FunctionResult", + 3, + 8], + ["hypGeom_Dist", + "FunctionResult", + 5, + 8], + ["logNorm_Dist", + "FunctionResult", + 4, + 8], + ["logNorm_Inv", + "FunctionResult", + 3, + 8], + ["negBinom_Dist", + "FunctionResult", + 4, + 8], + ["norm_S_Dist", + "FunctionResult", + 2, + 8], + ["norm_S_Inv", + "FunctionResult", + 1, + 8], + ["z_Test", + "FunctionResult", + 3, + 8], + ["erf_Precise", + "FunctionResult", + 1, + 8], + ["erfC_Precise", + "FunctionResult", + 1, + 8], + ["gammaLn_Precise", + "FunctionResult", + 1, + 8], + ["ceiling_Precise", + "FunctionResult", + 2, + 8], + ["floor_Precise", + "FunctionResult", + 2, + 8], + ["acot", + "FunctionResult", + 1, + 8], + ["acoth", + "FunctionResult", + 1, + 8], + ["cot", + "FunctionResult", + 1, + 8], + ["coth", + "FunctionResult", + 1, + 8], + ["csc", + "FunctionResult", + 1, + 8], + ["csch", + "FunctionResult", + 1, + 8], + ["sec", + "FunctionResult", + 1, + 8], + ["sech", + "FunctionResult", + 1, + 8], + ["imTan", + "FunctionResult", + 1, + 8], + ["imCot", + "FunctionResult", + 1, + 8], + ["imCsc", + "FunctionResult", + 1, + 8], + ["imCsch", + "FunctionResult", + 1, + 8], + ["imSec", + "FunctionResult", + 1, + 8], + ["imSech", + "FunctionResult", + 1, + 8], + ["bitand", + "FunctionResult", + 2, + 8], + ["bitor", + "FunctionResult", + 2, + 8], + ["bitxor", + "FunctionResult", + 2, + 8], + ["bitlshift", + "FunctionResult", + 2, + 8], + ["bitrshift", + "FunctionResult", + 2, + 8], + ["permutationa", + "FunctionResult", + 2, + 8], + ["combina", + "FunctionResult", + 2, + 8], + ["xor", + "FunctionResult", + 1, + 72], + ["pduration", + "FunctionResult", + 3, + 8, + 0, + 0, + "PDuration"], + ["base", + "FunctionResult", + 3, + 8], + ["decimal", + "FunctionResult", + 2, + 8], + ["days", + "FunctionResult", + 2, + 8], + ["binom_Dist_Range", + "FunctionResult", + 4, + 8], + ["gamma", + "FunctionResult", + 1, + 8], + ["skew_p", + "FunctionResult", + 1, + 72], + ["gauss", + "FunctionResult", + 1, + 8], + ["phi", + "FunctionResult", + 1, + 8], + ["rri", + "FunctionResult", + 3, + 8], + ["unichar", + "FunctionResult", + 1, + 8], + ["unicode", + "FunctionResult", + 1, + 8], + ["arabic", + "FunctionResult", + 1, + 8], + ["isoWeekNum", + "FunctionResult", + 1, + 8], + ["numberValue", + "FunctionResult", + 3, + 8], + ["sheet", + "FunctionResult", + 1, + 8], + ["sheets", + "FunctionResult", + 1, + 8], + ["isFormula", + "FunctionResult", + 1, + 8], + ["ceiling_Math", + "FunctionResult", + 3, + 8], + ["floor_Math", + "FunctionResult", + 3, + 8], + ["imSinh", + "FunctionResult", + 1, + 8], + ["imCosh", + "FunctionResult", + 1, + 8]]]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataXlapi, targetNamespaceObject: Excel }); +})(Excel || (Excel = {})); +var _EndExcel = "_EndExcel"; +if (typeof (window) !== "undefined" && + window.OSF && + window.OSF._OfficeAppFactory && + window.OSF._OfficeAppFactory.getHostInfo && + window.OSF._OfficeAppFactory.getHostInfo()) { + var hostPlatform = window.OSF._OfficeAppFactory.getHostInfo().hostPlatform; + if (hostPlatform === "web") { + OfficeExtension._internalConfig.enablePreviewExecution = true; + } +} +OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel = true; +OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria = false; +function exposeOfficeRuntimeThroughOfficeNamespace(OfficeRuntime, Office) { + var _a, _b; + if (typeof OfficeRuntime === "undefined") { + if (typeof window !== "undefined") { + OfficeRuntime = window === null || window === void 0 ? void 0 : window.OfficeRuntime; + } + } + if (typeof OfficeRuntime === "undefined") { + OfficeRuntime = {}; + } + if (typeof Office !== "undefined") { + Office.storage = Office.storage || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.storage); + Office.auth = Office.auth || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.auth); + Office.getAccessToken = Office.getAccessToken || ((_a = OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.auth) === null || _a === void 0 ? void 0 : _a.getAccessToken); + Office.addin = Office.addin || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.addin); + Office.isSetSupported = Office.isSetSupported || ((_b = OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.apiInformation) === null || _b === void 0 ? void 0 : _b.isSetSupported); + Office.license = Office.license || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.license); + Office.message = Office.message || (OfficeRuntime === null || OfficeRuntime === void 0 ? void 0 : OfficeRuntime.message); + } +} +exposeOfficeRuntimeThroughOfficeNamespace(typeof OfficeRuntime !== "undefined" ? OfficeRuntime || undefined : undefined, typeof Office !== "undefined" ? Office || undefined : undefined); diff --git a/dist/excel-winrt-16.00.js b/dist/excel-winrt-16.00.js new file mode 100644 index 000000000..1ea9141e7 --- /dev/null +++ b/dist/excel-winrt-16.00.js @@ -0,0 +1,26 @@ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md +*/ + +/* +* @overview es6-promise - a tiny implementation of Promises/A+. +* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +* @license Licensed under MIT license +* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE +* @version 2.3.0 +*/ + + +// Sources: +// osfweb: 16.0\16801.10000 +// runtime: 16.0\16801.10000 +// core: 16.0\16801.10000 +// host: custom + + + +var OfficeExt,__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){var t=function(){function e(){}return e.prototype.isMsAjaxLoaded=function(){return!!("undefined"!==typeof Sys&&"undefined"!==typeof Type&&Sys.StringBuilder&&"function"===typeof Sys.StringBuilder&&Type.registerNamespace&&"function"===typeof Type.registerNamespace&&Type.registerClass&&"function"===typeof Type.registerClass&&"function"===typeof Function._validateParams&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&"function"===typeof Sys.Serialization.JavaScriptSerializer.serialize)},e.prototype.loadMsAjaxFull=function(e){var t=("https:"===window.location.protocol.toLowerCase()?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,e)},Object.defineProperty(e.prototype,"msAjaxError",{get:function(){return null==this._msAjaxError&&this.isMsAjaxLoaded()&&(this._msAjaxError=Error),this._msAjaxError},set:function(e){this._msAjaxError=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxString",{get:function(){return null==this._msAjaxString&&this.isMsAjaxLoaded()&&(this._msAjaxString=String),this._msAjaxString},set:function(e){this._msAjaxString=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxDebug",{get:function(){return null==this._msAjaxDebug&&this.isMsAjaxLoaded()&&(this._msAjaxDebug=Sys.Debug),this._msAjaxDebug},set:function(e){this._msAjaxDebug=e},enumerable:!0,configurable:!0}),e}();e.MicrosoftAjaxFactory=t}(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};!function(e){var t=function(){function e(e){this._internalStorage=e}return e.prototype.getItem=function(e){try{return this._internalStorage&&this._internalStorage.getItem(e)}catch(e){return null}},e.prototype.setItem=function(e,t){try{this._internalStorage&&this._internalStorage.setItem(e,t)}catch(e){}},e.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(e){}},e.prototype.removeItem=function(e){try{this._internalStorage&&this._internalStorage.removeItem(e)}catch(e){}},e.prototype.getKeysWithPrefix=function(e){var t=[];try{for(var n=this._internalStorage&&this._internalStorage.length||0,r=0;r0?i.push(n):0===n.tabIndex&&r.push(n):r.push(n);return i=i.sort((function(e,t){var n=e.tabIndex-t.tabIndex;return 0===n&&(n=i.indexOf(e)-i.indexOf(t)),n})),[].concat(i,r)}return{set_entropy:function(e){if("string"==typeof e)for(var t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(n=new Date(parseInt(t.slice(5,-1))))?n:t})):Sys.Serialization.JavaScriptSerializer.deserialize(r,!0),t[n]=r}catch(e){}}return t},loadScript:function(e,t,r){if(e&&t){var i=window.document,o=n[e];if(o)o.loaded?t():o.pendingCallbacks.push(t);else{var a=i.createElement("script");a.type="text/javascript",o={loaded:!1,pendingCallbacks:[t],timer:null},n[e]=o;var s=function(){null!=o.timer&&(clearTimeout(o.timer),delete o.timer),o.loaded=!0;for(var e=o.pendingCallbacks.length,t=0;t0?l(null):l(new Event("Script load timed out"))}),r),a.setAttribute("crossOrigin","anonymous"),a.src=e,i.getElementsByTagName("head")[0].appendChild(a)}}},loadCSS:function(e){if(e){var t=window.document,n=t.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.getElementsByTagName("head")[0].appendChild(n)}},parseEnum:function(e,t){var n=t[e.trim()];if("undefined"==typeof n)throw OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+e),OsfMsAjaxFactory.msAjaxError.argument("str");return n},delayExecutionAndCache:function(){var e={calc:arguments[0]};return function(){return e.calc&&(e.val=e.calc.apply(this,arguments),delete e.calc),e.val}},getUniqueId:function(){return(e+=1).toString()},formatString:function(){var e=arguments,t=e[0];return t.replace(/{(\d+)}/gm,(function(t,n){var r=parseInt(n,10)+1;return void 0===e[r]?"{"+n+"}":e[r]}))},generateConversationId:function(){return[a(),a(),(new Date).getTime().toString()].join("_")},getFrameName:function(e){return"_xdm_"+e+this.generateConversationId()},addXdmInfoAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_xdm_Info=",t,!1)},addSerializerVersionAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_serializer_version=",t,!0)},addFlightsAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_flights=",t,!0)},addInfoAsHash:function(e,n,r,i){var o,a=(e=e.trim()||"").split(t),s=a.shift(),l=a.join(t);return o=i?[n,encodeURIComponent(r),l].join(""):[l,n,r].join(""),[s,t,o].join("")},parseHostInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(e){var t=OSF.OUtil.parseXdmInfoWithGivenFragment(e,window.location.hash);return t||(t=OSF.OUtil.parseXdmInfoFromWindowName(e,window.name)),t},parseXdmInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(e,t){return OSF.OUtil.parseInfoWithGivenFragment("&_xdm_Info=","_xdm_",!1,e,t)},parseSerializerVersion:function(e){var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(e,window.location.hash);return isNaN(t)&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(e,window.name)),t},parseSerializerVersionFromWindowName:function(e,t){return parseInt(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(e,t){return parseInt(OSF.OUtil.parseInfoWithGivenFragment("&_serializer_version=","_serializer_version=",!0,e,t))},parseFlights:function(e){var t=OSF.OUtil.parseFlightsWithGivenFragment(e,window.location.hash);return 0==t.length&&(t=OSF.OUtil.parseFlightsFromWindowName(e,window.name)),t},checkFlight:function(e){return OSF.Flights&&OSF.Flights.indexOf(e)>=0},pushFlight:function(e){return OSF.Flights.indexOf(e)<0&&(OSF.Flights.push(e),!0)},getBooleanSetting:function(e){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,e)},getBooleanFromDictionary:function(e,t){var n=e&&t&&void 0!==e[t]&&e[t]&&("string"===typeof e[t]&&"TRUE"===e[t].toUpperCase()||"boolean"===typeof e[t]&&e[t]);return void 0!==n&&n},getIntFromDictionary:function(e,t){return e&&t&&void 0!==e[t]&&"string"===typeof e[t]?parseInt(e[t]):NaN},pushIntFlight:function(e,t){return!(e in OSF.IntFlights)&&(OSF.IntFlights[e]=t,!0)},getIntFlight:function(e){return OSF.IntFlights&&e in OSF.IntFlights?OSF.IntFlights[e]:NaN},parseFlightsFromWindowName:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment("&_flights=","_flights=",!0,e,t))},parseArrayWithDefault:function(e){var t=[];try{t=JSON.parse(e)}catch(e){}return Array.isArray(t)||(t=[]),t},parseInfoFromWindowName:function(e,t,n){try{var r=JSON.parse(t),i=null!=r?r[n]:null,o=s();if(!e&&o&&null!=r){var a=r[OSF.WindowNameItemKeys.BaseFrameName]+n;i?o.setItem(a,i):i=o.getItem(a)}return i}catch(e){return null}},parseInfoWithGivenFragment:function(e,t,n,r,i){var o=i.split(e),a=o.length>1?o[o.length-1]:null;n&&null!=a&&(a.indexOf("&")>=0&&(a=a.split("&")[0]),a=decodeURIComponent(a));var l=s();if(!r&&l){var c=window.name.indexOf(t);if(c>-1){var u=window.name.indexOf(";",c);-1==u&&(u=window.name.length);var d=window.name.substring(c,u);a?l.setItem(d,a):a=l.getItem(d)}}return a},getConversationId:function(){var e=window.location.search,t=null;if(e){var n=e.indexOf("&");(t=n>0?e.substring(1,n):e.substr(1))&&"="===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1))&&(t=decodeURIComponent(t))}return t},getInfoItems:function(e){var t=e.split("$");return"undefined"==typeof t[1]&&(t=e.split("|")),"undefined"==typeof t[1]&&(t=e.split("%7C")),t},getXdmFieldValue:function(e,t){var n="",r=OSF.OUtil.parseXdmInfo(t);if(r){var i=OSF.OUtil.getInfoItems(r);if(void 0!=i&&i.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:n=i[2];break;case OSF.XdmFieldName.AppId:n=i[1]}}return n},validateParamObject:function(e,t,n){var r=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:!1},{name:"expectedProperties",type:Object,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0}]);if(r)throw r;for(var i in t)if(r=Function._validateParameter(e[i],t[i],i))throw r},writeProfilerMark:function(e){window.msWriteProfilerMark&&(window.msWriteProfilerMark(e),OsfMsAjaxFactory.msAjaxDebug.trace(e))},outputDebug:function(e){"undefined"!==typeof OsfMsAjaxFactory&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(e)},defineNondefaultProperty:function(e,t,n,r){for(var i in n=n||{},r){var o=r[i];void 0==n[o]&&(n[o]=!0)}return Object.defineProperty(e,t,n),e},defineNondefaultProperties:function(e,t,n){for(var r in t=t||{})OSF.OUtil.defineNondefaultProperty(e,r,t[r],n);return e},defineEnumerableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["enumerable"])},defineEnumerableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["enumerable"])},defineMutableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["writable","enumerable","configurable"])},defineMutableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["writable","enumerable","configurable"])},finalizeProperties:function(e,t){t=t||{};for(var n=Object.getOwnPropertyNames(e),r=n.length,i=0;i>8,a=255&n,u[s++]=i>>2,u[s++]=(3&i)<<4|o>>4,u[s++]=(15&o)<<2|a>>6,u[s++]=63&a,isNaN(n)||(i=n>>8,o=255&r,a=r>>8,u[s++]=i>>2,u[s++]=(3&i)<<4|o>>4,u[s++]=(15&o)<<2|a>>6,u[s++]=63&a),isNaN(n)?u[s-1]=64:isNaN(r)&&(u[s-2]=64,u[s-1]=64);for(var p=0;p=2?n[r-2]+"."+n[r-1]:1==r?n[0]:void 0},isiOS:function(){return!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)},isChrome:function(){return window.navigator.userAgent.indexOf("Chrome")>0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},startsWith:function(e,t,n){return n?e.substr(0,t.length)===t:e.startsWith(t)},containsPort:function(e,t,n,r){return this.startsWith(e,t+"//"+n+":"+r,!0)||this.startsWith(e,n+":"+r,!0)},getRedundandPortString:function(e,t){return e&&t?"https:"==t.protocol&&this.containsPort(e,"https:",t.hostname,"443")?":443":"http:"==t.protocol&&this.containsPort(e,"http:",t.hostname,"80")?":80":"":""},removeChar:function(e,t){return t=e.length)return this.removeChar(e,n);if("/"===t){if("?"===e.charAt(n+1)||"#"===e.charAt(n+1))return this.removeChar(e,n)}else if("?"===t&&"#"===e.charAt(n+1))return this.removeChar(e,n)}return e},cleanUrl:function(e){if(e=this.cleanUrlOfChar(e,"/"),e=this.cleanUrlOfChar(e,"?"),"https://"==(e=this.cleanUrlOfChar(e,"#")).substr(0,8))-1!=(t=e.indexOf(":443"))&&(t!=e.length-4&&"/"!=e.charAt(t+4)&&"?"!=e.charAt(t+4)&&"#"!=e.charAt(t+4)||(e=e.substring(0,t)+e.substring(t+4)));else if("http://"==e.substr(0,7)){var t;-1!=(t=e.indexOf(":80"))&&(t!=e.length-3&&"/"!=e.charAt(t+3)&&"?"!=e.charAt(t+3)&&"#"!=e.charAt(t+3)||(e=e.substring(0,t)+e.substring(t+3)))}return e},parseUrl:function(e,t){if(void 0===t&&(t=!1),"undefined"!==typeof e&&e){var n=this.isIE(),r={protocol:void 0,hostname:void 0,host:void 0,port:void 0,pathname:void 0,search:void 0,hash:void 0,isPortPartOfUrl:void 0};try{if(n){var i=document.createElement("a");if(i.href=e,!i||!i.protocol||!i.host||!i.hostname||!i.href||this.cleanUrl(i.href).toLowerCase()!==this.cleanUrl(e).toLowerCase())throw"InvalidUrl";if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=i.protocol)throw new Error("NotHttps");var o=this.getRedundandPortString(e,i);r.protocol=i.protocol,r.hostname=i.hostname,r.port=""==o?i.port:"",r.host=""!=o?i.hostname:i.host,r.pathname=(n?"/":"")+i.pathname,r.search=i.search,r.hash=i.hash,r.isPortPartOfUrl=this.containsPort(e,i.protocol,i.hostname,i.port)}else{var a=new URL(e);if(a&&a.protocol&&a.host&&a.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=a.protocol)throw new Error("NotHttps");r.protocol=a.protocol,r.hostname=a.hostname,r.port=a.port,r.host=a.host,r.pathname=a.pathname,r.search=a.search,r.hash=a.hash,r.isPortPartOfUrl=a.host.lastIndexOf(":"+a.port)==a.host.length-a.port.length-1}}}catch(e){if("NotHttps"===e.message)throw e}return r}},shallowCopy:function(e){if(null==e)return null;if(e instanceof Object){if(Array.isArray(e)){for(var t=[],n=0;ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(e=l(e),n=t?e.length-1:0,0===e.length)return null;for(;!i&&n>=0&&ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(r=function(e,t){for(var n=0;n=0&&ie.length)return!1;if(e.substr(e.length-t.length)===t)return!0}return!1},hashCode:function(e){var t=0;if(!OSF.OUtil.isNullOrUndefined(e))for(var n=0,r=e.length;n0;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[n%16],n=Math.floor(n/16);for(;r<32;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[Math.floor(16*Math.random())];return t}}}();try{!function(){OSF.Flights=OSF.OUtil.parseFlights(!0)}()}catch(e){}window.OSF=OSF,OSF.OUtil.setNamespace("OSF",window),OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3},OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614,Visio:8388615,OneNoteAndroid:4194305},OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"},OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"},OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20,UpdateTargetUrl:21,InstallCustomFunctions:22,SendTelemetryEvent:23,UninstallCustomFunctions:24,SendMessage:25,LaunchExtensionComponent:26,StopExtensionComponent:27,RestartExtensionComponent:28,EnableTaskPaneHeaderButton:29,DisableTaskPaneHeaderButton:30,TaskPaneHeaderButtonClicked:31,RemoveAppCommandsAddin:32,RefreshRibbonGallery:33,GetOriginalControlId:34,OfficeJsReady:35,InsertDevManifest:36,InsertDevManifestError:37,SendCustomerContent:38,KeyboardShortcuts:39},OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"},OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006},OSF.OfficeAppContext=function(e,t,n,r,i,o,a,s,l,c,u,d,f,p,h,g,m,y,v,b,O,S,C,_,A,E,D){this._id=e,this._appName=t,this._appVersion=n,this._appUILocale=r,this._dataLocale=i,this._docUrl=o,this._clientMode=a,this._settings=s,this._reason=l,this._osfControlType=c,this._eToken=u,this._correlationId=d,this._appInstanceId=f,this._touchEnabled=p,this._commerceAllowed=h,this._appMinorVersion=g,this._requirementMatrix=m,this._hostCustomMessage=y,this._hostFullVersion=v,this._isDialog=!1,this._clientWindowHeight=b,this._clientWindowWidth=O,this._addinName=S,this._appDomains=C,this._dialogRequirementMatrix=_,this._featureGates=A,this._officeTheme=E,this._initialDisplayMode=D,this.get_id=function(){return this._id},this.get_appName=function(){return this._appName},this.get_appVersion=function(){return this._appVersion},this.get_appUILocale=function(){return this._appUILocale},this.get_dataLocale=function(){return this._dataLocale},this.get_docUrl=function(){return this._docUrl},this.get_clientMode=function(){return this._clientMode},this.get_bindings=function(){return this._bindings},this.get_settings=function(){return this._settings},this.get_reason=function(){return this._reason},this.get_osfControlType=function(){return this._osfControlType},this.get_eToken=function(){return this._eToken},this.get_correlationId=function(){return this._correlationId},this.get_appInstanceId=function(){return this._appInstanceId},this.get_touchEnabled=function(){return this._touchEnabled},this.get_commerceAllowed=function(){return this._commerceAllowed},this.get_appMinorVersion=function(){return this._appMinorVersion},this.get_requirementMatrix=function(){return this._requirementMatrix},this.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix},this.get_hostCustomMessage=function(){return this._hostCustomMessage},this.get_hostFullVersion=function(){return this._hostFullVersion},this.get_isDialog=function(){return this._isDialog},this.get_clientWindowHeight=function(){return this._clientWindowHeight},this.get_clientWindowWidth=function(){return this._clientWindowWidth},this.get_addinName=function(){return this._addinName},this.get_appDomains=function(){return this._appDomains},this.get_featureGates=function(){return this._featureGates},this.get_officeTheme=function(){return this._officeTheme},this.get_initialDisplayMode=function(){return this._initialDisplayMode?this._initialDisplayMode:0}},OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1},OSF.ClientMode={ReadOnly:0,ReadWrite:1},OSF.OUtil.setNamespace("Microsoft",window),OSF.OUtil.setNamespace("Office",Microsoft),OSF.OUtil.setNamespace("Client",Microsoft.Office),OSF.OUtil.setNamespace("WebExtension",Microsoft.Office),Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",ControlActivation:"controlActivation"},Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"},Microsoft.Office.WebExtension.FilterType={All:"all"},Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",JsonData:"jsonData",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",AllowConsentPrompt:"allowConsentPrompt",ForMSGraphAccess:"forMSGraphAccess",AllowSignInPrompt:"allowSignInPrompt",JsonPayload:"jsonPayload",EnableNewHosts:"enableNewHosts",AccountTypeFilter:"accountTypeFilter",AddinTrustId:"addinTrustId",Reserved:"reserved",Tcid:"tcid",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo",TargetOrigin:"targetOrigin",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64",FormId:"formId"},OSF.OUtil.setNamespace("DDA",OSF),OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0},OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"},OSF.DDA.EventDescriptors={},OSF.DDA.ListDescriptors={},OSF.DDA.UI={},OSF.DDA.getXdmEventName=function(e,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?e+"_"+t:t},OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetAuthContextMethod:99,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidInsertFormMethod:106,dispidDisplayRibbonCalloutAsyncMethod:109,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidExecuteFeature:146,dispidQueryFeature:147,dispidGetNestedAppAuthContextMethod:205,dispidMethodMax:205},OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidOlkRecurrenceChangedEvent:49,dispidOlkAttachmentsChangedEvent:50,dispidOlkEnhancedLocationsChangedEvent:51,dispidOlkInfobarClickedEvent:52,dispidOlkSelectedItemsChangedEvent:53,dispidOlkSensitivityLabelChangedEvent:54,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63},OSF.DDA.ErrorCodeManager=function(){var e={};return{getErrorArgs:function(t){var n=e[t];return n?(n.name||(n.name=e[this.errorCodes.ooeInternalError].name),n.message||(n.message=e[this.errorCodes.ooeInternalError].message)):n=e[this.errorCodes.ooeInternalError],n},addErrorMessage:function(t,n){e[t]=n},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeOperationCancelled:5014,ooeWorkbookHidden:5015,ooeWriteNotSupportedWhenModalDialogOpen:5016,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeRequestPayloadSizeLimitExceeded:5103,ooeResponsePayloadSizeLimitExceeded:5104,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeModalDialogOpen:12012,ooeDocumentIsInactive:12013,ooeDialogParentIsMinimized:12014,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010,ooeResourceNotAllowed:13011,ooeSSOUnsupportedPlatform:13012,ooeSSOCallThrottled:13013,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(t){e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden]={name:t.L_APICallFailed,message:t.L_WorkbookHiddenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen]={name:t.L_APICallFailed,message:t.L_WriteNotSupportedWhenModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_RequestPayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_ResponsePayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen]={name:t.L_DisplayDialogError,message:t.L_ModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive]={name:t.L_DisplayDialogError,message:t.L_DocumentIsInactive},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized]={name:t.L_DisplayDialogError,message:t.L_DialogParentIsMinimized},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:t.L_APINotSupported,message:t.L_SSOUnsupportedPlatform},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:t.L_OperationCancelledError,message:t.L_OperationCancelledErrorMessage}}}}(),function(e){!function(e){var t=function(){return function(){}}();e.RequirementVersion=t;var n=function(){return function(e){this.isSetSupported=function(e,t){if(void 0==e)return!1;void 0==t&&(t=0);var n=this._setMap._sets;if(n.hasOwnProperty(e.toLowerCase())){var r=n[e.toLowerCase()];try{var i=this._getVersion(r);t+="";var o=this._getVersion(t);if(i.major>0&&i.major>o.major)return!0;if(i.major>0&&i.minor>=0&&i.major==o.major&&i.minor>=o.minor)return!0}catch(e){return!1}}return!1},this._getVersion=function(e){var t=(e+="").split("."),n=0,r=0;if(t.length<2&&isNaN(Number(e)))throw"version format incorrect";if(n=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(n)||isNaN(r))throw"version format incorrect";return{minor:r,major:n}},this._setMap=e,this.isSetSupported=this.isSetSupported.bind(this)}}();e.RequirementMatrix=n;var r=function(){return function(e){this._addSetMap=function(e){for(var t in e)this._sets[t]=e[t]},this._sets=e}}();e.DefaultSetRequirement=r;var i=function(e){function t(){return e.call(this,{dialogapi:1.1})||this}return __extends(t,e),t}(r);e.DefaultRequiredDialogSetRequirement=i;var o=function(e){function t(){return e.call(this,{dialogorigin:1.1})||this}return __extends(t,e),t}(r);e.DefaultOptionalDialogSetRequirement=o;var a=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,excelapi:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelClientDefaultSetRequirement=a;var s=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(a);e.ExcelClientV1DefaultSetRequirement=s;var l=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookClientDefaultSetRequirement=l;var c=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1,wordapi:1.1})||this}return __extends(t,e),t}(r);e.WordClientDefaultSetRequirement=c;var u=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:1.1}),t}return __extends(t,e),t}(c);e.WordClientV1DefaultSetRequirement=u;var d=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointClientDefaultSetRequirement=d;var f=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(d);e.PowerpointClientV1DefaultSetRequirement=f;var p=function(e){function t(){return e.call(this,{selection:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ProjectClientDefaultSetRequirement=p;var h=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,file:1.1})||this}return __extends(t,e),t}(r);e.ExcelWebDefaultSetRequirement=h;var g=function(e){function t(){return e.call(this,{compressedfile:1.1,documentevents:1.1,file:1.1,imagecoercion:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablecoercion:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordWebDefaultSetRequirement=g;var m=function(e){function t(){return e.call(this,{activeview:1.1,settings:1.1})||this}return __extends(t,e),t}(r);e.PowerpointWebDefaultSetRequirement=m;var y=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookWebDefaultSetRequirement=y;var v=function(e){function t(){return e.call(this,{activeview:1.1,documentevents:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.SwayWebDefaultSetRequirement=v;var b=function(e){function t(){return e.call(this,{bindingevents:1.1,partialtablebindings:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1})||this}return __extends(t,e),t}(r);e.AccessWebDefaultSetRequirement=b;var O=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelIOSDefaultSetRequirement=O;var S=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordIOSDefaultSetRequirement=S;var C=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2}),t}return __extends(t,e),t}(S);e.WordIOSV1DefaultSetRequirement=C;var _=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointIOSDefaultSetRequirement=_;var A=function(e){function t(){return e.call(this,{mailbox:1.1})||this}return __extends(t,e),t}(r);e.OutlookIOSDefaultSetRequirement=A;var E=function(){function e(){}return e.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},e.getDefaultRequirementMatrix=function(t){this.initializeDefaultSetMatrix();var i=void 0,o=t.get_requirementMatrix();if(void 0!=o&&o.length>0&&"undefined"!==typeof JSON){var a=JSON.parse(t.get_requirementMatrix().toLowerCase());i=new n(new r(a))}else{var s=e.getClientFullVersionString(t);i=void 0!=e.DefaultSetArrayMatrix&&void 0!=e.DefaultSetArrayMatrix[s]?new n(e.DefaultSetArrayMatrix[s]):new n(new r({}))}return i},e.getDefaultDialogRequirementMatrix=function(e){var t=void 0,a=e.get_dialogRequirementMatrix();if(void 0!=a&&a.length>0&&"undefined"!==typeof JSON){var s=JSON.parse(e.get_requirementMatrix().toLowerCase());t=new r(s)}else{t=new i;var l=e.get_requirementMatrix();if(void 0!=l&&l.length>0&&"undefined"!==typeof JSON){s=JSON.parse(l.toLowerCase());for(var c in t._sets)s.hasOwnProperty(c)&&(t._sets[c]=s[c]);var u=new o;for(var c in u._sets)s.hasOwnProperty(c)&&(t._sets[c]=s[c])}}return new n(t)},e.getClientFullVersionString=function(e){var t=e.get_appMinorVersion(),n="",r="",i=e.get_appName();return(1024==i||4096==i||8192==i||65536==i)&&1==e.get_appVersion()?r=4096==i&&t>=15?"16.00.01":"16.00":64==e.get_appName()?r=e.get_appVersion():(n=t<10?"0"+t:""+t,r=e.get_appVersion()+"."+n),e.get_appName()+"-"+r},e.initializeDefaultSetMatrix=function(){e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1600]=new a,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1600]=new c,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1600]=new d,e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1601]=new s,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1601]=new u,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1601]=new f,e.DefaultSetArrayMatrix[e.Outlook_RCLIENT_1600]=new l,e.DefaultSetArrayMatrix[e.Excel_WAC_1600]=new h,e.DefaultSetArrayMatrix[e.Word_WAC_1600]=new g,e.DefaultSetArrayMatrix[e.Outlook_WAC_1600]=new y,e.DefaultSetArrayMatrix[e.Outlook_WAC_1601]=new y,e.DefaultSetArrayMatrix[e.Project_RCLIENT_1600]=new p,e.DefaultSetArrayMatrix[e.Access_WAC_1600]=new b,e.DefaultSetArrayMatrix[e.PowerPoint_WAC_1600]=new m,e.DefaultSetArrayMatrix[e.Excel_IOS_1600]=new O,e.DefaultSetArrayMatrix[e.SWAY_WAC_1600]=new v,e.DefaultSetArrayMatrix[e.Word_IOS_1600]=new S,e.DefaultSetArrayMatrix[e.Word_IOS_16001]=new C,e.DefaultSetArrayMatrix[e.PowerPoint_IOS_1600]=new _,e.DefaultSetArrayMatrix[e.Outlook_IOS_1600]=new A},e.Excel_RCLIENT_1600="1-16.00",e.Excel_RCLIENT_1601="1-16.01",e.Word_RCLIENT_1600="2-16.00",e.Word_RCLIENT_1601="2-16.01",e.PowerPoint_RCLIENT_1600="4-16.00",e.PowerPoint_RCLIENT_1601="4-16.01",e.Outlook_RCLIENT_1600="8-16.00",e.Excel_WAC_1600="16-16.00",e.Word_WAC_1600="32-16.00",e.Outlook_WAC_1600="64-16.00",e.Outlook_WAC_1601="64-16.01",e.Project_RCLIENT_1600="128-16.00",e.Access_WAC_1600="256-16.00",e.PowerPoint_WAC_1600="512-16.00",e.Excel_IOS_1600="1024-16.00",e.SWAY_WAC_1600="2048-16.00",e.Word_IOS_1600="4096-16.00",e.Word_IOS_16001="4096-16.00.01",e.PowerPoint_IOS_1600="8192-16.00",e.Outlook_IOS_1600="65536-16.00",e.DefaultSetArrayMatrix={},e}();e.RequirementsMatrixFactory=E}(e.Requirement||(e.Requirement={}))}(OfficeExt||(OfficeExt={})),OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"},Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"},OSF.NamespaceManager=function(){var e,t=!1;return{enableShortcut:function(){t||(window.Office?e=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,t=!0)},disableShortcut:function(){t&&(e?window.Office=e:OSF.OUtil.unsetNamespace("Office",window),t=!1)}}}(),OSF.NamespaceManager.enableShortcut(),Microsoft.Office.WebExtension.useShortNamespace=function(e){e?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()},Microsoft.Office.WebExtension.select=function(e,t){var n;if(e&&"string"==typeof e){var r=e.indexOf("#");if(-1!=r){var i=e.substring(0,r),o=e.substring(r+1);switch(i){case"binding":case"bindings":o&&(n=new OSF.DDA.BindingPromise(o))}}}if(n)return n.onFail=t,n;if(t){var a=typeof t;if("function"!=a)throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,a);var s={};s[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}},OSF.DDA.Context=function(e,t,n,r,i){if(OSF.OUtil.defineEnumerableProperties(this,{contentLanguage:{value:e.get_dataLocale()},displayLanguage:{value:e.get_appUILocale()},touchEnabled:{value:e.get_touchEnabled()},commerceAllowed:{value:e.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},isDialog:{value:OSF._OfficeAppFactory.getHostInfo().isDialog},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(e.get_hostFullVersion())}}),n&&OSF.OUtil.defineEnumerableProperty(this,"license",{value:n}),e.ui&&OSF.OUtil.defineEnumerableProperty(this,"ui",{value:e.ui}),e.auth&&OSF.OUtil.defineEnumerableProperty(this,"auth",{value:e.auth}),e.webAuth&&OSF.OUtil.defineEnumerableProperty(this,"webAuth",{value:e.webAuth}),e.application&&OSF.OUtil.defineEnumerableProperty(this,"application",{value:e.application}),e.extensionLifeCycle&&OSF.OUtil.defineEnumerableProperty(this,"extensionLifeCycle",{value:e.extensionLifeCycle}),e.messaging&&OSF.OUtil.defineEnumerableProperty(this,"messaging",{value:e.messaging}),e.ui&&e.ui.taskPaneAction&&OSF.OUtil.defineEnumerableProperty(this,"taskPaneAction",{value:e.ui.taskPaneAction}),e.ui&&e.ui.ribbonGallery&&OSF.OUtil.defineEnumerableProperty(this,"ribbonGallery",{value:e.ui.ribbonGallery}),e.get_isDialog()){var o=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(e);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:o})}else{if(t&&OSF.OUtil.defineEnumerableProperty(this,"document",{value:t}),r){var a=r.displayName||"appOM";delete r.displayName,OSF.OUtil.defineEnumerableProperty(this,a,{value:r})}e.get_officeTheme()?OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return e.get_officeTheme()}}):i&&OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return i()}});o=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(e);if(OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:o}),e.get_featureGates){var s=e.get_featureGates();if(s&&s.EnablePublicThemeManager){var l=new OSF.DDA.Theming.InternalThemeHandler;l.InitializeThemeManager(),OSF.OUtil.defineEnumerableProperty(this,"themeManager",{value:l})}}}},OSF.DDA.OutlookContext=function(e,t,n,r,i){OSF.DDA.OutlookContext.uber.constructor.call(this,e,null,n,r,i),t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t}),e.sensitivityLabelsCatalog&&OSF.OUtil.defineEnumerableProperty(this,"sensitivityLabelsCatalog",{value:e.sensitivityLabelsCatalog()})},OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context),OSF.DDA.OutlookAppOm=function(e,t,n){},OSF.DDA.Application=function(e){},OSF.DDA.Document=function(e,t){var n;switch(e.get_clientMode()){case OSF.ClientMode.ReadOnly:n=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:n=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t}),OSF.OUtil.defineMutableProperties(this,{mode:{value:n},url:{value:e.get_docUrl()}})},OSF.DDA.JsomDocument=function(e,t,n){OSF.DDA.JsomDocument.uber.constructor.call(this,e,n),t&&OSF.OUtil.defineEnumerableProperty(this,"bindings",{get:function(){return t}});var r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetSelectedDataAsync,r.SetSelectedDataAsync]),OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))},OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document),OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var e;return OSF&&OSF._OfficeAppFactory&&(e=OSF._OfficeAppFactory.getContext()),e}}),OSF.DDA.License=function(e){OSF.OUtil.defineEnumerableProperty(this,"value",{value:e})},OSF.DDA.ApiMethodCall=function(e,t,n,r,i){var o=e.length,a=OSF.OUtil.delayExecutionAndCache((function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,i)}));this.verifyArguments=function(e,t){for(var n in e){var r=e[n],i=t[n];if(r.enum)switch(typeof i){case"string":if(OSF.OUtil.listContainsValue(r.enum,i))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw a()}if(r.types&&!OSF.OUtil.listContainsValue(r.types,typeof i))throw a()}},this.extractRequiredArguments=function(t,n,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,a,c=e.length-1;c>=s;c--){var u=e[c];switch(typeof u){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);o=u;break;case"function":if(a)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);a=u;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}if(o=l.fillOptions(o,n,r,i),a){if(o[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;o[Microsoft.Office.WebExtension.Parameters.Callback]=a}return l.verifyArguments(t,o),o}(e,i,n,r);return l.constructCallArgs(i,o,n,r)},this.processResponse=function(e,t,n,o){return e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,n,o):t:i?i(e,t):OSF.DDA.ErrorCodeManager.getErrorArgs(e)},this.getCallArgs=function(e){for(var t,n,r=e.length-1;r>=s;r--){var i=e[r];switch(typeof i){case"object":t=i;break;case"function":n=i}}return t=t||{},n&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=n),t}},OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[],n=e.privateStateCallbacks?OSF.OUtil.createObject(e.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(e.requiredArguments||[],t,n,e.onSucceeded,e.onFailed,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.AsyncMethodCalls={},OSF.DDA.AsyncMethodCalls.define=function(e){OSF.DDA.AsyncMethodCalls[e.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(e)},OSF.DDA.Error=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{name:{value:e},message:{value:t},code:{value:n}})},OSF.DDA.AsyncResult=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:e[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}}),e[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:e[OSF.DDA.AsyncResultEnum.Properties.Context]}),t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})},OSF.DDA.issueAsyncResult=function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Callback];if(r){var i,o={};o[OSF.DDA.AsyncResultEnum.Properties.Context]=e[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?o[OSF.DDA.AsyncResultEnum.Properties.Value]=n:(i={},n=n||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=n.name||n,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=n.message||n),r(new OSF.DDA.AsyncResult(o,i))}},OSF.DDA.SyncMethodNames={},OSF.DDA.SyncMethodNames.addNames=function(e){for(var t in e){var n={};OSF.OUtil.defineEnumerableProperties(n,{id:{value:t},displayName:{value:e[t]}}),OSF.DDA.SyncMethodNames[t]=n}},OSF.DDA.SyncMethodCall=function(e,t,n,r,i){var o=e.length,a=new OSF.DDA.ApiMethodCall(e,t,n,r,i);this.verifyAndExtractCall=function(e,n,r){var i=a.extractRequiredArguments(e,n,r),s=function(e,n,r,i){if(e.length>o+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var s,l=e.length-1;l>=o;l--){var c=e[l];switch(typeof c){case"object":if(s)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);s=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}return s=a.fillOptions(s,n,r,i),a.verifyArguments(t,s),s}(e,i,n,r);return a.constructCallArgs(i,s,n,r)}},OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[];return new OSF.DDA.SyncMethodCall(e.requiredArguments||[],t,e.privateStateCallbacks,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.SyncMethodCalls={},OSF.DDA.SyncMethodCalls.define=function(e){OSF.DDA.SyncMethodCalls[e.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(e)},OSF.DDA.ListType=function(){var e={};return{setListType:function(t,n){e[t]=n},isListType:function(t){return OSF.OUtil.listContainsKey(e,t)},getDescriptor:function(t){return e[t]}}}(),OSF.DDA.HostParameterMap=function(e,t){var n={};function r(i,o){var a=i?{}:void 0;for(var s in i){var l,c=i[s];if(OSF.DDA.ListType.isListType(s))for(var u in l=[],c)l.push(r(c[u],o));else if(OSF.OUtil.listContainsKey(n,s))l=n[s][o](c);else if("fromHost"==o&&e.preserveNesting(s))l=r(c,o);else{var d=t[s];if(d){var f=d[o];f&&void 0===(l=f[c])&&(l=c)}else l=c}a[s]=l}return a}function i(n,i,o){var a,s=t[n][o];if("toHost"==o)a=function n(r,i){var o;for(var a in i){var s;if(void 0!=(s=e.isComplexType(a)?n(r,t[a].toHost):r[a])){o||(o={});var l=i[a];"self"==l&&(l=a),o[l]=e.pack(a,s)}}return o}(r(i,o),s);else if("fromHost"==o){a=r(function n(r,i,o){for(var a in o||(o={}),i){var s,l,c=i[a];if("self"==c)s=r;else{if("sourceData"==c){o[a]=r.toArray();continue}s=r[c]}if(null===s||void 0===s)o[a]=void 0;else if(s=e.unpack(a,s),e.isComplexType(a))l=t[a].fromHost,e.preserveNesting(a)?o[a]=n(s,l):n(s,l,o);else if(OSF.DDA.ListType.isListType(a)){(l={})[OSF.DDA.ListType.getDescriptor(a)]="self";var u=new Array(s.length);for(var d in s)u[d]=n(s[d],l);o[a]=u}else o[a]=s}return o}(i,s),o)}return a}n[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(e){if(null!=e&&void 0!==e.rows){var t={};t[OSF.DDA.TableDataProperties.TableRows]=e.rows,t[OSF.DDA.TableDataProperties.TableHeaders]=e.headers,e=t}return e},fromHost:function(e){return e}},n[Microsoft.Office.WebExtension.Parameters.JsonData]={toHost:function(e){return e},fromHost:function(e){return"string"===typeof e?JSON.parse(e):e}},n[Microsoft.Office.WebExtension.Parameters.SampleData]=n[Microsoft.Office.WebExtension.Parameters.Data],t||(t={}),this.addMapping=function(e,n){var r,i;if(n.map)for(var o in i={},r=n.map){var a=r[o];"self"==a&&(a=o),i[a]=o}else r=n.toHost,i=n.fromHost;var s=t[e];if(s){var l=s.toHost;for(var c in l)r[c]=l[c];for(var u in l=s.fromHost)i[u]=l[u]}else s=t[e]={};s.toHost=r,s.fromHost=i},this.toHost=function(e,t){return i(e,t,"toHost")},this.fromHost=function(e,t){return i(e,t,"fromHost")},this.self="self",this.sourceData="sourceData",this.addComplexType=function(t){e.addComplexType(t)},this.getDynamicType=function(t){return e.getDynamicType(t)},this.setDynamicType=function(t,n){e.setDynamicType(t,n)},this.dynamicTypes=n,this.doMapValues=function(e,t){return r(e,t)}},OSF.DDA.SpecialProcessor=function(e,t){this.addComplexType=function(t){e.push(t)},this.getDynamicType=function(e){return t[e]},this.setDynamicType=function(e,n){t[e]=n},this.isComplexType=function(t){return OSF.OUtil.listContainsValue(e,t)},this.isDynamicType=function(e){return OSF.OUtil.listContainsKey(t,e)},this.preserveNesting=function(e){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,e)},this.pack=function(e,n){return this.isDynamicType(e)?t[e].toHost(n):n},this.unpack=function(e,n){return this.isDynamicType(e)?t[e].fromHost(n):n}},OSF.DDA.getDecoratedParameterMap=function(e,t){var n=new OSF.DDA.HostParameterMap(e);n.self;function r(e){var t=null;if(e){t={};for(var n=e.length,r=0;r0){for(var r=[],i=0;i=i)break;if(r=Function._validateParameter(e[o],s,l))return r.popStackFrame(),r}return null}),Function._validateParameterCount||(Function._validateParameterCount=function(e,t,r){var i,o,a=t.length,s=e.length;if(sa)for(o=!0,i=0;i0&&t.push(o)}}}catch(e){}return t}var t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){return{toHost:function(e){if(OSF.DDA.TableDataProperties&&"string"!=typeof e&&void 0!==e[OSF.DDA.TableDataProperties.TableRows]){var t=[];t[0]=e[OSF.DDA.TableDataProperties.TableRows],t[1]=e[OSF.DDA.TableDataProperties.TableHeaders],e=t}return e},fromHost:function(t){var n;if(t.toArray)if(2===t.dimensions())n=e(t);else{var r=t.toArray();2===r.length&&(null!=r[0]&&r[0].toArray||null!=r[1]&&r[1].toArray)?((n={})[OSF.DDA.TableDataProperties.TableRows]=e(r[0]),n[OSF.DDA.TableDataProperties.TableHeaders]=e(r[1])):n=r}else n=t;return n}}}(),OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,[],t),this.unpack=function(e,n){var r;this.isComplexType(e)||OSF.DDA.ListType.isListType(e)?r=void 0!==n&&void 0!==n.toArray?n.toArray():n||{}:r=this.isDynamicType(e)?t[e].fromHost(n):n;return r}},OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor),OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]}),OSF.DDA.SafeArray.Delegate.executeAsync=function(e){function t(e){var n=e;if(null!=e&&e.toArray){var r=e.toArray();n=new Array(r.length);for(var i=0;i2){a=[];for(var s=1;s=2){t[0];n=t[1]}if(r)return r(new e.WebViewSafeArray(n))}))},t.prototype.registerEvent=function(t,n,r,i){this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.RegisterEvent,t,n,(function(t){var n=t,i=0;OSF.OUtil.isArray(t)&&t.length>=2&&(i=t[0],n=t[1]),r&&r(i,new e.WebViewSafeArray(n))}),(function(t){if(i)return i(new e.WebViewSafeArray(t))}))},t.prototype.unregisterEvent=function(t,n,r){this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.UnregisterEvent,t,n,(function(t){return r(new e.WebViewSafeArray(t))}))},t.prototype.messageParent=function(e){var t=e[Microsoft.Office.WebExtension.Parameters.MessageToParent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString()),this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.MessageParent,t,null)},t.prototype.openDialog=function(e,t,n,r){var i=JSON.parse(t);(isNaN(i.width)||i.width<=0||!i.useDeviceIndependentPixels&&i.width>100)&&(i.width=99),(isNaN(i.height)||i.height<=0||!i.useDeviceIndependentPixels&&i.height>100)&&(i.height=99),t=JSON.stringify(i),this.registerEvent(e,t,n,r)},t.prototype.closeDialog=function(e,t,n){this.unregisterEvent(e,t,n)},t.prototype.sendMessage=function(e){var t=e[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString()),this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.SendMessage,t,null)},t.prototype.closeSdxDialog=function(e){},t.prototype.resizeSdxDialog=function(e,t){},t}();e.WebViewHostController=t}(OSFWebView||(OSFWebView={})),function(e){!function(e){e[e.MethodCallback=0]="MethodCallback",e[e.EventCallback=1]="EventCallback"}(e.CallbackType||(e.CallbackType={}));var t=function(){return function(e,t,n){this.callbackType=e,this.callbackId=t,this.params=n}}();e.CallbackData=t}(CrossIFrameCommon||(CrossIFrameCommon={})),function(e){var t=function(){function e(){window.addEventListener("message",this.OnReceiveMessage)}return e.prototype.postMessage=function(e,t){window.parent.postMessage(t,"*")},e.prototype.OnReceiveMessage=function(e){if(e.source==window.parent&&window.parent==window.top&&e.origin.startsWith("ms-appx-web://")){var t;try{t=JSON.parse(e.data)}catch(e){return}switch(t.callbackType){case CrossIFrameCommon.CallbackType.MethodCallback:OSFWebView.ScriptMessaging.agaveHostCallback(t.callbackId,JSON.parse(t.params));break;case CrossIFrameCommon.CallbackType.EventCallback:OSFWebView.ScriptMessaging.agaveHostEventCallback(t.callbackId,JSON.parse(t.params))}}},e}();e.Poster=t}(WinRT||(WinRT={})),OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(e){return function(t){var n=function(e,n){t.onReceiving&&t.onReceiving(),t.onComplete&&t.onComplete(e,n)};try{e(t.hostCallArgs,t.onCalling,n)}catch(e){n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,{name:Strings.OfficeOM.L_InternalError,message:e})}}},read:function(e,t){e&&e();OSF._OfficeAppFactory.getInitializationHelper().getAppContext(null,(function(e){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,e.get_settings())}))},write:function(e,t,n,r){var i={},o=[],a=[];for(var s in e)o.push(s),a.push(e[s]);i.keys=o,i.values=a,n&&n();OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.WriteSettings,i,(function(e){r&&r(e[0],null)}))}},OSF.InitializationHelper.prototype.initializeSettings=function(e,t){var n=e.get_settings();return this.deserializeSettings(n,t)},OSF.InitializationHelper.prototype.getAppContext=function(e,t){var n;n=this._hostInfo.isDialog?OSF.WebView.PopupMessageHandlerName:OSF.WebView.MessageHandlerName,OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(n,OSF.WebView.MethodId.GetContext,[],(function(e){var n,r=OSF.WebView.AppContextProperties,i=e[r.AppType],o=!1;for(var a in OSF.AppName)if(OSF.AppName[a]==i){o=!0;break}if(!o)throw"Unsupported client type "+i;for(var s=e[r.Settings],l={},c=s[0],u=s[1],d=0;d0&&OSF.OUtil.focusToFirstTabbable(t,!1)}}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("Setting Agave default focus failed. Exception:"+e)}};document.body?t():document.addEventListener("DOMContentLoaded",t),window.addEventListener("blur",(function(){try{document.activeElement&&document.activeElement.blur()}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("Clearing Agave focus failed. Exception:"+e)}}))},OSF.WebView=OSFWebView,OSF.ClientHostController=new OSFWebView.WebViewHostController(OSF.ScriptMessaging.GetScriptMessenger("agaveHostCallback","agaveHostEventCallback",new WinRT.Poster)),function(e){var t=function(){function e(e){this._table=e,this._fields={}}return Object.defineProperty(e.prototype,"Fields",{get:function(){return this._fields},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Table",{get:function(){return this._table},enumerable:!0,configurable:!0}),e.prototype.SerializeFields=function(){},e.prototype.SetSerializedField=function(e,t){"undefined"!==typeof t&&null!==t&&(this._serializedFields[e]=t.toString())},e.prototype.SerializeRow=function(){return this._serializedFields={},this.SetSerializedField("Table",this._table),this.SerializeFields(),JSON.stringify(this._serializedFields)},e}();e.BaseUsageData=t;var n=function(e){function t(){return e.call(this,"AppActivated")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppId",{get:function(){return this.Fields.AppId},set:function(e){this.Fields.AppId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppInstanceId",{get:function(){return this.Fields.AppInstanceId},set:function(e){this.Fields.AppInstanceId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppURL",{get:function(){return this.Fields.AppURL},set:function(e){this.Fields.AppURL=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AssetId",{get:function(){return this.Fields.AssetId},set:function(e){this.Fields.AssetId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Browser",{get:function(){return this.Fields.Browser},set:function(e){this.Fields.Browser=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"UserId",{get:function(){return this.Fields.UserId},set:function(e){this.Fields.UserId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Host",{get:function(){return this.Fields.Host},set:function(e){this.Fields.Host=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HostVersion",{get:function(){return this.Fields.HostVersion},set:function(e){this.Fields.HostVersion=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ClientId",{get:function(){return this.Fields.ClientId},set:function(e){this.Fields.ClientId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeWidth",{get:function(){return this.Fields.AppSizeWidth},set:function(e){this.Fields.AppSizeWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeHeight",{get:function(){return this.Fields.AppSizeHeight},set:function(e){this.Fields.AppSizeHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Message",{get:function(){return this.Fields.Message},set:function(e){this.Fields.Message=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"DocUrl",{get:function(){return this.Fields.DocUrl},set:function(e){this.Fields.DocUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OfficeJSVersion",{get:function(){return this.Fields.OfficeJSVersion},set:function(e){this.Fields.OfficeJSVersion=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HostJSVersion",{get:function(){return this.Fields.HostJSVersion},set:function(e){this.Fields.HostJSVersion=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"WacHostEnvironment",{get:function(){return this.Fields.WacHostEnvironment},set:function(e){this.Fields.WacHostEnvironment=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"IsFromWacAutomation",{get:function(){return this.Fields.IsFromWacAutomation},set:function(e){this.Fields.IsFromWacAutomation=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"IsMOS",{get:function(){return this.Fields.IsMOS},set:function(e){this.Fields.IsMOS=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("AppId",this.AppId),this.SetSerializedField("AppInstanceId",this.AppInstanceId),this.SetSerializedField("AppURL",this.AppURL),this.SetSerializedField("AssetId",this.AssetId),this.SetSerializedField("Browser",this.Browser),this.SetSerializedField("UserId",this.UserId),this.SetSerializedField("Host",this.Host),this.SetSerializedField("HostVersion",this.HostVersion),this.SetSerializedField("ClientId",this.ClientId),this.SetSerializedField("AppSizeWidth",this.AppSizeWidth),this.SetSerializedField("AppSizeHeight",this.AppSizeHeight),this.SetSerializedField("Message",this.Message),this.SetSerializedField("DocUrl",this.DocUrl),this.SetSerializedField("OfficeJSVersion",this.OfficeJSVersion),this.SetSerializedField("HostJSVersion",this.HostJSVersion),this.SetSerializedField("WacHostEnvironment",this.WacHostEnvironment),this.SetSerializedField("IsFromWacAutomation",this.IsFromWacAutomation),this.SetSerializedField("IsMOS",this.IsMOS)},t}(t);e.AppActivatedUsageData=n;var r=function(e){function t(){return e.call(this,"ScriptLoad")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ScriptId",{get:function(){return this.Fields.ScriptId},set:function(e){this.Fields.ScriptId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"StartTime",{get:function(){return this.Fields.StartTime},set:function(e){this.Fields.StartTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ResponseTime",{get:function(){return this.Fields.ResponseTime},set:function(e){this.Fields.ResponseTime=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("ScriptId",this.ScriptId),this.SetSerializedField("StartTime",this.StartTime),this.SetSerializedField("ResponseTime",this.ResponseTime)},t}(t);e.ScriptLoadUsageData=r;var i=function(e){function t(){return e.call(this,"AppClosed")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"FocusTime",{get:function(){return this.Fields.FocusTime},set:function(e){this.Fields.FocusTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeFinalWidth",{get:function(){return this.Fields.AppSizeFinalWidth},set:function(e){this.Fields.AppSizeFinalWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeFinalHeight",{get:function(){return this.Fields.AppSizeFinalHeight},set:function(e){this.Fields.AppSizeFinalHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OpenTime",{get:function(){return this.Fields.OpenTime},set:function(e){this.Fields.OpenTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"CloseMethod",{get:function(){return this.Fields.CloseMethod},set:function(e){this.Fields.CloseMethod=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("FocusTime",this.FocusTime),this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth),this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight),this.SetSerializedField("OpenTime",this.OpenTime),this.SetSerializedField("CloseMethod",this.CloseMethod)},t}(t);e.AppClosedUsageData=i;var o=function(e){function t(){return e.call(this,"APIUsage")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"APIType",{get:function(){return this.Fields.APIType},set:function(e){this.Fields.APIType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"APIID",{get:function(){return this.Fields.APIID},set:function(e){this.Fields.APIID=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Parameters",{get:function(){return this.Fields.Parameters},set:function(e){this.Fields.Parameters=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ResponseTime",{get:function(){return this.Fields.ResponseTime},set:function(e){this.Fields.ResponseTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ErrorType",{get:function(){return this.Fields.ErrorType},set:function(e){this.Fields.ErrorType=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("APIType",this.APIType),this.SetSerializedField("APIID",this.APIID),this.SetSerializedField("Parameters",this.Parameters),this.SetSerializedField("ResponseTime",this.ResponseTime),this.SetSerializedField("ErrorType",this.ErrorType)},t}(t);e.APIUsageUsageData=o;var a=function(e){function t(){return e.call(this,"AppInitialization")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SuccessCode",{get:function(){return this.Fields.SuccessCode},set:function(e){this.Fields.SuccessCode=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Message",{get:function(){return this.Fields.Message},set:function(e){this.Fields.Message=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("SuccessCode",this.SuccessCode),this.SetSerializedField("Message",this.Message)},t}(t);e.AppInitializationUsageData=a;var s=function(e){function t(){return e.call(this,"CheckWACHost")||this}return __extends(t,e),Object.defineProperty(t.prototype,"isWacKnownHost",{get:function(){return this.Fields.isWacKnownHost},set:function(e){this.Fields.isWacKnownHost=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this.Fields.instanceId},set:function(e){this.Fields.instanceId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostType",{get:function(){return this.Fields.hostType},set:function(e){this.Fields.hostType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostPlatform",{get:function(){return this.Fields.hostPlatform},set:function(e){this.Fields.hostPlatform=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wacDomain",{get:function(){return this.Fields.wacDomain},set:function(e){this.Fields.wacDomain=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLocalStorageAvailable",{get:function(){return this.Fields.isLocalStorageAvailable},set:function(e){this.Fields.isLocalStorageAvailable=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("isWacKnownHost",this.isWacKnownHost),this.SetSerializedField("instanceId",this.instanceId),this.SetSerializedField("hostType",this.hostType),this.SetSerializedField("hostPlatform",this.hostPlatform),this.SetSerializedField("wacDomain",this.wacDomain),this.SetSerializedField("isLocalStorageAvailable",this.isLocalStorageAvailable)},t}(t);e.CheckWACHostUsageData=s}(OSFLog||(OSFLog={})),function(e){"use strict";!function(e){e[e.info=0]="info",e[e.warning=1]="warning",e[e.error=2]="error"}(e.TraceLevel||(e.TraceLevel={})),function(e){e[e.none=0]="none",e[e.flush=1]="flush"}(e.SendFlag||(e.SendFlag={})),e.allowUploadingData=function(){},e.sendLog=function(e,t,n){};var t=function(){function e(){}return e.prototype.writeLog=function(e){},e.prototype.loadProxyFrame=function(){},e}();OSF.Logger||(OSF.Logger=e),e.ulsEndpoint=function(){try{return new t}catch(e){return null}}()}(Logger||(Logger={})),function(e){var t=[{name:"AppActivated",enabled:!0,critical:!0,points:[{name:"Browser",type:"string"},{name:"Message",type:"string"},{name:"Host",type:"string"},{name:"AppSizeWidth",type:"int64"},{name:"AppSizeHeight",type:"int64"},{name:"IsFromWacAutomation",type:"string"},{name:"IsMOS",type:"int64"}]},{name:"ScriptLoad",enabled:!0,critical:!1,points:[{name:"ScriptId",type:"string"},{name:"StartTime",type:"double"},{name:"ResponseTime",type:"double"}]},{name:"APIUsage",enabled:function(){if(!OSF._OfficeAppFactory||!OSF._OfficeAppFactory.getHostInfo)return!1;var e=OSF._OfficeAppFactory.getHostInfo();if(!e)return!1;switch(e.hostType){case"outlook":switch(e.hostPlatform){case"mac":case"web":return!0;default:return!1}default:return!1}}(),critical:!1,points:[{name:"APIType",type:"string"},{name:"APIID",type:"int64"},{name:"Parameters",type:"string"},{name:"ResponseTime",type:"int64"},{name:"ErrorType",type:"int64"}]},{name:"AppInitialization",enabled:!0,critical:!1,points:[{name:"SuccessCode",type:"int64"},{name:"Message",type:"string"}]},{name:"AppClosed",enabled:!0,critical:!1,points:[{name:"FocusTime",type:"int64"},{name:"AppSizeFinalWidth",type:"int64"},{name:"AppSizeFinalHeight",type:"int64"},{name:"OpenTime",type:"int64"}]},{name:"CheckWACHost",enabled:!0,critical:!1,points:[{name:"isWacKnownHost",type:"int64"},{name:"solutionId",type:"string"},{name:"hostType",type:"string"},{name:"hostPlatform",type:"string"},{name:"correlationId",type:"string"},{name:"isLocalStorageAvailable",type:"boolean"}]}];function n(e,t){var n=void 0===t.rename?t.name:t.rename,r=void 0;switch(t.type){case"string":r=oteljs.makeStringDataField(n,e);break;case"double":"string"===typeof e&&(e=parseFloat(e)),r=oteljs.makeDoubleDataField(n,e);break;case"int64":"string"===typeof e&&(e=parseInt(e)),r=oteljs.makeInt64DataField(n,e);break;case"boolean":"string"===typeof e&&(e="true"===e),r=oteljs.makeBooleanDataField(n,e)}return r}function r(e){for(var n=0,r=t;nn[i])return!1}return!1},e.prototype.isDirectToAriaEnabled=function(){if(void 0===this.EnableDirectToAria||null===this.EnableDirectToAria){var e=void 0,t=void 0;OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&(e=OSF._OfficeAppFactory.getHostInfo().hostPlatform),window.external&&"undefined"!==typeof window.external.GetContext&&"undefined"!==typeof window.external.GetContext().GetHostFullVersion&&(t=window.external.GetContext().GetHostFullVersion()),this.EnableDirectToAria=this.shouldSendDirectToAria(e,t)}return this.EnableDirectToAria},e.prototype.sendTelemetry=function(t,n){e.EnableSendingTelemetryWithLegacyAria&&this.isDirectToAriaEnabled()&&OSF.OUtil.loadScript(this.getAriaCDNLocation(),(function(){try{if(!this.ALogger){this.ALogger=AWTLogManager.initialize("db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439")}var e=new AWTEventProperties;for(var r in e.setName("Office.Extensibility.OfficeJS."+t),n)"table"!==r.toLowerCase()&&e.setProperty(r,n[r]);var i=new Date;e.setProperty("Date",i.toISOString()),this.ALogger.logEvent(e)}catch(e){}}),1e3),e.EnableSendingTelemetryWithOTel&&i(t,n)},e.prototype.logData=function(e){this.isIUsageData(e)?this.sendTelemetry(e.Table,e.Fields):this.sendTelemetry(e.Table,e)},e.EnableSendingTelemetryWithOTel=!0,e.EnableSendingTelemetryWithLegacyAria=!1,e}();e.AriaLogger=o}(OSFAriaLogger||(OSFAriaLogger={})),function(e){"use strict";var t,n=OSF.OUtil.Guid.generateNewGuid(),r="",i=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i");e.enableTelemetry=!0;var o=function(){return function(){}}();e.AppInfo=o;var a=function(){return function(e,t){this.name=e,this.handler=t}}(),s=function(){function e(){this.clientIDKey="Office API client",this.logIdSetKey="Office App Log Id Set"}return e.prototype.getClientId=function(){var e=this.getValue(this.clientIDKey);return(!e||e.length<=0||e.length>40)&&(e=OSF.OUtil.Guid.generateNewGuid(),this.setValue(this.clientIDKey,e)),e},e.prototype.saveLog=function(e,t){var n=this.getValue(this.logIdSetKey);n=(n&&n.length>0?n+";":"")+e,this.setValue(this.logIdSetKey,n),this.setValue(e,t)},e.prototype.enumerateLog=function(e,t){var n=this.getValue(this.logIdSetKey);if(n){var r=n.split(";");for(var i in r){var o=r[i],a=this.getValue(o);a&&(e&&e(o,a),t&&this.remove(o))}t&&this.remove(this.logIdSetKey)}},e.prototype.getValue=function(e){var t=OSF.OUtil.getLocalStorage(),n="";return t&&(n=t.getItem(e)),n},e.prototype.setValue=function(e,t){var n=OSF.OUtil.getLocalStorage();n&&n.setItem(e,t)},e.prototype.remove=function(e){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(e)}catch(e){}},e}(),l=function(){function t(){}return t.prototype.LogData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(e){}},t.prototype.LogRawData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(e){}},t}();function c(e){return e&&(e=e.replace(/[{}]/g,"").toLowerCase()),e||""}function u(e,t){var i=new OSFLog.AppInitializationUsageData;i.CorrelationId=c(r),i.SessionId=n,i.SuccessCode=e?1:0,i.Message=t,(new l).LogData(i)}function d(){var e=0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.PublicAddin);return e||!!t&&p(OSF._OfficeAppFactory.getHostInfo().hostPlatform,t.hostVersion)}function f(e,t){return d()||t!==e?t:"PRIVATE"}function p(e,t){var n=!1,r=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(t);if(r){var i=parseInt(r[1]),o=parseInt(r[2]),a=parseInt(r[3]);"win32"==e?(i<16||16==i&&a<14225)&&(n=!0):"mac"==e&&(i<16||16==i&&(o<52||52==o&&a<808))&&(n=!0)}return n}function h(){return 0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.IsMos)}e.initialize=function(r){if(e.enableTelemetry&&!t){t=new o,r.get_hostFullVersion()?t.hostVersion=r.get_hostFullVersion():t.hostVersion=r.get_appVersion(),t.appId=d()?r.get_id():"PRIVATE",t.marketplaceType=r._marketplaceType,t.browser=window.navigator.userAgent,t.correlationId=c(r.get_correlationId()),t.clientId=(new s).getClientId(),t.appInstanceId=r.get_appInstanceId(),t.appInstanceId&&(t.appInstanceId=c(t.appInstanceId),t.appInstanceId=f(r.get_id(),t.appInstanceId)),t.message=r.get_hostCustomMessage(),t.officeJSVersion=OSF.ConstantNames.FileVersion,t.hostJSVersion="0.0.0.0",r._wacHostEnvironment&&(t.wacHostEnvironment=r._wacHostEnvironment),void 0!==r._isFromWacAutomation&&null!==r._isFromWacAutomation&&(t.isFromWacAutomation=r._isFromWacAutomation.toString().toLowerCase());var l=r.get_docUrl();t.docUrl=i.test(l)?l:"";var u=location.href;u&&(u=u.split("?")[0].split("#")[0]),t.isMos=h(),t.appURL="",function(e,t){var n,r;t.assetId="",t.userId="";try{n=decodeURIComponent(e);var i=(r=(new DOMParser).parseFromString(n,"text/xml")).getElementsByTagName("t")[0].attributes.getNamedItem("cid"),o=r.getElementsByTagName("t")[0].attributes.getNamedItem("oid");i&&i.nodeValue?t.userId=i.nodeValue:o&&o.nodeValue&&(t.userId=o.nodeValue),t.assetId=r.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(e){}finally{n=null,r=null,null}}(r.get_eToken(),t),t.sessionId=n,"undefined"!==typeof OTel&&OTel.OTelLogger.initialize(t),function(){var t=new Date,n=null,r=0,i=!1,o=function(){document.hasFocus()?null==n&&(n=new Date):n&&(r+=Math.abs((new Date).getTime()-n.getTime()),n=null)},s=[];s.push(new a("focus",o)),s.push(new a("blur",o)),s.push(new a("focusout",o)),s.push(new a("focusin",o));var l=function(){for(var o=0;o0)for(var r=0;r0)for(var r=0;r0&&(this._eventHandlers[e]=[],!0)},clearObjectEventHandlers:function(e,t){return null!=this._objectEventHandlers[e]&&null!=this._objectEventHandlers[e][t]&&(this._objectEventHandlers[e][t]=[],!0)},getEventHandlerCount:function(e){return void 0!=this._eventHandlers[e]?this._eventHandlers[e].length:-1},getObjectEventHandlerCount:function(e,t){return null==this._objectEventHandlers[e]||null==this._objectEventHandlers[e][t]?0:this._objectEventHandlers[e][t].length},fireEvent:function(e){if(void 0==e.type)return!1;var t=e.type;if(t&&this._eventHandlers[t]){for(var n=this._eventHandlers[t],r=0;r0){for(var r=t[0];n.length>0;){r(n.shift())}return!0}}return!1},clearQueuedEvent:function(e){e&&this._eventHandlers[e]&&(this._queuedEventsArgs[e]&&(this._queuedEventsArgs[e]=[]))}},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureEventArgs=function(e,t,n){var r;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(n,t.document),n[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(n,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(n),"outlook"==OSF._OfficeAppFactory.getHostInfo().hostType&&"mac"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&OSF.DDA.convertOlkAppointmentTimeToDateFormat(r);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(e,n[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(e,n);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkItemSelectedChangedEventArgs(n),t.initialize(r.initialData),"win32"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform&&"mac"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform||t.setCurrentItemNumber(r.itemNumber.itemNumber);break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecipientsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecurrenceChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAttachmentsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.InfobarClicked:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkInfobarClickedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SelectedItemsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkSelectedItemsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.SensitivityLabelChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkSensitivityLabelChangedEventArgs(n);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return r},OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"}),OSF.DDA.SettingsChangedEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:e}})},OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(e,t){return t}}],onSucceeded:function(e,t,n){var r=e[OSF.DDA.SettingsManager.SerializedSettings],i=OSF.DDA.SettingsManager.deserializeSettings(r),o=n[OSF.DDA.SettingsManager.RefreshingSettings];for(var a in o)t.remove(a);for(var a in i)t.set(a,i[a]);return t}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(e,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent}),Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"},OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType},OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"}),OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"}),OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties),OSF.DDA.BindingPromise=function(e,t){this._id=e,OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(e){var n=typeof e;if("undefined"!=n&&"function"!=n)throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,n);t=e}})},OSF.DDA.BindingPromise.prototype={_fetch:function(e){if(this.binding)e&&e(this.binding);else if(!this._binding){var t=this;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(this._id,(function(n){n.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(t,"binding",{value:n.value}),e&&e(t.binding)):t.onFail&&t.onFail(n)}))}return this},getDataAsync:function(){var e=arguments;return this._fetch((function(t){t.getDataAsync.apply(t,e)})),this},setDataAsync:function(){var e=arguments;return this._fetch((function(t){t.setDataAsync.apply(t,e)})),this},addHandlerAsync:function(){var e=arguments;return this._fetch((function(t){t.addHandlerAsync.apply(t,e)})),this},removeHandlerAsync:function(){var e=arguments;return this._fetch((function(t){t.removeHandlerAsync.apply(t,e)})),this}},OSF.DDA.BindingFacade=function(e){this._eventDispatches=[],OSF.OUtil.defineEnumerableProperty(this,"document",{value:e});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])},OSF.DDA.UnknownBinding=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:e}})},OSF.DDA.Binding=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:e}});var n=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[n.GetDataAsync,n.SetDataAsync]);var r=Microsoft.Office.WebExtension.EventType,i=t.bindings._eventDispatches;i[e]||(i[e]=new OSF.EventDispatch([r.BindingSelectionChanged,r.BindingDataChanged]));var o=i[e];OSF.DDA.DispIdHost.addEventSupport(this,o)},OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureBinding=function(e,t){var n,r=e[OSF.DDA.BindingProperties.Id],i=e[OSF.DDA.BindingProperties.RowCount],o=e[OSF.DDA.BindingProperties.ColumnCount],a=e[OSF.DDA.BindingProperties.HasHeaders];switch(e[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:n=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:n=new OSF.DDA.MatrixBinding(r,t,i,o);break;case Microsoft.Office.WebExtension.BindingType.Table:n=new(function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument}()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding)(r,t,i,o,a);break;default:n=new OSF.DDA.UnknownBinding(r,t)}return n},OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function e(e){return OSF.DDA.OMFactory.manufactureBinding(e,Microsoft.Office.WebExtension.context.document)}function t(e){return e.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,enum:Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:e}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,enum:Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:e}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(t){return OSF.OUtil.mapList(t[OSF.DDA.ListDescriptors.BindingList],e)}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(e,t,n){var r=n[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{enum:Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{enum:Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:["object","string"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:["number"],defaultValue:0}}],checkCallArgs:function(e,t,n){if(0==e[Microsoft.Office.WebExtension.Parameters.StartRow]&&0==e[Microsoft.Office.WebExtension.Parameters.StartColumn]&&0==e[Microsoft.Office.WebExtension.Parameters.RowCount]&&0==e[Microsoft.Office.WebExtension.Parameters.ColumnCount]&&(delete e[Microsoft.Office.WebExtension.Parameters.StartRow],delete e[Microsoft.Office.WebExtension.Parameters.StartColumn],delete e[Microsoft.Office.WebExtension.Parameters.RowCount],delete e[Microsoft.Office.WebExtension.Parameters.ColumnCount]),e[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(e[Microsoft.Office.WebExtension.Parameters.StartRow]||e[Microsoft.Office.WebExtension.Parameters.StartColumn]||e[Microsoft.Office.WebExtension.Parameters.RowCount]||e[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return e},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:t}],onSucceeded:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(void 0!=r[OSF.DDA.TableDataProperties.TableRows]||void 0!=r[OSF.DDA.TableDataProperties.TableHeaders])&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),void 0==(r=OSF.DDA.DataCoercion.coerceData(r,n[Microsoft.Office.WebExtension.Parameters.CoercionType]))?null:r}}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e){return OSF.DDA.DataCoercion.determineCoercionType(e[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:["object","string"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:["number"],defaultValue:0}}],checkCallArgs:function(e,t,n){if(0==e[Microsoft.Office.WebExtension.Parameters.StartRow]&&0==e[Microsoft.Office.WebExtension.Parameters.StartColumn]&&(delete e[Microsoft.Office.WebExtension.Parameters.StartRow],delete e[Microsoft.Office.WebExtension.Parameters.StartColumn]),e[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(e[Microsoft.Office.WebExtension.Parameters.StartRow]||e[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return e},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:t}]})}(),OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"}),OSF.DDA.MatrixBinding=function(e,t,n,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,e,t),OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:n||0},columnCount:{value:r||0}})},OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]}),OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"}),OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"}),OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"},OSF.DDA.TableBinding=function(e,t,n,r,i){OSF.DDA.TableBinding.uber.constructor.call(this,e,t),OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:n||0},columnCount:{value:r||0},hasHeaders:{value:i||!1}});var o=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[o.AddRowsAsync,o.AddColumnsAsync,o.DeleteAllDataValuesAsync])},OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding),OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function e(e){return e.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]})}(),OSF.DDA.TextBinding=function(e,t){OSF.DDA.TextBinding.uber.constructor.call(this,e,t),OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})},OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding),OSF.DDA.AsyncMethodNames.addNames({AddFromPromptAsync:"addFromPromptAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,enum:Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:["string"],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:function(e){return OSF.DDA.OMFactory.manufactureBinding(e,Microsoft.Office.WebExtension.context.document)}}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:2}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"}),OSF.DDA.DocumentSelectionChangedEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:e}})},OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"}),OSF.DDA.ObjectEventArgs=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:e},object:{value:t}})},OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"}),OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"}),OSF.DDA.BindingSelectionChangedEventArgs=function(e,t){for(var n in OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:e}}),t)OSF.OUtil.defineEnumerableProperty(this,n,{value:t[n]})},OSF.DDA.BindingDataChangedEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:e}})},OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType,{OnlyVisible:"onlyVisible"}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.OnlyVisible,value:1}]}),Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"},Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"},Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"},OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,enum:Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{enum:Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]}),OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]}),OSF.OUtil.setNamespace("RichApi",OSF.DDA),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.FilePropertiesDescriptor={Url:"Url"},OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"}),Microsoft.Office.WebExtension.FileProperties=function(e){OSF.OUtil.defineEnumerableProperties(this,{url:{value:e[OSF.DDA.FilePropertiesDescriptor.Url]}})},OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(e,t,n){return new Microsoft.Office.WebExtension.FileProperties(e)}}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]}),OSF.DDA.ExcelTableBinding=function(e,t,n,r,i){var o=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[o.ClearFormatsAsync,o.SetTableOptionsAsync,o.SetFormatsAsync]),OSF.DDA.ExcelTableBinding.uber.constructor.call(this,e,t,n,r,i),OSF.OUtil.finalizeProperties(this)},OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e){return OSF.DDA.DataCoercion.determineCoercionType(e[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:["object"],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:["object"],defaultValue:[]}}],privateStateCallbacks:[]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{enum:Microsoft.Office.WebExtension.CoercionType,calculate:function(e){return OSF.DDA.DataCoercion.determineCoercionType(e[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:["object","string"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:["object"],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:["object"],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:["object"],defaultValue:[]}}],checkCallArgs:function(e,t,n){var r=Microsoft.Office.WebExtension.Parameters;if(0==e[r.StartRow]&&0==e[r.StartColumn]&&OSF.OUtil.isArray(e[r.CellFormat])&&0===e[r.CellFormat].length&&OSF.OUtil.isArray(e[r.TableOptions])&&0===e[r.TableOptions].length&&(delete e[r.StartRow],delete e[r.StartColumn],delete e[r.CellFormat],delete e[r.TableOptions]),e[r.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(e[r.StartRow]&&0!=e[r.StartRow]||e[r.StartColumn]&&0!=e[r.StartColumn]||e[r.CellFormat]||e[r.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return e},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(e){return e.id}}]}),OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var e=arguments;return this._fetch((function(t){t.setTableOptionsAsync.apply(t,e)})),this},OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var e=arguments;return this._fetch((function(t){t.setFormatsAsync.apply(t,e)})),this},OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var e=arguments;return this._fetch((function(t){t.clearFormatsAsync.apply(t,e)})),this}}(),function(){function e(e){return e.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]}),OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]})}(),Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2},function(){OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:1}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:3}]}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:4},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:5}]});var e={headerRow:0,bandedRows:1,firstColumn:2,lastColumn:3,bandedColumns:4,filterButton:5,style:6,totalRow:7},t={row:0,column:1},n={alignHorizontal:{text:"alignHorizontal",type:1},alignVertical:{text:"alignVertical",type:2},backgroundColor:{text:"backgroundColor",type:101},borderStyle:{text:"borderStyle",type:201},borderColor:{text:"borderColor",type:202},borderTopStyle:{text:"borderTopStyle",type:203},borderTopColor:{text:"borderTopColor",type:204},borderBottomStyle:{text:"borderBottomStyle",type:205},borderBottomColor:{text:"borderBottomColor",type:206},borderLeftStyle:{text:"borderLeftStyle",type:207},borderLeftColor:{text:"borderLeftColor",type:208},borderRightStyle:{text:"borderRightStyle",type:209},borderRightColor:{text:"borderRightColor",type:210},borderOutlineStyle:{text:"borderOutlineStyle",type:211},borderOutlineColor:{text:"borderOutlineColor",type:212},borderInlineStyle:{text:"borderInlineStyle",type:213},borderInlineColor:{text:"borderInlineColor",type:214},fontFamily:{text:"fontFamily",type:301},fontStyle:{text:"fontStyle",type:302},fontSize:{text:"fontSize",type:303},fontUnderlineStyle:{text:"fontUnderlineStyle",type:304},fontColor:{text:"fontColor",type:305},fontDirection:{text:"fontDirection",type:306},fontStrikethrough:{text:"fontStrikethrough",type:307},fontSuperscript:{text:"fontSuperscript",type:308},fontSubscript:{text:"fontSubscript",type:309},fontNormal:{text:"fontNormal",type:310},indentLeft:{text:"indentLeft",type:401},indentRight:{text:"indentRight",type:402},numberFormat:{text:"numberFormat",type:501},width:{text:"width",type:701},height:{text:"height",type:702},wrapping:{text:"wrapping",type:703}},r=[{name:"none",value:0},{name:"thin",value:1},{name:"medium",value:2},{name:"dashed",value:3},{name:"dotted",value:4},{name:"thick",value:5},{name:"double",value:6},{name:"hair",value:7},{name:"medium dashed",value:8},{name:"dash dot",value:9},{name:"medium dash dot",value:10},{name:"dash dot dot",value:11},{name:"medium dash dot dot",value:12},{name:"slant dash dot",value:13}],i=[{name:"none",value:0},{name:"black",value:1},{name:"blue",value:2},{name:"gray",value:3},{name:"green",value:4},{name:"orange",value:5},{name:"pink",value:6},{name:"purple",value:7},{name:"red",value:8},{name:"teal",value:9},{name:"turquoise",value:10},{name:"violet",value:11},{name:"white",value:12},{name:"yellow",value:13},{name:"automatic",value:14}],o=OSF.DDA.SafeArray.Delegate.ParameterMap;o.define({type:n.alignHorizontal.text,toHost:[{name:"general",value:0},{name:"left",value:1},{name:"center",value:2},{name:"right",value:3},{name:"fill",value:4},{name:"justify",value:5},{name:"center across selection",value:6},{name:"distributed",value:7}]}),o.define({type:n.alignVertical.text,toHost:[{name:"top",value:0},{name:"center",value:1},{name:"bottom",value:2},{name:"justify",value:3},{name:"distributed",value:4}]}),o.define({type:n.backgroundColor.text,toHost:i}),o.define({type:n.borderStyle.text,toHost:r}),o.define({type:n.borderColor.text,toHost:i}),o.define({type:n.borderTopStyle.text,toHost:r}),o.define({type:n.borderTopColor.text,toHost:i}),o.define({type:n.borderBottomStyle.text,toHost:r}),o.define({type:n.borderBottomColor.text,toHost:i}),o.define({type:n.borderLeftStyle.text,toHost:r}),o.define({type:n.borderLeftColor.text,toHost:i}),o.define({type:n.borderRightStyle.text,toHost:r}),o.define({type:n.borderRightColor.text,toHost:i}),o.define({type:n.borderOutlineStyle.text,toHost:r}),o.define({type:n.borderOutlineColor.text,toHost:i}),o.define({type:n.borderInlineStyle.text,toHost:r}),o.define({type:n.borderInlineColor.text,toHost:i}),o.define({type:n.fontStyle.text,toHost:[{name:"regular",value:0},{name:"italic",value:1},{name:"bold",value:2},{name:"bold italic",value:3}]}),o.define({type:n.fontUnderlineStyle.text,toHost:[{name:"none",value:0},{name:"single",value:1},{name:"double",value:2},{name:"single accounting",value:3},{name:"double accounting",value:4}]}),o.define({type:n.fontColor.text,toHost:i}),o.define({type:n.fontDirection.text,toHost:[{name:"context",value:0},{name:"left-to-right",value:1},{name:"right-to-left",value:2}]}),o.define({type:n.width.text,toHost:[{name:"auto fit",value:-1}]}),o.define({type:n.height.text,toHost:[{name:"auto fit",value:-1}]}),o.define({type:Microsoft.Office.WebExtension.Parameters.TableOptions,toHost:[{name:"headerRow",value:0},{name:"bandedRows",value:1},{name:"firstColumn",value:2},{name:"lastColumn",value:3},{name:"bandedColumns",value:4},{name:"filterButton",value:5},{name:"style",value:6},{name:"totalRow",value:7}]}),o.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={toHost:function(e){for(var t in e)e[t].format&&(e[t].format=o.doMapValues(e[t].format,"toHost"));return e},fromHost:function(e){return e}},o.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat,{toHost:function(e){var r=[];for(var i in e){var o=e[i],a=[];if("undefined"!==typeof o.cells){var s,l=o.cells;if("object"===typeof o.cells)for(var c in s=[],l)"undefined"!==typeof t[c]&&(s[t[c]]=l[c]);else s=l;a[0]=s}if(o.format){var u=o.format,d=[];for(var f in u)"undefined"!==typeof n[f]&&d.push([n[f].type,u[f]]);a[1]=d}r[i]=a}return r},fromHost:function(e){return e}}),o.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions,{toHost:function(t){var n=[];for(var r in t)"undefined"!==typeof e[r]&&(n[e[r]]=t[r]);return n},fromHost:function(e){return e}})}(),OSF.DDA.ExcelDocument=function(e,t){var n=new OSF.DDA.BindingFacade(this);OSF.DDA.DispIdHost.addAsyncMethods(n,[OSF.DDA.AsyncMethodNames.AddFromPromptAsync]),OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.GoToByIdAsync]),OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]),OSF.DDA.ExcelDocument.uber.constructor.call(this,e,n,t),OSF.OUtil.finalizeProperties(this)},OSF.OUtil.extend(OSF.DDA.ExcelDocument,OSF.DDA.JsomDocument),OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(e,t,n){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM),e.doc=new OSF.DDA.ExcelDocument(e,this._initializeSettings(e,!1)),OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]),t()};var OfficeExtension;__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){var t;!function(e){e.OfficeRequire=function(){return null}()}(e._Internal||(e._Internal={})),function(e){!function(t){t.Init=function(){return function(){"use strict";function t(e){return"function"===typeof e}var n,r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,o=function(e,t){u[i]=e,u[i+1]=t,2===(i+=2)&&(n?n(d):c())};var a=("undefined"!==typeof window?window:void 0)||{},s=(a.MutationObserver||a.WebKitMutationObserver,"undefined"!==typeof process&&"[object process]"==={}.toString.call(process)),l="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel;var c,u=new Array(1e3);function d(){for(var e=0;e=0&&(e=e.substring(t+5,e.length))<"14.14393"}()?e.PromiseImpl.Init():window.Promise:e.PromiseImpl.Init()}()}(t=e._Internal||(e._Internal={}));var n=t.OfficePromise;e.Promise=n}(OfficeExtension||(OfficeExtension={})),function(e){var t=function(){function e(){}return e.prototype._resolveRequestUrlAndHeaderInfo=function(){return c._createPromiseFromResult(null)},e.prototype._createRequestExecutorOrNull=function(){return null},e.prototype.getEventRegistration=function(e){return null},e}();e.SessionBase=t;var n=function(){function e(){}return e.setCustomSendRequestFunc=function(t){e.s_customSendRequestFunc=t},e.xhrSendRequestFunc=function(e){return c.createPromise((function(t,n){var i=new XMLHttpRequest;if(i.open(e.method,e.url),i.onload=function(){var e={statusCode:i.status,headers:c._parseHttpResponseHeaders(i.getAllResponseHeaders()),body:i.responseText};t(e)},i.onerror=function(){n(new r.RuntimeError({code:o.connectionFailure,httpStatusCode:i.status,message:c._getResourceString(a.connectionFailureWithStatus,i.statusText)}))},e.headers)for(var s in e.headers)i.setRequestHeader(s,e.headers[s]);i.send(c._getRequestBodyText(e))}))},e.fetchSendRequestFunc=function(e){var t=c._getRequestBodyText(e);return""===t&&(t=void 0),fetch(e.url,{method:e.method,headers:e.headers,body:t}).then((function(e){return e.text().then((function(t){var n=e.status,r={};return e.headers.forEach((function(e,t){r[t]=e})),{statusCode:n,headers:r,body:t}}))}))},e.sendRequest=function(t){e.validateAndNormalizeRequest(t);var n=e.s_customSendRequestFunc;return n||(n="undefined"!==typeof fetch?e.fetchSendRequestFunc:e.xhrSendRequestFunc),n(t)},e.setCustomSendLocalDocumentRequestFunc=function(t){e.s_customSendLocalDocumentRequestFunc=t},e.sendLocalDocumentRequest=function(t){return e.validateAndNormalizeRequest(t),(e.s_customSendLocalDocumentRequestFunc||e.officeJsSendLocalDocumentRequestFunc)(t)},e.officeJsSendLocalDocumentRequestFunc=function(e){e=c._validateLocalDocumentRequest(e);var t=c._buildRequestMessageSafeArray(e);return c.createPromise((function(e,n){OSF.DDA.RichApi.executeRichApiRequestAsync(t,(function(t){var n;n="succeeded"==t.status?{statusCode:l.getResponseStatusCode(t),headers:l.getResponseHeaders(t),body:l.getResponseBody(t)}:l.buildHttpResponseFromOfficeJsError(t.error.code,t.error.message),c.log("Response:"),c.log(JSON.stringify(n)),e(n)}))}))},e.validateAndNormalizeRequest=function(e){if(c.isNullOrUndefined(e))throw r.RuntimeError._createInvalidArgError({argumentName:"request"});c.isNullOrEmptyString(e.method)&&(e.method="GET"),e.method=e.method.toUpperCase();var t=!1;if("object"===typeof e.headers&&e.headers[s.testRequestNameHeader]&&(t=!0),!t){var n=u._getCurrentTestNameWithSequenceId();n&&(e.headers||(e.headers={}),e.headers[s.testRequestNameHeader]=n)}},e.logRequest=function(t){if(c._logEnabled){if(c.log("---HTTP Request---"),c.log(t.method+" "+t.url),t.headers)for(var n in t.headers)c.log(n+": "+t.headers[n]);e._logBodyEnabled&&c.log(c._getRequestBodyText(t))}},e.logResponse=function(t){if(c._logEnabled){if(c.log("---HTTP Response---"),c.log(""+t.statusCode),t.headers)for(var n in t.headers)c.log(n+": "+t.headers[n]);e._logBodyEnabled&&c.log(t.body)}},e._logBodyEnabled=!1,e}();e.HttpUtility=n;var r,i=function(){function e(e){var t=this;this.m_bridge=e,this.m_promiseResolver={},this.m_handlers=[],this.m_bridge.onMessageFromHost=function(e){var n=JSON.parse(e);if(3==n.type){var r=n.message;if(r&&r.entries)for(var i=0;i=0){var o=t.url.substr(i+1),a=c._parseRequestFlagsAndCustomDataFromQueryStringIfAny(o);a.flags>=0&&(n=a.flags)}"string"===typeof t.body&&(t.body=JSON.parse(t.body));var s={id:e.nextId(),type:1,flags:n,message:t};return r.sendMessageToHostAndExpectResponse(s).then((function(e){return e.message}))}));for(var i=0;i=0&&this.m_handlers.splice(t,1)},e.onInited=function(t){e.s_onInitedHandlers.push(t),e.s_instance&&t(e.s_instance)},e.prototype.dispatchMessage=function(e){if("number"===typeof e.id){var t=this.m_promiseResolver[e.id];if(t)return t(e),void delete this.m_promiseResolver[e.id]}for(var n=0;n0},e._getLocalDocumentUrlPrefixLength=function(e){for(var t=["http://document.localhost","https://document.localhost","//document.localhost"],n=e.toLowerCase().trim(),r=0;r0){var o=t.url.substr(i+1),a=e._parseRequestFlagsAndCustomDataFromQueryStringIfAny(o);a.flags>=0&&(n=a.flags),r=a.customData}}return l.buildRequestMessageSafeArray(r,n,t.method,t.url,t.headers,e._getRequestBodyText(t))},e._parseHttpResponseHeaders=function(t){var n={};if(!e.isNullOrEmptyString(t))for(var r=new RegExp("\r?\n"),i=t.split(r),o=0;o0){var l=a.substr(0,s),c=a.substr(s+1);l=e.trim(l),c=e.trim(c),n[l.toUpperCase()]=c}}}return n},e._parseErrorResponse=function(t){var n=e._parseErrorResponseBody(t),r=t.statusCode.toString();if(e.isNullOrUndefined(n)||"object"!==typeof n||!n.error)return e._createDefaultErrorResponse(r);var i=n.error,o=i.innerError;return o&&o.code?e._createErrorResponse(o.code,r,o.message):i.code?e._createErrorResponse(i.code,r,i.message):e._createDefaultErrorResponse(r)},e._parseErrorResponseBody=function(t){if(e.isPlainJsonObject(t.body))return t.body;if(!e.isNullOrEmptyString(t.body)){var n=e.trim(t.body);try{return JSON.parse(n)}catch(t){e.log("Error when parse "+n)}}},e._createDefaultErrorResponse=function(t){return{errorCode:o.connectionFailure,errorMessage:e._getResourceString(a.connectionFailureWithStatus,t)}},e._createErrorResponse=function(t,n,r){return{errorCode:t,errorMessage:e._getResourceString(a.connectionFailureWithDetails,[n,t,r])}},e._copyHeaders=function(e,t){if(e&&t)for(var n in e)t[n]=e[n]},e.addResourceStringValues=function(t){for(var n in t)e.s_resourceStringValues[n]=t[n]},e._logEnabled=!1,e.s_resourceStringValues={ApiNotFoundDetails:"The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",ConnectionFailureWithStatus:"The request failed with status code of {0}.",ConnectionFailureWithDetails:"The request failed with status code of {0}, error code {1} and the following error message: {2}",InvalidArgument:"The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",InvalidObjectPath:'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',InvalidRequestContext:"Cannot use the object across different request contexts.",Timeout:"The operation has timed out.",ValueNotLoaded:'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'},e}();e.CoreUtility=c;var u=function(){function e(){}return e.setMock=function(t){e.s_isMock=t},e.isMock=function(){return e.s_isMock},e._setCurrentTestName=function(t){e.s_currentTestName=t,e.s_currentTestSequenceId=0},e._getCurrentTestNameWithSequenceId=function(){return e.s_currentTestName?(e.s_currentTestSequenceId++,e.s_currentTestName+"."+e.s_currentTestSequenceId):null},e}();e.TestUtility=u,e._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!0,enableUndoableFlag:!0,appendTypeNameToObjectPathInfo:!1,enablePreviewExecution:!1},e.config={extendedErrorLogging:!1};var d=function(){function t(){}return t.createSetPropertyAction=function(t,n,r,i,o){C.validateObjectPath(n);var a={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:n._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[i],l=C.setMethodArguments(t,a.ArgumentInfo,s);C.validateReferencedObjectPaths(l);var c=new p(a,0,o);if(c.referencedObjectPath=n._objectPath,c.referencedArgumentObjectPaths=l,e._internalConfig.enablePreviewExecution&&0!==(16&o)){var u={Id:t._nextId(),ActionType:4,Name:r,ObjectId:"",ObjectType:"",Arguments:[i]};n._addPreviewExecutionAction(u)}return n._addAction(c)},t.createQueryAction=function(e,t,n,r){C.validateObjectPath(t);var i={Id:e._nextId(),ActionType:2,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},o=new p(i,1,4);return o.referencedObjectPath=t._objectPath,t._addAction(o,r)},t.createQueryAsJsonAction=function(e,t,n,r){C.validateObjectPath(t);var i={Id:e._nextId(),ActionType:7,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},o=new p(i,1,4);return o.referencedObjectPath=t._objectPath,t._addAction(o,r)},t.createUpdateAction=function(e,t,n){C.validateObjectPath(t);var r={Id:e._nextId(),ActionType:9,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},i=new p(r,0,0);return i.referencedObjectPath=t._objectPath,t._addAction(i)},t}();e.CommonActionFactory=d;var f=function(){function t(e,t){this.m_contextBase=e,this.m_objectPath=t}return Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_context",{get:function(){return this.m_contextBase},enumerable:!0,configurable:!0}),t.prototype._addAction=function(e,t){var n=this;return void 0===t&&(t=null),c.createPromise((function(r,i){n._context._addServiceApiAction(e,t,r,i)}))},t.prototype._addPreviewExecutionAction=function(e){},t.prototype._retrieve=function(t,n){var r=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;r||(r=!C.isSetSupported("RichApiRuntime","1.1"));var i=g._parseQueryOption(t);return r?d.createQueryAction(this._context,this,i,n):d.createQueryAsJsonAction(this._context,this,i,n)},t.prototype._recursivelyUpdate=function(t){var n=e._internalConfig.alwaysPolyfillClientObjectUpdateMethod;n||(n=!C.isSetSupported("RichApiRuntime","1.2"));try{var i=this[S.scalarPropertyNames];i||(i=[]);var s=this[S.scalarPropertyUpdateable];if(!s){s=[];for(var l=0;l=0){if(!s[m])throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:c._getResourceString(_.attemptingToSetReadOnlyProperty,g),debugInfo:{errorLocation:g}});f[g]=t[g],++h}else{if(!(u.indexOf(g)>=0))throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:c._getResourceString(_.propertyDoesNotExist,g),debugInfo:{errorLocation:g}});p[g]=t[g]}}if(h>0)if(n)for(l=0;l0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});t.Top=s}else if("$skip"===a){if("number"!==typeof s||n.length>0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});t.Skip=s}else if("boolean"===typeof s)s&&t.Select.push(e.combineQueryPath(n,a,"/"));else{if("object"!==typeof s)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});e.parseStrictLoadOptionHelper(t,e.combineQueryPath(n,a,"/"),e.combineQueryPath(i,a,"."),s)}}},e}();e.ClientRequestContextBase=g;var m=function(){function e(e){this.m_objectPath=e}return e.prototype._handleResult=function(e){c.isNullOrUndefined(e)?this.m_objectPath._updateAsNullObject():this.m_objectPath.updateUsingObjectData(e,null)},e}(),y=function(){function t(e){this.m_contextBase=e,this.m_actions=[],this.m_actionResultHandler={},this.m_referencedObjectPaths={},this.m_instantiatedObjectPaths={},this.m_preSyncPromises=[],this.m_previewExecutionActions=[]}return t.prototype.addAction=function(e){this.m_actions.push(e),1==e.actionInfo.ActionType&&(this.m_instantiatedObjectPaths[e.actionInfo.ObjectPathId]=e)},t.prototype.addPreviewExecutionAction=function(e){this.m_previewExecutionActions.push(e)},Object.defineProperty(t.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.ensureInstantiateObjectPath=function(e){if(e){if(this.m_instantiatedObjectPaths[e.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(e.parentObjectPath),this.ensureInstantiateObjectPaths(e.argumentObjectPaths),!this.m_instantiatedObjectPaths[e.objectPathInfo.Id]){var t={Id:this.m_contextBase._nextId(),ActionType:1,Name:"",ObjectPathId:e.objectPathInfo.Id},n=new p(t,1,4);n.referencedObjectPath=e,this.addReferencedObjectPath(e),this.addAction(n);var r=new m(e);this.addActionResultHandler(n,r)}}},t.prototype.ensureInstantiateObjectPaths=function(e){if(e)for(var t=0;t0&&(c.PreviewExecutionActions=this.m_previewExecutionActions,n|=4096),{body:c,flags:n}},t.prototype.processResponse=function(e){if(e)for(var t=0;t=0;t--){var n=this.m_actions[t].actionInfo;if(n.ObjectPathId===e&&3===n.ActionType&&n.Name===S.keepReference){this.m_actions.splice(t,1);break}}},t._updateLastUsedActionIdOfObjectPathId=function(e,n,r){for(;n;){if(e[n.objectPathInfo.Id])return;e[n.objectPathInfo.Id]=r;var i=n.argumentObjectPaths;if(i)for(var o=i.length,a=0;a=0;--i){var o=(f=e[i]).actionInfo.Id;f.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(n,f.referencedObjectPath,o);var a=f.referencedArgumentObjectPaths;if(a)for(var s=a.length,l=0;l0?f.actionInfo.L=p:f.actionInfo.L&&delete f.actionInfo.L}},t}();e.ClientRequestBase=y;var v=function(){function e(e){this.m_type=e}return Object.defineProperty(e.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new r.RuntimeError({code:o.valueNotLoaded,httpStatusCode:400,message:c._getResourceString(a.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),e.prototype._handleResult=function(e){this.m_isLoaded=!0,"object"===typeof e&&e&&e._IsNull||(1===this.m_type?this.m_value=C.adjustToDateTime(e):this.m_value=e)},e}();e.ClientResult=v;var b=function(){function e(e){this.m_context=e,this.m_actions=[]}return e.prototype.add=function(e,t,n,r){var i=this;this.m_actions.push({action:e,resultHandler:t,resolve:n,reject:r}),1===this.m_actions.length&&setTimeout((function(){return i.processActions()}),0)},e.prototype.processActions=function(){var e=this;if(0!==this.m_actions.length){var t=this.m_actions;this.m_actions=[];for(var n=new y(this.m_context),r=0;r=65&&e.charCodeAt(t)<=90;)t++;return t0?".":"")+n;break;case 3:n=t.normalizeName(e.objectPathInfo.Name)+"()"+(n.length>0?".":"")+n;break;case 4:n=t.normalizeName(e.objectPathInfo.Name)+(n.length>0?".":"")+n;break;case 5:n="getItem()"+(n.length>0?".":"")+n;break;case 6:n="_reference()"+(n.length>0?".":"")+n}e=e.parentObjectPath}return n},t.setMethodArguments=function(e,n,r){if(c.isNullOrUndefined(r))return null;var i=new Array,o=new Array,a=t.collectObjectPathInfos(e,r,i,o);return n.Arguments=r,a&&(n.ReferencedObjectPathIds=o),i},t.validateContext=function(e,t){if(e&&t&&t._context!==e)throw new r.RuntimeError({code:o.invalidRequestContext,httpStatusCode:400,message:c._getResourceString(a.invalidRequestContext)})},t.isSetSupported=function(e,n){return"function"===typeof t.isSetSupportedOverride?t.isSetSupportedOverride(e,n):!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)||window.Office.context.requirements.isSetSupported(e,n)},t.throwIfApiNotSupported=function(e,n,i,s){if(t._doApiNotSupportedCheck&&!t.isSetSupported(n,i)){var l=c._getResourceString(a.apiNotFoundDetails,[e,n+" "+i,s]);throw new r.RuntimeError({code:o.apiNotFound,httpStatusCode:404,message:l,debugInfo:{errorLocation:e}})}},t.calculateApiFlags=function(e,n,r){var i=window&&window.location&&window.location.href&&-1!==window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc");return("function"===typeof t.isSetSupportedOverride?t.isSetSupportedOverride(n,r):!i&&t.isSetSupported(n,r))||(e&=-3),e},t._parseSelectExpand=function(e){var t=[];if(!c.isNullOrEmptyString(e))for(var n=e.split(","),r=0;r0&&t.push(i)}return t;function o(e){var t=e.toLowerCase();if("items"===t||"items/"===t)return"*";return("items/"===t.substr(0,6)||"items."===t.substr(0,6))&&(e=e.substr(6)),e.replace(new RegExp("[/.]items[/.]","gi"),"/")}},t.changePropertyNameToCamelLowerCase=function(e){if(Array.isArray(e)){for(var n=[],r=0;r=0){var a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!0),s=a.processForDebugStatementInfo(n.Body.Error.ActionIndex);o={statement:s.statement,surroundingStatements:s.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},e.config.extendedErrorLogging&&(a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!1),o.fullStatements=a.process())}var l=null;if(n.Body.Results?l=n.Body.Results:n.Body.ProcessedResults&&n.Body.ProcessedResults.Results&&(l=n.Body.ProcessedResults.Results),l){this._processingResult=!0;try{t.processResponse(l)}finally{this._processingResult=!1}}}if(!Z.isNullOrEmptyString(n.ErrorCode))return new r.RuntimeError({code:n.ErrorCode,httpStatusCode:n.HttpStatusCode,message:n.ErrorMessage,traceMessages:i,data:{responseBody:n.RawErrorResponseBody}});if(n.Body&&n.Body.Error){var c={errorLocation:n.Body.Error.Location};return o&&(c.statement=o.statement,c.surroundingStatements=o.surroundingStatements,c.fullStatements=o.fullStatements),new r.RuntimeError({code:n.Body.Error.Code,httpStatusCode:n.Body.Error.HttpStatusCode,message:n.Body.Error.Message,traceMessages:i,debugInfo:c})}return null},i.prototype.processPendingEventHandlers=function(e){for(var t=Z._createPromiseFromResult(null),n=0;n0)if(i.isValidRequestInfo(n[0]))f=n[0],h=1;else if(Z.isPlainJsonObject(n[0])){if(null!=(f=(g=n[0]).session)&&!i.isValidRequestInfo(f))return i.createErrorPromise(t);p=g.previousObjects,h=1}if(n.length==h+1)d=n[h+0];else{if(null!=g||n.length!=h+2)return i.createErrorPromise(t);p=n[h+0],d=n[h+1]}if(null!=p)if(p instanceof k)u=function(){return p.context};else if(p instanceof i)u=function(){return p};else{if(!Array.isArray(p))return i.createErrorPromise(t);var m=p;if(0==m.length)return i.createErrorPromise(t);for(var y=0;y0&&h._onRunFinishedNotifiers.shift()();if(v)return g;throw g}))},i}(g);e.ClientRequestContext=U;var L=function(){function e(e,t){this.m_proxy=e,this.m_shouldPolyfill=t;var n=e[H.scalarPropertyNames],r=e[H.navigationPropertyNames],i=e[H.className],o=e[H.isCollection];if(n)for(var a=0;a=0;s--)if(i[s]===r[o].handler){i.splice(s,1);break}break;case 2:i=[]}return a&&(!this.m_registered&&i.length>0?n=n.then((function(){return t.m_eventInfo.registerFunc(t.m_callback)})).then((function(){return t.m_registered=!0})):this.m_registered&&0==i.length&&(n=n.then((function(){return t.m_eventInfo.unregisterFunc(t.m_callback)})).catch((function(e){c.log("Error when unregister event: "+JSON.stringify(e))})).then((function(){return t.m_registered=!1}))),n=n.then((function(){return t.m_handlers=i}))),n},e.prototype.fireEvent=function(e){for(var t=[],n=0;n0},e.prototype.register=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});var i=this.getHandlers(e,t);return i.push(n),1===i.length?this.m_registerEventImpl(e,t):Z._createPromiseFromResult(null)},e.prototype.unregister=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var i=this.getHandlers(e,t),o=i.length-1;o>=0;o--)if(i[o]===n){i.splice(o,1);break}return 0===i.length?this.m_unregisterEventImpl(e,t):Z._createPromiseFromResult(null)},e}();e.EventRegistration=G;var q=function(){function e(){this.m_eventRegistration=new G(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this)),this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return e.prototype.ready=function(){var t=this;return this.m_ready||(e._testReadyImpl?this.m_ready=e._testReadyImpl().then((function(){t.m_isReady=!0})):i.instance?this.m_ready=Z._createPromiseFromResult(null).then((function(){t.m_isReady=!0})):this.m_ready=r.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then((function(){t.m_isReady=!0}))),this.m_ready},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.register(e,t,n)}))},e.prototype.unregister=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.unregister(e,t,n)}))},e.prototype._registerEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._unregisterEventImpl=function(e,t){return Z._createPromiseFromResult(null)},e.prototype._handleRichApiMessage=function(e){if(e&&e.entries)for(var t=0;t=0;i--)if(r[i]===e){r.splice(i,1);break}0==r.length&&q.getGenericEventRegistration(n).unregister(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)}))},t.prototype.removeAll=function(){},t}(W);e.GenericEventHandlers=z;var J=function(){function e(e){this.m_clientObject=e}return e.prototype._handleResult=function(e){this.m_clientObject._handleIdResult(e)},e}(),Q=function(){function e(){}return e.createGlobalObjectObjectPath=function(e){var t={Id:e._nextId(),ObjectPathType:1,Name:""};return new h(t,null,!1,!1,1,4)},e.createNewObjectObjectPath=function(e,t,n,r){var i={Id:e._nextId(),ObjectPathType:2,Name:t};return new h(i,null,n,!1,1,Z._fixupApiFlags(r))},e.createPropertyObjectPath=function(e,t,n,r,i,o){var a={Id:e._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id};return new h(a,t._objectPath,r,i,1,Z._fixupApiFlags(o))},e.createIndexerObjectPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new h(r,t._objectPath,!1,!1,1,4)},e.createIndexerObjectPathUsingParentPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new h(r,t,!1,!1,1,4)},e.createMethodObjectPath=function(e,t,n,r,i,o,a,s,l){var c={Id:e._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u=Z.setMethodArguments(e,c.ArgumentInfo,i),d=new h(c,t._objectPath,o,a,r,Z._fixupApiFlags(l));return d.argumentObjectPaths=u,d.getByIdMethodName=s,d},e.createReferenceIdObjectPath=function(e,t){var n={Id:e._nextId(),ObjectPathType:6,Name:t,ArgumentInfo:{}};return new h(n,null,!1,!1,1,4)},e.createChildItemObjectPathUsingIndexerOrGetItemAt=function(t,n,r,i,o){var a=Z.tryGetObjectIdFromLoadOrRetrieveResult(i);return t&&!Z.isNullOrUndefined(a)?e.createChildItemObjectPathUsingIndexer(n,r,i):e.createChildItemObjectPathUsingGetItemAt(n,r,i,o)},e.createChildItemObjectPathUsingIndexer=function(e,t,n){var r=Z.tryGetObjectIdFromLoadOrRetrieveResult(n),i=i={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return i.ArgumentInfo.Arguments=[r],new h(i,t._objectPath,!1,!1,1,4)},e.createChildItemObjectPathUsingGetItemAt=function(e,t,n,r){var i=n[H.index];i&&(r=i);var o={Id:e._nextId(),ObjectPathType:3,Name:H.getItemAt,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=[r],new h(o,t._objectPath,!1,!1,1,4)},e}();e.ObjectPathFactory=Q;var K=function(){function t(e){this.m_context=e}return t.prototype.executeAsync=function(n,r,i){var o=this,a=l.buildMessageArrayForIRequestExecutor(n,r,i,t.SourceLibHeaderValue);return new e.Promise((function(e,t){OSF.DDA.RichApi.executeRichApiRequestAsync(a,(function(t){var n;c.log("Response:"),c.log(JSON.stringify(t)),"succeeded"==t.status?n=l.buildResponseOnSuccess(l.getResponseBody(t),l.getResponseHeaders(t)):(n=l.buildResponseOnError(t.error.code,t.error.message),o.m_context._processOfficeJsErrorResponse(t.error.code,n)),e(n)}))}))},t.SourceLibHeaderValue="officejs",t}(),X=function(){function e(e){this._autoCleanupList={},this.m_context=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._addCommon(e,!0)})):this._addCommon(e,!0)},e.prototype._autoAdd=function(e){this._addCommon(e,!1),this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e},e.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(e,t){this.m_context._autoCleanup&&!e[H.isTracked]&&e!==this.m_context._rootObject&&t&&!Z.isNullOrEmptyString(t[H.referenceId])&&(this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e,e[H.isTracked]=!0)},e.prototype._addCommon=function(e,t){if(e[H.isTracked])t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id];else{var n=e[H.referenceId];if(e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName])throw Z.createRuntimeError(o.generalException,c._getResourceString($.objectIsUntracked),null);Z.isNullOrEmptyString(n)&&e._KeepReference&&(e._KeepReference(),M.createInstantiateAction(this.m_context,e),t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id],e[H.isTracked]=!0)}},e.prototype.remove=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._removeCommon(e)})):this._removeCommon(e)},e.prototype._removeCommon=function(e){e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName]=!0,e.context._pendingRequest._removeKeepReferenceAction(e._objectPath.objectPathInfo.Id);var t=e[H.referenceId];if(!Z.isNullOrEmptyString(t)){var n=this.m_context._rootObject;n._RemoveReference&&n._RemoveReference(t)}delete e[H.isTracked]},e.prototype._retrieveAndClearAutoCleanupList=function(){var e=this._autoCleanupList;return this._autoCleanupList={},e},e}();e.TrackedObjects=X;var Y=function(){function t(e,t,n,r,i){e||(e="root"),this.m_globalObjName=e,this.m_referencedObjectPaths=t,this.m_actions=n,this.m_statements=[],this.m_variableNameForObjectPathMap={},this.m_variableNameToObjectPathMap={},this.m_declaredObjectPathMap={},this.m_showDispose=r,this.m_removePII=i}return t.prototype.process=function(){this.m_showDispose&&B._calculateLastUsedObjectPathIds(this.m_actions);for(var e=0;e=0&&this.m_statements.length>t+5+1));n++);if(t<0)return null;var r=t-5;r<0&&(r=0);var i=t+1+5;i>this.m_statements.length&&(i=this.m_statements.length);var o=[];0!=r&&o.push("...");for(var a=r;a>>>>"),o.push(this.m_statements[t]),o.push("// <<<<<");for(var s=t+1;s0)return e+" // And then dispose {"+r.map((function(e){return n.getObjVarName(e)})).join(", ")+"}"}return e},t.prototype.buildQueryExpression=function(e){if(e.actionInfo.QueryInfo){var t={};return t.select=e.actionInfo.QueryInfo.Select,t.expand=e.actionInfo.QueryInfo.Expand,t.skip=e.actionInfo.QueryInfo.Skip,t.top=e.actionInfo.QueryInfo.Top,"undefined"===typeof t.top&&"undefined"===typeof t.skip&&"undefined"===typeof t.expand?"undefined"===typeof t.select?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(e){return(5==e.objectPathInfo.ObjectPathType||3==e.objectPathInfo.ObjectPathType||4==e.objectPathInfo.ObjectPathType)&&e.objectPathInfo.ParentObjectPathId?this.getObjVarName(e.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(e):this.buildObjectPathExpression(e)},t.prototype.buildObjectPathExpression=function(e){var t=this.buildObjectPathInfoExpression(e.objectPathInfo),n=e.originalObjectPathInfo;return n&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(n)+" */"),t},t.prototype.buildObjectPathInfoExpression=function(e){switch(e.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 3:return Z._toCamelLowerCase(e.Name)+"("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 2:return e.Name+".newObject()";case 7:return"null";case 4:return Z._toCamelLowerCase(e.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(e.Name)+")"}},t.prototype.buildArgumentsExpression=function(e){var t="";if(!e.Arguments||0===e.Arguments.length)return t;if(this.m_removePII)return"undefined"===typeof e.Arguments[0]?t:"...";for(var n=0;n0&&(t+=", "),t+=this.buildArgumentLiteral(e.Arguments[n],e.ReferencedObjectPathIds?e.ReferencedObjectPathIds[n]:null);return"undefined"===t&&(t=""),t},t.prototype.buildArgumentLiteral=function(e,t){return"number"==typeof e&&e===t?this.getObjVarName(t):JSON.stringify(e)},t.prototype.getObjVarNameBase=function(e){var t="v",n=this.m_referencedObjectPaths[e];if(n)switch(n.objectPathInfo.ObjectPathType){case 1:t=this.m_globalObjName;break;case 4:t=Z._toCamelLowerCase(n.objectPathInfo.Name);break;case 3:var r=n.objectPathInfo.Name;r.length>3&&"Get"===r.substr(0,3)&&(r=r.substr(3)),t=Z._toCamelLowerCase(r);break;case 5:var i=this.getObjVarNameBase(n.objectPathInfo.ParentObjectPathId);t="s"===i.charAt(i.length-1)?i.substr(0,i.length-1):i+"Item"}return t},t.prototype.getObjVarName=function(e){if(this.m_variableNameForObjectPathMap[e])return this.m_variableNameForObjectPathMap[e];var t=this.getObjVarNameBase(e);if(!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t;for(var n=1;this.m_variableNameToObjectPathMap[t+n.toString()];)n++;return t+=n.toString(),this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t},t}(),$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.cannotRegisterEvent="CannotRegisterEvent",t.connectionFailureWithStatus="ConnectionFailureWithStatus",t.connectionFailureWithDetails="ConnectionFailureWithDetails",t.propertyNotLoaded="PropertyNotLoaded",t.runMustReturnPromise="RunMustReturnPromise",t.moreInfoInnerError="MoreInfoInnerError",t.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",t.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",t.objectIsUntracked="ObjectIsUntracked",t.customFunctionDefintionMissing="CustomFunctionDefintionMissing",t.customFunctionImplementationMissing="CustomFunctionImplementationMissing",t.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",t.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",t.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",t.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",t.customFunctionInvalidFunction="CustomFunctionInvalidFunction",t.customFunctionInvalidFunctionMapping="CustomFunctionInvalidFunctionMapping",t.customFunctionWindowMissing="CustomFunctionWindowMissing",t.customFunctionDefintionMissingOnWindow="CustomFunctionDefintionMissingOnWindow",t.pendingBatchInProgress="PendingBatchInProgress",t.notInsideBatch="NotInsideBatch",t.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",t}(_);e.ResourceStrings=$,c.addResourceStringValues({CannotRegisterEvent:"The event handler cannot be registered.",PropertyNotLoaded:"The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",RunMustReturnPromise:'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',InvalidOrTimedOutSessionMessage:"Your Office Online session has expired or is invalid. To continue, refresh the page.",InvalidOperationInCellEditMode:"Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",InvalidSheetName:"The request cannot be processed because the specified worksheet cannot be found. Please try again.",CustomFunctionDefintionMissing:"A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.",CustomFunctionDefintionMissingOnWindow:"A property with the name '{0}' that represents the function's definition must exist on the window object.",CustomFunctionImplementationMissing:"The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",CustomFunctionNameContainsBadChars:"The function name may only contain letters, digits, underscores, and periods.",CustomFunctionNameCannotSplit:"The function name must contain a non-empty namespace and a non-empty short name.",CustomFunctionUnexpectedNumberOfEntriesInResultBatch:"The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",CustomFunctionCancellationHandlerMissing:"The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",CustomFunctionInvalidFunction:"The property with the name '{0}' that represents the function's definition is not a valid function.",CustomFunctionInvalidFunctionMapping:"The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.",CustomFunctionWindowMissing:"The window object was not found.",PendingBatchInProgress:"There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",NotInsideBatch:"Operations may not be invoked outside of a batch method.",CannotUpdateReadOnlyProperty:"The property '{0}' is read-only and it cannot be updated.",ObjectIsUntracked:"The object is untracked."});var Z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.fixObjectPathIfNecessary=function(e,t){e&&e._objectPath&&t&&e._objectPath.updateUsingObjectData(t,e)},n.load=function(e,t){return e.context.load(e,t),e},n.loadAndSync=function(e,t){return e.context.load(e,t),e.context.sync().then((function(){return e}))},n.retrieve=function(t,r){var i=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;i||(i=!n.isSetSupported("RichApiRuntime","1.1"));var o=new L(t,i);return t._retrieve(r,o),o},n.retrieveAndSync=function(e,t){var r=n.retrieve(e,t);return e.context.sync().then((function(){return r}))},n.toJson=function(e,t,r,i){var o={};for(var a in t){"undefined"!==typeof(s=t[a])&&(o[a]=s)}for(var a in r){var s;"undefined"!==typeof(s=r[a])&&(s[n.fieldName_isCollection]&&"undefined"!==typeof s[n.fieldName_m__items]?o[a]=s.toJSON().items:o[a]=s.toJSON())}return i&&(o.items=i.map((function(e){return e.toJSON()}))),o},n.throwError=function(e,t,n){throw new r.RuntimeError({code:e,httpStatusCode:400,message:c._getResourceString(e,t),debugInfo:n?{errorLocation:n}:void 0})},n.createRuntimeError=function(e,t,n,i,o){return new r.RuntimeError({code:e,httpStatusCode:i,message:t,debugInfo:{errorLocation:n},data:o})},n.throwIfNotLoaded=function(e,t,r,i){if(!i&&c.isUndefined(t)&&e.charCodeAt(0)!=n.s_underscoreCharCode&&!n.s_suppressPropertyNotLoadedException)throw n.createPropertyNotLoadedException(r,e)},n._getPropertyValueWithoutCheckLoaded=function(e,t){n.s_suppressPropertyNotLoadedException=!0;try{return e[t]}finally{n.s_suppressPropertyNotLoadedException=!1}},n.createPropertyNotLoadedException=function(e,t){return new r.RuntimeError({code:T.propertyNotLoaded,httpStatusCode:400,message:c._getResourceString($.propertyNotLoaded,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.createCannotUpdateReadOnlyPropertyException=function(e,t){return new r.RuntimeError({code:T.cannotUpdateReadOnlyProperty,httpStatusCode:400,message:c._getResourceString($.cannotUpdateReadOnlyProperty,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.promisify=function(t){return new e.Promise((function(e,n){t((function(t){"failed"==t.status?n(t.error):e(t.value)}))}))},n._addActionResultHandler=function(e,t,n){e.context._pendingRequest.addActionResultHandler(t,n)},n._handleNavigationPropertyResults=function(e,t,n){for(var r=0;r0;)e.push(0),n--},t.prototype.getString=function(e){return"number"===typeof e?e>0?this.m_strings[e-1]:null:e},t.prototype.buildEnumType=function(e){var t;if(Array.isArray(e)){(t={name:e[0],fields:e[2]}).fields||(t.fields={});var n=e[1];if(Array.isArray(n))for(var r=0;rn)return!1;return!0},t.prototype.evaluateEventType=function(t){if(Z.isNullOrEmptyString(t))return 0;if(this.isAllDigits(t))return parseInt(t);var n=this.resolveObjectByFullName(t);if("number"!==typeof n)throw new e.Error("Invalid event type: "+t);return n},t.prototype.buildPrototype=function(e,t){this.buildScalarProperties(e,t),this.buildNavigationProperties(e,t),this.buildScalarMethods(e,t),this.buildNavigationMethods(e,t),this.buildEvents(e,t),this.buildHandleResult(e,t),this.buildHandleIdResult(e,t),this.buildHandleRetrieveResult(e,t),this.buildLoad(e,t),this.buildRetrieve(e,t),this.buildSetMockData(e,t),this.buildEnsureUnchanged(e,t),this.buildUpdate(e,t),this.buildSet(e,t),this.buildToJSON(e,t),this.buildItems(e,t),this.buildTypeMetadataInfo(e,t),this.buildTrackUntrack(e,t),this.buildMixin(e,t)},t.prototype.toSimpleCamelUpperCase=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)},t.prototype.ensureOriginalName=function(e){null===e.originalName&&(e.originalName=this.toSimpleCamelUpperCase(e.name))},t.prototype.getFieldName=function(e){return"m_"+e.name},t.prototype.throwIfApiNotSupported=function(e,t){if(this.m_apiSets&&t.apiSetInfoOrdinal>0){var n=this.m_apiSets[t.apiSetInfoOrdinal-1];n&&Z.throwIfApiNotSupported(e.name+"."+t.name,n.name,n.version,this.m_hostName)}},t.prototype.buildScalarProperties=function(e,t){if(Array.isArray(t.scalarProperties))for(var n=0;n0){var n=this.m_apiSets[t-1];n&&(e=C.calculateApiFlags(e,n.name,n.version))}return e},t.prototype.buildScalarProperty=function(e,n,r){this.ensureOriginalName(r);var i=this,o=this.getFieldName(r),a={get:function(){return Z.throwIfNotLoaded(r.name,this[o],n.name,this._isNull),i.throwIfApiNotSupported(n,r),this[o]},enumerable:!0,configurable:!0};0===(2&r.behaviorFlags)&&(a.set=function(e){if(4&r.behaviorFlags&&i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName+"_Set").call(this,this,e).handled)return;this[o]=e;var a=i.calculateApiFlags(r.setMethodApiFlags,r.undoableApiSetInfoOrdinal);ee.invokeSetProperty(this,r.originalName,e,a)}),Object.defineProperty(e.prototype,r.name,a)},t.prototype.buildNavigationProperties=function(e,t){if(Array.isArray(t.navigationProperties))for(var n=0;n0){for(var o=0;o0){for(var o=0;o0&&(Object.defineProperty(e.prototype,"_scalarPropertyNames",{get:function(){return this.m__scalarPropertyNames||(this.m__scalarPropertyNames=t.scalarProperties.map((function(e){return e.name}))),this.m__scalarPropertyNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyOriginalNames",{get:function(){return this.m__scalarPropertyOriginalNames||(this.m__scalarPropertyOriginalNames=t.scalarProperties.map((function(e){return e.originalName}))),this.m__scalarPropertyOriginalNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyUpdateable",{get:function(){return this.m__scalarPropertyUpdateable||(this.m__scalarPropertyUpdateable=t.scalarProperties.map((function(e){return 0===(2&e.behaviorFlags)}))),this.m__scalarPropertyUpdateable},enumerable:!0,configurable:!0})),t.navigationProperties&&t.navigationProperties.length>0&&Object.defineProperty(e.prototype,"_navigationPropertyNames",{get:function(){return this.m__navigationPropertyNames||(this.m__navigationPropertyNames=t.navigationProperties.map((function(e){return e.name}))),this.m__navigationPropertyNames},enumerable:!0,configurable:!0})},t.prototype.buildTrackUntrack=function(e,t){2&t.behaviorFlags&&(e.prototype.track=function(){return this.context.trackedObjects.add(this),this},e.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this})},t.prototype.buildMixin=function(e,t){if(4&t.behaviorFlags){var n=this.getFunction(t.name+"Custom");Z.applyMixin(e,n)}},t.prototype.getOnEventName=function(e){return"_"===e[0]?"_on"+e.substr(1):"on"+e},t.prototype.buildEvents=function(e,t){if(t.events)for(var n=0;n0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)&&(n=!0);var r=document.createElement("a");if(r.href=this.m_url,this.m_options.webApplication){var i=ae.embeddingPageOrigin+"="+e+"&"+ae.embeddingPageSessionInfo+"="+this.m_options.sessionKey;0===r.search.length||"?"===r.search?r.search="?"+ae.sessionContext+"="+encodeURIComponent(i):r.search=r.search+"&"+ae.sessionContext+"="+encodeURIComponent(i)}else n?0===r.hash.length||"#"===r.hash?r.hash="#"+t:r.hash=r.hash+"&"+t:0===r.search.length||"?"===r.search?r.search="?"+t:r.search=r.search+"&"+t;return r.href},t.prototype.init=function(){var e=this;window.addEventListener("message",this.m_onMessageHandler);var t=this._getIFrameSrc();return c.createPromise((function(n,r){var i=document.createElement("iframe");if(e.m_options.id&&(i.id=e.m_options.id,i.name=e.m_options.id),i.style.height=e.m_options.height,i.style.width=e.m_options.width,e.m_options.webApplication){var s=document.createElement("form");s.setAttribute("action",t),s.setAttribute("method","post"),s.setAttribute("target",i.name),e.m_options.container.appendChild(s);var l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name","access_token"),l.setAttribute("value",e.m_options.webApplication.accessToken),s.appendChild(l);var u=document.createElement("input");u.setAttribute("type","hidden"),u.setAttribute("name","access_token_ttl"),u.setAttribute("value",e.m_options.webApplication.accessTokenTtl),s.appendChild(u),e.m_options.container.appendChild(i),s.submit()}else i.src=t,e.m_options.container.appendChild(i);e.m_timeoutId=window.setTimeout((function(){e.close();var t=Z.createRuntimeError(o.timeout,c._getResourceString(a.timeout),"EmbeddedSession.init");r(t)}),e.m_options.timeoutInMilliseconds),e.m_promiseResolver=n}))},t.prototype._invoke=function(e,t,n){this.m_enabled?(ie&&(n=ie(n)),this._sendMessageWithCallback(this.m_id++,e,n,(function(e){oe&&(e=oe(e));var n=e.Error;delete e.Error,t(n||0,e)}))):t(5001,null)},t.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler),window.clearTimeout(this.m_timeoutId),this.m_enabled=!1},t.prototype.getEventRegistration=function(e){return this.m_sessionEventManager||(this.m_sessionEventManager=new G(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},t.prototype._createRequestExecutorOrNull=function(){return new le(this)},t.prototype._resolveRequestUrlAndHeaderInfo=function(){return c._createPromiseFromResult(null)},t.prototype._registerEventImpl=function(e,t){var n=this;return c.createPromise((function(r,i){n._sendMessageWithCallback(n.m_id++,ne.RegisterEventCommand,{EventId:e,TargetId:t},(function(){r(null)}))}))},t.prototype._unregisterEventImpl=function(e,t){var n=this;return c.createPromise((function(r,i){n._sendMessageWithCallback(n.m_id++,ne.UnregisterEventCommand,{EventId:e,TargetId:t},(function(){r()}))}))},t.prototype._onMessage=function(e){var t=this;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===e.source&&this.m_chosenOrigin===e.origin)){var n=e.data;if(n&&n[ne.CommandKey]===ne.ApiReadyCommand)!this.m_chosenWindow&&this._isValidDescendant(e.source)&&n[ne.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=e.source,this.m_chosenOrigin=e.origin,this._sendMessageWithCallback(this.m_id++,ne.GetAppContextCommand,null,(function(e){t._setupContext(e),window.clearTimeout(t.m_timeoutId),t.m_promiseResolver()})));else if(n&&n[ne.CommandKey]===ne.FireEventCommand){var r=n[ne.ParamsKey],i=r.EventId,o=r.TargetId,a=r.Data;if(this.m_sessionEventManager)for(var s=this.m_sessionEventManager.getHandlers(i,o),l=0;l0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=2){var s=t[n].message[1];s&&(r=a(s)?JSON.parse(s):s)}"undefined"!==typeof OSF&&OSF.AppTelemetry&&OSF.AppTelemetry.CallOnAppActivatedIfPending&&OSF.AppTelemetry.CallOnAppActivatedIfPending(),o.apply(null,[r])}else OfficeExtension.Utility.log("ActionProxy._handleMessage unknown message type "+t[n].messageType)}catch(e){throw function(e){var t=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t}(e);OfficeExtension.Utility.log(t)}(e),e}return OfficeExtension.Utility._createPromiseFromResult(null)}function a(e){return"string"===typeof e&&"{"===e[0]}function s(){try{Microsoft.Office.WebExtension.onReadyInternal().then((function(){return function(){if("undefined"!==typeof OSF&&OSF.DDA&&OSF.DDA.RichApi&&OSF.DDA.RichApi.richApiMessageManager)return(new OfficeExtension.ClientRequestContext).eventRegistration.register(5,"",o)}()})).then((function(){var e=OSF._OfficeAppFactory.getHostInfo();return!0===e.isDialog||"web"===e.hostPlatform&&"word"!==e.hostType&&"excel"!==e.hostType?void 0:function(){var e=new OfficeExtension.ClientRequestContext,t=OfficeCore.AddinInternalService.newObject(e);return e._customData="WacPartition",t.notifyActionHandlerReady(),e.sync()}()}))}catch(e){}}!function(){OfficeExtension.Utility.log("ActionProxy.initOnce"),"undefined"!=typeof e.actions&&function(e){n=e}(e.actions._association),"undefined"!==typeof document&&(document.readyState&&"loading"!==document.readyState?(OfficeExtension.Utility.log("ActionProxy.initOnce: document.readyState is not loading state"),s()):document.addEventListener&&document.addEventListener("DOMContentLoaded",(function(){OfficeExtension.Utility.log("ActionProxy.initOnce: DOMContentLoaded event triggered"),s()}))),OfficeExtension.HostBridge.onInited((function(e){!function(e){e.addHostMessageHandler((function(e){3===e.type&&o(e.message)}))}(e)}))}()}(t||(t={}))}(Office||(Office={})),function(e){!function(e){function t(){var e=new OfficeCore.RequestContext;return"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e._customData="WacPartition"),e}e.areShortcutsInUse=function(e){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,a;return __generator(this,(function(s){switch(s.label){case 0:return n=t(),r=OfficeCore.ActionService.newObject(n),i=r.areShortcutsInUse(e),[4,n.sync()];case 1:for(s.sent(),o=[],a=0;a0&&Array.isArray(n[0])&&n.length*n[0].length>1500&&d()){var i=Math.max(1,Math.round(1500/n[0].length));e._ValidateArraySize(n.length,n[0].length);for(var o=0;on.length&&(a=n.length-o);var s=e.getRow(o).untrack().getBoundingRect(e.getRow(o+a-1).untrack()).untrack(),l=n.slice(o,o+a);D(s,t,l,null!=r?r:0)}return!0}return!1}function u(e){return OfficeExtension.Utility.isSetSupported("ExcelApi",e.toString())}function d(){return u(1.3)}function f(e){return!("undefined"===typeof window||!window.Office||!window.Office.context)&&window.Office.context.platform===e}e.icons={},["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"].map((function(t,n){var r=i(t);e.icons[r]=[],l[n].map((function(n,o){n=i(n);var a={set:t,index:o};e.icons[r].push(a),e.icons[r][n]=a}))})),function(e){e.NotStarted="notStarted",e.Running="running",e.Succeeded="succeeded",e.Failed="failed"}(o||(o={})),function(e){e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NoContent=204]="NoContent",e[e.HighestSuccessCode=299]="HighestSuccessCode",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout"}(a||(a={})),function(e){e.Close="Session.close",e.CommitChanges="Session.commitChanges",e.Create="Session.resolveRequestUrlAndHeaderInfo",e.Refresh="Session.refreshSession"}(s=e.SessionOperation||(e.SessionOperation={}));var p=function(){function e(e,t,n){var r=void 0===n?{}:n,i=r.persistChanges,o=void 0===i||i,a=r.commitExplicitly,s=void 0===a||a;this.m_requestId="",this.m_workbookUrl=e?this.ensureUrlFormatEndWithSlash(e):"",this.m_requestHeaders=t||{},this.m_persistChanges=o,this.m_commitExplicitly=s}return Object.defineProperty(e.prototype,"requestId",{get:function(){return this.m_requestId},enumerable:!0,configurable:!0}),e.prototype.close=function(){var t=this;if(this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)){var n={method:"POST",url:this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url)+e.CLOSE_SESSION,headers:this.m_requestUrlAndHeaderInfo.headers,body:""};return OfficeExtension.HttpUtility.sendRequest(n).then((function(n){if(n.statusCode!==a.NoContent)throw t.createErrorFromResponseInfo(n,s.Close);for(var r in t.m_requestUrlAndHeaderInfo=null,t.m_requestHeaders)if(r.toLowerCase()===e.WorkbookSessionIdHeaderNameLower){delete t.m_requestHeaders[r];break}}))}return OfficeExtension.Utility._createPromiseFromResult(null)},e.prototype.commitChanges=function(t){var n=this;if(void 0===t&&(t={}),!this.m_commitExplicitly)throw this.createError(a.InternalServerError,"Can not call commitChanges() if commitExplicitly is not set.",s.CommitChanges);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.CommitChanges);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.CommitChanges);var r=this.createCommitChangesRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(r).then((function(r){var i=r.statusCode;if(i===a.Accepted)return n.delay(e.POLL_DELAY).then((function(i){return n.pollResourceLocation(n.getHeaderIgnoreCase(r.headers,e.LOCATION_HEADER),s.CommitChanges,t)})).then((function(e){if(JSON.parse(e.body).status===o.Failed)throw n.createErrorFromResponseInfo(e,s.CommitChanges);return n.parseCooldownTime(e)}));if(i>=a.OK&&i<=a.HighestSuccessCode)return n.parseCooldownTime(r);throw n.createErrorFromResponseInfo(r,s.CommitChanges)}))},e.prototype._resolveRequestUrlAndHeaderInfo=function(t){var n=this;if(void 0===t&&(t={}),this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(this.getHeaderIgnoreCase(this.m_requestHeaders,e.WorkbookSessionIdHeaderNameLower))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);var r=this.createAsyncGraphSessionRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(r).then((function(r){if(n.m_requestId=n.getHeaderIgnoreCase(r.headers,e.REQUEST_ID_HEADER),r.statusCode!==a.Accepted&&r.statusCode!==a.Created)throw n.createErrorFromResponseInfo(r,s.Create);return r.statusCode===a.Created?(n.formatRequestUrlAndHeaderInfo(r),n.m_requestUrlAndHeaderInfo):n.delay(e.POLL_DELAY).then((function(i){return n.pollResourceLocation(n.getHeaderIgnoreCase(r.headers,e.LOCATION_HEADER),s.Create,t)})).then((function(r){var i=JSON.parse(r.body);if(i.status===o.Failed)throw n.createErrorFromResponseInfo(r,s.Create);var a={method:"GET",url:i.resourceLocation,headers:__assign({},t,{Authorization:n.getHeaderIgnoreCase(n.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(a).then((function(e){return n.formatRequestUrlAndHeaderInfo(e),n.m_requestUrlAndHeaderInfo}))}))}))},e.prototype.refreshSession=function(){var e=this;if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.Refresh);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.Refresh);var t=this.createRefreshSessionRequestInfo();return OfficeExtension.HttpUtility.sendRequest(t).then((function(t){if(t.statusCode!=a.NoContent)throw e.createErrorFromResponseInfo(t,s.Refresh);return OfficeExtension.Utility._createPromiseFromResult(null)}))},e.prototype.getHeaderIgnoreCase=function(e,t){var n=Object.keys(e).filter((function(e){return e.toLowerCase()===t.toLowerCase()}));return n.length>0?e[n[0]]:void 0},e.prototype.createCommitChangesRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.COMMIT_CHANGES,r={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,r),OfficeExtension.Utility._copyHeaders(t,r),r[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:r,body:{}}},e.prototype.createAsyncGraphSessionRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.CREATE_SESSION,r={};return OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,r),OfficeExtension.Utility._copyHeaders(t,r),r[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,r[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:r,body:{persistChanges:this.m_persistChanges,commitExplicitly:this.m_commitExplicitly}}},e.prototype.createRefreshSessionRequestInfo=function(){var t=this.getCorrectGraphVersionUrl()+e.REFRESH_SESSION,n={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,n),n[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,{url:t,method:"POST",headers:n,body:{}}},e.prototype.getCorrectGraphVersionUrl=function(){return this.m_workbookUrl.replace(new RegExp("graph.microsoft.com/.*?/"),"graph.microsoft.com/"+e.ASYNC_API_GRAPH_VERSION+"/")},e.prototype.pollResourceLocation=function(t,n,r,i){var s=this;if(void 0===r&&(r={}),void 0===i&&(i=0),i>=e.MAX_POLL_ATTEMPTS)throw this.createError(a.InternalServerError,"Timout while polling for the resource location.",n);var l={method:"GET",url:t,headers:__assign({},r,{Authorization:this.getHeaderIgnoreCase(this.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(l).then((function(l){if(l.statusCode!==a.OK)return s.pollResourceLocation(t,n,r,i+1);switch(JSON.parse(l.body).status){case o.Succeeded:case o.Failed:return l;case o.NotStarted:case o.Running:return s.delay(e.POLL_DELAY).then((function(e){return s.pollResourceLocation(t,n,r,i+1)}));default:throw s.createErrorFromResponseInfo(l,n)}}))},e.prototype.parseCooldownTime=function(t){var n=this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER);return n?1e3*parseInt(n):e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER},e.prototype.formatRequestUrlAndHeaderInfo=function(t){if(t.statusCode!==a.OK&&t.statusCode!==a.Created)throw this.createErrorFromResponseInfo(t,s.Create);var n=JSON.parse(t.body).id,r={};OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,r),r[e.WorkbookSessionIdHeaderName]=n,this.m_requestUrlAndHeaderInfo={url:this.getCorrectGraphVersionUrl(),headers:r}},e.prototype.ensureUrlFormatEndWithSlash=function(e){return"/"!==e.charAt(e.length-1)&&(e+="/"),e},e.prototype.delay=function(e){return new OfficeExtension.CoreUtility.Promise((function(t,n){return setTimeout((function(){return t()}),e)}))},e.prototype.createErrorFromResponseInfo=function(t,n){var r=OfficeExtension.Utility._parseErrorResponse(t),i={retryAfter:this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER),responseBody:OfficeExtension.Utility._parseErrorResponseBody(t)};return OfficeExtension.Utility.createRuntimeError(r.errorCode,r.errorMessage,n,t.statusCode,i)},e.prototype.createError=function(e,t,n){return OfficeExtension.Utility.createRuntimeError(""+e,t,n)},e.WorkbookSessionIdHeaderName="Workbook-Session-Id",e.WorkbookSessionIdHeaderNameLower="workbook-session-id",e.ASYNC_API_GRAPH_VERSION="beta",e.POLL_DELAY=1e4,e.MAX_POLL_ATTEMPTS=10,e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER=1e4,e.LOCATION_HEADER="location",e.AUTHORIZATION_HEADER="authorization",e.REQUEST_ID_HEADER="request-id",e.RETRY_AFTER_HEADER="retry-after",e.PREFER_HEADER="Prefer",e.PREFER_HEADER_VAL="respond-async",e.CONTENT_TYPE_HEADER="Content-Type",e.CONTENT_TYPE_HEADER_VAL="application/json",e.CLOSE_SESSION="closeSession",e.COMMIT_CHANGES="commitChanges",e.CREATE_SESSION="createSession",e.REFRESH_SESSION="refreshSession",e}();e.Session=p;var h=function(t){function n(n){var r=t.call(this,n)||this;return r.m_workbook=A(e.Workbook,r),r._rootObject=r.m_workbook,r._rootObjectPropertyName="workbook",r}return __extends(n,t),n.prototype._processOfficeJsErrorResponse=function(e,t){5004===e&&(t.ErrorCode=W.invalidOperationInCellEditMode,t.HttpStatusCode=400,t.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode))},Object.defineProperty(n.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"runtime",{get:function(){return this.workbook._Runtime},enumerable:!0,configurable:!0}),n}(OfficeCore.RequestContext);e.RequestContext=h;var g=function(){function e(){}return e.enableMacroRecordingEvent=function(e){OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=!0;var t=function(e){return e.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent]="true",e.workbook.onRecordingStateChangedEvent.add((function(e){return OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=e.recording,OfficeExtension.Utility._createPromiseFromResult(null)})),OfficeExtension.Utility._createPromiseFromResult(null)};return void 0!==e&&null!==e?t(e):y((function(e){return t(e)}))},e}();function m(e,t){var n=e;n.delayForCellEdit&&OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")?t._requestFlagModifier|=64:t._requestFlagModifier&=-65,n._makerSafe&&(t._requestFlagModifier|=1024)}function y(t,n){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,(function(t){return new e.RequestContext(t)}),m)}function v(e){var t={BindingColumnCount:e.bindingColumnCount,BindingId:e.bindingId,BindingRowCount:e.bindingRowCount,bindingType:e.bindingType,HasHeaders:e.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function b(e,t){var n;return n=null==e.headers?e.rows:e,void 0===(n=window.OSF.DDA.DataCoercion.coerceData(n,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]))?null:n}function O(e){if(!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version))return!1;var t=window.Office.context.diagnostics.platform.toLowerCase();if("officeonline"===t)return!1;var n=e[t];null==n&&(n=e.general);var r=window.Office.context.diagnostics.version,i=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(r);if(i){var o=parseInt(i[1]),a=parseInt(i[2]),s=parseInt(i[3]);if(o0?o=n.getOffsetRange(r,i):(o=n,a=r,s=i),1===Math.abs(t)?o:o.getBoundingRect(n.getOffsetRange(r*t+a,i*t+s))},t}();e.RangeCustom=w,function(t){t.Range_HandleResult=function(e,t){P(t.isEntireColumn)||(e.m_isEntireColumn=t.isEntireColumn),P(t.isEntireRow)||(e.m_isEntireRow=t.isEntireRow)},t.Range_GetColumnsAfter=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsAfter",n,t.getLastColumn(),0,1)})},t.Range_GetColumnsBefore=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsBefore",n,t.getColumn(0),0,-1)})},t.Range_GetResizedRange=function(e,t,n){return d()?{handled:!1,result:null}:(e._ensureInteger(t,"getResizedRange"),e._ensureInteger(n,"getResizedRange"),{handled:!0,result:(t>=0&&n>=0?e:e.getCell(0,0)).getBoundingRect(e.getLastCell().getOffsetRange(t,n))})},t.Range_GetRowsAbove=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getRowsAbove",n,t.getRow(0),-1,0)})},t.Range_GetRowsBelow=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:this._getAdjacentRange("getRowsBelow",n,t.getLastRow(),1,0)})},t.Range_Formulas_Set=function(e,t){return e.m_formulas=t,c(e,"Formulas",t)?{handled:!0}:{handled:!1}},t.Range_FormulasLocal_Set=function(e,t){return e.m_formulasLocal=t,c(e,"FormulasLocal",t)?{handled:!0}:{handled:!1}},t.Range_FormulasR1C1_Set=function(e,t){return e.m_formulasR1C1=t,c(e,"FormulasR1C1",t)?{handled:!0}:{handled:!1}},t.Range_NumberFormat_Set=function(e,t){return e.m_numberFormat=t,c(e,"NumberFormat",t,x(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_Values_Set=function(e,t){return e.m_values=t,c(e,"Values",t,x(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJson_Set=function(e,t){return e.m_valuesAsJson=t,c(e,"ValuesAsJson",t,x(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJsonLocal_Set=function(e,t){return e.m_valuesAsJsonLocal=t,c(e,"ValuesAsJsonLocal",t,x(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}}}(e._CC||(e._CC={})),function(t){t.SettingCollection_Add=function(n,r,i){return i=t._replaceDateWithStringDate(i),{handled:!0,result:_(e.Setting,n,"Add",0,[r,i],!1,!0,null,0)}},t.SettingCollection_SettingsChanged_EventArgsTransform=function(e,t){return{settings:e}}}(e._CC||(e._CC={})),function(e){function t(e){var t=JSON.stringify(e,(function(e,t){return this[e]instanceof Date?"Date("+this[e].getTime()+")":t}));return e=JSON.parse(t)}e._replaceDateWithStringDate=t,e.Setting_HandleResult=function(e,t){P(t.Value)||(t.Value=function(e){var t=JSON.stringify(e);return e=JSON.parse(t,(function(e,t){var n;return"string"===typeof t&&t&&t.length>6&&"Date("===t.slice(0,5)&&")"===t.slice(-1)&&(n=new Date(parseInt(t.slice(5,-1))))?n:t}))}(t.Value))},e.Setting_Value_Set=function(e,n){if(!F(n)){e.m_value=n;var r=t(n);return D(e,"Value",r,0),{handled:!0}}return{handled:!1}}}(e._CC||(e._CC={}));var M=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.NamedItemCollectionCustom=M,function(e){e.Binding_DataChanged_EventArgsTransform=function(e,t){return{binding:e}},e.Binding_SelectionChanged_EventArgsTransform=function(e,t){return{binding:e,columnCount:t.columnCount,rowCount:t.rowCount,startColumn:t.startColumn,startRow:t.startRow}}}(e._CC||(e._CC={}));var k=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.TableCollectionCustom=k,function(t){t.TableCollection_Changed_EventArgsTransform=function(t,n){var r,i=n;return null==i.valueBefore&&null==i.valueAfter||(r={valueBefore:i.valueBefore,valueAfter:i.valueAfter,valueTypeBefore:i.valueTypeBefore,valueTypeAfter:i.valueTypeAfter,valueAsJsonBefore:i.valueAsJsonBefore,valueAsJsonAfter:i.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:i.changeType,source:i.source,worksheetId:i.worksheetId,tableId:i.tableId,address:i.address,getRange:function(e){return R("TableChangedEventArgs.getRange",C,"1.8",S),e.workbook._GetRangeForEventByReferenceId(i.referenceId)},getRangeOrNullObject:function(e){return R("TableChangedEventArgs.getRangeOrNullObject",C,"1.8",S),e.workbook._GetRangeOrNullObjectForEventByReferenceId(i.referenceId)},details:r}}}(e._CC||(e._CC={})),function(t){t.Table_HandleIdResult=function(e,t){P(t.Id)||(t.Id=t.Id.toString())},t.Table_HandleResult=function(e,t){P(t.Id)||(t.Id=t.Id.toString())},t.Table_Changed_EventArgsTransform=function(t,n){var r,i=n;return null==i.valueBefore&&null==i.valueAfter||(r={valueBefore:i.valueBefore,valueAfter:i.valueAfter,valueTypeBefore:i.valueTypeBefore,valueTypeAfter:i.valueTypeAfter,valueAsJsonBefore:i.valueAsJsonBefore,valueAsJsonAfter:i.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:i.changeType,source:i.source,worksheetId:i.worksheetId,tableId:i.tableId,address:i.address,getRange:function(e){return R("TableChangedEventArgs.getRange",C,"1.8",S),e.workbook._GetRangeForEventByReferenceId(i.referenceId)},getRangeOrNullObject:function(e){return R("TableChangedEventArgs.getRangeOrNullObject",C,"1.8",S),e.workbook._GetRangeOrNullObjectForEventByReferenceId(i.referenceId)},details:r}},t.Table_SelectionChanged_EventArgsTransform=function(t,n){var r=n,i=!r.address||0===r.address.length;return{type:e.EventType.tableSelectionChanged,isInsideTable:!i,worksheetId:r.worksheetId,tableId:t.id,address:r.address}}}(e._CC||(e._CC={}));var N=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ChartCollectionCustom=N,function(t){t.ChartCollection_Add=function(t,n,r,i){if(!(r instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Charts.Add");return{handled:!1,result:null}}}(e._CC||(e._CC={})),function(t){t.Chart_SetData=function(t,n,r){if(!(n instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Chart.setData");return{handled:!1}}}(e._CC||(e._CC={}));var j=function(){function e(){}return e.prototype.load=function(e){return I(this,e),this},e}();e.ChartFillCustom=j;var U=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.VisualCollectionCustom=U,function(e){e.VisualCollection_AgaveVisualUpdate_EventArgsTransform=function(e,t){var n=t;return{type:n.type,payload:n.payload}}}(e._CC||(e._CC={})),function(t){t.Visual_ChangeNotification_EventArgsTransform=function(t,n){var r=n;return{targetId:r.targetId,changeType:r.changeType,payload:r.payload,type:e.EventType.visualChange}}}(e._CC||(e._CC={}));var L=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.PivotTableCollectionCustom=L,function(t){t.PivotLayout_GetColumnLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:_(e.Range,t,"GetColumnLabelRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataBodyRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:_(e.Range,t,"GetDataBodyRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataHierarchy=function(t,n){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:(R("PivotLayout.getDataHierarchy",C,"1.9",S),{handled:!0,result:_(e.DataPivotHierarchy,t,"GetDataHierarchy",0,[n],!1,!1,null,0)})},t.PivotLayout_GetFilterAxisRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:_(e.Range,t,"GetFilterAxisRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:_(e.Range,t,"GetRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRowLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:_(e.Range,t,"GetRowLabelRange",0,[],!1,!1,null,0)}}}(e._CC||(e._CC={})),function(e){e.PivotField_SortByLabels=function(e,t){return"string"===typeof t&&(t="ascending"===t.toLowerCase()),E(e,"SortByLabels",0,[t],0,0),{handled:!0}}}(e._CC||(e._CC={})),function(t){t.NumberFormattingService_GetFormatter=function(t,n){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(R("NumberFormatting.GetFormatter","NumberFormatting","1.1",S),{handled:!0,result:_(e.NumberFormatter,t,"GetFormatter",0,[n],!1,!1,null,0)})}}(e._CC||(e._CC={})),function(e){e.NumberFormatter_Format=function(e,t){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(R("NumberFormatter.Format","NumberFormatting","1.1",S),{handled:!0,result:E(e,"Format",0,[t],0,0)})}}(e._CC||(e._CC={}));var H=function(){function n(){}return n.register=function(n,r){return R("CustomFunctionManager.register","CustomFunctions","1.3",S),t({delayForCellEdit:!0},(function(t){return e.CustomFunctionManager.newObject(t).register(n,r)}))},n.getStatus=function(){return R("CustomFunctionManager.register","CustomFunctions","1.3",S),t({delayForCellEdit:!0},(function(t){var n=e.CustomFunctionManager.newObject(t).load("status");return t.sync().then((function(){return n.status}))}))},n}();e.CustomFunctionManagerCustom=H,function(e){e.CustomFunctionManager_StaticCustomize=function(e){e.register=H.register,e.getStatus=H.getStatus}}(e._CC||(e._CC={})),function(e){e.Style_TextOrientation_Set=function(e,t){return e.m_textOrientation=t,D(e,"Orientation",t,0),{handled:!0}}}(e._CC||(e._CC={})),function(e){e.InternalTest_Test1Event_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}},e.InternalTest_TestEvent_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}}}(e._CC||(e._CC={}));var B=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.CommentCollectionCustom=B;var W,V=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ShapeCollectionCustom=V,function(e){e.accessDenied="AccessDenied",e.apiNotFound="ApiNotFound",e.conflict="Conflict",e.emptyChartSeries="EmptyChartSeries",e.filteredRangeConflict="FilteredRangeConflict",e.formulaLengthExceedsLimit="FormulaLengthExceedsLimit",e.generalException="GeneralException",e.inactiveWorkbook="InactiveWorkbook",e.insertDeleteConflict="InsertDeleteConflict",e.invalidArgument="InvalidArgument",e.invalidBinding="InvalidBinding",e.invalidOperation="InvalidOperation",e.invalidReference="InvalidReference",e.invalidSelection="InvalidSelection",e.itemAlreadyExists="ItemAlreadyExists",e.itemNotFound="ItemNotFound",e.mergedRangeConflict="MergedRangeConflict",e.nonBlankCellOffSheet="NonBlankCellOffSheet",e.notImplemented="NotImplemented",e.openWorkbookLinksBlocked="OpenWorkbookLinksBlocked",e.operationCellsExceedLimit="OperationCellsExceedLimit",e.pivotTableRangeConflict="PivotTableRangeConflict",e.powerQueryRefreshResourceChallenge="PowerQueryRefreshResourceChallenge",e.rangeExceedsLimit="RangeExceedsLimit",e.refreshWorkbookLinksBlocked="RefreshWorkbookLinksBlocked",e.requestAborted="RequestAborted",e.responsePayloadSizeLimitExceeded="ResponsePayloadSizeLimitExceeded",e.unsupportedFeature="UnsupportedFeature",e.unsupportedFillType="UnsupportedFillType",e.unsupportedOperation="UnsupportedOperation",e.unsupportedSheet="UnsupportedSheet",e.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"}(W=e.ErrorCodes||(e.ErrorCodes={})),e.Interfaces||(e.Interfaces={});new OfficeExtension.LibraryBuilder({metadata:{version:"1.0.0",name:"Excel",defaultApiSetName:"ExcelApi",hostName:"Excel",apiSets:[["1.19","ExcelApiUndo"],["1.1","Recorder"],["99.9"],["1.4","ExcelApiUndo"],["1.8"],["1.9"],["1.11"],["1.18"],["1.6"],["1.6","ExcelApiUndo"],["1.7"],["1.1","ExcelApiUndo"],["1.2"],["1.3"],["1.4"],["1.5"],["1.10"],["1.14"],["1.1","ExcelApiOnline"],["1.1","CustomFunctions"],["1.1","WACOperationEvents"],["1.3","ExcelApiUndo"],["1.13"],["1.16"],["1.8","ExcelApiUndo"],["1.16","ExcelApiUndo"],["1.12"],["1.2","ExcelApiOnline"],["1.2","ExcelApiUndo"],["1.17"],["1.7","ExcelApiUndo"],["1.10","ExcelApiUndo"],["1.14","ExcelApiUndo"],["1.15","ExcelApiUndo"],["1.15"],["1.17","ExcelApiUndo"],["99.99","ExcelApiUndo"],["1.9","ExcelApiUndo"],["1.11","ExcelApiUndo"],["1.12","ExcelApiUndo"],["1.13","ExcelApiUndo"],["1.18","ExcelApiUndo"]],strings:[],enumTypes:[["UndoChangeType",["undoAction","redoAction","undoOrRedoCleared","undoGroupAdded"]],["SDX",["guidedReapply"]],["BusinessBarEntryType",[],{officeScriptsRunningStatus:0,msFormsDataSyncRunningStatus:1}],["FormulaReferenceStyle",["a1","r1C1"]],["NavigationObjectType",["table","pivotTable","chart","shape","namedRange"]],["UserActivityType",["none","insertSheet","deleteSheet","renameSheet","changeCell","insertRow","insertColumn","deleteRow","deleteColumn","insertPartialRow","insertPartialColumn","insertPartialColumnRightToLeft","deletePartialRow","deletePartialColumn","deletePartialColumnRightToLeft","move","sort","mergeCells","unmergeCells","unknownOperation","genericEdit"]],["LineageEndOfLogStatus",["loadInProgress","success","endOfLog","purged","trimmed","unsupported","cleared","error"]],["LineageLoadType",["new","next","previous","latest"]],["LoadToType",["connectionOnly","table","pivotTable","pivotChart"]],["QueryError",["unknown","none","failedLoadToWorksheet","failedLoadToDataModel","failedDownload","failedToCompleteDownload"]],["RangeOptimizationType",["other","numberFormat","textAlignment","textProperties","cellBorder","fillColor","sheetProtection","rowHeight","rowVisibility"]],["WorkbookLinksHardToFindMessages",["none","containsDefinedNames","hiddenOrVeryHiddenSheet","hiddenFloatingObjects","lockedFloatingObjectsThroughVba","protectedSheet","containsConditionalFormatting","containsDataValidation","hiddenRowsAndColumns"]],["WorkbookLinksIconState",["ok","moreInfo","warning"]],["WorkbookLinksRefreshSettings",["ask","always","never"]],["WorkbookConditionalFormattingRulesManagerScope",["defaultScope","selectedRange","activatedWorksheet","activatedTable","activatedPivotTable"]],["WorkbookLinksRefreshMode",["manual","automatic"]],["HelpTopic",["showChanges","guidedReapply","externalCodeServiceDiagnostics"]],["DocumentTaskChangeAction",[],{unknown:"unknown",create:"create",assign:"assign",unassign:"unassign",unassignAll:"unassignAll",setSchedule:"setSchedule",setPercentComplete:"setPercentComplete",setPriority:"setPriority",remove:"remove",restore:"restore",setTitle:"setTitle",undo:"undo"}],["DataSourceType",["unknown","cube","localRange","localTable","oledbDefault"]],["DateFilterCondition",["unknown","equals","before","beforeOrEqualTo","after","afterOrEqualTo","between","tomorrow","today","yesterday","nextWeek","thisWeek","lastWeek","nextMonth","thisMonth","lastMonth","nextQuarter","thisQuarter","lastQuarter","nextYear","thisYear","lastYear","yearToDate","allDatesInPeriodQuarter1","allDatesInPeriodQuarter2","allDatesInPeriodQuarter3","allDatesInPeriodQuarter4","allDatesInPeriodJanuary","allDatesInPeriodFebruary","allDatesInPeriodMarch","allDatesInPeriodApril","allDatesInPeriodMay","allDatesInPeriodJune","allDatesInPeriodJuly","allDatesInPeriodAugust","allDatesInPeriodSeptember","allDatesInPeriodOctober","allDatesInPeriodNovember","allDatesInPeriodDecember"]],["LabelFilterCondition",["unknown","equals","beginsWith","endsWith","contains","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between"]],["PivotFilterType",["unknown","value","manual","label","date"]],["TopBottomSelectionType",["items","percent","sum"]],["ValueFilterCondition",["unknown","equals","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between","topN","bottomN"]],["BuiltInPivotTableStyle",["none","light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","light22","light23","light24","light25","light26","light27","light28","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11","dark12","dark13","dark14","dark15","dark16","dark17","dark18","dark19","dark20","dark21","dark22","dark23","dark24","dark25","dark26","dark27","dark28"]],["BuiltInSlicerStyle",["light1","light2","light3","light4","light5","light6","other1","other2","dark1","dark2","dark3","dark4","dark5","dark6"]],["BuiltInTableStyle",["light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11"]],["ChartSeriesDimension",["categories","values","bubbleSizes"],{xvalues:"XValues",yvalues:"YValues"}],["PivotTableDateGroupBy",["invalid","bySeconds","byMinutes","byHours","byDays","byMonths","byQuarters","byYears"]],["PivotFilterTopBottomCriterion",["invalid","topItems","topPercent","topSum","bottomItems","bottomPercent","bottomSum"]],["SortBy",["ascending","descending"]],["AggregationFunction",["unknown","automatic","sum","count","average","max","min","product","countNumbers","standardDeviation","standardDeviationP","variance","varianceP"]],["ShowAsCalculation",["unknown","none","percentOfGrandTotal","percentOfRowTotal","percentOfColumnTotal","percentOfParentRowTotal","percentOfParentColumnTotal","percentOfParentTotal","percentOf","runningTotal","percentRunningTotal","differenceFrom","percentDifferenceFrom","rankAscending","rankDecending","index"]],["PivotAxis",["unknown","row","column","data","filter"]],["LinkedDataTypeRefreshMode",["unknown","manual","onLoad","periodic"]],["AxisType",["invalid","category","value","series"]],["AxisGroup",["primary","secondary"]],["AxisScaleType",["linear","logarithmic"]],["AxisCrosses",["automatic","maximum","minimum","custom"]],["AxisTickMark",["none","cross","inside","outside"]],["AxisTickLabelPosition",["nextToAxis","high","low","none"]],["TrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ChartAxisType",["invalid","category","value","series"]],["ChartAxisGroup",["primary","secondary"]],["ChartAxisScaleType",["linear","logarithmic"]],["ChartAxisPosition",["automatic","maximum","minimum","custom"]],["ChartAxisTickMark",["none","cross","inside","outside"]],["CalculationState",["done","calculating","pending"]],["ChartAxisTickLabelPosition",["nextToAxis","high","low","none"]],["ChartAxisDisplayUnit",["none","hundreds","thousands","tenThousands","hundredThousands","millions","tenMillions","hundredMillions","billions","trillions","custom"]],["ChartAxisTimeUnit",["days","months","years"]],["ChartBoxQuartileCalculation",["inclusive","exclusive"]],["ChartAxisCategoryType",["automatic","textAxis","dateAxis"]],["ChartBinType",["category","auto","binWidth","binCount"]],["ChartLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","grey25","grey50","grey75","automatic","roundDot"]],["ChartDataLabelPosition",["invalid","none","center","insideEnd","insideBase","outsideEnd","left","right","top","bottom","bestFit","callout"]],["ChartErrorBarsInclude",["both","minusValues","plusValues"]],["ChartErrorBarsType",["fixedValue","percent","stDev","stError","custom"]],["ChartMapAreaLevel",["automatic","dataOnly","city","county","state","country","continent","world"]],["ChartGradientStyle",["twoPhaseColor","threePhaseColor"]],["ChartGradientStyleType",["extremeValue","number","percent"]],["ChartTitlePosition",["automatic","top","bottom","left","right"]],["ChartLegendPosition",["invalid","top","bottom","left","right","corner","custom"]],["ChartMarkerStyle",["invalid","automatic","none","square","diamond","triangle","star","dot","dash","circle","plus","picture"],{x:"X"}],["ChartPlotAreaPosition",["automatic","custom"]],["ChartMapLabelStrategy",["none","bestFit","showAll"]],["ChartMapProjectionType",["automatic","mercator","miller","robinson","albers"]],["ChartParentLabelStrategy",["none","banner","overlapping"]],["ChartSeriesBy",["auto","columns","rows"]],["ChartDataSourceType",["localRange","externalRange","list","unknown"]],["ChartTextHorizontalAlignment",["center","left","right","justify","distributed"]],["ChartTextVerticalAlignment",["center","bottom","top","justify","distributed"]],["ChartTickLabelAlignment",["center","left","right"]],["ChartType",["invalid","columnClustered","columnStacked","columnStacked100","barClustered","barStacked","barStacked100","lineStacked","lineStacked100","lineMarkers","lineMarkersStacked","lineMarkersStacked100","pieOfPie","pieExploded","barOfPie","areaStacked","areaStacked100","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","line","pie","area","doughnut","radar","histogram","boxwhisker","pareto","regionMap","treemap","waterfall","sunburst","funnel"],{_3DColumnClustered:"3DColumnClustered",_3DColumnStacked:"3DColumnStacked",_3DColumnStacked100:"3DColumnStacked100",_3DBarClustered:"3DBarClustered",_3DBarStacked:"3DBarStacked",_3DBarStacked100:"3DBarStacked100",_3DPieExploded:"3DPieExploded",xyscatterSmooth:"XYScatterSmooth",xyscatterSmoothNoMarkers:"XYScatterSmoothNoMarkers",xyscatterLines:"XYScatterLines",xyscatterLinesNoMarkers:"XYScatterLinesNoMarkers",_3DAreaStacked:"3DAreaStacked",_3DAreaStacked100:"3DAreaStacked100",_3DColumn:"3DColumn",_3DLine:"3DLine",_3DPie:"3DPie",xyscatter:"XYScatter",_3DArea:"3DArea"}],["ChartUnderlineStyle",["none","single"]],["ChartDisplayBlanksAs",["notPlotted","zero","interplotted"]],["ChartPlotBy",["rows","columns"]],["ChartSplitType",["splitByPosition","splitByValue","splitByPercentValue","splitByCustomSplit"]],["ChartColorScheme",["colorfulPalette1","colorfulPalette2","colorfulPalette3","colorfulPalette4","monochromaticPalette1","monochromaticPalette2","monochromaticPalette3","monochromaticPalette4","monochromaticPalette5","monochromaticPalette6","monochromaticPalette7","monochromaticPalette8","monochromaticPalette9","monochromaticPalette10","monochromaticPalette11","monochromaticPalette12","monochromaticPalette13"]],["ChartTrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ShapeZOrder",["bringToFront","bringForward","sendToBack","sendBackward"]],["ShapeType",["unsupported","image","geometricShape","group","line"]],["ShapeScaleType",["currentSize","originalSize"]],["ShapeScaleFrom",["scaleFromTopLeft","scaleFromMiddle","scaleFromBottomRight"]],["ShapeFillType",["noFill","solid","gradient","pattern","pictureAndTexture","mixed"]],["ShapeFontUnderlineStyle",["none","single","double","heavy","dotted","dottedHeavy","dash","dashHeavy","dashLong","dashLongHeavy","dotDash","dotDashHeavy","dotDotDash","dotDotDashHeavy","wavy","wavyHeavy","wavyDouble"]],["PictureFormat",[],{unknown:"UNKNOWN",bmp:"BMP",jpeg:"JPEG",gif:"GIF",png:"PNG",svg:"SVG"}],["ShapeLineStyle",["single","thickBetweenThin","thickThin","thinThick","thinThin"]],["ShapeLineDashStyle",["dash","dashDot","dashDotDot","longDash","longDashDot","roundDot","solid","squareDot","longDashDotDot","systemDash","systemDot","systemDashDot"]],["ArrowheadLength",["short","medium","long"]],["ArrowheadStyle",["none","triangle","stealth","diamond","oval","open"]],["ArrowheadWidth",["narrow","medium","wide"]],["PremiumLicenseName",["python"]],["BindingType",["range","table","text"]],["BorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight","insideVertical","insideHorizontal","diagonalDown","diagonalUp"]],["BorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","double","slantDashDot"]],["BorderWeight",["hairline","thin","medium","thick"]],["CalculationMode",["automatic","automaticExceptTables","manual"]],["RuntimeCalculationMode",[],{undefined:0,automatic:1,automaticExceptTables:2,manual:3}],["CalculationType",["recalculate","full","fullRebuild"]],["ClearApplyTo",["all","formats","contents","hyperlinks","removeHyperlinks"]],["VisualCategory",["column","bar","line","area","pie","donut","scatter","bubble","statistical","stock","combo","hierarchy","surface","map","funnel","radar","waterfall","threeD","other"]],["VisualPropertyType",["object","collection","string","double","int","bool","enum","color"]],["VisualChangeType",["dataChange","propertyChange","genericChange","selectionChange"]],["BoolMetaPropertyType",["writeOnly","readOnly","hideEntireSubtreeUI","hideMeButShowChildrenUI","expandableUI","nextPropOnSameLine","hideLabel","showResetUI","hasOwnExpandableSection","nextPropOnSameLineFOTP","showResetUIFOTP","untransferable","ignoreDuringChangeChartType","notTriviallyUndoable","volatileEnum","exceptionCollection","metaOnly","showHideCollection","errorMessage","infoMessage"]],["ConditionalDataBarAxisFormat",["automatic","none","cellMidPoint"]],["ConditionalDataBarDirection",["context","leftToRight","rightToLeft"]],["ConditionalFormatDirection",["top","bottom"]],["ConditionalFormatType",["custom","dataBar","colorScale","iconSet","topBottom","presetCriteria","containsText","cellValue"]],["ConditionalFormatRuleType",["invalid","automatic","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalFormatIconRuleType",["invalid","number","percent","formula","percentile"]],["ConditionalFormatColorCriterionType",["invalid","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalTopBottomCriterionType",["invalid","topItems","topPercent","bottomItems","bottomPercent"]],["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"]],["ConditionalTextOperator",["invalid","contains","notContains","beginsWith","endsWith"]],["ConditionalCellValueOperator",["invalid","between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual"]],["ConditionalIconCriterionOperator",["invalid","greaterThan","greaterThanOrEqual"]],["ConditionalRangeBorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight"]],["ConditionalRangeBorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot"]],["ConditionalRangeFontUnderlineStyle",["none","single","double"]],["CustomFunctionType",["invalid","script","webService"]],["CustomFunctionMetadataFormat",["invalid","openApi"]],["DataValidationType",["none","wholeNumber","decimal","list","date","time","textLength","custom","inconsistent","mixedCriteria"]],["DataValidationOperator",["between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqualTo","lessThanOrEqualTo"]],["DataValidationAlertStyle",["stop","warning","information"]],["DeleteShiftDirection",["up","left"]],["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"]],["FilterDatetimeSpecificity",["year","month","day","hour","minute","second"]],["FilterOn",["bottomItems","bottomPercent","cellColor","dynamic","fontColor","values","topItems","topPercent","icon","custom"]],["FilterOperator",["and","or"]],["HorizontalAlignment",["general","left","center","right","fill","justify","centerAcrossSelection","distributed"]],["IconSet",["invalid","threeArrows","threeArrowsGray","threeFlags","threeTrafficLights1","threeTrafficLights2","threeSigns","threeSymbols","threeSymbols2","fourArrows","fourArrowsGray","fourRedToBlack","fourRating","fourTrafficLights","fiveArrows","fiveArrowsGray","fiveRating","fiveQuarters","threeStars","threeTriangles","fiveBoxes"]],["ImageFittingMode",["fit","fitAndCenter","fill"]],["InsertShiftDirection",["down","right"]],["NamedItemScope",["worksheet","workbook"]],["NamedItemType",["string","integer","double","boolean","range","error","array"]],["RangeUnderlineStyle",["none","single","double","singleAccountant","doubleAccountant"]],["SheetVisibility",["visible","hidden","veryHidden"]],["EventTriggerSource",["unknown","thisLocalAddin"]],["RangeValueType",["unknown","empty","string","integer","double","boolean","error","richValue"]],["KeyboardDirection",["left","right","up","down"]],["SearchDirection",["forward","backwards"]],["SortOrientation",["rows","columns"]],["SortOn",["value","cellColor","fontColor","icon"]],["SortDataOption",["normal","textAsNumber"]],["SortMethod",["pinYin","strokeCount"]],["VerticalAlignment",["top","center","bottom","justify","distributed"]],["MessageCategory",[],{none:0,customFunction:1,action:2,event:65536}],["MessageType",[],{none:0,testEvent:1,test1Event:2,worksheetDataChangedEvent:10,worksheetActivatedEvent:11,worksheetDeactivatedEvent:12,worksheetAddedEvent:13,worksheetSelectionChangedEvent:14,worksheetDeletedEvent:15,worksheetCalculatedEvent:16,worksheetFilteredEvent:17,worksheetFormatChangedEvent:18,worksheetRowSortedEvent:19,worksheetColumnSortedEvent:20,worksheetSingleClickedEvent:21,worksheetRowHiddenChangedEvent:22,worksheetFormulaChangedEvent:23,worksheetProtectionChangedEvent:24,worksheetNameChangedEvent:25,worksheetVisibilityChangedEvent:26,worksheetMovedEvent:27,worksheetNavigationObjectChangedEvent:28,worksheetRowHeightChangedEvent:29,workbookFormulaReferenceStyleChangedEvent:30,chartAddedEvent:50,chartActivatedEvent:51,chartDeactivatedEvent:52,chartDeletedEvent:53,tableSelectionChangedEvent:100,tableDataChangedEvent:101,tableAddedEvent:102,tableDeletedEvent:103,tableFilteredEvent:104,agaveVisualUpdateEvent:150,customFunctionExecutionBeginEvent:200,customFunctionExecutionEndEvent:201,commentAddedEvent:250,commentDeletedEvent:251,commentChangedEvent:252,invocationMessage:1e3,cancellationMessage:1001,metadataMessage:1002,visualSelectionChangedEvent:2e3,visualChangeEvent:2001,visualTrackerModelChangedEvent:2002,shapeSelectionChangedEvent:2100,shapeActivatedEvent:2101,shapeDeactivatedEvent:2102,shapeAddedEvent:2103,shapeDeletedEvent:2104,workbookAutoSaveSettingChangedEvent:2200,wacoperationEvent:2201,recordingStateChangedEvent:2202,workbookActivatedEvent:2203,workbookNavigationObjectChangedEvent:2204,ribbonCommandExecutedEvent:2300,linkedDataTypeRefreshRequestCompletedEvent:2500,linkedDataTypeRefreshModeChangedEvent:2501,linkedDataTypeLinkedDataTypeAddedEvent:2502,linkedWorkbookWorkbookLinksChangedEvent:2600,linkedWorkbookRefreshCompletedEvent:2601,rangePickerSelectionChangedEvent:2700,rangePickerDeactivatedEvent:2701,lineageActivityUpdateAvailableEvent:2800,lineageActivityFilterUpdatedEvent:2801,lineageActivityLoadCompletedEvent:2802,pivotTableAddedEvent:2900,pivotTableDeletedEvent:2901,namedItemAddedEvent:3e3,namedItemDeletedEvent:3001,guidedReapplyManagerUpdateAvailableEvent:3100,vbaRecorderRecordingChangedEvent:3200,vbaRecorderRecordingChanged2Event:3202,workbookActionRecordedEvent:3201,externalCodeServiceDiagnosticsNewEntryEvent:3300,externalCodeServiceDiagnosticsFilterUpdatedEvent:3301,rangeValuesPreviewDismissedEvent:3400,applicationUndoChangedEvent:3500,appRuntimeVisibilityChangedEvent:65539,beforeCloseNotifiactionCancelledEvent:65540,augmentationLoopAnnotationAddedEvent:65541}],["InsertDeleteCellsShiftDirection",["none","shiftCellLeft","shiftCellUp","shiftCellRight","shiftCellDown"]],["DocumentPropertyType",["number","boolean","date","string","float"]],["EventSource",["local","remote"]],["DataChangeType",["unknown","rangeEdited","rowInserted","rowDeleted","columnInserted","columnDeleted","cellInserted","cellDeleted"]],["RowHiddenChangeType",["unhidden","hidden"]],["CommentChangeType",["commentEdited","commentResolved","commentReopened","replyAdded","replyDeleted","replyEdited"]],["EventType",["worksheetChanged","worksheetSelectionChanged","worksheetAdded","worksheetActivated","worksheetDeactivated","tableChanged","tableSelectionChanged","worksheetDeleted","chartAdded","chartActivated","chartDeactivated","chartDeleted","worksheetCalculated","visualSelectionChanged","agaveVisualUpdate","tableAdded","tableDeleted","tableFiltered","worksheetFiltered","shapeActivated","shapeDeactivated","visualChange","workbookAutoSaveSettingChanged","worksheetFormatChanged","ribbonCommandExecuted","worksheetRowSorted","worksheetColumnSorted","worksheetSingleClicked","worksheetRowHiddenChanged","recordingStateChangedEvent","commentAdded","commentDeleted","commentChanged","linkedDataTypeRefreshRequestCompleted","linkedDataTypeRefreshModeChanged","linkedDataTypeLinkedDataTypeAdded","worksheetFormulaChanged","workbookActivated","linkedWorkbookWorkbookLinksChanged","linkedWorkbookRefreshCompleted","worksheetProtectionChanged","worksheetNameChanged","worksheetVisibilityChanged","worksheetMoved","lineageActivityUpdateAvailable","lineageActivityFilterUpdated","lineageActivityLoadCompleted","shapeAdded","shapeDeleted","pivotTableAdded","pivotTableDeleted","namedItemAdded","namedItemDeleted","worksheetNavigationObjectChanged","workbookNavigationObjectChanged","worksheetRowHeightChanged","workbookFormulaReferenceStyleChanged","guidedReapplyManagerUpdateAvailable","vbaRecorderRecordingChanged","rangeValuesPreviewDismissed","annotationAdded","workbookActionRecorded","applicationUndoChanged","vbaRecorderRecordingChanged2"],{wacoperationEvent:"WACOperationEvent"}],["DocumentPropertyItem",["title","subject","author","keywords","comments","template","lastAuth","revision","appName","lastPrint","creation","lastSave","category","format","manager","company"]],["SubtotalLocationType",["atTop","atBottom","off"]],["PivotLayoutType",["compact","tabular","outline"]],["ProtectionSelectionMode",["normal","unlocked","none"]],["PageOrientation",["portrait","landscape"]],["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"]],["ReadingOrder",["context","leftToRight","rightToLeft"]],["BuiltInStyle",["normal","comma","currency","percent","wholeComma","wholeDollar","hlink","hlinkTrav","note","warningText","emphasis1","emphasis2","emphasis3","sheetTitle","heading1","heading2","heading3","heading4","input","output","calculation","checkCell","linkedCell","total","good","bad","neutral","accent1","accent1_20","accent1_40","accent1_60","accent2","accent2_20","accent2_40","accent2_60","accent3","accent3_20","accent3_40","accent3_60","accent4","accent4_20","accent4_40","accent4_60","accent5","accent5_20","accent5_40","accent5_60","accent6","accent6_20","accent6_40","accent6_60","explanatoryText"]],["PrintErrorType",["asDisplayed","blank","dash","notAvailable"]],["WorksheetPositionType",["none","before","after","beginning","end"]],["PrintComments",["noComments","endSheet","inPlace"]],["PrintOrder",["downThenOver","overThenDown"]],["PrintMarginUnit",["points","inches","centimeters"]],["HeaderFooterState",["default","firstAndDefault","oddAndEven","firstOddAndEven"]],["AutoFillType",["fillDefault","fillCopy","fillSeries","fillFormats","fillValues","fillDays","fillWeekdays","fillMonths","fillYears","linearTrend","growthTrend","flashFill"]],["GroupOption",["byRows","byColumns"]],["RangeCopyType",["all","formulas","values","formats","link"]],["LinkedDataTypeState",["none","validLinkedData","disambiguationNeeded","brokenLinkedData","fetchingData"]],["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"]],["ConnectorType",["straight","elbow","curve"]],["ContentType",["plain","mention"]],["SpecialCellType",["conditionalFormats","dataValidations","blanks","constants","formulas","sameConditionalFormat","sameDataValidation","visible"]],["SpecialCellValueType",["all","errors","errorsLogical","errorsNumbers","errorsText","errorsLogicalNumber","errorsLogicalText","errorsNumberText","logical","logicalNumbers","logicalText","logicalNumbersText","numbers","numbersText","text"]],["Placement",["twoCell","oneCell","absolute"]],["FillPattern",["none","solid","gray50","gray75","gray25","horizontal","vertical","down","up","checker","semiGray75","lightHorizontal","lightVertical","lightDown","lightUp","grid","crissCross","gray16","gray8","linearGradient","rectangularGradient"]],["ShapeTextHorizontalAlignment",["left","center","right","justify","justifyLow","distributed","thaiDistributed"]],["ShapeTextVerticalAlignment",["top","middle","bottom","justified","distributed"]],["ShapeTextVerticalOverflow",["overflow","ellipsis","clip"]],["ShapeTextHorizontalOverflow",["overflow","clip"]],["ShapeTextReadingOrder",["leftToRight","rightToLeft"]],["ShapeTextOrientation",["horizontal","vertical","vertical270","wordArtVertical","eastAsianVertical","mongolianVertical","wordArtVerticalRTL"]],["ShapeAutoSize",["autoSizeNone","autoSizeTextToFitShape","autoSizeShapeToFitText","autoSizeMixed"]],["CloseBehavior",["save","skipSave"]],["SaveBehavior",["save","prompt"]],["SlicerSortType",["dataSourceOrder","ascending","descending"]],["RibbonTab",["others","home","insert","draw","pageLayout","formulas","data","review","view","developer","addIns","help"]],["NumberFormatCategory",["general","number","currency","accounting","date","time","percentage","fraction","scientific","text","special","custom"]]],clientObjectTypes:[["UndoScope",0,0,0,[["close",0,0,0,2],["open",1,0,0,2]]],["RangeValuesPreview",4,0,0,[["_RegisterEventDismissed",0,0,0,2,0,1],["_UnregisterEventDismissed",0,0,0,2,0,1],["dismiss",0,2,0,4],["show",3,2,0,4]],0,0,0,[["Dismissed",0,0,"MessageType.rangeValuesPreviewDismissedEvent","this._ParentObject.id","_RegisterEventDismissed","_UnregisterEventDismissed"]]],["AugmentationLoop",0,0,0,[["_RegisterAnnotationAddedEvent",0,2,0,4],["_UnregisterAnnotationAddedEvent",0,2,0,4],["activateAnnotation",1,2,0,4],["submitSignal",1,2,0,4]],0,0,0,[["AnnotationAdded",0,0,"MessageType.augmentationLoopAnnotationAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAnnotationAddedEvent","_UnregisterAnnotationAddedEvent"]]],["ExternalCodeService",0,0,[["diagnostics","ExternalCodeServiceDiagnostics",2,0,0,4]]],["ExternalCodeServiceDiagnostics",0,[["id",2]],0,[["_RegisterEventNewEntry",0,0,0,2,0,1],["_UnregisterEventNewEntry",0,0,0,2,0,1],["clear",0,2,0,4],["fireStoredEntries",0,2,0,4],["_RegisterEventFilterUpdated",0,0,0,2,0,1],["_UnregisterEventFilterUpdated",0,0,0,2,0,1]],0,0,0,[["FilterUpdated",0,0,"MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent","this.id","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["NewEntry",0,0,"MessageType.externalCodeServiceDiagnosticsNewEntryEvent","this.id","_RegisterEventNewEntry","_UnregisterEventNewEntry"]]],["VbaRecorder",0,[["id",2]],0,[["_RegisterEventRecordingChanged",0,0,0,2,0,1],["_UnregisterEventRecordingChanged",0,0,0,2,0,1],["_RegisterEventRecordingChanged2",0,2,2,4],["_UnregisterEventRecordingChanged2",0,2,2,4]],0,0,0,[["RecordingChanged",0,0,"MessageType.vbaRecorderRecordingChangedEvent","this.id","_RegisterEventRecordingChanged","_UnregisterEventRecordingChanged"],["RecordingChanged2",0,2,"MessageType.vbaRecorderRecordingChanged2Event","this.id","_RegisterEventRecordingChanged2","_UnregisterEventRecordingChanged2"]]],["WorksheetOptimizationScanResult",0,[["allocatedCells",2],["optimizableCells",2]],[["ranges","RangeOptimizationCollection",18,0,0,4]]],["UserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity"],["GuidedReapplyManager",0,0,[["activities","UserActivityCollection",18,0,0,4],["summaryCardUserActivity","SummaryCardUserActivity",2,0,0,4]],[["openSavedFile",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["discardActivites",0,2,0,4],["reapplyActivity",1,2,0,4],["saveActivities",0,2,0,4]],0,0,0,[["UpdateAvailable",0,0,"MessageType.guidedReapplyManagerUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["BusinessBar",0,0,0,[["hide",2],["show",2]]],["UserActivity",0,[["activityId",2],["activityType",2],["author",2],["createdDateTime",10],["guid",2],["rangeAddress",2],["sheetName",2],["valueChangeData",2],["authorEmail",2],["locationDeleted",2]],[["highlightRangeAreas","RangeAreas",2,0,0,4]]],["LineageActivityCollection",1,0,0,[["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["clear",0,2,0,4],["getCount",0,2,0,4],["getState",0,2,0,4],["loadActivities",1,2,0,4],["loadLatestActivities",0,2,0,4],["loadNextActivities",0,2,0,4],["loadPreviousActivities",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventFilterUpdated",0,2,0,4],["_RegisterEventLoadCompleted",0,2,0,4],["_UnregisterEventFilterUpdated",0,2,0,4],["_UnregisterEventLoadCompleted",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity",[["FilterUpdated",0,0,"MessageType.lineageActivityFilterUpdatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["LoadCompleted",0,0,"MessageType.lineageActivityLoadCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventLoadCompleted","_UnregisterEventLoadCompleted"],["UpdateAvailable",0,0,"MessageType.lineageActivityUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["SummaryItemUserActivity",0,[["activityType",2],["rangeAddresses",2],["sheetName",2],["valueChangeData",2]]],["SummaryItemUserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SummaryItemUserActivity",1,2,0,4]],0,"SummaryItemUserActivity"],["SummaryCardUserActivity",0,[["authors",2],["currentUser",2],["displayTime",10],["numberOfDetailedCard",2],["summaryUnviewableData",2]],[["summaryItemUserActivities","SummaryItemUserActivityCollection",18,0,0,4]]],["AllowEditRange",0,[["address",1],["isPasswordProtected",3],["title",1]],0,[["delete"],["pauseProtection",1],["setPassword",1]]],["AllowEditRangeCollection",1,0,0,[["add",3],["getCount",0,2,0,4],["pauseProtection",1]],[["getItem","AllowEditRange",1,18,0,4],["getItemAt","AllowEditRange",1,2,0,4],["getItemOrNullObject","AllowEditRange",1,2,0,4]],0,"AllowEditRange"],["Query",0,[["loadedTo",2],["loadedToDataModel",2],["name",2],["refreshDate",10],["rowsLoadedCount",2],["error",2]]],["QueryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Query",1,18,0,4]],0,"Query"],["VisualTracker",0,[["id",2]],0,[["_RegisterEventModelChanged",0,2],["_UnregisterEventModelChanged",0,2],["requestTrackingAlteration",2,2,0,4]],0,0,0,[["ModelChanged",0,0,"MessageType.visualTrackerModelChangedEvent","this.id","_RegisterEventModelChanged","_UnregisterEventModelChanged"]]],["NumberFormatProperty",0,[["key",3],["currency",3],["dateTime",3],["dateTimeHasDayOfWeek",3],["dateTimeHasMonth",3],["dateTimeHasYear",3],["numeric",3],["percent",3],["text",3]]],["NumberFormatPropertyCollection",1,0,0,0,[["getItemAt","NumberFormatProperty",1,2,0,4]],0,"NumberFormatProperty"],["RangeOptimization",0,[["optimizationTypes",2],["range",2]]],["RangeOptimizationCollection",1,[["allocatedCells",2],["optimizableCells",2]],0,[["getCount",0,2,0,4]],[["getItemAt","RangeOptimization",1,2,0,4]],0,"RangeOptimization"],["WorksheetOptimization",0,0,0,0,[["optimize","WorksheetOptimizationResult",0,0,0,2],["scan","RangeOptimizationCollection",0,6,0,4],["scanExtended","WorksheetOptimizationScanResult",0,2,0,4]]],["WorksheetOptimizationResult",0,[["allocatedCells",2],["optimizedCells",2]]],["LinkedWorkbook",0,[["displayUrl",2,3],["fileName",3,3],["id",2],["longErrorDescription",2,3],["refreshEnabled",2,3],["refreshing",2,3],["statusMessage",2,3],["excelIconState",2,3],["hardToFindErrorMessages",2,3],["lastUpdated",10,3]],0,[["_RegisterRefreshCompletedEvent",0,0,3,2,0,1],["_UnregisterRefreshCompletedEvent",0,0,3,2,0,1],["breakLinks"],["changeSource",1,0,3],["findNextLink",0,2,3,4],["openWorkbook",0,2,3,4],["refresh"],["openChangeSourceDialog",0,0,3],["closeChangeSourceDialog",0,0,3]],0,0,0,[["RefreshCompleted",0,3,"MessageType.linkedWorkbookRefreshCompletedEvent","this.id","_RegisterRefreshCompletedEvent","_UnregisterRefreshCompletedEvent"]]],["LinkedWorkbookCollection",1,[["breakAllLinksEnabled",0,3],["refreshAllEnabled",0,3],["workbookLinksRefreshMode"],["workbookLinksRefreshSettings",0,3],["containsNonWorkbookLinks",0,3]],0,[["_RegisterWorkbookLinksChangedEvent",0,2,3,4],["_UnregisterWorkbookLinksChangedEvent",0,2,3,4],["breakAllLinks"],["getCount",0,2,3,4],["refreshAll"],["openEditLinksDialog",0,2,3,4]],[["getItem","LinkedWorkbook",1,18,0,4],["getItemAt","LinkedWorkbook",1,2,3,4],["getItemOrNullObject","LinkedWorkbook",1]],0,"LinkedWorkbook",[["WorkbookLinksChanged",0,3,"MessageType.linkedWorkbookWorkbookLinksChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWorkbookLinksChangedEvent","_UnregisterWorkbookLinksChangedEvent"]]],["DocumentTaskChange",0,[["type",2],["changedBy",2],["commentId",2],["createdDateTime",10],["id",2],["assignee",2],["undoChangeId",2],["priority",2],["title",2],["percentComplete",2],["startDateTime",10],["dueDateTime",10]],0,0,0,0,0,0,"Microsoft.ExcelServices.DocumentTaskChange",4],["DocumentTaskChangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","DocumentTaskChange",1,2,0,4]],0,"DocumentTaskChange"],["RangePicker",0,0,0,[["activate",1,0,0,2,0,4],["deactivate",0,0,0,2,0,4],["updateSelection",1,0,0,2,0,4],["updateSelectionWithNavigation",4,0,0,2,0,4],["_RegisterEventSelectionChanged",0,0,0,2,0,4],["_UnregisterEventSelectionChanged",0,0,0,2,0,4],["_RegisterEventDeactivated",0,2,0,4],["_UnregisterEventDeactivated",0,2,0,4]],0,0,0,[["Deactivated",0,0,"MessageType.rangePickerDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventDeactivated","_UnregisterEventDeactivated"],["SelectionChanged",0,0,"MessageType.rangePickerSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventSelectionChanged","_UnregisterEventSelectionChanged"]]],["DocumentTask",0,[["startAndDueDateTime"],["id",2],["percentComplete"],["priority"],["title"],["assignees",2],["completedBy",2],["completedDateTime",10],["createdBy",2],["createdDateTime",10]],[["changes","DocumentTaskChangeCollection",18,0,0,4],["comment","Comment",2,0,0,4]],[["assign",1],["unassign",1],["unassignAll"]]],["DocumentTaskCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","DocumentTask",1,18,0,4],["getItemOrNullObject","DocumentTask",1,2,0,4],["getItemAt","DocumentTask",1,2,0,4]],0,"DocumentTask"],["DataConnection",0,[["connectionString",2],["name",2],["commandText",2],["dataSourceType",2]]],["Runtime",0,[["enableEvents",1,5]]],["Application",0,[["calculationMode",1],["calculationEngineVersion",3,6],["calculationState",3,6],["decimalSeparator",3,7],["thousandsSeparator",3,7],["useSystemSeparators",3,7],["formatStaleValues",1,8]],[["iterativeCalculation","IterativeCalculation",35,6,0,4],["ribbon","Ribbon",35,6,0,4],["cultureInfo","CultureInfo",3,7,0,4],["undoScope","UndoScope",3,3,0,4]],[["calculate",1],["suspendApiCalculationUntilNextSync",0,1,9,2,0,10],["suspendScreenUpdatingUntilNextSync",0,0,6,2,0,10],["hasLicense",1,2,8,4],["redo",0,0,3,2],["explorePremiumLicense",1,2,8,4],["undo",0,0,3,2],["_RegisterEventUndoChanged",0,2,3,4],["_UnregisterEventUndoChanged",0,2,3,4]],[["createWorkbook","WorkbookCreated",1,10,5,0,0,"_GetWorkbookCreatedById"],["_GetWorkbookCreatedById","WorkbookCreated",1,2,5,4]],0,0,[["UndoChanged",0,3,"MessageType.applicationUndoChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUndoChanged","_UnregisterEventUndoChanged"]]],["IterativeCalculation",0,[["enabled",1],["maxIteration",1],["maxChange",1]]],["Workbook",0,[["name",3,11],["readOnly",3,5],["isDirty",1,6],["use1904DateSystem",1,8],["chartDataPointTrack",1,6],["usePrecisionAsDisplayed",1,6],["calculationEngineVersion",3,6],["autoSave",3,6],["previouslySaved",3,6],["showPivotFieldList",0,8,0,2,12],["formulaReferenceStyle",2,3]],[["worksheets","WorksheetCollection",19,0,0,4],["names","NamedItemCollection",19,0,0,4],["tables","TableCollection",19,0,0,4],["application","Application",2,0,0,4],["bindings","BindingCollection",19,0,0,4],["functions","Functions",2,13,0,4],["_V1Api","_V1Api",2,14,0,4],["pivotTables","PivotTableCollection",19,14,0,4],["settings","SettingCollection",19,15,0,4],["customXmlParts","CustomXmlPartCollection",19,16,0,4],["internalTest","InternalTest",2,9,0,4],["properties","DocumentProperties",35,11,0,4],["styles","StyleCollection",19,11,0,4],["protection","WorkbookProtection",3,11,0,4],["dataConnections","DataConnectionCollection",3,11,0,4],["_Runtime","Runtime",2,16,0,4],["comments","CommentCollection",19,17,0,4],["slicers","SlicerCollection",19,17,0,4],["tableStyles","TableStyleCollection",19,17,0,4],["pivotTableStyles","PivotTableStyleCollection",19,17,0,4],["slicerStyles","SlicerStyleCollection",19,17,0,4],["timelineStyles","TimelineStyleCollection",19,17,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["linkedDataTypes","LinkedDataTypeCollection",18,8,0,4],["queries","QueryCollection",18,18,0,4],["linkedWorkbooks","LinkedWorkbookCollection",18,19,0,4],["rangePicker","RangePicker",2,8,0,4,0,4],["lineageActivities","LineageActivityCollection",18,3,0,4],["businessBar","BusinessBar",2,8,0,4],["guidedReapply","GuidedReapplyManager",2,3,0,4],["vbaRecorder","VbaRecorder",2,8,0,4],["externalCodeService","ExternalCodeService",2,8,0,4],["augmentationLoop","AugmentationLoop",2,8,0,4]],[["_RemoveReference",1,2],["_GetObjectByReferenceId",1,2,0,4],["_GetObjectTypeNameByReferenceId",1,2,0,4],["_RemoveAllReferences",0,2],["_GetReferenceCount",0,2,0,4],["getIsActiveCollabSession",0,0,6],["registerCustomFunctions",7,0,20,8],["_SetOsfControlContainerReadyForCustomFunctions",0,0,20],["close",1,0,7],["save",1,0,7],["_RegisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_UnregisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_RegisterWACOperationEvent",0,2,21,4],["_UnregisterWACOperationEvent",0,2,21,4],["_RegisterRecordingStateChangedEvent",0,0,21,2,0,22],["_UnregisterRecordingStateChangedEvent",0,0,21,2,0,22],["_RegisterActivatedEvent",0,2,23],["_UnregisterActivatedEvent",0,2,23],["insertWorksheetsFromBase64",2,0,23],["enableOfficeScriptRecording",1,1,19],["recordAction",1,3,0,4],["focus",0,2,3,4],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["showHelp",1,2,3,4],["getLinkedEntityCellValue",1,2,24,4],["getThemeColors",0,2,8,4],["_RegisterEventFormulaReferenceStyleChanged",0,2,3,4],["_UnregisterEventFormulaReferenceStyleChanged",0,2,3,4],["notifySDXLoaded",1,2,3,4],["openConditionalFormattingRulesManager",1,0,3],["openNameManager",0,0,3],["_RegisterEventActionRecorded",0,2,2,4],["_UnregisterEventActionRecorded",0,2,2,4]],[["getSelectedRange","Range",0,10,0,4],["getActiveCell","Range",0,10,11,4],["_GetRangeForEventByReferenceId","Range",1,2,0,4],["_GetRangeOrNullObjectForEventByReferenceId","Range",1,2,0,4],["getActiveChart","Chart",0,2,6,4],["getActiveChartOrNullObject","Chart",0,2,6,4],["getSelectedRanges","RangeAreas",0,10,6,4],["_GetRangesForEventByReferenceId","RangeAreas",1,2,6,4],["_GetRangesOrNullObjectForEventByReferenceId","RangeAreas",1,2,6,4],["getActiveSlicer","Slicer",0,2,17,4],["getActiveSlicerOrNullObject","Slicer",0,2,17,4]],0,0,[["ActionRecorded",0,2,"MessageType.workbookActionRecordedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventActionRecorded","_UnregisterEventActionRecorded"],["Activated",0,23,"MessageType.workbookActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["AutoSaveSettingChanged",0,6,"MessageType.workbookAutoSaveSettingChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAutoSaveSettingChangedEvent","_UnregisterAutoSaveSettingChangedEvent"],["FormulaReferenceStyleChanged",0,3,"MessageType.workbookFormulaReferenceStyleChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFormulaReferenceStyleChanged","_UnregisterEventFormulaReferenceStyleChanged"],["NavigationObjectChanged",0,3,"MessageType.workbookNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["RecordingStateChangedEvent",0,21,"MessageType.recordingStateChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRecordingStateChangedEvent","_UnregisterRecordingStateChangedEvent"],["SelectionChanged",3,14,"_CC.office10EventIdDocumentSelectionChangedEvent","","",""],["WACOperationEvent",2,21,"MessageType.wacoperationEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWACOperationEvent","_UnregisterWACOperationEvent"],["_Message",3,11,"_CC.office10EventIdRichApiMessageEvent","","",""]]],["WorkbookProtection",0,[["protected",3]],0,[["protect",1],["unprotect",1]]],["WorkbookCreated",0,[["id",3]],0,[["open",0,2,0,4]]],["Worksheet",0,[["name",1],["id",3],["position",1],["visibility",1],["tabColor",1,11,0,2,25],["standardWidth",1,11],["standardHeight",3,11],["showGridlines",5,5,0,2,26],["showHeadings",5,5],["enableCalculation",1,6],["tabId",3,18]],[["charts","ChartCollection",83,0,0,4],["tables","TableCollection",83,0,0,4],["protection","WorksheetProtection",3,13,0,4],["pivotTables","PivotTableCollection",83,14,0,4],["names","NamedItemCollection",83,15,0,4],["freezePanes","WorksheetFreezePanes",3,11,0,4],["pageLayout","PageLayout",35,6,0,4],["visuals","VisualCollection",83,17,0,4],["shapes","ShapeCollection",83,6,0,4],["horizontalPageBreaks","PageBreakCollection",19,6,0,4],["verticalPageBreaks","PageBreakCollection",19,6,0,4],["autoFilter","AutoFilter",3,6,0,4],["slicers","SlicerCollection",19,17,0,4],["comments","CommentCollection",83,17,0,4],["customProperties","WorksheetCustomPropertyCollection",19,27,0,4],["namedSheetViews","NamedSheetViewCollection",18,19,0,4],["optimization","WorksheetOptimization",2,8,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["visualTracker","VisualTracker",2,28,0,4],["rangeValuesPreview","RangeValuesPreview",66,8,0,4]],[["delete"],["activate",0,2],["calculate",1,0,9],["_RegisterDataChangedEvent",0,0,11,2,0,10],["_UnregisterDataChangedEvent",0,0,11,2,0,10],["_RegisterActivatedEvent",0,0,11,2,0,1],["_UnregisterActivatedEvent",0,0,11,2,0,1],["_RegisterDeactivatedEvent",0,0,11,2,0,1],["_UnregisterDeactivatedEvent",0,0,11,2,0,1],["_RegisterSelectionChangedEvent",0,0,11,2,0,29],["_UnregisterSelectionChangedEvent",0,0,11,2,0,29],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["replaceAll",3,0,6],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,0,17,2,0,1],["_UnregisterRowSortedEvent",0,0,17,2,0,1],["_RegisterColumnSortedEvent",0,0,17,2,0,1],["_UnregisterColumnSortedEvent",0,0,17,2,0,1],["_RegisterSingleClickedEvent",0,0,17,2,0,1],["_UnregisterSingleClickedEvent",0,0,17,2,0,1],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["showOutlineLevels",2,0,17],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,0,30,2,0,1],["_RegisterEventVisibilityChanged",0,0,30,2,0,1],["_UnregisterEventNameChanged",0,0,30,2,0,1],["_UnregisterEventVisibilityChanged",0,0,30,2,0,1],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getRange","Range",1,10,0,4],["getUsedRange","Range",1,10,0,4],["getCell","Range",2,10,0,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getRangeByIndexes","Range",4,10,11,4],["getPrevious","Worksheet",1,10,16,4,0,"_GetSheetById"],["getPreviousOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNext","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNextOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["_GetSheetById","Worksheet",1,2,11,4],["copy","Worksheet",2,0,11,0,0,"_GetAnotherWorksheetById"],["_GetAnotherWorksheetById","Worksheet",1,0,11],["findAll","RangeAreas",2,10,6,4],["findAllOrNullObject","RangeAreas",2,10,6,4],["getRanges","RangeAreas",1,10,6,4],["getUsedRangeAreas","RangeAreas",1,0,3],["getRangeR1C1","Range",1,2,3,4],["getRangesR1C1","RangeAreas",1,2,3,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,0,3]],"workbook.worksheets",0,[["Activated",0,11,"MessageType.worksheetActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","this.id","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,11,"MessageType.worksheetDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","this.id","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","this.id","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","this.id","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","this.id","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["NavigationObjectChanged",0,3,"MessageType.worksheetNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","this.id","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","this.id","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","this.id","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","this.id","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,11,"MessageType.worksheetSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","this.id","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","this.id","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetCollection",1,0,0,[["getCount",1,2,15,4],["_RegisterAddedEvent",0,3,11],["_UnregisterAddedEvent",0,3,11],["_RegisterActivatedEvent",0,3,11],["_UnregisterActivatedEvent",0,0,11,2,0,29],["_RegisterDeactivatedEvent",0,0,11,2,0,29],["_UnregisterDeactivatedEvent",0,0,11,2,0,29],["_RegisterDeletedEvent",0,3,11],["_UnregisterDeletedEvent",0,3,11],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["_RegisterDataChangedEvent",0,3,6],["_UnregisterDataChangedEvent",0,3,6],["_RegisterSelectionChangedEvent",0,0,6,2,0,29],["_UnregisterSelectionChangedEvent",0,0,6,2,0,29],["addFromBase64",4,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,3,17],["_UnregisterRowSortedEvent",0,3,17],["_RegisterColumnSortedEvent",0,3,17],["_UnregisterColumnSortedEvent",0,3,17],["_RegisterSingleClickedEvent",0,0,17,2,0,29],["_UnregisterSingleClickedEvent",0,0,17,2,0,29],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,2,30,4],["_RegisterEventVisibilityChanged",0,2,30,4],["_UnregisterEventNameChanged",0,2,30,4],["_UnregisterEventVisibilityChanged",0,2,30,4],["_RegisterEventMoved",0,0,30,2,0,1],["_UnregisterEventMoved",0,0,30,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getItem","Worksheet",1,18,0,4],["add","Worksheet",1,8,0,2,0,0,29],["getActiveWorksheet","Worksheet",0,2,0,4],["getItemOrNullObject","Worksheet",1,2,15,4],["getFirst","Worksheet",1,10,16,4],["getLast","Worksheet",1,10,16,4]],0,"Worksheet",[["Activated",0,11,"MessageType.worksheetActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,11,"MessageType.worksheetAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,6,"MessageType.worksheetDataChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,11,"MessageType.worksheetDeletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["Moved",0,30,"MessageType.worksheetMovedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventMoved","_UnregisterEventMoved"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,6,"MessageType.worksheetSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetProtection",0,[["protected",3],["options",3],["canPauseProtection",3,19],["isPasswordProtected",3,19],["isPaused",3,19],["savedOptions",3,19]],[["allowEditRanges","AllowEditRangeCollection",19,19,0,4]],[["protect",2,1],["unprotect",1],["checkPassword",1,2,19,4],["pauseProtection",1,0,19],["resumeProtection",0,0,19],["setPassword",1,0,19],["updateOptions",1,0,19]]],["WorksheetFreezePanes",0,0,0,[["unfreeze"],["freezeAt",1],["freezeRows",1],["freezeColumns",1]],[["getLocation","Range",0,10,0,4],["getLocationOrNullObject","Range",0,10,0,4]]],["Range",14,[["numberFormat",5,0,0,2,31],["numberFormatLocal",1,11,0,2,31],["values",5,0,0,2,31],["text",3],["formulas",5,0,0,2,32],["formulasLocal",5,0,0,2,32],["rowIndex",3],["columnIndex",3],["rowCount",3],["columnCount",3],["address",3],["addressLocal",3],["cellCount",3],["_ReferenceId",2],["valueTypes",3],["formulasR1C1",5,13],["hidden",3,13],["rowHidden",1,13,0,2,32],["columnHidden",1,13,0,2,32],["isEntireColumn",3,11],["isEntireRow",3,11],["hyperlink",1,11,0,2,33],["style",1,11,0,2,32],["linkedDataTypeState",3,6],["hasSpill",3,27],["top",3,17],["left",3,17],["height",3,17],["width",3,17],["savedAsArray",3,27],["numberFormatCategories",3,27],["valuesAsJson",5,24],["valuesAsJsonLocal",5,24],["addressR1C1",2,3]],[["format","RangeFormat",35,0,0,4],["worksheet","Worksheet",2,0,0,4],["sort","RangeSort",3,13,0,4],["conditionalFormats","ConditionalFormatCollection",19,9,0,4],["dataValidation","DataValidation",35,5,0,4]],[["clear",1,0,0,2,0,32],["delete",1,0,0,2,0,34],["select",0,2],["_KeepReference",0,2],["merge",1,0,13,2,0,32],["unmerge",0,0,13],["_ValidateArraySize",2,2,14,4],["calculate",0,0,9],["showCard",0,0,11],["getImage",0,2,11,4],["replaceAll",3,0,6,2,0,32],["copyFrom",4,0,6,2,0,26],["convertToLinkedDataType",2,0,6],["convertDataTypeToText",0,0,6],["setDirty",0,0,6],["getCellProperties",1,0,6],["getRowProperties",1,0,6],["getColumnProperties",1,0,6],["setCellProperties",1,0,6],["setRowProperties",1,0,6],["setColumnProperties",1,0,6],["autoFill",2,0,6],["showTeachingCallout",2,0,6],["flashFill",0,0,6],["group",1,0,17],["ungroup",1,0,17],["showGroupDetails",1,0,17],["hideGroupDetails",1,0,17],["moveTo",1,0,7,2,0,26],["getDataClassificationIds",0,2,19,4]],[["getCell","Range",2,10,0,4],["getUsedRange","Range",1,10,0,4],["insert","Range",1,8,0,2,0,0,34],["getEntireColumn","Range",0,10,0,4],["getEntireRow","Range",0,10,0,4],["getOffsetRange","Range",2,10,0,4],["getRow","Range",1,10,0,4],["getColumn","Range",1,10,0,4],["getIntersection","Range",1,10,0,4],["getBoundingRect","Range",1,10,0,4],["getLastCell","Range",0,10,0,4],["getLastColumn","Range",0,10,0,4],["getLastRow","Range",0,10,0,4],["getIntersectionOrNullObject","Range",1,10,15,4],["getRowsAbove","Range",1,11,14,4],["getRowsBelow","Range",1,11,14,4],["getColumnsBefore","Range",1,11,14,4],["getColumnsAfter","Range",1,11,14,4],["getResizedRange","Range",2,11,14,4],["getVisibleView","RangeView",0,2,14,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getSurroundingRegion","Range",0,10,11,4],["getAbsoluteResizedRange","Range",2,10,11,4],["getTables","TableScopedCollection",1,6,6,4],["find","Range",2,10,6,4],["findOrNullObject","Range",2,10,6,4],["removeDuplicates","RemoveDuplicatesResult",2,8,6,2,0,0,33],["getSpecialCells","RangeAreas",2,10,6,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,6,4],["getSpillingToRange","Range",0,10,27,4],["getSpillParent","Range",0,10,27,4],["getSpillingToRangeOrNullObject","Range",0,10,27,4],["getSpillParentOrNullObject","Range",0,10,27,4],["getMergedAreas","RangeAreas",0,10,19,4],["getPivotTables","PivotTableScopedCollection",1,6,27,4],["getPrecedents","WorkbookRangeAreas",0,10,18,4],["getDirectPrecedents","WorkbookRangeAreas",0,10,27,4],["getDependents","WorkbookRangeAreas",0,10,35,4],["getDirectDependents","WorkbookRangeAreas",0,10,23,4],["getExtendedRange","Range",2,10,23,4],["getRangeEdge","Range",2,10,23,4],["getNumberFormatProperties","NumberFormatPropertyCollection",0,6,8,4],["getSurroundingDataRegion","Range",0,2,8,4],["getMergedAreasOrNullObject","RangeAreas",0,0,23,2,0,0,31]]],["RangeAreas",2,[["_ReferenceId",2],["address",3],["addressLocal",3],["areaCount",3],["cellCount",3],["isEntireColumn",3],["isEntireRow",3],["style",1],["addressR1C1",2,3]],[["areas","RangeCollection",19,0,0,4],["conditionalFormats","ConditionalFormatCollection",19,0,0,4],["format","RangeFormat",35,0,0,4],["dataValidation","DataValidation",35,0,0,4],["worksheet","Worksheet",2,0,0,4]],[["_KeepReference",0,2],["calculate"],["clear",1],["setDirty"],["copyFrom",4],["convertToLinkedDataType",2],["convertDataTypeToText"],["select",0,2,8]],[["getEntireColumn","RangeAreas",0,10,0,4],["getEntireRow","RangeAreas",0,10,0,4],["getIntersection","RangeAreas",1,10,0,4],["getIntersectionOrNullObject","RangeAreas",1,10,0,4],["getOffsetRangeAreas","RangeAreas",2,10,0,4],["getUsedRangeAreas","RangeAreas",1,10,0,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,10,0,4],["getTables","TableScopedCollection",1,6,0,4],["getSpecialCells","RangeAreas",2,10,0,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,0,4]]],["WorkbookRangeAreas",2,[["_ReferenceId",2],["addresses",3]],[["ranges","RangeCollection",19,0,0,4],["areas","RangeAreasCollection",19,0,0,4]],[["_KeepReference",0,2]],[["getRangeAreasBySheet","RangeAreas",1,10,0,4],["getRangeAreasOrNullObjectBySheet","RangeAreas",1,10,0,4]]],["RangeView",0,[["numberFormat",1],["values",1],["text",3],["formulas",1],["formulasLocal",1],["formulasR1C1",1],["valueTypes",3],["rowCount",3],["columnCount",3],["cellAddresses",3],["index",3],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["rows","RangeViewCollection",19,0,0,4]],0,[["getRange","Range",0,10,0,4]]],["RangeViewCollection",1,0,0,[["getCount",0,2,15,4]],[["getItemAt","RangeView",1,2,0,4]],0,"RangeView"],["SettingCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Setting",1,18,0,4],["add","Setting",2,9],["getItemOrNullObject","Setting",1,2,0,4]],0,"Setting",[["SettingsChanged",3,0,"_CC.office10EventIdSettingsChangedEvent","","",""]]],["Setting",8,[["key",3],["value",5],["_Id",2]],0,[["delete"]]],["NamedItemCollection",5,0,0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","NamedItem",1,18,0,4],["getItemOrNullObject","NamedItem",1,2,15,4],["add","NamedItem",3,8,15],["addFormulaLocal","NamedItem",3,0,15]],0,"NamedItem",[["Added",0,3,"MessageType.namedItemAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.namedItemDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["NamedItem",0,[["name",3],["type",3],["value",3],["visible",1],["_Id",2],["comment",1,15],["scope",3,15],["formula",1,11],["valueAsJson",3,24],["valueAsJsonLocal",3,24]],[["worksheet","Worksheet",2,15,0,4],["worksheetOrNullObject","Worksheet",2,15,0,4],["arrayValues","NamedItemArrayValues",3,11,0,4]],[["delete",0,0,15]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,15,4]]],["NamedItemArrayValues",0,[["values",3],["types",3],["valuesAsJson",3,24],["valuesAsJsonLocal",3,24]]],["Binding",0,[["id",3],["type",3]],0,[["getText",0,2,0,4],["delete",0,0,14]],[["getTable","Table",0,2,0,4],["getRange","Range",0,2,0,4]],0,0,[["DataChanged",3,14,"_CC.office10EventIdBindingDataChangedEvent","this.id","",""],["SelectionChanged",3,14,"_CC.office10EventIdBindingSelectionChangedEvent","this.id","",""]]],["BindingCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","Binding",1,18,0,4],["getItemAt","Binding",1,2,0,4],["add","Binding",3,8,14],["addFromNamedItem","Binding",3,0,14],["addFromSelection","Binding",2,0,14],["getItemOrNullObject","Binding",1,2,15,4]],0,"Binding"],["TableCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["_RegisterAddedEvent",0,0,6,2,0,1],["_UnregisterAddedEvent",0,0,6,2,0,1],["_RegisterDeletedEvent",0,0,6,2,0,1],["_UnregisterDeletedEvent",0,0,6,2,0,1],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1]],[["getItem","Table",1,18,0,4],["getItemAt","Table",1,2,0,4],["add","Table",2,8,0,2,0,0,33],["getItemOrNullObject","Table",1,2,15,4],["addQueryTable","Table",2,0,8]],0,"Table",[["Added",0,6,"MessageType.tableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",2,11,"MessageType.tableDataChangedEvent","this._eventTargetId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Deleted",0,6,"MessageType.tableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this._eventTargetId","_RegisterFilteredEvent","_UnregisterFilteredEvent"]]],["TableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getFirst","Table",0,10,0,4],["getItem","Table",1,18,0,4],["getItemOrNullObject","Table",1,2,18,4]],0,"Table"],["Table",24,[["id",3],["name",1,0,0,2,26],["showHeaders",1,0,0,2,33],["showTotals",1,0,0,2,33],["style",1,0,0,2,33],["highlightFirstColumn",1,14,0,2,33],["highlightLastColumn",1,14,0,2,33],["showBandedRows",1,14,0,2,33],["showBandedColumns",1,14,0,2,33],["showFilterButton",1,14,0,2,33],["legacyId",3,5]],[["columns","TableColumnCollection",19,0,0,4],["rows","TableRowCollection",19,0,0,4],["sort","TableSort",3,13,0,4],["worksheet","Worksheet",2,13,0,4],["autoFilter","AutoFilter",3,6,0,4],["tableStyle","TableStyle",35,8,0,4]],[["delete",0,0,0,2,0,26],["clearFilters",0,0,13],["reapplyFilters",0,0,13,2,0,26],["_RegisterSelectionChangedEvent",0,0,11,2,0,1],["_UnregisterSelectionChangedEvent",0,0,11,2,0,1],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["clearStyle",0,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["resize",1,0,23,2,0,26],["setStyle",1,0,8]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4],["convertToRange","Range",0,8,13,2,0,0,26]],"workbook.tables",0,[["Changed",2,11,"MessageType.tableDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["SelectionChanged",2,11,"MessageType.tableSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["TableColumnCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","TableColumn",1,18,0,4],["getItemAt","TableColumn",1,2,0,4],["add","TableColumn",3,8,0,2,0,0,34],["getItemOrNullObject","TableColumn",1,2,15,4],["addAsJson","TableColumn",3,0,24]],0,"TableColumn"],["TableColumn",0,[["id",3],["index",3],["values",1],["name",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["filter","Filter",3,13,0,4]],[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4]]],["TableRowCollection",1,[["count",3]],0,[["getCount",0,2,15,4],["deleteRows",1,0,19],["deleteRowsAt",2,0,19,2,0,26]],[["getItemAt","TableRow",1,2,0,4],["add","TableRow",3,8,0,2,0,0,34],["addAsJson","TableRow",3,0,24]],0,"TableRow"],["TableRow",0,[["index",3],["values",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],0,[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4]]],["DataValidation",0,[["type",3],["rule",1],["prompt",1],["errorAlert",1],["ignoreBlanks",1],["valid",3]],0,[["clear"]],[["getInvalidCells","RangeAreas",0,10,6,4],["getInvalidCellsOrNullObject","RangeAreas",0,10,6,4]]],["RemoveDuplicatesResult",0,[["removed",3],["uniqueRemaining",3]]],["RangeFormat",0,[["wrapText",1,0,0,2,32],["horizontalAlignment",1,0,0,2,32],["verticalAlignment",1,0,0,2,32],["columnWidth",1,13,0,2,32],["rowHeight",1,13,0,2,32],["textOrientation",1,11,0,2,32],["useStandardHeight",1,11],["useStandardWidth",1,11],["readingOrder",1,6],["shrinkToFit",1,6],["indentLevel",1,6,0,2,32],["autoIndent",1,6]],[["fill","RangeFill",35,0,0,4],["font","RangeFont",35,0,0,4],["borders","RangeBorderCollection",51,0,0,4],["protection","FormatProtection",35,13,0,4]],[["autofitColumns",0,0,13,2,0,32],["autofitRows",0,0,13,2,0,32],["adjustIndent",1,0,7,2,0,34]]],["FormatProtection",0,[["locked",1],["formulaHidden",1]]],["RangeFill",0,[["color",1,0,0,2,32],["tintAndShade",1,6],["patternTintAndShade",1,6],["pattern",1,6],["patternColor",1,6]],0,[["clear",0,0,0,2,0,32]]],["RangeBorder",0,[["sideIndex",3],["style",1,0,0,2,32],["weight",1,0,0,2,32],["color",1,0,0,2,32],["tintAndShade",1,6]]],["RangeBorderCollection",1,[["count",3],["tintAndShade",1,6]],0,0,[["getItem","RangeBorder",1,18,0,4],["getItemAt","RangeBorder",1,2,0,4]],0,"RangeBorder"],["RangeFont",0,[["name",1,0,0,2,32],["size",1,0,0,2,32],["color",1,0,0,2,12],["italic",1,0,0,2,32],["bold",1,0,0,2,32],["underline",1,0,0,2,32],["strikethrough",1,6,0,2,32],["subscript",1,6],["superscript",1,6],["tintAndShade",1,6]]],["ChartCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,5,2,0,1],["_UnregisterAddedEvent",0,0,5,2,0,1],["_RegisterActivatedEvent",0,0,5,2,0,29],["_UnregisterActivatedEvent",0,0,5,2,0,29],["_RegisterDeactivatedEvent",0,0,5,2,0,29],["_UnregisterDeactivatedEvent",0,0,5,2,0,29],["_RegisterDeletedEvent",0,0,5,2,0,29],["_UnregisterDeletedEvent",0,0,5,2,0,29]],[["add","Chart",3,9,0,2,0,0,36],["getItemAt","Chart",1,2,0,4],["_GetItem","Chart",1,18,0,4],["getItem","Chart",1,2,0,4],["getItemOrNullObject","Chart",1,2,15,4]],0,"Chart",[["Activated",0,5,"MessageType.chartActivatedEvent","this._ParentObject.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,5,"MessageType.chartAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this._ParentObject.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,5,"MessageType.chartDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Chart",0,[["name",1,0,0,2,37],["top",1,0,0,2,36],["left",1,0,0,2,36],["width",1,0,0,2,36],["height",1,0,0,2,36],["id",3,11],["showAllFieldButtons",1,11,0,2,36],["chartType",1,11,0,2,37],["showDataLabelsOverMaximum",1,5,0,2,37],["categoryLabelLevel",1,5,0,2,37],["style",1,5,0,2,37],["displayBlanksAs",1,5,0,2,37],["plotBy",1,5,0,2,37],["plotVisibleOnly",1,5,0,2,37],["seriesNameLevel",1,5,0,2,37]],[["title","ChartTitle",35,0,0,4],["dataLabels","ChartDataLabels",35,0,0,4],["legend","ChartLegend",35,0,0,4],["series","ChartSeriesCollection",19,0,0,4],["axes","ChartAxes",35,0,0,4],["format","ChartAreaFormat",35,0,0,4],["worksheet","Worksheet",2,13,0,4],["plotArea","ChartPlotArea",35,5,0,4],["pivotOptions","ChartPivotOptions",35,6,0,4]],[["setData",2,1,0,2,0,36],["delete",0,0,0,2,0,36],["setPosition",2,0,0,2,0,36],["getImage",3,2,13,4],["_RegisterActivatedEvent",0,0,5,2,0,1],["_UnregisterActivatedEvent",0,0,5,2,0,1],["_RegisterDeactivatedEvent",0,0,5,2,0,1],["_UnregisterDeactivatedEvent",0,0,5,2,0,1],["activate",0,2,6],["getDataRange",0,0,28],["getDataRangeOrNullObject",0,0,28]],[["getDataTable","ChartDataTable",0,2,18,4],["getDataTableOrNullObject","ChartDataTable",0,2,18,4]],0,0,[["Activated",0,5,"MessageType.chartActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["ChartPivotOptions",0,[["showAxisFieldButtons",1,0,0,2,37],["showLegendFieldButtons",1,0,0,2,37],["showReportFilterFieldButtons",1,0,0,2,37],["showValueFieldButtons",1,0,0,2,37]]],["ChartAreaFormat",0,[["roundedCorners",1,6,0,2,37],["colorScheme",1,6,0,2,37]],[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartSeriesCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartSeries",1,2,0,4],["add","ChartSeries",2,8,11,2,0,0,36]],0,"ChartSeries"],["ChartSeries",0,[["name",1,0,0,2,36],["chartType",1,11,0,2,10],["hasDataLabels",1,11,0,2,37],["filtered",1,11,0,2,37],["markerSize",1,11,0,2,36],["markerStyle",1,11,0,2,36],["showShadow",1,11,0,2,37],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36],["smooth",1,11,0,2,37],["plotOrder",1,11,0,2,37],["gapWidth",1,11,0,2,36],["doughnutHoleSize",1,11,0,2,36],["axisGroup",1,5,0,2,36],["explosion",1,5,0,2,37],["firstSliceAngle",1,5,0,2,37],["invertIfNegative",1,5,0,2,37],["bubbleScale",1,6,0,2,37],["secondPlotSize",1,5,0,2,37],["splitType",1,5,0,2,37],["splitValue",1,6,0,2,37],["varyByCategories",1,5,0,2,37],["showLeaderLines",1,6,0,2,37],["overlap",1,5,0,2,36],["gradientStyle",1,6,0,2,37],["gradientMinimumType",1,6,0,2,37],["gradientMidpointType",1,6,0,2,37],["gradientMaximumType",1,6,0,2,37],["gradientMinimumValue",1,6,0,2,37],["gradientMidpointValue",1,6,0,2,37],["gradientMaximumValue",1,6,0,2,37],["gradientMinimumColor",1,6,0,2,37],["gradientMidpointColor",1,6,0,2,37],["gradientMaximumColor",1,6,0,2,37],["parentLabelStrategy",1,6,0,2,37],["showConnectorLines",1,6,0,2,37],["invertColor",1,6,0,2,37]],[["points","ChartPointsCollection",19,0,0,4],["format","ChartSeriesFormat",35,0,0,4],["trendlines","ChartTrendlineCollection",19,11,0,4],["xErrorBars","ChartErrorBars",35,6,0,4],["yErrorBars","ChartErrorBars",35,6,0,4],["dataLabels","ChartDataLabels",35,5,0,4],["binOptions","ChartBinOptions",35,6,0,4],["mapOptions","ChartMapOptions",35,6,0,4],["boxwhiskerOptions","ChartBoxwhiskerOptions",35,6,0,4]],[["delete",0,0,11,2,0,36],["setXAxisValues",1,0,11,2,0,36],["setValues",1,0,11,2,0,36],["setBubbleSizes",1,0,11,2,0,37],["getDimensionValues",1,0,27,2,0,37],["getDimensionDataSourceString",1,0,35],["getDimensionDataSourceType",1,0,35]]],["ChartSeriesFormat",0,0,[["fill","ChartFill",3,0,0,4],["line","ChartLineFormat",35,0,0,4]]],["ChartPointsCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartPoint",1,2,0,4]],0,"ChartPoint"],["ChartPoint",0,[["value",3],["hasDataLabel",1,11,0,2,37],["markerStyle",1,11,0,2,36],["markerSize",1,11,0,2,36],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36]],[["format","ChartPointFormat",35,0,0,4],["dataLabel","ChartDataLabel",35,11,0,4]]],["ChartPointFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartAxes",0,0,[["categoryAxis","ChartAxis",35,0,0,4],["seriesAxis","ChartAxis",35,0,0,4],["valueAxis","ChartAxis",35,0,0,4]],0,[["getItem","ChartAxis",2,2,11,4]]],["ChartAxis",0,[["majorUnit",1,0,0,2,37],["maximum",1,0,0,2,36],["minimum",1,0,0,2,36],["minorUnit",1,0,0,2,37],["displayUnit",1,11,0,2,36],["showDisplayUnitLabel",1,11,0,2,37],["customDisplayUnit",3,11],["type",3,11],["minorTimeUnitScale",1,11,0,2,37],["majorTimeUnitScale",1,11,0,2,37],["baseTimeUnit",1,11,0,2,37],["categoryType",1,11,0,2,37],["axisGroup",3,11],["scaleType",1,11,0,2,37],["logBase",1,11,0,2,37],["left",3,11],["top",3,11],["height",3,11],["width",3,11],["reversePlotOrder",1,11,0,2,36],["crosses",1,11,0,2,36],["crossesAt",3,11],["visible",1,11,0,2,37],["isBetweenCategories",1,5,0,2,36],["majorTickMark",1,11,0,2,37],["minorTickMark",1,11,0,2,37],["tickMarkSpacing",1,11,0,2,37],["tickLabelPosition",1,11,0,2,36],["tickLabelSpacing",1,11,0,2,37],["alignment",1,5,0,2,37],["multiLevel",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["offset",1,5,0,2,37],["textOrientation",1,5,0,2,37],["position",1,5,0,2,36],["positionAt",3,5]],[["majorGridlines","ChartGridlines",35,0,0,4],["minorGridlines","ChartGridlines",35,0,0,4],["title","ChartAxisTitle",35,0,0,4],["format","ChartAxisFormat",35,0,0,4]],[["setCategoryNames",1,0,11,2,0,37],["setCustomDisplayUnit",1,0,11,2,0,37],["setCrossesAt",1,0,11,2,0,37],["setPositionAt",1,0,5,2,0,37]]],["ChartAxisFormat",0,0,[["font","ChartFont",35,0,0,4],["line","ChartLineFormat",35,0,0,4],["fill","ChartFill",3,5,0,4]]],["ChartAxisTitle",0,[["text",1,0,0,2,36],["visible",1,0,0,2,37],["textOrientation",1,27,0,2,37]],[["format","ChartAxisTitleFormat",35,0,0,4]],[["setFormula",1,0,5,2,0,37]]],["ChartAxisTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,5,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataLabels",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["textOrientation",1,5,0,2,37],["autoText",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["showAsDataCallout",3,8,0,2,37],["geometricShapeType",1,8,0,2,37]],[["format","ChartDataLabelFormat",35,0,0,4]]],["ChartDataLabel",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["top",1,5,0,2,37],["left",1,5,0,2,37],["width",3,5],["height",3,5],["formula",1,5,0,2,37],["textOrientation",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["text",1,5,0,2,37],["autoText",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["geometricShapeType",1,8,0,2,37],["showAsDataCallout",3,8,0,2,37]],[["format","ChartDataLabelFormat",35,5,0,4]],0,[["getSubstring","ChartFormatString",2,2,8,4]]],["ChartDataLabelFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataTable",0,[["visible",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showHorizontalBorder",1,0,0,2,37],["showVerticalBorder",1,0,0,2,37],["showOutlineBorder",1,0,0,2,37]],[["format","ChartDataTableFormat",35,0,0,4]]],["ChartDataTableFormat",0,0,[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,0,0,4]]],["ChartErrorBars",0,[["endStyleCap",1,0,0,2,37],["include",1,0,0,2,37],["type",1,0,0,2,37],["visible",1,0,0,2,37]],[["format","ChartErrorBarsFormat",35,0,0,4]]],["ChartErrorBarsFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartGridlines",0,[["visible",1,0,0,2,36]],[["format","ChartGridlinesFormat",35,0,0,4]]],["ChartGridlinesFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartLegend",0,[["visible",1,0,0,2,36],["position",1,0,0,2,36],["overlay",1,0,0,2,37],["left",1,11,0,2,37],["top",1,11,0,2,37],["width",1,11,0,2,37],["height",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartLegendFormat",35,0,0,4],["legendEntries","ChartLegendEntryCollection",19,11,0,4]]],["ChartLegendEntry",0,[["visible",1,0,0,2,37],["left",3,5],["top",3,5],["width",3,5],["height",3,5],["index",3,5]]],["ChartLegendEntryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","ChartLegendEntry",1,2,0,4]],0,"ChartLegendEntry"],["ChartLegendFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartMapOptions",0,[["level",1,0,0,2,37],["labelStrategy",1,0,0,2,37],["projectionType",1,0,0,2,37]]],["ChartTitle",0,[["visible",1,0,0,2,37],["text",1,0,0,2,36],["overlay",1,0,0,2,37],["horizontalAlignment",1,11,0,2,37],["top",1,11,0,2,37],["left",1,11,0,2,37],["width",3,11],["height",3,11],["verticalAlignment",1,11,0,2,37],["textOrientation",1,11,0,2,37],["position",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartTitleFormat",35,0,0,4]],[["setFormula",1,0,11,2,0,37]],[["getSubstring","ChartFormatString",2,2,11,4]]],["ChartFormatString",0,0,[["font","ChartFont",35,0,0,4]]],["ChartTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartFill",4,0,0,[["setSolidColor",1,0,0,2,0,36],["clear",0,0,0,2,0,37],["getSolidColor",0,0,24,2,0,37]]],["ChartBorder",0,[["color",1,0,0,2,36],["lineStyle",1,0,0,2,36],["weight",1,0,0,2,36]],0,[["clear",0,0,5,2,0,37]]],["ChartBinOptions",0,[["type",1,0,0,2,36],["width",1,0,0,2,36],["count",1,0,0,2,36],["allowOverflow",1,0,0,2,37],["allowUnderflow",1,0,0,2,37],["overflowValue",1,0,0,2,36],["underflowValue",1,0,0,2,36]]],["ChartBoxwhiskerOptions",0,[["showInnerPoints",1,0,0,2,37],["showOutlierPoints",1,0,0,2,37],["showMeanMarker",1,0,0,2,37],["showMeanLine",1,0,0,2,37],["quartileCalculation",1,0,0,2,37]]],["ChartLineFormat",0,[["color",1,0,0,2,36],["lineStyle",1,11,0,2,36],["weight",1,11,0,2,36]],0,[["clear",0,0,0,2,0,37]]],["ChartFont",0,[["bold",1,0,0,2,37],["color",1,0,0,2,36],["italic",1,0,0,2,37],["name",1,0,0,2,37],["size",1,0,0,2,37],["underline",1,0,0,2,37]]],["ChartTrendline",0,[["type",1,0,0,2,37],["polynomialOrder",1,0,0,2,37],["movingAveragePeriod",1,0,0,2,37],["_Id",2],["showEquation",1,5,0,2,37],["showRSquared",1,5,0,2,37],["forwardPeriod",1,5,0,2,37],["backwardPeriod",1,5,0,2,37],["name",1,0,0,2,37],["intercept",1,0,0,2,37]],[["format","ChartTrendlineFormat",35,0,0,4],["label","ChartTrendlineLabel",35,5,0,4]],[["delete",0,0,0,2,0,37]]],["ChartTrendlineCollection",1,0,0,[["getCount",0,2,0,4]],[["add","ChartTrendline",1,8,0,2,0,0,36],["getItem","ChartTrendline",1,18,0,4]],0,"ChartTrendline"],["ChartTrendlineFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartTrendlineLabel",0,[["top",1,0,0,2,37],["left",1,0,0,2,37],["width",3],["height",3],["formula",1,0,0,2,37],["textOrientation",1,0,0,2,37],["horizontalAlignment",1,0,0,2,37],["verticalAlignment",1,0,0,2,37],["text",1,0,0,2,37],["autoText",1,0,0,2,37],["numberFormat",1,0,0,2,37],["linkNumberFormat",1,6,0,2,37]],[["format","ChartTrendlineLabelFormat",35,0,0,4]]],["ChartTrendlineLabelFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,0,0,4],["font","ChartFont",35,0,0,4]]],["ChartPlotArea",0,[["left",1,0,0,2,37],["top",1,0,0,2,37],["width",1,0,0,2,37],["height",1,0,0,2,37],["insideLeft",1,0,0,2,37],["insideTop",1,0,0,2,37],["insideWidth",1,0,0,2,37],["insideHeight",1,0,0,2,37],["position",1,0,0,2,37]],[["format","ChartPlotAreaFormat",35,0,0,4]]],["ChartPlotAreaFormat",0,0,[["border","ChartBorder",35,0,0,4],["fill","ChartFill",3,0,0,4]]],["VisualCollection",5,0,0,[["getDefinitions",0,2,0,4],["getPreview",4,2,0,4],["bootstrapAgaveVisual",0,0,0,2],["getCount",0,2,0,4],["_RegisterSelectionChangedEvent",0,2],["_UnregisterSelectionChangedEvent",0,2]],[["add","Visual",3,8,0,2],["_GetItem","Visual",1,18,0,4],["getSelectedOrNullObject","Visual",0,2,0,4]],0,"Visual",[["AgaveVisualUpdate",2,0,"MessageType.agaveVisualUpdateEvent","","null","null"],["SelectionChanged",0,0,"MessageType.visualSelectionChangedEvent","this._ParentObject.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["Visual",0,[["id",3],["isSupportedInVisualTaskpane",3]],[["properties","VisualPropertyCollection",18,0,0,4]],[["delete",0,0,0,2],["getProperty",1,2,0,4],["setProperty",2,0,0,2],["changeDataSource",2,0,0,2],["getDataSource",0,2,0,4],["setPropertyToDefault",1,0,0,2],["_RegisterChangeEvent",0,2],["_UnregisterChangeEvent",0,2],["serializeProperties",0,2,0,4],["deserializeProperties",1,0,0,2],["addChildProperty",2,0,19,2],["removeChildProperty",2,0,19,2],["getDataFieldAssignments",0,0,3],["getDataConfig",0,2,3,4],["modifyDataConfig",1,0,3,2]],[["getChildProperties","VisualPropertyCollection",2,6,0,4],["getDataControllerClient","DataControllerClient",0,2,0,4],["getElementChildProperties","VisualPropertyCollection",3,6,0,4]],0,0,[["ChangeNotification",2,0,"MessageType.visualChangeEvent","this.id","_RegisterChangeEvent","_UnregisterChangeEvent"]]],["VisualProperty",0,[["type",3],["value",3],["id",3],["localizedName",3],["options",3],["localizedOptions",3],["hasDefault",3],["isDefault",3],["min",3],["max",3],["stepSize",3],["hideMeButShowChildrenUI",3],["expandableUI",3],["nextPropOnSameLine",3],["showResetUI",3],["size",3,19],["minSize",3,19],["maxSize",3,19],["index",3,19],["parentName",3,19]],0,[["getBoolMetaProperty",1,2,0,4]]],["VisualPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","VisualProperty",1,18,0,4],["getItemAt","VisualProperty",1,2,0,4]],0,"VisualProperty"],["DataControllerClient",0,0,0,[["getWells",0,2,0,4],["getAssociatedFields",1,2,0,4],["getAvailableFields",1,2,0,4],["addField",3,0,0,2],["removeField",2,0,0,2],["moveField",3,0,0,2]]],["RangeSort",0,0,0,[["apply",5,0,0,2,0,32]]],["TableSort",0,[["matchCase",3],["method",3],["fields",3]],0,[["apply",3,0,0,2,0,26],["clear"],["reapply"]]],["Filter",0,[["criteria",3]],0,[["apply",1],["clear",0,0,0,2,0,34],["applyBottomItemsFilter",1,0,0,2,0,34],["applyBottomPercentFilter",1,0,0,2,0,34],["applyCellColorFilter",1,0,0,2,0,34],["applyDynamicFilter",1,0,0,2,0,34],["applyFontColorFilter",1,0,0,2,0,34],["applyValuesFilter",1,0,0,2,0,34],["applyTopItemsFilter",1,0,0,2,0,34],["applyTopPercentFilter",1,0,0,2,0,34],["applyIconFilter",1,0,0,2,0,34],["applyCustomFilter",3,0,0,2,0,34]]],["AutoFilter",0,[["enabled",3],["isDataFiltered",3],["criteria",3]],0,[["apply",3,0,0,2,0,33],["reapply",0,0,0,2,0,26],["remove",0,0,0,2,0,26],["clearCriteria",0,0,0,2,0,26],["clearColumnCriteria",1,0,18]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4]]],["CultureInfo",0,[["name",3]],[["numberFormat","NumberFormatInfo",3,0,0,4],["datetimeFormat","DatetimeFormatInfo",3,27,0,4]]],["NumberFormatInfo",0,[["numberDecimalSeparator",3],["numberGroupSeparator",3],["currencySymbol",3,30]]],["DatetimeFormatInfo",0,[["dateSeparator",3],["longDatePattern",3],["shortDatePattern",3],["timeSeparator",3],["longTimePattern",3]]],["CustomXmlPartScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4],["getOnlyItem","CustomXmlPart",0,2,0,4],["getOnlyItemOrNullObject","CustomXmlPart",0,2,0,4]],0,"CustomXmlPart"],["CustomXmlPartCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["add","CustomXmlPart",1,8],["getByNamespace","CustomXmlPartScopedCollection",1,6,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4]],0,"CustomXmlPart"],["CustomXmlPart",0,[["id",3],["namespaceUri",3]],0,[["delete"],["getXml",0,2,0,4],["setXml",1]]],["_V1Api",0,0,0,[["bindingGetData",1,2,0,4],["getSelectedData",1,2,0,4],["gotoById",1,2,0,4],["bindingAddFromSelection",1,2],["bindingGetById",1,2,0,4],["bindingReleaseById",1,2],["bindingGetAll",0,2,0,4],["bindingAddFromNamedItem",1,2],["bindingAddFromPrompt",1,2],["bindingDeleteAllDataValues",1],["setSelectedData",1],["bindingClearFormats",1],["bindingSetData",1],["bindingSetFormats",1],["bindingSetTableOptions",1],["bindingAddRows",1],["bindingAddColumns",1],["getFilePropertiesAsync",0,2,9,4]]],["PivotTableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotTable",1,18,0,4],["getFirst","PivotTable",0,10,0,4],["getItemOrNullObject","PivotTable",1,2,0,4],["getFirstOrNullObject","PivotTable",0,2,35,4]],0,"PivotTable"],["PivotTableCollection",5,0,0,[["refreshAll",0,0,0,2,0,12],["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","PivotTable",1,18,0,4],["getItemOrNullObject","PivotTable",1,2,15,4],["add","PivotTable",3,8,5,2,0,0,12]],0,"PivotTable",[["Added",0,3,"MessageType.pivotTableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.pivotTableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["PivotTable",0,[["name",1,0,0,2,12],["id",3,16],["useCustomSortLists",1,6,0,2,12],["enableDataValueEditing",1,6,0,2,12],["refreshOnOpen",0,23,0,2,29],["allowMultipleFiltersPerField",0,27,0,2,12]],[["worksheet","Worksheet",2,0,0,4],["hierarchies","PivotHierarchyCollection",19,5,0,4],["rowHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["columnHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["dataHierarchies","DataPivotHierarchyCollection",19,5,0,4],["filterHierarchies","FilterPivotHierarchyCollection",19,5,0,4],["layout","PivotLayout",2,5,0,4]],[["refresh",0,0,0,2,0,12],["delete",0,0,5,2,0,12],["getDataSourceString",0,2,35,4],["getDataSourceType",0,2,35,4]],[["addDateGroup","PivotHierarchy",2,0,8,2,0,0,38]]],["PivotLayout",0,[["showColumnGrandTotals",1,0,0,2,12],["showRowGrandTotals",1,0,0,2,12],["enableFieldList",1,17,0,2,12],["subtotalLocation",1,0,0,2,12],["layoutType",1,0,0,2,12],["autoFormat",1,6,0,2,12],["preserveFormatting",1,6,0,2,12],["altTextDescription",0,23,0,2,29],["altTextTitle",0,23,0,2,29],["emptyCellText",0,23,0,2,29],["fillEmptyCells",0,23,0,2,29],["showFieldHeaders",0,23,0,2,29],["tabularValues",3,8],["tabularText",3,8],["tabularNumberFormat",3,8],["tabularNumberFormatLocal",3,8]],[["pivotStyle","PivotTableStyle",35,8,0,4]],[["setAutoSortOnCell",2,0,6,2,0,12],["setStyle",1,0,8,2,0,12],["displayBlankLineAfterEachItem",1,0,23,2,0,29],["repeatAllItemLabels",1,0,23,2,0,29]],[["getRange","Range",0,3],["getRowLabelRange","Range",0,3],["getColumnLabelRange","Range",0,3],["getFilterAxisRange","Range",0,3],["getDataBodyRange","Range",0,3],["getCell","Range",3,2,8],["getPivotItems","PivotItemCollection",2,4,6],["getDataHierarchy","DataPivotHierarchy",1,3,6]]],["PivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotHierarchy",1,18,0,4],["getItemOrNullObject","PivotHierarchy",1,2,0,4]],0,"PivotHierarchy"],["PivotHierarchy",0,[["id",3],["name",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]]],["RowColumnPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","RowColumnPivotHierarchy",1,18,0,4],["getItemOrNullObject","RowColumnPivotHierarchy",1,2,0,4],["add","RowColumnPivotHierarchy",1,8,0,2,0,0,12]],0,"RowColumnPivotHierarchy"],["RowColumnPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["FilterPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","FilterPivotHierarchy",1,18,0,4],["getItemOrNullObject","FilterPivotHierarchy",1,2,0,4],["add","FilterPivotHierarchy",1,8,0,2,0,0,12]],0,"FilterPivotHierarchy"],["FilterPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["enableMultipleFilterItems",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["DataPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","DataPivotHierarchy",1,18,0,4],["getItemOrNullObject","DataPivotHierarchy",1,2,0,4],["add","DataPivotHierarchy",1,8,0,2,0,0,12]],0,"DataPivotHierarchy"],["DataPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["numberFormat",1,0,0,2,12],["summarizeBy",1,0,0,2,12],["showAs",1,0,0,2,12]],[["field","PivotField",35,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["PivotFieldCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotField",1,18,0,4],["getItemOrNullObject","PivotField",1,2,0,4]],0,"PivotField"],["PivotField",0,[["id",3],["name",1,0,0,2,12],["subtotals",1,0,0,2,12],["showAllItems",1,0,0,2,12]],[["items","PivotItemCollection",19,0,0,4]],[["sortByLabels",1,1,0,2,0,12],["sortByValues",3,0,6,2,0,12],["applyFilter",1,0,27,2,0,12],["clearAllFilters",0,0,27,2,0,12],["clearFilter",1,0,27,2,0,12],["getFilters",0,0,27],["isFiltered",1,0,27]]],["PivotItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotItem",1,18,0,4],["getItemOrNullObject","PivotItem",1,2,0,4]],0,"PivotItem"],["PivotItem",0,[["id",3],["name",1,0,0,2,12],["isExpanded",1,0,0,2,12],["visible",1,0,0,2,12]]],["WorksheetCustomProperty",0,[["key",3],["value",1],["_Id",2]],0,[["delete"]]],["WorksheetCustomPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","WorksheetCustomProperty",1,18,0,4],["getItemOrNullObject","WorksheetCustomProperty",1],["add","WorksheetCustomProperty",2,8]],0,"WorksheetCustomProperty"],["DocumentProperties",0,[["title",1],["subject",1],["author",1],["keywords",1],["comments",1],["lastAuthor",3],["revisionNumber",1],["creationDate",11],["category",1],["manager",1],["company",1]],[["custom","CustomPropertyCollection",19,0,0,4]]],["CustomProperty",0,[["key",3],["value",1],["type",3]],0,[["delete"]]],["CustomPropertyCollection",1,0,0,[["getCount",0,2,0,4],["deleteAll"]],[["getItemOrNullObject","CustomProperty",1,2,0,4],["add","CustomProperty",2,8],["getItem","CustomProperty",1,18,0,4]],0,"CustomProperty"],["ConditionalFormatCollection",1,0,0,[["getCount",0,2,0,4],["clearAll",0,0,0,2,0,39]],[["getItemAt","ConditionalFormat",1,2,0,4],["add","ConditionalFormat",1,8,0,2,0,0,39],["getItem","ConditionalFormat",1,18,0,4],["getItemOrNullObject","ConditionalFormat",1,2,18,4]],0,"ConditionalFormat"],["ConditionalFormat",0,[["stopIfTrue",1],["priority",1],["type",3],["id",3]],[["dataBarOrNullObject","DataBarConditionalFormat",35,0,0,4],["dataBar","DataBarConditionalFormat",35,0,0,4],["customOrNullObject","CustomConditionalFormat",35,0,0,4],["custom","CustomConditionalFormat",35,0,0,4],["iconSet","IconSetConditionalFormat",35,0,0,4],["iconSetOrNullObject","IconSetConditionalFormat",35,0,0,4],["colorScale","ColorScaleConditionalFormat",35,0,0,4],["colorScaleOrNullObject","ColorScaleConditionalFormat",35,0,0,4],["topBottom","TopBottomConditionalFormat",35,0,0,4],["topBottomOrNullObject","TopBottomConditionalFormat",35,0,0,4],["preset","PresetCriteriaConditionalFormat",35,0,0,4],["presetOrNullObject","PresetCriteriaConditionalFormat",35,0,0,4],["textComparison","TextConditionalFormat",35,0,0,4],["textComparisonOrNullObject","TextConditionalFormat",35,0,0,4],["cellValue","CellValueConditionalFormat",35,0,0,4],["cellValueOrNullObject","CellValueConditionalFormat",35,0,0,4]],[["delete",0,0,0,2,0,40],["changeRuleToCellValue",1,0,30],["changeRuleToColorScale",0,0,30],["changeRuleToContainsText",1,0,30],["changeRuleToCustom",1,0,30],["changeRuleToDataBar",0,0,30],["changeRuleToIconSet",0,0,30],["changeRuleToPresetCriteria",1,0,30],["changeRuleToTopBottom",1,0,30],["setRanges",1,0,30]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4],["getRanges","RangeAreas",0,10,6,4]]],["DataBarConditionalFormat",0,[["showDataBarOnly",1,0,0,2,40],["barDirection",1,0,0,2,41],["axisFormat",1,0,0,2,41],["axisColor",1,0,0,2,41],["lowerBoundRule",1,0,0,2,41],["upperBoundRule",1,0,0,2,41]],[["positiveFormat","ConditionalDataBarPositiveFormat",35,0,0,4],["negativeFormat","ConditionalDataBarNegativeFormat",35,0,0,4]]],["ConditionalDataBarPositiveFormat",0,[["fillColor",1,0,0,2,40],["gradientFill",1,0,0,2,40],["borderColor",1,0,0,2,40]]],["ConditionalDataBarNegativeFormat",0,[["fillColor",1,0,0,2,40],["matchPositiveFillColor",1,0,0,2,40],["borderColor",1,0,0,2,40],["matchPositiveBorderColor",1,0,0,2,40]]],["CustomConditionalFormat",0,0,[["rule","ConditionalFormatRule",35,0,0,4],["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalFormatRule",0,[["formula",1,0,0,2,41],["formulaLocal",1],["formulaR1C1",1]]],["IconSetConditionalFormat",0,[["reverseIconOrder",1,0,0,2,41],["showIconOnly",1,0,0,2,41],["style",1,0,0,2,41],["criteria",1,0,0,2,41]]],["ColorScaleConditionalFormat",0,[["threeColorScale",3],["criteria",1,0,0,2,41]]],["TopBottomConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["PresetCriteriaConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["TextConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["CellValueConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalRangeFormat",0,[["numberFormat",1]],[["fill","ConditionalRangeFill",35,0,0,4],["font","ConditionalRangeFont",35,0,0,4],["borders","ConditionalRangeBorderCollection",51,0,0,4]],[["clearFormat",0,0,30]]],["ConditionalRangeFont",0,[["color",1,0,0,2,42],["italic",1,0,0,2,42],["bold",1,0,0,2,42],["underline",1,0,0,2,42],["strikethrough",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeFill",0,[["color",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeBorder",0,[["sideIndex",3],["style",1,0,0,2,42],["color",1,0,0,2,42]]],["ConditionalRangeBorderCollection",1,[["count",3]],[["top","ConditionalRangeBorder",35,0,0,4],["bottom","ConditionalRangeBorder",35,0,0,4],["left","ConditionalRangeBorder",35,0,0,4],["right","ConditionalRangeBorder",35,0,0,4]],0,[["getItem","ConditionalRangeBorder",1,18,0,4],["getItemAt","ConditionalRangeBorder",1,2,0,4]],0,"ConditionalRangeBorder"],["NumberFormattingService",0,0,0,0,[["getFormatter","NumberFormatter",1,3]],0,0,0,"Microsoft.ExcelServices.NumberFormattingService",4],["NumberFormatter",0,[["isDateTime",3],["isPercent",3],["isCurrency",3],["isNumeric",3],["isText",3],["hasYear",3],["hasMonth",3],["hasDayOfWeek",3]],0,[["format",1,3]]],["CustomFunctionManager",36,[["status",2]],0,[["register",2]],0,0,0,0,"Microsoft.ExcelServices.CustomFunctionManager",4],["Style",0,[["builtIn",3],["formulaHidden",1],["horizontalAlignment",1],["includeAlignment",1],["includeBorder",1],["includeFont",1],["includeNumber",1],["includePatterns",1],["includeProtection",1],["indentLevel",1],["locked",1],["name",3],["numberFormat",1],["numberFormatLocal",1],["readingOrder",1],["shrinkToFit",1],["verticalAlignment",1],["wrapText",1],["textOrientation",5,5],["autoIndent",1,5]],[["borders","RangeBorderCollection",51,0,0,4],["font","RangeFont",35,0,0,4],["fill","RangeFill",35,0,0,4]],[["delete"]]],["StyleCollection",1,0,0,[["add",1],["getCount",0,2,6,4]],[["getItem","Style",1,18,0,4],["getItemAt","Style",1,2,6,4],["getItemOrNullObject","Style",1,2,18,4]],0,"Style"],["TableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TableStyle",1,18,0,4],["getItemOrNullObject","TableStyle",1,2,0,4],["add","TableStyle",2,8],["getDefault","TableStyle"]],0,"TableStyle"],["TableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TableStyle"]]],["PivotTableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","PivotTableStyle",1,18,0,4],["getItemOrNullObject","PivotTableStyle",1,2,0,4],["add","PivotTableStyle",2,8],["getDefault","PivotTableStyle"]],0,"PivotTableStyle"],["PivotTableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","PivotTableStyle"]]],["SlicerStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","SlicerStyle",1,18,0,4],["getItemOrNullObject","SlicerStyle",1,2,0,4],["add","SlicerStyle",2,8],["getDefault","SlicerStyle"]],0,"SlicerStyle"],["SlicerStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","SlicerStyle"]]],["TimelineStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TimelineStyle",1,18,0,4],["getItemOrNullObject","TimelineStyle",1,2,0,4],["add","TimelineStyle",2,8],["getDefault","TimelineStyle"]],0,"TimelineStyle"],["TimelineStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TimelineStyle"]]],["InternalTest",0,0,0,[["delay",1],["triggerMessage",4,0,11],["_RegisterTestEvent",0,0,11,2,0,1],["_UnregisterTestEvent",0,0,11,2,0,1],["triggerTestEvent",2,0,11],["triggerPostProcess",0,0,11],["_RegisterTest1Event",0,0,11,2,0,1],["_UnregisterTest1Event",0,0,11,2,0,1],["triggerTestEventWithFilter",3,0,11],["firstPartyMethod",0,2,11,5],["_RegisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_RegisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["unregisterAllCustomFunctionExecutionEvents",0,0,20],["updateRangeValueOnCurrentSheet",2,0,3,2],["triggerUserUndo",0,2,3],["triggerUserRedo",0,2,3],["enterCellEdit",1,0,6],["installCustomFunctionsFromCache",0,0,6],["recalc",2,0,6],["recalcBySolutionId",1,0,6],["safeForCellEditModeMethod",1,0,6],["exitCellEdit",0,0,6],["noPermissionMethod",1,0,6],["verifyCustomFunctionListExist",0,0,6],["enableContentWorkbookLink",0,0,3],["previewExecutionMethod",1,0,8,16],["setRapidJsonEnabled",1,0,8],["triggerVbaRecorderRecordingChanged",2,0,8]],0,0,0,[["CustomFunctionExecutionBeginEvent",0,20,"MessageType.customFunctionExecutionBeginEvent","","_RegisterCustomFunctionExecutionBeginEvent","_UnregisterCustomFunctionExecutionBeginEvent"],["CustomFunctionExecutionEndEvent",0,20,"MessageType.customFunctionExecutionEndEvent","","_RegisterCustomFunctionExecutionEndEvent","_UnregisterCustomFunctionExecutionEndEvent"],["Test1Event",2,11,"MessageType.test1Event","","_RegisterTest1Event","_UnregisterTest1Event"],["TestEvent",2,11,"MessageType.testEvent","","_RegisterTestEvent","_UnregisterTestEvent"]],"Microsoft.ExcelServices.InternalTest",4],["PageLayout",0,[["orientation",1],["paperSize",1],["blackAndWhite",1],["printErrors",1],["zoom",1],["centerHorizontally",1],["centerVertically",1],["printHeadings",1],["printGridlines",1],["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["headerMargin",1],["footerMargin",1],["printComments",1],["draftMode",1],["firstPageNumber",1],["printOrder",1]],[["headersFooters","HeaderFooterGroup",35,0,0,4]],[["setPrintMargins",2],["setPrintArea",1],["setPrintTitleRows",1],["setPrintTitleColumns",1]],[["getPrintArea","RangeAreas",0,10,0,4],["getPrintAreaOrNullObject","RangeAreas",0,10,0,4],["getPrintTitleRows","Range",0,10,0,4],["getPrintTitleRowsOrNullObject","Range",0,10,0,4],["getPrintTitleColumns","Range",0,10,0,4],["getPrintTitleColumnsOrNullObject","Range",0,10,0,4]]],["HeaderFooter",0,[["leftHeader",1],["centerHeader",1],["rightHeader",1],["leftFooter",1],["centerFooter",1],["rightFooter",1]]],["HeaderFooterGroup",0,[["state",1],["useSheetMargins",1],["useSheetScale",1]],[["defaultForAllPages","HeaderFooter",35,0,0,4],["firstPage","HeaderFooter",35,0,0,4],["evenPages","HeaderFooter",35,0,0,4],["oddPages","HeaderFooter",35,0,0,4]]],["PageBreak",0,[["_Id",2],["columnIndex",3],["rowIndex",3]],0,[["delete"]],[["getCellAfterBreak","Range",0,10,0,4]]],["PageBreakCollection",1,0,0,[["removePageBreaks"],["getCount",0,2,0,4]],[["getItem","PageBreak",1,18,0,4],["add","PageBreak",1,8]],0,"PageBreak"],["DataConnectionCollection",0,0,0,[["refreshAll"]],[["add","DataConnection",4,8,8,2,0,0,12]]],["RangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","Range",1,2,0,4]],0,"Range"],["RangeAreasCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","RangeAreas",1,2,0,4]],0,"RangeAreas"],["CommentCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,2,27],["_UnregisterAddedEvent",0,2,27],["_RegisterDeletedEvent",0,2,27],["_UnregisterDeletedEvent",0,2,27],["_RegisterChangedEvent",0,2,27],["_UnregisterChangedEvent",0,2,27]],[["getItem","Comment",1,18,0,4],["getItemAt","Comment",1,2,0,4],["add","Comment",3,8],["getItemByReplyId","Comment",1,2,0,4],["getItemByCell","Comment",1,2,0,4],["getItemOrNullObject","Comment",1,2,18,4]],0,"Comment",[["Added",0,27,"MessageType.commentAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",0,27,"MessageType.commentChangedEvent","this._eventTargetId","_RegisterChangedEvent","_UnregisterChangedEvent"],["Deleted",0,27,"MessageType.commentDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Comment",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",1,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],[["replies","CommentReplyCollection",19,0,0,4]],[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["CommentReplyCollection",1,0,0,[["getCount",0,2,0,4]],[["add","CommentReply",2,8],["getItem","CommentReply",1,18,0,4],["getItemAt","CommentReply",1,2,0,4],["getItemOrNullObject","CommentReply",1,2,18,4]],0,"CommentReply"],["CommentReply",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",3,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],0,[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["getParentComment","Comment"],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["ShapeCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["addImage","Shape",1],["_GetItem","Shape",1,18,0,4],["addGeometricShape","Shape",1],["addTextBox","Shape",1],["addSvg","Shape",1,0,8],["addGroup","Shape",1],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["addLine","Shape",5],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape",[["Added",0,3,"MessageType.shapeAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.shapeDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Shape",0,[["id",3],["name",1],["left",1],["top",1],["width",1],["height",1],["rotation",1],["zOrderPosition",3],["altTextTitle",1],["altTextDescription",1,0,0,2,36],["type",3],["lockAspectRatio",1],["placement",1,17],["geometricShapeType",1],["visible",1],["level",3],["connectionSiteCount",3],["scriptLink",1,8,0,2,37],["displayName",3,35]],[["geometricShape","GeometricShape",2,0,0,4],["image","Image",2,0,0,4],["textFrame","TextFrame",2,0,0,4],["fill","ShapeFill",35,0,0,4],["group","ShapeGroup",2,0,0,4],["parentGroup","Shape",2,0,0,4],["line","Line",2,0,0,4],["lineFormat","ShapeLineFormat",35,0,0,4]],[["setZOrder",1],["incrementLeft",1],["incrementTop",1],["incrementRotation",1],["scaleHeight",3],["scaleWidth",3],["delete"],["getAsImage",1],["_RegisterActivatedEvent",0,0,0,2,0,1],["_UnregisterActivatedEvent",0,0,0,2,0,1],["_RegisterDeactivatedEvent",0,0,0,2,0,1],["_UnregisterDeactivatedEvent",0,0,0,2,0,1],["activate",0,0,3]],[["copyTo","Shape",1,8,17,0,0,"_GetShapeById"],["_GetShapeById","Shape",1,2,17,4]],0,0,[["Activated",0,0,"MessageType.shapeActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,0,"MessageType.shapeDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["GeometricShape",0,[["id",3]],[["shape","Shape",2,0,0,4]]],["Image",0,[["id",3],["format",3,0,"format"]],[["shape","Shape",2,0,0,4]]],["ShapeGroup",0,[["id",3]],[["shapes","GroupShapeCollection",19,0,0,4],["shape","Shape",2,0,0,4]],[["ungroup"]]],["GroupShapeCollection",1,0,0,[["getCount",0,2,0,4]],[["_GetItem","Shape",1,18,0,4],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape"],["Line",0,[["id",3],["connectorType",1,0,"connectorType"],["beginArrowheadLength",1],["beginArrowheadStyle",1],["beginArrowheadWidth",1],["endArrowheadLength",1],["endArrowheadStyle",1],["endArrowheadWidth",1],["isBeginConnected",3],["beginConnectedSite",3],["isEndConnected",3],["endConnectedSite",3]],[["shape","Shape",2,0,0,4],["beginConnectedShape","Shape",2,0,0,4],["endConnectedShape","Shape",2,0,0,4]],[["connectBeginShape",2],["disconnectBeginShape"],["connectEndShape",2],["disconnectEndShape"]]],["ShapeFill",0,[["foregroundColor",1],["type",3],["transparency",1]],0,[["clear"],["setSolidColor",1]]],["ShapeLineFormat",0,[["visible",1],["color",1],["style",1],["weight",1],["dashStyle",1],["transparency",1]]],["TextFrame",0,[["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["horizontalAlignment",1],["horizontalOverflow",1],["verticalAlignment",1],["verticalOverflow",1],["orientation",1],["readingOrder",1],["hasText",3],["autoSizeSetting",1]],[["textRange","TextRange",2,0,0,4]],[["deleteText"]]],["TextRange",0,[["text",1]],[["font","ShapeFont",35,0,0,4]],0,[["getSubstring","TextRange",2]]],["ShapeFont",0,[["size",1],["name",1],["color",1],["bold",1],["italic",1],["underline",1]]],["Slicer",0,[["id",3],["name",1],["caption",1],["left",1],["top",1],["width",1],["height",1],["nameInFormula",1,8],["isFilterCleared",3],["style",1],["sortBy",1],["sortUsingCustomLists",1,3],["columnCount",1,3],["disableMoveResizeUI",1,3],["displayHeader",1,3],["rowHeight",1,3],["shapeId",2,3]],[["slicerItems","SlicerItemCollection",19,0,0,4],["worksheet","Worksheet",35,0,0,4],["slicerStyle","SlicerStyle",35,8,0,4]],[["delete"],["clearFilters"],["getSelectedItems"],["selectItems",1],["activate",0,2,3],["setStyle",1,0,8]]],["SlicerCollection",1,0,0,[["getCount",0,2,0,4]],[["add","Slicer",3,8],["getItemAt","Slicer",1,2,0,4],["getItem","Slicer",1,18,0,4],["getItemOrNullObject","Slicer",1,2,0,4]],0,"Slicer"],["SlicerItem",0,[["key",3],["name",3],["isSelected",1],["hasData",3]]],["SlicerItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SlicerItem",1,2,0,4],["getItem","SlicerItem",1,18,0,4],["getItemOrNullObject","SlicerItem",1,2,0,4]],0,"SlicerItem"],["Ribbon",0,[["activeTab",1]],0,[["executeCommand",2],["showTeachingCallout",3],["_RegisterCommandExecutedEvent",0,0,0,2,0,1],["_UnregisterCommandExecutedEvent",0,0,0,2,0,1],["showChartDialog",1,2,8,4]],0,0,0,[["CommandExecuted",0,0,"MessageType.ribbonCommandExecutedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCommandExecutedEvent","_UnregisterCommandExecutedEvent"]]],["LinkedDataType",0,[["dataProvider",2],["serviceId",2],["lastRefreshed",10],["name",2],["periodicRefreshInterval",2],["refreshDataLoadWarnings",2],["refreshMode",2],["supportedRefreshModes",2],["refreshErrors",2]],0,[["requestRefresh",0,0,0,2],["requestSetRefreshMode",1,0,0,2]]],["LinkedDataTypeCollection",1,0,0,[["getCount",0,2,0,4],["requestRefreshAll",0,0,0,2],["_RegisterRefreshRequestCompletedEvent",0,2,0,4],["_UnregisterRefreshRequestCompletedEvent",0,2,0,4],["_RegisterRefreshModeChangedEvent",0,2,0,4],["_UnregisterRefreshModeChangedEvent",0,2,0,4],["_RegisterLinkedDataTypeAddedEvent",0,2,0,4],["_UnregisterLinkedDataTypeAddedEvent",0,2,0,4]],[["getItem","LinkedDataType",1,18,0,4],["getItemOrNullObject","LinkedDataType",1],["getItemAt","LinkedDataType",1,2,0,4]],0,"LinkedDataType",[["LinkedDataTypeAdded",0,0,"MessageType.linkedDataTypeLinkedDataTypeAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterLinkedDataTypeAddedEvent","_UnregisterLinkedDataTypeAddedEvent"],["RefreshModeChanged",0,0,"MessageType.linkedDataTypeRefreshModeChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshModeChangedEvent","_UnregisterRefreshModeChangedEvent"],["RefreshRequestCompleted",0,0,"MessageType.linkedDataTypeRefreshRequestCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshRequestCompletedEvent","_UnregisterRefreshRequestCompletedEvent"]]],["SheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","SheetView",1]]],["SheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","SheetView",1,8],["enterTemporary","SheetView"],["getActive","SheetView"],["getItem","SheetView",1,18,0,4],["getItemAt","SheetView",1,2,0,4]],0,"SheetView"],["NamedSheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","NamedSheetView",1]]],["NamedSheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","NamedSheetView",1,8],["enterTemporary","NamedSheetView"],["getActive","NamedSheetView"],["getItem","NamedSheetView",1,18,0,4],["getItemAt","NamedSheetView",1,2,0,4],["getItemOrNullObject","NamedSheetView",1,2,28,4]],0,"NamedSheetView"],["FunctionResult",0,[["error",3],["value",3]]],["Functions",0,0,0,0,[["count","FunctionResult",1,72],["if","FunctionResult",3,8],["isNA","FunctionResult",1,8],["isError","FunctionResult",1,8],["sum","FunctionResult",1,72],["average","FunctionResult",1,72],["min","FunctionResult",1,72],["max","FunctionResult",1,72],["na","FunctionResult",0,8],["npv","FunctionResult",2,72],["dollar","FunctionResult",2,8],["fixed","FunctionResult",3,8],["sin","FunctionResult",1,8],["cos","FunctionResult",1,8],["tan","FunctionResult",1,8],["atan","FunctionResult",1,8],["pi","FunctionResult",0,8],["sqrt","FunctionResult",1,8],["exp","FunctionResult",1,8],["ln","FunctionResult",1,8],["log10","FunctionResult",1,8],["abs","FunctionResult",1,8],["int","FunctionResult",1,8],["sign","FunctionResult",1,8],["round","FunctionResult",2,8],["lookup","FunctionResult",3,8],["rept","FunctionResult",2,8],["mid","FunctionResult",3,8],["len","FunctionResult",1,8],["value","FunctionResult",1,8],["true","FunctionResult",0,8],["false","FunctionResult",0,8],["and","FunctionResult",1,72],["or","FunctionResult",1,72],["not","FunctionResult",1,8],["mod","FunctionResult",2,8],["dcount","FunctionResult",3,8,0,0,"DCount"],["dsum","FunctionResult",3,8,0,0,"DSum"],["daverage","FunctionResult",3,8,0,0,"DAverage"],["dmin","FunctionResult",3,8,0,0,"DMin"],["dmax","FunctionResult",3,8,0,0,"DMax"],["dstDev","FunctionResult",3,8,0,0,"DStDev"],["dvar","FunctionResult",3,8,0,0,"DVar"],["text","FunctionResult",2,8],["pv","FunctionResult",5,8],["fv","FunctionResult",5,8],["nper","FunctionResult",5,8,0,0,"NPer"],["pmt","FunctionResult",5,8],["rate","FunctionResult",6,8],["mirr","FunctionResult",3,8,0,0,"MIrr"],["irr","FunctionResult",2,8],["rand","FunctionResult",0,8],["match","FunctionResult",3,8],["date","FunctionResult",3,8],["time","FunctionResult",3,8],["day","FunctionResult",1,8],["month","FunctionResult",1,8],["year","FunctionResult",1,8],["weekday","FunctionResult",2,8],["hour","FunctionResult",1,8],["minute","FunctionResult",1,8],["second","FunctionResult",1,8],["now","FunctionResult",0,8],["areas","FunctionResult",1,8],["rows","FunctionResult",1,8],["columns","FunctionResult",1,8],["type","FunctionResult",1,8],["atan2","FunctionResult",2,8],["asin","FunctionResult",1,8],["acos","FunctionResult",1,8],["choose","FunctionResult",2,72],["hlookup","FunctionResult",4,8,0,0,"HLookup"],["vlookup","FunctionResult",4,8,0,0,"VLookup"],["isref","FunctionResult",1,8],["log","FunctionResult",2,8],["char","FunctionResult",1,8],["lower","FunctionResult",1,8],["upper","FunctionResult",1,8],["proper","FunctionResult",1,8],["left","FunctionResult",2,8],["right","FunctionResult",2,8],["exact","FunctionResult",2,8],["trim","FunctionResult",1,8],["replace","FunctionResult",4,8],["substitute","FunctionResult",4,8],["code","FunctionResult",1,8],["find","FunctionResult",3,8],["isErr","FunctionResult",1,8],["isText","FunctionResult",1,8],["isNumber","FunctionResult",1,8],["t","FunctionResult",1,8,0,0,"T"],["n","FunctionResult",1,8,0,0,"N"],["datevalue","FunctionResult",1,8],["timevalue","FunctionResult",1,8],["sln","FunctionResult",3,8],["syd","FunctionResult",4,8],["ddb","FunctionResult",5,8],["clean","FunctionResult",1,8],["ipmt","FunctionResult",6,8],["ppmt","FunctionResult",6,8],["countA","FunctionResult",1,72],["product","FunctionResult",1,72],["fact","FunctionResult",1,8],["dproduct","FunctionResult",3,8,0,0,"DProduct"],["isNonText","FunctionResult",1,8],["dstDevP","FunctionResult",3,8,0,0,"DStDevP"],["dvarP","FunctionResult",3,8,0,0,"DVarP"],["trunc","FunctionResult",2,8],["isLogical","FunctionResult",1,8],["dcountA","FunctionResult",3,8,0,0,"DCountA"],["usdollar","FunctionResult",2,8,0,0,"USDollar"],["findB","FunctionResult",3,8],["replaceB","FunctionResult",4,8],["leftb","FunctionResult",2,8],["rightb","FunctionResult",2,8],["midb","FunctionResult",3,8],["lenb","FunctionResult",1,8],["roundUp","FunctionResult",2,8],["roundDown","FunctionResult",2,8],["asc","FunctionResult",1,8],["dbcs","FunctionResult",1,8],["days360","FunctionResult",3,8],["today","FunctionResult",0,8],["vdb","FunctionResult",7,8],["median","FunctionResult",1,72],["sinh","FunctionResult",1,8],["cosh","FunctionResult",1,8],["tanh","FunctionResult",1,8],["asinh","FunctionResult",1,8],["acosh","FunctionResult",1,8],["atanh","FunctionResult",1,8],["dget","FunctionResult",3,8,0,0,"DGet"],["db","FunctionResult",5,8],["error_Type","FunctionResult",1,8],["aveDev","FunctionResult",1,72],["gammaLn","FunctionResult",1,8],["combin","FunctionResult",2,8],["even","FunctionResult",1,8],["fisher","FunctionResult",1,8],["fisherInv","FunctionResult",1,8],["standardize","FunctionResult",3,8],["odd","FunctionResult",1,8],["permut","FunctionResult",2,8],["devSq","FunctionResult",1,72],["geoMean","FunctionResult",1,72],["harMean","FunctionResult",1,72],["sumSq","FunctionResult",1,72],["kurt","FunctionResult",1,72],["skew","FunctionResult",1,72],["large","FunctionResult",2,8],["small","FunctionResult",2,8],["trimMean","FunctionResult",2,8],["concatenate","FunctionResult",1,72],["power","FunctionResult",2,8],["radians","FunctionResult",1,8],["degrees","FunctionResult",1,8],["subtotal","FunctionResult",2,72],["sumIf","FunctionResult",3,8],["countIf","FunctionResult",2,8],["countBlank","FunctionResult",1,8],["ispmt","FunctionResult",4,8],["roman","FunctionResult",2,8],["hyperlink","FunctionResult",2,8],["averageA","FunctionResult",1,72],["maxA","FunctionResult",1,72],["minA","FunctionResult",1,72],["stDevPA","FunctionResult",1,72],["varPA","FunctionResult",1,72],["stDevA","FunctionResult",1,72],["varA","FunctionResult",1,72],["bahtText","FunctionResult",1,8],["hex2Bin","FunctionResult",2,8],["hex2Dec","FunctionResult",1,8],["hex2Oct","FunctionResult",2,8],["dec2Bin","FunctionResult",2,8],["dec2Hex","FunctionResult",2,8],["dec2Oct","FunctionResult",2,8],["oct2Bin","FunctionResult",2,8],["oct2Hex","FunctionResult",2,8],["oct2Dec","FunctionResult",1,8],["bin2Dec","FunctionResult",1,8],["bin2Oct","FunctionResult",2,8],["bin2Hex","FunctionResult",2,8],["imSub","FunctionResult",2,8],["imDiv","FunctionResult",2,8],["imPower","FunctionResult",2,8],["imAbs","FunctionResult",1,8],["imSqrt","FunctionResult",1,8],["imLn","FunctionResult",1,8],["imLog2","FunctionResult",1,8],["imLog10","FunctionResult",1,8],["imSin","FunctionResult",1,8],["imCos","FunctionResult",1,8],["imExp","FunctionResult",1,8],["imArgument","FunctionResult",1,8],["imConjugate","FunctionResult",1,8],["imaginary","FunctionResult",1,8],["imReal","FunctionResult",1,8],["complex","FunctionResult",3,8],["imSum","FunctionResult",1,72],["imProduct","FunctionResult",1,72],["seriesSum","FunctionResult",4,8],["factDouble","FunctionResult",1,8],["sqrtPi","FunctionResult",1,8],["quotient","FunctionResult",2,8],["delta","FunctionResult",2,8],["geStep","FunctionResult",2,8],["isEven","FunctionResult",1,8],["isOdd","FunctionResult",1,8],["mround","FunctionResult",2,8,0,0,"MRound"],["erf","FunctionResult",2,8],["erfC","FunctionResult",1,8],["besselJ","FunctionResult",2,8],["besselK","FunctionResult",2,8],["besselY","FunctionResult",2,8],["besselI","FunctionResult",2,8],["xirr","FunctionResult",3,8],["xnpv","FunctionResult",3,8],["priceMat","FunctionResult",6,8],["yieldMat","FunctionResult",6,8],["intRate","FunctionResult",5,8],["received","FunctionResult",5,8],["disc","FunctionResult",5,8],["priceDisc","FunctionResult",5,8],["yieldDisc","FunctionResult",5,8],["tbillEq","FunctionResult",3,8,0,0,"TBillEq"],["tbillPrice","FunctionResult",3,8,0,0,"TBillPrice"],["tbillYield","FunctionResult",3,8,0,0,"TBillYield"],["price","FunctionResult",7,8],["yield","FunctionResult",7,8],["dollarDe","FunctionResult",2,8],["dollarFr","FunctionResult",2,8],["nominal","FunctionResult",2,8],["effect","FunctionResult",2,8],["cumPrinc","FunctionResult",6,8],["cumIPmt","FunctionResult",6,8],["edate","FunctionResult",2,8,0,0,"EDate"],["eoMonth","FunctionResult",2,8],["yearFrac","FunctionResult",3,8],["coupDayBs","FunctionResult",4,8],["coupDays","FunctionResult",4,8],["coupDaysNc","FunctionResult",4,8],["coupNcd","FunctionResult",4,8],["coupNum","FunctionResult",4,8],["coupPcd","FunctionResult",4,8],["duration","FunctionResult",6,8],["mduration","FunctionResult",6,8,0,0,"MDuration"],["oddLPrice","FunctionResult",8,8],["oddLYield","FunctionResult",8,8],["oddFPrice","FunctionResult",9,8],["oddFYield","FunctionResult",9,8],["randBetween","FunctionResult",2,8],["weekNum","FunctionResult",2,8],["amorDegrc","FunctionResult",7,8],["amorLinc","FunctionResult",7,8],["convert","FunctionResult",3,8],["accrInt","FunctionResult",8,8],["accrIntM","FunctionResult",5,8],["workDay","FunctionResult",3,8],["networkDays","FunctionResult",3,8],["gcd","FunctionResult",1,72],["multiNomial","FunctionResult",1,72],["lcm","FunctionResult",1,72],["fvschedule","FunctionResult",2,8,0,0,"FVSchedule"],["countIfs","FunctionResult",1,72],["sumIfs","FunctionResult",2,72],["averageIf","FunctionResult",3,8],["averageIfs","FunctionResult",2,72],["binom_Dist","FunctionResult",4,8],["binom_Inv","FunctionResult",3,8],["confidence_Norm","FunctionResult",3,8],["confidence_T","FunctionResult",3,8],["expon_Dist","FunctionResult",3,8],["gamma_Dist","FunctionResult",4,8],["gamma_Inv","FunctionResult",3,8],["norm_Dist","FunctionResult",4,8],["norm_Inv","FunctionResult",3,8],["percentile_Exc","FunctionResult",2,8],["percentile_Inc","FunctionResult",2,8],["percentRank_Exc","FunctionResult",3,8],["percentRank_Inc","FunctionResult",3,8],["poisson_Dist","FunctionResult",3,8],["quartile_Exc","FunctionResult",2,8],["quartile_Inc","FunctionResult",2,8],["rank_Avg","FunctionResult",3,8],["rank_Eq","FunctionResult",3,8],["stDev_S","FunctionResult",1,72],["stDev_P","FunctionResult",1,72],["t_Dist","FunctionResult",3,8],["t_Dist_2T","FunctionResult",2,8],["t_Dist_RT","FunctionResult",2,8],["t_Inv","FunctionResult",2,8],["t_Inv_2T","FunctionResult",2,8],["var_S","FunctionResult",1,72],["var_P","FunctionResult",1,72],["weibull_Dist","FunctionResult",4,8],["networkDays_Intl","FunctionResult",4,8],["workDay_Intl","FunctionResult",4,8],["ecma_Ceiling","FunctionResult",2,8,0,0,"ECMA_Ceiling"],["iso_Ceiling","FunctionResult",2,8,0,0,"ISO_Ceiling"],["beta_Dist","FunctionResult",6,8],["beta_Inv","FunctionResult",5,8],["chiSq_Dist","FunctionResult",3,8],["chiSq_Dist_RT","FunctionResult",2,8],["chiSq_Inv","FunctionResult",2,8],["chiSq_Inv_RT","FunctionResult",2,8],["f_Dist","FunctionResult",4,8],["f_Dist_RT","FunctionResult",3,8],["f_Inv","FunctionResult",3,8],["f_Inv_RT","FunctionResult",3,8],["hypGeom_Dist","FunctionResult",5,8],["logNorm_Dist","FunctionResult",4,8],["logNorm_Inv","FunctionResult",3,8],["negBinom_Dist","FunctionResult",4,8],["norm_S_Dist","FunctionResult",2,8],["norm_S_Inv","FunctionResult",1,8],["z_Test","FunctionResult",3,8],["erf_Precise","FunctionResult",1,8],["erfC_Precise","FunctionResult",1,8],["gammaLn_Precise","FunctionResult",1,8],["ceiling_Precise","FunctionResult",2,8],["floor_Precise","FunctionResult",2,8],["acot","FunctionResult",1,8],["acoth","FunctionResult",1,8],["cot","FunctionResult",1,8],["coth","FunctionResult",1,8],["csc","FunctionResult",1,8],["csch","FunctionResult",1,8],["sec","FunctionResult",1,8],["sech","FunctionResult",1,8],["imTan","FunctionResult",1,8],["imCot","FunctionResult",1,8],["imCsc","FunctionResult",1,8],["imCsch","FunctionResult",1,8],["imSec","FunctionResult",1,8],["imSech","FunctionResult",1,8],["bitand","FunctionResult",2,8],["bitor","FunctionResult",2,8],["bitxor","FunctionResult",2,8],["bitlshift","FunctionResult",2,8],["bitrshift","FunctionResult",2,8],["permutationa","FunctionResult",2,8],["combina","FunctionResult",2,8],["xor","FunctionResult",1,72],["pduration","FunctionResult",3,8,0,0,"PDuration"],["base","FunctionResult",3,8],["decimal","FunctionResult",2,8],["days","FunctionResult",2,8],["binom_Dist_Range","FunctionResult",4,8],["gamma","FunctionResult",1,8],["skew_p","FunctionResult",1,72],["gauss","FunctionResult",1,8],["phi","FunctionResult",1,8],["rri","FunctionResult",3,8],["unichar","FunctionResult",1,8],["unicode","FunctionResult",1,8],["arabic","FunctionResult",1,8],["isoWeekNum","FunctionResult",1,8],["numberValue","FunctionResult",3,8],["sheet","FunctionResult",1,8],["sheets","FunctionResult",1,8],["isFormula","FunctionResult",1,8],["ceiling_Math","FunctionResult",3,8],["floor_Math","FunctionResult",3,8],["imSinh","FunctionResult",1,8],["imCosh","FunctionResult",1,8]]]]},targetNamespaceObject:e})}(Excel||(Excel={}));var _EndExcel="_EndExcel";if("undefined"!==typeof window&&window.OSF&&window.OSF._OfficeAppFactory&&window.OSF._OfficeAppFactory.getHostInfo&&window.OSF._OfficeAppFactory.getHostInfo()){var hostPlatform=window.OSF._OfficeAppFactory.getHostInfo().hostPlatform;"web"===hostPlatform&&(OfficeExtension._internalConfig.enablePreviewExecution=!0)}function exposeOfficeRuntimeThroughOfficeNamespace(e,t){var n,r;"undefined"===typeof e&&"undefined"!==typeof window&&(e=null===window||void 0===window?void 0:window.OfficeRuntime),"undefined"===typeof e&&(e={}),"undefined"!==typeof t&&(t.storage=t.storage||(null===e||void 0===e?void 0:e.storage),t.auth=t.auth||(null===e||void 0===e?void 0:e.auth),t.getAccessToken=t.getAccessToken||(null===(n=null===e||void 0===e?void 0:e.auth)||void 0===n?void 0:n.getAccessToken),t.addin=t.addin||(null===e||void 0===e?void 0:e.addin),t.isSetSupported=t.isSetSupported||(null===(r=null===e||void 0===e?void 0:e.apiInformation)||void 0===r?void 0:r.isSetSupported),t.license=t.license||(null===e||void 0===e?void 0:e.license),t.message=t.message||(null===e||void 0===e?void 0:e.message))}OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithOTel=!0,OSFAriaLogger.AriaLogger.EnableSendingTelemetryWithLegacyAria=!1,exposeOfficeRuntimeThroughOfficeNamespace("undefined"!==typeof OfficeRuntime&&OfficeRuntime||void 0,"undefined"!==typeof Office&&Office||void 0); \ No newline at end of file diff --git a/dist/excel.debug.js b/dist/excel.debug.js new file mode 100644 index 000000000..fbf127141 --- /dev/null +++ b/dist/excel.debug.js @@ -0,0 +1,46529 @@ +/* + * Office JavaScript API library + * + * Copyright (c) Microsoft Corporation. All rights reserved. + * + * Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + * + * This file also contains the following Promise implementation (with a few small modifications): + * * @overview es6-promise - a tiny implementation of Promises/A+. + * * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * * @license Licensed under MIT license + * * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * * @version 2.3.0 + */ +var OSFPerformance; +(function (OSFPerformance) { + function now() { + if (typeof (performance) !== 'undefined' && performance.now) { + return performance.now(); + } + else { + return 0; + } + } + OSFPerformance.now = now; + function getTotalJSHeapSize() { + if (typeof (performance) !== 'undefined' && performance.memory) { + return performance.memory.totalJSHeapSize; + } + else { + return 0; + } + } + OSFPerformance.getTotalJSHeapSize = getTotalJSHeapSize; + function getUsedJSHeapSize() { + if (typeof (performance) !== 'undefined' && performance.memory) { + return performance.memory.usedJSHeapSize; + } + else { + return 0; + } + } + OSFPerformance.getUsedJSHeapSize = getUsedJSHeapSize; + function getJSHeapSizeLimit() { + if (typeof (performance) !== 'undefined' && performance.memory) { + return performance.memory.jsHeapSizeLimit; + } + else { + return 0; + } + } + OSFPerformance.getJSHeapSizeLimit = getJSHeapSizeLimit; + OSFPerformance.officeExecuteStartDate = OSFPerformance.officeExecuteStartDate || Date.now(); + OSFPerformance.officeExecuteStart = OSFPerformance.officeExecuteStart || 0; + OSFPerformance.officeExecuteEnd = OSFPerformance.officeExecuteEnd || 0; + OSFPerformance.hostInitializationStart = 0; + OSFPerformance.hostInitializationEnd = 0; + OSFPerformance.totalJSHeapSize = 0; + OSFPerformance.usedJSHeapSize = 0; + OSFPerformance.jsHeapSizeLimit = 0; + OSFPerformance.createOMEnd = 0; + OSFPerformance.hostSpecificFileName = ""; + OSFPerformance.getAppContextStart = 0; + OSFPerformance.getAppContextEnd = 0; + OSFPerformance.getAppContextXdmStart = 0; + OSFPerformance.getAppContextXdmEnd = 0; + OSFPerformance.officeOnReady = 0; +})(OSFPerformance || (OSFPerformance = {})); +var OSF; +(function (OSF) { + function definePropertyOnNamespace(o, name, getFunction) { + Object.defineProperty(o, name, { + get: function () { + return getFunction(); + }, + configurable: true, + enumerable: true + }); + } + OSF.definePropertyOnNamespace = definePropertyOnNamespace; +})(OSF || (OSF = {})); +OSFPerformance.hostInitializationStart = OSFPerformance.now(); +var Office; +(function (Office) { + var actions; + (function (actions) { + actions.m_association = actions.m_association; + function get_association() { + if (!actions.m_association) { + actions.m_association = new OSF.Association(); + } + return actions.m_association; + } + function associate() { + get_association().associate.apply(get_association(), arguments); + } + actions.associate = associate; + ; + OSF.definePropertyOnNamespace(actions, '_association', get_association); + })(actions = Office.actions || (Office.actions = {})); +})(Office || (Office = {})); +var OSF; +(function (OSF) { + var AgaveHostAction; + (function (AgaveHostAction) { + AgaveHostAction[AgaveHostAction["Select"] = 0] = "Select"; + AgaveHostAction[AgaveHostAction["UnSelect"] = 1] = "UnSelect"; + AgaveHostAction[AgaveHostAction["CancelDialog"] = 2] = "CancelDialog"; + AgaveHostAction[AgaveHostAction["InsertAgave"] = 3] = "InsertAgave"; + AgaveHostAction[AgaveHostAction["CtrlF6In"] = 4] = "CtrlF6In"; + AgaveHostAction[AgaveHostAction["CtrlF6Exit"] = 5] = "CtrlF6Exit"; + AgaveHostAction[AgaveHostAction["CtrlF6ExitShift"] = 6] = "CtrlF6ExitShift"; + AgaveHostAction[AgaveHostAction["SelectWithError"] = 7] = "SelectWithError"; + AgaveHostAction[AgaveHostAction["NotifyHostError"] = 8] = "NotifyHostError"; + AgaveHostAction[AgaveHostAction["RefreshAddinCommands"] = 9] = "RefreshAddinCommands"; + AgaveHostAction[AgaveHostAction["PageIsReady"] = 10] = "PageIsReady"; + AgaveHostAction[AgaveHostAction["TabIn"] = 11] = "TabIn"; + AgaveHostAction[AgaveHostAction["TabInShift"] = 12] = "TabInShift"; + AgaveHostAction[AgaveHostAction["TabExit"] = 13] = "TabExit"; + AgaveHostAction[AgaveHostAction["TabExitShift"] = 14] = "TabExitShift"; + AgaveHostAction[AgaveHostAction["EscExit"] = 15] = "EscExit"; + AgaveHostAction[AgaveHostAction["F2Exit"] = 16] = "F2Exit"; + AgaveHostAction[AgaveHostAction["ExitNoFocusable"] = 17] = "ExitNoFocusable"; + AgaveHostAction[AgaveHostAction["ExitNoFocusableShift"] = 18] = "ExitNoFocusableShift"; + AgaveHostAction[AgaveHostAction["MouseEnter"] = 19] = "MouseEnter"; + AgaveHostAction[AgaveHostAction["MouseLeave"] = 20] = "MouseLeave"; + AgaveHostAction[AgaveHostAction["UpdateTargetUrl"] = 21] = "UpdateTargetUrl"; + AgaveHostAction[AgaveHostAction["InstallCustomFunctions"] = 22] = "InstallCustomFunctions"; + AgaveHostAction[AgaveHostAction["SendTelemetryEvent"] = 23] = "SendTelemetryEvent"; + AgaveHostAction[AgaveHostAction["UninstallCustomFunctions"] = 24] = "UninstallCustomFunctions"; + AgaveHostAction[AgaveHostAction["SendMessage"] = 25] = "SendMessage"; + AgaveHostAction[AgaveHostAction["LaunchExtensionComponent"] = 26] = "LaunchExtensionComponent"; + AgaveHostAction[AgaveHostAction["StopExtensionComponent"] = 27] = "StopExtensionComponent"; + AgaveHostAction[AgaveHostAction["RestartExtensionComponent"] = 28] = "RestartExtensionComponent"; + AgaveHostAction[AgaveHostAction["EnableTaskPaneHeaderButton"] = 29] = "EnableTaskPaneHeaderButton"; + AgaveHostAction[AgaveHostAction["DisableTaskPaneHeaderButton"] = 30] = "DisableTaskPaneHeaderButton"; + AgaveHostAction[AgaveHostAction["TaskPaneHeaderButtonClicked"] = 31] = "TaskPaneHeaderButtonClicked"; + AgaveHostAction[AgaveHostAction["RemoveAppCommandsAddin"] = 32] = "RemoveAppCommandsAddin"; + AgaveHostAction[AgaveHostAction["RefreshRibbonGallery"] = 33] = "RefreshRibbonGallery"; + AgaveHostAction[AgaveHostAction["GetOriginalControlId"] = 34] = "GetOriginalControlId"; + AgaveHostAction[AgaveHostAction["OfficeJsReady"] = 35] = "OfficeJsReady"; + AgaveHostAction[AgaveHostAction["InsertDevManifest"] = 36] = "InsertDevManifest"; + AgaveHostAction[AgaveHostAction["InsertDevManifestError"] = 37] = "InsertDevManifestError"; + AgaveHostAction[AgaveHostAction["SendCustomerContent"] = 38] = "SendCustomerContent"; + AgaveHostAction[AgaveHostAction["KeyboardShortcuts"] = 39] = "KeyboardShortcuts"; + })(AgaveHostAction = OSF.AgaveHostAction || (OSF.AgaveHostAction = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var AppCommandManager = (function () { + function AppCommandManager() { + var _this = this; + this._processAppCommandInvocation = function (args) { + var verifyResult = _this._verifyManifestCallback(args.callbackName); + if (verifyResult.errorCode != 0) { + _this._invokeAppCommandCompletedMethod(args.appCommandId, verifyResult.errorCode, ""); + return; + } + var eventObj = _this._constructEventObjectForCallback(args); + if (eventObj) { + window.setTimeout(function () { verifyResult.callback(eventObj); }, 0); + } + else { + _this._invokeAppCommandCompletedMethod(args.appCommandId, 5001, ""); + } + }; + this._eventDispatch = new OSF.EventDispatch([ + { + type: OSF.EventType.AppCommandInvoked, + id: OSF.EventDispId.dispidAppCommandInvokedEvent, + getTargetId: function () { return ''; }, + fromSafeArrayHost: function (payload) { + return { + type: OSF.EventType.AppCommandInvoked, + appCommandId: payload[0], + callbackName: payload[1], + eventObjStr: payload[2] + }; + }, + fromWebHost: function (payload) { + return { + type: OSF.EventType.AppCommandInvoked, + appCommandId: payload[0], + callbackName: payload[1], + eventObjStr: payload[2] + }; + } + } + ]); + } + AppCommandManager.prototype.initializeEventHandler = function (callback) { + var _this = this; + this.addHandlerAsync(OSF.EventType.AppCommandInvoked, function (args) { + _this._processAppCommandInvocation(args); + }, callback); + }; + AppCommandManager.prototype.appCommandInvocationCompletedAsync = function (id, status, completedData, callback) { + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + asyncMethodExecutor.executeAsync(94, { + fromSafeArrayHost: function (payload) { + return payload; + }, + fromWebHost: function (payload) { + return payload; + }, + toSafeArrayHost: function () { + return [id, status, completedData]; + }, + toWebHost: function () { + var obj = {}; + obj[0] = id; + obj[1] = status; + obj[2] = completedData; + return obj; + } + }, callback); + }; + AppCommandManager.prototype.addHandlerAsync = function (eventType, handler, callback) { + OSF.EventHelper.addEventHandler(eventType, handler, callback, this._eventDispatch, undefined, OSF.OUtil.isPopupWindow()); + }; + AppCommandManager.prototype._verifyManifestCallback = function (callbackName) { + var defaultResult = { callback: null, errorCode: 11101 }; + callbackName = callbackName.trim(); + try { + var callbackFunc = this._getCallbackFunc(callbackName); + if (typeof callbackFunc != "function") { + return defaultResult; + } + } + catch (e) { + return defaultResult; + } + return { callback: callbackFunc, errorCode: 0 }; + }; + AppCommandManager.prototype._getCallbackFuncFromActionAssociateTable = function (callbackName) { + var nameUpperCase = callbackName.toUpperCase(); + return Office.actions._association.mappings[nameUpperCase]; + }; + AppCommandManager.prototype._getCallbackFunc = function (callbackName) { + var callbackFunc = this._getCallbackFuncFromActionAssociateTable(callbackName); + return callbackFunc; + }; + AppCommandManager.prototype._invokeAppCommandCompletedMethod = function (appCommandId, resultCode, data) { + this.appCommandInvocationCompletedAsync(appCommandId, resultCode, data, function (result) { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error("Failed to notify the host thta app command is completed"); + } + }); + }; + AppCommandManager.prototype._constructEventObjectForCallback = function (args) { + var _this = this; + var eventObj; + var eventObjCopy; + try { + eventObj = JSON.parse(args.eventObjStr); + eventObjCopy = JSON.parse(args.eventObjStr); + } + catch (ex) { + } + if (!eventObj) { + eventObj = {}; + } + if (!eventObjCopy) { + eventObjCopy = {}; + } + eventObj.completed = function (completedContext) { + eventObjCopy.completedContext = completedContext; + var jsonString = JSON.stringify(eventObjCopy); + _this._invokeAppCommandCompletedMethod(args.appCommandId, 0, jsonString); + }; + return eventObj; + }; + AppCommandManager.initialize = function () { + if (AppCommandManager._instance == null) { + AppCommandManager._instance = new AppCommandManager(); + AppCommandManager._instance.initializeEventHandler(function (result) { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error('Cannot initialize app command: ' + JSON.stringify(result)); + } + }); + } + }; + AppCommandManager._instance = null; + return AppCommandManager; + }()); + OSF.AppCommandManager = AppCommandManager; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var AppName; + (function (AppName) { + AppName[AppName["Unsupported"] = 0] = "Unsupported"; + AppName[AppName["Excel"] = 1] = "Excel"; + AppName[AppName["Word"] = 2] = "Word"; + AppName[AppName["PowerPoint"] = 4] = "PowerPoint"; + AppName[AppName["Outlook"] = 8] = "Outlook"; + AppName[AppName["ExcelWebApp"] = 16] = "ExcelWebApp"; + AppName[AppName["WordWebApp"] = 32] = "WordWebApp"; + AppName[AppName["OutlookWebApp"] = 64] = "OutlookWebApp"; + AppName[AppName["Project"] = 128] = "Project"; + AppName[AppName["AccessWebApp"] = 256] = "AccessWebApp"; + AppName[AppName["PowerpointWebApp"] = 512] = "PowerpointWebApp"; + AppName[AppName["ExcelIOS"] = 1024] = "ExcelIOS"; + AppName[AppName["Sway"] = 2048] = "Sway"; + AppName[AppName["WordIOS"] = 4096] = "WordIOS"; + AppName[AppName["PowerPointIOS"] = 8192] = "PowerPointIOS"; + AppName[AppName["Access"] = 16384] = "Access"; + AppName[AppName["Lync"] = 32768] = "Lync"; + AppName[AppName["OutlookIOS"] = 65536] = "OutlookIOS"; + AppName[AppName["OneNoteWebApp"] = 131072] = "OneNoteWebApp"; + AppName[AppName["OneNote"] = 262144] = "OneNote"; + AppName[AppName["ExcelWinRT"] = 524288] = "ExcelWinRT"; + AppName[AppName["WordWinRT"] = 1048576] = "WordWinRT"; + AppName[AppName["PowerpointWinRT"] = 2097152] = "PowerpointWinRT"; + AppName[AppName["OutlookAndroid"] = 4194304] = "OutlookAndroid"; + AppName[AppName["OneNoteWinRT"] = 8388608] = "OneNoteWinRT"; + AppName[AppName["ExcelAndroid"] = 8388609] = "ExcelAndroid"; + AppName[AppName["VisioWebApp"] = 8388610] = "VisioWebApp"; + AppName[AppName["OneNoteIOS"] = 8388611] = "OneNoteIOS"; + AppName[AppName["WordAndroid"] = 8388613] = "WordAndroid"; + AppName[AppName["PowerpointAndroid"] = 8388614] = "PowerpointAndroid"; + AppName[AppName["Visio"] = 8388615] = "Visio"; + AppName[AppName["OneNoteAndroid"] = 4194305] = "OneNoteAndroid"; + })(AppName = OSF.AppName || (OSF.AppName = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var Association = (function () { + function Association() { + this.m_mappings = {}; + this.m_onchangeHandlers = []; + } + Association.prototype.associate = function (arg1, arg2) { + function consoleWarn(message) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + } + if (arguments.length == 1 && typeof arguments[0] === 'object' && arguments[0]) { + var mappings = arguments[0]; + for (var key in mappings) { + this.associate(key, mappings[key]); + } + } + else if (arguments.length == 2) { + var name_1 = arguments[0]; + var func = arguments[1]; + if (typeof name_1 !== 'string') { + consoleWarn('[InvalidArg] Function=associate'); + return; + } + if (typeof func !== 'function') { + consoleWarn('[InvalidArg] Function=associate'); + return; + } + var nameUpperCase = name_1.toUpperCase(); + if (this.m_mappings[nameUpperCase]) { + consoleWarn('[DuplicatedName] Function=' + name_1); + } + this.m_mappings[nameUpperCase] = func; + for (var i = 0; i < this.m_onchangeHandlers.length; i++) { + this.m_onchangeHandlers[i](); + } + } + else { + consoleWarn('[InvalidArg] Function=associate'); + } + }; + Association.prototype.onchange = function (handler) { + if (handler) { + this.m_onchangeHandlers.push(handler); + } + }; + Object.defineProperty(Association.prototype, "mappings", { + get: function () { + return this.m_mappings; + }, + enumerable: true, + configurable: true + }); + return Association; + }()); + OSF.Association = Association; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var AsyncMethodExecutor = (function () { + function AsyncMethodExecutor() { + } + AsyncMethodExecutor.prototype.invokeCallback = function (dispId, callback, status, value, asyncContext) { + if (status == 0) { + var successResult = { + status: Office.AsyncResultStatus.Succeeded, + value: value, + asyncContext: asyncContext + }; + if (typeof callback == "function") { + callback(successResult); + } + } + else { + var errorResult = { + status: Office.AsyncResultStatus.Failed, + error: { + code: status + }, + asyncContext: asyncContext + }; + if (typeof callback == "function") { + callback(errorResult); + } + } + }; + return AsyncMethodExecutor; + }()); + OSF.AsyncMethodExecutor = AsyncMethodExecutor; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var AsyncMethodExecutorHelper = (function () { + function AsyncMethodExecutorHelper(asyncMethodExecutor) { + this._asyncMethodExecutor = asyncMethodExecutor; + } + AsyncMethodExecutorHelper.prototype.handleSafeArrayHostResponse = function (hostResponseArgs, resultCode, chunkResultData, callback, dataTransform, id, asyncContext) { + var result; + var status; + var hostResponseArgs = OSF.Utility.fromSafeArray(hostResponseArgs); + if (typeof hostResponseArgs === "number") { + result = []; + status = hostResponseArgs; + } + else { + result = hostResponseArgs; + status = result[0]; + } + if (status == 1) { + var payload = result[1]; + if (payload != null) { + chunkResultData[payload[0]] = payload[1]; + } + return false; + } + if (callback) { + var payload; + if (status == 0) { + if (result.length > 2) { + payload = []; + for (var i = 1; i < result.length; i++) + payload[i - 1] = result[i]; + } + else { + payload = result[1]; + } + if (chunkResultData.length > 0) { + if (payload != null) { + var expectedChunkCount = payload[payload.length - 1]; + if (chunkResultData.length == expectedChunkCount) { + payload[payload.length - 1] = chunkResultData; + } + else { + status = 5001; + } + } + } + } + else { + payload = result[1]; + } + var value = null; + if (status == 0) { + value = dataTransform.fromSafeArrayHost(payload); + } + this._asyncMethodExecutor.invokeCallback(id, callback, status, value, asyncContext); + } + return true; + }; + AsyncMethodExecutorHelper.prototype.handleWebHostResponse = function (hostResponseArgs, resultCode, callback, dataTransform, id, asyncContext) { + var value = null; + if (resultCode == 0) { + value = dataTransform.fromWebHost(hostResponseArgs); + } + this._asyncMethodExecutor.invokeCallback(id, callback, resultCode, value, asyncContext); + }; + return AsyncMethodExecutorHelper; + }()); + OSF.AsyncMethodExecutorHelper = AsyncMethodExecutorHelper; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var DDA; + (function (DDA) { + var AsyncResultEnum; + (function (AsyncResultEnum) { + var Properties; + (function (Properties) { + Properties["Context"] = "Context"; + Properties["Value"] = "Value"; + Properties["Status"] = "Status"; + Properties["Error"] = "Error"; + })(Properties = AsyncResultEnum.Properties || (AsyncResultEnum.Properties = {})); + ; + var ErrorCode; + (function (ErrorCode) { + ErrorCode[ErrorCode["Success"] = 0] = "Success"; + ErrorCode[ErrorCode["Failed"] = 1] = "Failed"; + })(ErrorCode = AsyncResultEnum.ErrorCode || (AsyncResultEnum.ErrorCode = {})); + ; + var ErrorProperties; + (function (ErrorProperties) { + ErrorProperties["Name"] = "Name"; + ErrorProperties["Message"] = "Message"; + ErrorProperties["Code"] = "Code"; + })(ErrorProperties = AsyncResultEnum.ErrorProperties || (AsyncResultEnum.ErrorProperties = {})); + ; + })(AsyncResultEnum = DDA.AsyncResultEnum || (DDA.AsyncResultEnum = {})); + var AsyncResult = (function () { + function AsyncResult(initArgs, errorArgs) { + this.value = initArgs.Value; + this.status = (errorArgs ? Office.AsyncResultStatus.Failed : Office.AsyncResultStatus.Succeeded); + if (initArgs.Context) { + this.asyncContext = initArgs.Context; + } + if (errorArgs) { + this.error = new Error(errorArgs.Name, errorArgs.Message, errorArgs.Code); + } + } + return AsyncResult; + }()); + DDA.AsyncResult = AsyncResult; + var Error = (function () { + function Error(name, message, code) { + this.name = name; + this.message = message; + this.code = code; + } + return Error; + }()); + DDA.Error = Error; + })(DDA = OSF.DDA || (OSF.DDA = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var BootStrapExtension; + (function (BootStrapExtension) { + BootStrapExtension.createWebClientHostControllerHelper = function (webAppState, delegateVersion) { + return new OSF.WebClientHostControllerHelper(webAppState, delegateVersion); + }; + BootStrapExtension.createAsyncMethodExecutorHelper = function (asyncMethodExecutor) { + return new OSF.AsyncMethodExecutorHelper(asyncMethodExecutor); + }; + })(BootStrapExtension = OSF.BootStrapExtension || (OSF.BootStrapExtension = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var ConstantNames; + (function (ConstantNames) { + ConstantNames["DefaultLocale"] = "en-us"; + ConstantNames["OfficeJS"] = "office.js"; + ConstantNames["OfficeDebugJS"] = "office.debug.js"; + ConstantNames["OfficeStringsId"] = "OFFICESTRINGS"; + ConstantNames["OfficeJsId"] = "OFFICEJS"; + ConstantNames["HostFileId"] = "HOST"; + ConstantNames["OfficeStringJS"] = "office_strings.js"; + ConstantNames["OfficeStringDebugJS"] = "office_strings.debug.js"; + ConstantNames["FileVersion"] = "0.0.0.0"; + })(ConstantNames = OSF.ConstantNames || (OSF.ConstantNames = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var Constants = (function () { + function Constants() { + } + Constants.NotificationConversationIdSuffix = '_ntf'; + return Constants; + }()); + OSF.Constants = Constants; +})(OSF || (OSF = {})); +var CustomFunctionMappings; +(function (CustomFunctionMappings) { +})(CustomFunctionMappings || (CustomFunctionMappings = {})); +var CustomFunctions; +(function (CustomFunctions) { + function delayInitialization() { + CustomFunctionMappings.__delay__ = true; + } + CustomFunctions.delayInitialization = delayInitialization; + ; + CustomFunctions._association = CustomFunctions._association || new OSF.Association(); + function associate() { + CustomFunctions._association.associate.apply(CustomFunctions._association, arguments); + delete CustomFunctionMappings.__delay__; + } + CustomFunctions.associate = associate; + ; +})(CustomFunctions || (CustomFunctions = {})); +var OSF; +(function (OSF) { + var DDA; + (function (DDA) { + var ErrorCodeManager; + (function (ErrorCodeManager) { + var _errorMappings = {}; + var _isErrorMessagesInitializedFromOfficeString = false; + function getErrorArgs(errorCode) { + if (!_isErrorMessagesInitializedFromOfficeString) { + initializeErrorMessages(Strings.OfficeOM); + } + var errorArgs = _errorMappings[errorCode]; + if (!errorArgs) { + errorArgs = _errorMappings[5001]; + } + else { + if (!errorArgs.name) { + errorArgs.name = _errorMappings[5001].name; + } + if (!errorArgs.message) { + errorArgs.message = _errorMappings[5001].message; + } + } + return errorArgs; + } + ErrorCodeManager.getErrorArgs = getErrorArgs; + function addErrorMessage(errorCode, errorNameMessage) { + _errorMappings[errorCode] = errorNameMessage; + } + ErrorCodeManager.addErrorMessage = addErrorMessage; + function initializeErrorMessages(stringNS) { + _errorMappings[1000] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; + _errorMappings[1001] = { name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; + _errorMappings[1002] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; + _errorMappings[1003] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; + _errorMappings[1004] = { name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; + _errorMappings[1005] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; + _errorMappings[1006] = { name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; + _errorMappings[1008] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; + _errorMappings[1009] = { name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; + _errorMappings[1010] = { name: stringNS.L_DataReadError, message: stringNS.L_GetDataParametersConflict }; + _errorMappings[1011] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetColumns }; + _errorMappings[1012] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRows }; + _errorMappings[1013] = { name: stringNS.L_DataReadError, message: stringNS.L_InvalidReadForBlankRow }; + _errorMappings[2000] = { name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; + _errorMappings[2001] = { name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; + _errorMappings[2002] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; + _errorMappings[2003] = { name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; + _errorMappings[2004] = { name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; + _errorMappings[2005] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; + _errorMappings[2006] = { name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; + _errorMappings[2007] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; + _errorMappings[2008] = { name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; + _errorMappings[2009] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; + _errorMappings[2010] = { name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; + _errorMappings[2011] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetColumns }; + _errorMappings[2012] = { name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetRows }; + _errorMappings[2013] = { name: stringNS.L_DataWriteError, message: stringNS.L_SetDataParametersConflict }; + _errorMappings[3000] = { name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; + _errorMappings[3002] = { name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; + _errorMappings[3003] = { name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; + _errorMappings[3004] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; + _errorMappings[3005] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; + _errorMappings[3006] = { name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; + _errorMappings[3007] = { name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; + _errorMappings[3008] = { name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; + _errorMappings[3009] = { name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; + _errorMappings[3010] = { name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnMatrixData }; + _errorMappings[3011] = { name: stringNS.L_InvalidBinding, message: stringNS.L_InvalidColumnsForBinding }; + _errorMappings[4000] = { name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; + _errorMappings[4001] = { name: stringNS.L_SaveSettingsError, message: stringNS.L_SettingsCannotSave }; + _errorMappings[4002] = { name: stringNS.L_SettingsStaleError, message: stringNS.L_SettingsAreStale }; + _errorMappings[5000] = { name: stringNS.L_HostError, message: stringNS.L_OperationNotSupported }; + _errorMappings[5001] = { name: stringNS.L_InternalError, message: stringNS.L_InternalErrorDescription }; + _errorMappings[5002] = { name: stringNS.L_PermissionDenied, message: stringNS.L_DocumentReadOnly }; + _errorMappings[5003] = { name: stringNS.L_EventRegistrationError, message: stringNS.L_EventHandlerNotExist }; + _errorMappings[5004] = { name: stringNS.L_InvalidAPICall, message: stringNS.L_InvalidApiCallInContext }; + _errorMappings[5005] = { name: stringNS.L_ShuttingDown, message: stringNS.L_ShuttingDown }; + _errorMappings[5007] = { name: stringNS.L_UnsupportedEnumeration, message: stringNS.L_UnsupportedEnumerationMessage }; + _errorMappings[5008] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[5009] = { name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; + _errorMappings[5011] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[5012] = { name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; + _errorMappings[5013] = { name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; + _errorMappings[5015] = { name: stringNS.L_APICallFailed, message: stringNS.L_WorkbookHiddenMessage }; + _errorMappings[5016] = { name: stringNS.L_APICallFailed, message: stringNS.L_WriteNotSupportedWhenModalDialogOpen }; + _errorMappings[5100] = { name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; + _errorMappings[5101] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[5102] = { name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[5103] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestPayloadSizeLimitExceededMessage }; + _errorMappings[5104] = { name: stringNS.L_APICallFailed, message: stringNS.L_ResponsePayloadSizeLimitExceededMessage }; + _errorMappings[6000] = { name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; + _errorMappings[6100] = { name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; + _errorMappings[6101] = { name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; + _errorMappings[6102] = { name: stringNS.L_CustomXmlOutOfDateName, message: stringNS.L_CustomXmlOutOfDateMessage }; + _errorMappings[7000] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[7001] = { name: stringNS.L_CannotNavigateTo, message: stringNS.L_CannotNavigateTo }; + _errorMappings[7002] = { name: stringNS.L_SpecifiedIdNotExist, message: stringNS.L_SpecifiedIdNotExist }; + _errorMappings[7004] = { name: stringNS.L_NavOutOfBound, message: stringNS.L_NavOutOfBound }; + _errorMappings[2014] = { name: stringNS.L_DataWriteReminder, message: stringNS.L_CellDataAmountBeyondLimits }; + _errorMappings[8000] = { name: stringNS.L_MissingParameter, message: stringNS.L_ElementMissing }; + _errorMappings[8001] = { name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[8010] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidCellsValue }; + _errorMappings[8011] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidTableOptionValue }; + _errorMappings[8012] = { name: stringNS.L_InvalidValue, message: stringNS.L_InvalidFormatValue }; + _errorMappings[8020] = { name: stringNS.L_OutOfRange, message: stringNS.L_RowIndexOutOfRange }; + _errorMappings[8021] = { name: stringNS.L_OutOfRange, message: stringNS.L_ColIndexOutOfRange }; + _errorMappings[8022] = { name: stringNS.L_OutOfRange, message: stringNS.L_FormatValueOutOfRange }; + _errorMappings[8023] = { name: stringNS.L_FormattingReminder, message: stringNS.L_CellFormatAmountBeyondLimits }; + _errorMappings[10000] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[11000] = { name: stringNS.L_MemoryLimit, message: stringNS.L_CloseFileBeforeRetrieve }; + _errorMappings[11001] = { name: stringNS.L_NetworkProblem, message: stringNS.L_NetworkProblemRetrieveFile }; + _errorMappings[11002] = { name: stringNS.L_InvalidValue, message: stringNS.L_SliceSizeNotSupported }; + _errorMappings[12007] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAlreadyOpened }; + _errorMappings[12000] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[12001] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[12002] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NetworkProblem }; + _errorMappings[12003] = { name: stringNS.L_DialogNavigateError, message: stringNS.L_DialogInvalidScheme }; + _errorMappings[12004] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAddressNotTrusted }; + _errorMappings[12005] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; + _errorMappings[12009] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; + _errorMappings[12011] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[13000] = { name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[13001] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[13002] = { name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[13003] = { name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[13004] = { name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[13005] = { name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[13006] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[13007] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[13008] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[13009] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[13010] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; + _errorMappings[13012] = { name: stringNS.L_APINotSupported, message: stringNS.L_SSOUnsupportedPlatform }; + _errorMappings[13013] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[5014] = { name: stringNS.L_OperationCancelledError, message: stringNS.L_OperationCancelledErrorMessage }; + _isErrorMessagesInitializedFromOfficeString = true; + } + function getAsyncResult(code) { + if (code == 0) { + return { + status: Office.AsyncResultStatus.Succeeded + }; + } + else { + return { + status: Office.AsyncResultStatus.Failed, + error: { + code: code + } + }; + } + } + })(ErrorCodeManager = DDA.ErrorCodeManager || (DDA.ErrorCodeManager = {})); + })(DDA = OSF.DDA || (OSF.DDA = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var EventDispatch = (function () { + function EventDispatch(args) { + this._eventInfos = {}; + this._queuedEventsArgs = {}; + this._eventHandlers = {}; + this._queuedEventsArgs = {}; + if (args != null) { + for (var i = 0; i < args.length; i++) { + if (typeof args[i] === "string") { + var eventType = args[i]; + this._eventHandlers[eventType] = []; + this._queuedEventsArgs[eventType] = []; + } + else { + var eventType = args[i].type; + this._eventInfos[eventType] = args[i]; + this._eventHandlers[eventType] = []; + this._queuedEventsArgs[eventType] = []; + } + } + } + } + EventDispatch.prototype.getSupportedEvents = function () { + var events = []; + for (var eventName in this._eventHandlers) + events.push(eventName); + return events; + }; + EventDispatch.prototype.supportsEvent = function (event) { + for (var eventName in this._eventHandlers) { + if (event == eventName) + return true; + } + return false; + }; + EventDispatch.prototype.hasEventHandler = function (eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) + return true; + } + } + return false; + }; + EventDispatch.prototype.addEventHandler = function (eventType, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._eventHandlers[eventType]; + if (handlers && !this.hasEventHandler(eventType, handler)) { + handlers.push(handler); + return true; + } + else { + return false; + } + }; + EventDispatch.prototype.addEventHandlerAndFireQueuedEvent = function (eventType, handler) { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = (!handlers || handlers.length == 0); + var succeed = this.addEventHandler(eventType, handler); + if (isFirstHandler && succeed) { + this.fireQueuedEvent(eventType); + } + return succeed; + }; + EventDispatch.prototype.removeEventHandler = function (eventType, handler) { + var handlers = this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var index = 0; index < handlers.length; index++) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + return true; + } + } + } + return false; + }; + EventDispatch.prototype.clearEventHandlers = function (eventType) { + if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { + this._eventHandlers[eventType] = []; + return true; + } + return false; + }; + EventDispatch.prototype.getEventHandlerCount = function (eventType) { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; + }; + EventDispatch.prototype.getEventInfo = function (eventType) { + return this._eventInfos[eventType]; + }; + EventDispatch.prototype.fireEvent = function (eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } + return true; + } + else { + return false; + } + }; + EventDispatch.prototype.fireOrQueueEvent = function (eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length == 0) { + queuedEvents.push(eventArgs); + } + else { + this.fireEvent(eventArgs); + } + return true; + } + else { + return false; + } + }; + EventDispatch.prototype.fireQueuedEvent = function (eventType) { + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if (eventHandlers.length > 0) { + var eventHandler = eventHandlers[0]; + while (queuedEvents.length > 0) { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs); + } + return true; + } + } + return false; + }; + EventDispatch.prototype.clearQueuedEvent = function (eventType) { + if (eventType && this._eventHandlers[eventType]) { + var queuedEvents = this._queuedEventsArgs[eventType]; + if (queuedEvents) { + this._queuedEventsArgs[eventType] = []; + } + } + }; + return EventDispatch; + }()); + OSF.EventDispatch = EventDispatch; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var EventDispId; + (function (EventDispId) { + EventDispId.dispidEventMin = 0; + EventDispId.dispidInitializeEvent = 0; + EventDispId.dispidSettingsChangedEvent = 1; + EventDispId.dispidDocumentSelectionChangedEvent = 2; + EventDispId.dispidBindingSelectionChangedEvent = 3; + EventDispId.dispidBindingDataChangedEvent = 4; + EventDispId.dispidDocumentOpenEvent = 5; + EventDispId.dispidDocumentCloseEvent = 6; + EventDispId.dispidActiveViewChangedEvent = 7; + EventDispId.dispidDocumentThemeChangedEvent = 8; + EventDispId.dispidOfficeThemeChangedEvent = 9; + EventDispId.dispidDialogMessageReceivedEvent = 10; + EventDispId.dispidDialogNotificationShownInAddinEvent = 11; + EventDispId.dispidDialogParentMessageReceivedEvent = 12; + EventDispId.dispidObjectDeletedEvent = 13; + EventDispId.dispidObjectSelectionChangedEvent = 14; + EventDispId.dispidObjectDataChangedEvent = 15; + EventDispId.dispidContentControlAddedEvent = 16; + EventDispId.dispidLiveShareStateChangedEvent = 17; + EventDispId.dispidActivationStatusChangedEvent = 32; + EventDispId.dispidRichApiMessageEvent = 33; + EventDispId.dispidAppCommandInvokedEvent = 39; + EventDispId.dispidDataNodeAddedEvent = 60; + EventDispId.dispidDataNodeReplacedEvent = 61; + EventDispId.dispidDataNodeDeletedEvent = 62; + })(EventDispId = OSF.EventDispId || (OSF.EventDispId = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var EventHelper = (function () { + function EventHelper() { + } + EventHelper.addEventHandler = function (eventType, handler, callback, eventDispatch, asyncContext, isPopupWindow) { + var dispId = 0; + function onEnsureRegistration(status) { + if (status == 0) { + if (!eventDispatch.hasEventHandler(eventType, handler)) { + var added = eventDispatch.addEventHandler(eventType, handler); + if (!added) { + status = 5010; + } + } + } + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + asyncMethodExecutor.invokeCallback(dispId, callback, status, null, asyncContext); + } + var eventInfo = eventDispatch.getEventInfo(eventType); + if (!eventInfo) { + onEnsureRegistration(5010); + return; + } + try { + if (isPopupWindow) { + onEnsureRegistration(0); + return; + } + dispId = eventInfo.id; + var targetId = eventInfo.getTargetId(); + var count = eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + asyncMethodExecutor.registerEventAsync(dispId, eventInfo.type, targetId, function (eventArgs) { + eventDispatch.fireEvent(eventArgs); + }, eventInfo, function (result) { + onEnsureRegistration(OSF.Utility.getErrorCodeFromAsyncResult(result)); + }, asyncContext); + } + else { + onEnsureRegistration(0); + } + } + catch (ex) { + EventHelper.onException(dispId, ex, callback); + } + }; + EventHelper.removeEventHandler = function (eventType, handler, callback, eventDispatch, asyncContext, isPopupWindow) { + var dispId = 0; + function onEnsureRegistration(status) { + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + asyncMethodExecutor.invokeCallback(dispId, callback, status, null, asyncContext); + } + var eventInfo = eventDispatch.getEventInfo(eventType); + if (!eventInfo) { + onEnsureRegistration(5010); + return; + } + try { + dispId = eventInfo.id; + var targetId = eventInfo.getTargetId(); + var status_1 = 0; + var removeSuccess = true; + if (handler === null) { + removeSuccess = eventDispatch.clearEventHandlers(eventType); + status_1 = 0; + } + else { + removeSuccess = eventDispatch.removeEventHandler(eventType, handler); + status_1 = removeSuccess ? 0 : 5003; + } + var count = eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + asyncMethodExecutor.unregisterEventAsync(dispId, eventInfo.type, targetId, function (result) { + onEnsureRegistration(OSF.Utility.getErrorCodeFromAsyncResult(result)); + }, asyncContext); + } + else { + onEnsureRegistration(status_1); + } + } + catch (ex) { + EventHelper.onException(dispId, ex, callback); + } + }; + EventHelper.onException = function (dispId, ex, callback) { + if (typeof ex == "number") { + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + asyncMethodExecutor.invokeCallback(dispId, callback, ex, null); + } + else { + throw ex; + } + }; + return EventHelper; + }()); + OSF.EventHelper = EventHelper; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var EventType; + (function (EventType) { + EventType.ActiveViewChanged = "activeViewChanged"; + EventType.AppCommandInvoked = "appCommandInvoked"; + EventType.RichApiMessage = "richApiMessage"; + EventType.DocumentSelectionChanged = "documentSelectionChanged"; + EventType.BindingSelectionChanged = "bindingSelectionChanged"; + EventType.BindingDataChanged = "bindingDataChanged"; + EventType.OfficeThemeChanged = "officeThemeChanged"; + EventType.DocumentThemeChanged = "documentThemeChanged"; + EventType.LiveShareStateChanged = "liveShareStateChanged"; + EventType.DataNodeDeleted = "nodeDeleted"; + EventType.DataNodeInserted = "nodeInserted"; + EventType.DataNodeReplaced = "nodeReplaced"; + EventType.DialogMessageReceived = "dialogMessageReceived"; + EventType.DialogParentMessageReceived = "dialogParentMessageReceived"; + EventType.DialogParentEventReceived = "dialogParentEventReceived"; + EventType.DialogEventReceived = "dialogEventReceived"; + EventType.NodeDeleted = "nodeDeleted"; + EventType.NodeInserted = "nodeInserted"; + EventType.NodeReplaced = "nodeReplaced"; + EventType.SettingsChanged = "settingsChanged"; + })(EventType = OSF.EventType || (OSF.EventType = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var HostName; + (function (HostName) { + var Host = (function () { + function Host() { + this.platformRemappings = { + web: Office.PlatformType.OfficeOnline, + winrt: Office.PlatformType.Universal, + win32: Office.PlatformType.PC, + mac: Office.PlatformType.Mac, + ios: Office.PlatformType.iOS, + android: Office.PlatformType.Android + }; + this.camelCaseMappings = { + powerpoint: Office.HostType.PowerPoint, + onenote: Office.HostType.OneNote + }; + this.hostInfo = OSF._OfficeAppFactory.getHostInfo(); + } + Host.prototype.capitalizeFirstLetter = function (input) { + if (input) { + return (input[0].toUpperCase() + input.slice(1).toLowerCase()); + } + return input; + }; + Host.getInstance = function () { + if (Host.hostObj === undefined) { + Host.hostObj = new Host(); + } + return Host.hostObj; + }; + Host.prototype.getPlatform = function (appNumber) { + if (this.hostInfo && this.hostInfo.hostPlatform) { + var hostPlatform = this.hostInfo.hostPlatform.toLowerCase(); + if (this.platformRemappings[hostPlatform]) { + return this.platformRemappings[hostPlatform]; + } + } + return null; + }; + Host.prototype.getHost = function (appNumber) { + if (this.hostInfo && this.hostInfo.hostType) { + var hostType = this.hostInfo.hostType.toLowerCase(); + if (this.camelCaseMappings[hostType]) { + return this.camelCaseMappings[hostType]; + } + hostType = this.capitalizeFirstLetter(this.hostInfo.hostType); + if (Office.HostType[hostType]) { + return Office.HostType[hostType]; + } + } + return null; + }; + Host.prototype.getDefaultVersion = function () { + if (this.getHost()) { + return "16.0.0000.0000"; + } + return null; + }; + Host.prototype.getDiagnostics = function (version) { + var diagnostics = { + host: this.getHost(), + version: (version || this.getDefaultVersion()), + platform: this.getPlatform() + }; + return diagnostics; + }; + return Host; + }()); + HostName.Host = Host; + })(HostName = OSF.HostName || (OSF.HostName = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var HostInfoFlags; + (function (HostInfoFlags) { + HostInfoFlags[HostInfoFlags["SharedApp"] = 1] = "SharedApp"; + HostInfoFlags[HostInfoFlags["CustomFunction"] = 2] = "CustomFunction"; + HostInfoFlags[HostInfoFlags["ProtectedDocDisable"] = 4] = "ProtectedDocDisable"; + HostInfoFlags[HostInfoFlags["ExperimentJsEnabled"] = 8] = "ExperimentJsEnabled"; + HostInfoFlags[HostInfoFlags["PublicAddin"] = 16] = "PublicAddin"; + HostInfoFlags[HostInfoFlags["BundleJsEnabled"] = 32] = "BundleJsEnabled"; + HostInfoFlags[HostInfoFlags["IsMos"] = 64] = "IsMos"; + HostInfoFlags[HostInfoFlags["IsMonarch"] = 128] = "IsMonarch"; + })(HostInfoFlags = OSF.HostInfoFlags || (OSF.HostInfoFlags = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var HostInfoHostType; + (function (HostInfoHostType) { + HostInfoHostType["excel"] = "excel"; + HostInfoHostType["word"] = "word"; + })(HostInfoHostType = OSF.HostInfoHostType || (OSF.HostInfoHostType = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var HostInfoPlatform; + (function (HostInfoPlatform) { + HostInfoPlatform["web"] = "web"; + HostInfoPlatform["winrt"] = "winrt"; + HostInfoPlatform["win32"] = "win32"; + HostInfoPlatform["mac"] = "mac"; + HostInfoPlatform["ios"] = "ios"; + HostInfoPlatform["android"] = "android"; + })(HostInfoPlatform = OSF.HostInfoPlatform || (OSF.HostInfoPlatform = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var InitializationHelper = (function () { + function InitializationHelper(hostInfo, webAppState, context, hostFacade) { + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._hostFacade = hostFacade; + } + ; + InitializationHelper.prototype.saveAndSetDialogInfo = function (hostInfoValue) { + }; + InitializationHelper.prototype.setAgaveHostCommunication = function () { + }; + InitializationHelper.prototype.createClientHostController = function () { + return null; + }; + InitializationHelper.prototype.createAsyncMethodExecutor = function () { + return null; + }; + InitializationHelper.prototype.createClientSettingsManager = function () { + return null; + }; + InitializationHelper.prototype.createSettings = function (serializedSettings) { + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if (storageSettings) { + serializedSettings = JSON.parse(storageSettings); + } + else { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + } + var deserializedSettings = OSF.OUtil.deserializeSettings(serializedSettings); + var clientSettingsManager = this.createClientSettingsManager(); + var settings = new Office.Settings(deserializedSettings, clientSettingsManager); + return settings; + }; + InitializationHelper.prototype.prepareApiSurface = function (officeAppContext) { + var featureGates = officeAppContext.get_featureGates(); + if (featureGates) { + Microsoft.Office.WebExtension.FeatureGates = featureGates; + } + if (OSF.BootStrapExtension.prepareApiSurface) { + OSF.BootStrapExtension.prepareApiSurface(); + } + if (OSF.BootStrapExtension.prepareHostSpecificSurface) { + OSF.BootStrapExtension.prepareHostSpecificSurface(); + } + OSFPerformance.createOMEnd = OSFPerformance.now(); + }; + InitializationHelper.prototype.getTabbableElements = function () { + return null; + }; + return InitializationHelper; + }()); + OSF.InitializationHelper = InitializationHelper; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var InitializationReason; + (function (InitializationReason) { + InitializationReason["Inserted"] = "inserted"; + InitializationReason["DocumentOpened"] = "documentOpened"; + })(InitializationReason = OSF.InitializationReason || (OSF.InitializationReason = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var LoadScriptHelper; + (function (LoadScriptHelper) { + var _scriptInfo; + var _officeScriptBase = ['excel', 'word', 'powerpoint', 'outlook', 'office-common', 'office.common', 'office']; + var _officeScriptSuffix = ['.js', '.debug.js']; + var _osfDisableHostCheck = "_osfDisableHostCheck"; + function getHostBundleJsBasePath() { + ensureScriptInfo(); + return _scriptInfo.basePath; + } + LoadScriptHelper.getHostBundleJsBasePath = getHostBundleJsBasePath; + function getHostBundleJsName() { + ensureScriptInfo(); + return _scriptInfo.name; + } + LoadScriptHelper.getHostBundleJsName = getHostBundleJsName; + function getOfficeStringJsName() { + ensureScriptInfo(); + return _scriptInfo.isDebugJs ? OSF.ConstantNames.OfficeStringDebugJS : OSF.ConstantNames.OfficeStringJS; + } + LoadScriptHelper.getOfficeStringJsName = getOfficeStringJsName; + function isSdx() { + ensureScriptInfo(); + return _scriptInfo.isSdx; + } + LoadScriptHelper.isSdx = isSdx; + function disableHostCheck() { + ensureScriptInfo(); + return _scriptInfo.disableHostCheck; + } + LoadScriptHelper.disableHostCheck = disableHostCheck; + function ensureScriptInfo() { + if (_scriptInfo) { + return; + } + var getScriptBase = function (scriptElem, scriptSrc, scriptNameToCheck) { + var scriptSrcLowerCase = scriptSrc.toLowerCase(); + var indexOfJS = scriptSrcLowerCase.indexOf(scriptNameToCheck); + if (indexOfJS >= 0 && + (indexOfJS === 0 || scriptSrc.charAt(indexOfJS - 1) === '/' || scriptSrc.charAt(indexOfJS - 1) === '\\') && + (indexOfJS + scriptNameToCheck.length === scriptSrc.length || scriptSrc.charAt(indexOfJS + scriptNameToCheck.length) === '?')) { + var scriptBase = scriptSrc.substring(0, indexOfJS); + var isDebugJs = scriptSrcLowerCase.indexOf(".debug.js", indexOfJS) > 0; + var attr = scriptElem.getAttribute("data-is-sdx"); + var isSdx_1 = (attr === "1" || attr == "true"); + var disableHostCheck_1 = window.hasOwnProperty(_osfDisableHostCheck) && window[_osfDisableHostCheck] === true; + return { basePath: scriptBase, name: scriptNameToCheck, isDebugJs: isDebugJs, isSdx: isSdx_1, disableHostCheck: disableHostCheck_1 }; + } + return null; + }; + var scripts = document.getElementsByTagName("script"); + var scriptsCount = scripts.length; + for (var i = 0; i < scriptsCount; i++) { + if (scripts[i].src) { + for (var j = 0; j < _officeScriptBase.length; j++) { + for (var k = 0; k < _officeScriptSuffix.length; k++) { + _scriptInfo = getScriptBase(scripts[i], scripts[i].src, _officeScriptBase[j] + _officeScriptSuffix[k]); + if (_scriptInfo) { + return; + } + } + } + } + } + _scriptInfo = { + basePath: "", + name: "", + isDebugJs: false, + isSdx: false, + disableHostCheck: false, + }; + } + function loadScriptWithBasename(baseName, callback, timeoutInMs) { + ensureScriptInfo(); + var fileName = baseName + (_scriptInfo.isDebugJs ? ".debug.js" : ".js"); + fileName = fileName.toLowerCase(); + var url = _scriptInfo.basePath + fileName; + OSF.OUtil.loadScript(url, callback); + } + LoadScriptHelper.loadScriptWithBasename = loadScriptWithBasename; + })(LoadScriptHelper = OSF.LoadScriptHelper || (OSF.LoadScriptHelper = {})); +})(OSF || (OSF = {})); +var Microsoft; +(function (Microsoft) { + var Office; + (function (Office) { + var WebExtension; + (function (WebExtension) { + WebExtension.FeatureGates = {}; + WebExtension.EventType = OSF.EventType; + function sendTelemetryEvent(telemetryEvent) { + OTel.OTelLogger.sendTelemetryEvent(telemetryEvent); + } + WebExtension.sendTelemetryEvent = sendTelemetryEvent; + })(WebExtension = Office.WebExtension || (Office.WebExtension = {})); + })(Office = Microsoft.Office || (Microsoft.Office = {})); +})(Microsoft || (Microsoft = {})); +var Office; +(function (Office) { + var LiveShareStateParams; + (function (LiveShareStateParams) { + LiveShareStateParams[LiveShareStateParams["MaxLiveShareStateDataSizeInBytes"] = 1024] = "MaxLiveShareStateDataSizeInBytes"; + })(LiveShareStateParams = Office.LiveShareStateParams || (Office.LiveShareStateParams = {})); + var LiveShareState = (function () { + function LiveShareState(liveShareState) { + var _this = this; + liveShareState = liveShareState || null; + this._liveShareState = liveShareState; + this._eventDispatch = new OSF.EventDispatch([ + { + id: OSF.EventDispId.dispidLiveShareStateChangedEvent, + type: OSF.EventType.LiveShareStateChanged, + getTargetId: function () { return ''; }, + fromSafeArrayHost: function (payload) { + return { + type: OSF.EventType.LiveShareStateChanged, + liveShareState: _this + }; + }, + fromWebHost: function (payload) { + return { + type: OSF.EventType.LiveShareStateChanged, + liveShareState: _this + }; + } + } + ]); + } + LiveShareState.prototype.get = function () { + return this._liveShareState; + }; + LiveShareState.prototype.set = function (stateData) { + if ((new TextEncoder().encode(stateData)).length > LiveShareStateParams.MaxLiveShareStateDataSizeInBytes) + throw new Error("State data size is limited to " + LiveShareStateParams.MaxLiveShareStateDataSizeInBytes + " bytes."); + this._liveShareState = stateData; + }; + LiveShareState.prototype.addHandlerAsync = function (eventType, handler, callback) { + OSF.EventHelper.addEventHandler(eventType, handler, callback, this._eventDispatch); + }; + LiveShareState.prototype.removeHandlerAsync = function (eventType, handler, callback) { + OSF.EventHelper.removeEventHandler(eventType, handler, callback, this._eventDispatch); + }; + return LiveShareState; + }()); + Office.LiveShareState = LiveShareState; +})(Office || (Office = {})); +var OSF; +(function (OSF) { + var SupportedLocales = { + "ar-sa": true, + "bg-bg": true, + "bn-in": true, + "ca-es": true, + "cs-cz": true, + "da-dk": true, + "de-de": true, + "el-gr": true, + "en-us": true, + "es-es": true, + "et-ee": true, + "eu-es": true, + "fa-ir": true, + "fi-fi": true, + "fr-fr": true, + "gl-es": true, + "he-il": true, + "hi-in": true, + "hr-hr": true, + "hu-hu": true, + "id-id": true, + "it-it": true, + "ja-jp": true, + "kk-kz": true, + "ko-kr": true, + "lo-la": true, + "lt-lt": true, + "lv-lv": true, + "ms-my": true, + "nb-no": true, + "nl-nl": true, + "nn-no": true, + "pl-pl": true, + "pt-br": true, + "pt-pt": true, + "ro-ro": true, + "ru-ru": true, + "sk-sk": true, + "sl-si": true, + "sr-cyrl-cs": true, + "sr-cyrl-rs": true, + "sr-latn-cs": true, + "sr-latn-rs": true, + "sv-se": true, + "th-th": true, + "tr-tr": true, + "uk-ua": true, + "ur-pk": true, + "vi-vn": true, + "zh-cn": true, + "zh-tw": true + }; + var AssociatedLocales = { + ar: "ar-sa", + bg: "bg-bg", + bn: "bn-in", + ca: "ca-es", + cs: "cs-cz", + da: "da-dk", + de: "de-de", + el: "el-gr", + en: "en-us", + es: "es-es", + et: "et-ee", + eu: "eu-es", + fa: "fa-ir", + fi: "fi-fi", + fr: "fr-fr", + gl: "gl-es", + he: "he-il", + hi: "hi-in", + hr: "hr-hr", + hu: "hu-hu", + id: "id-id", + it: "it-it", + ja: "ja-jp", + kk: "kk-kz", + ko: "ko-kr", + lo: "lo-la", + lt: "lt-lt", + lv: "lv-lv", + ms: "ms-my", + nb: "nb-no", + nl: "nl-nl", + nn: "nn-no", + pl: "pl-pl", + pt: "pt-br", + ro: "ro-ro", + ru: "ru-ru", + sk: "sk-sk", + sl: "sl-si", + sr: "sr-cyrl-cs", + sv: "sv-se", + th: "th-th", + tr: "tr-tr", + uk: "uk-ua", + ur: "ur-pk", + vi: "vi-vn", + zh: "zh-cn" + }; + function getSupportedLocale(locale, defaultLocale) { + if (defaultLocale === void 0) { defaultLocale = "en-us"; } + if (!locale) { + return defaultLocale; + } + var supportedLocale; + locale = locale.toLowerCase(); + if (locale in SupportedLocales) { + supportedLocale = locale; + } + else { + var localeParts = locale.split('-', 1); + if (localeParts && localeParts.length > 0) { + supportedLocale = AssociatedLocales[localeParts[0]]; + } + } + if (!supportedLocale) { + supportedLocale = defaultLocale; + } + return supportedLocale; + } + OSF.getSupportedLocale = getSupportedLocale; +})(OSF || (OSF = {})); +var Strings; +(function (Strings) { + var OfficeOM; + (function (OfficeOM) { + })(OfficeOM = Strings.OfficeOM || (Strings.OfficeOM = {})); +})(Strings || (Strings = {})); +var OSF; +(function (OSF) { + var OUtil; + (function (OUtil) { + var officeStringsJsLoadPromise; + function ensureOfficeStringsJs() { + if (!officeStringsJsLoadPromise) { + officeStringsJsLoadPromise = new Office.Promise(function (resolve, reject) { + if (!OSF._OfficeAppFactory.getHostInfo().hostLocale) { + reject(new Error("No host locale")); + return; + } + var url = OSF.LoadScriptHelper.getHostBundleJsBasePath() + OSF._OfficeAppFactory.getHostInfo().hostLocale + "/" + OSF.LoadScriptHelper.getOfficeStringJsName(); + OSF.OUtil.loadScript(url, function (success) { + if (success) { + resolve(); + } + else { + var fallbackUrl = OSF.LoadScriptHelper.getHostBundleJsBasePath() + OSF.ConstantNames.DefaultLocale + "/" + OSF.LoadScriptHelper.getOfficeStringJsName(); + OUtil.loadScript(fallbackUrl, function (fallbackUrlSuccess) { + if (fallbackUrlSuccess) { + resolve(); + } + else { + reject(new Error("Cannot load " + OSF.ConstantNames.OfficeStringJS)); + } + }); + } + }); + }); + } + return officeStringsJsLoadPromise; + } + OUtil.ensureOfficeStringsJs = ensureOfficeStringsJs; + })(OUtil = OSF.OUtil || (OSF.OUtil = {})); +})(OSF || (OSF = {})); +var Office; +(function (Office) { + var context; + (function (context) { + var document; + (function (document) { + function get_url() { + return OSF._OfficeAppFactory.getOfficeAppContext().get_docUrl(); + } + OSF.definePropertyOnNamespace(document, 'url', get_url); + function get_mode() { + var clientMode = OSF._OfficeAppFactory.getOfficeAppContext().get_clientMode(); + if (clientMode == 0) { + return Office.DocumentMode.ReadOnly; + } + return Office.DocumentMode.ReadWrite; + } + OSF.definePropertyOnNamespace(document, 'mode', get_mode); + var _settings; + function get_settings() { + if (!_settings) { + var settingsFunc = OSF._OfficeAppFactory.getOfficeAppContext().get_settingsFunc(); + var serializedSettings = settingsFunc(); + _settings = OSF._OfficeAppFactory.getInitializationHelper().createSettings(serializedSettings); + } + return _settings; + } + OSF.definePropertyOnNamespace(document, 'settings', get_settings); + function goToByIdAsync(id, goToType, arg1, arg2) { + var goToTypeMap = {}; + goToTypeMap[Office.GoToType.Binding] = 0; + goToTypeMap[Office.GoToType.NamedItem] = 1; + goToTypeMap[Office.GoToType.Slide] = 2; + goToTypeMap[Office.GoToType.Index] = 3; + var selectionModeMap = {}; + selectionModeMap[Office.SelectionMode.Default] = 0; + selectionModeMap[Office.SelectionMode.Selected] = 1; + selectionModeMap[Office.SelectionMode.None] = 2; + var goToTypeHostValue = goToTypeMap[goToType]; + var selectionModeHostValue = 0; + var callback = arg2; + if (typeof arg1 === "function") { + callback = arg1; + } + else if (typeof arg1 !== "undefined") { + selectionModeHostValue = selectionModeMap[arg1]; + } + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + var dataTransform = { + toSafeArrayHost: function () { + return [id, goToTypeHostValue, selectionModeHostValue]; + }, + fromSafeArrayHost: function (payload) { + return payload; + }, + toWebHost: function () { + var navigationRequestParam = { + Id: id, + GoToType: goToTypeHostValue, + SelectionMode: selectionModeHostValue + }; + var obj = { + DdaGoToByIdMethod: navigationRequestParam + }; + return obj; + }, + fromWebHost: function (payload) { + return payload; + } + }; + asyncMethodExecutor.executeAsync(82, dataTransform, callback); + } + document.goToByIdAsync = goToByIdAsync; + })(document = context.document || (context.document = {})); + })(context = Office.context || (Office.context = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var context; + (function (context) { + var messaging; + (function (messaging) { + function sendMessage(message) { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.hostPlatform == OSF.HostInfoPlatform.web) { + var webAppState = OSF._OfficeAppFactory.getWebAppState(); + webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [webAppState.id, OSF.AgaveHostAction.SendMessage, message]); + } + else { + throw OSF.Utility.createNotImplementedException(); + } + } + messaging.sendMessage = sendMessage; + })(messaging = context.messaging || (context.messaging = {})); + })(context = Office.context || (Office.context = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var context; + (function (context) { + function get_contentLanguage() { + return OSF._OfficeAppFactory.getOfficeAppContext().get_dataLocale(); + } + OSF.definePropertyOnNamespace(context, 'contentLanguage', get_contentLanguage); + function get_displayLanguage() { + return OSF._OfficeAppFactory.getOfficeAppContext().get_appUILocale(); + } + OSF.definePropertyOnNamespace(context, 'displayLanguage', get_displayLanguage); + function get_isDialog() { + return OSF._OfficeAppFactory.getHostInfo().isDialog; + } + OSF.definePropertyOnNamespace(context, 'isDialog', get_isDialog); + function get_touchEnabled() { + return OSF._OfficeAppFactory.getOfficeAppContext().get_touchEnabled(); + } + OSF.definePropertyOnNamespace(context, 'touchEnabled', get_touchEnabled); + function get_commerceAllowed() { + return OSF._OfficeAppFactory.getOfficeAppContext().get_commerceAllowed(); + } + OSF.definePropertyOnNamespace(context, 'commerceAllowed', get_commerceAllowed); + function get_host() { + return OSF.HostName.Host.getInstance().getHost(); + } + OSF.definePropertyOnNamespace(context, 'host', get_host); + function get_platform() { + return OSF.HostName.Host.getInstance().getPlatform(); + } + OSF.definePropertyOnNamespace(context, 'platform', get_platform); + function get_diagnostics() { + return OSF.HostName.Host.getInstance().getDiagnostics(OSF._OfficeAppFactory.getOfficeAppContext().get_hostFullVersion()); + } + OSF.definePropertyOnNamespace(context, 'diagnostics', get_diagnostics); + var _requirements; + function get_requirements() { + if (!_requirements) { + var appContext = OSF._OfficeAppFactory.getOfficeAppContext(); + if (appContext) { + if (appContext.get_isDialog()) { + _requirements = OSF.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(appContext); + } + else { + _requirements = OSF.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(appContext); + } + } + } + return _requirements; + } + OSF.definePropertyOnNamespace(context, 'requirements', get_requirements); + function get_officeTheme() { + var func = OSF._OfficeAppFactory.getOfficeAppContext().get_officeThemeFunc(); + if (func) { + if (typeof (func) === "function") { + return func(); + } + else { + return func; + } + } + else { + return undefined; + } + } + OSF.definePropertyOnNamespace(context, 'officeTheme', get_officeTheme); + OSF.definePropertyOnNamespace(context, 'webAuth', function () { + if (OSF.DDA.WebAuth) { + return OSF.DDA.WebAuth; + } + return undefined; + }); + function get_license() { + return OSF._OfficeAppFactory.getOfficeAppContext().get_eToken(); + } + OSF.definePropertyOnNamespace(context, 'license', get_license); + var _hostSettings; + function get_HostSettings() { + if (!_hostSettings) { + var hostSettingsFunc = OSF._OfficeAppFactory.getOfficeAppContext().get_hostSettingsFunc(); + if (hostSettingsFunc !== undefined) { + var serializedHostSettings = hostSettingsFunc(); + var deserializedSettings = OSF.OUtil.deserializeSettings(serializedHostSettings); + _hostSettings = new Office.Settings(deserializedSettings, undefined); + } + } + return _hostSettings; + } + OSF.definePropertyOnNamespace(context, 'hostSettings', get_HostSettings); + })(context = Office.context || (Office.context = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var context; + (function (context) { + var ribbonGallery; + (function (ribbonGallery) { + function refreshRibbon(params) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [OSF._OfficeAppFactory.getWebAppState().id, OSF.AgaveHostAction.RefreshRibbonGallery, params]); + } + ribbonGallery.refreshRibbon = refreshRibbon; + })(ribbonGallery = context.ribbonGallery || (context.ribbonGallery = {})); + })(context = Office.context || (Office.context = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var context; + (function (context) { + var ui; + (function (ui) { + var taskPaneAction; + (function (taskPaneAction) { + })(taskPaneAction = ui.taskPaneAction || (ui.taskPaneAction = {})); + })(ui = context.ui || (context.ui = {})); + })(context = Office.context || (Office.context = {})); +})(Office || (Office = {})); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var Office; +(function (Office) { + Office._officeOnReadyState = Office._officeOnReadyState || { + isOfficeOnReadyCalled: false, + officeOnReadyPromise: null, + officeOnReadyPromiseResolve: null, + officeOnReadyCallbacks: [], + officeOnReadyHostAndPlatformInfo: null, + officeOnReadyFired: false + }; + Office.initialize = Office.initialize; + function ensureOfficeOnReadyPromise() { + if (!Office._officeOnReadyState.officeOnReadyPromise) { + Office._officeOnReadyState.officeOnReadyPromise = new Office.Promise(function (resolve, reject) { + Office._officeOnReadyState.officeOnReadyPromiseResolve = resolve; + }); + } + } + function onReadyInternal(callback) { + ensureOfficeOnReadyPromise(); + if (callback) { + if (Office._officeOnReadyState.officeOnReadyFired) { + callback(Office._officeOnReadyState.officeOnReadyHostAndPlatformInfo); + } + else { + Office._officeOnReadyState.officeOnReadyCallbacks.push(callback); + } + } + return Office._officeOnReadyState.officeOnReadyPromise; + } + Office.onReadyInternal = onReadyInternal; + function onReady(callback) { + Office._officeOnReadyState.isOfficeOnReadyCalled = true; + return onReadyInternal(callback); + } + Office.onReady = onReady; + function fireOnReady(hostAndPlatformInfo) { + ensureOfficeOnReadyPromise(); + Office._officeOnReadyState.officeOnReadyHostAndPlatformInfo = __assign({}, hostAndPlatformInfo); + Office._officeOnReadyState.officeOnReadyFired = true; + OSFPerformance.officeOnReady = OSFPerformance.now(); + while (Office._officeOnReadyState.officeOnReadyCallbacks.length > 0) { + Office._officeOnReadyState.officeOnReadyCallbacks.shift()(Office._officeOnReadyState.officeOnReadyHostAndPlatformInfo); + } + Office._officeOnReadyState.officeOnReadyPromiseResolve(Office._officeOnReadyState.officeOnReadyHostAndPlatformInfo); + if (!Office._officeOnReadyState.isOfficeOnReadyCalled) { + OSF.OUtil.waitForFunction(function () { return (typeof (Office.initialize) === 'function'); }, function (initializedDeclared) { + if (initializedDeclared) { + Office.initialize(OSF._OfficeAppFactory.getOfficeAppContext().get_reason()); + } + }, 400, 50); + } + } + Office.fireOnReady = fireOnReady; +})(Office || (Office = {})); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var Office; +(function (Office) { + function sendTelemetryEvent(telemetryEvent) { + Microsoft.Office.WebExtension.sendTelemetryEvent(telemetryEvent); + } + Office.sendTelemetryEvent = sendTelemetryEvent; + function isTrustedHost() { + return __awaiter(this, void 0, void 0, function () { + var hostInfo, clientEndPoint_1, parsedHostname, isHttps, domainRegex, e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 6, , 7]); + hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (!(hostInfo.hostPlatform !== OSF.HostInfoPlatform.web)) return [3, 2]; + return [4, Office.onReady()]; + case 1: + _a.sent(); + return [2, true]; + case 2: + clientEndPoint_1 = OSF._OfficeAppFactory.getWebAppState().clientEndPoint; + if (clientEndPoint_1 != null && clientEndPoint_1.fHostTrusted) { + return [2, true]; + } + if (document.referrer != null) { + parsedHostname = OSF.OUtil.parseUrl(document.referrer, false); + isHttps = parsedHostname.protocol == "https:"; + if (isHttps && OSF.XdmCommunicationManager.isHostNameValidWacDomain(parsedHostname.hostname)) { + domainRegex = new RegExp("^" + document.domain.replace(new RegExp("\\.", "g"), "\\.") + "$"); + if (!domainRegex.test(parsedHostname.hostname)) { + return [2, true]; + } + } + } + if (!(clientEndPoint_1 != null)) return [3, 4]; + return [4, OSF.Utility.promisify(function (callback) { + clientEndPoint_1.invoke("ContextActivationManager_getAppContextAsync", callback, OSF._OfficeAppFactory.getWebAppState().id); + }, 10000)]; + case 3: + _a.sent(); + return [2, true]; + case 4: return [2, false]; + case 5: return [3, 7]; + case 6: + e_1 = _a.sent(); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at Office.isTrustedHost." + e_1); + } + return [2, false]; + case 7: return [2]; + } + }); + }); + } + Office.isTrustedHost = isTrustedHost; + Microsoft.Office.WebExtension.onReadyInternal = Office.onReadyInternal; +})(Office || (Office = {})); +var OSF; +(function (OSF) { + var OfficeAppContext = (function () { + function OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settingsFunc, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix, featureGates, officeThemeFunc, initialDisplayMode, isFromWacAutomation, wopiHostOriginForSingleSignOn, hostSettingsFunc, isWeb) { + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settingsFunc = settingsFunc; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = OSF.OUtil.isDialog(); + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this._featureGates = featureGates; + this._officeThemeFunc = officeThemeFunc; + this._initialDisplayMode = initialDisplayMode; + this._isFromWacAutomation = isFromWacAutomation; + this._wopiHostOriginForSingleSignOn = wopiHostOriginForSingleSignOn; + this._hostSettingsFunc = hostSettingsFunc; + this._isWeb = isWeb; + } + OfficeAppContext.prototype.get_id = function () { + return this._id; + }; + OfficeAppContext.prototype.get_appName = function () { + return this._appName; + }; + OfficeAppContext.prototype.get_appVersion = function () { + return this._appVersion; + }; + OfficeAppContext.prototype.get_appUILocale = function () { + return this._appUILocale; + }; + OfficeAppContext.prototype.get_dataLocale = function () { return this._dataLocale; }; + OfficeAppContext.prototype.get_docUrl = function () { return this._docUrl; }; + OfficeAppContext.prototype.get_clientMode = function () { + if (this._isWeb) { + return this._clientMode; + } + else { + if (this._clientMode == 0) { + return Office.DocumentMode.ReadWrite; + } + return Office.DocumentMode.ReadOnly; + } + }; + OfficeAppContext.prototype.get_settingsFunc = function () { return this._settingsFunc; }; + OfficeAppContext.prototype.get_reason = function () { return this._reason; }; + OfficeAppContext.prototype.get_osfControlType = function () { return this._osfControlType; }; + OfficeAppContext.prototype.get_eToken = function () { return this._eToken; }; + OfficeAppContext.prototype.get_correlationId = function () { return this._correlationId; }; + OfficeAppContext.prototype.get_appInstanceId = function () { return this._appInstanceId; }; + OfficeAppContext.prototype.get_touchEnabled = function () { return this._touchEnabled; }; + OfficeAppContext.prototype.get_commerceAllowed = function () { return this._commerceAllowed; }; + OfficeAppContext.prototype.get_appMinorVersion = function () { return this._appMinorVersion; }; + OfficeAppContext.prototype.get_requirementMatrix = function () { return this._requirementMatrix; }; + OfficeAppContext.prototype.get_dialogRequirementMatrix = function () { return this._dialogRequirementMatrix; }; + OfficeAppContext.prototype.get_hostCustomMessage = function () { return this._hostCustomMessage; }; + OfficeAppContext.prototype.get_hostFullVersion = function () { return this._hostFullVersion; }; + OfficeAppContext.prototype.get_isDialog = function () { return this._isDialog; }; + OfficeAppContext.prototype.get_clientWindowHeight = function () { return this._clientWindowHeight; }; + OfficeAppContext.prototype.get_clientWindowWidth = function () { return this._clientWindowWidth; }; + OfficeAppContext.prototype.get_addinName = function () { return this._addinName; }; + OfficeAppContext.prototype.get_appDomains = function () { return this._appDomains; }; + OfficeAppContext.prototype.get_taskpaneUrl = function () { return this._taskpaneUrl; }; + OfficeAppContext.prototype.set_taskpaneUrl = function (taskpaneUrl) { this._taskpaneUrl = taskpaneUrl; }; + OfficeAppContext.prototype.get_featureGates = function () { return this._featureGates; }; + OfficeAppContext.prototype.get_officeThemeFunc = function () { return this._officeThemeFunc; }; + OfficeAppContext.prototype.get_initialDisplayMode = function () { return this._initialDisplayMode ? this._initialDisplayMode : 0; }; + OfficeAppContext.prototype.get_isFromWacAutomation = function () { return this._isFromWacAutomation; }; + OfficeAppContext.prototype.get_wopiHostOriginForSingleSignOn = function () { return this._wopiHostOriginForSingleSignOn; }; + OfficeAppContext.prototype.get_hostSettingsFunc = function () { return this._hostSettingsFunc; }; + OfficeAppContext.prototype.get_isWeb = function () { return this._isWeb; }; + return OfficeAppContext; + }()); + OSF.OfficeAppContext = OfficeAppContext; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var _OfficeAppFactory; + (function (_OfficeAppFactory) { + function retrieveHostInfo() { + var hostInfo = { + isO15: true, + isRichClient: true, + hostType: "", + hostPlatform: "", + hostSpecificFileVersion: "", + hostLocale: "", + osfControlAppCorrelationId: "", + isDialog: false, + disableLogging: false, + flags: 0 + }; + var hostInfoParaName = "_host_Info"; + var hostInfoValue = OSF.Utility.getQueryStringValue(hostInfoParaName); + if (!hostInfoValue) { + try { + var windowName = window.name; + if (windowName) { + var windowNameObj = JSON.parse(windowName); + hostInfoValue = windowNameObj ? windowNameObj["hostInfo"] : null; + } + } + catch (ex) { + OSF.Utility.log(JSON.stringify(ex)); + } + } + if (!hostInfoValue) { + try { + window.external = window.external || {}; + if (typeof agaveHost !== "undefined" && agaveHost.GetHostInfo) { + window.external.GetHostInfo = function () { + return agaveHost.GetHostInfo(); + }; + } + if (window.external.GetHostInfo) { + var fallbackHostInfo = window.external.GetHostInfo(); + if (fallbackHostInfo == "isDialog") { + hostInfo.isO15 = true; + hostInfo.isDialog = true; + } + else { + var hostInfoParts = fallbackHostInfo.split(hostInfoParaName + "="); + if (hostInfoParts.length > 1) { + hostInfoValue = hostInfoParts[1]; + } + else { + hostInfoValue = fallbackHostInfo; + } + } + } + } + catch (ex) { + OSF.Utility.log(JSON.stringify(ex)); + } + } + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (!hostInfoValue && osfSessionStorage.getItem("hostInfoValue")) { + hostInfoValue = osfSessionStorage.getItem("hostInfoValue"); + } + if (hostInfoValue) { + hostInfoValue = decodeURIComponent(hostInfoValue); + hostInfo.isO15 = false; + var items = hostInfoValue.split("$"); + if (typeof items[2] == "undefined") { + items = hostInfoValue.split("|"); + } + hostInfo.hostType = (typeof items[0] == "undefined") ? "" : items[0].toLowerCase(); + hostInfo.hostPlatform = (typeof items[1] == "undefined") ? "" : items[1].toLowerCase(); + ; + hostInfo.hostSpecificFileVersion = (typeof items[2] == "undefined") ? "" : items[2].toLowerCase(); + hostInfo.hostLocale = (typeof items[3] == "undefined") ? "" : items[3].toLowerCase(); + hostInfo.osfControlAppCorrelationId = (typeof items[4] == "undefined") ? "" : items[4]; + if (hostInfo.osfControlAppCorrelationId == "telemetry") { + hostInfo.osfControlAppCorrelationId = ""; + } + hostInfo.isDialog = (((typeof items[5]) != "undefined") && items[5] == "isDialog") ? true : false; + hostInfo.disableLogging = (((typeof items[6]) != "undefined") && items[6] == "disableLogging") ? true : false; + hostInfo.flags = (((typeof items[7]) === "string") && items[7].length > 0) ? parseInt(items[7]) : 0; + osfSessionStorage.setItem("hostInfoValue", hostInfoValue); + } + else { + hostInfo.isO15 = true; + hostInfo.hostLocale = OSF.Utility.getQueryStringValue("locale"); + } + return hostInfo; + } + _OfficeAppFactory.retrieveHostInfo = retrieveHostInfo; + })(_OfficeAppFactory = OSF._OfficeAppFactory || (OSF._OfficeAppFactory = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var _OfficeAppFactory; + (function (_OfficeAppFactory) { + var _windowLocationHash; + var _windowLocationSearch; + var _windowName; + if (typeof (window) !== 'undefined') { + if (window.location) { + _windowLocationHash = window.location.hash; + _windowLocationSearch = window.location.search; + } + _windowName = window.name; + } + var _hostInfo; + var _webAppState; + var _isLoggingAllowed; + var _initializationHelper; + var _asyncMethodExecutor; + var _officeAppContext; + var _clientHostController; + var _initialDisplayModeMappings = { + 0: "Unknown", + 1: "Hidden", + 2: "Taskpane", + 3: "Dialog" + }; + function bootstrap(onSuccess, onError) { + _webAppState = { + id: null, + webAppUrl: null, + conversationID: null, + clientEndPoint: null, + wnd: window.parent, + focused: false, + serviceEndPoint: null, + serializerVersion: 1 + }; + _hostInfo = _OfficeAppFactory.retrieveHostInfo(); + retrieveLoggingAllowed(); + createInitializationHelper(); + if (!_initializationHelper) { + onError(new Error("Office.js cannot be initialized.")); + return; + } + if (_hostInfo.hostPlatform === OSF.HostInfoPlatform.web) { + _initializationHelper.saveAndSetDialogInfo(OSF.Utility.getQueryStringValue("_host_Info")); + } + _initializationHelper.setAgaveHostCommunication(); + OSFPerformance.getAppContextStart = OSFPerformance.now(); + var onGetAppContextSuccess = function (officeAppContext) { + OSFPerformance.getAppContextEnd = OSFPerformance.now(); + OSF.AppTelemetry.initialize(officeAppContext); + _officeAppContext = officeAppContext; + _clientHostController = _initializationHelper.createClientHostController(); + _asyncMethodExecutor = _initializationHelper.createAsyncMethodExecutor(); + _initializationHelper.prepareApiSurface(officeAppContext); + if (OSF.BootStrapExtension.onGetAppContext) { + OSF.BootStrapExtension.onGetAppContext(officeAppContext, _webAppState.wnd) + .then(function () { + fireOfficeOnReady(officeAppContext, onSuccess); + }); + } + else { + fireOfficeOnReady(officeAppContext, onSuccess); + } + }; + var onGetAppContextError = function (e) { + onError(e); + }; + _initializationHelper.getAppContext(window, onGetAppContextSuccess, onGetAppContextError); + } + _OfficeAppFactory.bootstrap = bootstrap; + function fireOfficeOnReady(officeAppContext, onSuccess) { + OSF.AppCommandManager.initialize(); + var appNameNumber = officeAppContext.get_appName(); + var addinInfo = null; + if ((_hostInfo.flags & OSF.HostInfoFlags.SharedApp) !== 0) { + addinInfo = { + visibilityMode: _initialDisplayModeMappings[officeAppContext.get_initialDisplayMode()] + }; + } + Office.fireOnReady({ + host: OSF.HostName.Host.getInstance().getHost(appNameNumber), + platform: OSF.HostName.Host.getInstance().getPlatform(appNameNumber), + addin: addinInfo + }); + notifyHostOfficeReady(); + onSuccess(officeAppContext); + } + function retrieveLoggingAllowed() { + _isLoggingAllowed = true; + try { + if (_hostInfo.disableLogging) { + _isLoggingAllowed = false; + return; + } + window.external = window.external || {}; + if (typeof window.external.GetLoggingAllowed === 'undefined') { + _isLoggingAllowed = true; + } + else { + _isLoggingAllowed = window.external.GetLoggingAllowed(); + } + } + catch (ex) { + } + } + function createInitializationHelper() { + if (_hostInfo.hostPlatform === OSF.HostInfoPlatform.web) { + _initializationHelper = new OSF.WebInitializationHelper(_hostInfo, _webAppState, null, null); + } + else if (_hostInfo.hostPlatform === OSF.HostInfoPlatform.win32) { + _initializationHelper = new OSF.RichClientInitializationHelper(_hostInfo, _webAppState, null, null); + } + else if (_hostInfo.hostPlatform === OSF.HostInfoPlatform.ios || _hostInfo.hostPlatform === OSF.HostInfoPlatform.mac) { + if (isWebkit2Sandbox()) { + _initializationHelper = new OSF.WebkitInitializationHelper(_hostInfo, _webAppState, null, null); + } + else { + throw OSF.Utility.createNotImplementedException(); + } + } + else if (_hostInfo.hostPlatform === OSF.HostInfoPlatform.android || _hostInfo.hostPlatform === OSF.HostInfoPlatform.winrt) { + _initializationHelper = new OSF.WebViewInitializationHelper(_hostInfo, _webAppState, null, null); + } + else { + console.warn("Office.js is loaded inside in unknown host or platform " + _hostInfo.hostPlatform); + } + } + function isWebkit2Sandbox() { + return window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.Agave; + } + function notifyHostOfficeReady() { + if (_hostInfo.hostPlatform == OSF.HostInfoPlatform.web) { + if (_webAppState.clientEndPoint != null) { + _webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [_webAppState.id, OSF.AgaveHostAction.OfficeJsReady, Date.now()]); + } + } + } + function getWindowName() { + return _windowName; + } + _OfficeAppFactory.getWindowName = getWindowName; + function getWindowLocationHash() { + return _windowLocationHash; + } + _OfficeAppFactory.getWindowLocationHash = getWindowLocationHash; + function getWindowLocationSearch() { + return _windowLocationSearch; + } + _OfficeAppFactory.getWindowLocationSearch = getWindowLocationSearch; + function getAsyncMethodExecutor() { + return _asyncMethodExecutor; + } + _OfficeAppFactory.getAsyncMethodExecutor = getAsyncMethodExecutor; + function getOfficeAppContext() { + return _officeAppContext; + } + _OfficeAppFactory.getOfficeAppContext = getOfficeAppContext; + function getHostInfo() { + return _hostInfo; + } + _OfficeAppFactory.getHostInfo = getHostInfo; + function getCachedSessionSettingsKey() { + return (_webAppState.conversationID != null ? _webAppState.conversationID : _officeAppContext.get_appInstanceId()) + "CachedSessionSettings"; + } + _OfficeAppFactory.getCachedSessionSettingsKey = getCachedSessionSettingsKey; + function getWebAppState() { + return _webAppState; + } + _OfficeAppFactory.getWebAppState = getWebAppState; + function getId() { + return _webAppState.id; + } + _OfficeAppFactory.getId = getId; + function getInitializationHelper() { + return _initializationHelper; + } + _OfficeAppFactory.getInitializationHelper = getInitializationHelper; + function getClientHostController() { + return _clientHostController; + } + _OfficeAppFactory.getClientHostController = getClientHostController; + })(_OfficeAppFactory = OSF._OfficeAppFactory || (OSF._OfficeAppFactory = {})); + function getClientEndPoint() { + return _OfficeAppFactory.getWebAppState().clientEndPoint; + } + OSF.getClientEndPoint = getClientEndPoint; +})(OSF || (OSF = {})); +var Office; +(function (Office) { + var AsyncResultStatus; + (function (AsyncResultStatus) { + AsyncResultStatus["Succeeded"] = "succeeded"; + AsyncResultStatus["Failed"] = "failed"; + })(AsyncResultStatus = Office.AsyncResultStatus || (Office.AsyncResultStatus = {})); + var DocumentMode; + (function (DocumentMode) { + DocumentMode["ReadOnly"] = "readOnly"; + DocumentMode["ReadWrite"] = "readWrite"; + })(DocumentMode = Office.DocumentMode || (Office.DocumentMode = {})); + var HostType; + (function (HostType) { + HostType["Word"] = "Word"; + HostType["Excel"] = "Excel"; + HostType["PowerPoint"] = "PowerPoint"; + HostType["Outlook"] = "Outlook"; + HostType["OneNote"] = "OneNote"; + HostType["Project"] = "Project"; + HostType["Access"] = "Access"; + HostType["Visio"] = "Visio"; + })(HostType = Office.HostType || (Office.HostType = {})); + var InitializationReason; + (function (InitializationReason) { + InitializationReason["Inserted"] = "inserted"; + InitializationReason["DocumentOpened"] = "documentOpened"; + })(InitializationReason = Office.InitializationReason || (Office.InitializationReason = {})); + var PlatformType; + (function (PlatformType) { + PlatformType["PC"] = "PC"; + PlatformType["OfficeOnline"] = "OfficeOnline"; + PlatformType["Mac"] = "Mac"; + PlatformType["iOS"] = "iOS"; + PlatformType["Android"] = "Android"; + PlatformType["Universal"] = "Universal"; + })(PlatformType = Office.PlatformType || (Office.PlatformType = {})); + var GoToType; + (function (GoToType) { + GoToType["Binding"] = "binding"; + GoToType["NamedItem"] = "namedItem"; + GoToType["Slide"] = "slide"; + GoToType["Index"] = "index"; + })(GoToType = Office.GoToType || (Office.GoToType = {})); + var SelectionMode; + (function (SelectionMode) { + SelectionMode["Default"] = "default"; + SelectionMode["Selected"] = "selected"; + SelectionMode["None"] = "none"; + })(SelectionMode = Office.SelectionMode || (Office.SelectionMode = {})); + var ValueFormat; + (function (ValueFormat) { + ValueFormat["Unformatted"] = "unformatted"; + ValueFormat["Formatted"] = "formatted"; + })(ValueFormat = Office.ValueFormat || (Office.ValueFormat = {})); + ; + var FileType; + (function (FileType) { + FileType["Text"] = "text"; + FileType["Compressed"] = "compressed"; + FileType["Pdf"] = "pdf"; + })(FileType = Office.FileType || (Office.FileType = {})); + ; + Office.CoercionType = { + Html: "html", + Matrix: "matrix", + Ooxml: "ooxml", + OoxmlPackage: "ooxmlPackage", + PdfFile: "pdfFile", + SlideRange: "slideRange", + Table: "table", + Text: "text", + }; + var BindingType; + (function (BindingType) { + BindingType["Table"] = "table"; + BindingType["Text"] = "text"; + BindingType["Matrix"] = "matrix"; + })(BindingType = Office.BindingType || (Office.BindingType = {})); + var FilterType; + (function (FilterType) { + FilterType["OnlyVisible"] = "onlyVisible"; + FilterType["All"] = "all"; + })(FilterType = Office.FilterType || (Office.FilterType = {})); + ; + var Table; + (function (Table) { + Table[Table["All"] = 0] = "All"; + Table[Table["Data"] = 1] = "Data"; + Table[Table["Headers"] = 2] = "Headers"; + })(Table = Office.Table || (Office.Table = {})); + var ActiveView; + (function (ActiveView) { + ActiveView["Read"] = "read"; + ActiveView["Edit"] = "edit"; + })(ActiveView = Office.ActiveView || (Office.ActiveView = {})); +})(Office || (Office = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExt; +(function (OfficeExt) { + function appSpecificCheckOriginFunction(allowed_domains, eventObj, origin, checkOriginFunction) { + return false; + } + ; + OfficeExt.appSpecificCheckOrigin = appSpecificCheckOriginFunction; +})(OfficeExt || (OfficeExt = {})); +var OSF; +(function (OSF) { + ; + var XdmMethodObject = (function () { + function XdmMethodObject(method, invokeType, blockingOthers) { + this._method = method; + this._invokeType = invokeType; + this._blockingOthers = blockingOthers; + } + XdmMethodObject.prototype.getMethod = function () { + return this._method; + }; + XdmMethodObject.prototype.getInvokeType = function () { + return this._invokeType; + }; + XdmMethodObject.prototype.getBlockingFlag = function () { + return this._blockingOthers; + }; + return XdmMethodObject; + }()); + OSF.XdmMethodObject = XdmMethodObject; + var XdmEventMethodObject = (function () { + function XdmEventMethodObject(registerMethodObject, unregisterMethodObject) { + this._registerMethodObject = registerMethodObject; + this._unregisterMethodObject = unregisterMethodObject; + } + XdmEventMethodObject.prototype.getRegisterMethodObject = function () { + return this._registerMethodObject; + }; + XdmEventMethodObject.prototype.getUnregisterMethodObject = function () { + return this._unregisterMethodObject; + }; + return XdmEventMethodObject; + }()); + OSF.XdmEventMethodObject = XdmEventMethodObject; + ; + var XdmServiceEndPoint = (function () { + function XdmServiceEndPoint(serviceEndPointId) { + this._methodObjectList = {}; + this._eventHandlerProxyList = {}; + this._conversations = {}; + this._policyManager = null; + this._appDomains = {}; + this._onHandleRequestError = null; + this._methodObjectList = {}; + this._eventHandlerProxyList = {}; + this._Id = serviceEndPointId; + this._conversations = {}; + this._policyManager = null; + this._appDomains = {}; + this._onHandleRequestError = null; + } + XdmServiceEndPoint.prototype.registerMethod = function (methodName, method, invokeType, blockingOthers) { + if (invokeType !== 0 + && invokeType !== 1) { + throw OSF.Utility.createArgumentException("invokeType"); + } + var methodObject = new XdmMethodObject(method, invokeType, blockingOthers); + this._methodObjectList[methodName] = methodObject; + }; + XdmServiceEndPoint.prototype.unregisterMethod = function (methodName) { + delete this._methodObjectList[methodName]; + }; + XdmServiceEndPoint.prototype.registerEvent = function (eventName, registerMethod, unregisterMethod) { + var methodObject = new XdmEventMethodObject(new XdmMethodObject(registerMethod, 4, false), new XdmMethodObject(unregisterMethod, 5, false)); + this._methodObjectList[eventName] = methodObject; + }; + XdmServiceEndPoint.prototype.registerEventEx = function (eventName, registerMethod, registerMethodInvokeType, unregisterMethod, unregisterMethodInvokeType) { + var methodObject = new XdmEventMethodObject(new XdmMethodObject(registerMethod, registerMethodInvokeType, false), new XdmMethodObject(unregisterMethod, unregisterMethodInvokeType, false)); + this._methodObjectList[eventName] = methodObject; + }; + XdmServiceEndPoint.prototype.unregisterEvent = function (eventName) { + this.unregisterMethod(eventName); + }; + XdmServiceEndPoint.prototype.registerConversation = function (conversationId, conversationUrl, appDomains, serializerVersion) { + OSF.Utility.xdmDebugLog("registerConversation: cId=" + conversationId + " Url=" + conversationUrl); + if (appDomains) { + if (!Array.isArray(appDomains)) { + throw OSF.Utility.createArgumentException("appDomains"); + } + this._appDomains[conversationId] = appDomains; + } + this._conversations[conversationId] = { url: conversationUrl, serializerVersion: serializerVersion }; + }; + XdmServiceEndPoint.prototype.unregisterConversation = function (conversationId) { + delete this._conversations[conversationId]; + }; + XdmServiceEndPoint.prototype.setPolicyManager = function (policyManager) { + if (!policyManager.checkPermission) { + throw OSF.Utility.createArgumentException("policyManager"); + } + this._policyManager = policyManager; + }; + XdmServiceEndPoint.prototype.getPolicyManager = function () { + return this._policyManager; + }; + XdmServiceEndPoint.prototype.dispose = function () { + this._methodObjectList = null; + this._eventHandlerProxyList = null; + this._Id = null; + this._conversations = null; + this._policyManager = null; + this._appDomains = null; + this._onHandleRequestError = null; + }; + return XdmServiceEndPoint; + }()); + OSF.XdmServiceEndPoint = XdmServiceEndPoint; + var XdmClientEndPoint = (function () { + function XdmClientEndPoint(conversationId, targetWindow, targetUrl, serializerVersion) { + this._callbackList = {}; + this._eventHandlerList = {}; + this._hostTrustCheckStatus = 0; + this._checkStatusLogged = false; + this._fHostTrusted = false; + this._conversationId = conversationId; + this._targetWindow = targetWindow; + this._targetUrl = targetUrl; + this._callingIndex = 0; + this._callbackList = {}; + this._eventHandlerList = {}; + if (serializerVersion != null) { + this._serializerVersion = serializerVersion; + } + else { + this._serializerVersion = 1; + } + this._checkReceiverOriginAndRun = null; + ; + } + ; + Object.defineProperty(XdmClientEndPoint.prototype, "targetUrl", { + get: function () { + return this._targetUrl; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(XdmClientEndPoint.prototype, "hostTrustCheckStatus", { + get: function () { + return this._hostTrustCheckStatus; + }, + set: function (value) { + this._hostTrustCheckStatus = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(XdmClientEndPoint.prototype, "fHostTrusted", { + get: function () { + return this._fHostTrusted; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(XdmClientEndPoint.prototype, "checkStatusLogged", { + get: function () { + return this._checkStatusLogged; + }, + set: function (value) { + this._checkStatusLogged = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(XdmClientEndPoint.prototype, "checkReceiverOriginAndRun", { + get: function () { + return this._checkReceiverOriginAndRun; + }, + set: function (value) { + this._checkReceiverOriginAndRun = value; + }, + enumerable: true, + configurable: true + }); + XdmClientEndPoint.prototype.invoke = function (targetMethodName, callback, param) { + var _this = this; + var funcToRun = function () { + var correlationId = _this._callingIndex++; + var now = new Date(); + var callbackEntry = { "callback": callback, "createdOn": now.getTime() }; + if (param && typeof param === "object" && typeof param.__timeout__ === "number") { + callbackEntry.timeout = param.__timeout__; + delete param.__timeout__; + } + _this._callbackList[correlationId] = callbackEntry; + try { + if (_this._hostTrustCheckStatus !== 3) { + if (targetMethodName !== "ContextActivationManager_getAppContextAsync") { + throw "Access Denied"; + } + } + var callRequest = new XdmRequest(targetMethodName, 0, _this._conversationId, correlationId, param); + var msg = XdmMessagePackager.envelope(callRequest, _this._serializerVersion); + _this._targetWindow.postMessage(msg, _this._targetUrl); + XdmCommunicationManager._startMethodTimeoutTimer(); + } + catch (ex) { + try { + if (callback !== null) + callback(-1, ex); + } + finally { + delete _this._callbackList[correlationId]; + } + } + }; + if (this._checkReceiverOriginAndRun) { + this._checkReceiverOriginAndRun(funcToRun); + } + else { + this._hostTrustCheckStatus = 3; + funcToRun(); + } + }; + XdmClientEndPoint.prototype.registerForEvent = function (targetEventName, eventHandler, callback, data) { + var correlationId = this._callingIndex++; + var now = new Date(); + this._callbackList[correlationId] = { "callback": callback, "createdOn": now.getTime() }; + try { + var callRequest = new XdmRequest(targetEventName, 1, this._conversationId, correlationId, data); + var msg = XdmMessagePackager.envelope(callRequest, this._serializerVersion); + this._targetWindow.postMessage(msg, this._targetUrl); + XdmCommunicationManager._startMethodTimeoutTimer(); + this._eventHandlerList[targetEventName] = eventHandler; + } + catch (ex) { + try { + if (callback !== null) { + callback(-1, ex); + } + } + finally { + delete this._callbackList[correlationId]; + } + } + }; + XdmClientEndPoint.prototype.unregisterForEvent = function (targetEventName, callback, data) { + var correlationId = this._callingIndex++; + var now = new Date(); + this._callbackList[correlationId] = { "callback": callback, "createdOn": now.getTime() }; + try { + var callRequest = new XdmRequest(targetEventName, 2, this._conversationId, correlationId, data); + var msg = XdmMessagePackager.envelope(callRequest, this._serializerVersion); + this._targetWindow.postMessage(msg, this._targetUrl); + XdmCommunicationManager._startMethodTimeoutTimer(); + } + catch (ex) { + try { + if (callback !== null) { + callback(-1, ex); + } + } + finally { + delete this._callbackList[correlationId]; + } + } + finally { + delete this._eventHandlerList[targetEventName]; + } + }; + return XdmClientEndPoint; + }()); + OSF.XdmClientEndPoint = XdmClientEndPoint; + ; + var XdmCommunicationManager; + (function (XdmCommunicationManager) { + var _invokerQueue = []; + var _lastMessageProcessTime = null; + var _messageProcessingTimer = null; + var _processInterval = 10; + var _blockingFlag = false; + var _methodTimeoutTimer = null; + var _methodTimeoutProcessInterval = 2000; + var _methodTimeoutDefault = 65000; + var _methodTimeout = _methodTimeoutDefault; + var _serviceEndPoints = {}; + var _clientEndPoints = {}; + var _initialized = false; + function _lookupServiceEndPoint(conversationId) { + for (var id in _serviceEndPoints) { + if (_serviceEndPoints[id]._conversations[conversationId]) { + return _serviceEndPoints[id]; + } + } + throw OSF.Utility.createArgumentException("conversationId"); + } + ; + function _lookupClientEndPoint(conversationId) { + var clientEndPoint = _clientEndPoints[conversationId]; + if (!clientEndPoint) { + OSF.Utility.xdmDebugLog("Unknown conversation Id."); + } + return clientEndPoint; + } + ; + function _lookupMethodObject(serviceEndPoint, messageObject) { + var methodOrEventMethodObject = serviceEndPoint._methodObjectList[messageObject._actionName]; + if (!methodOrEventMethodObject) { + OSF.Utility.xdmDebugLog("The specified method is not registered on service endpoint:" + messageObject._actionName); + throw OSF.Utility.createArgumentException("messageObject"); + } + var methodObject = null; + if (messageObject._actionType === 0) { + methodObject = methodOrEventMethodObject; + } + else if (messageObject._actionType === 1) { + methodObject = methodOrEventMethodObject.getRegisterMethodObject(); + } + else { + methodObject = methodOrEventMethodObject.getUnregisterMethodObject(); + } + return methodObject; + } + ; + function _enqueInvoker(invoker) { + _invokerQueue.push(invoker); + } + ; + function _dequeInvoker() { + if (_messageProcessingTimer !== null) { + if (!_blockingFlag) { + if (_invokerQueue.length > 0) { + var invoker = _invokerQueue.shift(); + _executeCommand(invoker); + } + else { + clearInterval(_messageProcessingTimer); + _messageProcessingTimer = null; + } + } + } + else { + OSF.Utility.xdmDebugLog("channel is not ready."); + } + } + ; + function _executeCommand(invoker) { + _blockingFlag = invoker.getInvokeBlockingFlag(); + invoker.invoke(); + _lastMessageProcessTime = (new Date()).getTime(); + } + ; + function _checkMethodTimeout() { + if (_methodTimeoutTimer) { + var clientEndPoint; + var methodCallsNotTimedout = 0; + var now = new Date(); + var timeoutValue; + for (var conversationId in _clientEndPoints) { + clientEndPoint = _clientEndPoints[conversationId]; + for (var correlationId in clientEndPoint._callbackList) { + var callbackEntry = clientEndPoint._callbackList[correlationId]; + timeoutValue = callbackEntry.timeout ? callbackEntry.timeout : _methodTimeout; + if (timeoutValue >= 0 && Math.abs(now.getTime() - callbackEntry.createdOn) >= timeoutValue) { + try { + if (callbackEntry.callback) { + callbackEntry.callback(-6, null); + } + } + finally { + delete clientEndPoint._callbackList[correlationId]; + } + } + else { + methodCallsNotTimedout++; + } + ; + } + } + if (methodCallsNotTimedout === 0) { + clearInterval(_methodTimeoutTimer); + _methodTimeoutTimer = null; + } + } + else { + OSF.Utility.xdmDebugLog("channel is not ready."); + } + } + ; + function _postCallbackHandler() { + _blockingFlag = false; + } + ; + function _registerListener(listener) { + if (window.addEventListener) { + window.addEventListener("message", listener, false); + } + else if ((navigator.userAgent.indexOf("MSIE") > -1) && window.attachEvent) { + window.attachEvent("onmessage", listener); + } + else { + OSF.Utility.xdmDebugLog("Browser doesn't support the required API."); + throw OSF.Utility.createArgumentException("Browser"); + } + } + ; + function _checkOrigin(url, origin) { + var res = false; + if (!url || !origin || url === "null" || origin === "null" || !url.length || !origin.length) { + return res; + } + var url_parser, org_parser; + url_parser = document.createElement('a'); + org_parser = document.createElement('a'); + url_parser.href = url; + org_parser.href = origin; + res = _urlCompare(url_parser, org_parser); + return res; + } + function _checkOriginWithAppDomains(allowed_domains, origin) { + var res = false; + if (!origin || origin === "null" || !origin.length || !(allowed_domains) || !(allowed_domains instanceof Array) || !allowed_domains.length) { + return res; + } + var org_parser = document.createElement('a'); + var app_domain_parser = document.createElement('a'); + org_parser.href = origin; + for (var i = 0; i < allowed_domains.length && !res; i++) { + if (allowed_domains[i].indexOf("://") !== -1) { + app_domain_parser.href = allowed_domains[i]; + res = _urlCompare(org_parser, app_domain_parser); + } + } + return res; + } + function _isHostNameValidWacDomain(hostName) { + if (!hostName || hostName === "null") { + return false; + } + var regexHostNameStringArray = new Array("^outlook\\.office\\.com$", "^outlook-sdf\\.office\\.com$", "^outlook\\.office\\.com$", "^outlook-sdf\\.office\\.com$", "^outlook\\.live\\.com$", "^outlook-sdf\\.live\\.com$", "^consumer\\.live-int\\.com$", "^outlook-tdf\\.live\\.com$", "^sdfpilot\\.live\\.com$", "^outlook\\.office365\\.us$", "^outlook\\.office365\\.com$", "^exchangelabs\\.live-int\\.com$", "^office-int\\.com$", "^officeapps\\.live-int\\.com$", "^.*\\.dod\\.online\\.office365\\.us$", "^.*\\.gov\\.online\\.office365\\.us$", "^.*\\.officeapps\\.live\\.com$", "^.*\\.officeapps\\.live-int\\.com$", "^.*\\.officeapps-df\\.live\\.com$", "^.*\\.office\\.net$", "^" + document.domain.replace(new RegExp("\\.", "g"), "\\.") + "$"); + if (OSF.OUtil.getCustomOfficeInitializationSettings().trustAllCloudEnvironments === true) { + regexHostNameStringArray.push("^outlook\\.office\\.de$", "^partner\\.outlook\\.cn$", "^.*\\.online\\.office\\.de$", "^.*\\.partner\\.officewebapps\\.cn$"); + } + var regexHostName = new RegExp(regexHostNameStringArray.join("|")); + return regexHostName.test(hostName); + } + function _isTargetSubdomainOfSourceLocation(sourceLocation, messageOrigin) { + if (!sourceLocation || !messageOrigin || sourceLocation === "null" || messageOrigin === "null") { + return false; + } + var sourceLocationParser = document.createElement('a'); + sourceLocationParser.href = sourceLocation; + var messageOriginParser = document.createElement('a'); + messageOriginParser.href = messageOrigin; + var isSameProtocol = sourceLocationParser.protocol === messageOriginParser.protocol; + var isSamePort = sourceLocationParser.port === messageOriginParser.port; + var originHostName = messageOriginParser.hostname; + var sourceLocationHostName = sourceLocationParser.hostname; + var isSameDomain = originHostName === sourceLocationHostName; + var isSubDomain = false; + if (!isSameDomain && originHostName.length > sourceLocationHostName.length + 1) { + isSubDomain = originHostName.slice(-(sourceLocationHostName.length + 1)) === '.' + sourceLocationHostName; + } + var isSameDomainOrSubdomain = isSameDomain || isSubDomain; + return isSamePort && isSameProtocol && isSameDomainOrSubdomain; + } + function _urlCompare(url_parser1, url_parser2) { + return ((url_parser1.hostname == url_parser2.hostname) && + (url_parser1.protocol == url_parser2.protocol) && + (url_parser1.port == url_parser2.port)); + } + function _receive(e) { + if (e.data != '') { + var messageObject; + var serializerVersion = 1; + var serializedMessage = e.data; + try { + messageObject = XdmMessagePackager.unenvelope(serializedMessage, 1); + serializerVersion = messageObject._serializerVersion != null ? messageObject._serializerVersion : serializerVersion; + } + catch (ex) { + return; + } + OSF.Utility.xdmDebugLog(serializedMessage); + if (messageObject._messageType === 0) { + var requesterUrl = (e.origin == null || e.origin === "null") ? messageObject._origin : e.origin; + try { + var serviceEndPoint = _lookupServiceEndPoint(messageObject._conversationId); + OSF.Utility.xdmDebugLog("_receive: request, origin=" + requesterUrl + " sourceURL:" + serviceEndPoint._conversations[messageObject._conversationId]); + var conversation = serviceEndPoint._conversations[messageObject._conversationId]; + serializerVersion = conversation.serializerVersion != null ? conversation.serializerVersion : serializerVersion; + OSF.Utility.xdmDebugLog("_receive: request, origin=" + requesterUrl + " sourceURL:" + conversation.url); + var allowedDomains = [conversation.url].concat(serviceEndPoint._appDomains[messageObject._conversationId]); + if (!_checkOriginWithAppDomains(allowedDomains, e.origin)) { + if (!OfficeExt.appSpecificCheckOrigin(allowedDomains, e, messageObject._origin, _checkOriginWithAppDomains)) { + var isOriginSubdomain = _isTargetSubdomainOfSourceLocation(conversation.url, e.origin); + if (!isOriginSubdomain) { + throw "Failed origin check"; + } + } + } + var policyManager = serviceEndPoint.getPolicyManager(); + if (policyManager && !policyManager.checkPermission(messageObject._conversationId, messageObject._actionName, messageObject._data)) { + throw "Access Denied"; + } + var methodObject = _lookupMethodObject(serviceEndPoint, messageObject); + var invokeCompleteCallback = new XdmInvokeCompleteCallback(e.source, requesterUrl, messageObject._actionName, messageObject._conversationId, messageObject._correlationId, _postCallbackHandler, serializerVersion); + var invoker = new XdmInvoker(methodObject, messageObject._data, invokeCompleteCallback, serviceEndPoint._eventHandlerProxyList, messageObject._conversationId, messageObject._actionName, serializerVersion); + var shouldEnque = true; + if (_messageProcessingTimer == null) { + if ((_lastMessageProcessTime == null || (new Date()).getTime() - _lastMessageProcessTime > _processInterval) && !_blockingFlag) { + _executeCommand(invoker); + shouldEnque = false; + } + else { + _messageProcessingTimer = setInterval(_dequeInvoker, _processInterval); + } + } + if (shouldEnque) { + _enqueInvoker(invoker); + } + } + catch (ex) { + if (serviceEndPoint && serviceEndPoint._onHandleRequestError) { + serviceEndPoint._onHandleRequestError(messageObject, ex); + } + var errorCode = -2; + if (ex == "Access Denied") { + errorCode = -5; + } + var callResponse = new XdmResponse(messageObject._actionName, messageObject._conversationId, messageObject._correlationId, errorCode, 0, ex); + var envelopedResult = XdmMessagePackager.envelope(callResponse, serializerVersion); + var canPostMessage = false; + try { + canPostMessage = !!(e.source && e.source.postMessage); + } + catch (ex) { + } + var isOriginValid = false; + if (window.location.href && e.origin && e.origin !== "null" && _isTargetSubdomainOfSourceLocation(window.location.href, e.origin)) { + isOriginValid = true; + } + else { + if (e.origin && e.origin !== "null") { + var parser = document.createElement("a"); + parser.href = e.origin; + isOriginValid = _isHostNameValidWacDomain(parser.hostname); + } + } + if (canPostMessage && isOriginValid) { + e.source.postMessage(envelopedResult, requesterUrl); + } + } + } + else if (messageObject._messageType === 1) { + var clientEndPoint = _lookupClientEndPoint(messageObject._conversationId); + if (!clientEndPoint) { + return; + } + clientEndPoint._serializerVersion = serializerVersion; + OSF.Utility.xdmDebugLog("_receive: response, origin=" + e.origin + " targetURL:" + clientEndPoint._targetUrl); + if (!_checkOrigin(clientEndPoint._targetUrl, e.origin)) { + throw "Failed orgin check"; + } + else if (clientEndPoint._hostTrustCheckStatus == 3) { + clientEndPoint._fHostTrusted = true; + } + if (messageObject._responseType === 0) { + var callbackEntry = clientEndPoint._callbackList[messageObject._correlationId]; + if (callbackEntry) { + try { + if (callbackEntry.callback) + callbackEntry.callback(messageObject._errorCode, messageObject._data); + } + finally { + delete clientEndPoint._callbackList[messageObject._correlationId]; + } + } + } + else { + var eventhandler = clientEndPoint._eventHandlerList[messageObject._actionName]; + if (eventhandler !== undefined && eventhandler !== null) { + eventhandler(messageObject._data); + } + } + } + else { + return; + } + } + } + ; + function _initialize() { + if (!_initialized) { + _registerListener(_receive); + _initialized = true; + } + } + ; + function connect(conversationId, targetWindow, targetUrl, serializerVersion) { + var clientEndPoint = _clientEndPoints[conversationId]; + if (!clientEndPoint) { + _initialize(); + clientEndPoint = new XdmClientEndPoint(conversationId, targetWindow, targetUrl, serializerVersion); + _clientEndPoints[conversationId] = clientEndPoint; + } + return clientEndPoint; + } + XdmCommunicationManager.connect = connect; + function getClientEndPoint(conversationId) { + return _clientEndPoints[conversationId]; + } + XdmCommunicationManager.getClientEndPoint = getClientEndPoint; + function createServiceEndPoint(serviceEndPointId) { + _initialize(); + var serviceEndPoint = new XdmServiceEndPoint(serviceEndPointId); + _serviceEndPoints[serviceEndPointId] = serviceEndPoint; + return serviceEndPoint; + } + XdmCommunicationManager.createServiceEndPoint = createServiceEndPoint; + function getServiceEndPoint(serviceEndPointId) { + return _serviceEndPoints[serviceEndPointId]; + } + XdmCommunicationManager.getServiceEndPoint = getServiceEndPoint; + function deleteClientEndPoint(conversationId) { + delete _clientEndPoints[conversationId]; + } + XdmCommunicationManager.deleteClientEndPoint = deleteClientEndPoint; + function deleteServiceEndPoint(serviceEndPointId) { + delete _serviceEndPoints[serviceEndPointId]; + } + XdmCommunicationManager.deleteServiceEndPoint = deleteServiceEndPoint; + function checkUrlWithAppDomains(appDomains, origin) { + return _checkOriginWithAppDomains(appDomains, origin); + } + XdmCommunicationManager.checkUrlWithAppDomains = checkUrlWithAppDomains; + ; + function isTargetSubdomainOfSourceLocation(sourceLocation, messageOrigin) { + return _isTargetSubdomainOfSourceLocation(sourceLocation, messageOrigin); + } + XdmCommunicationManager.isTargetSubdomainOfSourceLocation = isTargetSubdomainOfSourceLocation; + function _setMethodTimeout(methodTimeout) { + _methodTimeout = (methodTimeout <= 0) ? _methodTimeoutDefault : methodTimeout; + } + XdmCommunicationManager._setMethodTimeout = _setMethodTimeout; + function _startMethodTimeoutTimer() { + } + XdmCommunicationManager._startMethodTimeoutTimer = _startMethodTimeoutTimer; + function isHostNameValidWacDomain(hostName) { + return _isHostNameValidWacDomain(hostName); + } + XdmCommunicationManager.isHostNameValidWacDomain = isHostNameValidWacDomain; + })(XdmCommunicationManager = OSF.XdmCommunicationManager || (OSF.XdmCommunicationManager = {})); + var XdmMessage = (function () { + function XdmMessage(messageType, actionName, conversationId, correlationId, data) { + this._messageType = messageType; + this._actionName = actionName; + this._conversationId = conversationId; + this._correlationId = correlationId; + this._origin = window.location.origin; + if (typeof data === "undefined") { + this._data = null; + } + else { + this._data = data; + } + } + XdmMessage.prototype.getActionName = function () { + return this._actionName; + }; + XdmMessage.prototype.getConversationId = function () { + return this._conversationId; + }; + XdmMessage.prototype.getCorrelationId = function () { + return this._correlationId; + }; + XdmMessage.prototype.getOrigin = function () { + return this._origin; + }; + XdmMessage.prototype.getData = function () { + return this._data; + }; + XdmMessage.prototype.getMessageType = function () { + return this._messageType; + }; + return XdmMessage; + }()); + var XdmRequest = (function (_super) { + __extends(XdmRequest, _super); + function XdmRequest(actionName, actionType, conversationId, correlationId, data) { + var _this = _super.call(this, 0, actionName, conversationId, correlationId, data) || this; + _this._actionType = actionType; + return _this; + } + ; + XdmRequest.prototype.getActionType = function () { + return this._actionType; + }; + return XdmRequest; + }(XdmMessage)); + var XdmResponse = (function (_super) { + __extends(XdmResponse, _super); + function XdmResponse(actionName, conversationId, correlationId, errorCode, responseType, data) { + var _this = _super.call(this, 1, actionName, conversationId, correlationId, data) || this; + _this._errorCode = errorCode; + _this._responseType = responseType; + return _this; + } + XdmResponse.prototype.getErrorCode = function () { + return this._errorCode; + }; + XdmResponse.prototype.getResponseType = function () { + return this._responseType; + }; + return XdmResponse; + }(XdmMessage)); + var XdmMessagePackager = (function () { + function XdmMessagePackager() { + } + XdmMessagePackager.envelope = function (messageObject, serializerVersion) { + if (typeof (messageObject) === "object") { + messageObject._serializerVersion = 1; + } + return JSON.stringify(messageObject); + }; + XdmMessagePackager.unenvelope = function (messageObject, serializerVersion) { + return JSON.parse(messageObject); + }; + return XdmMessagePackager; + }()); + var XdmResponseSender = (function () { + function XdmResponseSender(requesterWindow, requesterUrl, actionName, conversationId, correlationId, responseType, serializerVersion) { + var _this = this; + this._invokeResultCode = 0; + this._requesterWindow = requesterWindow; + this._requesterUrl = requesterUrl; + this._actionName = actionName; + this._conversationId = conversationId; + this._correlationId = correlationId; + this._invokeResultCode = 0; + this._responseType = responseType; + this._serializerVersion = serializerVersion; + this._send = function (result) { + try { + var response = new XdmResponse(_this._actionName, _this._conversationId, _this._correlationId, _this._invokeResultCode, _this._responseType, result); + var envelopedResult = XdmMessagePackager.envelope(response, _this._serializerVersion); + _this._requesterWindow.postMessage(envelopedResult, _this._requesterUrl); + OSF.Utility.xdmDebugLog("_send: requestUrl=" + _this._requesterUrl + " _actionName:" + _this._actionName); + } + catch (ex) { + OSF.Utility.xdmDebugLog("ResponseSender._send error:" + ex.message); + } + }; + } + XdmResponseSender.prototype.getRequesterWindow = function () { + return this._requesterWindow; + }; + XdmResponseSender.prototype.getRequesterUrl = function () { + return this._requesterUrl; + }; + XdmResponseSender.prototype.getActionName = function () { + return this._actionName; + }; + XdmResponseSender.prototype.getConversationId = function () { + return this._conversationId; + }; + XdmResponseSender.prototype.getCorrelationId = function () { + return this._correlationId; + }; + XdmResponseSender.prototype.getSend = function () { + return this._send; + }; + XdmResponseSender.prototype.setResultCode = function (resultCode) { + this._invokeResultCode = resultCode; + }; + return XdmResponseSender; + }()); + var XdmInvokeCompleteCallback = (function (_super) { + __extends(XdmInvokeCompleteCallback, _super); + function XdmInvokeCompleteCallback(requesterWindow, requesterUrl, actionName, conversationId, correlationId, postCallbackHandler, serializerVersion) { + var _this = _super.call(this, requesterWindow, requesterUrl, actionName, conversationId, correlationId, 0, serializerVersion) || this; + _this._postCallbackHandler = postCallbackHandler; + _this._send = function (result, responseCode) { + if (responseCode != undefined) { + _this._invokeResultCode = responseCode; + } + try { + var response = new XdmResponse(_this._actionName, _this._conversationId, _this._correlationId, _this._invokeResultCode, _this._responseType, result); + var envelopedResult = XdmMessagePackager.envelope(response, _this._serializerVersion); + _this._requesterWindow.postMessage(envelopedResult, _this._requesterUrl); + _this._postCallbackHandler(); + } + catch (ex) { + OSF.Utility.xdmDebugLog("InvokeCompleteCallback._send error:" + ex.message); + } + }; + return _this; + } + return XdmInvokeCompleteCallback; + }(XdmResponseSender)); + var XdmInvoker = (function () { + function XdmInvoker(methodObject, paramValue, invokeCompleteCallback, eventHandlerProxyList, conversationId, eventName, serializerVersion) { + this._callerId = ''; + this._methodObject = methodObject; + this._param = paramValue; + this._invokeCompleteCallback = invokeCompleteCallback; + this._eventHandlerProxyList = eventHandlerProxyList; + this._conversationId = conversationId; + this._eventName = eventName; + this._serializerVersion = serializerVersion; + } + XdmInvoker.prototype.invoke = function () { + try { + var result; + switch (this._methodObject.getInvokeType()) { + case 0: + this._methodObject.getMethod()(this._param, this._invokeCompleteCallback.getSend()); + break; + case 1: + result = this._methodObject.getMethod()(this._param); + this._invokeCompleteCallback.getSend()(result); + break; + case 4: + var eventHandlerProxy = this._createEventHandlerProxyObject(this._invokeCompleteCallback); + result = this._methodObject.getMethod()(eventHandlerProxy.getSend(), this._param); + this._eventHandlerProxyList[this._conversationId + this._eventName] = eventHandlerProxy.getSend(); + this._invokeCompleteCallback.getSend()(result); + break; + case 5: + var eventHandler = this._eventHandlerProxyList[this._conversationId + this._eventName]; + result = this._methodObject.getMethod()(eventHandler, this._param); + delete this._eventHandlerProxyList[this._conversationId + this._eventName]; + this._invokeCompleteCallback.getSend()(result); + break; + case 2: + var eventHandlerProxyAsync = this._createEventHandlerProxyObject(this._invokeCompleteCallback); + this._methodObject.getMethod()(eventHandlerProxyAsync.getSend(), this._invokeCompleteCallback.getSend(), this._param); + this._eventHandlerProxyList[this._callerId + this._eventName] = eventHandlerProxyAsync.getSend(); + break; + case 3: + var eventHandlerAsync = this._eventHandlerProxyList[this._callerId + this._eventName]; + this._methodObject.getMethod()(eventHandlerAsync, this._invokeCompleteCallback.getSend(), this._param); + delete this._eventHandlerProxyList[this._callerId + this._eventName]; + break; + default: + break; + } + } + catch (ex) { + this._invokeCompleteCallback.setResultCode(-3); + this._invokeCompleteCallback.getSend()(ex); + } + }; + XdmInvoker.prototype.getInvokeBlockingFlag = function () { + return this._methodObject.getBlockingFlag(); + }; + XdmInvoker.prototype._createEventHandlerProxyObject = function (invokeCompleteObject) { + return new XdmResponseSender(invokeCompleteObject.getRequesterWindow(), invokeCompleteObject.getRequesterUrl(), invokeCompleteObject.getActionName(), invokeCompleteObject.getConversationId(), invokeCompleteObject.getCorrelationId(), 1, this._serializerVersion); + }; + return XdmInvoker; + }()); +})(OSF || (OSF = {})); +var OSFPerfUtil; +(function (OSFPerfUtil) { + function prepareDataFieldsForOtel(resource, name) { + name = name + "_Resource"; + if (oteljs !== undefined) { + return [ + oteljs.makeDoubleDataField(name + "_responseEnd", resource.responseEnd), + oteljs.makeDoubleDataField(name + "_responseStart", resource.responseStart), + oteljs.makeDoubleDataField(name + "_startTime", resource.startTime), + oteljs.makeDoubleDataField(name + "_transferSize", resource.transferSize) + ]; + } + return []; + } + function sendPerformanceTelemetry() { + if (OSF.AppTelemetry.enableTelemetry && typeof (performance) != "undefined" && performance.getEntriesByType) { + var hostPerfResource_1; + var officePerfResource_1; + var hostSpecificFileName_1 = OSF.LoadScriptHelper.getHostBundleJsName().toLowerCase(); + var resources = performance.getEntriesByType("resource"); + resources.forEach(function (resource) { + var resourceName = resource.name.toLowerCase(); + if (OSF.Utility.stringEndsWith(resourceName, hostSpecificFileName_1)) { + hostPerfResource_1 = resource; + } + else if (OSF.Utility.stringEndsWith(resourceName, OSF.ConstantNames.OfficeDebugJS) || + OSF.Utility.stringEndsWith(resourceName, OSF.ConstantNames.OfficeJS)) { + officePerfResource_1 = resource; + } + }); + OTel.OTelLogger.onTelemetryLoaded(function () { + var dataFields = []; + if (hostPerfResource_1) { + dataFields = dataFields.concat(prepareDataFieldsForOtel(hostPerfResource_1, "HostJs")); + } + if (officePerfResource_1) { + dataFields = dataFields.concat(prepareDataFieldsForOtel(officePerfResource_1, "OfficeJs")); + } + dataFields = dataFields.concat([ + oteljs.makeDoubleDataField("officeExecuteStartDate", OSFPerformance.officeExecuteStartDate), + oteljs.makeDoubleDataField("officeExecuteStart", OSFPerformance.officeExecuteStart), + oteljs.makeDoubleDataField("officeExecuteEnd", OSFPerformance.officeExecuteEnd), + oteljs.makeDoubleDataField("hostInitializationStart", OSFPerformance.hostInitializationStart), + oteljs.makeDoubleDataField("hostInitializationEnd", OSFPerformance.hostInitializationEnd), + oteljs.makeDoubleDataField("totalJSHeapSize", OSFPerformance.totalJSHeapSize), + oteljs.makeDoubleDataField("usedJSHeapSize", OSFPerformance.usedJSHeapSize), + oteljs.makeDoubleDataField("jsHeapSizeLimit", OSFPerformance.jsHeapSizeLimit), + oteljs.makeDoubleDataField("getAppContextStart", OSFPerformance.getAppContextStart), + oteljs.makeDoubleDataField("getAppContextEnd", OSFPerformance.getAppContextEnd), + oteljs.makeDoubleDataField("getAppContextXdmStart", OSFPerformance.getAppContextXdmStart), + oteljs.makeDoubleDataField("getAppContextXdmEnd", OSFPerformance.getAppContextXdmEnd), + oteljs.makeDoubleDataField("createOMEnd", OSFPerformance.createOMEnd), + oteljs.makeDoubleDataField("officeOnReady", OSFPerformance.officeOnReady), + oteljs.makeBooleanDataField("isSharedRuntime", (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.SharedApp) !== 0) + ]); + Microsoft.Office.WebExtension.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.JSPerformanceTelemetryV06", + dataFields: dataFields, + eventFlags: { + dataCategories: 2, + diagnosticLevel: 110 + } + }); + }); + } + } + OSFPerfUtil.sendPerformanceTelemetry = sendPerformanceTelemetry; +})(OSFPerfUtil || (OSFPerfUtil = {})); +var OSF; +(function (OSF) { + var OUtil; + (function (OUtil) { + var _loadedScripts = {}; + var _defaultScriptLoadingTimeout = 30000; + var _safeSessionStorage; + var _safeLocalStorage; + var Guid; + (function (Guid) { + var hexCode = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + function generateNewGuid() { + var result = ""; + var tick = (new Date()).getTime(); + var index = 0; + for (; index < 32 && tick > 0; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index == 8 || index == 12 || index == 16 || index == 20) { + result += "-"; + } + result += hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + Guid.generateNewGuid = generateNewGuid; + })(Guid = OUtil.Guid || (OUtil.Guid = {})); + function loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if (!_loadedScriptEntry) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(true); + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError() { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer != null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(false); + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadError, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(true); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + } + OUtil.loadScript = loadScript; + function getSessionStorage() { + if (!_safeSessionStorage) { + try { + var sessionStorage = window.sessionStorage; + } + catch (ex) { + sessionStorage = null; + } + _safeSessionStorage = new OSF.SafeStorage(sessionStorage); + } + return _safeSessionStorage; + } + OUtil.getSessionStorage = getSessionStorage; + function getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage = window.localStorage; + } + catch (ex) { + localStorage = null; + } + _safeLocalStorage = new OSF.SafeStorage(localStorage); + } + return _safeLocalStorage; + } + OUtil.getLocalStorage = getLocalStorage; + function waitForFunction(test, callback, numberOfTries, delay) { + var attemptsRemaining = numberOfTries; + var timerId; + var validateFunction = function () { + attemptsRemaining--; + if (test()) { + callback(true); + } + else if (attemptsRemaining > 0) { + timerId = window.setTimeout(validateFunction, delay); + attemptsRemaining--; + } + else { + window.clearTimeout(timerId); + callback(false); + } + }; + validateFunction(); + } + OUtil.waitForFunction = waitForFunction; + })(OUtil = OSF.OUtil || (OSF.OUtil = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + OSF.Flights = []; + var TestFlightStart = 1000; + var TestFlightEnd = 1009; + var OUtil; + (function (OUtil) { + var _uniqueId = -1; + var _xdmInfoKey = '&_xdm_Info='; + var _serializerVersionKey = '&_serializer_version='; + var _flightsKey = '&_flights='; + var _xdmSessionKeyPrefix = '_xdm_'; + var _serializerVersionKeyPrefix = '_serializer_version='; + var _flightsKeyPrefix = '_flights='; + var _fragmentSeparator = '#'; + var _fragmentInfoDelimiter = '&'; + function isArray(obj) { + return Object.prototype.toString.apply(obj) === "[object Array]"; + } + OUtil.isArray = isArray; + function isFunction(obj) { + return Object.prototype.toString.apply(obj) === "[object Function]"; + } + OUtil.isFunction = isFunction; + function isDate(obj) { + return Object.prototype.toString.apply(obj) === "[object Date]"; + } + OUtil.isDate = isDate; + function isEdge() { + return typeof (window) !== "undefined" && typeof (window.navigator) !== "undefined" && window.navigator.userAgent.indexOf("Edge") > 0; + } + function isIE() { + return typeof (window) !== "undefined" && typeof (window.navigator) !== "undefined" && window.navigator.userAgent.indexOf("Trident") > 0; + } + function startsWith(originalString, patternToCheck) { + return originalString.substr(0, patternToCheck.length) === patternToCheck; + } + function containsPort(url, protocol, hostname, portNumber) { + return startsWith(url, protocol + "//" + hostname + ":" + portNumber) || startsWith(url, hostname + ":" + portNumber); + } + function addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if (element.attachEvent) { + element.attachEvent("on" + eventName, listener); + } + else { + throw new Error("Cannot attach event"); + } + } + OUtil.addEventListener = addEventListener; + function removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if (element.detachEvent) { + element.detachEvent("on" + eventName, listener); + } + else { + throw new Error("Cannot remove event"); + } + } + OUtil.removeEventListener = removeEventListener; + var DateJSONPrefix = "Date("; + var DataJSONSuffix = ")"; + function serializeSettings(settingsCollection) { + var ret = {}; + for (var key in settingsCollection) { + var value = settingsCollection[key]; + try { + value = JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? DateJSONPrefix + this[k].getTime() + DataJSONSuffix : v; + }); + ret[key] = value; + } + catch (ex) { + } + } + return ret; + } + OUtil.serializeSettings = serializeSettings; + function deserializeSettings(serializedSettings) { + var ret = {}; + serializedSettings = serializedSettings || {}; + for (var key in serializedSettings) { + var value = serializedSettings[key]; + try { + value = JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === DateJSONPrefix && v.slice(-1) === DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + ret[key] = value; + } + catch (ex) { + } + } + return ret; + } + OUtil.deserializeSettings = deserializeSettings; + function convertIntToCssHexColor(val) { + var hex = "#" + (Number(val) + 0x1000000).toString(16).slice(-6); + return hex; + } + OUtil.convertIntToCssHexColor = convertIntToCssHexColor; + function parseAppContextFromWindowName(skipSessionStorage, windowName) { + return OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, "appContext"); + } + OUtil.parseAppContextFromWindowName = parseAppContextFromWindowName; + function parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, "hostInfo"); + } + OUtil.parseHostInfoFromWindowName = parseHostInfoFromWindowName; + function parseXdmInfo(skipSessionStorage) { + var xdmInfoValue = OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue = OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + } + OUtil.parseXdmInfo = parseXdmInfo; + function parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, "xdmInfo"); + } + OUtil.parseXdmInfoFromWindowName = parseXdmInfoFromWindowName; + function parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + } + OUtil.parseXdmInfoWithGivenFragment = parseXdmInfoWithGivenFragment; + function parseSerializerVersion(skipSessionStorage) { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + } + OUtil.parseSerializerVersion = parseSerializerVersion; + function parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, "serializerVersion")); + } + OUtil.parseSerializerVersionFromWindowName = parseSerializerVersionFromWindowName; + function parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + } + OUtil.parseSerializerVersionWithGivenFragment = parseSerializerVersionWithGivenFragment; + function parseFlights(skipSessionStorage) { + var flights = parseFlightsWithGivenFragment(skipSessionStorage, window.location.hash); + if (flights.length == 0) { + flights = parseFlightsFromWindowName(skipSessionStorage, window.name); + } + return flights; + } + OUtil.parseFlights = parseFlights; + function checkFlight(flight) { + return OSF.Flights && OSF.Flights.indexOf(flight) >= 0; + } + OUtil.checkFlight = checkFlight; + function parseFlightsFromWindowName(skipSessionStorage, windowName) { + return parseArrayWithDefault(parseInfoFromWindowName(skipSessionStorage, windowName, "flights")); + } + function parseFlightsWithGivenFragment(skipSessionStorage, fragment) { + return parseArrayWithDefault(parseInfoWithGivenFragment(_flightsKey, _flightsKeyPrefix, true, skipSessionStorage, fragment)); + } + function parseArrayWithDefault(jsonString) { + var array = []; + try { + array = JSON.parse(jsonString); + } + catch (ex) { } + if (!Array.isArray(array)) { + array = []; + } + return array; + } + function parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = OUtil.getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj != null) { + var sessionKey = windowNameObj["baseFrameName"] + infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + } + OUtil.parseInfoFromWindowName = parseInfoFromWindowName; + function parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue != null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >= 0) { + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue = decodeURIComponent(infoValue); + } + var osfSessionStorage = OUtil.getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd = window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd == -1) { + sessionKeyEnd = window.name.length; + } + var sessionKey = window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue = osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + } + OUtil.parseInfoWithGivenFragment = parseInfoWithGivenFragment; + function getConversationId() { + var searchString = window.location.search; + var conversationId = null; + if (searchString) { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1) === '=') { + conversationId = conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId = decodeURIComponent(conversationId); + } + } + } + return conversationId; + } + OUtil.getConversationId = getConversationId; + function getInfoItems(strInfo) { + var items = strInfo.split('$'); + if (typeof items[1] == "undefined") { + items = strInfo.split("|"); + } + if (typeof items[1] == "undefined") { + items = strInfo.split("%7C"); + } + return items; + } + OUtil.getInfoItems = getInfoItems; + function getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue = ''; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if (items != undefined && items.length >= 3) { + switch (xdmFieldName) { + case "ConversationUrl": + fieldValue = items[2]; + break; + case "AppId": + fieldValue = items[1]; + break; + } + } + } + return fieldValue; + } + OUtil.getXdmFieldValue = getXdmFieldValue; + function getRedundandPortString(url, parser) { + if (!url || !parser) + return ""; + if (parser.protocol == "https:" && containsPort(url, "https:", parser.hostname, "443")) + return ":443"; + else if (parser.protocol == "http:" && containsPort(url, "http:", parser.hostname, "80")) + return ":80"; + return ""; + } + function cleanUrlOfChar(url, charToClean) { + for (var i = 0; i < url.length; i++) { + if (url.charAt(i) === charToClean) { + if (i + 1 >= url.length) { + return this.removeChar(url, i); + } + else if (charToClean === '/') { + if (url.charAt(i + 1) === '?' || url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + else if (charToClean === '?') { + if (url.charAt(i + 1) === '#') { + return this.removeChar(url, i); + } + } + } + } + return url; + } + function cleanUrl(url) { + url = cleanUrlOfChar(url, '/'); + url = cleanUrlOfChar(url, '?'); + url = cleanUrlOfChar(url, '#'); + if (url.substr(0, 8) == "https://") { + var portIndex = url.indexOf(":443"); + if (portIndex != -1) { + if (portIndex == url.length - 4 || url.charAt(portIndex + 4) == "/" || url.charAt(portIndex + 4) == "?" || url.charAt(portIndex + 4) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 4); + } + } + } + else if (url.substr(0, 7) == "http://") { + var portIndex = url.indexOf(":80"); + if (portIndex != -1) { + if (portIndex == url.length - 3 || url.charAt(portIndex + 3) == "/" || url.charAt(portIndex + 3) == "?" || url.charAt(portIndex + 3) == "#") { + url = url.substring(0, portIndex) + url.substring(portIndex + 3); + } + } + } + return url; + } + function parseUrl(url, enforceHttps) { + if (enforceHttps === void 0) { enforceHttps = false; } + if (typeof url === "undefined" || !url) { + return undefined; + } + var notHttpsErrorMessage = "NotHttps"; + var invalidUrlErrorMessage = "InvalidUrl"; + var isIEBoolean = isIE(); + var isEdgeBoolean = isEdge(); + var parsedUrlObj = { + protocol: undefined, + hostname: undefined, + host: undefined, + port: undefined, + pathname: undefined, + search: undefined, + hash: undefined, + isPortPartOfUrl: undefined + }; + try { + if (isIEBoolean) { + var parser = document.createElement("a"); + parser.href = url; + if (!parser || !parser.protocol || !parser.host || !parser.hostname || !parser.href + || cleanUrl(parser.href).toLowerCase() !== cleanUrl(url).toLowerCase()) { + throw invalidUrlErrorMessage; + } + if (OSF.OUtil.checkFlight(2)) { + if (enforceHttps && parser.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + var redundandPortString = getRedundandPortString(url, parser); + parsedUrlObj.protocol = parser.protocol; + parsedUrlObj.hostname = parser.hostname; + parsedUrlObj.port = (redundandPortString == "") ? parser.port : ""; + parsedUrlObj.host = (redundandPortString != "") ? parser.hostname : parser.host; + parsedUrlObj.pathname = (isIEBoolean ? "/" : "") + parser.pathname; + parsedUrlObj.search = parser.search; + parsedUrlObj.hash = parser.hash; + parsedUrlObj.isPortPartOfUrl = containsPort(url, parser.protocol, parser.hostname, parser.port); + } + else { + var urlObj = new URL(url); + if (urlObj && urlObj.protocol && urlObj.host && urlObj.hostname) { + if (OSF.OUtil.checkFlight(2)) { + if (enforceHttps && urlObj.protocol != "https:") + throw new Error(notHttpsErrorMessage); + } + parsedUrlObj.protocol = urlObj.protocol; + parsedUrlObj.hostname = urlObj.hostname; + parsedUrlObj.port = urlObj.port; + parsedUrlObj.host = urlObj.host; + parsedUrlObj.pathname = urlObj.pathname; + parsedUrlObj.search = urlObj.search; + parsedUrlObj.hash = urlObj.hash; + parsedUrlObj.isPortPartOfUrl = urlObj.host.lastIndexOf(":" + urlObj.port) == (urlObj.host.length - urlObj.port.length - 1); + } + } + } + catch (err) { + if (err.message === notHttpsErrorMessage) + throw err; + } + return parsedUrlObj; + } + OUtil.parseUrl = parseUrl; + function _reOrderTabbableElements(elements) { + var bucket0 = []; + var bucketPositive = []; + var i; + var len = elements.length; + var ele; + for (i = 0; i < len; i++) { + ele = elements[i]; + if (ele.tabIndex) { + if (ele.tabIndex > 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex === 0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive = bucketPositive.sort(function (left, right) { + var diff = left.tabIndex - right.tabIndex; + if (diff === 0) { + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + function focusToFirstTabbable(all, backward) { + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findNextPos = function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && backward) { + return -1; + } + else if (currPos === allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if (all.length === 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, backward); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + } + OUtil.focusToFirstTabbable = focusToFirstTabbable; + function focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function (e) { + focused = true; + }; + var findCurrPos = function (all, curr) { + var i = 0; + for (; i < all.length; i++) { + if (all[i] === curr) { + return i; + } + } + return -1; + }; + var findNextPos = function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos === 0 && shift) { + return -1; + } + else if (currPos === allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos + 1; + } + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all, curr); + next = findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >= 0 && next < all.length) { + candidate = all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next = findNextPos(all.length, next, shift); + if (!focused && candidate === document.activeElement) { + focused = true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + } + OUtil.focusToNextTabbable = focusToNextTabbable; + function defineMethodOnNamespace(o, name, method) { + o[name] = method; + } + OUtil.defineMethodOnNamespace = defineMethodOnNamespace; + function isDialog() { + return OSF._OfficeAppFactory.getHostInfo().isDialog; + } + OUtil.isDialog = isDialog; + function isPopupWindow() { + return OSF.OUtil.isDialog() + && OSF._OfficeAppFactory.getHostInfo().hostPlatform == OSF.HostInfoPlatform.web + && window.opener != null; + } + OUtil.isPopupWindow = isPopupWindow; + function getHostPlatform() { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + return hostInfo.hostPlatform; + } + OUtil.getHostPlatform = getHostPlatform; + function getCustomOfficeInitializationSettings() { + return typeof officeInitializationSettings === "object" ? officeInitializationSettings : {}; + } + OUtil.getCustomOfficeInitializationSettings = getCustomOfficeInitializationSettings; + })(OUtil = OSF.OUtil || (OSF.OUtil = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var ParameterNames; + (function (ParameterNames) { + ParameterNames.Callback = "callback"; + ParameterNames.AsyncContext = "asyncContext"; + ParameterNames.Data = "data"; + ParameterNames.MessageToParent = "messageToParent"; + ParameterNames.MessageContent = "messageContent"; + ParameterNames.MessageOrigin = "messageOrigin"; + ParameterNames.TargetOrigin = "targetOrigin"; + ParameterNames.AppCommandInvocationCompletedData = "appCommandInvocationCompletedData"; + })(ParameterNames = OSF.ParameterNames || (OSF.ParameterNames = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var Requirement; + (function (Requirement) { + var RequirementVersion = (function () { + function RequirementVersion() { + } + return RequirementVersion; + }()); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = (function () { + function RequirementMatrix(_setMap) { + this._setMap = _setMap; + } + RequirementMatrix.prototype.isSetSupported = function (name, minVersion) { + if (name == undefined) { + return false; + } + if (minVersion == undefined) { + minVersion = 0; + } + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if (sets.hasOwnProperty(name.toLowerCase())) { + var setMaxVersion = sets[name.toLowerCase()]; + try { + var setMaxVersionNum = this._getVersion(setMaxVersion + ""); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.major > 0 && + setMaxVersionNum.minor >= 0 && + setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor >= minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + RequirementMatrix.prototype._getVersion = function (version) { + version = version + ""; + var temp = version.split("."); + var major = 0; + var minor = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } + } + var result = { "minor": minor, "major": major }; + return result; + }; + return RequirementMatrix; + }()); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = (function () { + function DefaultSetRequirement(setMap) { + this._sets = setMap; + } + DefaultSetRequirement.prototype._addSetMap = function (addedSet) { + for (var name in addedSet) { + this._sets[name] = addedSet[name]; + } + }; + return DefaultSetRequirement; + }()); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultRequiredDialogSetRequirement = (function (_super) { + __extends(DefaultRequiredDialogSetRequirement, _super); + function DefaultRequiredDialogSetRequirement() { + return _super.call(this, { + "dialogapi": 1.1 + }) || this; + } + return DefaultRequiredDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultRequiredDialogSetRequirement = DefaultRequiredDialogSetRequirement; + var DefaultOptionalDialogSetRequirement = (function (_super) { + __extends(DefaultOptionalDialogSetRequirement, _super); + function DefaultOptionalDialogSetRequirement() { + return _super.call(this, { + "dialogorigin": 1.1 + }) || this; + } + return DefaultOptionalDialogSetRequirement; + }(DefaultSetRequirement)); + Requirement.DefaultOptionalDialogSetRequirement = DefaultOptionalDialogSetRequirement; + var RequirementsMatrixFactory = (function () { + function RequirementsMatrixFactory() { + } + RequirementsMatrixFactory.getDefaultRequirementMatrix = function (appContext) { + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0) { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == OSF.HostInfoPlatform.web) { + try { + var setName = "dialogorigin"; + if (!matrixItem.hasOwnProperty(setName)) { + matrixItem[setName] = 1.1; + } + } + catch (ex) { } + } + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})); + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function (appContext) { + var setRequirements = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if (clientRequirement != undefined && clientRequirement.length > 0) { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + setRequirements = new DefaultSetRequirement(matrixItem); + } + else { + setRequirements = new DefaultRequiredDialogSetRequirement(); + var mainRequirement = appContext.get_requirementMatrix(); + if (mainRequirement != undefined && mainRequirement.length > 0 && typeof (JSON) !== "undefined") { + var matrixItem = JSON.parse(mainRequirement.toLowerCase()); + for (var name in setRequirements._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + var dialogOptionalSetRequirement = new DefaultOptionalDialogSetRequirement(); + for (var name in dialogOptionalSetRequirement._sets) { + if (matrixItem.hasOwnProperty(name)) { + setRequirements._sets[name] = matrixItem[name]; + } + } + } + } + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == OSF.HostInfoPlatform.web) { + try { + var setName = "dialogorigin"; + if (!setRequirements._sets.hasOwnProperty(setName) && window.opener) { + setRequirements._sets[setName] = 1.1; + } + } + catch (ex) { } + } + return new RequirementMatrix(setRequirements); + }; + return RequirementsMatrixFactory; + }()); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory; + })(Requirement = OSF.Requirement || (OSF.Requirement = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var DDA; + (function (DDA) { + var RichApi; + (function (RichApi) { + function executeRichApiRequestAsync(messageSafearray, callback) { + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + var dataTransform = { + toSafeArrayHost: function () { + return [messageSafearray]; + }, + fromSafeArrayHost: function (payload) { + return { + data: payload + }; + }, + toWebHost: function () { + return { + ArrayData: messageSafearray + }; + }, + fromWebHost: function (payload) { + return { + data: payload.Data + }; + } + }; + asyncMethodExecutor.executeAsync(93, dataTransform, callback); + } + RichApi.executeRichApiRequestAsync = executeRichApiRequestAsync; + var _richApiMessageManager; + Object.defineProperty(RichApi, 'richApiMessageManager', { + get: function () { + if (!_richApiMessageManager) { + _richApiMessageManager = new OSF.RichApiMessageManager(); + } + return _richApiMessageManager; + } + }); + })(RichApi = DDA.RichApi || (DDA.RichApi = {})); + })(DDA = OSF.DDA || (OSF.DDA = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var RichApiMessageManager = (function () { + function RichApiMessageManager() { + this._registerHandlers = []; + this._eventDispatch = new OSF.EventDispatch([ + { + type: OSF.EventType.RichApiMessage, + id: OSF.EventDispId.dispidRichApiMessageEvent, + getTargetId: function () { return ''; }, + fromSafeArrayHost: function (payload) { + var entryArray = payload; + return RichApiMessageManager.transferEventArgument(entryArray); + }, + fromWebHost: function (payload) { + var entryArray = payload.ArrayData; + return RichApiMessageManager.transferEventArgument(entryArray); + } + } + ]); + } + RichApiMessageManager.transferEventArgument = function (entryArray) { + var entries = []; + if (entryArray) { + for (var i = 0; i < entryArray.length; i++) { + var elem = entryArray[i]; + if (elem.toArray) { + elem = elem.toArray(); + } + entries.push({ + messageCategory: elem[0], + messageType: elem[1], + targetId: elem[2], + message: elem[3], + id: elem[4], + isRemoteOverride: elem[5] + }); + } + } + return { + type: OSF.EventType.RichApiMessage, + entries: entries + }; + }; + RichApiMessageManager.prototype.addHandlerAsync = function (eventType, handler, callback) { + OSF.EventHelper.addEventHandler(eventType, handler, callback, this._eventDispatch); + }; + RichApiMessageManager.prototype.removeHandlerAsync = function (eventType, handler, callback) { + OSF.EventHelper.removeEventHandler(eventType, handler, callback, this._eventDispatch); + }; + RichApiMessageManager.prototype.register = function (handler) { + var _this = this; + if (!this._registerPromise) { + this._registerPromise = new Office.Promise(function (resolve, reject) { + _this.addHandlerAsync(OSF.EventType.RichApiMessage, function (args) { + _this._registerHandlers.forEach(function (value) { + if (value) { + value(args); + } + }); + }, function (asyncResult) { + if (asyncResult.status == 'failed') { + reject(asyncResult.error); + } + else { + resolve(); + } + }); + }); + } + return this._registerPromise.then(function () { + _this._registerHandlers.push(handler); + }); + }; + return RichApiMessageManager; + }()); + OSF.RichApiMessageManager = RichApiMessageManager; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var RichClientHostController = (function () { + function RichClientHostController() { + } + RichClientHostController.prototype.execute = function (id, params, callback) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.Execute(id, params, callback, OsfOMToken); + } + else { + window.external.Execute(id, params, callback); + } + }; + RichClientHostController.prototype.registerEvent = function (id, eventType, targetId, handler, callback) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.RegisterEvent(id, targetId, handler, callback, OsfOMToken); + } + else { + window.external.RegisterEvent(id, targetId, handler, callback); + } + }; + RichClientHostController.prototype.unregisterEvent = function (id, eventType, targetId, callback) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.UnregisterEvent(id, targetId, callback, OsfOMToken); + } + else { + window.external.UnregisterEvent(id, targetId, callback); + } + }; + RichClientHostController.prototype.closeSdxDialog = function (context) { + throw OSF.Utility.createNotImplementedException(); + }; + return RichClientHostController; + }()); + OSF.RichClientHostController = RichClientHostController; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var RichClientInitializationHelper = (function (_super) { + __extends(RichClientInitializationHelper, _super); + function RichClientInitializationHelper() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.officeThemeTimeStamp = null; + _this.officeTheme = null; + return _this; + } + RichClientInitializationHelper.prototype.getOsfControlContext = function () { + if (!this._osfControlContext) { + var warningText = "Warning: Office.js is loaded outside of Office client"; + try { + if (window.external) { + this._osfControlContext = window.external.GetContext(); + } + else { + console.error("There is no window.external."); + OSF.Utility.trace(warningText); + return null; + } + } + catch (e) { + console.error("Error when call window.external.GetContext() :" + JSON.stringify(e)); + OSF.Utility.trace(warningText); + return null; + } + } + return this._osfControlContext; + }; + RichClientInitializationHelper.prototype.getAppContext = function (wnd, onSuccess, onError) { + var _this = this; + var context = this.getOsfControlContext(); + if (!context) { + onError(new Error("The Office.js is loaded outside of Office client")); + return; + } + var appType; + var id; + var version; + var minorVersion; + var UILocale; + var dataLocale; + var docUrl; + var clientMode; + var activationMode; + var reason; + var osfControlType; + var eToken; + var correlationId; + var appInstanceId; + var touchEnabled; + var commerceAllowed; + var requirementMatrix; + var hostCustomMessage; + var hostFullVersion; + var dialogRequirementMatrix; + var sdxFeatureGates; + var initialDisplayMode = 0; + var settingsFunc; + var officeThemeFunc; + var hostSettingsFunc; + var fallback = false; + var externalNativeFunctionExists = OSF.Utility.externalNativeFunctionExists; + if (!externalNativeFunctionExists(typeof context.GetContextDataInJson)) { + fallback = true; + } + else { + var contextJsonString; + if (typeof OsfOMToken !== 'undefined' && OsfOMToken) { + contextJsonString = context.GetContextDataInJson(OsfOMToken); + var contextJson; + if (contextJsonString) { + contextJson = JSON.parse(contextJsonString); + } + if (!contextJson) { + fallback = true; + } + else { + appType = contextJson.appType; + id = contextJson.solutionRef; + version = contextJson.versionMajor; + minorVersion = contextJson.versionMinor; + UILocale = contextJson.uiLocale; + dataLocale = contextJson.dataLocale; + docUrl = contextJson.docUrl; + clientMode = contextJson.clientMode; + activationMode = contextJson.activationMode; + osfControlType = contextJson.controlType; + eToken = contextJson.eToken; + correlationId = contextJson.correlationId; + appInstanceId = contextJson.appInstanceId; + touchEnabled = contextJson.touchEnabled; + commerceAllowed = context.commerceAllowed; + requirementMatrix = contextJson.requirementMatrix; + hostFullVersion = contextJson.hostFullVersion; + dialogRequirementMatrix = contextJson.requirementMatrix; + var sdxFeatureGatesJson = contextJson.featureGates; + if (sdxFeatureGatesJson) { + sdxFeatureGates = JSON.parse(sdxFeatureGatesJson); + } + initialDisplayMode = contextJson.initialDisplayMode; + settingsFunc = function () { + var settingsString = contextJson.settings; + var settings; + if (settingsString) { + settings = JSON.parse(settingsString); + } + var serializedSettings = {}; + if (settings) { + var names = settings.names; + var values = settings.values; + for (var index = 0; index < names.length; index++) { + serializedSettings[names[index]] = values[index]; + } + } + return serializedSettings; + }; + officeThemeFunc = function () { + var osfOfficeThemeInfoString = contextJson.themeInfo; + return _this.getOfficeThemeFromInfoString(osfOfficeThemeInfoString); + }; + } + } + else { + fallback = true; + } + } + if (fallback) { + appType = context.GetAppType(); + id = context.GetSolutionRef(); + version = context.GetAppVersionMajor(); + minorVersion = context.GetAppVersionMinor(); + UILocale = context.GetAppUILocale(); + dataLocale = context.GetAppDataLocale(); + docUrl = context.GetDocUrl(); + clientMode = context.GetAppCapabilities(); + activationMode = context.GetActivationMode(); + osfControlType = context.GetControlIntegrationLevel(); + try { + eToken = context.GetSolutionToken(); + } + catch (ex) { + } + var externalNativeFunctionExists = OSF.Utility.externalNativeFunctionExists; + if (externalNativeFunctionExists(typeof context.GetCorrelationId)) { + correlationId = context.GetCorrelationId(); + } + if (externalNativeFunctionExists(typeof context.GetInstanceId)) { + appInstanceId = context.GetInstanceId(); + } + if (externalNativeFunctionExists(typeof context.GetTouchEnabled)) { + touchEnabled = context.GetTouchEnabled(); + } + if (externalNativeFunctionExists(typeof context.GetCommerceAllowed)) { + commerceAllowed = context.GetCommerceAllowed(); + } + if (externalNativeFunctionExists(typeof context.GetSupportedMatrix)) { + requirementMatrix = context.GetSupportedMatrix(); + } + if (externalNativeFunctionExists(typeof context.GetHostCustomMessage)) { + hostCustomMessage = context.GetHostCustomMessage(); + } + if (externalNativeFunctionExists(typeof context.GetHostFullVersion)) { + hostFullVersion = context.GetHostFullVersion(); + } + if (externalNativeFunctionExists(typeof context.GetDialogRequirementMatrix)) { + dialogRequirementMatrix = context.GetDialogRequirementMatrix(); + } + if (externalNativeFunctionExists(typeof context.GetFeaturesForSolution)) { + try { + var sdxFeatureGatesJson = context.GetFeaturesForSolution(); + if (sdxFeatureGatesJson) { + sdxFeatureGates = JSON.parse(sdxFeatureGatesJson); + } + } + catch (ex) { + OSF.Utility.trace("Exception while creating the SDX FeatureGates object. Details: " + ex); + } + } + if (externalNativeFunctionExists(typeof context.GetInitialDisplayMode)) { + initialDisplayMode = context.GetInitialDisplayMode(); + } + settingsFunc = function () { return _this.getSerializedSettings(); }; + officeThemeFunc = function () { return _this.getOfficeTheme(); }; + hostSettingsFunc = function () { return _this.getSerializedHostSettings(); }; + } + reason = (activationMode === 2) ? Office.InitializationReason.DocumentOpened : Office.InitializationReason.Inserted; + eToken = eToken ? eToken.toString() : ""; + var returnedContext = new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, settingsFunc, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, undefined, undefined, undefined, undefined, dialogRequirementMatrix, sdxFeatureGates, officeThemeFunc, initialDisplayMode, undefined, undefined, hostSettingsFunc, false); + onSuccess(returnedContext); + return; + }; + RichClientInitializationHelper.prototype.createClientHostController = function () { + if (!this._clientHostController) { + if (this._hostInfo.hostPlatform === OSF.HostInfoPlatform.win32) { + this._clientHostController = new OSF.Win32RichClientHostController(); + } + else { + throw OSF.Utility.createNotImplementedException(); + } + } + return this._clientHostController; + }; + RichClientInitializationHelper.prototype.createAsyncMethodExecutor = function () { + return new OSF.SafeArrayAsyncMethodExecutor(this._clientHostController); + }; + RichClientInitializationHelper.prototype.createClientSettingsManager = function () { + var manager = new OSF.RichClientSettingsManager(this.getOsfControlContext()); + return manager; + }; + RichClientInitializationHelper.prototype.getSerializedSettings = function () { + var osfControlContext = this.getOsfControlContext(); + var keys = []; + var values = []; + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + osfControlContext.GetSettings(OsfOMToken).Read(keys, values); + } + else { + osfControlContext.GetSettings().Read(keys, values); + } + var serializedSettings = {}; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + return serializedSettings; + }; + RichClientInitializationHelper.prototype.getOfficeTheme = function () { + var osfControlContext = this.getOsfControlContext(); + if (osfControlContext) { + if (!this.officeTheme || !this.officeThemeTimeStamp || !((new Date()).getTime() - this.officeThemeTimeStamp < RichClientInitializationHelper.officeThemeCacheValidPeriod)) { + var osfOfficeThemeInfoString = osfControlContext.GetOfficeThemeInfo(); + this.officeTheme = this.getOfficeThemeFromInfoString(osfOfficeThemeInfoString); + this.officeThemeTimeStamp = (new Date()).getTime(); + } + return this.officeTheme; + } + }; + RichClientInitializationHelper.prototype.getOfficeThemeFromInfoString = function (osfOfficeThemeInfoString) { + var osfOfficeTheme; + if (osfOfficeThemeInfoString) { + osfOfficeTheme = JSON.parse(osfOfficeThemeInfoString); + for (var color in osfOfficeTheme) { + osfOfficeTheme[color] = OSF.OUtil.convertIntToCssHexColor(osfOfficeTheme[color]); + } + } + return osfOfficeTheme; + }; + RichClientInitializationHelper.prototype.getSerializedHostSettings = function () { + var osfControlContext = this.getOsfControlContext(); + var keys = []; + var values = []; + if (typeof osfControlContext.GetSettings().ReadHost === 'function') { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + osfControlContext.GetSettings(OsfOMToken).ReadHost(keys, values); + } + else { + osfControlContext.GetSettings().ReadHost(keys, values); + } + } + var serializedSettings = {}; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + return serializedSettings; + }; + RichClientInitializationHelper.officeThemeCacheValidPeriod = 5000; + return RichClientInitializationHelper; + }(OSF.InitializationHelper)); + OSF.RichClientInitializationHelper = RichClientInitializationHelper; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var RichClientSettingsManager = (function () { + function RichClientSettingsManager(_osfClientContext) { + this._osfClientContext = _osfClientContext; + } + RichClientSettingsManager.prototype.read = function (onComplete) { + var osfControlContext = this._osfClientContext; + var osfSettingsObj; + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + osfSettingsObj = osfControlContext.GetSettings(OsfOMToken); + } + else { + osfSettingsObj = osfControlContext.GetSettings(); + } + var readSettingsAndReturn = function () { + var keys = []; + var values = []; + osfSettingsObj.Read(keys, values); + var serializedSettings = {}; + for (var index = 0; index < keys.length; index++) { + serializedSettings[keys[index]] = values[index]; + } + if (onComplete) { + onComplete(0, serializedSettings); + } + }; + if (osfSettingsObj.RefreshAsync) { + osfSettingsObj.RefreshAsync(function () { + readSettingsAndReturn(); + }); + } + else { + readSettingsAndReturn(); + } + }; + RichClientSettingsManager.prototype.write = function (serializedSettings, onComplete) { + var keys = []; + var values = []; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + var osfControlContext = this._osfClientContext; + var settingObj; + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + settingObj = osfControlContext.GetSettings(OsfOMToken); + } + else { + settingObj = osfControlContext.GetSettings(); + } + if (typeof settingObj.WriteAsync != 'undefined') { + settingObj.WriteAsync(keys, values, onComplete); + } + else { + settingObj.Write(keys, values); + onComplete(0); + } + }; + return RichClientSettingsManager; + }()); + OSF.RichClientSettingsManager = RichClientSettingsManager; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var SafeArrayAsyncMethodExecutor = (function (_super) { + __extends(SafeArrayAsyncMethodExecutor, _super); + function SafeArrayAsyncMethodExecutor(_clientHostController) { + var _this = _super.call(this) || this; + _this._clientHostController = _clientHostController; + _this._asyncMethodExecutorHelper = OSF.BootStrapExtension.createAsyncMethodExecutorHelper(_this); + return _this; + } + SafeArrayAsyncMethodExecutor.prototype.executeAsync = function (id, dataTransform, callback, asyncContext) { + var _this = this; + try { + var chunkResultData = new Array(); + this._clientHostController.execute(id, dataTransform.toSafeArrayHost(), function (hostResponseArgsNative, resultCode) { + var hostResponseArgs = OSF.Utility.fromSafeArray(hostResponseArgsNative); + return _this._asyncMethodExecutorHelper.handleSafeArrayHostResponse(hostResponseArgs, resultCode, chunkResultData, callback, dataTransform, id, asyncContext); + }); + } + catch (ex) { + this.onException(ex, id, callback); + } + }; + SafeArrayAsyncMethodExecutor.prototype.registerEventAsync = function (id, eventType, targetId, handler, dataTransform, callback, asyncContext) { + var _this = this; + try { + this._clientHostController.registerEvent(id, eventType, targetId, function (eventDispId, payload) { + var eventPayload = OSF.Utility.fromSafeArray(payload); + var eventArgs = dataTransform.fromSafeArrayHost(eventPayload); + handler(eventArgs); + }, function (hostResponseArgsNative) { + var result; + var status; + var hostResponseArgs = OSF.Utility.fromSafeArray(hostResponseArgsNative); + if (typeof hostResponseArgs === "number") { + result = []; + status = hostResponseArgs; + } + else { + result = hostResponseArgs; + status = result[0]; + } + _this.invokeCallback(id, callback, status, null, asyncContext); + return true; + }); + } + catch (ex) { + this.onException(ex, id, callback); + } + }; + SafeArrayAsyncMethodExecutor.prototype.unregisterEventAsync = function (id, eventType, targetId, callback, asyncContext) { + var _this = this; + try { + this._clientHostController.unregisterEvent(id, eventType, targetId, function (hostResponseArgsNative, resultCode) { + var result; + var status; + var hostResponseArgs = OSF.Utility.fromSafeArray(hostResponseArgsNative); + if (typeof hostResponseArgs === "number") { + result = []; + status = hostResponseArgs; + } + else { + result = hostResponseArgs; + status = result[0]; + } + _this.invokeCallback(id, callback, status, null, asyncContext); + return true; + }); + } + catch (ex) { + this.onException(ex, id, callback); + } + }; + SafeArrayAsyncMethodExecutor.prototype.onException = function (ex, dispId, callback) { + var status; + var statusNumber = ex.number; + if (statusNumber) { + switch (statusNumber) { + case -2146828218: + status = 7000; + break; + case -2147467259: + if (dispId == OSF.EventDispId.dispidDialogMessageReceivedEvent) { + status = 12007; + } + else { + status = 5001; + } + break; + case -2146828283: + status = 5010; + break; + case -2147209089: + status = 5010; + break; + case -2147208704: + status = 5100; + break; + case -2146827850: + default: + status = 5001; + break; + } + } + if (callback) { + this.invokeCallback(dispId, callback, status || 5001, null); + } + }; + return SafeArrayAsyncMethodExecutor; + }(OSF.AsyncMethodExecutor)); + OSF.SafeArrayAsyncMethodExecutor = SafeArrayAsyncMethodExecutor; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var SafeStorage = (function () { + function SafeStorage(_internalStorage) { + this._internalStorage = _internalStorage; + } + SafeStorage.prototype.getItem = function (key) { + try { + return this._internalStorage && this._internalStorage.getItem(key); + } + catch (e) { + return null; + } + }; + SafeStorage.prototype.setItem = function (key, data) { + try { + this._internalStorage && this._internalStorage.setItem(key, data); + } + catch (e) { + } + }; + SafeStorage.prototype.clear = function () { + try { + this._internalStorage && this._internalStorage.clear(); + } + catch (e) { + } + }; + SafeStorage.prototype.removeItem = function (key) { + try { + this._internalStorage && this._internalStorage.removeItem(key); + } + catch (e) { + } + }; + SafeStorage.prototype.getKeysWithPrefix = function (keyPrefix) { + var keyList = []; + try { + var len = this._internalStorage && this._internalStorage.length || 0; + for (var i = 0; i < len; i++) { + var key = this._internalStorage.key(i); + if (key.indexOf(keyPrefix) === 0) { + keyList.push(key); + } + } + } + catch (e) { + } + return keyList; + }; + return SafeStorage; + }()); + OSF.SafeStorage = SafeStorage; +})(OSF || (OSF = {})); +var Office; +(function (Office) { + var Settings = (function () { + function Settings(settings, _clientSettingsManager) { + var _this = this; + this._clientSettingsManager = _clientSettingsManager; + settings = settings || {}; + this._settings = settings; + this._eventDispatch = new OSF.EventDispatch([ + { + id: OSF.EventDispId.dispidSettingsChangedEvent, + type: OSF.EventType.SettingsChanged, + getTargetId: function () { return ''; }, + fromSafeArrayHost: function (payload) { + return { + type: OSF.EventType.SettingsChanged, + settings: _this + }; + }, + fromWebHost: function (payload) { + return { + type: OSF.EventType.SettingsChanged, + settings: _this + }; + } + } + ]); + } + Settings.prototype.cacheSessionSettings = function (settings) { + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var serializedSettings = OSF.OUtil.serializeSettings(settings); + var storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + }; + Settings.prototype.get = function (name) { + var setting = this._settings[name]; + return typeof (setting) === 'undefined' ? null : setting; + }; + Settings.prototype.set = function (name, value) { + this._settings[name] = value; + this.cacheSessionSettings(this._settings); + }; + Settings.prototype.remove = function (name) { + delete this._settings[name]; + this.cacheSessionSettings(this._settings); + }; + Settings.prototype.saveAsync = function (callback) { + var settingsManager = this._clientSettingsManager; + var serializedSettings = OSF.OUtil.serializeSettings(this._settings); + settingsManager.write(serializedSettings, function (errorCode) { + var result = OSF.Utility.asyncResultFromErrorCode(errorCode); + if (callback) { + callback(result); + } + }); + }; + Settings.prototype.refreshAsync = function (callback) { + var _this = this; + var settingsManager = this._clientSettingsManager; + settingsManager.read(function (errorCode, serializedSettings) { + var result = OSF.Utility.asyncResultFromErrorCode(errorCode); + if (result.status === Office.AsyncResultStatus.Succeeded) { + _this._settings = OSF.OUtil.deserializeSettings(serializedSettings); + result.value = _this; + } + if (callback) { + callback(result); + } + }); + }; + Settings.prototype.addHandlerAsync = function (eventType, handler, callback) { + OSF.EventHelper.addEventHandler(eventType, handler, callback, this._eventDispatch); + }; + Settings.prototype.removeHandlerAsync = function (eventType, handler, callback) { + OSF.EventHelper.removeEventHandler(eventType, handler, callback, this._eventDispatch); + }; + Settings.prototype.toJSON = function () { + return this._settings; + }; + return Settings; + }()); + Office.Settings = Settings; +})(Office || (Office = {})); +var OSF; +(function (OSF) { + var SovereignHelper = (function () { + function SovereignHelper() { + } + SovereignHelper.isSovereignVersion = function () { + return (typeof isOsfSovereignVersion !== "undefined" && + isOsfSovereignVersion === true); + }; + SovereignHelper.prototype.getEnvironmentName = function () { + return __awaiter(this, void 0, void 0, function () { + var config; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4, this.getConfig()]; + case 1: + config = _a.sent(); + return [2, config != null && config.envName ? config.envName : null]; + } + }); + }); + }; + SovereignHelper.prototype.getEnvironmentType = function () { + return __awaiter(this, void 0, void 0, function () { + var config; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4, this.getConfig()]; + case 1: + config = _a.sent(); + return [2, config != null && config.envType ? config.envType : null]; + } + }); + }); + }; + SovereignHelper.prototype.getTrustedHostOrigins = function () { + return __awaiter(this, void 0, void 0, function () { + var config; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4, this.getConfig()]; + case 1: + config = _a.sent(); + return [2, config != null ? config.trustedHostOrigins : null]; + } + }); + }); + }; + SovereignHelper.prototype.isConfigAvailable = function () { + return __awaiter(this, void 0, void 0, function () { + var config; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4, this.getConfig()]; + case 1: + config = _a.sent(); + return [2, config ? true : false]; + } + }); + }); + }; + SovereignHelper.prototype.isSovereignHostTrusted = function (hostName) { + return __awaiter(this, void 0, void 0, function () { + var trustedHostOrigins, regexHostName; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!hostName) { + return [2, false]; + } + else if (hostName === window.location.hostname) { + return [2, true]; + } + return [4, this.getTrustedHostOrigins()]; + case 1: + trustedHostOrigins = _a.sent(); + if (!trustedHostOrigins || trustedHostOrigins.length == 0) { + return [2, false]; + } + regexHostName = new RegExp(trustedHostOrigins.join("|")); + return [2, regexHostName.test(hostName)]; + } + }); + }); + }; + SovereignHelper.prototype.getConfigPath = function () { + var basePath = OSF.LoadScriptHelper.getHostBundleJsBasePath(); + if (basePath) { + basePath = basePath.toLowerCase(); + var configRoot = "/lib/"; + var indexofRoot = basePath.indexOf(configRoot); + if (indexofRoot > -1) { + return (basePath + .toLowerCase() + .substring(0, indexofRoot + configRoot.length) + + "officeconfig.json"); + } + } + return ""; + }; + SovereignHelper.prototype.getConfig = function () { + if (!this._configPromise) { + this._configPromise = this.tryLoadConfig(); + } + return this._configPromise; + }; + SovereignHelper.prototype.tryLoadConfig = function () { + return __awaiter(this, void 0, void 0, function () { + var configPath, _localStorage, cacheKey, cacheValue, cacheResult, maxAgeInMs, currentTime, config; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + configPath = this.getConfigPath(); + if (!configPath) return [3, 2]; + _localStorage = OSF.OUtil.getLocalStorage(); + cacheKey = configPath + "_cache"; + cacheValue = _localStorage.getItem(cacheKey); + cacheResult = null; + if (cacheValue) { + try { + cacheResult = JSON.parse(cacheValue); + } + catch (_b) { } + maxAgeInMs = 1000 * 60 * 60 * 24; + currentTime = new Date().getTime(); + if (cacheResult && + cacheResult.config && + cacheResult.createTime <= currentTime && + cacheResult.createTime + maxAgeInMs >= currentTime) { + return [2, cacheResult.config]; + } + } + return [4, this.downloadConfig(configPath)]; + case 1: + config = _a.sent(); + if (config) { + cacheResult = { + createTime: new Date().getTime(), + config: config, + }; + _localStorage.setItem(cacheKey, JSON.stringify(cacheResult)); + } + else if (cacheResult) { + config = cacheResult.config; + } + return [2, config]; + case 2: return [2, null]; + } + }); + }); + }; + SovereignHelper.prototype.downloadConfig = function (configUrl) { + return __awaiter(this, void 0, void 0, function () { + var response, content, ex_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 3, , 4]); + return [4, fetch(configUrl)]; + case 1: + response = _a.sent(); + return [4, response.json()]; + case 2: + content = _a.sent(); + return [2, content]; + case 3: + ex_1 = _a.sent(); + return [3, 4]; + case 4: return [2, null]; + } + }); + }); + }; + return SovereignHelper; + }()); + OSF.SovereignHelper = SovereignHelper; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var Utility; + (function (Utility) { + function createParameterException(message) { + return new Error("Parameter count mismatch: " + message); + } + Utility.createParameterException = createParameterException; + function createArgumentException(name) { + return new Error("Invalid argument " + name); + } + Utility.createArgumentException = createArgumentException; + function createNotImplementedException() { + return new Error("Not implemented yet"); + } + Utility.createNotImplementedException = createNotImplementedException; + function log(message) { + console.log(message); + } + Utility.log = log; + function trace(message) { + console.log(message); + } + Utility.trace = trace; + function debugLog(message) { + console.log(message); + } + Utility.debugLog = debugLog; + function getQueryStringValue(paramName) { + if (typeof (window) !== 'undefined' && window.location && window.location.search) { + var regex = new RegExp('[?&]' + paramName + '=([^&]*)'); + var match = regex.exec(window.location.search); + if (match) { + var ret = match[1]; + return ret; + } + } + return null; + } + Utility.getQueryStringValue = getQueryStringValue; + function isNullOrUndefined(value) { + if (typeof (value) === "undefined") { + return true; + } + if (value === null) { + return true; + } + return false; + } + Utility.isNullOrUndefined = isNullOrUndefined; + function isNullOrEmpty(value) { + if (isNullOrUndefined(value)) { + return true; + } + return (value.length === 0); + } + Utility.isNullOrEmpty = isNullOrEmpty; + function isInUnittest() { + return typeof (g_osfUnittest) === "boolean" && g_osfUnittest; + } + Utility.isInUnittest = isInUnittest; + })(Utility = OSF.Utility || (OSF.Utility = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + function isOfficeReactNative() { + try { + return (typeof OfficePlatformGlobal !== 'undefined' + && typeof OfficePlatformGlobal.ReactNativeReka !== 'undefined'); + } + catch (e) { + return false; + } + } + OSF.isOfficeReactNative = isOfficeReactNative; + var Utility; + (function (Utility) { + function xdmDebugLog(message) { + if (Utility._DebugXdm) { + console.log(message); + } + } + Utility.xdmDebugLog = xdmDebugLog; + function enableDebugXdm() { + Utility._DebugXdm = true; + } + Utility.enableDebugXdm = enableDebugXdm; + function createPromiseFromResult(result) { + return Promise.resolve(result); + } + Utility.createPromiseFromResult = createPromiseFromResult; + function createPromise(executor) { + var ret = new Promise(executor); + return ret; + } + Utility.createPromise = createPromise; + function promisify(action, timeout) { + return createPromise(function (resolve, reject) { + var callback = function (result) { + if (result === 0) { + resolve(); + } + else { + reject(); + } + }; + action(callback); + setTimeout(function () { + reject(); + }, timeout); + }); + } + Utility.promisify = promisify; + function compareVersions(version1, version2) { + var splitVersion1 = version1.split("."); + var splitVersion2 = version2.split("."); + var iter; + for (iter in splitVersion1) { + if (parseInt(splitVersion1[iter]) < parseInt(splitVersion2[iter])) { + return false; + } + else if (parseInt(splitVersion1[iter]) > parseInt(splitVersion2[iter])) { + return true; + } + } + return false; + } + Utility.compareVersions = compareVersions; + function getErrorCodeFromAsyncResult(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + return 0; + } + if (asyncResult.error && asyncResult.error.code) { + return asyncResult.error.code; + } + return 5001; + } + Utility.getErrorCodeFromAsyncResult = getErrorCodeFromAsyncResult; + function externalNativeFunctionExists(type) { + return type === 'unknown' || type !== 'undefined'; + } + Utility.externalNativeFunctionExists = externalNativeFunctionExists; + function stringEndsWith(value, subString) { + if (Utility.isNullOrUndefined(value)) { + throw Utility.createArgumentException("value"); + } + if (Utility.isNullOrUndefined(subString)) { + throw Utility.createArgumentException("subString"); + } + if (subString.length > value.length) { + return false; + } + if (value.substr(value.length - subString.length) === subString) { + return true; + } + return false; + } + Utility.stringEndsWith = stringEndsWith; + function fromSafeArray(value) { + var ret = value; + if ((typeof (value) === "object" || typeof (value) === "unknown") && value != null && value.toArray) { + var arrayResult = value.toArray(); + ret = new Array(arrayResult.length); + for (var i = 0; i < arrayResult.length; i++) { + ret[i] = fromSafeArrayInner(arrayResult[i]); + } + } + return ret; + } + Utility.fromSafeArray = fromSafeArray; + function fromSafeArrayInner(value) { + var ret = value; + var dimensions = 1; + if ((typeof (value) === "object" || typeof (value) === "unknown") && value != null && value.toArray) { + if (value.dimensions) { + dimensions = value.dimensions(); + } + if (dimensions === 2) { + ret = twoDVBArrayToJaggedArray(value); + } + else { + var array = value.toArray(); + ret = new Array(array.length); + for (var i = 0; i < array.length; i++) { + ret[i] = fromSafeArrayInner(array[i]); + } + } + } + return ret; + } + function twoDVBArrayToJaggedArray(vbArr) { + var ret; + try { + var rows = vbArr.ubound(1); + var cols = vbArr.ubound(2); + vbArr = vbArr.toArray(); + if (rows == 1 && cols == 1) { + ret = [vbArr]; + } + else { + var mergedCellGuid = "{66e7831f-81b2-42e2-823c-89e872d541b3}"; + ret = []; + for (var row = 0; row < rows; row++) { + var rowArr = []; + for (var col = 0; col < cols; col++) { + var datum = vbArr[row * cols + col]; + if (datum != mergedCellGuid) { + rowArr.push(datum); + } + } + if (rowArr.length > 0) { + ret.push(rowArr); + } + } + } + } + catch (ex) { + } + return ret; + } + Utility.twoDVBArrayToJaggedArray = twoDVBArrayToJaggedArray; + function asyncResultFromErrorCode(errorCode) { + if (Array.isArray(errorCode) && errorCode.length === 1) { + errorCode = errorCode[0]; + } + if (errorCode === 0) { + return { + status: Office.AsyncResultStatus.Succeeded + }; + } + else { + return { + status: Office.AsyncResultStatus.Failed, + error: { + code: errorCode + } + }; + } + } + Utility.asyncResultFromErrorCode = asyncResultFromErrorCode; + Utility._DebugXdm = false; + })(Utility = OSF.Utility || (OSF.Utility = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WebAsyncMethodExecutor = (function (_super) { + __extends(WebAsyncMethodExecutor, _super); + function WebAsyncMethodExecutor(_clientHostController) { + var _this = _super.call(this) || this; + _this._clientHostController = _clientHostController; + _this._asyncMethodExecutorHelper = OSF.BootStrapExtension.createAsyncMethodExecutorHelper(_this); + return _this; + } + WebAsyncMethodExecutor.prototype.executeAsync = function (id, dataTransform, callback, asyncContext) { + var _this = this; + this._clientHostController.execute(id, dataTransform.toWebHost(), function (resultCode, payload) { + if (callback) { + _this._asyncMethodExecutorHelper.handleWebHostResponse(payload, resultCode, callback, dataTransform, id, asyncContext); + } + return true; + }); + }; + WebAsyncMethodExecutor.prototype.registerEventAsync = function (id, eventType, targetId, handler, dataTransform, callback, asyncContext) { + var _this = this; + this._clientHostController.registerEvent(id, eventType, targetId, function (payload) { + var eventPayload = payload; + var eventArgs = dataTransform.fromWebHost(eventPayload); + handler(eventArgs); + }, function (resultCode, payload) { + if (callback) { + _this.invokeCallback(id, callback, resultCode, null, asyncContext); + } + return true; + }); + }; + WebAsyncMethodExecutor.prototype.unregisterEventAsync = function (id, eventType, targetId, callback, asyncContext) { + var _this = this; + this._clientHostController.unregisterEvent(id, eventType, targetId, function (resultCode, payload) { + if (callback) { + _this.invokeCallback(id, callback, resultCode, null, asyncContext); + } + return true; + }); + }; + return WebAsyncMethodExecutor; + }(OSF.AsyncMethodExecutor)); + OSF.WebAsyncMethodExecutor = WebAsyncMethodExecutor; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var DDA; + (function (DDA) { + var WebAuth; + (function (WebAuth) { + function getAuthContextAsync(callback) { + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + var dataTransform = { + toSafeArrayHost: function () { + return []; + }, + fromSafeArrayHost: function (payload) { + return null; + }, + toWebHost: function () { + return {}; + }, + fromWebHost: function (payload) { + return payload.authContext; + } + }; + asyncMethodExecutor.executeAsync(99, dataTransform, callback); + } + WebAuth.getAuthContextAsync = getAuthContextAsync; + })(WebAuth = DDA.WebAuth || (DDA.WebAuth = {})); + })(DDA = OSF.DDA || (OSF.DDA = {})); + var WebAuth; + (function (WebAuth) { + var AuthFlow; + (function (AuthFlow) { + AuthFlow["AuthCode"] = "authcode"; + AuthFlow["Broker"] = "broker"; + AuthFlow["Implicit"] = "implicit"; + })(AuthFlow = WebAuth.AuthFlow || (WebAuth.AuthFlow = {})); + WebAuth.loadAttempts = 0; + var browserAuthPath = 'webauth/'; + var browserAuthJsDebug = 'webauth.browserauth.debug.js'; + var browserAuthJsShip = 'webauth.browserauth.js'; + function load() { + if (WebAuth.config && WebAuth.config.authFlow === AuthFlow.AuthCode) { + WebAuth.loadAttempts++; + return new Promise(function (resolve, reject) { + var browserAuth_cdn_path = (WebAuth.config && WebAuth.config.authVersion) + ? OSF.LoadScriptHelper.getHostBundleJsBasePath() + browserAuthPath + WebAuth.config.authVersion + "/" + ((WebAuth.config && WebAuth.config.debugging) ? browserAuthJsDebug : browserAuthJsShip) + : OSF.LoadScriptHelper.getHostBundleJsBasePath() + browserAuthPath + ((WebAuth.config && WebAuth.config.debugging) ? browserAuthJsDebug : browserAuthJsShip); + var loadJs = function (targetUrl, isLoaded, allowedDelay) { + return new Promise(function (resolveLoad, rejectLoad) { + if (!targetUrl) { + resolveLoad(null); + return; + } + OSF.OUtil.loadScript(targetUrl, function (event) { + if (typeof event === 'boolean' && !event) { + rejectLoad(new Event("loadScript: failed to load '" + targetUrl + "'")); + return; + } + if (event instanceof Event && event) { + rejectLoad(new Event("loadScript: " + event.type + " '" + targetUrl + "'")); + return; + } + if (allowedDelay && !isLoaded) { + var waited_1 = 0; + var interval_1 = 500; + var waiter_1 = setInterval(function () { + waited_1 += interval_1; + if (isLoaded || waited_1 > allowedDelay) { + clearInterval(waiter_1); + if (!isLoaded) { + rejectLoad(new Event("Missing expected object after loaded.")); + return; + } + } + }, interval_1); + } + else { + resolveLoad(null); + return; + } + }, allowedDelay); + }); + }; + Promise.all([ + loadJs(WebAuth.config.msal, function () { return (!!msal); }, WebAuth.config.delayMsal), + loadJs(browserAuth_cdn_path, function () { return (!!BrowserAuth); }, WebAuth.config.delayWebAuth) + ]).then(function () { + if (WebAuth.config) { + BrowserAuth.Load(WebAuth.config, OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId).then(function (result) { resolve(result); }, function (result) { reject(result); }); + } + else { + BrowserAuth.GetAuthConfig().then(function (configParent) { + WebAuth.config = configParent; + BrowserAuth.Load(WebAuth.config, OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId).then(function (result) { resolve(result); }, function (result) { reject(result); }); + }, function () { reject(new Event("BrowserAuth.GetAuthConfig was failed")); }); + } + }, function (error) { + reject(error); + return; + }); + }); + } + else { + return new Promise(function (resolve, reject) { return (reject(new Event("'authcode' as authFlow is only supported"))); }); + } + } + WebAuth.load = load; + function getToken(target, applicationId, correlationId, popup, authChallenge) { + if (WebAuth.config && WebAuth.config.authFlow === AuthFlow.AuthCode) { + return BrowserAuth.GetToken(target, applicationId, correlationId, !!popup, !!popup, false, authChallenge); + } + else { + return new Promise(function (resolve, reject) { return (reject(new Event("'authcode' as authFlow is only supported"))); }); + } + } + WebAuth.getToken = getToken; + })(WebAuth = OSF.WebAuth || (OSF.WebAuth = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WebClientHostController = (function () { + function WebClientHostController(webAppState) { + this._delegateVersion = 1; + this._webAppState = webAppState; + this._webClientHostControllerHelper = OSF.BootStrapExtension.createWebClientHostControllerHelper(this._webAppState, this._delegateVersion); + } + WebClientHostController.prototype.execute = function (id, params, callback) { + var _this = this; + var hostCallArgs = this._webClientHostControllerHelper.getHostCallArgs(id, params); + var targetMethodName = this._webClientHostControllerHelper.getTargetMethodName(id); + this._webAppState.clientEndPoint.invoke(targetMethodName, function (xdmStatus, payload) { + var error = 0; + if (xdmStatus == 0) { + _this._delegateVersion = payload["Version"]; + error = _this._webClientHostControllerHelper.parseErrorFromPayload(id, payload); + } + else { + switch (xdmStatus) { + case -5: + error = 7000; + break; + default: + error = 5001; + break; + } + } + if (callback) { + callback(error, payload); + } + }, hostCallArgs); + }; + WebClientHostController.prototype.registerEvent = function (id, eventType, targetId, handler, callback) { + this._webAppState.clientEndPoint.registerForEvent(this.getXdmEventName(targetId, eventType), function (payload) { + if (handler) { + handler(payload); + } + }, this._getOnAfterRegisterEvent(true, id, callback), { + controlId: this._webAppState.id, + eventDispId: id, + targetId: targetId, + __timeout__: -1 + }); + }; + WebClientHostController.prototype.unregisterEvent = function (id, eventType, targetId, callback) { + this._webAppState.clientEndPoint.unregisterForEvent(this.getXdmEventName(targetId, eventType), this._getOnAfterRegisterEvent(false, id, callback), { + controlId: this._webAppState.id, + eventDispId: id, + targetId: targetId, + __timeout__: -1 + }); + }; + WebClientHostController.prototype.messageParent = function (params) { + throw OSF.Utility.createNotImplementedException(); + }; + WebClientHostController.prototype.openDialog = function (id, eventType, targetId, handler, callback) { + throw OSF.Utility.createNotImplementedException(); + }; + WebClientHostController.prototype.closeDialog = function (id, eventType, targetId, callback) { + throw OSF.Utility.createNotImplementedException(); + }; + WebClientHostController.prototype.sendMessage = function (params) { + throw OSF.Utility.createNotImplementedException(); + }; + WebClientHostController.prototype.closeSdxDialog = function (context) { + throw OSF.Utility.createNotImplementedException(); + }; + WebClientHostController.prototype.getXdmEventName = function (targetId, eventType) { + if (eventType == OSF.EventType.BindingSelectionChanged || + eventType == OSF.EventType.BindingDataChanged || + eventType == OSF.EventType.DataNodeDeleted || + eventType == OSF.EventType.DataNodeInserted || + eventType == OSF.EventType.DataNodeReplaced) { + return targetId + "_" + eventType; + } + else { + return eventType; + } + }; + WebClientHostController.prototype._getOnAfterRegisterEvent = function (register, id, callback) { + var startTime = (new Date()).getTime(); + return function (xdmStatus, payload) { + var status; + if (xdmStatus != 0) { + switch (xdmStatus) { + case -5: + status = 7000; + break; + default: + status = 5001; + break; + } + } + else { + if (payload) { + if (payload["Error"]) { + status = payload["Error"]; + } + else { + status = 0; + } + } + else { + status = 5001; + } + } + if (callback) { + callback(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, id, Math.abs((new Date()).getTime() - startTime), status); + } + }; + }; + return WebClientHostController; + }()); + OSF.WebClientHostController = WebClientHostController; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WebClientHostControllerHelper = (function () { + function WebClientHostControllerHelper(webAppState, delegateVersion) { + this._webAppState = webAppState; + this._delegateVersion = delegateVersion; + } + WebClientHostControllerHelper.prototype.getHostCallArgs = function (id, params) { + var hostCallArgs = params; + if (!hostCallArgs) { + hostCallArgs = {}; + } + hostCallArgs.DdaMethod = { + ControlId: this.getControlId(), + DispatchId: id, + Version: this._delegateVersion + }; + hostCallArgs.__timeout__ = -1; + return hostCallArgs; + }; + WebClientHostControllerHelper.prototype.getTargetMethodName = function (id) { + return 'executeMethod'; + }; + WebClientHostControllerHelper.prototype.parseErrorFromPayload = function (id, payload) { + return payload["Error"]; + }; + WebClientHostControllerHelper.prototype.getControlId = function () { + return this._webAppState.id; + }; + return WebClientHostControllerHelper; + }()); + OSF.WebClientHostControllerHelper = WebClientHostControllerHelper; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WebClientSettingsManager = (function () { + function WebClientSettingsManager() { + } + WebClientSettingsManager.prototype.read = function (onComplete) { + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + var dataTransform = { + toSafeArrayHost: function () { + return []; + }, + fromSafeArrayHost: function (payload) { + return null; + }, + toWebHost: function () { + return {}; + }, + fromWebHost: function (payload) { + return payload.Properties.Settings; + } + }; + var callback = function (result) { + if (result.status === Office.AsyncResultStatus.Succeeded) { + var serializedSettings = {}; + for (var i = 0; i < result.value.length; i++) { + var entry = result.value[i]; + if (Array.isArray(entry)) { + serializedSettings[entry[0]] = entry[1]; + } + else { + serializedSettings[entry.Name] = entry.Value; + } + } + onComplete(0, serializedSettings); + } + else { + var errorCode = result.error.code; + onComplete(errorCode, {}); + } + }; + asyncMethodExecutor.executeAsync(75, dataTransform, callback); + }; + WebClientSettingsManager.prototype.write = function (serializedSettings, onComplete) { + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + var properties = []; + for (var key in serializedSettings) { + var entry = []; + entry.push(key); + entry.push(serializedSettings[key]); + properties.push(entry); + } + var dataTransform = { + toSafeArrayHost: function () { + return null; + }, + fromSafeArrayHost: function (payload) { + return null; + }, + toWebHost: function () { + return { + DdaSettingsMethod: { + OverwriteIfStale: true, + Properties: properties + } + }; + }, + fromWebHost: function (payload) { + return null; + } + }; + var callback = function (result) { + if (result.status === Office.AsyncResultStatus.Succeeded) { + onComplete(0); + } + else { + var errorCode = result.error.code; + onComplete(errorCode); + } + }; + asyncMethodExecutor.executeAsync(76, dataTransform, callback); + }; + return WebClientSettingsManager; + }()); + OSF.WebClientSettingsManager = WebClientSettingsManager; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WebInitializationHelper = (function (_super) { + __extends(WebInitializationHelper, _super); + function WebInitializationHelper(hostInfo, webAppState, context, hostFacade) { + var _this = _super.call(this, hostInfo, webAppState, context, hostFacade) || this; + _this._appContext = {}; + _this._tabbableElements = "a[href]:not([tabindex='-1'])," + + "area[href]:not([tabindex='-1'])," + + "button:not([disabled]):not([tabindex='-1'])," + + "input:not([disabled]):not([tabindex='-1'])," + + "select:not([disabled]):not([tabindex='-1'])," + + "textarea:not([disabled]):not([tabindex='-1'])," + + "*[tabindex]:not([tabindex='-1'])," + + "*[contenteditable]:not([disabled]):not([tabindex='-1'])"; + return _this; + } + Object.defineProperty(WebInitializationHelper.prototype, "isHostOriginTrusted", { + get: function () { + return this._isHostOriginTrustedFunc; + }, + set: function (value) { + this._isHostOriginTrustedFunc = value; + }, + enumerable: true, + configurable: true + }); + WebInitializationHelper.prototype.saveAndSetDialogInfo = function (hostInfoValue) { + function getAppIdFromWindowLocation() { + var xdmInfoValue = OSF.OUtil.parseXdmInfo(true); + if (xdmInfoValue) { + var items = xdmInfoValue.split("|"); + return items[1]; + } + return null; + } + ; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + if (!hostInfoValue) { + hostInfoValue = OSF.OUtil.parseHostInfoFromWindowName(true, OSF._OfficeAppFactory.getWindowName()); + } + if (hostInfoValue && hostInfoValue.indexOf("isDialog") > -1) { + var appId = getAppIdFromWindowLocation(); + if (appId != null) { + osfSessionStorage.setItem(appId + "IsDialog", "true"); + } + this._hostInfo.isDialog = true; + return; + } + this._hostInfo.isDialog = osfSessionStorage.getItem(OSF.OUtil.getXdmFieldValue("AppId", false) + "IsDialog") != null ? true : false; + } + }; + WebInitializationHelper.prototype.checkReceiverOriginAndRun = function (funcToRun) { + return __awaiter(this, void 0, void 0, function () { + var me, parsedHostname, isHttps, hostName, notHttpsErrorMessage, isOriginValid, isSovereignVersion, sovereignHelper, isConfigAvailable, loadAgaveErrorUX, checkDone; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + me = this; + if (me._webAppState.clientEndPoint.hostTrustCheckStatus === 3) { + funcToRun(); + return [2]; + } + parsedHostname = OSF.OUtil.parseUrl(me._webAppState.clientEndPoint.targetUrl, false); + isHttps = parsedHostname.protocol == "https:"; + hostName = parsedHostname.hostname; + notHttpsErrorMessage = "NotHttps"; + if (!(me._webAppState.clientEndPoint.hostTrustCheckStatus === 0)) return [3, 4]; + if (!isHttps) + me._webAppState.clientEndPoint.hostTrustCheckStatus = 2; + if (!(me._webAppState.clientEndPoint.hostTrustCheckStatus != 2)) return [3, 4]; + isOriginValid = false; + isSovereignVersion = OSF.SovereignHelper.isSovereignVersion(); + if (!isSovereignVersion || OSF.OUtil.getCustomOfficeInitializationSettings().trustAllCloudEnvironments === true) { + isOriginValid = OSF.XdmCommunicationManager.isHostNameValidWacDomain(hostName); + if (me.isHostOriginTrusted) { + isOriginValid = isOriginValid || me.isHostOriginTrusted(hostName); + } + } + if (!(!isOriginValid && isSovereignVersion)) return [3, 3]; + if (!me._sovereignHelper) { + me._sovereignHelper = new OSF.SovereignHelper(); + } + sovereignHelper = me._sovereignHelper; + return [4, sovereignHelper.isConfigAvailable()]; + case 1: + isConfigAvailable = _a.sent(); + if (!isConfigAvailable) { + return [2]; + } + return [4, sovereignHelper.isSovereignHostTrusted(hostName)]; + case 2: + isOriginValid = _a.sent(); + _a.label = 3; + case 3: + if (isOriginValid) + me._webAppState.clientEndPoint.hostTrustCheckStatus = 3; + _a.label = 4; + case 4: + if (!me._webAppState.clientEndPoint.checkStatusLogged && me._hostInfo != null && me._hostInfo !== undefined) { + OSF.AppTelemetry.onCheckWACHost(me._webAppState.clientEndPoint.hostTrustCheckStatus, me._webAppState.id, me._hostInfo.hostType, me._hostInfo.hostPlatform, me._webAppState.clientEndPoint.targetUrl); + me._webAppState.clientEndPoint.checkStatusLogged = true; + } + if (me._webAppState.clientEndPoint.hostTrustCheckStatus === 3 || OSF.LoadScriptHelper.disableHostCheck()) { + funcToRun(); + } + else { + if (OSF.LoadScriptHelper.isSdx()) { + throw new Error("Not supported host"); + } + loadAgaveErrorUX = function () { + var officejsCDNHost = OSF.LoadScriptHelper.getHostBundleJsBasePath().match(/^https?:\/\/[^:/?#]*(?::([0-9]+))?/); + if (officejsCDNHost && officejsCDNHost[0]) { + var agaveErrorUXPath = OSF.LoadScriptHelper.getHostBundleJsBasePath() + 'AgaveErrorUX/index.html#'; + var hashObj = { + error: "NotTrustedWAC", + locale: OSF.getSupportedLocale(me._hostInfo.hostLocale, OSF.ConstantNames.DefaultLocale), + hostname: hostName, + noHttps: !isHttps, + validate: false + }; + var hostUserTrustIframe = document.createElement("iframe"); + hostUserTrustIframe.style.visibility = "hidden"; + hostUserTrustIframe.style.height = "0"; + hostUserTrustIframe.style.width = "0"; + var hostUserTrustCallback = function (event) { + if ((event.source == hostUserTrustIframe.contentWindow) && + (event.origin == officejsCDNHost[0])) { + try { + var receivedObj = JSON.parse(event.data); + if (receivedObj.hostUserTrusted === true) { + me._webAppState.clientEndPoint.hostTrustCheckStatus = 3; + OSF.OUtil.removeEventListener(window, "message", hostUserTrustCallback); + document.body.removeChild(hostUserTrustIframe); + } + else { + hashObj.validate = false; + window.location.replace(agaveErrorUXPath + encodeURIComponent(JSON.stringify(hashObj))); + } + funcToRun(); + } + catch (e) { + OSF.OUtil.ensureOfficeStringsJs().then(function () { + document.body.innerHTML = Strings.OfficeOM.L_NotTrustedWAC; + }); + } + } + }; + OSF.OUtil.addEventListener(window, "message", hostUserTrustCallback); + hashObj.validate = true; + hostUserTrustIframe.setAttribute('src', agaveErrorUXPath + encodeURIComponent(JSON.stringify(hashObj))); + hostUserTrustIframe.onload = function () { + var postingObj = { + hostname: hostName, + noHttps: !isHttps + }; + hostUserTrustIframe.contentWindow.postMessage(JSON.stringify(postingObj), officejsCDNHost[0]); + }; + document.body.appendChild(hostUserTrustIframe); + } + else { + OSF.OUtil.ensureOfficeStringsJs().then(function () { + document.body.innerHTML = Strings.OfficeOM.L_NotTrustedWAC; + }); + } + if (OSF.OUtil.checkFlight(2)) { + if (!isHttps) + throw new Error(notHttpsErrorMessage); + } + }; + if (document.body) { + loadAgaveErrorUX(); + } + else { + checkDone = false; + document.addEventListener('DOMContentLoaded', function () { + if (!checkDone) { + checkDone = true; + loadAgaveErrorUX(); + } + }); + } + } + return [2]; + } + }); + }); + }; + WebInitializationHelper.prototype.setAgaveHostCommunication = function () { + try { + var me = this; + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(false, OSF._OfficeAppFactory.getWindowLocationHash()); + if (!xdmInfoValue) { + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(false, OSF._OfficeAppFactory.getWindowName()); + } + if (xdmInfoValue) { + var xdmItems = OSF.OUtil.getInfoItems(xdmInfoValue); + if (xdmItems != undefined && xdmItems.length >= 3) { + me._webAppState.conversationID = xdmItems[0]; + me._webAppState.id = xdmItems[1]; + me._webAppState.webAppUrl = xdmItems[2].indexOf(":") >= 0 ? xdmItems[2] : decodeURIComponent(xdmItems[2]); + } + } + me._webAppState.wnd = window.opener != null ? window.opener : window.parent; + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(false, OSF._OfficeAppFactory.getWindowLocationHash()); + if (isNaN(serializerVersion)) { + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(false, OSF._OfficeAppFactory.getWindowName()); + } + me._webAppState.serializerVersion = serializerVersion; + if (this._hostInfo.isDialog && window.opener != null) { + return; + } + me._webAppState.clientEndPoint = OSF.XdmCommunicationManager.connect(me._webAppState.conversationID, me._webAppState.wnd, me._webAppState.webAppUrl, me._webAppState.serializerVersion); + me._webAppState.serviceEndPoint = OSF.XdmCommunicationManager.createServiceEndPoint(me._webAppState.id); + me._webAppState.clientEndPoint.checkReceiverOriginAndRun = function (funcToRun) { + me.checkReceiverOriginAndRun(funcToRun); + }; + var notificationConversationId = me._webAppState.conversationID + OSF.Constants.NotificationConversationIdSuffix; + me._webAppState.serviceEndPoint.registerConversation(notificationConversationId, me._webAppState.webAppUrl); + var notifyAgave = function (params) { + var actionId; + if (typeof params == "string") { + actionId = params; + } + else { + actionId = params[0]; + } + switch (actionId) { + case OSF.AgaveHostAction.Select: + me._webAppState.focused = true; + break; + case OSF.AgaveHostAction.UnSelect: + me._webAppState.focused = false; + break; + case OSF.AgaveHostAction.TabIn: + case OSF.AgaveHostAction.CtrlF6In: + window.focus(); + var list = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToFirstTabbable(list, false); + if (!focused) { + window.blur(); + me._webAppState.focused = false; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.ExitNoFocusable]); + } + break; + case OSF.AgaveHostAction.TabInShift: + window.focus(); + var list = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToFirstTabbable(list, true); + if (!focused) { + window.blur(); + me._webAppState.focused = false; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.ExitNoFocusableShift]); + } + break; + case OSF.AgaveHostAction.SendMessage: + if (Office.context.messaging.onMessage) { + var message = params[1]; + Office.context.messaging.onMessage(message); + } + break; + case OSF.AgaveHostAction.TaskPaneHeaderButtonClicked: + if (Office.context.ui.taskPaneAction.onHeaderButtonClick) { + Office.context.ui.taskPaneAction.onHeaderButtonClick(); + } + break; + default: + OSF.Utility.trace("actionId " + actionId + " notifyAgave is wrong."); + break; + } + }; + me._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave", notifyAgave, 0, false); + me.addOrRemoveEventListenersForWindow(true); + } + catch (ex) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:[" + ex + "]"); + } + throw ex; + } + }; + WebInitializationHelper.prototype.getAppContext = function (wnd, onSuccess, onError) { + var _this = this; + var me = this; + var getInvocationCallbackWebApp = function (errorCode, appContext) { + OSFPerformance.getAppContextXdmEnd = OSFPerformance.now(); + if (appContext._appName === OSF.AppName.ExcelWebApp) { + var osfSerializedSettings = appContext._settings; + _this._serializedSettings = {}; + for (var _i = 0, osfSerializedSettings_1 = osfSerializedSettings; _i < osfSerializedSettings_1.length; _i++) { + var _a = osfSerializedSettings_1[_i], key = _a[0], value = _a[1]; + _this._serializedSettings[key] = value; + } + var hostSerializedSettings = appContext._hostSettings; + _this._serializedHostSettings = {}; + for (var _b = 0, hostSerializedSettings_1 = hostSerializedSettings; _b < hostSerializedSettings_1.length; _b++) { + var _c = hostSerializedSettings_1[_b], key = _c[0], value = _c[1]; + _this._serializedHostSettings[key] = value; + } + } + else { + _this._serializedSettings = appContext._settings; + _this._serializedHostSettings = appContext._hostSettings; + } + if (!me._hostInfo.isDialog || window.opener == null) { + var pageUrl = window.location.href; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.UpdateTargetUrl, pageUrl]); + } + if (errorCode === 0 && appContext._id != undefined && appContext._appName != undefined && appContext._appVersion != undefined && appContext._appUILocale != undefined && appContext._dataLocale != undefined && + appContext._docUrl != undefined && appContext._clientMode != undefined && appContext._reason != undefined) { + me._appContext = appContext; + var appInstanceId = (appContext._appInstanceId ? appContext._appInstanceId : appContext._id); + var touchEnabled = false; + var commerceAllowed = true; + var minorVersion = 0; + if (appContext._appMinorVersion != undefined) { + minorVersion = appContext._appMinorVersion; + } + var requirementMatrix = undefined; + if (appContext._requirementMatrix != undefined) { + requirementMatrix = appContext._requirementMatrix; + } + appContext.eToken = appContext.eToken ? appContext.eToken : ""; + var settingsFunc = function () { + return _this._serializedSettings; + }; + var hostSettingsFunc = function () { + return _this._serializedHostSettings; + }; + var returnedContext = new OSF.OfficeAppContext(appContext._id, appContext._appName, appContext._appVersion, appContext._appUILocale, appContext._dataLocale, appContext._docUrl, appContext._clientMode, settingsFunc, appContext._reason, appContext._osfControlType, appContext._eToken, appContext._correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, appContext._hostCustomMessage, appContext._hostFullVersion, appContext._clientWindowHeight, appContext._clientWindowWidth, appContext._addinName, appContext._appDomains, appContext._dialogRequirementMatrix, appContext._featureGates, appContext._officeTheme, appContext._initialDisplayMode, appContext._isFromWacAutomation, appContext._wopiHostOriginForSingleSignOn, hostSettingsFunc, true); + returnedContext.set_taskpaneUrl(appContext._taskpaneUrl); + onSuccess(returnedContext); + } + else { + var errorMsg = "Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is " + errorCode + ", exception: " + appContext; + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException(errorMsg); + } + onError(errorMsg); + } + }; + try { + var skipSessionStorage = true; + if (this._hostInfo.isDialog && window.opener != null) { + skipSessionStorage = false; + } + var appContext = OSF.OUtil.parseAppContextFromWindowName(skipSessionStorage, OSF._OfficeAppFactory.getWindowName()); + if (appContext) { + getInvocationCallbackWebApp(0, appContext); + } + else { + OSFPerformance.getAppContextXdmStart = OSFPerformance.now(); + this._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync", getInvocationCallbackWebApp, this._webAppState.id); + } + } + catch (ex) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:[" + ex + "]"); + } + onError(ex); + } + }; + WebInitializationHelper.prototype.createClientHostController = function () { + if (!this._clientHostController) { + this._clientHostController = new OSF.WebClientHostController(this._webAppState); + } + return this._clientHostController; + }; + WebInitializationHelper.prototype.createAsyncMethodExecutor = function () { + return new OSF.WebAsyncMethodExecutor(this._clientHostController); + }; + WebInitializationHelper.prototype.createClientSettingsManager = function () { + return new OSF.WebClientSettingsManager(); + }; + WebInitializationHelper.prototype.addOrRemoveEventListenersForWindow = function (isAdd) { + var me = this; + var onWindowFocus = function () { + if (!me._webAppState.focused) { + me._webAppState.focused = true; + } + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.Select]); + }; + var onWindowBlur = function () { + if (!OSF) { + return; + } + if (me._webAppState.focused) { + me._webAppState.focused = false; + } + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.UnSelect]); + }; + var onWindowKeydown = function (e) { + e.preventDefault = e.preventDefault || function () { + e.returnValue = false; + }; + if (e.keyCode == 117 && (e.ctrlKey || e.metaKey)) { + e.preventDefault(); + var actionId = OSF.AgaveHostAction.CtrlF6Exit; + if (e.shiftKey) { + actionId = OSF.AgaveHostAction.CtrlF6ExitShift; + } + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, actionId]); + } + else if (e.keyCode == 9) { + e.preventDefault(); + var allTabbableElements = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToNextTabbable(allTabbableElements, e.target || e.srcElement, e.shiftKey); + if (!focused) { + if (me._hostInfo.isDialog) { + OSF.OUtil.focusToFirstTabbable(allTabbableElements, e.shiftKey); + } + else { + if (e.shiftKey) { + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.TabExitShift]); + } + else { + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.TabExit]); + } + } + } + } + else if (e.keyCode == 27) { + e.preventDefault(); + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.EscExit]); + } + else if (e.keyCode == 113) { + e.preventDefault(); + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.F2Exit]); + } + else if ((e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) && e.keyCode >= 1 && e.keyCode <= 255) { + var params = { + "keyCode": e.keyCode, + "shiftKey": e.shiftKey, + "altKey": e.altKey, + "ctrlKey": e.ctrlKey, + "metaKey": e.metaKey + }; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.KeyboardShortcuts, params]); + } + }; + var onWindowKeypress = function (e) { + if (e.keyCode == 117 && e.ctrlKey) { + if (e.preventDefault) { + e.preventDefault(); + } + else { + e.returnValue = false; + } + } + }; + if (!OSF.Utility._DebugXdm) { + if (isAdd) { + OSF.OUtil.addEventListener(window, "focus", onWindowFocus); + OSF.OUtil.addEventListener(window, "blur", onWindowBlur); + OSF.OUtil.addEventListener(window, "keydown", onWindowKeydown); + OSF.OUtil.addEventListener(window, "keypress", onWindowKeypress); + } + else { + OSF.OUtil.removeEventListener(window, "focus", onWindowFocus); + OSF.OUtil.removeEventListener(window, "blur", onWindowBlur); + OSF.OUtil.removeEventListener(window, "keydown", onWindowKeydown); + OSF.OUtil.removeEventListener(window, "keypress", onWindowKeypress); + } + } + }; + WebInitializationHelper.prototype.getTabbableElements = function () { + return this._tabbableElements; + }; + return WebInitializationHelper; + }(OSF.InitializationHelper)); + OSF.WebInitializationHelper = WebInitializationHelper; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WebkitClientSettingsManager = (function () { + function WebkitClientSettingsManager(_initializationHelper, _scriptMessager) { + this._initializationHelper = _initializationHelper; + this._scriptMessager = _scriptMessager; + } + WebkitClientSettingsManager.prototype.read = function (onComplete) { + var keys = []; + var values = []; + var initializationHelper = this._initializationHelper; + var onGetAppContextSuccess = function (appContext) { + if (onComplete) { + var serializedSettings = appContext.get_settingsFunc()(); + onComplete(0, serializedSettings); + } + }; + var onGetAppContextError = function (e) { + if (onComplete) { + onComplete(5001, {}); + } + }; + initializationHelper.getAppContext(null, onGetAppContextSuccess, onGetAppContextError); + }; + WebkitClientSettingsManager.prototype.write = function (serializedSettings, onComplete) { + var hostParams = {}; + var keys = []; + var values = []; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + hostParams["keys"] = keys; + hostParams["values"] = values; + var onWriteCompleted = function onWriteCompleted(status) { + if (onComplete) { + onComplete(status[0]); + } + }; + this._scriptMessager.invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.WriteSettings, hostParams, onWriteCompleted); + }; + return WebkitClientSettingsManager; + }()); + OSF.WebkitClientSettingsManager = WebkitClientSettingsManager; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var Webkit; + (function (Webkit) { + Webkit.MessageHandlerName = "Agave"; + Webkit.PopupMessageHandlerName = "WefPopupHandler"; + var AppContextProperties; + (function (AppContextProperties) { + AppContextProperties[AppContextProperties["Settings"] = 0] = "Settings"; + AppContextProperties[AppContextProperties["SolutionReferenceId"] = 1] = "SolutionReferenceId"; + AppContextProperties[AppContextProperties["AppType"] = 2] = "AppType"; + AppContextProperties[AppContextProperties["MajorVersion"] = 3] = "MajorVersion"; + AppContextProperties[AppContextProperties["MinorVersion"] = 4] = "MinorVersion"; + AppContextProperties[AppContextProperties["RevisionVersion"] = 5] = "RevisionVersion"; + AppContextProperties[AppContextProperties["APIVersionSequence"] = 6] = "APIVersionSequence"; + AppContextProperties[AppContextProperties["AppCapabilities"] = 7] = "AppCapabilities"; + AppContextProperties[AppContextProperties["APPUILocale"] = 8] = "APPUILocale"; + AppContextProperties[AppContextProperties["AppDataLocale"] = 9] = "AppDataLocale"; + AppContextProperties[AppContextProperties["BindingCount"] = 10] = "BindingCount"; + AppContextProperties[AppContextProperties["DocumentUrl"] = 11] = "DocumentUrl"; + AppContextProperties[AppContextProperties["ActivationMode"] = 12] = "ActivationMode"; + AppContextProperties[AppContextProperties["ControlIntegrationLevel"] = 13] = "ControlIntegrationLevel"; + AppContextProperties[AppContextProperties["SolutionToken"] = 14] = "SolutionToken"; + AppContextProperties[AppContextProperties["APISetVersion"] = 15] = "APISetVersion"; + AppContextProperties[AppContextProperties["CorrelationId"] = 16] = "CorrelationId"; + AppContextProperties[AppContextProperties["InstanceId"] = 17] = "InstanceId"; + AppContextProperties[AppContextProperties["TouchEnabled"] = 18] = "TouchEnabled"; + AppContextProperties[AppContextProperties["CommerceAllowed"] = 19] = "CommerceAllowed"; + AppContextProperties[AppContextProperties["RequirementMatrix"] = 20] = "RequirementMatrix"; + AppContextProperties[AppContextProperties["HostCustomMessage"] = 21] = "HostCustomMessage"; + AppContextProperties[AppContextProperties["HostFullVersion"] = 22] = "HostFullVersion"; + AppContextProperties[AppContextProperties["InitialDisplayMode"] = 23] = "InitialDisplayMode"; + AppContextProperties[AppContextProperties["FeatureGates"] = 24] = "FeatureGates"; + AppContextProperties[AppContextProperties["HostSettings"] = 25] = "HostSettings"; + })(AppContextProperties = Webkit.AppContextProperties || (Webkit.AppContextProperties = {})); + var MethodId; + (function (MethodId) { + MethodId[MethodId["Execute"] = 1] = "Execute"; + MethodId[MethodId["RegisterEvent"] = 2] = "RegisterEvent"; + MethodId[MethodId["UnregisterEvent"] = 3] = "UnregisterEvent"; + MethodId[MethodId["WriteSettings"] = 4] = "WriteSettings"; + MethodId[MethodId["GetContext"] = 5] = "GetContext"; + MethodId[MethodId["SendMessage"] = 6] = "SendMessage"; + MethodId[MethodId["MessageParent"] = 7] = "MessageParent"; + MethodId[MethodId["SendMessage2"] = 8] = "SendMessage2"; + MethodId[MethodId["MessageParent2"] = 9] = "MessageParent2"; + })(MethodId = Webkit.MethodId || (Webkit.MethodId = {})); + var WebkitHostController = (function () { + function WebkitHostController(hostScriptProxy) { + this.hostScriptProxy = hostScriptProxy; + this.useFullDialogAPI = !!window._enableFullDialogAPI; + this.osfSupportsDialogOrigin = !!window._osfEnableDialogOrigin; + } + WebkitHostController.prototype.execute = function (id, params, callback) { + var hostParams = { + id: id, + apiArgs: params + }; + var agaveResponseCallback = function (payload) { + if (callback) { + var invokeArguments = []; + if (OSF.OUtil.isArray(payload)) { + for (var i = 0; i < payload.length; i++) { + var element = payload[i]; + if (OSF.OUtil.isArray(element)) { + element = new OSF.WebkitSafeArray(element); + } + invokeArguments.unshift(element); + } + } + return callback.apply(null, invokeArguments); + } + }; + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.Execute, hostParams, agaveResponseCallback); + }; + WebkitHostController.prototype.registerEvent = function (id, eventType, targetId, handler, callback) { + var agaveEventHandlerCallback = function (payload) { + var safeArraySource = payload; + var eventId = 0; + if (OSF.OUtil.isArray(payload) && payload.length >= 2) { + safeArraySource = payload[0]; + eventId = payload[1]; + } + if (handler) { + handler(eventId, new OSF.WebkitSafeArray(safeArraySource)); + } + }; + var agaveResponseCallback = function (payload) { + if (callback) { + return callback(new OSF.WebkitSafeArray(payload)); + } + }; + this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.RegisterEvent, id, targetId, agaveEventHandlerCallback, agaveResponseCallback); + }; + WebkitHostController.prototype.unregisterEvent = function (id, eventType, targetId, callback) { + var agaveResponseCallback = function (response) { + return callback(new OSF.WebkitSafeArray(response)); + }; + this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.UnregisterEvent, id, targetId, agaveResponseCallback); + }; + WebkitHostController.prototype.messageParent = function (params) { + var message; + var methodId; + if (this.osfSupportsDialogOrigin && params[OSF.ParameterNames.TargetOrigin]) { + message = this.useFullDialogAPI ? JSON.stringify(params) : params[OSF.ParameterNames.MessageToParent]; + methodId = OSF.Webkit.MethodId.MessageParent2; + } + else { + message = params[OSF.ParameterNames.MessageToParent]; + methodId = OSF.Webkit.MethodId.MessageParent; + } + if (this.useFullDialogAPI) { + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, methodId, message, null); + } + else { + var messageObj = { dialogMessage: { messageType: 0, messageContent: message } }; + var targetOrigin = methodId == OSF.Webkit.MethodId.MessageParent2 ? params[OSF.ParameterNames.TargetOrigin] : window.location.origin; + window.opener.postMessage(JSON.stringify(messageObj), targetOrigin); + } + }; + WebkitHostController.prototype.openDialog = function (id, eventType, targetId, handler, callback) { + if (this.useFullDialogAPI) { + this.registerEvent(id, eventType, targetId, handler, callback); + return; + } + if (WebkitHostController.popup && !WebkitHostController.popup.closed) { + callback(12007); + return; + } + var magicWord = "action=displayDialog"; + WebkitHostController.OpenDialogCallback = undefined; + var fragmentSeparator = '#'; + var callArgs = JSON.parse(targetId); + var callUrl = callArgs.url; + if (!callUrl) { + callback(12003); + return; + } + var urlParts = callUrl.split(fragmentSeparator); + var seperator = "?"; + if (urlParts[0].indexOf("?") > -1) { + seperator = "&"; + } + var width = screen.width * callArgs.width / 100; + var height = screen.height * callArgs.height / 100; + var params = "width=" + width + ", height=" + height; + urlParts[0] = urlParts[0].concat(seperator).concat(magicWord); + var openUrl = urlParts.join(fragmentSeparator); + WebkitHostController.popup = window.open(openUrl, "", params); + function receiveMessage(event) { + if (event.origin == window.location.origin) { + try { + var messageObj = JSON.parse(event.data); + if (messageObj.dialogMessage) { + handler(id, [0, messageObj.dialogMessage.messageContent, event.origin]); + } + } + catch (e) { + OSF.Utility.trace("messages received cannot be handlered. Message:" + event.data); + } + } + } + WebkitHostController.DialogEventListener = receiveMessage; + function checkWindowClose() { + try { + if (WebkitHostController.popup == null || WebkitHostController.popup.closed) { + window.clearInterval(WebkitHostController.interval); + window.removeEventListener("message", WebkitHostController.DialogEventListener); + WebkitHostController.NotifyError = null; + WebkitHostController.popup = null; + handler(id, [12006]); + } + } + catch (e) { + OSF.Utility.trace("Error happened when popup window closed."); + } + } + WebkitHostController.OpenDialogCallback = function (code) { + if (code == 0) { + window.addEventListener("message", WebkitHostController.DialogEventListener); + WebkitHostController.interval = window.setInterval(checkWindowClose, 1000); + WebkitHostController.NotifyError = function (errorCode) { + handler(id, [errorCode]); + }; + } + callback(code); + }; + }; + WebkitHostController.prototype.closeDialog = function (id, eventType, targetId, callback) { + if (this.useFullDialogAPI) { + this.unregisterEvent(id, eventType, targetId, callback); + } + else { + if (WebkitHostController.popup) { + if (WebkitHostController.interval) { + window.clearInterval(WebkitHostController.interval); + } + WebkitHostController.popup.close(); + WebkitHostController.popup = null; + window.removeEventListener("message", WebkitHostController.DialogEventListener); + WebkitHostController.NotifyError = null; + callback(0); + } + else { + callback(5001); + } + } + }; + WebkitHostController.prototype.sendMessage = function (params) { + var message; + var methodId; + if (this.osfSupportsDialogOrigin && params[OSF.ParameterNames.TargetOrigin]) { + message = JSON.stringify(params); + methodId = OSF.Webkit.MethodId.SendMessage2; + } + else { + message = params[OSF.ParameterNames.MessageContent]; + methodId = OSF.Webkit.MethodId.SendMessage; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message = message.toString(); + } + } + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, methodId, message, null); + }; + WebkitHostController.prototype.closeSdxDialog = function (context) { + throw OSF.Utility.createNotImplementedException(); + }; + return WebkitHostController; + }()); + Webkit.WebkitHostController = WebkitHostController; + })(Webkit = OSF.Webkit || (OSF.Webkit = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WebkitInitializationHelper = (function (_super) { + __extends(WebkitInitializationHelper, _super); + function WebkitInitializationHelper(hostInfo, webAppState, context, hostFacade) { + var _this = _super.call(this, hostInfo, webAppState, context, hostFacade) || this; + _this.initializeWebkitMessaging(); + return _this; + } + WebkitInitializationHelper.prototype.initializeWebkitMessaging = function () { + OSF.ScriptMessaging = OSFWebkit.ScriptMessaging; + }; + WebkitInitializationHelper.prototype.getAppContext = function (wnd, onSuccess, onError) { + var _this = this; + var getInvocationCallback = function (appContext) { + var returnedContext; + var appContextProperties = OSF.Webkit.AppContextProperties; + var appType = appContext[appContextProperties.AppType]; + var settings = appContext[appContextProperties.Settings]; + _this._serializedSettings = {}; + var keys = settings[0]; + var values = settings[1]; + for (var index = 0; index < keys.length; index++) { + _this._serializedSettings[keys[index]] = values[index]; + } + var hostSettings = appContext[appContextProperties.HostSettings]; + _this._serializedHostSettings = {}; + if (hostSettings) { + keys = hostSettings[0]; + values = hostSettings[1]; + for (var index = 0; index < keys.length; index++) { + _this._serializedHostSettings[keys[index]] = values[index]; + } + } + var id = appContext[appContextProperties.SolutionReferenceId]; + var version = appContext[appContextProperties.MajorVersion]; + var minorVersion = appContext[appContextProperties.MinorVersion]; + var clientMode = appContext[appContextProperties.AppCapabilities]; + var UILocale = appContext[appContextProperties.APPUILocale]; + var dataLocale = appContext[appContextProperties.AppDataLocale]; + var docUrl = appContext[appContextProperties.DocumentUrl]; + var reason = appContext[appContextProperties.ActivationMode]; + var osfControlType = appContext[appContextProperties.ControlIntegrationLevel]; + var eToken = appContext[appContextProperties.SolutionToken]; + eToken = eToken ? eToken.toString() : ""; + var correlationId = appContext[appContextProperties.CorrelationId]; + var appInstanceId = appContext[appContextProperties.InstanceId]; + var touchEnabled = appContext[appContextProperties.TouchEnabled]; + var commerceAllowed = appContext[appContextProperties.CommerceAllowed]; + var requirementMatrix = appContext[appContextProperties.RequirementMatrix]; + var hostCustomMessage = appContext[appContextProperties.HostCustomMessage]; + var hostFullVersion = appContext[appContextProperties.HostFullVersion]; + var initialDisplayMode = appContext[appContextProperties.InitialDisplayMode]; + var sdxFeatureGatesJson = appContext[appContextProperties.FeatureGates]; + var sdxFeatureGates; + if (sdxFeatureGatesJson) { + try { + sdxFeatureGates = JSON.parse(sdxFeatureGatesJson); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception trying to parse FeatureGates." + e); + } + } + } + var settingsFunc = function () { + return _this._serializedSettings; + }; + var hostSettingsFunc = function () { + return _this._serializedHostSettings; + }; + returnedContext = new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, settingsFunc, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, undefined, undefined, undefined, undefined, undefined, sdxFeatureGates, undefined, initialDisplayMode, undefined, undefined, hostSettingsFunc, false); + onSuccess(returnedContext); + }; + var handler; + if (this._hostInfo.isDialog && window.webkit.messageHandlers[OSF.Webkit.PopupMessageHandlerName]) { + handler = OSF.Webkit.PopupMessageHandlerName; + } + else { + handler = OSF.Webkit.MessageHandlerName; + } + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler, OSF.Webkit.MethodId.GetContext, [], getInvocationCallback); + }; + WebkitInitializationHelper.prototype.createClientHostController = function () { + if (!this._clientHostController) { + this._clientHostController = new OSF.Webkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger()); + } + return this._clientHostController; + }; + WebkitInitializationHelper.prototype.createAsyncMethodExecutor = function () { + return new OSF.SafeArrayAsyncMethodExecutor(this.createClientHostController()); + }; + WebkitInitializationHelper.prototype.createClientSettingsManager = function () { + return new OSF.WebkitClientSettingsManager(this, OSF.ScriptMessaging.GetScriptMessenger()); + }; + return WebkitInitializationHelper; + }(OSF.InitializationHelper)); + OSF.WebkitInitializationHelper = WebkitInitializationHelper; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WebkitSafeArray = (function () { + function WebkitSafeArray(data) { + this.data = data; + this.safeArrayFlag = this.isSafeArray(data); + } + WebkitSafeArray.prototype.dimensions = function () { + var dimensions = 0; + if (this.safeArrayFlag) { + dimensions = this.data[0][0]; + } + else if (this.isArray()) { + dimensions = 2; + } + return dimensions; + }; + WebkitSafeArray.prototype.getItem = function () { + var array = []; + var element = null; + if (this.safeArrayFlag) { + array = this.toArray(); + } + else { + array = this.data; + } + element = array; + for (var i = 0; i < arguments.length; i++) { + element = element[arguments[i]]; + } + return element; + }; + WebkitSafeArray.prototype.lbound = function (dimension) { + return 0; + }; + WebkitSafeArray.prototype.ubound = function (dimension) { + var ubound = 0; + if (this.safeArrayFlag) { + ubound = this.data[0][dimension]; + } + else if (this.isArray()) { + if (dimension == 1) { + return this.data.length; + } + else if (dimension == 2) { + if (OSF.OUtil.isArray(this.data[0])) { + return this.data[0].length; + } + else if (this.data[0] != null) { + return 1; + } + } + } + return ubound; + }; + WebkitSafeArray.prototype.toArray = function () { + if (this.isArray() == false) { + return this.data; + } + var arr = []; + var startingIndex = this.safeArrayFlag ? 1 : 0; + for (var i = startingIndex; i < this.data.length; i++) { + var element = this.data[i]; + if (this.isSafeArray(element)) { + arr.push(new WebkitSafeArray(element)); + } + else { + arr.push(element); + } + } + return arr; + }; + WebkitSafeArray.prototype.isArray = function () { + return OSF.OUtil.isArray(this.data); + }; + WebkitSafeArray.prototype.isSafeArray = function (obj) { + var isSafeArray = false; + if (OSF.OUtil.isArray(obj) && OSF.OUtil.isArray(obj[0])) { + var bounds = obj[0]; + var dimensions = bounds[0]; + if (bounds.length != dimensions + 1) { + return false; + } + var expectedArraySize = 1; + for (var i = 1; i < bounds.length; i++) { + var dimension = bounds[i]; + if (isFinite(dimension) == false) { + return false; + } + expectedArraySize = expectedArraySize * dimension; + } + expectedArraySize++; + isSafeArray = (expectedArraySize == obj.length); + } + return isSafeArray; + }; + return WebkitSafeArray; + }()); + OSF.WebkitSafeArray = WebkitSafeArray; +})(OSF || (OSF = {})); +var OSFWebkit; +(function (OSFWebkit) { + var ScriptMessaging; + (function (ScriptMessaging) { + var scriptMessenger = null; + function agaveHostCallback(callbackId, params) { + scriptMessenger.agaveHostCallback(callbackId, params); + } + ScriptMessaging.agaveHostCallback = agaveHostCallback; + function agaveHostEventCallback(callbackId, params) { + scriptMessenger.agaveHostEventCallback(callbackId, params); + } + ScriptMessaging.agaveHostEventCallback = agaveHostEventCallback; + function GetScriptMessenger() { + if (scriptMessenger == null) { + if (HostScriptMessaging.IsSupportedByHost()) { + scriptMessenger = new HostScriptMessaging(); + } + else { + scriptMessenger = new WebkitScriptMessaging("OSF.ScriptMessaging.agaveHostCallback", "OSF.ScriptMessaging.agaveHostEventCallback"); + } + } + return scriptMessenger; + } + ScriptMessaging.GetScriptMessenger = GetScriptMessenger; + var EventHandlerCallback = (function () { + function EventHandlerCallback(id, targetId, handler) { + this.id = id; + this.targetId = targetId; + this.handler = handler; + } + return EventHandlerCallback; + }()); + var HostScriptMessaging = (function () { + function HostScriptMessaging() { + this.eventHandlers = []; + } + HostScriptMessaging.IsSupportedByHost = function () { + return !!window._osfHostAPI; + }; + HostScriptMessaging.prototype.invokeMethod = function (handlerName, methodId, params, callback) { + var internalCallback = function (params) { + var callbacksDone = callback(params); + if (callbacksDone === undefined || callbacksDone === true) { + return true; + } + return false; + }; + window._osfHostAPI(handlerName, this.constructMessagingArgs(methodId, params), internalCallback); + }; + HostScriptMessaging.prototype.registerEvent = function (handlerName, methodId, dispId, targetId, handler, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + var internalCallback = function (params) { + callback(params); + return true; + }; + var internalEventHandler = function (params) { + handler(params); + return false; + }; + var callbackInfo = window._osfHostRegisterEvent(handlerName, this.constructMessagingArgs(methodId, hostArgs), internalEventHandler, internalCallback); + this.eventHandlers.push({ targetId: targetId, dispId: dispId, callbackId: callbackInfo.eventCallbackId }); + }; + HostScriptMessaging.prototype.unregisterEvent = function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + var internalCallback = function (params) { + callback(params); + return true; + }; + window._osfHostAPI(handlerName, this.constructMessagingArgs(methodId, hostArgs), internalCallback); + for (var i = this.eventHandlers.length - 1; i >= 0; i--) { + var handler = this.eventHandlers[i]; + if (handler.dispId === dispId && handler.targetId === targetId) { + this.eventHandlers.splice(i, 1); + window._osfHostUnregisterCallback(handler.callbackId); + } + } + }; + HostScriptMessaging.prototype.agaveHostCallback = function (callbackId, params) { + }; + HostScriptMessaging.prototype.agaveHostEventCallback = function (callbackId, params) { + }; + HostScriptMessaging.prototype.constructMessagingArgs = function (methodId, params) { + var messagingArgs = { + params: params, + methodId: methodId + }; + return messagingArgs; + }; + return HostScriptMessaging; + }()); + var WebkitScriptMessaging = (function () { + function WebkitScriptMessaging(methodCallbackName, eventCallbackName) { + this.callingIndex = 0; + this.callbackList = {}; + this.eventHandlerList = {}; + this.asyncMethodCallbackFunctionName = methodCallbackName; + this.eventCallbackFunctionName = eventCallbackName; + this.conversationId = WebkitScriptMessaging.getCurrentTimeMS().toString(); + } + WebkitScriptMessaging.prototype.invokeMethod = function (handlerName, methodId, params, callback) { + var messagingArgs = {}; + this.postWebkitMessage(messagingArgs, handlerName, methodId, params, callback); + }; + WebkitScriptMessaging.prototype.registerEvent = function (handlerName, methodId, dispId, targetId, handler, callback) { + var messagingArgs = { + eventCallbackFunction: this.eventCallbackFunctionName + }; + var hostArgs = { + id: dispId, + targetId: targetId + }; + var correlationId = this.postWebkitMessage(messagingArgs, handlerName, methodId, hostArgs, callback); + this.eventHandlerList[correlationId] = new EventHandlerCallback(dispId, targetId, handler); + }; + WebkitScriptMessaging.prototype.unregisterEvent = function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + for (var key in this.eventHandlerList) { + if (this.eventHandlerList.hasOwnProperty(key)) { + var eventCallback = this.eventHandlerList[key]; + if (eventCallback.id == dispId && eventCallback.targetId == targetId) { + delete this.eventHandlerList[key]; + } + } + } + this.invokeMethod(handlerName, methodId, hostArgs, callback); + }; + WebkitScriptMessaging.prototype.agaveHostCallback = function (callbackId, params) { + var callbackFunction = this.callbackList[callbackId]; + if (callbackFunction) { + var callbacksDone = callbackFunction(params); + if (callbacksDone === undefined || callbacksDone === true) { + delete this.callbackList[callbackId]; + } + } + }; + WebkitScriptMessaging.prototype.agaveHostEventCallback = function (callbackId, params) { + var eventCallback = this.eventHandlerList[callbackId]; + if (eventCallback) { + eventCallback.handler(params); + } + }; + WebkitScriptMessaging.prototype.postWebkitMessage = function (messagingArgs, handlerName, methodId, params, callback) { + messagingArgs.methodId = methodId; + messagingArgs.params = params; + var correlationId = ""; + if (callback) { + correlationId = this.generateCorrelationId(); + this.callbackList[correlationId] = callback; + messagingArgs.callbackId = correlationId; + messagingArgs.callbackFunction = this.asyncMethodCallbackFunctionName; + } + var invokePostMessage = function () { + window.webkit.messageHandlers[handlerName].postMessage(JSON.stringify(messagingArgs)); + }; + var currentTimestamp = WebkitScriptMessaging.getCurrentTimeMS(); + if (this.lastMessageTimestamp == null || (currentTimestamp - this.lastMessageTimestamp >= WebkitScriptMessaging.MESSAGE_TIME_DELTA)) { + invokePostMessage(); + this.lastMessageTimestamp = currentTimestamp; + } + else { + this.lastMessageTimestamp += WebkitScriptMessaging.MESSAGE_TIME_DELTA; + setTimeout(function () { + invokePostMessage(); + }, this.lastMessageTimestamp - currentTimestamp); + } + return correlationId; + }; + WebkitScriptMessaging.prototype.generateCorrelationId = function () { + ++this.callingIndex; + return this.conversationId + this.callingIndex; + }; + WebkitScriptMessaging.getCurrentTimeMS = function () { + return (new Date).getTime(); + }; + WebkitScriptMessaging.MESSAGE_TIME_DELTA = 10; + return WebkitScriptMessaging; + }()); + })(ScriptMessaging = OSFWebkit.ScriptMessaging || (OSFWebkit.ScriptMessaging = {})); +})(OSFWebkit || (OSFWebkit = {})); +var OSF; +(function (OSF) { + var WebViewClientSettingsManager = (function () { + function WebViewClientSettingsManager(_initializationHelper, _scriptMessager) { + this._initializationHelper = _initializationHelper; + this._scriptMessager = _scriptMessager; + } + WebViewClientSettingsManager.prototype.read = function (onComplete) { + var keys = []; + var values = []; + var initializationHelper = this._initializationHelper; + var onGetAppContextSuccess = function (appContext) { + if (onComplete) { + var serializedSettings = appContext.get_settingsFunc()(); + onComplete(0, serializedSettings); + } + }; + var onGetAppContextError = function (e) { + if (onComplete) { + onComplete(5001, {}); + } + }; + initializationHelper.getAppContext(null, onGetAppContextSuccess, onGetAppContextError); + }; + WebViewClientSettingsManager.prototype.write = function (serializedSettings, onComplete) { + var hostParams = {}; + var keys = []; + var values = []; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + hostParams["keys"] = keys; + hostParams["values"] = values; + var onWriteCompleted = function onWriteCompleted(status) { + if (onComplete) { + onComplete(status[0]); + } + }; + this._scriptMessager.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.WriteSettings, hostParams, onWriteCompleted); + }; + return WebViewClientSettingsManager; + }()); + OSF.WebViewClientSettingsManager = WebViewClientSettingsManager; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WebView; + (function (WebView) { + WebView.MessageHandlerName = "Agave"; + WebView.PopupMessageHandlerName = "WefPopupHandler"; + var AppContextProperties; + (function (AppContextProperties) { + AppContextProperties[AppContextProperties["Settings"] = 0] = "Settings"; + AppContextProperties[AppContextProperties["SolutionReferenceId"] = 1] = "SolutionReferenceId"; + AppContextProperties[AppContextProperties["AppType"] = 2] = "AppType"; + AppContextProperties[AppContextProperties["MajorVersion"] = 3] = "MajorVersion"; + AppContextProperties[AppContextProperties["MinorVersion"] = 4] = "MinorVersion"; + AppContextProperties[AppContextProperties["RevisionVersion"] = 5] = "RevisionVersion"; + AppContextProperties[AppContextProperties["APIVersionSequence"] = 6] = "APIVersionSequence"; + AppContextProperties[AppContextProperties["AppCapabilities"] = 7] = "AppCapabilities"; + AppContextProperties[AppContextProperties["APPUILocale"] = 8] = "APPUILocale"; + AppContextProperties[AppContextProperties["AppDataLocale"] = 9] = "AppDataLocale"; + AppContextProperties[AppContextProperties["BindingCount"] = 10] = "BindingCount"; + AppContextProperties[AppContextProperties["DocumentUrl"] = 11] = "DocumentUrl"; + AppContextProperties[AppContextProperties["ActivationMode"] = 12] = "ActivationMode"; + AppContextProperties[AppContextProperties["ControlIntegrationLevel"] = 13] = "ControlIntegrationLevel"; + AppContextProperties[AppContextProperties["SolutionToken"] = 14] = "SolutionToken"; + AppContextProperties[AppContextProperties["APISetVersion"] = 15] = "APISetVersion"; + AppContextProperties[AppContextProperties["CorrelationId"] = 16] = "CorrelationId"; + AppContextProperties[AppContextProperties["InstanceId"] = 17] = "InstanceId"; + AppContextProperties[AppContextProperties["TouchEnabled"] = 18] = "TouchEnabled"; + AppContextProperties[AppContextProperties["CommerceAllowed"] = 19] = "CommerceAllowed"; + AppContextProperties[AppContextProperties["RequirementMatrix"] = 20] = "RequirementMatrix"; + AppContextProperties[AppContextProperties["OfficeThemeInfo"] = 21] = "OfficeThemeInfo"; + })(AppContextProperties = WebView.AppContextProperties || (WebView.AppContextProperties = {})); + var MethodId; + (function (MethodId) { + MethodId[MethodId["Execute"] = 1] = "Execute"; + MethodId[MethodId["RegisterEvent"] = 2] = "RegisterEvent"; + MethodId[MethodId["UnregisterEvent"] = 3] = "UnregisterEvent"; + MethodId[MethodId["WriteSettings"] = 4] = "WriteSettings"; + MethodId[MethodId["GetContext"] = 5] = "GetContext"; + MethodId[MethodId["OnKeydown"] = 6] = "OnKeydown"; + MethodId[MethodId["AddinInitialized"] = 7] = "AddinInitialized"; + MethodId[MethodId["OpenWindow"] = 8] = "OpenWindow"; + MethodId[MethodId["MessageParent"] = 9] = "MessageParent"; + MethodId[MethodId["SendMessage"] = 10] = "SendMessage"; + })(MethodId = WebView.MethodId || (WebView.MethodId = {})); + var WebViewHostController = (function () { + function WebViewHostController(hostScriptProxy) { + this.hostScriptProxy = hostScriptProxy; + } + WebViewHostController.prototype.execute = function (id, params, callback) { + var args = params; + if (args == null) { + args = []; + } + var hostParams = { + id: id, + apiArgs: args + }; + var agaveResponseCallback = function (payload) { + var safeArraySource = payload; + if (OSF.OUtil.isArray(payload) && payload.length >= 2) { + var hrStatus = payload[0]; + safeArraySource = payload[1]; + } + if (callback) { + return callback(new OSF.WebkitSafeArray(safeArraySource)); + } + }; + this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.Execute, hostParams, agaveResponseCallback); + }; + WebViewHostController.prototype.registerEvent = function (id, eventType, targetId, handler, callback) { + var agaveEventHandlerCallback = function (payload) { + var safeArraySource = payload; + var eventId = 0; + if (OSF.OUtil.isArray(payload) && payload.length >= 2) { + eventId = payload[0]; + safeArraySource = payload[1]; + } + if (handler) { + handler(eventId, new OSF.WebkitSafeArray(safeArraySource)); + } + }; + var agaveResponseCallback = function (payload) { + if (callback) { + return callback(new OSF.WebkitSafeArray(payload)); + } + }; + this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.RegisterEvent, id, targetId, agaveEventHandlerCallback, agaveResponseCallback); + }; + WebViewHostController.prototype.unregisterEvent = function (id, eventType, targetId, callback) { + var agaveResponseCallback = function (response) { + return callback(new OSF.WebkitSafeArray(response)); + }; + this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.UnregisterEvent, id, targetId, agaveResponseCallback); + }; + WebViewHostController.prototype.messageParent = function (params) { + var message = params[OSF.ParameterNames.MessageToParent]; + var messageObj = { dialogMessage: { messageType: 0, messageContent: message } }; + window.opener.postMessage(JSON.stringify(messageObj), window.location.origin); + }; + WebViewHostController.prototype.openDialog = function (id, eventType, targetId, handler, callback) { + var magicWord = "action=displayDialog"; + var callArgs = JSON.parse(targetId); + var callUrl = callArgs.url; + if (!callUrl) { + return; + } + var fragmentSeparator = '#'; + var urlParts = callUrl.split(fragmentSeparator); + var seperator = "?"; + if (callUrl.indexOf("?") > -1) { + seperator = "&"; + } + var width = screen.width * callArgs.width / 100; + var height = screen.height * callArgs.height / 100; + var params = "width=" + width + ", height=" + height; + urlParts[0] = urlParts[0].concat(seperator).concat(magicWord); + var openUrl = urlParts.join(fragmentSeparator); + WebViewHostController.popup = window.open(openUrl, "", params); + function receiveMessage(event) { + if (event.source == WebViewHostController.popup) { + try { + var messageObj = JSON.parse(event.data); + if (messageObj.dialogMessage) { + handler(id, [0, messageObj.dialogMessage.messageContent]); + } + } + catch (e) { + OSF.Utility.trace("messages received cannot be handled. Message:" + event.data); + } + } + } + window.addEventListener("message", receiveMessage); + var interval; + function checkWindowClose() { + try { + if (WebViewHostController.popup == null || WebViewHostController.popup.closed) { + window.clearInterval(interval); + handler(id, [12006]); + } + } + catch (e) { + OSF.Utility.trace("Error happened when popup window closed."); + } + } + interval = window.setInterval(checkWindowClose, 1000); + callback(0); + }; + WebViewHostController.prototype.closeDialog = function (id, eventType, targetId, callback) { + if (WebViewHostController.popup) { + WebViewHostController.popup.close(); + WebViewHostController.popup = null; + callback(0); + } + else { + callback(5001); + } + }; + WebViewHostController.prototype.sendMessage = function (params) { + var message = params[OSF.ParameterNames.MessageContent]; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message = message.toString(); + } + this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.SendMessage, message, null); + }; + WebViewHostController.prototype.closeSdxDialog = function (context) { + throw OSF.Utility.createNotImplementedException(); + }; + return WebViewHostController; + }()); + WebView.WebViewHostController = WebViewHostController; + })(WebView = OSF.WebView || (OSF.WebView = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WebViewInitializationHelper = (function (_super) { + __extends(WebViewInitializationHelper, _super); + function WebViewInitializationHelper(hostInfo, webAppState, context, hostFacade) { + var _this = _super.call(this, hostInfo, webAppState, context, hostFacade) || this; + _this.initializeWebViewMessaging(); + return _this; + } + WebViewInitializationHelper.prototype.initializeWebViewMessaging = function () { + OSF.ScriptMessaging = OSF.WebView.ScriptMessaging; + }; + WebViewInitializationHelper.prototype.getAppContext = function (wnd, onSuccess, onError) { + var _this = this; + var getInvocationCallback = function (appContext) { + var returnedContext; + var appContextProperties = OSF.Webkit.AppContextProperties; + var appType = appContext[appContextProperties.AppType]; + var hostSettings = appContext[appContextProperties.Settings]; + _this._serializedSettings = {}; + var keys = hostSettings[0]; + var values = hostSettings[1]; + for (var index = 0; index < keys.length; index++) { + _this._serializedSettings[keys[index]] = values[index]; + } + var id = appContext[appContextProperties.SolutionReferenceId]; + var version = appContext[appContextProperties.MajorVersion]; + var minorVersion = appContext[appContextProperties.MinorVersion]; + var clientMode = appContext[appContextProperties.AppCapabilities]; + var UILocale = appContext[appContextProperties.APPUILocale]; + var dataLocale = appContext[appContextProperties.AppDataLocale]; + var docUrl = appContext[appContextProperties.DocumentUrl]; + var reason = appContext[appContextProperties.ActivationMode]; + var osfControlType = appContext[appContextProperties.ControlIntegrationLevel]; + var eToken = appContext[appContextProperties.SolutionToken]; + eToken = eToken ? eToken.toString() : ""; + var correlationId = appContext[appContextProperties.CorrelationId]; + var appInstanceId = appContext[appContextProperties.InstanceId]; + var touchEnabled = appContext[appContextProperties.TouchEnabled]; + var commerceAllowed = appContext[appContextProperties.CommerceAllowed]; + var requirementMatrix = appContext[appContextProperties.RequirementMatrix]; + var hostCustomMessage = appContext[appContextProperties.HostCustomMessage]; + var hostFullVersion = appContext[appContextProperties.HostFullVersion]; + var initialDisplayMode = appContext[appContextProperties.InitialDisplayMode]; + var settingsFunc = function () { + return _this._serializedSettings; + }; + returnedContext = new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, settingsFunc, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, undefined, undefined, undefined, undefined, undefined, undefined, undefined, initialDisplayMode, undefined, undefined, undefined, false); + onSuccess(returnedContext); + }; + var handler; + if (this._hostInfo.isDialog) { + handler = OSF.WebView.PopupMessageHandlerName; + } + else { + handler = OSF.WebView.MessageHandlerName; + } + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler, OSF.WebView.MethodId.GetContext, [], getInvocationCallback); + }; + WebViewInitializationHelper.prototype.createClientHostController = function () { + if (!this._clientHostController) { + this._clientHostController = new OSF.WebView.WebViewHostController(OSF.ScriptMessaging.GetScriptMessenger()); + } + return this._clientHostController; + }; + WebViewInitializationHelper.prototype.createAsyncMethodExecutor = function () { + return new OSF.SafeArrayAsyncMethodExecutor(this.createClientHostController()); + }; + WebViewInitializationHelper.prototype.createClientSettingsManager = function () { + return new OSF.WebViewClientSettingsManager(this, OSF.ScriptMessaging.GetScriptMessenger()); + }; + return WebViewInitializationHelper; + }(OSF.InitializationHelper)); + OSF.WebViewInitializationHelper = WebViewInitializationHelper; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var CrossIFrameCommon; + (function (CrossIFrameCommon) { + var CallbackType; + (function (CallbackType) { + CallbackType[CallbackType["MethodCallback"] = 0] = "MethodCallback"; + CallbackType[CallbackType["EventCallback"] = 1] = "EventCallback"; + })(CallbackType = CrossIFrameCommon.CallbackType || (CrossIFrameCommon.CallbackType = {})); + var CallbackData = (function () { + function CallbackData(callbackType, callbackId, params) { + this.callbackType = callbackType; + this.callbackId = callbackId; + this.params = params; + } + return CallbackData; + }()); + CrossIFrameCommon.CallbackData = CallbackData; + })(CrossIFrameCommon || (CrossIFrameCommon = {})); + var Android; + (function (Android) { + var Poster = (function () { + function Poster() { + } + Poster.getInstance = function () { + if (Poster.uniqueInstance == null) { + Poster.uniqueInstance = new Poster(); + } + return Poster.uniqueInstance; + }; + Poster.prototype.postMessage = function (handlerName, message) { + agaveHost.postMessage(message); + }; + Poster.prototype.ReceiveMessage = function (cbData) { + switch (cbData.callbackType) { + case CrossIFrameCommon.CallbackType.MethodCallback: + OSF.WebView.ScriptMessaging.agaveHostCallback(cbData.callbackId, cbData.params); + break; + case CrossIFrameCommon.CallbackType.EventCallback: + OSF.WebView.ScriptMessaging.agaveHostEventCallback(cbData.callbackId, cbData.params); + break; + default: + break; + } + }; + return Poster; + }()); + Android.Poster = Poster; + })(Android = OSF.Android || (OSF.Android = {})); + var WinRT; + (function (WinRT) { + var Poster = (function () { + function Poster() { + window.addEventListener("message", this.OnReceiveMessage.bind(this)); + } + Poster.prototype.postMessage = function (handlerName, message) { + window.parent.postMessage(message, "*"); + }; + Poster.prototype.OnReceiveMessage = function (event) { + if (event.source != window.parent || window.parent != window.top || !event.origin.startsWith("ms-appx-web://")) { + return; + } + var cbData; + try { + cbData = JSON.parse(event.data); + } + catch (ex) { + return; + } + switch (cbData.callbackType) { + case CrossIFrameCommon.CallbackType.MethodCallback: + OSF.WebView.ScriptMessaging.agaveHostCallback(cbData.callbackId, JSON.parse(cbData.params)); + break; + case CrossIFrameCommon.CallbackType.EventCallback: + OSF.WebView.ScriptMessaging.agaveHostEventCallback(cbData.callbackId, JSON.parse(cbData.params)); + break; + default: + break; + } + }; + return Poster; + }()); + WinRT.Poster = Poster; + })(WinRT = OSF.WinRT || (OSF.WinRT = {})); +})(OSF || (OSF = {})); +(function (OSF) { + var WebView; + (function (WebView) { + var ScriptMessaging; + (function (ScriptMessaging) { + var scriptMessenger = null; + function agaveHostCallback(callbackId, params) { + scriptMessenger.agaveHostCallback(callbackId, params); + } + ScriptMessaging.agaveHostCallback = agaveHostCallback; + function agaveHostEventCallback(callbackId, params) { + scriptMessenger.agaveHostEventCallback(callbackId, params); + } + ScriptMessaging.agaveHostEventCallback = agaveHostEventCallback; + function GetScriptMessenger() { + if (scriptMessenger == null) { + var hostPlatform = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + if (hostPlatform === OSF.HostInfoPlatform.android) { + scriptMessenger = new WebViewScriptMessaging("OSF.ScriptMessaging.agaveHostCallback", "OSF.ScriptMessaging.agaveHostEventCallback", OSF.Android.Poster.getInstance()); + } + else if (hostPlatform === OSF.HostInfoPlatform.winrt) { + scriptMessenger = new WebViewScriptMessaging("agaveHostCallback", "agaveHostEventCallback", new OSF.WinRT.Poster()); + } + else { + throw OSF.Utility.createNotImplementedException(); + } + } + return scriptMessenger; + } + ScriptMessaging.GetScriptMessenger = GetScriptMessenger; + var EventHandlerCallback = (function () { + function EventHandlerCallback(id, targetId, handler) { + this.id = id; + this.targetId = targetId; + this.handler = handler; + } + return EventHandlerCallback; + }()); + var WebViewScriptMessaging = (function () { + function WebViewScriptMessaging(methodCallbackName, eventCallbackName, messagePoster) { + this.callingIndex = 0; + this.callbackList = {}; + this.eventHandlerList = {}; + this.asyncMethodCallbackFunctionName = methodCallbackName; + this.eventCallbackFunctionName = eventCallbackName; + this.poster = messagePoster; + this.conversationId = WebViewScriptMessaging.getCurrentTimeMS().toString(); + } + WebViewScriptMessaging.prototype.invokeMethod = function (handlerName, methodId, params, callback) { + var messagingArgs = {}; + this.postMessage(messagingArgs, handlerName, methodId, params, callback); + }; + WebViewScriptMessaging.prototype.registerEvent = function (handlerName, methodId, dispId, targetId, handler, callback) { + var messagingArgs = { + eventCallbackFunction: this.eventCallbackFunctionName + }; + var hostArgs = { + id: dispId, + targetId: targetId + }; + var correlationId = this.postMessage(messagingArgs, handlerName, methodId, hostArgs, callback); + this.eventHandlerList[correlationId] = new EventHandlerCallback(dispId, targetId, handler); + }; + WebViewScriptMessaging.prototype.unregisterEvent = function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs = { + id: dispId, + targetId: targetId + }; + for (var key in this.eventHandlerList) { + if (this.eventHandlerList.hasOwnProperty(key)) { + var eventCallback = this.eventHandlerList[key]; + if (eventCallback.id == dispId && eventCallback.targetId == targetId) { + delete this.eventHandlerList[key]; + } + } + } + this.invokeMethod(handlerName, methodId, hostArgs, callback); + }; + WebViewScriptMessaging.prototype.agaveHostCallback = function (callbackId, params) { + var callbackFunction = this.callbackList[callbackId]; + if (callbackFunction) { + var callbacksDone = callbackFunction(params); + if (callbacksDone === undefined || callbacksDone === true) { + delete this.callbackList[callbackId]; + } + } + }; + WebViewScriptMessaging.prototype.agaveHostEventCallback = function (callbackId, params) { + var eventCallback = this.eventHandlerList[callbackId]; + if (eventCallback) { + eventCallback.handler(params); + } + }; + WebViewScriptMessaging.prototype.postMessage = function (messagingArgs, handlerName, methodId, params, callback) { + var correlationId = this.generateCorrelationId(); + this.callbackList[correlationId] = callback; + messagingArgs.methodId = methodId; + messagingArgs.params = params; + messagingArgs.callbackId = correlationId; + messagingArgs.callbackFunction = this.asyncMethodCallbackFunctionName; + this.poster.postMessage(handlerName, JSON.stringify(messagingArgs)); + return correlationId; + }; + WebViewScriptMessaging.prototype.generateCorrelationId = function () { + ++this.callingIndex; + return this.conversationId + this.callingIndex; + }; + WebViewScriptMessaging.getCurrentTimeMS = function () { + return (new Date).getTime(); + }; + WebViewScriptMessaging.MESSAGE_TIME_DELTA = 10; + return WebViewScriptMessaging; + }()); + })(ScriptMessaging = WebView.ScriptMessaging || (WebView.ScriptMessaging = {})); + })(WebView = OSF.WebView || (OSF.WebView = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var Win32RichClientHostController = (function (_super) { + __extends(Win32RichClientHostController, _super); + function Win32RichClientHostController() { + return _super !== null && _super.apply(this, arguments) || this; + } + Win32RichClientHostController.prototype.messageParent = function (params) { + if (OSF.Utility.externalNativeFunctionExists(typeof window.external.MessageParent2)) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.MessageParent2(JSON.stringify(params), OsfOMToken); + } + else { + window.external.MessageParent2(JSON.stringify(params)); + } + } + else { + var message = params[OSF.ParameterNames.MessageToParent]; + window.external.MessageParent(message); + } + }; + Win32RichClientHostController.prototype.openDialog = function (id, eventType, targetId, handler, callback) { + this.registerEvent(id, eventType, targetId, handler, callback); + }; + Win32RichClientHostController.prototype.closeDialog = function (id, eventType, targetId, callback) { + this.unregisterEvent(id, eventType, targetId, callback); + }; + Win32RichClientHostController.prototype.sendMessage = function (params) { + if (OSF.Utility.externalNativeFunctionExists(typeof window.external.MessageChild2)) { + if (typeof OsfOMToken != 'undefined' && OsfOMToken) { + window.external.MessageChild2(JSON.stringify(params), OsfOMToken); + } + else { + window.external.MessageChild2(JSON.stringify(params)); + } + } + else { + var message = params[OSF.ParameterNames.MessageContent]; + window.external.MessageChild(message); + } + }; + Win32RichClientHostController.prototype.closeSdxDialog = function (context) { + if (OSF.Utility.externalNativeFunctionExists(typeof window.external.closeSdxDialog)) { + window.external.closeSdxDialog(context); + } + }; + return Win32RichClientHostController; + }(OSF.RichClientHostController)); + OSF.Win32RichClientHostController = Win32RichClientHostController; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var MacRichClientHostController = (function (_super) { + __extends(MacRichClientHostController, _super); + function MacRichClientHostController() { + return _super !== null && _super.apply(this, arguments) || this; + } + MacRichClientHostController.prototype.openDialog = function (id, eventType, targetId, handler, callback) { + if (MacRichClientHostController.popup && !MacRichClientHostController.popup.closed) { + callback(12007); + return; + } + var magicWord = "action=displayDialog"; + window.dialogAPIErrorCode = undefined; + var fragmentSeparator = '#'; + var callArgs = JSON.parse(targetId); + var callUrl = callArgs.url; + if (!callUrl) { + callback(12003); + return; + } + var urlParts = callUrl.split(fragmentSeparator); + var seperator = "?"; + if (urlParts[0].indexOf("?") > -1) { + seperator = "&"; + } + var width = screen.width * callArgs.width / 100; + var height = screen.height * callArgs.height / 100; + var params = "width=" + width + ", height=" + height; + urlParts[0] = urlParts[0].concat(seperator).concat(magicWord); + var openUrl = urlParts.join(fragmentSeparator); + MacRichClientHostController.popup = window.open(openUrl, "", params); + function receiveMessage(event) { + if (event.source == MacRichClientHostController.popup) { + try { + var messageObj = JSON.parse(event.data); + if (messageObj.dialogMessage) { + handler(id, [0, messageObj.dialogMessage.messageContent]); + } + } + catch (e) { + OSF.Utility.trace("messages received cannot be handlered. Message:" + event.data); + } + } + } + MacRichClientHostController.DialogEventListener = receiveMessage; + function checkWindowCloseNotifyError(errorCode) { + handler(id, [errorCode]); + } + function checkWindowClose() { + try { + if (MacRichClientHostController.popup == null || MacRichClientHostController.popup.closed) { + window.clearInterval(MacRichClientHostController.interval); + window.removeEventListener("message", MacRichClientHostController.DialogEventListener); + MacRichClientHostController.NotifyError = null; + handler(id, [12006]); + } + } + catch (e) { + OSF.Utility.trace("Error happened when popup window closed."); + } + } + if (MacRichClientHostController.popup != undefined && window.dialogAPIErrorCode == undefined) { + window.addEventListener("message", MacRichClientHostController.DialogEventListener); + MacRichClientHostController.interval = window.setInterval(checkWindowClose, 500); + MacRichClientHostController.NotifyError = checkWindowCloseNotifyError; + callback(0); + } + else { + var error = 5001; + if (window.dialogAPIErrorCode) { + error = window.dialogAPIErrorCode; + } + callback(error); + } + }; + MacRichClientHostController.prototype.messageParent = function (params) { + var message = params[OSF.ParameterNames.MessageToParent]; + var messageObj = { dialogMessage: { messageType: 0, messageContent: message } }; + window.opener.postMessage(JSON.stringify(messageObj), window.location.origin); + }; + MacRichClientHostController.prototype.closeDialog = function (id, eventType, targetId, callback) { + if (MacRichClientHostController.popup) { + if (MacRichClientHostController.interval) { + window.clearInterval(MacRichClientHostController.interval); + } + MacRichClientHostController.popup.close(); + MacRichClientHostController.popup = null; + window.removeEventListener("message", MacRichClientHostController.DialogEventListener); + MacRichClientHostController.NotifyError = null; + callback(0); + } + else { + callback(5001); + } + }; + return MacRichClientHostController; + }(OSF.Webkit.WebkitHostController)); + OSF.MacRichClientHostController = MacRichClientHostController; +})(OSF || (OSF = {})); +var Office; +(function (Office) { + var _Internal; + (function (_Internal) { + var PromiseImpl; + (function (PromiseImpl) { + function Init() { + return (function () { + "use strict"; + function lib$es6$promise$utils$$objectOrFunction(x) { + return typeof x === 'function' || (typeof x === 'object' && x !== null); + } + function lib$es6$promise$utils$$isFunction(x) { + return typeof x === 'function'; + } + function lib$es6$promise$utils$$isMaybeThenable(x) { + return typeof x === 'object' && x !== null; + } + var lib$es6$promise$utils$$_isArray; + if (!Array.isArray) { + lib$es6$promise$utils$$_isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; + } + else { + lib$es6$promise$utils$$_isArray = Array.isArray; + } + var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray; + var lib$es6$promise$asap$$len = 0; + var lib$es6$promise$asap$$toString = {}.toString; + var lib$es6$promise$asap$$vertxNext; + var lib$es6$promise$asap$$customSchedulerFn; + var lib$es6$promise$asap$$asap = function asap(callback, arg) { + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback; + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg; + lib$es6$promise$asap$$len += 2; + if (lib$es6$promise$asap$$len === 2) { + if (lib$es6$promise$asap$$customSchedulerFn) { + lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush); + } + else { + lib$es6$promise$asap$$scheduleFlush(); + } + } + }; + function lib$es6$promise$asap$$setScheduler(scheduleFn) { + lib$es6$promise$asap$$customSchedulerFn = scheduleFn; + } + function lib$es6$promise$asap$$setAsap(asapFn) { + lib$es6$promise$asap$$asap = asapFn; + } + var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined; + var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {}; + var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver; + var lib$es6$promise$asap$$isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && + typeof importScripts !== 'undefined' && + typeof MessageChannel !== 'undefined'; + function lib$es6$promise$asap$$useNextTick() { + var nextTick = process.nextTick; + var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); + if (Array.isArray(version) && version[1] === '0' && version[2] === '10') { + nextTick = setImmediate; + } + return function () { + nextTick(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useVertxTimer() { + return function () { + lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useMutationObserver() { + var iterations = 0; + var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + return function () { + node.data = (iterations = ++iterations % 2); + }; + } + function lib$es6$promise$asap$$useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = lib$es6$promise$asap$$flush; + return function () { + channel.port2.postMessage(0); + }; + } + function lib$es6$promise$asap$$useSetTimeout() { + return function () { + setTimeout(lib$es6$promise$asap$$flush, 1); + }; + } + var lib$es6$promise$asap$$queue = new Array(1000); + function lib$es6$promise$asap$$flush() { + for (var i = 0; i < lib$es6$promise$asap$$len; i += 2) { + var callback = lib$es6$promise$asap$$queue[i]; + var arg = lib$es6$promise$asap$$queue[i + 1]; + callback(arg); + lib$es6$promise$asap$$queue[i] = undefined; + lib$es6$promise$asap$$queue[i + 1] = undefined; + } + lib$es6$promise$asap$$len = 0; + } + var lib$es6$promise$asap$$scheduleFlush; + if (lib$es6$promise$asap$$isNode) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick(); + } + else if (lib$es6$promise$asap$$isWorker) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel(); + } + else { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout(); + } + function lib$es6$promise$$internal$$noop() { } + var lib$es6$promise$$internal$$PENDING = void 0; + var lib$es6$promise$$internal$$FULFILLED = 1; + var lib$es6$promise$$internal$$REJECTED = 2; + var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$selfFullfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function lib$es6$promise$$internal$$cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); + } + function lib$es6$promise$$internal$$getThen(promise) { + try { + return promise.then; + } + catch (error) { + lib$es6$promise$$internal$$GET_THEN_ERROR.error = error; + return lib$es6$promise$$internal$$GET_THEN_ERROR; + } + } + function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } + catch (e) { + return e; + } + } + function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) { + lib$es6$promise$asap$$asap(function (promise) { + var sealed = false; + var error = lib$es6$promise$$internal$$tryThen(then, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + lib$es6$promise$$internal$$reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + if (!sealed && error) { + sealed = true; + lib$es6$promise$$internal$$reject(promise, error); + } + }, promise); + } + function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) { + if (thenable._state === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, thenable._result); + } + else if (thenable._state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, thenable._result); + } + else { + lib$es6$promise$$internal$$subscribe(thenable, undefined, function (value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function (reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + } + function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable) { + if (maybeThenable.constructor === promise.constructor) { + lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable); + } + else { + var then = lib$es6$promise$$internal$$getThen(maybeThenable); + if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error); + } + else if (then === undefined) { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + else if (lib$es6$promise$utils$$isFunction(then)) { + lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then); + } + else { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + } + } + function lib$es6$promise$$internal$$resolve(promise, value) { + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFullfillment()); + } + else if (lib$es6$promise$utils$$objectOrFunction(value)) { + lib$es6$promise$$internal$$handleMaybeThenable(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + } + function lib$es6$promise$$internal$$publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + lib$es6$promise$$internal$$publish(promise); + } + function lib$es6$promise$$internal$$fulfill(promise, value) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._result = value; + promise._state = lib$es6$promise$$internal$$FULFILLED; + if (promise._subscribers.length !== 0) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise); + } + } + function lib$es6$promise$$internal$$reject(promise, reason) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._state = lib$es6$promise$$internal$$REJECTED; + promise._result = reason; + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise); + } + function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) { + var subscribers = parent._subscribers; + var length = subscribers.length; + parent._onerror = null; + subscribers[length] = child; + subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment; + subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection; + if (length === 0 && parent._state) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent); + } + } + function lib$es6$promise$$internal$$publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + if (subscribers.length === 0) { + return; + } + var child, callback, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + if (child) { + lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail); + } + else { + callback(detail); + } + } + promise._subscribers.length = 0; + } + function lib$es6$promise$$internal$$ErrorObject() { + this.error = null; + } + var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$tryCatch(callback, detail) { + try { + return callback(detail); + } + catch (e) { + lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e; + return lib$es6$promise$$internal$$TRY_CATCH_ERROR; + } + } + function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) { + var hasCallback = lib$es6$promise$utils$$isFunction(callback), value, error, succeeded, failed; + if (hasCallback) { + value = lib$es6$promise$$internal$$tryCatch(callback, detail); + if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value = null; + } + else { + succeeded = true; + } + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn()); + return; + } + } + else { + value = detail; + succeeded = true; + } + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + } + else if (hasCallback && succeeded) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else if (failed) { + lib$es6$promise$$internal$$reject(promise, error); + } + else if (settled === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, value); + } + else if (settled === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + } + function lib$es6$promise$$internal$$initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function rejectPromise(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + catch (e) { + lib$es6$promise$$internal$$reject(promise, e); + } + } + function lib$es6$promise$enumerator$$Enumerator(Constructor, input) { + var enumerator = this; + enumerator._instanceConstructor = Constructor; + enumerator.promise = new Constructor(lib$es6$promise$$internal$$noop); + if (enumerator._validateInput(input)) { + enumerator._input = input; + enumerator.length = input.length; + enumerator._remaining = input.length; + enumerator._init(); + if (enumerator.length === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + else { + enumerator.length = enumerator.length || 0; + enumerator._enumerate(); + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + } + } + else { + lib$es6$promise$$internal$$reject(enumerator.promise, enumerator._validationError()); + } + } + lib$es6$promise$enumerator$$Enumerator.prototype._validateInput = function (input) { + return lib$es6$promise$utils$$isArray(input); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._validationError = function () { + return new Error('Array Methods must be provided an Array'); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._init = function () { + this._result = new Array(this.length); + }; + var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator; + lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function () { + var enumerator = this; + var length = enumerator.length; + var promise = enumerator.promise; + var input = enumerator._input; + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + enumerator._eachEntry(input[i], i); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function (entry, i) { + var enumerator = this; + var c = enumerator._instanceConstructor; + if (lib$es6$promise$utils$$isMaybeThenable(entry)) { + if (entry.constructor === c && entry._state !== lib$es6$promise$$internal$$PENDING) { + entry._onerror = null; + enumerator._settledAt(entry._state, i, entry._result); + } + else { + enumerator._willSettleAt(c.resolve(entry), i); + } + } + else { + enumerator._remaining--; + enumerator._result[i] = entry; + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function (state, i, value) { + var enumerator = this; + var promise = enumerator.promise; + if (promise._state === lib$es6$promise$$internal$$PENDING) { + enumerator._remaining--; + if (state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + else { + enumerator._result[i] = value; + } + } + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(promise, enumerator._result); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function (promise, i) { + var enumerator = this; + lib$es6$promise$$internal$$subscribe(promise, undefined, function (value) { + enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value); + }, function (reason) { + enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason); + }); + }; + function lib$es6$promise$promise$all$$all(entries) { + return new lib$es6$promise$enumerator$$default(this, entries).promise; + } + var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all; + function lib$es6$promise$promise$race$$race(entries) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + if (!lib$es6$promise$utils$$isArray(entries)) { + lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.')); + return promise; + } + var length = entries.length; + function onFulfillment(value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + function onRejection(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + } + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); + } + return promise; + } + var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race; + function lib$es6$promise$promise$resolve$$resolve(object) { + var Constructor = this; + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$resolve(promise, object); + return promise; + } + var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve; + function lib$es6$promise$promise$reject$$reject(reason) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$reject(promise, reason); + return promise; + } + var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject; + var lib$es6$promise$promise$$counter = 0; + function lib$es6$promise$promise$$needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); + } + function lib$es6$promise$promise$$needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise; + function lib$es6$promise$promise$$Promise(resolver) { + this._id = lib$es6$promise$promise$$counter++; + this._state = undefined; + this._result = undefined; + this._subscribers = []; + if (lib$es6$promise$$internal$$noop !== resolver) { + if (!lib$es6$promise$utils$$isFunction(resolver)) { + lib$es6$promise$promise$$needsResolver(); + } + if (!(this instanceof lib$es6$promise$promise$$Promise)) { + lib$es6$promise$promise$$needsNew(); + } + lib$es6$promise$$internal$$initializePromise(this, resolver); + } + } + lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default; + lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default; + lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default; + lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default; + lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler; + lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap; + lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap; + lib$es6$promise$promise$$Promise.prototype = { + constructor: lib$es6$promise$promise$$Promise, + then: function (onFulfillment, onRejection) { + var parent = this; + var state = parent._state; + if (state === lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state === lib$es6$promise$$internal$$REJECTED && !onRejection) { + return this; + } + var child = new this.constructor(lib$es6$promise$$internal$$noop); + var result = parent._result; + if (state) { + var callback = arguments[state - 1]; + lib$es6$promise$asap$$asap(function () { + lib$es6$promise$$internal$$invokeCallback(state, child, callback, result); + }); + } + else { + lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection); + } + return child; + }, + 'catch': function (onRejection) { + return this.then(null, onRejection); + } + }; + return lib$es6$promise$promise$$default; + }).call(this); + } + PromiseImpl.Init = Init; + })(PromiseImpl = _Internal.PromiseImpl || (_Internal.PromiseImpl = {})); + })(_Internal = Office._Internal || (Office._Internal = {})); + (function (_Internal) { + function isEdgeLessThan14() { + var userAgent = window.navigator.userAgent; + var versionIdx = userAgent.indexOf("Edge/"); + if (versionIdx >= 0) { + userAgent = userAgent.substring(versionIdx + 5, userAgent.length); + if (userAgent < "14.14393") + return true; + else + return false; + } + return false; + } + function determinePromise() { + if (typeof (window) === "undefined" && typeof (Promise) === "function") { + return Promise; + } + if (typeof (window) !== "undefined") { + if (window.Promise) { + return window.Promise; + } + else { + var ret = _Internal.PromiseImpl.Init(); + window.Promise = ret; + return ret; + } + } + } + _Internal.OfficePromise = determinePromise(); + })(_Internal = Office._Internal || (Office._Internal = {})); + Office.OfficePromise = _Internal.OfficePromise; + Office.Promise = Office.OfficePromise; +})(Office || (Office = {})); +var OSF; +(function (OSF) { + var AppTelemetry; + (function (AppTelemetry) { + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + var isAppActivatedPending = false; + var privateAddinId = "PRIVATE"; + AppTelemetry.enableTelemetry = true; + var AppInfo = (function () { + function AppInfo() { + } + return AppInfo; + }()); + AppTelemetry.AppInfo = AppInfo; + var AppStorage = (function () { + function AppStorage() { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set"; + } + AppStorage.prototype.getClientId = function () { + var clientId = this.getValue(this.clientIDKey); + if (!clientId || clientId.length <= 0 || clientId.length > 40) { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey, clientId); + } + return clientId; + }; + AppStorage.prototype.getValue = function (key) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if (osfLocalStorage) { + value = osfLocalStorage.getItem(key); + } + return value; + }; + AppStorage.prototype.setValue = function (key, value) { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + osfLocalStorage.setItem(key, value); + } + }; + return AppStorage; + }()); + function trimStringToLowerCase(input) { + if (input) { + input = input.replace(/[{}]/g, "").toLowerCase(); + } + return (input || ""); + } + function initialize(context) { + if (!AppTelemetry.enableTelemetry) { + return; + } + if (appInfo) { + return; + } + appInfo = new AppInfo(); + if (context.get_hostFullVersion()) { + appInfo.hostVersion = context.get_hostFullVersion(); + } + else { + appInfo.hostVersion = context.get_appVersion(); + } + appInfo.appId = canSendAddinId() ? context.get_id() : privateAddinId; + appInfo.marketplaceType = context._marketplaceType; + appInfo.host = "" + context.get_appName(); + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage()).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if (appInfo.appInstanceId) { + appInfo.appInstanceId = trimStringToLowerCase(appInfo.appInstanceId); + appInfo.appInstanceId = getCompliantAppInstanceId(context.get_id(), appInfo.appInstanceId); + } + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "NA"; + if (context._wacHostEnvironment) { + appInfo.wacHostEnvironment = context._wacHostEnvironment; + } + var isFromWacAutomation = context.get_isFromWacAutomation(); + if (isFromWacAutomation !== undefined && isFromWacAutomation !== null) { + appInfo.isFromWacAutomation = isFromWacAutomation.toString().toLowerCase(); + } + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if (url) { + appInfo.isPreload = url.indexOf('preload=1') !== -1 ? true : false; + url = url.split("?")[0].split("#")[0]; + } + appInfo.isMos = isMos(); + (function getUserIdAndAssetIdFromToken(token, appInfo) { + appInfo.assetId = ""; + appInfo.userId = ""; + try { + if (!OSF.Utility.isNullOrEmpty(token)) { + var xmlContent = decodeURIComponent(token); + var parser = new DOMParser(); + var xmlDoc = parser.parseFromString(xmlContent, "text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if (cidNode && cidNode.nodeValue) { + appInfo.userId = cidNode.nodeValue; + } + else if (oidNode && oidNode.nodeValue) { + appInfo.userId = oidNode.nodeValue; + } + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue; + } + } + catch (e) { + } + })(context.get_eToken(), appInfo); + appInfo.sessionId = sessionId; + OTel.OTelLogger.initialize(appInfo); + if (appInfo.isPreload) { + isAppActivatedPending = true; + } + else { + AppTelemetry.onAppActivated(); + } + } + AppTelemetry.initialize = initialize; + function onAppActivated() { + if (!appInfo) { + return; + } + if (isAppActivatedPending) { + return; + } + OTel.OTelLogger.onTelemetryLoaded(function () { + var dataFields = []; + var mos = appInfo.isMos ? 1 : 0; + dataFields = dataFields.concat([ + oteljs.makeStringDataField("Browser", appInfo.browser), + oteljs.makeInt64DataField("AppSizeWidth", window.innerWidth), + oteljs.makeInt64DataField("AppSizeHeight", window.innerHeight), + oteljs.makeInt64DataField("IsMOS", mos) + ]); + Microsoft.Office.WebExtension.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.AppActivatedX", + dataFields: dataFields, + eventFlags: { + dataCategories: 2, + diagnosticLevel: 110, + samplingPolicy: 191 + } + }); + }); + } + AppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) { + } + AppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) { + if (!appInfo) { + return; + } + } + AppTelemetry.onCallDone = onCallDone; + ; + function onMethodDone(id, args, msResponseTime, errorType) { + } + AppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) { + OSF.AppTelemetry.onCallDone("property", -1, propertyName, msResponseTime, 0); + } + AppTelemetry.onPropertyDone = onPropertyDone; + function onCheckWACHost(isWacKnownHost, instanceId, hostType, hostPlatform, wacDomain) { + } + AppTelemetry.onCheckWACHost = onCheckWACHost; + function onEventDone(id, errorType) { + OSF.AppTelemetry.onCallDone("event", id, null, 0, errorType); + } + AppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent", id, null, msResponseTime, errorType); + } + AppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) { + if (!appInfo) { + return; + } + } + AppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId); + } + AppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) { + } + AppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) { + doAppInitializationLogging(false, message); + } + AppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) { + doAppInitializationLogging(true, errorMessage); + } + AppTelemetry.logAppException = logAppException; + function CallOnAppActivatedIfPending() { + if (isAppActivatedPending) { + isAppActivatedPending = false; + onAppActivated(); + } + } + AppTelemetry.CallOnAppActivatedIfPending = CallOnAppActivatedIfPending; + function canSendAddinId() { + var isPublic = (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.PublicAddin) != 0; + if (isPublic) { + return isPublic; + } + if (!appInfo) { + return false; + } + var hostPlatform = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + var hostVersion = appInfo.hostVersion; + return _isComplianceExceptedHost(hostPlatform, hostVersion); + } + AppTelemetry.canSendAddinId = canSendAddinId; + function getCompliantAppInstanceId(addinId, appInstanceId) { + if (!canSendAddinId() && appInstanceId === addinId) { + return privateAddinId; + } + return appInstanceId; + } + AppTelemetry.getCompliantAppInstanceId = getCompliantAppInstanceId; + function _isComplianceExceptedHost(hostPlatform, hostVersion) { + var excepted = false; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(hostVersion); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (hostPlatform == OSF.HostInfoPlatform.win32) { + if (major < 16 || major == 16 && build < 14225) { + excepted = true; + } + } + else if (hostPlatform == OSF.HostInfoPlatform.mac) { + if (major < 16 || (major == 16 && (minor < 52 || minor == 52 && build < 808))) { + excepted = true; + } + } + } + return excepted; + } + AppTelemetry._isComplianceExceptedHost = _isComplianceExceptedHost; + function isMos() { + return (OSF._OfficeAppFactory.getHostInfo().flags & OSF.HostInfoFlags.IsMos) != 0; + } + AppTelemetry.isMos = isMos; + })(AppTelemetry = OSF.AppTelemetry || (OSF.AppTelemetry = {})); +})(OSF || (OSF = {})); +var OTel; +(function (OTel) { + var OTelLogger = (function () { + function OTelLogger() { + } + OTelLogger.loaded = function () { + return !(OTelLogger.logger === undefined); + }; + OTelLogger.create = function (info) { + var contract = { + id: info.appId, + marketplaceType: info.marketplaceType, + assetId: info.assetId, + officeJsVersion: info.officeJSVersion, + hostJsVersion: info.hostJSVersion, + browserToken: info.clientId, + instanceId: info.appInstanceId, + sessionId: info.sessionId + }; + var fields = oteljs.Contracts.Office.System.SDX.getFields("SDX", contract); + var flavor = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + var sink; + if (flavor === "web") { + sink = new OTel.SdxWacSink(); + } + else if (Office.context.requirements.isSetSupported('Telemetry', '1.2')) { + sink = new OTel.RichApiSink(); + } + else { + console.error('Cannot create telemetry sink successfully'); + return null; + } + var namespace = "Office.Extensibility.OfficeJs"; + var ariaTenantToken = 'db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439'; + var nexusTenantToken = 1755; + var logger = new oteljs.SimpleTelemetryLogger(undefined, fields); + logger.addSink(sink); + logger.setTenantToken(namespace, ariaTenantToken, nexusTenantToken); + oteljs.onNotification().addListener(function (notification) { + OSF.Utility.debugLog(notification.message()); + }); + return logger; + }; + OTelLogger.checkAndResolvePromises = function () { + if (OTelLogger.loaded()) { + OTelLogger.promises.forEach(function (resolve) { + resolve(); + }); + OTelLogger.promises = []; + } + }; + OTelLogger.initialize = function (info) { + if (!OTelLogger.Enabled) { + OTelLogger.promises = []; + return; + } + Office.onReadyInternal().then(function () { + if (!OTelLogger.loaded()) { + OSF.Utility.debugLog("Creating OTelLogger"); + OTelLogger.logger = OTelLogger.create(info); + OTelLogger.checkAndResolvePromises(); + } + }); + }; + OTelLogger.sendTelemetryEvent = function (telemetryEvent) { + OTelLogger.onTelemetryLoaded(function () { + try { + OTelLogger.logger.sendTelemetryEvent(telemetryEvent); + OSF.Utility.debugLog("Sent telemetry"); + } + catch (e) { + console.error("Cannot send telemetry event: " + JSON.stringify(e)); + } + }); + }; + OTelLogger.onTelemetryLoaded = function (resolve) { + if (!OTelLogger.Enabled) { + return; + } + if (OTelLogger.loaded()) { + resolve(); + } + else { + OTelLogger.promises.push(resolve); + } + }; + OTelLogger.promises = []; + OTelLogger.Enabled = true; + return OTelLogger; + }()); + OTel.OTelLogger = OTelLogger; +})(OTel || (OTel = {})); +var OTel; +(function (OTel) { + var DEFAULT_MINIMUM_MILLISECONDS_BETWEEN_CALLS = 1000; + var _minimumMillisecondsBeforeFirstCall = DEFAULT_MINIMUM_MILLISECONDS_BETWEEN_CALLS; + var _minimumMillisecondsBetweenCalls = DEFAULT_MINIMUM_MILLISECONDS_BETWEEN_CALLS; + var RichApiSink = (function () { + function RichApiSink() { + var _this = this; + this._requestIsPending = true; + this._telemetryQueue = []; + this.pause(_minimumMillisecondsBeforeFirstCall).then(function () { + var currentWork = _this._telemetryQueue; + _this._telemetryQueue = []; + _this._requestIsPending = false; + _this.processTelemetryEvents(currentWork); + }); + } + RichApiSink.prototype.sendTelemetryEvent = function (telemetryEvent) { + this._telemetryQueue.push(telemetryEvent); + if (this._requestIsPending) { + return; + } + this.processWorkBacklog(); + }; + RichApiSink.prototype.processWorkBacklog = function () { + var _this = this; + this._requestIsPending = true; + var currentWork = this._telemetryQueue; + this._telemetryQueue = []; + this.processTelemetryEvents(currentWork) + .then(this.waitAndProcessMore) + .catch(function (error) { + oteljs.logError(1, "RichApiSink Error", error); + _this.waitAndProcessMore(); + }); + }; + RichApiSink.prototype.waitAndProcessMore = function () { + var _this = this; + this.pause(_minimumMillisecondsBetweenCalls) + .then(function () { + if (_this._telemetryQueue.length > 0) { + setTimeout(function () { return _this.processWorkBacklog(); }, 0); + } + _this._requestIsPending = false; + }) + .catch(function () { }); + }; + RichApiSink.prototype.processTelemetryEvents = function (telemetryEvents) { + var _this = this; + var ctx = new OfficeCore.RequestContext(); + telemetryEvents.forEach(function (telemetryEvent) { + if (!telemetryEvent.telemetryProperties) { + return; + } + var dataFields = []; + _this.addDataFields(dataFields, telemetryEvent.dataFields); + var contractName = !!telemetryEvent.eventContract ? telemetryEvent.eventContract.name : ''; + if (!!telemetryEvent.eventContract) { + _this.addDataFields(dataFields, telemetryEvent.eventContract.dataFields); + } + ctx.telemetry.sendTelemetryEvent(telemetryEvent.telemetryProperties, telemetryEvent.eventName, contractName, oteljs.getEffectiveEventFlags(telemetryEvent), dataFields); + }); + return ctx.sync().catch(function () { + oteljs.logNotification(2, 1, function () { return 'RichApi telemetry call failed.'; }); + }); + }; + RichApiSink.prototype.addDataFields = function (richApiDataFields, dataFields) { + if (dataFields) { + dataFields.forEach(function (dataField) { + richApiDataFields.push({ + name: dataField.name, + value: dataField.value, + classification: dataField.classification ? dataField.classification : 4, + type: dataField.dataType + }); + }); + } + }; + RichApiSink.prototype.pause = function (ms) { + return new Office.Promise(function (resolve) { return setTimeout(resolve, ms); }); + }; + return RichApiSink; + }()); + OTel.RichApiSink = RichApiSink; +})(OTel || (OTel = {})); +var OTel; +(function (OTel) { + var SdxWacSink = (function () { + function SdxWacSink() { + } + SdxWacSink.prototype.sendTelemetryEvent = function (event, _timestamp) { + try { + if (event.dataFields && + event.dataFields.filter(function (dataField) { + return dataField.classification && dataField.classification !== 4; + }).length > 0) { + return; + } + var id = OSF._OfficeAppFactory.getId(); + var SendTelemetryEventId = OSF.AgaveHostAction.SendTelemetryEvent; + OSF.getClientEndPoint().invoke('ContextActivationManager_notifyHost', null, [id, SendTelemetryEventId, event]); + } + catch (error) { + oteljs.logError(1, "AgaveWacSink", error); + } + }; + return SdxWacSink; + }()); + OTel.SdxWacSink = SdxWacSink; +})(OTel || (OTel = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExtension; +(function (OfficeExtension_1) { + var SessionBase = (function () { + function SessionBase() { + } + SessionBase.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + SessionBase.prototype._createRequestExecutorOrNull = function () { + return null; + }; + SessionBase.prototype.getEventRegistration = function (controlId) { + return null; + }; + return SessionBase; + }()); + OfficeExtension_1.SessionBase = SessionBase; + var HttpUtility = (function () { + function HttpUtility() { + } + HttpUtility.setCustomSendRequestFunc = function (func) { + HttpUtility.s_customSendRequestFunc = func; + }; + HttpUtility.xhrSendRequestFunc = function (request) { + return CoreUtility.createPromise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open(request.method, request.url); + xhr.onload = function () { + var resp = { + statusCode: xhr.status, + headers: CoreUtility._parseHttpResponseHeaders(xhr.getAllResponseHeaders()), + body: xhr.responseText + }; + resolve(resp); + }; + xhr.onerror = function () { + reject(new _Internal.RuntimeError({ + code: CoreErrorCodes.connectionFailure, + httpStatusCode: xhr.status, + message: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, xhr.statusText) + })); + }; + if (request.headers) { + for (var key in request.headers) { + xhr.setRequestHeader(key, request.headers[key]); + } + } + xhr.send(CoreUtility._getRequestBodyText(request)); + }); + }; + HttpUtility.fetchSendRequestFunc = function (request) { + var requestBodyText = CoreUtility._getRequestBodyText(request); + if (requestBodyText === '') { + requestBodyText = undefined; + } + return fetch(request.url, { + method: request.method, + headers: request.headers, + body: requestBodyText + }) + .then(function (resp) { + return resp.text() + .then(function (body) { + var statusCode = resp.status; + var headers = {}; + resp.headers.forEach(function (value, name) { + headers[name] = value; + }); + var ret = { statusCode: statusCode, headers: headers, body: body }; + return ret; + }); + }); + }; + HttpUtility.sendRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func = HttpUtility.s_customSendRequestFunc; + if (!func) { + if (typeof (fetch) !== 'undefined') { + func = HttpUtility.fetchSendRequestFunc; + } + else { + func = HttpUtility.xhrSendRequestFunc; + } + } + return func(request); + }; + HttpUtility.setCustomSendLocalDocumentRequestFunc = function (func) { + HttpUtility.s_customSendLocalDocumentRequestFunc = func; + }; + HttpUtility.sendLocalDocumentRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func; + func = HttpUtility.s_customSendLocalDocumentRequestFunc || HttpUtility.officeJsSendLocalDocumentRequestFunc; + return func(request); + }; + HttpUtility.officeJsSendLocalDocumentRequestFunc = function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestSafeArray = CoreUtility._buildRequestMessageSafeArray(request); + return CoreUtility.createPromise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { + var response; + if (asyncResult.status == 'succeeded') { + response = { + statusCode: RichApiMessageUtility.getResponseStatusCode(asyncResult), + headers: RichApiMessageUtility.getResponseHeaders(asyncResult), + body: RichApiMessageUtility.getResponseBody(asyncResult) + }; + } + else { + response = RichApiMessageUtility.buildHttpResponseFromOfficeJsError(asyncResult.error.code, asyncResult.error.message); + } + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(response)); + resolve(response); + }); + }); + }; + HttpUtility.validateAndNormalizeRequest = function (request) { + if (CoreUtility.isNullOrUndefined(request)) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + if (CoreUtility.isNullOrEmptyString(request.method)) { + request.method = 'GET'; + } + request.method = request.method.toUpperCase(); + var alreadyHasTestName = false; + if (typeof (request.headers) === 'object' && request.headers[CoreConstants.testRequestNameHeader]) { + alreadyHasTestName = true; + } + if (!alreadyHasTestName) { + var currentTestName = TestUtility._getCurrentTestNameWithSequenceId(); + if (currentTestName) { + if (!request.headers) { + request.headers = {}; + } + request.headers[CoreConstants.testRequestNameHeader] = currentTestName; + } + } + }; + HttpUtility.logRequest = function (request) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Request---'); + CoreUtility.log(request.method + ' ' + request.url); + if (request.headers) { + for (var key in request.headers) { + CoreUtility.log(key + ': ' + request.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(CoreUtility._getRequestBodyText(request)); + } + } + }; + HttpUtility.logResponse = function (response) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Response---'); + CoreUtility.log('' + response.statusCode); + if (response.headers) { + for (var key in response.headers) { + CoreUtility.log(key + ': ' + response.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(response.body); + } + } + }; + HttpUtility._logBodyEnabled = false; + return HttpUtility; + }()); + OfficeExtension_1.HttpUtility = HttpUtility; + var HostBridge = (function () { + function HostBridge(m_bridge) { + var _this = this; + this.m_bridge = m_bridge; + this.m_promiseResolver = {}; + this.m_handlers = []; + this.m_bridge.onMessageFromHost = function (messageText) { + var message = JSON.parse(messageText); + if (message.type == 3) { + var genericMessageBody = message.message; + if (genericMessageBody && genericMessageBody.entries) { + for (var i = 0; i < genericMessageBody.entries.length; i++) { + var entryObjectOrArray = genericMessageBody.entries[i]; + if (Array.isArray(entryObjectOrArray)) { + var entry = { + messageCategory: entryObjectOrArray[0], + messageType: entryObjectOrArray[1], + targetId: entryObjectOrArray[2], + message: entryObjectOrArray[3], + id: entryObjectOrArray[4] + }; + genericMessageBody.entries[i] = entry; + } + } + } + } + _this.dispatchMessage(message); + }; + } + HostBridge.init = function (bridge) { + if (typeof bridge !== 'object' || !bridge) { + return; + } + var instance = new HostBridge(bridge); + HostBridge.s_instance = instance; + HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var index = request.url.indexOf('?'); + if (index >= 0) { + var query = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(query); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + } + if (typeof (request.body) === "string") { + request.body = JSON.parse(request.body); + } + var bridgeMessage = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + message: request + }; + return instance.sendMessageToHostAndExpectResponse(bridgeMessage).then(function (bridgeResponse) { + var responseInfo = bridgeResponse.message; + return responseInfo; + }); + }); + for (var i = 0; i < HostBridge.s_onInitedHandlers.length; i++) { + HostBridge.s_onInitedHandlers[i](instance); + } + }; + Object.defineProperty(HostBridge, "instance", { + get: function () { + return HostBridge.s_instance; + }, + enumerable: true, + configurable: true + }); + HostBridge.prototype.sendMessageToHost = function (message) { + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + }; + HostBridge.prototype.sendMessageToHostAndExpectResponse = function (message) { + var _this = this; + var ret = CoreUtility.createPromise(function (resolve, reject) { + _this.m_promiseResolver[message.id] = resolve; + }); + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + return ret; + }; + HostBridge.prototype.addHostMessageHandler = function (handler) { + this.m_handlers.push(handler); + }; + HostBridge.prototype.removeHostMessageHandler = function (handler) { + var index = this.m_handlers.indexOf(handler); + if (index >= 0) { + this.m_handlers.splice(index, 1); + } + }; + HostBridge.onInited = function (handler) { + HostBridge.s_onInitedHandlers.push(handler); + if (HostBridge.s_instance) { + handler(HostBridge.s_instance); + } + }; + HostBridge.prototype.dispatchMessage = function (message) { + if (typeof message.id === 'number') { + var resolve = this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + delete this.m_promiseResolver[message.id]; + return; + } + } + for (var i = 0; i < this.m_handlers.length; i++) { + this.m_handlers[i](message); + } + }; + HostBridge.nextId = function () { + return HostBridge.s_nextId++; + }; + HostBridge.s_onInitedHandlers = []; + HostBridge.s_nextId = 1; + return HostBridge; + }()); + OfficeExtension_1.HostBridge = HostBridge; + if (typeof _richApiNativeBridge === 'object' && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var _Internal; + (function (_Internal) { + var RuntimeError = (function (_super) { + __extends(RuntimeError, _super); + function RuntimeError(error) { + var _this = _super.call(this, typeof error === 'string' ? error : error.message) || this; + Object.setPrototypeOf(_this, RuntimeError.prototype); + _this.name = 'RichApi.Error'; + if (typeof error === 'string') { + _this.message = error; + } + else { + _this.code = error.code; + _this.message = error.message; + _this.traceMessages = error.traceMessages || []; + _this.innerError = error.innerError || null; + _this.debugInfo = _this._createDebugInfo(error.debugInfo || {}); + _this.httpStatusCode = error.httpStatusCode; + _this.data = error.data; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode) || _this.httpStatusCode === 200) { + var mapping = {}; + mapping[CoreErrorCodes.accessDenied] = 401; + mapping[CoreErrorCodes.connectionFailure] = 500; + mapping[CoreErrorCodes.generalException] = 500; + mapping[CoreErrorCodes.invalidArgument] = 400; + mapping[CoreErrorCodes.invalidObjectPath] = 400; + mapping[CoreErrorCodes.invalidOrTimedOutSession] = 408; + mapping[CoreErrorCodes.invalidRequestContext] = 400; + mapping[CoreErrorCodes.timeout] = 408; + mapping[CoreErrorCodes.valueNotLoaded] = 400; + _this.httpStatusCode = mapping[_this.code]; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode)) { + _this.httpStatusCode = 500; + } + return _this; + } + RuntimeError.prototype.toString = function () { + return this.code + ': ' + this.message; + }; + RuntimeError.prototype._createDebugInfo = function (partialDebugInfo) { + var debugInfo = { + code: this.code, + message: this.message + }; + debugInfo.toString = function () { + return JSON.stringify(this); + }; + for (var key in partialDebugInfo) { + debugInfo[key] = partialDebugInfo[key]; + } + if (this.innerError) { + if (this.innerError instanceof _Internal.RuntimeError) { + debugInfo.innerError = this.innerError.debugInfo; + } + else { + debugInfo.innerError = this.innerError; + } + } + return debugInfo; + }; + RuntimeError._createInvalidArgError = function (error) { + return new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility.isNullOrEmptyString(error.argumentName) + ? CoreUtility._getResourceString(CoreResourceStrings.invalidArgumentGeneric) + : CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, error.argumentName), + debugInfo: error.errorLocation ? { errorLocation: error.errorLocation } : {}, + innerError: error.innerError + }); + }; + return RuntimeError; + }(Error)); + _Internal.RuntimeError = RuntimeError; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + OfficeExtension_1.Error = _Internal.RuntimeError; + var CoreErrorCodes = (function () { + function CoreErrorCodes() { + } + CoreErrorCodes.apiNotFound = 'ApiNotFound'; + CoreErrorCodes.accessDenied = 'AccessDenied'; + CoreErrorCodes.generalException = 'GeneralException'; + CoreErrorCodes.activityLimitReached = 'ActivityLimitReached'; + CoreErrorCodes.invalidArgument = 'InvalidArgument'; + CoreErrorCodes.connectionFailure = 'ConnectionFailure'; + CoreErrorCodes.timeout = 'Timeout'; + CoreErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + CoreErrorCodes.invalidObjectPath = 'InvalidObjectPath'; + CoreErrorCodes.invalidRequestContext = 'InvalidRequestContext'; + CoreErrorCodes.valueNotLoaded = 'ValueNotLoaded'; + CoreErrorCodes.requestPayloadSizeLimitExceeded = 'RequestPayloadSizeLimitExceeded'; + CoreErrorCodes.responsePayloadSizeLimitExceeded = 'ResponsePayloadSizeLimitExceeded'; + CoreErrorCodes.writeNotSupportedWhenModalDialogOpen = 'WriteNotSupportedWhenModalDialogOpen'; + return CoreErrorCodes; + }()); + OfficeExtension_1.CoreErrorCodes = CoreErrorCodes; + var CoreResourceStrings = (function () { + function CoreResourceStrings() { + } + CoreResourceStrings.apiNotFoundDetails = 'ApiNotFoundDetails'; + CoreResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + CoreResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + CoreResourceStrings.invalidArgument = 'InvalidArgument'; + CoreResourceStrings.invalidArgumentGeneric = 'InvalidArgumentGeneric'; + CoreResourceStrings.timeout = 'Timeout'; + CoreResourceStrings.invalidOrTimedOutSessionMessage = 'InvalidOrTimedOutSessionMessage'; + CoreResourceStrings.invalidSheetName = 'InvalidSheetName'; + CoreResourceStrings.invalidObjectPath = 'InvalidObjectPath'; + CoreResourceStrings.invalidRequestContext = 'InvalidRequestContext'; + CoreResourceStrings.valueNotLoaded = 'ValueNotLoaded'; + return CoreResourceStrings; + }()); + OfficeExtension_1.CoreResourceStrings = CoreResourceStrings; + var CoreConstants = (function () { + function CoreConstants() { + } + CoreConstants.flags = 'flags'; + CoreConstants.sourceLibHeader = 'SdkVersion'; + CoreConstants.processQuery = 'ProcessQuery'; + CoreConstants.localDocument = 'http://document.localhost/'; + CoreConstants.localDocumentApiPrefix = 'http://document.localhost/_api/'; + CoreConstants.customData = 'customdata'; + CoreConstants.testRequestNameHeader = 'x-test-request-name'; + return CoreConstants; + }()); + OfficeExtension_1.CoreConstants = CoreConstants; + var RichApiMessageUtility = (function () { + function RichApiMessageUtility() { + } + RichApiMessageUtility.buildMessageArrayForIRequestExecutor = function (customData, requestFlags, requestMessage, sourceLibHeaderValue) { + var requestMessageText = JSON.stringify(requestMessage.Body); + CoreUtility.log('Request:'); + CoreUtility.log(requestMessageText); + var headers = {}; + CoreUtility._copyHeaders(requestMessage.Headers, headers); + headers[CoreConstants.sourceLibHeader] = sourceLibHeaderValue; + var messageSafearray = RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, 'POST', CoreConstants.processQuery, headers, requestMessageText); + return messageSafearray; + }; + RichApiMessageUtility.buildResponseOnSuccess = function (responseBody, responseHeaders) { + var response = { HttpStatusCode: 200, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.Body = JSON.parse(responseBody); + response.Headers = responseHeaders; + return response; + }; + RichApiMessageUtility.buildResponseOnError = function (errorCode, message) { + var response = { HttpStatusCode: 500, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.ErrorCode = CoreErrorCodes.generalException; + response.ErrorMessage = message; + if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + response.ErrorCode = CoreErrorCodes.accessDenied; + response.HttpStatusCode = 401; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + response.ErrorCode = CoreErrorCodes.activityLimitReached; + response.HttpStatusCode = 429; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession) { + response.ErrorCode = CoreErrorCodes.invalidOrTimedOutSession; + response.HttpStatusCode = 408; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidOrTimedOutSessionMessage); + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.requestPayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.responsePayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen) { + response.ErrorCode = CoreErrorCodes.writeNotSupportedWhenModalDialogOpen; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName) { + response.ErrorCode = CoreErrorCodes.invalidRequestContext; + response.HttpStatusCode = 400; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidSheetName); + } + return response; + }; + RichApiMessageUtility.buildHttpResponseFromOfficeJsError = function (errorCode, message) { + var statusCode = 500; + var errorBody = {}; + errorBody['error'] = {}; + errorBody['error']['code'] = CoreErrorCodes.generalException; + errorBody['error']['message'] = message; + if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + statusCode = 403; + errorBody['error']['code'] = CoreErrorCodes.accessDenied; + } + else if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + statusCode = 429; + errorBody['error']['code'] = CoreErrorCodes.activityLimitReached; + } + return { statusCode: statusCode, headers: {}, body: JSON.stringify(errorBody) }; + }; + RichApiMessageUtility.buildRequestMessageSafeArray = function (customData, requestFlags, method, path, headers, body) { + var headerArray = []; + if (headers) { + for (var headerName in headers) { + headerArray.push(headerName); + headerArray.push(headers[headerName]); + } + } + var appPermission = 0; + var solutionId = ''; + var instanceId = ''; + var marketplaceType = ''; + var solutionVersion = ''; + var storeLocation = ''; + var compliantSolutionId = ''; + return [ + customData, + method, + path, + headerArray, + body, + appPermission, + requestFlags, + solutionId, + instanceId, + marketplaceType, + solutionVersion, + storeLocation, + compliantSolutionId + ]; + }; + RichApiMessageUtility.getResponseBody = function (result) { + return RichApiMessageUtility.getResponseBodyFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseHeaders = function (result) { + return RichApiMessageUtility.getResponseHeadersFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseBodyFromSafeArray = function (data) { + var ret = data[2]; + if (typeof ret === 'string') { + return ret; + } + var arr = ret; + return arr.join(''); + }; + RichApiMessageUtility.getResponseHeadersFromSafeArray = function (data) { + var arrayHeader = data[1]; + if (!arrayHeader) { + return null; + } + var headers = {}; + for (var i = 0; i < arrayHeader.length - 1; i += 2) { + headers[arrayHeader[i]] = arrayHeader[i + 1]; + } + return headers; + }; + RichApiMessageUtility.getResponseStatusCode = function (result) { + return RichApiMessageUtility.getResponseStatusCodeFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseStatusCodeFromSafeArray = function (data) { + return data[0]; + }; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession = 5012; + RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached = 5102; + RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability = 7000; + RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded = 5103; + RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded = 5104; + RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen = 5016; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName = 1014; + return RichApiMessageUtility; + }()); + OfficeExtension_1.RichApiMessageUtility = RichApiMessageUtility; + (function (_Internal) { + function getPromiseType() { + if (typeof Promise !== 'undefined') { + return Promise; + } + if (typeof Office !== 'undefined') { + if (Office.Promise) { + return Office.Promise; + } + } + if (typeof OfficeExtension !== 'undefined') { + if (OfficeExtension.Promise) { + return OfficeExtension.Promise; + } + } + throw new _Internal.Error('No Promise implementation found'); + } + _Internal.getPromiseType = getPromiseType; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var CoreUtility = (function () { + function CoreUtility() { + } + CoreUtility.log = function (message) { + if (CoreUtility._logEnabled && typeof console !== 'undefined' && console.log) { + console.log(message); + } + }; + CoreUtility.checkArgumentNull = function (value, name) { + if (CoreUtility.isNullOrUndefined(value)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: name }); + } + }; + CoreUtility.isNullOrUndefined = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isUndefined = function (value) { + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isNullOrEmptyString = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + if (value.length == 0) { + return true; + } + return false; + }; + CoreUtility.isPlainJsonObject = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return false; + } + if (typeof value !== 'object') { + return false; + } + if (Object.prototype.toString.apply(value) !== '[object Object]') { + return false; + } + if (value.constructor && + !Object.prototype.hasOwnProperty.call(value, 'constructor') && + !Object.prototype.hasOwnProperty.call(value.constructor.prototype, 'hasOwnProperty')) { + return false; + } + for (var key in value) { + if (!Object.prototype.hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + }; + CoreUtility.trim = function (str) { + return str.replace(new RegExp('^\\s+|\\s+$', 'g'), ''); + }; + CoreUtility.caseInsensitiveCompareString = function (str1, str2) { + if (CoreUtility.isNullOrUndefined(str1)) { + return CoreUtility.isNullOrUndefined(str2); + } + else { + if (CoreUtility.isNullOrUndefined(str2)) { + return false; + } + else { + return str1.toUpperCase() == str2.toUpperCase(); + } + } + }; + CoreUtility.isReadonlyRestRequest = function (method) { + return CoreUtility.caseInsensitiveCompareString(method, 'GET'); + }; + CoreUtility._getResourceString = function (resourceId, arg) { + var ret; + if (typeof window !== 'undefined' && window.Strings && window.Strings.OfficeOM) { + var stringName = 'L_' + resourceId; + var stringValue = window.Strings.OfficeOM[stringName]; + if (stringValue) { + ret = stringValue; + } + } + if (!ret) { + ret = CoreUtility.s_resourceStringValues[resourceId]; + } + if (!ret) { + ret = resourceId; + } + if (!CoreUtility.isNullOrUndefined(arg)) { + if (Array.isArray(arg)) { + var arrArg = arg; + ret = CoreUtility._formatString(ret, arrArg); + } + else { + ret = ret.replace('{0}', arg); + } + } + return ret; + }; + CoreUtility._formatString = function (format, arrArg) { + return format.replace(/\{\d\}/g, function (v) { + var position = parseInt(v.substr(1, v.length - 2)); + if (position < arrArg.length) { + return arrArg[position]; + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'format' }); + } + }); + }; + Object.defineProperty(CoreUtility, "Promise", { + get: function () { + return _Internal.getPromiseType(); + }, + enumerable: true, + configurable: true + }); + CoreUtility.createPromise = function (executor) { + var ret = new CoreUtility.Promise(executor); + return ret; + }; + CoreUtility._createPromiseFromResult = function (value) { + return CoreUtility.createPromise(function (resolve, reject) { + resolve(value); + }); + }; + CoreUtility._createPromiseFromException = function (reason) { + return CoreUtility.createPromise(function (resolve, reject) { + reject(reason); + }); + }; + CoreUtility._createTimeoutPromise = function (timeout) { + return CoreUtility.createPromise(function (resolve, reject) { + setTimeout(function () { + resolve(null); + }, timeout); + }); + }; + CoreUtility._createInvalidArgError = function (error) { + return _Internal.RuntimeError._createInvalidArgError(error); + }; + CoreUtility._isLocalDocumentUrl = function (url) { + return CoreUtility._getLocalDocumentUrlPrefixLength(url) > 0; + }; + CoreUtility._getLocalDocumentUrlPrefixLength = function (url) { + var localDocumentPrefixes = [ + 'http://document.localhost', + 'https://document.localhost', + '//document.localhost' + ]; + var urlLower = url.toLowerCase().trim(); + for (var i = 0; i < localDocumentPrefixes.length; i++) { + if (urlLower === localDocumentPrefixes[i]) { + return localDocumentPrefixes[i].length; + } + else if (urlLower.substr(0, localDocumentPrefixes[i].length + 1) === localDocumentPrefixes[i] + '/') { + return localDocumentPrefixes[i].length + 1; + } + } + return 0; + }; + CoreUtility._validateLocalDocumentRequest = function (request) { + var index = CoreUtility._getLocalDocumentUrlPrefixLength(request.url); + if (index <= 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + var path = request.url.substr(index); + var pathLower = path.toLowerCase(); + if (pathLower === '_api') { + path = ''; + } + else if (pathLower.substr(0, '_api/'.length) === '_api/') { + path = path.substr('_api/'.length); + } + return { + method: request.method, + url: path, + headers: request.headers, + body: request.body + }; + }; + CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny = function (queryString) { + var ret = { flags: -1, customData: '' }; + var parts = queryString.split('&'); + for (var i = 0; i < parts.length; i++) { + var keyvalue = parts[i].split('='); + if (keyvalue[0].toLowerCase() === CoreConstants.flags) { + var flags = parseInt(keyvalue[1]); + flags = flags & 8191; + ret.flags = flags; + } + else if (keyvalue[0].toLowerCase() === CoreConstants.customData) { + ret.customData = decodeURIComponent(keyvalue[1]); + } + } + return ret; + }; + CoreUtility._getRequestBodyText = function (request) { + var body = ''; + if (typeof request.body === 'string') { + body = request.body; + } + else if (request.body && typeof request.body === 'object') { + body = JSON.stringify(request.body); + } + return body; + }; + CoreUtility._parseResponseBody = function (response) { + if (typeof response.body === 'string') { + var bodyText = CoreUtility.trim(response.body); + return JSON.parse(bodyText); + } + else { + return response.body; + } + }; + CoreUtility._buildRequestMessageSafeArray = function (request) { + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var customData = ''; + if (request.url.substr(0, CoreConstants.processQuery.length).toLowerCase() === + CoreConstants.processQuery.toLowerCase()) { + var index = request.url.indexOf('?'); + if (index > 0) { + var queryString = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(queryString); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + customData = flagsAndCustomData.customData; + } + } + return RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, request.method, request.url, request.headers, CoreUtility._getRequestBodyText(request)); + }; + CoreUtility._parseHttpResponseHeaders = function (allResponseHeaders) { + var responseHeaders = {}; + if (!CoreUtility.isNullOrEmptyString(allResponseHeaders)) { + var regex = new RegExp('\r?\n'); + var entries = allResponseHeaders.split(regex); + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + if (entry != null) { + var index = entry.indexOf(':'); + if (index > 0) { + var key = entry.substr(0, index); + var value = entry.substr(index + 1); + key = CoreUtility.trim(key); + value = CoreUtility.trim(value); + responseHeaders[key.toUpperCase()] = value; + } + } + } + } + return responseHeaders; + }; + CoreUtility._parseErrorResponse = function (responseInfo) { + var errorObj = CoreUtility._parseErrorResponseBody(responseInfo); + var statusCode = responseInfo.statusCode.toString(); + if (CoreUtility.isNullOrUndefined(errorObj) || typeof errorObj !== 'object' || !errorObj.error) { + return CoreUtility._createDefaultErrorResponse(statusCode); + } + var error = errorObj.error; + var innerError = error.innerError; + if (innerError && innerError.code) { + return CoreUtility._createErrorResponse(innerError.code, statusCode, innerError.message); + } + if (error.code) { + return CoreUtility._createErrorResponse(error.code, statusCode, error.message); + } + return CoreUtility._createDefaultErrorResponse(statusCode); + }; + CoreUtility._parseErrorResponseBody = function (responseInfo) { + if (CoreUtility.isPlainJsonObject(responseInfo.body)) { + return responseInfo.body; + } + else if (!CoreUtility.isNullOrEmptyString(responseInfo.body)) { + var errorResponseBody = CoreUtility.trim(responseInfo.body); + try { + return JSON.parse(errorResponseBody); + } + catch (e) { + CoreUtility.log('Error when parse ' + errorResponseBody); + } + } + }; + CoreUtility._createDefaultErrorResponse = function (statusCode) { + return { + errorCode: CoreErrorCodes.connectionFailure, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, statusCode) + }; + }; + CoreUtility._createErrorResponse = function (code, statusCode, message) { + return { + errorCode: code, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithDetails, [ + statusCode, + code, + message + ]) + }; + }; + CoreUtility._copyHeaders = function (src, dest) { + if (src && dest) { + for (var key in src) { + dest[key] = src[key]; + } + } + }; + CoreUtility.addResourceStringValues = function (values) { + for (var key in values) { + CoreUtility.s_resourceStringValues[key] = values[key]; + } + }; + CoreUtility._logEnabled = false; + CoreUtility.s_resourceStringValues = { + ApiNotFoundDetails: 'The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.', + ConnectionFailureWithStatus: 'The request failed with status code of {0}.', + ConnectionFailureWithDetails: 'The request failed with status code of {0}, error code {1} and the following error message: {2}', + InvalidArgument: "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.", + InvalidObjectPath: 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.', + InvalidRequestContext: 'Cannot use the object across different request contexts.', + Timeout: 'The operation has timed out.', + ValueNotLoaded: 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.' + }; + return CoreUtility; + }()); + OfficeExtension_1.CoreUtility = CoreUtility; + var TestUtility = (function () { + function TestUtility() { + } + TestUtility.setMock = function (value) { + TestUtility.s_isMock = value; + }; + TestUtility.isMock = function () { + return TestUtility.s_isMock; + }; + TestUtility._setCurrentTestName = function (value) { + TestUtility.s_currentTestName = value; + TestUtility.s_currentTestSequenceId = 0; + }; + TestUtility._getCurrentTestNameWithSequenceId = function () { + if (TestUtility.s_currentTestName) { + TestUtility.s_currentTestSequenceId++; + return TestUtility.s_currentTestName + "." + TestUtility.s_currentTestSequenceId; + } + return null; + }; + return TestUtility; + }()); + OfficeExtension_1.TestUtility = TestUtility; + OfficeExtension_1._internalConfig = { + showDisposeInfoInDebugInfo: false, + showInternalApiInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectUpdateMethod: false, + alwaysPolyfillClientObjectRetrieveMethod: false, + enableConcurrentFlag: true, + enableUndoableFlag: true, + appendTypeNameToObjectPathInfo: false, + enablePreviewExecution: false, + }; + OfficeExtension_1.config = { + extendedErrorLogging: false + }; + var CommonActionFactory = (function () { + function CommonActionFactory() { + } + CommonActionFactory.createSetPropertyAction = function (context, parent, propertyName, value, flags) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var args = [value]; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + CommonUtility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var action = new Action(actionInfo, 0, flags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (flags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectId: '', + ObjectType: '', + Arguments: [value] + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return parent._addAction(action); + }; + CommonActionFactory.createQueryAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 2, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createQueryAsJsonAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 7, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createUpdateAction = function (context, parent, objectState) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 9, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 0, 0); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action); + }; + return CommonActionFactory; + }()); + OfficeExtension_1.CommonActionFactory = CommonActionFactory; + var ClientObjectBase = (function () { + function ClientObjectBase(contextBase, objectPath) { + this.m_contextBase = contextBase; + this.m_objectPath = objectPath; + } + Object.defineProperty(ClientObjectBase.prototype, "_objectPath", { + get: function () { + return this.m_objectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObjectBase.prototype, "_context", { + get: function () { + return this.m_contextBase; + }, + enumerable: true, + configurable: true + }); + ClientObjectBase.prototype._addAction = function (action, resultHandler) { + var _this = this; + if (resultHandler === void 0) { resultHandler = null; } + return CoreUtility.createPromise(function (resolve, reject) { + _this._context._addServiceApiAction(action, resultHandler, resolve, reject); + }); + }; + ClientObjectBase.prototype._addPreviewExecutionAction = function (action) { + }; + ClientObjectBase.prototype._retrieve = function (option, resultHandler) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var queryOption = ClientRequestContextBase._parseQueryOption(option); + if (shouldPolyfill) { + return CommonActionFactory.createQueryAction(this._context, this, queryOption, resultHandler); + } + return CommonActionFactory.createQueryAsJsonAction(this._context, this, queryOption, resultHandler); + }; + ClientObjectBase.prototype._recursivelyUpdate = function (properties) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectUpdateMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.2'); + } + try { + var scalarPropNames = this[CommonConstants.scalarPropertyNames]; + if (!scalarPropNames) { + scalarPropNames = []; + } + var scalarPropUpdatable = this[CommonConstants.scalarPropertyUpdateable]; + if (!scalarPropUpdatable) { + scalarPropUpdatable = []; + for (var i = 0; i < scalarPropNames.length; i++) { + scalarPropUpdatable.push(false); + } + } + var navigationPropNames = this[CommonConstants.navigationPropertyNames]; + if (!navigationPropNames) { + navigationPropNames = []; + } + var scalarProps = {}; + var navigationProps = {}; + var scalarPropCount = 0; + for (var propName in properties) { + var index = scalarPropNames.indexOf(propName); + if (index >= 0) { + if (!scalarPropUpdatable[index]) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, propName), + debugInfo: { + errorLocation: propName + } + }); + } + scalarProps[propName] = properties[propName]; + ++scalarPropCount; + } + else if (navigationPropNames.indexOf(propName) >= 0) { + navigationProps[propName] = properties[propName]; + } + else { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, propName), + debugInfo: { + errorLocation: propName + } + }); + } + } + if (scalarPropCount > 0) { + if (shouldPolyfill) { + for (var i = 0; i < scalarPropNames.length; i++) { + var propName = scalarPropNames[i]; + var propValue = scalarProps[propName]; + if (!CommonUtility.isUndefined(propValue)) { + CommonActionFactory.createSetPropertyAction(this._context, this, propName, propValue); + } + } + } + else { + CommonActionFactory.createUpdateAction(this._context, this, scalarProps); + } + } + for (var propName in navigationProps) { + var navigationPropProxy = this[propName]; + var navigationPropValue = navigationProps[propName]; + navigationPropProxy._recursivelyUpdate(navigationPropValue); + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.update' + }, + innerError: innerError + }); + } + }; + return ClientObjectBase; + }()); + OfficeExtension_1.ClientObjectBase = ClientObjectBase; + var Action = (function () { + function Action(actionInfo, operationType, flags) { + this.m_actionInfo = actionInfo; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(Action.prototype, "actionInfo", { + get: function () { + return this.m_actionInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + return Action; + }()); + OfficeExtension_1.Action = Action; + var ObjectPath = (function () { + function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest, operationType, flags) { + this.m_objectPathInfo = objectPathInfo; + this.m_parentObjectPath = parentObjectPath; + this.m_isCollection = isCollection; + this.m_isInvalidAfterRequest = isInvalidAfterRequest; + this.m_isValid = true; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(ObjectPath.prototype, "id", { + get: function () { + var argumentInfo = this.m_objectPathInfo.ArgumentInfo; + if (!argumentInfo) { + return undefined; + } + var argument = argumentInfo.Arguments; + if (!argument) { + return undefined; + } + return argument[0]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parent", { + get: function () { + var parent = this.m_parentObjectPath; + if (!parent) { + return undefined; + } + return parent; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentId", { + get: function () { + return this.parent ? this.parent.id : undefined; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "objectPathInfo", { + get: function () { + return this.m_objectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isCollection", { + get: function () { + return this.m_isCollection; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isInvalidAfterRequest", { + get: function () { + return this.m_isInvalidAfterRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentObjectPath", { + get: function () { + return this.m_parentObjectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "argumentObjectPaths", { + get: function () { + return this.m_argumentObjectPaths; + }, + set: function (value) { + this.m_argumentObjectPaths = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isValid", { + get: function () { + return this.m_isValid; + }, + set: function (value) { + this.m_isValid = value; + if (!value && + this.m_objectPathInfo.ObjectPathType === 6 && + this.m_savedObjectPathInfo) { + ObjectPath.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo, this.m_objectPathInfo); + this.m_parentObjectPath = this.m_savedObjectPathInfo.parent; + this.m_isValid = true; + this.m_savedObjectPathInfo = null; + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "originalObjectPathInfo", { + get: function () { + return this.m_originalObjectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "getByIdMethodName", { + get: function () { + return this.m_getByIdMethodName; + }, + set: function (value) { + this.m_getByIdMethodName = value; + }, + enumerable: true, + configurable: true + }); + ObjectPath.prototype._updateAsNullObject = function () { + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 7; + this.m_objectPathInfo.Name = ''; + this.m_parentObjectPath = null; + }; + ObjectPath.prototype.saveOriginalObjectPathInfo = function () { + if (OfficeExtension_1.config.extendedErrorLogging && !this.m_originalObjectPathInfo) { + this.m_originalObjectPathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, this.m_originalObjectPathInfo); + } + }; + ObjectPath.prototype.updateUsingObjectData = function (value, clientObject) { + var referenceId = value[CommonConstants.referenceId]; + if (!CoreUtility.isNullOrEmptyString(referenceId)) { + if (!this.m_savedObjectPathInfo && + !this.isInvalidAfterRequest && + ObjectPath.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)) { + var pathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, pathInfo); + this.m_savedObjectPathInfo = { + pathInfo: pathInfo, + parent: this.m_parentObjectPath + }; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 6; + this.m_objectPathInfo.Name = referenceId; + delete this.m_objectPathInfo.ParentObjectPathId; + this.m_parentObjectPath = null; + return; + } + if (clientObject) { + var collectionPropertyPath = clientObject[CommonConstants.collectionPropertyPath]; + if (!CoreUtility.isNullOrEmptyString(collectionPropertyPath) && clientObject.context) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + var propNames = collectionPropertyPath.split('.'); + var parent_1 = clientObject.context[propNames[0]]; + for (var i = 1; i < propNames.length; i++) { + parent_1 = parent_1[propNames[i]]; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_parentObjectPath = parent_1._objectPath; + this.m_objectPathInfo.ParentObjectPathId = this.m_parentObjectPath.objectPathInfo.Id; + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + } + var parentIsCollection = this.parentObjectPath && this.parentObjectPath.isCollection; + var getByIdMethodName = this.getByIdMethodName; + if (parentIsCollection || !CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + if (!CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + this.m_objectPathInfo.ObjectPathType = 3; + this.m_objectPathInfo.Name = getByIdMethodName; + } + else { + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + } + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + }; + ObjectPath.prototype.resetForUpdateUsingObjectData = function () { + this.m_isInvalidAfterRequest = false; + this.m_isValid = true; + this.m_operationType = 1; + this.m_flags = 4; + this.m_objectPathInfo.ArgumentInfo = {}; + this.m_argumentObjectPaths = null; + this.m_getByIdMethodName = null; + }; + ObjectPath.isRestorableObjectPath = function (objectPathType) { + return (objectPathType === 1 || + objectPathType === 5 || + objectPathType === 3 || + objectPathType === 4); + }; + ObjectPath.copyObjectPathInfo = function (src, dest) { + dest.Id = src.Id; + dest.ArgumentInfo = src.ArgumentInfo; + dest.Name = src.Name; + dest.ObjectPathType = src.ObjectPathType; + dest.ParentObjectPathId = src.ParentObjectPathId; + }; + return ObjectPath; + }()); + OfficeExtension_1.ObjectPath = ObjectPath; + var ClientRequestContextBase = (function () { + function ClientRequestContextBase() { + this.m_nextId = 0; + } + ClientRequestContextBase.prototype._nextId = function () { + return ++this.m_nextId; + }; + ClientRequestContextBase.prototype._addServiceApiAction = function (action, resultHandler, resolve, reject) { + if (!this.m_serviceApiQueue) { + this.m_serviceApiQueue = new ServiceApiQueue(this); + } + this.m_serviceApiQueue.add(action, resultHandler, resolve, reject); + }; + ClientRequestContextBase._parseQueryOption = function (option) { + var queryOption = {}; + if (typeof option === 'string') { + var select = option; + queryOption.Select = CommonUtility._parseSelectExpand(select); + } + else if (Array.isArray(option)) { + queryOption.Select = option; + } + else if (typeof option === 'object') { + var loadOption = option; + if (ClientRequestContextBase.isLoadOption(loadOption)) { + if (typeof loadOption.select === 'string') { + queryOption.Select = CommonUtility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select = loadOption.select; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.select)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.select' }); + } + if (typeof loadOption.expand === 'string') { + queryOption.Expand = CommonUtility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand = loadOption.expand; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.expand)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.expand' }); + } + if (typeof loadOption.top === 'number') { + queryOption.Top = loadOption.top; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.top)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.top' }); + } + if (typeof loadOption.skip === 'number') { + queryOption.Skip = loadOption.skip; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.skip)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.skip' }); + } + } + else { + queryOption = ClientRequestContextBase.parseStrictLoadOption(option); + } + } + else if (!CommonUtility.isNullOrUndefined(option)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option' }); + } + return queryOption; + }; + ClientRequestContextBase.isLoadOption = function (loadOption) { + if (!CommonUtility.isUndefined(loadOption.select) && + (typeof loadOption.select === 'string' || Array.isArray(loadOption.select))) + return true; + if (!CommonUtility.isUndefined(loadOption.expand) && + (typeof loadOption.expand === 'string' || Array.isArray(loadOption.expand))) + return true; + if (!CommonUtility.isUndefined(loadOption.top) && typeof loadOption.top === 'number') + return true; + if (!CommonUtility.isUndefined(loadOption.skip) && typeof loadOption.skip === 'number') + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContextBase.parseStrictLoadOption = function (option) { + var ret = { Select: [] }; + ClientRequestContextBase.parseStrictLoadOptionHelper(ret, '', 'option', option); + return ret; + }; + ClientRequestContextBase.combineQueryPath = function (pathPrefix, key, separator) { + if (pathPrefix.length === 0) { + return key; + } + else { + return pathPrefix + separator + key; + } + }; + ClientRequestContextBase.parseStrictLoadOptionHelper = function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value = option[key]; + if (key === '$all') { + if (typeof value !== 'boolean') { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, '*', '/')); + } + } + else if (key === '$top') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Top = value; + } + else if (key === '$skip') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Skip = value; + } + else { + if (typeof value === 'boolean') { + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/')); + } + } + else if (typeof value === 'object') { + ClientRequestContextBase.parseStrictLoadOptionHelper(queryInfo, ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/'), ClientRequestContextBase.combineQueryPath(argPrefix, key, '.'), value); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + } + } + }; + return ClientRequestContextBase; + }()); + OfficeExtension_1.ClientRequestContextBase = ClientRequestContextBase; + var InstantiateActionUpdateObjectPathHandler = (function () { + function InstantiateActionUpdateObjectPathHandler(m_objectPath) { + this.m_objectPath = m_objectPath; + } + InstantiateActionUpdateObjectPathHandler.prototype._handleResult = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + this.m_objectPath._updateAsNullObject(); + } + else { + this.m_objectPath.updateUsingObjectData(value, null); + } + }; + return InstantiateActionUpdateObjectPathHandler; + }()); + var ClientRequestBase = (function () { + function ClientRequestBase(context) { + this.m_contextBase = context; + this.m_actions = []; + this.m_actionResultHandler = {}; + this.m_referencedObjectPaths = {}; + this.m_instantiatedObjectPaths = {}; + this.m_preSyncPromises = []; + this.m_previewExecutionActions = []; + } + ClientRequestBase.prototype.addAction = function (action) { + this.m_actions.push(action); + if (action.actionInfo.ActionType == 1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId] = action; + } + }; + ClientRequestBase.prototype.addPreviewExecutionAction = function (action) { + this.m_previewExecutionActions.push(action); + }; + Object.defineProperty(ClientRequestBase.prototype, "hasActions", { + get: function () { + return this.m_actions.length > 0; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._getLastAction = function () { + return this.m_actions[this.m_actions.length - 1]; + }; + ClientRequestBase.prototype.ensureInstantiateObjectPath = function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo = { + Id: this.m_contextBase._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction = new Action(actionInfo, 1, 4); + instantiateAction.referencedObjectPath = objectPath; + this.addReferencedObjectPath(objectPath); + this.addAction(instantiateAction); + var resultHandler = new InstantiateActionUpdateObjectPathHandler(objectPath); + this.addActionResultHandler(instantiateAction, resultHandler); + } + } + }; + ClientRequestBase.prototype.ensureInstantiateObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addReferencedObjectPath = function (objectPath) { + if (!objectPath || this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + while (objectPath) { + this.m_referencedObjectPaths[objectPath.objectPathInfo.Id] = objectPath; + if (objectPath.objectPathInfo.ObjectPathType == 3) { + this.addReferencedObjectPaths(objectPath.argumentObjectPaths); + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase.prototype.addReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.addReferencedObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addActionResultHandler = function (action, resultHandler) { + this.m_actionResultHandler[action.actionInfo.Id] = resultHandler; + }; + ClientRequestBase.prototype.aggregrateRequestFlags = function (requestFlags, operationType, flags) { + if (operationType === 0) { + requestFlags = requestFlags | 1; + if ((flags & 2) === 0) { + requestFlags = requestFlags & ~16; + } + if ((flags & 8) === 0) { + requestFlags = requestFlags & ~256; + } + requestFlags = requestFlags & ~4; + } + if (flags & 1) { + requestFlags = requestFlags | 2; + } + if ((flags & 4) === 0) { + requestFlags = requestFlags & ~4; + } + return requestFlags; + }; + ClientRequestBase.prototype.finallyNormalizeFlags = function (requestFlags) { + if ((requestFlags & 1) === 0) { + requestFlags = requestFlags & ~16; + requestFlags = requestFlags & ~256; + } + if (!OfficeExtension_1._internalConfig.enableConcurrentFlag) { + requestFlags = requestFlags & ~4; + } + if (!OfficeExtension_1._internalConfig.enableUndoableFlag) { + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.1')) { + requestFlags = requestFlags & ~4; + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.2')) { + requestFlags = requestFlags & ~256; + } + if (typeof this.m_flagsForTesting === 'number') { + requestFlags = this.m_flagsForTesting; + } + return requestFlags; + }; + ClientRequestBase.prototype.buildRequestMessageBodyAndRequestFlags = function () { + if (OfficeExtension_1._internalConfig.enableEarlyDispose) { + ClientRequestBase._calculateLastUsedObjectPathIds(this.m_actions); + } + var requestFlags = 4 | + 16 | + 256; + var objectPaths = {}; + for (var i in this.m_referencedObjectPaths) { + requestFlags = this.aggregrateRequestFlags(requestFlags, this.m_referencedObjectPaths[i].operationType, this.m_referencedObjectPaths[i].flags); + objectPaths[i] = this.m_referencedObjectPaths[i].objectPathInfo; + } + var actions = []; + var hasKeepReference = false; + for (var index = 0; index < this.m_actions.length; index++) { + var action = this.m_actions[index]; + if (action.actionInfo.ActionType === 3 && + action.actionInfo.Name === CommonConstants.keepReference) { + hasKeepReference = true; + } + requestFlags = this.aggregrateRequestFlags(requestFlags, action.operationType, action.flags); + actions.push(action.actionInfo); + } + requestFlags = this.finallyNormalizeFlags(requestFlags); + var body = { + AutoKeepReference: this.m_contextBase._autoCleanup && hasKeepReference, + Actions: actions, + ObjectPaths: objectPaths + }; + if (this.m_previewExecutionActions.length > 0) { + body.PreviewExecutionActions = this.m_previewExecutionActions; + requestFlags = requestFlags | 4096; + } + return { + body: body, + flags: requestFlags + }; + }; + ClientRequestBase.prototype.processResponse = function (actionResults) { + if (actionResults) { + for (var i = 0; i < actionResults.length; i++) { + var actionResult = actionResults[i]; + var handler = this.m_actionResultHandler[actionResult.ActionId]; + if (handler) { + handler._handleResult(actionResult.Value); + } + } + } + }; + ClientRequestBase.prototype.invalidatePendingInvalidObjectPaths = function () { + for (var i in this.m_referencedObjectPaths) { + if (this.m_referencedObjectPaths[i].isInvalidAfterRequest) { + this.m_referencedObjectPaths[i].isValid = false; + } + } + }; + ClientRequestBase.prototype._addPreSyncPromise = function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequestBase.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._removeKeepReferenceAction = function (objectPathId) { + for (var i = this.m_actions.length - 1; i >= 0; i--) { + var actionInfo = this.m_actions[i].actionInfo; + if (actionInfo.ObjectPathId === objectPathId && + actionInfo.ActionType === 3 && + actionInfo.Name === CommonConstants.keepReference) { + this.m_actions.splice(i, 1); + break; + } + } + }; + ClientRequestBase._updateLastUsedActionIdOfObjectPathId = function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id] = actionId; + var argumentObjectPaths = objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength = argumentObjectPaths.length; + for (var i = 0; i < argumentObjectPathsLength; i++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase._calculateLastUsedObjectPathIds = function (actions) { + var lastUsedActionIdOfObjectPathId = {}; + var actionsLength = actions.length; + for (var index = actionsLength - 1; index >= 0; --index) { + var action = actions[index]; + var actionId = action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths = action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength = referencedObjectPaths.length; + for (var refIndex = 0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction = {}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId = lastUsedActionIdOfObjectPathId[key]; + var objectPathIds = lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds = []; + lastUsedObjectPathIdsOfAction[actionId] = objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index = 0; index < actionsLength; index++) { + var action = actions[index]; + var lastUsedObjectPathIds = lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L = lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; + return ClientRequestBase; + }()); + OfficeExtension_1.ClientRequestBase = ClientRequestBase; + var ClientResult = (function () { + function ClientResult(m_type) { + this.m_type = m_type; + } + Object.defineProperty(ClientResult.prototype, "value", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'clientResult.value' + } + }); + } + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ClientResult.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (typeof value === 'object' && value && value._IsNull) { + return; + } + if (this.m_type === 1) { + this.m_value = CommonUtility.adjustToDateTime(value); + } + else { + this.m_value = value; + } + }; + return ClientResult; + }()); + OfficeExtension_1.ClientResult = ClientResult; + var ServiceApiQueue = (function () { + function ServiceApiQueue(m_context) { + this.m_context = m_context; + this.m_actions = []; + } + ServiceApiQueue.prototype.add = function (action, resultHandler, resolve, reject) { + var _this = this; + this.m_actions.push({ action: action, resultHandler: resultHandler, resolve: resolve, reject: reject }); + if (this.m_actions.length === 1) { + setTimeout(function () { return _this.processActions(); }, 0); + } + }; + ServiceApiQueue.prototype.processActions = function () { + var _this = this; + if (this.m_actions.length === 0) { + return; + } + var actions = this.m_actions; + this.m_actions = []; + var request = new ClientRequestBase(this.m_context); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + request.ensureInstantiateObjectPath(action.action.referencedObjectPath); + request.ensureInstantiateObjectPaths(action.action.referencedArgumentObjectPaths); + request.addAction(action.action); + request.addReferencedObjectPath(action.action.referencedObjectPath); + request.addReferencedObjectPaths(action.action.referencedArgumentObjectPaths); + } + var _a = request.buildRequestMessageBodyAndRequestFlags(), body = _a.body, flags = _a.flags; + var requestMessage = { + Url: CoreConstants.localDocumentApiPrefix, + Headers: null, + Body: body + }; + CoreUtility.log('Request:'); + CoreUtility.log(JSON.stringify(body)); + var executor = new HttpRequestExecutor(); + executor + .executeAsync(this.m_context._customData, flags, requestMessage) + .then(function (response) { + _this.processResponse(request, actions, response); + }) + .catch(function (ex) { + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + action.reject(ex); + } + }); + }; + ServiceApiQueue.prototype.processResponse = function (request, actions, response) { + var error = this.getErrorFromResponse(response); + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (!actionResults) { + actionResults = []; + } + this.processActionResults(request, actions, actionResults, error); + }; + ServiceApiQueue.prototype.getErrorFromResponse = function (response) { + if (!CoreUtility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage + }); + } + if (response.Body && response.Body.Error) { + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message + }); + } + return null; + }; + ServiceApiQueue.prototype.processActionResults = function (request, actions, actionResults, err) { + request.processResponse(actionResults); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + var actionId = action.action.actionInfo.Id; + var hasResult = false; + for (var j = 0; j < actionResults.length; j++) { + if (actionId == actionResults[j].ActionId) { + var resultValue = actionResults[j].Value; + if (action.resultHandler) { + action.resultHandler._handleResult(resultValue); + resultValue = action.resultHandler.value; + } + if (action.resolve) { + action.resolve(resultValue); + } + hasResult = true; + break; + } + } + if (!hasResult && action.reject) { + if (err) { + action.reject(err); + } + else { + action.reject('No response for the action.'); + } + } + } + }; + return ServiceApiQueue; + }()); + var HttpRequestExecutor = (function () { + function HttpRequestExecutor() { + } + HttpRequestExecutor.prototype.getRequestUrl = function (baseUrl, requestFlags) { + if (baseUrl.charAt(baseUrl.length - 1) != '/') { + baseUrl = baseUrl + '/'; + } + baseUrl = baseUrl + CoreConstants.processQuery; + baseUrl = baseUrl + '?' + CoreConstants.flags + '=' + requestFlags.toString(); + return baseUrl; + }; + HttpRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var url = this.getRequestUrl(requestMessage.Url, requestFlags); + var requestInfo = { + method: 'POST', + url: url, + headers: {}, + body: requestMessage.Body + }; + requestInfo.headers[CoreConstants.sourceLibHeader] = HttpRequestExecutor.SourceLibHeaderValue; + requestInfo.headers['CONTENT-TYPE'] = 'application/json'; + if (requestMessage.Headers) { + for (var key in requestMessage.Headers) { + requestInfo.headers[key] = requestMessage.Headers[key]; + } + } + var sendRequestFunc = CoreUtility._isLocalDocumentUrl(requestInfo.url) + ? HttpUtility.sendLocalDocumentRequest + : HttpUtility.sendRequest; + return sendRequestFunc(requestInfo).then(function (responseInfo) { + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null, + RawErrorResponseBody: CoreUtility._parseErrorResponseBody(responseInfo) + }; + } + return response; + }); + }; + HttpRequestExecutor.SourceLibHeaderValue = 'officejs-rest'; + return HttpRequestExecutor; + }()); + OfficeExtension_1.HttpRequestExecutor = HttpRequestExecutor; + var CommonConstants = (function (_super) { + __extends(CommonConstants, _super); + function CommonConstants() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonConstants.collectionPropertyPath = '_collectionPropertyPath'; + CommonConstants.id = 'Id'; + CommonConstants.idLowerCase = 'id'; + CommonConstants.idPrivate = '_Id'; + CommonConstants.keepReference = '_KeepReference'; + CommonConstants.objectPathIdPrivate = '_ObjectPathId'; + CommonConstants.referenceId = '_ReferenceId'; + CommonConstants.items = '_Items'; + CommonConstants.itemsLowerCase = 'items'; + CommonConstants.scalarPropertyNames = '_scalarPropertyNames'; + CommonConstants.scalarPropertyOriginalNames = '_scalarPropertyOriginalNames'; + CommonConstants.navigationPropertyNames = '_navigationPropertyNames'; + CommonConstants.scalarPropertyUpdateable = '_scalarPropertyUpdateable'; + CommonConstants.previewExecutionObjectId = '_previewExecutionObjectId'; + return CommonConstants; + }(CoreConstants)); + OfficeExtension_1.CommonConstants = CommonConstants; + var CommonUtility = (function (_super) { + __extends(CommonUtility, _super); + function CommonUtility() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonUtility.validateObjectPath = function (clientObject) { + var objectPath = clientObject._objectPath; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + objectPath = objectPath.parentObjectPath; + } + }; + CommonUtility.validateReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + var objectPath = objectPaths[i]; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)) + }); + } + objectPath = objectPath.parentObjectPath; + } + } + } + }; + CommonUtility._toCamelLowerCase = function (name) { + if (CoreUtility.isNullOrEmptyString(name)) { + return name; + } + var index = 0; + while (index < name.length && name.charCodeAt(index) >= 65 && name.charCodeAt(index) <= 90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase() + name.substr(index); + } + else { + return name.toLowerCase(); + } + }; + CommonUtility.adjustToDateTime = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return null; + } + if (typeof value === 'string') { + return new Date(value); + } + if (Array.isArray(value)) { + var arr = value; + for (var i = 0; i < arr.length; i++) { + arr[i] = CommonUtility.adjustToDateTime(arr[i]); + } + return arr; + } + throw CoreUtility._createInvalidArgError({ argumentName: 'date' }); + }; + CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult = function (value) { + var id = value[CommonConstants.id]; + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idLowerCase]; + } + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idPrivate]; + } + return id; + }; + CommonUtility.getObjectPathExpression = function (objectPath) { + var ret = ''; + while (objectPath) { + switch (objectPath.objectPathInfo.ObjectPathType) { + case 1: + ret = ret; + break; + case 2: + ret = 'new()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 3: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + '()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 4: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + (ret.length > 0 ? '.' : '') + ret; + break; + case 5: + ret = 'getItem()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 6: + ret = '_reference()' + (ret.length > 0 ? '.' : '') + ret; + break; + } + objectPath = objectPath.parentObjectPath; + } + return ret; + }; + CommonUtility.setMethodArguments = function (context, argumentInfo, args) { + if (CoreUtility.isNullOrUndefined(args)) { + return null; + } + var referencedObjectPaths = new Array(); + var referencedObjectPathIds = new Array(); + var hasOne = CommonUtility.collectObjectPathInfos(context, args, referencedObjectPaths, referencedObjectPathIds); + argumentInfo.Arguments = args; + if (hasOne) { + argumentInfo.ReferencedObjectPathIds = referencedObjectPathIds; + } + return referencedObjectPaths; + }; + CommonUtility.validateContext = function (context, obj) { + if (context && obj && obj._context !== context) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidRequestContext, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidRequestContext) + }); + } + }; + CommonUtility.isSetSupported = function (apiSetName, apiSetVersion) { + if (typeof CommonUtility.isSetSupportedOverride === "function") { + return CommonUtility.isSetSupportedOverride(apiSetName, apiSetVersion); + } + if (typeof window !== 'undefined' && + window.Office && + window.Office.context && + window.Office.context.requirements) { + return window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion); + } + return true; + }; + CommonUtility.throwIfApiNotSupported = function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!CommonUtility._doApiNotSupportedCheck) { + return; + } + if (!CommonUtility.isSetSupported(apiSetName, apiSetVersion)) { + var message = CoreUtility._getResourceString(CoreResourceStrings.apiNotFoundDetails, [ + apiFullName, + apiSetName + ' ' + apiSetVersion, + hostName + ]); + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.apiNotFound, + httpStatusCode: 404, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + }; + CommonUtility.calculateApiFlags = function (apiFlags, undoableApiSetName, undoableApiSetVersion) { + var undoable = false; + var inMakerRuntime = (window + && window.location + && window.location.href + && window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc") !== -1); + if (typeof CommonUtility.isSetSupportedOverride === "function") { + undoable = CommonUtility.isSetSupportedOverride(undoableApiSetName, undoableApiSetVersion); + } + else if (inMakerRuntime) { + undoable = false; + } + else { + undoable = CommonUtility.isSetSupported(undoableApiSetName, undoableApiSetVersion); + } + if (!undoable) { + apiFlags = apiFlags & (~2); + } + return apiFlags; + }; + CommonUtility._parseSelectExpand = function (select) { + var args = []; + if (!CoreUtility.isNullOrEmptyString(select)) { + var propertyNames = select.split(','); + for (var i = 0; i < propertyNames.length; i++) { + var propertyName = propertyNames[i]; + propertyName = sanitizeForAnyItemsSlash(propertyName.trim()); + if (propertyName.length > 0) { + args.push(propertyName); + } + } + } + return args; + function sanitizeForAnyItemsSlash(propertyName) { + var propertyNameLower = propertyName.toLowerCase(); + if (propertyNameLower === 'items' || propertyNameLower === 'items/') { + return '*'; + } + var itemsSlashLength = 6; + var isItemsSlashOrItemsDot = propertyNameLower.substr(0, itemsSlashLength) === 'items/' || + propertyNameLower.substr(0, itemsSlashLength) === 'items.'; + if (isItemsSlashOrItemsDot) { + propertyName = propertyName.substr(itemsSlashLength); + } + return propertyName.replace(new RegExp('[/.]items[/.]', 'gi'), '/'); + } + }; + CommonUtility.changePropertyNameToCamelLowerCase = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + var propValue = value[key]; + if (key === CommonConstants.items) { + ret = {}; + ret[CommonConstants.itemsLowerCase] = this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else { + var propName = CommonUtility._toCamelLowerCase(key); + ret[propName] = this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.purifyJson = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.purifyJson(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + if (key.charCodeAt(0) !== charCodeUnderscore) { + var propValue = value[key]; + if (typeof propValue === 'object' && propValue !== null && Array.isArray(propValue['items'])) { + propValue = propValue['items']; + } + ret[key] = this.purifyJson(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.collectObjectPathInfos = function (context, args, referencedObjectPaths, referencedObjectPathIds) { + var hasOne = false; + for (var i = 0; i < args.length; i++) { + if (args[i] instanceof ClientObjectBase) { + var clientObject = args[i]; + CommonUtility.validateContext(context, clientObject); + args[i] = clientObject._objectPath.objectPathInfo.Id; + referencedObjectPathIds.push(clientObject._objectPath.objectPathInfo.Id); + referencedObjectPaths.push(clientObject._objectPath); + hasOne = true; + } + else if (Array.isArray(args[i])) { + var childArrayObjectPathIds = new Array(); + var childArrayHasOne = CommonUtility.collectObjectPathInfos(context, args[i], referencedObjectPaths, childArrayObjectPathIds); + if (childArrayHasOne) { + referencedObjectPathIds.push(childArrayObjectPathIds); + hasOne = true; + } + else { + referencedObjectPathIds.push(0); + } + } + else if (CoreUtility.isPlainJsonObject(args[i])) { + referencedObjectPathIds.push(0); + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(args[i], referencedObjectPaths); + } + else { + referencedObjectPathIds.push(0); + } + } + return hasOne; + }; + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds = function (value, referencedObjectPaths) { + var _a, _b; + for (var key in value) { + var propValue = value[key]; + if (propValue instanceof ClientObjectBase) { + referencedObjectPaths.push(propValue._objectPath); + value[key] = (_a = {}, _a[CommonConstants.objectPathIdPrivate] = propValue._objectPath.objectPathInfo.Id, _a); + } + else if (Array.isArray(propValue)) { + for (var i = 0; i < propValue.length; i++) { + if (propValue[i] instanceof ClientObjectBase) { + var elem = propValue[i]; + referencedObjectPaths.push(elem._objectPath); + propValue[i] = (_b = {}, _b[CommonConstants.objectPathIdPrivate] = elem._objectPath.objectPathInfo.Id, _b); + } + else if (CoreUtility.isPlainJsonObject(propValue[i])) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue[i], referencedObjectPaths); + } + } + } + else if (CoreUtility.isPlainJsonObject(propValue)) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue, referencedObjectPaths); + } + else { + } + } + }; + CommonUtility.normalizeName = function (name) { + return name.substr(0, 1).toLowerCase() + name.substr(1); + }; + CommonUtility._doApiNotSupportedCheck = false; + return CommonUtility; + }(CoreUtility)); + OfficeExtension_1.CommonUtility = CommonUtility; + var CommonResourceStrings = (function (_super) { + __extends(CommonResourceStrings, _super); + function CommonResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonResourceStrings.propertyDoesNotExist = 'PropertyDoesNotExist'; + CommonResourceStrings.attemptingToSetReadOnlyProperty = 'AttemptingToSetReadOnlyProperty'; + return CommonResourceStrings; + }(CoreResourceStrings)); + OfficeExtension_1.CommonResourceStrings = CommonResourceStrings; + var ErrorCodes = (function (_super) { + __extends(ErrorCodes, _super); + function ErrorCodes() { + return _super !== null && _super.apply(this, arguments) || this; + } + ErrorCodes.propertyNotLoaded = 'PropertyNotLoaded'; + ErrorCodes.runMustReturnPromise = 'RunMustReturnPromise'; + ErrorCodes.cannotRegisterEvent = 'CannotRegisterEvent'; + ErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + ErrorCodes.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ErrorCodes; + }(CoreErrorCodes)); + OfficeExtension_1.ErrorCodes = ErrorCodes; + var TraceMarkerActionResultHandler = (function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback = callback; + } + TraceMarkerActionResultHandler.prototype._handleResult = function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); + var ActionFactory = (function (_super) { + __extends(ActionFactory, _super); + function ActionFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + ActionFactory.createMethodAction = function (context, parent, methodName, operationType, args, flags) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var fixedFlags = Utility._fixupApiFlags(flags); + var action = new Action(actionInfo, operationType, fixedFlags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + parent._addAction(action); + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (fixedFlags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + Arguments: args, + ObjectId: '', + ObjectType: '' + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return action; + }; + ActionFactory.createRecursiveQueryAction = function (context, parent, query) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 6, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + RecursiveQueryInfo: query + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createEnsureUnchangedAction = function (context, parent, objectState) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 8, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createInstantiateAction = function (context, obj) { + Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); + var actionInfo = { + Id: context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: obj._objectPath.objectPathInfo.Id + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = obj._objectPath; + obj._addAction(action, new InstantiateActionResultHandler(obj), true); + return action; + }; + ActionFactory.createTraceAction = function (context, message, addTraceMessage) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var ret = new Action(actionInfo, 1, 4); + context._pendingRequest.addAction(ret); + if (addTraceMessage) { + context._pendingRequest.addTrace(actionInfo.Id, message); + } + return ret; + }; + ActionFactory.createTraceMarkerForCallback = function (context, callback) { + var action = ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; + return ActionFactory; + }(CommonActionFactory)); + OfficeExtension_1.ActionFactory = ActionFactory; + var ClientObject = (function (_super) { + __extends(ClientObject, _super); + function ClientObject(context, objectPath) { + var _this = _super.call(this, context, objectPath) || this; + Utility.checkArgumentNull(context, 'context'); + _this.m_context = context; + if (_this._objectPath) { + if (!context._processingResult && context._pendingRequest) { + ActionFactory.createInstantiateAction(context, _this); + if (context._autoCleanup && _this._KeepReference) { + context.trackedObjects._autoAdd(_this); + } + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo && _this._objectPath.objectPathInfo && _this._className) { + _this._objectPath.objectPathInfo.T = _this._className; + } + } + return _this; + } + Object.defineProperty(ClientObject.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNull", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNull', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNullObject", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNullObject', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "_isNull", { + get: function () { + return this.m_isNull; + }, + set: function (value) { + this.m_isNull = value; + if (value && this._objectPath) { + this._objectPath._updateAsNullObject(); + } + }, + enumerable: true, + configurable: true + }); + ClientObject.prototype._addAction = function (action, resultHandler, isInstantiationEnsured) { + if (resultHandler === void 0) { resultHandler = null; } + if (!isInstantiationEnsured) { + this.context._pendingRequest.ensureInstantiateObjectPath(this._objectPath); + this.context._pendingRequest.ensureInstantiateObjectPaths(action.referencedArgumentObjectPaths); + } + this.context._pendingRequest.addAction(action); + this.context._pendingRequest.addReferencedObjectPath(this._objectPath); + this.context._pendingRequest.addReferencedObjectPaths(action.referencedArgumentObjectPaths); + this.context._pendingRequest.addActionResultHandler(action, resultHandler); + return CoreUtility._createPromiseFromResult(null); + }; + ClientObject.prototype._addPreviewExecutionAction = function (action) { + if (!Utility.isUndefined(this._className)) { + action.ObjectType = this._className; + var objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idLowerCase); + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idPrivate); + } + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.previewExecutionObjectId); + } + action.ObjectId = objectId; + this.context._pendingRequest.addPreviewExecutionAction(action); + } + }; + ClientObject.prototype._handleResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleIdResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + Utility.fixObjectPathIfNecessary(this, value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleRetrieveResult = function (value, result) { + this._handleIdResult(value); + }; + ClientObject.prototype._recursivelySet = function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { + var isClientObject = input instanceof ClientObject; + var originalInput = input; + if (isClientObject) { + if (Object.getPrototypeOf(this) === Object.getPrototypeOf(input)) { + input = JSON.parse(JSON.stringify(input)); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'properties', + errorLocation: this._className + '.set' + }); + } + } + try { + var prop; + for (var i = 0; i < scalarWriteablePropertyNames.length; i++) { + prop = scalarWriteablePropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + this[prop] = input[prop]; + } + } + } + for (var i = 0; i < objectPropertyNames.length; i++) { + prop = objectPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + var dataToPassToSet = isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } + } + } + var throwOnReadOnly = !isClientObject; + if (options && !Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly = options.throwOnReadOnly; + } + for (var i = 0; i < notAllowedToBeSetPropertyNames.length; i++) { + prop = notAllowedToBeSetPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined' && throwOnReadOnly) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + for (prop in input) { + if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); + if (!propertyDescriptor) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, prop), + debugInfo: { + errorLocation: prop + } + }); + } + if (throwOnReadOnly && !propertyDescriptor.set) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.set' + }, + innerError: innerError + }); + } + }; + return ClientObject; + }(ClientObjectBase)); + OfficeExtension_1.ClientObject = ClientObject; + var HostBridgeRequestExecutor = (function () { + function HostBridgeRequestExecutor(session) { + this.m_session = session; + } + HostBridgeRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var httpRequestInfo = { + url: CoreConstants.processQuery, + method: 'POST', + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var controlId = ''; + if (requestMessage.Headers) { + controlId = requestMessage.Headers[Constants.officeControlId]; + } + var message = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + controlId: controlId, + message: httpRequestInfo + }; + CoreUtility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message).then(function (nativeBridgeResponse) { + CoreUtility.log('Received response: ' + JSON.stringify(nativeBridgeResponse)); + var responseInfo = nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession = (function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(m_bridge) { + var _this = _super.call(this) || this; + _this.m_bridge = m_bridge; + _this.m_bridge.addHostMessageHandler(function (message) { + if (message.type === 3) { + var controlId = message.controlId; + if (CoreUtility.isNullOrEmptyString(controlId)) { + GenericEventRegistration.getGenericEventRegistration(controlId)._handleRichApiMessage(message.message); + } + else { + var eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(controlId); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(''); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + } + } + }); + return _this; + } + HostBridgeSession.getInstanceIfHostBridgeInited = function () { + if (HostBridge.instance) { + if (CoreUtility.isNullOrUndefined(HostBridgeSession.s_instance) || + HostBridgeSession.s_instance.m_bridge !== HostBridge.instance) { + HostBridgeSession.s_instance = new HostBridgeSession(HostBridge.instance); + } + return HostBridgeSession.s_instance; + } + return null; + }; + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull = function () { + CoreUtility.log('NativeBridgeSession::CreateRequestExecutor'); + return new HostBridgeRequestExecutor(this); + }; + HostBridgeSession.prototype.getEventRegistration = function (controlId) { + return GenericEventRegistration.getGenericEventRegistration(controlId); + }; + HostBridgeSession.prototype.sendMessageToHost = function (message) { + return this.m_bridge.sendMessageToHostAndExpectResponse(message); + }; + return HostBridgeSession; + }(SessionBase)); + OfficeExtension_1.HostBridgeSession = HostBridgeSession; + var ClientRequestContext = (function (_super) { + __extends(ClientRequestContext, _super); + function ClientRequestContext(url) { + var _this = _super.call(this) || this; + _this.m_customRequestHeaders = {}; + _this.m_batchMode = 0; + _this._onRunFinishedNotifiers = []; + if (SessionBase._overrideSession) { + _this.m_requestUrlAndHeaderInfoResolver = SessionBase._overrideSession; + } + else { + if (Utility.isNullOrUndefined(url) || (typeof url === 'string' && url.length === 0)) { + url = ClientRequestContext.defaultRequestUrlAndHeaders; + if (!url) { + url = { url: CoreConstants.localDocument, headers: {} }; + } + } + if (typeof url === 'string') { + _this.m_requestUrlAndHeaderInfo = { url: url, headers: {} }; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfoResolver(url)) { + _this.m_requestUrlAndHeaderInfoResolver = url; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfo(url)) { + var requestInfo = url; + _this.m_requestUrlAndHeaderInfo = { url: requestInfo.url, headers: {} }; + CoreUtility._copyHeaders(requestInfo.headers, _this.m_requestUrlAndHeaderInfo.headers); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'url' }); + } + } + if (!_this.m_requestUrlAndHeaderInfoResolver && + _this.m_requestUrlAndHeaderInfo && + CoreUtility._isLocalDocumentUrl(_this.m_requestUrlAndHeaderInfo.url) && + HostBridgeSession.getInstanceIfHostBridgeInited()) { + _this.m_requestUrlAndHeaderInfo = null; + _this.m_requestUrlAndHeaderInfoResolver = HostBridgeSession.getInstanceIfHostBridgeInited(); + } + if (_this.m_requestUrlAndHeaderInfoResolver instanceof SessionBase) { + _this.m_session = _this.m_requestUrlAndHeaderInfoResolver; + } + _this._processingResult = false; + _this._customData = Constants.iterativeExecutor; + _this.sync = _this.sync.bind(_this); + return _this; + } + Object.defineProperty(ClientRequestContext.prototype, "session", { + get: function () { + return this.m_session; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "eventRegistration", { + get: function () { + if (this.m_session) { + return this.m_session.getEventRegistration(this._controlId); + } + return _Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_url", { + get: function () { + if (this.m_requestUrlAndHeaderInfo) { + return this.m_requestUrlAndHeaderInfo.url; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_pendingRequest", { + get: function () { + if (this.m_pendingRequest == null) { + this.m_pendingRequest = new ClientRequest(this); + } + return this.m_pendingRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_controlId", { + get: function () { + var ret = this.m_customRequestHeaders[Constants.officeControlId]; + if (CoreUtility.isNullOrUndefined(ret)) { + ret = ''; + } + return ret; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension_1._internalConfig.showDisposeInfoInDebugInfo); + var statements = prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { + get: function () { + if (!this.m_trackedObjects) { + this.m_trackedObjects = new TrackedObjects(this); + } + return this.m_trackedObjects; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "requestHeaders", { + get: function () { + return this.m_customRequestHeaders; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "batchMode", { + get: function () { + return this.m_batchMode; + }, + enumerable: true, + configurable: true + }); + ClientRequestContext.prototype.ensureInProgressBatchIfBatchMode = function () { + if (this.m_batchMode === 1 && !this.m_explicitBatchInProgress) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.notInsideBatch), null); + } + }; + ClientRequestContext.prototype.load = function (clientObj, option) { + Utility.validateContext(this, clientObj); + var queryOption = ClientRequestContext._parseQueryOption(option); + CommonActionFactory.createQueryAction(this, clientObj, queryOption, clientObj); + }; + ClientRequestContext.prototype.loadRecursive = function (clientObj, options, maxDepth) { + if (!Utility.isPlainJsonObject(options)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'options' }); + } + var quries = {}; + for (var key in options) { + quries[key] = ClientRequestContext._parseQueryOption(options[key]); + } + var action = ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); + this._pendingRequest.addActionResultHandler(action, clientObj); + }; + ClientRequestContext.prototype.trace = function (message) { + ActionFactory.createTraceAction(this, message, true); + }; + ClientRequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { }; + ClientRequestContext.prototype.ensureRequestUrlAndHeaderInfo = function () { + var _this = this; + return Utility._createPromiseFromResult(null).then(function () { + if (!_this.m_requestUrlAndHeaderInfo) { + return _this.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function (value) { + _this.m_requestUrlAndHeaderInfo = value; + if (!_this.m_requestUrlAndHeaderInfo) { + _this.m_requestUrlAndHeaderInfo = { url: CoreConstants.localDocument, headers: {} }; + } + if (Utility.isNullOrEmptyString(_this.m_requestUrlAndHeaderInfo.url)) { + _this.m_requestUrlAndHeaderInfo.url = CoreConstants.localDocument; + } + if (!_this.m_requestUrlAndHeaderInfo.headers) { + _this.m_requestUrlAndHeaderInfo.headers = {}; + } + if (typeof _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull === 'function') { + var executor = _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull(); + if (executor) { + _this._requestExecutor = executor; + } + } + }); + } + }); + }; + ClientRequestContext.prototype.syncPrivateMain = function () { + var _this = this; + return this.ensureRequestUrlAndHeaderInfo().then(function () { + var req = _this._pendingRequest; + _this.m_pendingRequest = null; + return _this.processPreSyncPromises(req).then(function () { return _this.syncPrivate(req); }); + }); + }; + ClientRequestContext.prototype.syncPrivate = function (req) { + var _this = this; + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(null); + } + if (!req.hasActions) { + return this.processPendingEventHandlers(req); + } + var _a = req.buildRequestMessageBodyAndRequestFlags(), msgBody = _a.body, requestFlags = _a.flags; + if (this._requestFlagModifier) { + requestFlags |= this._requestFlagModifier; + } + if (!this._requestExecutor) { + if (CoreUtility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + this._requestExecutor = new OfficeJsRequestExecutor(this); + } + else { + this._requestExecutor = new HttpRequestExecutor(); + } + } + var requestExecutor = this._requestExecutor; + var headers = {}; + CoreUtility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + CoreUtility._copyHeaders(this.m_customRequestHeaders, headers); + delete this.m_customRequestHeaders[Constants.officeScriptEventId]; + var testNameWithSequenceId = TestUtility._getCurrentTestNameWithSequenceId(); + if (testNameWithSequenceId) { + headers[CoreConstants.testRequestNameHeader] = testNameWithSequenceId; + } + var requestExecutorRequestMessage = { + Url: this.m_requestUrlAndHeaderInfo.url, + Headers: headers, + Body: msgBody + }; + req.invalidatePendingInvalidObjectPaths(); + var errorFromResponse = null; + var errorFromProcessEventHandlers = null; + this._lastSyncStart = typeof performance === 'undefined' ? Date.now() : performance.now(); + this._lastRequestFlags = requestFlags; + return requestExecutor + .executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) + .then(function (response) { + _this._lastSyncEnd = typeof performance === 'undefined' ? Date.now() : performance.now(); + if (OfficeExtension_1.config.executePerfLogFunc) { + OfficeExtension_1.config.executePerfLogFunc({ syncStart: _this._lastSyncStart, + syncEnd: _this._lastSyncEnd + }); + } + errorFromResponse = _this.processRequestExecutorResponseMessage(req, response); + return _this.processPendingEventHandlers(req).catch(function (ex) { + CoreUtility.log('Error in processPendingEventHandlers'); + CoreUtility.log(JSON.stringify(ex)); + errorFromProcessEventHandlers = ex; + }); + }) + .then(function () { + if (errorFromResponse) { + CoreUtility.log('Throw error from response: ' + JSON.stringify(errorFromResponse)); + throw errorFromResponse; + } + if (errorFromProcessEventHandlers) { + CoreUtility.log('Throw error from ProcessEventHandler: ' + JSON.stringify(errorFromProcessEventHandlers)); + var transformedError = null; + if (errorFromProcessEventHandlers instanceof _Internal.RuntimeError) { + transformedError = errorFromProcessEventHandlers; + transformedError.traceMessages = req._responseTraceMessages; + } + else { + var message = null; + if (typeof errorFromProcessEventHandlers === 'string') { + message = errorFromProcessEventHandlers; + } + else { + message = errorFromProcessEventHandlers.message; + } + if (Utility.isNullOrEmptyString(message)) { + message = CoreUtility._getResourceString(ResourceStrings.cannotRegisterEvent); + } + transformedError = new _Internal.RuntimeError({ + code: ErrorCodes.cannotRegisterEvent, + httpStatusCode: 400, + message: message, + traceMessages: req._responseTraceMessages + }); + } + throw transformedError; + } + }); + }; + ClientRequestContext.prototype.processRequestExecutorResponseMessage = function (req, response) { + if (response.Body && response.Body.TraceIds) { + req._setResponseTraceIds(response.Body.TraceIds); + } + var traceMessages = req._responseTraceMessages; + var errorStatementInfo = null; + if (response.Body) { + if (response.Body.Error && response.Body.Error.ActionIndex >= 0) { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, true); + var debugInfoStatementInfo = prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + errorStatementInfo = { + statement: debugInfoStatementInfo.statement, + surroundingStatements: debugInfoStatementInfo.surroundingStatements, + fullStatements: ['Please enable config.extendedErrorLogging to see full statements.'] + }; + if (OfficeExtension_1.config.extendedErrorLogging) { + prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, false); + errorStatementInfo.fullStatements = prettyPrinter.process(); + } + } + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (actionResults) { + this._processingResult = true; + try { + req.processResponse(actionResults); + } + finally { + this._processingResult = false; + } + } + } + if (!Utility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage, + traceMessages: traceMessages, + data: { responseBody: response.RawErrorResponseBody } + }); + } + else if (response.Body && response.Body.Error) { + var debugInfo = { + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement = errorStatementInfo.statement; + debugInfo.surroundingStatements = errorStatementInfo.surroundingStatements; + debugInfo.fullStatements = errorStatementInfo.fullStatements; + } + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message, + traceMessages: traceMessages, + debugInfo: debugInfo + }); + } + return null; + }; + ClientRequestContext.prototype.processPendingEventHandlers = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._pendingProcessEventHandlers.length; i++) { + var eventHandlers = req._pendingProcessEventHandlers[i]; + ret = ret.then(this.createProcessOneEventHandlersFunc(eventHandlers, req)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneEventHandlersFunc = function (eventHandlers, req) { + return function () { return eventHandlers._processRegistration(req); }; + }; + ClientRequestContext.prototype.processPreSyncPromises = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._preSyncPromises.length; i++) { + var p = req._preSyncPromises[i]; + ret = ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc = function (p) { + return function () { return p; }; + }; + ClientRequestContext.prototype.sync = function (passThroughValue) { + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(passThroughValue); + } + return this.syncPrivateMain().then(function () { return passThroughValue; }); + }; + ClientRequestContext.prototype.batch = function (batchBody) { + var _this = this; + if (this.m_batchMode !== 1) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, null, null)); + } + if (this.m_explicitBatchInProgress) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.pendingBatchInProgress), null)); + } + if (Utility.isNullOrUndefined(batchBody)) { + return Utility._createPromiseFromResult(null); + } + this.m_explicitBatchInProgress = true; + var previousRequest = this.m_pendingRequest; + this.m_pendingRequest = new ClientRequest(this); + var batchBodyResult; + try { + batchBodyResult = batchBody(this._rootObject, this); + } + catch (ex) { + this.m_explicitBatchInProgress = false; + this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + } + var request; + var batchBodyResultPromise; + if (typeof batchBodyResult === 'object' && batchBodyResult && typeof batchBodyResult.then === 'function') { + batchBodyResultPromise = Utility._createPromiseFromResult(null) + .then(function () { + return batchBodyResult; + }) + .then(function (result) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return result; + }) + .catch(function (ex) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + }); + } + else { + this.m_explicitBatchInProgress = false; + request = this.m_pendingRequest; + this.m_pendingRequest = previousRequest; + batchBodyResultPromise = Utility._createPromiseFromResult(batchBodyResult); + } + return batchBodyResultPromise.then(function (result) { + return _this.ensureRequestUrlAndHeaderInfo() + .then(function () { + return _this.syncPrivate(request); + }) + .then(function () { + return result; + }); + }); + }; + ClientRequestContext._run = function (ctxInitializer, runBody, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { numCleanupAttempts = 3; } + if (retryDelay === void 0) { retryDelay = 5000; } + return ClientRequestContext._runCommon('run', null, ctxInitializer, 0, runBody, numCleanupAttempts, retryDelay, null, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.isValidRequestInfo = function (value) { + return (typeof value === 'string' || + ClientRequestContext.isRequestUrlAndHeaderInfo(value) || + ClientRequestContext.isRequestUrlAndHeaderInfoResolver(value)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfo = function (value) { + return (typeof value === 'object' && + value !== null && + Object.getPrototypeOf(value) === Object.getPrototypeOf({}) && + !Utility.isNullOrUndefined(value.url)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfoResolver = function (value) { + return typeof value === 'object' && value !== null && typeof value._resolveRequestUrlAndHeaderInfo === 'function'; + }; + ClientRequestContext._runBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { numCleanupAttempts = 3; } + if (retryDelay === void 0) { retryDelay = 5000; } + return ClientRequestContext._runBatchCommon(0, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runExplicitBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { numCleanupAttempts = 3; } + if (retryDelay === void 0) { retryDelay = 5000; } + return ClientRequestContext._runBatchCommon(1, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runBatchCommon = function (batchMode, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { numCleanupAttempts = 3; } + if (retryDelay === void 0) { retryDelay = 5000; } + var ctxRetriever; + var batch; + var requestInfo = null; + var previousObjects = null; + var argOffset = 0; + var options = null; + if (receivedRunArgs.length > 0) { + if (ClientRequestContext.isValidRequestInfo(receivedRunArgs[0])) { + requestInfo = receivedRunArgs[0]; + argOffset = 1; + } + else if (Utility.isPlainJsonObject(receivedRunArgs[0])) { + options = receivedRunArgs[0]; + requestInfo = options.session; + if (requestInfo != null && !ClientRequestContext.isValidRequestInfo(requestInfo)) { + return ClientRequestContext.createErrorPromise(functionName); + } + previousObjects = options.previousObjects; + argOffset = 1; + } + } + if (receivedRunArgs.length == argOffset + 1) { + batch = receivedRunArgs[argOffset + 0]; + } + else if (options == null && receivedRunArgs.length == argOffset + 2) { + previousObjects = receivedRunArgs[argOffset + 0]; + batch = receivedRunArgs[argOffset + 1]; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + if (previousObjects != null) { + if (previousObjects instanceof ClientObject) { + ctxRetriever = function () { return previousObjects.context; }; + } + else if (previousObjects instanceof ClientRequestContext) { + ctxRetriever = function () { return previousObjects; }; + } + else if (Array.isArray(previousObjects)) { + var array = previousObjects; + if (array.length == 0) { + return ClientRequestContext.createErrorPromise(functionName); + } + for (var i = 0; i < array.length; i++) { + if (!(array[i] instanceof ClientObject)) { + return ClientRequestContext.createErrorPromise(functionName); + } + if (array[i].context != array[0].context) { + return ClientRequestContext.createErrorPromise(functionName, ResourceStrings.invalidRequestContext); + } + } + ctxRetriever = function () { return array[0].context; }; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + } + else { + ctxRetriever = ctxInitializer; + } + var onBeforeRunWithOptions = null; + if (onBeforeRun) { + onBeforeRunWithOptions = function (context) { return onBeforeRun(options || {}, context); }; + } + return ClientRequestContext._runCommon(functionName, requestInfo, ctxRetriever, batchMode, batch, numCleanupAttempts, retryDelay, onBeforeRunWithOptions, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.createErrorPromise = function (functionName, code) { + if (code === void 0) { code = CoreResourceStrings.invalidArgument; } + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(code, CoreUtility._getResourceString(code), functionName)); + }; + ClientRequestContext._runCommon = function (functionName, requestInfo, ctxRetriever, batchMode, runBody, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (SessionBase._overrideSession) { + requestInfo = SessionBase._overrideSession; + } + var starterPromise = CoreUtility.createPromise(function (resolve, reject) { + resolve(); + }); + var ctx; + var succeeded = false; + var resultOrError; + var previousBatchMode; + return starterPromise + .then(function () { + ctx = ctxRetriever(requestInfo); + if (ctx._autoCleanup) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + ctx._onRunFinishedNotifiers.push(function () { + ctx._autoCleanup = true; + resolve(); + }); + }); + } + else { + ctx._autoCleanup = true; + } + }) + .then(function () { + if (typeof runBody !== 'function') { + return ClientRequestContext.createErrorPromise(functionName); + } + previousBatchMode = ctx.m_batchMode; + ctx.m_batchMode = batchMode; + if (onBeforeRun) { + onBeforeRun(ctx); + } + var runBodyResult; + if (batchMode == 1) { + runBodyResult = runBody(ctx.batch.bind(ctx)); + } + else { + runBodyResult = runBody(ctx); + } + if (Utility.isNullOrUndefined(runBodyResult) || typeof runBodyResult.then !== 'function') { + Utility.throwError(ResourceStrings.runMustReturnPromise); + } + return runBodyResult; + }) + .then(function (runBodyResult) { + if (batchMode === 1) { + return runBodyResult; + } + else { + return ctx.sync(runBodyResult); + } + }) + .then(function (result) { + succeeded = true; + resultOrError = result; + }) + .catch(function (error) { + resultOrError = error; + }) + .then(function () { + var itemsToRemove = ctx.trackedObjects._retrieveAndClearAutoCleanupList(); + ctx._autoCleanup = false; + ctx.m_batchMode = previousBatchMode; + for (var key in itemsToRemove) { + itemsToRemove[key]._objectPath.isValid = false; + } + var cleanupCounter = 0; + if (Utility._synchronousCleanup || ClientRequestContext.isRequestUrlAndHeaderInfoResolver(requestInfo)) { + return attemptCleanup(); + } + else { + attemptCleanup(); + } + function attemptCleanup() { + cleanupCounter++; + var savedPendingRequest = ctx.m_pendingRequest; + var savedBatchMode = ctx.m_batchMode; + var request = new ClientRequest(ctx); + ctx.m_pendingRequest = request; + ctx.m_batchMode = 0; + try { + for (var key in itemsToRemove) { + ctx.trackedObjects.remove(itemsToRemove[key]); + } + } + finally { + ctx.m_batchMode = savedBatchMode; + ctx.m_pendingRequest = savedPendingRequest; + } + return ctx + .syncPrivate(request) + .then(function () { + if (onCleanupSuccess) { + onCleanupSuccess(cleanupCounter); + } + }) + .catch(function () { + if (onCleanupFailure) { + onCleanupFailure(cleanupCounter); + } + if (cleanupCounter < numCleanupAttempts) { + setTimeout(function () { + attemptCleanup(); + }, retryDelay); + } + }); + } + }) + .then(function () { + if (ctx._onRunFinishedNotifiers && ctx._onRunFinishedNotifiers.length > 0) { + var func = ctx._onRunFinishedNotifiers.shift(); + func(); + } + if (succeeded) { + return resultOrError; + } + else { + throw resultOrError; + } + }); + }; + return ClientRequestContext; + }(ClientRequestContextBase)); + OfficeExtension_1.ClientRequestContext = ClientRequestContext; + var RetrieveResultImpl = (function () { + function RetrieveResultImpl(m_proxy, m_shouldPolyfill) { + this.m_proxy = m_proxy; + this.m_shouldPolyfill = m_shouldPolyfill; + var scalarPropertyNames = m_proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = m_proxy[Constants.navigationPropertyNames]; + var typeName = m_proxy[Constants.className]; + var isCollection = m_proxy[Constants.isCollection]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, scalarPropertyNames[i]); + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, navigationPropertyNames[i]); + } + } + if (isCollection) { + Utility.definePropertyThrowUnloadedException(this, typeName, Constants.itemsLowerCase); + } + } + Object.defineProperty(RetrieveResultImpl.prototype, "$proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResultImpl.prototype, "$isNullObject", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: ErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'retrieveResult.$isNullObject' + } + }); + } + return this.m_isNullObject; + }, + enumerable: true, + configurable: true + }); + RetrieveResultImpl.prototype.toJSON = function () { + if (!this.m_isLoaded) { + return undefined; + } + if (this.m_isNullObject) { + return null; + } + if (Utility.isUndefined(this.m_json)) { + this.m_json = Utility.purifyJson(this.m_value); + } + return this.m_json; + }; + RetrieveResultImpl.prototype.toString = function () { + return JSON.stringify(this.toJSON()); + }; + RetrieveResultImpl.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (value === null || (typeof value === 'object' && value && value._IsNull)) { + this.m_isNullObject = true; + value = null; + } + else { + this.m_isNullObject = false; + } + if (this.m_shouldPolyfill) { + value = Utility.changePropertyNameToCamelLowerCase(value); + } + this.m_value = value; + this.m_proxy._handleRetrieveResult(value, this); + }; + return RetrieveResultImpl; + }()); + var Constants = (function (_super) { + __extends(Constants, _super); + function Constants() { + return _super !== null && _super.apply(this, arguments) || this; + } + Constants.getItemAt = 'GetItemAt'; + Constants.index = '_Index'; + Constants.iterativeExecutor = 'IterativeExecutor'; + Constants.isTracked = '_IsTracked'; + Constants.eventMessageCategory = 65536; + Constants.eventWorkbookId = 'Workbook'; + Constants.eventSourceRemote = 'Remote'; + Constants.proxy = '$proxy'; + Constants.className = '_className'; + Constants.isCollection = '_isCollection'; + Constants.collectionPropertyPath = '_collectionPropertyPath'; + Constants.objectPathInfoDoNotKeepReferenceFieldName = 'D'; + Constants.officeScriptEventId = 'X-OfficeScriptEventId'; + Constants.officeScriptFireRecordingEvent = 'X-OfficeScriptFireRecordingEvent'; + Constants.officeControlId = 'X-OfficeControlId'; + return Constants; + }(CommonConstants)); + OfficeExtension_1.Constants = Constants; + var ClientRequest = (function (_super) { + __extends(ClientRequest, _super); + function ClientRequest(context) { + var _this = _super.call(this, context) || this; + _this.m_context = context; + _this.m_pendingProcessEventHandlers = []; + _this.m_pendingEventHandlerActions = {}; + _this.m_traceInfos = {}; + _this.m_responseTraceIds = {}; + _this.m_responseTraceMessages = []; + return _this; + } + Object.defineProperty(ClientRequest.prototype, "traceInfos", { + get: function () { + return this.m_traceInfos; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceMessages", { + get: function () { + return this.m_responseTraceMessages; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceIds", { + get: function () { + return this.m_responseTraceIds; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._setResponseTraceIds = function (value) { + if (value) { + for (var i = 0; i < value.length; i++) { + var traceId = value[i]; + this.m_responseTraceIds[traceId] = traceId; + var message = this.m_traceInfos[traceId]; + if (!CoreUtility.isNullOrUndefined(message)) { + this.m_responseTraceMessages.push(message); + } + } + } + }; + ClientRequest.prototype.addTrace = function (actionId, message) { + this.m_traceInfos[actionId] = message; + }; + ClientRequest.prototype._addPendingEventHandlerAction = function (eventHandlers, action) { + if (!this.m_pendingEventHandlerActions[eventHandlers._id]) { + this.m_pendingEventHandlerActions[eventHandlers._id] = []; + this.m_pendingProcessEventHandlers.push(eventHandlers); + } + this.m_pendingEventHandlerActions[eventHandlers._id].push(action); + }; + Object.defineProperty(ClientRequest.prototype, "_pendingProcessEventHandlers", { + get: function () { + return this.m_pendingProcessEventHandlers; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._getPendingEventHandlerActions = function (eventHandlers) { + return this.m_pendingEventHandlerActions[eventHandlers._id]; + }; + return ClientRequest; + }(ClientRequestBase)); + OfficeExtension_1.ClientRequest = ClientRequest; + var EventHandlers = (function () { + function EventHandlers(context, parentObject, name, eventInfo) { + var _this = this; + this.m_id = context._nextId(); + this.m_context = context; + this.m_name = name; + this.m_handlers = []; + this.m_registered = false; + this.m_eventInfo = eventInfo; + this.m_callback = function (args) { + _this.m_eventInfo.eventArgsTransformFunc(args).then(function (newArgs) { return _this.fireEvent(newArgs); }); + }; + } + Object.defineProperty(EventHandlers.prototype, "_registered", { + get: function () { + return this.m_registered; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_id", { + get: function () { + return this.m_id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_handlers", { + get: function () { + return this.m_handlers; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); + EventHandlers.prototype.add = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 0 + }); + return new EventHandlerResult(this.m_context, this, handler); + }; + EventHandlers.prototype.remove = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 1 + }); + }; + EventHandlers.prototype.removeAll = function () { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: null, + operation: 2 + }); + }; + EventHandlers.prototype._processRegistration = function (req) { + var _this = this; + var ret = CoreUtility._createPromiseFromResult(null); + var actions = req._getPendingEventHandlerActions(this); + if (!actions) { + return ret; + } + var handlersResult = []; + for (var i = 0; i < this.m_handlers.length; i++) { + handlersResult.push(this.m_handlers[i]); + } + var hasChange = false; + for (var i = 0; i < actions.length; i++) { + if (req._responseTraceIds[actions[i].id]) { + hasChange = true; + switch (actions[i].operation) { + case 0: + handlersResult.push(actions[i].handler); + break; + case 1: + for (var index = handlersResult.length - 1; index >= 0; index--) { + if (handlersResult[index] === actions[i].handler) { + handlersResult.splice(index, 1); + break; + } + } + break; + case 2: + handlersResult = []; + break; + } + } + } + if (hasChange) { + if (!this.m_registered && handlersResult.length > 0) { + ret = ret.then(function () { return _this.m_eventInfo.registerFunc(_this.m_callback); }).then(function () { return (_this.m_registered = true); }); + } + else if (this.m_registered && handlersResult.length == 0) { + ret = ret + .then(function () { return _this.m_eventInfo.unregisterFunc(_this.m_callback); }) + .catch(function (ex) { + CoreUtility.log('Error when unregister event: ' + JSON.stringify(ex)); + }) + .then(function () { return (_this.m_registered = false); }); + } + ret = ret.then(function () { return (_this.m_handlers = handlersResult); }); + } + return ret; + }; + EventHandlers.prototype.fireEvent = function (args) { + var promises = []; + for (var i = 0; i < this.m_handlers.length; i++) { + var handler = this.m_handlers[i]; + var p = CoreUtility._createPromiseFromResult(null) + .then(this.createFireOneEventHandlerFunc(handler, args)) + .catch(function (ex) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(ex)); + }); + promises.push(p); + } + CoreUtility.Promise.all(promises); + }; + EventHandlers.prototype.createFireOneEventHandlerFunc = function (handler, args) { + return function () { return handler(args); }; + }; + return EventHandlers; + }()); + OfficeExtension_1.EventHandlers = EventHandlers; + var EventHandlerResult = (function () { + function EventHandlerResult(context, handlers, handler) { + this.m_context = context; + this.m_allHandlers = handlers; + this.m_handler = handler; + } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + EventHandlerResult.prototype.remove = function () { + if (this.m_allHandlers && this.m_handler) { + this.m_allHandlers.remove(this.m_handler); + this.m_allHandlers = null; + this.m_handler = null; + } + }; + return EventHandlerResult; + }()); + OfficeExtension_1.EventHandlerResult = EventHandlerResult; + (function (_Internal) { + var OfficeJsEventRegistration = (function () { + function OfficeJsEventRegistration() { + } + OfficeJsEventRegistration.prototype.register = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingDataChanged, handler, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingSelectionChanged, handler, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); + }); + case 5: + return OSF.DDA.RichApi.richApiMessageManager.register(handler); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { id: targetId }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { id: targetId }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { id: targetId }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + OfficeJsEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingDataChanged, { handler: handler }, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingSelectionChanged, { handler: handler }, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); + }); + case 5: + return Utility.promisify(function (callback) { + return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync('richApiMessage', { handler: handler }, callback); + }); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { id: targetId, handler: handler }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { id: targetId, handler: handler }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { id: targetId, handler: handler }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + return OfficeJsEventRegistration; + }()); + _Internal.officeJsEventRegistration = new OfficeJsEventRegistration(); + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var EventRegistration = (function () { + function EventRegistration(registerEventImpl, unregisterEventImpl) { + this.m_handlersByEventByTarget = {}; + this.m_registerEventImpl = registerEventImpl; + this.m_unregisterEventImpl = unregisterEventImpl; + } + EventRegistration.getTargetIdOrDefault = function (targetId) { + if (Utility.isNullOrUndefined(targetId)) { + return ''; + } + return targetId; + }; + EventRegistration.prototype.getHandlers = function (eventId, targetId) { + targetId = EventRegistration.getTargetIdOrDefault(targetId); + var handlersById = this.m_handlersByEventByTarget[eventId]; + if (!handlersById) { + handlersById = {}; + this.m_handlersByEventByTarget[eventId] = handlersById; + } + var handlers = handlersById[targetId]; + if (!handlers) { + handlers = []; + handlersById[targetId] = handlers; + } + return handlers; + }; + EventRegistration.prototype.callHandlers = function (eventId, targetId, argument) { + var funcs = this.getHandlers(eventId, targetId); + for (var i = 0; i < funcs.length; i++) { + funcs[i](argument); + } + }; + EventRegistration.prototype.hasHandlers = function (eventId, targetId) { + return this.getHandlers(eventId, targetId).length > 0; + }; + EventRegistration.prototype.register = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + handlers.push(handler); + if (handlers.length === 1) { + return this.m_registerEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + EventRegistration.prototype.unregister = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length === 0) { + return this.m_unregisterEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + return EventRegistration; + }()); + OfficeExtension_1.EventRegistration = EventRegistration; + var GenericEventRegistration = (function () { + function GenericEventRegistration() { + this.m_eventRegistration = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler = this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready = function () { + var _this = this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready = GenericEventRegistration._testReadyImpl().then(function () { + _this.m_isReady = true; + }); + } + else if (HostBridge.instance) { + this.m_ready = Utility._createPromiseFromResult(null).then(function () { + _this.m_isReady = true; + }); + } + else { + this.m_ready = _Internal.officeJsEventRegistration + .register(5, '', this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady = true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage = function (msg) { + if (msg && msg.entries) { + for (var entryIndex = 0; entryIndex < msg.entries.length; entryIndex++) { + var entry = msg.entries[entryIndex]; + if (entry.messageCategory == Constants.eventMessageCategory) { + if (CoreUtility._logEnabled) { + CoreUtility.log(JSON.stringify(entry)); + } + var eventId = entry.messageType; + var targetId = entry.targetId; + var hasHandlers = this.m_eventRegistration.hasHandlers(eventId, targetId); + if (hasHandlers) { + var arg = JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source = Constants.eventSourceRemote; + } + this.m_eventRegistration.callHandlers(eventId, targetId, arg); + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + if (!ret) { + ret = new GenericEventRegistration(); + GenericEventRegistration.s_genericEventRegistrations[controlId] = ret; + } + return ret; + }; + GenericEventRegistration.peekGenericEventRegistrationOrNull = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + return ret; + }; + GenericEventRegistration.richApiMessageEventCategory = 65536; + GenericEventRegistration.s_genericEventRegistrations = {}; + return GenericEventRegistration; + }()); + OfficeExtension_1.GenericEventRegistration = GenericEventRegistration; + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl = impl; + } + OfficeExtension_1._testSetRichApiMessageReadyImpl = _testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration('')._handleRichApiMessage(msg); + } + OfficeExtension_1._testTriggerRichApiMessageEvent = _testTriggerRichApiMessageEvent; + var GenericEventHandlers = (function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + var _this = _super.call(this, context, parentObject, name, eventInfo) || this; + _this.m_genericEventInfo = eventInfo; + return _this; + } + GenericEventHandlers.prototype.add = function (handler) { + var _this = this; + if (this._handlers.length == 0 && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + var controlId = this._context._controlId; + if (!GenericEventRegistration.getGenericEventRegistration(controlId).isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration(controlId).ready()); + } + ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length == 1) { + GenericEventRegistration.getGenericEventRegistration(controlId).register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove = function (handler) { + var _this = this; + if (this._handlers.length == 1 && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + var controlId = this._context._controlId; + ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers = _this._handlers; + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length == 0) { + GenericEventRegistration.getGenericEventRegistration(controlId).unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll = function () { }; + return GenericEventHandlers; + }(EventHandlers)); + OfficeExtension_1.GenericEventHandlers = GenericEventHandlers; + var InstantiateActionResultHandler = (function () { + function InstantiateActionResultHandler(clientObject) { + this.m_clientObject = clientObject; + } + InstantiateActionResultHandler.prototype._handleResult = function (value) { + this.m_clientObject._handleIdResult(value); + }; + return InstantiateActionResultHandler; + }()); + var ObjectPathFactory = (function () { + function ObjectPathFactory() { + } + ObjectPathFactory.createGlobalObjectObjectPath = function (context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + return new ObjectPath(objectPathInfo, null, false, false, 1, 4); + }; + ObjectPathFactory.createNewObjectObjectPath = function (context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var ret = new ObjectPath(objectPathInfo, null, isCollection, false, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createPropertyObjectPath = function (context, parent, propertyName, isCollection, isInvalidAfterRequest, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createIndexerObjectPath = function (context, parent, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createIndexerObjectPathUsingParentPath = function (context, parentObjectPath, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parentObjectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parentObjectPath, false, false, 1, 4); + }; + ObjectPathFactory.createMethodObjectPath = function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = Utility.setMethodArguments(context, objectPathInfo.ArgumentInfo, args); + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, Utility._fixupApiFlags(flags)); + ret.argumentObjectPaths = argumentObjectPaths; + ret.getByIdMethodName = getByIdMethodName; + return ret; + }; + ObjectPathFactory.createReferenceIdObjectPath = function (context, referenceId) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + var ret = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return ret; + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt = function (hasIndexerMethod, context, parent, childItem, index) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + if (hasIndexerMethod && !Utility.isNullOrUndefined(id)) { + return ObjectPathFactory.createChildItemObjectPathUsingIndexer(context, parent, childItem); + } + else { + return ObjectPathFactory.createChildItemObjectPathUsingGetItemAt(context, parent, childItem, index); + } + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexer = function (context, parent, childItem) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + var objectPathInfo = (objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }); + objectPathInfo.ArgumentInfo.Arguments = [id]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createChildItemObjectPathUsingGetItemAt = function (context, parent, childItem, index) { + var indexFromServer = childItem[Constants.index]; + if (indexFromServer) { + index = indexFromServer; + } + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: Constants.getItemAt, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = [index]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + return ObjectPathFactory; + }()); + OfficeExtension_1.ObjectPathFactory = ObjectPathFactory; + var OfficeJsRequestExecutor = (function () { + function OfficeJsRequestExecutor(context) { + this.m_context = context; + } + OfficeJsRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); + return new OfficeExtension_1.Promise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (result.status == 'succeeded') { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBody(result), RichApiMessageUtility.getResponseHeaders(result)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); + } + resolve(response); + }); + }); + }; + OfficeJsRequestExecutor.SourceLibHeaderValue = 'officejs'; + return OfficeJsRequestExecutor; + }()); + var TrackedObjects = (function () { + function TrackedObjects(context) { + this._autoCleanupList = {}; + this.m_context = context; + } + TrackedObjects.prototype.add = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._addCommon(item, true); }); + } + else { + this._addCommon(param, true); + } + }; + TrackedObjects.prototype._autoAdd = function (object) { + this._addCommon(object, false); + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + }; + TrackedObjects.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue = function (object, resultValue) { + var shouldAutoTrack = this.m_context._autoCleanup && + !object[Constants.isTracked] && + object !== this.m_context._rootObject && + resultValue && + !Utility.isNullOrEmptyString(resultValue[Constants.referenceId]); + if (shouldAutoTrack) { + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype._addCommon = function (object, isExplicitlyAdded) { + if (object[Constants.isTracked]) { + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + return; + } + var referenceId = object[Constants.referenceId]; + var donotKeepReference = object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName]; + if (donotKeepReference) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.objectIsUntracked), null); + } + if (Utility.isNullOrEmptyString(referenceId) && object._KeepReference) { + object._KeepReference(); + ActionFactory.createInstantiateAction(this.m_context, object); + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype.remove = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._removeCommon(item); }); + } + else { + this._removeCommon(param); + } + }; + TrackedObjects.prototype._removeCommon = function (object) { + object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName] = true; + object.context._pendingRequest._removeKeepReferenceAction(object._objectPath.objectPathInfo.Id); + var referenceId = object[Constants.referenceId]; + if (!Utility.isNullOrEmptyString(referenceId)) { + var rootObject = this.m_context._rootObject; + if (rootObject._RemoveReference) { + rootObject._RemoveReference(referenceId); + } + } + delete object[Constants.isTracked]; + }; + TrackedObjects.prototype._retrieveAndClearAutoCleanupList = function () { + var list = this._autoCleanupList; + this._autoCleanupList = {}; + return list; + }; + return TrackedObjects; + }()); + OfficeExtension_1.TrackedObjects = TrackedObjects; + var RequestPrettyPrinter = (function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose, removePII) { + if (!globalObjName) { + globalObjName = 'root'; + } + this.m_globalObjName = globalObjName; + this.m_referencedObjectPaths = referencedObjectPaths; + this.m_actions = actions; + this.m_statements = []; + this.m_variableNameForObjectPathMap = {}; + this.m_variableNameToObjectPathMap = {}; + this.m_declaredObjectPathMap = {}; + this.m_showDispose = showDispose; + this.m_removePII = removePII; + } + RequestPrettyPrinter.prototype.process = function () { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo = function (actionIndex) { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount = 5; + this.m_statements = []; + var oneStatement = ''; + var statementIndex = -1; + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex == i) { + statementIndex = this.m_statements.length - 1; + } + if (statementIndex >= 0 && this.m_statements.length > statementIndex + surroundingCount + 1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex = statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex = 0; + } + var endIndex = statementIndex + 1 + surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex = this.m_statements.length; + } + var surroundingStatements = []; + if (startIndex != 0) { + surroundingStatements.push('...'); + } + for (var i_1 = startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push('// >>>>>'); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push('// <<<<<'); + for (var i_2 = statementIndex + 1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push('...'); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction = function (action) { + var actionInfo = action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + case 9: + this.processUpdateAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction = function (action) { + var objId = action.actionInfo.ObjectPathId; + var objPath = this.m_referencedObjectPaths[objId]; + var varName = this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement = 'var ' + varName + ' = ' + this.buildObjectPathExpressionWithParent(objPath) + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId] = varName; + } + else { + var statement = '// Instantiate {' + varName + '}'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction = function (action) { + var methodName = action.actionInfo.Name; + if (methodName === '_KeepReference') { + if (!OfficeExtension_1._internalConfig.showInternalApiInDebugInfo) { + return; + } + methodName = 'track'; + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(methodName) + + '(' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.load(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.retrieve(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction = function (action) { + var queryExp = ''; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp = JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.loadRecursive(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(action.actionInfo.Name) + + ' = ' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction = function (action) { + var statement = 'context.trace();'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.ensureUnchanged(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processUpdateAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.update(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant = function (statement, action) { + var _this = this; + if (this.m_showDispose) { + var lastUsedObjectPathIds = action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose = lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(', '); + return statement + ' // And then dispose {' + objectNamesToDispose + '}'; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression = function (action) { + if (action.actionInfo.QueryInfo) { + var option = {}; + option.select = action.actionInfo.QueryInfo.Select; + option.expand = action.actionInfo.QueryInfo.Expand; + option.skip = action.actionInfo.QueryInfo.Skip; + option.top = action.actionInfo.QueryInfo.Top; + if (typeof option.top === 'undefined' && + typeof option.skip === 'undefined' && + typeof option.expand === 'undefined') { + if (typeof option.select === 'undefined') { + return ''; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ''; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent = function (objPath) { + var hasParent = objPath.objectPathInfo.ObjectPathType == 5 || + objPath.objectPathInfo.ObjectPathType == 3 || + objPath.objectPathInfo.ObjectPathType == 4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return (this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId) + '.' + this.buildObjectPathExpression(objPath)); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression = function (objPath) { + var expr = this.buildObjectPathInfoExpression(objPath.objectPathInfo); + var originalObjectPathInfo = objPath.originalObjectPathInfo; + if (originalObjectPathInfo) { + expr = expr + ' /* originally ' + this.buildObjectPathInfoExpression(originalObjectPathInfo) + ' */'; + } + return expr; + }; + RequestPrettyPrinter.prototype.buildObjectPathInfoExpression = function (objectPathInfo) { + switch (objectPathInfo.ObjectPathType) { + case 1: + return 'context.' + this.m_globalObjName; + case 5: + return 'getItem(' + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + ')'; + case 3: + return (Utility._toCamelLowerCase(objectPathInfo.Name) + + '(' + + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + + ')'); + case 2: + return objectPathInfo.Name + '.newObject()'; + case 7: + return 'null'; + case 4: + return Utility._toCamelLowerCase(objectPathInfo.Name); + case 6: + return ('context.' + this.m_globalObjName + '._getObjectByReferenceId(' + JSON.stringify(objectPathInfo.Name) + ')'); + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression = function (args) { + var ret = ''; + if (!args.Arguments || args.Arguments.length === 0) { + return ret; + } + if (this.m_removePII) { + if (typeof args.Arguments[0] === 'undefined') { + return ret; + } + return '...'; + } + for (var i = 0; i < args.Arguments.length; i++) { + if (i > 0) { + ret = ret + ', '; + } + ret = + ret + + this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret === 'undefined') { + ret = ''; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral = function (value, objectPathId) { + if (typeof value == 'number' && value === objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase = function (objectPathId) { + var ret = 'v'; + var objPath = this.m_referencedObjectPaths[objectPathId]; + if (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret = this.m_globalObjName; + break; + case 4: + ret = Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName = objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3) === 'Get') { + methodName = methodName.substr(3); + } + ret = Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName = this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1) === 's') { + ret = parentName.substr(0, parentName.length - 1); + } + else { + ret = parentName + 'Item'; + } + break; + } + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName = function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret = this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + } + var i = 1; + while (this.m_variableNameToObjectPathMap[ret + i.toString()]) { + i++; + } + ret = ret + i.toString(); + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + var ResourceStrings = (function (_super) { + __extends(ResourceStrings, _super); + function ResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + ResourceStrings.cannotRegisterEvent = 'CannotRegisterEvent'; + ResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + ResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + ResourceStrings.propertyNotLoaded = 'PropertyNotLoaded'; + ResourceStrings.runMustReturnPromise = 'RunMustReturnPromise'; + ResourceStrings.moreInfoInnerError = 'MoreInfoInnerError'; + ResourceStrings.cannotApplyPropertyThroughSetMethod = 'CannotApplyPropertyThroughSetMethod'; + ResourceStrings.invalidOperationInCellEditMode = 'InvalidOperationInCellEditMode'; + ResourceStrings.objectIsUntracked = 'ObjectIsUntracked'; + ResourceStrings.customFunctionDefintionMissing = 'CustomFunctionDefintionMissing'; + ResourceStrings.customFunctionImplementationMissing = 'CustomFunctionImplementationMissing'; + ResourceStrings.customFunctionNameContainsBadChars = 'CustomFunctionNameContainsBadChars'; + ResourceStrings.customFunctionNameCannotSplit = 'CustomFunctionNameCannotSplit'; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch = 'CustomFunctionUnexpectedNumberOfEntriesInResultBatch'; + ResourceStrings.customFunctionCancellationHandlerMissing = 'CustomFunctionCancellationHandlerMissing'; + ResourceStrings.customFunctionInvalidFunction = 'CustomFunctionInvalidFunction'; + ResourceStrings.customFunctionInvalidFunctionMapping = 'CustomFunctionInvalidFunctionMapping'; + ResourceStrings.customFunctionWindowMissing = 'CustomFunctionWindowMissing'; + ResourceStrings.customFunctionDefintionMissingOnWindow = 'CustomFunctionDefintionMissingOnWindow'; + ResourceStrings.pendingBatchInProgress = 'PendingBatchInProgress'; + ResourceStrings.notInsideBatch = 'NotInsideBatch'; + ResourceStrings.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ResourceStrings; + }(CommonResourceStrings)); + OfficeExtension_1.ResourceStrings = ResourceStrings; + CoreUtility.addResourceStringValues({ + CannotRegisterEvent: 'The event handler cannot be registered.', + PropertyNotLoaded: "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.", + RunMustReturnPromise: 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".', + InvalidOrTimedOutSessionMessage: 'Your Office Online session has expired or is invalid. To continue, refresh the page.', + InvalidOperationInCellEditMode: 'Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.', + InvalidSheetName: 'The request cannot be processed because the specified worksheet cannot be found. Please try again.', + CustomFunctionDefintionMissing: "A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.", + CustomFunctionDefintionMissingOnWindow: "A property with the name '{0}' that represents the function's definition must exist on the window object.", + CustomFunctionImplementationMissing: "The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.", + CustomFunctionNameContainsBadChars: 'The function name may only contain letters, digits, underscores, and periods.', + CustomFunctionNameCannotSplit: 'The function name must contain a non-empty namespace and a non-empty short name.', + CustomFunctionUnexpectedNumberOfEntriesInResultBatch: "The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.", + CustomFunctionCancellationHandlerMissing: 'The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.', + CustomFunctionInvalidFunction: "The property with the name '{0}' that represents the function's definition is not a valid function.", + CustomFunctionInvalidFunctionMapping: "The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.", + CustomFunctionWindowMissing: 'The window object was not found.', + PendingBatchInProgress: 'There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.', + NotInsideBatch: 'Operations may not be invoked outside of a batch method.', + CannotUpdateReadOnlyProperty: "The property '{0}' is read-only and it cannot be updated.", + ObjectIsUntracked: 'The object is untracked.' + }); + var Utility = (function (_super) { + __extends(Utility, _super); + function Utility() { + return _super !== null && _super.apply(this, arguments) || this; + } + Utility.fixObjectPathIfNecessary = function (clientObject, value) { + if (clientObject && clientObject._objectPath && value) { + clientObject._objectPath.updateUsingObjectData(value, clientObject); + } + }; + Utility.load = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve = function (clientObj, option) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !Utility.isSetSupported('RichApiRuntime', '1.1'); + } + var result = new RetrieveResultImpl(clientObj, shouldPolyfill); + clientObj._retrieve(option, result); + return result; + }; + Utility.retrieveAndSync = function (clientObj, option) { + var result = Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); + }; + Utility.toJson = function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result = {}; + for (var prop in scalarProperties) { + var value = scalarProperties[prop]; + if (typeof value !== 'undefined') { + result[prop] = value; + } + } + for (var prop in navigationProperties) { + var value = navigationProperties[prop]; + if (typeof value !== 'undefined') { + if (value[Utility.fieldName_isCollection] && typeof value[Utility.fieldName_m__items] !== 'undefined') { + result[prop] = value.toJSON()['items']; + } + else { + result[prop] = value.toJSON(); + } + } + } + if (collectionItemsIfAny) { + result['items'] = collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; + }; + Utility.throwError = function (resourceId, arg, errorLocation) { + throw new _Internal.RuntimeError({ + code: resourceId, + httpStatusCode: 400, + message: CoreUtility._getResourceString(resourceId, arg), + debugInfo: errorLocation ? { errorLocation: errorLocation } : undefined + }); + }; + Utility.createRuntimeError = function (code, message, location, httpStatusCode, data) { + return new _Internal.RuntimeError({ + code: code, + httpStatusCode: httpStatusCode, + message: message, + debugInfo: { errorLocation: location }, + data: data + }); + }; + Utility.throwIfNotLoaded = function (propertyName, fieldValue, entityName, isNull) { + if (!isNull && + CoreUtility.isUndefined(fieldValue) && + propertyName.charCodeAt(0) != Utility.s_underscoreCharCode && + !Utility.s_suppressPropertyNotLoadedException) { + throw Utility.createPropertyNotLoadedException(entityName, propertyName); + } + }; + Utility._getPropertyValueWithoutCheckLoaded = function (object, propertyName) { + Utility.s_suppressPropertyNotLoadedException = true; + try { + return object[propertyName]; + } + finally { + Utility.s_suppressPropertyNotLoadedException = false; + } + }; + Utility.createPropertyNotLoadedException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.propertyNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.propertyNotLoaded, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.createCannotUpdateReadOnlyPropertyException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.cannotUpdateReadOnlyProperty, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotUpdateReadOnlyProperty, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.promisify = function (action) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + var callback = function (result) { + if (result.status == 'failed') { + reject(result.error); + } + else { + resolve(result.value); + } + }; + action(callback); + }); + }; + Utility._addActionResultHandler = function (clientObj, action, resultHandler) { + clientObj.context._pendingRequest.addActionResultHandler(action, resultHandler); + }; + Utility._handleNavigationPropertyResults = function (clientObj, objectValue, propertyNames) { + for (var i = 0; i < propertyNames.length - 1; i += 2) { + if (!CoreUtility.isUndefined(objectValue[propertyNames[i + 1]])) { + clientObj[propertyNames[i]]._handleResult(objectValue[propertyNames[i + 1]]); + } + } + }; + Utility._fixupApiFlags = function (flags) { + if (typeof flags === 'boolean') { + if (flags) { + flags = 1; + } + else { + flags = 0; + } + } + return flags; + }; + Utility.definePropertyThrowUnloadedException = function (obj, typeName, propertyName) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + throw Utility.createPropertyNotLoadedException(typeName, propertyName); + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(typeName, propertyName); + } + }); + }; + Utility.defineReadOnlyPropertyWithValue = function (obj, propertyName, value) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + return value; + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(null, propertyName); + } + }); + }; + Utility.processRetrieveResult = function (proxy, value, result, childItemCreateFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + return; + } + if (childItemCreateFunc) { + var data = value[Constants.itemsLowerCase]; + if (Array.isArray(data)) { + var itemsResult = []; + for (var i = 0; i < data.length; i++) { + var itemProxy = childItemCreateFunc(data[i], i); + var itemResult = {}; + itemResult[Constants.proxy] = itemProxy; + itemProxy._handleRetrieveResult(data[i], itemResult); + itemsResult.push(itemResult); + } + Utility.defineReadOnlyPropertyWithValue(result, Constants.itemsLowerCase, itemsResult); + } + } + else { + var scalarPropertyNames = proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = proxy[Constants.navigationPropertyNames]; + var typeName = proxy[Constants.className]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + var propName = scalarPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + Utility.defineReadOnlyPropertyWithValue(result, propName, propValue); + } + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + var propName = navigationPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + var propProxy = proxy[propName]; + var propResult = {}; + propProxy._handleRetrieveResult(propValue, propResult); + propResult[Constants.proxy] = propProxy; + if (Array.isArray(propResult[Constants.itemsLowerCase])) { + propResult = propResult[Constants.itemsLowerCase]; + } + Utility.defineReadOnlyPropertyWithValue(result, propName, propResult); + } + } + } + } + }; + Utility.setMockData = function (clientObj, value, childItemCreateFunc, setItemsFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + clientObj._handleResult(value); + return; + } + if (clientObj[Constants.scalarPropertyOriginalNames]) { + var result = {}; + var scalarPropertyOriginalNames = clientObj[Constants.scalarPropertyOriginalNames]; + var scalarPropertyNames = clientObj[Constants.scalarPropertyNames]; + for (var i = 0; i < scalarPropertyNames.length; i++) { + if (typeof (value[scalarPropertyNames[i]]) !== 'undefined') { + result[scalarPropertyOriginalNames[i]] = value[scalarPropertyNames[i]]; + } + } + clientObj._handleResult(result); + } + if (clientObj[Constants.navigationPropertyNames]) { + var navigationPropertyNames = clientObj[Constants.navigationPropertyNames]; + for (var i = 0; i < navigationPropertyNames.length; i++) { + if (typeof (value[navigationPropertyNames[i]]) !== 'undefined') { + var navigationPropValue = clientObj[navigationPropertyNames[i]]; + if (navigationPropValue.setMockData) { + navigationPropValue.setMockData(value[navigationPropertyNames[i]]); + } + } + } + } + if (clientObj[Constants.isCollection] && childItemCreateFunc) { + var itemsData = Array.isArray(value) ? value : value[Constants.itemsLowerCase]; + if (Array.isArray(itemsData)) { + var items = []; + for (var i = 0; i < itemsData.length; i++) { + var item = childItemCreateFunc(itemsData, i); + Utility.setMockData(item, itemsData[i]); + items.push(item); + } + setItemsFunc(items); + } + } + }; + Utility.applyMixin = function (derived, base) { + Object.getOwnPropertyNames(base.prototype).forEach(function (name) { + if (name !== 'constructor') { + Object.defineProperty(derived.prototype, name, Object.getOwnPropertyDescriptor(base.prototype, name)); + } + }); + }; + Utility.ensureTypeInitialized = function (type) { + var context = new ClientRequestContext(); + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, "Temp", false, 0); + new type(context, objectPath); + }; + Utility.fieldName_m__items = 'm__items'; + Utility.fieldName_isCollection = '_isCollection'; + Utility._synchronousCleanup = false; + Utility.s_underscoreCharCode = '_'.charCodeAt(0); + Utility.s_suppressPropertyNotLoadedException = false; + return Utility; + }(CommonUtility)); + OfficeExtension_1.Utility = Utility; + var BatchApiHelper = (function () { + function BatchApiHelper() { + } + BatchApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + var action = ActionFactory.createMethodAction(obj.context, obj, methodName, operationType, args, flags); + var result = new ClientResult(resultProcessType); + Utility._addActionResultHandler(obj, action, result); + return result; + }; + BatchApiHelper.invokeEnsureUnchanged = function (obj, objectState) { + ActionFactory.createEnsureUnchangedAction(obj.context, obj, objectState); + }; + BatchApiHelper.invokeSetProperty = function (obj, propName, propValue, flags) { + ActionFactory.createSetPropertyAction(obj.context, obj, propName, propValue, flags); + }; + BatchApiHelper.createRootServiceObject = function (type, context) { + var objectPath = ObjectPathFactory.createGlobalObjectObjectPath(context); + return new type(context, objectPath); + }; + BatchApiHelper.createObjectFromReferenceId = function (type, context, referenceId) { + var objectPath = ObjectPathFactory.createReferenceIdObjectPath(context, referenceId); + return new type(context, objectPath); + }; + BatchApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, typeName, isCollection, flags); + return new type(context, objectPath); + }; + BatchApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPath = ObjectPathFactory.createPropertyObjectPath(parent.context, parent, propertyName, isCollection, false, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createIndexerObject = function (type, parent, args) { + var objectPath = ObjectPathFactory.createIndexerObjectPath(parent.context, parent, args); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPath = ObjectPathFactory.createMethodObjectPath(parent.context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createChildItemObject = function (type, hasIndexerMethod, parent, chileItem, index) { + var objectPath = ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt(hasIndexerMethod, parent.context, parent, chileItem, index); + return new type(parent.context, objectPath); + }; + return BatchApiHelper; + }()); + OfficeExtension_1.BatchApiHelper = BatchApiHelper; + var LibraryBuilder = (function () { + function LibraryBuilder(options) { + this.m_namespaceMap = {}; + this.m_namespace = options.metadata.name; + this.m_targetNamespaceObject = options.targetNamespaceObject; + this.m_namespaceMap[this.m_namespace] = options.targetNamespaceObject; + if (options.namespaceMap) { + for (var ns in options.namespaceMap) { + this.m_namespaceMap[ns] = options.namespaceMap[ns]; + } + } + this.m_defaultApiSetName = options.metadata.defaultApiSetName; + this.m_hostName = options.metadata.hostName; + var metadata = options.metadata; + if (metadata.enumTypes) { + for (var i = 0; i < metadata.enumTypes.length; i++) { + this.buildEnumType(metadata.enumTypes[i]); + } + } + if (metadata.apiSets) { + for (var i = 0; i < metadata.apiSets.length; i++) { + var elem = metadata.apiSets[i]; + if (Array.isArray(elem)) { + metadata.apiSets[i] = { + version: elem[0], + name: elem[1] || this.m_defaultApiSetName + }; + } + } + this.m_apiSets = metadata.apiSets; + } + this.m_strings = metadata.strings; + if (metadata.clientObjectTypes) { + for (var i = 0; i < metadata.clientObjectTypes.length; i++) { + var elem = metadata.clientObjectTypes[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 11); + metadata.clientObjectTypes[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + collectionPropertyPath: this.getString(elem[6]), + newObjectServerTypeFullName: this.getString(elem[9]), + newObjectApiFlags: elem[10], + childItemTypeFullName: this.getString(elem[7]), + scalarProperties: elem[2], + navigationProperties: elem[3], + scalarMethods: elem[4], + navigationMethods: elem[5], + events: elem[8], + }; + } + this.buildClientObjectType(metadata.clientObjectTypes[i], options.fullyInitialize); + } + } + } + LibraryBuilder.prototype.ensureArraySize = function (value, size) { + var count = size - value.length; + while (count > 0) { + value.push(0); + count--; + } + }; + LibraryBuilder.prototype.getString = function (ordinalOrValue) { + if (typeof (ordinalOrValue) === "number") { + if (ordinalOrValue > 0) { + return this.m_strings[ordinalOrValue - 1]; + } + return null; + } + return ordinalOrValue; + }; + LibraryBuilder.prototype.buildEnumType = function (elem) { + var enumType; + if (Array.isArray(elem)) { + enumType = { + name: elem[0], + fields: elem[2] + }; + if (!enumType.fields) { + enumType.fields = {}; + } + var fieldsWithCamelUpperCaseValue = elem[1]; + if (Array.isArray(fieldsWithCamelUpperCaseValue)) { + for (var index = 0; index < fieldsWithCamelUpperCaseValue.length; index++) { + enumType.fields[fieldsWithCamelUpperCaseValue[index]] = this.toSimpleCamelUpperCase(fieldsWithCamelUpperCaseValue[index]); + } + } + } + else { + enumType = elem; + } + this.m_targetNamespaceObject[enumType.name] = enumType.fields; + }; + LibraryBuilder.prototype.buildClientObjectType = function (typeInfo, fullyInitialize) { + var thisBuilder = this; + var type = function (context, objectPath) { + ClientObject.apply(this, arguments); + if (!thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited) { + thisBuilder.buildPrototype(thisBuilder.m_targetNamespaceObject[typeInfo.name], typeInfo); + thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited = true; + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo) { + if (this._objectPath && this._objectPath.objectPathInfo && this._className) { + this._objectPath.objectPathInfo.T = this._className; + } + } + }; + this.m_targetNamespaceObject[typeInfo.name] = type; + this.extendsType(type, ClientObject); + this.buildNewObject(type, typeInfo); + if ((typeInfo.behaviorFlags & 2) !== 0) { + type.prototype._KeepReference = function () { + BatchApiHelper.invokeMethod(this, "_KeepReference", 1, [], 0, 0); + }; + } + if ((typeInfo.behaviorFlags & 32) !== 0) { + var func = this.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_StaticCustomize"); + func.call(null, type); + } + if (fullyInitialize) { + this.buildPrototype(type, typeInfo); + type._typeInited = true; + } + }; + LibraryBuilder.prototype.extendsType = function (d, b) { + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + LibraryBuilder.prototype.findObjectUnderPath = function (top, paths, pathStartIndex) { + var obj = top; + for (var i = pathStartIndex; i < paths.length; i++) { + if (typeof (obj) !== 'object') { + throw new OfficeExtension_1.Error("Cannot find " + paths.join(".")); + } + obj = obj[paths[i]]; + } + return obj; + }; + LibraryBuilder.prototype.getFunction = function (fullName) { + var ret = this.resolveObjectByFullName(fullName); + if (typeof (ret) !== 'function') { + throw new OfficeExtension_1.Error("Cannot find function or type: " + fullName); + } + return ret; + }; + LibraryBuilder.prototype.resolveObjectByFullName = function (fullName) { + var parts = fullName.split('.'); + if (parts.length === 1) { + return this.m_targetNamespaceObject[parts[0]]; + } + var rootName = parts[0]; + if (rootName === this.m_namespace) { + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 1); + } + if (this.m_namespaceMap[rootName]) { + return this.findObjectUnderPath(this.m_namespaceMap[rootName], parts, 1); + } + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 0); + }; + LibraryBuilder.prototype.evaluateSimpleExpression = function (expression, thisObj) { + if (Utility.isNullOrUndefined(expression)) { + return null; + } + var paths = expression.split('.'); + if (paths.length === 3 && paths[0] === 'OfficeExtension' && paths[1] === 'Constants') { + return Constants[paths[2]]; + } + if (paths[0] === 'this') { + var obj = thisObj; + for (var i = 1; i < paths.length; i++) { + if (paths[i] == 'toString()') { + obj = obj.toString(); + } + else if (paths[i].substr(paths[i].length - 2) === "()") { + obj = obj[paths[i].substr(0, paths[i].length - 2)](); + } + else { + obj = obj[paths[i]]; + } + } + return obj; + } + throw new OfficeExtension_1.Error("Cannot evaluate: " + expression); + }; + LibraryBuilder.prototype.evaluateEventTargetId = function (targetIdExpression, thisObj) { + if (Utility.isNullOrEmptyString(targetIdExpression)) { + return ''; + } + return this.evaluateSimpleExpression(targetIdExpression, thisObj); + }; + LibraryBuilder.prototype.isAllDigits = function (expression) { + var charZero = '0'.charCodeAt(0); + var charNine = '9'.charCodeAt(0); + for (var i = 0; i < expression.length; i++) { + if (expression.charCodeAt(i) < charZero || + expression.charCodeAt(i) > charNine) { + return false; + } + } + return true; + }; + LibraryBuilder.prototype.evaluateEventType = function (eventTypeExpression) { + if (Utility.isNullOrEmptyString(eventTypeExpression)) { + return 0; + } + if (this.isAllDigits(eventTypeExpression)) { + return parseInt(eventTypeExpression); + } + var ret = this.resolveObjectByFullName(eventTypeExpression); + if (typeof (ret) !== 'number') { + throw new OfficeExtension_1.Error("Invalid event type: " + eventTypeExpression); + } + return ret; + }; + LibraryBuilder.prototype.buildPrototype = function (type, typeInfo) { + this.buildScalarProperties(type, typeInfo); + this.buildNavigationProperties(type, typeInfo); + this.buildScalarMethods(type, typeInfo); + this.buildNavigationMethods(type, typeInfo); + this.buildEvents(type, typeInfo); + this.buildHandleResult(type, typeInfo); + this.buildHandleIdResult(type, typeInfo); + this.buildHandleRetrieveResult(type, typeInfo); + this.buildLoad(type, typeInfo); + this.buildRetrieve(type, typeInfo); + this.buildSetMockData(type, typeInfo); + this.buildEnsureUnchanged(type, typeInfo); + this.buildUpdate(type, typeInfo); + this.buildSet(type, typeInfo); + this.buildToJSON(type, typeInfo); + this.buildItems(type, typeInfo); + this.buildTypeMetadataInfo(type, typeInfo); + this.buildTrackUntrack(type, typeInfo); + this.buildMixin(type, typeInfo); + }; + LibraryBuilder.prototype.toSimpleCamelUpperCase = function (name) { + return name.substr(0, 1).toUpperCase() + name.substr(1); + }; + LibraryBuilder.prototype.ensureOriginalName = function (member) { + if (member.originalName === null) { + member.originalName = this.toSimpleCamelUpperCase(member.name); + } + }; + LibraryBuilder.prototype.getFieldName = function (member) { + return "m_" + member.name; + }; + LibraryBuilder.prototype.throwIfApiNotSupported = function (typeInfo, member) { + if (this.m_apiSets && member.apiSetInfoOrdinal > 0) { + var apiSetInfo = this.m_apiSets[member.apiSetInfoOrdinal - 1]; + if (apiSetInfo) { + Utility.throwIfApiNotSupported(typeInfo.name + "." + member.name, apiSetInfo.name, apiSetInfo.version, this.m_hostName); + } + } + }; + LibraryBuilder.prototype.buildScalarProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarProperties)) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var elem = typeInfo.scalarProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 6); + typeInfo.scalarProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + originalName: this.getString(elem[3]), + setMethodApiFlags: elem[4], + undoableApiSetInfoOrdinal: elem[5], + }; + } + this.buildScalarProperty(type, typeInfo, typeInfo.scalarProperties[i]); + } + } + }; + LibraryBuilder.prototype.calculateApiFlags = function (apiFlags, undoableApiSetInfoOrdinal) { + if (undoableApiSetInfoOrdinal > 0) { + var undoableApiSetInfo = this.m_apiSets[undoableApiSetInfoOrdinal - 1]; + if (undoableApiSetInfo) { + apiFlags = CommonUtility.calculateApiFlags(apiFlags, undoableApiSetInfo.name, undoableApiSetInfo.version); + } + } + return apiFlags; + }; + LibraryBuilder.prototype.buildScalarProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + Utility.throwIfNotLoaded(propInfo.name, this[fieldName], typeInfo.name, this._isNull); + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildNavigationProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationProperties)) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + var elem = typeInfo.navigationProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 8); + typeInfo.navigationProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[4]), + getMethodApiFlags: elem[5], + setMethodApiFlags: elem[6], + propertyTypeFullName: this.getString(elem[1]), + undoableApiSetInfoOrdinal: elem[7] + }; + } + this.buildNavigationProperty(type, typeInfo, typeInfo.navigationProperties[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + if (!this[thisBuilder.getFieldName(propInfo)]) { + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + this[fieldName] = BatchApiHelper.createPropertyObject(thisBuilder.getFunction(propInfo.propertyTypeFullName), this, propInfo.originalName, (propInfo.behaviorFlags & 16) !== 0, propInfo.getMethodApiFlags); + } + if (propInfo.behaviorFlags & 64) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Get"); + customizationFunc.call(this, this, this[fieldName]); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildScalarMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarMethods)) { + for (var i = 0; i < typeInfo.scalarMethods.length; i++) { + var elem = typeInfo.scalarMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.scalarMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[5]), + apiFlags: elem[4], + parameterCount: elem[1], + undoableApiSetInfoOrdinal: elem[6] + }; + } + this.buildScalarMethod(type, typeInfo, typeInfo.scalarMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildScalarMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + var resultProcessType = 0; + if (methodInfo.behaviorFlags & 32) { + resultProcessType = 1; + } + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.invokeMethod(this, methodInfo.originalName, operationType, args, apiFlags, resultProcessType); + }; + }; + LibraryBuilder.prototype.buildNavigationMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationMethods)) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + var elem = typeInfo.navigationMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 9); + typeInfo.navigationMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[3], + apiSetInfoOrdinal: elem[4], + originalName: this.getString(elem[6]), + apiFlags: elem[5], + parameterCount: elem[2], + returnTypeFullName: this.getString(elem[1]), + returnObjectGetByIdMethodName: this.getString(elem[7]), + undoableApiSetInfoOrdinal: elem[8] + }; + } + this.buildNavigationMethod(type, typeInfo, typeInfo.navigationMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + if ((methodInfo.behaviorFlags & 16) !== 0) { + return BatchApiHelper.createIndexerObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, args); + } + else { + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.createMethodObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, methodInfo.originalName, operationType, args, (methodInfo.behaviorFlags & 4) !== 0, (methodInfo.behaviorFlags & 8) !== 0, methodInfo.returnObjectGetByIdMethodName, apiFlags); + } + }; + }; + LibraryBuilder.prototype.buildHandleResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleResult = function (value) { + ClientObject.prototype._handleResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + Utility.fixObjectPathIfNecessary(this, value); + if (typeInfo.behaviorFlags & 8) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i_3 = 0; i_3 < typeInfo.scalarProperties.length; i_3++) { + if (!Utility.isUndefined(value[typeInfo.scalarProperties[i_3].originalName])) { + if ((typeInfo.scalarProperties[i_3].behaviorFlags & 8) !== 0) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i_3].originalName]); + } + else { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = value[typeInfo.scalarProperties[i_3].originalName]; + } + } + } + } + if (typeInfo.navigationProperties) { + var propNames = []; + for (var i_4 = 0; i_4 < typeInfo.navigationProperties.length; i_4++) { + propNames.push(typeInfo.navigationProperties[i_4].name); + propNames.push(typeInfo.navigationProperties[i_4].originalName); + } + Utility._handleNavigationPropertyResults(this, value, propNames); + } + if ((typeInfo.behaviorFlags & 1) !== 0) { + var hasIndexerMethod = thisBuilder.hasIndexMethod(typeInfo); + if (!Utility.isNullOrUndefined(value[Constants.items])) { + this.m__items = []; + var _data = value[Constants.items]; + var childItemType = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + for (var i = 0; i < _data.length; i++) { + var _item = BatchApiHelper.createChildItemObject(childItemType, hasIndexerMethod, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + } + }; + }; + LibraryBuilder.prototype.buildHandleRetrieveResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleRetrieveResult = function (value, result) { + ClientObject.prototype._handleRetrieveResult.call(this, value, result); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if (typeInfo.scalarProperties[i].behaviorFlags & 8) { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].name])) { + value[typeInfo.scalarProperties[i].name] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i].name]); + } + } + } + } + if (typeInfo.behaviorFlags & 1) { + var hasIndexerMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + var childItemType_1 = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + var thisObj_1 = this; + Utility.processRetrieveResult(thisObj_1, value, result, function (childItemData, index) { return BatchApiHelper.createChildItemObject(childItemType_1, hasIndexerMethod_1, thisObj_1, childItemData, index); }); + } + else { + Utility.processRetrieveResult(this, value, result); + } + }; + }; + LibraryBuilder.prototype.buildHandleIdResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleIdResult = function (value) { + ClientObject.prototype._handleIdResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.behaviorFlags & 16) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleIdResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var propName = typeInfo.scalarProperties[i].originalName; + if (propName === "Id" || propName === "_Id" || propName === "_ReferenceId") { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].originalName])) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])] = value[typeInfo.scalarProperties[i].originalName]; + } + } + } + } + }; + }; + LibraryBuilder.prototype.buildLoad = function (type, typeInfo) { + type.prototype.load = function (options) { + return Utility.load(this, options); + }; + }; + LibraryBuilder.prototype.buildRetrieve = function (type, typeInfo) { + type.prototype.retrieve = function (options) { + return Utility.retrieve(this, options); + }; + }; + LibraryBuilder.prototype.buildNewObject = function (type, typeInfo) { + if (!Utility.isNullOrEmptyString(typeInfo.newObjectServerTypeFullName)) { + type.newObject = function (context) { + return BatchApiHelper.createTopLevelServiceObject(type, context, typeInfo.newObjectServerTypeFullName, (typeInfo.behaviorFlags & 1) !== 0, typeInfo.newObjectApiFlags); + }; + } + }; + LibraryBuilder.prototype.buildSetMockData = function (type, typeInfo) { + var thisBuilder = this; + if (typeInfo.behaviorFlags & 1) { + var hasIndexMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + type.prototype.setMockData = function (data) { + var thisObj = this; + Utility.setMockData(thisObj, data, function (childItemData, index) { + return BatchApiHelper.createChildItemObject(thisBuilder.getFunction(typeInfo.childItemTypeFullName), hasIndexMethod_1, thisObj, childItemData, index); + }, function (items) { + thisObj.m__items = items; + }); + }; + } + else { + type.prototype.setMockData = function (data) { + Utility.setMockData(this, data); + }; + } + }; + LibraryBuilder.prototype.buildEnsureUnchanged = function (type, typeInfo) { + type.prototype.ensureUnchanged = function (data) { + BatchApiHelper.invokeEnsureUnchanged(this, data); + }; + }; + LibraryBuilder.prototype.buildUpdate = function (type, typeInfo) { + type.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + }; + LibraryBuilder.prototype.buildSet = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) !== 0) { + return; + } + var notAllowedToBeSetPropertyNames = []; + var allowedScalarPropertyNames = []; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 2) === 0 && + (typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + allowedScalarPropertyNames.push(typeInfo.scalarProperties[i].name); + } + else { + notAllowedToBeSetPropertyNames.push(typeInfo.scalarProperties[i].name); + } + } + } + var allowedNavigationPropertyNames = []; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 16) !== 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 1) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 32) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else { + allowedNavigationPropertyNames.push(typeInfo.navigationProperties[i].name); + } + } + } + if (allowedNavigationPropertyNames.length === 0 && allowedScalarPropertyNames.length === 0) { + return; + } + type.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, allowedScalarPropertyNames, allowedNavigationPropertyNames, notAllowedToBeSetPropertyNames); + }; + }; + LibraryBuilder.prototype.buildItems = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) === 0) { + return; + } + Object.defineProperty(type.prototype, "items", { + get: function () { + Utility.throwIfNotLoaded("items", this.m__items, typeInfo.name, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildToJSON = function (type, typeInfo) { + var thisBuilder = this; + if ((typeInfo.behaviorFlags & 1) !== 0) { + type.prototype.toJSON = function () { + return Utility.toJson(this, {}, {}, this.m__items); + }; + return; + } + else { + type.prototype.toJSON = function () { + var scalarProperties = {}; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + scalarProperties[typeInfo.scalarProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])]; + } + } + } + var navProperties = {}; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 1) !== 0) { + navProperties[typeInfo.navigationProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.navigationProperties[i])]; + } + } + } + return Utility.toJson(this, scalarProperties, navProperties); + }; + } + }; + LibraryBuilder.prototype.buildTypeMetadataInfo = function (type, typeInfo) { + Object.defineProperty(type.prototype, "_className", { + get: function () { + return typeInfo.name; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_isCollection", { + get: function () { + return (typeInfo.behaviorFlags & 1) !== 0; + }, + enumerable: true, + configurable: true + }); + if (!Utility.isNullOrEmptyString(typeInfo.collectionPropertyPath)) { + Object.defineProperty(type.prototype, "_collectionPropertyPath", { + get: function () { + return typeInfo.collectionPropertyPath; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.scalarProperties && typeInfo.scalarProperties.length > 0) { + Object.defineProperty(type.prototype, "_scalarPropertyNames", { + get: function () { + if (!this.m__scalarPropertyNames) { + this.m__scalarPropertyNames = typeInfo.scalarProperties.map(function (p) { return p.name; }); + } + return this.m__scalarPropertyNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyOriginalNames", { + get: function () { + if (!this.m__scalarPropertyOriginalNames) { + this.m__scalarPropertyOriginalNames = typeInfo.scalarProperties.map(function (p) { return p.originalName; }); + } + return this.m__scalarPropertyOriginalNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyUpdateable", { + get: function () { + if (!this.m__scalarPropertyUpdateable) { + this.m__scalarPropertyUpdateable = typeInfo.scalarProperties.map(function (p) { return (p.behaviorFlags & 2) === 0; }); + } + return this.m__scalarPropertyUpdateable; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.navigationProperties && typeInfo.navigationProperties.length > 0) { + Object.defineProperty(type.prototype, "_navigationPropertyNames", { + get: function () { + if (!this.m__navigationPropertyNames) { + this.m__navigationPropertyNames = typeInfo.navigationProperties.map(function (p) { return p.name; }); + } + return this.m__navigationPropertyNames; + }, + enumerable: true, + configurable: true + }); + } + }; + LibraryBuilder.prototype.buildTrackUntrack = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 2) { + type.prototype.track = function () { + this.context.trackedObjects.add(this); + return this; + }; + type.prototype.untrack = function () { + this.context.trackedObjects.remove(this); + return this; + }; + } + }; + LibraryBuilder.prototype.buildMixin = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 4) { + var mixinType = this.getFunction(typeInfo.name + 'Custom'); + Utility.applyMixin(type, mixinType); + } + }; + LibraryBuilder.prototype.getOnEventName = function (name) { + if (name[0] === '_') { + return '_on' + name.substr(1); + } + return 'on' + name; + }; + LibraryBuilder.prototype.buildEvents = function (type, typeInfo) { + if (typeInfo.events) { + for (var i = 0; i < typeInfo.events.length; i++) { + var elem = typeInfo.events[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.events[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + typeExpression: this.getString(elem[3]), + targetIdExpression: this.getString(elem[4]), + register: this.getString(elem[5]), + unregister: this.getString(elem[6]) + }; + } + this.buildEvent(type, typeInfo, typeInfo.events[i]); + } + } + }; + LibraryBuilder.prototype.buildEvent = function (type, typeInfo, evt) { + if (evt.behaviorFlags & 1) { + this.buildV0Event(type, typeInfo, evt); + } + else { + this.buildV2Event(type, typeInfo, evt); + } + }; + LibraryBuilder.prototype.buildV2Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (evt.register !== 'null') { + registerFunc = this[evt.register].bind(this); + } + var unregisterFunc = null; + if (evt.unregister !== 'null') { + unregisterFunc = this[evt.unregister].bind(this); + } + var getTargetIdFunc = function () { + return thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + }; + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + var eventType = thisBuilder.evaluateEventType(evt.typeExpression); + this[fieldName] = new GenericEventHandlers(this.context, this, evt.name, { + eventType: eventType, + getTargetIdFunc: getTargetIdFunc, + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildV0Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (Utility.isNullOrEmptyString(evt.register)) { + var eventType_1 = thisBuilder.evaluateEventType(evt.typeExpression); + registerFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.register(eventType_1, targetId, handlerCallback); + }; + } + else if (evt.register !== 'null') { + var func_1 = thisBuilder.getFunction(evt.register); + registerFunc = + function (handlerCallback) { + return func_1.call(thisObj, thisObj, handlerCallback); + }; + } + var unregisterFunc = null; + if (Utility.isNullOrEmptyString(evt.unregister)) { + var eventType_2 = thisBuilder.evaluateEventType(evt.typeExpression); + unregisterFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.unregister(eventType_2, targetId, handlerCallback); + }; + } + else if (evt.unregister !== 'null') { + var func_2 = thisBuilder.getFunction(evt.unregister); + unregisterFunc = + function (handlerCallback) { + return func_2.call(thisObj, thisObj, handlerCallback); + }; + } + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + this[fieldName] = new EventHandlers(this.context, this, evt.name, { + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.hasIndexMethod = function (typeInfo) { + var ret = false; + if (typeInfo.navigationMethods) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + if ((typeInfo.navigationMethods[i].behaviorFlags & 16) !== 0) { + ret = true; + break; + } + } + } + return ret; + }; + LibraryBuilder.CustomizationCodeNamespace = "_CC"; + return LibraryBuilder; + }()); + OfficeExtension_1.LibraryBuilder = LibraryBuilder; +})(OfficeExtension || (OfficeExtension = {})); +var OfficeExtension; +(function (OfficeExtension) { + var _InternalPromise; + (function (_InternalPromise) { + function getPromiseType() { + if (typeof Promise !== 'undefined') { + return Promise; + } + if (typeof Office !== 'undefined') { + if (Office.Promise) { + return Office.Promise; + } + } + throw new OfficeExtension.Error('No Promise implementation found'); + } + _InternalPromise.getPromiseType = getPromiseType; + })(_InternalPromise || (_InternalPromise = {})); + Object.defineProperty(OfficeExtension, "Promise", { + get: function () { + return _InternalPromise.getPromiseType(); + }, + enumerable: true, + configurable: true + }); +})(OfficeExtension || (OfficeExtension = {})); +try { + if (typeof OfficePlatformGlobal !== 'undefined' && typeof OfficePlatformGlobal.ReactNativeReka !== 'undefined') { + var RichApiBridgeImpl = (function () { + function RichApiBridgeImpl() { + } + RichApiBridgeImpl.prototype.sendMessageToHost = function (value) { + OfficePlatformGlobal.ReactNativeReka.RekaInstance.InvokeNative('RichApiDataService', 'ProcessMessageToHost', value); + }; + return RichApiBridgeImpl; + }()); + var RichApiBridge_1 = new RichApiBridgeImpl(); + var RichApiDataService_1 = (function () { + function RichApiDataService() { + } + RichApiDataService.prototype.Invoke = function (methodName, value) { + if (methodName === 'ProcessMessageFromHost') { + if (RichApiBridge_1.onMessageFromHost) { + RichApiBridge_1.onMessageFromHost(value); + } + } + }; + return RichApiDataService; + }()); + OfficePlatformGlobal.ReactNativeReka.initReka(); + OfficePlatformGlobal.ReactNativeReka.RekaInstance.RegisterService('RichApiDataService', function () { return new RichApiDataService_1(); }); + OfficeExtension.HostBridge.init(RichApiBridge_1); + OfficeExtension.HostBridgeSession.getInstanceIfHostBridgeInited(); + } +} +catch (e) { +} +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var oteljs; +(function (oteljs) { + function addContractField(dataFields, instanceName, contractName) { + dataFields.push(oteljs.makeStringDataField("zC." + instanceName, contractName)); + } + oteljs.addContractField = addContractField; +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + var DataClassification; + (function (DataClassification) { + DataClassification[DataClassification["EssentialServiceMetadata"] = 1] = "EssentialServiceMetadata"; + DataClassification[DataClassification["AccountData"] = 2] = "AccountData"; + DataClassification[DataClassification["SystemMetadata"] = 4] = "SystemMetadata"; + DataClassification[DataClassification["OrganizationIdentifiableInformation"] = 8] = "OrganizationIdentifiableInformation"; + DataClassification[DataClassification["EndUserIdentifiableInformation"] = 16] = "EndUserIdentifiableInformation"; + DataClassification[DataClassification["CustomerContent"] = 32] = "CustomerContent"; + DataClassification[DataClassification["AccessControl"] = 64] = "AccessControl"; + })(DataClassification = oteljs.DataClassification || (oteljs.DataClassification = {})); +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + function makeBooleanDataField(name, value) { + return { + name: name, + dataType: oteljs.DataFieldType.Boolean, + value: value, + classification: oteljs.DataClassification.SystemMetadata + }; + } + oteljs.makeBooleanDataField = makeBooleanDataField; + function makeInt64DataField(name, value) { + return { + name: name, + dataType: oteljs.DataFieldType.Int64, + value: value, + classification: oteljs.DataClassification.SystemMetadata + }; + } + oteljs.makeInt64DataField = makeInt64DataField; + function makeDoubleDataField(name, value) { + return { + name: name, + dataType: oteljs.DataFieldType.Double, + value: value, + classification: oteljs.DataClassification.SystemMetadata + }; + } + oteljs.makeDoubleDataField = makeDoubleDataField; + function makeStringDataField(name, value) { + return { + name: name, + dataType: oteljs.DataFieldType.String, + value: value, + classification: oteljs.DataClassification.SystemMetadata + }; + } + oteljs.makeStringDataField = makeStringDataField; + function makeGuidDataField(name, value) { + return { + name: name, + dataType: oteljs.DataFieldType.Guid, + value: value, + classification: oteljs.DataClassification.SystemMetadata + }; + } + oteljs.makeGuidDataField = makeGuidDataField; +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + var DataFieldType; + (function (DataFieldType) { + DataFieldType[DataFieldType["String"] = 0] = "String"; + DataFieldType[DataFieldType["Boolean"] = 1] = "Boolean"; + DataFieldType[DataFieldType["Int64"] = 2] = "Int64"; + DataFieldType[DataFieldType["Double"] = 3] = "Double"; + DataFieldType[DataFieldType["Guid"] = 4] = "Guid"; + })(DataFieldType = oteljs.DataFieldType || (oteljs.DataFieldType = {})); +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + var Event = (function () { + function Event() { + this._listeners = []; + } + Event.prototype.fireEvent = function (args) { + this._listeners.forEach(function (listener) { return listener(args); }); + }; + Event.prototype.addListener = function (listener) { + if (listener) { + this._listeners.push(listener); + } + }; + Event.prototype.removeListener = function (listener) { + this._listeners = this._listeners.filter(function (h) { return h !== listener; }); + }; + Event.prototype.getListenerCount = function () { + return this._listeners.length; + }; + return Event; + }()); + oteljs.Event = Event; +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + function getEffectiveEventFlags(telemetryEvent) { + var eventFlags = { + costPriority: oteljs.CostPriority.Normal, + samplingPolicy: oteljs.SamplingPolicy.Measure, + persistencePriority: oteljs.PersistencePriority.Normal, + dataCategories: oteljs.DataCategories.NotSet, + diagnosticLevel: oteljs.DiagnosticLevel.FullEvent + }; + if (!telemetryEvent.eventFlags || !telemetryEvent.eventFlags.dataCategories) { + oteljs.logNotification(oteljs.LogLevel.Error, oteljs.Category.Core, function () { return 'Event is missing DataCategories event flag'; }); + } + if (!telemetryEvent.eventFlags) { + return eventFlags; + } + if (telemetryEvent.eventFlags.costPriority) { + eventFlags.costPriority = telemetryEvent.eventFlags.costPriority; + } + if (telemetryEvent.eventFlags.samplingPolicy) { + eventFlags.samplingPolicy = telemetryEvent.eventFlags.samplingPolicy; + } + if (telemetryEvent.eventFlags.persistencePriority) { + eventFlags.persistencePriority = telemetryEvent.eventFlags.persistencePriority; + } + if (telemetryEvent.eventFlags.dataCategories) { + eventFlags.dataCategories = telemetryEvent.eventFlags.dataCategories; + } + if (telemetryEvent.eventFlags.diagnosticLevel) { + eventFlags.diagnosticLevel = telemetryEvent.eventFlags.diagnosticLevel; + } + return eventFlags; + } + oteljs.getEffectiveEventFlags = getEffectiveEventFlags; +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + var SamplingPolicy; + (function (SamplingPolicy) { + SamplingPolicy[SamplingPolicy["NotSet"] = 0] = "NotSet"; + SamplingPolicy[SamplingPolicy["Measure"] = 1] = "Measure"; + SamplingPolicy[SamplingPolicy["Diagnostics"] = 2] = "Diagnostics"; + SamplingPolicy[SamplingPolicy["CriticalBusinessImpact"] = 191] = "CriticalBusinessImpact"; + SamplingPolicy[SamplingPolicy["CriticalCensus"] = 192] = "CriticalCensus"; + SamplingPolicy[SamplingPolicy["CriticalExperimentation"] = 193] = "CriticalExperimentation"; + SamplingPolicy[SamplingPolicy["CriticalUsage"] = 194] = "CriticalUsage"; + })(SamplingPolicy = oteljs.SamplingPolicy || (oteljs.SamplingPolicy = {})); + var PersistencePriority; + (function (PersistencePriority) { + PersistencePriority[PersistencePriority["NotSet"] = 0] = "NotSet"; + PersistencePriority[PersistencePriority["Normal"] = 1] = "Normal"; + PersistencePriority[PersistencePriority["High"] = 2] = "High"; + })(PersistencePriority = oteljs.PersistencePriority || (oteljs.PersistencePriority = {})); + var CostPriority; + (function (CostPriority) { + CostPriority[CostPriority["NotSet"] = 0] = "NotSet"; + CostPriority[CostPriority["Normal"] = 1] = "Normal"; + CostPriority[CostPriority["High"] = 2] = "High"; + })(CostPriority = oteljs.CostPriority || (oteljs.CostPriority = {})); + var DataCategories; + (function (DataCategories) { + DataCategories[DataCategories["NotSet"] = 0] = "NotSet"; + DataCategories[DataCategories["SoftwareSetup"] = 1] = "SoftwareSetup"; + DataCategories[DataCategories["ProductServiceUsage"] = 2] = "ProductServiceUsage"; + DataCategories[DataCategories["ProductServicePerformance"] = 4] = "ProductServicePerformance"; + DataCategories[DataCategories["DeviceConfiguration"] = 8] = "DeviceConfiguration"; + DataCategories[DataCategories["InkingTypingSpeech"] = 16] = "InkingTypingSpeech"; + })(DataCategories = oteljs.DataCategories || (oteljs.DataCategories = {})); + var DiagnosticLevel; + (function (DiagnosticLevel) { + DiagnosticLevel[DiagnosticLevel["ReservedDoNotUse"] = 0] = "ReservedDoNotUse"; + DiagnosticLevel[DiagnosticLevel["BasicEvent"] = 10] = "BasicEvent"; + DiagnosticLevel[DiagnosticLevel["FullEvent"] = 100] = "FullEvent"; + DiagnosticLevel[DiagnosticLevel["NecessaryServiceDataEvent"] = 110] = "NecessaryServiceDataEvent"; + DiagnosticLevel[DiagnosticLevel["AlwaysOnNecessaryServiceDataEvent"] = 120] = "AlwaysOnNecessaryServiceDataEvent"; + })(DiagnosticLevel = oteljs.DiagnosticLevel || (oteljs.DiagnosticLevel = {})); +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + var onNotificationEvent = new oteljs.Event(); + var LogLevel; + (function (LogLevel) { + LogLevel[LogLevel["Error"] = 0] = "Error"; + LogLevel[LogLevel["Warning"] = 1] = "Warning"; + LogLevel[LogLevel["Info"] = 2] = "Info"; + LogLevel[LogLevel["Verbose"] = 3] = "Verbose"; + })(LogLevel = oteljs.LogLevel || (oteljs.LogLevel = {})); + var Category; + (function (Category) { + Category[Category["Core"] = 0] = "Core"; + Category[Category["Sink"] = 1] = "Sink"; + Category[Category["Transport"] = 2] = "Transport"; + })(Category = oteljs.Category || (oteljs.Category = {})); + function onNotification() { + return onNotificationEvent; + } + oteljs.onNotification = onNotification; + function logNotification(level, category, message) { + onNotificationEvent.fireEvent({ level: level, category: category, message: message }); + } + oteljs.logNotification = logNotification; + function logError(category, message, error) { + logNotification(LogLevel.Error, category, function () { + var errorMessage = error instanceof Error ? error.message : ''; + return message + ": " + errorMessage; + }); + } + oteljs.logError = logError; +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + oteljs.SuppressNexus = -1; + var SimpleTelemetryLogger = (function () { + function SimpleTelemetryLogger(parent, persistentDataFields, config) { + var _a, _b; + this.onSendEvent = new oteljs.Event(); + this.persistentDataFields = []; + this.config = config || {}; + if (parent) { + this.onSendEvent = parent.onSendEvent; + (_a = this.persistentDataFields).push.apply(_a, parent.persistentDataFields); + this.config = __assign(__assign({}, parent.getConfig()), this.config); + } + else { + this.persistentDataFields.push(oteljs.makeStringDataField('OTelJS.Version', oteljs.oteljsVersion)); + } + if (persistentDataFields) { + (_b = this.persistentDataFields).push.apply(_b, persistentDataFields); + } + } + SimpleTelemetryLogger.prototype.sendTelemetryEvent = function (event) { + var localEvent; + try { + if (this.onSendEvent.getListenerCount() === 0) { + oteljs.logNotification(oteljs.LogLevel.Warning, oteljs.Category.Core, function () { return 'No telemetry sinks are attached.'; }); + return; + } + localEvent = this.cloneEvent(event); + this.processTelemetryEvent(localEvent); + } + catch (error) { + oteljs.logError(oteljs.Category.Core, 'SendTelemetryEvent', error); + return; + } + try { + this.onSendEvent.fireEvent(localEvent); + } + catch (_e) { + } + }; + SimpleTelemetryLogger.prototype.processTelemetryEvent = function (event) { + var _a; + if (!event.telemetryProperties) { + event.telemetryProperties = oteljs.TenantTokenManager.getTenantTokens(event.eventName); + } + if (event.dataFields && this.persistentDataFields) { + (_a = event.dataFields).unshift.apply(_a, this.persistentDataFields); + } + if (!this.config.disableValidation) { + oteljs.TelemetryEventValidator.validateTelemetryEvent(event); + } + }; + SimpleTelemetryLogger.prototype.addSink = function (sink) { + this.onSendEvent.addListener(function (event) { return sink.sendTelemetryEvent(event); }); + }; + SimpleTelemetryLogger.prototype.setTenantToken = function (namespace, ariaTenantToken, nexusTenantToken) { + oteljs.TenantTokenManager.setTenantToken(namespace, ariaTenantToken, nexusTenantToken); + }; + SimpleTelemetryLogger.prototype.setTenantTokens = function (tokenTree) { + oteljs.TenantTokenManager.setTenantTokens(tokenTree); + }; + SimpleTelemetryLogger.prototype.cloneEvent = function (event) { + return oteljs.cloneEvent(event); + }; + SimpleTelemetryLogger.prototype.getConfig = function () { + return this.config; + }; + return SimpleTelemetryLogger; + }()); + oteljs.SimpleTelemetryLogger = SimpleTelemetryLogger; +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + function cloneEvent(event) { + var localEvent = { eventName: event.eventName, eventFlags: event.eventFlags }; + if (!!event.telemetryProperties) { + localEvent.telemetryProperties = { + ariaTenantToken: event.telemetryProperties.ariaTenantToken, + nexusTenantToken: event.telemetryProperties.nexusTenantToken + }; + } + if (!!event.eventContract) { + localEvent.eventContract = { name: event.eventContract.name, dataFields: event.eventContract.dataFields.slice() }; + } + localEvent.dataFields = !!event.dataFields ? event.dataFields.slice() : []; + return localEvent; + } + oteljs.cloneEvent = cloneEvent; +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + var TelemetryEventValidator; + (function (TelemetryEventValidator) { + var INT64_MIN = -9007199254740991; + var INT64_MAX = 9007199254740991; + var StartsWithCapitalRegex = /^[A-Z][a-zA-Z0-9]*$/; + var AlphanumericRegex = /^[a-zA-Z0-9_\.]*$/; + function validateTelemetryEvent(event) { + if (!isEventNameValid(event.eventName)) { + throw new Error('Invalid eventName'); + } + if (event.eventContract && !isEventContractValid(event.eventContract)) { + throw new Error('Invalid eventContract'); + } + if (event.dataFields != null) { + for (var i = 0; i < event.dataFields.length; i++) { + validateDataField(event.dataFields[i]); + } + } + } + TelemetryEventValidator.validateTelemetryEvent = validateTelemetryEvent; + function isNamespaceValid(eventNamePieces) { + return !!eventNamePieces && eventNamePieces.length >= 3 && eventNamePieces[0] === 'Office'; + } + function isEventNodeValid(eventNode) { + return eventNode !== undefined && StartsWithCapitalRegex.test(eventNode); + } + function isEventNameValid(eventName) { + var maxEventNameLength = 98; + if (!eventName || eventName.length > maxEventNameLength) { + return false; + } + var eventNamePieces = eventName.split('.'); + var eventNodeName = eventNamePieces[eventNamePieces.length - 1]; + return isNamespaceValid(eventNamePieces) && isEventNodeValid(eventNodeName); + } + function isEventContractValid(eventContract) { + return isNameValid(eventContract.name); + } + function isDataFieldNameValid(dataFieldName) { + var maxDataFieldNameLength = 100; + var dataFieldPrefixLength = 5; + return !!dataFieldName && isNameValid(dataFieldName) && dataFieldName.length + dataFieldPrefixLength < maxDataFieldNameLength; + } + function isNameValid(name) { + return name !== undefined && AlphanumericRegex.test(name); + } + function validateDataField(dataField) { + if (!isDataFieldNameValid(dataField.name)) { + throw new Error('Invalid dataField name'); + } + if (dataField.dataType === oteljs.DataFieldType.Int64) { + validateInt(dataField.value); + } + } + function validateInt(value) { + if (typeof value !== 'number' || !isFinite(value) || Math.floor(value) !== value || value < INT64_MIN || value > INT64_MAX) { + throw new Error("Invalid integer " + JSON.stringify(value)); + } + } + TelemetryEventValidator.validateInt = validateInt; + })(TelemetryEventValidator = oteljs.TelemetryEventValidator || (oteljs.TelemetryEventValidator = {})); +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + var TokenType; + (function (TokenType) { + TokenType[TokenType["Aria"] = 0] = "Aria"; + TokenType[TokenType["Nexus"] = 1] = "Nexus"; + })(TokenType || (TokenType = {})); + var TenantTokenManager; + (function (TenantTokenManager) { + var ariaTokenMap = {}; + var nexusTokenMap = {}; + var tenantTokens = {}; + function setTenantToken(namespace, ariaTenantToken, nexusTenantToken) { + var parts = namespace.split('.'); + if (parts.length < 2 || parts[0] !== 'Office') { + oteljs.logNotification(oteljs.LogLevel.Error, oteljs.Category.Core, function () { + return "Invalid namespace: " + namespace; + }); + return; + } + var leaf = Object.create(Object.prototype); + if (ariaTenantToken) { + leaf['ariaTenantToken'] = ariaTenantToken; + } + if (nexusTenantToken) { + leaf['nexusTenantToken'] = nexusTenantToken; + } + var node = leaf; + var index; + for (index = parts.length - 1; index >= 0; --index) { + var parentNode = Object.create(Object.prototype); + parentNode[parts[index]] = node; + node = parentNode; + } + setTenantTokens(node); + } + TenantTokenManager.setTenantToken = setTenantToken; + function setTenantTokens(tokenTree) { + if (typeof tokenTree !== 'object') { + throw new Error('tokenTree must be an object'); + } + tenantTokens = mergeTenantTokens(tenantTokens, tokenTree); + } + TenantTokenManager.setTenantTokens = setTenantTokens; + function getTenantTokens(eventName) { + var ariaTenantToken = getAriaTenantToken(eventName); + var nexusTenantToken = getNexusTenantToken(eventName); + if (!nexusTenantToken || !ariaTenantToken) { + throw new Error('Could not find tenant token for ' + eventName); + } + return { + ariaTenantToken: ariaTenantToken, + nexusTenantToken: nexusTenantToken + }; + } + TenantTokenManager.getTenantTokens = getTenantTokens; + function getAriaTenantToken(eventName) { + if (ariaTokenMap[eventName]) { + return ariaTokenMap[eventName]; + } + var ariaToken = getTenantToken(eventName, TokenType.Aria); + if (typeof ariaToken === 'string') { + ariaTokenMap[eventName] = ariaToken; + return ariaToken; + } + return undefined; + } + TenantTokenManager.getAriaTenantToken = getAriaTenantToken; + function getNexusTenantToken(eventName) { + if (nexusTokenMap[eventName]) { + return nexusTokenMap[eventName]; + } + var nexusToken = getTenantToken(eventName, TokenType.Nexus); + if (typeof nexusToken === 'number') { + nexusTokenMap[eventName] = nexusToken; + return nexusToken; + } + return undefined; + } + TenantTokenManager.getNexusTenantToken = getNexusTenantToken; + function getTenantToken(eventName, tokenType) { + var pieces = eventName.split('.'); + var node = tenantTokens; + var token = undefined; + if (!node) { + return undefined; + } + for (var i = 0; i < pieces.length - 1; i++) { + if (node[pieces[i]]) { + node = node[pieces[i]]; + if (tokenType === TokenType.Aria && typeof node.ariaTenantToken === 'string') { + token = node.ariaTenantToken; + } + else if (tokenType === TokenType.Nexus && typeof node.nexusTenantToken === 'number') { + token = node.nexusTenantToken; + } + } + } + return token; + } + function mergeTenantTokens(existingTokenTree, newTokenTree) { + if (typeof newTokenTree !== 'object') { + return newTokenTree; + } + for (var _i = 0, _a = Object.keys(newTokenTree); _i < _a.length; _i++) { + var key = _a[_i]; + if (key in existingTokenTree && typeof (existingTokenTree[key] === 'object')) { + existingTokenTree[key] = mergeTenantTokens(existingTokenTree[key], newTokenTree[key]); + } + else { + existingTokenTree[key] = newTokenTree[key]; + } + } + return existingTokenTree; + } + function clear() { + ariaTokenMap = {}; + nexusTokenMap = {}; + tenantTokens = {}; + } + TenantTokenManager.clear = clear; + })(TenantTokenManager = oteljs.TenantTokenManager || (oteljs.TenantTokenManager = {})); +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + oteljs.oteljsVersion = '3.1.64'; +})(oteljs || (oteljs = {})); +var oteljs; +(function (oteljs) { + var Contracts; + (function (Contracts) { + var Office; + (function (Office) { + var System; + (function (System) { + var SDX; + (function (SDX) { + var contractName = 'Office.System.SDX'; + function getFields(instanceName, contract) { + var dataFields = []; + if (contract.id !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".Id", contract.id)); + } + if (contract.version !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".Version", contract.version)); + } + if (contract.instanceId !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".InstanceId", contract.instanceId)); + } + if (contract.name !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".Name", contract.name)); + } + if (contract.marketplaceType !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".MarketplaceType", contract.marketplaceType)); + } + if (contract.sessionId !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".SessionId", contract.sessionId)); + } + if (contract.browserToken !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".BrowserToken", contract.browserToken)); + } + if (contract.osfRuntimeVersion !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".OsfRuntimeVersion", contract.osfRuntimeVersion)); + } + if (contract.officeJsVersion !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".OfficeJsVersion", contract.officeJsVersion)); + } + if (contract.hostJsVersion !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".HostJsVersion", contract.hostJsVersion)); + } + if (contract.assetId !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".AssetId", contract.assetId)); + } + if (contract.providerName !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".ProviderName", contract.providerName)); + } + if (contract.type !== undefined) { + dataFields.push(oteljs.makeStringDataField(instanceName + ".Type", contract.type)); + } + oteljs.addContractField(dataFields, instanceName, contractName); + return dataFields; + } + SDX.getFields = getFields; + })(SDX = System.SDX || (System.SDX = {})); + })(System = Office.System || (Office.System = {})); + })(Office = Contracts.Office || (Contracts.Office = {})); + })(Contracts = oteljs.Contracts || (oteljs.Contracts = {})); +})(oteljs || (oteljs = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "AgaveVisualApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeBiShim = "BiShim"; + var BiShim = (function (_super) { + __extends(BiShim, _super); + function BiShim() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BiShim.prototype, "_className", { + get: function () { + return "BiShim"; + }, + enumerable: true, + configurable: true + }); + BiShim.prototype.initialize = function (capabilities) { + _invokeMethod(this, "Initialize", 0, [capabilities], 0, 0); + }; + BiShim.prototype.getData = function () { + return _invokeMethod(this, "getData", 1, [], 4, 0); + }; + BiShim.prototype.setVisualObjects = function (visualObjects) { + _invokeMethod(this, "setVisualObjects", 0, [visualObjects], 2, 0); + }; + BiShim.prototype.setVisualObjectsToPersist = function (visualObjectsToPersist) { + _invokeMethod(this, "setVisualObjectsToPersist", 0, [visualObjectsToPersist], 2, 0); + }; + BiShim.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BiShim.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BiShim.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BiShim, context, "Microsoft.AgaveVisual.BiShim", false, 4); + }; + BiShim.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BiShim; + }(OfficeExtension.ClientObject)); + OfficeCore.BiShim = BiShim; + var AgaveVisualErrorCodes; + (function (AgaveVisualErrorCodes) { + AgaveVisualErrorCodes["generalException1"] = "GeneralException"; + })(AgaveVisualErrorCodes = OfficeCore.AgaveVisualErrorCodes || (OfficeCore.AgaveVisualErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "ExperimentApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeFlightingService = "FlightingService"; + var FlightingService = (function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId = function () { + return _invokeMethod(this, "GetClientSessionId", 1, [], 4, 0); + }; + FlightingService.prototype.getDeferredFlights = function () { + return _invokeMethod(this, "GetDeferredFlights", 1, [], 4, 0); + }; + FlightingService.prototype.getFeature = function (featureName, type, defaultValue, possibleValues) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null, 4); + }; + FlightingService.prototype.getFeatureGate = function (featureName, scope) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeatureGate", 1, [featureName, scope], false, false, null, 4); + }; + FlightingService.prototype.resetOverride = function (featureName) { + _invokeMethod(this, "ResetOverride", 0, [featureName], 0, 0); + }; + FlightingService.prototype.setOverride = function (featureName, type, value) { + _invokeMethod(this, "SetOverride", 0, [featureName, type, value], 0, 0); + }; + FlightingService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FlightingService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FlightingService, context, "Microsoft.Experiment.FlightingService", false, 4); + }; + FlightingService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService = FlightingService; + var _typeABType = "ABType"; + var ABType = (function (_super) { + __extends(ABType, _super); + function ABType() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeABType, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + ABType.prototype.load = function (option) { + return _load(this, option); + }; + ABType.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + ABType.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ABType.prototype.toJSON = function () { + return _toJson(this, { + "value": this._V, + }, {}); + }; + ABType.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType = ABType; + var FeatureType; + (function (FeatureType) { + FeatureType["boolean"] = "Boolean"; + FeatureType["integer"] = "Integer"; + FeatureType["string"] = "String"; + })(FeatureType = OfficeCore.FeatureType || (OfficeCore.FeatureType = {})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes["generalException"] = "GeneralException"; + })(ExperimentErrorCodes = OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyDialog; +(function (OfficeFirstPartyDialog) { + var Dialog = (function () { + function Dialog(_dialogService) { + this._dialogService = _dialogService; + } + Dialog.prototype.close = function () { + this._dialogService.close(); + return this._dialogService.context.sync(); + }; + Dialog.prototype.messageChild = function (message, options) { + if (DialogApiManager && DialogApiManager.messageChildRichApiBridge) { + DialogApiManager.messageChildRichApiBridge(message, options); + } + }; + return Dialog; + }()); + OfficeFirstPartyDialog.Dialog = Dialog; + function lookupErrorCodeAndMessage(internalCode) { + var _a; + var table = (_a = {}, + _a[12002] = { code: "InvalidUrl", message: "Cannot load URL, no such page or bad URL syntax." }, + _a[12003] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12004] = { code: "Untrusted", message: "Domain is not trusted." }, + _a[12005] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12007] = { code: "FailedToOpen", message: "Another dialog is already opened." }, + _a); + if (table[internalCode]) { + return table[internalCode]; + } + else { + return { code: "Unknown", message: "An unknown error has occured with code: " + internalCode }; + } + } + function displayWebDialog(url, options) { + if (options === void 0) { options = {}; } + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) { + throw new OfficeExtension.Error({ code: "InvalidArgument", message: 'Dimensions must be "number%" or number.' }); + } + var ctx = new OfficeExtension.ClientRequestContext(); + var dialogService = OfficeCore.FirstPartyDialogService.newObject(ctx); + var dialog = new OfficeFirstPartyDialog.Dialog(dialogService); + var eventResult = dialogService.onDialogMessage.add(function (args) { + OfficeExtension.Utility.log("dialogMessageHandler:" + JSON.stringify(args)); + var parsedMessage = JSON.parse(args.message); + var eventError = parsedMessage.errorCode + ? new OfficeExtension.Error(lookupErrorCodeAndMessage(parsedMessage.errorCode)) + : null; + var messageType = parsedMessage.type; + var origin = parsedMessage.origin; + var messageContent = parsedMessage.message; + switch (messageType) { + case 17: + if (eventError) { + reject(eventError); + } + else { + resolve(dialog); + } + break; + case 12: + if (options.onMessage) { + options.onMessage(messageContent, dialog, origin); + } + break; + case 10: + default: + if (parsedMessage.errorCode === 12006) { + if (eventResult) { + eventResult.remove(); + ctx.sync(); + } + if (options.onClose) { + options.onClose(); + } + } + else { + if (options.onRuntimeError) { + options.onRuntimeError(eventError, dialog); + reject(eventError); + } + } + } + return OfficeExtension.CoreUtility.Promise.resolve(); + }); + return ctx.sync() + .then(function () { + var dialogOptions = { + width: options.width ? parseInt(options.width) : 50, + height: options.height ? parseInt(options.height) : 50, + displayInIFrame: options.displayInIFrame, + dialogTitle: options.dialogTitle + }; + dialogService.displayDialog(url, dialogOptions); + return ctx.sync(); + }) + .catch(function (e) { + reject(e); + }); + }); + function isInt(value) { + return (/^(\-|\+)?([0-9]+)%?$/.test(value)); + } + } + OfficeFirstPartyDialog.displayWebDialog = displayWebDialog; + var DialogEventType; + (function (DialogEventType) { + DialogEventType[DialogEventType["dialogMessageReceived"] = 0] = "dialogMessageReceived"; + DialogEventType[DialogEventType["dialogEventReceived"] = 1] = "dialogEventReceived"; + })(DialogEventType || (DialogEventType = {})); +})(OfficeFirstPartyDialog || (OfficeFirstPartyDialog = {})); +var OfficeCore; +(function (OfficeCore) { + OfficeCore.OfficeOnlineDomainList = [ + "*.dod.online.office365.us", + "*.gov.online.office365.us", + "*.officeapps-df.live.com", + "*.officeapps.live.com", + "*.online.office.de", + "*.partner.officewebapps.cn" + ]; + function isHostOriginTrusted() { + if (typeof window.external === 'undefined' || + typeof window.external.GetContext === 'undefined') { + var hostUrl = OSF.getClientEndPoint()._targetUrl; + var hostname_1 = getHostNameFromUrl(hostUrl); + if (hostUrl.indexOf("https:") != 0) { + return false; + } + OfficeCore.OfficeOnlineDomainList.forEach(function (domain) { + if (domain.indexOf("*.") == 0) { + domain = domain.substring(2); + } + if (hostname_1.indexOf(domain) == hostname_1.length - domain.length) { + return true; + } + }); + return false; + } + return true; + } + OfficeCore.isHostOriginTrusted = isHostOriginTrusted; + function getHostNameFromUrl(url) { + var hostName = ""; + hostName = url.split("/")[2]; + hostName = hostName.split(":")[0]; + hostName = hostName.split("?")[0]; + return hostName; + } +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var FirstPartyApis = (function () { + function FirstPartyApis(context) { + this.context = context; + } + Object.defineProperty(FirstPartyApis.prototype, "roamingSettings", { + get: function () { + if (!this.m_roamingSettings) { + this.m_roamingSettings = OfficeCore.AuthenticationService.newObject(this.context).roamingSettings; + } + return this.m_roamingSettings; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "tap", { + get: function () { + if (!this.m_tap) { + this.m_tap = OfficeCore.Tap.newObject(this.context); + } + return this.m_tap; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "skill", { + get: function () { + if (!this.m_skill) { + this.m_skill = OfficeCore.Skill.newObject(this.context); + } + return this.m_skill; + }, + enumerable: true, + configurable: true + }); + return FirstPartyApis; + }()); + OfficeCore.FirstPartyApis = FirstPartyApis; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + return _super.call(this, url) || this; + } + Object.defineProperty(RequestContext.prototype, "firstParty", { + get: function () { + if (!this.m_firstPartyApis) { + this.m_firstPartyApis = new FirstPartyApis(this); + } + return this.m_firstPartyApis; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry = OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "ribbon", { + get: function () { + if (!this.m_ribbon) { + this.m_ribbon = OfficeCore.DynamicRibbon.newObject(this); + } + return this.m_ribbon; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "bi", { + get: function () { + if (!this.m_biShim) { + this.m_biShim = OfficeCore.BiShim.newObject(this); + } + return this.m_biShim; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService = OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext = RequestContext; + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("OfficeCore.run", arguments, function (requestInfo) { return new OfficeCore.RequestContext(requestInfo); }); + } + OfficeCore.run = run; +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var license; + (function (license_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function isFeatureEnabled(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, isEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isEnabled = license.isFeatureEnabled(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isEnabled.value]; + } + }); + }); + } + license_1.isFeatureEnabled = isFeatureEnabled; + function getFeatureTier(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, tier; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + tier = license.getFeatureTier(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, tier.value]; + } + }); + }); + } + license_1.getFeatureTier = getFeatureTier; + function isFreemiumUpsellEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, license, isFreemiumUpsellEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isFreemiumUpsellEnabled = license.isFreemiumUpsellEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isFreemiumUpsellEnabled.value]; + } + }); + }); + } + license_1.isFreemiumUpsellEnabled = isFreemiumUpsellEnabled; + function launchUpsellExperience(experienceId) { + return __awaiter(this, void 0, void 0, function () { + var context, license; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + license.launchUpsellExperience(experienceId); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + license_1.launchUpsellExperience = launchUpsellExperience; + function onFeatureStateChanged(feature, listener) { + return __awaiter(this, void 0, void 0, function () { + var context, license, licenseFeature, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + licenseFeature = license.getLicenseFeature(feature); + licenseFeature.onStateChanged.add(listener); + removeListener = function () { + licenseFeature.onStateChanged.remove(listener); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + license_1.onFeatureStateChanged = onFeatureStateChanged; + function getMsaDeviceTicket(resource, policy, options) { + return __awaiter(this, void 0, void 0, function () { + var context, license, msaDeviceTicket; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + msaDeviceTicket = license.getMsaDeviceTicket(resource, policy, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, msaDeviceTicket.value]; + } + }); + }); + } + license_1.getMsaDeviceTicket = getMsaDeviceTicket; + })(license = Office.license || (Office.license = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeSkill = "Skill"; + var Skill = (function (_super) { + __extends(Skill, _super); + function Skill() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Skill.prototype, "_className", { + get: function () { + return "Skill"; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.executeAction = function (paneId, actionId, actionDescriptor) { + return _invokeMethod(this, "ExecuteAction", 1, [paneId, actionId, actionDescriptor], 4 | 1, 0); + }; + Skill.prototype.notifyPaneEvent = function (paneId, eventDescriptor) { + _invokeMethod(this, "NotifyPaneEvent", 1, [paneId, eventDescriptor], 4 | 1, 0); + }; + Skill.prototype.registerHostSkillEvent = function () { + _invokeMethod(this, "RegisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype.testFireEvent = function () { + _invokeMethod(this, "TestFireEvent", 0, [], 1, 0); + }; + Skill.prototype.unregisterHostSkillEvent = function () { + _invokeMethod(this, "UnregisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Skill.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Skill.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Skill, context, "Microsoft.SkillApi.Skill", false, 4); + }; + Object.defineProperty(Skill.prototype, "onHostSkillEvent", { + get: function () { + var _this = this; + if (!this.m_hostSkillEvent) { + this.m_hostSkillEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "HostSkillEvent", { + eventType: 65538, + registerFunc: function () { return _this.registerHostSkillEvent(); }, + unregisterFunc: function () { return _this.unregisterHostSkillEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.Skill_HostSkillEvent_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostSkillEvent; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Skill; + }(OfficeExtension.ClientObject)); + OfficeCore.Skill = Skill; + var _CC; + (function (_CC) { + function Skill_HostSkillEvent_EventArgsTransform(thisObj, args) { + var transformedArgs = { + type: args.type, + data: args.data + }; + return transformedArgs; + } + _CC.Skill_HostSkillEvent_EventArgsTransform = Skill_HostSkillEvent_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var SkillErrorCodes; + (function (SkillErrorCodes) { + SkillErrorCodes["generalException"] = "GeneralException"; + })(SkillErrorCodes = OfficeCore.SkillErrorCodes || (OfficeCore.SkillErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "TelemetryApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeTelemetryService = "TelemetryService"; + var TelemetryService = (function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendCustomerContent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _throwIfApiNotSupported("TelemetryService.sendCustomerContent", "Telemetry", "1.3", _hostName); + _invokeMethod(this, "SendCustomerContent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype.sendTelemetryEvent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _invokeMethod(this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + TelemetryService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.TelemetryService, context, "Microsoft.Telemetry.TelemetryService", false, 4); + }; + TelemetryService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService = TelemetryService; + var DataFieldType; + (function (DataFieldType) { + DataFieldType["unset"] = "Unset"; + DataFieldType["string"] = "String"; + DataFieldType["boolean"] = "Boolean"; + DataFieldType["int64"] = "Int64"; + DataFieldType["double"] = "Double"; + })(DataFieldType = OfficeCore.DataFieldType || (OfficeCore.DataFieldType = {})); + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes["generalException"] = "GeneralException"; + })(TelemetryErrorCodes = OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyAuth; +(function (OfficeFirstPartyAuth) { + var WebAuthReplyUrlsStorageKey = "officeWebAuthReplyUrls"; + var loaded = false; + OfficeFirstPartyAuth.authFlow = "authcode"; + OfficeFirstPartyAuth.autoPopup = false; + OfficeFirstPartyAuth.upnCheck = true; + OfficeFirstPartyAuth.msal = "https://alcdn.msauth.net/browser-1p/2.28.1/js/msal-browser-1p.min.js"; + OfficeFirstPartyAuth.debugging = false; + OfficeFirstPartyAuth.delay = 0; + OfficeFirstPartyAuth.delayMsal = 0; + function load(replyUrl, prefetch) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF.WebAuth && OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + var retrievedAuthContext = false; + try { + if (!Office || !Office.context || !Office.context.webAuth) { + reject({ + code: "GetAuthContextAsyncMissing", + message: "Office:[" + !Office + "],Office.context:[" + !Office.context + "],Office.context.webAuth:[" + !Office.context.webAuth + "]" + }); + return; + } + Office.context.webAuth.getAuthContextAsync(function (result) { + if (result.status === "succeeded") { + retrievedAuthContext = true; + var authContext = result.value; + if (!authContext || authContext.isAnonymous) { + reject({ + code: "CannotGetAuthContext", + message: authContext.Error + }); + return; + } + var isMsa = authContext.authorityType.toLowerCase() === 'msa'; + OSF.WebAuth.config = { + authFlow: OfficeFirstPartyAuth.authFlow, + authVersion: (OfficeFirstPartyAuth.authVersion) ? OfficeFirstPartyAuth.authVersion : null, + msal: OfficeFirstPartyAuth.msal, + delayWebAuth: OfficeFirstPartyAuth.delay, + delayMsal: OfficeFirstPartyAuth.delayMsal, + debugging: OfficeFirstPartyAuth.debugging, + authority: (OfficeFirstPartyAuth.authorityOverride) ? OfficeFirstPartyAuth.authorityOverride : authContext.authority, + idp: authContext.authorityType.toLowerCase(), + appIds: [isMsa ? (authContext.msaAppId) ? authContext.msaAppId : authContext.appId : authContext.appId], + redirectUri: (replyUrl) ? replyUrl : null, + upn: authContext.upn, + puid: authContext.userId, + prefetch: prefetch, + telemetryInstance: 'otel', + autoPopup: OfficeFirstPartyAuth.autoPopup, + enableUpnCheck: OfficeFirstPartyAuth.upnCheck, + enableConsoleLogging: OfficeFirstPartyAuth.debugging + }; + OSF.WebAuth.load().then(function (result) { + loaded = true; + logLoadEvent(result, loaded); + resolve(); + }).catch(function (result) { + logLoadEvent(result, loaded); + reject({ + code: "PackageNotLoaded", + message: (result instanceof Event) ? result.type : result + }); + }); + if (OfficeFirstPartyAuth.authFlow === "implicit") { + var finalReplyUrl = (replyUrl) ? replyUrl : window.location.href.split("?")[0]; + var replyUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (replyUrls || replyUrls === "") { + replyUrls = finalReplyUrl; + } + else { + replyUrls += ", " + finalReplyUrl; + } + if (replyUrls) + sessionStorage.setItem(WebAuthReplyUrlsStorageKey, replyUrls); + } + } + else { + OSF.WebAuth.config = null; + reject({ + code: "CannotGetAuthContext", + message: result.status + }); + } + }); + } + catch (e) { + OSF.WebAuth.config = null; + OSF.WebAuth.load().then(function () { + resolve(); + }).catch(function () { + reject({ + code: retrievedAuthContext ? "CannotGetAuthContext" : "FailedToLoad", + message: e + }); + }); + } + } + else { + resolve(); + } + }); + } + OfficeFirstPartyAuth.load = load; + function getAccessToken(options, behaviorOption) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + Office.context.webAuth.getAuthContextAsync(function (result) { + var supportsAuthToken = false; + if (result.status === "succeeded") { + var authContext = result.value; + if (authContext.supportsAuthToken) { + supportsAuthToken = true; + } + } + if (!supportsAuthToken) { + if (OSF.WebAuth && loaded) { + if (OSF.WebAuth.config.appIds[0]) { + OSF.WebAuth.getToken(options.resource, OSF.WebAuth.config.appIds[0], OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : null, (options && options.authChallenge) ? options.authChallenge : null).then(function (result) { + logAcquireEvent(result, true, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + resolve({ + accessToken: result.Token, + tokenIdenityType: (OSF.WebAuth.config.idp.toLowerCase() == "msa") + ? OfficeCore.IdentityType.microsoftAccount + : OfficeCore.IdentityType.organizationAccount + }); + }).catch(function (result) { + logAcquireEvent(result, false, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : false); + reject({ + code: result.ErrorCode, + message: (result instanceof Event) ? result.type : result.ErrorMessage + }); + }); + } + } + else { + logUnexpectedAcquire(loaded, OSF.WebAuth.loadAttempts); + } + } + else { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result_1 = auth.getAccessToken(options, null); + context.sync().then(function () { + resolve(result_1.value); + }); + } + }); + } + else { + var context_1 = new OfficeCore.RequestContext(); + var auth_1 = OfficeCore.AuthenticationService.newObject(context_1); + var handler_1 = auth_1.onTokenReceived.add(function (arg) { + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + handler_1.remove(); + context_1.sync().catch(function () { + }); + if (arg.code == 0) { + resolve(arg.tokenValue); + } + else { + if (OfficeExtension.CoreUtility.isNullOrUndefined(arg.errorInfo)) { + reject({ code: arg.code }); + } + else { + try { + reject(JSON.parse(arg.errorInfo)); + } + catch (e) { + reject({ code: arg.code, message: arg.errorInfo }); + } + } + } + } + return null; + }); + context_1.sync() + .then(function () { + var apiResult = auth_1.getAccessToken(options, auth_1._targetId); + return context_1.sync() + .then(function () { + if (OfficeExtension.CoreUtility.isNullOrUndefined(apiResult.value)) { + return null; + } + var tokenValue = apiResult.value.accessToken; + if (!OfficeExtension.CoreUtility.isNullOrUndefined(tokenValue)) { + resolve(apiResult.value); + } + }); + }) + .catch(function (e) { + reject(e); + }); + } + }); + } + OfficeFirstPartyAuth.getAccessToken = getAccessToken; + function getPrimaryIdentityInfo() { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result = auth.getPrimaryIdentityInfo(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getPrimaryIdentityInfo = getPrimaryIdentityInfo; + function getIdentities() { + var context = new OfficeCore.RequestContext(); + var auth_service = OfficeCore.AuthenticationService.newObject(context); + var result = auth_service.getIdentities(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getIdentities = getIdentities; + function logLoadEvent(result, succeeded) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : "") + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'loadedApplicationCount': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + case 'timeToLoad': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.Load", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logAcquireEvent(result, succeeded, popup) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', { + authFlow: OSF.WebAuth.config.authFlow, + authVersion: OSF.WebAuth.config.authVersion, + msal: OSF.WebAuth.config.msal, + autoPopup: OSF.WebAuth.config.autoPopup, + enableUpnCheck: OSF.WebAuth.config.upnCheck + }), + oteljs.makeBooleanDataField('Popup', (typeof popup === "boolean") ? popup : false), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', (result instanceof Event) ? result.type : result.ErrorCode), + ]; + if (result && !(result instanceof Event) && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'timeToGetToken': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.GetAccessToken", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logUnexpectedAcquire(loadResult, loadAttempts) { + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeBooleanDataField('Loaded', loadResult), + oteljs.makeInt64DataField('LoadAttempts', (typeof loadAttempts === "number") ? loadAttempts : 0) + ]; + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.UnexpectedAcquire", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function loadWebAuthForReplyPage() { + try { + if (typeof (window) === "undefined" || !window.sessionStorage) { + return; + } + var webAuthRedirectUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (webAuthRedirectUrls !== null && webAuthRedirectUrls.indexOf(window.location.origin + window.location.pathname) !== -1) { + load(); + } + } + catch (ex) { + console.error(ex); + } + } + if (typeof (window) !== "undefined" && window.OSF) { + loadWebAuthForReplyPage(); + } +})(OfficeFirstPartyAuth || (OfficeFirstPartyAuth = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var IdentityType; + (function (IdentityType) { + IdentityType["organizationAccount"] = "OrganizationAccount"; + IdentityType["microsoftAccount"] = "MicrosoftAccount"; + IdentityType["unsupported"] = "Unsupported"; + })(IdentityType = OfficeCore.IdentityType || (OfficeCore.IdentityType = {})); + var _typeAuthenticationService = "AuthenticationService"; + var AuthenticationService = (function (_super) { + __extends(AuthenticationService, _super); + function AuthenticationService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AuthenticationService.prototype, "_className", { + get: function () { + return "AuthenticationService"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "_navigationPropertyNames", { + get: function () { + return ["roamingSettings"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "roamingSettings", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.RoamingSettingCollection, this, "RoamingSettings", false, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.getAccessToken = function (tokenParameters, targetId) { + return _invokeMethod(this, "GetAccessToken", 1, [tokenParameters, targetId], 4 | 1, 0); + }; + AuthenticationService.prototype.getIdentities = function () { + _throwIfApiNotSupported("AuthenticationService.getIdentities", "FirstPartyAuthentication", "1.3", _hostName); + return _invokeMethod(this, "GetIdentities", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.getPrimaryIdentityInfo = function () { + _throwIfApiNotSupported("AuthenticationService.getPrimaryIdentityInfo", "FirstPartyAuthentication", "1.2", _hostName); + return _invokeMethod(this, "GetPrimaryIdentityInfo", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.registerIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.registerIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "RegisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype.unregisterIdentityChangedEvent = function () { + _throwIfApiNotSupported("AuthenticationService.unregisterIdentityChangedEvent", "FirstPartyAuthentication", "1.5", _hostName); + _invokeMethod(this, "UnregisterIdentityChangedEvent", 0, [], 1, 0); + }; + AuthenticationService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["roamingSettings", "RoamingSettings"]); + }; + AuthenticationService.prototype.load = function (options) { + return _load(this, options); + }; + AuthenticationService.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + AuthenticationService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AuthenticationService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AuthenticationService, context, "Microsoft.Authentication.AuthenticationService", false, 4); + }; + Object.defineProperty(AuthenticationService.prototype, "onIdentityChanged", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onIdentityChanged", "FirstPartyAuthentication", "1.5", _hostName); + if (!this.m_identityChanged) { + this.m_identityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityChanged", { + eventType: 65545, + registerFunc: function () { return _this.registerIdentityChangedEvent(); }, + unregisterFunc: function () { return _this.unregisterIdentityChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + email: value.email, + environment: value.environment, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "onTokenReceived", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onTokenReceived", "FirstPartyAuthentication", "1.2", _hostName); + if (!this.m_tokenReceived) { + this.m_tokenReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "TokenReceived", { + eventType: 3001, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return _this._targetId; }, + eventArgsTransformFunc: function (value) { + var event = _CC.AuthenticationService_TokenReceived_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_tokenReceived; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AuthenticationService; + }(OfficeExtension.ClientObject)); + OfficeCore.AuthenticationService = AuthenticationService; + var AuthenticationServiceCustom = (function () { + function AuthenticationServiceCustom() { + } + Object.defineProperty(AuthenticationServiceCustom.prototype, "_targetId", { + get: function () { + if (this.m_targetId == undefined) { + if (typeof (OSF) !== 'undefined' && OSF.OUtil) { + this.m_targetId = OSF.OUtil.Guid.generateNewGuid(); + } + else { + this.m_targetId = "" + this.context._nextId(); + } + } + return this.m_targetId; + }, + enumerable: true, + configurable: true + }); + return AuthenticationServiceCustom; + }()); + OfficeCore.AuthenticationServiceCustom = AuthenticationServiceCustom; + OfficeExtension.Utility.applyMixin(AuthenticationService, AuthenticationServiceCustom); + var _CC; + (function (_CC) { + function AuthenticationService_TokenReceived_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + tokenValue: value.tokenValue, + code: value.code, + errorInfo: value.errorInfo + }; + return newArgs; + } + _CC.AuthenticationService_TokenReceived_EventArgsTransform = AuthenticationService_TokenReceived_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeRoamingSetting = "RoamingSetting"; + var RoamingSetting = (function (_super) { + __extends(RoamingSetting, _super); + function RoamingSetting() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSetting.prototype, "_className", { + get: function () { + return "RoamingSetting"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRoamingSetting, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeRoamingSetting, this._isNull); + return this._V; + }, + set: function (value) { + this._V = value; + _invokeSetProperty(this, "Value", value, 0); + }, + enumerable: true, + configurable: true + }); + RoamingSetting.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["value"], [], []); + }; + RoamingSetting.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RoamingSetting.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + RoamingSetting.prototype.load = function (options) { + return _load(this, options); + }; + RoamingSetting.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RoamingSetting.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RoamingSetting.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSetting.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I, + "value": this._V, + }, {}); + }; + RoamingSetting.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RoamingSetting.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RoamingSetting; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSetting = RoamingSetting; + var _typeRoamingSettingCollection = "RoamingSettingCollection"; + var RoamingSettingCollection = (function (_super) { + __extends(RoamingSettingCollection, _super); + function RoamingSettingCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSettingCollection.prototype, "_className", { + get: function () { + return "RoamingSettingCollection"; + }, + enumerable: true, + configurable: true + }); + RoamingSettingCollection.prototype.getItem = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItem", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype.getItemOrNullObject = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItemOrNullObject", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RoamingSettingCollection.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSettingCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RoamingSettingCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSettingCollection = RoamingSettingCollection; + var _typeBeforeDocumentCloseNotification = "BeforeDocumentCloseNotification"; + var BeforeDocumentCloseNotification = (function (_super) { + __extends(BeforeDocumentCloseNotification, _super); + function BeforeDocumentCloseNotification() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "_className", { + get: function () { + return "BeforeDocumentCloseNotification"; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.disable = function () { + _invokeMethod(this, "Disable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype.enable = function () { + _invokeMethod(this, "Enable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BeforeDocumentCloseNotification.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BeforeDocumentCloseNotification.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BeforeDocumentCloseNotification, context, "Microsoft.BeforeDocumentCloseNotification.BeforeDocumentCloseNotification", false, 4); + }; + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "onBeforeCloseNotificationCancelled", { + get: function () { + if (!this.m_beforeCloseNotificationCancelled) { + this.m_beforeCloseNotificationCancelled = new OfficeExtension.GenericEventHandlers(this.context, this, "BeforeCloseNotificationCancelled", { + eventType: 65540, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_beforeCloseNotificationCancelled; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BeforeDocumentCloseNotification; + }(OfficeExtension.ClientObject)); + OfficeCore.BeforeDocumentCloseNotification = BeforeDocumentCloseNotification; + var ServiceProvider; + (function (ServiceProvider) { + ServiceProvider["ariaBrowserPipeUrl"] = "AriaBrowserPipeUrl"; + ServiceProvider["ariaUploadUrl"] = "AriaUploadUrl"; + ServiceProvider["ariaVNextUploadUrl"] = "AriaVNextUploadUrl"; + ServiceProvider["lokiAutoDiscoverUrl"] = "LokiAutoDiscoverUrl"; + })(ServiceProvider = OfficeCore.ServiceProvider || (OfficeCore.ServiceProvider = {})); + var _typeServiceUrlProvider = "ServiceUrlProvider"; + var ServiceUrlProvider = (function (_super) { + __extends(ServiceUrlProvider, _super); + function ServiceUrlProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceUrlProvider.prototype, "_className", { + get: function () { + return "ServiceUrlProvider"; + }, + enumerable: true, + configurable: true + }); + ServiceUrlProvider.prototype.getServiceUrl = function (emailAddress, provider) { + return _invokeMethod(this, "GetServiceUrl", 1, [emailAddress, provider], 4, 0); + }; + ServiceUrlProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceUrlProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceUrlProvider.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceUrlProvider, context, "Microsoft.DesktopCompliance.ServiceUrlProvider", false, 4); + }; + ServiceUrlProvider.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceUrlProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceUrlProvider = ServiceUrlProvider; + var _typeLinkedIn = "LinkedIn"; + var LinkedIn = (function (_super) { + __extends(LinkedIn, _super); + function LinkedIn() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LinkedIn.prototype, "_className", { + get: function () { + return "LinkedIn"; + }, + enumerable: true, + configurable: true + }); + LinkedIn.prototype.isEnabledForOffice = function () { + return _invokeMethod(this, "IsEnabledForOffice", 1, [], 4, 0); + }; + LinkedIn.prototype.recordLinkedInSettingsCompliance = function (featureName, isEnabled) { + _invokeMethod(this, "RecordLinkedInSettingsCompliance", 0, [featureName, isEnabled], 0, 0); + }; + LinkedIn.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LinkedIn.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LinkedIn.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LinkedIn, context, "Microsoft.DesktopCompliance.LinkedIn", false, 4); + }; + LinkedIn.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LinkedIn; + }(OfficeExtension.ClientObject)); + OfficeCore.LinkedIn = LinkedIn; + var _typeNetworkUsage = "NetworkUsage"; + var NetworkUsage = (function (_super) { + __extends(NetworkUsage, _super); + function NetworkUsage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(NetworkUsage.prototype, "_className", { + get: function () { + return "NetworkUsage"; + }, + enumerable: true, + configurable: true + }); + NetworkUsage.prototype.isInDisconnectedMode = function () { + return _invokeMethod(this, "IsInDisconnectedMode", 1, [], 4, 0); + }; + NetworkUsage.prototype.isInOnlineMode = function () { + return _invokeMethod(this, "IsInOnlineMode", 1, [], 4, 0); + }; + NetworkUsage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + NetworkUsage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + NetworkUsage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.NetworkUsage, context, "Microsoft.DesktopCompliance.NetworkUsage", false, 4); + }; + NetworkUsage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return NetworkUsage; + }(OfficeExtension.ClientObject)); + OfficeCore.NetworkUsage = NetworkUsage; + var _typeDynamicRibbon = "DynamicRibbon"; + var DynamicRibbon = (function (_super) { + __extends(DynamicRibbon, _super); + function DynamicRibbon() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DynamicRibbon.prototype, "_className", { + get: function () { + return "DynamicRibbon"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "_navigationPropertyNames", { + get: function () { + return ["buttons"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "buttons", { + get: function () { + if (!this._B) { + this._B = _createPropertyObject(OfficeCore.RibbonButtonCollection, this, "Buttons", true, 4); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + DynamicRibbon.prototype.executeRequestCreate = function (jsonCreate) { + _throwIfApiNotSupported("DynamicRibbon.executeRequestCreate", "DynamicRibbon", "1.2", _hostName); + _invokeMethod(this, "ExecuteRequestCreate", 1, [jsonCreate], 4, 0); + }; + DynamicRibbon.prototype.executeRequestUpdate = function (jsonUpdate) { + _invokeMethod(this, "ExecuteRequestUpdate", 1, [jsonUpdate], 4, 0); + }; + DynamicRibbon.prototype.getButton = function (id) { + return _createMethodObject(OfficeCore.RibbonButton, this, "GetButton", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype.getTab = function (id) { + return _createMethodObject(OfficeCore.RibbonTab, this, "GetTab", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["buttons", "Buttons"]); + }; + DynamicRibbon.prototype.load = function (options) { + return _load(this, options); + }; + DynamicRibbon.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + DynamicRibbon.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DynamicRibbon.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DynamicRibbon, context, "Microsoft.DynamicRibbon.DynamicRibbon", false, 4); + }; + DynamicRibbon.prototype.toJSON = function () { + return _toJson(this, {}, { + "buttons": this._B, + }); + }; + return DynamicRibbon; + }(OfficeExtension.ClientObject)); + OfficeCore.DynamicRibbon = DynamicRibbon; + var _typeRibbonTab = "RibbonTab"; + var RibbonTab = (function (_super) { + __extends(RibbonTab, _super); + function RibbonTab() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonTab.prototype, "_className", { + get: function () { + return "RibbonTab"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonTab, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + RibbonTab.prototype.setVisibility = function (visibility) { + _invokeMethod(this, "SetVisibility", 0, [visibility], 0, 0); + }; + RibbonTab.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + RibbonTab.prototype.load = function (options) { + return _load(this, options); + }; + RibbonTab.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonTab.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonTab.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonTab.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I, + }, {}); + }; + RibbonTab.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonTab.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonTab; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonTab = RibbonTab; + var _typeRibbonButton = "RibbonButton"; + var RibbonButton = (function (_super) { + __extends(RibbonButton, _super); + function RibbonButton() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButton.prototype, "_className", { + get: function () { + return "RibbonButton"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "enabled", "label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Enabled", "Label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "enabled", { + get: function () { + _throwIfNotLoaded("enabled", this._E, _typeRibbonButton, this._isNull); + return this._E; + }, + set: function (value) { + this._E = value; + _invokeSetProperty(this, "Enabled", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonButton, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "label", { + get: function () { + _throwIfNotLoaded("label", this._L, _typeRibbonButton, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + RibbonButton.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["enabled"], [], []); + }; + RibbonButton.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RibbonButton.prototype.setEnabled = function (enabled) { + _invokeMethod(this, "SetEnabled", 0, [enabled], 0, 0); + }; + RibbonButton.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Enabled"])) { + this._E = obj["Enabled"]; + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Label"])) { + this._L = obj["Label"]; + } + }; + RibbonButton.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButton.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButton.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonButton.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonButton.prototype.toJSON = function () { + return _toJson(this, { + "enabled": this._E, + "id": this._I, + "label": this._L, + }, {}); + }; + RibbonButton.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonButton.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonButton; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButton = RibbonButton; + var _typeRibbonButtonCollection = "RibbonButtonCollection"; + var RibbonButtonCollection = (function (_super) { + __extends(RibbonButtonCollection, _super); + function RibbonButtonCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButtonCollection.prototype, "_className", { + get: function () { + return "RibbonButtonCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeRibbonButtonCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + RibbonButtonCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + RibbonButtonCollection.prototype.getItem = function (key) { + return _createIndexerObject(OfficeCore.RibbonButton, this, [key]); + }; + RibbonButtonCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.RibbonButton, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + RibbonButtonCollection.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButtonCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButtonCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }); + }; + RibbonButtonCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + RibbonButtonCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return RibbonButtonCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButtonCollection = RibbonButtonCollection; + var _typeFirstPartyDialogService = "FirstPartyDialogService"; + var FirstPartyDialogService = (function (_super) { + __extends(FirstPartyDialogService, _super); + function FirstPartyDialogService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FirstPartyDialogService.prototype, "_className", { + get: function () { + return "FirstPartyDialogService"; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4 | 1, 0); + }; + FirstPartyDialogService.prototype.displayDialog = function (url, options) { + _invokeMethod(this, "DisplayDialog", 1, [url, options], 4 | 1, 0); + }; + FirstPartyDialogService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FirstPartyDialogService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FirstPartyDialogService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FirstPartyDialogService, context, "Microsoft.FirstPartyDialog.FirstPartyDialogService", false, 4); + }; + Object.defineProperty(FirstPartyDialogService.prototype, "onDialogMessage", { + get: function () { + var _this = this; + if (!this.m_dialogMessage) { + this.m_dialogMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "DialogMessage", { + eventType: 65536, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_dialogMessage; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FirstPartyDialogService; + }(OfficeExtension.ClientObject)); + OfficeCore.FirstPartyDialogService = FirstPartyDialogService; + (function (_CC) { + function FirstPartyDialogService_DialogMessage_EventArgsTransform(thisObj, args) { + return { + message: args.message, + }; + } + _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform = FirstPartyDialogService_DialogMessage_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var TimeStringFormat; + (function (TimeStringFormat) { + TimeStringFormat["shortTime"] = "ShortTime"; + TimeStringFormat["longTime"] = "LongTime"; + TimeStringFormat["shortDate"] = "ShortDate"; + TimeStringFormat["longDate"] = "LongDate"; + })(TimeStringFormat = OfficeCore.TimeStringFormat || (OfficeCore.TimeStringFormat = {})); + var _typeLocaleApi = "LocaleApi"; + var LocaleApi = (function (_super) { + __extends(LocaleApi, _super); + function LocaleApi() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LocaleApi.prototype, "_className", { + get: function () { + return "LocaleApi"; + }, + enumerable: true, + configurable: true + }); + LocaleApi.prototype.formatDateTimeString = function (localeName, value, format) { + return _invokeMethod(this, "FormatDateTimeString", 1, [localeName, value, format], 4, 0); + }; + LocaleApi.prototype.getLocaleDateTimeFormattingInfo = function (localeName) { + return _invokeMethod(this, "GetLocaleDateTimeFormattingInfo", 1, [localeName], 4, 0); + }; + LocaleApi.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LocaleApi.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LocaleApi.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LocaleApi, context, "Microsoft.LocaleApi.LocaleApi", false, 4); + }; + LocaleApi.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LocaleApi; + }(OfficeExtension.ClientObject)); + OfficeCore.LocaleApi = LocaleApi; + var _typeComment = "Comment"; + var Comment = (function (_super) { + __extends(Comment, _super); + function Comment() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Comment.prototype, "_className", { + get: function () { + return "Comment"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "text", "created", "level", "resolved", "author", "mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Text", "Created", "Level", "Resolved", "Author", "Mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false, false, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_navigationPropertyNames", { + get: function () { + return ["parent", "parentOrNullObject", "replies"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parent", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.Comment, this, "Parent", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parentOrNullObject", { + get: function () { + if (!this._Pa) { + this._Pa = _createPropertyObject(OfficeCore.Comment, this, "ParentOrNullObject", false, 4); + } + return this._Pa; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "replies", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.CommentCollection, this, "Replies", true, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "author", { + get: function () { + _throwIfNotLoaded("author", this._A, _typeComment, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "created", { + get: function () { + _throwIfNotLoaded("created", this._C, _typeComment, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeComment, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "level", { + get: function () { + _throwIfNotLoaded("level", this._L, _typeComment, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "mentions", { + get: function () { + _throwIfNotLoaded("mentions", this._M, _typeComment, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "resolved", { + get: function () { + _throwIfNotLoaded("resolved", this._Re, _typeComment, this._isNull); + return this._Re; + }, + set: function (value) { + this._Re = value; + _invokeSetProperty(this, "Resolved", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeComment, this._isNull); + return this._T; + }, + set: function (value) { + this._T = value; + _invokeSetProperty(this, "Text", value, 0); + }, + enumerable: true, + configurable: true + }); + Comment.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["text", "resolved"], [], [ + "parent", + "parentOrNullObject", + "replies" + ]); + }; + Comment.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Comment.prototype.delete = function () { + _invokeMethod(this, "Delete", 0, [], 0, 0); + }; + Comment.prototype.getParentOrSelf = function () { + return _createMethodObject(OfficeCore.Comment, this, "GetParentOrSelf", 1, [], false, false, null, 4); + }; + Comment.prototype.getRichText = function (format) { + return _invokeMethod(this, "GetRichText", 1, [format], 4, 0); + }; + Comment.prototype.reply = function (text, format) { + return _createMethodObject(OfficeCore.Comment, this, "Reply", 0, [text, format], false, false, null, 0); + }; + Comment.prototype.setRichText = function (text, format) { + return _invokeMethod(this, "SetRichText", 0, [text, format], 0, 0); + }; + Comment.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Author"])) { + this._A = obj["Author"]; + } + if (!_isUndefined(obj["Created"])) { + this._C = _adjustToDateTime(obj["Created"]); + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Level"])) { + this._L = obj["Level"]; + } + if (!_isUndefined(obj["Mentions"])) { + this._M = obj["Mentions"]; + } + if (!_isUndefined(obj["Resolved"])) { + this._Re = obj["Resolved"]; + } + if (!_isUndefined(obj["Text"])) { + this._T = obj["Text"]; + } + _handleNavigationPropertyResults(this, obj, ["parent", "Parent", "parentOrNullObject", "ParentOrNullObject", "replies", "Replies"]); + }; + Comment.prototype.load = function (options) { + return _load(this, options); + }; + Comment.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Comment.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + Comment.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Created"])) { + obj["created"] = _adjustToDateTime(obj["created"]); + } + _processRetrieveResult(this, value, result); + }; + Comment.prototype.toJSON = function () { + return _toJson(this, { + "author": this._A, + "created": this._C, + "id": this._I, + "level": this._L, + "mentions": this._M, + "resolved": this._Re, + "text": this._T, + }, { + "replies": this._R, + }); + }; + Comment.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Comment.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Comment; + }(OfficeExtension.ClientObject)); + OfficeCore.Comment = Comment; + var _typeCommentCollection = "CommentCollection"; + var CommentCollection = (function (_super) { + __extends(CommentCollection, _super); + function CommentCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CommentCollection.prototype, "_className", { + get: function () { + return "CommentCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeCommentCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + CommentCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + CommentCollection.prototype.getItem = function (id) { + return _createIndexerObject(OfficeCore.Comment, this, [id]); + }; + CommentCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Comment, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + CommentCollection.prototype.load = function (options) { + return _load(this, options); + }; + CommentCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + CommentCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }); + }; + CommentCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + CommentCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return CommentCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.CommentCollection = CommentCollection; + var _typeExtensionLifeCycle = "ExtensionLifeCycle"; + var ExtensionLifeCycle = (function (_super) { + __extends(ExtensionLifeCycle, _super); + function ExtensionLifeCycle() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ExtensionLifeCycle.prototype, "_className", { + get: function () { + return "ExtensionLifeCycle"; + }, + enumerable: true, + configurable: true + }); + ExtensionLifeCycle.prototype.launchExtensionComponent = function (componentId, componentType, launchProperties) { + _invokeMethod(this, "LaunchExtensionComponent", 1, [componentId, componentType, launchProperties], 4 | 1, 0); + }; + ExtensionLifeCycle.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ExtensionLifeCycle.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ExtensionLifeCycle.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ExtensionLifeCycle, context, "Microsoft.OfficeSharedApi.ExtensionLifeCycle", false, 4); + }; + ExtensionLifeCycle.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ExtensionLifeCycle; + }(OfficeExtension.ClientObject)); + OfficeCore.ExtensionLifeCycle = ExtensionLifeCycle; + var CommentTextFormat; + (function (CommentTextFormat) { + CommentTextFormat["plain"] = "Plain"; + CommentTextFormat["markdown"] = "Markdown"; + CommentTextFormat["delta"] = "Delta"; + })(CommentTextFormat = OfficeCore.CommentTextFormat || (OfficeCore.CommentTextFormat = {})); + var PersonaCardPerfPoint; + (function (PersonaCardPerfPoint) { + PersonaCardPerfPoint["placeHolderRendered"] = "PlaceHolderRendered"; + PersonaCardPerfPoint["initialCardRendered"] = "InitialCardRendered"; + })(PersonaCardPerfPoint = OfficeCore.PersonaCardPerfPoint || (OfficeCore.PersonaCardPerfPoint = {})); + var UnifiedCommunicationAvailability; + (function (UnifiedCommunicationAvailability) { + UnifiedCommunicationAvailability["notSet"] = "NotSet"; + UnifiedCommunicationAvailability["free"] = "Free"; + UnifiedCommunicationAvailability["idle"] = "Idle"; + UnifiedCommunicationAvailability["busy"] = "Busy"; + UnifiedCommunicationAvailability["idleBusy"] = "IdleBusy"; + UnifiedCommunicationAvailability["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationAvailability["unalertable"] = "Unalertable"; + UnifiedCommunicationAvailability["unavailable"] = "Unavailable"; + })(UnifiedCommunicationAvailability = OfficeCore.UnifiedCommunicationAvailability || (OfficeCore.UnifiedCommunicationAvailability = {})); + var UnifiedCommunicationStatus; + (function (UnifiedCommunicationStatus) { + UnifiedCommunicationStatus["online"] = "Online"; + UnifiedCommunicationStatus["notOnline"] = "NotOnline"; + UnifiedCommunicationStatus["away"] = "Away"; + UnifiedCommunicationStatus["busy"] = "Busy"; + UnifiedCommunicationStatus["beRightBack"] = "BeRightBack"; + UnifiedCommunicationStatus["onThePhone"] = "OnThePhone"; + UnifiedCommunicationStatus["outToLunch"] = "OutToLunch"; + UnifiedCommunicationStatus["inAMeeting"] = "InAMeeting"; + UnifiedCommunicationStatus["outOfOffice"] = "OutOfOffice"; + UnifiedCommunicationStatus["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationStatus["inAConference"] = "InAConference"; + UnifiedCommunicationStatus["getting"] = "Getting"; + UnifiedCommunicationStatus["notABuddy"] = "NotABuddy"; + UnifiedCommunicationStatus["disconnected"] = "Disconnected"; + UnifiedCommunicationStatus["notInstalled"] = "NotInstalled"; + UnifiedCommunicationStatus["urgentInterruptionsOnly"] = "UrgentInterruptionsOnly"; + UnifiedCommunicationStatus["mayBeAvailable"] = "MayBeAvailable"; + UnifiedCommunicationStatus["idle"] = "Idle"; + UnifiedCommunicationStatus["inPresentation"] = "InPresentation"; + })(UnifiedCommunicationStatus = OfficeCore.UnifiedCommunicationStatus || (OfficeCore.UnifiedCommunicationStatus = {})); + var UnifiedCommunicationPresence; + (function (UnifiedCommunicationPresence) { + UnifiedCommunicationPresence["free"] = "Free"; + UnifiedCommunicationPresence["busy"] = "Busy"; + UnifiedCommunicationPresence["idle"] = "Idle"; + UnifiedCommunicationPresence["doNotDistrub"] = "DoNotDistrub"; + UnifiedCommunicationPresence["blocked"] = "Blocked"; + UnifiedCommunicationPresence["notSet"] = "NotSet"; + UnifiedCommunicationPresence["outOfOffice"] = "OutOfOffice"; + })(UnifiedCommunicationPresence = OfficeCore.UnifiedCommunicationPresence || (OfficeCore.UnifiedCommunicationPresence = {})); + var FreeBusyCalendarState; + (function (FreeBusyCalendarState) { + FreeBusyCalendarState["unknown"] = "Unknown"; + FreeBusyCalendarState["free"] = "Free"; + FreeBusyCalendarState["busy"] = "Busy"; + FreeBusyCalendarState["elsewhere"] = "Elsewhere"; + FreeBusyCalendarState["tentative"] = "Tentative"; + FreeBusyCalendarState["outOfOffice"] = "OutOfOffice"; + })(FreeBusyCalendarState = OfficeCore.FreeBusyCalendarState || (OfficeCore.FreeBusyCalendarState = {})); + var PersonaType; + (function (PersonaType) { + PersonaType["unknown"] = "Unknown"; + PersonaType["enterprise"] = "Enterprise"; + PersonaType["contact"] = "Contact"; + PersonaType["bot"] = "Bot"; + PersonaType["phoneOnly"] = "PhoneOnly"; + PersonaType["oneOff"] = "OneOff"; + PersonaType["distributionList"] = "DistributionList"; + PersonaType["personalDistributionList"] = "PersonalDistributionList"; + PersonaType["anonymous"] = "Anonymous"; + PersonaType["unifiedGroup"] = "UnifiedGroup"; + })(PersonaType = OfficeCore.PersonaType || (OfficeCore.PersonaType = {})); + var PhoneType; + (function (PhoneType) { + PhoneType["workPhone"] = "WorkPhone"; + PhoneType["homePhone"] = "HomePhone"; + PhoneType["mobilePhone"] = "MobilePhone"; + PhoneType["businessFax"] = "BusinessFax"; + PhoneType["otherPhone"] = "OtherPhone"; + })(PhoneType = OfficeCore.PhoneType || (OfficeCore.PhoneType = {})); + var AddressType; + (function (AddressType) { + AddressType["workAddress"] = "WorkAddress"; + AddressType["homeAddress"] = "HomeAddress"; + AddressType["otherAddress"] = "OtherAddress"; + })(AddressType = OfficeCore.AddressType || (OfficeCore.AddressType = {})); + var MemberType; + (function (MemberType) { + MemberType["unknown"] = "Unknown"; + MemberType["individual"] = "Individual"; + MemberType["group"] = "Group"; + })(MemberType = OfficeCore.MemberType || (OfficeCore.MemberType = {})); + var _typeMemberInfoList = "MemberInfoList"; + var MemberInfoList = (function (_super) { + __extends(MemberInfoList, _super); + function MemberInfoList() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MemberInfoList.prototype, "_className", { + get: function () { + return "MemberInfoList"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typeMemberInfoList, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typeMemberInfoList, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + MemberInfoList.prototype.getPersonaForMember = function (memberCookie) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForMember", 1, [memberCookie], false, false, null, 4); + }; + MemberInfoList.prototype.items = function () { + return _invokeMethod(this, "Items", 1, [], 4, 0); + }; + MemberInfoList.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + }; + MemberInfoList.prototype.load = function (options) { + return _load(this, options); + }; + MemberInfoList.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MemberInfoList.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MemberInfoList.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is, + }, {}); + }; + MemberInfoList.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MemberInfoList.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MemberInfoList; + }(OfficeExtension.ClientObject)); + OfficeCore.MemberInfoList = MemberInfoList; + var PersonaDataUpdated; + (function (PersonaDataUpdated) { + PersonaDataUpdated["hostId"] = "HostId"; + PersonaDataUpdated["type"] = "Type"; + PersonaDataUpdated["photo"] = "Photo"; + PersonaDataUpdated["personaInfo"] = "PersonaInfo"; + PersonaDataUpdated["unifiedCommunicationInfo"] = "UnifiedCommunicationInfo"; + PersonaDataUpdated["organization"] = "Organization"; + PersonaDataUpdated["unifiedGroupInfo"] = "UnifiedGroupInfo"; + PersonaDataUpdated["members"] = "Members"; + PersonaDataUpdated["membership"] = "Membership"; + PersonaDataUpdated["capabilities"] = "Capabilities"; + PersonaDataUpdated["customizations"] = "Customizations"; + PersonaDataUpdated["viewableSources"] = "ViewableSources"; + PersonaDataUpdated["placeholder"] = "Placeholder"; + })(PersonaDataUpdated = OfficeCore.PersonaDataUpdated || (OfficeCore.PersonaDataUpdated = {})); + var _typePersonaActions = "PersonaActions"; + var PersonaActions = (function (_super) { + __extends(PersonaActions, _super); + function PersonaActions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaActions.prototype, "_className", { + get: function () { + return "PersonaActions"; + }, + enumerable: true, + configurable: true + }); + PersonaActions.prototype.addContact = function () { + _invokeMethod(this, "AddContact", 0, [], 0, 0); + }; + PersonaActions.prototype.callPhoneNumber = function (contactNumber) { + _invokeMethod(this, "CallPhoneNumber", 0, [contactNumber], 0, 0); + }; + PersonaActions.prototype.composeEmail = function (emailAddress) { + _invokeMethod(this, "ComposeEmail", 0, [emailAddress], 0, 0); + }; + PersonaActions.prototype.composeInstantMessage = function (sipAddress) { + _invokeMethod(this, "ComposeInstantMessage", 0, [sipAddress], 0, 0); + }; + PersonaActions.prototype.editContact = function () { + _invokeMethod(this, "EditContact", 0, [], 0, 0); + }; + PersonaActions.prototype.editContactByIdentifier = function (identifier) { + _invokeMethod(this, "EditContactByIdentifier", 0, [identifier], 0, 0); + }; + PersonaActions.prototype.editUnifiedGroup = function () { + _invokeMethod(this, "EditUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.getChangePhotoUrlAndOpenInBrowser = function () { + _invokeMethod(this, "GetChangePhotoUrlAndOpenInBrowser", 0, [], 0, 0); + }; + PersonaActions.prototype.hideHoverCardForPersona = function () { + _invokeMethod(this, "HideHoverCardForPersona", 0, [], 0, 0); + }; + PersonaActions.prototype.joinUnifiedGroup = function () { + _invokeMethod(this, "JoinUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.leaveUnifiedGroup = function () { + _invokeMethod(this, "LeaveUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.openGroupCalendar = function () { + _invokeMethod(this, "OpenGroupCalendar", 0, [], 0, 0); + }; + PersonaActions.prototype.openLinkContactUx = function () { + _invokeMethod(this, "OpenLinkContactUx", 0, [], 0, 0); + }; + PersonaActions.prototype.openOutlookProperties = function () { + _invokeMethod(this, "OpenOutlookProperties", 0, [], 0, 0); + }; + PersonaActions.prototype.pinPersonaToQuickContacts = function () { + _invokeMethod(this, "PinPersonaToQuickContacts", 0, [], 0, 0); + }; + PersonaActions.prototype.scheduleMeeting = function () { + _invokeMethod(this, "ScheduleMeeting", 0, [], 0, 0); + }; + PersonaActions.prototype.showContactCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContactCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showContextMenu = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContextMenu", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showExpandedCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowExpandedCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showHoverCardForPersona = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowHoverCardForPersona", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.startAudioCall = function () { + _invokeMethod(this, "StartAudioCall", 0, [], 0, 0); + }; + PersonaActions.prototype.startVideoCall = function () { + _invokeMethod(this, "StartVideoCall", 0, [], 0, 0); + }; + PersonaActions.prototype.subscribeToGroup = function () { + _invokeMethod(this, "SubscribeToGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.toggleTagForAlerts = function () { + _invokeMethod(this, "ToggleTagForAlerts", 0, [], 0, 0); + }; + PersonaActions.prototype.unsubscribeFromGroup = function () { + _invokeMethod(this, "UnsubscribeFromGroup", 0, [], 0, 0); + }; + PersonaActions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaActions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaActions.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaActions; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaActions = PersonaActions; + var _typePersonaInfoSource = "PersonaInfoSource"; + var PersonaInfoSource = (function (_super) { + __extends(PersonaInfoSource, _super); + function PersonaInfoSource() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfoSource.prototype, "_className", { + get: function () { + return "PersonaInfoSource"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "phones", "addresses", "webSites", "notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "Phones", "Addresses", "WebSites", "Notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "addresses", { + get: function () { + _throwIfNotLoaded("addresses", this._A, _typePersonaInfoSource, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfoSource, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfoSource, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfoSource, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfoSource, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfoSource, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfoSource, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfoSource, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfoSource, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfoSource, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfoSource, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfoSource, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfoSource, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfoSource, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "phones", { + get: function () { + _throwIfNotLoaded("phones", this._P, _typePersonaInfoSource, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfoSource, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfoSource, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfoSource, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfoSource.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Addresses"])) { + this._A = obj["Addresses"]; + } + if (!_isUndefined(obj["Birthday"])) { + this._B = obj["Birthday"]; + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = obj["Birthdays"]; + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["Phones"])) { + this._P = obj["Phones"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + }; + PersonaInfoSource.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfoSource.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfoSource.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaInfoSource.prototype.toJSON = function () { + return _toJson(this, { + "addresses": this._A, + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "phones": this._P, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W, + }, {}); + }; + PersonaInfoSource.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfoSource.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfoSource; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfoSource = PersonaInfoSource; + var _typePersonaInfo = "PersonaInfo"; + var PersonaInfo = (function (_super) { + __extends(PersonaInfo, _super); + function PersonaInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfo.prototype, "_className", { + get: function () { + return "PersonaInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "webSites", "notes", "isPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "WebSites", "Notes", "IsPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["sources"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sources", { + get: function () { + if (!this._So) { + this._So = _createPropertyObject(OfficeCore.PersonaInfoSource, this, "Sources", false, 4); + } + return this._So; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfo, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfo, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfo, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfo, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfo, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "isPersonResolved", { + get: function () { + _throwIfNotLoaded("isPersonResolved", this._I, _typePersonaInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfo, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfo, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfo, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfo, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfo, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfo, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfo, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfo.prototype.getAddresses = function () { + return _invokeMethod(this, "GetAddresses", 1, [], 4, 0); + }; + PersonaInfo.prototype.getPhones = function () { + return _invokeMethod(this, "GetPhones", 1, [], 4, 0); + }; + PersonaInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Birthday"])) { + this._B = _adjustToDateTime(obj["Birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = _adjustToDateTime(obj["Birthdays"]); + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["IsPersonResolved"])) { + this._I = obj["IsPersonResolved"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + _handleNavigationPropertyResults(this, obj, ["sources", "Sources"]); + }; + PersonaInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Birthday"])) { + obj["birthday"] = _adjustToDateTime(obj["birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + obj["birthdays"] = _adjustToDateTime(obj["birthdays"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaInfo.prototype.toJSON = function () { + return _toJson(this, { + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "isPersonResolved": this._I, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W, + }, { + "sources": this._So, + }); + }; + PersonaInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfo = PersonaInfo; + var _typePersonaUnifiedCommunicationInfo = "PersonaUnifiedCommunicationInfo"; + var PersonaUnifiedCommunicationInfo = (function (_super) { + __extends(PersonaUnifiedCommunicationInfo, _super); + function PersonaUnifiedCommunicationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_className", { + get: function () { + return "PersonaUnifiedCommunicationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["availability", "status", "isSelf", "isTagged", "customStatusString", "isBlocked", "presenceTooltip", "isOutOfOffice", "outOfOfficeNote", "timezone", "meetingLocation", "meetingSubject", "timezoneBias", "idleStartTime", "overallCapability", "isOnBuddyList", "presenceNote", "voiceMailUri", "availabilityText", "availabilityTooltip", "isDurationInAvailabilityText", "freeBusyStatus", "calendarState", "presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Availability", "Status", "IsSelf", "IsTagged", "CustomStatusString", "IsBlocked", "PresenceTooltip", "IsOutOfOffice", "OutOfOfficeNote", "Timezone", "MeetingLocation", "MeetingSubject", "TimezoneBias", "IdleStartTime", "OverallCapability", "IsOnBuddyList", "PresenceNote", "VoiceMailUri", "AvailabilityText", "AvailabilityTooltip", "IsDurationInAvailabilityText", "FreeBusyStatus", "CalendarState", "Presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availability", { + get: function () { + _throwIfNotLoaded("availability", this._A, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityText", { + get: function () { + _throwIfNotLoaded("availabilityText", this._Av, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Av; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityTooltip", { + get: function () { + _throwIfNotLoaded("availabilityTooltip", this._Ava, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ava; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "calendarState", { + get: function () { + _throwIfNotLoaded("calendarState", this._C, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "customStatusString", { + get: function () { + _throwIfNotLoaded("customStatusString", this._Cu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Cu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "freeBusyStatus", { + get: function () { + _throwIfNotLoaded("freeBusyStatus", this._F, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "idleStartTime", { + get: function () { + _throwIfNotLoaded("idleStartTime", this._I, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isBlocked", { + get: function () { + _throwIfNotLoaded("isBlocked", this._Is, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isDurationInAvailabilityText", { + get: function () { + _throwIfNotLoaded("isDurationInAvailabilityText", this._IsD, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsD; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOnBuddyList", { + get: function () { + _throwIfNotLoaded("isOnBuddyList", this._IsO, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsO; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOutOfOffice", { + get: function () { + _throwIfNotLoaded("isOutOfOffice", this._IsOu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsOu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isSelf", { + get: function () { + _throwIfNotLoaded("isSelf", this._IsS, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsS; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isTagged", { + get: function () { + _throwIfNotLoaded("isTagged", this._IsT, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsT; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingLocation", { + get: function () { + _throwIfNotLoaded("meetingLocation", this._M, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingSubject", { + get: function () { + _throwIfNotLoaded("meetingSubject", this._Me, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Me; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "outOfOfficeNote", { + get: function () { + _throwIfNotLoaded("outOfOfficeNote", this._O, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "overallCapability", { + get: function () { + _throwIfNotLoaded("overallCapability", this._Ov, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ov; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presence", { + get: function () { + _throwIfNotLoaded("presence", this._P, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceNote", { + get: function () { + _throwIfNotLoaded("presenceNote", this._Pr, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pr; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceTooltip", { + get: function () { + _throwIfNotLoaded("presenceTooltip", this._Pre, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pre; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "status", { + get: function () { + _throwIfNotLoaded("status", this._S, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezone", { + get: function () { + _throwIfNotLoaded("timezone", this._T, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezoneBias", { + get: function () { + _throwIfNotLoaded("timezoneBias", this._Ti, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ti; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "voiceMailUri", { + get: function () { + _throwIfNotLoaded("voiceMailUri", this._V, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + PersonaUnifiedCommunicationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Availability"])) { + this._A = obj["Availability"]; + } + if (!_isUndefined(obj["AvailabilityText"])) { + this._Av = obj["AvailabilityText"]; + } + if (!_isUndefined(obj["AvailabilityTooltip"])) { + this._Ava = obj["AvailabilityTooltip"]; + } + if (!_isUndefined(obj["CalendarState"])) { + this._C = obj["CalendarState"]; + } + if (!_isUndefined(obj["CustomStatusString"])) { + this._Cu = obj["CustomStatusString"]; + } + if (!_isUndefined(obj["FreeBusyStatus"])) { + this._F = obj["FreeBusyStatus"]; + } + if (!_isUndefined(obj["IdleStartTime"])) { + this._I = _adjustToDateTime(obj["IdleStartTime"]); + } + if (!_isUndefined(obj["IsBlocked"])) { + this._Is = obj["IsBlocked"]; + } + if (!_isUndefined(obj["IsDurationInAvailabilityText"])) { + this._IsD = obj["IsDurationInAvailabilityText"]; + } + if (!_isUndefined(obj["IsOnBuddyList"])) { + this._IsO = obj["IsOnBuddyList"]; + } + if (!_isUndefined(obj["IsOutOfOffice"])) { + this._IsOu = obj["IsOutOfOffice"]; + } + if (!_isUndefined(obj["IsSelf"])) { + this._IsS = obj["IsSelf"]; + } + if (!_isUndefined(obj["IsTagged"])) { + this._IsT = obj["IsTagged"]; + } + if (!_isUndefined(obj["MeetingLocation"])) { + this._M = obj["MeetingLocation"]; + } + if (!_isUndefined(obj["MeetingSubject"])) { + this._Me = obj["MeetingSubject"]; + } + if (!_isUndefined(obj["OutOfOfficeNote"])) { + this._O = obj["OutOfOfficeNote"]; + } + if (!_isUndefined(obj["OverallCapability"])) { + this._Ov = obj["OverallCapability"]; + } + if (!_isUndefined(obj["Presence"])) { + this._P = obj["Presence"]; + } + if (!_isUndefined(obj["PresenceNote"])) { + this._Pr = obj["PresenceNote"]; + } + if (!_isUndefined(obj["PresenceTooltip"])) { + this._Pre = obj["PresenceTooltip"]; + } + if (!_isUndefined(obj["Status"])) { + this._S = obj["Status"]; + } + if (!_isUndefined(obj["Timezone"])) { + this._T = obj["Timezone"]; + } + if (!_isUndefined(obj["TimezoneBias"])) { + this._Ti = obj["TimezoneBias"]; + } + if (!_isUndefined(obj["VoiceMailUri"])) { + this._V = obj["VoiceMailUri"]; + } + }; + PersonaUnifiedCommunicationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaUnifiedCommunicationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaUnifiedCommunicationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["IdleStartTime"])) { + obj["idleStartTime"] = _adjustToDateTime(obj["idleStartTime"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaUnifiedCommunicationInfo.prototype.toJSON = function () { + return _toJson(this, { + "availability": this._A, + "availabilityText": this._Av, + "availabilityTooltip": this._Ava, + "calendarState": this._C, + "customStatusString": this._Cu, + "freeBusyStatus": this._F, + "idleStartTime": this._I, + "isBlocked": this._Is, + "isDurationInAvailabilityText": this._IsD, + "isOnBuddyList": this._IsO, + "isOutOfOffice": this._IsOu, + "isSelf": this._IsS, + "isTagged": this._IsT, + "meetingLocation": this._M, + "meetingSubject": this._Me, + "outOfOfficeNote": this._O, + "overallCapability": this._Ov, + "presence": this._P, + "presenceNote": this._Pr, + "presenceTooltip": this._Pre, + "status": this._S, + "timezone": this._T, + "timezoneBias": this._Ti, + "voiceMailUri": this._V, + }, {}); + }; + PersonaUnifiedCommunicationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaUnifiedCommunicationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaUnifiedCommunicationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaUnifiedCommunicationInfo = PersonaUnifiedCommunicationInfo; + var _typePersonaPhotoInfo = "PersonaPhotoInfo"; + var PersonaPhotoInfo = (function (_super) { + __extends(PersonaPhotoInfo, _super); + function PersonaPhotoInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaPhotoInfo.prototype, "_className", { + get: function () { + return "PersonaPhotoInfo"; + }, + enumerable: true, + configurable: true + }); + PersonaPhotoInfo.prototype.getImageUri = function (uriScheme) { + return _invokeMethod(this, "getImageUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getImageUriWithMetadata = function (uriScheme) { + return _invokeMethod(this, "getImageUriWithMetadata", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getPlaceholderUri = function (uriScheme) { + return _invokeMethod(this, "getPlaceholderUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.setPlaceholderColor = function (color) { + _invokeMethod(this, "setPlaceholderColor", 0, [color], 0, 0); + }; + PersonaPhotoInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaPhotoInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaPhotoInfo.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaPhotoInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaPhotoInfo = PersonaPhotoInfo; + var _typePersonaCollection = "PersonaCollection"; + var PersonaCollection = (function (_super) { + __extends(PersonaCollection, _super); + function PersonaCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaCollection.prototype, "_className", { + get: function () { + return "PersonaCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typePersonaCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + PersonaCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + PersonaCollection.prototype.getItem = function (index) { + return _createIndexerObject(OfficeCore.Persona, this, [index]); + }; + PersonaCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Persona, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + PersonaCollection.prototype.load = function (options) { + return _load(this, options); + }; + PersonaCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }); + }; + PersonaCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + PersonaCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return PersonaCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaCollection = PersonaCollection; + var _typePersonaOrganizationInfo = "PersonaOrganizationInfo"; + var PersonaOrganizationInfo = (function (_super) { + __extends(PersonaOrganizationInfo, _super); + function PersonaOrganizationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaOrganizationInfo.prototype, "_className", { + get: function () { + return "PersonaOrganizationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["hierarchy", "manager", "directReports"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "directReports", { + get: function () { + if (!this._D) { + this._D = _createPropertyObject(OfficeCore.PersonaCollection, this, "DirectReports", true, 4); + } + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "hierarchy", { + get: function () { + if (!this._H) { + this._H = _createPropertyObject(OfficeCore.PersonaCollection, this, "Hierarchy", true, 4); + } + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "manager", { + get: function () { + if (!this._M) { + this._M = _createPropertyObject(OfficeCore.Persona, this, "Manager", false, 4); + } + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typePersonaOrganizationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typePersonaOrganizationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + PersonaOrganizationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + _handleNavigationPropertyResults(this, obj, ["directReports", "DirectReports", "hierarchy", "Hierarchy", "manager", "Manager"]); + }; + PersonaOrganizationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaOrganizationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaOrganizationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaOrganizationInfo.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is, + }, {}); + }; + PersonaOrganizationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaOrganizationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaOrganizationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaOrganizationInfo = PersonaOrganizationInfo; + var CustomizedData; + (function (CustomizedData) { + CustomizedData["email"] = "Email"; + CustomizedData["workPhone"] = "WorkPhone"; + CustomizedData["workPhone2"] = "WorkPhone2"; + CustomizedData["workFax"] = "WorkFax"; + CustomizedData["mobilePhone"] = "MobilePhone"; + CustomizedData["homePhone"] = "HomePhone"; + CustomizedData["homePhone2"] = "HomePhone2"; + CustomizedData["otherPhone"] = "OtherPhone"; + CustomizedData["sipAddress"] = "SipAddress"; + CustomizedData["profile"] = "Profile"; + CustomizedData["office"] = "Office"; + CustomizedData["company"] = "Company"; + CustomizedData["workAddress"] = "WorkAddress"; + CustomizedData["homeAddress"] = "HomeAddress"; + CustomizedData["otherAddress"] = "OtherAddress"; + CustomizedData["birthday"] = "Birthday"; + })(CustomizedData = OfficeCore.CustomizedData || (OfficeCore.CustomizedData = {})); + var _typeUnifiedGroupInfo = "UnifiedGroupInfo"; + var UnifiedGroupInfo = (function (_super) { + __extends(UnifiedGroupInfo, _super); + function UnifiedGroupInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UnifiedGroupInfo.prototype, "_className", { + get: function () { + return "UnifiedGroupInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Description", "OneDrive", "OneNote", "IsPublic", "AmIOwner", "AmIMember", "AmISubscribed", "MemberCount", "OwnerCount", "HasGuests", "Site", "Planner", "Classification", "SubscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIMember", { + get: function () { + _throwIfNotLoaded("amIMember", this._A, _typeUnifiedGroupInfo, this._isNull); + return this._A; + }, + set: function (value) { + this._A = value; + _invokeSetProperty(this, "AmIMember", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIOwner", { + get: function () { + _throwIfNotLoaded("amIOwner", this._Am, _typeUnifiedGroupInfo, this._isNull); + return this._Am; + }, + set: function (value) { + this._Am = value; + _invokeSetProperty(this, "AmIOwner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amISubscribed", { + get: function () { + _throwIfNotLoaded("amISubscribed", this._AmI, _typeUnifiedGroupInfo, this._isNull); + return this._AmI; + }, + set: function (value) { + this._AmI = value; + _invokeSetProperty(this, "AmISubscribed", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "classification", { + get: function () { + _throwIfNotLoaded("classification", this._C, _typeUnifiedGroupInfo, this._isNull); + return this._C; + }, + set: function (value) { + this._C = value; + _invokeSetProperty(this, "Classification", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "description", { + get: function () { + _throwIfNotLoaded("description", this._D, _typeUnifiedGroupInfo, this._isNull); + return this._D; + }, + set: function (value) { + this._D = value; + _invokeSetProperty(this, "Description", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "hasGuests", { + get: function () { + _throwIfNotLoaded("hasGuests", this._H, _typeUnifiedGroupInfo, this._isNull); + return this._H; + }, + set: function (value) { + this._H = value; + _invokeSetProperty(this, "HasGuests", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "isPublic", { + get: function () { + _throwIfNotLoaded("isPublic", this._I, _typeUnifiedGroupInfo, this._isNull); + return this._I; + }, + set: function (value) { + this._I = value; + _invokeSetProperty(this, "IsPublic", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "memberCount", { + get: function () { + _throwIfNotLoaded("memberCount", this._M, _typeUnifiedGroupInfo, this._isNull); + return this._M; + }, + set: function (value) { + this._M = value; + _invokeSetProperty(this, "MemberCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneDrive", { + get: function () { + _throwIfNotLoaded("oneDrive", this._O, _typeUnifiedGroupInfo, this._isNull); + return this._O; + }, + set: function (value) { + this._O = value; + _invokeSetProperty(this, "OneDrive", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneNote", { + get: function () { + _throwIfNotLoaded("oneNote", this._On, _typeUnifiedGroupInfo, this._isNull); + return this._On; + }, + set: function (value) { + this._On = value; + _invokeSetProperty(this, "OneNote", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "ownerCount", { + get: function () { + _throwIfNotLoaded("ownerCount", this._Ow, _typeUnifiedGroupInfo, this._isNull); + return this._Ow; + }, + set: function (value) { + this._Ow = value; + _invokeSetProperty(this, "OwnerCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "planner", { + get: function () { + _throwIfNotLoaded("planner", this._P, _typeUnifiedGroupInfo, this._isNull); + return this._P; + }, + set: function (value) { + this._P = value; + _invokeSetProperty(this, "Planner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "site", { + get: function () { + _throwIfNotLoaded("site", this._S, _typeUnifiedGroupInfo, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Site", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "subscriptionEnabled", { + get: function () { + _throwIfNotLoaded("subscriptionEnabled", this._Su, _typeUnifiedGroupInfo, this._isNull); + return this._Su; + }, + set: function (value) { + this._Su = value; + _invokeSetProperty(this, "SubscriptionEnabled", value, 0); + }, + enumerable: true, + configurable: true + }); + UnifiedGroupInfo.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"], [], []); + }; + UnifiedGroupInfo.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + UnifiedGroupInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["AmIMember"])) { + this._A = obj["AmIMember"]; + } + if (!_isUndefined(obj["AmIOwner"])) { + this._Am = obj["AmIOwner"]; + } + if (!_isUndefined(obj["AmISubscribed"])) { + this._AmI = obj["AmISubscribed"]; + } + if (!_isUndefined(obj["Classification"])) { + this._C = obj["Classification"]; + } + if (!_isUndefined(obj["Description"])) { + this._D = obj["Description"]; + } + if (!_isUndefined(obj["HasGuests"])) { + this._H = obj["HasGuests"]; + } + if (!_isUndefined(obj["IsPublic"])) { + this._I = obj["IsPublic"]; + } + if (!_isUndefined(obj["MemberCount"])) { + this._M = obj["MemberCount"]; + } + if (!_isUndefined(obj["OneDrive"])) { + this._O = obj["OneDrive"]; + } + if (!_isUndefined(obj["OneNote"])) { + this._On = obj["OneNote"]; + } + if (!_isUndefined(obj["OwnerCount"])) { + this._Ow = obj["OwnerCount"]; + } + if (!_isUndefined(obj["Planner"])) { + this._P = obj["Planner"]; + } + if (!_isUndefined(obj["Site"])) { + this._S = obj["Site"]; + } + if (!_isUndefined(obj["SubscriptionEnabled"])) { + this._Su = obj["SubscriptionEnabled"]; + } + }; + UnifiedGroupInfo.prototype.load = function (options) { + return _load(this, options); + }; + UnifiedGroupInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + UnifiedGroupInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UnifiedGroupInfo.prototype.toJSON = function () { + return _toJson(this, { + "amIMember": this._A, + "amIOwner": this._Am, + "amISubscribed": this._AmI, + "classification": this._C, + "description": this._D, + "hasGuests": this._H, + "isPublic": this._I, + "memberCount": this._M, + "oneDrive": this._O, + "oneNote": this._On, + "ownerCount": this._Ow, + "planner": this._P, + "site": this._S, + "subscriptionEnabled": this._Su, + }, {}); + }; + UnifiedGroupInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + UnifiedGroupInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return UnifiedGroupInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.UnifiedGroupInfo = UnifiedGroupInfo; + var _typePersona = "Persona"; + var PersonaPromiseType; + (function (PersonaPromiseType) { + PersonaPromiseType[PersonaPromiseType["immediate"] = 0] = "immediate"; + PersonaPromiseType[PersonaPromiseType["load"] = 3] = "load"; + })(PersonaPromiseType = OfficeCore.PersonaPromiseType || (OfficeCore.PersonaPromiseType = {})); + var PersonaInfoAndSource = (function () { + function PersonaInfoAndSource() { + } + return PersonaInfoAndSource; + }()); + OfficeCore.PersonaInfoAndSource = PersonaInfoAndSource; + ; + var Persona = (function (_super) { + __extends(Persona, _super); + function Persona() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Persona.prototype, "_className", { + get: function () { + return "Persona"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyNames", { + get: function () { + return ["hostId", "type", "capabilities", "diagnosticId", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["HostId", "Type", "Capabilities", "DiagnosticId", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_navigationPropertyNames", { + get: function () { + return ["photo", "personaInfo", "unifiedCommunicationInfo", "organization", "unifiedGroupInfo", "actions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "actions", { + get: function () { + if (!this._A) { + this._A = _createPropertyObject(OfficeCore.PersonaActions, this, "Actions", false, 4); + } + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "organization", { + get: function () { + if (!this._O) { + this._O = _createPropertyObject(OfficeCore.PersonaOrganizationInfo, this, "Organization", false, 4); + } + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "personaInfo", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.PersonaInfo, this, "PersonaInfo", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "photo", { + get: function () { + if (!this._Ph) { + this._Ph = _createPropertyObject(OfficeCore.PersonaPhotoInfo, this, "Photo", false, 4); + } + return this._Ph; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedCommunicationInfo", { + get: function () { + if (!this._U) { + this._U = _createPropertyObject(OfficeCore.PersonaUnifiedCommunicationInfo, this, "UnifiedCommunicationInfo", false, 4); + } + return this._U; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedGroupInfo", { + get: function () { + if (!this._Un) { + this._Un = _createPropertyObject(OfficeCore.UnifiedGroupInfo, this, "UnifiedGroupInfo", false, 4); + } + return this._Un; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "capabilities", { + get: function () { + _throwIfNotLoaded("capabilities", this._C, _typePersona, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "diagnosticId", { + get: function () { + _throwIfNotLoaded("diagnosticId", this._D, _typePersona, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "hostId", { + get: function () { + _throwIfNotLoaded("hostId", this._H, _typePersona, this._isNull); + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersona, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typePersona, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Persona.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, [], ["unifiedGroupInfo"], [ + "actions", + "organization", + "personaInfo", + "photo", + "unifiedCommunicationInfo" + ]); + }; + Persona.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Persona.prototype.dispose = function () { + _invokeMethod(this, "Dispose", 0, [], 0, 0); + }; + Persona.prototype.getCustomizations = function () { + return _invokeMethod(this, "GetCustomizations", 1, [], 4, 0); + }; + Persona.prototype.getMembers = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembers", 1, [], false, false, null, 4); + }; + Persona.prototype.getMembership = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembership", 1, [], false, false, null, 4); + }; + Persona.prototype.getViewableSources = function () { + return _invokeMethod(this, "GetViewableSources", 1, [], 4, 0); + }; + Persona.prototype.reportTimeForRender = function (perfpoint, millisecUTC) { + _invokeMethod(this, "ReportTimeForRender", 0, [perfpoint, millisecUTC], 0, 0); + }; + Persona.prototype.warmup = function (dataToWarmUp) { + _invokeMethod(this, "Warmup", 0, [dataToWarmUp], 0, 0); + }; + Persona.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Capabilities"])) { + this._C = obj["Capabilities"]; + } + if (!_isUndefined(obj["DiagnosticId"])) { + this._D = obj["DiagnosticId"]; + } + if (!_isUndefined(obj["HostId"])) { + this._H = obj["HostId"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + if (!_isUndefined(obj["Type"])) { + this._T = obj["Type"]; + } + _handleNavigationPropertyResults(this, obj, ["actions", "Actions", "organization", "Organization", "personaInfo", "PersonaInfo", "photo", "Photo", "unifiedCommunicationInfo", "UnifiedCommunicationInfo", "unifiedGroupInfo", "UnifiedGroupInfo"]); + }; + Persona.prototype.load = function (options) { + return _load(this, options); + }; + Persona.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Persona.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Persona.prototype.toJSON = function () { + return _toJson(this, { + "capabilities": this._C, + "diagnosticId": this._D, + "hostId": this._H, + "instanceId": this._I, + "type": this._T, + }, { + "organization": this._O, + "personaInfo": this._P, + "unifiedCommunicationInfo": this._U, + "unifiedGroupInfo": this._Un, + }); + }; + Persona.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Persona.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Persona; + }(OfficeExtension.ClientObject)); + OfficeCore.Persona = Persona; + var PersonaCustom = (function () { + function PersonaCustom() { + } + PersonaCustom.prototype.performAsyncOperation = function (type, waitFor, action, check) { + var _this = this; + if (type == PersonaPromiseType.immediate) { + action(); + return; + } + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + } + else { + var persona = _this; + persona.load("hostId"); + persona.context.sync().then(function () { + var hostId = persona.hostId; + _this.getPersonaLifetime().then(function (personaLifetime) { + var eventHandler = function (args) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (args.sendingPersonaHostId == hostId) { + for (var index = 0; index < args.dataUpdated.length; ++index) { + var updated = args.dataUpdated[index]; + if (waitFor == updated) { + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + personaLifetime.onPersonaUpdated.remove(eventHandler); + persona.context.sync(); + } + resolve(isWarmedUp); + }); + return; + } + } + } + resolve(false); + }); + }; + personaLifetime.onPersonaUpdated.add(eventHandler); + persona.context.sync(); + }); + }); + } + }); + }; + PersonaCustom.prototype.getOrganizationAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var organization = persona.organization; + organization.load("*"); + persona.context.sync().then(function () { + resolve(organization); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var organization = persona.organization; + organization.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(organization.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.organization, action, check); + }); + }; + PersonaCustom.prototype.getIsPersonaInfoResolvedCheck = function () { + var persona = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var info = persona.personaInfo; + info.load("isPersonResolved"); + persona.context.sync().then(function () { + resolve(info.isPersonResolved); + }); + }); + }; + PersonaCustom.prototype.getPersonaInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var info = persona.personaInfo; + info.load(); + persona.context.sync().then(function () { + resolve(info); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getPersonaInfoWithSourceAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var result = new PersonaInfoAndSource(); + result.info = persona.personaInfo; + result.info.load(); + result.source = persona.personaInfo.sources; + result.source.load(); + persona.context.sync().then(function () { + resolve(result); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedCommunicationInfo = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var ucInfo = persona.unifiedCommunicationInfo; + ucInfo.load("*"); + persona.context.sync().then(function () { + resolve(ucInfo); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedGroupInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var group = persona.unifiedGroupInfo; + group.load("*"); + persona.context.sync().then(function () { + resolve(group); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getTypeAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + persona.load("type"); + persona.context.sync().then(function () { + resolve(OfficeCore.PersonaType[persona.type.valueOf()]); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getCustomizationsAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var customizations = persona.getCustomizations(); + persona.context.sync().then(function () { + resolve(customizations.value); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getMembersAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, rejcet) { + var persona = _this; + var action = function () { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + resolve(members); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(members.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.members, action, check); + }); + }; + PersonaCustom.prototype.getMembershipAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var membership = persona.getMembership(); + membership.load("*"); + persona.context.sync().then(function () { + resolve(membership); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve) { + var membership = persona.getMembership(); + membership.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(membership.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.membership, action, check); + }); + }; + PersonaCustom.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + persona.load("instanceId"); + persona.context.sync().then(function () { + var peopleApi = new PeopleApiContext(persona.context, persona.instanceId); + peopleApi.getPersonaLifetime().then(function (lifetime) { + resolve(lifetime); + }); + }); + }); + }; + return PersonaCustom; + }()); + OfficeCore.PersonaCustom = PersonaCustom; + OfficeExtension.Utility.applyMixin(Persona, PersonaCustom); + var _typePersonaLifetime = "PersonaLifetime"; + var PersonaLifetime = (function (_super) { + __extends(PersonaLifetime, _super); + function PersonaLifetime() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaLifetime.prototype, "_className", { + get: function () { + return "PersonaLifetime"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyNames", { + get: function () { + return ["instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersonaLifetime, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.getPersona = function (hostId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersona", 1, [hostId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgByEntryId = function (entryId, name, sip, smtp) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgByEntryId", 1, [entryId, name, sip, smtp], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgEntry = function (name, sip, smtp, entryId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgEntry", 1, [name, sip, smtp, entryId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPolicies = function () { + return _invokeMethod(this, "GetPolicies", 1, [], 4, 0); + }; + PersonaLifetime.prototype.getTextScaleFactor = function () { + return _invokeMethod(this, "GetTextScaleFactor", 1, [], 4, 0); + }; + PersonaLifetime.prototype._RegisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_RegisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._UnregisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_UnregisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + PersonaLifetime.prototype.load = function (options) { + return _load(this, options); + }; + PersonaLifetime.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaLifetime.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(PersonaLifetime.prototype, "onPersonaUpdated", { + get: function () { + var _this = this; + if (!this.m_personaUpdated) { + this.m_personaUpdated = new OfficeExtension.GenericEventHandlers(this.context, this, "PersonaUpdated", { + eventType: 3502, + registerFunc: function () { return _this._RegisterPersonaUpdatedEvent(); }, + unregisterFunc: function () { return _this._UnregisterPersonaUpdatedEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + dataUpdated: value.dataUpdated, + sendingPersonaHostId: value.sendingPersonaHostId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_personaUpdated; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.toJSON = function () { + return _toJson(this, { + "instanceId": this._I, + }, {}); + }; + PersonaLifetime.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaLifetime.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaLifetime; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaLifetime = PersonaLifetime; + var _typeLokiTokenProvider = "LokiTokenProvider"; + var LokiTokenProvider = (function (_super) { + __extends(LokiTokenProvider, _super); + function LokiTokenProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProvider.prototype, "_className", { + get: function () { + return "LokiTokenProvider"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyNames", { + get: function () { + return ["emailOrUpn", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["EmailOrUpn", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "emailOrUpn", { + get: function () { + _throwIfNotLoaded("emailOrUpn", this._E, _typeLokiTokenProvider, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typeLokiTokenProvider, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.requestClientAccessToken = function () { + _invokeMethod(this, "RequestClientAccessToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestIdentityUniqueId = function () { + _invokeMethod(this, "RequestIdentityUniqueId", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestToken = function () { + _invokeMethod(this, "RequestToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_RegisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_UnregisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["EmailOrUpn"])) { + this._E = obj["EmailOrUpn"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + LokiTokenProvider.prototype.load = function (options) { + return _load(this, options); + }; + LokiTokenProvider.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LokiTokenProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LokiTokenProvider.prototype, "onClientAccessTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_clientAccessTokenAvailable) { + this.m_clientAccessTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "ClientAccessTokenAvailable", { + eventType: 3505, + registerFunc: function () { return _this._RegisterClientAccessTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterClientAccessTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + clientAccessToken: value.clientAccessToken, + isAvailable: value.isAvailable, + tokenTTLInSeconds: value.tokenTTLInSeconds + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_clientAccessTokenAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onIdentityUniqueIdAvailable", { + get: function () { + var _this = this; + if (!this.m_identityUniqueIdAvailable) { + this.m_identityUniqueIdAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityUniqueIdAvailable", { + eventType: 3504, + registerFunc: function () { return _this._RegisterIdentityUniqueIdAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterIdentityUniqueIdAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityUniqueIdAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onLokiTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_lokiTokenAvailable) { + this.m_lokiTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "LokiTokenAvailable", { + eventType: 3503, + registerFunc: function () { return _this._RegisterLokiTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterLokiTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + lokiAutoDiscoverUrl: value.lokiAutoDiscoverUrl, + lokiToken: value.lokiToken + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_lokiTokenAvailable; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.toJSON = function () { + return _toJson(this, { + "emailOrUpn": this._E, + "instanceId": this._I, + }, {}); + }; + LokiTokenProvider.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LokiTokenProvider.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LokiTokenProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProvider = LokiTokenProvider; + var _typeLokiTokenProviderFactory = "LokiTokenProviderFactory"; + var LokiTokenProviderFactory = (function (_super) { + __extends(LokiTokenProviderFactory, _super); + function LokiTokenProviderFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProviderFactory.prototype, "_className", { + get: function () { + return "LokiTokenProviderFactory"; + }, + enumerable: true, + configurable: true + }); + LokiTokenProviderFactory.prototype.getLokiTokenProvider = function (accountName) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [accountName], false, false, null, 4); + }; + LokiTokenProviderFactory.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LokiTokenProviderFactory.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LokiTokenProviderFactory.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LokiTokenProviderFactory, context, "Microsoft.People.LokiTokenProviderFactory", false, 4); + }; + LokiTokenProviderFactory.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LokiTokenProviderFactory; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProviderFactory = LokiTokenProviderFactory; + var _typeServiceContext = "ServiceContext"; + var PeopleApiContext = (function () { + function PeopleApiContext(context, instanceId) { + this.context = context; + this.instanceId = instanceId; + } + Object.defineProperty(PeopleApiContext.prototype, "serviceContext", { + get: function () { + if (!this.m_serviceConext) { + this.m_serviceConext = OfficeCore.ServiceContext.newObject(this.context); + } + return this.m_serviceConext; + }, + enumerable: true, + configurable: true + }); + PeopleApiContext.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var lifetime = _this.serviceContext.getPersonaLifetime(_this.instanceId); + _this.context.sync().then(function () { + lifetime.load("instanceId"); + _this.context.sync().then(function () { + resolve(lifetime); + }); + }); + }); + }; + PeopleApiContext.prototype.getInitialPersona = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this.serviceContext.getInitialPersona(_this.instanceId); + _this.context.sync().then(function () { + resolve(persona); + }); + }); + }; + PeopleApiContext.prototype.getLokiTokenProvider = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var provider = _this.serviceContext.getLokiTokenProvider(_this.instanceId); + _this.context.sync().then(function () { + provider.load("instanceId"); + _this.context.sync().then(function () { + resolve(provider); + }); + }); + }); + }; + return PeopleApiContext; + }()); + OfficeCore.PeopleApiContext = PeopleApiContext; + var ServiceContext = (function (_super) { + __extends(ServiceContext, _super); + function ServiceContext() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceContext.prototype, "_className", { + get: function () { + return "ServiceContext"; + }, + enumerable: true, + configurable: true + }); + ServiceContext.prototype.accountEmailOrUpn = function (instanceId) { + return _invokeMethod(this, "AccountEmailOrUpn", 1, [instanceId], 4, 0); + }; + ServiceContext.prototype.dispose = function (instance) { + _invokeMethod(this, "Dispose", 0, [instance], 0, 0); + }; + ServiceContext.prototype.getInitialPersona = function (instanceId) { + return _createMethodObject(OfficeCore.Persona, this, "GetInitialPersona", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getLokiTokenProvider = function (instanceId) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaLifetime = function (instanceId) { + return _createMethodObject(OfficeCore.PersonaLifetime, this, "GetPersonaLifetime", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaPolicies = function () { + return _invokeMethod(this, "GetPersonaPolicies", 1, [], 4, 0); + }; + ServiceContext.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceContext.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceContext.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceContext, context, "Microsoft.People.ServiceContext", false, 4); + }; + ServiceContext.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceContext; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceContext = ServiceContext; + var _typeRichapiPcxFeatureChecks = "RichapiPcxFeatureChecks"; + var RichapiPcxFeatureChecks = (function (_super) { + __extends(RichapiPcxFeatureChecks, _super); + function RichapiPcxFeatureChecks() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RichapiPcxFeatureChecks.prototype, "_className", { + get: function () { + return "RichapiPcxFeatureChecks"; + }, + enumerable: true, + configurable: true + }); + RichapiPcxFeatureChecks.prototype.isAddChangePhotoLinkOnLpcPersonaImageFlightEnabled = function () { + return _invokeMethod(this, "IsAddChangePhotoLinkOnLpcPersonaImageFlightEnabled", 1, [], 4, 0); + }; + RichapiPcxFeatureChecks.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RichapiPcxFeatureChecks.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RichapiPcxFeatureChecks.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.RichapiPcxFeatureChecks, context, "Microsoft.People.RichapiPcxFeatureChecks", false, 4); + }; + RichapiPcxFeatureChecks.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RichapiPcxFeatureChecks; + }(OfficeExtension.ClientObject)); + OfficeCore.RichapiPcxFeatureChecks = RichapiPcxFeatureChecks; + var _typeTap = "Tap"; + var Tap = (function (_super) { + __extends(Tap, _super); + function Tap() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Tap.prototype, "_className", { + get: function () { + return "Tap"; + }, + enumerable: true, + configurable: true + }); + Tap.prototype.getEnterpriseUserInfo = function () { + return _invokeMethod(this, "GetEnterpriseUserInfo", 1, [], 4 | 1, 0); + }; + Tap.prototype.getMruFriendlyPath = function (documentUrl) { + return _invokeMethod(this, "GetMruFriendlyPath", 1, [documentUrl], 4 | 1, 0); + }; + Tap.prototype.launchFileUrlInOfficeApp = function (documentUrl, useUniversalAsBackup) { + return _invokeMethod(this, "LaunchFileUrlInOfficeApp", 1, [documentUrl, useUniversalAsBackup], 4 | 1, 0); + }; + Tap.prototype.performLocalSearch = function (query, numResultsRequested, supportedFileExtensions, documentUrlToExclude) { + return _invokeMethod(this, "PerformLocalSearch", 1, [query, numResultsRequested, supportedFileExtensions, documentUrlToExclude], 4 | 1, 0); + }; + Tap.prototype.readSearchCache = function (keyword, expiredHours, filterObjectType) { + return _invokeMethod(this, "ReadSearchCache", 1, [keyword, expiredHours, filterObjectType], 4 | 1, 0); + }; + Tap.prototype.writeSearchCache = function (fileContent, keyword, filterObjectType) { + return _invokeMethod(this, "WriteSearchCache", 1, [fileContent, keyword, filterObjectType], 4 | 1, 0); + }; + Tap.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Tap.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Tap.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Tap, context, "Microsoft.TapRichApi.Tap", false, 4); + }; + Tap.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Tap; + }(OfficeExtension.ClientObject)); + OfficeCore.Tap = Tap; + var ObjectType; + (function (ObjectType) { + ObjectType["unknown"] = "Unknown"; + ObjectType["chart"] = "Chart"; + ObjectType["smartArt"] = "SmartArt"; + ObjectType["table"] = "Table"; + ObjectType["image"] = "Image"; + ObjectType["slide"] = "Slide"; + ObjectType["ole"] = "OLE"; + ObjectType["text"] = "Text"; + })(ObjectType = OfficeCore.ObjectType || (OfficeCore.ObjectType = {})); + var _typeAppRuntimePersistenceService = "AppRuntimePersistenceService"; + var AppRuntimePersistenceService = (function (_super) { + __extends(AppRuntimePersistenceService, _super); + function AppRuntimePersistenceService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimePersistenceService.prototype, "_className", { + get: function () { + return "AppRuntimePersistenceService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimePersistenceService.prototype.getAppRuntimeStartState = function () { + return _invokeMethod(this, "GetAppRuntimeStartState", 1, [], 4, 0); + }; + AppRuntimePersistenceService.prototype.setAppRuntimeStartState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeStartState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimePersistenceService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimePersistenceService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimePersistenceService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimePersistenceService, context, "Microsoft.AppRuntime.AppRuntimePersistenceService", false, 4); + }; + AppRuntimePersistenceService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimePersistenceService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimePersistenceService = AppRuntimePersistenceService; + var _typeAppRuntimeService = "AppRuntimeService"; + var AppRuntimeService = (function (_super) { + __extends(AppRuntimeService, _super); + function AppRuntimeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimeService.prototype, "_className", { + get: function () { + return "AppRuntimeService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.getAppRuntimeState = function () { + return _invokeMethod(this, "GetAppRuntimeState", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getContentSnapshotAsBase64 = function () { + _throwIfApiNotSupported("AppRuntimeService.getContentSnapshotAsBase64", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetContentSnapshotAsBase64", 1, [], 4, 0); + }; + AppRuntimeService.prototype.getSnapshotEnabled = function () { + _throwIfApiNotSupported("AppRuntimeService.getSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + return _invokeMethod(this, "GetSnapshotEnabled", 1, [], 4, 0); + }; + AppRuntimeService.prototype.setAppRuntimeState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimeService.prototype.setSnapshotEnabled = function (enabled) { + _throwIfApiNotSupported("AppRuntimeService.setSnapshotEnabled", "SnapshotControl", "1.1", _hostName); + _invokeMethod(this, "SetSnapshotEnabled", 1, [enabled], 4, 0); + }; + AppRuntimeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimeService, context, "Microsoft.AppRuntime.AppRuntimeService", false, 4); + }; + Object.defineProperty(AppRuntimeService.prototype, "onSnapshotImageReady", { + get: function () { + _throwIfApiNotSupported("AppRuntimeService.onSnapshotImageReady", "SnapshotControl", "1.1", _hostName); + if (!this.m_snapshotImageReady) { + this.m_snapshotImageReady = new OfficeExtension.GenericEventHandlers(this.context, this, "SnapshotImageReady", { + eventType: 65547, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + imageBase64: value.imageBase64 + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_snapshotImageReady; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppRuntimeService.prototype, "onVisibilityChanged", { + get: function () { + if (!this.m_visibilityChanged) { + this.m_visibilityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "VisibilityChanged", { + eventType: 65539, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + visibility: value.visibility + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_visibilityChanged; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimeService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimeService = AppRuntimeService; + var AppRuntimeState; + (function (AppRuntimeState) { + AppRuntimeState["inactive"] = "Inactive"; + AppRuntimeState["background"] = "Background"; + AppRuntimeState["visible"] = "Visible"; + })(AppRuntimeState = OfficeCore.AppRuntimeState || (OfficeCore.AppRuntimeState = {})); + var Visibility; + (function (Visibility) { + Visibility["hidden"] = "Hidden"; + Visibility["visible"] = "Visible"; + })(Visibility = OfficeCore.Visibility || (OfficeCore.Visibility = {})); + var LicenseFeatureTier; + (function (LicenseFeatureTier) { + LicenseFeatureTier["unknown"] = "Unknown"; + LicenseFeatureTier["basic"] = "Basic"; + LicenseFeatureTier["premium"] = "Premium"; + })(LicenseFeatureTier = OfficeCore.LicenseFeatureTier || (OfficeCore.LicenseFeatureTier = {})); + var _typeLicense = "License"; + var License = (function (_super) { + __extends(License, _super); + function License() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(License.prototype, "_className", { + get: function () { + return "License"; + }, + enumerable: true, + configurable: true + }); + License.prototype.getFeatureTier = function (feature, fallbackValue) { + return _invokeMethod(this, "GetFeatureTier", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.getLicenseFeature = function (feature) { + return _createMethodObject(OfficeCore.LicenseFeature, this, "GetLicenseFeature", 1, [feature], false, false, null, 4); + }; + License.prototype.getMsaDeviceTicket = function (resource, policy, options) { + return _invokeMethod(this, "GetMsaDeviceTicket", 1, [resource, policy, options], 4 | 1, 0); + }; + License.prototype.isFeatureEnabled = function (feature, fallbackValue) { + return _invokeMethod(this, "IsFeatureEnabled", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.isFreemiumUpsellEnabled = function () { + return _invokeMethod(this, "IsFreemiumUpsellEnabled", 1, [], 4, 0); + }; + License.prototype.launchUpsellExperience = function (experienceId) { + _invokeMethod(this, "LaunchUpsellExperience", 1, [experienceId], 4, 0); + }; + License.prototype._TestFireStateChangedEvent = function (feature) { + _invokeMethod(this, "_TestFireStateChangedEvent", 0, [feature], 1, 0); + }; + License.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + License.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + License.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.License, context, "Microsoft.Office.Licensing.License", false, 4); + }; + License.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return License; + }(OfficeExtension.ClientObject)); + OfficeCore.License = License; + var _typeLicenseFeature = "LicenseFeature"; + var LicenseFeature = (function (_super) { + __extends(LicenseFeature, _super); + function LicenseFeature() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LicenseFeature.prototype, "_className", { + get: function () { + return "LicenseFeature"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeLicenseFeature, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype._RegisterStateChange = function () { + _invokeMethod(this, "_RegisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._UnregisterStateChange = function () { + _invokeMethod(this, "_UnregisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + LicenseFeature.prototype.load = function (options) { + return _load(this, options); + }; + LicenseFeature.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LicenseFeature.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + LicenseFeature.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LicenseFeature.prototype, "onStateChanged", { + get: function () { + var _this = this; + if (!this.m_stateChanged) { + this.m_stateChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "StateChanged", { + eventType: 1, + registerFunc: function () { return _this._RegisterStateChange(); }, + unregisterFunc: function () { return _this._UnregisterStateChange(); }, + getTargetIdFunc: function () { return _this.id; }, + eventArgsTransformFunc: function (value) { + var event = _CC.LicenseFeature_StateChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_stateChanged; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I, + }, {}); + }; + LicenseFeature.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LicenseFeature.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LicenseFeature; + }(OfficeExtension.ClientObject)); + OfficeCore.LicenseFeature = LicenseFeature; + (function (_CC) { + function LicenseFeature_StateChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + feature: args.featureName, + isEnabled: args.isEnabled, + tier: args.tierName + }; + if (args.tierName) { + newArgs.tier = args.tierName == 0 ? LicenseFeatureTier.unknown : + args.tierName == 1 ? LicenseFeatureTier.basic : + args.tierName == 2 ? LicenseFeatureTier.premium : + args.tierName; + } + return newArgs; + } + _CC.LicenseFeature_StateChanged_EventArgsTransform = LicenseFeature_StateChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeMsaDeviceTicketOptions = "MsaDeviceTicketOptions"; + var MsaDeviceTicketOptions = (function (_super) { + __extends(MsaDeviceTicketOptions, _super); + function MsaDeviceTicketOptions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_className", { + get: function () { + return "MsaDeviceTicketOptions"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyNames", { + get: function () { + return ["scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "scopes", { + get: function () { + _throwIfNotLoaded("scopes", this._S, _typeMsaDeviceTicketOptions, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Scopes", value, 0); + }, + enumerable: true, + configurable: true + }); + MsaDeviceTicketOptions.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["scopes"], [], []); + }; + MsaDeviceTicketOptions.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + MsaDeviceTicketOptions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Scopes"])) { + this._S = obj["Scopes"]; + } + }; + MsaDeviceTicketOptions.prototype.load = function (options) { + return _load(this, options); + }; + MsaDeviceTicketOptions.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MsaDeviceTicketOptions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MsaDeviceTicketOptions.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.MsaDeviceTicketOptions, context, "Microsoft.Office.Licensing.MsaDeviceTicketOptions", false, 4); + }; + MsaDeviceTicketOptions.prototype.toJSON = function () { + return _toJson(this, { + "scopes": this._S, + }, {}); + }; + MsaDeviceTicketOptions.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MsaDeviceTicketOptions.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MsaDeviceTicketOptions; + }(OfficeExtension.ClientObject)); + OfficeCore.MsaDeviceTicketOptions = MsaDeviceTicketOptions; + var _typeDialogPage = "DialogPage"; + var DialogPage = (function (_super) { + __extends(DialogPage, _super); + function DialogPage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DialogPage.prototype, "_className", { + get: function () { + return "DialogPage"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_Id", { + get: function () { + _throwIfNotLoaded("_Id", this.__I, _typeDialogPage, this._isNull); + return this.__I; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4, 0); + }; + DialogPage.prototype.readyToShow = function () { + _invokeMethod(this, "ReadyToShow", 1, [], 4, 0); + }; + DialogPage.prototype.registerOnShow = function () { + _invokeMethod(this, "RegisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype.sendMessageToHost = function (message) { + _invokeMethod(this, "SendMessageToHost", 1, [message], 4, 0); + }; + DialogPage.prototype.unregisterOnShow = function () { + _invokeMethod(this, "UnregisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["_Id"])) { + this.__I = obj["_Id"]; + } + }; + DialogPage.prototype.load = function (options) { + return _load(this, options); + }; + DialogPage.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_Id"])) { + this.__I = value["_Id"]; + } + }; + DialogPage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DialogPage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DialogPage, context, "Microsoft.Office.DialogPage.DialogPage", false, 4); + }; + Object.defineProperty(DialogPage.prototype, "onOnShowEvent", { + get: function () { + var _this = this; + if (!this.m_onShowEvent) { + this.m_onShowEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "OnShowEvent", { + eventType: 1, + registerFunc: function () { return _this.registerOnShow(); }, + unregisterFunc: function () { return _this.unregisterOnShow(); }, + getTargetIdFunc: function () { return _this._Id; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_onShowEvent; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return DialogPage; + }(OfficeExtension.ClientObject)); + OfficeCore.DialogPage = DialogPage; + var _typeSharedFilePicker = "SharedFilePicker"; + var SharedFilePicker = (function (_super) { + __extends(SharedFilePicker, _super); + function SharedFilePicker() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(SharedFilePicker.prototype, "_className", { + get: function () { + return "SharedFilePicker"; + }, + enumerable: true, + configurable: true + }); + SharedFilePicker.prototype.getSharedFilePickerResponse = function (pickerCustomizationJsonString) { + return _invokeMethod(this, "GetSharedFilePickerResponse", 1, [pickerCustomizationJsonString], 4, 0); + }; + SharedFilePicker.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + SharedFilePicker.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + SharedFilePicker.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.SharedFilePicker, context, "Microsoft.Office.SharedFilePicker", false, 4); + }; + SharedFilePicker.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return SharedFilePicker; + }(OfficeExtension.ClientObject)); + OfficeCore.SharedFilePicker = SharedFilePicker; + var _typeActionService = "ActionService"; + var ActionService = (function (_super) { + __extends(ActionService, _super); + function ActionService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ActionService.prototype, "_className", { + get: function () { + return "ActionService"; + }, + enumerable: true, + configurable: true + }); + ActionService.prototype.areShortcutsInUse = function (shortcuts) { + return _invokeMethod(this, "AreShortcutsInUse", 0, [shortcuts], 0, 0); + }; + ActionService.prototype.getShortcuts = function () { + return _invokeMethod(this, "GetShortcuts", 1, [], 4, 0); + }; + ActionService.prototype.replaceShortcuts = function (shortcuts) { + _invokeMethod(this, "ReplaceShortcuts", 0, [shortcuts], 0, 0); + }; + ActionService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ActionService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ActionService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ActionService, context, "Microsoft.Office.ActionService", false, 4); + }; + ActionService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ActionService; + }(OfficeExtension.ClientObject)); + OfficeCore.ActionService = ActionService; + var _typeAuth = "Auth"; + var Auth = (function (_super) { + __extends(Auth, _super); + function Auth() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Auth.prototype, "_className", { + get: function () { + return "Auth"; + }, + enumerable: true, + configurable: true + }); + Auth.prototype.getAccessTokenFirstPartyOAuth = function (appName, target) { + return _invokeMethod(this, "GetAccessTokenFirstPartyOAuth", 1, [appName, target], 4 | 1, 0); + }; + Auth.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Auth.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Auth.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Auth, context, "Microsoft.Office.Auth", false, 1 | 4); + }; + Auth.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Auth; + }(OfficeExtension.ClientObject)); + OfficeCore.Auth = Auth; + var _typeAugLoopEventService = "AugLoopEventService"; + var AugLoopEventService = (function (_super) { + __extends(AugLoopEventService, _super); + function AugLoopEventService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AugLoopEventService.prototype, "_className", { + get: function () { + return "AugLoopEventService"; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.sendMessage = function (data) { + _invokeMethod(this, "SendMessage", 1, [data], 4 | 1, 0); + }; + AugLoopEventService.prototype._RegisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_RegisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._UnregisterHostMessageReceivedEvent = function () { + _invokeMethod(this, "_UnregisterHostMessageReceivedEvent", 1, [], 4 | 1, 0); + }; + AugLoopEventService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AugLoopEventService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AugLoopEventService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AugLoopEventService, context, "Microsoft.Office.AugLoopEventService", false, 1 | 4); + }; + Object.defineProperty(AugLoopEventService.prototype, "onHostMessageReceived", { + get: function () { + var _this = this; + if (!this.m_hostMessageReceived) { + this.m_hostMessageReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "HostMessageReceived", { + eventType: 65542, + registerFunc: function () { return _this._RegisterHostMessageReceivedEvent(); }, + unregisterFunc: function () { return _this._UnregisterHostMessageReceivedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + data: value.data + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostMessageReceived; + }, + enumerable: true, + configurable: true + }); + AugLoopEventService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AugLoopEventService; + }(OfficeExtension.ClientObject)); + OfficeCore.AugLoopEventService = AugLoopEventService; + var _typeUndoService = "UndoService"; + var UndoService = (function (_super) { + __extends(UndoService, _super); + function UndoService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UndoService.prototype, "_className", { + get: function () { + return "UndoService"; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.endCopilotOperation = function (batchId) { + _invokeMethod(this, "EndCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.startCopilotOperation = function (batchId) { + return _invokeMethod(this, "StartCopilotOperation", 0, [batchId], 1, 0); + }; + UndoService.prototype.undo = function () { + return _invokeMethod(this, "Undo", 0, [], 1, 0); + }; + UndoService.prototype._RegisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_RegisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._UnregisterUndoStackChangedEvent = function () { + _invokeMethod(this, "_UnregisterUndoStackChangedEvent", 1, [], 4 | 1, 0); + }; + UndoService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UndoService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UndoService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UndoService, context, "Microsoft.Office.UndoService", false, 1 | 4); + }; + Object.defineProperty(UndoService.prototype, "onCopilotOperationStarted", { + get: function () { + if (!this.m_copilotOperationStarted) { + this.m_copilotOperationStarted = new OfficeExtension.GenericEventHandlers(this.context, this, "CopilotOperationStarted", { + eventType: 65544, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + batchId: value.batchId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_copilotOperationStarted; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UndoService.prototype, "onUndoStackChanged", { + get: function () { + var _this = this; + if (!this.m_undoStackChanged) { + this.m_undoStackChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "UndoStackChanged", { + eventType: 65543, + registerFunc: function () { return _this._RegisterUndoStackChangedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUndoStackChangedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_undoStackChanged; + }, + enumerable: true, + configurable: true + }); + UndoService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UndoService; + }(OfficeExtension.ClientObject)); + OfficeCore.UndoService = UndoService; + var TriStateOption; + (function (TriStateOption) { + TriStateOption["notSet"] = "NotSet"; + TriStateOption["true"] = "True"; + TriStateOption["false"] = "False"; + })(TriStateOption = OfficeCore.TriStateOption || (OfficeCore.TriStateOption = {})); + var UserFeedbackType; + (function (UserFeedbackType) { + UserFeedbackType["like"] = "Like"; + UserFeedbackType["dislike"] = "Dislike"; + UserFeedbackType["idea"] = "Idea"; + UserFeedbackType["unclassified"] = "Unclassified"; + })(UserFeedbackType = OfficeCore.UserFeedbackType || (OfficeCore.UserFeedbackType = {})); + var UserFeedbackUIType; + (function (UserFeedbackUIType) { + UserFeedbackUIType["modalDialog"] = "ModalDialog"; + UserFeedbackUIType["taskpane"] = "Taskpane"; + })(UserFeedbackUIType = OfficeCore.UserFeedbackUIType || (OfficeCore.UserFeedbackUIType = {})); + var _typeUserFeedbackService = "UserFeedbackService"; + var UserFeedbackService = (function (_super) { + __extends(UserFeedbackService, _super); + function UserFeedbackService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UserFeedbackService.prototype, "_className", { + get: function () { + return "UserFeedbackService"; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.collectUserFeedback = function (feedbacktype, UIType, featureArea, options) { + _invokeMethod(this, "CollectUserFeedback", 1, [feedbacktype, UIType, featureArea, options], 4 | 1, 0); + }; + UserFeedbackService.prototype._RegisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_RegisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._UnregisterUserFeedbackUIDismissedEvent = function () { + _invokeMethod(this, "_UnregisterUserFeedbackUIDismissedEvent", 1, [], 4 | 1, 0); + }; + UserFeedbackService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + UserFeedbackService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UserFeedbackService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.UserFeedbackService, context, "Microsoft.Office.UserFeedbackService", false, 1 | 4); + }; + Object.defineProperty(UserFeedbackService.prototype, "onUserFeedbackUIDismissed", { + get: function () { + var _this = this; + if (!this.m_userFeedbackUIDismissed) { + this.m_userFeedbackUIDismissed = new OfficeExtension.GenericEventHandlers(this.context, this, "UserFeedbackUIDismissed", { + eventType: 65546, + registerFunc: function () { return _this._RegisterUserFeedbackUIDismissedEvent(); }, + unregisterFunc: function () { return _this._UnregisterUserFeedbackUIDismissedEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + isFeedbackSent: value.isFeedbackSent + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_userFeedbackUIDismissed; + }, + enumerable: true, + configurable: true + }); + UserFeedbackService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return UserFeedbackService; + }(OfficeExtension.ClientObject)); + OfficeCore.UserFeedbackService = UserFeedbackService; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["apiNotAvailable"] = "ApiNotAvailable"; + ErrorCodes["clientError"] = "ClientError"; + ErrorCodes["controlIdNotFound"] = "ControlIdNotFound"; + ErrorCodes["entryIdRequired"] = "EntryIdRequired"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["hostRestartNeeded"] = "HostRestartNeeded"; + ErrorCodes["instanceNotFound"] = "InstanceNotFound"; + ErrorCodes["interactiveFlowAborted"] = "InteractiveFlowAborted"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidGrant"] = "InvalidGrant"; + ErrorCodes["invalidResourceUrl"] = "InvalidResourceUrl"; + ErrorCodes["invalidRibbonDefinition"] = "InvalidRibbonDefinition"; + ErrorCodes["objectNotFound"] = "ObjectNotFound"; + ErrorCodes["resourceNotSupported"] = "ResourceNotSupported"; + ErrorCodes["serverError"] = "ServerError"; + ErrorCodes["serviceUrlNotFound"] = "ServiceUrlNotFound"; + ErrorCodes["sharedRuntimeNotAvailable"] = "SharedRuntimeNotAvailable"; + ErrorCodes["ticketInvalidParams"] = "TicketInvalidParams"; + ErrorCodes["ticketNetworkError"] = "TicketNetworkError"; + ErrorCodes["ticketUnauthorized"] = "TicketUnauthorized"; + ErrorCodes["ticketUninitialized"] = "TicketUninitialized"; + ErrorCodes["ticketUnknownError"] = "TicketUnknownError"; + ErrorCodes["unexpectedError"] = "UnexpectedError"; + ErrorCodes["unsupportedUserIdentity"] = "UnsupportedUserIdentity"; + ErrorCodes["userNotSignedIn"] = "UserNotSignedIn"; + })(ErrorCodes = OfficeCore.ErrorCodes || (OfficeCore.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = OfficeCore.Interfaces || (OfficeCore.Interfaces = {})); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var VisibilityMode; + (function (VisibilityMode) { + VisibilityMode["hidden"] = "Hidden"; + VisibilityMode["taskpane"] = "Taskpane"; + })(VisibilityMode = Office.VisibilityMode || (Office.VisibilityMode = {})); + var StartupBehavior; + (function (StartupBehavior) { + StartupBehavior["none"] = "None"; + StartupBehavior["load"] = "Load"; + })(StartupBehavior = Office.StartupBehavior || (Office.StartupBehavior = {})); + var addin; + (function (addin) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function setStartupBehavior(behavior) { + return __awaiter(this, void 0, void 0, function () { + var state, context, appRuntimePersistenceService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (behavior !== StartupBehavior.load && behavior !== StartupBehavior.none) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.invalidArgument, null, null); + } + state = (behavior == StartupBehavior.load ? OfficeCore.AppRuntimeState.background : OfficeCore.AppRuntimeState.inactive); + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + appRuntimePersistenceService.setAppRuntimeStartState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + addin.setStartupBehavior = setStartupBehavior; + function getStartupBehavior() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimePersistenceService, stateResult, state, ret; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + stateResult = appRuntimePersistenceService.getAppRuntimeStartState(); + return [4, context.sync()]; + case 1: + _a.sent(); + state = stateResult.value; + ret = (state == OfficeCore.AppRuntimeState.inactive ? StartupBehavior.none : StartupBehavior.load); + return [2, ret]; + } + }); + }); + } + addin.getStartupBehavior = getStartupBehavior; + function setSnapshotEnabled(enabled) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setSnapshotEnabled(enabled); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, Promise.resolve()]; + } + }); + }); + } + addin.setSnapshotEnabled = setSnapshotEnabled; + function getSnapshotEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + result = appRuntimeService.getSnapshotEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + addin.getSnapshotEnabled = getSnapshotEnabled; + function getContentSnapshotAsBase64() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2, new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var context = _createRequestContext(true); + var appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + var timeoutId = setTimeout(function () { + handler.remove(); + context.sync().catch(function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "timeout", "getContentSnapshotAsBase64")); + }, 7000); + var handler = appRuntimeService.onSnapshotImageReady.add(function (arg) { + clearTimeout(timeoutId); + handler.remove(); + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + context.sync().catch(function () { }); + resolve(arg.imageBase64); + } + else { + context.sync().catch(function () { }); + reject(OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.generalException, "execution failed", "getContentSnapshotAsBase64")); + } + return null; + }); + context.sync().then(function () { + var apiResult = appRuntimeService.getContentSnapshotAsBase64(); + return context.sync().then(function () { return null; }); + }).catch(function (e) { reject(e); }); + })]; + }); + }); + } + addin.getContentSnapshotAsBase64 = getContentSnapshotAsBase64; + function _setState(state) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setAppRuntimeState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + function _getState() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, stateResult; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + stateResult = appRuntimeService.getAppRuntimeState(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, stateResult.value]; + } + }); + }); + } + addin._getState = _getState; + function showAsTaskpane() { + return _setState(OfficeCore.AppRuntimeState.visible); + } + addin.showAsTaskpane = showAsTaskpane; + function hide() { + return _setState(OfficeCore.AppRuntimeState.background); + } + addin.hide = hide; + var _appRuntimeEvent; + function _getAppRuntimeEventService() { + if (!_appRuntimeEvent) { + var context = _createRequestContext(true); + _appRuntimeEvent = OfficeCore.AppRuntimeService.newObject(context); + } + return _appRuntimeEvent; + } + function _convertVisibilityToVisibilityMode(visibility) { + if (visibility === OfficeCore.Visibility.visible) { + return VisibilityMode.taskpane; + } + return VisibilityMode.hidden; + } + function onVisibilityModeChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var eventService, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + eventService = _getAppRuntimeEventService(); + registrationToken = eventService.onVisibilityChanged.add(function (args) { + if (listener) { + var msg = { + visibilityMode: _convertVisibilityToVisibilityMode(args.visibility) + }; + listener(msg); + } + return null; + }); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + ret = function () { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); }; + return [2, ret]; + } + }); + }); + } + addin.onVisibilityModeChanged = onVisibilityModeChanged; + var beforeDocumentCloseNotification; + (function (beforeDocumentCloseNotification) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function enable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.enable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.enable = enable; + function disable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.disable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.disable = disable; + function onCloseActionCancelled(listener) { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + registrationToken = beforeCloseNotification.onBeforeCloseNotificationCancelled.add(function (args) { + if (listener) { + listener(); + } + return null; + }); + return [4, context.sync()]; + case 1: + _a.sent(); + ret = function () { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); }; + return [2, ret]; + } + }); + }); + } + beforeDocumentCloseNotification.onCloseActionCancelled = onCloseActionCancelled; + })(beforeDocumentCloseNotification = addin.beforeDocumentCloseNotification || (addin.beforeDocumentCloseNotification = {})); + })(addin = Office.addin || (Office.addin = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ExtensionComponentType; + (function (ExtensionComponentType) { + ExtensionComponentType["taskpane"] = "Taskpane"; + })(ExtensionComponentType || (ExtensionComponentType = {})); + var extensionLifeCycle; + (function (extensionLifeCycle) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + return context; + } + function launchTaskpane(launchOptions) { + return __awaiter(this, void 0, void 0, function () { + var context, extensionLifecycle, settings; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + extensionLifecycle = OfficeCore.ExtensionLifeCycle.newObject(context); + settings = launchOptions.settings; + if (settings != undefined) { + launchOptions.settings = OSF.OUtil.serializeSettings(settings); + } + extensionLifecycle.launchExtensionComponent("", ExtensionComponentType.taskpane, launchOptions); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + extensionLifeCycle.launchTaskpane = launchTaskpane; + })(extensionLifeCycle = Office.extensionLifeCycle || (Office.extensionLifeCycle = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ribbon; + (function (ribbon_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function requestUpdate(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + function processControls(parent) { + if (parent.controls !== undefined + && parent.controls.length !== undefined + && !!parent.controls.length) { + parent.controls + .filter(function (control) { return !(!control.id); }) + .forEach(function (control) { + var ribbonControl = ribbon.getButton(control.id); + if (control.enabled !== undefined && control.enabled !== null) { + ribbonControl.enabled = control.enabled; + } + }); + } + } + input.tabs + .filter(function (tab) { return !(!tab.id); }) + .forEach(function (tab) { + var ribbonTab = ribbon.getTab(tab.id); + if (tab.visible !== undefined && tab.visible !== null) { + ribbonTab.setVisibility(tab.visible); + } + if (!!tab.groups && !!tab.groups.length) { + tab.groups + .filter(function (group) { return !(!group.id); }) + .forEach(function (group) { + processControls(group); + }); + } + else { + processControls(tab); + } + }); + return requestContext.sync(); + } + ribbon_1.requestUpdate = requestUpdate; + function requestCreateControls(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + var delay = function (milliseconds) { + return new Promise(function (resolve, _) { return setTimeout(function () { return resolve(); }, milliseconds); }); + }; + ribbon.executeRequestCreate(JSON.stringify(input)); + return delay(250) + .then(function () { return requestContext.sync(); }); + } + ribbon_1.requestCreateControls = requestCreateControls; + })(ribbon = Office.ribbon || (Office.ribbon = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var AddinInternalServiceErrorCodes; + (function (AddinInternalServiceErrorCodes) { + AddinInternalServiceErrorCodes["generalException"] = "GeneralException"; + })(AddinInternalServiceErrorCodes || (AddinInternalServiceErrorCodes = {})); + var _libraryMetadataInternalServiceApi = { "version": "1.0.0", + "name": "OfficeCore", + "defaultApiSetName": "OfficeSharedApi", + "hostName": "Office", + "apiSets": [], + "strings": ["AddinInternalService"], + "enumTypes": [], + "clientObjectTypes": [[1, + 0, + 0, + 0, + [["notifyActionHandlerReady", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + 0, + "Microsoft.InternalService.AddinInternalService", + 4]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataInternalServiceApi, targetNamespaceObject: OfficeCore }); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var actionProxy; + (function (actionProxy) { + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _association; + var ActionMessageCategory = 2; + var ActionDispatchMessageType = 1000; + function init() { + if (typeof (OSF) !== "undefined" && OSF.DDA && OSF.DDA.RichApi && OSF.DDA.RichApi.richApiMessageManager) { + var context = new OfficeExtension.ClientRequestContext(); + return context.eventRegistration.register(5, "", _handleMessage); + } + } + function setActionAssociation(association) { + _association = association; + } + function _getFunction(functionName) { + if (functionName) { + var nameUpperCase = functionName.toUpperCase(); + var call = _association.mappings[nameUpperCase]; + if (!_isNullOrUndefined(call) && typeof (call) === "function") { + return call; + } + } + throw OfficeExtension.Utility.createRuntimeError("invalidOperation", "sourceData", "ActionProxy._getFunction"); + } + function _handleMessage(args) { + try { + OfficeExtension.Utility.log('ActionProxy._handleMessage'); + OfficeExtension.Utility.checkArgumentNull(args, "args"); + var entryArray = args.entries; + var invocationArray = []; + for (var i = 0; i < entryArray.length; i++) { + if (entryArray[i].messageCategory !== ActionMessageCategory) { + continue; + } + if (typeof (entryArray[i].message) === 'string') { + entryArray[i].message = JSON.parse(entryArray[i].message); + } + if (entryArray[i].messageType === ActionDispatchMessageType) { + var actionsArgs = null; + var actionName = entryArray[i].message[0]; + var call = _getFunction(actionName); + if (entryArray[i].message.length >= 2) { + var actionArgsJson = entryArray[i].message[1]; + if (actionArgsJson) { + if (_isJsonObjectString(actionArgsJson)) { + actionsArgs = JSON.parse(actionArgsJson); + } + else { + actionsArgs = actionArgsJson; + } + } + } + if (typeof (OSF) !== 'undefined' && + OSF.AppTelemetry && + OSF.AppTelemetry.CallOnAppActivatedIfPending) { + OSF.AppTelemetry.CallOnAppActivatedIfPending(); + } + call.apply(null, [actionsArgs]); + } + else { + OfficeExtension.Utility.log('ActionProxy._handleMessage unknown message type ' + entryArray[i].messageType); + } + } + } + catch (ex) { + _tryLog(ex); + throw ex; + } + return OfficeExtension.Utility._createPromiseFromResult(null); + } + function _isJsonObjectString(value) { + if (typeof value === 'string' && value[0] === '{') { + return true; + } + return false; + } + function toLogMessage(ex) { + var ret = 'Unknown Error'; + if (ex) { + try { + if (ex.toString) { + ret = ex.toString(); + } + ret = ret + ' ' + JSON.stringify(ex); + } + catch (otherEx) { + ret = 'Unexpected Error'; + } + } + return ret; + } + function _tryLog(ex) { + var message = toLogMessage(ex); + OfficeExtension.Utility.log(message); + } + function notifyActionHandlerReady() { + var context = new OfficeExtension.ClientRequestContext(); + var addinInternalService = OfficeCore.AddinInternalService.newObject(context); + context._customData = 'WacPartition'; + addinInternalService.notifyActionHandlerReady(); + return context.sync(); + } + function handlerOnReadyInternal() { + try { + Microsoft.Office.WebExtension.onReadyInternal() + .then(function () { + return init(); + }) + .then(function () { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.isDialog === true || (hostInfo.hostPlatform === "web" && hostInfo.hostType !== "word" && hostInfo.hostType !== "excel")) { + return; + } + else { + return notifyActionHandlerReady(); + } + }); + } + catch (ex) { + } + } + function initFromHostBridge(hostBridge) { + hostBridge.addHostMessageHandler(function (bridgeMessage) { + if (bridgeMessage.type === 3) { + _handleMessage(bridgeMessage.message); + } + }); + } + function initOnce() { + OfficeExtension.Utility.log('ActionProxy.initOnce'); + if (typeof (Office.actions) != 'undefined') { + setActionAssociation(Office.actions._association); + } + if (typeof (document) !== 'undefined') { + if (document.readyState && document.readyState !== 'loading') { + OfficeExtension.Utility.log('ActionProxy.initOnce: document.readyState is not loading state'); + handlerOnReadyInternal(); + } + else if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", function () { + OfficeExtension.Utility.log('ActionProxy.initOnce: DOMContentLoaded event triggered'); + handlerOnReadyInternal(); + }); + } + } + OfficeExtension.HostBridge.onInited(function (hostBridge) { + initFromHostBridge(hostBridge); + }); + } + initOnce(); + })(actionProxy || (actionProxy = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var actions; + (function (actions) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function areShortcutsInUse(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, inUseArray, inUseInfoArray, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + inUseArray = actionService.areShortcutsInUse(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + inUseInfoArray = []; + for (i = 0; i < shortcuts.length; i++) { + inUseInfoArray.push({ + shortcut: shortcuts[i], + inUse: inUseArray.value[i] + }); + } + return [2, inUseInfoArray]; + } + }); + }); + } + actions.areShortcutsInUse = areShortcutsInUse; + function replaceShortcuts(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + actionService.replaceShortcuts(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + actions.replaceShortcuts = replaceShortcuts; + function getShortcuts() { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, shortcuts; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + shortcuts = actionService.getShortcuts(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, shortcuts.value]; + } + }); + }); + } + actions.getShortcuts = getShortcuts; + })(actions = Office.actions || (Office.actions = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var AugLoop; + (function (AugLoop) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function SendMessage(message) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + augLoopEventService.sendMessage(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + AugLoop.SendMessage = SendMessage; + function onHostMessageReceived(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, augLoopEventService, callback, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + augLoopEventService = OfficeCore.AugLoopEventService.newObject(context); + callback = function (args) { + if (listener) { + var message = args.data; + listener(message); + } + return null; + }; + augLoopEventService.onHostMessageReceived.add(callback); + return [4, augLoopEventService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + augLoopEventService.onHostMessageReceived.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); }; + return [2, removeListener]; + } + }); + }); + } + AugLoop.onHostMessageReceived = onHostMessageReceived; + })(AugLoop = OfficeFirstParty.AugLoop || (OfficeFirstParty.AugLoop = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var Undo; + (function (Undo) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + context._customData = 'SkipUndoRecording'; + return context; + } + var resolver; + function onCopilotOperationStartedEventReceived() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (typeof resolver !== "undefined") { + resolver(); + resolver = undefined; + } + return [2]; + }); + }); + } + function undo() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + result = undoService.undo(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, result.value]; + } + }); + }); + } + Undo.undo = undo; + function onUndoStackChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var context, undoService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onUndoStackChanged.add(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + removeListener = function () { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + undoService.onUndoStackChanged.remove(listener); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); }; + return [2, removeListener]; + } + }); + }); + } + Undo.onUndoStackChanged = onUndoStackChanged; + function startCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var waitForEventPromise, context, undoService, shouldWaitForEvent, e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (typeof resolver !== "undefined") { + throw new Error("startCopilotOperation is already inprogress"); + } + waitForEventPromise = new Promise(function (resolve) { resolver = resolve; }); + _a.label = 1; + case 1: + _a.trys.push([1, 4, , 5]); + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.onCopilotOperationStarted.add(onCopilotOperationStartedEventReceived); + return [4, context.sync()]; + case 2: + _a.sent(); + shouldWaitForEvent = undoService.startCopilotOperation(""); + return [4, context.sync()]; + case 3: + _a.sent(); + if (shouldWaitForEvent.value) { + return [2, waitForEventPromise]; + } + else { + resolver = undefined; + } + return [3, 5]; + case 4: + e_1 = _a.sent(); + resolver = undefined; + throw e_1; + case 5: return [2]; + } + }); + }); + } + Undo.startCopilotOperation = startCopilotOperation; + function endCopilotOperation() { + return __awaiter(this, void 0, void 0, function () { + var context, undoService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + undoService = OfficeCore.UndoService.newObject(context); + undoService.endCopilotOperation(""); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + Undo.endCopilotOperation = endCopilotOperation; + })(Undo = OfficeFirstParty.Undo || (OfficeFirstParty.Undo = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var Office; +(function (Office) { + var dialogPage; + (function (dialogPage_1) { + function close() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.close(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.close = close; + function readyToShow() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.readyToShow(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.readyToShow = readyToShow; + function onShow(callback) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.onOnShowEvent.add(callback); + removeListener = function () { + dialogPage.onOnShowEvent.remove(callback); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + dialogPage_1.onShow = onShow; + function sendMessageToHost(message) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.sendMessageToHost(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.sendMessageToHost = sendMessageToHost; + })(dialogPage = Office.dialogPage || (Office.dialogPage = {})); +})(Office || (Office = {})); +var OfficeFirstParty; +(function (OfficeFirstParty) { + var UserFeedback; + (function (UserFeedback) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._customData = 'WacPartition'; + return context; + } + function CollectUserFeedback(feedbacktype, uiType, featureArea, options) { + return __awaiter(this, void 0, void 0, function () { + var context, userFeedbackService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.collectUserFeedback(feedbacktype, uiType, featureArea, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + UserFeedback.CollectUserFeedback = CollectUserFeedback; + function onUserFeedbackUIDismissed(listener) { + return __awaiter(this, void 0, void 0, function () { + var callback, context, userFeedbackService, removeListener; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + callback = function (args) { + if (listener) { + var isFeedbackSent = args.isFeedbackSent; + listener(isFeedbackSent); + } + return null; + }; + context = _createRequestContext(false); + userFeedbackService = OfficeCore.UserFeedbackService.newObject(context); + userFeedbackService.onUserFeedbackUIDismissed.add(callback); + return [4, userFeedbackService.context.sync()]; + case 1: + _a.sent(); + removeListener = function () { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + userFeedbackService.onUserFeedbackUIDismissed.remove(callback); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); }; + return [2, removeListener]; + } + }); + }); + } + UserFeedback.onUserFeedbackUIDismissed = onUserFeedbackUIDismissed; + })(UserFeedback = OfficeFirstParty.UserFeedback || (OfficeFirstParty.UserFeedback = {})); +})(OfficeFirstParty || (OfficeFirstParty = {})); +var OSF; +(function (OSF) { + var ActiveViewChangedEventArgs = (function () { + function ActiveViewChangedEventArgs(m_activeView) { + this.m_activeView = m_activeView; + } + Object.defineProperty(ActiveViewChangedEventArgs.prototype, "type", { + get: function () { + return OSF.EventType.ActiveViewChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ActiveViewChangedEventArgs.prototype, "activeView", { + get: function () { + return this.m_activeView.activeView; + }, + enumerable: true, + configurable: true + }); + return ActiveViewChangedEventArgs; + }()); + OSF.ActiveViewChangedEventArgs = ActiveViewChangedEventArgs; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var ApiMethodCall = (function () { + function ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + this._requiredParameters = requiredParameters; + this._supportedOptions = supportedOptions; + this._privateStateCallbacks = privateStateCallbacks; + this._checkCallArgs = checkCallArgs; + this._displayName = displayName; + this._requiredCount = requiredParameters.length; + } + ApiMethodCall.prototype.verifyArguments = function (params, args) { + for (var name in params) { + var param = params[name]; + var arg = args[name]; + if (param["enum"]) { + switch (typeof arg) { + case "string": + if (OSF.OUtil.listContainsValue(param["enum"], arg)) { + break; + } + case "undefined": + throw 5007; + default: + throw this.getInvalidParameterString(); + } + } + if (param["types"]) { + if (!OSF.OUtil.listContainsValue(param["types"], typeof arg)) { + throw this.getInvalidParameterString(); + } + } + } + }; + ApiMethodCall.prototype.extractRequiredArguments = function (userArgs, caller, stateInfo) { + if (userArgs.length < this._requiredCount) { + throw OSF.Utility.createParameterException(Strings.OfficeOM.L_MissingRequiredArguments); + } + var requiredArgs = []; + var index; + for (index = 0; index < this._requiredCount; index++) { + requiredArgs.push(userArgs[index]); + } + this.verifyArguments(this._requiredParameters, requiredArgs); + var ret = {}; + for (index = 0; index < this._requiredCount; index++) { + var param = this._requiredParameters[index]; + var arg = requiredArgs[index]; + if (param.verify) { + var isValid = param.verify(arg, caller, stateInfo); + if (!isValid) { + throw this.getInvalidParameterString(); + } + } + ret[param.name] = arg; + } + return ret; + }; + ApiMethodCall.prototype.fillOptions = function (options, requiredArgs, caller, stateInfo) { + options = options || {}; + for (var optionName in this._supportedOptions) { + if (!OSF.OUtil.listContainsKey(options, optionName)) { + var value = undefined; + var option = this._supportedOptions[optionName]; + if (option.calculate && requiredArgs) { + value = option.calculate(requiredArgs, caller, stateInfo); + } + if (!value && option.defaultValue !== undefined) { + value = option.defaultValue; + } + options[optionName] = value; + } + } + return options; + }; + ApiMethodCall.prototype.constructCallArgs = function (required, options, caller, stateInfo) { + var callArgs = {}; + for (var r in required) { + callArgs[r] = required[r]; + } + for (var o in options) { + callArgs[o] = options[o]; + } + for (var s in this._privateStateCallbacks) { + callArgs[s] = this._privateStateCallbacks[s](caller, stateInfo); + } + if (this._checkCallArgs) { + callArgs = this._checkCallArgs(callArgs, caller, stateInfo); + } + return callArgs; + }; + ; + ApiMethodCall.prototype.getInvalidParameterString = function () { + var _this = this; + OSF.OUtil.delayExecutionAndCache(function () { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, _this._displayName); + }); + }; + return ApiMethodCall; + }()); + OSF.ApiMethodCall = ApiMethodCall; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var AsyncMethodCall = (function () { + function AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { + this._requiredParameters = requiredParameters; + this._supportedOptions = supportedOptions; + this._privateStateCallbacks = privateStateCallbacks; + this._onSucceeded = onSucceeded; + this._onFailed = onFailed; + this._displayName = displayName; + this._checkCallArgs = checkCallArgs; + this._requiredCount = requiredParameters.length; + this._apiMethods = new OSF.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + } + AsyncMethodCall.prototype.verifyAndExtractCall = function (userArgs, caller, stateInfo) { + var required = this._apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = this.extractOptions(userArgs, required, caller, stateInfo); + var callArgs = this._apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + AsyncMethodCall.prototype.processResponse = function (status, response, caller, callArgs) { + var payload; + if (status == 0) { + if (this._onSucceeded) { + payload = this._onSucceeded(response, caller, callArgs); + } + else { + payload = response; + } + } + else { + if (this._onFailed) { + payload = this._onFailed(status, response); + } + else { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + } + return payload; + }; + AsyncMethodCall.prototype.getCallArgs = function (suppliedArgs) { + var options, parameterCallback; + for (var i = suppliedArgs.length - 1; i >= this._requiredCount; i--) { + var argument = suppliedArgs[i]; + switch (typeof argument) { + case "object": + options = argument; + break; + case "function": + parameterCallback = argument; + break; + } + } + options = options || {}; + if (parameterCallback) { + options[OSF.ParameterNames.Callback] = parameterCallback; + } + return options; + }; + AsyncMethodCall.prototype.extractOptions = function (userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > this._requiredCount + 2) { + throw OSF.Utility.createParameterException(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i = userArgs.length - 1; i >= this._requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OSF.Utility.createParameterException(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options = argument; + } + break; + case "function": + if (parameterCallback) { + throw OSF.Utility.createParameterException(Strings.OfficeOM.L_TooManyOptionalFunction); + } + else { + parameterCallback = argument; + } + break; + default: + throw OSF.Utility.createArgumentException(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options = this._apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + if (parameterCallback) { + if (options[OSF.ParameterNames.Callback]) { + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + } + else { + options[OSF.ParameterNames.Callback] = parameterCallback; + } + } + this._apiMethods.verifyArguments(this._supportedOptions, options); + return options; + }; + return AsyncMethodCall; + }()); + OSF.AsyncMethodCall = AsyncMethodCall; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var AsyncMethodCalls; + (function (AsyncMethodCalls) { + var mappings = {}; + function define(callDefinition) { + mappings[callDefinition.method] = manufacture(callDefinition); + } + AsyncMethodCalls.define = define; + function get(method) { + return mappings[method]; + } + AsyncMethodCalls.get = get; + function manufacture(params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.AsyncMethodCall(params.requiredArguments || [], supportedOptions, privateStateCallbacks, params.onSucceeded, params.onFailed, params.checkCallArgs, params.method); + } + })(AsyncMethodCalls = OSF.AsyncMethodCalls || (OSF.AsyncMethodCalls = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + OSF.AsyncMethods = { + AddColumnsAsync: "addColumnsAsync", + AddFromSelectionAsync: "addFromSelectionAsync", + AddFromNamedItemAsync: "addFromNamedItemAsync", + AddFromPromptAsync: "addFromPromptAsync", + AddHandlerAsync: "addHandlerAsync", + AddRowsAsync: "addRowsAsync", + BindingSelectionChanged: "bindingSelectionChanged", + BindingDataChanged: "bindingDataChanged", + ClearFormatsAsync: "clearFormatsAsync", + CloseAsync: "close", + CloseContainerAsync: "closeContainer", + DeleteAllDataValuesAsync: "deleteAllDataValuesAsync", + DisplayDialogAsync: "displayDialogAsync", + ExecuteFeature: "executeFeature", + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync", + GetAllAsync: "getAllAsync", + GetAccessTokenAsync: "getAccessTokenAsync", + GetByIdAsync: "getByIdAsync", + GetDataAsync: "getDataAsync", + GetDocumentCopyAsync: "getFileAsync", + GetDocumentCopyChunkAsync: "getSliceAsync", + GetFilePropertiesAsync: "getFilePropertiesAsync", + GetSelectedDataAsync: "getSelectedDataAsync", + GoToByIdAsync: "goToByIdAsync", + OpenBrowserWindow: "openBrowserWindow", + QueryFeature: "queryFeature", + ReleaseByIdAsync: "releaseByIdAsync", + RemoveHandlerAsync: "removeHandlerAsync", + ReleaseDocumentCopyAsync: "closeAsync", + SetDataAsync: "setDataAsync", + SetFormatsAsync: "setFormatsAsync", + SetSelectedDataAsync: "setSelectedDataAsync", + SetTableOptionsAsync: "setTableOptionsAsync", + GetOfficeThemeAsync: "getOfficeThemeAsync", + GetDocumentThemeAsync: "getDocumentThemeAsync", + }; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var PropertyDescriptors; + (function (PropertyDescriptors) { + PropertyDescriptors["Subset"] = "subset"; + PropertyDescriptors["BindingProperties"] = "BindingProperties"; + })(PropertyDescriptors = OSF.PropertyDescriptors || (OSF.PropertyDescriptors = {})); + var BindingSelectionChangedEventArgs = (function () { + function BindingSelectionChangedEventArgs(m_bindingInstance, m_subset) { + this.m_bindingInstance = m_bindingInstance; + this.m_subset = m_subset; + } + Object.defineProperty(BindingSelectionChangedEventArgs.prototype, "startRow", { + get: function () { + return this.m_subset["startRow"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingSelectionChangedEventArgs.prototype, "startColumn", { + get: function () { + return this.m_subset["startColumn"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingSelectionChangedEventArgs.prototype, "rowCount", { + get: function () { + return this.m_subset["rowCount"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingSelectionChangedEventArgs.prototype, "columnCount", { + get: function () { + return this.m_subset["columnCount"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingSelectionChangedEventArgs.prototype, "type", { + get: function () { + return OSF.EventType.BindingSelectionChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingSelectionChangedEventArgs.prototype, "binding", { + get: function () { + return this.m_bindingInstance; + }, + enumerable: true, + configurable: true + }); + return BindingSelectionChangedEventArgs; + }()); + OSF.BindingSelectionChangedEventArgs = BindingSelectionChangedEventArgs; + var BindingDataChangedEventArgs = (function () { + function BindingDataChangedEventArgs(m_bindingInstance) { + this.m_bindingInstance = m_bindingInstance; + } + Object.defineProperty(BindingDataChangedEventArgs.prototype, "type", { + get: function () { + return OSF.EventType.BindingDataChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingDataChangedEventArgs.prototype, "binding", { + get: function () { + return this.m_bindingInstance; + }, + enumerable: true, + configurable: true + }); + return BindingDataChangedEventArgs; + }()); + OSF.BindingDataChangedEventArgs = BindingDataChangedEventArgs; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var PropertyDescriptors; + (function (PropertyDescriptors) { + PropertyDescriptors["DataPartProperties"] = "DataPartProperties"; + PropertyDescriptors["DataNodeProperties"] = "DataNodeProperties"; + })(PropertyDescriptors = OSF.PropertyDescriptors || (OSF.PropertyDescriptors = {})); + var Marshaling; + (function (Marshaling) { + var Customxml; + (function (Customxml) { + var DataNodeEventProperties; + (function (DataNodeEventProperties) { + DataNodeEventProperties["OldNode"] = "OldNode"; + DataNodeEventProperties["NewNode"] = "NewNode"; + DataNodeEventProperties["NextSiblingNode"] = "NextSiblingNode"; + DataNodeEventProperties["InUndoRedo"] = "InUndoRedo"; + })(DataNodeEventProperties = Customxml.DataNodeEventProperties || (Customxml.DataNodeEventProperties = {})); + })(Customxml = Marshaling.Customxml || (Marshaling.Customxml = {})); + })(Marshaling = OSF.Marshaling || (OSF.Marshaling = {})); + var EventDescriptors; + (function (EventDescriptors) { + EventDescriptors.DataNodeInsertedEvent = "DataNodeInsertedEvent"; + EventDescriptors.DataNodeReplacedEvent = "DataNodeReplacedEvent"; + EventDescriptors.DataNodeDeletedEvent = "DataNodeDeletedEvent"; + })(EventDescriptors = OSF.EventDescriptors || (OSF.EventDescriptors = {})); + var DataNodeEventProperties; + (function (DataNodeEventProperties) { + DataNodeEventProperties["OldNode"] = "OldNode"; + DataNodeEventProperties["NewNode"] = "NewNode"; + DataNodeEventProperties["NextSiblingNode"] = "NextSiblingNode"; + DataNodeEventProperties["InUndoRedo"] = "InUndoRedo"; + })(DataNodeEventProperties = OSF.DataNodeEventProperties || (OSF.DataNodeEventProperties = {})); + var NodeInsertedEventArgs = (function () { + function NodeInsertedEventArgs(m_newNode, m_inUndoRedo) { + this.m_newNode = m_newNode; + this.m_inUndoRedo = m_inUndoRedo; + } + Object.defineProperty(NodeInsertedEventArgs.prototype, "type", { + get: function () { + return OSF.EventType.DataNodeInserted; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeInsertedEventArgs.prototype, "newNode", { + get: function () { + return this.m_newNode; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeInsertedEventArgs.prototype, "inUndoRedo", { + get: function () { + return this.m_inUndoRedo; + }, + enumerable: true, + configurable: true + }); + return NodeInsertedEventArgs; + }()); + OSF.NodeInsertedEventArgs = NodeInsertedEventArgs; + var NodeReplacedEventArgs = (function () { + function NodeReplacedEventArgs(m_oldNode, m_newNode, m_inUndoRedo) { + this.m_oldNode = m_oldNode; + this.m_newNode = m_newNode; + this.m_inUndoRedo = m_inUndoRedo; + } + Object.defineProperty(NodeReplacedEventArgs.prototype, "type", { + get: function () { + return OSF.EventType.DataNodeReplaced; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeReplacedEventArgs.prototype, "oldNode", { + get: function () { + return this.m_oldNode; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeReplacedEventArgs.prototype, "newNode", { + get: function () { + return this.m_newNode; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeReplacedEventArgs.prototype, "inUndoRedo", { + get: function () { + return this.m_inUndoRedo; + }, + enumerable: true, + configurable: true + }); + return NodeReplacedEventArgs; + }()); + OSF.NodeReplacedEventArgs = NodeReplacedEventArgs; + var NodeDeletedEventArgs = (function () { + function NodeDeletedEventArgs(m_oldNode, m_oldNextSibling, m_inUndoRedo) { + this.m_oldNode = m_oldNode; + this.m_oldNextSibling = m_oldNextSibling; + this.m_inUndoRedo = m_inUndoRedo; + } + Object.defineProperty(NodeDeletedEventArgs.prototype, "type", { + get: function () { + return OSF.EventType.DataNodeDeleted; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeDeletedEventArgs.prototype, "oldNode", { + get: function () { + return this.m_oldNode; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeDeletedEventArgs.prototype, "oldNextSibling", { + get: function () { + return this.m_oldNextSibling; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeDeletedEventArgs.prototype, "inUndoRedo", { + get: function () { + return this.m_inUndoRedo; + }, + enumerable: true, + configurable: true + }); + return NodeDeletedEventArgs; + }()); + OSF.NodeDeletedEventArgs = NodeDeletedEventArgs; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var DialogEventArgs = (function () { + function DialogEventArgs(message) { + if (message[OSF.PropertyDescriptors.MessageType] == 0) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: OSF.EventType.DialogMessageReceived + }, + "message": { + value: message[OSF.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.PropertyDescriptors.MessageOrigin] + } + }); + } + else { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: OSF.EventType.DialogEventReceived + }, + "error": { + value: message[OSF.PropertyDescriptors.MessageType] + } + }); + } + } + return DialogEventArgs; + }()); + OSF.DialogEventArgs = DialogEventArgs; + var PropertyDescriptors; + (function (PropertyDescriptors) { + PropertyDescriptors.MessageType = "messageType"; + PropertyDescriptors.MessageContent = "messageContent"; + PropertyDescriptors.MessageOrigin = "messageOrigin"; + })(PropertyDescriptors = OSF.PropertyDescriptors || (OSF.PropertyDescriptors = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var DocumentSelectionChangedEventArgs = (function () { + function DocumentSelectionChangedEventArgs(m_docInstance) { + this.m_docInstance = m_docInstance; + } + Object.defineProperty(DocumentSelectionChangedEventArgs.prototype, "type", { + get: function () { + return OSF.EventType.DocumentSelectionChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentSelectionChangedEventArgs.prototype, "document", { + get: function () { + return this.m_docInstance; + }, + enumerable: true, + configurable: true + }); + return DocumentSelectionChangedEventArgs; + }()); + OSF.DocumentSelectionChangedEventArgs = DocumentSelectionChangedEventArgs; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var DialogParentEventArgs = (function () { + function DialogParentEventArgs(message) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: OSF.EventType.DialogParentMessageReceived + }, + "message": { + value: message[OSF.PropertyDescriptors.MessageContent] + }, + "origin": { + value: message[OSF.PropertyDescriptors.MessageOrigin] + } + }); + } + return DialogParentEventArgs; + }()); + OSF.DialogParentEventArgs = DialogParentEventArgs; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + ; + OSF.DialogShownStatus = { + hasDialogShown: false, + isWindowDialog: false + }; + var DispIdHost; + (function (DispIdHost) { + var dispIdMap; + function InvokeMethod(methodName, suppliedArguments, caller, privateState) { + var callArgs; + try { + var asyncMethodCall = OSF.AsyncMethodCalls.get(methodName); + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, privateState); + var dispId = getDispIdMap()[methodName]; + var invoker = getHostDelegates("executeAsync"); + var richApiInExcelMethodSubstitution = null; + if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) { + window.Excel._RedirectV1APIs = true; + } + if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[OSF.ParameterNames.AsyncContext]; + if (richApiInExcelMethodSubstitution.preprocess) { + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + } + var ctx = new window.Excel.RequestContext(); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); + ctx.sync() + .then(function () { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if (richApiInExcelMethodSubstitution.postprocess) { + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); + } + if (status != 0) { + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + issueAsyncResult(callArgs, status, response); + })["catch"](function (error) { + issueAsyncResult(callArgs, 13991, null); + }); + } + else { + var hostCallArgs; + hostCallArgs = OSF.HostParameterMap.toHost(dispId, callArgs); + var startTime = (new Date()).getTime(); + invoker({ + "dispId": dispId, + "hostCallArgs": hostCallArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": function (status, hostResponseArgs) { + var responseArgs; + if (status == 0) { + responseArgs = OSF.HostParameterMap.fromHost(dispId, hostResponseArgs); + } + else { + responseArgs = hostResponseArgs; + } + var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); + issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } + } + }); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + } + DispIdHost.InvokeMethod = InvokeMethod; + function AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + if (status == 0) { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[OSF.ParameterNames.Id], handler); + if (!added) { + status = 13991; + } + } + var error; + if (status != 0) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.AsyncMethodCalls.get(OSF.AsyncMethods.AddHandlerAsync); + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[OSF.ParameterNames.EventType]; + handler = callArgs[OSF.ParameterNames.Handler]; + if (isPopupWindow) { + onEnsureRegistration(0); + return; + } + var dispId_1 = getDispIdMap()[eventType]; + isObjectEvent = IsObjectEvent(dispId_1); + var targetId_1 = (isObjectEvent ? callArgs[OSF.ParameterNames.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId_1) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { + var invoker = getHostDelegates("registerEventAsync"); + invoker({ + "eventType": eventType, + "dispId": dispId_1, + "targetId": targetId_1, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = OSF.HostParameterMap.fromHost(dispId_1, hostArgs); + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId_1, OSF.manufactureEventArgs(eventType, targetId_1, args)); + } + }); + } + else { + onEnsureRegistration(0); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + } + DispIdHost.AddEventHandler = AddEventHandler; + function RemoveEventHandler(suppliedArguments, eventDispatch, caller) { + var callArgs; + var eventType, handler; + var isObjectEvent = false; + function onEnsureRegistration(status) { + var error; + if (status != 0) { + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall = OSF.AsyncMethodCalls.get(OSF.AsyncMethods.RemoveHandlerAsync); + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType = callArgs[OSF.ParameterNames.EventType]; + handler = callArgs[OSF.ParameterNames.Handler]; + var dispId = getDispIdMap()[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[OSF.ParameterNames.Id] : (caller.id || "")); + var status, removeSuccess; + if (handler === null) { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); + status = 0; + } + else { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); + status = removeSuccess ? 0 : 5003; + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { + var invoker = getHostDelegates("unregisterEventAsync"); + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": onEnsureRegistration + }); + } + else { + onEnsureRegistration(status); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + } + DispIdHost.RemoveEventHandler = RemoveEventHandler; + function OpenDialog(suppliedArguments, eventDispatch, caller) { + var callArgs; + var targetId; + var dialogMessageEvent = OSF.EventType.DialogMessageReceived; + var dialogOtherEvent = OSF.EventType.DialogEventReceived; + function onEnsureRegistration(status) { + var payload; + if (status != 0) { + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + else { + var onSucceedArgs = {}; + onSucceedArgs["id"] = targetId; + onSucceedArgs["data"] = eventDispatch; + var payload = asyncMethodCall.processResponse(status, onSucceedArgs, caller, callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + } + issueAsyncResult(callArgs, status, payload); + } + try { + if (dialogMessageEvent == undefined || dialogOtherEvent == undefined) { + onEnsureRegistration(5000); + } + if (OSF.AsyncMethods.DisplayDialogAsync == null) { + onEnsureRegistration(5001); + return; + } + var asyncMethodCall = OSF.AsyncMethodCalls.get(OSF.AsyncMethods.DisplayDialogAsync); + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + var dispId = getDispIdMap()[dialogMessageEvent]; + var invoker = getHostDelegates("openDialog"); + targetId = JSON.stringify(callArgs); + if (!OSF.DialogShownStatus.hasDialogShown) { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(OSF.EventType.DialogParentMessageReceived); + } + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { + }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { + }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args = OSF.HostParameterMap.fromHost(dispId, hostArgs); + var event = OSF.manufactureEventArgs(dialogMessageEvent, caller, args); + if (event.type == dialogOtherEvent) { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs["code"] = status || 5001; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]); + } + eventDispatch.fireOrQueueEvent(event); + if (args["messageType"] == 12006) { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(OSF.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false; + } + } + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + } + DispIdHost.OpenDialog = OpenDialog; + function CloseDialog(suppliedArguments, targetId, eventDispatch, caller) { + var callArgs; + var dialogMessageEvent, dialogOtherEvent; + var closeStatus = 0; + function closeCallback(status) { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false; + } + try { + var asyncMethodCall = OSF.AsyncMethodCalls.get(OSF.AsyncMethods.CloseAsync); + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + dialogMessageEvent = OSF.EventType.DialogMessageReceived; + dialogOtherEvent = OSF.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = getDispIdMap()[dialogMessageEvent]; + var invoker = getHostDelegates("closeDialog"); + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": closeCallback + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + if (closeStatus != 0) { + } + } + DispIdHost.CloseDialog = CloseDialog; + function MessageParent(suppliedArguments, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.SyncMethodCalls.get(OSF.SyncMethods.MessageParent); + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var invoker = getHostDelegates("messageParent"); + var dispId = getDispIdMap()[OSF.SyncMethods.MessageParent]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + }); + } + DispIdHost.MessageParent = MessageParent; + function SendMessage(suppliedArguments, eventDispatch, caller) { + var stateInfo = {}; + var syncMethodCall = OSF.SyncMethodCalls.get(OSF.SyncMethods.SendMessage); + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var invoker = getHostDelegates("sendMessage"); + var dispId = getDispIdMap()[OSF.SyncMethods.SendMessage]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + }); + } + DispIdHost.SendMessage = SendMessage; + function addAsyncMethods(target, asyncMethodNames, privateState) { + for (var entry in asyncMethodNames) { + var methodName = asyncMethodNames[entry]; + if (!target[methodName]) { + OSF.OUtil.defineEnumerableProperty(target, methodName, { + value: (function (asyncMethod) { + return function () { + var invokeMethod = OSF.DispIdHost.InvokeMethod; + invokeMethod(asyncMethod, arguments, target, privateState); + }; + })(methodName) + }); + } + } + } + DispIdHost.addAsyncMethods = addAsyncMethods; + function addEventSupport(target, eventDispatch, isPopupWindow) { + var add = OSF.AsyncMethods.AddHandlerAsync; + var remove = OSF.AsyncMethods.RemoveHandlerAsync; + if (!target[add]) { + OSF.OUtil.defineEnumerableProperty(target, add, { + value: function () { + var addEventHandler = OSF.DispIdHost.AddEventHandler; + addEventHandler(arguments, eventDispatch, target, isPopupWindow); + } + }); + } + if (!target[remove]) { + OSF.OUtil.defineEnumerableProperty(target, remove, { + value: function () { + var removeEventHandler = OSF.DispIdHost.RemoveEventHandler; + removeEventHandler(arguments, eventDispatch, target); + } + }); + } + } + DispIdHost.addEventSupport = addEventSupport; + function IsObjectEvent(dispId) { + return (dispId == OSF.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.EventDispId.dispidContentControlAddedEvent); + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { + if (typeof ex == "number") { + if (!callArgs) { + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + } + issueAsyncResult(callArgs, ex, OSF.DDA.ErrorCodeManager.getErrorArgs(ex)); + } + else { + throw ex; + } + } + function getHostDelegates(method) { + var namespace; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.hostPlatform == OSF.HostInfoPlatform.web) { + namespace = OSF.WACDelegate; + } + else { + namespace = OSF.SafeArrayDelegate; + } + return namespace[method]; + } + function initializeDispIdHostFacade() { + dispIdMap = {}; + var methodMap = { + "GoToByIdAsync": 82, + "GetSelectedDataAsync": 64, + "SetSelectedDataAsync": 65, + "GetDocumentCopyChunkAsync": 80, + "ReleaseDocumentCopyAsync": 81, + "GetDocumentCopyAsync": 77, + "AddFromSelectionAsync": 66, + "AddFromPromptAsync": 67, + "AddFromNamedItemAsync": 78, + "GetAllAsync": 74, + "GetByIdAsync": 68, + "ReleaseByIdAsync": 69, + "GetDataAsync": 70, + "SetDataAsync": 71, + "AddRowsAsync": 72, + "AddColumnsAsync": 79, + "DeleteAllDataValuesAsync": 73, + "RefreshAsync": 75, + "SaveAsync": 76, + "GetActiveViewAsync": 83, + "GetFilePropertiesAsync": 86, + "GetOfficeThemeAsync": 85, + "GetDocumentThemeAsync": 84, + "ClearFormatsAsync": 87, + "SetTableOptionsAsync": 88, + "SetFormatsAsync": 89, + "GetUserIdentityInfoAsync": 92, + "GetAccessTokenAsync": 98, + "GetAuthContextAsync": 99, + "ExecuteRichApiRequestAsync": 93, + "AppCommandInvocationCompletedAsync": 94, + "CloseContainerAsync": 97, + "OpenBrowserWindow": 102, + "CreateDocumentAsync": 105, + "InsertFormAsync": 106, + "ExecuteFeature": 146, + "QueryFeature": 147, + "AddDataPartAsync": 128, + "GetDataPartByIdAsync": 129, + "GetDataPartsByNameSpaceAsync": 130, + "GetPartXmlAsync": 131, + "GetPartNodesAsync": 132, + "DeleteDataPartAsync": 133, + "GetNodeValueAsync": 134, + "GetNodeXmlAsync": 135, + "GetRelativeNodesAsync": 136, + "SetNodeValueAsync": 137, + "SetNodeXmlAsync": 138, + "AddDataPartNamespaceAsync": 139, + "GetDataPartNamespaceAsync": 140, + "GetDataPartPrefixAsync": 141, + "GetNodeTextAsync": 142, + "SetNodeTextAsync": 143, + "GetSelectedTask": 110, + "GetTask": 112, + "GetWSSUrl": 114, + "GetTaskField": 115, + "GetSelectedResource": 111, + "GetResourceField": 113, + "GetProjectField": 116, + "GetSelectedView": 117, + "GetTaskByIndex": 118, + "GetResourceByIndex": 119, + "SetTaskField": 120, + "SetResourceField": 121, + "GetMaxTaskIndex": 122, + "GetMaxResourceIndex": 123, + "CreateTask": 124 + }; + for (var method in methodMap) { + if (OSF.AsyncMethods[method]) { + dispIdMap[OSF.AsyncMethods[method]] = methodMap[method]; + } + } + var syncMethodMap = { + "MessageParent": 144, + "SendMessage": 145 + }; + for (var method in syncMethodMap) { + if (OSF.SyncMethods[method]) { + dispIdMap[OSF.SyncMethods[method]] = syncMethodMap[method]; + } + } + var eventMap = { + "SettingsChanged": OSF.EventDispId.dispidSettingsChangedEvent, + "DocumentSelectionChanged": OSF.EventDispId.dispidDocumentSelectionChangedEvent, + "BindingSelectionChanged": OSF.EventDispId.dispidBindingSelectionChangedEvent, + "BindingDataChanged": OSF.EventDispId.dispidBindingDataChangedEvent, + "ActiveViewChanged": OSF.EventDispId.dispidActiveViewChangedEvent, + "OfficeThemeChanged": OSF.EventDispId.dispidOfficeThemeChangedEvent, + "DocumentThemeChanged": OSF.EventDispId.dispidDocumentThemeChangedEvent, + "AppCommandInvoked": OSF.EventDispId.dispidAppCommandInvokedEvent, + "DialogMessageReceived": OSF.EventDispId.dispidDialogMessageReceivedEvent, + "DialogParentMessageReceived": OSF.EventDispId.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": OSF.EventDispId.dispidObjectDeletedEvent, + "ObjectSelectionChanged": OSF.EventDispId.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": OSF.EventDispId.dispidObjectDataChangedEvent, + "ContentControlAdded": OSF.EventDispId.dispidContentControlAddedEvent, + "LiveShareStateChanged": OSF.EventDispId.dispidLiveShareStateChangedEvent, + "RichApiMessage": OSF.EventDispId.dispidRichApiMessageEvent, + "DataNodeInserted": OSF.EventDispId.dispidDataNodeAddedEvent, + "DataNodeReplaced": OSF.EventDispId.dispidDataNodeReplacedEvent, + "DataNodeDeleted": OSF.EventDispId.dispidDataNodeDeletedEvent + }; + for (var event in eventMap) { + if (OSF.EventType[event]) { + dispIdMap[OSF.EventType[event]] = eventMap[event]; + } + } + } + function getDispIdMap() { + if (!dispIdMap) { + initializeDispIdHostFacade(); + } + return dispIdMap; + } + function issueAsyncResult(callArgs, status, payload) { + var callback = callArgs[OSF.ParameterNames.Callback]; + if (callback) { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[OSF.ParameterNames.AsyncContext]; + var errorArgs; + if (status == 0) { + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + } + else { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(5001); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || 5001; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs, errorArgs)); + } + } + DispIdHost.issueAsyncResult = issueAsyncResult; + })(DispIdHost = OSF.DispIdHost || (OSF.DispIdHost = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + function manufactureEventArgs(eventType, target, eventProperties) { + var args; + switch (eventType) { + case OSF.EventType.DocumentSelectionChanged: + args = new OSF.DocumentSelectionChangedEventArgs(target); + break; + case OSF.EventType.BindingSelectionChanged: + args = new OSF.BindingSelectionChangedEventArgs(OSF.manufactureBinding(eventProperties, target.document), eventProperties[OSF.PropertyDescriptors.Subset]); + break; + case OSF.EventType.BindingDataChanged: + args = new OSF.BindingDataChangedEventArgs(OSF.manufactureBinding(eventProperties, target.document)); + break; + case OSF.EventType.SettingsChanged: + args = new OSF.SettingsChangedEventArgs(target); + break; + case OSF.EventType.ActiveViewChanged: + args = new OSF.ActiveViewChangedEventArgs(eventProperties); + break; + case OSF.EventType.LiveShareStateChanged: + args = new OSF.LiveShareStateChangedEventArgs(eventProperties); + break; + case OSF.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case OSF.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case OSF.EventType.DataNodeInserted: + args = new OSF.NodeInsertedEventArgs(OSF.manufactureDataNode(eventProperties[OSF.DataNodeEventProperties.NewNode]), eventProperties[OSF.DataNodeEventProperties.InUndoRedo]); + break; + case OSF.EventType.DataNodeReplaced: + args = new OSF.NodeReplacedEventArgs(OSF.manufactureDataNode(eventProperties[OSF.DataNodeEventProperties.OldNode]), OSF.manufactureDataNode(eventProperties[OSF.DataNodeEventProperties.NewNode]), eventProperties[OSF.DataNodeEventProperties.InUndoRedo]); + break; + case OSF.EventType.DataNodeDeleted: + args = new OSF.NodeDeletedEventArgs(OSF.manufactureDataNode(eventProperties[OSF.DataNodeEventProperties.OldNode]), OSF.manufactureDataNode(eventProperties[OSF.DataNodeEventProperties.NextSiblingNode]), eventProperties[OSF.DataNodeEventProperties.InUndoRedo]); + break; + case OSF.EventType.DialogMessageReceived: + args = new OSF.DialogEventArgs(eventProperties); + break; + case OSF.EventType.DialogParentMessageReceived: + args = new OSF.DialogParentEventArgs(eventProperties); + break; + } + return args; + } + OSF.manufactureEventArgs = manufactureEventArgs; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var HostParameterMap; + (function (HostParameterMap) { + HostParameterMap.self = "self"; + HostParameterMap.dynamicTypes = {}; + HostParameterMap.dynamicTypes[OSF.ParameterNames.Data] = { + toHost: function (data) { + if (data != null && data.rows !== undefined) { + var tableData = {}; + tableData[OSF.TableDataProperties.TableRows] = data.rows; + tableData[OSF.TableDataProperties.TableHeaders] = data.headers; + data = tableData; + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + HostParameterMap.dynamicTypes["sampleData"] = HostParameterMap.dynamicTypes["data"]; + var specialProcessor; + var mappings = {}; + function define(definition) { + var args = {}; + var toHost = createObject(definition.toHost); + if (definition.invertible) { + args.map = toHost; + } + else if (definition.canonical) { + args.toHost = args.fromHost = toHost; + } + else { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost); + } + addMapping(definition.type, args); + if (definition.isComplexType) + addComplexType(definition.type); + } + HostParameterMap.define = define; + function toHost(mapName, preimage) { + return applyMap(mapName, preimage, toHostMap); + } + HostParameterMap.toHost = toHost; + function fromHost(mapName, image) { + return applyMap(mapName, image, fromHostMap); + } + HostParameterMap.fromHost = fromHost; + function addMapping(mapName, description) { + var toHost, fromHost; + if (description.map) { + toHost = description.map; + fromHost = {}; + for (var preimage in toHost) { + var image = toHost[preimage]; + if (image == HostParameterMap.self) { + image = preimage; + } + fromHost[image] = preimage; + } + } + else { + toHost = description.toHost; + fromHost = description.fromHost; + } + var pair = mappings[mapName]; + if (pair) { + var currMap = pair[toHostMap]; + for (var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for (var fh in currMap) + fromHost[fh] = currMap[fh]; + } + else { + pair = mappings[mapName] = {}; + } + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost; + } + HostParameterMap.addMapping = addMapping; + function addComplexType(ct) { + getSpecialProcessor().addComplexType(ct); + } + HostParameterMap.addComplexType = addComplexType; + function getDynamicType(dt) { + return getSpecialProcessor().getDynamicType(dt); + } + HostParameterMap.getDynamicType = getDynamicType; + function setDynamicType(dt, handler) { + getSpecialProcessor().setDynamicType(dt, handler); + } + HostParameterMap.setDynamicType = setDynamicType; + function doMapValues(preimageSet, mapping) { + return mapValues(preimageSet, mapping); + } + HostParameterMap.doMapValues = doMapValues; + function mapValues(preimageSet, mapping) { + var ret = preimageSet ? {} : undefined; + for (var entry in preimageSet) { + var preimage = preimageSet[entry]; + var image; + if (OSF.ListType.isListType(entry)) { + image = []; + for (var subEntry in preimage) { + image.push(mapValues(preimage[subEntry], mapping)); + } + } + else if (OSF.OUtil.listContainsKey(HostParameterMap.dynamicTypes, entry)) { + image = HostParameterMap.dynamicTypes[entry][mapping](preimage); + } + else if (mapping == fromHostMap && getSpecialProcessor().preserveNesting(entry)) { + image = mapValues(preimage, mapping); + } + else { + var maps = mappings[entry]; + if (maps) { + var map = maps[mapping]; + if (map) { + image = map[preimage]; + if (image === undefined) { + image = preimage; + } + } + } + else { + image = preimage; + } + } + ret[entry] = image; + } + return ret; + } + function generateArguments(imageSet, parameters) { + var ret; + for (var param in parameters) { + var arg; + if (getSpecialProcessor().isComplexType(param)) { + arg = generateArguments(imageSet, mappings[param][toHostMap]); + } + else { + arg = imageSet[param]; + } + if (arg != undefined) { + if (!ret) { + ret = {}; + } + var index = parameters[param]; + if (index == HostParameterMap.self) { + index = param; + } + ret[index] = getSpecialProcessor().pack(param, arg); + } + } + return ret; + } + function extractArguments(source, parameters, extracted) { + if (!extracted) { + extracted = {}; + } + for (var param in parameters) { + var index = parameters[param]; + var value; + if (index == HostParameterMap.self) { + value = source; + } + else if (index == sourceData) { + extracted[param] = source.toArray(); + continue; + } + else { + value = source[index]; + } + if (value === null || value === undefined) { + extracted[param] = undefined; + } + else { + value = getSpecialProcessor().unpack(param, value); + var map; + if (getSpecialProcessor().isComplexType(param)) { + map = mappings[param][fromHostMap]; + if (getSpecialProcessor().preserveNesting(param)) { + extracted[param] = extractArguments(value, map); + } + else { + extractArguments(value, map, extracted); + } + } + else { + if (OSF.ListType.isListType(param)) { + map = {}; + var entryDescriptor = OSF.ListType.getDescriptor(param); + map[entryDescriptor] = HostParameterMap.self; + var extractedValues = new Array(value.length); + for (var item in value) { + extractedValues[item] = extractArguments(value[item], map); + } + extracted[param] = extractedValues; + } + else { + extracted[param] = value; + } + } + } + } + return extracted; + } + function applyMap(mapName, preimage, mapping) { + var parameters = mappings[mapName][mapping]; + var image; + if (mapping == "toHost") { + var imageSet = mapValues(preimage, mapping); + image = generateArguments(imageSet, parameters); + } + else if (mapping == "fromHost") { + var argumentSet = extractArguments(preimage, parameters); + image = mapValues(argumentSet, mapping); + } + return image; + } + function getSpecialProcessor() { + if (!specialProcessor) { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.hostPlatform == OSF.HostInfoPlatform.web) { + specialProcessor = new OSF.WebSpecialProcessor(); + } + else { + specialProcessor = new OSF.SafeArraySpecialProcessor(); + } + } + return specialProcessor; + } + function createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + } + })(HostParameterMap = OSF.HostParameterMap || (OSF.HostParameterMap = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var ListType; + (function (ListType) { + var listTypes = {}; + function setListType(t, prop) { + listTypes[t] = prop; + } + ListType.setListType = setListType; + function isListType(t) { + return OSF.OUtil.listContainsKey(listTypes, t); + } + ListType.isListType = isListType; + function getDescriptor(t) { + return listTypes[t]; + } + ListType.getDescriptor = getDescriptor; + })(ListType = OSF.ListType || (OSF.ListType = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var LiveShareStateChangedEventArgs = (function () { + function LiveShareStateChangedEventArgs(m_liveShareStateInstance) { + this.m_liveShareStateInstance = m_liveShareStateInstance; + } + Object.defineProperty(LiveShareStateChangedEventArgs.prototype, "type", { + get: function () { + return OSF.EventType.LiveShareStateChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LiveShareStateChangedEventArgs.prototype, "liveShareState", { + get: function () { + return this.m_liveShareStateInstance; + }, + enumerable: true, + configurable: true + }); + return LiveShareStateChangedEventArgs; + }()); + OSF.LiveShareStateChangedEventArgs = LiveShareStateChangedEventArgs; +})(OSF || (OSF = {})); +var Office; +(function (Office) { + var EventType; + (function (EventType) { + EventType.ActiveViewChanged = "activeViewChanged"; + EventType.DialogMessageReceived = "dialogMessageReceived"; + EventType.DialogParentMessageReceived = "dialogParentMessageReceived"; + EventType.DialogParentEventReceived = "dialogParentEventReceived"; + EventType.DialogEventReceived = "dialogEventReceived"; + EventType.BindingDataChanged = "bindingDataChanged"; + EventType.BindingSelectionChanged = "bindingSelectionChanged"; + EventType.OfficeThemeChanged = "officeThemeChanged"; + EventType.DocumentThemeChanged = "documentThemeChanged"; + EventType.DataNodeDeleted = "nodeDeleted"; + EventType.DataNodeInserted = "nodeInserted"; + EventType.DataNodeReplaced = "nodeReplaced"; + EventType.LiveShareStateChanged = "liveShareStateChanged"; + EventType.NodeDeleted = "nodeDeleted"; + EventType.NodeInserted = "nodeInserted"; + EventType.NodeReplaced = "nodeReplaced"; + EventType.SettingsChanged = "settingsChanged"; + })(EventType = Office.EventType || (Office.EventType = {})); +})(Office || (Office = {})); +var OSF; +(function (OSF) { + var TableDataProperties; + (function (TableDataProperties) { + TableDataProperties["TableRows"] = "TableRows"; + TableDataProperties["TableHeaders"] = "TableHeaders"; + })(TableDataProperties = OSF.TableDataProperties || (OSF.TableDataProperties = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var OUtil; + (function (OUtil) { + var HostThemeButtonStyleKeys; + (function (HostThemeButtonStyleKeys) { + HostThemeButtonStyleKeys["ButtonBorderColor"] = "buttonBorderColor"; + HostThemeButtonStyleKeys["ButtonBackgroundColor"] = "buttonBackgroundColor"; + })(HostThemeButtonStyleKeys = OUtil.HostThemeButtonStyleKeys || (OUtil.HostThemeButtonStyleKeys = {})); + var ExcelCommonUI; + (function (ExcelCommonUI) { + ExcelCommonUI["HostButtonBorderColor"] = "#86bfa0"; + ExcelCommonUI["HostButtonBackgroundColor"] = "#d3f0e0"; + })(ExcelCommonUI || (ExcelCommonUI = {})); + ; + var WordCommonUI; + (function (WordCommonUI) { + WordCommonUI["HostButtonBorderColor"] = "#a3bde3"; + WordCommonUI["HostButtonBackgroundColor"] = "#d5e1f2"; + })(WordCommonUI || (WordCommonUI = {})); + ; + var PowerPointCommonUI; + (function (PowerPointCommonUI) { + PowerPointCommonUI["HostButtonBorderColor"] = "#f5ba9d"; + PowerPointCommonUI["HostButtonBackgroundColor"] = "#fcf0ed"; + })(PowerPointCommonUI || (PowerPointCommonUI = {})); + ; + function finalizeProperties(obj, descriptor) { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for (var i = 0; i < propsLength; i++) { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable = descriptor.writable || false; + } + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + } + OUtil.finalizeProperties = finalizeProperties; + function defineEnumerableProperties(obj, descriptors) { + return defineNondefaultProperties(obj, descriptors, ["enumerable"]); + } + OUtil.defineEnumerableProperties = defineEnumerableProperties; + function defineEnumerableProperty(obj, prop, descriptor) { + return defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + } + OUtil.defineEnumerableProperty = defineEnumerableProperty; + function listContainsKey(list, key) { + for (var item in list) { + if (key == item) { + return true; + } + } + return false; + } + OUtil.listContainsKey = listContainsKey; + function augmentList(list, addenda) { + var add = list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key] = value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + } + OUtil.augmentList = augmentList; + function createObject(properties) { + var obj = null; + if (properties) { + obj = {}; + var len = properties.length; + for (var i = 0; i < len; i++) { + obj[properties[i].name] = properties[i].value; + } + } + return obj; + } + OUtil.createObject = createObject; + function listContainsValue(list, value) { + for (var item in list) { + if (value == list[item]) { + return true; + } + } + return false; + } + OUtil.listContainsValue = listContainsValue; + function shouldUseLocalStorageToPassMessage() { + try { + var osList = [ + "Windows NT 6.1", + "Windows NT 6.2", + "Windows NT 6.3", + "Windows NT 10.0" + ]; + var userAgent = window.navigator.userAgent; + for (var i = 0, len = osList.length; i < len; i++) { + if (userAgent.indexOf(osList[i]) > -1) { + return isInternetExplorer(); + } + } + return false; + } + catch (e) { + logExceptionToBrowserConsole("Error happens in shouldUseLocalStorageToPassMessage.", e); + return false; + } + } + OUtil.shouldUseLocalStorageToPassMessage = shouldUseLocalStorageToPassMessage; + function isInternetExplorer() { + try { + var userAgent = window.navigator.userAgent; + return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1 || userAgent.indexOf("Edge/") > -1; + } + catch (e) { + logExceptionToBrowserConsole("Error happens in isInternetExplorer.", e); + return false; + } + } + OUtil.isInternetExplorer = isInternetExplorer; + function serializeObjectToString(obj) { + if (typeof (JSON) !== "undefined") { + try { + return JSON.stringify(obj); + } + catch (ex) { + } + } + return ""; + } + OUtil.serializeObjectToString = serializeObjectToString; + function formatString() { + var arglist = []; + for (var _i = 0; _i < arguments.length; _i++) { + arglist[_i] = arguments[_i]; + } + var args = arglist; + var source = args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index = parseInt(number, 10) + 1; + return args[index] === undefined ? '{' + number + '}' : args[index]; + }); + } + OUtil.formatString = formatString; + function addHostInfoAsQueryParam(url, hostInfoValue) { + if (!url) { + return null; + } + url = url.trim() || ''; + var questionMark = "?"; + var hostInfo = "_host_Info="; + var ampHostInfo = "&_host_Info="; + var fragmentSeparator = "#"; + var urlParts = url.split(fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(fragmentSeparator); + var querySplits = urlWithoutFragment.split(questionMark); + var urlWithoutFragmentWithHostInfo; + if (querySplits.length > 1) { + urlWithoutFragmentWithHostInfo = urlWithoutFragment + ampHostInfo + hostInfoValue; + } + else if (querySplits.length > 0) { + urlWithoutFragmentWithHostInfo = urlWithoutFragment + questionMark + hostInfo + hostInfoValue; + } + if (fragment) { + return [urlWithoutFragmentWithHostInfo, fragmentSeparator, fragment].join(''); + } + else { + return urlWithoutFragmentWithHostInfo; + } + } + OUtil.addHostInfoAsQueryParam = addHostInfoAsQueryParam; + function getHostnamePortionForLogging(hostname) { + var hostnameSubstrings = hostname.split('.'); + var len = hostnameSubstrings.length; + if (len >= 2) { + return hostnameSubstrings[len - 2] + "." + hostnameSubstrings[len - 1]; + } + else if (len == 1) { + return hostnameSubstrings[0]; + } + } + OUtil.getHostnamePortionForLogging = getHostnamePortionForLogging; + function shallowCopy(sourceObj) { + if (sourceObj == null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr = []; + for (var i = 0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj = sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property] = sourceObj[property]; + } + } + return copyObj; + } + } + OUtil.shallowCopy = shallowCopy; + function getXdmEventName(targetId, eventType) { + if (eventType == OSF.EventType.BindingSelectionChanged || + eventType == OSF.EventType.BindingDataChanged || + eventType == OSF.EventType.DataNodeDeleted || + eventType == OSF.EventType.DataNodeInserted || + eventType == OSF.EventType.DataNodeReplaced) { + return targetId + "_" + eventType; + } + else { + return eventType; + } + } + OUtil.getXdmEventName = getXdmEventName; + function getCommonUI() { + var hostType = Office.context.host; + switch (hostType) { + case Office.HostType.Excel: + return ExcelCommonUI; + case Office.HostType.Word: + return WordCommonUI; + case Office.HostType.PowerPoint: + return PowerPointCommonUI; + } + return null; + } + OUtil.getCommonUI = getCommonUI; + function getDomainForUrl(url) { + if (!url) { + return null; + } + var url_parser = document.createElement('a'); + url_parser.href = url; + return url_parser.protocol + "//" + url_parser.host; + } + OUtil.getDomainForUrl = getDomainForUrl; + function delayExecutionAndCache() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var obj = { calc: args[0] }; + if (obj.calc) { + obj.val = obj.calc.apply(this, args); + delete obj.calc; + } + return obj.val; + } + OUtil.delayExecutionAndCache = delayExecutionAndCache; + var _uniqueId = -1; + function getUniqueId() { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString(); + } + OUtil.getUniqueId = getUniqueId; + function defineNondefaultProperties(obj, descriptors, attributes) { + descriptors = descriptors || {}; + for (var prop in descriptors) { + defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + } + function defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor = descriptor || {}; + for (var nd in attributes) { + var attribute = attributes[nd]; + if (descriptor[attribute] == undefined) { + descriptor[attribute] = true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + } + function logExceptionToBrowserConsole(message, exception) { + OSF.Utility.trace(message + " Exception details: " + serializeObjectToString(exception)); + } + })(OUtil = OSF.OUtil || (OSF.OUtil = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var ParameterNames; + (function (ParameterNames) { + ParameterNames.BindingType = "bindingType"; + ParameterNames.CoercionType = "coercionType"; + ParameterNames.ValueFormat = "valueFormat"; + ParameterNames.FilterType = "filterType"; + ParameterNames.Columns = "columns"; + ParameterNames.SampleData = "sampleData"; + ParameterNames.GoToType = "goToType"; + ParameterNames.SelectionMode = "selectionMode"; + ParameterNames.Id = "id"; + ParameterNames.PromptText = "promptText"; + ParameterNames.ItemName = "itemName"; + ParameterNames.FailOnCollision = "failOnCollision"; + ParameterNames.StartRow = "startRow"; + ParameterNames.StartColumn = "startColumn"; + ParameterNames.RowCount = "rowCount"; + ParameterNames.ColumnCount = "columnCount"; + ParameterNames.Rows = "rows"; + ParameterNames.OverwriteIfStale = "overwriteIfStale"; + ParameterNames.FileType = "fileType"; + ParameterNames.EventType = "eventType"; + ParameterNames.Handler = "handler"; + ParameterNames.SliceSize = "sliceSize"; + ParameterNames.SliceIndex = "sliceIndex"; + ParameterNames.ActiveView = "activeView"; + ParameterNames.Status = "status"; + ParameterNames.PlatformType = "platformType"; + ParameterNames.HostType = "hostType"; + ParameterNames.Email = "email"; + ParameterNames.OfficeTheme = "officeTheme"; + ParameterNames.DocumentTheme = "documentTheme"; + ParameterNames.ForceConsent = "forceConsent"; + ParameterNames.ForceAddAccount = "forceAddAccount"; + ParameterNames.AuthChallenge = "authChallenge"; + ParameterNames.AllowConsentPrompt = "allowConsentPrompt"; + ParameterNames.ForMSGraphAccess = "forMSGraphAccess"; + ParameterNames.AllowSignInPrompt = "allowSignInPrompt"; + ParameterNames.JsonPayload = "jsonPayload"; + ParameterNames.EnableNewHosts = "enableNewHosts"; + ParameterNames.AccountTypeFilter = "accountTypeFilter"; + ParameterNames.AddinTrustId = "addinTrustId"; + ParameterNames.Reserved = "reserved"; + ParameterNames.Tcid = "tcid"; + ParameterNames.Xml = "xml"; + ParameterNames.Namespace = "namespace"; + ParameterNames.Prefix = "prefix"; + ParameterNames.XPath = "xPath"; + ParameterNames.Text = "text"; + ParameterNames.ImageLeft = "imageLeft"; + ParameterNames.ImageTop = "imageTop"; + ParameterNames.ImageWidth = "imageWidth"; + ParameterNames.ImageHeight = "imageHeight"; + ParameterNames.TaskId = "taskId"; + ParameterNames.FieldId = "fieldId"; + ParameterNames.FieldValue = "fieldValue"; + ParameterNames.ServerUrl = "serverUrl"; + ParameterNames.ListName = "listName"; + ParameterNames.ResourceId = "resourceId"; + ParameterNames.ViewType = "viewType"; + ParameterNames.ViewName = "viewName"; + ParameterNames.GetRawValue = "getRawValue"; + ParameterNames.CellFormat = "cellFormat"; + ParameterNames.TableOptions = "tableOptions"; + ParameterNames.TaskIndex = "taskIndex"; + ParameterNames.ResourceIndex = "resourceIndex"; + ParameterNames.CustomFieldId = "customFieldId"; + ParameterNames.Url = "url"; + ParameterNames.MessageHandler = "messageHandler"; + ParameterNames.Width = "width"; + ParameterNames.Height = "height"; + ParameterNames.RequireHTTPs = "requireHTTPS"; + ParameterNames.DisplayInIframe = "displayInIframe"; + ParameterNames.HideTitle = "hideTitle"; + ParameterNames.UseDeviceIndependentPixels = "useDeviceIndependentPixels"; + ParameterNames.PromptBeforeOpen = "promptBeforeOpen"; + ParameterNames.EnforceAppDomain = "enforceAppDomain"; + ParameterNames.UrlNoHostInfo = "urlNoHostInfo"; + ParameterNames.Base64 = "base64"; + ParameterNames.FormId = "formId"; + })(ParameterNames = OSF.ParameterNames || (OSF.ParameterNames = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var SafeArrayDelegate; + (function (SafeArrayDelegate) { + ; + ; + function executeAsync(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + OSF._OfficeAppFactory.getClientHostController().execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { + var result; + var status; + if (typeof hostResponseArgs === "number") { + result = []; + status = hostResponseArgs; + } + else { + result = hostResponseArgs.toArray(); + status = result[0]; + } + if (status == 1) { + var payload = result[1]; + payload = fromSafeArray(payload); + if (payload != null) { + if (!args._chunkResultData) { + args._chunkResultData = new Array(); + } + args._chunkResultData[payload[0]] = payload[1]; + } + return false; + } + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + var payload; + if (status == 0) { + if (result.length > 2) { + payload = []; + for (var i = 1; i < result.length; i++) + payload[i - 1] = result[i]; + } + else { + payload = result[1]; + } + if (args._chunkResultData) { + payload = fromSafeArray(payload); + if (payload != null) { + var expectedChunkCount = payload[payload.length - 1]; + if (args._chunkResultData.length == expectedChunkCount) { + payload[payload.length - 1] = args._chunkResultData; + } + else { + status = 5001; + } + } + } + } + else { + payload = result[1]; + } + args.onComplete(status, payload); + } + return true; + }); + } + catch (ex) { + OSF.SafeArrayDelegate.onException(ex, args); + } + } + SafeArrayDelegate.executeAsync = executeAsync; + function registerEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = getOnAfterRegisterEvent(true, args); + try { + OSF._OfficeAppFactory.getClientHostController().registerEvent(args.dispId, undefined, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.SafeArrayDelegate.onException(ex, args); + } + } + SafeArrayDelegate.registerEventAsync = registerEventAsync; + function unregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = getOnAfterRegisterEvent(false, args); + try { + OSF._OfficeAppFactory.getClientHostController().unregisterEvent(args.dispId, undefined, args.targetId, callback); + } + catch (ex) { + OSF.SafeArrayDelegate.onException(ex, args); + } + } + SafeArrayDelegate.unregisterEventAsync = unregisterEventAsync; + function onException(ex, args) { + var status; + var statusNumber = ex.number; + if (statusNumber) { + switch (statusNumber) { + case -2146828218: + status = 7000; + break; + case -2147467259: + if (args.dispId == OSF.EventDispId.dispidDialogMessageReceivedEvent) { + status = 12007; + } + else { + status = 5001; + } + break; + case -2146828283: + status = 5010; + break; + case -2147209089: + status = 5010; + break; + case -2147208704: + status = 5100; + break; + case -2146827850: + default: + status = 5001; + break; + } + } + if (args.onComplete) { + args.onComplete(status || 5001); + } + } + SafeArrayDelegate.onException = onException; + function onExceptionSyncMethod(ex, args) { + var status; + var number = ex.number; + if (number) { + switch (number) { + case -2146828218: + status = 7000; + break; + case -2146827850: + default: + status = 5001; + break; + } + } + return status || 5001; + } + SafeArrayDelegate.onExceptionSyncMethod = onExceptionSyncMethod; + function getOnAfterRegisterEvent(register, args) { + var startTime = (new Date()).getTime(); + return function (hostResponseArgs) { + if (args.onReceiving) { + args.onReceiving(); + } + var status = hostResponseArgs.toArray ? hostResponseArgs.toArray()[0] : hostResponseArgs; + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + return true; + }; + } + SafeArrayDelegate.getOnAfterRegisterEvent = getOnAfterRegisterEvent; + function toArray(args) { + var arrArgs = args; + if (OSF.OUtil.isArray(args)) { + var len = arrArgs.length; + for (var i = 0; i < len; i++) { + arrArgs[i] = toArray(arrArgs[i]); + } + } + else if (OSF.OUtil.isDate(args)) { + arrArgs = args.getVarDate(); + } + else if (typeof args === "object" && !OSF.OUtil.isArray(args)) { + arrArgs = []; + for (var index in args) { + if (!OSF.OUtil.isFunction(args[index])) { + arrArgs[index] = toArray(args[index]); + } + } + } + return arrArgs; + } + function fromSafeArray(value) { + var ret = value; + if (value != null && value.toArray) { + var arrayResult = value.toArray(); + ret = new Array(arrayResult.length); + for (var i = 0; i < arrayResult.length; i++) { + ret[i] = fromSafeArray(arrayResult[i]); + } + } + return ret; + } + })(SafeArrayDelegate = OSF.SafeArrayDelegate || (OSF.SafeArrayDelegate = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var SettingsChangedEventArgs = (function () { + function SettingsChangedEventArgs(m_settingsInstance) { + this.m_settingsInstance = m_settingsInstance; + } + Object.defineProperty(SettingsChangedEventArgs.prototype, "type", { + get: function () { + return OSF.EventType.SettingsChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SettingsChangedEventArgs.prototype, "settings", { + get: function () { + return this.m_settingsInstance; + }, + enumerable: true, + configurable: true + }); + return SettingsChangedEventArgs; + }()); + OSF.SettingsChangedEventArgs = SettingsChangedEventArgs; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var SpecialProcessor = (function () { + function SpecialProcessor(complexTypes, dynamicTypes) { + this._complexTypes = complexTypes; + this.dynamicTypes = dynamicTypes; + } + SpecialProcessor.prototype.addComplexType = function (complexType) { + this._complexTypes.push(complexType); + }; + SpecialProcessor.prototype.getDynamicType = function (dynamicType) { + return this.dynamicTypes[dynamicType]; + }; + SpecialProcessor.prototype.setDynamicType = function (dynamicType, handler) { + this.dynamicTypes[dynamicType] = handler; + }; + SpecialProcessor.prototype.isComplexType = function (type) { + return OSF.OUtil.listContainsValue(this._complexTypes, type); + }; + SpecialProcessor.prototype.isDynamicType = function (type) { + return OSF.OUtil.listContainsKey(this.dynamicTypes, type); + }; + SpecialProcessor.prototype.preserveNesting = function (p) { + return false; + }; + SpecialProcessor.prototype.pack = function (type, arg) { + var value; + if (this.isDynamicType(type)) { + value = this.dynamicTypes[type].toHost(arg); + } + else { + value = arg; + } + return value; + }; + SpecialProcessor.prototype.unpack = function (type, arg) { + var value; + if (this.isDynamicType(type)) { + value = this.dynamicTypes[type].fromHost(arg); + } + else { + value = arg; + } + return value; + }; + return SpecialProcessor; + }()); + OSF.SpecialProcessor = SpecialProcessor; +})(OSF || (OSF = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OSF; +(function (OSF) { + var SafeArraySpecialProcessor = (function (_super) { + __extends(SafeArraySpecialProcessor, _super); + function SafeArraySpecialProcessor() { + var _this = this; + var tableRows = 0; + var tableHeaders = 1; + var complexTypes = []; + var dynamicTypes = {}; + dynamicTypes[OSF.ParameterNames.Data] = { + toHost: function (data) { + if (OSF.TableDataProperties && typeof data != "string" && data[OSF.TableDataProperties.TableRows] !== undefined) { + var tableData = []; + tableData[tableRows] = data[OSF.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.TableDataProperties.TableHeaders]; + data = tableData; + } + return data; + }, + fromHost: function (hostArgs) { + var ret; + if (hostArgs.toArray) { + var dimensions = hostArgs.dimensions(); + if (dimensions === 2) { + ret = OSF.Utility.twoDVBArrayToJaggedArray(hostArgs); + } + else { + var array = hostArgs.toArray(); + if (array.length === 2 && ((array[0] != null && array[0].toArray) || (array[1] != null && array[1].toArray))) { + ret = {}; + ret[OSF.TableDataProperties.TableRows] = OSF.Utility.twoDVBArrayToJaggedArray(array[tableRows]); + ret[OSF.TableDataProperties.TableHeaders] = OSF.Utility.twoDVBArrayToJaggedArray(array[tableHeaders]); + } + else { + ret = array; + } + } + } + else { + ret = hostArgs; + } + return ret; + } + }; + _this = _super.call(this, complexTypes, dynamicTypes) || this; + return _this; + } + SafeArraySpecialProcessor.prototype.unpack = function (param, arg) { + var value; + if (this.isComplexType(param) || OSF.ListType.isListType(param)) { + var toArraySupported = arg !== undefined && arg.toArray !== undefined; + value = toArraySupported ? arg.toArray() : arg || {}; + } + else if (this.isDynamicType(param)) { + value = this.dynamicTypes[param].fromHost(arg); + } + else { + value = arg; + } + return value; + }; + return SafeArraySpecialProcessor; + }(OSF.SpecialProcessor)); + OSF.SafeArraySpecialProcessor = SafeArraySpecialProcessor; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var SyncMethodCall = (function () { + function SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + this._requiredCount = requiredParameters.length; + this._apiMethods = new OSF.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + this._supportedOptions = supportedOptions; + } + SyncMethodCall.prototype.verifyAndExtractCall = function (userArgs, caller, stateInfo) { + var required = this._apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options = this.extractOptions(userArgs, required, caller, stateInfo); + var callArgs = this._apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + SyncMethodCall.prototype.extractOptions = function (userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > this._requiredCount + 1) { + throw OSF.Utility.createParameterException(Strings.OfficeOM.L_TooManyArguments); + } + var options; + for (var i = userArgs.length - 1; i >= this._requiredCount; i--) { + var argument = userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OSF.Utility.createParameterException(Strings.OfficeOM.L_TooManyArguments); + } + else { + options = argument; + } + break; + default: + throw OSF.Utility.createArgumentException(Strings.OfficeOM.L_InValidOptionalArgument); + } + } + options = this._apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + this._apiMethods.verifyArguments(this._supportedOptions, options); + return options; + }; + return SyncMethodCall; + }()); + OSF.SyncMethodCall = SyncMethodCall; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var SyncMethodCalls; + (function (SyncMethodCalls) { + var syncMethodCalls = {}; + function define(callDefinition) { + syncMethodCalls[callDefinition.method] = manufacture(callDefinition); + } + SyncMethodCalls.define = define; + function get(method) { + return syncMethodCalls[method]; + } + SyncMethodCalls.get = get; + function manufacture(params) { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.SyncMethodCall(params.requiredArguments || [], supportedOptions, params.privateStateCallbacks, params.checkCallArgs, params.method.displayName); + } + })(SyncMethodCalls = OSF.SyncMethodCalls || (OSF.SyncMethodCalls = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + OSF.SyncMethods = { + MessageParent: "messageParent", + MessageChild: "messageChild", + SendMessage: "sendMessage", + AddMessageHandler: "addEventHandler" + }; +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var DDA; + (function (DDA) { + var Theming; + (function (Theming) { + var DocumentThemeEnum; + (function (DocumentThemeEnum) { + DocumentThemeEnum["PrimaryFontColor"] = "primaryFontColor"; + DocumentThemeEnum["PrimaryBackgroundColor"] = "primaryBackgroundColor"; + DocumentThemeEnum["SecondaryFontColor"] = "secondaryFontColor"; + DocumentThemeEnum["SecondaryBackgroundColor"] = "secondaryBackgroundColor"; + DocumentThemeEnum["Accent1"] = "accent1"; + DocumentThemeEnum["Accent2"] = "accent2"; + DocumentThemeEnum["Accent3"] = "accent3"; + DocumentThemeEnum["Accent4"] = "accent4"; + DocumentThemeEnum["Accent5"] = "accent5"; + DocumentThemeEnum["Accent6"] = "accent6"; + DocumentThemeEnum["Hyperlink"] = "hyperlink"; + DocumentThemeEnum["FollowedHyperlink"] = "followedHyperlink"; + DocumentThemeEnum["HeaderLatinFont"] = "headerLatinFont"; + DocumentThemeEnum["HeaderEastAsianFont"] = "headerEastAsianFont"; + DocumentThemeEnum["HeaderScriptFont"] = "headerScriptFont"; + DocumentThemeEnum["HeaderLocalizedFont"] = "headerLocalizedFont"; + DocumentThemeEnum["BodyLatinFont"] = "bodyLatinFont"; + DocumentThemeEnum["BodyEastAsianFont"] = "bodyEastAsianFont"; + DocumentThemeEnum["BodyScriptFont"] = "bodyScriptFont"; + DocumentThemeEnum["BodyLocalizedFont"] = "bodyLocalizedFont"; + })(DocumentThemeEnum = Theming.DocumentThemeEnum || (Theming.DocumentThemeEnum = {})); + var OfficeThemeEnum; + (function (OfficeThemeEnum) { + OfficeThemeEnum["BodyBackgroundColor"] = "bodyBackgroundColor"; + OfficeThemeEnum["BodyForegroundColor"] = "bodyForegroundColor"; + OfficeThemeEnum["ControlBackgroundColor"] = "controlBackgroundColor"; + OfficeThemeEnum["ControlForegroundColor"] = "controlForegroundColor"; + OfficeThemeEnum["IsDarkTheme"] = "isDarkTheme"; + })(OfficeThemeEnum = Theming.OfficeThemeEnum || (Theming.OfficeThemeEnum = {})); + var OfficeThemeEnumWac; + (function (OfficeThemeEnumWac) { + OfficeThemeEnumWac["PrimaryFontColor"] = "primaryFontColor"; + OfficeThemeEnumWac["PrimaryBackgroundColor"] = "primaryBackgroundColor"; + OfficeThemeEnumWac["SecondaryFontColor"] = "secondaryFontColor"; + OfficeThemeEnumWac["SecondaryBackgroundColor"] = "secondaryBackgroundColor"; + OfficeThemeEnumWac["IsDarkTheme"] = "isDarkTheme"; + })(OfficeThemeEnumWac = Theming.OfficeThemeEnumWac || (Theming.OfficeThemeEnumWac = {})); + function ConvertToDocumentTheme(response) { + var mappingDocumentTheme = [ + { name: OSF.DDA.Theming.DocumentThemeEnum.PrimaryFontColor, needToConvertToHex: true }, + { name: OSF.DDA.Theming.DocumentThemeEnum.PrimaryBackgroundColor, needToConvertToHex: true }, + { name: OSF.DDA.Theming.DocumentThemeEnum.SecondaryFontColor, needToConvertToHex: true }, + { name: OSF.DDA.Theming.DocumentThemeEnum.SecondaryBackgroundColor, needToConvertToHex: true }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent1, needToConvertToHex: true }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent2, needToConvertToHex: true }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent3, needToConvertToHex: true }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent4, needToConvertToHex: true }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent5, needToConvertToHex: true }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent6, needToConvertToHex: true }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Hyperlink, needToConvertToHex: true }, + { name: OSF.DDA.Theming.DocumentThemeEnum.FollowedHyperlink, needToConvertToHex: true }, + { name: OSF.DDA.Theming.DocumentThemeEnum.HeaderLatinFont, needToConvertToHex: false }, + { name: OSF.DDA.Theming.DocumentThemeEnum.HeaderEastAsianFont, needToConvertToHex: false }, + { name: OSF.DDA.Theming.DocumentThemeEnum.HeaderScriptFont, needToConvertToHex: false }, + { name: OSF.DDA.Theming.DocumentThemeEnum.HeaderLocalizedFont, needToConvertToHex: false }, + { name: OSF.DDA.Theming.DocumentThemeEnum.BodyLatinFont, needToConvertToHex: false }, + { name: OSF.DDA.Theming.DocumentThemeEnum.BodyEastAsianFont, needToConvertToHex: false }, + { name: OSF.DDA.Theming.DocumentThemeEnum.BodyScriptFont, needToConvertToHex: false }, + { name: OSF.DDA.Theming.DocumentThemeEnum.BodyLocalizedFont, needToConvertToHex: false } + ]; + var result = {}; + for (var i = 0; i < mappingDocumentTheme.length; i++) { + if (mappingDocumentTheme[i].needToConvertToHex) { + result[mappingDocumentTheme[i].name] = OSF.OUtil.convertIntToCssHexColor(response[mappingDocumentTheme[i].name]); + } + else { + result[mappingDocumentTheme[i].name] = response[mappingDocumentTheme[i].name]; + } + } + return result; + } + Theming.ConvertToDocumentTheme = ConvertToDocumentTheme; + function GetIsDarkThemeFromCSSHexColor(themeColor) { + var color = themeColor.charAt(0) === "#" ? themeColor.substring(1, 7) : themeColor; + var r = parseInt(color.substring(0, 2), 16); + var g = parseInt(color.substring(2, 4), 16); + var b = parseInt(color.substring(4, 6), 16); + var fIsDarkTheme = r * 0.299 + g * 0.587 + b * 0.114 < 186 ? true : false; + return fIsDarkTheme; + } + Theming.GetIsDarkThemeFromCSSHexColor = GetIsDarkThemeFromCSSHexColor; + function ConvertToOfficeTheme(response) { + var result = {}; + for (var key in response) { + result[key] = OSF.OUtil.convertIntToCssHexColor(response[key]); + } + if (result[OSF.DDA.Theming.OfficeThemeEnum.BodyBackgroundColor]) { + result[OSF.DDA.Theming.OfficeThemeEnum.IsDarkTheme] = + GetIsDarkThemeFromCSSHexColor(result[OSF.DDA.Theming.OfficeThemeEnum.BodyBackgroundColor]); + } + return result; + } + Theming.ConvertToOfficeTheme = ConvertToOfficeTheme; + var OfficeThemeChangedEventArgs = (function () { + function OfficeThemeChangedEventArgs(officeThemeData) { + var ret = null; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.hostPlatform == OSF.HostInfoPlatform.web) { + var fIsDarkTheme = GetIsDarkThemeFromCSSHexColor(officeThemeData.bodyBackgroundColor); + ret = officeThemeData; + ret.isDarkTheme = fIsDarkTheme; + Office.context.officeTheme.bodyBackgroundColor = officeThemeData.bodyBackgroundColor; + Office.context.officeTheme.bodyForegroundColor = officeThemeData.bodyForegroundColor; + Office.context.officeTheme.controlBackgroundColor = officeThemeData.controlBackgroundColor; + Office.context.officeTheme.controlForegroundColor = officeThemeData.controlForegroundColor; + Office.context.officeTheme.isDarkTheme = fIsDarkTheme; + } + else { + ret = ConvertToOfficeTheme(officeThemeData); + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.OfficeThemeChanged + }, + "officeTheme": { + value: ret + } + }); + } + return OfficeThemeChangedEventArgs; + }()); + Theming.OfficeThemeChangedEventArgs = OfficeThemeChangedEventArgs; + var DocumentThemeChangedEventArgs = (function () { + function DocumentThemeChangedEventArgs(documentTheme) { + var ret = ConvertToDocumentTheme(documentTheme); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DocumentThemeChanged + }, + "documentTheme": { + value: ret + } + }); + } + return DocumentThemeChangedEventArgs; + }()); + Theming.DocumentThemeChangedEventArgs = DocumentThemeChangedEventArgs; + })(Theming = DDA.Theming || (DDA.Theming = {})); + })(DDA = OSF.DDA || (OSF.DDA = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var V10ApiFeatureRegistry; + (function (V10ApiFeatureRegistry) { + var apiFeatures = []; + function initialize() { + apiFeatures.forEach(function (apiFeature) { + apiFeature.defineMethodsFunc(); + if (OSF.OUtil.getHostPlatform() == OSF.HostInfoPlatform.web) { + if (typeof apiFeature.defineWebParameterMapFunc == "function") { + apiFeature.defineWebParameterMapFunc(); + } + } + else { + if (typeof apiFeature.defineSafeArrayParameterMapFunc == "function") { + apiFeature.defineSafeArrayParameterMapFunc(); + } + } + if (typeof apiFeature.initializeFunc == "function") { + apiFeature.initializeFunc(); + } + }); + } + V10ApiFeatureRegistry.initialize = initialize; + function register(apiFeature) { + apiFeatures.push(apiFeature); + } + V10ApiFeatureRegistry.register = register; + })(V10ApiFeatureRegistry = OSF.V10ApiFeatureRegistry || (OSF.V10ApiFeatureRegistry = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WACDelegate; + (function (WACDelegate) { + WACDelegate.version = 1; + var UniqueArguments; + (function (UniqueArguments) { + UniqueArguments["Data"] = "Data"; + UniqueArguments["Properties"] = "Properties"; + UniqueArguments["BindingRequest"] = "DdaBindingsMethod"; + UniqueArguments["BindingResponse"] = "Bindings"; + UniqueArguments["SingleBindingResponse"] = "singleBindingResponse"; + UniqueArguments["GetData"] = "DdaGetBindingData"; + UniqueArguments["AddRowsColumns"] = "DdaAddRowsColumns"; + UniqueArguments["SetData"] = "DdaSetBindingData"; + UniqueArguments["ClearFormats"] = "DdaClearBindingFormats"; + UniqueArguments["SetFormats"] = "DdaSetBindingFormats"; + UniqueArguments["SettingsRequest"] = "DdaSettingsMethod"; + UniqueArguments["BindingEventSource"] = "ddaBinding"; + UniqueArguments["ArrayData"] = "ArrayData"; + })(UniqueArguments = WACDelegate.UniqueArguments || (WACDelegate.UniqueArguments = {})); + function executeAsync(args) { + if (!args.hostCallArgs) { + args.hostCallArgs = {}; + } + args.hostCallArgs["DdaMethod"] = { + "ControlId": OSF._OfficeAppFactory.getId(), + "Version": OSF.WACDelegate.version, + "DispatchId": args.dispId + }; + args.hostCallArgs["__timeout__"] = -1; + if (args.onCalling) { + args.onCalling(); + } + if (!OSF.getClientEndPoint()) { + return; + } + OSF.getClientEndPoint().invoke("executeMethod", function (xdmStatus, payload) { + if (args.onReceiving) { + args.onReceiving(); + } + var error; + if (xdmStatus == 0) { + OSF.WACDelegate.version = payload["Version"]; + error = payload["Error"]; + } + else { + switch (xdmStatus) { + case -5: + error = 7000; + break; + default: + error = 5001; + break; + } + } + if (args.onComplete) { + args.onComplete(error, payload); + } + }, args.hostCallArgs); + } + WACDelegate.executeAsync = executeAsync; + function getOnAfterRegisterEvent(register, args) { + var startTime = (new Date()).getTime(); + return function (xdmStatus, payload) { + if (args.onReceiving) { + args.onReceiving(); + } + var status; + if (xdmStatus != 0) { + switch (xdmStatus) { + case -5: + status = 7000; + break; + default: + status = 5001; + break; + } + } + else { + if (payload) { + if (payload["Error"]) { + status = payload["Error"]; + } + else { + status = 0; + } + } + else { + status = 5001; + } + } + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + }; + } + WACDelegate.getOnAfterRegisterEvent = getOnAfterRegisterEvent; + function registerEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + if (!OSF.getClientEndPoint()) { + return; + } + OSF.getClientEndPoint().registerForEvent(OSF.OUtil.getXdmEventName(args.targetId, args.eventType), function OSF_DDA_WACOMFacade$OnEvent(payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, getOnAfterRegisterEvent(true, args), { + "controlId": OSF._OfficeAppFactory.getId(), + "eventDispId": args.dispId, + "targetId": args.targetId + }); + } + WACDelegate.registerEventAsync = registerEventAsync; + function unregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + if (!OSF.getClientEndPoint()) { + return; + } + OSF.getClientEndPoint().unregisterForEvent(OSF.OUtil.getXdmEventName(args.targetId, args.eventType), getOnAfterRegisterEvent(false, args), { + "controlId": OSF._OfficeAppFactory.getId(), + "eventDispId": args.dispId, + "targetId": args.targetId + }); + } + WACDelegate.unregisterEventAsync = unregisterEventAsync; + })(WACDelegate = OSF.WACDelegate || (OSF.WACDelegate = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WebSpecialProcessor = (function (_super) { + __extends(WebSpecialProcessor, _super); + function WebSpecialProcessor() { + var _this = this; + var complexTypes = [ + OSF.WACDelegate.UniqueArguments.SingleBindingResponse, + OSF.WACDelegate.UniqueArguments.BindingRequest, + OSF.WACDelegate.UniqueArguments.BindingResponse, + OSF.WACDelegate.UniqueArguments.GetData, + OSF.WACDelegate.UniqueArguments.AddRowsColumns, + OSF.WACDelegate.UniqueArguments.SetData, + OSF.WACDelegate.UniqueArguments.ClearFormats, + OSF.WACDelegate.UniqueArguments.SetFormats, + OSF.WACDelegate.UniqueArguments.SettingsRequest, + OSF.WACDelegate.UniqueArguments.BindingEventSource + ]; + var dynamicTypes = {}; + _this = _super.call(this, complexTypes, dynamicTypes) || this; + return _this; + } + return WebSpecialProcessor; + }(OSF.SpecialProcessor)); + OSF.WebSpecialProcessor = WebSpecialProcessor; +})(OSF || (OSF = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var Office; +(function (Office) { + var context; + (function (context) { + var document; + (function (document) { + var bindings; + (function (bindings) { + bindings._eventDispatches = []; + function addFromSelectionAsync(bindingType, options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.AddFromSelectionAsync, arguments, this, undefined); + } + bindings.addFromSelectionAsync = addFromSelectionAsync; + function addFromNamedItemAsync(itemName, bindingType, options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.AddFromNamedItemAsync, arguments, this, undefined); + } + bindings.addFromNamedItemAsync = addFromNamedItemAsync; + function addFromPromptAsync(bindingType, options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.AddFromPromptAsync, arguments, this, undefined); + } + bindings.addFromPromptAsync = addFromPromptAsync; + function getAllAsync(options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.GetAllAsync, arguments, this, undefined); + } + bindings.getAllAsync = getAllAsync; + function getByIdAsync(id, options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.GetByIdAsync, arguments, this, undefined); + } + bindings.getByIdAsync = getByIdAsync; + function releaseByIdAsync(id, options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.ReleaseByIdAsync, arguments, this, undefined); + } + bindings.releaseByIdAsync = releaseByIdAsync; + })(bindings = document.bindings || (document.bindings = {})); + })(document = context.document || (context.document = {})); + })(context = Office.context || (Office.context = {})); +})(Office || (Office = {})); +var OSF; +(function (OSF) { + var BindingProperties; + (function (BindingProperties) { + BindingProperties["Id"] = "BindingId"; + BindingProperties["Type"] = "bindingType"; + BindingProperties["RowCount"] = "RowCount"; + BindingProperties["ColumnCount"] = "BindingColumnCount"; + BindingProperties["HasHeaders"] = "HasHeaders"; + })(BindingProperties = OSF.BindingProperties || (OSF.BindingProperties = {})); + var ListDescriptors; + (function (ListDescriptors) { + ListDescriptors["BindingList"] = "BindingList"; + })(ListDescriptors = OSF.ListDescriptors || (OSF.ListDescriptors = {})); + OSF.ListType.setListType(OSF.ListDescriptors.BindingList, OSF.PropertyDescriptors.BindingProperties); + var EventDescriptors; + (function (EventDescriptors) { + EventDescriptors.BindingSelectionChangedEvent = "BindingSelectionChangedEvent"; + })(EventDescriptors = OSF.EventDescriptors || (OSF.EventDescriptors = {})); + var Marshaling; + (function (Marshaling) { + var BindingParameterKeys; + (function (BindingParameterKeys) { + BindingParameterKeys["Id"] = "BindingId"; + BindingParameterKeys["BindingType"] = "BindingType"; + BindingParameterKeys["ItemName"] = "ItemName"; + BindingParameterKeys["StartRow"] = "StartRow"; + BindingParameterKeys["StartCol"] = "StartCol"; + BindingParameterKeys["RowCount"] = "RowCount"; + BindingParameterKeys["ColCount"] = "ColCount"; + })(BindingParameterKeys = Marshaling.BindingParameterKeys || (Marshaling.BindingParameterKeys = {})); + ; + var TableBindingParameterKeys; + (function (TableBindingParameterKeys) { + TableBindingParameterKeys["TableHeaders"] = "TableHeaders"; + TableBindingParameterKeys["TableRows"] = "TableRows"; + })(TableBindingParameterKeys = Marshaling.TableBindingParameterKeys || (Marshaling.TableBindingParameterKeys = {})); + ; + var AppBindingKeys; + (function (AppBindingKeys) { + AppBindingKeys["BindingId"] = "Name"; + AppBindingKeys["BindingType"] = "BindingType"; + AppBindingKeys[AppBindingKeys["BindingProperties"] = 0] = "BindingProperties"; + AppBindingKeys["BindingEventSource"] = "ddaBinding"; + AppBindingKeys["RowCount"] = "RowCount"; + AppBindingKeys["ColumnCount"] = "ColCount"; + AppBindingKeys["HasHeaders"] = "HasHeaders"; + })(AppBindingKeys = Marshaling.AppBindingKeys || (Marshaling.AppBindingKeys = {})); + ; + var TableSubsetKeys; + (function (TableSubsetKeys) { + TableSubsetKeys["TableSubset"] = "subset"; + TableSubsetKeys["StartRow"] = "startRow"; + TableSubsetKeys["StartColumn"] = "startColumn"; + TableSubsetKeys["RowCount"] = "rowCount"; + TableSubsetKeys["ColumnCount"] = "columnCount"; + })(TableSubsetKeys = Marshaling.TableSubsetKeys || (Marshaling.TableSubsetKeys = {})); + ; + var BindingType; + (function (BindingType) { + BindingType[BindingType["Table"] = 1] = "Table"; + BindingType[BindingType["Text"] = 2] = "Text"; + BindingType[BindingType["Matrix"] = 3] = "Matrix"; + })(BindingType = Marshaling.BindingType || (Marshaling.BindingType = {})); + })(Marshaling = OSF.Marshaling || (OSF.Marshaling = {})); + var Bindings; + (function (Bindings) { + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + defineSafeArrayParameterMapFunc: defineSafeArrayParameterMap, + defineWebParameterMapFunc: defineWebParameterMap, + initializeFunc: initialize + }); + function defineMethods() { + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.AddFromPromptAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.BindingType, + "enum": Office.BindingType + } + ], + supportedOptions: [{ + name: OSF.ParameterNames.Id, + value: { + "types": ["string"], + "calculate": GenerateBindingId + } + }, + { + name: OSF.ParameterNames.PromptText, + value: { + "types": ["string"], + "calculate": function () { return Strings.OfficeOM.L_AddBindingFromPromptDefaultText; } + } + }, + { + name: OSF.ParameterNames.SampleData, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: function (bindingDescriptor) { return OSF.manufactureBinding(bindingDescriptor, Office.context.document); } + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.AddFromSelectionAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.BindingType, + "enum": Office.BindingType + } + ], + supportedOptions: [{ + name: OSF.ParameterNames.Id, + value: { + "types": ["string"], + "calculate": GenerateBindingId + } + }, + { + name: OSF.ParameterNames.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.AddFromNamedItemAsync, + requiredArguments: [{ + "name": OSF.ParameterNames.ItemName, + "types": ["string"] + }, + { + "name": OSF.ParameterNames.BindingType, + "enum": Office.BindingType + } + ], + supportedOptions: [{ + name: OSF.ParameterNames.Id, + value: { + "types": ["string"], + "calculate": GenerateBindingId + } + }, + { + name: OSF.ParameterNames.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [ + { + name: OSF.ParameterNames.FailOnCollision, + value: function () { return true; } + } + ], + onSucceeded: processBinding + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.GetAllAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response) { return response[OSF.ListDescriptors.BindingList].map(processBinding); } + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.GetByIdAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.ReleaseByIdAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response, caller, callArgs) { + var id = callArgs[OSF.ParameterNames.Id]; + delete caller._eventDispatches[id]; + } + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.GetDataAsync, + requiredArguments: [], + supportedOptions: [{ + name: OSF.ParameterNames.CoercionType, + value: { + "enum": Office.CoercionType, + "calculate": function (requiredArgs, binding) { return OSF.DataCoercion.getCoercionDefaultForBinding(binding.type); } + } + }, + { + name: OSF.ParameterNames.ValueFormat, + value: { + "enum": Office.ValueFormat, + "defaultValue": Office.ValueFormat.Unformatted + } + }, + { + name: OSF.ParameterNames.FilterType, + value: { + "enum": Office.FilterType, + "defaultValue": Office.FilterType.All + } + }, + { + name: OSF.ParameterNames.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: OSF.ParameterNames.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: OSF.ParameterNames.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: OSF.ParameterNames.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: OSF.ParameterNames.RowCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: OSF.ParameterNames.ColumnCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[OSF.ParameterNames.StartRow] == 0 && + callArgs[OSF.ParameterNames.StartColumn] == 0 && + callArgs[OSF.ParameterNames.RowCount] == 0 && + callArgs[OSF.ParameterNames.ColumnCount] == 0) { + delete callArgs[OSF.ParameterNames.StartRow]; + delete callArgs[OSF.ParameterNames.StartColumn]; + delete callArgs[OSF.ParameterNames.RowCount]; + delete callArgs[OSF.ParameterNames.ColumnCount]; + } + if (callArgs[OSF.ParameterNames.CoercionType] != OSF.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[OSF.ParameterNames.StartRow] || + callArgs[OSF.ParameterNames.StartColumn] || + callArgs[OSF.ParameterNames.RowCount] || + callArgs[OSF.ParameterNames.ColumnCount])) { + throw 1002; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: OSF.ParameterNames.Id, + value: getObjectId + } + ], + onSucceeded: processData + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.SetDataAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: OSF.ParameterNames.CoercionType, + value: { + "enum": Office.CoercionType, + "calculate": function (requiredArgs) { return OSF.DataCoercion.determineCoercionType(requiredArgs[OSF.ParameterNames.Data]); } + } + }, + { + name: OSF.ParameterNames.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: OSF.ParameterNames.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: OSF.ParameterNames.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: OSF.ParameterNames.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[OSF.ParameterNames.StartRow] == 0 && + callArgs[OSF.ParameterNames.StartColumn] == 0) { + delete callArgs[OSF.ParameterNames.StartRow]; + delete callArgs[OSF.ParameterNames.StartColumn]; + } + if (callArgs[OSF.ParameterNames.CoercionType] != OSF.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[OSF.ParameterNames.StartRow] || + callArgs[OSF.ParameterNames.StartColumn])) { + throw 1002; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: OSF.ParameterNames.Id, + value: getObjectId + } + ] + }); + } + function defineSafeArrayParameterMap() { + OSF.HostParameterMap.define({ + type: "bindingSpecificData", + fromHost: [ + { name: OSF.BindingProperties.RowCount, value: 0 }, + { name: OSF.BindingProperties.ColumnCount, value: 1 }, + { name: OSF.BindingProperties.HasHeaders, value: 2 } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: OSF.PropertyDescriptors.Subset, + toHost: [ + { name: "offset", value: 0 }, + { name: "run", value: 1 } + ], + canonical: true, + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: "offset", + toHost: [ + { name: OSF.ParameterNames.StartRow, value: 0 }, + { name: OSF.ParameterNames.StartColumn, value: 1 } + ], + canonical: true, + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: "run", + toHost: [ + { name: OSF.ParameterNames.RowCount, value: 0 }, + { name: OSF.ParameterNames.ColumnCount, value: 1 } + ], + canonical: true, + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: "run", + toHost: [ + { name: OSF.ParameterNames.RowCount, value: 0 }, + { name: OSF.ParameterNames.ColumnCount, value: 1 } + ], + canonical: true, + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: 79, + toHost: [ + { name: OSF.ParameterNames.Id, value: 0 }, + { name: OSF.ParameterNames.Data, value: 1 } + ] + }); + OSF.HostParameterMap.define({ + type: 73, + toHost: [ + { name: OSF.ParameterNames.Id, value: 0 } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.PropertyDescriptors.BindingProperties, + fromHost: [ + { name: OSF.BindingProperties.Id, value: 0 }, + { name: OSF.BindingProperties.Type, value: 1 }, + { name: "bindingSpecificData", value: 2 } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.BindingType, + toHost: [ + { name: Office.BindingType.Text, value: 0 }, + { name: Office.BindingType.Matrix, value: 1 }, + { name: Office.BindingType.Table, value: 2 } + ], + invertible: true + }); + OSF.HostParameterMap.define({ + type: 66, + fromHost: [ + { name: OSF.PropertyDescriptors.BindingProperties, value: OSF.HostParameterMap.self } + ], + toHost: [ + { name: OSF.ParameterNames.Id, value: 0 }, + { name: OSF.ParameterNames.BindingType, value: 1 } + ] + }); + OSF.HostParameterMap.define({ + type: 78, + fromHost: [ + { name: OSF.PropertyDescriptors.BindingProperties, value: OSF.HostParameterMap.self } + ], + toHost: [ + { name: OSF.ParameterNames.ItemName, value: 0 }, + { name: OSF.ParameterNames.Id, value: 1 }, + { name: OSF.ParameterNames.BindingType, value: 2 }, + { name: OSF.ParameterNames.FailOnCollision, value: 3 } + ] + }); + OSF.HostParameterMap.define({ + type: 67, + fromHost: [ + { name: OSF.PropertyDescriptors.BindingProperties, value: OSF.HostParameterMap.self } + ], + toHost: [ + { name: OSF.ParameterNames.Id, value: 0 }, + { name: OSF.ParameterNames.BindingType, value: 1 }, + { name: OSF.ParameterNames.PromptText, value: 2 } + ] + }); + OSF.HostParameterMap.define({ + type: 69, + toHost: [ + { name: OSF.ParameterNames.Id, value: 0 } + ] + }); + OSF.HostParameterMap.define({ + type: 68, + fromHost: [ + { name: OSF.PropertyDescriptors.BindingProperties, value: OSF.HostParameterMap.self } + ], + toHost: [ + { name: OSF.ParameterNames.Id, value: 0 } + ] + }); + OSF.HostParameterMap.define({ + type: 74, + fromHost: [ + { name: OSF.ListDescriptors.BindingList, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 70, + fromHost: [ + { name: OSF.ParameterNames.Data, value: OSF.HostParameterMap.self } + ], + toHost: [ + { name: OSF.ParameterNames.Id, value: 0 }, + { name: OSF.ParameterNames.CoercionType, value: 1 }, + { name: OSF.ParameterNames.ValueFormat, value: 2 }, + { name: OSF.ParameterNames.FilterType, value: 3 }, + { name: OSF.PropertyDescriptors.Subset, value: 4 } + ] + }); + OSF.HostParameterMap.define({ + type: 71, + toHost: [ + { name: OSF.ParameterNames.Id, value: 0 }, + { name: OSF.ParameterNames.CoercionType, value: 1 }, + { name: OSF.ParameterNames.Data, value: 2 }, + { name: "offset", value: 3 } + ] + }); + } + function defineWebParameterMap() { + OSF.HostParameterMap.define({ + type: 72, + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.AddRowsColumns, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 79, + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.AddRowsColumns, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 73, + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.BindingRequest, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.WACDelegate.UniqueArguments.AddRowsColumns, + toHost: [ + { name: OSF.ParameterNames.Id, value: "BindingId" }, + { name: OSF.ParameterNames.Data, value: OSF.WACDelegate.UniqueArguments.Data } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.PropertyDescriptors.Subset, + fromHost: [ + { name: OSF.ParameterNames.StartRow, value: "StartRow" }, + { name: OSF.ParameterNames.StartColumn, value: "StartCol" }, + { name: OSF.ParameterNames.RowCount, value: "RowCount" }, + { name: OSF.ParameterNames.ColumnCount, value: "ColCount" } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.WACDelegate.UniqueArguments.BindingRequest, + toHost: [ + { name: OSF.ParameterNames.ItemName, value: "ItemName" }, + { name: OSF.ParameterNames.Id, value: "BindingId" }, + { name: OSF.ParameterNames.BindingType, value: "BindingType" }, + { name: OSF.ParameterNames.PromptText, value: "PromptText" }, + { name: OSF.ParameterNames.Columns, value: "Columns" }, + { name: OSF.ParameterNames.SampleData, value: "SampleData" }, + { name: OSF.ParameterNames.FailOnCollision, value: "FailOnCollision" } + ] + }); + OSF.HostParameterMap.addComplexType(OSF.PropertyDescriptors.BindingProperties); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.BindingType, + toHost: [ + { name: Office.BindingType.Text, value: 2 }, + { name: Office.BindingType.Matrix, value: 3 }, + { name: Office.BindingType.Table, value: 1 } + ], + invertible: true + }); + OSF.HostParameterMap.define({ + type: OSF.PropertyDescriptors.BindingProperties, + fromHost: [ + { name: OSF.BindingProperties.Id, value: "Name" }, + { name: OSF.BindingProperties.Type, value: "BindingType" }, + { name: OSF.BindingProperties.RowCount, value: "RowCount" }, + { name: OSF.BindingProperties.ColumnCount, value: "ColCount" }, + { name: OSF.BindingProperties.HasHeaders, value: "HasHeaders" } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.WACDelegate.UniqueArguments.SingleBindingResponse, + fromHost: [ + { name: OSF.PropertyDescriptors.BindingProperties, value: 0 } + ] + }); + OSF.HostParameterMap.define({ + type: 66, + fromHost: [ + { name: OSF.WACDelegate.UniqueArguments.SingleBindingResponse, value: OSF.WACDelegate.UniqueArguments.BindingResponse } + ], + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.BindingRequest, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 67, + fromHost: [ + { name: OSF.WACDelegate.UniqueArguments.SingleBindingResponse, value: OSF.WACDelegate.UniqueArguments.BindingResponse } + ], + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.BindingRequest, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 78, + fromHost: [ + { name: OSF.WACDelegate.UniqueArguments.SingleBindingResponse, value: OSF.WACDelegate.UniqueArguments.BindingResponse } + ], + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.BindingRequest, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 69, + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.BindingRequest, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 68, + fromHost: [ + { name: OSF.WACDelegate.UniqueArguments.SingleBindingResponse, value: OSF.WACDelegate.UniqueArguments.BindingResponse } + ], + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.BindingRequest, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 74, + fromHost: [ + { name: OSF.ListDescriptors.BindingList, value: OSF.WACDelegate.UniqueArguments.BindingResponse } + ] + }); + OSF.HostParameterMap.define({ + type: 70, + fromHost: [ + { name: OSF.ParameterNames.Data, value: OSF.WACDelegate.UniqueArguments.Data } + ], + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.GetData, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 71, + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.SetData, value: OSF.HostParameterMap.self } + ] + }); + } + function initialize() { + OSF.manufactureBinding = function (bindingProperties, containingDocument) { + var id = bindingProperties[OSF.BindingProperties.Id]; + var rows = bindingProperties[OSF.BindingProperties.RowCount]; + var cols = bindingProperties[OSF.BindingProperties.ColumnCount]; + var hasHeaders = bindingProperties[OSF.BindingProperties.HasHeaders]; + var binding; + switch (bindingProperties[OSF.BindingProperties.Type]) { + case Office.BindingType.Text: + binding = new OSF.TextBinding(id, containingDocument); + break; + case Office.BindingType.Matrix: + binding = null; + binding = new OSF.MatrixBinding(id, containingDocument, rows, cols); + break; + case Office.BindingType.Table: + var isExcelApp = function () { + return OSF._OfficeAppFactory.getHostInfo().hostType == OSF.HostInfoHostType.excel + && (Office.context.document); + }; + var tableBindingObject; + if (isExcelApp() && OSF.ExcelTableBinding) { + tableBindingObject = OSF.ExcelTableBinding; + } + else { + tableBindingObject = OSF.TableBinding; + } + binding = new tableBindingObject(id, containingDocument, rows, cols, hasHeaders); + break; + default: + binding = new OSF.UnknownBinding(id, containingDocument); + } + return binding; + }; + } + function processBinding(bindingDescriptor) { + return OSF.manufactureBinding(bindingDescriptor, Office.context.document); + } + function getObjectId(obj) { return obj.id; } + function processData(dataDescriptor, caller, callArgs) { + var data = dataDescriptor[OSF.ParameterNames.Data]; + if (OSF.TableDataProperties && data && (data[OSF.TableDataProperties.TableRows] != undefined || data[OSF.TableDataProperties.TableHeaders] != undefined)) { + data = Office.manufactureTableData(data); + } + data = OSF.DataCoercion.coerceData(data, callArgs[OSF.ParameterNames.CoercionType]); + return data == undefined ? null : data; + } + })(Bindings = OSF.Bindings || (OSF.Bindings = {})); + var BindingEvents; + (function (BindingEvents) { + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + defineSafeArrayParameterMapFunc: defineSafeArrayParameterMap, + defineWebParameterMapFunc: defineWebParameterMap + }); + function defineMethods() { + } + function defineSafeArrayParameterMap() { + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidBindingSelectionChangedEvent, + fromHost: [ + { name: OSF.EventDescriptors.BindingSelectionChangedEvent, value: OSF.HostParameterMap.self } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidBindingDataChangedEvent, + fromHost: [{ name: OSF.PropertyDescriptors.BindingProperties, value: OSF.HostParameterMap.self }] + }); + } + function defineWebParameterMap() { + OSF.HostParameterMap.define({ + type: OSF.EventDescriptors.BindingSelectionChangedEvent, + fromHost: [ + { name: OSF.PropertyDescriptors.BindingProperties, value: OSF.WACDelegate.UniqueArguments.BindingEventSource }, + { name: OSF.PropertyDescriptors.Subset, value: OSF.PropertyDescriptors.Subset } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidBindingSelectionChangedEvent, + fromHost: [ + { name: OSF.EventDescriptors.BindingSelectionChangedEvent, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidBindingDataChangedEvent, + fromHost: [ + { name: OSF.PropertyDescriptors.BindingProperties, value: OSF.WACDelegate.UniqueArguments.BindingEventSource } + ] + }); + } + })(BindingEvents = OSF.BindingEvents || (OSF.BindingEvents = {})); + var BindingPromise = (function () { + function BindingPromise(bindingId) { + this.m_id = bindingId; + } + Object.defineProperty(BindingPromise.prototype, "onFail", { + get: function () { + return this.m_errorCallback; + }, + set: function (onError) { + var t = typeof onError; + if (t != "undefined" && t != "function") { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, t); + } + this.m_errorCallback = onError; + }, + enumerable: true, + configurable: true + }); + BindingPromise.prototype._fetch = function (onComplete) { + if (this.m_binding) { + if (onComplete) + onComplete(this.m_binding); + } + else { + if (!this.m_binding) { + var me = this; + Office.context.document.bindings.getByIdAsync(this.m_id, function (asyncResult) { + if (asyncResult.status == Office.AsyncResultStatus.Succeeded) { + OSF.OUtil.defineEnumerableProperty(me, "binding", { + value: asyncResult.value + }); + if (onComplete) + onComplete(me.m_binding); + } + else { + if (me.onFail) + me.onFail(asyncResult); + } + }); + } + } + return this; + }; + BindingPromise.prototype.getDataAsync = function () { + var args = arguments; + this._fetch(function onComplete(binding) { binding.getDataAsync.apply(binding, args); }); + return this; + }; + BindingPromise.prototype.setDataAsync = function () { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setDataAsync.apply(binding, args); }); + return this; + }; + BindingPromise.prototype.addHandlerAsync = function () { + var args = arguments; + this._fetch(function onComplete(binding) { binding.addHandlerAsync.apply(binding, args); }); + return this; + }; + BindingPromise.prototype.removeHandlerAsync = function () { + var args = arguments; + this._fetch(function onComplete(binding) { binding.removeHandlerAsync.apply(binding, args); }); + return this; + }; + BindingPromise.prototype.setTableOptionsAsync = function () { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setTableOptionsAsync.apply(binding, args); }); + return this; + }; + BindingPromise.prototype.setFormatsAsync = function () { + var args = arguments; + this._fetch(function onComplete(binding) { binding.setFormatsAsync.apply(binding, args); }); + return this; + }; + BindingPromise.prototype.clearFormatsAsync = function () { + var args = arguments; + this._fetch(function onComplete(binding) { binding.clearFormatsAsync.apply(binding, args); }); + return this; + }; + return BindingPromise; + }()); + OSF.BindingPromise = BindingPromise; + var UnknownBinding = (function () { + function UnknownBinding(m_id, m_docInstance) { + this.m_id = m_id; + this.m_docInstance = m_docInstance; + } + Object.defineProperty(UnknownBinding.prototype, "document", { + get: function () { + return this.m_docInstance; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnknownBinding.prototype, "id", { + get: function () { + return this.m_id; + }, + enumerable: true, + configurable: true + }); + return UnknownBinding; + }()); + OSF.UnknownBinding = UnknownBinding; + var Binding = (function () { + function Binding(m_id, m_docInstance) { + this.m_id = m_id; + this.m_docInstance = m_docInstance; + var eventType = OSF.EventType; + var bindingEventDispatches = m_docInstance.bindings._eventDispatches; + if (!bindingEventDispatches[m_id]) { + bindingEventDispatches[m_id] = new OSF.EventDispatch([ + eventType.BindingSelectionChanged, + eventType.BindingDataChanged + ]); + } + var eventDispatch = bindingEventDispatches[m_id]; + OSF.DispIdHost.addEventSupport(this, eventDispatch); + } + Binding.prototype.getDataAsync = function (options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.GetDataAsync, arguments, this, undefined); + }; + Binding.prototype.setDataAsync = function (data, options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.SetDataAsync, arguments, this, undefined); + }; + Object.defineProperty(Binding.prototype, "document", { + get: function () { + return this.m_docInstance; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Binding.prototype, "id", { + get: function () { + return this.m_id; + }, + enumerable: true, + configurable: true + }); + return Binding; + }()); + OSF.Binding = Binding; + var MatrixBinding = (function (_super) { + __extends(MatrixBinding, _super); + function MatrixBinding(id, docInstance, m_rows, m_cols) { + var _this = _super.call(this, id, docInstance) || this; + _this.m_rows = m_rows; + _this.m_cols = m_cols; + return _this; + } + Object.defineProperty(MatrixBinding.prototype, "type", { + get: function () { + return Office.BindingType.Matrix; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MatrixBinding.prototype, "rowCount", { + get: function () { + return this.m_rows ? this.m_rows : 0; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MatrixBinding.prototype, "columnCount", { + get: function () { + return this.m_cols ? this.m_cols : 0; + }, + enumerable: true, + configurable: true + }); + return MatrixBinding; + }(OSF.Binding)); + OSF.MatrixBinding = MatrixBinding; + var TableBinding = (function (_super) { + __extends(TableBinding, _super); + function TableBinding(id, docInstance, m_rows, m_cols, m_hasHeaders) { + var _this = _super.call(this, id, docInstance) || this; + _this.m_rows = m_rows; + _this.m_cols = m_cols; + _this.m_hasHeaders = m_hasHeaders; + return _this; + } + Object.defineProperty(TableBinding.prototype, "type", { + get: function () { + return Office.BindingType.Table; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableBinding.prototype, "rowCount", { + get: function () { + return this.m_rows ? this.m_rows : 0; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableBinding.prototype, "columnCount", { + get: function () { + return this.m_cols ? this.m_cols : 0; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableBinding.prototype, "hasHeaders", { + get: function () { + return this.m_hasHeaders ? this.m_hasHeaders : false; + }, + enumerable: true, + configurable: true + }); + TableBinding.prototype.addRowsAsync = function (rows, options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.AddRowsAsync, arguments, this, undefined); + }; + TableBinding.prototype.addColumnsAsync = function (tableData, options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.AddColumnsAsync, arguments, this, undefined); + }; + TableBinding.prototype.deleteAllDataValuesAsync = function (options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.DeleteAllDataValuesAsync, arguments, this, undefined); + }; + return TableBinding; + }(OSF.Binding)); + OSF.TableBinding = TableBinding; + var ExcelTableBinding = (function (_super) { + __extends(ExcelTableBinding, _super); + function ExcelTableBinding(id, docInstance, rows, cols, hasHeaders) { + var _this = _super.call(this, id, docInstance, rows, cols, hasHeaders) || this; + OSF.OUtil.finalizeProperties(_this); + return _this; + } + ; + ExcelTableBinding.prototype.clearFormatsAsync = function (options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.ClearFormatsAsync, arguments, this, undefined); + }; + ExcelTableBinding.prototype.setTableOptionsAsync = function (tableOptions, options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.SetTableOptionsAsync, arguments, this, undefined); + }; + ExcelTableBinding.prototype.setFormatsAsync = function (cellFormat, options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.SetFormatsAsync, arguments, this, undefined); + }; + return ExcelTableBinding; + }(OSF.TableBinding)); + OSF.ExcelTableBinding = ExcelTableBinding; + var TableBindingMethods; + (function (TableBindingMethods) { + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + }); + function defineMethods() { + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.AddRowsAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: OSF.ParameterNames.Id, + value: getObjectId + } + ] + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.AddColumnsAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: OSF.ParameterNames.Id, + value: getObjectId + } + ] + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.DeleteAllDataValuesAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: OSF.ParameterNames.Id, + value: getObjectId + } + ] + }); + } + function getObjectId(obj) { return obj.id; } + })(TableBindingMethods = OSF.TableBindingMethods || (OSF.TableBindingMethods = {})); + var TextBinding = (function (_super) { + __extends(TextBinding, _super); + function TextBinding(id, docInstance) { + return _super.call(this, id, docInstance) || this; + } + Object.defineProperty(TextBinding.prototype, "type", { + get: function () { + return Office.BindingType.Text; + }, + enumerable: true, + configurable: true + }); + return TextBinding; + }(OSF.Binding)); + OSF.TextBinding = TextBinding; + function GenerateBindingId() { + return "UnnamedBinding_" + OSF.OUtil.getUniqueId() + "_" + new Date().getTime(); + } + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + defineSafeArrayParameterMapFunc: defineSafeArrayParameterMap, + defineWebParameterMapFunc: defineWebParameterMap, + }); + function defineMethods() { + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.BindingSelectionChanged, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.BindingDataChanged, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] + }); + } + function defineSafeArrayParameterMap() { + OSF.HostParameterMap.define({ + type: OSF.EventDescriptors.BindingSelectionChangedEvent, + fromHost: [ + { name: OSF.PropertyDescriptors.BindingProperties, value: 0 }, + { name: OSF.PropertyDescriptors.Subset, value: 1 } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidBindingSelectionChangedEvent, + fromHost: [ + { name: OSF.EventDescriptors.BindingSelectionChangedEvent, value: OSF.HostParameterMap.self } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidBindingDataChangedEvent, + fromHost: [{ name: OSF.PropertyDescriptors.BindingProperties, value: OSF.HostParameterMap.self }] + }); + } + function defineWebParameterMap() { + OSF.HostParameterMap.define({ + type: OSF.EventDescriptors.BindingSelectionChangedEvent, + fromHost: [ + { name: OSF.PropertyDescriptors.BindingProperties, value: OSF.WACDelegate.UniqueArguments.BindingEventSource }, + { name: OSF.PropertyDescriptors.Subset, value: OSF.PropertyDescriptors.Subset } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidBindingSelectionChangedEvent, + fromHost: [ + { name: OSF.EventDescriptors.BindingSelectionChangedEvent, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidBindingDataChangedEvent, + fromHost: [ + { name: OSF.PropertyDescriptors.BindingProperties, value: OSF.WACDelegate.UniqueArguments.BindingEventSource } + ] + }); + } +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var DataCoercion; + (function (DataCoercion) { + var tableRows = "Rows"; + var tableHeaders = "Headers"; + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + defineSafeArrayParameterMapFunc: defineSafeArrayParameterMap, + defineWebParameterMapFunc: defineWebParameterMap, + }); + function defineMethods() { + } + function defineWebParameterMap() { + OSF.OUtil.augmentList(Office.CoercionType, { Image: "image" }); + OSF.OUtil.augmentList(Office.CoercionType, { XmlSvg: "xmlSvg" }); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.CoercionType, + toHost: [ + { name: Office.CoercionType.Text, value: 0 }, + { name: Office.CoercionType.Matrix, value: 1 }, + { name: Office.CoercionType.Table, value: 2 }, + { name: Office.CoercionType.Html, value: 3 }, + { name: Office.CoercionType.Ooxml, value: 4 }, + { name: Office.CoercionType.OoxmlPackage, value: 5 }, + { name: Office.CoercionType.PdfFile, value: 6 }, + { name: Office.CoercionType.SlideRange, value: 7 }, + { name: "image", value: 8 }, + { name: "xmlSvg", value: 9 }, + ] + }); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.ValueFormat, + toHost: [ + { name: Office.ValueFormat.Unformatted, value: 0 }, + { name: Office.ValueFormat.Formatted, value: 1 } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.FilterType, + toHost: [ + { name: Office.FilterType.All, value: 0 } + ] + }); + } + function defineSafeArrayParameterMap() { + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.CoercionType, + toHost: [ + { name: Office.CoercionType.Text, value: 0 }, + { name: Office.CoercionType.Matrix, value: 1 }, + { name: Office.CoercionType.Table, value: 2 }, + { name: Office.CoercionType.Html, value: 3 }, + { name: Office.CoercionType.Ooxml, value: 4 }, + { name: Office.CoercionType.OoxmlPackage, value: 5 }, + { name: Office.CoercionType.PdfFile, value: 6 }, + { name: Office.CoercionType.SlideRange, value: 7 }, + ] + }); + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.hostPlatform == OSF.HostInfoPlatform.win32 || + hostInfo.hostPlatform == OSF.HostInfoPlatform.mac || + hostInfo.hostPlatform == OSF.HostInfoPlatform.ios || + hostInfo.hostPlatform == OSF.HostInfoPlatform.android) { + OSF.OUtil.augmentList(Office.CoercionType, { Image: "image" }); + OSF.OUtil.augmentList(Office.CoercionType, { XmlSvg: "xmlSvg" }); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.CoercionType, + toHost: [ + { name: "image", value: 8 }, + { name: "xmlSvg", value: 9 }, + ] + }); + } + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.ValueFormat, + toHost: [ + { name: Office.ValueFormat.Unformatted, value: 0 }, + { name: Office.ValueFormat.Formatted, value: 1 } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.FilterType, + toHost: [ + { name: Office.FilterType.All, value: 0 } + ] + }); + } + function findArrayDimensionality(obj) { + if (OSF.OUtil.isArray(obj)) { + var dim = 0; + for (var index = 0; index < obj.length; index++) { + dim = Math.max(dim, findArrayDimensionality(obj[index])); + } + return dim + 1; + } + else { + return 0; + } + } + DataCoercion.findArrayDimensionality = findArrayDimensionality; + function getCoercionDefaultForBinding(bindingType) { + switch (bindingType) { + case Office.BindingType.Matrix: return Office.CoercionType.Matrix; + case Office.BindingType.Table: return Office.CoercionType.Table; + case Office.BindingType.Text: + default: + return Office.CoercionType.Text; + } + } + DataCoercion.getCoercionDefaultForBinding = getCoercionDefaultForBinding; + function getBindingDefaultForCoercion(coercionType) { + switch (coercionType) { + case Office.CoercionType.Matrix: return Office.BindingType.Matrix; + case Office.CoercionType.Table: return Office.BindingType.Table; + case Office.CoercionType.Text: + case Office.CoercionType.Html: + case Office.CoercionType.Ooxml: + default: + return Office.BindingType.Text; + } + } + DataCoercion.getBindingDefaultForCoercion = getBindingDefaultForCoercion; + function determineCoercionType(data) { + if (data == null || data == undefined) + return null; + var sourceType = null; + var runtimeType = typeof data; + if (data.rows !== undefined) { + sourceType = Office.CoercionType.Table; + } + else if (OSF.OUtil.isArray(data)) { + sourceType = Office.CoercionType.Matrix; + } + else if (runtimeType == "string" || runtimeType == "number" || runtimeType == "boolean" || OSF.OUtil.isDate(data)) { + sourceType = Office.CoercionType.Text; + } + return sourceType; + } + DataCoercion.determineCoercionType = determineCoercionType; + function coerceData(data, destinationType, sourceType) { + sourceType = sourceType || determineCoercionType(data); + if (sourceType && sourceType != destinationType) { + data = coerceDataFromTable(destinationType, coerceDataToTable(data, sourceType)); + } + return data; + } + DataCoercion.coerceData = coerceData; + function serializeDynamicData(data) { + if (data != null && data.rows !== undefined) { + var table = {}; + table[OSF.TableDataProperties.TableRows] = data.rows; + table[OSF.TableDataProperties.TableHeaders] = data.headers; + data = table; + } + var tableData; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == OSF.HostInfoPlatform.web) { + if (typeof data != "string" && data[OSF.TableDataProperties.TableRows] !== undefined) { + tableData = {}; + tableData[tableRows] = data[OSF.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.TableDataProperties.TableHeaders]; + data = tableData; + } + else if (OSF.DataCoercion.determineCoercionType(data) == Office.CoercionType.Text) { + data = [[data]]; + } + return data; + } + else { + if (OSF.TableDataProperties && typeof data != "string" && data[OSF.TableDataProperties.TableRows] !== undefined) { + tableData = []; + var tableRowsClientHost = 0; + var tableHeadersClientHost = 1; + tableData[tableRowsClientHost] = data[OSF.TableDataProperties.TableRows]; + tableData[tableHeadersClientHost] = data[OSF.TableDataProperties.TableHeaders]; + data = tableData; + } + return data; + } + } + DataCoercion.serializeDynamicData = serializeDynamicData; + function deserializeDynamicData(hostArgs, coercionType) { + var ret = null; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == OSF.HostInfoPlatform.web) { + if (hostArgs[tableRows] != undefined) { + ret = {}; + ret[OSF.TableDataProperties.TableRows] = hostArgs[tableRows]; + ret[OSF.TableDataProperties.TableHeaders] = hostArgs[tableHeaders]; + } + else { + ret = hostArgs; + } + if (ret && (ret[OSF.TableDataProperties.TableRows] != undefined || ret[OSF.TableDataProperties.TableHeaders] != undefined)) { + ret = Office.manufactureTableData(ret); + } + ret = coerceData(ret, coercionType); + } + else { + if (hostArgs.length === 2) { + ret = {}; + var tableRowsClientHost = 0; + var tableHeadersClientHost = 1; + ret[OSF.TableDataProperties.TableRows] = hostArgs[tableRowsClientHost]; + ret[OSF.TableDataProperties.TableHeaders] = hostArgs[tableHeadersClientHost]; + ret = Office.manufactureTableData(ret); + } + else { + ret = hostArgs; + } + ret = coerceData(ret, coercionType); + } + return ret; + } + DataCoercion.deserializeDynamicData = deserializeDynamicData; + function matrixToText(matrix) { + if (matrix.length == 1 && matrix[0].length == 1) + return "" + matrix[0][0]; + var val = ""; + for (var i = 0; i < matrix.length; i++) { + val += matrix[i].join("\t") + "\n"; + } + return val.substring(0, val.length - 1); + } + function textToMatrix(text) { + var ret = text.split("\n"); + for (var i = 0; i < ret.length; i++) + ret[i] = ret[i].split("\t"); + return ret; + } + function tableToText(table) { + var headers = ""; + if (table.headers != null) { + headers = matrixToText([table.headers]) + "\n"; + } + var rows = matrixToText(table.rows); + if (rows == "") { + headers = headers.substring(0, headers.length - 1); + } + return headers + rows; + } + function tableToMatrix(table) { + var matrix = table.rows; + if (table.headers != null) { + matrix.unshift(table.headers); + } + return matrix; + } + function coerceDataFromTable(coercionType, table) { + var value; + switch (coercionType) { + case Office.CoercionType.Table: + value = table; + break; + case Office.CoercionType.Matrix: + value = tableToMatrix(table); + break; + case Office.CoercionType.SlideRange: + if (OSF.manufactureSlideRange) { + value = OSF.manufactureSlideRange(tableToText(table)); + if (value == null) { + value = tableToText(table); + } + } + break; + case Office.CoercionType.Text: + case Office.CoercionType.Html: + case Office.CoercionType.Ooxml: + default: + value = tableToText(table); + break; + } + return value; + } + function coerceDataToTable(data, sourceType) { + if (sourceType == undefined) { + sourceType = determineCoercionType(data); + } + var value; + switch (sourceType) { + case Office.CoercionType.Table: + value = data; + break; + case Office.CoercionType.Matrix: + value = new Office.TableData(data); + break; + case Office.CoercionType.Text: + case Office.CoercionType.Html: + case Office.CoercionType.Ooxml: + default: + value = new Office.TableData(textToMatrix(data)); + break; + } + return value; + } + })(DataCoercion = OSF.DataCoercion || (OSF.DataCoercion = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var Marshaling; + (function (Marshaling) { + var GetDataKeys; + (function (GetDataKeys) { + GetDataKeys["CoercionType"] = "CoerceType"; + })(GetDataKeys = Marshaling.GetDataKeys || (Marshaling.GetDataKeys = {})); + var SetDataKeys; + (function (SetDataKeys) { + SetDataKeys["CoercionType"] = "CoerceType"; + SetDataKeys["Data"] = "Data"; + SetDataKeys["ImageLeft"] = "ImageLeft"; + SetDataKeys["ImageTop"] = "ImageTop"; + SetDataKeys["ImageWidth"] = "ImageWidth"; + SetDataKeys["ImageHeight"] = "ImageHeight"; + })(SetDataKeys = Marshaling.SetDataKeys || (Marshaling.SetDataKeys = {})); + var CoercionTypeKeys; + (function (CoercionTypeKeys) { + CoercionTypeKeys["Html"] = "html"; + CoercionTypeKeys["Ooxml"] = "ooxml"; + CoercionTypeKeys["SlideRange"] = "slideRange"; + CoercionTypeKeys["Text"] = "text"; + CoercionTypeKeys["Table"] = "table"; + CoercionTypeKeys["Matrix"] = "matrix"; + CoercionTypeKeys["Image"] = "image"; + CoercionTypeKeys["XmlSvg"] = "xmlSvg"; + })(CoercionTypeKeys = Marshaling.CoercionTypeKeys || (Marshaling.CoercionTypeKeys = {})); + })(Marshaling = OSF.Marshaling || (OSF.Marshaling = {})); + var DataIO; + (function (DataIO) { + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + defineWebParameterMapFunc: defineWebParameterMap, + }); + function defineMethods() { + } + function defineWebParameterMap() { + OSF.HostParameterMap.define({ + type: OSF.WACDelegate.UniqueArguments.GetData, + toHost: [ + { name: OSF.ParameterNames.Id, value: "BindingId" }, + { name: OSF.ParameterNames.CoercionType, value: "CoerceType" }, + { name: OSF.ParameterNames.ValueFormat, value: "ValueFormat" }, + { name: OSF.ParameterNames.FilterType, value: "FilterType" }, + { name: OSF.ParameterNames.Rows, value: "Rows" }, + { name: OSF.ParameterNames.Columns, value: "Columns" }, + { name: OSF.ParameterNames.StartRow, value: "StartRow" }, + { name: OSF.ParameterNames.StartColumn, value: "StartCol" }, + { name: OSF.ParameterNames.RowCount, value: "RowCount" }, + { name: OSF.ParameterNames.ColumnCount, value: "ColCount" } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.WACDelegate.UniqueArguments.SetData, + toHost: [ + { name: OSF.ParameterNames.Id, value: "BindingId" }, + { name: OSF.ParameterNames.CoercionType, value: "CoerceType" }, + { name: OSF.ParameterNames.Data, value: OSF.WACDelegate.UniqueArguments.Data }, + { name: OSF.ParameterNames.Rows, value: "Rows" }, + { name: OSF.ParameterNames.Columns, value: "Columns" }, + { name: OSF.ParameterNames.StartRow, value: "StartRow" }, + { name: OSF.ParameterNames.StartColumn, value: "StartCol" }, + { name: OSF.ParameterNames.ImageLeft, value: "ImageLeft" }, + { name: OSF.ParameterNames.ImageTop, value: "ImageTop" }, + { name: OSF.ParameterNames.ImageWidth, value: "ImageWidth" }, + { name: OSF.ParameterNames.ImageHeight, value: "ImageHeight" } + ] + }); + } + })(DataIO = OSF.DataIO || (OSF.DataIO = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var Marshaling; + (function (Marshaling) { + var DialogMessageReceivedEventKeys; + (function (DialogMessageReceivedEventKeys) { + DialogMessageReceivedEventKeys["MessageType"] = "messageType"; + DialogMessageReceivedEventKeys["MessageContent"] = "messageContent"; + DialogMessageReceivedEventKeys["MessageOrigin"] = "messageOrigin"; + })(DialogMessageReceivedEventKeys = Marshaling.DialogMessageReceivedEventKeys || (Marshaling.DialogMessageReceivedEventKeys = {})); + ; + var DialogParentMessageReceivedEventKeys; + (function (DialogParentMessageReceivedEventKeys) { + DialogParentMessageReceivedEventKeys["MessageType"] = "messageType"; + DialogParentMessageReceivedEventKeys["MessageContent"] = "messageContent"; + DialogParentMessageReceivedEventKeys["MessageOrigin"] = "messageOrigin"; + })(DialogParentMessageReceivedEventKeys = Marshaling.DialogParentMessageReceivedEventKeys || (Marshaling.DialogParentMessageReceivedEventKeys = {})); + ; + var MessageParentKeys; + (function (MessageParentKeys) { + MessageParentKeys["MessageToParent"] = "messageToParent"; + MessageParentKeys["TargetOrigin"] = "targetOrigin"; + })(MessageParentKeys = Marshaling.MessageParentKeys || (Marshaling.MessageParentKeys = {})); + ; + var DialogNotificationShownEventType; + (function (DialogNotificationShownEventType) { + DialogNotificationShownEventType["DialogNotificationShown"] = "dialogNotificationShown"; + })(DialogNotificationShownEventType = Marshaling.DialogNotificationShownEventType || (Marshaling.DialogNotificationShownEventType = {})); + ; + var SendMessageKeys; + (function (SendMessageKeys) { + SendMessageKeys["MessageContent"] = "messageContent"; + SendMessageKeys["TargetOrigin"] = "targetOrigin"; + })(SendMessageKeys = Marshaling.SendMessageKeys || (Marshaling.SendMessageKeys = {})); + ; + })(Marshaling = OSF.Marshaling || (OSF.Marshaling = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var EventDescriptors; + (function (EventDescriptors) { + EventDescriptors.DialogParentMessageReceivedEvent = "DialogParentMessageReceivedEvent"; + EventDescriptors.DialogMessageReceivedEvent = "DialogMessageReceivedEvent"; + })(EventDescriptors = OSF.EventDescriptors || (OSF.EventDescriptors = {})); + OSF.DialogParentMessageEventDispatch = new OSF.EventDispatch([ + OSF.EventType.DialogParentMessageReceived, + OSF.EventType.DialogParentEventReceived + ]); + var Dialog; + (function (Dialog) { + function defineMethods() { + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.DisplayDialogAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.Url, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: OSF.ParameterNames.Width, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: OSF.ParameterNames.Height, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: OSF.ParameterNames.RequireHTTPs, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: OSF.ParameterNames.DisplayInIframe, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: OSF.ParameterNames.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: OSF.ParameterNames.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: OSF.ParameterNames.PromptBeforeOpen, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: OSF.ParameterNames.EnforceAppDomain, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: OSF.ParameterNames.UrlNoHostInfo, + value: { + "types": ["boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [], + onSucceeded: function (args, caller, callArgs) { + var targetId = args[OSF.ParameterNames.Id]; + var eventDispatch = args[OSF.ParameterNames.Data]; + var dialog = {}; + var closeDialog = OSF.AsyncMethods.CloseAsync; + OSF.OUtil.defineEnumerableProperty(dialog, closeDialog, { + value: function () { + var closeDialogfunction = OSF.DispIdHost.CloseDialog; + closeDialogfunction(arguments, targetId, eventDispatch, dialog); + } + }); + var addHandler = OSF.SyncMethods.AddMessageHandler; + OSF.OUtil.defineEnumerableProperty(dialog, addHandler, { + value: function () { + var syncMethodCall = OSF.SyncMethodCalls.get(OSF.SyncMethods.AddMessageHandler); + var callArgs = syncMethodCall.verifyAndExtractCall(arguments, dialog, eventDispatch); + var eventType = callArgs[OSF.ParameterNames.EventType]; + var handler = callArgs[OSF.ParameterNames.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType, handler); + } + }); + if (OSF.EnableSendMessageDialogAPI === true) { + var sendMessage = OSF.SyncMethods.SendMessage; + OSF.OUtil.defineEnumerableProperty(dialog, sendMessage, { + value: function () { + var execute = OSF.DispIdHost.SendMessage; + return execute(arguments, eventDispatch, dialog); + } + }); + } + if (OSF.EnableMessageChildDialogAPI === true) { + var messageChild = OSF.SyncMethods.MessageChild; + OSF.OUtil.defineEnumerableProperty(dialog, messageChild, { + value: function () { + var execute = OSF.DispIdHost.SendMessage; + return execute(arguments, eventDispatch, dialog); + } + }); + } + return dialog; + }, + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[OSF.ParameterNames.Width] <= 0) { + callArgs[OSF.ParameterNames.Width] = 1; + } + if (!callArgs[OSF.ParameterNames.UseDeviceIndependentPixels] && callArgs[OSF.ParameterNames.Width] > 100) { + callArgs[OSF.ParameterNames.Width] = 99; + } + if (callArgs[OSF.ParameterNames.Height] <= 0) { + callArgs[OSF.ParameterNames.Height] = 1; + } + if (!callArgs[OSF.ParameterNames.UseDeviceIndependentPixels] && callArgs[OSF.ParameterNames.Height] > 100) { + callArgs[OSF.ParameterNames.Height] = 99; + } + if (!callArgs[OSF.ParameterNames.RequireHTTPs]) { + callArgs[OSF.ParameterNames.RequireHTTPs] = true; + } + return callArgs; + } + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] + }); + OSF.SyncMethodCalls.define({ + method: OSF.SyncMethods.MessageParent, + requiredArguments: [ + { + "name": OSF.ParameterNames.MessageToParent, + "types": ["string", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: OSF.ParameterNames.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ] + }); + OSF.SyncMethodCalls.define({ + method: OSF.SyncMethods.AddMessageHandler, + requiredArguments: [ + { + "name": OSF.ParameterNames.EventType, + "enum": OSF.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": OSF.ParameterNames.Handler, + "types": ["function"] + } + ], + supportedOptions: [] + }); + OSF.SyncMethodCalls.define({ + method: OSF.SyncMethods.SendMessage, + requiredArguments: [ + { + "name": OSF.ParameterNames.MessageContent, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: OSF.ParameterNames.TargetOrigin, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + privateStateCallbacks: [] + }); + } + function defineSafeArrayParameterMap() { + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [ + { name: OSF.EventDescriptors.DialogMessageReceivedEvent, value: OSF.HostParameterMap.self } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: OSF.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [ + { name: OSF.PropertyDescriptors.MessageType, value: 0 }, + { name: OSF.PropertyDescriptors.MessageContent, value: 1 }, + { name: OSF.PropertyDescriptors.MessageOrigin, value: 2 } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidDialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.EventDescriptors.DialogParentMessageReceivedEvent, value: OSF.HostParameterMap.self } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: OSF.EventDescriptors.DialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.PropertyDescriptors.MessageType, value: 0 }, + { name: OSF.PropertyDescriptors.MessageContent, value: 1 }, + { name: OSF.PropertyDescriptors.MessageOrigin, value: 2 } + ], + isComplexType: true + }); + } + function defineWebParameterMap() { + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [ + { name: OSF.EventDescriptors.DialogMessageReceivedEvent, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.addComplexType(OSF.EventDescriptors.DialogMessageReceivedEvent); + OSF.HostParameterMap.define({ + type: OSF.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [ + { name: OSF.PropertyDescriptors.MessageType, value: OSF.Marshaling.DialogMessageReceivedEventKeys.MessageType }, + { name: OSF.PropertyDescriptors.MessageContent, value: OSF.Marshaling.DialogMessageReceivedEventKeys.MessageContent }, + { name: OSF.PropertyDescriptors.MessageOrigin, value: OSF.Marshaling.DialogMessageReceivedEventKeys.MessageOrigin } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidDialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.EventDescriptors.DialogParentMessageReceivedEvent, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.addComplexType(OSF.EventDescriptors.DialogParentMessageReceivedEvent); + OSF.HostParameterMap.define({ + type: OSF.EventDescriptors.DialogParentMessageReceivedEvent, + fromHost: [ + { name: OSF.PropertyDescriptors.MessageType, value: OSF.Marshaling.DialogParentMessageReceivedEventKeys.MessageType }, + { name: OSF.PropertyDescriptors.MessageContent, value: OSF.Marshaling.DialogParentMessageReceivedEventKeys.MessageContent }, + { name: OSF.PropertyDescriptors.MessageOrigin, value: OSF.Marshaling.DialogMessageReceivedEventKeys.MessageOrigin } + ] + }); + OSF.HostParameterMap.define({ + type: 144, + toHost: [ + { name: OSF.ParameterNames.MessageToParent, value: OSF.Marshaling.MessageParentKeys.MessageToParent }, + { name: OSF.ParameterNames.TargetOrigin, value: OSF.Marshaling.MessageParentKeys.TargetOrigin } + ] + }); + OSF.HostParameterMap.define({ + type: 145, + toHost: [ + { name: OSF.ParameterNames.MessageContent, value: OSF.Marshaling.SendMessageKeys.MessageContent }, + { name: OSF.ParameterNames.TargetOrigin, value: OSF.Marshaling.MessageParentKeys.TargetOrigin } + ] + }); + } + function initialize() { + var isPopupWindow = OSF.OUtil.isPopupWindow(); + OSF.EnableMessageChildDialogAPI = true; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.hostType == "onenote") { + OSF.EnableSendMessageDialogAPI = false; + } + else { + OSF.EnableSendMessageDialogAPI = true; + } + var target = Office.context.ui; + if (OSF.OUtil.isDialog()) { + var messageParentName = OSF.SyncMethods.MessageParent; + if (!target[messageParentName]) { + OSF.OUtil.defineEnumerableProperty(target, messageParentName, { + value: function () { + var messageParent = OSF.DispIdHost.MessageParent; + return messageParent(arguments, target); + } + }); + } + var addEventHandler = OSF.SyncMethods.AddMessageHandler; + if (!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch != "undefined") { + OSF.DispIdHost.addEventSupport(target, OSF.DialogParentMessageEventDispatch, isPopupWindow); + } + if (isPopupWindow) { + OSF.WacDialogAction.registerMessageReceivedEvent(); + } + } + else { + var eventDispatch; + if (OSF.EventType.DialogParentMessageReceived != null) { + eventDispatch = new OSF.EventDispatch([ + OSF.EventType.DialogMessageReceived, + OSF.EventType.DialogEventReceived, + OSF.EventType.DialogParentMessageReceived + ]); + } + else { + eventDispatch = new OSF.EventDispatch([ + OSF.EventType.DialogMessageReceived, + OSF.EventType.DialogEventReceived + ]); + } + var openDialogName = OSF.AsyncMethods.DisplayDialogAsync; + if (!target[openDialogName]) { + OSF.OUtil.defineEnumerableProperty(target, openDialogName, { + value: function () { + var openDialog = OSF.DispIdHost.OpenDialog; + openDialog(arguments, eventDispatch, target); + } + }); + } + } + OSF.OUtil.finalizeProperties(target); + } + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + defineSafeArrayParameterMapFunc: defineSafeArrayParameterMap, + defineWebParameterMapFunc: defineWebParameterMap, + initializeFunc: initialize + }); + })(Dialog || (Dialog = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var ShowWindowDialogParameterKeys; + (function (ShowWindowDialogParameterKeys) { + ShowWindowDialogParameterKeys["Url"] = "url"; + ShowWindowDialogParameterKeys["Width"] = "width"; + ShowWindowDialogParameterKeys["Height"] = "height"; + ShowWindowDialogParameterKeys["DisplayInIframe"] = "displayInIframe"; + ShowWindowDialogParameterKeys["HideTitle"] = "hideTitle"; + ShowWindowDialogParameterKeys["UseDeviceIndependentPixels"] = "useDeviceIndependentPixels"; + ShowWindowDialogParameterKeys["PromptBeforeOpen"] = "promptBeforeOpen"; + ShowWindowDialogParameterKeys["EnforceAppDomain"] = "enforceAppDomain"; + ShowWindowDialogParameterKeys["UrlNoHostInfo"] = "urlNoHostInfo"; + ShowWindowDialogParameterKeys["TargetOrigin"] = "targetOrigin"; + })(ShowWindowDialogParameterKeys = OSF.ShowWindowDialogParameterKeys || (OSF.ShowWindowDialogParameterKeys = {})); + var WacCommonUICssManager; + (function (WacCommonUICssManager) { + var hostType = { + Excel: "excel", + Word: "word", + PowerPoint: "powerpoint", + Outlook: "outlook", + Visio: "visio" + }; + function getDialogCssManager(applicationHostType) { + switch (applicationHostType) { + case hostType.Excel: + case hostType.Word: + case hostType.PowerPoint: + case hostType.Outlook: + case hostType.Visio: + return new DefaultDialogCSSManager(); + default: + return new DefaultDialogCSSManager(); + } + } + WacCommonUICssManager.getDialogCssManager = getDialogCssManager; + var DefaultDialogCSSManager = (function () { + function DefaultDialogCSSManager() { + this.overlayElementCSS = [ + "position: absolute", + "top: 0", + "left: 0", + "width: 100%", + "height: 100%", + "background-color: rgba(198, 198, 198, 0.5)", + "z-index: 99998" + ]; + this.dialogNotificationPanelCSS = [ + "width: 100%", + "height: 190px", + "position: absolute", + "z-index: 99999", + "background-color: rgba(255, 255, 255, 1)", + "left: 0px", + "top: 50%", + "margin-top: -95px" + ]; + this.newWindowNotificationTextPanelCSS = [ + "margin: 20px 14px", + "font-family: Segoe UI,Arial,Verdana,sans-serif", + "font-size: 14px", + "height: 100px", + "line-height: 100px" + ]; + this.newWindowNotificationTextSpanCSS = [ + "display: inline-block", + "line-height: normal", + "vertical-align: middle" + ]; + this.crossZoneNotificationTextPanelCSS = [ + "margin: 20px 14px", + "font-family: Segoe UI,Arial,Verdana,sans-serif", + "font-size: 14px", + "height: 100px", + ]; + this.dialogNotificationButtonPanelCSS = "margin:0px 9px"; + this.buttonStyleCSS = [ + "text-align: center", + "width: 70px", + "height: 25px", + "font-size: 14px", + "font-family: Segoe UI,Arial,Verdana,sans-serif", + "margin: 0px 5px", + "border-width: 1px", + "border-style: solid" + ]; + } + DefaultDialogCSSManager.prototype.getOverlayElementCSS = function () { + return this.overlayElementCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getDialogNotificationPanelCSS = function () { + return this.dialogNotificationPanelCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getNewWindowNotificationTextPanelCSS = function () { + return this.newWindowNotificationTextPanelCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getNewWindowNotificationTextSpanCSS = function () { + return this.newWindowNotificationTextSpanCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getCrossZoneNotificationTextPanelCSS = function () { + return this.crossZoneNotificationTextPanelCSS.join(";"); + }; + DefaultDialogCSSManager.prototype.getDialogNotificationButtonPanelCSS = function () { + return this.dialogNotificationButtonPanelCSS; + }; + DefaultDialogCSSManager.prototype.getDialogButtonCSS = function () { + return this.buttonStyleCSS.join(";"); + }; + return DefaultDialogCSSManager; + }()); + WacCommonUICssManager.DefaultDialogCSSManager = DefaultDialogCSSManager; + })(WacCommonUICssManager = OSF.WacCommonUICssManager || (OSF.WacCommonUICssManager = {})); + var WacDialogAction; + (function (WacDialogAction) { + var windowInstance = null; + var handler = null; + var overlayElement = null; + var dialogNotificationPanel = null; + var closeDialogKey = "osfDialogInternal:action=closeDialog"; + var showDialogCallback = null; + var hasCrossZoneNotification = false; + var checkWindowDialogCloseInterval = -1; + var messageParentKey = "messageParentKey"; + var hostThemeButtonStyle = null; + var commonButtonBorderColor = "#ababab"; + var commonButtonBackgroundColor = "#ffffff"; + var commonEventInButtonBackgroundColor = "#ccc"; + var newWindowNotificationId = "newWindowNotificaiton"; + var crossZoneNotificationId = "crossZoneNotification"; + var configureBrowserLinkId = "configureBrowserLink"; + var dialogNotificationTextPanelId = "dialogNotificationTextPanel"; + var registerDialogNotificationShownArgs = { + "dispId": OSF.EventDispId.dispidDialogNotificationShownInAddinEvent, + "eventType": OSF.Marshaling.DialogNotificationShownEventType.DialogNotificationShown, + "onComplete": null, + "onCalling": null + }; + function setHostThemeButtonStyle(args) { + var hostThemeButtonStyleArgs = args.input; + if (hostThemeButtonStyleArgs != null) { + hostThemeButtonStyle = { + HostButtonBorderColor: hostThemeButtonStyleArgs[OSF.OUtil.HostThemeButtonStyleKeys.ButtonBorderColor], + HostButtonBackgroundColor: hostThemeButtonStyleArgs[OSF.OUtil.HostThemeButtonStyleKeys.ButtonBackgroundColor] + }; + } + args.completed(); + } + WacDialogAction.setHostThemeButtonStyle = setHostThemeButtonStyle; + function removeEventListenersForDialog(args) { + addOrRemoveEventListenersForWindow(false); + args.completed(); + } + WacDialogAction.removeEventListenersForDialog = removeEventListenersForDialog; + function handleNewWindowDialog(dialogInfo) { + try { + if (!checkAppDomain(dialogInfo)) { + showDialogCallback(12004); + return; + } + if (!dialogInfo[OSF.ShowWindowDialogParameterKeys.PromptBeforeOpen]) { + showDialog(dialogInfo); + return; + } + hasCrossZoneNotification = false; + var ignoreButtonKeyDownClick = false; + var hostInfoObj = OSF._OfficeAppFactory.getHostInfo(); + var dialogCssManager = OSF.WacCommonUICssManager.getDialogCssManager(hostInfoObj.hostType); + var notificationText = OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification, OSF._OfficeAppFactory.getOfficeAppContext().get_addinName()); + overlayElement = createOverlayElement(dialogCssManager); + document.body.insertBefore(overlayElement, document.body.firstChild); + dialogNotificationPanel = createNotificationPanel(dialogCssManager, notificationText); + dialogNotificationPanel.id = newWindowNotificationId; + var dialogNotificationButtonPanel = createButtonPanel(dialogCssManager); + var allowButton = createButtonControl(dialogCssManager, Strings.OfficeOM.L_ShowWindowDialogNotificationAllow); + var ignoreButton = createButtonControl(dialogCssManager, Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore); + dialogNotificationButtonPanel.appendChild(allowButton); + dialogNotificationButtonPanel.appendChild(ignoreButton); + dialogNotificationPanel.appendChild(dialogNotificationButtonPanel); + document.body.insertBefore(dialogNotificationPanel, document.body.firstChild); + allowButton.onclick = function (event) { + showDialog(dialogInfo); + if (!hasCrossZoneNotification) { + dismissDialogNotification(); + } + event.preventDefault(); + event.stopPropagation(); + }; + function ignoreButtonClickEventHandler(event) { + function unregisterDialogNotificationShownEventCallback(status) { + removeDialogNotificationElement(); + setFocusOnFirstElement(status); + showDialogCallback(12009); + } + registerDialogNotificationShownArgs.onCalling = unregisterDialogNotificationShownEventCallback; + OSF.WACDelegate.unregisterEventAsync(registerDialogNotificationShownArgs); + event.preventDefault(); + event.stopPropagation(); + } + ignoreButton.onclick = ignoreButtonClickEventHandler; + allowButton.addEventListener("keydown", function (event) { + if (event.shiftKey && event.keyCode == 9) { + handleButtonControlEventOut(allowButton); + handleButtonControlEventIn(ignoreButton); + ignoreButton.focus(); + event.preventDefault(); + event.stopPropagation(); + } + }, false); + ignoreButton.addEventListener("keydown", function (event) { + if (!event.shiftKey && event.keyCode == 9) { + handleButtonControlEventOut(ignoreButton); + handleButtonControlEventIn(allowButton); + allowButton.focus(); + event.preventDefault(); + event.stopPropagation(); + } + else if (event.keyCode == 13) { + ignoreButtonKeyDownClick = true; + event.preventDefault(); + event.stopPropagation(); + } + }, false); + ignoreButton.addEventListener("keyup", function (event) { + if (event.keyCode == 13 && ignoreButtonKeyDownClick) { + ignoreButtonKeyDownClick = false; + ignoreButtonClickEventHandler(event); + } + }, false); + window.focus(); + function registerDialogNotificationShownEventCallback(status) { + allowButton.focus(); + } + registerDialogNotificationShownArgs.onCalling = registerDialogNotificationShownEventCallback; + OSF.WACDelegate.registerEventAsync(registerDialogNotificationShownArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at new window dialog." + e); + } + showDialogCallback(5001); + } + } + WacDialogAction.handleNewWindowDialog = handleNewWindowDialog; + function closeDialog(callback) { + try { + if (windowInstance != null) { + var appDomains = OSF._OfficeAppFactory.getOfficeAppContext().get_appDomains(); + if (appDomains) { + for (var i = 0; i < appDomains.length && appDomains[i].indexOf("://") !== -1; i++) { + windowInstance.postMessage(closeDialogKey, appDomains[i]); + } + } + if (windowInstance != null && !windowInstance.closed) { + windowInstance.close(); + } + if (OSF.OUtil.shouldUseLocalStorageToPassMessage()) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } + window.clearInterval(checkWindowDialogCloseInterval); + windowInstance = null; + callback(0); + } + else { + callback(5001); + } + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at close window dialog." + e); + } + callback(5001); + } + } + WacDialogAction.closeDialog = closeDialog; + function messageParent(params) { + var message = params.hostCallArgs[OSF.ParameterNames.MessageToParent]; + var targetOrigin = params.hostCallArgs[OSF.ParameterNames.TargetOrigin] || null; + if (OSF.OUtil.shouldUseLocalStorageToPassMessage()) { + try { + var messageKey = OSF._OfficeAppFactory.getId() + messageParentKey; + window.localStorage.setItem(messageKey, message); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during messageParent method:" + e); + } + } + } + else { + postDialogMessage(window.opener, { message: message, targetOrigin: targetOrigin }); + } + } + WacDialogAction.messageParent = messageParent; + function sendMessage(params) { + if (windowInstance != null) { + var message = params.hostCallArgs; + var targetOrigin = message[OSF.ParameterNames.TargetOrigin] || null; + delete message[OSF.ParameterNames.TargetOrigin]; + if (typeof message != "string") { + message = JSON.stringify(message); + } + postDialogMessage(windowInstance, { message: message, targetOrigin: targetOrigin }); + } + } + WacDialogAction.sendMessage = sendMessage; + function postDialogMessage(targetWindow, args) { + var message = args.message; + var targetOrigin = args.targetOrigin; + if (targetOrigin) { + targetWindow.postMessage(message, targetOrigin); + } + else { + var appDomains = OSF._OfficeAppFactory.getOfficeAppContext().get_appDomains(); + var currentOrigin = window.location.origin; + if (!currentOrigin) { + currentOrigin = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + if (appDomains) { + for (var i = 0; i < appDomains.length && appDomains[i].indexOf("://") !== -1; i++) { + targetWindow.postMessage(message, appDomains[i]); + } + } + if (!OSF.XdmCommunicationManager.checkUrlWithAppDomains(appDomains, currentOrigin)) { + targetWindow.postMessage(message, currentOrigin); + } + } + } + WacDialogAction.postDialogMessage = postDialogMessage; + function registerMessageReceivedEvent() { + function receiveCloseDialogMessage(event) { + var origin = event.origin; + if (event.source == window.opener && + (window.office_disable_receive_dialog_message_prompt === true || + OSF.WacDialogAction.validateTaskpaneDomain(origin, true))) { + if (typeof event.data === "string" && event.data.indexOf(closeDialogKey) > -1) { + window.close(); + } + else { + var rawMessage = event.data, type = typeof rawMessage; + if (rawMessage && (type == "object" || type == "string")) { + var parsedMessage = (type == "string") ? JSON.parse(rawMessage) : rawMessage; + var message = {}; + message[OSF.Marshaling.DialogMessageReceivedEventKeys.MessageContent] = parsedMessage.messageContent; + message[OSF.Marshaling.DialogMessageReceivedEventKeys.MessageOrigin] = event.origin; + var eventArgs = OSF.manufactureEventArgs(OSF.EventType.DialogParentMessageReceived, null, message); + OSF.DialogParentMessageEventDispatch.fireEvent(eventArgs); + } + } + } + } + window.addEventListener("message", receiveCloseDialogMessage); + } + WacDialogAction.registerMessageReceivedEvent = registerMessageReceivedEvent; + function setHandlerAndShowDialogCallback(onEventHandler, callback) { + handler = onEventHandler; + showDialogCallback = callback; + } + WacDialogAction.setHandlerAndShowDialogCallback = setHandlerAndShowDialogCallback; + function escDismissDialogNotification() { + try { + if (dialogNotificationPanel && (dialogNotificationPanel.id == newWindowNotificationId) && showDialogCallback) { + showDialogCallback(12009); + } + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback." + e); + } + } + dismissDialogNotification(); + } + WacDialogAction.escDismissDialogNotification = escDismissDialogNotification; + function showCrossZoneNotification(windowUrl, hostType) { + var okButtonKeyDownClick = false; + var dialogCssManager = OSF.WacCommonUICssManager.getDialogCssManager(hostType); + overlayElement = createOverlayElement(dialogCssManager); + document.body.insertBefore(overlayElement, document.body.firstChild); + dialogNotificationPanel = createNotificationPanelForCrossZoneIssue(dialogCssManager, windowUrl); + dialogNotificationPanel.id = crossZoneNotificationId; + var dialogNotificationButtonPanel = createButtonPanel(dialogCssManager); + var okButton = createButtonControl(dialogCssManager, Strings.OfficeOM.L_DialogOK ? Strings.OfficeOM.L_DialogOK : "OK"); + dialogNotificationButtonPanel.appendChild(okButton); + dialogNotificationPanel.appendChild(dialogNotificationButtonPanel); + document.body.insertBefore(dialogNotificationPanel, document.body.firstChild); + hasCrossZoneNotification = true; + okButton.onclick = function () { + dismissDialogNotification(); + }; + okButton.addEventListener("keydown", function (event) { + if (event.keyCode == 9) { + document.getElementById(configureBrowserLinkId).focus(); + event.preventDefault(); + event.stopPropagation(); + } + else if (event.keyCode == 13) { + okButtonKeyDownClick = true; + event.preventDefault(); + event.stopPropagation(); + } + }, false); + okButton.addEventListener("keyup", function (event) { + if (event.keyCode == 13 && okButtonKeyDownClick) { + okButtonKeyDownClick = false; + dismissDialogNotification(); + event.preventDefault(); + event.stopPropagation(); + } + }, false); + document.getElementById(configureBrowserLinkId).addEventListener("keydown", function (event) { + if (event.keyCode == 9) { + okButton.focus(); + event.preventDefault(); + event.stopPropagation(); + } + }, false); + window.focus(); + okButton.focus(); + } + WacDialogAction.showCrossZoneNotification = showCrossZoneNotification; + function getWithExpiry(storage, key) { + var itemStr = storage.getItem(key); + if (!itemStr) { + return 'undefined'; + } + var item = JSON.parse(itemStr); + if (!item.expiry || !item.value) { + return 'undefined'; + } + var now = new Date(); + var isExpired = now.getTime() > item.expiry; + if (isExpired) { + storage.removeItem(key); + return 'undefined'; + } + return item.value; + } + WacDialogAction.getWithExpiry = getWithExpiry; + function setWithExpiry(storage, key, value) { + var ttlInMs = 86400000; + var now = new Date(); + var item = { + value: value, + expiry: now.getTime() + ttlInMs + }; + storage.setItem(key, JSON.stringify(item)); + } + WacDialogAction.setWithExpiry = setWithExpiry; + function getLocalStorage() { + if (OSF.SafeStorage) { + return new OSF.SafeStorage(window.localStorage); + } + else { + return window.localStorage; + } + } + WacDialogAction.getLocalStorage = getLocalStorage; + function getSessionStorage() { + if (OSF.SafeStorage) { + return new OSF.SafeStorage(window.sessionStorage); + } + else { + return window.sessionStorage; + } + } + WacDialogAction.getSessionStorage = getSessionStorage; + function getUrlProtocolHostnamePort(parsedUrl) { + var port = parsedUrl.port ? (':' + parsedUrl.port) : ''; + return parsedUrl.protocol + "//" + parsedUrl.hostname + port; + } + WacDialogAction.getUrlProtocolHostnamePort = getUrlProtocolHostnamePort; + function validateTaskpaneDomain(taskpaneUrl, allowSubDomains) { + function urlCompare(url_parser1, url_parser2) { + return ((url_parser1.hostname == url_parser2.hostname) && + (url_parser1.protocol == url_parser2.protocol) && + hasSamePort(url_parser1, url_parser2)); + } + function hasSamePort(url_parser1, url_parser2) { + var httpPort = "80"; + var httpsPort = "443"; + return ((url_parser1.port == url_parser2.port) || + (url_parser1.port == "" && url_parser1.protocol == "http:" && url_parser2.port == httpPort) || + (url_parser1.port == "" && url_parser1.protocol == "https:" && url_parser2.port == httpsPort) || + (url_parser2.port == "" && url_parser2.protocol == "http:" && url_parser1.port == httpPort) || + (url_parser2.port == "" && url_parser2.protocol == "https:" && url_parser1.port == httpsPort)); + } + try { + if (!taskpaneUrl) { + return false; + } + if (!allowSubDomains) { + allowSubDomains = true; + } + var dialogUrl = window.location.origin; + if (!dialogUrl) { + dialogUrl = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + var parsedDialogUrl = OSF.OUtil.parseUrl(dialogUrl, true); + var parsedTaskpaneUrl = OSF.OUtil.parseUrl(taskpaneUrl, true); + if (!parsedDialogUrl.protocol || !parsedDialogUrl.hostname || + !parsedTaskpaneUrl.protocol || !parsedTaskpaneUrl.hostname || parsedTaskpaneUrl.port === undefined) { + return false; + } + var isSameDomain = urlCompare(parsedDialogUrl, parsedTaskpaneUrl); + var isSubdomain = false; + if (allowSubDomains) { + isSubdomain = OSF.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(taskpaneUrl, dialogUrl); + } + if (isSameDomain || isSubdomain) { + return true; + } + var localStorage = this.getLocalStorage(); + var sessionStorage = this.getSessionStorage(); + var taskpaneUrlPrefix = parsedTaskpaneUrl.protocol + "//" + parsedTaskpaneUrl.hostname + (parsedTaskpaneUrl.port ? (":" + parsedTaskpaneUrl.port) : ""); + var storageKeyUrl = '_trusts_' + taskpaneUrlPrefix; + var urlTrustValueInLocalStorage = this.getWithExpiry(localStorage, storageKeyUrl); + var urlTrustValueInSessionStorage = this.getWithExpiry(sessionStorage, storageKeyUrl); + if (urlTrustValueInLocalStorage === 'true') { + return true; + } + else if (urlTrustValueInSessionStorage === 'false') { + return false; + } + var shortTaskpaneUrl = this.getUrlProtocolHostnamePort(parsedTaskpaneUrl); + var shortDialogUrl = this.getUrlProtocolHostnamePort(parsedDialogUrl); + var promptText = 'You are about to send and receive potentially sensitive information from "' + shortDialogUrl + '". Only click OK if you trust the following website recieving the sensitive information: "' + shortTaskpaneUrl + '".'; + if (Strings.OfficeOM["L_ConfirmDialogApiTrustsParent"]) { + promptText = Strings.OfficeOM["L_ConfirmDialogApiTrustsParent"].replace('{0}', shortDialogUrl).replace('{1}', shortTaskpaneUrl); + } + if (window.confirm(promptText)) { + this.setWithExpiry(localStorage, storageKeyUrl, 'true'); + this.setWithExpiry(sessionStorage, storageKeyUrl, 'true'); + return true; + } + else { + this.setWithExpiry(localStorage, storageKeyUrl, 'false'); + this.setWithExpiry(sessionStorage, storageKeyUrl, 'false'); + return false; + } + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during validateTaskpaneDomain method:" + e); + } + return false; + } + } + WacDialogAction.validateTaskpaneDomain = validateTaskpaneDomain; + function validateDialogDomain(dialogUrl, taskpaneUrl, allowSubdomains) { + if (allowSubdomains === void 0) { allowSubdomains = true; } + if (!dialogUrl || !taskpaneUrl) { + return false; + } + var httpsIdentifyString = "https:"; + var parsedDialogUrl = OSF.OUtil.parseUrl(dialogUrl); + var parsedTaskpaneUrl = OSF.OUtil.parseUrl(taskpaneUrl); + var appDomains = OSF._OfficeAppFactory.getOfficeAppContext().get_appDomains(); + var isHttps = parsedDialogUrl.protocol === httpsIdentifyString; + if (!isHttps) { + return false; + } + var isSameDomain = parsedDialogUrl.protocol === parsedTaskpaneUrl.protocol + && parsedDialogUrl.hostname === parsedTaskpaneUrl.hostname + && parsedDialogUrl.port === parsedTaskpaneUrl.port; + var isInAppDomains = OSF.XdmCommunicationManager.checkUrlWithAppDomains(appDomains, dialogUrl); + var isTrustedDomain = isSameDomain || isInAppDomains; + if (!isTrustedDomain && allowSubdomains) { + isTrustedDomain = OSF.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(taskpaneUrl, dialogUrl); + } + return isTrustedDomain; + } + function receiveMessage(event) { + if (event.source == windowInstance) { + try { + var dialogOrigin = event.origin; + var taskpaneUrl = OSF._OfficeAppFactory.getOfficeAppContext().get_docUrl(); + var isTrustedDomain = validateDialogDomain(dialogOrigin, taskpaneUrl, true); + if (!isTrustedDomain) { + throw new Error("Received a message from a dialog with an untrusted domain."); + } + var dialogMessageReceivedArgs = {}; + dialogMessageReceivedArgs[OSF.Marshaling.DialogMessageReceivedEventKeys.MessageType] = 0; + dialogMessageReceivedArgs[OSF.Marshaling.DialogMessageReceivedEventKeys.MessageContent] = event.data; + dialogMessageReceivedArgs[OSF.Marshaling.DialogMessageReceivedEventKeys.MessageOrigin] = dialogOrigin; + handler(dialogMessageReceivedArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during receive message handler." + e); + } + } + } + } + function storageChangedHandler(event) { + var messageKey = OSF._OfficeAppFactory.getId() + messageParentKey; + if (event.key == messageKey) { + try { + var dialogMessageReceivedArgs = {}; + dialogMessageReceivedArgs[OSF.Marshaling.DialogMessageReceivedEventKeys.MessageType] = 0; + dialogMessageReceivedArgs[OSF.Marshaling.DialogMessageReceivedEventKeys.MessageContent] = event.newValue; + dialogMessageReceivedArgs[OSF.Marshaling.DialogMessageReceivedEventKeys.MessageOrigin] = event.origin; + handler(dialogMessageReceivedArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during storage changed handler." + e); + } + } + } + } + function checkAppDomain(dialogInfo) { + var appDomains = OSF._OfficeAppFactory.getOfficeAppContext().get_appDomains(); + var url = dialogInfo["url"]; + var fInDomain = OSF.XdmCommunicationManager.checkUrlWithAppDomains(appDomains, url); + if (!fInDomain) { + return OSF._OfficeAppFactory.getOfficeAppContext().get_docUrl() + && OSF.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(OSF._OfficeAppFactory.getOfficeAppContext().get_docUrl(), url); + } + return fInDomain; + } + function showDialog(dialogInfo) { + var hostInfoObj = OSF._OfficeAppFactory.getHostInfo(); + var hostInfoVals = [ + hostInfoObj.hostType, + hostInfoObj.hostPlatform, + hostInfoObj.hostSpecificFileVersion, + hostInfoObj.hostLocale, + hostInfoObj.osfControlAppCorrelationId, + "isDialog", + hostInfoObj.disableLogging ? "disableLogging" : "", + (hostInfoObj.flags & OSF.HostInfoFlags.PublicAddin) + ]; + var URL_DELIM = "$"; + var hostInfo = hostInfoVals.join(URL_DELIM); + var appContext = OSF._OfficeAppFactory.getOfficeAppContext(); + appContext.set_taskpaneUrl(window.location.origin); + if (!appContext.get_taskpaneUrl()) { + appContext.set_taskpaneUrl(window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : '')); + } + var windowUrl = dialogInfo["url"]; + if (!dialogInfo[OSF.ShowWindowDialogParameterKeys.UrlNoHostInfo]) { + windowUrl = OSF.OUtil.addHostInfoAsQueryParam(windowUrl, hostInfo); + } + var windowName = JSON.parse(window.name); + windowName["hostInfo"] = hostInfo; + windowName["appContext"] = appContext; + var width = dialogInfo[OSF.ShowWindowDialogParameterKeys.Width] * screen.width / 100; + var height = dialogInfo[OSF.ShowWindowDialogParameterKeys.Height] * screen.height / 100; + var left = appContext.get_clientWindowWidth() / 2 - width / 2; + var top = appContext.get_clientWindowHeight() / 2 - height / 2; + var windowSpecs = "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top + ",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no"; + windowInstance = window.open(windowUrl, OSF.OUtil.serializeObjectToString(windowName), windowSpecs); + if (windowInstance == null) { + OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api."); + removeDialogNotificationElement(); + showCrossZoneNotification(windowUrl, hostInfoObj.hostType); + showDialogCallback(12011); + return; + } + if (OSF.OUtil.shouldUseLocalStorageToPassMessage()) { + window.addEventListener("storage", storageChangedHandler); + } + else { + window.addEventListener("message", receiveMessage); + } + function checkWindowClose() { + try { + if (windowInstance == null || windowInstance.closed) { + window.clearInterval(checkWindowDialogCloseInterval); + if (OSF.OUtil.shouldUseLocalStorageToPassMessage()) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } + var dialogClosedArgs = {}; + dialogClosedArgs[OSF.Marshaling.DialogMessageReceivedEventKeys.MessageType] = 12006; + handler(dialogClosedArgs); + } + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during check or handle window close." + e); + } + } + } + checkWindowDialogCloseInterval = window.setInterval(checkWindowClose, 1000); + if (showDialogCallback != null) { + showDialogCallback(0); + } + else { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("showDialogCallback can not be null."); + } + } + } + function createButtonControl(dialogCssManager, buttonValue) { + var buttonControl = document.createElement("input"); + buttonControl.setAttribute("type", "button"); + buttonControl.style.cssText = dialogCssManager.getDialogButtonCSS(); + buttonControl.style.borderColor = commonButtonBorderColor; + buttonControl.style.backgroundColor = commonButtonBackgroundColor; + buttonControl.setAttribute("value", buttonValue); + var buttonControlEventInHandler = function () { + handleButtonControlEventIn(buttonControl); + }; + var buttonControlEventOutHandler = function () { + handleButtonControlEventOut(buttonControl); + }; + buttonControl.addEventListener("mouseover", buttonControlEventInHandler); + buttonControl.addEventListener("focus", buttonControlEventInHandler); + buttonControl.addEventListener("mouseout", buttonControlEventOutHandler); + buttonControl.addEventListener("focusout", buttonControlEventOutHandler); + return buttonControl; + } + function handleButtonControlEventIn(buttonControl) { + if (hostThemeButtonStyle != null) { + buttonControl.style.borderColor = hostThemeButtonStyle.HostButtonBorderColor; + buttonControl.style.backgroundColor = hostThemeButtonStyle.HostButtonBackgroundColor; + } + else if (OSF.OUtil.getCommonUI()) { + buttonControl.style.borderColor = OSF.OUtil.getCommonUI().HostButtonBorderColor; + buttonControl.style.backgroundColor = OSF.OUtil.getCommonUI().HostButtonBackgroundColor; + } + else { + buttonControl.style.backgroundColor = commonEventInButtonBackgroundColor; + } + } + function handleButtonControlEventOut(buttonControl) { + buttonControl.style.borderColor = commonButtonBorderColor; + buttonControl.style.backgroundColor = commonButtonBackgroundColor; + } + function dismissDialogNotification() { + function unregisterDialogNotificationShownEventCallback(status) { + removeDialogNotificationElement(); + setFocusOnFirstElement(status); + } + registerDialogNotificationShownArgs.onCalling = unregisterDialogNotificationShownEventCallback; + OSF.WACDelegate.unregisterEventAsync(registerDialogNotificationShownArgs); + } + function removeDialogNotificationElement() { + if (dialogNotificationPanel != null) { + document.body.removeChild(dialogNotificationPanel); + dialogNotificationPanel = null; + } + if (overlayElement != null) { + document.body.removeChild(overlayElement); + overlayElement = null; + } + } + function createOverlayElement(dialogCssManager) { + var overlayElement = document.createElement("div"); + overlayElement.style.cssText = dialogCssManager.getOverlayElementCSS(); + return overlayElement; + } + function createNotificationPanel(dialogCssManager, notificationString) { + var dialogNotificationPanel = document.createElement("div"); + dialogNotificationPanel.style.cssText = dialogCssManager.getDialogNotificationPanelCSS(); + setAttributeForDialogNotificationPanel(dialogNotificationPanel); + var dialogNotificationTextPanel = document.createElement("div"); + dialogNotificationTextPanel.style.cssText = dialogCssManager.getNewWindowNotificationTextPanelCSS(); + dialogNotificationTextPanel.id = dialogNotificationTextPanelId; + if (document.documentElement.getAttribute("dir") == "rtl") { + dialogNotificationTextPanel.style.paddingRight = "30px"; + } + else { + dialogNotificationTextPanel.style.paddingLeft = "30px"; + } + var dialogNotificationTextSpan = document.createElement("span"); + dialogNotificationTextSpan.style.cssText = dialogCssManager.getNewWindowNotificationTextSpanCSS(); + dialogNotificationTextSpan.innerText = notificationString; + dialogNotificationTextPanel.appendChild(dialogNotificationTextSpan); + dialogNotificationPanel.appendChild(dialogNotificationTextPanel); + return dialogNotificationPanel; + } + function createButtonPanel(dialogCssManager) { + var dialogNotificationButtonPanel = document.createElement("div"); + dialogNotificationButtonPanel.style.cssText = dialogCssManager.getDialogNotificationButtonPanelCSS(); + if (document.documentElement.getAttribute("dir") == "rtl") { + dialogNotificationButtonPanel.style.cssFloat = "left"; + } + else { + dialogNotificationButtonPanel.style.cssFloat = "right"; + } + return dialogNotificationButtonPanel; + } + function setFocusOnFirstElement(status) { + if (status != 0) { + var list = document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper().getTabbableElements()); + OSF.OUtil.focusToFirstTabbable(list, false); + } + } + function createNotificationPanelForCrossZoneIssue(dialogCssManager, windowUrl) { + var dialogNotificationPanel = document.createElement("div"); + dialogNotificationPanel.style.cssText = dialogCssManager.getDialogNotificationPanelCSS(); + setAttributeForDialogNotificationPanel(dialogNotificationPanel); + var dialogNotificationTextPanel = document.createElement("div"); + dialogNotificationTextPanel.style.cssText = dialogCssManager.getCrossZoneNotificationTextPanelCSS(); + dialogNotificationTextPanel.id = dialogNotificationTextPanelId; + var configureBrowserLink = document.createElement("a"); + configureBrowserLink.id = configureBrowserLinkId; + configureBrowserLink.href = "#"; + configureBrowserLink.innerText = Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink; + configureBrowserLink.setAttribute("onclick", "window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"); + var dialogNotificationTextSpan = document.createElement("span"); + if (Strings.OfficeOM.L_NewWindowCrossZone) { + var dialogNotificationText = Strings.OfficeOM.L_NewWindowCrossZone.replace(/{1+}/gm, OSF.OUtil.getDomainForUrl(windowUrl)); + var dialogNotificationTextParts = dialogNotificationText.split("{0}"); + dialogNotificationTextSpan.appendChild(document.createTextNode(dialogNotificationTextParts[0])); + dialogNotificationTextSpan.appendChild(configureBrowserLink); + dialogNotificationTextSpan.appendChild(document.createTextNode(dialogNotificationTextParts[1])); + } + dialogNotificationTextPanel.appendChild(dialogNotificationTextSpan); + dialogNotificationPanel.appendChild(dialogNotificationTextPanel); + return dialogNotificationPanel; + } + function setAttributeForDialogNotificationPanel(dialogNotificationDiv) { + dialogNotificationDiv.setAttribute("role", "dialog"); + dialogNotificationDiv.setAttribute("aria-describedby", dialogNotificationTextPanelId); + } + function addOrRemoveEventListenersForWindow(isAdd) { + var me = this; + var onWindowFocus = function () { + if (!OSF._OfficeAppFactory.getWebAppState().focused) { + OSF._OfficeAppFactory.getWebAppState().focused = true; + } + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.Select]); + }; + var onWindowBlur = function () { + if (!OSF) { + return; + } + if (OSF._OfficeAppFactory.getWebAppState().focused) { + OSF._OfficeAppFactory.getWebAppState().focused = false; + } + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.UnSelect]); + }; + var onWindowKeydown = function (e) { + e.preventDefault = e.preventDefault || function () { + e.returnValue = false; + }; + if (e.keyCode == 117 && (e.ctrlKey || e.metaKey)) { + e.preventDefault(); + var actionId = OSF.AgaveHostAction.CtrlF6Exit; + if (e.shiftKey) { + actionId = OSF.AgaveHostAction.CtrlF6ExitShift; + } + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, actionId]); + } + else if (e.keyCode == 9) { + e.preventDefault(); + var allTabbableElements = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToNextTabbable(allTabbableElements, e.target || e.srcElement, e.shiftKey); + if (!focused) { + if (me._hostInfo.isDialog) { + OSF.OUtil.focusToFirstTabbable(allTabbableElements, e.shiftKey); + } + else { + if (e.shiftKey) { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.TabExitShift]); + } + else { + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.TabExit]); + } + } + } + } + else if (e.keyCode == 27) { + e.preventDefault(); + escDismissDialogNotification(); + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.EscExit]); + } + else if (e.keyCode == 113) { + e.preventDefault(); + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.F2Exit]); + } + else if ((e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) && e.keyCode >= 1 && e.keyCode <= 255) { + var params = { + "keyCode": e.keyCode, + "shiftKey": e.shiftKey, + "altKey": e.altKey, + "ctrlKey": e.ctrlKey, + "metaKey": e.metaKey + }; + OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost", null, [me._webAppState.id, OSF.AgaveHostAction.KeyboardShortcuts, params]); + } + }; + var onWindowKeypress = function (e) { + if (e.keyCode == 117 && e.ctrlKey) { + if (e.preventDefault) { + e.preventDefault(); + } + else { + e.returnValue = false; + } + } + }; + if (isAdd) { + OSF.OUtil.addEventListener(window, "focus", onWindowFocus); + OSF.OUtil.addEventListener(window, "blur", onWindowBlur); + OSF.OUtil.addEventListener(window, "keydown", onWindowKeydown); + OSF.OUtil.addEventListener(window, "keypress", onWindowKeypress); + } + else { + OSF.OUtil.removeEventListener(window, "focus", onWindowFocus); + OSF.OUtil.removeEventListener(window, "blur", onWindowBlur); + OSF.OUtil.removeEventListener(window, "keydown", onWindowKeydown); + OSF.OUtil.removeEventListener(window, "keypress", onWindowKeypress); + } + } + })(WacDialogAction = OSF.WacDialogAction || (OSF.WacDialogAction = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var SafeArrayDelegate; + (function (SafeArrayDelegate) { + function openDialog(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.SafeArrayDelegate.getOnAfterRegisterEvent(true, args); + OSF._OfficeAppFactory.getClientHostController().openDialog(args.dispId, undefined, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.SafeArrayDelegate.onException(ex, args); + } + } + SafeArrayDelegate.openDialog = openDialog; + function closeDialog(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback = OSF.SafeArrayDelegate.getOnAfterRegisterEvent(false, args); + try { + OSF._OfficeAppFactory.getClientHostController().closeDialog(args.dispId, undefined, args.targetId, callback); + } + catch (ex) { + OSF.SafeArrayDelegate.onException(ex, args); + } + } + SafeArrayDelegate.closeDialog = closeDialog; + function messageParent(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime = (new Date()).getTime(); + var result = OSF._OfficeAppFactory.getClientHostController().messageParent(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), result); + } + return result; + } + catch (ex) { + return OSF.SafeArrayDelegate.onExceptionSyncMethod(ex); + } + } + SafeArrayDelegate.messageParent = messageParent; + function sendMessage(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime = (new Date()).getTime(); + var result = OSF._OfficeAppFactory.getClientHostController().sendMessage(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + return result; + } + catch (ex) { + return OSF.SafeArrayDelegate.onExceptionSyncMethod(ex); + } + } + SafeArrayDelegate.sendMessage = sendMessage; + })(SafeArrayDelegate = OSF.SafeArrayDelegate || (OSF.SafeArrayDelegate = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var WACDelegate; + (function (WACDelegate) { + function openDialog(args) { + var httpsIdentifyString = "https://"; + var httpIdentifyString = "http://"; + var dialogInfo = JSON.parse(args.targetId); + var callback = WACDelegate.getOnAfterRegisterEvent(true, args); + function showDialogCallback(status) { + var payload = { "Error": status }; + try { + callback(0, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback." + e); + } + } + } + if (OSF.DialogShownStatus.hasDialogShown) { + showDialogCallback(12007); + return; + } + var dialogUrl = dialogInfo[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(); + var taskpaneUrl = (window.location.href).toLowerCase(); + if (OSF.AppTelemetry) { + var isSameDomain = false; + var parentIsSubdomain = false; + var childIsSubdomain = false; + var isAppDomain = false; + var dialogUrlPortionAllowedToLog = ""; + var taskpaneUrlPortionAllowedToLog = ""; + if (OSF.OUtil) { + var parsedDialogUrl = OSF.OUtil.parseUrl(dialogUrl); + var parsedTaskpaneUrl = OSF.OUtil.parseUrl(taskpaneUrl); + isSameDomain = parsedDialogUrl.protocol === parsedTaskpaneUrl.protocol + && parsedDialogUrl.hostname === parsedTaskpaneUrl.hostname + && parsedDialogUrl.port === parsedTaskpaneUrl.port; + dialogUrlPortionAllowedToLog = OSF.OUtil.getHostnamePortionForLogging(parsedDialogUrl.hostname); + if (isSameDomain) { + taskpaneUrlPortionAllowedToLog = dialogUrlPortionAllowedToLog; + } + else { + taskpaneUrlPortionAllowedToLog = OSF.OUtil.getHostnamePortionForLogging(parsedTaskpaneUrl.hostname); + parentIsSubdomain = OSF.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(dialogUrl, taskpaneUrl); + childIsSubdomain = OSF.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(taskpaneUrl, dialogUrl); + } + var appDomains = OSF._OfficeAppFactory.getOfficeAppContext().get_appDomains(); + isAppDomain = OSF.XdmCommunicationManager.checkUrlWithAppDomains(appDomains, dialogUrl); + } + var logJsonAsString = "openDialog isInline: " + dialogInfo[OSF.ShowWindowDialogParameterKeys.DisplayInIframe].toString() + ", " + + "taskpaneHostname: " + taskpaneUrlPortionAllowedToLog + ", " + + "dialogHostName: " + dialogUrlPortionAllowedToLog + ", " + + "isSameDomain: " + isSameDomain.toString() + ", " + + "parentIsSubdomain: " + parentIsSubdomain.toString() + ", " + + "childIsSubdomain: " + childIsSubdomain.toString() + ", " + + "isAppDomain: " + isAppDomain.toString(); + OSF.AppTelemetry.logAppCommonMessage(logJsonAsString); + } + if (dialogUrl == null || !(dialogUrl.substr(0, httpsIdentifyString.length) === httpsIdentifyString)) { + if (dialogUrl.substr(0, httpIdentifyString.length) === httpIdentifyString) { + showDialogCallback(12005); + } + else { + showDialogCallback(12003); + } + return; + } + if (!dialogInfo[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]) { + OSF.DialogShownStatus.isWindowDialog = true; + OSF.WacDialogAction.setHandlerAndShowDialogCallback(function OSF_DDA_WACDelegate$RegisterEventAsync_OnEvent(payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, showDialogCallback); + OSF.WacDialogAction.handleNewWindowDialog(dialogInfo); + } + else { + OSF.DialogShownStatus.isWindowDialog = false; + OSF.WACDelegate.registerEventAsync(args); + } + } + WACDelegate.openDialog = openDialog; + function validateTaskpaneDomain(taskpaneUrl, allowSubDomains) { + return OSF.WacDialogAction.validateTaskpaneDomain(taskpaneUrl, allowSubDomains); + } + WACDelegate.validateTaskpaneDomain = validateTaskpaneDomain; + function messageParent(args) { + var targetOrigin = args.hostCallArgs["targetOrigin"]; + var hasTargetOrigin = !!targetOrigin; + var allowSubDomains = true; + if (hasTargetOrigin && targetOrigin != "*") { + var localStorage = OSF.WacDialogAction.getLocalStorage(); + var sessionStorage = OSF.WacDialogAction.getSessionStorage(); + var storageKey = '_trusts_'; + var parsedTargetOriginUrl = OSF.OUtil.parseUrl(targetOrigin, true); + var targetOriginUrlPrefix = parsedTargetOriginUrl.protocol + "//" + parsedTargetOriginUrl.hostname + (parsedTargetOriginUrl.port ? (":" + parsedTargetOriginUrl.port) : ""); + storageKey = storageKey + targetOriginUrlPrefix; + OSF.WacDialogAction.setWithExpiry(localStorage, storageKey, 'true'); + OSF.WacDialogAction.setWithExpiry(sessionStorage, storageKey, 'true'); + } + if (window.opener != null) { + if (!hasTargetOrigin) { + var taskpaneUrl = OSF._OfficeAppFactory.getOfficeAppContext().get_taskpaneUrl(); + if (!taskpaneUrl) { + taskpaneUrl = window.location.origin; + } + else if (!OSF.WacDialogAction.validateTaskpaneDomain(taskpaneUrl, allowSubDomains)) { + var errorMessage = "messageParent called but the taskpane domain is untrusted: " + taskpaneUrl; + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException(errorMessage); + } + throw new Error(errorMessage); + } + args.hostCallArgs["targetOrigin"] = taskpaneUrl; + } + OSF.WacDialogAction.messageParent(args); + } + else { + var currentUrl = window.location.origin; + if (!currentUrl) { + currentUrl = window.location.protocol + "//" + + window.location.hostname + + (window.location.port ? ':' + window.location.port : ''); + } + if (!hasTargetOrigin) { + args.hostCallArgs["targetOrigin"] = currentUrl; + } + OSF.WACDelegate.executeAsync(args); + } + } + WACDelegate.messageParent = messageParent; + function sendMessage(args) { + if (OSF.DialogShownStatus.hasDialogShown) { + if (OSF.DialogShownStatus.isWindowDialog) { + OSF.WacDialogAction.sendMessage(args); + } + else { + OSF.WACDelegate.executeAsync(args); + } + } + } + WACDelegate.sendMessage = sendMessage; + function closeDialog(args) { + var callback = WACDelegate.getOnAfterRegisterEvent(false, args); + function closeDialogCallback(status) { + var payload = { "Error": status }; + try { + callback(0, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback." + e); + } + } + } + if (!OSF.DialogShownStatus.hasDialogShown) { + closeDialogCallback(12006); + } + else { + if (OSF.DialogShownStatus.isWindowDialog) { + if (args.onCalling) { + args.onCalling(); + } + OSF.WacDialogAction.closeDialog(closeDialogCallback); + } + else { + OSF.WACDelegate.unregisterEventAsync(args); + } + } + } + WACDelegate.closeDialog = closeDialog; + })(WACDelegate = OSF.WACDelegate || (OSF.WACDelegate = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var Event; + (function (Event) { + function defineMethods() { + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.AddHandlerAsync, + requiredArguments: [{ + "name": OSF.ParameterNames.EventType, + "enum": OSF.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": OSF.ParameterNames.Handler, + "types": ["function"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.RemoveHandlerAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.EventType, + "enum": OSF.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + } + ], + supportedOptions: [ + { + name: OSF.ParameterNames.Handler, + value: { + "types": ["function", "object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [] + }); + } + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + }); + })(Event || (Event = {})); +})(OSF || (OSF = {})); +var Office; +(function (Office) { + var context; + (function (context) { + var extensionLifeCycle; + (function (extensionLifeCycle) { + function launchExtensionComponent(extId, componentType, componentId, hostProps, optionalProps) { + var instanceToken = OSF.OUtil.Guid.generateNewGuid(); + if (optionalProps == null) { + optionalProps = { + OptionalProperties: {}, + DevProperties: {} + }; + } + optionalProps.OptionalProperties.InstanceToken = instanceToken; + var params = { + ExtId: extId, + ComponentType: componentType, + ComponentId: componentId, + HostProps: hostProps, + OptionalProps: optionalProps + }; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.hostPlatform == OSF.HostInfoPlatform.web) { + var webAppState = OSF._OfficeAppFactory.getWebAppState(); + webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [webAppState.id, OSF.AgaveHostAction.LaunchExtensionComponent, params]); + var extensionComponentInstance = { + Id: extId, + ComponentType: componentType, + ComponentId: componentId, + InstanceToken: instanceToken, + LaunchProperties: optionalProps + }; + return extensionComponentInstance; + } + else { + throw OSF.Utility.createNotImplementedException(); + } + } + extensionLifeCycle.launchExtensionComponent = launchExtensionComponent; + })(extensionLifeCycle = context.extensionLifeCycle || (context.extensionLifeCycle = {})); + })(context = Office.context || (Office.context = {})); + var ExtensionLifeCycle; + (function (ExtensionLifeCycle) { + function close(context) { + OSF._OfficeAppFactory.getClientHostController().closeSdxDialog(context); + } + ExtensionLifeCycle.close = close; + })(ExtensionLifeCycle = Office.ExtensionLifeCycle || (Office.ExtensionLifeCycle = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var File = (function () { + function File(handle, m_fileSize, m_sliceSize) { + this.m_fileSize = m_fileSize; + this.m_sliceSize = m_sliceSize; + this.m_privateState = {}; + this.m_privateState[OSF.FileProperties.Handle] = handle; + this.m_privateState[OSF.FileProperties.SliceSize] = m_sliceSize; + } + Object.defineProperty(File.prototype, "size", { + get: function () { + return this.m_fileSize; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(File.prototype, "sliceCount", { + get: function () { + return Math.ceil(this.m_fileSize / this.m_sliceSize); + }, + enumerable: true, + configurable: true + }); + File.prototype.getSliceAsync = function (sliceIndex, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.GetDocumentCopyChunkAsync, arguments, this, this.m_privateState); + }; + File.prototype.closeAsync = function (callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.ReleaseDocumentCopyAsync, arguments, this, this.m_privateState); + }; + return File; + }()); + Office.File = File; +})(Office || (Office = {})); +(function (Office) { + var context; + (function (context) { + var document; + (function (document) { + function getFileAsync(fileType, options, callback) { + OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.GetDocumentCopyAsync, arguments, Office.context.document, undefined); + } + document.getFileAsync = getFileAsync; + })(document = context.document || (context.document = {})); + })(context = Office.context || (Office.context = {})); +})(Office || (Office = {})); +var OSF; +(function (OSF) { + var PropertyDescriptors; + (function (PropertyDescriptors) { + PropertyDescriptors.FileProperties = "FileProperties"; + PropertyDescriptors.FileSliceProperties = "FileSliceProperties"; + })(PropertyDescriptors = OSF.PropertyDescriptors || (OSF.PropertyDescriptors = {})); + var FileProperties; + (function (FileProperties) { + FileProperties["Handle"] = "FileHandle"; + FileProperties["FileSize"] = "FileSize"; + FileProperties["SliceSize"] = "sliceSize"; + })(FileProperties = OSF.FileProperties || (OSF.FileProperties = {})); + ; + var additionalParameter; + (function (additionalParameter) { + additionalParameter["FileSliceOffset"] = "fileSliceoffset"; + })(additionalParameter = OSF.additionalParameter || (OSF.additionalParameter = {})); + var Marshaling; + (function (Marshaling) { + var File; + (function (File) { + var FilePropertiesKeys; + (function (FilePropertiesKeys) { + FilePropertiesKeys[FilePropertiesKeys["Handle"] = 0] = "Handle"; + FilePropertiesKeys[FilePropertiesKeys["FileSize"] = 1] = "FileSize"; + })(FilePropertiesKeys = File.FilePropertiesKeys || (File.FilePropertiesKeys = {})); + var SlicePropertiesKeys; + (function (SlicePropertiesKeys) { + SlicePropertiesKeys[SlicePropertiesKeys["Data"] = 0] = "Data"; + SlicePropertiesKeys[SlicePropertiesKeys["SliceSize"] = 1] = "SliceSize"; + })(SlicePropertiesKeys = File.SlicePropertiesKeys || (File.SlicePropertiesKeys = {})); + var FileType; + (function (FileType) { + FileType[FileType["Text"] = 0] = "Text"; + FileType[FileType["Compressed"] = 1] = "Compressed"; + FileType[FileType["Pdf"] = 2] = "Pdf"; + })(FileType = File.FileType || (File.FileType = {})); + var ParameterKeys; + (function (ParameterKeys) { + ParameterKeys[ParameterKeys["FileType"] = 0] = "FileType"; + ParameterKeys[ParameterKeys["SliceSize"] = 1] = "SliceSize"; + ParameterKeys[ParameterKeys["Handle"] = 2] = "Handle"; + ParameterKeys[ParameterKeys["SliceIndex"] = 3] = "SliceIndex"; + })(ParameterKeys = File.ParameterKeys || (File.ParameterKeys = {})); + })(File = Marshaling.File || (Marshaling.File = {})); + })(Marshaling = OSF.Marshaling || (OSF.Marshaling = {})); + var File; + (function (File) { + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + defineSafeArrayParameterMapFunc: defineSafeArrayParameterMap, + defineWebParameterMapFunc: defineWebParameterMap + }); + function defineMethods() { + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.GetDocumentCopyAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.FileType, + "enum": Office.FileType + } + ], + supportedOptions: [ + { + name: OSF.ParameterNames.SliceSize, + value: { + "types": ["number"], + "defaultValue": OSF.OUtil.getHostPlatform() == OSF.HostInfoPlatform.ios ? 64 * 1024 : 4 * 1024 * 1024 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var sliceSize = callArgs[OSF.ParameterNames.SliceSize]; + if (sliceSize <= 0 || sliceSize > (4 * 1024 * 1024)) { + throw 11002; + } + return callArgs; + }, + onSucceeded: function (fileDescriptor, caller, callArgs) { + return new Office.File(fileDescriptor[OSF.FileProperties.Handle], fileDescriptor[OSF.FileProperties.FileSize], callArgs[OSF.ParameterNames.SliceSize]); + } + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.GetDocumentCopyChunkAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.SliceIndex, + "types": ["number"] + } + ], + privateStateCallbacks: [ + { + name: OSF.FileProperties.Handle, + value: function (caller, stateInfo) { return stateInfo[OSF.FileProperties.Handle]; } + }, + { + name: OSF.FileProperties.SliceSize, + value: function (caller, stateInfo) { return stateInfo[OSF.FileProperties.SliceSize]; } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var index = callArgs[OSF.ParameterNames.SliceIndex]; + if (index < 0 || index >= caller.sliceCount) { + throw 5008; + } + callArgs[OSF.additionalParameter.FileSliceOffset] = parseInt((index * stateInfo[OSF.FileProperties.SliceSize]).toString()); + return callArgs; + }, + onSucceeded: function (sliceDescriptor, caller, callArgs) { + var slice = {}; + OSF.OUtil.defineEnumerableProperties(slice, { + "data": { + value: OSF.OUtil.getHostPlatform() == OSF.HostInfoPlatform.mac ? OSF.OUtil.shallowCopy(sliceDescriptor[OSF.ParameterNames.Data]) : sliceDescriptor[OSF.ParameterNames.Data] + }, + "index": { + value: callArgs[OSF.ParameterNames.SliceIndex] + }, + "size": { + value: sliceDescriptor[OSF.FileProperties.SliceSize] + } + }); + return slice; + } + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.ReleaseDocumentCopyAsync, + privateStateCallbacks: [ + { + name: OSF.FileProperties.Handle, + value: function (caller, stateInfo) { return stateInfo[OSF.FileProperties.Handle]; } + } + ] + }); + } + function defineSafeArrayParameterMap() { + OSF.HostParameterMap.define({ + type: OSF.PropertyDescriptors.FileProperties, + fromHost: [ + { name: OSF.FileProperties.Handle, value: 0 }, + { name: OSF.FileProperties.FileSize, value: 1 } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: OSF.PropertyDescriptors.FileSliceProperties, + fromHost: [ + { name: OSF.ParameterNames.Data, value: 0 }, + { name: OSF.FileProperties.SliceSize, value: 1 } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.FileType, + toHost: [ + { name: Office.FileType.Text, value: 0 }, + { name: Office.FileType.Compressed, value: 5 }, + { name: Office.FileType.Pdf, value: 6 } + ] + }); + OSF.HostParameterMap.define({ + type: 77, + toHost: [{ name: OSF.ParameterNames.FileType, value: 0 }], + fromHost: [ + { name: OSF.PropertyDescriptors.FileProperties, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 80, + toHost: [ + { name: OSF.FileProperties.Handle, value: 0 }, + { name: OSF.additionalParameter.FileSliceOffset, value: 1 }, + { name: OSF.FileProperties.SliceSize, value: 2 } + ], + fromHost: [ + { name: OSF.PropertyDescriptors.FileSliceProperties, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 81, + toHost: [{ name: OSF.FileProperties.Handle, value: 0 }] + }); + } + function defineWebParameterMap() { + OSF.HostParameterMap.addComplexType(OSF.PropertyDescriptors.FileProperties); + OSF.HostParameterMap.addComplexType(OSF.PropertyDescriptors.FileSliceProperties); + OSF.HostParameterMap.define({ + type: OSF.PropertyDescriptors.FileProperties, + fromHost: [ + { name: OSF.FileProperties.Handle, value: OSF.Marshaling.File.FilePropertiesKeys.Handle }, + { name: OSF.FileProperties.FileSize, value: OSF.Marshaling.File.FilePropertiesKeys.FileSize } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.PropertyDescriptors.FileSliceProperties, + fromHost: [ + { name: OSF.ParameterNames.Data, value: OSF.Marshaling.File.SlicePropertiesKeys.Data }, + { name: OSF.FileProperties.SliceSize, value: OSF.Marshaling.File.SlicePropertiesKeys.SliceSize } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.FileType, + toHost: [ + { name: Office.FileType.Text, value: OSF.Marshaling.File.FileType.Text }, + { name: Office.FileType.Compressed, value: OSF.Marshaling.File.FileType.Compressed }, + { name: Office.FileType.Pdf, value: OSF.Marshaling.File.FileType.Pdf } + ] + }); + OSF.HostParameterMap.define({ + type: 77, + toHost: [ + { name: OSF.ParameterNames.FileType, value: OSF.Marshaling.File.ParameterKeys.FileType }, + { name: OSF.ParameterNames.SliceSize, value: OSF.Marshaling.File.ParameterKeys.SliceSize } + ], + fromHost: [ + { name: OSF.PropertyDescriptors.FileProperties, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 80, + toHost: [ + { name: OSF.FileProperties.Handle, value: OSF.Marshaling.File.ParameterKeys.Handle }, + { name: OSF.ParameterNames.SliceIndex, value: OSF.Marshaling.File.ParameterKeys.SliceIndex } + ], + fromHost: [ + { name: OSF.PropertyDescriptors.FileSliceProperties, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 81, + toHost: [{ name: OSF.FileProperties.Handle, value: OSF.Marshaling.File.ParameterKeys.Handle }] + }); + } + })(File = OSF.File || (OSF.File = {})); +})(OSF || (OSF = {})); +var OfficeExt; +(function (OfficeExt) { + var FileProperties = (function () { + function FileProperties(filePropertiesDescriptor) { + OSF.OUtil.defineEnumerableProperties(this, { + "url": { + value: filePropertiesDescriptor[OSF.FilePropertiesDescriptor.Url] + } + }); + } + return FileProperties; + }()); + OfficeExt.FileProperties = FileProperties; +})(OfficeExt || (OfficeExt = {})); +var OSF; +(function (OSF) { + OSF.FilePropertiesDescriptor = { + Url: "Url" + }; + var PropertyDescriptors; + (function (PropertyDescriptors) { + PropertyDescriptors.FilePropertiesDescriptor = "FilePropertiesDescriptor"; + })(PropertyDescriptors = OSF.PropertyDescriptors || (OSF.PropertyDescriptors = {})); + var Marshaling; + (function (Marshaling) { + var FilePropertiesKeys; + (function (FilePropertiesKeys) { + FilePropertiesKeys[FilePropertiesKeys["Properties"] = 0] = "Properties"; + FilePropertiesKeys[FilePropertiesKeys["Url"] = 1] = "Url"; + })(FilePropertiesKeys = Marshaling.FilePropertiesKeys || (Marshaling.FilePropertiesKeys = {})); + })(Marshaling = OSF.Marshaling || (OSF.Marshaling = {})); + var FileProperties; + (function (FileProperties) { + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + defineSafeArrayParameterMapFunc: defineSafeArrayParameterMap, + defineWebParameterMapFunc: defineWebParameterMap, + initializeFunc: initialize + }); + function defineMethods() { + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.GetFilePropertiesAsync, + fromHost: [ + { name: OSF.PropertyDescriptors.FilePropertiesDescriptor, value: 0 } + ], + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (filePropertiesDescriptor, caller, callArgs) { + return new OfficeExt.FileProperties(filePropertiesDescriptor); + } + }); + } + function defineSafeArrayParameterMap() { + OSF.HostParameterMap.define({ + type: OSF.PropertyDescriptors.FilePropertiesDescriptor, + fromHost: [ + { name: OSF.FilePropertiesDescriptor.Url, value: 0 } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: 86, + fromHost: [ + { name: OSF.PropertyDescriptors.FilePropertiesDescriptor, value: OSF.HostParameterMap.self } + ] + }); + } + function defineWebParameterMap() { + OSF.HostParameterMap.define({ + type: 86, + fromHost: [ + { name: OSF.PropertyDescriptors.FilePropertiesDescriptor, value: OSF.Marshaling.FilePropertiesKeys.Properties } + ] + }); + } + function initialize() { + var target = Office.context.document; + OSF.DispIdHost.addAsyncMethods(target, [OSF.AsyncMethods.GetFilePropertiesAsync]); + } + })(FileProperties = OSF.FileProperties || (OSF.FileProperties = {})); +})(OSF || (OSF = {})); +var OSF; +(function (OSF) { + var Internal; + (function (Internal) { + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + }); + function getObjectId(obj) { return obj.id; } + function defineMethods() { + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.ClearFormatsAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: OSF.ParameterNames.Id, + value: getObjectId + } + ] + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.SetTableOptionsAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.TableOptions, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: OSF.ParameterNames.Id, + value: getObjectId + } + ] + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.SetFormatsAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.CellFormat, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: OSF.ParameterNames.Id, + value: getObjectId + } + ] + }); + } + })(Internal = OSF.Internal || (OSF.Internal = {})); + var Marshaling; + (function (Marshaling) { + var FormatKeys; + (function (FormatKeys) { + FormatKeys["Id"] = "BindingId"; + FormatKeys["CellFormat"] = "CellFormat"; + FormatKeys["TableOptions"] = "TableOptions"; + })(FormatKeys = Marshaling.FormatKeys || (Marshaling.FormatKeys = {})); + var TableOptionProperties; + (function (TableOptionProperties) { + TableOptionProperties[TableOptionProperties["headerRow"] = 0] = "headerRow"; + TableOptionProperties[TableOptionProperties["bandedRows"] = 1] = "bandedRows"; + TableOptionProperties[TableOptionProperties["firstColumn"] = 2] = "firstColumn"; + TableOptionProperties[TableOptionProperties["lastColumn"] = 3] = "lastColumn"; + TableOptionProperties[TableOptionProperties["bandedColumns"] = 4] = "bandedColumns"; + TableOptionProperties[TableOptionProperties["filterButton"] = 5] = "filterButton"; + TableOptionProperties[TableOptionProperties["style"] = 6] = "style"; + TableOptionProperties[TableOptionProperties["totalRow"] = 7] = "totalRow"; + })(TableOptionProperties = Marshaling.TableOptionProperties || (Marshaling.TableOptionProperties = {})); + var CellProperties; + (function (CellProperties) { + CellProperties[CellProperties["row"] = 0] = "row"; + CellProperties[CellProperties["column"] = 1] = "column"; + })(CellProperties = Marshaling.CellProperties || (Marshaling.CellProperties = {})); + var CellFormatProperties; + (function (CellFormatProperties) { + CellFormatProperties[CellFormatProperties["alignHorizontal"] = 1] = "alignHorizontal"; + CellFormatProperties[CellFormatProperties["alignVertical"] = 2] = "alignVertical"; + CellFormatProperties[CellFormatProperties["backgroundColor"] = 101] = "backgroundColor"; + CellFormatProperties[CellFormatProperties["borderStyle"] = 201] = "borderStyle"; + CellFormatProperties[CellFormatProperties["borderColor"] = 202] = "borderColor"; + CellFormatProperties[CellFormatProperties["borderTopStyle"] = 203] = "borderTopStyle"; + CellFormatProperties[CellFormatProperties["borderTopColor"] = 204] = "borderTopColor"; + CellFormatProperties[CellFormatProperties["borderBottomStyle"] = 205] = "borderBottomStyle"; + CellFormatProperties[CellFormatProperties["borderBottomColor"] = 206] = "borderBottomColor"; + CellFormatProperties[CellFormatProperties["borderLeftStyle"] = 207] = "borderLeftStyle"; + CellFormatProperties[CellFormatProperties["borderLeftColor"] = 208] = "borderLeftColor"; + CellFormatProperties[CellFormatProperties["borderRightStyle"] = 209] = "borderRightStyle"; + CellFormatProperties[CellFormatProperties["borderRightColor"] = 210] = "borderRightColor"; + CellFormatProperties[CellFormatProperties["borderOutlineStyle"] = 211] = "borderOutlineStyle"; + CellFormatProperties[CellFormatProperties["borderOutlineColor"] = 212] = "borderOutlineColor"; + CellFormatProperties[CellFormatProperties["borderInlineStyle"] = 213] = "borderInlineStyle"; + CellFormatProperties[CellFormatProperties["borderInlineColor"] = 214] = "borderInlineColor"; + CellFormatProperties[CellFormatProperties["fontFamily"] = 301] = "fontFamily"; + CellFormatProperties[CellFormatProperties["fontStyle"] = 302] = "fontStyle"; + CellFormatProperties[CellFormatProperties["fontSize"] = 303] = "fontSize"; + CellFormatProperties[CellFormatProperties["fontUnderlineStyle"] = 304] = "fontUnderlineStyle"; + CellFormatProperties[CellFormatProperties["fontColor"] = 305] = "fontColor"; + CellFormatProperties[CellFormatProperties["fontDirection"] = 306] = "fontDirection"; + CellFormatProperties[CellFormatProperties["fontStrikethrough"] = 307] = "fontStrikethrough"; + CellFormatProperties[CellFormatProperties["fontSuperscript"] = 308] = "fontSuperscript"; + CellFormatProperties[CellFormatProperties["fontSubscript"] = 309] = "fontSubscript"; + CellFormatProperties[CellFormatProperties["fontNormal"] = 310] = "fontNormal"; + CellFormatProperties[CellFormatProperties["indentLeft"] = 401] = "indentLeft"; + CellFormatProperties[CellFormatProperties["indentRight"] = 402] = "indentRight"; + CellFormatProperties[CellFormatProperties["numberFormat"] = 501] = "numberFormat"; + CellFormatProperties[CellFormatProperties["width"] = 701] = "width"; + CellFormatProperties[CellFormatProperties["height"] = 702] = "height"; + CellFormatProperties[CellFormatProperties["wrapping"] = 703] = "wrapping"; + })(CellFormatProperties = Marshaling.CellFormatProperties || (Marshaling.CellFormatProperties = {})); + var BorderStyleType; + (function (BorderStyleType) { + BorderStyleType[BorderStyleType["none"] = 0] = "none"; + BorderStyleType[BorderStyleType["thin"] = 1] = "thin"; + BorderStyleType[BorderStyleType["medium"] = 2] = "medium"; + BorderStyleType[BorderStyleType["dashed"] = 3] = "dashed"; + BorderStyleType[BorderStyleType["dotted"] = 4] = "dotted"; + BorderStyleType[BorderStyleType["thick"] = 5] = "thick"; + BorderStyleType[BorderStyleType["double"] = 6] = "double"; + BorderStyleType[BorderStyleType["hair"] = 7] = "hair"; + BorderStyleType[BorderStyleType["mediumDashed"] = 8] = "mediumDashed"; + BorderStyleType[BorderStyleType["dashDot"] = 9] = "dashDot"; + BorderStyleType[BorderStyleType["mediumDashDot"] = 10] = "mediumDashDot"; + BorderStyleType[BorderStyleType["dashDotDot"] = 11] = "dashDotDot"; + BorderStyleType[BorderStyleType["mediumDashDotDot"] = 12] = "mediumDashDotDot"; + BorderStyleType[BorderStyleType["slantDashDot"] = 13] = "slantDashDot"; + })(BorderStyleType = Marshaling.BorderStyleType || (Marshaling.BorderStyleType = {})); + var ColorType; + (function (ColorType) { + ColorType[ColorType["none"] = 0] = "none"; + ColorType[ColorType["black"] = 1] = "black"; + ColorType[ColorType["blue"] = 2] = "blue"; + ColorType[ColorType["gray"] = 3] = "gray"; + ColorType[ColorType["green"] = 4] = "green"; + ColorType[ColorType["orange"] = 5] = "orange"; + ColorType[ColorType["pink"] = 6] = "pink"; + ColorType[ColorType["purple"] = 7] = "purple"; + ColorType[ColorType["red"] = 8] = "red"; + ColorType[ColorType["teal"] = 9] = "teal"; + ColorType[ColorType["turquoise"] = 10] = "turquoise"; + ColorType[ColorType["violet"] = 11] = "violet"; + ColorType[ColorType["white"] = 12] = "white"; + ColorType[ColorType["yellow"] = 13] = "yellow"; + ColorType[ColorType["automatic"] = 14] = "automatic"; + })(ColorType = Marshaling.ColorType || (Marshaling.ColorType = {})); + var AlignHorizontalType; + (function (AlignHorizontalType) { + AlignHorizontalType[AlignHorizontalType["general"] = 0] = "general"; + AlignHorizontalType[AlignHorizontalType["left"] = 1] = "left"; + AlignHorizontalType[AlignHorizontalType["center"] = 2] = "center"; + AlignHorizontalType[AlignHorizontalType["right"] = 3] = "right"; + AlignHorizontalType[AlignHorizontalType["fill"] = 4] = "fill"; + AlignHorizontalType[AlignHorizontalType["justify"] = 5] = "justify"; + AlignHorizontalType[AlignHorizontalType["centerAcrossSelection"] = 6] = "centerAcrossSelection"; + AlignHorizontalType[AlignHorizontalType["distributed"] = 7] = "distributed"; + })(AlignHorizontalType = Marshaling.AlignHorizontalType || (Marshaling.AlignHorizontalType = {})); + var AlignVerticalType; + (function (AlignVerticalType) { + AlignVerticalType[AlignVerticalType["top"] = 0] = "top"; + AlignVerticalType[AlignVerticalType["center"] = 1] = "center"; + AlignVerticalType[AlignVerticalType["bottom"] = 2] = "bottom"; + AlignVerticalType[AlignVerticalType["justify"] = 3] = "justify"; + AlignVerticalType[AlignVerticalType["distributed"] = 4] = "distributed"; + })(AlignVerticalType = Marshaling.AlignVerticalType || (Marshaling.AlignVerticalType = {})); + var FontStyleType; + (function (FontStyleType) { + FontStyleType[FontStyleType["regular"] = 0] = "regular"; + FontStyleType[FontStyleType["italic"] = 1] = "italic"; + FontStyleType[FontStyleType["bold"] = 2] = "bold"; + FontStyleType[FontStyleType["boldItalic"] = 3] = "boldItalic"; + })(FontStyleType = Marshaling.FontStyleType || (Marshaling.FontStyleType = {})); + var FontUnderlineStyleType; + (function (FontUnderlineStyleType) { + FontUnderlineStyleType[FontUnderlineStyleType["none"] = 0] = "none"; + FontUnderlineStyleType[FontUnderlineStyleType["single"] = 1] = "single"; + FontUnderlineStyleType[FontUnderlineStyleType["double"] = 2] = "double"; + FontUnderlineStyleType[FontUnderlineStyleType["singleAccounting"] = 3] = "singleAccounting"; + FontUnderlineStyleType[FontUnderlineStyleType["doubleAccounting"] = 4] = "doubleAccounting"; + })(FontUnderlineStyleType = Marshaling.FontUnderlineStyleType || (Marshaling.FontUnderlineStyleType = {})); + var FontDirectionType; + (function (FontDirectionType) { + FontDirectionType[FontDirectionType["context"] = 0] = "context"; + FontDirectionType[FontDirectionType["leftToRight"] = 1] = "leftToRight"; + FontDirectionType[FontDirectionType["rightToLeft"] = 2] = "rightToLeft"; + })(FontDirectionType = Marshaling.FontDirectionType || (Marshaling.FontDirectionType = {})); + var WidthType; + (function (WidthType) { + WidthType[WidthType["autoFit"] = -1] = "autoFit"; + })(WidthType = Marshaling.WidthType || (Marshaling.WidthType = {})); + var HeightType; + (function (HeightType) { + HeightType[HeightType["autoFit"] = -1] = "autoFit"; + })(HeightType = Marshaling.HeightType || (Marshaling.HeightType = {})); + })(Marshaling = OSF.Marshaling || (OSF.Marshaling = {})); + var Formats; + (function (Formats) { + var tableOptionProperties; + (function (tableOptionProperties) { + tableOptionProperties[tableOptionProperties["headerRow"] = 0] = "headerRow"; + tableOptionProperties[tableOptionProperties["bandedRows"] = 1] = "bandedRows"; + tableOptionProperties[tableOptionProperties["firstColumn"] = 2] = "firstColumn"; + tableOptionProperties[tableOptionProperties["lastColumn"] = 3] = "lastColumn"; + tableOptionProperties[tableOptionProperties["bandedColumns"] = 4] = "bandedColumns"; + tableOptionProperties[tableOptionProperties["filterButton"] = 5] = "filterButton"; + tableOptionProperties[tableOptionProperties["style"] = 6] = "style"; + tableOptionProperties[tableOptionProperties["totalRow"] = 7] = "totalRow"; + })(tableOptionProperties || (tableOptionProperties = {})); + ; + var cellProperties; + (function (cellProperties) { + cellProperties[cellProperties["row"] = 0] = "row"; + cellProperties[cellProperties["column"] = 1] = "column"; + })(cellProperties || (cellProperties = {})); + ; + var formatProperties = { + alignHorizontal: { text: "alignHorizontal", type: 1 }, + alignVertical: { text: "alignVertical", type: 2 }, + backgroundColor: { text: "backgroundColor", type: 101 }, + borderStyle: { text: "borderStyle", type: 201 }, + borderColor: { text: "borderColor", type: 202 }, + borderTopStyle: { text: "borderTopStyle", type: 203 }, + borderTopColor: { text: "borderTopColor", type: 204 }, + borderBottomStyle: { text: "borderBottomStyle", type: 205 }, + borderBottomColor: { text: "borderBottomColor", type: 206 }, + borderLeftStyle: { text: "borderLeftStyle", type: 207 }, + borderLeftColor: { text: "borderLeftColor", type: 208 }, + borderRightStyle: { text: "borderRightStyle", type: 209 }, + borderRightColor: { text: "borderRightColor", type: 210 }, + borderOutlineStyle: { text: "borderOutlineStyle", type: 211 }, + borderOutlineColor: { text: "borderOutlineColor", type: 212 }, + borderInlineStyle: { text: "borderInlineStyle", type: 213 }, + borderInlineColor: { text: "borderInlineColor", type: 214 }, + fontFamily: { text: "fontFamily", type: 301 }, + fontStyle: { text: "fontStyle", type: 302 }, + fontSize: { text: "fontSize", type: 303 }, + fontUnderlineStyle: { text: "fontUnderlineStyle", type: 304 }, + fontColor: { text: "fontColor", type: 305 }, + fontDirection: { text: "fontDirection", type: 306 }, + fontStrikethrough: { text: "fontStrikethrough", type: 307 }, + fontSuperscript: { text: "fontSuperscript", type: 308 }, + fontSubscript: { text: "fontSubscript", type: 309 }, + fontNormal: { text: "fontNormal", type: 310 }, + indentLeft: { text: "indentLeft", type: 401 }, + indentRight: { text: "indentRight", type: 402 }, + numberFormat: { text: "numberFormat", type: 501 }, + width: { text: "width", type: 701 }, + height: { text: "height", type: 702 }, + wrapping: { text: "wrapping", type: 703 } + }; + var borderStyleSet = [ + { name: "none", value: 0 }, + { name: "thin", value: 1 }, + { name: "medium", value: 2 }, + { name: "dashed", value: 3 }, + { name: "dotted", value: 4 }, + { name: "thick", value: 5 }, + { name: "double", value: 6 }, + { name: "hair", value: 7 }, + { name: "medium dashed", value: 8 }, + { name: "dash dot", value: 9 }, + { name: "medium dash dot", value: 10 }, + { name: "dash dot dot", value: 11 }, + { name: "medium dash dot dot", value: 12 }, + { name: "slant dash dot", value: 13 }, + ]; + var colorSet = [ + { name: "none", value: 0 }, + { name: "black", value: 1 }, + { name: "blue", value: 2 }, + { name: "gray", value: 3 }, + { name: "green", value: 4 }, + { name: "orange", value: 5 }, + { name: "pink", value: 6 }, + { name: "purple", value: 7 }, + { name: "red", value: 8 }, + { name: "teal", value: 9 }, + { name: "turquoise", value: 10 }, + { name: "violet", value: 11 }, + { name: "white", value: 12 }, + { name: "yellow", value: 13 }, + { name: "automatic", value: 14 }, + ]; + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + defineSafeArrayParameterMapFunc: defineSafeArrayParameterMap, + defineWebParameterMapFunc: defineWebParameterMap, + }); + function defineMethods() { + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.SetDataAsync, + requiredArguments: [ + { + "name": OSF.ParameterNames.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: OSF.ParameterNames.CoercionType, + value: { + "enum": Office.CoercionType, + "calculate": function (requiredArgs) { return OSF.DataCoercion.determineCoercionType(requiredArgs[OSF.ParameterNames.Data]); } + } + }, + { + name: OSF.ParameterNames.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: OSF.ParameterNames.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: OSF.ParameterNames.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: OSF.ParameterNames.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: OSF.ParameterNames.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: OSF.ParameterNames.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var Parameters = OSF.ParameterNames; + if (callArgs[Parameters.StartRow] == 0 && + callArgs[Parameters.StartColumn] == 0 && + OSF.OUtil.isArray(callArgs[Parameters.CellFormat]) && callArgs[Parameters.CellFormat].length === 0 && + OSF.OUtil.isArray(callArgs[Parameters.TableOptions]) && callArgs[Parameters.TableOptions].length === 0) { + delete callArgs[Parameters.StartRow]; + delete callArgs[Parameters.StartColumn]; + delete callArgs[Parameters.CellFormat]; + delete callArgs[Parameters.TableOptions]; + } + if (callArgs[Parameters.CoercionType] != OSF.DataCoercion.getCoercionDefaultForBinding(caller.type) && + ((callArgs[Parameters.StartRow] && callArgs[Parameters.StartRow] != 0) || + (callArgs[Parameters.StartColumn] && callArgs[Parameters.StartColumn] != 0) || + callArgs[Parameters.CellFormat] || + callArgs[Parameters.TableOptions])) { + throw 1002; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: OSF.ParameterNames.Id, + value: function (obj) { return obj.id; } + } + ] + }); + } + function defineSafeArrayParameterMap() { + OSF.HostParameterMap.define({ + type: 87, + toHost: [ + { name: OSF.ParameterNames.Id, value: 0 } + ] + }); + OSF.HostParameterMap.define({ + type: 88, + toHost: [ + { name: OSF.ParameterNames.Id, value: 0 }, + { name: OSF.ParameterNames.TableOptions, value: 1 }, + ] + }); + OSF.HostParameterMap.define({ + type: 89, + toHost: [ + { name: OSF.ParameterNames.Id, value: 0 }, + { name: OSF.ParameterNames.CellFormat, value: 1 }, + ] + }); + OSF.HostParameterMap.define({ + type: 71, + toHost: [ + { name: OSF.ParameterNames.Id, value: 0 }, + { name: OSF.ParameterNames.CoercionType, value: 1 }, + { name: OSF.ParameterNames.Data, value: 2 }, + { name: "offset", value: 3 }, + { name: OSF.ParameterNames.CellFormat, value: 4 }, + { name: OSF.ParameterNames.TableOptions, value: 5 } + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.alignHorizontal.text, + toHost: [ + { name: "general", value: 0 }, + { name: "left", value: 1 }, + { name: "center", value: 2 }, + { name: "right", value: 3 }, + { name: "fill", value: 4 }, + { name: "justify", value: 5 }, + { name: "center across selection", value: 6 }, + { name: "distributed", value: 7 }, + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.alignVertical.text, + toHost: [ + { name: "top", value: 0 }, + { name: "center", value: 1 }, + { name: "bottom", value: 2 }, + { name: "justify", value: 3 }, + { name: "distributed", value: 4 }, + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.backgroundColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderTopStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderTopColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderBottomStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderBottomColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderLeftStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderLeftColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderRightStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderRightColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderOutlineStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderOutlineColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderInlineStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderInlineColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.fontStyle.text, + toHost: [ + { name: "regular", value: 0 }, + { name: "italic", value: 1 }, + { name: "bold", value: 2 }, + { name: "bold italic", value: 3 }, + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.fontUnderlineStyle.text, + toHost: [ + { name: "none", value: 0 }, + { name: "single", value: 1 }, + { name: "double", value: 2 }, + { name: "single accounting", value: 3 }, + { name: "double accounting", value: 4 }, + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.fontColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.fontDirection.text, + toHost: [ + { name: "context", value: 0 }, + { name: "left-to-right", value: 1 }, + { name: "right-to-left", value: 2 }, + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.width.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.height.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] + }); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.TableOptions, + toHost: [ + { name: "headerRow", value: 0 }, + { name: "bandedRows", value: 1 }, + { name: "firstColumn", value: 2 }, + { name: "lastColumn", value: 3 }, + { name: "bandedColumns", value: 4 }, + { name: "filterButton", value: 5 }, + { name: "style", value: 6 }, + { name: "totalRow", value: 7 } + ] + }); + OSF.HostParameterMap.dynamicTypes[OSF.ParameterNames.CellFormat] = { + toHost: function (data) { + for (var entry in data) { + if (data[entry].format) { + data[entry].format = OSF.HostParameterMap.doMapValues(data[entry].format, "toHost"); + } + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + OSF.HostParameterMap.setDynamicType(OSF.ParameterNames.CellFormat, { + toHost: function (cellFormats) { + var textCells = "cells"; + var textFormat = "format"; + var posCells = 0; + var posFormat = 1; + var ret = []; + for (var index in cellFormats) { + var cfOld = cellFormats[index]; + var cfNew = []; + if (typeof (cfOld[textCells]) !== 'undefined') { + var cellsOld = cfOld[textCells]; + var cellsNew; + if (typeof cfOld[textCells] === "object") { + cellsNew = []; + for (var entry in cellsOld) { + if (typeof (cellProperties[entry]) !== 'undefined') { + cellsNew[cellProperties[entry]] = cellsOld[entry]; + } + } + } + else { + cellsNew = cellsOld; + } + cfNew[posCells] = cellsNew; + } + if (cfOld[textFormat]) { + var formatOld = cfOld[textFormat]; + var formatNew = []; + for (var entry2 in formatOld) { + if (typeof (formatProperties[entry2]) !== 'undefined') { + formatNew.push([ + formatProperties[entry2].type, + formatOld[entry2] + ]); + } + } + cfNew[posFormat] = formatNew; + } + ret[index] = cfNew; + } + return ret; + }, + fromHost: function (hostArgs) { + return hostArgs; + } + }); + OSF.HostParameterMap.setDynamicType(OSF.ParameterNames.TableOptions, { + toHost: function (tableOptions) { + var ret = []; + for (var entry in tableOptions) { + if (typeof (tableOptionProperties[entry]) !== 'undefined') { + ret[tableOptionProperties[entry]] = tableOptions[entry]; + } + } + return ret; + }, + fromHost: function (hostArgs) { + return hostArgs; + } + }); + } + function defineWebParameterMap() { + var alignHorizontalType = Marshaling.AlignHorizontalType; + var alignVerticalType = Marshaling.AlignVerticalType; + var borderStyleType = Marshaling.BorderStyleType; + var cellProperties = Marshaling.CellProperties; + var cellFormatProperties = Marshaling.CellFormatProperties; + var colorType = Marshaling.ColorType; + var fontDirectionType = Marshaling.FontDirectionType; + var fontStyleType = Marshaling.FontStyleType; + var fontUnderlineStyleType = Marshaling.FontUnderlineStyleType; + var heightType = Marshaling.HeightType; + var hostKeys = Marshaling.FormatKeys; + var tableOptionProperties = Marshaling.TableOptionProperties; + var widthType = Marshaling.WidthType; + var formatProperties = { + alignHorizontal: { text: "alignHorizontal", type: Marshaling.CellFormatProperties.alignHorizontal }, + alignVertical: { text: "alignVertical", type: Marshaling.CellFormatProperties.alignVertical }, + backgroundColor: { text: "backgroundColor", type: Marshaling.CellFormatProperties.backgroundColor }, + borderStyle: { text: "borderStyle", type: Marshaling.CellFormatProperties.borderStyle }, + borderColor: { text: "borderColor", type: Marshaling.CellFormatProperties.borderColor }, + borderTopStyle: { text: "borderTopStyle", type: Marshaling.CellFormatProperties.borderTopStyle }, + borderTopColor: { text: "borderTopColor", type: Marshaling.CellFormatProperties.borderTopColor }, + borderBottomStyle: { text: "borderBottomStyle", type: Marshaling.CellFormatProperties.borderBottomStyle }, + borderBottomColor: { text: "borderBottomColor", type: Marshaling.CellFormatProperties.borderBottomColor }, + borderLeftStyle: { text: "borderLeftStyle", type: Marshaling.CellFormatProperties.borderLeftStyle }, + borderLeftColor: { text: "borderLeftColor", type: Marshaling.CellFormatProperties.borderLeftColor }, + borderRightStyle: { text: "borderRightStyle", type: Marshaling.CellFormatProperties.borderRightStyle }, + borderRightColor: { text: "borderRightColor", type: Marshaling.CellFormatProperties.borderRightColor }, + borderOutlineStyle: { text: "borderOutlineStyle", type: Marshaling.CellFormatProperties.borderOutlineStyle }, + borderOutlineColor: { text: "borderOutlineColor", type: Marshaling.CellFormatProperties.borderOutlineColor }, + borderInlineStyle: { text: "borderInlineStyle", type: Marshaling.CellFormatProperties.borderInlineStyle }, + borderInlineColor: { text: "borderInlineColor", type: Marshaling.CellFormatProperties.borderInlineColor }, + fontFamily: { text: "fontFamily", type: Marshaling.CellFormatProperties.fontFamily }, + fontStyle: { text: "fontStyle", type: Marshaling.CellFormatProperties.fontStyle }, + fontSize: { text: "fontSize", type: Marshaling.CellFormatProperties.fontSize }, + fontUnderlineStyle: { text: "fontUnderlineStyle", type: Marshaling.CellFormatProperties.fontUnderlineStyle }, + fontColor: { text: "fontColor", type: Marshaling.CellFormatProperties.fontColor }, + fontDirection: { text: "fontDirection", type: Marshaling.CellFormatProperties.fontDirection }, + fontStrikethrough: { text: "fontStrikethrough", type: Marshaling.CellFormatProperties.fontStrikethrough }, + fontSuperscript: { text: "fontSuperscript", type: Marshaling.CellFormatProperties.fontSuperscript }, + fontSubscript: { text: "fontSubscript", type: Marshaling.CellFormatProperties.fontSubscript }, + fontNormal: { text: "fontNormal", type: Marshaling.CellFormatProperties.fontNormal }, + indentLeft: { text: "indentLeft", type: Marshaling.CellFormatProperties.indentLeft }, + indentRight: { text: "indentRight", type: Marshaling.CellFormatProperties.indentRight }, + numberFormat: { text: "numberFormat", type: Marshaling.CellFormatProperties.numberFormat }, + width: { text: "width", type: Marshaling.CellFormatProperties.width }, + height: { text: "height", type: Marshaling.CellFormatProperties.height }, + wrapping: { text: "wrapping", type: Marshaling.CellFormatProperties.wrapping } + }; + var borderStyleSet = [ + { name: "none", value: borderStyleType.none }, + { name: "thin", value: borderStyleType.thin }, + { name: "medium", value: borderStyleType.medium }, + { name: "dashed", value: borderStyleType.dashed }, + { name: "dotted", value: borderStyleType.dotted }, + { name: "thick", value: borderStyleType.thick }, + { name: "double", value: borderStyleType.double }, + { name: "hair", value: borderStyleType.hair }, + { name: "medium dashed", value: borderStyleType.mediumDashed }, + { name: "dash dot", value: borderStyleType.dashDot }, + { name: "medium dash dot", value: borderStyleType.mediumDashDot }, + { name: "dash dot dot", value: borderStyleType.dashDotDot }, + { name: "medium dash dot dot", value: borderStyleType.mediumDashDotDot }, + { name: "slant dash dot", value: borderStyleType.slantDashDot }, + ]; + var colorSet = [ + { name: "none", value: colorType.none }, + { name: "black", value: colorType.black }, + { name: "blue", value: colorType.blue }, + { name: "gray", value: colorType.gray }, + { name: "green", value: colorType.green }, + { name: "orange", value: colorType.orange }, + { name: "pink", value: colorType.pink }, + { name: "purple", value: colorType.purple }, + { name: "red", value: colorType.red }, + { name: "teal", value: colorType.teal }, + { name: "turquoise", value: colorType.turquoise }, + { name: "violet", value: colorType.violet }, + { name: "white", value: colorType.white }, + { name: "yellow", value: colorType.yellow }, + { name: "automatic", value: colorType.automatic }, + ]; + OSF.HostParameterMap.define({ + type: OSF.WACDelegate.UniqueArguments.ClearFormats, + toHost: [ + { name: OSF.ParameterNames.Id, value: Marshaling.FormatKeys.Id } + ] + }); + OSF.HostParameterMap.define({ + type: 87, + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.ClearFormats, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.WACDelegate.UniqueArguments.SetFormats, + toHost: [ + { name: OSF.ParameterNames.Id, value: Marshaling.FormatKeys.Id }, + { name: OSF.ParameterNames.CellFormat, value: Marshaling.FormatKeys.CellFormat }, + { name: OSF.ParameterNames.TableOptions, value: Marshaling.FormatKeys.TableOptions } + ] + }); + OSF.HostParameterMap.define({ + type: 88, + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.SetFormats, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: 89, + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.SetFormats, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.WACDelegate.UniqueArguments.SetData, + toHost: [ + { name: OSF.ParameterNames.Id, value: hostKeys.Id }, + { name: OSF.ParameterNames.CoercionType, value: "CoerceType" }, + { name: OSF.ParameterNames.Data, value: OSF.WACDelegate.UniqueArguments.Data }, + { name: OSF.ParameterNames.Rows, value: "Rows" }, + { name: OSF.ParameterNames.Columns, value: "Columns" }, + { name: OSF.ParameterNames.StartRow, value: "StartRow" }, + { name: OSF.ParameterNames.StartColumn, value: "StartCol" }, + { name: OSF.ParameterNames.CellFormat, value: hostKeys.CellFormat }, + { name: OSF.ParameterNames.TableOptions, value: hostKeys.TableOptions } + ] + }); + OSF.HostParameterMap.define({ + type: 71, + toHost: [ + { name: OSF.WACDelegate.UniqueArguments.SetData, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.alignHorizontal.text, + toHost: [ + { name: "general", value: alignHorizontalType.general }, + { name: "left", value: alignHorizontalType.left }, + { name: "center", value: alignHorizontalType.center }, + { name: "right", value: alignHorizontalType.right }, + { name: "fill", value: alignHorizontalType.fill }, + { name: "justify", value: alignHorizontalType.justify }, + { name: "center across selection", value: alignHorizontalType.centerAcrossSelection }, + { name: "distributed", value: alignHorizontalType.distributed }, + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.alignVertical.text, + toHost: [ + { name: "top", value: alignVerticalType.top }, + { name: "center", value: alignVerticalType.center }, + { name: "bottom", value: alignVerticalType.bottom }, + { name: "justify", value: alignVerticalType.justify }, + { name: "distributed", value: alignVerticalType.distributed }, + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.backgroundColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderTopStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderTopColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderBottomStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderBottomColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderLeftStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderLeftColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderRightStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderRightColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderOutlineStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderOutlineColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderInlineStyle.text, + toHost: borderStyleSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.borderInlineColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.fontStyle.text, + toHost: [ + { name: "regular", value: fontStyleType.regular }, + { name: "italic", value: fontStyleType.italic }, + { name: "bold", value: fontStyleType.bold }, + { name: "bold italic", value: fontStyleType.boldItalic }, + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.fontUnderlineStyle.text, + toHost: [ + { name: "none", value: fontUnderlineStyleType.none }, + { name: "single", value: fontUnderlineStyleType.single }, + { name: "double", value: fontUnderlineStyleType.double }, + { name: "single accounting", value: fontUnderlineStyleType.singleAccounting }, + { name: "double accounting", value: fontUnderlineStyleType.doubleAccounting }, + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.fontColor.text, + toHost: colorSet + }); + OSF.HostParameterMap.define({ + type: formatProperties.fontDirection.text, + toHost: [ + { name: "context", value: fontDirectionType.context }, + { name: "left-to-right", value: fontDirectionType.leftToRight }, + { name: "right-to-left", value: fontDirectionType.rightToLeft }, + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.width.text, + toHost: [ + { name: "auto fit", value: widthType.autoFit }, + ] + }); + OSF.HostParameterMap.define({ + type: formatProperties.height.text, + toHost: [ + { name: "auto fit", value: heightType.autoFit }, + ] + }); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.TableOptions, + toHost: [ + { name: "headerRow", value: tableOptionProperties.headerRow }, + { name: "bandedRows", value: tableOptionProperties.bandedRows }, + { name: "firstColumn", value: tableOptionProperties.firstColumn }, + { name: "lastColumn", value: tableOptionProperties.lastColumn }, + { name: "bandedColumns", value: tableOptionProperties.bandedColumns }, + { name: "filterButton", value: tableOptionProperties.filterButton }, + { name: "style", value: tableOptionProperties.style }, + { name: "totalRow", value: tableOptionProperties.totalRow } + ] + }); + OSF.HostParameterMap.dynamicTypes[OSF.ParameterNames.CellFormat] = { + toHost: function (data) { + for (var entry in data) { + if (data[entry].format) { + data[entry].format = OSF.HostParameterMap.doMapValues(data[entry].format, "toHost"); + } + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + OSF.HostParameterMap.setDynamicType(OSF.ParameterNames.CellFormat, { + toHost: function (cellFormats) { + var textCells = "cells"; + var textFormat = "format"; + var posCells = 0; + var posFormat = 1; + var ret = []; + for (var index in cellFormats) { + var cfOld = cellFormats[index]; + var cfNew = []; + if (typeof (cfOld[textCells]) !== "undefined") { + var cellsOld = cfOld[textCells]; + var cellsNew; + if (typeof cfOld[textCells] === "object") { + cellsNew = []; + for (var entry in cellsOld) { + if (typeof (cellProperties[entry]) !== "undefined") { + cellsNew[cellProperties[entry]] = cellsOld[entry]; + } + } + } + else { + cellsNew = cellsOld; + } + cfNew[posCells] = cellsNew; + } + if (cfOld[textFormat]) { + var formatOld = cfOld[textFormat]; + var formatNew = []; + for (var entry2 in formatOld) { + if (typeof (formatProperties[entry2]) !== "undefined") { + formatNew.push([ + formatProperties[entry2].type, + formatOld[entry2] + ]); + } + } + cfNew[posFormat] = formatNew; + } + ret[index] = cfNew; + } + return ret; + }, + fromHost: function (hostArgs) { + return hostArgs; + } + }); + OSF.HostParameterMap.setDynamicType(OSF.ParameterNames.TableOptions, { + toHost: function (tableOptions) { + var ret = []; + for (var entry in tableOptions) { + if (typeof (tableOptionProperties[entry]) != "undefined") { + ret[tableOptionProperties[entry]] = tableOptions[entry]; + } + } + return ret; + }, + fromHost: function (hostArgs) { + return hostArgs; + } + }); + alignHorizontalType = null; + alignVerticalType = null; + borderStyleType = null; + cellFormatProperties = null; + colorType = null; + fontDirectionType = null; + fontStyleType = null; + fontUnderlineStyleType = null; + heightType = null; + hostKeys = null; + widthType = null; + } + })(Formats = OSF.Formats || (OSF.Formats = {})); +})(OSF || (OSF = {})); +var Office; +(function (Office) { + var context; + (function (context) { + var document; + (function (document) { + function setSelectedDataAsync(data, options, callback) { + var coercionType = options["coercionType"] == null ? OSF.DataCoercion.determineCoercionType(data) : options["coercionType"]; + var asyncContext = null; + if (typeof options === "function") { + callback = options; + } + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + var dataTransform = { + toSafeArrayHost: function () { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.hostType.toLowerCase() == Office.HostType.Word.toLowerCase() || + hostInfo.hostType.toLowerCase() == Office.HostType.PowerPoint.toLowerCase() || + hostInfo.hostType.toLowerCase() == Office.HostType.OneNote.toLowerCase() || + hostInfo.hostType.toLowerCase() == Office.HostType.Visio.toLowerCase() || + coercionType == "image" || coercionType == "xmlSvg") { + return [getHostCoercionType(coercionType), + OSF.DataCoercion.serializeDynamicData(data), + (options["imageLeft"] == null ? false : options["imageLeft"]), + (options["imageTop"] == null ? false : options["imageTop"]), + (options["imageWidth"] == null ? false : options["imageWidth"]), + (options["imageHeight"] == null ? false : options["imageHeight"])]; + } + else if (hostInfo.hostType.toLowerCase() == Office.HostType.Excel.toLowerCase()) { + return [getHostCoercionType(coercionType), + OSF.DataCoercion.serializeDynamicData(data), + (options["cellFormat"] == null ? [] : options["cellFormat"]), + (options["tableOptions"] == null ? [] : options["tableOptions"]), + (options["imageWidth"] == null ? false : options["imageWidth"]), + (options["imageHeight"] == null ? false : options["imageHeight"])]; + } + else { + return [getHostCoercionType(coercionType), + OSF.DataCoercion.serializeDynamicData(data), + (options["cellFormat"] == null ? [] : options["cellFormat"]), + (options["tableOptions"] == null ? [] : options["tableOptions"])]; + } + }, + fromSafeArrayHost: function (payload) { + return payload; + }, + toWebHost: function () { + return { + DdaSetBindingData: { + CoerceType: coercionType, + Data: OSF.DataCoercion.serializeDynamicData(data), + CellFormat: [], + TableOptions: [] + } + }; + }, + fromWebHost: function (payload) { + return payload; + } + }; + asyncMethodExecutor.executeAsync(65, dataTransform, callback, asyncContext); + } + document.setSelectedDataAsync = setSelectedDataAsync; + function getSelectedDataAsync(coercionType, options, callback) { + var valueFormat = Office.ValueFormat.Unformatted; + var filterType = Office.FilterType.All; + var asyncContext; + if (typeof options === "function") { + callback = options; + } + else if (typeof options !== "undefined") { + if (typeof options["valueFormat"] !== "undefined") { + valueFormat = options["valueFormat"]; + } + if (typeof options["filterType"] !== "undefined") { + filterType = options["filterType"]; + } + if (typeof options["asyncContext"] !== "undefined") { + asyncContext = options["asyncContext"]; + } + } + var asyncMethodExecutor = OSF._OfficeAppFactory.getAsyncMethodExecutor(); + var dataTransform = { + toSafeArrayHost: function () { + return [ + getHostCoercionType(coercionType), + getHostValueFormat(valueFormat), + getHostFilterType(filterType) + ]; + }, + fromSafeArrayHost: function (payload) { + return OSF.DataCoercion.deserializeDynamicData(payload, coercionType); + }, + toWebHost: function () { + return { + DdaGetBindingData: { + CoerceType: coercionType, + ValueFormat: valueFormat, + FilterType: filterType + } + }; + }, + fromWebHost: function (payload) { + return OSF.DataCoercion.deserializeDynamicData(payload.Data, coercionType); + } + }; + asyncMethodExecutor.executeAsync(64, dataTransform, callback, asyncContext); + } + document.getSelectedDataAsync = getSelectedDataAsync; + function getHostCoercionType(coercionType) { + var hostCoercionType = 0; + switch (coercionType) { + case Office.CoercionType.Text: + hostCoercionType = 0; + break; + case Office.CoercionType.Matrix: + hostCoercionType = 1; + break; + case Office.CoercionType.Table: + hostCoercionType = 2; + break; + case Office.CoercionType.Html: + hostCoercionType = 3; + break; + case Office.CoercionType.Ooxml: + hostCoercionType = 4; + break; + case Office.CoercionType.OoxmlPackage: + hostCoercionType = 5; + break; + case Office.CoercionType.PdfFile: + hostCoercionType = 6; + break; + case Office.CoercionType.SlideRange: + hostCoercionType = 7; + break; + case "image": + hostCoercionType = 8; + break; + case "xmlSvg": + hostCoercionType = 9; + break; + } + return hostCoercionType; + } + function getHostValueFormat(valueFormat) { + var hostValueFormat = 0; + switch (valueFormat) { + case Office.ValueFormat.Unformatted: + hostValueFormat = 0; + break; + case Office.ValueFormat.Formatted: + hostValueFormat = 1; + break; + } + return hostValueFormat; + } + function getHostFilterType(filterType) { + var hostFilterType = 0; + switch (filterType) { + case Office.FilterType.All: + hostFilterType = 0; + break; + case Office.FilterType.OnlyVisible: + hostFilterType = 1; + break; + } + return hostFilterType; + } + })(document = context.document || (context.document = {})); + })(context = Office.context || (Office.context = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var TableData = (function () { + function TableData(rows, headers) { + this._rows = rows; + this._header = headers; + } + Object.defineProperty(TableData.prototype, "headers", { + get: function () { + return this._header; + }, + set: function (value) { + this._header = this.fixData(value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableData.prototype, "rows", { + get: function () { + return this._rows; + }, + set: function (value) { + this._rows = (value == null || (OSF.OUtil.isArray(value) && (value.length == 0))) ? + [] : + this.fixData(value); + }, + enumerable: true, + configurable: true + }); + TableData.prototype.fixData = function (data) { + if (data == null || data == undefined) { + return null; + } + try { + for (var dim = OSF.DataCoercion.findArrayDimensionality(data); dim < 2; dim++) { + data = [data]; + } + return data; + } + catch (ex) { + } + }; + return TableData; + }()); + Office.TableData = TableData; + function manufactureTableData(tableDataProperties) { + return new Office.TableData(tableDataProperties[OSF.TableDataProperties.TableRows], tableDataProperties[OSF.TableDataProperties.TableHeaders]); + } + Office.manufactureTableData = manufactureTableData; +})(Office || (Office = {})); +var OSF; +(function (OSF) { + var DDA; + (function (DDA) { + var Theming; + (function (Theming) { + var EventDescriptors; + (function (EventDescriptors) { + EventDescriptors.OfficeThemeChangedEvent = "OfficeThemeChangedEvent"; + EventDescriptors.DocumentThemeChangedEvent = "DocumentThemeChangedEvent"; + })(EventDescriptors = Theming.EventDescriptors || (Theming.EventDescriptors = {})); + OSF.V10ApiFeatureRegistry.register({ + defineMethodsFunc: defineMethods, + defineSafeArrayParameterMapFunc: defineSafeArrayParameterMap, + defineWebParameterMapFunc: defineWebParameterMap, + initializeFunc: initialize + }); + function initialize() { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform == OSF.HostInfoPlatform.web && + hostInfo.hostType.toLowerCase() == Office.HostType.Word.toLowerCase() && Office.context.officeTheme) { + Office.context.officeTheme[OSF.DDA.Theming.OfficeThemeEnum.IsDarkTheme] = Theming.GetIsDarkThemeFromCSSHexColor(Office.context.officeTheme.bodyBackgroundColor); + } + if (Office.context && Office.context.themeManager) { + Office.context.themeManager.InitializeAndChangeOnce(); + } + } + function defineMethods() { + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.GetDocumentThemeAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: OSF.DDA.Theming.ConvertToDocumentTheme + }); + OSF.AsyncMethodCalls.define({ + method: OSF.AsyncMethods.GetOfficeThemeAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: OSF.DDA.Theming.ConvertToOfficeTheme + }); + } + function defineSafeArrayParameterMap() { + OSF.HostParameterMap.define({ + type: 85, + fromHost: [ + { name: OSF.ParameterNames.OfficeTheme, value: OSF.HostParameterMap.self } + ] + }); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.OfficeTheme, + fromHost: [ + { name: OSF.DDA.Theming.OfficeThemeEnum.BodyForegroundColor, value: 0 }, + { name: OSF.DDA.Theming.OfficeThemeEnum.BodyBackgroundColor, value: 1 }, + { name: OSF.DDA.Theming.OfficeThemeEnum.ControlForegroundColor, value: 2 }, + { name: OSF.DDA.Theming.OfficeThemeEnum.ControlBackgroundColor, value: 3 } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidOfficeThemeChangedEvent, + fromHost: [ + { name: OSF.DDA.Theming.EventDescriptors.OfficeThemeChangedEvent, value: OSF.HostParameterMap.self } + ], + isComplexType: true + }); + OSF.HostParameterMap.define({ + type: OSF.DDA.Theming.EventDescriptors.OfficeThemeChangedEvent, + fromHost: [ + { name: OSF.ParameterNames.OfficeTheme, value: OSF.HostParameterMap.self } + ], + isComplexType: true + }); + } + function defineWebParameterMap() { + OSF.HostParameterMap.addComplexType(OSF.ParameterNames.DocumentTheme); + OSF.HostParameterMap.addComplexType(OSF.ParameterNames.OfficeTheme); + OSF.HostParameterMap.define({ + type: OSF.EventDispId.dispidOfficeThemeChangedEvent, + fromHost: [ + { name: OSF.ParameterNames.OfficeTheme, value: OSF.HostParameterMap.self } + ], + }); + OSF.HostParameterMap.define({ + type: OSF.ParameterNames.OfficeTheme, + fromHost: [ + { name: OSF.DDA.Theming.OfficeThemeEnum.BodyForegroundColor, + value: OSF.DDA.Theming.OfficeThemeEnumWac.PrimaryFontColor }, + { name: OSF.DDA.Theming.OfficeThemeEnum.BodyBackgroundColor, + value: OSF.DDA.Theming.OfficeThemeEnumWac.PrimaryBackgroundColor }, + { name: OSF.DDA.Theming.OfficeThemeEnum.ControlForegroundColor, + value: OSF.DDA.Theming.OfficeThemeEnumWac.SecondaryFontColor }, + { name: OSF.DDA.Theming.OfficeThemeEnum.ControlBackgroundColor, + value: OSF.DDA.Theming.OfficeThemeEnumWac.SecondaryBackgroundColor } + ], + isComplexType: true + }); + } + var InternalThemeHandler = (function () { + function InternalThemeHandler() { + this._eventTarget = null; + this._previousDocumentThemeData = null; + this._previousOfficeThemeData = null; + this._officeCss = null; + this._asyncCallsCompleted = null; + this._onAsyncCallsCompleted = null; + } + InternalThemeHandler.prototype.InitializeThemeManager = function () { + this._eventTarget = this; + OSF.DispIdHost.addAsyncMethods(this, [ + OSF.AsyncMethods.GetOfficeThemeAsync, + OSF.AsyncMethods.GetDocumentThemeAsync + ]); + OSF.DispIdHost.addEventSupport(this, new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.OfficeThemeChanged, + Microsoft.Office.WebExtension.EventType.DocumentThemeChanged + ])); + }; + InternalThemeHandler.prototype.InitializeAndChangeOnce = function (callback) { + var _this = this; + this._officeCss = this._getOfficeThemesCss(); + if (!this._officeCss) { + if (callback) { + callback(); + } + return; + } + this._onAsyncCallsCompleted = callback; + this._asyncCallsCompleted = {}; + this._asyncCallsCompleted[OSF.AsyncMethods.GetOfficeThemeAsync] = false; + this._asyncCallsCompleted[OSF.AsyncMethods.GetDocumentThemeAsync] = false; + this._getAndProcessThemeData(this._eventTarget.getOfficeThemeAsync, function (args) { + _this._processOfficeThemeData(args); + }, OSF.AsyncMethods.GetOfficeThemeAsync); + }; + InternalThemeHandler.prototype.isDarkTheme = function () { + var isDarkTheme = false; + if (Office.context && Office.context.officeTheme && Office.context.officeTheme.bodyBackgroundColor) { + var backgroundColor = Office.context.officeTheme.bodyBackgroundColor; + isDarkTheme = Theming.GetIsDarkThemeFromCSSHexColor(backgroundColor); + } + return isDarkTheme; + }; + InternalThemeHandler.prototype._getOfficeThemesCss = function () { + function getOfficeThemesCssInternal() { + var cssFileName = "officethemes.css"; + for (var i = 0; i < document.styleSheets.length; i++) { + var ss = document.styleSheets[i]; + if (!ss.disabled + && ss.href + && cssFileName == ss.href.substring(ss.href.length - cssFileName.length, ss.href.length).toLowerCase()) { + if ((!ss.cssRules) && (!ss.rules)) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Browser styleSheet object does not implement cssRules or rules property. Viloates browser's css access rule"); + } + return null; + } + else { + return ss; + } + } + } + } + try { + return getOfficeThemesCssInternal(); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception thrown when trying to read officethems.css:[" + e + "]"); + } + return null; + } + }; + InternalThemeHandler.prototype._changeCss = function (officeCss, selector, newRule) { + var length = officeCss.cssRules ? officeCss.cssRules.length : officeCss.rules.length; + for (var i = 0; i < length; i++) { + var rule = void 0; + if (officeCss.cssRules) { + rule = officeCss.cssRules[i]; + } + else { + rule = officeCss.rules[i]; + } + var ruleSelector = rule.selectorText; + if (ruleSelector && ruleSelector.toLowerCase() == selector.toLowerCase()) { + if (officeCss.cssRules) { + officeCss.deleteRule(i); + officeCss.insertRule(ruleSelector + newRule, i); + } + else { + officeCss.removeRule(i); + officeCss.addRule(ruleSelector, newRule, i); + } + } + } + }; + InternalThemeHandler.prototype._changeDocumentThemeData = function (data) { + var documentThemeCssMapping = [ + { name: OSF.DDA.Theming.DocumentThemeEnum.PrimaryFontColor, cssSelector: ".office-docTheme-primary-fontColor", cssProperty: "color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.PrimaryBackgroundColor, cssSelector: ".office-docTheme-primary-bgColor", cssProperty: "background-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.SecondaryFontColor, cssSelector: ".office-docTheme-secondary-fontColor", cssProperty: "color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.SecondaryBackgroundColor, cssSelector: ".office-docTheme-secondary-bgColor", cssProperty: "background-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent1, cssSelector: ".office-contentAccent1-color", cssProperty: "color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent2, cssSelector: ".office-contentAccent2-color", cssProperty: "color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent3, cssSelector: ".office-contentAccent3-color", cssProperty: "color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent4, cssSelector: ".office-contentAccent4-color", cssProperty: "color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent5, cssSelector: ".office-contentAccent5-color", cssProperty: "color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent6, cssSelector: ".office-contentAccent6-color", cssProperty: "color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent1, cssSelector: ".office-contentAccent1-bgColor", cssProperty: "background-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent2, cssSelector: ".office-contentAccent2-bgColor", cssProperty: "background-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent3, cssSelector: ".office-contentAccent3-bgColor", cssProperty: "background-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent4, cssSelector: ".office-contentAccent4-bgColor", cssProperty: "background-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent5, cssSelector: ".office-contentAccent5-bgColor", cssProperty: "background-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent6, cssSelector: ".office-contentAccent6-bgColor", cssProperty: "background-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent1, cssSelector: ".office-contentAccent1-borderColor", cssProperty: "border-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent2, cssSelector: ".office-contentAccent2-borderColor", cssProperty: "border-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent3, cssSelector: ".office-contentAccent3-borderColor", cssProperty: "border-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent4, cssSelector: ".office-contentAccent4-borderColor", cssProperty: "border-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent5, cssSelector: ".office-contentAccent5-borderColor", cssProperty: "border-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Accent6, cssSelector: ".office-contentAccent6-borderColor", cssProperty: "border-color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.Hyperlink, cssSelector: ".office-a", cssProperty: "color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.FollowedHyperlink, cssSelector: ".office-a:visited", cssProperty: "color" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.HeaderLatinFont, cssSelector: ".office-headerFont-latin", cssProperty: "font-family" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.HeaderEastAsianFont, cssSelector: ".office-headerFont-eastAsian", cssProperty: "font-family" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.HeaderScriptFont, cssSelector: ".office-headerFont-script", cssProperty: "font-family" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.HeaderLocalizedFont, cssSelector: ".office-headerFont-localized", cssProperty: "font-family" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.BodyLatinFont, cssSelector: ".office-bodyFont-latin", cssProperty: "font-family" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.BodyEastAsianFont, cssSelector: ".office-bodyFont-eastAsian", cssProperty: "font-family" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.BodyScriptFont, cssSelector: ".office-bodyFont-script", cssProperty: "font-family" }, + { name: OSF.DDA.Theming.DocumentThemeEnum.BodyLocalizedFont, cssSelector: ".office-bodyFont-localized", cssProperty: "font-family" } + ]; + var realData = data.type == OSF.EventType.DocumentThemeChanged ? data.documentTheme : data; + for (var i = 0; i < documentThemeCssMapping.length; i++) { + if (this._previousDocumentThemeData === null || this._previousDocumentThemeData[documentThemeCssMapping[i].name] != realData[documentThemeCssMapping[i].name]) { + if (realData[documentThemeCssMapping[i].name] != null && realData[documentThemeCssMapping[i].name] != "") { + var insertableText = realData[documentThemeCssMapping[i].name]; + if (documentThemeCssMapping[i].cssProperty === "font-family") { + insertableText = '"' + insertableText.replace(new RegExp("\"", "g"), '\\"') + '"'; + } + this._changeCss(this._officeCss, documentThemeCssMapping[i].cssSelector, "{" + documentThemeCssMapping[i].cssProperty + ":" + insertableText + ";}"); + } + else { + this._changeCss(this._officeCss, documentThemeCssMapping[i].cssSelector, "{}"); + } + } + } + this._previousDocumentThemeData = realData; + }; + InternalThemeHandler.prototype._changeOfficeThemeData = function (data) { + var officeThemeCssMapping = [ + { name: OSF.DDA.Theming.OfficeThemeEnum.BodyForegroundColor, cssSelector: ".office-officeTheme-primary-fontColor", cssProperty: "color" }, + { name: OSF.DDA.Theming.OfficeThemeEnum.BodyBackgroundColor, cssSelector: ".office-officeTheme-primary-bgColor", cssProperty: "background-color" }, + { name: OSF.DDA.Theming.OfficeThemeEnum.ControlForegroundColor, cssSelector: ".office-officeTheme-secondary-fontColor", cssProperty: "color" }, + { name: OSF.DDA.Theming.OfficeThemeEnum.ControlBackgroundColor, cssSelector: ".office-officeTheme-secondary-bgColor", cssProperty: "background-color" } + ]; + var realData = data.type == OSF.EventType.OfficeThemeChanged ? data.officeTheme : data; + for (var i = 0; i < officeThemeCssMapping.length; i++) { + if (this._previousOfficeThemeData === null || this._previousOfficeThemeData[officeThemeCssMapping[i].name] != realData[officeThemeCssMapping[i].name]) { + if (realData[officeThemeCssMapping[i].name] !== undefined) { + this._changeCss(this._officeCss, officeThemeCssMapping[i].cssSelector, "{" + officeThemeCssMapping[i].cssProperty + ":" + realData[officeThemeCssMapping[i].name] + ";}"); + } + } + } + this._previousOfficeThemeData = realData; + }; + InternalThemeHandler.prototype._getAndProcessThemeData = function (getThemeMethod, processResultCallback, getThemeMethodIdentifier) { + var _this = this; + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo && hostInfo.hostPlatform == OSF.HostInfoPlatform.web) { + if (getThemeMethodIdentifier == OSF.AsyncMethods.GetOfficeThemeAsync && Office.context.officeTheme) { + var officeThemeData = {}; + officeThemeData[OSF.DDA.Theming.OfficeThemeEnum.BodyBackgroundColor] = Office.context.officeTheme.bodyBackgroundColor; + officeThemeData[OSF.DDA.Theming.OfficeThemeEnum.BodyForegroundColor] = Office.context.officeTheme.bodyForegroundColor; + officeThemeData[OSF.DDA.Theming.OfficeThemeEnum.ControlBackgroundColor] = Office.context.officeTheme.controlBackgroundColor; + officeThemeData[OSF.DDA.Theming.OfficeThemeEnum.ControlForegroundColor] = Office.context.officeTheme.controlForegroundColor; + officeThemeData[OSF.DDA.Theming.OfficeThemeEnum.IsDarkTheme] = Office.context.officeTheme.isDarkTheme; + processResultCallback(officeThemeData); + } + return; + } + getThemeMethod(function (asyncResult) { + if (asyncResult.status == "succeeded") { + var data = asyncResult.value; + processResultCallback(data); + } + if (_this._areAllCallsCompleted(getThemeMethodIdentifier) && _this._onAsyncCallsCompleted) { + _this._onAsyncCallsCompleted(); + _this._onAsyncCallsCompleted = null; + } + }); + }; + InternalThemeHandler.prototype._processOfficeThemeData = function (data) { + var _this = this; + this._changeOfficeThemeData(data); + this._eventTarget.addHandlerAsync(Microsoft.Office.WebExtension.EventType.OfficeThemeChanged, function (args) { + _this._changeOfficeThemeData(args); + }, null); + }; + InternalThemeHandler.prototype._processDocumentThemeData = function (data) { + var _this = this; + this._changeDocumentThemeData(data); + this._eventTarget.addHandlerAsync(Microsoft.Office.WebExtension.EventType.DocumentThemeChanged, function (args) { + _this._changeDocumentThemeData(args); + }, null); + }; + InternalThemeHandler.prototype._areAllCallsCompleted = function (completedCall) { + var asyncCallsCompleted; + if (!(asyncCallsCompleted = this._asyncCallsCompleted)) { + return true; + } + if (completedCall && asyncCallsCompleted.hasOwnProperty(completedCall)) { + asyncCallsCompleted[completedCall] = true; + } + for (var call in asyncCallsCompleted) { + if (asyncCallsCompleted.hasOwnProperty(call) && asyncCallsCompleted[call]) { + continue; + } + return false; + } + return true; + }; + return InternalThemeHandler; + }()); + Theming.InternalThemeHandler = InternalThemeHandler; + })(Theming = DDA.Theming || (DDA.Theming = {})); + })(DDA = OSF.DDA || (OSF.DDA = {})); +})(OSF || (OSF = {})); +var Office; +(function (Office) { + var context; + (function (context) { + var _themeManager; + function get_ThemeManager() { + if (!_themeManager) { + _themeManager = new OSF.DDA.Theming.InternalThemeHandler(); + _themeManager.InitializeThemeManager(); + } + return _themeManager; + } + OSF.definePropertyOnNamespace(context, 'themeManager', get_ThemeManager); + })(context = Office.context || (Office.context = {})); +})(Office || (Office = {})); +var OSF; +(function (OSF) { + OSF.BootStrapExtension.prepareApiSurface = function () { + return new Promise(function () { + OSF.V10ApiFeatureRegistry.initialize(); + }); + }; +})(OSF || (OSF = {})); +var OfficeRuntime; +(function (OfficeRuntime) { + var ApiHelper; + (function (ApiHelper) { + function isSharedRuntime() { + try { + if (typeof (OSF) !== "undefined" && + typeof (OSF._OfficeAppFactory) !== "undefined" && + typeof (OSF._OfficeAppFactory.getHostInfo) !== "undefined") { + var flags = OSF._OfficeAppFactory.getHostInfo().flags; + if (flags & OSF.HostInfoFlags.SharedApp) { + return true; + } + } + } + catch (e) { } + return false; + } + function isReactNative() { + try { + if (typeof (OSF) !== "undefined" && + typeof (OSF.isOfficeReactNative) !== "undefined" && + OSF.isOfficeReactNative()) { + return true; + } + } + catch (e) { } + return false; + } + function getHostPlatform() { + var hostPlatform = 'web'; + try { + if (typeof (OSF) !== "undefined" && + typeof (OSF._OfficeAppFactory) !== "undefined" && + typeof (OSF._OfficeAppFactory.getHostInfo) !== "undefined") { + hostPlatform = OSF._OfficeAppFactory.getHostInfo().hostPlatform; + } + } + catch (e) { } + return hostPlatform; + } + function isNativeStorage() { + var hostPlatform = getHostPlatform(); + if (!isSharedRuntime() && + (isReactNative() || + hostPlatform === 'win32' || + (hostPlatform === 'mac' && window._useSDXSandbox))) { + return true; + } + return false; + } + ApiHelper.isNativeStorage = isNativeStorage; + function isNativeApiInfomation() { + var hostPlatform = getHostPlatform(); + if (isReactNative() || + hostPlatform === 'win32' || + (hostPlatform === 'mac' && window._useSDXSandbox)) { + return true; + } + return false; + } + ApiHelper.isNativeApiInfomation = isNativeApiInfomation; + function isNativeDialog() { + var hostPlatform = getHostPlatform(); + if (isReactNative() || hostPlatform === 'win32') { + return true; + } + return false; + } + ApiHelper.isNativeDialog = isNativeDialog; + })(ApiHelper = OfficeRuntime.ApiHelper || (OfficeRuntime.ApiHelper = {})); +})(OfficeRuntime || (OfficeRuntime = {})); +var OfficeRuntime; +(function (OfficeRuntime) { + if (OfficeRuntime.ApiHelper.isNativeApiInfomation()) { + OfficeRuntime.apiInformation = apiInformationNative; + } + else { + OfficeRuntime.apiInformation = apiInformationWeb; + } + var apiInformationNative = { + isSetSupported: function (capability, version) { + if (typeof capability != "string") { + return false; + } + if (version == undefined) { + version = "0.0.0"; + } + if (global.__apiSets === undefined) { + return false; + } + else { + var sets = global.__apiSets; + var index = Object.keys(sets).map(function (key) { return key.toLowerCase(); }).indexOf(capability.toLowerCase()); + if (index > -1) { + var setMaxVersion = sets[Object.keys(sets)[index]]; + try { + var minVersionNum = getVersion(version); + var setMaxVersionNum = void 0; + if (Array.isArray(setMaxVersion)) { + setMaxVersionNum = getMatcheddMajorVersion(setMaxVersion, minVersionNum.major); + } + else { + setMaxVersionNum = getVersion(setMaxVersion); + } + if (setMaxVersionNum.major > 0) { + if (setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor > minVersionNum.minor) { + return true; + } + if (setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor == minVersionNum.minor && + setMaxVersionNum.patch >= minVersionNum.patch) { + return true; + } + } + } + catch (e) { + return false; + } + } + return false; + } + } + }; + var apiInformationWeb = { + isSetSupported: function (capability, version) { + try { + if (Office && Office.context && Office.context.requirements) { + return Office.context.requirements + .isSetSupported(capability, Number(version)); + } + else { + return false; + } + } + catch (e) { + return false; + } + } + }; + function getMatcheddMajorVersion(versions, majorVersion) { + for (var i = 0; i < versions.length; i++) { + var v = getVersion(versions[i]); + if (v.major == majorVersion) + return v; + } + return { major: 0, minor: 0, patch: 0 }; + } + function getVersion(version) { + var temp = version.split("."); + var major = 0; + var minor = 0; + var patch = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (temp.length >= 3) { + patch = Number(temp[2]); + } + if (isNaN(major) || isNaN(minor) || isNaN(patch)) { + throw "version format incorrect"; + } + } + var result = { "major": major, "minor": minor, "patch": patch }; + return result; + } +})(OfficeRuntime || (OfficeRuntime = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeRuntime; +(function (OfficeRuntime) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeDialogService = "DialogService"; + var Dialog = (function () { + function Dialog(dialogService) { + this._dialogService = dialogService; + } + return Dialog; + }()); + OfficeRuntime.Dialog = Dialog; + var WebDialog = (function (_super) { + __extends(WebDialog, _super); + function WebDialog() { + return _super !== null && _super.apply(this, arguments) || this; + } + WebDialog.prototype.close = function () { + this._dialogService.close(); + return OfficeExtension.CoreUtility.Promise.resolve(); + }; + return WebDialog; + }(Dialog)); + var NativeDialog = (function (_super) { + __extends(NativeDialog, _super); + function NativeDialog() { + return _super !== null && _super.apply(this, arguments) || this; + } + NativeDialog.prototype.close = function () { + this._dialogService.close(); + return this._dialogService.context.sync(); + }; + return NativeDialog; + }(Dialog)); + function displayWebDialog(url, options) { + if (options === void 0) { options = {}; } + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) { + throw new OfficeExtension.Error({ code: "InvalidArgument", message: 'Dimensions must be "number%" or number.' }); + } + var dialogOptions = { + width: options.width ? parseInt(options.width) : 50, + height: options.height ? parseInt(options.height) : 50, + displayInIFrame: options.displayInIFrame + }; + if (OfficeRuntime.ApiHelper.isNativeDialog()) { + displayDialogNative(dialogOptions, resolve, reject, url, options); + } + else { + displayDialogWeb(dialogOptions, resolve, reject, url, options); + } + }); + } + OfficeRuntime.displayWebDialog = displayWebDialog; + function displayDialogWeb(dialogOptions, resolve, reject, url, options) { + if (options === void 0) { options = {}; } + var dialog; + Office.context.ui.displayDialogAsync(url, dialogOptions, dialogCallback); + function dialogCallback(asyncResult) { + if (asyncResult.status === 'failed') { + reject(new OfficeExtension.Error(lookupErrorCodeAndMessage(asyncResult.error.code))); + } + else { + dialog = asyncResult.value; + dialog.addEventHandler(Office.EventType.DialogMessageReceived, messageHandler); + dialog.addEventHandler(Office.EventType.DialogEventReceived, eventHandler); + resolve(new WebDialog(dialog)); + } + } + function messageHandler(args) { + if (options.onMessage) { + options.onMessage(args.message, dialog, args.origin); + } + } + function eventHandler(args) { + if (args.error === 12006) { + if (options.onClose) { + options.onClose(); + } + } + else { + if (options.onRuntimeError) { + options.onRuntimeError(new OfficeExtension.Error(lookupErrorCodeAndMessage(args.error)), dialog); + } + } + } + } + function displayDialogNative(dialogOptions, resolve, reject, url, options) { + if (options === void 0) { options = {}; } + var ctx = new OfficeExtension.ClientRequestContext(); + var dialogService = DialogService.newObject(ctx); + var dialog = new NativeDialog(dialogService); + var eventResult = dialogService.onDialogMessage.add(function (args) { + OfficeExtension.Utility.log("dialogMessageHandler:" + JSON.stringify(args)); + switch (args.type) { + case 17: + if (args.error) { + reject(args.error); + } + else { + resolve(dialog); + } + break; + case 12: + if (options.onMessage) { + options.onMessage(args.message, dialog); + } + break; + case 10: + default: + if (args.originalErrorCode === 12006) { + if (eventResult) { + eventResult.remove(); + ctx.sync(); + } + if (options.onClose) { + options.onClose(); + } + } + else { + if (options.onRuntimeError) { + options.onRuntimeError(args.error, dialog); + reject(args.error); + } + } + } + return OfficeExtension.CoreUtility.Promise.resolve(); + }); + return ctx.sync() + .then(function () { + dialogService.displayDialog(url, dialogOptions); + return ctx.sync(); + }) + .catch(function (e) { + reject(e); + }); + } + function isInt(value) { + return (/^(\-|\+)?([0-9]+)%?$/.test(value)); + } + function lookupErrorCodeAndMessage(internalCode) { + var _a; + var table = (_a = {}, + _a[12002] = { code: "InvalidUrl", message: "Cannot load URL, no such page or bad URL syntax." }, + _a[12003] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12004] = { code: "Untrusted", message: "Domain is not trusted." }, + _a[12005] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12007] = { code: "FailedToOpen", message: "Another dialog is already opened." }, + _a); + if (table[internalCode]) { + return table[internalCode]; + } + else { + return { code: "Unknown", message: "An unknown error has occured with code: " + internalCode }; + } + } + var DialogService = (function (_super) { + __extends(DialogService, _super); + function DialogService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DialogService.prototype, "_className", { + get: function () { + return "DialogService"; + }, + enumerable: true, + configurable: true + }); + DialogService.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4, 0); + }; + DialogService.prototype.displayDialog = function (url, options) { + _invokeMethod(this, "DisplayDialog", 1, [url, options], 4, 0); + }; + DialogService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + DialogService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DialogService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeRuntime.DialogService, context, "Microsoft.Dialog.DialogService", false, 4); + }; + Object.defineProperty(DialogService.prototype, "onDialogMessage", { + get: function () { + if (!this.m_dialogMessage) { + this.m_dialogMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "DialogMessage", { + eventType: 65536, + registerFunc: function () { return void {}; }, + unregisterFunc: function () { return void {}; }, + getTargetIdFunc: function () { return null; }, + eventArgsTransformFunc: function (args) { + var transformedArgs; + try { + var parsedMessage = JSON.parse(args.message); + var error = parsedMessage.errorCode + ? new OfficeExtension.Error(lookupErrorCodeAndMessage(parsedMessage.errorCode)) + : null; + transformedArgs = { + originalErrorCode: parsedMessage.errorCode, + type: parsedMessage.type, + error: error, + message: parsedMessage.message, + origin: parsedMessage.origin + }; + } + catch (e) { + transformedArgs = { + originalErrorCode: null, + type: 17, + error: new OfficeExtension.Error({ code: "GenericException", message: "Unknown error" }), + message: e.message + }; + } + return OfficeExtension.Utility._createPromiseFromResult(transformedArgs); + } + }); + } + return this.m_dialogMessage; + }, + enumerable: true, + configurable: true + }); + DialogService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return DialogService; + }(OfficeExtension.ClientObject)); + OfficeRuntime.DialogService = DialogService; + var DialogEventType; + (function (DialogEventType) { + DialogEventType[DialogEventType["dialogMessageReceived"] = 0] = "dialogMessageReceived"; + DialogEventType[DialogEventType["dialogEventReceived"] = 1] = "dialogEventReceived"; + })(DialogEventType || (DialogEventType = {})); + var DialogErrorCodes; + (function (DialogErrorCodes) { + DialogErrorCodes["generalException"] = "GeneralException"; + })(DialogErrorCodes = OfficeRuntime.DialogErrorCodes || (OfficeRuntime.DialogErrorCodes = {})); +})(OfficeRuntime || (OfficeRuntime = {})); +var OfficeRuntime; +(function (OfficeRuntime) { + var experimentation; + (function (experimentation) { + function getBooleanFeatureGate(featureName, defaultValue) { + try { + var featureGates = Microsoft.Office.WebExtension.FeatureGates; + var featureGateValue = featureGates[featureName]; + return void 0 === featureGateValue || null === featureGateValue ? defaultValue : "true" === featureGateValue.toString().toLowerCase(); + } + catch (error) { + return defaultValue; + } + } + experimentation.getBooleanFeatureGate = getBooleanFeatureGate; + function getIntFeatureGate(featureName, defaultValue) { + try { + var featureGates = Microsoft.Office.WebExtension.FeatureGates; + var featureGateValue = parseInt(featureGates[featureName]); + return isNaN(featureGateValue) ? defaultValue : featureGateValue; + } + catch (error) { + return defaultValue; + } + } + experimentation.getIntFeatureGate = getIntFeatureGate; + function getStringFeatureGate(featureName, defaultValue) { + try { + var featureGates = Microsoft.Office.WebExtension.FeatureGates; + var featureGateValue = featureGates[featureName]; + return void 0 === featureGateValue || null === featureGateValue ? defaultValue : featureGateValue; + } + catch (error) { + return defaultValue; + } + } + experimentation.getStringFeatureGate = getStringFeatureGate; + function getBooleanFeatureGateAsync(featureName, defaultValue) { + return Promise.resolve(getBooleanFeatureGate(featureName, defaultValue)); + } + experimentation.getBooleanFeatureGateAsync = getBooleanFeatureGateAsync; + function getIntFeatureGateAsync(featureName, defaultValue) { + return Promise.resolve(getIntFeatureGate(featureName, defaultValue)); + } + experimentation.getIntFeatureGateAsync = getIntFeatureGateAsync; + function getStringFeatureGateAsync(featureName, defaultValue) { + return Promise.resolve(getStringFeatureGate(featureName, defaultValue)); + } + experimentation.getStringFeatureGateAsync = getStringFeatureGateAsync; + })(experimentation = OfficeRuntime.experimentation || (OfficeRuntime.experimentation = {})); +})(OfficeRuntime || (OfficeRuntime = {})); +var OfficeRuntime; +(function (OfficeRuntime) { + var message; + (function (message_1) { + var listeners = {}; + function on(eventName, listener) { + add(eventName, listener); + return new Promise(function (resolve) { + resolve(); + }); + } + message_1.on = on; + function off(eventName, listener) { + remove(eventName, listener); + return new Promise(function (resolve) { + resolve(); + }); + } + message_1.off = off; + function emit(eventName, message) { + send(eventName, message); + return new Promise(function (resolve) { + resolve(); + }); + } + message_1.emit = emit; + function setupReceive() { + if (Office && Office.context && Office.context.messaging && !Office.context.messaging.onMessage) { + Office.context.messaging.onMessage = receiveMessage.bind(this); + } + } + function add(eventName, listener) { + if (!listeners.hasOwnProperty(eventName)) { + listeners[eventName] = new ListenerManager(); + setupReceive(); + } + listeners[eventName].add(listener); + } + function remove(eventName, listener) { + if (listeners.hasOwnProperty(eventName)) { + if (listener) { + listeners[eventName].remove(listener); + } + else { + delete listeners[eventName]; + } + } + } + function send(eventName, message) { + var wrapped = { + eventName: eventName, + message: message + }; + if (Office && Office.context && Office.context.messaging && Office.context.messaging.sendMessage) { + Office.context.messaging.sendMessage(wrapped); + } + } + function receiveMessage(wrapped) { + var eventName = wrapped.eventName; + var message = wrapped.message; + if (listeners.hasOwnProperty(eventName)) { + listeners[eventName].call(message); + } + } + })(message = OfficeRuntime.message || (OfficeRuntime.message = {})); + var ListenerManager = (function () { + function ListenerManager() { + this.listeners = []; + } + ListenerManager.prototype.add = function (listener) { + this.listeners.push(listener); + }; + ListenerManager.prototype.remove = function (listener) { + var index = this.listeners.lastIndexOf(listener); + if (index !== -1) { + this.listeners.splice(index, 1); + } + }; + ListenerManager.prototype.call = function (message) { + this.listeners.forEach(function (listener) { return listener(message); }); + }; + return ListenerManager; + }()); + OfficeRuntime.ListenerManager = ListenerManager; +})(OfficeRuntime || (OfficeRuntime = {})); +var OfficeRuntime; +(function (OfficeRuntime) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typePersistentKvStorageService = "PersistentKvStorageService"; + var prefix = '_Office_AsyncStorage_'; + var dummyUnusedKey = prefix + '|_unusedKey_'; + var storageNative = { + getItem: function (key) { + return callPersistentKvStorageManager(function (perStorage, invokeId) { return perStorage.multiGet(invokeId, JSON.stringify([key])); }, function (result) { + var parsedResult = JSON.parse(result); + return parsedResult && parsedResult[0] && parsedResult[0][1] ? parsedResult[0][1] : null; + }); + }, + setItem: function (key, value) { + return callPersistentKvStorageManager(function (perStorage, invokeId) { return perStorage.multiSet(invokeId, JSON.stringify([[key, value]])); }, function () { return null; }); + }, + removeItem: function (key) { + return callPersistentKvStorageManager(function (perStorage, invokeId) { return perStorage.multiRemove(invokeId, JSON.stringify([key])); }, function () { return null; }); + }, + getItems: function (keys) { + return callPersistentKvStorageManager(function (perStorage, invokeId) { return perStorage.multiGet(invokeId, JSON.stringify(keys)); }, function (result) { + var keyValues = JSON.parse(result); + var map = {}; + keyValues && keyValues.forEach(function (_a) { + var key = _a[0], value = _a[1]; + map[key] = value; + return value; + }); + keys && keys.forEach(function (key) { map[key] ? map[key] : null; }); + return map; + }); + }, + setItems: function (keyValues) { + var keyValuePairs = []; + for (var key in keyValues) { + if (keyValues.hasOwnProperty(key)) { + keyValuePairs.push([key, keyValues[key]]); + } + } + return callPersistentKvStorageManager(function (storage, invokeId) { return storage.multiSet(invokeId, JSON.stringify(keyValuePairs)); }, function () { return null; }); + }, + removeItems: function (keys) { + return callPersistentKvStorageManager(function (perStorage, invokeId) { return perStorage.multiRemove(invokeId, JSON.stringify(keys)); }, function () { return null; }); + }, + getKeys: function () { + return callPersistentKvStorageManager(function (perStorage, invokeId) { return perStorage.getAllKeys(invokeId); }, function (result) { return JSON.parse(result); }); + } + }; + var storageWeb = { + getItem: function (key) { + return performActionAndReturnResult(function () { return localStorageGetItem(key); }); + }, + setItem: function (key, value) { + return performAction(function () { return localStorageSetItem(key, value); }); + }, + removeItem: function (key) { + return performAction(function () { return window.localStorage.removeItem(prefix + key); }); + }, + getItems: function (keys) { + return new Promise(function (resolve, reject) { + var result = {}; + var errors = []; + try { + ensureFreshLocalStorage(); + } + catch (e) { + reject(e); + } + keys.forEach(function (key) { + try { + var value = localStorageGetItem(key); + result[key] = value ? value : null; + } + catch (e) { + errors.push(e); + } + }); + if (errors.length > 0) { + reject(new Error("Unknown error.")); + } + else { + resolve(result); + } + }); + }, + setItems: function (keyValues) { + return performMultiAction(keyValues, function (key) { return localStorageSetItem(key, keyValues[key]); }); + }, + removeItems: function (keys) { + return performMultiAction(keys, function (key) { return window.localStorage.removeItem(prefix + key); }); + }, + getKeys: function () { + return performActionAndReturnResult(function () { + return Object.keys(window.localStorage) + .filter(function (fullKey) { return fullKey.indexOf(prefix) === 0; }) + .map(function (fullKey) { return fullKey.substr(prefix.length); }); + }); + } + }; + if (OfficeRuntime.ApiHelper.isNativeStorage()) { + OfficeRuntime.storage = storageNative; + } + else { + OfficeRuntime.storage = storageWeb; + } + function localStorageGetItem(key) { + return window.localStorage.getItem(prefix + key); + } + function localStorageSetItem(key, value) { + window.localStorage.setItem(prefix + key, value); + } + function callPersistentKvStorageManager(nativeCall, getValueOnSuccess) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var storageManager = PersistentKvStorageManager.getInstance(); + var invokeId = storageManager.setCallBack(function (result, error) { + if (error) { + reject(error); + return; + } + var value = getValueOnSuccess(result); + resolve(value); + }); + storageManager.ctx + .sync() + .then(function () { + var storageService = storageManager.getPersistentKvStorageService(); + nativeCall(storageService, invokeId); + return storageManager.ctx.sync(); + }) + .catch(function (e) { + reject(e); + }); + }); + } + function ensureFreshLocalStorage() { + localStorageSetItem(dummyUnusedKey, null); + window.localStorage.removeItem(dummyUnusedKey); + } + function performAction(action, callback) { + if (callback === void 0) { callback = function () { + }; } + return new Promise(function (resolve, reject) { + try { + ensureFreshLocalStorage(); + action(); + callback(null); + resolve(); + } + catch (e) { + callback(e); + reject(e); + } + }); + } + function performActionAndReturnResult(action, callback) { + if (callback === void 0) { callback = function () { + }; } + return new Promise(function (resolve, reject) { + try { + ensureFreshLocalStorage(); + var result = action(); + callback(null, result); + resolve(result); + } + catch (e) { + callback(e, null); + reject(e); + } + }); + } + function performMultiAction(collection, action, callback) { + if (callback === void 0) { callback = function () { + }; } + return new Promise(function (resolve, reject) { + var errors = []; + try { + ensureFreshLocalStorage(); + } + catch (e) { + errors.push(e); + } + for (var key in collection) { + if (collection.hasOwnProperty(key) || Array.isArray(collection)) { + try { + if (Array.isArray(collection)) { + action(collection[key]); + } + else { + action(key); + } + } + catch (e) { + errors.push(e); + } + } + } + callback(errors); + if (errors.length > 0) { + reject(errors); + } + else { + resolve(); + } + }); + } + var PersistentKvStorageManager = (function () { + function PersistentKvStorageManager() { + var _this = this; + this._invokeId = 0; + this._callDict = {}; + this.ctx = new OfficeExtension.ClientRequestContext(); + this._perkvstorService = PersistentKvStorageService.newObject(this.ctx); + this._eventResult = this._perkvstorService.onPersistentStorageMessage.add(function (args) { + OfficeExtension.Utility.log("persistentKvStoragegMessageHandler:" + JSON.stringify(args)); + var callback = _this._callDict[args.invokeId]; + if (callback) { + callback(args.message, args.error); + delete _this._callDict[args.invokeId]; + } + }); + } + PersistentKvStorageManager.getInstance = function () { + if (PersistentKvStorageManager.instance === undefined) { + PersistentKvStorageManager.instance = new PersistentKvStorageManager(); + } + else { + PersistentKvStorageManager.instance._perkvstorService = PersistentKvStorageService.newObject(PersistentKvStorageManager.instance.ctx); + } + return PersistentKvStorageManager.instance; + }; + PersistentKvStorageManager.prototype.getPersistentKvStorageService = function () { + return this._perkvstorService; + }; + PersistentKvStorageManager.prototype.getCallBack = function (callId) { + return this._callDict[callId]; + }; + PersistentKvStorageManager.prototype.setCallBack = function (callback) { + var id = this._invokeId; + this._callDict[this._invokeId++] = callback; + return id; + }; + return PersistentKvStorageManager; + }()); + var PersistentKvStorageService = (function (_super) { + __extends(PersistentKvStorageService, _super); + function PersistentKvStorageService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersistentKvStorageService.prototype, "_className", { + get: function () { + return "PersistentKvStorageService"; + }, + enumerable: true, + configurable: true + }); + PersistentKvStorageService.prototype.clear = function (id) { + _invokeMethod(this, "Clear", 1, [id], 4, 0); + }; + PersistentKvStorageService.prototype.getAllKeys = function (id) { + _invokeMethod(this, "GetAllKeys", 1, [id], 4, 0); + }; + PersistentKvStorageService.prototype.multiGet = function (id, jsonKeys) { + _invokeMethod(this, "MultiGet", 1, [id, jsonKeys], 4, 0); + }; + PersistentKvStorageService.prototype.multiRemove = function (id, jsonKeys) { + _invokeMethod(this, "MultiRemove", 1, [id, jsonKeys], 4, 0); + }; + PersistentKvStorageService.prototype.multiSet = function (id, jsonKeyValue) { + _invokeMethod(this, "MultiSet", 1, [id, jsonKeyValue], 4, 0); + }; + PersistentKvStorageService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersistentKvStorageService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersistentKvStorageService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeRuntime.PersistentKvStorageService, context, "Microsoft.PersistentKvStorage.PersistentKvStorageService", false, 4); + }; + Object.defineProperty(PersistentKvStorageService.prototype, "onPersistentStorageMessage", { + get: function () { + if (!this.m_persistentStorageMessage) { + this.m_persistentStorageMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "PersistentStorageMessage", { + eventType: 65537, + registerFunc: function () { return void {}; }, + unregisterFunc: function () { return void {}; }, + getTargetIdFunc: function () { return null; }, + eventArgsTransformFunc: function (args) { + var perkvstorArgs; + try { + var parsedMessage = JSON.parse(args.message); + var hr = parseInt(parsedMessage.errorCode); + var error = hr != 0 ? new OfficeExtension.Error(getErrorCodeAndMessage(hr)) : null; + perkvstorArgs = { + invokeId: parsedMessage.invokeId, + message: parsedMessage.message, + error: error + }; + } + catch (e) { + perkvstorArgs = { + invokeId: -1, + message: e.message, + error: new OfficeExtension.Error({ code: "GenericException", message: "Unknown error" }) + }; + } + return OfficeExtension.Utility._createPromiseFromResult(perkvstorArgs); + function getErrorCodeAndMessage(internalCode) { + var _a; + var table = (_a = {}, + _a[16389] = { code: "GenericException", message: "Unknown error." }, + _a[65535] = { code: "Unexcepted", message: "Catastrophic failure." }, + _a[14] = { code: "OutOfMemory", message: "Ran out of memory." }, + _a[87] = { code: "InvalidArg", message: "One or more arguments are invalid." }, + _a[16385] = { code: "NotImplemented", message: "Not implemented." }, + _a[6] = { code: "BadHandle", message: "File Handle is not Set." }, + _a[5] = { code: "AccessDenied", message: "Can't read the Storage File." }, + _a); + if (table[internalCode]) { + return table[internalCode]; + } + else { + return { code: "Unknown", message: "An unknown error has occured" }; + } + } + } + }); + } + return this.m_persistentStorageMessage; + }, + enumerable: true, + configurable: true + }); + PersistentKvStorageService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersistentKvStorageService; + }(OfficeExtension.ClientObject)); + OfficeRuntime.PersistentKvStorageService = PersistentKvStorageService; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["generalException"] = "GeneralException"; + })(ErrorCodes = OfficeRuntime.ErrorCodes || (OfficeRuntime.ErrorCodes = {})); +})(OfficeRuntime || (OfficeRuntime = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var _BeginExcel = "_BeginExcel"; +var Excel; +(function (Excel) { + var Base64EncodingType; + (function (Base64EncodingType) { + Base64EncodingType["JPG"] = "JPG"; + Base64EncodingType["PNG"] = "PNG"; + })(Base64EncodingType = Excel.Base64EncodingType || (Excel.Base64EncodingType = {})); + var BlockedErrorCellValueSubType; + (function (BlockedErrorCellValueSubType) { + BlockedErrorCellValueSubType["unknown"] = "Unknown"; + BlockedErrorCellValueSubType["dataTypeRestrictedDomain"] = "DataTypeRestrictedDomain"; + BlockedErrorCellValueSubType["dataTypePrivacySetting"] = "DataTypePrivacySetting"; + BlockedErrorCellValueSubType["dataTypeUnsupportedApp"] = "DataTypeUnsupportedApp"; + BlockedErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BlockedErrorCellValueSubType["richDataLinkDisabled"] = "RichDataLinkDisabled"; + BlockedErrorCellValueSubType["signInError"] = "SignInError"; + BlockedErrorCellValueSubType["noLicense"] = "NoLicense"; + })(BlockedErrorCellValueSubType = Excel.BlockedErrorCellValueSubType || (Excel.BlockedErrorCellValueSubType = {})); + var BusyErrorCellValueSubType; + (function (BusyErrorCellValueSubType) { + BusyErrorCellValueSubType["unknown"] = "Unknown"; + BusyErrorCellValueSubType["externalLinksGeneric"] = "ExternalLinksGeneric"; + BusyErrorCellValueSubType["loadingImage"] = "LoadingImage"; + })(BusyErrorCellValueSubType = Excel.BusyErrorCellValueSubType || (Excel.BusyErrorCellValueSubType = {})); + var CalcErrorCellValueSubType; + (function (CalcErrorCellValueSubType) { + CalcErrorCellValueSubType["unknown"] = "Unknown"; + CalcErrorCellValueSubType["arrayOfArrays"] = "ArrayOfArrays"; + CalcErrorCellValueSubType["arrayOfRanges"] = "ArrayOfRanges"; + CalcErrorCellValueSubType["emptyArray"] = "EmptyArray"; + CalcErrorCellValueSubType["unsupportedLifting"] = "UnsupportedLifting"; + CalcErrorCellValueSubType["dataTableReferencedPendingFormula"] = "DataTableReferencedPendingFormula"; + CalcErrorCellValueSubType["tooManyCells"] = "TooManyCells"; + CalcErrorCellValueSubType["lambdaInCell"] = "LambdaInCell"; + CalcErrorCellValueSubType["tooDeeplyNested"] = "TooDeeplyNested"; + CalcErrorCellValueSubType["textOverflow"] = "TextOverflow"; + })(CalcErrorCellValueSubType = Excel.CalcErrorCellValueSubType || (Excel.CalcErrorCellValueSubType = {})); + var EntityCardLayoutType; + (function (EntityCardLayoutType) { + EntityCardLayoutType["entity"] = "Entity"; + EntityCardLayoutType["array"] = "Array"; + })(EntityCardLayoutType = Excel.EntityCardLayoutType || (Excel.EntityCardLayoutType = {})); + var EntityCompactLayoutIcons; + (function (EntityCompactLayoutIcons) { + EntityCompactLayoutIcons["generic"] = "Generic"; + EntityCompactLayoutIcons["accessibility"] = "Accessibility"; + EntityCompactLayoutIcons["airplane"] = "Airplane"; + EntityCompactLayoutIcons["airplaneTakeOff"] = "AirplaneTakeOff"; + EntityCompactLayoutIcons["album"] = "Album"; + EntityCompactLayoutIcons["alert"] = "Alert"; + EntityCompactLayoutIcons["alertUrgent"] = "AlertUrgent"; + EntityCompactLayoutIcons["animal"] = "Animal"; + EntityCompactLayoutIcons["animalCat"] = "AnimalCat"; + EntityCompactLayoutIcons["animalDog"] = "AnimalDog"; + EntityCompactLayoutIcons["animalRabbit"] = "AnimalRabbit"; + EntityCompactLayoutIcons["animalTurtle"] = "AnimalTurtle"; + EntityCompactLayoutIcons["appFolder"] = "AppFolder"; + EntityCompactLayoutIcons["appGeneric"] = "AppGeneric"; + EntityCompactLayoutIcons["apple"] = "Apple"; + EntityCompactLayoutIcons["approvalsApp"] = "ApprovalsApp"; + EntityCompactLayoutIcons["archive"] = "Archive"; + EntityCompactLayoutIcons["archiveMultiple"] = "ArchiveMultiple"; + EntityCompactLayoutIcons["arrowTrendingLines"] = "ArrowTrendingLines"; + EntityCompactLayoutIcons["art"] = "Art"; + EntityCompactLayoutIcons["atom"] = "Atom"; + EntityCompactLayoutIcons["attach"] = "Attach"; + EntityCompactLayoutIcons["automobile"] = "Automobile"; + EntityCompactLayoutIcons["autosum"] = "Autosum"; + EntityCompactLayoutIcons["backpack"] = "Backpack"; + EntityCompactLayoutIcons["badge"] = "Badge"; + EntityCompactLayoutIcons["balloon"] = "Balloon"; + EntityCompactLayoutIcons["bank"] = "Bank"; + EntityCompactLayoutIcons["barcodeScanner"] = "BarcodeScanner"; + EntityCompactLayoutIcons["basketball"] = "Basketball"; + EntityCompactLayoutIcons["battery0"] = "Battery0"; + EntityCompactLayoutIcons["battery10"] = "Battery10"; + EntityCompactLayoutIcons["beach"] = "Beach"; + EntityCompactLayoutIcons["beaker"] = "Beaker"; + EntityCompactLayoutIcons["bed"] = "Bed"; + EntityCompactLayoutIcons["binFull"] = "BinFull"; + EntityCompactLayoutIcons["bird"] = "Bird"; + EntityCompactLayoutIcons["bluetooth"] = "Bluetooth"; + EntityCompactLayoutIcons["board"] = "Board"; + EntityCompactLayoutIcons["boardGames"] = "BoardGames"; + EntityCompactLayoutIcons["book"] = "Book"; + EntityCompactLayoutIcons["bookmark"] = "Bookmark"; + EntityCompactLayoutIcons["bookmarkMultiple"] = "BookmarkMultiple"; + EntityCompactLayoutIcons["bot"] = "Bot"; + EntityCompactLayoutIcons["bowlChopsticks"] = "BowlChopsticks"; + EntityCompactLayoutIcons["box"] = "Box"; + EntityCompactLayoutIcons["boxMultiple"] = "BoxMultiple"; + EntityCompactLayoutIcons["brainCircuit"] = "BrainCircuit"; + EntityCompactLayoutIcons["branch"] = "Branch"; + EntityCompactLayoutIcons["branchFork"] = "BranchFork"; + EntityCompactLayoutIcons["branchRequest"] = "BranchRequest"; + EntityCompactLayoutIcons["bridge"] = "Bridge"; + EntityCompactLayoutIcons["briefcase"] = "Briefcase"; + EntityCompactLayoutIcons["briefcaseMedical"] = "BriefcaseMedical"; + EntityCompactLayoutIcons["broadActivityFeed"] = "BroadActivityFeed"; + EntityCompactLayoutIcons["broom"] = "Broom"; + EntityCompactLayoutIcons["bug"] = "Bug"; + EntityCompactLayoutIcons["building"] = "Building"; + EntityCompactLayoutIcons["buildingBank"] = "BuildingBank"; + EntityCompactLayoutIcons["buildingFactory"] = "BuildingFactory"; + EntityCompactLayoutIcons["buildingGovernment"] = "BuildingGovernment"; + EntityCompactLayoutIcons["buildingHome"] = "BuildingHome"; + EntityCompactLayoutIcons["buildingLighthouse"] = "BuildingLighthouse"; + EntityCompactLayoutIcons["buildingMultiple"] = "BuildingMultiple"; + EntityCompactLayoutIcons["buildingRetail"] = "BuildingRetail"; + EntityCompactLayoutIcons["buildingRetailMore"] = "BuildingRetailMore"; + EntityCompactLayoutIcons["buildingRetailToolbox"] = "BuildingRetailToolbox"; + EntityCompactLayoutIcons["buildingShop"] = "BuildingShop"; + EntityCompactLayoutIcons["buildingSkyscraper"] = "BuildingSkyscraper"; + EntityCompactLayoutIcons["calculator"] = "Calculator"; + EntityCompactLayoutIcons["calendarLtr"] = "CalendarLtr"; + EntityCompactLayoutIcons["calendarRtl"] = "CalendarRtl"; + EntityCompactLayoutIcons["call"] = "Call"; + EntityCompactLayoutIcons["calligraphyPen"] = "CalligraphyPen"; + EntityCompactLayoutIcons["camera"] = "Camera"; + EntityCompactLayoutIcons["cameraDome"] = "CameraDome"; + EntityCompactLayoutIcons["car"] = "Car"; + EntityCompactLayoutIcons["cart"] = "Cart"; + EntityCompactLayoutIcons["cat"] = "Cat"; + EntityCompactLayoutIcons["certificate"] = "Certificate"; + EntityCompactLayoutIcons["chartMultiple"] = "ChartMultiple"; + EntityCompactLayoutIcons["chat"] = "Chat"; + EntityCompactLayoutIcons["chatMultiple"] = "ChatMultiple"; + EntityCompactLayoutIcons["chatVideo"] = "ChatVideo"; + EntityCompactLayoutIcons["check"] = "Check"; + EntityCompactLayoutIcons["checkboxChecked"] = "CheckboxChecked"; + EntityCompactLayoutIcons["checkboxUnchecked"] = "CheckboxUnchecked"; + EntityCompactLayoutIcons["checkmark"] = "Checkmark"; + EntityCompactLayoutIcons["chess"] = "Chess"; + EntityCompactLayoutIcons["city"] = "City"; + EntityCompactLayoutIcons["class"] = "Class"; + EntityCompactLayoutIcons["classification"] = "Classification"; + EntityCompactLayoutIcons["clipboard"] = "Clipboard"; + EntityCompactLayoutIcons["clipboardDataBar"] = "ClipboardDataBar"; + EntityCompactLayoutIcons["clipboardPulse"] = "ClipboardPulse"; + EntityCompactLayoutIcons["clipboardTask"] = "ClipboardTask"; + EntityCompactLayoutIcons["clock"] = "Clock"; + EntityCompactLayoutIcons["clockAlarm"] = "ClockAlarm"; + EntityCompactLayoutIcons["cloud"] = "Cloud"; + EntityCompactLayoutIcons["cloudWords"] = "CloudWords"; + EntityCompactLayoutIcons["code"] = "Code"; + EntityCompactLayoutIcons["collections"] = "Collections"; + EntityCompactLayoutIcons["comment"] = "Comment"; + EntityCompactLayoutIcons["commentMultiple"] = "CommentMultiple"; + EntityCompactLayoutIcons["communication"] = "Communication"; + EntityCompactLayoutIcons["compassNorthwest"] = "CompassNorthwest"; + EntityCompactLayoutIcons["conferenceRoom"] = "ConferenceRoom"; + EntityCompactLayoutIcons["connector"] = "Connector"; + EntityCompactLayoutIcons["constellation"] = "Constellation"; + EntityCompactLayoutIcons["contactCard"] = "ContactCard"; + EntityCompactLayoutIcons["cookies"] = "Cookies"; + EntityCompactLayoutIcons["couch"] = "Couch"; + EntityCompactLayoutIcons["creditCardPerson"] = "CreditCardPerson"; + EntityCompactLayoutIcons["creditCardToolbox"] = "CreditCardToolbox"; + EntityCompactLayoutIcons["cube"] = "Cube"; + EntityCompactLayoutIcons["cubeMultiple"] = "CubeMultiple"; + EntityCompactLayoutIcons["cubeTree"] = "CubeTree"; + EntityCompactLayoutIcons["currencyDollarEuro"] = "CurrencyDollarEuro"; + EntityCompactLayoutIcons["currencyDollarRupee"] = "CurrencyDollarRupee"; + EntityCompactLayoutIcons["dataArea"] = "DataArea"; + EntityCompactLayoutIcons["database"] = "Database"; + EntityCompactLayoutIcons["databaseMultiple"] = "DatabaseMultiple"; + EntityCompactLayoutIcons["dataFunnel"] = "DataFunnel"; + EntityCompactLayoutIcons["dataHistogram"] = "DataHistogram"; + EntityCompactLayoutIcons["dataLine"] = "DataLine"; + EntityCompactLayoutIcons["dataPie"] = "DataPie"; + EntityCompactLayoutIcons["dataScatter"] = "DataScatter"; + EntityCompactLayoutIcons["dataSunburst"] = "DataSunburst"; + EntityCompactLayoutIcons["dataTreemap"] = "DataTreemap"; + EntityCompactLayoutIcons["dataWaterfall"] = "DataWaterfall"; + EntityCompactLayoutIcons["dataWhisker"] = "DataWhisker"; + EntityCompactLayoutIcons["dentist"] = "Dentist"; + EntityCompactLayoutIcons["designIdeas"] = "DesignIdeas"; + EntityCompactLayoutIcons["desktop"] = "Desktop"; + EntityCompactLayoutIcons["desktopMac"] = "DesktopMac"; + EntityCompactLayoutIcons["developerBoard"] = "DeveloperBoard"; + EntityCompactLayoutIcons["deviceMeetingRoom"] = "DeviceMeetingRoom"; + EntityCompactLayoutIcons["diagram"] = "Diagram"; + EntityCompactLayoutIcons["dialpad"] = "Dialpad"; + EntityCompactLayoutIcons["diamond"] = "Diamond"; + EntityCompactLayoutIcons["dinosaur"] = "Dinosaur"; + EntityCompactLayoutIcons["directions"] = "Directions"; + EntityCompactLayoutIcons["disaster"] = "Disaster"; + EntityCompactLayoutIcons["diversity"] = "Diversity"; + EntityCompactLayoutIcons["dNA"] = "DNA"; + EntityCompactLayoutIcons["doctor"] = "Doctor"; + EntityCompactLayoutIcons["document"] = "Document"; + EntityCompactLayoutIcons["documentData"] = "DocumentData"; + EntityCompactLayoutIcons["documentLandscape"] = "DocumentLandscape"; + EntityCompactLayoutIcons["documentMultiple"] = "DocumentMultiple"; + EntityCompactLayoutIcons["documentPdf"] = "DocumentPdf"; + EntityCompactLayoutIcons["documentQueue"] = "DocumentQueue"; + EntityCompactLayoutIcons["documentText"] = "DocumentText"; + EntityCompactLayoutIcons["dog"] = "Dog"; + EntityCompactLayoutIcons["door"] = "Door"; + EntityCompactLayoutIcons["doorTag"] = "DoorTag"; + EntityCompactLayoutIcons["drafts"] = "Drafts"; + EntityCompactLayoutIcons["drama"] = "Drama"; + EntityCompactLayoutIcons["drinkBeer"] = "DrinkBeer"; + EntityCompactLayoutIcons["drinkCoffee"] = "DrinkCoffee"; + EntityCompactLayoutIcons["drinkMargarita"] = "DrinkMargarita"; + EntityCompactLayoutIcons["drinkToGo"] = "DrinkToGo"; + EntityCompactLayoutIcons["drinkWine"] = "DrinkWine"; + EntityCompactLayoutIcons["driveTrain"] = "DriveTrain"; + EntityCompactLayoutIcons["drop"] = "Drop"; + EntityCompactLayoutIcons["dualScreen"] = "DualScreen"; + EntityCompactLayoutIcons["dumbbell"] = "Dumbbell"; + EntityCompactLayoutIcons["earth"] = "Earth"; + EntityCompactLayoutIcons["emoji"] = "Emoji"; + EntityCompactLayoutIcons["emojiAngry"] = "EmojiAngry"; + EntityCompactLayoutIcons["emojiHand"] = "EmojiHand"; + EntityCompactLayoutIcons["emojiLaugh"] = "EmojiLaugh"; + EntityCompactLayoutIcons["emojiMeh"] = "EmojiMeh"; + EntityCompactLayoutIcons["emojiMultiple"] = "EmojiMultiple"; + EntityCompactLayoutIcons["emojiSad"] = "EmojiSad"; + EntityCompactLayoutIcons["emojiSadSlight"] = "EmojiSadSlight"; + EntityCompactLayoutIcons["emojiSmileSlight"] = "EmojiSmileSlight"; + EntityCompactLayoutIcons["emojiSparkle"] = "EmojiSparkle"; + EntityCompactLayoutIcons["emojiSurprise"] = "EmojiSurprise"; + EntityCompactLayoutIcons["engine"] = "Engine"; + EntityCompactLayoutIcons["eraser"] = "Eraser"; + EntityCompactLayoutIcons["eye"] = "Eye"; + EntityCompactLayoutIcons["eyedropper"] = "Eyedropper"; + EntityCompactLayoutIcons["fax"] = "Fax"; + EntityCompactLayoutIcons["fingerprint"] = "Fingerprint"; + EntityCompactLayoutIcons["firstAid"] = "FirstAid"; + EntityCompactLayoutIcons["flag"] = "Flag"; + EntityCompactLayoutIcons["flash"] = "Flash"; + EntityCompactLayoutIcons["flashlight"] = "Flashlight"; + EntityCompactLayoutIcons["flow"] = "Flow"; + EntityCompactLayoutIcons["flowchart"] = "Flowchart"; + EntityCompactLayoutIcons["folder"] = "Folder"; + EntityCompactLayoutIcons["folderOpen"] = "FolderOpen"; + EntityCompactLayoutIcons["folderOpenVertical"] = "FolderOpenVertical"; + EntityCompactLayoutIcons["folderPerson"] = "FolderPerson"; + EntityCompactLayoutIcons["folderZip"] = "FolderZip"; + EntityCompactLayoutIcons["food"] = "Food"; + EntityCompactLayoutIcons["foodApple"] = "FoodApple"; + EntityCompactLayoutIcons["foodCake"] = "FoodCake"; + EntityCompactLayoutIcons["foodEgg"] = "FoodEgg"; + EntityCompactLayoutIcons["foodGrains"] = "FoodGrains"; + EntityCompactLayoutIcons["foodPizza"] = "FoodPizza"; + EntityCompactLayoutIcons["foodToast"] = "FoodToast"; + EntityCompactLayoutIcons["galaxy"] = "Galaxy"; + EntityCompactLayoutIcons["games"] = "Games"; + EntityCompactLayoutIcons["ganttChart"] = "GanttChart"; + EntityCompactLayoutIcons["gas"] = "Gas"; + EntityCompactLayoutIcons["gasPump"] = "GasPump"; + EntityCompactLayoutIcons["gauge"] = "Gauge"; + EntityCompactLayoutIcons["gavel"] = "Gavel"; + EntityCompactLayoutIcons["gift"] = "Gift"; + EntityCompactLayoutIcons["giftCard"] = "GiftCard"; + EntityCompactLayoutIcons["glasses"] = "Glasses"; + EntityCompactLayoutIcons["globe"] = "Globe"; + EntityCompactLayoutIcons["globeSurface"] = "GlobeSurface"; + EntityCompactLayoutIcons["grid"] = "Grid"; + EntityCompactLayoutIcons["gridDots"] = "GridDots"; + EntityCompactLayoutIcons["gridKanban"] = "GridKanban"; + EntityCompactLayoutIcons["guardian"] = "Guardian"; + EntityCompactLayoutIcons["guest"] = "Guest"; + EntityCompactLayoutIcons["guitar"] = "Guitar"; + EntityCompactLayoutIcons["handLeft"] = "HandLeft"; + EntityCompactLayoutIcons["handRight"] = "HandRight"; + EntityCompactLayoutIcons["handshake"] = "Handshake"; + EntityCompactLayoutIcons["hardDrive"] = "HardDrive"; + EntityCompactLayoutIcons["hatGraduation"] = "HatGraduation"; + EntityCompactLayoutIcons["headphones"] = "Headphones"; + EntityCompactLayoutIcons["headphonesSoundWave"] = "HeadphonesSoundWave"; + EntityCompactLayoutIcons["headset"] = "Headset"; + EntityCompactLayoutIcons["headsetVr"] = "HeadsetVr"; + EntityCompactLayoutIcons["heart"] = "Heart"; + EntityCompactLayoutIcons["heartBroken"] = "HeartBroken"; + EntityCompactLayoutIcons["heartCircle"] = "HeartCircle"; + EntityCompactLayoutIcons["heartHuman"] = "HeartHuman"; + EntityCompactLayoutIcons["heartPulse"] = "HeartPulse"; + EntityCompactLayoutIcons["history"] = "History"; + EntityCompactLayoutIcons["home"] = "Home"; + EntityCompactLayoutIcons["homeMore"] = "HomeMore"; + EntityCompactLayoutIcons["homePerson"] = "HomePerson"; + EntityCompactLayoutIcons["icons"] = "Icons"; + EntityCompactLayoutIcons["image"] = "Image"; + EntityCompactLayoutIcons["imageGlobe"] = "ImageGlobe"; + EntityCompactLayoutIcons["imageMultiple"] = "ImageMultiple"; + EntityCompactLayoutIcons["iot"] = "Iot"; + EntityCompactLayoutIcons["joystick"] = "Joystick"; + EntityCompactLayoutIcons["justice"] = "Justice"; + EntityCompactLayoutIcons["key"] = "Key"; + EntityCompactLayoutIcons["keyboard"] = "Keyboard"; + EntityCompactLayoutIcons["keyboardLayoutSplit"] = "KeyboardLayoutSplit"; + EntityCompactLayoutIcons["keyMultiple"] = "KeyMultiple"; + EntityCompactLayoutIcons["languages"] = "Languages"; + EntityCompactLayoutIcons["laptop"] = "Laptop"; + EntityCompactLayoutIcons["lasso"] = "Lasso"; + EntityCompactLayoutIcons["launcherSettings"] = "LauncherSettings"; + EntityCompactLayoutIcons["layer"] = "Layer"; + EntityCompactLayoutIcons["leaf"] = "Leaf"; + EntityCompactLayoutIcons["leafOne"] = "LeafOne"; + EntityCompactLayoutIcons["leafThree"] = "LeafThree"; + EntityCompactLayoutIcons["leafTwo"] = "LeafTwo"; + EntityCompactLayoutIcons["library"] = "Library"; + EntityCompactLayoutIcons["lightbulb"] = "Lightbulb"; + EntityCompactLayoutIcons["lightbulbFilament"] = "LightbulbFilament"; + EntityCompactLayoutIcons["likert"] = "Likert"; + EntityCompactLayoutIcons["link"] = "Link"; + EntityCompactLayoutIcons["localLanguage"] = "LocalLanguage"; + EntityCompactLayoutIcons["location"] = "Location"; + EntityCompactLayoutIcons["lockClosed"] = "LockClosed"; + EntityCompactLayoutIcons["lockMultiple"] = "LockMultiple"; + EntityCompactLayoutIcons["lockOpen"] = "LockOpen"; + EntityCompactLayoutIcons["lottery"] = "Lottery"; + EntityCompactLayoutIcons["luggage"] = "Luggage"; + EntityCompactLayoutIcons["mail"] = "Mail"; + EntityCompactLayoutIcons["mailInbox"] = "MailInbox"; + EntityCompactLayoutIcons["mailMultiple"] = "MailMultiple"; + EntityCompactLayoutIcons["map"] = "Map"; + EntityCompactLayoutIcons["mapPin"] = "MapPin"; + EntityCompactLayoutIcons["markdown"] = "Markdown"; + EntityCompactLayoutIcons["mathFormula"] = "MathFormula"; + EntityCompactLayoutIcons["mathSymbols"] = "MathSymbols"; + EntityCompactLayoutIcons["max"] = "Max"; + EntityCompactLayoutIcons["megaphone"] = "Megaphone"; + EntityCompactLayoutIcons["megaphoneLoud"] = "MegaphoneLoud"; + EntityCompactLayoutIcons["mention"] = "Mention"; + EntityCompactLayoutIcons["mic"] = "Mic"; + EntityCompactLayoutIcons["microscope"] = "Microscope"; + EntityCompactLayoutIcons["midi"] = "Midi"; + EntityCompactLayoutIcons["molecule"] = "Molecule"; + EntityCompactLayoutIcons["money"] = "Money"; + EntityCompactLayoutIcons["moneyHand"] = "MoneyHand"; + EntityCompactLayoutIcons["mountain"] = "Mountain"; + EntityCompactLayoutIcons["movieCamera"] = "MovieCamera"; + EntityCompactLayoutIcons["moviesAndTv"] = "MoviesAndTv"; + EntityCompactLayoutIcons["musicNote"] = "MusicNote"; + EntityCompactLayoutIcons["musicNote1"] = "MusicNote1"; + EntityCompactLayoutIcons["musicNote2"] = "MusicNote2"; + EntityCompactLayoutIcons["myLocation"] = "MyLocation"; + EntityCompactLayoutIcons["nByN"] = "NByN"; + EntityCompactLayoutIcons["nByOne"] = "NByOne"; + EntityCompactLayoutIcons["news"] = "News"; + EntityCompactLayoutIcons["notablePeople"] = "NotablePeople"; + EntityCompactLayoutIcons["note"] = "Note"; + EntityCompactLayoutIcons["notebook"] = "Notebook"; + EntityCompactLayoutIcons["notepad"] = "Notepad"; + EntityCompactLayoutIcons["notepadPerson"] = "NotepadPerson"; + EntityCompactLayoutIcons["oneByN"] = "OneByN"; + EntityCompactLayoutIcons["oneByOne"] = "OneByOne"; + EntityCompactLayoutIcons["options"] = "Options"; + EntityCompactLayoutIcons["organization"] = "Organization"; + EntityCompactLayoutIcons["organizationHorizontal"] = "OrganizationHorizontal"; + EntityCompactLayoutIcons["oval"] = "Oval"; + EntityCompactLayoutIcons["paintBrush"] = "PaintBrush"; + EntityCompactLayoutIcons["paintBucket"] = "PaintBucket"; + EntityCompactLayoutIcons["partlySunnyWeather"] = "PartlySunnyWeather"; + EntityCompactLayoutIcons["password"] = "Password"; + EntityCompactLayoutIcons["patch"] = "Patch"; + EntityCompactLayoutIcons["patient"] = "Patient"; + EntityCompactLayoutIcons["payment"] = "Payment"; + EntityCompactLayoutIcons["pen"] = "Pen"; + EntityCompactLayoutIcons["pentagon"] = "Pentagon"; + EntityCompactLayoutIcons["people"] = "People"; + EntityCompactLayoutIcons["peopleAudience"] = "PeopleAudience"; + EntityCompactLayoutIcons["peopleCall"] = "PeopleCall"; + EntityCompactLayoutIcons["peopleCommunity"] = "PeopleCommunity"; + EntityCompactLayoutIcons["peopleMoney"] = "PeopleMoney"; + EntityCompactLayoutIcons["peopleQueue"] = "PeopleQueue"; + EntityCompactLayoutIcons["peopleTeam"] = "PeopleTeam"; + EntityCompactLayoutIcons["peopleToolbox"] = "PeopleToolbox"; + EntityCompactLayoutIcons["person"] = "Person"; + EntityCompactLayoutIcons["personBoard"] = "PersonBoard"; + EntityCompactLayoutIcons["personCall"] = "PersonCall"; + EntityCompactLayoutIcons["personChat"] = "PersonChat"; + EntityCompactLayoutIcons["personFeedback"] = "PersonFeedback"; + EntityCompactLayoutIcons["personSupport"] = "PersonSupport"; + EntityCompactLayoutIcons["personVoice"] = "PersonVoice"; + EntityCompactLayoutIcons["phone"] = "Phone"; + EntityCompactLayoutIcons["phoneDesktop"] = "PhoneDesktop"; + EntityCompactLayoutIcons["phoneLaptop"] = "PhoneLaptop"; + EntityCompactLayoutIcons["phoneShake"] = "PhoneShake"; + EntityCompactLayoutIcons["phoneTablet"] = "PhoneTablet"; + EntityCompactLayoutIcons["phoneVibrate"] = "PhoneVibrate"; + EntityCompactLayoutIcons["photoFilter"] = "PhotoFilter"; + EntityCompactLayoutIcons["pi"] = "Pi"; + EntityCompactLayoutIcons["pictureInPicture"] = "PictureInPicture"; + EntityCompactLayoutIcons["pilates"] = "Pilates"; + EntityCompactLayoutIcons["pill"] = "Pill"; + EntityCompactLayoutIcons["pin"] = "Pin"; + EntityCompactLayoutIcons["pipeline"] = "Pipeline"; + EntityCompactLayoutIcons["planet"] = "Planet"; + EntityCompactLayoutIcons["playingCards"] = "PlayingCards"; + EntityCompactLayoutIcons["plugConnected"] = "PlugConnected"; + EntityCompactLayoutIcons["plugDisconnected"] = "PlugDisconnected"; + EntityCompactLayoutIcons["pointScan"] = "PointScan"; + EntityCompactLayoutIcons["poll"] = "Poll"; + EntityCompactLayoutIcons["power"] = "Power"; + EntityCompactLayoutIcons["predictions"] = "Predictions"; + EntityCompactLayoutIcons["premium"] = "Premium"; + EntityCompactLayoutIcons["presenter"] = "Presenter"; + EntityCompactLayoutIcons["previewLink"] = "PreviewLink"; + EntityCompactLayoutIcons["print"] = "Print"; + EntityCompactLayoutIcons["production"] = "Production"; + EntityCompactLayoutIcons["prohibited"] = "Prohibited"; + EntityCompactLayoutIcons["projectionScreen"] = "ProjectionScreen"; + EntityCompactLayoutIcons["protocolHandler"] = "ProtocolHandler"; + EntityCompactLayoutIcons["pulse"] = "Pulse"; + EntityCompactLayoutIcons["pulseSquare"] = "PulseSquare"; + EntityCompactLayoutIcons["puzzlePiece"] = "PuzzlePiece"; + EntityCompactLayoutIcons["qrCode"] = "QrCode"; + EntityCompactLayoutIcons["radar"] = "Radar"; + EntityCompactLayoutIcons["ram"] = "Ram"; + EntityCompactLayoutIcons["readingList"] = "ReadingList"; + EntityCompactLayoutIcons["realEstate"] = "RealEstate"; + EntityCompactLayoutIcons["receipt"] = "Receipt"; + EntityCompactLayoutIcons["reward"] = "Reward"; + EntityCompactLayoutIcons["rhombus"] = "Rhombus"; + EntityCompactLayoutIcons["ribbon"] = "Ribbon"; + EntityCompactLayoutIcons["ribbonStar"] = "RibbonStar"; + EntityCompactLayoutIcons["roadCone"] = "RoadCone"; + EntityCompactLayoutIcons["rocket"] = "Rocket"; + EntityCompactLayoutIcons["router"] = "Router"; + EntityCompactLayoutIcons["rss"] = "Rss"; + EntityCompactLayoutIcons["ruler"] = "Ruler"; + EntityCompactLayoutIcons["run"] = "Run"; + EntityCompactLayoutIcons["running"] = "Running"; + EntityCompactLayoutIcons["satellite"] = "Satellite"; + EntityCompactLayoutIcons["save"] = "Save"; + EntityCompactLayoutIcons["savings"] = "Savings"; + EntityCompactLayoutIcons["scales"] = "Scales"; + EntityCompactLayoutIcons["scan"] = "Scan"; + EntityCompactLayoutIcons["scratchpad"] = "Scratchpad"; + EntityCompactLayoutIcons["screenPerson"] = "ScreenPerson"; + EntityCompactLayoutIcons["screenshot"] = "Screenshot"; + EntityCompactLayoutIcons["search"] = "Search"; + EntityCompactLayoutIcons["serialPort"] = "SerialPort"; + EntityCompactLayoutIcons["server"] = "Server"; + EntityCompactLayoutIcons["serverMultiple"] = "ServerMultiple"; + EntityCompactLayoutIcons["serviceBell"] = "ServiceBell"; + EntityCompactLayoutIcons["settings"] = "Settings"; + EntityCompactLayoutIcons["shapes"] = "Shapes"; + EntityCompactLayoutIcons["shield"] = "Shield"; + EntityCompactLayoutIcons["shieldTask"] = "ShieldTask"; + EntityCompactLayoutIcons["shoppingBag"] = "ShoppingBag"; + EntityCompactLayoutIcons["signature"] = "Signature"; + EntityCompactLayoutIcons["sim"] = "Sim"; + EntityCompactLayoutIcons["sleep"] = "Sleep"; + EntityCompactLayoutIcons["smartwatch"] = "Smartwatch"; + EntityCompactLayoutIcons["soundSource"] = "SoundSource"; + EntityCompactLayoutIcons["soundWaveCircle"] = "SoundWaveCircle"; + EntityCompactLayoutIcons["sparkle"] = "Sparkle"; + EntityCompactLayoutIcons["speaker0"] = "Speaker0"; + EntityCompactLayoutIcons["speaker2"] = "Speaker2"; + EntityCompactLayoutIcons["sport"] = "Sport"; + EntityCompactLayoutIcons["sportAmericanFootball"] = "SportAmericanFootball"; + EntityCompactLayoutIcons["sportBaseball"] = "SportBaseball"; + EntityCompactLayoutIcons["sportBasketball"] = "SportBasketball"; + EntityCompactLayoutIcons["sportHockey"] = "SportHockey"; + EntityCompactLayoutIcons["sportSoccer"] = "SportSoccer"; + EntityCompactLayoutIcons["squareMultiple"] = "SquareMultiple"; + EntityCompactLayoutIcons["squareShadow"] = "SquareShadow"; + EntityCompactLayoutIcons["squaresNested"] = "SquaresNested"; + EntityCompactLayoutIcons["stack"] = "Stack"; + EntityCompactLayoutIcons["stackStar"] = "StackStar"; + EntityCompactLayoutIcons["star"] = "Star"; + EntityCompactLayoutIcons["starFilled"] = "StarFilled"; + EntityCompactLayoutIcons["starHalf"] = "StarHalf"; + EntityCompactLayoutIcons["starLineHorizontal3"] = "StarLineHorizontal3"; + EntityCompactLayoutIcons["starOneQuarter"] = "StarOneQuarter"; + EntityCompactLayoutIcons["starThreeQuarter"] = "StarThreeQuarter"; + EntityCompactLayoutIcons["status"] = "Status"; + EntityCompactLayoutIcons["steps"] = "Steps"; + EntityCompactLayoutIcons["stethoscope"] = "Stethoscope"; + EntityCompactLayoutIcons["sticker"] = "Sticker"; + EntityCompactLayoutIcons["storage"] = "Storage"; + EntityCompactLayoutIcons["stream"] = "Stream"; + EntityCompactLayoutIcons["streamInput"] = "StreamInput"; + EntityCompactLayoutIcons["streamInputOutput"] = "StreamInputOutput"; + EntityCompactLayoutIcons["streamOutput"] = "StreamOutput"; + EntityCompactLayoutIcons["styleGuide"] = "StyleGuide"; + EntityCompactLayoutIcons["subGrid"] = "SubGrid"; + EntityCompactLayoutIcons["subtitles"] = "Subtitles"; + EntityCompactLayoutIcons["surfaceEarbuds"] = "SurfaceEarbuds"; + EntityCompactLayoutIcons["surfaceHub"] = "SurfaceHub"; + EntityCompactLayoutIcons["symbols"] = "Symbols"; + EntityCompactLayoutIcons["syringe"] = "Syringe"; + EntityCompactLayoutIcons["system"] = "System"; + EntityCompactLayoutIcons["tabDesktop"] = "TabDesktop"; + EntityCompactLayoutIcons["tabInprivateAccount"] = "TabInprivateAccount"; + EntityCompactLayoutIcons["table"] = "Table"; + EntityCompactLayoutIcons["tableImage"] = "TableImage"; + EntityCompactLayoutIcons["tableMultiple"] = "TableMultiple"; + EntityCompactLayoutIcons["tablet"] = "Tablet"; + EntityCompactLayoutIcons["tabs"] = "Tabs"; + EntityCompactLayoutIcons["tag"] = "Tag"; + EntityCompactLayoutIcons["tagCircle"] = "TagCircle"; + EntityCompactLayoutIcons["tagMultiple"] = "TagMultiple"; + EntityCompactLayoutIcons["target"] = "Target"; + EntityCompactLayoutIcons["targetArrow"] = "TargetArrow"; + EntityCompactLayoutIcons["teddy"] = "Teddy"; + EntityCompactLayoutIcons["temperature"] = "Temperature"; + EntityCompactLayoutIcons["tent"] = "Tent"; + EntityCompactLayoutIcons["tetrisApp"] = "TetrisApp"; + EntityCompactLayoutIcons["textbox"] = "Textbox"; + EntityCompactLayoutIcons["textQuote"] = "TextQuote"; + EntityCompactLayoutIcons["thinking"] = "Thinking"; + EntityCompactLayoutIcons["thumbDislike"] = "ThumbDislike"; + EntityCompactLayoutIcons["thumbLike"] = "ThumbLike"; + EntityCompactLayoutIcons["ticketDiagonal"] = "TicketDiagonal"; + EntityCompactLayoutIcons["ticketHorizontal"] = "TicketHorizontal"; + EntityCompactLayoutIcons["timeAndWeather"] = "TimeAndWeather"; + EntityCompactLayoutIcons["timeline"] = "Timeline"; + EntityCompactLayoutIcons["timer"] = "Timer"; + EntityCompactLayoutIcons["toolbox"] = "Toolbox"; + EntityCompactLayoutIcons["topSpeed"] = "TopSpeed"; + EntityCompactLayoutIcons["translate"] = "Translate"; + EntityCompactLayoutIcons["transmission"] = "Transmission"; + EntityCompactLayoutIcons["treeDeciduous"] = "TreeDeciduous"; + EntityCompactLayoutIcons["treeEvergreen"] = "TreeEvergreen"; + EntityCompactLayoutIcons["trophy"] = "Trophy"; + EntityCompactLayoutIcons["tv"] = "Tv"; + EntityCompactLayoutIcons["tvUsb"] = "TvUsb"; + EntityCompactLayoutIcons["umbrella"] = "Umbrella"; + EntityCompactLayoutIcons["usbPlug"] = "UsbPlug"; + EntityCompactLayoutIcons["usbStick"] = "UsbStick"; + EntityCompactLayoutIcons["vault"] = "Vault"; + EntityCompactLayoutIcons["vehicleBicycle"] = "VehicleBicycle"; + EntityCompactLayoutIcons["vehicleBus"] = "VehicleBus"; + EntityCompactLayoutIcons["vehicleCab"] = "VehicleCab"; + EntityCompactLayoutIcons["vehicleCar"] = "VehicleCar"; + EntityCompactLayoutIcons["vehicleCarCollision"] = "VehicleCarCollision"; + EntityCompactLayoutIcons["vehicleCarProfileLtr"] = "VehicleCarProfileLtr"; + EntityCompactLayoutIcons["vehicleCarProfileRtl"] = "VehicleCarProfileRtl"; + EntityCompactLayoutIcons["vehicleShip"] = "VehicleShip"; + EntityCompactLayoutIcons["vehicleSubway"] = "VehicleSubway"; + EntityCompactLayoutIcons["vehicleTruck"] = "VehicleTruck"; + EntityCompactLayoutIcons["vehicleTruckBag"] = "VehicleTruckBag"; + EntityCompactLayoutIcons["vehicleTruckCube"] = "VehicleTruckCube"; + EntityCompactLayoutIcons["vehicleTruckProfile"] = "VehicleTruckProfile"; + EntityCompactLayoutIcons["video"] = "Video"; + EntityCompactLayoutIcons["video360"] = "Video360"; + EntityCompactLayoutIcons["videoChat"] = "VideoChat"; + EntityCompactLayoutIcons["videoClip"] = "VideoClip"; + EntityCompactLayoutIcons["videoClipMultiple"] = "VideoClipMultiple"; + EntityCompactLayoutIcons["videoPerson"] = "VideoPerson"; + EntityCompactLayoutIcons["videoRecording"] = "VideoRecording"; + EntityCompactLayoutIcons["videoSecurity"] = "VideoSecurity"; + EntityCompactLayoutIcons["viewDesktop"] = "ViewDesktop"; + EntityCompactLayoutIcons["viewDesktopMobile"] = "ViewDesktopMobile"; + EntityCompactLayoutIcons["violin"] = "Violin"; + EntityCompactLayoutIcons["virtualNetwork"] = "VirtualNetwork"; + EntityCompactLayoutIcons["voicemail"] = "Voicemail"; + EntityCompactLayoutIcons["vote"] = "Vote"; + EntityCompactLayoutIcons["walkieTalkie"] = "WalkieTalkie"; + EntityCompactLayoutIcons["wallet"] = "Wallet"; + EntityCompactLayoutIcons["walletCreditCard"] = "WalletCreditCard"; + EntityCompactLayoutIcons["wallpaper"] = "Wallpaper"; + EntityCompactLayoutIcons["wand"] = "Wand"; + EntityCompactLayoutIcons["warning"] = "Warning"; + EntityCompactLayoutIcons["weatherBlowingSnow"] = "WeatherBlowingSnow"; + EntityCompactLayoutIcons["weatherCloudy"] = "WeatherCloudy"; + EntityCompactLayoutIcons["weatherDrizzle"] = "WeatherDrizzle"; + EntityCompactLayoutIcons["weatherDuststorm"] = "WeatherDuststorm"; + EntityCompactLayoutIcons["weatherFog"] = "WeatherFog"; + EntityCompactLayoutIcons["weatherHailDay"] = "WeatherHailDay"; + EntityCompactLayoutIcons["weatherHailNight"] = "WeatherHailNight"; + EntityCompactLayoutIcons["weatherHaze"] = "WeatherHaze"; + EntityCompactLayoutIcons["weatherMoon"] = "WeatherMoon"; + EntityCompactLayoutIcons["weatherPartlyCloudyDay"] = "WeatherPartlyCloudyDay"; + EntityCompactLayoutIcons["weatherPartlyCloudyNight"] = "WeatherPartlyCloudyNight"; + EntityCompactLayoutIcons["weatherRain"] = "WeatherRain"; + EntityCompactLayoutIcons["weatherRainShowersDay"] = "WeatherRainShowersDay"; + EntityCompactLayoutIcons["weatherRainShowersNight"] = "WeatherRainShowersNight"; + EntityCompactLayoutIcons["weatherRainSnow"] = "WeatherRainSnow"; + EntityCompactLayoutIcons["weatherSnow"] = "WeatherSnow"; + EntityCompactLayoutIcons["weatherSnowflake"] = "WeatherSnowflake"; + EntityCompactLayoutIcons["weatherSnowShowerDay"] = "WeatherSnowShowerDay"; + EntityCompactLayoutIcons["weatherSnowShowerNight"] = "WeatherSnowShowerNight"; + EntityCompactLayoutIcons["weatherSqualls"] = "WeatherSqualls"; + EntityCompactLayoutIcons["weatherSunnyHigh"] = "WeatherSunnyHigh"; + EntityCompactLayoutIcons["weatherSunnyLow"] = "WeatherSunnyLow"; + EntityCompactLayoutIcons["weatherThunderstorm"] = "WeatherThunderstorm"; + EntityCompactLayoutIcons["webAsset"] = "WebAsset"; + EntityCompactLayoutIcons["whiteboard"] = "Whiteboard"; + EntityCompactLayoutIcons["wifi1"] = "Wifi1"; + EntityCompactLayoutIcons["wifi2"] = "Wifi2"; + EntityCompactLayoutIcons["window"] = "Window"; + EntityCompactLayoutIcons["windowMultiple"] = "WindowMultiple"; + EntityCompactLayoutIcons["windowWrench"] = "WindowWrench"; + EntityCompactLayoutIcons["wrench"] = "Wrench"; + EntityCompactLayoutIcons["wrenchScrewdriver"] = "WrenchScrewdriver"; + EntityCompactLayoutIcons["xray"] = "Xray"; + EntityCompactLayoutIcons["yoga"] = "Yoga"; + })(EntityCompactLayoutIcons = Excel.EntityCompactLayoutIcons || (Excel.EntityCompactLayoutIcons = {})); + var ReferenceValueType; + (function (ReferenceValueType) { + ReferenceValueType["array"] = "Array"; + ReferenceValueType["entity"] = "Entity"; + ReferenceValueType["root"] = "Root"; + })(ReferenceValueType = Excel.ReferenceValueType || (Excel.ReferenceValueType = {})); + var CellValueType; + (function (CellValueType) { + CellValueType["array"] = "Array"; + CellValueType["boolean"] = "Boolean"; + CellValueType["double"] = "Double"; + CellValueType["entity"] = "Entity"; + CellValueType["empty"] = "Empty"; + CellValueType["error"] = "Error"; + CellValueType["formattedNumber"] = "FormattedNumber"; + CellValueType["linkedEntity"] = "LinkedEntity"; + CellValueType["localImage"] = "LocalImage"; + CellValueType["reference"] = "Reference"; + CellValueType["string"] = "String"; + CellValueType["notAvailable"] = "NotAvailable"; + CellValueType["webImage"] = "WebImage"; + })(CellValueType = Excel.CellValueType || (Excel.CellValueType = {})); + var ConnectErrorCellValueSubType; + (function (ConnectErrorCellValueSubType) { + ConnectErrorCellValueSubType["unknown"] = "Unknown"; + ConnectErrorCellValueSubType["serviceError"] = "ServiceError"; + ConnectErrorCellValueSubType["externalLinks"] = "ExternalLinks"; + ConnectErrorCellValueSubType["externalLinksNonCloudLocation"] = "ExternalLinksNonCloudLocation"; + ConnectErrorCellValueSubType["dataTypeNoConnection"] = "DataTypeNoConnection"; + ConnectErrorCellValueSubType["dataTypeServiceError"] = "DataTypeServiceError"; + ConnectErrorCellValueSubType["missingContent"] = "MissingContent"; + ConnectErrorCellValueSubType["requestThrottle"] = "RequestThrottle"; + ConnectErrorCellValueSubType["externalLinksFailedToRefresh"] = "ExternalLinksFailedToRefresh"; + ConnectErrorCellValueSubType["externalLinksAccessFailed"] = "ExternalLinksAccessFailed"; + ConnectErrorCellValueSubType["externalLinksServerError"] = "ExternalLinksServerError"; + ConnectErrorCellValueSubType["externalLinksInvalidRequest"] = "ExternalLinksInvalidRequest"; + ConnectErrorCellValueSubType["externalLinksUnAuthenticated"] = "ExternalLinksUnAuthenticated"; + ConnectErrorCellValueSubType["externalLinksThrottledByHost"] = "ExternalLinksThrottledByHost"; + ConnectErrorCellValueSubType["externalLinksFileTooLarge"] = "ExternalLinksFileTooLarge"; + ConnectErrorCellValueSubType["outdatedLinkedEntity"] = "OutdatedLinkedEntity"; + ConnectErrorCellValueSubType["genericServerError"] = "GenericServerError"; + })(ConnectErrorCellValueSubType = Excel.ConnectErrorCellValueSubType || (Excel.ConnectErrorCellValueSubType = {})); + var ErrorCellValueType; + (function (ErrorCellValueType) { + ErrorCellValueType["blocked"] = "Blocked"; + ErrorCellValueType["busy"] = "Busy"; + ErrorCellValueType["calc"] = "Calc"; + ErrorCellValueType["connect"] = "Connect"; + ErrorCellValueType["div0"] = "Div0"; + ErrorCellValueType["external"] = "External"; + ErrorCellValueType["field"] = "Field"; + ErrorCellValueType["gettingData"] = "GettingData"; + ErrorCellValueType["notAvailable"] = "NotAvailable"; + ErrorCellValueType["name"] = "Name"; + ErrorCellValueType["null"] = "Null"; + ErrorCellValueType["num"] = "Num"; + ErrorCellValueType["placeholder"] = "Placeholder"; + ErrorCellValueType["ref"] = "Ref"; + ErrorCellValueType["spill"] = "Spill"; + ErrorCellValueType["value"] = "Value"; + })(ErrorCellValueType = Excel.ErrorCellValueType || (Excel.ErrorCellValueType = {})); + var ExternalErrorCellValueSubType; + (function (ExternalErrorCellValueSubType) { + ExternalErrorCellValueSubType["unknown"] = "Unknown"; + })(ExternalErrorCellValueSubType = Excel.ExternalErrorCellValueSubType || (Excel.ExternalErrorCellValueSubType = {})); + var FieldErrorCellValueSubType; + (function (FieldErrorCellValueSubType) { + FieldErrorCellValueSubType["unknown"] = "Unknown"; + FieldErrorCellValueSubType["webImageMissingFilePart"] = "WebImageMissingFilePart"; + FieldErrorCellValueSubType["dataProviderError"] = "DataProviderError"; + FieldErrorCellValueSubType["richValueRelMissingFilePart"] = "RichValueRelMissingFilePart"; + })(FieldErrorCellValueSubType = Excel.FieldErrorCellValueSubType || (Excel.FieldErrorCellValueSubType = {})); + var NumErrorCellValueSubType; + (function (NumErrorCellValueSubType) { + NumErrorCellValueSubType["unknown"] = "Unknown"; + NumErrorCellValueSubType["arrayTooLarge"] = "ArrayTooLarge"; + })(NumErrorCellValueSubType = Excel.NumErrorCellValueSubType || (Excel.NumErrorCellValueSubType = {})); + var RefErrorCellValueSubType; + (function (RefErrorCellValueSubType) { + RefErrorCellValueSubType["unknown"] = "Unknown"; + RefErrorCellValueSubType["externalLinksStructuredRef"] = "ExternalLinksStructuredRef"; + RefErrorCellValueSubType["externalLinksCalculatedRef"] = "ExternalLinksCalculatedRef"; + })(RefErrorCellValueSubType = Excel.RefErrorCellValueSubType || (Excel.RefErrorCellValueSubType = {})); + var SpillErrorCellValueSubType; + (function (SpillErrorCellValueSubType) { + SpillErrorCellValueSubType["unknown"] = "Unknown"; + SpillErrorCellValueSubType["collision"] = "Collision"; + SpillErrorCellValueSubType["indeterminateSize"] = "IndeterminateSize"; + SpillErrorCellValueSubType["worksheetEdge"] = "WorksheetEdge"; + SpillErrorCellValueSubType["outOfMemoryWhileCalc"] = "OutOfMemoryWhileCalc"; + SpillErrorCellValueSubType["table"] = "Table"; + SpillErrorCellValueSubType["mergedCell"] = "MergedCell"; + })(SpillErrorCellValueSubType = Excel.SpillErrorCellValueSubType || (Excel.SpillErrorCellValueSubType = {})); + var ValueErrorCellValueSubType; + (function (ValueErrorCellValueSubType) { + ValueErrorCellValueSubType["unknown"] = "Unknown"; + ValueErrorCellValueSubType["vlookupColumnIndexLessThanOne"] = "VlookupColumnIndexLessThanOne"; + ValueErrorCellValueSubType["vlookupResultNotFound"] = "VlookupResultNotFound"; + ValueErrorCellValueSubType["hlookupRowIndexLessThanOne"] = "HlookupRowIndexLessThanOne"; + ValueErrorCellValueSubType["hlookupResultNotFound"] = "HlookupResultNotFound"; + ValueErrorCellValueSubType["coerceStringToNumberInvalid"] = "CoerceStringToNumberInvalid"; + ValueErrorCellValueSubType["coerceStringToBoolInvalid"] = "CoerceStringToBoolInvalid"; + ValueErrorCellValueSubType["coerceStringToInvalidType"] = "CoerceStringToInvalidType"; + ValueErrorCellValueSubType["subArrayStartRowMissingEndRowNot"] = "SubArrayStartRowMissingEndRowNot"; + ValueErrorCellValueSubType["subArrayStartColumnMissingEndColumnNot"] = "SubArrayStartColumnMissingEndColumnNot"; + ValueErrorCellValueSubType["invalidImageUrl"] = "InvalidImageUrl"; + ValueErrorCellValueSubType["stockHistoryNonTradingDays"] = "StockHistoryNonTradingDays"; + ValueErrorCellValueSubType["stockHistoryNotAStock"] = "StockHistoryNotAStock"; + ValueErrorCellValueSubType["stockHistoryInvalidDate"] = "StockHistoryInvalidDate"; + ValueErrorCellValueSubType["stockHistoryEndBeforeStart"] = "StockHistoryEndBeforeStart"; + ValueErrorCellValueSubType["stockHistoryStartInFuture"] = "StockHistoryStartInFuture"; + ValueErrorCellValueSubType["stockHistoryInvalidEnum"] = "StockHistoryInvalidEnum"; + ValueErrorCellValueSubType["stockHistoryOnlyDateRequested"] = "StockHistoryOnlyDateRequested"; + ValueErrorCellValueSubType["stockHistoryNotFound"] = "StockHistoryNotFound"; + ValueErrorCellValueSubType["lambdaWrongParamCount"] = "LambdaWrongParamCount"; + })(ValueErrorCellValueSubType = Excel.ValueErrorCellValueSubType || (Excel.ValueErrorCellValueSubType = {})); + function _runOnRegularOrWacContext(options, callback) { + var context = isOfficePlatform("OfficeOnline") + ? new WacSpecificRequestContext() + : new RequestContext(); + onBeforeExcelRun(options, context); + return OfficeExtension.CoreUtility.Promise.resolve() + .then(function () { return callback(context); }) + .then(context.sync); + } + var WacSpecificRequestContext = (function (_super) { + __extends(WacSpecificRequestContext, _super); + function WacSpecificRequestContext(url) { + var _this = _super.call(this, url) || this; + _this._customData = "WacPartition"; + _this.m_wacWorkbook = _createRootServiceObject(WacWorkbook, _this); + _this._rootObject = _this.m_wacWorkbook; + _this._rootObjectPropertyName = "wacWorkbook"; + return _this; + } + Object.defineProperty(WacSpecificRequestContext.prototype, "wacWorkbook", { + get: function () { + return this.m_wacWorkbook; + }, + enumerable: true, + configurable: true + }); + return WacSpecificRequestContext; + }(OfficeCore.RequestContext)); + var WacWorkbook = (function (_super) { + __extends(WacWorkbook, _super); + function WacWorkbook() { + return _super !== null && _super.apply(this, arguments) || this; + } + WacWorkbook.prototype.createAndOpenWorkbook = function (base64) { + _invokeMethod(this, "CreateAndOpenWorkbook", 0, [base64], 0, 0); + }; + return WacWorkbook; + }(OfficeExtension.ClientObject)); + function createWorkbook(base64) { + _throwIfApiNotSupported("Excel.createWorkbook", _defaultApiSetName, "1.8", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + if (context instanceof WacSpecificRequestContext) { + context.wacWorkbook.createAndOpenWorkbook(base64); + } + else { + context.workbook.application.createWorkbook(base64).open(); + } + }); + } + Excel.createWorkbook = createWorkbook; + function lowerCaseFirst(str) { + return str[0].toLowerCase() + str.slice(1); + } + var iconSets = ["ThreeArrows", + "ThreeArrowsGray", + "ThreeFlags", + "ThreeTrafficLights1", + "ThreeTrafficLights2", + "ThreeSigns", + "ThreeSymbols", + "ThreeSymbols2", + "FourArrows", + "FourArrowsGray", + "FourRedToBlack", + "FourRating", + "FourTrafficLights", + "FiveArrows", + "FiveArrowsGray", + "FiveRating", + "FiveQuarters", + "ThreeStars", + "ThreeTriangles", + "FiveBoxes"]; + var iconNames = [["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], + ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], + ["RedFlag", "YellowFlag", "GreenFlag"], + ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], + ["RedDiamond", "YellowTriangle", "GreenCircle"], + ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], + ["RedCross", "YellowExclamation", "GreenCheck"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], + ["OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], + ["SilverStar", "HalfGoldStar", "GoldStar"], + ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], + ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; + Excel.icons = {}; + iconSets.map(function (title, i) { + var camelTitle = lowerCaseFirst(title); + Excel.icons[camelTitle] = []; + iconNames[i].map(function (iconName, j) { + iconName = lowerCaseFirst(iconName); + var obj = { set: title, index: j }; + Excel.icons[camelTitle].push(obj); + Excel.icons[camelTitle][iconName] = obj; + }); + }); + function setRangePropertiesInBulk(range, propertyName, values, apiFlags) { + var maxCellCount = 1500; + if (Array.isArray(values) && values.length > 0 && Array.isArray(values[0]) && (values.length * values[0].length > maxCellCount) && isExcel1_3OrAbove()) { + var maxRowCount = Math.max(1, Math.round(maxCellCount / values[0].length)); + range._ValidateArraySize(values.length, values[0].length); + for (var startRowIndex = 0; startRowIndex < values.length; startRowIndex += maxRowCount) { + var rowCount = maxRowCount; + if (startRowIndex + rowCount > values.length) { + rowCount = values.length - startRowIndex; + } + var chunk = range.getRow(startRowIndex).untrack().getBoundingRect(range.getRow(startRowIndex + rowCount - 1).untrack()).untrack(); + var valueSlice = values.slice(startRowIndex, startRowIndex + rowCount); + _invokeSetProperty(chunk, propertyName, valueSlice, apiFlags != null ? apiFlags : 0); + } + return true; + } + return false; + } + function isExcelApiSetSupported(version) { + return OfficeExtension.Utility.isSetSupported("ExcelApi", version.toString()); + } + function isExcel1_3OrAbove() { + return isExcelApiSetSupported(1.3); + } + function isOfficePlatform(platform) { + if (typeof (window) !== "undefined" && window.Office && window.Office.context) { + return window.Office.context.platform === platform; + } + return false; + } + var OperationStatus; + (function (OperationStatus) { + OperationStatus["NotStarted"] = "notStarted"; + OperationStatus["Running"] = "running"; + OperationStatus["Succeeded"] = "succeeded"; + OperationStatus["Failed"] = "failed"; + })(OperationStatus || (OperationStatus = {})); + var HttpStatusCode; + (function (HttpStatusCode) { + HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK"; + HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created"; + HttpStatusCode[HttpStatusCode["Accepted"] = 202] = "Accepted"; + HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent"; + HttpStatusCode[HttpStatusCode["HighestSuccessCode"] = 299] = "HighestSuccessCode"; + HttpStatusCode[HttpStatusCode["TooManyRequests"] = 429] = "TooManyRequests"; + HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError"; + HttpStatusCode[HttpStatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpStatusCode || (HttpStatusCode = {})); + var SessionOperation; + (function (SessionOperation) { + SessionOperation["Close"] = "Session.close"; + SessionOperation["CommitChanges"] = "Session.commitChanges"; + SessionOperation["Create"] = "Session.resolveRequestUrlAndHeaderInfo"; + SessionOperation["Refresh"] = "Session.refreshSession"; + })(SessionOperation = Excel.SessionOperation || (Excel.SessionOperation = {})); + var Session = (function () { + function Session(workbookUrl, requestHeaders, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.persistChanges, persistChanges = _c === void 0 ? true : _c, _d = _b.commitExplicitly, commitExplicitly = _d === void 0 ? true : _d; + this.m_requestId = ''; + this.m_workbookUrl = !workbookUrl ? '' : this.ensureUrlFormatEndWithSlash(workbookUrl); + this.m_requestHeaders = !requestHeaders ? {} : requestHeaders; + this.m_persistChanges = persistChanges; + this.m_commitExplicitly = commitExplicitly; + } + Object.defineProperty(Session.prototype, "requestId", { + get: function () { + return this.m_requestId; + }, + enumerable: true, + configurable: true + }); + Session.prototype.close = function () { + var _this = this; + if (this.m_requestUrlAndHeaderInfo && + !OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + var url = this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url) + Session.CLOSE_SESSION; + var req = { + method: 'POST', + url: url, + headers: this.m_requestUrlAndHeaderInfo.headers, + body: '', + }; + return OfficeExtension.HttpUtility.sendRequest(req).then(function (resp) { + if (resp.statusCode !== HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(resp, SessionOperation.Close); + } + _this.m_requestUrlAndHeaderInfo = null; + for (var key in _this.m_requestHeaders) { + if (key.toLowerCase() === Session.WorkbookSessionIdHeaderNameLower) { + delete _this.m_requestHeaders[key]; + break; + } + } + }); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + Session.prototype.commitChanges = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { additionalRequestHeaders = {}; } + if (!this.m_commitExplicitly) { + throw this.createError(HttpStatusCode.InternalServerError, 'Can not call commitChanges() if commitExplicitly is not set.', SessionOperation.CommitChanges); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.CommitChanges); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.CommitChanges); + } + var commitChangesRequestInfo = this.createCommitChangesRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(commitChangesRequestInfo).then(function (commitChangesResponseInfo) { + var statusCode = commitChangesResponseInfo.statusCode; + if (statusCode === HttpStatusCode.Accepted) { + return _this.delay(Session.POLL_DELAY) + .then(function (_) { + return _this.pollResourceLocation(_this.getHeaderIgnoreCase(commitChangesResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.CommitChanges, additionalRequestHeaders); + }) + .then(function (commitChangesResourceLocationResponseInfo) { + var operationStatusBody = JSON.parse(commitChangesResourceLocationResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(commitChangesResourceLocationResponseInfo, SessionOperation.CommitChanges); + } + return _this.parseCooldownTime(commitChangesResourceLocationResponseInfo); + }); + } + if (statusCode >= HttpStatusCode.OK && statusCode <= HttpStatusCode.HighestSuccessCode) { + return _this.parseCooldownTime(commitChangesResponseInfo); + } + throw _this.createErrorFromResponseInfo(commitChangesResponseInfo, SessionOperation.CommitChanges); + }); + }; + Session.prototype._resolveRequestUrlAndHeaderInfo = function (additionalRequestHeaders) { + var _this = this; + if (additionalRequestHeaders === void 0) { additionalRequestHeaders = {}; } + if (this.m_requestUrlAndHeaderInfo) { + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (this.getHeaderIgnoreCase(this.m_requestHeaders, Session.WorkbookSessionIdHeaderNameLower)) { + this.m_requestUrlAndHeaderInfo = { url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + var sessionRequestInfo = this.createAsyncGraphSessionRequestInfo(additionalRequestHeaders); + return OfficeExtension.HttpUtility.sendRequest(sessionRequestInfo).then(function (sessionResponseInfo) { + _this.m_requestId = _this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.REQUEST_ID_HEADER); + if (sessionResponseInfo.statusCode !== HttpStatusCode.Accepted && + sessionResponseInfo.statusCode !== HttpStatusCode.Created) { + throw _this.createErrorFromResponseInfo(sessionResponseInfo, SessionOperation.Create); + } + if (sessionResponseInfo.statusCode === HttpStatusCode.Created) { + _this.formatRequestUrlAndHeaderInfo(sessionResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + } + return _this.delay(Session.POLL_DELAY) + .then(function (_) { return _this.pollResourceLocation(_this.getHeaderIgnoreCase(sessionResponseInfo.headers, Session.LOCATION_HEADER), SessionOperation.Create, additionalRequestHeaders); }) + .then(function (operationStatusResponseInfo) { + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + if (operationStatusBody.status === OperationStatus.Failed) { + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, SessionOperation.Create); + } + var sessionResourceLocationRequestInfo = { + method: 'GET', + url: operationStatusBody.resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: _this.getHeaderIgnoreCase(_this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined, + }; + return OfficeExtension.HttpUtility.sendRequest(sessionResourceLocationRequestInfo).then(function (sessionResourceLocationResponseInfo) { + _this.formatRequestUrlAndHeaderInfo(sessionResourceLocationResponseInfo); + return _this.m_requestUrlAndHeaderInfo; + }); + }); + }); + }; + Session.prototype.refreshSession = function () { + var _this = this; + if (!this.m_workbookUrl || OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + throw this.createError(HttpStatusCode.InternalServerError, 'Not supported for local documents.', SessionOperation.Refresh); + } + if (!this.m_requestUrlAndHeaderInfo) { + throw this.createError(HttpStatusCode.InternalServerError, 'Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.', SessionOperation.Refresh); + } + var refreshSessionRequestInfo = this.createRefreshSessionRequestInfo(); + return OfficeExtension.HttpUtility.sendRequest(refreshSessionRequestInfo).then(function (refreshSessionResponseInfo) { + var statusCode = refreshSessionResponseInfo.statusCode; + if (statusCode != HttpStatusCode.NoContent) { + throw _this.createErrorFromResponseInfo(refreshSessionResponseInfo, SessionOperation.Refresh); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + }; + Session.prototype.getHeaderIgnoreCase = function (headers, headerName) { + var foundHeaders = Object.keys(headers).filter(function (key) { return key.toLowerCase() === headerName.toLowerCase(); }); + return foundHeaders.length > 0 ? headers[foundHeaders[0]] : undefined; + }; + Session.prototype.createCommitChangesRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { additionalRequestHeaders = {}; } + var url = this.getCorrectGraphVersionUrl() + Session.COMMIT_CHANGES; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {} + }; + }; + Session.prototype.createAsyncGraphSessionRequestInfo = function (additionalRequestHeaders) { + if (additionalRequestHeaders === void 0) { additionalRequestHeaders = {}; } + var url = this.getCorrectGraphVersionUrl() + Session.CREATE_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + OfficeExtension.Utility._copyHeaders(additionalRequestHeaders, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + headers[Session.PREFER_HEADER] = Session.PREFER_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: { persistChanges: this.m_persistChanges, commitExplicitly: this.m_commitExplicitly }, + }; + }; + Session.prototype.createRefreshSessionRequestInfo = function () { + var url = this.getCorrectGraphVersionUrl() + Session.REFRESH_SESSION; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + headers[Session.CONTENT_TYPE_HEADER] = Session.CONTENT_TYPE_HEADER_VAL; + return { + url: url, + method: 'POST', + headers: headers, + body: {}, + }; + }; + Session.prototype.getCorrectGraphVersionUrl = function () { + return this.m_workbookUrl.replace(new RegExp('graph\.microsoft\.com\/.*?\/'), "graph.microsoft.com/" + Session.ASYNC_API_GRAPH_VERSION + "/"); + }; + Session.prototype.pollResourceLocation = function (resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt) { + var _this = this; + if (additionalRequestHeaders === void 0) { additionalRequestHeaders = {}; } + if (pollAttempt === void 0) { pollAttempt = 0; } + if (pollAttempt >= Session.MAX_POLL_ATTEMPTS) { + throw this.createError(HttpStatusCode.InternalServerError, 'Timout while polling for the resource location.', sessionOperation); + } + var operationStatusRequestInfo = { + method: 'GET', + url: resourceLocation, + headers: __assign({}, additionalRequestHeaders, { Authorization: this.getHeaderIgnoreCase(this.m_requestHeaders, Session.AUTHORIZATION_HEADER) }), + body: undefined, + }; + return OfficeExtension.HttpUtility.sendRequest(operationStatusRequestInfo).then(function (operationStatusResponseInfo) { + if (operationStatusResponseInfo.statusCode !== HttpStatusCode.OK) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + } + var operationStatusBody = JSON.parse(operationStatusResponseInfo.body); + switch (operationStatusBody.status) { + case OperationStatus.Succeeded: + return operationStatusResponseInfo; + case OperationStatus.Failed: + return operationStatusResponseInfo; + case OperationStatus.NotStarted: + case OperationStatus.Running: + return _this.delay(Session.POLL_DELAY).then(function (_) { + return _this.pollResourceLocation(resourceLocation, sessionOperation, additionalRequestHeaders, pollAttempt + 1); + }); + default: + throw _this.createErrorFromResponseInfo(operationStatusResponseInfo, sessionOperation); + } + }); + }; + Session.prototype.parseCooldownTime = function (responseInfo) { + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + return !retryAfter + ? Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER + : parseInt(retryAfter) * 1000; + }; + Session.prototype.formatRequestUrlAndHeaderInfo = function (responseInfo) { + if (responseInfo.statusCode !== HttpStatusCode.OK && responseInfo.statusCode !== HttpStatusCode.Created) { + throw this.createErrorFromResponseInfo(responseInfo, SessionOperation.Create); + } + var session = JSON.parse(responseInfo.body); + var sessionId = session.id; + var headers = {}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + headers[Session.WorkbookSessionIdHeaderName] = sessionId; + this.m_requestUrlAndHeaderInfo = { url: this.getCorrectGraphVersionUrl(), headers: headers }; + }; + Session.prototype.ensureUrlFormatEndWithSlash = function (url) { + if (url.charAt(url.length - 1) !== '/') { + url += '/'; + } + return url; + }; + Session.prototype.delay = function (milliseconds) { + return new OfficeExtension.CoreUtility.Promise(function (res, _) { return setTimeout(function () { return res(); }, milliseconds); }); + }; + Session.prototype.createErrorFromResponseInfo = function (responseInfo, locationThrown) { + var err = OfficeExtension.Utility._parseErrorResponse(responseInfo); + var retryAfter = this.getHeaderIgnoreCase(responseInfo.headers, Session.RETRY_AFTER_HEADER); + var data = { + retryAfter: retryAfter, + responseBody: OfficeExtension.Utility._parseErrorResponseBody(responseInfo), + }; + return OfficeExtension.Utility.createRuntimeError(err.errorCode, err.errorMessage, locationThrown, responseInfo.statusCode, data); + }; + Session.prototype.createError = function (code, message, locationThrown) { + return OfficeExtension.Utility.createRuntimeError('' + code, message, locationThrown); + }; + Session.WorkbookSessionIdHeaderName = 'Workbook-Session-Id'; + Session.WorkbookSessionIdHeaderNameLower = 'workbook-session-id'; + Session.ASYNC_API_GRAPH_VERSION = 'beta'; + Session.POLL_DELAY = 10000; + Session.MAX_POLL_ATTEMPTS = 10; + Session.DEFAULT_COMMIT_CHANGES_RETRY_AFTER = 10000; + Session.LOCATION_HEADER = 'location'; + Session.AUTHORIZATION_HEADER = 'authorization'; + Session.REQUEST_ID_HEADER = 'request-id'; + Session.RETRY_AFTER_HEADER = 'retry-after'; + Session.PREFER_HEADER = 'Prefer'; + Session.PREFER_HEADER_VAL = 'respond-async'; + Session.CONTENT_TYPE_HEADER = 'Content-Type'; + Session.CONTENT_TYPE_HEADER_VAL = 'application/json'; + Session.CLOSE_SESSION = 'closeSession'; + Session.COMMIT_CHANGES = 'commitChanges'; + Session.CREATE_SESSION = 'createSession'; + Session.REFRESH_SESSION = 'refreshSession'; + return Session; + }()); + Excel.Session = Session; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + var _this = _super.call(this, url) || this; + _this.m_workbook = _createRootServiceObject(Excel.Workbook, _this); + _this._rootObject = _this.m_workbook; + _this._rootObjectPropertyName = "workbook"; + return _this; + } + RequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext = 5004; + if (officeJsErrorCode === ooeInvalidApiCallInContext) { + response.ErrorCode = ErrorCodes.invalidOperationInCellEditMode; + response.HttpStatusCode = 400; + response.ErrorMessage = OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; + Object.defineProperty(RequestContext.prototype, "workbook", { + get: function () { + return this.m_workbook; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "application", { + get: function () { + return this.workbook.application; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "runtime", { + get: function () { + return this.workbook._Runtime; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeCore.RequestContext)); + Excel.RequestContext = RequestContext; + var Recorder = (function () { + function Recorder() { + } + Recorder.enableMacroRecordingEvent = function (context) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = true; + var registerEventHandler = function (context) { + context.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent] = "true"; + context.workbook.onRecordingStateChangedEvent.add(function (args) { + OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo = args.recording; + return OfficeExtension.Utility._createPromiseFromResult(null); + }); + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + if (context !== undefined && context !== null) { + return registerEventHandler(context); + } + return run(function (context) { + return registerEventHandler(context); + }); + }; + return Recorder; + }()); + Excel.Recorder = Recorder; + function onBeforeExcelRun(options, context) { + var excelOptions = options; + if (excelOptions.delayForCellEdit && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + context._requestFlagModifier |= 64; + } + else { + context._requestFlagModifier &= ~64; + } + if (excelOptions._makerSafe) { + context._requestFlagModifier |= 1024; + } + } + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.run = run; + function runBatch(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch", arguments, function (requestInfo) { + var ret = new Excel.RequestContext(requestInfo); + return ret; + }, onBeforeExcelRun); + } + Excel.runBatch = runBatch; + Excel._RedirectV1APIs = false; + Excel._V1APIMap = { + "GetDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GetSelectedDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.getSelectedData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GoToByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.gotoById(callArgs); } + }, + "AddColumnsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddColumns(callArgs); } + }, + "AddFromSelectionAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromSelection(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromNamedItemAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromNamedItem(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromPromptAsync": { + call: function (ctx, callArgs) { + if (versionNumberIsEarlierThan({ ios: { desiredMajor: 2, desiredMinor: 20, desiredBuild: 0 } }) && OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")) { + ctx._requestFlagModifier |= 64; + } + return ctx.workbook._V1Api.bindingAddFromPrompt(callArgs); + }, + postprocess: postprocessBindingDescriptor + }, + "AddRowsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddRows(callArgs); } + }, + "GetByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetById(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "ReleaseByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingReleaseById(callArgs); } + }, + "GetAllAsync": { + call: function (ctx) { return ctx.workbook._V1Api.bindingGetAll(); }, + postprocess: function (response) { + return response.bindings.map(function (descriptor) { return postprocessBindingDescriptor(descriptor); }); + } + }, + "DeleteAllDataValuesAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingDeleteAllDataValues(callArgs); } + }, + "SetSelectedDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.setSelectedData(callArgs); } + }, + "SetDataAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetData(callArgs); } + }, + "SetFormatsAsync": { + preprocess: function (callArgs) { + var preimage = callArgs["cellFormat"]; + if (typeof (window) !== "undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !== "undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"] = window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetFormats(callArgs); } + }, + "SetTableOptionsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetTableOptions(callArgs); } + }, + "ClearFormatsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } + }, + "GetFilePropertiesAsync": { + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } + }, + }; + function postprocessBindingDescriptor(response) { + var bindingDescriptor = { + BindingColumnCount: response.bindingColumnCount, + BindingId: response.bindingId, + BindingRowCount: response.bindingRowCount, + bindingType: response.bindingType, + HasHeaders: response.hasHeaders + }; + return window.OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, window.Microsoft.Office.WebExtension.context.document); + } + function getDataCommonPostprocess(response, callArgs) { + var isPlainData = response.headers == null; + var data; + if (isPlainData) { + data = response.rows; + } + else { + data = response; + } + data = window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data === undefined ? null : data; + } + function versionNumberIsEarlierThan(versionsForPlatformMap) { + var hasOfficeVersion = typeof (window) !== "undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var platform = window.Office.context.diagnostics.platform.toLowerCase(); + if (platform === 'officeonline') { + return false; + } + var versionForCurrentPlatform = versionsForPlatformMap[platform]; + if (versionForCurrentPlatform == null) { + versionForCurrentPlatform = versionsForPlatformMap.general; + } + var version = window.Office.context.diagnostics.version; + var versionExtractor = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result = versionExtractor.exec(version); + if (result) { + var major = parseInt(result[1]); + var minor = parseInt(result[2]); + var build = parseInt(result[3]); + if (major < versionForCurrentPlatform.desiredMajor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor < versionForCurrentPlatform.desiredMinor) { + return true; + } + if (major === versionForCurrentPlatform.desiredMajor && minor === versionForCurrentPlatform.desiredMinor && build < versionForCurrentPlatform.desiredBuild) { + var revisionString = result[4]; + var devBuildValidation = /^3\d\d\d+$/; + var isDevBuild = devBuildValidation.exec(revisionString); + if (isDevBuild) { + return true; + } + } + } + return false; + } + var ALWAYS_TRUE_PLACEHOLDER_OVERRIDE = true; + var _CC; + (function (_CC) { + _CC.office10EventIdBindingSelectionChangedEvent = 3; + _CC.office10EventIdBindingDataChangedEvent = 4; + _CC.office10EventIdDocumentSelectionChangedEvent = 2; + _CC.office10EventIdRichApiMessageEvent = 5; + _CC.office10EventIdSettingsChangedEvent = 1; + })(_CC = Excel._CC || (Excel._CC = {})); + var _hostName = "Excel"; + var _defaultApiSetName = "ExcelApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var RangeValuesPreviewCustom = (function () { + function RangeValuesPreviewCustom() { + } + Object.defineProperty(RangeValuesPreviewCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return RangeValuesPreviewCustom; + }()); + Excel.RangeValuesPreviewCustom = RangeValuesPreviewCustom; + (function (_CC) { + function Application_SuspendApiCalculationUntilNextSync(thisObj) { + if (isOfficePlatform("Mac") && isExcelApiSetSupported(1.6) && !isExcelApiSetSupported(1.7)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Application_SuspendApiCalculationUntilNextSync = Application_SuspendApiCalculationUntilNextSync; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Workbook_EnableOfficeScriptRecording(thisObj, eventId) { + this.context.eventId = eventId; + return { handled: false }; + } + _CC.Workbook_EnableOfficeScriptRecording = Workbook_EnableOfficeScriptRecording; + function Workbook_RecordAction(thisObj, payload) { + this.context.sdxPayload = payload; + return { handled: false }; + } + _CC.Workbook_RecordAction = Workbook_RecordAction; + function Workbook_SelectionChanged_EventArgsTransform(thisObj, args) { + return { workbook: thisObj }; + } + _CC.Workbook_SelectionChanged_EventArgsTransform = Workbook_SelectionChanged_EventArgsTransform; + function Workbook_WACOperationEvent_EventArgsTransform(thisObj, args) { + var event = { + eventId: args.eventId, + payload: args.payload, + type: Excel.EventType.wacoperationEvent, + }; + return event; + } + _CC.Workbook_WACOperationEvent_EventArgsTransform = Workbook_WACOperationEvent_EventArgsTransform; + function Workbook__Message_EventArgsTransform(thisObj, args) { + return { + entries: args.entries, + workbook: thisObj + }; + } + _CC.Workbook__Message_EventArgsTransform = Workbook__Message_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Worksheet_Charts_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Charts_Get = Worksheet_Charts_Get; + function Worksheet_Comments_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Comments_Get = Worksheet_Comments_Get; + function Worksheet_Names_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Names_Get = Worksheet_Names_Get; + function Worksheet_PivotTables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_PivotTables_Get = Worksheet_PivotTables_Get; + function Worksheet_RangeValuesPreview_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_RangeValuesPreview_Get = Worksheet_RangeValuesPreview_Get; + function Worksheet_Shapes_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Shapes_Get = Worksheet_Shapes_Get; + function Worksheet_ShowGridlines_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showGridlines = value; + _invokeSetProperty(thisObj, "Gridlines", value, _calculateApiFlags(2, "ExcelApiUndo", "1.16")); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowGridlines_Set = Worksheet_ShowGridlines_Set; + function Worksheet_ShowHeadings_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_showHeadings = value; + _invokeSetProperty(thisObj, "Headings", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Worksheet_ShowHeadings_Set = Worksheet_ShowHeadings_Set; + function Worksheet_Tables_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Tables_Get = Worksheet_Tables_Get; + function Worksheet_Visuals_Get(thisObj, ret) { + ret._ParentObject = thisObj; + } + _CC.Worksheet_Visuals_Get = Worksheet_Visuals_Get; + function Worksheet_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState, + }; + return newArgs; + } + _CC.Worksheet_Changed_EventArgsTransform = Worksheet_Changed_EventArgsTransform; + function Worksheet_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: thisObj.id, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.Worksheet_FormatChanged_EventArgsTransform = Worksheet_FormatChanged_EventArgsTransform; + function Worksheet_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.Worksheet_FormulaChanged_EventArgsTransform = Worksheet_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function _overrideWorksheetCollectionEventMethod(thisObj, methodName, apiVersion) { + if ((!isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.12)) || + (isOfficePlatform("OfficeOnline") && !isExcelApiSetSupported(1.11))) { + _throwIfApiNotSupported("WorksheetCollection." + methodName, _defaultApiSetName, apiVersion, _hostName); + _invokeMethod(thisObj, methodName, 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + function WorksheetCollection__RegisterActivatedEvent(thisObj) { + if (!isExcelApiSetSupported(1.9)) { + _throwIfApiNotSupported("WorksheetCollection._RegisterActivatedEvent", _defaultApiSetName, "1.7", _hostName); + _invokeMethod(thisObj, "_RegisterActivatedEvent", 0, [], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetCollection__RegisterActivatedEvent = WorksheetCollection__RegisterActivatedEvent; + function WorksheetCollection__RegisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterAddedEvent = WorksheetCollection__RegisterAddedEvent; + function WorksheetCollection__RegisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterColumnSortedEvent = WorksheetCollection__RegisterColumnSortedEvent; + function WorksheetCollection__RegisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__RegisterDataChangedEvent = WorksheetCollection__RegisterDataChangedEvent; + function WorksheetCollection__RegisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__RegisterDeletedEvent = WorksheetCollection__RegisterDeletedEvent; + function WorksheetCollection__RegisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_RegisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__RegisterRowSortedEvent = WorksheetCollection__RegisterRowSortedEvent; + function WorksheetCollection__UnregisterAddedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterAddedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterAddedEvent = WorksheetCollection__UnregisterAddedEvent; + function WorksheetCollection__UnregisterColumnSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterColumnSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterColumnSortedEvent = WorksheetCollection__UnregisterColumnSortedEvent; + function WorksheetCollection__UnregisterDataChangedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDataChangedEvent", "1.9"); + } + _CC.WorksheetCollection__UnregisterDataChangedEvent = WorksheetCollection__UnregisterDataChangedEvent; + function WorksheetCollection__UnregisterDeletedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterDeletedEvent", "1.7"); + } + _CC.WorksheetCollection__UnregisterDeletedEvent = WorksheetCollection__UnregisterDeletedEvent; + function WorksheetCollection__UnregisterRowSortedEvent(thisObj) { + return _overrideWorksheetCollectionEventMethod(thisObj, "_UnregisterRowSortedEvent", "1.10"); + } + _CC.WorksheetCollection__UnregisterRowSortedEvent = WorksheetCollection__UnregisterRowSortedEvent; + function WorksheetCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var deleteShiftDirection; + var insertShiftDirection; + var changeDirectionState; + if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellLeft) { + deleteShiftDirection = Excel.DeleteShiftDirection.left; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellUp) { + deleteShiftDirection = Excel.DeleteShiftDirection.up; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellRight) { + insertShiftDirection = Excel.InsertShiftDirection.right; + } + else if (value.shiftDirection == Excel.InsertDeleteCellsShiftDirection.shiftCellDown) { + insertShiftDirection = Excel.InsertShiftDirection.down; + } + if (value.shiftDirection != Excel.InsertDeleteCellsShiftDirection.none) { + changeDirectionState = { + deleteShiftDirection: deleteShiftDirection, + insertShiftDirection: insertShiftDirection + }; + } + var newArgs = { + type: Excel.EventType.worksheetChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details, + triggerSource: value.triggerSource, + changeDirectionState: changeDirectionState, + }; + return newArgs; + } + _CC.WorksheetCollection_Changed_EventArgsTransform = WorksheetCollection_Changed_EventArgsTransform; + function WorksheetCollection_FormatChanged_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: Excel.EventType.worksheetFormatChanged, + source: value.source, + worksheetId: value.worksheetId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRange", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("WorksheetFormatChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.9", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + } + }; + return newArgs; + } + _CC.WorksheetCollection_FormatChanged_EventArgsTransform = WorksheetCollection_FormatChanged_EventArgsTransform; + function WorksheetCollection_FormulaChanged_EventArgsTransform(thisObj, args) { + var value = args; + var formulaDetails; + if (value.formulaDetails != null) { + formulaDetails = value.formulaDetails; + } + var newArgs = { + type: Excel.EventType.worksheetFormulaChanged, + source: value.source, + worksheetId: value.worksheetId, + formulaDetails: formulaDetails + }; + return newArgs; + } + _CC.WorksheetCollection_FormulaChanged_EventArgsTransform = WorksheetCollection_FormulaChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function WorksheetProtection_Protect(thisObj, options, password) { + if (versionNumberIsEarlierThan({ + mac: { desiredMajor: 16, desiredMinor: 7, desiredBuild: 17101600 }, + ios: { desiredMajor: 2, desiredMinor: 7, desiredBuild: 1016 }, + general: { desiredMajor: 16, desiredMinor: 0, desiredBuild: 8716 } + })) { + _invokeMethod(thisObj, "Protect", 0, [options], 0, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.WorksheetProtection_Protect = WorksheetProtection_Protect; + })(_CC = Excel._CC || (Excel._CC = {})); + var RangeCustom = (function () { + function RangeCustom() { + } + RangeCustom.prototype._ensureInteger = function (num, methodName) { + if (!(typeof num === "number" && isFinite(num) && Math.floor(num) === num)) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + } + }; + RangeCustom.prototype._getAdjacentRange = function (functionName, count, referenceRange, rowDirection, columnDirection) { + if (count == null) { + count = 1; + } + this._ensureInteger(count, functionName); + var startRange; + var rowOffset = 0; + var columnOffset = 0; + if (count > 0) { + startRange = referenceRange.getOffsetRange(rowDirection, columnDirection); + } + else { + startRange = referenceRange; + rowOffset = rowDirection; + columnOffset = columnDirection; + } + if (Math.abs(count) === 1) { + return startRange; + } + return startRange.getBoundingRect(referenceRange.getOffsetRange(rowDirection * count + rowOffset, columnDirection * count + columnOffset)); + }; + return RangeCustom; + }()); + Excel.RangeCustom = RangeCustom; + (function (_CC) { + function Range_HandleResult(thisObj, value) { + if (!_isUndefined(value["isEntireColumn"])) { + thisObj.m_isEntireColumn = value["isEntireColumn"]; + } + if (!_isUndefined(value["isEntireRow"])) { + thisObj.m_isEntireRow = value["isEntireRow"]; + } + } + _CC.Range_HandleResult = Range_HandleResult; + function Range_GetColumnsAfter(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsAfter", count, thisObj.getLastColumn(), 0, 1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsAfter = Range_GetColumnsAfter; + function Range_GetColumnsBefore(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return { + handled: true, + result: thisObj._getAdjacentRange("getColumnsBefore", count, thisObj.getColumn(0), 0, -1) + }; + } + return { handled: false, result: null }; + } + _CC.Range_GetColumnsBefore = Range_GetColumnsBefore; + function Range_GetResizedRange(thisObj, deltaRows, deltaColumns) { + if (!isExcel1_3OrAbove()) { + thisObj._ensureInteger(deltaRows, "getResizedRange"); + thisObj._ensureInteger(deltaColumns, "getResizedRange"); + var referenceRange = (deltaRows >= 0 && deltaColumns >= 0) ? thisObj : thisObj.getCell(0, 0); + var result = referenceRange.getBoundingRect(thisObj.getLastCell().getOffsetRange(deltaRows, deltaColumns)); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetResizedRange = Range_GetResizedRange; + function Range_GetRowsAbove(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = thisObj._getAdjacentRange("getRowsAbove", count, thisObj.getRow(0), -1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsAbove = Range_GetRowsAbove; + function Range_GetRowsBelow(thisObj, count) { + if (!isExcel1_3OrAbove()) { + if (count == null) { + count = 1; + } + thisObj._ensureInteger(count, "RowsAbove"); + if (count === 0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + var result = this._getAdjacentRange("getRowsBelow", count, thisObj.getLastRow(), 1, 0); + return { handled: true, result: result }; + } + return { handled: false, result: null }; + } + _CC.Range_GetRowsBelow = Range_GetRowsBelow; + function Range_Formulas_Set(thisObj, value) { + thisObj.m_formulas = value; + if (setRangePropertiesInBulk(thisObj, "Formulas", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Formulas_Set = Range_Formulas_Set; + function Range_FormulasLocal_Set(thisObj, value) { + thisObj.m_formulasLocal = value; + if (setRangePropertiesInBulk(thisObj, "FormulasLocal", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasLocal_Set = Range_FormulasLocal_Set; + function Range_FormulasR1C1_Set(thisObj, value) { + thisObj.m_formulasR1C1 = value; + if (setRangePropertiesInBulk(thisObj, "FormulasR1C1", value)) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_FormulasR1C1_Set = Range_FormulasR1C1_Set; + function Range_NumberFormat_Set(thisObj, value) { + thisObj.m_numberFormat = value; + if (setRangePropertiesInBulk(thisObj, "NumberFormat", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_NumberFormat_Set = Range_NumberFormat_Set; + function Range_Values_Set(thisObj, value) { + thisObj.m_values = value; + if (setRangePropertiesInBulk(thisObj, "Values", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_Values_Set = Range_Values_Set; + function Range_ValuesAsJson_Set(thisObj, value) { + thisObj.m_valuesAsJson = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJson", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJson_Set = Range_ValuesAsJson_Set; + function Range_ValuesAsJsonLocal_Set(thisObj, value) { + thisObj.m_valuesAsJsonLocal = value; + if (setRangePropertiesInBulk(thisObj, "ValuesAsJsonLocal", value, _calculateApiFlags(2, "ExcelApiUndo", "1.7"))) { + return { handled: true }; + } + return { handled: false }; + } + _CC.Range_ValuesAsJsonLocal_Set = Range_ValuesAsJsonLocal_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function SettingCollection_Add(thisObj, key, value) { + value = _CC._replaceDateWithStringDate(value); + var result = _createMethodObject(Excel.Setting, thisObj, "Add", 0, [key, value], false, true, null, 0); + return { handled: true, result: result }; + } + _CC.SettingCollection_Add = SettingCollection_Add; + function SettingCollection_SettingsChanged_EventArgsTransform(thisObj, args) { + return { + settings: thisObj + }; + } + _CC.SettingCollection_SettingsChanged_EventArgsTransform = SettingCollection_SettingsChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + var DateJSONPrefix = "Date("; + var DateJSONSuffix = ")"; + function _replaceStringDateWithDate(value) { + var strValue = JSON.stringify(value); + value = JSON.parse(strValue, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === DateJSONPrefix && v.slice(-1) === DateJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + return value; + } + function _replaceDateWithStringDate(value) { + var strValue = JSON.stringify(value, function dateReplacer(k, v) { + return (this[k] instanceof Date) ? (DateJSONPrefix + this[k].getTime() + DateJSONSuffix) : v; + }); + value = JSON.parse(strValue); + return value; + } + _CC._replaceDateWithStringDate = _replaceDateWithStringDate; + function Setting_HandleResult(thisObj, value) { + if (!_isUndefined(value["Value"])) { + value["Value"] = _replaceStringDateWithDate(value["Value"]); + } + ; + } + _CC.Setting_HandleResult = Setting_HandleResult; + function Setting_Value_Set(thisObj, value) { + if (!_isNullOrUndefined(value)) { + thisObj.m_value = value; + var newValue = _replaceDateWithStringDate(value); + _invokeSetProperty(thisObj, "Value", newValue, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Setting_Value_Set = Setting_Value_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + var NamedItemCollectionCustom = (function () { + function NamedItemCollectionCustom() { + } + Object.defineProperty(NamedItemCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItemCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return NamedItemCollectionCustom; + }()); + Excel.NamedItemCollectionCustom = NamedItemCollectionCustom; + (function (_CC) { + function Binding_DataChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj + }; + return evt; + } + _CC.Binding_DataChanged_EventArgsTransform = Binding_DataChanged_EventArgsTransform; + function Binding_SelectionChanged_EventArgsTransform(thisObj, args) { + var evt = { + binding: thisObj, + columnCount: args.columnCount, + rowCount: args.rowCount, + startColumn: args.startColumn, + startRow: args.startRow + }; + return evt; + } + _CC.Binding_SelectionChanged_EventArgsTransform = Binding_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var TableCollectionCustom = (function () { + function TableCollectionCustom() { + } + Object.defineProperty(TableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return TableCollectionCustom; + }()); + Excel.TableCollectionCustom = TableCollectionCustom; + (function (_CC) { + function TableCollection_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.TableCollection_Changed_EventArgsTransform = TableCollection_Changed_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Table_HandleIdResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleIdResult = Table_HandleIdResult; + function Table_HandleResult(thisObj, value) { + if (!_isUndefined(value["Id"])) { + value["Id"] = value["Id"].toString(); + } + } + _CC.Table_HandleResult = Table_HandleResult; + function Table_Changed_EventArgsTransform(thisObj, args) { + var value = args; + var details; + if (value.valueBefore != null || value.valueAfter != null) { + details = { + valueBefore: value.valueBefore, + valueAfter: value.valueAfter, + valueTypeBefore: value.valueTypeBefore, + valueTypeAfter: value.valueTypeAfter, + valueAsJsonBefore: value.valueAsJsonBefore, + valueAsJsonAfter: value.valueAsJsonAfter + }; + } + var newArgs = { + type: Excel.EventType.tableChanged, + changeType: value.changeType, + source: value.source, + worksheetId: value.worksheetId, + tableId: value.tableId, + address: value.address, + getRange: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRange", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeForEventByReferenceId(value.referenceId); + }, + getRangeOrNullObject: function (ctx) { + _throwIfApiNotSupported("TableChangedEventArgs.getRangeOrNullObject", _defaultApiSetName, "1.8", _hostName); + return ctx.workbook._GetRangeOrNullObjectForEventByReferenceId(value.referenceId); + }, + details: details + }; + return newArgs; + } + _CC.Table_Changed_EventArgsTransform = Table_Changed_EventArgsTransform; + function Table_SelectionChanged_EventArgsTransform(thisObj, args) { + var value = args; + var isAddressNullOrEmpty = (!value.address || value.address.length === 0); + var newArgs = { + type: Excel.EventType.tableSelectionChanged, + isInsideTable: !isAddressNullOrEmpty, + worksheetId: value.worksheetId, + tableId: thisObj.id, + address: value.address + }; + return newArgs; + } + _CC.Table_SelectionChanged_EventArgsTransform = Table_SelectionChanged_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartCollectionCustom = (function () { + function ChartCollectionCustom() { + } + Object.defineProperty(ChartCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ChartCollectionCustom; + }()); + Excel.ChartCollectionCustom = ChartCollectionCustom; + (function (_CC) { + function ChartCollection_Add(thisObj, type, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); + } + return { handled: false, result: null }; + } + _CC.ChartCollection_Add = ChartCollection_Add; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Chart_SetData(thisObj, sourceData, seriesBy) { + if (!(sourceData instanceof Excel.Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); + } + return { handled: false }; + } + _CC.Chart_SetData = Chart_SetData; + })(_CC = Excel._CC || (Excel._CC = {})); + var ChartFillCustom = (function () { + function ChartFillCustom() { + } + ChartFillCustom.prototype.load = function (option) { + _load(this, option); + return this; + }; + return ChartFillCustom; + }()); + Excel.ChartFillCustom = ChartFillCustom; + var VisualCollectionCustom = (function () { + function VisualCollectionCustom() { + } + Object.defineProperty(VisualCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return VisualCollectionCustom; + }()); + Excel.VisualCollectionCustom = VisualCollectionCustom; + (function (_CC) { + function VisualCollection_AgaveVisualUpdate_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + type: value.type, + payload: value.payload + }; + return newArgs; + } + _CC.VisualCollection_AgaveVisualUpdate_EventArgsTransform = VisualCollection_AgaveVisualUpdate_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Visual_ChangeNotification_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + targetId: value.targetId, + changeType: value.changeType, + payload: value.payload, + type: Excel.EventType.visualChange, + }; + return newArgs; + } + _CC.Visual_ChangeNotification_EventArgsTransform = Visual_ChangeNotification_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var PivotTableCollectionCustom = (function () { + function PivotTableCollectionCustom() { + } + Object.defineProperty(PivotTableCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTableCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return PivotTableCollectionCustom; + }()); + Excel.PivotTableCollectionCustom = PivotTableCollectionCustom; + (function (_CC) { + function PivotLayout_GetColumnLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetColumnLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetColumnLabelRange = PivotLayout_GetColumnLabelRange; + function PivotLayout_GetDataBodyRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetDataBodyRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataBodyRange = PivotLayout_GetDataBodyRange; + function PivotLayout_GetDataHierarchy(thisObj, cell) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + _throwIfApiNotSupported("PivotLayout.getDataHierarchy", _defaultApiSetName, "1.9", _hostName); + var result = _createMethodObject(Excel.DataPivotHierarchy, thisObj, "GetDataHierarchy", 0, [cell], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetDataHierarchy = PivotLayout_GetDataHierarchy; + function PivotLayout_GetFilterAxisRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetFilterAxisRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetFilterAxisRange = PivotLayout_GetFilterAxisRange; + function PivotLayout_GetRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRange = PivotLayout_GetRange; + function PivotLayout_GetRowLabelRange(thisObj) { + if (!OfficeExtension.Utility.isSetSupported("Pivot", "1.5")) { + var result = _createMethodObject(Excel.Range, thisObj, "GetRowLabelRange", 0, [], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.PivotLayout_GetRowLabelRange = PivotLayout_GetRowLabelRange; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function PivotField_SortByLabels(thisObj, sortBy) { + if (typeof sortBy === "string") { + sortBy = (sortBy.toLowerCase() === "ascending"); + } + _invokeMethod(thisObj, "SortByLabels", 0, [sortBy], 0, 0); + return { handled: true }; + } + _CC.PivotField_SortByLabels = PivotField_SortByLabels; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormattingService_GetFormatter(thisObj, format) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatting.GetFormatter", "NumberFormatting", "1.1", _hostName); + var result = _createMethodObject(Excel.NumberFormatter, thisObj, "GetFormatter", 0, [format], false, false, null, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormattingService_GetFormatter = NumberFormattingService_GetFormatter; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function NumberFormatter_Format(thisObj, value) { + if (!OfficeExtension.Utility.isSetSupported("NumberFormatting", "1.2")) { + _throwIfApiNotSupported("NumberFormatter.Format", "NumberFormatting", "1.1", _hostName); + var result = _invokeMethod(thisObj, "Format", 0, [value], 0, 0); + return { handled: true, result: result }; + } + return { handled: false, result: undefined }; + } + _CC.NumberFormatter_Format = NumberFormatter_Format; + })(_CC = Excel._CC || (Excel._CC = {})); + var CustomFunctionManagerCustom = (function () { + function CustomFunctionManagerCustom() { + } + CustomFunctionManagerCustom.register = function (metadata, javascript) { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { return Excel.CustomFunctionManager.newObject(context).register(metadata, javascript); }); + }; + CustomFunctionManagerCustom.getStatus = function () { + _throwIfApiNotSupported("CustomFunctionManager.register", "CustomFunctions", "1.3", _hostName); + return _runOnRegularOrWacContext({ delayForCellEdit: true }, function (context) { + var manager = Excel.CustomFunctionManager.newObject(context).load("status"); + return context.sync().then(function () { return manager.status; }); + }); + }; + return CustomFunctionManagerCustom; + }()); + Excel.CustomFunctionManagerCustom = CustomFunctionManagerCustom; + (function (_CC) { + function CustomFunctionManager_StaticCustomize(type) { + type.register = CustomFunctionManagerCustom.register; + type.getStatus = CustomFunctionManagerCustom.getStatus; + } + _CC.CustomFunctionManager_StaticCustomize = CustomFunctionManager_StaticCustomize; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function Style_TextOrientation_Set(thisObj, value) { + if (ALWAYS_TRUE_PLACEHOLDER_OVERRIDE) { + thisObj.m_textOrientation = value; + _invokeSetProperty(thisObj, "Orientation", value, 0); + return { handled: true }; + } + return { handled: false }; + } + _CC.Style_TextOrientation_Set = Style_TextOrientation_Set; + })(_CC = Excel._CC || (Excel._CC = {})); + (function (_CC) { + function InternalTest_Test1Event_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_Test1Event_EventArgsTransform = InternalTest_Test1Event_EventArgsTransform; + function InternalTest_TestEvent_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + prop1: value.prop1, + worksheet: thisObj.context.workbook.worksheets.getItem(value.worksheetId) + }; + return newArgs; + } + _CC.InternalTest_TestEvent_EventArgsTransform = InternalTest_TestEvent_EventArgsTransform; + })(_CC = Excel._CC || (Excel._CC = {})); + var CommentCollectionCustom = (function () { + function CommentCollectionCustom() { + } + Object.defineProperty(CommentCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollectionCustom.prototype, "_eventTargetId", { + get: function () { + return this._ParentObject ? this._ParentObject.id : OfficeExtension.Constants.eventWorkbookId; + }, + enumerable: true, + configurable: true + }); + return CommentCollectionCustom; + }()); + Excel.CommentCollectionCustom = CommentCollectionCustom; + var ShapeCollectionCustom = (function () { + function ShapeCollectionCustom() { + } + Object.defineProperty(ShapeCollectionCustom.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject = value; + }, + enumerable: true, + configurable: true + }); + return ShapeCollectionCustom; + }()); + Excel.ShapeCollectionCustom = ShapeCollectionCustom; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["accessDenied"] = "AccessDenied"; + ErrorCodes["apiNotFound"] = "ApiNotFound"; + ErrorCodes["conflict"] = "Conflict"; + ErrorCodes["emptyChartSeries"] = "EmptyChartSeries"; + ErrorCodes["filteredRangeConflict"] = "FilteredRangeConflict"; + ErrorCodes["formulaLengthExceedsLimit"] = "FormulaLengthExceedsLimit"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["inactiveWorkbook"] = "InactiveWorkbook"; + ErrorCodes["insertDeleteConflict"] = "InsertDeleteConflict"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidBinding"] = "InvalidBinding"; + ErrorCodes["invalidOperation"] = "InvalidOperation"; + ErrorCodes["invalidReference"] = "InvalidReference"; + ErrorCodes["invalidSelection"] = "InvalidSelection"; + ErrorCodes["itemAlreadyExists"] = "ItemAlreadyExists"; + ErrorCodes["itemNotFound"] = "ItemNotFound"; + ErrorCodes["mergedRangeConflict"] = "MergedRangeConflict"; + ErrorCodes["nonBlankCellOffSheet"] = "NonBlankCellOffSheet"; + ErrorCodes["notImplemented"] = "NotImplemented"; + ErrorCodes["openWorkbookLinksBlocked"] = "OpenWorkbookLinksBlocked"; + ErrorCodes["operationCellsExceedLimit"] = "OperationCellsExceedLimit"; + ErrorCodes["pivotTableRangeConflict"] = "PivotTableRangeConflict"; + ErrorCodes["powerQueryRefreshResourceChallenge"] = "PowerQueryRefreshResourceChallenge"; + ErrorCodes["rangeExceedsLimit"] = "RangeExceedsLimit"; + ErrorCodes["refreshWorkbookLinksBlocked"] = "RefreshWorkbookLinksBlocked"; + ErrorCodes["requestAborted"] = "RequestAborted"; + ErrorCodes["responsePayloadSizeLimitExceeded"] = "ResponsePayloadSizeLimitExceeded"; + ErrorCodes["unsupportedFeature"] = "UnsupportedFeature"; + ErrorCodes["unsupportedFillType"] = "UnsupportedFillType"; + ErrorCodes["unsupportedOperation"] = "UnsupportedOperation"; + ErrorCodes["unsupportedSheet"] = "UnsupportedSheet"; + ErrorCodes["invalidOperationInCellEditMode"] = "InvalidOperationInCellEditMode"; + })(ErrorCodes = Excel.ErrorCodes || (Excel.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = {})); + var _libraryMetadataXlapi = { "version": "1.0.0", + "name": "Excel", + "defaultApiSetName": "ExcelApi", + "hostName": "Excel", + "apiSets": [["1.19", "ExcelApiUndo"], ["1.1", "Recorder"], ["99.9"], ["1.4", "ExcelApiUndo"], ["1.8"], ["1.9"], ["1.11"], ["1.18"], ["1.6"], ["1.6", "ExcelApiUndo"], ["1.7"], ["1.1", "ExcelApiUndo"], ["1.2"], ["1.3"], ["1.4"], ["1.5"], ["1.10"], ["1.14"], ["1.1", "ExcelApiOnline"], ["1.1", "CustomFunctions"], ["1.1", "WACOperationEvents"], ["1.3", "ExcelApiUndo"], ["1.13"], ["1.16"], ["1.8", "ExcelApiUndo"], ["1.16", "ExcelApiUndo"], ["1.12"], ["1.2", "ExcelApiOnline"], ["1.2", "ExcelApiUndo"], ["1.17"], ["1.7", "ExcelApiUndo"], ["1.10", "ExcelApiUndo"], ["1.14", "ExcelApiUndo"], ["1.15", "ExcelApiUndo"], ["1.15"], ["1.17", "ExcelApiUndo"], ["99.99", "ExcelApiUndo"], ["1.9", "ExcelApiUndo"], ["1.11", "ExcelApiUndo"], ["1.12", "ExcelApiUndo"], ["1.13", "ExcelApiUndo"], ["1.18", "ExcelApiUndo"]], + "strings": [], + "enumTypes": [["UndoChangeType", ["undoAction", "redoAction", "undoOrRedoCleared", "undoGroupAdded"]], + ["SDX", ["guidedReapply"]], + ["BusinessBarEntryType", [], { "officeScriptsRunningStatus": 0, "msFormsDataSyncRunningStatus": 1 }], + ["FormulaReferenceStyle", ["a1", "r1C1"]], + ["NavigationObjectType", ["table", "pivotTable", "chart", "shape", "namedRange"]], + ["UserActivityType", ["none", "insertSheet", "deleteSheet", "renameSheet", "changeCell", "insertRow", "insertColumn", "deleteRow", "deleteColumn", "insertPartialRow", "insertPartialColumn", "insertPartialColumnRightToLeft", "deletePartialRow", "deletePartialColumn", "deletePartialColumnRightToLeft", "move", "sort", "mergeCells", "unmergeCells", "unknownOperation", "genericEdit"]], + ["LineageEndOfLogStatus", ["loadInProgress", "success", "endOfLog", "purged", "trimmed", "unsupported", "cleared", "error"]], + ["LineageLoadType", ["new", "next", "previous", "latest"]], + ["LoadToType", ["connectionOnly", "table", "pivotTable", "pivotChart"]], + ["QueryError", ["unknown", "none", "failedLoadToWorksheet", "failedLoadToDataModel", "failedDownload", "failedToCompleteDownload"]], + ["RangeOptimizationType", ["other", "numberFormat", "textAlignment", "textProperties", "cellBorder", "fillColor", "sheetProtection", "rowHeight", "rowVisibility"]], + ["WorkbookLinksHardToFindMessages", ["none", "containsDefinedNames", "hiddenOrVeryHiddenSheet", "hiddenFloatingObjects", "lockedFloatingObjectsThroughVba", "protectedSheet", "containsConditionalFormatting", "containsDataValidation", "hiddenRowsAndColumns"]], + ["WorkbookLinksIconState", ["ok", "moreInfo", "warning"]], + ["WorkbookLinksRefreshSettings", ["ask", "always", "never"]], + ["WorkbookConditionalFormattingRulesManagerScope", ["defaultScope", "selectedRange", "activatedWorksheet", "activatedTable", "activatedPivotTable"]], + ["WorkbookLinksRefreshMode", ["manual", "automatic"]], + ["HelpTopic", ["showChanges", "guidedReapply", "externalCodeServiceDiagnostics"]], + ["DocumentTaskChangeAction", [], { "unknown": "unknown", "create": "create", "assign": "assign", "unassign": "unassign", "unassignAll": "unassignAll", "setSchedule": "setSchedule", "setPercentComplete": "setPercentComplete", "setPriority": "setPriority", "remove": "remove", "restore": "restore", "setTitle": "setTitle", "undo": "undo" }], + ["DataSourceType", ["unknown", "cube", "localRange", "localTable", "oledbDefault"]], + ["DateFilterCondition", ["unknown", "equals", "before", "beforeOrEqualTo", "after", "afterOrEqualTo", "between", "tomorrow", "today", "yesterday", "nextWeek", "thisWeek", "lastWeek", "nextMonth", "thisMonth", "lastMonth", "nextQuarter", "thisQuarter", "lastQuarter", "nextYear", "thisYear", "lastYear", "yearToDate", "allDatesInPeriodQuarter1", "allDatesInPeriodQuarter2", "allDatesInPeriodQuarter3", "allDatesInPeriodQuarter4", "allDatesInPeriodJanuary", "allDatesInPeriodFebruary", "allDatesInPeriodMarch", "allDatesInPeriodApril", "allDatesInPeriodMay", "allDatesInPeriodJune", "allDatesInPeriodJuly", "allDatesInPeriodAugust", "allDatesInPeriodSeptember", "allDatesInPeriodOctober", "allDatesInPeriodNovember", "allDatesInPeriodDecember"]], + ["LabelFilterCondition", ["unknown", "equals", "beginsWith", "endsWith", "contains", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between"]], + ["PivotFilterType", ["unknown", "value", "manual", "label", "date"]], + ["TopBottomSelectionType", ["items", "percent", "sum"]], + ["ValueFilterCondition", ["unknown", "equals", "greaterThan", "greaterThanOrEqualTo", "lessThan", "lessThanOrEqualTo", "between", "topN", "bottomN"]], + ["BuiltInPivotTableStyle", ["none", "light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "light22", "light23", "light24", "light25", "light26", "light27", "light28", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11", "dark12", "dark13", "dark14", "dark15", "dark16", "dark17", "dark18", "dark19", "dark20", "dark21", "dark22", "dark23", "dark24", "dark25", "dark26", "dark27", "dark28"]], + ["BuiltInSlicerStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "other1", "other2", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6"]], + ["BuiltInTableStyle", ["light1", "light2", "light3", "light4", "light5", "light6", "light7", "light8", "light9", "light10", "light11", "light12", "light13", "light14", "light15", "light16", "light17", "light18", "light19", "light20", "light21", "medium1", "medium2", "medium3", "medium4", "medium5", "medium6", "medium7", "medium8", "medium9", "medium10", "medium11", "medium12", "medium13", "medium14", "medium15", "medium16", "medium17", "medium18", "medium19", "medium20", "medium21", "medium22", "medium23", "medium24", "medium25", "medium26", "medium27", "medium28", "dark1", "dark2", "dark3", "dark4", "dark5", "dark6", "dark7", "dark8", "dark9", "dark10", "dark11"]], + ["ChartSeriesDimension", ["categories", "values", "bubbleSizes"], { "xvalues": "XValues", "yvalues": "YValues" }], + ["PivotTableDateGroupBy", ["invalid", "bySeconds", "byMinutes", "byHours", "byDays", "byMonths", "byQuarters", "byYears"]], + ["PivotFilterTopBottomCriterion", ["invalid", "topItems", "topPercent", "topSum", "bottomItems", "bottomPercent", "bottomSum"]], + ["SortBy", ["ascending", "descending"]], + ["AggregationFunction", ["unknown", "automatic", "sum", "count", "average", "max", "min", "product", "countNumbers", "standardDeviation", "standardDeviationP", "variance", "varianceP"]], + ["ShowAsCalculation", ["unknown", "none", "percentOfGrandTotal", "percentOfRowTotal", "percentOfColumnTotal", "percentOfParentRowTotal", "percentOfParentColumnTotal", "percentOfParentTotal", "percentOf", "runningTotal", "percentRunningTotal", "differenceFrom", "percentDifferenceFrom", "rankAscending", "rankDecending", "index"]], + ["PivotAxis", ["unknown", "row", "column", "data", "filter"]], + ["LinkedDataTypeRefreshMode", ["unknown", "manual", "onLoad", "periodic"]], + ["AxisType", ["invalid", "category", "value", "series"]], + ["AxisGroup", ["primary", "secondary"]], + ["AxisScaleType", ["linear", "logarithmic"]], + ["AxisCrosses", ["automatic", "maximum", "minimum", "custom"]], + ["AxisTickMark", ["none", "cross", "inside", "outside"]], + ["AxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["TrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ChartAxisType", ["invalid", "category", "value", "series"]], + ["ChartAxisGroup", ["primary", "secondary"]], + ["ChartAxisScaleType", ["linear", "logarithmic"]], + ["ChartAxisPosition", ["automatic", "maximum", "minimum", "custom"]], + ["ChartAxisTickMark", ["none", "cross", "inside", "outside"]], + ["CalculationState", ["done", "calculating", "pending"]], + ["ChartAxisTickLabelPosition", ["nextToAxis", "high", "low", "none"]], + ["ChartAxisDisplayUnit", ["none", "hundreds", "thousands", "tenThousands", "hundredThousands", "millions", "tenMillions", "hundredMillions", "billions", "trillions", "custom"]], + ["ChartAxisTimeUnit", ["days", "months", "years"]], + ["ChartBoxQuartileCalculation", ["inclusive", "exclusive"]], + ["ChartAxisCategoryType", ["automatic", "textAxis", "dateAxis"]], + ["ChartBinType", ["category", "auto", "binWidth", "binCount"]], + ["ChartLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "grey25", "grey50", "grey75", "automatic", "roundDot"]], + ["ChartDataLabelPosition", ["invalid", "none", "center", "insideEnd", "insideBase", "outsideEnd", "left", "right", "top", "bottom", "bestFit", "callout"]], + ["ChartErrorBarsInclude", ["both", "minusValues", "plusValues"]], + ["ChartErrorBarsType", ["fixedValue", "percent", "stDev", "stError", "custom"]], + ["ChartMapAreaLevel", ["automatic", "dataOnly", "city", "county", "state", "country", "continent", "world"]], + ["ChartGradientStyle", ["twoPhaseColor", "threePhaseColor"]], + ["ChartGradientStyleType", ["extremeValue", "number", "percent"]], + ["ChartTitlePosition", ["automatic", "top", "bottom", "left", "right"]], + ["ChartLegendPosition", ["invalid", "top", "bottom", "left", "right", "corner", "custom"]], + ["ChartMarkerStyle", ["invalid", "automatic", "none", "square", "diamond", "triangle", "star", "dot", "dash", "circle", "plus", "picture"], { "x": "X" }], + ["ChartPlotAreaPosition", ["automatic", "custom"]], + ["ChartMapLabelStrategy", ["none", "bestFit", "showAll"]], + ["ChartMapProjectionType", ["automatic", "mercator", "miller", "robinson", "albers"]], + ["ChartParentLabelStrategy", ["none", "banner", "overlapping"]], + ["ChartSeriesBy", ["auto", "columns", "rows"]], + ["ChartDataSourceType", ["localRange", "externalRange", "list", "unknown"]], + ["ChartTextHorizontalAlignment", ["center", "left", "right", "justify", "distributed"]], + ["ChartTextVerticalAlignment", ["center", "bottom", "top", "justify", "distributed"]], + ["ChartTickLabelAlignment", ["center", "left", "right"]], + ["ChartType", ["invalid", "columnClustered", "columnStacked", "columnStacked100", "barClustered", "barStacked", "barStacked100", "lineStacked", "lineStacked100", "lineMarkers", "lineMarkersStacked", "lineMarkersStacked100", "pieOfPie", "pieExploded", "barOfPie", "areaStacked", "areaStacked100", "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", "line", "pie", "area", "doughnut", "radar", "histogram", "boxwhisker", "pareto", "regionMap", "treemap", "waterfall", "sunburst", "funnel"], { "_3DColumnClustered": "3DColumnClustered", "_3DColumnStacked": "3DColumnStacked", "_3DColumnStacked100": "3DColumnStacked100", "_3DBarClustered": "3DBarClustered", "_3DBarStacked": "3DBarStacked", "_3DBarStacked100": "3DBarStacked100", "_3DPieExploded": "3DPieExploded", "xyscatterSmooth": "XYScatterSmooth", "xyscatterSmoothNoMarkers": "XYScatterSmoothNoMarkers", "xyscatterLines": "XYScatterLines", "xyscatterLinesNoMarkers": "XYScatterLinesNoMarkers", "_3DAreaStacked": "3DAreaStacked", "_3DAreaStacked100": "3DAreaStacked100", "_3DColumn": "3DColumn", "_3DLine": "3DLine", "_3DPie": "3DPie", "xyscatter": "XYScatter", "_3DArea": "3DArea" }], + ["ChartUnderlineStyle", ["none", "single"]], + ["ChartDisplayBlanksAs", ["notPlotted", "zero", "interplotted"]], + ["ChartPlotBy", ["rows", "columns"]], + ["ChartSplitType", ["splitByPosition", "splitByValue", "splitByPercentValue", "splitByCustomSplit"]], + ["ChartColorScheme", ["colorfulPalette1", "colorfulPalette2", "colorfulPalette3", "colorfulPalette4", "monochromaticPalette1", "monochromaticPalette2", "monochromaticPalette3", "monochromaticPalette4", "monochromaticPalette5", "monochromaticPalette6", "monochromaticPalette7", "monochromaticPalette8", "monochromaticPalette9", "monochromaticPalette10", "monochromaticPalette11", "monochromaticPalette12", "monochromaticPalette13"]], + ["ChartTrendlineType", ["linear", "exponential", "logarithmic", "movingAverage", "polynomial", "power"]], + ["ShapeZOrder", ["bringToFront", "bringForward", "sendToBack", "sendBackward"]], + ["ShapeType", ["unsupported", "image", "geometricShape", "group", "line"]], + ["ShapeScaleType", ["currentSize", "originalSize"]], + ["ShapeScaleFrom", ["scaleFromTopLeft", "scaleFromMiddle", "scaleFromBottomRight"]], + ["ShapeFillType", ["noFill", "solid", "gradient", "pattern", "pictureAndTexture", "mixed"]], + ["ShapeFontUnderlineStyle", ["none", "single", "double", "heavy", "dotted", "dottedHeavy", "dash", "dashHeavy", "dashLong", "dashLongHeavy", "dotDash", "dotDashHeavy", "dotDotDash", "dotDotDashHeavy", "wavy", "wavyHeavy", "wavyDouble"]], + ["PictureFormat", [], { "unknown": "UNKNOWN", "bmp": "BMP", "jpeg": "JPEG", "gif": "GIF", "png": "PNG", "svg": "SVG" }], + ["ShapeLineStyle", ["single", "thickBetweenThin", "thickThin", "thinThick", "thinThin"]], + ["ShapeLineDashStyle", ["dash", "dashDot", "dashDotDot", "longDash", "longDashDot", "roundDot", "solid", "squareDot", "longDashDotDot", "systemDash", "systemDot", "systemDashDot"]], + ["ArrowheadLength", ["short", "medium", "long"]], + ["ArrowheadStyle", ["none", "triangle", "stealth", "diamond", "oval", "open"]], + ["ArrowheadWidth", ["narrow", "medium", "wide"]], + ["PremiumLicenseName", ["python"]], + ["BindingType", ["range", "table", "text"]], + ["BorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight", "insideVertical", "insideHorizontal", "diagonalDown", "diagonalUp"]], + ["BorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot", "double", "slantDashDot"]], + ["BorderWeight", ["hairline", "thin", "medium", "thick"]], + ["CalculationMode", ["automatic", "automaticExceptTables", "manual"]], + ["RuntimeCalculationMode", [], { "undefined": 0, "automatic": 1, "automaticExceptTables": 2, "manual": 3 }], + ["CalculationType", ["recalculate", "full", "fullRebuild"]], + ["ClearApplyTo", ["all", "formats", "contents", "hyperlinks", "removeHyperlinks"]], + ["VisualCategory", ["column", "bar", "line", "area", "pie", "donut", "scatter", "bubble", "statistical", "stock", "combo", "hierarchy", "surface", "map", "funnel", "radar", "waterfall", "threeD", "other"]], + ["VisualPropertyType", ["object", "collection", "string", "double", "int", "bool", "enum", "color"]], + ["VisualChangeType", ["dataChange", "propertyChange", "genericChange", "selectionChange"]], + ["BoolMetaPropertyType", ["writeOnly", "readOnly", "hideEntireSubtreeUI", "hideMeButShowChildrenUI", "expandableUI", "nextPropOnSameLine", "hideLabel", "showResetUI", "hasOwnExpandableSection", "nextPropOnSameLineFOTP", "showResetUIFOTP", "untransferable", "ignoreDuringChangeChartType", "notTriviallyUndoable", "volatileEnum", "exceptionCollection", "metaOnly", "showHideCollection", "errorMessage", "infoMessage"]], + ["ConditionalDataBarAxisFormat", ["automatic", "none", "cellMidPoint"]], + ["ConditionalDataBarDirection", ["context", "leftToRight", "rightToLeft"]], + ["ConditionalFormatDirection", ["top", "bottom"]], + ["ConditionalFormatType", ["custom", "dataBar", "colorScale", "iconSet", "topBottom", "presetCriteria", "containsText", "cellValue"]], + ["ConditionalFormatRuleType", ["invalid", "automatic", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatIconRuleType", ["invalid", "number", "percent", "formula", "percentile"]], + ["ConditionalFormatColorCriterionType", ["invalid", "lowestValue", "highestValue", "number", "percent", "formula", "percentile"]], + ["ConditionalTopBottomCriterionType", ["invalid", "topItems", "topPercent", "bottomItems", "bottomPercent"]], + ["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"]], + ["ConditionalTextOperator", ["invalid", "contains", "notContains", "beginsWith", "endsWith"]], + ["ConditionalCellValueOperator", ["invalid", "between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqual", "lessThanOrEqual"]], + ["ConditionalIconCriterionOperator", ["invalid", "greaterThan", "greaterThanOrEqual"]], + ["ConditionalRangeBorderIndex", ["edgeTop", "edgeBottom", "edgeLeft", "edgeRight"]], + ["ConditionalRangeBorderLineStyle", ["none", "continuous", "dash", "dashDot", "dashDotDot", "dot"]], + ["ConditionalRangeFontUnderlineStyle", ["none", "single", "double"]], + ["CustomFunctionType", ["invalid", "script", "webService"]], + ["CustomFunctionMetadataFormat", ["invalid", "openApi"]], + ["DataValidationType", ["none", "wholeNumber", "decimal", "list", "date", "time", "textLength", "custom", "inconsistent", "mixedCriteria"]], + ["DataValidationOperator", ["between", "notBetween", "equalTo", "notEqualTo", "greaterThan", "lessThan", "greaterThanOrEqualTo", "lessThanOrEqualTo"]], + ["DataValidationAlertStyle", ["stop", "warning", "information"]], + ["DeleteShiftDirection", ["up", "left"]], + ["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"]], + ["FilterDatetimeSpecificity", ["year", "month", "day", "hour", "minute", "second"]], + ["FilterOn", ["bottomItems", "bottomPercent", "cellColor", "dynamic", "fontColor", "values", "topItems", "topPercent", "icon", "custom"]], + ["FilterOperator", ["and", "or"]], + ["HorizontalAlignment", ["general", "left", "center", "right", "fill", "justify", "centerAcrossSelection", "distributed"]], + ["IconSet", ["invalid", "threeArrows", "threeArrowsGray", "threeFlags", "threeTrafficLights1", "threeTrafficLights2", "threeSigns", "threeSymbols", "threeSymbols2", "fourArrows", "fourArrowsGray", "fourRedToBlack", "fourRating", "fourTrafficLights", "fiveArrows", "fiveArrowsGray", "fiveRating", "fiveQuarters", "threeStars", "threeTriangles", "fiveBoxes"]], + ["ImageFittingMode", ["fit", "fitAndCenter", "fill"]], + ["InsertShiftDirection", ["down", "right"]], + ["NamedItemScope", ["worksheet", "workbook"]], + ["NamedItemType", ["string", "integer", "double", "boolean", "range", "error", "array"]], + ["RangeUnderlineStyle", ["none", "single", "double", "singleAccountant", "doubleAccountant"]], + ["SheetVisibility", ["visible", "hidden", "veryHidden"]], + ["EventTriggerSource", ["unknown", "thisLocalAddin"]], + ["RangeValueType", ["unknown", "empty", "string", "integer", "double", "boolean", "error", "richValue"]], + ["KeyboardDirection", ["left", "right", "up", "down"]], + ["SearchDirection", ["forward", "backwards"]], + ["SortOrientation", ["rows", "columns"]], + ["SortOn", ["value", "cellColor", "fontColor", "icon"]], + ["SortDataOption", ["normal", "textAsNumber"]], + ["SortMethod", ["pinYin", "strokeCount"]], + ["VerticalAlignment", ["top", "center", "bottom", "justify", "distributed"]], + ["MessageCategory", [], { "none": 0, "customFunction": 1, "action": 2, "event": 65536 }], + ["MessageType", [], { "none": 0, "testEvent": 1, "test1Event": 2, "worksheetDataChangedEvent": 10, "worksheetActivatedEvent": 11, "worksheetDeactivatedEvent": 12, "worksheetAddedEvent": 13, "worksheetSelectionChangedEvent": 14, "worksheetDeletedEvent": 15, "worksheetCalculatedEvent": 16, "worksheetFilteredEvent": 17, "worksheetFormatChangedEvent": 18, "worksheetRowSortedEvent": 19, "worksheetColumnSortedEvent": 20, "worksheetSingleClickedEvent": 21, "worksheetRowHiddenChangedEvent": 22, "worksheetFormulaChangedEvent": 23, "worksheetProtectionChangedEvent": 24, "worksheetNameChangedEvent": 25, "worksheetVisibilityChangedEvent": 26, "worksheetMovedEvent": 27, "worksheetNavigationObjectChangedEvent": 28, "worksheetRowHeightChangedEvent": 29, "workbookFormulaReferenceStyleChangedEvent": 30, "chartAddedEvent": 50, "chartActivatedEvent": 51, "chartDeactivatedEvent": 52, "chartDeletedEvent": 53, "tableSelectionChangedEvent": 100, "tableDataChangedEvent": 101, "tableAddedEvent": 102, "tableDeletedEvent": 103, "tableFilteredEvent": 104, "agaveVisualUpdateEvent": 150, "customFunctionExecutionBeginEvent": 200, "customFunctionExecutionEndEvent": 201, "commentAddedEvent": 250, "commentDeletedEvent": 251, "commentChangedEvent": 252, "invocationMessage": 1000, "cancellationMessage": 1001, "metadataMessage": 1002, "visualSelectionChangedEvent": 2000, "visualChangeEvent": 2001, "visualTrackerModelChangedEvent": 2002, "shapeSelectionChangedEvent": 2100, "shapeActivatedEvent": 2101, "shapeDeactivatedEvent": 2102, "shapeAddedEvent": 2103, "shapeDeletedEvent": 2104, "workbookAutoSaveSettingChangedEvent": 2200, "wacoperationEvent": 2201, "recordingStateChangedEvent": 2202, "workbookActivatedEvent": 2203, "workbookNavigationObjectChangedEvent": 2204, "ribbonCommandExecutedEvent": 2300, "linkedDataTypeRefreshRequestCompletedEvent": 2500, "linkedDataTypeRefreshModeChangedEvent": 2501, "linkedDataTypeLinkedDataTypeAddedEvent": 2502, "linkedWorkbookWorkbookLinksChangedEvent": 2600, "linkedWorkbookRefreshCompletedEvent": 2601, "rangePickerSelectionChangedEvent": 2700, "rangePickerDeactivatedEvent": 2701, "lineageActivityUpdateAvailableEvent": 2800, "lineageActivityFilterUpdatedEvent": 2801, "lineageActivityLoadCompletedEvent": 2802, "pivotTableAddedEvent": 2900, "pivotTableDeletedEvent": 2901, "namedItemAddedEvent": 3000, "namedItemDeletedEvent": 3001, "guidedReapplyManagerUpdateAvailableEvent": 3100, "vbaRecorderRecordingChangedEvent": 3200, "vbaRecorderRecordingChanged2Event": 3202, "workbookActionRecordedEvent": 3201, "externalCodeServiceDiagnosticsNewEntryEvent": 3300, "externalCodeServiceDiagnosticsFilterUpdatedEvent": 3301, "rangeValuesPreviewDismissedEvent": 3400, "applicationUndoChangedEvent": 3500, "appRuntimeVisibilityChangedEvent": 65539, "beforeCloseNotifiactionCancelledEvent": 65540, "augmentationLoopAnnotationAddedEvent": 65541 }], + ["InsertDeleteCellsShiftDirection", ["none", "shiftCellLeft", "shiftCellUp", "shiftCellRight", "shiftCellDown"]], + ["DocumentPropertyType", ["number", "boolean", "date", "string", "float"]], + ["EventSource", ["local", "remote"]], + ["DataChangeType", ["unknown", "rangeEdited", "rowInserted", "rowDeleted", "columnInserted", "columnDeleted", "cellInserted", "cellDeleted"]], + ["RowHiddenChangeType", ["unhidden", "hidden"]], + ["CommentChangeType", ["commentEdited", "commentResolved", "commentReopened", "replyAdded", "replyDeleted", "replyEdited"]], + ["EventType", ["worksheetChanged", "worksheetSelectionChanged", "worksheetAdded", "worksheetActivated", "worksheetDeactivated", "tableChanged", "tableSelectionChanged", "worksheetDeleted", "chartAdded", "chartActivated", "chartDeactivated", "chartDeleted", "worksheetCalculated", "visualSelectionChanged", "agaveVisualUpdate", "tableAdded", "tableDeleted", "tableFiltered", "worksheetFiltered", "shapeActivated", "shapeDeactivated", "visualChange", "workbookAutoSaveSettingChanged", "worksheetFormatChanged", "ribbonCommandExecuted", "worksheetRowSorted", "worksheetColumnSorted", "worksheetSingleClicked", "worksheetRowHiddenChanged", "recordingStateChangedEvent", "commentAdded", "commentDeleted", "commentChanged", "linkedDataTypeRefreshRequestCompleted", "linkedDataTypeRefreshModeChanged", "linkedDataTypeLinkedDataTypeAdded", "worksheetFormulaChanged", "workbookActivated", "linkedWorkbookWorkbookLinksChanged", "linkedWorkbookRefreshCompleted", "worksheetProtectionChanged", "worksheetNameChanged", "worksheetVisibilityChanged", "worksheetMoved", "lineageActivityUpdateAvailable", "lineageActivityFilterUpdated", "lineageActivityLoadCompleted", "shapeAdded", "shapeDeleted", "pivotTableAdded", "pivotTableDeleted", "namedItemAdded", "namedItemDeleted", "worksheetNavigationObjectChanged", "workbookNavigationObjectChanged", "worksheetRowHeightChanged", "workbookFormulaReferenceStyleChanged", "guidedReapplyManagerUpdateAvailable", "vbaRecorderRecordingChanged", "rangeValuesPreviewDismissed", "annotationAdded", "workbookActionRecorded", "applicationUndoChanged", "vbaRecorderRecordingChanged2"], { "wacoperationEvent": "WACOperationEvent" }], + ["DocumentPropertyItem", ["title", "subject", "author", "keywords", "comments", "template", "lastAuth", "revision", "appName", "lastPrint", "creation", "lastSave", "category", "format", "manager", "company"]], + ["SubtotalLocationType", ["atTop", "atBottom", "off"]], + ["PivotLayoutType", ["compact", "tabular", "outline"]], + ["ProtectionSelectionMode", ["normal", "unlocked", "none"]], + ["PageOrientation", ["portrait", "landscape"]], + ["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"]], + ["ReadingOrder", ["context", "leftToRight", "rightToLeft"]], + ["BuiltInStyle", ["normal", "comma", "currency", "percent", "wholeComma", "wholeDollar", "hlink", "hlinkTrav", "note", "warningText", "emphasis1", "emphasis2", "emphasis3", "sheetTitle", "heading1", "heading2", "heading3", "heading4", "input", "output", "calculation", "checkCell", "linkedCell", "total", "good", "bad", "neutral", "accent1", "accent1_20", "accent1_40", "accent1_60", "accent2", "accent2_20", "accent2_40", "accent2_60", "accent3", "accent3_20", "accent3_40", "accent3_60", "accent4", "accent4_20", "accent4_40", "accent4_60", "accent5", "accent5_20", "accent5_40", "accent5_60", "accent6", "accent6_20", "accent6_40", "accent6_60", "explanatoryText"]], + ["PrintErrorType", ["asDisplayed", "blank", "dash", "notAvailable"]], + ["WorksheetPositionType", ["none", "before", "after", "beginning", "end"]], + ["PrintComments", ["noComments", "endSheet", "inPlace"]], + ["PrintOrder", ["downThenOver", "overThenDown"]], + ["PrintMarginUnit", ["points", "inches", "centimeters"]], + ["HeaderFooterState", ["default", "firstAndDefault", "oddAndEven", "firstOddAndEven"]], + ["AutoFillType", ["fillDefault", "fillCopy", "fillSeries", "fillFormats", "fillValues", "fillDays", "fillWeekdays", "fillMonths", "fillYears", "linearTrend", "growthTrend", "flashFill"]], + ["GroupOption", ["byRows", "byColumns"]], + ["RangeCopyType", ["all", "formulas", "values", "formats", "link"]], + ["LinkedDataTypeState", ["none", "validLinkedData", "disambiguationNeeded", "brokenLinkedData", "fetchingData"]], + ["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"]], + ["ConnectorType", ["straight", "elbow", "curve"]], + ["ContentType", ["plain", "mention"]], + ["SpecialCellType", ["conditionalFormats", "dataValidations", "blanks", "constants", "formulas", "sameConditionalFormat", "sameDataValidation", "visible"]], + ["SpecialCellValueType", ["all", "errors", "errorsLogical", "errorsNumbers", "errorsText", "errorsLogicalNumber", "errorsLogicalText", "errorsNumberText", "logical", "logicalNumbers", "logicalText", "logicalNumbersText", "numbers", "numbersText", "text"]], + ["Placement", ["twoCell", "oneCell", "absolute"]], + ["FillPattern", ["none", "solid", "gray50", "gray75", "gray25", "horizontal", "vertical", "down", "up", "checker", "semiGray75", "lightHorizontal", "lightVertical", "lightDown", "lightUp", "grid", "crissCross", "gray16", "gray8", "linearGradient", "rectangularGradient"]], + ["ShapeTextHorizontalAlignment", ["left", "center", "right", "justify", "justifyLow", "distributed", "thaiDistributed"]], + ["ShapeTextVerticalAlignment", ["top", "middle", "bottom", "justified", "distributed"]], + ["ShapeTextVerticalOverflow", ["overflow", "ellipsis", "clip"]], + ["ShapeTextHorizontalOverflow", ["overflow", "clip"]], + ["ShapeTextReadingOrder", ["leftToRight", "rightToLeft"]], + ["ShapeTextOrientation", ["horizontal", "vertical", "vertical270", "wordArtVertical", "eastAsianVertical", "mongolianVertical", "wordArtVerticalRTL"]], + ["ShapeAutoSize", ["autoSizeNone", "autoSizeTextToFitShape", "autoSizeShapeToFitText", "autoSizeMixed"]], + ["CloseBehavior", ["save", "skipSave"]], + ["SaveBehavior", ["save", "prompt"]], + ["SlicerSortType", ["dataSourceOrder", "ascending", "descending"]], + ["RibbonTab", ["others", "home", "insert", "draw", "pageLayout", "formulas", "data", "review", "view", "developer", "addIns", "help"]], + ["NumberFormatCategory", ["general", "number", "currency", "accounting", "date", "time", "percentage", "fraction", "scientific", "text", "special", "custom"]]], + "clientObjectTypes": [["UndoScope", + 0, + 0, + 0, + [["close", + 0, + 0, + 0, + 2], + ["open", + 1, + 0, + 0, + 2]]], + ["RangeValuesPreview", + 4, + 0, + 0, + [["_RegisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventDismissed", + 0, + 0, + 0, + 2, + 0, + 1], + ["dismiss", + 0, + 2, + 0, + 4], + ["show", + 3, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Dismissed", + 0, + 0, + "MessageType.rangeValuesPreviewDismissedEvent", + "this._ParentObject.id", + "_RegisterEventDismissed", + "_UnregisterEventDismissed"]]], + ["AugmentationLoop", + 0, + 0, + 0, + [["_RegisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterAnnotationAddedEvent", + 0, + 2, + 0, + 4], + ["activateAnnotation", + 1, + 2, + 0, + 4], + ["submitSignal", + 1, + 2, + 0, + 4]], + 0, + 0, + 0, + [["AnnotationAdded", + 0, + 0, + "MessageType.augmentationLoopAnnotationAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAnnotationAddedEvent", + "_UnregisterAnnotationAddedEvent"]]], + ["ExternalCodeService", + 0, + 0, + [["diagnostics", + "ExternalCodeServiceDiagnostics", + 2, + 0, + 0, + 4]]], + ["ExternalCodeServiceDiagnostics", + 0, + [["id", + 2]], + 0, + [["_RegisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventNewEntry", + 0, + 0, + 0, + 2, + 0, + 1], + ["clear", + 0, + 2, + 0, + 4], + ["fireStoredEntries", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventFilterUpdated", + 0, + 0, + 0, + 2, + 0, + 1]], + 0, + 0, + 0, + [["FilterUpdated", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent", + "this.id", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["NewEntry", + 0, + 0, + "MessageType.externalCodeServiceDiagnosticsNewEntryEvent", + "this.id", + "_RegisterEventNewEntry", + "_UnregisterEventNewEntry"]]], + ["VbaRecorder", + 0, + [["id", + 2]], + 0, + [["_RegisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterEventRecordingChanged", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterEventRecordingChanged2", + 0, + 2, + 2, + 4], + ["_UnregisterEventRecordingChanged2", + 0, + 2, + 2, + 4]], + 0, + 0, + 0, + [["RecordingChanged", + 0, + 0, + "MessageType.vbaRecorderRecordingChangedEvent", + "this.id", + "_RegisterEventRecordingChanged", + "_UnregisterEventRecordingChanged"], + ["RecordingChanged2", + 0, + 2, + "MessageType.vbaRecorderRecordingChanged2Event", + "this.id", + "_RegisterEventRecordingChanged2", + "_UnregisterEventRecordingChanged2"]]], + ["WorksheetOptimizationScanResult", + 0, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + [["ranges", + "RangeOptimizationCollection", + 18, + 0, + 0, + 4]]], + ["UserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity"], + ["GuidedReapplyManager", + 0, + 0, + [["activities", + "UserActivityCollection", + 18, + 0, + 0, + 4], + ["summaryCardUserActivity", + "SummaryCardUserActivity", + 2, + 0, + 0, + 4]], + [["openSavedFile", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["discardActivites", + 0, + 2, + 0, + 4], + ["reapplyActivity", + 1, + 2, + 0, + 4], + ["saveActivities", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["UpdateAvailable", + 0, + 0, + "MessageType.guidedReapplyManagerUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["BusinessBar", + 0, + 0, + 0, + [["hide", + 2], + ["show", + 2]]], + ["UserActivity", + 0, + [["activityId", + 2], + ["activityType", + 2], + ["author", + 2], + ["createdDateTime", + 10], + ["guid", + 2], + ["rangeAddress", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2], + ["authorEmail", + 2], + ["locationDeleted", + 2]], + [["highlightRangeAreas", + "RangeAreas", + 2, + 0, + 0, + 4]]], + ["LineageActivityCollection", + 1, + 0, + 0, + [["_RegisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["_UnregisterEventUpdateAvailable", + 0, + 2, + 0, + 4], + ["clear", + 0, + 2, + 0, + 4], + ["getCount", + 0, + 2, + 0, + 4], + ["getState", + 0, + 2, + 0, + 4], + ["loadActivities", + 1, + 2, + 0, + 4], + ["loadLatestActivities", + 0, + 2, + 0, + 4], + ["loadNextActivities", + 0, + 2, + 0, + 4], + ["loadPreviousActivities", + 0, + 2, + 0, + 4], + ["updateActivities", + 0, + 2, + 0, + 4], + ["_RegisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_RegisterEventLoadCompleted", + 0, + 2, + 0, + 4], + ["_UnregisterEventFilterUpdated", + 0, + 2, + 0, + 4], + ["_UnregisterEventLoadCompleted", + 0, + 2, + 0, + 4]], + [["getItemAt", + "UserActivity", + 1, + 2, + 0, + 4]], + 0, + "UserActivity", + [["FilterUpdated", + 0, + 0, + "MessageType.lineageActivityFilterUpdatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFilterUpdated", + "_UnregisterEventFilterUpdated"], + ["LoadCompleted", + 0, + 0, + "MessageType.lineageActivityLoadCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventLoadCompleted", + "_UnregisterEventLoadCompleted"], + ["UpdateAvailable", + 0, + 0, + "MessageType.lineageActivityUpdateAvailableEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUpdateAvailable", + "_UnregisterEventUpdateAvailable"]]], + ["SummaryItemUserActivity", + 0, + [["activityType", + 2], + ["rangeAddresses", + 2], + ["sheetName", + 2], + ["valueChangeData", + 2]]], + ["SummaryItemUserActivityCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SummaryItemUserActivity", + 1, + 2, + 0, + 4]], + 0, + "SummaryItemUserActivity"], + ["SummaryCardUserActivity", + 0, + [["authors", + 2], + ["currentUser", + 2], + ["displayTime", + 10], + ["numberOfDetailedCard", + 2], + ["summaryUnviewableData", + 2]], + [["summaryItemUserActivities", + "SummaryItemUserActivityCollection", + 18, + 0, + 0, + 4]]], + ["AllowEditRange", + 0, + [["address", + 1], + ["isPasswordProtected", + 3], + ["title", + 1]], + 0, + [["delete"], + ["pauseProtection", + 1], + ["setPassword", + 1]]], + ["AllowEditRangeCollection", + 1, + 0, + 0, + [["add", + 3], + ["getCount", + 0, + 2, + 0, + 4], + ["pauseProtection", + 1]], + [["getItem", + "AllowEditRange", + 1, + 18, + 0, + 4], + ["getItemAt", + "AllowEditRange", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "AllowEditRange", + 1, + 2, + 0, + 4]], + 0, + "AllowEditRange"], + ["Query", + 0, + [["loadedTo", + 2], + ["loadedToDataModel", + 2], + ["name", + 2], + ["refreshDate", + 10], + ["rowsLoadedCount", + 2], + ["error", + 2]]], + ["QueryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Query", + 1, + 18, + 0, + 4]], + 0, + "Query"], + ["VisualTracker", + 0, + [["id", + 2]], + 0, + [["_RegisterEventModelChanged", + 0, + 2], + ["_UnregisterEventModelChanged", + 0, + 2], + ["requestTrackingAlteration", + 2, + 2, + 0, + 4]], + 0, + 0, + 0, + [["ModelChanged", + 0, + 0, + "MessageType.visualTrackerModelChangedEvent", + "this.id", + "_RegisterEventModelChanged", + "_UnregisterEventModelChanged"]]], + ["NumberFormatProperty", + 0, + [["key", + 3], + ["currency", + 3], + ["dateTime", + 3], + ["dateTimeHasDayOfWeek", + 3], + ["dateTimeHasMonth", + 3], + ["dateTimeHasYear", + 3], + ["numeric", + 3], + ["percent", + 3], + ["text", + 3]]], + ["NumberFormatPropertyCollection", + 1, + 0, + 0, + 0, + [["getItemAt", + "NumberFormatProperty", + 1, + 2, + 0, + 4]], + 0, + "NumberFormatProperty"], + ["RangeOptimization", + 0, + [["optimizationTypes", + 2], + ["range", + 2]]], + ["RangeOptimizationCollection", + 1, + [["allocatedCells", + 2], + ["optimizableCells", + 2]], + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeOptimization", + 1, + 2, + 0, + 4]], + 0, + "RangeOptimization"], + ["WorksheetOptimization", + 0, + 0, + 0, + 0, + [["optimize", + "WorksheetOptimizationResult", + 0, + 0, + 0, + 2], + ["scan", + "RangeOptimizationCollection", + 0, + 6, + 0, + 4], + ["scanExtended", + "WorksheetOptimizationScanResult", + 0, + 2, + 0, + 4]]], + ["WorksheetOptimizationResult", + 0, + [["allocatedCells", + 2], + ["optimizedCells", + 2]]], + ["LinkedWorkbook", + 0, + [["displayUrl", + 2, + 3], + ["fileName", + 3, + 3], + ["id", + 2], + ["longErrorDescription", + 2, + 3], + ["refreshEnabled", + 2, + 3], + ["refreshing", + 2, + 3], + ["statusMessage", + 2, + 3], + ["excelIconState", + 2, + 3], + ["hardToFindErrorMessages", + 2, + 3], + ["lastUpdated", + 10, + 3]], + 0, + [["_RegisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterRefreshCompletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["breakLinks"], + ["changeSource", + 1, + 0, + 3], + ["findNextLink", + 0, + 2, + 3, + 4], + ["openWorkbook", + 0, + 2, + 3, + 4], + ["refresh"], + ["openChangeSourceDialog", + 0, + 0, + 3], + ["closeChangeSourceDialog", + 0, + 0, + 3]], + 0, + 0, + 0, + [["RefreshCompleted", + 0, + 3, + "MessageType.linkedWorkbookRefreshCompletedEvent", + "this.id", + "_RegisterRefreshCompletedEvent", + "_UnregisterRefreshCompletedEvent"]]], + ["LinkedWorkbookCollection", + 1, + [["breakAllLinksEnabled", + 0, + 3], + ["refreshAllEnabled", + 0, + 3], + ["workbookLinksRefreshMode"], + ["workbookLinksRefreshSettings", + 0, + 3], + ["containsNonWorkbookLinks", + 0, + 3]], + 0, + [["_RegisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["_UnregisterWorkbookLinksChangedEvent", + 0, + 2, + 3, + 4], + ["breakAllLinks"], + ["getCount", + 0, + 2, + 3, + 4], + ["refreshAll"], + ["openEditLinksDialog", + 0, + 2, + 3, + 4]], + [["getItem", + "LinkedWorkbook", + 1, + 18, + 0, + 4], + ["getItemAt", + "LinkedWorkbook", + 1, + 2, + 3, + 4], + ["getItemOrNullObject", + "LinkedWorkbook", + 1]], + 0, + "LinkedWorkbook", + [["WorkbookLinksChanged", + 0, + 3, + "MessageType.linkedWorkbookWorkbookLinksChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWorkbookLinksChangedEvent", + "_UnregisterWorkbookLinksChangedEvent"]]], + ["DocumentTaskChange", + 0, + [["type", + 2], + ["changedBy", + 2], + ["commentId", + 2], + ["createdDateTime", + 10], + ["id", + 2], + ["assignee", + 2], + ["undoChangeId", + 2], + ["priority", + 2], + ["title", + 2], + ["percentComplete", + 2], + ["startDateTime", + 10], + ["dueDateTime", + 10]], + 0, + 0, + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.DocumentTaskChange", + 4], + ["DocumentTaskChangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "DocumentTaskChange", + 1, + 2, + 0, + 4]], + 0, + "DocumentTaskChange"], + ["RangePicker", + 0, + 0, + 0, + [["activate", + 1, + 0, + 0, + 2, + 0, + 4], + ["deactivate", + 0, + 0, + 0, + 2, + 0, + 4], + ["updateSelection", + 1, + 0, + 0, + 2, + 0, + 4], + ["updateSelectionWithNavigation", + 4, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_UnregisterEventSelectionChanged", + 0, + 0, + 0, + 2, + 0, + 4], + ["_RegisterEventDeactivated", + 0, + 2, + 0, + 4], + ["_UnregisterEventDeactivated", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + [["Deactivated", + 0, + 0, + "MessageType.rangePickerDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventDeactivated", + "_UnregisterEventDeactivated"], + ["SelectionChanged", + 0, + 0, + "MessageType.rangePickerSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventSelectionChanged", + "_UnregisterEventSelectionChanged"]]], + ["DocumentTask", + 0, + [["startAndDueDateTime"], + ["id", + 2], + ["percentComplete"], + ["priority"], + ["title"], + ["assignees", + 2], + ["completedBy", + 2], + ["completedDateTime", + 10], + ["createdBy", + 2], + ["createdDateTime", + 10]], + [["changes", + "DocumentTaskChangeCollection", + 18, + 0, + 0, + 4], + ["comment", + "Comment", + 2, + 0, + 0, + 4]], + [["assign", + 1], + ["unassign", + 1], + ["unassignAll"]]], + ["DocumentTaskCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "DocumentTask", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DocumentTask", + 1, + 2, + 0, + 4], + ["getItemAt", + "DocumentTask", + 1, + 2, + 0, + 4]], + 0, + "DocumentTask"], + ["DataConnection", + 0, + [["connectionString", + 2], + ["name", + 2], + ["commandText", + 2], + ["dataSourceType", + 2]]], + ["Runtime", + 0, + [["enableEvents", + 1, + 5]]], + ["Application", + 0, + [["calculationMode", + 1], + ["calculationEngineVersion", + 3, + 6], + ["calculationState", + 3, + 6], + ["decimalSeparator", + 3, + 7], + ["thousandsSeparator", + 3, + 7], + ["useSystemSeparators", + 3, + 7], + ["formatStaleValues", + 1, + 8]], + [["iterativeCalculation", + "IterativeCalculation", + 35, + 6, + 0, + 4], + ["ribbon", + "Ribbon", + 35, + 6, + 0, + 4], + ["cultureInfo", + "CultureInfo", + 3, + 7, + 0, + 4], + ["undoScope", + "UndoScope", + 3, + 3, + 0, + 4]], + [["calculate", + 1], + ["suspendApiCalculationUntilNextSync", + 0, + 1, + 9, + 2, + 0, + 10], + ["suspendScreenUpdatingUntilNextSync", + 0, + 0, + 6, + 2, + 0, + 10], + ["hasLicense", + 1, + 2, + 8, + 4], + ["redo", + 0, + 0, + 3, + 2], + ["explorePremiumLicense", + 1, + 2, + 8, + 4], + ["undo", + 0, + 0, + 3, + 2], + ["_RegisterEventUndoChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventUndoChanged", + 0, + 2, + 3, + 4]], + [["createWorkbook", + "WorkbookCreated", + 1, + 10, + 5, + 0, + 0, + "_GetWorkbookCreatedById"], + ["_GetWorkbookCreatedById", + "WorkbookCreated", + 1, + 2, + 5, + 4]], + 0, + 0, + [["UndoChanged", + 0, + 3, + "MessageType.applicationUndoChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventUndoChanged", + "_UnregisterEventUndoChanged"]]], + ["IterativeCalculation", + 0, + [["enabled", + 1], + ["maxIteration", + 1], + ["maxChange", + 1]]], + ["Workbook", + 0, + [["name", + 3, + 11], + ["readOnly", + 3, + 5], + ["isDirty", + 1, + 6], + ["use1904DateSystem", + 1, + 8], + ["chartDataPointTrack", + 1, + 6], + ["usePrecisionAsDisplayed", + 1, + 6], + ["calculationEngineVersion", + 3, + 6], + ["autoSave", + 3, + 6], + ["previouslySaved", + 3, + 6], + ["showPivotFieldList", + 0, + 8, + 0, + 2, + 12], + ["formulaReferenceStyle", + 2, + 3]], + [["worksheets", + "WorksheetCollection", + 19, + 0, + 0, + 4], + ["names", + "NamedItemCollection", + 19, + 0, + 0, + 4], + ["tables", + "TableCollection", + 19, + 0, + 0, + 4], + ["application", + "Application", + 2, + 0, + 0, + 4], + ["bindings", + "BindingCollection", + 19, + 0, + 0, + 4], + ["functions", + "Functions", + 2, + 13, + 0, + 4], + ["_V1Api", + "_V1Api", + 2, + 14, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 19, + 14, + 0, + 4], + ["settings", + "SettingCollection", + 19, + 15, + 0, + 4], + ["customXmlParts", + "CustomXmlPartCollection", + 19, + 16, + 0, + 4], + ["internalTest", + "InternalTest", + 2, + 9, + 0, + 4], + ["properties", + "DocumentProperties", + 35, + 11, + 0, + 4], + ["styles", + "StyleCollection", + 19, + 11, + 0, + 4], + ["protection", + "WorkbookProtection", + 3, + 11, + 0, + 4], + ["dataConnections", + "DataConnectionCollection", + 3, + 11, + 0, + 4], + ["_Runtime", + "Runtime", + 2, + 16, + 0, + 4], + ["comments", + "CommentCollection", + 19, + 17, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["tableStyles", + "TableStyleCollection", + 19, + 17, + 0, + 4], + ["pivotTableStyles", + "PivotTableStyleCollection", + 19, + 17, + 0, + 4], + ["slicerStyles", + "SlicerStyleCollection", + 19, + 17, + 0, + 4], + ["timelineStyles", + "TimelineStyleCollection", + 19, + 17, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["linkedDataTypes", + "LinkedDataTypeCollection", + 18, + 8, + 0, + 4], + ["queries", + "QueryCollection", + 18, + 18, + 0, + 4], + ["linkedWorkbooks", + "LinkedWorkbookCollection", + 18, + 19, + 0, + 4], + ["rangePicker", + "RangePicker", + 2, + 8, + 0, + 4, + 0, + 4], + ["lineageActivities", + "LineageActivityCollection", + 18, + 3, + 0, + 4], + ["businessBar", + "BusinessBar", + 2, + 8, + 0, + 4], + ["guidedReapply", + "GuidedReapplyManager", + 2, + 3, + 0, + 4], + ["vbaRecorder", + "VbaRecorder", + 2, + 8, + 0, + 4], + ["externalCodeService", + "ExternalCodeService", + 2, + 8, + 0, + 4], + ["augmentationLoop", + "AugmentationLoop", + 2, + 8, + 0, + 4]], + [["_RemoveReference", + 1, + 2], + ["_GetObjectByReferenceId", + 1, + 2, + 0, + 4], + ["_GetObjectTypeNameByReferenceId", + 1, + 2, + 0, + 4], + ["_RemoveAllReferences", + 0, + 2], + ["_GetReferenceCount", + 0, + 2, + 0, + 4], + ["getIsActiveCollabSession", + 0, + 0, + 6], + ["registerCustomFunctions", + 7, + 0, + 20, + 8], + ["_SetOsfControlContainerReadyForCustomFunctions", + 0, + 0, + 20], + ["close", + 1, + 0, + 7], + ["save", + 1, + 0, + 7], + ["_RegisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAutoSaveSettingChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_UnregisterWACOperationEvent", + 0, + 2, + 21, + 4], + ["_RegisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_UnregisterRecordingStateChangedEvent", + 0, + 0, + 21, + 2, + 0, + 22], + ["_RegisterActivatedEvent", + 0, + 2, + 23], + ["_UnregisterActivatedEvent", + 0, + 2, + 23], + ["insertWorksheetsFromBase64", + 2, + 0, + 23], + ["enableOfficeScriptRecording", + 1, + 1, + 19], + ["recordAction", + 1, + 3, + 0, + 4], + ["focus", + 0, + 2, + 3, + 4], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["showHelp", + 1, + 2, + 3, + 4], + ["getLinkedEntityCellValue", + 1, + 2, + 24, + 4], + ["getThemeColors", + 0, + 2, + 8, + 4], + ["_RegisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["_UnregisterEventFormulaReferenceStyleChanged", + 0, + 2, + 3, + 4], + ["notifySDXLoaded", + 1, + 2, + 3, + 4], + ["openConditionalFormattingRulesManager", + 1, + 0, + 3], + ["openNameManager", + 0, + 0, + 3], + ["_RegisterEventActionRecorded", + 0, + 2, + 2, + 4], + ["_UnregisterEventActionRecorded", + 0, + 2, + 2, + 4]], + [["getSelectedRange", + "Range", + 0, + 10, + 0, + 4], + ["getActiveCell", + "Range", + 0, + 10, + 11, + 4], + ["_GetRangeForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["_GetRangeOrNullObjectForEventByReferenceId", + "Range", + 1, + 2, + 0, + 4], + ["getActiveChart", + "Chart", + 0, + 2, + 6, + 4], + ["getActiveChartOrNullObject", + "Chart", + 0, + 2, + 6, + 4], + ["getSelectedRanges", + "RangeAreas", + 0, + 10, + 6, + 4], + ["_GetRangesForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["_GetRangesOrNullObjectForEventByReferenceId", + "RangeAreas", + 1, + 2, + 6, + 4], + ["getActiveSlicer", + "Slicer", + 0, + 2, + 17, + 4], + ["getActiveSlicerOrNullObject", + "Slicer", + 0, + 2, + 17, + 4]], + 0, + 0, + [["ActionRecorded", + 0, + 2, + "MessageType.workbookActionRecordedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventActionRecorded", + "_UnregisterEventActionRecorded"], + ["Activated", + 0, + 23, + "MessageType.workbookActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["AutoSaveSettingChanged", + 0, + 6, + "MessageType.workbookAutoSaveSettingChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAutoSaveSettingChangedEvent", + "_UnregisterAutoSaveSettingChangedEvent"], + ["FormulaReferenceStyleChanged", + 0, + 3, + "MessageType.workbookFormulaReferenceStyleChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventFormulaReferenceStyleChanged", + "_UnregisterEventFormulaReferenceStyleChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.workbookNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["RecordingStateChangedEvent", + 0, + 21, + "MessageType.recordingStateChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRecordingStateChangedEvent", + "_UnregisterRecordingStateChangedEvent"], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdDocumentSelectionChangedEvent", + "", + "", + ""], + ["WACOperationEvent", + 2, + 21, + "MessageType.wacoperationEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterWACOperationEvent", + "_UnregisterWACOperationEvent"], + ["_Message", + 3, + 11, + "_CC.office10EventIdRichApiMessageEvent", + "", + "", + ""]]], + ["WorkbookProtection", + 0, + [["protected", + 3]], + 0, + [["protect", + 1], + ["unprotect", + 1]]], + ["WorkbookCreated", + 0, + [["id", + 3]], + 0, + [["open", + 0, + 2, + 0, + 4]]], + ["Worksheet", + 0, + [["name", + 1], + ["id", + 3], + ["position", + 1], + ["visibility", + 1], + ["tabColor", + 1, + 11, + 0, + 2, + 25], + ["standardWidth", + 1, + 11], + ["standardHeight", + 3, + 11], + ["showGridlines", + 5, + 5, + 0, + 2, + 26], + ["showHeadings", + 5, + 5], + ["enableCalculation", + 1, + 6], + ["tabId", + 3, + 18]], + [["charts", + "ChartCollection", + 83, + 0, + 0, + 4], + ["tables", + "TableCollection", + 83, + 0, + 0, + 4], + ["protection", + "WorksheetProtection", + 3, + 13, + 0, + 4], + ["pivotTables", + "PivotTableCollection", + 83, + 14, + 0, + 4], + ["names", + "NamedItemCollection", + 83, + 15, + 0, + 4], + ["freezePanes", + "WorksheetFreezePanes", + 3, + 11, + 0, + 4], + ["pageLayout", + "PageLayout", + 35, + 6, + 0, + 4], + ["visuals", + "VisualCollection", + 83, + 17, + 0, + 4], + ["shapes", + "ShapeCollection", + 83, + 6, + 0, + 4], + ["horizontalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["verticalPageBreaks", + "PageBreakCollection", + 19, + 6, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["slicers", + "SlicerCollection", + 19, + 17, + 0, + 4], + ["comments", + "CommentCollection", + 83, + 17, + 0, + 4], + ["customProperties", + "WorksheetCustomPropertyCollection", + 19, + 27, + 0, + 4], + ["namedSheetViews", + "NamedSheetViewCollection", + 18, + 19, + 0, + 4], + ["optimization", + "WorksheetOptimization", + 2, + 8, + 0, + 4], + ["tasks", + "DocumentTaskCollection", + 18, + 8, + 0, + 4], + ["visualTracker", + "VisualTracker", + 2, + 28, + 0, + 4], + ["rangeValuesPreview", + "RangeValuesPreview", + 66, + 8, + 0, + 4]], + [["delete"], + ["activate", + 0, + 2], + ["calculate", + 1, + 0, + 9], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 10], + ["_RegisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["replaceAll", + 3, + 0, + 6], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterRowSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterColumnSortedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 1], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["showOutlineLevels", + 2, + 0, + 17], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventNameChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventVisibilityChanged", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterNavigationObjectChangedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getRange", + "Range", + 1, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRangeByIndexes", + "Range", + 4, + 10, + 11, + 4], + ["getPrevious", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getPreviousOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNext", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["getNextOrNullObject", + "Worksheet", + 1, + 10, + 16, + 4, + 0, + "_GetSheetById"], + ["_GetSheetById", + "Worksheet", + 1, + 2, + 11, + 4], + ["copy", + "Worksheet", + 2, + 0, + 11, + 0, + 0, + "_GetAnotherWorksheetById"], + ["_GetAnotherWorksheetById", + "Worksheet", + 1, + 0, + 11], + ["findAll", + "RangeAreas", + 2, + 10, + 6, + 4], + ["findAllOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getRanges", + "RangeAreas", + 1, + 10, + 6, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 0, + 3], + ["getRangeR1C1", + "Range", + 1, + 2, + 3, + 4], + ["getRangesR1C1", + "RangeAreas", + 1, + 2, + 3, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 0, + 3]], + "workbook.worksheets", + 0, + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "this.id", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 11, + "MessageType.worksheetDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "this.id", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "this.id", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "this.id", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "this.id", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["NavigationObjectChanged", + 0, + 3, + "MessageType.worksheetNavigationObjectChangedEvent", + "this.id", + "_RegisterNavigationObjectChangedEvent", + "_UnregisterNavigationObjectChangedEvent"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "this.id", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "this.id", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "this.id", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "this.id", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 11, + "MessageType.worksheetSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "this.id", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "this.id", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetCollection", + 1, + 0, + 0, + [["getCount", + 1, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 3, + 11], + ["_UnregisterAddedEvent", + 0, + 3, + 11], + ["_RegisterActivatedEvent", + 0, + 3, + 11], + ["_UnregisterActivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 11, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 3, + 11], + ["_UnregisterDeletedEvent", + 0, + 3, + 11], + ["_RegisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterCalculatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 3, + 6], + ["_UnregisterDataChangedEvent", + 0, + 3, + 6], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 6, + 2, + 0, + 29], + ["addFromBase64", + 4, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_RegisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterFormatChangedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterRowSortedEvent", + 0, + 3, + 17], + ["_UnregisterRowSortedEvent", + 0, + 3, + 17], + ["_RegisterColumnSortedEvent", + 0, + 3, + 17], + ["_UnregisterColumnSortedEvent", + 0, + 3, + 17], + ["_RegisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_UnregisterSingleClickedEvent", + 0, + 0, + 17, + 2, + 0, + 29], + ["_RegisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_UnregisterRowHiddenChangedEvent", + 0, + 0, + 7, + 2, + 0, + 1], + ["_RegisterFormulaChangedEvent", + 0, + 2, + 23], + ["_UnregisterFormulaChangedEvent", + 0, + 2, + 23], + ["_RegisterProtectionChangedEvent", + 0, + 2, + 18], + ["_UnregisterProtectionChangedEvent", + 0, + 2, + 18], + ["_RegisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventNameChanged", + 0, + 2, + 30, + 4], + ["_UnregisterEventVisibilityChanged", + 0, + 2, + 30, + 4], + ["_RegisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_UnregisterEventMoved", + 0, + 0, + 30, + 2, + 0, + 1], + ["_RegisterEventRowHeightChanged", + 0, + 2, + 8], + ["_UnregisterEventRowHeightChanged", + 0, + 2, + 8]], + [["getItem", + "Worksheet", + 1, + 18, + 0, + 4], + ["add", + "Worksheet", + 1, + 8, + 0, + 2, + 0, + 0, + 29], + ["getActiveWorksheet", + "Worksheet", + 0, + 2, + 0, + 4], + ["getItemOrNullObject", + "Worksheet", + 1, + 2, + 15, + 4], + ["getFirst", + "Worksheet", + 1, + 10, + 16, + 4], + ["getLast", + "Worksheet", + 1, + 10, + 16, + 4]], + 0, + "Worksheet", + [["Activated", + 0, + 11, + "MessageType.worksheetActivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 11, + "MessageType.worksheetAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Calculated", + 0, + 5, + "MessageType.worksheetCalculatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCalculatedEvent", + "_UnregisterCalculatedEvent"], + ["Changed", + 2, + 6, + "MessageType.worksheetDataChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["ColumnSorted", + 0, + 17, + "MessageType.worksheetColumnSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterColumnSortedEvent", + "_UnregisterColumnSortedEvent"], + ["Deactivated", + 0, + 11, + "MessageType.worksheetDeactivatedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 11, + "MessageType.worksheetDeletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.worksheetFilteredEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["FormatChanged", + 2, + 6, + "MessageType.worksheetFormatChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormatChangedEvent", + "_UnregisterFormatChangedEvent"], + ["FormulaChanged", + 2, + 23, + "MessageType.worksheetFormulaChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterFormulaChangedEvent", + "_UnregisterFormulaChangedEvent"], + ["Moved", + 0, + 30, + "MessageType.worksheetMovedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventMoved", + "_UnregisterEventMoved"], + ["NameChanged", + 0, + 30, + "MessageType.worksheetNameChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventNameChanged", + "_UnregisterEventNameChanged"], + ["ProtectionChanged", + 0, + 18, + "MessageType.worksheetProtectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterProtectionChangedEvent", + "_UnregisterProtectionChangedEvent"], + ["RowHeightChanged", + 0, + 8, + "MessageType.worksheetRowHeightChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventRowHeightChanged", + "_UnregisterEventRowHeightChanged"], + ["RowHiddenChanged", + 0, + 7, + "MessageType.worksheetRowHiddenChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowHiddenChangedEvent", + "_UnregisterRowHiddenChangedEvent"], + ["RowSorted", + 0, + 17, + "MessageType.worksheetRowSortedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRowSortedEvent", + "_UnregisterRowSortedEvent"], + ["SelectionChanged", + 0, + 6, + "MessageType.worksheetSelectionChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"], + ["SingleClicked", + 0, + 17, + "MessageType.worksheetSingleClickedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterSingleClickedEvent", + "_UnregisterSingleClickedEvent"], + ["VisibilityChanged", + 0, + 30, + "MessageType.worksheetVisibilityChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterEventVisibilityChanged", + "_UnregisterEventVisibilityChanged"]]], + ["WorksheetProtection", + 0, + [["protected", + 3], + ["options", + 3], + ["canPauseProtection", + 3, + 19], + ["isPasswordProtected", + 3, + 19], + ["isPaused", + 3, + 19], + ["savedOptions", + 3, + 19]], + [["allowEditRanges", + "AllowEditRangeCollection", + 19, + 19, + 0, + 4]], + [["protect", + 2, + 1], + ["unprotect", + 1], + ["checkPassword", + 1, + 2, + 19, + 4], + ["pauseProtection", + 1, + 0, + 19], + ["resumeProtection", + 0, + 0, + 19], + ["setPassword", + 1, + 0, + 19], + ["updateOptions", + 1, + 0, + 19]]], + ["WorksheetFreezePanes", + 0, + 0, + 0, + [["unfreeze"], + ["freezeAt", + 1], + ["freezeRows", + 1], + ["freezeColumns", + 1]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getLocationOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["Range", + 14, + [["numberFormat", + 5, + 0, + 0, + 2, + 31], + ["numberFormatLocal", + 1, + 11, + 0, + 2, + 31], + ["values", + 5, + 0, + 0, + 2, + 31], + ["text", + 3], + ["formulas", + 5, + 0, + 0, + 2, + 32], + ["formulasLocal", + 5, + 0, + 0, + 2, + 32], + ["rowIndex", + 3], + ["columnIndex", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["address", + 3], + ["addressLocal", + 3], + ["cellCount", + 3], + ["_ReferenceId", + 2], + ["valueTypes", + 3], + ["formulasR1C1", + 5, + 13], + ["hidden", + 3, + 13], + ["rowHidden", + 1, + 13, + 0, + 2, + 32], + ["columnHidden", + 1, + 13, + 0, + 2, + 32], + ["isEntireColumn", + 3, + 11], + ["isEntireRow", + 3, + 11], + ["hyperlink", + 1, + 11, + 0, + 2, + 33], + ["style", + 1, + 11, + 0, + 2, + 32], + ["linkedDataTypeState", + 3, + 6], + ["hasSpill", + 3, + 27], + ["top", + 3, + 17], + ["left", + 3, + 17], + ["height", + 3, + 17], + ["width", + 3, + 17], + ["savedAsArray", + 3, + 27], + ["numberFormatCategories", + 3, + 27], + ["valuesAsJson", + 5, + 24], + ["valuesAsJsonLocal", + 5, + 24], + ["addressR1C1", + 2, + 3]], + [["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["sort", + "RangeSort", + 3, + 13, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 9, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 5, + 0, + 4]], + [["clear", + 1, + 0, + 0, + 2, + 0, + 32], + ["delete", + 1, + 0, + 0, + 2, + 0, + 34], + ["select", + 0, + 2], + ["_KeepReference", + 0, + 2], + ["merge", + 1, + 0, + 13, + 2, + 0, + 32], + ["unmerge", + 0, + 0, + 13], + ["_ValidateArraySize", + 2, + 2, + 14, + 4], + ["calculate", + 0, + 0, + 9], + ["showCard", + 0, + 0, + 11], + ["getImage", + 0, + 2, + 11, + 4], + ["replaceAll", + 3, + 0, + 6, + 2, + 0, + 32], + ["copyFrom", + 4, + 0, + 6, + 2, + 0, + 26], + ["convertToLinkedDataType", + 2, + 0, + 6], + ["convertDataTypeToText", + 0, + 0, + 6], + ["setDirty", + 0, + 0, + 6], + ["getCellProperties", + 1, + 0, + 6], + ["getRowProperties", + 1, + 0, + 6], + ["getColumnProperties", + 1, + 0, + 6], + ["setCellProperties", + 1, + 0, + 6], + ["setRowProperties", + 1, + 0, + 6], + ["setColumnProperties", + 1, + 0, + 6], + ["autoFill", + 2, + 0, + 6], + ["showTeachingCallout", + 2, + 0, + 6], + ["flashFill", + 0, + 0, + 6], + ["group", + 1, + 0, + 17], + ["ungroup", + 1, + 0, + 17], + ["showGroupDetails", + 1, + 0, + 17], + ["hideGroupDetails", + 1, + 0, + 17], + ["moveTo", + 1, + 0, + 7, + 2, + 0, + 26], + ["getDataClassificationIds", + 0, + 2, + 19, + 4]], + [["getCell", + "Range", + 2, + 10, + 0, + 4], + ["getUsedRange", + "Range", + 1, + 10, + 0, + 4], + ["insert", + "Range", + 1, + 8, + 0, + 2, + 0, + 0, + 34], + ["getEntireColumn", + "Range", + 0, + 10, + 0, + 4], + ["getEntireRow", + "Range", + 0, + 10, + 0, + 4], + ["getOffsetRange", + "Range", + 2, + 10, + 0, + 4], + ["getRow", + "Range", + 1, + 10, + 0, + 4], + ["getColumn", + "Range", + 1, + 10, + 0, + 4], + ["getIntersection", + "Range", + 1, + 10, + 0, + 4], + ["getBoundingRect", + "Range", + 1, + 10, + 0, + 4], + ["getLastCell", + "Range", + 0, + 10, + 0, + 4], + ["getLastColumn", + "Range", + 0, + 10, + 0, + 4], + ["getLastRow", + "Range", + 0, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getRowsAbove", + "Range", + 1, + 11, + 14, + 4], + ["getRowsBelow", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsBefore", + "Range", + 1, + 11, + 14, + 4], + ["getColumnsAfter", + "Range", + 1, + 11, + 14, + 4], + ["getResizedRange", + "Range", + 2, + 11, + 14, + 4], + ["getVisibleView", + "RangeView", + 0, + 2, + 14, + 4], + ["getUsedRangeOrNullObject", + "Range", + 1, + 10, + 15, + 4], + ["getSurroundingRegion", + "Range", + 0, + 10, + 11, + 4], + ["getAbsoluteResizedRange", + "Range", + 2, + 10, + 11, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 6, + 4], + ["find", + "Range", + 2, + 10, + 6, + 4], + ["findOrNullObject", + "Range", + 2, + 10, + 6, + 4], + ["removeDuplicates", + "RemoveDuplicatesResult", + 2, + 8, + 6, + 2, + 0, + 0, + 33], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 6, + 4], + ["getSpillingToRange", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParent", + "Range", + 0, + 10, + 27, + 4], + ["getSpillingToRangeOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getSpillParentOrNullObject", + "Range", + 0, + 10, + 27, + 4], + ["getMergedAreas", + "RangeAreas", + 0, + 10, + 19, + 4], + ["getPivotTables", + "PivotTableScopedCollection", + 1, + 6, + 27, + 4], + ["getPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 18, + 4], + ["getDirectPrecedents", + "WorkbookRangeAreas", + 0, + 10, + 27, + 4], + ["getDependents", + "WorkbookRangeAreas", + 0, + 10, + 35, + 4], + ["getDirectDependents", + "WorkbookRangeAreas", + 0, + 10, + 23, + 4], + ["getExtendedRange", + "Range", + 2, + 10, + 23, + 4], + ["getRangeEdge", + "Range", + 2, + 10, + 23, + 4], + ["getNumberFormatProperties", + "NumberFormatPropertyCollection", + 0, + 6, + 8, + 4], + ["getSurroundingDataRegion", + "Range", + 0, + 2, + 8, + 4], + ["getMergedAreasOrNullObject", + "RangeAreas", + 0, + 0, + 23, + 2, + 0, + 0, + 31]]], + ["RangeAreas", + 2, + [["_ReferenceId", + 2], + ["address", + 3], + ["addressLocal", + 3], + ["areaCount", + 3], + ["cellCount", + 3], + ["isEntireColumn", + 3], + ["isEntireRow", + 3], + ["style", + 1], + ["addressR1C1", + 2, + 3]], + [["areas", + "RangeCollection", + 19, + 0, + 0, + 4], + ["conditionalFormats", + "ConditionalFormatCollection", + 19, + 0, + 0, + 4], + ["format", + "RangeFormat", + 35, + 0, + 0, + 4], + ["dataValidation", + "DataValidation", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2], + ["calculate"], + ["clear", + 1], + ["setDirty"], + ["copyFrom", + 4], + ["convertToLinkedDataType", + 2], + ["convertDataTypeToText"], + ["select", + 0, + 2, + 8]], + [["getEntireColumn", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getEntireRow", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getIntersection", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getIntersectionOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getOffsetRangeAreas", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getUsedRangeAreas", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getUsedRangeAreasOrNullObject", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getTables", + "TableScopedCollection", + 1, + 6, + 0, + 4], + ["getSpecialCells", + "RangeAreas", + 2, + 10, + 0, + 4], + ["getSpecialCellsOrNullObject", + "RangeAreas", + 2, + 10, + 0, + 4]]], + ["WorkbookRangeAreas", + 2, + [["_ReferenceId", + 2], + ["addresses", + 3]], + [["ranges", + "RangeCollection", + 19, + 0, + 0, + 4], + ["areas", + "RangeAreasCollection", + 19, + 0, + 0, + 4]], + [["_KeepReference", + 0, + 2]], + [["getRangeAreasBySheet", + "RangeAreas", + 1, + 10, + 0, + 4], + ["getRangeAreasOrNullObjectBySheet", + "RangeAreas", + 1, + 10, + 0, + 4]]], + ["RangeView", + 0, + [["numberFormat", + 1], + ["values", + 1], + ["text", + 3], + ["formulas", + 1], + ["formulasLocal", + 1], + ["formulasR1C1", + 1], + ["valueTypes", + 3], + ["rowCount", + 3], + ["columnCount", + 3], + ["cellAddresses", + 3], + ["index", + 3], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["rows", + "RangeViewCollection", + 19, + 0, + 0, + 4]], + 0, + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["RangeViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "RangeView", + 1, + 2, + 0, + 4]], + 0, + "RangeView"], + ["SettingCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "Setting", + 1, + 18, + 0, + 4], + ["add", + "Setting", + 2, + 9], + ["getItemOrNullObject", + "Setting", + 1, + 2, + 0, + 4]], + 0, + "Setting", + [["SettingsChanged", + 3, + 0, + "_CC.office10EventIdSettingsChangedEvent", + "", + "", + ""]]], + ["Setting", + 8, + [["key", + 3], + ["value", + 5], + ["_Id", + 2]], + 0, + [["delete"]]], + ["NamedItemCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "NamedItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "NamedItem", + 1, + 2, + 15, + 4], + ["add", + "NamedItem", + 3, + 8, + 15], + ["addFormulaLocal", + "NamedItem", + 3, + 0, + 15]], + 0, + "NamedItem", + [["Added", + 0, + 3, + "MessageType.namedItemAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.namedItemDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["NamedItem", + 0, + [["name", + 3], + ["type", + 3], + ["value", + 3], + ["visible", + 1], + ["_Id", + 2], + ["comment", + 1, + 15], + ["scope", + 3, + 15], + ["formula", + 1, + 11], + ["valueAsJson", + 3, + 24], + ["valueAsJsonLocal", + 3, + 24]], + [["worksheet", + "Worksheet", + 2, + 15, + 0, + 4], + ["worksheetOrNullObject", + "Worksheet", + 2, + 15, + 0, + 4], + ["arrayValues", + "NamedItemArrayValues", + 3, + 11, + 0, + 4]], + [["delete", + 0, + 0, + 15]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 15, + 4]]], + ["NamedItemArrayValues", + 0, + [["values", + 3], + ["types", + 3], + ["valuesAsJson", + 3, + 24], + ["valuesAsJsonLocal", + 3, + 24]]], + ["Binding", + 0, + [["id", + 3], + ["type", + 3]], + 0, + [["getText", + 0, + 2, + 0, + 4], + ["delete", + 0, + 0, + 14]], + [["getTable", + "Table", + 0, + 2, + 0, + 4], + ["getRange", + "Range", + 0, + 2, + 0, + 4]], + 0, + 0, + [["DataChanged", + 3, + 14, + "_CC.office10EventIdBindingDataChangedEvent", + "this.id", + "", + ""], + ["SelectionChanged", + 3, + 14, + "_CC.office10EventIdBindingSelectionChangedEvent", + "this.id", + "", + ""]]], + ["BindingCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "Binding", + 1, + 18, + 0, + 4], + ["getItemAt", + "Binding", + 1, + 2, + 0, + 4], + ["add", + "Binding", + 3, + 8, + 14], + ["addFromNamedItem", + "Binding", + 3, + 0, + 14], + ["addFromSelection", + "Binding", + 2, + 0, + 14], + ["getItemOrNullObject", + "Binding", + 1, + 2, + 15, + 4]], + 0, + "Binding"], + ["TableCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 6, + 2, + 0, + 1], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1]], + [["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemAt", + "Table", + 1, + 2, + 0, + 4], + ["add", + "Table", + 2, + 8, + 0, + 2, + 0, + 0, + 33], + ["getItemOrNullObject", + "Table", + 1, + 2, + 15, + 4], + ["addQueryTable", + "Table", + 2, + 0, + 8]], + 0, + "Table", + [["Added", + 0, + 6, + "MessageType.tableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this._eventTargetId", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Deleted", + 0, + 6, + "MessageType.tableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this._eventTargetId", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"]]], + ["TableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getFirst", + "Table", + 0, + 10, + 0, + 4], + ["getItem", + "Table", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Table", + 1, + 2, + 18, + 4]], + 0, + "Table"], + ["Table", + 24, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 26], + ["showHeaders", + 1, + 0, + 0, + 2, + 33], + ["showTotals", + 1, + 0, + 0, + 2, + 33], + ["style", + 1, + 0, + 0, + 2, + 33], + ["highlightFirstColumn", + 1, + 14, + 0, + 2, + 33], + ["highlightLastColumn", + 1, + 14, + 0, + 2, + 33], + ["showBandedRows", + 1, + 14, + 0, + 2, + 33], + ["showBandedColumns", + 1, + 14, + 0, + 2, + 33], + ["showFilterButton", + 1, + 14, + 0, + 2, + 33], + ["legacyId", + 3, + 5]], + [["columns", + "TableColumnCollection", + 19, + 0, + 0, + 4], + ["rows", + "TableRowCollection", + 19, + 0, + 0, + 4], + ["sort", + "TableSort", + 3, + 13, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["autoFilter", + "AutoFilter", + 3, + 6, + 0, + 4], + ["tableStyle", + "TableStyle", + 35, + 8, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearFilters", + 0, + 0, + 13], + ["reapplyFilters", + 0, + 0, + 13, + 2, + 0, + 26], + ["_RegisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterSelectionChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_RegisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterDataChangedEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["clearStyle", + 0, + 0, + 8], + ["_RegisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["_UnregisterFilteredEvent", + 0, + 0, + 8, + 2, + 0, + 1], + ["resize", + 1, + 0, + 23, + 2, + 0, + 26], + ["setStyle", + 1, + 0, + 8]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4], + ["convertToRange", + "Range", + 0, + 8, + 13, + 2, + 0, + 0, + 26]], + "workbook.tables", + 0, + [["Changed", + 2, + 11, + "MessageType.tableDataChangedEvent", + "this.id", + "_RegisterDataChangedEvent", + "_UnregisterDataChangedEvent"], + ["Filtered", + 0, + 8, + "MessageType.tableFilteredEvent", + "this.id", + "_RegisterFilteredEvent", + "_UnregisterFilteredEvent"], + ["SelectionChanged", + 2, + 11, + "MessageType.tableSelectionChangedEvent", + "this.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["TableColumnCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItem", + "TableColumn", + 1, + 18, + 0, + 4], + ["getItemAt", + "TableColumn", + 1, + 2, + 0, + 4], + ["add", + "TableColumn", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["getItemOrNullObject", + "TableColumn", + 1, + 2, + 15, + 4], + ["addAsJson", + "TableColumn", + 3, + 0, + 24]], + 0, + "TableColumn"], + ["TableColumn", + 0, + [["id", + 3], + ["index", + 3], + ["values", + 1], + ["name", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + [["filter", + "Filter", + 3, + 13, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getHeaderRowRange", + "Range", + 0, + 10, + 0, + 4], + ["getDataBodyRange", + "Range", + 0, + 10, + 0, + 4], + ["getTotalRowRange", + "Range", + 0, + 10, + 0, + 4]]], + ["TableRowCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["deleteRows", + 1, + 0, + 19], + ["deleteRowsAt", + 2, + 0, + 19, + 2, + 0, + 26]], + [["getItemAt", + "TableRow", + 1, + 2, + 0, + 4], + ["add", + "TableRow", + 3, + 8, + 0, + 2, + 0, + 0, + 34], + ["addAsJson", + "TableRow", + 3, + 0, + 24]], + 0, + "TableRow"], + ["TableRow", + 0, + [["index", + 3], + ["values", + 1], + ["valuesAsJson", + 1, + 24], + ["valuesAsJsonLocal", + 1, + 24]], + 0, + [["delete", + 0, + 0, + 0, + 2, + 0, + 34]], + [["getRange", + "Range", + 0, + 10, + 0, + 4]]], + ["DataValidation", + 0, + [["type", + 3], + ["rule", + 1], + ["prompt", + 1], + ["errorAlert", + 1], + ["ignoreBlanks", + 1], + ["valid", + 3]], + 0, + [["clear"]], + [["getInvalidCells", + "RangeAreas", + 0, + 10, + 6, + 4], + ["getInvalidCellsOrNullObject", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["RemoveDuplicatesResult", + 0, + [["removed", + 3], + ["uniqueRemaining", + 3]]], + ["RangeFormat", + 0, + [["wrapText", + 1, + 0, + 0, + 2, + 32], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 32], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 32], + ["columnWidth", + 1, + 13, + 0, + 2, + 32], + ["rowHeight", + 1, + 13, + 0, + 2, + 32], + ["textOrientation", + 1, + 11, + 0, + 2, + 32], + ["useStandardHeight", + 1, + 11], + ["useStandardWidth", + 1, + 11], + ["readingOrder", + 1, + 6], + ["shrinkToFit", + 1, + 6], + ["indentLevel", + 1, + 6, + 0, + 2, + 32], + ["autoIndent", + 1, + 6]], + [["fill", + "RangeFill", + 35, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["protection", + "FormatProtection", + 35, + 13, + 0, + 4]], + [["autofitColumns", + 0, + 0, + 13, + 2, + 0, + 32], + ["autofitRows", + 0, + 0, + 13, + 2, + 0, + 32], + ["adjustIndent", + 1, + 0, + 7, + 2, + 0, + 34]]], + ["FormatProtection", + 0, + [["locked", + 1], + ["formulaHidden", + 1]]], + ["RangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6], + ["patternTintAndShade", + 1, + 6], + ["pattern", + 1, + 6], + ["patternColor", + 1, + 6]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 32]]], + ["RangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 32], + ["weight", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 32], + ["tintAndShade", + 1, + 6]]], + ["RangeBorderCollection", + 1, + [["count", + 3], + ["tintAndShade", + 1, + 6]], + 0, + 0, + [["getItem", + "RangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "RangeBorder", + 1, + 2, + 0, + 4]], + 0, + "RangeBorder"], + ["RangeFont", + 0, + [["name", + 1, + 0, + 0, + 2, + 32], + ["size", + 1, + 0, + 0, + 2, + 32], + ["color", + 1, + 0, + 0, + 2, + 12], + ["italic", + 1, + 0, + 0, + 2, + 32], + ["bold", + 1, + 0, + 0, + 2, + 32], + ["underline", + 1, + 0, + 0, + 2, + 32], + ["strikethrough", + 1, + 6, + 0, + 2, + 32], + ["subscript", + 1, + 6], + ["superscript", + 1, + 6], + ["tintAndShade", + 1, + 6]]], + ["ChartCollection", + 5, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_RegisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29], + ["_UnregisterDeletedEvent", + 0, + 0, + 5, + 2, + 0, + 29]], + [["add", + "Chart", + 3, + 9, + 0, + 2, + 0, + 0, + 36], + ["getItemAt", + "Chart", + 1, + 2, + 0, + 4], + ["_GetItem", + "Chart", + 1, + 18, + 0, + 4], + ["getItem", + "Chart", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Chart", + 1, + 2, + 15, + 4]], + 0, + "Chart", + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this._ParentObject.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Added", + 0, + 5, + "MessageType.chartAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this._ParentObject.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"], + ["Deleted", + 0, + 5, + "MessageType.chartDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Chart", + 0, + [["name", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 36], + ["left", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["height", + 1, + 0, + 0, + 2, + 36], + ["id", + 3, + 11], + ["showAllFieldButtons", + 1, + 11, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 37], + ["showDataLabelsOverMaximum", + 1, + 5, + 0, + 2, + 37], + ["categoryLabelLevel", + 1, + 5, + 0, + 2, + 37], + ["style", + 1, + 5, + 0, + 2, + 37], + ["displayBlanksAs", + 1, + 5, + 0, + 2, + 37], + ["plotBy", + 1, + 5, + 0, + 2, + 37], + ["plotVisibleOnly", + 1, + 5, + 0, + 2, + 37], + ["seriesNameLevel", + 1, + 5, + 0, + 2, + 37]], + [["title", + "ChartTitle", + 35, + 0, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 0, + 0, + 4], + ["legend", + "ChartLegend", + 35, + 0, + 0, + 4], + ["series", + "ChartSeriesCollection", + 19, + 0, + 0, + 4], + ["axes", + "ChartAxes", + 35, + 0, + 0, + 4], + ["format", + "ChartAreaFormat", + 35, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 2, + 13, + 0, + 4], + ["plotArea", + "ChartPlotArea", + 35, + 5, + 0, + 4], + ["pivotOptions", + "ChartPivotOptions", + 35, + 6, + 0, + 4]], + [["setData", + 2, + 1, + 0, + 2, + 0, + 36], + ["delete", + 0, + 0, + 0, + 2, + 0, + 36], + ["setPosition", + 2, + 0, + 0, + 2, + 0, + 36], + ["getImage", + 3, + 2, + 13, + 4], + ["_RegisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 5, + 2, + 0, + 1], + ["activate", + 0, + 2, + 6], + ["getDataRange", + 0, + 0, + 28], + ["getDataRangeOrNullObject", + 0, + 0, + 28]], + [["getDataTable", + "ChartDataTable", + 0, + 2, + 18, + 4], + ["getDataTableOrNullObject", + "ChartDataTable", + 0, + 2, + 18, + 4]], + 0, + 0, + [["Activated", + 0, + 5, + "MessageType.chartActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 5, + "MessageType.chartDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["ChartPivotOptions", + 0, + [["showAxisFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showLegendFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showReportFilterFieldButtons", + 1, + 0, + 0, + 2, + 37], + ["showValueFieldButtons", + 1, + 0, + 0, + 2, + 37]]], + ["ChartAreaFormat", + 0, + [["roundedCorners", + 1, + 6, + 0, + 2, + 37], + ["colorScheme", + 1, + 6, + 0, + 2, + 37]], + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartSeriesCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartSeries", + 1, + 2, + 0, + 4], + ["add", + "ChartSeries", + 2, + 8, + 11, + 2, + 0, + 0, + 36]], + 0, + "ChartSeries"], + ["ChartSeries", + 0, + [["name", + 1, + 0, + 0, + 2, + 36], + ["chartType", + 1, + 11, + 0, + 2, + 10], + ["hasDataLabels", + 1, + 11, + 0, + 2, + 37], + ["filtered", + 1, + 11, + 0, + 2, + 37], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["showShadow", + 1, + 11, + 0, + 2, + 37], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36], + ["smooth", + 1, + 11, + 0, + 2, + 37], + ["plotOrder", + 1, + 11, + 0, + 2, + 37], + ["gapWidth", + 1, + 11, + 0, + 2, + 36], + ["doughnutHoleSize", + 1, + 11, + 0, + 2, + 36], + ["axisGroup", + 1, + 5, + 0, + 2, + 36], + ["explosion", + 1, + 5, + 0, + 2, + 37], + ["firstSliceAngle", + 1, + 5, + 0, + 2, + 37], + ["invertIfNegative", + 1, + 5, + 0, + 2, + 37], + ["bubbleScale", + 1, + 6, + 0, + 2, + 37], + ["secondPlotSize", + 1, + 5, + 0, + 2, + 37], + ["splitType", + 1, + 5, + 0, + 2, + 37], + ["splitValue", + 1, + 6, + 0, + 2, + 37], + ["varyByCategories", + 1, + 5, + 0, + 2, + 37], + ["showLeaderLines", + 1, + 6, + 0, + 2, + 37], + ["overlap", + 1, + 5, + 0, + 2, + 36], + ["gradientStyle", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointType", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumType", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumValue", + 1, + 6, + 0, + 2, + 37], + ["gradientMinimumColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMidpointColor", + 1, + 6, + 0, + 2, + 37], + ["gradientMaximumColor", + 1, + 6, + 0, + 2, + 37], + ["parentLabelStrategy", + 1, + 6, + 0, + 2, + 37], + ["showConnectorLines", + 1, + 6, + 0, + 2, + 37], + ["invertColor", + 1, + 6, + 0, + 2, + 37]], + [["points", + "ChartPointsCollection", + 19, + 0, + 0, + 4], + ["format", + "ChartSeriesFormat", + 35, + 0, + 0, + 4], + ["trendlines", + "ChartTrendlineCollection", + 19, + 11, + 0, + 4], + ["xErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["yErrorBars", + "ChartErrorBars", + 35, + 6, + 0, + 4], + ["dataLabels", + "ChartDataLabels", + 35, + 5, + 0, + 4], + ["binOptions", + "ChartBinOptions", + 35, + 6, + 0, + 4], + ["mapOptions", + "ChartMapOptions", + 35, + 6, + 0, + 4], + ["boxwhiskerOptions", + "ChartBoxwhiskerOptions", + 35, + 6, + 0, + 4]], + [["delete", + 0, + 0, + 11, + 2, + 0, + 36], + ["setXAxisValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setValues", + 1, + 0, + 11, + 2, + 0, + 36], + ["setBubbleSizes", + 1, + 0, + 11, + 2, + 0, + 37], + ["getDimensionValues", + 1, + 0, + 27, + 2, + 0, + 37], + ["getDimensionDataSourceString", + 1, + 0, + 35], + ["getDimensionDataSourceType", + 1, + 0, + 35]]], + ["ChartSeriesFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartPointsCollection", + 1, + [["count", + 3]], + 0, + [["getCount", + 0, + 2, + 15, + 4]], + [["getItemAt", + "ChartPoint", + 1, + 2, + 0, + 4]], + 0, + "ChartPoint"], + ["ChartPoint", + 0, + [["value", + 3], + ["hasDataLabel", + 1, + 11, + 0, + 2, + 37], + ["markerStyle", + 1, + 11, + 0, + 2, + 36], + ["markerSize", + 1, + 11, + 0, + 2, + 36], + ["markerBackgroundColor", + 1, + 11, + 0, + 2, + 36], + ["markerForegroundColor", + 1, + 11, + 0, + 2, + 36]], + [["format", + "ChartPointFormat", + 35, + 0, + 0, + 4], + ["dataLabel", + "ChartDataLabel", + 35, + 11, + 0, + 4]]], + ["ChartPointFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartAxes", + 0, + 0, + [["categoryAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["seriesAxis", + "ChartAxis", + 35, + 0, + 0, + 4], + ["valueAxis", + "ChartAxis", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ChartAxis", + 2, + 2, + 11, + 4]]], + ["ChartAxis", + 0, + [["majorUnit", + 1, + 0, + 0, + 2, + 37], + ["maximum", + 1, + 0, + 0, + 2, + 36], + ["minimum", + 1, + 0, + 0, + 2, + 36], + ["minorUnit", + 1, + 0, + 0, + 2, + 37], + ["displayUnit", + 1, + 11, + 0, + 2, + 36], + ["showDisplayUnitLabel", + 1, + 11, + 0, + 2, + 37], + ["customDisplayUnit", + 3, + 11], + ["type", + 3, + 11], + ["minorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["majorTimeUnitScale", + 1, + 11, + 0, + 2, + 37], + ["baseTimeUnit", + 1, + 11, + 0, + 2, + 37], + ["categoryType", + 1, + 11, + 0, + 2, + 37], + ["axisGroup", + 3, + 11], + ["scaleType", + 1, + 11, + 0, + 2, + 37], + ["logBase", + 1, + 11, + 0, + 2, + 37], + ["left", + 3, + 11], + ["top", + 3, + 11], + ["height", + 3, + 11], + ["width", + 3, + 11], + ["reversePlotOrder", + 1, + 11, + 0, + 2, + 36], + ["crosses", + 1, + 11, + 0, + 2, + 36], + ["crossesAt", + 3, + 11], + ["visible", + 1, + 11, + 0, + 2, + 37], + ["isBetweenCategories", + 1, + 5, + 0, + 2, + 36], + ["majorTickMark", + 1, + 11, + 0, + 2, + 37], + ["minorTickMark", + 1, + 11, + 0, + 2, + 37], + ["tickMarkSpacing", + 1, + 11, + 0, + 2, + 37], + ["tickLabelPosition", + 1, + 11, + 0, + 2, + 36], + ["tickLabelSpacing", + 1, + 11, + 0, + 2, + 37], + ["alignment", + 1, + 5, + 0, + 2, + 37], + ["multiLevel", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["offset", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["position", + 1, + 5, + 0, + 2, + 36], + ["positionAt", + 3, + 5]], + [["majorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["minorGridlines", + "ChartGridlines", + 35, + 0, + 0, + 4], + ["title", + "ChartAxisTitle", + 35, + 0, + 0, + 4], + ["format", + "ChartAxisFormat", + 35, + 0, + 0, + 4]], + [["setCategoryNames", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCustomDisplayUnit", + 1, + 0, + 11, + 2, + 0, + 37], + ["setCrossesAt", + 1, + 0, + 11, + 2, + 0, + 37], + ["setPositionAt", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["line", + "ChartLineFormat", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4]]], + ["ChartAxisTitle", + 0, + [["text", + 1, + 0, + 0, + 2, + 36], + ["visible", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 27, + 0, + 2, + 37]], + [["format", + "ChartAxisTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 5, + 2, + 0, + 37]]], + ["ChartAxisTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 5, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataLabels", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataLabel", + 0, + [["position", + 1, + 0, + 0, + 2, + 37], + ["showValue", + 1, + 0, + 0, + 2, + 37], + ["showSeriesName", + 1, + 0, + 0, + 2, + 37], + ["showCategoryName", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showPercentage", + 1, + 0, + 0, + 2, + 37], + ["showBubbleSize", + 1, + 0, + 0, + 2, + 37], + ["separator", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 5, + 0, + 2, + 37], + ["left", + 1, + 5, + 0, + 2, + 37], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["formula", + 1, + 5, + 0, + 2, + 37], + ["textOrientation", + 1, + 5, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 5, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 5, + 0, + 2, + 37], + ["text", + 1, + 5, + 0, + 2, + 37], + ["autoText", + 1, + 5, + 0, + 2, + 37], + ["numberFormat", + 1, + 5, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37], + ["geometricShapeType", + 1, + 8, + 0, + 2, + 37], + ["showAsDataCallout", + 3, + 8, + 0, + 2, + 37]], + [["format", + "ChartDataLabelFormat", + 35, + 5, + 0, + 4]], + 0, + [["getSubstring", + "ChartFormatString", + 2, + 2, + 8, + 4]]], + ["ChartDataLabelFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartDataTable", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["showLegendKey", + 1, + 0, + 0, + 2, + 37], + ["showHorizontalBorder", + 1, + 0, + 0, + 2, + 37], + ["showVerticalBorder", + 1, + 0, + 0, + 2, + 37], + ["showOutlineBorder", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartDataTableFormat", + 35, + 0, + 0, + 4]]], + ["ChartDataTableFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4]]], + ["ChartErrorBars", + 0, + [["endStyleCap", + 1, + 0, + 0, + 2, + 37], + ["include", + 1, + 0, + 0, + 2, + 37], + ["type", + 1, + 0, + 0, + 2, + 37], + ["visible", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartErrorBarsFormat", + 35, + 0, + 0, + 4]]], + ["ChartErrorBarsFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlines", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36]], + [["format", + "ChartGridlinesFormat", + 35, + 0, + 0, + 4]]], + ["ChartGridlinesFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartLegend", + 0, + [["visible", + 1, + 0, + 0, + 2, + 36], + ["position", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["width", + 1, + 11, + 0, + 2, + 37], + ["height", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartLegendFormat", + 35, + 0, + 0, + 4], + ["legendEntries", + "ChartLegendEntryCollection", + 19, + 11, + 0, + 4]]], + ["ChartLegendEntry", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["left", + 3, + 5], + ["top", + 3, + 5], + ["width", + 3, + 5], + ["height", + 3, + 5], + ["index", + 3, + 5]]], + ["ChartLegendEntryCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "ChartLegendEntry", + 1, + 2, + 0, + 4]], + 0, + "ChartLegendEntry"], + ["ChartLegendFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 5, + 0, + 4]]], + ["ChartMapOptions", + 0, + [["level", + 1, + 0, + 0, + 2, + 37], + ["labelStrategy", + 1, + 0, + 0, + 2, + 37], + ["projectionType", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTitle", + 0, + [["visible", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 36], + ["overlay", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 11, + 0, + 2, + 37], + ["top", + 1, + 11, + 0, + 2, + 37], + ["left", + 1, + 11, + 0, + 2, + 37], + ["width", + 3, + 11], + ["height", + 3, + 11], + ["verticalAlignment", + 1, + 11, + 0, + 2, + 37], + ["textOrientation", + 1, + 11, + 0, + 2, + 37], + ["position", + 1, + 11, + 0, + 2, + 37], + ["showShadow", + 1, + 11, + 0, + 2, + 37]], + [["format", + "ChartTitleFormat", + 35, + 0, + 0, + 4]], + [["setFormula", + 1, + 0, + 11, + 2, + 0, + 37]], + [["getSubstring", + "ChartFormatString", + 2, + 2, + 11, + 4]]], + ["ChartFormatString", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartTitleFormat", + 0, + 0, + [["font", + "ChartFont", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 11, + 0, + 4]]], + ["ChartFill", + 4, + 0, + 0, + [["setSolidColor", + 1, + 0, + 0, + 2, + 0, + 36], + ["clear", + 0, + 0, + 0, + 2, + 0, + 37], + ["getSolidColor", + 0, + 0, + 24, + 2, + 0, + 37]]], + ["ChartBorder", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 0, + 0, + 2, + 36], + ["weight", + 1, + 0, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 5, + 2, + 0, + 37]]], + ["ChartBinOptions", + 0, + [["type", + 1, + 0, + 0, + 2, + 36], + ["width", + 1, + 0, + 0, + 2, + 36], + ["count", + 1, + 0, + 0, + 2, + 36], + ["allowOverflow", + 1, + 0, + 0, + 2, + 37], + ["allowUnderflow", + 1, + 0, + 0, + 2, + 37], + ["overflowValue", + 1, + 0, + 0, + 2, + 36], + ["underflowValue", + 1, + 0, + 0, + 2, + 36]]], + ["ChartBoxwhiskerOptions", + 0, + [["showInnerPoints", + 1, + 0, + 0, + 2, + 37], + ["showOutlierPoints", + 1, + 0, + 0, + 2, + 37], + ["showMeanMarker", + 1, + 0, + 0, + 2, + 37], + ["showMeanLine", + 1, + 0, + 0, + 2, + 37], + ["quartileCalculation", + 1, + 0, + 0, + 2, + 37]]], + ["ChartLineFormat", + 0, + [["color", + 1, + 0, + 0, + 2, + 36], + ["lineStyle", + 1, + 11, + 0, + 2, + 36], + ["weight", + 1, + 11, + 0, + 2, + 36]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartFont", + 0, + [["bold", + 1, + 0, + 0, + 2, + 37], + ["color", + 1, + 0, + 0, + 2, + 36], + ["italic", + 1, + 0, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["size", + 1, + 0, + 0, + 2, + 37], + ["underline", + 1, + 0, + 0, + 2, + 37]]], + ["ChartTrendline", + 0, + [["type", + 1, + 0, + 0, + 2, + 37], + ["polynomialOrder", + 1, + 0, + 0, + 2, + 37], + ["movingAveragePeriod", + 1, + 0, + 0, + 2, + 37], + ["_Id", + 2], + ["showEquation", + 1, + 5, + 0, + 2, + 37], + ["showRSquared", + 1, + 5, + 0, + 2, + 37], + ["forwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["backwardPeriod", + 1, + 5, + 0, + 2, + 37], + ["name", + 1, + 0, + 0, + 2, + 37], + ["intercept", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartTrendlineFormat", + 35, + 0, + 0, + 4], + ["label", + "ChartTrendlineLabel", + 35, + 5, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 37]]], + ["ChartTrendlineCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "ChartTrendline", + 1, + 8, + 0, + 2, + 0, + 0, + 36], + ["getItem", + "ChartTrendline", + 1, + 18, + 0, + 4]], + 0, + "ChartTrendline"], + ["ChartTrendlineFormat", + 0, + 0, + [["line", + "ChartLineFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabel", + 0, + [["top", + 1, + 0, + 0, + 2, + 37], + ["left", + 1, + 0, + 0, + 2, + 37], + ["width", + 3], + ["height", + 3], + ["formula", + 1, + 0, + 0, + 2, + 37], + ["textOrientation", + 1, + 0, + 0, + 2, + 37], + ["horizontalAlignment", + 1, + 0, + 0, + 2, + 37], + ["verticalAlignment", + 1, + 0, + 0, + 2, + 37], + ["text", + 1, + 0, + 0, + 2, + 37], + ["autoText", + 1, + 0, + 0, + 2, + 37], + ["numberFormat", + 1, + 0, + 0, + 2, + 37], + ["linkNumberFormat", + 1, + 6, + 0, + 2, + 37]], + [["format", + "ChartTrendlineLabelFormat", + 35, + 0, + 0, + 4]]], + ["ChartTrendlineLabelFormat", + 0, + 0, + [["fill", + "ChartFill", + 3, + 0, + 0, + 4], + ["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["font", + "ChartFont", + 35, + 0, + 0, + 4]]], + ["ChartPlotArea", + 0, + [["left", + 1, + 0, + 0, + 2, + 37], + ["top", + 1, + 0, + 0, + 2, + 37], + ["width", + 1, + 0, + 0, + 2, + 37], + ["height", + 1, + 0, + 0, + 2, + 37], + ["insideLeft", + 1, + 0, + 0, + 2, + 37], + ["insideTop", + 1, + 0, + 0, + 2, + 37], + ["insideWidth", + 1, + 0, + 0, + 2, + 37], + ["insideHeight", + 1, + 0, + 0, + 2, + 37], + ["position", + 1, + 0, + 0, + 2, + 37]], + [["format", + "ChartPlotAreaFormat", + 35, + 0, + 0, + 4]]], + ["ChartPlotAreaFormat", + 0, + 0, + [["border", + "ChartBorder", + 35, + 0, + 0, + 4], + ["fill", + "ChartFill", + 3, + 0, + 0, + 4]]], + ["VisualCollection", + 5, + 0, + 0, + [["getDefinitions", + 0, + 2, + 0, + 4], + ["getPreview", + 4, + 2, + 0, + 4], + ["bootstrapAgaveVisual", + 0, + 0, + 0, + 2], + ["getCount", + 0, + 2, + 0, + 4], + ["_RegisterSelectionChangedEvent", + 0, + 2], + ["_UnregisterSelectionChangedEvent", + 0, + 2]], + [["add", + "Visual", + 3, + 8, + 0, + 2], + ["_GetItem", + "Visual", + 1, + 18, + 0, + 4], + ["getSelectedOrNullObject", + "Visual", + 0, + 2, + 0, + 4]], + 0, + "Visual", + [["AgaveVisualUpdate", + 2, + 0, + "MessageType.agaveVisualUpdateEvent", + "", + "null", + "null"], + ["SelectionChanged", + 0, + 0, + "MessageType.visualSelectionChangedEvent", + "this._ParentObject.id", + "_RegisterSelectionChangedEvent", + "_UnregisterSelectionChangedEvent"]]], + ["Visual", + 0, + [["id", + 3], + ["isSupportedInVisualTaskpane", + 3]], + [["properties", + "VisualPropertyCollection", + 18, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2], + ["getProperty", + 1, + 2, + 0, + 4], + ["setProperty", + 2, + 0, + 0, + 2], + ["changeDataSource", + 2, + 0, + 0, + 2], + ["getDataSource", + 0, + 2, + 0, + 4], + ["setPropertyToDefault", + 1, + 0, + 0, + 2], + ["_RegisterChangeEvent", + 0, + 2], + ["_UnregisterChangeEvent", + 0, + 2], + ["serializeProperties", + 0, + 2, + 0, + 4], + ["deserializeProperties", + 1, + 0, + 0, + 2], + ["addChildProperty", + 2, + 0, + 19, + 2], + ["removeChildProperty", + 2, + 0, + 19, + 2], + ["getDataFieldAssignments", + 0, + 0, + 3], + ["getDataConfig", + 0, + 2, + 3, + 4], + ["modifyDataConfig", + 1, + 0, + 3, + 2]], + [["getChildProperties", + "VisualPropertyCollection", + 2, + 6, + 0, + 4], + ["getDataControllerClient", + "DataControllerClient", + 0, + 2, + 0, + 4], + ["getElementChildProperties", + "VisualPropertyCollection", + 3, + 6, + 0, + 4]], + 0, + 0, + [["ChangeNotification", + 2, + 0, + "MessageType.visualChangeEvent", + "this.id", + "_RegisterChangeEvent", + "_UnregisterChangeEvent"]]], + ["VisualProperty", + 0, + [["type", + 3], + ["value", + 3], + ["id", + 3], + ["localizedName", + 3], + ["options", + 3], + ["localizedOptions", + 3], + ["hasDefault", + 3], + ["isDefault", + 3], + ["min", + 3], + ["max", + 3], + ["stepSize", + 3], + ["hideMeButShowChildrenUI", + 3], + ["expandableUI", + 3], + ["nextPropOnSameLine", + 3], + ["showResetUI", + 3], + ["size", + 3, + 19], + ["minSize", + 3, + 19], + ["maxSize", + 3, + 19], + ["index", + 3, + 19], + ["parentName", + 3, + 19]], + 0, + [["getBoolMetaProperty", + 1, + 2, + 0, + 4]]], + ["VisualPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "VisualProperty", + 1, + 18, + 0, + 4], + ["getItemAt", + "VisualProperty", + 1, + 2, + 0, + 4]], + 0, + "VisualProperty"], + ["DataControllerClient", + 0, + 0, + 0, + [["getWells", + 0, + 2, + 0, + 4], + ["getAssociatedFields", + 1, + 2, + 0, + 4], + ["getAvailableFields", + 1, + 2, + 0, + 4], + ["addField", + 3, + 0, + 0, + 2], + ["removeField", + 2, + 0, + 0, + 2], + ["moveField", + 3, + 0, + 0, + 2]]], + ["RangeSort", + 0, + 0, + 0, + [["apply", + 5, + 0, + 0, + 2, + 0, + 32]]], + ["TableSort", + 0, + [["matchCase", + 3], + ["method", + 3], + ["fields", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 26], + ["clear"], + ["reapply"]]], + ["Filter", + 0, + [["criteria", + 3]], + 0, + [["apply", + 1], + ["clear", + 0, + 0, + 0, + 2, + 0, + 34], + ["applyBottomItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyBottomPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCellColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyDynamicFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyFontColorFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyValuesFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopItemsFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyTopPercentFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyIconFilter", + 1, + 0, + 0, + 2, + 0, + 34], + ["applyCustomFilter", + 3, + 0, + 0, + 2, + 0, + 34]]], + ["AutoFilter", + 0, + [["enabled", + 3], + ["isDataFiltered", + 3], + ["criteria", + 3]], + 0, + [["apply", + 3, + 0, + 0, + 2, + 0, + 33], + ["reapply", + 0, + 0, + 0, + 2, + 0, + 26], + ["remove", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearCriteria", + 0, + 0, + 0, + 2, + 0, + 26], + ["clearColumnCriteria", + 1, + 0, + 18]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["CultureInfo", + 0, + [["name", + 3]], + [["numberFormat", + "NumberFormatInfo", + 3, + 0, + 0, + 4], + ["datetimeFormat", + "DatetimeFormatInfo", + 3, + 27, + 0, + 4]]], + ["NumberFormatInfo", + 0, + [["numberDecimalSeparator", + 3], + ["numberGroupSeparator", + 3], + ["currencySymbol", + 3, + 30]]], + ["DatetimeFormatInfo", + 0, + [["dateSeparator", + 3], + ["longDatePattern", + 3], + ["shortDatePattern", + 3], + ["timeSeparator", + 3], + ["longTimePattern", + 3]]], + ["CustomXmlPartScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4], + ["getOnlyItem", + "CustomXmlPart", + 0, + 2, + 0, + 4], + ["getOnlyItemOrNullObject", + "CustomXmlPart", + 0, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPartCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "CustomXmlPart", + 1, + 18, + 0, + 4], + ["add", + "CustomXmlPart", + 1, + 8], + ["getByNamespace", + "CustomXmlPartScopedCollection", + 1, + 6, + 0, + 4], + ["getItemOrNullObject", + "CustomXmlPart", + 1, + 2, + 0, + 4]], + 0, + "CustomXmlPart"], + ["CustomXmlPart", + 0, + [["id", + 3], + ["namespaceUri", + 3]], + 0, + [["delete"], + ["getXml", + 0, + 2, + 0, + 4], + ["setXml", + 1]]], + ["_V1Api", + 0, + 0, + 0, + [["bindingGetData", + 1, + 2, + 0, + 4], + ["getSelectedData", + 1, + 2, + 0, + 4], + ["gotoById", + 1, + 2, + 0, + 4], + ["bindingAddFromSelection", + 1, + 2], + ["bindingGetById", + 1, + 2, + 0, + 4], + ["bindingReleaseById", + 1, + 2], + ["bindingGetAll", + 0, + 2, + 0, + 4], + ["bindingAddFromNamedItem", + 1, + 2], + ["bindingAddFromPrompt", + 1, + 2], + ["bindingDeleteAllDataValues", + 1], + ["setSelectedData", + 1], + ["bindingClearFormats", + 1], + ["bindingSetData", + 1], + ["bindingSetFormats", + 1], + ["bindingSetTableOptions", + 1], + ["bindingAddRows", + 1], + ["bindingAddColumns", + 1], + ["getFilePropertiesAsync", + 0, + 2, + 9, + 4]]], + ["PivotTableScopedCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getFirst", + "PivotTable", + 0, + 10, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 0, + 4], + ["getFirstOrNullObject", + "PivotTable", + 0, + 2, + 35, + 4]], + 0, + "PivotTable"], + ["PivotTableCollection", + 5, + 0, + 0, + [["refreshAll", + 0, + 0, + 0, + 2, + 0, + 12], + ["getCount", + 0, + 2, + 15, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["getItem", + "PivotTable", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTable", + 1, + 2, + 15, + 4], + ["add", + "PivotTable", + 3, + 8, + 5, + 2, + 0, + 0, + 12]], + 0, + "PivotTable", + [["Added", + 0, + 3, + "MessageType.pivotTableAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.pivotTableDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["PivotTable", + 0, + [["name", + 1, + 0, + 0, + 2, + 12], + ["id", + 3, + 16], + ["useCustomSortLists", + 1, + 6, + 0, + 2, + 12], + ["enableDataValueEditing", + 1, + 6, + 0, + 2, + 12], + ["refreshOnOpen", + 0, + 23, + 0, + 2, + 29], + ["allowMultipleFiltersPerField", + 0, + 27, + 0, + 2, + 12]], + [["worksheet", + "Worksheet", + 2, + 0, + 0, + 4], + ["hierarchies", + "PivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["rowHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["columnHierarchies", + "RowColumnPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["dataHierarchies", + "DataPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["filterHierarchies", + "FilterPivotHierarchyCollection", + 19, + 5, + 0, + 4], + ["layout", + "PivotLayout", + 2, + 5, + 0, + 4]], + [["refresh", + 0, + 0, + 0, + 2, + 0, + 12], + ["delete", + 0, + 0, + 5, + 2, + 0, + 12], + ["getDataSourceString", + 0, + 2, + 35, + 4], + ["getDataSourceType", + 0, + 2, + 35, + 4]], + [["addDateGroup", + "PivotHierarchy", + 2, + 0, + 8, + 2, + 0, + 0, + 38]]], + ["PivotLayout", + 0, + [["showColumnGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["showRowGrandTotals", + 1, + 0, + 0, + 2, + 12], + ["enableFieldList", + 1, + 17, + 0, + 2, + 12], + ["subtotalLocation", + 1, + 0, + 0, + 2, + 12], + ["layoutType", + 1, + 0, + 0, + 2, + 12], + ["autoFormat", + 1, + 6, + 0, + 2, + 12], + ["preserveFormatting", + 1, + 6, + 0, + 2, + 12], + ["altTextDescription", + 0, + 23, + 0, + 2, + 29], + ["altTextTitle", + 0, + 23, + 0, + 2, + 29], + ["emptyCellText", + 0, + 23, + 0, + 2, + 29], + ["fillEmptyCells", + 0, + 23, + 0, + 2, + 29], + ["showFieldHeaders", + 0, + 23, + 0, + 2, + 29], + ["tabularValues", + 3, + 8], + ["tabularText", + 3, + 8], + ["tabularNumberFormat", + 3, + 8], + ["tabularNumberFormatLocal", + 3, + 8]], + [["pivotStyle", + "PivotTableStyle", + 35, + 8, + 0, + 4]], + [["setAutoSortOnCell", + 2, + 0, + 6, + 2, + 0, + 12], + ["setStyle", + 1, + 0, + 8, + 2, + 0, + 12], + ["displayBlankLineAfterEachItem", + 1, + 0, + 23, + 2, + 0, + 29], + ["repeatAllItemLabels", + 1, + 0, + 23, + 2, + 0, + 29]], + [["getRange", + "Range", + 0, + 3], + ["getRowLabelRange", + "Range", + 0, + 3], + ["getColumnLabelRange", + "Range", + 0, + 3], + ["getFilterAxisRange", + "Range", + 0, + 3], + ["getDataBodyRange", + "Range", + 0, + 3], + ["getCell", + "Range", + 3, + 2, + 8], + ["getPivotItems", + "PivotItemCollection", + 2, + 4, + 6], + ["getDataHierarchy", + "DataPivotHierarchy", + 1, + 3, + 6]]], + ["PivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotHierarchy", + 1, + 2, + 0, + 4]], + 0, + "PivotHierarchy"], + ["PivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]]], + ["RowColumnPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "RowColumnPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "RowColumnPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "RowColumnPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "RowColumnPivotHierarchy"], + ["RowColumnPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["FilterPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "FilterPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "FilterPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "FilterPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "FilterPivotHierarchy"], + ["FilterPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["enableMultipleFilterItems", + 1, + 0, + 0, + 2, + 12]], + [["fields", + "PivotFieldCollection", + 19, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["DataPivotHierarchyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["remove", + 1, + 0, + 0, + 2, + 0, + 12]], + [["getItem", + "DataPivotHierarchy", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "DataPivotHierarchy", + 1, + 2, + 0, + 4], + ["add", + "DataPivotHierarchy", + 1, + 8, + 0, + 2, + 0, + 0, + 12]], + 0, + "DataPivotHierarchy"], + ["DataPivotHierarchy", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["position", + 1, + 0, + 0, + 2, + 12], + ["numberFormat", + 1, + 0, + 0, + 2, + 12], + ["summarizeBy", + 1, + 0, + 0, + 2, + 12], + ["showAs", + 1, + 0, + 0, + 2, + 12]], + [["field", + "PivotField", + 35, + 0, + 0, + 4]], + [["setToDefault", + 0, + 0, + 0, + 2, + 0, + 12]]], + ["PivotFieldCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotField", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotField", + 1, + 2, + 0, + 4]], + 0, + "PivotField"], + ["PivotField", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["subtotals", + 1, + 0, + 0, + 2, + 12], + ["showAllItems", + 1, + 0, + 0, + 2, + 12]], + [["items", + "PivotItemCollection", + 19, + 0, + 0, + 4]], + [["sortByLabels", + 1, + 1, + 0, + 2, + 0, + 12], + ["sortByValues", + 3, + 0, + 6, + 2, + 0, + 12], + ["applyFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["clearAllFilters", + 0, + 0, + 27, + 2, + 0, + 12], + ["clearFilter", + 1, + 0, + 27, + 2, + 0, + 12], + ["getFilters", + 0, + 0, + 27], + ["isFiltered", + 1, + 0, + 27]]], + ["PivotItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PivotItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotItem", + 1, + 2, + 0, + 4]], + 0, + "PivotItem"], + ["PivotItem", + 0, + [["id", + 3], + ["name", + 1, + 0, + 0, + 2, + 12], + ["isExpanded", + 1, + 0, + 0, + 2, + 12], + ["visible", + 1, + 0, + 0, + 2, + 12]]], + ["WorksheetCustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["_Id", + 2]], + 0, + [["delete"]]], + ["WorksheetCustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "WorksheetCustomProperty", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "WorksheetCustomProperty", + 1], + ["add", + "WorksheetCustomProperty", + 2, + 8]], + 0, + "WorksheetCustomProperty"], + ["DocumentProperties", + 0, + [["title", + 1], + ["subject", + 1], + ["author", + 1], + ["keywords", + 1], + ["comments", + 1], + ["lastAuthor", + 3], + ["revisionNumber", + 1], + ["creationDate", + 11], + ["category", + 1], + ["manager", + 1], + ["company", + 1]], + [["custom", + "CustomPropertyCollection", + 19, + 0, + 0, + 4]]], + ["CustomProperty", + 0, + [["key", + 3], + ["value", + 1], + ["type", + 3]], + 0, + [["delete"]]], + ["CustomPropertyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["deleteAll"]], + [["getItemOrNullObject", + "CustomProperty", + 1, + 2, + 0, + 4], + ["add", + "CustomProperty", + 2, + 8], + ["getItem", + "CustomProperty", + 1, + 18, + 0, + 4]], + 0, + "CustomProperty"], + ["ConditionalFormatCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["clearAll", + 0, + 0, + 0, + 2, + 0, + 39]], + [["getItemAt", + "ConditionalFormat", + 1, + 2, + 0, + 4], + ["add", + "ConditionalFormat", + 1, + 8, + 0, + 2, + 0, + 0, + 39], + ["getItem", + "ConditionalFormat", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "ConditionalFormat", + 1, + 2, + 18, + 4]], + 0, + "ConditionalFormat"], + ["ConditionalFormat", + 0, + [["stopIfTrue", + 1], + ["priority", + 1], + ["type", + 3], + ["id", + 3]], + [["dataBarOrNullObject", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["dataBar", + "DataBarConditionalFormat", + 35, + 0, + 0, + 4], + ["customOrNullObject", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["custom", + "CustomConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSet", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["iconSetOrNullObject", + "IconSetConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScale", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["colorScaleOrNullObject", + "ColorScaleConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottom", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["topBottomOrNullObject", + "TopBottomConditionalFormat", + 35, + 0, + 0, + 4], + ["preset", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["presetOrNullObject", + "PresetCriteriaConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparison", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["textComparisonOrNullObject", + "TextConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValue", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4], + ["cellValueOrNullObject", + "CellValueConditionalFormat", + 35, + 0, + 0, + 4]], + [["delete", + 0, + 0, + 0, + 2, + 0, + 40], + ["changeRuleToCellValue", + 1, + 0, + 30], + ["changeRuleToColorScale", + 0, + 0, + 30], + ["changeRuleToContainsText", + 1, + 0, + 30], + ["changeRuleToCustom", + 1, + 0, + 30], + ["changeRuleToDataBar", + 0, + 0, + 30], + ["changeRuleToIconSet", + 0, + 0, + 30], + ["changeRuleToPresetCriteria", + 1, + 0, + 30], + ["changeRuleToTopBottom", + 1, + 0, + 30], + ["setRanges", + 1, + 0, + 30]], + [["getRange", + "Range", + 0, + 10, + 0, + 4], + ["getRangeOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getRanges", + "RangeAreas", + 0, + 10, + 6, + 4]]], + ["DataBarConditionalFormat", + 0, + [["showDataBarOnly", + 1, + 0, + 0, + 2, + 40], + ["barDirection", + 1, + 0, + 0, + 2, + 41], + ["axisFormat", + 1, + 0, + 0, + 2, + 41], + ["axisColor", + 1, + 0, + 0, + 2, + 41], + ["lowerBoundRule", + 1, + 0, + 0, + 2, + 41], + ["upperBoundRule", + 1, + 0, + 0, + 2, + 41]], + [["positiveFormat", + "ConditionalDataBarPositiveFormat", + 35, + 0, + 0, + 4], + ["negativeFormat", + "ConditionalDataBarNegativeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalDataBarPositiveFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["gradientFill", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40]]], + ["ConditionalDataBarNegativeFormat", + 0, + [["fillColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveFillColor", + 1, + 0, + 0, + 2, + 40], + ["borderColor", + 1, + 0, + 0, + 2, + 40], + ["matchPositiveBorderColor", + 1, + 0, + 0, + 2, + 40]]], + ["CustomConditionalFormat", + 0, + 0, + [["rule", + "ConditionalFormatRule", + 35, + 0, + 0, + 4], + ["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalFormatRule", + 0, + [["formula", + 1, + 0, + 0, + 2, + 41], + ["formulaLocal", + 1], + ["formulaR1C1", + 1]]], + ["IconSetConditionalFormat", + 0, + [["reverseIconOrder", + 1, + 0, + 0, + 2, + 41], + ["showIconOnly", + 1, + 0, + 0, + 2, + 41], + ["style", + 1, + 0, + 0, + 2, + 41], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["ColorScaleConditionalFormat", + 0, + [["threeColorScale", + 3], + ["criteria", + 1, + 0, + 0, + 2, + 41]]], + ["TopBottomConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["PresetCriteriaConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["TextConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["CellValueConditionalFormat", + 0, + [["rule", + 1, + 0, + 0, + 2, + 41]], + [["format", + "ConditionalRangeFormat", + 35, + 0, + 0, + 4]]], + ["ConditionalRangeFormat", + 0, + [["numberFormat", + 1]], + [["fill", + "ConditionalRangeFill", + 35, + 0, + 0, + 4], + ["font", + "ConditionalRangeFont", + 35, + 0, + 0, + 4], + ["borders", + "ConditionalRangeBorderCollection", + 51, + 0, + 0, + 4]], + [["clearFormat", + 0, + 0, + 30]]], + ["ConditionalRangeFont", + 0, + [["color", + 1, + 0, + 0, + 2, + 42], + ["italic", + 1, + 0, + 0, + 2, + 42], + ["bold", + 1, + 0, + 0, + 2, + 42], + ["underline", + 1, + 0, + 0, + 2, + 42], + ["strikethrough", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeFill", + 0, + [["color", + 1, + 0, + 0, + 2, + 42]], + 0, + [["clear", + 0, + 0, + 0, + 2, + 0, + 42]]], + ["ConditionalRangeBorder", + 0, + [["sideIndex", + 3], + ["style", + 1, + 0, + 0, + 2, + 42], + ["color", + 1, + 0, + 0, + 2, + 42]]], + ["ConditionalRangeBorderCollection", + 1, + [["count", + 3]], + [["top", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["bottom", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["left", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4], + ["right", + "ConditionalRangeBorder", + 35, + 0, + 0, + 4]], + 0, + [["getItem", + "ConditionalRangeBorder", + 1, + 18, + 0, + 4], + ["getItemAt", + "ConditionalRangeBorder", + 1, + 2, + 0, + 4]], + 0, + "ConditionalRangeBorder"], + ["NumberFormattingService", + 0, + 0, + 0, + 0, + [["getFormatter", + "NumberFormatter", + 1, + 3]], + 0, + 0, + 0, + "Microsoft.ExcelServices.NumberFormattingService", + 4], + ["NumberFormatter", + 0, + [["isDateTime", + 3], + ["isPercent", + 3], + ["isCurrency", + 3], + ["isNumeric", + 3], + ["isText", + 3], + ["hasYear", + 3], + ["hasMonth", + 3], + ["hasDayOfWeek", + 3]], + 0, + [["format", + 1, + 3]]], + ["CustomFunctionManager", + 36, + [["status", + 2]], + 0, + [["register", + 2]], + 0, + 0, + 0, + 0, + "Microsoft.ExcelServices.CustomFunctionManager", + 4], + ["Style", + 0, + [["builtIn", + 3], + ["formulaHidden", + 1], + ["horizontalAlignment", + 1], + ["includeAlignment", + 1], + ["includeBorder", + 1], + ["includeFont", + 1], + ["includeNumber", + 1], + ["includePatterns", + 1], + ["includeProtection", + 1], + ["indentLevel", + 1], + ["locked", + 1], + ["name", + 3], + ["numberFormat", + 1], + ["numberFormatLocal", + 1], + ["readingOrder", + 1], + ["shrinkToFit", + 1], + ["verticalAlignment", + 1], + ["wrapText", + 1], + ["textOrientation", + 5, + 5], + ["autoIndent", + 1, + 5]], + [["borders", + "RangeBorderCollection", + 51, + 0, + 0, + 4], + ["font", + "RangeFont", + 35, + 0, + 0, + 4], + ["fill", + "RangeFill", + 35, + 0, + 0, + 4]], + [["delete"]]], + ["StyleCollection", + 1, + 0, + 0, + [["add", + 1], + ["getCount", + 0, + 2, + 6, + 4]], + [["getItem", + "Style", + 1, + 18, + 0, + 4], + ["getItemAt", + "Style", + 1, + 2, + 6, + 4], + ["getItemOrNullObject", + "Style", + 1, + 2, + 18, + 4]], + 0, + "Style"], + ["TableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TableStyle", + 1, + 2, + 0, + 4], + ["add", + "TableStyle", + 2, + 8], + ["getDefault", + "TableStyle"]], + 0, + "TableStyle"], + ["TableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TableStyle"]]], + ["PivotTableStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "PivotTableStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "PivotTableStyle", + 1, + 2, + 0, + 4], + ["add", + "PivotTableStyle", + 2, + 8], + ["getDefault", + "PivotTableStyle"]], + 0, + "PivotTableStyle"], + ["PivotTableStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "PivotTableStyle"]]], + ["SlicerStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "SlicerStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerStyle", + 1, + 2, + 0, + 4], + ["add", + "SlicerStyle", + 2, + 8], + ["getDefault", + "SlicerStyle"]], + 0, + "SlicerStyle"], + ["SlicerStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "SlicerStyle"]]], + ["TimelineStyleCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["setDefault", + 1]], + [["getItem", + "TimelineStyle", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "TimelineStyle", + 1, + 2, + 0, + 4], + ["add", + "TimelineStyle", + 2, + 8], + ["getDefault", + "TimelineStyle"]], + 0, + "TimelineStyle"], + ["TimelineStyle", + 0, + [["name", + 1], + ["readOnly", + 3], + ["_Id", + 2]], + 0, + [["delete"]], + [["duplicate", + "TimelineStyle"]]], + ["InternalTest", + 0, + 0, + 0, + [["delay", + 1], + ["triggerMessage", + 4, + 0, + 11], + ["_RegisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTestEvent", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEvent", + 2, + 0, + 11], + ["triggerPostProcess", + 0, + 0, + 11], + ["_RegisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["_UnregisterTest1Event", + 0, + 0, + 11, + 2, + 0, + 1], + ["triggerTestEventWithFilter", + 3, + 0, + 11], + ["firstPartyMethod", + 0, + 2, + 11, + 5], + ["_RegisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionBeginEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_RegisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["_UnregisterCustomFunctionExecutionEndEvent", + 0, + 0, + 20, + 2, + 0, + 1], + ["unregisterAllCustomFunctionExecutionEvents", + 0, + 0, + 20], + ["updateRangeValueOnCurrentSheet", + 2, + 0, + 3, + 2], + ["triggerUserUndo", + 0, + 2, + 3], + ["triggerUserRedo", + 0, + 2, + 3], + ["enterCellEdit", + 1, + 0, + 6], + ["installCustomFunctionsFromCache", + 0, + 0, + 6], + ["recalc", + 2, + 0, + 6], + ["recalcBySolutionId", + 1, + 0, + 6], + ["safeForCellEditModeMethod", + 1, + 0, + 6], + ["exitCellEdit", + 0, + 0, + 6], + ["noPermissionMethod", + 1, + 0, + 6], + ["verifyCustomFunctionListExist", + 0, + 0, + 6], + ["enableContentWorkbookLink", + 0, + 0, + 3], + ["previewExecutionMethod", + 1, + 0, + 8, + 16], + ["setRapidJsonEnabled", + 1, + 0, + 8], + ["triggerVbaRecorderRecordingChanged", + 2, + 0, + 8]], + 0, + 0, + 0, + [["CustomFunctionExecutionBeginEvent", + 0, + 20, + "MessageType.customFunctionExecutionBeginEvent", + "", + "_RegisterCustomFunctionExecutionBeginEvent", + "_UnregisterCustomFunctionExecutionBeginEvent"], + ["CustomFunctionExecutionEndEvent", + 0, + 20, + "MessageType.customFunctionExecutionEndEvent", + "", + "_RegisterCustomFunctionExecutionEndEvent", + "_UnregisterCustomFunctionExecutionEndEvent"], + ["Test1Event", + 2, + 11, + "MessageType.test1Event", + "", + "_RegisterTest1Event", + "_UnregisterTest1Event"], + ["TestEvent", + 2, + 11, + "MessageType.testEvent", + "", + "_RegisterTestEvent", + "_UnregisterTestEvent"]], + "Microsoft.ExcelServices.InternalTest", + 4], + ["PageLayout", + 0, + [["orientation", + 1], + ["paperSize", + 1], + ["blackAndWhite", + 1], + ["printErrors", + 1], + ["zoom", + 1], + ["centerHorizontally", + 1], + ["centerVertically", + 1], + ["printHeadings", + 1], + ["printGridlines", + 1], + ["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["headerMargin", + 1], + ["footerMargin", + 1], + ["printComments", + 1], + ["draftMode", + 1], + ["firstPageNumber", + 1], + ["printOrder", + 1]], + [["headersFooters", + "HeaderFooterGroup", + 35, + 0, + 0, + 4]], + [["setPrintMargins", + 2], + ["setPrintArea", + 1], + ["setPrintTitleRows", + 1], + ["setPrintTitleColumns", + 1]], + [["getPrintArea", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintAreaOrNullObject", + "RangeAreas", + 0, + 10, + 0, + 4], + ["getPrintTitleRows", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleRowsOrNullObject", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumns", + "Range", + 0, + 10, + 0, + 4], + ["getPrintTitleColumnsOrNullObject", + "Range", + 0, + 10, + 0, + 4]]], + ["HeaderFooter", + 0, + [["leftHeader", + 1], + ["centerHeader", + 1], + ["rightHeader", + 1], + ["leftFooter", + 1], + ["centerFooter", + 1], + ["rightFooter", + 1]]], + ["HeaderFooterGroup", + 0, + [["state", + 1], + ["useSheetMargins", + 1], + ["useSheetScale", + 1]], + [["defaultForAllPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["firstPage", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["evenPages", + "HeaderFooter", + 35, + 0, + 0, + 4], + ["oddPages", + "HeaderFooter", + 35, + 0, + 0, + 4]]], + ["PageBreak", + 0, + [["_Id", + 2], + ["columnIndex", + 3], + ["rowIndex", + 3]], + 0, + [["delete"]], + [["getCellAfterBreak", + "Range", + 0, + 10, + 0, + 4]]], + ["PageBreakCollection", + 1, + 0, + 0, + [["removePageBreaks"], + ["getCount", + 0, + 2, + 0, + 4]], + [["getItem", + "PageBreak", + 1, + 18, + 0, + 4], + ["add", + "PageBreak", + 1, + 8]], + 0, + "PageBreak"], + ["DataConnectionCollection", + 0, + 0, + 0, + [["refreshAll"]], + [["add", + "DataConnection", + 4, + 8, + 8, + 2, + 0, + 0, + 12]]], + ["RangeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "Range", + 1, + 2, + 0, + 4]], + 0, + "Range"], + ["RangeAreasCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "RangeAreas", + 1, + 2, + 0, + 4]], + 0, + "RangeAreas"], + ["CommentCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 2, + 27], + ["_UnregisterAddedEvent", + 0, + 2, + 27], + ["_RegisterDeletedEvent", + 0, + 2, + 27], + ["_UnregisterDeletedEvent", + 0, + 2, + 27], + ["_RegisterChangedEvent", + 0, + 2, + 27], + ["_UnregisterChangedEvent", + 0, + 2, + 27]], + [["getItem", + "Comment", + 1, + 18, + 0, + 4], + ["getItemAt", + "Comment", + 1, + 2, + 0, + 4], + ["add", + "Comment", + 3, + 8], + ["getItemByReplyId", + "Comment", + 1, + 2, + 0, + 4], + ["getItemByCell", + "Comment", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Comment", + 1, + 2, + 18, + 4]], + 0, + "Comment", + [["Added", + 0, + 27, + "MessageType.commentAddedEvent", + "this._eventTargetId", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Changed", + 0, + 27, + "MessageType.commentChangedEvent", + "this._eventTargetId", + "_RegisterChangedEvent", + "_UnregisterChangedEvent"], + ["Deleted", + 0, + 27, + "MessageType.commentDeletedEvent", + "this._eventTargetId", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Comment", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 1, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + [["replies", + "CommentReplyCollection", + 19, + 0, + 0, + 4]], + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["CommentReplyCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "CommentReply", + 2, + 8], + ["getItem", + "CommentReply", + 1, + 18, + 0, + 4], + ["getItemAt", + "CommentReply", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "CommentReply", + 1, + 2, + 18, + 4]], + 0, + "CommentReply"], + ["CommentReply", + 0, + [["id", + 3], + ["content", + 1], + ["authorName", + 3], + ["authorEmail", + 3], + ["creationDate", + 11], + ["resolved", + 3, + 7], + ["richContent", + 3, + 7], + ["mentions", + 3, + 7], + ["contentType", + 3, + 27]], + 0, + [["delete"], + ["updateMentions", + 1, + 0, + 7]], + [["getLocation", + "Range", + 0, + 10, + 0, + 4], + ["getParentComment", + "Comment"], + ["assignTask", + "DocumentTask", + 1, + 0, + 8], + ["getTask", + "DocumentTask", + 0, + 10, + 8, + 4], + ["getTaskOrNullObject", + "DocumentTask", + 0, + 10, + 8, + 4]]], + ["ShapeCollection", + 5, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["_RegisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_RegisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterAddedEvent", + 0, + 0, + 3, + 2, + 0, + 1], + ["_UnregisterDeletedEvent", + 0, + 0, + 3, + 2, + 0, + 1]], + [["addImage", + "Shape", + 1], + ["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["addGeometricShape", + "Shape", + 1], + ["addTextBox", + "Shape", + 1], + ["addSvg", + "Shape", + 1, + 0, + 8], + ["addGroup", + "Shape", + 1], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["addLine", + "Shape", + 5], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape", + [["Added", + 0, + 3, + "MessageType.shapeAddedEvent", + "this._ParentObject.id", + "_RegisterAddedEvent", + "_UnregisterAddedEvent"], + ["Deleted", + 0, + 3, + "MessageType.shapeDeletedEvent", + "this._ParentObject.id", + "_RegisterDeletedEvent", + "_UnregisterDeletedEvent"]]], + ["Shape", + 0, + [["id", + 3], + ["name", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["rotation", + 1], + ["zOrderPosition", + 3], + ["altTextTitle", + 1], + ["altTextDescription", + 1, + 0, + 0, + 2, + 36], + ["type", + 3], + ["lockAspectRatio", + 1], + ["placement", + 1, + 17], + ["geometricShapeType", + 1], + ["visible", + 1], + ["level", + 3], + ["connectionSiteCount", + 3], + ["scriptLink", + 1, + 8, + 0, + 2, + 37], + ["displayName", + 3, + 35]], + [["geometricShape", + "GeometricShape", + 2, + 0, + 0, + 4], + ["image", + "Image", + 2, + 0, + 0, + 4], + ["textFrame", + "TextFrame", + 2, + 0, + 0, + 4], + ["fill", + "ShapeFill", + 35, + 0, + 0, + 4], + ["group", + "ShapeGroup", + 2, + 0, + 0, + 4], + ["parentGroup", + "Shape", + 2, + 0, + 0, + 4], + ["line", + "Line", + 2, + 0, + 0, + 4], + ["lineFormat", + "ShapeLineFormat", + 35, + 0, + 0, + 4]], + [["setZOrder", + 1], + ["incrementLeft", + 1], + ["incrementTop", + 1], + ["incrementRotation", + 1], + ["scaleHeight", + 3], + ["scaleWidth", + 3], + ["delete"], + ["getAsImage", + 1], + ["_RegisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterActivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_RegisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterDeactivatedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["activate", + 0, + 0, + 3]], + [["copyTo", + "Shape", + 1, + 8, + 17, + 0, + 0, + "_GetShapeById"], + ["_GetShapeById", + "Shape", + 1, + 2, + 17, + 4]], + 0, + 0, + [["Activated", + 0, + 0, + "MessageType.shapeActivatedEvent", + "this.id", + "_RegisterActivatedEvent", + "_UnregisterActivatedEvent"], + ["Deactivated", + 0, + 0, + "MessageType.shapeDeactivatedEvent", + "this.id", + "_RegisterDeactivatedEvent", + "_UnregisterDeactivatedEvent"]]], + ["GeometricShape", + 0, + [["id", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["Image", + 0, + [["id", + 3], + ["format", + 3, + 0, + "format"]], + [["shape", + "Shape", + 2, + 0, + 0, + 4]]], + ["ShapeGroup", + 0, + [["id", + 3]], + [["shapes", + "GroupShapeCollection", + 19, + 0, + 0, + 4], + ["shape", + "Shape", + 2, + 0, + 0, + 4]], + [["ungroup"]]], + ["GroupShapeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["_GetItem", + "Shape", + 1, + 18, + 0, + 4], + ["getItemAt", + "Shape", + 1, + 2, + 0, + 4], + ["getItem", + "Shape", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "Shape", + 1, + 2, + 18, + 4]], + 0, + "Shape"], + ["Line", + 0, + [["id", + 3], + ["connectorType", + 1, + 0, + "connectorType"], + ["beginArrowheadLength", + 1], + ["beginArrowheadStyle", + 1], + ["beginArrowheadWidth", + 1], + ["endArrowheadLength", + 1], + ["endArrowheadStyle", + 1], + ["endArrowheadWidth", + 1], + ["isBeginConnected", + 3], + ["beginConnectedSite", + 3], + ["isEndConnected", + 3], + ["endConnectedSite", + 3]], + [["shape", + "Shape", + 2, + 0, + 0, + 4], + ["beginConnectedShape", + "Shape", + 2, + 0, + 0, + 4], + ["endConnectedShape", + "Shape", + 2, + 0, + 0, + 4]], + [["connectBeginShape", + 2], + ["disconnectBeginShape"], + ["connectEndShape", + 2], + ["disconnectEndShape"]]], + ["ShapeFill", + 0, + [["foregroundColor", + 1], + ["type", + 3], + ["transparency", + 1]], + 0, + [["clear"], + ["setSolidColor", + 1]]], + ["ShapeLineFormat", + 0, + [["visible", + 1], + ["color", + 1], + ["style", + 1], + ["weight", + 1], + ["dashStyle", + 1], + ["transparency", + 1]]], + ["TextFrame", + 0, + [["leftMargin", + 1], + ["rightMargin", + 1], + ["topMargin", + 1], + ["bottomMargin", + 1], + ["horizontalAlignment", + 1], + ["horizontalOverflow", + 1], + ["verticalAlignment", + 1], + ["verticalOverflow", + 1], + ["orientation", + 1], + ["readingOrder", + 1], + ["hasText", + 3], + ["autoSizeSetting", + 1]], + [["textRange", + "TextRange", + 2, + 0, + 0, + 4]], + [["deleteText"]]], + ["TextRange", + 0, + [["text", + 1]], + [["font", + "ShapeFont", + 35, + 0, + 0, + 4]], + 0, + [["getSubstring", + "TextRange", + 2]]], + ["ShapeFont", + 0, + [["size", + 1], + ["name", + 1], + ["color", + 1], + ["bold", + 1], + ["italic", + 1], + ["underline", + 1]]], + ["Slicer", + 0, + [["id", + 3], + ["name", + 1], + ["caption", + 1], + ["left", + 1], + ["top", + 1], + ["width", + 1], + ["height", + 1], + ["nameInFormula", + 1, + 8], + ["isFilterCleared", + 3], + ["style", + 1], + ["sortBy", + 1], + ["sortUsingCustomLists", + 1, + 3], + ["columnCount", + 1, + 3], + ["disableMoveResizeUI", + 1, + 3], + ["displayHeader", + 1, + 3], + ["rowHeight", + 1, + 3], + ["shapeId", + 2, + 3]], + [["slicerItems", + "SlicerItemCollection", + 19, + 0, + 0, + 4], + ["worksheet", + "Worksheet", + 35, + 0, + 0, + 4], + ["slicerStyle", + "SlicerStyle", + 35, + 8, + 0, + 4]], + [["delete"], + ["clearFilters"], + ["getSelectedItems"], + ["selectItems", + 1], + ["activate", + 0, + 2, + 3], + ["setStyle", + 1, + 0, + 8]]], + ["SlicerCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["add", + "Slicer", + 3, + 8], + ["getItemAt", + "Slicer", + 1, + 2, + 0, + 4], + ["getItem", + "Slicer", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "Slicer", + 1, + 2, + 0, + 4]], + 0, + "Slicer"], + ["SlicerItem", + 0, + [["key", + 3], + ["name", + 3], + ["isSelected", + 1], + ["hasData", + 3]]], + ["SlicerItemCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4]], + [["getItemAt", + "SlicerItem", + 1, + 2, + 0, + 4], + ["getItem", + "SlicerItem", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "SlicerItem", + 1, + 2, + 0, + 4]], + 0, + "SlicerItem"], + ["Ribbon", + 0, + [["activeTab", + 1]], + 0, + [["executeCommand", + 2], + ["showTeachingCallout", + 3], + ["_RegisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["_UnregisterCommandExecutedEvent", + 0, + 0, + 0, + 2, + 0, + 1], + ["showChartDialog", + 1, + 2, + 8, + 4]], + 0, + 0, + 0, + [["CommandExecuted", + 0, + 0, + "MessageType.ribbonCommandExecutedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterCommandExecutedEvent", + "_UnregisterCommandExecutedEvent"]]], + ["LinkedDataType", + 0, + [["dataProvider", + 2], + ["serviceId", + 2], + ["lastRefreshed", + 10], + ["name", + 2], + ["periodicRefreshInterval", + 2], + ["refreshDataLoadWarnings", + 2], + ["refreshMode", + 2], + ["supportedRefreshModes", + 2], + ["refreshErrors", + 2]], + 0, + [["requestRefresh", + 0, + 0, + 0, + 2], + ["requestSetRefreshMode", + 1, + 0, + 0, + 2]]], + ["LinkedDataTypeCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["requestRefreshAll", + 0, + 0, + 0, + 2], + ["_RegisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshRequestCompletedEvent", + 0, + 2, + 0, + 4], + ["_RegisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterRefreshModeChangedEvent", + 0, + 2, + 0, + 4], + ["_RegisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4], + ["_UnregisterLinkedDataTypeAddedEvent", + 0, + 2, + 0, + 4]], + [["getItem", + "LinkedDataType", + 1, + 18, + 0, + 4], + ["getItemOrNullObject", + "LinkedDataType", + 1], + ["getItemAt", + "LinkedDataType", + 1, + 2, + 0, + 4]], + 0, + "LinkedDataType", + [["LinkedDataTypeAdded", + 0, + 0, + "MessageType.linkedDataTypeLinkedDataTypeAddedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterLinkedDataTypeAddedEvent", + "_UnregisterLinkedDataTypeAddedEvent"], + ["RefreshModeChanged", + 0, + 0, + "MessageType.linkedDataTypeRefreshModeChangedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshModeChangedEvent", + "_UnregisterRefreshModeChangedEvent"], + ["RefreshRequestCompleted", + 0, + 0, + "MessageType.linkedDataTypeRefreshRequestCompletedEvent", + "OfficeExtension.Constants.eventWorkbookId", + "_RegisterRefreshRequestCompletedEvent", + "_UnregisterRefreshRequestCompletedEvent"]]], + ["SheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "SheetView", + 1]]], + ["SheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "SheetView", + 1, + 8], + ["enterTemporary", + "SheetView"], + ["getActive", + "SheetView"], + ["getItem", + "SheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "SheetView", + 1, + 2, + 0, + 4]], + 0, + "SheetView"], + ["NamedSheetView", + 0, + [["name"]], + 0, + [["activate"], + ["delete"]], + [["duplicate", + "NamedSheetView", + 1]]], + ["NamedSheetViewCollection", + 1, + 0, + 0, + [["getCount", + 0, + 2, + 0, + 4], + ["exit"]], + [["add", + "NamedSheetView", + 1, + 8], + ["enterTemporary", + "NamedSheetView"], + ["getActive", + "NamedSheetView"], + ["getItem", + "NamedSheetView", + 1, + 18, + 0, + 4], + ["getItemAt", + "NamedSheetView", + 1, + 2, + 0, + 4], + ["getItemOrNullObject", + "NamedSheetView", + 1, + 2, + 28, + 4]], + 0, + "NamedSheetView"], + ["FunctionResult", + 0, + [["error", + 3], + ["value", + 3]]], + ["Functions", + 0, + 0, + 0, + 0, + [["count", + "FunctionResult", + 1, + 72], + ["if", + "FunctionResult", + 3, + 8], + ["isNA", + "FunctionResult", + 1, + 8], + ["isError", + "FunctionResult", + 1, + 8], + ["sum", + "FunctionResult", + 1, + 72], + ["average", + "FunctionResult", + 1, + 72], + ["min", + "FunctionResult", + 1, + 72], + ["max", + "FunctionResult", + 1, + 72], + ["na", + "FunctionResult", + 0, + 8], + ["npv", + "FunctionResult", + 2, + 72], + ["dollar", + "FunctionResult", + 2, + 8], + ["fixed", + "FunctionResult", + 3, + 8], + ["sin", + "FunctionResult", + 1, + 8], + ["cos", + "FunctionResult", + 1, + 8], + ["tan", + "FunctionResult", + 1, + 8], + ["atan", + "FunctionResult", + 1, + 8], + ["pi", + "FunctionResult", + 0, + 8], + ["sqrt", + "FunctionResult", + 1, + 8], + ["exp", + "FunctionResult", + 1, + 8], + ["ln", + "FunctionResult", + 1, + 8], + ["log10", + "FunctionResult", + 1, + 8], + ["abs", + "FunctionResult", + 1, + 8], + ["int", + "FunctionResult", + 1, + 8], + ["sign", + "FunctionResult", + 1, + 8], + ["round", + "FunctionResult", + 2, + 8], + ["lookup", + "FunctionResult", + 3, + 8], + ["rept", + "FunctionResult", + 2, + 8], + ["mid", + "FunctionResult", + 3, + 8], + ["len", + "FunctionResult", + 1, + 8], + ["value", + "FunctionResult", + 1, + 8], + ["true", + "FunctionResult", + 0, + 8], + ["false", + "FunctionResult", + 0, + 8], + ["and", + "FunctionResult", + 1, + 72], + ["or", + "FunctionResult", + 1, + 72], + ["not", + "FunctionResult", + 1, + 8], + ["mod", + "FunctionResult", + 2, + 8], + ["dcount", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCount"], + ["dsum", + "FunctionResult", + 3, + 8, + 0, + 0, + "DSum"], + ["daverage", + "FunctionResult", + 3, + 8, + 0, + 0, + "DAverage"], + ["dmin", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMin"], + ["dmax", + "FunctionResult", + 3, + 8, + 0, + 0, + "DMax"], + ["dstDev", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDev"], + ["dvar", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVar"], + ["text", + "FunctionResult", + 2, + 8], + ["pv", + "FunctionResult", + 5, + 8], + ["fv", + "FunctionResult", + 5, + 8], + ["nper", + "FunctionResult", + 5, + 8, + 0, + 0, + "NPer"], + ["pmt", + "FunctionResult", + 5, + 8], + ["rate", + "FunctionResult", + 6, + 8], + ["mirr", + "FunctionResult", + 3, + 8, + 0, + 0, + "MIrr"], + ["irr", + "FunctionResult", + 2, + 8], + ["rand", + "FunctionResult", + 0, + 8], + ["match", + "FunctionResult", + 3, + 8], + ["date", + "FunctionResult", + 3, + 8], + ["time", + "FunctionResult", + 3, + 8], + ["day", + "FunctionResult", + 1, + 8], + ["month", + "FunctionResult", + 1, + 8], + ["year", + "FunctionResult", + 1, + 8], + ["weekday", + "FunctionResult", + 2, + 8], + ["hour", + "FunctionResult", + 1, + 8], + ["minute", + "FunctionResult", + 1, + 8], + ["second", + "FunctionResult", + 1, + 8], + ["now", + "FunctionResult", + 0, + 8], + ["areas", + "FunctionResult", + 1, + 8], + ["rows", + "FunctionResult", + 1, + 8], + ["columns", + "FunctionResult", + 1, + 8], + ["type", + "FunctionResult", + 1, + 8], + ["atan2", + "FunctionResult", + 2, + 8], + ["asin", + "FunctionResult", + 1, + 8], + ["acos", + "FunctionResult", + 1, + 8], + ["choose", + "FunctionResult", + 2, + 72], + ["hlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "HLookup"], + ["vlookup", + "FunctionResult", + 4, + 8, + 0, + 0, + "VLookup"], + ["isref", + "FunctionResult", + 1, + 8], + ["log", + "FunctionResult", + 2, + 8], + ["char", + "FunctionResult", + 1, + 8], + ["lower", + "FunctionResult", + 1, + 8], + ["upper", + "FunctionResult", + 1, + 8], + ["proper", + "FunctionResult", + 1, + 8], + ["left", + "FunctionResult", + 2, + 8], + ["right", + "FunctionResult", + 2, + 8], + ["exact", + "FunctionResult", + 2, + 8], + ["trim", + "FunctionResult", + 1, + 8], + ["replace", + "FunctionResult", + 4, + 8], + ["substitute", + "FunctionResult", + 4, + 8], + ["code", + "FunctionResult", + 1, + 8], + ["find", + "FunctionResult", + 3, + 8], + ["isErr", + "FunctionResult", + 1, + 8], + ["isText", + "FunctionResult", + 1, + 8], + ["isNumber", + "FunctionResult", + 1, + 8], + ["t", + "FunctionResult", + 1, + 8, + 0, + 0, + "T"], + ["n", + "FunctionResult", + 1, + 8, + 0, + 0, + "N"], + ["datevalue", + "FunctionResult", + 1, + 8], + ["timevalue", + "FunctionResult", + 1, + 8], + ["sln", + "FunctionResult", + 3, + 8], + ["syd", + "FunctionResult", + 4, + 8], + ["ddb", + "FunctionResult", + 5, + 8], + ["clean", + "FunctionResult", + 1, + 8], + ["ipmt", + "FunctionResult", + 6, + 8], + ["ppmt", + "FunctionResult", + 6, + 8], + ["countA", + "FunctionResult", + 1, + 72], + ["product", + "FunctionResult", + 1, + 72], + ["fact", + "FunctionResult", + 1, + 8], + ["dproduct", + "FunctionResult", + 3, + 8, + 0, + 0, + "DProduct"], + ["isNonText", + "FunctionResult", + 1, + 8], + ["dstDevP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DStDevP"], + ["dvarP", + "FunctionResult", + 3, + 8, + 0, + 0, + "DVarP"], + ["trunc", + "FunctionResult", + 2, + 8], + ["isLogical", + "FunctionResult", + 1, + 8], + ["dcountA", + "FunctionResult", + 3, + 8, + 0, + 0, + "DCountA"], + ["usdollar", + "FunctionResult", + 2, + 8, + 0, + 0, + "USDollar"], + ["findB", + "FunctionResult", + 3, + 8], + ["replaceB", + "FunctionResult", + 4, + 8], + ["leftb", + "FunctionResult", + 2, + 8], + ["rightb", + "FunctionResult", + 2, + 8], + ["midb", + "FunctionResult", + 3, + 8], + ["lenb", + "FunctionResult", + 1, + 8], + ["roundUp", + "FunctionResult", + 2, + 8], + ["roundDown", + "FunctionResult", + 2, + 8], + ["asc", + "FunctionResult", + 1, + 8], + ["dbcs", + "FunctionResult", + 1, + 8], + ["days360", + "FunctionResult", + 3, + 8], + ["today", + "FunctionResult", + 0, + 8], + ["vdb", + "FunctionResult", + 7, + 8], + ["median", + "FunctionResult", + 1, + 72], + ["sinh", + "FunctionResult", + 1, + 8], + ["cosh", + "FunctionResult", + 1, + 8], + ["tanh", + "FunctionResult", + 1, + 8], + ["asinh", + "FunctionResult", + 1, + 8], + ["acosh", + "FunctionResult", + 1, + 8], + ["atanh", + "FunctionResult", + 1, + 8], + ["dget", + "FunctionResult", + 3, + 8, + 0, + 0, + "DGet"], + ["db", + "FunctionResult", + 5, + 8], + ["error_Type", + "FunctionResult", + 1, + 8], + ["aveDev", + "FunctionResult", + 1, + 72], + ["gammaLn", + "FunctionResult", + 1, + 8], + ["combin", + "FunctionResult", + 2, + 8], + ["even", + "FunctionResult", + 1, + 8], + ["fisher", + "FunctionResult", + 1, + 8], + ["fisherInv", + "FunctionResult", + 1, + 8], + ["standardize", + "FunctionResult", + 3, + 8], + ["odd", + "FunctionResult", + 1, + 8], + ["permut", + "FunctionResult", + 2, + 8], + ["devSq", + "FunctionResult", + 1, + 72], + ["geoMean", + "FunctionResult", + 1, + 72], + ["harMean", + "FunctionResult", + 1, + 72], + ["sumSq", + "FunctionResult", + 1, + 72], + ["kurt", + "FunctionResult", + 1, + 72], + ["skew", + "FunctionResult", + 1, + 72], + ["large", + "FunctionResult", + 2, + 8], + ["small", + "FunctionResult", + 2, + 8], + ["trimMean", + "FunctionResult", + 2, + 8], + ["concatenate", + "FunctionResult", + 1, + 72], + ["power", + "FunctionResult", + 2, + 8], + ["radians", + "FunctionResult", + 1, + 8], + ["degrees", + "FunctionResult", + 1, + 8], + ["subtotal", + "FunctionResult", + 2, + 72], + ["sumIf", + "FunctionResult", + 3, + 8], + ["countIf", + "FunctionResult", + 2, + 8], + ["countBlank", + "FunctionResult", + 1, + 8], + ["ispmt", + "FunctionResult", + 4, + 8], + ["roman", + "FunctionResult", + 2, + 8], + ["hyperlink", + "FunctionResult", + 2, + 8], + ["averageA", + "FunctionResult", + 1, + 72], + ["maxA", + "FunctionResult", + 1, + 72], + ["minA", + "FunctionResult", + 1, + 72], + ["stDevPA", + "FunctionResult", + 1, + 72], + ["varPA", + "FunctionResult", + 1, + 72], + ["stDevA", + "FunctionResult", + 1, + 72], + ["varA", + "FunctionResult", + 1, + 72], + ["bahtText", + "FunctionResult", + 1, + 8], + ["hex2Bin", + "FunctionResult", + 2, + 8], + ["hex2Dec", + "FunctionResult", + 1, + 8], + ["hex2Oct", + "FunctionResult", + 2, + 8], + ["dec2Bin", + "FunctionResult", + 2, + 8], + ["dec2Hex", + "FunctionResult", + 2, + 8], + ["dec2Oct", + "FunctionResult", + 2, + 8], + ["oct2Bin", + "FunctionResult", + 2, + 8], + ["oct2Hex", + "FunctionResult", + 2, + 8], + ["oct2Dec", + "FunctionResult", + 1, + 8], + ["bin2Dec", + "FunctionResult", + 1, + 8], + ["bin2Oct", + "FunctionResult", + 2, + 8], + ["bin2Hex", + "FunctionResult", + 2, + 8], + ["imSub", + "FunctionResult", + 2, + 8], + ["imDiv", + "FunctionResult", + 2, + 8], + ["imPower", + "FunctionResult", + 2, + 8], + ["imAbs", + "FunctionResult", + 1, + 8], + ["imSqrt", + "FunctionResult", + 1, + 8], + ["imLn", + "FunctionResult", + 1, + 8], + ["imLog2", + "FunctionResult", + 1, + 8], + ["imLog10", + "FunctionResult", + 1, + 8], + ["imSin", + "FunctionResult", + 1, + 8], + ["imCos", + "FunctionResult", + 1, + 8], + ["imExp", + "FunctionResult", + 1, + 8], + ["imArgument", + "FunctionResult", + 1, + 8], + ["imConjugate", + "FunctionResult", + 1, + 8], + ["imaginary", + "FunctionResult", + 1, + 8], + ["imReal", + "FunctionResult", + 1, + 8], + ["complex", + "FunctionResult", + 3, + 8], + ["imSum", + "FunctionResult", + 1, + 72], + ["imProduct", + "FunctionResult", + 1, + 72], + ["seriesSum", + "FunctionResult", + 4, + 8], + ["factDouble", + "FunctionResult", + 1, + 8], + ["sqrtPi", + "FunctionResult", + 1, + 8], + ["quotient", + "FunctionResult", + 2, + 8], + ["delta", + "FunctionResult", + 2, + 8], + ["geStep", + "FunctionResult", + 2, + 8], + ["isEven", + "FunctionResult", + 1, + 8], + ["isOdd", + "FunctionResult", + 1, + 8], + ["mround", + "FunctionResult", + 2, + 8, + 0, + 0, + "MRound"], + ["erf", + "FunctionResult", + 2, + 8], + ["erfC", + "FunctionResult", + 1, + 8], + ["besselJ", + "FunctionResult", + 2, + 8], + ["besselK", + "FunctionResult", + 2, + 8], + ["besselY", + "FunctionResult", + 2, + 8], + ["besselI", + "FunctionResult", + 2, + 8], + ["xirr", + "FunctionResult", + 3, + 8], + ["xnpv", + "FunctionResult", + 3, + 8], + ["priceMat", + "FunctionResult", + 6, + 8], + ["yieldMat", + "FunctionResult", + 6, + 8], + ["intRate", + "FunctionResult", + 5, + 8], + ["received", + "FunctionResult", + 5, + 8], + ["disc", + "FunctionResult", + 5, + 8], + ["priceDisc", + "FunctionResult", + 5, + 8], + ["yieldDisc", + "FunctionResult", + 5, + 8], + ["tbillEq", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillEq"], + ["tbillPrice", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillPrice"], + ["tbillYield", + "FunctionResult", + 3, + 8, + 0, + 0, + "TBillYield"], + ["price", + "FunctionResult", + 7, + 8], + ["yield", + "FunctionResult", + 7, + 8], + ["dollarDe", + "FunctionResult", + 2, + 8], + ["dollarFr", + "FunctionResult", + 2, + 8], + ["nominal", + "FunctionResult", + 2, + 8], + ["effect", + "FunctionResult", + 2, + 8], + ["cumPrinc", + "FunctionResult", + 6, + 8], + ["cumIPmt", + "FunctionResult", + 6, + 8], + ["edate", + "FunctionResult", + 2, + 8, + 0, + 0, + "EDate"], + ["eoMonth", + "FunctionResult", + 2, + 8], + ["yearFrac", + "FunctionResult", + 3, + 8], + ["coupDayBs", + "FunctionResult", + 4, + 8], + ["coupDays", + "FunctionResult", + 4, + 8], + ["coupDaysNc", + "FunctionResult", + 4, + 8], + ["coupNcd", + "FunctionResult", + 4, + 8], + ["coupNum", + "FunctionResult", + 4, + 8], + ["coupPcd", + "FunctionResult", + 4, + 8], + ["duration", + "FunctionResult", + 6, + 8], + ["mduration", + "FunctionResult", + 6, + 8, + 0, + 0, + "MDuration"], + ["oddLPrice", + "FunctionResult", + 8, + 8], + ["oddLYield", + "FunctionResult", + 8, + 8], + ["oddFPrice", + "FunctionResult", + 9, + 8], + ["oddFYield", + "FunctionResult", + 9, + 8], + ["randBetween", + "FunctionResult", + 2, + 8], + ["weekNum", + "FunctionResult", + 2, + 8], + ["amorDegrc", + "FunctionResult", + 7, + 8], + ["amorLinc", + "FunctionResult", + 7, + 8], + ["convert", + "FunctionResult", + 3, + 8], + ["accrInt", + "FunctionResult", + 8, + 8], + ["accrIntM", + "FunctionResult", + 5, + 8], + ["workDay", + "FunctionResult", + 3, + 8], + ["networkDays", + "FunctionResult", + 3, + 8], + ["gcd", + "FunctionResult", + 1, + 72], + ["multiNomial", + "FunctionResult", + 1, + 72], + ["lcm", + "FunctionResult", + 1, + 72], + ["fvschedule", + "FunctionResult", + 2, + 8, + 0, + 0, + "FVSchedule"], + ["countIfs", + "FunctionResult", + 1, + 72], + ["sumIfs", + "FunctionResult", + 2, + 72], + ["averageIf", + "FunctionResult", + 3, + 8], + ["averageIfs", + "FunctionResult", + 2, + 72], + ["binom_Dist", + "FunctionResult", + 4, + 8], + ["binom_Inv", + "FunctionResult", + 3, + 8], + ["confidence_Norm", + "FunctionResult", + 3, + 8], + ["confidence_T", + "FunctionResult", + 3, + 8], + ["expon_Dist", + "FunctionResult", + 3, + 8], + ["gamma_Dist", + "FunctionResult", + 4, + 8], + ["gamma_Inv", + "FunctionResult", + 3, + 8], + ["norm_Dist", + "FunctionResult", + 4, + 8], + ["norm_Inv", + "FunctionResult", + 3, + 8], + ["percentile_Exc", + "FunctionResult", + 2, + 8], + ["percentile_Inc", + "FunctionResult", + 2, + 8], + ["percentRank_Exc", + "FunctionResult", + 3, + 8], + ["percentRank_Inc", + "FunctionResult", + 3, + 8], + ["poisson_Dist", + "FunctionResult", + 3, + 8], + ["quartile_Exc", + "FunctionResult", + 2, + 8], + ["quartile_Inc", + "FunctionResult", + 2, + 8], + ["rank_Avg", + "FunctionResult", + 3, + 8], + ["rank_Eq", + "FunctionResult", + 3, + 8], + ["stDev_S", + "FunctionResult", + 1, + 72], + ["stDev_P", + "FunctionResult", + 1, + 72], + ["t_Dist", + "FunctionResult", + 3, + 8], + ["t_Dist_2T", + "FunctionResult", + 2, + 8], + ["t_Dist_RT", + "FunctionResult", + 2, + 8], + ["t_Inv", + "FunctionResult", + 2, + 8], + ["t_Inv_2T", + "FunctionResult", + 2, + 8], + ["var_S", + "FunctionResult", + 1, + 72], + ["var_P", + "FunctionResult", + 1, + 72], + ["weibull_Dist", + "FunctionResult", + 4, + 8], + ["networkDays_Intl", + "FunctionResult", + 4, + 8], + ["workDay_Intl", + "FunctionResult", + 4, + 8], + ["ecma_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ECMA_Ceiling"], + ["iso_Ceiling", + "FunctionResult", + 2, + 8, + 0, + 0, + "ISO_Ceiling"], + ["beta_Dist", + "FunctionResult", + 6, + 8], + ["beta_Inv", + "FunctionResult", + 5, + 8], + ["chiSq_Dist", + "FunctionResult", + 3, + 8], + ["chiSq_Dist_RT", + "FunctionResult", + 2, + 8], + ["chiSq_Inv", + "FunctionResult", + 2, + 8], + ["chiSq_Inv_RT", + "FunctionResult", + 2, + 8], + ["f_Dist", + "FunctionResult", + 4, + 8], + ["f_Dist_RT", + "FunctionResult", + 3, + 8], + ["f_Inv", + "FunctionResult", + 3, + 8], + ["f_Inv_RT", + "FunctionResult", + 3, + 8], + ["hypGeom_Dist", + "FunctionResult", + 5, + 8], + ["logNorm_Dist", + "FunctionResult", + 4, + 8], + ["logNorm_Inv", + "FunctionResult", + 3, + 8], + ["negBinom_Dist", + "FunctionResult", + 4, + 8], + ["norm_S_Dist", + "FunctionResult", + 2, + 8], + ["norm_S_Inv", + "FunctionResult", + 1, + 8], + ["z_Test", + "FunctionResult", + 3, + 8], + ["erf_Precise", + "FunctionResult", + 1, + 8], + ["erfC_Precise", + "FunctionResult", + 1, + 8], + ["gammaLn_Precise", + "FunctionResult", + 1, + 8], + ["ceiling_Precise", + "FunctionResult", + 2, + 8], + ["floor_Precise", + "FunctionResult", + 2, + 8], + ["acot", + "FunctionResult", + 1, + 8], + ["acoth", + "FunctionResult", + 1, + 8], + ["cot", + "FunctionResult", + 1, + 8], + ["coth", + "FunctionResult", + 1, + 8], + ["csc", + "FunctionResult", + 1, + 8], + ["csch", + "FunctionResult", + 1, + 8], + ["sec", + "FunctionResult", + 1, + 8], + ["sech", + "FunctionResult", + 1, + 8], + ["imTan", + "FunctionResult", + 1, + 8], + ["imCot", + "FunctionResult", + 1, + 8], + ["imCsc", + "FunctionResult", + 1, + 8], + ["imCsch", + "FunctionResult", + 1, + 8], + ["imSec", + "FunctionResult", + 1, + 8], + ["imSech", + "FunctionResult", + 1, + 8], + ["bitand", + "FunctionResult", + 2, + 8], + ["bitor", + "FunctionResult", + 2, + 8], + ["bitxor", + "FunctionResult", + 2, + 8], + ["bitlshift", + "FunctionResult", + 2, + 8], + ["bitrshift", + "FunctionResult", + 2, + 8], + ["permutationa", + "FunctionResult", + 2, + 8], + ["combina", + "FunctionResult", + 2, + 8], + ["xor", + "FunctionResult", + 1, + 72], + ["pduration", + "FunctionResult", + 3, + 8, + 0, + 0, + "PDuration"], + ["base", + "FunctionResult", + 3, + 8], + ["decimal", + "FunctionResult", + 2, + 8], + ["days", + "FunctionResult", + 2, + 8], + ["binom_Dist_Range", + "FunctionResult", + 4, + 8], + ["gamma", + "FunctionResult", + 1, + 8], + ["skew_p", + "FunctionResult", + 1, + 72], + ["gauss", + "FunctionResult", + 1, + 8], + ["phi", + "FunctionResult", + 1, + 8], + ["rri", + "FunctionResult", + 3, + 8], + ["unichar", + "FunctionResult", + 1, + 8], + ["unicode", + "FunctionResult", + 1, + 8], + ["arabic", + "FunctionResult", + 1, + 8], + ["isoWeekNum", + "FunctionResult", + 1, + 8], + ["numberValue", + "FunctionResult", + 3, + 8], + ["sheet", + "FunctionResult", + 1, + 8], + ["sheets", + "FunctionResult", + 1, + 8], + ["isFormula", + "FunctionResult", + 1, + 8], + ["ceiling_Math", + "FunctionResult", + 3, + 8], + ["floor_Math", + "FunctionResult", + 3, + 8], + ["imSinh", + "FunctionResult", + 1, + 8], + ["imCosh", + "FunctionResult", + 1, + 8]]]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataXlapi, targetNamespaceObject: Excel }); +})(Excel || (Excel = {})); +var _EndExcel = "_EndExcel"; +if (typeof (window) !== "undefined" && + window.OSF && + window.OSF._OfficeAppFactory && + window.OSF._OfficeAppFactory.getHostInfo && + window.OSF._OfficeAppFactory.getHostInfo()) { + var hostPlatform = window.OSF._OfficeAppFactory.getHostInfo().hostPlatform; + if (hostPlatform === "web") { + OfficeExtension._internalConfig.enablePreviewExecution = true; + } +} +var OSF; +(function (OSF) { + function isNodeJs() { + try { + return (typeof process === 'object' + && String(process) === '[object process]'); + } + catch (e) { + return false; + } + } + if (!isNodeJs() && !OSF.isOfficeReactNative()) { + try { + OSF.Flights = OSF.OUtil.parseFlights(true); + } + catch (ex) { } + OSF._OfficeAppFactory.bootstrap(function () { }, function (e) { + if (e instanceof Error) { + console.warn(e.message); + } + else { + console.warn(JSON.stringify(e)); + } + }); + function funcToRunWhenContentLoaded() { + OSFPerformance.hostSpecificFileName = OSF.LoadScriptHelper.getHostBundleJsName(); + Office.onReadyInternal(function () { + OSFPerfUtil.sendPerformanceTelemetry(); + }); + if (OSF._OfficeAppFactory.getHostInfo().hostLocale) { + setTimeout(function () { + OSF.OUtil.ensureOfficeStringsJs().catch(function (ex) { + console.error(ex); + }); + }, 0); + } + } + if (document.readyState === "complete" + || document.readyState === "interactive") { + funcToRunWhenContentLoaded(); + } + else { + window.addEventListener('DOMContentLoaded', function (event) { + funcToRunWhenContentLoaded(); + }); + } + } +})(OSF || (OSF = {})); +OSFPerformance.hostInitializationEnd = OSFPerformance.now(); +OSFPerformance.totalJSHeapSize = OSFPerformance.getTotalJSHeapSize(); +OSFPerformance.usedJSHeapSize = OSFPerformance.getUsedJSHeapSize(); +OSFPerformance.jsHeapSizeLimit = OSFPerformance.getJSHeapSizeLimit(); + diff --git a/dist/excel.js b/dist/excel.js new file mode 100644 index 000000000..107bba574 --- /dev/null +++ b/dist/excel.js @@ -0,0 +1,15 @@ +/* + * Office JavaScript API library + * + * Copyright (c) Microsoft Corporation. All rights reserved. + * + * Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + * + * This file also contains the following Promise implementation (with a few small modifications): + * * @overview es6-promise - a tiny implementation of Promises/A+. + * * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * * @license Licensed under MIT license + * * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * * @version 2.3.0 + */ +var OSFPerformance,CustomFunctionMappings,CustomFunctions,Microsoft,Strings;!function(e){e.now=function(){return"undefined"!=typeof performance&&performance.now?performance.now():0},e.getTotalJSHeapSize=function(){return"undefined"!=typeof performance&&performance.memory?performance.memory.totalJSHeapSize:0},e.getUsedJSHeapSize=function(){return"undefined"!=typeof performance&&performance.memory?performance.memory.usedJSHeapSize:0},e.getJSHeapSizeLimit=function(){return"undefined"!=typeof performance&&performance.memory?performance.memory.jsHeapSizeLimit:0},e.officeExecuteStartDate=e.officeExecuteStartDate||Date.now(),e.officeExecuteStart=e.officeExecuteStart||0,e.officeExecuteEnd=e.officeExecuteEnd||0,e.hostInitializationStart=0,e.hostInitializationEnd=0,e.totalJSHeapSize=0,e.usedJSHeapSize=0,e.jsHeapSizeLimit=0,e.createOMEnd=0,e.hostSpecificFileName="",e.getAppContextStart=0,e.getAppContextEnd=0,e.getAppContextXdmStart=0,e.getAppContextXdmEnd=0,e.officeOnReady=0}(OSFPerformance||(OSFPerformance={})),function(e){e.definePropertyOnNamespace=function(e,t,n){Object.defineProperty(e,t,{get:function(){return n()},configurable:!0,enumerable:!0})}}(OSF||(OSF={})),OSFPerformance.hostInitializationStart=OSFPerformance.now(),function(e){!function(e){function t(){return e.m_association||(e.m_association=new OSF.Association),e.m_association}e.m_association=e.m_association,e.associate=function(){t().associate.apply(t(),arguments)},OSF.definePropertyOnNamespace(e,"_association",t)}(e.actions||(e.actions={}))}(Office||(Office={})),function(e){!function(e){e[e.Select=0]="Select",e[e.UnSelect=1]="UnSelect",e[e.CancelDialog=2]="CancelDialog",e[e.InsertAgave=3]="InsertAgave",e[e.CtrlF6In=4]="CtrlF6In",e[e.CtrlF6Exit=5]="CtrlF6Exit",e[e.CtrlF6ExitShift=6]="CtrlF6ExitShift",e[e.SelectWithError=7]="SelectWithError",e[e.NotifyHostError=8]="NotifyHostError",e[e.RefreshAddinCommands=9]="RefreshAddinCommands",e[e.PageIsReady=10]="PageIsReady",e[e.TabIn=11]="TabIn",e[e.TabInShift=12]="TabInShift",e[e.TabExit=13]="TabExit",e[e.TabExitShift=14]="TabExitShift",e[e.EscExit=15]="EscExit",e[e.F2Exit=16]="F2Exit",e[e.ExitNoFocusable=17]="ExitNoFocusable",e[e.ExitNoFocusableShift=18]="ExitNoFocusableShift",e[e.MouseEnter=19]="MouseEnter",e[e.MouseLeave=20]="MouseLeave",e[e.UpdateTargetUrl=21]="UpdateTargetUrl",e[e.InstallCustomFunctions=22]="InstallCustomFunctions",e[e.SendTelemetryEvent=23]="SendTelemetryEvent",e[e.UninstallCustomFunctions=24]="UninstallCustomFunctions",e[e.SendMessage=25]="SendMessage",e[e.LaunchExtensionComponent=26]="LaunchExtensionComponent",e[e.StopExtensionComponent=27]="StopExtensionComponent",e[e.RestartExtensionComponent=28]="RestartExtensionComponent",e[e.EnableTaskPaneHeaderButton=29]="EnableTaskPaneHeaderButton",e[e.DisableTaskPaneHeaderButton=30]="DisableTaskPaneHeaderButton",e[e.TaskPaneHeaderButtonClicked=31]="TaskPaneHeaderButtonClicked",e[e.RemoveAppCommandsAddin=32]="RemoveAppCommandsAddin",e[e.RefreshRibbonGallery=33]="RefreshRibbonGallery",e[e.GetOriginalControlId=34]="GetOriginalControlId",e[e.OfficeJsReady=35]="OfficeJsReady",e[e.InsertDevManifest=36]="InsertDevManifest",e[e.InsertDevManifestError=37]="InsertDevManifestError",e[e.SendCustomerContent=38]="SendCustomerContent",e[e.KeyboardShortcuts=39]="KeyboardShortcuts"}(e.AgaveHostAction||(e.AgaveHostAction={}))}(OSF||(OSF={})),function(e){var t=function(){function t(){var t=this;this._processAppCommandInvocation=function(e){var n=t._verifyManifestCallback(e.callbackName);if(0==n.errorCode){var o=t._constructEventObjectForCallback(e);o?window.setTimeout((function(){n.callback(o)}),0):t._invokeAppCommandCompletedMethod(e.appCommandId,5001,"")}else t._invokeAppCommandCompletedMethod(e.appCommandId,n.errorCode,"")},this._eventDispatch=new e.EventDispatch([{type:e.EventType.AppCommandInvoked,id:e.EventDispId.dispidAppCommandInvokedEvent,getTargetId:function(){return""},fromSafeArrayHost:function(t){return{type:e.EventType.AppCommandInvoked,appCommandId:t[0],callbackName:t[1],eventObjStr:t[2]}},fromWebHost:function(t){return{type:e.EventType.AppCommandInvoked,appCommandId:t[0],callbackName:t[1],eventObjStr:t[2]}}}])}return t.prototype.initializeEventHandler=function(t){var n=this;this.addHandlerAsync(e.EventType.AppCommandInvoked,(function(e){n._processAppCommandInvocation(e)}),t)},t.prototype.appCommandInvocationCompletedAsync=function(t,n,o,r){e._OfficeAppFactory.getAsyncMethodExecutor().executeAsync(94,{fromSafeArrayHost:function(e){return e},fromWebHost:function(e){return e},toSafeArrayHost:function(){return[t,n,o]},toWebHost:function(){var e={};return e[0]=t,e[1]=n,e[2]=o,e}},r)},t.prototype.addHandlerAsync=function(t,n,o){e.EventHelper.addEventHandler(t,n,o,this._eventDispatch,void 0,e.OUtil.isPopupWindow())},t.prototype._verifyManifestCallback=function(e){var t={callback:null,errorCode:11101};e=e.trim();try{var n=this._getCallbackFunc(e);if("function"!=typeof n)return t}catch(e){return t}return{callback:n,errorCode:0}},t.prototype._getCallbackFuncFromActionAssociateTable=function(e){var t=e.toUpperCase();return Office.actions._association.mappings[t]},t.prototype._getCallbackFunc=function(e){return this._getCallbackFuncFromActionAssociateTable(e)},t.prototype._invokeAppCommandCompletedMethod=function(e,t,n){this.appCommandInvocationCompletedAsync(e,t,n,(function(e){e.status!==Office.AsyncResultStatus.Succeeded&&console.error("Failed to notify the host thta app command is completed")}))},t.prototype._constructEventObjectForCallback=function(e){var t,n,o=this;try{t=JSON.parse(e.eventObjStr),n=JSON.parse(e.eventObjStr)}catch(e){}return t||(t={}),n||(n={}),t.completed=function(t){n.completedContext=t;var r=JSON.stringify(n);o._invokeAppCommandCompletedMethod(e.appCommandId,0,r)},t},t.initialize=function(){null==t._instance&&(t._instance=new t,t._instance.initializeEventHandler((function(e){e.status!==Office.AsyncResultStatus.Succeeded&&console.error("Cannot initialize app command: "+JSON.stringify(e))})))},t._instance=null,t}();e.AppCommandManager=t}(OSF||(OSF={})),function(e){!function(e){e[e.Unsupported=0]="Unsupported",e[e.Excel=1]="Excel",e[e.Word=2]="Word",e[e.PowerPoint=4]="PowerPoint",e[e.Outlook=8]="Outlook",e[e.ExcelWebApp=16]="ExcelWebApp",e[e.WordWebApp=32]="WordWebApp",e[e.OutlookWebApp=64]="OutlookWebApp",e[e.Project=128]="Project",e[e.AccessWebApp=256]="AccessWebApp",e[e.PowerpointWebApp=512]="PowerpointWebApp",e[e.ExcelIOS=1024]="ExcelIOS",e[e.Sway=2048]="Sway",e[e.WordIOS=4096]="WordIOS",e[e.PowerPointIOS=8192]="PowerPointIOS",e[e.Access=16384]="Access",e[e.Lync=32768]="Lync",e[e.OutlookIOS=65536]="OutlookIOS",e[e.OneNoteWebApp=131072]="OneNoteWebApp",e[e.OneNote=262144]="OneNote",e[e.ExcelWinRT=524288]="ExcelWinRT",e[e.WordWinRT=1048576]="WordWinRT",e[e.PowerpointWinRT=2097152]="PowerpointWinRT",e[e.OutlookAndroid=4194304]="OutlookAndroid",e[e.OneNoteWinRT=8388608]="OneNoteWinRT",e[e.ExcelAndroid=8388609]="ExcelAndroid",e[e.VisioWebApp=8388610]="VisioWebApp",e[e.OneNoteIOS=8388611]="OneNoteIOS",e[e.WordAndroid=8388613]="WordAndroid",e[e.PowerpointAndroid=8388614]="PowerpointAndroid",e[e.Visio=8388615]="Visio",e[e.OneNoteAndroid=4194305]="OneNoteAndroid"}(e.AppName||(e.AppName={}))}(OSF||(OSF={})),function(e){var t=function(){function e(){this.m_mappings={},this.m_onchangeHandlers=[]}return e.prototype.associate=function(e,t){function n(e){"undefined"!=typeof console&&console.warn&&console.warn(e)}if(1==arguments.length&&"object"==typeof arguments[0]&&arguments[0]){var o=arguments[0];for(var r in o)this.associate(r,o[r])}else if(2==arguments.length){var i=arguments[0],a=arguments[1];if("string"!=typeof i)return void n("[InvalidArg] Function=associate");if("function"!=typeof a)return void n("[InvalidArg] Function=associate");var s=i.toUpperCase();this.m_mappings[s]&&n("[DuplicatedName] Function="+i),this.m_mappings[s]=a;for(var l=0;l2){u=[];for(var d=1;d0&&null!=u){var f=u[u.length-1];o.length==f?u[u.length-1]=o:c=5001}}else u=l[1];var p=null;0==c&&(p=i.fromSafeArrayHost(u)),this._asyncMethodExecutor.invokeCallback(a,r,c,p,s)}return!0},t.prototype.handleWebHostResponse=function(e,t,n,o,r,i){var a=null;0==t&&(a=o.fromWebHost(e)),this._asyncMethodExecutor.invokeCallback(r,n,t,a,i)},t}();e.AsyncMethodExecutorHelper=t}(OSF||(OSF={})),function(e){!function(e){!function(e){!function(e){e.Context="Context",e.Value="Value",e.Status="Status",e.Error="Error"}(e.Properties||(e.Properties={})),function(e){e[e.Success=0]="Success",e[e.Failed=1]="Failed"}(e.ErrorCode||(e.ErrorCode={})),function(e){e.Name="Name",e.Message="Message",e.Code="Code"}(e.ErrorProperties||(e.ErrorProperties={}))}(e.AsyncResultEnum||(e.AsyncResultEnum={}));var t=function(e,t){this.value=e.Value,this.status=t?Office.AsyncResultStatus.Failed:Office.AsyncResultStatus.Succeeded,e.Context&&(this.asyncContext=e.Context),t&&(this.error=new n(t.Name,t.Message,t.Code))};e.AsyncResult=t;var n=function(e,t,n){this.name=e,this.message=t,this.code=n};e.Error=n}(e.DDA||(e.DDA={}))}(OSF||(OSF={})),function(e){!function(t){t.createWebClientHostControllerHelper=function(t,n){return new e.WebClientHostControllerHelper(t,n)},t.createAsyncMethodExecutorHelper=function(t){return new e.AsyncMethodExecutorHelper(t)}}(e.BootStrapExtension||(e.BootStrapExtension={}))}(OSF||(OSF={})),function(e){!function(e){e.DefaultLocale="en-us",e.OfficeJS="office.js",e.OfficeDebugJS="office.debug.js",e.OfficeStringsId="OFFICESTRINGS",e.OfficeJsId="OFFICEJS",e.HostFileId="HOST",e.OfficeStringJS="office_strings.js",e.OfficeStringDebugJS="office_strings.debug.js",e.FileVersion="0.0.0.0"}(e.ConstantNames||(e.ConstantNames={}))}(OSF||(OSF={})),function(e){var t=function(){function e(){}return e.NotificationConversationIdSuffix="_ntf",e}();e.Constants=t}(OSF||(OSF={})),CustomFunctionMappings||(CustomFunctionMappings={}),function(e){e.delayInitialization=function(){CustomFunctionMappings.__delay__=!0},e._association=e._association||new OSF.Association,e.associate=function(){e._association.associate.apply(e._association,arguments),delete CustomFunctionMappings.__delay__}}(CustomFunctions||(CustomFunctions={})),function(e){!function(e){!function(e){var t={},n=!1;e.getErrorArgs=function(e){var o;n||(o=Strings.OfficeOM,t[1e3]={name:o.L_InvalidCoercion,message:o.L_CoercionTypeNotSupported},t[1001]={name:o.L_DataReadError,message:o.L_GetSelectionNotSupported},t[1002]={name:o.L_InvalidCoercion,message:o.L_CoercionTypeNotMatchBinding},t[1003]={name:o.L_DataReadError,message:o.L_InvalidGetRowColumnCounts},t[1004]={name:o.L_DataReadError,message:o.L_SelectionNotSupportCoercionType},t[1005]={name:o.L_DataReadError,message:o.L_InvalidGetStartRowColumn},t[1006]={name:o.L_DataReadError,message:o.L_NonUniformPartialGetNotSupported},t[1008]={name:o.L_DataReadError,message:o.L_GetDataIsTooLarge},t[1009]={name:o.L_DataReadError,message:o.L_FileTypeNotSupported},t[1010]={name:o.L_DataReadError,message:o.L_GetDataParametersConflict},t[1011]={name:o.L_DataReadError,message:o.L_InvalidGetColumns},t[1012]={name:o.L_DataReadError,message:o.L_InvalidGetRows},t[1013]={name:o.L_DataReadError,message:o.L_InvalidReadForBlankRow},t[2e3]={name:o.L_DataWriteError,message:o.L_UnsupportedDataObject},t[2001]={name:o.L_DataWriteError,message:o.L_CannotWriteToSelection},t[2002]={name:o.L_DataWriteError,message:o.L_DataNotMatchSelection},t[2003]={name:o.L_DataWriteError,message:o.L_OverwriteWorksheetData},t[2004]={name:o.L_DataWriteError,message:o.L_DataNotMatchBindingSize},t[2005]={name:o.L_DataWriteError,message:o.L_InvalidSetStartRowColumn},t[2006]={name:o.L_InvalidFormat,message:o.L_InvalidDataFormat},t[2007]={name:o.L_InvalidDataObject,message:o.L_DataNotMatchCoercionType},t[2008]={name:o.L_InvalidDataObject,message:o.L_DataNotMatchBindingType},t[2009]={name:o.L_DataWriteError,message:o.L_SetDataIsTooLarge},t[2010]={name:o.L_DataWriteError,message:o.L_NonUniformPartialSetNotSupported},t[2011]={name:o.L_DataWriteError,message:o.L_InvalidSetColumns},t[2012]={name:o.L_DataWriteError,message:o.L_InvalidSetRows},t[2013]={name:o.L_DataWriteError,message:o.L_SetDataParametersConflict},t[3e3]={name:o.L_BindingCreationError,message:o.L_SelectionCannotBound},t[3002]={name:o.L_InvalidBindingError,message:o.L_BindingNotExist},t[3003]={name:o.L_BindingCreationError,message:o.L_BindingToMultipleSelection},t[3004]={name:o.L_BindingCreationError,message:o.L_InvalidSelectionForBindingType},t[3005]={name:o.L_InvalidBindingOperation,message:o.L_OperationNotSupportedOnThisBindingType},t[3006]={name:o.L_BindingCreationError,message:o.L_NamedItemNotFound},t[3007]={name:o.L_BindingCreationError,message:o.L_MultipleNamedItemFound},t[3008]={name:o.L_BindingCreationError,message:o.L_InvalidNamedItemForBindingType},t[3009]={name:o.L_InvalidBinding,message:o.L_UnknownBindingType},t[3010]={name:o.L_InvalidBindingOperation,message:o.L_OperationNotSupportedOnMatrixData},t[3011]={name:o.L_InvalidBinding,message:o.L_InvalidColumnsForBinding},t[4e3]={name:o.L_ReadSettingsError,message:o.L_SettingNameNotExist},t[4001]={name:o.L_SaveSettingsError,message:o.L_SettingsCannotSave},t[4002]={name:o.L_SettingsStaleError,message:o.L_SettingsAreStale},t[5e3]={name:o.L_HostError,message:o.L_OperationNotSupported},t[5001]={name:o.L_InternalError,message:o.L_InternalErrorDescription},t[5002]={name:o.L_PermissionDenied,message:o.L_DocumentReadOnly},t[5003]={name:o.L_EventRegistrationError,message:o.L_EventHandlerNotExist},t[5004]={name:o.L_InvalidAPICall,message:o.L_InvalidApiCallInContext},t[5005]={name:o.L_ShuttingDown,message:o.L_ShuttingDown},t[5007]={name:o.L_UnsupportedEnumeration,message:o.L_UnsupportedEnumerationMessage},t[5008]={name:o.L_IndexOutOfRange,message:o.L_IndexOutOfRange},t[5009]={name:o.L_APINotSupported,message:o.L_BrowserAPINotSupported},t[5011]={name:o.L_APICallFailed,message:o.L_RequestTimeout},t[5012]={name:o.L_InvalidOrTimedOutSession,message:o.L_InvalidOrTimedOutSessionMessage},t[5013]={name:o.L_APICallFailed,message:o.L_InvalidApiArgumentsMessage},t[5015]={name:o.L_APICallFailed,message:o.L_WorkbookHiddenMessage},t[5016]={name:o.L_APICallFailed,message:o.L_WriteNotSupportedWhenModalDialogOpen},t[5100]={name:o.L_APICallFailed,message:o.L_TooManyIncompleteRequests},t[5101]={name:o.L_APICallFailed,message:o.L_RequestTokenUnavailable},t[5102]={name:o.L_APICallFailed,message:o.L_ActivityLimitReached},t[5103]={name:o.L_APICallFailed,message:o.L_RequestPayloadSizeLimitExceededMessage},t[5104]={name:o.L_APICallFailed,message:o.L_ResponsePayloadSizeLimitExceededMessage},t[6e3]={name:o.L_InvalidNode,message:o.L_CustomXmlNodeNotFound},t[6100]={name:o.L_CustomXmlError,message:o.L_CustomXmlError},t[6101]={name:o.L_CustomXmlExceedQuotaName,message:o.L_CustomXmlExceedQuotaMessage},t[6102]={name:o.L_CustomXmlOutOfDateName,message:o.L_CustomXmlOutOfDateMessage},t[7e3]={name:o.L_PermissionDenied,message:o.L_NoCapability},t[7001]={name:o.L_CannotNavigateTo,message:o.L_CannotNavigateTo},t[7002]={name:o.L_SpecifiedIdNotExist,message:o.L_SpecifiedIdNotExist},t[7004]={name:o.L_NavOutOfBound,message:o.L_NavOutOfBound},t[2014]={name:o.L_DataWriteReminder,message:o.L_CellDataAmountBeyondLimits},t[8e3]={name:o.L_MissingParameter,message:o.L_ElementMissing},t[8001]={name:o.L_PermissionDenied,message:o.L_NoCapability},t[8010]={name:o.L_InvalidValue,message:o.L_InvalidCellsValue},t[8011]={name:o.L_InvalidValue,message:o.L_InvalidTableOptionValue},t[8012]={name:o.L_InvalidValue,message:o.L_InvalidFormatValue},t[8020]={name:o.L_OutOfRange,message:o.L_RowIndexOutOfRange},t[8021]={name:o.L_OutOfRange,message:o.L_ColIndexOutOfRange},t[8022]={name:o.L_OutOfRange,message:o.L_FormatValueOutOfRange},t[8023]={name:o.L_FormattingReminder,message:o.L_CellFormatAmountBeyondLimits},t[1e4]={name:o.L_UserNotSignedIn,message:o.L_UserNotSignedIn},t[11e3]={name:o.L_MemoryLimit,message:o.L_CloseFileBeforeRetrieve},t[11001]={name:o.L_NetworkProblem,message:o.L_NetworkProblemRetrieveFile},t[11002]={name:o.L_InvalidValue,message:o.L_SliceSizeNotSupported},t[12007]={name:o.L_DisplayDialogError,message:o.L_DialogAlreadyOpened},t[12e3]={name:o.L_IndexOutOfRange,message:o.L_IndexOutOfRange},t[12001]={name:o.L_IndexOutOfRange,message:o.L_IndexOutOfRange},t[12002]={name:o.L_DisplayDialogError,message:o.L_NetworkProblem},t[12003]={name:o.L_DialogNavigateError,message:o.L_DialogInvalidScheme},t[12004]={name:o.L_DisplayDialogError,message:o.L_DialogAddressNotTrusted},t[12005]={name:o.L_DisplayDialogError,message:o.L_DialogRequireHTTPS},t[12009]={name:o.L_DisplayDialogError,message:o.L_UserClickIgnore},t[12011]={name:o.L_DisplayDialogError,message:o.L_NewWindowCrossZoneErrorString},t[13e3]={name:o.L_APINotSupported,message:o.L_InvalidSSOAddinMessage},t[13001]={name:o.L_UserNotSignedIn,message:o.L_UserNotSignedIn},t[13002]={name:o.L_UserAborted,message:o.L_UserAbortedMessage},t[13003]={name:o.L_UnsupportedUserIdentity,message:o.L_UnsupportedUserIdentityMessage},t[13004]={name:o.L_InvalidResourceUrl,message:o.L_InvalidResourceUrlMessage},t[13005]={name:o.L_InvalidGrant,message:o.L_InvalidGrantMessage},t[13006]={name:o.L_SSOClientError,message:o.L_SSOClientErrorMessage},t[13007]={name:o.L_SSOServerError,message:o.L_SSOServerErrorMessage},t[13008]={name:o.L_AddinIsAlreadyRequestingToken,message:o.L_AddinIsAlreadyRequestingTokenMessage},t[13009]={name:o.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:o.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage},t[13010]={name:o.L_SSOConnectionLostError,message:o.L_SSOConnectionLostErrorMessage},t[13012]={name:o.L_APINotSupported,message:o.L_SSOUnsupportedPlatform},t[13013]={name:o.L_APICallFailed,message:o.L_RequestTokenUnavailable},t[5014]={name:o.L_OperationCancelledError,message:o.L_OperationCancelledErrorMessage},n=!0);var r=t[e];return r?(r.name||(r.name=t[5001].name),r.message||(r.message=t[5001].message)):r=t[5001],r},e.addErrorMessage=function(e,n){t[e]=n}}(e.ErrorCodeManager||(e.ErrorCodeManager={}))}(e.DDA||(e.DDA={}))}(OSF||(OSF={})),function(e){var t=function(){function e(e){if(this._eventInfos={},this._queuedEventsArgs={},this._eventHandlers={},this._queuedEventsArgs={},null!=e)for(var t=0;t0)for(var o=0;o0)for(var o=0;o0&&(this._eventHandlers[e]=[],!0)},e.prototype.getEventHandlerCount=function(e){return null!=this._eventHandlers[e]?this._eventHandlers[e].length:-1},e.prototype.getEventInfo=function(e){return this._eventInfos[e]},e.prototype.fireEvent=function(e){if(null==e.type)return!1;var t=e.type;if(t&&this._eventHandlers[t]){for(var n=this._eventHandlers[t],o=0;o0){for(var o=t[0];n.length>0;){o(n.shift())}return!0}}return!1},e.prototype.clearQueuedEvent=function(e){e&&this._eventHandlers[e]&&(this._queuedEventsArgs[e]&&(this._queuedEventsArgs[e]=[]))},e}();e.EventDispatch=t}(OSF||(OSF={})),function(e){!function(e){e.dispidEventMin=0,e.dispidInitializeEvent=0,e.dispidSettingsChangedEvent=1,e.dispidDocumentSelectionChangedEvent=2,e.dispidBindingSelectionChangedEvent=3,e.dispidBindingDataChangedEvent=4,e.dispidDocumentOpenEvent=5,e.dispidDocumentCloseEvent=6,e.dispidActiveViewChangedEvent=7,e.dispidDocumentThemeChangedEvent=8,e.dispidOfficeThemeChangedEvent=9,e.dispidDialogMessageReceivedEvent=10,e.dispidDialogNotificationShownInAddinEvent=11,e.dispidDialogParentMessageReceivedEvent=12,e.dispidObjectDeletedEvent=13,e.dispidObjectSelectionChangedEvent=14,e.dispidObjectDataChangedEvent=15,e.dispidContentControlAddedEvent=16,e.dispidLiveShareStateChangedEvent=17,e.dispidActivationStatusChangedEvent=32,e.dispidRichApiMessageEvent=33,e.dispidAppCommandInvokedEvent=39,e.dispidDataNodeAddedEvent=60,e.dispidDataNodeReplacedEvent=61,e.dispidDataNodeDeletedEvent=62}(e.EventDispId||(e.EventDispId={}))}(OSF||(OSF={})),function(e){var t=function(){function t(){}return t.addEventHandler=function(n,o,r,i,a,s){var l=0;function c(t){0==t&&(i.hasEventHandler(n,o)||i.addEventHandler(n,o)||(t=5010));e._OfficeAppFactory.getAsyncMethodExecutor().invokeCallback(l,r,t,null,a)}var u=i.getEventInfo(n);if(u)try{if(s)return void c(0);l=u.id;var d=u.getTargetId();if(0==i.getEventHandlerCount(n))e._OfficeAppFactory.getAsyncMethodExecutor().registerEventAsync(l,u.type,d,(function(e){i.fireEvent(e)}),u,(function(t){c(e.Utility.getErrorCodeFromAsyncResult(t))}),a);else c(0)}catch(e){t.onException(l,e,r)}else c(5010)},t.removeEventHandler=function(n,o,r,i,a,s){var l=0;function c(t){e._OfficeAppFactory.getAsyncMethodExecutor().invokeCallback(l,r,t,null,a)}var u=i.getEventInfo(n);if(u)try{l=u.id;var d=u.getTargetId(),f=0,p=!0;null===o?(p=i.clearEventHandlers(n),f=0):f=(p=i.removeEventHandler(n,o))?0:5003;var h=i.getEventHandlerCount(n);if(p&&0==h)e._OfficeAppFactory.getAsyncMethodExecutor().unregisterEventAsync(l,u.type,d,(function(t){c(e.Utility.getErrorCodeFromAsyncResult(t))}),a);else c(f)}catch(e){t.onException(l,e,r)}else c(5010)},t.onException=function(t,n,o){if("number"!=typeof n)throw n;e._OfficeAppFactory.getAsyncMethodExecutor().invokeCallback(t,o,n,null)},t}();e.EventHelper=t}(OSF||(OSF={})),function(e){!function(e){e.ActiveViewChanged="activeViewChanged",e.AppCommandInvoked="appCommandInvoked",e.RichApiMessage="richApiMessage",e.DocumentSelectionChanged="documentSelectionChanged",e.BindingSelectionChanged="bindingSelectionChanged",e.BindingDataChanged="bindingDataChanged",e.OfficeThemeChanged="officeThemeChanged",e.DocumentThemeChanged="documentThemeChanged",e.LiveShareStateChanged="liveShareStateChanged",e.DataNodeDeleted="nodeDeleted",e.DataNodeInserted="nodeInserted",e.DataNodeReplaced="nodeReplaced",e.DialogMessageReceived="dialogMessageReceived",e.DialogParentMessageReceived="dialogParentMessageReceived",e.DialogParentEventReceived="dialogParentEventReceived",e.DialogEventReceived="dialogEventReceived",e.NodeDeleted="nodeDeleted",e.NodeInserted="nodeInserted",e.NodeReplaced="nodeReplaced",e.SettingsChanged="settingsChanged"}(e.EventType||(e.EventType={}))}(OSF||(OSF={})),function(e){!function(t){var n=function(){function t(){this.platformRemappings={web:Office.PlatformType.OfficeOnline,winrt:Office.PlatformType.Universal,win32:Office.PlatformType.PC,mac:Office.PlatformType.Mac,ios:Office.PlatformType.iOS,android:Office.PlatformType.Android},this.camelCaseMappings={powerpoint:Office.HostType.PowerPoint,onenote:Office.HostType.OneNote},this.hostInfo=e._OfficeAppFactory.getHostInfo()}return t.prototype.capitalizeFirstLetter=function(e){return e?e[0].toUpperCase()+e.slice(1).toLowerCase():e},t.getInstance=function(){return void 0===t.hostObj&&(t.hostObj=new t),t.hostObj},t.prototype.getPlatform=function(e){if(this.hostInfo&&this.hostInfo.hostPlatform){var t=this.hostInfo.hostPlatform.toLowerCase();if(this.platformRemappings[t])return this.platformRemappings[t]}return null},t.prototype.getHost=function(e){if(this.hostInfo&&this.hostInfo.hostType){var t=this.hostInfo.hostType.toLowerCase();if(this.camelCaseMappings[t])return this.camelCaseMappings[t];if(t=this.capitalizeFirstLetter(this.hostInfo.hostType),Office.HostType[t])return Office.HostType[t]}return null},t.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},t.prototype.getDiagnostics=function(e){return{host:this.getHost(),version:e||this.getDefaultVersion(),platform:this.getPlatform()}},t}();t.Host=n}(e.HostName||(e.HostName={}))}(OSF||(OSF={})),function(e){!function(e){e[e.SharedApp=1]="SharedApp",e[e.CustomFunction=2]="CustomFunction",e[e.ProtectedDocDisable=4]="ProtectedDocDisable",e[e.ExperimentJsEnabled=8]="ExperimentJsEnabled",e[e.PublicAddin=16]="PublicAddin",e[e.BundleJsEnabled=32]="BundleJsEnabled",e[e.IsMos=64]="IsMos",e[e.IsMonarch=128]="IsMonarch"}(e.HostInfoFlags||(e.HostInfoFlags={}))}(OSF||(OSF={})),function(e){!function(e){e.excel="excel",e.word="word"}(e.HostInfoHostType||(e.HostInfoHostType={}))}(OSF||(OSF={})),function(e){!function(e){e.web="web",e.winrt="winrt",e.win32="win32",e.mac="mac",e.ios="ios",e.android="android"}(e.HostInfoPlatform||(e.HostInfoPlatform={}))}(OSF||(OSF={})),function(e){var t=function(){function t(e,t,n,o){this._hostInfo=e,this._webAppState=t,this._context=n,this._hostFacade=o}return t.prototype.saveAndSetDialogInfo=function(e){},t.prototype.setAgaveHostCommunication=function(){},t.prototype.createClientHostController=function(){return null},t.prototype.createAsyncMethodExecutor=function(){return null},t.prototype.createClientSettingsManager=function(){return null},t.prototype.createSettings=function(t){var n=e.OUtil.getSessionStorage();if(n){var o=n.getItem(e._OfficeAppFactory.getCachedSessionSettingsKey());o?t=JSON.parse(o):(o=JSON.stringify(t),n.setItem(e._OfficeAppFactory.getCachedSessionSettingsKey(),o))}var r=e.OUtil.deserializeSettings(t),i=this.createClientSettingsManager();return new Office.Settings(r,i)},t.prototype.prepareApiSurface=function(t){var n=t.get_featureGates();n&&(Microsoft.Office.WebExtension.FeatureGates=n),e.BootStrapExtension.prepareApiSurface&&e.BootStrapExtension.prepareApiSurface(),e.BootStrapExtension.prepareHostSpecificSurface&&e.BootStrapExtension.prepareHostSpecificSurface(),OSFPerformance.createOMEnd=OSFPerformance.now()},t.prototype.getTabbableElements=function(){return null},t}();e.InitializationHelper=t}(OSF||(OSF={})),function(e){!function(e){e.Inserted="inserted",e.DocumentOpened="documentOpened"}(e.InitializationReason||(e.InitializationReason={}))}(OSF||(OSF={})),OSF||(OSF={}),function(e){!function(t){var n,o=["excel","word","powerpoint","outlook","office-common","office.common","office"],r=[".js",".debug.js"],i="_osfDisableHostCheck";function a(){if(!n){for(var e=function(e,t,n){var o=t.toLowerCase(),r=o.indexOf(n);if(r>=0&&(0===r||"/"===t.charAt(r-1)||"\\"===t.charAt(r-1))&&(r+n.length===t.length||"?"===t.charAt(r+n.length))){var a=t.substring(0,r),s=o.indexOf(".debug.js",r)>0,l=e.getAttribute("data-is-sdx");return{basePath:a,name:n,isDebugJs:s,isSdx:"1"===l||"true"==l,disableHostCheck:window.hasOwnProperty(i)&&!0===window._osfDisableHostCheck}}return null},t=document.getElementsByTagName("script"),a=t.length,s=0;st.MaxLiveShareStateDataSizeInBytes)throw new Error("State data size is limited to "+t.MaxLiveShareStateDataSizeInBytes+" bytes.");this._liveShareState=e},e.prototype.addHandlerAsync=function(e,t,n){OSF.EventHelper.addEventHandler(e,t,n,this._eventDispatch)},e.prototype.removeHandlerAsync=function(e,t,n){OSF.EventHelper.removeEventHandler(e,t,n,this._eventDispatch)},e}();e.LiveShareState=n}(Office||(Office={})),function(e){var t={"ar-sa":!0,"bg-bg":!0,"bn-in":!0,"ca-es":!0,"cs-cz":!0,"da-dk":!0,"de-de":!0,"el-gr":!0,"en-us":!0,"es-es":!0,"et-ee":!0,"eu-es":!0,"fa-ir":!0,"fi-fi":!0,"fr-fr":!0,"gl-es":!0,"he-il":!0,"hi-in":!0,"hr-hr":!0,"hu-hu":!0,"id-id":!0,"it-it":!0,"ja-jp":!0,"kk-kz":!0,"ko-kr":!0,"lo-la":!0,"lt-lt":!0,"lv-lv":!0,"ms-my":!0,"nb-no":!0,"nl-nl":!0,"nn-no":!0,"pl-pl":!0,"pt-br":!0,"pt-pt":!0,"ro-ro":!0,"ru-ru":!0,"sk-sk":!0,"sl-si":!0,"sr-cyrl-cs":!0,"sr-cyrl-rs":!0,"sr-latn-cs":!0,"sr-latn-rs":!0,"sv-se":!0,"th-th":!0,"tr-tr":!0,"uk-ua":!0,"ur-pk":!0,"vi-vn":!0,"zh-cn":!0,"zh-tw":!0},n={ar:"ar-sa",bg:"bg-bg",bn:"bn-in",ca:"ca-es",cs:"cs-cz",da:"da-dk",de:"de-de",el:"el-gr",en:"en-us",es:"es-es",et:"et-ee",eu:"eu-es",fa:"fa-ir",fi:"fi-fi",fr:"fr-fr",gl:"gl-es",he:"he-il",hi:"hi-in",hr:"hr-hr",hu:"hu-hu",id:"id-id",it:"it-it",ja:"ja-jp",kk:"kk-kz",ko:"ko-kr",lo:"lo-la",lt:"lt-lt",lv:"lv-lv",ms:"ms-my",nb:"nb-no",nl:"nl-nl",nn:"nn-no",pl:"pl-pl",pt:"pt-br",ro:"ro-ro",ru:"ru-ru",sk:"sk-sk",sl:"sl-si",sr:"sr-cyrl-cs",sv:"sv-se",th:"th-th",tr:"tr-tr",uk:"uk-ua",ur:"ur-pk",vi:"vi-vn",zh:"zh-cn"};e.getSupportedLocale=function(e,o){if(void 0===o&&(o="en-us"),!e)return o;var r;if((e=e.toLowerCase())in t)r=e;else{var i=e.split("-",1);i&&i.length>0&&(r=n[i[0]])}return r||(r=o),r}}(OSF||(OSF={})),function(e){e.OfficeOM||(e.OfficeOM={})}(Strings||(Strings={})),function(e){!function(t){var n;t.ensureOfficeStringsJs=function(){return n||(n=new Office.Promise((function(n,o){if(e._OfficeAppFactory.getHostInfo().hostLocale){var r=e.LoadScriptHelper.getHostBundleJsBasePath()+e._OfficeAppFactory.getHostInfo().hostLocale+"/"+e.LoadScriptHelper.getOfficeStringJsName();e.OUtil.loadScript(r,(function(r){if(r)n();else{var i=e.LoadScriptHelper.getHostBundleJsBasePath()+e.ConstantNames.DefaultLocale+"/"+e.LoadScriptHelper.getOfficeStringJsName();t.loadScript(i,(function(t){t?n():o(new Error("Cannot load "+e.ConstantNames.OfficeStringJS))}))}}))}else o(new Error("No host locale"))}))),n}}(e.OUtil||(e.OUtil={}))}(OSF||(OSF={})),function(e){!function(t){!function(t){var n;OSF.definePropertyOnNamespace(t,"url",(function(){return OSF._OfficeAppFactory.getOfficeAppContext().get_docUrl()})),OSF.definePropertyOnNamespace(t,"mode",(function(){return 0==OSF._OfficeAppFactory.getOfficeAppContext().get_clientMode()?e.DocumentMode.ReadOnly:e.DocumentMode.ReadWrite})),OSF.definePropertyOnNamespace(t,"settings",(function(){if(!n){var e=OSF._OfficeAppFactory.getOfficeAppContext().get_settingsFunc()();n=OSF._OfficeAppFactory.getInitializationHelper().createSettings(e)}return n})),t.goToByIdAsync=function(t,n,o,r){var i={};i[e.GoToType.Binding]=0,i[e.GoToType.NamedItem]=1,i[e.GoToType.Slide]=2,i[e.GoToType.Index]=3;var a={};a[e.SelectionMode.Default]=0,a[e.SelectionMode.Selected]=1,a[e.SelectionMode.None]=2;var s=i[n],l=0,c=r;"function"==typeof o?c=o:void 0!==o&&(l=a[o]);var u={toSafeArrayHost:function(){return[t,s,l]},fromSafeArrayHost:function(e){return e},toWebHost:function(){return{DdaGoToByIdMethod:{Id:t,GoToType:s,SelectionMode:l}}},fromWebHost:function(e){return e}};OSF._OfficeAppFactory.getAsyncMethodExecutor().executeAsync(82,u,c)}}(t.document||(t.document={}))}(e.context||(e.context={}))}(Office||(Office={})),function(e){!function(e){!function(e){e.sendMessage=function(e){if(OSF._OfficeAppFactory.getHostInfo().hostPlatform!=OSF.HostInfoPlatform.web)throw OSF.Utility.createNotImplementedException();var t=OSF._OfficeAppFactory.getWebAppState();t.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t.id,OSF.AgaveHostAction.SendMessage,e])}}(e.messaging||(e.messaging={}))}(e.context||(e.context={}))}(Office||(Office={})),function(e){!function(t){var n,o;OSF.definePropertyOnNamespace(t,"contentLanguage",(function(){return OSF._OfficeAppFactory.getOfficeAppContext().get_dataLocale()})),OSF.definePropertyOnNamespace(t,"displayLanguage",(function(){return OSF._OfficeAppFactory.getOfficeAppContext().get_appUILocale()})),OSF.definePropertyOnNamespace(t,"isDialog",(function(){return OSF._OfficeAppFactory.getHostInfo().isDialog})),OSF.definePropertyOnNamespace(t,"touchEnabled",(function(){return OSF._OfficeAppFactory.getOfficeAppContext().get_touchEnabled()})),OSF.definePropertyOnNamespace(t,"commerceAllowed",(function(){return OSF._OfficeAppFactory.getOfficeAppContext().get_commerceAllowed()})),OSF.definePropertyOnNamespace(t,"host",(function(){return OSF.HostName.Host.getInstance().getHost()})),OSF.definePropertyOnNamespace(t,"platform",(function(){return OSF.HostName.Host.getInstance().getPlatform()})),OSF.definePropertyOnNamespace(t,"diagnostics",(function(){return OSF.HostName.Host.getInstance().getDiagnostics(OSF._OfficeAppFactory.getOfficeAppContext().get_hostFullVersion())})),OSF.definePropertyOnNamespace(t,"requirements",(function(){if(!n){var e=OSF._OfficeAppFactory.getOfficeAppContext();e&&(n=e.get_isDialog()?OSF.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(e):OSF.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(e))}return n})),OSF.definePropertyOnNamespace(t,"officeTheme",(function(){var e=OSF._OfficeAppFactory.getOfficeAppContext().get_officeThemeFunc();return e?"function"==typeof e?e():e:void 0})),OSF.definePropertyOnNamespace(t,"webAuth",(function(){if(OSF.DDA.WebAuth)return OSF.DDA.WebAuth})),OSF.definePropertyOnNamespace(t,"license",(function(){return OSF._OfficeAppFactory.getOfficeAppContext().get_eToken()})),OSF.definePropertyOnNamespace(t,"hostSettings",(function(){if(!o){var t=OSF._OfficeAppFactory.getOfficeAppContext().get_hostSettingsFunc();if(void 0!==t){var n=t(),r=OSF.OUtil.deserializeSettings(n);o=new e.Settings(r,void 0)}}return o}))}(e.context||(e.context={}))}(Office||(Office={})),function(e){!function(e){!function(e){e.refreshRibbon=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.RefreshRibbonGallery,e])}}(e.ribbonGallery||(e.ribbonGallery={}))}(e.context||(e.context={}))}(Office||(Office={})),function(e){!function(e){!function(e){e.taskPaneAction||(e.taskPaneAction={})}(e.ui||(e.ui={}))}(e.context||(e.context={}))}(Office||(Office={}));var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0;)e._officeOnReadyState.officeOnReadyCallbacks.shift()(e._officeOnReadyState.officeOnReadyHostAndPlatformInfo);e._officeOnReadyState.officeOnReadyPromiseResolve(e._officeOnReadyState.officeOnReadyHostAndPlatformInfo),e._officeOnReadyState.isOfficeOnReadyCalled||OSF.OUtil.waitForFunction((function(){return"function"==typeof e.initialize}),(function(t){t&&e.initialize(OSF._OfficeAppFactory.getOfficeAppContext().get_reason())}),400,50)}}(Office||(Office={}));var __awaiter=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){e.done?r(e.value):new n((function(t){t(e.value)})).then(a,s)}l((o=o.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]1?s[1]:a}}}catch(t){e.Utility.log(JSON.stringify(t))}var l=e.OUtil.getSessionStorage();if(!o&&l.getItem("hostInfoValue")&&(o=l.getItem("hostInfoValue")),o){o=decodeURIComponent(o),t.isO15=!1;var c=o.split("$");void 0===c[2]&&(c=o.split("|")),t.hostType=void 0===c[0]?"":c[0].toLowerCase(),t.hostPlatform=void 0===c[1]?"":c[1].toLowerCase(),t.hostSpecificFileVersion=void 0===c[2]?"":c[2].toLowerCase(),t.hostLocale=void 0===c[3]?"":c[3].toLowerCase(),t.osfControlAppCorrelationId=void 0===c[4]?"":c[4],"telemetry"==t.osfControlAppCorrelationId&&(t.osfControlAppCorrelationId=""),t.isDialog=void 0!==c[5]&&"isDialog"==c[5],t.disableLogging=void 0!==c[6]&&"disableLogging"==c[6],t.flags="string"==typeof c[7]&&c[7].length>0?parseInt(c[7]):0,l.setItem("hostInfoValue",o)}else t.isO15=!0,t.hostLocale=e.Utility.getQueryStringValue("locale");return t}}(e._OfficeAppFactory||(e._OfficeAppFactory={}))}(OSF||(OSF={})),function(e){var t;!function(t){var n,o,r,i,a,s,l,c,u;"undefined"!=typeof window&&(window.location&&(n=window.location.hash,o=window.location.search),r=window.name);var d={0:"Unknown",1:"Hidden",2:"Taskpane",3:"Dialog"};function f(t,n){e.AppCommandManager.initialize();var o=t.get_appName(),r=null;0!=(i.flags&e.HostInfoFlags.SharedApp)&&(r={visibilityMode:d[t.get_initialDisplayMode()]}),Office.fireOnReady({host:e.HostName.Host.getInstance().getHost(o),platform:e.HostName.Host.getInstance().getPlatform(o),addin:r}),i.hostPlatform==e.HostInfoPlatform.web&&null!=a.clientEndPoint&&a.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[a.id,e.AgaveHostAction.OfficeJsReady,Date.now()]),n(t)}t.bootstrap=function(n,o){if(a={id:null,webAppUrl:null,conversationID:null,clientEndPoint:null,wnd:window.parent,focused:!1,serviceEndPoint:null,serializerVersion:1},i=t.retrieveHostInfo(),function(){!0;try{if(i.disableLogging)return void!1;window.external=window.external||{},void 0===window.external.GetLoggingAllowed||window.external.GetLoggingAllowed()}catch(e){}}(),function(){if(i.hostPlatform===e.HostInfoPlatform.web)s=new e.WebInitializationHelper(i,a,null,null);else if(i.hostPlatform===e.HostInfoPlatform.win32)s=new e.RichClientInitializationHelper(i,a,null,null);else if(i.hostPlatform===e.HostInfoPlatform.ios||i.hostPlatform===e.HostInfoPlatform.mac){if(!(window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.Agave))throw e.Utility.createNotImplementedException();s=new e.WebkitInitializationHelper(i,a,null,null)}else i.hostPlatform===e.HostInfoPlatform.android||i.hostPlatform===e.HostInfoPlatform.winrt?s=new e.WebViewInitializationHelper(i,a,null,null):console.warn("Office.js is loaded inside in unknown host or platform "+i.hostPlatform)}(),s){i.hostPlatform===e.HostInfoPlatform.web&&s.saveAndSetDialogInfo(e.Utility.getQueryStringValue("_host_Info")),s.setAgaveHostCommunication(),OSFPerformance.getAppContextStart=OSFPerformance.now();s.getAppContext(window,(function(t){OSFPerformance.getAppContextEnd=OSFPerformance.now(),e.AppTelemetry.initialize(t),c=t,u=s.createClientHostController(),l=s.createAsyncMethodExecutor(),s.prepareApiSurface(t),e.BootStrapExtension.onGetAppContext?e.BootStrapExtension.onGetAppContext(t,a.wnd).then((function(){f(t,n)})):f(t,n)}),(function(e){o(e)}))}else o(new Error("Office.js cannot be initialized."))},t.getWindowName=function(){return r},t.getWindowLocationHash=function(){return n},t.getWindowLocationSearch=function(){return o},t.getAsyncMethodExecutor=function(){return l},t.getOfficeAppContext=function(){return c},t.getHostInfo=function(){return i},t.getCachedSessionSettingsKey=function(){return(null!=a.conversationID?a.conversationID:c.get_appInstanceId())+"CachedSessionSettings"},t.getWebAppState=function(){return a},t.getId=function(){return a.id},t.getInitializationHelper=function(){return s},t.getClientHostController=function(){return u}}(t=e._OfficeAppFactory||(e._OfficeAppFactory={})),e.getClientEndPoint=function(){return t.getWebAppState().clientEndPoint}}(OSF||(OSF={})),function(e){!function(e){e.Succeeded="succeeded",e.Failed="failed"}(e.AsyncResultStatus||(e.AsyncResultStatus={})),function(e){e.ReadOnly="readOnly",e.ReadWrite="readWrite"}(e.DocumentMode||(e.DocumentMode={})),function(e){e.Word="Word",e.Excel="Excel",e.PowerPoint="PowerPoint",e.Outlook="Outlook",e.OneNote="OneNote",e.Project="Project",e.Access="Access",e.Visio="Visio"}(e.HostType||(e.HostType={})),function(e){e.Inserted="inserted",e.DocumentOpened="documentOpened"}(e.InitializationReason||(e.InitializationReason={})),function(e){e.PC="PC",e.OfficeOnline="OfficeOnline",e.Mac="Mac",e.iOS="iOS",e.Android="Android",e.Universal="Universal"}(e.PlatformType||(e.PlatformType={})),function(e){e.Binding="binding",e.NamedItem="namedItem",e.Slide="slide",e.Index="index"}(e.GoToType||(e.GoToType={})),function(e){e.Default="default",e.Selected="selected",e.None="none"}(e.SelectionMode||(e.SelectionMode={})),function(e){e.Unformatted="unformatted",e.Formatted="formatted"}(e.ValueFormat||(e.ValueFormat={})),function(e){e.Text="text",e.Compressed="compressed",e.Pdf="pdf"}(e.FileType||(e.FileType={})),e.CoercionType={Html:"html",Matrix:"matrix",Ooxml:"ooxml",OoxmlPackage:"ooxmlPackage",PdfFile:"pdfFile",SlideRange:"slideRange",Table:"table",Text:"text"},function(e){e.Table="table",e.Text="text",e.Matrix="matrix"}(e.BindingType||(e.BindingType={})),function(e){e.OnlyVisible="onlyVisible",e.All="all"}(e.FilterType||(e.FilterType={})),function(e){e[e.All=0]="All",e[e.Data=1]="Data",e[e.Headers=2]="Headers"}(e.Table||(e.Table={})),function(e){e.Read="read",e.Edit="edit"}(e.ActiveView||(e.ActiveView={}))}(Office||(Office={}));var OSFPerfUtil,OSFWebkit,OTel,__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(e){e.appSpecificCheckOrigin=function(e,t,n,o){return!1}}(OfficeExt||(OfficeExt={})),function(e){var t=function(){function e(e,t,n){this._method=e,this._invokeType=t,this._blockingOthers=n}return e.prototype.getMethod=function(){return this._method},e.prototype.getInvokeType=function(){return this._invokeType},e.prototype.getBlockingFlag=function(){return this._blockingOthers},e}();e.XdmMethodObject=t;var n=function(){function e(e,t){this._registerMethodObject=e,this._unregisterMethodObject=t}return e.prototype.getRegisterMethodObject=function(){return this._registerMethodObject},e.prototype.getUnregisterMethodObject=function(){return this._unregisterMethodObject},e}();e.XdmEventMethodObject=n;var o=function(){function o(e){this._methodObjectList={},this._eventHandlerProxyList={},this._conversations={},this._policyManager=null,this._appDomains={},this._onHandleRequestError=null,this._methodObjectList={},this._eventHandlerProxyList={},this._Id=e,this._conversations={},this._policyManager=null,this._appDomains={},this._onHandleRequestError=null}return o.prototype.registerMethod=function(n,o,r,i){if(0!==r&&1!==r)throw e.Utility.createArgumentException("invokeType");var a=new t(o,r,i);this._methodObjectList[n]=a},o.prototype.unregisterMethod=function(e){delete this._methodObjectList[e]},o.prototype.registerEvent=function(e,o,r){var i=new n(new t(o,4,!1),new t(r,5,!1));this._methodObjectList[e]=i},o.prototype.registerEventEx=function(e,o,r,i,a){var s=new n(new t(o,r,!1),new t(i,a,!1));this._methodObjectList[e]=s},o.prototype.unregisterEvent=function(e){this.unregisterMethod(e)},o.prototype.registerConversation=function(t,n,o,r){if(e.Utility.xdmDebugLog("registerConversation: cId="+t+" Url="+n),o){if(!Array.isArray(o))throw e.Utility.createArgumentException("appDomains");this._appDomains[t]=o}this._conversations[t]={url:n,serializerVersion:r}},o.prototype.unregisterConversation=function(e){delete this._conversations[e]},o.prototype.setPolicyManager=function(t){if(!t.checkPermission)throw e.Utility.createArgumentException("policyManager");this._policyManager=t},o.prototype.getPolicyManager=function(){return this._policyManager},o.prototype.dispose=function(){this._methodObjectList=null,this._eventHandlerProxyList=null,this._Id=null,this._conversations=null,this._policyManager=null,this._appDomains=null,this._onHandleRequestError=null},o}();e.XdmServiceEndPoint=o;var r,i=function(){function e(e,t,n,o){this._callbackList={},this._eventHandlerList={},this._hostTrustCheckStatus=0,this._checkStatusLogged=!1,this._fHostTrusted=!1,this._conversationId=e,this._targetWindow=t,this._targetUrl=n,this._callingIndex=0,this._callbackList={},this._eventHandlerList={},this._serializerVersion=null!=o?o:1,this._checkReceiverOriginAndRun=null}return Object.defineProperty(e.prototype,"targetUrl",{get:function(){return this._targetUrl},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostTrustCheckStatus",{get:function(){return this._hostTrustCheckStatus},set:function(e){this._hostTrustCheckStatus=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fHostTrusted",{get:function(){return this._fHostTrusted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checkStatusLogged",{get:function(){return this._checkStatusLogged},set:function(e){this._checkStatusLogged=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checkReceiverOriginAndRun",{get:function(){return this._checkReceiverOriginAndRun},set:function(e){this._checkReceiverOriginAndRun=e},enumerable:!0,configurable:!0}),e.prototype.invoke=function(e,t,n){var o=this,i=function(){var i=o._callingIndex++,a=new Date,l={callback:t,createdOn:a.getTime()};n&&"object"==typeof n&&"number"==typeof n.__timeout__&&(l.timeout=n.__timeout__,delete n.__timeout__),o._callbackList[i]=l;try{if(3!==o._hostTrustCheckStatus&&"ContextActivationManager_getAppContextAsync"!==e)throw"Access Denied";var u=new s(e,0,o._conversationId,i,n),d=c.envelope(u,o._serializerVersion);o._targetWindow.postMessage(d,o._targetUrl),r._startMethodTimeoutTimer()}catch(e){try{null!==t&&t(-1,e)}finally{delete o._callbackList[i]}}};this._checkReceiverOriginAndRun?this._checkReceiverOriginAndRun(i):(this._hostTrustCheckStatus=3,i())},e.prototype.registerForEvent=function(e,t,n,o){var i=this._callingIndex++,a=new Date;this._callbackList[i]={callback:n,createdOn:a.getTime()};try{var l=new s(e,1,this._conversationId,i,o),u=c.envelope(l,this._serializerVersion);this._targetWindow.postMessage(u,this._targetUrl),r._startMethodTimeoutTimer(),this._eventHandlerList[e]=t}catch(e){try{null!==n&&n(-1,e)}finally{delete this._callbackList[i]}}},e.prototype.unregisterForEvent=function(e,t,n){var o=this._callingIndex++,i=new Date;this._callbackList[o]={callback:t,createdOn:i.getTime()};try{var a=new s(e,2,this._conversationId,o,n),l=c.envelope(a,this._serializerVersion);this._targetWindow.postMessage(l,this._targetUrl),r._startMethodTimeoutTimer()}catch(e){try{null!==t&&t(-1,e)}finally{delete this._callbackList[o]}}finally{delete this._eventHandlerList[e]}},e}();e.XdmClientEndPoint=i,function(t){var n=[],r=null,a=null,s=!1,u={},p={},h=!1;function g(){null!==a?s||(n.length>0?m(n.shift()):(clearInterval(a),a=null)):e.Utility.xdmDebugLog("channel is not ready.")}function m(e){s=e.getInvokeBlockingFlag(),e.invoke(),r=(new Date).getTime()}function y(){s=!1}function v(e,t){var n=!1;if(!(t&&"null"!==t&&t.length&&e&&e instanceof Array&&e.length))return n;var o=document.createElement("a"),r=document.createElement("a");o.href=t;for(var i=0;is.length+1&&(c=a.slice(-(s.length+1))==="."+s),i&&r&&(l||c)}function C(e,t){return e.hostname==t.hostname&&e.protocol==t.protocol&&e.port==t.port}function O(t){if(""!=t.data){var o,i=1,h=t.data;try{i=null!=(o=c.unenvelope(h,1))._serializerVersion?o._serializerVersion:i}catch(e){return}if(e.Utility.xdmDebugLog(h),0===o._messageType){var O=null==t.origin||"null"===t.origin?o._origin:t.origin;try{var S=function(t){for(var n in u)if(u[n]._conversations[t])return u[n];throw e.Utility.createArgumentException("conversationId")}(o._conversationId);e.Utility.xdmDebugLog("_receive: request, origin="+O+" sourceURL:"+S._conversations[o._conversationId]);var A=S._conversations[o._conversationId];i=null!=A.serializerVersion?A.serializerVersion:i,e.Utility.xdmDebugLog("_receive: request, origin="+O+" sourceURL:"+A.url);var P=[A.url].concat(S._appDomains[o._conversationId]);if(!v(P,t.origin))if(!OfficeExt.appSpecificCheckOrigin(P,t,o._origin,v))if(!_(A.url,t.origin))throw"Failed origin check";var E=S.getPolicyManager();if(E&&!E.checkPermission(o._conversationId,o._actionName,o._data))throw"Access Denied";var R=function(t,n){var o=t._methodObjectList[n._actionName];if(!o)throw e.Utility.xdmDebugLog("The specified method is not registered on service endpoint:"+n._actionName),e.Utility.createArgumentException("messageObject");return 0===n._actionType?o:1===n._actionType?o.getRegisterMethodObject():o.getUnregisterMethodObject()}(S,o),I=new d(t.source,O,o._actionName,o._conversationId,o._correlationId,y,i),T=new f(R,o._data,I,S._eventHandlerProxyList,o._conversationId,o._actionName,i),w=!0;null==a&&((null==r||(new Date).getTime()-r>10)&&!s?(m(T),w=!1):a=setInterval(g,10)),w&&function(e){n.push(e)}(T)}catch(e){S&&S._onHandleRequestError&&S._onHandleRequestError(o,e);var F=-2;"Access Denied"==e&&(F=-5);var D=new l(o._actionName,o._conversationId,o._correlationId,F,0,e),x=c.envelope(D,i),k=!1;try{k=!(!t.source||!t.source.postMessage)}catch(e){}var N=!1;if(window.location.href&&t.origin&&"null"!==t.origin&&_(window.location.href,t.origin))N=!0;else if(t.origin&&"null"!==t.origin){var M=document.createElement("a");M.href=t.origin,N=b(M.hostname)}k&&N&&t.source.postMessage(x,O)}}else{if(1!==o._messageType)return;var H=function(t){var n=p[t];return n||e.Utility.xdmDebugLog("Unknown conversation Id."),n}(o._conversationId);if(!H)return;if(H._serializerVersion=i,e.Utility.xdmDebugLog("_receive: response, origin="+t.origin+" targetURL:"+H._targetUrl),L=H._targetUrl,B=t.origin,q=!1,!(L&&B&&"null"!==L&&"null"!==B&&L.length&&B.length?(W=document.createElement("a"),V=document.createElement("a"),W.href=L,V.href=B,q=C(W,V)):q))throw"Failed orgin check";if(3==H._hostTrustCheckStatus&&(H._fHostTrusted=!0),0===o._responseType){var U=H._callbackList[o._correlationId];if(U)try{U.callback&&U.callback(o._errorCode,o._data)}finally{delete H._callbackList[o._correlationId]}}else{var j=H._eventHandlerList[o._actionName];null!=j&&j(o._data)}}}var L,B,W,V,q}function S(){h||(!function(t){if(window.addEventListener)window.addEventListener("message",t,!1);else{if(!(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent))throw e.Utility.xdmDebugLog("Browser doesn't support the required API."),e.Utility.createArgumentException("Browser");window.attachEvent("onmessage",t)}}(O),h=!0)}t.connect=function(e,t,n,o){var r=p[e];return r||(S(),r=new i(e,t,n,o),p[e]=r),r},t.getClientEndPoint=function(e){return p[e]},t.createServiceEndPoint=function(e){S();var t=new o(e);return u[e]=t,t},t.getServiceEndPoint=function(e){return u[e]},t.deleteClientEndPoint=function(e){delete p[e]},t.deleteServiceEndPoint=function(e){delete u[e]},t.checkUrlWithAppDomains=function(e,t){return v(e,t)},t.isTargetSubdomainOfSourceLocation=function(e,t){return _(e,t)},t._setMethodTimeout=function(e){e<=0?65e3:e},t._startMethodTimeoutTimer=function(){},t.isHostNameValidWacDomain=function(e){return b(e)}}(r=e.XdmCommunicationManager||(e.XdmCommunicationManager={}));var a=function(){function e(e,t,n,o,r){this._messageType=e,this._actionName=t,this._conversationId=n,this._correlationId=o,this._origin=window.location.origin,this._data=void 0===r?null:r}return e.prototype.getActionName=function(){return this._actionName},e.prototype.getConversationId=function(){return this._conversationId},e.prototype.getCorrelationId=function(){return this._correlationId},e.prototype.getOrigin=function(){return this._origin},e.prototype.getData=function(){return this._data},e.prototype.getMessageType=function(){return this._messageType},e}(),s=function(e){function t(t,n,o,r,i){var a=e.call(this,0,t,o,r,i)||this;return a._actionType=n,a}return __extends(t,e),t.prototype.getActionType=function(){return this._actionType},t}(a),l=function(e){function t(t,n,o,r,i,a){var s=e.call(this,1,t,n,o,a)||this;return s._errorCode=r,s._responseType=i,s}return __extends(t,e),t.prototype.getErrorCode=function(){return this._errorCode},t.prototype.getResponseType=function(){return this._responseType},t}(a),c=function(){function e(){}return e.envelope=function(e,t){return"object"==typeof e&&(e._serializerVersion=1),JSON.stringify(e)},e.unenvelope=function(e,t){return JSON.parse(e)},e}(),u=function(){function t(t,n,o,r,i,a,s){var u=this;this._invokeResultCode=0,this._requesterWindow=t,this._requesterUrl=n,this._actionName=o,this._conversationId=r,this._correlationId=i,this._invokeResultCode=0,this._responseType=a,this._serializerVersion=s,this._send=function(t){try{var n=new l(u._actionName,u._conversationId,u._correlationId,u._invokeResultCode,u._responseType,t),o=c.envelope(n,u._serializerVersion);u._requesterWindow.postMessage(o,u._requesterUrl),e.Utility.xdmDebugLog("_send: requestUrl="+u._requesterUrl+" _actionName:"+u._actionName)}catch(t){e.Utility.xdmDebugLog("ResponseSender._send error:"+t.message)}}}return t.prototype.getRequesterWindow=function(){return this._requesterWindow},t.prototype.getRequesterUrl=function(){return this._requesterUrl},t.prototype.getActionName=function(){return this._actionName},t.prototype.getConversationId=function(){return this._conversationId},t.prototype.getCorrelationId=function(){return this._correlationId},t.prototype.getSend=function(){return this._send},t.prototype.setResultCode=function(e){this._invokeResultCode=e},t}(),d=function(t){function n(n,o,r,i,a,s,u){var d=t.call(this,n,o,r,i,a,0,u)||this;return d._postCallbackHandler=s,d._send=function(t,n){null!=n&&(d._invokeResultCode=n);try{var o=new l(d._actionName,d._conversationId,d._correlationId,d._invokeResultCode,d._responseType,t),r=c.envelope(o,d._serializerVersion);d._requesterWindow.postMessage(r,d._requesterUrl),d._postCallbackHandler()}catch(t){e.Utility.xdmDebugLog("InvokeCompleteCallback._send error:"+t.message)}},d}return __extends(n,t),n}(u),f=function(){function e(e,t,n,o,r,i,a){this._callerId="",this._methodObject=e,this._param=t,this._invokeCompleteCallback=n,this._eventHandlerProxyList=o,this._conversationId=r,this._eventName=i,this._serializerVersion=a}return e.prototype.invoke=function(){try{var e;switch(this._methodObject.getInvokeType()){case 0:this._methodObject.getMethod()(this._param,this._invokeCompleteCallback.getSend());break;case 1:e=this._methodObject.getMethod()(this._param),this._invokeCompleteCallback.getSend()(e);break;case 4:var t=this._createEventHandlerProxyObject(this._invokeCompleteCallback);e=this._methodObject.getMethod()(t.getSend(),this._param),this._eventHandlerProxyList[this._conversationId+this._eventName]=t.getSend(),this._invokeCompleteCallback.getSend()(e);break;case 5:var n=this._eventHandlerProxyList[this._conversationId+this._eventName];e=this._methodObject.getMethod()(n,this._param),delete this._eventHandlerProxyList[this._conversationId+this._eventName],this._invokeCompleteCallback.getSend()(e);break;case 2:var o=this._createEventHandlerProxyObject(this._invokeCompleteCallback);this._methodObject.getMethod()(o.getSend(),this._invokeCompleteCallback.getSend(),this._param),this._eventHandlerProxyList[this._callerId+this._eventName]=o.getSend();break;case 3:var r=this._eventHandlerProxyList[this._callerId+this._eventName];this._methodObject.getMethod()(r,this._invokeCompleteCallback.getSend(),this._param),delete this._eventHandlerProxyList[this._callerId+this._eventName]}}catch(e){this._invokeCompleteCallback.setResultCode(-3),this._invokeCompleteCallback.getSend()(e)}},e.prototype.getInvokeBlockingFlag=function(){return this._methodObject.getBlockingFlag()},e.prototype._createEventHandlerProxyObject=function(e){return new u(e.getRequesterWindow(),e.getRequesterUrl(),e.getActionName(),e.getConversationId(),e.getCorrelationId(),1,this._serializerVersion)},e}()}(OSF||(OSF={})),function(e){function t(e,t){return t+="_Resource",void 0!==oteljs?[oteljs.makeDoubleDataField(t+"_responseEnd",e.responseEnd),oteljs.makeDoubleDataField(t+"_responseStart",e.responseStart),oteljs.makeDoubleDataField(t+"_startTime",e.startTime),oteljs.makeDoubleDataField(t+"_transferSize",e.transferSize)]:[]}e.sendPerformanceTelemetry=function(){if(OSF.AppTelemetry.enableTelemetry&&"undefined"!=typeof performance&&performance.getEntriesByType){var e,n,o=OSF.LoadScriptHelper.getHostBundleJsName().toLowerCase();performance.getEntriesByType("resource").forEach((function(t){var r=t.name.toLowerCase();OSF.Utility.stringEndsWith(r,o)?e=t:(OSF.Utility.stringEndsWith(r,OSF.ConstantNames.OfficeDebugJS)||OSF.Utility.stringEndsWith(r,OSF.ConstantNames.OfficeJS))&&(n=t)})),OTel.OTelLogger.onTelemetryLoaded((function(){var o=[];e&&(o=o.concat(t(e,"HostJs"))),n&&(o=o.concat(t(n,"OfficeJs"))),o=o.concat([oteljs.makeDoubleDataField("officeExecuteStartDate",OSFPerformance.officeExecuteStartDate),oteljs.makeDoubleDataField("officeExecuteStart",OSFPerformance.officeExecuteStart),oteljs.makeDoubleDataField("officeExecuteEnd",OSFPerformance.officeExecuteEnd),oteljs.makeDoubleDataField("hostInitializationStart",OSFPerformance.hostInitializationStart),oteljs.makeDoubleDataField("hostInitializationEnd",OSFPerformance.hostInitializationEnd),oteljs.makeDoubleDataField("totalJSHeapSize",OSFPerformance.totalJSHeapSize),oteljs.makeDoubleDataField("usedJSHeapSize",OSFPerformance.usedJSHeapSize),oteljs.makeDoubleDataField("jsHeapSizeLimit",OSFPerformance.jsHeapSizeLimit),oteljs.makeDoubleDataField("getAppContextStart",OSFPerformance.getAppContextStart),oteljs.makeDoubleDataField("getAppContextEnd",OSFPerformance.getAppContextEnd),oteljs.makeDoubleDataField("getAppContextXdmStart",OSFPerformance.getAppContextXdmStart),oteljs.makeDoubleDataField("getAppContextXdmEnd",OSFPerformance.getAppContextXdmEnd),oteljs.makeDoubleDataField("createOMEnd",OSFPerformance.createOMEnd),oteljs.makeDoubleDataField("officeOnReady",OSFPerformance.officeOnReady),oteljs.makeBooleanDataField("isSharedRuntime",0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.SharedApp))]),Microsoft.Office.WebExtension.sendTelemetryEvent({eventName:"Office.Extensibility.OfficeJs.JSPerformanceTelemetryV06",dataFields:o,eventFlags:{dataCategories:2,diagnosticLevel:110}})}))}}}(OSFPerfUtil||(OSFPerfUtil={})),function(e){!function(t){var n,o,r={};!function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];e.generateNewGuid=function(){for(var e="",n=(new Date).getTime(),o=0;o<32&&n>0;o++)8!=o&&12!=o&&16!=o&&20!=o||(e+="-"),e+=t[n%16],n=Math.floor(n/16);for(;o<32;o++)8!=o&&12!=o&&16!=o&&20!=o||(e+="-"),e+=t[Math.floor(16*Math.random())];return e}}(t.Guid||(t.Guid={})),t.loadScript=function(e,t,n){if(e&&t){var o=window.document,i=r[e];if(i)i.loaded?t(!0):i.pendingCallbacks.push(t);else{var a=o.createElement("script");a.type="text/javascript",i={loaded:!1,pendingCallbacks:[t],timer:null},r[e]=i;var s=function(){null!=i.timer&&(clearTimeout(i.timer),delete i.timer),i.loaded=!0;for(var e=i.pendingCallbacks.length,t=0;t0?(r=window.setTimeout(a,o),i--):(window.clearTimeout(r),t(!1))};a()}}(e.OUtil||(e.OUtil={}))}(OSF||(OSF={})),function(e){e.Flights=[];!function(t){var n="&_flights=",o="_flights=";function r(e,t){return e.substr(0,t.length)===t}function i(e,t,n,o){return r(e,t+"//"+n+":"+o)||r(e,n+":"+o)}t.isArray=function(e){return"[object Array]"===Object.prototype.toString.apply(e)},t.isFunction=function(e){return"[object Function]"===Object.prototype.toString.apply(e)},t.isDate=function(e){return"[object Date]"===Object.prototype.toString.apply(e)},t.addEventListener=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else{if(!e.attachEvent)throw new Error("Cannot attach event");e.attachEvent("on"+t,n)}},t.removeEventListener=function(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else{if(!e.detachEvent)throw new Error("Cannot remove event");e.detachEvent("on"+t,n)}};var a="Date(";function s(e){var t=[];try{t=JSON.parse(e)}catch(e){}return Array.isArray(t)||(t=[]),t}function l(e,n,o){try{var r=JSON.parse(n),i=null!=r?r[o]:null,a=t.getSessionStorage();if(!e&&a&&null!=r){var s=r.baseFrameName+o;i?a.setItem(s,i):i=a.getItem(s)}return i}catch(e){return null}}function c(e,n,o,r,i){var a=i.split(e),s=a.length>1?a[a.length-1]:null;o&&null!=s&&(s.indexOf("&")>=0&&(s=s.split("&")[0]),s=decodeURIComponent(s));var l=t.getSessionStorage();if(!r&&l){var c=window.name.indexOf(n);if(c>-1){var u=window.name.indexOf(";",c);-1==u&&(u=window.name.length);var d=window.name.substring(c,u);s?l.setItem(d,s):s=l.getItem(d)}}return s}function u(e,t){for(var n=0;n=e.length)return this.removeChar(e,n);if("/"===t){if("?"===e.charAt(n+1)||"#"===e.charAt(n+1))return this.removeChar(e,n)}else if("?"===t&&"#"===e.charAt(n+1))return this.removeChar(e,n)}return e}function d(e){if(e=u(e,"/"),e=u(e,"?"),"https://"==(e=u(e,"#")).substr(0,8))-1!=(t=e.indexOf(":443"))&&(t!=e.length-4&&"/"!=e.charAt(t+4)&&"?"!=e.charAt(t+4)&&"#"!=e.charAt(t+4)||(e=e.substring(0,t)+e.substring(t+4)));else if("http://"==e.substr(0,7)){var t;-1!=(t=e.indexOf(":80"))&&(t!=e.length-3&&"/"!=e.charAt(t+3)&&"?"!=e.charAt(t+3)&&"#"!=e.charAt(t+3)||(e=e.substring(0,t)+e.substring(t+3)))}return e}function f(e){var t,n,o=[],r=[],i=e.length;for(t=0;t0?r.push(n):0===n.tabIndex&&o.push(n):o.push(n);return r=r.sort((function(e,t){var n=e.tabIndex-t.tabIndex;return 0===n&&(n=r.indexOf(e)-r.indexOf(t)),n})),[].concat(r,o)}t.serializeSettings=function(t){var n={};for(var o in t){var r=t[o];try{r=JSON.stringify(r,(function(t,n){return e.OUtil.isDate(this[t])?a+this[t].getTime()+")":n})),n[o]=r}catch(e){}}return n},t.deserializeSettings=function(e){var t={};for(var n in e=e||{}){var o=e[n];try{o=JSON.parse(o,(function(e,t){var n;return"string"==typeof t&&t&&t.length>6&&t.slice(0,5)===a&&")"===t.slice(-1)&&(n=new Date(parseInt(t.slice(5,-1))))?n:t})),t[n]=o}catch(e){}}return t},t.convertIntToCssHexColor=function(e){return"#"+(Number(e)+16777216).toString(16).slice(-6)},t.parseAppContextFromWindowName=function(e,n){return t.parseInfoFromWindowName(e,n,"appContext")},t.parseHostInfoFromWindowName=function(t,n){return e.OUtil.parseInfoFromWindowName(t,n,"hostInfo")},t.parseXdmInfo=function(e){var n=t.parseXdmInfoWithGivenFragment(e,window.location.hash);return n||(n=t.parseXdmInfoFromWindowName(e,window.name)),n},t.parseXdmInfoFromWindowName=function(t,n){return e.OUtil.parseInfoFromWindowName(t,n,"xdmInfo")},t.parseXdmInfoWithGivenFragment=function(t,n){return e.OUtil.parseInfoWithGivenFragment("&_xdm_Info=","_xdm_",!1,t,n)},t.parseSerializerVersion=function(t){var n=e.OUtil.parseSerializerVersionWithGivenFragment(t,window.location.hash);return isNaN(n)&&(n=e.OUtil.parseSerializerVersionFromWindowName(t,window.name)),n},t.parseSerializerVersionFromWindowName=function(t,n){return parseInt(e.OUtil.parseInfoFromWindowName(t,n,"serializerVersion"))},t.parseSerializerVersionWithGivenFragment=function(t,n){return parseInt(e.OUtil.parseInfoWithGivenFragment("&_serializer_version=","_serializer_version=",!0,t,n))},t.parseFlights=function(e){var t=function(e,t){return s(c(n,o,!0,e,t))}(e,window.location.hash);return 0==t.length&&(t=function(e,t){return s(l(e,t,"flights"))}(e,window.name)),t},t.checkFlight=function(t){return e.Flights&&e.Flights.indexOf(t)>=0},t.parseInfoFromWindowName=l,t.parseInfoWithGivenFragment=c,t.getConversationId=function(){var e=window.location.search,t=null;if(e){var n=e.indexOf("&");(t=n>0?e.substring(1,n):e.substr(1))&&"="===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1))&&(t=decodeURIComponent(t))}return t},t.getInfoItems=function(e){var t=e.split("$");return void 0===t[1]&&(t=e.split("|")),void 0===t[1]&&(t=e.split("%7C")),t},t.getXdmFieldValue=function(t,n){var o="",r=e.OUtil.parseXdmInfo(n);if(r){var i=e.OUtil.getInfoItems(r);if(null!=i&&i.length>=3)switch(t){case"ConversationUrl":o=i[2];break;case"AppId":o=i[1]}}return o},t.parseUrl=function(t,n){if(void 0===n&&(n=!1),void 0!==t&&t){var o="NotHttps",r="undefined"!=typeof window&&void 0!==window.navigator&&window.navigator.userAgent.indexOf("Trident")>0,a=("undefined"!=typeof window&&void 0!==window.navigator&&window.navigator.userAgent.indexOf("Edge"),{protocol:void 0,hostname:void 0,host:void 0,port:void 0,pathname:void 0,search:void 0,hash:void 0,isPortPartOfUrl:void 0});try{if(r){var s=document.createElement("a");if(s.href=t,!(s&&s.protocol&&s.host&&s.hostname&&s.href&&d(s.href).toLowerCase()===d(t).toLowerCase()))throw"InvalidUrl";if(e.OUtil.checkFlight(2)&&n&&"https:"!=s.protocol)throw new Error(o);var l=function(e,t){return e&&t?"https:"==t.protocol&&i(e,"https:",t.hostname,"443")?":443":"http:"==t.protocol&&i(e,"http:",t.hostname,"80")?":80":"":""}(t,s);a.protocol=s.protocol,a.hostname=s.hostname,a.port=""==l?s.port:"",a.host=""!=l?s.hostname:s.host,a.pathname=(r?"/":"")+s.pathname,a.search=s.search,a.hash=s.hash,a.isPortPartOfUrl=i(t,s.protocol,s.hostname,s.port)}else{var c=new URL(t);if(c&&c.protocol&&c.host&&c.hostname){if(e.OUtil.checkFlight(2)&&n&&"https:"!=c.protocol)throw new Error(o);a.protocol=c.protocol,a.hostname=c.hostname,a.port=c.port,a.host=c.host,a.pathname=c.pathname,a.search=c.search,a.hash=c.hash,a.isPortPartOfUrl=c.host.lastIndexOf(":"+c.port)==c.host.length-c.port.length-1}}}catch(e){if(e.message===o)throw e}return a}},t.focusToFirstTabbable=function(e,t){var n,o,r=!1,i=function(e){r=!0},a=function(e,t,n){return t<0||t>e||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(e=f(e),n=t?e.length-1:0,0===e.length)return null;for(;!r&&n>=0&&ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(o=function(e,t){for(var n=0;n=0&&r0&&r.major>i.major)return!0;if(r.major>0&&r.minor>=0&&r.major==i.major&&r.minor>=i.minor)return!0}catch(e){return!1}}return!1},e.prototype._getVersion=function(e){var t=(e+="").split("."),n=0,o=0;if(t.length<2&&isNaN(Number(e)))throw"version format incorrect";if(n=Number(t[0]),t.length>=2&&(o=Number(t[1])),isNaN(n)||isNaN(o))throw"version format incorrect";return{minor:o,major:n}},e}();t.RequirementMatrix=o;var r=function(){function e(e){this._sets=e}return e.prototype._addSetMap=function(e){for(var t in e)this._sets[t]=e[t]},e}();t.DefaultSetRequirement=r;var i=function(e){function t(){return e.call(this,{dialogapi:1.1})||this}return __extends(t,e),t}(r);t.DefaultRequiredDialogSetRequirement=i;var a=function(e){function t(){return e.call(this,{dialogorigin:1.1})||this}return __extends(t,e),t}(r);t.DefaultOptionalDialogSetRequirement=a;var s=function(){function t(){}return t.getDefaultRequirementMatrix=function(t){var n=void 0,i=t.get_requirementMatrix();if(null!=i&&i.length>0){var a=JSON.parse(t.get_requirementMatrix().toLowerCase());if(e._OfficeAppFactory.getHostInfo().hostPlatform==e.HostInfoPlatform.web)try{var s="dialogorigin";a.hasOwnProperty(s)||(a[s]=1.1)}catch(e){}n=new o(new r(a))}else n=new o(new r({}));return n},t.getDefaultDialogRequirementMatrix=function(t){var n=void 0,s=t.get_dialogRequirementMatrix();if(null!=s&&s.length>0){var l=JSON.parse(t.get_requirementMatrix().toLowerCase());n=new r(l)}else{n=new i;var c=t.get_requirementMatrix();if(null!=c&&c.length>0&&"undefined"!=typeof JSON){l=JSON.parse(c.toLowerCase());for(var u in n._sets)l.hasOwnProperty(u)&&(n._sets[u]=l[u]);var d=new a;for(var u in d._sets)l.hasOwnProperty(u)&&(n._sets[u]=l[u])}}if(e._OfficeAppFactory.getHostInfo().hostPlatform==e.HostInfoPlatform.web)try{var f="dialogorigin";!n._sets.hasOwnProperty(f)&&window.opener&&(n._sets[f]=1.1)}catch(e){}return new o(n)},t}();t.RequirementsMatrixFactory=s}(e.Requirement||(e.Requirement={}))}(OSF||(OSF={})),function(e){!function(t){!function(t){var n;t.executeRichApiRequestAsync=function(t,n){var o={toSafeArrayHost:function(){return[t]},fromSafeArrayHost:function(e){return{data:e}},toWebHost:function(){return{ArrayData:t}},fromWebHost:function(e){return{data:e.Data}}};e._OfficeAppFactory.getAsyncMethodExecutor().executeAsync(93,o,n)},Object.defineProperty(t,"richApiMessageManager",{get:function(){return n||(n=new e.RichApiMessageManager),n}})}(t.RichApi||(t.RichApi={}))}(e.DDA||(e.DDA={}))}(OSF||(OSF={})),function(e){var t=function(){function t(){this._registerHandlers=[],this._eventDispatch=new e.EventDispatch([{type:e.EventType.RichApiMessage,id:e.EventDispId.dispidRichApiMessageEvent,getTargetId:function(){return""},fromSafeArrayHost:function(e){var n=e;return t.transferEventArgument(n)},fromWebHost:function(e){var n=e.ArrayData;return t.transferEventArgument(n)}}])}return t.transferEventArgument=function(t){var n=[];if(t)for(var o=0;o-1)return t.toLowerCase().substring(0,o+n.length)+"officeconfig.json"}return""},t.prototype.getConfig=function(){return this._configPromise||(this._configPromise=this.tryLoadConfig()),this._configPromise},t.prototype.tryLoadConfig=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,o,r,i,a,s;return __generator(this,(function(l){switch(l.label){case 0:if(!(t=this.getConfigPath()))return[3,2];if(n=e.OUtil.getLocalStorage(),o=t+"_cache",r=n.getItem(o),i=null,r){try{i=JSON.parse(r)}catch(e){}if(864e5,a=(new Date).getTime(),i&&i.config&&i.createTime<=a&&i.createTime+864e5>=a)return[2,i.config]}return[4,this.downloadConfig(t)];case 1:return(s=l.sent())?(i={createTime:(new Date).getTime(),config:s},n.setItem(o,JSON.stringify(i))):i&&(s=i.config),[2,s];case 2:return[2,null]}}))}))},t.prototype.downloadConfig=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,fetch(e)];case 1:return[4,t.sent().json()];case 2:return[2,t.sent()];case 3:return t.sent(),[3,4];case 4:return[2,null]}}))}))},t}();e.SovereignHelper=t}(OSF||(OSF={})),function(e){!function(e){function t(e){return void 0===e||null===e}e.createParameterException=function(e){return new Error("Parameter count mismatch: "+e)},e.createArgumentException=function(e){return new Error("Invalid argument "+e)},e.createNotImplementedException=function(){return new Error("Not implemented yet")},e.log=function(e){console.log(e)},e.trace=function(e){console.log(e)},e.debugLog=function(e){console.log(e)},e.getQueryStringValue=function(e){if("undefined"!=typeof window&&window.location&&window.location.search){var t=new RegExp("[?&]"+e+"=([^&]*)").exec(window.location.search);if(t)return t[1]}return null},e.isNullOrUndefined=t,e.isNullOrEmpty=function(e){return!!t(e)||0===e.length},e.isInUnittest=function(){return"boolean"==typeof g_osfUnittest&&g_osfUnittest}}(e.Utility||(e.Utility={}))}(OSF||(OSF={})),function(e){e.isOfficeReactNative=function(){try{return"undefined"!=typeof OfficePlatformGlobal&&void 0!==OfficePlatformGlobal.ReactNativeReka}catch(e){return!1}},function(e){function t(e){return new Promise(e)}function n(e){var t=e,r=1;if(("object"==typeof e||"unknown"==typeof e)&&null!=e&&e.toArray)if(e.dimensions&&(r=e.dimensions()),2===r)t=o(e);else{var i=e.toArray();t=new Array(i.length);for(var a=0;a0&&t.push(i)}}}catch(e){}return t}e.xdmDebugLog=function(t){e._DebugXdm&&console.log(t)},e.enableDebugXdm=function(){e._DebugXdm=!0},e.createPromiseFromResult=function(e){return Promise.resolve(e)},e.createPromise=t,e.promisify=function(e,n){return t((function(t,o){e((function(e){0===e?t():o()})),setTimeout((function(){o()}),n)}))},e.compareVersions=function(e,t){var n,o=e.split("."),r=t.split(".");for(n in o){if(parseInt(o[n])parseInt(r[n]))return!0}return!1},e.getErrorCodeFromAsyncResult=function(e){return e.status===Office.AsyncResultStatus.Succeeded?0:e.error&&e.error.code?e.error.code:5001},e.externalNativeFunctionExists=function(e){return"unknown"===e||"undefined"!==e},e.stringEndsWith=function(t,n){if(e.isNullOrUndefined(t))throw e.createArgumentException("value");if(e.isNullOrUndefined(n))throw e.createArgumentException("subString");return!(n.length>t.length)&&t.substr(t.length-n.length)===n},e.fromSafeArray=function(e){var t=e;if(("object"==typeof e||"unknown"==typeof e)&&null!=e&&e.toArray){var o=e.toArray();t=new Array(o.length);for(var r=0;ro)||(clearInterval(s),n)||i(new Event("Missing expected object after loaded."))}),500);else r(null);else i(new Event("loadScript: failed to load '"+t+"'"))}),o):r(null)}))};Promise.all([l(t.config.msal,(function(){return!!msal}),t.config.delayMsal),l(s,(function(){return!!BrowserAuth}),t.config.delayWebAuth)]).then((function(){t.config?BrowserAuth.Load(t.config,e._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId).then((function(e){n(e)}),(function(e){a(e)})):BrowserAuth.GetAuthConfig().then((function(o){t.config=o,BrowserAuth.Load(t.config,e._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId).then((function(e){n(e)}),(function(e){a(e)}))}),(function(){a(new Event("BrowserAuth.GetAuthConfig was failed"))}))}),(function(e){a(e)}))}))):new Promise((function(e,t){return t(new Event("'authcode' as authFlow is only supported"))}))},t.getToken=function(e,o,r,i,a){return t.config&&t.config.authFlow===n.AuthCode?BrowserAuth.GetToken(e,o,r,!!i,!!i,!1,a):new Promise((function(e,t){return t(new Event("'authcode' as authFlow is only supported"))}))}}(e.WebAuth||(e.WebAuth={}))}(OSF||(OSF={})),function(e){var t=function(){function t(t){this._delegateVersion=1,this._webAppState=t,this._webClientHostControllerHelper=e.BootStrapExtension.createWebClientHostControllerHelper(this._webAppState,this._delegateVersion)}return t.prototype.execute=function(e,t,n){var o=this,r=this._webClientHostControllerHelper.getHostCallArgs(e,t),i=this._webClientHostControllerHelper.getTargetMethodName(e);this._webAppState.clientEndPoint.invoke(i,(function(t,r){var i=0;if(0==t)o._delegateVersion=r.Version,i=o._webClientHostControllerHelper.parseErrorFromPayload(e,r);else switch(t){case-5:i=7e3;break;default:i=5001}n&&n(i,r)}),r)},t.prototype.registerEvent=function(e,t,n,o,r){this._webAppState.clientEndPoint.registerForEvent(this.getXdmEventName(n,t),(function(e){o&&o(e)}),this._getOnAfterRegisterEvent(!0,e,r),{controlId:this._webAppState.id,eventDispId:e,targetId:n,__timeout__:-1})},t.prototype.unregisterEvent=function(e,t,n,o){this._webAppState.clientEndPoint.unregisterForEvent(this.getXdmEventName(n,t),this._getOnAfterRegisterEvent(!1,e,o),{controlId:this._webAppState.id,eventDispId:e,targetId:n,__timeout__:-1})},t.prototype.messageParent=function(t){throw e.Utility.createNotImplementedException()},t.prototype.openDialog=function(t,n,o,r,i){throw e.Utility.createNotImplementedException()},t.prototype.closeDialog=function(t,n,o,r){throw e.Utility.createNotImplementedException()},t.prototype.sendMessage=function(t){throw e.Utility.createNotImplementedException()},t.prototype.closeSdxDialog=function(t){throw e.Utility.createNotImplementedException()},t.prototype.getXdmEventName=function(t,n){return n==e.EventType.BindingSelectionChanged||n==e.EventType.BindingDataChanged||n==e.EventType.DataNodeDeleted||n==e.EventType.DataNodeInserted||n==e.EventType.DataNodeReplaced?t+"_"+n:n},t.prototype._getOnAfterRegisterEvent=function(t,n,o){var r=(new Date).getTime();return function(i,a){var s;if(0!=i)switch(i){case-5:s=7e3;break;default:s=5001}else s=a?a.Error?a.Error:0:5001;o&&o(s),e.AppTelemetry&&e.AppTelemetry.onRegisterDone(t,n,Math.abs((new Date).getTime()-r),s)}},t}();e.WebClientHostController=t}(OSF||(OSF={})),function(e){var t=function(){function e(e,t){this._webAppState=e,this._delegateVersion=t}return e.prototype.getHostCallArgs=function(e,t){var n=t;return n||(n={}),n.DdaMethod={ControlId:this.getControlId(),DispatchId:e,Version:this._delegateVersion},n.__timeout__=-1,n},e.prototype.getTargetMethodName=function(e){return"executeMethod"},e.prototype.parseErrorFromPayload=function(e,t){return t.Error},e.prototype.getControlId=function(){return this._webAppState.id},e}();e.WebClientHostControllerHelper=t}(OSF||(OSF={})),function(e){var t=function(){function t(){}return t.prototype.read=function(t){e._OfficeAppFactory.getAsyncMethodExecutor().executeAsync(75,{toSafeArrayHost:function(){return[]},fromSafeArrayHost:function(e){return null},toWebHost:function(){return{}},fromWebHost:function(e){return e.Properties.Settings}},(function(e){if(e.status===Office.AsyncResultStatus.Succeeded){for(var n={},o=0;o-1){var r=(n=e.OUtil.parseXdmInfo(!0))?n.split("|")[1]:null;return null!=r&&o.setItem(r+"IsDialog","true"),void(this._hostInfo.isDialog=!0)}this._hostInfo.isDialog=null!=o.getItem(e.OUtil.getXdmFieldValue("AppId",!1)+"IsDialog")}},n.prototype.checkReceiverOriginAndRun=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o,r,i,a,s,l,c,u,d;return __generator(this,(function(f){switch(f.label){case 0:return 3===(n=this)._webAppState.clientEndPoint.hostTrustCheckStatus?(t(),[2]):(o=e.OUtil.parseUrl(n._webAppState.clientEndPoint.targetUrl,!1),r="https:"==o.protocol,i=o.hostname,a="NotHttps",0!==n._webAppState.clientEndPoint.hostTrustCheckStatus?[3,4]:(r||(n._webAppState.clientEndPoint.hostTrustCheckStatus=2),2==n._webAppState.clientEndPoint.hostTrustCheckStatus?[3,4]:(s=!1,(l=e.SovereignHelper.isSovereignVersion())&&!0!==e.OUtil.getCustomOfficeInitializationSettings().trustAllCloudEnvironments||(s=e.XdmCommunicationManager.isHostNameValidWacDomain(i),n.isHostOriginTrusted&&(s=s||n.isHostOriginTrusted(i))),s||!l?[3,3]:(n._sovereignHelper||(n._sovereignHelper=new e.SovereignHelper),[4,(c=n._sovereignHelper).isConfigAvailable()]))));case 1:return f.sent()?[4,c.isSovereignHostTrusted(i)]:[2];case 2:s=f.sent(),f.label=3;case 3:s&&(n._webAppState.clientEndPoint.hostTrustCheckStatus=3),f.label=4;case 4:if(n._webAppState.clientEndPoint.checkStatusLogged||null==n._hostInfo||void 0===n._hostInfo||(e.AppTelemetry.onCheckWACHost(n._webAppState.clientEndPoint.hostTrustCheckStatus,n._webAppState.id,n._hostInfo.hostType,n._hostInfo.hostPlatform,n._webAppState.clientEndPoint.targetUrl),n._webAppState.clientEndPoint.checkStatusLogged=!0),3===n._webAppState.clientEndPoint.hostTrustCheckStatus||e.LoadScriptHelper.disableHostCheck())t();else{if(e.LoadScriptHelper.isSdx())throw new Error("Not supported host");u=function(){var o=e.LoadScriptHelper.getHostBundleJsBasePath().match(/^https?:\/\/[^:/?#]*(?::([0-9]+))?/);if(o&&o[0]){var s=e.LoadScriptHelper.getHostBundleJsBasePath()+"AgaveErrorUX/index.html#",l={error:"NotTrustedWAC",locale:e.getSupportedLocale(n._hostInfo.hostLocale,e.ConstantNames.DefaultLocale),hostname:i,noHttps:!r,validate:!1},c=document.createElement("iframe");c.style.visibility="hidden",c.style.height="0",c.style.width="0";var u=function(r){if(r.source==c.contentWindow&&r.origin==o[0])try{!0===JSON.parse(r.data).hostUserTrusted?(n._webAppState.clientEndPoint.hostTrustCheckStatus=3,e.OUtil.removeEventListener(window,"message",u),document.body.removeChild(c)):(l.validate=!1,window.location.replace(s+encodeURIComponent(JSON.stringify(l)))),t()}catch(t){e.OUtil.ensureOfficeStringsJs().then((function(){document.body.innerHTML=Strings.OfficeOM.L_NotTrustedWAC}))}};e.OUtil.addEventListener(window,"message",u),l.validate=!0,c.setAttribute("src",s+encodeURIComponent(JSON.stringify(l))),c.onload=function(){var e={hostname:i,noHttps:!r};c.contentWindow.postMessage(JSON.stringify(e),o[0])},document.body.appendChild(c)}else e.OUtil.ensureOfficeStringsJs().then((function(){document.body.innerHTML=Strings.OfficeOM.L_NotTrustedWAC}));if(e.OUtil.checkFlight(2)&&!r)throw new Error(a)},document.body?u():(d=!1,document.addEventListener("DOMContentLoaded",(function(){d||(d=!0,u())})))}return[2]}}))}))},n.prototype.setAgaveHostCommunication=function(){try{var t=this,n=e.OUtil.parseXdmInfoWithGivenFragment(!1,e._OfficeAppFactory.getWindowLocationHash());if(n||(n=e.OUtil.parseXdmInfoFromWindowName(!1,e._OfficeAppFactory.getWindowName())),n){var o=e.OUtil.getInfoItems(n);null!=o&&o.length>=3&&(t._webAppState.conversationID=o[0],t._webAppState.id=o[1],t._webAppState.webAppUrl=o[2].indexOf(":")>=0?o[2]:decodeURIComponent(o[2]))}t._webAppState.wnd=null!=window.opener?window.opener:window.parent;var r=e.OUtil.parseSerializerVersionWithGivenFragment(!1,e._OfficeAppFactory.getWindowLocationHash());if(isNaN(r)&&(r=e.OUtil.parseSerializerVersionFromWindowName(!1,e._OfficeAppFactory.getWindowName())),t._webAppState.serializerVersion=r,this._hostInfo.isDialog&&null!=window.opener)return;t._webAppState.clientEndPoint=e.XdmCommunicationManager.connect(t._webAppState.conversationID,t._webAppState.wnd,t._webAppState.webAppUrl,t._webAppState.serializerVersion),t._webAppState.serviceEndPoint=e.XdmCommunicationManager.createServiceEndPoint(t._webAppState.id),t._webAppState.clientEndPoint.checkReceiverOriginAndRun=function(e){t.checkReceiverOriginAndRun(e)};var i=t._webAppState.conversationID+e.Constants.NotificationConversationIdSuffix;t._webAppState.serviceEndPoint.registerConversation(i,t._webAppState.webAppUrl);t._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",(function(n){var o;switch(o="string"==typeof n?n:n[0]){case e.AgaveHostAction.Select:t._webAppState.focused=!0;break;case e.AgaveHostAction.UnSelect:t._webAppState.focused=!1;break;case e.AgaveHostAction.TabIn:case e.AgaveHostAction.CtrlF6In:window.focus();var r=document.querySelectorAll(t._tabbableElements);e.OUtil.focusToFirstTabbable(r,!1)||(window.blur(),t._webAppState.focused=!1,t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,e.AgaveHostAction.ExitNoFocusable]));break;case e.AgaveHostAction.TabInShift:window.focus();r=document.querySelectorAll(t._tabbableElements);e.OUtil.focusToFirstTabbable(r,!0)||(window.blur(),t._webAppState.focused=!1,t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,e.AgaveHostAction.ExitNoFocusableShift]));break;case e.AgaveHostAction.SendMessage:if(Office.context.messaging.onMessage){var i=n[1];Office.context.messaging.onMessage(i)}break;case e.AgaveHostAction.TaskPaneHeaderButtonClicked:Office.context.ui.taskPaneAction.onHeaderButtonClick&&Office.context.ui.taskPaneAction.onHeaderButtonClick();break;default:e.Utility.trace("actionId "+o+" notifyAgave is wrong.")}}),0,!1),t.addOrRemoveEventListenersForWindow(!0)}catch(t){throw e.AppTelemetry&&e.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+t+"]"),t}},n.prototype.getAppContext=function(t,n,o){var r=this,i=this,a=function(t,a){if(OSFPerformance.getAppContextXdmEnd=OSFPerformance.now(),a._appName===e.AppName.ExcelWebApp){var s=a._settings;r._serializedSettings={};for(var l=0,c=s;l=1&&t.keyCode<=255){var i={keyCode:t.keyCode,shiftKey:t.shiftKey,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey};n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,e.AgaveHostAction.KeyboardShortcuts,i])}},a=function(e){117==e.keyCode&&e.ctrlKey&&(e.preventDefault?e.preventDefault():e.returnValue=!1)};e.Utility._DebugXdm||(t?(e.OUtil.addEventListener(window,"focus",o),e.OUtil.addEventListener(window,"blur",r),e.OUtil.addEventListener(window,"keydown",i),e.OUtil.addEventListener(window,"keypress",a)):(e.OUtil.removeEventListener(window,"focus",o),e.OUtil.removeEventListener(window,"blur",r),e.OUtil.removeEventListener(window,"keydown",i),e.OUtil.removeEventListener(window,"keypress",a)))},n.prototype.getTabbableElements=function(){return this._tabbableElements},n}(e.InitializationHelper);e.WebInitializationHelper=t}(OSF||(OSF={})),function(e){var t=function(){function t(e,t){this._initializationHelper=e,this._scriptMessager=t}return t.prototype.read=function(e){this._initializationHelper.getAppContext(null,(function(t){if(e){var n=t.get_settingsFunc()();e(0,n)}}),(function(t){e&&e(5001,{})}))},t.prototype.write=function(t,n){var o={},r=[],i=[];for(var a in t)r.push(a),i.push(t[a]);o.keys=r,o.values=i;this._scriptMessager.invokeMethod(e.Webkit.MessageHandlerName,e.Webkit.MethodId.WriteSettings,o,(function(e){n&&n(e[0])}))},t}();e.WebkitClientSettingsManager=t}(OSF||(OSF={})),function(e){!function(t){t.MessageHandlerName="Agave",t.PopupMessageHandlerName="WefPopupHandler",function(e){e[e.Settings=0]="Settings",e[e.SolutionReferenceId=1]="SolutionReferenceId",e[e.AppType=2]="AppType",e[e.MajorVersion=3]="MajorVersion",e[e.MinorVersion=4]="MinorVersion",e[e.RevisionVersion=5]="RevisionVersion",e[e.APIVersionSequence=6]="APIVersionSequence",e[e.AppCapabilities=7]="AppCapabilities",e[e.APPUILocale=8]="APPUILocale",e[e.AppDataLocale=9]="AppDataLocale",e[e.BindingCount=10]="BindingCount",e[e.DocumentUrl=11]="DocumentUrl",e[e.ActivationMode=12]="ActivationMode",e[e.ControlIntegrationLevel=13]="ControlIntegrationLevel",e[e.SolutionToken=14]="SolutionToken",e[e.APISetVersion=15]="APISetVersion",e[e.CorrelationId=16]="CorrelationId",e[e.InstanceId=17]="InstanceId",e[e.TouchEnabled=18]="TouchEnabled",e[e.CommerceAllowed=19]="CommerceAllowed",e[e.RequirementMatrix=20]="RequirementMatrix",e[e.HostCustomMessage=21]="HostCustomMessage",e[e.HostFullVersion=22]="HostFullVersion",e[e.InitialDisplayMode=23]="InitialDisplayMode",e[e.FeatureGates=24]="FeatureGates",e[e.HostSettings=25]="HostSettings"}(t.AppContextProperties||(t.AppContextProperties={})),function(e){e[e.Execute=1]="Execute",e[e.RegisterEvent=2]="RegisterEvent",e[e.UnregisterEvent=3]="UnregisterEvent",e[e.WriteSettings=4]="WriteSettings",e[e.GetContext=5]="GetContext",e[e.SendMessage=6]="SendMessage",e[e.MessageParent=7]="MessageParent",e[e.SendMessage2=8]="SendMessage2",e[e.MessageParent2=9]="MessageParent2"}(t.MethodId||(t.MethodId={}));var n=function(){function t(e){this.hostScriptProxy=e,this.useFullDialogAPI=!!window._enableFullDialogAPI,this.osfSupportsDialogOrigin=!!window._osfEnableDialogOrigin}return t.prototype.execute=function(t,n,o){var r={id:t,apiArgs:n};this.hostScriptProxy.invokeMethod(e.Webkit.MessageHandlerName,e.Webkit.MethodId.Execute,r,(function(t){if(o){var n=[];if(e.OUtil.isArray(t))for(var r=0;r=2&&(n=t[0],o=t[1]),r&&r(o,new e.WebkitSafeArray(n))}),(function(t){if(i)return i(new e.WebkitSafeArray(t))}))},t.prototype.unregisterEvent=function(t,n,o,r){this.hostScriptProxy.unregisterEvent(e.Webkit.MessageHandlerName,e.Webkit.MethodId.UnregisterEvent,t,o,(function(t){return r(new e.WebkitSafeArray(t))}))},t.prototype.messageParent=function(t){var n,o;if(this.osfSupportsDialogOrigin&&t[e.ParameterNames.TargetOrigin]?(n=this.useFullDialogAPI?JSON.stringify(t):t[e.ParameterNames.MessageToParent],o=e.Webkit.MethodId.MessageParent2):(n=t[e.ParameterNames.MessageToParent],o=e.Webkit.MethodId.MessageParent),this.useFullDialogAPI)this.hostScriptProxy.invokeMethod(e.Webkit.MessageHandlerName,o,n,null);else{var r={dialogMessage:{messageType:0,messageContent:n}},i=o==e.Webkit.MethodId.MessageParent2?t[e.ParameterNames.TargetOrigin]:window.location.origin;window.opener.postMessage(JSON.stringify(r),i)}},t.prototype.openDialog=function(n,o,r,i,a){if(this.useFullDialogAPI)this.registerEvent(n,o,r,i,a);else if(!t.popup||t.popup.closed){t.OpenDialogCallback=void 0;var s=JSON.parse(r),l=s.url;if(l){var c=l.split("#"),u="?";c[0].indexOf("?")>-1&&(u="&");var d="width="+screen.width*s.width/100+", height="+screen.height*s.height/100;c[0]=c[0].concat(u).concat("action=displayDialog");var f=c.join("#");t.popup=window.open(f,"",d),t.DialogEventListener=function(t){if(t.origin==window.location.origin)try{var o=JSON.parse(t.data);o.dialogMessage&&i(n,[0,o.dialogMessage.messageContent,t.origin])}catch(n){e.Utility.trace("messages received cannot be handlered. Message:"+t.data)}},t.OpenDialogCallback=function(e){0==e&&(window.addEventListener("message",t.DialogEventListener),t.interval=window.setInterval(p,1e3),t.NotifyError=function(e){i(n,[e])}),a(e)}}else a(12003)}else a(12007);function p(){try{(null==t.popup||t.popup.closed)&&(window.clearInterval(t.interval),window.removeEventListener("message",t.DialogEventListener),t.NotifyError=null,t.popup=null,i(n,[12006]))}catch(t){e.Utility.trace("Error happened when popup window closed.")}}},t.prototype.closeDialog=function(e,n,o,r){this.useFullDialogAPI?this.unregisterEvent(e,n,o,r):t.popup?(t.interval&&window.clearInterval(t.interval),t.popup.close(),t.popup=null,window.removeEventListener("message",t.DialogEventListener),t.NotifyError=null,r(0)):r(5001)},t.prototype.sendMessage=function(t){var n,o;this.osfSupportsDialogOrigin&&t[e.ParameterNames.TargetOrigin]?(n=JSON.stringify(t),o=e.Webkit.MethodId.SendMessage2):(n=t[e.ParameterNames.MessageContent],o=e.Webkit.MethodId.SendMessage,!isNaN(parseFloat(n))&&isFinite(n)&&(n=n.toString())),this.hostScriptProxy.invokeMethod(e.Webkit.MessageHandlerName,o,n,null)},t.prototype.closeSdxDialog=function(t){throw e.Utility.createNotImplementedException()},t}();t.WebkitHostController=n}(e.Webkit||(e.Webkit={}))}(OSF||(OSF={})),function(e){var t=function(t){function n(e,n,o,r){var i=t.call(this,e,n,o,r)||this;return i.initializeWebkitMessaging(),i}return __extends(n,t),n.prototype.initializeWebkitMessaging=function(){e.ScriptMessaging=OSFWebkit.ScriptMessaging},n.prototype.getAppContext=function(t,n,o){var r,i=this;r=this._hostInfo.isDialog&&window.webkit.messageHandlers[e.Webkit.PopupMessageHandlerName]?e.Webkit.PopupMessageHandlerName:e.Webkit.MessageHandlerName,e.ScriptMessaging.GetScriptMessenger().invokeMethod(r,e.Webkit.MethodId.GetContext,[],(function(t){var o,r=e.Webkit.AppContextProperties,a=t[r.AppType],s=t[r.Settings];i._serializedSettings={};for(var l=s[0],c=s[1],u=0;u=0;a--){var s=this.eventHandlers[a];s.dispId===n&&s.targetId===o&&(this.eventHandlers.splice(a,1),window._osfHostUnregisterCallback(s.callbackId))}},e.prototype.agaveHostCallback=function(e,t){},e.prototype.agaveHostEventCallback=function(e,t){},e.prototype.constructMessagingArgs=function(e,t){return{params:t,methodId:e}},e}(),r=function(){function e(t,n){this.callingIndex=0,this.callbackList={},this.eventHandlerList={},this.asyncMethodCallbackFunctionName=t,this.eventCallbackFunctionName=n,this.conversationId=e.getCurrentTimeMS().toString()}return e.prototype.invokeMethod=function(e,t,n,o){this.postWebkitMessage({},e,t,n,o)},e.prototype.registerEvent=function(e,t,o,r,i,a){var s={eventCallbackFunction:this.eventCallbackFunctionName},l={id:o,targetId:r},c=this.postWebkitMessage(s,e,t,l,a);this.eventHandlerList[c]=new n(o,r,i)},e.prototype.unregisterEvent=function(e,t,n,o,r){var i={id:n,targetId:o};for(var a in this.eventHandlerList)if(this.eventHandlerList.hasOwnProperty(a)){var s=this.eventHandlerList[a];s.id==n&&s.targetId==o&&delete this.eventHandlerList[a]}this.invokeMethod(e,t,i,r)},e.prototype.agaveHostCallback=function(e,t){var n=this.callbackList[e];if(n){var o=n(t);void 0!==o&&!0!==o||delete this.callbackList[e]}},e.prototype.agaveHostEventCallback=function(e,t){var n=this.eventHandlerList[e];n&&n.handler(t)},e.prototype.postWebkitMessage=function(t,n,o,r,i){t.methodId=o,t.params=r;var a="";i&&(a=this.generateCorrelationId(),this.callbackList[a]=i,t.callbackId=a,t.callbackFunction=this.asyncMethodCallbackFunctionName);var s=function(){window.webkit.messageHandlers[n].postMessage(JSON.stringify(t))},l=e.getCurrentTimeMS();return null==this.lastMessageTimestamp||l-this.lastMessageTimestamp>=e.MESSAGE_TIME_DELTA?(s(),this.lastMessageTimestamp=l):(this.lastMessageTimestamp+=e.MESSAGE_TIME_DELTA,setTimeout((function(){s()}),this.lastMessageTimestamp-l)),a},e.prototype.generateCorrelationId=function(){return++this.callingIndex,this.conversationId+this.callingIndex},e.getCurrentTimeMS=function(){return(new Date).getTime()},e.MESSAGE_TIME_DELTA=10,e}()}(e.ScriptMessaging||(e.ScriptMessaging={}))}(OSFWebkit||(OSFWebkit={})),function(e){var t=function(){function t(e,t){this._initializationHelper=e,this._scriptMessager=t}return t.prototype.read=function(e){this._initializationHelper.getAppContext(null,(function(t){if(e){var n=t.get_settingsFunc()();e(0,n)}}),(function(t){e&&e(5001,{})}))},t.prototype.write=function(t,n){var o={},r=[],i=[];for(var a in t)r.push(a),i.push(t[a]);o.keys=r,o.values=i;this._scriptMessager.invokeMethod(e.WebView.MessageHandlerName,e.WebView.MethodId.WriteSettings,o,(function(e){n&&n(e[0])}))},t}();e.WebViewClientSettingsManager=t}(OSF||(OSF={})),function(e){!function(t){t.MessageHandlerName="Agave",t.PopupMessageHandlerName="WefPopupHandler",function(e){e[e.Settings=0]="Settings",e[e.SolutionReferenceId=1]="SolutionReferenceId",e[e.AppType=2]="AppType",e[e.MajorVersion=3]="MajorVersion",e[e.MinorVersion=4]="MinorVersion",e[e.RevisionVersion=5]="RevisionVersion",e[e.APIVersionSequence=6]="APIVersionSequence",e[e.AppCapabilities=7]="AppCapabilities",e[e.APPUILocale=8]="APPUILocale",e[e.AppDataLocale=9]="AppDataLocale",e[e.BindingCount=10]="BindingCount",e[e.DocumentUrl=11]="DocumentUrl",e[e.ActivationMode=12]="ActivationMode",e[e.ControlIntegrationLevel=13]="ControlIntegrationLevel",e[e.SolutionToken=14]="SolutionToken",e[e.APISetVersion=15]="APISetVersion",e[e.CorrelationId=16]="CorrelationId",e[e.InstanceId=17]="InstanceId",e[e.TouchEnabled=18]="TouchEnabled",e[e.CommerceAllowed=19]="CommerceAllowed",e[e.RequirementMatrix=20]="RequirementMatrix",e[e.OfficeThemeInfo=21]="OfficeThemeInfo"}(t.AppContextProperties||(t.AppContextProperties={})),function(e){e[e.Execute=1]="Execute",e[e.RegisterEvent=2]="RegisterEvent",e[e.UnregisterEvent=3]="UnregisterEvent",e[e.WriteSettings=4]="WriteSettings",e[e.GetContext=5]="GetContext",e[e.OnKeydown=6]="OnKeydown",e[e.AddinInitialized=7]="AddinInitialized",e[e.OpenWindow=8]="OpenWindow",e[e.MessageParent=9]="MessageParent",e[e.SendMessage=10]="SendMessage"}(t.MethodId||(t.MethodId={}));var n=function(){function t(e){this.hostScriptProxy=e}return t.prototype.execute=function(t,n,o){var r=n;null==r&&(r=[]);var i={id:t,apiArgs:r};this.hostScriptProxy.invokeMethod(e.WebView.MessageHandlerName,e.WebView.MethodId.Execute,i,(function(t){var n=t;if(e.OUtil.isArray(t)&&t.length>=2){t[0];n=t[1]}if(o)return o(new e.WebkitSafeArray(n))}))},t.prototype.registerEvent=function(t,n,o,r,i){this.hostScriptProxy.registerEvent(e.WebView.MessageHandlerName,e.WebView.MethodId.RegisterEvent,t,o,(function(t){var n=t,o=0;e.OUtil.isArray(t)&&t.length>=2&&(o=t[0],n=t[1]),r&&r(o,new e.WebkitSafeArray(n))}),(function(t){if(i)return i(new e.WebkitSafeArray(t))}))},t.prototype.unregisterEvent=function(t,n,o,r){this.hostScriptProxy.unregisterEvent(e.WebView.MessageHandlerName,e.WebView.MethodId.UnregisterEvent,t,o,(function(t){return r(new e.WebkitSafeArray(t))}))},t.prototype.messageParent=function(t){var n={dialogMessage:{messageType:0,messageContent:t[e.ParameterNames.MessageToParent]}};window.opener.postMessage(JSON.stringify(n),window.location.origin)},t.prototype.openDialog=function(n,o,r,i,a){var s=JSON.parse(r),l=s.url;if(l){var c=l.split("#"),u="?";l.indexOf("?")>-1&&(u="&");var d="width="+screen.width*s.width/100+", height="+screen.height*s.height/100;c[0]=c[0].concat(u).concat("action=displayDialog");var f,p=c.join("#");t.popup=window.open(p,"",d),window.addEventListener("message",(function(o){if(o.source==t.popup)try{var r=JSON.parse(o.data);r.dialogMessage&&i(n,[0,r.dialogMessage.messageContent])}catch(t){e.Utility.trace("messages received cannot be handled. Message:"+o.data)}})),f=window.setInterval((function(){try{(null==t.popup||t.popup.closed)&&(window.clearInterval(f),i(n,[12006]))}catch(t){e.Utility.trace("Error happened when popup window closed.")}}),1e3),a(0)}},t.prototype.closeDialog=function(e,n,o,r){t.popup?(t.popup.close(),t.popup=null,r(0)):r(5001)},t.prototype.sendMessage=function(t){var n=t[e.ParameterNames.MessageContent];!isNaN(parseFloat(n))&&isFinite(n)&&(n=n.toString()),this.hostScriptProxy.invokeMethod(e.WebView.MessageHandlerName,e.WebView.MethodId.SendMessage,n,null)},t.prototype.closeSdxDialog=function(t){throw e.Utility.createNotImplementedException()},t}();t.WebViewHostController=n}(e.WebView||(e.WebView={}))}(OSF||(OSF={})),function(e){var t=function(t){function n(e,n,o,r){var i=t.call(this,e,n,o,r)||this;return i.initializeWebViewMessaging(),i}return __extends(n,t),n.prototype.initializeWebViewMessaging=function(){e.ScriptMessaging=e.WebView.ScriptMessaging},n.prototype.getAppContext=function(t,n,o){var r,i=this;r=this._hostInfo.isDialog?e.WebView.PopupMessageHandlerName:e.WebView.MessageHandlerName,e.ScriptMessaging.GetScriptMessenger().invokeMethod(r,e.WebView.MethodId.GetContext,[],(function(t){var o,r=e.Webkit.AppContextProperties,a=t[r.AppType],s=t[r.Settings];i._serializedSettings={};for(var l=s[0],c=s[1],u=0;u-1&&(u="&");var d="width="+screen.width*s.width/100+", height="+screen.height*s.height/100;c[0]=c[0].concat(u).concat("action=displayDialog");var f=c.join("#");if(n.popup=window.open(f,"",d),n.DialogEventListener=function(o){if(o.source==n.popup)try{var r=JSON.parse(o.data);r.dialogMessage&&i(t,[0,r.dialogMessage.messageContent])}catch(t){e.Utility.trace("messages received cannot be handlered. Message:"+o.data)}},null!=n.popup&&null==window.dialogAPIErrorCode)window.addEventListener("message",n.DialogEventListener),n.interval=window.setInterval((function(){try{(null==n.popup||n.popup.closed)&&(window.clearInterval(n.interval),window.removeEventListener("message",n.DialogEventListener),n.NotifyError=null,i(t,[12006]))}catch(t){e.Utility.trace("Error happened when popup window closed.")}}),500),n.NotifyError=function(e){i(t,[e])},a(0);else{var p=5001;window.dialogAPIErrorCode&&(p=window.dialogAPIErrorCode),a(p)}}else a(12003)}else a(12007)},n.prototype.messageParent=function(t){var n={dialogMessage:{messageType:0,messageContent:t[e.ParameterNames.MessageToParent]}};window.opener.postMessage(JSON.stringify(n),window.location.origin)},n.prototype.closeDialog=function(e,t,o,r){n.popup?(n.interval&&window.clearInterval(n.interval),n.popup.close(),n.popup=null,window.removeEventListener("message",n.DialogEventListener),n.NotifyError=null,r(0)):r(5001)},n}(e.Webkit.WebkitHostController);e.MacRichClientHostController=t}(OSF||(OSF={})),function(e){var t;!function(e){!function(e){e.Init=function(){return function(){"use strict";function e(e){return"function"==typeof e}var t,n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,r=function(e,n){f[o]=e,f[o+1]=n,2===(o+=2)&&(t?t(p):l())};var i=("undefined"!=typeof window?window:void 0)||{},a=(i.MutationObserver||i.WebKitMutationObserver,"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)),s="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;var l,c,u,d,f=new Array(1e3);function p(){for(var e=0;e40)&&(t=e.OUtil.Guid.generateNewGuid(),this.setValue(this.clientIDKey,t)),t},t.prototype.getValue=function(t){var n=e.OUtil.getLocalStorage(),o="";return n&&(o=n.getItem(t)),o},t.prototype.setValue=function(t,n){var o=e.OUtil.getLocalStorage();o&&o.setItem(t,n)},t}();function c(e){return e&&(e=e.replace(/[{}]/g,"").toLowerCase()),e||""}function u(){n&&(i||OTel.OTelLogger.onTelemetryLoaded((function(){var e=[],t=n.isMos?1:0;e=e.concat([oteljs.makeStringDataField("Browser",n.browser),oteljs.makeInt64DataField("AppSizeWidth",window.innerWidth),oteljs.makeInt64DataField("AppSizeHeight",window.innerHeight),oteljs.makeInt64DataField("IsMOS",t)]),Microsoft.Office.WebExtension.sendTelemetryEvent({eventName:"Office.Extensibility.OfficeJs.AppActivatedX",dataFields:e,eventFlags:{dataCategories:2,diagnosticLevel:110,samplingPolicy:191}})})))}function d(e,t){}function f(){var t=0!=(e._OfficeAppFactory.getHostInfo().flags&e.HostInfoFlags.PublicAddin);return t||!!n&&h(e._OfficeAppFactory.getHostInfo().hostPlatform,n.hostVersion)}function p(e,t){return f()||t!==e?t:a}function h(t,n){var o=!1,r=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(n);if(r){var i=parseInt(r[1]),a=parseInt(r[2]),s=parseInt(r[3]);t==e.HostInfoPlatform.win32?(i<16||16==i&&s<14225)&&(o=!0):t==e.HostInfoPlatform.mac&&(i<16||16==i&&(a<52||52==a&&s<808))&&(o=!0)}return o}function g(){return 0!=(e._OfficeAppFactory.getHostInfo().flags&e.HostInfoFlags.IsMos)}t.initialize=function(u){if(t.enableTelemetry&&!n){n=new s,u.get_hostFullVersion()?n.hostVersion=u.get_hostFullVersion():n.hostVersion=u.get_appVersion(),n.appId=f()?u.get_id():a,n.marketplaceType=u._marketplaceType,n.host=""+u.get_appName(),n.browser=window.navigator.userAgent,n.correlationId=c(u.get_correlationId()),n.clientId=(new l).getClientId(),n.appInstanceId=u.get_appInstanceId(),n.appInstanceId&&(n.appInstanceId=c(n.appInstanceId),n.appInstanceId=p(u.get_id(),n.appInstanceId)),n.message=u.get_hostCustomMessage(),n.officeJSVersion=e.ConstantNames.FileVersion,n.hostJSVersion="NA",u._wacHostEnvironment&&(n.wacHostEnvironment=u._wacHostEnvironment);var d=u.get_isFromWacAutomation();null!=d&&(n.isFromWacAutomation=d.toString().toLowerCase());var h=u.get_docUrl();n.docUrl=r.test(h)?h:"";var m=location.href;m&&(n.isPreload=-1!==m.indexOf("preload=1"),m=m.split("?")[0].split("#")[0]),n.isMos=g(),function(t,n){n.assetId="",n.userId="";try{if(!e.Utility.isNullOrEmpty(t)){var o=decodeURIComponent(t),r=(new DOMParser).parseFromString(o,"text/xml"),i=r.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),a=r.getElementsByTagName("t")[0].attributes.getNamedItem("oid");i&&i.nodeValue?n.userId=i.nodeValue:a&&a.nodeValue&&(n.userId=a.nodeValue),n.assetId=r.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}}catch(e){}}(u.get_eToken(),n),n.sessionId=o,OTel.OTelLogger.initialize(n),n.isPreload?i=!0:t.onAppActivated()}},t.onAppActivated=u,t.onScriptDone=function(e,t,n,o){},t.onCallDone=function(e,t,n,o,r){},t.onMethodDone=function(e,t,n,o){},t.onPropertyDone=function(t,n){e.AppTelemetry.onCallDone("property",-1,t,n,0)},t.onCheckWACHost=function(e,t,n,o,r){},t.onEventDone=function(t,n){e.AppTelemetry.onCallDone("event",t,null,0,n)},t.onRegisterDone=function(t,n,o,r){e.AppTelemetry.onCallDone(t?"registerevent":"unregisterevent",n,null,o,r)},t.onAppClosed=function(e,t){},t.setOsfControlAppCorrelationId=function(e){c(e)},t.doAppInitializationLogging=d,t.logAppCommonMessage=function(e){},t.logAppException=function(e){},t.CallOnAppActivatedIfPending=function(){i&&(i=!1,u())},t.canSendAddinId=f,t.getCompliantAppInstanceId=p,t._isComplianceExceptedHost=h,t.isMos=g}(e.AppTelemetry||(e.AppTelemetry={}))}(OSF||(OSF={})),function(e){var t=function(){function t(){}return t.loaded=function(){return!(void 0===t.logger)},t.create=function(t){var n,o={id:t.appId,marketplaceType:t.marketplaceType,assetId:t.assetId,officeJsVersion:t.officeJSVersion,hostJsVersion:t.hostJSVersion,browserToken:t.clientId,instanceId:t.appInstanceId,sessionId:t.sessionId},r=oteljs.Contracts.Office.System.SDX.getFields("SDX",o);if("web"===OSF._OfficeAppFactory.getHostInfo().hostPlatform)n=new e.SdxWacSink;else{if(!Office.context.requirements.isSetSupported("Telemetry","1.2"))return console.error("Cannot create telemetry sink successfully"),null;n=new e.RichApiSink}var i=new oteljs.SimpleTelemetryLogger(void 0,r);return i.addSink(n),i.setTenantToken("Office.Extensibility.OfficeJs","db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439",1755),oteljs.onNotification().addListener((function(e){OSF.Utility.debugLog(e.message())})),i},t.checkAndResolvePromises=function(){t.loaded()&&(t.promises.forEach((function(e){e()})),t.promises=[])},t.initialize=function(e){t.Enabled?Office.onReadyInternal().then((function(){t.loaded()||(OSF.Utility.debugLog("Creating OTelLogger"),t.logger=t.create(e),t.checkAndResolvePromises())})):t.promises=[]},t.sendTelemetryEvent=function(e){t.onTelemetryLoaded((function(){try{t.logger.sendTelemetryEvent(e),OSF.Utility.debugLog("Sent telemetry")}catch(e){console.error("Cannot send telemetry event: "+JSON.stringify(e))}}))},t.onTelemetryLoaded=function(e){t.Enabled&&(t.loaded()?e():t.promises.push(e))},t.promises=[],t.Enabled=!0,t}();e.OTelLogger=t}(OTel||(OTel={})),function(e){var t=function(){function e(){var e=this;this._requestIsPending=!0,this._telemetryQueue=[],this.pause(1e3).then((function(){var t=e._telemetryQueue;e._telemetryQueue=[],e._requestIsPending=!1,e.processTelemetryEvents(t)}))}return e.prototype.sendTelemetryEvent=function(e){this._telemetryQueue.push(e),this._requestIsPending||this.processWorkBacklog()},e.prototype.processWorkBacklog=function(){var e=this;this._requestIsPending=!0;var t=this._telemetryQueue;this._telemetryQueue=[],this.processTelemetryEvents(t).then(this.waitAndProcessMore).catch((function(t){oteljs.logError(1,"RichApiSink Error",t),e.waitAndProcessMore()}))},e.prototype.waitAndProcessMore=function(){var e=this;this.pause(1e3).then((function(){e._telemetryQueue.length>0&&setTimeout((function(){return e.processWorkBacklog()}),0),e._requestIsPending=!1})).catch((function(){}))},e.prototype.processTelemetryEvents=function(e){var t=this,n=new OfficeCore.RequestContext;return e.forEach((function(e){if(e.telemetryProperties){var o=[];t.addDataFields(o,e.dataFields);var r=e.eventContract?e.eventContract.name:"";e.eventContract&&t.addDataFields(o,e.eventContract.dataFields),n.telemetry.sendTelemetryEvent(e.telemetryProperties,e.eventName,r,oteljs.getEffectiveEventFlags(e),o)}})),n.sync().catch((function(){oteljs.logNotification(2,1,(function(){return"RichApi telemetry call failed."}))}))},e.prototype.addDataFields=function(e,t){t&&t.forEach((function(t){e.push({name:t.name,value:t.value,classification:t.classification?t.classification:4,type:t.dataType})}))},e.prototype.pause=function(e){return new Office.Promise((function(t){return setTimeout(t,e)}))},e}();e.RichApiSink=t}(OTel||(OTel={})),function(e){var t=function(){function e(){}return e.prototype.sendTelemetryEvent=function(e,t){try{if(e.dataFields&&e.dataFields.filter((function(e){return e.classification&&4!==e.classification})).length>0)return;var n=OSF._OfficeAppFactory.getId(),o=OSF.AgaveHostAction.SendTelemetryEvent;OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[n,o,e])}catch(e){oteljs.logError(1,"AgaveWacSink",e)}},e}();e.SdxWacSink=t}(OTel||(OTel={}));var OfficeExtension;__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(e){var t=function(){function e(){}return e.prototype._resolveRequestUrlAndHeaderInfo=function(){return c._createPromiseFromResult(null)},e.prototype._createRequestExecutorOrNull=function(){return null},e.prototype.getEventRegistration=function(e){return null},e}();e.SessionBase=t;var n=function(){function e(){}return e.setCustomSendRequestFunc=function(t){e.s_customSendRequestFunc=t},e.xhrSendRequestFunc=function(e){return c.createPromise((function(t,n){var r=new XMLHttpRequest;if(r.open(e.method,e.url),r.onload=function(){var e={statusCode:r.status,headers:c._parseHttpResponseHeaders(r.getAllResponseHeaders()),body:r.responseText};t(e)},r.onerror=function(){n(new o.RuntimeError({code:i.connectionFailure,httpStatusCode:r.status,message:c._getResourceString(a.connectionFailureWithStatus,r.statusText)}))},e.headers)for(var s in e.headers)r.setRequestHeader(s,e.headers[s]);r.send(c._getRequestBodyText(e))}))},e.fetchSendRequestFunc=function(e){var t=c._getRequestBodyText(e);return""===t&&(t=void 0),fetch(e.url,{method:e.method,headers:e.headers,body:t}).then((function(e){return e.text().then((function(t){var n=e.status,o={};return e.headers.forEach((function(e,t){o[t]=e})),{statusCode:n,headers:o,body:t}}))}))},e.sendRequest=function(t){e.validateAndNormalizeRequest(t);var n=e.s_customSendRequestFunc;return n||(n="undefined"!=typeof fetch?e.fetchSendRequestFunc:e.xhrSendRequestFunc),n(t)},e.setCustomSendLocalDocumentRequestFunc=function(t){e.s_customSendLocalDocumentRequestFunc=t},e.sendLocalDocumentRequest=function(t){return e.validateAndNormalizeRequest(t),(e.s_customSendLocalDocumentRequestFunc||e.officeJsSendLocalDocumentRequestFunc)(t)},e.officeJsSendLocalDocumentRequestFunc=function(e){e=c._validateLocalDocumentRequest(e);var t=c._buildRequestMessageSafeArray(e);return c.createPromise((function(e,n){OSF.DDA.RichApi.executeRichApiRequestAsync(t,(function(t){var n;n="succeeded"==t.status?{statusCode:l.getResponseStatusCode(t),headers:l.getResponseHeaders(t),body:l.getResponseBody(t)}:l.buildHttpResponseFromOfficeJsError(t.error.code,t.error.message),c.log("Response:"),c.log(JSON.stringify(n)),e(n)}))}))},e.validateAndNormalizeRequest=function(e){if(c.isNullOrUndefined(e))throw o.RuntimeError._createInvalidArgError({argumentName:"request"});c.isNullOrEmptyString(e.method)&&(e.method="GET"),e.method=e.method.toUpperCase();var t=!1;if("object"==typeof e.headers&&e.headers[s.testRequestNameHeader]&&(t=!0),!t){var n=u._getCurrentTestNameWithSequenceId();n&&(e.headers||(e.headers={}),e.headers[s.testRequestNameHeader]=n)}},e.logRequest=function(t){if(c._logEnabled){if(c.log("---HTTP Request---"),c.log(t.method+" "+t.url),t.headers)for(var n in t.headers)c.log(n+": "+t.headers[n]);e._logBodyEnabled&&c.log(c._getRequestBodyText(t))}},e.logResponse=function(t){if(c._logEnabled){if(c.log("---HTTP Response---"),c.log(""+t.statusCode),t.headers)for(var n in t.headers)c.log(n+": "+t.headers[n]);e._logBodyEnabled&&c.log(t.body)}},e._logBodyEnabled=!1,e}();e.HttpUtility=n;var o,r=function(){function e(e){var t=this;this.m_bridge=e,this.m_promiseResolver={},this.m_handlers=[],this.m_bridge.onMessageFromHost=function(e){var n=JSON.parse(e);if(3==n.type){var o=n.message;if(o&&o.entries)for(var r=0;r=0){var i=t.url.substr(r+1),a=c._parseRequestFlagsAndCustomDataFromQueryStringIfAny(i);a.flags>=0&&(n=a.flags)}"string"==typeof t.body&&(t.body=JSON.parse(t.body));var s={id:e.nextId(),type:1,flags:n,message:t};return o.sendMessageToHostAndExpectResponse(s).then((function(e){return e.message}))}));for(var r=0;r=0&&this.m_handlers.splice(t,1)},e.onInited=function(t){e.s_onInitedHandlers.push(t),e.s_instance&&t(e.s_instance)},e.prototype.dispatchMessage=function(e){if("number"==typeof e.id){var t=this.m_promiseResolver[e.id];if(t)return t(e),void delete this.m_promiseResolver[e.id]}for(var n=0;n0},e._getLocalDocumentUrlPrefixLength=function(e){for(var t=["http://document.localhost","https://document.localhost","//document.localhost"],n=e.toLowerCase().trim(),o=0;o0){var i=t.url.substr(r+1),a=e._parseRequestFlagsAndCustomDataFromQueryStringIfAny(i);a.flags>=0&&(n=a.flags),o=a.customData}}return l.buildRequestMessageSafeArray(o,n,t.method,t.url,t.headers,e._getRequestBodyText(t))},e._parseHttpResponseHeaders=function(t){var n={};if(!e.isNullOrEmptyString(t))for(var o=new RegExp("\r?\n"),r=t.split(o),i=0;i0){var l=a.substr(0,s),c=a.substr(s+1);l=e.trim(l),c=e.trim(c),n[l.toUpperCase()]=c}}}return n},e._parseErrorResponse=function(t){var n=e._parseErrorResponseBody(t),o=t.statusCode.toString();if(e.isNullOrUndefined(n)||"object"!=typeof n||!n.error)return e._createDefaultErrorResponse(o);var r=n.error,i=r.innerError;return i&&i.code?e._createErrorResponse(i.code,o,i.message):r.code?e._createErrorResponse(r.code,o,r.message):e._createDefaultErrorResponse(o)},e._parseErrorResponseBody=function(t){if(e.isPlainJsonObject(t.body))return t.body;if(!e.isNullOrEmptyString(t.body)){var n=e.trim(t.body);try{return JSON.parse(n)}catch(t){e.log("Error when parse "+n)}}},e._createDefaultErrorResponse=function(t){return{errorCode:i.connectionFailure,errorMessage:e._getResourceString(a.connectionFailureWithStatus,t)}},e._createErrorResponse=function(t,n,o){return{errorCode:t,errorMessage:e._getResourceString(a.connectionFailureWithDetails,[n,t,o])}},e._copyHeaders=function(e,t){if(e&&t)for(var n in e)t[n]=e[n]},e.addResourceStringValues=function(t){for(var n in t)e.s_resourceStringValues[n]=t[n]},e._logEnabled=!1,e.s_resourceStringValues={ApiNotFoundDetails:"The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",ConnectionFailureWithStatus:"The request failed with status code of {0}.",ConnectionFailureWithDetails:"The request failed with status code of {0}, error code {1} and the following error message: {2}",InvalidArgument:"The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",InvalidObjectPath:'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',InvalidRequestContext:"Cannot use the object across different request contexts.",Timeout:"The operation has timed out.",ValueNotLoaded:'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'},e}();e.CoreUtility=c;var u=function(){function e(){}return e.setMock=function(t){e.s_isMock=t},e.isMock=function(){return e.s_isMock},e._setCurrentTestName=function(t){e.s_currentTestName=t,e.s_currentTestSequenceId=0},e._getCurrentTestNameWithSequenceId=function(){return e.s_currentTestName?(e.s_currentTestSequenceId++,e.s_currentTestName+"."+e.s_currentTestSequenceId):null},e}();e.TestUtility=u,e._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!0,enableUndoableFlag:!0,appendTypeNameToObjectPathInfo:!1,enablePreviewExecution:!1},e.config={extendedErrorLogging:!1};var d=function(){function t(){}return t.createSetPropertyAction=function(t,n,o,r,i){O.validateObjectPath(n);var a={Id:t._nextId(),ActionType:4,Name:o,ObjectPathId:n._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[r],l=O.setMethodArguments(t,a.ArgumentInfo,s);O.validateReferencedObjectPaths(l);var c=new p(a,0,i);if(c.referencedObjectPath=n._objectPath,c.referencedArgumentObjectPaths=l,e._internalConfig.enablePreviewExecution&&0!=(16&i)){var u={Id:t._nextId(),ActionType:4,Name:o,ObjectId:"",ObjectType:"",Arguments:[r]};n._addPreviewExecutionAction(u)}return n._addAction(c)},t.createQueryAction=function(e,t,n,o){O.validateObjectPath(t);var r={Id:e._nextId(),ActionType:2,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},i=new p(r,1,4);return i.referencedObjectPath=t._objectPath,t._addAction(i,o)},t.createQueryAsJsonAction=function(e,t,n,o){O.validateObjectPath(t);var r={Id:e._nextId(),ActionType:7,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},i=new p(r,1,4);return i.referencedObjectPath=t._objectPath,t._addAction(i,o)},t.createUpdateAction=function(e,t,n){O.validateObjectPath(t);var o={Id:e._nextId(),ActionType:9,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},r=new p(o,0,0);return r.referencedObjectPath=t._objectPath,t._addAction(r)},t}();e.CommonActionFactory=d;var f=function(){function t(e,t){this.m_contextBase=e,this.m_objectPath=t}return Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_context",{get:function(){return this.m_contextBase},enumerable:!0,configurable:!0}),t.prototype._addAction=function(e,t){var n=this;return void 0===t&&(t=null),c.createPromise((function(o,r){n._context._addServiceApiAction(e,t,o,r)}))},t.prototype._addPreviewExecutionAction=function(e){},t.prototype._retrieve=function(t,n){var o=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;o||(o=!O.isSetSupported("RichApiRuntime","1.1"));var r=g._parseQueryOption(t);return o?d.createQueryAction(this._context,this,r,n):d.createQueryAsJsonAction(this._context,this,r,n)},t.prototype._recursivelyUpdate=function(t){var n=e._internalConfig.alwaysPolyfillClientObjectUpdateMethod;n||(n=!O.isSetSupported("RichApiRuntime","1.2"));try{var r=this[C.scalarPropertyNames];r||(r=[]);var s=this[C.scalarPropertyUpdateable];if(!s){s=[];for(var l=0;l=0){if(!s[m])throw new o.RuntimeError({code:i.invalidArgument,httpStatusCode:400,message:c._getResourceString(S.attemptingToSetReadOnlyProperty,g),debugInfo:{errorLocation:g}});f[g]=t[g],++h}else{if(!(u.indexOf(g)>=0))throw new o.RuntimeError({code:i.invalidArgument,httpStatusCode:400,message:c._getResourceString(S.propertyDoesNotExist,g),debugInfo:{errorLocation:g}});p[g]=t[g]}}if(h>0)if(n)for(l=0;l0)throw o.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(r,a,".")});t.Top=s}else if("$skip"===a){if("number"!=typeof s||n.length>0)throw o.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(r,a,".")});t.Skip=s}else if("boolean"==typeof s)s&&t.Select.push(e.combineQueryPath(n,a,"/"));else{if("object"!=typeof s)throw o.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(r,a,".")});e.parseStrictLoadOptionHelper(t,e.combineQueryPath(n,a,"/"),e.combineQueryPath(r,a,"."),s)}}},e}();e.ClientRequestContextBase=g;var m=function(){function e(e){this.m_objectPath=e}return e.prototype._handleResult=function(e){c.isNullOrUndefined(e)?this.m_objectPath._updateAsNullObject():this.m_objectPath.updateUsingObjectData(e,null)},e}(),y=function(){function t(e){this.m_contextBase=e,this.m_actions=[],this.m_actionResultHandler={},this.m_referencedObjectPaths={},this.m_instantiatedObjectPaths={},this.m_preSyncPromises=[],this.m_previewExecutionActions=[]}return t.prototype.addAction=function(e){this.m_actions.push(e),1==e.actionInfo.ActionType&&(this.m_instantiatedObjectPaths[e.actionInfo.ObjectPathId]=e)},t.prototype.addPreviewExecutionAction=function(e){this.m_previewExecutionActions.push(e)},Object.defineProperty(t.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.ensureInstantiateObjectPath=function(e){if(e){if(this.m_instantiatedObjectPaths[e.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(e.parentObjectPath),this.ensureInstantiateObjectPaths(e.argumentObjectPaths),!this.m_instantiatedObjectPaths[e.objectPathInfo.Id]){var t={Id:this.m_contextBase._nextId(),ActionType:1,Name:"",ObjectPathId:e.objectPathInfo.Id},n=new p(t,1,4);n.referencedObjectPath=e,this.addReferencedObjectPath(e),this.addAction(n);var o=new m(e);this.addActionResultHandler(n,o)}}},t.prototype.ensureInstantiateObjectPaths=function(e){if(e)for(var t=0;t0&&(c.PreviewExecutionActions=this.m_previewExecutionActions,n|=4096),{body:c,flags:n}},t.prototype.processResponse=function(e){if(e)for(var t=0;t=0;t--){var n=this.m_actions[t].actionInfo;if(n.ObjectPathId===e&&3===n.ActionType&&n.Name===C.keepReference){this.m_actions.splice(t,1);break}}},t._updateLastUsedActionIdOfObjectPathId=function(e,n,o){for(;n;){if(e[n.objectPathInfo.Id])return;e[n.objectPathInfo.Id]=o;var r=n.argumentObjectPaths;if(r)for(var i=r.length,a=0;a=0;--r){var i=(f=e[r]).actionInfo.Id;f.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(n,f.referencedObjectPath,i);var a=f.referencedArgumentObjectPaths;if(a)for(var s=a.length,l=0;l0?f.actionInfo.L=p:f.actionInfo.L&&delete f.actionInfo.L}},t}();e.ClientRequestBase=y;var v=function(){function e(e){this.m_type=e}return Object.defineProperty(e.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new o.RuntimeError({code:i.valueNotLoaded,httpStatusCode:400,message:c._getResourceString(a.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),e.prototype._handleResult=function(e){this.m_isLoaded=!0,"object"==typeof e&&e&&e._IsNull||(1===this.m_type?this.m_value=O.adjustToDateTime(e):this.m_value=e)},e}();e.ClientResult=v;var b=function(){function e(e){this.m_context=e,this.m_actions=[]}return e.prototype.add=function(e,t,n,o){var r=this;this.m_actions.push({action:e,resultHandler:t,resolve:n,reject:o}),1===this.m_actions.length&&setTimeout((function(){return r.processActions()}),0)},e.prototype.processActions=function(){var e=this;if(0!==this.m_actions.length){var t=this.m_actions;this.m_actions=[];for(var n=new y(this.m_context),o=0;o=65&&e.charCodeAt(t)<=90;)t++;return t0?".":"")+n;break;case 3:n=t.normalizeName(e.objectPathInfo.Name)+"()"+(n.length>0?".":"")+n;break;case 4:n=t.normalizeName(e.objectPathInfo.Name)+(n.length>0?".":"")+n;break;case 5:n="getItem()"+(n.length>0?".":"")+n;break;case 6:n="_reference()"+(n.length>0?".":"")+n}e=e.parentObjectPath}return n},t.setMethodArguments=function(e,n,o){if(c.isNullOrUndefined(o))return null;var r=new Array,i=new Array,a=t.collectObjectPathInfos(e,o,r,i);return n.Arguments=o,a&&(n.ReferencedObjectPathIds=i),r},t.validateContext=function(e,t){if(e&&t&&t._context!==e)throw new o.RuntimeError({code:i.invalidRequestContext,httpStatusCode:400,message:c._getResourceString(a.invalidRequestContext)})},t.isSetSupported=function(e,n){return"function"==typeof t.isSetSupportedOverride?t.isSetSupportedOverride(e,n):!("undefined"!=typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)||window.Office.context.requirements.isSetSupported(e,n)},t.throwIfApiNotSupported=function(e,n,r,s){if(t._doApiNotSupportedCheck&&!t.isSetSupported(n,r)){var l=c._getResourceString(a.apiNotFoundDetails,[e,n+" "+r,s]);throw new o.RuntimeError({code:i.apiNotFound,httpStatusCode:404,message:l,debugInfo:{errorLocation:e}})}},t.calculateApiFlags=function(e,n,o){var r=window&&window.location&&window.location.href&&-1!==window.location.href.indexOf("eed0a086-3498-4f91-a377-1e0265ecc0cc");return("function"==typeof t.isSetSupportedOverride?t.isSetSupportedOverride(n,o):!r&&t.isSetSupported(n,o))||(e&=-3),e},t._parseSelectExpand=function(e){var t=[];if(!c.isNullOrEmptyString(e))for(var n=e.split(","),o=0;o0&&t.push(r)}return t;function i(e){var t=e.toLowerCase();if("items"===t||"items/"===t)return"*";return("items/"===t.substr(0,6)||"items."===t.substr(0,6))&&(e=e.substr(6)),e.replace(new RegExp("[/.]items[/.]","gi"),"/")}},t.changePropertyNameToCamelLowerCase=function(e){if(Array.isArray(e)){for(var n=[],o=0;o=0){var a=new V(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!0),s=a.processForDebugStatementInfo(n.Body.Error.ActionIndex);i={statement:s.statement,surroundingStatements:s.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},e.config.extendedErrorLogging&&(a=new V(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!1),i.fullStatements=a.process())}var l=null;if(n.Body.Results?l=n.Body.Results:n.Body.ProcessedResults&&n.Body.ProcessedResults.Results&&(l=n.Body.ProcessedResults.Results),l){this._processingResult=!0;try{t.processResponse(l)}finally{this._processingResult=!1}}}if(!G.isNullOrEmptyString(n.ErrorCode))return new o.RuntimeError({code:n.ErrorCode,httpStatusCode:n.HttpStatusCode,message:n.ErrorMessage,traceMessages:r,data:{responseBody:n.RawErrorResponseBody}});if(n.Body&&n.Body.Error){var c={errorLocation:n.Body.Error.Location};return i&&(c.statement=i.statement,c.surroundingStatements=i.surroundingStatements,c.fullStatements=i.fullStatements),new o.RuntimeError({code:n.Body.Error.Code,httpStatusCode:n.Body.Error.HttpStatusCode,message:n.Body.Error.Message,traceMessages:r,debugInfo:c})}return null},r.prototype.processPendingEventHandlers=function(e){for(var t=G._createPromiseFromResult(null),n=0;n0)if(r.isValidRequestInfo(n[0]))f=n[0],h=1;else if(G.isPlainJsonObject(n[0])){if(null!=(f=(g=n[0]).session)&&!r.isValidRequestInfo(f))return r.createErrorPromise(t);p=g.previousObjects,h=1}if(n.length==h+1)d=n[h+0];else{if(null!=g||n.length!=h+2)return r.createErrorPromise(t);p=n[h+0],d=n[h+1]}if(null!=p)if(p instanceof R)u=function(){return p.context};else if(p instanceof r)u=function(){return p};else{if(!Array.isArray(p))return r.createErrorPromise(t);var m=p;if(0==m.length)return r.createErrorPromise(t);for(var y=0;y0&&h._onRunFinishedNotifiers.shift()();if(v)return g;throw g}))},r}(g);e.ClientRequestContext=w;var F=function(){function e(e,t){this.m_proxy=e,this.m_shouldPolyfill=t;var n=e[D.scalarPropertyNames],o=e[D.navigationPropertyNames],r=e[D.className],i=e[D.isCollection];if(n)for(var a=0;a=0;s--)if(r[s]===o[i].handler){r.splice(s,1);break}break;case 2:r=[]}return a&&(!this.m_registered&&r.length>0?n=n.then((function(){return t.m_eventInfo.registerFunc(t.m_callback)})).then((function(){return t.m_registered=!0})):this.m_registered&&0==r.length&&(n=n.then((function(){return t.m_eventInfo.unregisterFunc(t.m_callback)})).catch((function(e){c.log("Error when unregister event: "+JSON.stringify(e))})).then((function(){return t.m_registered=!1}))),n=n.then((function(){return t.m_handlers=r}))),n},e.prototype.fireEvent=function(e){for(var t=[],n=0;n0},e.prototype.register=function(e,t,n){if(!n)throw o.RuntimeError._createInvalidArgError({argumentName:"handler"});var r=this.getHandlers(e,t);return r.push(n),1===r.length?this.m_registerEventImpl(e,t):G._createPromiseFromResult(null)},e.prototype.unregister=function(e,t,n){if(!n)throw o.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var r=this.getHandlers(e,t),i=r.length-1;i>=0;i--)if(r[i]===n){r.splice(i,1);break}return 0===r.length?this.m_unregisterEventImpl(e,t):G._createPromiseFromResult(null)},e}();e.EventRegistration=M;var H=function(){function e(){this.m_eventRegistration=new M(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this)),this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return e.prototype.ready=function(){var t=this;return this.m_ready||(e._testReadyImpl?this.m_ready=e._testReadyImpl().then((function(){t.m_isReady=!0})):r.instance?this.m_ready=G._createPromiseFromResult(null).then((function(){t.m_isReady=!0})):this.m_ready=o.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then((function(){t.m_isReady=!0}))),this.m_ready},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t,n){var o=this;return this.ready().then((function(){return o.m_eventRegistration.register(e,t,n)}))},e.prototype.unregister=function(e,t,n){var o=this;return this.ready().then((function(){return o.m_eventRegistration.unregister(e,t,n)}))},e.prototype._registerEventImpl=function(e,t){return G._createPromiseFromResult(null)},e.prototype._unregisterEventImpl=function(e,t){return G._createPromiseFromResult(null)},e.prototype._handleRichApiMessage=function(e){if(e&&e.entries)for(var t=0;t=0;r--)if(o[r]===e){o.splice(r,1);break}0==o.length&&H.getGenericEventRegistration(n).unregister(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)}))},t.prototype.removeAll=function(){},t}(k);e.GenericEventHandlers=U;var j=function(){function e(e){this.m_clientObject=e}return e.prototype._handleResult=function(e){this.m_clientObject._handleIdResult(e)},e}(),L=function(){function e(){}return e.createGlobalObjectObjectPath=function(e){var t={Id:e._nextId(),ObjectPathType:1,Name:""};return new h(t,null,!1,!1,1,4)},e.createNewObjectObjectPath=function(e,t,n,o){var r={Id:e._nextId(),ObjectPathType:2,Name:t};return new h(r,null,n,!1,1,G._fixupApiFlags(o))},e.createPropertyObjectPath=function(e,t,n,o,r,i){var a={Id:e._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id};return new h(a,t._objectPath,o,r,1,G._fixupApiFlags(i))},e.createIndexerObjectPath=function(e,t,n){var o={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=n,new h(o,t._objectPath,!1,!1,1,4)},e.createIndexerObjectPathUsingParentPath=function(e,t,n){var o={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=n,new h(o,t,!1,!1,1,4)},e.createMethodObjectPath=function(e,t,n,o,r,i,a,s,l){var c={Id:e._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u=G.setMethodArguments(e,c.ArgumentInfo,r),d=new h(c,t._objectPath,i,a,o,G._fixupApiFlags(l));return d.argumentObjectPaths=u,d.getByIdMethodName=s,d},e.createReferenceIdObjectPath=function(e,t){var n={Id:e._nextId(),ObjectPathType:6,Name:t,ArgumentInfo:{}};return new h(n,null,!1,!1,1,4)},e.createChildItemObjectPathUsingIndexerOrGetItemAt=function(t,n,o,r,i){var a=G.tryGetObjectIdFromLoadOrRetrieveResult(r);return t&&!G.isNullOrUndefined(a)?e.createChildItemObjectPathUsingIndexer(n,o,r):e.createChildItemObjectPathUsingGetItemAt(n,o,r,i)},e.createChildItemObjectPathUsingIndexer=function(e,t,n){var o=G.tryGetObjectIdFromLoadOrRetrieveResult(n),r=r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=[o],new h(r,t._objectPath,!1,!1,1,4)},e.createChildItemObjectPathUsingGetItemAt=function(e,t,n,o){var r=n[D.index];r&&(o=r);var i={Id:e._nextId(),ObjectPathType:3,Name:D.getItemAt,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return i.ArgumentInfo.Arguments=[o],new h(i,t._objectPath,!1,!1,1,4)},e}();e.ObjectPathFactory=L;var B=function(){function t(e){this.m_context=e}return t.prototype.executeAsync=function(n,o,r){var i=this,a=l.buildMessageArrayForIRequestExecutor(n,o,r,t.SourceLibHeaderValue);return new e.Promise((function(e,t){OSF.DDA.RichApi.executeRichApiRequestAsync(a,(function(t){var n;c.log("Response:"),c.log(JSON.stringify(t)),"succeeded"==t.status?n=l.buildResponseOnSuccess(l.getResponseBody(t),l.getResponseHeaders(t)):(n=l.buildResponseOnError(t.error.code,t.error.message),i.m_context._processOfficeJsErrorResponse(t.error.code,n)),e(n)}))}))},t.SourceLibHeaderValue="officejs",t}(),W=function(){function e(e){this._autoCleanupList={},this.m_context=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._addCommon(e,!0)})):this._addCommon(e,!0)},e.prototype._autoAdd=function(e){this._addCommon(e,!1),this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e},e.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(e,t){this.m_context._autoCleanup&&!e[D.isTracked]&&e!==this.m_context._rootObject&&t&&!G.isNullOrEmptyString(t[D.referenceId])&&(this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e,e[D.isTracked]=!0)},e.prototype._addCommon=function(e,t){if(e[D.isTracked])t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id];else{var n=e[D.referenceId];if(e._objectPath.objectPathInfo[D.objectPathInfoDoNotKeepReferenceFieldName])throw G.createRuntimeError(i.generalException,c._getResourceString(q.objectIsUntracked),null);G.isNullOrEmptyString(n)&&e._KeepReference&&(e._KeepReference(),E.createInstantiateAction(this.m_context,e),t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id],e[D.isTracked]=!0)}},e.prototype.remove=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._removeCommon(e)})):this._removeCommon(e)},e.prototype._removeCommon=function(e){e._objectPath.objectPathInfo[D.objectPathInfoDoNotKeepReferenceFieldName]=!0,e.context._pendingRequest._removeKeepReferenceAction(e._objectPath.objectPathInfo.Id);var t=e[D.referenceId];if(!G.isNullOrEmptyString(t)){var n=this.m_context._rootObject;n._RemoveReference&&n._RemoveReference(t)}delete e[D.isTracked]},e.prototype._retrieveAndClearAutoCleanupList=function(){var e=this._autoCleanupList;return this._autoCleanupList={},e},e}();e.TrackedObjects=W;var V=function(){function t(e,t,n,o,r){e||(e="root"),this.m_globalObjName=e,this.m_referencedObjectPaths=t,this.m_actions=n,this.m_statements=[],this.m_variableNameForObjectPathMap={},this.m_variableNameToObjectPathMap={},this.m_declaredObjectPathMap={},this.m_showDispose=o,this.m_removePII=r}return t.prototype.process=function(){this.m_showDispose&&x._calculateLastUsedObjectPathIds(this.m_actions);for(var e=0;e=0&&this.m_statements.length>t+5+1));n++);if(t<0)return null;var o=t-5;o<0&&(o=0);var r=t+1+5;r>this.m_statements.length&&(r=this.m_statements.length);var i=[];0!=o&&i.push("...");for(var a=o;a>>>>"),i.push(this.m_statements[t]),i.push("// <<<<<");for(var s=t+1;s0)return e+" // And then dispose {"+o.map((function(e){return n.getObjVarName(e)})).join(", ")+"}"}return e},t.prototype.buildQueryExpression=function(e){if(e.actionInfo.QueryInfo){var t={};return t.select=e.actionInfo.QueryInfo.Select,t.expand=e.actionInfo.QueryInfo.Expand,t.skip=e.actionInfo.QueryInfo.Skip,t.top=e.actionInfo.QueryInfo.Top,void 0===t.top&&void 0===t.skip&&void 0===t.expand?void 0===t.select?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(e){return(5==e.objectPathInfo.ObjectPathType||3==e.objectPathInfo.ObjectPathType||4==e.objectPathInfo.ObjectPathType)&&e.objectPathInfo.ParentObjectPathId?this.getObjVarName(e.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(e):this.buildObjectPathExpression(e)},t.prototype.buildObjectPathExpression=function(e){var t=this.buildObjectPathInfoExpression(e.objectPathInfo),n=e.originalObjectPathInfo;return n&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(n)+" */"),t},t.prototype.buildObjectPathInfoExpression=function(e){switch(e.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 3:return G._toCamelLowerCase(e.Name)+"("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 2:return e.Name+".newObject()";case 7:return"null";case 4:return G._toCamelLowerCase(e.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(e.Name)+")"}},t.prototype.buildArgumentsExpression=function(e){var t="";if(!e.Arguments||0===e.Arguments.length)return t;if(this.m_removePII)return void 0===e.Arguments[0]?t:"...";for(var n=0;n0&&(t+=", "),t+=this.buildArgumentLiteral(e.Arguments[n],e.ReferencedObjectPathIds?e.ReferencedObjectPathIds[n]:null);return"undefined"===t&&(t=""),t},t.prototype.buildArgumentLiteral=function(e,t){return"number"==typeof e&&e===t?this.getObjVarName(t):JSON.stringify(e)},t.prototype.getObjVarNameBase=function(e){var t="v",n=this.m_referencedObjectPaths[e];if(n)switch(n.objectPathInfo.ObjectPathType){case 1:t=this.m_globalObjName;break;case 4:t=G._toCamelLowerCase(n.objectPathInfo.Name);break;case 3:var o=n.objectPathInfo.Name;o.length>3&&"Get"===o.substr(0,3)&&(o=o.substr(3)),t=G._toCamelLowerCase(o);break;case 5:var r=this.getObjVarNameBase(n.objectPathInfo.ParentObjectPathId);t="s"===r.charAt(r.length-1)?r.substr(0,r.length-1):r+"Item"}return t},t.prototype.getObjVarName=function(e){if(this.m_variableNameForObjectPathMap[e])return this.m_variableNameForObjectPathMap[e];var t=this.getObjVarNameBase(e);if(!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t;for(var n=1;this.m_variableNameToObjectPathMap[t+n.toString()];)n++;return t+=n.toString(),this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t},t}(),q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.cannotRegisterEvent="CannotRegisterEvent",t.connectionFailureWithStatus="ConnectionFailureWithStatus",t.connectionFailureWithDetails="ConnectionFailureWithDetails",t.propertyNotLoaded="PropertyNotLoaded",t.runMustReturnPromise="RunMustReturnPromise",t.moreInfoInnerError="MoreInfoInnerError",t.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",t.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",t.objectIsUntracked="ObjectIsUntracked",t.customFunctionDefintionMissing="CustomFunctionDefintionMissing",t.customFunctionImplementationMissing="CustomFunctionImplementationMissing",t.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",t.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",t.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",t.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",t.customFunctionInvalidFunction="CustomFunctionInvalidFunction",t.customFunctionInvalidFunctionMapping="CustomFunctionInvalidFunctionMapping",t.customFunctionWindowMissing="CustomFunctionWindowMissing",t.customFunctionDefintionMissingOnWindow="CustomFunctionDefintionMissingOnWindow",t.pendingBatchInProgress="PendingBatchInProgress",t.notInsideBatch="NotInsideBatch",t.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",t}(S);e.ResourceStrings=q,c.addResourceStringValues({CannotRegisterEvent:"The event handler cannot be registered.",PropertyNotLoaded:"The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",RunMustReturnPromise:'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',InvalidOrTimedOutSessionMessage:"Your Office Online session has expired or is invalid. To continue, refresh the page.",InvalidOperationInCellEditMode:"Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",InvalidSheetName:"The request cannot be processed because the specified worksheet cannot be found. Please try again.",CustomFunctionDefintionMissing:"A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.",CustomFunctionDefintionMissingOnWindow:"A property with the name '{0}' that represents the function's definition must exist on the window object.",CustomFunctionImplementationMissing:"The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",CustomFunctionNameContainsBadChars:"The function name may only contain letters, digits, underscores, and periods.",CustomFunctionNameCannotSplit:"The function name must contain a non-empty namespace and a non-empty short name.",CustomFunctionUnexpectedNumberOfEntriesInResultBatch:"The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",CustomFunctionCancellationHandlerMissing:"The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",CustomFunctionInvalidFunction:"The property with the name '{0}' that represents the function's definition is not a valid function.",CustomFunctionInvalidFunctionMapping:"The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.",CustomFunctionWindowMissing:"The window object was not found.",PendingBatchInProgress:"There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",NotInsideBatch:"Operations may not be invoked outside of a batch method.",CannotUpdateReadOnlyProperty:"The property '{0}' is read-only and it cannot be updated.",ObjectIsUntracked:"The object is untracked."});var G=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.fixObjectPathIfNecessary=function(e,t){e&&e._objectPath&&t&&e._objectPath.updateUsingObjectData(t,e)},n.load=function(e,t){return e.context.load(e,t),e},n.loadAndSync=function(e,t){return e.context.load(e,t),e.context.sync().then((function(){return e}))},n.retrieve=function(t,o){var r=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;r||(r=!n.isSetSupported("RichApiRuntime","1.1"));var i=new F(t,r);return t._retrieve(o,i),i},n.retrieveAndSync=function(e,t){var o=n.retrieve(e,t);return e.context.sync().then((function(){return o}))},n.toJson=function(e,t,o,r){var i={};for(var a in t){void 0!==(s=t[a])&&(i[a]=s)}for(var a in o){var s;void 0!==(s=o[a])&&(s[n.fieldName_isCollection]&&void 0!==s[n.fieldName_m__items]?i[a]=s.toJSON().items:i[a]=s.toJSON())}return r&&(i.items=r.map((function(e){return e.toJSON()}))),i},n.throwError=function(e,t,n){throw new o.RuntimeError({code:e,httpStatusCode:400,message:c._getResourceString(e,t),debugInfo:n?{errorLocation:n}:void 0})},n.createRuntimeError=function(e,t,n,r,i){return new o.RuntimeError({code:e,httpStatusCode:r,message:t,debugInfo:{errorLocation:n},data:i})},n.throwIfNotLoaded=function(e,t,o,r){if(!r&&c.isUndefined(t)&&e.charCodeAt(0)!=n.s_underscoreCharCode&&!n.s_suppressPropertyNotLoadedException)throw n.createPropertyNotLoadedException(o,e)},n._getPropertyValueWithoutCheckLoaded=function(e,t){n.s_suppressPropertyNotLoadedException=!0;try{return e[t]}finally{n.s_suppressPropertyNotLoadedException=!1}},n.createPropertyNotLoadedException=function(e,t){return new o.RuntimeError({code:A.propertyNotLoaded,httpStatusCode:400,message:c._getResourceString(q.propertyNotLoaded,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.createCannotUpdateReadOnlyPropertyException=function(e,t){return new o.RuntimeError({code:A.cannotUpdateReadOnlyProperty,httpStatusCode:400,message:c._getResourceString(q.cannotUpdateReadOnlyProperty,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.promisify=function(t){return new e.Promise((function(e,n){t((function(t){"failed"==t.status?n(t.error):e(t.value)}))}))},n._addActionResultHandler=function(e,t,n){e.context._pendingRequest.addActionResultHandler(t,n)},n._handleNavigationPropertyResults=function(e,t,n){for(var o=0;o0;)e.push(0),n--},t.prototype.getString=function(e){return"number"==typeof e?e>0?this.m_strings[e-1]:null:e},t.prototype.buildEnumType=function(e){var t;if(Array.isArray(e)){(t={name:e[0],fields:e[2]}).fields||(t.fields={});var n=e[1];if(Array.isArray(n))for(var o=0;on)return!1;return!0},t.prototype.evaluateEventType=function(t){if(G.isNullOrEmptyString(t))return 0;if(this.isAllDigits(t))return parseInt(t);var n=this.resolveObjectByFullName(t);if("number"!=typeof n)throw new e.Error("Invalid event type: "+t);return n},t.prototype.buildPrototype=function(e,t){this.buildScalarProperties(e,t),this.buildNavigationProperties(e,t),this.buildScalarMethods(e,t),this.buildNavigationMethods(e,t),this.buildEvents(e,t),this.buildHandleResult(e,t),this.buildHandleIdResult(e,t),this.buildHandleRetrieveResult(e,t),this.buildLoad(e,t),this.buildRetrieve(e,t),this.buildSetMockData(e,t),this.buildEnsureUnchanged(e,t),this.buildUpdate(e,t),this.buildSet(e,t),this.buildToJSON(e,t),this.buildItems(e,t),this.buildTypeMetadataInfo(e,t),this.buildTrackUntrack(e,t),this.buildMixin(e,t)},t.prototype.toSimpleCamelUpperCase=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)},t.prototype.ensureOriginalName=function(e){null===e.originalName&&(e.originalName=this.toSimpleCamelUpperCase(e.name))},t.prototype.getFieldName=function(e){return"m_"+e.name},t.prototype.throwIfApiNotSupported=function(e,t){if(this.m_apiSets&&t.apiSetInfoOrdinal>0){var n=this.m_apiSets[t.apiSetInfoOrdinal-1];n&&G.throwIfApiNotSupported(e.name+"."+t.name,n.name,n.version,this.m_hostName)}},t.prototype.buildScalarProperties=function(e,t){if(Array.isArray(t.scalarProperties))for(var n=0;n0){var n=this.m_apiSets[t-1];n&&(e=O.calculateApiFlags(e,n.name,n.version))}return e},t.prototype.buildScalarProperty=function(e,n,o){this.ensureOriginalName(o);var r=this,i=this.getFieldName(o),a={get:function(){return G.throwIfNotLoaded(o.name,this[i],n.name,this._isNull),r.throwIfApiNotSupported(n,o),this[i]},enumerable:!0,configurable:!0};0==(2&o.behaviorFlags)&&(a.set=function(e){if(4&o.behaviorFlags&&r.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+o.originalName+"_Set").call(this,this,e).handled)return;this[i]=e;var a=r.calculateApiFlags(o.setMethodApiFlags,o.undoableApiSetInfoOrdinal);z.invokeSetProperty(this,o.originalName,e,a)}),Object.defineProperty(e.prototype,o.name,a)},t.prototype.buildNavigationProperties=function(e,t){if(Array.isArray(t.navigationProperties))for(var n=0;n0){for(var i=0;i0){for(var i=0;i0&&(Object.defineProperty(e.prototype,"_scalarPropertyNames",{get:function(){return this.m__scalarPropertyNames||(this.m__scalarPropertyNames=t.scalarProperties.map((function(e){return e.name}))),this.m__scalarPropertyNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyOriginalNames",{get:function(){return this.m__scalarPropertyOriginalNames||(this.m__scalarPropertyOriginalNames=t.scalarProperties.map((function(e){return e.originalName}))),this.m__scalarPropertyOriginalNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyUpdateable",{get:function(){return this.m__scalarPropertyUpdateable||(this.m__scalarPropertyUpdateable=t.scalarProperties.map((function(e){return 0==(2&e.behaviorFlags)}))),this.m__scalarPropertyUpdateable},enumerable:!0,configurable:!0})),t.navigationProperties&&t.navigationProperties.length>0&&Object.defineProperty(e.prototype,"_navigationPropertyNames",{get:function(){return this.m__navigationPropertyNames||(this.m__navigationPropertyNames=t.navigationProperties.map((function(e){return e.name}))),this.m__navigationPropertyNames},enumerable:!0,configurable:!0})},t.prototype.buildTrackUntrack=function(e,t){2&t.behaviorFlags&&(e.prototype.track=function(){return this.context.trackedObjects.add(this),this},e.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this})},t.prototype.buildMixin=function(e,t){if(4&t.behaviorFlags){var n=this.getFunction(t.name+"Custom");G.applyMixin(e,n)}},t.prototype.getOnEventName=function(e){return"_"===e[0]?"_on"+e.substr(1):"on"+e},t.prototype.buildEvents=function(e,t){if(t.events)for(var n=0;n9007199254740991)throw new Error("Invalid integer "+JSON.stringify(e))}t.validateTelemetryEvent=function(e){if(!function(e){var t=98;if(!e||e.length>t)return!1;var o=e.split("."),r=o[o.length-1];return function(e){return!!e&&e.length>=3&&"Office"===e[0]}(o)&&(i=r,void 0!==i&&n.test(i));var i}(e.eventName))throw new Error("Invalid eventName");if(e.eventContract&&!r(e.eventContract.name))throw new Error("Invalid eventContract");if(null!=e.dataFields)for(var t=0;t=0;--s){var c=Object.create(Object.prototype);c[r[s]]=l,l=c}a(l)}},n.setTenantTokens=a,n.getTenantTokens=function(e){var t=s(e),n=l(e);if(!n||!t)throw new Error("Could not find tenant token for "+e);return{ariaTenantToken:t,nexusTenantToken:n}},n.getAriaTenantToken=s,n.getNexusTenantToken=l,n.clear=function(){o={},r={},i={}}}(e.TenantTokenManager||(e.TenantTokenManager={}))}(oteljs||(oteljs={})),function(e){e.oteljsVersion="3.1.64"}(oteljs||(oteljs={})),function(e){!function(t){!function(t){!function(t){!function(t){t.getFields=function(t,n){var o=[];return void 0!==n.id&&o.push(e.makeStringDataField(t+".Id",n.id)),void 0!==n.version&&o.push(e.makeStringDataField(t+".Version",n.version)),void 0!==n.instanceId&&o.push(e.makeStringDataField(t+".InstanceId",n.instanceId)),void 0!==n.name&&o.push(e.makeStringDataField(t+".Name",n.name)),void 0!==n.marketplaceType&&o.push(e.makeStringDataField(t+".MarketplaceType",n.marketplaceType)),void 0!==n.sessionId&&o.push(e.makeStringDataField(t+".SessionId",n.sessionId)),void 0!==n.browserToken&&o.push(e.makeStringDataField(t+".BrowserToken",n.browserToken)),void 0!==n.osfRuntimeVersion&&o.push(e.makeStringDataField(t+".OsfRuntimeVersion",n.osfRuntimeVersion)),void 0!==n.officeJsVersion&&o.push(e.makeStringDataField(t+".OfficeJsVersion",n.officeJsVersion)),void 0!==n.hostJsVersion&&o.push(e.makeStringDataField(t+".HostJsVersion",n.hostJsVersion)),void 0!==n.assetId&&o.push(e.makeStringDataField(t+".AssetId",n.assetId)),void 0!==n.providerName&&o.push(e.makeStringDataField(t+".ProviderName",n.providerName)),void 0!==n.type&&o.push(e.makeStringDataField(t+".Type",n.type)),e.addContractField(o,t,"Office.System.SDX"),o}}(t.SDX||(t.SDX={}))}(t.System||(t.System={}))}(t.Office||(t.Office={}))}(e.Contracts||(e.Contracts={}))}(oteljs||(oteljs={}));var OfficeFirstPartyDialog,OfficeFirstPartyAuth,OfficeCore,OfficeFirstParty;__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),__awaiter=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){e.done?r(e.value):new n((function(t){t(e.value)})).then(a,s)}l((o=o.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=2){var a=t[n].message[1];a&&(o=s(a)?JSON.parse(a):a)}void 0!==OSF&&OSF.AppTelemetry&&OSF.AppTelemetry.CallOnAppActivatedIfPending&&OSF.AppTelemetry.CallOnAppActivatedIfPending(),r.apply(null,[o])}else OfficeExtension.Utility.log("ActionProxy._handleMessage unknown message type "+t[n].messageType)}catch(e){throw function(e){var t=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t}(e);OfficeExtension.Utility.log(t)}(e),e}return OfficeExtension.Utility._createPromiseFromResult(null)}function s(e){return"string"==typeof e&&"{"===e[0]}function l(){try{Microsoft.Office.WebExtension.onReadyInternal().then((function(){return function(){if(void 0!==OSF&&OSF.DDA&&OSF.DDA.RichApi&&OSF.DDA.RichApi.richApiMessageManager)return(new OfficeExtension.ClientRequestContext).eventRegistration.register(5,"",a)}()})).then((function(){var e,t,n=OSF._OfficeAppFactory.getHostInfo();return!0===n.isDialog||"web"===n.hostPlatform&&"word"!==n.hostType&&"excel"!==n.hostType?void 0:(e=new OfficeExtension.ClientRequestContext,t=OfficeCore.AddinInternalService.newObject(e),e._customData="WacPartition",t.notifyActionHandlerReady(),e.sync())}))}catch(e){}}OfficeExtension.Utility.log("ActionProxy.initOnce"),void 0!==e.actions&&(o=e.actions._association,n=o),"undefined"!=typeof document&&(document.readyState&&"loading"!==document.readyState?(OfficeExtension.Utility.log("ActionProxy.initOnce: document.readyState is not loading state"),l()):document.addEventListener&&document.addEventListener("DOMContentLoaded",(function(){OfficeExtension.Utility.log("ActionProxy.initOnce: DOMContentLoaded event triggered"),l()}))),OfficeExtension.HostBridge.onInited((function(e){!function(e){e.addHostMessageHandler((function(e){3===e.type&&a(e.message)}))}(e)}))}(t||(t={}))}(Office||(Office={})),function(e){!function(e){function t(){var e=new OfficeCore.RequestContext;return"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e._customData="WacPartition"),e}e.areShortcutsInUse=function(e){return __awaiter(this,void 0,void 0,(function(){var n,o,r,i,a;return __generator(this,(function(s){switch(s.label){case 0:return n=t(),o=OfficeCore.ActionService.newObject(n),r=o.areShortcutsInUse(e),[4,n.sync()];case 1:for(s.sent(),i=[],a=0;a=this._requiredCount;r--){var i=t[r];switch(typeof i){case"object":n=i;break;case"function":o=i}}return n=n||{},o&&(n[e.ParameterNames.Callback]=o),n},t.prototype.extractOptions=function(t,n,o,r){if(t.length>this._requiredCount+2)throw e.Utility.createParameterException(Strings.OfficeOM.L_TooManyArguments);for(var i,a,s=t.length-1;s>=this._requiredCount;s--){var l=t[s];switch(typeof l){case"object":if(i)throw e.Utility.createParameterException(Strings.OfficeOM.L_TooManyOptionalObjects);i=l;break;case"function":if(a)throw e.Utility.createParameterException(Strings.OfficeOM.L_TooManyOptionalFunction);a=l;break;default:throw e.Utility.createArgumentException(Strings.OfficeOM.L_InValidOptionalArgument)}}if(i=this._apiMethods.fillOptions(i,n,o,r),a){if(i[e.ParameterNames.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;i[e.ParameterNames.Callback]=a}return this._apiMethods.verifyArguments(this._supportedOptions,i),i},t}();e.AsyncMethodCall=t}(OSF||(OSF={})),function(e){!function(t){var n={};t.define=function(t){var o,r,i;n[t.method]=(r=(o=t).supportedOptions?e.OUtil.createObject(o.supportedOptions):[],i=o.privateStateCallbacks?e.OUtil.createObject(o.privateStateCallbacks):[],new e.AsyncMethodCall(o.requiredArguments||[],r,i,o.onSucceeded,o.onFailed,o.checkCallArgs,o.method))},t.get=function(e){return n[e]}}(e.AsyncMethodCalls||(e.AsyncMethodCalls={}))}(OSF||(OSF={})),function(e){e.AsyncMethods={AddColumnsAsync:"addColumnsAsync",AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",AddFromPromptAsync:"addFromPromptAsync",AddHandlerAsync:"addHandlerAsync",AddRowsAsync:"addRowsAsync",BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged",ClearFormatsAsync:"clearFormatsAsync",CloseAsync:"close",CloseContainerAsync:"closeContainer",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync",DisplayDialogAsync:"displayDialogAsync",ExecuteFeature:"executeFeature",ExecuteRichApiRequestAsync:"executeRichApiRequestAsync",GetAllAsync:"getAllAsync",GetAccessTokenAsync:"getAccessTokenAsync",GetByIdAsync:"getByIdAsync",GetDataAsync:"getDataAsync",GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",GetFilePropertiesAsync:"getFilePropertiesAsync",GetSelectedDataAsync:"getSelectedDataAsync",GoToByIdAsync:"goToByIdAsync",OpenBrowserWindow:"openBrowserWindow",QueryFeature:"queryFeature",ReleaseByIdAsync:"releaseByIdAsync",RemoveHandlerAsync:"removeHandlerAsync",ReleaseDocumentCopyAsync:"closeAsync",SetDataAsync:"setDataAsync",SetFormatsAsync:"setFormatsAsync",SetSelectedDataAsync:"setSelectedDataAsync",SetTableOptionsAsync:"setTableOptionsAsync",GetOfficeThemeAsync:"getOfficeThemeAsync",GetDocumentThemeAsync:"getDocumentThemeAsync"}}(OSF||(OSF={})),function(e){!function(e){e.Subset="subset",e.BindingProperties="BindingProperties"}(e.PropertyDescriptors||(e.PropertyDescriptors={}));var t=function(){function t(e,t){this.m_bindingInstance=e,this.m_subset=t}return Object.defineProperty(t.prototype,"startRow",{get:function(){return this.m_subset.startRow},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"startColumn",{get:function(){return this.m_subset.startColumn},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowCount",{get:function(){return this.m_subset.rowCount},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnCount",{get:function(){return this.m_subset.columnCount},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return e.EventType.BindingSelectionChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"binding",{get:function(){return this.m_bindingInstance},enumerable:!0,configurable:!0}),t}();e.BindingSelectionChangedEventArgs=t;var n=function(){function t(e){this.m_bindingInstance=e}return Object.defineProperty(t.prototype,"type",{get:function(){return e.EventType.BindingDataChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"binding",{get:function(){return this.m_bindingInstance},enumerable:!0,configurable:!0}),t}();e.BindingDataChangedEventArgs=n}(OSF||(OSF={})),function(e){!function(e){e.DataPartProperties="DataPartProperties",e.DataNodeProperties="DataNodeProperties"}(e.PropertyDescriptors||(e.PropertyDescriptors={})),function(e){!function(e){!function(e){e.OldNode="OldNode",e.NewNode="NewNode",e.NextSiblingNode="NextSiblingNode",e.InUndoRedo="InUndoRedo"}(e.DataNodeEventProperties||(e.DataNodeEventProperties={}))}(e.Customxml||(e.Customxml={}))}(e.Marshaling||(e.Marshaling={})),function(e){e.DataNodeInsertedEvent="DataNodeInsertedEvent",e.DataNodeReplacedEvent="DataNodeReplacedEvent",e.DataNodeDeletedEvent="DataNodeDeletedEvent"}(e.EventDescriptors||(e.EventDescriptors={})),function(e){e.OldNode="OldNode",e.NewNode="NewNode",e.NextSiblingNode="NextSiblingNode",e.InUndoRedo="InUndoRedo"}(e.DataNodeEventProperties||(e.DataNodeEventProperties={}));var t=function(){function t(e,t){this.m_newNode=e,this.m_inUndoRedo=t}return Object.defineProperty(t.prototype,"type",{get:function(){return e.EventType.DataNodeInserted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"newNode",{get:function(){return this.m_newNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inUndoRedo",{get:function(){return this.m_inUndoRedo},enumerable:!0,configurable:!0}),t}();e.NodeInsertedEventArgs=t;var n=function(){function t(e,t,n){this.m_oldNode=e,this.m_newNode=t,this.m_inUndoRedo=n}return Object.defineProperty(t.prototype,"type",{get:function(){return e.EventType.DataNodeReplaced},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"oldNode",{get:function(){return this.m_oldNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"newNode",{get:function(){return this.m_newNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inUndoRedo",{get:function(){return this.m_inUndoRedo},enumerable:!0,configurable:!0}),t}();e.NodeReplacedEventArgs=n;var o=function(){function t(e,t,n){this.m_oldNode=e,this.m_oldNextSibling=t,this.m_inUndoRedo=n}return Object.defineProperty(t.prototype,"type",{get:function(){return e.EventType.DataNodeDeleted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"oldNode",{get:function(){return this.m_oldNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"oldNextSibling",{get:function(){return this.m_oldNextSibling},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inUndoRedo",{get:function(){return this.m_inUndoRedo},enumerable:!0,configurable:!0}),t}();e.NodeDeletedEventArgs=o}(OSF||(OSF={})),function(e){var t=function(t){0==t[e.PropertyDescriptors.MessageType]?e.OUtil.defineEnumerableProperties(this,{type:{value:e.EventType.DialogMessageReceived},message:{value:t[e.PropertyDescriptors.MessageContent]},origin:{value:t[e.PropertyDescriptors.MessageOrigin]}}):e.OUtil.defineEnumerableProperties(this,{type:{value:e.EventType.DialogEventReceived},error:{value:t[e.PropertyDescriptors.MessageType]}})};e.DialogEventArgs=t,function(e){e.MessageType="messageType",e.MessageContent="messageContent",e.MessageOrigin="messageOrigin"}(e.PropertyDescriptors||(e.PropertyDescriptors={}))}(OSF||(OSF={})),function(e){var t=function(){function t(e){this.m_docInstance=e}return Object.defineProperty(t.prototype,"type",{get:function(){return e.EventType.DocumentSelectionChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return this.m_docInstance},enumerable:!0,configurable:!0}),t}();e.DocumentSelectionChangedEventArgs=t}(OSF||(OSF={})),function(e){var t=function(t){e.OUtil.defineEnumerableProperties(this,{type:{value:e.EventType.DialogParentMessageReceived},message:{value:t[e.PropertyDescriptors.MessageContent]},origin:{value:t[e.PropertyDescriptors.MessageOrigin]}})};e.DialogParentEventArgs=t}(OSF||(OSF={})),function(e){e.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1},function(t){var n;function o(t){return t==e.EventDispId.dispidObjectDeletedEvent||t==e.EventDispId.dispidObjectSelectionChangedEvent||t==e.EventDispId.dispidObjectDataChangedEvent||t==e.EventDispId.dispidContentControlAddedEvent}function r(t,n,o,r){if("number"!=typeof t)throw t;r||(r=n.getCallArgs(o)),s(r,t,e.DDA.ErrorCodeManager.getErrorArgs(t))}function i(t){return(e._OfficeAppFactory.getHostInfo().hostPlatform==e.HostInfoPlatform.web?e.WACDelegate:e.SafeArrayDelegate)[t]}function a(){return n||function(){n={};var t={GoToByIdAsync:82,GetSelectedDataAsync:64,SetSelectedDataAsync:65,GetDocumentCopyChunkAsync:80,ReleaseDocumentCopyAsync:81,GetDocumentCopyAsync:77,AddFromSelectionAsync:66,AddFromPromptAsync:67,AddFromNamedItemAsync:78,GetAllAsync:74,GetByIdAsync:68,ReleaseByIdAsync:69,GetDataAsync:70,SetDataAsync:71,AddRowsAsync:72,AddColumnsAsync:79,DeleteAllDataValuesAsync:73,RefreshAsync:75,SaveAsync:76,GetActiveViewAsync:83,GetFilePropertiesAsync:86,GetOfficeThemeAsync:85,GetDocumentThemeAsync:84,ClearFormatsAsync:87,SetTableOptionsAsync:88,SetFormatsAsync:89,GetUserIdentityInfoAsync:92,GetAccessTokenAsync:98,GetAuthContextAsync:99,ExecuteRichApiRequestAsync:93,AppCommandInvocationCompletedAsync:94,CloseContainerAsync:97,OpenBrowserWindow:102,CreateDocumentAsync:105,InsertFormAsync:106,ExecuteFeature:146,QueryFeature:147,AddDataPartAsync:128,GetDataPartByIdAsync:129,GetDataPartsByNameSpaceAsync:130,GetPartXmlAsync:131,GetPartNodesAsync:132,DeleteDataPartAsync:133,GetNodeValueAsync:134,GetNodeXmlAsync:135,GetRelativeNodesAsync:136,SetNodeValueAsync:137,SetNodeXmlAsync:138,AddDataPartNamespaceAsync:139,GetDataPartNamespaceAsync:140,GetDataPartPrefixAsync:141,GetNodeTextAsync:142,SetNodeTextAsync:143,GetSelectedTask:110,GetTask:112,GetWSSUrl:114,GetTaskField:115,GetSelectedResource:111,GetResourceField:113,GetProjectField:116,GetSelectedView:117,GetTaskByIndex:118,GetResourceByIndex:119,SetTaskField:120,SetResourceField:121,GetMaxTaskIndex:122,GetMaxResourceIndex:123,CreateTask:124};for(var o in t)e.AsyncMethods[o]&&(n[e.AsyncMethods[o]]=t[o]);var r={MessageParent:144,SendMessage:145};for(var o in r)e.SyncMethods[o]&&(n[e.SyncMethods[o]]=r[o]);var i={SettingsChanged:e.EventDispId.dispidSettingsChangedEvent,DocumentSelectionChanged:e.EventDispId.dispidDocumentSelectionChangedEvent,BindingSelectionChanged:e.EventDispId.dispidBindingSelectionChangedEvent,BindingDataChanged:e.EventDispId.dispidBindingDataChangedEvent,ActiveViewChanged:e.EventDispId.dispidActiveViewChangedEvent,OfficeThemeChanged:e.EventDispId.dispidOfficeThemeChangedEvent,DocumentThemeChanged:e.EventDispId.dispidDocumentThemeChangedEvent,AppCommandInvoked:e.EventDispId.dispidAppCommandInvokedEvent,DialogMessageReceived:e.EventDispId.dispidDialogMessageReceivedEvent,DialogParentMessageReceived:e.EventDispId.dispidDialogParentMessageReceivedEvent,ObjectDeleted:e.EventDispId.dispidObjectDeletedEvent,ObjectSelectionChanged:e.EventDispId.dispidObjectSelectionChangedEvent,ObjectDataChanged:e.EventDispId.dispidObjectDataChangedEvent,ContentControlAdded:e.EventDispId.dispidContentControlAddedEvent,LiveShareStateChanged:e.EventDispId.dispidLiveShareStateChangedEvent,RichApiMessage:e.EventDispId.dispidRichApiMessageEvent,DataNodeInserted:e.EventDispId.dispidDataNodeAddedEvent,DataNodeReplaced:e.EventDispId.dispidDataNodeReplacedEvent,DataNodeDeleted:e.EventDispId.dispidDataNodeDeletedEvent};for(var a in i)e.EventType[a]&&(n[e.EventType[a]]=i[a])}(),n}function s(t,n,o){var r=t[e.ParameterNames.Callback];if(r){var i,a={};a[e.DDA.AsyncResultEnum.Properties.Context]=t[e.ParameterNames.AsyncContext],0==n?a[e.DDA.AsyncResultEnum.Properties.Value]=o:(i={},o=o||e.DDA.ErrorCodeManager.getErrorArgs(5001),i[e.DDA.AsyncResultEnum.ErrorProperties.Code]=n||5001,i[e.DDA.AsyncResultEnum.ErrorProperties.Name]=o.name||o,i[e.DDA.AsyncResultEnum.ErrorProperties.Message]=o.message||o),r(new e.DDA.AsyncResult(a,i))}}t.InvokeMethod=function(t,n,o,l){var c;try{var u=e.AsyncMethodCalls.get(t);c=u.verifyAndExtractCall(n,o,l);var d=a()[t],f=i("executeAsync"),p=null;if(window.Excel&&window.Office.context.requirements.isSetSupported("RedirectV1Api")&&(window.Excel._RedirectV1APIs=!0),window.Excel&&window.Excel._RedirectV1APIs&&(p=window.Excel._V1APIMap[t])){var h=e.OUtil.shallowCopy(c);delete h[e.ParameterNames.AsyncContext],p.preprocess&&(h=p.preprocess(h));var g=new window.Excel.RequestContext,m=p.call(g,h);g.sync().then((function(){var t=m.value,n=t.status;delete t.status,delete t["@odata.type"],p.postprocess&&(t=p.postprocess(t,h)),0!=n&&(t=e.DDA.ErrorCodeManager.getErrorArgs(n)),s(c,n,t)})).catch((function(e){s(c,13991,null)}))}else{var y;y=e.HostParameterMap.toHost(d,c);var v=(new Date).getTime();f({dispId:d,hostCallArgs:y,onCalling:function(){},onReceiving:function(){},onComplete:function(t,n){var r;r=0==t?e.HostParameterMap.fromHost(d,n):n;var i=u.processResponse(t,r,o,c);s(c,t,i),e.AppTelemetry&&e.AppTelemetry.onMethodDone(d,y,Math.abs((new Date).getTime()-v),t)}})}}catch(e){r(e,u,n,c)}},t.AddEventHandler=function(t,n,l,c){var u,d,f,p=!1;function h(t){var o;0==t&&((p?n.addObjectEventHandler(d,u[e.ParameterNames.Id],f):n.addEventHandler(d,f))||(t=13991));0!=t&&(o=e.DDA.ErrorCodeManager.getErrorArgs(t)),s(u,t,o)}try{var g=e.AsyncMethodCalls.get(e.AsyncMethods.AddHandlerAsync);if(u=g.verifyAndExtractCall(t,l,n),d=u[e.ParameterNames.EventType],f=u[e.ParameterNames.Handler],c)return void h(0);var m=a()[d],y=(p=o(m))?u[e.ParameterNames.Id]:l.id||"";if(0==(p?n.getObjectEventHandlerCount(d,y):n.getEventHandlerCount(d)))i("registerEventAsync")({eventType:d,dispId:m,targetId:y,onCalling:function(){},onReceiving:function(){},onComplete:h,onEvent:function(t){var o=e.HostParameterMap.fromHost(m,t);p?n.fireObjectEvent(y,e.manufactureEventArgs(d,y,o)):n.fireEvent(e.manufactureEventArgs(d,l,o))}});else h(0)}catch(e){r(e,g,t,u)}},t.RemoveEventHandler=function(t,n,l){var c,u,d,f=!1;function p(t){var n;0!=t&&(n=e.DDA.ErrorCodeManager.getErrorArgs(t)),s(c,t,n)}try{var h=e.AsyncMethodCalls.get(e.AsyncMethods.RemoveHandlerAsync);u=(c=h.verifyAndExtractCall(t,l,n))[e.ParameterNames.EventType],d=c[e.ParameterNames.Handler];var g,m,y=a()[u],v=(f=o(y))?c[e.ParameterNames.Id]:l.id||"";null===d?(m=f?n.clearObjectEventHandlers(u,v):n.clearEventHandlers(u),g=0):g=(m=f?n.removeObjectEventHandler(u,v,d):n.removeEventHandler(u,d))?0:5003;var b=f?n.getObjectEventHandlerCount(u,v):n.getEventHandlerCount(u);if(m&&0==b)i("unregisterEventAsync")({eventType:u,dispId:y,targetId:v,onCalling:function(){},onReceiving:function(){},onComplete:p});else p(g)}catch(e){r(e,h,t,c)}},t.OpenDialog=function(t,n,o){var l,c,u=e.EventType.DialogMessageReceived,d=e.EventType.DialogEventReceived;function f(t){if(0!=t)i=e.DDA.ErrorCodeManager.getErrorArgs(t);else{var r={};r.id=c,r.data=n;var i=p.processResponse(t,r,o,l);e.DialogShownStatus.hasDialogShown=!0,n.clearEventHandlers(u),n.clearEventHandlers(d)}s(l,t,i)}try{if(null!=u&&null!=d||f(5e3),null==e.AsyncMethods.DisplayDialogAsync)return void f(5001);var p=e.AsyncMethodCalls.get(e.AsyncMethods.DisplayDialogAsync);l=p.verifyAndExtractCall(t,o,n);var h=a()[u],g=i("openDialog");c=JSON.stringify(l),e.DialogShownStatus.hasDialogShown||(n.clearQueuedEvent(u),n.clearQueuedEvent(d),n.clearQueuedEvent(e.EventType.DialogParentMessageReceived)),g({eventType:u,dispId:h,targetId:c,onCalling:function(){},onReceiving:function(){},onComplete:f,onEvent:function(t){var r=e.HostParameterMap.fromHost(h,t),i=e.manufactureEventArgs(u,o,r);if(i.type==d){e.DDA.ErrorCodeManager.getErrorArgs(i.error);var a={};a.code=status||5001,i.error=new e.DDA.Error(a[e.DDA.AsyncResultEnum.ErrorProperties.Name],a[e.DDA.AsyncResultEnum.ErrorProperties.Message],a[e.DDA.AsyncResultEnum.ErrorProperties.Code])}n.fireOrQueueEvent(i),12006==r.messageType&&(n.clearEventHandlers(u),n.clearEventHandlers(d),n.clearEventHandlers(e.EventType.DialogParentMessageReceived),e.DialogShownStatus.hasDialogShown=!1)}})}catch(e){r(e,p,t,l)}},t.CloseDialog=function(t,n,o,s){var l,c,u;try{var d=e.AsyncMethodCalls.get(e.AsyncMethods.CloseAsync);l=d.verifyAndExtractCall(t,s,o),c=e.EventType.DialogMessageReceived,u=e.EventType.DialogEventReceived,o.clearEventHandlers(c),o.clearEventHandlers(u);var f=a()[c];i("closeDialog")({eventType:c,dispId:f,targetId:n,onCalling:function(){},onReceiving:function(){},onComplete:function(t){t,e.DialogShownStatus.hasDialogShown=!1}})}catch(e){r(e,d,t,l)}},t.MessageParent=function(t,n){var o=e.SyncMethodCalls.get(e.SyncMethods.MessageParent).verifyAndExtractCall(t,n,{});return i("messageParent")({dispId:a()[e.SyncMethods.MessageParent],hostCallArgs:o,onCalling:function(){},onReceiving:function(){}})},t.SendMessage=function(t,n,o){var r=e.SyncMethodCalls.get(e.SyncMethods.SendMessage).verifyAndExtractCall(t,o,{});return i("sendMessage")({dispId:a()[e.SyncMethods.SendMessage],hostCallArgs:r,onCalling:function(){},onReceiving:function(){}})},t.addAsyncMethods=function(t,n,o){for(var r in n){var i=n[r];t[i]||e.OUtil.defineEnumerableProperty(t,i,{value:function(n){return function(){var r=e.DispIdHost.InvokeMethod;r(n,arguments,t,o)}}(i)})}},t.addEventSupport=function(t,n,o){var r=e.AsyncMethods.AddHandlerAsync,i=e.AsyncMethods.RemoveHandlerAsync;t[r]||e.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=e.DispIdHost.AddEventHandler;r(arguments,n,t,o)}}),t[i]||e.OUtil.defineEnumerableProperty(t,i,{value:function(){var o=e.DispIdHost.RemoveEventHandler;o(arguments,n,t)}})},t.issueAsyncResult=s}(e.DispIdHost||(e.DispIdHost={}))}(OSF||(OSF={})),function(e){e.manufactureEventArgs=function(t,n,o){var r;switch(t){case e.EventType.DocumentSelectionChanged:r=new e.DocumentSelectionChangedEventArgs(n);break;case e.EventType.BindingSelectionChanged:r=new e.BindingSelectionChangedEventArgs(e.manufactureBinding(o,n.document),o[e.PropertyDescriptors.Subset]);break;case e.EventType.BindingDataChanged:r=new e.BindingDataChangedEventArgs(e.manufactureBinding(o,n.document));break;case e.EventType.SettingsChanged:r=new e.SettingsChangedEventArgs(n);break;case e.EventType.ActiveViewChanged:r=new e.ActiveViewChangedEventArgs(o);break;case e.EventType.LiveShareStateChanged:r=new e.LiveShareStateChangedEventArgs(o);break;case e.EventType.OfficeThemeChanged:r=new e.DDA.Theming.OfficeThemeChangedEventArgs(o);break;case e.EventType.DocumentThemeChanged:r=new e.DDA.Theming.DocumentThemeChangedEventArgs(o);break;case e.EventType.DataNodeInserted:r=new e.NodeInsertedEventArgs(e.manufactureDataNode(o[e.DataNodeEventProperties.NewNode]),o[e.DataNodeEventProperties.InUndoRedo]);break;case e.EventType.DataNodeReplaced:r=new e.NodeReplacedEventArgs(e.manufactureDataNode(o[e.DataNodeEventProperties.OldNode]),e.manufactureDataNode(o[e.DataNodeEventProperties.NewNode]),o[e.DataNodeEventProperties.InUndoRedo]);break;case e.EventType.DataNodeDeleted:r=new e.NodeDeletedEventArgs(e.manufactureDataNode(o[e.DataNodeEventProperties.OldNode]),e.manufactureDataNode(o[e.DataNodeEventProperties.NextSiblingNode]),o[e.DataNodeEventProperties.InUndoRedo]);break;case e.EventType.DialogMessageReceived:r=new e.DialogEventArgs(o);break;case e.EventType.DialogParentMessageReceived:r=new e.DialogParentEventArgs(o)}return r}}(OSF||(OSF={})),function(e){var t="toHost",n="fromHost";!function(o){var r;o.self="self",o.dynamicTypes={},o.dynamicTypes[e.ParameterNames.Data]={toHost:function(t){if(null!=t&&void 0!==t.rows){var n={};n[e.TableDataProperties.TableRows]=t.rows,n[e.TableDataProperties.TableHeaders]=t.headers,t=n}return t},fromHost:function(e){return e}},o.dynamicTypes.sampleData=o.dynamicTypes.data;var i={};function a(e,t){var n,r;if(t.map)for(var a in r={},n=t.map){var s=n[a];s==o.self&&(s=a),r[s]=a}else n=t.toHost,r=t.fromHost;var l=i[e];if(l){var c=l.toHost;for(var u in c)n[u]=c[u];for(var d in c=l.fromHost)r[d]=c[d]}else l=i[e]={};l.toHost=n,l.fromHost=r}function s(e){u().addComplexType(e)}function l(t,r){var a=t?{}:void 0;for(var s in t){var c,d=t[s];if(e.ListType.isListType(s))for(var f in c=[],d)c.push(l(d[f],r));else if(e.OUtil.listContainsKey(o.dynamicTypes,s))c=o.dynamicTypes[s][r](d);else if(r==n&&u().preserveNesting(s))c=l(d,r);else{var p=i[s];if(p){var h=p[r];h&&void 0===(c=h[d])&&(c=d)}else c=d}a[s]=c}return a}function c(t,n,r){var a,s=i[t][r];if("toHost"==r)a=function e(t,n){var r;for(var a in n){var s;if(null!=(s=u().isComplexType(a)?e(t,i[a].toHost):t[a])){r||(r={});var l=n[a];l==o.self&&(l=a),r[l]=u().pack(a,s)}}return r}(l(n,r),s);else if("fromHost"==r){a=l(function t(n,r,a){for(var s in a||(a={}),r){var l,c,d=r[s];if(d==o.self)l=n;else{if("sourceData"==d){a[s]=n.toArray();continue}l=n[d]}if(null==l)a[s]=void 0;else if(l=u().unpack(s,l),u().isComplexType(s))c=i[s].fromHost,u().preserveNesting(s)?a[s]=t(l,c):t(l,c,a);else if(e.ListType.isListType(s)){(c={})[e.ListType.getDescriptor(s)]=o.self;var f=new Array(l.length);for(var p in l)f[p]=t(l[p],c);a[s]=f}else a[s]=l}return a}(n,s),r)}return a}function u(){if(!r){var t=e._OfficeAppFactory.getHostInfo();r=t.hostPlatform==e.HostInfoPlatform.web?new e.WebSpecialProcessor:new e.SafeArraySpecialProcessor}return r}function d(e){var t=null;if(e){t={};for(var n=e.length,o=0;o-1||e.indexOf("Trident/")>-1||e.indexOf("Edge/")>-1}catch(e){return c("Error happens in isInternetExplorer.",e),!1}}function a(e){if("undefined"!=typeof JSON)try{return JSON.stringify(e)}catch(e){}return""}!function(e){e.ButtonBorderColor="buttonBorderColor",e.ButtonBackgroundColor="buttonBackgroundColor"}(t.HostThemeButtonStyleKeys||(t.HostThemeButtonStyleKeys={})),function(e){e.HostButtonBorderColor="#86bfa0",e.HostButtonBackgroundColor="#d3f0e0"}(n||(n={})),function(e){e.HostButtonBorderColor="#a3bde3",e.HostButtonBackgroundColor="#d5e1f2"}(o||(o={})),function(e){e.HostButtonBorderColor="#f5ba9d",e.HostButtonBackgroundColor="#fcf0ed"}(r||(r={})),t.finalizeProperties=function(e,t){t=t||{};for(var n=Object.getOwnPropertyNames(e),o=n.length,r=0;r-1)return i();return!1}catch(e){return c("Error happens in shouldUseLocalStorageToPassMessage.",e),!1}},t.isInternetExplorer=i,t.serializeObjectToString=a,t.formatString=function(){for(var e=[],t=0;t1?n=i+"&_host_Info="+t:s.length>0&&(n=i+"?_host_Info="+t),a?[n,o,a].join(""):n},t.getHostnamePortionForLogging=function(e){var t=e.split("."),n=t.length;return n>=2?t[n-2]+"."+t[n-1]:1==n?t[0]:void 0},t.shallowCopy=function(e){if(null==e)return null;if(e instanceof Object){if(Array.isArray(e)){for(var t=[],n=0;n2){a=[];for(var s=1;sthis._requiredCount+1)throw e.Utility.createParameterException(Strings.OfficeOM.L_TooManyArguments);for(var i,a=t.length-1;a>=this._requiredCount;a--){var s=t[a];switch(typeof s){case"object":if(i)throw e.Utility.createParameterException(Strings.OfficeOM.L_TooManyArguments);i=s;break;default:throw e.Utility.createArgumentException(Strings.OfficeOM.L_InValidOptionalArgument)}}return i=this._apiMethods.fillOptions(i,n,o,r),this._apiMethods.verifyArguments(this._supportedOptions,i),i},t}();e.SyncMethodCall=t}(OSF||(OSF={})),function(e){!function(t){var n={};t.define=function(t){var o,r;n[t.method]=(r=(o=t).supportedOptions?e.OUtil.createObject(o.supportedOptions):[],new e.SyncMethodCall(o.requiredArguments||[],r,o.privateStateCallbacks,o.checkCallArgs,o.method.displayName))},t.get=function(e){return n[e]}}(e.SyncMethodCalls||(e.SyncMethodCalls={}))}(OSF||(OSF={})),function(e){e.SyncMethods={MessageParent:"messageParent",MessageChild:"messageChild",SendMessage:"sendMessage",AddMessageHandler:"addEventHandler"}}(OSF||(OSF={})),function(e){!function(t){!function(t){function n(t){for(var n=[{name:e.DDA.Theming.DocumentThemeEnum.PrimaryFontColor,needToConvertToHex:!0},{name:e.DDA.Theming.DocumentThemeEnum.PrimaryBackgroundColor,needToConvertToHex:!0},{name:e.DDA.Theming.DocumentThemeEnum.SecondaryFontColor,needToConvertToHex:!0},{name:e.DDA.Theming.DocumentThemeEnum.SecondaryBackgroundColor,needToConvertToHex:!0},{name:e.DDA.Theming.DocumentThemeEnum.Accent1,needToConvertToHex:!0},{name:e.DDA.Theming.DocumentThemeEnum.Accent2,needToConvertToHex:!0},{name:e.DDA.Theming.DocumentThemeEnum.Accent3,needToConvertToHex:!0},{name:e.DDA.Theming.DocumentThemeEnum.Accent4,needToConvertToHex:!0},{name:e.DDA.Theming.DocumentThemeEnum.Accent5,needToConvertToHex:!0},{name:e.DDA.Theming.DocumentThemeEnum.Accent6,needToConvertToHex:!0},{name:e.DDA.Theming.DocumentThemeEnum.Hyperlink,needToConvertToHex:!0},{name:e.DDA.Theming.DocumentThemeEnum.FollowedHyperlink,needToConvertToHex:!0},{name:e.DDA.Theming.DocumentThemeEnum.HeaderLatinFont,needToConvertToHex:!1},{name:e.DDA.Theming.DocumentThemeEnum.HeaderEastAsianFont,needToConvertToHex:!1},{name:e.DDA.Theming.DocumentThemeEnum.HeaderScriptFont,needToConvertToHex:!1},{name:e.DDA.Theming.DocumentThemeEnum.HeaderLocalizedFont,needToConvertToHex:!1},{name:e.DDA.Theming.DocumentThemeEnum.BodyLatinFont,needToConvertToHex:!1},{name:e.DDA.Theming.DocumentThemeEnum.BodyEastAsianFont,needToConvertToHex:!1},{name:e.DDA.Theming.DocumentThemeEnum.BodyScriptFont,needToConvertToHex:!1},{name:e.DDA.Theming.DocumentThemeEnum.BodyLocalizedFont,needToConvertToHex:!1}],o={},r=0;r100&&(t[e.ParameterNames.Width]=99),t[e.ParameterNames.Height]<=0&&(t[e.ParameterNames.Height]=1),!t[e.ParameterNames.UseDeviceIndependentPixels]&&t[e.ParameterNames.Height]>100&&(t[e.ParameterNames.Height]=99),t[e.ParameterNames.RequireHTTPs]||(t[e.ParameterNames.RequireHTTPs]=!0),t}}),e.AsyncMethodCalls.define({method:e.AsyncMethods.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]}),e.SyncMethodCalls.define({method:e.SyncMethods.MessageParent,requiredArguments:[{name:e.ParameterNames.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[{name:e.ParameterNames.TargetOrigin,value:{types:["string"],defaultValue:""}}]}),e.SyncMethodCalls.define({method:e.SyncMethods.AddMessageHandler,requiredArguments:[{name:e.ParameterNames.EventType,enum:e.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:e.ParameterNames.Handler,types:["function"]}],supportedOptions:[]}),e.SyncMethodCalls.define({method:e.SyncMethods.SendMessage,requiredArguments:[{name:e.ParameterNames.MessageContent,types:["string"]}],supportedOptions:[{name:e.ParameterNames.TargetOrigin,value:{types:["string"],defaultValue:""}}],privateStateCallbacks:[]})},defineSafeArrayParameterMapFunc:function(){e.HostParameterMap.define({type:e.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:e.EventDescriptors.DialogMessageReceivedEvent,value:e.HostParameterMap.self}],isComplexType:!0}),e.HostParameterMap.define({type:e.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:e.PropertyDescriptors.MessageType,value:0},{name:e.PropertyDescriptors.MessageContent,value:1},{name:e.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:!0}),e.HostParameterMap.define({type:e.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:e.EventDescriptors.DialogParentMessageReceivedEvent,value:e.HostParameterMap.self}],isComplexType:!0}),e.HostParameterMap.define({type:e.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:e.PropertyDescriptors.MessageType,value:0},{name:e.PropertyDescriptors.MessageContent,value:1},{name:e.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:!0})},defineWebParameterMapFunc:function(){e.HostParameterMap.define({type:e.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:e.EventDescriptors.DialogMessageReceivedEvent,value:e.HostParameterMap.self}]}),e.HostParameterMap.addComplexType(e.EventDescriptors.DialogMessageReceivedEvent),e.HostParameterMap.define({type:e.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:e.PropertyDescriptors.MessageType,value:e.Marshaling.DialogMessageReceivedEventKeys.MessageType},{name:e.PropertyDescriptors.MessageContent,value:e.Marshaling.DialogMessageReceivedEventKeys.MessageContent},{name:e.PropertyDescriptors.MessageOrigin,value:e.Marshaling.DialogMessageReceivedEventKeys.MessageOrigin}]}),e.HostParameterMap.define({type:e.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:e.EventDescriptors.DialogParentMessageReceivedEvent,value:e.HostParameterMap.self}]}),e.HostParameterMap.addComplexType(e.EventDescriptors.DialogParentMessageReceivedEvent),e.HostParameterMap.define({type:e.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:e.PropertyDescriptors.MessageType,value:e.Marshaling.DialogParentMessageReceivedEventKeys.MessageType},{name:e.PropertyDescriptors.MessageContent,value:e.Marshaling.DialogParentMessageReceivedEventKeys.MessageContent},{name:e.PropertyDescriptors.MessageOrigin,value:e.Marshaling.DialogMessageReceivedEventKeys.MessageOrigin}]}),e.HostParameterMap.define({type:144,toHost:[{name:e.ParameterNames.MessageToParent,value:e.Marshaling.MessageParentKeys.MessageToParent},{name:e.ParameterNames.TargetOrigin,value:e.Marshaling.MessageParentKeys.TargetOrigin}]}),e.HostParameterMap.define({type:145,toHost:[{name:e.ParameterNames.MessageContent,value:e.Marshaling.SendMessageKeys.MessageContent},{name:e.ParameterNames.TargetOrigin,value:e.Marshaling.MessageParentKeys.TargetOrigin}]})},initializeFunc:function(){var t=e.OUtil.isPopupWindow();e.EnableMessageChildDialogAPI=!0,"onenote"==e._OfficeAppFactory.getHostInfo().hostType?e.EnableSendMessageDialogAPI=!1:e.EnableSendMessageDialogAPI=!0;var n=Office.context.ui;if(e.OUtil.isDialog()){var o=e.SyncMethods.MessageParent;n[o]||e.OUtil.defineEnumerableProperty(n,o,{value:function(){var t=e.DispIdHost.MessageParent;return t(arguments,n)}});var r=e.SyncMethods.AddMessageHandler;n[r]||void 0===e.DialogParentMessageEventDispatch||e.DispIdHost.addEventSupport(n,e.DialogParentMessageEventDispatch,t),t&&e.WacDialogAction.registerMessageReceivedEvent()}else{var i;i=null!=e.EventType.DialogParentMessageReceived?new e.EventDispatch([e.EventType.DialogMessageReceived,e.EventType.DialogEventReceived,e.EventType.DialogParentMessageReceived]):new e.EventDispatch([e.EventType.DialogMessageReceived,e.EventType.DialogEventReceived]);var a=e.AsyncMethods.DisplayDialogAsync;n[a]||e.OUtil.defineEnumerableProperty(n,a,{value:function(){var t=e.DispIdHost.OpenDialog;t(arguments,i,n)}})}e.OUtil.finalizeProperties(n)}})}(OSF||(OSF={})),function(e){!function(e){e.Url="url",e.Width="width",e.Height="height",e.DisplayInIframe="displayInIframe",e.HideTitle="hideTitle",e.UseDeviceIndependentPixels="useDeviceIndependentPixels",e.PromptBeforeOpen="promptBeforeOpen",e.EnforceAppDomain="enforceAppDomain",e.UrlNoHostInfo="urlNoHostInfo",e.TargetOrigin="targetOrigin"}(e.ShowWindowDialogParameterKeys||(e.ShowWindowDialogParameterKeys={})),function(e){var t="excel",n="word",o="powerpoint",r="outlook",i="visio";e.getDialogCssManager=function(e){switch(e){case t:case n:case o:case r:case i:default:return new a}};var a=function(){function e(){this.overlayElementCSS=["position: absolute","top: 0","left: 0","width: 100%","height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"],this.dialogNotificationPanelCSS=["width: 100%","height: 190px","position: absolute","z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"],this.newWindowNotificationTextPanelCSS=["margin: 20px 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","font-size: 14px","height: 100px","line-height: 100px"],this.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"],this.crossZoneNotificationTextPanelCSS=["margin: 20px 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","font-size: 14px","height: 100px"],this.dialogNotificationButtonPanelCSS="margin:0px 9px",this.buttonStyleCSS=["text-align: center","width: 70px","height: 25px","font-size: 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","margin: 0px 5px","border-width: 1px","border-style: solid"]}return e.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(";")},e.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(";")},e.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(";")},e.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(";")},e.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(";")},e.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS},e.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(";")},e}();e.DefaultDialogCSSManager=a}(e.WacCommonUICssManager||(e.WacCommonUICssManager={})),function(t){var n=null,o=null,r=null,i=null,a="osfDialogInternal:action=closeDialog",s=null,l=!1,c=-1,u="messageParentKey",d=null,f="#ababab",p="#ffffff",h="newWindowNotificaiton",g="configureBrowserLink",m="dialogNotificationTextPanel",y={dispId:e.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:e.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:null,onCalling:null};function v(t,n){var o=n.message,r=n.targetOrigin;if(r)t.postMessage(o,r);else{var i=e._OfficeAppFactory.getOfficeAppContext().get_appDomains(),a=window.location.origin;if(a||(a=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),i)for(var s=0;s=1&&t.keyCode<=255){var i={keyCode:t.keyCode,shiftKey:t.shiftKey,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey};e.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,e.AgaveHostAction.KeyboardShortcuts,i])}},a=function(e){117==e.keyCode&&e.ctrlKey&&(e.preventDefault?e.preventDefault():e.returnValue=!1)};t?(e.OUtil.addEventListener(window,"focus",o),e.OUtil.addEventListener(window,"blur",r),e.OUtil.addEventListener(window,"keydown",i),e.OUtil.addEventListener(window,"keypress",a)):(e.OUtil.removeEventListener(window,"focus",o),e.OUtil.removeEventListener(window,"blur",r),e.OUtil.removeEventListener(window,"keydown",i),e.OUtil.removeEventListener(window,"keypress",a))}(!1),t.completed()},t.handleNewWindowDialog=function(t){try{if(!function(t){var n=e._OfficeAppFactory.getOfficeAppContext().get_appDomains(),o=t.url,r=e.XdmCommunicationManager.checkUrlWithAppDomains(n,o);if(!r)return e._OfficeAppFactory.getOfficeAppContext().get_docUrl()&&e.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(e._OfficeAppFactory.getOfficeAppContext().get_docUrl(),o);return r}(t))return void s(12004);if(!t[e.ShowWindowDialogParameterKeys.PromptBeforeOpen])return void S(t);l=!1;var n=!1,o=e._OfficeAppFactory.getHostInfo(),a=e.WacCommonUICssManager.getDialogCssManager(o.hostType),c=e.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,e._OfficeAppFactory.getOfficeAppContext().get_addinName());r=T(a),document.body.insertBefore(r,document.body.firstChild),(i=function(e,t){var n=document.createElement("div");n.style.cssText=e.getDialogNotificationPanelCSS(),D(n);var o=document.createElement("div");o.style.cssText=e.getNewWindowNotificationTextPanelCSS(),o.id=m,"rtl"==document.documentElement.getAttribute("dir")?o.style.paddingRight="30px":o.style.paddingLeft="30px";var r=document.createElement("span");return r.style.cssText=e.getNewWindowNotificationTextSpanCSS(),r.innerText=t,o.appendChild(r),n.appendChild(o),n}(a,c)).id=h;var u=w(a),d=A(a,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),f=A(a,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);function p(t){y.onCalling=function(e){I(),F(e),s(12009)},e.WACDelegate.unregisterEventAsync(y),t.preventDefault(),t.stopPropagation()}u.appendChild(d),u.appendChild(f),i.appendChild(u),document.body.insertBefore(i,document.body.firstChild),d.onclick=function(e){S(t),l||R(),e.preventDefault(),e.stopPropagation()},f.onclick=p,d.addEventListener("keydown",(function(e){e.shiftKey&&9==e.keyCode&&(E(d),P(f),f.focus(),e.preventDefault(),e.stopPropagation())}),!1),f.addEventListener("keydown",(function(e){e.shiftKey||9!=e.keyCode?13==e.keyCode&&(n=!0,e.preventDefault(),e.stopPropagation()):(E(f),P(d),d.focus(),e.preventDefault(),e.stopPropagation())}),!1),f.addEventListener("keyup",(function(e){13==e.keyCode&&n&&(n=!1,p(e))}),!1),window.focus(),y.onCalling=function(e){d.focus()},e.WACDelegate.registerEventAsync(y)}catch(t){e.AppTelemetry&&e.AppTelemetry.logAppException("Exception happens at new window dialog."+t),s(5001)}},t.closeDialog=function(t){try{if(null!=n){var o=e._OfficeAppFactory.getOfficeAppContext().get_appDomains();if(o)for(var r=0;r-1)window.close();else{var o=t.data,r=typeof o;if(o&&("object"==r||"string"==r)){var i="string"==r?JSON.parse(o):o,s={};s[e.Marshaling.DialogMessageReceivedEventKeys.MessageContent]=i.messageContent,s[e.Marshaling.DialogMessageReceivedEventKeys.MessageOrigin]=t.origin;var l=e.manufactureEventArgs(e.EventType.DialogParentMessageReceived,null,s);e.DialogParentMessageEventDispatch.fireEvent(l)}}}))},t.setHandlerAndShowDialogCallback=function(e,t){o=e,s=t},t.escDismissDialogNotification=b,t.showCrossZoneNotification=_,t.getWithExpiry=function(e,t){var n=e.getItem(t);if(!n)return"undefined";var o=JSON.parse(n);return o.expiry&&o.value?(new Date).getTime()>o.expiry?(e.removeItem(t),"undefined"):o.value:"undefined"},t.setWithExpiry=function(e,t,n){var o={value:n,expiry:(new Date).getTime()+864e5};e.setItem(t,JSON.stringify(o))},t.getLocalStorage=function(){return e.SafeStorage?new e.SafeStorage(window.localStorage):window.localStorage},t.getSessionStorage=function(){return e.SafeStorage?new e.SafeStorage(window.sessionStorage):window.sessionStorage},t.getUrlProtocolHostnamePort=function(e){var t=e.port?":"+e.port:"";return e.protocol+"//"+e.hostname+t},t.validateTaskpaneDomain=function(t,n){try{if(!t)return!1;n||(n=!0);var o=window.location.origin;o||(o=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""));var r=e.OUtil.parseUrl(o,!0),i=e.OUtil.parseUrl(t,!0);if(!(r.protocol&&r.hostname&&i.protocol&&i.hostname&&void 0!==i.port))return!1;var a=(y=i,(m=r).hostname==y.hostname&&m.protocol==y.protocol&&function(e,t){var n="80",o="443";return e.port==t.port||""==e.port&&"http:"==e.protocol&&t.port==n||""==e.port&&"https:"==e.protocol&&t.port==o||""==t.port&&"http:"==t.protocol&&e.port==n||""==t.port&&"https:"==t.protocol&&e.port==o}(m,y)),s=!1;if(n&&(s=e.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(t,o)),a||s)return!0;var l=this.getLocalStorage(),c=this.getSessionStorage(),u="_trusts_"+(i.protocol+"//"+i.hostname+(i.port?":"+i.port:"")),d=this.getWithExpiry(l,u),f=this.getWithExpiry(c,u);if("true"===d)return!0;if("false"===f)return!1;var p=this.getUrlProtocolHostnamePort(i),h=this.getUrlProtocolHostnamePort(r),g='You are about to send and receive potentially sensitive information from "'+h+'". Only click OK if you trust the following website recieving the sensitive information: "'+p+'".';return Strings.OfficeOM.L_ConfirmDialogApiTrustsParent&&(g=Strings.OfficeOM.L_ConfirmDialogApiTrustsParent.replace("{0}",h).replace("{1}",p)),window.confirm(g)?(this.setWithExpiry(l,u,"true"),this.setWithExpiry(c,u,"true"),!0):(this.setWithExpiry(l,u,"false"),this.setWithExpiry(c,u,"false"),!1)}catch(t){return e.AppTelemetry&&e.AppTelemetry.logAppException("Error happened during validateTaskpaneDomain method:"+t),!1}var m,y}}(e.WacDialogAction||(e.WacDialogAction={}))}(OSF||(OSF={})),function(e){!function(t){t.openDialog=function(t){try{t.onCalling&&t.onCalling();var n=e.SafeArrayDelegate.getOnAfterRegisterEvent(!0,t);e._OfficeAppFactory.getClientHostController().openDialog(t.dispId,void 0,t.targetId,(function(n,o){t.onEvent&&t.onEvent(o),e.AppTelemetry&&e.AppTelemetry.onEventDone(t.dispId)}),n)}catch(n){e.SafeArrayDelegate.onException(n,t)}},t.closeDialog=function(t){t.onCalling&&t.onCalling();var n=e.SafeArrayDelegate.getOnAfterRegisterEvent(!1,t);try{e._OfficeAppFactory.getClientHostController().closeDialog(t.dispId,void 0,t.targetId,n)}catch(n){e.SafeArrayDelegate.onException(n,t)}},t.messageParent=function(t){try{t.onCalling&&t.onCalling();var n=(new Date).getTime(),o=e._OfficeAppFactory.getClientHostController().messageParent(t.hostCallArgs);return t.onReceiving&&t.onReceiving(),e.AppTelemetry&&e.AppTelemetry.onMethodDone(t.dispId,t.hostCallArgs,Math.abs((new Date).getTime()-n),o),o}catch(t){return e.SafeArrayDelegate.onExceptionSyncMethod(t)}},t.sendMessage=function(t){try{t.onCalling&&t.onCalling();(new Date).getTime();var n=e._OfficeAppFactory.getClientHostController().sendMessage(t.hostCallArgs);return t.onReceiving&&t.onReceiving(),n}catch(t){return e.SafeArrayDelegate.onExceptionSyncMethod(t)}}}(e.SafeArrayDelegate||(e.SafeArrayDelegate={}))}(OSF||(OSF={})),function(e){!function(t){t.openDialog=function(n){var o="https://",r="http://",i=JSON.parse(n.targetId),a=t.getOnAfterRegisterEvent(!0,n);function s(t){var n={Error:t};try{a(0,n)}catch(t){e.AppTelemetry&&e.AppTelemetry.logAppException("Exception happens at showDialogCallback."+t)}}if(e.DialogShownStatus.hasDialogShown)s(12007);else{var l=i[e.ShowWindowDialogParameterKeys.Url].toLowerCase(),c=window.location.href.toLowerCase();if(e.AppTelemetry){var u=!1,d=!1,f=!1,p=!1,h="",g="";if(e.OUtil){var m=e.OUtil.parseUrl(l),y=e.OUtil.parseUrl(c);u=m.protocol===y.protocol&&m.hostname===y.hostname&&m.port===y.port,h=e.OUtil.getHostnamePortionForLogging(m.hostname),u?g=h:(g=e.OUtil.getHostnamePortionForLogging(y.hostname),d=e.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(l,c),f=e.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(c,l));var v=e._OfficeAppFactory.getOfficeAppContext().get_appDomains();p=e.XdmCommunicationManager.checkUrlWithAppDomains(v,l)}var b="openDialog isInline: "+i[e.ShowWindowDialogParameterKeys.DisplayInIframe].toString()+", taskpaneHostname: "+g+", dialogHostName: "+h+", isSameDomain: "+u.toString()+", parentIsSubdomain: "+d.toString()+", childIsSubdomain: "+f.toString()+", isAppDomain: "+p.toString();e.AppTelemetry.logAppCommonMessage(b)}null!=l&&l.substr(0,o.length)===o?i[e.ShowWindowDialogParameterKeys.DisplayInIframe]?(e.DialogShownStatus.isWindowDialog=!1,e.WACDelegate.registerEventAsync(n)):(e.DialogShownStatus.isWindowDialog=!0,e.WacDialogAction.setHandlerAndShowDialogCallback((function(t){n.onEvent&&n.onEvent(t),e.AppTelemetry&&e.AppTelemetry.onEventDone(n.dispId)}),s),e.WacDialogAction.handleNewWindowDialog(i)):l.substr(0,r.length)===r?s(12005):s(12003)}},t.validateTaskpaneDomain=function(t,n){return e.WacDialogAction.validateTaskpaneDomain(t,n)},t.messageParent=function(t){var n=t.hostCallArgs.targetOrigin,o=!!n;if(o&&"*"!=n){var r=e.WacDialogAction.getLocalStorage(),i=e.WacDialogAction.getSessionStorage(),a="_trusts_",s=e.OUtil.parseUrl(n,!0);a+=s.protocol+"//"+s.hostname+(s.port?":"+s.port:""),e.WacDialogAction.setWithExpiry(r,a,"true"),e.WacDialogAction.setWithExpiry(i,a,"true")}if(null!=window.opener){if(!o){var l=e._OfficeAppFactory.getOfficeAppContext().get_taskpaneUrl();if(l){if(!e.WacDialogAction.validateTaskpaneDomain(l,!0)){var c="messageParent called but the taskpane domain is untrusted: "+l;throw e.AppTelemetry&&e.AppTelemetry.logAppException(c),new Error(c)}}else l=window.location.origin;t.hostCallArgs.targetOrigin=l}e.WacDialogAction.messageParent(t)}else{var u=window.location.origin;u||(u=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),o||(t.hostCallArgs.targetOrigin=u),e.WACDelegate.executeAsync(t)}},t.sendMessage=function(t){e.DialogShownStatus.hasDialogShown&&(e.DialogShownStatus.isWindowDialog?e.WacDialogAction.sendMessage(t):e.WACDelegate.executeAsync(t))},t.closeDialog=function(n){var o=t.getOnAfterRegisterEvent(!1,n);function r(t){var n={Error:t};try{o(0,n)}catch(t){e.AppTelemetry&&e.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+t)}}e.DialogShownStatus.hasDialogShown?e.DialogShownStatus.isWindowDialog?(n.onCalling&&n.onCalling(),e.WacDialogAction.closeDialog(r)):e.WACDelegate.unregisterEventAsync(n):r(12006)}}(e.WACDelegate||(e.WACDelegate={}))}(OSF||(OSF={})),function(e){var t;t||(t={}),e.V10ApiFeatureRegistry.register({defineMethodsFunc:function(){e.AsyncMethodCalls.define({method:e.AsyncMethods.AddHandlerAsync,requiredArguments:[{name:e.ParameterNames.EventType,enum:e.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{name:e.ParameterNames.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]}),e.AsyncMethodCalls.define({method:e.AsyncMethods.RemoveHandlerAsync,requiredArguments:[{name:e.ParameterNames.EventType,enum:e.EventType,verify:function(e,t,n){return n.supportsEvent(e)}}],supportedOptions:[{name:e.ParameterNames.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]})}})}(OSF||(OSF={})),function(e){!function(e){!function(e){e.launchExtensionComponent=function(e,t,n,o,r){var i=OSF.OUtil.Guid.generateNewGuid();null==r&&(r={OptionalProperties:{},DevProperties:{}}),r.OptionalProperties.InstanceToken=i;var a={ExtId:e,ComponentType:t,ComponentId:n,HostProps:o,OptionalProps:r};if(OSF._OfficeAppFactory.getHostInfo().hostPlatform==OSF.HostInfoPlatform.web){var s=OSF._OfficeAppFactory.getWebAppState();return s.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[s.id,OSF.AgaveHostAction.LaunchExtensionComponent,a]),{Id:e,ComponentType:t,ComponentId:n,InstanceToken:i,LaunchProperties:r}}throw OSF.Utility.createNotImplementedException()}}(e.extensionLifeCycle||(e.extensionLifeCycle={}))}(e.context||(e.context={})),function(e){e.close=function(e){OSF._OfficeAppFactory.getClientHostController().closeSdxDialog(e)}}(e.ExtensionLifeCycle||(e.ExtensionLifeCycle={}))}(Office||(Office={})),function(e){var t=function(){function e(e,t,n){this.m_fileSize=t,this.m_sliceSize=n,this.m_privateState={},this.m_privateState[OSF.FileProperties.Handle]=e,this.m_privateState[OSF.FileProperties.SliceSize]=n}return Object.defineProperty(e.prototype,"size",{get:function(){return this.m_fileSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sliceCount",{get:function(){return Math.ceil(this.m_fileSize/this.m_sliceSize)},enumerable:!0,configurable:!0}),e.prototype.getSliceAsync=function(e,t){OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.GetDocumentCopyChunkAsync,arguments,this,this.m_privateState)},e.prototype.closeAsync=function(e){OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.ReleaseDocumentCopyAsync,arguments,this,this.m_privateState)},e}();e.File=t}(Office||(Office={})),function(e){!function(t){!function(t){t.getFileAsync=function(t,n,o){OSF.DispIdHost.InvokeMethod(OSF.AsyncMethods.GetDocumentCopyAsync,arguments,e.context.document,void 0)}}(t.document||(t.document={}))}(e.context||(e.context={}))}(Office||(Office={})),function(e){!function(e){e.FileProperties="FileProperties",e.FileSliceProperties="FileSliceProperties"}(e.PropertyDescriptors||(e.PropertyDescriptors={})),function(e){e.Handle="FileHandle",e.FileSize="FileSize",e.SliceSize="sliceSize"}(e.FileProperties||(e.FileProperties={})),function(e){e.FileSliceOffset="fileSliceoffset"}(e.additionalParameter||(e.additionalParameter={})),function(e){!function(e){!function(e){e[e.Handle=0]="Handle",e[e.FileSize=1]="FileSize"}(e.FilePropertiesKeys||(e.FilePropertiesKeys={})),function(e){e[e.Data=0]="Data",e[e.SliceSize=1]="SliceSize"}(e.SlicePropertiesKeys||(e.SlicePropertiesKeys={})),function(e){e[e.Text=0]="Text",e[e.Compressed=1]="Compressed",e[e.Pdf=2]="Pdf"}(e.FileType||(e.FileType={})),function(e){e[e.FileType=0]="FileType",e[e.SliceSize=1]="SliceSize",e[e.Handle=2]="Handle",e[e.SliceIndex=3]="SliceIndex"}(e.ParameterKeys||(e.ParameterKeys={}))}(e.File||(e.File={}))}(e.Marshaling||(e.Marshaling={})),e.File||(e.File={}),e.V10ApiFeatureRegistry.register({defineMethodsFunc:function(){e.AsyncMethodCalls.define({method:e.AsyncMethods.GetDocumentCopyAsync,requiredArguments:[{name:e.ParameterNames.FileType,enum:Office.FileType}],supportedOptions:[{name:e.ParameterNames.SliceSize,value:{types:["number"],defaultValue:e.OUtil.getHostPlatform()==e.HostInfoPlatform.ios?65536:4194304}}],checkCallArgs:function(t,n,o){var r=t[e.ParameterNames.SliceSize];if(r<=0||r>4194304)throw 11002;return t},onSucceeded:function(t,n,o){return new Office.File(t[e.FileProperties.Handle],t[e.FileProperties.FileSize],o[e.ParameterNames.SliceSize])}}),e.AsyncMethodCalls.define({method:e.AsyncMethods.GetDocumentCopyChunkAsync,requiredArguments:[{name:e.ParameterNames.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:e.FileProperties.Handle,value:function(t,n){return n[e.FileProperties.Handle]}},{name:e.FileProperties.SliceSize,value:function(t,n){return n[e.FileProperties.SliceSize]}}],checkCallArgs:function(t,n,o){var r=t[e.ParameterNames.SliceIndex];if(r<0||r>=n.sliceCount)throw 5008;return t[e.additionalParameter.FileSliceOffset]=parseInt((r*o[e.FileProperties.SliceSize]).toString()),t},onSucceeded:function(t,n,o){var r={};return e.OUtil.defineEnumerableProperties(r,{data:{value:e.OUtil.getHostPlatform()==e.HostInfoPlatform.mac?e.OUtil.shallowCopy(t[e.ParameterNames.Data]):t[e.ParameterNames.Data]},index:{value:o[e.ParameterNames.SliceIndex]},size:{value:t[e.FileProperties.SliceSize]}}),r}}),e.AsyncMethodCalls.define({method:e.AsyncMethods.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:e.FileProperties.Handle,value:function(t,n){return n[e.FileProperties.Handle]}}]})},defineSafeArrayParameterMapFunc:function(){e.HostParameterMap.define({type:e.PropertyDescriptors.FileProperties,fromHost:[{name:e.FileProperties.Handle,value:0},{name:e.FileProperties.FileSize,value:1}],isComplexType:!0}),e.HostParameterMap.define({type:e.PropertyDescriptors.FileSliceProperties,fromHost:[{name:e.ParameterNames.Data,value:0},{name:e.FileProperties.SliceSize,value:1}],isComplexType:!0}),e.HostParameterMap.define({type:e.ParameterNames.FileType,toHost:[{name:Office.FileType.Text,value:0},{name:Office.FileType.Compressed,value:5},{name:Office.FileType.Pdf,value:6}]}),e.HostParameterMap.define({type:77,toHost:[{name:e.ParameterNames.FileType,value:0}],fromHost:[{name:e.PropertyDescriptors.FileProperties,value:e.HostParameterMap.self}]}),e.HostParameterMap.define({type:80,toHost:[{name:e.FileProperties.Handle,value:0},{name:e.additionalParameter.FileSliceOffset,value:1},{name:e.FileProperties.SliceSize,value:2}],fromHost:[{name:e.PropertyDescriptors.FileSliceProperties,value:e.HostParameterMap.self}]}),e.HostParameterMap.define({type:81,toHost:[{name:e.FileProperties.Handle,value:0}]})},defineWebParameterMapFunc:function(){e.HostParameterMap.addComplexType(e.PropertyDescriptors.FileProperties),e.HostParameterMap.addComplexType(e.PropertyDescriptors.FileSliceProperties),e.HostParameterMap.define({type:e.PropertyDescriptors.FileProperties,fromHost:[{name:e.FileProperties.Handle,value:e.Marshaling.File.FilePropertiesKeys.Handle},{name:e.FileProperties.FileSize,value:e.Marshaling.File.FilePropertiesKeys.FileSize}]}),e.HostParameterMap.define({type:e.PropertyDescriptors.FileSliceProperties,fromHost:[{name:e.ParameterNames.Data,value:e.Marshaling.File.SlicePropertiesKeys.Data},{name:e.FileProperties.SliceSize,value:e.Marshaling.File.SlicePropertiesKeys.SliceSize}]}),e.HostParameterMap.define({type:e.ParameterNames.FileType,toHost:[{name:Office.FileType.Text,value:e.Marshaling.File.FileType.Text},{name:Office.FileType.Compressed,value:e.Marshaling.File.FileType.Compressed},{name:Office.FileType.Pdf,value:e.Marshaling.File.FileType.Pdf}]}),e.HostParameterMap.define({type:77,toHost:[{name:e.ParameterNames.FileType,value:e.Marshaling.File.ParameterKeys.FileType},{name:e.ParameterNames.SliceSize,value:e.Marshaling.File.ParameterKeys.SliceSize}],fromHost:[{name:e.PropertyDescriptors.FileProperties,value:e.HostParameterMap.self}]}),e.HostParameterMap.define({type:80,toHost:[{name:e.FileProperties.Handle,value:e.Marshaling.File.ParameterKeys.Handle},{name:e.ParameterNames.SliceIndex,value:e.Marshaling.File.ParameterKeys.SliceIndex}],fromHost:[{name:e.PropertyDescriptors.FileSliceProperties,value:e.HostParameterMap.self}]}),e.HostParameterMap.define({type:81,toHost:[{name:e.FileProperties.Handle,value:e.Marshaling.File.ParameterKeys.Handle}]})}})}(OSF||(OSF={})),function(e){var t=function(e){OSF.OUtil.defineEnumerableProperties(this,{url:{value:e[OSF.FilePropertiesDescriptor.Url]}})};e.FileProperties=t}(OfficeExt||(OfficeExt={})),function(e){e.FilePropertiesDescriptor={Url:"Url"},function(e){e.FilePropertiesDescriptor="FilePropertiesDescriptor"}(e.PropertyDescriptors||(e.PropertyDescriptors={})),function(e){!function(e){e[e.Properties=0]="Properties",e[e.Url=1]="Url"}(e.FilePropertiesKeys||(e.FilePropertiesKeys={}))}(e.Marshaling||(e.Marshaling={})),e.FileProperties||(e.FileProperties={}),e.V10ApiFeatureRegistry.register({defineMethodsFunc:function(){e.AsyncMethodCalls.define({method:e.AsyncMethods.GetFilePropertiesAsync,fromHost:[{name:e.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(e,t,n){return new OfficeExt.FileProperties(e)}})},defineSafeArrayParameterMapFunc:function(){e.HostParameterMap.define({type:e.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:e.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0}),e.HostParameterMap.define({type:86,fromHost:[{name:e.PropertyDescriptors.FilePropertiesDescriptor,value:e.HostParameterMap.self}]})},defineWebParameterMapFunc:function(){e.HostParameterMap.define({type:86,fromHost:[{name:e.PropertyDescriptors.FilePropertiesDescriptor,value:e.Marshaling.FilePropertiesKeys.Properties}]})},initializeFunc:function(){var t=Office.context.document;e.DispIdHost.addAsyncMethods(t,[e.AsyncMethods.GetFilePropertiesAsync])}})}(OSF||(OSF={})),function(e){var t;!function(t){function n(e){return e.id}e.V10ApiFeatureRegistry.register({defineMethodsFunc:function(){e.AsyncMethodCalls.define({method:e.AsyncMethods.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:e.ParameterNames.Id,value:n}]}),e.AsyncMethodCalls.define({method:e.AsyncMethods.SetTableOptionsAsync,requiredArguments:[{name:e.ParameterNames.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:e.ParameterNames.Id,value:n}]}),e.AsyncMethodCalls.define({method:e.AsyncMethods.SetFormatsAsync,requiredArguments:[{name:e.ParameterNames.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:e.ParameterNames.Id,value:n}]})}})}(e.Internal||(e.Internal={})),function(e){!function(e){e.Id="BindingId",e.CellFormat="CellFormat",e.TableOptions="TableOptions"}(e.FormatKeys||(e.FormatKeys={})),function(e){e[e.headerRow=0]="headerRow",e[e.bandedRows=1]="bandedRows",e[e.firstColumn=2]="firstColumn",e[e.lastColumn=3]="lastColumn",e[e.bandedColumns=4]="bandedColumns",e[e.filterButton=5]="filterButton",e[e.style=6]="style",e[e.totalRow=7]="totalRow"}(e.TableOptionProperties||(e.TableOptionProperties={})),function(e){e[e.row=0]="row",e[e.column=1]="column"}(e.CellProperties||(e.CellProperties={})),function(e){e[e.alignHorizontal=1]="alignHorizontal",e[e.alignVertical=2]="alignVertical",e[e.backgroundColor=101]="backgroundColor",e[e.borderStyle=201]="borderStyle",e[e.borderColor=202]="borderColor",e[e.borderTopStyle=203]="borderTopStyle",e[e.borderTopColor=204]="borderTopColor",e[e.borderBottomStyle=205]="borderBottomStyle",e[e.borderBottomColor=206]="borderBottomColor",e[e.borderLeftStyle=207]="borderLeftStyle",e[e.borderLeftColor=208]="borderLeftColor",e[e.borderRightStyle=209]="borderRightStyle",e[e.borderRightColor=210]="borderRightColor",e[e.borderOutlineStyle=211]="borderOutlineStyle",e[e.borderOutlineColor=212]="borderOutlineColor",e[e.borderInlineStyle=213]="borderInlineStyle",e[e.borderInlineColor=214]="borderInlineColor",e[e.fontFamily=301]="fontFamily",e[e.fontStyle=302]="fontStyle",e[e.fontSize=303]="fontSize",e[e.fontUnderlineStyle=304]="fontUnderlineStyle",e[e.fontColor=305]="fontColor",e[e.fontDirection=306]="fontDirection",e[e.fontStrikethrough=307]="fontStrikethrough",e[e.fontSuperscript=308]="fontSuperscript",e[e.fontSubscript=309]="fontSubscript",e[e.fontNormal=310]="fontNormal",e[e.indentLeft=401]="indentLeft",e[e.indentRight=402]="indentRight",e[e.numberFormat=501]="numberFormat",e[e.width=701]="width",e[e.height=702]="height",e[e.wrapping=703]="wrapping"}(e.CellFormatProperties||(e.CellFormatProperties={})),function(e){e[e.none=0]="none",e[e.thin=1]="thin",e[e.medium=2]="medium",e[e.dashed=3]="dashed",e[e.dotted=4]="dotted",e[e.thick=5]="thick",e[e.double=6]="double",e[e.hair=7]="hair",e[e.mediumDashed=8]="mediumDashed",e[e.dashDot=9]="dashDot",e[e.mediumDashDot=10]="mediumDashDot",e[e.dashDotDot=11]="dashDotDot",e[e.mediumDashDotDot=12]="mediumDashDotDot",e[e.slantDashDot=13]="slantDashDot"}(e.BorderStyleType||(e.BorderStyleType={})),function(e){e[e.none=0]="none",e[e.black=1]="black",e[e.blue=2]="blue",e[e.gray=3]="gray",e[e.green=4]="green",e[e.orange=5]="orange",e[e.pink=6]="pink",e[e.purple=7]="purple",e[e.red=8]="red",e[e.teal=9]="teal",e[e.turquoise=10]="turquoise",e[e.violet=11]="violet",e[e.white=12]="white",e[e.yellow=13]="yellow",e[e.automatic=14]="automatic"}(e.ColorType||(e.ColorType={})),function(e){e[e.general=0]="general",e[e.left=1]="left",e[e.center=2]="center",e[e.right=3]="right",e[e.fill=4]="fill",e[e.justify=5]="justify",e[e.centerAcrossSelection=6]="centerAcrossSelection",e[e.distributed=7]="distributed"}(e.AlignHorizontalType||(e.AlignHorizontalType={})),function(e){e[e.top=0]="top",e[e.center=1]="center",e[e.bottom=2]="bottom",e[e.justify=3]="justify",e[e.distributed=4]="distributed"}(e.AlignVerticalType||(e.AlignVerticalType={})),function(e){e[e.regular=0]="regular",e[e.italic=1]="italic",e[e.bold=2]="bold",e[e.boldItalic=3]="boldItalic"}(e.FontStyleType||(e.FontStyleType={})),function(e){e[e.none=0]="none",e[e.single=1]="single",e[e.double=2]="double",e[e.singleAccounting=3]="singleAccounting",e[e.doubleAccounting=4]="doubleAccounting"}(e.FontUnderlineStyleType||(e.FontUnderlineStyleType={})),function(e){e[e.context=0]="context",e[e.leftToRight=1]="leftToRight",e[e.rightToLeft=2]="rightToLeft"}(e.FontDirectionType||(e.FontDirectionType={})),function(e){e[e.autoFit=-1]="autoFit"}(e.WidthType||(e.WidthType={})),function(e){e[e.autoFit=-1]="autoFit"}(e.HeightType||(e.HeightType={}))}(t=e.Marshaling||(e.Marshaling={})),function(n){var o,r;!function(e){e[e.headerRow=0]="headerRow",e[e.bandedRows=1]="bandedRows",e[e.firstColumn=2]="firstColumn",e[e.lastColumn=3]="lastColumn",e[e.bandedColumns=4]="bandedColumns",e[e.filterButton=5]="filterButton",e[e.style=6]="style",e[e.totalRow=7]="totalRow"}(o||(o={})),function(e){e[e.row=0]="row",e[e.column=1]="column"}(r||(r={}));var i={alignHorizontal:{text:"alignHorizontal",type:1},alignVertical:{text:"alignVertical",type:2},backgroundColor:{text:"backgroundColor",type:101},borderStyle:{text:"borderStyle",type:201},borderColor:{text:"borderColor",type:202},borderTopStyle:{text:"borderTopStyle",type:203},borderTopColor:{text:"borderTopColor",type:204},borderBottomStyle:{text:"borderBottomStyle",type:205},borderBottomColor:{text:"borderBottomColor",type:206},borderLeftStyle:{text:"borderLeftStyle",type:207},borderLeftColor:{text:"borderLeftColor",type:208},borderRightStyle:{text:"borderRightStyle",type:209},borderRightColor:{text:"borderRightColor",type:210},borderOutlineStyle:{text:"borderOutlineStyle",type:211},borderOutlineColor:{text:"borderOutlineColor",type:212},borderInlineStyle:{text:"borderInlineStyle",type:213},borderInlineColor:{text:"borderInlineColor",type:214},fontFamily:{text:"fontFamily",type:301},fontStyle:{text:"fontStyle",type:302},fontSize:{text:"fontSize",type:303},fontUnderlineStyle:{text:"fontUnderlineStyle",type:304},fontColor:{text:"fontColor",type:305},fontDirection:{text:"fontDirection",type:306},fontStrikethrough:{text:"fontStrikethrough",type:307},fontSuperscript:{text:"fontSuperscript",type:308},fontSubscript:{text:"fontSubscript",type:309},fontNormal:{text:"fontNormal",type:310},indentLeft:{text:"indentLeft",type:401},indentRight:{text:"indentRight",type:402},numberFormat:{text:"numberFormat",type:501},width:{text:"width",type:701},height:{text:"height",type:702},wrapping:{text:"wrapping",type:703}},a=[{name:"none",value:0},{name:"thin",value:1},{name:"medium",value:2},{name:"dashed",value:3},{name:"dotted",value:4},{name:"thick",value:5},{name:"double",value:6},{name:"hair",value:7},{name:"medium dashed",value:8},{name:"dash dot",value:9},{name:"medium dash dot",value:10},{name:"dash dot dot",value:11},{name:"medium dash dot dot",value:12},{name:"slant dash dot",value:13}],s=[{name:"none",value:0},{name:"black",value:1},{name:"blue",value:2},{name:"gray",value:3},{name:"green",value:4},{name:"orange",value:5},{name:"pink",value:6},{name:"purple",value:7},{name:"red",value:8},{name:"teal",value:9},{name:"turquoise",value:10},{name:"violet",value:11},{name:"white",value:12},{name:"yellow",value:13},{name:"automatic",value:14}];e.V10ApiFeatureRegistry.register({defineMethodsFunc:function(){e.AsyncMethodCalls.define({method:e.AsyncMethods.SetDataAsync,requiredArguments:[{name:e.ParameterNames.Data,types:["string","object","number","boolean"]}],supportedOptions:[{name:e.ParameterNames.CoercionType,value:{enum:Office.CoercionType,calculate:function(t){return e.DataCoercion.determineCoercionType(t[e.ParameterNames.Data])}}},{name:e.ParameterNames.Rows,value:{types:["object","string"],defaultValue:null}},{name:e.ParameterNames.Columns,value:{types:["object"],defaultValue:null}},{name:e.ParameterNames.StartRow,value:{types:["number"],defaultValue:0}},{name:e.ParameterNames.StartColumn,value:{types:["number"],defaultValue:0}},{name:e.ParameterNames.CellFormat,value:{types:["object"],defaultValue:[]}},{name:e.ParameterNames.TableOptions,value:{types:["object"],defaultValue:[]}}],checkCallArgs:function(t,n,o){var r=e.ParameterNames;if(0==t[r.StartRow]&&0==t[r.StartColumn]&&e.OUtil.isArray(t[r.CellFormat])&&0===t[r.CellFormat].length&&e.OUtil.isArray(t[r.TableOptions])&&0===t[r.TableOptions].length&&(delete t[r.StartRow],delete t[r.StartColumn],delete t[r.CellFormat],delete t[r.TableOptions]),t[r.CoercionType]!=e.DataCoercion.getCoercionDefaultForBinding(n.type)&&(t[r.StartRow]&&0!=t[r.StartRow]||t[r.StartColumn]&&0!=t[r.StartColumn]||t[r.CellFormat]||t[r.TableOptions]))throw 1002;return t},privateStateCallbacks:[{name:e.ParameterNames.Id,value:function(e){return e.id}}]})},defineSafeArrayParameterMapFunc:function(){e.HostParameterMap.define({type:87,toHost:[{name:e.ParameterNames.Id,value:0}]}),e.HostParameterMap.define({type:88,toHost:[{name:e.ParameterNames.Id,value:0},{name:e.ParameterNames.TableOptions,value:1}]}),e.HostParameterMap.define({type:89,toHost:[{name:e.ParameterNames.Id,value:0},{name:e.ParameterNames.CellFormat,value:1}]}),e.HostParameterMap.define({type:71,toHost:[{name:e.ParameterNames.Id,value:0},{name:e.ParameterNames.CoercionType,value:1},{name:e.ParameterNames.Data,value:2},{name:"offset",value:3},{name:e.ParameterNames.CellFormat,value:4},{name:e.ParameterNames.TableOptions,value:5}]}),e.HostParameterMap.define({type:i.alignHorizontal.text,toHost:[{name:"general",value:0},{name:"left",value:1},{name:"center",value:2},{name:"right",value:3},{name:"fill",value:4},{name:"justify",value:5},{name:"center across selection",value:6},{name:"distributed",value:7}]}),e.HostParameterMap.define({type:i.alignVertical.text,toHost:[{name:"top",value:0},{name:"center",value:1},{name:"bottom",value:2},{name:"justify",value:3},{name:"distributed",value:4}]}),e.HostParameterMap.define({type:i.backgroundColor.text,toHost:s}),e.HostParameterMap.define({type:i.borderStyle.text,toHost:a}),e.HostParameterMap.define({type:i.borderColor.text,toHost:s}),e.HostParameterMap.define({type:i.borderTopStyle.text,toHost:a}),e.HostParameterMap.define({type:i.borderTopColor.text,toHost:s}),e.HostParameterMap.define({type:i.borderBottomStyle.text,toHost:a}),e.HostParameterMap.define({type:i.borderBottomColor.text,toHost:s}),e.HostParameterMap.define({type:i.borderLeftStyle.text,toHost:a}),e.HostParameterMap.define({type:i.borderLeftColor.text,toHost:s}),e.HostParameterMap.define({type:i.borderRightStyle.text,toHost:a}),e.HostParameterMap.define({type:i.borderRightColor.text,toHost:s}),e.HostParameterMap.define({type:i.borderOutlineStyle.text,toHost:a}),e.HostParameterMap.define({type:i.borderOutlineColor.text,toHost:s}),e.HostParameterMap.define({type:i.borderInlineStyle.text,toHost:a}),e.HostParameterMap.define({type:i.borderInlineColor.text,toHost:s}),e.HostParameterMap.define({type:i.fontStyle.text,toHost:[{name:"regular",value:0},{name:"italic",value:1},{name:"bold",value:2},{name:"bold italic",value:3}]}),e.HostParameterMap.define({type:i.fontUnderlineStyle.text,toHost:[{name:"none",value:0},{name:"single",value:1},{name:"double",value:2},{name:"single accounting",value:3},{name:"double accounting",value:4}]}),e.HostParameterMap.define({type:i.fontColor.text,toHost:s}),e.HostParameterMap.define({type:i.fontDirection.text,toHost:[{name:"context",value:0},{name:"left-to-right",value:1},{name:"right-to-left",value:2}]}),e.HostParameterMap.define({type:i.width.text,toHost:[{name:"auto fit",value:-1}]}),e.HostParameterMap.define({type:i.height.text,toHost:[{name:"auto fit",value:-1}]}),e.HostParameterMap.define({type:e.ParameterNames.TableOptions,toHost:[{name:"headerRow",value:0},{name:"bandedRows",value:1},{name:"firstColumn",value:2},{name:"lastColumn",value:3},{name:"bandedColumns",value:4},{name:"filterButton",value:5},{name:"style",value:6},{name:"totalRow",value:7}]}),e.HostParameterMap.dynamicTypes[e.ParameterNames.CellFormat]={toHost:function(t){for(var n in t)t[n].format&&(t[n].format=e.HostParameterMap.doMapValues(t[n].format,"toHost"));return t},fromHost:function(e){return e}},e.HostParameterMap.setDynamicType(e.ParameterNames.CellFormat,{toHost:function(e){var t=[];for(var n in e){var o=e[n],a=[];if(void 0!==o.cells){var s,l=o.cells;if("object"==typeof o.cells)for(var c in s=[],l)void 0!==r[c]&&(s[r[c]]=l[c]);else s=l;a[0]=s}if(o.format){var u=o.format,d=[];for(var f in u)void 0!==i[f]&&d.push([i[f].type,u[f]]);a[1]=d}t[n]=a}return t},fromHost:function(e){return e}}),e.HostParameterMap.setDynamicType(e.ParameterNames.TableOptions,{toHost:function(e){var t=[];for(var n in e)void 0!==o[n]&&(t[o[n]]=e[n]);return t},fromHost:function(e){return e}})},defineWebParameterMapFunc:function(){var n=t.AlignHorizontalType,o=t.AlignVerticalType,r=t.BorderStyleType,i=t.CellProperties,a=(t.CellFormatProperties,t.ColorType),s=t.FontDirectionType,l=t.FontStyleType,c=t.FontUnderlineStyleType,u=t.HeightType,d=t.FormatKeys,f=t.TableOptionProperties,p=t.WidthType,h={alignHorizontal:{text:"alignHorizontal",type:t.CellFormatProperties.alignHorizontal},alignVertical:{text:"alignVertical",type:t.CellFormatProperties.alignVertical},backgroundColor:{text:"backgroundColor",type:t.CellFormatProperties.backgroundColor},borderStyle:{text:"borderStyle",type:t.CellFormatProperties.borderStyle},borderColor:{text:"borderColor",type:t.CellFormatProperties.borderColor},borderTopStyle:{text:"borderTopStyle",type:t.CellFormatProperties.borderTopStyle},borderTopColor:{text:"borderTopColor",type:t.CellFormatProperties.borderTopColor},borderBottomStyle:{text:"borderBottomStyle",type:t.CellFormatProperties.borderBottomStyle},borderBottomColor:{text:"borderBottomColor",type:t.CellFormatProperties.borderBottomColor},borderLeftStyle:{text:"borderLeftStyle",type:t.CellFormatProperties.borderLeftStyle},borderLeftColor:{text:"borderLeftColor",type:t.CellFormatProperties.borderLeftColor},borderRightStyle:{text:"borderRightStyle",type:t.CellFormatProperties.borderRightStyle},borderRightColor:{text:"borderRightColor",type:t.CellFormatProperties.borderRightColor},borderOutlineStyle:{text:"borderOutlineStyle",type:t.CellFormatProperties.borderOutlineStyle},borderOutlineColor:{text:"borderOutlineColor",type:t.CellFormatProperties.borderOutlineColor},borderInlineStyle:{text:"borderInlineStyle",type:t.CellFormatProperties.borderInlineStyle},borderInlineColor:{text:"borderInlineColor",type:t.CellFormatProperties.borderInlineColor},fontFamily:{text:"fontFamily",type:t.CellFormatProperties.fontFamily},fontStyle:{text:"fontStyle",type:t.CellFormatProperties.fontStyle},fontSize:{text:"fontSize",type:t.CellFormatProperties.fontSize},fontUnderlineStyle:{text:"fontUnderlineStyle",type:t.CellFormatProperties.fontUnderlineStyle},fontColor:{text:"fontColor",type:t.CellFormatProperties.fontColor},fontDirection:{text:"fontDirection",type:t.CellFormatProperties.fontDirection},fontStrikethrough:{text:"fontStrikethrough",type:t.CellFormatProperties.fontStrikethrough},fontSuperscript:{text:"fontSuperscript",type:t.CellFormatProperties.fontSuperscript},fontSubscript:{text:"fontSubscript",type:t.CellFormatProperties.fontSubscript},fontNormal:{text:"fontNormal",type:t.CellFormatProperties.fontNormal},indentLeft:{text:"indentLeft",type:t.CellFormatProperties.indentLeft},indentRight:{text:"indentRight",type:t.CellFormatProperties.indentRight},numberFormat:{text:"numberFormat",type:t.CellFormatProperties.numberFormat},width:{text:"width",type:t.CellFormatProperties.width},height:{text:"height",type:t.CellFormatProperties.height},wrapping:{text:"wrapping",type:t.CellFormatProperties.wrapping}},g=[{name:"none",value:r.none},{name:"thin",value:r.thin},{name:"medium",value:r.medium},{name:"dashed",value:r.dashed},{name:"dotted",value:r.dotted},{name:"thick",value:r.thick},{name:"double",value:r.double},{name:"hair",value:r.hair},{name:"medium dashed",value:r.mediumDashed},{name:"dash dot",value:r.dashDot},{name:"medium dash dot",value:r.mediumDashDot},{name:"dash dot dot",value:r.dashDotDot},{name:"medium dash dot dot",value:r.mediumDashDotDot},{name:"slant dash dot",value:r.slantDashDot}],m=[{name:"none",value:a.none},{name:"black",value:a.black},{name:"blue",value:a.blue},{name:"gray",value:a.gray},{name:"green",value:a.green},{name:"orange",value:a.orange},{name:"pink",value:a.pink},{name:"purple",value:a.purple},{name:"red",value:a.red},{name:"teal",value:a.teal},{name:"turquoise",value:a.turquoise},{name:"violet",value:a.violet},{name:"white",value:a.white},{name:"yellow",value:a.yellow},{name:"automatic",value:a.automatic}];e.HostParameterMap.define({type:e.WACDelegate.UniqueArguments.ClearFormats,toHost:[{name:e.ParameterNames.Id,value:t.FormatKeys.Id}]}),e.HostParameterMap.define({type:87,toHost:[{name:e.WACDelegate.UniqueArguments.ClearFormats,value:e.HostParameterMap.self}]}),e.HostParameterMap.define({type:e.WACDelegate.UniqueArguments.SetFormats,toHost:[{name:e.ParameterNames.Id,value:t.FormatKeys.Id},{name:e.ParameterNames.CellFormat,value:t.FormatKeys.CellFormat},{name:e.ParameterNames.TableOptions,value:t.FormatKeys.TableOptions}]}),e.HostParameterMap.define({type:88,toHost:[{name:e.WACDelegate.UniqueArguments.SetFormats,value:e.HostParameterMap.self}]}),e.HostParameterMap.define({type:89,toHost:[{name:e.WACDelegate.UniqueArguments.SetFormats,value:e.HostParameterMap.self}]}),e.HostParameterMap.define({type:e.WACDelegate.UniqueArguments.SetData,toHost:[{name:e.ParameterNames.Id,value:d.Id},{name:e.ParameterNames.CoercionType,value:"CoerceType"},{name:e.ParameterNames.Data,value:e.WACDelegate.UniqueArguments.Data},{name:e.ParameterNames.Rows,value:"Rows"},{name:e.ParameterNames.Columns,value:"Columns"},{name:e.ParameterNames.StartRow,value:"StartRow"},{name:e.ParameterNames.StartColumn,value:"StartCol"},{name:e.ParameterNames.CellFormat,value:d.CellFormat},{name:e.ParameterNames.TableOptions,value:d.TableOptions}]}),e.HostParameterMap.define({type:71,toHost:[{name:e.WACDelegate.UniqueArguments.SetData,value:e.HostParameterMap.self}]}),e.HostParameterMap.define({type:h.alignHorizontal.text,toHost:[{name:"general",value:n.general},{name:"left",value:n.left},{name:"center",value:n.center},{name:"right",value:n.right},{name:"fill",value:n.fill},{name:"justify",value:n.justify},{name:"center across selection",value:n.centerAcrossSelection},{name:"distributed",value:n.distributed}]}),e.HostParameterMap.define({type:h.alignVertical.text,toHost:[{name:"top",value:o.top},{name:"center",value:o.center},{name:"bottom",value:o.bottom},{name:"justify",value:o.justify},{name:"distributed",value:o.distributed}]}),e.HostParameterMap.define({type:h.backgroundColor.text,toHost:m}),e.HostParameterMap.define({type:h.borderStyle.text,toHost:g}),e.HostParameterMap.define({type:h.borderColor.text,toHost:m}),e.HostParameterMap.define({type:h.borderTopStyle.text,toHost:g}),e.HostParameterMap.define({type:h.borderTopColor.text,toHost:m}),e.HostParameterMap.define({type:h.borderBottomStyle.text,toHost:g}),e.HostParameterMap.define({type:h.borderBottomColor.text,toHost:m}),e.HostParameterMap.define({type:h.borderLeftStyle.text,toHost:g}),e.HostParameterMap.define({type:h.borderLeftColor.text,toHost:m}),e.HostParameterMap.define({type:h.borderRightStyle.text,toHost:g}),e.HostParameterMap.define({type:h.borderRightColor.text,toHost:m}),e.HostParameterMap.define({type:h.borderOutlineStyle.text,toHost:g}),e.HostParameterMap.define({type:h.borderOutlineColor.text,toHost:m}),e.HostParameterMap.define({type:h.borderInlineStyle.text,toHost:g}),e.HostParameterMap.define({type:h.borderInlineColor.text,toHost:m}),e.HostParameterMap.define({type:h.fontStyle.text,toHost:[{name:"regular",value:l.regular},{name:"italic",value:l.italic},{name:"bold",value:l.bold},{name:"bold italic",value:l.boldItalic}]}),e.HostParameterMap.define({type:h.fontUnderlineStyle.text,toHost:[{name:"none",value:c.none},{name:"single",value:c.single},{name:"double",value:c.double},{name:"single accounting",value:c.singleAccounting},{name:"double accounting",value:c.doubleAccounting}]}),e.HostParameterMap.define({type:h.fontColor.text,toHost:m}),e.HostParameterMap.define({type:h.fontDirection.text,toHost:[{name:"context",value:s.context},{name:"left-to-right",value:s.leftToRight},{name:"right-to-left",value:s.rightToLeft}]}),e.HostParameterMap.define({type:h.width.text,toHost:[{name:"auto fit",value:p.autoFit}]}),e.HostParameterMap.define({type:h.height.text,toHost:[{name:"auto fit",value:u.autoFit}]}),e.HostParameterMap.define({type:e.ParameterNames.TableOptions,toHost:[{name:"headerRow",value:f.headerRow},{name:"bandedRows",value:f.bandedRows},{name:"firstColumn",value:f.firstColumn},{name:"lastColumn",value:f.lastColumn},{name:"bandedColumns",value:f.bandedColumns},{name:"filterButton",value:f.filterButton},{name:"style",value:f.style},{name:"totalRow",value:f.totalRow}]}),e.HostParameterMap.dynamicTypes[e.ParameterNames.CellFormat]={toHost:function(t){for(var n in t)t[n].format&&(t[n].format=e.HostParameterMap.doMapValues(t[n].format,"toHost"));return t},fromHost:function(e){return e}},e.HostParameterMap.setDynamicType(e.ParameterNames.CellFormat,{toHost:function(e){var t=[];for(var n in e){var o=e[n],r=[];if(void 0!==o.cells){var a,s=o.cells;if("object"==typeof o.cells)for(var l in a=[],s)void 0!==i[l]&&(a[i[l]]=s[l]);else a=s;r[0]=a}if(o.format){var c=o.format,u=[];for(var d in c)void 0!==h[d]&&u.push([h[d].type,c[d]]);r[1]=u}t[n]=r}return t},fromHost:function(e){return e}}),e.HostParameterMap.setDynamicType(e.ParameterNames.TableOptions,{toHost:function(e){var t=[];for(var n in e)void 0!==f[n]&&(t[f[n]]=e[n]);return t},fromHost:function(e){return e}}),n=null,o=null,r=null,null,a=null,s=null,l=null,c=null,u=null,d=null,p=null}})}(e.Formats||(e.Formats={}))}(OSF||(OSF={})),function(e){!function(t){!function(t){function n(t){var n=0;switch(t){case e.CoercionType.Text:n=0;break;case e.CoercionType.Matrix:n=1;break;case e.CoercionType.Table:n=2;break;case e.CoercionType.Html:n=3;break;case e.CoercionType.Ooxml:n=4;break;case e.CoercionType.OoxmlPackage:n=5;break;case e.CoercionType.PdfFile:n=6;break;case e.CoercionType.SlideRange:n=7;break;case"image":n=8;break;case"xmlSvg":n=9}return n}function o(t){var n=0;switch(t){case e.ValueFormat.Unformatted:n=0;break;case e.ValueFormat.Formatted:n=1}return n}function r(t){var n=0;switch(t){case e.FilterType.All:n=0;break;case e.FilterType.OnlyVisible:n=1}return n}t.setSelectedDataAsync=function(t,o,r){var i=null==o.coercionType?OSF.DataCoercion.determineCoercionType(t):o.coercionType;"function"==typeof o&&(r=o);var a={toSafeArrayHost:function(){var r=OSF._OfficeAppFactory.getHostInfo();return r.hostType.toLowerCase()==e.HostType.Word.toLowerCase()||r.hostType.toLowerCase()==e.HostType.PowerPoint.toLowerCase()||r.hostType.toLowerCase()==e.HostType.OneNote.toLowerCase()||r.hostType.toLowerCase()==e.HostType.Visio.toLowerCase()||"image"==i||"xmlSvg"==i?[n(i),OSF.DataCoercion.serializeDynamicData(t),null!=o.imageLeft&&o.imageLeft,null!=o.imageTop&&o.imageTop,null!=o.imageWidth&&o.imageWidth,null!=o.imageHeight&&o.imageHeight]:r.hostType.toLowerCase()==e.HostType.Excel.toLowerCase()?[n(i),OSF.DataCoercion.serializeDynamicData(t),null==o.cellFormat?[]:o.cellFormat,null==o.tableOptions?[]:o.tableOptions,null!=o.imageWidth&&o.imageWidth,null!=o.imageHeight&&o.imageHeight]:[n(i),OSF.DataCoercion.serializeDynamicData(t),null==o.cellFormat?[]:o.cellFormat,null==o.tableOptions?[]:o.tableOptions]},fromSafeArrayHost:function(e){return e},toWebHost:function(){return{DdaSetBindingData:{CoerceType:i,Data:OSF.DataCoercion.serializeDynamicData(t),CellFormat:[],TableOptions:[]}}},fromWebHost:function(e){return e}};OSF._OfficeAppFactory.getAsyncMethodExecutor().executeAsync(65,a,r,null)},t.getSelectedDataAsync=function(t,i,a){var s,l=e.ValueFormat.Unformatted,c=e.FilterType.All;"function"==typeof i?a=i:void 0!==i&&(void 0!==i.valueFormat&&(l=i.valueFormat),void 0!==i.filterType&&(c=i.filterType),void 0!==i.asyncContext&&(s=i.asyncContext));var u={toSafeArrayHost:function(){return[n(t),o(l),r(c)]},fromSafeArrayHost:function(e){return OSF.DataCoercion.deserializeDynamicData(e,t)},toWebHost:function(){return{DdaGetBindingData:{CoerceType:t,ValueFormat:l,FilterType:c}}},fromWebHost:function(e){return OSF.DataCoercion.deserializeDynamicData(e.Data,t)}};OSF._OfficeAppFactory.getAsyncMethodExecutor().executeAsync(64,u,a,s)}}(t.document||(t.document={}))}(e.context||(e.context={}))}(Office||(Office={})),function(e){var t=function(){function e(e,t){this._rows=e,this._header=t}return Object.defineProperty(e.prototype,"headers",{get:function(){return this._header},set:function(e){this._header=this.fixData(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._rows},set:function(e){this._rows=null==e||OSF.OUtil.isArray(e)&&0==e.length?[]:this.fixData(e)},enumerable:!0,configurable:!0}),e.prototype.fixData=function(e){if(null==e||null==e)return null;try{for(var t=OSF.DataCoercion.findArrayDimensionality(e);t<2;t++)e=[e];return e}catch(e){}},e}();e.TableData=t,e.manufactureTableData=function(t){return new e.TableData(t[OSF.TableDataProperties.TableRows],t[OSF.TableDataProperties.TableHeaders])}}(Office||(Office={})),function(e){!function(t){!function(t){!function(e){e.OfficeThemeChangedEvent="OfficeThemeChangedEvent",e.DocumentThemeChangedEvent="DocumentThemeChangedEvent"}(t.EventDescriptors||(t.EventDescriptors={})),e.V10ApiFeatureRegistry.register({defineMethodsFunc:function(){e.AsyncMethodCalls.define({method:e.AsyncMethods.GetDocumentThemeAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e.DDA.Theming.ConvertToDocumentTheme}),e.AsyncMethodCalls.define({method:e.AsyncMethods.GetOfficeThemeAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e.DDA.Theming.ConvertToOfficeTheme})},defineSafeArrayParameterMapFunc:function(){e.HostParameterMap.define({type:85,fromHost:[{name:e.ParameterNames.OfficeTheme,value:e.HostParameterMap.self}]}),e.HostParameterMap.define({type:e.ParameterNames.OfficeTheme,fromHost:[{name:e.DDA.Theming.OfficeThemeEnum.BodyForegroundColor,value:0},{name:e.DDA.Theming.OfficeThemeEnum.BodyBackgroundColor,value:1},{name:e.DDA.Theming.OfficeThemeEnum.ControlForegroundColor,value:2},{name:e.DDA.Theming.OfficeThemeEnum.ControlBackgroundColor,value:3}],isComplexType:!0}),e.HostParameterMap.define({type:e.EventDispId.dispidOfficeThemeChangedEvent,fromHost:[{name:e.DDA.Theming.EventDescriptors.OfficeThemeChangedEvent,value:e.HostParameterMap.self}],isComplexType:!0}),e.HostParameterMap.define({type:e.DDA.Theming.EventDescriptors.OfficeThemeChangedEvent,fromHost:[{name:e.ParameterNames.OfficeTheme,value:e.HostParameterMap.self}],isComplexType:!0})},defineWebParameterMapFunc:function(){e.HostParameterMap.addComplexType(e.ParameterNames.DocumentTheme),e.HostParameterMap.addComplexType(e.ParameterNames.OfficeTheme),e.HostParameterMap.define({type:e.EventDispId.dispidOfficeThemeChangedEvent,fromHost:[{name:e.ParameterNames.OfficeTheme,value:e.HostParameterMap.self}]}),e.HostParameterMap.define({type:e.ParameterNames.OfficeTheme,fromHost:[{name:e.DDA.Theming.OfficeThemeEnum.BodyForegroundColor,value:e.DDA.Theming.OfficeThemeEnumWac.PrimaryFontColor},{name:e.DDA.Theming.OfficeThemeEnum.BodyBackgroundColor,value:e.DDA.Theming.OfficeThemeEnumWac.PrimaryBackgroundColor},{name:e.DDA.Theming.OfficeThemeEnum.ControlForegroundColor,value:e.DDA.Theming.OfficeThemeEnumWac.SecondaryFontColor},{name:e.DDA.Theming.OfficeThemeEnum.ControlBackgroundColor,value:e.DDA.Theming.OfficeThemeEnumWac.SecondaryBackgroundColor}],isComplexType:!0})},initializeFunc:function(){var n=e._OfficeAppFactory.getHostInfo();n&&n.hostPlatform==e.HostInfoPlatform.web&&n.hostType.toLowerCase()==Office.HostType.Word.toLowerCase()&&Office.context.officeTheme&&(Office.context.officeTheme[e.DDA.Theming.OfficeThemeEnum.IsDarkTheme]=t.GetIsDarkThemeFromCSSHexColor(Office.context.officeTheme.bodyBackgroundColor));Office.context&&Office.context.themeManager&&Office.context.themeManager.InitializeAndChangeOnce()}});var n=function(){function n(){this._eventTarget=null,this._previousDocumentThemeData=null,this._previousOfficeThemeData=null,this._officeCss=null,this._asyncCallsCompleted=null,this._onAsyncCallsCompleted=null}return n.prototype.InitializeThemeManager=function(){this._eventTarget=this,e.DispIdHost.addAsyncMethods(this,[e.AsyncMethods.GetOfficeThemeAsync,e.AsyncMethods.GetDocumentThemeAsync]),e.DispIdHost.addEventSupport(this,new e.EventDispatch([Microsoft.Office.WebExtension.EventType.OfficeThemeChanged,Microsoft.Office.WebExtension.EventType.DocumentThemeChanged]))},n.prototype.InitializeAndChangeOnce=function(t){var n=this;this._officeCss=this._getOfficeThemesCss(),this._officeCss?(this._onAsyncCallsCompleted=t,this._asyncCallsCompleted={},this._asyncCallsCompleted[e.AsyncMethods.GetOfficeThemeAsync]=!1,this._asyncCallsCompleted[e.AsyncMethods.GetDocumentThemeAsync]=!1,this._getAndProcessThemeData(this._eventTarget.getOfficeThemeAsync,(function(e){n._processOfficeThemeData(e)}),e.AsyncMethods.GetOfficeThemeAsync)):t&&t()},n.prototype.isDarkTheme=function(){var e=!1;if(Office.context&&Office.context.officeTheme&&Office.context.officeTheme.bodyBackgroundColor){var n=Office.context.officeTheme.bodyBackgroundColor;e=t.GetIsDarkThemeFromCSSHexColor(n)}return e},n.prototype._getOfficeThemesCss=function(){try{return function(){for(var t="officethemes.css",n=0;n-1){var i=n[Object.keys(n)[r]];try{var a=o(t),s=void 0;if((s=Array.isArray(i)?function(e,t){for(var n=0;n0){if(s.major>a.major)return!0;if(s.major==a.major&&s.minor>a.minor)return!0;if(s.major==a.major&&s.minor==a.minor&&s.patch>=a.patch)return!0}}catch(e){return!1}}return!1}},n={isSetSupported:function(e,t){try{return!!(Office&&Office.context&&Office.context.requirements)&&Office.context.requirements.isSetSupported(e,Number(t))}catch(e){return!1}}};function o(e){var t=e.split("."),n=0,o=0,r=0;if(t.length<2&&isNaN(Number(e)))throw"version format incorrect";if(n=Number(t[0]),t.length>=2&&(o=Number(t[1])),t.length>=3&&(r=Number(t[2])),isNaN(n)||isNaN(o)||isNaN(r))throw"version format incorrect";return{major:n,minor:o,patch:r}}}(OfficeRuntime||(OfficeRuntime={}));var OfficeRuntime;__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(e){OfficeExtension.BatchApiHelper.createPropertyObject,OfficeExtension.BatchApiHelper.createMethodObject,OfficeExtension.BatchApiHelper.createIndexerObject,OfficeExtension.BatchApiHelper.createRootServiceObject;var t=OfficeExtension.BatchApiHelper.createTopLevelServiceObject,n=(OfficeExtension.BatchApiHelper.createChildItemObject,OfficeExtension.BatchApiHelper.invokeMethod),o=(OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,OfficeExtension.BatchApiHelper.invokeSetProperty,OfficeExtension.Utility.isNullOrUndefined),r=(OfficeExtension.Utility.isUndefined,OfficeExtension.Utility.throwIfNotLoaded,OfficeExtension.Utility.throwIfApiNotSupported,OfficeExtension.Utility.load,OfficeExtension.Utility.retrieve,OfficeExtension.Utility.toJson),i=OfficeExtension.Utility.fixObjectPathIfNecessary,a=(OfficeExtension.Utility._handleNavigationPropertyResults,OfficeExtension.Utility.adjustToDateTime,OfficeExtension.Utility.processRetrieveResult),s=(OfficeExtension.Utility.setMockData,OfficeExtension.CommonUtility.calculateApiFlags,function(e){this._dialogService=e});e.Dialog=s;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.close=function(){return this._dialogService.close(),OfficeExtension.CoreUtility.Promise.resolve()},t}(s),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.close=function(){return this._dialogService.close(),this._dialogService.context.sync()},t}(s);function u(e){return/^(\-|\+)?([0-9]+)%?$/.test(e)}function d(e){var t,n=((t={})[12002]={code:"InvalidUrl",message:"Cannot load URL, no such page or bad URL syntax."},t[12003]={code:"InvalidUrl",message:"HTTPS is required."},t[12004]={code:"Untrusted",message:"Domain is not trusted."},t[12005]={code:"InvalidUrl",message:"HTTPS is required."},t[12007]={code:"FailedToOpen",message:"Another dialog is already opened."},t);return n[e]?n[e]:{code:"Unknown",message:"An unknown error has occured with code: "+e}}e.displayWebDialog=function(t,n){return void 0===n&&(n={}),new OfficeExtension.CoreUtility.Promise((function(o,r){if(n.width&&n.height&&(!u(n.width)||!u(n.height)))throw new OfficeExtension.Error({code:"InvalidArgument",message:'Dimensions must be "number%" or number.'});var i={width:n.width?parseInt(n.width):50,height:n.height?parseInt(n.height):50,displayInIFrame:n.displayInIFrame};e.ApiHelper.isNativeDialog()?function(e,t,n,o,r){void 0===r&&(r={});var i=new OfficeExtension.ClientRequestContext,a=p.newObject(i),s=new c(a),l=a.onDialogMessage.add((function(e){switch(OfficeExtension.Utility.log("dialogMessageHandler:"+JSON.stringify(e)),e.type){case 17:e.error?n(e.error):t(s);break;case 12:r.onMessage&&r.onMessage(e.message,s);break;case 10:default:12006===e.originalErrorCode?(l&&(l.remove(),i.sync()),r.onClose&&r.onClose()):r.onRuntimeError&&(r.onRuntimeError(e.error,s),n(e.error))}return OfficeExtension.CoreUtility.Promise.resolve()}));i.sync().then((function(){return a.displayDialog(o,e),i.sync()})).catch((function(e){n(e)}))}(i,o,r,t,n):function(e,t,n,o,r){void 0===r&&(r={});var i;function a(e){"failed"===e.status?n(new OfficeExtension.Error(d(e.error.code))):((i=e.value).addEventHandler(Office.EventType.DialogMessageReceived,s),i.addEventHandler(Office.EventType.DialogEventReceived,c),t(new l(i)))}function s(e){r.onMessage&&r.onMessage(e.message,i,e.origin)}function c(e){12006===e.error?r.onClose&&r.onClose():r.onRuntimeError&&r.onRuntimeError(new OfficeExtension.Error(d(e.error)),i)}Office.context.ui.displayDialogAsync(o,e,a)}(i,o,r,t,n)}))};var f,p=function(s){function l(){return null!==s&&s.apply(this,arguments)||this}return __extends(l,s),Object.defineProperty(l.prototype,"_className",{get:function(){return"DialogService"},enumerable:!0,configurable:!0}),l.prototype.close=function(){n(this,"Close",1,[],4,0)},l.prototype.displayDialog=function(e,t){n(this,"DisplayDialog",1,[e,t],4,0)},l.prototype._handleResult=function(e){(s.prototype._handleResult.call(this,e),o(e))||i(this,e)},l.prototype._handleRetrieveResult=function(e,t){s.prototype._handleRetrieveResult.call(this,e,t),a(this,e,t)},l.newObject=function(n){return t(e.DialogService,n,"Microsoft.Dialog.DialogService",!1,4)},Object.defineProperty(l.prototype,"onDialogMessage",{get:function(){return this.m_dialogMessage||(this.m_dialogMessage=new OfficeExtension.GenericEventHandlers(this.context,this,"DialogMessage",{eventType:65536,registerFunc:function(){},unregisterFunc:function(){},getTargetIdFunc:function(){return null},eventArgsTransformFunc:function(e){var t;try{var n=JSON.parse(e.message),o=n.errorCode?new OfficeExtension.Error(d(n.errorCode)):null;t={originalErrorCode:n.errorCode,type:n.type,error:o,message:n.message,origin:n.origin}}catch(e){t={originalErrorCode:null,type:17,error:new OfficeExtension.Error({code:"GenericException",message:"Unknown error"}),message:e.message}}return OfficeExtension.Utility._createPromiseFromResult(t)}})),this.m_dialogMessage},enumerable:!0,configurable:!0}),l.prototype.toJSON=function(){return r(this,{},{})},l}(OfficeExtension.ClientObject);e.DialogService=p,function(e){e[e.dialogMessageReceived=0]="dialogMessageReceived",e[e.dialogEventReceived=1]="dialogEventReceived"}(f||(f={})),function(e){e.generalException="GeneralException"}(e.DialogErrorCodes||(e.DialogErrorCodes={}))}(OfficeRuntime||(OfficeRuntime={})),function(e){!function(e){function t(e,t){try{var n=Microsoft.Office.WebExtension.FeatureGates[e];return null==n?t:"true"===n.toString().toLowerCase()}catch(e){return t}}function n(e,t){try{var n=Microsoft.Office.WebExtension.FeatureGates,o=parseInt(n[e]);return isNaN(o)?t:o}catch(e){return t}}function o(e,t){try{var n=Microsoft.Office.WebExtension.FeatureGates[e];return null==n?t:n}catch(e){return t}}e.getBooleanFeatureGate=t,e.getIntFeatureGate=n,e.getStringFeatureGate=o,e.getBooleanFeatureGateAsync=function(e,n){return Promise.resolve(t(e,n))},e.getIntFeatureGateAsync=function(e,t){return Promise.resolve(n(e,t))},e.getStringFeatureGateAsync=function(e,t){return Promise.resolve(o(e,t))}}(e.experimentation||(e.experimentation={}))}(OfficeRuntime||(OfficeRuntime={})),function(e){!function(e){var n={};function o(e){var t=e.eventName,o=e.message;n.hasOwnProperty(t)&&n[t].call(o)}e.on=function(e,r){return function(e,r){n.hasOwnProperty(e)||(n[e]=new t,function(){Office&&Office.context&&Office.context.messaging&&!Office.context.messaging.onMessage&&(Office.context.messaging.onMessage=o.bind(this))}());n[e].add(r)}(e,r),new Promise((function(e){e()}))},e.off=function(e,t){return function(e,t){n.hasOwnProperty(e)&&(t?n[e].remove(t):delete n[e])}(e,t),new Promise((function(e){e()}))},e.emit=function(e,t){return function(e,t){var n={eventName:e,message:t};Office&&Office.context&&Office.context.messaging&&Office.context.messaging.sendMessage&&Office.context.messaging.sendMessage(n)}(e,t),new Promise((function(e){e()}))}}(e.message||(e.message={}));var t=function(){function e(){this.listeners=[]}return e.prototype.add=function(e){this.listeners.push(e)},e.prototype.remove=function(e){var t=this.listeners.lastIndexOf(e);-1!==t&&this.listeners.splice(t,1)},e.prototype.call=function(e){this.listeners.forEach((function(t){return t(e)}))},e}();e.ListenerManager=t}(OfficeRuntime||(OfficeRuntime={})),function(e){OfficeExtension.BatchApiHelper.createPropertyObject,OfficeExtension.BatchApiHelper.createMethodObject,OfficeExtension.BatchApiHelper.createIndexerObject,OfficeExtension.BatchApiHelper.createRootServiceObject;var t=OfficeExtension.BatchApiHelper.createTopLevelServiceObject,n=(OfficeExtension.BatchApiHelper.createChildItemObject,OfficeExtension.BatchApiHelper.invokeMethod),o=(OfficeExtension.BatchApiHelper.invokeEnsureUnchanged,OfficeExtension.BatchApiHelper.invokeSetProperty,OfficeExtension.Utility.isNullOrUndefined),r=(OfficeExtension.Utility.isUndefined,OfficeExtension.Utility.throwIfNotLoaded,OfficeExtension.Utility.throwIfApiNotSupported,OfficeExtension.Utility.load,OfficeExtension.Utility.retrieve,OfficeExtension.Utility.toJson),i=OfficeExtension.Utility.fixObjectPathIfNecessary,a=(OfficeExtension.Utility._handleNavigationPropertyResults,OfficeExtension.Utility.adjustToDateTime,OfficeExtension.Utility.processRetrieveResult),s=(OfficeExtension.Utility.setMockData,OfficeExtension.CommonUtility.calculateApiFlags,"_Office_AsyncStorage_"),l=s+"|_unusedKey_",c={getItem:function(e){return p((function(t,n){return t.multiGet(n,JSON.stringify([e]))}),(function(e){var t=JSON.parse(e);return t&&t[0]&&t[0][1]?t[0][1]:null}))},setItem:function(e,t){return p((function(n,o){return n.multiSet(o,JSON.stringify([[e,t]]))}),(function(){return null}))},removeItem:function(e){return p((function(t,n){return t.multiRemove(n,JSON.stringify([e]))}),(function(){return null}))},getItems:function(e){return p((function(t,n){return t.multiGet(n,JSON.stringify(e))}),(function(t){var n=JSON.parse(t),o={};return n&&n.forEach((function(e){var t=e[0],n=e[1];return o[t]=n,n})),e&&e.forEach((function(e){o[e]&&o[e]})),o}))},setItems:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push([n,e[n]]);return p((function(e,n){return e.multiSet(n,JSON.stringify(t))}),(function(){return null}))},removeItems:function(e){return p((function(t,n){return t.multiRemove(n,JSON.stringify(e))}),(function(){return null}))},getKeys:function(){return p((function(e,t){return e.getAllKeys(t)}),(function(e){return JSON.parse(e)}))}},u={getItem:function(e){return m((function(){return d(e)}))},setItem:function(e,t){return g((function(){return f(e,t)}))},removeItem:function(e){return g((function(){return window.localStorage.removeItem(s+e)}))},getItems:function(e){return new Promise((function(t,n){var o={},r=[];try{h()}catch(e){n(e)}e.forEach((function(e){try{var t=d(e);o[e]=t||null}catch(e){r.push(e)}})),r.length>0?n(new Error("Unknown error.")):t(o)}))},setItems:function(e){return y(e,(function(t){return f(t,e[t])}))},removeItems:function(e){return y(e,(function(e){return window.localStorage.removeItem(s+e)}))},getKeys:function(){return m((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(s)})).map((function(e){return e.substr(s.length)}))}))}};function d(e){return window.localStorage.getItem(s+e)}function f(e,t){window.localStorage.setItem(s+e,t)}function p(e,t){return new OfficeExtension.CoreUtility.Promise((function(n,o){var r=v.getInstance(),i=r.setCallBack((function(e,r){if(r)o(r);else{var i=t(e);n(i)}}));r.ctx.sync().then((function(){var t=r.getPersistentKvStorageService();return e(t,i),r.ctx.sync()})).catch((function(e){o(e)}))}))}function h(){f(l,null),window.localStorage.removeItem(l)}function g(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,o){try{h(),e(),t(null),n()}catch(e){t(e),o(e)}}))}function m(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,o){try{h();var r=e();t(null,r),n(r)}catch(e){t(e,null),o(e)}}))}function y(e,t,n){return void 0===n&&(n=function(){}),new Promise((function(o,r){var i=[];try{h()}catch(e){i.push(e)}for(var a in e)if(e.hasOwnProperty(a)||Array.isArray(e))try{Array.isArray(e)?t(e[a]):t(a)}catch(e){i.push(e)}n(i),i.length>0?r(i):o()}))}e.ApiHelper.isNativeStorage()?e.storage=c:e.storage=u;var v=function(){function e(){var e=this;this._invokeId=0,this._callDict={},this.ctx=new OfficeExtension.ClientRequestContext,this._perkvstorService=b.newObject(this.ctx),this._eventResult=this._perkvstorService.onPersistentStorageMessage.add((function(t){OfficeExtension.Utility.log("persistentKvStoragegMessageHandler:"+JSON.stringify(t));var n=e._callDict[t.invokeId];n&&(n(t.message,t.error),delete e._callDict[t.invokeId])}))}return e.getInstance=function(){return void 0===e.instance?e.instance=new e:e.instance._perkvstorService=b.newObject(e.instance.ctx),e.instance},e.prototype.getPersistentKvStorageService=function(){return this._perkvstorService},e.prototype.getCallBack=function(e){return this._callDict[e]},e.prototype.setCallBack=function(e){var t=this._invokeId;return this._callDict[this._invokeId++]=e,t},e}(),b=function(s){function l(){return null!==s&&s.apply(this,arguments)||this}return __extends(l,s),Object.defineProperty(l.prototype,"_className",{get:function(){return"PersistentKvStorageService"},enumerable:!0,configurable:!0}),l.prototype.clear=function(e){n(this,"Clear",1,[e],4,0)},l.prototype.getAllKeys=function(e){n(this,"GetAllKeys",1,[e],4,0)},l.prototype.multiGet=function(e,t){n(this,"MultiGet",1,[e,t],4,0)},l.prototype.multiRemove=function(e,t){n(this,"MultiRemove",1,[e,t],4,0)},l.prototype.multiSet=function(e,t){n(this,"MultiSet",1,[e,t],4,0)},l.prototype._handleResult=function(e){(s.prototype._handleResult.call(this,e),o(e))||i(this,e)},l.prototype._handleRetrieveResult=function(e,t){s.prototype._handleRetrieveResult.call(this,e,t),a(this,e,t)},l.newObject=function(n){return t(e.PersistentKvStorageService,n,"Microsoft.PersistentKvStorage.PersistentKvStorageService",!1,4)},Object.defineProperty(l.prototype,"onPersistentStorageMessage",{get:function(){return this.m_persistentStorageMessage||(this.m_persistentStorageMessage=new OfficeExtension.GenericEventHandlers(this.context,this,"PersistentStorageMessage",{eventType:65537,registerFunc:function(){},unregisterFunc:function(){},getTargetIdFunc:function(){return null},eventArgsTransformFunc:function(e){var t,n,o,r;try{var i=JSON.parse(e.message),a=parseInt(i.errorCode),s=0!=a?new OfficeExtension.Error((n=a,(o={})[16389]={code:"GenericException",message:"Unknown error."},o[65535]={code:"Unexcepted",message:"Catastrophic failure."},o[14]={code:"OutOfMemory",message:"Ran out of memory."},o[87]={code:"InvalidArg",message:"One or more arguments are invalid."},o[16385]={code:"NotImplemented",message:"Not implemented."},o[6]={code:"BadHandle",message:"File Handle is not Set."},o[5]={code:"AccessDenied",message:"Can't read the Storage File."},(r=o)[n]?r[n]:{code:"Unknown",message:"An unknown error has occured"})):null;t={invokeId:i.invokeId,message:i.message,error:s}}catch(e){t={invokeId:-1,message:e.message,error:new OfficeExtension.Error({code:"GenericException",message:"Unknown error"})}}return OfficeExtension.Utility._createPromiseFromResult(t)}})),this.m_persistentStorageMessage},enumerable:!0,configurable:!0}),l.prototype.toJSON=function(){return r(this,{},{})},l}(OfficeExtension.ClientObject);e.PersistentKvStorageService=b,function(e){e.generalException="GeneralException"}(e.ErrorCodes||(e.ErrorCodes={}))}(OfficeRuntime||(OfficeRuntime={}));__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),__assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0&&Array.isArray(n[0])&&n.length*n[0].length>1500&&d()){var r=Math.max(1,Math.round(1500/n[0].length));e._ValidateArraySize(n.length,n[0].length);for(var i=0;in.length&&(a=n.length-i);var s=e.getRow(i).untrack().getBoundingRect(e.getRow(i+a-1).untrack()).untrack(),l=n.slice(i,i+a);E(s,t,l,null!=o?o:0)}return!0}return!1}function u(e){return OfficeExtension.Utility.isSetSupported("ExcelApi",e.toString())}function d(){return u(1.3)}function f(e){return!("undefined"==typeof window||!window.Office||!window.Office.context)&&window.Office.context.platform===e}e.icons={},["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"].map((function(t,n){var o=r(t);e.icons[o]=[],l[n].map((function(n,i){n=r(n);var a={set:t,index:i};e.icons[o].push(a),e.icons[o][n]=a}))})),function(e){e.NotStarted="notStarted",e.Running="running",e.Succeeded="succeeded",e.Failed="failed"}(i||(i={})),function(e){e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NoContent=204]="NoContent",e[e.HighestSuccessCode=299]="HighestSuccessCode",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout"}(a||(a={})),function(e){e.Close="Session.close",e.CommitChanges="Session.commitChanges",e.Create="Session.resolveRequestUrlAndHeaderInfo",e.Refresh="Session.refreshSession"}(s=e.SessionOperation||(e.SessionOperation={}));var p=function(){function e(e,t,n){var o=void 0===n?{}:n,r=o.persistChanges,i=void 0===r||r,a=o.commitExplicitly,s=void 0===a||a;this.m_requestId="",this.m_workbookUrl=e?this.ensureUrlFormatEndWithSlash(e):"",this.m_requestHeaders=t||{},this.m_persistChanges=i,this.m_commitExplicitly=s}return Object.defineProperty(e.prototype,"requestId",{get:function(){return this.m_requestId},enumerable:!0,configurable:!0}),e.prototype.close=function(){var t=this;if(this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)){var n={method:"POST",url:this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url)+e.CLOSE_SESSION,headers:this.m_requestUrlAndHeaderInfo.headers,body:""};return OfficeExtension.HttpUtility.sendRequest(n).then((function(n){if(n.statusCode!==a.NoContent)throw t.createErrorFromResponseInfo(n,s.Close);for(var o in t.m_requestUrlAndHeaderInfo=null,t.m_requestHeaders)if(o.toLowerCase()===e.WorkbookSessionIdHeaderNameLower){delete t.m_requestHeaders[o];break}}))}return OfficeExtension.Utility._createPromiseFromResult(null)},e.prototype.commitChanges=function(t){var n=this;if(void 0===t&&(t={}),!this.m_commitExplicitly)throw this.createError(a.InternalServerError,"Can not call commitChanges() if commitExplicitly is not set.",s.CommitChanges);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.CommitChanges);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.CommitChanges);var o=this.createCommitChangesRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(o).then((function(o){var r=o.statusCode;if(r===a.Accepted)return n.delay(e.POLL_DELAY).then((function(r){return n.pollResourceLocation(n.getHeaderIgnoreCase(o.headers,e.LOCATION_HEADER),s.CommitChanges,t)})).then((function(e){if(JSON.parse(e.body).status===i.Failed)throw n.createErrorFromResponseInfo(e,s.CommitChanges);return n.parseCooldownTime(e)}));if(r>=a.OK&&r<=a.HighestSuccessCode)return n.parseCooldownTime(o);throw n.createErrorFromResponseInfo(o,s.CommitChanges)}))},e.prototype._resolveRequestUrlAndHeaderInfo=function(t){var n=this;if(void 0===t&&(t={}),this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(this.getHeaderIgnoreCase(this.m_requestHeaders,e.WorkbookSessionIdHeaderNameLower))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);var o=this.createAsyncGraphSessionRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(o).then((function(o){if(n.m_requestId=n.getHeaderIgnoreCase(o.headers,e.REQUEST_ID_HEADER),o.statusCode!==a.Accepted&&o.statusCode!==a.Created)throw n.createErrorFromResponseInfo(o,s.Create);return o.statusCode===a.Created?(n.formatRequestUrlAndHeaderInfo(o),n.m_requestUrlAndHeaderInfo):n.delay(e.POLL_DELAY).then((function(r){return n.pollResourceLocation(n.getHeaderIgnoreCase(o.headers,e.LOCATION_HEADER),s.Create,t)})).then((function(o){var r=JSON.parse(o.body);if(r.status===i.Failed)throw n.createErrorFromResponseInfo(o,s.Create);var a={method:"GET",url:r.resourceLocation,headers:__assign({},t,{Authorization:n.getHeaderIgnoreCase(n.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(a).then((function(e){return n.formatRequestUrlAndHeaderInfo(e),n.m_requestUrlAndHeaderInfo}))}))}))},e.prototype.refreshSession=function(){var e=this;if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.Refresh);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.Refresh);var t=this.createRefreshSessionRequestInfo();return OfficeExtension.HttpUtility.sendRequest(t).then((function(t){if(t.statusCode!=a.NoContent)throw e.createErrorFromResponseInfo(t,s.Refresh);return OfficeExtension.Utility._createPromiseFromResult(null)}))},e.prototype.getHeaderIgnoreCase=function(e,t){var n=Object.keys(e).filter((function(e){return e.toLowerCase()===t.toLowerCase()}));return n.length>0?e[n[0]]:void 0},e.prototype.createCommitChangesRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.COMMIT_CHANGES,o={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,o),OfficeExtension.Utility._copyHeaders(t,o),o[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:o,body:{}}},e.prototype.createAsyncGraphSessionRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.CREATE_SESSION,o={};return OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,o),OfficeExtension.Utility._copyHeaders(t,o),o[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,o[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:o,body:{persistChanges:this.m_persistChanges,commitExplicitly:this.m_commitExplicitly}}},e.prototype.createRefreshSessionRequestInfo=function(){var t=this.getCorrectGraphVersionUrl()+e.REFRESH_SESSION,n={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,n),n[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,{url:t,method:"POST",headers:n,body:{}}},e.prototype.getCorrectGraphVersionUrl=function(){return this.m_workbookUrl.replace(new RegExp("graph.microsoft.com/.*?/"),"graph.microsoft.com/"+e.ASYNC_API_GRAPH_VERSION+"/")},e.prototype.pollResourceLocation=function(t,n,o,r){var s=this;if(void 0===o&&(o={}),void 0===r&&(r=0),r>=e.MAX_POLL_ATTEMPTS)throw this.createError(a.InternalServerError,"Timout while polling for the resource location.",n);var l={method:"GET",url:t,headers:__assign({},o,{Authorization:this.getHeaderIgnoreCase(this.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(l).then((function(l){if(l.statusCode!==a.OK)return s.pollResourceLocation(t,n,o,r+1);switch(JSON.parse(l.body).status){case i.Succeeded:case i.Failed:return l;case i.NotStarted:case i.Running:return s.delay(e.POLL_DELAY).then((function(e){return s.pollResourceLocation(t,n,o,r+1)}));default:throw s.createErrorFromResponseInfo(l,n)}}))},e.prototype.parseCooldownTime=function(t){var n=this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER);return n?1e3*parseInt(n):e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER},e.prototype.formatRequestUrlAndHeaderInfo=function(t){if(t.statusCode!==a.OK&&t.statusCode!==a.Created)throw this.createErrorFromResponseInfo(t,s.Create);var n=JSON.parse(t.body).id,o={};OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,o),o[e.WorkbookSessionIdHeaderName]=n,this.m_requestUrlAndHeaderInfo={url:this.getCorrectGraphVersionUrl(),headers:o}},e.prototype.ensureUrlFormatEndWithSlash=function(e){return"/"!==e.charAt(e.length-1)&&(e+="/"),e},e.prototype.delay=function(e){return new OfficeExtension.CoreUtility.Promise((function(t,n){return setTimeout((function(){return t()}),e)}))},e.prototype.createErrorFromResponseInfo=function(t,n){var o=OfficeExtension.Utility._parseErrorResponse(t),r={retryAfter:this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER),responseBody:OfficeExtension.Utility._parseErrorResponseBody(t)};return OfficeExtension.Utility.createRuntimeError(o.errorCode,o.errorMessage,n,t.statusCode,r)},e.prototype.createError=function(e,t,n){return OfficeExtension.Utility.createRuntimeError(""+e,t,n)},e.WorkbookSessionIdHeaderName="Workbook-Session-Id",e.WorkbookSessionIdHeaderNameLower="workbook-session-id",e.ASYNC_API_GRAPH_VERSION="beta",e.POLL_DELAY=1e4,e.MAX_POLL_ATTEMPTS=10,e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER=1e4,e.LOCATION_HEADER="location",e.AUTHORIZATION_HEADER="authorization",e.REQUEST_ID_HEADER="request-id",e.RETRY_AFTER_HEADER="retry-after",e.PREFER_HEADER="Prefer",e.PREFER_HEADER_VAL="respond-async",e.CONTENT_TYPE_HEADER="Content-Type",e.CONTENT_TYPE_HEADER_VAL="application/json",e.CLOSE_SESSION="closeSession",e.COMMIT_CHANGES="commitChanges",e.CREATE_SESSION="createSession",e.REFRESH_SESSION="refreshSession",e}();e.Session=p;var h=function(t){function n(n){var o=t.call(this,n)||this;return o.m_workbook=A(e.Workbook,o),o._rootObject=o.m_workbook,o._rootObjectPropertyName="workbook",o}return __extends(n,t),n.prototype._processOfficeJsErrorResponse=function(e,t){5004===e&&(t.ErrorCode=W.invalidOperationInCellEditMode,t.HttpStatusCode=400,t.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode))},Object.defineProperty(n.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"runtime",{get:function(){return this.workbook._Runtime},enumerable:!0,configurable:!0}),n}(OfficeCore.RequestContext);e.RequestContext=h;var g=function(){function e(){}return e.enableMacroRecordingEvent=function(e){OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=!0;var t=function(e){return e.requestHeaders[OfficeExtension.Constants.officeScriptFireRecordingEvent]="true",e.workbook.onRecordingStateChangedEvent.add((function(e){return OfficeExtension._internalConfig.appendTypeNameToObjectPathInfo=e.recording,OfficeExtension.Utility._createPromiseFromResult(null)})),OfficeExtension.Utility._createPromiseFromResult(null)};return null!=e?t(e):y((function(e){return t(e)}))},e}();function m(e,t){var n=e;n.delayForCellEdit&&OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")?t._requestFlagModifier|=64:t._requestFlagModifier&=-65,n._makerSafe&&(t._requestFlagModifier|=1024)}function y(t,n){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,(function(t){return new e.RequestContext(t)}),m)}function v(e){var t={BindingColumnCount:e.bindingColumnCount,BindingId:e.bindingId,BindingRowCount:e.bindingRowCount,bindingType:e.bindingType,HasHeaders:e.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function b(e,t){var n;return n=null==e.headers?e.rows:e,void 0===(n=window.OSF.DDA.DataCoercion.coerceData(n,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]))?null:n}function _(e){if(!("undefined"!=typeof window&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version))return!1;var t=window.Office.context.diagnostics.platform.toLowerCase();if("officeonline"===t)return!1;var n=e[t];null==n&&(n=e.general);var o=window.Office.context.diagnostics.version,r=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(o);if(r){var i=parseInt(r[1]),a=parseInt(r[2]),s=parseInt(r[3]);if(i0?i=n.getOffsetRange(o,r):(i=n,a=o,s=r),1===Math.abs(t)?i:i.getBoundingRect(n.getOffsetRange(o*t+a,r*t+s))},t}();e.RangeCustom=x,function(t){t.Range_HandleResult=function(e,t){I(t.isEntireColumn)||(e.m_isEntireColumn=t.isEntireColumn),I(t.isEntireRow)||(e.m_isEntireRow=t.isEntireRow)},t.Range_GetColumnsAfter=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsAfter",n,t.getLastColumn(),0,1)})},t.Range_GetColumnsBefore=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsBefore",n,t.getColumn(0),0,-1)})},t.Range_GetResizedRange=function(e,t,n){return d()?{handled:!1,result:null}:(e._ensureInteger(t,"getResizedRange"),e._ensureInteger(n,"getResizedRange"),{handled:!0,result:(t>=0&&n>=0?e:e.getCell(0,0)).getBoundingRect(e.getLastCell().getOffsetRange(t,n))})},t.Range_GetRowsAbove=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getRowsAbove",n,t.getRow(0),-1,0)})},t.Range_GetRowsBelow=function(t,n){return d()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:this._getAdjacentRange("getRowsBelow",n,t.getLastRow(),1,0)})},t.Range_Formulas_Set=function(e,t){return e.m_formulas=t,c(e,"Formulas",t)?{handled:!0}:{handled:!1}},t.Range_FormulasLocal_Set=function(e,t){return e.m_formulasLocal=t,c(e,"FormulasLocal",t)?{handled:!0}:{handled:!1}},t.Range_FormulasR1C1_Set=function(e,t){return e.m_formulasR1C1=t,c(e,"FormulasR1C1",t)?{handled:!0}:{handled:!1}},t.Range_NumberFormat_Set=function(e,t){return e.m_numberFormat=t,c(e,"NumberFormat",t,F(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_Values_Set=function(e,t){return e.m_values=t,c(e,"Values",t,F(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJson_Set=function(e,t){return e.m_valuesAsJson=t,c(e,"ValuesAsJson",t,F(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}},t.Range_ValuesAsJsonLocal_Set=function(e,t){return e.m_valuesAsJsonLocal=t,c(e,"ValuesAsJsonLocal",t,F(2,"ExcelApiUndo","1.7"))?{handled:!0}:{handled:!1}}}(e._CC||(e._CC={})),function(t){t.SettingCollection_Add=function(n,o,r){return r=t._replaceDateWithStringDate(r),{handled:!0,result:S(e.Setting,n,"Add",0,[o,r],!1,!0,null,0)}},t.SettingCollection_SettingsChanged_EventArgsTransform=function(e,t){return{settings:e}}}(e._CC||(e._CC={})),function(e){var t="Date(";function n(e){var n=JSON.stringify(e,(function(e,n){return this[e]instanceof Date?t+this[e].getTime()+")":n}));return e=JSON.parse(n)}e._replaceDateWithStringDate=n,e.Setting_HandleResult=function(e,n){I(n.Value)||(n.Value=function(e){var n=JSON.stringify(e);return JSON.parse(n,(function(e,n){var o;return"string"==typeof n&&n&&n.length>6&&n.slice(0,5)===t&&")"===n.slice(-1)&&(o=new Date(parseInt(n.slice(5,-1))))?o:n}))}(n.Value))},e.Setting_Value_Set=function(e,t){if(!R(t)){e.m_value=t;var o=n(t);return E(e,"Value",o,0),{handled:!0}}return{handled:!1}}}(e._CC||(e._CC={}));var k=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.NamedItemCollectionCustom=k,function(e){e.Binding_DataChanged_EventArgsTransform=function(e,t){return{binding:e}},e.Binding_SelectionChanged_EventArgsTransform=function(e,t){return{binding:e,columnCount:t.columnCount,rowCount:t.rowCount,startColumn:t.startColumn,startRow:t.startRow}}}(e._CC||(e._CC={}));var N=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.TableCollectionCustom=N,function(t){t.TableCollection_Changed_EventArgsTransform=function(t,n){var o,r=n;return null==r.valueBefore&&null==r.valueAfter||(o={valueBefore:r.valueBefore,valueAfter:r.valueAfter,valueTypeBefore:r.valueTypeBefore,valueTypeAfter:r.valueTypeAfter,valueAsJsonBefore:r.valueAsJsonBefore,valueAsJsonAfter:r.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:r.changeType,source:r.source,worksheetId:r.worksheetId,tableId:r.tableId,address:r.address,getRange:function(e){return T("TableChangedEventArgs.getRange",O,"1.8",C),e.workbook._GetRangeForEventByReferenceId(r.referenceId)},getRangeOrNullObject:function(e){return T("TableChangedEventArgs.getRangeOrNullObject",O,"1.8",C),e.workbook._GetRangeOrNullObjectForEventByReferenceId(r.referenceId)},details:o}}}(e._CC||(e._CC={})),function(t){t.Table_HandleIdResult=function(e,t){I(t.Id)||(t.Id=t.Id.toString())},t.Table_HandleResult=function(e,t){I(t.Id)||(t.Id=t.Id.toString())},t.Table_Changed_EventArgsTransform=function(t,n){var o,r=n;return null==r.valueBefore&&null==r.valueAfter||(o={valueBefore:r.valueBefore,valueAfter:r.valueAfter,valueTypeBefore:r.valueTypeBefore,valueTypeAfter:r.valueTypeAfter,valueAsJsonBefore:r.valueAsJsonBefore,valueAsJsonAfter:r.valueAsJsonAfter}),{type:e.EventType.tableChanged,changeType:r.changeType,source:r.source,worksheetId:r.worksheetId,tableId:r.tableId,address:r.address,getRange:function(e){return T("TableChangedEventArgs.getRange",O,"1.8",C),e.workbook._GetRangeForEventByReferenceId(r.referenceId)},getRangeOrNullObject:function(e){return T("TableChangedEventArgs.getRangeOrNullObject",O,"1.8",C),e.workbook._GetRangeOrNullObjectForEventByReferenceId(r.referenceId)},details:o}},t.Table_SelectionChanged_EventArgsTransform=function(t,n){var o=n,r=!o.address||0===o.address.length;return{type:e.EventType.tableSelectionChanged,isInsideTable:!r,worksheetId:o.worksheetId,tableId:t.id,address:o.address}}}(e._CC||(e._CC={}));var M=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ChartCollectionCustom=M,function(t){t.ChartCollection_Add=function(t,n,o,r){if(!(o instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Charts.Add");return{handled:!1,result:null}}}(e._CC||(e._CC={})),function(t){t.Chart_SetData=function(t,n,o){if(!(n instanceof e.Range))throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument,"sourceData","Chart.setData");return{handled:!1}}}(e._CC||(e._CC={}));var H=function(){function e(){}return e.prototype.load=function(e){return w(this,e),this},e}();e.ChartFillCustom=H;var U=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.VisualCollectionCustom=U,function(e){e.VisualCollection_AgaveVisualUpdate_EventArgsTransform=function(e,t){var n=t;return{type:n.type,payload:n.payload}}}(e._CC||(e._CC={})),function(t){t.Visual_ChangeNotification_EventArgsTransform=function(t,n){var o=n;return{targetId:o.targetId,changeType:o.changeType,payload:o.payload,type:e.EventType.visualChange}}}(e._CC||(e._CC={}));var j=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.PivotTableCollectionCustom=j,function(t){t.PivotLayout_GetColumnLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:S(e.Range,t,"GetColumnLabelRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataBodyRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:S(e.Range,t,"GetDataBodyRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetDataHierarchy=function(t,n){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:(T("PivotLayout.getDataHierarchy",O,"1.9",C),{handled:!0,result:S(e.DataPivotHierarchy,t,"GetDataHierarchy",0,[n],!1,!1,null,0)})},t.PivotLayout_GetFilterAxisRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:S(e.Range,t,"GetFilterAxisRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:S(e.Range,t,"GetRange",0,[],!1,!1,null,0)}},t.PivotLayout_GetRowLabelRange=function(t){return OfficeExtension.Utility.isSetSupported("Pivot","1.5")?{handled:!1,result:void 0}:{handled:!0,result:S(e.Range,t,"GetRowLabelRange",0,[],!1,!1,null,0)}}}(e._CC||(e._CC={})),function(e){e.PivotField_SortByLabels=function(e,t){return"string"==typeof t&&(t="ascending"===t.toLowerCase()),P(e,"SortByLabels",0,[t],0,0),{handled:!0}}}(e._CC||(e._CC={})),function(t){t.NumberFormattingService_GetFormatter=function(t,n){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(T("NumberFormatting.GetFormatter","NumberFormatting","1.1",C),{handled:!0,result:S(e.NumberFormatter,t,"GetFormatter",0,[n],!1,!1,null,0)})}}(e._CC||(e._CC={})),function(e){e.NumberFormatter_Format=function(e,t){return OfficeExtension.Utility.isSetSupported("NumberFormatting","1.2")?{handled:!1,result:void 0}:(T("NumberFormatter.Format","NumberFormatting","1.1",C),{handled:!0,result:P(e,"Format",0,[t],0,0)})}}(e._CC||(e._CC={}));var L=function(){function n(){}return n.register=function(n,o){return T("CustomFunctionManager.register","CustomFunctions","1.3",C),t({delayForCellEdit:!0},(function(t){return e.CustomFunctionManager.newObject(t).register(n,o)}))},n.getStatus=function(){return T("CustomFunctionManager.register","CustomFunctions","1.3",C),t({delayForCellEdit:!0},(function(t){var n=e.CustomFunctionManager.newObject(t).load("status");return t.sync().then((function(){return n.status}))}))},n}();e.CustomFunctionManagerCustom=L,function(e){e.CustomFunctionManager_StaticCustomize=function(e){e.register=L.register,e.getStatus=L.getStatus}}(e._CC||(e._CC={})),function(e){e.Style_TextOrientation_Set=function(e,t){return e.m_textOrientation=t,E(e,"Orientation",t,0),{handled:!0}}}(e._CC||(e._CC={})),function(e){e.InternalTest_Test1Event_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}},e.InternalTest_TestEvent_EventArgsTransform=function(e,t){var n=t;return{prop1:n.prop1,worksheet:e.context.workbook.worksheets.getItem(n.worksheetId)}}}(e._CC||(e._CC={}));var B=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventTargetId",{get:function(){return this._ParentObject?this._ParentObject.id:OfficeExtension.Constants.eventWorkbookId},enumerable:!0,configurable:!0}),e}();e.CommentCollectionCustom=B;var W,V=function(){function e(){}return Object.defineProperty(e.prototype,"_ParentObject",{get:function(){return this.m__ParentObject},set:function(e){this.m__ParentObject=e},enumerable:!0,configurable:!0}),e}();e.ShapeCollectionCustom=V,function(e){e.accessDenied="AccessDenied",e.apiNotFound="ApiNotFound",e.conflict="Conflict",e.emptyChartSeries="EmptyChartSeries",e.filteredRangeConflict="FilteredRangeConflict",e.formulaLengthExceedsLimit="FormulaLengthExceedsLimit",e.generalException="GeneralException",e.inactiveWorkbook="InactiveWorkbook",e.insertDeleteConflict="InsertDeleteConflict",e.invalidArgument="InvalidArgument",e.invalidBinding="InvalidBinding",e.invalidOperation="InvalidOperation",e.invalidReference="InvalidReference",e.invalidSelection="InvalidSelection",e.itemAlreadyExists="ItemAlreadyExists",e.itemNotFound="ItemNotFound",e.mergedRangeConflict="MergedRangeConflict",e.nonBlankCellOffSheet="NonBlankCellOffSheet",e.notImplemented="NotImplemented",e.openWorkbookLinksBlocked="OpenWorkbookLinksBlocked",e.operationCellsExceedLimit="OperationCellsExceedLimit",e.pivotTableRangeConflict="PivotTableRangeConflict",e.powerQueryRefreshResourceChallenge="PowerQueryRefreshResourceChallenge",e.rangeExceedsLimit="RangeExceedsLimit",e.refreshWorkbookLinksBlocked="RefreshWorkbookLinksBlocked",e.requestAborted="RequestAborted",e.responsePayloadSizeLimitExceeded="ResponsePayloadSizeLimitExceeded",e.unsupportedFeature="UnsupportedFeature",e.unsupportedFillType="UnsupportedFillType",e.unsupportedOperation="UnsupportedOperation",e.unsupportedSheet="UnsupportedSheet",e.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"}(W=e.ErrorCodes||(e.ErrorCodes={})),e.Interfaces||(e.Interfaces={});new OfficeExtension.LibraryBuilder({metadata:{version:"1.0.0",name:"Excel",defaultApiSetName:"ExcelApi",hostName:"Excel",apiSets:[["1.19","ExcelApiUndo"],["1.1","Recorder"],["99.9"],["1.4","ExcelApiUndo"],["1.8"],["1.9"],["1.11"],["1.18"],["1.6"],["1.6","ExcelApiUndo"],["1.7"],["1.1","ExcelApiUndo"],["1.2"],["1.3"],["1.4"],["1.5"],["1.10"],["1.14"],["1.1","ExcelApiOnline"],["1.1","CustomFunctions"],["1.1","WACOperationEvents"],["1.3","ExcelApiUndo"],["1.13"],["1.16"],["1.8","ExcelApiUndo"],["1.16","ExcelApiUndo"],["1.12"],["1.2","ExcelApiOnline"],["1.2","ExcelApiUndo"],["1.17"],["1.7","ExcelApiUndo"],["1.10","ExcelApiUndo"],["1.14","ExcelApiUndo"],["1.15","ExcelApiUndo"],["1.15"],["1.17","ExcelApiUndo"],["99.99","ExcelApiUndo"],["1.9","ExcelApiUndo"],["1.11","ExcelApiUndo"],["1.12","ExcelApiUndo"],["1.13","ExcelApiUndo"],["1.18","ExcelApiUndo"]],strings:[],enumTypes:[["UndoChangeType",["undoAction","redoAction","undoOrRedoCleared","undoGroupAdded"]],["SDX",["guidedReapply"]],["BusinessBarEntryType",[],{officeScriptsRunningStatus:0,msFormsDataSyncRunningStatus:1}],["FormulaReferenceStyle",["a1","r1C1"]],["NavigationObjectType",["table","pivotTable","chart","shape","namedRange"]],["UserActivityType",["none","insertSheet","deleteSheet","renameSheet","changeCell","insertRow","insertColumn","deleteRow","deleteColumn","insertPartialRow","insertPartialColumn","insertPartialColumnRightToLeft","deletePartialRow","deletePartialColumn","deletePartialColumnRightToLeft","move","sort","mergeCells","unmergeCells","unknownOperation","genericEdit"]],["LineageEndOfLogStatus",["loadInProgress","success","endOfLog","purged","trimmed","unsupported","cleared","error"]],["LineageLoadType",["new","next","previous","latest"]],["LoadToType",["connectionOnly","table","pivotTable","pivotChart"]],["QueryError",["unknown","none","failedLoadToWorksheet","failedLoadToDataModel","failedDownload","failedToCompleteDownload"]],["RangeOptimizationType",["other","numberFormat","textAlignment","textProperties","cellBorder","fillColor","sheetProtection","rowHeight","rowVisibility"]],["WorkbookLinksHardToFindMessages",["none","containsDefinedNames","hiddenOrVeryHiddenSheet","hiddenFloatingObjects","lockedFloatingObjectsThroughVba","protectedSheet","containsConditionalFormatting","containsDataValidation","hiddenRowsAndColumns"]],["WorkbookLinksIconState",["ok","moreInfo","warning"]],["WorkbookLinksRefreshSettings",["ask","always","never"]],["WorkbookConditionalFormattingRulesManagerScope",["defaultScope","selectedRange","activatedWorksheet","activatedTable","activatedPivotTable"]],["WorkbookLinksRefreshMode",["manual","automatic"]],["HelpTopic",["showChanges","guidedReapply","externalCodeServiceDiagnostics"]],["DocumentTaskChangeAction",[],{unknown:"unknown",create:"create",assign:"assign",unassign:"unassign",unassignAll:"unassignAll",setSchedule:"setSchedule",setPercentComplete:"setPercentComplete",setPriority:"setPriority",remove:"remove",restore:"restore",setTitle:"setTitle",undo:"undo"}],["DataSourceType",["unknown","cube","localRange","localTable","oledbDefault"]],["DateFilterCondition",["unknown","equals","before","beforeOrEqualTo","after","afterOrEqualTo","between","tomorrow","today","yesterday","nextWeek","thisWeek","lastWeek","nextMonth","thisMonth","lastMonth","nextQuarter","thisQuarter","lastQuarter","nextYear","thisYear","lastYear","yearToDate","allDatesInPeriodQuarter1","allDatesInPeriodQuarter2","allDatesInPeriodQuarter3","allDatesInPeriodQuarter4","allDatesInPeriodJanuary","allDatesInPeriodFebruary","allDatesInPeriodMarch","allDatesInPeriodApril","allDatesInPeriodMay","allDatesInPeriodJune","allDatesInPeriodJuly","allDatesInPeriodAugust","allDatesInPeriodSeptember","allDatesInPeriodOctober","allDatesInPeriodNovember","allDatesInPeriodDecember"]],["LabelFilterCondition",["unknown","equals","beginsWith","endsWith","contains","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between"]],["PivotFilterType",["unknown","value","manual","label","date"]],["TopBottomSelectionType",["items","percent","sum"]],["ValueFilterCondition",["unknown","equals","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between","topN","bottomN"]],["BuiltInPivotTableStyle",["none","light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","light22","light23","light24","light25","light26","light27","light28","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11","dark12","dark13","dark14","dark15","dark16","dark17","dark18","dark19","dark20","dark21","dark22","dark23","dark24","dark25","dark26","dark27","dark28"]],["BuiltInSlicerStyle",["light1","light2","light3","light4","light5","light6","other1","other2","dark1","dark2","dark3","dark4","dark5","dark6"]],["BuiltInTableStyle",["light1","light2","light3","light4","light5","light6","light7","light8","light9","light10","light11","light12","light13","light14","light15","light16","light17","light18","light19","light20","light21","medium1","medium2","medium3","medium4","medium5","medium6","medium7","medium8","medium9","medium10","medium11","medium12","medium13","medium14","medium15","medium16","medium17","medium18","medium19","medium20","medium21","medium22","medium23","medium24","medium25","medium26","medium27","medium28","dark1","dark2","dark3","dark4","dark5","dark6","dark7","dark8","dark9","dark10","dark11"]],["ChartSeriesDimension",["categories","values","bubbleSizes"],{xvalues:"XValues",yvalues:"YValues"}],["PivotTableDateGroupBy",["invalid","bySeconds","byMinutes","byHours","byDays","byMonths","byQuarters","byYears"]],["PivotFilterTopBottomCriterion",["invalid","topItems","topPercent","topSum","bottomItems","bottomPercent","bottomSum"]],["SortBy",["ascending","descending"]],["AggregationFunction",["unknown","automatic","sum","count","average","max","min","product","countNumbers","standardDeviation","standardDeviationP","variance","varianceP"]],["ShowAsCalculation",["unknown","none","percentOfGrandTotal","percentOfRowTotal","percentOfColumnTotal","percentOfParentRowTotal","percentOfParentColumnTotal","percentOfParentTotal","percentOf","runningTotal","percentRunningTotal","differenceFrom","percentDifferenceFrom","rankAscending","rankDecending","index"]],["PivotAxis",["unknown","row","column","data","filter"]],["LinkedDataTypeRefreshMode",["unknown","manual","onLoad","periodic"]],["AxisType",["invalid","category","value","series"]],["AxisGroup",["primary","secondary"]],["AxisScaleType",["linear","logarithmic"]],["AxisCrosses",["automatic","maximum","minimum","custom"]],["AxisTickMark",["none","cross","inside","outside"]],["AxisTickLabelPosition",["nextToAxis","high","low","none"]],["TrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ChartAxisType",["invalid","category","value","series"]],["ChartAxisGroup",["primary","secondary"]],["ChartAxisScaleType",["linear","logarithmic"]],["ChartAxisPosition",["automatic","maximum","minimum","custom"]],["ChartAxisTickMark",["none","cross","inside","outside"]],["CalculationState",["done","calculating","pending"]],["ChartAxisTickLabelPosition",["nextToAxis","high","low","none"]],["ChartAxisDisplayUnit",["none","hundreds","thousands","tenThousands","hundredThousands","millions","tenMillions","hundredMillions","billions","trillions","custom"]],["ChartAxisTimeUnit",["days","months","years"]],["ChartBoxQuartileCalculation",["inclusive","exclusive"]],["ChartAxisCategoryType",["automatic","textAxis","dateAxis"]],["ChartBinType",["category","auto","binWidth","binCount"]],["ChartLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","grey25","grey50","grey75","automatic","roundDot"]],["ChartDataLabelPosition",["invalid","none","center","insideEnd","insideBase","outsideEnd","left","right","top","bottom","bestFit","callout"]],["ChartErrorBarsInclude",["both","minusValues","plusValues"]],["ChartErrorBarsType",["fixedValue","percent","stDev","stError","custom"]],["ChartMapAreaLevel",["automatic","dataOnly","city","county","state","country","continent","world"]],["ChartGradientStyle",["twoPhaseColor","threePhaseColor"]],["ChartGradientStyleType",["extremeValue","number","percent"]],["ChartTitlePosition",["automatic","top","bottom","left","right"]],["ChartLegendPosition",["invalid","top","bottom","left","right","corner","custom"]],["ChartMarkerStyle",["invalid","automatic","none","square","diamond","triangle","star","dot","dash","circle","plus","picture"],{x:"X"}],["ChartPlotAreaPosition",["automatic","custom"]],["ChartMapLabelStrategy",["none","bestFit","showAll"]],["ChartMapProjectionType",["automatic","mercator","miller","robinson","albers"]],["ChartParentLabelStrategy",["none","banner","overlapping"]],["ChartSeriesBy",["auto","columns","rows"]],["ChartDataSourceType",["localRange","externalRange","list","unknown"]],["ChartTextHorizontalAlignment",["center","left","right","justify","distributed"]],["ChartTextVerticalAlignment",["center","bottom","top","justify","distributed"]],["ChartTickLabelAlignment",["center","left","right"]],["ChartType",["invalid","columnClustered","columnStacked","columnStacked100","barClustered","barStacked","barStacked100","lineStacked","lineStacked100","lineMarkers","lineMarkersStacked","lineMarkersStacked100","pieOfPie","pieExploded","barOfPie","areaStacked","areaStacked100","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","line","pie","area","doughnut","radar","histogram","boxwhisker","pareto","regionMap","treemap","waterfall","sunburst","funnel"],{_3DColumnClustered:"3DColumnClustered",_3DColumnStacked:"3DColumnStacked",_3DColumnStacked100:"3DColumnStacked100",_3DBarClustered:"3DBarClustered",_3DBarStacked:"3DBarStacked",_3DBarStacked100:"3DBarStacked100",_3DPieExploded:"3DPieExploded",xyscatterSmooth:"XYScatterSmooth",xyscatterSmoothNoMarkers:"XYScatterSmoothNoMarkers",xyscatterLines:"XYScatterLines",xyscatterLinesNoMarkers:"XYScatterLinesNoMarkers",_3DAreaStacked:"3DAreaStacked",_3DAreaStacked100:"3DAreaStacked100",_3DColumn:"3DColumn",_3DLine:"3DLine",_3DPie:"3DPie",xyscatter:"XYScatter",_3DArea:"3DArea"}],["ChartUnderlineStyle",["none","single"]],["ChartDisplayBlanksAs",["notPlotted","zero","interplotted"]],["ChartPlotBy",["rows","columns"]],["ChartSplitType",["splitByPosition","splitByValue","splitByPercentValue","splitByCustomSplit"]],["ChartColorScheme",["colorfulPalette1","colorfulPalette2","colorfulPalette3","colorfulPalette4","monochromaticPalette1","monochromaticPalette2","monochromaticPalette3","monochromaticPalette4","monochromaticPalette5","monochromaticPalette6","monochromaticPalette7","monochromaticPalette8","monochromaticPalette9","monochromaticPalette10","monochromaticPalette11","monochromaticPalette12","monochromaticPalette13"]],["ChartTrendlineType",["linear","exponential","logarithmic","movingAverage","polynomial","power"]],["ShapeZOrder",["bringToFront","bringForward","sendToBack","sendBackward"]],["ShapeType",["unsupported","image","geometricShape","group","line"]],["ShapeScaleType",["currentSize","originalSize"]],["ShapeScaleFrom",["scaleFromTopLeft","scaleFromMiddle","scaleFromBottomRight"]],["ShapeFillType",["noFill","solid","gradient","pattern","pictureAndTexture","mixed"]],["ShapeFontUnderlineStyle",["none","single","double","heavy","dotted","dottedHeavy","dash","dashHeavy","dashLong","dashLongHeavy","dotDash","dotDashHeavy","dotDotDash","dotDotDashHeavy","wavy","wavyHeavy","wavyDouble"]],["PictureFormat",[],{unknown:"UNKNOWN",bmp:"BMP",jpeg:"JPEG",gif:"GIF",png:"PNG",svg:"SVG"}],["ShapeLineStyle",["single","thickBetweenThin","thickThin","thinThick","thinThin"]],["ShapeLineDashStyle",["dash","dashDot","dashDotDot","longDash","longDashDot","roundDot","solid","squareDot","longDashDotDot","systemDash","systemDot","systemDashDot"]],["ArrowheadLength",["short","medium","long"]],["ArrowheadStyle",["none","triangle","stealth","diamond","oval","open"]],["ArrowheadWidth",["narrow","medium","wide"]],["PremiumLicenseName",["python"]],["BindingType",["range","table","text"]],["BorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight","insideVertical","insideHorizontal","diagonalDown","diagonalUp"]],["BorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot","double","slantDashDot"]],["BorderWeight",["hairline","thin","medium","thick"]],["CalculationMode",["automatic","automaticExceptTables","manual"]],["RuntimeCalculationMode",[],{undefined:0,automatic:1,automaticExceptTables:2,manual:3}],["CalculationType",["recalculate","full","fullRebuild"]],["ClearApplyTo",["all","formats","contents","hyperlinks","removeHyperlinks"]],["VisualCategory",["column","bar","line","area","pie","donut","scatter","bubble","statistical","stock","combo","hierarchy","surface","map","funnel","radar","waterfall","threeD","other"]],["VisualPropertyType",["object","collection","string","double","int","bool","enum","color"]],["VisualChangeType",["dataChange","propertyChange","genericChange","selectionChange"]],["BoolMetaPropertyType",["writeOnly","readOnly","hideEntireSubtreeUI","hideMeButShowChildrenUI","expandableUI","nextPropOnSameLine","hideLabel","showResetUI","hasOwnExpandableSection","nextPropOnSameLineFOTP","showResetUIFOTP","untransferable","ignoreDuringChangeChartType","notTriviallyUndoable","volatileEnum","exceptionCollection","metaOnly","showHideCollection","errorMessage","infoMessage"]],["ConditionalDataBarAxisFormat",["automatic","none","cellMidPoint"]],["ConditionalDataBarDirection",["context","leftToRight","rightToLeft"]],["ConditionalFormatDirection",["top","bottom"]],["ConditionalFormatType",["custom","dataBar","colorScale","iconSet","topBottom","presetCriteria","containsText","cellValue"]],["ConditionalFormatRuleType",["invalid","automatic","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalFormatIconRuleType",["invalid","number","percent","formula","percentile"]],["ConditionalFormatColorCriterionType",["invalid","lowestValue","highestValue","number","percent","formula","percentile"]],["ConditionalTopBottomCriterionType",["invalid","topItems","topPercent","bottomItems","bottomPercent"]],["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"]],["ConditionalTextOperator",["invalid","contains","notContains","beginsWith","endsWith"]],["ConditionalCellValueOperator",["invalid","between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual"]],["ConditionalIconCriterionOperator",["invalid","greaterThan","greaterThanOrEqual"]],["ConditionalRangeBorderIndex",["edgeTop","edgeBottom","edgeLeft","edgeRight"]],["ConditionalRangeBorderLineStyle",["none","continuous","dash","dashDot","dashDotDot","dot"]],["ConditionalRangeFontUnderlineStyle",["none","single","double"]],["CustomFunctionType",["invalid","script","webService"]],["CustomFunctionMetadataFormat",["invalid","openApi"]],["DataValidationType",["none","wholeNumber","decimal","list","date","time","textLength","custom","inconsistent","mixedCriteria"]],["DataValidationOperator",["between","notBetween","equalTo","notEqualTo","greaterThan","lessThan","greaterThanOrEqualTo","lessThanOrEqualTo"]],["DataValidationAlertStyle",["stop","warning","information"]],["DeleteShiftDirection",["up","left"]],["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"]],["FilterDatetimeSpecificity",["year","month","day","hour","minute","second"]],["FilterOn",["bottomItems","bottomPercent","cellColor","dynamic","fontColor","values","topItems","topPercent","icon","custom"]],["FilterOperator",["and","or"]],["HorizontalAlignment",["general","left","center","right","fill","justify","centerAcrossSelection","distributed"]],["IconSet",["invalid","threeArrows","threeArrowsGray","threeFlags","threeTrafficLights1","threeTrafficLights2","threeSigns","threeSymbols","threeSymbols2","fourArrows","fourArrowsGray","fourRedToBlack","fourRating","fourTrafficLights","fiveArrows","fiveArrowsGray","fiveRating","fiveQuarters","threeStars","threeTriangles","fiveBoxes"]],["ImageFittingMode",["fit","fitAndCenter","fill"]],["InsertShiftDirection",["down","right"]],["NamedItemScope",["worksheet","workbook"]],["NamedItemType",["string","integer","double","boolean","range","error","array"]],["RangeUnderlineStyle",["none","single","double","singleAccountant","doubleAccountant"]],["SheetVisibility",["visible","hidden","veryHidden"]],["EventTriggerSource",["unknown","thisLocalAddin"]],["RangeValueType",["unknown","empty","string","integer","double","boolean","error","richValue"]],["KeyboardDirection",["left","right","up","down"]],["SearchDirection",["forward","backwards"]],["SortOrientation",["rows","columns"]],["SortOn",["value","cellColor","fontColor","icon"]],["SortDataOption",["normal","textAsNumber"]],["SortMethod",["pinYin","strokeCount"]],["VerticalAlignment",["top","center","bottom","justify","distributed"]],["MessageCategory",[],{none:0,customFunction:1,action:2,event:65536}],["MessageType",[],{none:0,testEvent:1,test1Event:2,worksheetDataChangedEvent:10,worksheetActivatedEvent:11,worksheetDeactivatedEvent:12,worksheetAddedEvent:13,worksheetSelectionChangedEvent:14,worksheetDeletedEvent:15,worksheetCalculatedEvent:16,worksheetFilteredEvent:17,worksheetFormatChangedEvent:18,worksheetRowSortedEvent:19,worksheetColumnSortedEvent:20,worksheetSingleClickedEvent:21,worksheetRowHiddenChangedEvent:22,worksheetFormulaChangedEvent:23,worksheetProtectionChangedEvent:24,worksheetNameChangedEvent:25,worksheetVisibilityChangedEvent:26,worksheetMovedEvent:27,worksheetNavigationObjectChangedEvent:28,worksheetRowHeightChangedEvent:29,workbookFormulaReferenceStyleChangedEvent:30,chartAddedEvent:50,chartActivatedEvent:51,chartDeactivatedEvent:52,chartDeletedEvent:53,tableSelectionChangedEvent:100,tableDataChangedEvent:101,tableAddedEvent:102,tableDeletedEvent:103,tableFilteredEvent:104,agaveVisualUpdateEvent:150,customFunctionExecutionBeginEvent:200,customFunctionExecutionEndEvent:201,commentAddedEvent:250,commentDeletedEvent:251,commentChangedEvent:252,invocationMessage:1e3,cancellationMessage:1001,metadataMessage:1002,visualSelectionChangedEvent:2e3,visualChangeEvent:2001,visualTrackerModelChangedEvent:2002,shapeSelectionChangedEvent:2100,shapeActivatedEvent:2101,shapeDeactivatedEvent:2102,shapeAddedEvent:2103,shapeDeletedEvent:2104,workbookAutoSaveSettingChangedEvent:2200,wacoperationEvent:2201,recordingStateChangedEvent:2202,workbookActivatedEvent:2203,workbookNavigationObjectChangedEvent:2204,ribbonCommandExecutedEvent:2300,linkedDataTypeRefreshRequestCompletedEvent:2500,linkedDataTypeRefreshModeChangedEvent:2501,linkedDataTypeLinkedDataTypeAddedEvent:2502,linkedWorkbookWorkbookLinksChangedEvent:2600,linkedWorkbookRefreshCompletedEvent:2601,rangePickerSelectionChangedEvent:2700,rangePickerDeactivatedEvent:2701,lineageActivityUpdateAvailableEvent:2800,lineageActivityFilterUpdatedEvent:2801,lineageActivityLoadCompletedEvent:2802,pivotTableAddedEvent:2900,pivotTableDeletedEvent:2901,namedItemAddedEvent:3e3,namedItemDeletedEvent:3001,guidedReapplyManagerUpdateAvailableEvent:3100,vbaRecorderRecordingChangedEvent:3200,vbaRecorderRecordingChanged2Event:3202,workbookActionRecordedEvent:3201,externalCodeServiceDiagnosticsNewEntryEvent:3300,externalCodeServiceDiagnosticsFilterUpdatedEvent:3301,rangeValuesPreviewDismissedEvent:3400,applicationUndoChangedEvent:3500,appRuntimeVisibilityChangedEvent:65539,beforeCloseNotifiactionCancelledEvent:65540,augmentationLoopAnnotationAddedEvent:65541}],["InsertDeleteCellsShiftDirection",["none","shiftCellLeft","shiftCellUp","shiftCellRight","shiftCellDown"]],["DocumentPropertyType",["number","boolean","date","string","float"]],["EventSource",["local","remote"]],["DataChangeType",["unknown","rangeEdited","rowInserted","rowDeleted","columnInserted","columnDeleted","cellInserted","cellDeleted"]],["RowHiddenChangeType",["unhidden","hidden"]],["CommentChangeType",["commentEdited","commentResolved","commentReopened","replyAdded","replyDeleted","replyEdited"]],["EventType",["worksheetChanged","worksheetSelectionChanged","worksheetAdded","worksheetActivated","worksheetDeactivated","tableChanged","tableSelectionChanged","worksheetDeleted","chartAdded","chartActivated","chartDeactivated","chartDeleted","worksheetCalculated","visualSelectionChanged","agaveVisualUpdate","tableAdded","tableDeleted","tableFiltered","worksheetFiltered","shapeActivated","shapeDeactivated","visualChange","workbookAutoSaveSettingChanged","worksheetFormatChanged","ribbonCommandExecuted","worksheetRowSorted","worksheetColumnSorted","worksheetSingleClicked","worksheetRowHiddenChanged","recordingStateChangedEvent","commentAdded","commentDeleted","commentChanged","linkedDataTypeRefreshRequestCompleted","linkedDataTypeRefreshModeChanged","linkedDataTypeLinkedDataTypeAdded","worksheetFormulaChanged","workbookActivated","linkedWorkbookWorkbookLinksChanged","linkedWorkbookRefreshCompleted","worksheetProtectionChanged","worksheetNameChanged","worksheetVisibilityChanged","worksheetMoved","lineageActivityUpdateAvailable","lineageActivityFilterUpdated","lineageActivityLoadCompleted","shapeAdded","shapeDeleted","pivotTableAdded","pivotTableDeleted","namedItemAdded","namedItemDeleted","worksheetNavigationObjectChanged","workbookNavigationObjectChanged","worksheetRowHeightChanged","workbookFormulaReferenceStyleChanged","guidedReapplyManagerUpdateAvailable","vbaRecorderRecordingChanged","rangeValuesPreviewDismissed","annotationAdded","workbookActionRecorded","applicationUndoChanged","vbaRecorderRecordingChanged2"],{wacoperationEvent:"WACOperationEvent"}],["DocumentPropertyItem",["title","subject","author","keywords","comments","template","lastAuth","revision","appName","lastPrint","creation","lastSave","category","format","manager","company"]],["SubtotalLocationType",["atTop","atBottom","off"]],["PivotLayoutType",["compact","tabular","outline"]],["ProtectionSelectionMode",["normal","unlocked","none"]],["PageOrientation",["portrait","landscape"]],["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"]],["ReadingOrder",["context","leftToRight","rightToLeft"]],["BuiltInStyle",["normal","comma","currency","percent","wholeComma","wholeDollar","hlink","hlinkTrav","note","warningText","emphasis1","emphasis2","emphasis3","sheetTitle","heading1","heading2","heading3","heading4","input","output","calculation","checkCell","linkedCell","total","good","bad","neutral","accent1","accent1_20","accent1_40","accent1_60","accent2","accent2_20","accent2_40","accent2_60","accent3","accent3_20","accent3_40","accent3_60","accent4","accent4_20","accent4_40","accent4_60","accent5","accent5_20","accent5_40","accent5_60","accent6","accent6_20","accent6_40","accent6_60","explanatoryText"]],["PrintErrorType",["asDisplayed","blank","dash","notAvailable"]],["WorksheetPositionType",["none","before","after","beginning","end"]],["PrintComments",["noComments","endSheet","inPlace"]],["PrintOrder",["downThenOver","overThenDown"]],["PrintMarginUnit",["points","inches","centimeters"]],["HeaderFooterState",["default","firstAndDefault","oddAndEven","firstOddAndEven"]],["AutoFillType",["fillDefault","fillCopy","fillSeries","fillFormats","fillValues","fillDays","fillWeekdays","fillMonths","fillYears","linearTrend","growthTrend","flashFill"]],["GroupOption",["byRows","byColumns"]],["RangeCopyType",["all","formulas","values","formats","link"]],["LinkedDataTypeState",["none","validLinkedData","disambiguationNeeded","brokenLinkedData","fetchingData"]],["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"]],["ConnectorType",["straight","elbow","curve"]],["ContentType",["plain","mention"]],["SpecialCellType",["conditionalFormats","dataValidations","blanks","constants","formulas","sameConditionalFormat","sameDataValidation","visible"]],["SpecialCellValueType",["all","errors","errorsLogical","errorsNumbers","errorsText","errorsLogicalNumber","errorsLogicalText","errorsNumberText","logical","logicalNumbers","logicalText","logicalNumbersText","numbers","numbersText","text"]],["Placement",["twoCell","oneCell","absolute"]],["FillPattern",["none","solid","gray50","gray75","gray25","horizontal","vertical","down","up","checker","semiGray75","lightHorizontal","lightVertical","lightDown","lightUp","grid","crissCross","gray16","gray8","linearGradient","rectangularGradient"]],["ShapeTextHorizontalAlignment",["left","center","right","justify","justifyLow","distributed","thaiDistributed"]],["ShapeTextVerticalAlignment",["top","middle","bottom","justified","distributed"]],["ShapeTextVerticalOverflow",["overflow","ellipsis","clip"]],["ShapeTextHorizontalOverflow",["overflow","clip"]],["ShapeTextReadingOrder",["leftToRight","rightToLeft"]],["ShapeTextOrientation",["horizontal","vertical","vertical270","wordArtVertical","eastAsianVertical","mongolianVertical","wordArtVerticalRTL"]],["ShapeAutoSize",["autoSizeNone","autoSizeTextToFitShape","autoSizeShapeToFitText","autoSizeMixed"]],["CloseBehavior",["save","skipSave"]],["SaveBehavior",["save","prompt"]],["SlicerSortType",["dataSourceOrder","ascending","descending"]],["RibbonTab",["others","home","insert","draw","pageLayout","formulas","data","review","view","developer","addIns","help"]],["NumberFormatCategory",["general","number","currency","accounting","date","time","percentage","fraction","scientific","text","special","custom"]]],clientObjectTypes:[["UndoScope",0,0,0,[["close",0,0,0,2],["open",1,0,0,2]]],["RangeValuesPreview",4,0,0,[["_RegisterEventDismissed",0,0,0,2,0,1],["_UnregisterEventDismissed",0,0,0,2,0,1],["dismiss",0,2,0,4],["show",3,2,0,4]],0,0,0,[["Dismissed",0,0,"MessageType.rangeValuesPreviewDismissedEvent","this._ParentObject.id","_RegisterEventDismissed","_UnregisterEventDismissed"]]],["AugmentationLoop",0,0,0,[["_RegisterAnnotationAddedEvent",0,2,0,4],["_UnregisterAnnotationAddedEvent",0,2,0,4],["activateAnnotation",1,2,0,4],["submitSignal",1,2,0,4]],0,0,0,[["AnnotationAdded",0,0,"MessageType.augmentationLoopAnnotationAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAnnotationAddedEvent","_UnregisterAnnotationAddedEvent"]]],["ExternalCodeService",0,0,[["diagnostics","ExternalCodeServiceDiagnostics",2,0,0,4]]],["ExternalCodeServiceDiagnostics",0,[["id",2]],0,[["_RegisterEventNewEntry",0,0,0,2,0,1],["_UnregisterEventNewEntry",0,0,0,2,0,1],["clear",0,2,0,4],["fireStoredEntries",0,2,0,4],["_RegisterEventFilterUpdated",0,0,0,2,0,1],["_UnregisterEventFilterUpdated",0,0,0,2,0,1]],0,0,0,[["FilterUpdated",0,0,"MessageType.externalCodeServiceDiagnosticsFilterUpdatedEvent","this.id","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["NewEntry",0,0,"MessageType.externalCodeServiceDiagnosticsNewEntryEvent","this.id","_RegisterEventNewEntry","_UnregisterEventNewEntry"]]],["VbaRecorder",0,[["id",2]],0,[["_RegisterEventRecordingChanged",0,0,0,2,0,1],["_UnregisterEventRecordingChanged",0,0,0,2,0,1],["_RegisterEventRecordingChanged2",0,2,2,4],["_UnregisterEventRecordingChanged2",0,2,2,4]],0,0,0,[["RecordingChanged",0,0,"MessageType.vbaRecorderRecordingChangedEvent","this.id","_RegisterEventRecordingChanged","_UnregisterEventRecordingChanged"],["RecordingChanged2",0,2,"MessageType.vbaRecorderRecordingChanged2Event","this.id","_RegisterEventRecordingChanged2","_UnregisterEventRecordingChanged2"]]],["WorksheetOptimizationScanResult",0,[["allocatedCells",2],["optimizableCells",2]],[["ranges","RangeOptimizationCollection",18,0,0,4]]],["UserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity"],["GuidedReapplyManager",0,0,[["activities","UserActivityCollection",18,0,0,4],["summaryCardUserActivity","SummaryCardUserActivity",2,0,0,4]],[["openSavedFile",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["discardActivites",0,2,0,4],["reapplyActivity",1,2,0,4],["saveActivities",0,2,0,4]],0,0,0,[["UpdateAvailable",0,0,"MessageType.guidedReapplyManagerUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["BusinessBar",0,0,0,[["hide",2],["show",2]]],["UserActivity",0,[["activityId",2],["activityType",2],["author",2],["createdDateTime",10],["guid",2],["rangeAddress",2],["sheetName",2],["valueChangeData",2],["authorEmail",2],["locationDeleted",2]],[["highlightRangeAreas","RangeAreas",2,0,0,4]]],["LineageActivityCollection",1,0,0,[["_RegisterEventUpdateAvailable",0,2,0,4],["_UnregisterEventUpdateAvailable",0,2,0,4],["clear",0,2,0,4],["getCount",0,2,0,4],["getState",0,2,0,4],["loadActivities",1,2,0,4],["loadLatestActivities",0,2,0,4],["loadNextActivities",0,2,0,4],["loadPreviousActivities",0,2,0,4],["updateActivities",0,2,0,4],["_RegisterEventFilterUpdated",0,2,0,4],["_RegisterEventLoadCompleted",0,2,0,4],["_UnregisterEventFilterUpdated",0,2,0,4],["_UnregisterEventLoadCompleted",0,2,0,4]],[["getItemAt","UserActivity",1,2,0,4]],0,"UserActivity",[["FilterUpdated",0,0,"MessageType.lineageActivityFilterUpdatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFilterUpdated","_UnregisterEventFilterUpdated"],["LoadCompleted",0,0,"MessageType.lineageActivityLoadCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventLoadCompleted","_UnregisterEventLoadCompleted"],["UpdateAvailable",0,0,"MessageType.lineageActivityUpdateAvailableEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUpdateAvailable","_UnregisterEventUpdateAvailable"]]],["SummaryItemUserActivity",0,[["activityType",2],["rangeAddresses",2],["sheetName",2],["valueChangeData",2]]],["SummaryItemUserActivityCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SummaryItemUserActivity",1,2,0,4]],0,"SummaryItemUserActivity"],["SummaryCardUserActivity",0,[["authors",2],["currentUser",2],["displayTime",10],["numberOfDetailedCard",2],["summaryUnviewableData",2]],[["summaryItemUserActivities","SummaryItemUserActivityCollection",18,0,0,4]]],["AllowEditRange",0,[["address",1],["isPasswordProtected",3],["title",1]],0,[["delete"],["pauseProtection",1],["setPassword",1]]],["AllowEditRangeCollection",1,0,0,[["add",3],["getCount",0,2,0,4],["pauseProtection",1]],[["getItem","AllowEditRange",1,18,0,4],["getItemAt","AllowEditRange",1,2,0,4],["getItemOrNullObject","AllowEditRange",1,2,0,4]],0,"AllowEditRange"],["Query",0,[["loadedTo",2],["loadedToDataModel",2],["name",2],["refreshDate",10],["rowsLoadedCount",2],["error",2]]],["QueryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Query",1,18,0,4]],0,"Query"],["VisualTracker",0,[["id",2]],0,[["_RegisterEventModelChanged",0,2],["_UnregisterEventModelChanged",0,2],["requestTrackingAlteration",2,2,0,4]],0,0,0,[["ModelChanged",0,0,"MessageType.visualTrackerModelChangedEvent","this.id","_RegisterEventModelChanged","_UnregisterEventModelChanged"]]],["NumberFormatProperty",0,[["key",3],["currency",3],["dateTime",3],["dateTimeHasDayOfWeek",3],["dateTimeHasMonth",3],["dateTimeHasYear",3],["numeric",3],["percent",3],["text",3]]],["NumberFormatPropertyCollection",1,0,0,0,[["getItemAt","NumberFormatProperty",1,2,0,4]],0,"NumberFormatProperty"],["RangeOptimization",0,[["optimizationTypes",2],["range",2]]],["RangeOptimizationCollection",1,[["allocatedCells",2],["optimizableCells",2]],0,[["getCount",0,2,0,4]],[["getItemAt","RangeOptimization",1,2,0,4]],0,"RangeOptimization"],["WorksheetOptimization",0,0,0,0,[["optimize","WorksheetOptimizationResult",0,0,0,2],["scan","RangeOptimizationCollection",0,6,0,4],["scanExtended","WorksheetOptimizationScanResult",0,2,0,4]]],["WorksheetOptimizationResult",0,[["allocatedCells",2],["optimizedCells",2]]],["LinkedWorkbook",0,[["displayUrl",2,3],["fileName",3,3],["id",2],["longErrorDescription",2,3],["refreshEnabled",2,3],["refreshing",2,3],["statusMessage",2,3],["excelIconState",2,3],["hardToFindErrorMessages",2,3],["lastUpdated",10,3]],0,[["_RegisterRefreshCompletedEvent",0,0,3,2,0,1],["_UnregisterRefreshCompletedEvent",0,0,3,2,0,1],["breakLinks"],["changeSource",1,0,3],["findNextLink",0,2,3,4],["openWorkbook",0,2,3,4],["refresh"],["openChangeSourceDialog",0,0,3],["closeChangeSourceDialog",0,0,3]],0,0,0,[["RefreshCompleted",0,3,"MessageType.linkedWorkbookRefreshCompletedEvent","this.id","_RegisterRefreshCompletedEvent","_UnregisterRefreshCompletedEvent"]]],["LinkedWorkbookCollection",1,[["breakAllLinksEnabled",0,3],["refreshAllEnabled",0,3],["workbookLinksRefreshMode"],["workbookLinksRefreshSettings",0,3],["containsNonWorkbookLinks",0,3]],0,[["_RegisterWorkbookLinksChangedEvent",0,2,3,4],["_UnregisterWorkbookLinksChangedEvent",0,2,3,4],["breakAllLinks"],["getCount",0,2,3,4],["refreshAll"],["openEditLinksDialog",0,2,3,4]],[["getItem","LinkedWorkbook",1,18,0,4],["getItemAt","LinkedWorkbook",1,2,3,4],["getItemOrNullObject","LinkedWorkbook",1]],0,"LinkedWorkbook",[["WorkbookLinksChanged",0,3,"MessageType.linkedWorkbookWorkbookLinksChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWorkbookLinksChangedEvent","_UnregisterWorkbookLinksChangedEvent"]]],["DocumentTaskChange",0,[["type",2],["changedBy",2],["commentId",2],["createdDateTime",10],["id",2],["assignee",2],["undoChangeId",2],["priority",2],["title",2],["percentComplete",2],["startDateTime",10],["dueDateTime",10]],0,0,0,0,0,0,"Microsoft.ExcelServices.DocumentTaskChange",4],["DocumentTaskChangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","DocumentTaskChange",1,2,0,4]],0,"DocumentTaskChange"],["RangePicker",0,0,0,[["activate",1,0,0,2,0,4],["deactivate",0,0,0,2,0,4],["updateSelection",1,0,0,2,0,4],["updateSelectionWithNavigation",4,0,0,2,0,4],["_RegisterEventSelectionChanged",0,0,0,2,0,4],["_UnregisterEventSelectionChanged",0,0,0,2,0,4],["_RegisterEventDeactivated",0,2,0,4],["_UnregisterEventDeactivated",0,2,0,4]],0,0,0,[["Deactivated",0,0,"MessageType.rangePickerDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventDeactivated","_UnregisterEventDeactivated"],["SelectionChanged",0,0,"MessageType.rangePickerSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventSelectionChanged","_UnregisterEventSelectionChanged"]]],["DocumentTask",0,[["startAndDueDateTime"],["id",2],["percentComplete"],["priority"],["title"],["assignees",2],["completedBy",2],["completedDateTime",10],["createdBy",2],["createdDateTime",10]],[["changes","DocumentTaskChangeCollection",18,0,0,4],["comment","Comment",2,0,0,4]],[["assign",1],["unassign",1],["unassignAll"]]],["DocumentTaskCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","DocumentTask",1,18,0,4],["getItemOrNullObject","DocumentTask",1,2,0,4],["getItemAt","DocumentTask",1,2,0,4]],0,"DocumentTask"],["DataConnection",0,[["connectionString",2],["name",2],["commandText",2],["dataSourceType",2]]],["Runtime",0,[["enableEvents",1,5]]],["Application",0,[["calculationMode",1],["calculationEngineVersion",3,6],["calculationState",3,6],["decimalSeparator",3,7],["thousandsSeparator",3,7],["useSystemSeparators",3,7],["formatStaleValues",1,8]],[["iterativeCalculation","IterativeCalculation",35,6,0,4],["ribbon","Ribbon",35,6,0,4],["cultureInfo","CultureInfo",3,7,0,4],["undoScope","UndoScope",3,3,0,4]],[["calculate",1],["suspendApiCalculationUntilNextSync",0,1,9,2,0,10],["suspendScreenUpdatingUntilNextSync",0,0,6,2,0,10],["hasLicense",1,2,8,4],["redo",0,0,3,2],["explorePremiumLicense",1,2,8,4],["undo",0,0,3,2],["_RegisterEventUndoChanged",0,2,3,4],["_UnregisterEventUndoChanged",0,2,3,4]],[["createWorkbook","WorkbookCreated",1,10,5,0,0,"_GetWorkbookCreatedById"],["_GetWorkbookCreatedById","WorkbookCreated",1,2,5,4]],0,0,[["UndoChanged",0,3,"MessageType.applicationUndoChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventUndoChanged","_UnregisterEventUndoChanged"]]],["IterativeCalculation",0,[["enabled",1],["maxIteration",1],["maxChange",1]]],["Workbook",0,[["name",3,11],["readOnly",3,5],["isDirty",1,6],["use1904DateSystem",1,8],["chartDataPointTrack",1,6],["usePrecisionAsDisplayed",1,6],["calculationEngineVersion",3,6],["autoSave",3,6],["previouslySaved",3,6],["showPivotFieldList",0,8,0,2,12],["formulaReferenceStyle",2,3]],[["worksheets","WorksheetCollection",19,0,0,4],["names","NamedItemCollection",19,0,0,4],["tables","TableCollection",19,0,0,4],["application","Application",2,0,0,4],["bindings","BindingCollection",19,0,0,4],["functions","Functions",2,13,0,4],["_V1Api","_V1Api",2,14,0,4],["pivotTables","PivotTableCollection",19,14,0,4],["settings","SettingCollection",19,15,0,4],["customXmlParts","CustomXmlPartCollection",19,16,0,4],["internalTest","InternalTest",2,9,0,4],["properties","DocumentProperties",35,11,0,4],["styles","StyleCollection",19,11,0,4],["protection","WorkbookProtection",3,11,0,4],["dataConnections","DataConnectionCollection",3,11,0,4],["_Runtime","Runtime",2,16,0,4],["comments","CommentCollection",19,17,0,4],["slicers","SlicerCollection",19,17,0,4],["tableStyles","TableStyleCollection",19,17,0,4],["pivotTableStyles","PivotTableStyleCollection",19,17,0,4],["slicerStyles","SlicerStyleCollection",19,17,0,4],["timelineStyles","TimelineStyleCollection",19,17,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["linkedDataTypes","LinkedDataTypeCollection",18,8,0,4],["queries","QueryCollection",18,18,0,4],["linkedWorkbooks","LinkedWorkbookCollection",18,19,0,4],["rangePicker","RangePicker",2,8,0,4,0,4],["lineageActivities","LineageActivityCollection",18,3,0,4],["businessBar","BusinessBar",2,8,0,4],["guidedReapply","GuidedReapplyManager",2,3,0,4],["vbaRecorder","VbaRecorder",2,8,0,4],["externalCodeService","ExternalCodeService",2,8,0,4],["augmentationLoop","AugmentationLoop",2,8,0,4]],[["_RemoveReference",1,2],["_GetObjectByReferenceId",1,2,0,4],["_GetObjectTypeNameByReferenceId",1,2,0,4],["_RemoveAllReferences",0,2],["_GetReferenceCount",0,2,0,4],["getIsActiveCollabSession",0,0,6],["registerCustomFunctions",7,0,20,8],["_SetOsfControlContainerReadyForCustomFunctions",0,0,20],["close",1,0,7],["save",1,0,7],["_RegisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_UnregisterAutoSaveSettingChangedEvent",0,0,6,2,0,1],["_RegisterWACOperationEvent",0,2,21,4],["_UnregisterWACOperationEvent",0,2,21,4],["_RegisterRecordingStateChangedEvent",0,0,21,2,0,22],["_UnregisterRecordingStateChangedEvent",0,0,21,2,0,22],["_RegisterActivatedEvent",0,2,23],["_UnregisterActivatedEvent",0,2,23],["insertWorksheetsFromBase64",2,0,23],["enableOfficeScriptRecording",1,1,19],["recordAction",1,3,0,4],["focus",0,2,3,4],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["showHelp",1,2,3,4],["getLinkedEntityCellValue",1,2,24,4],["getThemeColors",0,2,8,4],["_RegisterEventFormulaReferenceStyleChanged",0,2,3,4],["_UnregisterEventFormulaReferenceStyleChanged",0,2,3,4],["notifySDXLoaded",1,2,3,4],["openConditionalFormattingRulesManager",1,0,3],["openNameManager",0,0,3],["_RegisterEventActionRecorded",0,2,2,4],["_UnregisterEventActionRecorded",0,2,2,4]],[["getSelectedRange","Range",0,10,0,4],["getActiveCell","Range",0,10,11,4],["_GetRangeForEventByReferenceId","Range",1,2,0,4],["_GetRangeOrNullObjectForEventByReferenceId","Range",1,2,0,4],["getActiveChart","Chart",0,2,6,4],["getActiveChartOrNullObject","Chart",0,2,6,4],["getSelectedRanges","RangeAreas",0,10,6,4],["_GetRangesForEventByReferenceId","RangeAreas",1,2,6,4],["_GetRangesOrNullObjectForEventByReferenceId","RangeAreas",1,2,6,4],["getActiveSlicer","Slicer",0,2,17,4],["getActiveSlicerOrNullObject","Slicer",0,2,17,4]],0,0,[["ActionRecorded",0,2,"MessageType.workbookActionRecordedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventActionRecorded","_UnregisterEventActionRecorded"],["Activated",0,23,"MessageType.workbookActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["AutoSaveSettingChanged",0,6,"MessageType.workbookAutoSaveSettingChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAutoSaveSettingChangedEvent","_UnregisterAutoSaveSettingChangedEvent"],["FormulaReferenceStyleChanged",0,3,"MessageType.workbookFormulaReferenceStyleChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventFormulaReferenceStyleChanged","_UnregisterEventFormulaReferenceStyleChanged"],["NavigationObjectChanged",0,3,"MessageType.workbookNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["RecordingStateChangedEvent",0,21,"MessageType.recordingStateChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRecordingStateChangedEvent","_UnregisterRecordingStateChangedEvent"],["SelectionChanged",3,14,"_CC.office10EventIdDocumentSelectionChangedEvent","","",""],["WACOperationEvent",2,21,"MessageType.wacoperationEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterWACOperationEvent","_UnregisterWACOperationEvent"],["_Message",3,11,"_CC.office10EventIdRichApiMessageEvent","","",""]]],["WorkbookProtection",0,[["protected",3]],0,[["protect",1],["unprotect",1]]],["WorkbookCreated",0,[["id",3]],0,[["open",0,2,0,4]]],["Worksheet",0,[["name",1],["id",3],["position",1],["visibility",1],["tabColor",1,11,0,2,25],["standardWidth",1,11],["standardHeight",3,11],["showGridlines",5,5,0,2,26],["showHeadings",5,5],["enableCalculation",1,6],["tabId",3,18]],[["charts","ChartCollection",83,0,0,4],["tables","TableCollection",83,0,0,4],["protection","WorksheetProtection",3,13,0,4],["pivotTables","PivotTableCollection",83,14,0,4],["names","NamedItemCollection",83,15,0,4],["freezePanes","WorksheetFreezePanes",3,11,0,4],["pageLayout","PageLayout",35,6,0,4],["visuals","VisualCollection",83,17,0,4],["shapes","ShapeCollection",83,6,0,4],["horizontalPageBreaks","PageBreakCollection",19,6,0,4],["verticalPageBreaks","PageBreakCollection",19,6,0,4],["autoFilter","AutoFilter",3,6,0,4],["slicers","SlicerCollection",19,17,0,4],["comments","CommentCollection",83,17,0,4],["customProperties","WorksheetCustomPropertyCollection",19,27,0,4],["namedSheetViews","NamedSheetViewCollection",18,19,0,4],["optimization","WorksheetOptimization",2,8,0,4],["tasks","DocumentTaskCollection",18,8,0,4],["visualTracker","VisualTracker",2,28,0,4],["rangeValuesPreview","RangeValuesPreview",66,8,0,4]],[["delete"],["activate",0,2],["calculate",1,0,9],["_RegisterDataChangedEvent",0,0,11,2,0,10],["_UnregisterDataChangedEvent",0,0,11,2,0,10],["_RegisterActivatedEvent",0,0,11,2,0,1],["_UnregisterActivatedEvent",0,0,11,2,0,1],["_RegisterDeactivatedEvent",0,0,11,2,0,1],["_UnregisterDeactivatedEvent",0,0,11,2,0,1],["_RegisterSelectionChangedEvent",0,0,11,2,0,29],["_UnregisterSelectionChangedEvent",0,0,11,2,0,29],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["replaceAll",3,0,6],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,0,17,2,0,1],["_UnregisterRowSortedEvent",0,0,17,2,0,1],["_RegisterColumnSortedEvent",0,0,17,2,0,1],["_UnregisterColumnSortedEvent",0,0,17,2,0,1],["_RegisterSingleClickedEvent",0,0,17,2,0,1],["_UnregisterSingleClickedEvent",0,0,17,2,0,1],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["showOutlineLevels",2,0,17],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,0,30,2,0,1],["_RegisterEventVisibilityChanged",0,0,30,2,0,1],["_UnregisterEventNameChanged",0,0,30,2,0,1],["_UnregisterEventVisibilityChanged",0,0,30,2,0,1],["_RegisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_UnregisterNavigationObjectChangedEvent",0,0,3,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getRange","Range",1,10,0,4],["getUsedRange","Range",1,10,0,4],["getCell","Range",2,10,0,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getRangeByIndexes","Range",4,10,11,4],["getPrevious","Worksheet",1,10,16,4,0,"_GetSheetById"],["getPreviousOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNext","Worksheet",1,10,16,4,0,"_GetSheetById"],["getNextOrNullObject","Worksheet",1,10,16,4,0,"_GetSheetById"],["_GetSheetById","Worksheet",1,2,11,4],["copy","Worksheet",2,0,11,0,0,"_GetAnotherWorksheetById"],["_GetAnotherWorksheetById","Worksheet",1,0,11],["findAll","RangeAreas",2,10,6,4],["findAllOrNullObject","RangeAreas",2,10,6,4],["getRanges","RangeAreas",1,10,6,4],["getUsedRangeAreas","RangeAreas",1,0,3],["getRangeR1C1","Range",1,2,3,4],["getRangesR1C1","RangeAreas",1,2,3,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,0,3]],"workbook.worksheets",0,[["Activated",0,11,"MessageType.worksheetActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","this.id","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,11,"MessageType.worksheetDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","this.id","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","this.id","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","this.id","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","this.id","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["NavigationObjectChanged",0,3,"MessageType.worksheetNavigationObjectChangedEvent","this.id","_RegisterNavigationObjectChangedEvent","_UnregisterNavigationObjectChangedEvent"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","this.id","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","this.id","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","this.id","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","this.id","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,11,"MessageType.worksheetSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","this.id","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","this.id","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetCollection",1,0,0,[["getCount",1,2,15,4],["_RegisterAddedEvent",0,3,11],["_UnregisterAddedEvent",0,3,11],["_RegisterActivatedEvent",0,3,11],["_UnregisterActivatedEvent",0,0,11,2,0,29],["_RegisterDeactivatedEvent",0,0,11,2,0,29],["_UnregisterDeactivatedEvent",0,0,11,2,0,29],["_RegisterDeletedEvent",0,3,11],["_UnregisterDeletedEvent",0,3,11],["_RegisterCalculatedEvent",0,0,5,2,0,1],["_UnregisterCalculatedEvent",0,0,5,2,0,1],["_RegisterDataChangedEvent",0,3,6],["_UnregisterDataChangedEvent",0,3,6],["_RegisterSelectionChangedEvent",0,0,6,2,0,29],["_UnregisterSelectionChangedEvent",0,0,6,2,0,29],["addFromBase64",4,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["_RegisterFormatChangedEvent",0,0,6,2,0,1],["_UnregisterFormatChangedEvent",0,0,6,2,0,1],["_RegisterRowSortedEvent",0,3,17],["_UnregisterRowSortedEvent",0,3,17],["_RegisterColumnSortedEvent",0,3,17],["_UnregisterColumnSortedEvent",0,3,17],["_RegisterSingleClickedEvent",0,0,17,2,0,29],["_UnregisterSingleClickedEvent",0,0,17,2,0,29],["_RegisterRowHiddenChangedEvent",0,0,7,2,0,1],["_UnregisterRowHiddenChangedEvent",0,0,7,2,0,1],["_RegisterFormulaChangedEvent",0,2,23],["_UnregisterFormulaChangedEvent",0,2,23],["_RegisterProtectionChangedEvent",0,2,18],["_UnregisterProtectionChangedEvent",0,2,18],["_RegisterEventNameChanged",0,2,30,4],["_RegisterEventVisibilityChanged",0,2,30,4],["_UnregisterEventNameChanged",0,2,30,4],["_UnregisterEventVisibilityChanged",0,2,30,4],["_RegisterEventMoved",0,0,30,2,0,1],["_UnregisterEventMoved",0,0,30,2,0,1],["_RegisterEventRowHeightChanged",0,2,8],["_UnregisterEventRowHeightChanged",0,2,8]],[["getItem","Worksheet",1,18,0,4],["add","Worksheet",1,8,0,2,0,0,29],["getActiveWorksheet","Worksheet",0,2,0,4],["getItemOrNullObject","Worksheet",1,2,15,4],["getFirst","Worksheet",1,10,16,4],["getLast","Worksheet",1,10,16,4]],0,"Worksheet",[["Activated",0,11,"MessageType.worksheetActivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,11,"MessageType.worksheetAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Calculated",0,5,"MessageType.worksheetCalculatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCalculatedEvent","_UnregisterCalculatedEvent"],["Changed",2,6,"MessageType.worksheetDataChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["ColumnSorted",0,17,"MessageType.worksheetColumnSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterColumnSortedEvent","_UnregisterColumnSortedEvent"],["Deactivated",0,11,"MessageType.worksheetDeactivatedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,11,"MessageType.worksheetDeletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.worksheetFilteredEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["FormatChanged",2,6,"MessageType.worksheetFormatChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormatChangedEvent","_UnregisterFormatChangedEvent"],["FormulaChanged",2,23,"MessageType.worksheetFormulaChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterFormulaChangedEvent","_UnregisterFormulaChangedEvent"],["Moved",0,30,"MessageType.worksheetMovedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventMoved","_UnregisterEventMoved"],["NameChanged",0,30,"MessageType.worksheetNameChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventNameChanged","_UnregisterEventNameChanged"],["ProtectionChanged",0,18,"MessageType.worksheetProtectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterProtectionChangedEvent","_UnregisterProtectionChangedEvent"],["RowHeightChanged",0,8,"MessageType.worksheetRowHeightChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventRowHeightChanged","_UnregisterEventRowHeightChanged"],["RowHiddenChanged",0,7,"MessageType.worksheetRowHiddenChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowHiddenChangedEvent","_UnregisterRowHiddenChangedEvent"],["RowSorted",0,17,"MessageType.worksheetRowSortedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRowSortedEvent","_UnregisterRowSortedEvent"],["SelectionChanged",0,6,"MessageType.worksheetSelectionChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"],["SingleClicked",0,17,"MessageType.worksheetSingleClickedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterSingleClickedEvent","_UnregisterSingleClickedEvent"],["VisibilityChanged",0,30,"MessageType.worksheetVisibilityChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterEventVisibilityChanged","_UnregisterEventVisibilityChanged"]]],["WorksheetProtection",0,[["protected",3],["options",3],["canPauseProtection",3,19],["isPasswordProtected",3,19],["isPaused",3,19],["savedOptions",3,19]],[["allowEditRanges","AllowEditRangeCollection",19,19,0,4]],[["protect",2,1],["unprotect",1],["checkPassword",1,2,19,4],["pauseProtection",1,0,19],["resumeProtection",0,0,19],["setPassword",1,0,19],["updateOptions",1,0,19]]],["WorksheetFreezePanes",0,0,0,[["unfreeze"],["freezeAt",1],["freezeRows",1],["freezeColumns",1]],[["getLocation","Range",0,10,0,4],["getLocationOrNullObject","Range",0,10,0,4]]],["Range",14,[["numberFormat",5,0,0,2,31],["numberFormatLocal",1,11,0,2,31],["values",5,0,0,2,31],["text",3],["formulas",5,0,0,2,32],["formulasLocal",5,0,0,2,32],["rowIndex",3],["columnIndex",3],["rowCount",3],["columnCount",3],["address",3],["addressLocal",3],["cellCount",3],["_ReferenceId",2],["valueTypes",3],["formulasR1C1",5,13],["hidden",3,13],["rowHidden",1,13,0,2,32],["columnHidden",1,13,0,2,32],["isEntireColumn",3,11],["isEntireRow",3,11],["hyperlink",1,11,0,2,33],["style",1,11,0,2,32],["linkedDataTypeState",3,6],["hasSpill",3,27],["top",3,17],["left",3,17],["height",3,17],["width",3,17],["savedAsArray",3,27],["numberFormatCategories",3,27],["valuesAsJson",5,24],["valuesAsJsonLocal",5,24],["addressR1C1",2,3]],[["format","RangeFormat",35,0,0,4],["worksheet","Worksheet",2,0,0,4],["sort","RangeSort",3,13,0,4],["conditionalFormats","ConditionalFormatCollection",19,9,0,4],["dataValidation","DataValidation",35,5,0,4]],[["clear",1,0,0,2,0,32],["delete",1,0,0,2,0,34],["select",0,2],["_KeepReference",0,2],["merge",1,0,13,2,0,32],["unmerge",0,0,13],["_ValidateArraySize",2,2,14,4],["calculate",0,0,9],["showCard",0,0,11],["getImage",0,2,11,4],["replaceAll",3,0,6,2,0,32],["copyFrom",4,0,6,2,0,26],["convertToLinkedDataType",2,0,6],["convertDataTypeToText",0,0,6],["setDirty",0,0,6],["getCellProperties",1,0,6],["getRowProperties",1,0,6],["getColumnProperties",1,0,6],["setCellProperties",1,0,6],["setRowProperties",1,0,6],["setColumnProperties",1,0,6],["autoFill",2,0,6],["showTeachingCallout",2,0,6],["flashFill",0,0,6],["group",1,0,17],["ungroup",1,0,17],["showGroupDetails",1,0,17],["hideGroupDetails",1,0,17],["moveTo",1,0,7,2,0,26],["getDataClassificationIds",0,2,19,4]],[["getCell","Range",2,10,0,4],["getUsedRange","Range",1,10,0,4],["insert","Range",1,8,0,2,0,0,34],["getEntireColumn","Range",0,10,0,4],["getEntireRow","Range",0,10,0,4],["getOffsetRange","Range",2,10,0,4],["getRow","Range",1,10,0,4],["getColumn","Range",1,10,0,4],["getIntersection","Range",1,10,0,4],["getBoundingRect","Range",1,10,0,4],["getLastCell","Range",0,10,0,4],["getLastColumn","Range",0,10,0,4],["getLastRow","Range",0,10,0,4],["getIntersectionOrNullObject","Range",1,10,15,4],["getRowsAbove","Range",1,11,14,4],["getRowsBelow","Range",1,11,14,4],["getColumnsBefore","Range",1,11,14,4],["getColumnsAfter","Range",1,11,14,4],["getResizedRange","Range",2,11,14,4],["getVisibleView","RangeView",0,2,14,4],["getUsedRangeOrNullObject","Range",1,10,15,4],["getSurroundingRegion","Range",0,10,11,4],["getAbsoluteResizedRange","Range",2,10,11,4],["getTables","TableScopedCollection",1,6,6,4],["find","Range",2,10,6,4],["findOrNullObject","Range",2,10,6,4],["removeDuplicates","RemoveDuplicatesResult",2,8,6,2,0,0,33],["getSpecialCells","RangeAreas",2,10,6,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,6,4],["getSpillingToRange","Range",0,10,27,4],["getSpillParent","Range",0,10,27,4],["getSpillingToRangeOrNullObject","Range",0,10,27,4],["getSpillParentOrNullObject","Range",0,10,27,4],["getMergedAreas","RangeAreas",0,10,19,4],["getPivotTables","PivotTableScopedCollection",1,6,27,4],["getPrecedents","WorkbookRangeAreas",0,10,18,4],["getDirectPrecedents","WorkbookRangeAreas",0,10,27,4],["getDependents","WorkbookRangeAreas",0,10,35,4],["getDirectDependents","WorkbookRangeAreas",0,10,23,4],["getExtendedRange","Range",2,10,23,4],["getRangeEdge","Range",2,10,23,4],["getNumberFormatProperties","NumberFormatPropertyCollection",0,6,8,4],["getSurroundingDataRegion","Range",0,2,8,4],["getMergedAreasOrNullObject","RangeAreas",0,0,23,2,0,0,31]]],["RangeAreas",2,[["_ReferenceId",2],["address",3],["addressLocal",3],["areaCount",3],["cellCount",3],["isEntireColumn",3],["isEntireRow",3],["style",1],["addressR1C1",2,3]],[["areas","RangeCollection",19,0,0,4],["conditionalFormats","ConditionalFormatCollection",19,0,0,4],["format","RangeFormat",35,0,0,4],["dataValidation","DataValidation",35,0,0,4],["worksheet","Worksheet",2,0,0,4]],[["_KeepReference",0,2],["calculate"],["clear",1],["setDirty"],["copyFrom",4],["convertToLinkedDataType",2],["convertDataTypeToText"],["select",0,2,8]],[["getEntireColumn","RangeAreas",0,10,0,4],["getEntireRow","RangeAreas",0,10,0,4],["getIntersection","RangeAreas",1,10,0,4],["getIntersectionOrNullObject","RangeAreas",1,10,0,4],["getOffsetRangeAreas","RangeAreas",2,10,0,4],["getUsedRangeAreas","RangeAreas",1,10,0,4],["getUsedRangeAreasOrNullObject","RangeAreas",1,10,0,4],["getTables","TableScopedCollection",1,6,0,4],["getSpecialCells","RangeAreas",2,10,0,4],["getSpecialCellsOrNullObject","RangeAreas",2,10,0,4]]],["WorkbookRangeAreas",2,[["_ReferenceId",2],["addresses",3]],[["ranges","RangeCollection",19,0,0,4],["areas","RangeAreasCollection",19,0,0,4]],[["_KeepReference",0,2]],[["getRangeAreasBySheet","RangeAreas",1,10,0,4],["getRangeAreasOrNullObjectBySheet","RangeAreas",1,10,0,4]]],["RangeView",0,[["numberFormat",1],["values",1],["text",3],["formulas",1],["formulasLocal",1],["formulasR1C1",1],["valueTypes",3],["rowCount",3],["columnCount",3],["cellAddresses",3],["index",3],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["rows","RangeViewCollection",19,0,0,4]],0,[["getRange","Range",0,10,0,4]]],["RangeViewCollection",1,0,0,[["getCount",0,2,15,4]],[["getItemAt","RangeView",1,2,0,4]],0,"RangeView"],["SettingCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","Setting",1,18,0,4],["add","Setting",2,9],["getItemOrNullObject","Setting",1,2,0,4]],0,"Setting",[["SettingsChanged",3,0,"_CC.office10EventIdSettingsChangedEvent","","",""]]],["Setting",8,[["key",3],["value",5],["_Id",2]],0,[["delete"]]],["NamedItemCollection",5,0,0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","NamedItem",1,18,0,4],["getItemOrNullObject","NamedItem",1,2,15,4],["add","NamedItem",3,8,15],["addFormulaLocal","NamedItem",3,0,15]],0,"NamedItem",[["Added",0,3,"MessageType.namedItemAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.namedItemDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["NamedItem",0,[["name",3],["type",3],["value",3],["visible",1],["_Id",2],["comment",1,15],["scope",3,15],["formula",1,11],["valueAsJson",3,24],["valueAsJsonLocal",3,24]],[["worksheet","Worksheet",2,15,0,4],["worksheetOrNullObject","Worksheet",2,15,0,4],["arrayValues","NamedItemArrayValues",3,11,0,4]],[["delete",0,0,15]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,15,4]]],["NamedItemArrayValues",0,[["values",3],["types",3],["valuesAsJson",3,24],["valuesAsJsonLocal",3,24]]],["Binding",0,[["id",3],["type",3]],0,[["getText",0,2,0,4],["delete",0,0,14]],[["getTable","Table",0,2,0,4],["getRange","Range",0,2,0,4]],0,0,[["DataChanged",3,14,"_CC.office10EventIdBindingDataChangedEvent","this.id","",""],["SelectionChanged",3,14,"_CC.office10EventIdBindingSelectionChangedEvent","this.id","",""]]],["BindingCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","Binding",1,18,0,4],["getItemAt","Binding",1,2,0,4],["add","Binding",3,8,14],["addFromNamedItem","Binding",3,0,14],["addFromSelection","Binding",2,0,14],["getItemOrNullObject","Binding",1,2,15,4]],0,"Binding"],["TableCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["_RegisterAddedEvent",0,0,6,2,0,1],["_UnregisterAddedEvent",0,0,6,2,0,1],["_RegisterDeletedEvent",0,0,6,2,0,1],["_UnregisterDeletedEvent",0,0,6,2,0,1],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1]],[["getItem","Table",1,18,0,4],["getItemAt","Table",1,2,0,4],["add","Table",2,8,0,2,0,0,33],["getItemOrNullObject","Table",1,2,15,4],["addQueryTable","Table",2,0,8]],0,"Table",[["Added",0,6,"MessageType.tableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",2,11,"MessageType.tableDataChangedEvent","this._eventTargetId","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Deleted",0,6,"MessageType.tableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this._eventTargetId","_RegisterFilteredEvent","_UnregisterFilteredEvent"]]],["TableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getFirst","Table",0,10,0,4],["getItem","Table",1,18,0,4],["getItemOrNullObject","Table",1,2,18,4]],0,"Table"],["Table",24,[["id",3],["name",1,0,0,2,26],["showHeaders",1,0,0,2,33],["showTotals",1,0,0,2,33],["style",1,0,0,2,33],["highlightFirstColumn",1,14,0,2,33],["highlightLastColumn",1,14,0,2,33],["showBandedRows",1,14,0,2,33],["showBandedColumns",1,14,0,2,33],["showFilterButton",1,14,0,2,33],["legacyId",3,5]],[["columns","TableColumnCollection",19,0,0,4],["rows","TableRowCollection",19,0,0,4],["sort","TableSort",3,13,0,4],["worksheet","Worksheet",2,13,0,4],["autoFilter","AutoFilter",3,6,0,4],["tableStyle","TableStyle",35,8,0,4]],[["delete",0,0,0,2,0,26],["clearFilters",0,0,13],["reapplyFilters",0,0,13,2,0,26],["_RegisterSelectionChangedEvent",0,0,11,2,0,1],["_UnregisterSelectionChangedEvent",0,0,11,2,0,1],["_RegisterDataChangedEvent",0,0,11,2,0,1],["_UnregisterDataChangedEvent",0,0,11,2,0,1],["clearStyle",0,0,8],["_RegisterFilteredEvent",0,0,8,2,0,1],["_UnregisterFilteredEvent",0,0,8,2,0,1],["resize",1,0,23,2,0,26],["setStyle",1,0,8]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4],["convertToRange","Range",0,8,13,2,0,0,26]],"workbook.tables",0,[["Changed",2,11,"MessageType.tableDataChangedEvent","this.id","_RegisterDataChangedEvent","_UnregisterDataChangedEvent"],["Filtered",0,8,"MessageType.tableFilteredEvent","this.id","_RegisterFilteredEvent","_UnregisterFilteredEvent"],["SelectionChanged",2,11,"MessageType.tableSelectionChangedEvent","this.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["TableColumnCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItem","TableColumn",1,18,0,4],["getItemAt","TableColumn",1,2,0,4],["add","TableColumn",3,8,0,2,0,0,34],["getItemOrNullObject","TableColumn",1,2,15,4],["addAsJson","TableColumn",3,0,24]],0,"TableColumn"],["TableColumn",0,[["id",3],["index",3],["values",1],["name",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],[["filter","Filter",3,13,0,4]],[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4],["getHeaderRowRange","Range",0,10,0,4],["getDataBodyRange","Range",0,10,0,4],["getTotalRowRange","Range",0,10,0,4]]],["TableRowCollection",1,[["count",3]],0,[["getCount",0,2,15,4],["deleteRows",1,0,19],["deleteRowsAt",2,0,19,2,0,26]],[["getItemAt","TableRow",1,2,0,4],["add","TableRow",3,8,0,2,0,0,34],["addAsJson","TableRow",3,0,24]],0,"TableRow"],["TableRow",0,[["index",3],["values",1],["valuesAsJson",1,24],["valuesAsJsonLocal",1,24]],0,[["delete",0,0,0,2,0,34]],[["getRange","Range",0,10,0,4]]],["DataValidation",0,[["type",3],["rule",1],["prompt",1],["errorAlert",1],["ignoreBlanks",1],["valid",3]],0,[["clear"]],[["getInvalidCells","RangeAreas",0,10,6,4],["getInvalidCellsOrNullObject","RangeAreas",0,10,6,4]]],["RemoveDuplicatesResult",0,[["removed",3],["uniqueRemaining",3]]],["RangeFormat",0,[["wrapText",1,0,0,2,32],["horizontalAlignment",1,0,0,2,32],["verticalAlignment",1,0,0,2,32],["columnWidth",1,13,0,2,32],["rowHeight",1,13,0,2,32],["textOrientation",1,11,0,2,32],["useStandardHeight",1,11],["useStandardWidth",1,11],["readingOrder",1,6],["shrinkToFit",1,6],["indentLevel",1,6,0,2,32],["autoIndent",1,6]],[["fill","RangeFill",35,0,0,4],["font","RangeFont",35,0,0,4],["borders","RangeBorderCollection",51,0,0,4],["protection","FormatProtection",35,13,0,4]],[["autofitColumns",0,0,13,2,0,32],["autofitRows",0,0,13,2,0,32],["adjustIndent",1,0,7,2,0,34]]],["FormatProtection",0,[["locked",1],["formulaHidden",1]]],["RangeFill",0,[["color",1,0,0,2,32],["tintAndShade",1,6],["patternTintAndShade",1,6],["pattern",1,6],["patternColor",1,6]],0,[["clear",0,0,0,2,0,32]]],["RangeBorder",0,[["sideIndex",3],["style",1,0,0,2,32],["weight",1,0,0,2,32],["color",1,0,0,2,32],["tintAndShade",1,6]]],["RangeBorderCollection",1,[["count",3],["tintAndShade",1,6]],0,0,[["getItem","RangeBorder",1,18,0,4],["getItemAt","RangeBorder",1,2,0,4]],0,"RangeBorder"],["RangeFont",0,[["name",1,0,0,2,32],["size",1,0,0,2,32],["color",1,0,0,2,12],["italic",1,0,0,2,32],["bold",1,0,0,2,32],["underline",1,0,0,2,32],["strikethrough",1,6,0,2,32],["subscript",1,6],["superscript",1,6],["tintAndShade",1,6]]],["ChartCollection",5,[["count",3]],0,[["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,5,2,0,1],["_UnregisterAddedEvent",0,0,5,2,0,1],["_RegisterActivatedEvent",0,0,5,2,0,29],["_UnregisterActivatedEvent",0,0,5,2,0,29],["_RegisterDeactivatedEvent",0,0,5,2,0,29],["_UnregisterDeactivatedEvent",0,0,5,2,0,29],["_RegisterDeletedEvent",0,0,5,2,0,29],["_UnregisterDeletedEvent",0,0,5,2,0,29]],[["add","Chart",3,9,0,2,0,0,36],["getItemAt","Chart",1,2,0,4],["_GetItem","Chart",1,18,0,4],["getItem","Chart",1,2,0,4],["getItemOrNullObject","Chart",1,2,15,4]],0,"Chart",[["Activated",0,5,"MessageType.chartActivatedEvent","this._ParentObject.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Added",0,5,"MessageType.chartAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this._ParentObject.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"],["Deleted",0,5,"MessageType.chartDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Chart",0,[["name",1,0,0,2,37],["top",1,0,0,2,36],["left",1,0,0,2,36],["width",1,0,0,2,36],["height",1,0,0,2,36],["id",3,11],["showAllFieldButtons",1,11,0,2,36],["chartType",1,11,0,2,37],["showDataLabelsOverMaximum",1,5,0,2,37],["categoryLabelLevel",1,5,0,2,37],["style",1,5,0,2,37],["displayBlanksAs",1,5,0,2,37],["plotBy",1,5,0,2,37],["plotVisibleOnly",1,5,0,2,37],["seriesNameLevel",1,5,0,2,37]],[["title","ChartTitle",35,0,0,4],["dataLabels","ChartDataLabels",35,0,0,4],["legend","ChartLegend",35,0,0,4],["series","ChartSeriesCollection",19,0,0,4],["axes","ChartAxes",35,0,0,4],["format","ChartAreaFormat",35,0,0,4],["worksheet","Worksheet",2,13,0,4],["plotArea","ChartPlotArea",35,5,0,4],["pivotOptions","ChartPivotOptions",35,6,0,4]],[["setData",2,1,0,2,0,36],["delete",0,0,0,2,0,36],["setPosition",2,0,0,2,0,36],["getImage",3,2,13,4],["_RegisterActivatedEvent",0,0,5,2,0,1],["_UnregisterActivatedEvent",0,0,5,2,0,1],["_RegisterDeactivatedEvent",0,0,5,2,0,1],["_UnregisterDeactivatedEvent",0,0,5,2,0,1],["activate",0,2,6],["getDataRange",0,0,28],["getDataRangeOrNullObject",0,0,28]],[["getDataTable","ChartDataTable",0,2,18,4],["getDataTableOrNullObject","ChartDataTable",0,2,18,4]],0,0,[["Activated",0,5,"MessageType.chartActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,5,"MessageType.chartDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["ChartPivotOptions",0,[["showAxisFieldButtons",1,0,0,2,37],["showLegendFieldButtons",1,0,0,2,37],["showReportFilterFieldButtons",1,0,0,2,37],["showValueFieldButtons",1,0,0,2,37]]],["ChartAreaFormat",0,[["roundedCorners",1,6,0,2,37],["colorScheme",1,6,0,2,37]],[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartSeriesCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartSeries",1,2,0,4],["add","ChartSeries",2,8,11,2,0,0,36]],0,"ChartSeries"],["ChartSeries",0,[["name",1,0,0,2,36],["chartType",1,11,0,2,10],["hasDataLabels",1,11,0,2,37],["filtered",1,11,0,2,37],["markerSize",1,11,0,2,36],["markerStyle",1,11,0,2,36],["showShadow",1,11,0,2,37],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36],["smooth",1,11,0,2,37],["plotOrder",1,11,0,2,37],["gapWidth",1,11,0,2,36],["doughnutHoleSize",1,11,0,2,36],["axisGroup",1,5,0,2,36],["explosion",1,5,0,2,37],["firstSliceAngle",1,5,0,2,37],["invertIfNegative",1,5,0,2,37],["bubbleScale",1,6,0,2,37],["secondPlotSize",1,5,0,2,37],["splitType",1,5,0,2,37],["splitValue",1,6,0,2,37],["varyByCategories",1,5,0,2,37],["showLeaderLines",1,6,0,2,37],["overlap",1,5,0,2,36],["gradientStyle",1,6,0,2,37],["gradientMinimumType",1,6,0,2,37],["gradientMidpointType",1,6,0,2,37],["gradientMaximumType",1,6,0,2,37],["gradientMinimumValue",1,6,0,2,37],["gradientMidpointValue",1,6,0,2,37],["gradientMaximumValue",1,6,0,2,37],["gradientMinimumColor",1,6,0,2,37],["gradientMidpointColor",1,6,0,2,37],["gradientMaximumColor",1,6,0,2,37],["parentLabelStrategy",1,6,0,2,37],["showConnectorLines",1,6,0,2,37],["invertColor",1,6,0,2,37]],[["points","ChartPointsCollection",19,0,0,4],["format","ChartSeriesFormat",35,0,0,4],["trendlines","ChartTrendlineCollection",19,11,0,4],["xErrorBars","ChartErrorBars",35,6,0,4],["yErrorBars","ChartErrorBars",35,6,0,4],["dataLabels","ChartDataLabels",35,5,0,4],["binOptions","ChartBinOptions",35,6,0,4],["mapOptions","ChartMapOptions",35,6,0,4],["boxwhiskerOptions","ChartBoxwhiskerOptions",35,6,0,4]],[["delete",0,0,11,2,0,36],["setXAxisValues",1,0,11,2,0,36],["setValues",1,0,11,2,0,36],["setBubbleSizes",1,0,11,2,0,37],["getDimensionValues",1,0,27,2,0,37],["getDimensionDataSourceString",1,0,35],["getDimensionDataSourceType",1,0,35]]],["ChartSeriesFormat",0,0,[["fill","ChartFill",3,0,0,4],["line","ChartLineFormat",35,0,0,4]]],["ChartPointsCollection",1,[["count",3]],0,[["getCount",0,2,15,4]],[["getItemAt","ChartPoint",1,2,0,4]],0,"ChartPoint"],["ChartPoint",0,[["value",3],["hasDataLabel",1,11,0,2,37],["markerStyle",1,11,0,2,36],["markerSize",1,11,0,2,36],["markerBackgroundColor",1,11,0,2,36],["markerForegroundColor",1,11,0,2,36]],[["format","ChartPointFormat",35,0,0,4],["dataLabel","ChartDataLabel",35,11,0,4]]],["ChartPointFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartAxes",0,0,[["categoryAxis","ChartAxis",35,0,0,4],["seriesAxis","ChartAxis",35,0,0,4],["valueAxis","ChartAxis",35,0,0,4]],0,[["getItem","ChartAxis",2,2,11,4]]],["ChartAxis",0,[["majorUnit",1,0,0,2,37],["maximum",1,0,0,2,36],["minimum",1,0,0,2,36],["minorUnit",1,0,0,2,37],["displayUnit",1,11,0,2,36],["showDisplayUnitLabel",1,11,0,2,37],["customDisplayUnit",3,11],["type",3,11],["minorTimeUnitScale",1,11,0,2,37],["majorTimeUnitScale",1,11,0,2,37],["baseTimeUnit",1,11,0,2,37],["categoryType",1,11,0,2,37],["axisGroup",3,11],["scaleType",1,11,0,2,37],["logBase",1,11,0,2,37],["left",3,11],["top",3,11],["height",3,11],["width",3,11],["reversePlotOrder",1,11,0,2,36],["crosses",1,11,0,2,36],["crossesAt",3,11],["visible",1,11,0,2,37],["isBetweenCategories",1,5,0,2,36],["majorTickMark",1,11,0,2,37],["minorTickMark",1,11,0,2,37],["tickMarkSpacing",1,11,0,2,37],["tickLabelPosition",1,11,0,2,36],["tickLabelSpacing",1,11,0,2,37],["alignment",1,5,0,2,37],["multiLevel",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["offset",1,5,0,2,37],["textOrientation",1,5,0,2,37],["position",1,5,0,2,36],["positionAt",3,5]],[["majorGridlines","ChartGridlines",35,0,0,4],["minorGridlines","ChartGridlines",35,0,0,4],["title","ChartAxisTitle",35,0,0,4],["format","ChartAxisFormat",35,0,0,4]],[["setCategoryNames",1,0,11,2,0,37],["setCustomDisplayUnit",1,0,11,2,0,37],["setCrossesAt",1,0,11,2,0,37],["setPositionAt",1,0,5,2,0,37]]],["ChartAxisFormat",0,0,[["font","ChartFont",35,0,0,4],["line","ChartLineFormat",35,0,0,4],["fill","ChartFill",3,5,0,4]]],["ChartAxisTitle",0,[["text",1,0,0,2,36],["visible",1,0,0,2,37],["textOrientation",1,27,0,2,37]],[["format","ChartAxisTitleFormat",35,0,0,4]],[["setFormula",1,0,5,2,0,37]]],["ChartAxisTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,5,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataLabels",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["textOrientation",1,5,0,2,37],["autoText",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["showAsDataCallout",3,8,0,2,37],["geometricShapeType",1,8,0,2,37]],[["format","ChartDataLabelFormat",35,0,0,4]]],["ChartDataLabel",0,[["position",1,0,0,2,37],["showValue",1,0,0,2,37],["showSeriesName",1,0,0,2,37],["showCategoryName",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showPercentage",1,0,0,2,37],["showBubbleSize",1,0,0,2,37],["separator",1,0,0,2,37],["top",1,5,0,2,37],["left",1,5,0,2,37],["width",3,5],["height",3,5],["formula",1,5,0,2,37],["textOrientation",1,5,0,2,37],["horizontalAlignment",1,5,0,2,37],["verticalAlignment",1,5,0,2,37],["text",1,5,0,2,37],["autoText",1,5,0,2,37],["numberFormat",1,5,0,2,37],["linkNumberFormat",1,6,0,2,37],["geometricShapeType",1,8,0,2,37],["showAsDataCallout",3,8,0,2,37]],[["format","ChartDataLabelFormat",35,5,0,4]],0,[["getSubstring","ChartFormatString",2,2,8,4]]],["ChartDataLabelFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartDataTable",0,[["visible",1,0,0,2,37],["showLegendKey",1,0,0,2,37],["showHorizontalBorder",1,0,0,2,37],["showVerticalBorder",1,0,0,2,37],["showOutlineBorder",1,0,0,2,37]],[["format","ChartDataTableFormat",35,0,0,4]]],["ChartDataTableFormat",0,0,[["fill","ChartFill",3,0,0,4],["font","ChartFont",35,0,0,4],["border","ChartBorder",35,0,0,4]]],["ChartErrorBars",0,[["endStyleCap",1,0,0,2,37],["include",1,0,0,2,37],["type",1,0,0,2,37],["visible",1,0,0,2,37]],[["format","ChartErrorBarsFormat",35,0,0,4]]],["ChartErrorBarsFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartGridlines",0,[["visible",1,0,0,2,36]],[["format","ChartGridlinesFormat",35,0,0,4]]],["ChartGridlinesFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartLegend",0,[["visible",1,0,0,2,36],["position",1,0,0,2,36],["overlay",1,0,0,2,37],["left",1,11,0,2,37],["top",1,11,0,2,37],["width",1,11,0,2,37],["height",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartLegendFormat",35,0,0,4],["legendEntries","ChartLegendEntryCollection",19,11,0,4]]],["ChartLegendEntry",0,[["visible",1,0,0,2,37],["left",3,5],["top",3,5],["width",3,5],["height",3,5],["index",3,5]]],["ChartLegendEntryCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","ChartLegendEntry",1,2,0,4]],0,"ChartLegendEntry"],["ChartLegendFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,5,0,4]]],["ChartMapOptions",0,[["level",1,0,0,2,37],["labelStrategy",1,0,0,2,37],["projectionType",1,0,0,2,37]]],["ChartTitle",0,[["visible",1,0,0,2,37],["text",1,0,0,2,36],["overlay",1,0,0,2,37],["horizontalAlignment",1,11,0,2,37],["top",1,11,0,2,37],["left",1,11,0,2,37],["width",3,11],["height",3,11],["verticalAlignment",1,11,0,2,37],["textOrientation",1,11,0,2,37],["position",1,11,0,2,37],["showShadow",1,11,0,2,37]],[["format","ChartTitleFormat",35,0,0,4]],[["setFormula",1,0,11,2,0,37]],[["getSubstring","ChartFormatString",2,2,11,4]]],["ChartFormatString",0,0,[["font","ChartFont",35,0,0,4]]],["ChartTitleFormat",0,0,[["font","ChartFont",35,0,0,4],["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,11,0,4]]],["ChartFill",4,0,0,[["setSolidColor",1,0,0,2,0,36],["clear",0,0,0,2,0,37],["getSolidColor",0,0,24,2,0,37]]],["ChartBorder",0,[["color",1,0,0,2,36],["lineStyle",1,0,0,2,36],["weight",1,0,0,2,36]],0,[["clear",0,0,5,2,0,37]]],["ChartBinOptions",0,[["type",1,0,0,2,36],["width",1,0,0,2,36],["count",1,0,0,2,36],["allowOverflow",1,0,0,2,37],["allowUnderflow",1,0,0,2,37],["overflowValue",1,0,0,2,36],["underflowValue",1,0,0,2,36]]],["ChartBoxwhiskerOptions",0,[["showInnerPoints",1,0,0,2,37],["showOutlierPoints",1,0,0,2,37],["showMeanMarker",1,0,0,2,37],["showMeanLine",1,0,0,2,37],["quartileCalculation",1,0,0,2,37]]],["ChartLineFormat",0,[["color",1,0,0,2,36],["lineStyle",1,11,0,2,36],["weight",1,11,0,2,36]],0,[["clear",0,0,0,2,0,37]]],["ChartFont",0,[["bold",1,0,0,2,37],["color",1,0,0,2,36],["italic",1,0,0,2,37],["name",1,0,0,2,37],["size",1,0,0,2,37],["underline",1,0,0,2,37]]],["ChartTrendline",0,[["type",1,0,0,2,37],["polynomialOrder",1,0,0,2,37],["movingAveragePeriod",1,0,0,2,37],["_Id",2],["showEquation",1,5,0,2,37],["showRSquared",1,5,0,2,37],["forwardPeriod",1,5,0,2,37],["backwardPeriod",1,5,0,2,37],["name",1,0,0,2,37],["intercept",1,0,0,2,37]],[["format","ChartTrendlineFormat",35,0,0,4],["label","ChartTrendlineLabel",35,5,0,4]],[["delete",0,0,0,2,0,37]]],["ChartTrendlineCollection",1,0,0,[["getCount",0,2,0,4]],[["add","ChartTrendline",1,8,0,2,0,0,36],["getItem","ChartTrendline",1,18,0,4]],0,"ChartTrendline"],["ChartTrendlineFormat",0,0,[["line","ChartLineFormat",35,0,0,4]]],["ChartTrendlineLabel",0,[["top",1,0,0,2,37],["left",1,0,0,2,37],["width",3],["height",3],["formula",1,0,0,2,37],["textOrientation",1,0,0,2,37],["horizontalAlignment",1,0,0,2,37],["verticalAlignment",1,0,0,2,37],["text",1,0,0,2,37],["autoText",1,0,0,2,37],["numberFormat",1,0,0,2,37],["linkNumberFormat",1,6,0,2,37]],[["format","ChartTrendlineLabelFormat",35,0,0,4]]],["ChartTrendlineLabelFormat",0,0,[["fill","ChartFill",3,0,0,4],["border","ChartBorder",35,0,0,4],["font","ChartFont",35,0,0,4]]],["ChartPlotArea",0,[["left",1,0,0,2,37],["top",1,0,0,2,37],["width",1,0,0,2,37],["height",1,0,0,2,37],["insideLeft",1,0,0,2,37],["insideTop",1,0,0,2,37],["insideWidth",1,0,0,2,37],["insideHeight",1,0,0,2,37],["position",1,0,0,2,37]],[["format","ChartPlotAreaFormat",35,0,0,4]]],["ChartPlotAreaFormat",0,0,[["border","ChartBorder",35,0,0,4],["fill","ChartFill",3,0,0,4]]],["VisualCollection",5,0,0,[["getDefinitions",0,2,0,4],["getPreview",4,2,0,4],["bootstrapAgaveVisual",0,0,0,2],["getCount",0,2,0,4],["_RegisterSelectionChangedEvent",0,2],["_UnregisterSelectionChangedEvent",0,2]],[["add","Visual",3,8,0,2],["_GetItem","Visual",1,18,0,4],["getSelectedOrNullObject","Visual",0,2,0,4]],0,"Visual",[["AgaveVisualUpdate",2,0,"MessageType.agaveVisualUpdateEvent","","null","null"],["SelectionChanged",0,0,"MessageType.visualSelectionChangedEvent","this._ParentObject.id","_RegisterSelectionChangedEvent","_UnregisterSelectionChangedEvent"]]],["Visual",0,[["id",3],["isSupportedInVisualTaskpane",3]],[["properties","VisualPropertyCollection",18,0,0,4]],[["delete",0,0,0,2],["getProperty",1,2,0,4],["setProperty",2,0,0,2],["changeDataSource",2,0,0,2],["getDataSource",0,2,0,4],["setPropertyToDefault",1,0,0,2],["_RegisterChangeEvent",0,2],["_UnregisterChangeEvent",0,2],["serializeProperties",0,2,0,4],["deserializeProperties",1,0,0,2],["addChildProperty",2,0,19,2],["removeChildProperty",2,0,19,2],["getDataFieldAssignments",0,0,3],["getDataConfig",0,2,3,4],["modifyDataConfig",1,0,3,2]],[["getChildProperties","VisualPropertyCollection",2,6,0,4],["getDataControllerClient","DataControllerClient",0,2,0,4],["getElementChildProperties","VisualPropertyCollection",3,6,0,4]],0,0,[["ChangeNotification",2,0,"MessageType.visualChangeEvent","this.id","_RegisterChangeEvent","_UnregisterChangeEvent"]]],["VisualProperty",0,[["type",3],["value",3],["id",3],["localizedName",3],["options",3],["localizedOptions",3],["hasDefault",3],["isDefault",3],["min",3],["max",3],["stepSize",3],["hideMeButShowChildrenUI",3],["expandableUI",3],["nextPropOnSameLine",3],["showResetUI",3],["size",3,19],["minSize",3,19],["maxSize",3,19],["index",3,19],["parentName",3,19]],0,[["getBoolMetaProperty",1,2,0,4]]],["VisualPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","VisualProperty",1,18,0,4],["getItemAt","VisualProperty",1,2,0,4]],0,"VisualProperty"],["DataControllerClient",0,0,0,[["getWells",0,2,0,4],["getAssociatedFields",1,2,0,4],["getAvailableFields",1,2,0,4],["addField",3,0,0,2],["removeField",2,0,0,2],["moveField",3,0,0,2]]],["RangeSort",0,0,0,[["apply",5,0,0,2,0,32]]],["TableSort",0,[["matchCase",3],["method",3],["fields",3]],0,[["apply",3,0,0,2,0,26],["clear"],["reapply"]]],["Filter",0,[["criteria",3]],0,[["apply",1],["clear",0,0,0,2,0,34],["applyBottomItemsFilter",1,0,0,2,0,34],["applyBottomPercentFilter",1,0,0,2,0,34],["applyCellColorFilter",1,0,0,2,0,34],["applyDynamicFilter",1,0,0,2,0,34],["applyFontColorFilter",1,0,0,2,0,34],["applyValuesFilter",1,0,0,2,0,34],["applyTopItemsFilter",1,0,0,2,0,34],["applyTopPercentFilter",1,0,0,2,0,34],["applyIconFilter",1,0,0,2,0,34],["applyCustomFilter",3,0,0,2,0,34]]],["AutoFilter",0,[["enabled",3],["isDataFiltered",3],["criteria",3]],0,[["apply",3,0,0,2,0,33],["reapply",0,0,0,2,0,26],["remove",0,0,0,2,0,26],["clearCriteria",0,0,0,2,0,26],["clearColumnCriteria",1,0,18]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4]]],["CultureInfo",0,[["name",3]],[["numberFormat","NumberFormatInfo",3,0,0,4],["datetimeFormat","DatetimeFormatInfo",3,27,0,4]]],["NumberFormatInfo",0,[["numberDecimalSeparator",3],["numberGroupSeparator",3],["currencySymbol",3,30]]],["DatetimeFormatInfo",0,[["dateSeparator",3],["longDatePattern",3],["shortDatePattern",3],["timeSeparator",3],["longTimePattern",3]]],["CustomXmlPartScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4],["getOnlyItem","CustomXmlPart",0,2,0,4],["getOnlyItemOrNullObject","CustomXmlPart",0,2,0,4]],0,"CustomXmlPart"],["CustomXmlPartCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","CustomXmlPart",1,18,0,4],["add","CustomXmlPart",1,8],["getByNamespace","CustomXmlPartScopedCollection",1,6,0,4],["getItemOrNullObject","CustomXmlPart",1,2,0,4]],0,"CustomXmlPart"],["CustomXmlPart",0,[["id",3],["namespaceUri",3]],0,[["delete"],["getXml",0,2,0,4],["setXml",1]]],["_V1Api",0,0,0,[["bindingGetData",1,2,0,4],["getSelectedData",1,2,0,4],["gotoById",1,2,0,4],["bindingAddFromSelection",1,2],["bindingGetById",1,2,0,4],["bindingReleaseById",1,2],["bindingGetAll",0,2,0,4],["bindingAddFromNamedItem",1,2],["bindingAddFromPrompt",1,2],["bindingDeleteAllDataValues",1],["setSelectedData",1],["bindingClearFormats",1],["bindingSetData",1],["bindingSetFormats",1],["bindingSetTableOptions",1],["bindingAddRows",1],["bindingAddColumns",1],["getFilePropertiesAsync",0,2,9,4]]],["PivotTableScopedCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotTable",1,18,0,4],["getFirst","PivotTable",0,10,0,4],["getItemOrNullObject","PivotTable",1,2,0,4],["getFirstOrNullObject","PivotTable",0,2,35,4]],0,"PivotTable"],["PivotTableCollection",5,0,0,[["refreshAll",0,0,0,2,0,12],["getCount",0,2,15,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["getItem","PivotTable",1,18,0,4],["getItemOrNullObject","PivotTable",1,2,15,4],["add","PivotTable",3,8,5,2,0,0,12]],0,"PivotTable",[["Added",0,3,"MessageType.pivotTableAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.pivotTableDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["PivotTable",0,[["name",1,0,0,2,12],["id",3,16],["useCustomSortLists",1,6,0,2,12],["enableDataValueEditing",1,6,0,2,12],["refreshOnOpen",0,23,0,2,29],["allowMultipleFiltersPerField",0,27,0,2,12]],[["worksheet","Worksheet",2,0,0,4],["hierarchies","PivotHierarchyCollection",19,5,0,4],["rowHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["columnHierarchies","RowColumnPivotHierarchyCollection",19,5,0,4],["dataHierarchies","DataPivotHierarchyCollection",19,5,0,4],["filterHierarchies","FilterPivotHierarchyCollection",19,5,0,4],["layout","PivotLayout",2,5,0,4]],[["refresh",0,0,0,2,0,12],["delete",0,0,5,2,0,12],["getDataSourceString",0,2,35,4],["getDataSourceType",0,2,35,4]],[["addDateGroup","PivotHierarchy",2,0,8,2,0,0,38]]],["PivotLayout",0,[["showColumnGrandTotals",1,0,0,2,12],["showRowGrandTotals",1,0,0,2,12],["enableFieldList",1,17,0,2,12],["subtotalLocation",1,0,0,2,12],["layoutType",1,0,0,2,12],["autoFormat",1,6,0,2,12],["preserveFormatting",1,6,0,2,12],["altTextDescription",0,23,0,2,29],["altTextTitle",0,23,0,2,29],["emptyCellText",0,23,0,2,29],["fillEmptyCells",0,23,0,2,29],["showFieldHeaders",0,23,0,2,29],["tabularValues",3,8],["tabularText",3,8],["tabularNumberFormat",3,8],["tabularNumberFormatLocal",3,8]],[["pivotStyle","PivotTableStyle",35,8,0,4]],[["setAutoSortOnCell",2,0,6,2,0,12],["setStyle",1,0,8,2,0,12],["displayBlankLineAfterEachItem",1,0,23,2,0,29],["repeatAllItemLabels",1,0,23,2,0,29]],[["getRange","Range",0,3],["getRowLabelRange","Range",0,3],["getColumnLabelRange","Range",0,3],["getFilterAxisRange","Range",0,3],["getDataBodyRange","Range",0,3],["getCell","Range",3,2,8],["getPivotItems","PivotItemCollection",2,4,6],["getDataHierarchy","DataPivotHierarchy",1,3,6]]],["PivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotHierarchy",1,18,0,4],["getItemOrNullObject","PivotHierarchy",1,2,0,4]],0,"PivotHierarchy"],["PivotHierarchy",0,[["id",3],["name",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]]],["RowColumnPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","RowColumnPivotHierarchy",1,18,0,4],["getItemOrNullObject","RowColumnPivotHierarchy",1,2,0,4],["add","RowColumnPivotHierarchy",1,8,0,2,0,0,12]],0,"RowColumnPivotHierarchy"],["RowColumnPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["FilterPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","FilterPivotHierarchy",1,18,0,4],["getItemOrNullObject","FilterPivotHierarchy",1,2,0,4],["add","FilterPivotHierarchy",1,8,0,2,0,0,12]],0,"FilterPivotHierarchy"],["FilterPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["enableMultipleFilterItems",1,0,0,2,12]],[["fields","PivotFieldCollection",19,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["DataPivotHierarchyCollection",1,0,0,[["getCount",0,2,0,4],["remove",1,0,0,2,0,12]],[["getItem","DataPivotHierarchy",1,18,0,4],["getItemOrNullObject","DataPivotHierarchy",1,2,0,4],["add","DataPivotHierarchy",1,8,0,2,0,0,12]],0,"DataPivotHierarchy"],["DataPivotHierarchy",0,[["id",3],["name",1,0,0,2,12],["position",1,0,0,2,12],["numberFormat",1,0,0,2,12],["summarizeBy",1,0,0,2,12],["showAs",1,0,0,2,12]],[["field","PivotField",35,0,0,4]],[["setToDefault",0,0,0,2,0,12]]],["PivotFieldCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotField",1,18,0,4],["getItemOrNullObject","PivotField",1,2,0,4]],0,"PivotField"],["PivotField",0,[["id",3],["name",1,0,0,2,12],["subtotals",1,0,0,2,12],["showAllItems",1,0,0,2,12]],[["items","PivotItemCollection",19,0,0,4]],[["sortByLabels",1,1,0,2,0,12],["sortByValues",3,0,6,2,0,12],["applyFilter",1,0,27,2,0,12],["clearAllFilters",0,0,27,2,0,12],["clearFilter",1,0,27,2,0,12],["getFilters",0,0,27],["isFiltered",1,0,27]]],["PivotItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","PivotItem",1,18,0,4],["getItemOrNullObject","PivotItem",1,2,0,4]],0,"PivotItem"],["PivotItem",0,[["id",3],["name",1,0,0,2,12],["isExpanded",1,0,0,2,12],["visible",1,0,0,2,12]]],["WorksheetCustomProperty",0,[["key",3],["value",1],["_Id",2]],0,[["delete"]]],["WorksheetCustomPropertyCollection",1,0,0,[["getCount",0,2,0,4]],[["getItem","WorksheetCustomProperty",1,18,0,4],["getItemOrNullObject","WorksheetCustomProperty",1],["add","WorksheetCustomProperty",2,8]],0,"WorksheetCustomProperty"],["DocumentProperties",0,[["title",1],["subject",1],["author",1],["keywords",1],["comments",1],["lastAuthor",3],["revisionNumber",1],["creationDate",11],["category",1],["manager",1],["company",1]],[["custom","CustomPropertyCollection",19,0,0,4]]],["CustomProperty",0,[["key",3],["value",1],["type",3]],0,[["delete"]]],["CustomPropertyCollection",1,0,0,[["getCount",0,2,0,4],["deleteAll"]],[["getItemOrNullObject","CustomProperty",1,2,0,4],["add","CustomProperty",2,8],["getItem","CustomProperty",1,18,0,4]],0,"CustomProperty"],["ConditionalFormatCollection",1,0,0,[["getCount",0,2,0,4],["clearAll",0,0,0,2,0,39]],[["getItemAt","ConditionalFormat",1,2,0,4],["add","ConditionalFormat",1,8,0,2,0,0,39],["getItem","ConditionalFormat",1,18,0,4],["getItemOrNullObject","ConditionalFormat",1,2,18,4]],0,"ConditionalFormat"],["ConditionalFormat",0,[["stopIfTrue",1],["priority",1],["type",3],["id",3]],[["dataBarOrNullObject","DataBarConditionalFormat",35,0,0,4],["dataBar","DataBarConditionalFormat",35,0,0,4],["customOrNullObject","CustomConditionalFormat",35,0,0,4],["custom","CustomConditionalFormat",35,0,0,4],["iconSet","IconSetConditionalFormat",35,0,0,4],["iconSetOrNullObject","IconSetConditionalFormat",35,0,0,4],["colorScale","ColorScaleConditionalFormat",35,0,0,4],["colorScaleOrNullObject","ColorScaleConditionalFormat",35,0,0,4],["topBottom","TopBottomConditionalFormat",35,0,0,4],["topBottomOrNullObject","TopBottomConditionalFormat",35,0,0,4],["preset","PresetCriteriaConditionalFormat",35,0,0,4],["presetOrNullObject","PresetCriteriaConditionalFormat",35,0,0,4],["textComparison","TextConditionalFormat",35,0,0,4],["textComparisonOrNullObject","TextConditionalFormat",35,0,0,4],["cellValue","CellValueConditionalFormat",35,0,0,4],["cellValueOrNullObject","CellValueConditionalFormat",35,0,0,4]],[["delete",0,0,0,2,0,40],["changeRuleToCellValue",1,0,30],["changeRuleToColorScale",0,0,30],["changeRuleToContainsText",1,0,30],["changeRuleToCustom",1,0,30],["changeRuleToDataBar",0,0,30],["changeRuleToIconSet",0,0,30],["changeRuleToPresetCriteria",1,0,30],["changeRuleToTopBottom",1,0,30],["setRanges",1,0,30]],[["getRange","Range",0,10,0,4],["getRangeOrNullObject","Range",0,10,0,4],["getRanges","RangeAreas",0,10,6,4]]],["DataBarConditionalFormat",0,[["showDataBarOnly",1,0,0,2,40],["barDirection",1,0,0,2,41],["axisFormat",1,0,0,2,41],["axisColor",1,0,0,2,41],["lowerBoundRule",1,0,0,2,41],["upperBoundRule",1,0,0,2,41]],[["positiveFormat","ConditionalDataBarPositiveFormat",35,0,0,4],["negativeFormat","ConditionalDataBarNegativeFormat",35,0,0,4]]],["ConditionalDataBarPositiveFormat",0,[["fillColor",1,0,0,2,40],["gradientFill",1,0,0,2,40],["borderColor",1,0,0,2,40]]],["ConditionalDataBarNegativeFormat",0,[["fillColor",1,0,0,2,40],["matchPositiveFillColor",1,0,0,2,40],["borderColor",1,0,0,2,40],["matchPositiveBorderColor",1,0,0,2,40]]],["CustomConditionalFormat",0,0,[["rule","ConditionalFormatRule",35,0,0,4],["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalFormatRule",0,[["formula",1,0,0,2,41],["formulaLocal",1],["formulaR1C1",1]]],["IconSetConditionalFormat",0,[["reverseIconOrder",1,0,0,2,41],["showIconOnly",1,0,0,2,41],["style",1,0,0,2,41],["criteria",1,0,0,2,41]]],["ColorScaleConditionalFormat",0,[["threeColorScale",3],["criteria",1,0,0,2,41]]],["TopBottomConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["PresetCriteriaConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["TextConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["CellValueConditionalFormat",0,[["rule",1,0,0,2,41]],[["format","ConditionalRangeFormat",35,0,0,4]]],["ConditionalRangeFormat",0,[["numberFormat",1]],[["fill","ConditionalRangeFill",35,0,0,4],["font","ConditionalRangeFont",35,0,0,4],["borders","ConditionalRangeBorderCollection",51,0,0,4]],[["clearFormat",0,0,30]]],["ConditionalRangeFont",0,[["color",1,0,0,2,42],["italic",1,0,0,2,42],["bold",1,0,0,2,42],["underline",1,0,0,2,42],["strikethrough",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeFill",0,[["color",1,0,0,2,42]],0,[["clear",0,0,0,2,0,42]]],["ConditionalRangeBorder",0,[["sideIndex",3],["style",1,0,0,2,42],["color",1,0,0,2,42]]],["ConditionalRangeBorderCollection",1,[["count",3]],[["top","ConditionalRangeBorder",35,0,0,4],["bottom","ConditionalRangeBorder",35,0,0,4],["left","ConditionalRangeBorder",35,0,0,4],["right","ConditionalRangeBorder",35,0,0,4]],0,[["getItem","ConditionalRangeBorder",1,18,0,4],["getItemAt","ConditionalRangeBorder",1,2,0,4]],0,"ConditionalRangeBorder"],["NumberFormattingService",0,0,0,0,[["getFormatter","NumberFormatter",1,3]],0,0,0,"Microsoft.ExcelServices.NumberFormattingService",4],["NumberFormatter",0,[["isDateTime",3],["isPercent",3],["isCurrency",3],["isNumeric",3],["isText",3],["hasYear",3],["hasMonth",3],["hasDayOfWeek",3]],0,[["format",1,3]]],["CustomFunctionManager",36,[["status",2]],0,[["register",2]],0,0,0,0,"Microsoft.ExcelServices.CustomFunctionManager",4],["Style",0,[["builtIn",3],["formulaHidden",1],["horizontalAlignment",1],["includeAlignment",1],["includeBorder",1],["includeFont",1],["includeNumber",1],["includePatterns",1],["includeProtection",1],["indentLevel",1],["locked",1],["name",3],["numberFormat",1],["numberFormatLocal",1],["readingOrder",1],["shrinkToFit",1],["verticalAlignment",1],["wrapText",1],["textOrientation",5,5],["autoIndent",1,5]],[["borders","RangeBorderCollection",51,0,0,4],["font","RangeFont",35,0,0,4],["fill","RangeFill",35,0,0,4]],[["delete"]]],["StyleCollection",1,0,0,[["add",1],["getCount",0,2,6,4]],[["getItem","Style",1,18,0,4],["getItemAt","Style",1,2,6,4],["getItemOrNullObject","Style",1,2,18,4]],0,"Style"],["TableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TableStyle",1,18,0,4],["getItemOrNullObject","TableStyle",1,2,0,4],["add","TableStyle",2,8],["getDefault","TableStyle"]],0,"TableStyle"],["TableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TableStyle"]]],["PivotTableStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","PivotTableStyle",1,18,0,4],["getItemOrNullObject","PivotTableStyle",1,2,0,4],["add","PivotTableStyle",2,8],["getDefault","PivotTableStyle"]],0,"PivotTableStyle"],["PivotTableStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","PivotTableStyle"]]],["SlicerStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","SlicerStyle",1,18,0,4],["getItemOrNullObject","SlicerStyle",1,2,0,4],["add","SlicerStyle",2,8],["getDefault","SlicerStyle"]],0,"SlicerStyle"],["SlicerStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","SlicerStyle"]]],["TimelineStyleCollection",1,0,0,[["getCount",0,2,0,4],["setDefault",1]],[["getItem","TimelineStyle",1,18,0,4],["getItemOrNullObject","TimelineStyle",1,2,0,4],["add","TimelineStyle",2,8],["getDefault","TimelineStyle"]],0,"TimelineStyle"],["TimelineStyle",0,[["name",1],["readOnly",3],["_Id",2]],0,[["delete"]],[["duplicate","TimelineStyle"]]],["InternalTest",0,0,0,[["delay",1],["triggerMessage",4,0,11],["_RegisterTestEvent",0,0,11,2,0,1],["_UnregisterTestEvent",0,0,11,2,0,1],["triggerTestEvent",2,0,11],["triggerPostProcess",0,0,11],["_RegisterTest1Event",0,0,11,2,0,1],["_UnregisterTest1Event",0,0,11,2,0,1],["triggerTestEventWithFilter",3,0,11],["firstPartyMethod",0,2,11,5],["_RegisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionBeginEvent",0,0,20,2,0,1],["_RegisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["_UnregisterCustomFunctionExecutionEndEvent",0,0,20,2,0,1],["unregisterAllCustomFunctionExecutionEvents",0,0,20],["updateRangeValueOnCurrentSheet",2,0,3,2],["triggerUserUndo",0,2,3],["triggerUserRedo",0,2,3],["enterCellEdit",1,0,6],["installCustomFunctionsFromCache",0,0,6],["recalc",2,0,6],["recalcBySolutionId",1,0,6],["safeForCellEditModeMethod",1,0,6],["exitCellEdit",0,0,6],["noPermissionMethod",1,0,6],["verifyCustomFunctionListExist",0,0,6],["enableContentWorkbookLink",0,0,3],["previewExecutionMethod",1,0,8,16],["setRapidJsonEnabled",1,0,8],["triggerVbaRecorderRecordingChanged",2,0,8]],0,0,0,[["CustomFunctionExecutionBeginEvent",0,20,"MessageType.customFunctionExecutionBeginEvent","","_RegisterCustomFunctionExecutionBeginEvent","_UnregisterCustomFunctionExecutionBeginEvent"],["CustomFunctionExecutionEndEvent",0,20,"MessageType.customFunctionExecutionEndEvent","","_RegisterCustomFunctionExecutionEndEvent","_UnregisterCustomFunctionExecutionEndEvent"],["Test1Event",2,11,"MessageType.test1Event","","_RegisterTest1Event","_UnregisterTest1Event"],["TestEvent",2,11,"MessageType.testEvent","","_RegisterTestEvent","_UnregisterTestEvent"]],"Microsoft.ExcelServices.InternalTest",4],["PageLayout",0,[["orientation",1],["paperSize",1],["blackAndWhite",1],["printErrors",1],["zoom",1],["centerHorizontally",1],["centerVertically",1],["printHeadings",1],["printGridlines",1],["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["headerMargin",1],["footerMargin",1],["printComments",1],["draftMode",1],["firstPageNumber",1],["printOrder",1]],[["headersFooters","HeaderFooterGroup",35,0,0,4]],[["setPrintMargins",2],["setPrintArea",1],["setPrintTitleRows",1],["setPrintTitleColumns",1]],[["getPrintArea","RangeAreas",0,10,0,4],["getPrintAreaOrNullObject","RangeAreas",0,10,0,4],["getPrintTitleRows","Range",0,10,0,4],["getPrintTitleRowsOrNullObject","Range",0,10,0,4],["getPrintTitleColumns","Range",0,10,0,4],["getPrintTitleColumnsOrNullObject","Range",0,10,0,4]]],["HeaderFooter",0,[["leftHeader",1],["centerHeader",1],["rightHeader",1],["leftFooter",1],["centerFooter",1],["rightFooter",1]]],["HeaderFooterGroup",0,[["state",1],["useSheetMargins",1],["useSheetScale",1]],[["defaultForAllPages","HeaderFooter",35,0,0,4],["firstPage","HeaderFooter",35,0,0,4],["evenPages","HeaderFooter",35,0,0,4],["oddPages","HeaderFooter",35,0,0,4]]],["PageBreak",0,[["_Id",2],["columnIndex",3],["rowIndex",3]],0,[["delete"]],[["getCellAfterBreak","Range",0,10,0,4]]],["PageBreakCollection",1,0,0,[["removePageBreaks"],["getCount",0,2,0,4]],[["getItem","PageBreak",1,18,0,4],["add","PageBreak",1,8]],0,"PageBreak"],["DataConnectionCollection",0,0,0,[["refreshAll"]],[["add","DataConnection",4,8,8,2,0,0,12]]],["RangeCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","Range",1,2,0,4]],0,"Range"],["RangeAreasCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","RangeAreas",1,2,0,4]],0,"RangeAreas"],["CommentCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,2,27],["_UnregisterAddedEvent",0,2,27],["_RegisterDeletedEvent",0,2,27],["_UnregisterDeletedEvent",0,2,27],["_RegisterChangedEvent",0,2,27],["_UnregisterChangedEvent",0,2,27]],[["getItem","Comment",1,18,0,4],["getItemAt","Comment",1,2,0,4],["add","Comment",3,8],["getItemByReplyId","Comment",1,2,0,4],["getItemByCell","Comment",1,2,0,4],["getItemOrNullObject","Comment",1,2,18,4]],0,"Comment",[["Added",0,27,"MessageType.commentAddedEvent","this._eventTargetId","_RegisterAddedEvent","_UnregisterAddedEvent"],["Changed",0,27,"MessageType.commentChangedEvent","this._eventTargetId","_RegisterChangedEvent","_UnregisterChangedEvent"],["Deleted",0,27,"MessageType.commentDeletedEvent","this._eventTargetId","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Comment",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",1,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],[["replies","CommentReplyCollection",19,0,0,4]],[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["CommentReplyCollection",1,0,0,[["getCount",0,2,0,4]],[["add","CommentReply",2,8],["getItem","CommentReply",1,18,0,4],["getItemAt","CommentReply",1,2,0,4],["getItemOrNullObject","CommentReply",1,2,18,4]],0,"CommentReply"],["CommentReply",0,[["id",3],["content",1],["authorName",3],["authorEmail",3],["creationDate",11],["resolved",3,7],["richContent",3,7],["mentions",3,7],["contentType",3,27]],0,[["delete"],["updateMentions",1,0,7]],[["getLocation","Range",0,10,0,4],["getParentComment","Comment"],["assignTask","DocumentTask",1,0,8],["getTask","DocumentTask",0,10,8,4],["getTaskOrNullObject","DocumentTask",0,10,8,4]]],["ShapeCollection",5,0,0,[["getCount",0,2,0,4],["_RegisterAddedEvent",0,0,3,2,0,1],["_RegisterDeletedEvent",0,0,3,2,0,1],["_UnregisterAddedEvent",0,0,3,2,0,1],["_UnregisterDeletedEvent",0,0,3,2,0,1]],[["addImage","Shape",1],["_GetItem","Shape",1,18,0,4],["addGeometricShape","Shape",1],["addTextBox","Shape",1],["addSvg","Shape",1,0,8],["addGroup","Shape",1],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["addLine","Shape",5],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape",[["Added",0,3,"MessageType.shapeAddedEvent","this._ParentObject.id","_RegisterAddedEvent","_UnregisterAddedEvent"],["Deleted",0,3,"MessageType.shapeDeletedEvent","this._ParentObject.id","_RegisterDeletedEvent","_UnregisterDeletedEvent"]]],["Shape",0,[["id",3],["name",1],["left",1],["top",1],["width",1],["height",1],["rotation",1],["zOrderPosition",3],["altTextTitle",1],["altTextDescription",1,0,0,2,36],["type",3],["lockAspectRatio",1],["placement",1,17],["geometricShapeType",1],["visible",1],["level",3],["connectionSiteCount",3],["scriptLink",1,8,0,2,37],["displayName",3,35]],[["geometricShape","GeometricShape",2,0,0,4],["image","Image",2,0,0,4],["textFrame","TextFrame",2,0,0,4],["fill","ShapeFill",35,0,0,4],["group","ShapeGroup",2,0,0,4],["parentGroup","Shape",2,0,0,4],["line","Line",2,0,0,4],["lineFormat","ShapeLineFormat",35,0,0,4]],[["setZOrder",1],["incrementLeft",1],["incrementTop",1],["incrementRotation",1],["scaleHeight",3],["scaleWidth",3],["delete"],["getAsImage",1],["_RegisterActivatedEvent",0,0,0,2,0,1],["_UnregisterActivatedEvent",0,0,0,2,0,1],["_RegisterDeactivatedEvent",0,0,0,2,0,1],["_UnregisterDeactivatedEvent",0,0,0,2,0,1],["activate",0,0,3]],[["copyTo","Shape",1,8,17,0,0,"_GetShapeById"],["_GetShapeById","Shape",1,2,17,4]],0,0,[["Activated",0,0,"MessageType.shapeActivatedEvent","this.id","_RegisterActivatedEvent","_UnregisterActivatedEvent"],["Deactivated",0,0,"MessageType.shapeDeactivatedEvent","this.id","_RegisterDeactivatedEvent","_UnregisterDeactivatedEvent"]]],["GeometricShape",0,[["id",3]],[["shape","Shape",2,0,0,4]]],["Image",0,[["id",3],["format",3,0,"format"]],[["shape","Shape",2,0,0,4]]],["ShapeGroup",0,[["id",3]],[["shapes","GroupShapeCollection",19,0,0,4],["shape","Shape",2,0,0,4]],[["ungroup"]]],["GroupShapeCollection",1,0,0,[["getCount",0,2,0,4]],[["_GetItem","Shape",1,18,0,4],["getItemAt","Shape",1,2,0,4],["getItem","Shape",1,2,0,4],["getItemOrNullObject","Shape",1,2,18,4]],0,"Shape"],["Line",0,[["id",3],["connectorType",1,0,"connectorType"],["beginArrowheadLength",1],["beginArrowheadStyle",1],["beginArrowheadWidth",1],["endArrowheadLength",1],["endArrowheadStyle",1],["endArrowheadWidth",1],["isBeginConnected",3],["beginConnectedSite",3],["isEndConnected",3],["endConnectedSite",3]],[["shape","Shape",2,0,0,4],["beginConnectedShape","Shape",2,0,0,4],["endConnectedShape","Shape",2,0,0,4]],[["connectBeginShape",2],["disconnectBeginShape"],["connectEndShape",2],["disconnectEndShape"]]],["ShapeFill",0,[["foregroundColor",1],["type",3],["transparency",1]],0,[["clear"],["setSolidColor",1]]],["ShapeLineFormat",0,[["visible",1],["color",1],["style",1],["weight",1],["dashStyle",1],["transparency",1]]],["TextFrame",0,[["leftMargin",1],["rightMargin",1],["topMargin",1],["bottomMargin",1],["horizontalAlignment",1],["horizontalOverflow",1],["verticalAlignment",1],["verticalOverflow",1],["orientation",1],["readingOrder",1],["hasText",3],["autoSizeSetting",1]],[["textRange","TextRange",2,0,0,4]],[["deleteText"]]],["TextRange",0,[["text",1]],[["font","ShapeFont",35,0,0,4]],0,[["getSubstring","TextRange",2]]],["ShapeFont",0,[["size",1],["name",1],["color",1],["bold",1],["italic",1],["underline",1]]],["Slicer",0,[["id",3],["name",1],["caption",1],["left",1],["top",1],["width",1],["height",1],["nameInFormula",1,8],["isFilterCleared",3],["style",1],["sortBy",1],["sortUsingCustomLists",1,3],["columnCount",1,3],["disableMoveResizeUI",1,3],["displayHeader",1,3],["rowHeight",1,3],["shapeId",2,3]],[["slicerItems","SlicerItemCollection",19,0,0,4],["worksheet","Worksheet",35,0,0,4],["slicerStyle","SlicerStyle",35,8,0,4]],[["delete"],["clearFilters"],["getSelectedItems"],["selectItems",1],["activate",0,2,3],["setStyle",1,0,8]]],["SlicerCollection",1,0,0,[["getCount",0,2,0,4]],[["add","Slicer",3,8],["getItemAt","Slicer",1,2,0,4],["getItem","Slicer",1,18,0,4],["getItemOrNullObject","Slicer",1,2,0,4]],0,"Slicer"],["SlicerItem",0,[["key",3],["name",3],["isSelected",1],["hasData",3]]],["SlicerItemCollection",1,0,0,[["getCount",0,2,0,4]],[["getItemAt","SlicerItem",1,2,0,4],["getItem","SlicerItem",1,18,0,4],["getItemOrNullObject","SlicerItem",1,2,0,4]],0,"SlicerItem"],["Ribbon",0,[["activeTab",1]],0,[["executeCommand",2],["showTeachingCallout",3],["_RegisterCommandExecutedEvent",0,0,0,2,0,1],["_UnregisterCommandExecutedEvent",0,0,0,2,0,1],["showChartDialog",1,2,8,4]],0,0,0,[["CommandExecuted",0,0,"MessageType.ribbonCommandExecutedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterCommandExecutedEvent","_UnregisterCommandExecutedEvent"]]],["LinkedDataType",0,[["dataProvider",2],["serviceId",2],["lastRefreshed",10],["name",2],["periodicRefreshInterval",2],["refreshDataLoadWarnings",2],["refreshMode",2],["supportedRefreshModes",2],["refreshErrors",2]],0,[["requestRefresh",0,0,0,2],["requestSetRefreshMode",1,0,0,2]]],["LinkedDataTypeCollection",1,0,0,[["getCount",0,2,0,4],["requestRefreshAll",0,0,0,2],["_RegisterRefreshRequestCompletedEvent",0,2,0,4],["_UnregisterRefreshRequestCompletedEvent",0,2,0,4],["_RegisterRefreshModeChangedEvent",0,2,0,4],["_UnregisterRefreshModeChangedEvent",0,2,0,4],["_RegisterLinkedDataTypeAddedEvent",0,2,0,4],["_UnregisterLinkedDataTypeAddedEvent",0,2,0,4]],[["getItem","LinkedDataType",1,18,0,4],["getItemOrNullObject","LinkedDataType",1],["getItemAt","LinkedDataType",1,2,0,4]],0,"LinkedDataType",[["LinkedDataTypeAdded",0,0,"MessageType.linkedDataTypeLinkedDataTypeAddedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterLinkedDataTypeAddedEvent","_UnregisterLinkedDataTypeAddedEvent"],["RefreshModeChanged",0,0,"MessageType.linkedDataTypeRefreshModeChangedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshModeChangedEvent","_UnregisterRefreshModeChangedEvent"],["RefreshRequestCompleted",0,0,"MessageType.linkedDataTypeRefreshRequestCompletedEvent","OfficeExtension.Constants.eventWorkbookId","_RegisterRefreshRequestCompletedEvent","_UnregisterRefreshRequestCompletedEvent"]]],["SheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","SheetView",1]]],["SheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","SheetView",1,8],["enterTemporary","SheetView"],["getActive","SheetView"],["getItem","SheetView",1,18,0,4],["getItemAt","SheetView",1,2,0,4]],0,"SheetView"],["NamedSheetView",0,[["name"]],0,[["activate"],["delete"]],[["duplicate","NamedSheetView",1]]],["NamedSheetViewCollection",1,0,0,[["getCount",0,2,0,4],["exit"]],[["add","NamedSheetView",1,8],["enterTemporary","NamedSheetView"],["getActive","NamedSheetView"],["getItem","NamedSheetView",1,18,0,4],["getItemAt","NamedSheetView",1,2,0,4],["getItemOrNullObject","NamedSheetView",1,2,28,4]],0,"NamedSheetView"],["FunctionResult",0,[["error",3],["value",3]]],["Functions",0,0,0,0,[["count","FunctionResult",1,72],["if","FunctionResult",3,8],["isNA","FunctionResult",1,8],["isError","FunctionResult",1,8],["sum","FunctionResult",1,72],["average","FunctionResult",1,72],["min","FunctionResult",1,72],["max","FunctionResult",1,72],["na","FunctionResult",0,8],["npv","FunctionResult",2,72],["dollar","FunctionResult",2,8],["fixed","FunctionResult",3,8],["sin","FunctionResult",1,8],["cos","FunctionResult",1,8],["tan","FunctionResult",1,8],["atan","FunctionResult",1,8],["pi","FunctionResult",0,8],["sqrt","FunctionResult",1,8],["exp","FunctionResult",1,8],["ln","FunctionResult",1,8],["log10","FunctionResult",1,8],["abs","FunctionResult",1,8],["int","FunctionResult",1,8],["sign","FunctionResult",1,8],["round","FunctionResult",2,8],["lookup","FunctionResult",3,8],["rept","FunctionResult",2,8],["mid","FunctionResult",3,8],["len","FunctionResult",1,8],["value","FunctionResult",1,8],["true","FunctionResult",0,8],["false","FunctionResult",0,8],["and","FunctionResult",1,72],["or","FunctionResult",1,72],["not","FunctionResult",1,8],["mod","FunctionResult",2,8],["dcount","FunctionResult",3,8,0,0,"DCount"],["dsum","FunctionResult",3,8,0,0,"DSum"],["daverage","FunctionResult",3,8,0,0,"DAverage"],["dmin","FunctionResult",3,8,0,0,"DMin"],["dmax","FunctionResult",3,8,0,0,"DMax"],["dstDev","FunctionResult",3,8,0,0,"DStDev"],["dvar","FunctionResult",3,8,0,0,"DVar"],["text","FunctionResult",2,8],["pv","FunctionResult",5,8],["fv","FunctionResult",5,8],["nper","FunctionResult",5,8,0,0,"NPer"],["pmt","FunctionResult",5,8],["rate","FunctionResult",6,8],["mirr","FunctionResult",3,8,0,0,"MIrr"],["irr","FunctionResult",2,8],["rand","FunctionResult",0,8],["match","FunctionResult",3,8],["date","FunctionResult",3,8],["time","FunctionResult",3,8],["day","FunctionResult",1,8],["month","FunctionResult",1,8],["year","FunctionResult",1,8],["weekday","FunctionResult",2,8],["hour","FunctionResult",1,8],["minute","FunctionResult",1,8],["second","FunctionResult",1,8],["now","FunctionResult",0,8],["areas","FunctionResult",1,8],["rows","FunctionResult",1,8],["columns","FunctionResult",1,8],["type","FunctionResult",1,8],["atan2","FunctionResult",2,8],["asin","FunctionResult",1,8],["acos","FunctionResult",1,8],["choose","FunctionResult",2,72],["hlookup","FunctionResult",4,8,0,0,"HLookup"],["vlookup","FunctionResult",4,8,0,0,"VLookup"],["isref","FunctionResult",1,8],["log","FunctionResult",2,8],["char","FunctionResult",1,8],["lower","FunctionResult",1,8],["upper","FunctionResult",1,8],["proper","FunctionResult",1,8],["left","FunctionResult",2,8],["right","FunctionResult",2,8],["exact","FunctionResult",2,8],["trim","FunctionResult",1,8],["replace","FunctionResult",4,8],["substitute","FunctionResult",4,8],["code","FunctionResult",1,8],["find","FunctionResult",3,8],["isErr","FunctionResult",1,8],["isText","FunctionResult",1,8],["isNumber","FunctionResult",1,8],["t","FunctionResult",1,8,0,0,"T"],["n","FunctionResult",1,8,0,0,"N"],["datevalue","FunctionResult",1,8],["timevalue","FunctionResult",1,8],["sln","FunctionResult",3,8],["syd","FunctionResult",4,8],["ddb","FunctionResult",5,8],["clean","FunctionResult",1,8],["ipmt","FunctionResult",6,8],["ppmt","FunctionResult",6,8],["countA","FunctionResult",1,72],["product","FunctionResult",1,72],["fact","FunctionResult",1,8],["dproduct","FunctionResult",3,8,0,0,"DProduct"],["isNonText","FunctionResult",1,8],["dstDevP","FunctionResult",3,8,0,0,"DStDevP"],["dvarP","FunctionResult",3,8,0,0,"DVarP"],["trunc","FunctionResult",2,8],["isLogical","FunctionResult",1,8],["dcountA","FunctionResult",3,8,0,0,"DCountA"],["usdollar","FunctionResult",2,8,0,0,"USDollar"],["findB","FunctionResult",3,8],["replaceB","FunctionResult",4,8],["leftb","FunctionResult",2,8],["rightb","FunctionResult",2,8],["midb","FunctionResult",3,8],["lenb","FunctionResult",1,8],["roundUp","FunctionResult",2,8],["roundDown","FunctionResult",2,8],["asc","FunctionResult",1,8],["dbcs","FunctionResult",1,8],["days360","FunctionResult",3,8],["today","FunctionResult",0,8],["vdb","FunctionResult",7,8],["median","FunctionResult",1,72],["sinh","FunctionResult",1,8],["cosh","FunctionResult",1,8],["tanh","FunctionResult",1,8],["asinh","FunctionResult",1,8],["acosh","FunctionResult",1,8],["atanh","FunctionResult",1,8],["dget","FunctionResult",3,8,0,0,"DGet"],["db","FunctionResult",5,8],["error_Type","FunctionResult",1,8],["aveDev","FunctionResult",1,72],["gammaLn","FunctionResult",1,8],["combin","FunctionResult",2,8],["even","FunctionResult",1,8],["fisher","FunctionResult",1,8],["fisherInv","FunctionResult",1,8],["standardize","FunctionResult",3,8],["odd","FunctionResult",1,8],["permut","FunctionResult",2,8],["devSq","FunctionResult",1,72],["geoMean","FunctionResult",1,72],["harMean","FunctionResult",1,72],["sumSq","FunctionResult",1,72],["kurt","FunctionResult",1,72],["skew","FunctionResult",1,72],["large","FunctionResult",2,8],["small","FunctionResult",2,8],["trimMean","FunctionResult",2,8],["concatenate","FunctionResult",1,72],["power","FunctionResult",2,8],["radians","FunctionResult",1,8],["degrees","FunctionResult",1,8],["subtotal","FunctionResult",2,72],["sumIf","FunctionResult",3,8],["countIf","FunctionResult",2,8],["countBlank","FunctionResult",1,8],["ispmt","FunctionResult",4,8],["roman","FunctionResult",2,8],["hyperlink","FunctionResult",2,8],["averageA","FunctionResult",1,72],["maxA","FunctionResult",1,72],["minA","FunctionResult",1,72],["stDevPA","FunctionResult",1,72],["varPA","FunctionResult",1,72],["stDevA","FunctionResult",1,72],["varA","FunctionResult",1,72],["bahtText","FunctionResult",1,8],["hex2Bin","FunctionResult",2,8],["hex2Dec","FunctionResult",1,8],["hex2Oct","FunctionResult",2,8],["dec2Bin","FunctionResult",2,8],["dec2Hex","FunctionResult",2,8],["dec2Oct","FunctionResult",2,8],["oct2Bin","FunctionResult",2,8],["oct2Hex","FunctionResult",2,8],["oct2Dec","FunctionResult",1,8],["bin2Dec","FunctionResult",1,8],["bin2Oct","FunctionResult",2,8],["bin2Hex","FunctionResult",2,8],["imSub","FunctionResult",2,8],["imDiv","FunctionResult",2,8],["imPower","FunctionResult",2,8],["imAbs","FunctionResult",1,8],["imSqrt","FunctionResult",1,8],["imLn","FunctionResult",1,8],["imLog2","FunctionResult",1,8],["imLog10","FunctionResult",1,8],["imSin","FunctionResult",1,8],["imCos","FunctionResult",1,8],["imExp","FunctionResult",1,8],["imArgument","FunctionResult",1,8],["imConjugate","FunctionResult",1,8],["imaginary","FunctionResult",1,8],["imReal","FunctionResult",1,8],["complex","FunctionResult",3,8],["imSum","FunctionResult",1,72],["imProduct","FunctionResult",1,72],["seriesSum","FunctionResult",4,8],["factDouble","FunctionResult",1,8],["sqrtPi","FunctionResult",1,8],["quotient","FunctionResult",2,8],["delta","FunctionResult",2,8],["geStep","FunctionResult",2,8],["isEven","FunctionResult",1,8],["isOdd","FunctionResult",1,8],["mround","FunctionResult",2,8,0,0,"MRound"],["erf","FunctionResult",2,8],["erfC","FunctionResult",1,8],["besselJ","FunctionResult",2,8],["besselK","FunctionResult",2,8],["besselY","FunctionResult",2,8],["besselI","FunctionResult",2,8],["xirr","FunctionResult",3,8],["xnpv","FunctionResult",3,8],["priceMat","FunctionResult",6,8],["yieldMat","FunctionResult",6,8],["intRate","FunctionResult",5,8],["received","FunctionResult",5,8],["disc","FunctionResult",5,8],["priceDisc","FunctionResult",5,8],["yieldDisc","FunctionResult",5,8],["tbillEq","FunctionResult",3,8,0,0,"TBillEq"],["tbillPrice","FunctionResult",3,8,0,0,"TBillPrice"],["tbillYield","FunctionResult",3,8,0,0,"TBillYield"],["price","FunctionResult",7,8],["yield","FunctionResult",7,8],["dollarDe","FunctionResult",2,8],["dollarFr","FunctionResult",2,8],["nominal","FunctionResult",2,8],["effect","FunctionResult",2,8],["cumPrinc","FunctionResult",6,8],["cumIPmt","FunctionResult",6,8],["edate","FunctionResult",2,8,0,0,"EDate"],["eoMonth","FunctionResult",2,8],["yearFrac","FunctionResult",3,8],["coupDayBs","FunctionResult",4,8],["coupDays","FunctionResult",4,8],["coupDaysNc","FunctionResult",4,8],["coupNcd","FunctionResult",4,8],["coupNum","FunctionResult",4,8],["coupPcd","FunctionResult",4,8],["duration","FunctionResult",6,8],["mduration","FunctionResult",6,8,0,0,"MDuration"],["oddLPrice","FunctionResult",8,8],["oddLYield","FunctionResult",8,8],["oddFPrice","FunctionResult",9,8],["oddFYield","FunctionResult",9,8],["randBetween","FunctionResult",2,8],["weekNum","FunctionResult",2,8],["amorDegrc","FunctionResult",7,8],["amorLinc","FunctionResult",7,8],["convert","FunctionResult",3,8],["accrInt","FunctionResult",8,8],["accrIntM","FunctionResult",5,8],["workDay","FunctionResult",3,8],["networkDays","FunctionResult",3,8],["gcd","FunctionResult",1,72],["multiNomial","FunctionResult",1,72],["lcm","FunctionResult",1,72],["fvschedule","FunctionResult",2,8,0,0,"FVSchedule"],["countIfs","FunctionResult",1,72],["sumIfs","FunctionResult",2,72],["averageIf","FunctionResult",3,8],["averageIfs","FunctionResult",2,72],["binom_Dist","FunctionResult",4,8],["binom_Inv","FunctionResult",3,8],["confidence_Norm","FunctionResult",3,8],["confidence_T","FunctionResult",3,8],["expon_Dist","FunctionResult",3,8],["gamma_Dist","FunctionResult",4,8],["gamma_Inv","FunctionResult",3,8],["norm_Dist","FunctionResult",4,8],["norm_Inv","FunctionResult",3,8],["percentile_Exc","FunctionResult",2,8],["percentile_Inc","FunctionResult",2,8],["percentRank_Exc","FunctionResult",3,8],["percentRank_Inc","FunctionResult",3,8],["poisson_Dist","FunctionResult",3,8],["quartile_Exc","FunctionResult",2,8],["quartile_Inc","FunctionResult",2,8],["rank_Avg","FunctionResult",3,8],["rank_Eq","FunctionResult",3,8],["stDev_S","FunctionResult",1,72],["stDev_P","FunctionResult",1,72],["t_Dist","FunctionResult",3,8],["t_Dist_2T","FunctionResult",2,8],["t_Dist_RT","FunctionResult",2,8],["t_Inv","FunctionResult",2,8],["t_Inv_2T","FunctionResult",2,8],["var_S","FunctionResult",1,72],["var_P","FunctionResult",1,72],["weibull_Dist","FunctionResult",4,8],["networkDays_Intl","FunctionResult",4,8],["workDay_Intl","FunctionResult",4,8],["ecma_Ceiling","FunctionResult",2,8,0,0,"ECMA_Ceiling"],["iso_Ceiling","FunctionResult",2,8,0,0,"ISO_Ceiling"],["beta_Dist","FunctionResult",6,8],["beta_Inv","FunctionResult",5,8],["chiSq_Dist","FunctionResult",3,8],["chiSq_Dist_RT","FunctionResult",2,8],["chiSq_Inv","FunctionResult",2,8],["chiSq_Inv_RT","FunctionResult",2,8],["f_Dist","FunctionResult",4,8],["f_Dist_RT","FunctionResult",3,8],["f_Inv","FunctionResult",3,8],["f_Inv_RT","FunctionResult",3,8],["hypGeom_Dist","FunctionResult",5,8],["logNorm_Dist","FunctionResult",4,8],["logNorm_Inv","FunctionResult",3,8],["negBinom_Dist","FunctionResult",4,8],["norm_S_Dist","FunctionResult",2,8],["norm_S_Inv","FunctionResult",1,8],["z_Test","FunctionResult",3,8],["erf_Precise","FunctionResult",1,8],["erfC_Precise","FunctionResult",1,8],["gammaLn_Precise","FunctionResult",1,8],["ceiling_Precise","FunctionResult",2,8],["floor_Precise","FunctionResult",2,8],["acot","FunctionResult",1,8],["acoth","FunctionResult",1,8],["cot","FunctionResult",1,8],["coth","FunctionResult",1,8],["csc","FunctionResult",1,8],["csch","FunctionResult",1,8],["sec","FunctionResult",1,8],["sech","FunctionResult",1,8],["imTan","FunctionResult",1,8],["imCot","FunctionResult",1,8],["imCsc","FunctionResult",1,8],["imCsch","FunctionResult",1,8],["imSec","FunctionResult",1,8],["imSech","FunctionResult",1,8],["bitand","FunctionResult",2,8],["bitor","FunctionResult",2,8],["bitxor","FunctionResult",2,8],["bitlshift","FunctionResult",2,8],["bitrshift","FunctionResult",2,8],["permutationa","FunctionResult",2,8],["combina","FunctionResult",2,8],["xor","FunctionResult",1,72],["pduration","FunctionResult",3,8,0,0,"PDuration"],["base","FunctionResult",3,8],["decimal","FunctionResult",2,8],["days","FunctionResult",2,8],["binom_Dist_Range","FunctionResult",4,8],["gamma","FunctionResult",1,8],["skew_p","FunctionResult",1,72],["gauss","FunctionResult",1,8],["phi","FunctionResult",1,8],["rri","FunctionResult",3,8],["unichar","FunctionResult",1,8],["unicode","FunctionResult",1,8],["arabic","FunctionResult",1,8],["isoWeekNum","FunctionResult",1,8],["numberValue","FunctionResult",3,8],["sheet","FunctionResult",1,8],["sheets","FunctionResult",1,8],["isFormula","FunctionResult",1,8],["ceiling_Math","FunctionResult",3,8],["floor_Math","FunctionResult",3,8],["imSinh","FunctionResult",1,8],["imCosh","FunctionResult",1,8]]]]},targetNamespaceObject:e})}(Excel||(Excel={}));var OSF,_EndExcel="_EndExcel";if("undefined"!=typeof window&&window.OSF&&window.OSF._OfficeAppFactory&&window.OSF._OfficeAppFactory.getHostInfo&&window.OSF._OfficeAppFactory.getHostInfo()){var hostPlatform=window.OSF._OfficeAppFactory.getHostInfo().hostPlatform;"web"===hostPlatform&&(OfficeExtension._internalConfig.enablePreviewExecution=!0)}!function(e){if(!function(){try{return"object"==typeof process&&"[object process]"===String(process)}catch(e){return!1}}()&&!e.isOfficeReactNative()){try{e.Flights=e.OUtil.parseFlights(!0)}catch(e){}function t(){OSFPerformance.hostSpecificFileName=e.LoadScriptHelper.getHostBundleJsName(),Office.onReadyInternal((function(){OSFPerfUtil.sendPerformanceTelemetry()})),e._OfficeAppFactory.getHostInfo().hostLocale&&setTimeout((function(){e.OUtil.ensureOfficeStringsJs().catch((function(e){console.error(e)}))}),0)}e._OfficeAppFactory.bootstrap((function(){}),(function(e){e instanceof Error?console.warn(e.message):console.warn(JSON.stringify(e))})),"complete"===document.readyState||"interactive"===document.readyState?t():window.addEventListener("DOMContentLoaded",(function(e){t()}))}}(OSF||(OSF={})),OSFPerformance.hostInitializationEnd=OSFPerformance.now(),OSFPerformance.totalJSHeapSize=OSFPerformance.getTotalJSHeapSize(),OSFPerformance.usedJSHeapSize=OSFPerformance.getUsedJSHeapSize(),OSFPerformance.jsHeapSizeLimit=OSFPerformance.getJSHeapSizeLimit(); \ No newline at end of file diff --git a/dist/office-vsdoc.js b/dist/office-vsdoc.js new file mode 100644 index 000000000..94b6866a3 --- /dev/null +++ b/dist/office-vsdoc.js @@ -0,0 +1,33218 @@ +/* Version: 16.0.16801.10000 */ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md +*/ + +if (!Office) { + var Office = new function () { + this._appContext = 127; // All hosts; see _officeintellisense.js in VS, with binary 1111111 + this._showAll = true; + this._setContext = {}; + } +} + +Office._ExcelMask = 0x1; +Office._WordMask = 0x2; +Office._ProjectMask = 0x4; +Office._OutlookMask = 0x8; +Office._PowerPointMask = 0x10; +Office._OutlookComposeMask = 0x20; +Office._AccessWebAppMask = 0x40; + +{ + Office._extractedCallback = function (originalArgs, totalArgsCount, optionalArgsCount) { + var optionalArgs = Array.prototype.slice.call(originalArgs, totalArgsCount - optionalArgsCount); + var callback = function(){}; + for (var i = Math.min(optionalArgs.length, optionalArgsCount) - 1; i >= 0; i--) { + if (typeof optionalArgs[i] == "function") { + callback = optionalArgs[i]; + break; + } + } + return callback; + } + + Office._BindingDataChangedEvents = function (eventType) { + this.binding = new Office._Binding(bindingType); + this.type = eventType; + this.startColumn = {}; + this.startRow = {}; + } + + Office._DocumentEventArgs = function (eventType) { + Office._processContents(this, { + type: { + annotate: { + /// + type: undefined + }, + value: eventType + } + }); + if (eventType == "activeViewChanged") { + Office._processItem( + this, + { + annotate: { + /// + activeView: undefined + } + }, + "activeView" + ); + } + } + + Office._DialogEventArgs = function (eventType) { + Office._processContents(this, { + type: { + annotate: { + /// + type: undefined + }, + value: eventType + } + }); + if (eventType == "dialogMessageReceived") { + Office._processItem( + this, + { + annotate: { + /// + message: undefined + } + }, + "message" + ); + } else if (eventType == "dialogEventReceived") { + Office._processItem( + this, + { + annotate: { + /// + error: undefined + } + }, + "error" + ); + } + } + + Office._CustomXmlNodeEvents = function (eventType) { + this.type = eventType; + this.inUndoRedo = {}; + + if (eventType == 'nodeDeleted') { + this.oldNode = new Office._CustomXmlNode(); + this.oldNextSibling = new Office._CustomXmlNode(); + } + + if (eventType == 'nodeInserted') { + this.newNode = new Office._CustomXmlNode(); + + + } + if (eventType == 'nodeReplaced') { + this.oldNode = new Office._CustomXmlNode(); + this.newNode = new Office._CustomXmlNode(); + + } + } + + Office._Error = function () { + this.id = {}; + this.message = {}; + this.name = {}; + } + + Office._CustomXmlNode = function () { + this.baseName = {}; + this.namespaceUri = {}; + this.nodeType = {}; + + this.getNodesAsync = function (xPath, callback) { + /// Gets the nodes associated with the xPath expression. + ///The xPath expression + ///The optional callback method + var result = new Office._AsyncResult("getNodesAsync"); + callback(result); + }; + this.getNodeValueAsync = function (callback) { + /// Gets the node value. + ///The optional callback method + + var result = new Office._AsyncResult("getNodeValueAsync"); + callback(result); + }; + this.getXmlAsync = function (callback) { + /// Gets the node's XML. + ///The optional callback method + var result = new Office._AsyncResult("getXmlAsync"); + callback(result); + }; + this.setNodeValueAsync = function (value, callback) { + /// Sets the node value. + ///The value to be set on the node + ///The optional callback method + var result = new Office._AsyncResult("setNodeValueAsync"); + callback(result); + }; + this.setXmlAsync = function (xml, callback) { + /// Sets the node XML. + ///The XML to be set on the node + ///The optional callback method + var result = new Office._AsyncResult("setXmlAsync"); + callback(result); + }; + } + + Office._context_document_customXmlParts_customXmlPrefixMappings = function () { + this.addNamespaceAsync = function (prefix, nsUri, callback) { + ///Adds a namespace. + //////The namespace prefix + //////The namespace URI + ///The optional callback method + + var result = new Office._AsyncResult("addNamespaceAsync"); + callback(result); + }; + this.getNamespaceAsync = function (prefix, callback) { + /// Gets a namespace with the specified prefix + ///The namespace prefix + ///The optional callback method + var result = new Office._AsyncResult("getNamespaceAsync"); + callback(result); + }; + this.getPrefixAsync = function (nsUri, callback) { + /// Gets a prefix for the specified URI + ///The namespace URI + ///The optional callback method + + var result = new Office._AsyncResult("getPrefixAsync"); + callback(result); + }; + } + + Office._CustomXmlPart = function () { + this.builtIn = {}; + this.id = {}; + this.namespaceManager = new Office._context_document_customXmlParts_customXmlPrefixMappings(); + + this.deleteAsync = function (callback) { + /// Deletes the Custom XML Part. + ///The optional callback method + var result = new Office._AsyncResult("deleteAsync"); + callback(result); + }; + this.getNodesAsync = function (xPath, callback) { + /// Gets the nodes associated with the xPath expression. + ///The xPath expression + ///The optional callback method + + var result = new Office._AsyncResult("getNodesAsync"); + callback(result); + }; + this.getXmlAsync = function (callback) { + /// Gets the XML for the Custom XML Part. + ///The optional callback method + var result = new Office._AsyncResult("getXmlAsync"); + callback(result); + }; + + this.addHandlerAsync = function (eventType, handler, callback) { + /// Adds an event handler to the object using the specified event type. + ///The event type. For CustomXmlPartNode it can be 'nodeDeleted', 'nodeInserted' or 'nodeReplaced' + ///The name of the handler + ///The optional callback method + + + var events = new Office._CustomXmlNodeEvents(eventType); + handler(events); + + var result = new Office._AsyncResult("addHandlerAsync"); + callback(result); + }; + + this.removeHandlerAsync = function (eventType, options, callback) { + /// Removes an event handler from the object using the specified event type. + ///The event type. For CustomXmlPartNode it can be 'nodeDeleted', 'nodeInserted' or 'nodeReplaced' + /// + /// Syntax example: {handler:eventHandler} + /// handler: Indicates a specific handler to be removed, if not specified all handlers are removed + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + /// + Office._extractedCallback(arguments, 3, 2)(new Office._AsyncResult("removeHandlerAsync")); + } + } + + Office._Binding = function (bindingType) { + ///Id of the Binding}; + this.id = {}; + + this.type = {}; + this.document = {}; + + this.setDataAsync = function (data, options, callback) { + /// Writes the specified data into the current selection. + ///The data to be set. Either a string or value, 2d array or TableData object + /// + /// Syntax example: {coercionType:Office.CoercionType.Matrix} or {coercionType: 'matrix'} + /// coercionType: Explicitly sets the shape of the data object. Use Office.CoercionType or text value. If not supplied is inferred from the data type. + /// startRow: Used in partial set for table/matrix. Indicates the start row. + /// startColumn: Used in partial set for table/matrix. Indicates the start column. + + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + Office._extractedCallback(arguments, 3, 2)(new Office._AsyncResult("setDataAsync")); + }; + + this.getDataAsync = function (options, callback) { + /// Returns the current selection. + /// + /// Syntax example: {coercionType: 'matrix,'valueFormat: 'formatted', filterType:'all'} + /// coercionType: The expected shape of the selection. If not specified returns the bindingType shape. Use Office.CoercionType or text value. + /// valueFormat: Get data with or without format. Use Office.ValueFormat or text value. + /// startRow: Used in partial get for table/matrix. Indicates the start row. + /// startColumn: Used in partial get for table/matrix. Indicates the start column. + /// rowCount: Used in partial get for table/matrix. Indicates the number of rows from the start row. + /// columnCount: Used in partial get for table/matrix. Indicates the number of columns from the start column. + /// filterType: Get the visible or all the data. Useful when filtering data. Use Office.FilterType or text value. + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + + if (arguments.length == 1) { + callback = options; + } + var result = new Office._AsyncResult("getDataAsync", options.coercionType); + callback(result); + }; + + this.addHandlerAsync = function (eventType, handler, callback) { + /// Adds an event handler to the object using the specified event type. + ///The event type. For binding it can be 'bindingDataChanged' and 'bindingSelectionChanged' + ///The name of the handler + ///The optional callback method + + + var events = new Office._BindingDataChangedEvents(eventType); + handler(events); + + var result = new Office._AsyncResult("addHandlerAsync"); + callback(result); + }; + + this.removeHandlerAsync = function (eventType, options, callback) { + /// Removes an event handler from the object using the specified event type. + ///The event type. For binding can be 'bindingDataChanged' and 'bindingSelectionChanged' + /// + /// Syntax example: {handler:eventHandler} + /// handler: Indicates a specific handler to be removed, if not specified all handlers are removed + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + + + var events = new Office._BindingDataChangedEvents(eventType); + handler(events); + + Office._extractedCallback(arguments, 3, 2)(new Office._AsyncResult("removeHandlerAsync")); + }; + + + if ((bindingType == undefined) || (bindingType == Office.BindingType.Matrix) || (bindingType == Office.BindingType.Table)) { + this.columnCount = {}; + this.rowCount = {}; + } + if ((bindingType == undefined) || (bindingType == Office.BindingType.Table)) { + Office._processContents(this, { + hasHeaders: { + value: {} + }, + addRowsAsync: { + value: function (data, callback) { + /// Adds the specified rows to the table + /// A 2D array with the rows to add + + ///The optional callback method + } + }, + addColumnsAsync: { + value: function (tableData, callback) { + /// Adds the specified columns to the table + /// A TableData object with the headers and rows + + ///The optional callback method}; + } + }, + deleteAllDataValuesAsync: { + value: function (callback) { + /// Clears the table + ///The optional callback method}; + } + }, + formattingSpecific: { + metaOnly: true, + conditions: { + hosts: ["excel"], + }, + contents: { + clearFormatsAsync: { + conditions: { + reqs: ["method TableBinding.clearFormatsAsync"] + }, + value: function (options, callback) { + /// Clears formatting on the bound table. + /// + /// Syntax example: {asyncContext:context} + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + Office._extractedCallback(arguments, 2, 2)(new Office._AsyncResult("clearFormatsAsync")); + } + }, + getFormatsAsync: { + conditions: { + reqs: ["method TableBinding.getFormatsAsync"] + }, + value: function (cellReference, formats, options, callback) { + /// Gets the formatting on specified items in the table. + ///An object literal containing name-value pairs that specify the range of cells to get formatting from. + ///An array specifying the format properties to get. + /// + /// Syntax example: {asyncContext:context} + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + Office._extractedCallback(arguments, 4, 4)(new Office._AsyncResult("getFormatsAsync")); + } + }, + setFormatsAsync: { + conditions: { + reqs: ["method TableBinding.setFormatsAsync"] + }, + value: function (formatsInfo, options, callback) { + /// Sets formatting on specified items and data in the table. + /// + /// Array elements are themselves three-element arrays: + /// [target, type, formats] + /// target: The identifier of the item to format. String. + /// type: The kind of item to format. String. + /// formats: An object literal containing a list of property name-value pairs that define the formatting to apply. + /// + /// + /// Syntax example: {asyncContext:context} + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + Office._extractedCallback(arguments, 3, 3)(new Office._AsyncResult("setFormatsAsync")); + } + }, + setTableOptionsAsync: { + conditions: { + reqs: ["method TableBinding.setTableOptionsAsync"] + }, + value: function (tableOptions, options, callback) { + /// Updates table formatting options on the bound table. + ///An object literal containing a list of property name-value pairs that define the table options to apply. + /// + /// Syntax example: {asyncContext:context} + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + Office._extractedCallback(arguments, 3, 2)(new Office._AsyncResult("setTableOptionsAsync")); + } + } + } + } + }); + } + } + + Office._TableData = function () { + this.headers = new Array(new Array()); + this.rows = new Array(new Array()); + } + + Office._File = function () { + this.size = {}; + this.sliceCount = {}; + this.getSliceAsync = function (sliceIndex, callback) { + /// Gets the specified slice. + ///The index of the slice to be retrieved + ///The optional callback method + var result = new Office._AsyncResult("getSliceAsync"); + callback(result); + }; + this.closeAsync = function (callback) { + /// Closes the File. + ///The optional callback method + }; + } + + Office._Slice = function () { + this.data = {}; + this.index = {}; + this.size = {}; + } + + Office._Dialog = function () { + this.data = {}; + this.close = function () { + /// Allows the add-in to close its dialog box. + }; + this.addEventHandler = function (eventType, handler) { + /// Registers an event handler. + /// The two supported events are: DialogMessageReceived or DialogEventReceived + /// The name of the handler + handler(new Office._DialogEventArgs(eventType)); + }; + } + + Office._AsyncResult = function (method, bindingType) { + this.asyncContext = {}; + this.error = new Office._Error(); + this.status = {}; + + if ((method == "addfromSelectionAsync") || (method == "addFromNamedItemAsync") || (method == "getByIdAsync") || (method == "addFromPromptAsync")) { + this.value = new Office._Binding(bindingType); + } else if ((method == "getDataAsync") || (method == "getSelectedDataAsync")) { + if (bindingType == "table") + this.value = new Office._TableData(); + else if (bindingType == "matrix") + this.value = new Array(new Array); + else + this.value = {}; + } else if (method == "getAllAsync") { + this.value = new Array(new Office._Binding(bindingType)); + } else if (method == "getByNamespaceAsync") { + this.value = new Array(new Office._CustomXmlPart()); + } else if (method == "getNodesAsync") { + this.value = new Array(new Office._CustomXmlNode()); + } else if ((method == "XMLgetByIdAsync") || (method == "addAsync")) { + this.value = new Office._CustomXmlPart(); + } else if (method == "refreshAsync") { + this.value = new Office._context_document_settings(); + } else if (method == "getFileAsync") { + this.value = new Office._File(); + } else if (method == "getSliceAsync") { + this.value = new Office._Slice(); + } else if (method == "getActiveViewAsync") { + Office._processItem(this, + { + annotate: { + ///The presentation's current view. + value: undefined + } + }, + "value" + ); + } else if (method == "getFilePropertiesAsync") { + this.value = new Office._FileProperties(); + } else if (method == "displayDialogAsync") { + this.value = new Office._Dialog(); + }else { + this.value = {}; + } + } + + Office._FileProperties = function () { + ///File's URL + this.url = ""; + } + + Office._context_document_settings = function () { + this.get = function (settingName) { + ///Retrieves the setting with the specified name. + ///The name of the setting + }; + + this.remove = function (settingName) { + ///Removes the setting with the specified name. + ///The name of the setting + /// + }; + + this.saveAsync = function (options, callback) { + ///Saves all settings. + /// + /// Syntax example: {overwriteIfStale:false} + /// overwriteIfStale: Indicates whether the setting will be replaced if stale. + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + /// + Office._extractedCallback(arguments, 2, 2)(new Office._AsyncResult("saveAsync", coercionType)); + }; + + this.set = function (settingName, value) { + ///Sets a value for the setting with the specified name. + ///The name of the setting + ///The value for the setting + }; + }; + + Office._context_document_bindings = function () { + this.document = {}; + + if (Office._AccessWebAppMask & Office._appContext) { + this.addFromSelectionAsync = function (bindingType, options, callback) { + ///Create a binding based on what the user's current selection. + ///The Office BindingType for the data + /// + /// addFromSelectionAsyncOptions- e.g. {id: "BindingID"} + /// id: Identifier. + /// asyncContext: Object keeping state for the callback + /// columns: The string[] of the columns involved in the binding + /// sampleData: A TableData that gives sample table in the Dialog.TableData.Headers is [][] of string. + /// + ///The optional callback method + if (arguments.length == 2) { callback = options; }; + var result = new Office._AsyncResult("addfromSelectionAsync", bindingType); + callback(result); + } + } else { + this.addFromSelectionAsync = function (bindingType, options, callback) { + ///Create a binding based on what the user's current selection. + ///The Office BindingType for the data + /// + /// addFromSelectionAsyncOptions- e.g. {id: "BindingID"} + /// id: Identifier. + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + if (arguments.length == 2) { callback = options; }; + var result = new Office._AsyncResult("addfromSelectionAsync", bindingType); + callback(result); + } + } + if (Office._AccessWebAppMask & Office._appContext) { + this.addFromNamedItemAsync = function (itemName, bindingType, options, callback) { + ///Creates a binding against a named object in the document + ///Name of the bindable object in the document. For Example 'MyExpenses' table in Excel." + ///The Office BindingType for the data + /// + /// Syntax example: {id: "BindingID"} + /// id: Name of the binding, autogenerated if not supplied. + /// asyncContext: Object keeping state for the callback + /// columns: The string[] of the columns involved in the binding + /// + ///The optional callback method + + if (arguments.length == 3) { callback = options; }; + var result = new Office._AsyncResult("addFromNamedItemAsync", bindingType); + callback(result); + } + } else { + this.addFromNamedItemAsync = function (itemName, bindingType, options, callback) { + ///Creates a binding against a named object in the document + ///Name of the bindable object in the document. For Example 'MyExpenses' table in Excel." + ///The Office BindingType for the data + /// + /// Syntax example: {id: "BindingID"} + /// id: Name of the binding, autogenerated if not supplied. + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + + if (arguments.length == 3) { callback = options; }; + var result = new Office._AsyncResult("addFromNamedItemAsync", bindingType); + callback(result); + } + } + this.getByIdAsync = function (id, callback) { + ///Retrieves a binding based on its Name + ///The binding id + ///The optional callback method + + var result = new Office._AsyncResult("getByIdAsync") + callback(result); + } + this.getAllAsync = function (callback) { + ///Gets an array with all the binding objects in the document. + ///The optional callback method + var result = new Office._AsyncResult("getAllAsync") + callback(result); + }; + + this.releaseByIdAsync = function (id, callback) { + ///Removes the binding from the document + ///The binding id + ///The optional callback method + var result = new Office._AsyncResult("releaseByIdAsync") + callback(result); + }; + + + if (Office._AccessWebAppMask & Office._appContext) { + this.addFromPromptAsync = function (bindingType, options, callback) { + ///(Access only with sample data) Create a binding by prompting the user to make a selection on the document. + ///The Office BindingType for the data + /// + /// addFromPromptAsyncOptions- e.g. {promptText: "Please select data", id: "mySales"} + /// promptText: Greet your users with a friendly word. + /// asyncContext: Object keeping state for the callback + /// id: Identifier. + /// sampleData: A TableData that gives sample table in the Dialog.TableData.Headers is [][] of string. + /// + ///The optional callback method + + if (arguments.length == 2) { callback = options; }; + var result = new Office._AsyncResult("addFromPromptAsync", bindingType) + callback(result); + } + } else if (Office._ExcelMask & Office._appContext) { + this.addFromPromptAsync = function (bindingType, options, callback) { + ///(Excel only) Create a binding by prompting the user to make a selection on the document. + ///The Office BindingType for the data + /// + /// addFromPromptAsyncOptions- e.g. {promptText: "Please select data", id: "mySales"} + /// promptText: Greet your users with a friendly word. + /// asyncContext: Object keeping state for the callback + /// id: Identifier. + /// + ///The optional callback method + + if (arguments.length == 2) { callback = options; }; + var result = new Office._AsyncResult("addFromPromptAsync", bindingType) + callback(result); + + + } + } + + }; + + Office._context_ui = { + displayDialogAsync: { + value: function (startAddress, options, callback) { + /// Displays a dialog box in an Office host. + /// Accepts the initial HTTPS(TLS) URL that opens in the dialog box. + /// + /// Syntax example: {width:80} + /// width: Defines the width of the dialog box as a percentage of the current display. + /// height: Defines the height of the dialog box as a percentage of the current display. + /// displayInIFrame: false (defult): The dialog will be displayed as a new browser window + /// true: The dialog will be displayed as a floating overlay with an IFrame. + /// + ///The optional callback method + /// + if (arguments.length == 2) { callback = options; }; + var result = new Office._AsyncResult("displayDialogAsync"); + callback(result); + } + }, + closeContainer: { + value: function () { + /// + /// Closes the UI container where the JavaScript is executing. + ///
+ ///
+ /// Supported hosts: + ///
+ /// * Outlook. Minimum requirement set: Mailbox 1.5 + ///
+ ///
+ /// The behavior of this method is specified as follows. When called from: + ///
+ /// * A UI-less command button: No effect. Any dialogs opened by displayDialogAsync will remain open. + ///
+ /// * A taskpane: The taskpane will close. Any dialogs opened by displayDialogAsync will also close. If the taskpane supports pinning and was pinned by the user, it will be un-pinned. + ///
+ /// * A module extension: No effect. + ///
+ } + }, + messageParent: { + value: function (messageObject) { + /// 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. + /// Accepts a message from the dialog box to deliver to the add-in. + } + } + } + + Office._context_document = { + mode: { + annotate: { + //Gets the document mode + mode: undefined + } + }, + url: { + annotate: { + //Gets the document URL + url: undefined + } + }, + addHandlerAsync: { + value: function (eventType, handler, callback) { + /// Adds an event handler for the specified event type. + ///The event type. For document can be 'DocumentSelectionChanged' + ///The name of the handler + ///The optional callback method + var result = new Office._AsyncResult("addHandlerAsync"); + callback(result); + handler(new Office._DocumentEventArgs(eventType)); + } + }, + removeHandlerAsync: { + value: function (eventType, handler, callback) { + /// Removes an event handler for the specified event type. + ///The event type. For document can be 'DocumentSelectionChanged' + ///The name of the handler. If not specified all handlers are removed + ///The optional callback method + /// + var result = new Office._AsyncResult("removeHandlerAsync", coercionType); + callback(result); + } + }, + settings: { + conditions: { + hosts: ["word", "excel", "ppt", "accesswebapp"], + reqs: [ + "set Settings GE 1.1", + "method Settings.get", + "method Settings.remove", + "method Settings.saveAsync", + "method Settings.set" + ] + }, + value: new Office._context_document_settings() + }, + refreshableSettings: { + name: "settings", + conditions: { + hosts: ["excel", "ppt", "accesswebapp"], + reqs: [] + }, + partialConditions: true, + contents: { + addHandlerAsync: { + conditions: { reqs: ["method Settings.addHandlerAsync"] }, + value: function (eventType, handler, callback) { + /// Adds an event handler for the object using the specified event type. + ///The event type. For settings can be 'settingsChanged' + ///The name of the handler + ///The optional callback method + + var result = new Office._AsyncResult("addHandlerAsync", coercionType); + callback(result); + + } + }, + refreshAsync: { + conditions: { reqs: ["method Settings.refreshAsync"] }, + value: function (callback) { + ///Gets the latest version of the settings object. + ///The optional callback method + var result = new Office._AsyncResult("refreshAsync", coercionType); + callback(result); + } + }, + removeHandlerAsync: { + conditions: { reqs: ["method Settings.removeHandlerAsync"] }, + value: function (eventType, handler, callback) { + /// Removes an event handler for the specified event type. + ///The event type. For settings can be 'settingsChanged' + /// + /// Syntax example: {handler:eventHandler} + /// handler: Indicates a specific handler to be removed, if not specified all handlers are removed + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + var result = new Office._AsyncResult("removeHandlerAsync", coercionType); + callback(result); + } + } + } + }, + setSelectedDataAsync: { + conditions: { + hosts: ["word", "excel", "ppt"], + reqs: ["set Selection GE 1.1", "method Document.setSelectedDataAsync"] + }, + value: function (data, options, callback) { + /// Writes the specified data into the current selection. + ///The data to be set. Either a string or value, 2d array or TableData object + /// + /// Syntax example: {coercionType:Office.CoercionType.Matrix} or {coercionType: 'matrix'} + /// coercionType: Explicitly sets the shape of the data object. Use Office.CoercionType or text value. If not supplied is inferred from the data type. + /// imageLeft: Used for image. Sets the left position of the image. + /// imageTop: Used for image. Sets the top position of the image. + /// imageWidth: Used for image. Sets the width of the image. + /// imageHeight: Used for image. Sets the height of the image. + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + /// + if (arguments.length == 2) { callback = options; }; + var result = new Office._AsyncResult("setSelectedDataAsync"); + callback(result); + } + }, + bindings: { + conditions: { + hosts: ["word", "excel", "accesswebapp"], + reqs: [ + "set TextBindings GE 1.1", + "set TableBindings GE 1.1", + "set MatrixBindings GE 1.1", + "method Bindings.addFromPromptAsync", + "method Bindings.addFromNamedItemAsync", + "method Bindings.addFromSelectionAsync", + "method Bindings.getAllAsync", + "method Bindings.getByIdAsync", + "method Bindings.releaseByIdAsync", + "method MatrixBinding.getDataAsync", + "method MatrixBinding.setDataAsync", + "method TableBinding.clearFormatsAsync", + "method TableBinding.setFormatsAsync", + "method TableBinding.setTableOptionsAsync", + "method TableBinding.addColumnsAsync", + "method TableBinding.addRowsAsync", + "method TableBinding.deleteAllDataValuesAsync", + "method TableBinding.getDataAsync", + "method TableBinding.setDataAsync", + "method TextBinding.getDataAsync", + "method TextBinding.setDataAsync" + ] + }, + value: new Office._context_document_bindings() + }, + getFileAsync: { + conditions: { + hosts: ["word", "ppt","excel"], + reqs: ["set File GE 1.1", "method Document.getFileAsync", "method File.closeAsync", "method File.getSliceAsync"] + }, + value: function (fileType, options, callback) { + ///(Word and PowerPoint only) Gets the entire file in slices of up to 4MB. + ///The format in which the file will be returned + /// + /// Syntax example: {sliceSize:1024} + /// sliceSize: Specifies the desired slice size (in bytes) up to 4MB. If not specified a default slice size of 4MB will be used. + /// + ///The optional callback method + if (arguments.length == 2) { callback = options; }; + var result = new Office._AsyncResult("getFileAsync"); + callback(result); + } + }, + getSelectedDataAsync: { + conditions: { + hosts: ["excel", "word", "project", "ppt"], + reqs: ["set Selection GE 1.1", "method Document.getSelectedDataAsync"] + }, + value: function (coercionType, options, callback) { + /// Returns the current selection. + ///The expected shape of the selection. + /// + /// Syntax example: {valueFormat: 'formatted', filterType:'all'} + /// valueFormat: Get data with or without format. Use Office.ValueFormat or text value. + /// filterType: Get the visible or all the data. Useful when filtering data. Use Office.FilterType or text value. + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + /// + if (arguments.length == 2) { callback = options; }; + var result = new Office._AsyncResult("getSelectedDataAsync", coercionType); + callback(result); + } + }, + customXmlParts: { + conditions: { + hosts: ["word"], + reqs: [ + "set CustomXmlParts GE 1.1", + "method CustomXmlNode.getNodesAsync", + "method CustomXmlNode.getNodeValueAsync", + "method CustomXmlNode.getXmlAsync", + "method CustomXmlNode.setNodeValueAsync", + "method CustomXmlNode.setXmlAsync", + "method CustomXmlPart.addHandlerAsync", + "method CustomXmlPart.deleteAsync", + "method CustomXmlPart.getNodesAsync", + "method CustomXmlPart.getXmlAsync", + "method CustomXmlPart.removeHandlerAsync", + "method CustomXmlPrefixMappings.addNamespaceAsync", + "method CustomXmlPrefixMappings.getNamespaceAsync", + "method CustomXmlPrefixMappings.getPrefixAsync" + ] + }, + partialConditions: true, + contents: { + addAsync: { + conditions: { + reqs: ["method CustomXmlParts.addAsync"] + }, + value: function (xml, callback) { + ///(Word Only) Asynchronously adds a new custom XML part to a file. + ///The XML to add to the newly created custom XML part. + ///A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + var result = new Office._AsyncResult("addAsync"); + callback(result); + } + }, + getByIdAsync: { + conditions: { + reqs: ["method CustomXmlParts.getByIdAsync"] + }, + value: function (id, callback) { + ///(Word Only) Asynchronously gets the specified custom XML part by its id. + ///The id of the custom XML part. + ///A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + var result = new Office._AsyncResult("XMLgetByIdAsync"); + callback(result); + } + }, + getByNamespaceAsync: { + conditions: { + reqs: ["method CustomXmlParts.getByNamespaceAsync"] + }, + value: function (ns, callback) { + ///(Word Only) Asynchronously gets the specified custom XML part(s) by its namespace. + /// The namespace to search. + ///A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + var result = new Office._AsyncResult("getByNamespaceAsync"); + callback(result); + } + } + } + }, + getActiveViewAsync: { + conditions: { + hosts: ["ppt"], + reqs: ["set ActiveView GE 1.1", "method Document.getActiveViewAsync"] + }, + value: function(options, callback) { + ///(PowerPoint only) Returns the current view of the presentation. + /// + /// Syntax example: {asyncContext:context} + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + Office._extractedCallback(arguments, 2, 2)(new Office._AsyncResult("getActiveViewAsync")); + } + }, + getFilePropertiesAsync: { + conditions: { + hosts: ["word", "ppt", "excel"], + reqs: ["method Document.getFilePropertiesAsync"] + }, + value: function(options, callback) { + ///Gets file properties of the current document. + /// + /// Syntax example: {asyncContext:context} + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + Office._extractedCallback(arguments, 2, 2)(new Office._AsyncResult("getFilePropertiesAsync")); + } + }, + goToByIdAsync: { + conditions: { + hosts: ["excel", "ppt", "word"], + reqs: ["method Document.goToByIdAsync"] + }, + value: function(id, goToType, options, callback) { + ///Goes to the specified object or location in the document. + ///The identifier of the object or location to go to. + ///The type of the location to go to. + /// + /// Syntax example: {asyncContext:context} + /// selectionMode: (Word only) Use Office.SelectionMode or text value. + /// asyncContext: Object keeping state for the callback + /// + ///The optional callback method + Office._extractedCallback(arguments, 4, 2)(new Office._AsyncResult("goToByIdAsync")); + } + } + } +} + +Office._items = { + context: { + contents: { + host: "", + platform: "", + diagnostics: {}, + contentLanguage: {}, + displayLanguage: {}, + license: { + contents: { + value: { + annotate: { + //License summary. + value: undefined + } + } + } + }, + document: { + conditions: { + hosts: ["not outlook; not outlookcompose"] + }, + annotate: { + // Office Document + document: undefined + }, + contents: Office._context_document + }, + officeTheme: { + conditions: { + hosts: ["excel", "outlook", "powerpoint", "project", "word"] + }, + annotate: { + officeTheme: undefined + }, + contents: { + "bodyBackgroundColor": {}, + "bodyForegroundColor": {}, + "controlBackgroundColor": {}, + "controlForegroundColor": {} + } + }, + touchEnabled: {}, + commerceAllowed : {}, + requirements: { + annotate: { + // Checks whether a given requirement set is supported by the current host. + requirements: undefined + }, + contents: { + isSetSupported: { + value: function (name, minVersion) { + /// Check if the specified requirement set is supported by the host Office application + /// Set name. e.g.: "MatrixBindings" + /// The minimum required version + } + }, + } + }, + ui: { + annotate: { + // Office UI + ui: undefined + }, + contents: Office._context_ui + } + } + }, + initialize: { + value: function (reason) { + /// This method is called after the Office API was loaded. + /// Indicates how the app was initialized + } + }, + useShortNamespace: { + value: function (useShortNamespace) { + /// Indicates if the large namespace for objects will be used or not. + /// Indicates if 'true' that the short namespace will be used + } + }, + select: { + conditions: { + hosts: ["not outlook; not outlookcompose"] + }, + value: function (expression, callback) { + /// Returns a promise of an object described in the expression. Callback is invoked only if method fails. + ///The object to be retrieved. Example "bindings#BindingName", retrieves a binding promise for a binding named 'BindingName' + ///The optional callback method + /// + var result = new Office._AsyncResult("select"); + callback(result); + return (new Office._Binding()); + } + }, + TableData: { + conditions: { + hosts: ["word", "excel", "accesswebapp"], + reqs: ["set TableBindings GE 1.1"] + }, + value: new Office._TableData() + } +}; + +/*Infrastructure***************************************************************/ +Office._processItem = function (target, item, key, suppressConditionCheck) { + var conditionsFulfilled = suppressConditionCheck || Office._filterManager._checkCondition(item.conditions); + if (!(conditionsFulfilled || item.partialConditions)) { + return false; + } + suppressConditionCheck = suppressConditionCheck || conditionsFulfilled && item.partialConditions; + + if (item.setup) { + item.setup(); + } + if (item.metaOnly) { + return Office._processContents(target, item.contents, suppressConditionCheck); + } + + key = item.name || key; + var areItemsAdded = false; + + if (item.hasOwnProperty("value")) { + target[key] = item.value; + areItemsAdded = true; + } else if (typeof item.contents == "function") { + target[key] = item.contents(); + areItemsAdded = true; + } else { + target[key] = target[key] || {}; + if (Office._processContents(target[key], item.contents, suppressConditionCheck) || conditionsFulfilled) { + areItemsAdded = true; + } else { + delete target[key]; + } + } + if (item.annotate) { + intellisense.annotate(target, item.annotate); + areItemsAdded = true; + } + return areItemsAdded; +} + +Office._processContents = function (target, contents, suppressConditionCheck) { + if (typeof contents !== "object") { + return false; + } + + var areItemsAdded = false; + for (var item in contents) { + areItemsAdded = Office._processItem(target, contents[item], item, suppressConditionCheck) || areItemsAdded; + } + return areItemsAdded; +} + +Office._filterManager = (function () { + + var filters = []; + + return { + _checkCondition: function (condition) { + if (!condition) + return true; + + var answer = true; + + for (var i = 0; i < filters.length; i++) { + var filter = filters[i]; + var conditionForThisFilter = condition[filter.identifier]; + if (conditionForThisFilter && filter.isEnabled()) { + + var thisFiltersAnswer = false; + + for (var j = 0; j < conditionForThisFilter.length; j++) { + var productTerm = conditionForThisFilter[j].split(';'); + + var thisTermsAnswer = true; + for (var k = 0; k < productTerm.length; k++) { + var singleCondition = productTerm[k].toUpperCase().trim(); + var invert = false; + if (singleCondition.indexOf("NOT") != -1) { + invert = true; + singleCondition = singleCondition.slice(singleCondition.indexOf(" ")).trim(); + } + var result = filter.isConditionTrue(singleCondition, invert); + thisTermsAnswer = thisTermsAnswer && result; + } + + thisFiltersAnswer = thisFiltersAnswer || thisTermsAnswer; + } + + answer = answer && thisFiltersAnswer; + } + + if (!answer) + break; + } + + return answer; + }, + + _pushFilter: function (identifier, filteringDelegate, isEnabledDelegate) { + filters.push({ + identifier: identifier, + isConditionTrue: filteringDelegate, + isEnabled: isEnabledDelegate + }); + } + } +})(); + +Office._filterManager._pushFilter( + "hosts", + (function () { + var nameToMaskMapping = { + EXCEL: Office._ExcelMask, + WORD: Office._WordMask, + PROJECT: Office._ProjectMask, + OUTLOOK: Office._OutlookMask, + PPT: Office._PowerPointMask, + OUTLOOKCOMPOSE: Office._OutlookComposeMask, + ACCESSWEBAPP: Office._AccessWebAppMask + } + + return function (condition, invert) { + var result = false; + if (nameToMaskMapping[condition] & Office._appContext) { + result = true; + } + return invert ? !result : result; + } + })(), + function () { + return typeof Office._appContext === "number"; + } +); + +Office._filterManager._pushFilter( + "reqs", + (function () { + + function checkForMethod(methodName) { + return Office._methodContext && Office._methodContext[methodName]; + } + + function checkForSet(setDescriptor) { + setDescriptor = setDescriptor.split(" "); + var setName = setDescriptor[0].trim(), + setEntry = Office._setContext && setName in Office._setContext && (Office._setContext[setName] || "1.1"); + + if (!setEntry) { + return false; + } + + if (setDescriptor.length === 1) { + return true; + } else { + var comparisonOperator = setDescriptor[1].trim(), + setVersion = setDescriptor[2].split("."), + setEntryVersion = setEntry.split("."), + difference = 0, + maxComponentCount = Math.max(setEntryVersion.length, setVersion.length); + + for (var i = 0; i < maxComponentCount; i++) { + var leftInt = parseInt(setEntryVersion[i], 10) || 0, + rightInt = parseInt(setVersion[i], 10) || 0; + if (leftInt === rightInt) { + continue; + } + difference = leftInt - rightInt; + break; + } + + switch (comparisonOperator) { + case "EQ": + return difference === 0; + case "GT": + return difference > 0; + case "LT": + return difference < 0; + case "GE": + return difference >= 0; + case "LE": + return difference <= 0; + default: + return false; + } + } + return false; + } + + return function (condition, invert) { + var result = true; + var typeAgnosticCond = condition.slice(condition.indexOf(" ")).trim(); + if (condition.indexOf("SET") === 0) { + result = checkForSet(typeAgnosticCond); + } else if (condition.indexOf("METHOD") === 0) { + result = checkForMethod(typeAgnosticCond); + } + return invert ? !result : result; + } + })(), + function () { + if (Office._showAll === false) { + return true; + } + return false; + } +) + +Office._addEnumOnObject = function (enumName, enumObj, targetObj, conditions) { + Office._processItem( + targetObj, + { + conditions: conditions, + value: enumObj + }, + enumName + ); +} +/******************************************************************************/ + +// Setup Project +Office._processItem(Office, { + metaOnly: true, + conditions: { + hosts: ["project"] + }, + contents: { + ProjectProjectFields: { + value: { + ///CurrencySymbol + CurrencySymbol: 1, + ///CurrencySymbolPosition + CurrencySymbolPosition: 2, + ///DurationUnits + DurationUnits: 3, + ///GUID + GUID: 4, + ///Finish + Finish: 5, + ///Start + Start: 6, + ///ReadOnly + ReadOnly: 7, + ///VERSION + VERSION: 8, + ///WorkUnits + WorkUnits: 9, + ///ProjectServerUrl + ProjectServerUrl: 10, + ///WSSUrl + WSSUrl: 11, + ///WSSList + WSSList: 12 + } + }, + ProjectViewTypes: { + value: { + ///Gantt + Gantt: 1, + ///NetworkDiagram + NetworkDiagram: 2, + ///TaskDiagram + TaskDiagram: 3, + ///TaskForm + TaskForm: 4, + ///TaskSheet + TaskSheet: 5, + ///ResourceForm + ResourceForm: 6, + ///ResourceSheet + ResourceSheet: 7, + ///ResourceGraph + ResourceGraph: 8, + ///TeamPlanner + TeamPlanner: 9, + ///TaskDetails + TaskDetails: 10, + ///TaskNameForm + TaskNameForm: 11, + ///ResourceNames + ResourceNames: 12, + ///Calendar + Calendar: 13, + ///TaskUsage + TaskUsage: 14, + ///ResourceUsage + ResourceUsage: 15, + ///Timeline + Timeline: 16, + ///Drawing + Drawing: 18, + ///Resource Plan + ResourcePlan: 19 + } + }, + ProjectTaskFields: { + value: { + ///ActualCost + ActualCost: 0, + ///ActualDuration + ActualDuration: 1, + ///ActualFinish + ActualFinish: 2, + ///ActualOvertimeCost + ActualOvertimeCost: 3, + ///ActualOvertimeWork + ActualOvertimeWork: 4, + ///ActualStart + ActualStart: 5, + ///ActualWork + ActualWork: 6, + ///Text1 + Text1: 7, + ///Text10 + Text10: 8, + ///Finish10 + Finish10: 9, + ///Start10 + Start10: 10, + ///Text11 + Text11: 11, + ///Text12 + Text12: 12, + ///Text13 + Text13: 13, + ///Text14 + Text14: 14, + ///Text15 + Text15: 15, + ///Text16 + Text16: 16, + ///Text17 + Text17: 17, + ///Text18 + Text18: 18, + ///Text19 + Text19: 19, + ///Finish1 + Finish1: 20, + ///Start1 + Start1: 21, + ///Text2 + Text2: 22, + ///Text20 + Text20: 23, + ///Text21 + Text21: 24, + ///Text22 + Text22: 25, + ///Text23 + Text23: 26, + ///Text24 + Text24: 27, + ///Text25 + Text25: 28, + ///Text26 + Text26: 29, + ///Text27 + Text27: 30, + ///Text28 + Text28: 31, + ///Text29 + Text29: 32, + ///Finish2 + Finish2: 33, + ///Start2 + Start2: 34, + ///Text3 + Text3: 35, + ///Text30 + Text30: 36, + ///Finish3 + Finish3: 37, + ///Start3 + Start3: 38, + ///Text4 + Text4: 39, + ///Finish4 + Finish4: 40, + ///Start4 + Start4: 41, + ///Text5 + Text5: 42, + ///Finish5 + Finish5: 43, + ///Start5 + Start5: 44, + ///Text6 + Text6: 45, + ///Finish6 + Finish6: 46, + ///Start6 + Start6: 47, + ///Text7 + Text7: 48, + ///Finish7 + Finish7: 49, + ///Start7 + Start7: 50, + ///Text8 + Text8: 51, + ///Finish8 + Finish8: 52, + ///Start8 + Start8: 53, + ///Text9 + Text9: 54, + ///Finish9 + Finish9: 55, + ///Start9 + Start9: 56, + ///Baseline10BudgetCost + Baseline10BudgetCost: 57, + ///Baseline10BudgetWork + Baseline10BudgetWork: 58, + ///Baseline10Cost + Baseline10Cost: 59, + ///Baseline10Duration + Baseline10Duration: 60, + ///Baseline10Finish + Baseline10Finish: 61, + ///Baseline10FixedCost + Baseline10FixedCost: 62, + ///Baseline10FixedCostAccrual + Baseline10FixedCostAccrual: 63, + ///Baseline10Start + Baseline10Start: 64, + ///Baseline10Work + Baseline10Work: 65, + ///Baseline1BudgetCost + Baseline1BudgetCost: 66, + ///Baseline1BudgetWork + Baseline1BudgetWork: 67, + ///Baseline1Cost + Baseline1Cost: 68, + ///Baseline1Duration + Baseline1Duration: 69, + ///Baseline1Finish + Baseline1Finish: 70, + ///Baseline1FixedCost + Baseline1FixedCost: 71, + ///Baseline1FixedCostAccrual + Baseline1FixedCostAccrual: 72, + ///Baseline1Start + Baseline1Start: 73, + ///Baseline1Work + Baseline1Work: 74, + ///Baseline2BudgetCost + Baseline2BudgetCost: 75, + ///Baseline2BudgetWork + Baseline2BudgetWork: 76, + ///Baseline2Cost + Baseline2Cost: 77, + ///Baseline2Duration + Baseline2Duration: 78, + ///Baseline2Finish + Baseline2Finish: 79, + ///Baseline2FixedCost + Baseline2FixedCost: 80, + ///Baseline2FixedCostAccrual + Baseline2FixedCostAccrual: 81, + ///Baseline2Start + Baseline2Start: 82, + ///Baseline2Work + Baseline2Work: 83, + ///Baseline3BudgetCost + Baseline3BudgetCost: 84, + ///Baseline3BudgetWork + Baseline3BudgetWork: 85, + ///Baseline3Cost + Baseline3Cost: 86, + ///Baseline3Duration + Baseline3Duration: 87, + ///Baseline3Finish + Baseline3Finish: 88, + ///Baseline3FixedCost + Baseline3FixedCost: 89, + ///Baseline3FixedCostAccrual + Baseline3FixedCostAccrual: 90, + ///Basline3Start + Basline3Start: 91, + ///Baseline3Work + Baseline3Work: 92, + ///Baseline4BudgetCost + Baseline4BudgetCost: 93, + ///Baseline4BudgetWork + Baseline4BudgetWork: 94, + ///Baseline4Cost + Baseline4Cost: 95, + ///Baseline4Duration + Baseline4Duration: 96, + ///Baseline4Finish + Baseline4Finish: 97, + ///Baseline4FixedCost + Baseline4FixedCost: 98, + ///Baseline4FixedCostAccrual + Baseline4FixedCostAccrual: 99, + ///Baseline4Start + Baseline4Start: 100, + ///Baseline4Work + Baseline4Work: 101, + ///Baseline5BudgetCost + Baseline5BudgetCost: 102, + ///Baseline5BudgetWork + Baseline5BudgetWork: 103, + ///Baseline5Cost + Baseline5Cost: 104, + ///Baseline5Duration + Baseline5Duration: 105, + ///Baseline5Finish + Baseline5Finish: 106, + ///Baseline5FixedCost + Baseline5FixedCost: 107, + ///Baseline5FixedCostAccrual + Baseline5FixedCostAccrual: 108, + ///Baseline5Start + Baseline5Start: 109, + ///Baseline5Work + Baseline5Work: 110, + ///Baseline6BudgetCost + Baseline6BudgetCost: 111, + ///Baseline6BudgetWork + Baseline6BudgetWork: 112, + ///Baseline6Cost + Baseline6Cost: 113, + ///Baseline6Duration + Baseline6Duration: 114, + ///Baseline6Finish + Baseline6Finish: 115, + ///Baseline6FixedCost + Baseline6FixedCost: 116, + ///Baseline6FixedCostAccrual + Baseline6FixedCostAccrual: 117, + ///Baseline6Start + Baseline6Start: 118, + ///Baseline6Work + Baseline6Work: 119, + ///Baseline7BudgetCost + Baseline7BudgetCost: 120, + ///Baseline7BudgetWork + Baseline7BudgetWork: 121, + ///Baseline7Cost + Baseline7Cost: 122, + ///Baseline7Duration + Baseline7Duration: 123, + ///Baseline7Finish + Baseline7Finish: 124, + ///Baseline7FixedCost + Baseline7FixedCost: 125, + ///Baseline7FixedCostAccrual + Baseline7FixedCostAccrual: 126, + ///Baseline7Start + Baseline7Start: 127, + ///Baseline7Work + Baseline7Work: 128, + ///Baseline8BudgetCost + Baseline8BudgetCost: 129, + ///Baseline8BudgetWork + Baseline8BudgetWork: 130, + ///Baseline8Cost + Baseline8Cost: 131, + ///Baseline8Duration + Baseline8Duration: 132, + ///Baseline8Finish + Baseline8Finish: 133, + ///Baseline8FixedCost + Baseline8FixedCost: 134, + ///Baseline8FixedCostAccrual + Baseline8FixedCostAccrual: 135, + ///Baseline8Start + Baseline8Start: 136, + ///Baseline8Work + Baseline8Work: 137, + ///Baseline9BudgetCost + Baseline9BudgetCost: 138, + ///Baseline9BudgetWork + Baseline9BudgetWork: 139, + ///Baseline9Cost + Baseline9Cost: 140, + ///Baseline9Duration + Baseline9Duration: 141, + ///Baseline9Finish + Baseline9Finish: 142, + ///Baseline9FixedCost + Baseline9FixedCost: 143, + ///Baseline9FixedCostAccrual + Baseline9FixedCostAccrual: 144, + ///Baseline9Start + Baseline9Start: 145, + ///Baseline9Work + Baseline9Work: 146, + ///BaselineBudgetCost + BaselineBudgetCost: 147, + ///BaselineBudgetWork + BaselineBudgetWork: 148, + ///BaselineCost + BaselineCost: 149, + ///BaselineDuration + BaselineDuration: 150, + ///BaselineFinish + BaselineFinish: 151, + ///BaselineFixedCost + BaselineFixedCost: 152, + ///BaselineFixedCostAccrual + BaselineFixedCostAccrual: 153, + ///BaselineStart + BaselineStart: 154, + ///BaselineWork + BaselineWork: 155, + ///BudgetCost + BudgetCost: 156, + ///BudgetFixedCost + BudgetFixedCost: 157, + ///BudgetFixedWork + BudgetFixedWork: 158, + ///BudgetWork + BudgetWork: 159, + ///TaskCalendarGUID + TaskCalendarGUID: 160, + ///ConstraintDate + ConstraintDate: 161, + ///ConstraintType + ConstraintType: 162, + ///Cost1 + Cost1: 163, + ///Cost10 + Cost10: 164, + ///Cost2 + Cost2: 165, + ///Cost3 + Cost3: 166, + ///Cost4 + Cost4: 167, + ///Cost5 + Cost5: 168, + ///Cost6 + Cost6: 169, + ///Cost7 + Cost7: 170, + ///Cost8 + Cost8: 171, + ///Cost9 + Cost9: 172, + ///Date1 + Date1: 173, + ///Date10 + Date10: 174, + ///Date2 + Date2: 175, + ///Date3 + Date3: 176, + ///Date4 + Date4: 177, + ///Date5 + Date5: 178, + ///Date6 + Date6: 179, + ///Date7 + Date7: 180, + ///Date8 + Date8: 181, + ///Date9 + Date9: 182, + ///Deadline + Deadline: 183, + ///Duration1 + Duration1: 184, + ///Duration10 + Duration10: 185, + ///Duration2 + Duration2: 186, + ///Duration3 + Duration3: 187, + ///Duration4 + Duration4: 188, + ///Duration5 + Duration5: 189, + ///Duration6 + Duration6: 190, + ///Duration7 + Duration7: 191, + ///Duration8 + Duration8: 192, + ///Duration9 + Duration9: 193, + ///Duration + Duration: 194, + ///EarnedValueMethod + EarnedValueMethod: 195, + ///FinishSlack + FinishSlack: 196, + ///FixedCost + FixedCost: 197, + ///FixedCostAccrual + FixedCostAccrual: 198, + ///Flag10 + Flag10: 199, + ///Flag1 + Flag1: 200, + ///Flag11 + Flag11: 201, + ///Flag12 + Flag12: 202, + ///Flag13 + Flag13: 203, + ///Flag14 + Flag14: 204, + ///Flag15 + Flag15: 205, + ///Flag16 + Flag16: 206, + ///Flag17 + Flag17: 207, + ///Flag18 + Flag18: 208, + ///Flag19 + Flag19: 209, + ///Flag2 + Flag2: 210, + ///Flag20 + Flag20: 211, + ///Flag3 + Flag3: 212, + ///Flag4 + Flag4: 213, + ///Flag5 + Flag5: 214, + ///Flag6 + Flag6: 215, + ///Flag7 + Flag7: 216, + ///Flag8 + Flag8: 217, + ///Flag9 + Flag9: 218, + ///FreeSlack + FreeSlack: 219, + ///HasRollupSubTasks + HasRollupSubTasks: 220, + ///ID + ID: 221, + ///Name + Name: 222, + ///Notes + Notes: 223, + ///Number1 + Number1: 224, + ///Number10 + Number10: 225, + ///Number11 + Number11: 226, + ///Number12 + Number12: 227, + ///Number13 + Number13: 228, + ///Number14 + Number14: 229, + ///Number15 + Number15: 230, + ///Number16 + Number16: 231, + ///Number17 + Number17: 232, + ///Number18 + Number18: 233, + ///Number19 + Number19: 234, + ///Number2 + Number2: 235, + ///Number20 + Number20: 236, + ///Number3 + Number3: 237, + ///Number4 + Number4: 238, + ///Number5 + Number5: 239, + ///Number6 + Number6: 240, + ///Number7 + Number7: 241, + ///Number8 + Number8: 242, + ///Number9 + Number9: 243, + ///ScheduledDuration + ScheduledDuration: 244, + ///ScheduledFinish + ScheduledFinish: 245, + ///ScheduledStart + ScheduledStart: 246, + ///OutlineLevel + OutlineLevel: 247, + ///OvertimeCost + OvertimeCost: 248, + ///OvertimeWork + OvertimeWork: 249, + ///PercentComplete + PercentComplete: 250, + ///PercentWorkComplete + PercentWorkComplete: 251, + ///Predecessors + Predecessors: 252, + ///PreleveledFinish + PreleveledFinish: 253, + ///PreleveledStart + PreleveledStart: 254, + ///Priority + Priority: 255, + ///Active + Active: 256, + ///Critical + Critical: 257, + ///Milestone + Milestone: 258, + ///Overallocated + Overallocated: 259, + ///IsRollup + IsRollup: 260, + ///Summary + Summary: 261, + ///RegularWork + RegularWork: 262, + ///RemainingCost + RemainingCost: 263, + ///RemainingDuration + RemainingDuration: 264, + ///RemainingOvertimeCost + RemainingOvertimeCost: 265, + ///RemainingWork + RemainingWork: 266, + ///ResourceNames + ResourceNames: 267, + ///ResourceNames + ResourceNames: 268, + ///Cost + Cost: 269, + ///Finish + Finish: 270, + ///Start + Start: 271, + ///Work + Work: 272, + ///StartSlack + StartSlack: 273, + ///Status + Status: 274, + ///Successors + Successors: 275, + ///StatusManager + StatusManager: 276, + ///TotalSlack + TotalSlack: 277, + ///TaskGUID + TaskGUID: 278, + ///Type + Type: 279, + ///WBS + WBS: 280, + ///WBSPREDECESSORS + WBSPREDECESSORS: 281, + ///WBSSUCCESSORS + WBSSUCCESSORS: 282, + ///WSSID + WSSID: 283 + } + }, + ProjectResourceFields: { + value: { + ///Accrual + Accrual: 0, + ///ActualCost + ActualCost: 1, + ///ActualOvertimeCost + ActualOvertimeCost: 2, + ///ActualOvertimeWork + ActualOvertimeWork: 3, + ///ActualOvertimeWorkProtected + ActualOvertimeWorkProtected: 4, + ///ActualWork + ActualWork: 5, + ///ActualWorkProtected + ActualWorkProtected: 6, + ///BaseCalendar + BaseCalendar: 7, + ///Baseline10BudgetCost + Baseline10BudgetCost: 8, + ///Baseline10BudgetWork + Baseline10BudgetWork: 9, + ///Baseline10Cost + Baseline10Cost: 10, + ///Baseline10Work + Baseline10Work: 11, + ///Baseline1BudgetCost + Baseline1BudgetCost: 12, + ///Baseline1BudgetWork + Baseline1BudgetWork: 13, + ///Baseline1Cost + Baseline1Cost: 14, + ///Baseline1Work + Baseline1Work: 15, + ///Baseline2BudgetCost + Baseline2BudgetCost: 16, + ///Baseline2BudgetWork + Baseline2BudgetWork: 17, + ///Baseline2Cost + Baseline2Cost: 18, + ///Baseline2Work + Baseline2Work: 19, + ///Baseline3BudgetCost + Baseline3BudgetCost: 20, + ///Baseline3BudgetWork + Baseline3BudgetWork: 21, + ///Baseline3Cost + Baseline3Cost: 22, + ///Baseline3Work + Baseline3Work: 23, + ///Baseline4BudgetCost + Baseline4BudgetCost: 24, + ///Baseline4BudgetWork + Baseline4BudgetWork: 25, + ///Baseline4Cost + Baseline4Cost: 26, + ///Baseline4Work + Baseline4Work: 27, + ///Baseline5BudgetCost + Baseline5BudgetCost: 28, + ///Baseline5BudgetWork + Baseline5BudgetWork: 29, + ///Baseline5Cost + Baseline5Cost: 30, + ///Baseline5Work + Baseline5Work: 31, + ///Baseline6BudgetCost + Baseline6BudgetCost: 32, + ///Baseline6BudgetWork + Baseline6BudgetWork: 33, + ///Baseline6Cost + Baseline6Cost: 34, + ///Baseline6Work + Baseline6Work: 35, + ///Baseline7BudgetCost + Baseline7BudgetCost: 36, + ///Baseline7BudgetWork + Baseline7BudgetWork: 37, + ///Baseline7Cost + Baseline7Cost: 38, + ///Baseline7Work + Baseline7Work: 39, + ///Baseline8BudgetCost + Baseline8BudgetCost: 40, + ///Baseline8BudgetWork + Baseline8BudgetWork: 41, + ///Baseline8Cost + Baseline8Cost: 42, + ///Baseline8Work + Baseline8Work: 43, + ///Baseline9BudgetCost + Baseline9BudgetCost: 44, + ///Baseline9BudgetWork + Baseline9BudgetWork: 45, + ///Baseline9Cost + Baseline9Cost: 46, + ///Baseline9Work + Baseline9Work: 47, + ///BaselineBudgetCost + BaselineBudgetCost: 48, + ///BaselineBudgetWork + BaselineBudgetWork: 49, + ///BaselineCost + BaselineCost: 50, + ///BaselineWork + BaselineWork: 51, + ///BudgetCost + BudgetCost: 52, + ///BudgetWork + BudgetWork: 53, + ///ResourceCalendarGUID + ResourceCalendarGUID: 54, + ///Code + Code: 55, + ///Cost1 + Cost1: 56, + ///Cost10 + Cost10: 57, + ///Cost2 + Cost2: 58, + ///Cost3 + Cost3: 59, + ///Cost4 + Cost4: 60, + ///Cost5 + Cost5: 61, + ///Cost6 + Cost6: 62, + ///Cost7 + Cost7: 63, + ///Cost8 + Cost8: 64, + ///Cost9 + Cost9: 65, + ///ResourceCreationDate + ResourceCreationDate: 66, + ///Date1 + Date1: 67, + ///Date10 + Date10: 68, + ///Date2 + Date2: 69, + ///Date3 + Date3: 70, + ///Date4 + Date4: 71, + ///Date5 + Date5: 72, + ///Date6 + Date6: 73, + ///Date7 + Date7: 74, + ///Date8 + Date8: 75, + ///Date9 + Date9: 76, + ///Duration1 + Duration1: 77, + ///Duration10 + Duration10: 78, + ///Duration2 + Duration2: 79, + ///Duration3 + Duration3: 80, + ///Duration4 + Duration4: 81, + ///Duration5 + Duration5: 82, + ///Duration6 + Duration6: 83, + ///Duration7 + Duration7: 84, + ///Duration8 + Duration8: 85, + ///Duration9 + Duration9: 86, + ///Email + Email: 87, + ///End + End: 88, + ///Finish1 + Finish1: 89, + ///Finish10 + Finish10: 90, + ///Finish2 + Finish2: 91, + ///Finish3 + Finish3: 92, + ///Finish4 + Finish4: 93, + ///Finish5 + Finish5: 94, + ///Finish6 + Finish6: 95, + ///Finish7 + Finish7: 96, + ///Finish8 + Finish8: 97, + ///Finish9 + Finish9: 98, + ///Flag10 + Flag10: 99, + ///Flag1 + Flag1: 100, + ///Flag11 + Flag11: 101, + ///Flag12 + Flag12: 102, + ///Flag13 + Flag13: 103, + ///Flag14 + Flag14: 104, + ///Flag15 + Flag15: 105, + ///Flag16 + Flag16: 106, + ///Flag17 + Flag17: 107, + ///Flag18 + Flag18: 108, + ///Flag19 + Flag19: 109, + ///Flag2 + Flag2: 110, + ///Flag20 + Flag20: 111, + ///Flag3 + Flag3: 112, + ///Flag4 + Flag4: 113, + ///Flag5 + Flag5: 114, + ///Flag6 + Flag6: 115, + ///Flag7 + Flag7: 116, + ///Flag8 + Flag8: 117, + ///Flag9 + Flag9: 118, + ///Group + Group: 119, + ///Units + Units: 120, + ///Name + Name: 121, + ///Notes + Notes: 122, + ///Number1 + Number1: 123, + ///Number10 + Number10: 124, + ///Number11 + Number11: 125, + ///Number12 + Number12: 126, + ///Number13 + Number13: 127, + ///Number14 + Number14: 128, + ///Number15 + Number15: 129, + ///Number16 + Number16: 130, + ///Number17 + Number17: 131, + ///Number18 + Number18: 132, + ///Number19 + Number19: 133, + ///Number2 + Number2: 134, + ///Number20 + Number20: 135, + ///Number3 + Number3: 136, + ///Number4 + Number4: 137, + ///Number5 + Number5: 138, + ///Number6 + Number6: 139, + ///Number7 + Number7: 140, + ///Number8 + Number8: 141, + ///Number9 + Number9: 142, + ///OvertimeCost + OvertimeCost: 143, + ///OvertimeRate + OvertimeRate: 144, + ///OvertimeWork + OvertimeWork: 145, + ///PercentWorkComplete + PercentWorkComplete: 146, + ///CostPerUse + CostPerUse: 147, + ///Generic + Generic: 148, + ///OverAllocated + OverAllocated: 149, + ///RegularWork + RegularWork: 150, + ///RemainingCost + RemainingCost: 151, + ///RemainingOvertimeCost + RemainingOvertimeCost: 152, + ///RemainingOvertimeWork + RemainingOvertimeWork: 153, + ///RemainingWork + RemainingWork: 154, + ///ResourceGUID + ResourceGUID: 155, + ///Cost + Cost: 156, + ///Work + Work: 157, + ///Start + Start: 158, + ///Start1 + Start1: 159, + ///Start10 + Start10: 160, + ///Start2 + Start2: 161, + ///Start3 + Start3: 162, + ///Start4 + Start4: 163, + ///Start5 + Start5: 164, + ///Start6 + Start6: 165, + ///Start7 + Start7: 166, + ///Start8 + Start8: 167, + ///Start9 + Start9: 168, + ///StandardRate + StandardRate: 169, + ///Text1 + Text1: 170, + ///Text10 + Text10: 171, + ///Text11 + Text11: 172, + ///Text12 + Text12: 173, + ///Text13 + Text13: 174, + ///Text14 + Text14: 175, + ///Text15 + Text15: 176, + ///Text16 + Text16: 177, + ///Text17 + Text17: 178, + ///Text18 + Text18: 179, + ///Text19 + Text19: 180, + ///Text2 + Text2: 181, + ///Text20 + Text20: 182, + ///Text21 + Text21: 183, + ///Text22 + Text22: 184, + ///Text23 + Text23: 185, + ///Text24 + Text24: 186, + ///Text25 + Text25: 187, + ///Text26 + Text26: 188, + ///Text27 + Text27: 189, + ///Text28 + Text28: 190, + ///Text29 + Text29: 191, + ///Text3 + Text3: 192, + ///Text30 + Text30: 193, + ///Text4 + Text4: 194, + ///Text5 + Text5: 195, + ///Text6 + Text6: 196, + ///Text7 + Text7: 197, + ///Text8 + Text8: 198, + ///Text9 + Text9: 199 + } + }, + context: { + contents: { + document: { + contents: { + getSelectedTaskAsync: { + conditions: { reqs: ["method Document.getSelectedTaskAsync"] }, + value: function (callback) { + /// (Project only) Get the current selected Task's Id. + ///The optional callback method + } + }, + getTaskByIndexAsync: { + conditions: { reqs: ["method Document.getTaskByIndexAsync"] }, + value: function (taskIndex, callback) { + /// (Project only) Get the Task's Id for provided task index. + ///Task index in task container + ///The optional callback method + } + }, + getTaskAsync: { + conditions: { reqs: ["method Document.getTaskAsync"] }, + value: function (taskId, callback) { + /// (Project only) Get the Task Name, WSS Task Id, and ResourceNames for given taskId . + ///Either a string or value of the Task Id. + ///The optional callback method + } + }, + getTaskFieldAsync: { + conditions: { reqs: ["method Document.getTaskFieldAsync"] }, + value: function (taskId, taskField, callback) { + /// (Project only) Get task field for provided task Id. (Ex. StartDate). + ///Either a string or value of the Task Id. + ///Task Fields. + ///The optional callback method + + } + }, + getSelectedResourceAsync: { + conditions: { reqs: ["method Document.getSelectedResourceAsync"] }, + value: function (callback) { + /// (Project only) Get the current selected Resource's Id. + ///The optional callback method + } + }, + getResourceByIndexAsync: { + conditions: { reqs: ["method Document.getResourceByIndexAsync"] }, + value: function (resourceIndex, callback) { + /// (Project only) Get the Resource's Id for provided resource index. + ///Resource index in resource container + ///The optional callback method + } + }, + getResourceFieldAsync: { + conditions: { reqs: ["method Document.getResourceFieldAsync"] }, + value: function (resourceId, resourceField, callback) { + /// (Project only) Get resource field for provided resource Id. (Ex.ResourceName) + ///Either a string or value of the Resource Id. + ///Resource Fields. + ///The optional callback method + } + }, + getProjectFieldAsync: { + conditions: { reqs: ["method Document.getProjectFieldAsync"] }, + value: function (projectField, callback) { + /// (Project only) Get Project field (Ex. ProjectWebAccessURL). + ///Project level fields. + ///The optional callback method + } + }, + getSelectedViewAsync: { + conditions: { reqs: ["method Document.getSelectedViewAsync"] }, + value: function (callback) { + /// (Project only) Get the current selected View Type (Ex. Gantt) and View Name. + ///The optional callback method + } + }, + getWSSURLAsync: { + conditions: { reqs: ["method Document.getWSSURLAsync"] }, + value: function (callback) { + /// (Project only) Get the WSS Url and list name for the Tasks List, the MPP is synced too. + ///The optional callback method + } + }, + setTaskFieldAsync: { + conditions: { reqs: ["method Document.setTaskFieldAsync"] }, + value: function (taskId, fieldId, fieldValue, callback) { + /// (Project only) Set Taskfield (Ex. TaskName). + ///Either a string or value of the Task Id. + ///Task Field. + ///Either a string, number boolean or object for the data that you want to set. + ///The optional callback method + } + }, + setResourceFieldAsync: { + conditions: { reqs: ["method Document.setResourceFieldAsync"] }, + value: function (resourceId, fieldId, fieldValue, callback) { + /// (Project only) Set Resource field (Ex. ResourceName). + ///Either a string or value of the Resource Id. + ///Resource Field. + ///Either a string, number boolean or object for the data that you want to set. + ///The optional callback method + } + } + } + } + } + } + } +}); + +// Setup outlook +Office._processItem(Office, { + metaOnly: true, + conditions: { + hosts: ["outlook", "outlookcompose"], + reqs: ["set Mailbox GE 1.1"] + }, + contents: { + MailboxEnums: { + value: new Office._MailboxEnums() + }, + context: { + contents: { + mailbox: { + value: new Office._context_mailbox() + }, + roamingSettings: { + value: new Office._settings() + } + } + }, + cast: { + value: { + item: new Office._cast_item() + } + } + } +}) + +// Setup CustomXMLParts +Office._addEnumOnObject("CustomXmlNodeType", + { + ///Element + Element: "element", + ///Attribute + Attribute: "attribute", + ///String/field> + Text: "text", + ///CData + Cdata: "cdata", + ///ProcessingInstruction + ProcessingInstruction: "processingInstruction", + ///NodeComment + NodeComment: "nodeComment", + ///NodeDocument + NodeDocument: "nodeDocument" + }, + Office, + { + hosts: ["word"] + } +); + +// Other enumerations on Office +Office._addEnumOnObject("AsyncResultStatus", + { + ///Operation failed, check error object + Failed: "failed", + ///Operation succeeded + Succeeded: "succeeded" + + }, + Office, + { + hosts: ["not outlook; not outlookcompose"] + } +); + +Office._processItem(Office, + { + contents: { + Text: { + conditions: { + hosts: ["excel", "word"], + reqs: ["set TextBindings GE 1.1"] + }, + annotate: { + ///Text based Binding + Text: undefined + }, + value: "text" + }, + Matrix: { + conditions: { + hosts: ["excel", "word"], + reqs: ["set MatrixBindings GE 1.1"] + }, + annotate: { + ///Matrix based Binding + Matrix: undefined + }, + value: "matrix" + }, + Table: { + conditions: { + hosts: ["excel", "word", "accesswebapp"], + reqs: ["set TableBindings GE 1.1"] + }, + annotate: { + ///Table based Binding + Table: undefined + }, + value: "table" + } + } + }, + "BindingType" +); + +Office._processItem(Office, + { + contents: { + Table: { + conditions: { + hosts: ["word", "excel", "accesswebapp"], + reqs: ["set TableCoercion GE 1.1"] + }, + annotate: { + ///Coerce as Table + Table: undefined + }, + value: "table" + }, + Text: { + conditions: { + hosts: ["excel", "ppt", "project", "word"], + reqs: ["set TextCoercion GE 1.1"] + }, + annotate: { + ///Coerce as Text + Text: undefined + }, + value: "text" + }, + Matrix: { + conditions: { + hosts: ["excel", "word"], + reqs: ["set MatrixCoercion GE 1.1"] + }, + annotate: { + ///Coerce as Matrix + Matrix: undefined + }, + value: "matrix" + }, + Html: { + conditions: { + hosts: ["word"], + reqs: ["set HtmlCoercion GE 1.1"] + }, + annotate: { + ///Coerce as HTML + Html: undefined + }, + value: "html" + }, + Ooxml: { + conditions: { + hosts: ["word"], + reqs: ["set OoxmlCoercion GE 1.1"] + }, + annotate: { + ///Coerce as Office Open XML + Ooxml: undefined + }, + value: "ooxml" + }, + SlideRange: { + conditions: { + hosts: ["ppt"] + }, + annotate: { + ///Coerce as JSON object containing an array of the ids, titles, and indexes of the selected slides. + SlideRange: undefined + }, + value: "slideRange" + } + } + }, + "CoercionType" +); + +Office._addEnumOnObject("DocumentMode", + { + ///Document in Read Only Mode + ReadOnly: "readOnly", + ///Document in Read/Write Mode + ReadWrite: "readWrite" + }, + Office, + { + hosts: ["word", "excel", "accesswebapp"] + } +); + +Office._addEnumOnObject("EventType", + { + ///Triggers when a document level selection happens + DocumentSelectionChanged: "documentSelectionChanged", + /// Triggers when a binding level selection happens + BindingSelectionChanged: "bindingSelectionChanged", + ///Triggers when a binding level data change happens + BindingDataChanged: "bindingDataChanged", + ///Triggers when settings change in a co-Auth session. + SettingsChanged: "settingsChanged", + ///Triggers when a customXmlPart node was deleted + DataNodeDeleted: "nodeDeleted", + ///Triggers when a customXmlPart node was inserted + DataNodeInserted: "nodeInserted", + ///Triggers when a customXmlPart node was replaced + DataNodeReplaced: "nodeReplaced", + ///Triggers when a Task selection happens in Project. + TaskSelectionChanged: "taskSelectionChanged", + /// Triggers when a Resource selection happens in Project. + ResourceSelectionChanged: "resourceSelectionChanged", + ///Triggers when a View selection happens in Project. + ViewSelectionChanged: "viewSelectionChanged" + }, + Office, + { + hosts: ["not outlook; not outlookcompose"] + } +); +// EventType augmentations +Office._processContents(Office.EventType, { + ActiveViewChanged: { + conditions: { + hosts: ["ppt"] + }, + annotate: { + ///Occurs when the user changes the current view of the document. + ActiveViewChanged: undefined + }, + value: "activeViewChanged" + } +}); + +Office._processItem(Office, + { + conditions: { hosts: ["not outlook; not outlookcompose; not accesswebapp"] }, + contents: { + Compressed: { + conditions: { + hosts: ["ppt", "word"], + reqs: ["set CompressedFile GE 1.1"] + }, + annotate: { + ///Returns the file as a byte array + Compressed: undefined + }, + value: "compressed" + }, + Pdf: { + conditions: { + hosts: ["ppt", "word"], + reqs: ["set PdfFile GE 1.1"] + }, + annotate: { + ///Returns the file in PDF format as a byte array + Pdf: undefined + }, + value: "pdf" + }, + Text: { + conditions: { + hosts: ["word"], + reqs: ["set TextFile GE 1.1"] + }, + annotate: { + ///Returns the file as plain text + Text: undefined + }, + value: "text" + } + } + }, + "FileType" +); + +Office._addEnumOnObject("FilterType", + { + ///Returns all items + All: "all", + ///Returns only visible items + OnlyVisible: "onlyVisible" + }, + Office, + { + hosts: ["not outlook; not outlookcompose; not accesswebapp"] + } +); + +Office._addEnumOnObject("InitializationReason", + { + ///Indicates the app was just inserted in the document /field> + Inserted: "inserted", + ///Indicated if the extension already existed in the document + DocumentOpened: "documentOpened" + }, + Office, + { + hosts: ["not outlook; not outlookcompose"] + } +); + +Office._addEnumOnObject("ValueFormat", + { + ///Returns items with format + Formatted: "formatted", + ///Returns items without format + Unformatted: "unformatted" + }, + Office, + { + hosts: ["not outlook; not outlookcompose"] + } +); + +Office._processContents(Office, { + GoToType: { + contents: { + Binding: { + conditions: { + hosts: ["excel", "word"] + }, + annotate: { + ///Goes to a binding object using the specified binding id. + Binding: undefined + }, + value: "binding" + }, + NamedItem: { + conditions: { + hosts: ["excel"] + }, + annotate: { + /// + /// 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" + /// + NamedItem: undefined + }, + value: "namedItem" + }, + Slide: { + conditions: { + hosts: ["ppt"] + }, + annotate: { + ///Goes to a slide using the specified id. + Slide: undefined + }, + value: "slide" + }, + Index: { + conditions: { + hosts: ["ppt"] + }, + annotate: { + ///Goes to the specified index by slide number or enum Office.Index + Index: undefined + }, + value: "index" + } + } + } +}); + +Office._addEnumOnObject("Index", + { + First: "first", + Last: "last", + Next: "next", + Previous: "previous" + }, + Office, + { + hosts: ["ppt"] + } +); + +Office._addEnumOnObject("SelectionMode", + { + Default: "default", + Selected: "selected", + None: "none" + }, + Office, + { + hosts: ["word"] + } +); + +Office.context.diagnostics = { + __proto__: null, + host: "", + platform: "", + version: "" +}; + +if (!!intellisense) { + intellisense.addEventListener('statementcompletion', function (event) { + if (event.targetName === "this" || event.target === undefined || event.target === window) return; + event.items = event.items.filter(function (item) { + return !(item.name && item.name.charAt(0) === "_"); + }); + }); +} + +Office._processContents(Office, Office._items); + +document.addEventListener("DOMContentLoaded", function () { + Office.initialize(); +}); + + + +var __extends = this.__extends || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + __.prototype = b.prototype; + d.prototype = new __(); +}; + +var OfficeExtension; +(function (OfficeExtension) { + var ClientObject = (function () { + function ClientObject() { + /// Returns a boolean value for whether the corresponding object is a null object. You must call "context.sync()" before reading the isNullObject property. + } + return ClientObject; + })(); + OfficeExtension.ClientObject = ClientObject; +})(OfficeExtension || (OfficeExtension = {__proto__: null})); + +var OfficeExtension; +(function (OfficeExtension) { + var ClientRequestContext = (function () { + function ClientRequestContext(url) { + /// + /// An abstract RequestContext object that facilitates requests to the host Office application. The "Excel.run" and "Word.run" methods provide a request context. + /// + /// Collection of objects that are tracked for automatic adjustments based on surrounding changes in the document. + /// Request headers. + this.requestHeaders = { + __proto__: null, + }; + } + ClientRequestContext.prototype.load = function (object, option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + }; + ClientRequestContext.prototype.loadRecursive = function (object, options, maxDepth) { + /// + /// 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. + /// + /// The object to be loaded. + /// + /// The key-value pairing of load options for the types, such as { "Workbook": "worksheets,tables", "Worksheet": "tables", "Tables": "name" } + /// + /// The maximum recursive depth. + }; + ClientRequestContext.prototype.trace = function (message) { + /// + /// 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. + /// + /// + }; + ClientRequestContext.prototype.sync = function (passThroughValue) { + /// + /// 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. + /// + /// + return new OfficeExtension.Promise(); + }; + ClientRequestContext.prototype.__proto__ = null; + return ClientRequestContext; + })(); + OfficeExtension.ClientRequestContext = ClientRequestContext; +})(OfficeExtension || (OfficeExtension = {__proto__: null})); + +var OfficeExtension; +(function (OfficeExtension) { + var ClientResult = (function () { + function ClientResult() { + /// + /// Contains the result for methods that return primitive types. The object's value property is retrieved from the document after "context.sync()" is invoked. + /// + /// + /// The value of the result that is retrieved from the document after "context.sync()" is invoked. + /// + } + ClientResult.prototype.__proto__ = null; + return ClientResult; + })(); + OfficeExtension.ClientResult = ClientResult; +})(OfficeExtension || (OfficeExtension = {__proto__: null})); + +var OfficeExtension; +(function (OfficeExtension) { + var DebugInfo = (function () { + function DebugInfo() { + /// + /// Debug info (useful for detailed logging of the error, i.e., via JSON.stringify(...)). + /// + /// + /// Error code string, such as "InvalidArgument". + /// + /// + /// The error message passed through from the host Office application. + /// + /// + /// Inner error, if applicable. + /// + + /// + /// The object type and property or method name (or similar information), if available. + /// + } + DebugInfo.prototype.__proto__ = null; + return DebugInfo; + })(); + OfficeExtension.DebugInfo = DebugInfo; + + var Error = (function () { + function Error() { + /// + /// The error object returned by "context.sync()", if a promise is rejected due to an error while processing the request. + /// + /// + /// Error name: "OfficeExtension.Error" + /// + /// + /// The error message passed through from the host Office application. + /// + /// + /// Stack trace, if applicable. + /// + /// + /// Error code string, such as "InvalidArgument". + /// + /// + /// 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. + /// + /// + /// Debug info (useful for detailed logging of the error, i.e., via JSON.stringify(...)). + /// + /// + /// Inner error, if applicable. + /// + } + Error.prototype.__proto__ = null; + return Error; + })(); + OfficeExtension.Error = Error; +})(OfficeExtension || (OfficeExtension = {__proto__: null})); + +var OfficeExtension; +(function (OfficeExtension) { + var ErrorCodes = (function () { + function ErrorCodes() { + } + ErrorCodes.__proto__ = null; + ErrorCodes.accessDenied = ""; + ErrorCodes.generalException = ""; + ErrorCodes.activityLimitReached = ""; + ErrorCodes.invalidObjectPath = ""; + ErrorCodes.propertyNotLoaded = ""; + ErrorCodes.valueNotLoaded = ""; + ErrorCodes.invalidRequestContext = ""; + ErrorCodes.invalidArgument = ""; + ErrorCodes.runMustReturnPromise = ""; + ErrorCodes.cannotRegisterEvent = ""; + ErrorCodes.apiNotFound = ""; + ErrorCodes.connectionFailure = ""; + return ErrorCodes; + })(); + OfficeExtension.ErrorCodes = ErrorCodes; +})(OfficeExtension || (OfficeExtension = {__proto__: null})); + +var OfficeExtension; +(function (OfficeExtension) { + var Promise = (function () { + /// + /// Creates a promise that resolves when all of the child promises resolve. + /// + Promise.all = function (promises) { return [new OfficeExtension.Promise()]; }; + /// + /// Creates a promise that is resolved. + /// + Promise.resolve = function (value) { return new OfficeExtension.Promise(); }; + /// + /// Creates a promise that is rejected. + /// + Promise.reject = function (error) { return new OfficeExtension.Promise(); }; + /// + /// A Promise object that represents a deferred interaction with the host Office application. The publically-consumable 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 "native" Promise implementation is available, OfficeExtension.Promise will switch to use the native Promise instead. + /// + Promise.prototype.then = function (onFulfilled, onRejected) { + /// + /// This method will be called once the previous promise has been resolved. + /// Both the onFulfilled on onRejected callbacks are optional. + /// If either or both are omitted, the next onFulfilled/onRejected in the chain will be called called. + /// Returns a new promise for the value or error that was returned from onFulfilled/onRejected. + /// + /// + /// + /// + onRejected(new Error()); + } + Promise.prototype.catch = function (onRejected) { + /// + /// Catches failures or exceptions from actions within the promise, or from an unhandled exception earlier in the call stack. + /// + /// function to be called if or when the promise rejects. + /// + onRejected(new Error()); + } + Promise.prototype.__proto__ = null; + }) + OfficeExtension.Promise = Promise; +})(OfficeExtension || (OfficeExtension = {__proto__: null})); + +var OfficeExtension; +(function (OfficeExtension) { + var TrackedObjects = (function () { + function TrackedObjects() { + /// + /// Collection of tracked objects, contained within a request context. See "context.trackedObjects" for more information. + /// + } + TrackedObjects.prototype.add = function (object) { + /// + /// 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. + /// + /// + }; + TrackedObjects.prototype.remove = function (object) { + /// + /// 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. + /// + /// + }; + TrackedObjects.prototype.__proto__ = null; + return TrackedObjects; + })(); + OfficeExtension.TrackedObjects = TrackedObjects; +})(OfficeExtension || (OfficeExtension = {__proto__: null})); + +(function (OfficeExtension) { + var EventHandlers = (function () { + function EventHandlers() { } + EventHandlers.prototype.add = function (handler) { + return new EventHandlerResult(null, null, handler); + }; + EventHandlers.prototype.remove = function (handler) { }; + EventHandlers.prototype.__proto__ = null; + return EventHandlers; + }()); + OfficeExtension.EventHandlers = EventHandlers; + + var EventHandlerResult = (function () { + function EventHandlerResult() { } + EventHandlerResult.prototype.remove = function () { }; + EventHandlerResult.prototype.__proto__ = null; + return EventHandlerResult; + }()); + OfficeExtension.EventHandlerResult = EventHandlerResult; +})(OfficeExtension || (OfficeExtension = {__proto__: null})); + +OfficeExtension.__proto__ = null; + + + +var OfficeCore; +(function (OfficeCore) { + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext() { + /// + /// The RequestContext object facilitates requests to the OfficeCore application. Since the Office add-in and the OfficeCore application run in two different processes, the request context is required to get access to the OfficeCore object model from the add-in. + /// + _super.call(this, null); + } + return RequestContext; + })(OfficeExtension.ClientRequestContext); + OfficeCore.RequestContext = RequestContext; + + OfficeCore.run = function (batch) { + /// + /// + /// Executes a batch script that performs actions on the OfficeCore object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + /// + /// + /// 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 OfficeCore application. Since the Office add-in and the OfficeCore application run in two different processes, the RequestContext is required to get access to the OfficeCore object model from the add-in. + /// + ///
+ /// + /// + /// Executes a batch script that performs actions on the OfficeCore 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. + /// + /// + /// 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()". + /// + /// + /// 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 OfficeCore application. Since the Office add-in and the OfficeCore application run in two different processes, the RequestContext is required to get access to the OfficeCore object model from the add-in. + /// + ///
+ /// + /// + /// Executes a batch script that performs actions on the OfficeCore 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. + /// + /// + /// 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()". + /// + /// + /// 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 OfficeCore application. Since the Office add-in and the OfficeCore application run in two different processes, the RequestContext is required to get access to the OfficeCore object model from the add-in. + /// + ///
+ arguments[arguments.length - 1](new OfficeCore.RequestContext()); + return new OfficeExtension.Promise(); + } +})(OfficeCore || (OfficeCore = {__proto__: null})); +OfficeCore.__proto__ = null; + + + +var Excel; +(function (Excel) { + /// Aggregation function for the `DataPivotHierarchy`. [Api set: ExcelApi 1.8] + var AggregationFunction = { + __proto__: null, + "unknown": "unknown", + "automatic": "automatic", + "sum": "sum", + "count": "count", + "average": "average", + "max": "max", + "min": "min", + "product": "product", + "countNumbers": "countNumbers", + "standardDeviation": "standardDeviation", + "standardDeviationP": "standardDeviationP", + "variance": "variance", + "varianceP": "varianceP", + } + Excel.AggregationFunction = AggregationFunction; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var AllowEditRange = (function(_super) { + __extends(AllowEditRange, _super); + function AllowEditRange() { + /// Represents an `AllowEditRange` object found in a worksheet. This object works with worksheet protection properties. When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. [Api set: ExcelApiOnline 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the range associated with the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. [Api set: ExcelApiOnline 1.1] + /// Specifies if the object is password protected. [Api set: ExcelApiOnline 1.1] + /// Specifies the title of the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. [Api set: ExcelApiOnline 1.1] + } + + AllowEditRange.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + AllowEditRange.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.AllowEditRangeUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing AllowEditRange object, with properties that have already been loaded and synced. + /// + } + AllowEditRange.prototype.delete = function() { + /// + /// Deletes the object from the `AllowEditRangeCollection`. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails the delete operation. [Api set: ExcelApiOnline 1.1] + /// + /// + } + AllowEditRange.prototype.pauseProtection = function(password) { + /// + /// Pauses worksheet protection for the object for the user in the current session. This method does nothing if worksheet protection isn't enabled or is already paused. If worksheet protection cannot be paused, this method throws an `UnsupportedOperation` error and fails to pause protection for the object. If the password is incorrect, then this method throws a `BadPassword` error and fails to pause protection for the object. If a password is supplied but the object does not require a password, the inputted password will be ignored and the operation will succeed. [Api set: ExcelApiOnline 1.1] + /// + /// The password associated with the `AllowEditRange` object. + /// + } + AllowEditRange.prototype.setPassword = function(password) { + /// + /// Changes the password associated with the object. Setting the password string as empty ("") or `null` will remove password protection from the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, then this method throws an `AccessDenied` error and the set operation fails. [Api set: ExcelApiOnline 1.1] + /// + /// The password associated with the `AllowEditRange` object. + /// + } + + return AllowEditRange; + })(OfficeExtension.ClientObject); + Excel.AllowEditRange = AllowEditRange; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var AllowEditRangeCollection = (function(_super) { + __extends(AllowEditRangeCollection, _super); + function AllowEditRangeCollection() { + /// Represents the set of `AllowEditRange` objects found in a worksheet. `AllowEditRange` objects work with worksheet protection properties. When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. [Api set: ExcelApiOnline 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + AllowEditRangeCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + AllowEditRangeCollection.prototype.add = function(title, rangeAddress, options) { + /// + /// Adds an `AllowEditRange` object to the worksheet. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, then this method throws an `AccessDenied` error and the add operation fails. [Api set: ExcelApiOnline 1.1] + /// + /// The title string of the `AllowEditRange` object to be added. + /// The range address of the `AllowEditRange` object to be added. + /// Additional options to be added to the `AllowEditRange` object, such as the password. + /// + } + AllowEditRangeCollection.prototype.getCount = function() { + /// + /// Returns the number of `AllowEditRange` objects in the collection. [Api set: ExcelApiOnline 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + AllowEditRangeCollection.prototype.getItem = function(key) { + /// + /// Gets the `AllowEditRange` object by its title. [Api set: ExcelApiOnline 1.1] + /// + /// The title of the `AllowEditRange`. + /// The `AllowEditRange` with the title. If there is no `AllowEditRange` with the given title, then an `ItemNotFound` error is thrown. + } + AllowEditRangeCollection.prototype.getItemAt = function(index) { + /// + /// Returns an `AllowEditRange` object by its index in the collection. [Api set: ExcelApiOnline 1.1] + /// + /// The index of the `AllowEditRange` object in the collection. + /// The `AllowEditRange` at the given index. + } + AllowEditRangeCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets the `AllowEditRange` object by its title. [Api set: ExcelApiOnline 1.1] + /// + /// The title of the `AllowEditRange`. + /// The `AllowEditRange` with the title. If there is no `AllowEditRange` with the given title, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + } + AllowEditRangeCollection.prototype.pauseProtection = function(password) { + /// + /// Pauses worksheet protection for all `AllowEditRange` objects found in this worksheet that have the given password for the user in the current session. This method does nothing if worksheet protection isn't enabled or is paused. If worksheet protection cannot be paused, this method throws an `UnsupportedOperation` error and fails to pause protection for the range. If the password does not match any `AllowEditRange` objects in the collection, then this method throws a `BadPassword` error and fails to pause protection for any range in the collection. [Api set: ExcelApiOnline 1.1] + /// + /// The password to pause protection on the `AllowEditRange` objects. + /// + } + + return AllowEditRangeCollection; + })(OfficeExtension.ClientObject); + Excel.AllowEditRangeCollection = AllowEditRangeCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var AllowEditRangeOptions = (function() { + function AllowEditRangeOptions() { + /// The interface used to construct optional fields of the `AllowEditRange` object. [Api set: ExcelApiOnline 1.1] + /// The password associated with the `AllowEditRange`. [Api set: ExcelApiOnline 1.1] + } + return AllowEditRangeOptions; + })(); + Interfaces.AllowEditRangeOptions.__proto__ = null; + Interfaces.AllowEditRangeOptions = AllowEditRangeOptions; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Application = (function(_super) { + __extends(Application, _super); + function Application() { + /// Represents the Excel application that manages the workbook. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the Excel calculation engine version used for the last full recalculation. [Api set: ExcelApi 1.9] + /// 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] + /// Returns the calculation state of the application. See `Excel.CalculationState` for details. [Api set: ExcelApi 1.9] + /// Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. [Api set: ExcelApi 1.11] + /// Gets the string used as the decimal separator for numeric values. This is based on the local Excel settings. [Api set: ExcelApi 1.11] + /// Specifies whether the "Format Stale values" button under Calculation Options is turned on or off. The stale formulas are rendered with stale formatting if the button is turned on. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Returns the iterative calculation settings. In Excel on Windows and Mac, the settings will apply to the Excel Application. In Excel on the web and other platforms, the settings will apply to the active workbook. [Api set: ExcelApi 1.9] + /// Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on the local Excel settings. [Api set: ExcelApi 1.11] + /// Specifies if the system separators of Excel are enabled. System separators include the decimal separator and thousands separator. [Api set: ExcelApi 1.11] + } + + Application.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Application.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ApplicationUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Application object, with properties that have already been loaded and synced. + /// + } + Application.prototype.calculate = function(calculationType) { + /// + /// Recalculate all currently opened workbooks in Excel. [Api set: ExcelApi 1.1] + /// + /// Specifies the calculation type to use. See `Excel.CalculationType` for details. + /// + } + Application.prototype.suspendApiCalculationUntilNextSync = function() { + /// + /// 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] + /// + /// + } + Application.prototype.suspendScreenUpdatingUntilNextSync = function() { + /// + /// Suspends screen updating until the next `context.sync()` is called. **Note**: Don't call `suspendScreenUpdatingUntilNextSync` repeatedly (such as in a loop). Repeated calls will cause the Excel window to flicker. [Api set: ExcelApi 1.9] + /// + /// + } + + return Application; + })(OfficeExtension.ClientObject); + Excel.Application = Application; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var ArrowheadLength = { + __proto__: null, + "short": "short", + "medium": "medium", + "long": "long", + } + Excel.ArrowheadLength = ArrowheadLength; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var ArrowheadStyle = { + __proto__: null, + "none": "none", + "triangle": "triangle", + "stealth": "stealth", + "diamond": "diamond", + "oval": "oval", + "open": "open", + } + Excel.ArrowheadStyle = ArrowheadStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var ArrowheadWidth = { + __proto__: null, + "narrow": "narrow", + "medium": "medium", + "wide": "wide", + } + Excel.ArrowheadWidth = ArrowheadWidth; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// The behavior types when AutoFill is used on a range in the workbook. [Api set: ExcelApi 1.9] + var AutoFillType = { + __proto__: null, + "fillDefault": "fillDefault", + "fillCopy": "fillCopy", + "fillSeries": "fillSeries", + "fillFormats": "fillFormats", + "fillValues": "fillValues", + "fillDays": "fillDays", + "fillWeekdays": "fillWeekdays", + "fillMonths": "fillMonths", + "fillYears": "fillYears", + "linearTrend": "linearTrend", + "growthTrend": "growthTrend", + "flashFill": "flashFill", + } + Excel.AutoFillType = AutoFillType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var AutoFilter = (function(_super) { + __extends(AutoFilter, _super); + function AutoFilter() { + /// Represents the `AutoFilter` object. AutoFilter turns the values in Excel column into specific filters based on the cell contents. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// An array that holds all the filter criteria in the autofiltered range. [Api set: ExcelApi 1.9] + /// Specifies if the AutoFilter is enabled. [Api set: ExcelApi 1.9] + /// Specifies if the AutoFilter has filter criteria. [Api set: ExcelApi 1.9] + } + + AutoFilter.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + AutoFilter.prototype.apply = function(range, columnIndex, criteria) { + /// + /// Applies the AutoFilter to a range. This filters the column if column index and filter criteria are specified. [Api set: ExcelApi 1.9] + /// + /// The range on which the AutoFilter will apply. + /// The zero-based column index to which the AutoFilter is applied. + /// The filter criteria. + /// + } + AutoFilter.prototype.clearColumnCriteria = function(columnIndex) { + /// + /// Clears the column filter criteria of the AutoFilter. [Api set: ExcelApi 1.14] + /// + /// The zero-based column index, which represents which column filter needs to be cleared. If the index value is not supported (for example, if the value is a negative number, or if the value is greater than the number of available columns in the range), then an `InvalidArgument` error will be thrown. + /// + } + AutoFilter.prototype.clearCriteria = function() { + /// + /// Clears the filter criteria and sort state of the AutoFilter. [Api set: ExcelApi 1.9] + /// + /// + } + AutoFilter.prototype.getRange = function() { + /// + /// Returns the `Range` object that represents the range to which the AutoFilter applies. [Api set: ExcelApi 1.9] + /// + /// + } + AutoFilter.prototype.getRangeOrNullObject = function() { + /// + /// Returns the `Range` object that represents the range to which the AutoFilter applies. If there is no `Range` object associated with the AutoFilter, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.9] + /// + /// + } + AutoFilter.prototype.reapply = function() { + /// + /// Applies the specified AutoFilter object currently on the range. [Api set: ExcelApi 1.9] + /// + /// + } + AutoFilter.prototype.remove = function() { + /// + /// Removes the AutoFilter for the range. [Api set: ExcelApi 1.9] + /// + /// + } + + return AutoFilter; + })(OfficeExtension.ClientObject); + Excel.AutoFilter = AutoFilter; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var BasicDataValidation = (function() { + function BasicDataValidation() { + /// Represents the basic type data validation criteria. [Api set: ExcelApi 1.8] + /// Specifies the right-hand operand when the operator property is set to a binary operator such as GreaterThan (the left-hand operand is the value the user tries to enter in the cell). With the ternary operators Between and NotBetween, specifies the lower bound operand. For example, setting formula1 to 10 and operator to GreaterThan means that valid data for the range must be greater than 10. 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] + /// With the ternary operators Between and NotBetween, specifies the upper bound operand. Is not used with the binary operators, such as GreaterThan. 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] + /// The operator to use for validating the data. [Api set: ExcelApi 1.8] + } + return BasicDataValidation; + })(); + Interfaces.BasicDataValidation.__proto__ = null; + Interfaces.BasicDataValidation = BasicDataValidation; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Binding = (function(_super) { + __extends(Binding, _super); + function Binding() { + /// Represents an Office.js binding that is defined in the workbook. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the binding identifier. [Api set: ExcelApi 1.1] + /// Returns the type of the binding. See `Excel.BindingType` for details. [Api set: ExcelApi 1.1] + /// Occurs when data or formatting within the binding is changed. [Api set: ExcelApi 1.2] + /// Occurs when the selected content in the binding is changed. **Note**: If multiple, discontiguous cells are selected, `Binding.onSelectionChanged` only reports row and column information for one selection. Use `Worksheet.onSelectionChanged` for multiple selected ranges. [Api set: ExcelApi 1.2] + } + + Binding.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + Binding.prototype.delete = function() { + /// + /// Deletes the binding. [Api set: ExcelApi 1.3] + /// + /// + } + Binding.prototype.getRange = function() { + /// + /// Returns the range represented by the binding. Will throw an error if the binding is not of the correct type. [Api set: ExcelApi 1.1] + /// + /// + } + Binding.prototype.getTable = function() { + /// + /// Returns the table represented by the binding. Will throw an error if the binding is not of the correct type. [Api set: ExcelApi 1.1] + /// + /// + } + Binding.prototype.getText = function() { + /// + /// Returns the text represented by the binding. Will throw an error if the binding is not of the correct type. [Api set: ExcelApi 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Binding.prototype.onDataChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the binding that raised the data changed event. + /// + var eventInfo = new Excel.Interfaces.BindingDataChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Binding.prototype.onSelectionChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the selection that raised the selection changed event. **Note**: If multiple, discontiguous cells are selected, `Binding.onSelectionChanged` only reports row and column information for one selection. Use `Worksheet.onSelectionChanged` for multiple selected ranges. + /// + var eventInfo = new Excel.Interfaces.BindingSelectionChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + return Binding; + })(OfficeExtension.ClientObject); + Excel.Binding = Binding; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var BindingCollection = (function(_super) { + __extends(BindingCollection, _super); + function BindingCollection() { + /// Represents the collection of all the binding objects that are part of the workbook. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the number of bindings in the collection. [Api set: ExcelApi 1.1] + /// Gets the loaded child items in this collection. + } + + BindingCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + BindingCollection.prototype.add = function(range, bindingType, id) { + /// + /// Add a new binding to a particular Range. [Api set: ExcelApi 1.3] + /// + /// Range to bind the binding to. May be a `Range` object or a string. If string, must contain the full address, including the sheet name + /// Type of binding. See `Excel.BindingType`. + /// Name of the binding. + /// + } + BindingCollection.prototype.addFromNamedItem = function(name, bindingType, id) { + /// + /// 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] + /// + /// Name from which to create binding. + /// Type of binding. See `Excel.BindingType`. + /// Name of the binding. + /// + } + BindingCollection.prototype.addFromSelection = function(bindingType, id) { + /// + /// 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] + /// + /// Type of binding. See `Excel.BindingType`. + /// Name of the binding. + /// + } + BindingCollection.prototype.getCount = function() { + /// + /// Gets the number of bindings in the collection. [Api set: ExcelApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + BindingCollection.prototype.getItem = function(id) { + /// + /// Gets a binding object by ID. [Api set: ExcelApi 1.1] + /// + /// ID of the binding object to be retrieved. + /// + } + BindingCollection.prototype.getItemAt = function(index) { + /// + /// Gets a binding object based on its position in the items array. [Api set: ExcelApi 1.1] + /// + /// Index value of the object to be retrieved. Zero-indexed. + /// + } + BindingCollection.prototype.getItemOrNullObject = function(id) { + /// + /// Gets a binding object by ID. If the binding object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + /// + /// ID of the binding object to be retrieved. + /// + } + + return BindingCollection; + })(OfficeExtension.ClientObject); + Excel.BindingCollection = BindingCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var BindingDataChangedEventArgs = (function() { + function BindingDataChangedEventArgs() { + /// Provides information about the binding that raised the data changed event. [Api set: ExcelApi 1.2] + /// Gets a temporary `Binding` object that contains the ID of the `Binding` object that raised the event. Use that ID with `BindingCollection.getItem(id)` to get the binding. [Api set: ExcelApi 1.2] + } + return BindingDataChangedEventArgs; + })(); + Interfaces.BindingDataChangedEventArgs.__proto__ = null; + Interfaces.BindingDataChangedEventArgs = BindingDataChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var BindingSelectionChangedEventArgs = (function() { + function BindingSelectionChangedEventArgs() { + /// Provides information about the selection that raised the selection changed event. **Note**: If multiple, discontiguous cells are selected, `Binding.onSelectionChanged` only reports row and column information for one selection. Use `Worksheet.onSelectionChanged` for multiple selected ranges. [Api set: ExcelApi 1.2] + /// Gets a temporary `Binding` object that contains the ID of the `Binding` object that raised the event. Use that ID with `BindingCollection.getItem(id)` to get the binding. [Api set: ExcelApi 1.2] + /// Gets the number of columns selected. [Api set: ExcelApi 1.2] + /// Gets the number of rows selected. [Api set: ExcelApi 1.2] + /// Gets the index of the first column of the selection (zero-based). [Api set: ExcelApi 1.2] + /// Gets the index of the first row of the selection (zero-based). [Api set: ExcelApi 1.2] + } + return BindingSelectionChangedEventArgs; + })(); + Interfaces.BindingSelectionChangedEventArgs.__proto__ = null; + Interfaces.BindingSelectionChangedEventArgs = BindingSelectionChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var BindingType = { + __proto__: null, + "range": "range", + "table": "table", + "text": "text", + } + Excel.BindingType = BindingType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var BorderIndex = { + __proto__: null, + "edgeTop": "edgeTop", + "edgeBottom": "edgeBottom", + "edgeLeft": "edgeLeft", + "edgeRight": "edgeRight", + "insideVertical": "insideVertical", + "insideHorizontal": "insideHorizontal", + "diagonalDown": "diagonalDown", + "diagonalUp": "diagonalUp", + } + Excel.BorderIndex = BorderIndex; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var BorderLineStyle = { + __proto__: null, + "none": "none", + "continuous": "continuous", + "dash": "dash", + "dashDot": "dashDot", + "dashDotDot": "dashDotDot", + "dot": "dot", + "double": "double", + "slantDashDot": "slantDashDot", + } + Excel.BorderLineStyle = BorderLineStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var BorderWeight = { + __proto__: null, + "hairline": "hairline", + "thin": "thin", + "medium": "medium", + "thick": "thick", + } + Excel.BorderWeight = BorderWeight; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents a built-in PivotTable style [Api set: ExcelApi BETA (PREVIEW ONLY)] + var BuiltInPivotTableStyle = { + __proto__: null, + "none": "none", + "light1": "light1", + "light2": "light2", + "light3": "light3", + "light4": "light4", + "light5": "light5", + "light6": "light6", + "light7": "light7", + "light8": "light8", + "light9": "light9", + "light10": "light10", + "light11": "light11", + "light12": "light12", + "light13": "light13", + "light14": "light14", + "light15": "light15", + "light16": "light16", + "light17": "light17", + "light18": "light18", + "light19": "light19", + "light20": "light20", + "light21": "light21", + "light22": "light22", + "light23": "light23", + "light24": "light24", + "light25": "light25", + "light26": "light26", + "light27": "light27", + "light28": "light28", + "medium1": "medium1", + "medium2": "medium2", + "medium3": "medium3", + "medium4": "medium4", + "medium5": "medium5", + "medium6": "medium6", + "medium7": "medium7", + "medium8": "medium8", + "medium9": "medium9", + "medium10": "medium10", + "medium11": "medium11", + "medium12": "medium12", + "medium13": "medium13", + "medium14": "medium14", + "medium15": "medium15", + "medium16": "medium16", + "medium17": "medium17", + "medium18": "medium18", + "medium19": "medium19", + "medium20": "medium20", + "medium21": "medium21", + "medium22": "medium22", + "medium23": "medium23", + "medium24": "medium24", + "medium25": "medium25", + "medium26": "medium26", + "medium27": "medium27", + "medium28": "medium28", + "dark1": "dark1", + "dark2": "dark2", + "dark3": "dark3", + "dark4": "dark4", + "dark5": "dark5", + "dark6": "dark6", + "dark7": "dark7", + "dark8": "dark8", + "dark9": "dark9", + "dark10": "dark10", + "dark11": "dark11", + "dark12": "dark12", + "dark13": "dark13", + "dark14": "dark14", + "dark15": "dark15", + "dark16": "dark16", + "dark17": "dark17", + "dark18": "dark18", + "dark19": "dark19", + "dark20": "dark20", + "dark21": "dark21", + "dark22": "dark22", + "dark23": "dark23", + "dark24": "dark24", + "dark25": "dark25", + "dark26": "dark26", + "dark27": "dark27", + "dark28": "dark28", + } + Excel.BuiltInPivotTableStyle = BuiltInPivotTableStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents a built-in slicer style. [Api set: ExcelApi BETA (PREVIEW ONLY)] + var BuiltInSlicerStyle = { + __proto__: null, + "light1": "light1", + "light2": "light2", + "light3": "light3", + "light4": "light4", + "light5": "light5", + "light6": "light6", + "other1": "other1", + "other2": "other2", + "dark1": "dark1", + "dark2": "dark2", + "dark3": "dark3", + "dark4": "dark4", + "dark5": "dark5", + "dark6": "dark6", + } + Excel.BuiltInSlicerStyle = BuiltInSlicerStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var BuiltInStyle = { + __proto__: null, + "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", + } + Excel.BuiltInStyle = BuiltInStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents a built-in table style. [Api set: ExcelApi BETA (PREVIEW ONLY)] + var BuiltInTableStyle = { + __proto__: null, + "light1": "light1", + "light2": "light2", + "light3": "light3", + "light4": "light4", + "light5": "light5", + "light6": "light6", + "light7": "light7", + "light8": "light8", + "light9": "light9", + "light10": "light10", + "light11": "light11", + "light12": "light12", + "light13": "light13", + "light14": "light14", + "light15": "light15", + "light16": "light16", + "light17": "light17", + "light18": "light18", + "light19": "light19", + "light20": "light20", + "light21": "light21", + "medium1": "medium1", + "medium2": "medium2", + "medium3": "medium3", + "medium4": "medium4", + "medium5": "medium5", + "medium6": "medium6", + "medium7": "medium7", + "medium8": "medium8", + "medium9": "medium9", + "medium10": "medium10", + "medium11": "medium11", + "medium12": "medium12", + "medium13": "medium13", + "medium14": "medium14", + "medium15": "medium15", + "medium16": "medium16", + "medium17": "medium17", + "medium18": "medium18", + "medium19": "medium19", + "medium20": "medium20", + "medium21": "medium21", + "medium22": "medium22", + "medium23": "medium23", + "medium24": "medium24", + "medium25": "medium25", + "medium26": "medium26", + "medium27": "medium27", + "medium28": "medium28", + "dark1": "dark1", + "dark2": "dark2", + "dark3": "dark3", + "dark4": "dark4", + "dark5": "dark5", + "dark6": "dark6", + "dark7": "dark7", + "dark8": "dark8", + "dark9": "dark9", + "dark10": "dark10", + "dark11": "dark11", + } + Excel.BuiltInTableStyle = BuiltInTableStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var CalculationMode = { + __proto__: null, + "automatic": "automatic", + "automaticExceptTables": "automaticExceptTables", + "manual": "manual", + } + Excel.CalculationMode = CalculationMode; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the state of calculation across the entire Excel application. [Api set: ExcelApi 1.9] + var CalculationState = { + __proto__: null, + "done": "done", + "calculating": "calculating", + "pending": "pending", + } + Excel.CalculationState = CalculationState; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var CalculationType = { + __proto__: null, + "recalculate": "recalculate", + "full": "full", + "fullRebuild": "fullRebuild", + } + Excel.CalculationType = CalculationType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CellBorder = (function() { + function CellBorder() { + /// Represents the properties of a single border returned by `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the border property input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. [Api set: ExcelApi 1.9] + /// Represents the `color` property of a single border. [Api set: ExcelApi 1.9] + /// Represents the `style` property of a single border. [Api set: ExcelApi 1.9] + /// Represents the `tintAndShade` property of a single border. [Api set: ExcelApi 1.9] + /// Represents the `weight` property of a single border. [Api set: ExcelApi 1.9] + } + return CellBorder; + })(); + Interfaces.CellBorder.__proto__ = null; + Interfaces.CellBorder = CellBorder; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CellBorderCollection = (function() { + function CellBorderCollection() { + /// Represents the `format.borders` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the `format.borders` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. [Api set: ExcelApi 1.9] + /// Represents the `format.borders.bottom` property. [Api set: ExcelApi 1.9] + /// Represents the `format.borders.diagonalDown` property. [Api set: ExcelApi 1.9] + /// Represents the `format.borders.diagonalUp` property. [Api set: ExcelApi 1.9] + /// Represents the `format.borders.horizontal` property. [Api set: ExcelApi 1.9] + /// Represents the `format.borders.left` property. [Api set: ExcelApi 1.9] + /// Represents the `format.borders.right` property. [Api set: ExcelApi 1.9] + /// Represents the `format.borders.top` property. [Api set: ExcelApi 1.9] + /// Represents the `format.borders.vertical` property. [Api set: ExcelApi 1.9] + } + return CellBorderCollection; + })(); + Interfaces.CellBorderCollection.__proto__ = null; + Interfaces.CellBorderCollection = CellBorderCollection; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CellPropertiesBorderLoadOptions = (function() { + function CellPropertiesBorderLoadOptions() { + /// Specifies which properties to load on the `format.borders` object. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `color` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `style` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `tintAndShade` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `weight` property. [Api set: ExcelApi 1.9] + } + return CellPropertiesBorderLoadOptions; + })(); + Interfaces.CellPropertiesBorderLoadOptions.__proto__ = null; + Interfaces.CellPropertiesBorderLoadOptions = CellPropertiesBorderLoadOptions; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CellPropertiesFill = (function() { + function CellPropertiesFill() { + /// Represents the `format.fill` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties` or the `format.fill` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. [Api set: ExcelApi 1.9] + /// Represents the `format.fill.color` property. [Api set: ExcelApi 1.9] + /// Represents the `format.fill.pattern` property. [Api set: ExcelApi 1.9] + /// Represents the `format.fill.patternColor` property. [Api set: ExcelApi 1.9] + /// Represents the `format.fill.patternTintAndShade` property. [Api set: ExcelApi 1.9] + /// Represents the `format.fill.tintAndShade` property. [Api set: ExcelApi 1.9] + } + return CellPropertiesFill; + })(); + Interfaces.CellPropertiesFill.__proto__ = null; + Interfaces.CellPropertiesFill = CellPropertiesFill; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CellPropertiesFillLoadOptions = (function() { + function CellPropertiesFillLoadOptions() { + /// Specifies which properties to load on the `format.fill` object. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `color` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `pattern` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `patternColor` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `patternTintAndShade` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `tintAndShade` property. [Api set: ExcelApi 1.9] + } + return CellPropertiesFillLoadOptions; + })(); + Interfaces.CellPropertiesFillLoadOptions.__proto__ = null; + Interfaces.CellPropertiesFillLoadOptions = CellPropertiesFillLoadOptions; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CellPropertiesFont = (function() { + function CellPropertiesFont() { + /// Represents the `format.font` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the `format.font` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. [Api set: ExcelApi 1.9] + /// Represents the `format.font.bold` property. [Api set: ExcelApi 1.9] + /// Represents the `format.font.color` property. [Api set: ExcelApi 1.9] + /// Represents the `format.font.italic` property. [Api set: ExcelApi 1.9] + /// Represents the `format.font.name` property. [Api set: ExcelApi 1.9] + /// Represents the `format.font.size` property. [Api set: ExcelApi 1.9] + /// Represents the `format.font.strikethrough` property. [Api set: ExcelApi 1.9] + /// Represents the `format.font.subscript` property. [Api set: ExcelApi 1.9] + /// Represents the `format.font.superscript` property. [Api set: ExcelApi 1.9] + /// Represents the `format.font.tintAndShade` property. [Api set: ExcelApi 1.9] + /// Represents the `format.font.underline` property. [Api set: ExcelApi 1.9] + } + return CellPropertiesFont; + })(); + Interfaces.CellPropertiesFont.__proto__ = null; + Interfaces.CellPropertiesFont = CellPropertiesFont; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CellPropertiesFontLoadOptions = (function() { + function CellPropertiesFontLoadOptions() { + /// Specifies which properties to load on the `format.font` object. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `bold` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `color` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `italic` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `name` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `size` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `strikethrough` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `subscript` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `superscript` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `tintAndShade` property. [Api set: ExcelApi 1.9] + /// Specifies whether to load the `underline` property. [Api set: ExcelApi 1.9] + } + return CellPropertiesFontLoadOptions; + })(); + Interfaces.CellPropertiesFontLoadOptions.__proto__ = null; + Interfaces.CellPropertiesFontLoadOptions = CellPropertiesFontLoadOptions; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CellPropertiesProtection = (function() { + function CellPropertiesProtection() { + /// Represents the `format.protection` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the `format.protection` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. [Api set: ExcelApi 1.9] + /// Represents the `format.protection.formulaHidden` property. [Api set: ExcelApi 1.9] + /// Represents the `format.protection.locked` property. [Api set: ExcelApi 1.9] + } + return CellPropertiesProtection; + })(); + Interfaces.CellPropertiesProtection.__proto__ = null; + Interfaces.CellPropertiesProtection = CellPropertiesProtection; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var CellValueConditionalFormat = (function(_super) { + __extends(CellValueConditionalFormat, _super); + function CellValueConditionalFormat() { + /// Represents a cell value conditional format. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// Specifies the rule object on this conditional format. [Api set: ExcelApi 1.6] + } + + CellValueConditionalFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + CellValueConditionalFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.CellValueConditionalFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing CellValueConditionalFormat object, with properties that have already been loaded and synced. + /// + } + + return CellValueConditionalFormat; + })(OfficeExtension.ClientObject); + Excel.CellValueConditionalFormat = CellValueConditionalFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChangedEventDetail = (function() { + function ChangedEventDetail() { + /// Provides information about the details of a `WorksheetChangedEvent` or `TableChangedEvent`. [Api set: ExcelApi 1.9] + /// Represents the value after the change. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. [Api set: ExcelApi 1.9] + /// Represents the type of value after the change. Unlike `valueAfter`, `valueAsJsonAfter` can represent all cell values, such as formatted number, web image, and entity data types. [Api set: ExcelApi 1.16] + /// Represents the type of value before the change. Unlike `valueBefore`, `valueAsJsonBefore` can represent all cell values, such as formatted number, web image, and entity data types. [Api set: ExcelApi 1.16] + /// Represents the value before the change. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. [Api set: ExcelApi 1.9] + /// Represents the type of value after the change. [Api set: ExcelApi 1.9] + /// Represents the type of value before the change. [Api set: ExcelApi 1.9] + } + return ChangedEventDetail; + })(); + Interfaces.ChangedEventDetail.__proto__ = null; + Interfaces.ChangedEventDetail = ChangedEventDetail; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChangeDirectionState = (function() { + function ChangeDirectionState() { + /// Represents the direction that existing or remaining cells in a worksheet will shift when cells are inserted into or deleted from a worksheet. [Api set: ExcelApi 1.14] + /// Represents the direction (such as up or to the left) that the remaining cells will shift when a cell or cells are deleted. Note:`insertShiftDirection` and `deleteShiftDirection` are exclusive and both enums can't have a value at the same time. If one has a value, then the other will return `undefined`. [Api set: ExcelApi 1.14] + /// Represents the direction (such as down or to the right) that the existing cells will shift when a new cell or cells are inserted. Note:`insertShiftDirection` and `deleteShiftDirection` are exclusive and both enums can't have a value at the same time. If one has a value, then the other will return `undefined`. [Api set: ExcelApi 1.14] + } + return ChangeDirectionState; + })(); + Interfaces.ChangeDirectionState.__proto__ = null; + Interfaces.ChangeDirectionState = ChangeDirectionState; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Chart = (function(_super) { + __extends(Chart, _super); + function Chart() { + /// Represents a chart object in a workbook. To learn more about the chart object model, see {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-charts | Work with charts using the Excel JavaScript API}. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents chart axes. [Api set: ExcelApi 1.1] + /// Specifies a chart category label level enumeration constant, referring to the level of the source category labels. [Api set: ExcelApi 1.8] + /// Specifies the type of the chart. See `Excel.ChartType` for details. [Api set: ExcelApi 1.7] + /// Represents the data labels on the chart. [Api set: ExcelApi 1.1] + /// Specifies the way that blank cells are plotted on a chart. [Api set: ExcelApi 1.8] + /// Encapsulates the format properties for the chart area. [Api set: ExcelApi 1.1] + /// Specifies the height, in points, of the chart object. [Api set: ExcelApi 1.1] + /// The unique ID of chart. [Api set: ExcelApi 1.7] + /// The distance, in points, from the left side of the chart to the worksheet origin. [Api set: ExcelApi 1.1] + /// Represents the legend for the chart. [Api set: ExcelApi 1.1] + /// Specifies the name of a chart object. [Api set: ExcelApi 1.1] + /// Encapsulates the options for a pivot chart. [Api set: ExcelApi 1.9] + /// Represents the plot area for the chart. [Api set: ExcelApi 1.8] + /// Specifies the way columns or rows are used as data series on the chart. [Api set: ExcelApi 1.8] + /// True if only visible cells are plotted. False if both visible and hidden cells are plotted. [Api set: ExcelApi 1.8] + /// Represents either a single series or collection of series in the chart. [Api set: ExcelApi 1.1] + /// Specifies a chart series name level enumeration constant, referring to the level of the source series names. [Api set: ExcelApi 1.8] + /// Specifies whether to display all field buttons on a PivotChart. [Api set: ExcelApi 1.7] + /// Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. If the value axis becomes smaller than the size of the 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] + /// Specifies the chart style for the chart. [Api set: ExcelApi 1.8] + /// Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. [Api set: ExcelApi 1.1] + /// Specifies 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] + /// Specifies the width, in points, of the chart object. [Api set: ExcelApi 1.1] + /// The worksheet containing the current chart. [Api set: ExcelApi 1.2] + /// Occurs when the chart is activated. [Api set: ExcelApi 1.8] + /// Occurs when the chart is deactivated. [Api set: ExcelApi 1.8] + } + + Chart.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Chart.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Chart object, with properties that have already been loaded and synced. + /// + } + Chart.prototype.activate = function() { + /// + /// Activates the chart in the Excel UI. [Api set: ExcelApi 1.9] + /// + /// + } + Chart.prototype.delete = function() { + /// + /// Deletes the chart object. [Api set: ExcelApi 1.1] + /// + /// + } + Chart.prototype.getDataRange = function() { + /// + /// Gets the data source of the whole chart. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Chart.prototype.getDataRangeOrNullObject = function() { + /// + /// Gets the data source of the whole chart. If the data range is empty, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Chart.prototype.getDataTable = function() { + /// + /// Gets the data table on the chart. If the chart doesn't allow a data table, it will throw an exception. [Api set: ExcelApi 1.14] + /// + /// + } + Chart.prototype.getDataTableOrNullObject = function() { + /// + /// Gets the data table on the chart. If the chart doesn't allow a data table, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.14] + /// + /// + } + Chart.prototype.getImage = function(width, height, fittingMode) { + /// + /// 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] + /// + /// Optional. The desired height of the resulting image. + /// Optional. The desired width of the resulting image. + /// Optional. The method used to scale the chart to the specified dimensions (if both height and width are set). + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Chart.prototype.setData = function(sourceData, seriesBy) { + /// + /// Resets the source data for the chart. [Api set: ExcelApi 1.1] + /// + /// The range object corresponding to the source data. + /// 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. + /// + } + Chart.prototype.setPosition = function(startCell, endCell) { + /// + /// Positions the chart relative to cells on the worksheet. [Api set: ExcelApi 1.1] + /// + /// 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. + /// Optional. The end cell. If specified, the chart's width and height will be set to fully cover up this cell/range. + /// + } + Chart.prototype.onActivated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the chart that raised the activated event. + /// + var eventInfo = new Excel.Interfaces.ChartActivatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Chart.prototype.onDeactivated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the chart that raised the deactivated event. + /// + var eventInfo = new Excel.Interfaces.ChartDeactivatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + return Chart; + })(OfficeExtension.ClientObject); + Excel.Chart = Chart; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartActivatedEventArgs = (function() { + function ChartActivatedEventArgs() { + /// Provides information about the chart that raised the activated event. [Api set: ExcelApi 1.8] + /// Gets the ID of the chart that is activated. [Api set: ExcelApi 1.8] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.8] + /// Gets the ID of the worksheet in which the chart is activated. [Api set: ExcelApi 1.8] + } + return ChartActivatedEventArgs; + })(); + Interfaces.ChartActivatedEventArgs.__proto__ = null; + Interfaces.ChartActivatedEventArgs = ChartActivatedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartAddedEventArgs = (function() { + function ChartAddedEventArgs() { + /// Provides information about the chart that raised the added event. [Api set: ExcelApi 1.8] + /// Gets the ID of the chart that is added to the worksheet. [Api set: ExcelApi 1.8] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.8] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.8] + /// Gets the ID of the worksheet in which the chart is added. [Api set: ExcelApi 1.8] + } + return ChartAddedEventArgs; + })(); + Interfaces.ChartAddedEventArgs.__proto__ = null; + Interfaces.ChartAddedEventArgs = ChartAddedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartAreaFormat = (function(_super) { + __extends(ChartAreaFormat, _super); + function ChartAreaFormat() { + /// Encapsulates the format properties for the overall chart area. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the border format of chart area, which includes color, linestyle, and weight. [Api set: ExcelApi 1.7] + /// Specifies the color scheme of the chart. [Api set: ExcelApi 1.9] + /// Represents the fill format of an object, which includes background formatting information. [Api set: ExcelApi 1.1] + /// Represents the font attributes (font name, font size, color, etc.) for the current object. [Api set: ExcelApi 1.1] + /// Specifies if the chart area of the chart has rounded corners. [Api set: ExcelApi 1.9] + } + + ChartAreaFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartAreaFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartAreaFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartAreaFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartAreaFormat; + })(OfficeExtension.ClientObject); + Excel.ChartAreaFormat = ChartAreaFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartAxes = (function(_super) { + __extends(ChartAxes, _super); + function ChartAxes() { + /// Represents the chart axes. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the category axis in a chart. [Api set: ExcelApi 1.1] + /// Represents the series axis of a 3-D chart. [Api set: ExcelApi 1.1] + /// Represents the value axis in an axis. [Api set: ExcelApi 1.1] + } + + ChartAxes.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartAxes.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartAxesUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartAxes object, with properties that have already been loaded and synced. + /// + } + ChartAxes.prototype.getItem = function(type, group) { + /// + /// Returns the specific axis identified by type and group. [Api set: ExcelApi 1.7] + /// + /// Specifies the axis type. See `Excel.ChartAxisType` for details. + /// Optional. Specifies the axis group. See `Excel.ChartAxisGroup` for details. + /// + } + + return ChartAxes; + })(OfficeExtension.ClientObject); + Excel.ChartAxes = ChartAxes; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartAxis = (function(_super) { + __extends(ChartAxis, _super); + function ChartAxis() { + /// Represents a single axis in a chart. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. [Api set: ExcelApi 1.8] + /// Specifies the group for the specified axis. See `Excel.ChartAxisGroup` for details. [Api set: ExcelApi 1.7] + /// Specifies the base unit for the specified category axis. [Api set: ExcelApi 1.7] + /// Specifies the category axis type. [Api set: ExcelApi 1.7] + /// Specifies the custom axis display unit value. To set this property, please use the `SetCustomDisplayUnit(double)` method. [Api set: ExcelApi 1.7] + /// Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. [Api set: ExcelApi 1.7] + /// Represents the formatting of a chart object, which includes line and font formatting. [Api set: ExcelApi 1.1] + /// Specifies the height, in points, of the chart axis. Returns `null` if the axis is not visible. [Api set: ExcelApi 1.7] + /// Specifies if the value axis crosses the category axis between categories. [Api set: ExcelApi 1.8] + /// Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns `null` if the axis is not visible. [Api set: ExcelApi 1.7] + /// Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. [Api set: ExcelApi 1.9] + /// Specifies the base of the logarithm when using logarithmic scales. [Api set: ExcelApi 1.7] + /// Returns an object that represents the major gridlines for the specified axis. [Api set: ExcelApi 1.1] + /// Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. [Api set: ExcelApi 1.7] + /// Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. [Api set: ExcelApi 1.7] + /// 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] + /// 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] + /// 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] + /// Returns an object that represents the minor gridlines for the specified axis. [Api set: ExcelApi 1.1] + /// Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. [Api set: ExcelApi 1.7] + /// Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. [Api set: ExcelApi 1.7] + /// 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] + /// Specifies if an axis is multilevel. [Api set: ExcelApi 1.8] + /// Specifies the format code for the axis tick label. [Api set: ExcelApi 1.8] + /// Specifies 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] + /// Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. [Api set: ExcelApi 1.8] + /// Specifies the axis position where the other axis crosses. You should use the `SetPositionAt(double)` method to set this property. [Api set: ExcelApi 1.8] + /// Specifies if Excel plots data points from last to first. [Api set: ExcelApi 1.7] + /// Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. [Api set: ExcelApi 1.7] + /// Specifies if the axis display unit label is visible. [Api set: ExcelApi 1.7] + /// Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. [Api set: ExcelApi 1.8] + /// Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. [Api set: ExcelApi 1.7] + /// Specifies 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] + /// Specifies the number of categories or series between tick marks. [Api set: ExcelApi 1.7] + /// Represents the axis title. [Api set: ExcelApi 1.1] + /// Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns `null` if the axis is not visible. [Api set: ExcelApi 1.7] + /// Specifies the axis type. See `Excel.ChartAxisType` for details. [Api set: ExcelApi 1.7] + /// Specifies if the axis is visible. [Api set: ExcelApi 1.7] + /// Specifies the width, in points, of the chart axis. Returns `null` if the axis is not visible. [Api set: ExcelApi 1.7] + } + + ChartAxis.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartAxis.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartAxisUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartAxis object, with properties that have already been loaded and synced. + /// + } + ChartAxis.prototype.setCategoryNames = function(sourceData) { + /// + /// Sets all the category names for the specified axis. [Api set: ExcelApi 1.7] + /// + /// The `Range` object corresponding to the source data. + /// + } + ChartAxis.prototype.setCustomDisplayUnit = function(value) { + /// + /// Sets the axis display unit to a custom value. [Api set: ExcelApi 1.7] + /// + /// Custom value of the display unit. + /// + } + ChartAxis.prototype.setPositionAt = function(value) { + /// + /// Sets the specified axis position where the other axis crosses. [Api set: ExcelApi 1.8] + /// + /// Custom value of the crossing point. + /// + } + + return ChartAxis; + })(OfficeExtension.ClientObject); + Excel.ChartAxis = ChartAxis; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the type of the category axis. [Api set: ExcelApi 1.7] + var ChartAxisCategoryType = { + __proto__: null, + "automatic": "automatic", + "textAxis": "textAxis", + "dateAxis": "dateAxis", + } + Excel.ChartAxisCategoryType = ChartAxisCategoryType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var ChartAxisDisplayUnit = { + __proto__: null, + "none": "none", + "hundreds": "hundreds", + "thousands": "thousands", + "tenThousands": "tenThousands", + "hundredThousands": "hundredThousands", + "millions": "millions", + "tenMillions": "tenMillions", + "hundredMillions": "hundredMillions", + "billions": "billions", + "trillions": "trillions", + "custom": "custom", + } + Excel.ChartAxisDisplayUnit = ChartAxisDisplayUnit; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartAxisFormat = (function(_super) { + __extends(ChartAxisFormat, _super); + function ChartAxisFormat() { + /// Encapsulates the format properties for the chart axis. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies chart fill formatting. [Api set: ExcelApi 1.8] + /// Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. [Api set: ExcelApi 1.1] + /// Specifies chart line formatting. [Api set: ExcelApi 1.1] + } + + ChartAxisFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartAxisFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartAxisFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartAxisFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartAxisFormat; + })(OfficeExtension.ClientObject); + Excel.ChartAxisFormat = ChartAxisFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var ChartAxisGroup = { + __proto__: null, + "primary": "primary", + "secondary": "secondary", + } + Excel.ChartAxisGroup = ChartAxisGroup; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var ChartAxisPosition = { + __proto__: null, + "automatic": "automatic", + "maximum": "maximum", + "minimum": "minimum", + "custom": "custom", + } + Excel.ChartAxisPosition = ChartAxisPosition; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var ChartAxisScaleType = { + __proto__: null, + "linear": "linear", + "logarithmic": "logarithmic", + } + Excel.ChartAxisScaleType = ChartAxisScaleType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var ChartAxisTickLabelPosition = { + __proto__: null, + "nextToAxis": "nextToAxis", + "high": "high", + "low": "low", + "none": "none", + } + Excel.ChartAxisTickLabelPosition = ChartAxisTickLabelPosition; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var ChartAxisTickMark = { + __proto__: null, + "none": "none", + "cross": "cross", + "inside": "inside", + "outside": "outside", + } + Excel.ChartAxisTickMark = ChartAxisTickMark; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the unit of time for chart axes and data series. [Api set: ExcelApi 1.7] + var ChartAxisTimeUnit = { + __proto__: null, + "days": "days", + "months": "months", + "years": "years", + } + Excel.ChartAxisTimeUnit = ChartAxisTimeUnit; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartAxisTitle = (function(_super) { + __extends(ChartAxisTitle, _super); + function ChartAxisTitle() { + /// Represents the title of a chart axis. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the formatting of the chart axis title. [Api set: ExcelApi 1.1] + /// Specifies the axis title. [Api set: ExcelApi 1.1] + /// Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. [Api set: ExcelApi 1.12] + /// Specifies if the axis title is visibile. [Api set: ExcelApi 1.1] + } + + ChartAxisTitle.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartAxisTitle.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartAxisTitleUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartAxisTitle object, with properties that have already been loaded and synced. + /// + } + ChartAxisTitle.prototype.setFormula = function(formula) { + /// + /// A string value that represents the formula of chart axis title using A1-style notation. [Api set: ExcelApi 1.8] + /// + /// A string that represents the formula to set. + /// + } + + return ChartAxisTitle; + })(OfficeExtension.ClientObject); + Excel.ChartAxisTitle = ChartAxisTitle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartAxisTitleFormat = (function(_super) { + __extends(ChartAxisTitleFormat, _super); + function ChartAxisTitleFormat() { + /// Represents the chart axis title formatting. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the chart axis title's border format, which includes color, linestyle, and weight. [Api set: ExcelApi 1.8] + /// Specifies the chart axis title's fill formatting. [Api set: ExcelApi 1.8] + /// Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. [Api set: ExcelApi 1.1] + } + + ChartAxisTitleFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartAxisTitleFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartAxisTitleFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartAxisTitleFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartAxisTitleFormat; + })(OfficeExtension.ClientObject); + Excel.ChartAxisTitleFormat = ChartAxisTitleFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var ChartAxisType = { + __proto__: null, + "invalid": "invalid", + "category": "category", + "value": "value", + "series": "series", + } + Excel.ChartAxisType = ChartAxisType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartBinOptions = (function(_super) { + __extends(ChartBinOptions, _super); + function ChartBinOptions() { + /// Encapsulates the bin options for histogram charts and pareto charts. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies if bin overflow is enabled in a histogram chart or pareto chart. [Api set: ExcelApi 1.9] + /// Specifies if bin underflow is enabled in a histogram chart or pareto chart. [Api set: ExcelApi 1.9] + /// Specifies the bin count of a histogram chart or pareto chart. [Api set: ExcelApi 1.9] + /// Specifies the bin overflow value of a histogram chart or pareto chart. [Api set: ExcelApi 1.9] + /// Specifies the bin's type for a histogram chart or pareto chart. [Api set: ExcelApi 1.9] + /// Specifies the bin underflow value of a histogram chart or pareto chart. [Api set: ExcelApi 1.9] + /// Specifies the bin width value of a histogram chart or pareto chart. [Api set: ExcelApi 1.9] + } + + ChartBinOptions.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartBinOptions.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartBinOptionsUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartBinOptions object, with properties that have already been loaded and synced. + /// + } + + return ChartBinOptions; + })(OfficeExtension.ClientObject); + Excel.ChartBinOptions = ChartBinOptions; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the bin type of a histogram chart or pareto chart series. [Api set: ExcelApi 1.9] + var ChartBinType = { + __proto__: null, + "category": "category", + "auto": "auto", + "binWidth": "binWidth", + "binCount": "binCount", + } + Excel.ChartBinType = ChartBinType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartBorder = (function(_super) { + __extends(ChartBorder, _super); + function ChartBorder() { + /// Represents the border formatting of a chart element. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// HTML color code representing the color of borders in the chart. [Api set: ExcelApi 1.7] + /// Represents the line style of the border. See `Excel.ChartLineStyle` for details. [Api set: ExcelApi 1.7] + /// Represents weight of the border, in points. [Api set: ExcelApi 1.7] + } + + ChartBorder.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartBorder.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartBorderUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartBorder object, with properties that have already been loaded and synced. + /// + } + ChartBorder.prototype.clear = function() { + /// + /// Clear the border format of a chart element. [Api set: ExcelApi 1.8] + /// + /// + } + + return ChartBorder; + })(OfficeExtension.ClientObject); + Excel.ChartBorder = ChartBorder; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the quartile calculation type of chart series layout. Only applies to a box and whisker chart. [Api set: ExcelApi 1.9] + var ChartBoxQuartileCalculation = { + __proto__: null, + "inclusive": "inclusive", + "exclusive": "exclusive", + } + Excel.ChartBoxQuartileCalculation = ChartBoxQuartileCalculation; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartBoxwhiskerOptions = (function(_super) { + __extends(ChartBoxwhiskerOptions, _super); + function ChartBoxwhiskerOptions() { + /// Represents the properties of a box and whisker chart. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies if the quartile calculation type of a box and whisker chart. [Api set: ExcelApi 1.9] + /// Specifies if inner points are shown in a box and whisker chart. [Api set: ExcelApi 1.9] + /// Specifies if the mean line is shown in a box and whisker chart. [Api set: ExcelApi 1.9] + /// Specifies if the mean marker is shown in a box and whisker chart. [Api set: ExcelApi 1.9] + /// Specifies if outlier points are shown in a box and whisker chart. [Api set: ExcelApi 1.9] + } + + ChartBoxwhiskerOptions.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartBoxwhiskerOptions.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartBoxwhiskerOptionsUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartBoxwhiskerOptions object, with properties that have already been loaded and synced. + /// + } + + return ChartBoxwhiskerOptions; + })(OfficeExtension.ClientObject); + Excel.ChartBoxwhiskerOptions = ChartBoxwhiskerOptions; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartCollection = (function(_super) { + __extends(ChartCollection, _super); + function ChartCollection() { + /// A collection of all the chart objects on a worksheet. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the number of charts in the worksheet. [Api set: ExcelApi 1.1] + /// Occurs when a chart is activated. [Api set: ExcelApi 1.8] + /// Occurs when a new chart is added to the worksheet. [Api set: ExcelApi 1.8] + /// Occurs when a chart is deactivated. [Api set: ExcelApi 1.8] + /// Occurs when a chart is deleted. [Api set: ExcelApi 1.8] + /// Gets the loaded child items in this collection. + } + + ChartCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ChartCollection.prototype.add = function(type, sourceData, seriesBy) { + /// + /// Creates a new chart. [Api set: ExcelApi 1.1] + /// + /// Represents the type of a chart. See `Excel.ChartType` for details. + /// The `Range` object corresponding to the source data. + /// Optional. Specifies the way columns or rows are used as data series on the chart. See `Excel.ChartSeriesBy` for details. + /// + } + ChartCollection.prototype.getCount = function() { + /// + /// Returns the number of charts in the worksheet. [Api set: ExcelApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + ChartCollection.prototype.getItem = function(name) { + /// + /// 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] + /// + /// Name of the chart to be retrieved. + /// + } + ChartCollection.prototype.getItemAt = function(index) { + /// + /// Gets a chart based on its position in the collection. [Api set: ExcelApi 1.1] + /// + /// Index value of the object to be retrieved. Zero-indexed. + /// + } + ChartCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a chart using its name. If there are multiple charts with the same name, the first one will be returned. If the chart doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + /// + /// Name of the chart to be retrieved. + /// + } + ChartCollection.prototype.onActivated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the chart that raised the activated event. + /// + var eventInfo = new Excel.Interfaces.ChartActivatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + ChartCollection.prototype.onAdded = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the chart that raised the added event. + /// + var eventInfo = new Excel.Interfaces.ChartAddedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + ChartCollection.prototype.onDeactivated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the chart that raised the deactivated event. + /// + var eventInfo = new Excel.Interfaces.ChartDeactivatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + ChartCollection.prototype.onDeleted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the chart that raised the deleted event. + /// + var eventInfo = new Excel.Interfaces.ChartDeletedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + return ChartCollection; + })(OfficeExtension.ClientObject); + Excel.ChartCollection = ChartCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.8] + var ChartColorScheme = { + __proto__: null, + "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", + } + Excel.ChartColorScheme = ChartColorScheme; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartDataLabel = (function(_super) { + __extends(ChartDataLabel, _super); + function ChartDataLabel() { + /// Represents the data label of a chart point. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies if the data label automatically generates appropriate text based on context. [Api set: ExcelApi 1.8] + /// Represents the format of chart data label. [Api set: ExcelApi 1.8] + /// String value that represents the formula of chart data label using A1-style notation. [Api set: ExcelApi 1.8] + /// Returns the height, in points, of the chart data label. Value is `null` if the chart data label is not visible. [Api set: ExcelApi 1.8] + /// 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] + /// Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Value is `null` if the chart data label is not visible. [Api set: ExcelApi 1.8] + /// Specifies 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 1.9] + /// String value that represents the format code for data label. [Api set: ExcelApi 1.8] + /// Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. [Api set: ExcelApi 1.7] + /// String representing the separator used for the data label on a chart. [Api set: ExcelApi 1.7] + /// Specifies if the data label bubble size is visible. [Api set: ExcelApi 1.7] + /// Specifies if the data label category name is visible. [Api set: ExcelApi 1.7] + /// Specifies if the data label legend key is visible. [Api set: ExcelApi 1.7] + /// Specifies if the data label percentage is visible. [Api set: ExcelApi 1.7] + /// Specifies if the data label series name is visible. [Api set: ExcelApi 1.7] + /// Specifies if the data label value is visible. [Api set: ExcelApi 1.7] + /// String representing the text of the data label on a chart. [Api set: ExcelApi 1.8] + /// Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. [Api set: ExcelApi 1.8] + /// Represents the distance, in points, from the top edge of chart data label to the top of chart area. Value is `null` if the chart data label is not visible. [Api set: ExcelApi 1.8] + /// 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] + /// Returns the width, in points, of the chart data label. Value is `null` if the chart data label is not visible. [Api set: ExcelApi 1.8] + } + + ChartDataLabel.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartDataLabel.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartDataLabelUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartDataLabel object, with properties that have already been loaded and synced. + /// + } + + return ChartDataLabel; + })(OfficeExtension.ClientObject); + Excel.ChartDataLabel = ChartDataLabel; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartDataLabelFormat = (function(_super) { + __extends(ChartDataLabelFormat, _super); + function ChartDataLabelFormat() { + /// Encapsulates the format properties for the chart data labels. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the border format, which includes color, linestyle, and weight. [Api set: ExcelApi 1.8] + /// Represents the fill format of the current chart data label. [Api set: ExcelApi 1.1] + /// Represents the font attributes (such as font name, font size, and color) for a chart data label. [Api set: ExcelApi 1.1] + } + + ChartDataLabelFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartDataLabelFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartDataLabelFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartDataLabelFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartDataLabelFormat; + })(OfficeExtension.ClientObject); + Excel.ChartDataLabelFormat = ChartDataLabelFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var ChartDataLabelPosition = { + __proto__: null, + "invalid": "invalid", + "none": "none", + "center": "center", + "insideEnd": "insideEnd", + "insideBase": "insideBase", + "outsideEnd": "outsideEnd", + "left": "left", + "right": "right", + "top": "top", + "bottom": "bottom", + "bestFit": "bestFit", + "callout": "callout", + } + Excel.ChartDataLabelPosition = ChartDataLabelPosition; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartDataLabels = (function(_super) { + __extends(ChartDataLabels, _super); + function ChartDataLabels() { + /// Represents a collection of all the data labels on a chart point. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies if data labels automatically generate appropriate text based on context. [Api set: ExcelApi 1.8] + /// Specifies the format of chart data labels, which includes fill and font formatting. [Api set: ExcelApi 1.1] + /// Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when the `TextOrientation` of data label is 0. [Api set: ExcelApi 1.8] + /// Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. [Api set: ExcelApi 1.9] + /// Specifies the format code for data labels. [Api set: ExcelApi 1.8] + /// Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. [Api set: ExcelApi 1.1] + /// String representing the separator used for the data labels on a chart. [Api set: ExcelApi 1.1] + /// Specifies if the data label bubble size is visible. [Api set: ExcelApi 1.1] + /// Specifies if the data label category name is visible. [Api set: ExcelApi 1.1] + /// Specifies if the data label legend key is visible. [Api set: ExcelApi 1.1] + /// Specifies if the data label percentage is visible. [Api set: ExcelApi 1.1] + /// Specifies if the data label series name is visible. [Api set: ExcelApi 1.1] + /// Specifies if the data label value is visible. [Api set: ExcelApi 1.1] + /// Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. [Api set: ExcelApi 1.8] + /// Represents the vertical alignment of chart data label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of the data label is -90, 90, or 180. [Api set: ExcelApi 1.8] + } + + ChartDataLabels.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartDataLabels.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartDataLabelsUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartDataLabels object, with properties that have already been loaded and synced. + /// + } + + return ChartDataLabels; + })(OfficeExtension.ClientObject); + Excel.ChartDataLabels = ChartDataLabels; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies whether the series data range is local range, external range, list or unknown. [Api set: ExcelApi 1.15] + var ChartDataSourceType = { + __proto__: null, + "localRange": "localRange", + "externalRange": "externalRange", + "list": "list", + "unknown": "unknown", + } + Excel.ChartDataSourceType = ChartDataSourceType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartDataTable = (function(_super) { + __extends(ChartDataTable, _super); + function ChartDataTable() { + /// Represents the data table object of a chart. [Api set: ExcelApi 1.14] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the format of a chart data table, which includes fill, font, and border format. [Api set: ExcelApi 1.14] + /// Specifies whether to display the horizontal border of the data table. [Api set: ExcelApi 1.14] + /// Specifies whether to show the legend key of the data table. [Api set: ExcelApi 1.14] + /// Specifies whether to display the outline border of the data table. [Api set: ExcelApi 1.14] + /// Specifies whether to display the vertical border of the data table. [Api set: ExcelApi 1.14] + /// Specifies whether to show the data table of the chart. [Api set: ExcelApi 1.14] + } + + ChartDataTable.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartDataTable.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartDataTableUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartDataTable object, with properties that have already been loaded and synced. + /// + } + + return ChartDataTable; + })(OfficeExtension.ClientObject); + Excel.ChartDataTable = ChartDataTable; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartDataTableFormat = (function(_super) { + __extends(ChartDataTableFormat, _super); + function ChartDataTableFormat() { + /// Represents the format of a chart data table. [Api set: ExcelApi 1.14] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the border format of chart data table, which includes color, line style, and weight. [Api set: ExcelApi 1.14] + /// Represents the fill format of an object, which includes background formatting information. [Api set: ExcelApi 1.14] + /// Represents the font attributes (such as font name, font size, and color) for the current object. [Api set: ExcelApi 1.14] + } + + ChartDataTableFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartDataTableFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartDataTableFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartDataTableFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartDataTableFormat; + })(OfficeExtension.ClientObject); + Excel.ChartDataTableFormat = ChartDataTableFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartDeactivatedEventArgs = (function() { + function ChartDeactivatedEventArgs() { + /// Provides information about the chart that raised the deactivated event. [Api set: ExcelApi 1.8] + /// Gets the ID of the chart that is deactivated. [Api set: ExcelApi 1.8] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.8] + /// Gets the ID of the worksheet in which the chart is deactivated. [Api set: ExcelApi 1.8] + } + return ChartDeactivatedEventArgs; + })(); + Interfaces.ChartDeactivatedEventArgs.__proto__ = null; + Interfaces.ChartDeactivatedEventArgs = ChartDeactivatedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartDeletedEventArgs = (function() { + function ChartDeletedEventArgs() { + /// Provides information about the chart that raised the deleted event. [Api set: ExcelApi 1.8] + /// Gets the ID of the chart that is deleted from the worksheet. [Api set: ExcelApi 1.8] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.8] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.8] + /// Gets the ID of the worksheet in which the chart is deleted. [Api set: ExcelApi 1.8] + } + return ChartDeletedEventArgs; + })(); + Interfaces.ChartDeletedEventArgs.__proto__ = null; + Interfaces.ChartDeletedEventArgs = ChartDeletedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.8] + var ChartDisplayBlanksAs = { + __proto__: null, + "notPlotted": "notPlotted", + "zero": "zero", + "interplotted": "interplotted", + } + Excel.ChartDisplayBlanksAs = ChartDisplayBlanksAs; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartErrorBars = (function(_super) { + __extends(ChartErrorBars, _super); + function ChartErrorBars() { + /// This object represents the attributes for a chart's error bars. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies if error bars have an end style cap. [Api set: ExcelApi 1.9] + /// Specifies the formatting type of the error bars. [Api set: ExcelApi 1.9] + /// Specifies which parts of the error bars to include. [Api set: ExcelApi 1.9] + /// The type of range marked by the error bars. [Api set: ExcelApi 1.9] + /// Specifies whether the error bars are displayed. [Api set: ExcelApi 1.9] + } + + ChartErrorBars.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartErrorBars.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartErrorBarsUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartErrorBars object, with properties that have already been loaded and synced. + /// + } + + return ChartErrorBars; + })(OfficeExtension.ClientObject); + Excel.ChartErrorBars = ChartErrorBars; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartErrorBarsFormat = (function(_super) { + __extends(ChartErrorBarsFormat, _super); + function ChartErrorBarsFormat() { + /// Encapsulates the format properties for chart error bars. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the chart line formatting. [Api set: ExcelApi 1.9] + } + + ChartErrorBarsFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartErrorBarsFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartErrorBarsFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartErrorBarsFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartErrorBarsFormat; + })(OfficeExtension.ClientObject); + Excel.ChartErrorBarsFormat = ChartErrorBarsFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents which parts of the error bar to include. [Api set: ExcelApi 1.9] + var ChartErrorBarsInclude = { + __proto__: null, + "both": "both", + "minusValues": "minusValues", + "plusValues": "plusValues", + } + Excel.ChartErrorBarsInclude = ChartErrorBarsInclude; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the range type for error bars. [Api set: ExcelApi 1.9] + var ChartErrorBarsType = { + __proto__: null, + "fixedValue": "fixedValue", + "percent": "percent", + "stDev": "stDev", + "stError": "stError", + "custom": "custom", + } + Excel.ChartErrorBarsType = ChartErrorBarsType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartFill = (function(_super) { + __extends(ChartFill, _super); + function ChartFill() { + /// Represents the fill formatting for a chart element. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + } + + ChartFill.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ChartFill.prototype.clear = function() { + /// + /// Clears the fill color of a chart element. [Api set: ExcelApi 1.1] + /// + /// + } + ChartFill.prototype.getSolidColor = function() { + /// + /// Gets the uniform color fill formatting of a chart element. [Api set: ExcelApi 1.16] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + ChartFill.prototype.setSolidColor = function(color) { + /// + /// Sets the fill formatting of a chart element to a uniform color. [Api set: ExcelApi 1.1] + /// + /// HTML color code representing the color of the background, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + /// + } + + return ChartFill; + })(OfficeExtension.ClientObject); + Excel.ChartFill = ChartFill; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartFont = (function(_super) { + __extends(ChartFont, _super); + function ChartFont() { + /// This object represents the font attributes (such as font name, font size, and color) for a chart object. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the bold status of font. [Api set: ExcelApi 1.1] + /// HTML color code representation of the text color (e.g., #FF0000 represents Red). [Api set: ExcelApi 1.1] + /// Represents the italic status of the font. [Api set: ExcelApi 1.1] + /// Font name (e.g., "Calibri") [Api set: ExcelApi 1.1] + /// Size of the font (e.g., 11) [Api set: ExcelApi 1.1] + /// Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. [Api set: ExcelApi 1.1] + } + + ChartFont.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartFont.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartFontUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartFont object, with properties that have already been loaded and synced. + /// + } + + return ChartFont; + })(OfficeExtension.ClientObject); + Excel.ChartFont = ChartFont; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartFormatString = (function(_super) { + __extends(ChartFormatString, _super); + function ChartFormatString() { + /// Represents the substring in chart related objects that contain text, like a `ChartTitle` object or `ChartAxisTitle` object. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the font attributes, such as font name, font size, and color of a chart characters object. [Api set: ExcelApi 1.7] + } + + ChartFormatString.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartFormatString.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartFormatStringUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartFormatString object, with properties that have already been loaded and synced. + /// + } + + return ChartFormatString; + })(OfficeExtension.ClientObject); + Excel.ChartFormatString = ChartFormatString; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the gradient style of a chart series. This is only applicable for region map charts. [Api set: ExcelApi 1.9] + var ChartGradientStyle = { + __proto__: null, + "twoPhaseColor": "twoPhaseColor", + "threePhaseColor": "threePhaseColor", + } + Excel.ChartGradientStyle = ChartGradientStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the gradient style type of a chart series. This is only applicable for region map charts. [Api set: ExcelApi 1.9] + var ChartGradientStyleType = { + __proto__: null, + "extremeValue": "extremeValue", + "number": "number", + "percent": "percent", + } + Excel.ChartGradientStyleType = ChartGradientStyleType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartGridlines = (function(_super) { + __extends(ChartGridlines, _super); + function ChartGridlines() { + /// Represents major or minor gridlines on a chart axis. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the formatting of chart gridlines. [Api set: ExcelApi 1.1] + /// Specifies if the axis gridlines are visible. [Api set: ExcelApi 1.1] + } + + ChartGridlines.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartGridlines.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartGridlinesUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartGridlines object, with properties that have already been loaded and synced. + /// + } + + return ChartGridlines; + })(OfficeExtension.ClientObject); + Excel.ChartGridlines = ChartGridlines; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartGridlinesFormat = (function(_super) { + __extends(ChartGridlinesFormat, _super); + function ChartGridlinesFormat() { + /// Encapsulates the format properties for chart gridlines. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents chart line formatting. [Api set: ExcelApi 1.1] + } + + ChartGridlinesFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartGridlinesFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartGridlinesFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartGridlinesFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartGridlinesFormat; + })(OfficeExtension.ClientObject); + Excel.ChartGridlinesFormat = ChartGridlinesFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartLegend = (function(_super) { + __extends(ChartLegend, _super); + function ChartLegend() { + /// Represents the legend in a chart. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the formatting of a chart legend, which includes fill and font formatting. [Api set: ExcelApi 1.1] + /// Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. [Api set: ExcelApi 1.7] + /// Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. [Api set: ExcelApi 1.7] + /// Represents a collection of legendEntries in the legend. [Api set: ExcelApi 1.7] + /// Specifies if the chart legend should overlap with the main body of the chart. [Api set: ExcelApi 1.1] + /// Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. [Api set: ExcelApi 1.1] + /// Specifies if the legend has a shadow on the chart. [Api set: ExcelApi 1.7] + /// Specifies the top of a chart legend. [Api set: ExcelApi 1.7] + /// Specifies if the chart legend is visible. [Api set: ExcelApi 1.1] + /// Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. [Api set: ExcelApi 1.7] + } + + ChartLegend.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartLegend.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartLegendUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartLegend object, with properties that have already been loaded and synced. + /// + } + + return ChartLegend; + })(OfficeExtension.ClientObject); + Excel.ChartLegend = ChartLegend; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartLegendEntry = (function(_super) { + __extends(ChartLegendEntry, _super); + function ChartLegendEntry() { + /// Represents the legend entry in `legendEntryCollection`. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the height of the legend entry on the chart legend. [Api set: ExcelApi 1.8] + /// Specifies the index of the legend entry in the chart legend. [Api set: ExcelApi 1.8] + /// Specifies the left value of a chart legend entry. [Api set: ExcelApi 1.8] + /// Specifies the top of a chart legend entry. [Api set: ExcelApi 1.8] + /// Represents the visibility of a chart legend entry. [Api set: ExcelApi 1.7] + /// Represents the width of the legend entry on the chart Legend. [Api set: ExcelApi 1.8] + } + + ChartLegendEntry.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartLegendEntry.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartLegendEntryUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartLegendEntry object, with properties that have already been loaded and synced. + /// + } + + return ChartLegendEntry; + })(OfficeExtension.ClientObject); + Excel.ChartLegendEntry = ChartLegendEntry; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartLegendEntryCollection = (function(_super) { + __extends(ChartLegendEntryCollection, _super); + function ChartLegendEntryCollection() { + /// Represents a collection of legend entries. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + ChartLegendEntryCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ChartLegendEntryCollection.prototype.getCount = function() { + /// + /// Returns the number of legend entries in the collection. [Api set: ExcelApi 1.7] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + ChartLegendEntryCollection.prototype.getItemAt = function(index) { + /// + /// Returns a legend entry at the given index. [Api set: ExcelApi 1.7] + /// + /// Index of the legend entry to be retrieved. + /// + } + + return ChartLegendEntryCollection; + })(OfficeExtension.ClientObject); + Excel.ChartLegendEntryCollection = ChartLegendEntryCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartLegendFormat = (function(_super) { + __extends(ChartLegendFormat, _super); + function ChartLegendFormat() { + /// Encapsulates the format properties of a chart legend. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the border format, which includes color, linestyle, and weight. [Api set: ExcelApi 1.8] + /// Represents the fill format of an object, which includes background formatting information. [Api set: ExcelApi 1.1] + /// Represents the font attributes such as font name, font size, and color of a chart legend. [Api set: ExcelApi 1.1] + } + + ChartLegendFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartLegendFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartLegendFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartLegendFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartLegendFormat; + })(OfficeExtension.ClientObject); + Excel.ChartLegendFormat = ChartLegendFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var ChartLegendPosition = { + __proto__: null, + "invalid": "invalid", + "top": "top", + "bottom": "bottom", + "left": "left", + "right": "right", + "corner": "corner", + "custom": "custom", + } + Excel.ChartLegendPosition = ChartLegendPosition; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartLineFormat = (function(_super) { + __extends(ChartLineFormat, _super); + function ChartLineFormat() { + /// Encapsulates the formatting options for line elements. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// HTML color code representing the color of lines in the chart. [Api set: ExcelApi 1.1] + /// Represents the line style. See `Excel.ChartLineStyle` for details. [Api set: ExcelApi 1.7] + /// Represents weight of the line, in points. [Api set: ExcelApi 1.7] + } + + ChartLineFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartLineFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartLineFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartLineFormat object, with properties that have already been loaded and synced. + /// + } + ChartLineFormat.prototype.clear = function() { + /// + /// Clears the line format of a chart element. [Api set: ExcelApi 1.1] + /// + /// + } + + return ChartLineFormat; + })(OfficeExtension.ClientObject); + Excel.ChartLineFormat = ChartLineFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var ChartLineStyle = { + __proto__: null, + "none": "none", + "continuous": "continuous", + "dash": "dash", + "dashDot": "dashDot", + "dashDotDot": "dashDotDot", + "dot": "dot", + "grey25": "grey25", + "grey50": "grey50", + "grey75": "grey75", + "automatic": "automatic", + "roundDot": "roundDot", + } + Excel.ChartLineStyle = ChartLineStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the mapping level of a chart series. This only applies to region map charts. [Api set: ExcelApi 1.9] + var ChartMapAreaLevel = { + __proto__: null, + "automatic": "automatic", + "dataOnly": "dataOnly", + "city": "city", + "county": "county", + "state": "state", + "country": "country", + "continent": "continent", + "world": "world", + } + Excel.ChartMapAreaLevel = ChartMapAreaLevel; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the region level of a chart series layout. This only applies to region map charts. [Api set: ExcelApi 1.9] + var ChartMapLabelStrategy = { + __proto__: null, + "none": "none", + "bestFit": "bestFit", + "showAll": "showAll", + } + Excel.ChartMapLabelStrategy = ChartMapLabelStrategy; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartMapOptions = (function(_super) { + __extends(ChartMapOptions, _super); + function ChartMapOptions() { + /// Encapsulates the properties for a region map chart. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the series map labels strategy of a region map chart. [Api set: ExcelApi 1.9] + /// Specifies the series mapping level of a region map chart. [Api set: ExcelApi 1.9] + /// Specifies the series projection type of a region map chart. [Api set: ExcelApi 1.9] + } + + ChartMapOptions.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartMapOptions.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartMapOptionsUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartMapOptions object, with properties that have already been loaded and synced. + /// + } + + return ChartMapOptions; + })(OfficeExtension.ClientObject); + Excel.ChartMapOptions = ChartMapOptions; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the region projection type of a chart series layout. This only applies to region map charts. [Api set: ExcelApi 1.9] + var ChartMapProjectionType = { + __proto__: null, + "automatic": "automatic", + "mercator": "mercator", + "miller": "miller", + "robinson": "robinson", + "albers": "albers", + } + Excel.ChartMapProjectionType = ChartMapProjectionType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var ChartMarkerStyle = { + __proto__: null, + "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", + } + Excel.ChartMarkerStyle = ChartMarkerStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the parent label strategy of the chart series layout. This only applies to treemap charts [Api set: ExcelApi 1.9] + var ChartParentLabelStrategy = { + __proto__: null, + "none": "none", + "banner": "banner", + "overlapping": "overlapping", + } + Excel.ChartParentLabelStrategy = ChartParentLabelStrategy; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartPivotOptions = (function(_super) { + __extends(ChartPivotOptions, _super); + function ChartPivotOptions() { + /// Encapsulates the options for the pivot chart. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies whether to display the 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 1.9] + /// Specifies whether to display the legend field buttons on a PivotChart. [Api set: ExcelApi 1.9] + /// Specifies whether to display the report filter field buttons on a PivotChart. [Api set: ExcelApi 1.9] + /// Specifies whether to display the show value field buttons on a PivotChart. [Api set: ExcelApi 1.9] + } + + ChartPivotOptions.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartPivotOptions.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartPivotOptionsUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartPivotOptions object, with properties that have already been loaded and synced. + /// + } + + return ChartPivotOptions; + })(OfficeExtension.ClientObject); + Excel.ChartPivotOptions = ChartPivotOptions; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartPlotArea = (function(_super) { + __extends(ChartPlotArea, _super); + function ChartPlotArea() { + /// This object represents the attributes for a chart plot area. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the formatting of a chart plot area. [Api set: ExcelApi 1.8] + /// Specifies the height value of a plot area. [Api set: ExcelApi 1.8] + /// Specifies the inside height value of a plot area. [Api set: ExcelApi 1.8] + /// Specifies the inside left value of a plot area. [Api set: ExcelApi 1.8] + /// Specifies the inside top value of a plot area. [Api set: ExcelApi 1.8] + /// Specifies the inside width value of a plot area. [Api set: ExcelApi 1.8] + /// Specifies the left value of a plot area. [Api set: ExcelApi 1.8] + /// Specifies the position of a plot area. [Api set: ExcelApi 1.8] + /// Specifies the top value of a plot area. [Api set: ExcelApi 1.8] + /// Specifies the width value of a plot area. [Api set: ExcelApi 1.8] + } + + ChartPlotArea.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartPlotArea.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartPlotAreaUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartPlotArea object, with properties that have already been loaded and synced. + /// + } + + return ChartPlotArea; + })(OfficeExtension.ClientObject); + Excel.ChartPlotArea = ChartPlotArea; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartPlotAreaFormat = (function(_super) { + __extends(ChartPlotAreaFormat, _super); + function ChartPlotAreaFormat() { + /// Represents the format properties for a chart plot area. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the border attributes of a chart plot area. [Api set: ExcelApi 1.8] + /// Specifies the fill format of an object, which includes background formatting information. [Api set: ExcelApi 1.8] + } + + ChartPlotAreaFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartPlotAreaFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartPlotAreaFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartPlotAreaFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartPlotAreaFormat; + })(OfficeExtension.ClientObject); + Excel.ChartPlotAreaFormat = ChartPlotAreaFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.8] + var ChartPlotAreaPosition = { + __proto__: null, + "automatic": "automatic", + "custom": "custom", + } + Excel.ChartPlotAreaPosition = ChartPlotAreaPosition; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.8] + var ChartPlotBy = { + __proto__: null, + "rows": "rows", + "columns": "columns", + } + Excel.ChartPlotBy = ChartPlotBy; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartPoint = (function(_super) { + __extends(ChartPoint, _super); + function ChartPoint() { + /// Represents a point of a series in a chart. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the data label of a chart point. [Api set: ExcelApi 1.7] + /// Encapsulates the format properties chart point. [Api set: ExcelApi 1.1] + /// Represents whether a data point has a data label. Not applicable for surface charts. [Api set: ExcelApi 1.7] + /// HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). [Api set: ExcelApi 1.7] + /// HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). [Api set: ExcelApi 1.7] + /// Represents marker size of a data point. [Api set: ExcelApi 1.7] + /// Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. [Api set: ExcelApi 1.7] + /// Returns the value of a chart point. [Api set: ExcelApi 1.1] + } + + ChartPoint.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartPoint.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartPointUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartPoint object, with properties that have already been loaded and synced. + /// + } + + return ChartPoint; + })(OfficeExtension.ClientObject); + Excel.ChartPoint = ChartPoint; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartPointFormat = (function(_super) { + __extends(ChartPointFormat, _super); + function ChartPointFormat() { + /// Represents the formatting object for chart points. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the border format of a chart data point, which includes color, style, and weight information. [Api set: ExcelApi 1.7] + /// Represents the fill format of a chart, which includes background formatting information. [Api set: ExcelApi 1.1] + } + + ChartPointFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartPointFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartPointFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartPointFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartPointFormat; + })(OfficeExtension.ClientObject); + Excel.ChartPointFormat = ChartPointFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartPointsCollection = (function(_super) { + __extends(ChartPointsCollection, _super); + function ChartPointsCollection() { + /// A collection of all the chart points within a series inside a chart. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the number of chart points in the series. [Api set: ExcelApi 1.1] + /// Gets the loaded child items in this collection. + } + + ChartPointsCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ChartPointsCollection.prototype.getCount = function() { + /// + /// Returns the number of chart points in the series. [Api set: ExcelApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + ChartPointsCollection.prototype.getItemAt = function(index) { + /// + /// Retrieve a point based on its position within the series. [Api set: ExcelApi 1.1] + /// + /// Index value of the object to be retrieved. Zero-indexed. + /// + } + + return ChartPointsCollection; + })(OfficeExtension.ClientObject); + Excel.ChartPointsCollection = ChartPointsCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartSeries = (function(_super) { + __extends(ChartSeries, _super); + function ChartSeries() { + /// Represents a series in a chart. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the group for the specified series. [Api set: ExcelApi 1.8] + /// Encapsulates the bin options for histogram charts and pareto charts. [Api set: ExcelApi 1.9] + /// Encapsulates the options for the box and whisker charts. [Api set: ExcelApi 1.9] + /// This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. [Api set: ExcelApi 1.9] + /// Represents the chart type of a series. See `Excel.ChartType` for details. [Api set: ExcelApi 1.7] + /// Represents a collection of all data labels in the series. [Api set: ExcelApi 1.8] + /// Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnut exploded charts. Throws an `InvalidArgument` error on invalid charts. [Api set: ExcelApi 1.7] + /// Specifies 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). [Api set: ExcelApi 1.8] + /// Specifies if the series is filtered. Not applicable for surface charts. [Api set: ExcelApi 1.7] + /// Specifies 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. [Api set: ExcelApi 1.8] + /// Represents the formatting of a chart series, which includes fill and line formatting. [Api set: ExcelApi 1.1] + /// 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] + /// Specifies the color for maximum value of a region map chart series. [Api set: ExcelApi 1.9] + /// Specifies the type for maximum value of a region map chart series. [Api set: ExcelApi 1.9] + /// Specifies the maximum value of a region map chart series. [Api set: ExcelApi 1.9] + /// Specifies the color for the midpoint value of a region map chart series. [Api set: ExcelApi 1.9] + /// Specifies the type for the midpoint value of a region map chart series. [Api set: ExcelApi 1.9] + /// Specifies the midpoint value of a region map chart series. [Api set: ExcelApi 1.9] + /// Specifies the color for the minimum value of a region map chart series. [Api set: ExcelApi 1.9] + /// Specifies the type for the minimum value of a region map chart series. [Api set: ExcelApi 1.9] + /// Specifies the minimum value of a region map chart series. [Api set: ExcelApi 1.9] + /// Specifies the series gradient style of a region map chart. [Api set: ExcelApi 1.9] + /// Specifies if the series has data labels. [Api set: ExcelApi 1.7] + /// Specifies the fill color for negative data points in a series. [Api set: ExcelApi 1.9] + /// True if Excel inverts the pattern in the item when it corresponds to a negative number. [Api set: ExcelApi 1.8] + /// Encapsulates the options for a region map chart. [Api set: ExcelApi 1.9] + /// Specifies the marker background color of a chart series. [Api set: ExcelApi 1.7] + /// Specifies the marker foreground color of a chart series. [Api set: ExcelApi 1.7] + /// Specifies the marker size of a chart series. [Api set: ExcelApi 1.7] + /// Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. [Api set: ExcelApi 1.7] + /// Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. [Api set: ExcelApi 1.1] + /// 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. [Api set: ExcelApi 1.8] + /// Specifies the series parent label strategy area for a treemap chart. [Api set: ExcelApi 1.9] + /// Specifies the plot order of a chart series within the chart group. [Api set: ExcelApi 1.7] + /// Returns a collection of all points in the series. [Api set: ExcelApi 1.1] + /// Specifies 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. [Api set: ExcelApi 1.8] + /// Specifies whether connector lines are shown in waterfall charts. [Api set: ExcelApi 1.9] + /// Specifies whether leader lines are displayed for each data label in the series. [Api set: ExcelApi 1.9] + /// Specifies if the series has a shadow. [Api set: ExcelApi 1.7] + /// Specifies if the series is smooth. Only applicable to line and scatter charts. [Api set: ExcelApi 1.7] + /// Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. [Api set: ExcelApi 1.8] + /// Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. [Api set: ExcelApi 1.9] + /// The collection of trendlines in the series. [Api set: ExcelApi 1.7] + /// True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. [Api set: ExcelApi 1.8] + /// Represents the error bar object of a chart series. [Api set: ExcelApi 1.9] + /// Represents the error bar object of a chart series. [Api set: ExcelApi 1.9] + } + + ChartSeries.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartSeries.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartSeriesUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartSeries object, with properties that have already been loaded and synced. + /// + } + ChartSeries.prototype.delete = function() { + /// + /// Deletes the chart series. [Api set: ExcelApi 1.7] + /// + /// + } + ChartSeries.prototype.getDimensionDataSourceString = function(dimension) { + /// + /// Gets the string representation of the data source of the chart series.The string representation could be information such as a cell address. [Api set: ExcelApi 1.15] + /// + /// The dimension of the axis where the data is from. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + ChartSeries.prototype.getDimensionDataSourceType = function(dimension) { + /// + /// Gets the data source type of the chart series. [Api set: ExcelApi 1.15] + /// + /// The dimension of the axis where the data is from. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + ChartSeries.prototype.getDimensionValues = function(dimension) { + /// + /// Gets the values from a single dimension of the chart series. These could be either category values or data values, depending on the dimension specified and how the data is mapped for the chart series. [Api set: ExcelApi 1.12] + /// + /// The dimension of the axis where the data is from. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = []; + return result; + } + ChartSeries.prototype.setBubbleSizes = function(sourceData) { + /// + /// Sets the bubble sizes for a chart series. Only works for bubble charts. [Api set: ExcelApi 1.7] + /// + /// The `Range` object corresponding to the source data. + /// + } + ChartSeries.prototype.setValues = function(sourceData) { + /// + /// Sets the values for a chart series. For scatter charts, it refers to y-axis values. [Api set: ExcelApi 1.7] + /// + /// The `Range` object corresponding to the source data. + /// + } + ChartSeries.prototype.setXAxisValues = function(sourceData) { + /// + /// Sets the values of the x-axis for a chart series. Only works for scatter charts. [Api set: ExcelApi 1.7] + /// + /// The `Range` object corresponding to the source data. + /// + } + + return ChartSeries; + })(OfficeExtension.ClientObject); + Excel.ChartSeries = ChartSeries; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies whether the series are by rows or by columns. In Excel on desktop, the "auto" option will inspect the source data shape to automatically guess whether the data is by rows or columns. In Excel on the web, "auto" will simply default to "columns". [Api set: ExcelApi 1.1] + var ChartSeriesBy = { + __proto__: null, + "auto": "auto", + "columns": "columns", + "rows": "rows", + } + Excel.ChartSeriesBy = ChartSeriesBy; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartSeriesCollection = (function(_super) { + __extends(ChartSeriesCollection, _super); + function ChartSeriesCollection() { + /// Represents a collection of chart series. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the number of series in the collection. [Api set: ExcelApi 1.1] + /// Gets the loaded child items in this collection. + } + + ChartSeriesCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ChartSeriesCollection.prototype.add = function(name, index) { + /// + /// Add a new series to the collection. The new added series is not visible until values, x-axis values, or bubble sizes for it are set (depending on chart type). [Api set: ExcelApi 1.7] + /// + /// Optional. Name of the series. + /// Optional. Index value of the series to be added. Zero-indexed. + /// + } + ChartSeriesCollection.prototype.getCount = function() { + /// + /// Returns the number of series in the collection. [Api set: ExcelApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + ChartSeriesCollection.prototype.getItemAt = function(index) { + /// + /// Retrieves a series based on its position in the collection. [Api set: ExcelApi 1.1] + /// + /// Index value of the object to be retrieved. Zero-indexed. + /// + } + + return ChartSeriesCollection; + })(OfficeExtension.ClientObject); + Excel.ChartSeriesCollection = ChartSeriesCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the dimensions when getting values from chart series. [Api set: ExcelApi 1.12] + var ChartSeriesDimension = { + __proto__: null, + "categories": "categories", + "values": "values", + "xvalues": "xvalues", + "yvalues": "yvalues", + "bubbleSizes": "bubbleSizes", + } + Excel.ChartSeriesDimension = ChartSeriesDimension; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartSeriesFormat = (function(_super) { + __extends(ChartSeriesFormat, _super); + function ChartSeriesFormat() { + /// Encapsulates the format properties for the chart series [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the fill format of a chart series, which includes background formatting information. [Api set: ExcelApi 1.1] + /// Represents line formatting. [Api set: ExcelApi 1.1] + } + + ChartSeriesFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartSeriesFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartSeriesFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartSeriesFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartSeriesFormat; + })(OfficeExtension.ClientObject); + Excel.ChartSeriesFormat = ChartSeriesFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.8] + var ChartSplitType = { + __proto__: null, + "splitByPosition": "splitByPosition", + "splitByValue": "splitByValue", + "splitByPercentValue": "splitByPercentValue", + "splitByCustomSplit": "splitByCustomSplit", + } + Excel.ChartSplitType = ChartSplitType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the horizontal alignment for the specified object. [Api set: ExcelApi 1.7] + var ChartTextHorizontalAlignment = { + __proto__: null, + "center": "center", + "left": "left", + "right": "right", + "justify": "justify", + "distributed": "distributed", + } + Excel.ChartTextHorizontalAlignment = ChartTextHorizontalAlignment; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the vertical alignment for the specified object. [Api set: ExcelApi 1.7] + var ChartTextVerticalAlignment = { + __proto__: null, + "center": "center", + "bottom": "bottom", + "top": "top", + "justify": "justify", + "distributed": "distributed", + } + Excel.ChartTextVerticalAlignment = ChartTextVerticalAlignment; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.8] + var ChartTickLabelAlignment = { + __proto__: null, + "center": "center", + "left": "left", + "right": "right", + } + Excel.ChartTickLabelAlignment = ChartTickLabelAlignment; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartTitle = (function(_super) { + __extends(ChartTitle, _super); + function ChartTitle() { + /// Represents a chart title object of a chart. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the formatting of a chart title, which includes fill and font formatting. [Api set: ExcelApi 1.1] + /// Returns the height, in points, of the chart title. Value is `null` if the chart title is not visible. [Api set: ExcelApi 1.7] + /// Specifies the horizontal alignment for chart title. [Api set: ExcelApi 1.7] + /// Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. [Api set: ExcelApi 1.7] + /// Specifies if the chart title will overlay the chart. [Api set: ExcelApi 1.1] + /// Represents the position of chart title. See `Excel.ChartTitlePosition` for details. [Api set: ExcelApi 1.7] + /// Represents a boolean value that determines if the chart title has a shadow. [Api set: ExcelApi 1.7] + /// Specifies the chart's title text. [Api set: ExcelApi 1.1] + /// Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. [Api set: ExcelApi 1.7] + /// Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. [Api set: ExcelApi 1.7] + /// Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. [Api set: ExcelApi 1.7] + /// Specifies if the chart title is visibile. [Api set: ExcelApi 1.1] + /// Specifies the width, in points, of the chart title. Value is `null` if the chart title is not visible. [Api set: ExcelApi 1.7] + } + + ChartTitle.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartTitle.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartTitleUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartTitle object, with properties that have already been loaded and synced. + /// + } + ChartTitle.prototype.getSubstring = function(start, length) { + /// + /// Get the substring of a chart title. Line break '\n' counts one character. [Api set: ExcelApi 1.7] + /// + /// Start position of substring to be retrieved. Zero-indexed. + /// Length of the substring to be retrieved. + /// + } + ChartTitle.prototype.setFormula = function(formula) { + /// + /// Sets a string value that represents the formula of chart title using A1-style notation. [Api set: ExcelApi 1.7] + /// + /// A string that represents the formula to set. + /// + } + + return ChartTitle; + })(OfficeExtension.ClientObject); + Excel.ChartTitle = ChartTitle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartTitleFormat = (function(_super) { + __extends(ChartTitleFormat, _super); + function ChartTitleFormat() { + /// Provides access to the formatting options for a chart title. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the border format of chart title, which includes color, linestyle, and weight. [Api set: ExcelApi 1.7] + /// Represents the fill format of an object, which includes background formatting information. [Api set: ExcelApi 1.1] + /// Represents the font attributes (such as font name, font size, and color) for an object. [Api set: ExcelApi 1.1] + } + + ChartTitleFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartTitleFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartTitleFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartTitleFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartTitleFormat; + })(OfficeExtension.ClientObject); + Excel.ChartTitleFormat = ChartTitleFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the position of the chart title. [Api set: ExcelApi 1.7] + var ChartTitlePosition = { + __proto__: null, + "automatic": "automatic", + "top": "top", + "bottom": "bottom", + "left": "left", + "right": "right", + } + Excel.ChartTitlePosition = ChartTitlePosition; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartTrendline = (function(_super) { + __extends(ChartTrendline, _super); + function ChartTrendline() { + /// This object represents the attributes for a chart trendline object. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the number of periods that the trendline extends backward. [Api set: ExcelApi 1.8] + /// Represents the formatting of a chart trendline. [Api set: ExcelApi 1.7] + /// Represents the number of periods that the trendline extends forward. [Api set: ExcelApi 1.8] + /// 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] + /// Represents the label of a chart trendline. [Api set: ExcelApi 1.8] + /// Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. [Api set: ExcelApi 1.7] + /// Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string [Api set: ExcelApi 1.7] + /// Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. [Api set: ExcelApi 1.7] + /// True if the equation for the trendline is displayed on the chart. [Api set: ExcelApi 1.8] + /// True if the r-squared value for the trendline is displayed on the chart. [Api set: ExcelApi 1.8] + /// Represents the type of a chart trendline. [Api set: ExcelApi 1.7] + } + + ChartTrendline.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartTrendline.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartTrendlineUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartTrendline object, with properties that have already been loaded and synced. + /// + } + ChartTrendline.prototype.delete = function() { + /// + /// Delete the trendline object. [Api set: ExcelApi 1.7] + /// + /// + } + + return ChartTrendline; + })(OfficeExtension.ClientObject); + Excel.ChartTrendline = ChartTrendline; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartTrendlineCollection = (function(_super) { + __extends(ChartTrendlineCollection, _super); + function ChartTrendlineCollection() { + /// Represents a collection of chart trendlines. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + ChartTrendlineCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ChartTrendlineCollection.prototype.add = function(type) { + /// + /// Adds a new trendline to trendline collection. [Api set: ExcelApi 1.7] + /// + /// Specifies the trendline type. The default value is "Linear". See `Excel.ChartTrendline` for details. + /// + } + ChartTrendlineCollection.prototype.getCount = function() { + /// + /// Returns the number of trendlines in the collection. [Api set: ExcelApi 1.7] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + ChartTrendlineCollection.prototype.getItem = function(index) { + /// + /// Gets a trendline object by index, which is the insertion order in the items array. [Api set: ExcelApi 1.7] + /// + /// Represents the insertion order in the items array. + /// + } + + return ChartTrendlineCollection; + })(OfficeExtension.ClientObject); + Excel.ChartTrendlineCollection = ChartTrendlineCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartTrendlineFormat = (function(_super) { + __extends(ChartTrendlineFormat, _super); + function ChartTrendlineFormat() { + /// Represents the format properties for the chart trendline. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents chart line formatting. [Api set: ExcelApi 1.7] + } + + ChartTrendlineFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartTrendlineFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartTrendlineFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartTrendlineFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartTrendlineFormat; + })(OfficeExtension.ClientObject); + Excel.ChartTrendlineFormat = ChartTrendlineFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartTrendlineLabel = (function(_super) { + __extends(ChartTrendlineLabel, _super); + function ChartTrendlineLabel() { + /// This object represents the attributes for a chart trendline label object. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies if the trendline label automatically generates appropriate text based on context. [Api set: ExcelApi 1.8] + /// The format of the chart trendline label. [Api set: ExcelApi 1.8] + /// String value that represents the formula of the chart trendline label using A1-style notation. [Api set: ExcelApi 1.8] + /// Returns the height, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. [Api set: ExcelApi 1.8] + /// Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. [Api set: ExcelApi 1.8] + /// Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. [Api set: ExcelApi 1.8] + /// Specifies 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 1.9] + /// String value that represents the format code for the trendline label. [Api set: ExcelApi 1.8] + /// String representing the text of the trendline label on a chart. [Api set: ExcelApi 1.8] + /// Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. [Api set: ExcelApi 1.8] + /// Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. [Api set: ExcelApi 1.8] + /// Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of a trendline label is 0. [Api set: ExcelApi 1.8] + /// Returns the width, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. [Api set: ExcelApi 1.8] + } + + ChartTrendlineLabel.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartTrendlineLabel.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartTrendlineLabelUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartTrendlineLabel object, with properties that have already been loaded and synced. + /// + } + + return ChartTrendlineLabel; + })(OfficeExtension.ClientObject); + Excel.ChartTrendlineLabel = ChartTrendlineLabel; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ChartTrendlineLabelFormat = (function(_super) { + __extends(ChartTrendlineLabelFormat, _super); + function ChartTrendlineLabelFormat() { + /// Encapsulates the format properties for the chart trendline label. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the border format, which includes color, linestyle, and weight. [Api set: ExcelApi 1.8] + /// Specifies the fill format of the current chart trendline label. [Api set: ExcelApi 1.8] + /// Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. [Api set: ExcelApi 1.8] + } + + ChartTrendlineLabelFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ChartTrendlineLabelFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ChartTrendlineLabelFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ChartTrendlineLabelFormat object, with properties that have already been loaded and synced. + /// + } + + return ChartTrendlineLabelFormat; + })(OfficeExtension.ClientObject); + Excel.ChartTrendlineLabelFormat = ChartTrendlineLabelFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var ChartTrendlineType = { + __proto__: null, + "linear": "linear", + "exponential": "exponential", + "logarithmic": "logarithmic", + "movingAverage": "movingAverage", + "polynomial": "polynomial", + "power": "power", + } + Excel.ChartTrendlineType = ChartTrendlineType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var ChartType = { + __proto__: null, + "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", + } + Excel.ChartType = ChartType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var ChartUnderlineStyle = { + __proto__: null, + "none": "none", + "single": "single", + } + Excel.ChartUnderlineStyle = ChartUnderlineStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var ClearApplyTo = { + __proto__: null, + "all": "all", + "formats": "formats", + "contents": "contents", + "hyperlinks": "hyperlinks", + "removeHyperlinks": "removeHyperlinks", + } + Excel.ClearApplyTo = ClearApplyTo; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the close behavior for `Workbook.close`. [Api set: ExcelApi 1.9] + var CloseBehavior = { + __proto__: null, + "save": "save", + "skipSave": "skipSave", + } + Excel.CloseBehavior = CloseBehavior; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ColorScaleConditionalFormat = (function(_super) { + __extends(ColorScaleConditionalFormat, _super); + function ColorScaleConditionalFormat() { + /// Represents the color scale criteria for conditional formatting. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The criteria of the color scale. Midpoint is optional when using a two point color scale. [Api set: ExcelApi 1.6] + /// If `true`, the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). [Api set: ExcelApi 1.6] + } + + ColorScaleConditionalFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ColorScaleConditionalFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ColorScaleConditionalFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ColorScaleConditionalFormat object, with properties that have already been loaded and synced. + /// + } + + return ColorScaleConditionalFormat; + })(OfficeExtension.ClientObject); + Excel.ColorScaleConditionalFormat = ColorScaleConditionalFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Comment = (function(_super) { + __extends(Comment, _super); + function Comment() { + /// Represents a comment in the workbook. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the email of the comment's author. [Api set: ExcelApi 1.10] + /// Gets the name of the comment's author. [Api set: ExcelApi 1.10] + /// The comment's content. The string is plain text. [Api set: ExcelApi 1.10] + /// Gets the content type of the comment. [Api set: ExcelApi 1.12] + /// Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. [Api set: ExcelApi 1.10] + /// Specifies the comment identifier. [Api set: ExcelApi 1.10] + /// Gets the entities (e.g., people) that are mentioned in comments. [Api set: ExcelApi 1.11] + /// Represents a collection of reply objects associated with the comment. [Api set: ExcelApi 1.10] + /// The comment thread status. A value of `true` means that the comment thread is resolved. [Api set: ExcelApi 1.11] + /// Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. [Api set: ExcelApi 1.11] + } + + Comment.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Comment.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.CommentUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Comment object, with properties that have already been loaded and synced. + /// + } + Comment.prototype.assignTask = function(assignee) { + /// + /// Assigns the task attached to the comment to the given user as an assignee. If there is no task, one will be created. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The assignee's user identity information. + /// + } + Comment.prototype.delete = function() { + /// + /// Deletes the comment and all the connected replies. [Api set: ExcelApi 1.10] + /// + /// + } + Comment.prototype.getLocation = function() { + /// + /// Gets the cell where this comment is located. [Api set: ExcelApi 1.10] + /// + /// + } + Comment.prototype.getTask = function() { + /// + /// Gets the task associated with this comment. If there is no task for the comment thread, an `ItemNotFound` exception is thrown. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + } + Comment.prototype.getTaskOrNullObject = function() { + /// + /// Gets the task associated with this comment. If there is no task for the comment thread, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + } + Comment.prototype.updateMentions = function(contentWithMentions) { + /// + /// Updates the comment content with a specially formatted string and a list of mentions. [Api set: ExcelApi 1.11] + /// + /// The content for the comment. This contains a specially formatted string and a list of mentions that will be parsed into the string when displayed by Excel. + /// + } + + return Comment; + })(OfficeExtension.ClientObject); + Excel.Comment = Comment; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CommentAddedEventArgs = (function() { + function CommentAddedEventArgs() { + /// Provides information about the comments that raised the comment added event. [Api set: ExcelApi 1.12] + /// Gets the `CommentDetail` array that contains the comment ID and IDs of its related replies. [Api set: ExcelApi 1.12] + /// Specifies the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.12] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.12] + /// Gets the ID of the worksheet in which the event happened. [Api set: ExcelApi 1.12] + } + return CommentAddedEventArgs; + })(); + Interfaces.CommentAddedEventArgs.__proto__ = null; + Interfaces.CommentAddedEventArgs = CommentAddedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CommentChangedEventArgs = (function() { + function CommentChangedEventArgs() { + /// Occurs when existing comments are changed. [Api set: ExcelApi 1.12] + /// Gets the change type that represents how the changed event is triggered. [Api set: ExcelApi 1.12] + /// Get the `CommentDetail` array which contains the comment ID and IDs of its related replies. [Api set: ExcelApi 1.12] + /// Specifies the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.12] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.12] + /// Gets the ID of the worksheet in which the event happened. [Api set: ExcelApi 1.12] + } + return CommentChangedEventArgs; + })(); + Interfaces.CommentChangedEventArgs.__proto__ = null; + Interfaces.CommentChangedEventArgs = CommentChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents how the comments in the event were changed. [Api set: ExcelApi 1.12] + var CommentChangeType = { + __proto__: null, + "commentEdited": "commentEdited", + "commentResolved": "commentResolved", + "commentReopened": "commentReopened", + "replyAdded": "replyAdded", + "replyDeleted": "replyDeleted", + "replyEdited": "replyEdited", + } + Excel.CommentChangeType = CommentChangeType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var CommentCollection = (function(_super) { + __extends(CommentCollection, _super); + function CommentCollection() { + /// Represents a collection of comment objects that are part of the workbook. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Occurs when the comments are added. [Api set: ExcelApi 1.12] + /// Occurs when comments or replies in a comment collection are changed, including when replies are deleted. [Api set: ExcelApi 1.12] + /// Occurs when comments are deleted in the comment collection. [Api set: ExcelApi 1.12] + /// Gets the loaded child items in this collection. + } + + CommentCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CommentCollection.prototype.add = function(cellAddress, content, contentType) { + /// + /// Creates a new comment with the given content on the given cell. An `InvalidArgument` error is thrown if the provided range is larger than one cell. [Api set: ExcelApi 1.10] + /// + /// The cell to which the comment is added. This can be a `Range` object or a string. If it's a string, it must contain the full address, including the sheet name. An `InvalidArgument` error is thrown if the provided range is larger than one cell. + /// The comment's content. This can be either a string or `CommentRichContent` object. Strings are used for plain text. `CommentRichContent` objects allow for other comment features, such as mentions. [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] + /// Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] + /// + } + CommentCollection.prototype.getCount = function() { + /// + /// Gets the number of comments in the collection. [Api set: ExcelApi 1.10] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + CommentCollection.prototype.getItem = function(commentId) { + /// + /// Gets a comment from the collection based on its ID. [Api set: ExcelApi 1.10] + /// + /// The identifier for the comment. + /// + } + CommentCollection.prototype.getItemAt = function(index) { + /// + /// Gets a comment from the collection based on its position. [Api set: ExcelApi 1.10] + /// + /// Index value of the object to be retrieved. Zero-indexed. + /// + } + CommentCollection.prototype.getItemByCell = function(cellAddress) { + /// + /// Gets the comment from the specified cell. [Api set: ExcelApi 1.10] + /// + /// The cell which the comment is on. This can be a `Range` object or a string. If it's a string, it must contain the full address, including the sheet name. An `InvalidArgument` error is thrown if the provided range is larger than one cell. + /// + } + CommentCollection.prototype.getItemByReplyId = function(replyId) { + /// + /// Gets the comment to which the given reply is connected. [Api set: ExcelApi 1.10] + /// + /// The identifier of comment reply. + /// + } + CommentCollection.prototype.getItemOrNullObject = function(commentId) { + /// + /// Gets a comment from the collection based on its ID. If the comment object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.14] + /// + /// The identifier for the comment. + /// + } + CommentCollection.prototype.onAdded = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment added event. + /// + var eventInfo = new Excel.Interfaces.CommentAddedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + CommentCollection.prototype.onChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Occurs when existing comments are changed. + /// + var eventInfo = new Excel.Interfaces.CommentChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + CommentCollection.prototype.onDeleted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment deleted event. + /// + var eventInfo = new Excel.Interfaces.CommentDeletedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + return CommentCollection; + })(OfficeExtension.ClientObject); + Excel.CommentCollection = CommentCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CommentDeletedEventArgs = (function() { + function CommentDeletedEventArgs() { + /// Provides information about the comments that raised the comment deleted event. [Api set: ExcelApi 1.12] + /// Gets the `CommentDetail` array that contains the comment ID and IDs of its related replies. [Api set: ExcelApi 1.12] + /// Specifies the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.12] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.12] + /// Gets the ID of the worksheet in which the event happened. [Api set: ExcelApi 1.12] + } + return CommentDeletedEventArgs; + })(); + Interfaces.CommentDeletedEventArgs.__proto__ = null; + Interfaces.CommentDeletedEventArgs = CommentDeletedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CommentDetail = (function() { + function CommentDetail() { + /// A structure for the comment ID and IDs of its related replies. [Api set: ExcelApi 1.12] + /// Represents the IDs of the related replies that belong to the comment. [Api set: ExcelApi 1.12] + /// Represents the ID of the comment. [Api set: ExcelApi 1.12] + } + return CommentDetail; + })(); + Interfaces.CommentDetail.__proto__ = null; + Interfaces.CommentDetail = CommentDetail; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CommentMention = (function() { + function CommentMention() { + /// Represents the entity that is mentioned in comments. [Api set: ExcelApi 1.11] + /// The email address of the entity that is mentioned in a comment. [Api set: ExcelApi 1.11] + /// The ID of the entity. The ID matches one of the IDs in `CommentRichContent.richContent`. [Api set: ExcelApi 1.11] + /// The name of the entity that is mentioned in a comment. [Api set: ExcelApi 1.11] + } + return CommentMention; + })(); + Interfaces.CommentMention.__proto__ = null; + Interfaces.CommentMention = CommentMention; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var CommentReply = (function(_super) { + __extends(CommentReply, _super); + function CommentReply() { + /// Represents a comment reply in the workbook. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the email of the comment reply's author. [Api set: ExcelApi 1.10] + /// Gets the name of the comment reply's author. [Api set: ExcelApi 1.10] + /// The comment reply's content. The string is plain text. [Api set: ExcelApi 1.10] + /// The content type of the reply. [Api set: ExcelApi 1.12] + /// Gets the creation time of the comment reply. [Api set: ExcelApi 1.10] + /// Specifies the comment reply identifier. [Api set: ExcelApi 1.10] + /// The entities (e.g., people) that are mentioned in comments. [Api set: ExcelApi 1.11] + /// The comment reply status. A value of `true` means the reply is in the resolved state. [Api set: ExcelApi 1.11] + /// The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. [Api set: ExcelApi 1.11] + } + + CommentReply.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + CommentReply.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.CommentReplyUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing CommentReply object, with properties that have already been loaded and synced. + /// + } + CommentReply.prototype.assignTask = function(assignee) { + /// + /// Assigns the task attached to the comment to the given user as the sole assignee. If there is no task, one will be created. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The assignee's user identity information. + /// + } + CommentReply.prototype.delete = function() { + /// + /// Deletes the comment reply. [Api set: ExcelApi 1.10] + /// + /// + } + CommentReply.prototype.getLocation = function() { + /// + /// Gets the cell where this comment reply is located. [Api set: ExcelApi 1.10] + /// + /// + } + CommentReply.prototype.getParentComment = function() { + /// + /// Gets the parent comment of this reply. [Api set: ExcelApi 1.10] + /// + /// + } + CommentReply.prototype.getTask = function() { + /// + /// Gets the task associated with this comment reply's thread. If there is no task for the comment thread, an `ItemNotFound` exception is thrown. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + } + CommentReply.prototype.getTaskOrNullObject = function() { + /// + /// Gets the task associated with this comment reply's thread. If there is no task for the comment thread, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + } + CommentReply.prototype.updateMentions = function(contentWithMentions) { + /// + /// Updates the comment content with a specially formatted string and a list of mentions. [Api set: ExcelApi 1.11] + /// + /// The content for the comment. This contains a specially formatted string and a list of mentions that will be parsed into the string when displayed by Excel. + /// + } + + return CommentReply; + })(OfficeExtension.ClientObject); + Excel.CommentReply = CommentReply; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var CommentReplyCollection = (function(_super) { + __extends(CommentReplyCollection, _super); + function CommentReplyCollection() { + /// Represents a collection of comment reply objects that are part of the comment. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + CommentReplyCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CommentReplyCollection.prototype.add = function(content, contentType) { + /// + /// Creates a comment reply for a comment. [Api set: ExcelApi 1.10] + /// + /// The comment's content. This can be either a string or a `CommentRichContent` object (e.g., for comments with mentions). [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] + /// Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] + /// + } + CommentReplyCollection.prototype.getCount = function() { + /// + /// Gets the number of comment replies in the collection. [Api set: ExcelApi 1.10] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + CommentReplyCollection.prototype.getItem = function(commentReplyId) { + /// + /// Returns a comment reply identified by its ID. [Api set: ExcelApi 1.10] + /// + /// The identifier for the comment reply. + /// + } + CommentReplyCollection.prototype.getItemAt = function(index) { + /// + /// Gets a comment reply based on its position in the collection. [Api set: ExcelApi 1.10] + /// + /// The index value of the comment reply to be retrieved. The collection uses zero-based indexing. + /// + } + CommentReplyCollection.prototype.getItemOrNullObject = function(commentReplyId) { + /// + /// Returns a comment reply identified by its ID. If the comment reply object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.14] + /// + /// The identifier for the comment reply. + /// + } + + return CommentReplyCollection; + })(OfficeExtension.ClientObject); + Excel.CommentReplyCollection = CommentReplyCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CommentRichContent = (function() { + function CommentRichContent() { + /// Represents the content contained within a comment or comment reply. Rich content incudes the text string and any other objects contained within the comment body, such as mentions. [Api set: ExcelApi 1.11] + /// An array containing all the entities (e.g., people) mentioned within the comment. [Api set: ExcelApi 1.11] + /// Specifies the rich content of the comment (e.g., comment content with mentions, the first mentioned entity has an ID attribute of 0, and the second mentioned entity has an ID attribute of 1). [Api set: ExcelApi 1.11] + } + return CommentRichContent; + })(); + Interfaces.CommentRichContent.__proto__ = null; + Interfaces.CommentRichContent = CommentRichContent; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the operator of the text conditional format type. [Api set: ExcelApi 1.6] + var ConditionalCellValueOperator = { + __proto__: null, + "invalid": "invalid", + "between": "between", + "notBetween": "notBetween", + "equalTo": "equalTo", + "notEqualTo": "notEqualTo", + "greaterThan": "greaterThan", + "lessThan": "lessThan", + "greaterThanOrEqual": "greaterThanOrEqual", + "lessThanOrEqual": "lessThanOrEqual", + } + Excel.ConditionalCellValueOperator = ConditionalCellValueOperator; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalCellValueRule = (function() { + function ConditionalCellValueRule() { + /// Represents a cell value conditional format rule. [Api set: ExcelApi 1.6] + /// The formula, if required, on which to evaluate the conditional format rule. [Api set: ExcelApi 1.6] + /// The formula, if required, on which to evaluate the conditional format rule. [Api set: ExcelApi 1.6] + /// The operator of the cell value conditional format. [Api set: ExcelApi 1.6] + } + return ConditionalCellValueRule; + })(); + Interfaces.ConditionalCellValueRule.__proto__ = null; + Interfaces.ConditionalCellValueRule = ConditionalCellValueRule; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalColorScaleCriteria = (function() { + function ConditionalColorScaleCriteria() { + /// Represents the criteria of the color scale. [Api set: ExcelApi 1.6] + /// The maximum point of the color scale criterion. [Api set: ExcelApi 1.6] + /// The midpoint of the color scale criterion, if the color scale is a 3-color scale. [Api set: ExcelApi 1.6] + /// The minimum point of the color scale criterion. [Api set: ExcelApi 1.6] + } + return ConditionalColorScaleCriteria; + })(); + Interfaces.ConditionalColorScaleCriteria.__proto__ = null; + Interfaces.ConditionalColorScaleCriteria = ConditionalColorScaleCriteria; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalColorScaleCriterion = (function() { + function ConditionalColorScaleCriterion() { + /// Represents a color scale criterion which contains a type, value, and a color. [Api set: ExcelApi 1.6] + /// HTML color code representation of the color scale color (e.g., #FF0000 represents Red). [Api set: ExcelApi 1.6] + /// A number, a formula, or `null` (if `type` is `lowestValue`). [Api set: ExcelApi 1.6] + /// What the criterion conditional formula should be based on. [Api set: ExcelApi 1.6] + } + return ConditionalColorScaleCriterion; + })(); + Interfaces.ConditionalColorScaleCriterion.__proto__ = null; + Interfaces.ConditionalColorScaleCriterion = ConditionalColorScaleCriterion; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the format options for a data bar axis. [Api set: ExcelApi 1.6] + var ConditionalDataBarAxisFormat = { + __proto__: null, + "automatic": "automatic", + "none": "none", + "cellMidPoint": "cellMidPoint", + } + Excel.ConditionalDataBarAxisFormat = ConditionalDataBarAxisFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the data bar direction within a cell. [Api set: ExcelApi 1.6] + var ConditionalDataBarDirection = { + __proto__: null, + "context": "context", + "leftToRight": "leftToRight", + "rightToLeft": "rightToLeft", + } + Excel.ConditionalDataBarDirection = ConditionalDataBarDirection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ConditionalDataBarNegativeFormat = (function(_super) { + __extends(ConditionalDataBarNegativeFormat, _super); + function ConditionalDataBarNegativeFormat() { + /// Represents a conditional format for the negative side of the data bar. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no border is present or set. [Api set: ExcelApi 1.6] + /// HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.6] + /// Specifies if the negative data bar has the same border color as the positive data bar. [Api set: ExcelApi 1.6] + /// Specifies if the negative data bar has the same fill color as the positive data bar. [Api set: ExcelApi 1.6] + } + + ConditionalDataBarNegativeFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ConditionalDataBarNegativeFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ConditionalDataBarNegativeFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ConditionalDataBarNegativeFormat object, with properties that have already been loaded and synced. + /// + } + + return ConditionalDataBarNegativeFormat; + })(OfficeExtension.ClientObject); + Excel.ConditionalDataBarNegativeFormat = ConditionalDataBarNegativeFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ConditionalDataBarPositiveFormat = (function(_super) { + __extends(ConditionalDataBarPositiveFormat, _super); + function ConditionalDataBarPositiveFormat() { + /// Represents a conditional format for the positive side of the data bar. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no border is present or set. [Api set: ExcelApi 1.6] + /// HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.6] + /// Specifies if the data bar has a gradient. [Api set: ExcelApi 1.6] + } + + ConditionalDataBarPositiveFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ConditionalDataBarPositiveFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ConditionalDataBarPositiveFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ConditionalDataBarPositiveFormat object, with properties that have already been loaded and synced. + /// + } + + return ConditionalDataBarPositiveFormat; + })(OfficeExtension.ClientObject); + Excel.ConditionalDataBarPositiveFormat = ConditionalDataBarPositiveFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalDataBarRule = (function() { + function ConditionalDataBarRule() { + /// Represents a rule-type for a data bar. [Api set: ExcelApi 1.6] + /// The formula, if required, on which to evaluate the data bar rule. [Api set: ExcelApi 1.6] + /// The type of rule for the data bar. [Api set: ExcelApi 1.6] + } + return ConditionalDataBarRule; + })(); + Interfaces.ConditionalDataBarRule.__proto__ = null; + Interfaces.ConditionalDataBarRule = ConditionalDataBarRule; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ConditionalFormat = (function(_super) { + __extends(ConditionalFormat, _super); + function ConditionalFormat() { + /// An object encapsulating a conditional format's range, format, rule, and other properties. To learn more about the conditional formatting object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-conditional-formatting | Apply conditional formatting to Excel ranges}. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. [Api set: ExcelApi 1.6] + /// Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. [Api set: ExcelApi 1.6] + /// Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. [Api set: ExcelApi 1.6] + /// Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. [Api set: ExcelApi 1.6] + /// Returns the custom conditional format properties if the current conditional format is a custom type. [Api set: ExcelApi 1.6] + /// Returns the custom conditional format properties if the current conditional format is a custom type. [Api set: ExcelApi 1.6] + /// Returns the data bar properties if the current conditional format is a data bar. [Api set: ExcelApi 1.6] + /// Returns the data bar properties if the current conditional format is a data bar. [Api set: ExcelApi 1.6] + /// Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. [Api set: ExcelApi 1.6] + /// Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. [Api set: ExcelApi 1.6] + /// The priority of the conditional format in the current `ConditionalFormatCollection`. [Api set: ExcelApi 1.6] + /// Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. [Api set: ExcelApi 1.6] + /// Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. [Api set: ExcelApi 1.6] + /// 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 the 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. [Api set: ExcelApi 1.6] + /// If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. [Api set: ExcelApi 1.6] + /// 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] + /// 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] + /// Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. [Api set: ExcelApi 1.6] + /// Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. [Api set: ExcelApi 1.6] + /// A type of conditional format. Only one can be set at a time. [Api set: ExcelApi 1.6] + } + + ConditionalFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ConditionalFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ConditionalFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ConditionalFormat object, with properties that have already been loaded and synced. + /// + } + ConditionalFormat.prototype.changeRuleToCellValue = function(properties) { + /// + /// Change the conditional format rule type to cell value. [Api set: ExcelApi 1.17] + /// + /// The properties to set for the cell value conditional format rule. + /// + } + ConditionalFormat.prototype.changeRuleToColorScale = function() { + /// + /// Change the conditional format rule type to color scale. [Api set: ExcelApi 1.17] + /// + /// + } + ConditionalFormat.prototype.changeRuleToContainsText = function(properties) { + /// + /// Change the conditional format rule type to text comparison. [Api set: ExcelApi 1.17] + /// + /// The properties to set for the text comparison conditional format rule. + /// + } + ConditionalFormat.prototype.changeRuleToCustom = function(formula) { + /// + /// Change the conditional format rule type to custom. [Api set: ExcelApi 1.17] + /// + /// The formula to set for the custom conditional format rule. + /// + } + ConditionalFormat.prototype.changeRuleToDataBar = function() { + /// + /// Change the conditional format rule type to data bar. [Api set: ExcelApi 1.17] + /// + /// + } + ConditionalFormat.prototype.changeRuleToIconSet = function() { + /// + /// Change the conditional format rule type to icon set. [Api set: ExcelApi 1.17] + /// + /// + } + ConditionalFormat.prototype.changeRuleToPresetCriteria = function(properties) { + /// + /// Change the conditional format rule type to preset criteria. [Api set: ExcelApi 1.17] + /// + /// The properties to set for the preset criteria conditional format rule. + /// + } + ConditionalFormat.prototype.changeRuleToTopBottom = function(properties) { + /// + /// Change the conditional format rule type to top/bottom. [Api set: ExcelApi 1.17] + /// + /// The properties to set for the top/bottom conditional format rule. + /// + } + ConditionalFormat.prototype.delete = function() { + /// + /// Deletes this conditional format. [Api set: ExcelApi 1.6] + /// + /// + } + ConditionalFormat.prototype.getRange = function() { + /// + /// Returns the range the conditonal format is applied to. Throws an error if the conditional format is applied to multiple ranges. [Api set: ExcelApi 1.6] + /// + /// + } + ConditionalFormat.prototype.getRangeOrNullObject = function() { + /// + /// Returns the range to which the conditonal format is applied. If the conditional format is applied to multiple ranges, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.6] + /// + /// + } + ConditionalFormat.prototype.getRanges = function() { + /// + /// Returns the `RangeAreas`, comprising one or more rectangular ranges, to which the conditonal format is applied. [Api set: ExcelApi 1.9] + /// + /// + } + ConditionalFormat.prototype.setRanges = function(ranges) { + /// + /// Set the ranges that the conditonal format rule is applied to. [Api set: ExcelApi 1.17] + /// + /// Collection of one or more ranges for this rule to be applied to. + /// + } + + return ConditionalFormat; + })(OfficeExtension.ClientObject); + Excel.ConditionalFormat = ConditionalFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ConditionalFormatCollection = (function(_super) { + __extends(ConditionalFormatCollection, _super); + function ConditionalFormatCollection() { + /// Represents a collection of all the conditional formats that are overlap the range. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + ConditionalFormatCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ConditionalFormatCollection.prototype.add = function(type) { + /// + /// Adds a new conditional format to the collection at the first/top priority. [Api set: ExcelApi 1.6] + /// + /// The type of conditional format being added. See `Excel.ConditionalFormatType` for details. + /// + } + ConditionalFormatCollection.prototype.clearAll = function() { + /// + /// Clears all conditional formats active on the current specified range. [Api set: ExcelApi 1.6] + /// + /// + } + ConditionalFormatCollection.prototype.getCount = function() { + /// + /// Returns the number of conditional formats in the workbook. [Api set: ExcelApi 1.6] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + ConditionalFormatCollection.prototype.getItem = function(id) { + /// + /// Returns a conditional format for the given ID. [Api set: ExcelApi 1.6] + /// + /// The ID of the conditional format. + /// Conditional format object. + } + ConditionalFormatCollection.prototype.getItemAt = function(index) { + /// + /// Returns a conditional format at the given index. [Api set: ExcelApi 1.6] + /// + /// Index of the conditional formats to be retrieved. + /// + } + ConditionalFormatCollection.prototype.getItemOrNullObject = function(id) { + /// + /// Returns a conditional format identified by its ID. If the conditional format object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.14] + /// + /// The ID of the conditional format. + /// + } + + return ConditionalFormatCollection; + })(OfficeExtension.ClientObject); + Excel.ConditionalFormatCollection = ConditionalFormatCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the types of color criterion for conditional formatting. [Api set: ExcelApi 1.6] + var ConditionalFormatColorCriterionType = { + __proto__: null, + "invalid": "invalid", + "lowestValue": "lowestValue", + "highestValue": "highestValue", + "number": "number", + "percent": "percent", + "formula": "formula", + "percentile": "percentile", + } + Excel.ConditionalFormatColorCriterionType = ConditionalFormatColorCriterionType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the direction for a selection. [Api set: ExcelApi 1.6] + var ConditionalFormatDirection = { + __proto__: null, + "top": "top", + "bottom": "bottom", + } + Excel.ConditionalFormatDirection = ConditionalFormatDirection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the types of icon conditional format. [Api set: ExcelApi 1.6] + var ConditionalFormatIconRuleType = { + __proto__: null, + "invalid": "invalid", + "number": "number", + "percent": "percent", + "formula": "formula", + "percentile": "percentile", + } + Excel.ConditionalFormatIconRuleType = ConditionalFormatIconRuleType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the criteria of the preset criteria conditional format type. [Api set: ExcelApi 1.6] + var ConditionalFormatPresetCriterion = { + __proto__: null, + "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", + } + Excel.ConditionalFormatPresetCriterion = ConditionalFormatPresetCriterion; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ConditionalFormatRule = (function(_super) { + __extends(ConditionalFormatRule, _super); + function ConditionalFormatRule() { + /// Represents a rule, for all traditional rule/format pairings. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The formula, if required, on which to evaluate the conditional format rule. [Api set: ExcelApi 1.6] + /// The formula, if required, on which to evaluate the conditional format rule in the user's language. [Api set: ExcelApi 1.6] + /// The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. [Api set: ExcelApi 1.6] + } + + ConditionalFormatRule.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ConditionalFormatRule.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ConditionalFormatRuleUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ConditionalFormatRule object, with properties that have already been loaded and synced. + /// + } + + return ConditionalFormatRule; + })(OfficeExtension.ClientObject); + Excel.ConditionalFormatRule = ConditionalFormatRule; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the types of conditional format values. [Api set: ExcelApi 1.6] + var ConditionalFormatRuleType = { + __proto__: null, + "invalid": "invalid", + "automatic": "automatic", + "lowestValue": "lowestValue", + "highestValue": "highestValue", + "number": "number", + "percent": "percent", + "formula": "formula", + "percentile": "percentile", + } + Excel.ConditionalFormatRuleType = ConditionalFormatRuleType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.6] + var ConditionalFormatType = { + __proto__: null, + "custom": "custom", + "dataBar": "dataBar", + "colorScale": "colorScale", + "iconSet": "iconSet", + "topBottom": "topBottom", + "presetCriteria": "presetCriteria", + "containsText": "containsText", + "cellValue": "cellValue", + } + Excel.ConditionalFormatType = ConditionalFormatType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalIconCriterion = (function() { + function ConditionalIconCriterion() { + /// Represents an icon criterion which contains a type, value, an operator, and an optional custom icon, if not using an icon set. [Api set: ExcelApi 1.6] + /// The custom icon for the current criterion, if different from the default icon set, else `null` will be returned. [Api set: ExcelApi 1.6] + /// A number or a formula depending on the type. [Api set: ExcelApi 1.6] + /// `greaterThan` or `greaterThanOrEqual` for each of the rule types for the icon conditional format. [Api set: ExcelApi 1.6] + /// What the icon conditional formula should be based on. [Api set: ExcelApi 1.6] + } + return ConditionalIconCriterion; + })(); + Interfaces.ConditionalIconCriterion.__proto__ = null; + Interfaces.ConditionalIconCriterion = ConditionalIconCriterion; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the operator for each icon criteria. [Api set: ExcelApi 1.6] + var ConditionalIconCriterionOperator = { + __proto__: null, + "invalid": "invalid", + "greaterThan": "greaterThan", + "greaterThanOrEqual": "greaterThanOrEqual", + } + Excel.ConditionalIconCriterionOperator = ConditionalIconCriterionOperator; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalPresetCriteriaRule = (function() { + function ConditionalPresetCriteriaRule() { + /// Represents the preset criteria conditional format rule. [Api set: ExcelApi 1.6] + /// The criterion of the conditional format. [Api set: ExcelApi 1.6] + } + return ConditionalPresetCriteriaRule; + })(); + Interfaces.ConditionalPresetCriteriaRule.__proto__ = null; + Interfaces.ConditionalPresetCriteriaRule = ConditionalPresetCriteriaRule; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ConditionalRangeBorder = (function(_super) { + __extends(ConditionalRangeBorder, _super); + function ConditionalRangeBorder() { + /// Represents the border of an object. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.6] + /// Constant value that indicates the specific side of the border. See `Excel.ConditionalRangeBorderIndex` for details. [Api set: ExcelApi 1.6] + /// One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. [Api set: ExcelApi 1.6] + } + + ConditionalRangeBorder.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ConditionalRangeBorder.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ConditionalRangeBorderUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ConditionalRangeBorder object, with properties that have already been loaded and synced. + /// + } + + return ConditionalRangeBorder; + })(OfficeExtension.ClientObject); + Excel.ConditionalRangeBorder = ConditionalRangeBorder; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ConditionalRangeBorderCollection = (function(_super) { + __extends(ConditionalRangeBorderCollection, _super); + function ConditionalRangeBorderCollection() { + /// Represents the border objects that make up range border. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the bottom border. [Api set: ExcelApi 1.6] + /// Number of border objects in the collection. [Api set: ExcelApi 1.6] + /// Gets the left border. [Api set: ExcelApi 1.6] + /// Gets the right border. [Api set: ExcelApi 1.6] + /// Gets the top border. [Api set: ExcelApi 1.6] + /// Gets the loaded child items in this collection. + } + + ConditionalRangeBorderCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ConditionalRangeBorderCollection.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ConditionalRangeBorderCollectionUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ConditionalRangeBorderCollection object, with properties that have already been loaded and synced. + /// + } + ConditionalRangeBorderCollection.prototype.getItem = function(index) { + /// + /// Gets a border object using its name. [Api set: ExcelApi 1.6] + /// + /// Index value of the border object to be retrieved. See `Excel.ConditionalRangeBorderIndex` for details. + /// + } + ConditionalRangeBorderCollection.prototype.getItemAt = function(index) { + /// + /// Gets a border object using its index. [Api set: ExcelApi 1.6] + /// + /// Index value of the object to be retrieved. Zero-indexed. + /// + } + + return ConditionalRangeBorderCollection; + })(OfficeExtension.ClientObject); + Excel.ConditionalRangeBorderCollection = ConditionalRangeBorderCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.6] + var ConditionalRangeBorderIndex = { + __proto__: null, + "edgeTop": "edgeTop", + "edgeBottom": "edgeBottom", + "edgeLeft": "edgeLeft", + "edgeRight": "edgeRight", + } + Excel.ConditionalRangeBorderIndex = ConditionalRangeBorderIndex; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.6] + var ConditionalRangeBorderLineStyle = { + __proto__: null, + "none": "none", + "continuous": "continuous", + "dash": "dash", + "dashDot": "dashDot", + "dashDotDot": "dashDotDot", + "dot": "dot", + } + Excel.ConditionalRangeBorderLineStyle = ConditionalRangeBorderLineStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ConditionalRangeFill = (function(_super) { + __extends(ConditionalRangeFill, _super); + function ConditionalRangeFill() { + /// Represents the background of a conditional range object. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// HTML color code representing the color of the fill, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.6] + } + + ConditionalRangeFill.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ConditionalRangeFill.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ConditionalRangeFillUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ConditionalRangeFill object, with properties that have already been loaded and synced. + /// + } + ConditionalRangeFill.prototype.clear = function() { + /// + /// Resets the fill. [Api set: ExcelApi 1.6] + /// + /// + } + + return ConditionalRangeFill; + })(OfficeExtension.ClientObject); + Excel.ConditionalRangeFill = ConditionalRangeFill; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ConditionalRangeFont = (function(_super) { + __extends(ConditionalRangeFont, _super); + function ConditionalRangeFont() { + /// This object represents the font attributes (font style, color, etc.) for an object. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies if the font is bold. [Api set: ExcelApi 1.6] + /// HTML color code representation of the text color (e.g., #FF0000 represents Red). [Api set: ExcelApi 1.6] + /// Specifies if the font is italic. [Api set: ExcelApi 1.6] + /// Specifies the strikethrough status of the font. [Api set: ExcelApi 1.6] + /// The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. [Api set: ExcelApi 1.6] + } + + ConditionalRangeFont.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ConditionalRangeFont.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ConditionalRangeFontUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ConditionalRangeFont object, with properties that have already been loaded and synced. + /// + } + ConditionalRangeFont.prototype.clear = function() { + /// + /// Resets the font formats. [Api set: ExcelApi 1.6] + /// + /// + } + + return ConditionalRangeFont; + })(OfficeExtension.ClientObject); + Excel.ConditionalRangeFont = ConditionalRangeFont; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.6] + var ConditionalRangeFontUnderlineStyle = { + __proto__: null, + "none": "none", + "single": "single", + "double": "double", + } + Excel.ConditionalRangeFontUnderlineStyle = ConditionalRangeFontUnderlineStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ConditionalRangeFormat = (function(_super) { + __extends(ConditionalRangeFormat, _super); + function ConditionalRangeFormat() { + /// A format object encapsulating the conditional formats range's font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Collection of border objects that apply to the overall conditional format range. [Api set: ExcelApi 1.6] + /// Returns the fill object defined on the overall conditional format range. [Api set: ExcelApi 1.6] + /// Returns the font object defined on the overall conditional format range. [Api set: ExcelApi 1.6] + /// Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. Cleared if `null` is passed in. [Api set: ExcelApi 1.6] + } + + ConditionalRangeFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ConditionalRangeFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ConditionalRangeFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ConditionalRangeFormat object, with properties that have already been loaded and synced. + /// + } + ConditionalRangeFormat.prototype.clearFormat = function() { + /// + /// Remove the format properties from a conditional format rule. This creates a rule with no format settings. [Api set: ExcelApi 1.17] + /// + /// + } + + return ConditionalRangeFormat; + })(OfficeExtension.ClientObject); + Excel.ConditionalRangeFormat = ConditionalRangeFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalTextComparisonRule = (function() { + function ConditionalTextComparisonRule() { + /// Represents a cell value conditional format rule. [Api set: ExcelApi 1.6] + /// The operator of the text conditional format. [Api set: ExcelApi 1.6] + /// The text value of the conditional format. [Api set: ExcelApi 1.6] + } + return ConditionalTextComparisonRule; + })(); + Interfaces.ConditionalTextComparisonRule.__proto__ = null; + Interfaces.ConditionalTextComparisonRule = ConditionalTextComparisonRule; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the operator of the text conditional format type. [Api set: ExcelApi 1.6] + var ConditionalTextOperator = { + __proto__: null, + "invalid": "invalid", + "contains": "contains", + "notContains": "notContains", + "beginsWith": "beginsWith", + "endsWith": "endsWith", + } + Excel.ConditionalTextOperator = ConditionalTextOperator; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the criteria for the above/below average conditional format type. [Api set: ExcelApi 1.6] + var ConditionalTopBottomCriterionType = { + __proto__: null, + "invalid": "invalid", + "topItems": "topItems", + "topPercent": "topPercent", + "bottomItems": "bottomItems", + "bottomPercent": "bottomPercent", + } + Excel.ConditionalTopBottomCriterionType = ConditionalTopBottomCriterionType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalTopBottomRule = (function() { + function ConditionalTopBottomRule() { + /// Represents the rule of the top/bottom conditional format. [Api set: ExcelApi 1.6] + /// The rank between 1 and 1000 for numeric ranks or 1 and 100 for percent ranks. [Api set: ExcelApi 1.6] + /// Format values based on the top or bottom rank. [Api set: ExcelApi 1.6] + } + return ConditionalTopBottomRule; + })(); + Interfaces.ConditionalTopBottomRule.__proto__ = null; + Interfaces.ConditionalTopBottomRule = ConditionalTopBottomRule; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var ConnectorType = { + __proto__: null, + "straight": "straight", + "elbow": "elbow", + "curve": "curve", + } + Excel.ConnectorType = ConnectorType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.10] + var ContentType = { + __proto__: null, + "plain": "plain", + "mention": "mention", + } + Excel.ContentType = ContentType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var CultureInfo = (function(_super) { + __extends(CultureInfo, _super); + function CultureInfo() { + /// Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. [Api set: ExcelApi 1.11] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Defines the culturally appropriate format of displaying date and time. This is based on current system culture settings. [Api set: ExcelApi 1.12] + /// Gets the culture name in the format languagecode2-country/regioncode2 (e.g., "zh-cn" or "en-us"). This is based on current system settings. [Api set: ExcelApi 1.11] + /// Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. [Api set: ExcelApi 1.11] + } + + CultureInfo.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return CultureInfo; + })(OfficeExtension.ClientObject); + Excel.CultureInfo = CultureInfo; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var CustomConditionalFormat = (function(_super) { + __extends(CustomConditionalFormat, _super); + function CustomConditionalFormat() { + /// Represents a custom conditional format type. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// Specifies the `Rule` object on this conditional format. [Api set: ExcelApi 1.6] + } + + CustomConditionalFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + CustomConditionalFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.CustomConditionalFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing CustomConditionalFormat object, with properties that have already been loaded and synced. + /// + } + + return CustomConditionalFormat; + })(OfficeExtension.ClientObject); + Excel.CustomConditionalFormat = CustomConditionalFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CustomDataValidation = (function() { + function CustomDataValidation() { + /// Represents the custom data validation criteria. [Api set: ExcelApi 1.8] + /// A custom data validation formula. This creates special input rules, such as preventing duplicates, or limiting the total in a range of cells. [Api set: ExcelApi 1.8] + } + return CustomDataValidation; + })(); + Interfaces.CustomDataValidation.__proto__ = null; + Interfaces.CustomDataValidation = CustomDataValidation; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var CustomProperty = (function(_super) { + __extends(CustomProperty, _super); + function CustomProperty() { + /// Represents a custom property. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). [Api set: ExcelApi 1.7] + /// The type of the value used for the custom property. [Api set: ExcelApi 1.7] + /// The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). [Api set: ExcelApi 1.7] + } + + CustomProperty.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + CustomProperty.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.CustomPropertyUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing CustomProperty object, with properties that have already been loaded and synced. + /// + } + CustomProperty.prototype.delete = function() { + /// + /// Deletes the custom property. [Api set: ExcelApi 1.7] + /// + /// + } + + return CustomProperty; + })(OfficeExtension.ClientObject); + Excel.CustomProperty = CustomProperty; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var CustomPropertyCollection = (function(_super) { + __extends(CustomPropertyCollection, _super); + function CustomPropertyCollection() { + /// Contains the collection of custom properties. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + CustomPropertyCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CustomPropertyCollection.prototype.add = function(key, value) { + /// + /// Creates a new or sets an existing custom property. [Api set: ExcelApi 1.7] + /// + /// Required. The custom property's key, which is case-insensitive. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). + /// Required. The custom property's value. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + /// + } + CustomPropertyCollection.prototype.deleteAll = function() { + /// + /// Deletes all custom properties in this collection. [Api set: ExcelApi 1.7] + /// + /// + } + CustomPropertyCollection.prototype.getCount = function() { + /// + /// Gets the count of custom properties. [Api set: ExcelApi 1.7] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + CustomPropertyCollection.prototype.getItem = function(key) { + /// + /// Gets a custom property object by its key, which is case-insensitive. Throws an error if the custom property does not exist. [Api set: ExcelApi 1.7] + /// + /// The key that identifies the custom property object. + /// + } + CustomPropertyCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.7] + /// + /// Required. The key that identifies the custom property object. + /// + } + + return CustomPropertyCollection; + })(OfficeExtension.ClientObject); + Excel.CustomPropertyCollection = CustomPropertyCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var CustomXmlPart = (function(_super) { + __extends(CustomXmlPart, _super); + function CustomXmlPart() { + /// Represents a custom XML part object in a workbook. [Api set: ExcelApi 1.5] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The custom XML part's ID. [Api set: ExcelApi 1.5] + /// The custom XML part's namespace URI. [Api set: ExcelApi 1.5] + } + + CustomXmlPart.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CustomXmlPart.prototype.delete = function() { + /// + /// Deletes the custom XML part. [Api set: ExcelApi 1.5] + /// + /// + } + CustomXmlPart.prototype.getXml = function() { + /// + /// Gets the custom XML part's full XML content. [Api set: ExcelApi 1.5] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + CustomXmlPart.prototype.setXml = function(xml) { + /// + /// Sets the custom XML part's full XML content. [Api set: ExcelApi 1.5] + /// + /// XML content for the part. + /// + } + + return CustomXmlPart; + })(OfficeExtension.ClientObject); + Excel.CustomXmlPart = CustomXmlPart; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var CustomXmlPartCollection = (function(_super) { + __extends(CustomXmlPartCollection, _super); + function CustomXmlPartCollection() { + /// A collection of custom XML parts. [Api set: ExcelApi 1.5] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + CustomXmlPartCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CustomXmlPartCollection.prototype.add = function(xml) { + /// + /// Adds a new custom XML part to the workbook. [Api set: ExcelApi 1.5] + /// + /// XML content. Must be a valid XML fragment. + /// + } + CustomXmlPartCollection.prototype.getByNamespace = function(namespaceUri) { + /// + /// Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. [Api set: ExcelApi 1.5] + /// + /// This must be a fully qualified schema URI; for example, "http://schemas.contoso.com/review/1.0". + /// + } + CustomXmlPartCollection.prototype.getCount = function() { + /// + /// Gets the number of custom XML parts in the collection. [Api set: ExcelApi 1.5] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + CustomXmlPartCollection.prototype.getItem = function(id) { + /// + /// Gets a custom XML part based on its ID. [Api set: ExcelApi 1.5] + /// + /// ID of the object to be retrieved. + /// + } + CustomXmlPartCollection.prototype.getItemOrNullObject = function(id) { + /// + /// Gets a custom XML part based on its ID. If the `CustomXmlPart` does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.5] + /// + /// ID of the object to be retrieved. + /// + } + + return CustomXmlPartCollection; + })(OfficeExtension.ClientObject); + Excel.CustomXmlPartCollection = CustomXmlPartCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var CustomXmlPartScopedCollection = (function(_super) { + __extends(CustomXmlPartScopedCollection, _super); + function CustomXmlPartScopedCollection() { + /// 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] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + CustomXmlPartScopedCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CustomXmlPartScopedCollection.prototype.getCount = function() { + /// + /// Gets the number of CustomXML parts in this collection. [Api set: ExcelApi 1.5] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + CustomXmlPartScopedCollection.prototype.getItem = function(id) { + /// + /// Gets a custom XML part based on its ID. [Api set: ExcelApi 1.5] + /// + /// ID of the object to be retrieved. + /// + } + CustomXmlPartScopedCollection.prototype.getItemOrNullObject = function(id) { + /// + /// Gets a custom XML part based on its ID. If the `CustomXmlPart` does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.5] + /// + /// ID of the object to be retrieved. + /// + } + CustomXmlPartScopedCollection.prototype.getOnlyItem = function() { + /// + /// If the collection contains exactly one item, this method returns it. Otherwise, this method produces an error. [Api set: ExcelApi 1.5] + /// + /// + } + CustomXmlPartScopedCollection.prototype.getOnlyItemOrNullObject = function() { + /// + /// If the collection contains exactly one item, this method returns it. Otherwise, this method returns `null`. [Api set: ExcelApi 1.5] + /// + /// + } + + return CustomXmlPartScopedCollection; + })(OfficeExtension.ClientObject); + Excel.CustomXmlPartScopedCollection = CustomXmlPartScopedCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var DataBarConditionalFormat = (function(_super) { + __extends(DataBarConditionalFormat, _super); + function DataBarConditionalFormat() { + /// Represents an Excel conditional data bar type. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no axis is present or set. [Api set: ExcelApi 1.6] + /// Representation of how the axis is determined for an Excel data bar. [Api set: ExcelApi 1.6] + /// Specifies the direction that the data bar graphic should be based on. [Api set: ExcelApi 1.6] + /// The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). [Api set: ExcelApi 1.6] + /// Representation of all values to the left of the axis in an Excel data bar. [Api set: ExcelApi 1.6] + /// Representation of all values to the right of the axis in an Excel data bar. [Api set: ExcelApi 1.6] + /// If `true`, hides the values from the cells where the data bar is applied. [Api set: ExcelApi 1.6] + /// The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). [Api set: ExcelApi 1.6] + } + + DataBarConditionalFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + DataBarConditionalFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.DataBarConditionalFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing DataBarConditionalFormat object, with properties that have already been loaded and synced. + /// + } + + return DataBarConditionalFormat; + })(OfficeExtension.ClientObject); + Excel.DataBarConditionalFormat = DataBarConditionalFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var DataChangeType = { + __proto__: null, + "unknown": "unknown", + "rangeEdited": "rangeEdited", + "rowInserted": "rowInserted", + "rowDeleted": "rowDeleted", + "columnInserted": "columnInserted", + "columnDeleted": "columnDeleted", + "cellInserted": "cellInserted", + "cellDeleted": "cellDeleted", + } + Excel.DataChangeType = DataChangeType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var DataConnectionCollection = (function(_super) { + __extends(DataConnectionCollection, _super); + function DataConnectionCollection() { + /// Represents a collection of all the data connections that are part of the workbook. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + } + + DataConnectionCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + DataConnectionCollection.prototype.refreshAll = function() { + /// + /// Refreshes data connections in the collection, such as from a PivotTable to a Power BI dataset, or a Data Model to a table or range in the same workbook. Data connections unsupported by this method are: Power Query connections, data connections outside the original workbook (except Power BI connections), and connections to data protected by a firewall. [Api set: ExcelApi 1.7] + /// + /// + } + + return DataConnectionCollection; + })(OfficeExtension.ClientObject); + Excel.DataConnectionCollection = DataConnectionCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var DataPivotHierarchy = (function(_super) { + __extends(DataPivotHierarchy, _super); + function DataPivotHierarchy() { + /// Represents the Excel DataPivotHierarchy. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the PivotFields associated with the DataPivotHierarchy. [Api set: ExcelApi 1.8] + /// ID of the DataPivotHierarchy. [Api set: ExcelApi 1.8] + /// Name of the DataPivotHierarchy. [Api set: ExcelApi 1.8] + /// Number format of the DataPivotHierarchy. [Api set: ExcelApi 1.8] + /// Position of the DataPivotHierarchy. [Api set: ExcelApi 1.8] + /// Specifies if the data should be shown as a specific summary calculation. [Api set: ExcelApi 1.8] + /// Specifies if all items of the DataPivotHierarchy are shown. [Api set: ExcelApi 1.8] + } + + DataPivotHierarchy.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + DataPivotHierarchy.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.DataPivotHierarchyUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing DataPivotHierarchy object, with properties that have already been loaded and synced. + /// + } + DataPivotHierarchy.prototype.setToDefault = function() { + /// + /// Reset the DataPivotHierarchy back to its default values. [Api set: ExcelApi 1.8] + /// + /// + } + + return DataPivotHierarchy; + })(OfficeExtension.ClientObject); + Excel.DataPivotHierarchy = DataPivotHierarchy; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var DataPivotHierarchyCollection = (function(_super) { + __extends(DataPivotHierarchyCollection, _super); + function DataPivotHierarchyCollection() { + /// Represents a collection of DataPivotHierarchy items associated with the PivotTable. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + DataPivotHierarchyCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + DataPivotHierarchyCollection.prototype.add = function(pivotHierarchy) { + /// + /// Adds the PivotHierarchy to the current axis. [Api set: ExcelApi 1.8] + /// + /// + } + DataPivotHierarchyCollection.prototype.getCount = function() { + /// + /// Gets the number of pivot hierarchies in the collection. [Api set: ExcelApi 1.8] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + DataPivotHierarchyCollection.prototype.getItem = function(name) { + /// + /// Gets a DataPivotHierarchy by its name or ID. [Api set: ExcelApi 1.8] + /// + /// Name of the DataPivotHierarchy to be retrieved. + /// + } + DataPivotHierarchyCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a DataPivotHierarchy by name. If the DataPivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.8] + /// + /// Name of the DataPivotHierarchy to be retrieved. + /// + } + DataPivotHierarchyCollection.prototype.remove = function(DataPivotHierarchy) { + /// + /// Removes the PivotHierarchy from the current axis. [Api set: ExcelApi 1.8] + /// + /// + } + + return DataPivotHierarchyCollection; + })(OfficeExtension.ClientObject); + Excel.DataPivotHierarchyCollection = DataPivotHierarchyCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents a command type of `DataConnection`. [Api set: ExcelApi 1.15] + var DataSourceType = { + __proto__: null, + "unknown": "unknown", + "cube": "cube", + "localRange": "localRange", + "localTable": "localTable", + "oledbDefault": "oledbDefault", + } + Excel.DataSourceType = DataSourceType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var DataValidation = (function(_super) { + __extends(DataValidation, _super); + function DataValidation() { + /// Represents the data validation applied to the current range. To learn more about the data validation object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-data-validation | Add data validation to Excel ranges}. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Error alert when user enters invalid data. [Api set: ExcelApi 1.8] + /// Specifies if data validation will be performed on blank cells. Default is `true`. [Api set: ExcelApi 1.8] + /// Prompt when users select a cell. [Api set: ExcelApi 1.8] + /// Data validation rule that contains different type of data validation criteria. [Api set: ExcelApi 1.8] + /// Type of the data validation, see `Excel.DataValidationType` for details. [Api set: ExcelApi 1.8] + /// 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] + } + + DataValidation.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + DataValidation.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.DataValidationUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing DataValidation object, with properties that have already been loaded and synced. + /// + } + DataValidation.prototype.clear = function() { + /// + /// Clears the data validation from the current range. [Api set: ExcelApi 1.8] + /// + /// + } + DataValidation.prototype.getInvalidCells = function() { + /// + /// Returns a `RangeAreas` object, 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 1.9] + /// + /// + } + DataValidation.prototype.getInvalidCellsOrNullObject = function() { + /// + /// Returns a `RangeAreas` object, comprising one or more rectangular ranges, with invalid cell values. If all cell values are valid, this function will return `null`. [Api set: ExcelApi 1.9] + /// + /// + } + + return DataValidation; + })(OfficeExtension.ClientObject); + Excel.DataValidation = DataValidation; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the data validation error alert style. The default is `Stop`. [Api set: ExcelApi 1.8] + var DataValidationAlertStyle = { + __proto__: null, + "stop": "stop", + "warning": "warning", + "information": "information", + } + Excel.DataValidationAlertStyle = DataValidationAlertStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var DataValidationErrorAlert = (function() { + function DataValidationErrorAlert() { + /// Represents the error alert properties for the data validation. [Api set: ExcelApi 1.8] + /// Represents the error alert message. [Api set: ExcelApi 1.8] + /// Specifies whether to show an error alert dialog when a user enters invalid data. The default is `true`. [Api set: ExcelApi 1.8] + /// The data validation alert type, please see `Excel.DataValidationAlertStyle` for details. [Api set: ExcelApi 1.8] + /// Represents the error alert dialog title. [Api set: ExcelApi 1.8] + } + return DataValidationErrorAlert; + })(); + Interfaces.DataValidationErrorAlert.__proto__ = null; + Interfaces.DataValidationErrorAlert = DataValidationErrorAlert; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the data validation operator enum. [Api set: ExcelApi 1.8] + var DataValidationOperator = { + __proto__: null, + "between": "between", + "notBetween": "notBetween", + "equalTo": "equalTo", + "notEqualTo": "notEqualTo", + "greaterThan": "greaterThan", + "lessThan": "lessThan", + "greaterThanOrEqualTo": "greaterThanOrEqualTo", + "lessThanOrEqualTo": "lessThanOrEqualTo", + } + Excel.DataValidationOperator = DataValidationOperator; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var DataValidationPrompt = (function() { + function DataValidationPrompt() { + /// Represents the user prompt properties for the data validation. [Api set: ExcelApi 1.8] + /// Specifies the message of the prompt. [Api set: ExcelApi 1.8] + /// Specifies if a prompt is shown when a user selects a cell with data validation. [Api set: ExcelApi 1.8] + /// Specifies the title for the prompt. [Api set: ExcelApi 1.8] + } + return DataValidationPrompt; + })(); + Interfaces.DataValidationPrompt.__proto__ = null; + Interfaces.DataValidationPrompt = DataValidationPrompt; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var DataValidationRule = (function() { + function DataValidationRule() { + /// A 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] + /// Custom data validation criteria. [Api set: ExcelApi 1.8] + /// Date data validation criteria. [Api set: ExcelApi 1.8] + /// Decimal data validation criteria. [Api set: ExcelApi 1.8] + /// List data validation criteria. [Api set: ExcelApi 1.8] + /// Text length data validation criteria. [Api set: ExcelApi 1.8] + /// Time data validation criteria. [Api set: ExcelApi 1.8] + /// Whole number data validation criteria. [Api set: ExcelApi 1.8] + } + return DataValidationRule; + })(); + Interfaces.DataValidationRule.__proto__ = null; + Interfaces.DataValidationRule = DataValidationRule; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the data validation type enum. [Api set: ExcelApi 1.8] + var DataValidationType = { + __proto__: null, + "none": "none", + "wholeNumber": "wholeNumber", + "decimal": "decimal", + "list": "list", + "date": "date", + "time": "time", + "textLength": "textLength", + "custom": "custom", + "inconsistent": "inconsistent", + "mixedCriteria": "mixedCriteria", + } + Excel.DataValidationType = DataValidationType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Enum representing all accepted conditions by which a date filter can be applied. Used to configure the type of PivotFilter that is applied to the field. [Api set: ExcelApi 1.12] + var DateFilterCondition = { + __proto__: null, + "unknown": "unknown", + "equals": "equals", + "before": "before", + "beforeOrEqualTo": "beforeOrEqualTo", + "after": "after", + "afterOrEqualTo": "afterOrEqualTo", + "between": "between", + "tomorrow": "tomorrow", + "today": "today", + "yesterday": "yesterday", + "nextWeek": "nextWeek", + "thisWeek": "thisWeek", + "lastWeek": "lastWeek", + "nextMonth": "nextMonth", + "thisMonth": "thisMonth", + "lastMonth": "lastMonth", + "nextQuarter": "nextQuarter", + "thisQuarter": "thisQuarter", + "lastQuarter": "lastQuarter", + "nextYear": "nextYear", + "thisYear": "thisYear", + "lastYear": "lastYear", + "yearToDate": "yearToDate", + "allDatesInPeriodQuarter1": "allDatesInPeriodQuarter1", + "allDatesInPeriodQuarter2": "allDatesInPeriodQuarter2", + "allDatesInPeriodQuarter3": "allDatesInPeriodQuarter3", + "allDatesInPeriodQuarter4": "allDatesInPeriodQuarter4", + "allDatesInPeriodJanuary": "allDatesInPeriodJanuary", + "allDatesInPeriodFebruary": "allDatesInPeriodFebruary", + "allDatesInPeriodMarch": "allDatesInPeriodMarch", + "allDatesInPeriodApril": "allDatesInPeriodApril", + "allDatesInPeriodMay": "allDatesInPeriodMay", + "allDatesInPeriodJune": "allDatesInPeriodJune", + "allDatesInPeriodJuly": "allDatesInPeriodJuly", + "allDatesInPeriodAugust": "allDatesInPeriodAugust", + "allDatesInPeriodSeptember": "allDatesInPeriodSeptember", + "allDatesInPeriodOctober": "allDatesInPeriodOctober", + "allDatesInPeriodNovember": "allDatesInPeriodNovember", + "allDatesInPeriodDecember": "allDatesInPeriodDecember", + } + Excel.DateFilterCondition = DateFilterCondition; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var DateTimeDataValidation = (function() { + function DateTimeDataValidation() { + /// Represents the date data validation criteria. [Api set: ExcelApi 1.8] + /// Specifies the right-hand operand when the operator property is set to a binary operator such as GreaterThan (the left-hand operand is the value the user tries to enter in the cell). With the ternary operators Between and NotBetween, specifies the lower bound operand. 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] + /// With the ternary operators Between and NotBetween, specifies the upper bound operand. Is not used with the binary operators, such as GreaterThan. 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] + /// The operator to use for validating the data. [Api set: ExcelApi 1.8] + } + return DateTimeDataValidation; + })(); + Interfaces.DateTimeDataValidation.__proto__ = null; + Interfaces.DateTimeDataValidation = DateTimeDataValidation; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var DatetimeFormatInfo = (function(_super) { + __extends(DatetimeFormatInfo, _super); + function DatetimeFormatInfo() { + /// Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. [Api set: ExcelApi 1.12] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the string used as the date separator. This is based on current system settings. [Api set: ExcelApi 1.12] + /// Gets the format string for a long date value. This is based on current system settings. [Api set: ExcelApi 1.12] + /// Gets the format string for a long time value. This is based on current system settings. [Api set: ExcelApi 1.12] + /// Gets the format string for a short date value. This is based on current system settings. [Api set: ExcelApi 1.12] + /// Gets the string used as the time separator. This is based on current system settings. [Api set: ExcelApi 1.12] + } + + DatetimeFormatInfo.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return DatetimeFormatInfo; + })(OfficeExtension.ClientObject); + Excel.DatetimeFormatInfo = DatetimeFormatInfo; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var DeleteShiftDirection = { + __proto__: null, + "up": "up", + "left": "left", + } + Excel.DeleteShiftDirection = DeleteShiftDirection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var DocumentProperties = (function(_super) { + __extends(DocumentProperties, _super); + function DocumentProperties() { + /// Represents workbook properties. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The author of the workbook. [Api set: ExcelApi 1.7] + /// The category of the workbook. [Api set: ExcelApi 1.7] + /// The comments of the workbook. [Api set: ExcelApi 1.7] + /// The company of the workbook. [Api set: ExcelApi 1.7] + /// Gets the creation date of the workbook. [Api set: ExcelApi 1.7] + /// Gets the collection of custom properties of the workbook. [Api set: ExcelApi 1.7] + /// The keywords of the workbook. [Api set: ExcelApi 1.7] + /// Gets the last author of the workbook. [Api set: ExcelApi 1.7] + /// The manager of the workbook. [Api set: ExcelApi 1.7] + /// Gets the revision number of the workbook. [Api set: ExcelApi 1.7] + /// The subject of the workbook. [Api set: ExcelApi 1.7] + /// The title of the workbook. [Api set: ExcelApi 1.7] + } + + DocumentProperties.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + DocumentProperties.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.DocumentPropertiesUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing DocumentProperties object, with properties that have already been loaded and synced. + /// + } + + return DocumentProperties; + })(OfficeExtension.ClientObject); + Excel.DocumentProperties = DocumentProperties; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var DocumentPropertyItem = { + __proto__: null, + "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", + } + Excel.DocumentPropertyItem = DocumentPropertyItem; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var DocumentPropertyType = { + __proto__: null, + "number": "number", + "boolean": "boolean", + "date": "date", + "string": "string", + "float": "float", + } + Excel.DocumentPropertyType = DocumentPropertyType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var DocumentTask = (function(_super) { + __extends(DocumentTask, _super); + function DocumentTask() { + /// Represents a task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns a collection of assignees of the task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the change records of the task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the comment associated with the task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the most recent user to have completed the task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the date and time that the task was completed. All dates are in UTC. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the user who created the task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the date and time that the task was created. All dates are in UTC. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the ID of the task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets or sets the date and time the task should start and is due. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Specifies title of the task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + } + + DocumentTask.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + DocumentTask.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.DocumentTaskUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing DocumentTask object, with properties that have already been loaded and synced. + /// + } + DocumentTask.prototype.assign = function(assignee) { + /// + /// Adds the given user to the list of assignees attached to the task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The identity of the user to add to the assignee list. + /// + } + DocumentTask.prototype.unassign = function(assignee) { + /// + /// Removes the given user from the list of assignees attached to the task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The identity of the user to remove from the assignee list. + /// + } + DocumentTask.prototype.unassignAll = function() { + /// + /// Removes all users from the list of assignees attached to the task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + } + + return DocumentTask; + })(OfficeExtension.ClientObject); + Excel.DocumentTask = DocumentTask; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var DocumentTaskChange = (function(_super) { + __extends(DocumentTaskChange, _super); + function DocumentTaskChange() { + /// Represents a recorded change to the task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the user assigned to the task for an `assign` change action, or the user unassigned from the task for an `unassign` change action. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the identity of the user who made the task change. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the ID of the comment or commentReply to which the task change is anchored. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents creation date and time of the task change record. All dates are in UTC. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the task's due date and time. It is used for the `setSchedule` change action. It is in UTC time zone.It can be set to `null` to remove the due date and time. It should be set together with `startDateTime` to avoid conflicts. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The unique GUID of the task change. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the task's completion percentage. It is used for the `setPercentComplete` change action. This is a value betwen 0 and 100, where 100 represents a completed task.Changing this value to 100 also completes the associated comment.Changing the completion from 100 to a lower value reactivates the associated comment. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the task's priority. It is used for the `setPriority` change action. This is a value between 0 and 10, with 5 being the default priority if not set, and where 0 represents the highest priority. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the task's start date and time. It is used for the `setSchedule` change action. It is in UTC time zone.It can be set to `null` to remove the start date and time. It should be set together with `dueDateTime` to avoid conflicts. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the task's title. It is used for `setTitle` change action. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the action type of the task change record. Some examples of action types are assign, undo, and setPriority. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the `DocumentTaskChange.id` property that was undone for the `undo` change action. [Api set: ExcelApi BETA (PREVIEW ONLY)] + } + + DocumentTaskChange.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return DocumentTaskChange; + })(OfficeExtension.ClientObject); + Excel.DocumentTaskChange = DocumentTaskChange; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the type of change recorded in the task change record. [Api set: ExcelApi BETA (PREVIEW ONLY)] + var DocumentTaskChangeAction = { + __proto__: null, + "unknown": "unknown", + "create": "create", + "assign": "assign", + "unassign": "unassign", + "unassignAll": "unassignAll", + "setSchedule": "setSchedule", + "setPercentComplete": "setPercentComplete", + "setPriority": "setPriority", + "remove": "remove", + "restore": "restore", + "setTitle": "setTitle", + "undo": "undo", + } + Excel.DocumentTaskChangeAction = DocumentTaskChangeAction; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var DocumentTaskChangeCollection = (function(_super) { + __extends(DocumentTaskChangeCollection, _super); + function DocumentTaskChangeCollection() { + /// Represents a collection of change records for a task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + DocumentTaskChangeCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + DocumentTaskChangeCollection.prototype.getCount = function() { + /// + /// Gets the number of change records in the collection for the task. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + DocumentTaskChangeCollection.prototype.getItemAt = function(index) { + /// + /// Gets a task change record by using its index in the collection. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The records are stored in chronological order from when the changes were recorded by Excel and are not necessarily ordered by `CreatedDateTime`. The `create` record is always at index 0. + /// The change record with the given index. + } + + return DocumentTaskChangeCollection; + })(OfficeExtension.ClientObject); + Excel.DocumentTaskChangeCollection = DocumentTaskChangeCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var DocumentTaskChangeProperties = (function() { + function DocumentTaskChangeProperties() { + /// Represents a recorded change to the task, to be used as an input parameter. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the user assigned to the task for an `assign` change action, or the user unassigned from the task for an `unassign` change action. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the identity of the user who made the task change. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the ID of the `comment` or `commentReply` to which the task change is anchored. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the creation date and time of the task change record. All dates are in UTC. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the task's due date and time. It is used for the `setSchedule` change action. It is in UTC time zone.It can be set to `null` to remove the due date and time. It should be set together with `startDateTime` to avoid conflicts. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The unique GUID of the task change. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the task's completion percentage. It is used for the `setPercentComplete` change action. This is a value betwen 0 and 100, where 100 represents a completed task.Changing this value to 100 also completes the associated comment.Changing the completion from 100 to a lower value reactivates the associated comment. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the task's priority. It is used for the `setPriority` change action. This is a value between 0 and 10, with 5 being the default priority if not set, and where 0 represents the highest priority. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the task's start date and time. It is used for the `setSchedule` change action. It is in UTC time zone.It can be set to `null` to remove the start date and time. It should be set together with `dueDateTime` to avoid conflicts. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the task's title. It is used for the `setTitle` change action. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the action type of the task change record. Some examples of action types are assign, undo, and setPriority. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the `DocumentTaskChange.id` property that was undone for the `undo` change action. [Api set: ExcelApi BETA (PREVIEW ONLY)] + } + return DocumentTaskChangeProperties; + })(); + Interfaces.DocumentTaskChangeProperties.__proto__ = null; + Interfaces.DocumentTaskChangeProperties = DocumentTaskChangeProperties; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var DocumentTaskCollection = (function(_super) { + __extends(DocumentTaskCollection, _super); + function DocumentTaskCollection() { + /// Represents a collection of tasks. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + DocumentTaskCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + DocumentTaskCollection.prototype.getCount = function() { + /// + /// Gets the number of tasks in the collection. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + DocumentTaskCollection.prototype.getItem = function(key) { + /// + /// Gets a task using its ID. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The ID of the task. + /// The task with the given ID. If there is no task with the given ID, then an `ItemNotFound` exception is thrown. + } + DocumentTaskCollection.prototype.getItemAt = function(index) { + /// + /// Gets a task by its index in the collection. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The index of the task in the collection. + /// The task with the given index. + } + DocumentTaskCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a task using its ID. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The ID of the task. + /// The task with the given ID. If there is no task with the given ID, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + } + + return DocumentTaskCollection; + })(OfficeExtension.ClientObject); + Excel.DocumentTaskCollection = DocumentTaskCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var DocumentTaskSchedule = (function() { + function DocumentTaskSchedule() { + /// Represents information about a task's schedule. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the date and time that the task is due. All dates are in UTC. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the date and time that the task should start. All dates are in UTC. [Api set: ExcelApi BETA (PREVIEW ONLY)] + } + return DocumentTaskSchedule; + })(); + Interfaces.DocumentTaskSchedule.__proto__ = null; + Interfaces.DocumentTaskSchedule = DocumentTaskSchedule; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.2] + var DynamicFilterCriteria = { + __proto__: null, + "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", + } + Excel.DynamicFilterCriteria = DynamicFilterCriteria; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var EmailIdentity = (function() { + function EmailIdentity() { + /// Represents information about a user's identity. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the user's display name. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the user's email. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the user's unique ID. [Api set: ExcelApi BETA (PREVIEW ONLY)] + } + return EmailIdentity; + })(); + Interfaces.EmailIdentity.__proto__ = null; + Interfaces.EmailIdentity = EmailIdentity; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var EventSource = { + __proto__: null, + "local": "local", + "remote": "remote", + } + Excel.EventSource = EventSource; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.14] + var EventTriggerSource = { + __proto__: null, + "unknown": "unknown", + "thisLocalAddin": "thisLocalAddin", + } + Excel.EventTriggerSource = EventTriggerSource; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var EventType = { + __proto__: null, + "worksheetChanged": "worksheetChanged", + "worksheetSelectionChanged": "worksheetSelectionChanged", + "worksheetAdded": "worksheetAdded", + "worksheetActivated": "worksheetActivated", + "worksheetDeactivated": "worksheetDeactivated", + "tableChanged": "tableChanged", + "tableSelectionChanged": "tableSelectionChanged", + "worksheetDeleted": "worksheetDeleted", + "chartAdded": "chartAdded", + "chartActivated": "chartActivated", + "chartDeactivated": "chartDeactivated", + "chartDeleted": "chartDeleted", + "worksheetCalculated": "worksheetCalculated", + "visualSelectionChanged": "visualSelectionChanged", + "agaveVisualUpdate": "agaveVisualUpdate", + "tableAdded": "tableAdded", + "tableDeleted": "tableDeleted", + "tableFiltered": "tableFiltered", + "worksheetFiltered": "worksheetFiltered", + "shapeActivated": "shapeActivated", + "shapeDeactivated": "shapeDeactivated", + "visualChange": "visualChange", + "workbookAutoSaveSettingChanged": "workbookAutoSaveSettingChanged", + "worksheetFormatChanged": "worksheetFormatChanged", + "wacoperationEvent": "wacoperationEvent", + "ribbonCommandExecuted": "ribbonCommandExecuted", + "worksheetRowSorted": "worksheetRowSorted", + "worksheetColumnSorted": "worksheetColumnSorted", + "worksheetSingleClicked": "worksheetSingleClicked", + "worksheetRowHiddenChanged": "worksheetRowHiddenChanged", + "recordingStateChangedEvent": "recordingStateChangedEvent", + "commentAdded": "commentAdded", + "commentDeleted": "commentDeleted", + "commentChanged": "commentChanged", + "linkedDataTypeRefreshRequestCompleted": "linkedDataTypeRefreshRequestCompleted", + "linkedDataTypeRefreshModeChanged": "linkedDataTypeRefreshModeChanged", + "linkedDataTypeLinkedDataTypeAdded": "linkedDataTypeLinkedDataTypeAdded", + "worksheetFormulaChanged": "worksheetFormulaChanged", + "workbookActivated": "workbookActivated", + "linkedWorkbookWorkbookLinksChanged": "linkedWorkbookWorkbookLinksChanged", + "linkedWorkbookRefreshCompleted": "linkedWorkbookRefreshCompleted", + "worksheetProtectionChanged": "worksheetProtectionChanged", + "worksheetNameChanged": "worksheetNameChanged", + "worksheetVisibilityChanged": "worksheetVisibilityChanged", + "worksheetMoved": "worksheetMoved", + "lineageActivityUpdateAvailable": "lineageActivityUpdateAvailable", + "lineageActivityFilterUpdated": "lineageActivityFilterUpdated", + "lineageActivityLoadCompleted": "lineageActivityLoadCompleted", + "shapeAdded": "shapeAdded", + "shapeDeleted": "shapeDeleted", + "pivotTableAdded": "pivotTableAdded", + "pivotTableDeleted": "pivotTableDeleted", + "namedItemAdded": "namedItemAdded", + "namedItemDeleted": "namedItemDeleted", + "worksheetNavigationObjectChanged": "worksheetNavigationObjectChanged", + "workbookNavigationObjectChanged": "workbookNavigationObjectChanged", + "worksheetRowHeightChanged": "worksheetRowHeightChanged", + "workbookFormulaReferenceStyleChanged": "workbookFormulaReferenceStyleChanged", + "guidedReapplyManagerUpdateAvailable": "guidedReapplyManagerUpdateAvailable", + "vbaRecorderRecordingChanged": "vbaRecorderRecordingChanged", + "rangeValuesPreviewDismissed": "rangeValuesPreviewDismissed", + "annotationAdded": "annotationAdded", + } + Excel.EventType = EventType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var FillPattern = { + __proto__: null, + "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", + } + Excel.FillPattern = FillPattern; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Filter = (function(_super) { + __extends(Filter, _super); + function Filter() { + /// Manages the filtering of a table's column. [Api set: ExcelApi 1.2] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The currently applied filter on the given column. [Api set: ExcelApi 1.2] + } + + Filter.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + Filter.prototype.apply = function(criteria) { + /// + /// Apply the given filter criteria on the given column. [Api set: ExcelApi 1.2] + /// + /// The criteria to apply. + /// + } + Filter.prototype.applyBottomItemsFilter = function(count) { + /// + /// Apply a "Bottom Item" filter to the column for the given number of elements. [Api set: ExcelApi 1.2] + /// + /// The number of elements from the bottom to show. + /// + } + Filter.prototype.applyBottomPercentFilter = function(percent) { + /// + /// Apply a "Bottom Percent" filter to the column for the given percentage of elements. [Api set: ExcelApi 1.2] + /// + /// The percentage of elements from the bottom to show. + /// + } + Filter.prototype.applyCellColorFilter = function(color) { + /// + /// Apply a "Cell Color" filter to the column for the given color. [Api set: ExcelApi 1.2] + /// + /// The background color of the cells to show. + /// + } + Filter.prototype.applyCustomFilter = function(criteria1, criteria2, oper) { + /// + /// Apply an "Icon" filter to the column for the given criteria strings. [Api set: ExcelApi 1.2] + /// + /// The first criteria string. + /// Optional. The second criteria string. + /// Optional. The operator that describes how the two criteria are joined. + /// + } + Filter.prototype.applyDynamicFilter = function(criteria) { + /// + /// Apply a "Dynamic" filter to the column. [Api set: ExcelApi 1.2] + /// + /// The dynamic criteria to apply. + /// + } + Filter.prototype.applyFontColorFilter = function(color) { + /// + /// Apply a "Font Color" filter to the column for the given color. [Api set: ExcelApi 1.2] + /// + /// The font color of the cells to show. + /// + } + Filter.prototype.applyIconFilter = function(icon) { + /// + /// Apply an "Icon" filter to the column for the given icon. [Api set: ExcelApi 1.2] + /// + /// The icons of the cells to show. + /// + } + Filter.prototype.applyTopItemsFilter = function(count) { + /// + /// Apply a "Top Item" filter to the column for the given number of elements. [Api set: ExcelApi 1.2] + /// + /// The number of elements from the top to show. + /// + } + Filter.prototype.applyTopPercentFilter = function(percent) { + /// + /// Apply a "Top Percent" filter to the column for the given percentage of elements. [Api set: ExcelApi 1.2] + /// + /// The percentage of elements from the top to show. + /// + } + Filter.prototype.applyValuesFilter = function(values) { + /// + /// Apply a "Values" filter to the column for the given values. [Api set: ExcelApi 1.2] + /// + /// The list of values to show. This must be an array of strings or an array of `Excel.FilterDateTime` objects. + /// + } + Filter.prototype.clear = function() { + /// + /// Clear the filter on the given column. [Api set: ExcelApi 1.2] + /// + /// + } + + return Filter; + })(OfficeExtension.ClientObject); + Excel.Filter = Filter; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var FilterCriteria = (function() { + function FilterCriteria() { + /// Represents the filtering criteria applied to a column. [Api set: ExcelApi 1.2] + /// The HTML color string used to filter cells. Used with `cellColor` and `fontColor` filtering. [Api set: ExcelApi 1.2] + /// The first criterion used to filter data. Used as an operator in the case of `custom` filtering. For example ">50" for numbers 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] + /// The second criterion used to filter data. Only used as an operator in the case of `custom` filtering. [Api set: ExcelApi 1.2] + /// The dynamic criteria from the `Excel.DynamicFilterCriteria` set to apply on this column. Used with `dynamic` filtering. [Api set: ExcelApi 1.2] + /// The property used by the filter to determine whether the values should stay visible. [Api set: ExcelApi 1.2] + /// The icon used to filter cells. Used with `icon` filtering. [Api set: ExcelApi 1.2] + /// The operator used to combine criterion 1 and 2 when using `custom` filtering. [Api set: ExcelApi 1.2] + /// The property used by the filter to do a rich filter on rich values. [Api set: ExcelApi 1.9] + /// The set of values to be used as part of `values` filtering. [Api set: ExcelApi 1.2] + } + return FilterCriteria; + })(); + Interfaces.FilterCriteria.__proto__ = null; + Interfaces.FilterCriteria = FilterCriteria; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var FilterDatetime = (function() { + function FilterDatetime() { + /// Represents how to filter a date when filtering on values. [Api set: ExcelApi 1.2] + /// The date in ISO8601 format used to filter data. [Api set: ExcelApi 1.2] + /// How specific the date should be used to keep data. For example, if the date is 2005-04-02 and the specificity is set to "month", the filter operation will keep all rows with a date in the month of April 2005. [Api set: ExcelApi 1.2] + } + return FilterDatetime; + })(); + Interfaces.FilterDatetime.__proto__ = null; + Interfaces.FilterDatetime = FilterDatetime; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.2] + var FilterDatetimeSpecificity = { + __proto__: null, + "year": "year", + "month": "month", + "day": "day", + "hour": "hour", + "minute": "minute", + "second": "second", + } + Excel.FilterDatetimeSpecificity = FilterDatetimeSpecificity; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.2] + var FilterOn = { + __proto__: null, + "bottomItems": "bottomItems", + "bottomPercent": "bottomPercent", + "cellColor": "cellColor", + "dynamic": "dynamic", + "fontColor": "fontColor", + "values": "values", + "topItems": "topItems", + "topPercent": "topPercent", + "icon": "icon", + "custom": "custom", + } + Excel.FilterOn = FilterOn; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.2] + var FilterOperator = { + __proto__: null, + "and": "and", + "or": "or", + } + Excel.FilterOperator = FilterOperator; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var FilterPivotHierarchy = (function(_super) { + __extends(FilterPivotHierarchy, _super); + function FilterPivotHierarchy() { + /// Represents the Excel FilterPivotHierarchy. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Determines whether to allow multiple filter items. [Api set: ExcelApi 1.8] + /// Returns the PivotFields associated with the FilterPivotHierarchy. [Api set: ExcelApi 1.8] + /// ID of the FilterPivotHierarchy. [Api set: ExcelApi 1.8] + /// Name of the FilterPivotHierarchy. [Api set: ExcelApi 1.8] + /// Position of the FilterPivotHierarchy. [Api set: ExcelApi 1.8] + } + + FilterPivotHierarchy.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + FilterPivotHierarchy.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.FilterPivotHierarchyUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing FilterPivotHierarchy object, with properties that have already been loaded and synced. + /// + } + FilterPivotHierarchy.prototype.setToDefault = function() { + /// + /// Reset the FilterPivotHierarchy back to its default values. [Api set: ExcelApi 1.8] + /// + /// + } + + return FilterPivotHierarchy; + })(OfficeExtension.ClientObject); + Excel.FilterPivotHierarchy = FilterPivotHierarchy; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var FilterPivotHierarchyCollection = (function(_super) { + __extends(FilterPivotHierarchyCollection, _super); + function FilterPivotHierarchyCollection() { + /// Represents a collection of FilterPivotHierarchy items associated with the PivotTable. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + FilterPivotHierarchyCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + FilterPivotHierarchyCollection.prototype.add = function(pivotHierarchy) { + /// + /// 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] + /// + /// + } + FilterPivotHierarchyCollection.prototype.getCount = function() { + /// + /// Gets the number of pivot hierarchies in the collection. [Api set: ExcelApi 1.8] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + FilterPivotHierarchyCollection.prototype.getItem = function(name) { + /// + /// Gets a FilterPivotHierarchy by its name or ID. [Api set: ExcelApi 1.8] + /// + /// Name of the FilterPivotHierarchy to be retrieved. + /// + } + FilterPivotHierarchyCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a FilterPivotHierarchy by name. If the FilterPivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.8] + /// + /// Name of the FilterPivotHierarchy to be retrieved. + /// + } + FilterPivotHierarchyCollection.prototype.remove = function(filterPivotHierarchy) { + /// + /// Removes the PivotHierarchy from the current axis. [Api set: ExcelApi 1.8] + /// + /// + } + + return FilterPivotHierarchyCollection; + })(OfficeExtension.ClientObject); + Excel.FilterPivotHierarchyCollection = FilterPivotHierarchyCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var FormatProtection = (function(_super) { + __extends(FormatProtection, _super); + function FormatProtection() { + /// Represents the format protection of a range object. [Api set: ExcelApi 1.2] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. [Api set: ExcelApi 1.2] + /// Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. [Api set: ExcelApi 1.2] + } + + FormatProtection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + FormatProtection.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.FormatProtectionUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing FormatProtection object, with properties that have already been loaded and synced. + /// + } + + return FormatProtection; + })(OfficeExtension.ClientObject); + Excel.FormatProtection = FormatProtection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var FormulaChangedEventDetail = (function() { + function FormulaChangedEventDetail() { + /// Provides information about a changed formula during a formula changed event. [Api set: ExcelApi 1.13] + /// The address of the cell that contains the changed formula. [Api set: ExcelApi 1.13] + /// Represents the previous formula, before it was changed. [Api set: ExcelApi 1.13] + } + return FormulaChangedEventDetail; + })(); + Interfaces.FormulaChangedEventDetail.__proto__ = null; + Interfaces.FormulaChangedEventDetail = FormulaChangedEventDetail; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var FunctionResult = (function(_super) { + __extends(FunctionResult, _super); + function FunctionResult() { + /// An object containing the result of a function-evaluation operation [Api set: ExcelApi 1.2] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// 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] + /// 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] + } + + FunctionResult.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return FunctionResult; + })(OfficeExtension.ClientObject); + Excel.FunctionResult = FunctionResult; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Functions = (function(_super) { + __extends(Functions, _super); + function Functions() { + /// An object for evaluating Excel functions. [Api set: ExcelApi 1.2] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + } + + Functions.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + Functions.prototype.abs = function(number) { + /// + /// Returns the absolute value of a number, a number without its sign. [Api set: ExcelApi 1.2] + /// + /// Is the real number for which you want the absolute value. + /// + } + Functions.prototype.accrInt = function(issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod) { + /// + /// Returns the accrued interest for a security that pays periodic interest. [Api set: ExcelApi 1.2] + /// + /// Is the security's issue date, expressed as a serial date number. + /// Is the security's first interest date, expressed as a serial date number. + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's annual coupon rate. + /// Is the security's par value. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// Is a logical value: to accrued interest from issue date = TRUE or omitted; to calculate from last coupon payment date = FALSE. + /// + } + Functions.prototype.accrIntM = function(issue, settlement, rate, par, basis) { + /// + /// Returns the accrued interest for a security that pays interest at maturity. [Api set: ExcelApi 1.2] + /// + /// Is the security's issue date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's annual coupon rate. + /// Is the security's par value. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.acos = function(number) { + /// + /// 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] + /// + /// Is the cosine of the angle you want and must be from -1 to 1. + /// + } + Functions.prototype.acosh = function(number) { + /// + /// Returns the inverse hyperbolic cosine of a number. [Api set: ExcelApi 1.2] + /// + /// Is any real number equal to or greater than 1. + /// + } + Functions.prototype.acot = function(number) { + /// + /// Returns the arccotangent of a number, in radians in the range 0 to Pi. [Api set: ExcelApi 1.2] + /// + /// Is the cotangent of the angle you want. + /// + } + Functions.prototype.acoth = function(number) { + /// + /// Returns the inverse hyperbolic cotangent of a number. [Api set: ExcelApi 1.2] + /// + /// Is the hyperbolic cotangent of the angle that you want. + /// + } + Functions.prototype.amorDegrc = function(cost, datePurchased, firstPeriod, salvage, period, rate, basis) { + /// + /// Returns the prorated linear depreciation of an asset for each accounting period. [Api set: ExcelApi 1.2] + /// + /// Is the cost of the asset. + /// Is the date the asset is purchased. + /// Is the date of the end of the first period. + /// Is the salvage value at the end of life of the asset. + /// Is the period. + /// Is the rate of depreciation. + /// Year_basis : 0 for year of 360 days, 1 for actual, 3 for year of 365 days. + /// + } + Functions.prototype.amorLinc = function(cost, datePurchased, firstPeriod, salvage, period, rate, basis) { + /// + /// Returns the prorated linear depreciation of an asset for each accounting period. [Api set: ExcelApi 1.2] + /// + /// Is the cost of the asset. + /// Is the date the asset is purchased. + /// Is the date of the end of the first period. + /// Is the salvage value at the end of life of the asset. + /// Is the period. + /// Is the rate of depreciation. + /// Year_basis : 0 for year of 360 days, 1 for actual, 3 for year of 365 days. + /// + } + Functions.prototype.and = function(values) { + /// + /// Checks whether all arguments are TRUE, and returns TRUE if all arguments are TRUE. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.arabic = function(text) { + /// + /// Converts a Roman numeral to Arabic. [Api set: ExcelApi 1.2] + /// + /// Is the Roman numeral you want to convert. + /// + } + Functions.prototype.areas = function(reference) { + /// + /// 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] + /// + /// Is a reference to a cell or range of cells and can refer to multiple areas. + /// + } + Functions.prototype.asc = function(text) { + /// + /// Changes full-width (double-byte) characters to half-width (single-byte) characters. Use with double-byte character sets (DBCS). [Api set: ExcelApi 1.2] + /// + /// Is a text, or a reference to a cell containing a text. + /// + } + Functions.prototype.asin = function(number) { + /// + /// Returns the arcsine of a number in radians, in the range -Pi/2 to Pi/2. [Api set: ExcelApi 1.2] + /// + /// Is the sine of the angle you want and must be from -1 to 1. + /// + } + Functions.prototype.asinh = function(number) { + /// + /// Returns the inverse hyperbolic sine of a number. [Api set: ExcelApi 1.2] + /// + /// Is any real number equal to or greater than 1. + /// + } + Functions.prototype.atan = function(number) { + /// + /// Returns the arctangent of a number in radians, in the range -Pi/2 to Pi/2. [Api set: ExcelApi 1.2] + /// + /// Is the tangent of the angle you want. + /// + } + Functions.prototype.atan2 = function(xNum, yNum) { + /// + /// Returns the arctangent of the specified x- and y- coordinates, in radians between -Pi and Pi, excluding -Pi. [Api set: ExcelApi 1.2] + /// + /// Is the x-coordinate of the point. + /// Is the y-coordinate of the point. + /// + } + Functions.prototype.atanh = function(number) { + /// + /// Returns the inverse hyperbolic tangent of a number. [Api set: ExcelApi 1.2] + /// + /// Is any real number between -1 and 1 excluding -1 and 1. + /// + } + Functions.prototype.aveDev = function(values) { + /// + /// 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] + /// + /// List of parameters, whose elements are 1 to 255 arguments for which you want the average of the absolute deviations. + /// + } + Functions.prototype.average = function(values) { + /// + /// 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] + /// + /// List of parameters, whose elements are 1 to 255 numeric arguments for which you want the average. + /// + } + Functions.prototype.averageA = function(values) { + /// + /// 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] + /// + /// List of parameters, whose elements are 1 to 255 arguments for which you want the average. + /// + } + Functions.prototype.averageIf = function(range, criteria, averageRange) { + /// + /// Finds average(arithmetic mean) for the cells specified by a given condition or criteria. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells you want evaluated. + /// 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. + /// Are the actual cells to be used to find the average. If omitted, the cells in range are used. + /// + } + Functions.prototype.averageIfs = function(averageRange, values) { + /// + /// Finds average(arithmetic mean) for the cells specified by a given set of conditions or criteria. [Api set: ExcelApi 1.2] + /// + /// Are the actual cells to be used to find the average. + /// 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. + /// + } + Functions.prototype.bahtText = function(number) { + /// + /// Converts a number to text (baht). [Api set: ExcelApi 1.2] + /// + /// Is a number that you want to convert. + /// + } + Functions.prototype.base = function(number, radix, minLength) { + /// + /// Converts a number into a text representation with the given radix (base). [Api set: ExcelApi 1.2] + /// + /// Is the number that you want to convert. + /// Is the base Radix that you want to convert the number into. + /// Is the minimum length of the returned string. If omitted leading zeros are not added. + /// + } + Functions.prototype.besselI = function(x, n) { + /// + /// Returns the modified Bessel function In(x). [Api set: ExcelApi 1.2] + /// + /// Is the value at which to evaluate the function. + /// Is the order of the Bessel function. + /// + } + Functions.prototype.besselJ = function(x, n) { + /// + /// Returns the Bessel function Jn(x). [Api set: ExcelApi 1.2] + /// + /// Is the value at which to evaluate the function. + /// Is the order of the Bessel function. + /// + } + Functions.prototype.besselK = function(x, n) { + /// + /// Returns the modified Bessel function Kn(x). [Api set: ExcelApi 1.2] + /// + /// Is the value at which to evaluate the function. + /// Is the order of the function. + /// + } + Functions.prototype.besselY = function(x, n) { + /// + /// Returns the Bessel function Yn(x). [Api set: ExcelApi 1.2] + /// + /// Is the value at which to evaluate the function. + /// Is the order of the function. + /// + } + Functions.prototype.beta_Dist = function(x, alpha, beta, cumulative, A, B) { + /// + /// Returns the beta probability distribution function. [Api set: ExcelApi 1.2] + /// + /// Is the value between A and B at which to evaluate the function. + /// Is a parameter to the distribution and must be greater than 0. + /// Is a parameter to the distribution and must be greater than 0. + /// Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. + /// Is an optional lower bound to the interval of x. If omitted, A = 0. + /// Is an optional upper bound to the interval of x. If omitted, B = 1. + /// + } + Functions.prototype.beta_Inv = function(probability, alpha, beta, A, B) { + /// + /// Returns the inverse of the cumulative beta probability density function (BETA.DIST). [Api set: ExcelApi 1.2] + /// + /// Is a probability associated with the beta distribution. + /// Is a parameter to the distribution and must be greater than 0. + /// Is a parameter to the distribution and must be greater than 0. + /// Is an optional lower bound to the interval of x. If omitted, A = 0. + /// Is an optional upper bound to the interval of x. If omitted, B = 1. + /// + } + Functions.prototype.bin2Dec = function(number) { + /// + /// Converts a binary number to decimal. [Api set: ExcelApi 1.2] + /// + /// Is the binary number you want to convert. + /// + } + Functions.prototype.bin2Hex = function(number, places) { + /// + /// Converts a binary number to hexadecimal. [Api set: ExcelApi 1.2] + /// + /// Is the binary number you want to convert. + /// Is the number of characters to use. + /// + } + Functions.prototype.bin2Oct = function(number, places) { + /// + /// Converts a binary number to octal. [Api set: ExcelApi 1.2] + /// + /// Is the binary number you want to convert. + /// Is the number of characters to use. + /// + } + Functions.prototype.binom_Dist = function(numberS, trials, probabilityS, cumulative) { + /// + /// Returns the individual term binomial distribution probability. [Api set: ExcelApi 1.2] + /// + /// Is the number of successes in trials. + /// Is the number of independent trials. + /// Is the probability of success on each trial. + /// Is a logical value: for the cumulative distribution function, use TRUE; for the probability mass function, use FALSE. + /// + } + Functions.prototype.binom_Dist_Range = function(trials, probabilityS, numberS, numberS2) { + /// + /// Returns the probability of a trial result using a binomial distribution. [Api set: ExcelApi 1.2] + /// + /// Is the number of independent trials. + /// Is the probability of success on each trial. + /// Is the number of successes in trials. + /// If provided this function returns the probability that the number of successful trials shall lie between numberS and numberS2. + /// + } + Functions.prototype.binom_Inv = function(trials, probabilityS, alpha) { + /// + /// Returns the smallest value for which the cumulative binomial distribution is greater than or equal to a criterion value. [Api set: ExcelApi 1.2] + /// + /// Is the number of Bernoulli trials. + /// Is the probability of success on each trial, a number between 0 and 1 inclusive. + /// Is the criterion value, a number between 0 and 1 inclusive. + /// + } + Functions.prototype.bitand = function(number1, number2) { + /// + /// Returns a bitwise 'And' of two numbers. [Api set: ExcelApi 1.2] + /// + /// Is the decimal representation of the binary number you want to evaluate. + /// Is the decimal representation of the binary number you want to evaluate. + /// + } + Functions.prototype.bitlshift = function(number, shiftAmount) { + /// + /// Returns a number shifted left by shift_amount bits. [Api set: ExcelApi 1.2] + /// + /// Is the decimal representation of the binary number you want to evaluate. + /// Is the number of bits that you want to shift Number left by. + /// + } + Functions.prototype.bitor = function(number1, number2) { + /// + /// Returns a bitwise 'Or' of two numbers. [Api set: ExcelApi 1.2] + /// + /// Is the decimal representation of the binary number you want to evaluate. + /// Is the decimal representation of the binary number you want to evaluate. + /// + } + Functions.prototype.bitrshift = function(number, shiftAmount) { + /// + /// Returns a number shifted right by shift_amount bits. [Api set: ExcelApi 1.2] + /// + /// Is the decimal representation of the binary number you want to evaluate. + /// Is the number of bits that you want to shift Number right by. + /// + } + Functions.prototype.bitxor = function(number1, number2) { + /// + /// Returns a bitwise 'Exclusive Or' of two numbers. [Api set: ExcelApi 1.2] + /// + /// Is the decimal representation of the binary number you want to evaluate. + /// Is the decimal representation of the binary number you want to evaluate. + /// + } + Functions.prototype.ceiling_Math = function(number, significance, mode) { + /// + /// Rounds a number up, to the nearest integer or to the nearest multiple of significance. [Api set: ExcelApi 1.2] + /// + /// Is the value you want to round. + /// Is the multiple to which you want to round. + /// When given and nonzero this function will round away from zero. + /// + } + Functions.prototype.ceiling_Precise = function(number, significance) { + /// + /// Rounds a number up, to the nearest integer or to the nearest multiple of significance. [Api set: ExcelApi 1.2] + /// + /// Is the value you want to round. + /// Is the multiple to which you want to round. + /// + } + Functions.prototype.char = function(number) { + /// + /// Returns the character specified by the code number from the character set for your computer. [Api set: ExcelApi 1.2] + /// + /// Is a number between 1 and 255 specifying which character you want. + /// + } + Functions.prototype.chiSq_Dist = function(x, degFreedom, cumulative) { + /// + /// Returns the left-tailed probability of the chi-squared distribution. [Api set: ExcelApi 1.2] + /// + /// Is the value at which you want to evaluate the distribution, a nonnegative number. + /// Is the number of degrees of freedom, a number between 1 and 10^10, excluding 10^10. + /// Is a logical value for the function to return: the cumulative distribution function = TRUE; the probability density function = FALSE. + /// + } + Functions.prototype.chiSq_Dist_RT = function(x, degFreedom) { + /// + /// Returns the right-tailed probability of the chi-squared distribution. [Api set: ExcelApi 1.2] + /// + /// Is the value at which you want to evaluate the distribution, a nonnegative number. + /// Is the number of degrees of freedom, a number between 1 and 10^10, excluding 10^10. + /// + } + Functions.prototype.chiSq_Inv = function(probability, degFreedom) { + /// + /// Returns the inverse of the left-tailed probability of the chi-squared distribution. [Api set: ExcelApi 1.2] + /// + /// Is a probability associated with the chi-squared distribution, a value between 0 and 1 inclusive. + /// Is the number of degrees of freedom, a number between 1 and 10^10, excluding 10^10. + /// + } + Functions.prototype.chiSq_Inv_RT = function(probability, degFreedom) { + /// + /// Returns the inverse of the right-tailed probability of the chi-squared distribution. [Api set: ExcelApi 1.2] + /// + /// Is a probability associated with the chi-squared distribution, a value between 0 and 1 inclusive. + /// Is the number of degrees of freedom, a number between 1 and 10^10, excluding 10^10. + /// + } + Functions.prototype.choose = function(indexNum, values) { + /// + /// Chooses a value or action to perform from a list of values, based on an index number. [Api set: ExcelApi 1.2] + /// + /// 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. + /// List of parameters, whose elements are 1 to 254 numbers, cell references, defined names, formulas, functions, or text arguments from which CHOOSE selects. + /// + } + Functions.prototype.clean = function(text) { + /// + /// Removes all nonprintable characters from text. [Api set: ExcelApi 1.2] + /// + /// Is any worksheet information from which you want to remove nonprintable characters. + /// + } + Functions.prototype.code = function(text) { + /// + /// 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] + /// + /// Is the text for which you want the code of the first character. + /// + } + Functions.prototype.columns = function(array) { + /// + /// Returns the number of columns in an array or reference. [Api set: ExcelApi 1.2] + /// + /// Is an array or array formula, or a reference to a range of cells for which you want the number of columns. + /// + } + Functions.prototype.combin = function(number, numberChosen) { + /// + /// Returns the number of combinations for a given number of items. [Api set: ExcelApi 1.2] + /// + /// Is the total number of items. + /// Is the number of items in each combination. + /// + } + Functions.prototype.combina = function(number, numberChosen) { + /// + /// Returns the number of combinations with repetitions for a given number of items. [Api set: ExcelApi 1.2] + /// + /// Is the total number of items. + /// Is the number of items in each combination. + /// + } + Functions.prototype.complex = function(realNum, iNum, suffix) { + /// + /// Converts real and imaginary coefficients into a complex number. [Api set: ExcelApi 1.2] + /// + /// Is the real coefficient of the complex number. + /// Is the imaginary coefficient of the complex number. + /// Is the suffix for the imaginary component of the complex number. + /// + } + Functions.prototype.concatenate = function(values) { + /// + /// Joins several text strings into one text string. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.confidence_Norm = function(alpha, standardDev, size) { + /// + /// Returns the confidence interval for a population mean, using a normal distribution. [Api set: ExcelApi 1.2] + /// + /// Is the significance level used to compute the confidence level, a number greater than 0 and less than 1. + /// Is the population standard deviation for the data range and is assumed to be known. standardDev must be greater than 0. + /// Is the sample size. + /// + } + Functions.prototype.confidence_T = function(alpha, standardDev, size) { + /// + /// Returns the confidence interval for a population mean, using a Student's T distribution. [Api set: ExcelApi 1.2] + /// + /// Is the significance level used to compute the confidence level, a number greater than 0 and less than 1. + /// Is the population standard deviation for the data range and is assumed to be known. standardDev must be greater than 0. + /// Is the sample size. + /// + } + Functions.prototype.convert = function(number, fromUnit, toUnit) { + /// + /// Converts a number from one measurement system to another. [Api set: ExcelApi 1.2] + /// + /// Is the value in from_units to convert. + /// Is the units for number. + /// Is the units for the result. + /// + } + Functions.prototype.cos = function(number) { + /// + /// Returns the cosine of an angle. [Api set: ExcelApi 1.2] + /// + /// Is the angle in radians for which you want the cosine. + /// + } + Functions.prototype.cosh = function(number) { + /// + /// Returns the hyperbolic cosine of a number. [Api set: ExcelApi 1.2] + /// + /// Is any real number. + /// + } + Functions.prototype.cot = function(number) { + /// + /// Returns the cotangent of an angle. [Api set: ExcelApi 1.2] + /// + /// Is the angle in radians for which you want the cotangent. + /// + } + Functions.prototype.coth = function(number) { + /// + /// Returns the hyperbolic cotangent of a number. [Api set: ExcelApi 1.2] + /// + /// Is the angle in radians for which you want the hyperbolic cotangent. + /// + } + Functions.prototype.count = function(values) { + /// + /// Counts the number of cells in a range that contain numbers. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.countA = function(values) { + /// + /// Counts the number of cells in a range that are not empty. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.countBlank = function(range) { + /// + /// Counts the number of empty cells in a specified range of cells. [Api set: ExcelApi 1.2] + /// + /// Is the range from which you want to count the empty cells. + /// + } + Functions.prototype.countIf = function(range, criteria) { + /// + /// Counts the number of cells within a range that meet the given condition. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells from which you want to count nonblank cells. + /// Is the condition in the form of a number, expression, or text that defines which cells will be counted. + /// + } + Functions.prototype.countIfs = function(values) { + /// + /// Counts the number of cells specified by a given set of conditions or criteria. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.coupDayBs = function(settlement, maturity, frequency, basis) { + /// + /// Returns the number of days from the beginning of the coupon period to the settlement date. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.coupDays = function(settlement, maturity, frequency, basis) { + /// + /// Returns the number of days in the coupon period that contains the settlement date. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.coupDaysNc = function(settlement, maturity, frequency, basis) { + /// + /// Returns the number of days from the settlement date to the next coupon date. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.coupNcd = function(settlement, maturity, frequency, basis) { + /// + /// Returns the next coupon date after the settlement date. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.coupNum = function(settlement, maturity, frequency, basis) { + /// + /// Returns the number of coupons payable between the settlement date and maturity date. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.coupPcd = function(settlement, maturity, frequency, basis) { + /// + /// Returns the previous coupon date before the settlement date. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.csc = function(number) { + /// + /// Returns the cosecant of an angle. [Api set: ExcelApi 1.2] + /// + /// Is the angle in radians for which you want the cosecant. + /// + } + Functions.prototype.csch = function(number) { + /// + /// Returns the hyperbolic cosecant of an angle. [Api set: ExcelApi 1.2] + /// + /// Is the angle in radians for which you want the hyperbolic cosecant. + /// + } + Functions.prototype.cumIPmt = function(rate, nper, pv, startPeriod, endPeriod, type) { + /// + /// Returns the cumulative interest paid between two periods. [Api set: ExcelApi 1.2] + /// + /// Is the interest rate. + /// Is the total number of payment periods. + /// Is the present value. + /// Is the first period in the calculation. + /// Is the last period in the calculation. + /// Is the timing of the payment. + /// + } + Functions.prototype.cumPrinc = function(rate, nper, pv, startPeriod, endPeriod, type) { + /// + /// Returns the cumulative principal paid on a loan between two periods. [Api set: ExcelApi 1.2] + /// + /// Is the interest rate. + /// Is the total number of payment periods. + /// Is the present value. + /// Is the first period in the calculation. + /// Is the last period in the calculation. + /// Is the timing of the payment. + /// + } + Functions.prototype.daverage = function(database, field, criteria) { + /// + /// Averages the values in a column in a list or database that match conditions you specify. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells that makes up the list or database. A database is a list of related data. + /// Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + /// 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. + /// + } + Functions.prototype.dcount = function(database, field, criteria) { + /// + /// 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] + /// + /// Is the range of cells that makes up the list or database. A database is a list of related data. + /// Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + /// 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. + /// + } + Functions.prototype.dcountA = function(database, field, criteria) { + /// + /// Counts nonblank cells in the field (column) of records in the database that match the conditions you specify. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells that makes up the list or database. A database is a list of related data. + /// Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + /// 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. + /// + } + Functions.prototype.dget = function(database, field, criteria) { + /// + /// Extracts from a database a single record that matches the conditions you specify. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells that makes up the list or database. A database is a list of related data. + /// Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + /// 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. + /// + } + Functions.prototype.dmax = function(database, field, criteria) { + /// + /// Returns the largest number in the field (column) of records in the database that match the conditions you specify. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells that makes up the list or database. A database is a list of related data. + /// Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + /// 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. + /// + } + Functions.prototype.dmin = function(database, field, criteria) { + /// + /// Returns the smallest number in the field (column) of records in the database that match the conditions you specify. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells that makes up the list or database. A database is a list of related data. + /// Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + /// 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. + /// + } + Functions.prototype.dproduct = function(database, field, criteria) { + /// + /// Multiplies the values in the field (column) of records in the database that match the conditions you specify. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells that makes up the list or database. A database is a list of related data. + /// Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + /// 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. + /// + } + Functions.prototype.dstDev = function(database, field, criteria) { + /// + /// Estimates the standard deviation based on a sample from selected database entries. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells that makes up the list or database. A database is a list of related data. + /// Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + /// 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. + /// + } + Functions.prototype.dstDevP = function(database, field, criteria) { + /// + /// Calculates the standard deviation based on the entire population of selected database entries. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells that makes up the list or database. A database is a list of related data. + /// Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + /// 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. + /// + } + Functions.prototype.dsum = function(database, field, criteria) { + /// + /// Adds the numbers in the field (column) of records in the database that match the conditions you specify. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells that makes up the list or database. A database is a list of related data. + /// Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + /// 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. + /// + } + Functions.prototype.dvar = function(database, field, criteria) { + /// + /// Estimates variance based on a sample from selected database entries. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells that makes up the list or database. A database is a list of related data. + /// Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + /// 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. + /// + } + Functions.prototype.dvarP = function(database, field, criteria) { + /// + /// Calculates variance based on the entire population of selected database entries. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells that makes up the list or database. A database is a list of related data. + /// Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + /// 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. + /// + } + Functions.prototype.date = function(year, month, day) { + /// + /// Returns the number that represents the date in Microsoft Excel date-time code. [Api set: ExcelApi 1.2] + /// + /// Is a number from 1900 or 1904 (depending on the workbook's date system) to 9999. + /// Is a number from 1 to 12 representing the month of the year. + /// Is a number from 1 to 31 representing the day of the month. + /// + } + Functions.prototype.datevalue = function(dateText) { + /// + /// 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] + /// + /// 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. + /// + } + Functions.prototype.day = function(serialNumber) { + /// + /// Returns the day of the month, a number from 1 to 31. [Api set: ExcelApi 1.2] + /// + /// Is a number in the date-time code used by Microsoft Excel. + /// + } + Functions.prototype.days = function(endDate, startDate) { + /// + /// Returns the number of days between the two dates. [Api set: ExcelApi 1.2] + /// + /// startDate and endDate are the two dates between which you want to know the number of days. + /// startDate and endDate are the two dates between which you want to know the number of days. + /// + } + Functions.prototype.days360 = function(startDate, endDate, method) { + /// + /// Returns the number of days between two dates based on a 360-day year (twelve 30-day months). [Api set: ExcelApi 1.2] + /// + /// startDate and endDate are the two dates between which you want to know the number of days. + /// startDate and endDate are the two dates between which you want to know the number of days. + /// Is a logical value specifying the calculation method: U.S. (NASD) = FALSE or omitted; European = TRUE. + /// + } + Functions.prototype.db = function(cost, salvage, life, period, month) { + /// + /// Returns the depreciation of an asset for a specified period using the fixed-declining balance method. [Api set: ExcelApi 1.2] + /// + /// Is the initial cost of the asset. + /// Is the salvage value at the end of the life of the asset. + /// Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). + /// Is the period for which you want to calculate the depreciation. Period must use the same units as Life. + /// Is the number of months in the first year. If month is omitted, it is assumed to be 12. + /// + } + Functions.prototype.dbcs = function(text) { + /// + /// 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] + /// + /// Is a text, or a reference to a cell containing a text. + /// + } + Functions.prototype.ddb = function(cost, salvage, life, period, factor) { + /// + /// 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] + /// + /// Is the initial cost of the asset. + /// Is the salvage value at the end of the life of the asset. + /// Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). + /// Is the period for which you want to calculate the depreciation. Period must use the same units as Life. + /// Is the rate at which the balance declines. If Factor is omitted, it is assumed to be 2 (the double-declining balance method). + /// + } + Functions.prototype.dec2Bin = function(number, places) { + /// + /// Converts a decimal number to binary. [Api set: ExcelApi 1.2] + /// + /// Is the decimal integer you want to convert. + /// Is the number of characters to use. + /// + } + Functions.prototype.dec2Hex = function(number, places) { + /// + /// Converts a decimal number to hexadecimal. [Api set: ExcelApi 1.2] + /// + /// Is the decimal integer you want to convert. + /// Is the number of characters to use. + /// + } + Functions.prototype.dec2Oct = function(number, places) { + /// + /// Converts a decimal number to octal. [Api set: ExcelApi 1.2] + /// + /// Is the decimal integer you want to convert. + /// Is the number of characters to use. + /// + } + Functions.prototype.decimal = function(number, radix) { + /// + /// Converts a text representation of a number in a given base into a decimal number. [Api set: ExcelApi 1.2] + /// + /// Is the number that you want to convert. + /// Is the base Radix of the number you are converting. + /// + } + Functions.prototype.degrees = function(angle) { + /// + /// Converts radians to degrees. [Api set: ExcelApi 1.2] + /// + /// Is the angle in radians that you want to convert. + /// + } + Functions.prototype.delta = function(number1, number2) { + /// + /// Tests whether two numbers are equal. [Api set: ExcelApi 1.2] + /// + /// Is the first number. + /// Is the second number. + /// + } + Functions.prototype.devSq = function(values) { + /// + /// Returns the sum of squares of deviations of data points from their sample mean. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 arguments, or an array or array reference, on which you want DEVSQ to calculate. + /// + } + Functions.prototype.disc = function(settlement, maturity, pr, redemption, basis) { + /// + /// Returns the discount rate for a security. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's price per $100 face value. + /// Is the security's redemption value per $100 face value. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.dollar = function(number, decimals) { + /// + /// Converts a number to text, using currency format. [Api set: ExcelApi 1.2] + /// + /// Is a number, a reference to a cell containing a number, or a formula that evaluates to a number. + /// Is the number of digits to the right of the decimal point. The number is rounded as necessary; if omitted, Decimals = 2. + /// + } + Functions.prototype.dollarDe = function(fractionalDollar, fraction) { + /// + /// Converts a dollar price, expressed as a fraction, into a dollar price, expressed as a decimal number. [Api set: ExcelApi 1.2] + /// + /// Is a number expressed as a fraction. + /// Is the integer to use in the denominator of the fraction. + /// + } + Functions.prototype.dollarFr = function(decimalDollar, fraction) { + /// + /// Converts a dollar price, expressed as a decimal number, into a dollar price, expressed as a fraction. [Api set: ExcelApi 1.2] + /// + /// Is a decimal number. + /// Is the integer to use in the denominator of a fraction. + /// + } + Functions.prototype.duration = function(settlement, maturity, coupon, yld, frequency, basis) { + /// + /// Returns the annual duration of a security with periodic interest payments. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's annual coupon rate. + /// Is the security's annual yield. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.ecma_Ceiling = function(number, significance) { + /// + /// Rounds a number up, to the nearest integer or to the nearest multiple of significance. [Api set: ExcelApi 1.2] + /// + /// Is the value you want to round. + /// Is the multiple to which you want to round. + /// + } + Functions.prototype.edate = function(startDate, months) { + /// + /// 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] + /// + /// Is a serial date number that represents the start date. + /// Is the number of months before or after startDate. + /// + } + Functions.prototype.effect = function(nominalRate, npery) { + /// + /// Returns the effective annual interest rate. [Api set: ExcelApi 1.2] + /// + /// Is the nominal interest rate. + /// Is the number of compounding periods per year. + /// + } + Functions.prototype.eoMonth = function(startDate, months) { + /// + /// Returns the serial number of the last day of the month before or after a specified number of months. [Api set: ExcelApi 1.2] + /// + /// Is a serial date number that represents the start date. + /// Is the number of months before or after the startDate. + /// + } + Functions.prototype.erf = function(lowerLimit, upperLimit) { + /// + /// Returns the error function. [Api set: ExcelApi 1.2] + /// + /// Is the lower bound for integrating ERF. + /// Is the upper bound for integrating ERF. + /// + } + Functions.prototype.erfC = function(x) { + /// + /// Returns the complementary error function. [Api set: ExcelApi 1.2] + /// + /// Is the lower bound for integrating ERF. + /// + } + Functions.prototype.erfC_Precise = function(X) { + /// + /// Returns the complementary error function. [Api set: ExcelApi 1.2] + /// + /// Is the lower bound for integrating ERFC.PRECISE. + /// + } + Functions.prototype.erf_Precise = function(X) { + /// + /// Returns the error function. [Api set: ExcelApi 1.2] + /// + /// Is the lower bound for integrating ERF.PRECISE. + /// + } + Functions.prototype.error_Type = function(errorVal) { + /// + /// Returns a number matching an error value. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.even = function(number) { + /// + /// Rounds a positive number up and negative number down to the nearest even integer. [Api set: ExcelApi 1.2] + /// + /// Is the value to round. + /// + } + Functions.prototype.exact = function(text1, text2) { + /// + /// Checks whether two text strings are exactly the same, and returns TRUE or FALSE. EXACT is case-sensitive. [Api set: ExcelApi 1.2] + /// + /// Is the first text string. + /// Is the second text string. + /// + } + Functions.prototype.exp = function(number) { + /// + /// Returns e raised to the power of a given number. [Api set: ExcelApi 1.2] + /// + /// Is the exponent applied to the base e. The constant e equals 2.71828182845904, the base of the natural logarithm. + /// + } + Functions.prototype.expon_Dist = function(x, lambda, cumulative) { + /// + /// Returns the exponential distribution. [Api set: ExcelApi 1.2] + /// + /// Is the value of the function, a nonnegative number. + /// Is the parameter value, a positive number. + /// Is a logical value for the function to return: the cumulative distribution function = TRUE; the probability density function = FALSE. + /// + } + Functions.prototype.fvschedule = function(principal, schedule) { + /// + /// Returns the future value of an initial principal after applying a series of compound interest rates. [Api set: ExcelApi 1.2] + /// + /// Is the present value. + /// Is an array of interest rates to apply. + /// + } + Functions.prototype.f_Dist = function(x, degFreedom1, degFreedom2, cumulative) { + /// + /// Returns the (left-tailed) F probability distribution (degree of diversity) for two data sets. [Api set: ExcelApi 1.2] + /// + /// Is the value at which to evaluate the function, a nonnegative number. + /// Is the numerator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + /// Is the denominator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + /// Is a logical value for the function to return: the cumulative distribution function = TRUE; the probability density function = FALSE. + /// + } + Functions.prototype.f_Dist_RT = function(x, degFreedom1, degFreedom2) { + /// + /// Returns the (right-tailed) F probability distribution (degree of diversity) for two data sets. [Api set: ExcelApi 1.2] + /// + /// Is the value at which to evaluate the function, a nonnegative number. + /// Is the numerator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + /// Is the denominator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + /// + } + Functions.prototype.f_Inv = function(probability, degFreedom1, degFreedom2) { + /// + /// 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] + /// + /// Is a probability associated with the F cumulative distribution, a number between 0 and 1 inclusive. + /// Is the numerator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + /// Is the denominator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + /// + } + Functions.prototype.f_Inv_RT = function(probability, degFreedom1, degFreedom2) { + /// + /// 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] + /// + /// Is a probability associated with the F cumulative distribution, a number between 0 and 1 inclusive. + /// Is the numerator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + /// Is the denominator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + /// + } + Functions.prototype.fact = function(number) { + /// + /// Returns the factorial of a number, equal to 1*2*3*...* Number. [Api set: ExcelApi 1.2] + /// + /// Is the nonnegative number you want the factorial of. + /// + } + Functions.prototype.factDouble = function(number) { + /// + /// Returns the double factorial of a number. [Api set: ExcelApi 1.2] + /// + /// Is the value for which to return the double factorial. + /// + } + Functions.prototype.false = function() { + /// + /// Returns the logical value FALSE. [Api set: ExcelApi 1.2] + /// + /// + } + Functions.prototype.find = function(findText, withinText, startNum) { + /// + /// Returns the starting position of one text string within another text string. FIND is case-sensitive. [Api set: ExcelApi 1.2] + /// + /// Is the text you want to find. Use double quotes (empty text) to match the first character in withinText; wildcard characters not allowed. + /// Is the text containing the text you want to find. + /// Specifies the character at which to start the search. The first character in withinText is character number 1. If omitted, startNum = 1. + /// + } + Functions.prototype.findB = function(findText, withinText, startNum) { + /// + /// 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] + /// + /// Is the text you want to find. + /// Is the text containing the text you want to find. + /// Specifies the character at which to start the search. + /// + } + Functions.prototype.fisher = function(x) { + /// + /// Returns the Fisher transformation. [Api set: ExcelApi 1.2] + /// + /// Is the value for which you want the transformation, a number between -1 and 1, excluding -1 and 1. + /// + } + Functions.prototype.fisherInv = function(y) { + /// + /// Returns the inverse of the Fisher transformation: if y = FISHER(x), then FISHERINV(y) = x. [Api set: ExcelApi 1.2] + /// + /// Is the value for which you want to perform the inverse of the transformation. + /// + } + Functions.prototype.fixed = function(number, decimals, noCommas) { + /// + /// Rounds a number to the specified number of decimals and returns the result as text with or without commas. [Api set: ExcelApi 1.2] + /// + /// Is the number you want to round and convert to text. + /// Is the number of digits to the right of the decimal point. If omitted, Decimals = 2. + /// Is a logical value: do not display commas in the returned text = TRUE; do display commas in the returned text = FALSE or omitted. + /// + } + Functions.prototype.floor_Math = function(number, significance, mode) { + /// + /// Rounds a number down, to the nearest integer or to the nearest multiple of significance. [Api set: ExcelApi 1.2] + /// + /// Is the value you want to round. + /// Is the multiple to which you want to round. + /// When given and nonzero this function will round towards zero. + /// + } + Functions.prototype.floor_Precise = function(number, significance) { + /// + /// Rounds a number down, to the nearest integer or to the nearest multiple of significance. [Api set: ExcelApi 1.2] + /// + /// Is the numeric value you want to round. + /// Is the multiple to which you want to round. + /// + } + Functions.prototype.fv = function(rate, nper, pmt, pv, type) { + /// + /// Returns the future value of an investment based on periodic, constant payments and a constant interest rate. [Api set: ExcelApi 1.2] + /// + /// Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. + /// Is the total number of payment periods in the investment. + /// Is the payment made each period; it cannot change over the life of the investment. + /// Is the present value, or the lump-sum amount that a series of future payments is worth now. If omitted, Pv = 0. + /// 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. + /// + } + Functions.prototype.gamma = function(x) { + /// + /// Returns the Gamma function value. [Api set: ExcelApi 1.2] + /// + /// Is the value for which you want to calculate Gamma. + /// + } + Functions.prototype.gammaLn = function(x) { + /// + /// Returns the natural logarithm of the gamma function. [Api set: ExcelApi 1.2] + /// + /// Is the value for which you want to calculate GAMMALN, a positive number. + /// + } + Functions.prototype.gammaLn_Precise = function(x) { + /// + /// Returns the natural logarithm of the gamma function. [Api set: ExcelApi 1.2] + /// + /// Is the value for which you want to calculate GAMMALN.PRECISE, a positive number. + /// + } + Functions.prototype.gamma_Dist = function(x, alpha, beta, cumulative) { + /// + /// Returns the gamma distribution. [Api set: ExcelApi 1.2] + /// + /// Is the value at which you want to evaluate the distribution, a nonnegative number. + /// Is a parameter to the distribution, a positive number. + /// Is a parameter to the distribution, a positive number. If beta = 1, GAMMA.DIST returns the standard gamma distribution. + /// Is a logical value: return the cumulative distribution function = TRUE; return the probability mass function = FALSE or omitted. + /// + } + Functions.prototype.gamma_Inv = function(probability, alpha, beta) { + /// + /// Returns the inverse of the gamma cumulative distribution: if p = GAMMA.DIST(x,...), then GAMMA.INV(p,...) = x. [Api set: ExcelApi 1.2] + /// + /// Is the probability associated with the gamma distribution, a number between 0 and 1, inclusive. + /// Is a parameter to the distribution, a positive number. + /// Is a parameter to the distribution, a positive number. If beta = 1, GAMMA.INV returns the inverse of the standard gamma distribution. + /// + } + Functions.prototype.gauss = function(x) { + /// + /// Returns 0.5 less than the standard normal cumulative distribution. [Api set: ExcelApi 1.2] + /// + /// Is the value for which you want the distribution. + /// + } + Functions.prototype.gcd = function(values) { + /// + /// Returns the greatest common divisor. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 values. + /// + } + Functions.prototype.geStep = function(number, step) { + /// + /// Tests whether a number is greater than a threshold value. [Api set: ExcelApi 1.2] + /// + /// Is the value to test against step. + /// Is the threshold value. + /// + } + Functions.prototype.geoMean = function(values) { + /// + /// Returns the geometric mean of an array or range of positive numeric data. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the mean. + /// + } + Functions.prototype.hlookup = function(lookupValue, tableArray, rowIndexNum, rangeLookup) { + /// + /// 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] + /// + /// Is the value to be found in the first row of the table and can be a value, a reference, or a text string. + /// 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. + /// 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. + /// 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. + /// + } + Functions.prototype.harMean = function(values) { + /// + /// Returns the harmonic mean of a data set of positive numbers: the reciprocal of the arithmetic mean of reciprocals. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.hex2Bin = function(number, places) { + /// + /// Converts a Hexadecimal number to binary. [Api set: ExcelApi 1.2] + /// + /// Is the hexadecimal number you want to convert. + /// Is the number of characters to use. + /// + } + Functions.prototype.hex2Dec = function(number) { + /// + /// Converts a hexadecimal number to decimal. [Api set: ExcelApi 1.2] + /// + /// Is the hexadecimal number you want to convert. + /// + } + Functions.prototype.hex2Oct = function(number, places) { + /// + /// Converts a hexadecimal number to octal. [Api set: ExcelApi 1.2] + /// + /// Is the hexadecimal number you want to convert. + /// Is the number of characters to use. + /// + } + Functions.prototype.hour = function(serialNumber) { + /// + /// Returns the hour as a number from 0 (12:00 A.M.) to 23 (11:00 P.M.). [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.hypGeom_Dist = function(sampleS, numberSample, populationS, numberPop, cumulative) { + /// + /// Returns the hypergeometric distribution. [Api set: ExcelApi 1.2] + /// + /// Is the number of successes in the sample. + /// Is the size of the sample. + /// Is the number of successes in the population. + /// Is the population size. + /// Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. + /// + } + Functions.prototype.hyperlink = function(linkLocation, friendlyName) { + /// + /// 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] + /// + /// Is the text giving the path and file name to the document to be opened, a hard drive location, UNC address, or URL path. + /// Is text or a number that is displayed in the cell. If omitted, the cell displays the linkLocation text. + /// + } + Functions.prototype.iso_Ceiling = function(number, significance) { + /// + /// Rounds a number up, to the nearest integer or to the nearest multiple of significance. [Api set: ExcelApi 1.2] + /// + /// Is the value you want to round. + /// Is the optional multiple to which you want to round. + /// + } + Functions.prototype.if = function(logicalTest, valueIfTrue, valueIfFalse) { + /// + /// Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE. [Api set: ExcelApi 1.2] + /// + /// Is any value or expression that can be evaluated to TRUE or FALSE. + /// Is the value that is returned if logicalTest is TRUE. If omitted, TRUE is returned. You can nest up to seven IF functions. + /// Is the value that is returned if logicalTest is FALSE. If omitted, FALSE is returned. + /// + } + Functions.prototype.imAbs = function(inumber) { + /// + /// Returns the absolute value (modulus) of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the absolute value. + /// + } + Functions.prototype.imArgument = function(inumber) { + /// + /// Returns the argument q, an angle expressed in radians. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the argument. + /// + } + Functions.prototype.imConjugate = function(inumber) { + /// + /// Returns the complex conjugate of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the conjugate. + /// + } + Functions.prototype.imCos = function(inumber) { + /// + /// Returns the cosine of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the cosine. + /// + } + Functions.prototype.imCosh = function(inumber) { + /// + /// Returns the hyperbolic cosine of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the hyperbolic cosine. + /// + } + Functions.prototype.imCot = function(inumber) { + /// + /// Returns the cotangent of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the cotangent. + /// + } + Functions.prototype.imCsc = function(inumber) { + /// + /// Returns the cosecant of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the cosecant. + /// + } + Functions.prototype.imCsch = function(inumber) { + /// + /// Returns the hyperbolic cosecant of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the hyperbolic cosecant. + /// + } + Functions.prototype.imDiv = function(inumber1, inumber2) { + /// + /// Returns the quotient of two complex numbers. [Api set: ExcelApi 1.2] + /// + /// Is the complex numerator or dividend. + /// Is the complex denominator or divisor. + /// + } + Functions.prototype.imExp = function(inumber) { + /// + /// Returns the exponential of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the exponential. + /// + } + Functions.prototype.imLn = function(inumber) { + /// + /// Returns the natural logarithm of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the natural logarithm. + /// + } + Functions.prototype.imLog10 = function(inumber) { + /// + /// Returns the base-10 logarithm of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the common logarithm. + /// + } + Functions.prototype.imLog2 = function(inumber) { + /// + /// Returns the base-2 logarithm of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the base-2 logarithm. + /// + } + Functions.prototype.imPower = function(inumber, number) { + /// + /// Returns a complex number raised to an integer power. [Api set: ExcelApi 1.2] + /// + /// Is a complex number you want to raise to a power. + /// Is the power to which you want to raise the complex number. + /// + } + Functions.prototype.imProduct = function(values) { + /// + /// Returns the product of 1 to 255 complex numbers. [Api set: ExcelApi 1.2] + /// + /// Inumber1, Inumber2,... are from 1 to 255 complex numbers to multiply. + /// + } + Functions.prototype.imReal = function(inumber) { + /// + /// Returns the real coefficient of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the real coefficient. + /// + } + Functions.prototype.imSec = function(inumber) { + /// + /// Returns the secant of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the secant. + /// + } + Functions.prototype.imSech = function(inumber) { + /// + /// Returns the hyperbolic secant of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the hyperbolic secant. + /// + } + Functions.prototype.imSin = function(inumber) { + /// + /// Returns the sine of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the sine. + /// + } + Functions.prototype.imSinh = function(inumber) { + /// + /// Returns the hyperbolic sine of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the hyperbolic sine. + /// + } + Functions.prototype.imSqrt = function(inumber) { + /// + /// Returns the square root of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the square root. + /// + } + Functions.prototype.imSub = function(inumber1, inumber2) { + /// + /// Returns the difference of two complex numbers. [Api set: ExcelApi 1.2] + /// + /// Is the complex number from which to subtract inumber2. + /// Is the complex number to subtract from inumber1. + /// + } + Functions.prototype.imSum = function(values) { + /// + /// Returns the sum of complex numbers. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are from 1 to 255 complex numbers to add. + /// + } + Functions.prototype.imTan = function(inumber) { + /// + /// Returns the tangent of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the tangent. + /// + } + Functions.prototype.imaginary = function(inumber) { + /// + /// Returns the imaginary coefficient of a complex number. [Api set: ExcelApi 1.2] + /// + /// Is a complex number for which you want the imaginary coefficient. + /// + } + Functions.prototype.int = function(number) { + /// + /// Rounds a number down to the nearest integer. [Api set: ExcelApi 1.2] + /// + /// Is the real number you want to round down to an integer. + /// + } + Functions.prototype.intRate = function(settlement, maturity, investment, redemption, basis) { + /// + /// Returns the interest rate for a fully invested security. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the amount invested in the security. + /// Is the amount to be received at maturity. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.ipmt = function(rate, per, nper, pv, fv, type) { + /// + /// 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] + /// + /// Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. + /// Is the period for which you want to find the interest and must be in the range 1 to Nper. + /// Is the total number of payment periods in an investment. + /// Is the present value, or the lump-sum amount that a series of future payments is worth now. + /// Is the future value, or a cash balance you want to attain after the last payment is made. If omitted, Fv = 0. + /// 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. + /// + } + Functions.prototype.irr = function(values, guess) { + /// + /// Returns the internal rate of return for a series of cash flows. [Api set: ExcelApi 1.2] + /// + /// Is an array or a reference to cells that contain numbers for which you want to calculate the internal rate of return. + /// Is a number that you guess is close to the result of IRR; 0.1 (10 percent) if omitted. + /// + } + Functions.prototype.isErr = function(value) { + /// + /// 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] + /// + /// 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. + /// + } + Functions.prototype.isError = function(value) { + /// + /// 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] + /// + /// 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. + /// + } + Functions.prototype.isEven = function(number) { + /// + /// Returns TRUE if the number is even. [Api set: ExcelApi 1.2] + /// + /// Is the value to test. + /// + } + Functions.prototype.isFormula = function(reference) { + /// + /// Checks whether a reference is to a cell containing a formula, and returns TRUE or FALSE. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.isLogical = function(value) { + /// + /// Checks whether a value is a logical value (TRUE or FALSE), and returns TRUE or FALSE. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.isNA = function(value) { + /// + /// Checks whether a value is #N/A, and returns TRUE or FALSE. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.isNonText = function(value) { + /// + /// Checks whether a value is not text (blank cells are not text), and returns TRUE or FALSE. [Api set: ExcelApi 1.2] + /// + /// Is the value you want tested: a cell; a formula; or a name referring to a cell, formula, or value. + /// + } + Functions.prototype.isNumber = function(value) { + /// + /// Checks whether a value is a number, and returns TRUE or FALSE. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.isOdd = function(number) { + /// + /// Returns TRUE if the number is odd. [Api set: ExcelApi 1.2] + /// + /// Is the value to test. + /// + } + Functions.prototype.isText = function(value) { + /// + /// Checks whether a value is text, and returns TRUE or FALSE. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.isoWeekNum = function(date) { + /// + /// Returns the ISO week number in the year for a given date. [Api set: ExcelApi 1.2] + /// + /// Is the date-time code used by Microsoft Excel for date and time calculation. + /// + } + Functions.prototype.ispmt = function(rate, per, nper, pv) { + /// + /// Returns the interest paid during a specific period of an investment. [Api set: ExcelApi 1.2] + /// + /// Interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. + /// Period for which you want to find the interest. + /// Number of payment periods in an investment. + /// Lump sum amount that a series of future payments is right now. + /// + } + Functions.prototype.isref = function(value) { + /// + /// Checks whether a value is a reference, and returns TRUE or FALSE. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.kurt = function(values) { + /// + /// Returns the kurtosis of a data set. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the kurtosis. + /// + } + Functions.prototype.large = function(array, k) { + /// + /// Returns the k-th largest value in a data set. For example, the fifth largest number. [Api set: ExcelApi 1.2] + /// + /// Is the array or range of data for which you want to determine the k-th largest value. + /// Is the position (from the largest) in the array or cell range of the value to return. + /// + } + Functions.prototype.lcm = function(values) { + /// + /// Returns the least common multiple. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 values for which you want the least common multiple. + /// + } + Functions.prototype.left = function(text, numChars) { + /// + /// Returns the specified number of characters from the start of a text string. [Api set: ExcelApi 1.2] + /// + /// Is the text string containing the characters you want to extract. + /// Specifies how many characters you want LEFT to extract; 1 if omitted. + /// + } + Functions.prototype.leftb = function(text, numBytes) { + /// + /// 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] + /// + /// Is the text string containing the characters you want to extract. + /// Specifies how many characters you want LEFT to return. + /// + } + Functions.prototype.len = function(text) { + /// + /// Returns the number of characters in a text string. [Api set: ExcelApi 1.2] + /// + /// Is the text whose length you want to find. Spaces count as characters. + /// + } + Functions.prototype.lenb = function(text) { + /// + /// Returns the number of characters in a text string. Use with double-byte character sets (DBCS). [Api set: ExcelApi 1.2] + /// + /// Is the text whose length you want to find. + /// + } + Functions.prototype.ln = function(number) { + /// + /// Returns the natural logarithm of a number. [Api set: ExcelApi 1.2] + /// + /// Is the positive real number for which you want the natural logarithm. + /// + } + Functions.prototype.log = function(number, base) { + /// + /// Returns the logarithm of a number to the base you specify. [Api set: ExcelApi 1.2] + /// + /// Is the positive real number for which you want the logarithm. + /// Is the base of the logarithm; 10 if omitted. + /// + } + Functions.prototype.log10 = function(number) { + /// + /// Returns the base-10 logarithm of a number. [Api set: ExcelApi 1.2] + /// + /// Is the positive real number for which you want the base-10 logarithm. + /// + } + Functions.prototype.logNorm_Dist = function(x, mean, standardDev, cumulative) { + /// + /// Returns the lognormal distribution of x, where ln(x) is normally distributed with parameters Mean and Standard_dev. [Api set: ExcelApi 1.2] + /// + /// Is the value at which to evaluate the function, a positive number. + /// Is the mean of ln(x). + /// Is the standard deviation of ln(x), a positive number. + /// Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. + /// + } + Functions.prototype.logNorm_Inv = function(probability, mean, standardDev) { + /// + /// 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] + /// + /// Is a probability associated with the lognormal distribution, a number between 0 and 1, inclusive. + /// Is the mean of ln(x). + /// Is the standard deviation of ln(x), a positive number. + /// + } + Functions.prototype.lookup = function(lookupValue, lookupVector, resultVector) { + /// + /// 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] + /// + /// 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. + /// Is a range that contains only one row or one column of text, numbers, or logical values, placed in ascending order. + /// Is a range that contains only one row or column, the same size as lookupVector. + /// + } + Functions.prototype.lower = function(text) { + /// + /// Converts all letters in a text string to lowercase. [Api set: ExcelApi 1.2] + /// + /// Is the text you want to convert to lowercase. Characters in Text that are not letters are not changed. + /// + } + Functions.prototype.mduration = function(settlement, maturity, coupon, yld, frequency, basis) { + /// + /// Returns the Macauley modified duration for a security with an assumed par value of $100. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's annual coupon rate. + /// Is the security's annual yield. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.mirr = function(values, financeRate, reinvestRate) { + /// + /// 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] + /// + /// Is an array or a reference to cells that contain numbers that represent a series of payments (negative) and income (positive) at regular periods. + /// Is the interest rate you pay on the money used in the cash flows. + /// Is the interest rate you receive on the cash flows as you reinvest them. + /// + } + Functions.prototype.mround = function(number, multiple) { + /// + /// Returns a number rounded to the desired multiple. [Api set: ExcelApi 1.2] + /// + /// Is the value to round. + /// Is the multiple to which you want to round number. + /// + } + Functions.prototype.match = function(lookupValue, lookupArray, matchType) { + /// + /// Returns the relative position of an item in an array that matches a specified value in a specified order. [Api set: ExcelApi 1.2] + /// + /// 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. + /// Is a contiguous range of cells containing possible lookup values, an array of values, or a reference to an array. + /// Is a number 1, 0, or -1 indicating which value to return. + /// + } + Functions.prototype.max = function(values) { + /// + /// Returns the largest value in a set of values. Ignores logical values and text. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 numbers, empty cells, logical values, or text numbers for which you want the maximum. + /// + } + Functions.prototype.maxA = function(values) { + /// + /// Returns the largest value in a set of values. Does not ignore logical values and text. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 numbers, empty cells, logical values, or text numbers for which you want the maximum. + /// + } + Functions.prototype.median = function(values) { + /// + /// Returns the median, or the number in the middle of the set of given numbers. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the median. + /// + } + Functions.prototype.mid = function(text, startNum, numChars) { + /// + /// Returns the characters from the middle of a text string, given a starting position and length. [Api set: ExcelApi 1.2] + /// + /// Is the text string from which you want to extract the characters. + /// Is the position of the first character you want to extract. The first character in Text is 1. + /// Specifies how many characters to return from Text. + /// + } + Functions.prototype.midb = function(text, startNum, numBytes) { + /// + /// 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] + /// + /// Is the text string containing the characters you want to extract. + /// Is the position of the first character you want to extract in text. + /// Specifies how many characters to return from text. + /// + } + Functions.prototype.min = function(values) { + /// + /// Returns the smallest number in a set of values. Ignores logical values and text. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 numbers, empty cells, logical values, or text numbers for which you want the minimum. + /// + } + Functions.prototype.minA = function(values) { + /// + /// Returns the smallest value in a set of values. Does not ignore logical values and text. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 numbers, empty cells, logical values, or text numbers for which you want the minimum. + /// + } + Functions.prototype.minute = function(serialNumber) { + /// + /// Returns the minute, a number from 0 to 59. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.mod = function(number, divisor) { + /// + /// Returns the remainder after a number is divided by a divisor. [Api set: ExcelApi 1.2] + /// + /// Is the number for which you want to find the remainder after the division is performed. + /// Is the number by which you want to divide Number. + /// + } + Functions.prototype.month = function(serialNumber) { + /// + /// Returns the month, a number from 1 (January) to 12 (December). [Api set: ExcelApi 1.2] + /// + /// Is a number in the date-time code used by Microsoft Excel. + /// + } + Functions.prototype.multiNomial = function(values) { + /// + /// Returns the multinomial of a set of numbers. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 values for which you want the multinomial. + /// + } + Functions.prototype.n = function(value) { + /// + /// Converts non-number value to a number, dates to serial numbers, TRUE to 1, anything else to 0 (zero). [Api set: ExcelApi 1.2] + /// + /// Is the value you want converted. + /// + } + Functions.prototype.nper = function(rate, pmt, pv, fv, type) { + /// + /// Returns the number of periods for an investment based on periodic, constant payments and a constant interest rate. [Api set: ExcelApi 1.2] + /// + /// Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. + /// Is the payment made each period; it cannot change over the life of the investment. + /// Is the present value, or the lump-sum amount that a series of future payments is worth now. + /// Is the future value, or a cash balance you want to attain after the last payment is made. If omitted, zero is used. + /// Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. + /// + } + Functions.prototype.na = function() { + /// + /// Returns the error value #N/A (value not available). [Api set: ExcelApi 1.2] + /// + /// + } + Functions.prototype.negBinom_Dist = function(numberF, numberS, probabilityS, cumulative) { + /// + /// 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] + /// + /// Is the number of failures. + /// Is the threshold number of successes. + /// Is the probability of a success; a number between 0 and 1. + /// Is a logical value: for the cumulative distribution function, use TRUE; for the probability mass function, use FALSE. + /// + } + Functions.prototype.networkDays = function(startDate, endDate, holidays) { + /// + /// Returns the number of whole workdays between two dates. [Api set: ExcelApi 1.2] + /// + /// Is a serial date number that represents the start date. + /// Is a serial date number that represents the end date. + /// 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. + /// + } + Functions.prototype.networkDays_Intl = function(startDate, endDate, weekend, holidays) { + /// + /// Returns the number of whole workdays between two dates with custom weekend parameters. [Api set: ExcelApi 1.2] + /// + /// Is a serial date number that represents the start date. + /// Is a serial date number that represents the end date. + /// Is a number or string specifying when weekends occur. + /// 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. + /// + } + Functions.prototype.nominal = function(effectRate, npery) { + /// + /// Returns the annual nominal interest rate. [Api set: ExcelApi 1.2] + /// + /// Is the effective interest rate. + /// Is the number of compounding periods per year. + /// + } + Functions.prototype.norm_Dist = function(x, mean, standardDev, cumulative) { + /// + /// Returns the normal distribution for the specified mean and standard deviation. [Api set: ExcelApi 1.2] + /// + /// Is the value for which you want the distribution. + /// Is the arithmetic mean of the distribution. + /// Is the standard deviation of the distribution, a positive number. + /// Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. + /// + } + Functions.prototype.norm_Inv = function(probability, mean, standardDev) { + /// + /// Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation. [Api set: ExcelApi 1.2] + /// + /// Is a probability corresponding to the normal distribution, a number between 0 and 1 inclusive. + /// Is the arithmetic mean of the distribution. + /// Is the standard deviation of the distribution, a positive number. + /// + } + Functions.prototype.norm_S_Dist = function(z, cumulative) { + /// + /// Returns the standard normal distribution (has a mean of zero and a standard deviation of one). [Api set: ExcelApi 1.2] + /// + /// Is the value for which you want the distribution. + /// Is a logical value for the function to return: the cumulative distribution function = TRUE; the probability density function = FALSE. + /// + } + Functions.prototype.norm_S_Inv = function(probability) { + /// + /// 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] + /// + /// Is a probability corresponding to the normal distribution, a number between 0 and 1 inclusive. + /// + } + Functions.prototype.not = function(logical) { + /// + /// Changes FALSE to TRUE, or TRUE to FALSE. [Api set: ExcelApi 1.2] + /// + /// Is a value or expression that can be evaluated to TRUE or FALSE. + /// + } + Functions.prototype.now = function() { + /// + /// Returns the current date and time formatted as a date and time. [Api set: ExcelApi 1.2] + /// + /// + } + Functions.prototype.npv = function(rate, values) { + /// + /// 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] + /// + /// Is the rate of discount over the length of one period. + /// List of parameters, whose elements are 1 to 254 payments and income, equally spaced in time and occurring at the end of each period. + /// + } + Functions.prototype.numberValue = function(text, decimalSeparator, groupSeparator) { + /// + /// Converts text to number in a locale-independent manner. [Api set: ExcelApi 1.2] + /// + /// Is the string representing the number you want to convert. + /// Is the character used as the decimal separator in the string. + /// Is the character used as the group separator in the string. + /// + } + Functions.prototype.oct2Bin = function(number, places) { + /// + /// Converts an octal number to binary. [Api set: ExcelApi 1.2] + /// + /// Is the octal number you want to convert. + /// Is the number of characters to use. + /// + } + Functions.prototype.oct2Dec = function(number) { + /// + /// Converts an octal number to decimal. [Api set: ExcelApi 1.2] + /// + /// Is the octal number you want to convert. + /// + } + Functions.prototype.oct2Hex = function(number, places) { + /// + /// Converts an octal number to hexadecimal. [Api set: ExcelApi 1.2] + /// + /// Is the octal number you want to convert. + /// Is the number of characters to use. + /// + } + Functions.prototype.odd = function(number) { + /// + /// Rounds a positive number up and negative number down to the nearest odd integer. [Api set: ExcelApi 1.2] + /// + /// Is the value to round. + /// + } + Functions.prototype.oddFPrice = function(settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis) { + /// + /// Returns the price per $100 face value of a security with an odd first period. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's issue date, expressed as a serial date number. + /// Is the security's first coupon date, expressed as a serial date number. + /// Is the security's interest rate. + /// Is the security's annual yield. + /// Is the security's redemption value per $100 face value. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.oddFYield = function(settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis) { + /// + /// Returns the yield of a security with an odd first period. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's issue date, expressed as a serial date number. + /// Is the security's first coupon date, expressed as a serial date number. + /// Is the security's interest rate. + /// Is the security's price. + /// Is the security's redemption value per $100 face value. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.oddLPrice = function(settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis) { + /// + /// Returns the price per $100 face value of a security with an odd last period. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's last coupon date, expressed as a serial date number. + /// Is the security's interest rate. + /// Is the security's annual yield. + /// Is the security's redemption value per $100 face value. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.oddLYield = function(settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis) { + /// + /// Returns the yield of a security with an odd last period. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's last coupon date, expressed as a serial date number. + /// Is the security's interest rate. + /// Is the security's price. + /// Is the security's redemption value per $100 face value. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.or = function(values) { + /// + /// 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] + /// + /// List of parameters, whose elements are 1 to 255 conditions that you want to test that can be either TRUE or FALSE. + /// + } + Functions.prototype.pduration = function(rate, pv, fv) { + /// + /// Returns the number of periods required by an investment to reach a specified value. [Api set: ExcelApi 1.2] + /// + /// Is the interest rate per period. + /// Is the present value of the investment. + /// Is the desired future value of the investment. + /// + } + Functions.prototype.percentRank_Exc = function(array, x, significance) { + /// + /// 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] + /// + /// Is the array or range of data with numeric values that defines relative standing. + /// Is the value for which you want to know the rank. + /// Is an optional value that identifies the number of significant digits for the returned percentage, three digits if omitted (0.xxx%). + /// + } + Functions.prototype.percentRank_Inc = function(array, x, significance) { + /// + /// 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] + /// + /// Is the array or range of data with numeric values that defines relative standing. + /// Is the value for which you want to know the rank. + /// Is an optional value that identifies the number of significant digits for the returned percentage, three digits if omitted (0.xxx%). + /// + } + Functions.prototype.percentile_Exc = function(array, k) { + /// + /// Returns the k-th percentile of values in a range, where k is in the range 0..1, exclusive. [Api set: ExcelApi 1.2] + /// + /// Is the array or range of data that defines relative standing. + /// Is the percentile value that is between 0 through 1, inclusive. + /// + } + Functions.prototype.percentile_Inc = function(array, k) { + /// + /// Returns the k-th percentile of values in a range, where k is in the range 0..1, inclusive. [Api set: ExcelApi 1.2] + /// + /// Is the array or range of data that defines relative standing. + /// Is the percentile value that is between 0 through 1, inclusive. + /// + } + Functions.prototype.permut = function(number, numberChosen) { + /// + /// Returns the number of permutations for a given number of objects that can be selected from the total objects. [Api set: ExcelApi 1.2] + /// + /// Is the total number of objects. + /// Is the number of objects in each permutation. + /// + } + Functions.prototype.permutationa = function(number, numberChosen) { + /// + /// 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] + /// + /// Is the total number of objects. + /// Is the number of objects in each permutation. + /// + } + Functions.prototype.phi = function(x) { + /// + /// Returns the value of the density function for a standard normal distribution. [Api set: ExcelApi 1.2] + /// + /// Is the number for which you want the density of the standard normal distribution. + /// + } + Functions.prototype.pi = function() { + /// + /// Returns the value of Pi, 3.14159265358979, accurate to 15 digits. [Api set: ExcelApi 1.2] + /// + /// + } + Functions.prototype.pmt = function(rate, nper, pv, fv, type) { + /// + /// Calculates the payment for a loan based on constant payments and a constant interest rate. [Api set: ExcelApi 1.2] + /// + /// Is the interest rate per period for the loan. For example, use 6%/4 for quarterly payments at 6% APR. + /// Is the total number of payments for the loan. + /// Is the present value: the total amount that a series of future payments is worth now. + /// Is the future value, or a cash balance you want to attain after the last payment is made, 0 (zero) if omitted. + /// Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. + /// + } + Functions.prototype.poisson_Dist = function(x, mean, cumulative) { + /// + /// Returns the Poisson distribution. [Api set: ExcelApi 1.2] + /// + /// Is the number of events. + /// Is the expected numeric value, a positive number. + /// Is a logical value: for the cumulative Poisson probability, use TRUE; for the Poisson probability mass function, use FALSE. + /// + } + Functions.prototype.power = function(number, power) { + /// + /// Returns the result of a number raised to a power. [Api set: ExcelApi 1.2] + /// + /// Is the base number, any real number. + /// Is the exponent, to which the base number is raised. + /// + } + Functions.prototype.ppmt = function(rate, per, nper, pv, fv, type) { + /// + /// 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] + /// + /// Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. + /// Specifies the period and must be in the range 1 to nper. + /// Is the total number of payment periods in an investment. + /// Is the present value: the total amount that a series of future payments is worth now. + /// Is the future value, or cash balance you want to attain after the last payment is made. + /// Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. + /// + } + Functions.prototype.price = function(settlement, maturity, rate, yld, redemption, frequency, basis) { + /// + /// Returns the price per $100 face value of a security that pays periodic interest. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's annual coupon rate. + /// Is the security's annual yield. + /// Is the security's redemption value per $100 face value. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.priceDisc = function(settlement, maturity, discount, redemption, basis) { + /// + /// Returns the price per $100 face value of a discounted security. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's discount rate. + /// Is the security's redemption value per $100 face value. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.priceMat = function(settlement, maturity, issue, rate, yld, basis) { + /// + /// Returns the price per $100 face value of a security that pays interest at maturity. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's issue date, expressed as a serial date number. + /// Is the security's interest rate at date of issue. + /// Is the security's annual yield. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.product = function(values) { + /// + /// Multiplies all the numbers given as arguments. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 numbers, logical values, or text representations of numbers that you want to multiply. + /// + } + Functions.prototype.proper = function(text) { + /// + /// 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] + /// + /// Is text enclosed in quotation marks, a formula that returns text, or a reference to a cell containing text to partially capitalize. + /// + } + Functions.prototype.pv = function(rate, nper, pmt, fv, type) { + /// + /// Returns the present value of an investment: the total amount that a series of future payments is worth now. [Api set: ExcelApi 1.2] + /// + /// Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. + /// Is the total number of payment periods in an investment. + /// Is the payment made each period and cannot change over the life of the investment. + /// Is the future value, or a cash balance you want to attain after the last payment is made. + /// Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. + /// + } + Functions.prototype.quartile_Exc = function(array, quart) { + /// + /// Returns the quartile of a data set, based on percentile values from 0..1, exclusive. [Api set: ExcelApi 1.2] + /// + /// Is the array or cell range of numeric values for which you want the quartile value. + /// Is a number: minimum value = 0; 1st quartile = 1; median value = 2; 3rd quartile = 3; maximum value = 4. + /// + } + Functions.prototype.quartile_Inc = function(array, quart) { + /// + /// Returns the quartile of a data set, based on percentile values from 0..1, inclusive. [Api set: ExcelApi 1.2] + /// + /// Is the array or cell range of numeric values for which you want the quartile value. + /// Is a number: minimum value = 0; 1st quartile = 1; median value = 2; 3rd quartile = 3; maximum value = 4. + /// + } + Functions.prototype.quotient = function(numerator, denominator) { + /// + /// Returns the integer portion of a division. [Api set: ExcelApi 1.2] + /// + /// Is the dividend. + /// Is the divisor. + /// + } + Functions.prototype.radians = function(angle) { + /// + /// Converts degrees to radians. [Api set: ExcelApi 1.2] + /// + /// Is an angle in degrees that you want to convert. + /// + } + Functions.prototype.rand = function() { + /// + /// Returns a random number greater than or equal to 0 and less than 1, evenly distributed (changes on recalculation). [Api set: ExcelApi 1.2] + /// + /// + } + Functions.prototype.randBetween = function(bottom, top) { + /// + /// Returns a random number between the numbers you specify. [Api set: ExcelApi 1.2] + /// + /// Is the smallest integer RANDBETWEEN will return. + /// Is the largest integer RANDBETWEEN will return. + /// + } + Functions.prototype.rank_Avg = function(number, ref, order) { + /// + /// 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] + /// + /// Is the number for which you want to find the rank. + /// Is an array of, or a reference to, a list of numbers. Nonnumeric values are ignored. + /// Is a number: rank in the list sorted descending = 0 or omitted; rank in the list sorted ascending = any nonzero value. + /// + } + Functions.prototype.rank_Eq = function(number, ref, order) { + /// + /// 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] + /// + /// Is the number for which you want to find the rank. + /// Is an array of, or a reference to, a list of numbers. Nonnumeric values are ignored. + /// Is a number: rank in the list sorted descending = 0 or omitted; rank in the list sorted ascending = any nonzero value. + /// + } + Functions.prototype.rate = function(nper, pmt, pv, fv, type, guess) { + /// + /// 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] + /// + /// Is the total number of payment periods for the loan or investment. + /// Is the payment made each period and cannot change over the life of the loan or investment. + /// Is the present value: the total amount that a series of future payments is worth now. + /// Is the future value, or a cash balance you want to attain after the last payment is made. If omitted, uses Fv = 0. + /// Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. + /// Is your guess for what the rate will be; if omitted, Guess = 0.1 (10 percent). + /// + } + Functions.prototype.received = function(settlement, maturity, investment, discount, basis) { + /// + /// Returns the amount received at maturity for a fully invested security. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the amount invested in the security. + /// Is the security's discount rate. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.replace = function(oldText, startNum, numChars, newText) { + /// + /// Replaces part of a text string with a different text string. [Api set: ExcelApi 1.2] + /// + /// Is text in which you want to replace some characters. + /// Is the position of the character in oldText that you want to replace with newText. + /// Is the number of characters in oldText that you want to replace. + /// Is the text that will replace characters in oldText. + /// + } + Functions.prototype.replaceB = function(oldText, startNum, numBytes, newText) { + /// + /// Replaces part of a text string with a different text string. Use with double-byte character sets (DBCS). [Api set: ExcelApi 1.2] + /// + /// Is text in which you want to replace some characters. + /// Is the position of the character in oldText that you want to replace with newText. + /// Is the number of characters in oldText that you want to replace with newText. + /// Is the text that will replace characters in oldText. + /// + } + Functions.prototype.rept = function(text, numberTimes) { + /// + /// 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] + /// + /// Is the text you want to repeat. + /// Is a positive number specifying the number of times to repeat text. + /// + } + Functions.prototype.right = function(text, numChars) { + /// + /// Returns the specified number of characters from the end of a text string. [Api set: ExcelApi 1.2] + /// + /// Is the text string that contains the characters you want to extract. + /// Specifies how many characters you want to extract, 1 if omitted. + /// + } + Functions.prototype.rightb = function(text, numBytes) { + /// + /// 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] + /// + /// Is the text string containing the characters you want to extract. + /// Specifies how many characters you want to extract. + /// + } + Functions.prototype.roman = function(number, form) { + /// + /// Converts an Arabic numeral to Roman, as text. [Api set: ExcelApi 1.2] + /// + /// Is the Arabic numeral you want to convert. + /// Is the number specifying the type of Roman numeral you want. + /// + } + Functions.prototype.round = function(number, numDigits) { + /// + /// Rounds a number to a specified number of digits. [Api set: ExcelApi 1.2] + /// + /// Is the number you want to round. + /// 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. + /// + } + Functions.prototype.roundDown = function(number, numDigits) { + /// + /// Rounds a number down, toward zero. [Api set: ExcelApi 1.2] + /// + /// Is any real number that you want rounded down. + /// 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. + /// + } + Functions.prototype.roundUp = function(number, numDigits) { + /// + /// Rounds a number up, away from zero. [Api set: ExcelApi 1.2] + /// + /// Is any real number that you want rounded up. + /// 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. + /// + } + Functions.prototype.rows = function(array) { + /// + /// Returns the number of rows in a reference or array. [Api set: ExcelApi 1.2] + /// + /// Is an array, an array formula, or a reference to a range of cells for which you want the number of rows. + /// + } + Functions.prototype.rri = function(nper, pv, fv) { + /// + /// Returns an equivalent interest rate for the growth of an investment. [Api set: ExcelApi 1.2] + /// + /// Is the number of periods for the investment. + /// Is the present value of the investment. + /// Is the future value of the investment. + /// + } + Functions.prototype.sec = function(number) { + /// + /// Returns the secant of an angle. [Api set: ExcelApi 1.2] + /// + /// Is the angle in radians for which you want the secant. + /// + } + Functions.prototype.sech = function(number) { + /// + /// Returns the hyperbolic secant of an angle. [Api set: ExcelApi 1.2] + /// + /// Is the angle in radians for which you want the hyperbolic secant. + /// + } + Functions.prototype.second = function(serialNumber) { + /// + /// Returns the second, a number from 0 to 59. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.seriesSum = function(x, n, m, coefficients) { + /// + /// Returns the sum of a power series based on the formula. [Api set: ExcelApi 1.2] + /// + /// Is the input value to the power series. + /// Is the initial power to which you want to raise x. + /// Is the step by which to increase n for each term in the series. + /// Is a set of coefficients by which each successive power of x is multiplied. + /// + } + Functions.prototype.sheet = function(value) { + /// + /// Returns the sheet number of the referenced sheet. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.sheets = function(reference) { + /// + /// Returns the number of sheets in a reference. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.sign = function(number) { + /// + /// 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] + /// + /// Is any real number. + /// + } + Functions.prototype.sin = function(number) { + /// + /// Returns the sine of an angle. [Api set: ExcelApi 1.2] + /// + /// Is the angle in radians for which you want the sine. Degrees * PI()/180 = radians. + /// + } + Functions.prototype.sinh = function(number) { + /// + /// Returns the hyperbolic sine of a number. [Api set: ExcelApi 1.2] + /// + /// Is any real number. + /// + } + Functions.prototype.skew = function(values) { + /// + /// Returns the skewness of a distribution: a characterization of the degree of asymmetry of a distribution around its mean. [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the skewness. + /// + } + Functions.prototype.skew_p = function(values) { + /// + /// 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] + /// + /// 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. + /// + } + Functions.prototype.sln = function(cost, salvage, life) { + /// + /// Returns the straight-line depreciation of an asset for one period. [Api set: ExcelApi 1.2] + /// + /// Is the initial cost of the asset. + /// Is the salvage value at the end of the life of the asset. + /// Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). + /// + } + Functions.prototype.small = function(array, k) { + /// + /// Returns the k-th smallest value in a data set. For example, the fifth smallest number. [Api set: ExcelApi 1.2] + /// + /// Is an array or range of numerical data for which you want to determine the k-th smallest value. + /// Is the position (from the smallest) in the array or range of the value to return. + /// + } + Functions.prototype.sqrt = function(number) { + /// + /// Returns the square root of a number. [Api set: ExcelApi 1.2] + /// + /// Is the number for which you want the square root. + /// + } + Functions.prototype.sqrtPi = function(number) { + /// + /// Returns the square root of (number * Pi). [Api set: ExcelApi 1.2] + /// + /// Is the number by which p is multiplied. + /// + } + Functions.prototype.stDevA = function(values) { + /// + /// 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] + /// + /// 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. + /// + } + Functions.prototype.stDevPA = function(values) { + /// + /// 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] + /// + /// 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. + /// + } + Functions.prototype.stDev_P = function(values) { + /// + /// Calculates standard deviation based on the entire population given as arguments (ignores logical values and text). [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 numbers corresponding to a population and can be numbers or references that contain numbers. + /// + } + Functions.prototype.stDev_S = function(values) { + /// + /// Estimates standard deviation based on a sample (ignores logical values and text in the sample). [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.standardize = function(x, mean, standardDev) { + /// + /// Returns a normalized value from a distribution characterized by a mean and standard deviation. [Api set: ExcelApi 1.2] + /// + /// Is the value you want to normalize. + /// Is the arithmetic mean of the distribution. + /// Is the standard deviation of the distribution, a positive number. + /// + } + Functions.prototype.substitute = function(text, oldText, newText, instanceNum) { + /// + /// Replaces existing text with new text in a text string. [Api set: ExcelApi 1.2] + /// + /// Is the text or the reference to a cell containing text in which you want to substitute characters. + /// 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. + /// Is the text you want to replace oldText with. + /// Specifies which occurrence of oldText you want to replace. If omitted, every instance of oldText is replaced. + /// + } + Functions.prototype.subtotal = function(functionNum, values) { + /// + /// Returns a subtotal in a list or database. [Api set: ExcelApi 1.2] + /// + /// Is the number 1 to 11 that specifies the summary function for the subtotal. + /// List of parameters, whose elements are 1 to 254 ranges or references for which you want the subtotal. + /// + } + Functions.prototype.sum = function(values) { + /// + /// Adds all the numbers in a range of cells. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.sumIf = function(range, criteria, sumRange) { + /// + /// Adds the cells specified by a given condition or criteria. [Api set: ExcelApi 1.2] + /// + /// Is the range of cells you want evaluated. + /// Is the condition or criteria in the form of a number, expression, or text that defines which cells will be added. + /// Are the actual cells to sum. If omitted, the cells in range are used. + /// + } + Functions.prototype.sumIfs = function(sumRange, values) { + /// + /// Adds the cells specified by a given set of conditions or criteria. [Api set: ExcelApi 1.2] + /// + /// Are the actual cells to sum. + /// 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. + /// + } + Functions.prototype.sumSq = function(values) { + /// + /// 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] + /// + /// 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. + /// + } + Functions.prototype.syd = function(cost, salvage, life, per) { + /// + /// Returns the sum-of-years' digits depreciation of an asset for a specified period. [Api set: ExcelApi 1.2] + /// + /// Is the initial cost of the asset. + /// Is the salvage value at the end of the life of the asset. + /// Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). + /// Is the period and must use the same units as Life. + /// + } + Functions.prototype.t = function(value) { + /// + /// 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] + /// + /// Is the value to test. + /// + } + Functions.prototype.tbillEq = function(settlement, maturity, discount) { + /// + /// Returns the bond-equivalent yield for a treasury bill. [Api set: ExcelApi 1.2] + /// + /// Is the Treasury bill's settlement date, expressed as a serial date number. + /// Is the Treasury bill's maturity date, expressed as a serial date number. + /// Is the Treasury bill's discount rate. + /// + } + Functions.prototype.tbillPrice = function(settlement, maturity, discount) { + /// + /// Returns the price per $100 face value for a treasury bill. [Api set: ExcelApi 1.2] + /// + /// Is the Treasury bill's settlement date, expressed as a serial date number. + /// Is the Treasury bill's maturity date, expressed as a serial date number. + /// Is the Treasury bill's discount rate. + /// + } + Functions.prototype.tbillYield = function(settlement, maturity, pr) { + /// + /// Returns the yield for a treasury bill. [Api set: ExcelApi 1.2] + /// + /// Is the Treasury bill's settlement date, expressed as a serial date number. + /// Is the Treasury bill's maturity date, expressed as a serial date number. + /// Is the Treasury Bill's price per $100 face value. + /// + } + Functions.prototype.t_Dist = function(x, degFreedom, cumulative) { + /// + /// Returns the left-tailed Student's t-distribution. [Api set: ExcelApi 1.2] + /// + /// Is the numeric value at which to evaluate the distribution. + /// Is an integer indicating the number of degrees of freedom that characterize the distribution. + /// Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. + /// + } + Functions.prototype.t_Dist_2T = function(x, degFreedom) { + /// + /// Returns the two-tailed Student's t-distribution. [Api set: ExcelApi 1.2] + /// + /// Is the numeric value at which to evaluate the distribution. + /// Is an integer indicating the number of degrees of freedom that characterize the distribution. + /// + } + Functions.prototype.t_Dist_RT = function(x, degFreedom) { + /// + /// Returns the right-tailed Student's t-distribution. [Api set: ExcelApi 1.2] + /// + /// Is the numeric value at which to evaluate the distribution. + /// Is an integer indicating the number of degrees of freedom that characterize the distribution. + /// + } + Functions.prototype.t_Inv = function(probability, degFreedom) { + /// + /// Returns the left-tailed inverse of the Student's t-distribution. [Api set: ExcelApi 1.2] + /// + /// Is the probability associated with the two-tailed Student's t-distribution, a number between 0 and 1 inclusive. + /// Is a positive integer indicating the number of degrees of freedom to characterize the distribution. + /// + } + Functions.prototype.t_Inv_2T = function(probability, degFreedom) { + /// + /// Returns the two-tailed inverse of the Student's t-distribution. [Api set: ExcelApi 1.2] + /// + /// Is the probability associated with the two-tailed Student's t-distribution, a number between 0 and 1 inclusive. + /// Is a positive integer indicating the number of degrees of freedom to characterize the distribution. + /// + } + Functions.prototype.tan = function(number) { + /// + /// Returns the tangent of an angle. [Api set: ExcelApi 1.2] + /// + /// Is the angle in radians for which you want the tangent. Degrees * PI()/180 = radians. + /// + } + Functions.prototype.tanh = function(number) { + /// + /// Returns the hyperbolic tangent of a number. [Api set: ExcelApi 1.2] + /// + /// Is any real number. + /// + } + Functions.prototype.text = function(value, formatText) { + /// + /// Converts a value to text in a specific number format. [Api set: ExcelApi 1.2] + /// + /// Is a number, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value. + /// Is a number format in text form from the Category box on the Number tab in the Format Cells dialog box (not General). + /// + } + Functions.prototype.time = function(hour, minute, second) { + /// + /// Converts hours, minutes, and seconds given as numbers to an Excel serial number, formatted with a time format. [Api set: ExcelApi 1.2] + /// + /// Is a number from 0 to 23 representing the hour. + /// Is a number from 0 to 59 representing the minute. + /// Is a number from 0 to 59 representing the second. + /// + } + Functions.prototype.timevalue = function(timeText) { + /// + /// 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] + /// + /// Is a text string that gives a time in any one of the Microsoft Excel time formats (date information in the string is ignored). + /// + } + Functions.prototype.today = function() { + /// + /// Returns the current date formatted as a date. [Api set: ExcelApi 1.2] + /// + /// + } + Functions.prototype.trim = function(text) { + /// + /// Removes all spaces from a text string except for single spaces between words. [Api set: ExcelApi 1.2] + /// + /// Is the text from which you want spaces removed. + /// + } + Functions.prototype.trimMean = function(array, percent) { + /// + /// Returns the mean of the interior portion of a set of data values. [Api set: ExcelApi 1.2] + /// + /// Is the range or array of values to trim and average. + /// Is the fractional number of data points to exclude from the top and bottom of the data set. + /// + } + Functions.prototype.true = function() { + /// + /// Returns the logical value TRUE. [Api set: ExcelApi 1.2] + /// + /// + } + Functions.prototype.trunc = function(number, numDigits) { + /// + /// Truncates a number to an integer by removing the decimal, or fractional, part of the number. [Api set: ExcelApi 1.2] + /// + /// Is the number you want to truncate. + /// Is a number specifying the precision of the truncation, 0 (zero) if omitted. + /// + } + Functions.prototype.type = function(value) { + /// + /// 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] + /// + /// Can be any value. + /// + } + Functions.prototype.usdollar = function(number, decimals) { + /// + /// Converts a number to text, using currency format. [Api set: ExcelApi 1.2] + /// + /// Is a number, a reference to a cell containing a number, or a formula that evaluates to a number. + /// Is the number of digits to the right of the decimal point. + /// + } + Functions.prototype.unichar = function(number) { + /// + /// Returns the Unicode character referenced by the given numeric value. [Api set: ExcelApi 1.2] + /// + /// Is the Unicode number representing a character. + /// + } + Functions.prototype.unicode = function(text) { + /// + /// Returns the number (code point) corresponding to the first character of the text. [Api set: ExcelApi 1.2] + /// + /// Is the character that you want the Unicode value of. + /// + } + Functions.prototype.upper = function(text) { + /// + /// Converts a text string to all uppercase letters. [Api set: ExcelApi 1.2] + /// + /// Is the text you want converted to uppercase, a reference or a text string. + /// + } + Functions.prototype.vlookup = function(lookupValue, tableArray, colIndexNum, rangeLookup) { + /// + /// 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] + /// + /// Is the value to be found in the first column of the table, and can be a value, a reference, or a text string. + /// 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. + /// 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. + /// 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. + /// + } + Functions.prototype.value = function(text) { + /// + /// Converts a text string that represents a number to a number. [Api set: ExcelApi 1.2] + /// + /// Is the text enclosed in quotation marks or a reference to a cell containing the text you want to convert. + /// + } + Functions.prototype.varA = function(values) { + /// + /// 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] + /// + /// List of parameters, whose elements are 1 to 255 value arguments corresponding to a sample of a population. + /// + } + Functions.prototype.varPA = function(values) { + /// + /// 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] + /// + /// List of parameters, whose elements are 1 to 255 value arguments corresponding to a population. + /// + } + Functions.prototype.var_P = function(values) { + /// + /// Calculates variance based on the entire population (ignores logical values and text in the population). [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 numeric arguments corresponding to a population. + /// + } + Functions.prototype.var_S = function(values) { + /// + /// Estimates variance based on a sample (ignores logical values and text in the sample). [Api set: ExcelApi 1.2] + /// + /// List of parameters, whose elements are 1 to 255 numeric arguments corresponding to a sample of a population. + /// + } + Functions.prototype.vdb = function(cost, salvage, life, startPeriod, endPeriod, factor, noSwitch) { + /// + /// 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] + /// + /// Is the initial cost of the asset. + /// Is the salvage value at the end of the life of the asset. + /// Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). + /// Is the starting period for which you want to calculate the depreciation, in the same units as Life. + /// Is the ending period for which you want to calculate the depreciation, in the same units as Life. + /// Is the rate at which the balance declines, 2 (double-declining balance) if omitted. + /// Switch to straight-line depreciation when depreciation is greater than the declining balance = FALSE or omitted; do not switch = TRUE. + /// + } + Functions.prototype.weekNum = function(serialNumber, returnType) { + /// + /// Returns the week number in the year. [Api set: ExcelApi 1.2] + /// + /// Is the date-time code used by Microsoft Excel for date and time calculation. + /// Is a number (1 or 2) that determines the type of the return value. + /// + } + Functions.prototype.weekday = function(serialNumber, returnType) { + /// + /// Returns a number from 1 to 7 identifying the day of the week of a date. [Api set: ExcelApi 1.2] + /// + /// Is a number that represents a date. + /// 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. + /// + } + Functions.prototype.weibull_Dist = function(x, alpha, beta, cumulative) { + /// + /// Returns the Weibull distribution. [Api set: ExcelApi 1.2] + /// + /// Is the value at which to evaluate the function, a nonnegative number. + /// Is a parameter to the distribution, a positive number. + /// Is a parameter to the distribution, a positive number. + /// Is a logical value: for the cumulative distribution function, use TRUE; for the probability mass function, use FALSE. + /// + } + Functions.prototype.workDay = function(startDate, days, holidays) { + /// + /// Returns the serial number of the date before or after a specified number of workdays. [Api set: ExcelApi 1.2] + /// + /// Is a serial date number that represents the start date. + /// Is the number of nonweekend and non-holiday days before or after startDate. + /// 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. + /// + } + Functions.prototype.workDay_Intl = function(startDate, days, weekend, holidays) { + /// + /// Returns the serial number of the date before or after a specified number of workdays with custom weekend parameters. [Api set: ExcelApi 1.2] + /// + /// Is a serial date number that represents the start date. + /// Is the number of nonweekend and non-holiday days before or after startDate. + /// Is a number or string specifying when weekends occur. + /// 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. + /// + } + Functions.prototype.xirr = function(values, dates, guess) { + /// + /// Returns the internal rate of return for a schedule of cash flows. [Api set: ExcelApi 1.2] + /// + /// Is a series of cash flows that correspond to a schedule of payments in dates. + /// Is a schedule of payment dates that corresponds to the cash flow payments. + /// Is a number that you guess is close to the result of XIRR. + /// + } + Functions.prototype.xnpv = function(rate, values, dates) { + /// + /// Returns the net present value for a schedule of cash flows. [Api set: ExcelApi 1.2] + /// + /// Is the discount rate to apply to the cash flows. + /// Is a series of cash flows that correspond to a schedule of payments in dates. + /// Is a schedule of payment dates that corresponds to the cash flow payments. + /// + } + Functions.prototype.xor = function(values) { + /// + /// Returns a logical 'Exclusive Or' of all arguments. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Functions.prototype.year = function(serialNumber) { + /// + /// Returns the year of a date, an integer in the range 1900 - 9999. [Api set: ExcelApi 1.2] + /// + /// Is a number in the date-time code used by Microsoft Excel. + /// + } + Functions.prototype.yearFrac = function(startDate, endDate, basis) { + /// + /// Returns the year fraction representing the number of whole days between start_date and end_date. [Api set: ExcelApi 1.2] + /// + /// Is a serial date number that represents the start date. + /// Is a serial date number that represents the end date. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.yield = function(settlement, maturity, rate, pr, redemption, frequency, basis) { + /// + /// Returns the yield on a security that pays periodic interest. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's annual coupon rate. + /// Is the security's price per $100 face value. + /// Is the security's redemption value per $100 face value. + /// Is the number of coupon payments per year. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.yieldDisc = function(settlement, maturity, pr, redemption, basis) { + /// + /// Returns the annual yield for a discounted security. For example, a treasury bill. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's price per $100 face value. + /// Is the security's redemption value per $100 face value. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.yieldMat = function(settlement, maturity, issue, rate, pr, basis) { + /// + /// Returns the annual yield of a security that pays interest at maturity. [Api set: ExcelApi 1.2] + /// + /// Is the security's settlement date, expressed as a serial date number. + /// Is the security's maturity date, expressed as a serial date number. + /// Is the security's issue date, expressed as a serial date number. + /// Is the security's interest rate at date of issue. + /// Is the security's price per $100 face value. + /// Is the type of day count basis to use. + /// + } + Functions.prototype.z_Test = function(array, x, sigma) { + /// + /// Returns the one-tailed P-value of a z-test. [Api set: ExcelApi 1.2] + /// + /// Is the array or range of data against which to test X. + /// Is the value to test. + /// Is the population (known) standard deviation. If omitted, the sample standard deviation is used. + /// + } + + return Functions; + })(OfficeExtension.ClientObject); + Excel.Functions = Functions; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var GeometricShape = (function(_super) { + __extends(GeometricShape, _super); + function GeometricShape() { + /// Represents a geometric shape inside a worksheet. A geometric shape can be a rectangle, block arrow, equation symbol, flowchart item, star, banner, callout, or any other basic shape in Excel. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the shape identifier. [Api set: ExcelApi 1.9] + /// Returns the `Shape` object for the geometric shape. [Api set: ExcelApi 1.9] + } + + GeometricShape.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return GeometricShape; + })(OfficeExtension.ClientObject); + Excel.GeometricShape = GeometricShape; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the shape type for a `GeometricShape` object. [Api set: ExcelApi 1.9] + var GeometricShapeType = { + __proto__: null, + "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", + } + Excel.GeometricShapeType = GeometricShapeType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.10] + var GroupOption = { + __proto__: null, + "byRows": "byRows", + "byColumns": "byColumns", + } + Excel.GroupOption = GroupOption; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var GroupShapeCollection = (function(_super) { + __extends(GroupShapeCollection, _super); + function GroupShapeCollection() { + /// Represents the shape collection inside a shape group. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + GroupShapeCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + GroupShapeCollection.prototype.getCount = function() { + /// + /// Returns the number of shapes in the shape group. [Api set: ExcelApi 1.9] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + GroupShapeCollection.prototype.getItem = function(key) { + /// + /// Gets a shape using its name or ID. [Api set: ExcelApi 1.9] + /// + /// The name or ID of the shape to be retrieved. + /// + } + GroupShapeCollection.prototype.getItemAt = function(index) { + /// + /// Gets a shape based on its position in the collection. [Api set: ExcelApi 1.9] + /// + /// The zero-based index value of the object to be retrieved. + /// + } + GroupShapeCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a shape using its name or ID. If the shape object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.14] + /// + /// The name or ID of the shape to be retrieved. + /// + } + + return GroupShapeCollection; + })(OfficeExtension.ClientObject); + Excel.GroupShapeCollection = GroupShapeCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var HeaderFooter = (function(_super) { + __extends(HeaderFooter, _super); + function HeaderFooter() { + /// [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The center footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. [Api set: ExcelApi 1.9] + /// The center header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. [Api set: ExcelApi 1.9] + /// The left footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. [Api set: ExcelApi 1.9] + /// The left header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. [Api set: ExcelApi 1.9] + /// The right footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. [Api set: ExcelApi 1.9] + /// The right header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. [Api set: ExcelApi 1.9] + } + + HeaderFooter.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + HeaderFooter.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.HeaderFooterUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing HeaderFooter object, with properties that have already been loaded and synced. + /// + } + + return HeaderFooter; + })(OfficeExtension.ClientObject); + Excel.HeaderFooter = HeaderFooter; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var HeaderFooterGroup = (function(_super) { + __extends(HeaderFooterGroup, _super); + function HeaderFooterGroup() { + /// [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The general header/footer, used for all pages unless even/odd or first page is specified. [Api set: ExcelApi 1.9] + /// The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. [Api set: ExcelApi 1.9] + /// The first page header/footer, for all other pages general or even/odd is used. [Api set: ExcelApi 1.9] + /// The header/footer to use for odd pages, even header/footer needs to be specified for even pages. [Api set: ExcelApi 1.9] + /// The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. [Api set: ExcelApi 1.9] + /// 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 1.9] + /// 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 1.9] + } + + HeaderFooterGroup.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + HeaderFooterGroup.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.HeaderFooterGroupUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing HeaderFooterGroup object, with properties that have already been loaded and synced. + /// + } + + return HeaderFooterGroup; + })(OfficeExtension.ClientObject); + Excel.HeaderFooterGroup = HeaderFooterGroup; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var HeaderFooterState = { + __proto__: null, + "default": "default", + "firstAndDefault": "firstAndDefault", + "oddAndEven": "oddAndEven", + "firstOddAndEven": "firstOddAndEven", + } + Excel.HeaderFooterState = HeaderFooterState; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var HorizontalAlignment = { + __proto__: null, + "general": "general", + "left": "left", + "center": "center", + "right": "right", + "fill": "fill", + "justify": "justify", + "centerAcrossSelection": "centerAcrossSelection", + "distributed": "distributed", + } + Excel.HorizontalAlignment = HorizontalAlignment; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var Icon = (function() { + function Icon() { + /// Represents a cell icon. [Api set: ExcelApi 1.2] + /// Specifies the index of the icon in the given set. [Api set: ExcelApi 1.2] + /// Specifies the set that the icon is part of. [Api set: ExcelApi 1.2] + } + return Icon; + })(); + Interfaces.Icon.__proto__ = null; + Interfaces.Icon = Icon; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.2] + var IconSet = { + __proto__: null, + "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", + } + Excel.IconSet = IconSet; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var IconSetConditionalFormat = (function(_super) { + __extends(IconSetConditionalFormat, _super); + function IconSetConditionalFormat() { + /// Represents an icon set criteria for conditional formatting. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// An array of criteria and icon sets 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] + /// If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. [Api set: ExcelApi 1.6] + /// If `true`, hides the values and only shows icons. [Api set: ExcelApi 1.6] + /// If set, displays the icon set option for the conditional format. [Api set: ExcelApi 1.6] + } + + IconSetConditionalFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + IconSetConditionalFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.IconSetConditionalFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing IconSetConditionalFormat object, with properties that have already been loaded and synced. + /// + } + + return IconSetConditionalFormat; + })(OfficeExtension.ClientObject); + Excel.IconSetConditionalFormat = IconSetConditionalFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var Identity = (function() { + function Identity() { + /// Represents information about a user's identity. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the user's display name. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the user's unique ID. [Api set: ExcelApi BETA (PREVIEW ONLY)] + } + return Identity; + })(); + Interfaces.Identity.__proto__ = null; + Interfaces.Identity = Identity; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Image = (function(_super) { + __extends(Image, _super); + function Image() { + /// Represents an image in the worksheet. To get the corresponding `Shape` object, use `Image.shape`. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the shape identifier for the image object. [Api set: ExcelApi 1.9] + /// Returns the `Shape` object associated with the image. [Api set: ExcelApi 1.9] + /// Returns the format of the image. [Api set: ExcelApi 1.9] + } + + Image.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return Image; + })(OfficeExtension.ClientObject); + Excel.Image = Image; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.2] + var ImageFittingMode = { + __proto__: null, + "fit": "fit", + "fitAndCenter": "fitAndCenter", + "fill": "fill", + } + Excel.ImageFittingMode = ImageFittingMode; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var InsertShiftDirection = { + __proto__: null, + "down": "down", + "right": "right", + } + Excel.InsertShiftDirection = InsertShiftDirection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var InsertWorksheetOptions = (function() { + function InsertWorksheetOptions() { + /// The options that define which worksheets to insert and where in the workbook the new worksheets will be inserted. [Api set: ExcelApi 1.13] + /// The insert position, in the current workbook, of the new worksheets. See `Excel.WorksheetPositionType` for details. The default position is "End". [Api set: ExcelApi 1.13] + /// The worksheet in the current workbook that is referenced for the `WorksheetPositionType` parameter. The default is `null`. If the `relativeTo` parameter is not set, worksheets will be inserted based on `positionType`, at the start or end of the current workbook. [Api set: ExcelApi 1.13] + /// The names of individual worksheets to insert. By default, all the worksheets from the source workbook are inserted. [Api set: ExcelApi 1.13] + } + return InsertWorksheetOptions; + })(); + Interfaces.InsertWorksheetOptions.__proto__ = null; + Interfaces.InsertWorksheetOptions = InsertWorksheetOptions; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var IterativeCalculation = (function(_super) { + __extends(IterativeCalculation, _super); + function IterativeCalculation() { + /// Represents the iterative calculation settings. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// True if Excel will use iteration to resolve circular references. [Api set: ExcelApi 1.9] + /// Specifies the maximum amount of change between each iteration as Excel resolves circular references. [Api set: ExcelApi 1.9] + /// Specifies the maximum number of iterations that Excel can use to resolve a circular reference. [Api set: ExcelApi 1.9] + } + + IterativeCalculation.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + IterativeCalculation.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.IterativeCalculationUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing IterativeCalculation object, with properties that have already been loaded and synced. + /// + } + + return IterativeCalculation; + })(OfficeExtension.ClientObject); + Excel.IterativeCalculation = IterativeCalculation; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.13] + var KeyboardDirection = { + __proto__: null, + "left": "left", + "right": "right", + "up": "up", + "down": "down", + } + Excel.KeyboardDirection = KeyboardDirection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Enum representing all accepted conditions by which a label filter can be applied. Used to configure the type of PivotFilter that is applied to the field. `PivotFilter.criteria.exclusive` can be set to `true` to invert many of these conditions. [Api set: ExcelApi 1.12] + var LabelFilterCondition = { + __proto__: null, + "unknown": "unknown", + "equals": "equals", + "beginsWith": "beginsWith", + "endsWith": "endsWith", + "contains": "contains", + "greaterThan": "greaterThan", + "greaterThanOrEqualTo": "greaterThanOrEqualTo", + "lessThan": "lessThan", + "lessThanOrEqualTo": "lessThanOrEqualTo", + "between": "between", + } + Excel.LabelFilterCondition = LabelFilterCondition; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Line = (function(_super) { + __extends(Line, _super); + function Line() { + /// Represents a line inside a worksheet. To get the corresponding `Shape` object, use `Line.shape`. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the length of the arrowhead at the beginning of the specified line. [Api set: ExcelApi 1.9] + /// Represents the style of the arrowhead at the beginning of the specified line. [Api set: ExcelApi 1.9] + /// Represents the width of the arrowhead at the beginning of the specified line. [Api set: ExcelApi 1.9] + /// Represents the shape to which the beginning of the specified line is attached. [Api set: ExcelApi 1.9] + /// Represents the connection site to which the beginning of a connector is connected. Returns `null` when the beginning of the line is not attached to any shape. [Api set: ExcelApi 1.9] + /// Represents the length of the arrowhead at the end of the specified line. [Api set: ExcelApi 1.9] + /// Represents the style of the arrowhead at the end of the specified line. [Api set: ExcelApi 1.9] + /// Represents the width of the arrowhead at the end of the specified line. [Api set: ExcelApi 1.9] + /// Represents the shape to which the end of the specified line is attached. [Api set: ExcelApi 1.9] + /// Represents the connection site to which the end of a connector is connected. Returns `null` when the end of the line is not attached to any shape. [Api set: ExcelApi 1.9] + /// Specifies the shape identifier. [Api set: ExcelApi 1.9] + /// Specifies if the beginning of the specified line is connected to a shape. [Api set: ExcelApi 1.9] + /// Specifies if the end of the specified line is connected to a shape. [Api set: ExcelApi 1.9] + /// Returns the `Shape` object associated with the line. [Api set: ExcelApi 1.9] + /// Represents the connector type for the line. [Api set: ExcelApi 1.9] + } + + Line.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Line.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.LineUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Line object, with properties that have already been loaded and synced. + /// + } + Line.prototype.connectBeginShape = function(shape, connectionSite) { + /// + /// Attaches the beginning of the specified connector to a specified shape. [Api set: ExcelApi 1.9] + /// + /// The shape to connect. + /// The connection site on the shape to which the beginning of the connector is attached. Must be an integer between 0 (inclusive) and the connection-site count of the specified shape (exclusive). + /// + } + Line.prototype.connectEndShape = function(shape, connectionSite) { + /// + /// Attaches the end of the specified connector to a specified shape. [Api set: ExcelApi 1.9] + /// + /// The shape to connect. + /// The connection site on the shape to which the end of the connector is attached. Must be an integer between 0 (inclusive) and the connection-site count of the specified shape (exclusive). + /// + } + Line.prototype.disconnectBeginShape = function() { + /// + /// Detaches the beginning of the specified connector from a shape. [Api set: ExcelApi 1.9] + /// + /// + } + Line.prototype.disconnectEndShape = function() { + /// + /// Detaches the end of the specified connector from a shape. [Api set: ExcelApi 1.9] + /// + /// + } + + return Line; + })(OfficeExtension.ClientObject); + Excel.Line = Line; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var LinkedDataType = (function(_super) { + __extends(LinkedDataType, _super); + function LinkedDataType() { + /// Represents a linked data type. A linked data type is a data type connected to an online data source. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The name of the data provider for the linked data type. This may change when information is retrieved from the service. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The local time-zone date and time since the workbook was opened when the linked data type was last refreshed. Returns `undefined` if the linked data type has not been refreshed. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The name of the linked data type. This may change when information is retrieved from the service. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The frequency, in seconds, at which the linked data type is refreshed if `refreshMode` is set to "Periodic". [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The mechanism by which the data for the linked data type is retrieved. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The unique ID of the linked data type. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Returns an array with all the refresh modes supported by the linked data type. The contents of the array may change when information is retrieved from the service. [Api set: ExcelApi BETA (PREVIEW ONLY)] + } + + LinkedDataType.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + LinkedDataType.prototype.requestRefresh = function() { + /// + /// Makes a request to refresh the linked data type. If the service is busy or otherwise temporarily inaccessible, the request will not be fulfilled. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + } + LinkedDataType.prototype.requestSetRefreshMode = function(refreshMode) { + /// + /// Makes a request to change the refresh mode for this linked data type. If the given refresh mode is not supported by this linked data type the mode is left unchanged. If set to "Periodic", the refresh interval is set to a predetermined value based on the particular linked data type. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The intended mode to which this linked data type is requested to change. + /// + } + + return LinkedDataType; + })(OfficeExtension.ClientObject); + Excel.LinkedDataType = LinkedDataType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var LinkedDataTypeAddedEventArgs = (function() { + function LinkedDataTypeAddedEventArgs() { + /// The argument that is passed to the event handler after a new linked data type is added to the workbook. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The unique ID of the new linked data type. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi BETA (PREVIEW ONLY)] + } + return LinkedDataTypeAddedEventArgs; + })(); + Interfaces.LinkedDataTypeAddedEventArgs.__proto__ = null; + Interfaces.LinkedDataTypeAddedEventArgs = LinkedDataTypeAddedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var LinkedDataTypeCollection = (function(_super) { + __extends(LinkedDataTypeCollection, _super); + function LinkedDataTypeCollection() { + /// Represents a collection of linked data types. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + LinkedDataTypeCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + LinkedDataTypeCollection.prototype.getCount = function() { + /// + /// Gets the number of linked data types in the collection. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + LinkedDataTypeCollection.prototype.getItem = function(key) { + /// + /// Gets a linked data type by service ID. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The ID of the linked data type. + /// + } + LinkedDataTypeCollection.prototype.getItemAt = function(index) { + /// + /// Gets a linked data type by its index in the collection. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The index of the linked data type object in the collection. + /// The linked data type at the given index. + } + LinkedDataTypeCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a linked data type by ID. If the linked data type doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The service ID of the linked data type. + /// + } + LinkedDataTypeCollection.prototype.requestRefreshAll = function() { + /// + /// Makes a request to refresh all the linked data types in the collection. If the service is busy or otherwise temporarily inaccessible, the request will not be fulfilled. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + } + + return LinkedDataTypeCollection; + })(OfficeExtension.ClientObject); + Excel.LinkedDataTypeCollection = LinkedDataTypeCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Representation of a refresh mode. [Api set: ExcelApi BETA (PREVIEW ONLY)] + var LinkedDataTypeRefreshMode = { + __proto__: null, + "unknown": "unknown", + "manual": "manual", + "onLoad": "onLoad", + "periodic": "periodic", + } + Excel.LinkedDataTypeRefreshMode = LinkedDataTypeRefreshMode; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var LinkedDataTypeState = { + __proto__: null, + "none": "none", + "validLinkedData": "validLinkedData", + "disambiguationNeeded": "disambiguationNeeded", + "brokenLinkedData": "brokenLinkedData", + "fetchingData": "fetchingData", + } + Excel.LinkedDataTypeState = LinkedDataTypeState; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var LinkedWorkbook = (function(_super) { + __extends(LinkedWorkbook, _super); + function LinkedWorkbook() { + /// Contains information about a linked workbook. If a workbook has links pointing to data in another workbook, the second workbook is linked to the first workbook. In this scenario, the second workbook is called the "linked workbook". [Api set: ExcelApiOnline 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. [Api set: ExcelApiOnline 1.1] + } + + LinkedWorkbook.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + LinkedWorkbook.prototype.breakLinks = function() { + /// + /// Makes a request to break the links pointing to the linked workbook. Links in formulas are replaced with the latest fetched data. The current `LinkedWorkbook` object is invalidated and removed from `LinkedWorkbookCollection`. [Api set: ExcelApiOnline 1.1] + /// + /// + } + LinkedWorkbook.prototype.refresh = function() { + /// + /// Makes a request to refresh the data retrieved from the linked workbook. [Api set: ExcelApiOnline 1.1] + /// + /// + } + + return LinkedWorkbook; + })(OfficeExtension.ClientObject); + Excel.LinkedWorkbook = LinkedWorkbook; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var LinkedWorkbookCollection = (function(_super) { + __extends(LinkedWorkbookCollection, _super); + function LinkedWorkbookCollection() { + /// Represents a collection of linked workbook objects. [Api set: ExcelApiOnline 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the update mode of the workbook links. The mode is same for all of the workbook links present in the workbook. [Api set: ExcelApiOnline 1.1] + /// Gets the loaded child items in this collection. + } + + LinkedWorkbookCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + LinkedWorkbookCollection.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.LinkedWorkbookCollectionUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing LinkedWorkbookCollection object, with properties that have already been loaded and synced. + /// + } + LinkedWorkbookCollection.prototype.breakAllLinks = function() { + /// + /// Breaks all the links to the linked workbooks. Once the links are broken, any formulas referencing workbook links are removed entirely and replaced with the most recently retrieved values. [Api set: ExcelApiOnline 1.1] + /// + /// + } + LinkedWorkbookCollection.prototype.getItem = function(key) { + /// + /// Gets information about a linked workbook by its URL. [Api set: ExcelApiOnline 1.1] + /// + /// The URL of the linked workbook. + /// The linked workbook with the given URL. + } + LinkedWorkbookCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets information about a linked workbook by its URL. If the workbook does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApiOnline 1.1] + /// + /// The URL of the linked workbook. + /// The linked workbook with given URL. + } + LinkedWorkbookCollection.prototype.refreshAll = function() { + /// + /// Makes a request to refresh all the workbook links. [Api set: ExcelApiOnline 1.1] + /// + /// + } + + return LinkedWorkbookCollection; + })(OfficeExtension.ClientObject); + Excel.LinkedWorkbookCollection = LinkedWorkbookCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ListDataValidation = (function() { + function ListDataValidation() { + /// Represents the List data validation criteria. [Api set: ExcelApi 1.8] + /// Specifies whether to display the list in a cell drop-down. The default is `true`. [Api set: ExcelApi 1.8] + /// Source of the list for data validation When setting the value, it can be passed in as a `Range` object, or a string that contains a comma-separated number, boolean, or date. [Api set: ExcelApi 1.8] + } + return ListDataValidation; + })(); + Interfaces.ListDataValidation.__proto__ = null; + Interfaces.ListDataValidation = ListDataValidation; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// An enum that specifies the query load to destination. [Api set: ExcelApi 1.14] + var LoadToType = { + __proto__: null, + "connectionOnly": "connectionOnly", + "table": "table", + "pivotTable": "pivotTable", + "pivotChart": "pivotChart", + } + Excel.LoadToType = LoadToType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var NamedItem = (function(_super) { + __extends(NamedItem, _super); + function NamedItem() { + /// 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] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns an object containing values and types of the named item. [Api set: ExcelApi 1.7] + /// Specifies the comment associated with this name. [Api set: ExcelApi 1.4] + /// The formula of the named item. Formulas always start with an equal sign ("="). [Api set: ExcelApi 1.7] + /// The name of the object. [Api set: ExcelApi 1.1] + /// Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. [Api set: ExcelApi 1.4] + /// Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + /// Represents the value computed by the name's formula. For a named range, will return the range address. [Api set: ExcelApi 1.1] + /// A JSON representation of the values in this named item. Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. [Api set: ExcelApi 1.16] + /// A JSON representation of the values in this named item. Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. [Api set: ExcelApi 1.16] + /// Specifies if the object is visible. [Api set: ExcelApi 1.1] + /// 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] + /// Returns the worksheet to which the named item is scoped. If the item is scoped to the workbook instead, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + } + + NamedItem.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + NamedItem.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.NamedItemUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing NamedItem object, with properties that have already been loaded and synced. + /// + } + NamedItem.prototype.delete = function() { + /// + /// Deletes the given name. [Api set: ExcelApi 1.4] + /// + /// + } + NamedItem.prototype.getRange = function() { + /// + /// 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] + /// + /// + } + NamedItem.prototype.getRangeOrNullObject = function() { + /// + /// Returns the range object that is associated with the name. If the named item's type is not a range, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + /// + /// + } + + return NamedItem; + })(OfficeExtension.ClientObject); + Excel.NamedItem = NamedItem; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var NamedItemArrayValues = (function(_super) { + __extends(NamedItemArrayValues, _super); + function NamedItemArrayValues() { + /// Represents an object containing values and types of a named item. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the types for each item in the named item array [Api set: ExcelApi 1.7] + /// Represents the values of each item in the named item array. [Api set: ExcelApi 1.7] + /// A JSON representation of the values in this named item array. Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItemArrayValues.valuesAsJsonLocal`. [Api set: ExcelApi 1.16] + /// A JSON representation of the values in this named item array. Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItemArrayValues.valuesAsJson`. [Api set: ExcelApi 1.16] + } + + NamedItemArrayValues.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return NamedItemArrayValues; + })(OfficeExtension.ClientObject); + Excel.NamedItemArrayValues = NamedItemArrayValues; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var NamedItemCollection = (function(_super) { + __extends(NamedItemCollection, _super); + function NamedItemCollection() { + /// 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] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + NamedItemCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + NamedItemCollection.prototype.add = function(name, reference, comment) { + /// + /// Adds a new name to the collection of the given scope. [Api set: ExcelApi 1.4] + /// + /// The name of the named item. + /// The formula or the range that the name will refer to. + /// Optional. The comment associated with the named item. + /// + } + NamedItemCollection.prototype.addFormulaLocal = function(name, formula, comment) { + /// + /// Adds a new name to the collection of the given scope using the user's locale for the formula. [Api set: ExcelApi 1.4] + /// + /// The name of the named item. + /// The formula in the user's locale that the name will refer to. + /// Optional. The comment associated with the named item. + /// + } + NamedItemCollection.prototype.getCount = function() { + /// + /// Gets the number of named items in the collection. [Api set: ExcelApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + NamedItemCollection.prototype.getItem = function(name) { + /// + /// Gets a `NamedItem` object using its name. [Api set: ExcelApi 1.1] + /// + /// Nameditem name. + /// + } + NamedItemCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a `NamedItem` object using its name. If the object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + /// + /// Nameditem name. + /// + } + + return NamedItemCollection; + })(OfficeExtension.ClientObject); + Excel.NamedItemCollection = NamedItemCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.4] + var NamedItemScope = { + __proto__: null, + "worksheet": "worksheet", + "workbook": "workbook", + } + Excel.NamedItemScope = NamedItemScope; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + var NamedItemType = { + __proto__: null, + "string": "string", + "integer": "integer", + "double": "double", + "boolean": "boolean", + "range": "range", + "error": "error", + "array": "array", + } + Excel.NamedItemType = NamedItemType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var NamedSheetView = (function(_super) { + __extends(NamedSheetView, _super); + function NamedSheetView() { + /// Represents a named sheet view of a worksheet. A sheet view stores the sort and filter rules for a particular worksheet. Every sheet view (even a temporary sheet view) has a unique, worksheet-scoped name that is used to access the view. [Api set: ExcelApiOnline 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets or sets the name of the sheet view. The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. [Api set: ExcelApiOnline 1.1] + } + + NamedSheetView.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + NamedSheetView.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.NamedSheetViewUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing NamedSheetView object, with properties that have already been loaded and synced. + /// + } + NamedSheetView.prototype.activate = function() { + /// + /// Activates this sheet view. This is equivalent to using "Switch To" in the Excel UI. [Api set: ExcelApiOnline 1.1] + /// + /// + } + NamedSheetView.prototype.delete = function() { + /// + /// Removes the sheet view from the worksheet. [Api set: ExcelApiOnline 1.1] + /// + /// + } + NamedSheetView.prototype.duplicate = function(name) { + /// + /// Creates a copy of this sheet view. [Api set: ExcelApiOnline 1.1] + /// + /// The name of the duplicated sheet view. If no name is provided, one will be generated. + /// The new, duplicated sheet view. + } + + return NamedSheetView; + })(OfficeExtension.ClientObject); + Excel.NamedSheetView = NamedSheetView; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var NamedSheetViewCollection = (function(_super) { + __extends(NamedSheetViewCollection, _super); + function NamedSheetViewCollection() { + /// Represents the collection of sheet views in the worksheet. [Api set: ExcelApiOnline 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + NamedSheetViewCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + NamedSheetViewCollection.prototype.add = function(name) { + /// + /// Creates a new sheet view with the given name. [Api set: ExcelApiOnline 1.1] + /// + /// The name of the sheet view to be created. Throws an error when the provided name already exists, is empty, or is a name reserved by the worksheet. + /// The newly created sheet view object. + } + NamedSheetViewCollection.prototype.enterTemporary = function() { + /// + /// Creates and activates a new temporary sheet view. Temporary views are removed when closing the application, exiting the temporary view with the exit method, or switching to another sheet view. The temporary sheet view can also be acccessed with the empty string (""), if the temporary view exists. [Api set: ExcelApiOnline 1.1] + /// + /// The newly created sheet view object. + } + NamedSheetViewCollection.prototype.exit = function() { + /// + /// Exits the currently active sheet view. [Api set: ExcelApiOnline 1.1] + /// + /// + } + NamedSheetViewCollection.prototype.getActive = function() { + /// + /// Gets the worksheet's currently active sheet view. [Api set: ExcelApiOnline 1.1] + /// + /// The currently active sheet view for this worksheet. + } + NamedSheetViewCollection.prototype.getCount = function() { + /// + /// Gets the number of sheet views in this worksheet. Includes the temporary sheet view if it exists. [Api set: ExcelApiOnline 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + NamedSheetViewCollection.prototype.getItem = function(key) { + /// + /// Gets a sheet view using its name. [Api set: ExcelApiOnline 1.1] + /// + /// The case-sensitive name of the sheet view. Use the empty string ("") to get the temporary sheet view, if the temporary view exists. + /// The sheet view with the given name, or the temporary view if an empty string was provided. If there is no current temporary view and an empty string was provided, then an `ItemNotFound` error is thrown. + } + NamedSheetViewCollection.prototype.getItemAt = function(index) { + /// + /// Gets a sheet view by its index in the collection. [Api set: ExcelApiOnline 1.1] + /// + /// The index of the sheet view object in the collection. + /// The sheet view at the given index. + } + NamedSheetViewCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a sheet view using its name. If the sheet view object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The case-sensitive name of the sheet view. Use the empty string ("") to get the temporary sheet view, if the temporary view exists. + /// The sheet view with the given name, or the temporary view if an empty string was provided. + } + + return NamedSheetViewCollection; + })(OfficeExtension.ClientObject); + Excel.NamedSheetViewCollection = NamedSheetViewCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents a category of number formats. [Api set: ExcelApi 1.12] + var NumberFormatCategory = { + __proto__: null, + "general": "general", + "number": "number", + "currency": "currency", + "accounting": "accounting", + "date": "date", + "time": "time", + "percentage": "percentage", + "fraction": "fraction", + "scientific": "scientific", + "text": "text", + "special": "special", + "custom": "custom", + } + Excel.NumberFormatCategory = NumberFormatCategory; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var NumberFormatInfo = (function(_super) { + __extends(NumberFormatInfo, _super); + function NumberFormatInfo() { + /// Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. [Api set: ExcelApi 1.11] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the currency symbol for currency values. This is based on current system settings. [Api set: ExcelApi 1.17] + /// Gets the string used as the decimal separator for numeric values. This is based on current system settings. [Api set: ExcelApi 1.11] + /// Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on current system settings. [Api set: ExcelApi 1.11] + } + + NumberFormatInfo.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return NumberFormatInfo; + })(OfficeExtension.ClientObject); + Excel.NumberFormatInfo = NumberFormatInfo; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PageBreak = (function(_super) { + __extends(PageBreak, _super); + function PageBreak() { + /// [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the column index for the page break. [Api set: ExcelApi 1.9] + /// Specifies the row index for the page break. [Api set: ExcelApi 1.9] + } + + PageBreak.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + PageBreak.prototype.delete = function() { + /// + /// Deletes a page break object. [Api set: ExcelApi 1.9] + /// + /// + } + PageBreak.prototype.getCellAfterBreak = function() { + /// + /// Gets the first cell after the page break. [Api set: ExcelApi 1.9] + /// + /// + } + + return PageBreak; + })(OfficeExtension.ClientObject); + Excel.PageBreak = PageBreak; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PageBreakCollection = (function(_super) { + __extends(PageBreakCollection, _super); + function PageBreakCollection() { + /// [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + PageBreakCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + PageBreakCollection.prototype.add = function(pageBreakRange) { + /// + /// Adds a page break before the top-left cell of the range specified. [Api set: ExcelApi 1.9] + /// + /// The range immediately after the page break to be added. + /// + } + PageBreakCollection.prototype.getCount = function() { + /// + /// Gets the number of page breaks in the collection. [Api set: ExcelApi 1.9] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + PageBreakCollection.prototype.getItem = function(index) { + /// + /// Gets a page break object via the index. [Api set: ExcelApi 1.9] + /// + /// Index of the page break. + /// + } + PageBreakCollection.prototype.removePageBreaks = function() { + /// + /// Resets all manual page breaks in the collection. [Api set: ExcelApi 1.9] + /// + /// + } + + return PageBreakCollection; + })(OfficeExtension.ClientObject); + Excel.PageBreakCollection = PageBreakCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PageLayout = (function(_super) { + __extends(PageLayout, _super); + function PageLayout() { + /// Represents layout and print settings that are not dependent on any printer-specific implementation. These settings include margins, orientation, page numbering, title rows, and print area. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The worksheet's black and white print option. [Api set: ExcelApi 1.9] + /// The worksheet's bottom page margin to use for printing in points. [Api set: ExcelApi 1.9] + /// The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. [Api set: ExcelApi 1.9] + /// The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. [Api set: ExcelApi 1.9] + /// The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. [Api set: ExcelApi 1.9] + /// The worksheet's first page number to print. A `null` value represents "auto" page numbering. [Api set: ExcelApi 1.9] + /// The worksheet's footer margin, in points, for use when printing. [Api set: ExcelApi 1.9] + /// The worksheet's header margin, in points, for use when printing. [Api set: ExcelApi 1.9] + /// Header and footer configuration for the worksheet. [Api set: ExcelApi 1.9] + /// The worksheet's left margin, in points, for use when printing. [Api set: ExcelApi 1.9] + /// The worksheet's orientation of the page. [Api set: ExcelApi 1.9] + /// The worksheet's paper size of the page. [Api set: ExcelApi 1.9] + /// Specifies if the worksheet's comments should be displayed when printing. [Api set: ExcelApi 1.9] + /// The worksheet's print errors option. [Api set: ExcelApi 1.9] + /// Specifies if the worksheet's gridlines will be printed. [Api set: ExcelApi 1.9] + /// Specifies if the worksheet's headings will be printed. [Api set: ExcelApi 1.9] + /// The worksheet's page print order option. This specifies the order to use for processing the page number printed. [Api set: ExcelApi 1.9] + /// The worksheet's right margin, in points, for use when printing. [Api set: ExcelApi 1.9] + /// The worksheet's top margin, in points, for use when printing. [Api set: ExcelApi 1.9] + /// The worksheet's print zoom options. The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). [Api set: ExcelApi 1.9] + } + + PageLayout.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + PageLayout.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.PageLayoutUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing PageLayout object, with properties that have already been loaded and synced. + /// + } + PageLayout.prototype.getPrintArea = function() { + /// + /// 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 1.9] + /// + /// + } + PageLayout.prototype.getPrintAreaOrNullObject = function() { + /// + /// Gets the `RangeAreas` object, comprising one or more rectangular ranges, that represents the print area for the worksheet. If there is no print area, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.9] + /// + /// + } + PageLayout.prototype.getPrintTitleColumns = function() { + /// + /// Gets the range object representing the title columns. [Api set: ExcelApi 1.9] + /// + /// + } + PageLayout.prototype.getPrintTitleColumnsOrNullObject = function() { + /// + /// Gets the range object representing the title columns. If not set, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.9] + /// + /// + } + PageLayout.prototype.getPrintTitleRows = function() { + /// + /// Gets the range object representing the title rows. [Api set: ExcelApi 1.9] + /// + /// + } + PageLayout.prototype.getPrintTitleRowsOrNullObject = function() { + /// + /// Gets the range object representing the title rows. If not set, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.9] + /// + /// + } + PageLayout.prototype.setPrintArea = function(printArea) { + /// + /// Sets the worksheet's print area. [Api set: ExcelApi 1.9] + /// + /// The range or ranges of the content to print. + /// + } + PageLayout.prototype.setPrintMargins = function(unit, marginOptions) { + /// + /// Sets the worksheet's page margins with units. [Api set: ExcelApi 1.9] + /// + /// Measurement unit for the margins provided. + /// Margin values to set. Margins not provided remain unchanged. + /// + } + PageLayout.prototype.setPrintTitleColumns = function(printTitleColumns) { + /// + /// Sets the columns that contain the cells to be repeated at the left of each page of the worksheet for printing. [Api set: ExcelApi 1.9] + /// + /// The columns to be repeated to the left of each page. The range must span the entire column to be valid. + /// + } + PageLayout.prototype.setPrintTitleRows = function(printTitleRows) { + /// + /// Sets the rows that contain the cells to be repeated at the top of each page of the worksheet for printing. [Api set: ExcelApi 1.9] + /// + /// The rows to be repeated at the top of each page. The range must span the entire row to be valid. + /// + } + + return PageLayout; + })(OfficeExtension.ClientObject); + Excel.PageLayout = PageLayout; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PageLayoutMarginOptions = (function() { + function PageLayoutMarginOptions() { + /// Represents the options in page layout margins. [Api set: ExcelApi 1.9] + /// Specifies the page layout bottom margin in the unit specified to use for printing. [Api set: ExcelApi 1.9] + /// Specifies the page layout footer margin in the unit specified to use for printing. [Api set: ExcelApi 1.9] + /// Specifies the page layout header margin in the unit specified to use for printing. [Api set: ExcelApi 1.9] + /// Specifies the page layout left margin in the unit specified to use for printing. [Api set: ExcelApi 1.9] + /// Specifies the page layout right margin in the unit specified to use for printing. [Api set: ExcelApi 1.9] + /// Specifies the page layout top margin in the unit specified to use for printing. [Api set: ExcelApi 1.9] + } + return PageLayoutMarginOptions; + })(); + Interfaces.PageLayoutMarginOptions.__proto__ = null; + Interfaces.PageLayoutMarginOptions = PageLayoutMarginOptions; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PageLayoutZoomOptions = (function() { + function PageLayoutZoomOptions() { + /// Represents page zoom properties. [Api set: ExcelApi 1.9] + /// Number of pages to fit horizontally. This value can be `null` if percentage scale is used. [Api set: ExcelApi 1.9] + /// 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 1.9] + /// Number of pages to fit vertically. This value can be `null` if percentage scale is used. [Api set: ExcelApi 1.9] + } + return PageLayoutZoomOptions; + })(); + Interfaces.PageLayoutZoomOptions.__proto__ = null; + Interfaces.PageLayoutZoomOptions = PageLayoutZoomOptions; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var PageOrientation = { + __proto__: null, + "portrait": "portrait", + "landscape": "landscape", + } + Excel.PageOrientation = PageOrientation; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var PaperType = { + __proto__: null, + "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", + } + Excel.PaperType = PaperType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// The format of the image. [Api set: ExcelApi 1.9] + var PictureFormat = { + __proto__: null, + "unknown": "unknown", + "bmp": "bmp", + "jpeg": "jpeg", + "gif": "gif", + "png": "png", + "svg": "svg", + } + Excel.PictureFormat = PictureFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the axis from which to get the PivotItems. [Api set: ExcelApi 1.9] + var PivotAxis = { + __proto__: null, + "unknown": "unknown", + "row": "row", + "column": "column", + "data": "data", + "filter": "filter", + } + Excel.PivotAxis = PivotAxis; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PivotDateFilter = (function() { + function PivotDateFilter() { + /// Configurable template for a date filter to apply to a PivotField. The `condition` defines what criteria need to be set in order for the filter to operate. [Api set: ExcelApi 1.12] + /// The comparator is the static value to which other values are compared. The type of comparison is defined by the condition. [Api set: ExcelApi 1.12] + /// Specifies the condition for the filter, which defines the necessary filtering criteria. [Api set: ExcelApi 1.12] + /// If `true`, filter *excludes* items that meet criteria. The default is `false` (filter to include items that meet criteria). [Api set: ExcelApi 1.12] + /// The lower-bound of the range for the `between` filter condition. [Api set: ExcelApi 1.12] + /// The upper-bound of the range for the `between` filter condition. [Api set: ExcelApi 1.12] + /// For `equals`, `before`, `after`, and `between` filter conditions, indicates if comparisons should be made as whole days. [Api set: ExcelApi 1.12] + } + return PivotDateFilter; + })(); + Interfaces.PivotDateFilter.__proto__ = null; + Interfaces.PivotDateFilter = PivotDateFilter; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PivotField = (function(_super) { + __extends(PivotField, _super); + function PivotField() { + /// Represents the Excel PivotField. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// ID of the PivotField. [Api set: ExcelApi 1.8] + /// Returns the PivotItems associated with the PivotField. [Api set: ExcelApi 1.8] + /// Name of the PivotField. [Api set: ExcelApi 1.8] + /// Determines whether to show all items of the PivotField. [Api set: ExcelApi 1.8] + /// Subtotals of the PivotField. [Api set: ExcelApi 1.8] + } + + PivotField.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + PivotField.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.PivotFieldUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing PivotField object, with properties that have already been loaded and synced. + /// + } + PivotField.prototype.applyFilter = function(filter) { + /// + /// Sets one or more of the field's current PivotFilters and applies them to the field. If the provided filters are invalid or cannot be applied, an exception is thrown. [Api set: ExcelApi 1.12] + /// + /// A configured specific PivotFilter, or a PivotFilters interface containing multiple configured filters. + /// + } + PivotField.prototype.clearAllFilters = function() { + /// + /// Clears all criteria from all of the field's filters. This removes any active filtering on the field. [Api set: ExcelApi 1.12] + /// + /// + } + PivotField.prototype.clearFilter = function(filterType) { + /// + /// Clears all existing criteria from the field's filter of the given type (if one is currently applied). [Api set: ExcelApi 1.12] + /// + /// The type of filter on the field of which to clear all criteria. + /// + } + PivotField.prototype.getFilters = function() { + /// + /// Gets all filters currently applied on the field. [Api set: ExcelApi 1.12] + /// + /// A PivotFilters interface with all active filters. + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = {}; + return result; + } + PivotField.prototype.isFiltered = function(filterType) { + /// + /// Checks if there are any applied filters on the field. [Api set: ExcelApi 1.12] + /// + /// The filter type to check. If no type is provided, this method will check if any filter is applied. + /// True if the field has a filter of type `filterType` applied. If `filterType` is not specified, `true` is returned if the field has any applied filters. + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = false; + return result; + } + PivotField.prototype.sortByLabels = function(sortBy) { + /// + /// 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] + /// + /// Specifies if the sorting is done in ascending or descending order. + /// + } + PivotField.prototype.sortByValues = function(sortBy, valuesHierarchy, pivotItemScope) { + /// + /// 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 1.9] + /// + /// Specifies if the sorting is done in ascending or descending order. + /// Specifies the values hierarchy on the data axis to be used for sorting. + /// 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. + /// + } + + return PivotField; + })(OfficeExtension.ClientObject); + Excel.PivotField = PivotField; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PivotFieldCollection = (function(_super) { + __extends(PivotFieldCollection, _super); + function PivotFieldCollection() { + /// Represents a collection of all the PivotFields that are part of a PivotTable's hierarchy. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + PivotFieldCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + PivotFieldCollection.prototype.getCount = function() { + /// + /// Gets the number of pivot fields in the collection. [Api set: ExcelApi 1.8] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + PivotFieldCollection.prototype.getItem = function(name) { + /// + /// Gets a PivotField by its name or ID. [Api set: ExcelApi 1.8] + /// + /// Name of the PivotField to be retrieved. + /// + } + PivotFieldCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a PivotField by name. If the PivotField does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.8] + /// + /// Name of the PivotField to be retrieved. + /// + } + + return PivotFieldCollection; + })(OfficeExtension.ClientObject); + Excel.PivotFieldCollection = PivotFieldCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PivotFilters = (function() { + function PivotFilters() { + /// An interface representing all PivotFilters currently applied to a given PivotField. [Api set: ExcelApi 1.12] + /// The PivotField's currently applied date filter. This property is `null` if no value filter is applied. [Api set: ExcelApi 1.12] + /// The PivotField's currently applied label filter. This property is `null` if no value filter is applied. [Api set: ExcelApi 1.12] + /// The PivotField's currently applied manual filter. This property is `null` if no value filter is applied. [Api set: ExcelApi 1.12] + /// The PivotField's currently applied value filter. This property is `null` if no value filter is applied. [Api set: ExcelApi 1.12] + } + return PivotFilters; + })(); + Interfaces.PivotFilters.__proto__ = null; + Interfaces.PivotFilters = PivotFilters; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the criteria for the top/bottom values filter. [Api set: ExcelApi 1.9] + var PivotFilterTopBottomCriterion = { + __proto__: null, + "invalid": "invalid", + "topItems": "topItems", + "topPercent": "topPercent", + "topSum": "topSum", + "bottomItems": "bottomItems", + "bottomPercent": "bottomPercent", + "bottomSum": "bottomSum", + } + Excel.PivotFilterTopBottomCriterion = PivotFilterTopBottomCriterion; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// A simple enum that represents a type of filter for a PivotField. [Api set: ExcelApi 1.12] + var PivotFilterType = { + __proto__: null, + "unknown": "unknown", + "value": "value", + "manual": "manual", + "label": "label", + "date": "date", + } + Excel.PivotFilterType = PivotFilterType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PivotHierarchy = (function(_super) { + __extends(PivotHierarchy, _super); + function PivotHierarchy() { + /// Represents the Excel PivotHierarchy. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the PivotFields associated with the PivotHierarchy. [Api set: ExcelApi 1.8] + /// ID of the PivotHierarchy. [Api set: ExcelApi 1.8] + /// Name of the PivotHierarchy. [Api set: ExcelApi 1.8] + } + + PivotHierarchy.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + PivotHierarchy.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.PivotHierarchyUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing PivotHierarchy object, with properties that have already been loaded and synced. + /// + } + + return PivotHierarchy; + })(OfficeExtension.ClientObject); + Excel.PivotHierarchy = PivotHierarchy; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PivotHierarchyCollection = (function(_super) { + __extends(PivotHierarchyCollection, _super); + function PivotHierarchyCollection() { + /// Represents a collection of all the PivotHierarchies that are part of the PivotTable. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + PivotHierarchyCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + PivotHierarchyCollection.prototype.getCount = function() { + /// + /// Gets the number of pivot hierarchies in the collection. [Api set: ExcelApi 1.8] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + PivotHierarchyCollection.prototype.getItem = function(name) { + /// + /// Gets a PivotHierarchy by its name or ID. [Api set: ExcelApi 1.8] + /// + /// Name of the PivotHierarchy to be retrieved. + /// + } + PivotHierarchyCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a PivotHierarchy by name. If the PivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.8] + /// + /// Name of the PivotHierarchy to be retrieved. + /// + } + + return PivotHierarchyCollection; + })(OfficeExtension.ClientObject); + Excel.PivotHierarchyCollection = PivotHierarchyCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PivotItem = (function(_super) { + __extends(PivotItem, _super); + function PivotItem() { + /// Represents the Excel PivotItem. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// ID of the PivotItem. [Api set: ExcelApi 1.8] + /// 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] + /// Name of the PivotItem. [Api set: ExcelApi 1.8] + /// Specifies if the PivotItem is visible. [Api set: ExcelApi 1.8] + } + + PivotItem.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + PivotItem.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.PivotItemUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing PivotItem object, with properties that have already been loaded and synced. + /// + } + + return PivotItem; + })(OfficeExtension.ClientObject); + Excel.PivotItem = PivotItem; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PivotItemCollection = (function(_super) { + __extends(PivotItemCollection, _super); + function PivotItemCollection() { + /// Represents a collection of all the PivotItems related to their parent PivotField. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + PivotItemCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + PivotItemCollection.prototype.getCount = function() { + /// + /// Gets the number of PivotItems in the collection. [Api set: ExcelApi 1.8] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + PivotItemCollection.prototype.getItem = function(name) { + /// + /// Gets a PivotItem by its name or ID. [Api set: ExcelApi 1.8] + /// + /// Name of the PivotItem to be retrieved. + /// + } + PivotItemCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a PivotItem by name. If the PivotItem does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.8] + /// + /// Name of the PivotItem to be retrieved. + /// + } + + return PivotItemCollection; + })(OfficeExtension.ClientObject); + Excel.PivotItemCollection = PivotItemCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PivotLabelFilter = (function() { + function PivotLabelFilter() { + /// Configurable template for a label filter to apply to a PivotField. The `condition` defines what criteria need to be set in order for the filter to operate. [Api set: ExcelApi 1.12] + /// The comparator is the static value to which other values are compared. The type of comparison is defined by the condition. Note: A numeric string is treated as a number when being compared against other numeric strings. [Api set: ExcelApi 1.12] + /// Specifies the condition for the filter, which defines the necessary filtering criteria. [Api set: ExcelApi 1.12] + /// If `true`, filter *excludes* items that meet criteria. The default is `false` (filter to include items that meet criteria). [Api set: ExcelApi 1.12] + /// The lower-bound of the range for the `between` filter condition. Note: A numeric string is treated as a number when being compared against other numeric strings. [Api set: ExcelApi 1.12] + /// The substring used for `beginsWith`, `endsWith`, and `contains` filter conditions. [Api set: ExcelApi 1.12] + /// The upper-bound of the range for the `between` filter condition. Note: A numeric string is treated as a number when being compared against other numeric strings. [Api set: ExcelApi 1.12] + } + return PivotLabelFilter; + })(); + Interfaces.PivotLabelFilter.__proto__ = null; + Interfaces.PivotLabelFilter = PivotLabelFilter; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PivotLayout = (function(_super) { + __extends(PivotLayout, _super); + function PivotLayout() { + /// Represents the visual layout of the PivotTable. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The alt text description of the PivotTable. Alt text provides alternative, text-based representations of the information contained in the PivotTable. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. [Api set: ExcelApi 1.13] + /// The alt text title of the PivotTable. Alt text provides alternative, text-based representations of the information contained in the PivotTable. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. [Api set: ExcelApi 1.13] + /// Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. [Api set: ExcelApi 1.9] + /// The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. By default, this is an empty string. [Api set: ExcelApi 1.13] + /// Specifies if the field list can be shown in the UI. [Api set: ExcelApi 1.10] + /// Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. Note that the value of `emptyCellText` persists when this property is set to `false`. [Api set: ExcelApi 1.13] + /// 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] + /// The style applied to the PivotTable. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. [Api set: ExcelApi 1.9] + /// Specifies if the PivotTable report shows grand totals for columns. [Api set: ExcelApi 1.8] + /// Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). [Api set: ExcelApi 1.13] + /// Specifies if the PivotTable report shows grand totals for rows. [Api set: ExcelApi 1.8] + /// 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] + } + + PivotLayout.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + PivotLayout.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.PivotLayoutUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing PivotLayout object, with properties that have already been loaded and synced. + /// + } + PivotLayout.prototype.displayBlankLineAfterEachItem = function(display) { + /// + /// Sets whether or not to display a blank line after each item. This is set at the global level for the PivotTable and applied to individual PivotFields. This function overwrites the setting for all fields in the PivotTable to the value of `display` parameter. [Api set: ExcelApi 1.13] + /// + /// True turns on the blank-line display setting. False turns it off. + /// + } + PivotLayout.prototype.getCell = function(dataHierarchy, rowItems, columnItems) { + /// + /// Gets a unique cell in the PivotTable based on a data hierarchy and the row and column items of their respective hierarchies. The returned cell is the intersection of the given row and column that contains the data from the given hierarchy. This method is the inverse of calling `getPivotItems` and `getDataHierarchy` on a particular cell. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The `dataHierarchy` that provides the data item to find. + /// The PivotItems from the row axis that make up the value to find. + /// The PivotItems from the column axis that make up the value to find. + /// A range specifying a single cell that contains the value specified. + } + PivotLayout.prototype.getColumnLabelRange = function() { + /// + /// Returns the range where the PivotTable's column labels reside. [Api set: ExcelApi 1.8] + /// + /// + } + PivotLayout.prototype.getDataBodyRange = function() { + /// + /// Returns the range where the PivotTable's data values reside. [Api set: ExcelApi 1.8] + /// + /// + } + PivotLayout.prototype.getDataHierarchy = function(cell) { + /// + /// Gets the DataHierarchy that is used to calculate the value in a specified range within the PivotTable. [Api set: ExcelApi 1.9] + /// + /// A single cell within the PivotTable data body. + /// The DataPivotHierarchy object used to calculate the value in the specified cell. + } + PivotLayout.prototype.getFilterAxisRange = function() { + /// + /// Returns the range of the PivotTable's filter area. [Api set: ExcelApi 1.8] + /// + /// + } + PivotLayout.prototype.getPivotItems = function(axis, cell) { + /// + /// Gets the PivotItems from an axis that make up the value in a specified range within the PivotTable. [Api set: ExcelApi 1.9] + /// + /// The axis from which to get the PivotItems. Must be either "row" or "column." + /// A single cell within the PivotTable's data body. + /// A PivotItemCollection of the PivotItems that are used to calculate the values in the specified row. + } + PivotLayout.prototype.getRange = function() { + /// + /// Returns the range the PivotTable exists on, excluding the filter area. [Api set: ExcelApi 1.8] + /// + /// + } + PivotLayout.prototype.getRowLabelRange = function() { + /// + /// Returns the range where the PivotTable's row labels reside. [Api set: ExcelApi 1.8] + /// + /// + } + PivotLayout.prototype.repeatAllItemLabels = function(repeatLabels) { + /// + /// Sets the "repeat all item labels" setting across all fields in the PivotTable. [Api set: ExcelApi 1.13] + /// + /// True turns on the label-repetition display setting. False turns it off. + /// + } + PivotLayout.prototype.setAutoSortOnCell = function(cell, sortBy) { + /// + /// Sets the PivotTable to automatically sort using the specified cell to automatically select all necessary criteria and context. This behaves identically to applying an autosort from the UI. [Api set: ExcelApi 1.9] + /// + /// A single cell to use get the criteria from for applying the autosort. + /// The direction of the sort. + /// + } + PivotLayout.prototype.setStyle = function(style) { + /// + /// Sets the style applied to the PivotTable. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The style to apply to the PivotTable. An `InvalidArgumentException` is thrown if a string is provided that does not match the name of any style. + /// + } + + return PivotLayout; + })(OfficeExtension.ClientObject); + Excel.PivotLayout = PivotLayout; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.8] + var PivotLayoutType = { + __proto__: null, + "compact": "compact", + "tabular": "tabular", + "outline": "outline", + } + Excel.PivotLayoutType = PivotLayoutType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PivotManualFilter = (function() { + function PivotManualFilter() { + /// Configurable template for a manual filter to apply to a PivotField. The `condition` defines what criteria need to be set in order for the filter to operate. [Api set: ExcelApi 1.12] + /// A list of selected items to manually filter. These must be existing and valid items from the chosen field. [Api set: ExcelApi 1.12] + } + return PivotManualFilter; + })(); + Interfaces.PivotManualFilter.__proto__ = null; + Interfaces.PivotManualFilter = PivotManualFilter; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PivotTable = (function(_super) { + __extends(PivotTable, _super); + function PivotTable() { + /// Represents an Excel PivotTable. To learn more about the PivotTable object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-pivottables | Work with PivotTables using the Excel JavaScript API}. [Api set: ExcelApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. [Api set: ExcelApi 1.12] + /// The Column Pivot Hierarchies of the PivotTable. [Api set: ExcelApi 1.8] + /// The Data Pivot Hierarchies of the PivotTable. [Api set: ExcelApi 1.8] + /// Specifies if the PivotTable allows values in the data body to be edited by the user. [Api set: ExcelApi 1.9] + /// The Filter Pivot Hierarchies of the PivotTable. [Api set: ExcelApi 1.8] + /// The Pivot Hierarchies of the PivotTable. [Api set: ExcelApi 1.8] + /// ID of the PivotTable. [Api set: ExcelApi 1.5] + /// The PivotLayout describing the layout and visual structure of the PivotTable. [Api set: ExcelApi 1.8] + /// Name of the PivotTable. [Api set: ExcelApi 1.3] + /// Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. [Api set: ExcelApi 1.13] + /// The Row Pivot Hierarchies of the PivotTable. [Api set: ExcelApi 1.8] + /// Specifies if the PivotTable uses custom lists when sorting. [Api set: ExcelApi 1.9] + /// The worksheet containing the current PivotTable. [Api set: ExcelApi 1.3] + } + + PivotTable.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + PivotTable.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.PivotTableUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing PivotTable object, with properties that have already been loaded and synced. + /// + } + PivotTable.prototype.delete = function() { + /// + /// Deletes the PivotTable. [Api set: ExcelApi 1.8] + /// + /// + } + PivotTable.prototype.getDataSourceString = function() { + /// + /// Returns the string representation of the data source for the PivotTable. This method currently supports string representations for table and range objects. Otherwise, it returns an empty string. [Api set: ExcelApi 1.15] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + PivotTable.prototype.getDataSourceType = function() { + /// + /// Gets the type of the data source for the PivotTable. [Api set: ExcelApi 1.15] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + PivotTable.prototype.refresh = function() { + /// + /// Refreshes the PivotTable. [Api set: ExcelApi 1.3] + /// + /// + } + + return PivotTable; + })(OfficeExtension.ClientObject); + Excel.PivotTable = PivotTable; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PivotTableCollection = (function(_super) { + __extends(PivotTableCollection, _super); + function PivotTableCollection() { + /// Represents a collection of all the PivotTables that are part of the workbook or worksheet. [Api set: ExcelApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + PivotTableCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + PivotTableCollection.prototype.add = function(name, source, destination) { + /// + /// 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] + /// + /// The name of the new PivotTable. + /// The source data for the new PivotTable, this can either be a range (or string address including the worksheet name) or a table. + /// 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 the newly inserted PivotTable. + } + PivotTableCollection.prototype.getCount = function() { + /// + /// Gets the number of pivot tables in the collection. [Api set: ExcelApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + PivotTableCollection.prototype.getItem = function(name) { + /// + /// Gets a PivotTable by name. [Api set: ExcelApi 1.3] + /// + /// Name of the PivotTable to be retrieved. + /// + } + PivotTableCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a PivotTable by name. If the PivotTable does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + /// + /// Name of the PivotTable to be retrieved. + /// + } + PivotTableCollection.prototype.refreshAll = function() { + /// + /// Refreshes all the pivot tables in the collection. [Api set: ExcelApi 1.3] + /// + /// + } + + return PivotTableCollection; + })(OfficeExtension.ClientObject); + Excel.PivotTableCollection = PivotTableCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the DateTime Grouping condition. [Api set: ExcelApi BETA (PREVIEW ONLY)] + var PivotTableDateGroupBy = { + __proto__: null, + "invalid": "invalid", + "bySeconds": "bySeconds", + "byMinutes": "byMinutes", + "byHours": "byHours", + "byDays": "byDays", + "byMonths": "byMonths", + "byQuarters": "byQuarters", + "byYears": "byYears", + } + Excel.PivotTableDateGroupBy = PivotTableDateGroupBy; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PivotTableScopedCollection = (function(_super) { + __extends(PivotTableScopedCollection, _super); + function PivotTableScopedCollection() { + /// Represents a scoped collection of PivotTables. The PivotTables are sorted based on the location of the PivotTable's top-left corner. They are ordered top-to-bottom and then left-to-right. [Api set: ExcelApi 1.12] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + PivotTableScopedCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + PivotTableScopedCollection.prototype.getCount = function() { + /// + /// Gets the number of PivotTables in the collection. [Api set: ExcelApi 1.12] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + PivotTableScopedCollection.prototype.getFirst = function() { + /// + /// Gets the first PivotTable in the collection. The PivotTables in the collection are sorted top-to-bottom and left-to-right, such that top-left table is the first PivotTable in the collection. [Api set: ExcelApi 1.12] + /// + /// + } + PivotTableScopedCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first PivotTable in the collection. The PivotTables in the collection are sorted top-to-bottom and left-to-right, such that the top-left table is the first PivotTable in the collection. If the collection is empty, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.15] + /// + /// + } + PivotTableScopedCollection.prototype.getItem = function(key) { + /// + /// Gets a PivotTable by name. [Api set: ExcelApi 1.12] + /// + /// Name of the PivotTable to be retrieved. + /// + } + PivotTableScopedCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a PivotTable by name. If the PivotTable does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.12] + /// + /// Name of the PivotTable to be retrieved. + /// + } + + return PivotTableScopedCollection; + })(OfficeExtension.ClientObject); + Excel.PivotTableScopedCollection = PivotTableScopedCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PivotTableStyle = (function(_super) { + __extends(PivotTableStyle, _super); + function PivotTableStyle() { + /// Represents a PivotTable style, which defines style elements by PivotTable region. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the name of the PivotTable style. [Api set: ExcelApi 1.10] + /// Specifies if this `PivotTableStyle` object is read-only. [Api set: ExcelApi 1.10] + } + + PivotTableStyle.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + PivotTableStyle.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.PivotTableStyleUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing PivotTableStyle object, with properties that have already been loaded and synced. + /// + } + PivotTableStyle.prototype.delete = function() { + /// + /// Deletes the PivotTable style. [Api set: ExcelApi 1.10] + /// + /// + } + PivotTableStyle.prototype.duplicate = function() { + /// + /// Creates a duplicate of this PivotTable style with copies of all the style elements. [Api set: ExcelApi 1.10] + /// + /// The new `PivotTableStyle` object that has been duplicated from this PivotTable style. + } + + return PivotTableStyle; + })(OfficeExtension.ClientObject); + Excel.PivotTableStyle = PivotTableStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PivotTableStyleCollection = (function(_super) { + __extends(PivotTableStyleCollection, _super); + function PivotTableStyleCollection() { + /// Represents a collection of PivotTable styles. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + PivotTableStyleCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + PivotTableStyleCollection.prototype.add = function(name, makeUniqueName) { + /// + /// Creates a blank `PivotTableStyle` with the specified name. [Api set: ExcelApi 1.10] + /// + /// The unique name for the new PivotTable style. Will throw an `InvalidArgument` error if the name is already in use. + /// Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. + /// The newly created `PivotTableStyle`. + } + PivotTableStyleCollection.prototype.getCount = function() { + /// + /// Gets the number of PivotTable styles in the collection. [Api set: ExcelApi 1.10] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + PivotTableStyleCollection.prototype.getDefault = function() { + /// + /// Gets the default PivotTable style for the parent object's scope. [Api set: ExcelApi 1.10] + /// + /// The `PivotTableStyle` object that is the current default PivotTable style. + } + PivotTableStyleCollection.prototype.getItem = function(name) { + /// + /// Gets a `PivotTableStyle` by name. [Api set: ExcelApi 1.10] + /// + /// Name of the PivotTable style to be retrieved. + /// The `PivotTableStyle` object whose name matches the input. + } + PivotTableStyleCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a `PivotTableStyle` by name. If the `PivotTableStyle` does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.10] + /// + /// Name of the PivotTable style to be retrieved. + /// The `PivotTableStyle` object whose name matches the input. + } + PivotTableStyleCollection.prototype.setDefault = function(newDefaultStyle) { + /// + /// Sets the default PivotTable style for use in the parent object's scope. [Api set: ExcelApi 1.10] + /// + /// The `PivotTableStyle` object, or name of the `PivotTableStyle` object, that should be the new default. + /// + } + + return PivotTableStyleCollection; + })(OfficeExtension.ClientObject); + Excel.PivotTableStyleCollection = PivotTableStyleCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PivotValueFilter = (function() { + function PivotValueFilter() { + /// Configurable template for a value filter to apply to a PivotField. The `condition` defines what criteria need to be set in order for the filter to operate. [Api set: ExcelApi 1.12] + /// The comparator is the static value to which other values are compared. The type of comparison is defined by the condition. For example, if comparator is "50" and condition is "greaterThan", all item values that are not greater than 50 will be removed by the filter. [Api set: ExcelApi 1.12] + /// Specifies the condition for the filter, which defines the necessary filtering criteria. [Api set: ExcelApi 1.12] + /// If `true`, filter *excludes* items that meet criteria. The default is `false` (filter to include items that meet criteria). [Api set: ExcelApi 1.12] + /// The lower-bound of the range for the `between` filter condition. [Api set: ExcelApi 1.12] + /// Specifies if the filter is for the top/bottom N items, top/bottom N percent, or top/bottom N sum. [Api set: ExcelApi 1.12] + /// The "N" threshold number of items, percent, or sum to be filtered for a top/bottom filter condition. [Api set: ExcelApi 1.12] + /// The upper-bound of the range for the `between` filter condition. [Api set: ExcelApi 1.12] + /// Name of the chosen "value" in the field by which to filter. [Api set: ExcelApi 1.12] + } + return PivotValueFilter; + })(); + Interfaces.PivotValueFilter.__proto__ = null; + Interfaces.PivotValueFilter = PivotValueFilter; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the way that an object is attached to its underlying cells. [Api set: ExcelApi 1.9] + var Placement = { + __proto__: null, + "twoCell": "twoCell", + "oneCell": "oneCell", + "absolute": "absolute", + } + Excel.Placement = Placement; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var PresetCriteriaConditionalFormat = (function(_super) { + __extends(PresetCriteriaConditionalFormat, _super); + function PresetCriteriaConditionalFormat() { + /// Represents the preset criteria conditional format such as above average, below average, unique values, contains blank, nonblank, error, and noerror. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// The rule of the conditional format. [Api set: ExcelApi 1.6] + } + + PresetCriteriaConditionalFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + PresetCriteriaConditionalFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.PresetCriteriaConditionalFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing PresetCriteriaConditionalFormat object, with properties that have already been loaded and synced. + /// + } + + return PresetCriteriaConditionalFormat; + })(OfficeExtension.ClientObject); + Excel.PresetCriteriaConditionalFormat = PresetCriteriaConditionalFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var PrintComments = { + __proto__: null, + "noComments": "noComments", + "endSheet": "endSheet", + "inPlace": "inPlace", + } + Excel.PrintComments = PrintComments; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var PrintErrorType = { + __proto__: null, + "asDisplayed": "asDisplayed", + "blank": "blank", + "dash": "dash", + "notAvailable": "notAvailable", + } + Excel.PrintErrorType = PrintErrorType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var PrintMarginUnit = { + __proto__: null, + "points": "points", + "inches": "inches", + "centimeters": "centimeters", + } + Excel.PrintMarginUnit = PrintMarginUnit; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var PrintOrder = { + __proto__: null, + "downThenOver": "downThenOver", + "overThenDown": "overThenDown", + } + Excel.PrintOrder = PrintOrder; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var ProtectionSelectionMode = { + __proto__: null, + "normal": "normal", + "unlocked": "unlocked", + "none": "none", + } + Excel.ProtectionSelectionMode = ProtectionSelectionMode; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Query = (function(_super) { + __extends(Query, _super); + function Query() { + /// Represents a Power Query query. [Api set: ExcelApi 1.14] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the query error message from when the query was last refreshed. [Api set: ExcelApi 1.14] + /// Gets the query loaded to object type. [Api set: ExcelApi 1.14] + /// Specifies if the query loaded to the data model. [Api set: ExcelApi 1.14] + /// Gets the name of the query. Query names cannot contain periods or quotation marks. [Api set: ExcelApi 1.14] + /// Gets the date and time when the query was last refreshed. [Api set: ExcelApi 1.14] + /// Gets the number of rows that were loaded when the query was last refreshed. If last refresh has errors the value will be -1. [Api set: ExcelApi 1.14] + } + + Query.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return Query; + })(OfficeExtension.ClientObject); + Excel.Query = Query; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var QueryCollection = (function(_super) { + __extends(QueryCollection, _super); + function QueryCollection() { + /// Represents the collection of queries in the workbook. [Api set: ExcelApi 1.14] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + QueryCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + QueryCollection.prototype.getCount = function() { + /// + /// Gets the number of queries in the workbook. [Api set: ExcelApi 1.14] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + QueryCollection.prototype.getItem = function(key) { + /// + /// Gets a query from the collection based on its name. [Api set: ExcelApi 1.14] + /// + /// The name of the query case-insensitive. + /// The query with the given name. If there is no query by that name, then an error is thrown. + } + + return QueryCollection; + })(OfficeExtension.ClientObject); + Excel.QueryCollection = QueryCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// An enum that specifies the query load error message. [Api set: ExcelApi 1.14] + var QueryError = { + __proto__: null, + "unknown": "unknown", + "none": "none", + "failedLoadToWorksheet": "failedLoadToWorksheet", + "failedLoadToDataModel": "failedLoadToDataModel", + "failedDownload": "failedDownload", + "failedToCompleteDownload": "failedToCompleteDownload", + } + Excel.QueryError = QueryError; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Range = (function(_super) { + __extends(Range, _super); + function Range() { + /// Range represents a set of one or more contiguous cells such as a cell, a row, a column, or a block of cells. To learn more about how ranges are used throughout the API, start with {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-core-concepts#ranges | Ranges in the Excel JavaScript API}. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). [Api set: ExcelApi 1.1] + /// Represents the range reference for the specified range in the language of the user. [Api set: ExcelApi 1.1] + /// Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). [Api set: ExcelApi 1.1] + /// Specifies the total number of columns in the range. [Api set: ExcelApi 1.1] + /// Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. [Api set: ExcelApi 1.2] + /// Specifies the column number of the first cell in the range. Zero-indexed. [Api set: ExcelApi 1.1] + /// The collection of `ConditionalFormats` that intersect the range. [Api set: ExcelApi 1.6] + /// Returns a data validation object. [Api set: ExcelApi 1.8] + /// Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. [Api set: ExcelApi 1.1] + /// Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. [Api set: ExcelApi 1.1] + /// 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. If a cell has no formula, its value is returned instead. [Api set: ExcelApi 1.1] + /// Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. [Api set: ExcelApi 1.2] + /// 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 1.12] + /// Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. [Api set: ExcelApi 1.10] + /// Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. [Api set: ExcelApi 1.2] + /// Represents the hyperlink for the current range. [Api set: ExcelApi 1.7] + /// Represents if the current range is an entire column. [Api set: ExcelApi 1.7] + /// Represents if the current range is an entire row. [Api set: ExcelApi 1.7] + /// Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. [Api set: ExcelApi 1.10] + /// Represents the data type state of each cell. [Api set: ExcelApi 1.9] + /// Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. [Api set: ExcelApi 1.1] + /// Represents the category of number format of each cell. [Api set: ExcelApi 1.12] + /// Represents Excel's number format code for the given range, based on the language settings of the user. Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. Any returned text uses the locally-formatted strings based on the language specified in the system settings. [Api set: ExcelApi 1.7] + /// Returns the total number of rows in the range. [Api set: ExcelApi 1.1] + /// Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. [Api set: ExcelApi 1.2] + /// Returns the row number of the first cell in the range. Zero-indexed. [Api set: ExcelApi 1.1] + /// Represents if all the cells would be saved as an array formula. Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. Returns `null` if some cells would be saved as an array formula and some would not be. [Api set: ExcelApi 1.12] + /// Represents the range sort of the current range. [Api set: ExcelApi 1.2] + /// 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] + /// Text values of the specified range. The text value will not depend on the cell width. The number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. [Api set: ExcelApi 1.1] + /// Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. [Api set: ExcelApi 1.10] + /// Specifies the type of data in each cell. [Api set: ExcelApi 1.1] + /// Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. [Api set: ExcelApi 1.1] + /// A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. [Api set: ExcelApi 1.16] + /// A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. [Api set: ExcelApi 1.16] + /// Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. [Api set: ExcelApi 1.10] + /// The worksheet containing the current range. [Api set: ExcelApi 1.1] + } + + Range.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Range.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.RangeUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Range object, with properties that have already been loaded and synced. + /// + } + Range.prototype.autoFill = function(destinationRange, autoFillType) { + /// + /// Fills a range from the current range to the destination range using the specified AutoFill logic. The destination range can be `null` or can extend the source range either horizontally or vertically. Discontiguous ranges are not supported. For more information, see {@link https://support.microsoft.com/office/2e79a709-c814-4b27-8bc2-c4dc84d49464 | Use AutoFill and Flash Fill}. [Api set: ExcelApi 1.9, ExcelApi Preview for null `destinationRange`] + /// + /// The destination range to AutoFill. If the destination range is `null`, data is filled out based on the surrounding cells (which is the behavior when double-clicking the UI’s range fill handle). + /// The type of AutoFill. Specifies how the destination range is to be filled, based on the contents of the current range. Default is "FillDefault". + /// + } + Range.prototype.calculate = function() { + /// + /// Calculates a range of cells on a worksheet. [Api set: ExcelApi 1.6] + /// + /// + } + Range.prototype.clear = function(applyTo) { + /// + /// Clear range values, format, fill, border, etc. [Api set: ExcelApi 1.1] + /// + /// Optional. Determines the type of clear action. See `Excel.ClearApplyTo` for details. + /// + } + Range.prototype.convertDataTypeToText = function() { + /// + /// Converts the range cells with data types into text. [Api set: ExcelApi 1.9] + /// + /// + } + Range.prototype.convertToLinkedDataType = function(serviceID, languageCulture) { + /// + /// Converts the range cells into linked data types in the worksheet. [Api set: ExcelApi 1.9] + /// + /// The service ID which will be used to query the data. + /// Language culture to query the service for. + /// + } + Range.prototype.copyFrom = function(sourceRange, copyType, skipBlanks, transpose) { + /// + /// Copies cell data or formatting from the source range or `RangeAreas` to the current range. The destination range can be a different size than the source range or `RangeAreas`. The destination is expanded automatically if it's smaller than the source. Note: Like the copy functionality in the Excel UI, if the destination range is an exact multiple greater than the source range in either rows or columns, then the source content is replicated multiple times. For example, a 2x2 range copy into a 2x6 range will result in 3 copies of the original 2x2 range. [Api set: ExcelApi 1.9] + /// + /// The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must be able to be created by removing full rows or columns from a rectangular range. + /// The type of cell data or formatting to copy over. Default is "All". + /// True if to skip blank cells in the source range. Default is false. + /// True if to transpose the cells in the destination range. Default is false. + /// + } + Range.prototype.delete = function(shift) { + /// + /// Deletes the cells associated with the range. [Api set: ExcelApi 1.1] + /// + /// Specifies which way to shift the cells. See `Excel.DeleteShiftDirection` for details. + /// + } + Range.prototype.find = function(text, criteria) { + /// + /// 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 1.9] + /// + /// The string to find. + /// Additional search criteria, including the search direction and whether the search needs to match the entire cell or be case-sensitive. + /// The `Range` object representing the first cell that contains a value matching the search text and criteria. + } + Range.prototype.findOrNullObject = function(text, criteria) { + /// + /// 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, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.9] + /// + /// The string to find. + /// Additional search criteria, including the search direction and whether the search needs to match the entire cell or be case-sensitive. + /// The `Range` which matched the search criteria. + } + Range.prototype.flashFill = function() { + /// + /// Does a Flash Fill to the current range. Flash Fill automatically fills data when it senses a pattern, so the range must be a single column range and have data around it in order to find a pattern. [Api set: ExcelApi 1.9] + /// + /// + } + Range.prototype.getAbsoluteResizedRange = function(numRows, numColumns) { + /// + /// 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] + /// + /// The number of rows of the new range size. + /// The number of columns of the new range size. + /// + } + Range.prototype.getBoundingRect = function(anotherRange) { + /// + /// 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] + /// + /// The range object, address, or range name. + /// + } + Range.prototype.getCell = function(row, column) { + /// + /// 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] + /// + /// Row number of the cell to be retrieved. Zero-indexed. + /// Column number of the cell to be retrieved. Zero-indexed. + /// + } + Range.prototype.getCellProperties = function(cellPropertiesLoadOptions) { + /// + /// Returns a 2D array, encapsulating the data for each cell's font, fill, borders, alignment, and other properties. [Api set: ExcelApi 1.9] + /// + /// An object that represents which cell properties to load. + /// A 2D array where each item represents the requested properties of the corresponding cell. + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = []; + return result; + } + Range.prototype.getColumn = function(column) { + /// + /// Gets a column contained in the range. [Api set: ExcelApi 1.1] + /// + /// Column number of the range to be retrieved. Zero-indexed. + /// + } + Range.prototype.getColumnProperties = function(columnPropertiesLoadOptions) { + /// + /// Returns a single-dimensional array, encapsulating the data for each column's font, fill, borders, alignment, and other properties. For properties that are not consistent across each cell within a given column, null will be returned. [Api set: ExcelApi 1.9] + /// + /// An object that represents which column properties to load. + /// An array where each item represents the requested properties of the corresponding column. + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = []; + return result; + } + Range.prototype.getColumnsAfter = function(count) { + /// + /// Gets a certain number of columns to the right of the current `Range` object. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Range.prototype.getColumnsBefore = function(count) { + /// + /// Gets a certain number of columns to the left of the current `Range` object. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Range.prototype.getDependents = function() { + /// + /// Returns a `WorkbookRangeAreas` object that represents the range containing all the dependents of a cell in the same worksheet or in multiple worksheets. [Api set: ExcelApi 1.15] + /// + /// + } + Range.prototype.getDirectDependents = function() { + /// + /// Returns a `WorkbookRangeAreas` object that represents the range containing all the direct dependent cells of a specified range in the same worksheet or across multiple worksheets. [Api set: ExcelApi 1.13] + /// + /// + } + Range.prototype.getDirectPrecedents = function() { + /// + /// Returns a `WorkbookRangeAreas` object that represents the range containing all the direct precedent cells of a specified range in the same worksheet or across multiple worksheets. [Api set: ExcelApi 1.12] + /// + /// + } + Range.prototype.getEntireColumn = function() { + /// + /// 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] + /// + /// + } + Range.prototype.getEntireRow = function() { + /// + /// 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] + /// + /// + } + Range.prototype.getExtendedRange = function(direction, activeCell) { + /// + /// Returns a range object that includes the current range and up to the edge of the range, based on the provided direction. This matches the Ctrl+Shift+Arrow key behavior in the Excel on Windows UI. [Api set: ExcelApi 1.13] + /// + /// The direction from the active cell. + /// The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. + /// + } + Range.prototype.getImage = function() { + /// + /// Renders the range as a base64-encoded png image. **Important**: This API is currently unsupported in Excel for Mac. Visit {@link https://github.com/OfficeDev/office-js/issues/235 | OfficeDev/office-js Issue #235} for the current status. [Api set: ExcelApi 1.7] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Range.prototype.getIntersection = function(anotherRange) { + /// + /// Gets the range object that represents the rectangular intersection of the given ranges. [Api set: ExcelApi 1.1] + /// + /// The range object or range address that will be used to determine the intersection of ranges. + /// + } + Range.prototype.getIntersectionOrNullObject = function(anotherRange) { + /// + /// Gets the range object that represents the rectangular intersection of the given ranges. If no intersection is found, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + /// + /// The range object or range address that will be used to determine the intersection of ranges. + /// + } + Range.prototype.getLastCell = function() { + /// + /// Gets the last cell within the range. For example, the last cell of "B2:D5" is "D5". [Api set: ExcelApi 1.1] + /// + /// + } + Range.prototype.getLastColumn = function() { + /// + /// Gets the last column within the range. For example, the last column of "B2:D5" is "D2:D5". [Api set: ExcelApi 1.1] + /// + /// + } + Range.prototype.getLastRow = function() { + /// + /// Gets the last row within the range. For example, the last row of "B2:D5" is "B5:D5". [Api set: ExcelApi 1.1] + /// + /// + } + Range.prototype.getMergedAreasOrNullObject = function() { + /// + /// Returns a `RangeAreas` object that represents the merged areas in this range. Note that if the merged areas count in this range is more than 512, then this method will fail to return the result. If the `RangeAreas` object doesn't exist, then this function will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.13] + /// + /// + } + Range.prototype.getOffsetRange = function(rowOffset, columnOffset) { + /// + /// 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] + /// + /// 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. + /// 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. + /// + } + Range.prototype.getPivotTables = function(fullyContained) { + /// + /// Gets a scoped collection of PivotTables that overlap with the range. [Api set: ExcelApi 1.12] + /// + /// If `true`, returns only PivotTables that are fully contained within the range bounds. The default value is `false`. + /// + } + Range.prototype.getPrecedents = function() { + /// + /// Returns a `WorkbookRangeAreas` object that represents the range containing all the precedent cells of a specified range in the same worksheet or across multiple worksheets. [Api set: ExcelApi 1.14] + /// + /// + } + Range.prototype.getRangeEdge = function(direction, activeCell) { + /// + /// Returns a range object that is the edge cell of the data region that corresponds to the provided direction. This matches the Ctrl+Arrow key behavior in the Excel on Windows UI. [Api set: ExcelApi 1.13] + /// + /// The direction from the active cell. + /// The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. + /// + } + Range.prototype.getResizedRange = function(deltaRows, deltaColumns) { + /// + /// 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] + /// + /// 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. + /// 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. + /// + } + Range.prototype.getRow = function(row) { + /// + /// Gets a row contained in the range. [Api set: ExcelApi 1.1] + /// + /// Row number of the range to be retrieved. Zero-indexed. + /// + } + Range.prototype.getRowProperties = function(rowPropertiesLoadOptions) { + /// + /// Returns a single-dimensional array, encapsulating the data for each row's font, fill, borders, alignment, and other properties. For properties that are not consistent across each cell within a given row, `null` will be returned. [Api set: ExcelApi 1.9] + /// + /// An object that represents which row properties to load. + /// An array where each item represents the requested properties of the corresponding row. + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = []; + return result; + } + Range.prototype.getRowsAbove = function(count) { + /// + /// Gets a certain number of rows above the current `Range` object. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Range.prototype.getRowsBelow = function(count) { + /// + /// Gets a certain number of rows below the current `Range` object. [Api set: ExcelApi 1.2] + /// + /// 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. + /// + } + Range.prototype.getSpecialCells = function(cellType, cellValueType) { + /// + /// 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 1.9] + /// + /// The type of cells to include. + /// 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. + /// + } + Range.prototype.getSpecialCellsOrNullObject = function(cellType, cellValueType) { + /// + /// 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, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.9] + /// + /// The type of cells to include. + /// 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. + /// + } + Range.prototype.getSpillParent = function() { + /// + /// 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. [Api set: ExcelApi 1.12] + /// + /// + } + Range.prototype.getSpillParentOrNullObject = function() { + /// + /// Gets the range object containing the anchor cell for the cell getting spilled into. If it's not a spilled cell, or more than one cell is given, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.12] + /// + /// + } + Range.prototype.getSpillingToRange = function() { + /// + /// 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. [Api set: ExcelApi 1.12] + /// + /// + } + Range.prototype.getSpillingToRangeOrNullObject = function() { + /// + /// Gets the range object containing the spill range when called on an anchor cell. If the range isn't an anchor cell or the spill range can't be found, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.12] + /// + /// + } + Range.prototype.getSurroundingRegion = function() { + /// + /// 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] + /// + /// + } + Range.prototype.getTables = function(fullyContained) { + /// + /// Gets a scoped collection of tables that overlap with the range. [Api set: ExcelApi 1.9] + /// + /// If `true`, returns only tables that are fully contained within the range bounds. The default value is `false`. + /// + } + Range.prototype.getUsedRange = function(valuesOnly) { + /// + /// 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] + /// + /// Considers only cells with values as used cells. [Api set: ExcelApi 1.2] + /// + } + Range.prototype.getUsedRangeOrNullObject = function(valuesOnly) { + /// + /// Returns the used range of the given range object. If there are no used cells within the range, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + /// + /// Considers only cells with values as used cells. + /// + } + Range.prototype.getVisibleView = function() { + /// + /// Represents the visible rows of the current range. [Api set: ExcelApi 1.3] + /// + /// + } + Range.prototype.group = function(groupOption) { + /// + /// Groups columns and rows for an outline. [Api set: ExcelApi 1.10] + /// + /// Specifies how the range can be grouped by rows or columns. An `InvalidArgument` error is thrown when the group option differs from the range's `isEntireRow` or `isEntireColumn` property (i.e., `range.isEntireRow` is true and `groupOption` is "ByColumns" or `range.isEntireColumn` is true and `groupOption` is "ByRows"). + /// + } + Range.prototype.hideGroupDetails = function(groupOption) { + /// + /// Hides the details of the row or column group. [Api set: ExcelApi 1.10] + /// + /// Specifies whether to hide the details of grouped rows or grouped columns. + /// + } + Range.prototype.insert = function(shift) { + /// + /// 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] + /// + /// Specifies which way to shift the cells. See `Excel.InsertShiftDirection` for details. + /// + } + Range.prototype.merge = function(across) { + /// + /// Merge the range cells into one region in the worksheet. [Api set: ExcelApi 1.2] + /// + /// Optional. Set `true` to merge cells in each row of the specified range as separate merged cells. The default value is `false`. + /// + } + Range.prototype.moveTo = function(destinationRange) { + /// + /// Moves cell values, formatting, and formulas from current range to the destination range, replacing the old information in those cells. The destination range will be expanded automatically if it is smaller than the current range. Any cells in the destination range that are outside of the original range's area are not changed. [Api set: ExcelApi 1.11] + /// + /// destinationRange Specifies the range to where the information in this range will be moved. + /// + } + Range.prototype.removeDuplicates = function(columns, includesHeader) { + /// + /// Removes duplicate values from the range specified by the columns. [Api set: ExcelApi 1.9] + /// + /// The columns inside the range that may contain duplicates. At least one column needs to be specified. Zero-indexed. + /// True if the input data contains header. Default is false. + /// The resulting object that contains the number of rows removed and the number of remaining unique rows. + } + Range.prototype.replaceAll = function(text, replacement, criteria) { + /// + /// Finds and replaces the given string based on the criteria specified within the current range. [Api set: ExcelApi 1.9] + /// + /// String to find. + /// The string that replaces the original string. + /// Additional replacement criteria. + /// The number of replacements performed. + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + Range.prototype.select = function() { + /// + /// Selects the specified range in the Excel UI. [Api set: ExcelApi 1.1] + /// + /// + } + Range.prototype.setCellProperties = function(cellPropertiesData) { + /// + /// Updates the range based on a 2D array of cell properties, encapsulating things like font, fill, borders, and alignment. [Api set: ExcelApi 1.9] + /// + /// A 2D array that represents which properties to set in each cell. + /// + } + Range.prototype.setColumnProperties = function(columnPropertiesData) { + /// + /// Updates the range based on a single-dimensional array of column properties, encapsulating things like font, fill, borders, and alignment. [Api set: ExcelApi 1.9] + /// + /// An array that represents which properties to set in each column. + /// + } + Range.prototype.setDirty = function() { + /// + /// Set a range to be recalculated when the next recalculation occurs. [Api set: ExcelApi 1.9] + /// + /// + } + Range.prototype.setRowProperties = function(rowPropertiesData) { + /// + /// Updates the range based on a single-dimensional array of row properties, encapsulating things like font, fill, borders, and alignment. [Api set: ExcelApi 1.9] + /// + /// An array that represents which properties to set in each row. + /// + } + Range.prototype.showCard = function() { + /// + /// Displays the card for an active cell if it has rich value content. [Api set: ExcelApi 1.7] + /// + /// + } + Range.prototype.showGroupDetails = function(groupOption) { + /// + /// Shows the details of the row or column group. [Api set: ExcelApi 1.10] + /// + /// Specifies whether to show the details of grouped rows or grouped columns. + /// + } + Range.prototype.ungroup = function(groupOption) { + /// + /// Ungroups columns and rows for an outline. [Api set: ExcelApi 1.10] + /// + /// Specifies how the range can be ungrouped by rows or columns. + /// + } + Range.prototype.unmerge = function() { + /// + /// Unmerge the range cells into separate cells. [Api set: ExcelApi 1.2] + /// + /// + } + + Range.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + /// + /// + } + + Range.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Range; + })(OfficeExtension.ClientObject); + Excel.Range = Range; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RangeAreas = (function(_super) { + __extends(RangeAreas, _super); + function RangeAreas() { + /// `RangeAreas` represents a collection of one or more rectangular ranges in the same worksheet. To learn how to use discontiguous ranges, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-multiple-ranges | Work with multiple ranges simultaneously in Excel add-ins}. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the `RangeAreas` 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"). [Api set: ExcelApi 1.9] + /// Returns the `RangeAreas` reference in the user locale. [Api set: ExcelApi 1.9] + /// Returns the number of rectangular ranges that comprise this `RangeAreas` object. [Api set: ExcelApi 1.9] + /// Returns a collection of rectangular ranges that comprise this `RangeAreas` object. [Api set: ExcelApi 1.9] + /// 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). [Api set: ExcelApi 1.9] + /// Returns a collection of conditional formats that intersect with any cells in this `RangeAreas` object. [Api set: ExcelApi 1.9] + /// Returns a data validation object for all ranges in the `RangeAreas`. [Api set: ExcelApi 1.9] + /// Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. [Api set: ExcelApi 1.9] + /// Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). [Api set: ExcelApi 1.9] + /// Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). [Api set: ExcelApi 1.9] + /// 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 1.9] + /// Returns the worksheet for the current `RangeAreas`. [Api set: ExcelApi 1.9] + } + + RangeAreas.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + RangeAreas.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.RangeAreasUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing RangeAreas object, with properties that have already been loaded and synced. + /// + } + RangeAreas.prototype.calculate = function() { + /// + /// Calculates all cells in the `RangeAreas`. [Api set: ExcelApi 1.9] + /// + /// + } + RangeAreas.prototype.clear = function(applyTo) { + /// + /// Clears values, format, fill, border, and other properties on each of the areas that comprise this `RangeAreas` object. [Api set: ExcelApi 1.9] + /// + /// Optional. Determines the type of clear action. See `Excel.ClearApplyTo` for details. Default is "All". + /// + } + RangeAreas.prototype.convertDataTypeToText = function() { + /// + /// Converts all cells in the `RangeAreas` with data types into text. [Api set: ExcelApi 1.9] + /// + /// + } + RangeAreas.prototype.convertToLinkedDataType = function(serviceID, languageCulture) { + /// + /// Converts all cells in the `RangeAreas` into linked data types. [Api set: ExcelApi 1.9] + /// + /// The service ID which will be used to query the data. + /// Language culture to query the service for. + /// + } + RangeAreas.prototype.copyFrom = function(sourceRange, copyType, skipBlanks, transpose) { + /// + /// Copies cell data or formatting from the source range or `RangeAreas` to the current `RangeAreas`. The destination `RangeAreas` can be a different size than the source range or `RangeAreas`. The destination will be expanded automatically if it is smaller than the source. [Api set: ExcelApi 1.9] + /// + /// The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must able to be created by removing full rows or columns from a rectangular range. + /// The type of cell data or formatting to copy over. Default is "All". + /// True if to skip blank cells in the source range or `RangeAreas`. Default is false. + /// True if to transpose the cells in the destination `RangeAreas`. Default is false. + /// + } + RangeAreas.prototype.getEntireColumn = function() { + /// + /// 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 1.9] + /// + /// + } + RangeAreas.prototype.getEntireRow = function() { + /// + /// 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 1.9] + /// + /// + } + RangeAreas.prototype.getIntersection = function(anotherRange) { + /// + /// 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 1.9] + /// + /// The range, `RangeAreas` object, or range address that will be used to determine the intersection. + /// + } + RangeAreas.prototype.getIntersectionOrNullObject = function(anotherRange) { + /// + /// Returns the `RangeAreas` object that represents the intersection of the given ranges or `RangeAreas`. If no intersection is found, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.9] + /// + /// The range, `RangeAreas` object, or address that will be used to determine the intersection. + /// + } + RangeAreas.prototype.getOffsetRangeAreas = function(rowOffset, columnOffset) { + /// + /// Returns a `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 1.9] + /// + /// 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. + /// 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. + /// + } + RangeAreas.prototype.getSpecialCells = function(cellType, cellValueType) { + /// + /// 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 1.9] + /// + /// The type of cells to include. + /// 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. + /// + } + RangeAreas.prototype.getSpecialCellsOrNullObject = function(cellType, cellValueType) { + /// + /// Returns a `RangeAreas` object that represents all the cells that match the specified type and value. If no special cells are found that match the criteria, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.9] + /// + /// The type of cells to include. + /// 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. + /// + } + RangeAreas.prototype.getTables = function(fullyContained) { + /// + /// Returns a scoped collection of tables that overlap with any range in this `RangeAreas` object. [Api set: ExcelApi 1.9] + /// + /// If `true`, returns only tables that are fully contained within the range bounds. Default is `false`. + /// + } + RangeAreas.prototype.getUsedRangeAreas = function(valuesOnly) { + /// + /// 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 1.9] + /// + /// Whether to only consider cells with values as used cells. Default is `false`. + /// + } + RangeAreas.prototype.getUsedRangeAreasOrNullObject = function(valuesOnly) { + /// + /// 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`, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.9] + /// + /// Whether to only consider cells with values as used cells. + /// + } + RangeAreas.prototype.setDirty = function() { + /// + /// Sets the `RangeAreas` to be recalculated when the next recalculation occurs. [Api set: ExcelApi 1.9] + /// + /// + } + + RangeAreas.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + /// + /// + } + + RangeAreas.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return RangeAreas; + })(OfficeExtension.ClientObject); + Excel.RangeAreas = RangeAreas; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RangeAreasCollection = (function(_super) { + __extends(RangeAreasCollection, _super); + function RangeAreasCollection() { + /// Contains the collection of cross-workbook level ranges. [Api set: ExcelApi 1.12] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + RangeAreasCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + RangeAreasCollection.prototype.getCount = function() { + /// + /// Gets the number of `RangeAreas` objects in this collection. [Api set: ExcelApi 1.12] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + RangeAreasCollection.prototype.getItemAt = function(index) { + /// + /// Returns the `RangeAreas` object based on position in the collection. [Api set: ExcelApi 1.12] + /// + /// Index value of the range object to be retrieved. Zero-indexed. + /// + } + + return RangeAreasCollection; + })(OfficeExtension.ClientObject); + Excel.RangeAreasCollection = RangeAreasCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RangeBorder = (function(_super) { + __extends(RangeBorder, _super); + function RangeBorder() { + /// Represents the border of an object. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.1] + /// Constant value that indicates the specific side of the border. See `Excel.BorderIndex` for details. [Api set: ExcelApi 1.1] + /// One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. [Api set: ExcelApi 1.1] + /// Specifies a double that lightens or darkens a color for the 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 a uniform `tintAndShade` setting. [Api set: ExcelApi 1.9] + /// Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. [Api set: ExcelApi 1.1] + } + + RangeBorder.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + RangeBorder.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.RangeBorderUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing RangeBorder object, with properties that have already been loaded and synced. + /// + } + + return RangeBorder; + })(OfficeExtension.ClientObject); + Excel.RangeBorder = RangeBorder; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RangeBorderCollection = (function(_super) { + __extends(RangeBorderCollection, _super); + function RangeBorderCollection() { + /// Represents the border objects that make up the range border. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Number of border objects in the collection. [Api set: ExcelApi 1.1] + /// Specifies 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 collection doesn't have a uniform `tintAndShade` setting. [Api set: ExcelApi 1.9] + /// Gets the loaded child items in this collection. + } + + RangeBorderCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + RangeBorderCollection.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.RangeBorderCollectionUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing RangeBorderCollection object, with properties that have already been loaded and synced. + /// + } + RangeBorderCollection.prototype.getItem = function(index) { + /// + /// Gets a border object using its name. [Api set: ExcelApi 1.1] + /// + /// Index value of the border object to be retrieved. See `Excel.BorderIndex` for details. + /// + } + RangeBorderCollection.prototype.getItemAt = function(index) { + /// + /// Gets a border object using its index. [Api set: ExcelApi 1.1] + /// + /// Index value of the object to be retrieved. Zero-indexed. + /// + } + + return RangeBorderCollection; + })(OfficeExtension.ClientObject); + Excel.RangeBorderCollection = RangeBorderCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RangeCollection = (function(_super) { + __extends(RangeCollection, _super); + function RangeCollection() { + /// [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + RangeCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + RangeCollection.prototype.getCount = function() { + /// + /// Returns the number of ranges in the `RangeCollection`. [Api set: ExcelApi 1.9] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + RangeCollection.prototype.getItemAt = function(index) { + /// + /// Returns the range object based on its position in the `RangeCollection`. [Api set: ExcelApi 1.9] + /// + /// Index value of the range object to be retrieved. Zero-indexed. + /// + } + + return RangeCollection; + })(OfficeExtension.ClientObject); + Excel.RangeCollection = RangeCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var RangeCopyType = { + __proto__: null, + "all": "all", + "formulas": "formulas", + "values": "values", + "formats": "formats", + "link": "link", + } + Excel.RangeCopyType = RangeCopyType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RangeFill = (function(_super) { + __extends(RangeFill, _super); + function RangeFill() { + /// Represents the background of a range object. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// HTML color code representing the color of the background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") [Api set: ExcelApi 1.1] + /// 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 a uniform pattern setting. [Api set: ExcelApi 1.9] + /// The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.9] + /// Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. [Api set: ExcelApi 1.9] + /// Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. [Api set: ExcelApi 1.9] + } + + RangeFill.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + RangeFill.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.RangeFillUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing RangeFill object, with properties that have already been loaded and synced. + /// + } + RangeFill.prototype.clear = function() { + /// + /// Resets the range background. [Api set: ExcelApi 1.1] + /// + /// + } + + return RangeFill; + })(OfficeExtension.ClientObject); + Excel.RangeFill = RangeFill; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RangeFont = (function(_super) { + __extends(RangeFont, _super); + function RangeFont() { + /// This object represents the font attributes (font name, font size, color, etc.) for an object. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the bold status of the font. [Api set: ExcelApi 1.1] + /// HTML color code representation of the text color (e.g., #FF0000 represents Red). [Api set: ExcelApi 1.1] + /// Specifies the italic status of the font. [Api set: ExcelApi 1.1] + /// Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. [Api set: ExcelApi 1.1] + /// Font size. [Api set: ExcelApi 1.1] + /// Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. [Api set: ExcelApi 1.9] + /// Specifies 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 1.9] + /// Specifies 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 1.9] + /// Specifies a double that lightens or darkens a color for the 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 a uniform font `tintAndShade` setting. [Api set: ExcelApi 1.9] + /// Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. [Api set: ExcelApi 1.1] + } + + RangeFont.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + RangeFont.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.RangeFontUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing RangeFont object, with properties that have already been loaded and synced. + /// + } + + return RangeFont; + })(OfficeExtension.ClientObject); + Excel.RangeFont = RangeFont; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RangeFormat = (function(_super) { + __extends(RangeFormat, _super); + function RangeFormat() { + /// A format object encapsulating the range's font, fill, borders, alignment, and other properties. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies if text is automatically indented when text alignment is set to equal distribution. [Api set: ExcelApi 1.9] + /// Collection of border objects that apply to the overall range. [Api set: ExcelApi 1.1] + /// Specifies the width of all colums within the range. If the column widths are not uniform, `null` will be returned. [Api set: ExcelApi 1.2] + /// Returns the fill object defined on the overall range. [Api set: ExcelApi 1.1] + /// Returns the font object defined on the overall range. [Api set: ExcelApi 1.1] + /// Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. [Api set: ExcelApi 1.1] + /// An integer from 0 to 250 that indicates the indent level. [Api set: ExcelApi 1.9] + /// Returns the format protection object for a range. [Api set: ExcelApi 1.2] + /// The reading order for the range. [Api set: ExcelApi 1.9] + /// The height of all rows in the range. If the row heights are not uniform, `null` will be returned. [Api set: ExcelApi 1.2] + /// Specifies if text automatically shrinks to fit in the available column width. [Api set: ExcelApi 1.9] + /// 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] + /// 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. Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. [Api set: ExcelApi 1.7] + /// Specifies if 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. Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. [Api set: ExcelApi 1.7] + /// Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. [Api set: ExcelApi 1.1] + /// Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting [Api set: ExcelApi 1.1] + } + + RangeFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + RangeFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.RangeFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing RangeFormat object, with properties that have already been loaded and synced. + /// + } + RangeFormat.prototype.adjustIndent = function(amount) { + /// + /// Adjusts the indentation of the range formatting. The indent value ranges from 0 to 250 and is measured in characters. [Api set: ExcelApi 1.11] + /// + /// The number of character spaces by which the current indent is adjusted. This value should be between -250 and 250. **Note**: If the amount would raise the indent level above 250, the indent level stays with 250. Similarly, if the amount would lower the indent level below 0, the indent level stays 0. + /// + } + RangeFormat.prototype.autofitColumns = function() { + /// + /// 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] + /// + /// + } + RangeFormat.prototype.autofitRows = function() { + /// + /// 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] + /// + /// + } + + return RangeFormat; + })(OfficeExtension.ClientObject); + Excel.RangeFormat = RangeFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RangeHyperlink = (function() { + function RangeHyperlink() { + /// Represents the necessary strings to get/set a hyperlink (XHL) object. [Api set: ExcelApi 1.7] + /// Represents the URL target for the hyperlink. [Api set: ExcelApi 1.7] + /// Represents the document reference target for the hyperlink. [Api set: ExcelApi 1.7] + /// Represents the string displayed when hovering over the hyperlink. [Api set: ExcelApi 1.7] + /// Represents the string that is displayed in the top left most cell in the range. [Api set: ExcelApi 1.7] + } + return RangeHyperlink; + })(); + Interfaces.RangeHyperlink.__proto__ = null; + Interfaces.RangeHyperlink = RangeHyperlink; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RangeReference = (function() { + function RangeReference() { + /// Represents a string reference of the form "SheetName!A1:B5", or a global or local named range. [Api set: ExcelApi 1.2] + /// The address of the range, for example "SheetName!A1:B5". [Api set: ExcelApi 1.2] + } + return RangeReference; + })(); + Interfaces.RangeReference.__proto__ = null; + Interfaces.RangeReference = RangeReference; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RangeSort = (function(_super) { + __extends(RangeSort, _super); + function RangeSort() { + /// Manages sorting operations on `Range` objects. [Api set: ExcelApi 1.2] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + } + + RangeSort.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + RangeSort.prototype.apply = function(fields, matchCase, hasHeaders, orientation, method) { + /// + /// Perform a sort operation. [Api set: ExcelApi 1.2] + /// + /// The list of conditions to sort on. + /// Optional. Whether to have the casing impact string ordering. + /// Optional. Whether the range has a header. + /// Optional. Whether the operation is sorting rows or columns. + /// Optional. The ordering method used for Chinese characters. + /// + } + + return RangeSort; + })(OfficeExtension.ClientObject); + Excel.RangeSort = RangeSort; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var RangeUnderlineStyle = { + __proto__: null, + "none": "none", + "single": "single", + "double": "double", + "singleAccountant": "singleAccountant", + "doubleAccountant": "doubleAccountant", + } + Excel.RangeUnderlineStyle = RangeUnderlineStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var RangeValueType = { + __proto__: null, + "unknown": "unknown", + "empty": "empty", + "string": "string", + "integer": "integer", + "double": "double", + "boolean": "boolean", + "error": "error", + "richValue": "richValue", + } + Excel.RangeValueType = RangeValueType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RangeView = (function(_super) { + __extends(RangeView, _super); + function RangeView() { + /// RangeView represents a set of visible cells of the parent range. [Api set: ExcelApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the cell addresses of the `RangeView`. [Api set: ExcelApi 1.3] + /// The number of visible columns. [Api set: ExcelApi 1.3] + /// Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. [Api set: ExcelApi 1.3] + /// 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. If a cell has no formula, its value is returned instead. [Api set: ExcelApi 1.3] + /// Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. [Api set: ExcelApi 1.3] + /// Returns a value that represents the index of the `RangeView`. [Api set: ExcelApi 1.3] + /// Represents Excel's number format code for the given cell. [Api set: ExcelApi 1.3] + /// The number of visible rows. [Api set: ExcelApi 1.3] + /// Represents a collection of range views associated with the range. [Api set: ExcelApi 1.3] + /// 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. [Api set: ExcelApi 1.3] + /// Represents the type of data of each cell. [Api set: ExcelApi 1.3] + /// 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] + /// A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. [Api set: ExcelApi 1.16] + /// A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. [Api set: ExcelApi 1.16] + } + + RangeView.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + RangeView.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.RangeViewUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing RangeView object, with properties that have already been loaded and synced. + /// + } + RangeView.prototype.getRange = function() { + /// + /// Gets the parent range associated with the current `RangeView`. [Api set: ExcelApi 1.3] + /// + /// + } + + return RangeView; + })(OfficeExtension.ClientObject); + Excel.RangeView = RangeView; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RangeViewCollection = (function(_super) { + __extends(RangeViewCollection, _super); + function RangeViewCollection() { + /// Represents a collection of `RangeView` objects. [Api set: ExcelApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + RangeViewCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + RangeViewCollection.prototype.getCount = function() { + /// + /// Gets the number of `RangeView` objects in the collection. [Api set: ExcelApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + RangeViewCollection.prototype.getItemAt = function(index) { + /// + /// Gets a `RangeView` row via its index. Zero-indexed. [Api set: ExcelApi 1.3] + /// + /// Index of the visible row. + /// + } + + return RangeViewCollection; + })(OfficeExtension.ClientObject); + Excel.RangeViewCollection = RangeViewCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var ReadingOrder = { + __proto__: null, + "context": "context", + "leftToRight": "leftToRight", + "rightToLeft": "rightToLeft", + } + Excel.ReadingOrder = ReadingOrder; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RefreshModeChangedEventArgs = (function() { + function RefreshModeChangedEventArgs() { + /// Represents information about a newly added linked data type, such as source and ID. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The linked data type refresh mode. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The unique ID of the object whose refresh mode was changed. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi BETA (PREVIEW ONLY)] + } + return RefreshModeChangedEventArgs; + })(); + Interfaces.RefreshModeChangedEventArgs.__proto__ = null; + Interfaces.RefreshModeChangedEventArgs = RefreshModeChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RefreshRequestCompletedEventArgs = (function() { + function RefreshRequestCompletedEventArgs() { + /// The argument that is passed to the event handler upon completion of refresh request to an external service or link. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Indicates if the request to refresh was successful. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The unique ID of the object whose refresh request was completed. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// An array that contains any warnings generated from the refresh request. [Api set: ExcelApi BETA (PREVIEW ONLY)] + } + return RefreshRequestCompletedEventArgs; + })(); + Interfaces.RefreshRequestCompletedEventArgs.__proto__ = null; + Interfaces.RefreshRequestCompletedEventArgs = RefreshRequestCompletedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RemoveDuplicatesResult = (function(_super) { + __extends(RemoveDuplicatesResult, _super); + function RemoveDuplicatesResult() { + /// Represents the results from `Range.removeDuplicates`. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Number of duplicated rows removed by the operation. [Api set: ExcelApi 1.9] + /// Number of remaining unique rows present in the resulting range. [Api set: ExcelApi 1.9] + } + + RemoveDuplicatesResult.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return RemoveDuplicatesResult; + })(OfficeExtension.ClientObject); + Excel.RemoveDuplicatesResult = RemoveDuplicatesResult; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ReplaceCriteria = (function() { + function ReplaceCriteria() { + /// Represents the replace criteria to be used. [Api set: ExcelApi 1.9] + /// Specifies if the match needs to be complete or partial. A complete match matches the entire contents of the cell. A partial match matches a substring within the content of the cell (e.g., `cat` partially matches `caterpillar` and `scatter`). Default is `false` (partial). [Api set: ExcelApi 1.9] + /// Specifies if the match is case-sensitive. Default is `false` (case-insensitive). [Api set: ExcelApi 1.9] + } + return ReplaceCriteria; + })(); + Interfaces.ReplaceCriteria.__proto__ = null; + Interfaces.ReplaceCriteria = ReplaceCriteria; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var RibbonTab = { + __proto__: null, + "others": "others", + "home": "home", + "insert": "insert", + "draw": "draw", + "pageLayout": "pageLayout", + "formulas": "formulas", + "data": "data", + "review": "review", + "view": "view", + "developer": "developer", + "addIns": "addIns", + "help": "help", + } + Excel.RibbonTab = RibbonTab; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RowColumnPivotHierarchy = (function(_super) { + __extends(RowColumnPivotHierarchy, _super); + function RowColumnPivotHierarchy() { + /// Represents the Excel RowColumnPivotHierarchy. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the PivotFields associated with the RowColumnPivotHierarchy. [Api set: ExcelApi 1.8] + /// ID of the RowColumnPivotHierarchy. [Api set: ExcelApi 1.8] + /// Name of the RowColumnPivotHierarchy. [Api set: ExcelApi 1.8] + /// Position of the RowColumnPivotHierarchy. [Api set: ExcelApi 1.8] + } + + RowColumnPivotHierarchy.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + RowColumnPivotHierarchy.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.RowColumnPivotHierarchyUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing RowColumnPivotHierarchy object, with properties that have already been loaded and synced. + /// + } + RowColumnPivotHierarchy.prototype.setToDefault = function() { + /// + /// Reset the RowColumnPivotHierarchy back to its default values. [Api set: ExcelApi 1.8] + /// + /// + } + + return RowColumnPivotHierarchy; + })(OfficeExtension.ClientObject); + Excel.RowColumnPivotHierarchy = RowColumnPivotHierarchy; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var RowColumnPivotHierarchyCollection = (function(_super) { + __extends(RowColumnPivotHierarchyCollection, _super); + function RowColumnPivotHierarchyCollection() { + /// Represents a collection of RowColumnPivotHierarchy items associated with the PivotTable. [Api set: ExcelApi 1.8] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + RowColumnPivotHierarchyCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + RowColumnPivotHierarchyCollection.prototype.add = function(pivotHierarchy) { + /// + /// 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] + /// + /// + } + RowColumnPivotHierarchyCollection.prototype.getCount = function() { + /// + /// Gets the number of pivot hierarchies in the collection. [Api set: ExcelApi 1.8] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + RowColumnPivotHierarchyCollection.prototype.getItem = function(name) { + /// + /// Gets a RowColumnPivotHierarchy by its name or ID. [Api set: ExcelApi 1.8] + /// + /// Name of the RowColumnPivotHierarchy to be retrieved. + /// + } + RowColumnPivotHierarchyCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a RowColumnPivotHierarchy by name. If the RowColumnPivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.8] + /// + /// Name of the RowColumnPivotHierarchy to be retrieved. + /// + } + RowColumnPivotHierarchyCollection.prototype.remove = function(rowColumnPivotHierarchy) { + /// + /// Removes the PivotHierarchy from the current axis. [Api set: ExcelApi 1.8] + /// + /// + } + + return RowColumnPivotHierarchyCollection; + })(OfficeExtension.ClientObject); + Excel.RowColumnPivotHierarchyCollection = RowColumnPivotHierarchyCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.11] + var RowHiddenChangeType = { + __proto__: null, + "unhidden": "unhidden", + "hidden": "hidden", + } + Excel.RowHiddenChangeType = RowHiddenChangeType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Runtime = (function(_super) { + __extends(Runtime, _super); + function Runtime() { + /// Represents the Excel Runtime class. [Api set: ExcelApi 1.5] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Toggle JavaScript events in the current task pane or content add-in. [Api set: ExcelApi 1.8] + } + + Runtime.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Runtime.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.RuntimeUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Runtime object, with properties that have already been loaded and synced. + /// + } + + return Runtime; + })(OfficeExtension.ClientObject); + Excel.Runtime = Runtime; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the save behavior for `Workbook.save`. [Api set: ExcelApi 1.9] + var SaveBehavior = { + __proto__: null, + "save": "save", + "prompt": "prompt", + } + Excel.SaveBehavior = SaveBehavior; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var SearchCriteria = (function() { + function SearchCriteria() { + /// Represents the search criteria to be used. [Api set: ExcelApi 1.9] + /// Specifies if the match needs to be complete or partial. A complete match matches the entire contents of the cell. A partial match matches a substring within the content of the cell (e.g., `cat` partially matches `caterpillar` and `scatter`). Default is `false` (partial). [Api set: ExcelApi 1.9] + /// Specifies if the match is case-sensitive. Default is `false` (case-insensitive). [Api set: ExcelApi 1.9] + /// Specifies the search direction. Default is forward. See `Excel.SearchDirection`. [Api set: ExcelApi 1.9] + } + return SearchCriteria; + })(); + Interfaces.SearchCriteria.__proto__ = null; + Interfaces.SearchCriteria = SearchCriteria; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the search direction. [Api set: ExcelApi 1.9] + var SearchDirection = { + __proto__: null, + "forward": "forward", + "backwards": "backwards", + } + Excel.SearchDirection = SearchDirection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var SelectionChangedEventArgs = (function() { + function SelectionChangedEventArgs() { + /// Provides information about the document that raised the selection changed event. [Api set: ExcelApi 1.2] + /// Gets the workbook object that raised the selection changed event. [Api set: ExcelApi 1.2] + } + return SelectionChangedEventArgs; + })(); + Interfaces.SelectionChangedEventArgs.__proto__ = null; + Interfaces.SelectionChangedEventArgs = SelectionChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Setting = (function(_super) { + __extends(Setting, _super); + function Setting() { + /// 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] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The key that represents the ID of the setting. [Api set: ExcelApi 1.4] + /// Represents the value stored for this setting. [Api set: ExcelApi 1.4] + } + + Setting.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Setting.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.SettingUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Setting object, with properties that have already been loaded and synced. + /// + } + Setting.prototype.delete = function() { + /// + /// Deletes the setting. [Api set: ExcelApi 1.4] + /// + /// + } + + return Setting; + })(OfficeExtension.ClientObject); + Excel.Setting = Setting; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var SettingCollection = (function(_super) { + __extends(SettingCollection, _super); + function SettingCollection() { + /// 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] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Occurs when the settings in the document are changed. [Api set: ExcelApi 1.4] + /// Gets the loaded child items in this collection. + } + + SettingCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + SettingCollection.prototype.add = function(key, value) { + /// + /// Sets or adds the specified setting to the workbook. [Api set: ExcelApi 1.4] + /// + /// The key of the new setting. + /// The value for the new setting. + /// + } + SettingCollection.prototype.getCount = function() { + /// + /// Gets the number of settings in the collection. [Api set: ExcelApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + SettingCollection.prototype.getItem = function(key) { + /// + /// Gets a setting entry via the key. [Api set: ExcelApi 1.4] + /// + /// Key of the setting. + /// + } + SettingCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a setting entry via the key. If the setting does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + /// + /// The key of the setting. + /// + } + SettingCollection.prototype.onSettingsChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the setting that raised the settings changed event + /// + var eventInfo = new Excel.Interfaces.SettingsChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + return SettingCollection; + })(OfficeExtension.ClientObject); + Excel.SettingCollection = SettingCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var SettingsChangedEventArgs = (function() { + function SettingsChangedEventArgs() { + /// Provides information about the setting that raised the settings changed event [Api set: ExcelApi 1.4] + /// Gets the `Setting` object that represents the binding that raised the settings changed event [Api set: ExcelApi 1.4] + } + return SettingsChangedEventArgs; + })(); + Interfaces.SettingsChangedEventArgs.__proto__ = null; + Interfaces.SettingsChangedEventArgs = SettingsChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Shape = (function(_super) { + __extends(Shape, _super); + function Shape() { + /// Represents a generic shape object in the worksheet. A shape could be a geometric shape, a line, a group of shapes, etc. To learn more about the shape object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-shapes | Work with shapes using the Excel JavaScript API}. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the alternative description text for a `Shape` object. [Api set: ExcelApi 1.9] + /// Specifies the alternative title text for a `Shape` object. [Api set: ExcelApi 1.9] + /// Returns the number of connection sites on this shape. [Api set: ExcelApi 1.9] + /// Gets the display name of the shape. A newly created shape has a generated name that is localized and may not match its `name`. In this scenario, you can use this API to get the name that is displayed in the UI. [Api set: ExcelApi 1.15] + /// Returns the fill formatting of this shape. [Api set: ExcelApi 1.9] + /// Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". [Api set: ExcelApi 1.9] + /// Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". [Api set: ExcelApi 1.9] + /// Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". [Api set: ExcelApi 1.9] + /// Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. [Api set: ExcelApi 1.9] + /// Specifies the shape identifier. [Api set: ExcelApi 1.9] + /// Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". [Api set: ExcelApi 1.9] + /// The distance, in points, from the left side of the shape to the left side of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. [Api set: ExcelApi 1.9] + /// Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. [Api set: ExcelApi 1.9] + /// Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". [Api set: ExcelApi 1.9] + /// Returns the line formatting of this shape. [Api set: ExcelApi 1.9] + /// Specifies if the aspect ratio of this shape is locked. [Api set: ExcelApi 1.9] + /// Specifies the name of the shape. [Api set: ExcelApi 1.9] + /// Specifies the parent group of this shape. [Api set: ExcelApi 1.9] + /// Represents how the object is attached to the cells below it. [Api set: ExcelApi 1.10] + /// Specifies the rotation, in degrees, of the shape. [Api set: ExcelApi 1.9] + /// Returns the text frame object of this shape. [Api set: ExcelApi 1.9] + /// The distance, in points, from the top edge of the shape to the top edge of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. [Api set: ExcelApi 1.9] + /// Returns the type of this shape. See `Excel.ShapeType` for details. [Api set: ExcelApi 1.9] + /// Specifies if the shape is visible. [Api set: ExcelApi 1.9] + /// Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. [Api set: ExcelApi 1.9] + /// Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. [Api set: ExcelApi 1.9] + /// Occurs when the shape is activated. [Api set: ExcelApi 1.9] + /// Occurs when the shape is deactivated. [Api set: ExcelApi 1.9] + } + + Shape.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Shape.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ShapeUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Shape object, with properties that have already been loaded and synced. + /// + } + Shape.prototype.copyTo = function(destinationSheet) { + /// + /// Copies and pastes a `Shape` object. The pasted shape is copied to the same pixel location as this shape. [Api set: ExcelApi 1.10] + /// + /// The sheet to which the shape object will be pasted. The default value is the copied shape's worksheet. + /// + } + Shape.prototype.delete = function() { + /// + /// Removes the shape from the worksheet. [Api set: ExcelApi 1.9] + /// + /// + } + Shape.prototype.getAsImage = function(format) { + /// + /// Converts the shape to an image and returns the image as a base64-encoded string. The DPI is 96. The only supported formats are `Excel.PictureFormat.BMP`, `Excel.PictureFormat.PNG`, `Excel.PictureFormat.JPEG`, and `Excel.PictureFormat.GIF`. [Api set: ExcelApi 1.9] + /// + /// Specifies the format of the image. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Shape.prototype.incrementLeft = function(increment) { + /// + /// Moves the shape horizontally by the specified number of points. [Api set: ExcelApi 1.9] + /// + /// The increment, in points, the shape will be horizontally moved. A positive value moves the shape to the right and a negative value moves it to the left. If the sheet is right-to-left oriented, this is reversed: positive values will move the shape to the left and negative values will move it to the right. + /// + } + Shape.prototype.incrementRotation = function(increment) { + /// + /// Rotates the shape clockwise 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 1.9] + /// + /// How many degrees the shape will be rotated. A positive value rotates the shape clockwise and a negative value rotates it counterclockwise. + /// + } + Shape.prototype.incrementTop = function(increment) { + /// + /// Moves the shape vertically by the specified number of points. [Api set: ExcelApi 1.9] + /// + /// The increment, in points, the shape will be vertically moved. A positive value moves the shape down and a negative value moves it up. + /// + } + Shape.prototype.scaleHeight = function(scaleFactor, scaleType, scaleFrom) { + /// + /// Scales the height of the shape by a specified factor. For images, 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 1.9] + /// + /// Specifies the ratio between the height of the shape after you resize it and the current or original height. + /// Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. + /// Optional. 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. + /// + } + Shape.prototype.scaleWidth = function(scaleFactor, scaleType, scaleFrom) { + /// + /// Scales the width of the shape by a specified factor. For images, 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 1.9] + /// + /// Specifies the ratio between the width of the shape after you resize it and the current or original width. + /// Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. + /// Optional. 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. + /// + } + Shape.prototype.setZOrder = function(position) { + /// + /// Moves the specified shape up or down the collection's z-order, which shifts it in front of or behind other shapes. [Api set: ExcelApi 1.9] + /// + /// Where to move the shape in the z-order stack relative to the other shapes. See `Excel.ShapeZOrder` for details. + /// + } + Shape.prototype.onActivated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the shape that raised the activated event. + /// + var eventInfo = new Excel.Interfaces.ShapeActivatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Shape.prototype.onDeactivated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the shape that raised the deactivated event. + /// + var eventInfo = new Excel.Interfaces.ShapeDeactivatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + return Shape; + })(OfficeExtension.ClientObject); + Excel.Shape = Shape; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ShapeActivatedEventArgs = (function() { + function ShapeActivatedEventArgs() { + /// Provides information about the shape that raised the activated event. [Api set: ExcelApi 1.9] + /// Gets the ID of the activated shape. [Api set: ExcelApi 1.9] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.9] + /// Gets the ID of the worksheet in which the shape is activated. [Api set: ExcelApi 1.9] + } + return ShapeActivatedEventArgs; + })(); + Interfaces.ShapeActivatedEventArgs.__proto__ = null; + Interfaces.ShapeActivatedEventArgs = ShapeActivatedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Determines the type of automatic sizing allowed. [Api set: ExcelApi 1.9] + var ShapeAutoSize = { + __proto__: null, + "autoSizeNone": "autoSizeNone", + "autoSizeTextToFitShape": "autoSizeTextToFitShape", + "autoSizeShapeToFitText": "autoSizeShapeToFitText", + "autoSizeMixed": "autoSizeMixed", + } + Excel.ShapeAutoSize = ShapeAutoSize; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ShapeCollection = (function(_super) { + __extends(ShapeCollection, _super); + function ShapeCollection() { + /// Represents a collection of all the shapes in the worksheet. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + ShapeCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ShapeCollection.prototype.addGeometricShape = function(geometricShapeType) { + /// + /// Adds a geometric shape to the worksheet. Returns a `Shape` object that represents the new shape. [Api set: ExcelApi 1.9] + /// + /// Represents the type of the geometric shape. See `Excel.GeometricShapeType` for details. + /// + } + ShapeCollection.prototype.addGroup = function(values) { + /// + /// Groups a subset of shapes in this collection's worksheet. Returns a `Shape` object that represents the new group of shapes. [Api set: ExcelApi 1.9] + /// + /// An array of shape IDs or shape objects. + /// + } + ShapeCollection.prototype.addImage = function(base64ImageString) { + /// + /// Creates an image from a base64-encoded string and adds it to the worksheet. Returns the `Shape` object that represents the new image. [Api set: ExcelApi 1.9] + /// + /// A base64-encoded string representing an image in either JPEG or PNG format. + /// + } + ShapeCollection.prototype.addLine = function(startLeft, startTop, endLeft, endTop, connectorType) { + /// + /// Adds a line to worksheet. Returns a `Shape` object that represents the new line. [Api set: ExcelApi 1.9] + /// + /// The distance, in points, from the start of the line to the left side of the worksheet. + /// The distance, in points, from the start of the line to the top of the worksheet. + /// The distance, in points, from the end of the line to the left of the worksheet. + /// The distance, in points, from the end of the line to the top of the worksheet. + /// Represents the connector type. See `Excel.ConnectorType` for details. + /// + } + ShapeCollection.prototype.addSvg = function(xml) { + /// + /// Creates a scalable vector graphic (SVG) from an XML string and adds it to the worksheet. Returns a `Shape` object that represents the new image. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// An XML string that represents the SVG. + /// + } + ShapeCollection.prototype.addTextBox = function(text) { + /// + /// Adds a text box to the worksheet with the provided text as the content. Returns a `Shape` object that represents the new text box. [Api set: ExcelApi 1.9] + /// + /// Represents the text that will be shown in the created text box. + /// + } + ShapeCollection.prototype.getCount = function() { + /// + /// Returns the number of shapes in the worksheet. [Api set: ExcelApi 1.9] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + ShapeCollection.prototype.getItem = function(key) { + /// + /// Gets a shape using its name or ID. [Api set: ExcelApi 1.9] + /// + /// The name or ID of the shape to be retrieved. + /// + } + ShapeCollection.prototype.getItemAt = function(index) { + /// + /// Gets a shape using its position in the collection. [Api set: ExcelApi 1.9] + /// + /// The zero-based index of the shape to be retrieved. + /// + } + ShapeCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a shape using its name or ID. If the shape object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.14] + /// + /// The name or ID of the shape to be retrieved. + /// + } + + return ShapeCollection; + })(OfficeExtension.ClientObject); + Excel.ShapeCollection = ShapeCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ShapeDeactivatedEventArgs = (function() { + function ShapeDeactivatedEventArgs() { + /// Provides information about the shape that raised the deactivated event. [Api set: ExcelApi 1.9] + /// Gets the ID of the shape deactivated shape. [Api set: ExcelApi 1.9] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.9] + /// Gets the ID of the worksheet in which the shape is deactivated. [Api set: ExcelApi 1.9] + } + return ShapeDeactivatedEventArgs; + })(); + Interfaces.ShapeDeactivatedEventArgs.__proto__ = null; + Interfaces.ShapeDeactivatedEventArgs = ShapeDeactivatedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ShapeFill = (function(_super) { + __extends(ShapeFill, _super); + function ShapeFill() { + /// Represents the fill formatting of a shape object. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") [Api set: ExcelApi 1.9] + /// Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. [Api set: ExcelApi 1.9] + /// Returns the fill type of the shape. See `Excel.ShapeFillType` for details. [Api set: ExcelApi 1.9] + } + + ShapeFill.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ShapeFill.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ShapeFillUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ShapeFill object, with properties that have already been loaded and synced. + /// + } + ShapeFill.prototype.clear = function() { + /// + /// Clears the fill formatting of this shape. [Api set: ExcelApi 1.9] + /// + /// + } + ShapeFill.prototype.setSolidColor = function(color) { + /// + /// Sets the fill formatting of the shape to a uniform color. This changes the fill type to "Solid". [Api set: ExcelApi 1.9] + /// + /// A string that represents the fill color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + /// + } + + return ShapeFill; + })(OfficeExtension.ClientObject); + Excel.ShapeFill = ShapeFill; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies a shape's fill type. [Api set: ExcelApi 1.9] + var ShapeFillType = { + __proto__: null, + "noFill": "noFill", + "solid": "solid", + "gradient": "gradient", + "pattern": "pattern", + "pictureAndTexture": "pictureAndTexture", + "mixed": "mixed", + } + Excel.ShapeFillType = ShapeFillType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ShapeFont = (function(_super) { + __extends(ShapeFont, _super); + function ShapeFont() { + /// Represents the font attributes, such as font name, font size, and color, for a shape's `TextRange` object. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. [Api set: ExcelApi 1.9] + /// 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 1.9] + /// Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. [Api set: ExcelApi 1.9] + /// Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. [Api set: ExcelApi 1.9] + /// Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. [Api set: ExcelApi 1.9] + /// Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. [Api set: ExcelApi 1.9] + } + + ShapeFont.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ShapeFont.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ShapeFontUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ShapeFont object, with properties that have already been loaded and synced. + /// + } + + return ShapeFont; + })(OfficeExtension.ClientObject); + Excel.ShapeFont = ShapeFont; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// The type of underline applied to a font. [Api set: ExcelApi 1.9] + var ShapeFontUnderlineStyle = { + __proto__: null, + "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", + } + Excel.ShapeFontUnderlineStyle = ShapeFontUnderlineStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ShapeGroup = (function(_super) { + __extends(ShapeGroup, _super); + function ShapeGroup() { + /// Represents a shape group inside a worksheet. To get the corresponding `Shape` object, use `ShapeGroup.shape`. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the shape identifier. [Api set: ExcelApi 1.9] + /// Returns the `Shape` object associated with the group. [Api set: ExcelApi 1.9] + /// Returns the collection of `Shape` objects. [Api set: ExcelApi 1.9] + } + + ShapeGroup.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ShapeGroup.prototype.ungroup = function() { + /// + /// Ungroups any grouped shapes in the specified shape group. [Api set: ExcelApi 1.9] + /// + /// + } + + return ShapeGroup; + })(OfficeExtension.ClientObject); + Excel.ShapeGroup = ShapeGroup; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// The dash style for a line. [Api set: ExcelApi 1.9] + var ShapeLineDashStyle = { + __proto__: null, + "dash": "dash", + "dashDot": "dashDot", + "dashDotDot": "dashDotDot", + "longDash": "longDash", + "longDashDot": "longDashDot", + "roundDot": "roundDot", + "solid": "solid", + "squareDot": "squareDot", + "longDashDotDot": "longDashDotDot", + "systemDash": "systemDash", + "systemDot": "systemDot", + "systemDashDot": "systemDashDot", + } + Excel.ShapeLineDashStyle = ShapeLineDashStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var ShapeLineFormat = (function(_super) { + __extends(ShapeLineFormat, _super); + function ShapeLineFormat() { + /// Represents the line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.9] + /// Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. [Api set: ExcelApi 1.9] + /// Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. [Api set: ExcelApi 1.9] + /// Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. [Api set: ExcelApi 1.9] + /// Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. [Api set: ExcelApi 1.9] + /// Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. [Api set: ExcelApi 1.9] + } + + ShapeLineFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ShapeLineFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ShapeLineFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ShapeLineFormat object, with properties that have already been loaded and synced. + /// + } + + return ShapeLineFormat; + })(OfficeExtension.ClientObject); + Excel.ShapeLineFormat = ShapeLineFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// The style for a line. [Api set: ExcelApi 1.9] + var ShapeLineStyle = { + __proto__: null, + "single": "single", + "thickBetweenThin": "thickBetweenThin", + "thickThin": "thickThin", + "thinThick": "thinThick", + "thinThin": "thinThin", + } + Excel.ShapeLineStyle = ShapeLineStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies which part of the shape retains its position when the shape is scaled. [Api set: ExcelApi 1.9] + var ShapeScaleFrom = { + __proto__: null, + "scaleFromTopLeft": "scaleFromTopLeft", + "scaleFromMiddle": "scaleFromMiddle", + "scaleFromBottomRight": "scaleFromBottomRight", + } + Excel.ShapeScaleFrom = ShapeScaleFrom; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies whether the shape is scaled relative to its original or current size. [Api set: ExcelApi 1.9] + var ShapeScaleType = { + __proto__: null, + "currentSize": "currentSize", + "originalSize": "originalSize", + } + Excel.ShapeScaleType = ShapeScaleType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the horizontal alignment for the text frame in a shape. [Api set: ExcelApi 1.9] + var ShapeTextHorizontalAlignment = { + __proto__: null, + "left": "left", + "center": "center", + "right": "right", + "justify": "justify", + "justifyLow": "justifyLow", + "distributed": "distributed", + "thaiDistributed": "thaiDistributed", + } + Excel.ShapeTextHorizontalAlignment = ShapeTextHorizontalAlignment; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the horizontal overflow for the text frame in a shape. [Api set: ExcelApi 1.9] + var ShapeTextHorizontalOverflow = { + __proto__: null, + "overflow": "overflow", + "clip": "clip", + } + Excel.ShapeTextHorizontalOverflow = ShapeTextHorizontalOverflow; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the orientation for the text frame in a shape. [Api set: ExcelApi 1.9] + var ShapeTextOrientation = { + __proto__: null, + "horizontal": "horizontal", + "vertical": "vertical", + "vertical270": "vertical270", + "wordArtVertical": "wordArtVertical", + "eastAsianVertical": "eastAsianVertical", + "mongolianVertical": "mongolianVertical", + "wordArtVerticalRTL": "wordArtVerticalRTL", + } + Excel.ShapeTextOrientation = ShapeTextOrientation; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the reading order for the text frame in a shape. [Api set: ExcelApi 1.9] + var ShapeTextReadingOrder = { + __proto__: null, + "leftToRight": "leftToRight", + "rightToLeft": "rightToLeft", + } + Excel.ShapeTextReadingOrder = ShapeTextReadingOrder; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the vertical alignment for the text frame in a shape. [Api set: ExcelApi 1.9] + var ShapeTextVerticalAlignment = { + __proto__: null, + "top": "top", + "middle": "middle", + "bottom": "bottom", + "justified": "justified", + "distributed": "distributed", + } + Excel.ShapeTextVerticalAlignment = ShapeTextVerticalAlignment; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the vertical overflow for the text frame in a shape. [Api set: ExcelApi 1.9] + var ShapeTextVerticalOverflow = { + __proto__: null, + "overflow": "overflow", + "ellipsis": "ellipsis", + "clip": "clip", + } + Excel.ShapeTextVerticalOverflow = ShapeTextVerticalOverflow; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the type of a shape. [Api set: ExcelApi 1.9] + var ShapeType = { + __proto__: null, + "unsupported": "unsupported", + "image": "image", + "geometricShape": "geometricShape", + "group": "group", + "line": "line", + } + Excel.ShapeType = ShapeType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies where in the z-order a shape should be moved relative to other shapes. [Api set: ExcelApi 1.9] + var ShapeZOrder = { + __proto__: null, + "bringToFront": "bringToFront", + "bringForward": "bringForward", + "sendToBack": "sendToBack", + "sendBackward": "sendBackward", + } + Excel.ShapeZOrder = ShapeZOrder; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var SheetVisibility = { + __proto__: null, + "visible": "visible", + "hidden": "hidden", + "veryHidden": "veryHidden", + } + Excel.SheetVisibility = SheetVisibility; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// The ShowAs calculation function for the DataPivotField. [Api set: ExcelApi 1.8] + var ShowAsCalculation = { + __proto__: null, + "unknown": "unknown", + "none": "none", + "percentOfGrandTotal": "percentOfGrandTotal", + "percentOfRowTotal": "percentOfRowTotal", + "percentOfColumnTotal": "percentOfColumnTotal", + "percentOfParentRowTotal": "percentOfParentRowTotal", + "percentOfParentColumnTotal": "percentOfParentColumnTotal", + "percentOfParentTotal": "percentOfParentTotal", + "percentOf": "percentOf", + "runningTotal": "runningTotal", + "percentRunningTotal": "percentRunningTotal", + "differenceFrom": "differenceFrom", + "percentDifferenceFrom": "percentDifferenceFrom", + "rankAscending": "rankAscending", + "rankDecending": "rankDecending", + "index": "index", + } + Excel.ShowAsCalculation = ShowAsCalculation; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ShowAsRule = (function() { + function ShowAsRule() { + /// [Api set: ExcelApi 1.8] + /// The PivotField to base the `ShowAs` calculation on, if applicable according to the `ShowAsCalculation` type, else `null`. [Api set: ExcelApi 1.8] + /// The item to base the `ShowAs` calculation on, if applicable according to the `ShowAsCalculation` type, else `null`. [Api set: ExcelApi 1.8] + /// The `ShowAs` calculation to use for the PivotField. See `Excel.ShowAsCalculation` for details. [Api set: ExcelApi 1.8] + } + return ShowAsRule; + })(); + Interfaces.ShowAsRule.__proto__ = null; + Interfaces.ShowAsRule = ShowAsRule; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Slicer = (function(_super) { + __extends(Slicer, _super); + function Slicer() { + /// Represents a `Slicer` object in the workbook. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the caption of the slicer. [Api set: ExcelApi 1.10] + /// Represents the height, in points, of the slicer. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. [Api set: ExcelApi 1.10] + /// Represents the unique ID of the slicer. [Api set: ExcelApi 1.10] + /// Value is `true` if all filters currently applied on the slicer are cleared. [Api set: ExcelApi 1.10] + /// Represents the distance, in points, from the left side of the slicer to the left of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. [Api set: ExcelApi 1.10] + /// Represents the name of the slicer. [Api set: ExcelApi 1.10] + /// Represents the slicer name used in the formula. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the collection of slicer items that are part of the slicer. [Api set: ExcelApi 1.10] + /// The style applied to the slicer. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". [Api set: ExcelApi 1.10] + /// Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. [Api set: ExcelApi 1.10] + /// Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. [Api set: ExcelApi 1.10] + /// Represents the width, in points, of the slicer. Throws an `InvalidArgument` error when set with a negative value or zero as an input. [Api set: ExcelApi 1.10] + /// Represents the worksheet containing the slicer. [Api set: ExcelApi 1.10] + } + + Slicer.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Slicer.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.SlicerUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Slicer object, with properties that have already been loaded and synced. + /// + } + Slicer.prototype.clearFilters = function() { + /// + /// Clears all the filters currently applied on the slicer. [Api set: ExcelApi 1.10] + /// + /// + } + Slicer.prototype.delete = function() { + /// + /// Deletes the slicer. [Api set: ExcelApi 1.10] + /// + /// + } + Slicer.prototype.getSelectedItems = function() { + /// + /// Returns an array of selected items' keys. [Api set: ExcelApi 1.10] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = []; + return result; + } + Slicer.prototype.selectItems = function(items) { + /// + /// Selects slicer items based on their keys. The previous selections are cleared. All items will be selected by default if the array is empty. [Api set: ExcelApi 1.10] + /// + /// Optional. The specified slicer item names to be selected. + /// + } + Slicer.prototype.setStyle = function(style) { + /// + /// Sets the style applied to the slicer. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The style to apply to the slicer. An `InvalidArgument` error is thrown if a string is provided that does not match the name of any style. + /// + } + + return Slicer; + })(OfficeExtension.ClientObject); + Excel.Slicer = Slicer; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var SlicerCollection = (function(_super) { + __extends(SlicerCollection, _super); + function SlicerCollection() { + /// Represents a collection of all the slicer objects in the workbook or a worksheet. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + SlicerCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + SlicerCollection.prototype.add = function(slicerSource, sourceField, slicerDestination) { + /// + /// Adds a new slicer to the workbook. [Api set: ExcelApi 1.10] + /// + /// The data source that the new slicer will be based on. It can be a `PivotTable` object, a `Table` object, or a string. When a PivotTable object is passed, the data source is the source of the `PivotTable` object. When a `Table` object is passed, the data source is the `Table` object. When a string is passed, it is interpreted as the name or ID of a PivotTable or table. + /// The field in the data source to filter by. It can be a `PivotField` object, a `TableColumn` object, the ID of a `PivotField` or the name or ID of a `TableColumn`. + /// Optional. The worksheet in which the new slicer will be created. It can be a `Worksheet` object or the name or ID of a worksheet. This parameter can be omitted if the slicer collection is retrieved from a worksheet. + /// The new slicer. + } + SlicerCollection.prototype.getCount = function() { + /// + /// Returns the number of slicers in the collection. [Api set: ExcelApi 1.10] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + SlicerCollection.prototype.getItem = function(key) { + /// + /// Gets a slicer object using its name or ID. [Api set: ExcelApi 1.10] + /// + /// The name or ID of the slicer. + /// + } + SlicerCollection.prototype.getItemAt = function(index) { + /// + /// Gets a slicer based on its position in the collection. [Api set: ExcelApi 1.10] + /// + /// Index value of the object to be retrieved. Zero-indexed. + /// + } + SlicerCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a slicer using its name or ID. If the slicer doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.10] + /// + /// Name or ID of the slicer to be retrieved. + /// + } + + return SlicerCollection; + })(OfficeExtension.ClientObject); + Excel.SlicerCollection = SlicerCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var SlicerItem = (function(_super) { + __extends(SlicerItem, _super); + function SlicerItem() { + /// Represents a slicer item in a slicer. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Value is `true` if the slicer item has data. [Api set: ExcelApi 1.10] + /// Value is `true` if the slicer item is selected. Setting this value will not clear the selected state of other slicer items. By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. [Api set: ExcelApi 1.10] + /// Represents the unique value representing the slicer item. [Api set: ExcelApi 1.10] + /// Represents the title displayed in the Excel UI. [Api set: ExcelApi 1.10] + } + + SlicerItem.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + SlicerItem.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.SlicerItemUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing SlicerItem object, with properties that have already been loaded and synced. + /// + } + + return SlicerItem; + })(OfficeExtension.ClientObject); + Excel.SlicerItem = SlicerItem; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var SlicerItemCollection = (function(_super) { + __extends(SlicerItemCollection, _super); + function SlicerItemCollection() { + /// Represents a collection of all the slicer item objects in the slicer. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + SlicerItemCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + SlicerItemCollection.prototype.getCount = function() { + /// + /// Returns the number of slicer items in the slicer. [Api set: ExcelApi 1.10] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + SlicerItemCollection.prototype.getItem = function(key) { + /// + /// Gets a slicer item object using its key or name. [Api set: ExcelApi 1.10] + /// + /// The key or name of the slicer item. + /// + } + SlicerItemCollection.prototype.getItemAt = function(index) { + /// + /// Gets a slicer item based on its position in the collection. [Api set: ExcelApi 1.10] + /// + /// Index value of the object to be retrieved. Zero-indexed. + /// + } + SlicerItemCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a slicer item using its key or name. If the slicer item doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.10] + /// + /// Key or name of the slicer to be retrieved. + /// + } + + return SlicerItemCollection; + })(OfficeExtension.ClientObject); + Excel.SlicerItemCollection = SlicerItemCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Specifies the slicer sort behavior for `Slicer.sortBy`. [Api set: ExcelApi 1.10] + var SlicerSortType = { + __proto__: null, + "dataSourceOrder": "dataSourceOrder", + "ascending": "ascending", + "descending": "descending", + } + Excel.SlicerSortType = SlicerSortType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var SlicerStyle = (function(_super) { + __extends(SlicerStyle, _super); + function SlicerStyle() { + /// Represents a slicer style, which defines style elements by region of the slicer. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the name of the slicer style. [Api set: ExcelApi 1.10] + /// Specifies if this `SlicerStyle` object is read-only. [Api set: ExcelApi 1.10] + } + + SlicerStyle.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + SlicerStyle.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.SlicerStyleUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing SlicerStyle object, with properties that have already been loaded and synced. + /// + } + SlicerStyle.prototype.delete = function() { + /// + /// Deletes the slicer style. [Api set: ExcelApi 1.10] + /// + /// + } + SlicerStyle.prototype.duplicate = function() { + /// + /// Creates a duplicate of this slicer style with copies of all the style elements. [Api set: ExcelApi 1.10] + /// + /// The new `SlicerStyle` object that has been duplicated from this slicer style. + } + + return SlicerStyle; + })(OfficeExtension.ClientObject); + Excel.SlicerStyle = SlicerStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var SlicerStyleCollection = (function(_super) { + __extends(SlicerStyleCollection, _super); + function SlicerStyleCollection() { + /// Represents a collection of `SlicerStyle` objects. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + SlicerStyleCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + SlicerStyleCollection.prototype.add = function(name, makeUniqueName) { + /// + /// Creates a blank slicer style with the specified name. [Api set: ExcelApi 1.10] + /// + /// The unique name for the new slicer style. Will throw an `InvalidArgument` exception if the name is already in use. + /// Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. + /// The newly created `SlicerStyle`. + } + SlicerStyleCollection.prototype.getCount = function() { + /// + /// Gets the number of slicer styles in the collection. [Api set: ExcelApi 1.10] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + SlicerStyleCollection.prototype.getDefault = function() { + /// + /// Gets the default `SlicerStyle` for the parent object's scope. [Api set: ExcelApi 1.10] + /// + /// The `SlicerStyle` object that is the current default slicer style. + } + SlicerStyleCollection.prototype.getItem = function(name) { + /// + /// Gets a `SlicerStyle` by name. [Api set: ExcelApi 1.10] + /// + /// Name of the slicer style to be retrieved. + /// The `SlicerStyle` object whose name matches the input. + } + SlicerStyleCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a `SlicerStyle` by name. If the slicer style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.10] + /// + /// Name of the slicer style to be retrieved. + /// The `SlicerStyle` object whose name matches the input. + } + SlicerStyleCollection.prototype.setDefault = function(newDefaultStyle) { + /// + /// Sets the default slicer style for use in the parent object's scope. [Api set: ExcelApi 1.10] + /// + /// The `SlicerStyle` object, or name of the `SlicerStyle` object, that should be the new default. + /// + } + + return SlicerStyleCollection; + })(OfficeExtension.ClientObject); + Excel.SlicerStyleCollection = SlicerStyleCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the sort direction. [Api set: ExcelApi 1.8] + var SortBy = { + __proto__: null, + "ascending": "ascending", + "descending": "descending", + } + Excel.SortBy = SortBy; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.2] + var SortDataOption = { + __proto__: null, + "normal": "normal", + "textAsNumber": "textAsNumber", + } + Excel.SortDataOption = SortDataOption; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var SortField = (function() { + function SortField() { + /// Represents a condition in a sorting operation. [Api set: ExcelApi 1.2] + /// Specifies if the sorting is done in an ascending fashion. [Api set: ExcelApi 1.2] + /// Specifies the color that is the target of the condition if the sorting is on font or cell color. [Api set: ExcelApi 1.2] + /// Represents additional sorting options for this field. [Api set: ExcelApi 1.2] + /// Specifies the icon that is the target of the condition, if the sorting is on the cell's icon. [Api set: ExcelApi 1.2] + /// Specifies 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] + /// Specifies the type of sorting of this condition. [Api set: ExcelApi 1.2] + /// Specifies the subfield that is the target property name of a rich value to sort on. [Api set: ExcelApi 1.9] + } + return SortField; + })(); + Interfaces.SortField.__proto__ = null; + Interfaces.SortField = SortField; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.2] + var SortMethod = { + __proto__: null, + "pinYin": "pinYin", + "strokeCount": "strokeCount", + } + Excel.SortMethod = SortMethod; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.2] + var SortOn = { + __proto__: null, + "value": "value", + "cellColor": "cellColor", + "fontColor": "fontColor", + "icon": "icon", + } + Excel.SortOn = SortOn; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.2] + var SortOrientation = { + __proto__: null, + "rows": "rows", + "columns": "columns", + } + Excel.SortOrientation = SortOrientation; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var SpecialCellType = { + __proto__: null, + "conditionalFormats": "conditionalFormats", + "dataValidations": "dataValidations", + "blanks": "blanks", + "constants": "constants", + "formulas": "formulas", + "sameConditionalFormat": "sameConditionalFormat", + "sameDataValidation": "sameDataValidation", + "visible": "visible", + } + Excel.SpecialCellType = SpecialCellType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.9] + var SpecialCellValueType = { + __proto__: null, + "all": "all", + "errors": "errors", + "errorsLogical": "errorsLogical", + "errorsNumbers": "errorsNumbers", + "errorsText": "errorsText", + "errorsLogicalNumber": "errorsLogicalNumber", + "errorsLogicalText": "errorsLogicalText", + "errorsNumberText": "errorsNumberText", + "logical": "logical", + "logicalNumbers": "logicalNumbers", + "logicalText": "logicalText", + "logicalNumbersText": "logicalNumbersText", + "numbers": "numbers", + "numbersText": "numbersText", + "text": "text", + } + Excel.SpecialCellValueType = SpecialCellValueType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Style = (function(_super) { + __extends(Style, _super); + function Style() { + /// An object encapsulating a style's format and other properties. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. [Api set: ExcelApi 1.8] + /// A collection of four border objects that represent the style of the four borders. [Api set: ExcelApi 1.7] + /// Specifies if the style is a built-in style. [Api set: ExcelApi 1.7] + /// The fill of the style. [Api set: ExcelApi 1.7] + /// A `Font` object that represents the font of the style. [Api set: ExcelApi 1.7] + /// Specifies if the formula will be hidden when the worksheet is protected. [Api set: ExcelApi 1.7] + /// Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. [Api set: ExcelApi 1.7] + /// Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. [Api set: ExcelApi 1.7] + /// Specifies if the style includes the color, color index, line style, and weight border properties. [Api set: ExcelApi 1.7] + /// Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. [Api set: ExcelApi 1.7] + /// Specifies if the style includes the number format property. [Api set: ExcelApi 1.7] + /// Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. [Api set: ExcelApi 1.7] + /// Specifies if the style includes the formula hidden and locked protection properties. [Api set: ExcelApi 1.7] + /// An integer from 0 to 250 that indicates the indent level for the style. [Api set: ExcelApi 1.7] + /// Specifies if the object is locked when the worksheet is protected. [Api set: ExcelApi 1.7] + /// The name of the style. [Api set: ExcelApi 1.7] + /// The format code of the number format for the style. [Api set: ExcelApi 1.7] + /// The localized format code of the number format for the style. [Api set: ExcelApi 1.7] + /// The reading order for the style. [Api set: ExcelApi 1.7] + /// Specifies if text automatically shrinks to fit in the available column width. [Api set: ExcelApi 1.7] + /// The text orientation for the style. [Api set: ExcelApi 1.8] + /// Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. [Api set: ExcelApi 1.7] + /// Specifies if Excel wraps the text in the object. [Api set: ExcelApi 1.7] + } + + Style.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Style.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.StyleUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Style object, with properties that have already been loaded and synced. + /// + } + Style.prototype.delete = function() { + /// + /// Deletes this style. [Api set: ExcelApi 1.7] + /// + /// + } + + return Style; + })(OfficeExtension.ClientObject); + Excel.Style = Style; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var StyleCollection = (function(_super) { + __extends(StyleCollection, _super); + function StyleCollection() { + /// Represents a collection of all the styles. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + StyleCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + StyleCollection.prototype.add = function(name) { + /// + /// Adds a new style to the collection. [Api set: ExcelApi 1.7] + /// + /// Name of the style to be added. + /// + } + StyleCollection.prototype.getCount = function() { + /// + /// Gets the number of styles in the collection. [Api set: ExcelApi 1.9] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + StyleCollection.prototype.getItem = function(name) { + /// + /// Gets a `Style` by name. [Api set: ExcelApi 1.7] + /// + /// Name of the style to be retrieved. + /// + } + StyleCollection.prototype.getItemAt = function(index) { + /// + /// Gets a style based on its position in the collection. [Api set: ExcelApi 1.9] + /// + /// Index value of the style object to be retrieved. Zero-indexed. + /// + } + StyleCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a style by name. If the style object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.14] + /// + /// Name of the style to be retrieved. + /// + } + + return StyleCollection; + })(OfficeExtension.ClientObject); + Excel.StyleCollection = StyleCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.8] + var SubtotalLocationType = { + __proto__: null, + "atTop": "atTop", + "atBottom": "atBottom", + "off": "off", + } + Excel.SubtotalLocationType = SubtotalLocationType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var Subtotals = (function() { + function Subtotals() { + /// Subtotals for the Pivot Field. [Api set: ExcelApi 1.8] + /// If `Automatic` is set to `true`, then all other values will be ignored when setting the `Subtotals`. [Api set: ExcelApi 1.8] + /// [Api set: ExcelApi 1.8] + /// [Api set: ExcelApi 1.8] + /// [Api set: ExcelApi 1.8] + /// [Api set: ExcelApi 1.8] + /// [Api set: ExcelApi 1.8] + /// [Api set: ExcelApi 1.8] + /// [Api set: ExcelApi 1.8] + /// [Api set: ExcelApi 1.8] + /// [Api set: ExcelApi 1.8] + /// [Api set: ExcelApi 1.8] + /// [Api set: ExcelApi 1.8] + } + return Subtotals; + })(); + Interfaces.Subtotals.__proto__ = null; + Interfaces.Subtotals = Subtotals; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Table = (function(_super) { + __extends(Table, _super); + function Table() { + /// Represents an Excel table. To learn more about the table object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables | Work with tables using the Excel JavaScript API}. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the `AutoFilter` object of the table. [Api set: ExcelApi 1.9] + /// Represents a collection of all the columns in the table. [Api set: ExcelApi 1.1] + /// Specifies if the first column contains special formatting. [Api set: ExcelApi 1.3] + /// Specifies if the last column contains special formatting. [Api set: ExcelApi 1.3] + /// 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. [Api set: ExcelApi 1.1] + /// Returns a numeric ID. [Api set: ExcelApi 1.8] + /// Name of the table. The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. [Api set: ExcelApi 1.1] + /// Represents a collection of all the rows in the table. [Api set: ExcelApi 1.1] + /// Specifies if 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] + /// Specifies if 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] + /// Specifies if 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] + /// Specifies if the header row is visible. This value can be set to show or remove the header row. [Api set: ExcelApi 1.1] + /// Specifies if the total row is visible. This value can be set to show or remove the total row. [Api set: ExcelApi 1.1] + /// Represents the sorting for the table. [Api set: ExcelApi 1.2] + /// Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. [Api set: ExcelApi 1.1] + /// The style applied to the table. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The worksheet containing the current table. [Api set: ExcelApi 1.2] + /// Occurs when data in cells changes on a specific table. [Api set: ExcelApi 1.7] + /// Occurs when a filter is applied on a specific table. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Occurs when the selection changes on a specific table. [Api set: ExcelApi 1.7] + } + + Table.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Table.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.TableUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Table object, with properties that have already been loaded and synced. + /// + } + Table.prototype.clearFilters = function() { + /// + /// Clears all the filters currently applied on the table. [Api set: ExcelApi 1.2] + /// + /// + } + Table.prototype.clearStyle = function() { + /// + /// Changes the table to use the default table style. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// + } + Table.prototype.convertToRange = function() { + /// + /// Converts the table into a normal range of cells. All data is preserved. [Api set: ExcelApi 1.2] + /// + /// + } + Table.prototype.delete = function() { + /// + /// Deletes the table. [Api set: ExcelApi 1.1] + /// + /// + } + Table.prototype.getDataBodyRange = function() { + /// + /// Gets the range object associated with the data body of the table. [Api set: ExcelApi 1.1] + /// + /// + } + Table.prototype.getHeaderRowRange = function() { + /// + /// Gets the range object associated with the header row of the table. [Api set: ExcelApi 1.1] + /// + /// + } + Table.prototype.getRange = function() { + /// + /// Gets the range object associated with the entire table. [Api set: ExcelApi 1.1] + /// + /// + } + Table.prototype.getTotalRowRange = function() { + /// + /// Gets the range object associated with the totals row of the table. [Api set: ExcelApi 1.1] + /// + /// + } + Table.prototype.reapplyFilters = function() { + /// + /// Reapplies all the filters currently on the table. [Api set: ExcelApi 1.2] + /// + /// + } + Table.prototype.resize = function(newRange) { + /// + /// Resize the table to the new range. The new range must overlap with the original table range and the headers (or the top of the table) must be in the same row. [Api set: ExcelApi 1.13] + /// + /// The range object or range address that will be used to determine the new size of the table. + /// + } + Table.prototype.setStyle = function(style) { + /// + /// Sets the style applied to the table. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// The style to apply to the table. An `InvalidArgumentException` is thrown if a string is provided that does not match the name of any style. + /// + } + Table.prototype.onChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the table that raised the changed event. + /// + var eventInfo = new Excel.Interfaces.TableChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Table.prototype.onFiltered = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the table that raised the filter applied event. + /// + var eventInfo = new Excel.Interfaces.TableFilteredEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Table.prototype.onSelectionChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the table that raised the selection changed event. + /// + var eventInfo = new Excel.Interfaces.TableSelectionChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + return Table; + })(OfficeExtension.ClientObject); + Excel.Table = Table; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TableAddedEventArgs = (function() { + function TableAddedEventArgs() { + /// Provides information about the table that raised the added event. [Api set: ExcelApi 1.9] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.9] + /// Gets the ID of the table that is added. [Api set: ExcelApi 1.9] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.9] + /// Gets the ID of the worksheet in which the table is added. [Api set: ExcelApi 1.9] + } + return TableAddedEventArgs; + })(); + Interfaces.TableAddedEventArgs.__proto__ = null; + Interfaces.TableAddedEventArgs = TableAddedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TableChangedEventArgs = (function() { + function TableChangedEventArgs() { + /// Provides information about the table that raised the changed event. [Api set: ExcelApi 1.7] + /// Gets the address that represents the changed area of a table on a specific worksheet. [Api set: ExcelApi 1.7] + /// Gets the change type that represents how the changed event is triggered. See `Excel.DataChangeType` for details. [Api set: ExcelApi 1.7] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.7] + /// Gets the ID of the table in which the data changed. [Api set: ExcelApi 1.7] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.7] + /// Gets the ID of the worksheet in which the data changed. [Api set: ExcelApi 1.7] + /// Gets the information about the change detail. This property can be retrieved when the changed event is triggered on a single cell. If the changed event is triggered on multiple cells, this property cannot be retrieved. [Api set: ExcelApi 1.9] + } + return TableChangedEventArgs; + })(); + Interfaces.TableChangedEventArgs.__proto__ = null; + Interfaces.TableChangedEventArgs = TableChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TableCollection = (function(_super) { + __extends(TableCollection, _super); + function TableCollection() { + /// 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] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the number of tables in the workbook. [Api set: ExcelApi 1.1] + /// Occurs when a new table is added in a workbook. [Api set: ExcelApi 1.9] + /// Occurs when data changes on any table in a workbook, or a worksheet. [Api set: ExcelApi 1.7] + /// Occurs when the specified table is deleted in a workbook. [Api set: ExcelApi 1.9] + /// Occurs when a filter is applied on any table in a workbook, or a worksheet. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the loaded child items in this collection. + } + + TableCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + TableCollection.prototype.add = function(address, hasHeaders) { + /// + /// Creates 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] + /// + /// 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.] + /// A 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 a header and shift the data down by one row. + /// + } + TableCollection.prototype.getCount = function() { + /// + /// Gets the number of tables in the collection. [Api set: ExcelApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + TableCollection.prototype.getItem = function(key) { + /// + /// Gets a table by name or ID. [Api set: ExcelApi 1.1] + /// + /// Name or ID of the table to be retrieved. + /// + } + TableCollection.prototype.getItemAt = function(index) { + /// + /// Gets a table based on its position in the collection. [Api set: ExcelApi 1.1] + /// + /// Index value of the object to be retrieved. Zero-indexed. + /// + } + TableCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a table by name or ID. If the table doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + /// + /// Name or ID of the table to be retrieved. + /// + } + TableCollection.prototype.onAdded = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the table that raised the added event. + /// + var eventInfo = new Excel.Interfaces.TableAddedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + TableCollection.prototype.onChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the table that raised the changed event. + /// + var eventInfo = new Excel.Interfaces.TableChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + TableCollection.prototype.onDeleted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the table that raised the deleted event. + /// + var eventInfo = new Excel.Interfaces.TableDeletedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + TableCollection.prototype.onFiltered = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the table that raised the filter applied event. + /// + var eventInfo = new Excel.Interfaces.TableFilteredEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + return TableCollection; + })(OfficeExtension.ClientObject); + Excel.TableCollection = TableCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TableColumn = (function(_super) { + __extends(TableColumn, _super); + function TableColumn() { + /// Represents a column in a table. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Retrieves the filter applied to the column. [Api set: ExcelApi 1.2] + /// Returns a unique key that identifies the column within the table. [Api set: ExcelApi 1.1] + /// Returns the index number of the column within the columns collection of the table. Zero-indexed. [Api set: ExcelApi 1.1] + /// Specifies the name of the table column. [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] + /// Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. [Api set: ExcelApi 1.1] + /// A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. [Api set: ExcelApi 1.16] + /// A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. [Api set: ExcelApi 1.16] + } + + TableColumn.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + TableColumn.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.TableColumnUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing TableColumn object, with properties that have already been loaded and synced. + /// + } + TableColumn.prototype.delete = function() { + /// + /// Deletes the column from the table. [Api set: ExcelApi 1.1] + /// + /// + } + TableColumn.prototype.getDataBodyRange = function() { + /// + /// Gets the range object associated with the data body of the column. [Api set: ExcelApi 1.1] + /// + /// + } + TableColumn.prototype.getHeaderRowRange = function() { + /// + /// Gets the range object associated with the header row of the column. [Api set: ExcelApi 1.1] + /// + /// + } + TableColumn.prototype.getRange = function() { + /// + /// Gets the range object associated with the entire column. [Api set: ExcelApi 1.1] + /// + /// + } + TableColumn.prototype.getTotalRowRange = function() { + /// + /// Gets the range object associated with the totals row of the column. [Api set: ExcelApi 1.1] + /// + /// + } + + return TableColumn; + })(OfficeExtension.ClientObject); + Excel.TableColumn = TableColumn; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TableColumnCollection = (function(_super) { + __extends(TableColumnCollection, _super); + function TableColumnCollection() { + /// Represents a collection of all the columns that are part of the table. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the number of columns in the table. [Api set: ExcelApi 1.1] + /// Gets the loaded child items in this collection. + } + + TableColumnCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + TableColumnCollection.prototype.add = function(index, values, name) { + /// + /// 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.] + /// + /// 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. + /// Optional. A 2D array of unformatted values of the table column. + /// Optional. Specifies the name of the new column. If `null`, the default name will be used. + /// + } + TableColumnCollection.prototype.addAsJson = function(index, values, name) { + /// + /// Adds a new column to the table. Unlike `add()`, `addAsJson()` takes any type of cell value, such as image or entity data types. [Api set: ExcelApi 1.16] + /// + /// 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. + /// Optional. A 2D array of cell values of the table column. + /// Optional. Specifies the name of the new column. If `null`, the default name will be used. + /// + } + TableColumnCollection.prototype.getCount = function() { + /// + /// Gets the number of columns in the table. [Api set: ExcelApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + TableColumnCollection.prototype.getItem = function(key) { + /// + /// Gets a column object by name or ID. [Api set: ExcelApi 1.1] + /// + /// Column name or ID. + /// + } + TableColumnCollection.prototype.getItemAt = function(index) { + /// + /// Gets a column based on its position in the collection. [Api set: ExcelApi 1.1] + /// + /// Index value of the object to be retrieved. Zero-indexed. + /// + } + TableColumnCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a column object by name or ID. If the column doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + /// + /// Column name or ID. + /// + } + + return TableColumnCollection; + })(OfficeExtension.ClientObject); + Excel.TableColumnCollection = TableColumnCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TableDeletedEventArgs = (function() { + function TableDeletedEventArgs() { + /// Provides information about the table that raised the deleted event. [Api set: ExcelApi 1.9] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.9] + /// Gets the ID of the table that is deleted. [Api set: ExcelApi 1.9] + /// Gets the name of the table that is deleted. [Api set: ExcelApi 1.9] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.9] + /// Gets the ID of the worksheet in which the table is deleted. [Api set: ExcelApi 1.9] + } + return TableDeletedEventArgs; + })(); + Interfaces.TableDeletedEventArgs.__proto__ = null; + Interfaces.TableDeletedEventArgs = TableDeletedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TableFilteredEventArgs = (function() { + function TableFilteredEventArgs() { + /// Provides information about the table that raised the filter applied event. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the ID of the table in which the filter is applied. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the ID of the worksheet which contains the table. [Api set: ExcelApi BETA (PREVIEW ONLY)] + } + return TableFilteredEventArgs; + })(); + Interfaces.TableFilteredEventArgs.__proto__ = null; + Interfaces.TableFilteredEventArgs = TableFilteredEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TableRow = (function(_super) { + __extends(TableRow, _super); + function TableRow() { + /// Represents a row in a table. Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, a `TableRow` object represents 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] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the index number of the row within the rows collection of the table. Zero-indexed. [Api set: ExcelApi 1.1] + /// Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. [Api set: ExcelApi 1.1] + /// A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. [Api set: ExcelApi 1.16] + /// A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. [Api set: ExcelApi 1.16] + } + + TableRow.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + TableRow.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.TableRowUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing TableRow object, with properties that have already been loaded and synced. + /// + } + TableRow.prototype.delete = function() { + /// + /// Deletes the row from the table. [Api set: ExcelApi 1.1] + /// + /// + } + TableRow.prototype.getRange = function() { + /// + /// Returns the range object associated with the entire row. [Api set: ExcelApi 1.1] + /// + /// + } + + return TableRow; + })(OfficeExtension.ClientObject); + Excel.TableRow = TableRow; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TableRowCollection = (function(_super) { + __extends(TableRowCollection, _super); + function TableRowCollection() { + /// 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 or columns are added before them, a `TableRow` object represents 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] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the number of rows in the table. [Api set: ExcelApi 1.1] + /// Gets the loaded child items in this collection. + } + + TableRowCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + TableRowCollection.prototype.add = function(index, values, alwaysInsert) { + /// + /// 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 or columns are added before them, a `TableRow` object represents 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; 1.15 for adding `alwaysInsert` parameter.] + /// + /// 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. + /// Optional. A 2D array of unformatted values of the table row. + /// Optional. Specifies whether the new rows will be inserted into the table when new rows are added. If `true`, the new rows will be inserted into the table. If `false`, the new rows will be added below the table. Default is `true`. + /// + } + TableRowCollection.prototype.addAsJson = function(index, values, alwaysInsert) { + /// + /// Adds one or more rows to the table. The returned object will be the top row of the newly added row or rows. Unlike `add()`, `addAsJson()` takes any type of cell value, such as image or entity data types. Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, a `TableRow` object represents 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.16] + /// + /// 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. + /// Optional. A 2D array of cell values of the table row. + /// Optional. Specifies whether the new rows will be inserted into the table when new rows are added. If `true`, the new rows will be inserted into the table. If `false`, the new rows will be added below the table. Default is `true`. + /// + } + TableRowCollection.prototype.deleteRows = function(rows) { + /// + /// Delete multiple rows from a table. These rows don't need to be sequential. This method will throw the `InvalidArgument` error if a chosen row has already been deleted or doesn't exist. This method will throw the `InsertDeleteConflict` error if the table on which the method is called has a filter applied. [Api set: ExcelApiOnline 1.1] + /// + /// An array of row index numbers or row objects to delete from the table. + /// + } + TableRowCollection.prototype.deleteRowsAt = function(index, count) { + /// + /// Delete a specified number of rows from a table, starting at a given index. This method will throw the `InsertDeleteConflict` error if the table on which the method is called has a filter applied. [Api set: ExcelApiOnline 1.1] + /// + /// The index value of the row to be deleted. Note: Row indexes update each time that a preceding row in the table is deleted, after each delete operation. Ensure that the index of the row that you want to delete hasn't changed between the time that you determined the value and the time that you run the operation. + /// Number of rows to delete. By default, a single row will be deleted. + /// + } + TableRowCollection.prototype.getCount = function() { + /// + /// Gets the number of rows in the table. [Api set: ExcelApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + TableRowCollection.prototype.getItemAt = function(index) { + /// + /// Gets a row based on its position in the collection. Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, a `TableRow` object represents 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] + /// + /// Index value of the object to be retrieved. Zero-indexed. + /// + } + + return TableRowCollection; + })(OfficeExtension.ClientObject); + Excel.TableRowCollection = TableRowCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TableScopedCollection = (function(_super) { + __extends(TableScopedCollection, _super); + function TableScopedCollection() { + /// 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 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + TableScopedCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + TableScopedCollection.prototype.getCount = function() { + /// + /// Gets the number of tables in the collection. [Api set: ExcelApi 1.9] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + TableScopedCollection.prototype.getFirst = function() { + /// + /// 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 1.9] + /// + /// + } + TableScopedCollection.prototype.getItem = function(key) { + /// + /// Gets a table by name or ID. [Api set: ExcelApi 1.9] + /// + /// Name or ID of the table to be retrieved. + /// + } + TableScopedCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a table by name or ID. If the table object does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.14] + /// + /// Name or ID of the table to be retrieved. + /// + } + + return TableScopedCollection; + })(OfficeExtension.ClientObject); + Excel.TableScopedCollection = TableScopedCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TableSelectionChangedEventArgs = (function() { + function TableSelectionChangedEventArgs() { + /// Provides information about the table that raised the selection changed event. [Api set: ExcelApi 1.7] + /// Gets the range address that represents the selected area of the table on a specific worksheet. [Api set: ExcelApi 1.7] + /// Specifies if the selection is inside a table. `IsInsideTable` must be set to `true` for the address to be useful. [Api set: ExcelApi 1.7] + /// Gets the ID of the table in which the selection changed. [Api set: ExcelApi 1.7] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.7] + /// Gets the ID of the worksheet in which the selection changed. [Api set: ExcelApi 1.7] + } + return TableSelectionChangedEventArgs; + })(); + Interfaces.TableSelectionChangedEventArgs.__proto__ = null; + Interfaces.TableSelectionChangedEventArgs = TableSelectionChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TableSort = (function(_super) { + __extends(TableSort, _super); + function TableSort() { + /// Manages sorting operations on `Table` objects. [Api set: ExcelApi 1.2] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the current conditions used to last sort the table. [Api set: ExcelApi 1.2] + /// Specifies if the casing impacts the last sort of the table. [Api set: ExcelApi 1.2] + /// Represents the Chinese character ordering method last used to sort the table. [Api set: ExcelApi 1.2] + } + + TableSort.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + TableSort.prototype.apply = function(fields, matchCase, method) { + /// + /// Perform a sort operation. [Api set: ExcelApi 1.2] + /// + /// The list of conditions to sort on. + /// Optional. Whether to have the casing impact string ordering. + /// Optional. The ordering method used for Chinese characters. + /// + } + TableSort.prototype.clear = function() { + /// + /// 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] + /// + /// + } + TableSort.prototype.reapply = function() { + /// + /// Reapplies the current sorting parameters to the table. [Api set: ExcelApi 1.2] + /// + /// + } + + return TableSort; + })(OfficeExtension.ClientObject); + Excel.TableSort = TableSort; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TableStyle = (function(_super) { + __extends(TableStyle, _super); + function TableStyle() { + /// Represents a table style, which defines the style elements by region of the table. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the name of the table style. [Api set: ExcelApi 1.10] + /// Specifies if this `TableStyle` object is read-only. [Api set: ExcelApi 1.10] + } + + TableStyle.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + TableStyle.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.TableStyleUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing TableStyle object, with properties that have already been loaded and synced. + /// + } + TableStyle.prototype.delete = function() { + /// + /// Deletes the table style. [Api set: ExcelApi 1.10] + /// + /// + } + TableStyle.prototype.duplicate = function() { + /// + /// Creates a duplicate of this table style with copies of all the style elements. [Api set: ExcelApi 1.10] + /// + /// The new `TableStyle` object that has been duplicated from this table style. + } + + return TableStyle; + })(OfficeExtension.ClientObject); + Excel.TableStyle = TableStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TableStyleCollection = (function(_super) { + __extends(TableStyleCollection, _super); + function TableStyleCollection() { + /// Represents a collection of table styles. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + TableStyleCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + TableStyleCollection.prototype.add = function(name, makeUniqueName) { + /// + /// Creates a blank `TableStyle` with the specified name. [Api set: ExcelApi 1.10] + /// + /// The unique name for the new table style. Will throw an `InvalidArgument` error if the name is already in use. + /// Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. + /// The newly created `TableStyle`. + } + TableStyleCollection.prototype.getCount = function() { + /// + /// Gets the number of table styles in the collection. [Api set: ExcelApi 1.10] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + TableStyleCollection.prototype.getDefault = function() { + /// + /// Gets the default table style for the parent object's scope. [Api set: ExcelApi 1.10] + /// + /// The `TableStyle` object that is the current default table style. + } + TableStyleCollection.prototype.getItem = function(name) { + /// + /// Gets a `TableStyle` by name. [Api set: ExcelApi 1.10] + /// + /// Name of the table style to be retrieved. + /// The `TableStyle` object whose name matches the input. + } + TableStyleCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a `TableStyle` by name. If the table style does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.10] + /// + /// Name of the table style to be retrieved. + /// The `TableStyle` object whose name matches the input. + } + TableStyleCollection.prototype.setDefault = function(newDefaultStyle) { + /// + /// Sets the default table style for use in the parent object's scope. [Api set: ExcelApi 1.10] + /// + /// The `TableStyle` object, or name of the `TableStyle` object, that should be the new default. + /// + } + + return TableStyleCollection; + })(OfficeExtension.ClientObject); + Excel.TableStyleCollection = TableStyleCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TextConditionalFormat = (function(_super) { + __extends(TextConditionalFormat, _super); + function TextConditionalFormat() { + /// Represents a specific text conditional format. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// The rule of the conditional format. [Api set: ExcelApi 1.6] + } + + TextConditionalFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + TextConditionalFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.TextConditionalFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing TextConditionalFormat object, with properties that have already been loaded and synced. + /// + } + + return TextConditionalFormat; + })(OfficeExtension.ClientObject); + Excel.TextConditionalFormat = TextConditionalFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TextFrame = (function(_super) { + __extends(TextFrame, _super); + function TextFrame() { + /// Represents the text frame of a shape object. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. [Api set: ExcelApi 1.9] + /// Represents the bottom margin, in points, of the text frame. [Api set: ExcelApi 1.9] + /// Specifies if the text frame contains text. [Api set: ExcelApi 1.9] + /// Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. [Api set: ExcelApi 1.9] + /// Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. [Api set: ExcelApi 1.9] + /// Represents the left margin, in points, of the text frame. [Api set: ExcelApi 1.9] + /// Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. [Api set: ExcelApi 1.9] + /// Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. [Api set: ExcelApi 1.9] + /// Represents the right margin, in points, of the text frame. [Api set: ExcelApi 1.9] + /// Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See `Excel.TextRange` for details. [Api set: ExcelApi 1.9] + /// Represents the top margin, in points, of the text frame. [Api set: ExcelApi 1.9] + /// Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. [Api set: ExcelApi 1.9] + /// Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. [Api set: ExcelApi 1.9] + } + + TextFrame.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + TextFrame.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.TextFrameUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing TextFrame object, with properties that have already been loaded and synced. + /// + } + TextFrame.prototype.deleteText = function() { + /// + /// Deletes all the text in the text frame. [Api set: ExcelApi 1.9] + /// + /// + } + + return TextFrame; + })(OfficeExtension.ClientObject); + Excel.TextFrame = TextFrame; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TextRange = (function(_super) { + __extends(TextRange, _super); + function TextRange() { + /// Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. [Api set: ExcelApi 1.9] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns a `ShapeFont` object that represents the font attributes for the text range. [Api set: ExcelApi 1.9] + /// Represents the plain text content of the text range. [Api set: ExcelApi 1.9] + } + + TextRange.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + TextRange.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.TextRangeUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing TextRange object, with properties that have already been loaded and synced. + /// + } + TextRange.prototype.getSubstring = function(start, length) { + /// + /// Returns a TextRange object for the substring in the given range. [Api set: ExcelApi 1.9] + /// + /// The zero-based index of the first character to get from the text range. + /// Optional. The number of characters to be returned in the new text range. If length is omitted, all the characters from start to the end of the text range's last paragraph will be returned. + /// + } + + return TextRange; + })(OfficeExtension.ClientObject); + Excel.TextRange = TextRange; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TimelineStyle = (function(_super) { + __extends(TimelineStyle, _super); + function TimelineStyle() { + /// Represents a `TimelineStyle`, which defines style elements by region in the timeline. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the name of the timeline style. [Api set: ExcelApi 1.10] + /// Specifies if this `TimelineStyle` object is read-only. [Api set: ExcelApi 1.10] + } + + TimelineStyle.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + TimelineStyle.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.TimelineStyleUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing TimelineStyle object, with properties that have already been loaded and synced. + /// + } + TimelineStyle.prototype.delete = function() { + /// + /// Deletes the table style. [Api set: ExcelApi 1.10] + /// + /// + } + TimelineStyle.prototype.duplicate = function() { + /// + /// Creates a duplicate of this timeline style with copies of all the style elements. [Api set: ExcelApi 1.10] + /// + /// The new `TimelineStyle` object that has been duplicated from this timeline style. + } + + return TimelineStyle; + })(OfficeExtension.ClientObject); + Excel.TimelineStyle = TimelineStyle; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TimelineStyleCollection = (function(_super) { + __extends(TimelineStyleCollection, _super); + function TimelineStyleCollection() { + /// Represents a collection of timeline styles. [Api set: ExcelApi 1.10] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + TimelineStyleCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + TimelineStyleCollection.prototype.add = function(name, makeUniqueName) { + /// + /// Creates a blank `TimelineStyle` with the specified name. [Api set: ExcelApi 1.10] + /// + /// The unique name for the new timeline style. Will throw an `InvalidArgument` error if the name is already in use. + /// Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. + /// The newly created `TimelineStyle`. + } + TimelineStyleCollection.prototype.getCount = function() { + /// + /// Gets the number of timeline styles in the collection. [Api set: ExcelApi 1.10] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + TimelineStyleCollection.prototype.getDefault = function() { + /// + /// Gets the default timeline style for the parent object's scope. [Api set: ExcelApi 1.10] + /// + /// The `TimelineStyle` object that is the current default timeline style. + } + TimelineStyleCollection.prototype.getItem = function(name) { + /// + /// Gets a `TimelineStyle` by name. [Api set: ExcelApi 1.10] + /// + /// Name of the timeline style to be retrieved. + /// The `TimelineStyle` object whose name matches the input. + } + TimelineStyleCollection.prototype.getItemOrNullObject = function(name) { + /// + /// Gets a `TimelineStyle` by name. If the timeline style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.10] + /// + /// Name of the timeline style to be retrieved. + /// The `TimelineStyle` object whose name matches the input. + } + TimelineStyleCollection.prototype.setDefault = function(newDefaultStyle) { + /// + /// Sets the default timeline style for use in the parent object's scope. [Api set: ExcelApi 1.10] + /// + /// The `TimelineStyle` object, or name of the `TimelineStyle` object, that should be the new default. + /// + } + + return TimelineStyleCollection; + })(OfficeExtension.ClientObject); + Excel.TimelineStyleCollection = TimelineStyleCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var TopBottomConditionalFormat = (function(_super) { + __extends(TopBottomConditionalFormat, _super); + function TopBottomConditionalFormat() { + /// Represents a top/bottom conditional format. [Api set: ExcelApi 1.6] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// The criteria of the top/bottom conditional format. [Api set: ExcelApi 1.6] + } + + TopBottomConditionalFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + TopBottomConditionalFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.TopBottomConditionalFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing TopBottomConditionalFormat object, with properties that have already been loaded and synced. + /// + } + + return TopBottomConditionalFormat; + })(OfficeExtension.ClientObject); + Excel.TopBottomConditionalFormat = TopBottomConditionalFormat; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// A simple enum for top/bottom filters to select whether to filter by the top N or bottom N percent, number, or sum of values. [Api set: ExcelApi 1.12] + var TopBottomSelectionType = { + __proto__: null, + "items": "items", + "percent": "percent", + "sum": "sum", + } + Excel.TopBottomSelectionType = TopBottomSelectionType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.3] + var V1CoercionType = { + __proto__: null, + "matrix": "matrix", + "table": "table", + "text": "text", + "image": "image", + "xmlSvg": "xmlSvg", + } + Excel.V1CoercionType = V1CoercionType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.3] + var V1TableEnum = { + __proto__: null, + "all": "all", + "data": "data", + "headers": "headers", + } + Excel.V1TableEnum = V1TableEnum; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Enum representing all accepted conditions by which a value filter can be applied. Used to configure the type of PivotFilter that is applied to the field. `PivotFilter.exclusive` can be set to `true` to invert many of these conditions. [Api set: ExcelApi 1.12] + var ValueFilterCondition = { + __proto__: null, + "unknown": "unknown", + "equals": "equals", + "greaterThan": "greaterThan", + "greaterThanOrEqualTo": "greaterThanOrEqualTo", + "lessThan": "lessThan", + "lessThanOrEqualTo": "lessThanOrEqualTo", + "between": "between", + "topN": "topN", + "bottomN": "bottomN", + } + Excel.ValueFilterCondition = ValueFilterCondition; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.1] + var VerticalAlignment = { + __proto__: null, + "top": "top", + "center": "center", + "bottom": "bottom", + "justify": "justify", + "distributed": "distributed", + } + Excel.VerticalAlignment = VerticalAlignment; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Workbook = (function(_super) { + __extends(Workbook, _super); + function Workbook() { + /// Workbook is the top level object which contains related workbook objects such as worksheets, tables, and ranges. To learn more about the workbook object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-workbooks | Work with workbooks using the Excel JavaScript API}. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the Excel application instance that contains this workbook. [Api set: ExcelApi 1.1] + /// Specifies if the workbook is in AutoSave mode. [Api set: ExcelApi 1.9] + /// Represents a collection of bindings that are part of the workbook. [Api set: ExcelApi 1.1] + /// Returns a number about the version of Excel Calculation Engine. [Api set: ExcelApi 1.9] + /// 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 1.9] + /// Represents a collection of comments associated with the workbook. [Api set: ExcelApi 1.10] + /// Represents the collection of custom XML parts contained by this workbook. [Api set: ExcelApi 1.5] + /// Represents all data connections in the workbook. [Api set: ExcelApi 1.7] + /// Represents a collection of worksheet functions that can be used for computation. [Api set: ExcelApi 1.2] + /// Specifies if changes have been made since the workbook 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 1.9] + /// Returns a collection of linked data types that are part of the workbook. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Returns a collection of linked workbooks. In formulas, the workbook links can be used to reference data (cell values and names) outside of the current workbook. [Api set: ExcelApiOnline 1.1] + /// Gets the workbook name. [Api set: ExcelApi 1.7] + /// Represents a collection of workbook-scoped named items (named ranges and constants). [Api set: ExcelApi 1.1] + /// Represents a collection of PivotTableStyles associated with the workbook. [Api set: ExcelApi 1.10] + /// Represents a collection of PivotTables associated with the workbook. [Api set: ExcelApi 1.3] + /// Specifies if the workbook has ever been saved locally or online. [Api set: ExcelApi 1.9] + /// Gets the workbook properties. [Api set: ExcelApi 1.7] + /// Returns the protection object for a workbook. [Api set: ExcelApi 1.7] + /// Returns a collection of Power Query queries that are part of the workbook. [Api set: ExcelApi 1.14] + /// Returns `true` if the workbook is open in read-only mode. [Api set: ExcelApi 1.8] + /// Represents a collection of settings associated with the workbook. [Api set: ExcelApi 1.4] + /// Specifies whether the PivotTable's field list pane is shown at the workbook level. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents a collection of SlicerStyles associated with the workbook. [Api set: ExcelApi 1.10] + /// Represents a collection of slicers associated with the workbook. [Api set: ExcelApi 1.10] + /// Represents a collection of styles associated with the workbook. [Api set: ExcelApi 1.7] + /// Represents a collection of TableStyles associated with the workbook. [Api set: ExcelApi 1.10] + /// Represents a collection of tables associated with the workbook. [Api set: ExcelApi 1.1] + /// Returns a collection of tasks that are present in the workbook. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents a collection of TimelineStyles associated with the workbook. [Api set: ExcelApi 1.10] + /// True if the workbook uses the 1904 date system. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// 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 1.9] + /// Represents a collection of worksheets associated with the workbook. [Api set: ExcelApi 1.1] + /// Occurs when the workbook is activated. Note: This event will not fire when the workbook is opened. [Api set: ExcelApi 1.13] + /// Occurs when the AutoSave setting is changed on the workbook. [Api set: ExcelApi 1.9] + /// Occurs when the selection in the document is changed. [Api set: ExcelApi 1.2] + } + + Workbook.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Workbook.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.WorkbookUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Workbook object, with properties that have already been loaded and synced. + /// + } + Workbook.prototype.close = function(closeBehavior) { + /// + /// Close current workbook. [Api set: ExcelApi 1.11] + /// + /// workbook close behavior. + /// + } + Workbook.prototype.getActiveCell = function() { + /// + /// Gets the currently active cell from the workbook. [Api set: ExcelApi 1.7] + /// + /// + } + Workbook.prototype.getActiveChart = function() { + /// + /// Gets the currently active chart in the workbook. If there is no active chart, an `ItemNotFound` exception is thrown. [Api set: ExcelApi 1.9] + /// + /// + } + Workbook.prototype.getActiveChartOrNullObject = function() { + /// + /// Gets the currently active chart in the workbook. If there is no active chart, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.9] + /// + /// + } + Workbook.prototype.getActiveSlicer = function() { + /// + /// Gets the currently active slicer in the workbook. If there is no active slicer, an `ItemNotFound` exception is thrown. [Api set: ExcelApi 1.10] + /// + /// + } + Workbook.prototype.getActiveSlicerOrNullObject = function() { + /// + /// Gets the currently active slicer in the workbook. If there is no active slicer, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.10] + /// + /// + } + Workbook.prototype.getIsActiveCollabSession = function() { + /// + /// Returns `true` if the workbook is being edited by multiple users (through 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 1.9] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = false; + return result; + } + Workbook.prototype.getLinkedEntityCellValue = function(linkedEntityCellValueId) { + /// + /// Returns a `LinkedEntityCellValue` based on the provided `LinkedEntityId`. [Api set: ExcelApi 1.16] + /// + /// An identifier that specifies a specific LinkedEntityCellValue. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = null; + return result; + } + Workbook.prototype.getSelectedRange = function() { + /// + /// 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] + /// + /// + } + Workbook.prototype.getSelectedRanges = function() { + /// + /// 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 1.9] + /// + /// + } + Workbook.prototype.insertWorksheetsFromBase64 = function(base64File, options) { + /// + /// Inserts the specified worksheets from a source workbook into the current workbook. **Note**: This API is currently only supported for Office on Windows, Mac, and the web. [Api set: ExcelApi 1.13] + /// + /// Required. The base64-encoded string representing the source workbook file. + /// Optional. The options that define which worksheets to insert and where in the workbook the new worksheets will be inserted. By default, all the worksheets from the source workbook are inserted at the end of the current workbook. + /// An array of IDs corresponding to each newly inserted worksheet. + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = []; + return result; + } + Workbook.prototype.save = function(saveBehavior) { + /// + /// Save current workbook. [Api set: ExcelApi 1.11] + /// + /// Workbook save behavior. + /// + } + Workbook.prototype.onActivated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the workbook that raised the activated event. + /// + var eventInfo = new Excel.Interfaces.WorkbookActivatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Workbook.prototype.onAutoSaveSettingChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the workbook's `onAutoSaveSettingChanged` event. + /// + var eventInfo = new Excel.Interfaces.WorkbookAutoSaveSettingChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Workbook.prototype.onSelectionChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the document that raised the selection changed event. + /// + var eventInfo = new Excel.Interfaces.SelectionChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + return Workbook; + })(OfficeExtension.ClientObject); + Excel.Workbook = Workbook; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorkbookActivatedEventArgs = (function() { + function WorkbookActivatedEventArgs() { + /// Provides information about the workbook that raised the activated event. [Api set: ExcelApi 1.13] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.13] + } + return WorkbookActivatedEventArgs; + })(); + Interfaces.WorkbookActivatedEventArgs.__proto__ = null; + Interfaces.WorkbookActivatedEventArgs = WorkbookActivatedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorkbookAutoSaveSettingChangedEventArgs = (function() { + function WorkbookAutoSaveSettingChangedEventArgs() { + /// Provides information about the workbook's `onAutoSaveSettingChanged` event. [Api set: ExcelApi 1.9] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.9] + } + return WorkbookAutoSaveSettingChangedEventArgs; + })(); + Interfaces.WorkbookAutoSaveSettingChangedEventArgs.__proto__ = null; + Interfaces.WorkbookAutoSaveSettingChangedEventArgs = WorkbookAutoSaveSettingChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var WorkbookCreated = (function(_super) { + __extends(WorkbookCreated, _super); + function WorkbookCreated() { + /// 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] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + } + + WorkbookCreated.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return WorkbookCreated; + })(OfficeExtension.ClientObject); + Excel.WorkbookCreated = WorkbookCreated; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// Represents the refresh mode of the workbook links. [Api set: ExcelApiOnline 1.1] + var WorkbookLinksRefreshMode = { + __proto__: null, + "manual": "manual", + "automatic": "automatic", + } + Excel.WorkbookLinksRefreshMode = WorkbookLinksRefreshMode; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var WorkbookProtection = (function(_super) { + __extends(WorkbookProtection, _super); + function WorkbookProtection() { + /// Represents the protection of a workbook object. [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies if the workbook is protected. [Api set: ExcelApi 1.7] + } + + WorkbookProtection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + WorkbookProtection.prototype.protect = function(password) { + /// + /// Protects a workbook. Fails if the workbook has been protected. [Api set: ExcelApi 1.7] + /// + /// Workbook protection password. + /// + } + WorkbookProtection.prototype.unprotect = function(password) { + /// + /// Unprotects a workbook. [Api set: ExcelApi 1.7] + /// + /// Workbook protection password. + /// + } + + return WorkbookProtection; + })(OfficeExtension.ClientObject); + Excel.WorkbookProtection = WorkbookProtection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var WorkbookRangeAreas = (function(_super) { + __extends(WorkbookRangeAreas, _super); + function WorkbookRangeAreas() { + /// Represents a collection of one or more rectangular ranges in multiple worksheets. [Api set: ExcelApi 1.12] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns an array of addresses in A1-style. Address values contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. [Api set: ExcelApi 1.12] + /// Returns the `RangeAreasCollection` object. Each `RangeAreas` in the collection represent one or more rectangle ranges in one worksheet. [Api set: ExcelApi 1.12] + /// Returns ranges that comprise this object in a `RangeCollection` object. [Api set: ExcelApi 1.12] + } + + WorkbookRangeAreas.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + WorkbookRangeAreas.prototype.getRangeAreasBySheet = function(key) { + /// + /// Returns the `RangeAreas` object based on worksheet ID or name in the collection. [Api set: ExcelApi 1.12] + /// + /// The name or ID of the worksheet. + /// + } + WorkbookRangeAreas.prototype.getRangeAreasOrNullObjectBySheet = function(key) { + /// + /// Returns the `RangeAreas` object based on worksheet name or ID in the collection. If the worksheet does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.12] + /// + /// The name or ID of the worksheet. + /// + } + + WorkbookRangeAreas.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + /// + /// + } + + WorkbookRangeAreas.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return WorkbookRangeAreas; + })(OfficeExtension.ClientObject); + Excel.WorkbookRangeAreas = WorkbookRangeAreas; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Worksheet = (function(_super) { + __extends(Worksheet, _super); + function Worksheet() { + /// An Excel worksheet is a grid of cells. It can contain data, tables, charts, etc. To learn more about the worksheet object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-worksheets | Work with worksheets using the Excel JavaScript API}. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the `AutoFilter` object of the worksheet. [Api set: ExcelApi 1.9] + /// Returns a collection of charts that are part of the worksheet. [Api set: ExcelApi 1.1] + /// Returns a collection of all the Comments objects on the worksheet. [Api set: ExcelApi 1.10] + /// Gets a collection of worksheet-level custom properties. [Api set: ExcelApi 1.12] + /// Determines if Excel should recalculate the worksheet when necessary. True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. [Api set: ExcelApi 1.9] + /// Gets an object that can be used to manipulate frozen panes on the worksheet. [Api set: ExcelApi 1.7] + /// Gets the horizontal page break collection for the worksheet. This collection only contains manual page breaks. [Api set: ExcelApi 1.9] + /// 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. [Api set: ExcelApi 1.1] + /// The display name of the worksheet. [Api set: ExcelApi 1.1] + /// Returns a collection of sheet views that are present in the worksheet. [Api set: ExcelApiOnline 1.1] + /// Collection of names scoped to the current worksheet. [Api set: ExcelApi 1.4] + /// Gets the `PageLayout` object of the worksheet. [Api set: ExcelApi 1.9] + /// Collection of PivotTables that are part of the worksheet. [Api set: ExcelApi 1.3] + /// The zero-based position of the worksheet within the workbook. [Api set: ExcelApi 1.1] + /// Returns the sheet protection object for a worksheet. [Api set: ExcelApi 1.2] + /// Returns the collection of all the Shape objects on the worksheet. [Api set: ExcelApi 1.9] + /// Specifies if gridlines are visible to the user. [Api set: ExcelApi 1.8] + /// Specifies if headings are visible to the user. [Api set: ExcelApi 1.8] + /// Returns a collection of slicers that are part of the worksheet. [Api set: ExcelApi 1.10] + /// Returns the standard (default) height of all the rows in the worksheet, in points. [Api set: ExcelApi 1.7] + /// Specifies 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] + /// The tab color of the worksheet. 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 #RRGGBB (e.g., "FFA500"). When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. [Api set: ExcelApi 1.7] + /// Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). [Api set: ExcelApi 1.14] + /// Collection of tables that are part of the worksheet. [Api set: ExcelApi 1.1] + /// Returns a collection of tasks that are present in the worksheet. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the vertical page break collection for the worksheet. This collection only contains manual page breaks. [Api set: ExcelApi 1.9] + /// The visibility of the worksheet. [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] + /// Occurs when the worksheet is activated. [Api set: ExcelApi 1.7] + /// Occurs when the worksheet is calculated. [Api set: ExcelApi 1.8] + /// Occurs when data changes in a specific worksheet. [Api set: ExcelApi 1.7] + /// Occurs when one or more columns have been sorted. This happens as the result of a left to right sort operation. [Api set: ExcelApi 1.10] + /// Occurs when the worksheet is deactivated. [Api set: ExcelApi 1.7] + /// Occurs when a filter is applied on a specific worksheet. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Occurs when format changed on a specific worksheet. [Api set: ExcelApi 1.9] + /// Occurs when one or more formulas are changed in this worksheet. This event is for when the formula itself changes, not the data value resulting from the formula's calculation. [Api set: ExcelApi 1.13] + /// Occurs when the worksheet name is changed. [Api set: ExcelApi 1.17] + /// Occurs when the worksheet protection state is changed. [Api set: ExcelApi 1.14] + /// Occurs when the hidden state of one or more rows has changed on a specific worksheet. [Api set: ExcelApi 1.11] + /// Occurs when one or more rows have been sorted. This happens as the result of a top-to-bottom sort operation. [Api set: ExcelApi 1.10] + /// Occurs when the selection changes on a specific worksheet. [Api set: ExcelApi 1.7] + /// Occurs when a left-clicked/tapped action happens in the worksheet. This event will not be fired when clicking in the following cases: - The user drags the mouse for multi-selection. - The user selects a cell in the mode when cell arguments are selected for formula references. [Api set: ExcelApi 1.10] + /// Occurs when the worksheet visibility is changed. [Api set: ExcelApi 1.17] + } + + Worksheet.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Worksheet.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.WorksheetUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Worksheet object, with properties that have already been loaded and synced. + /// + } + Worksheet.prototype.activate = function() { + /// + /// Activate the worksheet in the Excel UI. [Api set: ExcelApi 1.1] + /// + /// + } + Worksheet.prototype.calculate = function(markAllDirty) { + /// + /// Calculates all cells on a worksheet. [Api set: ExcelApi 1.6] + /// + /// True, to mark all as dirty. + /// + } + Worksheet.prototype.copy = function(positionType, relativeTo) { + /// + /// Copies a worksheet and places it at the specified position. [Api set: ExcelApi 1.7] + /// + /// The location in the workbook to place the newly created worksheet. The default value is "None", which inserts the worksheet at the beginning of the worksheet. + /// The existing worksheet which determines the newly created worksheet's position. This is only needed if `positionType` is "Before" or "After". + /// The newly created worksheet. + } + Worksheet.prototype.delete = function() { + /// + /// Deletes the worksheet from the workbook. Note that if the worksheet's visibility is set to "VeryHidden", the delete operation will fail with an `InvalidOperation` exception. You should first change its visibility to hidden or visible before deleting it. [Api set: ExcelApi 1.1] + /// + /// + } + Worksheet.prototype.findAll = function(text, criteria) { + /// + /// 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 1.9] + /// + /// The string to find. + /// Additional search criteria, including whether the search needs to match the entire cell or be case-sensitive. + /// A `RangeAreas` object, comprising one or more rectangular ranges, that matches the search criteria. If no cells meet this criteria, an `ItemNotFound` error will be thrown. + } + Worksheet.prototype.findAllOrNullObject = function(text, criteria) { + /// + /// 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 1.9] + /// + /// The string to find. + /// Additional search criteria, including whether the search needs to match the entire cell or be case-sensitive. + /// A `RangeAreas` object, comprising one or more rectangular ranges, that matches the search criteria. If there are no matches, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + } + Worksheet.prototype.getCell = function(row, column) { + /// + /// 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] + /// + /// The row number of the cell to be retrieved. Zero-indexed. + /// The column number of the cell to be retrieved. Zero-indexed. + /// + } + Worksheet.prototype.getNext = function(visibleOnly) { + /// + /// 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] + /// + /// Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. + /// + } + Worksheet.prototype.getNextOrNullObject = function(visibleOnly) { + /// + /// Gets the worksheet that follows this one. If there are no worksheets following this one, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.5] + /// + /// Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. + /// + } + Worksheet.prototype.getPrevious = function(visibleOnly) { + /// + /// Gets the worksheet that precedes this one. If there are no previous worksheets, this method will throw an error. [Api set: ExcelApi 1.5] + /// + /// Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. + /// + } + Worksheet.prototype.getPreviousOrNullObject = function(visibleOnly) { + /// + /// Gets the worksheet that precedes this one. If there are no previous worksheets, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.5] + /// + /// Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. + /// + } + Worksheet.prototype.getRange = function(address) { + /// + /// Gets the `Range` object, representing a single rectangular block of cells, specified by the address or name. [Api set: ExcelApi 1.1] + /// + /// Optional. The string representing the address or name of the range. For example, "A1:B2". If not specified, the entire worksheet range is returned. + /// + } + Worksheet.prototype.getRangeByIndexes = function(startRow, startColumn, rowCount, columnCount) { + /// + /// 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] + /// + /// Start row (zero-indexed). + /// Start column (zero-indexed). + /// Number of rows to include in the range. + /// Number of columns to include in the range. + /// + } + Worksheet.prototype.getRanges = function(address) { + /// + /// Gets the `RangeAreas` object, representing one or more blocks of rectangular ranges, specified by the address or name. [Api set: ExcelApi 1.9] + /// + /// Optional. A string containing the comma-separated or semicolon-separated addresses or names of the individual ranges. For example, "A1:B2, A5:B5" or "A1:B2; A5:B5". If not specified, a `RangeAreas` object for the entire worksheet is returned. + /// + } + Worksheet.prototype.getUsedRange = function(valuesOnly) { + /// + /// 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] + /// + /// Optional. If `true`, considers only cells with values as used cells (ignoring formatting). [Api set: ExcelApi 1.2] + /// + } + Worksheet.prototype.getUsedRangeOrNullObject = function(valuesOnly) { + /// + /// 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, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + /// + /// Optional. Considers only cells with values as used cells. + /// + } + Worksheet.prototype.replaceAll = function(text, replacement, criteria) { + /// + /// Finds and replaces the given string based on the criteria specified within the current worksheet. [Api set: ExcelApi 1.9] + /// + /// String to find. + /// The string that replaces the original string. + /// Additional replacement criteria. + /// The number of replacements performed. + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + Worksheet.prototype.showOutlineLevels = function(rowLevels, columnLevels) { + /// + /// Shows row or column groups by their outline levels. Outlines groups and summarizes a list of data in the worksheet. The `rowLevels` and `columnLevels` parameters specify how many levels of the outline will be displayed. The acceptable argument range is between 0 and 8. A value of 0 does not change the current display. A value greater than the current number of levels displays all the levels. [Api set: ExcelApi 1.10] + /// + /// The number of row levels of an outline to display. + /// The number of column levels of an outline to display. + /// + } + Worksheet.prototype.onActivated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the activated event. + /// + var eventInfo = new Excel.Interfaces.WorksheetActivatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onCalculated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the calculated event. + /// + var eventInfo = new Excel.Interfaces.WorksheetCalculatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the changed event. + /// + var eventInfo = new Excel.Interfaces.WorksheetChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onColumnSorted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the column-sorted event and its related worksheet. + /// + var eventInfo = new Excel.Interfaces.WorksheetColumnSortedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onDeactivated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the deactivated event. + /// + var eventInfo = new Excel.Interfaces.WorksheetDeactivatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onFiltered = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the filter applied event. + /// + var eventInfo = new Excel.Interfaces.WorksheetFilteredEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onFormatChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet format change event. + /// + var eventInfo = new Excel.Interfaces.WorksheetFormatChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onFormulaChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet and formulas that raised the formula changed event. + /// + var eventInfo = new Excel.Interfaces.WorksheetFormulaChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onNameChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet whose name has changed. + /// + var eventInfo = new Excel.Interfaces.WorksheetNameChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onProtectionChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the protection status changed event, which fires when the protection status is updated in a worksheet. + /// + var eventInfo = new Excel.Interfaces.WorksheetProtectionChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onRowHiddenChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet's row hidden change event. + /// + var eventInfo = new Excel.Interfaces.WorksheetRowHiddenChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onRowSorted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the row-sorted event and its related worksheet. + /// + var eventInfo = new Excel.Interfaces.WorksheetRowSortedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onSelectionChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the selection changed event. + /// + var eventInfo = new Excel.Interfaces.WorksheetSelectionChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onSingleClicked = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the left-clicked/tapped event and its related worksheet. + /// + var eventInfo = new Excel.Interfaces.WorksheetSingleClickedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Worksheet.prototype.onVisibilityChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet whose visibility has changed. + /// + var eventInfo = new Excel.Interfaces.WorksheetVisibilityChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + return Worksheet; + })(OfficeExtension.ClientObject); + Excel.Worksheet = Worksheet; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetActivatedEventArgs = (function() { + function WorksheetActivatedEventArgs() { + /// Provides information about the worksheet that raised the activated event. [Api set: ExcelApi 1.7] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.7] + /// Gets the ID of the worksheet that is activated. [Api set: ExcelApi 1.7] + } + return WorksheetActivatedEventArgs; + })(); + Interfaces.WorksheetActivatedEventArgs.__proto__ = null; + Interfaces.WorksheetActivatedEventArgs = WorksheetActivatedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetAddedEventArgs = (function() { + function WorksheetAddedEventArgs() { + /// Provides information about the worksheet that raised the added event. [Api set: ExcelApi 1.7] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.7] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.7] + /// Gets the ID of the worksheet that is added to the workbook. [Api set: ExcelApi 1.7] + } + return WorksheetAddedEventArgs; + })(); + Interfaces.WorksheetAddedEventArgs.__proto__ = null; + Interfaces.WorksheetAddedEventArgs = WorksheetAddedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetCalculatedEventArgs = (function() { + function WorksheetCalculatedEventArgs() { + /// Provides information about the worksheet that raised the calculated event. [Api set: ExcelApi 1.8] + /// The address of the range that completed calculation. If multiple ranges completed calculation, the string is a comma-separated list of those range addresses. [Api set: ExcelApi 1.11] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.8] + /// Gets the ID of the worksheet in which the calculation occurred. [Api set: ExcelApi 1.8] + } + return WorksheetCalculatedEventArgs; + })(); + Interfaces.WorksheetCalculatedEventArgs.__proto__ = null; + Interfaces.WorksheetCalculatedEventArgs = WorksheetCalculatedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetChangedEventArgs = (function() { + function WorksheetChangedEventArgs() { + /// Provides information about the worksheet that raised the changed event. [Api set: ExcelApi 1.7] + /// Gets the range address that represents the changed area of a specific worksheet. [Api set: ExcelApi 1.7] + /// Gets the change type that represents how the changed event is triggered. See `Excel.DataChangeType` for details. [Api set: ExcelApi 1.7] + /// Represents the information about the change detail. This property can be retrieved when the changed event is triggered on a single cell. If the changed event is triggered on multiple cells, this property cannot be retrieved. [Api set: ExcelApi 1.9] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.7] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.7] + /// Gets the ID of the worksheet in which the data changed. [Api set: ExcelApi 1.7] + /// Represents a change to the direction that the cells in a worksheet will shift when a cell or cells are deleted or inserted. This includes the following two scenarios. 1. The direction (such as down or to the right) that existing cells will shift when a new cell or cells are inserted into a worksheet. 2. The direction (such as up or to the left) that the remaining cells will shift when a cell or cells are deleted from a worksheet. [Api set: ExcelApi 1.14] + /// Represents the trigger source of the event. For example, identifies whether this local add-in triggers the event. [Api set: ExcelApi 1.14] + } + return WorksheetChangedEventArgs; + })(); + Interfaces.WorksheetChangedEventArgs.__proto__ = null; + Interfaces.WorksheetChangedEventArgs = WorksheetChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var WorksheetCollection = (function(_super) { + __extends(WorksheetCollection, _super); + function WorksheetCollection() { + /// Represents a collection of worksheet objects that are part of the workbook. [Api set: ExcelApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Occurs when any worksheet in the workbook is activated. [Api set: ExcelApi 1.7] + /// Occurs when a new worksheet is added to the workbook. [Api set: ExcelApi 1.7] + /// Occurs when any worksheet in the workbook is calculated. [Api set: ExcelApi 1.8] + /// Occurs when any worksheet in the workbook is changed. [Api set: ExcelApi 1.9] + /// Occurs when one or more columns have been sorted. This happens as the result of a left-to-right sort operation. [Api set: ExcelApi 1.10] + /// Occurs when any worksheet in the workbook is deactivated. [Api set: ExcelApi 1.7] + /// Occurs when a worksheet is deleted from the workbook. [Api set: ExcelApi 1.7] + /// Occurs when any worksheet's filter is applied in the workbook. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Occurs when any worksheet in the workbook has a format changed. [Api set: ExcelApi 1.9] + /// Occurs when one or more formulas are changed in any worksheet of this collection. This event is for when the formula itself changes, not the data value resulting from the formula's calculation. [Api set: ExcelApi 1.13] + /// Occurs when a worksheet is moved within a workbook. This event only triggers when a worksheet is directly moved within a workbook. This event doesn't trigger when the position of a worksheet is indirectly changed, such as when a new worksheet is inserted and causes existing worksheets to change positions. [Api set: ExcelApi 1.17] + /// Occurs when the worksheet name is changed in the worksheet collection. [Api set: ExcelApi 1.17] + /// Occurs when the worksheet protection state is changed. [Api set: ExcelApi 1.14] + /// Occurs when the hidden state of one or more rows has changed on a specific worksheet. [Api set: ExcelApi 1.11] + /// Occurs when one or more rows have been sorted. This happens as the result of a top-to-bottom sort operation. [Api set: ExcelApi 1.10] + /// Occurs when the selection changes on any worksheet. [Api set: ExcelApi 1.9] + /// Occurs when left-clicked/tapped operation happens in the worksheet collection. This event will not be fired when clicking in the following cases: - The user drags the mouse for multi-selection. - The user selects a cell in the mode when cell arguments are selected for formula references. [Api set: ExcelApi 1.10] + /// Occurs when the worksheet visibility is changed in the worksheet collection. [Api set: ExcelApi 1.17] + /// Gets the loaded child items in this collection. + } + + WorksheetCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + WorksheetCollection.prototype.add = function(name) { + /// + /// 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] + /// + /// Optional. The name of the worksheet to be added. If specified, the name should be unique. If not specified, Excel determines the name of the new worksheet. + /// + } + WorksheetCollection.prototype.addFromBase64 = function(base64File, sheetNamesToInsert, positionType, relativeTo) { + /// + /// Inserts the specified worksheets of a workbook into the current workbook. **Note**: This API is currently only supported for Office on Windows and Mac. And it has been deprecated, please use `Workbook.insertWorksheetFromBase64` instead. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// + /// Required. The base64-encoded string representing the source workbook file. + /// Optional. The names of individual worksheets to insert. By default, all the worksheets from the source workbook are inserted. + /// Optional. Where in the current workbook the new worksheets will be inserted. See `Excel.WorksheetPositionType` for details. Default is "Start". + /// Optional. The worksheet in the current workbook that is referenced for the `positionType` parameter. Default is `null` and, based on `positionType`, it will insert worksheets at the start or end of the current workbook. + /// An array of IDs corresponding to each newly inserted worksheet. + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = []; + return result; + } + WorksheetCollection.prototype.getActiveWorksheet = function() { + /// + /// Gets the currently active worksheet in the workbook. [Api set: ExcelApi 1.1] + /// + /// + } + WorksheetCollection.prototype.getCount = function(visibleOnly) { + /// + /// Gets the number of worksheets in the collection. [Api set: ExcelApi 1.4] + /// + /// Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + WorksheetCollection.prototype.getFirst = function(visibleOnly) { + /// + /// Gets the first worksheet in the collection. [Api set: ExcelApi 1.5] + /// + /// Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. + /// + } + WorksheetCollection.prototype.getItem = function(key) { + /// + /// Gets a worksheet object using its name or ID. [Api set: ExcelApi 1.1] + /// + /// The name or ID of the worksheet. + /// + } + WorksheetCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a worksheet object using its name or ID. If the worksheet does not exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.4] + /// + /// The name or ID of the worksheet. + /// + } + WorksheetCollection.prototype.getLast = function(visibleOnly) { + /// + /// Gets the last worksheet in the collection. [Api set: ExcelApi 1.5] + /// + /// Optional. If `true`, considers only visible worksheets, skipping over any hidden ones. + /// + } + WorksheetCollection.prototype.onActivated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the activated event. + /// + var eventInfo = new Excel.Interfaces.WorksheetActivatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onAdded = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the added event. + /// + var eventInfo = new Excel.Interfaces.WorksheetAddedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onCalculated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the calculated event. + /// + var eventInfo = new Excel.Interfaces.WorksheetCalculatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the changed event. + /// + var eventInfo = new Excel.Interfaces.WorksheetChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onColumnSorted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the column-sorted event and its related worksheet. + /// + var eventInfo = new Excel.Interfaces.WorksheetColumnSortedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onDeactivated = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the deactivated event. + /// + var eventInfo = new Excel.Interfaces.WorksheetDeactivatedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onDeleted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the deleted event. + /// + var eventInfo = new Excel.Interfaces.WorksheetDeletedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onFiltered = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the filter applied event. + /// + var eventInfo = new Excel.Interfaces.WorksheetFilteredEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onFormatChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet format change event. + /// + var eventInfo = new Excel.Interfaces.WorksheetFormatChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onFormulaChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet and formulas that raised the formula changed event. + /// + var eventInfo = new Excel.Interfaces.WorksheetFormulaChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onMoved = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Notifies when a worksheet is moved within a workbook. If a worksheet is moved from one position within the workbook to another via the Excel UI, then this API will trigger an event. Note that if the position of a worksheet changes as a result of moving a different worksheet, then this event won't trigger for both position changes. This event only triggers for the primary worksheet move, and not any worksheet position changes that occur as a result of that primary move. + /// + var eventInfo = new Excel.Interfaces.WorksheetMovedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onNameChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet whose name has changed. + /// + var eventInfo = new Excel.Interfaces.WorksheetNameChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onProtectionChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the protection status changed event, which fires when the protection status is updated in a worksheet. + /// + var eventInfo = new Excel.Interfaces.WorksheetProtectionChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onRowHiddenChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet's row hidden change event. + /// + var eventInfo = new Excel.Interfaces.WorksheetRowHiddenChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onRowSorted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the row-sorted event and its related worksheet. + /// + var eventInfo = new Excel.Interfaces.WorksheetRowSortedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onSelectionChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet that raised the selection changed event. + /// + var eventInfo = new Excel.Interfaces.WorksheetSelectionChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onSingleClicked = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the left-clicked/tapped event and its related worksheet. + /// + var eventInfo = new Excel.Interfaces.WorksheetSingleClickedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + WorksheetCollection.prototype.onVisibilityChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the worksheet whose visibility has changed. + /// + var eventInfo = new Excel.Interfaces.WorksheetVisibilityChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + return WorksheetCollection; + })(OfficeExtension.ClientObject); + Excel.WorksheetCollection = WorksheetCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetColumnSortedEventArgs = (function() { + function WorksheetColumnSortedEventArgs() { + /// Provides information about the column-sorted event and its related worksheet. [Api set: ExcelApi 1.10] + /// Gets the range address that represents the sorted areas of a specific worksheet. Only columns changed as a result of the sort operation are returned. [Api set: ExcelApi 1.10] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.10] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.10] + /// Gets the ID of the worksheet where the sorting happened. [Api set: ExcelApi 1.10] + } + return WorksheetColumnSortedEventArgs; + })(); + Interfaces.WorksheetColumnSortedEventArgs.__proto__ = null; + Interfaces.WorksheetColumnSortedEventArgs = WorksheetColumnSortedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var WorksheetCustomProperty = (function(_super) { + __extends(WorksheetCustomProperty, _super); + function WorksheetCustomProperty() { + /// Represents a worksheet-level custom property. [Api set: ExcelApi 1.12] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the key of the custom property. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) [Api set: ExcelApi 1.12] + /// Gets or sets the value of the custom property. [Api set: ExcelApi 1.12] + } + + WorksheetCustomProperty.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + WorksheetCustomProperty.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.WorksheetCustomPropertyUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing WorksheetCustomProperty object, with properties that have already been loaded and synced. + /// + } + WorksheetCustomProperty.prototype.delete = function() { + /// + /// Deletes the custom property. [Api set: ExcelApi 1.12] + /// + /// + } + + return WorksheetCustomProperty; + })(OfficeExtension.ClientObject); + Excel.WorksheetCustomProperty = WorksheetCustomProperty; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var WorksheetCustomPropertyCollection = (function(_super) { + __extends(WorksheetCustomPropertyCollection, _super); + function WorksheetCustomPropertyCollection() { + /// Contains the collection of worksheet-level custom property. [Api set: ExcelApi 1.12] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + WorksheetCustomPropertyCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + WorksheetCustomPropertyCollection.prototype.add = function(key, value) { + /// + /// Adds a new custom property that maps to the provided key. This overwrites existing custom properties with that key. [Api set: ExcelApi 1.12] + /// + /// The key that identifies the custom property object. It is case-insensitive.The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) + /// The value of this custom property. + /// + } + WorksheetCustomPropertyCollection.prototype.getCount = function() { + /// + /// Gets the number of custom properties on this worksheet. [Api set: ExcelApi 1.12] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + WorksheetCustomPropertyCollection.prototype.getItem = function(key) { + /// + /// Gets a custom property object by its key, which is case-insensitive. Throws an error if the custom property does not exist. [Api set: ExcelApi 1.12] + /// + /// The key that identifies the custom property object. It is case-insensitive. + /// + } + WorksheetCustomPropertyCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.12] + /// + /// The key that identifies the custom property object. It is case-insensitive. + /// + } + + return WorksheetCustomPropertyCollection; + })(OfficeExtension.ClientObject); + Excel.WorksheetCustomPropertyCollection = WorksheetCustomPropertyCollection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetDeactivatedEventArgs = (function() { + function WorksheetDeactivatedEventArgs() { + /// Provides information about the worksheet that raised the deactivated event. [Api set: ExcelApi 1.7] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.7] + /// Gets the ID of the worksheet that is deactivated. [Api set: ExcelApi 1.7] + } + return WorksheetDeactivatedEventArgs; + })(); + Interfaces.WorksheetDeactivatedEventArgs.__proto__ = null; + Interfaces.WorksheetDeactivatedEventArgs = WorksheetDeactivatedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetDeletedEventArgs = (function() { + function WorksheetDeletedEventArgs() { + /// Provides information about the worksheet that raised the deleted event. [Api set: ExcelApi 1.7] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.7] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.7] + /// Gets the ID of the worksheet that is deleted from the workbook. [Api set: ExcelApi 1.7] + } + return WorksheetDeletedEventArgs; + })(); + Interfaces.WorksheetDeletedEventArgs.__proto__ = null; + Interfaces.WorksheetDeletedEventArgs = WorksheetDeletedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetFilteredEventArgs = (function() { + function WorksheetFilteredEventArgs() { + /// Provides information about the worksheet that raised the filter applied event. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Gets the ID of the worksheet in which the filter is applied. [Api set: ExcelApi BETA (PREVIEW ONLY)] + } + return WorksheetFilteredEventArgs; + })(); + Interfaces.WorksheetFilteredEventArgs.__proto__ = null; + Interfaces.WorksheetFilteredEventArgs = WorksheetFilteredEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetFormatChangedEventArgs = (function() { + function WorksheetFormatChangedEventArgs() { + /// Provides information about the worksheet format change event. [Api set: ExcelApi 1.9] + /// Gets the range address that represents the changed area of a specific worksheet. [Api set: ExcelApi 1.9] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.9] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.9] + /// Gets the ID of the worksheet in which the data changed. [Api set: ExcelApi 1.9] + } + return WorksheetFormatChangedEventArgs; + })(); + Interfaces.WorksheetFormatChangedEventArgs.__proto__ = null; + Interfaces.WorksheetFormatChangedEventArgs = WorksheetFormatChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetFormulaChangedEventArgs = (function() { + function WorksheetFormulaChangedEventArgs() { + /// Provides information about the worksheet and formulas that raised the formula changed event. [Api set: ExcelApi 1.13] + /// Gets an array of `FormulaChangedEventDetail` objects, which contain the details about the all of the changed formulas. [Api set: ExcelApi 1.13] + /// The source of the event. It can be local or remote (through co-authoring). [Api set: ExcelApi 1.13] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.13] + /// Gets the ID of the worksheet in which the formula changed. [Api set: ExcelApi 1.13] + } + return WorksheetFormulaChangedEventArgs; + })(); + Interfaces.WorksheetFormulaChangedEventArgs.__proto__ = null; + Interfaces.WorksheetFormulaChangedEventArgs = WorksheetFormulaChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var WorksheetFreezePanes = (function(_super) { + __extends(WorksheetFreezePanes, _super); + function WorksheetFreezePanes() { + /// [Api set: ExcelApi 1.7] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + } + + WorksheetFreezePanes.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + WorksheetFreezePanes.prototype.freezeAt = function(frozenRange) { + /// + /// 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] + /// + /// A range that represents the cells to be frozen, or `null` to remove all frozen panes. + /// + } + WorksheetFreezePanes.prototype.freezeColumns = function(count) { + /// + /// Freeze the first column or columns of the worksheet in place. [Api set: ExcelApi 1.7] + /// + /// Optional number of columns to freeze, or zero to unfreeze all columns + /// + } + WorksheetFreezePanes.prototype.freezeRows = function(count) { + /// + /// Freeze the top row or rows of the worksheet in place. [Api set: ExcelApi 1.7] + /// + /// Optional number of rows to freeze, or zero to unfreeze all rows + /// + } + WorksheetFreezePanes.prototype.getLocation = function() { + /// + /// Gets a range that describes the frozen cells in the active worksheet view. The frozen range corresponds to cells that are frozen in the top- and left-most pane. [Api set: ExcelApi 1.7] + /// + /// + } + WorksheetFreezePanes.prototype.getLocationOrNullObject = function() { + /// + /// Gets a range that describes the frozen cells in the active worksheet view. The frozen range corresponds to cells that are frozen in the top- and left-most pane. If there is no frozen pane, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: ExcelApi 1.7] + /// + /// + } + WorksheetFreezePanes.prototype.unfreeze = function() { + /// + /// Removes all frozen panes in the worksheet. [Api set: ExcelApi 1.7] + /// + /// + } + + return WorksheetFreezePanes; + })(OfficeExtension.ClientObject); + Excel.WorksheetFreezePanes = WorksheetFreezePanes; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetMovedEventArgs = (function() { + function WorksheetMovedEventArgs() { + /// Notifies when a worksheet is moved within a workbook. If a worksheet is moved from one position within the workbook to another via the Excel UI, then this API will trigger an event. Note that if the position of a worksheet changes as a result of moving a different worksheet, then this event won't trigger for both position changes. This event only triggers for the primary worksheet move, and not any worksheet position changes that occur as a result of that primary move. [Api set: ExcelApi 1.17] + /// Gets the new position of the worksheet, after the move. [Api set: ExcelApi 1.17] + /// Gets the previous position of the worksheet, prior to the move. [Api set: ExcelApi 1.17] + /// The source of the event. It can be local or remote (through co-authoring). [Api set: ExcelApi 1.17] + /// Gets the type of the event. [Api set: ExcelApi 1.17] + /// Gets the ID of the worksheet that was moved. [Api set: ExcelApi 1.17] + } + return WorksheetMovedEventArgs; + })(); + Interfaces.WorksheetMovedEventArgs.__proto__ = null; + Interfaces.WorksheetMovedEventArgs = WorksheetMovedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetNameChangedEventArgs = (function() { + function WorksheetNameChangedEventArgs() { + /// Provides information about the worksheet whose name has changed. [Api set: ExcelApi 1.17] + /// Gets the new name of the worksheet, after the name change. [Api set: ExcelApi 1.17] + /// Gets the previous name of the worksheet, before the name changed. [Api set: ExcelApi 1.17] + /// The source of the event. It can be local or remote (through co-authoring). [Api set: ExcelApi 1.17] + /// Gets the type of the event. [Api set: ExcelApi 1.17] + /// Gets the ID of the worksheet with the new name. [Api set: ExcelApi 1.17] + } + return WorksheetNameChangedEventArgs; + })(); + Interfaces.WorksheetNameChangedEventArgs.__proto__ = null; + Interfaces.WorksheetNameChangedEventArgs = WorksheetNameChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + /// [Api set: ExcelApi 1.7] + var WorksheetPositionType = { + __proto__: null, + "none": "none", + "before": "before", + "after": "after", + "beginning": "beginning", + "end": "end", + } + Excel.WorksheetPositionType = WorksheetPositionType; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var WorksheetProtection = (function(_super) { + __extends(WorksheetProtection, _super); + function WorksheetProtection() { + /// Represents the protection of a worksheet object. [Api set: ExcelApi 1.2] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the `AllowEditRangeCollection` object found in this worksheet. This is a collection of `AllowEditRange` objects, which work with worksheet protection properties. When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. [Api set: ExcelApiOnline 1.1] + /// Specifies if protection can be paused for this worksheet. [Api set: ExcelApiOnline 1.1] + /// Specifies if the sheet is password protected. [Api set: ExcelApiOnline 1.1] + /// Specifies if worksheet protection is paused. [Api set: ExcelApiOnline 1.1] + /// Specifies the protection options for the worksheet. [Api set: ExcelApi 1.2] + /// Specifies if the worksheet is protected. [Api set: ExcelApi 1.2] + /// Specifies the protection options saved in the worksheet. This will return the same `WorksheetProtectionOptions` object regardless of the worksheet protection state. [Api set: ExcelApiOnline 1.1] + } + + WorksheetProtection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + WorksheetProtection.prototype.checkPassword = function(password) { + /// + /// Specifies if the password can be used to unlock worksheet protection. This method doesn't change the worksheet protection state. If a password is input but no password is required to unlock worksheet protection, this method will return false. [Api set: ExcelApiOnline 1.1] + /// + /// The password to check against the protected worksheet. + /// Returns `true` if the password can be used to unlock worksheet protection. Otherwise, returns `false`. + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = false; + return result; + } + WorksheetProtection.prototype.pauseProtection = function(password) { + /// + /// Pauses worksheet protection for the given worksheet object for the user in the current session. This method does nothing if worksheet protection isn't enabled or is already paused. If the password is incorrect, then this method throws an `InvalidArgument` error and fails to pause protection. This method does not change the protection state if worksheet protection is not enabled or already paused. [Api set: ExcelApiOnline 1.1] + /// + /// The password associated with the protected worksheet. + /// + } + WorksheetProtection.prototype.protect = function(options, password) { + /// + /// Protects a worksheet. Fails if the worksheet has already been protected. [Api set: ExcelApi 1.2 for options; 1.7 for password] + /// + /// Optional. Sheet protection options. + /// Optional. Sheet protection password. + /// + } + WorksheetProtection.prototype.resumeProtection = function() { + /// + /// Resumes worksheet protection for the given worksheet object for the user in a given session. Worksheet protection must be paused for this method to work. If worksheet protection is not paused, then this method will not change the protection state of the worksheet. [Api set: ExcelApiOnline 1.1] + /// + /// + } + WorksheetProtection.prototype.setPassword = function(password) { + /// + /// Changes the password associated with the `WorksheetProtection` object. Setting the password as an empty string ("") or as `null` will remove password protection from the `WorksheetProtection` object. Worksheet protection must be enabled and paused for this method to work properly. If worksheet protection is disabled, this method throws an `InvalidOperation` error and fails to change the password. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to change the password. [Api set: ExcelApiOnline 1.1] + /// + /// The password associated with the `WorksheetProtection` object. + /// + } + WorksheetProtection.prototype.unprotect = function(password) { + /// + /// Unprotects a worksheet. [Api set: ExcelApi 1.7 for password] + /// + /// Sheet protection password. + /// + } + WorksheetProtection.prototype.updateOptions = function(options) { + /// + /// Change the worksheet protection options associated with the `WorksheetProtection` object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to change the worksheet protection options. [Api set: ExcelApiOnline 1.1] + /// + /// The options interface associated with the `WorksheetProtection` object. + /// + } + + return WorksheetProtection; + })(OfficeExtension.ClientObject); + Excel.WorksheetProtection = WorksheetProtection; +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetProtectionChangedEventArgs = (function() { + function WorksheetProtectionChangedEventArgs() { + /// Provides information about the worksheet that raised the protection status changed event, which fires when the protection status is updated in a worksheet. [Api set: ExcelApi 1.14] + /// Specifies if any of the `AllowEditRange` objects have changed. [Api set: ExcelApiOnline 1.1] + /// Gets the current protection status of the worksheet. [Api set: ExcelApi 1.14] + /// Specifies if the `WorksheetProtectionOptions` have changed. [Api set: ExcelApiOnline 1.1] + /// Specifies if the worksheet password has changed. [Api set: ExcelApiOnline 1.1] + /// The source of the event. It can be local or remote (through co-authoring). [Api set: ExcelApi 1.14] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.14] + /// Gets the ID of the worksheet in which the protection status is changed. [Api set: ExcelApi 1.14] + } + return WorksheetProtectionChangedEventArgs; + })(); + Interfaces.WorksheetProtectionChangedEventArgs.__proto__ = null; + Interfaces.WorksheetProtectionChangedEventArgs = WorksheetProtectionChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetProtectionOptions = (function() { + function WorksheetProtectionOptions() { + /// Represents the options in sheet protection. [Api set: ExcelApi 1.2] + /// Represents the worksheet protection option allowing use of the AutoFilter feature. [Api set: ExcelApi 1.2] + /// Represents the worksheet protection option allowing deleting of columns. [Api set: ExcelApi 1.2] + /// Represents the worksheet protection option allowing deleting of rows. [Api set: ExcelApi 1.2] + /// Represents the worksheet protection option allowing editing of objects. [Api set: ExcelApi 1.7] + /// Represents the worksheet protection option allowing editing of scenarios. [Api set: ExcelApi 1.7] + /// Represents the worksheet protection option allowing formatting of cells. [Api set: ExcelApi 1.2] + /// Represents the worksheet protection option allowing formatting of columns. [Api set: ExcelApi 1.2] + /// Represents the worksheet protection option allowing formatting of rows. [Api set: ExcelApi 1.2] + /// Represents the worksheet protection option allowing inserting of columns. [Api set: ExcelApi 1.2] + /// Represents the worksheet protection option allowing inserting of hyperlinks. [Api set: ExcelApi 1.2] + /// Represents the worksheet protection option allowing inserting of rows. [Api set: ExcelApi 1.2] + /// Represents the worksheet protection option allowing use of the PivotTable feature. [Api set: ExcelApi 1.2] + /// Represents the worksheet protection option allowing use of the sort feature. [Api set: ExcelApi 1.2] + /// Represents the worksheet protection option of selection mode. [Api set: ExcelApi 1.7] + } + return WorksheetProtectionOptions; + })(); + Interfaces.WorksheetProtectionOptions.__proto__ = null; + Interfaces.WorksheetProtectionOptions = WorksheetProtectionOptions; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetRowHiddenChangedEventArgs = (function() { + function WorksheetRowHiddenChangedEventArgs() { + /// Provides information about the worksheet's row hidden change event. [Api set: ExcelApi 1.11] + /// Gets the range address that represents the changed area of a specific worksheet. [Api set: ExcelApi 1.11] + /// Gets the type of change that represents how the event was triggered. See `Excel.RowHiddenChangeType` for details. [Api set: ExcelApi 1.11] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.11] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.11] + /// Gets the ID of the worksheet in which the data changed. [Api set: ExcelApi 1.11] + } + return WorksheetRowHiddenChangedEventArgs; + })(); + Interfaces.WorksheetRowHiddenChangedEventArgs.__proto__ = null; + Interfaces.WorksheetRowHiddenChangedEventArgs = WorksheetRowHiddenChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetRowSortedEventArgs = (function() { + function WorksheetRowSortedEventArgs() { + /// Provides information about the row-sorted event and its related worksheet. [Api set: ExcelApi 1.10] + /// Gets the range address that represents the sorted areas of a specific worksheet. Only rows changed as a result of the sort operation are returned. [Api set: ExcelApi 1.10] + /// Gets the source of the event. See `Excel.EventSource` for details. [Api set: ExcelApi 1.10] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.10] + /// Gets the ID of the worksheet where the sorting happened. [Api set: ExcelApi 1.10] + } + return WorksheetRowSortedEventArgs; + })(); + Interfaces.WorksheetRowSortedEventArgs.__proto__ = null; + Interfaces.WorksheetRowSortedEventArgs = WorksheetRowSortedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetSearchCriteria = (function() { + function WorksheetSearchCriteria() { + /// Represents the worksheet search criteria to be used. [Api set: ExcelApi 1.9] + /// Specifies if the match needs to be complete or partial. A complete match matches the entire contents of the cell. A partial match matches a substring within the content of the cell (e.g., `cat` partially matches `caterpillar` and `scatter`). Default is `false` (partial). [Api set: ExcelApi 1.9] + /// Specifies if the match is case-sensitive. Default is `false` (case-insensitive). [Api set: ExcelApi 1.9] + } + return WorksheetSearchCriteria; + })(); + Interfaces.WorksheetSearchCriteria.__proto__ = null; + Interfaces.WorksheetSearchCriteria = WorksheetSearchCriteria; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetSelectionChangedEventArgs = (function() { + function WorksheetSelectionChangedEventArgs() { + /// Provides information about the worksheet that raised the selection changed event. [Api set: ExcelApi 1.7] + /// Gets the range address that represents the selected area of a specific worksheet. [Api set: ExcelApi 1.7] + /// Gets the type of the event. See `Excel.EventType` for details. [Api set: ExcelApi 1.7] + /// Gets the ID of the worksheet in which the selection changed. [Api set: ExcelApi 1.7] + } + return WorksheetSelectionChangedEventArgs; + })(); + Interfaces.WorksheetSelectionChangedEventArgs.__proto__ = null; + Interfaces.WorksheetSelectionChangedEventArgs = WorksheetSelectionChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetSingleClickedEventArgs = (function() { + function WorksheetSingleClickedEventArgs() { + /// Provides information about the left-clicked/tapped event and its related worksheet. [Api set: ExcelApi 1.10] + /// Gets the address that represents the cell which was left-clicked/tapped for a specific worksheet. [Api set: ExcelApi 1.10] + /// The distance, in points, from the left-clicked/tapped point to the left (or right for right-to-left languages) gridline edge of the left-clicked/tapped cell. [Api set: ExcelApi 1.10] + /// The distance, in points, from the left-clicked/tapped point to the top gridline edge of the left-clicked/tapped cell. [Api set: ExcelApi 1.10] + /// Gets the type of the event. [Api set: ExcelApi 1.10] + /// Gets the ID of the worksheet in which the cell was left-clicked/tapped. [Api set: ExcelApi 1.10] + } + return WorksheetSingleClickedEventArgs; + })(); + Interfaces.WorksheetSingleClickedEventArgs.__proto__ = null; + Interfaces.WorksheetSingleClickedEventArgs = WorksheetSingleClickedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetVisibilityChangedEventArgs = (function() { + function WorksheetVisibilityChangedEventArgs() { + /// Provides information about the worksheet whose visibility has changed. [Api set: ExcelApi 1.17] + /// The source of the event. It can be local or remote (through co-authoring). [Api set: ExcelApi 1.17] + /// Gets the type of the event. [Api set: ExcelApi 1.17] + /// Gets the new visibility setting of the worksheet, after the visibility change. [Api set: ExcelApi 1.17] + /// Gets the previous visibility setting of the worksheet, before the visibility change. [Api set: ExcelApi 1.17] + /// Gets the ID of the worksheet whose visibility has changed. [Api set: ExcelApi 1.17] + } + return WorksheetVisibilityChangedEventArgs; + })(); + Interfaces.WorksheetVisibilityChangedEventArgs.__proto__ = null; + Interfaces.WorksheetVisibilityChangedEventArgs = WorksheetVisibilityChangedEventArgs; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var AllowEditRangeUpdateData = (function() { + function AllowEditRangeUpdateData() { + /// An interface for updating data on the AllowEditRange object, for use in "allowEditRange.set({ ... })". + /// Specifies the range associated with the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. [Api set: ExcelApiOnline 1.1]; + /// Specifies the title of the object. Worksheet protection must be disabled or paused for this method to work properly. If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. [Api set: ExcelApiOnline 1.1]; + } + return AllowEditRangeUpdateData; + })(); + Interfaces.AllowEditRangeUpdateData.__proto__ = null; + Interfaces.AllowEditRangeUpdateData = AllowEditRangeUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var LinkedWorkbookCollectionUpdateData = (function() { + function LinkedWorkbookCollectionUpdateData() { + /// An interface for updating data on the LinkedWorkbookCollection object, for use in "linkedWorkbookCollection.set({ ... })". + /// Represents the update mode of the workbook links. The mode is same for all of the workbook links present in the workbook. [Api set: ExcelApiOnline 1.1]; + } + return LinkedWorkbookCollectionUpdateData; + })(); + Interfaces.LinkedWorkbookCollectionUpdateData.__proto__ = null; + Interfaces.LinkedWorkbookCollectionUpdateData = LinkedWorkbookCollectionUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var DocumentTaskUpdateData = (function() { + function DocumentTaskUpdateData() { + /// An interface for updating data on the DocumentTask object, for use in "documentTask.set({ ... })". + /// Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task. [Api set: ExcelApi BETA (PREVIEW ONLY)]; + /// Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority. [Api set: ExcelApi BETA (PREVIEW ONLY)]; + /// Gets or sets the date and time the task should start and is due. [Api set: ExcelApi BETA (PREVIEW ONLY)]; + /// Specifies title of the task. [Api set: ExcelApi BETA (PREVIEW ONLY)]; + } + return DocumentTaskUpdateData; + })(); + Interfaces.DocumentTaskUpdateData.__proto__ = null; + Interfaces.DocumentTaskUpdateData = DocumentTaskUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RuntimeUpdateData = (function() { + function RuntimeUpdateData() { + /// An interface for updating data on the Runtime object, for use in "runtime.set({ ... })". + /// Toggle JavaScript events in the current task pane or content add-in. [Api set: ExcelApi 1.8]; + } + return RuntimeUpdateData; + })(); + Interfaces.RuntimeUpdateData.__proto__ = null; + Interfaces.RuntimeUpdateData = RuntimeUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ApplicationUpdateData = (function() { + function ApplicationUpdateData() { + /// An interface for updating data on the Application object, for use in "application.set({ ... })". + /// Returns the iterative calculation settings. In Excel on Windows and Mac, the settings will apply to the Excel Application. In Excel on the web and other platforms, the settings will apply to the active workbook. [Api set: ExcelApi 1.9] + /// Gets the ribbon of the application. [Api set: ExcelApi 1.9] + /// 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]; + /// Specifies whether the "Format Stale values" button under Calculation Options is turned on or off. The stale formulas are rendered with stale formatting if the button is turned on. [Api set: ExcelApi BETA (PREVIEW ONLY)]; + } + return ApplicationUpdateData; + })(); + Interfaces.ApplicationUpdateData.__proto__ = null; + Interfaces.ApplicationUpdateData = ApplicationUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var IterativeCalculationUpdateData = (function() { + function IterativeCalculationUpdateData() { + /// An interface for updating data on the IterativeCalculation object, for use in "iterativeCalculation.set({ ... })". + /// True if Excel will use iteration to resolve circular references. [Api set: ExcelApi 1.9]; + /// Specifies the maximum amount of change between each iteration as Excel resolves circular references. [Api set: ExcelApi 1.9]; + /// Specifies the maximum number of iterations that Excel can use to resolve a circular reference. [Api set: ExcelApi 1.9]; + } + return IterativeCalculationUpdateData; + })(); + Interfaces.IterativeCalculationUpdateData.__proto__ = null; + Interfaces.IterativeCalculationUpdateData = IterativeCalculationUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorkbookUpdateData = (function() { + function WorkbookUpdateData() { + /// An interface for updating data on the Workbook object, for use in "workbook.set({ ... })". + /// Gets the workbook properties. [Api set: ExcelApi 1.7] + /// 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 1.9]; + /// Specifies if changes have been made since the workbook 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 1.9]; + /// Specifies whether the PivotTable's field list pane is shown at the workbook level. [Api set: ExcelApi BETA (PREVIEW ONLY)]; + /// True if the workbook uses the 1904 date system. [Api set: ExcelApi BETA (PREVIEW ONLY)]; + /// 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 1.9]; + } + return WorkbookUpdateData; + })(); + Interfaces.WorkbookUpdateData.__proto__ = null; + Interfaces.WorkbookUpdateData = WorkbookUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetUpdateData = (function() { + function WorksheetUpdateData() { + /// An interface for updating data on the Worksheet object, for use in "worksheet.set({ ... })". + /// Gets the `PageLayout` object of the worksheet. [Api set: ExcelApi 1.9] + /// Determines if Excel should recalculate the worksheet when necessary. True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. [Api set: ExcelApi 1.9]; + /// The display name of the worksheet. [Api set: ExcelApi 1.1]; + /// The zero-based position of the worksheet within the workbook. [Api set: ExcelApi 1.1]; + /// Specifies if gridlines are visible to the user. [Api set: ExcelApi 1.8]; + /// Specifies if headings are visible to the user. [Api set: ExcelApi 1.8]; + /// Specifies 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]; + /// The tab color of the worksheet. 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 #RRGGBB (e.g., "FFA500"). When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. [Api set: ExcelApi 1.7]; + /// The visibility of the worksheet. [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.]; + } + return WorksheetUpdateData; + })(); + Interfaces.WorksheetUpdateData.__proto__ = null; + Interfaces.WorksheetUpdateData = WorksheetUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RangeUpdateData = (function() { + function RangeUpdateData() { + /// An interface for updating data on the Range object, for use in "range.set({ ... })". + /// Returns a data validation object. [Api set: ExcelApi 1.8] + /// Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. [Api set: ExcelApi 1.1] + /// Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. [Api set: ExcelApi 1.2]; + /// Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. [Api set: ExcelApi 1.1]; + /// 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. If a cell has no formula, its value is returned instead. [Api set: ExcelApi 1.1]; + /// Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. [Api set: ExcelApi 1.2]; + /// Represents the hyperlink for the current range. [Api set: ExcelApi 1.7]; + /// Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. [Api set: ExcelApi 1.1]; + /// Represents Excel's number format code for the given range, based on the language settings of the user. Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. Any returned text uses the locally-formatted strings based on the language specified in the system settings. [Api set: ExcelApi 1.7]; + /// Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. [Api set: ExcelApi 1.2]; + /// 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]; + /// Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. [Api set: ExcelApi 1.1]; + /// A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. [Api set: ExcelApi 1.16]; + /// A JSON representation of the values in the cells in this range. Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. [Api set: ExcelApi 1.16]; + } + return RangeUpdateData; + })(); + Interfaces.RangeUpdateData.__proto__ = null; + Interfaces.RangeUpdateData = RangeUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RangeAreasUpdateData = (function() { + function RangeAreasUpdateData() { + /// An interface for updating data on the RangeAreas object, for use in "rangeAreas.set({ ... })". + /// Returns a data validation object for all ranges in the `RangeAreas`. [Api set: ExcelApi 1.9] + /// Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. [Api set: ExcelApi 1.9] + /// 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 1.9]; + } + return RangeAreasUpdateData; + })(); + Interfaces.RangeAreasUpdateData.__proto__ = null; + Interfaces.RangeAreasUpdateData = RangeAreasUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RangeViewUpdateData = (function() { + function RangeViewUpdateData() { + /// An interface for updating data on the RangeView object, for use in "rangeView.set({ ... })". + /// Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. [Api set: ExcelApi 1.3]; + /// 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. If a cell has no formula, its value is returned instead. [Api set: ExcelApi 1.3]; + /// Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. [Api set: ExcelApi 1.3]; + /// Represents Excel's number format code for the given cell. [Api set: ExcelApi 1.3]; + /// 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]; + /// A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. [Api set: ExcelApi 1.16]; + /// A JSON representation of the values in the cells in this range. Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. [Api set: ExcelApi 1.16]; + } + return RangeViewUpdateData; + })(); + Interfaces.RangeViewUpdateData.__proto__ = null; + Interfaces.RangeViewUpdateData = RangeViewUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var SettingUpdateData = (function() { + function SettingUpdateData() { + /// An interface for updating data on the Setting object, for use in "setting.set({ ... })". + /// Represents the value stored for this setting. [Api set: ExcelApi 1.4]; + } + return SettingUpdateData; + })(); + Interfaces.SettingUpdateData.__proto__ = null; + Interfaces.SettingUpdateData = SettingUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var NamedItemUpdateData = (function() { + function NamedItemUpdateData() { + /// An interface for updating data on the NamedItem object, for use in "namedItem.set({ ... })". + /// Specifies the comment associated with this name. [Api set: ExcelApi 1.4]; + /// The formula of the named item. Formulas always start with an equal sign ("="). [Api set: ExcelApi 1.7]; + /// Specifies if the object is visible. [Api set: ExcelApi 1.1]; + } + return NamedItemUpdateData; + })(); + Interfaces.NamedItemUpdateData.__proto__ = null; + Interfaces.NamedItemUpdateData = NamedItemUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TableUpdateData = (function() { + function TableUpdateData() { + /// An interface for updating data on the Table object, for use in "table.set({ ... })". + /// The style applied to the table. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Specifies if the first column contains special formatting. [Api set: ExcelApi 1.3]; + /// Specifies if the last column contains special formatting. [Api set: ExcelApi 1.3]; + /// Name of the table. The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. [Api set: ExcelApi 1.1]; + /// Specifies if 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]; + /// Specifies if 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]; + /// Specifies if 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]; + /// Specifies if the header row is visible. This value can be set to show or remove the header row. [Api set: ExcelApi 1.1]; + /// Specifies if the total row is visible. This value can be set to show or remove the total row. [Api set: ExcelApi 1.1]; + /// Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. [Api set: ExcelApi 1.1]; + } + return TableUpdateData; + })(); + Interfaces.TableUpdateData.__proto__ = null; + Interfaces.TableUpdateData = TableUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TableColumnUpdateData = (function() { + function TableColumnUpdateData() { + /// An interface for updating data on the TableColumn object, for use in "tableColumn.set({ ... })". + /// Specifies the name of the table column. [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.]; + /// Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. [Api set: ExcelApi 1.1]; + /// A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. [Api set: ExcelApi 1.16]; + /// A JSON representation of the values in the cells in this table column. Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. [Api set: ExcelApi 1.16]; + } + return TableColumnUpdateData; + })(); + Interfaces.TableColumnUpdateData.__proto__ = null; + Interfaces.TableColumnUpdateData = TableColumnUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TableRowUpdateData = (function() { + function TableRowUpdateData() { + /// An interface for updating data on the TableRow object, for use in "tableRow.set({ ... })". + /// Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. [Api set: ExcelApi 1.1]; + /// A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. [Api set: ExcelApi 1.16]; + /// A JSON representation of the values in the cells in this table row. Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. [Api set: ExcelApi 1.16]; + } + return TableRowUpdateData; + })(); + Interfaces.TableRowUpdateData.__proto__ = null; + Interfaces.TableRowUpdateData = TableRowUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var DataValidationUpdateData = (function() { + function DataValidationUpdateData() { + /// An interface for updating data on the DataValidation object, for use in "dataValidation.set({ ... })". + /// Error alert when user enters invalid data. [Api set: ExcelApi 1.8]; + /// Specifies if data validation will be performed on blank cells. Default is `true`. [Api set: ExcelApi 1.8]; + /// Prompt when users select a cell. [Api set: ExcelApi 1.8]; + /// Data validation rule that contains different type of data validation criteria. [Api set: ExcelApi 1.8]; + } + return DataValidationUpdateData; + })(); + Interfaces.DataValidationUpdateData.__proto__ = null; + Interfaces.DataValidationUpdateData = DataValidationUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RangeFormatUpdateData = (function() { + function RangeFormatUpdateData() { + /// An interface for updating data on the RangeFormat object, for use in "rangeFormat.set({ ... })". + /// Collection of border objects that apply to the overall range. [Api set: ExcelApi 1.1] + /// Returns the fill object defined on the overall range. [Api set: ExcelApi 1.1] + /// Returns the font object defined on the overall range. [Api set: ExcelApi 1.1] + /// Returns the format protection object for a range. [Api set: ExcelApi 1.2] + /// Specifies if text is automatically indented when text alignment is set to equal distribution. [Api set: ExcelApi 1.9]; + /// Specifies the width of all colums within the range. If the column widths are not uniform, `null` will be returned. [Api set: ExcelApi 1.2]; + /// Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. [Api set: ExcelApi 1.1]; + /// An integer from 0 to 250 that indicates the indent level. [Api set: ExcelApi 1.9]; + /// The reading order for the range. [Api set: ExcelApi 1.9]; + /// The height of all rows in the range. If the row heights are not uniform, `null` will be returned. [Api set: ExcelApi 1.2]; + /// Specifies if text automatically shrinks to fit in the available column width. [Api set: ExcelApi 1.9]; + /// 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]; + /// 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. Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. [Api set: ExcelApi 1.7]; + /// Specifies if 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. Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. [Api set: ExcelApi 1.7]; + /// Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. [Api set: ExcelApi 1.1]; + /// Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting [Api set: ExcelApi 1.1]; + } + return RangeFormatUpdateData; + })(); + Interfaces.RangeFormatUpdateData.__proto__ = null; + Interfaces.RangeFormatUpdateData = RangeFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var FormatProtectionUpdateData = (function() { + function FormatProtectionUpdateData() { + /// An interface for updating data on the FormatProtection object, for use in "formatProtection.set({ ... })". + /// Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. [Api set: ExcelApi 1.2]; + /// Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. [Api set: ExcelApi 1.2]; + } + return FormatProtectionUpdateData; + })(); + Interfaces.FormatProtectionUpdateData.__proto__ = null; + Interfaces.FormatProtectionUpdateData = FormatProtectionUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RangeFillUpdateData = (function() { + function RangeFillUpdateData() { + /// An interface for updating data on the RangeFill object, for use in "rangeFill.set({ ... })". + /// HTML color code representing the color of the background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") [Api set: ExcelApi 1.1]; + /// 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 a uniform pattern setting. [Api set: ExcelApi 1.9]; + /// The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.9]; + /// Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. [Api set: ExcelApi 1.9]; + /// Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. [Api set: ExcelApi 1.9]; + } + return RangeFillUpdateData; + })(); + Interfaces.RangeFillUpdateData.__proto__ = null; + Interfaces.RangeFillUpdateData = RangeFillUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RangeBorderUpdateData = (function() { + function RangeBorderUpdateData() { + /// An interface for updating data on the RangeBorder object, for use in "rangeBorder.set({ ... })". + /// HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.1]; + /// One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. [Api set: ExcelApi 1.1]; + /// Specifies a double that lightens or darkens a color for the 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 a uniform `tintAndShade` setting. [Api set: ExcelApi 1.9]; + /// Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. [Api set: ExcelApi 1.1]; + } + return RangeBorderUpdateData; + })(); + Interfaces.RangeBorderUpdateData.__proto__ = null; + Interfaces.RangeBorderUpdateData = RangeBorderUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RangeBorderCollectionUpdateData = (function() { + function RangeBorderCollectionUpdateData() { + /// An interface for updating data on the RangeBorderCollection object, for use in "rangeBorderCollection.set({ ... })". + /// Specifies 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 collection doesn't have a uniform `tintAndShade` setting. [Api set: ExcelApi 1.9]; + } + return RangeBorderCollectionUpdateData; + })(); + Interfaces.RangeBorderCollectionUpdateData.__proto__ = null; + Interfaces.RangeBorderCollectionUpdateData = RangeBorderCollectionUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RangeFontUpdateData = (function() { + function RangeFontUpdateData() { + /// An interface for updating data on the RangeFont object, for use in "rangeFont.set({ ... })". + /// Represents the bold status of the font. [Api set: ExcelApi 1.1]; + /// HTML color code representation of the text color (e.g., #FF0000 represents Red). [Api set: ExcelApi 1.1]; + /// Specifies the italic status of the font. [Api set: ExcelApi 1.1]; + /// Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. [Api set: ExcelApi 1.1]; + /// Font size. [Api set: ExcelApi 1.1]; + /// Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. [Api set: ExcelApi 1.9]; + /// Specifies 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 1.9]; + /// Specifies 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 1.9]; + /// Specifies a double that lightens or darkens a color for the 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 a uniform font `tintAndShade` setting. [Api set: ExcelApi 1.9]; + /// Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. [Api set: ExcelApi 1.1]; + } + return RangeFontUpdateData; + })(); + Interfaces.RangeFontUpdateData.__proto__ = null; + Interfaces.RangeFontUpdateData = RangeFontUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartUpdateData = (function() { + function ChartUpdateData() { + /// An interface for updating data on the Chart object, for use in "chart.set({ ... })". + /// Represents chart axes. [Api set: ExcelApi 1.1] + /// Represents the data labels on the chart. [Api set: ExcelApi 1.1] + /// Encapsulates the format properties for the chart area. [Api set: ExcelApi 1.1] + /// Represents the legend for the chart. [Api set: ExcelApi 1.1] + /// Encapsulates the options for a pivot chart. [Api set: ExcelApi 1.9] + /// Represents the plot area for the chart. [Api set: ExcelApi 1.8] + /// Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. [Api set: ExcelApi 1.1] + /// Specifies a chart category label level enumeration constant, referring to the level of the source category labels. [Api set: ExcelApi 1.8]; + /// Specifies the type of the chart. See `Excel.ChartType` for details. [Api set: ExcelApi 1.7]; + /// Specifies the way that blank cells are plotted on a chart. [Api set: ExcelApi 1.8]; + /// Specifies the height, in points, of the chart object. [Api set: ExcelApi 1.1]; + /// The distance, in points, from the left side of the chart to the worksheet origin. [Api set: ExcelApi 1.1]; + /// Specifies the name of a chart object. [Api set: ExcelApi 1.1]; + /// Specifies the way columns or rows are used as data series on the chart. [Api set: ExcelApi 1.8]; + /// True if only visible cells are plotted. False if both visible and hidden cells are plotted. [Api set: ExcelApi 1.8]; + /// Specifies a chart series name level enumeration constant, referring to the level of the source series names. [Api set: ExcelApi 1.8]; + /// Specifies whether to display all field buttons on a PivotChart. [Api set: ExcelApi 1.7]; + /// Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. If the value axis becomes smaller than the size of the 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]; + /// Specifies the chart style for the chart. [Api set: ExcelApi 1.8]; + /// Specifies 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]; + /// Specifies the width, in points, of the chart object. [Api set: ExcelApi 1.1]; + } + return ChartUpdateData; + })(); + Interfaces.ChartUpdateData.__proto__ = null; + Interfaces.ChartUpdateData = ChartUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartPivotOptionsUpdateData = (function() { + function ChartPivotOptionsUpdateData() { + /// An interface for updating data on the ChartPivotOptions object, for use in "chartPivotOptions.set({ ... })". + /// Specifies whether to display the 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 1.9]; + /// Specifies whether to display the legend field buttons on a PivotChart. [Api set: ExcelApi 1.9]; + /// Specifies whether to display the report filter field buttons on a PivotChart. [Api set: ExcelApi 1.9]; + /// Specifies whether to display the show value field buttons on a PivotChart. [Api set: ExcelApi 1.9]; + } + return ChartPivotOptionsUpdateData; + })(); + Interfaces.ChartPivotOptionsUpdateData.__proto__ = null; + Interfaces.ChartPivotOptionsUpdateData = ChartPivotOptionsUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartAreaFormatUpdateData = (function() { + function ChartAreaFormatUpdateData() { + /// An interface for updating data on the ChartAreaFormat object, for use in "chartAreaFormat.set({ ... })". + /// Represents the border format of chart area, which includes color, linestyle, and weight. [Api set: ExcelApi 1.7] + /// Represents the font attributes (font name, font size, color, etc.) for the current object. [Api set: ExcelApi 1.1] + /// Specifies the color scheme of the chart. [Api set: ExcelApi 1.9]; + /// Specifies if the chart area of the chart has rounded corners. [Api set: ExcelApi 1.9]; + } + return ChartAreaFormatUpdateData; + })(); + Interfaces.ChartAreaFormatUpdateData.__proto__ = null; + Interfaces.ChartAreaFormatUpdateData = ChartAreaFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartSeriesUpdateData = (function() { + function ChartSeriesUpdateData() { + /// An interface for updating data on the ChartSeries object, for use in "chartSeries.set({ ... })". + /// Encapsulates the bin options for histogram charts and pareto charts. [Api set: ExcelApi 1.9] + /// Encapsulates the options for the box and whisker charts. [Api set: ExcelApi 1.9] + /// Represents a collection of all data labels in the series. [Api set: ExcelApi 1.8] + /// Represents the formatting of a chart series, which includes fill and line formatting. [Api set: ExcelApi 1.1] + /// Encapsulates the options for a region map chart. [Api set: ExcelApi 1.9] + /// Represents the error bar object of a chart series. [Api set: ExcelApi 1.9] + /// Represents the error bar object of a chart series. [Api set: ExcelApi 1.9] + /// Specifies the group for the specified series. [Api set: ExcelApi 1.8]; + /// This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. [Api set: ExcelApi 1.9]; + /// Represents the chart type of a series. See `Excel.ChartType` for details. [Api set: ExcelApi 1.7]; + /// Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnut exploded charts. Throws an `InvalidArgument` error on invalid charts. [Api set: ExcelApi 1.7]; + /// Specifies 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). [Api set: ExcelApi 1.8]; + /// Specifies if the series is filtered. Not applicable for surface charts. [Api set: ExcelApi 1.7]; + /// Specifies 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. [Api set: ExcelApi 1.8]; + /// 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]; + /// Specifies the color for maximum value of a region map chart series. [Api set: ExcelApi 1.9]; + /// Specifies the type for maximum value of a region map chart series. [Api set: ExcelApi 1.9]; + /// Specifies the maximum value of a region map chart series. [Api set: ExcelApi 1.9]; + /// Specifies the color for the midpoint value of a region map chart series. [Api set: ExcelApi 1.9]; + /// Specifies the type for the midpoint value of a region map chart series. [Api set: ExcelApi 1.9]; + /// Specifies the midpoint value of a region map chart series. [Api set: ExcelApi 1.9]; + /// Specifies the color for the minimum value of a region map chart series. [Api set: ExcelApi 1.9]; + /// Specifies the type for the minimum value of a region map chart series. [Api set: ExcelApi 1.9]; + /// Specifies the minimum value of a region map chart series. [Api set: ExcelApi 1.9]; + /// Specifies the series gradient style of a region map chart. [Api set: ExcelApi 1.9]; + /// Specifies if the series has data labels. [Api set: ExcelApi 1.7]; + /// Specifies the fill color for negative data points in a series. [Api set: ExcelApi 1.9]; + /// True if Excel inverts the pattern in the item when it corresponds to a negative number. [Api set: ExcelApi 1.8]; + /// Specifies the marker background color of a chart series. [Api set: ExcelApi 1.7]; + /// Specifies the marker foreground color of a chart series. [Api set: ExcelApi 1.7]; + /// Specifies the marker size of a chart series. [Api set: ExcelApi 1.7]; + /// Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. [Api set: ExcelApi 1.7]; + /// Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. [Api set: ExcelApi 1.1]; + /// 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. [Api set: ExcelApi 1.8]; + /// Specifies the series parent label strategy area for a treemap chart. [Api set: ExcelApi 1.9]; + /// Specifies the plot order of a chart series within the chart group. [Api set: ExcelApi 1.7]; + /// Specifies 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. [Api set: ExcelApi 1.8]; + /// Specifies whether connector lines are shown in waterfall charts. [Api set: ExcelApi 1.9]; + /// Specifies whether leader lines are displayed for each data label in the series. [Api set: ExcelApi 1.9]; + /// Specifies if the series has a shadow. [Api set: ExcelApi 1.7]; + /// Specifies if the series is smooth. Only applicable to line and scatter charts. [Api set: ExcelApi 1.7]; + /// Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. [Api set: ExcelApi 1.8]; + /// Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. [Api set: ExcelApi 1.9]; + /// True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. [Api set: ExcelApi 1.8]; + } + return ChartSeriesUpdateData; + })(); + Interfaces.ChartSeriesUpdateData.__proto__ = null; + Interfaces.ChartSeriesUpdateData = ChartSeriesUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartSeriesFormatUpdateData = (function() { + function ChartSeriesFormatUpdateData() { + /// An interface for updating data on the ChartSeriesFormat object, for use in "chartSeriesFormat.set({ ... })". + /// Represents line formatting. [Api set: ExcelApi 1.1] + } + return ChartSeriesFormatUpdateData; + })(); + Interfaces.ChartSeriesFormatUpdateData.__proto__ = null; + Interfaces.ChartSeriesFormatUpdateData = ChartSeriesFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartPointUpdateData = (function() { + function ChartPointUpdateData() { + /// An interface for updating data on the ChartPoint object, for use in "chartPoint.set({ ... })". + /// Returns the data label of a chart point. [Api set: ExcelApi 1.7] + /// Encapsulates the format properties chart point. [Api set: ExcelApi 1.1] + /// Represents whether a data point has a data label. Not applicable for surface charts. [Api set: ExcelApi 1.7]; + /// HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). [Api set: ExcelApi 1.7]; + /// HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). [Api set: ExcelApi 1.7]; + /// Represents marker size of a data point. [Api set: ExcelApi 1.7]; + /// Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. [Api set: ExcelApi 1.7]; + } + return ChartPointUpdateData; + })(); + Interfaces.ChartPointUpdateData.__proto__ = null; + Interfaces.ChartPointUpdateData = ChartPointUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartPointFormatUpdateData = (function() { + function ChartPointFormatUpdateData() { + /// An interface for updating data on the ChartPointFormat object, for use in "chartPointFormat.set({ ... })". + /// Represents the border format of a chart data point, which includes color, style, and weight information. [Api set: ExcelApi 1.7] + } + return ChartPointFormatUpdateData; + })(); + Interfaces.ChartPointFormatUpdateData.__proto__ = null; + Interfaces.ChartPointFormatUpdateData = ChartPointFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartAxesUpdateData = (function() { + function ChartAxesUpdateData() { + /// An interface for updating data on the ChartAxes object, for use in "chartAxes.set({ ... })". + /// Represents the category axis in a chart. [Api set: ExcelApi 1.1] + /// Represents the series axis of a 3-D chart. [Api set: ExcelApi 1.1] + /// Represents the value axis in an axis. [Api set: ExcelApi 1.1] + } + return ChartAxesUpdateData; + })(); + Interfaces.ChartAxesUpdateData.__proto__ = null; + Interfaces.ChartAxesUpdateData = ChartAxesUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartAxisUpdateData = (function() { + function ChartAxisUpdateData() { + /// An interface for updating data on the ChartAxis object, for use in "chartAxis.set({ ... })". + /// Represents the formatting of a chart object, which includes line and font formatting. [Api set: ExcelApi 1.1] + /// Returns an object that represents the major gridlines for the specified axis. [Api set: ExcelApi 1.1] + /// Returns an object that represents the minor gridlines for the specified axis. [Api set: ExcelApi 1.1] + /// Represents the axis title. [Api set: ExcelApi 1.1] + /// Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. [Api set: ExcelApi 1.8]; + /// Specifies the base unit for the specified category axis. [Api set: ExcelApi 1.7]; + /// Specifies the category axis type. [Api set: ExcelApi 1.7]; + /// Specifies the specified axis where the other axis crosses. See `Excel.ChartAxisPosition` for details. [Api set: ExcelApi 1.7]; + /// Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. [Api set: ExcelApi 1.7]; + /// Specifies if the value axis crosses the category axis between categories. [Api set: ExcelApi 1.8]; + /// Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. [Api set: ExcelApi 1.9]; + /// Specifies the base of the logarithm when using logarithmic scales. [Api set: ExcelApi 1.7]; + /// Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. [Api set: ExcelApi 1.7]; + /// Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. [Api set: ExcelApi 1.7]; + /// 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]; + /// 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]; + /// 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]; + /// Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. [Api set: ExcelApi 1.7]; + /// Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. [Api set: ExcelApi 1.7]; + /// 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]; + /// Specifies if an axis is multilevel. [Api set: ExcelApi 1.8]; + /// Specifies the format code for the axis tick label. [Api set: ExcelApi 1.8]; + /// Specifies 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]; + /// Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. [Api set: ExcelApi 1.8]; + /// Specifies if Excel plots data points from last to first. [Api set: ExcelApi 1.7]; + /// Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. [Api set: ExcelApi 1.7]; + /// Specifies if the axis display unit label is visible. [Api set: ExcelApi 1.7]; + /// Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. [Api set: ExcelApi 1.8]; + /// Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. [Api set: ExcelApi 1.7]; + /// Specifies 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]; + /// Specifies the number of categories or series between tick marks. [Api set: ExcelApi 1.7]; + /// Specifies if the axis is visible. [Api set: ExcelApi 1.7]; + } + return ChartAxisUpdateData; + })(); + Interfaces.ChartAxisUpdateData.__proto__ = null; + Interfaces.ChartAxisUpdateData = ChartAxisUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartAxisFormatUpdateData = (function() { + function ChartAxisFormatUpdateData() { + /// An interface for updating data on the ChartAxisFormat object, for use in "chartAxisFormat.set({ ... })". + /// Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. [Api set: ExcelApi 1.1] + /// Specifies chart line formatting. [Api set: ExcelApi 1.1] + } + return ChartAxisFormatUpdateData; + })(); + Interfaces.ChartAxisFormatUpdateData.__proto__ = null; + Interfaces.ChartAxisFormatUpdateData = ChartAxisFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartAxisTitleUpdateData = (function() { + function ChartAxisTitleUpdateData() { + /// An interface for updating data on the ChartAxisTitle object, for use in "chartAxisTitle.set({ ... })". + /// Specifies the formatting of the chart axis title. [Api set: ExcelApi 1.1] + /// Specifies the axis title. [Api set: ExcelApi 1.1]; + /// Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. [Api set: ExcelApi 1.12]; + /// Specifies if the axis title is visibile. [Api set: ExcelApi 1.1]; + } + return ChartAxisTitleUpdateData; + })(); + Interfaces.ChartAxisTitleUpdateData.__proto__ = null; + Interfaces.ChartAxisTitleUpdateData = ChartAxisTitleUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartAxisTitleFormatUpdateData = (function() { + function ChartAxisTitleFormatUpdateData() { + /// An interface for updating data on the ChartAxisTitleFormat object, for use in "chartAxisTitleFormat.set({ ... })". + /// Specifies the chart axis title's border format, which includes color, linestyle, and weight. [Api set: ExcelApi 1.8] + /// Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. [Api set: ExcelApi 1.1] + } + return ChartAxisTitleFormatUpdateData; + })(); + Interfaces.ChartAxisTitleFormatUpdateData.__proto__ = null; + Interfaces.ChartAxisTitleFormatUpdateData = ChartAxisTitleFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartDataLabelsUpdateData = (function() { + function ChartDataLabelsUpdateData() { + /// An interface for updating data on the ChartDataLabels object, for use in "chartDataLabels.set({ ... })". + /// Specifies the format of chart data labels, which includes fill and font formatting. [Api set: ExcelApi 1.1] + /// Specifies if data labels automatically generate appropriate text based on context. [Api set: ExcelApi 1.8]; + /// Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when the `TextOrientation` of data label is 0. [Api set: ExcelApi 1.8]; + /// Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. [Api set: ExcelApi 1.9]; + /// Specifies the format code for data labels. [Api set: ExcelApi 1.8]; + /// Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. [Api set: ExcelApi 1.1]; + /// String representing the separator used for the data labels on a chart. [Api set: ExcelApi 1.1]; + /// Specifies if the data label bubble size is visible. [Api set: ExcelApi 1.1]; + /// Specifies if the data label category name is visible. [Api set: ExcelApi 1.1]; + /// Specifies if the data label legend key is visible. [Api set: ExcelApi 1.1]; + /// Specifies if the data label percentage is visible. [Api set: ExcelApi 1.1]; + /// Specifies if the data label series name is visible. [Api set: ExcelApi 1.1]; + /// Specifies if the data label value is visible. [Api set: ExcelApi 1.1]; + /// Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. [Api set: ExcelApi 1.8]; + /// Represents the vertical alignment of chart data label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of the data label is -90, 90, or 180. [Api set: ExcelApi 1.8]; + } + return ChartDataLabelsUpdateData; + })(); + Interfaces.ChartDataLabelsUpdateData.__proto__ = null; + Interfaces.ChartDataLabelsUpdateData = ChartDataLabelsUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartDataLabelUpdateData = (function() { + function ChartDataLabelUpdateData() { + /// An interface for updating data on the ChartDataLabel object, for use in "chartDataLabel.set({ ... })". + /// Represents the format of chart data label. [Api set: ExcelApi 1.8] + /// Specifies if the data label automatically generates appropriate text based on context. [Api set: ExcelApi 1.8]; + /// String value that represents the formula of chart data label using A1-style notation. [Api set: ExcelApi 1.8]; + /// 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]; + /// Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Value is `null` if the chart data label is not visible. [Api set: ExcelApi 1.8]; + /// Specifies 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 1.9]; + /// String value that represents the format code for data label. [Api set: ExcelApi 1.8]; + /// Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. [Api set: ExcelApi 1.7]; + /// String representing the separator used for the data label on a chart. [Api set: ExcelApi 1.7]; + /// Specifies if the data label bubble size is visible. [Api set: ExcelApi 1.7]; + /// Specifies if the data label category name is visible. [Api set: ExcelApi 1.7]; + /// Specifies if the data label legend key is visible. [Api set: ExcelApi 1.7]; + /// Specifies if the data label percentage is visible. [Api set: ExcelApi 1.7]; + /// Specifies if the data label series name is visible. [Api set: ExcelApi 1.7]; + /// Specifies if the data label value is visible. [Api set: ExcelApi 1.7]; + /// String representing the text of the data label on a chart. [Api set: ExcelApi 1.8]; + /// Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. [Api set: ExcelApi 1.8]; + /// Represents the distance, in points, from the top edge of chart data label to the top of chart area. Value is `null` if the chart data label is not visible. [Api set: ExcelApi 1.8]; + /// 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]; + } + return ChartDataLabelUpdateData; + })(); + Interfaces.ChartDataLabelUpdateData.__proto__ = null; + Interfaces.ChartDataLabelUpdateData = ChartDataLabelUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartDataLabelFormatUpdateData = (function() { + function ChartDataLabelFormatUpdateData() { + /// An interface for updating data on the ChartDataLabelFormat object, for use in "chartDataLabelFormat.set({ ... })". + /// Represents the border format, which includes color, linestyle, and weight. [Api set: ExcelApi 1.8] + /// Represents the font attributes (such as font name, font size, and color) for a chart data label. [Api set: ExcelApi 1.1] + } + return ChartDataLabelFormatUpdateData; + })(); + Interfaces.ChartDataLabelFormatUpdateData.__proto__ = null; + Interfaces.ChartDataLabelFormatUpdateData = ChartDataLabelFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartDataTableUpdateData = (function() { + function ChartDataTableUpdateData() { + /// An interface for updating data on the ChartDataTable object, for use in "chartDataTable.set({ ... })". + /// Represents the format of a chart data table, which includes fill, font, and border format. [Api set: ExcelApi 1.14] + /// Specifies whether to display the horizontal border of the data table. [Api set: ExcelApi 1.14]; + /// Specifies whether to show the legend key of the data table. [Api set: ExcelApi 1.14]; + /// Specifies whether to display the outline border of the data table. [Api set: ExcelApi 1.14]; + /// Specifies whether to display the vertical border of the data table. [Api set: ExcelApi 1.14]; + /// Specifies whether to show the data table of the chart. [Api set: ExcelApi 1.14]; + } + return ChartDataTableUpdateData; + })(); + Interfaces.ChartDataTableUpdateData.__proto__ = null; + Interfaces.ChartDataTableUpdateData = ChartDataTableUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartDataTableFormatUpdateData = (function() { + function ChartDataTableFormatUpdateData() { + /// An interface for updating data on the ChartDataTableFormat object, for use in "chartDataTableFormat.set({ ... })". + /// Represents the border format of chart data table, which includes color, line style, and weight. [Api set: ExcelApi 1.14] + /// Represents the font attributes (such as font name, font size, and color) for the current object. [Api set: ExcelApi 1.14] + } + return ChartDataTableFormatUpdateData; + })(); + Interfaces.ChartDataTableFormatUpdateData.__proto__ = null; + Interfaces.ChartDataTableFormatUpdateData = ChartDataTableFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartErrorBarsUpdateData = (function() { + function ChartErrorBarsUpdateData() { + /// An interface for updating data on the ChartErrorBars object, for use in "chartErrorBars.set({ ... })". + /// Specifies the formatting type of the error bars. [Api set: ExcelApi 1.9] + /// Specifies if error bars have an end style cap. [Api set: ExcelApi 1.9]; + /// Specifies which parts of the error bars to include. [Api set: ExcelApi 1.9]; + /// The type of range marked by the error bars. [Api set: ExcelApi 1.9]; + /// Specifies whether the error bars are displayed. [Api set: ExcelApi 1.9]; + } + return ChartErrorBarsUpdateData; + })(); + Interfaces.ChartErrorBarsUpdateData.__proto__ = null; + Interfaces.ChartErrorBarsUpdateData = ChartErrorBarsUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartErrorBarsFormatUpdateData = (function() { + function ChartErrorBarsFormatUpdateData() { + /// An interface for updating data on the ChartErrorBarsFormat object, for use in "chartErrorBarsFormat.set({ ... })". + /// Represents the chart line formatting. [Api set: ExcelApi 1.9] + } + return ChartErrorBarsFormatUpdateData; + })(); + Interfaces.ChartErrorBarsFormatUpdateData.__proto__ = null; + Interfaces.ChartErrorBarsFormatUpdateData = ChartErrorBarsFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartGridlinesUpdateData = (function() { + function ChartGridlinesUpdateData() { + /// An interface for updating data on the ChartGridlines object, for use in "chartGridlines.set({ ... })". + /// Represents the formatting of chart gridlines. [Api set: ExcelApi 1.1] + /// Specifies if the axis gridlines are visible. [Api set: ExcelApi 1.1]; + } + return ChartGridlinesUpdateData; + })(); + Interfaces.ChartGridlinesUpdateData.__proto__ = null; + Interfaces.ChartGridlinesUpdateData = ChartGridlinesUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartGridlinesFormatUpdateData = (function() { + function ChartGridlinesFormatUpdateData() { + /// An interface for updating data on the ChartGridlinesFormat object, for use in "chartGridlinesFormat.set({ ... })". + /// Represents chart line formatting. [Api set: ExcelApi 1.1] + } + return ChartGridlinesFormatUpdateData; + })(); + Interfaces.ChartGridlinesFormatUpdateData.__proto__ = null; + Interfaces.ChartGridlinesFormatUpdateData = ChartGridlinesFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartLegendUpdateData = (function() { + function ChartLegendUpdateData() { + /// An interface for updating data on the ChartLegend object, for use in "chartLegend.set({ ... })". + /// Represents the formatting of a chart legend, which includes fill and font formatting. [Api set: ExcelApi 1.1] + /// Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. [Api set: ExcelApi 1.7]; + /// Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. [Api set: ExcelApi 1.7]; + /// Specifies if the chart legend should overlap with the main body of the chart. [Api set: ExcelApi 1.1]; + /// Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. [Api set: ExcelApi 1.1]; + /// Specifies if the legend has a shadow on the chart. [Api set: ExcelApi 1.7]; + /// Specifies the top of a chart legend. [Api set: ExcelApi 1.7]; + /// Specifies if the chart legend is visible. [Api set: ExcelApi 1.1]; + /// Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. [Api set: ExcelApi 1.7]; + } + return ChartLegendUpdateData; + })(); + Interfaces.ChartLegendUpdateData.__proto__ = null; + Interfaces.ChartLegendUpdateData = ChartLegendUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartLegendEntryUpdateData = (function() { + function ChartLegendEntryUpdateData() { + /// An interface for updating data on the ChartLegendEntry object, for use in "chartLegendEntry.set({ ... })". + /// Represents the visibility of a chart legend entry. [Api set: ExcelApi 1.7]; + } + return ChartLegendEntryUpdateData; + })(); + Interfaces.ChartLegendEntryUpdateData.__proto__ = null; + Interfaces.ChartLegendEntryUpdateData = ChartLegendEntryUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartLegendFormatUpdateData = (function() { + function ChartLegendFormatUpdateData() { + /// An interface for updating data on the ChartLegendFormat object, for use in "chartLegendFormat.set({ ... })". + /// Represents the border format, which includes color, linestyle, and weight. [Api set: ExcelApi 1.8] + /// Represents the font attributes such as font name, font size, and color of a chart legend. [Api set: ExcelApi 1.1] + } + return ChartLegendFormatUpdateData; + })(); + Interfaces.ChartLegendFormatUpdateData.__proto__ = null; + Interfaces.ChartLegendFormatUpdateData = ChartLegendFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartMapOptionsUpdateData = (function() { + function ChartMapOptionsUpdateData() { + /// An interface for updating data on the ChartMapOptions object, for use in "chartMapOptions.set({ ... })". + /// Specifies the series map labels strategy of a region map chart. [Api set: ExcelApi 1.9]; + /// Specifies the series mapping level of a region map chart. [Api set: ExcelApi 1.9]; + /// Specifies the series projection type of a region map chart. [Api set: ExcelApi 1.9]; + } + return ChartMapOptionsUpdateData; + })(); + Interfaces.ChartMapOptionsUpdateData.__proto__ = null; + Interfaces.ChartMapOptionsUpdateData = ChartMapOptionsUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartTitleUpdateData = (function() { + function ChartTitleUpdateData() { + /// An interface for updating data on the ChartTitle object, for use in "chartTitle.set({ ... })". + /// Represents the formatting of a chart title, which includes fill and font formatting. [Api set: ExcelApi 1.1] + /// Specifies the horizontal alignment for chart title. [Api set: ExcelApi 1.7]; + /// Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. [Api set: ExcelApi 1.7]; + /// Specifies if the chart title will overlay the chart. [Api set: ExcelApi 1.1]; + /// Represents the position of chart title. See `Excel.ChartTitlePosition` for details. [Api set: ExcelApi 1.7]; + /// Represents a boolean value that determines if the chart title has a shadow. [Api set: ExcelApi 1.7]; + /// Specifies the chart's title text. [Api set: ExcelApi 1.1]; + /// Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. [Api set: ExcelApi 1.7]; + /// Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. [Api set: ExcelApi 1.7]; + /// Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. [Api set: ExcelApi 1.7]; + /// Specifies if the chart title is visibile. [Api set: ExcelApi 1.1]; + } + return ChartTitleUpdateData; + })(); + Interfaces.ChartTitleUpdateData.__proto__ = null; + Interfaces.ChartTitleUpdateData = ChartTitleUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartFormatStringUpdateData = (function() { + function ChartFormatStringUpdateData() { + /// An interface for updating data on the ChartFormatString object, for use in "chartFormatString.set({ ... })". + /// Represents the font attributes, such as font name, font size, and color of a chart characters object. [Api set: ExcelApi 1.7] + } + return ChartFormatStringUpdateData; + })(); + Interfaces.ChartFormatStringUpdateData.__proto__ = null; + Interfaces.ChartFormatStringUpdateData = ChartFormatStringUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartTitleFormatUpdateData = (function() { + function ChartTitleFormatUpdateData() { + /// An interface for updating data on the ChartTitleFormat object, for use in "chartTitleFormat.set({ ... })". + /// Represents the border format of chart title, which includes color, linestyle, and weight. [Api set: ExcelApi 1.7] + /// Represents the font attributes (such as font name, font size, and color) for an object. [Api set: ExcelApi 1.1] + } + return ChartTitleFormatUpdateData; + })(); + Interfaces.ChartTitleFormatUpdateData.__proto__ = null; + Interfaces.ChartTitleFormatUpdateData = ChartTitleFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartBorderUpdateData = (function() { + function ChartBorderUpdateData() { + /// An interface for updating data on the ChartBorder object, for use in "chartBorder.set({ ... })". + /// HTML color code representing the color of borders in the chart. [Api set: ExcelApi 1.7]; + /// Represents the line style of the border. See `Excel.ChartLineStyle` for details. [Api set: ExcelApi 1.7]; + /// Represents weight of the border, in points. [Api set: ExcelApi 1.7]; + } + return ChartBorderUpdateData; + })(); + Interfaces.ChartBorderUpdateData.__proto__ = null; + Interfaces.ChartBorderUpdateData = ChartBorderUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartBinOptionsUpdateData = (function() { + function ChartBinOptionsUpdateData() { + /// An interface for updating data on the ChartBinOptions object, for use in "chartBinOptions.set({ ... })". + /// Specifies if bin overflow is enabled in a histogram chart or pareto chart. [Api set: ExcelApi 1.9]; + /// Specifies if bin underflow is enabled in a histogram chart or pareto chart. [Api set: ExcelApi 1.9]; + /// Specifies the bin count of a histogram chart or pareto chart. [Api set: ExcelApi 1.9]; + /// Specifies the bin overflow value of a histogram chart or pareto chart. [Api set: ExcelApi 1.9]; + /// Specifies the bin's type for a histogram chart or pareto chart. [Api set: ExcelApi 1.9]; + /// Specifies the bin underflow value of a histogram chart or pareto chart. [Api set: ExcelApi 1.9]; + /// Specifies the bin width value of a histogram chart or pareto chart. [Api set: ExcelApi 1.9]; + } + return ChartBinOptionsUpdateData; + })(); + Interfaces.ChartBinOptionsUpdateData.__proto__ = null; + Interfaces.ChartBinOptionsUpdateData = ChartBinOptionsUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartBoxwhiskerOptionsUpdateData = (function() { + function ChartBoxwhiskerOptionsUpdateData() { + /// An interface for updating data on the ChartBoxwhiskerOptions object, for use in "chartBoxwhiskerOptions.set({ ... })". + /// Specifies if the quartile calculation type of a box and whisker chart. [Api set: ExcelApi 1.9]; + /// Specifies if inner points are shown in a box and whisker chart. [Api set: ExcelApi 1.9]; + /// Specifies if the mean line is shown in a box and whisker chart. [Api set: ExcelApi 1.9]; + /// Specifies if the mean marker is shown in a box and whisker chart. [Api set: ExcelApi 1.9]; + /// Specifies if outlier points are shown in a box and whisker chart. [Api set: ExcelApi 1.9]; + } + return ChartBoxwhiskerOptionsUpdateData; + })(); + Interfaces.ChartBoxwhiskerOptionsUpdateData.__proto__ = null; + Interfaces.ChartBoxwhiskerOptionsUpdateData = ChartBoxwhiskerOptionsUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartLineFormatUpdateData = (function() { + function ChartLineFormatUpdateData() { + /// An interface for updating data on the ChartLineFormat object, for use in "chartLineFormat.set({ ... })". + /// HTML color code representing the color of lines in the chart. [Api set: ExcelApi 1.1]; + /// Represents the line style. See `Excel.ChartLineStyle` for details. [Api set: ExcelApi 1.7]; + /// Represents weight of the line, in points. [Api set: ExcelApi 1.7]; + } + return ChartLineFormatUpdateData; + })(); + Interfaces.ChartLineFormatUpdateData.__proto__ = null; + Interfaces.ChartLineFormatUpdateData = ChartLineFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartFontUpdateData = (function() { + function ChartFontUpdateData() { + /// An interface for updating data on the ChartFont object, for use in "chartFont.set({ ... })". + /// Represents the bold status of font. [Api set: ExcelApi 1.1]; + /// HTML color code representation of the text color (e.g., #FF0000 represents Red). [Api set: ExcelApi 1.1]; + /// Represents the italic status of the font. [Api set: ExcelApi 1.1]; + /// Font name (e.g., "Calibri") [Api set: ExcelApi 1.1]; + /// Size of the font (e.g., 11) [Api set: ExcelApi 1.1]; + /// Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. [Api set: ExcelApi 1.1]; + } + return ChartFontUpdateData; + })(); + Interfaces.ChartFontUpdateData.__proto__ = null; + Interfaces.ChartFontUpdateData = ChartFontUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartTrendlineUpdateData = (function() { + function ChartTrendlineUpdateData() { + /// An interface for updating data on the ChartTrendline object, for use in "chartTrendline.set({ ... })". + /// Represents the formatting of a chart trendline. [Api set: ExcelApi 1.7] + /// Represents the label of a chart trendline. [Api set: ExcelApi 1.8] + /// Represents the number of periods that the trendline extends backward. [Api set: ExcelApi 1.8]; + /// Represents the number of periods that the trendline extends forward. [Api set: ExcelApi 1.8]; + /// 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]; + /// Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. [Api set: ExcelApi 1.7]; + /// Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string [Api set: ExcelApi 1.7]; + /// Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. [Api set: ExcelApi 1.7]; + /// True if the equation for the trendline is displayed on the chart. [Api set: ExcelApi 1.8]; + /// True if the r-squared value for the trendline is displayed on the chart. [Api set: ExcelApi 1.8]; + /// Represents the type of a chart trendline. [Api set: ExcelApi 1.7]; + } + return ChartTrendlineUpdateData; + })(); + Interfaces.ChartTrendlineUpdateData.__proto__ = null; + Interfaces.ChartTrendlineUpdateData = ChartTrendlineUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartTrendlineFormatUpdateData = (function() { + function ChartTrendlineFormatUpdateData() { + /// An interface for updating data on the ChartTrendlineFormat object, for use in "chartTrendlineFormat.set({ ... })". + /// Represents chart line formatting. [Api set: ExcelApi 1.7] + } + return ChartTrendlineFormatUpdateData; + })(); + Interfaces.ChartTrendlineFormatUpdateData.__proto__ = null; + Interfaces.ChartTrendlineFormatUpdateData = ChartTrendlineFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartTrendlineLabelUpdateData = (function() { + function ChartTrendlineLabelUpdateData() { + /// An interface for updating data on the ChartTrendlineLabel object, for use in "chartTrendlineLabel.set({ ... })". + /// The format of the chart trendline label. [Api set: ExcelApi 1.8] + /// Specifies if the trendline label automatically generates appropriate text based on context. [Api set: ExcelApi 1.8]; + /// String value that represents the formula of the chart trendline label using A1-style notation. [Api set: ExcelApi 1.8]; + /// Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. [Api set: ExcelApi 1.8]; + /// Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. [Api set: ExcelApi 1.8]; + /// Specifies 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 1.9]; + /// String value that represents the format code for the trendline label. [Api set: ExcelApi 1.8]; + /// String representing the text of the trendline label on a chart. [Api set: ExcelApi 1.8]; + /// Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. [Api set: ExcelApi 1.8]; + /// Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. [Api set: ExcelApi 1.8]; + /// Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. This property is valid only when `TextOrientation` of a trendline label is 0. [Api set: ExcelApi 1.8]; + } + return ChartTrendlineLabelUpdateData; + })(); + Interfaces.ChartTrendlineLabelUpdateData.__proto__ = null; + Interfaces.ChartTrendlineLabelUpdateData = ChartTrendlineLabelUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartTrendlineLabelFormatUpdateData = (function() { + function ChartTrendlineLabelFormatUpdateData() { + /// An interface for updating data on the ChartTrendlineLabelFormat object, for use in "chartTrendlineLabelFormat.set({ ... })". + /// Specifies the border format, which includes color, linestyle, and weight. [Api set: ExcelApi 1.8] + /// Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. [Api set: ExcelApi 1.8] + } + return ChartTrendlineLabelFormatUpdateData; + })(); + Interfaces.ChartTrendlineLabelFormatUpdateData.__proto__ = null; + Interfaces.ChartTrendlineLabelFormatUpdateData = ChartTrendlineLabelFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartPlotAreaUpdateData = (function() { + function ChartPlotAreaUpdateData() { + /// An interface for updating data on the ChartPlotArea object, for use in "chartPlotArea.set({ ... })". + /// Specifies the formatting of a chart plot area. [Api set: ExcelApi 1.8] + /// Specifies the height value of a plot area. [Api set: ExcelApi 1.8]; + /// Specifies the inside height value of a plot area. [Api set: ExcelApi 1.8]; + /// Specifies the inside left value of a plot area. [Api set: ExcelApi 1.8]; + /// Specifies the inside top value of a plot area. [Api set: ExcelApi 1.8]; + /// Specifies the inside width value of a plot area. [Api set: ExcelApi 1.8]; + /// Specifies the left value of a plot area. [Api set: ExcelApi 1.8]; + /// Specifies the position of a plot area. [Api set: ExcelApi 1.8]; + /// Specifies the top value of a plot area. [Api set: ExcelApi 1.8]; + /// Specifies the width value of a plot area. [Api set: ExcelApi 1.8]; + } + return ChartPlotAreaUpdateData; + })(); + Interfaces.ChartPlotAreaUpdateData.__proto__ = null; + Interfaces.ChartPlotAreaUpdateData = ChartPlotAreaUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ChartPlotAreaFormatUpdateData = (function() { + function ChartPlotAreaFormatUpdateData() { + /// An interface for updating data on the ChartPlotAreaFormat object, for use in "chartPlotAreaFormat.set({ ... })". + /// Specifies the border attributes of a chart plot area. [Api set: ExcelApi 1.8] + } + return ChartPlotAreaFormatUpdateData; + })(); + Interfaces.ChartPlotAreaFormatUpdateData.__proto__ = null; + Interfaces.ChartPlotAreaFormatUpdateData = ChartPlotAreaFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PivotTableUpdateData = (function() { + function PivotTableUpdateData() { + /// An interface for updating data on the PivotTable object, for use in "pivotTable.set({ ... })". + /// Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. [Api set: ExcelApi 1.12]; + /// Specifies if the PivotTable allows values in the data body to be edited by the user. [Api set: ExcelApi 1.9]; + /// Name of the PivotTable. [Api set: ExcelApi 1.3]; + /// Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. [Api set: ExcelApi 1.13]; + /// Specifies if the PivotTable uses custom lists when sorting. [Api set: ExcelApi 1.9]; + } + return PivotTableUpdateData; + })(); + Interfaces.PivotTableUpdateData.__proto__ = null; + Interfaces.PivotTableUpdateData = PivotTableUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PivotLayoutUpdateData = (function() { + function PivotLayoutUpdateData() { + /// An interface for updating data on the PivotLayout object, for use in "pivotLayout.set({ ... })". + /// The style applied to the PivotTable. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// The alt text description of the PivotTable. Alt text provides alternative, text-based representations of the information contained in the PivotTable. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. [Api set: ExcelApi 1.13]; + /// The alt text title of the PivotTable. Alt text provides alternative, text-based representations of the information contained in the PivotTable. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. [Api set: ExcelApi 1.13]; + /// Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. [Api set: ExcelApi 1.9]; + /// The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. By default, this is an empty string. [Api set: ExcelApi 1.13]; + /// Specifies if the field list can be shown in the UI. [Api set: ExcelApi 1.10]; + /// Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. Note that the value of `emptyCellText` persists when this property is set to `false`. [Api set: ExcelApi 1.13]; + /// 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]; + /// Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. [Api set: ExcelApi 1.9]; + /// Specifies if the PivotTable report shows grand totals for columns. [Api set: ExcelApi 1.8]; + /// Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). [Api set: ExcelApi 1.13]; + /// Specifies if the PivotTable report shows grand totals for rows. [Api set: ExcelApi 1.8]; + /// 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]; + } + return PivotLayoutUpdateData; + })(); + Interfaces.PivotLayoutUpdateData.__proto__ = null; + Interfaces.PivotLayoutUpdateData = PivotLayoutUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PivotHierarchyUpdateData = (function() { + function PivotHierarchyUpdateData() { + /// An interface for updating data on the PivotHierarchy object, for use in "pivotHierarchy.set({ ... })". + /// Name of the PivotHierarchy. [Api set: ExcelApi 1.8]; + } + return PivotHierarchyUpdateData; + })(); + Interfaces.PivotHierarchyUpdateData.__proto__ = null; + Interfaces.PivotHierarchyUpdateData = PivotHierarchyUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RowColumnPivotHierarchyUpdateData = (function() { + function RowColumnPivotHierarchyUpdateData() { + /// An interface for updating data on the RowColumnPivotHierarchy object, for use in "rowColumnPivotHierarchy.set({ ... })". + /// Name of the RowColumnPivotHierarchy. [Api set: ExcelApi 1.8]; + /// Position of the RowColumnPivotHierarchy. [Api set: ExcelApi 1.8]; + } + return RowColumnPivotHierarchyUpdateData; + })(); + Interfaces.RowColumnPivotHierarchyUpdateData.__proto__ = null; + Interfaces.RowColumnPivotHierarchyUpdateData = RowColumnPivotHierarchyUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var FilterPivotHierarchyUpdateData = (function() { + function FilterPivotHierarchyUpdateData() { + /// An interface for updating data on the FilterPivotHierarchy object, for use in "filterPivotHierarchy.set({ ... })". + /// Determines whether to allow multiple filter items. [Api set: ExcelApi 1.8]; + /// Name of the FilterPivotHierarchy. [Api set: ExcelApi 1.8]; + /// Position of the FilterPivotHierarchy. [Api set: ExcelApi 1.8]; + } + return FilterPivotHierarchyUpdateData; + })(); + Interfaces.FilterPivotHierarchyUpdateData.__proto__ = null; + Interfaces.FilterPivotHierarchyUpdateData = FilterPivotHierarchyUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var DataPivotHierarchyUpdateData = (function() { + function DataPivotHierarchyUpdateData() { + /// An interface for updating data on the DataPivotHierarchy object, for use in "dataPivotHierarchy.set({ ... })". + /// Returns the PivotFields associated with the DataPivotHierarchy. [Api set: ExcelApi 1.8] + /// Name of the DataPivotHierarchy. [Api set: ExcelApi 1.8]; + /// Number format of the DataPivotHierarchy. [Api set: ExcelApi 1.8]; + /// Position of the DataPivotHierarchy. [Api set: ExcelApi 1.8]; + /// Specifies if the data should be shown as a specific summary calculation. [Api set: ExcelApi 1.8]; + /// Specifies if all items of the DataPivotHierarchy are shown. [Api set: ExcelApi 1.8]; + } + return DataPivotHierarchyUpdateData; + })(); + Interfaces.DataPivotHierarchyUpdateData.__proto__ = null; + Interfaces.DataPivotHierarchyUpdateData = DataPivotHierarchyUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PivotFieldUpdateData = (function() { + function PivotFieldUpdateData() { + /// An interface for updating data on the PivotField object, for use in "pivotField.set({ ... })". + /// Name of the PivotField. [Api set: ExcelApi 1.8]; + /// Determines whether to show all items of the PivotField. [Api set: ExcelApi 1.8]; + /// Subtotals of the PivotField. [Api set: ExcelApi 1.8]; + } + return PivotFieldUpdateData; + })(); + Interfaces.PivotFieldUpdateData.__proto__ = null; + Interfaces.PivotFieldUpdateData = PivotFieldUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PivotItemUpdateData = (function() { + function PivotItemUpdateData() { + /// An interface for updating data on the PivotItem object, for use in "pivotItem.set({ ... })". + /// 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]; + /// Name of the PivotItem. [Api set: ExcelApi 1.8]; + /// Specifies if the PivotItem is visible. [Api set: ExcelApi 1.8]; + } + return PivotItemUpdateData; + })(); + Interfaces.PivotItemUpdateData.__proto__ = null; + Interfaces.PivotItemUpdateData = PivotItemUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var WorksheetCustomPropertyUpdateData = (function() { + function WorksheetCustomPropertyUpdateData() { + /// An interface for updating data on the WorksheetCustomProperty object, for use in "worksheetCustomProperty.set({ ... })". + /// Gets or sets the value of the custom property. [Api set: ExcelApi 1.12]; + } + return WorksheetCustomPropertyUpdateData; + })(); + Interfaces.WorksheetCustomPropertyUpdateData.__proto__ = null; + Interfaces.WorksheetCustomPropertyUpdateData = WorksheetCustomPropertyUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var DocumentPropertiesUpdateData = (function() { + function DocumentPropertiesUpdateData() { + /// An interface for updating data on the DocumentProperties object, for use in "documentProperties.set({ ... })". + /// The author of the workbook. [Api set: ExcelApi 1.7]; + /// The category of the workbook. [Api set: ExcelApi 1.7]; + /// The comments of the workbook. [Api set: ExcelApi 1.7]; + /// The company of the workbook. [Api set: ExcelApi 1.7]; + /// The keywords of the workbook. [Api set: ExcelApi 1.7]; + /// The manager of the workbook. [Api set: ExcelApi 1.7]; + /// Gets the revision number of the workbook. [Api set: ExcelApi 1.7]; + /// The subject of the workbook. [Api set: ExcelApi 1.7]; + /// The title of the workbook. [Api set: ExcelApi 1.7]; + } + return DocumentPropertiesUpdateData; + })(); + Interfaces.DocumentPropertiesUpdateData.__proto__ = null; + Interfaces.DocumentPropertiesUpdateData = DocumentPropertiesUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CustomPropertyUpdateData = (function() { + function CustomPropertyUpdateData() { + /// An interface for updating data on the CustomProperty object, for use in "customProperty.set({ ... })". + /// The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). [Api set: ExcelApi 1.7]; + } + return CustomPropertyUpdateData; + })(); + Interfaces.CustomPropertyUpdateData.__proto__ = null; + Interfaces.CustomPropertyUpdateData = CustomPropertyUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalFormatUpdateData = (function() { + function ConditionalFormatUpdateData() { + /// An interface for updating data on the ConditionalFormat object, for use in "conditionalFormat.set({ ... })". + /// Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. [Api set: ExcelApi 1.6] + /// Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. [Api set: ExcelApi 1.6] + /// Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. [Api set: ExcelApi 1.6] + /// Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. [Api set: ExcelApi 1.6] + /// Returns the custom conditional format properties if the current conditional format is a custom type. [Api set: ExcelApi 1.6] + /// Returns the custom conditional format properties if the current conditional format is a custom type. [Api set: ExcelApi 1.6] + /// Returns the data bar properties if the current conditional format is a data bar. [Api set: ExcelApi 1.6] + /// Returns the data bar properties if the current conditional format is a data bar. [Api set: ExcelApi 1.6] + /// Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. [Api set: ExcelApi 1.6] + /// Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. [Api set: ExcelApi 1.6] + /// Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. [Api set: ExcelApi 1.6] + /// Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. [Api set: ExcelApi 1.6] + /// 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] + /// 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] + /// Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. [Api set: ExcelApi 1.6] + /// Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. For example, to format the top 10% or bottom 10 items. [Api set: ExcelApi 1.6] + /// 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 the 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. [Api set: ExcelApi 1.6]; + /// If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. [Api set: ExcelApi 1.6]; + } + return ConditionalFormatUpdateData; + })(); + Interfaces.ConditionalFormatUpdateData.__proto__ = null; + Interfaces.ConditionalFormatUpdateData = ConditionalFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var DataBarConditionalFormatUpdateData = (function() { + function DataBarConditionalFormatUpdateData() { + /// An interface for updating data on the DataBarConditionalFormat object, for use in "dataBarConditionalFormat.set({ ... })". + /// Representation of all values to the left of the axis in an Excel data bar. [Api set: ExcelApi 1.6] + /// Representation of all values to the right of the axis in an Excel data bar. [Api set: ExcelApi 1.6] + /// HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no axis is present or set. [Api set: ExcelApi 1.6]; + /// Representation of how the axis is determined for an Excel data bar. [Api set: ExcelApi 1.6]; + /// Specifies the direction that the data bar graphic should be based on. [Api set: ExcelApi 1.6]; + /// The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). [Api set: ExcelApi 1.6]; + /// If `true`, hides the values from the cells where the data bar is applied. [Api set: ExcelApi 1.6]; + /// The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). [Api set: ExcelApi 1.6]; + } + return DataBarConditionalFormatUpdateData; + })(); + Interfaces.DataBarConditionalFormatUpdateData.__proto__ = null; + Interfaces.DataBarConditionalFormatUpdateData = DataBarConditionalFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalDataBarPositiveFormatUpdateData = (function() { + function ConditionalDataBarPositiveFormatUpdateData() { + /// An interface for updating data on the ConditionalDataBarPositiveFormat object, for use in "conditionalDataBarPositiveFormat.set({ ... })". + /// HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no border is present or set. [Api set: ExcelApi 1.6]; + /// HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.6]; + /// Specifies if the data bar has a gradient. [Api set: ExcelApi 1.6]; + } + return ConditionalDataBarPositiveFormatUpdateData; + })(); + Interfaces.ConditionalDataBarPositiveFormatUpdateData.__proto__ = null; + Interfaces.ConditionalDataBarPositiveFormatUpdateData = ConditionalDataBarPositiveFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalDataBarNegativeFormatUpdateData = (function() { + function ConditionalDataBarNegativeFormatUpdateData() { + /// An interface for updating data on the ConditionalDataBarNegativeFormat object, for use in "conditionalDataBarNegativeFormat.set({ ... })". + /// HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). Value is "" (an empty string) if no border is present or set. [Api set: ExcelApi 1.6]; + /// HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.6]; + /// Specifies if the negative data bar has the same border color as the positive data bar. [Api set: ExcelApi 1.6]; + /// Specifies if the negative data bar has the same fill color as the positive data bar. [Api set: ExcelApi 1.6]; + } + return ConditionalDataBarNegativeFormatUpdateData; + })(); + Interfaces.ConditionalDataBarNegativeFormatUpdateData.__proto__ = null; + Interfaces.ConditionalDataBarNegativeFormatUpdateData = ConditionalDataBarNegativeFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CustomConditionalFormatUpdateData = (function() { + function CustomConditionalFormatUpdateData() { + /// An interface for updating data on the CustomConditionalFormat object, for use in "customConditionalFormat.set({ ... })". + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// Specifies the `Rule` object on this conditional format. [Api set: ExcelApi 1.6] + } + return CustomConditionalFormatUpdateData; + })(); + Interfaces.CustomConditionalFormatUpdateData.__proto__ = null; + Interfaces.CustomConditionalFormatUpdateData = CustomConditionalFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalFormatRuleUpdateData = (function() { + function ConditionalFormatRuleUpdateData() { + /// An interface for updating data on the ConditionalFormatRule object, for use in "conditionalFormatRule.set({ ... })". + /// The formula, if required, on which to evaluate the conditional format rule. [Api set: ExcelApi 1.6]; + /// The formula, if required, on which to evaluate the conditional format rule in the user's language. [Api set: ExcelApi 1.6]; + /// The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. [Api set: ExcelApi 1.6]; + } + return ConditionalFormatRuleUpdateData; + })(); + Interfaces.ConditionalFormatRuleUpdateData.__proto__ = null; + Interfaces.ConditionalFormatRuleUpdateData = ConditionalFormatRuleUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var IconSetConditionalFormatUpdateData = (function() { + function IconSetConditionalFormatUpdateData() { + /// An interface for updating data on the IconSetConditionalFormat object, for use in "iconSetConditionalFormat.set({ ... })". + /// An array of criteria and icon sets 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]; + /// If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. [Api set: ExcelApi 1.6]; + /// If `true`, hides the values and only shows icons. [Api set: ExcelApi 1.6]; + /// If set, displays the icon set option for the conditional format. [Api set: ExcelApi 1.6]; + } + return IconSetConditionalFormatUpdateData; + })(); + Interfaces.IconSetConditionalFormatUpdateData.__proto__ = null; + Interfaces.IconSetConditionalFormatUpdateData = IconSetConditionalFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ColorScaleConditionalFormatUpdateData = (function() { + function ColorScaleConditionalFormatUpdateData() { + /// An interface for updating data on the ColorScaleConditionalFormat object, for use in "colorScaleConditionalFormat.set({ ... })". + /// The criteria of the color scale. Midpoint is optional when using a two point color scale. [Api set: ExcelApi 1.6]; + } + return ColorScaleConditionalFormatUpdateData; + })(); + Interfaces.ColorScaleConditionalFormatUpdateData.__proto__ = null; + Interfaces.ColorScaleConditionalFormatUpdateData = ColorScaleConditionalFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TopBottomConditionalFormatUpdateData = (function() { + function TopBottomConditionalFormatUpdateData() { + /// An interface for updating data on the TopBottomConditionalFormat object, for use in "topBottomConditionalFormat.set({ ... })". + /// Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// The criteria of the top/bottom conditional format. [Api set: ExcelApi 1.6]; + } + return TopBottomConditionalFormatUpdateData; + })(); + Interfaces.TopBottomConditionalFormatUpdateData.__proto__ = null; + Interfaces.TopBottomConditionalFormatUpdateData = TopBottomConditionalFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PresetCriteriaConditionalFormatUpdateData = (function() { + function PresetCriteriaConditionalFormatUpdateData() { + /// An interface for updating data on the PresetCriteriaConditionalFormat object, for use in "presetCriteriaConditionalFormat.set({ ... })". + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// The rule of the conditional format. [Api set: ExcelApi 1.6]; + } + return PresetCriteriaConditionalFormatUpdateData; + })(); + Interfaces.PresetCriteriaConditionalFormatUpdateData.__proto__ = null; + Interfaces.PresetCriteriaConditionalFormatUpdateData = PresetCriteriaConditionalFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TextConditionalFormatUpdateData = (function() { + function TextConditionalFormatUpdateData() { + /// An interface for updating data on the TextConditionalFormat object, for use in "textConditionalFormat.set({ ... })". + /// Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// The rule of the conditional format. [Api set: ExcelApi 1.6]; + } + return TextConditionalFormatUpdateData; + })(); + Interfaces.TextConditionalFormatUpdateData.__proto__ = null; + Interfaces.TextConditionalFormatUpdateData = TextConditionalFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CellValueConditionalFormatUpdateData = (function() { + function CellValueConditionalFormatUpdateData() { + /// An interface for updating data on the CellValueConditionalFormat object, for use in "cellValueConditionalFormat.set({ ... })". + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// Specifies the rule object on this conditional format. [Api set: ExcelApi 1.6]; + } + return CellValueConditionalFormatUpdateData; + })(); + Interfaces.CellValueConditionalFormatUpdateData.__proto__ = null; + Interfaces.CellValueConditionalFormatUpdateData = CellValueConditionalFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalRangeFormatUpdateData = (function() { + function ConditionalRangeFormatUpdateData() { + /// An interface for updating data on the ConditionalRangeFormat object, for use in "conditionalRangeFormat.set({ ... })". + /// Collection of border objects that apply to the overall conditional format range. [Api set: ExcelApi 1.6] + /// Returns the fill object defined on the overall conditional format range. [Api set: ExcelApi 1.6] + /// Returns the font object defined on the overall conditional format range. [Api set: ExcelApi 1.6] + /// Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. Cleared if `null` is passed in. [Api set: ExcelApi 1.6]; + } + return ConditionalRangeFormatUpdateData; + })(); + Interfaces.ConditionalRangeFormatUpdateData.__proto__ = null; + Interfaces.ConditionalRangeFormatUpdateData = ConditionalRangeFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalRangeFontUpdateData = (function() { + function ConditionalRangeFontUpdateData() { + /// An interface for updating data on the ConditionalRangeFont object, for use in "conditionalRangeFont.set({ ... })". + /// Specifies if the font is bold. [Api set: ExcelApi 1.6]; + /// HTML color code representation of the text color (e.g., #FF0000 represents Red). [Api set: ExcelApi 1.6]; + /// Specifies if the font is italic. [Api set: ExcelApi 1.6]; + /// Specifies the strikethrough status of the font. [Api set: ExcelApi 1.6]; + /// The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. [Api set: ExcelApi 1.6]; + } + return ConditionalRangeFontUpdateData; + })(); + Interfaces.ConditionalRangeFontUpdateData.__proto__ = null; + Interfaces.ConditionalRangeFontUpdateData = ConditionalRangeFontUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalRangeFillUpdateData = (function() { + function ConditionalRangeFillUpdateData() { + /// An interface for updating data on the ConditionalRangeFill object, for use in "conditionalRangeFill.set({ ... })". + /// HTML color code representing the color of the fill, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.6]; + } + return ConditionalRangeFillUpdateData; + })(); + Interfaces.ConditionalRangeFillUpdateData.__proto__ = null; + Interfaces.ConditionalRangeFillUpdateData = ConditionalRangeFillUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalRangeBorderUpdateData = (function() { + function ConditionalRangeBorderUpdateData() { + /// An interface for updating data on the ConditionalRangeBorder object, for use in "conditionalRangeBorder.set({ ... })". + /// HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.6]; + /// One of the constants of line style specifying the line style for the border. See `Excel.BorderLineStyle` for details. [Api set: ExcelApi 1.6]; + } + return ConditionalRangeBorderUpdateData; + })(); + Interfaces.ConditionalRangeBorderUpdateData.__proto__ = null; + Interfaces.ConditionalRangeBorderUpdateData = ConditionalRangeBorderUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalRangeBorderCollectionUpdateData = (function() { + function ConditionalRangeBorderCollectionUpdateData() { + /// An interface for updating data on the ConditionalRangeBorderCollection object, for use in "conditionalRangeBorderCollection.set({ ... })". + /// Gets the bottom border. [Api set: ExcelApi 1.6] + /// Gets the left border. [Api set: ExcelApi 1.6] + /// Gets the right border. [Api set: ExcelApi 1.6] + /// Gets the top border. [Api set: ExcelApi 1.6] + } + return ConditionalRangeBorderCollectionUpdateData; + })(); + Interfaces.ConditionalRangeBorderCollectionUpdateData.__proto__ = null; + Interfaces.ConditionalRangeBorderCollectionUpdateData = ConditionalRangeBorderCollectionUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var StyleUpdateData = (function() { + function StyleUpdateData() { + /// An interface for updating data on the Style object, for use in "style.set({ ... })". + /// A collection of four border objects that represent the style of the four borders. [Api set: ExcelApi 1.7] + /// The fill of the style. [Api set: ExcelApi 1.7] + /// A `Font` object that represents the font of the style. [Api set: ExcelApi 1.7] + /// Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. [Api set: ExcelApi 1.8]; + /// Specifies if the formula will be hidden when the worksheet is protected. [Api set: ExcelApi 1.7]; + /// Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. [Api set: ExcelApi 1.7]; + /// Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. [Api set: ExcelApi 1.7]; + /// Specifies if the style includes the color, color index, line style, and weight border properties. [Api set: ExcelApi 1.7]; + /// Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. [Api set: ExcelApi 1.7]; + /// Specifies if the style includes the number format property. [Api set: ExcelApi 1.7]; + /// Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. [Api set: ExcelApi 1.7]; + /// Specifies if the style includes the formula hidden and locked protection properties. [Api set: ExcelApi 1.7]; + /// An integer from 0 to 250 that indicates the indent level for the style. [Api set: ExcelApi 1.7]; + /// Specifies if the object is locked when the worksheet is protected. [Api set: ExcelApi 1.7]; + /// The format code of the number format for the style. [Api set: ExcelApi 1.7]; + /// The localized format code of the number format for the style. [Api set: ExcelApi 1.7]; + /// The reading order for the style. [Api set: ExcelApi 1.7]; + /// Specifies if text automatically shrinks to fit in the available column width. [Api set: ExcelApi 1.7]; + /// The text orientation for the style. [Api set: ExcelApi 1.8]; + /// Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. [Api set: ExcelApi 1.7]; + /// Specifies if Excel wraps the text in the object. [Api set: ExcelApi 1.7]; + } + return StyleUpdateData; + })(); + Interfaces.StyleUpdateData.__proto__ = null; + Interfaces.StyleUpdateData = StyleUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TableStyleUpdateData = (function() { + function TableStyleUpdateData() { + /// An interface for updating data on the TableStyle object, for use in "tableStyle.set({ ... })". + /// Specifies the name of the table style. [Api set: ExcelApi 1.10]; + } + return TableStyleUpdateData; + })(); + Interfaces.TableStyleUpdateData.__proto__ = null; + Interfaces.TableStyleUpdateData = TableStyleUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PivotTableStyleUpdateData = (function() { + function PivotTableStyleUpdateData() { + /// An interface for updating data on the PivotTableStyle object, for use in "pivotTableStyle.set({ ... })". + /// Specifies the name of the PivotTable style. [Api set: ExcelApi 1.10]; + } + return PivotTableStyleUpdateData; + })(); + Interfaces.PivotTableStyleUpdateData.__proto__ = null; + Interfaces.PivotTableStyleUpdateData = PivotTableStyleUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var SlicerStyleUpdateData = (function() { + function SlicerStyleUpdateData() { + /// An interface for updating data on the SlicerStyle object, for use in "slicerStyle.set({ ... })". + /// Specifies the name of the slicer style. [Api set: ExcelApi 1.10]; + } + return SlicerStyleUpdateData; + })(); + Interfaces.SlicerStyleUpdateData.__proto__ = null; + Interfaces.SlicerStyleUpdateData = SlicerStyleUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TimelineStyleUpdateData = (function() { + function TimelineStyleUpdateData() { + /// An interface for updating data on the TimelineStyle object, for use in "timelineStyle.set({ ... })". + /// Specifies the name of the timeline style. [Api set: ExcelApi 1.10]; + } + return TimelineStyleUpdateData; + })(); + Interfaces.TimelineStyleUpdateData.__proto__ = null; + Interfaces.TimelineStyleUpdateData = TimelineStyleUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var PageLayoutUpdateData = (function() { + function PageLayoutUpdateData() { + /// An interface for updating data on the PageLayout object, for use in "pageLayout.set({ ... })". + /// Header and footer configuration for the worksheet. [Api set: ExcelApi 1.9] + /// The worksheet's black and white print option. [Api set: ExcelApi 1.9]; + /// The worksheet's bottom page margin to use for printing in points. [Api set: ExcelApi 1.9]; + /// The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. [Api set: ExcelApi 1.9]; + /// The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. [Api set: ExcelApi 1.9]; + /// The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. [Api set: ExcelApi 1.9]; + /// The worksheet's first page number to print. A `null` value represents "auto" page numbering. [Api set: ExcelApi 1.9]; + /// The worksheet's footer margin, in points, for use when printing. [Api set: ExcelApi 1.9]; + /// The worksheet's header margin, in points, for use when printing. [Api set: ExcelApi 1.9]; + /// The worksheet's left margin, in points, for use when printing. [Api set: ExcelApi 1.9]; + /// The worksheet's orientation of the page. [Api set: ExcelApi 1.9]; + /// The worksheet's paper size of the page. [Api set: ExcelApi 1.9]; + /// Specifies if the worksheet's comments should be displayed when printing. [Api set: ExcelApi 1.9]; + /// The worksheet's print errors option. [Api set: ExcelApi 1.9]; + /// Specifies if the worksheet's gridlines will be printed. [Api set: ExcelApi 1.9]; + /// Specifies if the worksheet's headings will be printed. [Api set: ExcelApi 1.9]; + /// The worksheet's page print order option. This specifies the order to use for processing the page number printed. [Api set: ExcelApi 1.9]; + /// The worksheet's right margin, in points, for use when printing. [Api set: ExcelApi 1.9]; + /// The worksheet's top margin, in points, for use when printing. [Api set: ExcelApi 1.9]; + /// The worksheet's print zoom options. The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). [Api set: ExcelApi 1.9]; + } + return PageLayoutUpdateData; + })(); + Interfaces.PageLayoutUpdateData.__proto__ = null; + Interfaces.PageLayoutUpdateData = PageLayoutUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var HeaderFooterUpdateData = (function() { + function HeaderFooterUpdateData() { + /// An interface for updating data on the HeaderFooter object, for use in "headerFooter.set({ ... })". + /// The center footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. [Api set: ExcelApi 1.9]; + /// The center header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. [Api set: ExcelApi 1.9]; + /// The left footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. [Api set: ExcelApi 1.9]; + /// The left header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. [Api set: ExcelApi 1.9]; + /// The right footer of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. [Api set: ExcelApi 1.9]; + /// The right header of the worksheet. To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. [Api set: ExcelApi 1.9]; + } + return HeaderFooterUpdateData; + })(); + Interfaces.HeaderFooterUpdateData.__proto__ = null; + Interfaces.HeaderFooterUpdateData = HeaderFooterUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var HeaderFooterGroupUpdateData = (function() { + function HeaderFooterGroupUpdateData() { + /// An interface for updating data on the HeaderFooterGroup object, for use in "headerFooterGroup.set({ ... })". + /// The general header/footer, used for all pages unless even/odd or first page is specified. [Api set: ExcelApi 1.9] + /// The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. [Api set: ExcelApi 1.9] + /// The first page header/footer, for all other pages general or even/odd is used. [Api set: ExcelApi 1.9] + /// The header/footer to use for odd pages, even header/footer needs to be specified for even pages. [Api set: ExcelApi 1.9] + /// The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. [Api set: ExcelApi 1.9]; + /// 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 1.9]; + /// 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 1.9]; + } + return HeaderFooterGroupUpdateData; + })(); + Interfaces.HeaderFooterGroupUpdateData.__proto__ = null; + Interfaces.HeaderFooterGroupUpdateData = HeaderFooterGroupUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CommentUpdateData = (function() { + function CommentUpdateData() { + /// An interface for updating data on the Comment object, for use in "comment.set({ ... })". + /// The comment's content. The string is plain text. [Api set: ExcelApi 1.10]; + /// The comment thread status. A value of `true` means that the comment thread is resolved. [Api set: ExcelApi 1.11]; + } + return CommentUpdateData; + })(); + Interfaces.CommentUpdateData.__proto__ = null; + Interfaces.CommentUpdateData = CommentUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var CommentReplyUpdateData = (function() { + function CommentReplyUpdateData() { + /// An interface for updating data on the CommentReply object, for use in "commentReply.set({ ... })". + /// The comment reply's content. The string is plain text. [Api set: ExcelApi 1.10]; + } + return CommentReplyUpdateData; + })(); + Interfaces.CommentReplyUpdateData.__proto__ = null; + Interfaces.CommentReplyUpdateData = CommentReplyUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ShapeUpdateData = (function() { + function ShapeUpdateData() { + /// An interface for updating data on the Shape object, for use in "shape.set({ ... })". + /// Returns the fill formatting of this shape. [Api set: ExcelApi 1.9] + /// Returns the line formatting of this shape. [Api set: ExcelApi 1.9] + /// Specifies the alternative description text for a `Shape` object. [Api set: ExcelApi 1.9]; + /// Specifies the alternative title text for a `Shape` object. [Api set: ExcelApi 1.9]; + /// Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". [Api set: ExcelApi 1.9]; + /// Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. [Api set: ExcelApi 1.9]; + /// The distance, in points, from the left side of the shape to the left side of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. [Api set: ExcelApi 1.9]; + /// Specifies if the aspect ratio of this shape is locked. [Api set: ExcelApi 1.9]; + /// Specifies the name of the shape. [Api set: ExcelApi 1.9]; + /// Represents how the object is attached to the cells below it. [Api set: ExcelApi 1.10]; + /// Specifies the rotation, in degrees, of the shape. [Api set: ExcelApi 1.9]; + /// Specifies the share link to an Office Script file on OneDrive that will be associated with this shape. [Api set: ExcelApi BETA (PREVIEW ONLY)]; + /// The distance, in points, from the top edge of the shape to the top edge of the worksheet. Throws an `InvalidArgument` exception when set with a negative value as an input. [Api set: ExcelApi 1.9]; + /// Specifies if the shape is visible. [Api set: ExcelApi 1.9]; + /// Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. [Api set: ExcelApi 1.9]; + } + return ShapeUpdateData; + })(); + Interfaces.ShapeUpdateData.__proto__ = null; + Interfaces.ShapeUpdateData = ShapeUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var LineUpdateData = (function() { + function LineUpdateData() { + /// An interface for updating data on the Line object, for use in "line.set({ ... })". + /// Represents the length of the arrowhead at the beginning of the specified line. [Api set: ExcelApi 1.9]; + /// Represents the style of the arrowhead at the beginning of the specified line. [Api set: ExcelApi 1.9]; + /// Represents the width of the arrowhead at the beginning of the specified line. [Api set: ExcelApi 1.9]; + /// Represents the length of the arrowhead at the end of the specified line. [Api set: ExcelApi 1.9]; + /// Represents the style of the arrowhead at the end of the specified line. [Api set: ExcelApi 1.9]; + /// Represents the width of the arrowhead at the end of the specified line. [Api set: ExcelApi 1.9]; + /// Represents the connector type for the line. [Api set: ExcelApi 1.9]; + } + return LineUpdateData; + })(); + Interfaces.LineUpdateData.__proto__ = null; + Interfaces.LineUpdateData = LineUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ShapeFillUpdateData = (function() { + function ShapeFillUpdateData() { + /// An interface for updating data on the ShapeFill object, for use in "shapeFill.set({ ... })". + /// Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") [Api set: ExcelApi 1.9]; + /// Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. [Api set: ExcelApi 1.9]; + } + return ShapeFillUpdateData; + })(); + Interfaces.ShapeFillUpdateData.__proto__ = null; + Interfaces.ShapeFillUpdateData = ShapeFillUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ShapeLineFormatUpdateData = (function() { + function ShapeLineFormatUpdateData() { + /// An interface for updating data on the ShapeLineFormat object, for use in "shapeLineFormat.set({ ... })". + /// Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). [Api set: ExcelApi 1.9]; + /// Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. [Api set: ExcelApi 1.9]; + /// Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. [Api set: ExcelApi 1.9]; + /// Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. [Api set: ExcelApi 1.9]; + /// Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. [Api set: ExcelApi 1.9]; + /// Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. [Api set: ExcelApi 1.9]; + } + return ShapeLineFormatUpdateData; + })(); + Interfaces.ShapeLineFormatUpdateData.__proto__ = null; + Interfaces.ShapeLineFormatUpdateData = ShapeLineFormatUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TextFrameUpdateData = (function() { + function TextFrameUpdateData() { + /// An interface for updating data on the TextFrame object, for use in "textFrame.set({ ... })". + /// The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. [Api set: ExcelApi 1.9]; + /// Represents the bottom margin, in points, of the text frame. [Api set: ExcelApi 1.9]; + /// Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. [Api set: ExcelApi 1.9]; + /// Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. [Api set: ExcelApi 1.9]; + /// Represents the left margin, in points, of the text frame. [Api set: ExcelApi 1.9]; + /// Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. [Api set: ExcelApi 1.9]; + /// Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. [Api set: ExcelApi 1.9]; + /// Represents the right margin, in points, of the text frame. [Api set: ExcelApi 1.9]; + /// Represents the top margin, in points, of the text frame. [Api set: ExcelApi 1.9]; + /// Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. [Api set: ExcelApi 1.9]; + /// Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. [Api set: ExcelApi 1.9]; + } + return TextFrameUpdateData; + })(); + Interfaces.TextFrameUpdateData.__proto__ = null; + Interfaces.TextFrameUpdateData = TextFrameUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var TextRangeUpdateData = (function() { + function TextRangeUpdateData() { + /// An interface for updating data on the TextRange object, for use in "textRange.set({ ... })". + /// Returns a `ShapeFont` object that represents the font attributes for the text range. [Api set: ExcelApi 1.9] + /// Represents the plain text content of the text range. [Api set: ExcelApi 1.9]; + } + return TextRangeUpdateData; + })(); + Interfaces.TextRangeUpdateData.__proto__ = null; + Interfaces.TextRangeUpdateData = TextRangeUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ShapeFontUpdateData = (function() { + function ShapeFontUpdateData() { + /// An interface for updating data on the ShapeFont object, for use in "shapeFont.set({ ... })". + /// Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. [Api set: ExcelApi 1.9]; + /// 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 1.9]; + /// Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. [Api set: ExcelApi 1.9]; + /// Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. [Api set: ExcelApi 1.9]; + /// Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. [Api set: ExcelApi 1.9]; + /// Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. [Api set: ExcelApi 1.9]; + } + return ShapeFontUpdateData; + })(); + Interfaces.ShapeFontUpdateData.__proto__ = null; + Interfaces.ShapeFontUpdateData = ShapeFontUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var SlicerUpdateData = (function() { + function SlicerUpdateData() { + /// An interface for updating data on the Slicer object, for use in "slicer.set({ ... })". + /// The style applied to the slicer. [Api set: ExcelApi BETA (PREVIEW ONLY)] + /// Represents the worksheet containing the slicer. [Api set: ExcelApi 1.10] + /// Represents the caption of the slicer. [Api set: ExcelApi 1.10]; + /// Represents the height, in points, of the slicer. Throws an `InvalidArgument` exception when set with a negative value or zero as an input. [Api set: ExcelApi 1.10]; + /// Represents the distance, in points, from the left side of the slicer to the left of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. [Api set: ExcelApi 1.10]; + /// Represents the name of the slicer. [Api set: ExcelApi 1.10]; + /// Represents the slicer name used in the formula. [Api set: ExcelApi BETA (PREVIEW ONLY)]; + /// Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". [Api set: ExcelApi 1.10]; + /// Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. [Api set: ExcelApi 1.10]; + /// Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. Throws an `InvalidArgument` error when set with a negative value as an input. [Api set: ExcelApi 1.10]; + /// Represents the width, in points, of the slicer. Throws an `InvalidArgument` error when set with a negative value or zero as an input. [Api set: ExcelApi 1.10]; + } + return SlicerUpdateData; + })(); + Interfaces.SlicerUpdateData.__proto__ = null; + Interfaces.SlicerUpdateData = SlicerUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var SlicerItemUpdateData = (function() { + function SlicerItemUpdateData() { + /// An interface for updating data on the SlicerItem object, for use in "slicerItem.set({ ... })". + /// Value is `true` if the slicer item is selected. Setting this value will not clear the selected state of other slicer items. By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. [Api set: ExcelApi 1.10]; + } + return SlicerItemUpdateData; + })(); + Interfaces.SlicerItemUpdateData.__proto__ = null; + Interfaces.SlicerItemUpdateData = SlicerItemUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var RibbonUpdateData = (function() { + function RibbonUpdateData() { + /// An interface for updating data on the Ribbon object, for use in "ribbon.set({ ... })". + /// The active ribbon tab. [Api set: ExcelApi 1.9]; + } + return RibbonUpdateData; + })(); + Interfaces.RibbonUpdateData.__proto__ = null; + Interfaces.RibbonUpdateData = RibbonUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var NamedSheetViewUpdateData = (function() { + function NamedSheetViewUpdateData() { + /// An interface for updating data on the NamedSheetView object, for use in "namedSheetView.set({ ... })". + /// Gets or sets the name of the sheet view. The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. [Api set: ExcelApiOnline 1.1]; + } + return NamedSheetViewUpdateData; + })(); + Interfaces.NamedSheetViewUpdateData.__proto__ = null; + Interfaces.NamedSheetViewUpdateData = NamedSheetViewUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); +var Excel; +(function (Excel) { + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext() { + /// + /// 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. + /// + /// Root object for interacting with the document + _super.call(this, null); + } + return RequestContext; + })(OfficeExtension.ClientRequestContext); + Excel.RequestContext = RequestContext; + + Excel.run = function (batch) { + /// + /// + /// 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. + /// + /// + /// 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. + /// + ///
+ /// + /// + /// 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. + /// + /// + /// 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()". + /// + /// + /// 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. + /// + ///
+ /// + /// + /// 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. + /// + /// + /// 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()". + /// + /// + /// 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. + /// + ///
+ arguments[arguments.length - 1](new Excel.RequestContext()); + return new OfficeExtension.Promise(); + } +})(Excel || (Excel = {__proto__: null})); +Excel.__proto__ = null; + + + +var Word; +(function (Word) { + /// [Api set: WordApi 1.1] + var Alignment = { + __proto__: null, + "mixed": "mixed", + "unknown": "unknown", + "left": "left", + "centered": "centered", + "right": "right", + "justified": "justified", + } + Word.Alignment = Alignment; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Annotation = (function(_super) { + __extends(Annotation, _super); + function Annotation() { + /// Represents an annotation attached to a paragraph. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the critique annotation object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the state of the annotation. [Api set: WordApi BETA (PREVIEW ONLY)] + } + + Annotation.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + Annotation.prototype.delete = function() { + /// + /// Deletes the annotation. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + + Annotation.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Annotation.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Annotation; + })(OfficeExtension.ClientObject); + Word.Annotation = Annotation; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var AnnotationClickedEventArgs = (function() { + function AnnotationClickedEventArgs() { + /// Holds annotation information that is passed back on annotation inserted event. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the annotation ID for which the event was fired. [Api set: WordApi BETA (PREVIEW ONLY)] + } + return AnnotationClickedEventArgs; + })(); + Interfaces.AnnotationClickedEventArgs.__proto__ = null; + Interfaces.AnnotationClickedEventArgs = AnnotationClickedEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var AnnotationCollection = (function(_super) { + __extends(AnnotationCollection, _super); + function AnnotationCollection() { + /// Contains a collection of {@link Word.Annotation} objects. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + AnnotationCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + AnnotationCollection.prototype.getFirst = function() { + /// + /// Gets the first annotation in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + AnnotationCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first annotation in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + + AnnotationCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + AnnotationCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return AnnotationCollection; + })(OfficeExtension.ClientObject); + Word.AnnotationCollection = AnnotationCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var AnnotationHoveredEventArgs = (function() { + function AnnotationHoveredEventArgs() { + /// Holds annotation information that is passed back on annotation hovered event. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the annotation ID for which the event was fired. [Api set: WordApi BETA (PREVIEW ONLY)] + } + return AnnotationHoveredEventArgs; + })(); + Interfaces.AnnotationHoveredEventArgs.__proto__ = null; + Interfaces.AnnotationHoveredEventArgs = AnnotationHoveredEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var AnnotationInsertedEventArgs = (function() { + function AnnotationInsertedEventArgs() { + /// Holds annotation information that is passed back on annotation added event. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the annotation IDs for which the event was fired. [Api set: WordApi BETA (PREVIEW ONLY)] + } + return AnnotationInsertedEventArgs; + })(); + Interfaces.AnnotationInsertedEventArgs.__proto__ = null; + Interfaces.AnnotationInsertedEventArgs = AnnotationInsertedEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var AnnotationRemovedEventArgs = (function() { + function AnnotationRemovedEventArgs() { + /// Holds annotation information that is passed back on annotation removed event. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the annotation IDs for which the event was fired. [Api set: WordApi BETA (PREVIEW ONLY)] + } + return AnnotationRemovedEventArgs; + })(); + Interfaces.AnnotationRemovedEventArgs.__proto__ = null; + Interfaces.AnnotationRemovedEventArgs = AnnotationRemovedEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var AnnotationSet = (function() { + function AnnotationSet() { + /// Annotations set produced by the add-in. Currently supporting only critiques. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Critiques. [Api set: WordApi BETA (PREVIEW ONLY)] + } + return AnnotationSet; + })(); + Interfaces.AnnotationSet.__proto__ = null; + Interfaces.AnnotationSet = AnnotationSet; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Represents the state of the annotation. [Api set: WordApi BETA (PREVIEW ONLY)] + var AnnotationState = { + __proto__: null, + "created": "created", + "accepted": "accepted", + "rejected": "rejected", + } + Word.AnnotationState = AnnotationState; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Application = (function(_super) { + __extends(Application, _super); + function Application() { + /// Represents the application object. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + } + + Application.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + Application.prototype.createDocument = function(base64File) { + /// + /// Creates a new document by using an optional Base64-encoded .docx file. [Api set: WordApi 1.3] + /// + /// Optional. The Base64-encoded .docx file. The default value is null. + /// + } + Application.prototype.openDocument = function(fileLocation) { + /// + /// Opens a document and displays it in a new tab or window. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// Required. The absolute location of the .docx file. Word on the web only supports remote (cloud) locations, while Word on Windows, Mac and iOS support local and remote locations. + /// + } + Application.prototype.retrieveStylesFromBase64 = function(base64File) { + /// + /// Parse styles from template Base64 file and return JSON format of retrieved styles as a string. [Api set: WordApi 1.5] + /// + /// Required. The template file. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + + return Application; + })(OfficeExtension.ClientObject); + Word.Application = Application; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Body = (function(_super) { + __extends(Body, _super); + function Body() { + /// Represents the body of a document or a section. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the collection of rich text content control objects in the body. [Api set: WordApi 1.1] + /// Gets the collection of endnotes in the body. [Api set: WordApi 1.5] + /// Gets the collection of field objects in the body. [Api set: WordApi 1.4] + /// 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] + /// Gets the collection of footnotes in the body. [Api set: WordApi 1.5] + /// Gets the collection of InlinePicture objects in the body. The collection does not include floating images. [Api set: WordApi 1.1] + /// Gets the collection of list objects in the body. [Api set: WordApi 1.3] + /// Gets the collection of paragraph objects in the body. **Important**: Paragraphs in tables are not returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. [Api set: WordApi 1.1] + /// Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. [Api set: WordApi 1.3] + /// Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. [Api set: WordApi 1.1] + /// Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. [Api set: WordApi 1.3] + /// Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Specifies 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] + /// Specifies 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] + /// Gets the collection of table objects in the body. [Api set: WordApi 1.3] + /// Gets the text of the body. Use the insertText method to insert text. [Api set: WordApi 1.1] + /// Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. [Api set: WordApi 1.3] + /// Occurs when new comments are added. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a comment or its reply is changed. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when comments are deleted. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a comment is deselected. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a comment is selected. [Api set: WordApi BETA (PREVIEW ONLY)] + } + + Body.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Body.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.BodyUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Body object, with properties that have already been loaded and synced. + /// + } + Body.prototype.clear = function() { + /// + /// Clears the contents of the body object. The user can perform the undo operation on the cleared content. [Api set: WordApi 1.1] + /// + /// + } + Body.prototype.getComments = function() { + /// + /// Gets comments associated with the body. [Api set: WordApi 1.4] + /// + /// + } + Body.prototype.getContentControls = function(options) { + /// + /// Gets the currently supported content controls in the body. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. Make sure that your add-in respects it and is ready to handle new content control types. [Api set: WordApi 1.5] + /// + /// Optional. Options that define which content controls are returned. + /// + } + Body.prototype.getHtml = function() { + /// + /// 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 on the web, 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] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Body.prototype.getOoxml = function() { + /// + /// Gets the OOXML (Office Open XML) representation of the body object. [Api set: WordApi 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Body.prototype.getRange = function(rangeLocation) { + /// + /// Gets the whole body, or the starting or ending point of the body, as a range. [Api set: WordApi 1.3] + /// + /// Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + /// + } + Body.prototype.getReviewedText = function(changeTrackingVersion) { + /// + /// Gets reviewed text based on ChangeTrackingVersion selection. [Api set: WordApi 1.4] + /// + /// Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Body.prototype.getTrackedChanges = function() { + /// + /// Gets the collection of the TrackedChange objects in the body. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + Body.prototype.insertBreak = function(breakType, insertLocation) { + /// + /// Inserts a break at the specified location in the main document. [Api set: WordApi 1.1] + /// + /// Required. The break type to add to the body. + /// Required. The value must be 'Start' or 'End'. + /// + } + Body.prototype.insertContentControl = function(contentControlType) { + /// + /// Wraps the Body object with a content control. [Api set: WordApi 1.1] + /// + /// Optional. The content control type. The default is 'RichText'. + /// + } + Body.prototype.insertFileFromBase64 = function(base64File, insertLocation) { + /// + /// Inserts a document into the body at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The Base64-encoded content of a .docx file. + /// Required. The value must be 'Replace', 'Start', or 'End'. + /// + } + Body.prototype.insertHtml = function(html, insertLocation) { + /// + /// Inserts HTML at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The HTML to be inserted in the document. + /// Required. The value must be 'Replace', 'Start', or 'End'. + /// + } + Body.prototype.insertInlinePictureFromBase64 = function(base64EncodedImage, insertLocation) { + /// + /// Inserts a picture into the body at the specified location. [Api set: WordApi 1.2] + /// + /// Required. The Base64-encoded image to be inserted in the body. + /// Required. The value must be 'Start' or 'End'. + /// + } + Body.prototype.insertOoxml = function(ooxml, insertLocation) { + /// + /// Inserts OOXML at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The OOXML to be inserted. + /// Required. The value must be 'Replace', 'Start', or 'End'. + /// + } + Body.prototype.insertParagraph = function(paragraphText, insertLocation) { + /// + /// Inserts a paragraph at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The paragraph text to be inserted. + /// Required. The value must be 'Start' or 'End'. + /// + } + Body.prototype.insertTable = function(rowCount, columnCount, insertLocation, values) { + /// + /// Inserts a table with the specified number of rows and columns. [Api set: WordApi 1.3] + /// + /// Required. The number of rows in the table. + /// Required. The number of columns in the table. + /// Required. The value must be 'Start' or 'End'. + /// Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + /// + } + Body.prototype.insertText = function(text, insertLocation) { + /// + /// Inserts text into the body at the specified location. [Api set: WordApi 1.1] + /// + /// Required. Text to be inserted. + /// Required. The value must be 'Replace', 'Start', or 'End'. + /// + } + Body.prototype.search = function(searchText, searchOptions) { + /// + /// 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] + /// + /// Required. The search text. Can be a maximum of 255 characters. + /// Optional. Options for the search. + /// + } + Body.prototype.select = function(selectionMode) { + /// + /// Selects the body and navigates the Word UI to it. [Api set: WordApi 1.1] + /// + /// Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + /// + } + Body.prototype.onCommentAdded = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Body.prototype.onCommentChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Body.prototype.onCommentDeleted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Body.prototype.onCommentDeselected = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Body.prototype.onCommentSelected = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + Body.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Body.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Body; + })(OfficeExtension.ClientObject); + Word.Body = Body; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.3] + var BodyType = { + __proto__: null, + "unknown": "unknown", + "mainDoc": "mainDoc", + "section": "section", + "header": "header", + "footer": "footer", + "tableCell": "tableCell", + "footnote": "footnote", + "endnote": "endnote", + "noteItem": "noteItem", + } + Word.BodyType = BodyType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Border = (function(_super) { + __extends(Border, _super); + function Border() { + /// Represents the Border object for text, a paragraph, or a table. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the line color for the border. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the line style for the border. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the line width for the border. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the position type of the border. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies whether the border is visible. [Api set: WordApi BETA (PREVIEW ONLY)] + } + + Border.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Border.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.BorderUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Border object, with properties that have already been loaded and synced. + /// + } + + Border.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Border.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Border; + })(OfficeExtension.ClientObject); + Word.Border = Border; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var BorderCollection = (function(_super) { + __extends(BorderCollection, _super); + function BorderCollection() { + /// Represents the collection of style borders. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the 24-bit color of the inside borders. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the line style of the inside borders. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the line width of the inside borders. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the 24-bit color of the outside borders. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the line style of the outside borders. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the line width of the outside borders. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the loaded child items in this collection. + } + + BorderCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + BorderCollection.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.BorderCollectionUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing BorderCollection object, with properties that have already been loaded and synced. + /// + } + BorderCollection.prototype.getByPositionType = function(positionType) { + /// + /// Gets the border that has the specified position type. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + BorderCollection.prototype.getFirst = function() { + /// + /// Gets the first border in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + BorderCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first border in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + BorderCollection.prototype.getItem = function(index) { + /// + /// Gets a Border object by its index in the collection. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// A number that identifies the index location of a Border object. + /// + } + + BorderCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + BorderCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return BorderCollection; + })(OfficeExtension.ClientObject); + Word.BorderCollection = BorderCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.3] + var BorderLocation = { + __proto__: null, + "top": "top", + "left": "left", + "bottom": "bottom", + "right": "right", + "insideHorizontal": "insideHorizontal", + "insideVertical": "insideVertical", + "inside": "inside", + "outside": "outside", + "all": "all", + } + Word.BorderLocation = BorderLocation; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Represents the position of a style's border. [Api set: WordApi BETA (PREVIEW ONLY)] + var BorderPositionType = { + __proto__: null, + "top": "top", + "left": "left", + "bottom": "bottom", + "right": "right", + "horizontal": "horizontal", + "vertical": "vertical", + "diagonalDown": "diagonalDown", + "diagonalUp": "diagonalUp", + } + Word.BorderPositionType = BorderPositionType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.3] + var BorderType = { + __proto__: null, + "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", + } + Word.BorderType = BorderType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Specifies the form of a break. [Api set: WordApi 1.1] + var BreakType = { + __proto__: null, + "page": "page", + "sectionNext": "sectionNext", + "sectionContinuous": "sectionContinuous", + "sectionEven": "sectionEven", + "sectionOdd": "sectionOdd", + "line": "line", + } + Word.BreakType = BreakType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.3] + var BuiltInStyleName = { + __proto__: null, + "other": "other", + "normal": "normal", + "heading1": "heading1", + "heading2": "heading2", + "heading3": "heading3", + "heading4": "heading4", + "heading5": "heading5", + "heading6": "heading6", + "heading7": "heading7", + "heading8": "heading8", + "heading9": "heading9", + "toc1": "toc1", + "toc2": "toc2", + "toc3": "toc3", + "toc4": "toc4", + "toc5": "toc5", + "toc6": "toc6", + "toc7": "toc7", + "toc8": "toc8", + "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", + "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", + } + Word.BuiltInStyleName = BuiltInStyleName; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.3] + var CellPaddingLocation = { + __proto__: null, + "top": "top", + "left": "left", + "bottom": "bottom", + "right": "right", + } + Word.CellPaddingLocation = CellPaddingLocation; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// ChangeTracking mode. [Api set: WordApi 1.4] + var ChangeTrackingMode = { + __proto__: null, + "off": "off", + "trackAll": "trackAll", + "trackMineOnly": "trackMineOnly", + } + Word.ChangeTrackingMode = ChangeTrackingMode; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Specify the track state when ChangeTracking is on. [Api set: WordApi 1.5] + var ChangeTrackingState = { + __proto__: null, + "unknown": "unknown", + "normal": "normal", + "added": "added", + "deleted": "deleted", + } + Word.ChangeTrackingState = ChangeTrackingState; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Specify the current version or the original version of the text. [Api set: WordApi 1.4] + var ChangeTrackingVersion = { + __proto__: null, + "original": "original", + "current": "current", + } + Word.ChangeTrackingVersion = ChangeTrackingVersion; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Specifies the close behavior for `Document.close`. [Api set: WordApi 1.5] + var CloseBehavior = { + __proto__: null, + "save": "save", + "skipSave": "skipSave", + } + Word.CloseBehavior = CloseBehavior; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Comment = (function(_super) { + __extends(Comment, _super); + function Comment() { + /// Represents a comment in the document. [Api set: WordApi 1.4] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the email of the comment's author. [Api set: WordApi 1.4] + /// Gets the name of the comment's author. [Api set: WordApi 1.4] + /// Specifies the comment's content as plain text. [Api set: WordApi 1.4] + /// Specifies the comment's content range. [Api set: WordApi 1.4] + /// Gets the creation date of the comment. [Api set: WordApi 1.4] + /// Gets the ID of the comment. [Api set: WordApi 1.4] + /// Gets the collection of reply objects associated with the comment. [Api set: WordApi 1.4] + /// Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. [Api set: WordApi 1.4] + } + + Comment.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Comment.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.CommentUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Comment object, with properties that have already been loaded and synced. + /// + } + Comment.prototype.delete = function() { + /// + /// Deletes the comment and its replies. [Api set: WordApi 1.4] + /// + /// + } + Comment.prototype.getRange = function() { + /// + /// Gets the range in the main document where the comment is on. [Api set: WordApi 1.4] + /// + /// + } + Comment.prototype.reply = function(replyText) { + /// + /// Adds a new reply to the end of the comment thread. [Api set: WordApi 1.4] + /// + /// Required. Reply text. + /// + } + + Comment.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Comment.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Comment; + })(OfficeExtension.ClientObject); + Word.Comment = Comment; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Represents how the comments in the event were changed. [Api set: WordApi BETA (PREVIEW ONLY)] + var CommentChangeType = { + __proto__: null, + "none": "none", + "edited": "edited", + "resolved": "resolved", + "reopened": "reopened", + "replyAdded": "replyAdded", + "replyDeleted": "replyDeleted", + "replyEdited": "replyEdited", + } + Word.CommentChangeType = CommentChangeType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var CommentCollection = (function(_super) { + __extends(CommentCollection, _super); + function CommentCollection() { + /// Contains a collection of {@link Word.Comment} objects. [Api set: WordApi 1.4] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + CommentCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CommentCollection.prototype.getFirst = function() { + /// + /// Gets the first comment in the collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi 1.4] + /// + /// + } + CommentCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first comment in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.4] + /// + /// + } + + CommentCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + CommentCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return CommentCollection; + })(OfficeExtension.ClientObject); + Word.CommentCollection = CommentCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var CommentContentRange = (function(_super) { + __extends(CommentContentRange, _super); + function CommentContentRange() { + /// [Api set: WordApi 1.4] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies a value that indicates whether the comment text is bold. [Api set: WordApi 1.4] + /// 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. [Api set: WordApi 1.4] + /// Checks whether the range length is zero. [Api set: WordApi 1.4] + /// Specifies a value that indicates whether the comment text is italicized. [Api set: WordApi 1.4] + /// Specifies a value that indicates whether the comment text has a strikethrough. [Api set: WordApi 1.4] + /// Gets the text of the comment range. [Api set: WordApi 1.4] + /// Specifies a value that indicates the comment text's underline type. 'None' if the comment text is not underlined. [Api set: WordApi 1.4] + } + + CommentContentRange.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + CommentContentRange.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.CommentContentRangeUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing CommentContentRange object, with properties that have already been loaded and synced. + /// + } + CommentContentRange.prototype.insertText = function(text, insertLocation) { + /// + /// Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI. [Api set: WordApi 1.4] + /// + /// Required. The text to be inserted in to the CommentContentRange. + /// Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + /// + } + + CommentContentRange.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + CommentContentRange.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return CommentContentRange; + })(OfficeExtension.ClientObject); + Word.CommentContentRange = CommentContentRange; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var CommentDetail = (function() { + function CommentDetail() { + /// A structure for the ID and reply IDs of this comment. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Represents the ID of this comment. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Represents the IDs of the replies to this comment. [Api set: WordApi BETA (PREVIEW ONLY)] + } + return CommentDetail; + })(); + Interfaces.CommentDetail.__proto__ = null; + Interfaces.CommentDetail = CommentDetail; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var CommentEventArgs = (function() { + function CommentEventArgs() { + /// Provides information about the comments that raised the comment event. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Represents how the comment changed event is triggered. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the CommentDetail array which contains the IDs and reply IDs of the involved comments. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The source of the event. It can be local or remote (through coauthoring). [Api set: WordApi BETA (PREVIEW ONLY)] + /// The event type. See Word.EventType for details. [Api set: WordApi BETA (PREVIEW ONLY)] + } + return CommentEventArgs; + })(); + Interfaces.CommentEventArgs.__proto__ = null; + Interfaces.CommentEventArgs = CommentEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var CommentReply = (function(_super) { + __extends(CommentReply, _super); + function CommentReply() { + /// Represents a comment reply in the document. [Api set: WordApi 1.4] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the email of the comment reply's author. [Api set: WordApi 1.4] + /// Gets the name of the comment reply's author. [Api set: WordApi 1.4] + /// Specifies the comment reply's content. The string is plain text. [Api set: WordApi 1.4] + /// Specifies the commentReply's content range. [Api set: WordApi 1.4] + /// Gets the creation date of the comment reply. [Api set: WordApi 1.4] + /// Gets the ID of the comment reply. [Api set: WordApi 1.4] + /// Gets the parent comment of this reply. [Api set: WordApi 1.4] + } + + CommentReply.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + CommentReply.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.CommentReplyUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing CommentReply object, with properties that have already been loaded and synced. + /// + } + CommentReply.prototype.delete = function() { + /// + /// Deletes the comment reply. [Api set: WordApi 1.4] + /// + /// + } + + CommentReply.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + CommentReply.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return CommentReply; + })(OfficeExtension.ClientObject); + Word.CommentReply = CommentReply; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var CommentReplyCollection = (function(_super) { + __extends(CommentReplyCollection, _super); + function CommentReplyCollection() { + /// Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. [Api set: WordApi 1.4] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + CommentReplyCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CommentReplyCollection.prototype.getFirst = function() { + /// + /// Gets the first comment reply in the collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi 1.4] + /// + /// + } + CommentReplyCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first comment reply in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.4] + /// + /// + } + + CommentReplyCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + CommentReplyCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return CommentReplyCollection; + })(OfficeExtension.ClientObject); + Word.CommentReplyCollection = CommentReplyCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var ContentControl = (function(_super) { + __extends(ContentControl, _super); + function ContentControl() { + /// 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 and plain text content controls are supported. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. [Api set: WordApi 1.1] + /// Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. [Api set: WordApi 1.1] + /// Specifies a value that indicates whether the user can edit the contents of the content control. [Api set: WordApi 1.1] + /// Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. [Api set: WordApi 1.1] + /// Gets the collection of content control objects in the content control. [Api set: WordApi 1.1] + /// Gets the collection of endnotes in the content control. [Api set: WordApi 1.5] + /// Gets the collection of field objects in the content control. [Api set: WordApi 1.4] + /// 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] + /// Gets the collection of footnotes in the content control. [Api set: WordApi 1.5] + /// Gets an integer that represents the content control identifier. [Api set: WordApi 1.1] + /// Gets the collection of InlinePicture objects in the content control. The collection does not include floating images. [Api set: WordApi 1.1] + /// Gets the collection of list objects in the content control. [Api set: WordApi 1.3] + /// Gets the collection of paragraph objects in the content control. **Important**: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control are not returned. From requirement set 1.3, paragraphs in such tables are also returned. [Api set: WordApi 1.1] + /// Gets the parent body of the content control. [Api set: WordApi 1.3] + /// Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. [Api set: WordApi 1.1] + /// Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the table that contains the content control. Throws an `ItemNotFound` error if it is not contained in a table. [Api set: WordApi 1.3] + /// Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it is not contained in a table cell. [Api set: WordApi 1.3] + /// Gets the table cell that contains the content control. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the table that contains the content control. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. **Note**: The set operation for this property is not supported in Word on the web. [Api set: WordApi 1.1] + /// Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. [Api set: WordApi 1.1] + /// Specifies 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] + /// Specifies 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] + /// Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls. [Api set: WordApi 1.3] + /// Gets the collection of table objects in the content control. [Api set: WordApi 1.3] + /// Specifies a tag to identify a content control. [Api set: WordApi 1.1] + /// Gets the text of the content control. [Api set: WordApi 1.1] + /// Specifies the title for a content control. [Api set: WordApi 1.1] + /// Gets the content control type. Only rich text and plain text content controls are supported currently. [Api set: WordApi 1.1] + /// Occurs when new comments are added. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a comment or its reply is changed. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a comment is deselected. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a comment is selected. [Api set: WordApi BETA (PREVIEW ONLY)] + /// 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 1.5] + /// 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 1.5] + /// Occurs when the content control is entered. [Api set: WordApi 1.5] + /// Occurs when the content control is exited, for example, when the cursor leaves the content control. [Api set: WordApi 1.5] + /// Occurs when selection within the content control is changed. [Api set: WordApi 1.5] + } + + ContentControl.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ContentControl.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.ContentControlUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ContentControl object, with properties that have already been loaded and synced. + /// + } + ContentControl.prototype.clear = function() { + /// + /// Clears the contents of the content control. The user can perform the undo operation on the cleared content. [Api set: WordApi 1.1] + /// + /// + } + ContentControl.prototype.delete = function(keepContent) { + /// + /// Deletes the content control and its content. If keepContent is set to true, the content is not deleted. [Api set: WordApi 1.1] + /// + /// Required. Indicates whether the content should be deleted with the content control. If keepContent is set to true, the content is not deleted. + /// + } + ContentControl.prototype.getComments = function() { + /// + /// Gets comments associated with the content control. [Api set: WordApi 1.4] + /// + /// + } + ContentControl.prototype.getContentControls = function(options) { + /// + /// Gets the currently supported child content controls in this content control. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. Make sure that your add-in respects it and is ready to handle new content control types. [Api set: WordApi 1.5] + /// + /// Optional. Options that define which content controls are returned. + /// + } + ContentControl.prototype.getHtml = function() { + /// + /// 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 on the web, 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] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + ContentControl.prototype.getOoxml = function() { + /// + /// Gets the Office Open XML (OOXML) representation of the content control object. [Api set: WordApi 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + ContentControl.prototype.getRange = function(rangeLocation) { + /// + /// Gets the whole content control, or the starting or ending point of the content control, as a range. [Api set: WordApi 1.3] + /// + /// Optional. The range location must be 'Whole', 'Start', 'End', 'Before', 'After', or 'Content'. + /// + } + ContentControl.prototype.getReviewedText = function(changeTrackingVersion) { + /// + /// Gets reviewed text based on ChangeTrackingVersion selection. [Api set: WordApi 1.4] + /// + /// Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + ContentControl.prototype.getTextRanges = function(endingMarks, trimSpacing) { + /// + /// Gets the text ranges in the content control by using punctuation marks and/or other ending marks. [Api set: WordApi 1.3] + /// + /// Required. The punctuation marks and/or other ending marks as an array of strings. + /// 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. + /// + } + ContentControl.prototype.getTrackedChanges = function() { + /// + /// Gets the collection of the TrackedChange objects in the content control. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + ContentControl.prototype.insertBreak = function(breakType, insertLocation) { + /// + /// Inserts a break at the specified location in the main document. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. [Api set: WordApi 1.1] + /// + /// Required. Type of break. + /// Required. The value must be 'Start', 'End', 'Before', or 'After'. + /// + } + ContentControl.prototype.insertFileFromBase64 = function(base64File, insertLocation) { + /// + /// Inserts a document into the content control at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The Base64-encoded content of a .docx file. + /// Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + /// + } + ContentControl.prototype.insertHtml = function(html, insertLocation) { + /// + /// Inserts HTML into the content control at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The HTML to be inserted in to the content control. + /// Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + /// + } + ContentControl.prototype.insertInlinePictureFromBase64 = function(base64EncodedImage, insertLocation) { + /// + /// Inserts an inline picture into the content control at the specified location. [Api set: WordApi 1.2] + /// + /// Required. The Base64-encoded image to be inserted in the content control. + /// Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + /// + } + ContentControl.prototype.insertOoxml = function(ooxml, insertLocation) { + /// + /// Inserts OOXML into the content control at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The OOXML to be inserted in to the content control. + /// Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + /// + } + ContentControl.prototype.insertParagraph = function(paragraphText, insertLocation) { + /// + /// Inserts a paragraph at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The paragraph text to be inserted. + /// Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + /// + } + ContentControl.prototype.insertTable = function(rowCount, columnCount, insertLocation, values) { + /// + /// Inserts a table with the specified number of rows and columns into, or next to, a content control. [Api set: WordApi 1.3] + /// + /// Required. The number of rows in the table. + /// Required. The number of columns in the table. + /// Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + /// Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + /// + } + ContentControl.prototype.insertText = function(text, insertLocation) { + /// + /// Inserts text into the content control at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The text to be inserted in to the content control. + /// Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + /// + } + ContentControl.prototype.search = function(searchText, searchOptions) { + /// + /// 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] + /// + /// Required. The search text. + /// Optional. Options for the search. + /// + } + ContentControl.prototype.select = function(selectionMode) { + /// + /// Selects the content control. This causes Word to scroll to the selection. [Api set: WordApi 1.1] + /// + /// Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + /// + } + ContentControl.prototype.split = function(delimiters, multiParagraphs, trimDelimiters, trimSpacing) { + /// + /// Splits the content control into child ranges by using delimiters. [Api set: WordApi 1.3] + /// + /// Required. The delimiters as an array of strings. + /// 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. + /// 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. + /// 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. + /// + } + ContentControl.prototype.onCommentAdded = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + ContentControl.prototype.onCommentChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + ContentControl.prototype.onCommentDeselected = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + ContentControl.prototype.onCommentSelected = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + ContentControl.prototype.onDataChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the content control that raised contentControlDataChanged event. + /// + var eventInfo = new Word.Interfaces.ContentControlDataChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + ContentControl.prototype.onDeleted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the content control that raised contentControlDeleted event. + /// + var eventInfo = new Word.Interfaces.ContentControlDeletedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + ContentControl.prototype.onEntered = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the content control that raised contentControlEntered event. + /// + var eventInfo = new Word.Interfaces.ContentControlEnteredEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + ContentControl.prototype.onExited = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the content control that raised contentControlExited event. + /// + var eventInfo = new Word.Interfaces.ContentControlExitedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + ContentControl.prototype.onSelectionChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the content control that raised contentControlSelectionChanged event. + /// + var eventInfo = new Word.Interfaces.ContentControlSelectionChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + ContentControl.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + ContentControl.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return ContentControl; + })(OfficeExtension.ClientObject); + Word.ContentControl = ContentControl; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ContentControlAddedEventArgs = (function() { + function ContentControlAddedEventArgs() { + /// Provides information about the content control that raised contentControlAdded event. [Api set: WordApi 1.5] + /// The event type. See Word.EventType for details. [Api set: WordApi 1.5] + /// Gets the content control IDs. [Api set: WordApi 1.5] + /// The source of the event. It can be local or remote (through coauthoring). [Api set: WordApi 1.5] + } + return ContentControlAddedEventArgs; + })(); + Interfaces.ContentControlAddedEventArgs.__proto__ = null; + Interfaces.ContentControlAddedEventArgs = ContentControlAddedEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// ContentControl appearance. [Api set: WordApi 1.1] + var ContentControlAppearance = { + __proto__: null, + "boundingBox": "boundingBox", + "tags": "tags", + "hidden": "hidden", + } + Word.ContentControlAppearance = ContentControlAppearance; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var ContentControlCollection = (function(_super) { + __extends(ContentControlCollection, _super); + function ContentControlCollection() { + /// 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 and plain text content controls are supported. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + ContentControlCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ContentControlCollection.prototype.getByChangeTrackingStates = function(changeTrackingStates) { + /// + /// Gets the content controls that have the specified tracking state. [Api set: WordApi 1.5] + /// + /// Required. An array of content control change tracking states. + /// + } + ContentControlCollection.prototype.getById = function(id) { + /// + /// Gets a content control by its identifier. Throws an `ItemNotFound` error if there isn't a content control with the identifier in this collection. [Api set: WordApi 1.1] + /// + /// Required. A content control identifier. + /// + } + ContentControlCollection.prototype.getByIdOrNullObject = function(id) { + /// + /// Gets a content control by its identifier. If there isn't a content control with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// Required. A content control identifier. + /// + } + ContentControlCollection.prototype.getByTag = function(tag) { + /// + /// Gets the content controls that have the specified tag. [Api set: WordApi 1.1] + /// + /// Required. A tag set on a content control. + /// + } + ContentControlCollection.prototype.getByTitle = function(title) { + /// + /// Gets the content controls that have the specified title. [Api set: WordApi 1.1] + /// + /// Required. The title of a content control. + /// + } + ContentControlCollection.prototype.getByTypes = function(types) { + /// + /// Gets the content controls that have the specified types. [Api set: WordApi 1.3] + /// + /// Required. An array of content control types. + /// + } + ContentControlCollection.prototype.getFirst = function() { + /// + /// Gets the first content control in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi 1.3] + /// + /// + } + ContentControlCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first content control in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + ContentControlCollection.prototype.getItem = function(id) { + /// + /// Gets a content control by its ID. [Api set: WordApi 1.1] + /// + /// The content control's ID. + /// + } + + ContentControlCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + ContentControlCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return ContentControlCollection; + })(OfficeExtension.ClientObject); + Word.ContentControlCollection = ContentControlCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ContentControlDataChangedEventArgs = (function() { + function ContentControlDataChangedEventArgs() { + /// Provides information about the content control that raised contentControlDataChanged event. [Api set: WordApi 1.5] + /// The event type. See Word.EventType for details. [Api set: WordApi 1.5] + /// Gets the content control IDs. [Api set: WordApi 1.5] + /// The source of the event. It can be local or remote (through coauthoring). [Api set: WordApi 1.5] + } + return ContentControlDataChangedEventArgs; + })(); + Interfaces.ContentControlDataChangedEventArgs.__proto__ = null; + Interfaces.ContentControlDataChangedEventArgs = ContentControlDataChangedEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ContentControlDeletedEventArgs = (function() { + function ContentControlDeletedEventArgs() { + /// Provides information about the content control that raised contentControlDeleted event. [Api set: WordApi 1.5] + /// The event type. See Word.EventType for details. [Api set: WordApi 1.5] + /// Gets the content control IDs. [Api set: WordApi 1.5] + /// The source of the event. It can be local or remote (through coauthoring). [Api set: WordApi 1.5] + } + return ContentControlDeletedEventArgs; + })(); + Interfaces.ContentControlDeletedEventArgs.__proto__ = null; + Interfaces.ContentControlDeletedEventArgs = ContentControlDeletedEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ContentControlEnteredEventArgs = (function() { + function ContentControlEnteredEventArgs() { + /// Provides information about the content control that raised contentControlEntered event. [Api set: WordApi 1.5] + /// The event type. See Word.EventType for details. [Api set: WordApi 1.5] + /// Gets the content control IDs. [Api set: WordApi 1.5] + /// The source of the event. It can be local or remote (through coauthoring). [Api set: WordApi 1.5] + } + return ContentControlEnteredEventArgs; + })(); + Interfaces.ContentControlEnteredEventArgs.__proto__ = null; + Interfaces.ContentControlEnteredEventArgs = ContentControlEnteredEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ContentControlEventArgs = (function() { + function ContentControlEventArgs() { + /// Provides information about the content control that raised an event. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The object that raised the event. Load this object to get its properties. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The event type. See Word.EventType for details. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the content control IDs. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The source of the event. It can be local or remote (through coauthoring). [Api set: WordApi BETA (PREVIEW ONLY)] + } + return ContentControlEventArgs; + })(); + Interfaces.ContentControlEventArgs.__proto__ = null; + Interfaces.ContentControlEventArgs = ContentControlEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ContentControlExitedEventArgs = (function() { + function ContentControlExitedEventArgs() { + /// Provides information about the content control that raised contentControlExited event. [Api set: WordApi 1.5] + /// The event type. See Word.EventType for details. [Api set: WordApi 1.5] + /// Gets the content control IDs. [Api set: WordApi 1.5] + /// The source of the event. It can be local or remote (through coauthoring). [Api set: WordApi 1.5] + } + return ContentControlExitedEventArgs; + })(); + Interfaces.ContentControlExitedEventArgs.__proto__ = null; + Interfaces.ContentControlExitedEventArgs = ContentControlExitedEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ContentControlOptions = (function() { + function ContentControlOptions() { + /// Specifies the options that define which content controls are returned. [Api set: WordApi 1.5] + /// An array of content control types, item must be 'RichText' or 'PlainText'. [Api set: WordApi 1.5] + } + return ContentControlOptions; + })(); + Interfaces.ContentControlOptions.__proto__ = null; + Interfaces.ContentControlOptions = ContentControlOptions; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ContentControlSelectionChangedEventArgs = (function() { + function ContentControlSelectionChangedEventArgs() { + /// Provides information about the content control that raised contentControlSelectionChanged event. [Api set: WordApi 1.5] + /// The event type. See Word.EventType for details. [Api set: WordApi 1.5] + /// Gets the content control IDs. [Api set: WordApi 1.5] + /// The source of the event. It can be local or remote (through coauthoring). [Api set: WordApi 1.5] + } + return ContentControlSelectionChangedEventArgs; + })(); + Interfaces.ContentControlSelectionChangedEventArgs.__proto__ = null; + Interfaces.ContentControlSelectionChangedEventArgs = ContentControlSelectionChangedEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Specifies supported content control types and subtypes. [Api set: WordApi 1.1] + var ContentControlType = { + __proto__: null, + "unknown": "unknown", + "richTextInline": "richTextInline", + "richTextParagraphs": "richTextParagraphs", + "richTextTableCell": "richTextTableCell", + "richTextTableRow": "richTextTableRow", + "richTextTable": "richTextTable", + "plainTextInline": "plainTextInline", + "plainTextParagraph": "plainTextParagraph", + "picture": "picture", + "buildingBlockGallery": "buildingBlockGallery", + "checkBox": "checkBox", + "comboBox": "comboBox", + "dropDownList": "dropDownList", + "datePicker": "datePicker", + "repeatingSection": "repeatingSection", + "richText": "richText", + "plainText": "plainText", + } + Word.ContentControlType = ContentControlType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var Critique = (function() { + function Critique() { + /// Critique that will be rendered as underline for the specified part of paragraph in the document. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the color scheme of the critique. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the length of the critique inside paragraph. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the start index of the critique inside paragraph. [Api set: WordApi BETA (PREVIEW ONLY)] + } + return Critique; + })(); + Interfaces.Critique.__proto__ = null; + Interfaces.Critique = Critique; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var CritiqueAnnotation = (function(_super) { + __extends(CritiqueAnnotation, _super); + function CritiqueAnnotation() { + /// Represents an annotation wrapper around critique displayed in the document. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the critique that was passed when the annotation was inserted. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the range of text that is annotated. [Api set: WordApi BETA (PREVIEW ONLY)] + } + + CritiqueAnnotation.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CritiqueAnnotation.prototype.accept = function() { + /// + /// Accepts the critique. This will change the annotation state to `accepted`. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + CritiqueAnnotation.prototype.reject = function() { + /// + /// Rejects the critique. This will change the annotation state to `rejected`. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + + CritiqueAnnotation.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + CritiqueAnnotation.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return CritiqueAnnotation; + })(OfficeExtension.ClientObject); + Word.CritiqueAnnotation = CritiqueAnnotation; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Represents the color scheme of a critique in the document, affecting underline and highlight. [Api set: WordApi BETA (PREVIEW ONLY)] + var CritiqueColorScheme = { + __proto__: null, + "red": "red", + "green": "green", + "blue": "blue", + "lavender": "lavender", + "berry": "berry", + } + Word.CritiqueColorScheme = CritiqueColorScheme; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var CustomProperty = (function(_super) { + __extends(CustomProperty, _super); + function CustomProperty() { + /// Represents a custom property. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the key of the custom property. [Api set: WordApi 1.3] + /// Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. [Api set: WordApi 1.3] + /// Specifies the value of the custom property. Note that even though Word on the web 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] + } + + CustomProperty.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + CustomProperty.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.CustomPropertyUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing CustomProperty object, with properties that have already been loaded and synced. + /// + } + CustomProperty.prototype.delete = function() { + /// + /// Deletes the custom property. [Api set: WordApi 1.3] + /// + /// + } + + CustomProperty.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + CustomProperty.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return CustomProperty; + })(OfficeExtension.ClientObject); + Word.CustomProperty = CustomProperty; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var CustomPropertyCollection = (function(_super) { + __extends(CustomPropertyCollection, _super); + function CustomPropertyCollection() { + /// Contains the collection of {@link Word.CustomProperty} objects. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + CustomPropertyCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CustomPropertyCollection.prototype.add = function(key, value) { + /// + /// Creates a new or sets an existing custom property. [Api set: WordApi 1.3] + /// + /// Required. The custom property's key, which is case-insensitive. + /// Required. The custom property's value. + /// + } + CustomPropertyCollection.prototype.deleteAll = function() { + /// + /// Deletes all custom properties in this collection. [Api set: WordApi 1.3] + /// + /// + } + CustomPropertyCollection.prototype.getCount = function() { + /// + /// Gets the count of custom properties. [Api set: WordApi 1.3] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + CustomPropertyCollection.prototype.getItem = function(key) { + /// + /// Gets a custom property object by its key, which is case-insensitive. Throws an `ItemNotFound` error if the custom property does not exist. [Api set: WordApi 1.3] + /// + /// The key that identifies the custom property object. + /// + } + CustomPropertyCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a custom property object by its key, which is case-insensitive. If the custom property does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// Required. The key that identifies the custom property object. + /// + } + + CustomPropertyCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + CustomPropertyCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return CustomPropertyCollection; + })(OfficeExtension.ClientObject); + Word.CustomPropertyCollection = CustomPropertyCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var CustomXmlPart = (function(_super) { + __extends(CustomXmlPart, _super); + function CustomXmlPart() { + /// Represents a custom XML part. [Api set: WordApi 1.4] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the ID of the custom XML part. [Api set: WordApi 1.4] + /// Gets the namespace URI of the custom XML part. [Api set: WordApi 1.4] + } + + CustomXmlPart.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CustomXmlPart.prototype.delete = function() { + /// + /// Deletes the custom XML part. [Api set: WordApi 1.4] + /// + /// + } + CustomXmlPart.prototype.deleteAttribute = function(xpath, namespaceMappings, name) { + /// + /// Deletes an attribute with the given name from the element identified by xpath. [Api set: WordApi 1.4] + /// + /// Required. Absolute path to the single element in XPath notation. + /// Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + /// Required. Name of the attribute. + /// + } + CustomXmlPart.prototype.deleteElement = function(xpath, namespaceMappings) { + /// + /// Deletes the element identified by xpath. [Api set: WordApi 1.4] + /// + /// Required. Absolute path to the single element in XPath notation. + /// Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + /// + } + CustomXmlPart.prototype.getXml = function() { + /// + /// Gets the full XML content of the custom XML part. [Api set: WordApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + CustomXmlPart.prototype.insertAttribute = function(xpath, namespaceMappings, name, value) { + /// + /// Inserts an attribute with the given name and value to the element identified by xpath. [Api set: WordApi 1.4] + /// + /// Required. Absolute path to the single element in XPath notation. + /// Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + /// Required. Name of the attribute. + /// Required. Value of the attribute. + /// + } + CustomXmlPart.prototype.insertElement = function(xpath, xml, namespaceMappings, index) { + /// + /// Inserts the given XML under the parent element identified by xpath at child position index. [Api set: WordApi 1.4] + /// + /// Required. Absolute path to the single parent element in XPath notation. + /// Required. XML content to be inserted. + /// Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + /// 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. + /// + } + CustomXmlPart.prototype.query = function(xpath, namespaceMappings) { + /// + /// Queries the XML content of the custom XML part. [Api set: WordApi 1.4] + /// + /// Required. An XPath query. + /// Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + /// An array where each item represents an entry matched by the XPath query. + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = []; + return result; + } + CustomXmlPart.prototype.setXml = function(xml) { + /// + /// Sets the full XML content of the custom XML part. [Api set: WordApi 1.4] + /// + /// Required. XML content to be set. + /// + } + CustomXmlPart.prototype.updateAttribute = function(xpath, namespaceMappings, name, value) { + /// + /// Updates the value of an attribute with the given name of the element identified by xpath. [Api set: WordApi 1.4] + /// + /// Required. Absolute path to the single element in XPath notation. + /// Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + /// Required. Name of the attribute. + /// Required. New value of the attribute. + /// + } + CustomXmlPart.prototype.updateElement = function(xpath, xml, namespaceMappings) { + /// + /// Updates the XML of the element identified by xpath. [Api set: WordApi 1.4] + /// + /// Required. Absolute path to the single element in XPath notation. + /// Required. New XML content to be stored. + /// Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + /// + } + + CustomXmlPart.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + CustomXmlPart.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return CustomXmlPart; + })(OfficeExtension.ClientObject); + Word.CustomXmlPart = CustomXmlPart; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var CustomXmlPartCollection = (function(_super) { + __extends(CustomXmlPartCollection, _super); + function CustomXmlPartCollection() { + /// Contains the collection of {@link Word.CustomXmlPart} objects. [Api set: WordApi 1.4] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + CustomXmlPartCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CustomXmlPartCollection.prototype.add = function(xml) { + /// + /// Adds a new custom XML part to the document. [Api set: WordApi 1.4] + /// + /// Required. XML content. Must be a valid XML fragment. + /// + } + CustomXmlPartCollection.prototype.getByNamespace = function(namespaceUri) { + /// + /// Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. [Api set: WordApi 1.4] + /// + /// Required. The namespace URI. + /// + } + CustomXmlPartCollection.prototype.getCount = function() { + /// + /// Gets the number of items in the collection. [Api set: WordApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + CustomXmlPartCollection.prototype.getItem = function(id) { + /// + /// Gets a custom XML part based on its ID. [Api set: WordApi 1.4] + /// + /// ID or index of the custom XML part to be retrieved. + /// + } + CustomXmlPartCollection.prototype.getItemOrNullObject = function(id) { + /// + /// Gets a custom XML part based on its ID. If the CustomXmlPart does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.4] + /// + /// Required. ID of the object to be retrieved. + /// + } + + CustomXmlPartCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + CustomXmlPartCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return CustomXmlPartCollection; + })(OfficeExtension.ClientObject); + Word.CustomXmlPartCollection = CustomXmlPartCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var CustomXmlPartScopedCollection = (function(_super) { + __extends(CustomXmlPartScopedCollection, _super); + function CustomXmlPartScopedCollection() { + /// Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. [Api set: WordApi 1.4] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + CustomXmlPartScopedCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CustomXmlPartScopedCollection.prototype.getCount = function() { + /// + /// Gets the number of items in the collection. [Api set: WordApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + CustomXmlPartScopedCollection.prototype.getItem = function(id) { + /// + /// Gets a custom XML part based on its ID. [Api set: WordApi 1.4] + /// + /// ID of the custom XML part to be retrieved. + /// + } + CustomXmlPartScopedCollection.prototype.getItemOrNullObject = function(id) { + /// + /// Gets a custom XML part based on its ID. If the CustomXmlPart does not exist in the collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.4] + /// + /// Required. ID of the object to be retrieved. + /// + } + CustomXmlPartScopedCollection.prototype.getOnlyItem = function() { + /// + /// If the collection contains exactly one item, this method returns it. Otherwise, this method produces an error. [Api set: WordApi 1.4] + /// + /// + } + CustomXmlPartScopedCollection.prototype.getOnlyItemOrNullObject = function() { + /// + /// If the collection contains exactly one item, this method returns it. Otherwise, this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.4] + /// + /// + } + + CustomXmlPartScopedCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + CustomXmlPartScopedCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return CustomXmlPartScopedCollection; + })(OfficeExtension.ClientObject); + Word.CustomXmlPartScopedCollection = CustomXmlPartScopedCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Document = (function(_super) { + __extends(Document, _super); + function Document() { + /// 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] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. [Api set: WordApi 1.1] + /// Specifies the ChangeTracking mode. [Api set: WordApi 1.4] + /// Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. [Api set: WordApi 1.1] + /// Gets the custom XML parts in the document. [Api set: WordApi 1.4] + /// Gets the properties of the document. [Api set: WordApi 1.3] + /// 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. [Api set: WordApi 1.1] + /// Gets the collection of section objects in the document. [Api set: WordApi 1.1] + /// Gets the add-in's settings in the document. [Api set: WordApi 1.4] + /// Occurs when an annotation is clicked (or selected using **Alt+Down**). [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when an annotation is hovered over. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when one or more annotations are added. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when one or more annotations are deleted. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a content control is added. Run context.sync() in the handler to get the new content control's properties. [Api set: WordApi 1.5] + /// Occurs when new paragraphs are added. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when paragraphs are changed. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when paragraphs are deleted. [Api set: WordApi BETA (PREVIEW ONLY)] + } + + Document.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Document.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.DocumentUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Document object, with properties that have already been loaded and synced. + /// + } + Document.prototype.addStyle = function(name, type) { + /// + /// Adds a style into the document by name and type. [Api set: WordApi 1.5] + /// + /// Required. A string representing the style name. + /// Required. The style type, including character, list, paragraph, or table. + /// + } + Document.prototype.close = function(closeBehavior) { + /// + /// Close current document. [Api set: WordApi 1.5] + /// + /// Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. + /// + } + Document.prototype.deleteBookmark = function(name) { + /// + /// Deletes a bookmark, if it exists, from the document. [Api set: WordApi 1.4] + /// + /// Required. The bookmark name, which is case-insensitive. + /// + } + Document.prototype.getAnnotationById = function(id) { + /// + /// Gets the annotation by ID. Throws an `ItemNotFound` error if annotation isn't found. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// The ID of the annotation to get. + /// + } + Document.prototype.getBookmarkRange = function(name) { + /// + /// Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark does not exist. [Api set: WordApi 1.4] + /// + /// Required. The bookmark name, which is case-insensitive. + /// + } + Document.prototype.getBookmarkRangeOrNullObject = function(name) { + /// + /// Gets a bookmark's range. If the bookmark does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.4] + /// + /// Required. The bookmark name, which is case-insensitive. + /// + } + Document.prototype.getContentControls = function(options) { + /// + /// Gets the currently supported content controls in the document. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. Make sure that your add-in respects it and is ready to handle new content control types. [Api set: WordApi 1.5] + /// + /// Optional. Options that define which content controls are returned. + /// + } + Document.prototype.getEndnoteBody = function() { + /// + /// Gets the document's endnotes in a single body. Not implemented in Word on the web. [Api set: WordApi 1.5] + /// + /// + } + Document.prototype.getFootnoteBody = function() { + /// + /// Gets the document's footnotes in a single body. Not implemented in Word on the web. [Api set: WordApi 1.5] + /// + /// + } + Document.prototype.getParagraphByUniqueLocalId = function(id) { + /// + /// Gets the paragraph by its unique id. Throws an `ItemNotFound` error if the collection is empty. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// Required. Unique Paragraph Id. + /// + } + Document.prototype.getSelection = function() { + /// + /// Gets the current selection of the document. Multiple selections are not supported. [Api set: WordApi 1.1] + /// + /// + } + Document.prototype.getStyles = function() { + /// + /// Gets a StyleCollection object that represents the whole style set of the document. [Api set: WordApi 1.5] + /// + /// + } + Document.prototype.importStylesFromJson = function(stylesJson) { + /// + /// Import styles from a JSON-formatted string. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// Required. A JSON-formatted string representing the styles. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = []; + return result; + } + Document.prototype.insertFileFromBase64 = function(base64File, insertLocation, insertFileOptions) { + /// + /// Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. [Api set: WordApi 1.5] + /// + /// Required. The Base64-encoded content of a .docx file. + /// Required. The value must be 'Replace', 'Start', or 'End'. + /// Optional. The additional properties that should be imported to the destination document. + /// + } + Document.prototype.save = function(saveBehavior, fileName) { + /// + /// Save the document. [Api set: WordApi 1.1] + /// + /// Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. + /// Optional. The file name (exclude file extension). Only takes effect for a new document. + /// + } + Document.prototype.search = function(searchText, searchOptions) { + /// + /// Performs a search with the specified search options on the scope of the whole document. The search results are a collection of range objects. [Api set: WordApiOnline 1.1] + /// + /// + } + Document.prototype.onAnnotationClicked = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Holds annotation information that is passed back on annotation inserted event. + /// + var eventInfo = new Word.Interfaces.AnnotationClickedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onAnnotationHovered = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Holds annotation information that is passed back on annotation hovered event. + /// + var eventInfo = new Word.Interfaces.AnnotationHoveredEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onAnnotationInserted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Holds annotation information that is passed back on annotation added event. + /// + var eventInfo = new Word.Interfaces.AnnotationInsertedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onAnnotationRemoved = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Holds annotation information that is passed back on annotation removed event. + /// + var eventInfo = new Word.Interfaces.AnnotationRemovedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onContentControlAdded = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the content control that raised contentControlAdded event. + /// + var eventInfo = new Word.Interfaces.ContentControlAddedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onParagraphAdded = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the paragraphs that raised the paragraphAdded event. + /// + var eventInfo = new Word.Interfaces.ParagraphAddedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onParagraphChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the paragraphs that raised the paragraphChanged event. + /// + var eventInfo = new Word.Interfaces.ParagraphChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onParagraphDeleted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the paragraphs that raised the paragraphDeleted event. + /// + var eventInfo = new Word.Interfaces.ParagraphDeletedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + Document.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Document.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Document; + })(OfficeExtension.ClientObject); + Word.Document = Document; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var DocumentCreated = (function(_super) { + __extends(DocumentCreated, _super); + function DocumentCreated() { + /// 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] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. [Api set: WordApiHiddenDocument 1.3] + /// Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. [Api set: WordApiHiddenDocument 1.3] + /// Gets the custom XML parts in the document. [Api set: WordApiHiddenDocument 1.4] + /// Gets the properties of the document. [Api set: WordApiHiddenDocument 1.3] + /// 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. [Api set: WordApiHiddenDocument 1.3] + /// Gets the collection of section objects in the document. [Api set: WordApiHiddenDocument 1.3] + /// Gets the add-in's settings in the document. [Api set: WordApiHiddenDocument 1.4] + } + + DocumentCreated.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + DocumentCreated.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.DocumentCreatedUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing DocumentCreated object, with properties that have already been loaded and synced. + /// + } + DocumentCreated.prototype.addStyle = function(name, type) { + /// + /// Adds a style into the document by name and type. [Api set: WordApiHiddenDocument 1.5] + /// + /// Required. A string representing the style name. + /// Required. The style type, including character, list, paragraph, or table. + /// + } + DocumentCreated.prototype.deleteBookmark = function(name) { + /// + /// Deletes a bookmark, if it exists, from the document. [Api set: WordApiHiddenDocument 1.4] + /// + /// Required. The bookmark name, which is case-insensitive. + /// + } + DocumentCreated.prototype.getBookmarkRange = function(name) { + /// + /// Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark does not exist. [Api set: WordApiHiddenDocument 1.4] + /// + /// Required. The bookmark name, which is case-insensitive. + /// + } + DocumentCreated.prototype.getBookmarkRangeOrNullObject = function(name) { + /// + /// Gets a bookmark's range. If the bookmark does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApiHiddenDocument 1.4] + /// + /// Required. The bookmark name, which is case-insensitive. + /// + } + DocumentCreated.prototype.getContentControls = function(options) { + /// + /// Gets the currently supported content controls in the document. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. Make sure that your add-in respects it and is ready to handle new content control types. [Api set: WordApiHiddenDocument 1.5] + /// + /// Optional. Options that define which content controls are returned. + /// + } + DocumentCreated.prototype.getStyles = function() { + /// + /// Gets a StyleCollection object that represents the whole style set of the document. [Api set: WordApiHiddenDocument 1.5] + /// + /// + } + DocumentCreated.prototype.insertFileFromBase64 = function(base64File, insertLocation, insertFileOptions) { + /// + /// Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. [Api set: WordApiHiddenDocument 1.5] + /// + /// Required. The Base64-encoded content of a .docx file. + /// Required. The value must be 'Replace', 'Start', or 'End'. + /// Optional. The additional properties that should be imported to the destination document. + /// + } + DocumentCreated.prototype.open = function() { + /// + /// Opens the document. [Api set: WordApi 1.3] + /// + /// + } + DocumentCreated.prototype.save = function(saveBehavior, fileName) { + /// + /// Save the document. [Api set: WordApiHiddenDocument 1.3] + /// + /// Optional. DocumentCreated only supports 'Save'. + /// Optional. The file name (exclude file extension). Only takes effect for a new document. + /// + } + + DocumentCreated.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + DocumentCreated.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return DocumentCreated; + })(OfficeExtension.ClientObject); + Word.DocumentCreated = DocumentCreated; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var DocumentProperties = (function(_super) { + __extends(DocumentProperties, _super); + function DocumentProperties() { + /// Represents document properties. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the application name of the document. [Api set: WordApi 1.3] + /// Specifies the author of the document. [Api set: WordApi 1.3] + /// Specifies the category of the document. [Api set: WordApi 1.3] + /// Specifies the comments of the document. [Api set: WordApi 1.3] + /// Specifies the company of the document. [Api set: WordApi 1.3] + /// Gets the creation date of the document. [Api set: WordApi 1.3] + /// Gets the collection of custom properties of the document. [Api set: WordApi 1.3] + /// Specifies the format of the document. [Api set: WordApi 1.3] + /// Specifies the keywords of the document. [Api set: WordApi 1.3] + /// Gets the last author of the document. [Api set: WordApi 1.3] + /// Gets the last print date of the document. [Api set: WordApi 1.3] + /// Gets the last save time of the document. [Api set: WordApi 1.3] + /// Specifies the manager of the document. [Api set: WordApi 1.3] + /// Gets the revision number of the document. [Api set: WordApi 1.3] + /// Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. [Api set: WordApi 1.3] + /// Specifies the subject of the document. [Api set: WordApi 1.3] + /// Gets the template of the document. [Api set: WordApi 1.3] + /// Specifies the title of the document. [Api set: WordApi 1.3] + } + + DocumentProperties.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + DocumentProperties.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.DocumentPropertiesUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing DocumentProperties object, with properties that have already been loaded and synced. + /// + } + + DocumentProperties.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + DocumentProperties.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return DocumentProperties; + })(OfficeExtension.ClientObject); + Word.DocumentProperties = DocumentProperties; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.3] + var DocumentPropertyType = { + __proto__: null, + "string": "string", + "number": "number", + "date": "date", + "boolean": "boolean", + } + Word.DocumentPropertyType = DocumentPropertyType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// An enum that specifies an event's source. It can be local or remote (through coauthoring). [Api set: WordApi 1.5] + var EventSource = { + __proto__: null, + "local": "local", + "remote": "remote", + } + Word.EventSource = EventSource; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Provides information about the type of a raised event. [Api set: WordApi 1.3] + var EventType = { + __proto__: null, + "contentControlDeleted": "contentControlDeleted", + "contentControlSelectionChanged": "contentControlSelectionChanged", + "contentControlDataChanged": "contentControlDataChanged", + "contentControlAdded": "contentControlAdded", + "annotationAdded": "annotationAdded", + "annotationChanged": "annotationChanged", + "annotationDeleted": "annotationDeleted", + "commentDeleted": "commentDeleted", + "commentSelected": "commentSelected", + "commentDeselected": "commentDeselected", + "commentChanged": "commentChanged", + "commentAdded": "commentAdded", + "contentControlEntered": "contentControlEntered", + "contentControlExited": "contentControlExited", + "documentWordCountChanged": "documentWordCountChanged", + "paragraphAdded": "paragraphAdded", + "paragraphChanged": "paragraphChanged", + "paragraphDeleted": "paragraphDeleted", + "annotationClicked": "annotationClicked", + "annotationHovered": "annotationHovered", + "annotationInserted": "annotationInserted", + "annotationRemoved": "annotationRemoved", + } + Word.EventType = EventType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Field = (function(_super) { + __extends(Field, _super); + function Field() { + /// Represents a field. [Api set: WordApi 1.4] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the field's code instruction. [Api set: WordApi 1.4] + /// Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. [Api set: WordApi 1.5] + /// Gets the field's kind. [Api set: WordApi 1.5] + /// Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. [Api set: WordApi 1.5] + /// Gets the parent body of the field. [Api set: WordApi 1.4] + /// Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. [Api set: WordApi 1.4] + /// Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.4] + /// Gets the table that contains the field. Throws an `ItemNotFound` error if it is not contained in a table. [Api set: WordApi 1.4] + /// Gets the table cell that contains the field. Throws an `ItemNotFound` error if it is not contained in a table cell. [Api set: WordApi 1.4] + /// Gets the table cell that contains the field. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.4] + /// Gets the table that contains the field. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.4] + /// Gets the field's result data. [Api set: WordApi 1.4] + /// Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the field's type. [Api set: WordApi 1.5] + } + + Field.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Field.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.FieldUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Field object, with properties that have already been loaded and synced. + /// + } + Field.prototype.delete = function() { + /// + /// Deletes the field. [Api set: WordApi 1.5] + /// + /// + } + Field.prototype.getNext = function() { + /// + /// Gets the next field. Throws an `ItemNotFound` error if this field is the last one. [Api set: WordApi 1.4] + /// + /// + } + Field.prototype.getNextOrNullObject = function() { + /// + /// Gets the next field. If this field is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.4] + /// + /// + } + Field.prototype.select = function(selectionMode) { + /// + /// Selects the field. [Api set: WordApi 1.5] + /// + /// Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + /// + } + Field.prototype.updateResult = function() { + /// + /// Updates the field. [Api set: WordApi 1.5] + /// + /// + } + + Field.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Field.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Field; + })(OfficeExtension.ClientObject); + Word.Field = Field; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var FieldCollection = (function(_super) { + __extends(FieldCollection, _super); + function FieldCollection() { + /// Contains a collection of {@link Word.Field} objects. [Api set: WordApi 1.4] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + FieldCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + FieldCollection.prototype.getFirst = function() { + /// + /// Gets the first field in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi 1.4] + /// + /// + } + FieldCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first field in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.4] + /// + /// + } + FieldCollection.prototype.getByTypes = function(types) { + /// + /// Gets the Field object collection including the specified types of fields. [Api set: WordApi 1.5] + /// + /// Required. An array of field types. + /// + } + + FieldCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + FieldCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return FieldCollection; + })(OfficeExtension.ClientObject); + Word.FieldCollection = FieldCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Represents the kind of field. Indicates how the field works in relation to updating. [Api set: WordApi 1.5] + var FieldKind = { + __proto__: null, + "none": "none", + "hot": "hot", + "warm": "warm", + "cold": "cold", + } + Word.FieldKind = FieldKind; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Represents the type of Field. [Api set: WordApi 1.5] + var FieldType = { + __proto__: null, + "addin": "addin", + "addressBlock": "addressBlock", + "advance": "advance", + "ask": "ask", + "author": "author", + "autoText": "autoText", + "autoTextList": "autoTextList", + "barCode": "barCode", + "bibliography": "bibliography", + "bidiOutline": "bidiOutline", + "citation": "citation", + "comments": "comments", + "compare": "compare", + "createDate": "createDate", + "data": "data", + "database": "database", + "date": "date", + "displayBarcode": "displayBarcode", + "docProperty": "docProperty", + "docVariable": "docVariable", + "editTime": "editTime", + "embedded": "embedded", + "eq": "eq", + "expression": "expression", + "fileName": "fileName", + "fileSize": "fileSize", + "fillIn": "fillIn", + "formCheckbox": "formCheckbox", + "formDropdown": "formDropdown", + "formText": "formText", + "gotoButton": "gotoButton", + "greetingLine": "greetingLine", + "hyperlink": "hyperlink", + "if": "if", + "import": "import", + "include": "include", + "includePicture": "includePicture", + "includeText": "includeText", + "index": "index", + "info": "info", + "keywords": "keywords", + "lastSavedBy": "lastSavedBy", + "link": "link", + "listNum": "listNum", + "macroButton": "macroButton", + "mergeBarcode": "mergeBarcode", + "mergeField": "mergeField", + "mergeRec": "mergeRec", + "mergeSeq": "mergeSeq", + "next": "next", + "nextIf": "nextIf", + "noteRef": "noteRef", + "numChars": "numChars", + "numPages": "numPages", + "numWords": "numWords", + "ocx": "ocx", + "page": "page", + "pageRef": "pageRef", + "print": "print", + "printDate": "printDate", + "private": "private", + "quote": "quote", + "rd": "rd", + "ref": "ref", + "revNum": "revNum", + "saveDate": "saveDate", + "section": "section", + "sectionPages": "sectionPages", + "seq": "seq", + "set": "set", + "shape": "shape", + "skipIf": "skipIf", + "styleRef": "styleRef", + "subject": "subject", + "subscriber": "subscriber", + "symbol": "symbol", + "ta": "ta", + "tc": "tc", + "template": "template", + "time": "time", + "title": "title", + "toa": "toa", + "toc": "toc", + "userAddress": "userAddress", + "userInitials": "userInitials", + "userName": "userName", + "xe": "xe", + "empty": "empty", + "others": "others", + "undefined": "undefined", + } + Word.FieldType = FieldType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Font = (function(_super) { + __extends(Font, _super); + function Font() { + /// Represents a font. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. [Api set: WordApi 1.1] + /// Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. [Api set: WordApi 1.1] + /// Specifies 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] + /// Specifies a value that indicates whether the font has a hidden. True if the font is formatted as hidden text, otherwise, false. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies 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. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. [Api set: WordApi 1.1] + /// Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. [Api set: WordApi 1.1] + /// Specifies a value that represents the name of the font. [Api set: WordApi 1.1] + /// Specifies a value that represents the font size in points. [Api set: WordApi 1.1] + /// Specifies 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] + /// Specifies 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] + /// Specifies 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] + /// Specifies a value that indicates the font's underline type. 'None' if the font is not underlined. [Api set: WordApi 1.1] + } + + Font.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Font.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.FontUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Font object, with properties that have already been loaded and synced. + /// + } + + Font.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Font.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Font; + })(OfficeExtension.ClientObject); + Word.Font = Font; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.1] + var HeaderFooterType = { + __proto__: null, + "primary": "primary", + "firstPage": "firstPage", + "evenPages": "evenPages", + } + Word.HeaderFooterType = HeaderFooterType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi BETA (PREVIEW ONLY)] + var ImageFormat = { + __proto__: null, + "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", + } + Word.ImageFormat = ImageFormat; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var InlinePicture = (function(_super) { + __extends(InlinePicture, _super); + function InlinePicture() { + /// Represents an inline picture. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies a string that represents the alternative text associated with the inline image. [Api set: WordApi 1.1] + /// Specifies a string that contains the title for the inline image. [Api set: WordApi 1.1] + /// Specifies a number that describes the height of the inline image. [Api set: WordApi 1.1] + /// Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. [Api set: WordApi 1.1] + /// Gets the format of the inline image. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies a value that indicates whether the inline image retains its original proportions when you resize it. [Api set: WordApi 1.1] + /// Gets the parent paragraph that contains the inline image. [Api set: WordApi 1.2] + /// Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. [Api set: WordApi 1.1] + /// Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the table that contains the inline image. Throws an `ItemNotFound` error if it is not contained in a table. [Api set: WordApi 1.3] + /// Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it is not contained in a table cell. [Api set: WordApi 1.3] + /// Gets the table cell that contains the inline image. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the table that contains the inline image. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Specifies a number that describes the width of the inline image. [Api set: WordApi 1.1] + } + + InlinePicture.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + InlinePicture.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.InlinePictureUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing InlinePicture object, with properties that have already been loaded and synced. + /// + } + InlinePicture.prototype.delete = function() { + /// + /// Deletes the inline picture from the document. [Api set: WordApi 1.2] + /// + /// + } + InlinePicture.prototype.getBase64ImageSrc = function() { + /// + /// Gets the Base64-encoded string representation of the inline image. [Api set: WordApi 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + InlinePicture.prototype.getNext = function() { + /// + /// Gets the next inline image. Throws an `ItemNotFound` error if this inline image is the last one. [Api set: WordApi 1.3] + /// + /// + } + InlinePicture.prototype.getNextOrNullObject = function() { + /// + /// Gets the next inline image. If this inline image is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + InlinePicture.prototype.getRange = function(rangeLocation) { + /// + /// Gets the picture, or the starting or ending point of the picture, as a range. [Api set: WordApi 1.3] + /// + /// Optional. The range location must be 'Whole', 'Start', or 'End'. + /// + } + InlinePicture.prototype.insertBreak = function(breakType, insertLocation) { + /// + /// Inserts a break at the specified location in the main document. [Api set: WordApi 1.2] + /// + /// Required. The break type to add. + /// Required. The value must be 'Before' or 'After'. + /// + } + InlinePicture.prototype.insertContentControl = function() { + /// + /// Wraps the inline picture with a rich text content control. [Api set: WordApi 1.1] + /// + /// + } + InlinePicture.prototype.insertFileFromBase64 = function(base64File, insertLocation) { + /// + /// Inserts a document at the specified location. [Api set: WordApi 1.2] + /// + /// Required. The Base64-encoded content of a .docx file. + /// Required. The value must be 'Before' or 'After'. + /// + } + InlinePicture.prototype.insertHtml = function(html, insertLocation) { + /// + /// Inserts HTML at the specified location. [Api set: WordApi 1.2] + /// + /// Required. The HTML to be inserted. + /// Required. The value must be 'Before' or 'After'. + /// + } + InlinePicture.prototype.insertInlinePictureFromBase64 = function(base64EncodedImage, insertLocation) { + /// + /// Inserts an inline picture at the specified location. [Api set: WordApi 1.2] + /// + /// Required. The Base64-encoded image to be inserted. + /// Required. The value must be 'Replace', 'Before', or 'After'. + /// + } + InlinePicture.prototype.insertOoxml = function(ooxml, insertLocation) { + /// + /// Inserts OOXML at the specified location. [Api set: WordApi 1.2] + /// + /// Required. The OOXML to be inserted. + /// Required. The value must be 'Before' or 'After'. + /// + } + InlinePicture.prototype.insertParagraph = function(paragraphText, insertLocation) { + /// + /// Inserts a paragraph at the specified location. [Api set: WordApi 1.2] + /// + /// Required. The paragraph text to be inserted. + /// Required. The value must be 'Before' or 'After'. + /// + } + InlinePicture.prototype.insertText = function(text, insertLocation) { + /// + /// Inserts text at the specified location. [Api set: WordApi 1.2] + /// + /// Required. Text to be inserted. + /// Required. The value must be 'Before' or 'After'. + /// + } + InlinePicture.prototype.select = function(selectionMode) { + /// + /// Selects the inline picture. This causes Word to scroll to the selection. [Api set: WordApi 1.2] + /// + /// Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + /// + } + + InlinePicture.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + InlinePicture.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return InlinePicture; + })(OfficeExtension.ClientObject); + Word.InlinePicture = InlinePicture; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var InlinePictureCollection = (function(_super) { + __extends(InlinePictureCollection, _super); + function InlinePictureCollection() { + /// Contains a collection of {@link Word.InlinePicture} objects. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + InlinePictureCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + InlinePictureCollection.prototype.getFirst = function() { + /// + /// Gets the first inline image in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi 1.3] + /// + /// + } + InlinePictureCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first inline image in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + + InlinePictureCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + InlinePictureCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return InlinePictureCollection; + })(OfficeExtension.ClientObject); + Word.InlinePictureCollection = InlinePictureCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var InsertFileOptions = (function() { + function InsertFileOptions() { + /// Specifies the options to determine what to copy when inserting a file. [Api set: WordApi 1.5] + /// Represents whether the change tracking mode status from the source document should be imported. [Api set: WordApi 1.5] + /// Represents whether the custom properties from the source document should be imported. Overwrites existing properties with the same name. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Represents whether the custom XML parts from the source document should be imported. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Represents whether the page color and other background information from the source document should be imported. [Api set: WordApi 1.5] + /// Represents whether the paragraph spacing from the source document should be imported. [Api set: WordApi 1.5] + /// Represents whether the styles from the source document should be imported. [Api set: WordApi 1.5] + /// Represents whether the theme from the source document should be imported. [Api set: WordApi 1.5] + } + return InsertFileOptions; + })(); + Interfaces.InsertFileOptions.__proto__ = null; + Interfaces.InsertFileOptions = InsertFileOptions; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// The insertion location types. [Api set: WordApi 1.1] + var InsertLocation = { + __proto__: null, + "before": "before", + "after": "after", + "start": "start", + "end": "end", + "replace": "replace", + } + Word.InsertLocation = InsertLocation; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Represents the line style for the specified border. [Api set: WordApi BETA (PREVIEW ONLY)] + var LineStyle = { + __proto__: null, + "dashDot": "dashDot", + "dashDotDot": "dashDotDot", + "dashDotStroked": "dashDotStroked", + "dashLargeGap": "dashLargeGap", + "dashSmallGap": "dashSmallGap", + "dot": "dot", + "double": "double", + "doubleWavy": "doubleWavy", + "emboss3D": "emboss3D", + "engrave3D": "engrave3D", + "inset": "inset", + "mixed": "mixed", + "none": "none", + "outset": "outset", + "single": "single", + "singleWavy": "singleWavy", + "thickThinLargeGap": "thickThinLargeGap", + "thickThinMedGap": "thickThinMedGap", + "thickThinSmallGap": "thickThinSmallGap", + "thinThickLargeGap": "thinThickLargeGap", + "thinThickMedGap": "thinThickMedGap", + "thinThickSmallGap": "thinThickSmallGap", + "thinThickThinLargeGap": "thinThickThinLargeGap", + "thinThickThinMedGap": "thinThickThinMedGap", + "thinThickThinSmallGap": "thinThickThinSmallGap", + "triple": "triple", + } + Word.LineStyle = LineStyle; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Represents the width of a style's border. [Api set: WordApi BETA (PREVIEW ONLY)] + var LineWidth = { + __proto__: null, + "none": "none", + "pt025": "pt025", + "pt050": "pt050", + "pt075": "pt075", + "pt100": "pt100", + "pt150": "pt150", + "pt225": "pt225", + "pt300": "pt300", + "pt450": "pt450", + "pt600": "pt600", + "mixed": "mixed", + } + Word.LineWidth = LineWidth; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var List = (function(_super) { + __extends(List, _super); + function List() { + /// Contains a collection of {@link Word.Paragraph} objects. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the list's id. [Api set: WordApi 1.3] + /// 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. [Api set: WordApi 1.3] + /// Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. [Api set: WordApi 1.3] + /// Gets paragraphs in the list. Read-only. [Api set: WordApi 1.3] + } + + List.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + List.prototype.getLevelFont = function(level) { + /// + /// Gets the font of the bullet, number, or picture at the specified level in the list. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// Required. The level in the list. + /// + } + List.prototype.getLevelParagraphs = function(level) { + /// + /// Gets the paragraphs that occur at the specified level in the list. [Api set: WordApi 1.3] + /// + /// Required. The level in the list. + /// + } + List.prototype.getLevelPicture = function(level) { + /// + /// Gets the Base64-encoded string representation of the picture at the specified level in the list. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// Required. The level in the list. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + List.prototype.getLevelString = function(level) { + /// + /// Gets the bullet, number, or picture at the specified level as a string. [Api set: WordApi 1.3] + /// + /// Required. The level in the list. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + List.prototype.insertParagraph = function(paragraphText, insertLocation) { + /// + /// Inserts a paragraph at the specified location. [Api set: WordApi 1.3] + /// + /// Required. The paragraph text to be inserted. + /// Required. The value must be 'Start', 'End', 'Before', or 'After'. + /// + } + List.prototype.resetLevelFont = function(level, resetFontName) { + /// + /// Resets the font of the bullet, number, or picture at the specified level in the list. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// Required. The level in the list. + /// Optional. Indicates whether to reset the font name. Default is false that indicates the font name is kept unchanged. + /// + } + List.prototype.setLevelAlignment = function(level, alignment) { + /// + /// Sets the alignment of the bullet, number, or picture at the specified level in the list. [Api set: WordApi 1.3] + /// + /// Required. The level in the list. + /// Required. The level alignment that must be 'Left', 'Centered', or 'Right'. + /// + } + List.prototype.setLevelBullet = function(level, listBullet, charCode, fontName) { + /// + /// 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] + /// + /// Required. The level in the list. + /// Required. The bullet. + /// Optional. The bullet character's code value. Used only if the bullet is 'Custom'. + /// Optional. The bullet's font name. Used only if the bullet is 'Custom'. + /// + } + List.prototype.setLevelIndents = function(level, textIndent, bulletNumberPictureIndent) { + /// + /// Sets the two indents of the specified level in the list. [Api set: WordApi 1.3] + /// + /// Required. The level in the list. + /// Required. The text indent in points. It is the same as paragraph left indent. + /// Required. The relative indent, in points, of the bullet, number, or picture. It is the same as paragraph first line indent. + /// + } + List.prototype.setLevelNumbering = function(level, listNumbering, formatString) { + /// + /// Sets the numbering format at the specified level in the list. [Api set: WordApi 1.3] + /// + /// Required. The level in the list. + /// Required. The ordinal format. + /// 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. + /// + } + List.prototype.setLevelPicture = function(level, base64EncodedImage) { + /// + /// Sets the picture at the specified level in the list. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// Required. The level in the list. + /// Optional. The Base64-encoded image to be set. If not given, the default picture is set. + /// + } + List.prototype.setLevelStartingNumber = function(level, startingNumber) { + /// + /// Sets the starting number at the specified level in the list. Default value is 1. [Api set: WordApi 1.3] + /// + /// Required. The level in the list. + /// Required. The number to start with. + /// + } + + List.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + List.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return List; + })(OfficeExtension.ClientObject); + Word.List = List; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi BETA (PREVIEW ONLY)] + var ListBuiltInNumberStyle = { + __proto__: null, + "none": "none", + "arabic": "arabic", + "upperRoman": "upperRoman", + "lowerRoman": "lowerRoman", + "upperLetter": "upperLetter", + "lowerLetter": "lowerLetter", + "ordinal": "ordinal", + "cardinalText": "cardinalText", + "ordinalText": "ordinalText", + "kanji": "kanji", + "kanjiDigit": "kanjiDigit", + "aiueoHalfWidth": "aiueoHalfWidth", + "irohaHalfWidth": "irohaHalfWidth", + "arabicFullWidth": "arabicFullWidth", + "kanjiTraditional": "kanjiTraditional", + "kanjiTraditional2": "kanjiTraditional2", + "numberInCircle": "numberInCircle", + "aiueo": "aiueo", + "iroha": "iroha", + "arabicLZ": "arabicLZ", + "bullet": "bullet", + "ganada": "ganada", + "chosung": "chosung", + "gbnum1": "gbnum1", + "gbnum2": "gbnum2", + "gbnum3": "gbnum3", + "gbnum4": "gbnum4", + "zodiac1": "zodiac1", + "zodiac2": "zodiac2", + "zodiac3": "zodiac3", + "tradChinNum1": "tradChinNum1", + "tradChinNum2": "tradChinNum2", + "tradChinNum3": "tradChinNum3", + "tradChinNum4": "tradChinNum4", + "simpChinNum1": "simpChinNum1", + "simpChinNum2": "simpChinNum2", + "simpChinNum3": "simpChinNum3", + "simpChinNum4": "simpChinNum4", + "hanjaRead": "hanjaRead", + "hanjaReadDigit": "hanjaReadDigit", + "hangul": "hangul", + "hanja": "hanja", + "hebrew1": "hebrew1", + "arabic1": "arabic1", + "hebrew2": "hebrew2", + "arabic2": "arabic2", + "hindiLetter1": "hindiLetter1", + "hindiLetter2": "hindiLetter2", + "hindiArabic": "hindiArabic", + "hindiCardinalText": "hindiCardinalText", + "thaiLetter": "thaiLetter", + "thaiArabic": "thaiArabic", + "thaiCardinalText": "thaiCardinalText", + "vietCardinalText": "vietCardinalText", + "lowercaseRussian": "lowercaseRussian", + "uppercaseRussian": "uppercaseRussian", + "lowercaseGreek": "lowercaseGreek", + "uppercaseGreek": "uppercaseGreek", + "arabicLZ2": "arabicLZ2", + "arabicLZ3": "arabicLZ3", + "arabicLZ4": "arabicLZ4", + "lowercaseTurkish": "lowercaseTurkish", + "uppercaseTurkish": "uppercaseTurkish", + "lowercaseBulgarian": "lowercaseBulgarian", + "uppercaseBulgarian": "uppercaseBulgarian", + "pictureBullet": "pictureBullet", + "legal": "legal", + "legalLZ": "legalLZ", + } + Word.ListBuiltInNumberStyle = ListBuiltInNumberStyle; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.3] + var ListBullet = { + __proto__: null, + "custom": "custom", + "solid": "solid", + "hollow": "hollow", + "square": "square", + "diamonds": "diamonds", + "arrow": "arrow", + "checkmark": "checkmark", + } + Word.ListBullet = ListBullet; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var ListCollection = (function(_super) { + __extends(ListCollection, _super); + function ListCollection() { + /// Contains a collection of {@link Word.List} objects. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + ListCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ListCollection.prototype.getById = function(id) { + /// + /// Gets a list by its identifier. Throws an `ItemNotFound` error if there isn't a list with the identifier in this collection. [Api set: WordApi 1.3] + /// + /// Required. A list identifier. + /// + } + ListCollection.prototype.getByIdOrNullObject = function(id) { + /// + /// Gets a list by its identifier. If there isn't a list with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// Required. A list identifier. + /// + } + ListCollection.prototype.getFirst = function() { + /// + /// Gets the first list in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi 1.3] + /// + /// + } + ListCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first list in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + ListCollection.prototype.getItem = function(id) { + /// + /// Gets a list object by its ID. [Api set: WordApi 1.3] + /// + /// The list's ID. + /// + } + + ListCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + ListCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return ListCollection; + })(OfficeExtension.ClientObject); + Word.ListCollection = ListCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var ListItem = (function(_super) { + __extends(ListItem, _super); + function ListItem() { + /// Represents the paragraph list item format. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the level of the item in the list. [Api set: WordApi 1.3] + /// Gets the list item bullet, number, or picture as a string. [Api set: WordApi 1.3] + /// Gets the list item order number in relation to its siblings. [Api set: WordApi 1.3] + } + + ListItem.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ListItem.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.ListItemUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ListItem object, with properties that have already been loaded and synced. + /// + } + ListItem.prototype.getAncestor = function(parentOnly) { + /// + /// Gets the list item parent, or the closest ancestor if the parent does not exist. Throws an `ItemNotFound` error if the list item has no ancestor. [Api set: WordApi 1.3] + /// + /// Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. + /// + } + ListItem.prototype.getAncestorOrNullObject = function(parentOnly) { + /// + /// Gets the list item parent, or the closest ancestor if the parent does not exist. If the list item has no ancestor, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. + /// + } + ListItem.prototype.getDescendants = function(directChildrenOnly) { + /// + /// Gets all descendant list items of the list item. [Api set: WordApi 1.3] + /// + /// Optional. Specifies only the list item's direct children will be returned. The default is false that indicates to get all descendant items. + /// + } + + ListItem.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + ListItem.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return ListItem; + })(OfficeExtension.ClientObject); + Word.ListItem = ListItem; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var ListLevel = (function(_super) { + __extends(ListLevel, _super); + function ListLevel() { + /// Represents a list level. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets a Font object that represents the character formatting of the specified object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the name of the style that's linked to the specified list level object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the number format for the specified list level. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the position (in points) of the number or bullet for the specified list level object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the number style for the list level object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the list level that must appear before the specified list level restarts numbering at 1. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the starting number for the specified list level object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the tab position for the specified list level object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the position (in points) for the second line of wrapping text for the specified list level object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the character inserted after the number for the specified list level. [Api set: WordApi BETA (PREVIEW ONLY)] + } + + ListLevel.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ListLevel.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.ListLevelUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ListLevel object, with properties that have already been loaded and synced. + /// + } + + ListLevel.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + ListLevel.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return ListLevel; + })(OfficeExtension.ClientObject); + Word.ListLevel = ListLevel; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var ListLevelCollection = (function(_super) { + __extends(ListLevelCollection, _super); + function ListLevelCollection() { + /// Contains a collection of {@link Word.ListLevel} objects. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + ListLevelCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ListLevelCollection.prototype.getFirst = function() { + /// + /// Gets the first list level in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + ListLevelCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first list level in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + + ListLevelCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + ListLevelCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return ListLevelCollection; + })(OfficeExtension.ClientObject); + Word.ListLevelCollection = ListLevelCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.3] + var ListLevelType = { + __proto__: null, + "bullet": "bullet", + "number": "number", + "picture": "picture", + } + Word.ListLevelType = ListLevelType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.3] + var ListNumbering = { + __proto__: null, + "none": "none", + "arabic": "arabic", + "upperRoman": "upperRoman", + "lowerRoman": "lowerRoman", + "upperLetter": "upperLetter", + "lowerLetter": "lowerLetter", + } + Word.ListNumbering = ListNumbering; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var ListTemplate = (function(_super) { + __extends(ListTemplate, _super); + function ListTemplate() { + /// Represents a ListTemplate. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets a ListLevels collection that represents all the levels for the specified ListTemplate. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies whether the specified ListTemplate object is outline numbered. [Api set: WordApi BETA (PREVIEW ONLY)] + } + + ListTemplate.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ListTemplate.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.ListTemplateUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ListTemplate object, with properties that have already been loaded and synced. + /// + } + + ListTemplate.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + ListTemplate.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return ListTemplate; + })(OfficeExtension.ClientObject); + Word.ListTemplate = ListTemplate; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.3] + var LocationRelation = { + __proto__: null, + "unrelated": "unrelated", + "equal": "equal", + "containsStart": "containsStart", + "containsEnd": "containsEnd", + "contains": "contains", + "insideStart": "insideStart", + "insideEnd": "insideEnd", + "inside": "inside", + "adjacentBefore": "adjacentBefore", + "overlapsBefore": "overlapsBefore", + "before": "before", + "adjacentAfter": "adjacentAfter", + "overlapsAfter": "overlapsAfter", + "after": "after", + } + Word.LocationRelation = LocationRelation; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var NoteItem = (function(_super) { + __extends(NoteItem, _super); + function NoteItem() { + /// Represents a footnote or endnote. [Api set: WordApi 1.5] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the body object of the note item. It's the portion of the text within the footnote or endnote. [Api set: WordApi 1.5] + /// Represents a footnote or endnote reference in the main document. [Api set: WordApi 1.5] + /// Represents the note item type: footnote or endnote. [Api set: WordApi 1.5] + } + + NoteItem.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + NoteItem.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.NoteItemUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing NoteItem object, with properties that have already been loaded and synced. + /// + } + NoteItem.prototype.delete = function() { + /// + /// Deletes the note item. [Api set: WordApi 1.5] + /// + /// + } + NoteItem.prototype.getNext = function() { + /// + /// Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. [Api set: WordApi 1.5] + /// + /// + } + NoteItem.prototype.getNextOrNullObject = function() { + /// + /// Gets the next note item of the same type. If this note item is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.5] + /// + /// + } + + NoteItem.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + NoteItem.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return NoteItem; + })(OfficeExtension.ClientObject); + Word.NoteItem = NoteItem; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var NoteItemCollection = (function(_super) { + __extends(NoteItemCollection, _super); + function NoteItemCollection() { + /// Contains a collection of {@link Word.NoteItem} objects. [Api set: WordApi 1.5] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + NoteItemCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + NoteItemCollection.prototype.getFirst = function() { + /// + /// Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi 1.5] + /// + /// + } + NoteItemCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first note item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.5] + /// + /// + } + + NoteItemCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + NoteItemCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return NoteItemCollection; + })(OfficeExtension.ClientObject); + Word.NoteItemCollection = NoteItemCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Note item type [Api set: WordApi 1.5] + var NoteItemType = { + __proto__: null, + "footnote": "footnote", + "endnote": "endnote", + } + Word.NoteItemType = NoteItemType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Represents the outline levels. [Api set: WordApi 1.5] + var OutlineLevel = { + __proto__: null, + "outlineLevel1": "outlineLevel1", + "outlineLevel2": "outlineLevel2", + "outlineLevel3": "outlineLevel3", + "outlineLevel4": "outlineLevel4", + "outlineLevel5": "outlineLevel5", + "outlineLevel6": "outlineLevel6", + "outlineLevel7": "outlineLevel7", + "outlineLevel8": "outlineLevel8", + "outlineLevel9": "outlineLevel9", + "outlineLevelBodyText": "outlineLevelBodyText", + } + Word.OutlineLevel = OutlineLevel; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Paragraph = (function(_super) { + __extends(Paragraph, _super); + function Paragraph() { + /// Represents a single paragraph in a selection, range, content control, or document body. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. [Api set: WordApi 1.1] + /// Gets the collection of content control objects in the paragraph. [Api set: WordApi 1.1] + /// Gets the collection of endnotes in the paragraph. [Api set: WordApi 1.5] + /// Gets the collection of fields in the paragraph. [Api set: WordApi 1.4] + /// Specifies 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] + /// 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] + /// Gets the collection of footnotes in the paragraph. [Api set: WordApi 1.5] + /// Gets the collection of InlinePicture objects in the paragraph. The collection does not include floating images. [Api set: WordApi 1.1] + /// Indicates the paragraph is the last one inside its parent body. [Api set: WordApi 1.3] + /// Checks whether the paragraph is a list item. [Api set: WordApi 1.3] + /// Specifies the left indent value, in points, for the paragraph. [Api set: WordApi 1.1] + /// Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. [Api set: WordApi 1.1] + /// Specifies the amount of spacing, in grid lines, after the paragraph. [Api set: WordApi 1.1] + /// Specifies the amount of spacing, in grid lines, before the paragraph. [Api set: WordApi 1.1] + /// Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph is not in a list. [Api set: WordApi 1.3] + /// Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph is not part of a list. [Api set: WordApi 1.3] + /// Gets the ListItem for the paragraph. If the paragraph is not part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the List to which this paragraph belongs. If the paragraph is not in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Specifies the outline level for the paragraph. [Api set: WordApi 1.1] + /// Gets the parent body of the paragraph. [Api set: WordApi 1.3] + /// Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. [Api set: WordApi 1.1] + /// Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table. [Api set: WordApi 1.3] + /// Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table cell. [Api set: WordApi 1.3] + /// Gets the table cell that contains the paragraph. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the table that contains the paragraph. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Specifies the right indent value, in points, for the paragraph. [Api set: WordApi 1.1] + /// Specifies the spacing, in points, after the paragraph. [Api set: WordApi 1.1] + /// Specifies the spacing, in points, before the paragraph. [Api set: WordApi 1.1] + /// Specifies 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] + /// Specifies 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] + /// Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. [Api set: WordApi 1.3] + /// Gets the text of the paragraph. [Api set: WordApi 1.1] + /// Gets a string that represents the paragraph identifier in the current session. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when new comments are added. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a comment or its reply is changed. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when comments are deleted. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a comment is deselected. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a comment is selected. [Api set: WordApi BETA (PREVIEW ONLY)] + } + + Paragraph.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Paragraph.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.ParagraphUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Paragraph object, with properties that have already been loaded and synced. + /// + } + Paragraph.prototype.attachToList = function(listId, level) { + /// + /// 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] + /// + /// Required. The ID of an existing list. + /// Required. The level in the list. + /// + } + Paragraph.prototype.clear = function() { + /// + /// Clears the contents of the paragraph object. The user can perform the undo operation on the cleared content. [Api set: WordApi 1.1] + /// + /// + } + Paragraph.prototype.delete = function() { + /// + /// Deletes the paragraph and its content from the document. [Api set: WordApi 1.1] + /// + /// + } + Paragraph.prototype.detachFromList = function() { + /// + /// Moves this paragraph out of its list, if the paragraph is a list item. [Api set: WordApi 1.3] + /// + /// + } + Paragraph.prototype.getAnnotations = function() { + /// + /// Gets annotations set on this Paragraph object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + Paragraph.prototype.getComments = function() { + /// + /// Gets comments associated with the paragraph. [Api set: WordApi 1.4] + /// + /// + } + Paragraph.prototype.getContentControls = function(options) { + /// + /// Gets the currently supported content controls in the paragraph. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. [Api set: WordApi 1.5] + /// + /// Optional. Options that define which content controls are returned. + /// + } + Paragraph.prototype.getHtml = function() { + /// + /// 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 on the web, 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] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Paragraph.prototype.getNext = function() { + /// + /// Gets the next paragraph. Throws an `ItemNotFound` error if the paragraph is the last one. [Api set: WordApi 1.3] + /// + /// + } + Paragraph.prototype.getNextOrNullObject = function() { + /// + /// Gets the next paragraph. If the paragraph is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + Paragraph.prototype.getOoxml = function() { + /// + /// Gets the Office Open XML (OOXML) representation of the paragraph object. [Api set: WordApi 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Paragraph.prototype.getPrevious = function() { + /// + /// Gets the previous paragraph. Throws an `ItemNotFound` error if the paragraph is the first one. [Api set: WordApi 1.3] + /// + /// + } + Paragraph.prototype.getPreviousOrNullObject = function() { + /// + /// Gets the previous paragraph. If the paragraph is the first one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + Paragraph.prototype.getRange = function(rangeLocation) { + /// + /// Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. [Api set: WordApi 1.3] + /// + /// Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + /// + } + Paragraph.prototype.getReviewedText = function(changeTrackingVersion) { + /// + /// Gets reviewed text based on ChangeTrackingVersion selection. [Api set: WordApi 1.4] + /// + /// Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Paragraph.prototype.getTextRanges = function(endingMarks, trimSpacing) { + /// + /// Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. [Api set: WordApi 1.3] + /// + /// Required. The punctuation marks and/or other ending marks as an array of strings. + /// 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. + /// + } + Paragraph.prototype.getTrackedChanges = function() { + /// + /// Gets the collection of the TrackedChange objects in the paragraph. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + Paragraph.prototype.insertAnnotations = function(annotations) { + /// + /// Inserts annotations on this Paragraph object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// Annotations to set. + /// An array of the inserted annotations identifiers. + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = []; + return result; + } + Paragraph.prototype.insertBreak = function(breakType, insertLocation) { + /// + /// Inserts a break at the specified location in the main document. [Api set: WordApi 1.1] + /// + /// Required. The break type to add to the document. + /// Required. The value must be 'Before' or 'After'. + /// + } + Paragraph.prototype.insertContentControl = function(contentControlType) { + /// + /// Wraps the Paragraph object with a content control. [Api set: WordApi 1.1] + /// + /// Optional. The content control type. The default is 'RichText'. + /// + } + Paragraph.prototype.insertFileFromBase64 = function(base64File, insertLocation) { + /// + /// Inserts a document into the paragraph at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The Base64-encoded content of a .docx file. + /// Required. The value must be 'Replace', 'Start', or 'End'. + /// + } + Paragraph.prototype.insertHtml = function(html, insertLocation) { + /// + /// Inserts HTML into the paragraph at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The HTML to be inserted in the paragraph. + /// Required. The value must be 'Replace', 'Start', or 'End'. + /// + } + Paragraph.prototype.insertInlinePictureFromBase64 = function(base64EncodedImage, insertLocation) { + /// + /// Inserts a picture into the paragraph at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The Base64-encoded image to be inserted. + /// Required. The value must be 'Replace', 'Start', or 'End'. + /// + } + Paragraph.prototype.insertOoxml = function(ooxml, insertLocation) { + /// + /// Inserts OOXML into the paragraph at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The OOXML to be inserted in the paragraph. + /// Required. The value must be 'Replace', 'Start', or 'End'. + /// + } + Paragraph.prototype.insertParagraph = function(paragraphText, insertLocation) { + /// + /// Inserts a paragraph at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The paragraph text to be inserted. + /// Required. The value must be 'Before' or 'After'. + /// + } + Paragraph.prototype.insertTable = function(rowCount, columnCount, insertLocation, values) { + /// + /// Inserts a table with the specified number of rows and columns. [Api set: WordApi 1.3] + /// + /// Required. The number of rows in the table. + /// Required. The number of columns in the table. + /// Required. The value must be 'Before' or 'After'. + /// Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + /// + } + Paragraph.prototype.insertText = function(text, insertLocation) { + /// + /// Inserts text into the paragraph at the specified location. [Api set: WordApi 1.1] + /// + /// Required. Text to be inserted. + /// Required. The value must be 'Replace', 'Start', or 'End'. + /// + } + Paragraph.prototype.search = function(searchText, searchOptions) { + /// + /// 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] + /// + /// Required. The search text. + /// Optional. Options for the search. + /// + } + Paragraph.prototype.select = function(selectionMode) { + /// + /// Selects and navigates the Word UI to the paragraph. [Api set: WordApi 1.1] + /// + /// Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + /// + } + Paragraph.prototype.split = function(delimiters, trimDelimiters, trimSpacing) { + /// + /// Splits the paragraph into child ranges by using delimiters. [Api set: WordApi 1.3] + /// + /// Required. The delimiters as an array of strings. + /// 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. + /// 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. + /// + } + Paragraph.prototype.startNewList = function() { + /// + /// Starts a new list with this paragraph. Fails if the paragraph is already a list item. [Api set: WordApi 1.3] + /// + /// + } + Paragraph.prototype.onCommentAdded = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Paragraph.prototype.onCommentChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Paragraph.prototype.onCommentDeleted = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Paragraph.prototype.onCommentDeselected = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Paragraph.prototype.onCommentSelected = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + Paragraph.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Paragraph.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Paragraph; + })(OfficeExtension.ClientObject); + Word.Paragraph = Paragraph; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ParagraphAddedEventArgs = (function() { + function ParagraphAddedEventArgs() { + /// Provides information about the paragraphs that raised the paragraphAdded event. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The source of the event. It can be local or remote (through coauthoring). [Api set: WordApi BETA (PREVIEW ONLY)] + /// The event type. See Word.EventType for details. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the unique IDs of the involved paragraphs. [Api set: WordApi BETA (PREVIEW ONLY)] + } + return ParagraphAddedEventArgs; + })(); + Interfaces.ParagraphAddedEventArgs.__proto__ = null; + Interfaces.ParagraphAddedEventArgs = ParagraphAddedEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ParagraphChangedEventArgs = (function() { + function ParagraphChangedEventArgs() { + /// Provides information about the paragraphs that raised the paragraphChanged event. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The source of the event. It can be local or remote (through coauthoring). [Api set: WordApi BETA (PREVIEW ONLY)] + /// The event type. See Word.EventType for details. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the unique IDs of the involved paragraphs. [Api set: WordApi BETA (PREVIEW ONLY)] + } + return ParagraphChangedEventArgs; + })(); + Interfaces.ParagraphChangedEventArgs.__proto__ = null; + Interfaces.ParagraphChangedEventArgs = ParagraphChangedEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var ParagraphCollection = (function(_super) { + __extends(ParagraphCollection, _super); + function ParagraphCollection() { + /// Contains a collection of {@link Word.Paragraph} objects. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + ParagraphCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ParagraphCollection.prototype.getFirst = function() { + /// + /// Gets the first paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. [Api set: WordApi 1.3] + /// + /// + } + ParagraphCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + ParagraphCollection.prototype.getLast = function() { + /// + /// Gets the last paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. [Api set: WordApi 1.3] + /// + /// + } + ParagraphCollection.prototype.getLastOrNullObject = function() { + /// + /// Gets the last paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + + ParagraphCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + ParagraphCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return ParagraphCollection; + })(OfficeExtension.ClientObject); + Word.ParagraphCollection = ParagraphCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ParagraphDeletedEventArgs = (function() { + function ParagraphDeletedEventArgs() { + /// Provides information about the paragraphs that raised the paragraphDeleted event. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The source of the event. It can be local or remote (through coauthoring). [Api set: WordApi BETA (PREVIEW ONLY)] + /// The event type. See Word.EventType for details. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the unique IDs of the involved paragraphs. [Api set: WordApi BETA (PREVIEW ONLY)] + } + return ParagraphDeletedEventArgs; + })(); + Interfaces.ParagraphDeletedEventArgs.__proto__ = null; + Interfaces.ParagraphDeletedEventArgs = ParagraphDeletedEventArgs; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var ParagraphFormat = (function(_super) { + __extends(ParagraphFormat, _super); + function ParagraphFormat() { + /// Represents a style of paragraph in a document. [Api set: WordApi 1.5] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the alignment for the specified paragraphs. [Api set: WordApi 1.5] + /// Specifies 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.5] + /// Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. [Api set: WordApi 1.5] + /// Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. [Api set: WordApi 1.5] + /// Specifies the left indent. [Api set: WordApi 1.5] + /// Specifies the line spacing (in points) for the specified paragraphs. [Api set: WordApi 1.5] + /// Specifies the amount of spacing (in gridlines) after the specified paragraphs. [Api set: WordApi 1.5] + /// Specifies the amount of spacing (in gridlines) before the specified paragraphs. [Api set: WordApi 1.5] + /// Specifies whether left and right indents are the same width. [Api set: WordApi 1.5] + /// Specifies the outline level for the specified paragraphs. [Api set: WordApi 1.5] + /// Specifies the right indent (in points) for the specified paragraphs. [Api set: WordApi 1.5] + /// Specifies the amount of spacing (in points) after the specified paragraph or text column. [Api set: WordApi 1.5] + /// Specifies the spacing (in points) before the specified paragraphs. [Api set: WordApi 1.5] + /// Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. [Api set: WordApi 1.5] + } + + ParagraphFormat.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ParagraphFormat.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.ParagraphFormatUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ParagraphFormat object, with properties that have already been loaded and synced. + /// + } + + ParagraphFormat.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + ParagraphFormat.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return ParagraphFormat; + })(OfficeExtension.ClientObject); + Word.ParagraphFormat = ParagraphFormat; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Range = (function(_super) { + __extends(Range, _super); + function Range() { + /// Represents a contiguous area in a document. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the collection of content control objects in the range. [Api set: WordApi 1.1] + /// Gets the collection of endnotes in the range. [Api set: WordApi 1.5] + /// Gets the collection of field objects in the range. [Api set: WordApi 1.4] + /// 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] + /// Gets the collection of footnotes in the range. [Api set: WordApi 1.5] + /// 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] + /// Gets the collection of inline picture objects in the range. [Api set: WordApi 1.2] + /// Checks whether the range length is zero. [Api set: WordApi 1.3] + /// Gets the collection of list objects in the range. [Api set: WordApi 1.3] + /// Gets the collection of paragraph objects in the range. **Important**: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this range are not returned. From requirement set 1.3, paragraphs in such tables are also returned. [Api set: WordApi 1.1] + /// Gets the parent body of the range. [Api set: WordApi 1.3] + /// Gets the content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. [Api set: WordApi 1.1] + /// Gets the content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the table that contains the range. Throws an `ItemNotFound` error if it is not contained in a table. [Api set: WordApi 1.3] + /// Gets the table cell that contains the range. Throws an `ItemNotFound` error if it is not contained in a table cell. [Api set: WordApi 1.3] + /// Gets the table cell that contains the range. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the table that contains the range. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Specifies 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] + /// Specifies 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] + /// Gets the collection of table objects in the range. [Api set: WordApi 1.3] + /// Gets the text of the range. [Api set: WordApi 1.1] + /// Occurs when new comments are added. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a comment or its reply is changed. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a comment is deselected. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Occurs when a comment is selected. [Api set: WordApi BETA (PREVIEW ONLY)] + } + + Range.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Range.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.RangeUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Range object, with properties that have already been loaded and synced. + /// + } + Range.prototype.clear = function() { + /// + /// Clears the contents of the range object. The user can perform the undo operation on the cleared content. [Api set: WordApi 1.1] + /// + /// + } + Range.prototype.compareLocationWith = function(range) { + /// + /// Compares this range's location with another range's location. [Api set: WordApi 1.3] + /// + /// Required. The range to compare with this range. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Range.prototype.delete = function() { + /// + /// Deletes the range and its content from the document. [Api set: WordApi 1.1] + /// + /// + } + Range.prototype.expandTo = function(range) { + /// + /// Returns a new range that extends from this range in either direction to cover another range. This range is not changed. Throws an `ItemNotFound` error if the two ranges do not have a union. [Api set: WordApi 1.3] + /// + /// Required. Another range. + /// + } + Range.prototype.expandToOrNullObject = function(range) { + /// + /// Returns a new range that extends from this range in either direction to cover another range. This range is not changed. If the two ranges do not have a union, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// Required. Another range. + /// + } + Range.prototype.getBookmarks = function(includeHidden, includeAdjacent) { + /// + /// 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 1.4] + /// + /// Optional. Indicates whether to include hidden bookmarks. Default is false which indicates that the hidden bookmarks are excluded. + /// Optional. Indicates whether to include bookmarks that are adjacent to the range. Default is false which indicates that the adjacent bookmarks are excluded. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = []; + return result; + } + Range.prototype.getComments = function() { + /// + /// Gets comments associated with the range. [Api set: WordApi 1.4] + /// + /// + } + Range.prototype.getContentControls = function(options) { + /// + /// Gets the currently supported content controls in the range. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. Make sure that your add-in respects it and is ready to handle new content control types. [Api set: WordApi 1.5] + /// + /// Optional. Options that define which content controls are returned. + /// + } + Range.prototype.getHtml = function() { + /// + /// 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 on the web, 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] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Range.prototype.getHyperlinkRanges = function() { + /// + /// Gets hyperlink child ranges within the range. [Api set: WordApi 1.3] + /// + /// + } + Range.prototype.getNextTextRange = function(endingMarks, trimSpacing) { + /// + /// Gets the next text range by using punctuation marks and/or other ending marks. Throws an `ItemNotFound` error if this text range is the last one. [Api set: WordApi 1.3] + /// + /// Required. The punctuation marks and/or other ending marks as an array of strings. + /// 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. + /// + } + Range.prototype.getNextTextRangeOrNullObject = function(endingMarks, trimSpacing) { + /// + /// Gets the next text range by using punctuation marks and/or other ending marks. If this text range is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// Required. The punctuation marks and/or other ending marks as an array of strings. + /// 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. + /// + } + Range.prototype.getOoxml = function() { + /// + /// Gets the OOXML representation of the range object. [Api set: WordApi 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Range.prototype.getRange = function(rangeLocation) { + /// + /// Clones the range, or gets the starting or ending point of the range as a new range. [Api set: WordApi 1.3] + /// + /// Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + /// + } + Range.prototype.getReviewedText = function(changeTrackingVersion) { + /// + /// Gets reviewed text based on ChangeTrackingVersion selection. [Api set: WordApi 1.4] + /// + /// Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = ''; + return result; + } + Range.prototype.getTextRanges = function(endingMarks, trimSpacing) { + /// + /// Gets the text child ranges in the range by using punctuation marks and/or other ending marks. [Api set: WordApi 1.3] + /// + /// Required. The punctuation marks and/or other ending marks as an array of strings. + /// 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. + /// + } + Range.prototype.getTrackedChanges = function() { + /// + /// Gets the collection of the TrackedChange objects in the range. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + Range.prototype.insertBookmark = function(name) { + /// + /// Inserts a bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first. [Api set: WordApi 1.4] + /// + /// Required. The bookmark name, which is case-insensitive. If the name starts with an underscore character, the bookmark is an hidden one. + /// + } + Range.prototype.insertBreak = function(breakType, insertLocation) { + /// + /// Inserts a break at the specified location in the main document. [Api set: WordApi 1.1] + /// + /// Required. The break type to add. + /// Required. The value must be 'Before' or 'After'. + /// + } + Range.prototype.insertComment = function(commentText) { + /// + /// Insert a comment on the range. [Api set: WordApi 1.4] + /// + /// Required. The comment text to be inserted. + /// comment object + } + Range.prototype.insertContentControl = function(contentControlType) { + /// + /// Wraps the Range object with a content control. [Api set: WordApi 1.1] + /// + /// Optional. The content control type. The default is 'RichText'. + /// + } + Range.prototype.insertEndnote = function(insertText) { + /// + /// Inserts an endnote. The endnote reference is placed after the range. [Api set: WordApi 1.5] + /// + /// Optional. Text to be inserted into the endnote body. The default is "". + /// + } + Range.prototype.insertField = function(insertLocation, fieldType, text, removeFormatting) { + /// + /// Inserts a field at the specified location. [Api set: WordApi 1.5] + /// + /// Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + /// Optional. Can be any FieldType constant. The default value is Empty. + /// Optional. Additional properties or options if needed for specified field type. + /// Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. + /// + } + Range.prototype.insertFileFromBase64 = function(base64File, insertLocation) { + /// + /// Inserts a document at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The Base64-encoded content of a .docx file. + /// Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + /// + } + Range.prototype.insertFootnote = function(insertText) { + /// + /// Inserts a footnote. The footnote reference is placed after the range. [Api set: WordApi 1.5] + /// + /// Optional. Text to be inserted into the footnote body. The default is "". + /// + } + Range.prototype.insertHtml = function(html, insertLocation) { + /// + /// Inserts HTML at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The HTML to be inserted. + /// Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + /// + } + Range.prototype.insertInlinePictureFromBase64 = function(base64EncodedImage, insertLocation) { + /// + /// Inserts a picture at the specified location. [Api set: WordApi 1.2] + /// + /// Required. The Base64-encoded image to be inserted. + /// Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + /// + } + Range.prototype.insertOoxml = function(ooxml, insertLocation) { + /// + /// Inserts OOXML at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The OOXML to be inserted. + /// Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + /// + } + Range.prototype.insertParagraph = function(paragraphText, insertLocation) { + /// + /// Inserts a paragraph at the specified location. [Api set: WordApi 1.1] + /// + /// Required. The paragraph text to be inserted. + /// Required. The value must be 'Before' or 'After'. + /// + } + Range.prototype.insertTable = function(rowCount, columnCount, insertLocation, values) { + /// + /// Inserts a table with the specified number of rows and columns. [Api set: WordApi 1.3] + /// + /// Required. The number of rows in the table. + /// Required. The number of columns in the table. + /// Required. The value must be 'Before' or 'After'. + /// Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + /// + } + Range.prototype.insertText = function(text, insertLocation) { + /// + /// Inserts text at the specified location. [Api set: WordApi 1.1] + /// + /// Required. Text to be inserted. + /// Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + /// + } + Range.prototype.intersectWith = function(range) { + /// + /// Returns a new range as the intersection of this range with another range. This range is not changed. Throws an `ItemNotFound` error if the two ranges are not overlapped or adjacent. [Api set: WordApi 1.3] + /// + /// Required. Another range. + /// + } + Range.prototype.intersectWithOrNullObject = function(range) { + /// + /// Returns a new range as the intersection of this range with another range. This range is not changed. If the two ranges are not overlapped or adjacent, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// Required. Another range. + /// + } + Range.prototype.search = function(searchText, searchOptions) { + /// + /// 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] + /// + /// Required. The search text. + /// Optional. Options for the search. + /// + } + Range.prototype.select = function(selectionMode) { + /// + /// Selects and navigates the Word UI to the range. [Api set: WordApi 1.1] + /// + /// Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + /// + } + Range.prototype.split = function(delimiters, multiParagraphs, trimDelimiters, trimSpacing) { + /// + /// Splits the range into child ranges by using delimiters. [Api set: WordApi 1.3] + /// + /// Required. The delimiters as an array of strings. + /// 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. + /// 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. + /// 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. + /// + } + Range.prototype.onCommentAdded = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Range.prototype.onCommentChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Range.prototype.onCommentDeselected = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Range.prototype.onCommentSelected = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the comments that raised the comment event. + /// + var eventInfo = new Word.Interfaces.CommentEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + Range.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Range.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Range; + })(OfficeExtension.ClientObject); + Word.Range = Range; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var RangeCollection = (function(_super) { + __extends(RangeCollection, _super); + function RangeCollection() { + /// Contains a collection of {@link Word.Range} objects. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + RangeCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + RangeCollection.prototype.getFirst = function() { + /// + /// Gets the first range in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi 1.3] + /// + /// + } + RangeCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first range in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + + RangeCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + RangeCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return RangeCollection; + })(OfficeExtension.ClientObject); + Word.RangeCollection = RangeCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.3] + var RangeLocation = { + __proto__: null, + "whole": "whole", + "start": "start", + "end": "end", + "before": "before", + "after": "after", + "content": "content", + } + Word.RangeLocation = RangeLocation; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Specifies the save behavior for `Document.save`. [Api set: WordApi 1.1] + var SaveBehavior = { + __proto__: null, + "save": "save", + "prompt": "prompt", + } + Word.SaveBehavior = SaveBehavior; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var SearchOptions = (function(_super) { + __extends(SearchOptions, _super); + function SearchOptions() { + /// Specifies the options to be included in a search operation. To learn more about how to use search options in the Word JavaScript APIs, read {@link https://docs.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies 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] + /// Specifies 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] + /// Specifies 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] + /// Specifies 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] + /// Specifies 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] + /// Specifies 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] + /// Specifies 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] + } + + SearchOptions.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + SearchOptions.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.SearchOptionsUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing SearchOptions object, with properties that have already been loaded and synced. + /// + } + + return SearchOptions; + })(OfficeExtension.ClientObject); + Word.SearchOptions = SearchOptions; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Section = (function(_super) { + __extends(Section, _super); + function Section() { + /// Represents a section in a Word document. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the body object of the section. This does not include the header/footer and other section metadata. [Api set: WordApi 1.1] + } + + Section.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Section.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.SectionUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Section object, with properties that have already been loaded and synced. + /// + } + Section.prototype.getFooter = function(type) { + /// + /// Gets one of the section's footers. [Api set: WordApi 1.1] + /// + /// Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + /// + } + Section.prototype.getHeader = function(type) { + /// + /// Gets one of the section's headers. [Api set: WordApi 1.1] + /// + /// Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + /// + } + Section.prototype.getNext = function() { + /// + /// Gets the next section. Throws an `ItemNotFound` error if this section is the last one. [Api set: WordApi 1.3] + /// + /// + } + Section.prototype.getNextOrNullObject = function() { + /// + /// Gets the next section. If this section is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + + Section.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Section.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Section; + })(OfficeExtension.ClientObject); + Word.Section = Section; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var SectionCollection = (function(_super) { + __extends(SectionCollection, _super); + function SectionCollection() { + /// Contains the collection of the document's {@link Word.Section} objects. [Api set: WordApi 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + SectionCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + SectionCollection.prototype.getFirst = function() { + /// + /// Gets the first section in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi 1.3] + /// + /// + } + SectionCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first section in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + + SectionCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + SectionCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return SectionCollection; + })(OfficeExtension.ClientObject); + Word.SectionCollection = SectionCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// This enum sets where the cursor (insertion point) in the document is after a selection. [Api set: WordApi 1.1] + var SelectionMode = { + __proto__: null, + "select": "select", + "start": "start", + "end": "end", + } + Word.SelectionMode = SelectionMode; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Setting = (function(_super) { + __extends(Setting, _super); + function Setting() { + /// Represents a setting of the add-in. [Api set: WordApi 1.4] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the key of the setting. [Api set: WordApi 1.4] + /// Specifies the value of the setting. [Api set: WordApi 1.4] + } + + Setting.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Setting.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.SettingUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Setting object, with properties that have already been loaded and synced. + /// + } + Setting.prototype.delete = function() { + /// + /// Deletes the setting. [Api set: WordApi 1.4] + /// + /// + } + + Setting.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Setting.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Setting; + })(OfficeExtension.ClientObject); + Word.Setting = Setting; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var SettingCollection = (function(_super) { + __extends(SettingCollection, _super); + function SettingCollection() { + /// Contains the collection of {@link Word.Setting} objects. [Api set: WordApi 1.4] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + SettingCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + SettingCollection.prototype.add = function(key, value) { + /// + /// Creates a new setting or sets an existing setting. [Api set: WordApi 1.4] + /// + /// Required. The setting's key, which is case-sensitive. + /// Required. The setting's value. + /// + } + SettingCollection.prototype.deleteAll = function() { + /// + /// Deletes all settings in this add-in. [Api set: WordApi 1.4] + /// + /// + } + SettingCollection.prototype.getCount = function() { + /// + /// Gets the count of settings. [Api set: WordApi 1.4] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + SettingCollection.prototype.getItem = function(key) { + /// + /// Gets a setting object by its key, which is case-sensitive. Throws an `ItemNotFound` error if the setting does not exist. [Api set: WordApi 1.4] + /// + /// The key that identifies the setting object. + /// + } + SettingCollection.prototype.getItemOrNullObject = function(key) { + /// + /// Gets a setting object by its key, which is case-sensitive. If the setting does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.4] + /// + /// Required. The key that identifies the setting object. + /// + } + + SettingCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + SettingCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return SettingCollection; + })(OfficeExtension.ClientObject); + Word.SettingCollection = SettingCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Shading = (function(_super) { + __extends(Shading, _super); + function Shading() { + /// Represents the shading object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the shading texture of the object. [Api set: WordApi BETA (PREVIEW ONLY)] + } + + Shading.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Shading.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.ShadingUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Shading object, with properties that have already been loaded and synced. + /// + } + + Shading.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Shading.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Shading; + })(OfficeExtension.ClientObject); + Word.Shading = Shading; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Represents the shading texture. [Api set: WordApi BETA (PREVIEW ONLY)] + var ShadingTextureType = { + __proto__: null, + "darkDiagonalDown": "darkDiagonalDown", + "darkDiagonalUp": "darkDiagonalUp", + "darkGrid": "darkGrid", + "darkHorizontal": "darkHorizontal", + "darkTrellis": "darkTrellis", + "darkVertical": "darkVertical", + "lightDiagonalDown": "lightDiagonalDown", + "lightDiagonalUp": "lightDiagonalUp", + "lightGrid": "lightGrid", + "lightHorizontal": "lightHorizontal", + "lightTrellis": "lightTrellis", + "lightVertical": "lightVertical", + "none": "none", + "percent10": "percent10", + "percent12Pt5": "percent12Pt5", + "percent15": "percent15", + "percent20": "percent20", + "percent25": "percent25", + "percent30": "percent30", + "percent35": "percent35", + "percent37Pt5": "percent37Pt5", + "percent40": "percent40", + "percent45": "percent45", + "percent5": "percent5", + "percent50": "percent50", + "percent55": "percent55", + "percent60": "percent60", + "percent62Pt5": "percent62Pt5", + "percent65": "percent65", + "percent70": "percent70", + "percent75": "percent75", + "percent80": "percent80", + "percent85": "percent85", + "percent87Pt5": "percent87Pt5", + "percent90": "percent90", + "percent95": "percent95", + "solid": "solid", + } + Word.ShadingTextureType = ShadingTextureType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Style = (function(_super) { + __extends(Style, _super); + function Style() { + /// Represents a style in a Word document. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the name of an existing style to use as the base formatting of another style. [Api set: WordApi 1.5] + /// Specifies a BorderCollection object that represents all the borders for the specified style. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets whether the specified style is a built-in style. [Api set: WordApi 1.5] + /// Gets the description of the specified style. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets a font object that represents the character formatting of the specified style. [Api set: WordApi 1.5] + /// Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. [Api set: WordApi 1.5] + /// Gets whether a style is a linked style that can be used for both paragraph and character formatting. [Api set: WordApi 1.5] + /// Gets a ListTemplate object that represents the list formatting for the specified Style object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the name of a style in the language of the user. [Api set: WordApi 1.5] + /// Gets the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. [Api set: WordApi 1.5] + /// Gets a ParagraphFormat object that represents the paragraph settings for the specified style. [Api set: WordApi 1.5] + /// Specifies the priority. [Api set: WordApi 1.5] + /// Specifies whether the style corresponds to an available quick style. [Api set: WordApi 1.5] + /// Gets a Shading object that represents the shading for the specified style. Not applicable to List style. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets a TableStyle object representing Style properties that can be applied to a table. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets the style type. [Api set: WordApi 1.5] + /// Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. [Api set: WordApi 1.5] + /// Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. [Api set: WordApi 1.5] + } + + Style.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Style.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.StyleUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Style object, with properties that have already been loaded and synced. + /// + } + Style.prototype.delete = function() { + /// + /// Deletes the style. [Api set: WordApi 1.5] + /// + /// + } + + Style.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Style.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Style; + })(OfficeExtension.ClientObject); + Word.Style = Style; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var StyleCollection = (function(_super) { + __extends(StyleCollection, _super); + function StyleCollection() { + /// Contains a collection of {@link Word.Style} objects. [Api set: WordApi 1.5] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + StyleCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + StyleCollection.prototype.getByName = function(name) { + /// + /// Get the style object by its name. [Api set: WordApi 1.5] + /// + /// Required. The style name. + /// + } + StyleCollection.prototype.getByNameOrNullObject = function(name) { + /// + /// If the corresponding style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. [Api set: WordApi 1.5] + /// + /// Required. The style name. + /// + } + StyleCollection.prototype.getCount = function() { + /// + /// Gets the number of the styles in the collection. [Api set: WordApi 1.5] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + StyleCollection.prototype.getItem = function(index) { + /// + /// Gets a style object by its index in the collection. [Api set: WordApi 1.5] + /// + /// A number that identifies the index location of a style object. + /// + } + + StyleCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + StyleCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return StyleCollection; + })(OfficeExtension.ClientObject); + Word.StyleCollection = StyleCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Represents the type of style. [Api set: WordApi 1.5] + var StyleType = { + __proto__: null, + "character": "character", + "list": "list", + "paragraph": "paragraph", + "table": "table", + } + Word.StyleType = StyleType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Table = (function(_super) { + __extends(Table, _super); + function Table() { + /// Represents a table in a Word document. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. [Api set: WordApi 1.3] + /// Gets the collection of endnotes in the table. [Api set: WordApi 1.5] + /// Gets the collection of field objects in the table. [Api set: WordApi 1.4] + /// Gets the font. Use this to get and set font name, size, color, and other properties. [Api set: WordApi 1.3] + /// Gets the collection of footnotes in the table. [Api set: WordApi 1.5] + /// Specifies the number of header rows. [Api set: WordApi 1.3] + /// Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. [Api set: WordApi 1.3] + /// Indicates whether all of the table rows are uniform. [Api set: WordApi 1.3] + /// Gets the nesting level of the table. Top-level tables have level 1. [Api set: WordApi 1.3] + /// Gets the parent body of the table. [Api set: WordApi 1.3] + /// Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. [Api set: WordApi 1.3] + /// Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the table that contains this table. Throws an `ItemNotFound` error if it is not contained in a table. [Api set: WordApi 1.3] + /// Gets the table cell that contains this table. Throws an `ItemNotFound` error if it is not contained in a table cell. [Api set: WordApi 1.3] + /// Gets the table cell that contains this table. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the table that contains this table. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Gets the number of rows in the table. [Api set: WordApi 1.3] + /// Gets all of the table rows. [Api set: WordApi 1.3] + /// Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. [Api set: WordApi 1.3] + /// Specifies 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] + /// Specifies whether the table has banded columns. [Api set: WordApi 1.3] + /// Specifies whether the table has banded rows. [Api set: WordApi 1.3] + /// Specifies 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] + /// Specifies whether the table has a first column with a special style. [Api set: WordApi 1.3] + /// Specifies whether the table has a last column with a special style. [Api set: WordApi 1.3] + /// Specifies whether the table has a total (last) row with a special style. [Api set: WordApi 1.3] + /// Gets the child tables nested one level deeper. [Api set: WordApi 1.3] + /// Specifies the text values in the table, as a 2D JavaScript array. [Api set: WordApi 1.3] + /// Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. [Api set: WordApi 1.3] + /// Specifies the width of the table in points. [Api set: WordApi 1.3] + } + + Table.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Table.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.TableUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Table object, with properties that have already been loaded and synced. + /// + } + Table.prototype.addColumns = function(insertLocation, columnCount, values) { + /// + /// 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] + /// + /// Required. It must be 'Start' or 'End', corresponding to the appropriate side of the table. + /// Required. Number of columns to add. + /// Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + /// + } + Table.prototype.addRows = function(insertLocation, rowCount, values) { + /// + /// 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] + /// + /// Required. It must be 'Start' or 'End'. + /// Required. Number of rows to add. + /// Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + /// + } + Table.prototype.autoFitWindow = function() { + /// + /// Autofits the table columns to the width of the window. [Api set: WordApi 1.3] + /// + /// + } + Table.prototype.clear = function() { + /// + /// Clears the contents of the table. [Api set: WordApi 1.3] + /// + /// + } + Table.prototype.delete = function() { + /// + /// Deletes the entire table. [Api set: WordApi 1.3] + /// + /// + } + Table.prototype.deleteColumns = function(columnIndex, columnCount) { + /// + /// Deletes specific columns. This is applicable to uniform tables. [Api set: WordApi 1.3] + /// + /// Required. The first column to delete. + /// Optional. The number of columns to delete. Default 1. + /// + } + Table.prototype.deleteRows = function(rowIndex, rowCount) { + /// + /// Deletes specific rows. [Api set: WordApi 1.3] + /// + /// Required. The first row to delete. + /// Optional. The number of rows to delete. Default 1. + /// + } + Table.prototype.distributeColumns = function() { + /// + /// Distributes the column widths evenly. This is applicable to uniform tables. [Api set: WordApi 1.3] + /// + /// + } + Table.prototype.getBorder = function(borderLocation) { + /// + /// Gets the border style for the specified border. [Api set: WordApi 1.3] + /// + /// Required. The border location. + /// + } + Table.prototype.getCell = function(rowIndex, cellIndex) { + /// + /// Gets the table cell at a specified row and column. Throws an `ItemNotFound` error if the specified table cell does not exist. [Api set: WordApi 1.3] + /// + /// Required. The index of the row. + /// Required. The index of the cell in the row. + /// + } + Table.prototype.getCellOrNullObject = function(rowIndex, cellIndex) { + /// + /// Gets the table cell at a specified row and column. If the specified table cell does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// Required. The index of the row. + /// Required. The index of the cell in the row. + /// + } + Table.prototype.getCellPadding = function(cellPaddingLocation) { + /// + /// Gets cell padding in points. [Api set: WordApi 1.3] + /// + /// Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + Table.prototype.getNext = function() { + /// + /// Gets the next table. Throws an `ItemNotFound` error if this table is the last one. [Api set: WordApi 1.3] + /// + /// + } + Table.prototype.getNextOrNullObject = function() { + /// + /// Gets the next table. If this table is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + Table.prototype.getParagraphAfter = function() { + /// + /// Gets the paragraph after the table. Throws an `ItemNotFound` error if there isn't a paragraph after the table. [Api set: WordApi 1.3] + /// + /// + } + Table.prototype.getParagraphAfterOrNullObject = function() { + /// + /// Gets the paragraph after the table. If there isn't a paragraph after the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + Table.prototype.getParagraphBefore = function() { + /// + /// Gets the paragraph before the table. Throws an `ItemNotFound` error if there isn't a paragraph before the table. [Api set: WordApi 1.3] + /// + /// + } + Table.prototype.getParagraphBeforeOrNullObject = function() { + /// + /// Gets the paragraph before the table. If there isn't a paragraph before the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + Table.prototype.getRange = function(rangeLocation) { + /// + /// Gets the range that contains this table, or the range at the start or end of the table. [Api set: WordApi 1.3] + /// + /// Optional. The range location must be 'Whole', 'Start', 'End', or 'After'. + /// + } + Table.prototype.insertContentControl = function() { + /// + /// Inserts a content control on the table. [Api set: WordApi 1.3] + /// + /// + } + Table.prototype.insertParagraph = function(paragraphText, insertLocation) { + /// + /// Inserts a paragraph at the specified location. [Api set: WordApi 1.3] + /// + /// Required. The paragraph text to be inserted. + /// Required. The value must be 'Before' or 'After'. + /// + } + Table.prototype.insertTable = function(rowCount, columnCount, insertLocation, values) { + /// + /// Inserts a table with the specified number of rows and columns. [Api set: WordApi 1.3] + /// + /// Required. The number of rows in the table. + /// Required. The number of columns in the table. + /// Required. The value must be 'Before' or 'After'. + /// Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + /// + } + Table.prototype.mergeCells = function(topRow, firstCell, bottomRow, lastCell) { + /// + /// Merges the cells bounded inclusively by a first and last cell. [Api set: WordApi 1.4] + /// + /// Required. The row of the first cell + /// Required. The index of the first cell in its row + /// Required. The row of the last cell + /// Required. The index of the last cell in its row + /// + } + Table.prototype.search = function(searchText, searchOptions) { + /// + /// 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] + /// + /// Required. The search text. + /// Optional. Options for the search. + /// + } + Table.prototype.select = function(selectionMode) { + /// + /// 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] + /// + /// Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + /// + } + Table.prototype.setCellPadding = function(cellPaddingLocation, cellPadding) { + /// + /// Sets cell padding in points. [Api set: WordApi 1.3] + /// + /// Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + /// Required. The cell padding. + /// + } + + Table.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + Table.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return Table; + })(OfficeExtension.ClientObject); + Word.Table = Table; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var TableBorder = (function(_super) { + __extends(TableBorder, _super); + function TableBorder() { + /// Specifies the border style. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the table border color. [Api set: WordApi 1.3] + /// Specifies the type of the table border. [Api set: WordApi 1.3] + /// Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. [Api set: WordApi 1.3] + } + + TableBorder.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + TableBorder.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.TableBorderUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing TableBorder object, with properties that have already been loaded and synced. + /// + } + + TableBorder.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + TableBorder.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return TableBorder; + })(OfficeExtension.ClientObject); + Word.TableBorder = TableBorder; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var TableCell = (function(_super) { + __extends(TableCell, _super); + function TableCell() { + /// Represents a table cell in a Word document. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the body object of the cell. [Api set: WordApi 1.3] + /// Gets the index of the cell in its row. [Api set: WordApi 1.3] + /// Specifies the width of the cell's column in points. This is applicable to uniform tables. [Api set: WordApi 1.3] + /// Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. [Api set: WordApi 1.3] + /// Gets the parent row of the cell. [Api set: WordApi 1.3] + /// Gets the parent table of the cell. [Api set: WordApi 1.3] + /// Gets the index of the cell's row in the table. [Api set: WordApi 1.3] + /// Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. [Api set: WordApi 1.3] + /// Specifies the text of the cell. [Api set: WordApi 1.3] + /// Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. [Api set: WordApi 1.3] + /// Gets the width of the cell in points. [Api set: WordApi 1.3] + } + + TableCell.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + TableCell.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.TableCellUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing TableCell object, with properties that have already been loaded and synced. + /// + } + TableCell.prototype.deleteColumn = function() { + /// + /// Deletes the column containing this cell. This is applicable to uniform tables. [Api set: WordApi 1.3] + /// + /// + } + TableCell.prototype.deleteRow = function() { + /// + /// Deletes the row containing this cell. [Api set: WordApi 1.3] + /// + /// + } + TableCell.prototype.getBorder = function(borderLocation) { + /// + /// Gets the border style for the specified border. [Api set: WordApi 1.3] + /// + /// Required. The border location. + /// + } + TableCell.prototype.getCellPadding = function(cellPaddingLocation) { + /// + /// Gets cell padding in points. [Api set: WordApi 1.3] + /// + /// Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + TableCell.prototype.getNext = function() { + /// + /// Gets the next cell. Throws an `ItemNotFound` error if this cell is the last one. [Api set: WordApi 1.3] + /// + /// + } + TableCell.prototype.getNextOrNullObject = function() { + /// + /// Gets the next cell. If this cell is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + TableCell.prototype.insertColumns = function(insertLocation, columnCount, values) { + /// + /// 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] + /// + /// Required. It must be 'Before' or 'After'. + /// Required. Number of columns to add. + /// Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + /// + } + TableCell.prototype.insertRows = function(insertLocation, rowCount, values) { + /// + /// 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] + /// + /// Required. It must be 'Before' or 'After'. + /// Required. Number of rows to add. + /// Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + /// + } + TableCell.prototype.setCellPadding = function(cellPaddingLocation, cellPadding) { + /// + /// Sets cell padding in points. [Api set: WordApi 1.3] + /// + /// Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + /// Required. The cell padding. + /// + } + TableCell.prototype.split = function(rowCount, columnCount) { + /// + /// Splits the cell into the specified number of rows and columns. [Api set: WordApi 1.4] + /// + /// Required. The number of rows to split into. Must be a divisor of the number of underlying rows. + /// Required. The number of columns to split into. + /// + } + + TableCell.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + TableCell.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return TableCell; + })(OfficeExtension.ClientObject); + Word.TableCell = TableCell; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var TableCellCollection = (function(_super) { + __extends(TableCellCollection, _super); + function TableCellCollection() { + /// Contains the collection of the document's TableCell objects. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + TableCellCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + TableCellCollection.prototype.getFirst = function() { + /// + /// Gets the first table cell in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi 1.3] + /// + /// + } + TableCellCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first table cell in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + + TableCellCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + TableCellCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return TableCellCollection; + })(OfficeExtension.ClientObject); + Word.TableCellCollection = TableCellCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var TableCollection = (function(_super) { + __extends(TableCollection, _super); + function TableCollection() { + /// Contains the collection of the document's Table objects. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + TableCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + TableCollection.prototype.getFirst = function() { + /// + /// Gets the first table in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi 1.3] + /// + /// + } + TableCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first table in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + + TableCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + TableCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return TableCollection; + })(OfficeExtension.ClientObject); + Word.TableCollection = TableCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var TableRow = (function(_super) { + __extends(TableRow, _super); + function TableRow() { + /// Represents a row in a Word document. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the number of cells in the row. [Api set: WordApi 1.3] + /// Gets cells. Read-only. [Api set: WordApi 1.3] + /// Gets the collection of endnotes in the table row. [Api set: WordApi 1.5] + /// Gets the collection of field objects in the table row. [Api set: WordApi 1.4] + /// Gets the font. Use this to get and set font name, size, color, and other properties. [Api set: WordApi 1.3] + /// Gets the collection of footnotes in the table row. [Api set: WordApi 1.5] + /// Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. [Api set: WordApi 1.3] + /// Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. [Api set: WordApi 1.3] + /// Gets parent table. [Api set: WordApi 1.3] + /// Specifies the preferred height of the row in points. [Api set: WordApi 1.3] + /// Gets the index of the row in its parent table. [Api set: WordApi 1.3] + /// Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. [Api set: WordApi 1.3] + /// Specifies the text values in the row, as a 2D JavaScript array. [Api set: WordApi 1.3] + /// Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. [Api set: WordApi 1.3] + } + + TableRow.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + TableRow.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.TableRowUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing TableRow object, with properties that have already been loaded and synced. + /// + } + TableRow.prototype.clear = function() { + /// + /// Clears the contents of the row. [Api set: WordApi 1.3] + /// + /// + } + TableRow.prototype.delete = function() { + /// + /// Deletes the entire row. [Api set: WordApi 1.3] + /// + /// + } + TableRow.prototype.getBorder = function(borderLocation) { + /// + /// Gets the border style of the cells in the row. [Api set: WordApi 1.3] + /// + /// Required. The border location. + /// + } + TableRow.prototype.getCellPadding = function(cellPaddingLocation) { + /// + /// Gets cell padding in points. [Api set: WordApi 1.3] + /// + /// Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + TableRow.prototype.getNext = function() { + /// + /// Gets the next row. Throws an `ItemNotFound` error if this row is the last one. [Api set: WordApi 1.3] + /// + /// + } + TableRow.prototype.getNextOrNullObject = function() { + /// + /// Gets the next row. If this row is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + TableRow.prototype.insertContentControl = function() { + /// + /// Inserts a content control on the row. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + TableRow.prototype.insertRows = function(insertLocation, rowCount, values) { + /// + /// Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. [Api set: WordApi 1.3] + /// + /// Required. Where the new rows should be inserted, relative to the current row. It must be 'Before' or 'After'. + /// Required. Number of rows to add + /// 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. + /// + } + TableRow.prototype.merge = function() { + /// + /// Merges the row into one cell. [Api set: WordApi 1.4] + /// + /// + } + TableRow.prototype.search = function(searchText, searchOptions) { + /// + /// 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] + /// + /// Required. The search text. + /// Optional. Options for the search. + /// + } + TableRow.prototype.select = function(selectionMode) { + /// + /// Selects the row and navigates the Word UI to it. [Api set: WordApi 1.3] + /// + /// Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + /// + } + TableRow.prototype.setCellPadding = function(cellPaddingLocation, cellPadding) { + /// + /// Sets cell padding in points. [Api set: WordApi 1.3] + /// + /// Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + /// Required. The cell padding. + /// + } + + TableRow.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + TableRow.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return TableRow; + })(OfficeExtension.ClientObject); + Word.TableRow = TableRow; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var TableRowCollection = (function(_super) { + __extends(TableRowCollection, _super); + function TableRowCollection() { + /// Contains the collection of the document's TableRow objects. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + TableRowCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + TableRowCollection.prototype.getFirst = function() { + /// + /// Gets the first row in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi 1.3] + /// + /// + } + TableRowCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first row in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// + /// + } + + TableRowCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + TableRowCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return TableRowCollection; + })(OfficeExtension.ClientObject); + Word.TableRowCollection = TableRowCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var TableStyle = (function(_super) { + __extends(TableStyle, _super); + function TableStyle() { + /// Represents the TableStyle object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the table's alignment against the page margin. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies whether lines in tables formatted with a specified style break across pages. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the amount of space to add between the contents and the bottom borders of the cells. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the spacing (in points) between the cells in a table style. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the amount of space to add between the contents and the left borders of the cells. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the amount of space to add between the contents and the right borders of the cells. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the amount of space to add between the contents and the top borders of the cells. [Api set: WordApi BETA (PREVIEW ONLY)] + } + + TableStyle.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + TableStyle.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.TableStyleUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing TableStyle object, with properties that have already been loaded and synced. + /// + } + + TableStyle.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + TableStyle.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return TableStyle; + })(OfficeExtension.ClientObject); + Word.TableStyle = TableStyle; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var TrackedChange = (function(_super) { + __extends(TrackedChange, _super); + function TrackedChange() { + /// Represents a tracked change in a Word document. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Specifies the author of the tracked change. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the date of the tracked change. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the text of the tracked change. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the type of the tracked change. [Api set: WordApi BETA (PREVIEW ONLY)] + } + + TrackedChange.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + TrackedChange.prototype.accept = function() { + /// + /// Accepts the tracked change. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + TrackedChange.prototype.getNext = function() { + /// + /// Gets the next tracked change. Throws an `ItemNotFound` error if this tracked change is the last one. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + TrackedChange.prototype.getNextOrNullObject = function() { + /// + /// Gets the next tracked change. If this tracked change is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + TrackedChange.prototype.getRange = function(rangeLocation) { + /// + /// Gets the range of the tracked change. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + TrackedChange.prototype.reject = function() { + /// + /// Rejects the tracked change. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + + TrackedChange.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + TrackedChange.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return TrackedChange; + })(OfficeExtension.ClientObject); + Word.TrackedChange = TrackedChange; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var TrackedChangeCollection = (function(_super) { + __extends(TrackedChangeCollection, _super); + function TrackedChangeCollection() { + /// Contains a collection of {@link Word.TrackedChange} objects. [Api set: WordApi BETA (PREVIEW ONLY)] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + TrackedChangeCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + TrackedChangeCollection.prototype.acceptAll = function() { + /// + /// Accepts all the tracked changes in the collection. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + TrackedChangeCollection.prototype.getCount = function() { + /// + /// Gets the number of TrackedChange objects in the collection. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + TrackedChangeCollection.prototype.getFirst = function() { + /// + /// Gets the first TrackedChange in this collection. Throws an `ItemNotFound` error if this collection is empty. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + TrackedChangeCollection.prototype.getFirstOrNullObject = function() { + /// + /// Gets the first TrackedChange in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + TrackedChangeCollection.prototype.getItem = function(index) { + /// + /// Gets a TrackedChange object by its index in the collection. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// A number that identifies the index location of a TrackedChange object. + /// + } + TrackedChangeCollection.prototype.rejectAll = function() { + /// + /// Rejects all the tracked changes in the collection. [Api set: WordApi BETA (PREVIEW ONLY)] + /// + /// + } + + TrackedChangeCollection.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + /// + /// + } + + TrackedChangeCollection.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. + /// + /// + } + + return TrackedChangeCollection; + })(OfficeExtension.ClientObject); + Word.TrackedChangeCollection = TrackedChangeCollection; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// TrackedChange type. [Api set: WordApi BETA (PREVIEW ONLY)] + var TrackedChangeType = { + __proto__: null, + "none": "none", + "added": "added", + "deleted": "deleted", + "formatted": "formatted", + } + Word.TrackedChangeType = TrackedChangeType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// Represents the character inserted after the list item mark. [Api set: WordApi BETA (PREVIEW ONLY)] + var TrailingCharacter = { + __proto__: null, + "trailingTab": "trailingTab", + "trailingSpace": "trailingSpace", + "trailingNone": "trailingNone", + } + Word.TrailingCharacter = TrailingCharacter; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// The supported styles for underline format. [Api set: WordApi 1.1] + var UnderlineType = { + __proto__: null, + "mixed": "mixed", + "none": "none", + "single": "single", + "word": "word", + "double": "double", + "thick": "thick", + "dotted": "dotted", + "dottedHeavy": "dottedHeavy", + "dashLine": "dashLine", + "dashLineHeavy": "dashLineHeavy", + "dashLineLong": "dashLineLong", + "dashLineLongHeavy": "dashLineLongHeavy", + "dotDashLine": "dotDashLine", + "dotDashLineHeavy": "dotDashLineHeavy", + "twoDotDashLine": "twoDotDashLine", + "twoDotDashLineHeavy": "twoDotDashLineHeavy", + "wave": "wave", + "waveHeavy": "waveHeavy", + "waveDouble": "waveDouble", + } + Word.UnderlineType = UnderlineType; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + /// [Api set: WordApi 1.3] + var VerticalAlignment = { + __proto__: null, + "mixed": "mixed", + "top": "top", + "center": "center", + "bottom": "bottom", + } + Word.VerticalAlignment = VerticalAlignment; +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var AugloopAnnotationUpdateData = (function() { + function AugloopAnnotationUpdateData() { + /// An interface for updating data on the AugloopAnnotation object, for use in "augloopAnnotation.set({ ... })". + /// State of the annotation. [Api set: WordApi]; + } + return AugloopAnnotationUpdateData; + })(); + Interfaces.AugloopAnnotationUpdateData.__proto__ = null; + Interfaces.AugloopAnnotationUpdateData = AugloopAnnotationUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var BodyUpdateData = (function() { + function BodyUpdateData() { + /// An interface for updating data on the Body object, for use in "body.set({ ... })". + /// 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] + /// Specifies 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]; + /// Specifies 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]; + } + return BodyUpdateData; + })(); + Interfaces.BodyUpdateData.__proto__ = null; + Interfaces.BodyUpdateData = BodyUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var BorderUpdateData = (function() { + function BorderUpdateData() { + /// An interface for updating data on the Border object, for use in "border.set({ ... })". + /// Specifies the line color for the border. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the line style for the border. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the line width for the border. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies whether the border is visible. [Api set: WordApi BETA (PREVIEW ONLY)]; + } + return BorderUpdateData; + })(); + Interfaces.BorderUpdateData.__proto__ = null; + Interfaces.BorderUpdateData = BorderUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var BorderCollectionUpdateData = (function() { + function BorderCollectionUpdateData() { + /// An interface for updating data on the BorderCollection object, for use in "borderCollection.set({ ... })". + /// Specifies the 24-bit color of the inside borders. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the line style of the inside borders. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the line width of the inside borders. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the 24-bit color of the outside borders. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the line style of the outside borders. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the line width of the outside borders. [Api set: WordApi BETA (PREVIEW ONLY)]; + } + return BorderCollectionUpdateData; + })(); + Interfaces.BorderCollectionUpdateData.__proto__ = null; + Interfaces.BorderCollectionUpdateData = BorderCollectionUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var CommentUpdateData = (function() { + function CommentUpdateData() { + /// An interface for updating data on the Comment object, for use in "comment.set({ ... })". + /// Specifies the comment's content range. [Api set: WordApi 1.4] + /// Specifies the comment's content as plain text. [Api set: WordApi 1.4]; + /// Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. [Api set: WordApi 1.4]; + } + return CommentUpdateData; + })(); + Interfaces.CommentUpdateData.__proto__ = null; + Interfaces.CommentUpdateData = CommentUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var CommentContentRangeUpdateData = (function() { + function CommentContentRangeUpdateData() { + /// An interface for updating data on the CommentContentRange object, for use in "commentContentRange.set({ ... })". + /// Specifies a value that indicates whether the comment text is bold. [Api set: WordApi 1.4]; + /// 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. [Api set: WordApi 1.4]; + /// Specifies a value that indicates whether the comment text is italicized. [Api set: WordApi 1.4]; + /// Specifies a value that indicates whether the comment text has a strikethrough. [Api set: WordApi 1.4]; + /// Specifies a value that indicates the comment text's underline type. 'None' if the comment text is not underlined. [Api set: WordApi 1.4]; + } + return CommentContentRangeUpdateData; + })(); + Interfaces.CommentContentRangeUpdateData.__proto__ = null; + Interfaces.CommentContentRangeUpdateData = CommentContentRangeUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var CommentReplyUpdateData = (function() { + function CommentReplyUpdateData() { + /// An interface for updating data on the CommentReply object, for use in "commentReply.set({ ... })". + /// Specifies the commentReply's content range. [Api set: WordApi 1.4] + /// Gets the parent comment of this reply. [Api set: WordApi 1.4] + /// Specifies the comment reply's content. The string is plain text. [Api set: WordApi 1.4]; + } + return CommentReplyUpdateData; + })(); + Interfaces.CommentReplyUpdateData.__proto__ = null; + Interfaces.CommentReplyUpdateData = CommentReplyUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ContentControlUpdateData = (function() { + function ContentControlUpdateData() { + /// An interface for updating data on the ContentControl object, for use in "contentControl.set({ ... })". + /// 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] + /// Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. [Api set: WordApi 1.1]; + /// Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. [Api set: WordApi 1.1]; + /// Specifies a value that indicates whether the user can edit the contents of the content control. [Api set: WordApi 1.1]; + /// Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. [Api set: WordApi 1.1]; + /// Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. **Note**: The set operation for this property is not supported in Word on the web. [Api set: WordApi 1.1]; + /// Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. [Api set: WordApi 1.1]; + /// Specifies 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]; + /// Specifies 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]; + /// Specifies a tag to identify a content control. [Api set: WordApi 1.1]; + /// Specifies the title for a content control. [Api set: WordApi 1.1]; + } + return ContentControlUpdateData; + })(); + Interfaces.ContentControlUpdateData.__proto__ = null; + Interfaces.ContentControlUpdateData = ContentControlUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var CustomPropertyUpdateData = (function() { + function CustomPropertyUpdateData() { + /// An interface for updating data on the CustomProperty object, for use in "customProperty.set({ ... })". + /// Specifies the value of the custom property. Note that even though Word on the web 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]; + } + return CustomPropertyUpdateData; + })(); + Interfaces.CustomPropertyUpdateData.__proto__ = null; + Interfaces.CustomPropertyUpdateData = CustomPropertyUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var DocumentUpdateData = (function() { + function DocumentUpdateData() { + /// An interface for updating data on the Document object, for use in "document.set({ ... })". + /// Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. [Api set: WordApi 1.1] + /// Gets the properties of the document. [Api set: WordApi 1.3] + /// Specifies 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 Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.]; + /// Specifies the ChangeTracking mode. [Api set: WordApi 1.4]; + } + return DocumentUpdateData; + })(); + Interfaces.DocumentUpdateData.__proto__ = null; + Interfaces.DocumentUpdateData = DocumentUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var DocumentCreatedUpdateData = (function() { + function DocumentCreatedUpdateData() { + /// An interface for updating data on the DocumentCreated object, for use in "documentCreated.set({ ... })". + /// Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. [Api set: WordApiHiddenDocument 1.3] + /// Gets the properties of the document. [Api set: WordApiHiddenDocument 1.3] + } + return DocumentCreatedUpdateData; + })(); + Interfaces.DocumentCreatedUpdateData.__proto__ = null; + Interfaces.DocumentCreatedUpdateData = DocumentCreatedUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var DocumentPropertiesUpdateData = (function() { + function DocumentPropertiesUpdateData() { + /// An interface for updating data on the DocumentProperties object, for use in "documentProperties.set({ ... })". + /// Specifies the author of the document. [Api set: WordApi 1.3]; + /// Specifies the category of the document. [Api set: WordApi 1.3]; + /// Specifies the comments of the document. [Api set: WordApi 1.3]; + /// Specifies the company of the document. [Api set: WordApi 1.3]; + /// Specifies the format of the document. [Api set: WordApi 1.3]; + /// Specifies the keywords of the document. [Api set: WordApi 1.3]; + /// Specifies the manager of the document. [Api set: WordApi 1.3]; + /// Specifies the subject of the document. [Api set: WordApi 1.3]; + /// Specifies the title of the document. [Api set: WordApi 1.3]; + } + return DocumentPropertiesUpdateData; + })(); + Interfaces.DocumentPropertiesUpdateData.__proto__ = null; + Interfaces.DocumentPropertiesUpdateData = DocumentPropertiesUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var FieldUpdateData = (function() { + function FieldUpdateData() { + /// An interface for updating data on the Field object, for use in "field.set({ ... })". + /// Gets the field's result data. [Api set: WordApi 1.4] + /// Specifies the field's code instruction. [Api set: WordApi 1.4]; + /// Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. [Api set: WordApi 1.5]; + /// Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. [Api set: WordApi 1.5]; + /// Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. [Api set: WordApi BETA (PREVIEW ONLY)]; + } + return FieldUpdateData; + })(); + Interfaces.FieldUpdateData.__proto__ = null; + Interfaces.FieldUpdateData = FieldUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var FontUpdateData = (function() { + function FontUpdateData() { + /// An interface for updating data on the Font object, for use in "font.set({ ... })". + /// Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. [Api set: WordApi 1.1]; + /// Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. [Api set: WordApi 1.1]; + /// Specifies 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]; + /// Specifies a value that indicates whether the font has a hidden. True if the font is formatted as hidden text, otherwise, false. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies 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. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. [Api set: WordApi 1.1]; + /// Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. [Api set: WordApi 1.1]; + /// Specifies a value that represents the name of the font. [Api set: WordApi 1.1]; + /// Specifies a value that represents the font size in points. [Api set: WordApi 1.1]; + /// Specifies 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]; + /// Specifies 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]; + /// Specifies 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]; + /// Specifies a value that indicates the font's underline type. 'None' if the font is not underlined. [Api set: WordApi 1.1]; + } + return FontUpdateData; + })(); + Interfaces.FontUpdateData.__proto__ = null; + Interfaces.FontUpdateData = FontUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var InlinePictureUpdateData = (function() { + function InlinePictureUpdateData() { + /// An interface for updating data on the InlinePicture object, for use in "inlinePicture.set({ ... })". + /// Specifies a string that represents the alternative text associated with the inline image. [Api set: WordApi 1.1]; + /// Specifies a string that contains the title for the inline image. [Api set: WordApi 1.1]; + /// Specifies a number that describes the height of the inline image. [Api set: WordApi 1.1]; + /// Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. [Api set: WordApi 1.1]; + /// Specifies a value that indicates whether the inline image retains its original proportions when you resize it. [Api set: WordApi 1.1]; + /// Specifies a number that describes the width of the inline image. [Api set: WordApi 1.1]; + } + return InlinePictureUpdateData; + })(); + Interfaces.InlinePictureUpdateData.__proto__ = null; + Interfaces.InlinePictureUpdateData = InlinePictureUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ListItemUpdateData = (function() { + function ListItemUpdateData() { + /// An interface for updating data on the ListItem object, for use in "listItem.set({ ... })". + /// Specifies the level of the item in the list. [Api set: WordApi 1.3]; + } + return ListItemUpdateData; + })(); + Interfaces.ListItemUpdateData.__proto__ = null; + Interfaces.ListItemUpdateData = ListItemUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ListLevelUpdateData = (function() { + function ListLevelUpdateData() { + /// An interface for updating data on the ListLevel object, for use in "listLevel.set({ ... })". + /// Gets a Font object that represents the character formatting of the specified object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the name of the style that's linked to the specified list level object. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the number format for the specified list level. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the position (in points) of the number or bullet for the specified list level object. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the number style for the list level object. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the list level that must appear before the specified list level restarts numbering at 1. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the starting number for the specified list level object. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the tab position for the specified list level object. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the position (in points) for the second line of wrapping text for the specified list level object. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the character inserted after the number for the specified list level. [Api set: WordApi BETA (PREVIEW ONLY)]; + } + return ListLevelUpdateData; + })(); + Interfaces.ListLevelUpdateData.__proto__ = null; + Interfaces.ListLevelUpdateData = ListLevelUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ListTemplateUpdateData = (function() { + function ListTemplateUpdateData() { + /// An interface for updating data on the ListTemplate object, for use in "listTemplate.set({ ... })". + /// Specifies whether the specified ListTemplate object is outline numbered. [Api set: WordApi BETA (PREVIEW ONLY)]; + } + return ListTemplateUpdateData; + })(); + Interfaces.ListTemplateUpdateData.__proto__ = null; + Interfaces.ListTemplateUpdateData = ListTemplateUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var NoteItemUpdateData = (function() { + function NoteItemUpdateData() { + /// An interface for updating data on the NoteItem object, for use in "noteItem.set({ ... })". + /// Represents the body object of the note item. It's the portion of the text within the footnote or endnote. [Api set: WordApi 1.5] + /// Represents a footnote or endnote reference in the main document. [Api set: WordApi 1.5] + } + return NoteItemUpdateData; + })(); + Interfaces.NoteItemUpdateData.__proto__ = null; + Interfaces.NoteItemUpdateData = NoteItemUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ParagraphUpdateData = (function() { + function ParagraphUpdateData() { + /// An interface for updating data on the Paragraph object, for use in "paragraph.set({ ... })". + /// 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] + /// Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph is not part of a list. [Api set: WordApi 1.3] + /// Gets the ListItem for the paragraph. If the paragraph is not part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. [Api set: WordApi 1.3] + /// Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. [Api set: WordApi 1.1]; + /// Specifies 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]; + /// Specifies the left indent value, in points, for the paragraph. [Api set: WordApi 1.1]; + /// Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. [Api set: WordApi 1.1]; + /// Specifies the amount of spacing, in grid lines, after the paragraph. [Api set: WordApi 1.1]; + /// Specifies the amount of spacing, in grid lines, before the paragraph. [Api set: WordApi 1.1]; + /// Specifies the outline level for the paragraph. [Api set: WordApi 1.1]; + /// Specifies the right indent value, in points, for the paragraph. [Api set: WordApi 1.1]; + /// Specifies the spacing, in points, after the paragraph. [Api set: WordApi 1.1]; + /// Specifies the spacing, in points, before the paragraph. [Api set: WordApi 1.1]; + /// Specifies 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]; + /// Specifies 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]; + } + return ParagraphUpdateData; + })(); + Interfaces.ParagraphUpdateData.__proto__ = null; + Interfaces.ParagraphUpdateData = ParagraphUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ParagraphFormatUpdateData = (function() { + function ParagraphFormatUpdateData() { + /// An interface for updating data on the ParagraphFormat object, for use in "paragraphFormat.set({ ... })". + /// Specifies the alignment for the specified paragraphs. [Api set: WordApi 1.5]; + /// Specifies 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.5]; + /// Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. [Api set: WordApi 1.5]; + /// Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. [Api set: WordApi 1.5]; + /// Specifies the left indent. [Api set: WordApi 1.5]; + /// Specifies the line spacing (in points) for the specified paragraphs. [Api set: WordApi 1.5]; + /// Specifies the amount of spacing (in gridlines) after the specified paragraphs. [Api set: WordApi 1.5]; + /// Specifies the amount of spacing (in gridlines) before the specified paragraphs. [Api set: WordApi 1.5]; + /// Specifies whether left and right indents are the same width. [Api set: WordApi 1.5]; + /// Specifies the outline level for the specified paragraphs. [Api set: WordApi 1.5]; + /// Specifies the right indent (in points) for the specified paragraphs. [Api set: WordApi 1.5]; + /// Specifies the amount of spacing (in points) after the specified paragraph or text column. [Api set: WordApi 1.5]; + /// Specifies the spacing (in points) before the specified paragraphs. [Api set: WordApi 1.5]; + /// Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. [Api set: WordApi 1.5]; + } + return ParagraphFormatUpdateData; + })(); + Interfaces.ParagraphFormatUpdateData.__proto__ = null; + Interfaces.ParagraphFormatUpdateData = ParagraphFormatUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var RangeUpdateData = (function() { + function RangeUpdateData() { + /// An interface for updating data on the Range object, for use in "range.set({ ... })". + /// 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] + /// 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]; + /// Specifies 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]; + /// Specifies 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]; + } + return RangeUpdateData; + })(); + Interfaces.RangeUpdateData.__proto__ = null; + Interfaces.RangeUpdateData = RangeUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var SearchOptionsUpdateData = (function() { + function SearchOptionsUpdateData() { + /// An interface for updating data on the SearchOptions object, for use in "searchOptions.set({ ... })". + /// Specifies 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]; + /// Specifies 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]; + /// Specifies 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]; + /// Specifies 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]; + /// Specifies 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]; + /// Specifies 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]; + /// Specifies 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]; + } + return SearchOptionsUpdateData; + })(); + Interfaces.SearchOptionsUpdateData.__proto__ = null; + Interfaces.SearchOptionsUpdateData = SearchOptionsUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var SectionUpdateData = (function() { + function SectionUpdateData() { + /// An interface for updating data on the Section object, for use in "section.set({ ... })". + /// Gets the body object of the section. This does not include the header/footer and other section metadata. [Api set: WordApi 1.1] + } + return SectionUpdateData; + })(); + Interfaces.SectionUpdateData.__proto__ = null; + Interfaces.SectionUpdateData = SectionUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var SettingUpdateData = (function() { + function SettingUpdateData() { + /// An interface for updating data on the Setting object, for use in "setting.set({ ... })". + /// Specifies the value of the setting. [Api set: WordApi 1.4]; + } + return SettingUpdateData; + })(); + Interfaces.SettingUpdateData.__proto__ = null; + Interfaces.SettingUpdateData = SettingUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var StyleUpdateData = (function() { + function StyleUpdateData() { + /// An interface for updating data on the Style object, for use in "style.set({ ... })". + /// Specifies a BorderCollection object that represents all the borders for the specified style. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets a font object that represents the character formatting of the specified style. [Api set: WordApi 1.5] + /// Gets a ListTemplate object that represents the list formatting for the specified Style object. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets a ParagraphFormat object that represents the paragraph settings for the specified style. [Api set: WordApi 1.5] + /// Gets a Shading object that represents the shading for the specified style. Not applicable to List style. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Gets a TableStyle object representing Style properties that can be applied to a table. [Api set: WordApi BETA (PREVIEW ONLY)] + /// Specifies the priority. [Api set: WordApi 1.5]; + /// Specifies whether the style corresponds to an available quick style. [Api set: WordApi 1.5]; + /// Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. [Api set: WordApi 1.5]; + /// Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. [Api set: WordApi 1.5]; + } + return StyleUpdateData; + })(); + Interfaces.StyleUpdateData.__proto__ = null; + Interfaces.StyleUpdateData = StyleUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var ShadingUpdateData = (function() { + function ShadingUpdateData() { + /// An interface for updating data on the Shading object, for use in "shading.set({ ... })". + /// Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the shading texture of the object. [Api set: WordApi BETA (PREVIEW ONLY)]; + } + return ShadingUpdateData; + })(); + Interfaces.ShadingUpdateData.__proto__ = null; + Interfaces.ShadingUpdateData = ShadingUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var TableUpdateData = (function() { + function TableUpdateData() { + /// An interface for updating data on the Table object, for use in "table.set({ ... })". + /// Gets the font. Use this to get and set font name, size, color, and other properties. [Api set: WordApi 1.3] + /// Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. [Api set: WordApi 1.3]; + /// Specifies the number of header rows. [Api set: WordApi 1.3]; + /// Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. [Api set: WordApi 1.3]; + /// Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. [Api set: WordApi 1.3]; + /// Specifies 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]; + /// Specifies whether the table has banded columns. [Api set: WordApi 1.3]; + /// Specifies whether the table has banded rows. [Api set: WordApi 1.3]; + /// Specifies 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]; + /// Specifies whether the table has a first column with a special style. [Api set: WordApi 1.3]; + /// Specifies whether the table has a last column with a special style. [Api set: WordApi 1.3]; + /// Specifies whether the table has a total (last) row with a special style. [Api set: WordApi 1.3]; + /// Specifies the text values in the table, as a 2D JavaScript array. [Api set: WordApi 1.3]; + /// Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. [Api set: WordApi 1.3]; + /// Specifies the width of the table in points. [Api set: WordApi 1.3]; + } + return TableUpdateData; + })(); + Interfaces.TableUpdateData.__proto__ = null; + Interfaces.TableUpdateData = TableUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var TableStyleUpdateData = (function() { + function TableStyleUpdateData() { + /// An interface for updating data on the TableStyle object, for use in "tableStyle.set({ ... })". + /// Specifies the table's alignment against the page margin. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies whether lines in tables formatted with a specified style break across pages. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the amount of space to add between the contents and the bottom borders of the cells. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the spacing (in points) between the cells in a table style. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the amount of space to add between the contents and the left borders of the cells. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the amount of space to add between the contents and the right borders of the cells. [Api set: WordApi BETA (PREVIEW ONLY)]; + /// Specifies the amount of space to add between the contents and the top borders of the cells. [Api set: WordApi BETA (PREVIEW ONLY)]; + } + return TableStyleUpdateData; + })(); + Interfaces.TableStyleUpdateData.__proto__ = null; + Interfaces.TableStyleUpdateData = TableStyleUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var TableRowUpdateData = (function() { + function TableRowUpdateData() { + /// An interface for updating data on the TableRow object, for use in "tableRow.set({ ... })". + /// Gets the font. Use this to get and set font name, size, color, and other properties. [Api set: WordApi 1.3] + /// Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. [Api set: WordApi 1.3]; + /// Specifies the preferred height of the row in points. [Api set: WordApi 1.3]; + /// Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. [Api set: WordApi 1.3]; + /// Specifies the text values in the row, as a 2D JavaScript array. [Api set: WordApi 1.3]; + /// Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. [Api set: WordApi 1.3]; + } + return TableRowUpdateData; + })(); + Interfaces.TableRowUpdateData.__proto__ = null; + Interfaces.TableRowUpdateData = TableRowUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var TableCellUpdateData = (function() { + function TableCellUpdateData() { + /// An interface for updating data on the TableCell object, for use in "tableCell.set({ ... })". + /// Gets the body object of the cell. [Api set: WordApi 1.3] + /// Specifies the width of the cell's column in points. This is applicable to uniform tables. [Api set: WordApi 1.3]; + /// Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. [Api set: WordApi 1.3]; + /// Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. [Api set: WordApi 1.3]; + /// Specifies the text of the cell. [Api set: WordApi 1.3]; + /// Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. [Api set: WordApi 1.3]; + } + return TableCellUpdateData; + })(); + Interfaces.TableCellUpdateData.__proto__ = null; + Interfaces.TableCellUpdateData = TableCellUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var TableBorderUpdateData = (function() { + function TableBorderUpdateData() { + /// An interface for updating data on the TableBorder object, for use in "tableBorder.set({ ... })". + /// Specifies the table border color. [Api set: WordApi 1.3]; + /// Specifies the type of the table border. [Api set: WordApi 1.3]; + /// Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. [Api set: WordApi 1.3]; + } + return TableBorderUpdateData; + })(); + Interfaces.TableBorderUpdateData.__proto__ = null; + Interfaces.TableBorderUpdateData = TableBorderUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); +var Word; +(function (Word) { + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext() { + /// + /// 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. + /// + /// Root object for interacting with the document + _super.call(this, null); + } + return RequestContext; + })(OfficeExtension.ClientRequestContext); + Word.RequestContext = RequestContext; + + Word.run = function (batch) { + /// + /// + /// 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. + /// + /// + /// 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. + /// + ///
+ /// + /// + /// 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. + /// + /// + /// 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()". + /// + /// + /// 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. + /// + ///
+ /// + /// + /// 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. + /// + /// + /// 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()". + /// + /// + /// 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. + /// + ///
+ arguments[arguments.length - 1](new Word.RequestContext()); + return new OfficeExtension.Promise(); + } +})(Word || (Word = {__proto__: null})); +Word.__proto__ = null; \ No newline at end of file diff --git a/dist/office-with-first-party.d.ts b/dist/office-with-first-party.d.ts new file mode 100644 index 000000000..024e4fa96 --- /dev/null +++ b/dist/office-with-first-party.d.ts @@ -0,0 +1,137277 @@ +// Type definitions for Office.js 1.0 +// Project: https://github.com/OfficeDev/office-js +// Definitions by: OfficeDev , +// Ricky Kirkham , +// Alex Jerabek , +// Elizabeth Samuel , +// Alison McKay , +// Sam Ramon +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/* +office-js +Copyright (c) Microsoft Corporation +*/ + + +//////////////////////////////////////////////////////////////// +//////////////////// Begin Office namespace //////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace Office { + /** 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** + * + * For more information about Office application and server requirements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported applications, by platform* + * + * + * + * + * + * + * + *
Office on Windows Office in web browser Office on iPad Outlook on mobile devices Office on Mac
Excel Supported Supported Supported Supported
Outlook Supported Supported Supported Supported
PowerPoint Supported Supported Supported Supported
Project Supported Supported
Word Supported Supported Supported Supported
+ */ + 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 + * 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** + * + * For more information about Office application and server requirements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported applications, by platform* + * + * + * + * + * + * + * + *
Office on Windows Office in web browser Office on iPad Outlook on mobile devices Office on Mac
Excel Supported Supported Supported Supported
Outlook Supported Supported Supported Supported
PowerPoint Supported Supported Supported Supported
Project Supported Supported
Word Supported Supported Supported Supported
+ * + * @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 application 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 application, it will call + * the callback and resolve the promise with "null" for both the application and platform. + * + * @param callback - An optional callback function, that will receive the application 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 application 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** + * + * For more information about Office application and server requirements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported applications, by platform* + * + * + * + * + * + * + * + *
Office on Windows Office in web browser Office on iPad Outlook on mobile devices Office on Mac
Excel Supported Supported Supported
Outlook Supported Supported Supported Supported
PowerPoint Supported Supported Supported
Project Supported
Word Supported Supported Supported
+ * + * @param useShortNamespace True to use the shortcut alias; otherwise false to disable it. The default is true. + */ + function useShortNamespace(useShortNamespace: boolean): void; + /** + * Provides a method for associating action names with functions that carry out an action. + */ + const actions: Actions; + /** + * Represents the add-in. + */ + const addin: Addin; + /** + * Represents the Auth interface. + */ + const auth: Auth; + /** + * Represents the ribbon associated with the Office application. + */ + const ribbon: Ribbon; + /** + * Checks if the specified requirement set is supported by the Office application. + * @param name - Set name; e.g., "MatrixBindings". + * @param minVersion - The minimum required version; e.g., "1.4". + */ + function isSetSupported(name: string, minVersion?: string): boolean; + // Enumerations + /** + * Provides options to determine the startup behavior of the add-in upon next start-up. + */ + enum StartupBehavior { + /** + * The add-in does not load until opened by the user. + */ + none = 'None', + /** + * Load the add-in but do not show UI. + */ + load = 'Load', + } + /** + * Visibility mode of the add-in. + */ + enum VisibilityMode { + /** + * UI is Hidden + */ + hidden = 'Hidden', + /** + * Displayed as taskpane + */ + taskpane = 'Taskpane', + } + /** + * Specifies the result of an asynchronous call. + * + * @remarks + * + * Returned by the `status` property of the {@link Office.AsyncResult | AsyncResult} object. + */ + 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. + */ + 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 Office application in which the add-in is running. + * + * @remarks + * **Important**: In Outlook, this enum is available from Mailbox requirement set 1.5. + */ + enum HostType { + /** + * The Office application is Microsoft Word. + */ + Word, + /** + * The Office application is Microsoft Excel. + */ + Excel, + /** + * The Office application is Microsoft PowerPoint. + */ + PowerPoint, + /** + * The Office application is Microsoft Outlook. + */ + Outlook, + /** + * The Office application is Microsoft OneNote. + */ + OneNote, + /** + * The Office application is Microsoft Project. + */ + Project, + /** + * The Office application is Microsoft Access. + * + * **Important**: We no longer recommend that you create and use Access web apps and databases in SharePoint. + * As an alternative, we recommend that you use {@link https://powerapps.microsoft.com/ | Microsoft PowerApps} + * to build no-code business solutions for web and mobile devices. + */ + Access + } + /** + * Specifies the OS or other platform on which the Office application is running. + * + * @remarks + * **Important**: In Outlook, this enum is available from Mailbox requirement set 1.5. + */ + enum PlatformType { + /** + * The platform is PC (Windows). + */ + PC, + /** + * The platform is Office on the web (in a browser). + */ + OfficeOnline, + /** + * The platform is Mac. + */ + Mac, + /** + * The platform is 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. + * + * 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. + */ + asyncContext: any; + /** + * Gets an object that may provide additional information if an {@link Office.Error | error} occurred. + * + * @remarks + * + * This property returns additional information if the following errors occur with these supported APIs. + * + * *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. + */ + error: Office.Error; + /** + * Gets the {@link Office.AsyncResultStatus} of the asynchronous operation. + */ + 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. + */ + value: T; + } + /** + * Manages actions and keyboard shortcuts. + */ + interface Actions { + /** + * Associates the ID or name of an action with a function. + * + * @param actionId The ID of an action that is defined in an extended manifest or the name of the function as specified in a **FunctionName** element in the manifest. + * @param actionFunction The function that is run when the action is invoked. + */ + associate: (actionId: string, actionFunction: (arg?: any) => void) => void; + /** + * Replaces existing add-in shortcuts with custom shortcuts for the user. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/keyboard-shortcuts-requirement-sets | KeyboardShortcuts 1.1} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + * + * @param shortcuts An object of custom shortcuts with keys being the IDs of the actions (as defined in an extended manifest) and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2"}`. + * To learn how to specify a valid action ID and a key combination, see {@link https://learn.microsoft.com/office/dev/add-ins/design/keyboard-shortcuts | Add custom keyboard shortcuts to your Office Add-ins}. (Note that a key combination can be `null`, in which case, the action keeps the key combination specified in the JSON file.) + * @returns A promise that resolves when every custom shortcut assignment in `shortcuts` has been registered. Even if there is a conflict with existing shortcuts, the customized shortcut will be registered. + * Otherwise, the promise will be rejected with error code and error message. An "InvalidOperation" error code is returned if any action ID in `shortcuts` does not exist, or if shortcut combination is invalid. + */ + replaceShortcuts(shortcuts: {[actionId: string]: string}): Promise; + /** + * Gets the existing shortcuts for the add-in. The set always includes (1) the shortcuts defined in the add-in's extended manifest for keyboard shortcuts and (2) the current user's custom shortcuts if those exist. + * The shortcut can be `null` if it conflicts with the shortcut of another add-in or with the Office application. Specifically, it would be `null` if, when prompted to choose which shortcut to use, the user didn't choose the action of the current add-in. For more information about conflicts with shortcuts, see {@link https://learn.microsoft.com/office/dev/add-ins/design/keyboard-shortcuts#avoid-key-combinations-in-use-by-other-add-ins | Avoid key combinations in use by other add-ins}. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/keyboard-shortcuts-requirement-sets | KeyboardShortcuts 1.1} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + * + * @returns A promise that resolves to an object of shortcuts, with keys being the IDs of the actions (as defined in an extended manifest) and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2", "SetUnderline": null}`. + */ + getShortcuts(): Promise<{[actionId: string]: string|null}>; + /** + * Checks if a set of shortcut combinations are currently in use for the user, as defined by another add-in or by the Office application. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/keyboard-shortcuts-requirement-sets | KeyboardShortcuts 1.1} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + * + * @param shortcuts An array of shortcut combinations. For example, `["Ctrl+1", "Ctrl+2"]`. + * @returns A promise that resolves to an array of objects. Each object consists of a shortcut combination and Boolean value. The value is `true` if the shortcut combination conflicts with a shortcut of another add-in or with a shortcut of the Office application; otherwise, `false`. For example, `[{shortcut:"Ctrl+1", inUse:true},{shortcut:"Ctrl+2", inUse:false}]`. + */ + areShortcutsInUse(shortcuts: string[]): Promise<{shortcut: string, inUse: boolean}[]>; + } + /** + * Message used in the `onVisibilityModeChanged` invocation. + */ + interface VisibilityModeChangedMessage { + /** + * Visibility changed state. + */ + visibilityMode: Office.VisibilityMode; + } + /** + * Represents add-in level functionality for operating or configuring various aspects of the add-in. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + */ + interface Addin { + /** + * Sets the startup behavior for the add-in for when the document is opened next time. + * @param behavior - Specifies startup behavior of the add-in. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + */ + setStartupBehavior(behavior: Office.StartupBehavior): Promise; + /** + * Gets the current startup behavior for the add-in. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + */ + getStartupBehavior(): Promise; + /** + * Shows the task pane associated with the add-in. + * @returns A promise that is resolved when the UI is shown. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + */ + showAsTaskpane(): Promise; + /** + * Hides the task pane. + * @returns A promise that is resolved when the UI is hidden. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + */ + hide(): Promise; + /** + * Adds a handler for the `onVisibilityModeChanged` event. + * @param handler - The handler function that is called when the event is emitted. This function takes in a message for the receiving component. + * @returns A promise that resolves to a function when the handler is added. Calling it removes the handler. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + */ + onVisibilityModeChanged( + handler: (message: VisibilityModeChangedMessage) => void, + ): Promise<() => Promise>; + /** + * Represents a modal notification dialog that can appear when the user attempts to close a document. The document won't close until the user responds. + * This API is only supported in Excel. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} + */ + beforeDocumentCloseNotification: BeforeDocumentCloseNotification; + } + /** + * Represents a modal notification dialog that can appear when the user attempts to close a document. The document won't close until the user responds. + * The notification dialog will allow the user to confirm the request to close the document or cancel the request to close the document. + * This API is only supported in Excel. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} + */ + interface BeforeDocumentCloseNotification { + /** + * Enable a modal notification dialog that appears when the user attempts to close a document. The document won't close until the user responds. + * This notification dialog asks the user to confirm the request to close the document, or allows the user to cancel the request to close the document. + * The `BeforeDocumentCloseNotification` API is only supported in Excel. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} + */ + enable(): Promise; + + /** + * Prevents the notification dialog from appearing when the user attempts to close a document. + * The `BeforeDocumentCloseNotification` API is only supported in Excel. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} + */ + disable(): Promise; + + /** + * Adds an event handler that detects when the `BeforeDocumentCloseNotification` close operation is cancelled. + * This event handler will be triggered if both of the following conditions are met. + * + * 1. The add-in calls the `enable` method on the `BeforeDocumentCloseNotification` object. + * + * 2. When the notification dialog is open, the end user clicks the **Don't close** button within the dialog, clicks the Close button in the upper right corner of the dialog, or presses the Esc key. + * + * The `BeforeDocumentCloseNotification` API is only supported in Excel. + * @param handler The event handler that is called when the dialog is cancelled. + * @returns A promise that resolves when the event handler is added. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} + */ + onCloseActionCancelled( + handler: () => void + ): Promise<() => Promise>; + } + /** + * An interface that contains all the functionality provided to manage the state of the Office ribbon. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + */ + interface Ribbon { + /** + * Registers a custom contextual tab with Office and defines the tab's controls. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.2} + * + * This method only requests that the tab be registered. The actual registration is controlled by the Office application and may not be complete when the returned `Promise` object is resolved. + * For more information and code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}. + * + * @param tabDefinition - Specifies the tab's properties and child controls and their properties. This parameter isn't strongly typed because its shape is defined by a JSON schema that can be versioned. To create the parameter object, pass a JSON string that conforms to the Office {@link https://developer.microsoft.com/json-schemas/office-js/dynamic-ribbon.schema.json | dynamic-ribbon JSON schema} to `JSON.parse`, and then pass the returned object to this method. To get IntelliSense for the JSON in Visual Studio Code, see {@link https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings | Editing JSON with Visual Studio Code - JSON schemas and settings }. + */ + requestCreateControls(tabDefinition: Object): Promise; + /** + * Sends a request to Office to update the ribbon. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + * + * Note that this API is only to request an update. The actual UI update to the ribbon is controlled by the Office application and hence the exact timing of the ribbon update (or refresh) cannot be determined by the completion of this API. + * + * For code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Enable and Disable Add-in Commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}. + * + * @param input - Represents the updates to be made to the ribbon. Note that only the changes specified in the input parameter are made. + */ + requestUpdate(input: RibbonUpdaterData): Promise; + } + /** + * Specifies changes to the ribbon, such as the enabled or disabled status of a button. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + */ + interface RibbonUpdaterData { + /** + * Collection of tabs whose state is set with the call of `requestUpdate`. + */ + tabs: Tab[]; + } + /** + * Represents an individual tab and the state it should have. For code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Enable and Disable Add-in Commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + */ + interface Tab { + /** + * Identifier of the tab as specified in the manifest. + */ + id: string; + /** + * Specifies one or more of the controls in the tab, such as menu items, buttons, etc. + * + * @remarks + * + * When the `Tab` object is part of an {@link Office.RibbonUpdaterData} object passed to the `requestUpdate` method of {@link Office.Ribbon}, this property specifies the IDs of the controls whose enabled status is to be changed. However, if there is a `groups` property on the tab, then this property is ignored and the `controls` properties of the specified groups must be used to change enabled status. + */ + controls?: Control[]; + /** + * Specifies whether the tab is visible on the ribbon. Used only with contextual tabs. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.2} + */ + visible?: boolean; + /** + * Specifies one or more of the control groups on the tab. + * + * @remarks + * + * When the `Tab` object is part of an {@link Office.RibbonUpdaterData} object passed to the `requestUpdate` method of {@link Office.Ribbon}, the `controls` properties of the various {@link Office.Group} objects specify which controls have their enabled status changed; the `controls` property of the `Tab` object is ignored. + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + */ + groups?: Group[]; + } + /** + * Represents a group of controls on a ribbon tab. + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + */ + interface Group { + /** + * Identifier of the group as specified in the manifest. + * + */ + id: string; + /** + * Specifies one or more of the controls in the group, such as menu items, buttons, etc. + * + * @remarks + * + * When the `Group` object is part of an {@link Office.RibbonUpdaterData} object passed to the `requestUpdate` method of {@link Office.Ribbon}, the `controls` properties of the various {@link Office.Group} objects specify which controls have their enabled status changed; the `controls` property of the `Group` object's parent `Tab` object is ignored. + */ + controls?: Control[]; + } + /** + * Represents an individual control or command and the state it should have. + * + * @remarks + * + * For code samples showing how to use a `Control` object and its properties, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Enable and Disable Add-in Commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}. + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + */ + interface Control { + /** + * Identifier of the control as specified in the manifest. + */ + id: string; + /** + * Indicates whether the control should be enabled or disabled. The default is true. + */ + enabled?: boolean; + } + /** + * 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 + * + * **Applications**: Excel, Outlook, PowerPoint, Project, Word + */ + interface Context { + /** + * Provides information and access to the signed-in user. + * + * @beta + */ + auth: Auth; + /** + * True, if the current platform allows the add-in to display a UI for selling or upgrading; otherwise returns False. + * + * @remarks + * + * **Applications**: Excel, Word + * + * `commerceAllowed` is only supported in Office on iPad. + * + * The iOS App Store doesn't support apps with add-ins that provide links to additional payment systems. However, Office Add-ins running in + * Office on the Windows desktop or 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. + */ + 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 + * application. + * + * **Support details** + * + * For more information about Office application and server requirements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported applications, by platform* + * + * + * + * + * + * + * + *
Office on Windows Office in web browser Office on iPad Outlook on mobile devices Office on Mac
Excel Supported Supported Supported
Outlook Supported Supported Supported Supported
PowerPoint Supported Supported Supported
Project Supported
Word Supported Supported Supported
+ */ + contentLanguage: string; + /** + * Gets information about the environment in which the add-in is running. + * + * @remarks + * **Important**: In Outlook, this property is available from Mailbox requirement set 1.5. + * For all Mailbox requirement sets, you can use the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-diagnostics-member | Office.context.mailbox.diagnostics} + * property to get similar information. + */ + diagnostics: ContextInformation; + /** + * Gets the locale (language) specified by the user for the UI of the Office 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 + * application. + * + * When using in Outlook, the applicable modes are Compose or Read. + * + * **Support details** + * + * For more information about Office application and server requirements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported applications, by platform* + * + * + * + * + * + * + * + *
Office on Windows Office in web browser Office on iPad Outlook on mobile devices Office on Mac
Excel Supported Supported Supported Supported
Outlook Supported Supported Supported Supported
PowerPoint Supported Supported Supported Supported
Project Supported Supported
Word Supported Supported Supported
+ */ + displayLanguage: string; + /** + * Gets an object that represents the document the content or task pane add-in is interacting with. + */ + document: Office.Document; + /** + * Contains the Office application in which the add-in is running. + * + * @remarks + * **Important**: In Outlook, this property is available from Mailbox requirement set 1.5. You can also use the + * `Office.context.diagnostics` property to get the application starting with requirement set 1.5. For all + * Mailbox requirement sets, you can use the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-diagnostics-member | Office.context.mailbox.diagnostics} + * property to get similar information. + */ + host: HostType; + /** + * Gets the license information for the user's Office installation. + */ + license: string; + /** + * Provides access to the Microsoft Outlook add-in object model. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Key properties**: + * + * - `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. + */ + mailbox: Office.Mailbox; + /** + * Provides access to the properties for Office theme colors. + */ + officeTheme: OfficeTheme; + /** + * Provides the platform on which the add-in is running. + * + * @remarks + * **Important**: In Outlook, this property is available from Mailbox requirement set 1.5. You can also use the + * `Office.context.diagnostics` property to get the platform starting with requirement set 1.5. For all + * Mailbox requirement sets, you can use the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-diagnostics-member | Office.context.mailbox.diagnostics} + * property to get similar information. + */ + platform: PlatformType; + /** + * Provides a method for determining what requirement sets are supported on the current Office application 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 it's available to + * that add-in when it is running from any client application used to access that mailbox. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + roamingSettings: Office.RoamingSettings; + /** + * Gets the object to check the status of the catalog of sensitivity labels in Outlook and retrieve all available + * sensitivity labels if the catalog is enabled. + * + * @remarks + * + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + sensitivityLabelsCatalog: Office.SensitivityLabelsCatalog; + /** + * 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 + * + * **Applications**: Excel, PowerPoint, Word + * + * `touchEnabled` is only supported in Office on iPad. + * + * 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. + */ + 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. + */ + interface Error { + /** + * Gets the numeric code of the error. For a list of error codes, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/javascript-api-for-office-error-codes | JavaScript API for Office error codes}. + */ + code: number; + /** + * Gets a detailed description of the error. + */ + message: string; + /** + * Gets the name of the error. + */ + name: string; + } + namespace AddinCommands { + /** + * The `Event` object is passed as a parameter to add-in functions invoked by function command buttons. The object allows the add-in to identify + * which button was clicked and to signal the Office application that it has completed its processing. + * + * @remarks + * + * See {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/add-in-commands-requirement-sets | Add-in commands requirement sets} for more support information. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface Event { + /** + * Information about the control that triggered calling this function. + * + * @remarks + * + * This property is supported in Outlook only in {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | requirement set} Mailbox 1.3 and later. + */ + source:Source; + /** + * Indicates that the add-in has completed processing and will automatically be closed. + * + * This method must be called at the end of a function which was invoked by the following: + * + * - A function command button (that is, an add-in command defined with an `Action` element, where the `xsi:type` attribute is set to `ExecuteFunction`). + * + * - An event defined in the {@link https://learn.microsoft.com/javascript/api/manifest/extensionpoint#launchevent | LaunchEvent extension point}. + * For example, an `OnMessageSend` event. + * + * - An {@link https://learn.microsoft.com/javascript/api/manifest/event | event} defined in the + * {@link https://learn.microsoft.com/javascript/api/manifest/extensionpoint#events | Events extension point}. For example, an `ItemSend` event. + * + * - An event defined in the + * {@link https://learn.microsoft.com/javascript/api/manifest/extensionpoint?view=outlook-js-preview&preserve-view=true#reportphishingcommandsurface-preview | ReportPhishingCommandSurface extension point (preview)}. + * + * @remarks + * + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Note**: The `options` parameter was introduced in Mailbox 1.8. + * + * @param options Optional. An object that specifies behavior options for when the event is completed. + */ + completed(options?: EventCompletedOptions): void; + } + /** + * Specifies the behavior for when the event is completed. + */ + interface EventCompletedOptions { + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method} + * to signal completion of an event handler, this property indicates if the handled event should continue execution or be canceled. + * For example, an add-in that handles the `OnMessageSend` or `OnAppointmentSend` event can set `allowEvent` to `false` to cancel the + * sending of an item. For a complete sample, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}. + * + * **Important**: Only applicable to add-ins that implement {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}. + * + * @remarks + * + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + allowEvent?: boolean; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method} + * to signal completion of an event handler and set its `allowEvent` property to `false`, this property sets the error message + * that will be displayed to the user. For an example, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}. + * + * **Important**: Only applicable to add-ins that implement {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}. + * + * @remarks + * + * [Api set: Mailbox 1.12] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + errorMessage?: string; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method} + * to signal that a reported message has finished processing, this property specifies the Outlook mailbox folder to which the message will be moved. + * + * **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam reporting feature}. + * + * @remarks + * + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - If the specified folder doesn't exist yet, it will be created before the message is moved. + * + * - If the `postProcessingAction` property is set to `moveToCustomFolder`, the `folderName` property must be specified. + * Otherwise, the reported message is moved to the Junk Email folder of the mailbox. If `postProcessingAction` is set to another action other than `moveToCustomFolder`, + * the `folderName` property is ignored. + * + * @beta + */ + folderName?: string; + /** + * When set to `true`, deletes a reported message if an error occurs while the message is processed. + * If this property is set to `false` or isn't specified in the + * {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method}, + * the reported message remains in its current mailbox folder. + * + * **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam reporting feature}. + * + * @remarks + * + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + onErrorDeleteItem?: boolean; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method} + * to signal that a reported message has finished processing, this property specifies the next action to be performed on the message. The following post-processing actions are available: + * + * - `delete` - Deletes the reported message. + * + * - `moveToCustomFolder` - Moves the reported message to a specified folder. You must specify the name of the folder in the `folderName` property. + * + * - `moveToSpamFolder` - Moves the reported message to the Junk Email folder of the mailbox. + * + * - `noMove` - Leaves the reported message in its current folder. + * + * **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam reporting feature}. + * + * @remarks + * + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: If the property is set to `moveToCustomFolder`, you must specify the name of the folder to which the message will be moved in the `folderName` + * property of the `event.completed` call. Otherwise, the `postProcessingAction` property will default to `moveToSpamFolder` and move the reported message to the + * Junk Email folder. + * + * @beta + */ + postProcessingAction?: string; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method} + * to signal that a reported message has finished processing, this property indicates if a post-processing dialog is shown to the user. The JSON object assigned to this property + * must contain a title and a description. If this property isn't specified, a dialog isn't shown to the user once their reported message is processed. + * + * **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam reporting feature}. + * + * @remarks + * + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + showPostProcessingDialog?: object; + } + /** + * 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. + */ + 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://learn.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 { + /** + * Adds an event handler to the object using the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi 1.2} + * + * You can add multiple event handlers for the specified event type as long as the name of each event handler function is unique. + * + * @param eventType Specifies the type of event to add. This must be `Office.EventType.DialogParentMessageReceived`. + * @param handler The event handler function to add, whose only parameter is of type {@link Office.DialogParentMessageReceivedEventArgs}. + * @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 handler registration returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addHandlerAsync(eventType: Office.EventType, handler: (result: DialogParentMessageReceivedEventArgs) => void, options: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds an event handler to the object using the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi 1.2} + * + * You can add multiple event handlers for the specified event type as long as the name of each event handler function is unique. + * + * @param eventType Specifies the type of event to add. This must be `Office.EventType.DialogParentMessageReceived`. + * @param handler The event handler function to add, whose only parameter is of type {@link Office.DialogParentMessageReceivedEventArgs}. + * @param callback Optional. A function that is invoked when the handler registration returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addHandlerAsync(eventType: Office.EventType, handler: (result: DialogParentMessageReceivedEventArgs) => void, callback?: (result: AsyncResult) => void): void; + /** + * Displays a dialog to show or collect information from the user or to facilitate Web navigation. + * + * @remarks + * + * **Applications**: Excel, Outlook, PowerPoint, Word + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | Mailbox 1.4} + * + * This method is available in the DialogApi requirement set for Excel, PowerPoint, or Word 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://learn.microsoft.com/office/dev/add-ins/develop/specify-office-hosts-and-api-requirements | Specify Office applications and API requirements}, if you're using the XML manifest. If you're using the Teams manifest (preview), see {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * 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 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. + * + * **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 AppDomains 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.
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 + * following information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse
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 full HTTPS URL that opens in the dialog. Relative URLs must not be used. + * @param options - Optional. Accepts an {@link Office.DialogOptions} object to define dialog display. + * @param callback - Optional. Accepts a callback function 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; + /** + * Displays a dialog to show or collect information from the user or to facilitate Web navigation. + * + * @remarks + * + * **Applications**: Excel, Outlook, PowerPoint, Word + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | Mailbox 1.4} + * + * This method is available in the DialogApi requirement set for Excel, PowerPoint, or Word 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://learn.microsoft.com/office/dev/add-ins/develop/specify-office-hosts-and-api-requirements | Specify Office applications and API requirements}, if you're using the XML manifest. If you're using the Teams manifest (preview), see {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * 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 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. + * + * **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 AppDomains 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.
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 + * following information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse
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 full HTTPS URL that opens in the dialog. Relative URLs must not be used. + * @param callback - Optional. Accepts a callback function to handle the dialog creation attempt. If successful, the AsyncResult.value is a Dialog object. + */ + displayDialogAsync(startAddress: string, callback?: (result: AsyncResult) => void): void; + /** + * Delivers a message from the dialog box to its parent/opener page. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} + * + * - If the `messageOptions` parameter is used, {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1} is also required. + * + * @param message Accepts a message from the dialog to deliver to the add-in. Anything that can serialized to a string including JSON and XML can be sent. + * @param messageOptions Optional. Provides options for how to send the message. + */ + messageParent(message: string, messageOptions?: DialogMessageOptions): void; + /** + * Closes the UI container where the JavaScript is executing. + * + * @remarks + * + * **Applications**: Excel, Outlook (Minimum requirement set: Mailbox 1.5), PowerPoint, Word + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | 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 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. + */ + closeContainer(): void; + /** + * Opens a browser window and loads the specified URL. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/open-browser-window-api-requirement-sets | OpenBrowserWindowApi 1.1} + * + * @param url The full URL to be opened including protocol (e.g., https), and port number, if any. + */ + openBrowserWindow(url: string): void; + } + /** + * Provides information about which Requirement Sets are supported in the current environment. + */ + interface RequirementSetSupport { + /** + * Check if the specified requirement set is supported by the Office application. + * @param name - The requirement set name (e.g., "ExcelApi"). + * @param minVersion - The minimum required version (e.g., "1.4"). + */ + isSetSupported(name: string, minVersion?: string): boolean; + + /** + * Check if the specified requirement set is supported by the Office application. + * + * **Warning**: This overload of `isSetSupported` (where `minVersionNumber` is a number) has been deprecated. Use the string overload of `isSetSupported` instead. + * + * @deprecated Use the string overload of `isSetSupported` instead. + * @param name - The requirement set name (e.g., "ExcelApi"). + * @param minVersionNumber - The minimum required version (e.g., 1.4). + */ + isSetSupported(name: string, minVersionNumber?: number): boolean; + } + /** + * Provides options for how a dialog is displayed. + */ + interface DialogOptions { + /** + * Defines the height of the dialog as a percentage of the current display. Defaults to 80%. 250px minimum. + */ + height?: number, + /** + * Defines the width 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 on the web, 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 + /** + * Determines if the pop-up blocker dialog will be shown to the user. Defaults to true. + * + * `true` - The framework displays a pop-up to trigger the navigation and avoid the browser's pop-up blocker. + * `false` - The dialog will not be shown and the developer must handle pop-ups (by providing a user interface artifact to trigger the navigation). + */ + promptBeforeOpen?: 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 + } + /** + * The Office Auth namespace, `Office.auth`, provides a method that allows the Office client application to obtain an access token to the add-in's web application. + * Indirectly, this also enables the add-in to access the signed-in user's Microsoft Graph data without requiring the user to sign in a second time. + */ + interface Auth { + /** + * Calls the Azure Active Directory V 2.0 endpoint to get an access token to your add-in's web application. Enables add-ins to identify users. + * Server-side code can use this token to access Microsoft Graph for the add-in's web application by using the + * {@link https://learn.microsoft.com/azure/active-directory/develop/active-directory-v2-protocols-oauth-on-behalf-of | "on behalf of" OAuth flow}. + * + * **Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail mailbox. + * + * **Warning**: `getAccessTokenAsync` has been deprecated. Use `Office.auth.getAccessToken` instead. + * + * @deprecated Use `Office.auth.getAccessToken` instead. + * + * @remarks + * + * **Applications**: Excel, OneNote, Outlook, PowerPoint, Word + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3} + * + * This API requires a single sign-on configuration that bridges the add-in to an Azure application. Office users sign in with Organizational + * Accounts and Microsoft Accounts. Microsoft Azure returns tokens intended for both user account types to access resources in the Microsoft Graph. + * + * @param options - Optional. Accepts an `AuthOptions` object to define sign-on behaviors. + * @param callback - Optional. Accepts a callback function that can parse the token for the user's ID or use the token in the "on behalf of" flow to get access to Microsoft Graph. + * If `AsyncResult.status` is "succeeded", then `AsyncResult.value` is the raw AAD v. 2.0-formatted access token. + */ + getAccessTokenAsync(options?: AuthOptions, callback?: (result: AsyncResult) => void): void; + /** + * Calls the Azure Active Directory V 2.0 endpoint to get an access token to your add-in's web application. Enables add-ins to identify users. + * Server-side code can use this token to access Microsoft Graph for the add-in's web application by using the + * {@link https://learn.microsoft.com/azure/active-directory/develop/active-directory-v2-protocols-oauth-on-behalf-of | "on behalf of" OAuth flow}. + * + * **Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail mailbox. + * + * **Warning**: `getAccessTokenAsync` has been deprecated. Use `Office.auth.getAccessToken` instead. + * + * @deprecated Use `Office.auth.getAccessToken` instead. + * + * @remarks + * + * **Applications**: Excel, OneNote, Outlook, PowerPoint, Word + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3} + * + * This API requires a single sign-on configuration that bridges the add-in to an Azure application. Office users sign in with Organizational + * Accounts and Microsoft Accounts. Microsoft Azure returns tokens intended for both user account types to access resources in the Microsoft Graph. + * + * @param callback - Optional. Accepts a callback function that can parse the token for the user's ID or use the token in the "on behalf of" flow to get access to Microsoft Graph. + * If `AsyncResult.status` is "succeeded", then `AsyncResult.value` is the raw AAD v. 2.0-formatted access token. + */ + getAccessTokenAsync(callback?: (result: AsyncResult) => void): void; + /** + * Calls the Azure Active Directory V 2.0 endpoint to get an access token to your add-in's web application. Enables add-ins to identify users. + * Server-side code can use this token to access Microsoft Graph for the add-in's web application by using the + * {@link https://learn.microsoft.com/azure/active-directory/develop/active-directory-v2-protocols-oauth-on-behalf-of | "on behalf of" OAuth flow}. + * This API requires a single sign-on configuration that bridges the add-in to an Azure application. Office users sign in with Organizational + * Accounts and Microsoft Accounts. Microsoft Azure returns tokens intended for both user account types to access resources in the Microsoft Graph. + * + * @remarks + * + * **Applications**: Excel, OneNote, Outlook, PowerPoint, Word + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3} + * + * **Important**: + * + * - In Outlook, this API isn't supported if you load an add-in in an Outlook.com or Gmail mailbox. + * + * - In Outlook on the web, this API isn't supported if you use the Safari browser. This results in error 13001 ("The user is not signed into Office"). + * + * - In Outlook on the web, if you use the + * {@link https://learn.microsoft.com/javascript/api/office/office.ui#office-office-ui-displaydialogasync-member(1) | displayDialogAsync} + * method to open a dialog, you must close the dialog before you can call `getAccessToken`. + * + * - In an Outlook event-based activation add-in, this API is supported in Outlook on Windows starting from Version 2111 (Build 14701.20000). + * To retrieve an access token in older builds, use + * {@link https://learn.microsoft.com/javascript/api/office-runtime/officeruntime.auth?view=common-js-preview#office-runtime-officeruntime-auth-getaccesstoken-member(1) | + * OfficeRuntime.auth.getAccessToken} instead. For more information, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-sso-in-event-based-activation | Enable single sign-on (SSO) in Outlook add-ins that use event-based activation}. + * + * @param options - Optional. Accepts an `AuthOptions` object to define sign-on behaviors. + * @returns Promise to the access token. + */ + getAccessToken(options?: AuthOptions): Promise; + } + /** + * Provides options for the user experience when Office obtains an access token to the add-in from AAD v. 2.0 with the `getAccessToken` method. + */ + interface AuthOptions { + /** + * Allows Office to get an access token silently or through interactive consent, if one is required. Default value is `false`. + * If set to `false`, Office will silently try to get an access token. If it fails to do so, Office will return a descriptive error. + * If set to `true`, Office will show an interactive consent UI after it fails to silently get an access token. + * The prompt will only allow consent to the AAD profile scope, not to any Microsoft Graph scopes. + */ + allowConsentPrompt?: boolean; + /** + * Allows Office to get an access token silently provided consent is present or show interactive UI to sign in the user. Default value is `false`. + * If set to `false`, Office will silently try to get an access token. If it fails to do so, Office will return a descriptive error. + * If set to `true`, Office will show an interactive sign-in UI after it fails to silently get an access token. + */ + allowSignInPrompt?: boolean; + /** + * Prompts the user to add their Office account (or to switch to it, if it is already added). Default value is `false`. + * + * **Warning**: `forceAddAccount` has been deprecated. Use `allowSignInPrompt` instead. + * + * @deprecated Use `allowSignInPrompt` instead. + */ + forceAddAccount?: boolean; + /** + * Causes Office to display the add-in consent experience. Useful if the add-in's Azure permissions have changed or if the user's consent has + * been revoked. Default value is `false`. + * + * **Warning**: `forceConsent` has been deprecated. Use `allowConsentPrompt` instead. + * + * @deprecated Use `allowConsentPrompt` instead. + */ + forceConsent?: boolean; + /** + * Causes Office to prompt the user to provide the additional factor when the tenancy being targeted by Microsoft Graph requires multifactor + * authentication. The string value identifies the type of additional factor that is required. In most cases, you won't know at development + * time whether the user's tenant requires an additional factor or what the string should be. So this option would be used in a "second try" + * call of `getAccessToken` after Microsoft Graph has sent an error requesting the additional factor and containing the string that should + * be used with the `authChallenge` option. + */ + authChallenge?: 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; + /** + * Causes Office to return a descriptive error when the add-in wants to access Microsoft Graph and the user/admin has not granted consent to Graph scopes. Default value is `false`. + * Office only supports consent to Graph scopes when the add-in has been deployed by a tenant admin. + * Setting this option to `true` will cause Office to inform your add-in beforehand (by returning a descriptive error) if Graph access will fail. + * + * @remarks + * + * **Note**: If you're developing an Outlook add-in that uses single sign-on (SSO), comment out the `forMSGraphAccess` option before sideloading the add-in for testing. + * Otherwise, you'll receive {@link https://learn.microsoft.com/office/dev/add-ins/develop/troubleshoot-sso-in-office-add-ins#13012 | error 13012}. For additional guidance, see + * {@link https://learn.microsoft.com/office/dev/add-ins/develop/authorize-to-microsoft-graph#details-on-sso-with-an-outlook-add-in | Details on SSO with an Outlook add-in}. + */ + forMSGraphAccess?: boolean; + } + /** + * 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. + * + * @remarks + * **Important**: In Outlook, this object is available from Mailbox requirement set 1.5. + * For all Mailbox requirement sets, you can use the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-diagnostics-member | Office.context.mailbox.diagnostics} + * property to get similar information. + */ + interface ContextInformation { + /** + * Gets the Office application 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. + * + * **Important**: We no longer recommend that you create and use Access web apps and databases in SharePoint. + * As an alternative, we recommend that you use {@link https://powerapps.microsoft.com/ | Microsoft PowerApps} + * to build no-code business solutions for web and mobile devices. + */ + 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?: RangeFormatConfiguration[] + /** + * 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. + * + * **Important**: We no longer recommend that you create and use Access web apps and databases in SharePoint. + * As an alternative, we recommend that you use {@link https://powerapps.microsoft.com/ | Microsoft PowerApps} + * to build no-code business solutions for web and mobile devices. + */ + 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. + * + * **Important**: We no longer recommend that you create and use Access web apps and databases in SharePoint. + * As an alternative, we recommend that you use {@link https://powerapps.microsoft.com/ | Microsoft PowerApps} + * to build no-code business solutions for web and mobile devices. + */ + 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 a particular handler is not specified, then all handlers for the specified event type are removed. + */ + handler?: (eventArgs?: Office.BindingDataChangedEventArgs | Office.BindingSelectionChangedEventArgs) => any + /** + * 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. + * + * **Important**: We no longer recommend that you create and use Access web apps and databases in SharePoint. + * As an alternative, we recommend that you use {@link https://powerapps.microsoft.com/ | Microsoft PowerApps} + * to build no-code business solutions for web and mobile devices. + */ + 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 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?: 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 setting the size of slices that the document will be divided into. + */ + interface GetFileOptions { + /** + * 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 Office application: + * + * 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?: RangeFormatConfiguration[] + /** + * 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 { + /** + * **Warning**: This setting has been deprecated and should not be used. It has no effect on most platforms and will cause errors if set to `false` in Excel on the web. + * + * @deprecated `overwriteIfStale` is no longer supported. + */ + 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 applications. Using Office theme colors is appropriate for mail and + * task pane add-ins. + * + * @remarks + * + * *Supported applications, by platform* + * + * + * + * + * + * + *
Office on Windows Office on the web
Excel Supported
Outlook Preview
PowerPoint Supported
Word Supported Supported
+ */ + 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 control foreground 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. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} + */ + interface Dialog { + /** + * Called from a parent page to close the corresponding dialog box. + * + * This method is asynchronous. It does not take a callback parameter and it does not return a Promise object, so it cannot be awaited with either the `await` keyword or the `then` function. See this best practice for more information: {@link https://learn.microsoft.com/office/dev/add-ins/develop/dialog-best-practices#opening-another-dialog-immediately-after-closing-one | Opening another dialog immediately after closing one} + */ + 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. + * + * @param eventType Must be either DialogMessageReceived or DialogEventReceived. + * @param handler A function which accepts either an object with a `message` and `origin` property, if `eventType` is `DialogMessageReceived`, or an object with an `error` property, if `eventType` is `DialogEventReceived`. Note that the `origin` property is `undefined` on clients that don’t support {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1}. + */ + addEventHandler(eventType: Office.EventType, handler: (args: {message: string, origin: string | undefined} | {error: number}) => void): void; + /** + * Delivers a message from the host page, such as a task pane or a UI-less function file, to a dialog that was opened from the page. + * + * @remarks + * + * **Applications**: Excel, Outlook (Minimum requirement set: Mailbox 1.9), PowerPoint, Word + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi 1.2} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | Mailbox 1.9} + * + * - If the `messageOptions` parameter is used, {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1} is also required. + * + * @param message Accepts a message from the host page to deliver to the dialog. Anything that can be serialized to a string, including JSON and XML, can be sent. + * @param messageOptions Optional. Provides options for how to send the message. + */ + messageChild(message: string, messageOptions?: DialogMessageOptions): void; + /** + * FOR INTERNAL USE ONLY. DO NOT CALL IN YOUR CODE. + */ + sendMessage(name: string): void; + } + /** + * Returns a promise of an object described in the expression. Callback is invoked only if the function 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** + * + * For more information about Office application and server requirements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported applications, by platform* + * + * + * + * + *
Office on Windows Office in web browser Office on iPad
Excel Supported Supported Supported
Word Supported Supported
+ */ + 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. + */ + enum ActiveView { + /** + * The active view of the Office application only lets the user read the content in the document. + */ + Read, + /** + * The active view of the Office application lets the user edit the content in the document. + */ + Edit + } + /** + * Specifies the type of the binding object that should be returned. + */ + 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 + * + * Application and platform support for each `CoercionType` is specified in the following requirement set descriptions. + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion}, (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets | ImageCoercion 1.1} (when using `Office.CoercionType.Image`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets#imagecoercion-12 | ImageCoercion 1.2} (when using `Office.CoercionType.XmlSvg`) + * + */ + 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 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, + /** + * Data is returned or set as XML data containing an SVG image. + * **Note**: Only applies to data in Excel, Word, and PowerPoint. + */ + XmlSvg + } + /** + * 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. + */ + enum DocumentMode { + /** + * The document is read-only. + */ + ReadOnly, + /** + * The document can be read and written to. + */ + ReadWrite + } + /** + * Specifies the type of the XML node. + */ + 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. + * + * Only task pane add-ins for Outlook support Mailbox API set event types. + * + * @remarks + * + * **`BindingDataChanged` and `BindingSelectionChanged` applications**: Excel, Word. + * + */ + enum EventType { + /** + * A Document.ActiveViewChanged event was raised in PowerPoint. + * + * @remarks + * + * **Applications**: PowerPoint + */ + ActiveViewChanged, + /** + * Occurs when any date or time of the selected appointment or series is changed in Outlook. + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `AppointmentTimeChanged` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.appointmenttimechangedeventargs?view=outlook-js-1.7 | Office.AppointmentTimeChangedEventArgs}. + * + * [Api set: Mailbox 1.7] + */ + AppointmentTimeChanged, + /** + * Occurs when an attachment is added to or removed from an item. **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `AttachmentsChanged` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.attachmentschangedeventargs?view=outlook-js-1.8 | Office.AttachmentsChangedEventArgs}. + * + * [Api set: Mailbox 1.8] + */ + 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. + * The event handler receives an argument of type {@link Office.BindingDataChangedEventArgs}. + * + * @remarks + * + * **Applications**: Excel, Word + */ + 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 + * + * **Applications**: Excel, Word + */ + BindingSelectionChanged, + /** + * Triggers when Dialog has an event, such as dialog closed or dialog navigation failed. + */ + DialogEventReceived, + /** + * Triggers when a dialog sends a message via `messageParent`. + */ + DialogMessageReceived, + /** + * Triggers when a host page sends a message to a child dialog box with `messageChild`. + */ + DialogParentMessageReceived, + /** + * Triggers when a document-level selection happens. + * + * @remarks + * + * **Applications**: Excel, Word + */ + DocumentSelectionChanged, + /** + * Occurs when the appointment location is changed in Outlook. **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `EnhancedLocationsChanged` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.enhancedlocationschangedeventargs?view=outlook-js-1.8 | Office.EnhancedLocationsChangedEventArgs}. + * + * [Api set: Mailbox 1.8] + */ + EnhancedLocationsChanged, + /** + * Occurs in Outlook when an action is selected on a notification message with a defined + * {@link https://learn.microsoft.com/javascript/api/outlook/office.notificationmessagedetails#actions | custom action}. + * Currently, "Dismiss" is the only supported action that fires this event. + * + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `InfobarClicked` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.infobarclickedeventargs?view=outlook-js-1.10 | Office.InfobarClickedEventArgs}. + * + * [Api set: Mailbox 1.10] + */ + InfobarClicked, + /** + * Occurs when a different Outlook item is selected for viewing while the task pane is pinned. + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `ItemChanged` event, use the `addHandlerAsync` method of the `Mailbox` object. + * + * [Api set: Mailbox 1.5] + */ + 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, + /** + * Occurs when the OfficeTheme is changed in Outlook. **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `OfficeThemeChanged` event, use the `addHandlerAsync` method of the `Mailbox` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.officethemechangedeventargs?view=outlook-js-preview | Office.OfficeThemeChangedEventArgs}. + * + * [Api set: Mailbox preview] + * + * @beta + */ + OfficeThemeChanged, + /** + * Occurs when the recipient list of the selected item or the appointment location is changed in Outlook. + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `RecipientsChanged` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.recipientschangedeventargs?view=outlook-js-1.7 | Office.RecipientsChangedEventArgs}. + * + * [Api set: Mailbox 1.7] + */ + RecipientsChanged, + /** + * Occurs when the recurrence pattern of the selected series is changed in Outlook. + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `RecurrenceChanged` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.recurrencechangedeventargs?view=outlook-js-1.7 | Office.RecurrenceChangedEventArgs}. + * + * [Api set: Mailbox 1.7] + */ + RecurrenceChanged, + /** + * Triggers when a Resource selection happens in Project. + */ + ResourceSelectionChanged, + /** + * Occurs in Outlook when one or more messages are selected or deselected. + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `SelectedItemsChanged` event, use the `addHandlerAsync` method of the `Mailbox` object. + * + * [Api set: Mailbox 1.13] + */ + SelectedItemsChanged, + /** + * Occurs in Outlook when the sensitivity label of a message or appointment changes. + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `SensitivityLabelChanged` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.sensitivitylabelchangedeventargs | Office.SensitivityLabelChangedEventArgs}. + * + * [Api set: Mailbox 1.13] + */ + SensitivityLabelChanged, + /** + * A Settings.settingsChanged event was raised. + * + * @remarks + * + * **Applications**: Excel, PowerPoint, Word + */ + SettingsChanged, + /** + * Occurs in Outlook when an unsolicited message is reported. The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.spamreportingeventargs?view=outlook-js-preview&preserve-view=true | Office.SpamReportingEventArgs}. + * + * [Api set: Mailbox preview] + * + * @beta + */ + SpamReporting, + /** + * 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. + */ + enum FileType { + /** + * Returns only the text of the document as a string. + */ + Text, + /** + * Returns the entire document (.pptx, .docx, .xlsx, or .xlsm) in Office Open XML (OOXML) format as a byte array. + * + * Note: The .xslm file type is supported in Excel on Windows and Mac. It's not supported in Excel on the web. + * In Excel on Windows, the file slices from the `getFileAsync` method include the VBA signature files for .xslm file types. The VBA signature files are vbaProjectSignature.bin, vbaProbjectSignatureAgile.bin, and vbaProjectSignatureV3.bin. + * In Excel on Mac, the file slices from the `getFileAsync` method don't include the VBA signature files, because this platform doesn't support the VBA signature feature. + */ + Compressed, + /** + * Returns the entire document in PDF format as a byte array. + */ + Pdf + } + /** + * Specifies whether filtering from the Office application is applied when the data is retrieved. + */ + enum FilterType { + /** + * Return all data (not filtered by the Office application). + */ + All, + /** + * Return only the visible data (as filtered by the Office application). + */ + OnlyVisible + } + /** + * Specifies the type of place or object to navigate to. + */ + enum GoToType { + /** + * Goes to a binding object using the specified binding ID. + * + * Supported applications: 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 applications: Excel + */ + NamedItem, + /** + * Goes to a slide using the specified ID. + * + * Supported applications: PowerPoint + */ + Slide, + /** + * Goes to the specified index by slide number or {@link Office.Index}. + * + * Supported applications: PowerPoint + */ + Index + } + /** + * Specifies the relative PowerPoint slide. + */ + 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). + */ + 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 + * Office 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. + */ + enum ValueFormat { + /** + * Return unformatted data. + */ + Unformatted, + /** + * Return formatted data. + */ + Formatted + } + // Objects + /** + * Represents a binding to a section of the document. + * + * 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. + * + * @remarks + * + * **Applications**: Word, Excel (deprecated, use {@link https://learn.microsoft.com/javascript/api/excel/excel.binding?view=excel-js-preview | Excel.Binding} instead) + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + */ + 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 + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#bindingevents | BindingEvents} + * + * 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; + /** + * Adds an event handler to the object for the specified {@link Office.EventType}. Supported EventTypes are + * `Office.EventType.BindingDataChanged` and `Office.EventType.BindingSelectionChanged`. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#bindingevents | BindingEvents} + * + * 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 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, callback?: (result: Office.AsyncResult) => void): void; + /** + * Returns the data contained within the binding. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * 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; + /** + * Returns the data contained within the binding. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * 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 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(callback?: (result: AsyncResult) => void): void; + /** + * Removes the specified handler from the binding for the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#bindingevents | BindingEvents} + * + * @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; + /** + * Removes the specified handler from the binding for the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#bindingevents | BindingEvents} + * + * @param eventType The event type. For bindings, it can be `Office.EventType.BindingDataChanged` or `Office.EventType.BindingSelectionChanged`. + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Writes data to the bound section of the document represented by the specified binding object. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * 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"]].
A 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 a 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.
A TableData object, and the shape of the table matches the bound tableThe 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 on the web: + * + * - 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
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.asyncContextDefine an 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 Office application: + * + * string: Excel on the web and Windows, and Word on the web and Windows only + * + * array of arrays: Excel and Word only + * + * {@link Office.TableData}: Excel and Word only + * + * HTML: Word on the web and Windows 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; + /** + * Writes data to the bound section of the document represented by the specified binding object. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * 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"]].
A 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 a 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.
A TableData object, and the shape of the table matches the bound tableThe 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 on the web: + * + * - 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
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.asyncContextDefine an 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 Office application: + * + * string: Excel on the web and Windows, and Word on the web and Windows only + * + * array of arrays: Excel and Word only + * + * `TableData`: Excel and Word only + * + * HTML: Word on the web and Windows only + * + * Office Open XML: Word only + * + * @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, callback?: (result: AsyncResult) => void): void; + } + /** + * Provides information about the binding that raised the DataChanged event. + */ + 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. + */ + 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. + */ + document: Document; + /** + * Creates a binding against a named object in the document. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | 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. + * + * @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; + /** + * Creates a binding against a named object in the document. + * + * @remarks + * + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings}, + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings}, + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | 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. + * + * @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 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, callback?: (result: AsyncResult) => void): void; + /** + * Create a binding by prompting the user to make a selection on the document. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not 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. + * + * @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 by prompting the user to make a selection on the document. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not 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. + * + * @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 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, callback?: (result: AsyncResult) => void): void; + /** + * Create a binding based on the user's current selection. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | 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. + * + * @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 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; + /** + * Create a binding based on the user's current selection. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | 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. + * + * @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 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, callback?: (result: AsyncResult) => void): void; + /** + * Gets all bindings that were previously created. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * @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; + /** + * Gets all bindings that were previously created. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * @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(callback?: (result: AsyncResult) => void): void; + /** + * Retrieves a binding based on its Name + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * Fails if the specified ID does not exist. + * + * @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; + /** + * Retrieves a binding based on its Name + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * Fails if the specified ID does not exist. + * + * @param id Specifies the unique name of the binding object. 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 Binding object specified by the ID in the call. + */ + getByIdAsync(id: string, callback?: (result: AsyncResult) => void): void; + /** + * Removes the binding from the document + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * Fails if the specified ID does not exist. + * + * @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; + /** + * Removes the binding from the document + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * Fails if the specified ID does not exist. + * + * @param id Specifies the unique name to be used to identify the binding object. Required. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + releaseByIdAsync(id: string, callback?: (result: AsyncResult) => void): void; + } + /** + * Represents an XML node in a tree in a document. + * + * @remarks + * + * **Applications**: Word + */ + interface CustomXmlNode { + /** + * Gets the base name of the node without the namespace prefix, if one exists. + */ + baseName: string; + /** + * Retrieves the string GUID of the CustomXMLPart. + */ + namespaceUri: string; + /** + * Gets the type of the CustomXMLNode. + */ + nodeType: string; + /** + * Gets the nodes associated with the XPath expression. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 nodes associated with the XPath expression. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param xPath The XPath expression that specifies the nodes to get. 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 an array of CustomXmlNode objects that represent the nodes specified by the XPath expression passed to the `xPath` parameter. + */ + getNodesAsync(xPath: string, callback?: (result: AsyncResult) => void): void; + /** + * Gets the node value. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 node value. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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(callback?: (result: AsyncResult) => void): void; + /** + * Gets the text of an XML node in a custom XML part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 text of an XML node in a custom XML part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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(callback?: (result: AsyncResult) => void): void; + /** + * Gets the node's XML. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Gets the node's XML. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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(callback?: (result: AsyncResult) => void): void; + /** + * Sets the node value. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Sets the node value. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param value The value to be set on the node + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setNodeValueAsync(value: string, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously sets the text of an XML node in a custom XML part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Asynchronously sets the text of an XML node in a custom XML part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param text Required. The text value of the XML node. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setTextAsync(text: string, callback?: (result: AsyncResult) => void): void; + /** + * Sets the node XML. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Sets the node XML. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param xml The XML to be set on the node + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setXmlAsync(xml: string, callback?: (result: AsyncResult) => void): void; + } + /** + * Represents a single CustomXMLPart in an {@link Office.CustomXmlParts} collection. + * + * @remarks + * + * **Applications**: Word + */ + 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 + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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; + /** + * Adds an event handler to the object using the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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 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, callback?: (result: AsyncResult) => void): void; + /** + * Deletes the Custom XML Part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Deletes the Custom XML Part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + deleteAsync(callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets any CustomXmlNodes in this custom XML part which match the specified XPath. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 any CustomXmlNodes in this custom XML part which match the specified XPath. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param xPath An XPath expression that specifies the nodes you want returned. 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 an array of CustomXmlNode objects that represent the nodes specified by the XPath expression passed to the xPath parameter. + */ + getNodesAsync(xPath: string, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the XML inside this custom XML part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Asynchronously gets the XML inside this custom XML part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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(callback?: (result: AsyncResult) => void): void; + /** + * Removes an event handler for the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Removes an event handler for the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 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, callback?: (result: AsyncResult) => void): void; + } + /** + * Provides information about the deleted node that raised the nodeDeleted event. + */ + 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. + */ + 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. + */ + 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 + * + * **Applications**: Word + */ + interface CustomXmlParts { + /** + * Asynchronously adds a new custom XML part to a file. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 adds a new custom XML part to a file. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param xml The XML to add to the newly created custom XML part. + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the specified custom XML part by its ID. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 by its ID. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param id The GUID of the custom XML part, including opening and closing braces. + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the specified custom XML parts by its namespace. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Asynchronously gets the specified custom XML parts by its namespace. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param ns The namespace URI. + * @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, callback?: (result: AsyncResult) => void): void; + } + /** + * Represents a collection of CustomXmlPart objects. + * + * @remarks + * + * **Applications**: Word + */ + interface CustomXmlPrefixMappings { + /** + * Asynchronously adds a prefix to namespace mapping to use when querying an item. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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 adds a prefix to namespace mapping to use when querying an item. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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 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, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the namespace mapped to the specified prefix. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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 namespace mapped to the specified prefix. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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 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, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the prefix for the specified namespace. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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; + /** + * Asynchronously gets the prefix for the specified namespace. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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 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, callback?: (result: AsyncResult) => void): void; + } + /** + * An abstract class that represents the document the add-in is interacting with. + * + * @remarks + * + * **Applications**: 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. + */ + bindings: Bindings; + /** + * Gets an object that represents the custom XML parts in the document. + */ + customXmlParts: CustomXmlParts; + /** + * Gets the mode the document is in. + */ + mode: DocumentMode; + /** + * Gets an object that represents the saved custom settings of the content or task pane add-in for the current document. + */ + settings: Settings; + /** + * Gets the URL of the document that the Office application currently has open. Returns null if the URL is unavailable. + */ + url: string; + /** + * Adds an event handler for a Document object event. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#documentevents | DocumentEvents} + * + * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. + * + * @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; + /** + * Adds an event handler for a Document object event. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#documentevents | DocumentEvents} + * + * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. + * + * @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 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, callback?: (result: AsyncResult) => void): void; + /** + * Returns the state of the current view of the presentation (edit or read). + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#activeview | ActiveView} + * + * Can trigger an event when the view changes. + * + * @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: + * Normal, Slide Sorter, 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 state of the current view of the presentation (edit or read). + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#activeview | ActiveView} + * + * Can trigger an event when the view changes. + * + * @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: + * Normal, Slide Sorter, or Outline View. "read" corresponds to either Slide Show or Reading View. + */ + getActiveViewAsync(callback?: (result: AsyncResult<"edit" | "read">) => void): void; + /** + * Returns the entire document file in slices of up to 4194304 bytes (4 MB). For add-ins on iPad, 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 sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#compressedfile | CompressedFile} (when using `Office.FileType.Compressed`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#file | File} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textfile | TextFile} (when using `Office.FileType.Text`) + * + * For add-ins running in Office applications other than Office on iPad, the `getFileAsync` method supports getting files in slices of up + * to 4194304 bytes (4 MB). For add-ins running in Office apps on iPad, 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 application. + * + * *Supported FileTypes, by platform* + * + * + * + * + * + *
Office on Windows Office on the web Office on iPad Office on Mac
Excel Compressed, Pdf, TextCompressed, Pdf Compressed, Pdf, Text
PowerPoint Compressed, Pdf Compressed, Pdf Compressed, PdfCompressed, Pdf
Word Compressed, Pdf, TextCompressed, Pdf, TextCompressed, PdfCompressed, Pdf, Text
+ * + * @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; + /** + * Returns the entire document file in slices of up to 4194304 bytes (4 MB). For add-ins on iPad, 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 sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#compressedfile | CompressedFile} (when using `Office.FileType.Compressed`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#file | File} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textfile | TextFile} (when using `Office.FileType.Text`) + * + * For add-ins running in Office applications other than Office on iPad, the `getFileAsync` method supports getting files in slices of up + * to 4194304 bytes (4 MB). For add-ins running in Office on iPad 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 application. + * + * *Supported FileTypes, by platform* + * + * + * + * + * + *
Office on Windows Office on the web Office on iPad Office on Mac
Excel Compressed, Pdf, TextCompressed, Pdf Compressed, Pdf, Text
PowerPoint Compressed, Pdf Compressed, Pdf Compressed, PdfCompressed, Pdf
Word Compressed, Pdf, TextCompressed, Pdf, TextCompressed, PdfCompressed, Pdf, Text
+ * + * @param fileType The format in which the file will be returned + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Gets file properties of the current document. + * + * @remarks + * + * **Requirement sets**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * You get the file's URL with the url property `asyncResult.value.url`. + * + * @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; + /** + * Gets file properties of the current document. + * + * @remarks + * + * **Requirement sets**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * You get the file's URL with the url property `asyncResult.value.url`. + * + * @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(callback?: (result: AsyncResult) => void): void; + /** + * Reads the data contained in the current selection in the document. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * 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
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.asyncContextDefine an 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 Office application. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
CoercionTypeSupported applications
Office.CoercionType.Html- Word
Office.CoercionType.Matrix (array of arrays)- Excel
- Word
Office.CoercionType.Ooxml (Office Open XML)- Word
Office.CoercionType.SlideRange- PowerPoint
Office.CoercionType.Table (TableData object)- Excel
- Word
Office.CoercionType.Text (string)- Excel
- PowerPoint
- Project
- Word
Office.CoercionType.XmlSvg- Excel on Windows and on Mac
- PowerPoint on Windows, on Mac, and on the web
- Word on Windows and on Mac
+ * + * @param coercionType The type of data structure to return. See the Remarks section for each application'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; + /** + * Reads the data contained in the current selection in the document. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * 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
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.asyncContextDefine an 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 Office application. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
CoercionTypeSupported applications
Office.CoercionType.Html- Word
Office.CoercionType.Matrix (array of arrays)- Excel
- Word
Office.CoercionType.Ooxml (Office Open XML)- Word
Office.CoercionType.SlideRange- PowerPoint
Office.CoercionType.Table (TableData object)- Excel
- Word
Office.CoercionType.Text (string)- Excel
- PowerPoint
- Project
- Word
Office.CoercionType.XmlSvg- Excel on Windows and on Mac
- PowerPoint on Windows, on Mac, and on the web
- Word on Windows and on Mac
+ * + * @param coercionType The type of data structure to return. See the Remarks section for each application's supported coercion types. + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Goes to the specified object or location in the document. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * PowerPoint doesn't support the goToByIdAsync method in Master Views. + * + * The behavior caused by the selectionMode option varies by Office application: + * + * 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). + * + * @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; + /** + * Goes to the specified object or location in the document. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * PowerPoint doesn't support the goToByIdAsync method in Master Views. + * + * The behavior caused by the selectionMode option varies by Office application: + * + * 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). + * + * @param id The identifier of the object or location to go to. + * @param goToType The type of the location to go 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, callback?: (result: AsyncResult) => void): void; + /** + * Removes an event handler for the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#documentevents | DocumentEvents} + * + * @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; + /** + * Removes an event handler for the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#documentevents | DocumentEvents} + * + * @param eventType The event type. For document can be 'Document.SelectionChanged' or 'Document.ActiveViewChanged'. + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Writes the specified data into the current selection. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion}, (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets | ImageCoercion 1.1} (when using `Office.CoercionType.Image`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets#imagecoercion-12 | ImageCoercion 1.2} (when using `Office.CoercionType.XmlSvg`) + * + * **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 cells. 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 on the webIn addition to the behaviors described for Excel above, these limits apply when writing data in Excel on the webThe 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.
+ * + * **Applications** + * + * The possible values for the {@link Office.CoercionType} parameter vary by the Office application. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
CoercionTypeSupported applications
Office.CoercionType.Html- Word
Office.CoercionType.Matrix (array of arrays)- Excel
- Word
Office.CoercionType.Ooxml (Office Open XML)- Word
Office.CoercionType.SlideRange- PowerPoint on the web and on Windows
Office.CoercionType.Table (TableData object)- Excel
- Word
Office.CoercionType.Text (string)- Excel
- PowerPoint
- Project
- Word
Office.CoercionType.XmlSvg- Excel on Windows and on Mac
- PowerPoint on Windows, on Mac, and on the web
- Word on Windows and on Mac
+ * + * @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". However, this technique will block the "calculated columns" feature only + * when one of the following conditions is met: (1) you are writing to all the cells of the column, or (2) there are already at least two + * different formulas in the column. + * + * @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; + /** + * Writes the specified data into the current selection. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion}, (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets | ImageCoercion} (when using `Office.CoercionType.Image`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets#imagecoercion-12 | ImageCoercion 1.2} (when using `Office.CoercionType.XmlSvg`) + * + * **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 cells. 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 on the webIn addition to the behaviors described for Excel above, these limits apply when writing data in Excel on the webThe 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.
+ * + * **Applications** + * + * The possible values for the {@link Office.CoercionType} parameter vary by the Office application. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
CoercionTypeSupported applications
Office.CoercionType.Html- Word
Office.CoercionType.Matrix (array of arrays)- Excel
- Word
Office.CoercionType.Ooxml (Office Open XML)- Word
Office.CoercionType.SlideRange- PowerPoint on the web and on Windows
Office.CoercionType.Table (TableData object)- Excel
- Word
Office.CoercionType.Text (string)- Excel
- PowerPoint
- Project
- Word
Office.CoercionType.XmlSvg- Excel on Windows and on Mac
- PowerPoint on Windows, on Mac, and on the web
- Word on Windows and on Mac
+ * + * @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". However, this technique will block the "calculated columns" feature only + * when one of the following conditions is met: (1) you are writing to all the cells of the column, or (2) there are already at least two + * different formulas in the column. + * + * @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[][], 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. + */ + getProjectFieldAsync(fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get Project field (Ex. ProjectWebAccessURL). + * @param fieldId Project level fields. + * @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. + * + */ + getProjectFieldAsync(fieldId: number, 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. + * + */ + getResourceFieldAsync(resourceId: string, 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 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. + * + */ + getResourceFieldAsync(resourceId: string, fieldId: number, 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. + * + */ + getSelectedResourceAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the current selected Resource's Id. + * @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. + * + */ + getSelectedResourceAsync(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. + * + */ + getSelectedTaskAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the current selected Task's Id. + * @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. + * + */ + getSelectedTaskAsync(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. + * + */ + getSelectedViewAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the current selected View Type (Ex. Gantt) and View Name. + * @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. + * + */ + getSelectedViewAsync(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. + * + */ + getTaskAsync(taskId: string, 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 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. + * + */ + getTaskAsync(taskId: string, 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. + * + */ + getTaskFieldAsync(taskId: string, fieldId: number, 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 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. + * + */ + getTaskFieldAsync(taskId: string, fieldId: number, 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. + * + */ + getWSSUrlAsync(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 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. + * + */ + getWSSUrlAsync(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. + * + */ + getMaxResourceIndexAsync(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 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. + * + */ + getMaxResourceIndexAsync(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. + * + */ + getMaxTaskIndexAsync(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 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. + * + */ + getMaxTaskIndexAsync(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. + * + */ + getResourceByIndexAsync(resourceIndex: number, 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 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. + * + */ + getResourceByIndexAsync(resourceIndex: number, 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. + * + */ + getTaskByIndexAsync(taskIndex: 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 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. + * + */ + getTaskByIndexAsync(taskIndex: number, 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}. + * + */ + setResourceFieldAsync(resourceId: string, fieldId: number, fieldValue: string | number | boolean | object, 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 callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + */ + setResourceFieldAsync(resourceId: string, fieldId: number, fieldValue: string | number | boolean | object, 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}. + * + */ + setTaskFieldAsync(taskId: 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 callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + */ + setTaskFieldAsync(taskId: string, fieldId: number, fieldValue: string | number | boolean | object, 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. + * + */ + interface File { + /** + * Gets the document file size in bytes. + */ + size: number; + /** + * Gets the number of slices into which the file is divided. + */ + sliceCount: number; + /** + * Closes the document file. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#file | File} + * + * 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
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.asyncContextDefine an 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 set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#file | File} + * + * In the callback function passed to the getSliceAsync method, you can use the properties of the AsyncResult object to return the following + * information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse
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.asyncContextDefine an 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 + * + * The MatrixBinding object inherits the `id` property, type property, getDataAsync method, and setDataAsync method from the Binding object. + */ + interface MatrixBinding extends Binding { + /** + * Gets the number of columns in the matrix data structure, as an integer value. + */ + columnCount: number; + /** + * Gets the number of rows in the matrix data structure, as an integer value. + */ + 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 + * + * **Applications**: Excel, PowerPoint, Word + * + * 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 on the web, and more than one user is editing the + * spreadsheet (coauthoring). Therefore, effectively the settingsChanged event is supported only in Excel on the web in coauthoring scenarios. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * 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
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ */ + addHandlerAsync(eventType: Office.EventType, handler: any, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * 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 on the web, and more than one user is editing the + * spreadsheet (coauthoring). Therefore, effectively the settingsChanged event is supported only in Excel on the web in coauthoring scenarios. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * 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 callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ */ + addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void; + /** + * Retrieves the specified setting. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | Settings} + * + * @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 set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * 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
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.asyncContextDefine an 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}. + * 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 set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | Settings} + * + * null is a valid value for a setting. Therefore, assigning null to the setting will not remove it from the settings property bag. + * + * @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 set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * 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. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ * + * @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; + /** + * Removes an event handler for the settingsChanged event. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * 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. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ * + * @param eventType Specifies the type of event to remove. Required. + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Persists the in-memory copy of the settings property bag in the document. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | 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. + * + * **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
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ * + * @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; + /** + * Persists the in-memory copy of the settings property bag in the document. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | 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. + * + * **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
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.asyncContextDefine an 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}. + */ + saveAsync(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 set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | Settings} + * + * 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. + * + * @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. + * + * 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 (coauthored) 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 on the web, and more than one user is editing the spreadsheet (coauthoring). + * Therefore, effectively the settingsChanged event is supported only in Excel on the web in coauthoring scenarios. + */ + 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; + } + /** + * Provides options for how to send messages, in either direction, between a dialog and its parent. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1} + */ + interface DialogMessageOptions { + /** + * Specifies the intended recipient domain for a message sent, in either direction, between a dialog and its parent. For example, `https://resources.contoso.com`. + */ + targetOrigin: string; + } + /** + * Provides information about the message from the parent page that raised the `DialogParentMessageReceived` event. + * + * To add an event handler for the `DialogParentMessageReceived` event, use the `addHandlerAsync` method of the + * {@link Office.UI} object. + * + */ + interface DialogParentMessageReceivedEventArgs { + /** + * Gets the content of the message sent from the parent page, which can be any string or stringified data. + */ + message: string; + /** + * Gets the domain of the parent page that called `Dialog.messageChild`. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1}. + * The property is `undefined` on clients that do not support this requirement set. + */ + origin: string | undefined; + /** + * Gets an {@link Office.EventType} enumeration value that identifies the kind of event that was raised. + */ + type: EventType; + } + /** + * Represents a slice of a document file. The Slice object is accessed with the `File.getSliceAsync` method. + */ + interface Slice { + /** + * Gets the raw data of the file slice in `Office.FileType.Text` or `Office.FileType.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 + * + * 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. + */ + columnCount: number; + /** + * True, if the table has headers; otherwise false. + */ + 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 on the web (using Table on the Insert tab), both Office + * 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 on the web. + * + * - In Excel on the desktop, rowCount will return 0 (the blank row following the headers is not counted). + * + * - In Excel on the web, 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. + */ + 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 columns. 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 on the web: 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. + * + * @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 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 columns. 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 on the web: 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. + * + * @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 callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addColumnsAsync(tableData: TableData | any[][], 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. 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 on the web: 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. + * + * @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; + /** + * 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. 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 on the web: 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. + * + * @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 callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addRowsAsync(rows: TableData | any[][], callback?: (result: AsyncResult) => void): void; + /** + * Deletes all non-header rows and their values in the table, shifting appropriately for the Office application. + * + * @remarks + * + * In Excel, if the table has no header row, this method will delete the table itself. + * + * @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; + /** + * Deletes all non-header rows and their values in the table, shifting appropriately for the Office application. + * + * @remarks + * + * In Excel, if the table has no header row, this method will delete the table itself. + * + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + deleteAllDataValuesAsync(callback?: (result: AsyncResult) => void): void; + /** + * Clears formatting on the bound table. + * + * @remarks + * + * See {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | Format tables in add-ins for Excel} for more information. + * + * @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; + /** + * Clears formatting on the bound table. + * + * @remarks + * + * See {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | Format tables in add-ins for Excel} for more information. + * + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + clearFormatsAsync(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 then select **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; + /** + * 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 then select **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 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[], 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 then select **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.microsoft.com/office/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://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | How to format tables in add-ins for Excel}. + * + * @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; + /** + * 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 then select **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.microsoft.com/office/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://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | How to format tables in add-ins for Excel}. + * + * @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 callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setFormatsAsync(cellFormat: any[], callback?: (result: AsyncResult) => void): void; + /** + * Updates table formatting options on the bound table. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not 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
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ * + * @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; + /** + * Updates table formatting options on the bound table. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not 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
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ * + * @param tableOptions An object literal containing a list of property name-value pairs that define the table options to apply. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + */ + setTableOptionsAsync(tableOptions: any, callback?: (result: AsyncResult) => void): void; + } + /** + * Represents the data in a table or an {@link Office.TableBinding}. + */ + class TableData { + constructor(rows: any[][], headers: any[]); + constructor(); + /** + * Gets or sets the headers of the table. + * + * @remarks + * + * 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 + * + * 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://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | table formatting methods}. + */ + 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. + * + * 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. + */ + 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. + */ + 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.microsoft.com/office/615a4563-1cc3-40f4-b66f-1b17e793a460 | Available fields} reference. In + * Project Help, search for Available fields. + */ + 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.microsoft.com/office/615a4563-1cc3-40f4-b66f-1b17e793a460 | Available fields} reference. + * In Project Help, search for Available fields. + */ + 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. + */ + Baseline3Start, + /** + * 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. + */ + 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 the type of custom action in a notification message. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + enum ActionType { + /** + * The `showTaskPane` action. + */ + ShowTaskPane = "showTaskPane" + } + /** + * Specifies the {@link Office.Sensitivity | sensitivity level} of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @beta + */ + enum AppointmentSensitivityType { + /** + * The item needs no special treatment. + * + * @remarks + * [Api set: Mailbox preview] + */ + Normal = "normal", + /** + * Treat the item as personal. + * + * @remarks + * [Api set: Mailbox preview] + */ + Personal = "personal", + /** + * Treat the item as private. + * + * @remarks + * [Api set: Mailbox preview] + */ + Private = "private", + /** + * Treat the item as confidential. + * + * @remarks + * [Api set: Mailbox preview] + */ + Confidential = "confidential" + } + /** + * Specifies the formatting that applies to an attachment's content. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + 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", + /** + * 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * **Important**: In Read mode, the `id` property of the attachment's {@link Office.AttachmentDetails | details} object + * contains a URL to the file. + * From requirement set 1.8, the `url` property included in the attachment's {@link Office.AttachmentDetailsCompose | details} object + * contains a URL to the file in Compose mode. + */ + Cloud = "cloud" + } + /** + * Specifies the category color. + * + * **Note**: The actual color depends on how the Outlook client renders it. + * In this case, the colors noted on each preset are for the Outlook desktop client. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum CategoryColor { + /** + * Default color or no color mapped. + */ + None, + /** + * Red + */ + Preset0, + /** + * Orange + */ + Preset1, + /** + * Brown + */ + Preset2, + /** + * Yellow + */ + Preset3, + /** + * Green + */ + Preset4, + /** + * Teal + */ + Preset5, + /** + * Olive + */ + Preset6, + /** + * Blue + */ + Preset7, + /** + * Purple + */ + Preset8, + /** + * Cranberry + */ + Preset9, + /** + * Steel + */ + Preset10, + /** + * DarkSteel + */ + Preset11, + /** + * Gray + */ + Preset12, + /** + * DarkGray + */ + Preset13, + /** + * Black + */ + Preset14, + /** + * DarkRed + */ + Preset15, + /** + * DarkOrange + */ + Preset16, + /** + * DarkBrown + */ + Preset17, + /** + * DarkYellow + */ + Preset18, + /** + * DarkGreen + */ + Preset19, + /** + * DarkTeal + */ + Preset20, + /** + * DarkOlive + */ + Preset21, + /** + * DarkBlue + */ + Preset22, + /** + * DarkPurple + */ + Preset23, + /** + * DarkCranberry + */ + Preset24 + } + /** + * Specifies a message's compose type. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + enum ComposeType { + /** + * Reply. + */ + Reply = "reply", + /** + * New mail. + */ + NewMail = "newMail", + /** + * Forward. + */ + Forward = "forward" + } + /** + * Specifies the day of week or type of day. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 bitmask represents a delegate's permissions on a shared folder, or a user's permissions on a shared mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum DelegatePermissions { + /** + * Delegate or user has permission to read items. + */ + Read = 1, + /** + * Delegate or user has permission to create and write items. + */ + Write = 2, + /** + * Delegate or user has permission to delete only the items they created. + */ + DeleteOwn = 4, + /** + * Delegate or user has permission to delete any items. + */ + DeleteAll = 8, + /** + * Delegate or user has permission to edit only they items they created. + */ + EditOwn = 16, + /** + * Delegate or user has permission to edit any items. + */ + EditAll = 32 + } + /** + * Specifies an entity's type. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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" + } + /** + * Action types supported by {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType.InfobarClicked}. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + enum InfobarActionType { + /** + * Dismiss action was selected. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + Dismiss = 1 + } + /** + * Type of notification allowed by {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType.InfobarClicked}. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + enum InfobarType { + /** + * Notification displays an informational message. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + Informational = 0, + /** + * Notification displays a progress indicator. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + ProgressIndicator = 1, + /** + * Notification displays an error message. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + Error = 2, + /** + * Notification displays an informational message with actions. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + Insight = 3 + } + /** + * Specifies the notification message type for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum ItemNotificationMessageType { + /** + * The notification message is a progress indicator. + */ + ProgressIndicator = "progressIndicator", + /** + * The notification message is an informational message. + */ + InformationalMessage = "informationalMessage", + /** + * The notification message is an error message. + * + * **Important**: Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + */ + ErrorMessage = "errorMessage", + /** + * The notification message is an informational message with actions. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + InsightMessage = "insightMessage" + } + /** + * Specifies an item's type. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 an appointment location's type. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum LocationType { + /** + * A custom location. Custom locations don't have an SMTP address. + * + * **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups} + * added as appointment locations aren't returned by the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.enhancedlocation#outlook-office-enhancedlocation-getasync-member(1) | EnhancedLocation.getAsync} method. + */ + Custom = "custom", + /** + * A conference room or similar resource that has an SMTP address. + */ + Room = "room" + } + /** + * Specifies the month. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 on the web. + */ + enum OWAView { + /** + * Narrow one-column view. Displayed when the screen width is less than 436 pixels. + * For example, Outlook on the web uses this view on the entire screen of older smartphones. + */ + OneColumnNarrow = "OneColumnNarrow", + /** + * One-column view. Displayed when the screen width is greater than or equal to 436 pixels, + * but less than 536 pixels. For example, Outlook on the web uses this view on the entire screen of newer smartphones. + */ + OneColumn = "OneColumn", + /** + * Two-column view. Displayed when the screen width is greater than or equal to 536 pixels, + * but less than 780 pixels. For example, Outlook on the web uses this view on most tablets. + */ + TwoColumns = "TwoColumns", + /** + * Three-column view. Displayed when the screen width is greater than or equal to 780 pixels. + * For example, Outlook on the web uses this view in a full screen window on a desktop computer. + */ + ThreeColumns = "ThreeColumns" + } + /** + * Specifies the type of recipient of a message or appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: A `recipientType` property value isn't returned by the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.from?view=outlook-js-preview#outlook-office-from-getasync-member(1) | Office.context.mailbox.item.from.getAsync} + * and {@link https://learn.microsoft.com/javascript/api/outlook/office.organizer?view=outlook-js-preview#outlook-office-organizer-getasync-member(1) | Office.context.mailbox.item.organizer.getAsync} methods. + * The email sender or appointment organizer is always a user whose email address is on the Exchange server. + */ + enum RecipientType { + /** + * Specifies the recipient is a distribution list containing a list of email addresses. + */ + DistributionList = "distributionList", + /** + * Specifies the recipient is an SMTP email address on the Exchange server. + */ + User = "user", + /** + * Specifies the recipient is an SMTP email address that isn't on the Exchange server. It also refers to a recipient added from a personal Outlook address book. + * + * **Important**: In Outlook on Windows (starting with Version 2210 (Build 15813.20002)), on Mac, and on the web, Global Address Book (GAL) recipients saved to a personal address book return + * the `ExternalUser` value, even if their SMTP email address appears on the Exchange server. Recipients return a `User` value only if they're directly + * added or resolved against the GAL. + */ + ExternalUser = "externalUser", + /** + * Specifies the recipient isn't one of the other recipient types. It also refers to a recipient that isn't resolved against the Exchange address book, + * and is therefore treated as an external SMTP address. + * + * **Important**: In Outlook on Android and on iOS, Global Address Book (GAL) recipients saved to a personal address book return + * the `Other` value, even if their SMTP email address appears on the Exchange server. Recipients return a `User` value only if they're directly + * added or resolved against the GAL. + */ + Other = "other" + } + /** + * Specifies the time zone applied to the recurrence. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 source of the selected data in an item (see `Office.mailbox.item.getSelectedDataAsync` for details). + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + enum SourceProperty { + /** + * The source of the data is from the body of the item. + */ + Body = "body", + /** + * The source of the data is from the subject of the item. + */ + Subject = "subject" + } + /** + * Specifies the week of the month. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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" + } + } + /** + * Provides an option for the data format. + */ + interface CoercionTypeOptions { + /** + * The desired data format. + */ + coercionType?: Office.CoercionType | string; + } + /** + * The subclass of {@link Office.Item | 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Child interfaces: + * + * - {@link Office.AppointmentCompose | AppointmentCompose} + * + * - {@link Office.AppointmentRead | AppointmentRead} + */ + 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Parent interfaces: + * + * - {@link Office.ItemCompose | ItemCompose} + * + * - {@link Office.Appointment | Appointment} + */ + interface AppointmentCompose extends Appointment, ItemCompose { + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + body: Body; + /** + * Gets an object that provides methods for managing the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + categories: Categories; + /** + * Gets or sets the date and time that the appointment is to end. + * + * The `end` property is a {@link Office.Time | 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. + * + * **Important**: In the Windows client, you can't use this property to update the end of a recurrence. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + end: Time; + /** + * Gets or sets the locations of the appointment. The `enhancedLocation` property returns an {@link Office.EnhancedLocation | EnhancedLocation} + * object that provides methods to get, remove, or add locations on an item. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + enhancedLocation: EnhancedLocation; + /** + * Gets or sets the {@link Office.IsAllDayEvent} property of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @beta + */ + isAllDayEvent: IsAllDayEvent; + /** + * 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets or sets the location of an appointment. The `location` property returns a {@link Office.Location | Location} object that provides methods that are + * used to get and set the location of the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + location: Location; + /** + * Gets the notification messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + notificationMessages: NotificationMessages; + /** + * Provides access to the optional attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * The `optionalAttendees` property returns a `Recipients` object that provides methods to get or update the + * optional attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many + * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + organizer: 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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 depend on the mode of the current item. + * + * The `requiredAttendees` property returns a `Recipients` object that provides methods to get or update the + * required attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many + * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + requiredAttendees: Recipients; + /** + * Gets or sets the {@link Office.Sensitivity | sensitivity level} of an appointment. + * For information about sensitivity levels, see + * {@link https://support.microsoft.com/office/4a76d05b-6c29-4a0d-9096-71784a6b12c1 | Mark your email as Normal, Personal, Private, or Confidential}. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @beta + */ + sensitivity: Sensitivity; + /** + * Gets the object to get or set the {@link Office.SensitivityLabel | sensitivity label} of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode (preview)}. + * + * @beta + */ + sensitivityLabel: SensitivityLabel; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web and desktop clients, the `seriesId` property returns the Exchange Web Services (EWS) ID of the parent (series) item + * that this item belongs to. However, on 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://learn.microsoft.com/office/dev/add-ins/outlook/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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + seriesId: string; + /** + * Manages the {@link Office.SessionData | SessionData} of an item in Compose mode. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + sessionData: SessionData; + /** + * Gets or sets the date and time that the appointment is to begin. + * + * The `start` property is a {@link Office.Time | 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. + * + * **Important**: In the Windows client, you can't use this property to update the start of a recurrence. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * **Important**: In recent builds of Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to + * this action (whether using this API or the Outlook UI). To work around this issue, you can try using the `addFileAttachmentFromBase64` API + * introduced with requirement set 1.8. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: 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 - 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 function. + * `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 - 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 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 & { isInline: boolean }, callback?: (asyncResult: Office.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. + * + * **Important**: In recent builds of Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to + * this action (whether using this API or the Outlook UI). To work around this issue, you can try using the `addFileAttachmentFromBase64` API + * introduced with requirement set 1.8. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: 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 - 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 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?: (asyncResult: Office.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. + * + * **Note**: If you're using a data URL API (e.g., `readAsDataURL`), you need to strip out the data URL prefix then send the rest of the string to this API. + * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * **Note**: If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} + * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. + * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. + * + * @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). + * @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 function. + * `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 - 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 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. + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options: Office.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: Office.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. + * + * **Note**: If you're using a data URL API (e.g., `readAsDataURL`), you need to strip out the data URL prefix then send the rest of the string to this API. + * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * **Note**: If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} + * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. + * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. + * + * @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 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`. + * 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. + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 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 function. + * @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 | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: Office.EventType | string, handler: any, callback?: (asyncResult: Office.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 function, 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 function, 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 on the web, 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `NumberOfAttachmentsExceeded`: 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 function. + * @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 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?: (asyncResult: Office.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 function, 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 function, 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 on the web, 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `NumberOfAttachmentsExceeded`: 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 - 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 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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Closes the current item that is being composed. + * + * The behavior 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, the `close` method has no effect on a reply in the Reading Pane. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: 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. + */ + close(): void; + /** + * Disables the Outlook client signature. + * + * For Windows and Mac rich clients, this API sets the signature under the "New Message" and "Replies/Forwards" sections + * for the sending account to "(none)", effectively disabling the signature. + * For Outlook on the web, the API should disable the signature option for new mails, replies, and forwards. + * If the signature is selected, this API call should disable it. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @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 function. + * @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. + */ + disableClientSignatureAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Disables the Outlook client signature. + * + * For Windows and Mac rich clients, this API sets the signature under the "New Message" and "Replies/Forwards" sections + * for the sending account to "(none)", effectively disabling the signature. + * For Outlook on the web, the API should disable the signature option for new mails, replies, and forwards. + * If the signature is selected, this API call should disable it. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @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. + */ + disableClientSignatureAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 function. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @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 function. + * @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 an error code with the reason for + * the failure. + */ + getAttachmentsAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @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 an error code with the reason for + * the failure. + */ + getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @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 function. + * @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 initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously gets the ID of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., 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 synced to the server. + * Until the item is synced, the `itemId` is not recognized and using it returns an error. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously gets the ID of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., 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 synced to the server. + * Until the item is synced, the `itemId` is not recognized and using it returns an error. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + getItemIdAsync(callback: (asyncResult: Office.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 an empty string 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 function, 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`. + * + * @returns + * The selected data as a string with format determined by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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 | string, options: Office.AsyncContextOptions, callback: (asyncResult: Office.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 an empty string 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 function, 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`. + * + * @returns + * The selected data as a string with format determined by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 | string, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * *Note**: This method is not supported in Outlook on iOS or Android. + * + * @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 function. + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + */ + isClientSignatureEnabledAsync(callback: (asyncResult: Office.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 {@link Office.CustomProperties | 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 aren't encrypted on the item, so this shouldn't 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, save, and remove custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: (asyncResult: Office.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 on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` + * is 200 characters in Outlook on the web and on Windows. + * @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 function. + * @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(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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 on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` + * is 200 characters in Outlook on the web and on Windows. + * @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(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param eventType - The event that should revoke the handler. + * @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 function. + * @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 | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param eventType - The event that should revoke the handler. + * @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 | string, callback?: (asyncResult: Office.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 function. + * In Outlook on the web 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. + * + * When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * **Note**: If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID 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 item ID will return an error. + * + * **Note**: In Outlook on Mac, only build 16.35.308 or later supports saving a meeting. + * Otherwise, the `saveAsync` method fails when called from a meeting in compose mode. + * For a workaround, see {@link https://learn.microsoft.com/outlook/troubleshoot/calendars/cannot-save-meeting-as-draft-in-outlook-for-mac | Cannot save a meeting as a draft in Outlook for Mac by using Office JS API}. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @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 function. + * @param callback - 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: (asyncResult: Office.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 function. + * In Outlook on the web 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. + * + * When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * **Note**: If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID 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 item ID will return an error. + * + * **Note**: In Outlook on Mac, only build 16.35.308 or later supports saving a meeting. + * Otherwise, the `saveAsync` method fails when called from a meeting in compose mode. + * For a workaround, see {@link https://learn.microsoft.com/outlook/troubleshoot/calendars/cannot-save-meeting-as-draft-in-outlook-for-mac | Cannot save a meeting as a draft in Outlook for Mac by using Office JS API}. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + saveAsync(callback: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: 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 - 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 function. + * `coercionType`: If text, the current style is applied in Outlook on the web and Windows. + * 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 on the web and the + * default style is applied in Outlook on desktop clients. + * 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?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: 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?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * The `AppointmentForm` object is used to access the currently selected appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface AppointmentForm { + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + body: 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + end: Time | 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + location: Location | string; + /** + * Provides access to the optional attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * *Read mode* + * + * The `optionalAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each optional attendee to the meeting. Collection size limits: + * + * - Windows: 500 members + * + * - Classic Mac UI: 100 members + * + * - New Mac UI, web browser, Android: No limit + * + * *Compose mode* + * + * The `optionalAttendees` property returns a `Recipients` object that provides methods to get or update the + * optional attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many + * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + optionalAttendees: Recipients[] | EmailAddressDetails[]; + /** + * Provides access to the resources of an event. Returns an array of strings containing the resources required for the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + resources: string[]; + /** + * Provides access to the required attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * *Read mode* + * + * The `requiredAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each required attendee to the meeting. Collection size limits: + * + * - Windows: 500 members + * + * - Classic Mac UI: 100 members + * + * - New Mac UI, web browser, Android: No limit + * + * *Compose mode* + * + * The `requiredAttendees` property returns a `Recipients` object that provides methods to get or update the + * required attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many + * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + requiredAttendees: Recipients[] | 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + start: Time | 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + subject: Subject | string; + } + /** + * 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Parent interfaces: + * + * - {@link Office.ItemRead | ItemRead} + * + * - {@link Office.Appointment | Appointment} + */ + interface AppointmentRead extends Appointment, ItemRead { + /** + * Gets the item's attachments as an array. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519 | Blocked attachments in Outlook}. + * + */ + attachments: AttachmentDetails[]; + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + body: Body; + /** + * Gets an object that provides methods for managing the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + categories: Categories; + /** + * Gets the date and time that an item was created. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + dateTimeModified: 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + end: Date; + /** + * Gets the locations of an appointment. + * + * The `enhancedLocation` property returns an {@link Office.EnhancedLocation | EnhancedLocation} object that allows you to get the set of locations + * (each represented by a {@link Office.LocationDetails | LocationDetails} object) associated with the appointment. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + enhancedLocation: EnhancedLocation; + /** + * Returns a boolean value indicating whether the event is all day. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @beta + */ + isAllDayEvent: boolean; + /** + * 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`. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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.Occurrence.IPM.Appointment, IPM.Appointment.Occurrence
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 {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | 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 + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | 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://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api#get-the-item-id | Use the Outlook REST APIs from an Outlook add-in}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the location of an appointment. + * + * The `location` property returns a string that contains the location of the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + normalizedSubject: string; + /** + * Gets the notification messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + notificationMessages: NotificationMessages; + /** + * Provides access to the optional attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * The `optionalAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each optional attendee to the meeting. The maximum number of attendees returned varies per Outlook client. + * + * - Windows: 500 attendees + * + * - Android, classic Mac UI, iOS: 100 attendees + * + * - New Mac UI, web browser: No limit + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + optionalAttendees: EmailAddressDetails[]; + /** + * Gets the meeting organizer's email properties. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 {@link Office.Recurrence | 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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 depend on the mode of the current item. + * + * The `requiredAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each required attendee to the meeting. The maximum number of attendees returned varies per Outlook client. + * + * - Windows: 500 attendees + * + * - Android, classic Mac UI, iOS: 100 attendees + * + * - New Mac UI, web browser: No limit + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + start: Date; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web and desktop clients, the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item + * that this item belongs to. However, on 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://learn.microsoft.com/office/dev/add-ins/outlook/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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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:. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + subject: string; + /** + * Provides the sensitivity value of the appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @beta + */ + sensitivity: MailboxEnums.AppointmentSensitivityType; + + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 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 function. + * @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 | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: Office.EventType | string, handler: any, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column 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 attempts 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. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyAllForm(formData: string | ReplyFormData): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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 function. + * @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. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column 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 attempts 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. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyForm(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 on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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 function. + * @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. + */ + displayReplyFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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. + */ + displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.AppointmentRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 function. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.AppointmentRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the entities found in the selected item's body. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + getEntities(): Entities; + /** + * Gets an array of all the entities of the specified entity type found in the selected item's body. + * + * @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 + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param entityType - One of the `EntityType` enumeration values. + * + * While the minimum permission level to use this method is **restricted**, some entity types require **read item** to access, as specified in the following table. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Value of entityTypeType of objects in returned arrayRequired Permission Level
AddressStringRestricted
ContactContactReadItem
EmailAddressStringReadItem
MeetingSuggestionMeetingSuggestionReadItem
PhoneNumberPhoneNumberRestricted
TaskSuggestionTaskSuggestionReadItem
URLStringRestricted
+ */ + getEntitiesByType(entityType: MailboxEnums.EntityType | string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Returns well-known entities in the selected item that pass the named filter defined in an XML manifest file. + * + * @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. If there's no `ItemHasKnownEntity` element in the manifest with a + * `FilterName` element value that matches the `name` parameter, the method returns `null`. If the `name` parameter matches an + * `ItemHasKnownEntity` element in the manifest, but there are no entities in the current item that match, the method returns an empty array. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param name - The name of the `ItemHasKnownEntity` rule element that defines the filter to match. + */ + getFilteredEntitiesByName(name: string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @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 function. + * @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 initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns string values in the selected item that match the regular expressions defined in an XML manifest file. + * + * @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. For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property + * of the item that's specified by that rule. The `PropertyName` simple type defines the supported properties. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + getRegExMatches(): any; + /** + * Returns string values in the selected item that match the named regular expression defined in an XML manifest file. + * + * @returns + * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the manifest XML file, + * with the specified `RegExName` element value. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 an XML manifest file. + * Highlighted matches apply to contextual add-ins. + * + * **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * 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 on iOS or Android. + * + * @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 + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + getSelectedRegExMatches(): any; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @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 function. + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: Office.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 {@link Office.CustomProperties | 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 aren't encrypted on the item, so this shouldn't 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, save, and remove custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param eventType - The event that should revoke the handler. + * @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 function. + * @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 | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param eventType - The event that should revoke the handler. + * @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 | string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides the current dates and times of the appointment that raised the `Office.EventType.AppointmentTimeChanged` event. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + export interface AppointmentTimeChangedEventArgs { + /** + * Gets the appointment end date and time. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + end: Date; + /** + * Gets the appointment start date and time. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + start: Date; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + type: "olkAppointmentTimeChanged"; + } + /** + * Represents the content of an attachment on a message or appointment item. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + 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 and were attached by drag-and-drop or "Attach Item", + * the formatting is a string representing an .eml formatted file. + * **Important**: If a message item was attached by drag-and-drop in Outlook on the web, then `getAttachmentContentAsync` throws an error. + * + * For item attachments that represent calendar items and were attached by drag-and-drop or "Attach Item", + * the formatting is a string representing an .icalendar file. + * **Important**: If a calendar item was attached by drag-and-drop in Outlook on the web, then `getAttachmentContentAsync` throws an error. + * + * For cloud attachments, the formatting is a URL string. + */ + format: MailboxEnums.AttachmentContentFormat | string; + } + /** + * Represents an attachment on an item. Compose mode only. + * + * An array of `AttachmentDetailsCompose` objects is returned as the attachments property of an appointment or message item. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + interface AttachmentDetailsCompose { + /** + * Gets a value that indicates the type of an attachment. + */ + attachmentType: MailboxEnums.AttachmentType | string; + /** + * Gets the index 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. + * + * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", + * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or Windows. + */ + name: string; + /** + * Gets the size of the attachment in bytes. + */ + size: number; + /** + * Gets the url of the attachment if its type is `MailboxEnums.AttachmentType.Cloud`. + */ + url?: string; + } + /** + * Represents an attachment on an item from the server. Read mode only. + * + * An array of `AttachmentDetails` objects is returned as the attachments property of an appointment or message item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + */ + interface AttachmentDetails { + /** + * Gets a value that indicates the type of an attachment. + */ + attachmentType: MailboxEnums.AttachmentType | string; + /** + * Gets the MIME content type of the attachment. + * + * **Warning**: While the `contentType` value is a direct lookup of the attachment's extension, the internal mapping isn't actively maintained + * so this property has been deprecated. If you require specific types, grab the attachment's extension and process accordingly. For details, + * refer to the {@link https://devblogs.microsoft.com/microsoft365dev/outlook-javascript-api-deprecation-for-attachmentdetails-contenttype-property/ | related blog post }. + * + * @deprecated If you require specific content types, grab the attachment's extension and process accordingly. + */ + contentType: string; + /** + * Gets the Exchange attachment ID of the attachment. + * However, if the attachment type is `MailboxEnums.AttachmentType.Cloud`, then a URL for the file is returned. + */ + 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. + * + * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", + * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or Windows. + */ + name: string; + /** + * Gets the size of the attachment in bytes. + */ + size: number; + } + /** + * Provides information about the attachments that raised the `Office.EventType.AttachmentsChanged` event. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + export interface AttachmentsChangedEventArgs { + /** + * Represents the set of attachments that were added or removed. + * For each such attachment, gets `id`, `name`, `size`, and `attachmentType` properties. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + attachmentDetails: object[]; + /** + * Gets whether the attachments were added or removed. For details, refer to {@link Office.MailboxEnums.AttachmentStatus | MailboxEnums.AttachmentStatus}. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + attachmentStatus: MailboxEnums.AttachmentStatus | string; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + type: "olkAttachmentsChanged"; + } + /** + * 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **Known issue with HTML table border colors** + * + * Outlook on Windows: If you're setting various cell borders to different colors in an HTML table in Compose mode, a cell's borders may not reflect + * the expected color. For the known behavior, visit {@link https://github.com/OfficeDev/office-js/issues/1818 | OfficeDev/office-js issue #1818}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface Body { + /** + * Appends on send the specified content to the end of the item body, after any signature. + * + * To use `appendOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. See {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. To learn more + * about append-on-send and its configuration, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/append-on-send | Implement append-on-send in your Outlook add-in}. + * + * **Important**: If the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins?tabs=windows | on-send feature} + * is implemented with append-on-send, the following apply. + * + * - If the user is running add-ins that implement the on-send feature using `ItemSend` in the manifest, append-on-send runs before on-send functionality. + * + * - If your add-in implements the on-send feature and calls `appendOnSendAsync` in the `ItemSend` handler, + * the `appendOnSendAsync` call returns an error as this scenario isn't supported. + * + * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. + * + * **Note**: To clear data from a previous `appendOnSendAsync` call, you can call it again with the `data` parameter set to `null`. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 5,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` but the message body is in plain text. + * + * @param data - The string to be added to the end of the body. The string is limited to 5,000 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 function. + * `coercionType`: The desired format for the data to be appended. 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. + */ + appendOnSendAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Appends on send the specified content to the end of the item body, after any signature. + * + * To use `appendOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. See {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. To learn more + * about append-on-send and its configuration, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/append-on-send | Implement append-on-send in your Outlook add-in}. + * + * **Important**: If the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins?tabs=windows | on-send feature} + * is implemented with append-on-send, the following apply. + * + * - If the user is running add-ins that implement the on-send feature using `ItemSend` in the manifest, append-on-send runs before on-send functionality. + * + * - If your add-in implements the on-send feature and calls `appendOnSendAsync` in the `ItemSend` handler, + * the `appendOnSendAsync` call returns an error as this scenario isn't supported. + * + * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. + * + * **Note**: To clear data from a previous `appendOnSendAsync` call, you can call it again with the `data` parameter set to `null`. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 5,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` but the message body is in plain text. + * + * @param data - The string to be added to the end of the body. The string is limited to 5,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. + */ + appendOnSendAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns the current body in a specified format. + * + * This method returns the entire current body in the format specified by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily + * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it + * render efficiently with its rendering engine. + * + * @param coercionType - The format for the returned body. + * @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 function. + * @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 | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns the current body in a specified format. + * + * This method returns the entire current body in the format specified by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily + * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it + * render efficiently with its rendering engine. + * + * @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 | string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets a value that indicates whether the content is in HTML or text format. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 function. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets a value that indicates whether the content is in HTML or text format. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: In Outlook on Android and on iOS, this` method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds the specified content to the beginning of the item body. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - After the content is prepended, the position of the cursor depends on which client the add-in is running. In Outlook on Windows and on the web, the cursor + * position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning of the body prior to the + * `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call. In Outlook on Mac, the cursor + * position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the body of the mail item. + * + * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to + * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method + * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call. + * + * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" + * (see the **Examples** section for a sample). + * + * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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 - 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 function. + * `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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds the specified content to the beginning of the item body. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - After the content is prepended, the position of the cursor depends on which client the add-in is running. In Outlook on Windows and on the web, the cursor + * position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning of the body prior to the + * `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call. In Outlook on Mac, the cursor + * position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the body of the mail item. + * + * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to + * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method + * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call. + * + * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" + * (see the **Examples** section for a sample). + * + * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Prepends HTML or plain text to the beginning of a message or appointment body when the mail item is sent. + * + * To use `prependOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. For guidance, + * see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` parameter. + * + * **Important**: When implementing `prependOnSendAsync`, keep the following in mind. + * + * - In a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts add-in}, + * the prepend-on-send feature runs first. + * + * - A new line is added after the prepended content. + * + * - If multiple active add-ins call `prependOnSendAsync`, the order of the inserted content depends on the order in which the add-in runs. + * The content of the last run add-in appears above previously prepended content. + * + * - If the add-in attempts to insert HTML into a plain text body, the content won't be prepended. Conversely, plain text will be inserted into an HTML body. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter exceeds 5,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html`, but the item body is in plain text format. + * + * @param data - The string to be prepended to the beginning of the message or appointment body. The string is limited to 5,000 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Any object that can be accessed in the callback function. + * `coercionType`: The desired format for the body. The string in the `data` parameter is 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. + */ + prependOnSendAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Prepends HTML or plain text to the beginning of a message or appointment body when the mail item is sent. + * + * To use `prependOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. For guidance, + * see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` parameter. + * + * **Important**: When implementing `prependOnSendAsync`, keep the following in mind. + * + * - In a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts add-in}, + * the prepend-on-send feature runs first. + * + * - A new line is added after the prepended content. + * + * - If multiple active add-ins call `prependOnSendAsync`, the order of the inserted content depends on the order in which the add-in runs. + * The content of the last run add-in appears above previously prepended content. + * + * - If the add-in attempts to insert HTML into a plain text body, the content won't be prepended. Conversely, plain text will be inserted into an HTML body. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter exceeds 5,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html`, but the item body is in plain text format. + * + * @param data - The string to be prepended to the beginning of the message or appointment body. The string is limited to 5,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. + */ + prependOnSendAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Replaces the entire body with the specified text. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running. In Outlook on Windows, + * the cursor appears at the beginning of the body of the mail item, while in Outlook on the web, the cursor appears at the end of the body of the mail item. + * In Outlook on Mac, the cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects + * something in the body of the mail item. + * + * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily + * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` 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" + * (see the **Examples** section for a sample). + * + * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command. + * + * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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 - 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 function. + * `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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Replaces the entire body with the specified text. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running. In Outlook on Windows, + * the cursor appears at the beginning of the body of the mail item, while in Outlook on the web, the cursor appears at the end of the body of the mail item. + * In Outlook on Mac, the cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects + * something in the body of the mail item. + * + * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily + * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` 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" + * (see the **Examples** section for a sample). + * + * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command. + * + * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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?: (asyncResult: Office.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" + * (see the **Examples** section for a sample). + * + * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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 - 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 function. + * `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?: (asyncResult: Office.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" + * (see the **Examples** section for a sample). + * + * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds or replaces the signature of the item body. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - In Outlook on the web, `setSignatureAsync` only works on messages. + * + * - This method is supported in Message Compose on Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + * To learn more about APIs supported in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - The behavior of `setSignatureAsync` differs if you call it in the event handler of an add-in that implements the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation feature using `LaunchEvent` in the manifest}. + * When the user composes a new item (including reply or forward), the signature is set but doesn't modify the form. This means + * if the user closes the form without making other edits, they won't be prompted to save changes. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 30,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 represents the signature to be set in the body of the mail. This string is limited to 30,000 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 function. + * `coercionType`: The format the signature should be set to. If Text, the method sets the signature to plain text, + * removing any HTML tags present. If Html, the method sets the signature to HTML. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + setSignatureAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds or replaces the signature of the item body. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - In Outlook on the web, `setSignatureAsync` only works on messages. + * + * - This method is supported in Message Compose on Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + * To learn more about APIs supported in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - The behavior of `setSignatureAsync` differs if you call it in the event handler of an add-in that implements the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation feature using `LaunchEvent` in the manifest}. + * When the user composes a new item (including reply or forward), the signature is set but doesn't modify the form. This means + * if the user closes the form without making other edits, they won't be prompted to save changes. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 30,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 represents the signature to be set in the body of the mail. This string is limited to 30,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`. + */ + setSignatureAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Represents the categories on an item. + * + * In Outlook, a user can tag messages and appointments by using a category to color-code them. + * The user defines {@link Office.MasterCategories | categories in a master list} on their mailbox. + * They can then apply one or more categories to an item. + * + * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface Categories { + /** + * Adds categories to an item. Each category must be in the categories master list on that mailbox and so must have a unique name + * but multiple categories can use the same color. + * + * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message or appointment item in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `InvalidCategory`: Invalid categories were provided. + * + * @param categories - The categories to be added to the item. + * @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 function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addAsync(categories: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds categories to an item. Each category must be in the categories master list on that mailbox and so must have a unique name + * but multiple categories can use the same color. + * + * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message or appointment item in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `InvalidCategory`: Invalid categories were provided. + * + * @param categories - The categories to be added to the item. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addAsync(categories: string[], callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an item's categories. + * + * **Important**: + * + * - If there are no categories on the item, `null` or an empty array will be returned depending on the Outlook version + * so make sure to handle both cases. + * + * - In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If getting categories fails, the `asyncResult.error` property will contain an error code. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an item's categories. + * + * **Important**: + * + * - If there are no categories on the item, `null` or an empty array will be returned depending on the Outlook version + * so make sure to handle both cases. + * + * - In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. If getting categories fails, the `asyncResult.error` property will contain an error code. + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes categories from an item. + * + * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param categories - The categories to be removed from the item. + * @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 function. + * @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 categories fails, the `asyncResult.error` property will contain an error code. + */ + removeAsync(categories: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes categories from an item. + * + * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param categories - The categories to be removed from the item. + * @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 categories fails, the `asyncResult.error` property will contain an error code. + */ + removeAsync(categories: string[], callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Represents a category's details like name and associated color. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface CategoryDetails { + /** + * The name of the category. Maximum length is 255 characters. + */ + displayName: string; + /** + * The color of the category. + */ + color: MailboxEnums.CategoryColor | string; + } + /** + * Represents the details about a contact (similar to what's on a physical contact or business card) extracted from the item's body. Read mode only. + * + * The list of contacts extracted from the body of an email message or appointment is returned in the `contacts` property of the + * {@link Office.Entities | Entities} object returned by the `getEntities` or `getEntitiesByType` method of the current item. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + */ + interface Contact { + /** + * An array of strings containing the mailing and street addresses associated with the contact. Nullable. + */ + addresses: string[]; + /** + * 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: string[]; + /** + * 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: PhoneNumber[]; + /** + * An array of strings containing the Internet URLs associated with the contact. Nullable. + */ + urls: string[]; + } + /** + * The `CustomProperties` object represents custom properties that are specific to a particular mail item and specific to an Outlook add-in. + * For example, there might be a need for an add-in to save some data that's specific to the current message that activated the add-in. + * If the user revisits the same message in the future and activates the add-in again, the add-in will be able to retrieve the data that had + * been saved as custom properties. + * + * To learn more about `CustomProperties`, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * When using custom properties in your add-in, keep in mind that: + * + * - Custom properties saved while in compose mode aren't transmitted to recipients of the mail item. When a message or appointment with custom + * properties is sent, its properties can be accessed from the item in the Sent Items folder. + * If you want to make custom data accessible to recipients, consider using {@link Office.InternetHeaders | InternetHeaders} instead. + * + * - The maximum length of a `CustomProperties` JSON object is 2500 characters. + * + * - Outlook on Mac doesn't cache custom properties. If the user's network goes down, mail add-ins can't access their custom properties. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface CustomProperties { + /** + * Returns the value of the specified custom property. + * + * @returns The value of the specified custom property. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param name - The name of the custom property to be returned. + */ + get(name: string): any; + /** + * Returns an object with all custom properties in a collection of name/value pairs. The following are equivalent. + * + * `customProps.get("name")` + * + * `var dictionary = customProps.getAll(); dictionary["name"]` + * + * You can iterate through the dictionary object to discover all `names` and `values`. + * + * @returns An object with all custom properties in a collection of name/value pairs. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + getAll(): any; + /** + * 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param name - The `name` of the property to be removed. + */ + remove(name: string): void; + /** + * Saves custom properties to a message or appointment. + * + * 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 function should handle this error accordingly. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **Important**: In Outlook on Windows, custom properties saved while in compose mode only persist after the item being composed is closed or + * after `Office.context.mailbox.item.saveAsync` is called. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 asyncContext - Optional. Any state data that is passed to the callback function. + */ + saveAsync(callback: (asyncResult: Office.AsyncResult) => void, asyncContext?: any): void; + /** + * Saves custom properties to a message or appointment. + * + * 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 function should handle this error accordingly. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param asyncContext - Optional. Any state data that is passed to the callback function. + */ + saveAsync(asyncContext?: any): void; + /** + * Sets the specified property to the specified value. + * + * The `set` method sets the specified property to the specified value. To ensure that the set property and value persist on the mail item, + * you must call the `saveAsync` method. + * + * 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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; + } + /** + * The `DelayDeliveryTime` object enables you to manage the delayed delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + interface DelayDeliveryTime { + /** + * Gets the delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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 delivery date and time of a message is returned in the + * `asyncResult.value` property. If a delivery date hasn't been set on a message yet, `0` is returned instead. + */ + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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 delivery date and time of a message is returned in the + * `asyncResult.value` property. If a delivery date hasn't been set on a message yet, `0` is returned instead. + */ + getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidFormatError` - The format of the specified data object is not valid. + * + * @param datetime - The future date and time when the message should be sent. + * @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 function. + * @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. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setAsync(datetime: Date, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidFormatError` - The format of the specified data object is not valid. + * + * @param datetime - The future date and time when the message should be sent. + * @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. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setAsync(datetime: Date, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides diagnostic information to an Outlook add-in. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * Starting with Mailbox requirement set 1.5, you can also use the + * {@link https://learn.microsoft.com/javascript/api/office/office.context?view=outlook-js-preview&preserve-view=true#office-office-context-diagnostics-member | Office.context.diagnostics} + * property to get similar information. + */ + interface Diagnostics { + /** + * Gets a string that represents the name of the Office application. + * + * A string that can be one of the following values: `Outlook`, `OutlookWebApp`, `OutlookIOS`, or `OutlookAndroid`. + * + * **Note**: The `Outlook` value is returned for Outlook on desktop clients (i.e., Windows and Mac). + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + hostName: string; + /** + * Gets a string that represents the version of either the Office application or the Exchange Server (e.g., "15.0.468.0"). + * + * If the mail add-in is running in Outlook on a desktop or mobile client, the `hostVersion` property returns the version of the + * application, Outlook. In Outlook on the web, the property returns the version of the Exchange Server. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + hostVersion: string; + /** + * Gets a string that represents the current view of Outlook on the web. + * + * The returned string can be one of the following values: `OneColumn`, `TwoColumns`, or `ThreeColumns`. + * + * If the application is not Outlook on the web, then accessing this property results in undefined. + * + * Outlook on the web 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 on the web uses this single-column layout on the entire screen of a + * smartphone. + * + * - `TwoColumns`, which is displayed when the screen is wider. Outlook on the web uses this view on most tablets. + * + * - `ThreeColumns`, which is displayed when the screen is wide. For example, Outlook on the web uses this view in a full screen window on a + * desktop computer. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + OWAView: MailboxEnums.OWAView | "OneColumn" | "TwoColumns" | "ThreeColumns"; + } + /** + * Provides properties to temporarily set the content displayed in the body or subject of a message in read mode. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + interface Display { + /** + * Gets an object to temporarily set the content displayed in the body of a message in read mode. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + body: DisplayedBody; + /** + * Gets an object to temporarily set the content displayed in the subject of a message in read mode. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + subject: DisplayedSubject; + } + /** + * Provides a method to temporarily set the content displayed in the body of a message in read mode. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + interface DisplayedBody { + /** + * Temporarily sets the content displayed in the body of a message in read mode. The set content will remain visible until the user switches to a different messsage or + * closes the window of the current message. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Recommended**: Call + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-gettypeasync-member(1) | Office.context.mailbox.item.body.getTypeAsync}, + * then pass the returned value to the `options.coercionType` parameter. + * + * @param data - The string to be temporarily displayed in the body of a message. The string is limited to 1,000,000 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 function. + * `coercionType`: The format of the data to be temporarily displayed. 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, `asyncResult`, + * which is an `Office.AsyncResult` object. Any errors encountered will be provided in the `asyncResult.error` property. + * + * @beta + */ + setAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Temporarily sets the content displayed in the body of a message in read mode. The set content will remain visible until the user switches to a different messsage or + * closes the window of the current message. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param data - The string to be temporarily displayed in the body of a message. 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, `asyncResult`, + * which is an `Office.AsyncResult` object. Any errors encountered will be provided in the `asyncResult.error` property. + * + * @beta + */ + setAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides a method to temporarily set the content displayed in the subject of a message in read mode. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + interface DisplayedSubject { + /** + * Temporarily sets the content displayed in the subject of a message in read mode. The set content will remain visible until the user switches to a different messsage or + * closes the window of the current message. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param data - The string to be temporarily displayed in the subject of a 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 function. + * @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. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setAsync(data: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Temporarily sets the content displayed in the subject of a message in read mode. The set content will remain visible until the user switches to a different messsage or + * closes the window of the current message. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param data - The string to be temporarily displayed in the subject of a message. 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, `asyncResult`, + * which is an `Office.AsyncResult` object. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides the email properties of the sender or specified recipients of an email message or appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: MailboxEnums.ResponseType | string; + /** + * Gets the email address type of a recipient. + * + * @remarks + * **Important**: A `recipientType` property value isn't returned by the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.from?view=outlook-js-preview#outlook-office-from-getasync-member(1) | Office.context.mailbox.item.from.getAsync} + * and {@link https://learn.microsoft.com/javascript/api/outlook/office.organizer?view=outlook-js-preview#outlook-office-organizer-getasync-member(1) | Office.context.mailbox.item.organizer.getAsync} methods. + * The email sender or appointment organizer is always a user whose email address is on the Exchange server. + */ + recipientType: MailboxEnums.RecipientType | string; + } + /** + * Represents an email account on an Exchange Server. + * + * `EmailUser` objects are primarily received in {@link Office.MeetingSuggestion | MeetingSuggestion} and + * {@link Office.TaskSuggestion | TaskSuggestion} entities extracted from an Outlook item. To learn more about this scenario, refer to + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/extract-entity-strings-from-an-item | Extract entity strings from an Outlook item}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 the set of locations on an appointment. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface EnhancedLocation { + /** + * Adds to the set of locations associated with the appointment. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidFormatError`: The format of the specified data object is not valid. + * + * @param locationIdentifiers The locations to be added to the current list of locations. + * @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 function. + * @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. Check the `status` property of `asyncResult` to determine if the call succeeded. + */ + addAsync(locationIdentifiers: LocationIdentifier[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds to the set of locations associated with the appointment. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidFormatError`: The format of the specified data object is not valid. + * + * @param locationIdentifiers The locations to be added to the current list of locations. + * @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. Check the `status` property of `asyncResult` to determine if the call succeeded. + */ + addAsync(locationIdentifiers: LocationIdentifier[], callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the set of locations associated with the appointment. + * + * **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups} + * added as appointment locations aren't returned by this method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @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 function. + * @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. + */ + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the set of locations associated with the appointment. + * + * **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups} + * added as appointment locations aren't returned by this method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + */ + getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the set of locations associated with the appointment. + * + * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in `locationIdentifiers`. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param locationIdentifiers The locations to be removed from the current list of locations. + * @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 function. + * @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. Check the `status` property of `asyncResult` to determine if the call succeeded. + */ + removeAsync(locationIdentifiers: LocationIdentifier[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the set of locations associated with the appointment. + * + * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in `locationIdentifiers`. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param locationIdentifiers The locations to be removed from the current list of locations. + * @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. Check the `status` property of `asyncResult` to determine if the call succeeded. + */ + removeAsync(locationIdentifiers: LocationIdentifier[], callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides the current enhanced locations when the `Office.EventType.EnhancedLocationsChanged` event is raised. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + export interface EnhancedLocationsChangedEventArgs { + /** + * Gets the set of enhanced locations. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + enhancedLocations: LocationDetails[]; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + type: "olkEnhancedLocationsChanged"; + } + /** + * 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: This interface is supported in Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + */ + 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 | EmailAddressDetails} in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - This method is supported in Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + * To learn more about APIs supported in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - A `recipientType` property value isn't returned by the `getAsync` method. + * The email sender is always a user whose email address is on the Exchange server. + * + * @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 function. + * @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 the item's from value, as an `EmailAddressDetails` object. + */ + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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 | EmailAddressDetails} in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - This method is supported in Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + * To learn more about APIs supported in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - A `recipientType` property value isn't returned by the `getAsync` method. + * The email sender is always a user whose email address is on the Exchange server. + * + * @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 the item's from value, as an `EmailAddressDetails` object. + */ + getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides basic details about the notification message that raised the `Office.EventType.InfobarClicked` event. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + interface InfobarClickedEventArgs { + /** + * Gets additional details about the notification message. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + infobarDetails: InfobarDetails; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + type: "olkInfobarClicked"; + } + /** + * Provides additional details about the notification message that raised the `Office.EventType.InfobarClicked` event. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + interface InfobarDetails { + /** + * The action type. Currently, "Dismiss" is the only supported action. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + actionType: MailboxEnums.InfobarActionType; + /** + * The notification type. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + infobarType: MailboxEnums.InfobarType; + } + /** + * The `InternetHeaders` object represents custom internet headers that are preserved after the message item leaves Exchange + * and is converted to a MIME message. + * + * Internet headers are stored as string key-value pairs on a per-item basis. + * + * **Note**: This object is intended for you to set and get your custom headers on a message item. To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **Recommended practices** + * + * Currently, internet headers are a finite resource on a user's mailbox. When the quota is exhausted, you can't create any more internet headers + * on that mailbox, which can result in unexpected behavior from clients that rely on this to function. + * + * Apply the following guidelines when you create internet headers in your add-in. + * + * - Create the minimum number of headers required. The header quota is based on the total size of headers applied to a message. In Exchange Online, + * the header limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your organization's administrator. + * For further information on header limits, see + * {@link https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits | Exchange Online message limits} + * and {@link https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits | Exchange Server message limits}. + * + * - Name headers so that you can reuse and update their values later. As such, avoid naming headers in a variable manner + * (for example, based on user input, timestamp, etc.). + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + interface InternetHeaders { + /** + * Given an array of internet header names, this method returns a record containing those internet headers and their values. + * If the add-in requests a header that isn't available, that header won't be returned in the results. + * + * **Note**: This method is intended to return the values of the custom headers you set using the `setAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param names - The names of the internet headers to be returned. + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. The string key-value pairs of internet headers are returned in the + * `asyncResult.value` property. Any errors encountered are provided in the `asyncResult.error` property. + */ + getAsync(names: string[], options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult>) => void): void; + /** + * Given an array of internet header names, this method returns a record containing those internet headers and their values. + * If the add-in requests a header that isn't available, that header won't be returned in the results. + * + * **Note**: This method is intended to return the values of the custom headers you set using the `setAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param names - The names of the internet headers to be returned. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. The string key-value pairs of internet headers are returned in the + * `asyncResult.value` property. Any errors encountered are provided in the `asyncResult.error` property. + */ + getAsync(names: string[], callback: (asyncResult: Office.AsyncResult>) => void): void; + /** + * Given an array of internet header names, this method removes the specified headers from the internet header collection. + * + * **Note**: This method is intended to remove the custom headers you set using the `setAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param names - The names of the internet headers to be removed. + * @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 function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. + */ + removeAsync(names: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Given an array of internet header names, this method removes the specified headers from the internet header collection. + * + * **Note**: This method is intended to remove the custom headers you set using the `setAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. + */ + removeAsync(names: string[], callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the specified internet headers to the specified values. + * + * The `setAsync` method creates a new header if the specified header doesn't already exist; otherwise, the existing value is replaced with + * the new value. + * + * **Note**: This method is intended to set the values of your custom headers. + * + * **Important**: The header quota is based on the total size of headers applied to a message. In Exchange Online, + * the header limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your organization's administrator. + * For further information on header limits, see + * {@link https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits | Exchange Online message limits} + * and {@link https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits | Exchange Server message limits}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param headers - The names and corresponding values of the headers to be set. This should be a record object with its keys being internet header names + * and values being the corresponding header value strings. + * @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 function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. + */ + setAsync(headers: Record, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the specified internet headers to the specified values. + * + * The `setAsync` method creates a new header if the specified header doesn't already exist; otherwise, the existing value is replaced with + * the new value. + * + * **Note**: This method is intended to set the values of your custom headers. + * + * **Important**: The header quota is based on the total size of headers applied to a message. In Exchange Online, + * the header limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your organization's administrator. + * For further information on header limits, see + * {@link https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits | Exchange Online message limits} + * and {@link https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits | Exchange Server message limits}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param headers - The names and corresponding values of the headers to be set. This should be a record object with its keys being internet header names + * and values being the corresponding header value strings. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. + */ + setAsync(headers: Record, callback?: (asyncResult: Office.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. + * + * To see the full member list, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * If you want to see IntelliSense for only a specific type or mode, cast this item to one of the following: + * + * - {@link Office.AppointmentCompose | AppointmentCompose} + * + * - {@link Office.AppointmentRead | AppointmentRead} + * + * - {@link Office.MessageCompose | MessageCompose} + * + * - {@link Office.MessageRead | MessageRead} + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer, Appointment Attendee, Message Compose, Message Read + */ + interface Item { + } + /** + * 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Child interfaces: + * + * - {@link Office.AppointmentCompose | AppointmentCompose} + * + * - {@link Office.MessageCompose | MessageCompose} + */ + interface ItemCompose extends Item { + } + /** + * 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Child interfaces: + * + * - {@link Office.AppointmentRead | AppointmentRead} + * + * - {@link Office.MessageRead | MessageRead} + */ + interface ItemRead extends Item { + } + /** + * Represents a date and time in the local client's time zone. Read mode only. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 representing 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + */ + getAsync(callback: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - DataExceedsMaximumSize: The location parameter is longer than 255 characters. + * + * @param location - The location of the appointment. 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 function. + * @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. + */ + setAsync(location: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - DataExceedsMaximumSize: The location parameter is longer than 255 characters. + * + * @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. + */ + setAsync(location: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Represents a location. Read-only. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface LocationDetails { + /** + * The `LocationIdentifier` of the location. + */ + locationIdentifier: LocationIdentifier; + /** + * The location's display name. + */ + displayName: string; + /** + * The email address associated with the location. Only locations of type `Room` have an email address. + */ + emailAddress: string; + } + /** + * Represents the ID of a location. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface LocationIdentifier { + /** + * The location's unique ID. + * + * For `Room` type, it's the room's email address. + * + * For `Custom` type, it's the `displayName`. + */ + id: string; + /** + * The location's type. + */ + type: MailboxEnums.LocationType | string; + } + /** + * Provides access to the Microsoft Outlook add-in object model. + * + * Key properties: + * + * - `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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 Office application. + * It should be one of the following values: `Outlook`, `OutlookWebApp`, `OutlookIOS`, or `OutlookAndroid`. + * **Note**: The "Outlook" value is returned for Outlook on desktop clients (i.e., Windows and Mac). + * + * - `hostVersion` (string): A string that represents the version of either the Office application or the Exchange Server (e.g., "15.0.468.0"). + * If the mail add-in is running in Outlook on desktop or mobile clients, the `hostVersion` property returns the version of the + * application, Outlook. In Outlook on the web, the property returns the version of the Exchange Server. + * + * - `OWAView` (`MailboxEnums.OWAView` or string): An enum (or string literal) that represents the current view of Outlook on the web. + * If the application is not Outlook on the web, then accessing this property results in undefined. + * Outlook on the web 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}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * Starting with Mailbox requirement set 1.5, you can also use the + * {@link https://learn.microsoft.com/javascript/api/office/office.context?view=outlook-js-preview&preserve-view=true#office-office-context-diagnostics-member | Office.context.diagnostics} + * property to get similar information. + */ + diagnostics: Diagnostics; + /** + * Gets the URL of the Exchange Web Services (EWS) endpoint for this email account. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - Your app must have the **read item** 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 **read/write item** permissions to call the `saveAsync` method. + * + * - This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - 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://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item | get attachments from the selected item}. + */ + ewsUrl: string; + /** + * The mailbox item. Depending on the context in which the add-in opened, the item type may vary. + * If you want to see IntelliSense for only a specific type or mode, cast this item to one of the following: + * + * {@link Office.MessageCompose | MessageCompose}, {@link Office.MessageRead | MessageRead}, + * {@link Office.AppointmentCompose | AppointmentCompose}, {@link Office.AppointmentRead | AppointmentRead} + * + * **Important**: `item` can be null if your add-in supports pinning the task pane. For details on how to handle, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/pinnable-taskpane#implement-the-event-handler | Implement a pinnable task pane in Outlook}. + */ + item?: Item & ItemCompose & ItemRead & Message & MessageCompose & MessageRead & Appointment & AppointmentCompose & AppointmentRead; + /** + * Gets an object that provides methods to manage the categories master list associated with a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + masterCategories: MasterCategories; + /** + * Gets the URL of the REST endpoint for this email account. + * + * Your app must have the **read item** 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 **read/write item** permissions to call the `saveAsync` method. + * + * However, in delegate or shared scenarios, you should instead use the `targetRestUrl` property of the + * {@link Office.SharedProperties | SharedProperties} object (introduced in requirement set 1.8). For more information, + * see the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | shared folders and shared mailbox} article. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * The `restUrl` value can be used to make {@link https://learn.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 address, and time zone. + * + * More information is under {@link Office.UserProfile} + */ + userProfile: UserProfile; + + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Mailbox object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 - 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 | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Mailbox object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 of + * type `Office.AsyncResult`. + */ + addHandlerAsync(eventType: Office.EventType | string, handler: any, callback?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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: MailboxEnums.RestVersion | string): string; + /** + * Gets a dictionary containing time information in local client time. + * + * The dates and times used by a mail app for Outlook on the web or desktop clients can use different time zones. + * Outlook uses the client computer time zone; Outlook on the web 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 on desktop clients, 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 on the web, the `convertToLocalClientTime` method will return a dictionary object + * with the values set to the time zone specified in the EAC. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - 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://learn.microsoft.com/previous-versions/office/office-365-api/api/version-2.0/mail-rest-operations | Outlook Mail API} + * or the {@link https://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: MailboxEnums.RestVersion | string): 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. + * + * @returns A Date object with the time expressed in UTC. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param input - The local time value to convert. + */ + convertToUtcClientTime(input: LocalClientTime): Date; + /** + * Displays an existing calendar appointment. + * + * The `displayAppointmentForm` method opens an existing calendar appointment in a new window on the desktop. + * + * In Outlook on Mac, you can use this method to display a single appointment that isn't part of a recurring series, or the master appointment + * of a recurring series. However, you can't display an instance of the series because you can't access the properties + * (including the item ID) of instances of a recurring series. + * + * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K 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 is returned. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing calendar appointment. + */ + displayAppointmentForm(itemId: string): void; + /** + * Displays an existing calendar appointment. + * + * The `displayAppointmentFormAsync` method opens an existing calendar appointment in a new window on the desktop or in a dialog box on + * mobile devices. + * + * In Outlook on 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. However, you can't display an instance of the series because you can't access the properties + * (including the item ID) of instances of a recurring series. + * + * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K 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 is returned. + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing calendar appointment. + * @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 function. + * @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. + */ + displayAppointmentFormAsync(itemId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays an existing calendar appointment. + * + * The `displayAppointmentFormAsync` method opens an existing calendar appointment in a new window on the desktop or in a dialog box on + * mobile devices. + * + * In Outlook on 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. However, you can't display an instance of the series because you can't access the properties + * (including the item ID) of instances of a recurring series. + * + * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K 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 is returned. + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing calendar appointment. + * @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. + */ + displayAppointmentFormAsync(itemId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays an existing message. + * + * The `displayMessageForm` method opens an existing message in a new window on the desktop. + * + * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K characters. + * + * If the specified item identifier doesn't identify an existing message, no message will be displayed on the client computer, and + * no error message is returned. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - Don't 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. + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing message. + */ + displayMessageForm(itemId: string): void; + /** + * Displays an existing message. + * + * The `displayMessageFormAsync` method opens an existing message in a new window on the desktop or in a dialog box on mobile devices. + * + * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K 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 is returned. + * + * Do not use the `displayMessageForm` or `displayMessageFormAsync` method with an itemId that represents an appointment. + * Use the `displayAppointmentForm` or `displayAppointmentFormAsync` method to display an existing appointment, + * and `displayNewAppointmentForm` or `displayNewAppointmentFormAsync` to display a form to create a new appointment. + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing message. + * @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 function. + * @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. + */ + displayMessageFormAsync(itemId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays an existing message. + * + * The `displayMessageFormAsync` method opens an existing message in a new window on the desktop or in a dialog box on mobile devices. + * + * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K 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 is returned. + * + * Do not use the `displayMessageForm` or `displayMessageFormAsync` method with an itemId that represents an appointment. + * Use the `displayAppointmentForm` or `displayAppointmentFormAsync` method to display an existing appointment, + * and `displayNewAppointmentForm` or `displayNewAppointmentFormAsync` to display a form to create a new appointment. + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing message. + * @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. + */ + displayMessageFormAsync(itemId: string, callback?: (asyncResult: Office.AsyncResult) => void): 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 on the web, this method always displays a form with an attendees field. + * If you don't 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param parameters - An `AppointmentForm` describing the new appointment. All properties are optional. + */ + displayNewAppointmentForm(parameters: AppointmentForm): void; + /** + * Displays a form for creating a new calendar appointment. + * + * The `displayNewAppointmentFormAsync` 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 on the web, 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * @param parameters - An `AppointmentForm` describing the new appointment. All properties are optional. + * @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 function. + * @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. + */ + displayNewAppointmentFormAsync(parameters: AppointmentForm, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a form for creating a new calendar appointment. + * + * The `displayNewAppointmentFormAsync` 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 on the web, 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * @param parameters - An `AppointmentForm` describing the new appointment. All properties are optional. + * @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. + */ + displayNewAppointmentFormAsync(parameters: AppointmentForm, callback?: (asyncResult: Office.AsyncResult) => void): 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. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 | 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 | 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 | 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. **Important**: This link must be + * publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can + * be accessible on a private network as long as it doesn't need further authentication. + * + * `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; + /** + * Displays a form for creating a new message. + * + * The `displayNewMessageFormAsync` 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. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 | 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 | 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 | 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. **Important**: This link must be + * publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can + * be accessible on a private network as long as it doesn't need further authentication. + * + * `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. + * @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 function. + * @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. + */ + displayNewMessageFormAsync(parameters: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a form for creating a new message. + * + * The `displayNewMessageFormAsync` 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. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 | 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 | 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 | 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. **Important**: This link must be + * publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can + * be accessible on a private network as long as it doesn't need further authentication. + * + * `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. + * @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. + */ + displayNewMessageFormAsync(parameters: any, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets a string that contains a token used to call REST APIs or Exchange Web Services (EWS). + * + * 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. + * + * The token is returned as a string in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * *REST Tokens* + * + * When a REST token is requested (`options.isRest` = `true`), the resulting token won't work to authenticate EWS 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 + * **read/write mailbox** permission in its manifest. + * If the **read/write mailbox** 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. + * + * This API works for the following scopes. + * + * - `Mail.ReadWrite` + * + * - `Mail.Send` + * + * - `Calendars.ReadWrite` + * + * - `Contacts.ReadWrite` + * + * *EWS Tokens* + * + * When an EWS token is requested (`options.isRest` = `false`), the resulting token won't 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. + * + * You can pass both the token and either an attachment identifier or item identifier to an external system. That system uses + * the token as a bearer authorization token to call the Exchange Web Services (EWS) + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getattachment-operation | GetAttachment} operation or + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getitem-operation | GetItem} operation to return an + * attachment or item. For example, you can create a remote service to + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item | get attachments from the selected item}. + * + * **Important**: + * + * - This method is only supported in read mode in Outlook on Android and on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - EWS operations aren't supported in add-ins running in Outlook on iOS and on Android. A REST token is always returned in Outlook + * mobile clients even if `options.isRest` is set to `false`. + * + *- Calling the `getCallbackTokenAsync` method in read mode requires a minimum permission level of **read item**. + * + * - Calling the `getCallbackTokenAsync` method in compose mode requires you to have saved the item. + * The `saveAsync` method requires a minimum permission level of **read/write item**. + * + * - For guidance on delegate or shared scenarios, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | shared folders and shared mailbox} article. + * + * **Errors**: + * + * - `HTTPRequestFailure`: The request has failed. Please look at the diagnostics object for the HTTP error code. + * + * - `InternalServerError`: The Exchange server returned an error. Please look at the diagnostics object for more information. + * + * - `NetworkError`: The user is no longer connected to the network. Please check your network connection and try again. + * + * @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 returned as a string in the `asyncResult.value` property. + * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. + */ + getCallbackTokenAsync(options: Office.AsyncContextOptions & { isRest?: boolean }, callback: (asyncResult: Office.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. + * + * The token is returned as a string in the `asyncResult.value` property. + * + * @remarks + * [Api set: All support Read mode; Mailbox 1.3 introduced Compose mode support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - You can pass both the token and either an attachment identifier or item identifier to an external system. That system uses + * the token as a bearer authorization token to call the Exchange Web Services (EWS) + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getattachment-operation | GetAttachment} or + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getitem-operation | GetItem} operation to return an + * attachment or item. For example, you can create a remote service to + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item | get attachments from the selected item}. + * + * - Calling the `getCallbackTokenAsync` method in read mode requires a minimum permission level of **read item**. + * + * - Calling the `getCallbackTokenAsync` method in compose mode requires you to have saved the item. + * The `saveAsync` method requires a minimum permission level of **read/write item**. + * + * - This method isn't supported in Outlook on Android or on iOS. EWS operations aren't supported in add-ins running on Outlook mobile clients. + * For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - For guidance on delegate or shared scenarios, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | shared folders and shared mailbox} article. + * + * **Errors**: + * + * - `HTTPRequestFailure`: The request has failed. Please look at the diagnostics object for the HTTP error code. + * + * - `InternalServerError`: The Exchange server returned an error. Please look at the diagnostics object for more information. + * + * - `NetworkError`: The user is no longer connected to the network. Please check your network connection and try again. + * + * @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 returned as a string in the `asyncResult.value` property. + * If there was an error, 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: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; + /** + * Gets currently selected messages on which an add-in can activate and perform operations. An add-in can activate on a maximum of 100 messages at a time. + * To learn more about item multi-select, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: This method only applies to messages. + * + * @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 function. + * @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 properties of the selected messages, such as the item ID and subject, are returned as an array of + * {@link Office.SelectedItemDetails | SelectedItemDetails} objects in the `asyncResult.value` property. The objects in the array follow the order in which + * messages were selected. + */ + getSelectedItemsAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets currently selected messages on which an add-in can activate and perform operations. An add-in can activate on a maximum of 100 messages at a time. + * To learn more about item multi-select, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: This method only applies to messages. + * + * @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 function. + * @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 properties of the selected messages, such as the item ID and subject, are returned as an array of + * {@link Office.SelectedItemDetails | SelectedItemDetails} objects in the `asyncResult.value` property. The objects in the array follow the order in which + * messages were selected. + */ + getSelectedItemsAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets a token identifying the user and the Office Add-in. + * + * The token is returned as a string in the `asyncResult.value` property. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * The `getUserIdentityTokenAsync` method returns a token that you can use to identify and + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication | authenticate the add-in and user with an external system}. + * + * **Errors**: + * + * - `HTTPRequestFailure`: The request has failed. Please look at the diagnostics object for the HTTP error code. + * + * - `InternalServerError`: The Exchange server returned an error. Please look at the diagnostics object for more information. + * + * - `NetworkError`: The user is no longer connected to the network. Please check your network connection and try again. + * + * @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 returned as a string in the `asyncResult.value` property. + * If there was an error, 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: (asyncResult: Office.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. + * + * The `makeEwsRequestAsync` method sends an EWS request on behalf of the add-in to Exchange. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - To enable the `makeEwsRequestAsync` method to make EWS requests, the server administrator must set `OAuthAuthentication` to `true` on the + * Client Access Server EWS directory . + * + * - Your add-in must have the **read/write mailbox** permission to use the `makeEwsRequestAsync` method. + * For information about using the **read/write mailbox** permission and the EWS operations that you can call with the `makeEwsRequestAsync` method, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Specify permissions for mail add-in access to the user's mailbox}. + * + * - If your add-in needs to access Folder Associated Items or its XML request must specify UTF-8 encoding (`\`), + * it must use Microsoft Graph or REST APIs to access the user's mailbox instead. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - This method isn't supported when the add-in is loaded in a Gmail mailbox. + * + * - When you use the `makeEwsRequestAsync` method in add-ins that run in Outlook versions earlier than Version 15.0.4535.1004, you must set + * the encoding value to ISO-8859-1 (``). To determine the version of an Outlook client, use the + * `mailbox.diagnostics.hostVersion` property. You don't need to set the encoding value when your add-in is running in Outlook on the web. + * To determine the Outlook client in which your add-in is running, use the `mailbox.diagnostics.hostName` property. + * + * @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 in the `error` property. + * @param userContext - Optional. Any state data that is passed to the asynchronous method. + */ + makeEwsRequestAsync(data: any, callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Mailbox object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param eventType - The event that should revoke the handler. + * @param options - 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 | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Mailbox object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param eventType - The event that should revoke the handler. + * @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 | string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Represents the categories master list on the mailbox. + * + * In Outlook, a user can tag messages and appointments by using a category to color-code them. + * The user defines categories in a master list on their mailbox. They can then apply one or more categories to an item. + * + * **Important**: In delegate or shared scenarios, the delegate can get the categories in the master list but can't add or remove categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface MasterCategories { + /** + * Adds categories to the master list on a mailbox. Each category must have a unique name but multiple categories can use the same color. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `DuplicateCategory`: One of the categories provided is already in the master category list. + * + * - `PermissionDenied`: The user does not have permission to perform this action. + * + * @param categories - The categories to be added to the master list on the mailbox. + * @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 function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addAsync(categories: CategoryDetails[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds categories to the master list on a mailbox. Each category must have a unique name but multiple categories can use the same color. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `DuplicateCategory`: One of the categories provided is already in the master category list. + * + * - `PermissionDenied`: The user does not have permission to perform this action. + * + * @param categories - The categories to be added to the master list on the mailbox. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addAsync(categories: CategoryDetails[], callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the master list of categories on a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If adding categories fails, the `asyncResult.error` property will contain an error code. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the master list of categories on a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes categories from the master list on a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `PermissionDenied`: The user does not have permission to perform this action. + * + * @param categories - The categories to be removed from the master list on the mailbox. + * @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 function. + * @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 categories fails, the `asyncResult.error` property will contain an error code. + */ + removeAsync(categories: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes categories from the master list on a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `PermissionDenied`: The user does not have permission to perform this action. + * + * @param categories - The categories to be removed from the master list on the mailbox. + * @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 categories fails, the `asyncResult.error` property will contain an error code. + */ + removeAsync(categories: string[], callback?: (asyncResult: Office.AsyncResult) => void): 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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; + } + /** + * A subclass of {@link Office.Item | 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Child interfaces: + * + * - {@link Office.MessageCompose | MessageCompose} + * + * - {@link Office.MessageRead | MessageRead} + */ + interface Message extends Item { + } + /** + * 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Parent interfaces: + * + * - {@link Office.ItemCompose | ItemCompose} + * + * - {@link Office.Message | Message} + */ + 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. + * + * Depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients you can get or update. + * See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + bcc: Recipients; + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + body: Body; + /** + * Gets an object that provides methods for managing the item's categories. + * + * **Important**: In Outlook on the web, you can't use the API to manage categories on a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + categories: Categories; + /** + * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depend on the mode of the + * current item. + * + * The `cc` property returns a `Recipients` object that provides methods to get or update the recipients on the + * **Cc** line of the message. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients + * you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + conversationId: string; + /** + * Gets or sets the delayed delivery date and time of a message. + * + * The `delayDeliveryTime` property returns a `DelayDeliveryTime` object that provides methods to manage the delivery date and time of the message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + delayDeliveryTime: DelayDeliveryTime; + /** + * Gets the email address of the sender of a message. + * + * The `from` property returns a `From` object that provides a method to get the from value. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This property is supported in Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + */ + from: From; + /** + * Gets or sets the custom internet headers of a message. + * + * The `internetHeaders` property returns an `InternetHeaders` object that provides methods to manage the internet headers on the message. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + internetHeaders: InternetHeaders; + /** + * 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the notification messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + notificationMessages: NotificationMessages; + /** + * Gets the object to get or set the {@link Office.SensitivityLabel | sensitivity label} of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + sensitivityLabel: SensitivityLabel; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web and desktop clients, the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item + * that this item belongs to. However, on 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://learn.microsoft.com/office/dev/add-ins/outlook/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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + seriesId: string; + /** + * Manages the {@link Office.SessionData | SessionData} of an item in Compose mode. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + sessionData: SessionData; + /** + * 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 depend 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. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients + * you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * **Important**: In recent builds of Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to + * this action (whether using this API or the Outlook UI). To work around this issue, you can try using the `addFileAttachmentFromBase64` API + * introduced with requirement set 1.8. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: 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 - 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 function. + * `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 - 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 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 & { isInline: boolean }, callback?: (asyncResult: Office.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. + * + * **Important**: In recent builds of Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to + * this action (whether using this API or the Outlook UI). To work around this issue, you can try using the `addFileAttachmentFromBase64` API + * introduced with requirement set 1.8. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: 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 - 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 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?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - Adding an inline Base64 file to a messsage in compose mode is supported in Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - If you're using a data URL API (for example, `readAsDataURL`), you need to strip out the data URL prefix, then send the rest of the string to this API. + * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + * + * - If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} + * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. + * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that isn't 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. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). + * @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 function. + * `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 - 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 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. + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options: Office.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - Adding an inline Base64 file to a messsage in compose mode is supported in Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - If you're using a data URL API (for example, `readAsDataURL`), you need to strip out the data URL prefix, then send the rest of the string to this API. + * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + * + * - If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} + * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. + * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that isn't 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. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 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. 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. + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 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 function. + * @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 | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: Office.EventType | string, handler: any, callback?: (asyncResult: Office.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 function, 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 function, 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 on the web, 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `NumberOfAttachmentsExceeded`: 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 function. + * @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 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?: (asyncResult: Office.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 function, 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 function, 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 on the web, 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `NumberOfAttachmentsExceeded`: 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 - 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 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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Closes the current item that is being composed. + * + * The behavior 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, the `close` method has no effect on a reply in the Reading Pane. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: 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. + * + * **Tip**: Use the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.messagecompose?view=outlook-js-preview&preserve-view=true#outlook-office-messagecompose-closeasync-member(1) | closeAsync} + * method instead of the `close` method if you want your add-in to: + * + * - Automatically discard a message being composed without prompting the user with the save dialog. + * + * - Determine when a user cancels the save item dialog on a message being composed. + * + * - Close a reply in the Reading Pane or an existing draft from an Outlook desktop client. + * + */ + close(): void; + /** + * Closes the current message being composed with the option to discard unsaved changes. + * The message being composed can be a new message, reply, or an existing draft. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: The `closeAsync` method is in preview. It's only supported in Outlook on Windows at this time. + * + * **Errors**: + * + * - `The operation was cancelled by the user`: The user selects **Cancel** from the save dialog and the `discardItem` property isn't defined or is set to `false`. + * + * - `The operation is not supported`: The `closeAsync` method attempts to close a reply in the Reading Pane or an existing draft and the `discardItem` property isn't defined or + * is set to `false`. + * + * @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 function. + * `discardItem`: If `true`, the current message being composed is closed and unsaved changes are discarded. When the parameter isn't declared or is + * set to `false`, a save dialog appears prompting the user to save a draft, discard changes, or cancel the operation. This behavior occurs for new messages and replies + * popped out from the Reading Pane. If you want to close a reply in the Reading Pane or an existing draft, you must set `discardItem` to `true`. Otherwise, the call will + * return an error. For more information on the error, see the Remarks section. + * + * @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 + */ + closeAsync(options: Office.AsyncContextOptions & { discardItem: boolean }, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Closes the current new message being composed. + * + * The behavior on a new message being composed depends on whether the message contains any unsaved changes. If no changes have been made, the message is + * closed without a save dialog. On the other hand, if the message contains unsaved changes, a save dialog appears prompting the user to save a draft, + * discard changes, or cancel the operation. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: The `closeAsync` method is in preview. It's only supported in Outlook on Windows at this time. + * + * **Errors**: + * + * - `The operation was cancelled by the user`: The user selects **Cancel** from the save dialog. + * + * - `The operation is not supported`: The `closeAsync` method attempts to close a reply in the Reading Pane or an existing draft. + * + * @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 + */ + closeAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Disables the Outlook client signature. + * + * The behavior of this method depends on which client the add-in is running. + * + * - In Outlook on Windows and on Mac, the signature under the **New messages** and **Replies/forwards** sections + * of the sending account is set to **(none)**. + * + * - In Outlook on the web, the signature option for new mails, replies, and forwards is disabled. + * A signature that's selected is also disabled by the method. + * + * - In Outlook on Android and on iOS, the signature saved on the mobile device is cleared. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This method is supported in Message Compose on Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 function. + * @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. + */ + disableClientSignatureAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Disables the Outlook client signature. + * + * The behavior of this method depends on which client the add-in is running. + * + * - In Outlook on Windows and on Mac, the signature under the **New messages** and **Replies/forwards** sections + * of the sending account is set to **(none)**. + * + * - In Outlook on the web, the signature option for new mails, replies, and forwards is disabled. + * A signature that's selected is also disabled by the method. + * + * - In Outlook on Android and on iOS, the signature saved on the mobile device is cleared. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This method is supported in Message Compose in Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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. + */ + disableClientSignatureAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 function. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message 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 function. + * @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 an error code with the reason for + * the failure. + */ + getAttachmentsAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @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 an error code with the reason for + * the failure. + */ + getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. + * The coercion type can be HTML or plain text. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This method is supported in Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 function. + * @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 `asyncResult.value` property contains an object with the item's compose type + * and coercion type. + * + * @returns + * An object with `ComposeType` and `CoercionType` enum values for the message item. + */ + getComposeTypeAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. + * The coercion type can be HTML or plain text. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This method is supported in Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 `asyncResult.value` property contains an object with the item's compose type + * and coercion type. + * + * @returns + * An object with `ComposeType` and `CoercionType` enum values for the message item. + */ + getComposeTypeAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message 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 function. + * @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 initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property.. + */ + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously gets the ID of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., 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 synced to the server. + * Until the item is synced, the `itemId` is not recognized and using it returns an error. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously gets the ID of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., 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 synced to the server. + * Until the item is synced, the `itemId` is not recognized and using it returns an error. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + getItemIdAsync(callback: (asyncResult: Office.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 an empty string 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 function, 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`. + * + * @returns + * The selected data as a string with format determined by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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 | string, options: Office.AsyncContextOptions, callback: (asyncResult: Office.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 an empty string 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 function, 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`. + * + * @returns + * The selected data as a string with format determined by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 | string, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * **Important**: In Message Compose mode, this API is not supported in Outlook on the web or on Windows unless the following conditions are met. + * + * a. **Delegate access/Shared folders** + * + * 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + * + * 3. The delegate opens the draft from the shared folder then continues composing. + * + * b. **Shared mailbox (applies to Outlook on Windows only)** + * + * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + * + * 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + * + * The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. + * After the message has been sent, it's usually found in the sender's **Sent Items** folder. + * + * @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 function. + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * **Important**: In Message Compose mode, this API is not supported in Outlook on the web or on Windows unless the following conditions are met. + * + * a. **Delegate access/Shared folders** + * + * 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + * + * 3. The delegate opens the draft from the shared folder then continues composing. + * + * b. **Shared mailbox (applies to Outlook on Windows only)** + * + * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + * + * 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + * + * The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. + * After the message has been sent, it's usually found in the sender's **Sent Items** folder. + * + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message 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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + */ + isClientSignatureEnabledAsync(callback: (asyncResult: Office.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 {@link Office.CustomProperties | 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 aren't encrypted on the item, so this shouldn't 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, save, and remove custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: (asyncResult: Office.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 on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` + * is 200 characters in Outlook on the web and on Windows. + * @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 function. + * @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(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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 on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` + * is 200 characters in Outlook on the web and on Windows. + * @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(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param eventType - The event that should revoke the handler. + * @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 function. + * @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 | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param eventType - The event that should revoke the handler. + * @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 | string, callback?: (asyncResult: Office.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 function. + * In Outlook on the web 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. + * + * When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * **Note**: If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID 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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @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 function. + * @param callback - 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: (asyncResult: Office.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 function. + * In Outlook on the web 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. + * + * When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * **Note**: If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID 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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + saveAsync(callback: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: 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 - 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 function. + * `coercionType`: If text, the current style is applied in Outlook on the web and desktop clients. + * 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 on the web and the default style is + * applied in Outlook on desktop clients. 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?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: 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?: (asyncResult: Office.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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Parent interfaces: + * + * - {@link Office.ItemRead | ItemRead} + * + * - {@link Office.Message | Message} + */ + interface MessageRead extends Message, ItemRead { + /** + * Gets the item's attachments as an array. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519 | Blocked attachments in Outlook}. + * + */ + attachments: AttachmentDetails[]; + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + body: Body; + /** + * Gets an object that provides methods for managing the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + categories: Categories; + /** + * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depend on the mode of the + * current item. + * + * The `cc` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each recipient listed on the **Cc** line of the message. The maximum number of recipients returned varies per Outlook client. + * + * - Windows: 500 recipients + * + * - Android, classic Mac UI, iOS: 100 recipients + * + * - Web browser: 20 recipients + * + * - New Mac UI: No limit + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + conversationId: string; + /** + * Gets the date and time that an item was created. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + dateTimeModified: Date; + /** + * Gets an object to temporarily set the content displayed in the body or subject of a message in read mode. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + display: Display; + /** + * 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + end: 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + from: EmailAddressDetails; + /** + * Gets the internet message identifier for an email message. + * + * **Important**: In the **Sent Items** folder, the `internetMessageId` may not be available yet on recently sent items. In that case, + * consider using {@link https://learn.microsoft.com/office/dev/add-ins/outlook/web-services | Exchange Web Services} to get this + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/internetmessageid | property from the server}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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.Occurrence.IPM.Appointment, IPM.Appointment.Occurrence
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 {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | 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 + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | 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://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api#get-the-item-id | Use the Outlook REST APIs from an Outlook add-in}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the location of a meeting request. + * + * The `location` property returns a string that contains the location of the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + normalizedSubject: string; + /** + * Gets the notification messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + notificationMessages: 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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + recurrence: Recurrence; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web and desktop clients, the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item + * that this item belongs to. However, on 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://learn.microsoft.com/office/dev/add-ins/outlook/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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + sender: 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + start: Date; + /** + * 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:. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 depend on the mode of the + * current item. + * + * The `to` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each recipient listed on the **To** line of the message. The maximum number of recipients returned varies per Outlook client. + * + * - Windows: 500 recipients + * + * - Android, classic Mac UI, iOS: 100 recipients + * + * - Web browser: 20 recipients + * + * - New Mac UI: No limit + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + to: EmailAddressDetails[]; + + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 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 function. + * @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 | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: Office.EventType | string, handler: any, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column 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 attempts 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. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyAllForm(formData: string | ReplyFormData): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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 function. + * @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. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column 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 attempts 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. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyForm(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 on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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 function. + * @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. + */ + displayReplyFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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. + */ + displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets all the internet headers for the message as a string. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @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 function. + * @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 internet headers data is provided in the `asyncResult.value` property as a string. + * Refer to {@link https://tools.ietf.org/html/rfc2183 | RFC 2183} for the formatting information of the returned string value. + * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + */ + getAllInternetHeadersAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets all the internet headers for the message as a string. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 internet headers data is provided in the `asyncResult.value` property as a string. + * Refer to {@link https://tools.ietf.org/html/rfc2183 | RFC 2183} for the formatting information of the returned string value. + * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + */ + getAllInternetHeadersAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the current message in EML format encoded in Base64. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @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 function. + * @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 Base64-encoded EML format of the message is returned in the `asyncResult.value` property. Any errors encountered are + * returned in the `asyncResult.error` property. + * + * @beta + */ + getAsFileAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the current message in EML format encoded in Base64. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded EML format of the message is returned in the `asyncResult.value` property. Any errors encountered are + * returned in the `asyncResult.error` property. + * + * @beta + */ + getAsFileAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.MessageRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 function. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.MessageRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the entities found in the selected item's body. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + getEntities(): Entities; + /** + * Gets an array of all the entities of the specified entity type found in the selected item's body. + * + * @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 + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param entityType - One of the `EntityType` enumeration values. + * + * While the minimum permission level to use this method is **restricted**, some entity types require **read item** to access, as specified in the + * following table. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Value of entityTypeType of objects in returned arrayRequired Permission Level
AddressStringRestricted
ContactContactReadItem
EmailAddressStringReadItem
MeetingSuggestionMeetingSuggestionReadItem
PhoneNumberPhoneNumberRestricted
TaskSuggestionTaskSuggestionReadItem
URLStringRestricted
+ */ + getEntitiesByType(entityType: MailboxEnums.EntityType | string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Returns well-known entities in the selected item that pass the named filter defined in an XML manifest file. + * + * @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. If there's no `ItemHasKnownEntity` element in the manifest with a + * `FilterName` element value that matches the `name` parameter, the method returns `null`. If the `name` parameter matches an + * `ItemHasKnownEntity` element in the manifest, but there are no entities in the current item that match, the method returns an empty array. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param name - The name of the `ItemHasKnownEntity` rule element that defines the filter to match. + */ + getFilteredEntitiesByName(name: string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @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 function. + * @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 initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns string values in the selected item that match the regular expressions defined in an XML manifest file. + * + * @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. 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + getRegExMatches(): any; + /** + * Returns string values in the selected item that match the named regular expression defined in an XML manifest file. + * + * @returns + * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the manifest XML file, + * with the specified `RegExName` element value. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 an XML manifest file. + * Highlighted matches apply to contextual add-ins. + * + * **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * 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 on iOS or Android. + * + * @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 + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + getSelectedRegExMatches(): any; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @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 function. + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox (now in preview). + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: Office.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 {@link Office.CustomProperties | 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 aren't encrypted on the item, so this shouldn't 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, save, and remove custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param eventType - The event that should revoke the handler. + * @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 function. + * @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 | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param eventType - The event that should revoke the handler. + * @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 | string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides methods to get and set the all-day event status of a meeting in an Outlook add-in. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @beta + */ + interface IsAllDayEvent { + /** + * Gets the boolean value indicating whether the event is all day or not. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * + * @beta + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the boolean value indicating whether the event is all day or not. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + * + * @beta + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the all-day event status of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * If an appointment is marked as an all-day event: + * - Start and end time will be marked as 12:00 AM (just like in the Outlook UI). Start time will return 12:00 AM and end time will be 12:00 AM the next day. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param isAllDayEvent - boolean value to set the all day event status. + * @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 function. + * @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 + */ + setAsync(isAllDayEvent: boolean, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the all-day event status of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * If an appointment is marked as an all-day event: + * - Start and end time will be marked as 12:00 AM (just like in the Outlook UI). Start time will return 12:00 AM and end time will be 12:00 AM the next day. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param isAllDayEvent - boolean value to set the all day event status. + * @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 + */ + setAsync(isAllDayEvent: boolean, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * The definition of the action for a notification message. + * + * **Important**: In modern Outlook on the web, the `NotificationMessageAction` object is available in Compose mode only. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface NotificationMessageAction { + /** + * The type of action to be performed. + * `ActionType.ShowTaskPane` is the only supported action. + */ + actionType: string | MailboxEnums.ActionType; + /** + * The text of the action link. + */ + actionText: string; + /** + * The button defined in the manifest. + */ + commandId: string; + /** + * Any JSON data the action button needs to pass on. + * This data can be retrieved by calling `item.getInitializationContextAsync`. + */ + contextData: any; + } + /** + * An array of `NotificationMessageDetails` objects are returned by the `NotificationMessages.getAllAsync` method. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * **Important**: Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + */ + type: MailboxEnums.ItemNotificationMessageType | string; + /** + * A reference to an icon that is defined in the manifest. It appears in the infobar area. + * It is applicable if the type is `InformationalMessage`, and is required if the type is `InsightMessage`. + * Specifying this parameter for an unsupported type results in an exception. + * + * **Note**: At present, the custom icon is displayed in Outlook on Windows only and not on other clients (e.g., Mac, web browser). + */ + 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; + /** + * Specifies if the message should be persistent. 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; + /** + * Specifies actions for the message. Limit: 1 action. This limit doesn't count the "Dismiss" action which is included by default. + * Only applicable when the type is `InsightMessage`. + * Specifying this property for an unsupported type or including too many actions throws an error. + * + * **Important**: In modern Outlook on the web, the `actions` property is available in Compose mode only. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + actions?: NotificationMessageAction[]; + } + /** + * The `NotificationMessages` object is returned as the `notificationMessages` property of an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - Only one notification of type {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} + * is allowed per add-in. Attempting to add more will throw an error. + * + * - In modern Outlook on the web, you can add an `InsightMessage` notification only in Compose mode. + * + * - Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + * + * @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 - 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 function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + addAsync(key: string, JSONmessage: NotificationMessageDetails, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - Only one notification of type {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} + * is allowed per add-in. Attempting to add more will throw an error. + * + * - In modern Outlook on the web, you can add an `InsightMessage` notification only in Compose mode. + * + * - Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + * + * @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`. + */ + addAsync(key: string, JSONmessage: NotificationMessageDetails, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns all keys and messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @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 function. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns all keys and messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes a notification message for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param key - The key for the notification message to remove. + * @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 function. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes a notification message for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 - 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 function. + * @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?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides the updated Office theme that raised the `Office.EventType.OfficeThemeChanged` event. + * + * @remarks + * [Api set: Mailbox preview] + * + * @beta + */ + export interface OfficeThemeChangedEventArgs { + /** + * Gets the updated Office theme. + * + * @remarks + * [Api set: Mailbox preview] + * + * @beta + */ + officeTheme: Office.OfficeTheme; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox preview] + * + * @beta + */ + type: "officeThemeChanged"; + } + /** + * 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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + interface Organizer { + /** + * Gets the organizer value of an appointment as an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: A `recipientType` property value isn't returned by the getAsync method. + * The appointment organizer is always a user whose email address is on the Exchange server. + * + * @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 function. + * @param callback - Optional. 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 the appointment's organizer value, + * as an `EmailAddressDetails` object. + */ + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the organizer value of an appointment as an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: A `recipientType` property value isn't returned by the getAsync method. + * The appointment organizer is always a user whose email address is on the Exchange server. + * + * @param callback - Optional. 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 the appointment's organizer value, + * as an `EmailAddressDetails` object. + */ + getAsync(callback?: (asyncResult: Office.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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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; + } + /** + * Represents recipients of an item. Compose mode only. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + interface Recipients { + /** + * Adds a recipient list to the existing recipients for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: With the `addAsync` method, you can add a maximum of 100 recipients to a mail item in Outlook on Windows, on Mac (classic UI), + * on the web, on Android, and on iOS. However, take note of the following: + * + * - In Outlook on Windows, on Mac (classic UI), and on the web, you can have a maximum of 500 recipients in a target field. + * If you need to add more than 100 recipients to a mail item, you can call `addAsync` repeatedly, but be mindful of the recipient limit of the field. + * + * - In Outlook on Android and on iOS, the `addAsync` method isn't supported in Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * There's no recipient limit if you call `addAsync` in Outlook on Mac (new UI). + * + * **Errors**: + * + * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + * + * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, + * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + * @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 function. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds a recipient list to the existing recipients for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: With the `addAsync` method, you can add a maximum of 100 recipients to a mail item in Outlook on Windows, on Mac (classic UI), + * on the web, on Android, and on iOS. However, take note of the following: + * + * - In Outlook on Windows, on Mac (classic UI), and on the web, you can have a maximum of 500 recipients in a target field. + * If you need to add more than 100 recipients to a mail item, you can call `addAsync` repeatedly, but be mindful of the recipient limit of the field. + * + * - In Outlook on Android and on iOS, the `addAsync` method isn't supported in Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * There's no recipient limit if you call `addAsync` in Outlook on Mac (new UI). + * + * **Errors**: + * + * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + * + * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, + * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets a recipient list for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * The maximum number of recipients returned by this method varies per Outlook client. + * + * - Windows, web browser, Mac (classic UI): 500 recipients + * + * - Android, iOS: 100 recipients + * + * - Mac (new UI): No limit + * + * The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the following characteristics. + * + * - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the recipient's saved display name. + * + * - A Teams meeting status icon appears before the recipient's name or email address. + * + * - A semicolon appears after the recipient's name or email address. + * + * - The recipient's name or email address is underlined or enclosed in a box. + * + * To resolve an email address once it's added to a mail item, the sender must use the **Tab** key or select a suggested contact or email address from + * the auto-complete list. + * + * In Outlook on the web and on Windows, if a user creates a new message by activating a contact's email address link from their contact + * or profile card, your add-in's `Recipients.getAsync` call returns the contact's email address in the `displayName` property of the associated + * {@link Office.EmailAddressDetails | EmailAddressDetails} object instead of the contact's saved name. For more details, see + * {@link https://github.com/OfficeDev/office-js/issues/2201 | related GitHub issue}. + * + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * of type `Office.AsyncResult`. The `asyncResult.value` property of the result is an array of + * {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets a recipient list for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * The maximum number of recipients returned by this method varies per Outlook client. + * + * - Windows, web browser, Mac (classic UI): 500 recipients + * + * - Android, iOS: 100 recipients + * + * - Mac (new UI): No limit + * + * The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the following characteristics. + * + * - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the recipient's saved display name. + * + * - A Teams meeting status icon appears before the recipient's name or email address. + * + * - A semicolon appears after the recipient's name or email address. + * + * - The recipient's name or email address is underlined or enclosed in a box. + * + * To resolve an email address once it's added to a mail item, the sender must use the **Tab** key or select a suggested contact or email address from + * the auto-complete list. + * + * In Outlook on the web and on Windows, if a user creates a new message by activating a contact's email address link from their contact + * or profile card, your add-in's `Recipients.getAsync` call returns the contact's email address in the `displayName` property of the associated + * {@link Office.EmailAddressDetails | EmailAddressDetails} object instead of the contact's saved name. For more details, see + * {@link https://github.com/OfficeDev/office-js/issues/2201 | related GitHub issue}. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * of type `Office.AsyncResult`. The `asyncResult.value` property of the result is an array of + * {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets a recipient list for an appointment or message. + * + * The `setAsync` method overwrites the current recipient list. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: With the `setAsync` method, you can set a maximum of 100 recipients in Outlook on Windows, on Mac (classic UI), + * on the web, on Android, and on iOS. However, take note of the following: + * + * - In Outlook on Windows, on Mac (classic UI), and on the web, you can have a maximum of 500 recipients in a target field. + * If you need to set more than 100 recipients, you can call `setAsync` repeatedly, but be mindful of the recipient limit of the field. + * + * - In Outlook on Android and on iOS, the `setAsync` method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * There's no recipient limit if you call `setAsync` in Outlook on Mac (new UI). + * + * **Errors**: + * + * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + * + * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, + * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + * @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 function. + * @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 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: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets a recipient list for an appointment or message. + * + * The `setAsync` method overwrites the current recipient list. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: With the `setAsync` method, you can set a maximum of 100 recipients in Outlook on Windows, on Mac (classic UI), + * on the web, on Android, and on iOS. However, take note of the following: + * + * - In Outlook on Windows, on Mac (classic UI), and on the web, you can have a maximum of 500 recipients in a target field. + * If you need to set more than 100 recipients, you can call `setAsync` repeatedly, but be mindful of the recipient limit of the field. + * + * - In Outlook on Android and on iOS, the `setAsync` method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * There's no recipient limit if you call `setAsync` in Outlook on Mac (new UI). + * + * **Errors**: + * + * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + * + * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, + * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + * @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 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: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides change status of recipients fields when the `Office.EventType.RecipientsChanged` event is raised. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + export interface RecipientsChangedEventArgs { + /** + * Gets an object that indicates change state of recipients fields. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + changedRecipientFields: RecipientsChangedFields; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + type: "olkRecipientsChanged"; + } + /** + * Represents `RecipientsChangedEventArgs.changedRecipientFields` object. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + interface RecipientsChangedFields { + /** + * Gets if recipients in the **bcc** field were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + bcc: boolean + /** + * Gets if recipients in the **cc** field were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + cc: boolean; + /** + * Gets if optional attendees were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + optionalAttendees: boolean; + /** + * Gets if required attendees were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + requiredAttendees: boolean; + /** + * Gets if resources were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + resources: boolean; + /** + * Gets if recipients in the **to** field were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + to: boolean; + } + /** + * 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). + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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)
+ */ + interface Recurrence { + /** + * Gets or sets the properties of the recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + recurrenceProperties?: RecurrenceProperties; + /** + * Gets or sets the properties of the recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + recurrenceTimeZone?: RecurrenceTimeZone; + /** + * Gets or sets the type of the recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + recurrenceType: MailboxEnums.RecurrenceType | string; + /** + * The {@link Office.SeriesTime | 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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + seriesTime: SeriesTime; + + /** + * Returns the current recurrence object of an appointment series. + * + * This method returns the entire `Recurrence` object for the appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @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 function. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns the current recurrence object of an appointment series. + * + * This method returns the entire `Recurrence` object for the appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the recurrence pattern of an appointment series. + * + * **Note**: `setAsync` should only be available for series items and not instance items. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidEndTime`: The appointment end time is before its start time. + * + * @param recurrencePattern - A recurrence object. + * @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 function. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the recurrence pattern of an appointment series. + * + * **Note**: `setAsync` should only be available for series items and not instance items. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidEndTime`: 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?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides updated recurrence object that raised the `Office.EventType.RecurrenceChanged` event. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + export interface RecurrenceChangedEventArgs { + /** + * Gets the updated recurrence object. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + recurrence: Recurrence; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + type: "olkRecurrenceChanged"; + } + /** + * Represents the properties of the recurrence. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + 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?: MailboxEnums.Days | string; + /** + * Represents the set of days for this recurrence. Valid values are: 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', and 'Sun'. + */ + days?: MailboxEnums.Days[] | string[]; + /** + * Represents the number of the week in the selected month e.g., 'first' for first week of the month. + */ + weekNumber?: MailboxEnums.WeekNumber | string; + /** + * Represents the month. + */ + month?: MailboxEnums.Month | string; + /** + * 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?: MailboxEnums.Days | string; + } + /** + * Represents the time zone of the recurrence. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface RecurrenceTimeZone { + /** + * Represents the name of the recurrence time zone. + */ + name: MailboxEnums.RecurrenceTimeZone | string; + + /** + * 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. + */ + 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. + * + * **Important**: This link must be publicly accessible, without need for authentication by Exchange Online servers. However, with + * on-premises Exchange, the link can be accessible on a private network as long as it doesn't need further authentication. + */ + 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 | 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?: (asyncResult: Office.AsyncResult) => void; + /** + * An object literal that contains the following property:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + */ + options?: Office.AsyncContextOptions; + } + /** + * 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 mailbox 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 shouldn't be considered + * secure storage. They can be accessed by Exchange Web Services or Extended MAPI. + * They shouldn't 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. + * + * To learn more about `RoamingSettings`, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **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's 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 (or item in the case of UI-less add-ins) is closed and reopened. + * + * - When set and saved through Outlook on Windows or Mac, these settings are reflected in Outlook on the web only after a browser refresh. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface RoamingSettings { + /** + * Retrieves the specified setting. + * + * @returns Type: String | Number | Boolean | Object | Array + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param name - The case-sensitive name of the setting to retrieve. + */ + get(name: string): any; + /** + * Removes the specified setting. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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's 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're available the next time the add-in is used, use the `saveAsync` method. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets or creates the specified setting. + * + * The `set` method creates a new setting of the specified name if it doesn't 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. An error with code 9057 is thrown when that size limit is exceeded. + * + * Any changes made to settings using the `set` method will not be saved to the server until the `saveAsync` method is called. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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; + } + /** + * Represents the properties of a message that's currently selected in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose, Message Read + */ + interface SelectedItemDetails { + /** + * The identifier of the message conversation that contains the message that's currently selected. + * + * @beta + */ + conversationId: string; + /** + * Returns `true` if the message that's currently selected contains an attachment. + * + * @beta + */ + hasAttachment: boolean; + /** + * The internet message identifier of the message that's currently selected. + * + * @beta + */ + internetMessageId: string; + /** + * The Exchange Web Services (EWS) item identifier of the message that's currently selected. + */ + itemId: string; + /** + * The Outlook mode (`Read` or `Compose`) of the message that's currently selected. + */ + itemMode: string; + /** + * The type of the item that's currently selected. `Message` is the only supported type at this time. + */ + itemType: MailboxEnums.ItemType | string; + /** + * The description that appears in the subject field of the message that's currently selected. + */ + subject: string; + } + /** + * Provides methods to get and set the sensitivity level of an appointment. To learn more about sensitivity levels, see + * {@link https://support.microsoft.com/office/4a76d05b-6c29-4a0d-9096-71784a6b12c1 | Mark your email as Normal, Personal, Private, or Confidential}. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @beta + */ + interface Sensitivity { + /** + * Gets the sensitivity level of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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 sensitivity level of the appointment is returned in the `asyncResult.value` property. + * + * @beta + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the sensitivity level of an appointment. + * + * @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 sensitivity level of the appointment is returned in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @beta + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the sensitivity level of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param sensitivity - The sensitivity level as an enum or string. + * @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 function. + * @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 + */ + setAsync(sensitivity: MailboxEnums.AppointmentSensitivityType | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the sensitivity level of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param sensitivity - The sensitivity level as an enum or string. + * @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 + */ + setAsync(sensitivity: MailboxEnums.AppointmentSensitivityType | string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides methods to get or set the sensitivity label of a message or appointment. For more information on sensitivity labels, see + * {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels | Learn about sensitivity labels}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + interface SensitivityLabel { + /** + * Gets the unique identifier (GUID) of the sensitivity label applied to a message or appointment being composed. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @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 function. + * @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 sensitivity label's GUID is returned in the + * `asyncResult.value` property. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the unique identifier (GUID) of the sensitivity label applied to a message or appointment being composed. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @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 sensitivity label's GUID is returned in the + * `asyncResult.value` property. + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Applies the specified sensitivity label to the message or appointment being composed. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * **Tip**: To determine the sensitivity labels available for use, call the `Office.context.sensitivityLabelsCatalog.getAsync` method. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @param sensitivityLabel - The sensitivity label to be applied to the message or appointment being composed. The parameter value can be a sensitivity label's + * unique identifier (GUID) or a {@link Office.SensitivityLabelDetails | SensitivityLabelDetails} object. + * @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 function. + * @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(sensitivityLabel: string | SensitivityLabelDetails, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Applies the specified sensitivity label to the message or appointment being composed. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * **Tip**: To determine the sensitivity labels available for use, call the `Office.context.sensitivityLabelsCatalog.getAsync` method. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @param sensitivityLabel - The sensitivity label to be applied to the message or appointment being composed. The parameter value can be a sensitivity label's + * unique identifier (GUID) or a {@link Office.SensitivityLabelDetails | SensitivityLabelDetails} 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(sensitivityLabel: string | SensitivityLabelDetails, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides the change status of the sensitivity label applied to a message or appointment in compose mode. This information is provided when the + * `Office.EventType.SensitivityLabelChanged` event is raised. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + export interface SensitivityLabelChangedEventArgs { + /** + * The type of event that was raised. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.13] + */ + type: "olkSensitivityLabelChanged"; + } + /** + * Represents the properties of available sensitivity labels in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + interface SensitivityLabelDetails { + /** + * The color of the sensitivity label. + */ + color: string; + /** + * The {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels#sublabels-grouping-labels | sublabels} of the sensitivity label. + * Returns `null` if a label doesn't have any sublabels. + */ + children: SensitivityLabelDetails[]; + /** + * The unique identifier (GUID) of the sensitivity label. + */ + id: string; + /** + * The name of the sensitivity label. + */ + name: string; + /** + * The description of the sensitivity label. + */ + tooltip: string; + } + /** + * Provides methods to check the status of the catalog of {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels | sensitivity labels} + * in Outlook and retrieve all available sensitivity labels if the catalog is enabled. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + export interface SensitivityLabelsCatalog { + /** + * Gets all the sensitivity labels that are enabled in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * **Recommended**: To determine whether the catalog of sensitivity labels is enabled in Outlook, call `getIsEnabledAsync` before using `getAsync`. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @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 function. + * @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 available sensitivity labels and their properties are returned in the + * `asyncResult.value` property. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets all the sensitivity labels that are enabled in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * **Recommended**: To determine whether the catalog of sensitivity labels is enabled in Outlook, call `getIsEnabledAsync` before using `getAsync`. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @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 available sensitivity labels and their properties are returned in the + * `asyncResult.value` property. + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Checks whether the catalog of sensitivity labels is enabled in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: The catalog of sensitivity labels is configured by an organization's administrator. For more information, see + * {@link https://learn.microsoft.com/microsoft-365/compliance/get-started-with-sensitivity-labels | Get started with sensitivity labels}. + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @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 function. + * @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 status of the catalog of sensitivity labels is returned in the `asyncResult.value` property. + */ + getIsEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Checks whether the catalog of sensitivity labels is enabled in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: The catalog of sensitivity labels is configured by an organization's administrator. For more information, see + * {@link https://learn.microsoft.com/microsoft-365/compliance/get-started-with-sensitivity-labels | Get started with sensitivity labels}. + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @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 status of the catalog of sensitivity labels is returned in the `asyncResult.value` property. + */ + getIsEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): 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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface SeriesTime { + /** + * Gets the duration in minutes of a usual instance in a recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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". + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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". + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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". + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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". + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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). + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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). + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param time - Start time of all instances represented by standard datetime string format: "THH:mm:ss:mmm". + */ + setStartTime(time: string): void; + } + /** + * Provides methods to manage an item's session data. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + interface SessionData { + /** + * Clears all session data key-value pairs. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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. + */ + clearAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Clears all session data key-value pairs. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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. + */ + clearAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets all session data key-value pairs. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + */ + getAllAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the session data value of the specified key. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param name - The session data key. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + getAsync(name: string, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes a session data key-value pair. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param name - The session data key. + * @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 function. + * @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. + */ + removeAsync(name: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes a session data key-value pair. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param name - The session data key. + * @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. + */ + removeAsync(name: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets a session data key-value pair. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + + * @param name - The session data key. + * @param value - The session data value as a string. + * @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 function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + setAsync(name: string, value: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets a session data key-value pair. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + + * @param name - The session data key. + * @param value - The session data value as a string. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + setAsync(name: string, value: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Represents the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information on how this object is used, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface SharedProperties { + /** + * The email address of the owner of a shared item. + */ + owner: string; + /** + * The REST API's base URL (currently https://outlook.office.com/api). + * + * Use with `targetMailbox` to construct the REST operation's URL. + * + * Example usage: `targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"` + */ + targetRestUrl: string; + /** + * The location of the owner's mailbox for the delegate's access. This location may differ based on the Outlook client. + * + * Use with `targetRestUrl` to construct the REST operation's URL. + * + * Example usage: `targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"` + */ + targetMailbox: string; + /** + * The permissions that the delegate has on a shared folder, or the user has on a shared mailbox. + */ + delegatePermissions: MailboxEnums.DelegatePermissions; + } + /** + * Provides information about the `Office.EventType.SpamReporting` event that occurs when an unsolicited message is reported. + * + * @remarks + * [Api set: Mailbox preview] + * + * @beta + */ + export interface SpamReportingEventArgs { + /** + * The type of event that was raised. For details, see {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox preview] + * + * @beta + */ + type: "SpamReporting"; + } + /** + * Provides methods to get and set the subject of an appointment or message in an Outlook add-in. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 the subject of the item. + */ + getAsync(callback: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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 function. + * @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 subject fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(subject: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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 - 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 subject fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(subject: string, callback?: (asyncResult: Office.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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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 a `Date` object. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a `Date` object. + */ + getAsync(callback: (asyncResult: Office.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. + * + * **Important**: In the Windows client, you can't use this method to update the start or end of a recurrence. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidEndTime`: 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 function. + * @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 date and time fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(dateTime: Date, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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. + * + * **Important**: In the Windows client, you can't use this method to update the start or end of a recurrence. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidEndTime`: The appointment end time is before the appointment start time. + * + * @param dateTime - A date-time object in Coordinated Universal Time (UTC). + * @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 date and time fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(dateTime: Date, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Information about the user associated with the mailbox. This includes their account type, display name, email address, and time zone. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 or later on Mac, build 16.9.1212 and greater. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a Microsoft 365 work or school account.
outlookComThe mailbox is associated with a personal Outlook.com account.
+ * + * **Note**: For hybrid Exchange environments, the returned account type value depends on where the mailbox is hosted. + * If the mailbox is on an on-premises server, the account type value is **enterprise**. However, if it's hosted on + * Exchange Online, the account type value is **office365**. + */ + accountType: string; + /** + * Gets the user's display name. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + displayName: string; + /** + * Gets the user's SMTP email address. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + emailAddress: string; + /** + * Gets the user's time zone in Windows format. + * + * The system time zone is usually returned. However, in Outlook on the web, the default time zone in the calendar preferences is returned instead. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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; + } + + /** + * 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 Office application. + * + * 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 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; + } + + /** + * Specifies options for a session of a Visio diagram embedded in a SharePoint page. Called by constructor of `EmbeddedSession`. + * For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}. + */ + interface EmbeddedOptions { + sessionKey?: string, + /* + * The iframe element that hosts the Visio diagram. + */ + container?: HTMLElement, + id?: string; + timeoutInMilliseconds?: number; + height?: string; + width?: string; + } + + /** + * Represents a session of a Visio diagram embedded in a SharePoint page. + * For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}. + */ + class EmbeddedSession { + constructor(url: string, options?: EmbeddedOptions); + /** + * Initializes the session. + */ + public init(): Promise; + } + + /** 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; + } + + /** 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 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. + */ + statement?: 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 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: string[]; + /** Debug info (useful for detailed logging of the error, i.e., via `JSON.stringify(...)`). */ + debugInfo: DebugInfo; + /** Inner error, if applicable. */ + innerError: Error; + } + + /** + * Represents the error code that can be returned by {@link OfficeExtension.Error | OfficeExtension.Error.code}. + * + * To learn more about the error codes, see + * {@link https://learn.microsoft.com/office/dev/add-ins/reference/javascript-api-for-office-error-codes | Office Common API error codes}. + */ + 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; + } + + /** + * A Promise object that represents a deferred interaction with the Office application. + * The publicly-consumable 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; + + /** + * Collection of tracked objects, contained within a request context. + * See {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. If this object is part of a collection in Word, you should also track + * the parent collection. + */ + 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. If this object is part of a collection in Word, you should also track + * the parent collection. + */ + 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 Office 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(object: ClientObject): void; + /** + * Release the memory associated with an object that was previously added to this collection. + * Having many tracked objects slows down the Office 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; + } + + class EventHandlers { + constructor(context: ClientRequestContext, parentObject: ClientObject, name: string, eventInfo: EventInfo); + /** + * Adds a function to be called when the event is triggered. + * @param handler A promise-based function that takes in any relevant event arguments. + */ + add(handler: (args: T) => Promise): EventHandlerResult; + /** + * Removes the specified function from the event handler list so that it will not be called on subsequent events. + * + * **Note**: The same {@link OfficeExtension.ClientRequestContext | RequestContext} object that the handler was added in must be used when removing the handler. + * More information can be found in {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-events#remove-an-event-handler | Remove an event handler}. + * + * @param handler A reference to a function previously provided to the `add` method as an event handler. + */ + remove(handler: (args: T) => Promise): void; + } + + /** + * Enables the removal of an event handler. Returned by the `EventHandlers.add` method. + * + * **Note**: The same {@link OfficeExtension.ClientRequestContext | RequestContext} object that the handler was added in must be used when removing the handler. + * More information can be found in {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-events#remove-an-event-handler | Remove an event handler}. + */ + class EventHandlerResult { + constructor(context: ClientRequestContext, handlers: EventHandlers, handler: (args: T) => Promise); + /** The request context associated with the object */ + context: ClientRequestContext; + /** + * Removes the handler from the event. + */ + remove(): void; + } + + /** + * Used by Office to construct event handlers. Do not call in your code. + */ + interface EventInfo { + registerFunc: (callback: (args: any) => void) => Promise; + unregisterFunc: (callback: (args: any) => void) => Promise; + eventArgsTransformFunc: (args: any) => Promise; + } + + /** + * 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) + } +} + +interface Session {} + +declare namespace OfficeCore { + /** + * [Api set: AgaveVisual 0.5] + */ + class BiShim 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; + initialize(capabilities: string): void; + getData(): OfficeExtension.ClientResult; + setVisualObjects(visualObjects: string): void; + setVisualObjectsToPersist(visualObjectsToPersist: string): void; + /** + * Create a new instance of OfficeCore.BiShim object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.BiShim; + toJSON(): { + [key: string]: string; + }; + } + enum AgaveVisualErrorCodes { + generalException1 = "GeneralException" + } + module Interfaces { + interface CollectionLoadOptions { + $top?: number; + $skip?: number; + } + } +} +declare namespace OfficeCore { + /** + * [Api set: Experimentation 1.1 (PREVIEW)] + */ + class FlightingService 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; + getClientSessionId(): OfficeExtension.ClientResult; + getDeferredFlights(): OfficeExtension.ClientResult; + getFeature(featureName: string, type: OfficeCore.FeatureType, defaultValue: number | boolean | string, possibleValues?: Array | Array | Array | Array): OfficeCore.ABType; + getFeature(featureName: string, type: "Boolean" | "Integer" | "String", defaultValue: number | boolean | string, possibleValues?: Array | Array | Array | Array): OfficeCore.ABType; + getFeatureGate(featureName: string, scope?: string): OfficeCore.ABType; + resetOverride(featureName: string): void; + setOverride(featureName: string, type: OfficeCore.FeatureType, value: number | boolean | string): void; + setOverride(featureName: string, type: "Boolean" | "Integer" | "String", value: number | boolean | string): void; + /** + * Create a new instance of OfficeCore.FlightingService object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.FlightingService; + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Provides information about the scoped value. + * + * [Api set: Experimentation 1.1 (PREVIEW)] + */ + interface ScopedValue { + /** + * + * Gets the scope. + * + * [Api set: Experimentation 1.1 (PREVIEW)] + */ + scope: string; + /** + * + * Gets the value. + * + * [Api set: Experimentation 1.1 (PREVIEW)] + */ + value: string | number | boolean; + } + /** + * [Api set: Experimentation 1.1 (PREVIEW)] + */ + class ABType 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 value: string | number | boolean; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: OfficeCore.Interfaces.ABTypeLoadOptions): OfficeCore.ABType; + load(option?: string | string[]): OfficeCore.ABType; + load(option?: { + select?: string; + expand?: string; + }): OfficeCore.ABType; + toJSON(): OfficeCore.Interfaces.ABTypeData; + } + /** + * [Api set: Experimentation 1.1 (PREVIEW)] + */ + enum FeatureType { + boolean = "Boolean", + integer = "Integer", + string = "String" + } + enum ExperimentErrorCodes { + generalException = "GeneralException" + } + module Interfaces { + interface CollectionLoadOptions { + $top?: number; + $skip?: number; + } + /** An interface describing the data returned by calling "abtype.toJSON()". */ + interface ABTypeData { + value?: string | number | boolean; + } + /** + * [Api set: Experimentation 1.1 (PREVIEW)] + */ + interface ABTypeLoadOptions { + $all?: boolean; + value?: boolean; + } + } +} +declare namespace OfficeCore { + const OfficeOnlineDomainList: string[]; + function isHostOriginTrusted(): boolean; +} +declare namespace OfficeCore { + class FirstPartyApis { + private context; + constructor(context: RequestContext); + readonly roamingSettings: RoamingSettingCollection; + readonly tap: Tap; + readonly skill: Skill; + } + // Duplicate Definition + // class RequestContext extends OfficeExtension.ClientRequestContext { + // constructor(url?: string | OfficeExtension.RequestUrlAndHeaderInfo | any); + // readonly firstParty: FirstPartyApis; + // readonly flighting: FlightingService; + // readonly telemetry: TelemetryService; + // readonly ribbon: DynamicRibbon; + // readonly bi: BiShim; + // } + /** + * Executes a batch script that performs actions on the Office 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 Office application. Since the Office add-in and the Office application run in two different processes, the RequestContext is required to get access to the Office object model from the add-in. + */ + function run(batch: (context: OfficeCore.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Office 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 context - A previously-created context 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 Office application. Since the Office add-in and the Office application run in two different processes, the RequestContext is required to get access to the Office object model from the add-in. + */ + function run(context: OfficeCore.RequestContext, batch: (context: OfficeCore.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Office 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 Office application. Since the Office add-in and the Office application run in two different processes, the RequestContext is required to get access to the Office object model from the add-in. + */ + function run(object: OfficeExtension.ClientObject, batch: (context: OfficeCore.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Office 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 Office application. Since the Office add-in and the Office application run in two different processes, the RequestContext is required to get access to the Office object model from the add-in. + */ + function run(objects: OfficeExtension.ClientObject[], batch: (context: OfficeCore.RequestContext) => Promise): Promise; +} +declare namespace Office { + namespace license { + function isFeatureEnabled(feature: string, fallbackValue: boolean): Promise; + function getFeatureTier(feature: string, fallbackValue: OfficeCore.LicenseFeatureTier): Promise; + function isFreemiumUpsellEnabled(): Promise; + function launchUpsellExperience(experienceId: string): Promise; + function onFeatureStateChanged(feature: string, listener: (args: OfficeCore.LicenseFeatureStateChangedEventArgs) => Promise): Promise<() => Promise>; + } +} +declare namespace OfficeCore { + /** + * + * Provides information about the new result. + * + * [Api set: Skill 1.1] + */ + interface SkillEventArgs { + /** + * + * The serialized JSON string of the event data object. + * + * [Api set: Skill 1.1] + */ + data: string; + /** + * + * The integer represented event type, e.g. NewSearch, NewSkillResultAvailable. + * + * [Api set: Skill 1.1] + */ + type: number; + } + /** + * + * Represents a collection of Apis for Skill feature. + * + * [Api set: Skill 1.1] + */ + class Skill 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 an action from the Skill result pane + * + * [Api set: Skill 1.1] + * + * @param paneId Required. The id of the Skill result pane where the call is made. + * @param actionId Required. The unique id of the action, which is usually a GUID + * @param actionDescriptor Required. The serialized JSON string of the action descriptor object. + * @returns The serialized JSON string of the return object for the action. + */ + executeAction(paneId: string, actionId: string, actionDescriptor: string): OfficeExtension.ClientResult; + /** + * Notify host with any event fired from the Skill result pane + * + * [Api set: Skill 1.1] + * + * @param paneId Required. The id of the Skill result pane where the event is fired. + * @param eventDescriptor Required. The serialized JSON string of the event descriptor object. + */ + notifyPaneEvent(paneId: string, eventDescriptor: string): void; + /** + * To register an handler to the HostSkillEvent + * + * [Api set: Skill 1.1] + */ + registerHostSkillEvent(): void; + /** + * TEST ONLY + * + * [Api set: Skill 1.1] + */ + testFireEvent(): void; + /** + * To unregister an handler to the HostSkillEvent + * + * [Api set: Skill 1.1] + */ + unregisterHostSkillEvent(): void; + /** + * Create a new instance of OfficeCore.Skill object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.Skill; + /** + * + * Fire whenever there is a new Skill event from host + * + * [Api set: Skill 1.1] + * + * @eventproperty + */ + readonly onHostSkillEvent: 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 OfficeCore.Skill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.SkillData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + enum SkillErrorCodes { + 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; + } + } +} +declare namespace OfficeCore { + /** + * [Api set: Telemetry 1.1] + */ + class TelemetryService 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; + sendTelemetryEvent(telemetryProperties: OfficeCore.TelemetryProperties, eventName: string, eventContract: string, eventFlags: OfficeCore.EventFlags, value: OfficeCore.DataField[]): void; + /** + * Create a new instance of OfficeCore.TelemetryService object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.TelemetryService; + /** + * 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 OfficeCore.TelemetryService object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.TelemetryServiceData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * [Api set: Telemetry 1.1] + */ + interface EventFlags { + costPriority: number; + dataCategories: number; + diagnosticLevel: number; + persistencePriority: number; + samplingPolicy: number; + } + /** + * [Api set: Telemetry 1.1] + */ + interface DataField { + classification: number; + name: string; + type?: OfficeCore.DataFieldType | "Unset" | "String" | "Boolean" | "Int64" | "Double"; + value: any; + } + /** + * [Api set: Telemetry 1.1] + */ + interface TelemetryProperties { + ariaTenantToken?: string; + nexusTenantToken?: number; + } + /** + * [Api set: Telemetry 1.1] + */ + enum DataFieldType { + unset = "Unset", + string = "String", + boolean = "Boolean", + int64 = "Int64", + double = "Double" + } + enum TelemetryErrorCodes { + 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; + } + } +} +declare namespace OfficeFirstPartyAuth { + var authFlow: string; + var authVersion: string; + var autoPopup: boolean; + var debugging: boolean; + var authorityOverride: string; + var msal: string; + var delay: number; + var delayMsal: number; + interface BehaviorOption { + /** + * True/False to prompt popup window or not. + * null makes automatic handle. If acquiring is failed by clear reason, automatically attempt with popup. + */ + popup?: boolean; + /** + * True to ignore cache to force refresh. Otherwise false. + */ + forceRefresh?: boolean; + } + interface AuthResult extends OfficeCore.SingleSignOnToken { + /** + * Error Code + */ + code?: string; + /** + * Error Message + */ + message?: string; + } + function load(replyUrl?: string): Promise; + function getAccessToken(options: OfficeCore.TokenParameters, behaviorOption?: BehaviorOption): Promise; + function getPrimaryIdentityInfo(): Promise; + function getIdentities(): Promise; +} +declare namespace OfficeCore { + /** + * [Api set: FirstPartyAuthentication 1.1] + */ + enum IdentityType { + organizationAccount = "OrganizationAccount", + microsoftAccount = "MicrosoftAccount", + unsupported = "Unsupported" + } + /** + * + * Office identity object that holds the user information + * + * [Api set: FirstPartyAuthentication 1.2] + */ + interface TokenReceivedEventArgs { + /** + * + * Return code. 0 means success and otherwise it's the error code. + * + * [Api set: FirstPartyAuthentication 1.2] + */ + code: number; + /** + * + * Return error JSON string. + * + * [Api set: FirstPartyAuthentication 1.2] + */ + errorInfo: string; + /** + * + * The identity SingleSignOnToken, which contains the accesstoken string and identity account type. + * + * [Api set: FirstPartyAuthentication 1.2] + */ + tokenValue: OfficeCore.SingleSignOnToken; + } + /** + * + * Office identity object that holds the user information + * + * [Api set: FirstPartyAuthentication 1.2] + */ + interface OfficeIdentityInfo { + /** + * + * A display name for the user + * + * [Api set: FirstPartyAuthentication 1.2] + */ + displayName: string; + /** + * + * The Email address associated with the identity + * + * [Api set: FirstPartyAuthentication 1.2] + */ + email: string; + /** + * + * The federation provider (such as Worldwide, BlackForest or Gallatin) + * + * [Api set: FirstPartyAuthentication 1.2] + */ + federationProvider: string; + /** + * + * The identity account type + * + * [Api set: FirstPartyAuthentication 1.2] + */ + identityType: OfficeCore.IdentityType | "OrganizationAccount" | "MicrosoftAccount" | "Unsupported"; + /** + * + * The unique string for current identity + * + * [Api set: FirstPartyAuthentication 1.3] + */ + uniqueId: string; + } + /** + * [Api set: FirstPartyAuthentication 1.1] + */ + class AuthenticationService 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 Roaming Settings + * + * [Api set: FirstPartyAuthentication 1.1] + */ + readonly roamingSettings: OfficeCore.RoamingSettingCollection; + /** + * Get the access token for the current primary identity. + * + * [Api set: FirstPartyAuthentication 1.1] + * + * @param tokenParameters The parameter for the required access token. + * @param targetId The parameter for matching client event with original request. + * @returns The access token object. + */ + getAccessToken(tokenParameters: OfficeCore.TokenParameters, targetId: string): OfficeExtension.ClientResult; + getIdentities(): OfficeExtension.ClientResult; + /** + * Get the information of the primary identity (in rich client, it's the active profile). + * + * [Api set: FirstPartyAuthentication 1.2] + * @returns The primary identity type. + */ + getPrimaryIdentityInfo(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.AuthenticationService; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.AuthenticationService; + /** + * Create a new instance of OfficeCore.AuthenticationService object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.AuthenticationService; + /** + * + * Occurs when token data comes back. + * + * [Api set: FirstPartyAuthentication 1.2] + * + * @eventproperty + */ + readonly onTokenReceived: 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 OfficeCore.AuthenticationService object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.AuthenticationServiceData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.AuthenticationServiceData; + } + class AuthenticationServiceCustom { + } + interface AuthenticationService extends OfficeExtension.ClientObject, AuthenticationServiceCustom { + } + /** + * [Api set: FirstPartyAuthentication 1.1] + */ + interface TokenParameters { + /** + * + * The auth challenge string. + * + * [Api set: FirstPartyAuthentication 1.1] + */ + authChallenge?: string; + /** + * + * Correlation Id associated with the request string + * + * [Api set: FirstPartyAuthentication 1.4] + */ + correlationId?: string; + /** + * + * Identity id for which to return a token. + * + * [Api set: FirstPartyAuthentication 1.3] + */ + identityId?: string; + /** + * + * The auth policy string. + * + * [Api set: FirstPartyAuthentication 1.1] + */ + policy?: string; + /** + * + * The resource URL (or target) + * + * [Api set: FirstPartyAuthentication 1.1] + */ + resource?: string; + /** + * + * The scope required by the token + * + * [Api set: FirstPartyAuthentication 1.4] + */ + scope?: string; + /** + * + * Flag to determin if the request to acquire a token needs to be silent + * + * [Api set: FirstPartyAuthentication 1.4] + */ + silentLogin?: boolean; + } + /** + * [Api set: FirstPartyAuthentication 1.1] + */ + interface SingleSignOnToken { + /** + * + * The access token for the primary identity. + * + * [Api set: FirstPartyAuthentication 1.1] + */ + accessToken: string; + /** + * + * The identity type associated with the access token + * + * [Api set: FirstPartyAuthentication 1.1] + */ + tokenIdenityType: OfficeCore.IdentityType | "OrganizationAccount" | "MicrosoftAccount" | "Unsupported"; + } + /** + * + * Represents a roaming setting object. + * + * [Api set: Roaming 1.1] + */ + class RoamingSetting 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 Id that represents the id of the Roaming Setting. Read-only. + * + * [Api set: Roaming 1.1] + */ + readonly id: string; + /** + * + * Represents the value stored for this setting. + * + * [Api set: Roaming 1.1] + */ + 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: OfficeCore.RoamingSetting): 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.RoamingSettingUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OfficeCore.RoamingSetting): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.RoamingSettingLoadOptions): OfficeCore.RoamingSetting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.RoamingSetting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.RoamingSetting; + /** + * 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 OfficeCore.RoamingSetting object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.RoamingSettingData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.RoamingSettingData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.RoamingSettingData): void; + } + /** + * + * Contains the collection of roaming setting objects. + * + * [Api set: Roaming 1.1] + */ + class RoamingSettingCollection 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 a roaming setting object by its key. Returns a null object if not found. + * + * [Api set: Roaming 1.1] + * + * @param id + * @returns + */ + getItem(id: string): OfficeCore.RoamingSetting; + /** + * Gets a roaming setting object by its key. Returns a null object if not found. + * + * [Api set: Roaming 1.1] + * + * @param id + * @returns + */ + getItemOrNullObject(id: string): OfficeCore.RoamingSetting; + /** + * 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 OfficeCore.RoamingSettingCollection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.RoamingSettingCollectionData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * [Api set: DesktopCompliance 1.2] + */ + enum ServiceProvider { + ariaBrowserPipeUrl = "AriaBrowserPipeUrl", + ariaUploadUrl = "AriaUploadUrl", + ariaVNextUploadUrl = "AriaVNextUploadUrl", + lokiAutoDiscoverUrl = "LokiAutoDiscoverUrl" + } + /** + * + * Provides support for getting a service url + * + * [Api set: DesktopCompliance 1.2] + */ + class ServiceUrlProvider 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 serivce url for the specified provider for the specified email address + * + * [Api set: DesktopCompliance 1.2] + * + * @param emailAddress Specifies the email address associated with the account being used + * @param provider Specifies the provider for which the service url is to be obtained + * @returns Returns the service url + */ + getServiceUrl(emailAddress: string, provider: OfficeCore.ServiceProvider): OfficeExtension.ClientResult; + /** + * Gets the serivce url for the specified provider for the specified email address + * + * [Api set: DesktopCompliance 1.2] + * + * @param emailAddress Specifies the email address associated with the account being used + * @param provider Specifies the provider for which the service url is to be obtained + * @returns Returns the service url + */ + getServiceUrl(emailAddress: string, provider: "AriaBrowserPipeUrl" | "AriaUploadUrl" | "AriaVNextUploadUrl" | "LokiAutoDiscoverUrl"): OfficeExtension.ClientResult; + /** + * Create a new instance of OfficeCore.ServiceUrlProvider object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.ServiceUrlProvider; + /** + * 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 OfficeCore.ServiceUrlProvider object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.ServiceUrlProviderData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Any internal agave, web extension, react native, or other component that integrates into Desktop + Office and that uses LinkedIn data must comply with the Desktop compliance requirements for users + to opt out of using LinkedIn data. This class contains the methods needed to check if LinkedIn is + enabled and log the results of the compliance check. + * + * [Api set: DesktopCompliance 1.2] + */ + class LinkedIn 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; + isEnabledForOffice(): OfficeExtension.ClientResult; + recordLinkedInSettingsCompliance(featureName: string, isEnabled: boolean): void; + /** + * Create a new instance of OfficeCore.LinkedIn object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.LinkedIn; + /** + * 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 OfficeCore.LinkedIn object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.LinkedInData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Provides information on whether or not the system is currently in online mode + * + * [Api set: DesktopCompliance 1.2] + */ + class NetworkUsage 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; + isInDisconnectedMode(): OfficeExtension.ClientResult; + isInOnlineMode(): OfficeExtension.ClientResult; + /** + * Create a new instance of OfficeCore.NetworkUsage object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.NetworkUsage; + /** + * 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 OfficeCore.NetworkUsage object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.NetworkUsageData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Dynamic Ribbon Singleton Class + * + * [Api set: DynamicRibbon 1.1] + */ + class DynamicRibbon 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 buttons: OfficeCore.RibbonButtonCollection; + executeRequestCreate(jsonCreate: string): void; + executeRequestUpdate(jsonUpdate: string): void; + getButton(id: string): OfficeCore.RibbonButton; + getTab(id: string): OfficeCore.RibbonTab; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.DynamicRibbon; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.DynamicRibbon; + /** + * Create a new instance of OfficeCore.DynamicRibbon object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.DynamicRibbon; + /** + * 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 OfficeCore.DynamicRibbon object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.DynamicRibbonData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.DynamicRibbonData; + } + /** + * [Api set: DynamicRibbon 1.1] + */ + class RibbonTab 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 id: string; + setVisibility(visibility: boolean): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.RibbonTabLoadOptions): OfficeCore.RibbonTab; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.RibbonTab; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.RibbonTab; + /** + * 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 OfficeCore.RibbonTab object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.RibbonTabData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.RibbonTabData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.RibbonTabData): void; + } + /** + * [Api set: DynamicRibbon 1.1] + */ + class RibbonButton 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; + enabled: boolean; + readonly id: string; + readonly label: 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: OfficeCore.RibbonButton): 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.RibbonButtonUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OfficeCore.RibbonButton): void; + setEnabled(enabled: boolean): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.RibbonButtonLoadOptions): OfficeCore.RibbonButton; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.RibbonButton; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.RibbonButton; + /** + * 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 OfficeCore.RibbonButton object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.RibbonButtonData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.RibbonButtonData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.RibbonButtonData): void; + } + /** + * [Api set: DynamicRibbon 1.1] + */ + class RibbonButtonCollection 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: OfficeCore.RibbonButton[]; + /** + * Returns the number of buttons in the collection. Read-only. + * + * [Api set: DynamicRibbon 1.1] + */ + getCount(): OfficeExtension.ClientResult; + getItem(key: string): OfficeCore.RibbonButton; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.RibbonButtonCollectionLoadOptions & OfficeCore.Interfaces.CollectionLoadOptions): OfficeCore.RibbonButtonCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.RibbonButtonCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OfficeCore.RibbonButtonCollection; + /** + * 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 `OfficeCore.RibbonButtonCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.RibbonButtonCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OfficeCore.Interfaces.RibbonButtonCollectionData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.RibbonButtonCollectionData): void; + } + /** + * + * Provides information for Date/Time formatting for a specific locale + * + * [Api set: LocaleApi 1.2] + */ + interface LocaleDateTimeFormattingInfo { + dayNames: string[]; + longDateFormat: string; + longTimeFormat: string; + monthNames: string[]; + shortDateFormat: string; + shortDayNames: string[]; + shortMonthNames: string[]; + shortTimeFormat: string; + timeMarkerAM: string; + timeMarkerAMShort: string; + timeMarkerPM: string; + timeMarkerPMShort: string; + } + /** + * [Api set: LocaleApi 1.2] + */ + enum TimeStringFormat { + shortTime = "ShortTime", + longTime = "LongTime", + shortDate = "ShortDate", + longDate = "LongDate" + } + /** + * + * Provides support for getting infomration related to a locale + * + * [Api set: LocaleApi 1.2] + */ + class LocaleApi 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; + formatDateTimeString(localeName: string, value: Date, format: OfficeCore.TimeStringFormat): OfficeExtension.ClientResult; + formatDateTimeString(localeName: string, value: Date, format: "ShortTime" | "LongTime" | "ShortDate" | "LongDate"): OfficeExtension.ClientResult; + getLocaleDateTimeFormattingInfo(localeName: string): OfficeExtension.ClientResult; + /** + * Create a new instance of OfficeCore.LocaleApi object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.LocaleApi; + /** + * 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 OfficeCore.LocaleApi object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.LocaleApiData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Represents a single comment in the document. + * + * [Api set: Comments 1.1] + */ + 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; + /** + * + * Gets this comment's parent. If this is a root comment, throws. + * + * [Api set: Comments 1.1] + */ + readonly parent: OfficeCore.Comment; + /** + * + * Gets this comment's parent. If this is a root comment, returns a null object. + * + * [Api set: Comments 1.1] + */ + readonly parentOrNullObject: OfficeCore.Comment; + /** + * + * Gets the replies to this comment. If this is not a root comment, returns an empty collection. + * + * [Api set: Comments 1.1] + */ + readonly replies: OfficeCore.CommentCollection; + /** + * + * Gets an object representing the comment's author. Read-only. + * + * [Api set: Comments 1.1] + */ + readonly author: OfficeCore.CommentAuthor; + /** + * + * Gets when the comment was created. Read-only. + * + * [Api set: Comments 1.1] + */ + readonly created: Date; + /** + * + * Returns a value that uniquely identifies the comment in a given document. Read-only. + * + * [Api set: Comments 1.1] + */ + readonly id: string; + /** + * + * Gets the level of the comment: 0 if it is a root comment, or 1 if it is a reply. Read-only. + * + * [Api set: Comments 1.1] + */ + readonly level: number; + /** + * + * Gets the comment's mentions. + * + * [Api set: Comments 1.1] + */ + readonly mentions: OfficeCore.CommentMention[]; + /** + * + * Gets or sets whether this comment is resolved. + * + * [Api set: Comments 1.1] + */ + resolved: boolean; + /** + * + * Gets or sets the comment's plain text, without formatting. + * + * [Api set: Comments 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: OfficeCore.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: OfficeCore.Comment): void; + /** + * Deletes this comment. If this is a root comment, deletes the entire comment thread. + * + * [Api set: Comments 1.1] + */ + delete(): void; + /** + * Gets this comment's parent. If this is a root comment, returns a new comment object representing itself. + This method is useful for accessing thread-level properties from either a reply or the root comment. + + e.g. comment.getParentOrSelf().resolved = true; + * + * [Api set: Comments 1.1] + */ + getParentOrSelf(): OfficeCore.Comment; + /** + * Gets the comment's rich text in the specified markup format. + * + * [Api set: Comments 1.1] + */ + getRichText(format: OfficeCore.CommentTextFormat): OfficeExtension.ClientResult; + /** + * Gets the comment's rich text in the specified markup format. + * + * [Api set: Comments 1.1] + */ + getRichText(format: "Plain" | "Markdown" | "Delta"): OfficeExtension.ClientResult; + /** + * Appends a new reply to the comment's thread. + * + * [Api set: Comments 1.1] + * + * @param text The body of the reply. + * @param format The markup format of the text parameter. + * @returns + */ + reply(text: string, format: OfficeCore.CommentTextFormat): OfficeCore.Comment; + /** + * Appends a new reply to the comment's thread. + * + * [Api set: Comments 1.1] + * + * @param text The body of the reply. + * @param format The markup format of the text parameter. + * @returns + */ + reply(text: string, format: "Plain" | "Markdown" | "Delta"): OfficeCore.Comment; + /** + * Sets the comment's rich text. + * + * [Api set: Comments 1.1] + * + * @param text The text of the comment. + * @param format The markup format of the 'text' parameter. + */ + setRichText(text: string, format: OfficeCore.CommentTextFormat): OfficeExtension.ClientResult; + /** + * Sets the comment's rich text. + * + * [Api set: Comments 1.1] + * + * @param text The text of the comment. + * @param format The markup format of the 'text' parameter. + */ + setRichText(text: string, format: "Plain" | "Markdown" | "Delta"): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.CommentLoadOptions): OfficeCore.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.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 OfficeCore.Comment object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.CommentData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.CommentData): void; + } + /** + * + * Represents the author of a comment. + * + * [Api set: Comments 1.1] + */ + interface CommentAuthor { + /** + * + * The email address of the author. + * + * [Api set: Comments 1.1] + */ + email: string; + /** + * + * The name of the author. + * + * [Api set: Comments 1.1] + */ + name: string; + } + /** + * + * Represents a mention within a comment. + * + * [Api set: Comments 1.1] + */ + interface CommentMention { + /** + * + * The email address of the person mentioned. + * + * [Api set: Comments 1.1] + */ + email: string; + /** + * + * The name of the person mentioned. + * + * [Api set: Comments 1.1] + */ + name: string; + /** + * + * The text displayed for the mention. + * + * [Api set: Comments 1.1] + */ + text: string; + } + /** + * + * Represents a collection of comments, either replies to a specific comment thread, or all comments in the document or part of the document. + * + * [Api set: Comments 1.1] + */ + 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: OfficeCore.Comment[]; + /** + * Returns the number of comments in the collection. Read-only. + * + * [Api set: Comments 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a comment object using its id. + * + * [Api set: Comments 1.1] + */ + getItem(id: string): OfficeCore.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.CommentCollectionLoadOptions & OfficeCore.Interfaces.CollectionLoadOptions): OfficeCore.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OfficeCore.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 `OfficeCore.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OfficeCore.Interfaces.CommentCollectionData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.CommentCollectionData): void; + } + /** + * + * Represents a markup (rich) text format. + * + * [Api set: Comments 1.1] + */ + enum CommentTextFormat { + plain = "Plain", + markdown = "Markdown", + delta = "Delta" + } + /** + * [Api set: People 1.2] + */ + enum PersonaCardPerfPoint { + placeHolderRendered = "PlaceHolderRendered", + initialCardRendered = "InitialCardRendered" + } + /** + * + * When unified communication availability is provided for a persona this enumeration will + identify the availability. When it is not available the value NotSet will be used. + * + * [Api set: People 1.2] + */ + enum UnifiedCommunicationAvailability { + notSet = "NotSet", + free = "Free", + idle = "Idle", + busy = "Busy", + idleBusy = "IdleBusy", + doNotDisturb = "DoNotDisturb", + unalertable = "Unalertable", + unavailable = "Unavailable" + } + /** + * [Api set: People 1.2] + */ + enum UnifiedCommunicationStatus { + online = "Online", + notOnline = "NotOnline", + away = "Away", + busy = "Busy", + beRightBack = "BeRightBack", + onThePhone = "OnThePhone", + outToLunch = "OutToLunch", + inAMeeting = "InAMeeting", + outOfOffice = "OutOfOffice", + doNotDisturb = "DoNotDisturb", + inAConference = "InAConference", + getting = "Getting", + notABuddy = "NotABuddy", + disconnected = "Disconnected", + notInstalled = "NotInstalled", + urgentInterruptionsOnly = "UrgentInterruptionsOnly", + mayBeAvailable = "MayBeAvailable", + idle = "Idle", + inPresentation = "InPresentation" + } + /** + * + * Provides the presence that should be shown for the persona + * + * [Api set: People 1.2] + */ + enum UnifiedCommunicationPresence { + free = "Free", + busy = "Busy", + idle = "Idle", + doNotDistrub = "DoNotDistrub", + blocked = "Blocked", + notSet = "NotSet", + outOfOffice = "OutOfOffice" + } + /** + * [Api set: People 1.2] + */ + enum FreeBusyCalendarState { + unknown = "Unknown", + free = "Free", + busy = "Busy", + elsewhere = "Elsewhere", + tentative = "Tentative", + outOfOffice = "OutOfOffice" + } + /** + * [Api set: People 1.2] + */ + enum PersonaType { + unknown = "Unknown", + enterprise = "Enterprise", + contact = "Contact", + bot = "Bot", + phoneOnly = "PhoneOnly", + oneOff = "OneOff", + distributionList = "DistributionList", + personalDistributionList = "PersonalDistributionList", + anonymous = "Anonymous", + unifiedGroup = "UnifiedGroup" + } + /** + * [Api set: People 1.2] + */ + enum PhoneType { + workPhone = "WorkPhone", + homePhone = "HomePhone", + mobilePhone = "MobilePhone", + businessFax = "BusinessFax", + otherPhone = "OtherPhone" + } + /** + * [Api set: People 1.2] + */ + interface PersonaPhone { + number: string; + type: OfficeCore.PhoneType | "WorkPhone" | "HomePhone" | "MobilePhone" | "BusinessFax" | "OtherPhone"; + } + /** + * [Api set: People 1.2] + */ + enum AddressType { + workAddress = "WorkAddress", + homeAddress = "HomeAddress", + otherAddress = "OtherAddress" + } + /** + * [Api set: People 1.2] + */ + interface PersonaAddress { + address: string; + city: string; + country: string; + postalCode: string; + state: string; + street: string; + type: OfficeCore.AddressType | "WorkAddress" | "HomeAddress" | "OtherAddress"; + } + /** + * [Api set: People 1.2] + */ + enum MemberType { + unknown = "Unknown", + individual = "Individual", + group = "Group" + } + /** + * [Api set: People 1.2] + */ + interface MemberInfo { + email: string; + isGuest: boolean; + isOwner: boolean; + name: string; + personaCookie: string; + sipAddress: string; + title: string; + type: OfficeCore.MemberType | "Unknown" | "Individual" | "Group"; + } + /** + * [Api set: People 1.2] + */ + class MemberInfoList 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 isWarmedUp: boolean; + readonly isWarmingUp: boolean; + getPersonaForMember(memberCookie: string): OfficeCore.Persona; + items(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.MemberInfoListLoadOptions): OfficeCore.MemberInfoList; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.MemberInfoList; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.MemberInfoList; + /** + * 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 OfficeCore.MemberInfoList object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.MemberInfoListData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.MemberInfoListData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.MemberInfoListData): void; + } + /** + * [Api set: People 1.2] + */ + enum PersonaDataUpdated { + hostId = "HostId", + type = "Type", + photo = "Photo", + personaInfo = "PersonaInfo", + unifiedCommunicationInfo = "UnifiedCommunicationInfo", + organization = "Organization", + unifiedGroupInfo = "UnifiedGroupInfo", + members = "Members", + membership = "Membership", + capabilities = "Capabilities", + customizations = "Customizations", + viewableSources = "ViewableSources", + placeholder = "Placeholder" + } + /** + * + * The event arguments for when persona data is updated + * + * [Api set: People 1.2] + */ + interface PersonaDataUpdatedEventArgs { + /** + * + * Returns the persona data that needs updating + * + * [Api set: People 1.2] + */ + dataUpdated: OfficeCore.PersonaDataUpdated[]; + /** + * + * Returns the persona that needs updating + * + * [Api set: People 1.2] + */ + sendingPersonaHostId: string; + } + /** + * + * Represents an interface for actions that can done for a persona + * + * [Api set: People 1.2] + */ + class PersonaActions 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; + addContact(): void; + callPhoneNumber(contactNumber: string): void; + composeEmail(emailAddress: string): void; + composeInstantMessage(sipAddress: string): void; + editContact(): void; + editContactByIdentifier(identifier: string): void; + getChangePhotoUrlAndOpenInBrowser(): void; + hideHoverCardForPersona(): void; + openGroupCalendar(): void; + openLinkContactUx(): void; + openOutlookProperties(): void; + pinPersonaToQuickContacts(): void; + scheduleMeeting(): void; + showContactCard(pointToShowX: number, pointToShowY: number, personaRectTop: number, personaRectLeft: number, personaRectWidth: number, personaRectHeight: number): void; + showContextMenu(pointToShowX: number, pointToShowY: number, personaRectTop: number, personaRectLeft: number, personaRectWidth: number, personaRectHeight: number): void; + showExpandedCard(pointToShowX: number, pointToShowY: number, personaRectTop: number, personaRectLeft: number, personaRectWidth: number, personaRectHeight: number): void; + showHoverCardForPersona(pointToShowX: number, pointToShowY: number, personaRectTop: number, personaRectLeft: number, personaRectWidth: number, personaRectHeight: number): void; + startAudioCall(): void; + startVideoCall(): void; + subscribeToGroup(): void; + toggleTagForAlerts(): void; + unsubscribeFromGroup(): 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 OfficeCore.PersonaActions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.PersonaActionsData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Contains information about the sources for persona data + * + * [Api set: People 1.2] + */ + class PersonaInfoSource 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 addresses: string[]; + readonly birthday: string; + readonly birthdays: string[]; + readonly companyName: string; + readonly displayName: string; + readonly email: string; + readonly emailAddresses: string[]; + readonly jobInfoDepartment: string; + readonly linkedCompanyNames: string[]; + readonly linkedDepartments: string[]; + readonly linkedOffices: string[]; + readonly linkedTitles: string[]; + readonly notes: string[]; + readonly office: string; + readonly phones: string[]; + readonly sipAddresses: string[]; + readonly title: string; + readonly webSites: string[]; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.PersonaInfoSourceLoadOptions): OfficeCore.PersonaInfoSource; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.PersonaInfoSource; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.PersonaInfoSource; + /** + * 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 OfficeCore.PersonaInfoSource object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.PersonaInfoSourceData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.PersonaInfoSourceData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.PersonaInfoSourceData): void; + } + /** + * + * Contains information about the persona + * + * [Api set: People 1.2] + */ + class PersonaInfo 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 sources: OfficeCore.PersonaInfoSource; + readonly birthday: Date; + readonly birthdays: Date[]; + readonly companyName: string; + readonly displayName: string; + readonly email: string; + readonly emailAddresses: string[]; + readonly isPersonResolved: boolean; + readonly jobInfoDepartment: string; + readonly linkedCompanyNames: string[]; + readonly linkedDepartments: string[]; + readonly linkedOffices: string[]; + readonly linkedTitles: string[]; + readonly notes: string[]; + readonly office: string; + readonly sipAddresses: string[]; + readonly title: string; + readonly webSites: string[]; + getAddresses(): OfficeExtension.ClientResult; + getPhones(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.PersonaInfoLoadOptions): OfficeCore.PersonaInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.PersonaInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.PersonaInfo; + /** + * 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 OfficeCore.PersonaInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.PersonaInfoData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.PersonaInfoData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.PersonaInfoData): void; + } + /** + * + * Contains information about the persona related to Unified Communications + * + * [Api set: People 1.2] + */ + class PersonaUnifiedCommunicationInfo 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 availability: OfficeCore.UnifiedCommunicationAvailability | "NotSet" | "Free" | "Idle" | "Busy" | "IdleBusy" | "DoNotDisturb" | "Unalertable" | "Unavailable"; + readonly availabilityText: string; + readonly availabilityTooltip: string; + readonly calendarState: OfficeCore.FreeBusyCalendarState | "Unknown" | "Free" | "Busy" | "Elsewhere" | "Tentative" | "OutOfOffice"; + readonly customStatusString: string; + readonly freeBusyStatus: string; + readonly idleStartTime: Date; + readonly isBlocked: boolean; + readonly isDurationInAvailabilityText: boolean; + readonly isOnBuddyList: boolean; + readonly isOutOfOffice: boolean; + readonly isSelf: boolean; + readonly isTagged: boolean; + readonly meetingLocation: string; + readonly meetingSubject: string; + readonly outOfOfficeNote: string; + readonly overallCapability: string; + readonly presence: OfficeCore.UnifiedCommunicationPresence | "Free" | "Busy" | "Idle" | "DoNotDistrub" | "Blocked" | "NotSet" | "OutOfOffice"; + readonly presenceNote: string; + readonly presenceTooltip: string; + readonly status: OfficeCore.UnifiedCommunicationStatus | "Online" | "NotOnline" | "Away" | "Busy" | "BeRightBack" | "OnThePhone" | "OutToLunch" | "InAMeeting" | "OutOfOffice" | "DoNotDisturb" | "InAConference" | "Getting" | "NotABuddy" | "Disconnected" | "NotInstalled" | "UrgentInterruptionsOnly" | "MayBeAvailable" | "Idle" | "InPresentation"; + readonly timezone: string; + readonly timezoneBias: number; + readonly voiceMailUri: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.PersonaUnifiedCommunicationInfoLoadOptions): OfficeCore.PersonaUnifiedCommunicationInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.PersonaUnifiedCommunicationInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.PersonaUnifiedCommunicationInfo; + /** + * 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 OfficeCore.PersonaUnifiedCommunicationInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.PersonaUnifiedCommunicationInfoData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.PersonaUnifiedCommunicationInfoData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.PersonaUnifiedCommunicationInfoData): void; + } + /** + * [Api set: People 1.2] + */ + interface PersonaImageUriMetadata { + imageUri: string; + isPlaceholder: boolean; + } + /** + * + * Contains information about + * + * [Api set: People 1.2] + */ + class PersonaPhotoInfo 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; + getImageUri(uriScheme: string): OfficeExtension.ClientResult; + getImageUriWithMetadata(uriScheme: string): OfficeExtension.ClientResult; + getPlaceholderUri(uriScheme: string): OfficeExtension.ClientResult; + /** + * Sets the color that should be used for the placeholder image + * + * [Api set: People 1.2] + * + * @param color The color in the #RRGGBB format + */ + setPlaceholderColor(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 OfficeCore.PersonaPhotoInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.PersonaPhotoInfoData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Contains information about capabilities the Persona has + * + * [Api set: People 1.2] + */ + interface PersonaCapabilities { + canAddContact: boolean; + canCallPhoneNumber: boolean; + canComposeInstantMessage: boolean; + canEditContact: boolean; + canLinkContacts: boolean; + canOpenOutlookProperties: boolean; + canPinToFavorites: boolean; + canProvideCustomizations: boolean; + canProvideMembers: boolean; + canProvideMembership: boolean; + canProvideOrganization: boolean; + canProvidePersonaInfo: boolean; + canProvidePhoto: boolean; + canProvideUnifiedCommunicationInfo: boolean; + canProvideUnifiedGroupInfo: boolean; + canProvideViewableSources: boolean; + canScheduleMeeting: boolean; + canShowPresence: boolean; + canStartAudioCall: boolean; + canStartVideoCall: boolean; + canSubscribeToUnifiedGroup: boolean; + canTagForAlerts: boolean; + canUnsubscribeFromUnifiedGroup: boolean; + canUntagForAlerts: boolean; + canViewUnifiedGroupResources: boolean; + hasCustomizations: boolean; + isMePersona: boolean; + isMemberDataFromO365UsingNSPI: boolean; + isMemberOfDataFromO365UsingNSPI: boolean; + isOrgDataFromO365UsingNSPI: boolean; + } + /** + * + * Represents a collection of personas + * + * [Api set: People 1.2] + */ + class PersonaCollection 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: OfficeCore.Persona[]; + getCount(): OfficeExtension.ClientResult; + getItem(index: number): OfficeCore.Persona; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.PersonaCollectionLoadOptions & OfficeCore.Interfaces.CollectionLoadOptions): OfficeCore.PersonaCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.PersonaCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OfficeCore.PersonaCollection; + /** + * 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 `OfficeCore.PersonaCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.PersonaCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OfficeCore.Interfaces.PersonaCollectionData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.PersonaCollectionData): void; + } + /** + * [Api set: People 1.2] + */ + class PersonaOrganizationInfo 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 directReports: OfficeCore.PersonaCollection; + readonly hierarchy: OfficeCore.PersonaCollection; + readonly manager: OfficeCore.Persona; + readonly isWarmedUp: boolean; + readonly isWarmingUp: boolean; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.PersonaOrganizationInfoLoadOptions): OfficeCore.PersonaOrganizationInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.PersonaOrganizationInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.PersonaOrganizationInfo; + /** + * 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 OfficeCore.PersonaOrganizationInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.PersonaOrganizationInfoData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.PersonaOrganizationInfoData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.PersonaOrganizationInfoData): void; + } + /** + * [Api set: People 1.2] + */ + enum CustomizedData { + email = "Email", + workPhone = "WorkPhone", + workPhone2 = "WorkPhone2", + workFax = "WorkFax", + mobilePhone = "MobilePhone", + homePhone = "HomePhone", + homePhone2 = "HomePhone2", + otherPhone = "OtherPhone", + sipAddress = "SipAddress", + profile = "Profile", + office = "Office", + company = "Company", + workAddress = "WorkAddress", + homeAddress = "HomeAddress", + otherAddress = "OtherAddress", + birthday = "Birthday" + } + /** + * [Api set: People 1.2] + */ + interface ContactCardCustomization { + field: OfficeCore.CustomizedData | "Email" | "WorkPhone" | "WorkPhone2" | "WorkFax" | "MobilePhone" | "HomePhone" | "HomePhone2" | "OtherPhone" | "SipAddress" | "Profile" | "Office" | "Company" | "WorkAddress" | "HomeAddress" | "OtherAddress" | "Birthday"; + label: string; + value: string; + } + /** + * [Api set: People 1.2] + */ + class UnifiedGroupInfo 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; + amIMember: boolean; + amIOwner: boolean; + amISubscribed: boolean; + classification: string; + description: string; + hasGuests: boolean; + isPublic: boolean; + memberCount: number; + oneDrive: string; + oneNote: string; + ownerCount: number; + planner: string; + site: string; + subscriptionEnabled: 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: OfficeCore.UnifiedGroupInfo): 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.UnifiedGroupInfoUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OfficeCore.UnifiedGroupInfo): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.UnifiedGroupInfoLoadOptions): OfficeCore.UnifiedGroupInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.UnifiedGroupInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.UnifiedGroupInfo; + /** + * 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 OfficeCore.UnifiedGroupInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.UnifiedGroupInfoData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.UnifiedGroupInfoData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.UnifiedGroupInfoData): void; + } + /** + * + * Personas may have one or more contacts, the ContactSource provides a way to uniquely identify the + individual contacts. The Identifier can be passed into the EditContact action to edit a specific contact. + * + * [Api set: People 1.2] + */ + interface ContactSource { + identifier: string; + label: string; + } + /** + * + * Personas may contain data that comes from server based sources that are accessable via a Url, + the UrlSource provides a way to access that information + * + * [Api set: People 1.2] + */ + interface UrlSource { + label: string; + url: string; + } + /** + * [Api set: People 1.2] + */ + interface ViewableSources { + contactSources: OfficeCore.ContactSource[]; + urlBasedSources: OfficeCore.UrlSource[]; + } + enum PersonaPromiseType { + immediate = 0, + load = 3 + } + class PersonaInfoAndSource { + info: OfficeCore.PersonaInfo; + source: OfficeCore.PersonaInfoSource; + } + /** + * + * Represents the interface for a persona entry + * + * [Api set: People 1.2] + */ + class Persona 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 actions: OfficeCore.PersonaActions; + readonly organization: OfficeCore.PersonaOrganizationInfo; + readonly personaInfo: OfficeCore.PersonaInfo; + readonly photo: OfficeCore.PersonaPhotoInfo; + readonly unifiedCommunicationInfo: OfficeCore.PersonaUnifiedCommunicationInfo; + readonly unifiedGroupInfo: OfficeCore.UnifiedGroupInfo; + readonly capabilities: OfficeCore.PersonaCapabilities; + readonly diagnosticId: string; + readonly hostId: string; + readonly instanceId: string; + readonly type: OfficeCore.PersonaType | "Unknown" | "Enterprise" | "Contact" | "Bot" | "PhoneOnly" | "OneOff" | "DistributionList" | "PersonalDistributionList" | "Anonymous" | "UnifiedGroup"; + /** 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: OfficeCore.Persona): 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.PersonaUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OfficeCore.Persona): void; + dispose(): void; + getCustomizations(): OfficeExtension.ClientResult; + getMembers(): OfficeCore.MemberInfoList; + getMembership(): OfficeCore.MemberInfoList; + getViewableSources(): OfficeExtension.ClientResult; + reportTimeForRender(perfpoint: OfficeCore.PersonaCardPerfPoint, millisecUTC: number): void; + reportTimeForRender(perfpoint: "PlaceHolderRendered" | "InitialCardRendered", millisecUTC: number): void; + warmup(dataToWarmUp: OfficeCore.PersonaDataUpdated[]): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.PersonaLoadOptions): OfficeCore.Persona; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.Persona; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.Persona; + /** + * 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 OfficeCore.Persona object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.PersonaData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.PersonaData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.PersonaData): void; + } + class PersonaCustom { + private performAsyncOperation; + getOrganizationAsync(type?: PersonaPromiseType): Promise; + private getIsPersonaInfoResolvedCheck; + getPersonaInfoAsync(type?: PersonaPromiseType): Promise; + getPersonaInfoWithSourceAsync(type?: PersonaPromiseType): Promise; + getUnifiedCommunicationInfo(type?: PersonaPromiseType): Promise; + getUnifiedGroupInfoAsync(type?: PersonaPromiseType): Promise; + getTypeAsync(type?: PersonaPromiseType): Promise; + getCustomizationsAsync(type?: PersonaPromiseType): Promise; + getMembersAsync(type?: PersonaPromiseType): Promise; + getMembershipAsync(type?: PersonaPromiseType): Promise; + getPersonaLifetime(): Promise; + } + interface Persona extends OfficeExtension.ClientObject, PersonaCustom { + } + /** + * [Api set: People 1.2] + */ + class PersonaLifetime 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 instanceId: string; + getPersona(hostId: string): OfficeCore.Persona; + getPersonaForOrgByEntryId(entryId: string, name?: string, sip?: string, smtp?: string): OfficeCore.Persona; + getPersonaForOrgEntry(name: string, sip: string, smtp: string, entryId: string): OfficeCore.Persona; + getPolicies(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.PersonaLifetimeLoadOptions): OfficeCore.PersonaLifetime; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.PersonaLifetime; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.PersonaLifetime; + readonly onPersonaUpdated: 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 OfficeCore.PersonaLifetime object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.PersonaLifetimeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.PersonaLifetimeData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.PersonaLifetimeData): void; + } + /** + * [Api set: People 1.2] + */ + interface PersonaPolicies { + allowAddingContact: boolean; + allowAddingContactFromGal: boolean; + allowAddingToInstantMessengerContacts: boolean; + allowAudioConference: boolean; + allowCalendarInCard: boolean; + allowHoverCard: boolean; + allowInstantMessageReply: boolean; + allowInstantMessageReplyAll: boolean; + allowInstantMessages: boolean; + allowLocationInCard: boolean; + allowMySite: boolean; + allowOutlookProperties: boolean; + allowPhotos: boolean; + allowPresenceIcon: boolean; + allowScheduleAMeeting: boolean; + allowSendingMail: boolean; + allowShowMembershipTab: boolean; + allowShowOrgTab: boolean; + allowTagForAlerts: boolean; + allowVoiceAndVideoCalls: boolean; + isMemberDataFromO365UsingNSPI: boolean; + isMemberOfDataFromO365UsingNSPI: boolean; + isOrgDataFromO365UsingNSPI: boolean; + } + /** + * [Api set: People 1.2] + */ + interface LokiTokenEventArgs { + isAvailable: boolean; + lokiAutoDiscoverUrl: string; + lokiToken: string; + } + /** + * [Api set: People 1.2] + */ + interface ClientAccessTokenEventArgs { + clientAccessToken: string; + isAvailable: boolean; + tokenTTLInSeconds: number; + } + /** + * [Api set: People 1.2] + */ + interface IdentityUniqueIdAvailableEventArgs { + isAvailable: boolean; + uniqueId: string; + } + /** + * [Api set: People 1.2] + */ + class LokiTokenProvider 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 emailOrUpn: string; + readonly instanceId: string; + requestClientAccessToken(): void; + requestIdentityUniqueId(): void; + requestToken(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.LokiTokenProviderLoadOptions): OfficeCore.LokiTokenProvider; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.LokiTokenProvider; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.LokiTokenProvider; + readonly onClientAccessTokenAvailable: OfficeExtension.EventHandlers; + readonly onIdentityUniqueIdAvailable: OfficeExtension.EventHandlers; + readonly onLokiTokenAvailable: 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 OfficeCore.LokiTokenProvider object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.LokiTokenProviderData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.LokiTokenProviderData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.LokiTokenProviderData): void; + } + /** + * + * The LokiTokenProviderFactory class provides support for getting the LokiTokenProvider + instance given an account name. + * + * [Api set: People 1.2] + */ + class LokiTokenProviderFactory 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; + getLokiTokenProvider(accountName: string): OfficeCore.LokiTokenProvider; + /** + * Create a new instance of OfficeCore.LokiTokenProviderFactory object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.LokiTokenProviderFactory; + /** + * 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 OfficeCore.LokiTokenProviderFactory object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.LokiTokenProviderFactoryData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + class PeopleApiContext { + private context; + private instanceId; + constructor(context: OfficeExtension.ClientRequestContext, instanceId: string); + private readonly serviceContext; + getPersonaLifetime(): Promise; + getInitialPersona(): Promise; + getLokiTokenProvider(): Promise; + } + /** + * + * The ServiceContext class provides support for getting the objects for the specified + instance. When an instance is no longer in use call the Dispose method to cleanup + all of the data associated with the instance. + * + * [Api set: People 1.2] + */ + class ServiceContext 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; + accountEmailOrUpn(instanceId: string): OfficeExtension.ClientResult; + dispose(instance: string): void; + getInitialPersona(instanceId: string): OfficeCore.Persona; + getLokiTokenProvider(instanceId: string): OfficeCore.LokiTokenProvider; + getPersonaLifetime(instanceId: string): OfficeCore.PersonaLifetime; + getPersonaPolicies(): OfficeExtension.ClientResult; + /** + * Create a new instance of OfficeCore.ServiceContext object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.ServiceContext; + /** + * 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 OfficeCore.ServiceContext object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.ServiceContextData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * + * The RichapiPcxFeatureChecks class provides functions to check for flights. + * + * [Api set: People 1.2] + */ + class RichapiPcxFeatureChecks 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; + isAddChangePhotoLinkOnLpcPersonaImageFlightEnabled(): OfficeExtension.ClientResult; + /** + * Create a new instance of OfficeCore.RichapiPcxFeatureChecks object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.RichapiPcxFeatureChecks; + /** + * 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 OfficeCore.RichapiPcxFeatureChecks object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.RichapiPcxFeatureChecksData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Represents a collection of Apis for Tap feature. + * + * [Api set: Tap 1.1] + */ + class Tap 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 enterprise user info - including whether Tap feature is enabled, tenant root, and "Go Local" information. + * + * [Api set: Tap 1.1] + * @returns The enterprise user info in Json format. + */ + getEnterpriseUserInfo(): OfficeExtension.ClientResult; + /** + * Returns the user friendly path for the given document URL as shown on MRU. + * + * [Api set: Tap 1.1] + * + * @param documentUrl Required. Document URL. + * @returns The user friendly path. + */ + getMruFriendlyPath(documentUrl: string): OfficeExtension.ClientResult; + /** + * Given a document URL, opens the file in the default application. Win32 Only. + * + * [Api set: Tap 1.1] + * + * @param documentUrl Required. Document URL. + * @param useUniversalAsBackup Optional. Whether to launch in universal app if win32 desktop app is not available. The default value is false. + * @returns Whether launch is successful. + */ + launchFileUrlInOfficeApp(documentUrl: string, useUniversalAsBackup?: boolean): OfficeExtension.ClientResult; + /** + * Performs local window file index search. Win32 Only. + * + * [Api set: Tap 1.1] + * + * @param query Required. Search query. + * @param numResultsRequested Required. Numers of files to return. + * @param supportedFileExtensions Optional. All supported file extension (should split with ","). The default value is all file extensions for current host application. + * @param documentUrlToExclude Optional. The document url to exclude from results. The default value is empty. + * @returns The local document results in Json format. + */ + performLocalSearch(query: string, numResultsRequested: number, supportedFileExtensions?: string, documentUrlToExclude?: string): OfficeExtension.ClientResult; + /** + * Read search cache file from local disk. Win32 Only. + * + * [Api set: Tap 1.1] + * + * @param keyword Required. Search keyword. + * @param expiredHours Required. Numers of hours that cache gets expired. If expired, return empty string. + * @param filterObjectType Required. Selected object type for filter. + * @returns The search cache file content. + */ + readSearchCache(keyword: string, expiredHours: number, filterObjectType: OfficeCore.ObjectType): OfficeExtension.ClientResult; + /** + * Read search cache file from local disk. Win32 Only. + * + * [Api set: Tap 1.1] + * + * @param keyword Required. Search keyword. + * @param expiredHours Required. Numers of hours that cache gets expired. If expired, return empty string. + * @param filterObjectType Required. Selected object type for filter. + * @returns The search cache file content. + */ + readSearchCache(keyword: string, expiredHours: number, filterObjectType: "Unknown" | "Chart" | "SmartArt" | "Table" | "Image" | "Slide" | "OLE" | "Text"): OfficeExtension.ClientResult; + /** + * Write search cache file to local disk. Win32 Only. + * + * [Api set: Tap 1.1] + * + * @param fileContent Required. File content string. + * @param keyword Required. Search keyword. + * @param filterObjectType Required. Selected object type for filter. + * @returns Whether write is successful. + */ + writeSearchCache(fileContent: string, keyword: string, filterObjectType: OfficeCore.ObjectType): OfficeExtension.ClientResult; + /** + * Write search cache file to local disk. Win32 Only. + * + * [Api set: Tap 1.1] + * + * @param fileContent Required. File content string. + * @param keyword Required. Search keyword. + * @param filterObjectType Required. Selected object type for filter. + * @returns Whether write is successful. + */ + writeSearchCache(fileContent: string, keyword: string, filterObjectType: "Unknown" | "Chart" | "SmartArt" | "Table" | "Image" | "Slide" | "OLE" | "Text"): OfficeExtension.ClientResult; + /** + * Create a new instance of OfficeCore.Tap object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.Tap; + /** + * 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 OfficeCore.Tap object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.TapData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Represents object type for Tap feature. + * + * [Api set: Tap 1.1] + */ + enum ObjectType { + unknown = "Unknown", + chart = "Chart", + smartArt = "SmartArt", + table = "Table", + image = "Image", + slide = "Slide", + ole = "OLE", + text = "Text" + } + /** + * + * Provides information about the app runtime's visibility. + * + * [Api set: SharedRuntime 1.1] + */ + interface VisibilityChangedEventArgs { + /** + * + * The visibility of the app runtime. + * + * [Api set: SharedRuntime 1.1] + */ + visibility: OfficeCore.Visibility | "Hidden" | "Visible"; + } + /** + * [Api set: SharedRuntime 1.1] + */ + enum Visibility { + hidden = "Hidden", + visible = "Visible" + } + /** + * + * Feature Tier names + * + * [Api set: License 1.1] + */ + enum LicenseFeatureTier { + /** + * Unknown feature tier + * + */ + unknown = "Unknown", + /** + * Basic feature tier + * + */ + basic = "Basic", + /** + * Premium feature tier + * + */ + premium = "Premium" + } + /** + * + * License Event types + * + * [Api set: License 1.1] + */ + const enum LicenseEventType { + featureStateChanged = 1 + } + /** + * + * License interface for paywall and upsell APIs + * + * [Api set: License 1.1] + */ + class License 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 promise that fetches the TierName of the feature. If the feature is missing or an error occurs return the fallbackValue. + * + * [Api set: License 1.1] + * + * @param feature Name of the feature. + * @param fallbackValue Fallback Value in case of error. + * @returns Tier name for the feature + */ + getFeatureTier(feature: string, fallbackValue: OfficeCore.LicenseFeatureTier): OfficeExtension.ClientResult; + /** + * Returns a promise that fetches the TierName of the feature. If the feature is missing or an error occurs return the fallbackValue. + * + * [Api set: License 1.1] + * + * @param feature Name of the feature. + * @param fallbackValue Fallback Value in case of error. + * @returns Tier name for the feature + */ + getFeatureTier(feature: string, fallbackValue: "Unknown" | "Basic" | "Premium"): OfficeExtension.ClientResult; + /** + * Returns an instance of LicenseFeature to register for feature statechanged event. + * + * [Api set: License 1.1] + */ + getLicenseFeature(feature: string): OfficeCore.LicenseFeature; + /** + * Returns a promise that determines if a feature is enabled. If the feature is missing or an error occurs return the fallbackValue. + * + * [Api set: License 1.1] + * + * @param feature Name of the feature. + * @param fallbackValue fallback value in case of error. + * @returns true if the feature is enabled; otherwise false + */ + isFeatureEnabled(feature: string, fallbackValue: boolean): OfficeExtension.ClientResult; + /** + * Returns whether or not freemium upsell is enabled, based on the current context. + * + * [Api set: License 1.1] + * @returns True if freemium upsell is enabled; otherwise false + */ + isFreemiumUpsellEnabled(): OfficeExtension.ClientResult; + /** + * Launches the freemium upsell experience. + * + * [Api set: License 1.1] + */ + launchUpsellExperience(experienceId: string): void; + /** + * Create a new instance of OfficeCore.License object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.License; + /** + * 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 OfficeCore.License object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.LicenseData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * [Api set: License 1.1] + */ + class LicenseFeature 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 id: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OfficeCore.Interfaces.LicenseFeatureLoadOptions): OfficeCore.LicenseFeature; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.LicenseFeature; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.LicenseFeature; + /** + * + * Occurs when the license state of a feature changes + * + * [Api set: License 1.1] + * + * @eventproperty + */ + readonly onStateChanged: 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 OfficeCore.LicenseFeature object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.LicenseFeatureData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OfficeCore.Interfaces.LicenseFeatureData; + /** + * Set mock data + */ + setMockData(data: OfficeCore.Interfaces.LicenseFeatureData): void; + } + /** + * + * Feature data to be passed back to the FeatureStateChanged listeners. + * + * [Api set: License 1.1] + */ + interface LicenseFeatureStateChangedEventArgs { + feature: string; + isEnabled: boolean; + tier: OfficeCore.LicenseFeatureTier | "Unknown" | "Basic" | "Premium"; + } + /** + * + * DialogPage Event types + * + * [Api set: DialogPage 1.1] + */ + const enum DialogPageEventType { + onShow = 1 + } + /** + * + * DialogPage interface for APIs to interact with dialog hosting web content + * + * [Api set: DialogPage 1.1] + */ + class DialogPage 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; + /** + * Tells the host to close this dialog + * + * [Api set: DialogPage 1.1] + */ + close(): void; + /** + * Notifies the host that web content is finished loading and ready to be shown + * + * [Api set: DialogPage 1.1] + */ + readyToShow(): void; + /** + * Registers a callback that gets triggered once the host displays the web content that was requested to load in the background + * + * [Api set: DialogPage 1.1] + */ + registerOnShow(): void; + /** + * Sends a message to the host. The host can use the message in a message handler to trigger an action in the application + * + * [Api set: DialogPage 1.1] + */ + sendMessageToHost(message: string): void; + /** + * Unregisters OnShow callback + * + * [Api set: DialogPage 1.1] + */ + unregisterOnShow(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OfficeCore.DialogPage; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OfficeCore.DialogPage; + /** + * Create a new instance of OfficeCore.DialogPage object + */ + static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.DialogPage; + /** + * + * Fires when dialog is shown + * + * [Api set: DialogPage 1.1] + * + * @eventproperty + */ + readonly onOnShowEvent: 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 OfficeCore.DialogPage object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OfficeCore.Interfaces.DialogPageData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Args passed back via OnShow event + * + * [Api set: DialogPage 1.1] + */ + interface OnShowEventArgs { + } + enum ErrorCodes { + apiNotAvailable = "ApiNotAvailable", + clientError = "ClientError", + controlIdNotFound = "ControlIdNotFound", + entryIdRequired = "EntryIdRequired", + generalException = "GeneralException", + hostRestartNeeded = "HostRestartNeeded", + instanceNotFound = "InstanceNotFound", + interactiveFlowAborted = "InteractiveFlowAborted", + invalidArgument = "InvalidArgument", + invalidGrant = "InvalidGrant", + invalidResourceUrl = "InvalidResourceUrl", + objectNotFound = "ObjectNotFound", + resourceNotSupported = "ResourceNotSupported", + serverError = "ServerError", + serviceUrlNotFound = "ServiceUrlNotFound", + ticketInvalidParams = "TicketInvalidParams", + ticketNetworkError = "TicketNetworkError", + ticketUnauthorized = "TicketUnauthorized", + ticketUninitialized = "TicketUninitialized", + ticketUnknownError = "TicketUnknownError", + unexpectedError = "UnexpectedError", + unsupportedUserIdentity = "UnsupportedUserIdentity", + userNotSignedIn = "UserNotSignedIn" + } + 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 RoamingSetting object, for use in `roamingSetting.set({ ... })`. */ + interface RoamingSettingUpdateData { + /** + * + * Represents the value stored for this setting. + * + * [Api set: Roaming 1.1] + */ + value?: any; + } + /** An interface for updating data on the RibbonButton object, for use in `ribbonButton.set({ ... })`. */ + interface RibbonButtonUpdateData { + enabled?: boolean; + } + /** An interface for updating data on the RibbonButtonCollection object, for use in `ribbonButtonCollection.set({ ... })`. */ + interface RibbonButtonCollectionUpdateData { + items?: OfficeCore.Interfaces.RibbonButtonData[]; + } + /** An interface for updating data on the Comment object, for use in `comment.set({ ... })`. */ + interface CommentUpdateData { + /** + * + * Gets or sets whether this comment is resolved. + * + * [Api set: Comments 1.1] + */ + resolved?: boolean; + /** + * + * Gets or sets the comment's plain text, without formatting. + * + * [Api set: Comments 1.1] + */ + text?: string; + } + /** An interface for updating data on the CommentCollection object, for use in `commentCollection.set({ ... })`. */ + interface CommentCollectionUpdateData { + items?: OfficeCore.Interfaces.CommentData[]; + } + /** An interface for updating data on the PersonaCollection object, for use in `personaCollection.set({ ... })`. */ + interface PersonaCollectionUpdateData { + items?: OfficeCore.Interfaces.PersonaData[]; + } + /** An interface for updating data on the UnifiedGroupInfo object, for use in `unifiedGroupInfo.set({ ... })`. */ + interface UnifiedGroupInfoUpdateData { + amIMember?: boolean; + amIOwner?: boolean; + amISubscribed?: boolean; + classification?: string; + description?: string; + hasGuests?: boolean; + isPublic?: boolean; + memberCount?: number; + oneDrive?: string; + oneNote?: string; + ownerCount?: number; + planner?: string; + site?: string; + subscriptionEnabled?: boolean; + } + /** An interface for updating data on the Persona object, for use in `persona.set({ ... })`. */ + interface PersonaUpdateData { + unifiedGroupInfo?: OfficeCore.Interfaces.UnifiedGroupInfoUpdateData; + } + /** An interface describing the data returned by calling `authenticationService.toJSON()`. */ + interface AuthenticationServiceData { + } + /** An interface describing the data returned by calling `roamingSetting.toJSON()`. */ + interface RoamingSettingData { + /** + * + * Returns the Id that represents the id of the Roaming Setting. Read-only. + * + * [Api set: Roaming 1.1] + */ + id?: string; + /** + * + * Represents the value stored for this setting. + * + * [Api set: Roaming 1.1] + */ + value?: any; + } + /** An interface describing the data returned by calling `dynamicRibbon.toJSON()`. */ + interface DynamicRibbonData { + buttons?: OfficeCore.Interfaces.RibbonButtonData[]; + } + /** An interface describing the data returned by calling `ribbonTab.toJSON()`. */ + interface RibbonTabData { + id?: string; + } + /** An interface describing the data returned by calling `ribbonButton.toJSON()`. */ + interface RibbonButtonData { + enabled?: boolean; + id?: string; + label?: string; + } + /** An interface describing the data returned by calling `ribbonButtonCollection.toJSON()`. */ + interface RibbonButtonCollectionData { + items?: OfficeCore.Interfaces.RibbonButtonData[]; + } + /** An interface describing the data returned by calling `comment.toJSON()`. */ + interface CommentData { + /** + * + * Gets the replies to this comment. If this is not a root comment, returns an empty collection. + * + * [Api set: Comments 1.1] + */ + replies?: OfficeCore.Interfaces.CommentData[]; + /** + * + * Gets an object representing the comment's author. Read-only. + * + * [Api set: Comments 1.1] + */ + author?: OfficeCore.CommentAuthor; + /** + * + * Gets when the comment was created. Read-only. + * + * [Api set: Comments 1.1] + */ + created?: Date; + /** + * + * Returns a value that uniquely identifies the comment in a given document. Read-only. + * + * [Api set: Comments 1.1] + */ + id?: string; + /** + * + * Gets the level of the comment: 0 if it is a root comment, or 1 if it is a reply. Read-only. + * + * [Api set: Comments 1.1] + */ + level?: number; + /** + * + * Gets the comment's mentions. + * + * [Api set: Comments 1.1] + */ + mentions?: OfficeCore.CommentMention[]; + /** + * + * Gets or sets whether this comment is resolved. + * + * [Api set: Comments 1.1] + */ + resolved?: boolean; + /** + * + * Gets or sets the comment's plain text, without formatting. + * + * [Api set: Comments 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling `commentCollection.toJSON()`. */ + interface CommentCollectionData { + items?: OfficeCore.Interfaces.CommentData[]; + } + /** An interface describing the data returned by calling `memberInfoList.toJSON()`. */ + interface MemberInfoListData { + isWarmedUp?: boolean; + isWarmingUp?: boolean; + } + /** An interface describing the data returned by calling `personaInfoSource.toJSON()`. */ + interface PersonaInfoSourceData { + addresses?: string[]; + birthday?: string; + birthdays?: string[]; + companyName?: string; + displayName?: string; + email?: string; + emailAddresses?: string[]; + jobInfoDepartment?: string; + linkedCompanyNames?: string[]; + linkedDepartments?: string[]; + linkedOffices?: string[]; + linkedTitles?: string[]; + notes?: string[]; + office?: string; + phones?: string[]; + sipAddresses?: string[]; + title?: string; + webSites?: string[]; + } + /** An interface describing the data returned by calling `personaInfo.toJSON()`. */ + interface PersonaInfoData { + sources?: OfficeCore.Interfaces.PersonaInfoSourceData; + birthday?: Date; + birthdays?: Date[]; + companyName?: string; + displayName?: string; + email?: string; + emailAddresses?: string[]; + isPersonResolved?: boolean; + jobInfoDepartment?: string; + linkedCompanyNames?: string[]; + linkedDepartments?: string[]; + linkedOffices?: string[]; + linkedTitles?: string[]; + notes?: string[]; + office?: string; + sipAddresses?: string[]; + title?: string; + webSites?: string[]; + } + /** An interface describing the data returned by calling `personaUnifiedCommunicationInfo.toJSON()`. */ + interface PersonaUnifiedCommunicationInfoData { + availability?: OfficeCore.UnifiedCommunicationAvailability | "NotSet" | "Free" | "Idle" | "Busy" | "IdleBusy" | "DoNotDisturb" | "Unalertable" | "Unavailable"; + availabilityText?: string; + availabilityTooltip?: string; + calendarState?: OfficeCore.FreeBusyCalendarState | "Unknown" | "Free" | "Busy" | "Elsewhere" | "Tentative" | "OutOfOffice"; + customStatusString?: string; + freeBusyStatus?: string; + idleStartTime?: Date; + isBlocked?: boolean; + isDurationInAvailabilityText?: boolean; + isOnBuddyList?: boolean; + isOutOfOffice?: boolean; + isSelf?: boolean; + isTagged?: boolean; + meetingLocation?: string; + meetingSubject?: string; + outOfOfficeNote?: string; + overallCapability?: string; + presence?: OfficeCore.UnifiedCommunicationPresence | "Free" | "Busy" | "Idle" | "DoNotDistrub" | "Blocked" | "NotSet" | "OutOfOffice"; + presenceNote?: string; + presenceTooltip?: string; + status?: OfficeCore.UnifiedCommunicationStatus | "Online" | "NotOnline" | "Away" | "Busy" | "BeRightBack" | "OnThePhone" | "OutToLunch" | "InAMeeting" | "OutOfOffice" | "DoNotDisturb" | "InAConference" | "Getting" | "NotABuddy" | "Disconnected" | "NotInstalled" | "UrgentInterruptionsOnly" | "MayBeAvailable" | "Idle" | "InPresentation"; + timezone?: string; + timezoneBias?: number; + voiceMailUri?: string; + } + /** An interface describing the data returned by calling `personaCollection.toJSON()`. */ + interface PersonaCollectionData { + items?: OfficeCore.Interfaces.PersonaData[]; + } + /** An interface describing the data returned by calling `personaOrganizationInfo.toJSON()`. */ + interface PersonaOrganizationInfoData { + isWarmedUp?: boolean; + isWarmingUp?: boolean; + } + /** An interface describing the data returned by calling `unifiedGroupInfo.toJSON()`. */ + interface UnifiedGroupInfoData { + amIMember?: boolean; + amIOwner?: boolean; + amISubscribed?: boolean; + classification?: string; + description?: string; + hasGuests?: boolean; + isPublic?: boolean; + memberCount?: number; + oneDrive?: string; + oneNote?: string; + ownerCount?: number; + planner?: string; + site?: string; + subscriptionEnabled?: boolean; + } + /** An interface describing the data returned by calling `persona.toJSON()`. */ + interface PersonaData { + organization?: OfficeCore.Interfaces.PersonaOrganizationInfoData; + personaInfo?: OfficeCore.Interfaces.PersonaInfoData; + unifiedCommunicationInfo?: OfficeCore.Interfaces.PersonaUnifiedCommunicationInfoData; + unifiedGroupInfo?: OfficeCore.Interfaces.UnifiedGroupInfoData; + capabilities?: OfficeCore.PersonaCapabilities; + diagnosticId?: string; + hostId?: string; + instanceId?: string; + type?: OfficeCore.PersonaType | "Unknown" | "Enterprise" | "Contact" | "Bot" | "PhoneOnly" | "OneOff" | "DistributionList" | "PersonalDistributionList" | "Anonymous" | "UnifiedGroup"; + } + /** An interface describing the data returned by calling `personaLifetime.toJSON()`. */ + interface PersonaLifetimeData { + instanceId?: string; + } + /** An interface describing the data returned by calling `lokiTokenProvider.toJSON()`. */ + interface LokiTokenProviderData { + emailOrUpn?: string; + instanceId?: string; + } + /** An interface describing the data returned by calling `licenseFeature.toJSON()`. */ + interface LicenseFeatureData { + id?: string; + } + /** + * + * Represents a roaming setting object. + * + * [Api set: Roaming 1.1] + */ + interface RoamingSettingLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * + * Returns the Id that represents the id of the Roaming Setting. Read-only. + * + * [Api set: Roaming 1.1] + */ + id?: boolean; + /** + * + * Represents the value stored for this setting. + * + * [Api set: Roaming 1.1] + */ + value?: boolean; + } + /** + * [Api set: DynamicRibbon 1.1] + */ + interface RibbonTabLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + id?: boolean; + } + /** + * [Api set: DynamicRibbon 1.1] + */ + interface RibbonButtonLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + enabled?: boolean; + id?: boolean; + label?: boolean; + } + /** + * [Api set: DynamicRibbon 1.1] + */ + interface RibbonButtonCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Enabled + */ + enabled?: boolean; + /** + * For EACH ITEM in the collection: Id + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Label + */ + label?: boolean; + } + /** + * + * Represents a single comment in the document. + * + * [Api set: Comments 1.1] + */ + interface CommentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * + * Gets this comment's parent. If this is a root comment, throws. + * + * [Api set: Comments 1.1] + */ + parent?: OfficeCore.Interfaces.CommentLoadOptions; + /** + * + * Gets this comment's parent. If this is a root comment, returns a null object. + * + * [Api set: Comments 1.1] + */ + parentOrNullObject?: OfficeCore.Interfaces.CommentLoadOptions; + /** + * + * Gets an object representing the comment's author. Read-only. + * + * [Api set: Comments 1.1] + */ + author?: boolean; + /** + * + * Gets when the comment was created. Read-only. + * + * [Api set: Comments 1.1] + */ + created?: boolean; + /** + * + * Returns a value that uniquely identifies the comment in a given document. Read-only. + * + * [Api set: Comments 1.1] + */ + id?: boolean; + /** + * + * Gets the level of the comment: 0 if it is a root comment, or 1 if it is a reply. Read-only. + * + * [Api set: Comments 1.1] + */ + level?: boolean; + /** + * + * Gets the comment's mentions. + * + * [Api set: Comments 1.1] + */ + mentions?: boolean; + /** + * + * Gets or sets whether this comment is resolved. + * + * [Api set: Comments 1.1] + */ + resolved?: boolean; + /** + * + * Gets or sets the comment's plain text, without formatting. + * + * [Api set: Comments 1.1] + */ + text?: boolean; + } + /** + * + * Represents a collection of comments, either replies to a specific comment thread, or all comments in the document or part of the document. + * + * [Api set: Comments 1.1] + */ + interface CommentCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets this comment's parent. If this is a root comment, throws. + * + * [Api set: Comments 1.1] + */ + parent?: OfficeCore.Interfaces.CommentLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets this comment's parent. If this is a root comment, returns a null object. + * + * [Api set: Comments 1.1] + */ + parentOrNullObject?: OfficeCore.Interfaces.CommentLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets an object representing the comment's author. Read-only. + * + * [Api set: Comments 1.1] + */ + author?: boolean; + /** + * + * For EACH ITEM in the collection: Gets when the comment was created. Read-only. + * + * [Api set: Comments 1.1] + */ + created?: boolean; + /** + * + * For EACH ITEM in the collection: Returns a value that uniquely identifies the comment in a given document. Read-only. + * + * [Api set: Comments 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the level of the comment: 0 if it is a root comment, or 1 if it is a reply. Read-only. + * + * [Api set: Comments 1.1] + */ + level?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the comment's mentions. + * + * [Api set: Comments 1.1] + */ + mentions?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets whether this comment is resolved. + * + * [Api set: Comments 1.1] + */ + resolved?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the comment's plain text, without formatting. + * + * [Api set: Comments 1.1] + */ + text?: boolean; + } + /** + * [Api set: People 1.2] + */ + interface MemberInfoListLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + isWarmedUp?: boolean; + isWarmingUp?: boolean; + } + /** + * + * Contains information about the sources for persona data + * + * [Api set: People 1.2] + */ + interface PersonaInfoSourceLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + addresses?: boolean; + birthday?: boolean; + birthdays?: boolean; + companyName?: boolean; + displayName?: boolean; + email?: boolean; + emailAddresses?: boolean; + jobInfoDepartment?: boolean; + linkedCompanyNames?: boolean; + linkedDepartments?: boolean; + linkedOffices?: boolean; + linkedTitles?: boolean; + notes?: boolean; + office?: boolean; + phones?: boolean; + sipAddresses?: boolean; + title?: boolean; + webSites?: boolean; + } + /** + * + * Contains information about the persona + * + * [Api set: People 1.2] + */ + interface PersonaInfoLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + sources?: OfficeCore.Interfaces.PersonaInfoSourceLoadOptions; + birthday?: boolean; + birthdays?: boolean; + companyName?: boolean; + displayName?: boolean; + email?: boolean; + emailAddresses?: boolean; + isPersonResolved?: boolean; + jobInfoDepartment?: boolean; + linkedCompanyNames?: boolean; + linkedDepartments?: boolean; + linkedOffices?: boolean; + linkedTitles?: boolean; + notes?: boolean; + office?: boolean; + sipAddresses?: boolean; + title?: boolean; + webSites?: boolean; + } + /** + * + * Contains information about the persona related to Unified Communications + * + * [Api set: People 1.2] + */ + interface PersonaUnifiedCommunicationInfoLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + availability?: boolean; + availabilityText?: boolean; + availabilityTooltip?: boolean; + calendarState?: boolean; + customStatusString?: boolean; + freeBusyStatus?: boolean; + idleStartTime?: boolean; + isBlocked?: boolean; + isDurationInAvailabilityText?: boolean; + isOnBuddyList?: boolean; + isOutOfOffice?: boolean; + isSelf?: boolean; + isTagged?: boolean; + meetingLocation?: boolean; + meetingSubject?: boolean; + outOfOfficeNote?: boolean; + overallCapability?: boolean; + presence?: boolean; + presenceNote?: boolean; + presenceTooltip?: boolean; + status?: boolean; + timezone?: boolean; + timezoneBias?: boolean; + voiceMailUri?: boolean; + } + /** + * + * Represents a collection of personas + * + * [Api set: People 1.2] + */ + interface PersonaCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Organization + */ + organization?: OfficeCore.Interfaces.PersonaOrganizationInfoLoadOptions; + /** + * For EACH ITEM in the collection: PersonaInfo + */ + personaInfo?: OfficeCore.Interfaces.PersonaInfoLoadOptions; + /** + * For EACH ITEM in the collection: UnifiedCommunicationInfo + */ + unifiedCommunicationInfo?: OfficeCore.Interfaces.PersonaUnifiedCommunicationInfoLoadOptions; + /** + * For EACH ITEM in the collection: UnifiedGroupInfo + */ + unifiedGroupInfo?: OfficeCore.Interfaces.UnifiedGroupInfoLoadOptions; + /** + * For EACH ITEM in the collection: Capabilities + */ + capabilities?: boolean; + /** + * For EACH ITEM in the collection: DiagnosticId + */ + diagnosticId?: boolean; + /** + * For EACH ITEM in the collection: HostId + */ + hostId?: boolean; + /** + * For EACH ITEM in the collection: InstanceId + */ + instanceId?: boolean; + /** + * For EACH ITEM in the collection: Type + */ + type?: boolean; + } + /** + * [Api set: People 1.2] + */ + interface PersonaOrganizationInfoLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + manager?: OfficeCore.Interfaces.PersonaLoadOptions; + isWarmedUp?: boolean; + isWarmingUp?: boolean; + } + /** + * [Api set: People 1.2] + */ + interface UnifiedGroupInfoLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + amIMember?: boolean; + amIOwner?: boolean; + amISubscribed?: boolean; + classification?: boolean; + description?: boolean; + hasGuests?: boolean; + isPublic?: boolean; + memberCount?: boolean; + oneDrive?: boolean; + oneNote?: boolean; + ownerCount?: boolean; + planner?: boolean; + site?: boolean; + subscriptionEnabled?: boolean; + } + /** + * + * Represents the interface for a persona entry + * + * [Api set: People 1.2] + */ + interface PersonaLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + organization?: OfficeCore.Interfaces.PersonaOrganizationInfoLoadOptions; + personaInfo?: OfficeCore.Interfaces.PersonaInfoLoadOptions; + unifiedCommunicationInfo?: OfficeCore.Interfaces.PersonaUnifiedCommunicationInfoLoadOptions; + unifiedGroupInfo?: OfficeCore.Interfaces.UnifiedGroupInfoLoadOptions; + capabilities?: boolean; + diagnosticId?: boolean; + hostId?: boolean; + instanceId?: boolean; + type?: boolean; + } + /** + * [Api set: People 1.2] + */ + interface PersonaLifetimeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + instanceId?: boolean; + } + /** + * [Api set: People 1.2] + */ + interface LokiTokenProviderLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + emailOrUpn?: boolean; + instanceId?: boolean; + } + /** + * [Api set: License 1.1] + */ + interface LicenseFeatureLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + id?: boolean; + } + } +} +declare namespace Office { + // Duplicate Definition + // /** + // * Visibility state of the addin. + // * + // * [Api set: SharedRuntime 1.1] + // */ + // enum VisibilityMode { + // /** + // * Hidden + // */ + // hidden = "Hidden", + // /** + // * Taskpane + // */ + // taskpane = "Taskpane" + // } + // /** + // * Addin startup behavior when document is opened. + // * + // * [Api set: SharedRuntime 1.1] + // */ + // enum StartupBehavior { + // /** + // * Not specified. + // */ + // none = "None", + // /** + // * Load the addin when document is opened. + // */ + // load = "Load" + // } + /** + * Message used in the visibility mode changed event. + * + * [Api set: SharedRuntime 1.1] + */ + interface VisibilityModeChangedMessage { + /** + * Visibility changed state. + */ + visibilityMode: Office.VisibilityMode; + } + + // Duplicate Definition + // /** + // * Function type to turn off the event. + // */ + //// type RemoveEventListener = () => Promise; + + // Duplicate Definition + // /** + // * Represents the background Addin's JavaScript runtime. + // */ + // namespace addin { + // /** + // * Set addin's startup behavior when document is opened next time. + // * + // * [Api set: SharedRuntime 1.1] + // * + // * @param behavior behavior + // * + // */ + // function setStartupBehavior(behavior: StartupBehavior): Promise; + // /** + // * Get addin's startup behavior when document is opened next time. + // * + // * [Api set: SharedRuntime 1.1] + // * + // * @returns Startup behavior + // */ + // function getStartupBehavior(): Promise; + // function _getState(): Promise; + // /** + // * Show taskpane. + // * + // * [Api set: SharedRuntime 1.1] + // */ + // function showAsTaskpane(): Promise; + // /** + // * Hide addin's UI. + // * + // * [Api set: SharedRuntime 1.1] + // */ + // function hide(): Promise; + // /** + // * An event fired when addin's visiblity mode is changed. + // * @param listener The listener function that is called when the event is emitted. This function takes in a message for the receiving component. + // * @returns A promise that resolves when the listener is added. + // * + // * [Api set: SharedRuntime 1.1] + // * + // * @eventproperty + // */ + // function onVisibilityModeChanged(listener: (message: VisibilityModeChangedMessage) => void): Promise<() => Promise>; + // } + +} +declare namespace Office { + /** + * Data structure that contains Ribbon control states to be changed. + * + * @interface RibbonUpdaterData + */ + interface RibbonUpdaterData { + tabs: Tab[]; + } + /** + * Data structure that contains Ribbon tab state to be changed. + * + * @interface Tab + */ + interface Tab { + id: string; + visible?: boolean; + groups?: Group[]; + controls?: Control[]; + } + /** + * Data structure that contains Ribbon group in Tab. + * + * @interface Group + */ + interface Group { + id: string; + controls?: Control[]; + } + /** + * Data structure that contains Ribbon control (button, menut, etc.) state to be changed. + * + * @interface Control + */ + interface Control { + id: string; + enabled?: boolean; + } + // Duplicate Definition + // namespace ribbon { + // /** + // * Send ribbon update request to the host through RichAPI. + // * + // * @export + // * @param {RibbonUpdaterData} input + // * @returns {Promise < void >} + // */ + // function requestUpdate(input: RibbonUpdaterData): Promise; + // /** + // * Send ribbon create request to the host through RichAPI. + // * + // * @export + // * @param {RibbonUpdaterData} input + // * @returns {Promise} + // */ + // function requestCreateControls(input: RibbonUpdaterData): Promise; + // } +} +declare namespace OfficeCore { + 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; + } + } +} +// Duplicate Definition Office already declared +// declare namespace Office { +// // Duplicate Definition actions already declared inside Office namespace +// // namespace actions { +// // let _association: any; +// // } +// } +declare namespace Microsoft { + namespace Office { + namespace WebExtension { + function onReadyInternal(): Promise; + } + } +} +declare namespace Office { + /** + * Object that holds properties used to launch a taskpane, including settings + * and properties to override the default Add-in behavior. + * @remarks + * [Api set: ExtensionLifeCycle 1.1] + */ + interface TaskpaneLaunchOptions { + /** + * Represents the shared runtime ID. It comes from the manifest. + */ + sharedRuntimeId?: string; + + /** + * The source location override. This overrides the default source location. + */ + sourceLocationOverride?: string; + + /** + * The taskpane title. This overrides the default title. + */ + taskpaneTitle?: string; + + /** + * The taskpane width. This overrides the default width. + */ + taskpaneWidth?: number; + + /** + * Represents properties stored in document settings. They are fetched with the + * settings.get() API. + */ + settings?: { + [key: string]: string; + }; + } + + interface ExtensionLifeCycle { + /** + * Launch a new taskpane. + * @param launchOptions Optional properties including settings and properties to + * override default Add-in behavior. + */ + launchTaskpane(launchOptions: Office.TaskpaneLaunchOptions): Promise; + } + + const extensionLifeCycle: ExtensionLifeCycle; +} + + + +//////////////////////////////////////////////////////////////// +//////////////////////// End OfficeCore //////////////////////// +//////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// +/////////////////////// Begin Excel APIs /////////////////////// +//////////////////////////////////////////////////////////////// + +declare var _BeginExcel: string; +declare namespace Excel { + /** + * Represents a 2D array of cell values. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface ArrayCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.array | ReferenceValueType.array | "Array"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#VALUE!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the elements of the array. May not directly contain an `ArrayCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + elements: CellValue[][]; + /** + * Represents the cell values which are referenced within `ArrayCellValue.elements`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + referencedValues?: ReferencedValue[]; + } + /** + * The base64 encoding type and data of an image. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface Base64EncodedImage { + /** + * The file type of the encoded image. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: Base64EncodingType | "JPG" | "PNG"; + /** + * The base64 string encoding. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + data: string; + } + /** + * The file type represented by the base64 encoding. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum Base64EncodingType { + /** + * The JPG file type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + JPG = "JPG", + /** + * The PNG file type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + PNG = "PNG" + } + /** + * Represents a card layout that is best used for an array. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface EntityArrayCardLayout { + /** + * Represents the type of this layout. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + layout: EntityCardLayoutType.array | "Array"; + /** + * Represents name of the property that contains the array shown in the card. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + arrayProperty: string; + /** + * Represents name of the property that contains the array shown in the card. Default value is "Array". + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + displayName?: string; + /** + * Represents the count of rows which the card claims are in the array. A card may report a different number of rows than it actually has to display smaller amounts of preview data. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rowsToReport?: number; + /** + * Represents the count of columns which the card claims are in the array. A card may report a different number of columns than it actually has to display smaller amounts of preview data. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + columnsToReport?: number; + /** + * Represents whether the first row of the array is treated as a header. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + firstRowIsHeader?: boolean; + } + /** + * Represents types of #BLOCKED! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum BlockedErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by a service not supporting a linked data type. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTypeRestrictedDomain = "DataTypeRestrictedDomain", + /** + * An error caused by privacy settings. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTypePrivacySetting = "DataTypePrivacySetting", + /** + * An error caused by an unsupported data type. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTypeUnsupportedApp = "DataTypeUnsupportedApp", + /** + * An error caused by external links. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksGeneric = "ExternalLinksGeneric", + /** + * An error caused by disabled rich data links. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + richDataLinkDisabled = "RichDataLinkDisabled", + /** + * An error caused by sign in failure. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + signInError = "SignInError", + /** + * An error caused by a license verification failure. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + noLicense = "NoLicense" + } + /** + * Represents the value of a cell containing a #BLOCKED! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface BlockedErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#BLOCKED!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.blocked | "Blocked"; + /** + * Represents the type of `BlockedErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: BlockedErrorCellValueSubType | "Unknown" | "DataTypeRestrictedDomain" | "DataTypePrivacySetting" | "DataTypeUnsupportedApp" | "ExternalLinksGeneric" | "RichDataLinkDisabled" | "SignInError" | "NoLicense"; + } + /** + * Represents the value of a cell containing a boolean. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface BooleanCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.boolean | "Boolean"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue: boolean; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.boolean | "Boolean"; + } + /** + * Represents types of #BUSY! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum BusyErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #BUSY! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by external links. Displays as error type #BUSY! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksGeneric = "ExternalLinksGeneric", + /** + * An error that displays while an image is loading. Displays as error type #BUSY! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + loadingImage = "LoadingImage" + } + /** + * Represents the value of a cell containing a #BUSY! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface BusyErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#BUSY!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.busy | "Busy"; + /** + * Represents the type of `BusyErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: BusyErrorCellValueSubType | "Unknown" | "ExternalLinksGeneric" | "LoadingImage"; + } + /** + * Represents types of #CALC! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum CalcErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by including an array in an array. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + arrayOfArrays = "ArrayOfArrays", + /** + * An error caused by including a range in an array. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + arrayOfRanges = "ArrayOfRanges", + /** + * An error caused by an empty array. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emptyArray = "EmptyArray", + /** + * An error caused by attempting to lift an unsupported formula (such as a Dynamic UDF) over an array. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unsupportedLifting = "UnsupportedLifting", + /** + * An error caused by a data table referencing a pending formula. The pending formula is likely asynchronous. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTableReferencedPendingFormula = "DataTableReferencedPendingFormula", + /** + * An error caused by a function referencing too many cells. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tooManyCells = "TooManyCells", + /** + * An error caused by a cell's formula evaluating to a lambda value. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lambdaInCell = "LambdaInCell", + /** + * An error caused by a `CellValue` object that is too deeply nested within another `CellValue`. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tooDeeplyNested = "TooDeeplyNested", + /** + * An error caused by a cell's formula returning a string that exceeds the maximum of 32767 characters. Displays as error type #CALC! in Excel. + * Some characters, like emoji, may appear to be one character in the Excel UI but are actually processed as surrogate characters. A surrogate character counts as multiple characters toward the maximum character limit. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + textOverflow = "TextOverflow" + } + /** + * Represents the value of a cell containing a #CALC! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CalcErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#CALC!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.calc | "Calc"; + /** + * Represents the type of `CalcErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: CalcErrorCellValueSubType | "Unknown" | "ArrayOfArrays" | "ArrayOfRanges" | "EmptyArray" | "UnsupportedLifting" | "DataTableReferencedPendingFormula" | "TooManyCells" | "LambdaInCell" | "TooDeeplyNested" | "TextOverflow"; + /** + * Represents the name of the function causing the error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + functionName?: string; + } + /** + * Represents a reference to a property used by the card layout. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CardLayoutPropertyReference { + /** + * Represents the name of the property referenced by the card layout. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + property: string; + } + /** + * Properties of a card layout relevant to most card layouts. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CardLayoutSectionStandardProperties { + /** + * Represents the title of this section of the card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + title?: string; + /** + * Represents whether this section of the card is collapsible. + * If the card section has a title, the default value is `true`. + * If the card section doesn't have a title, the default value is `false`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + collapsible?: boolean; + /** + * Represents whether this section of the card is initially collapsed. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + collapsed?: boolean; + /** + * Represents the names of the properties in this section. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + properties: string[]; + } + /** + * Represents a section of a card that is arranged as a list in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CardLayoutListSection extends CardLayoutSectionStandardProperties { + /** + * Represents the type of layout for this section. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + layout: "List"; + } + /** + * Represents a section of a card that is arranged as a table in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CardLayoutTableSection extends CardLayoutSectionStandardProperties { + /** + * Represents the type of layout for this section. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + layout: "Table"; + } + /** + * Represents the layout of a section of a card in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type CardLayoutSection = CardLayoutListSection | CardLayoutTableSection; + /** + * Properties of a card layout relevant to most card layouts. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CardLayoutStandardProperties { + /** + * Specifies a property which will be used as the main image of the card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mainImage?: CardLayoutPropertyReference; + /** + * Represents the title of the card or the specification of which property contains the title of the card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + title?: string | CardLayoutPropertyReference; + /** + * Represents a specification of which property contains the subtitle of the card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + subTitle?: CardLayoutPropertyReference; + /** + * Represents the sections of the card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sections?: CardLayoutSection[]; + } + /** + * Represents the layout of a card in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type CardLayout = EntityCardLayout | EntityArrayCardLayout; + /** + * Types of entity card layouts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum EntityCardLayoutType { + /** + * Entity layout of the entity card. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + entity = "Entity", + /** + * Array layout of the entity card. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + array = "Array" + } + /** + * The compact layout properties for an entity. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface EntityCompactLayout { + /** + * Specifies the name of the icon which is used to open the card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + icon?: string | EntityCompactLayoutIcons; + } + /** + * Represents the layout used when there is limited space to represent the entity. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type CompactLayout = EntityCompactLayout; + /** + * The list of icons available for `EntityCompactLayout`. An icon displays in the Excel UI, either to the left of the title in a cell that contains an entity card, or to the left of the title of a referenced entity inside an entity card. Selecting the icon opens the entity card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum EntityCompactLayoutIcons { + /** + * The default icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + generic = "Generic", + /** + * Accessibility icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + accessibility = "Accessibility", + /** + * Airplane icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + airplane = "Airplane", + /** + * Airplane taking off icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + airplaneTakeOff = "AirplaneTakeOff", + /** + * Album icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + album = "Album", + /** + * Alert icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + alert = "Alert", + /** + * Alert urgent icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + alertUrgent = "AlertUrgent", + /** + * Animal icon. Displays as a pawprint. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + animal = "Animal", + /** + * Animal cat icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + animalCat = "AnimalCat", + /** + * Animal dog icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + animalDog = "AnimalDog", + /** + * Animal rabbit icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + animalRabbit = "AnimalRabbit", + /** + * Animal turtle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + animalTurtle = "AnimalTurtle", + /** + * App folder icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + appFolder = "AppFolder", + /** + * App generic icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + appGeneric = "AppGeneric", + /** + * Apple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + apple = "Apple", + /** + * Approvals app icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + approvalsApp = "ApprovalsApp", + /** + * Archive icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + archive = "Archive", + /** + * Archive multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + archiveMultiple = "ArchiveMultiple", + /** + * Arrow trending lines icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + arrowTrendingLines = "ArrowTrendingLines", + /** + * Art icon. Displays as a paint palette. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + art = "Art", + /** + * Atom icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + atom = "Atom", + /** + * Attach icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + attach = "Attach", + /** + * Automobile icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + automobile = "Automobile", + /** + * Autosum icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + autosum = "Autosum", + /** + * Backpack icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + backpack = "Backpack", + /** + * Badge icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + badge = "Badge", + /** + * Balloon icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + balloon = "Balloon", + /** + * Bank icon. Displays as a building with pillars and a triangular roof. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bank = "Bank", + /** + * Barcode scanner icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + barcodeScanner = "BarcodeScanner", + /** + * Basketball icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basketball = "Basketball", + /** + * Battery empty icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + battery0 = "Battery0", + /** + * Battery full icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + battery10 = "Battery10", + /** + * Beach icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + beach = "Beach", + /** + * Beaker icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + beaker = "Beaker", + /** + * Bed icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bed = "Bed", + /** + * Bin full icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + binFull = "BinFull", + /** + * Bird icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bird = "Bird", + /** + * Bluetooth icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bluetooth = "Bluetooth", + /** + * Board icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + board = "Board", + /** + * Board games icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + boardGames = "BoardGames", + /** + * Book icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + book = "Book", + /** + * Bookmark icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bookmark = "Bookmark", + /** + * Bookmark multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bookmarkMultiple = "BookmarkMultiple", + /** + * Bot icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bot = "Bot", + /** + * Bowl chopsticks icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bowlChopsticks = "BowlChopsticks", + /** + * Box icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + box = "Box", + /** + * Box multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + boxMultiple = "BoxMultiple", + /** + * Brain circuit icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + brainCircuit = "BrainCircuit", + /** + * Branch icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + branch = "Branch", + /** + * Branch fork icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + branchFork = "BranchFork", + /** + * Branch request icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + branchRequest = "BranchRequest", + /** + * Bridge icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bridge = "Bridge", + /** + * Briefcase icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + briefcase = "Briefcase", + /** + * Briefcase medical icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + briefcaseMedical = "BriefcaseMedical", + /** + * Broad activity feed icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + broadActivityFeed = "BroadActivityFeed", + /** + * Broom icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + broom = "Broom", + /** + * Bug icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bug = "Bug", + /** + * Building icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + building = "Building", + /** + * Building bank icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingBank = "BuildingBank", + /** + * Building factory icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingFactory = "BuildingFactory", + /** + * Building government icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingGovernment = "BuildingGovernment", + /** + * Building home icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingHome = "BuildingHome", + /** + * Building lighthouse icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingLighthouse = "BuildingLighthouse", + /** + * Building multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingMultiple = "BuildingMultiple", + /** + * Building retail icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingRetail = "BuildingRetail", + /** + * Building retail more icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingRetailMore = "BuildingRetailMore", + /** + * Building retail toolbox icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingRetailToolbox = "BuildingRetailToolbox", + /** + * Building shop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingShop = "BuildingShop", + /** + * Building skyscraper icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingSkyscraper = "BuildingSkyscraper", + /** + * Calculator icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + calculator = "Calculator", + /** + * Calendar left to right icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + calendarLtr = "CalendarLtr", + /** + * Calendar right to left icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + calendarRtl = "CalendarRtl", + /** + * Call icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + call = "Call", + /** + * Calligraphy pen icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + calligraphyPen = "CalligraphyPen", + /** + * Camera icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + camera = "Camera", + /** + * Camera dome icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cameraDome = "CameraDome", + /** + * Car icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + car = "Car", + /** + * Cart icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cart = "Cart", + /** + * Cat icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cat = "Cat", + /** + * Certificate icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + certificate = "Certificate", + /** + * Chart multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + chartMultiple = "ChartMultiple", + /** + * Chat icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + chat = "Chat", + /** + * Chat multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + chatMultiple = "ChatMultiple", + /** + * Chat video icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + chatVideo = "ChatVideo", + /** + * Check icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + check = "Check", + /** + * Checkbox checked icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + checkboxChecked = "CheckboxChecked", + /** + * Checkbox unchecked icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + checkboxUnchecked = "CheckboxUnchecked", + /** + * Checkmark icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + checkmark = "Checkmark", + /** + * Chess icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + chess = "Chess", + /** + * City icon. Displays as multiple tall buildings. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + city = "City", + /** + * Class icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + class = "Class", + /** + * Classification icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + classification = "Classification", + /** + * Clipboard icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + clipboard = "Clipboard", + /** + * Clipboard data bar icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + clipboardDataBar = "ClipboardDataBar", + /** + * Clipboard pulse icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + clipboardPulse = "ClipboardPulse", + /** + * Clipboard task icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + clipboardTask = "ClipboardTask", + /** + * Clock icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + clock = "Clock", + /** + * Clock alarm icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + clockAlarm = "ClockAlarm", + /** + * Cloud icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cloud = "Cloud", + /** + * Cloud words icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cloudWords = "CloudWords", + /** + * Code icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + code = "Code", + /** + * Collections icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + collections = "Collections", + /** + * Comment icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + comment = "Comment", + /** + * Comment multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + commentMultiple = "CommentMultiple", + /** + * Communication icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + communication = "Communication", + /** + * Compass northwest icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + compassNorthwest = "CompassNorthwest", + /** + * Conference room icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + conferenceRoom = "ConferenceRoom", + /** + * Connector icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + connector = "Connector", + /** + * Constellation icon. Displays dots in the shape of the Big Dipper, with a bowl and a handle. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + constellation = "Constellation", + /** + * Contact card icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + contactCard = "ContactCard", + /** + * Cookies icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cookies = "Cookies", + /** + * Couch icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + couch = "Couch", + /** + * Credit card person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + creditCardPerson = "CreditCardPerson", + /** + * Credit card toolbox icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + creditCardToolbox = "CreditCardToolbox", + /** + * Cube icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cube = "Cube", + /** + * Cube multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cubeMultiple = "CubeMultiple", + /** + * Cube tree icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cubeTree = "CubeTree", + /** + * Currency dollar euro icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + currencyDollarEuro = "CurrencyDollarEuro", + /** + * Currency dollar rupee icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + currencyDollarRupee = "CurrencyDollarRupee", + /** + * Data area icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataArea = "DataArea", + /** + * Database icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + database = "Database", + /** + * Database multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + databaseMultiple = "DatabaseMultiple", + /** + * Data funnel icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataFunnel = "DataFunnel", + /** + * Data histogram icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataHistogram = "DataHistogram", + /** + * Data line icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataLine = "DataLine", + /** + * Data pie icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataPie = "DataPie", + /** + * Data scatter icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataScatter = "DataScatter", + /** + * Data sunburst icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataSunburst = "DataSunburst", + /** + * Data treemap icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTreemap = "DataTreemap", + /** + * Data waterfall icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataWaterfall = "DataWaterfall", + /** + * Data whisker icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataWhisker = "DataWhisker", + /** + * Dentist icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dentist = "Dentist", + /** + * Design ideas icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + designIdeas = "DesignIdeas", + /** + * Desktop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + desktop = "Desktop", + /** + * Desktop Mac icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + desktopMac = "DesktopMac", + /** + * Developer board icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + developerBoard = "DeveloperBoard", + /** + * Device meeting room icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + deviceMeetingRoom = "DeviceMeetingRoom", + /** + * Diagram icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + diagram = "Diagram", + /** + * Dialpad icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dialpad = "Dialpad", + /** + * Diamond icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + diamond = "Diamond", + /** + * Dinosaur icon. Displays as a long-necked dinosaur, similar to a Brachiosaurus. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dinosaur = "Dinosaur", + /** + * Directions icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + directions = "Directions", + /** + * Disaster icon. Displays as a house sinking in a flood. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + disaster = "Disaster", + /** + * Diversity icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + diversity = "Diversity", + /** + * DNA icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dNA = "DNA", + /** + * Doctor icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + doctor = "Doctor", + /** + * Document icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + document = "Document", + /** + * Document data icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + documentData = "DocumentData", + /** + * Document landscape icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + documentLandscape = "DocumentLandscape", + /** + * Document multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + documentMultiple = "DocumentMultiple", + /** + * Document PDF icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + documentPdf = "DocumentPdf", + /** + * Document queue icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + documentQueue = "DocumentQueue", + /** + * Document text icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + documentText = "DocumentText", + /** + * Dog icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dog = "Dog", + /** + * Door icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + door = "Door", + /** + * Door tag icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + doorTag = "DoorTag", + /** + * Drafts icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drafts = "Drafts", + /** + * Drama icon. Displays as a pair of theatre masks. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drama = "Drama", + /** + * Drink beer icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drinkBeer = "DrinkBeer", + /** + * Drink coffee icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drinkCoffee = "DrinkCoffee", + /** + * Drink margarita icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drinkMargarita = "DrinkMargarita", + /** + * Drink to go icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drinkToGo = "DrinkToGo", + /** + * Drink wine icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drinkWine = "DrinkWine", + /** + * Drive train icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + driveTrain = "DriveTrain", + /** + * Drop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drop = "Drop", + /** + * Dual screen icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dualScreen = "DualScreen", + /** + * Dumbbell icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dumbbell = "Dumbbell", + /** + * Earth icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + earth = "Earth", + /** + * Emoji icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emoji = "Emoji", + /** + * Emoji angry icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiAngry = "EmojiAngry", + /** + * Emoji hand icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiHand = "EmojiHand", + /** + * Emoji laugh icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiLaugh = "EmojiLaugh", + /** + * Emoji meh icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiMeh = "EmojiMeh", + /** + * Emoji multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiMultiple = "EmojiMultiple", + /** + * Emoji sad icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiSad = "EmojiSad", + /** + * Emoji sad slight icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiSadSlight = "EmojiSadSlight", + /** + * Emoji smile slight icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiSmileSlight = "EmojiSmileSlight", + /** + * Emoji sparkle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiSparkle = "EmojiSparkle", + /** + * Emoji surprise icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiSurprise = "EmojiSurprise", + /** + * Engine icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + engine = "Engine", + /** + * Eraser icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + eraser = "Eraser", + /** + * Eye icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + eye = "Eye", + /** + * Eyedropper icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + eyedropper = "Eyedropper", + /** + * Fax icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + fax = "Fax", + /** + * Fingerprint icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + fingerprint = "Fingerprint", + /** + * First aid icon. Displays as a briefcase with a medical cross symbol. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + firstAid = "FirstAid", + /** + * Flag icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + flag = "Flag", + /** + * Flash icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + flash = "Flash", + /** + * Flashlight icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + flashlight = "Flashlight", + /** + * Flow icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + flow = "Flow", + /** + * Flowchart icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + flowchart = "Flowchart", + /** + * Folder icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + folder = "Folder", + /** + * Folder open icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + folderOpen = "FolderOpen", + /** + * Folder open vertical icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + folderOpenVertical = "FolderOpenVertical", + /** + * Folder person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + folderPerson = "FolderPerson", + /** + * Folder zip icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + folderZip = "FolderZip", + /** + * Food icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + food = "Food", + /** + * Food apple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + foodApple = "FoodApple", + /** + * Food cake icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + foodCake = "FoodCake", + /** + * Food egg icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + foodEgg = "FoodEgg", + /** + * Food grains icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + foodGrains = "FoodGrains", + /** + * Food pizza icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + foodPizza = "FoodPizza", + /** + * Food toast icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + foodToast = "FoodToast", + /** + * Galaxy icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + galaxy = "Galaxy", + /** + * Games icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + games = "Games", + /** + * Gantt chart icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ganttChart = "GanttChart", + /** + * Gas icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gas = "Gas", + /** + * Gas pump icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gasPump = "GasPump", + /** + * Gauge icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gauge = "Gauge", + /** + * Gavel icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gavel = "Gavel", + /** + * Gift icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gift = "Gift", + /** + * Gift card icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + giftCard = "GiftCard", + /** + * Glasses icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + glasses = "Glasses", + /** + * Globe icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + globe = "Globe", + /** + * Globe surface icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + globeSurface = "GlobeSurface", + /** + * Grid icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + grid = "Grid", + /** + * Grid dots icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gridDots = "GridDots", + /** + * Grid Kanban icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gridKanban = "GridKanban", + /** + * Guardian icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + guardian = "Guardian", + /** + * Guest icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + guest = "Guest", + /** + * Guitar icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + guitar = "Guitar", + /** + * Hand left icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + handLeft = "HandLeft", + /** + * Hand right icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + handRight = "HandRight", + /** + * Handshake icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + handshake = "Handshake", + /** + * Hard drive icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + hardDrive = "HardDrive", + /** + * Graduation hat icon. Displays as a hat with a tassel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + hatGraduation = "HatGraduation", + /** + * Headphones icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + headphones = "Headphones", + /** + * Headphones sound wave icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + headphonesSoundWave = "HeadphonesSoundWave", + /** + * Headset icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + headset = "Headset", + /** + * Headset VR icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + headsetVr = "HeadsetVr", + /** + * Heart icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + heart = "Heart", + /** + * Heart broken icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + heartBroken = "HeartBroken", + /** + * Heart circle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + heartCircle = "HeartCircle", + /** + * Human heart icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + heartHuman = "HeartHuman", + /** + * Heart pulse icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + heartPulse = "HeartPulse", + /** + * History icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + history = "History", + /** + * Home icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + home = "Home", + /** + * Home more icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + homeMore = "HomeMore", + /** + * Home person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + homePerson = "HomePerson", + /** + * Icons icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + icons = "Icons", + /** + * Image icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + image = "Image", + /** + * Image globe icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + imageGlobe = "ImageGlobe", + /** + * Image multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + imageMultiple = "ImageMultiple", + /** + * IoT icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + iot = "Iot", + /** + * Joystick icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + joystick = "Joystick", + /** + * Justice icon. Displays as the scales of justice. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + justice = "Justice", + /** + * Key icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + key = "Key", + /** + * Keyboard icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + keyboard = "Keyboard", + /** + * Keyboard layout split icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + keyboardLayoutSplit = "KeyboardLayoutSplit", + /** + * Key multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + keyMultiple = "KeyMultiple", + /** + * Languages icon. Displays as a document and a globe. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + languages = "Languages", + /** + * Laptop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + laptop = "Laptop", + /** + * Lasso icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lasso = "Lasso", + /** + * Launcher settings icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + launcherSettings = "LauncherSettings", + /** + * Layer icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + layer = "Layer", + /** + * Leaf icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + leaf = "Leaf", + /** + * Leaf one icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + leafOne = "LeafOne", + /** + * Leaf three icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + leafThree = "LeafThree", + /** + * Leaf two icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + leafTwo = "LeafTwo", + /** + * Library icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + library = "Library", + /** + * Lightbulb icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lightbulb = "Lightbulb", + /** + * Lightbulb filament icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lightbulbFilament = "LightbulbFilament", + /** + * Likert icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + likert = "Likert", + /** + * Link icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + link = "Link", + /** + * Local language icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + localLanguage = "LocalLanguage", + /** + * Location icon. Displays as a map marker. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + location = "Location", + /** + * Lock closed icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lockClosed = "LockClosed", + /** + * Lock multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lockMultiple = "LockMultiple", + /** + * Lock open icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lockOpen = "LockOpen", + /** + * Lottery icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lottery = "Lottery", + /** + * Luggage icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + luggage = "Luggage", + /** + * Mail icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mail = "Mail", + /** + * Mail inbox icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mailInbox = "MailInbox", + /** + * Mail multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mailMultiple = "MailMultiple", + /** + * Map icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + map = "Map", + /** + * Map pin icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mapPin = "MapPin", + /** + * Markdown icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + markdown = "Markdown", + /** + * Math formula icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mathFormula = "MathFormula", + /** + * Math symbols icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mathSymbols = "MathSymbols", + /** + * Max icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + max = "Max", + /** + * Megaphone icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + megaphone = "Megaphone", + /** + * Megaphone loud icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + megaphoneLoud = "MegaphoneLoud", + /** + * Mention icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mention = "Mention", + /** + * Mic icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mic = "Mic", + /** + * Microscope icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + microscope = "Microscope", + /** + * Midi icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + midi = "Midi", + /** + * Molecule icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + molecule = "Molecule", + /** + * Money icon. Displays as paper money and coins. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + money = "Money", + /** + * Money hand icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + moneyHand = "MoneyHand", + /** + * Mountain icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mountain = "Mountain", + /** + * Movie camera icon. Displays as a video camera. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + movieCamera = "MovieCamera", + /** + * Movies and TV icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + moviesAndTv = "MoviesAndTv", + /** + * Music note icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + musicNote = "MusicNote", + /** + * Music note icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + musicNote1 = "MusicNote1", + /** + * Music double note icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + musicNote2 = "MusicNote2", + /** + * My location icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + myLocation = "MyLocation", + /** + * N by N icon. Displays as a three by three grid. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + nByN = "NByN", + /** + * N by one icon. Displays as a three by one grid. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + nByOne = "NByOne", + /** + * News icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + news = "News", + /** + * Notable people icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + notablePeople = "NotablePeople", + /** + * Note icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + note = "Note", + /** + * Notebook icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + notebook = "Notebook", + /** + * Notepad icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + notepad = "Notepad", + /** + * Notepad person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + notepadPerson = "NotepadPerson", + /** + * One by N icon. Displays as a one by three grid. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + oneByN = "OneByN", + /** + * One by one icon. Displays as a one by one grid. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + oneByOne = "OneByOne", + /** + * Options icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + options = "Options", + /** + * Organization icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + organization = "Organization", + /** + * Organization horizontal icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + organizationHorizontal = "OrganizationHorizontal", + /** + * Oval icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + oval = "Oval", + /** + * Paint brush icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + paintBrush = "PaintBrush", + /** + * Paint bucket icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + paintBucket = "PaintBucket", + /** + * Partly sunny weather icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + partlySunnyWeather = "PartlySunnyWeather", + /** + * Password icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + password = "Password", + /** + * Patch icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + patch = "Patch", + /** + * Patient icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + patient = "Patient", + /** + * Payment icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + payment = "Payment", + /** + * Pen icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pen = "Pen", + /** + * Pentagon icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pentagon = "Pentagon", + /** + * People icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + people = "People", + /** + * People audience icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleAudience = "PeopleAudience", + /** + * People call icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleCall = "PeopleCall", + /** + * People community icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleCommunity = "PeopleCommunity", + /** + * People money icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleMoney = "PeopleMoney", + /** + * People queue icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleQueue = "PeopleQueue", + /** + * People team icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleTeam = "PeopleTeam", + /** + * People toolbox icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleToolbox = "PeopleToolbox", + /** + * Person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + person = "Person", + /** + * Person board icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + personBoard = "PersonBoard", + /** + * Person call icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + personCall = "PersonCall", + /** + * Person chat icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + personChat = "PersonChat", + /** + * Person feedback icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + personFeedback = "PersonFeedback", + /** + * Person support icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + personSupport = "PersonSupport", + /** + * Person voice icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + personVoice = "PersonVoice", + /** + * Phone icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + phone = "Phone", + /** + * Phone desktop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + phoneDesktop = "PhoneDesktop", + /** + * Phone laptop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + phoneLaptop = "PhoneLaptop", + /** + * Phone shake icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + phoneShake = "PhoneShake", + /** + * Phone tablet icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + phoneTablet = "PhoneTablet", + /** + * Phone vibrate icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + phoneVibrate = "PhoneVibrate", + /** + * Photo filter icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + photoFilter = "PhotoFilter", + /** + * Pi icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pi = "Pi", + /** + * Picture in picture icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pictureInPicture = "PictureInPicture", + /** + * Pilates icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pilates = "Pilates", + /** + * Pill icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pill = "Pill", + /** + * Pin icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pin = "Pin", + /** + * Pipeline icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pipeline = "Pipeline", + /** + * Planet icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + planet = "Planet", + /** + * Playing cards icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + playingCards = "PlayingCards", + /** + * Plug connected icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + plugConnected = "PlugConnected", + /** + * Plug disconnected icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + plugDisconnected = "PlugDisconnected", + /** + * Point scan icon. Displays as a target focus symbol. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pointScan = "PointScan", + /** + * Poll icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + poll = "Poll", + /** + * Power icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + power = "Power", + /** + * Predictions icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + predictions = "Predictions", + /** + * Premium icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + premium = "Premium", + /** + * Presenter icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + presenter = "Presenter", + /** + * Preview link icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + previewLink = "PreviewLink", + /** + * Print icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + print = "Print", + /** + * Production icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + production = "Production", + /** + * Prohibited icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + prohibited = "Prohibited", + /** + * Projection screen icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + projectionScreen = "ProjectionScreen", + /** + * Protocol handler icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + protocolHandler = "ProtocolHandler", + /** + * Pulse icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pulse = "Pulse", + /** + * Pulse square icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pulseSquare = "PulseSquare", + /** + * Puzzle piece icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + puzzlePiece = "PuzzlePiece", + /** + * QR code icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + qrCode = "QrCode", + /** + * Radar icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + radar = "Radar", + /** + * Ram icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ram = "Ram", + /** + * Reading list icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + readingList = "ReadingList", + /** + * Real estate icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + realEstate = "RealEstate", + /** + * Receipt icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + receipt = "Receipt", + /** + * Reward icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + reward = "Reward", + /** + * Rhombus icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + rhombus = "Rhombus", + /** + * Ribbon icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ribbon = "Ribbon", + /** + * Ribbon star icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ribbonStar = "RibbonStar", + /** + * Road cone icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + roadCone = "RoadCone", + /** + * Rocket icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + rocket = "Rocket", + /** + * Router icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + router = "Router", + /** + * RSS icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + rss = "Rss", + /** + * Ruler icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ruler = "Ruler", + /** + * Run icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + run = "Run", + /** + * Running icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + running = "Running", + /** + * Satellite icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + satellite = "Satellite", + /** + * Save icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + save = "Save", + /** + * Savings icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + savings = "Savings", + /** + * Scales icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + scales = "Scales", + /** + * Scan icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + scan = "Scan", + /** + * Scratchpad icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + scratchpad = "Scratchpad", + /** + * Screen person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + screenPerson = "ScreenPerson", + /** + * Screenshot icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + screenshot = "Screenshot", + /** + * Search icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + search = "Search", + /** + * Serial port icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + serialPort = "SerialPort", + /** + * Server icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + server = "Server", + /** + * Server multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + serverMultiple = "ServerMultiple", + /** + * Service bell icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + serviceBell = "ServiceBell", + /** + * Settings icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + settings = "Settings", + /** + * Shapes icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + shapes = "Shapes", + /** + * Shield icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + shield = "Shield", + /** + * Shield task icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + shieldTask = "ShieldTask", + /** + * Shopping bag icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + shoppingBag = "ShoppingBag", + /** + * Signature icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + signature = "Signature", + /** + * Sim icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sim = "Sim", + /** + * Sleep icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sleep = "Sleep", + /** + * Smartwatch icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + smartwatch = "Smartwatch", + /** + * Sound source icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + soundSource = "SoundSource", + /** + * Sound wave circle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + soundWaveCircle = "SoundWaveCircle", + /** + * Sparkle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sparkle = "Sparkle", + /** + * Speaker icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + speaker0 = "Speaker0", + /** + * Speaker with sound wave icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + speaker2 = "Speaker2", + /** + * Sport icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sport = "Sport", + /** + * Sport american football icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sportAmericanFootball = "SportAmericanFootball", + /** + * Sport baseball icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sportBaseball = "SportBaseball", + /** + * Sport basketball icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sportBasketball = "SportBasketball", + /** + * Sport hockey icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sportHockey = "SportHockey", + /** + * Sport soccer icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sportSoccer = "SportSoccer", + /** + * Square multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + squareMultiple = "SquareMultiple", + /** + * Square shadow icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + squareShadow = "SquareShadow", + /** + * Squares nested icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + squaresNested = "SquaresNested", + /** + * Stack icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stack = "Stack", + /** + * Stack star icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stackStar = "StackStar", + /** + * Star icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + star = "Star", + /** + * Star filled icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + starFilled = "StarFilled", + /** + * Star half icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + starHalf = "StarHalf", + /** + * Star with 3 horizontal lines icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + starLineHorizontal3 = "StarLineHorizontal3", + /** + * Star one quarter icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + starOneQuarter = "StarOneQuarter", + /** + * Star three quarter icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + starThreeQuarter = "StarThreeQuarter", + /** + * Status icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + status = "Status", + /** + * Steps icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + steps = "Steps", + /** + * Stethoscope icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stethoscope = "Stethoscope", + /** + * Sticker icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sticker = "Sticker", + /** + * Storage icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + storage = "Storage", + /** + * Stream icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stream = "Stream", + /** + * Stream input icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + streamInput = "StreamInput", + /** + * Stream input output icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + streamInputOutput = "StreamInputOutput", + /** + * Stream output icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + streamOutput = "StreamOutput", + /** + * Style guide icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + styleGuide = "StyleGuide", + /** + * Sub grid icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + subGrid = "SubGrid", + /** + * Subtitles icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + subtitles = "Subtitles", + /** + * Surface earbuds icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + surfaceEarbuds = "SurfaceEarbuds", + /** + * Surface hub icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + surfaceHub = "SurfaceHub", + /** + * Symbols icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + symbols = "Symbols", + /** + * Syringe icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + syringe = "Syringe", + /** + * System icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + system = "System", + /** + * Tab desktop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tabDesktop = "TabDesktop", + /** + * Tab InPrivate account icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tabInprivateAccount = "TabInprivateAccount", + /** + * Table icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + table = "Table", + /** + * Table image icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tableImage = "TableImage", + /** + * Table multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tableMultiple = "TableMultiple", + /** + * Tablet icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tablet = "Tablet", + /** + * Tabs icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tabs = "Tabs", + /** + * Tag icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tag = "Tag", + /** + * Tag circle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tagCircle = "TagCircle", + /** + * Tag multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tagMultiple = "TagMultiple", + /** + * Target icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + target = "Target", + /** + * Target arrow icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + targetArrow = "TargetArrow", + /** + * Teddy icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + teddy = "Teddy", + /** + * Temperature icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + temperature = "Temperature", + /** + * Tent icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tent = "Tent", + /** + * Tetris app icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tetrisApp = "TetrisApp", + /** + * Textbox icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + textbox = "Textbox", + /** + * Text quote icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + textQuote = "TextQuote", + /** + * Thinking icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + thinking = "Thinking", + /** + * Thumb dislike icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + thumbDislike = "ThumbDislike", + /** + * Thumb like icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + thumbLike = "ThumbLike", + /** + * Ticket diagonal icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ticketDiagonal = "TicketDiagonal", + /** + * Ticket horizontal icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ticketHorizontal = "TicketHorizontal", + /** + * Time and weather icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + timeAndWeather = "TimeAndWeather", + /** + * Timeline icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + timeline = "Timeline", + /** + * Timer icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + timer = "Timer", + /** + * Toolbox icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + toolbox = "Toolbox", + /** + * Top speed icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + topSpeed = "TopSpeed", + /** + * Translate icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + translate = "Translate", + /** + * Transmission icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + transmission = "Transmission", + /** + * Tree deciduous icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + treeDeciduous = "TreeDeciduous", + /** + * Tree evergreen icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + treeEvergreen = "TreeEvergreen", + /** + * Trophy icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + trophy = "Trophy", + /** + * TV icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tv = "Tv", + /** + * TV USB icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tvUsb = "TvUsb", + /** + * Umbrella icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + umbrella = "Umbrella", + /** + * USB plug icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + usbPlug = "UsbPlug", + /** + * USB stick icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + usbStick = "UsbStick", + /** + * Vault icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vault = "Vault", + /** + * Vehicle bicycle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleBicycle = "VehicleBicycle", + /** + * Vehicle bus icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleBus = "VehicleBus", + /** + * Vehicle cab icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleCab = "VehicleCab", + /** + * Vehicle car icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleCar = "VehicleCar", + /** + * Vehicle car collision icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleCarCollision = "VehicleCarCollision", + /** + * Vehicle car profile left-to-right icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleCarProfileLtr = "VehicleCarProfileLtr", + /** + * Vehicle car profile right-to-left icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleCarProfileRtl = "VehicleCarProfileRtl", + /** + * Vehicle ship icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleShip = "VehicleShip", + /** + * Vehicle subway icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleSubway = "VehicleSubway", + /** + * Vehicle truck icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleTruck = "VehicleTruck", + /** + * Vehicle truck bag icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleTruckBag = "VehicleTruckBag", + /** + * Vehicle truck cube icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleTruckCube = "VehicleTruckCube", + /** + * Vehicle truck profile icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleTruckProfile = "VehicleTruckProfile", + /** + * Video icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + video = "Video", + /** + * Video 360 icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + video360 = "Video360", + /** + * Video chat icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + videoChat = "VideoChat", + /** + * Video clip icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + videoClip = "VideoClip", + /** + * Video clip multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + videoClipMultiple = "VideoClipMultiple", + /** + * Video person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + videoPerson = "VideoPerson", + /** + * Video recording icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + videoRecording = "VideoRecording", + /** + * Video security icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + videoSecurity = "VideoSecurity", + /** + * View desktop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + viewDesktop = "ViewDesktop", + /** + * View desktop mobile icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + viewDesktopMobile = "ViewDesktopMobile", + /** + * Violin icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + violin = "Violin", + /** + * Virtual network icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + virtualNetwork = "VirtualNetwork", + /** + * Voicemail icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + voicemail = "Voicemail", + /** + * Vote icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vote = "Vote", + /** + * Walkie talkie icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + walkieTalkie = "WalkieTalkie", + /** + * Wallet icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wallet = "Wallet", + /** + * Wallet credit card icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + walletCreditCard = "WalletCreditCard", + /** + * Wallpaper icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wallpaper = "Wallpaper", + /** + * Wand icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wand = "Wand", + /** + * Warning icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + warning = "Warning", + /** + * Weather blowing snow icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherBlowingSnow = "WeatherBlowingSnow", + /** + * Weather cloudy icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherCloudy = "WeatherCloudy", + /** + * Weather drizzle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherDrizzle = "WeatherDrizzle", + /** + * Weather duststorm icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherDuststorm = "WeatherDuststorm", + /** + * Weather fog icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherFog = "WeatherFog", + /** + * Weather hail day icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherHailDay = "WeatherHailDay", + /** + * Weather hail night icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherHailNight = "WeatherHailNight", + /** + * Weather haze icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherHaze = "WeatherHaze", + /** + * Weather moon icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherMoon = "WeatherMoon", + /** + * Weather partly cloudy day icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherPartlyCloudyDay = "WeatherPartlyCloudyDay", + /** + * Weather partly cloudy night icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherPartlyCloudyNight = "WeatherPartlyCloudyNight", + /** + * Weather rain icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherRain = "WeatherRain", + /** + * Weather rain showers day icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherRainShowersDay = "WeatherRainShowersDay", + /** + * Weather rain showers night icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherRainShowersNight = "WeatherRainShowersNight", + /** + * Weather rain snow icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherRainSnow = "WeatherRainSnow", + /** + * Weather snow icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSnow = "WeatherSnow", + /** + * Weather snowflake icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSnowflake = "WeatherSnowflake", + /** + * Weather snow shower day icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSnowShowerDay = "WeatherSnowShowerDay", + /** + * Weather snow shower night icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSnowShowerNight = "WeatherSnowShowerNight", + /** + * Weather squalls icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSqualls = "WeatherSqualls", + /** + * Weather sunny high icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSunnyHigh = "WeatherSunnyHigh", + /** + * Weather sunny low icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSunnyLow = "WeatherSunnyLow", + /** + * Weather thunderstorm icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherThunderstorm = "WeatherThunderstorm", + /** + * Web asset icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + webAsset = "WebAsset", + /** + * Whiteboard icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + whiteboard = "Whiteboard", + /** + * Wifi signal with 3 bars icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wifi1 = "Wifi1", + /** + * Wifi signal with 2 bars icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wifi2 = "Wifi2", + /** + * Window icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + window = "Window", + /** + * Window multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + windowMultiple = "WindowMultiple", + /** + * Window wrench icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + windowWrench = "WindowWrench", + /** + * Wrench icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wrench = "Wrench", + /** + * Wrench screwdriver icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wrenchScrewdriver = "WrenchScrewdriver", + /** + * X-ray icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + xray = "Xray", + /** + * Yoga icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + yoga = "Yoga" + } + /** + * Represents a reference into `referencedValues`. One scenario for using this reference is to avoid duplicating cell value objects (such as an `EntityCellValue`). Define a cell value object once in `referencedValues`, and then refer to that cell value from many places by using a `ReferenceCellValue` where the duplicated value would have appeared. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface ReferenceCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.reference | "Reference"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: boolean | number | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType | "Boolean" | "Double" | "Error" | "Empty" | "String"; + /** + * Represents the index into the `referencedValues` properties of cell values such as `EntityCellValue` and `ArrayCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + reference: number; + } + /** + * Represents a reference to the value which contains `referencedValues`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface RootReferenceCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: ReferenceValueType.root | "Root"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: boolean | number | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType | "Boolean" | "Double" | "Error" | "Empty" | "String"; + } + /** + * Represents the types of the `ReferenceValue` object. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum ReferenceValueType { + /** + * Represents an `ArrayCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + array = "Array", + /** + * Represents an `EntityCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + entity = "Entity", + /** + * Represents a `RootReferenceCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + root = "Root" + } + /** + * Represents the value in a cell. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type ReferencedValue = ArrayCellValue | EntityCellValue | RootReferenceCellValue; + /** + * Represents the types of the `CellValue` object. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum CellValueType { + /** + * Represents an `ArrayCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + array = "Array", + /** + * Represents a `BooleanCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + boolean = "Boolean", + /** + * Represents a `DoubleCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + double = "Double", + /** + * Represents an `EntityCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + entity = "Entity", + /** + * Represents an `EmptyCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + empty = "Empty", + /** + * Represents an `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + error = "Error", + /** + * Represents a `FormattedNumberCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + formattedNumber = "FormattedNumber", + /** + * Represents a `LinkedEntityCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + linkedEntity = "LinkedEntity", + /** + * Represents a `LocalImageCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + localImage = "LocalImage", + /** + * Represents a `ReferenceCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + reference = "Reference", + /** + * Represents a `StringCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + string = "String", + /** + * Represents a `ValueTypeNotAvailableCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + notAvailable = "NotAvailable", + /** + * Represents a `WebImageCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + webImage = "WebImage" + } + /** + * Represents the value in a cell. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type CellValue = (ArrayCellValue | BooleanCellValue | DoubleCellValue | EntityCellValue | EmptyCellValue | ErrorCellValue | FormattedNumberCellValue | LinkedEntityCellValue | LocalImageCellValue | ReferenceCellValue | StringCellValue | ValueTypeNotAvailableCellValue | WebImageCellValue) & CellValueExtraProperties; + /** + * These extra properties may appear on a `CellValue` and provide information about that `CellValue`, but the extra properties are not part of the value in the cell. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CellValueExtraProperties { + /** + * Represents whether this `CellValue` will be used to overwrite a cell. + * When false, APIs which would use this `CellValue` to overwrite a cell will instead ignore this value without throwing an error. + * The default value is true. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + writable?: boolean; + /** + * Represents an explanation about why `CellValue.writable` is specified as false. + * Note: This string is only available if `writable` is specified as false. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + writableNote?: string; + } + /** + * Represents the value and metadata of a property. The metadata applies to the property (and not the value), but it is combined with the value in this type. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type CellValueAndPropertyMetadata = (CellValue) & EntityPropertyExtraProperties; + /** + * The attribution attributes object represents the set of details that can be used to describe where information came from, if the information comes from a public source. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CellValueAttributionAttributes { + /** + * Represents a URL to the source of the `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sourceAddress?: string; + /** + * Represents a name for the source of the `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sourceText?: string; + /** + * Represents a URL to a license or source that describes how this property can be used. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + licenseAddress?: string; + /** + * Represents a name for the license that governs this property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + licenseText?: string; + } + /** + * Represents the value of a cell containing a #BUSY! error. + * This type of error is used as a placeholder while the value of a cell is downloaded. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface PlaceholderErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#BUSY!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.placeholder | "Placeholder"; + /** + * `PlaceholderErrorCellValue` is used during processing, while data is downloaded. The `target` property represents the data that is downloading, the data for which the `PlaceholderErrorCellValue` object is a placeholder. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + target: LinkedEntityCellValue | WebImageCellValue; + } + /** + * The provider attributes object represents the set of details used in card view to provide specified branding information for a `CellValue` type that supports provider attributes. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CellValueProviderAttributes { + /** + * Represents the provider description property that is used in card view if no logo is specified. + * If a logo is specified, this will be used as tooltip text. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + description?: string; + /** + * Represents a URL used to download an image that will be used as a logo in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + logoSourceAddress?: string; + /** + * Represents a URL that is the navigation target if the user clicks on the logo element in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + logoTargetAddress?: string; + } + /** + * Metadata about a property in `EntityCellValue.properties`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CellValuePropertyMetadata { + /** + * Represents which features this property is excluded from. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + excludeFrom?: CellValuePropertyMetadataExclusions; + /** + * Represents the sublabel for this property shown in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sublabel?: string; + /** + * Represents attribution information to describe the source and license requirements for using this property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + attribution?: CellValueAttributionAttributes[]; + } + /** + * Represents the exclusion of a property in `EntityCellValue.properties` from features of Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CellValuePropertyMetadataExclusions { + /** + * True represents that the property is excluded from the properties shown by card view. False and undefined represent the default behavior of including the property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cardView?: boolean; + /** + * True represents that the property is excluded from the properties shown by auto complete. False and undefined represent the default behavior of including the property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + autoComplete?: boolean; + /** + * True represents that the property is excluded from the properties used to compare cell values during recalc. False and undefined represent the default behavior of including the property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + calcCompare?: boolean; + /** + * True represents that the property is excluded from the properties which can be accessed via the FIELDVALUE function. False and undefined represent the default behavior of including the property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dotNotation?: boolean; + } + /** + * Represents types of #CONNECT! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum ConnectErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by a problem with the service. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + serviceError = "ServiceError", + /** + * An error caused by an issue with the external links. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinks = "ExternalLinks", + /** + * An error caused by an external link to a non-cloud location, such as a link to an Excel file that is saved to a local computer instead of to a cloud location. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksNonCloudLocation = "ExternalLinksNonCloudLocation", + /** + * An error caused by no service connection for linked data types. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTypeNoConnection = "DataTypeNoConnection", + /** + * An error caused by an issue in the service for linked data types. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTypeServiceError = "DataTypeServiceError", + /** + * An error caused by missing content. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + missingContent = "MissingContent", + /** + * An error caused by request throttling. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + requestThrottle = "RequestThrottle", + /** + * An error caused by external links failing to refresh. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksFailedToRefresh = "ExternalLinksFailedToRefresh", + /** + * An error caused by a failure to access external links. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksAccessFailed = "ExternalLinksAccessFailed", + /** + * An error caused by a server error while resolving an external link. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksServerError = "ExternalLinksServerError", + /** + * An error caused by an invalid request while resolving an external link. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksInvalidRequest = "ExternalLinksInvalidRequest", + /** + * An error caused by a lack of authentication for external links. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksUnAuthenticated = "ExternalLinksUnAuthenticated", + /** + * An error caused by throttling from an external link host. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksThrottledByHost = "ExternalLinksThrottledByHost", + /** + * An error caused by an external link to a file which exceeds file size capacity. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksFileTooLarge = "ExternalLinksFileTooLarge", + /** + * An error caused by an outdated linked entity. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + outdatedLinkedEntity = "OutdatedLinkedEntity", + /** + * An error caused by an error returned from the server. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + genericServerError = "GenericServerError" + } + /** + * Represents the value of a cell containing a #CONNECT! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface ConnectErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#CONNECT!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.connect | "Connect"; + /** + * Represents the type of `ConnectErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: ConnectErrorCellValueSubType | "Unknown" | "ServiceError" | "ExternalLinks" | "ExternalLinksNonCloudLocation" | "DataTypeNoConnection" | "DataTypeServiceError" | "MissingContent" | "RequestThrottle" | "ExternalLinksFailedToRefresh" | "ExternalLinksAccessFailed" | "ExternalLinksServerError" | "ExternalLinksInvalidRequest" | "ExternalLinksUnAuthenticated" | "ExternalLinksThrottledByHost" | "ExternalLinksFileTooLarge" | "OutdatedLinkedEntity" | "GenericServerError"; + } + /** + * Represents the value of a cell containing a #DIV/0! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface Div0ErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#DIV/0!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.div0 | "Div0"; + } + /** + * Represents the value of a cell containing a double. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface DoubleCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.double | "Double"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue: number; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.double | "Double"; + } + /** + * Represents the value of a cell that's empty and has no formulas or data. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface EmptyCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.empty | "Empty"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: ""; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.empty | "Empty"; + } + /** + * Represents the value of a property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type EntityPropertyType = CellValueAndPropertyMetadata | CellValue; + /** + * Properties used by `CellValueAndPropertyMetadata`. These properties refer to the metadata and not to a `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface EntityPropertyExtraProperties { + /** + * Represents metadata about the property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + propertyMetadata?: CellValuePropertyMetadata; + } + /** + * Represents a set of properties without a schema or defined structure. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface EntityCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.entity | ReferenceValueType.entity | "Entity"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#VALUE!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the text shown when a cell with this value is rendered. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + text?: string; + /** + * Represents the properties of this entity and their metadata. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + properties?: { + [key: string]: EntityPropertyType; + }; + /** + * Represents layout information for views of this entity. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + layouts?: EntityViewLayouts; + /** + * Represents information that describes the service that provided the data in this `EntityCellValue`. + * This information can be used for branding in entity cards. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + provider?: CellValueProviderAttributes; + /** + * Represents the cell values which are referenced within `EntityCellValue.properties`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + referencedValues?: ReferencedValue[]; + } + /** + * Represents layout information for various views of the entity. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface EntityViewLayouts { + /** + * Represents the layout of this entity in card view. + * If the `CardLayout` object does not have a layout property, it is assumed to be "Entity". + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + card?: CardLayout; + /** + * Represents the layout used when there is limited space to represent the entity. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + compact?: CompactLayout; + } + /** + * Represents a card layout that is best used for an array. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface EntityCardLayout extends CardLayoutStandardProperties { + /** + * Represents the type of this layout. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + layout?: EntityCardLayoutType.entity | "Entity"; + } + /** + * Represents the types of the `ErrorCellValue` object. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum ErrorCellValueType { + /** + * Represents a `BlockedErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + blocked = "Blocked", + /** + * Represents a `BusyErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + busy = "Busy", + /** + * Represents a `CalcErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + calc = "Calc", + /** + * Represents a `ConnectErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + connect = "Connect", + /** + * Represents a `Div0ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + div0 = "Div0", + /** + * Represents an `ExternalErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + external = "External", + /** + * Represents a `FieldErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + field = "Field", + /** + * Represents a `GettingDataErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gettingData = "GettingData", + /** + * Represents a `NotAvailableErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + notAvailable = "NotAvailable", + /** + * Represents a `NameErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + name = "Name", + /** + * Represents a `NullErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + null = "Null", + /** + * Represents a `NumErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + num = "Num", + /** + * Represents a `PlaceholderErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + placeholder = "Placeholder", + /** + * Represents a `RefErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ref = "Ref", + /** + * Represents a `SpillErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + spill = "Spill", + /** + * Represents a `ValueErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + value = "Value" + } + /** + * Represents a cell value which contains an error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type ErrorCellValue = BlockedErrorCellValue | BusyErrorCellValue | CalcErrorCellValue | ConnectErrorCellValue | Div0ErrorCellValue | ExternalErrorCellValue | FieldErrorCellValue | GettingDataErrorCellValue | NotAvailableErrorCellValue | NameErrorCellValue | NullErrorCellValue | NumErrorCellValue | PlaceholderErrorCellValue | RefErrorCellValue | SpillErrorCellValue | ValueErrorCellValue; + /** + * Represents types of #EXTERNAL! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum ExternalErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #EXTERNAL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown" + } + /** + * Represents the value of a cell containing an #EXTERNAL! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface ExternalErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#EXTERNAL!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.external | "External"; + /** + * Represents the type of `ExternalErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: ExternalErrorCellValueSubType | "Unknown"; + } + /** + * Represents types of #FIELD! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum FieldErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #FIELD! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by a missing file. In this case, the RichValueWebImageValue.xml file is missing from the metro package. Displays as error type #FIELD! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + webImageMissingFilePart = "WebImageMissingFilePart", + /** + * An error caused by an error from a data provider. Displays as error type #FIELD! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataProviderError = "DataProviderError", + /** + * An error caused by a missing file. In this case, the RichValueRel.xml file is missing from the metro package. Displays as error type #FIELD! in Excel. + * + * @remarks + * [Api set: 1.16] + */ + richValueRelMissingFilePart = "RichValueRelMissingFilePart" + } + /** + * Represents the value of a cell containing a #FIELD! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface FieldErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#FIELD!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.field | "Field"; + /** + * Represents the type of `FieldErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: FieldErrorCellValueSubType | "Unknown" | "WebImageMissingFilePart" | "DataProviderError" | "RichValueRelMissingFilePart"; + /** + * Represents the field which was not found by FIELDVALUE. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + fieldName?: string; + } + /** + * Represents the value of a cell containing a number with a format string. Number format strings must conform to Excel guidelines. To learn more, see {@link https://support.microsoft.com/office/review-guidelines-for-customizing-a-number-format-c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}. + * In this scenario, the format is applied to the value and not to the cell, so the value retains its format string throughout calculation. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface FormattedNumberCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.formattedNumber | "FormattedNumber"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue: number; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.double | "Double"; + /** + * Returns the number format string that is used to display this value. + * When accessed through a `valuesAsJson` property, this number format string is in the en-US locale. When accessed through a `valuesAsJsonLocal` property, this number format is in the user's display locale. + * Number format strings must conform to Excel guidelines. + * To learn more, see {@link https://support.microsoft.com/office/review-guidelines-for-customizing-a-number-format-c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + numberFormat: string; + } + /** + * Represents the value of a cell containing a #GETTING_DATA error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface GettingDataErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#GETTING_DATA" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.gettingData | "GettingData"; + } + /** + * The linked entity ID object represents a set of properties that describes a service and culture for locating this service defined value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface LinkedEntityId { + /** + * Represents which service was used to create the `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + serviceId: number; + /** + * Represents a domain specific to a service used to create the `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + domainId?: string; + /** + * Represents an identifier specific to a service used to create the `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + entityId: string; + /** + * Represents which language culture was used to create this `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + culture: string; + } + /** + * Represents a value whose properties derive from a service. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface LinkedEntityCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.linkedEntity | "LinkedEntity"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#VALUE!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the service source that provided the information in this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + id: LinkedEntityId; + /** + * Represents the text shown when a cell with this value is rendered. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + text?: string; + /** + * Represents the properties of this linked entity and their metadata. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + properties?: { + [key: string]: CellValue & { + propertyMetadata?: CellValuePropertyMetadata; + }; + }; + /** + * Represents the layout of this linked entity in card view. + * If the `CardLayout` object doesn't have a layout property, it default value is "Entity". + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cardLayout?: CardLayout; + /** + * Represents information that describes the service that provided data in this `LinkedEntityCellValue`. + * This information can be used for branding in entity cards. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + provider?: CellValueProviderAttributes; + } + /** + * Represents the value of a cell containing a locally stored or generated image. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface LocalImageCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.localImage | "LocalImage"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#VALUE!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the image itself, either cached or encoded. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + image: LocalImageCellValueCacheId | Base64EncodedImage; + /** + * Represents the alternate text used in accessibility scenarios to describe what the image represents. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altText?: string; + /** + * Represents attribution information to describe the source and license requirements for this image. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + attribution?: CellValueAttributionAttributes[]; + /** + * Represents information that describes the entity or individual who provided the image. + * This information is used for branding purposes in image cards. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + provider?: CellValueProviderAttributes; + } + /** + * The UID of a previously cached image. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface LocalImageCellValueCacheId { + /** + * Represents the image's UID as it appears in the cache. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + cacheUid: string; + } + /** + * Represents the value of a cell containing a #N/A! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface NotAvailableErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#N/A!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.notAvailable | "NotAvailable"; + } + /** + * Represents the value of a cell containing a #NAME? error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface NameErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#NAME?" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.name | "Name"; + } + /** + * Represents the value of a cell containing a #NULL! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface NullErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#NULL!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.null | "Null"; + } + /** + * Represents types of #NUM! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum NumErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #NUM! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by a cell's formula having an array parameter with too many rows or columns. The maximum number of rows and columns in an array parameter is 1048576. Displays as error type #NUM! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + arrayTooLarge = "ArrayTooLarge" + } + /** + * Represents the value of a cell containing a #NUM! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface NumErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#NUM!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.num | "Num"; + /** + * Represents the type of `NumErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: NumErrorCellValueSubType | "Unknown" | "ArrayTooLarge"; + /** + * Represents the name of the function causing the error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + functionName?: string; + } + /** + * Represents types of #REF! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum RefErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #REF! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by structured references from the linked workbook. Displays as error type #REF! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksStructuredRef = "ExternalLinksStructuredRef", + /** + * An error caused by dynamic array references from the linked workbook. Displays as error type #REF! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksCalculatedRef = "ExternalLinksCalculatedRef" + } + /** + * Represents the value of a cell containing a #REF! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface RefErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#REF!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.ref | "Ref"; + /** + * Represents the type of `RefErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: RefErrorCellValueSubType | "Unknown" | "ExternalLinksStructuredRef" | "ExternalLinksCalculatedRef"; + } + /** + * Represents types of #SPILL! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum SpillErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by a dynamic array attempting to spill data into a cell that isn't empty. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + collision = "Collision", + /** + * An error caused by a dynamic array formula that can't be evaluated in a single calculation. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + indeterminateSize = "IndeterminateSize", + /** + * An error caused by a dynamic array attempting to spill over the edge of the worksheet. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + worksheetEdge = "WorksheetEdge", + /** + * An error caused by insufficient memory when attempting to calculate a dynamic array formula. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + outOfMemoryWhileCalc = "OutOfMemoryWhileCalc", + /** + * An error caused by entering a dynamic array formula in a table. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + table = "Table", + /** + * An error caused by a merged cell blocking a dynamic array. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mergedCell = "MergedCell" + } + /** + * Represents the value of a cell containing a #SPILL! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface SpillErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#SPILL!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.spill | "Spill"; + /** + * Represents the type of `SpillErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: SpillErrorCellValueSubType | "Unknown" | "Collision" | "IndeterminateSize" | "WorksheetEdge" | "OutOfMemoryWhileCalc" | "Table" | "MergedCell"; + /** + * Represents the number of rows that would spill if there were no #SPILL! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + rowCount?: number; + /** + * Represents the number of columns that would spill if there were no #SPILL! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + columnCount?: number; + } + /** + * Represents the value of a cell containing a string. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface StringCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.string | "String"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue: string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.string | "String"; + } + /** + * Represents types of #VALUE! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum ValueErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by a column_index_num parameter of VLOOKUP of less than 1. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vlookupColumnIndexLessThanOne = "VlookupColumnIndexLessThanOne", + /** + * An error caused by VLOOKUP not finding its lookup_value parameter. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vlookupResultNotFound = "VlookupResultNotFound", + /** + * An error caused by a row_index_num parameter of HLOOKUP of less than 1. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + hlookupRowIndexLessThanOne = "HlookupRowIndexLessThanOne", + /** + * An error caused by HLOOKUP not finding its lookup_value parameter. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + hlookupResultNotFound = "HlookupResultNotFound", + /** + * An error caused by encountering a string where a number was expected, and that string not being coercible to a number. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + coerceStringToNumberInvalid = "CoerceStringToNumberInvalid", + /** + * An error caused by encountering a string where a boolean was expected, and that string not being coercible to a boolean. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + coerceStringToBoolInvalid = "CoerceStringToBoolInvalid", + /** + * An error caused by conversion of a string to a type other than a boolean or number. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + coerceStringToInvalidType = "CoerceStringToInvalidType", + /** + * An error caused by SUBARRAY missing a start row. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + subArrayStartRowMissingEndRowNot = "SubArrayStartRowMissingEndRowNot", + /** + * An error caused by SUBARRAY missing a start column. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + subArrayStartColumnMissingEndColumnNot = "SubArrayStartColumnMissingEndColumnNot", + /** + * An error caused by a `WebImageValue` with an invalid URL. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + invalidImageUrl = "InvalidImageUrl", + /** + * An error caused by STOCKHISTORY having a date range which only contains days that don't have stock trading. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryNonTradingDays = "StockHistoryNonTradingDays", + /** + * An error caused by passing a stock parameter which is not a stock to STOCKHISTORY. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryNotAStock = "StockHistoryNotAStock", + /** + * An error caused by passing an invalid date to STOCKHISTORY. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryInvalidDate = "StockHistoryInvalidDate", + /** + * An error caused by passing an end_date parameter that precedes the start_date parameter to STOCKHISTORY. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryEndBeforeStart = "StockHistoryEndBeforeStart", + /** + * An error caused by passing a future start_date parameter to STOCKHISTORY. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryStartInFuture = "StockHistoryStartInFuture", + /** + * An error caused by invalid interval or header parameters for STOCKHISTORY. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryInvalidEnum = "StockHistoryInvalidEnum", + /** + * An error caused by STOCKHISTORY parameters that request only the date and no other fields. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryOnlyDateRequested = "StockHistoryOnlyDateRequested", + /** + * An error caused by STOCKHISTORY not finding the history of the specified stock. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryNotFound = "StockHistoryNotFound", + /** + * An error caused by passing the incorrect number of parameters to a lambda value. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lambdaWrongParamCount = "LambdaWrongParamCount" + } + /** + * Represents the value of a cell containing a #VALUE! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface ValueErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#VALUE!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.value | "Value"; + /** + * Represents the type of `ValueErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: ValueErrorCellValueSubType | "Unknown" | "VlookupColumnIndexLessThanOne" | "VlookupResultNotFound" | "HlookupRowIndexLessThanOne" | "HlookupResultNotFound" | "CoerceStringToNumberInvalid" | "CoerceStringToBoolInvalid" | "CoerceStringToInvalidType" | "SubArrayStartRowMissingEndRowNot" | "SubArrayStartColumnMissingEndColumnNot" | "InvalidImageUrl" | "StockHistoryNonTradingDays" | "StockHistoryNotAStock" | "StockHistoryInvalidDate" | "StockHistoryEndBeforeStart" | "StockHistoryStartInFuture" | "StockHistoryInvalidEnum" | "StockHistoryOnlyDateRequested" | "StockHistoryNotFound" | "LambdaWrongParamCount"; + } + /** + * Represents the value of a cell containing a type of value which cannot be serialized. + * For example, an #UNKNOWN! error which represents a type of rich value not known to this version of Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface ValueTypeNotAvailableCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.notAvailable | "NotAvailable"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue: boolean | number | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType: RangeValueType | "Boolean" | "Double" | "Error" | "Empty" | "String"; + } + /** + * Represents the value of a cell containing an image downloaded from the internet. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface WebImageCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.webImage | "WebImage"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#VALUE!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the URL from which the image will be downloaded. + * This image must be hosted on a server that supports HTTPS. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + address: string; + /** + * Represents the alternate text that can be used in accessibility scenarios to describe what the image represents. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + altText?: string; + /** + * Represents the URL of a webpage with images that are considered related to this `WebImageCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + relatedImagesAddress?: string; + /** + * Represents attribution information to describe the source and license requirements for using this image. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + attribution?: CellValueAttributionAttributes[]; + /** + * Represents information that describes the entity or individual who provided the image. + * This information can be used for branding in image cards. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + provider?: CellValueProviderAttributes; + } + /** + * + * Represents which cell properties to load, when used as part of a "range.getCellProperties" method. + * + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesLoadOptions { + /** + * + * Specifies whether to load on the `address` property. + * + * [Api set: ExcelApi 1.9] + */ + address?: boolean; + /** + * + * Specifies whether to load on the `addressLocal` property. + * + * [Api set: ExcelApi 1.9] + */ + addressLocal?: boolean; + /** + * + * Specifies whether to load on the `format` property. + * + * [Api set: ExcelApi 1.9] + */ + format?: Excel.CellPropertiesFormatLoadOptions; + /** + * + * Specifies whether to load on the `hidden` property. + * + * [Api set: ExcelApi 1.9] + */ + hidden?: boolean; + /** + * + * Specifies whether to load on the `hyperlink` property. + * + * [Api set: ExcelApi 1.9] + */ + hyperlink?: boolean; + /** + * + * Specifies whether to load on the `style` property. + * + * [Api set: ExcelApi 1.9] + */ + style?: boolean; + } + /** + * + * Represents which row properties to load, when used as part of a "range.getRowProperties" method. + * + * [Api set: ExcelApi 1.9] + */ + interface RowPropertiesLoadOptions extends CellPropertiesLoadOptions { + /** + * + * Specifies whether to load on the `rowHidden` property. + * + * [Api set: ExcelApi 1.9] + */ + rowHidden?: boolean; + /** + * + * Specifies whether to load on the `rowIndex` property. + * + * [Api set: ExcelApi 1.9] + */ + rowIndex?: boolean; + /** + * + * Specifies whether to load on the `format` property. + * + * [Api set: ExcelApi 1.9] + */ + format?: Excel.CellPropertiesFormatLoadOptions & { + rowHeight?: boolean; + }; + } + /** + * + * Represents which column properties to load, when used as part of a "range.getColumnProperties" method. + * + * [Api set: ExcelApi 1.9] + */ + interface ColumnPropertiesLoadOptions extends CellPropertiesLoadOptions { + /** + * + * Specifies whether to load on the `columnIndex` property. + * + * [Api set: ExcelApi 1.9] + */ + columnIndex?: boolean; + /** + * + * Specifies whether to load on the `columnHidden` property. + * + * [Api set: ExcelApi 1.9] + */ + columnHidden?: boolean; + /** + * + * Specifies whether to load on the `format` property. + * + * [Api set: ExcelApi 1.9] + */ + format?: Excel.CellPropertiesFormatLoadOptions & { + columnWidth?: boolean; + }; + } + /** + * + * Represents which properties to load on the format object. + * + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesFormatLoadOptions { + /** + * + * Specifies whether to load on the `autoIndent` property. + * + * [Api set: ExcelApi 1.9] + */ + autoIndent?: boolean; + /** + * + * Specifies whether to load on the `borders` property. + * + * [Api set: ExcelApi 1.9] + */ + borders?: Excel.CellPropertiesBorderLoadOptions; + /** + * + * Specifies whether to load on the `fill` property. + * + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.CellPropertiesFillLoadOptions; + /** + * + * Specifies whether to load on the `font` property. + * + * [Api set: ExcelApi 1.9] + */ + font?: Excel.CellPropertiesFontLoadOptions; + /** + * + * Specifies whether to load on the `horizontalAlignment` property. + * + * [Api set: ExcelApi 1.9] + */ + horizontalAlignment?: boolean; + /** + * + * Specifies whether to load on the `indentLevel` property. + * + * [Api set: ExcelApi 1.9] + */ + indentLevel?: boolean; + /** + * + * Specifies whether to load on the `protection` property. + * + * [Api set: ExcelApi 1.9] + */ + protection?: boolean; + /** + * + * Specifies whether to load on the `readingOrder` property. + * + * [Api set: ExcelApi 1.9] + */ + readingOrder?: boolean; + /** + * + * Specifies whether to load on the `shrinkToFit` property. + * + * [Api set: ExcelApi 1.9] + */ + shrinkToFit?: boolean; + /** + * + * Specifies whether to load on the `textOrientation` property. + * + * [Api set: ExcelApi 1.9] + */ + textOrientation?: boolean; + /** + * + * Specifies whether to load on the `useStandardHeight` property. + * + * [Api set: ExcelApi 1.9] + */ + useStandardHeight?: boolean; + /** + * + * Specifies whether to load on the `useStandardWidth` property. + * + * [Api set: ExcelApi 1.9] + */ + useStandardWidth?: boolean; + /** + * + * Specifies whether to load on the `verticalAlignment` property. + * + * [Api set: ExcelApi 1.9] + */ + verticalAlignment?: boolean; + /** + * + * Specifies whether to load on the `wrapText` property. + * + * [Api set: ExcelApi 1.9] + */ + wrapText?: boolean; + } + /** + * + * Represents the input parameter of setCellProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface SettableCellProperties { + /** + * + * Represents the `format` property. + * + * [Api set: ExcelApi 1.9] + */ + format?: Excel.CellPropertiesFormat; + /** + * + * Represents the `hyperlink` property. + * + * [Api set: ExcelApi 1.9] + */ + hyperlink?: Excel.RangeHyperlink; + /** + * + * Represents the `style` property. + * + * [Api set: ExcelApi 1.9] + */ + style?: string; + } + /** + * + * Represents the returned properties of getCellProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface CellProperties extends SettableCellProperties { + /** + * + * Represents the `address` property. + * + * [Api set: ExcelApi 1.9] + */ + address?: string; + /** + * + * Represents the `addressLocal` property. + * + * [Api set: ExcelApi 1.9] + */ + addressLocal?: string; + /** + * + * Represents the `hidden` property. + * + * [Api set: ExcelApi 1.9] + */ + hidden?: boolean; + } + /** + * + * Represents the input parameter of setRowProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface SettableRowProperties extends SettableCellProperties { + /** + * + * Represents the `rowHidden` property. + * + * [Api set: ExcelApi 1.9] + */ + rowHidden?: boolean; + /** + * + * Represents the `format` property. + * + * [Api set: ExcelApi 1.9] + */ + format?: Excel.CellPropertiesFormat & { + rowHeight?: number; + }; + } + /** + * + * Represents the returned properties of getRowProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface RowProperties extends SettableRowProperties { + /** + * + * Represents the `rowIndex` property. + * + * [Api set: ExcelApi 1.9] + */ + rowIndex?: number; + /** + * + * Represents the `address` property. + * + * [Api set: ExcelApi 1.9] + */ + address?: string; + /** + * + * Represents the `addressLocal` property. + * + * [Api set: ExcelApi 1.9] + */ + addressLocal?: string; + } + /** + * + * Represents the input parameter of setColumnProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface SettableColumnProperties extends SettableCellProperties { + /** + * + * Represents the `columnHidden` property. + * + * [Api set: ExcelApi 1.9] + */ + columnHidden?: boolean; + /** + * + * Represents the `format` property. + * + * [Api set: ExcelApi 1.9] + */ + format?: Excel.CellPropertiesFormat & { + columnWidth?: number; + }; + } + /** + * + * Represents the returned properties of getColumnProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface ColumnProperties extends SettableColumnProperties { + /** + * + * Represents the `columnIndex` property. + * + * [Api set: ExcelApi 1.9] + */ + columnIndex?: number; + /** + * + * Represents the `address` property. + * + * [Api set: ExcelApi 1.9] + */ + address?: string; + /** + * + * Represents the `addressLocal` property. + * + * [Api set: ExcelApi 1.9] + */ + addressLocal?: string; + } + /** + * + * Represents the returned format properties of getCellProperties or format input parameter of setCellProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesFormat { + /** + * + * Represents the `autoIndent` property. + * + * [Api set: ExcelApi 1.9] + */ + autoIndent?: boolean; + /** + * + * Represents the `borders` property. + * + * [Api set: ExcelApi 1.9] + */ + borders?: Excel.CellBorderCollection; + /** + * + * Represents the `fill` property. + * + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.CellPropertiesFill; + /** + * + * Represents the `font` property. + * + * [Api set: ExcelApi 1.9] + */ + font?: Excel.CellPropertiesFont; + /** + * + * Represents the `horizontalAlignment` property. + * + * [Api set: ExcelApi 1.9] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Represents the `indentLevel` property. + * + * [Api set: ExcelApi 1.9] + */ + indentLevel?: number; + /** + * + * Represents the `protection` property. + * + * [Api set: ExcelApi 1.9] + */ + protection?: Excel.CellPropertiesProtection; + /** + * + * Represents the `readingOrder` property. + * + * [Api set: ExcelApi 1.9] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * Represents the `shrinkToFit` property. + * + * [Api set: ExcelApi 1.9] + */ + shrinkToFit?: boolean; + /** + * + * Represents the `textOrientation` property. + * + * [Api set: ExcelApi 1.9] + */ + textOrientation?: number; + /** + * + * Represents the `useStandardHeight` property. + * + * [Api set: ExcelApi 1.9] + */ + useStandardHeight?: boolean; + /** + * + * Represents the `useStandardWidth` property. + * + * [Api set: ExcelApi 1.9] + */ + useStandardWidth?: boolean; + /** + * + * Represents the `verticalAlignment` property. + * + * [Api set: ExcelApi 1.9] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Represents the `wrapText` property. + * + * [Api set: ExcelApi 1.9] + */ + wrapText?: boolean; + } + /** + * + * 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; + interface Session { + } + /** + * 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; + /** + * [Api set: ExcelApi 1.5] + */ + readonly runtime: Runtime; + } + /** + * + * A global object represents the macro recorder. + * + * [Api set: WACOperationEvents 1.1] + */ + class Recorder { + static enableMacroRecordingEvent(context?: RequestContext): Promise; + } + 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. + * + * @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; + function postprocessBindingDescriptor(response: any): any; + function getDataCommonPostprocess(response: any, callArgs: any): any; + /** + * Shows the preview of range values. Previews are non-persistent and have no co-authoring impact. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class RangeValuesPreview 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; + /** + * Dismisses the preview. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dismiss(): void; + /** + * Shows the preview of values in the range. The range dimensions are defined by the anchor cell and dimensions of the values array. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param anchorCellAddress The address of the anchor cell in A1 format. + * @param values Values to be previewed. + * @param options Preview options. + */ + show(anchorCellAddress: string, values: string[][], options?: Excel.RangeValuesPreviewOptions): void; + /** + * Occurs when the range values preview is dismissed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onDismissed: 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.RangeValuesPreview object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeValuesPreviewData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + class RangeValuesPreviewCustom { + } + interface RangeValuesPreview extends OfficeExtension.ClientObject, RangeValuesPreviewCustom { + } + /** + * Provides information about the dismissal of range values preview. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RangeValuesPreviewDismissedEventArgs { + /** + * Describes whether the range values preview was dismissed implicitly (through some persistent change to the workbook), + instead of through the `Excel.RangeValuesPreview.dismiss` method. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isImplicit: boolean; + /** + * The source of the event. It can be local or remote (through co-authoring). Remote dismissal implies that a remote document model change was applied to the local document model. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. It is always `RangeValuesPreviewDismissed`. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: string; + } + /** + * The options that define the behavior of range values preview. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RangeValuesPreviewOptions { + /** + * Determines whether the range values preview autoexpands an adjacent table, if any. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoexpandTable?: boolean; + /** + * Determines whether the range values preview autofits columns. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autofitColumns?: boolean; + } + /** + * Top-level class for the augmentation loop APIs and events. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class AugmentationLoop 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; + /** + * Activates an annotation. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param annotationType Type of the annotation to be activated. + */ + activateAnnotation(annotationType: string): void; + /** + * Submits a signal to trigger a signal workflow in Augmentation loop. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param signal JSON stringified signal object to be sent to the workflow. + */ + submitSignal(signal: Excel.AugmentationLoopSignal): void; + /** + * The annotation added event. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onAnnotationAdded: 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.AugmentationLoop object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.AugmentationLoopData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * Annotation added event arguments. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface AugmentationLoopAnnotationAddedEventArgs { + /** + * An array of annotation properties. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + annotationProperties: Excel.AugmentationLoopAnnotationProperties[]; + } + /** + * Represents the properties of an annotation. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface AugmentationLoopAnnotationProperties { + annotationType: string; + /** + * The annotation object. For use with JSON.parse. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + content: string; + /** + * Gets the ID of the annotation. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id: string; + } + /** + * The type used as input to signal workflows. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface AugmentationLoopSignal { + /** + * The signal object. For use with JSON.parse. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + content: string; + signalType: string; + } + /** + * Represents the APIs for external code service integrations in Excel. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ExternalCodeService 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; + /** + * Provides APIs that identify, obtain, and delete the diagnostic entries published + by the `ExternalCodeService` integration. + Note: This API is designed for exclusive usage by the diagnostics task pane. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly diagnostics: Excel.ExternalCodeServiceDiagnostics; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ExternalCodeServiceLoadOptions): Excel.ExternalCodeService; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ExternalCodeService; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.ExternalCodeService; + /** + * 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.ExternalCodeService object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ExternalCodeServiceData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ExternalCodeServiceData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ExternalCodeServiceData): void; + } + /** + * Provides APIs that identify, obtain, and delete the diagnostic entries published + by the `ExternalCodeService` integration. + Note: This API is designed for exclusive usage by the diagnostics task pane. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ExternalCodeServiceDiagnostics 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 ID is a special property needed for events. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * Deletes all diagnostic entries in the Excel application. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + clear(): void; + /** + * Triggers the `newEntry` event for each entry in the container in the Excel application. + This method should be called to retrieve the entries which were published + before the task pane was created. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + fireStoredEntries(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ExternalCodeServiceDiagnosticsLoadOptions): Excel.ExternalCodeServiceDiagnostics; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ExternalCodeServiceDiagnostics; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.ExternalCodeServiceDiagnostics; + /** + * Occurs when the filter setting is updated for the diagnostics task pane. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFilterUpdated: OfficeExtension.EventHandlers; + /** + * Occurs when a new diagnostic entry is available. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onNewEntry: 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.ExternalCodeServiceDiagnostics object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ExternalCodeServiceDiagnosticsData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ExternalCodeServiceDiagnosticsData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ExternalCodeServiceDiagnosticsData): void; + } + /** + * Provides information about the new external code service diagnostic entry. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ExternalCodeServiceDiagnosticsAddedEventArgs { + /** + * The column of the cell where the diagnostic entry originates. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + column: number; + /** + * The unique id value of the entry. Ids are assigned sequentially. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + entryId: number; + /** + * The duration in milliseconds of the code execution. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + executionDurationMs: number; + /** + * The UTC time point when the request to run the code was send to the external code service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + executionStartTime: Date; + /** + * Indicates whether a separator line should be inserted before this entry on the task pane. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isSeparatorRequired: boolean; + /** + * The row of the cell where the diagnostic entry originates. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + row: number; + /** + * An error message provided by the external code service after failing to run the code. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceError: string; + /** + * The standard error output content generated during external code execution. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + stderr: string; + /** + * The standard output content generated during external code execution. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + stdout: string; + /** + * The GUID of the sheet where the diagnostic entry originates. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } + /** + * Provides information about the new filter setting to be applied for the external code diagnostics. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ExternalCodeServiceDiagnosticsFilterUpdatedEventArgs { + /** + * The list of ranges in the grid. Only diagnostic entries from this grid locations will be displayed. + For example: B2:C4,D6,F2:T6. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + ranges?: string; + /** + * The name of the worksheet. Only diagnostic entries from this worksheet will be displayed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + sheetName?: string; + } + /** + * The VBA Recorder. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class VbaRecorder 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 for the VBA Recorder. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * Deprecated + Register Event onRecordingChanged + /** + * Deprecated + Register Event onRecordingChanged + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.VbaRecorderLoadOptions): Excel.VbaRecorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.VbaRecorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.VbaRecorder; + /** + * Occurs when the VBA code output of the recorder changes. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onRecordingChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the VBA code output of the recorder changes. + * + * @remarks + * [Api set: Recorder 1.1] + * + * @eventproperty + */ + readonly onRecordingChanged2: 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.VbaRecorder object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.VbaRecorderData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.VbaRecorderData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.VbaRecorderData): void; + } + /** + * Event args passed to the handler when the VBA Recorder RecordingChanged event occurs. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface VbaRecorderRecordingChangedEventArgs { + /** + * Line of VBA recorded. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + code: string; + /** + * icetab that generated the line of code. + + Undo is 48 + Redo is 588 + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + icetab: number; + } + /** + * Provides information about the source that deactivated the RangePicker. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RangePickerDeactivatedEventArgs { + } + /** + * Represents the result of a worksheet optimization. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class WorksheetOptimizationScanResult 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 ranges that can be optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly ranges: Excel.RangeOptimizationCollection; + /** + * The number of cells that are allocated in the worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly allocatedCells: number; + /** + * The number of cells in the worksheet that can be optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly optimizableCells: number; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorksheetOptimizationScanResultLoadOptions): Excel.WorksheetOptimizationScanResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorksheetOptimizationScanResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.WorksheetOptimizationScanResult; + /** + * 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.WorksheetOptimizationScanResult object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetOptimizationScanResultData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.WorksheetOptimizationScanResultData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.WorksheetOptimizationScanResultData): void; + } + /** + * Represents the business bar component on workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class BusinessBar 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; + /** + * Hide the business bar for a specific entry. A business bar is a notification bar that appears at the top of the Excel UI, just below the ribbon. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param businessBarEntryType The type of the business bar. + * @param options Options to render the business bar, will be handled in host code. + */ + hide(businessBarEntryType: Excel.BusinessBarEntryType, options?: { + [key: string]: string; + }): void; + /** + * Show the business bar for a specific entry. A business bar is a notification bar that appears at the top of the Excel UI, just below the ribbon. + See values in EwaBusinessBarEntryType for more information. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param businessBarEntryType The type of the business bar. + * @param options Options to render the business bar, will be handled in host code. + */ + show(businessBarEntryType: Excel.BusinessBarEntryType, options?: { + [key: string]: 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.BusinessBar object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.BusinessBarData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * Holds the entries for the business bar type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + const enum BusinessBarEntryType { + /** + * Business bar that shows an Office Scripts RFB button running status. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + officeScriptsRunningStatus = 0, + /** + * Business bar that shows an MS Forms data sync status. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + msFormsDataSyncRunningStatus = 1 + } + /** + * Event args passed to the handler when the `actionRecorded` event occurs. + * + * @remarks + * [Api set: Recorder 1.1] + */ + interface ActionRecordedEventArgs { + /** + * The string sent to the `recordAction` API. + This API is only meant for use by the Office Scripts Action Recorder SDX. + * + * @remarks + * [Api set: Recorder 1.1] + */ + payload: string; + } + /** + * Represents an `AllowEditRange` object found in a worksheet. This object works with worksheet protection properties. + When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + class AllowEditRange 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; + /** + * Specifies the range associated with the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + address: string; + /** + * Specifies if the object is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly isPasswordProtected: boolean; + /** + * Specifies the title of the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. + If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + 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. + * @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.AllowEditRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.AllowEditRange): void; + /** + * Deletes the object from the `AllowEditRangeCollection`. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails the delete operation. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + delete(): void; + /** + * Pauses worksheet protection for the object for the user in the current session. + This method does nothing if worksheet protection isn't enabled or is already paused. + If worksheet protection cannot be paused, this method throws an `UnsupportedOperation` error and fails to pause protection for the object. + If the password is incorrect, then this method throws a `BadPassword` error and fails to pause protection for the object. + If a password is supplied but the object does not require a password, the inputted password will be ignored and the operation will succeed. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param password The password associated with the `AllowEditRange` object. + */ + pauseProtection(password?: string): void; + /** + * Changes the password associated with the object. + Setting the password string as empty ("") or `null` will remove password protection from the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, then this method throws an `AccessDenied` error and the set operation fails. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param password The password associated with the `AllowEditRange` object. + */ + setPassword(password?: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.AllowEditRangeLoadOptions): Excel.AllowEditRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.AllowEditRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.AllowEditRange; + /** + * 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.AllowEditRange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.AllowEditRangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.AllowEditRangeData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.AllowEditRangeData): void; + } + /** + * Represents the set of `AllowEditRange` objects found in a worksheet. `AllowEditRange` objects work with worksheet protection properties. + When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + class AllowEditRangeCollection 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.AllowEditRange[]; + /** + * Adds an `AllowEditRange` object to the worksheet. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, then this method throws an `AccessDenied` error and the add operation fails. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param title The title string of the `AllowEditRange` object to be added. + * @param rangeAddress The range address of the `AllowEditRange` object to be added. + * @param options Additional options to be added to the `AllowEditRange` object, such as the password. + */ + add(title: string, rangeAddress: string, options?: Excel.AllowEditRangeOptions): void; + /** + * Returns the number of `AllowEditRange` objects in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the `AllowEditRange` object by its title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param key The title of the `AllowEditRange`. + * @returns The `AllowEditRange` with the title. If there is no `AllowEditRange` with the given title, then an `ItemNotFound` error is thrown. + */ + getItem(key: string): Excel.AllowEditRange; + /** + * Returns an `AllowEditRange` object by its index in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param index The index of the `AllowEditRange` object in the collection. + * @returns The `AllowEditRange` at the given index. + */ + getItemAt(index: number): Excel.AllowEditRange; + /** + * Gets the `AllowEditRange` object by its title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param key The title of the `AllowEditRange`. + * @returns The `AllowEditRange` with the title. If there is no `AllowEditRange` with the given title, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + */ + getItemOrNullObject(key: string): Excel.AllowEditRange; + /** + * Pauses worksheet protection for all `AllowEditRange` objects found in this worksheet that have the given password for the user in the current session. + This method does nothing if worksheet protection isn't enabled or is paused. + If worksheet protection cannot be paused, this method throws an `UnsupportedOperation` error and fails to pause protection for the range. + If the password does not match any `AllowEditRange` objects in the collection, then this method throws a `BadPassword` error and fails to pause protection for any range in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param password The password to pause protection on the `AllowEditRange` objects. + */ + pauseProtection(password: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.AllowEditRangeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.AllowEditRangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.AllowEditRangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.AllowEditRangeCollection; + /** + * 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.AllowEditRangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.AllowEditRangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.AllowEditRangeCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.AllowEditRangeCollectionData): void; + } + /** + * The interface used to construct optional fields of the `AllowEditRange` object. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface AllowEditRangeOptions { + /** + * The password associated with the `AllowEditRange`. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + password?: string; + } + /** + * Notifies when a worksheet is moved within a workbook. + + If a worksheet is moved from one position within the workbook to another + via the Excel UI, then this API will trigger an event. Note that if + the position of a worksheet changes as a result of moving a different worksheet, + then this event won't trigger for both position changes. This event only triggers + for the primary worksheet move, and not any worksheet position changes that occur + as a result of that primary move. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + interface WorksheetMovedEventArgs { + /** + * Gets the new position of the worksheet, after the move. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + positionAfter: number; + /** + * Gets the previous position of the worksheet, prior to the move. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + positionBefore: number; + /** + * The source of the event. It can be local or remote (through co-authoring). + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + type: string; + /** + * Gets the ID of the worksheet that was moved. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet whose name has changed. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + interface WorksheetNameChangedEventArgs { + /** + * Gets the new name of the worksheet, after the name change. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + nameAfter: string; + /** + * Gets the previous name of the worksheet, before the name changed. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + nameBefore: string; + /** + * The source of the event. It can be local or remote (through co-authoring). + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + type: string; + /** + * Gets the ID of the worksheet with the new name. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet whose visibility has changed. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + interface WorksheetVisibilityChangedEventArgs { + /** + * The source of the event. It can be local or remote (through co-authoring). + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + type: string; + /** + * Gets the new visibility setting of the worksheet, after the visibility change. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + visibilityAfter: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; + /** + * Gets the previous visibility setting of the worksheet, before the visibility change. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + visibilityBefore: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; + /** + * Gets the ID of the worksheet whose visibility has changed. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + worksheetId: string; + } + /** + * An enum that specifies the query load to destination. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + enum LoadToType { + /** + * Load to connection only. + * @remarks + * [Api set: ExcelApi 1.14] + */ + connectionOnly = "ConnectionOnly", + /** + * Load to a table. + * @remarks + * [Api set: ExcelApi 1.14] + */ + table = "Table", + /** + * Load to PivotTable. + * @remarks + * [Api set: ExcelApi 1.14] + */ + pivotTable = "PivotTable", + /** + * Load to PivotChart. + * @remarks + * [Api set: ExcelApi 1.14] + */ + pivotChart = "PivotChart" + } + /** + * Represents a Power Query query. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + class Query 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 query error message from when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly error: Excel.QueryError | "Unknown" | "None" | "FailedLoadToWorksheet" | "FailedLoadToDataModel" | "FailedDownload" | "FailedToCompleteDownload"; + /** + * Gets the query loaded to object type. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly loadedTo: Excel.LoadToType | "ConnectionOnly" | "Table" | "PivotTable" | "PivotChart"; + /** + * Specifies if the query loaded to the data model. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly loadedToDataModel: boolean; + /** + * Gets the name of the query. + Query names cannot contain periods or quotation marks. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly name: string; + /** + * Gets the date and time when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly refreshDate: Date; + /** + * Gets the number of rows that were loaded when the query was last refreshed. + If last refresh has errors the value will be -1. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly rowsLoadedCount: number; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.QueryLoadOptions): Excel.Query; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Query; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Query; + /** + * 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.Query object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.QueryData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.QueryData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.QueryData): void; + } + /** + * Represents the collection of queries in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + class QueryCollection 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.Query[]; + /** + * Gets the number of queries in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a query from the collection based on its name. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param key The name of the query case-insensitive. + * @returns The query with the given name. If there is no query by that name, then an error is thrown. + */ + getItem(key: string): Excel.Query; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.QueryCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.QueryCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.QueryCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.QueryCollection; + /** + * 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.QueryCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.QueryCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.QueryCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.QueryCollectionData): void; + } + /** + * An enum that specifies the query load error message. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + enum QueryError { + /** + * Unknown error. + * @remarks + * [Api set: ExcelApi 1.14] + */ + unknown = "Unknown", + /** + * No error. + * @remarks + * [Api set: ExcelApi 1.14] + */ + none = "None", + /** + * Load to the worksheet failed. + * @remarks + * [Api set: ExcelApi 1.14] + */ + failedLoadToWorksheet = "FailedLoadToWorksheet", + /** + * Load to the data model failed. + * @remarks + * [Api set: ExcelApi 1.14] + */ + failedLoadToDataModel = "FailedLoadToDataModel", + /** + * Download failed. + * @remarks + * [Api set: ExcelApi 1.14] + */ + failedDownload = "FailedDownload", + /** + * Download did not complete. + * @remarks + * [Api set: ExcelApi 1.14] + */ + failedToCompleteDownload = "FailedToCompleteDownload" + } + /** + * Visual Tracker allows clients to request visual properties and receive updated properties when + changes occur. This is intended for use internally along with the library here: + https://office.visualstudio.com/OC/_git/biplat.uniformobjects + + Excel.VisualCollection and its related APIs are better suited for external use in getting visual + property state. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class VisualTracker 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 for the visual tracker. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * Make a request to change the tracking being done on visuals. The JSON encoding the request + is produced by the biplat.uniformobjects library, as the return value from + `VisualsMirror.createTrackingAlterationRequestJson()`. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param requestSourceName A name to uniquely identify the requestor. Used by VisualTracker to know + * when to replace an existing request vs. service a new requestor. + * @param trackingAlterationRequestJson The return value from + * `VisualsMirror.createTrackingAlterationRequestJson()`. + */ + requestTrackingAlteration(requestSourceName: string, trackingAlterationRequestJson: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.VisualTrackerLoadOptions): Excel.VisualTracker; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.VisualTracker; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.VisualTracker; + /** + * Event to receive model updates as tracked visuals change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onModelChanged: 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.VisualTracker object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.VisualTrackerData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.VisualTrackerData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.VisualTrackerData): void; + } + /** + * Event args which are passed to the handler when a Visual Tracker model change + event is triggered. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface VisualTrackerModelChangedEventArgs { + /** + * JSON representing a Visual Tracker model change as defined by the library here: + https://office.visualstudio.com/OC/_git/biplat.uniformobjects + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + modelChangeJson: string; + } + /** + * A key-value pair to describe a properties of a range's number format. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class NumberFormatProperty 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 number format is of type currency. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly currency: boolean; + /** + * Indicates if the number format is of type date-time. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly dateTime: boolean; + /** + * Indicates if the date-time format has day-of-week. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly dateTimeHasDayOfWeek: boolean; + /** + * Indicates if the date-time format has month. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly dateTimeHasMonth: boolean; + /** + * Indicates if the date-time format has year. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly dateTimeHasYear: boolean; + /** + * A key that corresponds to a number format. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly key: string; + /** + * Indicates if the number format is of type numeric. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly numeric: boolean; + /** + * Indicates if the number format is of type percentage. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly percent: boolean; + /** + * Indicates if the number format is of type text. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly text: boolean; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NumberFormatPropertyLoadOptions): Excel.NumberFormatProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NumberFormatProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.NumberFormatProperty; + /** + * 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.NumberFormatProperty object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NumberFormatPropertyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.NumberFormatPropertyData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.NumberFormatPropertyData): void; + } + /** + * Represents a collection of `NumberFormatProperty` objects. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class NumberFormatPropertyCollection 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.NumberFormatProperty[]; + /** + * Gets a `NumberFormatProperty` object by using its index in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index The index of the `NumberFormatProperty` type object in the collection. + * @returns The `NumberFormatProperty` object at the given index. + */ + getItemAt(index: number): Excel.NumberFormatProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NumberFormatPropertyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.NumberFormatPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NumberFormatPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.NumberFormatPropertyCollection; + /** + * 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.NumberFormatPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NumberFormatPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.NumberFormatPropertyCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.NumberFormatPropertyCollectionData): void; + } + /** + * Represents an optimization that can be performed on a single range. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class RangeOptimization 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 list of optimizations that can be applied to this range. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly optimizationTypes: Excel.RangeOptimizationType[]; + /** + * The address of a range that can be optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly range: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeOptimizationLoadOptions): Excel.RangeOptimization; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeOptimization; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.RangeOptimization; + /** + * 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.RangeOptimization object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeOptimizationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.RangeOptimizationData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeOptimizationData): void; + } + /** + * Represents the set of optimizations that can be performed in a worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class RangeOptimizationCollection 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.RangeOptimization[]; + /** + * The number of cells that are allocated in the worksheet associated with this collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly allocatedCells: number; + /** + * The number of cells in the collection that can be optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly optimizableCells: number; + /** + * Returns the number of ranges in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * Returns a range optimization by its index in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index The index of the optimization object in the collection. + */ + getItemAt(index: number): Excel.RangeOptimization; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeOptimizationCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeOptimizationCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeOptimizationCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.RangeOptimizationCollection; + /** + * 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.RangeOptimizationCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeOptimizationCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.RangeOptimizationCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeOptimizationCollectionData): void; + } + /** + * Represents a type of optimization that can be made to a range of cells. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum RangeOptimizationType { + /** + * Cells that have content that does not fall into any of + the buckets below. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + other = "Other", + /** + * Cells that have non-default number formatting. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + numberFormat = "NumberFormat", + /** + * Cells that have non-default text alignment. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + textAlignment = "TextAlignment", + /** + * Cells that have non-default text properties like font and weight. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + textProperties = "TextProperties", + /** + * Cells that have a non-default border defined. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + cellBorder = "CellBorder", + /** + * Cells that have a non-default fill color. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + fillColor = "FillColor", + /** + * Cells that have sheet protection applied. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + sheetProtection = "SheetProtection", + /** + * Cells with a non-default row height. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rowHeight = "RowHeight", + /** + * Cells with a non-default row visibility. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rowVisibility = "RowVisibility" + } + /** + * Provides an interface to scan a worksheet for potential optimizations, as well as perform said optimizations. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class WorksheetOptimization 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; + /** + * Optimizes the worksheet, returning the number of cells that were + allocated and the number of cells that were optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + optimize(): Excel.WorksheetOptimizationResult; + /** + * Scans the worksheet for optimizations that can be made, returning a collection + of potential optimizations. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + scan(): Excel.RangeOptimizationCollection; + /** + * Scan the worksheet for optimizations that can be made, returning allocatedCells, optimizableCells, + and the collection of optimizations that can be made. This is created to replace the original scan() + to give the option to extend additional types of optimizable content, and to avoid the expensive + enumeration of entire collection to request the cell properties. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + scanExtended(): Excel.WorksheetOptimizationScanResult; + /** + * 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.WorksheetOptimization object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetOptimizationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * Represents the result of a worksheet optimization. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class WorksheetOptimizationResult 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 number of cells that were allocated in the worksheet + before the optimization took place. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly allocatedCells: number; + /** + * The number of cells that were optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly optimizedCells: number; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorksheetOptimizationResultLoadOptions): Excel.WorksheetOptimizationResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorksheetOptimizationResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.WorksheetOptimizationResult; + /** + * 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.WorksheetOptimizationResult object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetOptimizationResultData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.WorksheetOptimizationResultData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.WorksheetOptimizationResultData): void; + } + /** + * Contains information about a linked workbook. + If a workbook has links pointing to data in another workbook, the second workbook is linked to the first workbook. + In this scenario, the second workbook is called the "linked workbook". + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + class LinkedWorkbook 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 original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly id: string; + /** + * Makes a request to break the links pointing to the linked workbook. + Links in formulas are replaced with the latest fetched data. + The current `LinkedWorkbook` object is invalidated and removed from `LinkedWorkbookCollection`. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + breakLinks(): void; + /** + * Makes a request to refresh the data retrieved from the linked workbook. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + refresh(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.LinkedWorkbookLoadOptions): Excel.LinkedWorkbook; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.LinkedWorkbook; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.LinkedWorkbook; + /** + * 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.LinkedWorkbook object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LinkedWorkbookData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.LinkedWorkbookData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.LinkedWorkbookData): void; + } + /** + * Represents a collection of linked workbook objects. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + class LinkedWorkbookCollection 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.LinkedWorkbook[]; + /** + * Represents the update mode of the workbook links. The mode is same for all of the workbook links present in the workbook. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + workbookLinksRefreshMode: Excel.WorkbookLinksRefreshMode | "Manual" | "Automatic"; + /** + * Breaks all the links to the linked workbooks. Once the links are broken, any formulas referencing workbook links are removed entirely and replaced with the most recently retrieved values. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + breakAllLinks(): void; + /** + * Gets information about a linked workbook by its URL. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param key The URL of the linked workbook. + * @returns The linked workbook with the given URL. + */ + getItem(key: string): Excel.LinkedWorkbook; + /** + * Gets information about a linked workbook by its URL. If the workbook does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param key The URL of the linked workbook. + * @returns The linked workbook with given URL. + */ + getItemOrNullObject(key: string): Excel.LinkedWorkbook; + /** + * Makes a request to refresh all the workbook links. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + refreshAll(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.LinkedWorkbookCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.LinkedWorkbookCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.LinkedWorkbookCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.LinkedWorkbookCollection; + /** + * 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.LinkedWorkbookCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LinkedWorkbookCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.LinkedWorkbookCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.LinkedWorkbookCollectionData): void; + } + /** + * Represents the refresh mode of the workbook links. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + enum WorkbookLinksRefreshMode { + /** + * The workbook links are updated manually. + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + manual = "Manual", + /** + * The workbook links are updated at a set interval determined by the Excel application. + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + automatic = "Automatic" + } + /** + * Represents the type of change recorded in the task change record. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum DocumentTaskChangeAction { + /** + * Represents an unknown change type. This value will be returned when the version of Excel running doesn't understand the type of the change record that is in the loaded file. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + unknown = "unknown", + /** + * Represents the creation of a new task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + create = "create", + /** + * Represents a user being assigned to a task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assign = "assign", + /** + * Represents a user being unassigned from a task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + unassign = "unassign", + /** + * Represents all users being unassigned from a task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + unassignAll = "unassignAll", + /** + * Represents an update to a task's `startDateTime` or `dueDateTime`. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setSchedule = "setSchedule", + /** + * Represents an update to a task's percentage complete. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setPercentComplete = "setPercentComplete", + /** + * Represents an update to a task's priority. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setPriority = "setPriority", + /** + * Represents the deletion of a task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + remove = "remove", + /** + * Represents the restoration of a task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + restore = "restore", + /** + * Represents a change in the title of a task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setTitle = "setTitle", + /** + * Represents a previous task action being undone. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + undo = "undo" + } + /** + * Represents a recorded change to the task, to be used as an input parameter. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DocumentTaskChangeProperties { + /** + * Represents the user assigned to the task for an `assign` change action, or the user unassigned from the task for an `unassign` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignee?: Excel.EmailIdentity; + /** + * Represents the identity of the user who made the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + changedBy: Excel.EmailIdentity; + /** + * Represents the ID of the `comment` or `commentReply` to which the task change is anchored. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + commentId?: string; + /** + * Represents the creation date and time of the task change record. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: Date; + /** + * Represents the task's due date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the due date and time. It should be set together with `startDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dueDateTime?: Date; + /** + * The unique GUID of the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id: string; + /** + * Represents the task's completion percentage. It is used for the `setPercentComplete` change action. + This is a value betwen 0 and 100, where 100 represents a completed task.Changing this value to 100 also completes the associated comment.Changing the completion from 100 to a lower value reactivates the associated comment. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: number; + /** + * Represents the task's priority. It is used for the `setPriority` change action. + This is a value between 0 and 10, with 5 being the default priority if not set, and where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: number; + /** + * Represents the task's start date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the start date and time. It should be set together with `dueDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startDateTime?: Date; + /** + * Represents the task's title. It is used for the `setTitle` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: string; + /** + * Represents the action type of the task change record. Some examples of action types are assign, undo, and setPriority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: Excel.DocumentTaskChangeAction | "unknown" | "create" | "assign" | "unassign" | "unassignAll" | "setSchedule" | "setPercentComplete" | "setPriority" | "remove" | "restore" | "setTitle" | "undo"; + /** + * Represents the `DocumentTaskChange.id` property that was undone for the `undo` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + undoChangeId?: string; + } + /** + * Represents a recorded change to the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class DocumentTaskChange 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 user assigned to the task for an `assign` change action, or the user unassigned from the task for an `unassign` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly assignee: Excel.EmailIdentity; + /** + * Represents the identity of the user who made the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly changedBy: Excel.EmailIdentity; + /** + * Represents the ID of the comment or commentReply to which the task change is anchored. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly commentId: string; + /** + * Represents creation date and time of the task change record. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly createdDateTime: Date; + /** + * Represents the task's due date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the due date and time. It should be set together with `startDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly dueDateTime: Date; + /** + * The unique GUID of the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * Represents the task's completion percentage. It is used for the `setPercentComplete` change action. + This is a value betwen 0 and 100, where 100 represents a completed task.Changing this value to 100 also completes the associated comment.Changing the completion from 100 to a lower value reactivates the associated comment. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly percentComplete: number; + /** + * Represents the task's priority. It is used for the `setPriority` change action. + This is a value between 0 and 10, with 5 being the default priority if not set, and where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly priority: number; + /** + * Represents the task's start date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the start date and time. It should be set together with `dueDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly startDateTime: Date; + /** + * Represents the task's title. It is used for `setTitle` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly title: string; + /** + * Represents the action type of the task change record. Some examples of action types are assign, undo, and setPriority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly type: Excel.DocumentTaskChangeAction | "unknown" | "create" | "assign" | "unassign" | "unassignAll" | "setSchedule" | "setPercentComplete" | "setPriority" | "remove" | "restore" | "setTitle" | "undo"; + /** + * Represents the `DocumentTaskChange.id` property that was undone for the `undo` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly undoChangeId: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DocumentTaskChangeLoadOptions): Excel.DocumentTaskChange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DocumentTaskChange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.DocumentTaskChange; + /** + * Create a new instance of Excel.DocumentTaskChange object + */ + static newObject(context: OfficeExtension.ClientRequestContext): Excel.DocumentTaskChange; + /** + * 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.DocumentTaskChange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DocumentTaskChangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.DocumentTaskChangeData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.DocumentTaskChangeData): void; + } + /** + * Represents a collection of change records for a task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class DocumentTaskChangeCollection 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.DocumentTaskChange[]; + /** + * Gets the number of change records in the collection for the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a task change record by using its index in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index The records are stored in chronological order from when the changes were recorded by Excel and are not necessarily ordered by `CreatedDateTime`. The `create` record is always at index 0. + * @returns The change record with the given index. + */ + getItemAt(index: number): Excel.DocumentTaskChange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DocumentTaskChangeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.DocumentTaskChangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DocumentTaskChangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.DocumentTaskChangeCollection; + /** + * 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.DocumentTaskChangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DocumentTaskChangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.DocumentTaskChangeCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.DocumentTaskChangeCollectionData): void; + } + /** + * Represents information about a user's identity. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface Identity { + /** + * Represents the user's display name. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + displayName?: string; + /** + * Represents the user's unique ID. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id: string; + } + /** + * Represents information about a user's identity. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface EmailIdentity { + /** + * Represents the user's display name. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + displayName?: string; + /** + * Represents the user's email. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + email?: string; + /** + * Represents the user's unique ID. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id: string; + } + /** + * The UI control to select ranges. Activating the `RangePicker` lets users select cells through the Excel UI and limits other input options + (as seen when choosing arguments for a formula). + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class RangePicker 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; + /** + * Activates the `RangePicker`, which limits the Excel UI controls to cell selection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param initialRange The initially selected range for the range picker. + */ + activate(initialRange?: string): void; + /** + * Deactivates the `RangePicker`, which returns the Excel UI to its normal state. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + deactivate(): void; + /** + * Sets the `RangePicker` selection to the range at the given address. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param selectedRange The address at which the range picker selection will be set. + */ + updateSelection(selectedRange: string): void; + /** + * Updates the selection for the `RangePicker`. When using this method with a key listener, you should map the updates to the expected behavior of the Excel UI. + The expected key behavior in Excel is as follows: + - Up arrow key, Move one cell up in a worksheet. + + - Down arrow key, Move one cell down in a worksheet. + + - Left arrow key, Move one cell left in a worksheet. + + - Right arrow key, Move one cell right in a worksheet. + + - Ctrl+Arrow key, Move to the edge of the current data region in a worksheet. + + - Shift+Arrow key, Extend the selection of cells by one cell. + + - Ctrl+Shift+Arrow key, Extend the selection of cells to the last nonblank cell in the same column or row as the active cell, or if the next cell is blank, to the next nonblank cell. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param direction The direction of movement to change the range, either up, down, left, or right. If no direction is specified, the selection will become the passed in range. + * @param getNextDataRegionCell A boolean which is true when the selection should jump to the next populated cell if not currently populated, the last + * populated cell if currently populated, and the last cell possible otherwise. This action is performed when Ctrl is held with arrow keys in Excel on the grid. + * The `getNextDataRegionCell` parameter should be true if Shift is held down. + * @param expandSelection Whether or not to expand a selection and increase the total height or width. This is performed when Shift is held with arrow keys + * in Excel on the grid. The `expandSelection` parameter will be true if the user is holding Shift. + * @param startingSelectionAddress The start of the selection where selection should be built out from in the picker mode selection. If no range is specified, the picker builds from its current state. + */ + updateSelectionWithNavigation(getNextDataRegionCell: boolean, expandSelection: boolean, direction: Excel.KeyboardDirection, startingSelectionAddress?: string): void; + /** + * Updates the selection for the `RangePicker`. When using this method with a key listener, you should map the updates to the expected behavior of the Excel UI. + The expected key behavior in Excel is as follows: + - Up arrow key, Move one cell up in a worksheet. + + - Down arrow key, Move one cell down in a worksheet. + + - Left arrow key, Move one cell left in a worksheet. + + - Right arrow key, Move one cell right in a worksheet. + + - Ctrl+Arrow key, Move to the edge of the current data region in a worksheet. + + - Shift+Arrow key, Extend the selection of cells by one cell. + + - Ctrl+Shift+Arrow key, Extend the selection of cells to the last nonblank cell in the same column or row as the active cell, or if the next cell is blank, to the next nonblank cell. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param direction The direction of movement to change the range, either up, down, left, or right. If no direction is specified, the selection will become the passed in range. + * @param getNextDataRegionCell A boolean which is true when the selection should jump to the next populated cell if not currently populated, the last + * populated cell if currently populated, and the last cell possible otherwise. This action is performed when Ctrl is held with arrow keys in Excel on the grid. + * The `getNextDataRegionCell` parameter should be true if Shift is held down. + * @param expandSelection Whether or not to expand a selection and increase the total height or width. This is performed when Shift is held with arrow keys + * in Excel on the grid. The `expandSelection` parameter will be true if the user is holding Shift. + * @param startingSelectionAddress The start of the selection where selection should be built out from in the picker mode selection. If no range is specified, the picker builds from its current state. + */ + updateSelectionWithNavigation(getNextDataRegionCell: boolean, expandSelection: boolean, direction: "Left" | "Right" | "Up" | "Down", startingSelectionAddress?: string): void; + /** + * Occurs when the RangePicker is deactivated. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * Occurs when the cell selection has changed while the `RangePicker` is activated. + * + * @remarks + * [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.RangePicker object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangePickerData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * Provides information about the `RangePicker` selection that raised the `SelectionChanged` event, which fires when the selection is changed in the range picker. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RangePickerSelectionChangedEventArgs { + /** + * Gets the address of the selection change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + address: string; + /** + * Gets the ID of the worksheet where the selection changed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } + /** + * Represents information about a task's schedule. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DocumentTaskSchedule { + /** + * Gets the date and time that the task is due. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dueDateTime: Date; + /** + * Gets the date and time that the task should start. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startDateTime: Date; + } + /** + * Represents a task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class DocumentTask 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 change records of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly changes: Excel.DocumentTaskChangeCollection; + /** + * Gets the comment associated with the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly comment: Excel.Comment; + /** + * Returns a collection of assignees of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly assignees: Excel.EmailIdentity[]; + /** + * Gets the most recent user to have completed the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly completedBy: Excel.EmailIdentity; + /** + * Gets the date and time that the task was completed. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly completedDateTime: Date; + /** + * Gets the user who created the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly createdBy: Excel.EmailIdentity; + /** + * Gets the date and time that the task was created. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly createdDateTime: Date; + /** + * Gets the ID of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete: number; + /** + * Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority: number; + /** + * Gets or sets the date and time the task should start and is due. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startAndDueDateTime: Excel.DocumentTaskSchedule; + /** + * Specifies title of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title: string; + /** + * Adds the given user to the list of assignees attached to the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param assignee The identity of the user to add to the assignee list. + */ + assign(assignee: Excel.EmailIdentity): void; + /** + * Removes the given user from the list of assignees attached to the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param assignee The identity of the user to remove from the assignee list. + */ + unassign(assignee: Excel.EmailIdentity): void; + /** + * Removes all users from the list of assignees attached to the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + unassignAll(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DocumentTaskLoadOptions): Excel.DocumentTask; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DocumentTask; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.DocumentTask; + /** + * 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.DocumentTask object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DocumentTaskData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.DocumentTaskData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.DocumentTaskData): void; + } + /** + * Represents a collection of tasks. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class DocumentTaskCollection 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.DocumentTask[]; + /** + * Gets the number of tasks in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a task using its ID. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The ID of the task. + * @returns The task with the given ID. If there is no task with the given ID, then an `ItemNotFound` exception is thrown. + */ + getItem(key: string): Excel.DocumentTask; + /** + * Gets a task by its index in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index The index of the task in the collection. + * @returns The task with the given index. + */ + getItemAt(index: number): Excel.DocumentTask; + /** + * Gets a task using its ID. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The ID of the task. + * @returns The task with the given ID. If there is no task with the given ID, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + */ + getItemOrNullObject(key: string): Excel.DocumentTask; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DocumentTaskCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.DocumentTaskCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DocumentTaskCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.DocumentTaskCollection; + /** + * 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.DocumentTaskCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DocumentTaskCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.DocumentTaskCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.DocumentTaskCollectionData): void; + } + /** + * Represents a connection to a data source. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class DataConnection 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; + /** + * Specifies the data returned based on the command type. + If data source type is SQL, this is a SQL query used to retrieve the data. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly commandText: string; + /** + * The connection string containing the information needed to establish a connection to the data source. + Refer to the documentation for the specific data source type for more information on what information this string should contain and how it should be formatted. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly connectionString: string; + /** + * The data source type of the connection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly dataSourceType: Excel.DataSourceType | "Unknown" | "Cube" | "LocalRange" | "LocalTable" | "OledbDefault"; + /** + * The name of the connection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly name: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DataConnectionLoadOptions): Excel.DataConnection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DataConnection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.DataConnection; + /** + * 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.DataConnection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DataConnectionData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.DataConnectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.DataConnectionData): void; + } + /** + * Represents a command type of `DataConnection`. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + enum DataSourceType { + /** + * The data source type is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.15] + */ + unknown = "Unknown", + /** + * Contains a cube name for an OLAP data source. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + cube = "Cube", + /** + * The data source type is a range in the current workbook. + * @remarks + * [Api set: ExcelApi 1.15] + */ + localRange = "LocalRange", + /** + * The data source type is a table in the current workbook. + * @remarks + * [Api set: ExcelApi 1.15] + */ + localTable = "LocalTable", + /** + * Contains command text that the OLE DB provider (such as Power BI) understands. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + oledbDefault = "OledbDefault" + } + /** + * Enum representing all accepted conditions by which a date filter can be applied. + Used to configure the type of PivotFilter that is applied to the field. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum DateFilterCondition { + /** + * `DateFilterCondition` is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.12] + */ + unknown = "Unknown", + /** + * Equals comparator criterion. + + Required Criteria: {`comparator`}. + Optional Criteria: {`wholeDays`, `exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + equals = "Equals", + /** + * Date is before comparator date. + + Required Criteria: {`comparator`}. + Optional Criteria: {`wholeDays`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + before = "Before", + /** + * Date is before or equal to comparator date. + + Required Criteria: {`comparator`}. + Optional Criteria: {`wholeDays`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + beforeOrEqualTo = "BeforeOrEqualTo", + /** + * Date is after comparator date. + + Required Criteria: {`comparator`}. + Optional Criteria: {`wholeDays`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + after = "After", + /** + * Date is after or equal to comparator date. + + Required Criteria: {`comparator`}. + Optional Criteria: {`wholeDays`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + afterOrEqualTo = "AfterOrEqualTo", + /** + * Between `lowerBound` and `upperBound` dates. + + Required Criteria: {`lowerBound`, `upperBound`}. + Optional Criteria: {`wholeDays`, `exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + between = "Between", + /** + * Date is tomorrow. + * @remarks + * [Api set: ExcelApi 1.12] + */ + tomorrow = "Tomorrow", + /** + * Date is today. + * @remarks + * [Api set: ExcelApi 1.12] + */ + today = "Today", + /** + * Date is yesterday. + * @remarks + * [Api set: ExcelApi 1.12] + */ + yesterday = "Yesterday", + /** + * Date is next week. + * @remarks + * [Api set: ExcelApi 1.12] + */ + nextWeek = "NextWeek", + /** + * Date is this week. + * @remarks + * [Api set: ExcelApi 1.12] + */ + thisWeek = "ThisWeek", + /** + * Date is last week. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lastWeek = "LastWeek", + /** + * Date is next month. + * @remarks + * [Api set: ExcelApi 1.12] + */ + nextMonth = "NextMonth", + /** + * Date is this month. + * @remarks + * [Api set: ExcelApi 1.12] + */ + thisMonth = "ThisMonth", + /** + * Date is last month. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lastMonth = "LastMonth", + /** + * Date is next quarter. + * @remarks + * [Api set: ExcelApi 1.12] + */ + nextQuarter = "NextQuarter", + /** + * Date is this quarter. + * @remarks + * [Api set: ExcelApi 1.12] + */ + thisQuarter = "ThisQuarter", + /** + * Date is last quarter. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lastQuarter = "LastQuarter", + /** + * Date is next year. + * @remarks + * [Api set: ExcelApi 1.12] + */ + nextYear = "NextYear", + /** + * Date is this year. + * @remarks + * [Api set: ExcelApi 1.12] + */ + thisYear = "ThisYear", + /** + * Date is last year. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lastYear = "LastYear", + /** + * Date is in the same year to date. + * @remarks + * [Api set: ExcelApi 1.12] + */ + yearToDate = "YearToDate", + /** + * Date is in Quarter 1. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodQuarter1 = "AllDatesInPeriodQuarter1", + /** + * Date is in Quarter 2. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodQuarter2 = "AllDatesInPeriodQuarter2", + /** + * Date is in Quarter 3. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodQuarter3 = "AllDatesInPeriodQuarter3", + /** + * Date is in Quarter 4. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodQuarter4 = "AllDatesInPeriodQuarter4", + /** + * Date is in January. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodJanuary = "AllDatesInPeriodJanuary", + /** + * Date is in February. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodFebruary = "AllDatesInPeriodFebruary", + /** + * Date is in March. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodMarch = "AllDatesInPeriodMarch", + /** + * Date is in April. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodApril = "AllDatesInPeriodApril", + /** + * Date is in May. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodMay = "AllDatesInPeriodMay", + /** + * Date is in June. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodJune = "AllDatesInPeriodJune", + /** + * Date is in July. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodJuly = "AllDatesInPeriodJuly", + /** + * Date is in August. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodAugust = "AllDatesInPeriodAugust", + /** + * Date is in September. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodSeptember = "AllDatesInPeriodSeptember", + /** + * Date is in October. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodOctober = "AllDatesInPeriodOctober", + /** + * Date is in November. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodNovember = "AllDatesInPeriodNovember", + /** + * Date is in December. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodDecember = "AllDatesInPeriodDecember" + } + /** + * Enum representing all accepted conditions by which a label filter can be applied. + Used to configure the type of PivotFilter that is applied to the field. + `PivotFilter.criteria.exclusive` can be set to `true` to invert many of these conditions. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum LabelFilterCondition { + /** + * `LabelFilterCondition` is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.12] + */ + unknown = "Unknown", + /** + * Equals comparator criterion. + + Required Criteria: {`comparator`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + equals = "Equals", + /** + * Label begins with substring criterion. + + Required Criteria: {`substring`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + beginsWith = "BeginsWith", + /** + * Label ends with substring criterion. + + Required Criteria: {`substring`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + endsWith = "EndsWith", + /** + * Label contains substring criterion. + + Required Criteria: {`substring`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + contains = "Contains", + /** + * Greater than comparator criterion. + + Required Criteria: {`comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + greaterThan = "GreaterThan", + /** + * Greater than or equal to comparator criterion. + + Required Criteria: {`comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + greaterThanOrEqualTo = "GreaterThanOrEqualTo", + /** + * Less than comparator criterion. + + Required Criteria: {`comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lessThan = "LessThan", + /** + * Less than or equal to comparator criterion. + + Required Criteria: {`comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lessThanOrEqualTo = "LessThanOrEqualTo", + /** + * Between `lowerBound` and `upperBound` criteria. + + Required Criteria: {`lowerBound`, `upperBound`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + between = "Between" + } + /** + * Configurable template for a date filter to apply to a PivotField. + The `condition` defines what criteria need to be set in order for the filter to operate. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface PivotDateFilter { + /** + * The comparator is the static value to which other values are compared. The type of comparison is defined by the condition. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + comparator?: Excel.FilterDatetime; + /** + * Specifies the condition for the filter, which defines the necessary filtering criteria. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + condition: Excel.DateFilterCondition | "Unknown" | "Equals" | "Before" | "BeforeOrEqualTo" | "After" | "AfterOrEqualTo" | "Between" | "Tomorrow" | "Today" | "Yesterday" | "NextWeek" | "ThisWeek" | "LastWeek" | "NextMonth" | "ThisMonth" | "LastMonth" | "NextQuarter" | "ThisQuarter" | "LastQuarter" | "NextYear" | "ThisYear" | "LastYear" | "YearToDate" | "AllDatesInPeriodQuarter1" | "AllDatesInPeriodQuarter2" | "AllDatesInPeriodQuarter3" | "AllDatesInPeriodQuarter4" | "AllDatesInPeriodJanuary" | "AllDatesInPeriodFebruary" | "AllDatesInPeriodMarch" | "AllDatesInPeriodApril" | "AllDatesInPeriodMay" | "AllDatesInPeriodJune" | "AllDatesInPeriodJuly" | "AllDatesInPeriodAugust" | "AllDatesInPeriodSeptember" | "AllDatesInPeriodOctober" | "AllDatesInPeriodNovember" | "AllDatesInPeriodDecember"; + /** + * If `true`, filter *excludes* items that meet criteria. The default is `false` (filter to include items that meet criteria). + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + exclusive?: boolean; + /** + * The lower-bound of the range for the `between` filter condition. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + lowerBound?: Excel.FilterDatetime; + /** + * The upper-bound of the range for the `between` filter condition. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + upperBound?: Excel.FilterDatetime; + /** + * For `equals`, `before`, `after`, and `between` filter conditions, indicates if comparisons should be made as whole days. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + wholeDays?: boolean; + } + /** + * A simple enum that represents a type of filter for a PivotField. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum PivotFilterType { + /** + * `PivotFilterType` is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.12] + */ + unknown = "Unknown", + /** + * Filters based on the value of a PivotItem with respect to a `DataPivotHierarchy`. + * @remarks + * [Api set: ExcelApi 1.12] + */ + value = "Value", + /** + * Filters specific manually selected PivotItems from the PivotTable. + * @remarks + * [Api set: ExcelApi 1.12] + */ + manual = "Manual", + /** + * Filters PivotItems based on their labels. + Note: A PivotField cannot simultaneously have a label filter and a date filter applied. + * @remarks + * [Api set: ExcelApi 1.12] + */ + label = "Label", + /** + * Filters PivotItems with a date in place of a label. + Note: A PivotField cannot simultaneously have a label filter and a date filter applied. + * @remarks + * [Api set: ExcelApi 1.12] + */ + date = "Date" + } + /** + * An interface representing all PivotFilters currently applied to a given PivotField. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface PivotFilters { + /** + * The PivotField's currently applied date filter. This property is `null` if no value filter is applied. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + dateFilter?: Excel.PivotDateFilter; + /** + * The PivotField's currently applied label filter. This property is `null` if no value filter is applied. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + labelFilter?: Excel.PivotLabelFilter; + /** + * The PivotField's currently applied manual filter. This property is `null` if no value filter is applied. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + manualFilter?: Excel.PivotManualFilter; + /** + * The PivotField's currently applied value filter. This property is `null` if no value filter is applied. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + valueFilter?: Excel.PivotValueFilter; + } + /** + * Configurable template for a label filter to apply to a PivotField. + The `condition` defines what criteria need to be set in order for the filter to operate. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface PivotLabelFilter { + /** + * The comparator is the static value to which other values are compared. The type of comparison is defined by the condition. + Note: A numeric string is treated as a number when being compared against other numeric strings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + comparator?: string; + /** + * Specifies the condition for the filter, which defines the necessary filtering criteria. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + condition: Excel.LabelFilterCondition | "Unknown" | "Equals" | "BeginsWith" | "EndsWith" | "Contains" | "GreaterThan" | "GreaterThanOrEqualTo" | "LessThan" | "LessThanOrEqualTo" | "Between"; + /** + * If `true`, filter *excludes* items that meet criteria. The default is `false` (filter to include items that meet criteria). + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + exclusive?: boolean; + /** + * The lower-bound of the range for the `between` filter condition. + Note: A numeric string is treated as a number when being compared against other numeric strings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + lowerBound?: string; + /** + * The substring used for `beginsWith`, `endsWith`, and `contains` filter conditions. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + substring?: string; + /** + * The upper-bound of the range for the `between` filter condition. + Note: A numeric string is treated as a number when being compared against other numeric strings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + upperBound?: string; + } + /** + * Configurable template for a manual filter to apply to a PivotField. + The `condition` defines what criteria need to be set in order for the filter to operate. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface PivotManualFilter { + /** + * A list of selected items to manually filter. These must be existing and valid items from the chosen field. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + selectedItems?: (string | PivotItem)[]; + } + /** + * Configurable template for a value filter to apply to a PivotField. + The `condition` defines what criteria need to be set in order for the filter to operate. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface PivotValueFilter { + /** + * The comparator is the static value to which other values are compared. The type of comparison is defined by the condition. + For example, if comparator is "50" and condition is "greaterThan", all item values that are not greater than 50 will be removed by the filter. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + comparator?: number; + /** + * Specifies the condition for the filter, which defines the necessary filtering criteria. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + condition: Excel.ValueFilterCondition | "Unknown" | "Equals" | "GreaterThan" | "GreaterThanOrEqualTo" | "LessThan" | "LessThanOrEqualTo" | "Between" | "TopN" | "BottomN"; + /** + * If `true`, filter *excludes* items that meet criteria. The default is `false` (filter to include items that meet criteria). + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + exclusive?: boolean; + /** + * The lower-bound of the range for the `between` filter condition. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + lowerBound?: number; + /** + * Specifies if the filter is for the top/bottom N items, top/bottom N percent, or top/bottom N sum. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + selectionType?: Excel.TopBottomSelectionType | "Items" | "Percent" | "Sum"; + /** + * The "N" threshold number of items, percent, or sum to be filtered for a top/bottom filter condition. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + threshold?: number; + /** + * The upper-bound of the range for the `between` filter condition. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + upperBound?: number; + /** + * Name of the chosen "value" in the field by which to filter. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + value: string; + } + /** + * A simple enum for top/bottom filters to select whether to filter by the top N or bottom N percent, number, or sum of values. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum TopBottomSelectionType { + /** + * Filter the top/bottom N number of items as measured by the chosen value. + * @remarks + * [Api set: ExcelApi 1.12] + */ + items = "Items", + /** + * Filter the top/bottom N percent of items as measured by the chosen value. + * @remarks + * [Api set: ExcelApi 1.12] + */ + percent = "Percent", + /** + * Filter the top/bottom N sum as measured by the chosen value. + * @remarks + * [Api set: ExcelApi 1.12] + */ + sum = "Sum" + } + /** + * Enum representing all accepted conditions by which a value filter can be applied. + Used to configure the type of PivotFilter that is applied to the field. + `PivotFilter.exclusive` can be set to `true` to invert many of these conditions. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum ValueFilterCondition { + /** + * `ValueFilterCondition` is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.12] + */ + unknown = "Unknown", + /** + * Equals comparator criterion. + + Required Criteria: {`value`, `comparator`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + equals = "Equals", + /** + * Greater than comparator criterion. + + Required Criteria: {`value`, `comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + greaterThan = "GreaterThan", + /** + * Greater than or equal to comparator criterion. + + Required Criteria: {`value`, `comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + greaterThanOrEqualTo = "GreaterThanOrEqualTo", + /** + * Less than comparator criterion. + + Required Criteria: {`value`, `comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lessThan = "LessThan", + /** + * Less than or equal to comparator criterion. + + Required Criteria: {`value`, `comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lessThanOrEqualTo = "LessThanOrEqualTo", + /** + * Between `lowerBound` and `upperBound` criteria. + + Required Criteria: {`value`, `lowerBound`, `upperBound`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + between = "Between", + /** + * In top N (`threshold`) [items, percent, sum] of value category. + + Required Criteria: {`value`, `threshold`, `selectionType`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + topN = "TopN", + /** + * In bottom N (`threshold`) [items, percent, sum] of value category. + + Required Criteria: {`value`, `threshold`, `selectionType`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + bottomN = "BottomN" + } + /** + * Represents a built-in PivotTable style + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum BuiltInPivotTableStyle { + /** + * None + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + none = "None", + /** + * "Dark 1" (black in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light1 = "Light1", + /** + * "Accent 1" (blue in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light2 = "Light2", + /** + * "Accent 2" (orange in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light3 = "Light3", + /** + * "Accent 3" (gray in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light4 = "Light4", + /** + * "Accent 4" (yellow in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light5 = "Light5", + /** + * "Accent 5" (light blue in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light6 = "Light6", + /** + * "Accent 6" (green in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light7 = "Light7", + /** + * "Dark 1" (black in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light8 = "Light8", + /** + * "Accent 1" (blue in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light9 = "Light9", + /** + * "Accent 2" (orange in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light10 = "Light10", + /** + * "Accent 3" (gray in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light11 = "Light11", + /** + * "Accent 4" (yellow in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light12 = "Light12", + /** + * "Accent 5" (light blue in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light13 = "Light13", + /** + * "Accent 6" (green in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light14 = "Light14", + /** + * "Dark 1" (black in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light15 = "Light15", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light16 = "Light16", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light17 = "Light17", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light18 = "Light18", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light19 = "Light19", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light20 = "Light20", + /** + * "Accent 6" (green in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light21 = "Light21", + /** + * "Dark 1" (black in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light22 = "Light22", + /** + * "Accent 1" (blue in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light23 = "Light23", + /** + * "Accent 2" (orange in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light24 = "Light24", + /** + * "Accent 3" (gray in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light25 = "Light25", + /** + * "Accent 4" (yellow in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light26 = "Light26", + /** + * "Accent 5" (light blue in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light27 = "Light27", + /** + * "Accent 6" (green in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light28 = "Light28", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium1 = "Medium1", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium2 = "Medium2", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium3 = "Medium3", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium4 = "Medium4", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium5 = "Medium5", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium6 = "Medium6", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium7 = "Medium7", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium8 = "Medium8", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium9 = "Medium9", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium10 = "Medium10", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium11 = "Medium11", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium12 = "Medium12", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium13 = "Medium13", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium14 = "Medium14", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium15 = "Medium15", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium16 = "Medium16", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium17 = "Medium17", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium18 = "Medium18", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium19 = "Medium19", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium20 = "Medium20", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium21 = "Medium21", + /** + * "Dark 1" (black in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium22 = "Medium22", + /** + * "Accent 1" (blue in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium23 = "Medium23", + /** + * "Accent 2" (orange in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium24 = "Medium24", + /** + * "Accent 3" (gray in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium25 = "Medium25", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium26 = "Medium26", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium27 = "Medium27", + /** + * "Accent 6" (green in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium28 = "Medium28", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark1 = "Dark1", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark2 = "Dark2", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark3 = "Dark3", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark4 = "Dark4", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark5 = "Dark5", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark6 = "Dark6", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark7 = "Dark7", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark8 = "Dark8", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark9 = "Dark9", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark10 = "Dark10", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark11 = "Dark11", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark12 = "Dark12", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark13 = "Dark13", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark14 = "Dark14", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark15 = "Dark15", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark16 = "Dark16", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark17 = "Dark17", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark18 = "Dark18", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark19 = "Dark19", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark20 = "Dark20", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark21 = "Dark21", + /** + * "Dark 1" (black in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark22 = "Dark22", + /** + * "Accent 1" (blue in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark23 = "Dark23", + /** + * "Accent 2" (orange in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark24 = "Dark24", + /** + * "Accent 3" (gray in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark25 = "Dark25", + /** + * "Accent 4" (yellow in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark26 = "Dark26", + /** + * "Accent 5" (light blue in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark27 = "Dark27", + /** + * "Accent 6" (green in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark28 = "Dark28" + } + /** + * Represents a built-in slicer style. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum BuiltInSlicerStyle { + /** + * "Accent 1" (blue in the default "Office" theme) with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light1 = "Light1", + /** + * "Accent 2" (orange in the default "Office" theme) with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light2 = "Light2", + /** + * "Accent 3" (gray in the default "Office" theme) with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light3 = "Light3", + /** + * "Accent 4" (yellow in the default "Office" theme) with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light4 = "Light4", + /** + * "Accent 5" (light blue in the default "Office" theme) with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light5 = "Light5", + /** + * "Accent 6" (green in the default "Office" theme) with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light6 = "Light6", + /** + * Dark gray with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + other1 = "Other1", + /** + * Medium blue with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + other2 = "Other2", + /** + * "Accent 1" (blue in the default "Office" theme) with dark shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark1 = "Dark1", + /** + * "Accent 2" (orange in the default "Office" theme) with dark shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark2 = "Dark2", + /** + * "Accent 3" (gray in the default "Office" theme) with dark shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark3 = "Dark3", + /** + * "Accent 4" (yellow in the default "Office" theme) with dark shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark4 = "Dark4", + /** + * "Accent 5" (light blue in the default "Office" theme) with dark shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark5 = "Dark5", + /** + * "Accent 6" (green in the default "Office" theme) with dark shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark6 = "Dark6" + } + /** + * Represents a built-in table style. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum BuiltInTableStyle { + /** + * "Dark 1" (black in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light1 = "Light1", + /** + * "Accent 1" (blue in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light2 = "Light2", + /** + * "Accent 2" (orange in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light3 = "Light3", + /** + * "Accent 3" (gray in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light4 = "Light4", + /** + * "Accent 4" (yellow in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light5 = "Light5", + /** + * "Accent 5" (light blue in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light6 = "Light6", + /** + * "Accent 6" (green in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light7 = "Light7", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light8 = "Light8", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light9 = "Light9", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light10 = "Light10", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light11 = "Light11", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light12 = "Light12", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light13 = "Light13", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light14 = "Light14", + /** + * "Dark 1" (black in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light15 = "Light15", + /** + * "Accent 1" (blue in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light16 = "Light16", + /** + * "Accent 2" (orange in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light17 = "Light17", + /** + * "Accent 3" (gray in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light18 = "Light18", + /** + * "Accent 4" (yellow in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light19 = "Light19", + /** + * "Accent 5" (light blue in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light20 = "Light20", + /** + * "Accent 6" (green in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light21 = "Light21", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium1 = "Medium1", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium2 = "Medium2", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium3 = "Medium3", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium4 = "Medium4", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium5 = "Medium5", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium6 = "Medium6", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium7 = "Medium7", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium8 = "Medium8", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium9 = "Medium9", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium10 = "Medium10", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium11 = "Medium11", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium12 = "Medium12", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium13 = "Medium13", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium14 = "Medium14", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium15 = "Medium15", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium16 = "Medium16", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium17 = "Medium17", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium18 = "Medium18", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium19 = "Medium19", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium20 = "Medium20", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium21 = "Medium21", + /** + * "Dark 1" (black in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium22 = "Medium22", + /** + * "Accent 1" (blue in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium23 = "Medium23", + /** + * "Accent 2" (orange in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium24 = "Medium24", + /** + * "Accent 3" (gray in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium25 = "Medium25", + /** + * "Accent 4" (yellow in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium26 = "Medium26", + /** + * "Accent 5" (light blue in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium27 = "Medium27", + /** + * "Accent 6" (green in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium28 = "Medium28", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark1 = "Dark1", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark2 = "Dark2", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark3 = "Dark3", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark4 = "Dark4", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark5 = "Dark5", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark6 = "Dark6", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark7 = "Dark7", + /** + * Black with filled header, striped rows, light + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark8 = "Dark8", + /** + * Orange with filled header, striped rows, light + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark9 = "Dark9", + /** + * Yellow with filled header, striped rows, light + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark10 = "Dark10", + /** + * Green with filled header, striped rows, light + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark11 = "Dark11" + } + /** + * Represents the dimensions when getting values from chart series. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum ChartSeriesDimension { + /** + * The chart series axis for the categories. + * @remarks + * [Api set: ExcelApi 1.12] + */ + categories = "Categories", + /** + * The chart series axis for the values. + * @remarks + * [Api set: ExcelApi 1.12] + */ + values = "Values", + /** + * The chart series axis for the x-axis values in scatter and bubble charts. + * @remarks + * [Api set: ExcelApi 1.12] + */ + xvalues = "XValues", + /** + * The chart series axis for the y-axis values in scatter and bubble charts. + * @remarks + * [Api set: ExcelApi 1.12] + */ + yvalues = "YValues", + /** + * The chart series axis for the bubble sizes in bubble charts. + * @remarks + * [Api set: ExcelApi 1.12] + */ + bubbleSizes = "BubbleSizes" + } + /** + * Provides information about the selection that raised the selection changed event. + + **Note**: If multiple, discontiguous cells are selected, `Binding.onSelectionChanged` only reports row and column information for one selection. Use `Worksheet.onSelectionChanged` for multiple selected ranges. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface BindingSelectionChangedEventArgs { + /** + * Gets a temporary `Binding` object that contains the ID of the `Binding` object that raised the event. Use that ID with `BindingCollection.getItem(id)` to get the binding. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + binding: Excel.Binding; + /** + * Gets the number of columns selected. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnCount: number; + /** + * Gets the number of rows selected. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowCount: number; + /** + * Gets the index of the first column of the selection (zero-based). + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + startColumn: number; + /** + * Gets the index of the first row of the selection (zero-based). + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + startRow: number; + } + /** + * Provides information about the binding that raised the data changed event. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface BindingDataChangedEventArgs { + /** + * Gets a temporary `Binding` object that contains the ID of the `Binding` object that raised the event. Use that ID with `BindingCollection.getItem(id)` to get the binding. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + binding: Excel.Binding; + } + /** + * Provides information about the document that raised the selection changed event. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface SelectionChangedEventArgs { + /** + * Gets the workbook object that raised the selection changed event. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + workbook: Excel.Workbook; + } + /** + * Provides information about the setting that raised the settings changed event + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + interface SettingsChangedEventArgs { + /** + * Gets the `Setting` object that represents the binding that raised the settings changed event + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + settings: Excel.SettingCollection; + } + /** + * Provides information about the workbook that raised the activated event. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + interface WorkbookActivatedEventArgs { + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + type: "WorkbookActivated"; + } + /** + * Provides information about the workbook's `onAutoSaveSettingChanged` event. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface WorkbookAutoSaveSettingChangedEventArgs { + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "WorkbookAutoSaveSettingChanged"; + } + /** + * Represents the direction that existing or remaining cells in a worksheet will shift when cells are inserted into or deleted from a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + interface ChangeDirectionState { + /** + * Represents the direction (such as up or to the left) that the remaining cells will shift when a cell or cells are deleted. + Note:`insertShiftDirection` and `deleteShiftDirection` are exclusive and both enums can't have a value at the same time. If one has a value, then the other will return `undefined`. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + deleteShiftDirection: Excel.DeleteShiftDirection | "Up" | "Left"; + /** + * Represents the direction (such as down or to the right) that the existing cells will shift when a new cell or cells are inserted. + Note:`insertShiftDirection` and `deleteShiftDirection` are exclusive and both enums can't have a value at the same time. If one has a value, then the other will return `undefined`. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + insertShiftDirection: Excel.InsertShiftDirection | "Down" | "Right"; + } + /** + * Provides information about the details of a `WorksheetChangedEvent` or `TableChangedEvent`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChangedEventDetail { + /** + * Represents the value after the change. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + valueAfter: any; + /** + * Represents the type of value after the change. + Unlike `valueAfter`, `valueAsJsonAfter` can represent all cell values, such as formatted number, web image, and entity data types. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJsonAfter: CellValue; + /** + * Represents the type of value before the change. + Unlike `valueBefore`, `valueAsJsonBefore` can represent all cell values, such as formatted number, web image, and entity data types. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJsonBefore: CellValue; + /** + * Represents the value before the change. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + valueBefore: any; + /** + * Represents the type of value after the change. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + valueTypeAfter: Excel.RangeValueType | "Unknown" | "Empty" | "String" | "Integer" | "Double" | "Boolean" | "Error" | "RichValue"; + /** + * Represents the type of value before the change. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + valueTypeBefore: Excel.RangeValueType | "Unknown" | "Empty" | "String" | "Integer" | "Double" | "Boolean" | "Error" | "RichValue"; + } + /** + * Provides information about the worksheet that raised the changed event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorksheetChangedEventArgs { + /** + * Gets the range address that represents the changed area of a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * Gets the change type that represents how the changed event is triggered. See `Excel.DataChangeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + changeType: Excel.DataChangeType | "Unknown" | "RangeEdited" | "RowInserted" | "RowDeleted" | "ColumnInserted" | "ColumnDeleted" | "CellInserted" | "CellDeleted"; + /** + * Represents the information about the change detail. This property can be retrieved when the changed event is triggered on a single cell. If the changed event is triggered on multiple cells, this property cannot be retrieved. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + details: Excel.ChangedEventDetail; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetChanged"; + /** + * Gets the ID of the worksheet in which the data changed. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + /** + * Represents a change to the direction that the cells in a worksheet will shift when a cell or cells are deleted or inserted. This includes the following two scenarios. + 1. The direction (such as down or to the right) that existing cells will shift when a new cell or cells are inserted into a worksheet. + 2. The direction (such as up or to the left) that the remaining cells will shift when a cell or cells are deleted from a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + changeDirectionState: Excel.ChangeDirectionState; + /** + * Represents the trigger source of the event. For example, identifies whether this local add-in triggers the event. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + triggerSource: Excel.EventTriggerSource | "Unknown" | "ThisLocalAddin"; + /** + * + * 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 worksheet format change event. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface WorksheetFormatChangedEventArgs { + /** + * Gets the range address that represents the changed area of a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + address: string; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "WorksheetFormatChanged"; + /** + * Gets the ID of the worksheet in which the data changed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheetId: string; + /** + * + * Gets the range that represents the changed area of a specific worksheet. + * + * [Api set: ExcelApi 1.9] + */ + 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.9] + */ + getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range; + } + /** + * Provides information about the worksheet's row hidden change event. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + interface WorksheetRowHiddenChangedEventArgs { + /** + * Gets the range address that represents the changed area of a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + address: string; + /** + * Gets the type of change that represents how the event was triggered. See `Excel.RowHiddenChangeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + changeType: Excel.RowHiddenChangeType | "Unhidden" | "Hidden"; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + type: "WorksheetRowHiddenChanged"; + /** + * Gets the ID of the worksheet in which the data changed. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + worksheetId: string; + } + /** + * Provides information about the table that raised the changed event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface TableChangedEventArgs { + /** + * Gets the address that represents the changed area of a table on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * Gets the change type that represents how the changed event is triggered. See `Excel.DataChangeType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the ID of the table in which the data changed. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "TableChanged"; + /** + * Gets the ID of the worksheet in which the data changed. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + /** + * Gets the information about the change detail. This property can be retrieved when the changed event is triggered on a single cell. If the changed event is triggered on multiple cells, this property cannot be retrieved. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + details: Excel.ChangedEventDetail; + /** + * + * 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 and formulas that raised the formula changed event. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + interface WorksheetFormulaChangedEventArgs { + /** + * Gets an array of `FormulaChangedEventDetail` objects, which contain the details about the all of the changed formulas. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + formulaDetails: Excel.FormulaChangedEventDetail[]; + /** + * The source of the event. It can be local or remote (through co-authoring). + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + type: "WorksheetFormulaChanged"; + /** + * Gets the ID of the worksheet in which the formula changed. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + worksheetId: string; + } + /** + * Provides information about a changed formula during a formula changed event. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + interface FormulaChangedEventDetail { + /** + * The address of the cell that contains the changed formula. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + cellAddress: string; + /** + * Represents the previous formula, before it was changed. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + previousFormula: string; + } + /** + * Provides information about the worksheet that raised the protection status changed event, which fires when the protection status is updated in a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + interface WorksheetProtectionChangedEventArgs { + /** + * Specifies if any of the `AllowEditRange` objects have changed. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + allowEditRangesChanged: boolean; + /** + * Gets the current protection status of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + isProtected: boolean; + /** + * Specifies if the `WorksheetProtectionOptions` have changed. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + protectionOptionsChanged: boolean; + /** + * Specifies if the worksheet password has changed. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + sheetPasswordChanged: boolean; + /** + * The source of the event. It can be local or remote (through co-authoring). + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + type: "WorksheetProtectionChanged"; + /** + * Gets the ID of the worksheet in which the protection status is changed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + worksheetId: string; + } + /** + * Provides information about the table that raised the filter applied event. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface TableFilteredEventArgs { + /** + * Gets the ID of the table in which the filter is applied. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "TableFiltered"; + /** + * Gets the ID of the worksheet which contains the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the filter applied event. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface WorksheetFilteredEventArgs { + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "WorksheetFiltered"; + /** + * Gets the ID of the worksheet in which the filter is applied. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the activated event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorksheetActivatedEventArgs { + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetActivated"; + /** + * Gets the ID of the worksheet that is activated. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the deactivated event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorksheetDeactivatedEventArgs { + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetDeactivated"; + /** + * Gets the ID of the worksheet that is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * Provides information about the row-sorted event and its related worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface WorksheetRowSortedEventArgs { + /** + * Gets the range address that represents the sorted areas of a specific worksheet. Only rows changed as a result of the sort operation are returned. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + address: string; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + type: "WorksheetRowSorted"; + /** + * Gets the ID of the worksheet where the sorting happened. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheetId: string; + } + /** + * Provides information about the column-sorted event and its related worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface WorksheetColumnSortedEventArgs { + /** + * Gets the range address that represents the sorted areas of a specific worksheet. Only columns changed as a result of the sort operation are returned. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + address: string; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + type: "WorksheetColumnSorted"; + /** + * Gets the ID of the worksheet where the sorting happened. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the selection changed event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorksheetSelectionChangedEventArgs { + /** + * Gets the range address that represents the selected area of a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetSelectionChanged"; + /** + * Gets the ID of the worksheet in which the selection changed. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * Provides information about the left-clicked/tapped event and its related worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface WorksheetSingleClickedEventArgs { + /** + * Gets the address that represents the cell which was left-clicked/tapped for a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + address: string; + /** + * The distance, in points, from the left-clicked/tapped point to the left (or right for right-to-left languages) gridline edge of the left-clicked/tapped cell. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + offsetX: number; + /** + * The distance, in points, from the left-clicked/tapped point to the top gridline edge of the left-clicked/tapped cell. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + offsetY: number; + /** + * Gets the type of the event. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + type: "WorksheetSingleClicked"; + /** + * Gets the ID of the worksheet in which the cell was left-clicked/tapped. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheetId: string; + } + /** + * Provides information about a WAC operation, e.g., `SetCell`. + * + * @remarks + * [Api set: WACOperationEvents 1.1] + */ + interface WACOperationEventArgs { + /** + * Gets the ID of the WAC operation that occurred. + * + * @remarks + * [Api set: WACOperationEvents 1.1] + */ + eventId: number; + /** + * Gets the JSON payload of a WAC operation. + * + * @remarks + * [Api set: WACOperationEvents 1.1] + */ + payload: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: WACOperationEvents 1.1] + */ + type: "WACOperationEvent"; + } + /** + * The recording state. + * + * @remarks + * [Api set: WACOperationEvents 1.1] + */ + interface RecordingStateChangedEventArgs { + /** + * The recording state. + * + * @remarks + * [Api set: WACOperationEvents 1.1] + */ + recording: boolean; + } + /** + * Provides information about the table that raised the selection changed event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface TableSelectionChangedEventArgs { + /** + * Gets the range address that represents the selected area of the table on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * Specifies if the selection is inside a table. `IsInsideTable` must be set to `true` for the address to be useful. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isInsideTable: boolean; + /** + * Gets the ID of the table in which the selection changed. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "TableSelectionChanged"; + /** + * Gets the ID of the worksheet in which the selection changed. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the added event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorksheetAddedEventArgs { + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetAdded"; + /** + * Gets the ID of the worksheet that is added to the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the deleted event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorksheetDeletedEventArgs { + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetDeleted"; + /** + * Gets the ID of the worksheet that is deleted from the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * Provides information about the chart that raised the added event. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartAddedEventArgs { + /** + * Gets the ID of the chart that is added to the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + chartId: string; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + type: "ChartAdded"; + /** + * Gets the ID of the worksheet in which the chart is added. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * Provides information about the chart that raised the activated event. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartActivatedEventArgs { + /** + * Gets the ID of the chart that is activated. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + chartId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + type: "ChartActivated"; + /** + * Gets the ID of the worksheet in which the chart is activated. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * Provides information about the chart that raised the deactivated event. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartDeactivatedEventArgs { + /** + * Gets the ID of the chart that is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + chartId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + type: "ChartDeactivated"; + /** + * Gets the ID of the worksheet in which the chart is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * Provides information about the chart that raised the deleted event. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartDeletedEventArgs { + /** + * Gets the ID of the chart that is deleted from the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + chartId: string; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + type: "ChartDeleted"; + /** + * Gets the ID of the worksheet in which the chart is deleted. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * Provides information about the visual that raised the selection changed event. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface VisualSelectionChangedEventArgs { + /** + * Gets whether event is triggered by a revision load. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + revisionLoad: boolean; + /** + * Gets the ID of selected visual. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + selectedVisualId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + type: "VisualSelectionChanged"; + /** + * Gets the ID of the worksheet in which the visual is activated. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheetId: string; + } + /** + * Event for BI Visual change notification. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface VisualChangeEventArgs { + /** + * Gets the visual change notification type of this event. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + changeType: Excel.VisualChangeType | "DataChange" | "PropertyChange" | "GenericChange" | "SelectionChange"; + /** + * Payload of this event. The payload encodes the extra information + for this event, which should be mutually understood by both sides + of the communication. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + payload: string; + /** + * ID of the target object that receives this event. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + targetId: string; + /** + * Type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + type: "VisualChange"; + } + /** + * Provides information about the worksheet that raised the calculated event. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface WorksheetCalculatedEventArgs { + /** + * The address of the range that completed calculation. + If multiple ranges completed calculation, the string is a comma-separated list of those range addresses. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + address: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + type: "WorksheetCalculated"; + /** + * Gets the ID of the worksheet in which the calculation occurred. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * Update for an AgaveVisual. Contains a JSON payload with data and properties updates. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface AgaveVisualUpdateEventArgs { + /** + * JSON payload with data and properties updates. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + payload: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + type: Excel.EventType | "WorksheetChanged" | "WorksheetSelectionChanged" | "WorksheetAdded" | "WorksheetActivated" | "WorksheetDeactivated" | "TableChanged" | "TableSelectionChanged" | "WorksheetDeleted" | "ChartAdded" | "ChartActivated" | "ChartDeactivated" | "ChartDeleted" | "WorksheetCalculated" | "VisualSelectionChanged" | "AgaveVisualUpdate" | "TableAdded" | "TableDeleted" | "TableFiltered" | "WorksheetFiltered" | "ShapeActivated" | "ShapeDeactivated" | "VisualChange" | "WorkbookAutoSaveSettingChanged" | "WorksheetFormatChanged" | "WACOperationEvent" | "RibbonCommandExecuted" | "WorksheetRowSorted" | "WorksheetColumnSorted" | "WorksheetSingleClicked" | "WorksheetRowHiddenChanged" | "RecordingStateChangedEvent" | "CommentAdded" | "CommentDeleted" | "CommentChanged" | "LinkedDataTypeRefreshRequestCompleted" | "LinkedDataTypeRefreshModeChanged" | "LinkedDataTypeLinkedDataTypeAdded" | "WorksheetFormulaChanged" | "WorkbookActivated" | "LinkedWorkbookWorkbookLinksChanged" | "LinkedWorkbookRefreshCompleted" | "WorksheetProtectionChanged" | "WorksheetNameChanged" | "WorksheetVisibilityChanged" | "WorksheetMoved" | "LineageActivityUpdateAvailable" | "LineageActivityFilterUpdated" | "LineageActivityLoadCompleted" | "ShapeAdded" | "ShapeDeleted" | "PivotTableAdded" | "PivotTableDeleted" | "NamedItemAdded" | "NamedItemDeleted" | "WorksheetNavigationObjectChanged" | "WorkbookNavigationObjectChanged" | "WorksheetRowHeightChanged" | "WorkbookFormulaReferenceStyleChanged" | "GuidedReapplyManagerUpdateAvailable" | "VbaRecorderRecordingChanged" | "RangeValuesPreviewDismissed" | "AnnotationAdded" | "WorkbookActionRecorded" | "ApplicationUndoChanged" | "VbaRecorderRecordingChanged2"; + } + /** + * Provides information about the table that raised the added event. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface TableAddedEventArgs { + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the ID of the table that is added. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tableId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "TableAdded"; + /** + * Gets the ID of the worksheet in which the table is added. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheetId: string; + } + /** + * Provides information about the table that raised the deleted event. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface TableDeletedEventArgs { + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the ID of the table that is deleted. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tableId: string; + /** + * Gets the name of the table that is deleted. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tableName: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "TableDeleted"; + /** + * Gets the ID of the worksheet in which the table is deleted. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheetId: string; + } + /** + * Provides information about the comments that raised the comment added event. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface CommentAddedEventArgs { + /** + * Gets the `CommentDetail` array that contains the comment ID and IDs of its related replies. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentDetails: Excel.CommentDetail[]; + /** + * Specifies the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + type: "CommentAdded"; + /** + * Gets the ID of the worksheet in which the event happened. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + worksheetId: string; + } + /** + * Provides information about the comments that raised the comment deleted event. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface CommentDeletedEventArgs { + /** + * Gets the `CommentDetail` array that contains the comment ID and IDs of its related replies. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentDetails: Excel.CommentDetail[]; + /** + * Specifies the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + type: "CommentDeleted"; + /** + * Gets the ID of the worksheet in which the event happened. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + worksheetId: string; + } + /** + * Occurs when existing comments are changed. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface CommentChangedEventArgs { + /** + * Gets the change type that represents how the changed event is triggered. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + changeType: Excel.CommentChangeType | "CommentEdited" | "CommentResolved" | "CommentReopened" | "ReplyAdded" | "ReplyDeleted" | "ReplyEdited"; + /** + * Get the `CommentDetail` array which contains the comment ID and IDs of its related replies. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentDetails: Excel.CommentDetail[]; + /** + * Specifies the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + type: "CommentChanged"; + /** + * Gets the ID of the worksheet in which the event happened. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + worksheetId: string; + } + /** + * A structure for the comment ID and IDs of its related replies. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface CommentDetail { + /** + * Represents the IDs of the related replies that belong to the comment. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + replyIds: string[]; + /** + * Represents the ID of the comment. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentId: string; + } + /** + * Provides information about the shape that raised the activated event. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeActivatedEventArgs { + /** + * Gets the ID of the activated shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shapeId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "ShapeActivated"; + /** + * Gets the ID of the worksheet in which the shape is activated. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheetId: string; + } + /** + * Provides information about the shape that raised the deactivated event. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeDeactivatedEventArgs { + /** + * Gets the ID of the shape deactivated shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shapeId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "ShapeDeactivated"; + /** + * Gets the ID of the worksheet in which the shape is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheetId: string; + } + /** + * Provides information about the button clicked at the `onExecuteCommand` event + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface RibbonCommandExecutedEventArgs { + /** + * Gets the TCID of the button clicked + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + buttonId: number; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "RibbonCommandExecuted"; + } + /** + * Represents the Excel Runtime class. + * + * @remarks + * [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; + /** + * Toggle JavaScript events in the current task pane or content add-in. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RuntimeLoadOptions): Excel.Runtime; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Runtime; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RuntimeData): void; + } + /** + * Represents the Excel application that manages the workbook. + * + * @remarks + * [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; + /** + * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly cultureInfo: Excel.CultureInfo; + /** + * Returns the iterative calculation settings. + In Excel on Windows and Mac, the settings will apply to the Excel Application. + In Excel on the web and other platforms, the settings will apply to the active workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly iterativeCalculation: Excel.IterativeCalculation; + /** + * Gets the ribbon of the application. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly ribbon: Excel.Ribbon; + /** + * Returns the Excel calculation engine version used for the last full recalculation. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + /** + * Returns the calculation state of the application. See `Excel.CalculationState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly calculationState: Excel.CalculationState | "Done" | "Calculating" | "Pending"; + /** + * Gets the string used as the decimal separator for numeric values. This is based on the local Excel settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly decimalSeparator: string; + /** + * Specifies whether the "Format Stale values" button under Calculation Options is turned on or off. + The stale formulas are rendered with stale formatting if the button is turned on. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + formatStaleValues: boolean; + /** + * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on the local Excel settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly thousandsSeparator: string; + /** + * Specifies if the system separators of Excel are enabled. + System separators include the decimal separator and thousands separator. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly useSystemSeparators: 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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param calculationType Specifies the calculation type to use. See `Excel.CalculationType` for details. + */ + calculate(calculationType: "Recalculate" | "Full" | "FullRebuild"): void; + /** + * Launch user interface to explore a premium license. + throws An error if the request fails. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param premiumLicenseName The name of the premium license to explore. + */ + explorePremiumLicense(premiumLicenseName: Excel.PremiumLicenseName): void; + /** + * Launch user interface to explore a premium license. + throws An error if the request fails. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param premiumLicenseName The name of the premium license to explore. + */ + explorePremiumLicense(premiumLicenseName: "Python"): void; + /** + * Gets the premium license status for the signed-in user. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param premiumLicenseName The name of the premium license to retrieve. + */ + hasLicense(premiumLicenseName: Excel.PremiumLicenseName): OfficeExtension.ClientResult; + /** + * Gets the premium license status for the signed-in user. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param premiumLicenseName The name of the premium license to retrieve. + */ + hasLicense(premiumLicenseName: "Python"): OfficeExtension.ClientResult; + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + suspendApiCalculationUntilNextSync(): void; + /** + * Suspends screen updating until the next `context.sync()` is called. + + **Note**: Don't call `suspendScreenUpdatingUntilNextSync` repeatedly (such as in a loop). Repeated calls will cause the Excel window to flicker. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + suspendScreenUpdatingUntilNextSync(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ApplicationLoadOptions): Excel.Application; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Application; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ApplicationData): void; + } + /** + * Represents the iterative calculation settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enabled: boolean; + /** + * Specifies the maximum amount of change between each iteration as Excel resolves circular references. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxChange: number; + /** + * Specifies the maximum number of iterations that Excel can use to resolve a circular reference. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.IterativeCalculationLoadOptions): Excel.IterativeCalculation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.IterativeCalculation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.IterativeCalculationData): void; + } + /** + * Workbook is the top level object which contains related workbook objects such as worksheets, tables, and ranges. + To learn more about the workbook object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-workbooks | Work with workbooks using the Excel JavaScript API}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly application: Excel.Application; + /** + * Gets the Augmentation loop object. + Augmentation loop enables running intelligent services on office documents + and returns back annotations that can be attached to this content. + Annotations can be queried using Office JS so that partners can consume them in their SDXes. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly augmentationLoop: Excel.AugmentationLoop; + /** + * Represents a collection of bindings that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly bindings: Excel.BindingCollection; + /** + * Show or hide the business bar for a specific entry. + A business bar is a notification bar that appears at the top of the Excel UI, just below the ribbon. + See values in EwaBusinessBarEntryType for more information. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly businessBar: Excel.BusinessBar; + /** + * Represents a collection of comments associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly comments: Excel.CommentCollection; + /** + * Represents the collection of custom XML parts contained by this workbook. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + readonly customXmlParts: Excel.CustomXmlPartCollection; + /** + * Represents all data connections in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly dataConnections: Excel.DataConnectionCollection; + /** + * Represents the API related to ExternalCodeService integration in the workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly externalCodeService: Excel.ExternalCodeService; + /** + * Represents a collection of worksheet functions that can be used for computation. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly functions: Excel.Functions; + /** + * Returns a collection of linked data types that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly linkedDataTypes: Excel.LinkedDataTypeCollection; + /** + * Returns a collection of linked workbooks. In formulas, the workbook links can be used to reference data (cell values and names) outside of the current workbook. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly linkedWorkbooks: Excel.LinkedWorkbookCollection; + /** + * Represents a collection of workbook-scoped named items (named ranges and constants). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly names: Excel.NamedItemCollection; + /** + * Represents a collection of PivotTableStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly pivotTableStyles: Excel.PivotTableStyleCollection; + /** + * Represents a collection of PivotTables associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly pivotTables: Excel.PivotTableCollection; + /** + * Gets the workbook properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly properties: Excel.DocumentProperties; + /** + * Returns the protection object for a workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly protection: Excel.WorkbookProtection; + /** + * Returns a collection of Power Query queries that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly queries: Excel.QueryCollection; + /** + * Provides functions to control the `RangePicker` in Excel. These APIs provide functionality similar to the keyboard controls when selecting ranges for functions. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly rangePicker: Excel.RangePicker; + /** + * Represents a collection of settings associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + readonly settings: Excel.SettingCollection; + /** + * Represents a collection of SlicerStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly slicerStyles: Excel.SlicerStyleCollection; + /** + * Represents a collection of slicers associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly slicers: Excel.SlicerCollection; + /** + * Represents a collection of styles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly styles: Excel.StyleCollection; + /** + * Represents a collection of TableStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly tableStyles: Excel.TableStyleCollection; + /** + * Represents a collection of tables associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly tables: Excel.TableCollection; + /** + * Returns a collection of tasks that are present in the workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly tasks: Excel.DocumentTaskCollection; + /** + * Represents a collection of TimelineStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly timelineStyles: Excel.TimelineStyleCollection; + /** + * The VBA Recorder. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly vbaRecorder: Excel.VbaRecorder; + /** + * Represents a collection of worksheets associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly worksheets: Excel.WorksheetCollection; + /** + * Specifies if the workbook is in AutoSave mode. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly autoSave: boolean; + /** + * Returns a number about the version of Excel Calculation Engine. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartDataPointTrack: boolean; + /** + * Specifies if changes have been made since the workbook 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isDirty: boolean; + /** + * Gets the workbook name. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly name: string; + /** + * Specifies if the workbook has ever been saved locally or online. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly previouslySaved: boolean; + /** + * Returns `true` if the workbook is open in read-only mode. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly readOnly: boolean; + /** + * Specifies whether the PivotTable's field list pane is shown at the workbook level. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showPivotFieldList: boolean; + /** + * True if the workbook uses the 1904 date system. + * + * @remarks + * [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`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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; + /** + * Close current workbook. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param closeBehavior workbook close behavior. + */ + close(closeBehavior?: Excel.CloseBehavior): void; + /** + * Close current workbook. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param closeBehavior workbook close behavior. + */ + close(closeBehavior?: "Save" | "SkipSave"): void; + /** + * Enables Office script recording for a given event ID. + This will only be used for Office Script and Maker Code Generator (MCG) when an SDX + wants to enable recording for a specific event. Recording for the `eventId` remains + enabled until the next sync. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param eventId The name of the event for which to enable rich API recording, such as `setGetProperties` + */ + enableOfficeScriptRecording(eventId: string): void; + /** + * Gets the currently active cell from the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getActiveCell(): Excel.Range; + /** + * Gets the currently active chart in the workbook. If there is no active chart, an `ItemNotFound` exception is thrown. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getActiveChart(): Excel.Chart; + /** + * Gets the currently active chart in the workbook. If there is no active chart, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getActiveChartOrNullObject(): Excel.Chart; + /** + * Gets the currently active slicer in the workbook. If there is no active slicer, an `ItemNotFound` exception is thrown. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getActiveSlicer(): Excel.Slicer; + /** + * Gets the currently active slicer in the workbook. If there is no active slicer, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getActiveSlicerOrNullObject(): Excel.Slicer; + /** + * Returns `true` if the workbook is being edited by multiple users (through 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getIsActiveCollabSession(): OfficeExtension.ClientResult; + /** + * Returns a `LinkedEntityCellValue` based on the provided `LinkedEntityId`. + * + * @remarks + * [Api set: ExcelApi 1.16] + * + * @param linkedEntityCellValueId An identifier that specifies a specific LinkedEntityCellValue. + */ + getLinkedEntityCellValue(linkedEntityCellValueId: LinkedEntityId): OfficeExtension.ClientResult; + /** + * Gets the currently selected single range from the workbook. If there are multiple ranges selected, this method will throw an error. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getSelectedRanges(): Excel.RangeAreas; + /** + * Provides a list of theme colors in Excel, based on the theme/color scheme applied to the document. + These theme colors will be used to populate the theme colors palette in the color picker menu. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getThemeColors(): OfficeExtension.ClientResult; + /** + * Inserts the specified worksheets from a source workbook into the current workbook. + + **Note**: This API is currently only supported for Office on Windows, Mac, and the web. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param base64File Required. The base64-encoded string representing the source workbook file. + * @param options Optional. The options that define which worksheets to insert and where in the workbook the new worksheets will be inserted. By default, all the worksheets from the source workbook are inserted at the end of the current workbook. + * @returns An array of IDs corresponding to each newly inserted worksheet. + */ + insertWorksheetsFromBase64(base64File: string, options?: Excel.InsertWorksheetOptions): OfficeExtension.ClientResult; + /** + * Performs Office Script recording. This method will only be visible to and invoked by an NPM package on + Office Scripts. When an SDX wants to record an action, it will call the NPM wrapper around this function, + which will pass the payload through XLO and to the Maker Code Generator. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param payload The payload details to be recorded. The NPM package that invokes this will enforce type. + */ + recordAction(payload: string): void; + /** + * Save current workbook. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param saveBehavior Workbook save behavior. + */ + save(saveBehavior?: Excel.SaveBehavior): void; + /** + * Save current workbook. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorkbookLoadOptions): Excel.Workbook; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Workbook; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Workbook; + /** + * This internal event should only be used by the Maker Code Editor SDX. + + Occurs when an action is recorded. + This event is fired when the `recordAction` API is called. + * + * @remarks + * [Api set: Recorder 1.1] + * + * @eventproperty + */ + readonly onActionRecorded: OfficeExtension.EventHandlers; + /** + * Occurs when the workbook is activated. Note: This event will not fire when the workbook is opened. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * Occurs when the AutoSave setting is changed on the workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onAutoSaveSettingChanged: OfficeExtension.EventHandlers; + /** + * Occurs when MacroRecorder starts/stops recording. + * + * @remarks + * [Api set: WACOperationEvents 1.1] + * + * @eventproperty + */ + readonly onRecordingStateChangedEvent: OfficeExtension.EventHandlers; + /** + * Occurs when the selection in the document is changed. + * + * @remarks + * [Api set: ExcelApi 1.2] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Occurs when a WAC operation occurs. + * + * @remarks + * [Api set: WACOperationEvents 1.1] + * + * @eventproperty + */ + readonly onWACOperationEvent: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.WorkbookData): void; + } + /** + * Represents the protection of a workbook object. + * + * @remarks + * [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; + /** + * Specifies if the workbook is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly protected: boolean; + /** + * Protects a workbook. Fails if the workbook has been protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param password Workbook protection password. + */ + protect(password?: string): void; + /** + * Unprotects a workbook. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorkbookProtectionLoadOptions): Excel.WorkbookProtection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorkbookProtection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.WorkbookProtectionData): void; + } + /** + * The `WorkbookCreated` object is the top level object created by `Application.CreateWorkbook`. A `WorkbookCreated` object is a special Workbook object. + * + * @remarks + * [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. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorkbookCreated; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * An Excel worksheet is a grid of cells. It can contain data, tables, charts, etc. + To learn more about the worksheet object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-worksheets | Work with worksheets using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly autoFilter: Excel.AutoFilter; + /** + * Returns a collection of charts that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly charts: Excel.ChartCollection; + /** + * Returns a collection of all the Comments objects on the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly comments: Excel.CommentCollection; + /** + * Gets a collection of worksheet-level custom properties. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly customProperties: Excel.WorksheetCustomPropertyCollection; + /** + * Gets an object that can be used to manipulate frozen panes on the worksheet. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly horizontalPageBreaks: Excel.PageBreakCollection; + /** + * Returns a collection of sheet views that are present in the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly namedSheetViews: Excel.NamedSheetViewCollection; + /** + * Collection of names scoped to the current worksheet. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + readonly names: Excel.NamedItemCollection; + /** + * Returns a `WorksheetOptimization` that can scan and perform optimizations on the worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly optimization: Excel.WorksheetOptimization; + /** + * Gets the `PageLayout` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly pageLayout: Excel.PageLayout; + /** + * Collection of PivotTables that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly pivotTables: Excel.PivotTableCollection; + /** + * Returns the sheet protection object for a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly protection: Excel.WorksheetProtection; + /** + * Shows the preview of range values. Previews are non-persistent and have no co-authoring impact. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly rangeValuesPreview: Excel.RangeValuesPreview; + /** + * Returns the collection of all the Shape objects on the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly shapes: Excel.ShapeCollection; + /** + * Returns a collection of slicers that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly slicers: Excel.SlicerCollection; + /** + * Collection of tables that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly tables: Excel.TableCollection; + /** + * Returns a collection of tasks that are present in the worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly tasks: Excel.DocumentTaskCollection; + /** + * Gets the vertical page break collection for the worksheet. This collection only contains manual page breaks. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly verticalPageBreaks: Excel.PageBreakCollection; + /** + * Returns the visual tracker associated with the worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly visualTracker: Excel.VisualTracker; + /** + * Returns a collection of visuals that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly visuals: Excel.VisualCollection; + /** + * Determines if Excel should recalculate the worksheet when necessary. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly id: string; + /** + * The display name of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * The zero-based position of the worksheet within the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position: number; + /** + * Specifies if gridlines are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showGridlines: boolean; + /** + * Specifies if headings are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showHeadings: boolean; + /** + * Returns the standard (default) height of all the rows in the worksheet, in points. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly standardHeight: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardWidth: number; + /** + * The tab color of the worksheet. + 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 #RRGGBB (e.g., "FFA500"). + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tabColor: string; + /** + * Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly tabId: number; + /** + * The visibility of the worksheet. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + activate(): void; + /** + * Calculates all cells on a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.6] + * + * @param markAllDirty True, to mark all as dirty. + */ + calculate(markAllDirty: boolean): void; + /** + * Copies a worksheet and places it at the specified position. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param positionType The location in the workbook to place the newly created worksheet. The default value is "None", which inserts the worksheet at the beginning of the worksheet. + * @param relativeTo The existing worksheet which determines the newly created worksheet's position. This is only needed if `positionType` is "Before" or "After". + * @returns The newly created worksheet. + */ + copy(positionType?: Excel.WorksheetPositionType, relativeTo?: Excel.Worksheet): Excel.Worksheet; + /** + * Copies a worksheet and places it at the specified position. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param positionType The location in the workbook to place the newly created worksheet. The default value is "None", which inserts the worksheet at the beginning of the worksheet. + * @param relativeTo The existing worksheet which determines the newly created worksheet's position. This is only needed if `positionType` is "Before" or "After". + * @returns The newly created worksheet. + */ + copy(positionType?: "None" | "Before" | "After" | "Beginning" | "End", relativeTo?: Excel.Worksheet): Excel.Worksheet; + /** + * Deletes the worksheet from the workbook. Note that if the worksheet's visibility is set to "VeryHidden", the delete operation will fail with an `InvalidOperation` exception. You should first change its visibility to hidden or visible before deleting it. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param text The string to find. + * @param criteria Additional search criteria, including whether the search needs to match the entire cell or be case-sensitive. + * @returns A `RangeAreas` 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param text The string to find. + * @param criteria Additional search criteria, including whether the search needs to match the entire cell or be case-sensitive. + * @returns A `RangeAreas` object, comprising one or more rectangular ranges, that matches the search criteria. If there are no matches, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + */ + 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. + * + * @remarks + * [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. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Gets the `RangeAreas` object, representing one or more blocks of rectangular ranges, specified by the address or name. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param address Optional. A string containing the comma-separated or semicolon-separated addresses or names of the individual ranges. For example, "A1:B2, A5:B5" or "A1:B2; A5:B5". If not specified, a `RangeAreas` 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). + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.4] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param text String to find. + * @param replacement The string that replaces the original string. + * @param criteria Additional replacement criteria. + * @returns The number of replacements performed. + */ + replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria): OfficeExtension.ClientResult; + /** + * Shows row or column groups by their outline levels. + Outlines groups and summarizes a list of data in the worksheet. + The `rowLevels` and `columnLevels` parameters specify how many levels of the outline will be displayed. + The acceptable argument range is between 0 and 8. + A value of 0 does not change the current display. A value greater than the current number of levels displays all the levels. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param rowLevels The number of row levels of an outline to display. + * @param columnLevels The number of column levels of an outline to display. + */ + showOutlineLevels(rowLevels: number, columnLevels: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorksheetLoadOptions): Excel.Worksheet; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Worksheet; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Worksheet; + /** + * Occurs when the worksheet is activated. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet is calculated. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onCalculated: OfficeExtension.EventHandlers; + /** + * Occurs when data changes in a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * Occurs when one or more columns have been sorted. This happens as the result of a left to right sort operation. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onColumnSorted: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * Occurs when a filter is applied on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFiltered: OfficeExtension.EventHandlers; + /** + * Occurs when format changed on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onFormatChanged: OfficeExtension.EventHandlers; + /** + * Occurs when one or more formulas are changed in this worksheet. This event is for when the formula itself changes, not the data value resulting from the formula's calculation. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @eventproperty + */ + readonly onFormulaChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet name is changed. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @eventproperty + */ + readonly onNameChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet protection state is changed. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @eventproperty + */ + readonly onProtectionChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the hidden state of one or more rows has changed on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @eventproperty + */ + readonly onRowHiddenChanged: OfficeExtension.EventHandlers; + /** + * Occurs when one or more rows have been sorted. This happens as the result of a top-to-bottom sort operation. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onRowSorted: OfficeExtension.EventHandlers; + /** + * Occurs when the selection changes on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Occurs when a left-clicked/tapped action happens in the worksheet. This event will not be fired when clicking in the following cases: + + - The user drags the mouse for multi-selection. + + - The user selects a cell in the mode when cell arguments are selected for formula references. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onSingleClicked: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet visibility is changed. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @eventproperty + */ + readonly onVisibilityChanged: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.WorksheetData): void; + } + /** + * Represents a collection of worksheet objects that are part of the workbook. + * + * @remarks + * [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[]; + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param name Optional. The name of the worksheet to be added. If specified, the name should be unique. 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. + + **Note**: This API is currently only supported for Office on Windows and Mac. And it has been deprecated, please use `Workbook.insertWorksheetFromBase64` instead. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param base64File Required. The base64-encoded string representing the source workbook file. + * @param sheetNamesToInsert Optional. The names of individual worksheets to insert. By default, all the worksheets from the source workbook are inserted. + * @param positionType Optional. Where in the current workbook the new worksheets will be inserted. See `Excel.WorksheetPositionType` for details. Default is "Start". + * @param relativeTo Optional. The worksheet in the current workbook that is referenced for the `positionType` parameter. Default is `null` and, based on `positionType`, it will insert worksheets at the start or end of the current workbook. + * @returns An array of IDs corresponding to each newly 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. + + **Note**: This API is currently only supported for Office on Windows and Mac. And it has been deprecated, please use `Workbook.insertWorksheetFromBase64` instead. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param base64File Required. The base64-encoded string representing the source workbook file. + * @param sheetNamesToInsert Optional. The names of individual worksheets to insert. By default, all the worksheets from the source workbook are inserted. + * @param positionType Optional. Where in the current workbook the new worksheets will be inserted. See `Excel.WorksheetPositionType` for details. Default is "Start". + * @param relativeTo Optional. The worksheet in the current workbook that is referenced for the `positionType` parameter. Default is `null` and, based on `positionType`, it will insert worksheets at the start or end of the current workbook. + * @returns An array of IDs corresponding to each newly 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getActiveWorksheet(): Excel.Worksheet; + /** + * Gets the number of worksheets in the collection. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorksheetCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.WorksheetCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorksheetCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.WorksheetCollection; + /** + * Occurs when any worksheet in the workbook is activated. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * Occurs when a new worksheet is added to the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onAdded: OfficeExtension.EventHandlers; + /** + * Occurs when any worksheet in the workbook is calculated. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onCalculated: OfficeExtension.EventHandlers; + /** + * Occurs when any worksheet in the workbook is changed. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * Occurs when one or more columns have been sorted. This happens as the result of a left-to-right sort operation. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onColumnSorted: OfficeExtension.EventHandlers; + /** + * Occurs when any worksheet in the workbook is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * Occurs when a worksheet is deleted from the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onDeleted: OfficeExtension.EventHandlers; + /** + * Occurs when any worksheet's filter is applied in the workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFiltered: OfficeExtension.EventHandlers; + /** + * Occurs when any worksheet in the workbook has a format changed. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onFormatChanged: OfficeExtension.EventHandlers; + /** + * Occurs when one or more formulas are changed in any worksheet of this collection. This event is for when the formula itself changes, not the data value resulting from the formula's calculation. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @eventproperty + */ + readonly onFormulaChanged: OfficeExtension.EventHandlers; + /** + * Occurs when a worksheet is moved within a workbook. This event only triggers when a worksheet is directly moved within a workbook. This event doesn't trigger when the position of a worksheet is indirectly changed, such as when a new worksheet is inserted and causes existing worksheets to change positions. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @eventproperty + */ + readonly onMoved: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet name is changed in the worksheet collection. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @eventproperty + */ + readonly onNameChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet protection state is changed. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @eventproperty + */ + readonly onProtectionChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the hidden state of one or more rows has changed on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @eventproperty + */ + readonly onRowHiddenChanged: OfficeExtension.EventHandlers; + /** + * Occurs when one or more rows have been sorted. This happens as the result of a top-to-bottom sort operation. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onRowSorted: OfficeExtension.EventHandlers; + /** + * Occurs when the selection changes on any worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Occurs when left-clicked/tapped operation happens in the worksheet collection. This event will not be fired when clicking in the following cases: + - The user drags the mouse for multi-selection. + - The user selects a cell in the mode when cell arguments are selected for formula references. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onSingleClicked: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet visibility is changed in the worksheet collection. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @eventproperty + */ + readonly onVisibilityChanged: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.WorksheetCollectionData): void; + } + /** + * Represents the protection of a worksheet object. + * + * @remarks + * [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; + /** + * Specifies the `AllowEditRangeCollection` object found in this worksheet. This is a collection of `AllowEditRange` objects, which work with worksheet protection properties. + When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly allowEditRanges: Excel.AllowEditRangeCollection; + /** + * Specifies if protection can be paused for this worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly canPauseProtection: boolean; + /** + * Specifies if the sheet is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly isPasswordProtected: boolean; + /** + * Specifies if worksheet protection is paused. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly isPaused: boolean; + /** + * Specifies the protection options for the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly options: Excel.WorksheetProtectionOptions; + /** + * Specifies if the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly protected: boolean; + /** + * Specifies the protection options saved in the worksheet. + This will return the same `WorksheetProtectionOptions` object regardless of the worksheet protection state. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly savedOptions: Excel.WorksheetProtectionOptions; + /** + * Specifies if the password can be used to unlock worksheet protection. + This method doesn't change the worksheet protection state. + If a password is input but no password is required to unlock worksheet protection, this method will return false. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param password The password to check against the protected worksheet. + * @returns Returns `true` if the password can be used to unlock worksheet protection. Otherwise, returns `false`. + */ + checkPassword(password?: string): OfficeExtension.ClientResult; + /** + * Pauses worksheet protection for the given worksheet object for the user in the current session. + This method does nothing if worksheet protection isn't enabled or is already paused. + If the password is incorrect, then this method throws an `InvalidArgument` error and fails to pause protection. + This method does not change the protection state if worksheet protection is not enabled or already paused. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param password The password associated with the protected worksheet. + */ + pauseProtection(password?: string): void; + /** + * Protects a worksheet. Fails if the worksheet has already been protected. + * + * @remarks + * [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; + /** + * Resumes worksheet protection for the given worksheet object for the user in a given session. + Worksheet protection must be paused for this method to work. If worksheet protection is not paused, then this method will not change the protection state of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + resumeProtection(): void; + /** + * Changes the password associated with the `WorksheetProtection` object. + Setting the password as an empty string ("") or as `null` will remove password protection from the `WorksheetProtection` object. + Worksheet protection must be enabled and paused for this method to work properly. + If worksheet protection is disabled, this method throws an `InvalidOperation` error and fails to change the password. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to change the password. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param password The password associated with the `WorksheetProtection` object. + */ + setPassword(password?: string): void; + /** + * Unprotects a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7 for password] + * + * @param password Sheet protection password. + */ + unprotect(password?: string): void; + /** + * Change the worksheet protection options associated with the `WorksheetProtection` object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to change the worksheet protection options. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param options The options interface associated with the `WorksheetProtection` object. + */ + updateOptions(options: Excel.WorksheetProtectionOptions): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorksheetProtectionLoadOptions): Excel.WorksheetProtection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorksheetProtection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.WorksheetProtectionData): void; + } + /** + * Represents the options in sheet protection. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface WorksheetProtectionOptions { + /** + * Represents the worksheet protection option allowing use of the AutoFilter feature. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowAutoFilter?: boolean; + /** + * Represents the worksheet protection option allowing deleting of columns. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowDeleteColumns?: boolean; + /** + * Represents the worksheet protection option allowing deleting of rows. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowDeleteRows?: boolean; + /** + * Represents the worksheet protection option allowing editing of objects. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + allowEditObjects?: boolean; + /** + * Represents the worksheet protection option allowing editing of scenarios. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + allowEditScenarios?: boolean; + /** + * Represents the worksheet protection option allowing formatting of cells. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowFormatCells?: boolean; + /** + * Represents the worksheet protection option allowing formatting of columns. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowFormatColumns?: boolean; + /** + * Represents the worksheet protection option allowing formatting of rows. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowFormatRows?: boolean; + /** + * Represents the worksheet protection option allowing inserting of columns. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowInsertColumns?: boolean; + /** + * Represents the worksheet protection option allowing inserting of hyperlinks. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowInsertHyperlinks?: boolean; + /** + * Represents the worksheet protection option allowing inserting of rows. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowInsertRows?: boolean; + /** + * Represents the worksheet protection option allowing use of the PivotTable feature. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowPivotTables?: boolean; + /** + * Represents the worksheet protection option allowing use of the sort feature. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowSort?: boolean; + /** + * Represents the worksheet protection option of selection mode. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + selectionMode?: Excel.ProtectionSelectionMode | "Normal" | "Unlocked" | "None"; + } + /** + * @remarks + * [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. + The range provided corresponds to cells that will be frozen in the top- and left-most pane. + * + * @remarks + * [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 or columns of the worksheet in place. + * + * @remarks + * [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 or rows of the worksheet in place. + * + * @remarks + * [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 corresponds to cells that are frozen in the top- and left-most pane. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getLocation(): Excel.Range; + /** + * Gets a range that describes the frozen cells in the active worksheet view. + The frozen range corresponds to cells that are frozen in the top- and left-most pane. + If there is no frozen pane, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getLocationOrNullObject(): Excel.Range; + /** + * Removes all frozen panes in the worksheet. + * + * @remarks + * [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; + }; + } + /** + * The options that define which worksheets to insert and where in the workbook the new worksheets will be inserted. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + interface InsertWorksheetOptions { + /** + * The insert position, in the current workbook, of the new worksheets. See `Excel.WorksheetPositionType` for details. The default position is "End". + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + positionType?: Excel.WorksheetPositionType | "None" | "Before" | "After" | "Beginning" | "End"; + /** + * The worksheet in the current workbook that is referenced for the `WorksheetPositionType` parameter. The default is `null`. If the `relativeTo` parameter is not set, worksheets will be inserted based on `positionType`, at the start or end of the current workbook. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + relativeTo?: Worksheet | string; + /** + * The names of individual worksheets to insert. By default, all the worksheets from the source workbook are inserted. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + sheetNamesToInsert?: string[]; + } + /** + * Range represents a set of one or more contiguous cells such as a cell, a row, a column, or a block of cells. + To learn more about how ranges are used throughout the API, start with {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-core-concepts#ranges | Ranges in the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 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; + /** + * The collection of `ConditionalFormats` that intersect the range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly conditionalFormats: Excel.ConditionalFormatCollection; + /** + * Returns a data validation object. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly dataValidation: Excel.DataValidation; + /** + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.RangeFormat; + /** + * Represents the range sort of the current range. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly sort: Excel.RangeSort; + /** + * The worksheet containing the current range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly worksheet: Excel.Worksheet; + /** + * Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly address: string; + /** + * Represents the range reference for the specified range in the language of the user. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly addressLocal: string; + /** + * Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly cellCount: number; + /** + * Specifies the total number of columns in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly columnCount: number; + /** + * Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnHidden: boolean; + /** + * Specifies the column number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly columnIndex: number; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + formulasLocal: any[][]; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly hasSpill: boolean; + /** + * Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly height: number; + /** + * Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly hidden: boolean; + /** + * Represents the hyperlink for the current range. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hyperlink: Excel.RangeHyperlink; + /** + * Represents if the current range is an entire column. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly isEntireColumn: boolean; + /** + * Represents if the current range is an entire row. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly isEntireRow: boolean; + /** + * Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly left: number; + /** + * Represents the data type state of each cell. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly linkedDataTypeState: Excel.LinkedDataTypeState[][]; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + numberFormat: any[][]; + /** + * Represents the category of number format of each cell. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly numberFormatCategories: Excel.NumberFormatCategory[][]; + /** + * Represents Excel's number format code for the given range, based on the language settings of the user. + Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. + Any returned text uses the locally-formatted strings based on the language specified in the system settings. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal: any[][]; + /** + * Returns the total number of rows in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly rowCount: number; + /** + * Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHidden: boolean; + /** + * Returns the row number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly rowIndex: number; + /** + * Represents if all the cells would be saved as an array formula. + Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. + Returns `null` if some cells would be saved as an array formula and some would not be. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly savedAsArray: 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + style: string; + /** + * Text values of the specified range. The text value will not depend on the cell width. The number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly text: string[][]; + /** + * Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly top: number; + /** + * Specifies the type of data in each cell. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly valueTypes: Excel.RangeValueType[][]; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values: any[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson: CellValue[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal: CellValue[][]; + /** + * Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * @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; + /** + * Fills a range from the current range to the destination range using the specified AutoFill logic. + The destination range can be `null` or can extend the source range either horizontally or vertically. + Discontiguous ranges are not supported. + + For more information, see {@link https://support.microsoft.com/office/2e79a709-c814-4b27-8bc2-c4dc84d49464 | Use AutoFill and Flash Fill}. + * + * @remarks + * [Api set: ExcelApi 1.9, ExcelApi Preview for null `destinationRange`] + * + * @param destinationRange The destination range to AutoFill. If the destination range is `null`, data is filled out based on the surrounding cells (which is the behavior when double-clicking the UI’s range fill handle). + * @param autoFillType The type of AutoFill. Specifies how the destination range is to be filled, based on the contents of the current range. Default is "FillDefault". + */ + autoFill(destinationRange?: Range | string, autoFillType?: Excel.AutoFillType): void; + /** + * Fills a range from the current range to the destination range using the specified AutoFill logic. + The destination range can be `null` or can extend the source range either horizontally or vertically. + Discontiguous ranges are not supported. + + For more information, see {@link https://support.microsoft.com/office/2e79a709-c814-4b27-8bc2-c4dc84d49464 | Use AutoFill and Flash Fill}. + * + * @remarks + * [Api set: ExcelApi 1.9, ExcelApi Preview for null `destinationRange`] + * + * @param destinationRange The destination range to AutoFill. If the destination range is `null`, data is filled out based on the surrounding cells (which is the behavior when double-clicking the UI’s range fill handle). + * @param autoFillType The type of AutoFill. Specifies how the destination range is to be filled, based on the contents of the current range. Default is "FillDefault". + */ + autoFill(destinationRange?: Range | string, autoFillType?: "FillDefault" | "FillCopy" | "FillSeries" | "FillFormats" | "FillValues" | "FillDays" | "FillWeekdays" | "FillMonths" | "FillYears" | "LinearTrend" | "GrowthTrend" | "FlashFill"): void; + /** + * Calculates a range of cells on a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + calculate(): void; + /** + * Clear range values, format, fill, border, etc. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Converts the range cells with data types into text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + convertDataTypeToText(): void; + /** + * Converts the range cells into linked data types in the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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 a different size than the source range or `RangeAreas`. The destination is expanded automatically if it's smaller than the source. + Note: Like the copy functionality in the Excel UI, if the destination range is an exact multiple greater than the source range in either rows or columns, then the source content is replicated multiple times. For example, a 2x2 range copy into a 2x6 range will result in 3 copies of the original 2x2 range. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param sourceRange The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must be able to 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 a different size than the source range or `RangeAreas`. The destination is expanded automatically if it's smaller than the source. + Note: Like the copy functionality in the Excel UI, if the destination range is an exact multiple greater than the source range in either rows or columns, then the source content is replicated multiple times. For example, a 2x2 range copy into a 2x6 range will result in 3 copies of the original 2x2 range. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param sourceRange The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must be able to 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" | "Link", skipBlanks?: boolean, transpose?: boolean): void; + /** + * Deletes the cells associated with the range. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param text The string to find. + * @param criteria Additional search criteria, including the search direction and whether the search needs to match the entire cell or be case-sensitive. + * @returns The `Range` object representing the first cell that contains a value matching the search text and 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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param text The string to find. + * @param criteria Additional search criteria, including the search direction and whether the search needs to match the entire cell or be case-sensitive. + * @returns The `Range` which matched the search criteria. + */ + findOrNullObject(text: string, criteria: Excel.SearchCriteria): Excel.Range; + /** + * Does a Flash Fill to the current range. Flash Fill automatically fills data when it senses a pattern, so the range must be a single column range and have data around it in order to find a pattern. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + flashFill(): 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. + * + * @remarks + * [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". + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param anotherRange The range object, 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. + * + * @remarks + * [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; + /** + * Returns a 2D array, encapsulating the data for each cell's font, fill, borders, alignment, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param cellPropertiesLoadOptions An object that represents which cell properties to load. + * @returns A 2D array where each item represents the requested properties of the corresponding cell. + */ + getCellProperties(cellPropertiesLoadOptions: CellPropertiesLoadOptions): OfficeExtension.ClientResult; + /** + * Gets a column contained in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param column Column number of the range to be retrieved. Zero-indexed. + */ + getColumn(column: number): Excel.Range; + /** + * Returns a single-dimensional array, encapsulating the data for each column's font, fill, borders, alignment, and other properties. For properties that are not consistent across each cell within a given column, null will be returned. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param columnPropertiesLoadOptions An object that represents which column properties to load. + * @returns An array where each item represents the requested properties of the corresponding column. + */ + getColumnProperties(columnPropertiesLoadOptions: ColumnPropertiesLoadOptions): OfficeExtension.ClientResult; + /** + * Gets a certain number of columns to the right of the current `Range` object. + * + * @remarks + * [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. + * + * @remarks + * [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 the data classification IDs for all PowerBI-based linked data types that are present in the range. + 1st-party only. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * @returns A 2D array of data classification IDs that were found in the range. + */ + getDataClassificationIds(): OfficeExtension.ClientResult; + /** + * Returns a `WorkbookRangeAreas` object that represents the range containing all the dependents of a cell in the same worksheet or in multiple worksheets. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + getDependents(): Excel.WorkbookRangeAreas; + /** + * Returns a `WorkbookRangeAreas` object that represents the range containing all the direct dependent cells of a specified range in the same worksheet or across multiple worksheets. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + getDirectDependents(): Excel.WorkbookRangeAreas; + /** + * Returns a `WorkbookRangeAreas` object that represents the range containing all the direct precedent cells of a specified range in the same worksheet or across multiple worksheets. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getDirectPrecedents(): Excel.WorkbookRangeAreas; + /** + * 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"). + * + * @remarks + * [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"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getEntireRow(): Excel.Range; + /** + * Returns a range object that includes the current range and up to the edge of the range, based on the provided direction. This matches the Ctrl+Shift+Arrow key behavior in the Excel on Windows UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param direction The direction from the active cell. + * @param activeCell The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. + */ + getExtendedRange(direction: Excel.KeyboardDirection, activeCell?: Range | string): Excel.Range; + /** + * Returns a range object that includes the current range and up to the edge of the range, based on the provided direction. This matches the Ctrl+Shift+Arrow key behavior in the Excel on Windows UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param direction The direction from the active cell. + * @param activeCell The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. + */ + getExtendedRange(direction: "Left" | "Right" | "Up" | "Down", activeCell?: Range | string): Excel.Range; + /** + * Renders the range as a base64-encoded png image. + **Important**: This API is currently unsupported in Excel for Mac. Visit {@link https://github.com/OfficeDev/office-js/issues/235 | OfficeDev/office-js Issue #235} for the current status. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getImage(): OfficeExtension.ClientResult; + /** + * Gets the range object that represents the rectangular intersection of the given ranges. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getLastRow(): Excel.Range; + /** + * Returns a `RangeAreas` object that represents the merged areas in this range. Note that if the merged areas count in this range is more than 512, then this method will fail to return the result. If the `RangeAreas` object doesn't exist, then this function will return an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + getMergedAreasOrNullObject(): Excel.RangeAreas; + /** + * Returns a collection of properties, each of which describe a characteristic of the selected number format. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * @returns A `NumberFormatPropertyCollection` object for the current Range. + */ + getNumberFormatProperties(): Excel.NumberFormatPropertyCollection; + /** + * 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. + * + * @remarks + * [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 scoped collection of PivotTables that overlap with the range. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param fullyContained If `true`, returns only PivotTables that are fully contained within the range bounds. The default value is `false`. + * @returns + */ + getPivotTables(fullyContained?: boolean): Excel.PivotTableScopedCollection; + /** + * Returns a `WorkbookRangeAreas` object that represents the range containing all the precedent cells of a specified range in the same worksheet or across multiple worksheets. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + getPrecedents(): Excel.WorkbookRangeAreas; + /** + * Returns a range object that is the edge cell of the data region that corresponds to the provided direction. This matches the Ctrl+Arrow key behavior in the Excel on Windows UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param direction The direction from the active cell. + * @param activeCell The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. + */ + getRangeEdge(direction: Excel.KeyboardDirection, activeCell?: Range | string): Excel.Range; + /** + * Returns a range object that is the edge cell of the data region that corresponds to the provided direction. This matches the Ctrl+Arrow key behavior in the Excel on Windows UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param direction The direction from the active cell. + * @param activeCell The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. + */ + getRangeEdge(direction: "Left" | "Right" | "Up" | "Down", activeCell?: Range | string): 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param row Row number of the range to be retrieved. Zero-indexed. + */ + getRow(row: number): Excel.Range; + /** + * Returns a single-dimensional array, encapsulating the data for each row's font, fill, borders, alignment, and other properties. For properties that are not consistent across each cell within a given row, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param rowPropertiesLoadOptions An object that represents which row properties to load. + * @returns An array where each item represents the requested properties of the corresponding row. + */ + getRowProperties(rowPropertiesLoadOptions: RowPropertiesLoadOptions): OfficeExtension.ClientResult; + /** + * Gets a certain number of rows above the current `Range` object. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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" | "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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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" | "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. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getSpillParent(): Excel.Range; + /** + * Gets the range object containing the anchor cell for the cell getting spilled into. + If it's not a spilled cell, or more than one cell is given, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getSpillParentOrNullObject(): 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. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getSpillingToRange(): Excel.Range; + /** + * Gets the range object containing the spill range when called on an anchor cell. + If the range isn't an anchor cell or the spill range can't be found, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getSpillingToRangeOrNullObject(): Excel.Range; + /** + * Get the surrounding data region, as determined by Excel Ideas, as it relates to the current selection. + The surrounding region is used by Excel Ideas to generate ideas that can be inserted into the workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * @returns Range. The resulting range after applying all the relevant selection rules. + */ + getSurroundingDataRegion(): 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getSurroundingRegion(): Excel.Range; + /** + * Gets a scoped collection of tables that overlap with the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + getVisibleView(): Excel.RangeView; + /** + * Groups columns and rows for an outline. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies how the range can be grouped by rows or columns. + * An `InvalidArgument` error is thrown when the group option differs from the range's + * `isEntireRow` or `isEntireColumn` property (i.e., `range.isEntireRow` is true and `groupOption` is "ByColumns" + * or `range.isEntireColumn` is true and `groupOption` is "ByRows"). + */ + group(groupOption: Excel.GroupOption): void; + /** + * Groups columns and rows for an outline. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies how the range can be grouped by rows or columns. + * An `InvalidArgument` error is thrown when the group option differs from the range's + * `isEntireRow` or `isEntireColumn` property (i.e., `range.isEntireRow` is true and `groupOption` is "ByColumns" + * or `range.isEntireColumn` is true and `groupOption` is "ByRows"). + */ + group(groupOption: "ByRows" | "ByColumns"): void; + /** + * Hides the details of the row or column group. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies whether to hide the details of grouped rows or grouped columns. + */ + hideGroupDetails(groupOption: Excel.GroupOption): void; + /** + * Hides the details of the row or column group. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies whether to hide the details of grouped rows or grouped columns. + */ + hideGroupDetails(groupOption: "ByRows" | "ByColumns"): void; + /** + * 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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Moves cell values, formatting, and formulas from current range to the destination range, replacing the old information in those cells. + The destination range will be expanded automatically if it is smaller than the current range. Any cells in the destination range that are outside of the original range's area are not changed. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param destinationRange destinationRange Specifies the range to where the information in this range will be moved. + */ + moveTo(destinationRange: Range | string): void; + /** + * Removes duplicate values from the range specified by the columns. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param text String to find. + * @param replacement The string that replaces the original string. + * @param criteria Additional replacement 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + select(): void; + /** + * Updates the range based on a 2D array of cell properties, encapsulating things like font, fill, borders, and alignment. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param cellPropertiesData A 2D array that represents which properties to set in each cell. + */ + setCellProperties(cellPropertiesData: SettableCellProperties[][]): void; + /** + * Updates the range based on a single-dimensional array of column properties, encapsulating things like font, fill, borders, and alignment. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param columnPropertiesData An array that represents which properties to set in each column. + */ + setColumnProperties(columnPropertiesData: SettableColumnProperties[]): void; + /** + * Set a range to be recalculated when the next recalculation occurs. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + setDirty(): void; + /** + * Updates the range based on a single-dimensional array of row properties, encapsulating things like font, fill, borders, and alignment. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param rowPropertiesData An array that represents which properties to set in each row. + */ + setRowProperties(rowPropertiesData: SettableRowProperties[]): void; + /** + * Displays the card for an active cell if it has rich value content. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showCard(): void; + /** + * Shows the details of the row or column group. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies whether to show the details of grouped rows or grouped columns. + */ + showGroupDetails(groupOption: Excel.GroupOption): void; + /** + * Shows the details of the row or column group. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies whether to show the details of grouped rows or grouped columns. + */ + showGroupDetails(groupOption: "ByRows" | "ByColumns"): void; + /** + * Shows a teaching callout next to the range. + Title of the teaching callout.Body message of the teaching callout. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showTeachingCallout(title: string, message: string): void; + /** + * Ungroups columns and rows for an outline. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies how the range can be ungrouped by rows or columns. + */ + ungroup(groupOption: Excel.GroupOption): void; + /** + * Ungroups columns and rows for an outline. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies how the range can be ungrouped by rows or columns. + */ + ungroup(groupOption: "ByRows" | "ByColumns"): void; + /** + * Unmerge the range cells into separate cells. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeLoadOptions): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeData): void; + } + class RangeCustom { + } + interface Range extends OfficeExtension.ClientObject, RangeCustom { + } + /** + * Represents a string reference of the form "SheetName!A1:B5", or a global or local named range. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface RangeReference { + /** + * The address of the range, for example "SheetName!A1:B5". + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + address: string; + } + /** + * Represents the necessary strings to get/set a hyperlink (XHL) object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface RangeHyperlink { + /** + * Represents the URL target for the hyperlink. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + address?: string; + /** + * Represents the document reference target for the hyperlink. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + documentReference?: string; + /** + * Represents the string displayed when hovering over the hyperlink. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + screenTip?: string; + /** + * Represents the string that is displayed in the top left most cell in the range. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + textToDisplay?: string; + } + /** + * `RangeAreas` represents a collection of one or more rectangular ranges in the same worksheet. + To learn how to use discontiguous ranges, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-multiple-ranges | Work with multiple ranges simultaneously in Excel add-ins}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly areas: Excel.RangeCollection; + /** + * Returns a collection of conditional formats that intersect with any cells in this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly conditionalFormats: Excel.ConditionalFormatCollection; + /** + * Returns a data validation object for all ranges in the `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly dataValidation: Excel.DataValidation; + /** + * Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly format: Excel.RangeFormat; + /** + * Returns the worksheet for the current `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly worksheet: Excel.Worksheet; + /** + * Returns the `RangeAreas` 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"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly address: string; + /** + * Returns the `RangeAreas` reference in the user locale. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly addressLocal: string; + /** + * Returns the number of rectangular ranges that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly cellCount: number; + /** + * Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly isEntireColumn: boolean; + /** + * Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + calculate(): void; + /** + * Clears values, format, fill, border, and other properties on each of the areas that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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, and other properties on each of the areas that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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 data types into text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + convertDataTypeToText(): void; + /** + * Converts all cells in the `RangeAreas` into linked data types. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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 a different size than the source range or `RangeAreas`. The destination will be expanded automatically if it is smaller than the source. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param sourceRange The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must able to 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 a different size than the source range or `RangeAreas`. The destination will be expanded automatically if it is smaller than the source. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param sourceRange The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must able to 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" | "Link", 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"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param anotherRange The range, `RangeAreas` object, or address that will be used to determine the intersection. + */ + getIntersectionOrNullObject(anotherRange: Range | RangeAreas | string): Excel.RangeAreas; + /** + * Returns a `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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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" | "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. If no special cells are found that match the criteria, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. If no special cells are found that match the criteria, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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" | "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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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`, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param valuesOnly Whether to only consider cells with values as used cells. + */ + getUsedRangeAreasOrNullObject(valuesOnly?: boolean): Excel.RangeAreas; + /** + * Selects the specified range areas in the Excel UI. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + select(): void; + /** + * Sets the `RangeAreas` to be recalculated when the next recalculation occurs. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + setDirty(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeAreasLoadOptions): Excel.RangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeAreasData): void; + } + /** + * Represents a collection of one or more rectangular ranges in multiple worksheets. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + class WorkbookRangeAreas 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 `RangeAreasCollection` object. Each `RangeAreas` in the collection represent one or more rectangle ranges in one worksheet. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly areas: Excel.RangeAreasCollection; + /** + * Returns ranges that comprise this object in a `RangeCollection` object. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly ranges: Excel.RangeCollection; + /** + * Returns an array of addresses in A1-style. Address values contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly addresses: string[]; + /** + * Returns the `RangeAreas` object based on worksheet ID or name in the collection. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param key The name or ID of the worksheet. + */ + getRangeAreasBySheet(key: string): Excel.RangeAreas; + /** + * Returns the `RangeAreas` object based on worksheet name or ID in the collection. If the worksheet does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param key The name or ID of the worksheet. + */ + getRangeAreasOrNullObjectBySheet(key: string): Excel.RangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorkbookRangeAreasLoadOptions): Excel.WorkbookRangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorkbookRangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.WorkbookRangeAreas; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): Excel.WorkbookRangeAreas; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.WorkbookRangeAreas; + /** + * 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.WorkbookRangeAreas object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorkbookRangeAreasData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.WorkbookRangeAreasData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.WorkbookRangeAreasData): void; + } + /** + * Represents the search criteria to be used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface SearchCriteria { + /** + * Specifies if the match needs to be complete or partial. + A complete match matches the entire contents of the cell. A partial match matches a substring within the content of the cell (e.g., `cat` partially matches `caterpillar` and `scatter`). + Default is `false` (partial). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + completeMatch?: boolean; + /** + * Specifies if the match is case-sensitive. Default is `false` (case-insensitive). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + matchCase?: boolean; + /** + * Specifies the search direction. Default is forward. See `Excel.SearchDirection`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + searchDirection?: Excel.SearchDirection | "Forward" | "Backwards"; + } + /** + * Represents the worksheet search criteria to be used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface WorksheetSearchCriteria { + /** + * Specifies if the match needs to be complete or partial. + A complete match matches the entire contents of the cell. A partial match matches a substring within the content of the cell (e.g., `cat` partially matches `caterpillar` and `scatter`). + Default is `false` (partial). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + completeMatch?: boolean; + /** + * Specifies if the match is case-sensitive. Default is `false` (case-insensitive). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + matchCase?: boolean; + } + /** + * Represents the replace criteria to be used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ReplaceCriteria { + /** + * Specifies if the match needs to be complete or partial. + A complete match matches the entire contents of the cell. A partial match matches a substring within the content of the cell (e.g., `cat` partially matches `caterpillar` and `scatter`). + Default is `false` (partial). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + completeMatch?: boolean; + /** + * Specifies if the match is case-sensitive. Default is `false` (case-insensitive). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + matchCase?: boolean; + } + /** + * Specifies which properties to load on the `format.fill` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesFillLoadOptions { + /** + * Specifies whether to load the `color` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: boolean; + /** + * Specifies whether to load the `pattern` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern?: boolean; + /** + * Specifies whether to load the `patternColor` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternColor?: boolean; + /** + * Specifies whether to load the `patternTintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternTintAndShade?: boolean; + /** + * Specifies whether to load the `tintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + } + /** + * Specifies which properties to load on the `format.font` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesFontLoadOptions { + /** + * Specifies whether to load the `bold` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bold?: boolean; + /** + * Specifies whether to load the `color` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: boolean; + /** + * Specifies whether to load the `italic` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + italic?: boolean; + /** + * Specifies whether to load the `name` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: boolean; + /** + * Specifies whether to load the `size` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + size?: boolean; + /** + * Specifies whether to load the `strikethrough` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + strikethrough?: boolean; + /** + * Specifies whether to load the `subscript` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subscript?: boolean; + /** + * Specifies whether to load the `superscript` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + superscript?: boolean; + /** + * Specifies whether to load the `tintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + /** + * Specifies whether to load the `underline` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underline?: boolean; + } + /** + * Specifies which properties to load on the `format.borders` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesBorderLoadOptions { + /** + * Specifies whether to load the `color` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: boolean; + /** + * Specifies whether to load the `style` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: boolean; + /** + * Specifies whether to load the `tintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + /** + * Specifies whether to load the `weight` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + weight?: boolean; + } + /** + * Represents the `format.protection` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the `format.protection` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesProtection { + /** + * Represents the `format.protection.formulaHidden` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + formulaHidden?: boolean; + /** + * Represents the `format.protection.locked` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + locked?: boolean; + } + /** + * Represents the `format.fill` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties` or the `format.fill` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesFill { + /** + * Represents the `format.fill.color` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the `format.fill.pattern` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + /** + * Represents the `format.fill.patternColor` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternColor?: string; + /** + * Represents the `format.fill.patternTintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternTintAndShade?: number; + /** + * Represents the `format.fill.tintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + } + /** + * Represents the `format.font` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the `format.font` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesFont { + /** + * Represents the `format.font.bold` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bold?: boolean; + /** + * Represents the `format.font.color` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the `format.font.italic` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + italic?: boolean; + /** + * Represents the `format.font.name` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: string; + /** + * Represents the `format.font.size` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + size?: number; + /** + * Represents the `format.font.strikethrough` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + strikethrough?: boolean; + /** + * Represents the `format.font.subscript` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subscript?: boolean; + /** + * Represents the `format.font.superscript` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + superscript?: boolean; + /** + * Represents the `format.font.tintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + /** + * Represents the `format.font.underline` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underline?: Excel.RangeUnderlineStyle | "None" | "Single" | "Double" | "SingleAccountant" | "DoubleAccountant"; + } + /** + * Represents the `format.borders` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the `format.borders` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellBorderCollection { + /** + * Represents the `format.borders.bottom` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottom?: Excel.CellBorder; + /** + * Represents the `format.borders.diagonalDown` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + diagonalDown?: Excel.CellBorder; + /** + * Represents the `format.borders.diagonalUp` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + diagonalUp?: Excel.CellBorder; + /** + * Represents the `format.borders.horizontal` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontal?: Excel.CellBorder; + /** + * Represents the `format.borders.left` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: Excel.CellBorder; + /** + * Represents the `format.borders.right` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + right?: Excel.CellBorder; + /** + * Represents the `format.borders.top` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: Excel.CellBorder; + /** + * Represents the `format.borders.vertical` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + vertical?: Excel.CellBorder; + } + /** + * Represents the properties of a single border returned by `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the border property input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellBorder { + /** + * Represents the `color` property of a single border. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the `style` property of a single border. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * Represents the `tintAndShade` property of a single border. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + /** + * Represents the `weight` property of a single border. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + weight?: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; + } + /** + * RangeView represents a set of visible cells of the parent range. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly rows: Excel.RangeViewCollection; + /** + * Represents the cell addresses of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly cellAddresses: any[][]; + /** + * The number of visible columns. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly columnCount: number; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasLocal: any[][]; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasR1C1: any[][]; + /** + * Returns a value that represents the index of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly index: number; + /** + * Represents Excel's number format code for the given cell. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + numberFormat: any[][]; + /** + * The number of visible rows. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly text: string[][]; + /** + * Represents the type of data of each cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + values: any[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson: CellValue[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal: 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. + * @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`. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeViewLoadOptions): Excel.RangeView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeViewData): void; + } + /** + * Represents a collection of `RangeView` objects. + * + * @remarks + * [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[]; + /** + * Gets the number of `RangeView` objects in the collection. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a `RangeView` row via its index. Zero-indexed. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeViewCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeViewCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeViewCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeViewCollectionData): void; + } + /** + * 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. + * + * @remarks + * [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[]; + /** + * Sets or adds the specified setting to the workbook. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a setting entry via the key. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SettingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SettingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.SettingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.SettingCollection; + /** + * Occurs when the settings in the document are changed. + * + * @remarks + * [Api set: ExcelApi 1.4] + * + * @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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.SettingCollectionData): void; + } + /** + * 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. + * + * @remarks + * [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; + /** + * The key that represents the ID of the setting. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + readonly key: string; + /** + * Represents the value stored for this setting. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SettingLoadOptions): Excel.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.SettingData): void; + } + /** + * A collection of all the `NamedItem` objects that are part of the workbook or worksheet, depending on how it was reached. + * + * @remarks + * [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[]; + /** + * Adds a new name to the collection of the given scope. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a `NamedItem` object using its name. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param name Nameditem name. + */ + getItem(name: string): Excel.NamedItem; + /** + * Gets a `NamedItem` object using its name. If the object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NamedItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.NamedItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NamedItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.NamedItemCollectionData): void; + } + class NamedItemCollectionCustom { + } + interface NamedItemCollection extends OfficeExtension.ClientObject, NamedItemCollectionCustom { + } + /** + * 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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + readonly worksheet: Excel.Worksheet; + /** + * Returns the worksheet to which the named item is scoped. If the item is scoped to the workbook instead, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + readonly worksheetOrNullObject: Excel.Worksheet; + /** + * Specifies the comment associated with this name. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + comment: string; + /** + * The formula of the named item. Formulas always start with an equal sign ("="). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formula: any; + /** + * The name of the object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly name: string; + /** + * Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + readonly scope: Excel.NamedItemScope | "Worksheet" | "Workbook"; + /** + * Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly value: any; + /** + * A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + readonly valueAsJson: CellValue | string; + /** + * A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + readonly valueAsJsonLocal: CellValue | string; + /** + * Specifies if the object is visible. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * Returns the range object that is associated with the name. If the named item's type is not a range, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NamedItemLoadOptions): Excel.NamedItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NamedItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.NamedItemData): void; + } + /** + * Represents an object containing values and types of a named item. + * + * @remarks + * [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 + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly types: Excel.RangeValueType[][]; + /** + * Represents the values of each item in the named item array. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly values: any[][]; + /** + * A JSON representation of the values in this named item array. + Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItemArrayValues.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + readonly valuesAsJson: CellValue[][]; + /** + * A JSON representation of the values in this named item array. + Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItemArrayValues.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + readonly valuesAsJsonLocal: CellValue[][]; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NamedItemArrayValuesLoadOptions): Excel.NamedItemArrayValues; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NamedItemArrayValues; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.NamedItemArrayValuesData): void; + } + /** + * Represents an Office.js binding that is defined in the workbook. + * + * @remarks + * [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 the binding identifier. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly id: string; + /** + * Returns the type of the binding. See `Excel.BindingType` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly type: Excel.BindingType | "Range" | "Table" | "Text"; + /** + * Deletes the binding. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + delete(): void; + /** + * Returns the range represented by the binding. Will throw an error if the binding is not of the correct type. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * Returns the table represented by the binding. Will throw an error if the binding is not of the correct type. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getTable(): Excel.Table; + /** + * Returns the text represented by the binding. Will throw an error if the binding is not of the correct type. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.BindingLoadOptions): Excel.Binding; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Binding; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Binding; + /** + * Occurs when data or formatting within the binding is changed. + * + * @remarks + * [Api set: ExcelApi 1.2] + * + * @eventproperty + */ + readonly onDataChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the selected content in the binding is changed. + + **Note**: If multiple, discontiguous cells are selected, `Binding.onSelectionChanged` only reports row and column information for one selection. Use `Worksheet.onSelectionChanged` for multiple selected ranges. + * + * @remarks + * [Api set: ExcelApi 1.2] + * + * @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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.BindingData): void; + } + /** + * Represents the collection of all the binding objects that are part of the workbook. + * + * @remarks + * [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[]; + /** + * Returns the number of bindings in the collection. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Add a new binding to a particular Range. + * + * @remarks + * [Api set: ExcelApi 1.3] + * + * @param range Range to bind the binding to. May be a `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 the binding. + */ + add(range: Range | string, bindingType: Excel.BindingType, id: string): Excel.Binding; + /** + * Add a new binding to a particular Range. + * + * @remarks + * [Api set: ExcelApi 1.3] + * + * @param range Range to bind the binding to. May be a `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 the 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. + * + * @remarks + * [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 the 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. + * + * @remarks + * [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 the 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. + * + * @remarks + * [Api set: ExcelApi 1.3] + * + * @param bindingType Type of binding. See `Excel.BindingType`. + * @param id Name of the 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. + * + * @remarks + * [Api set: ExcelApi 1.3] + * + * @param bindingType Type of binding. See `Excel.BindingType`. + * @param id Name of the binding. + */ + addFromSelection(bindingType: "Range" | "Table" | "Text", id: string): Excel.Binding; + /** + * Gets the number of bindings in the collection. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a binding object by ID. + * + * @remarks + * [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. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.BindingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.BindingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.BindingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.BindingCollectionData): void; + } + /** + * Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached. + * + * @remarks + * [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[]; + /** + * Returns the number of tables in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Creates 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. + * + * @remarks + * [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 A 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 a header and shift the data down by one row. + */ + add(address: Range | string, hasHeaders: boolean): Excel.Table; + /** + * Add a table based on the specified source data and insert it at the top-left cell of the destination range. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param source The data connection source for the new table. + * @param destination The cell in the upper-left corner of the table report's destination range (the range on the worksheet where the resulting report will be placed). + * @returns Returns the newly inserted table. + */ + addQueryTable(source: Excel.DataConnection, destination: Range | string): Excel.Table; + /** + * Gets the number of tables in the collection. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a table by name or ID. + * + * @remarks + * [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. + * + * @remarks + * [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 doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.TableCollection; + /** + * Occurs when a new table is added in a workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onAdded: OfficeExtension.EventHandlers; + /** + * Occurs when data changes on any table in a workbook, or a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the specified table is deleted in a workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onDeleted: OfficeExtension.EventHandlers; + /** + * Occurs when a filter is applied on any table in a workbook, or a worksheet. + * + * @remarks + * [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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TableCollectionData): void; + } + class TableCollectionCustom { + } + interface TableCollection extends OfficeExtension.ClientObject, TableCollectionCustom { + } + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getFirst(): Excel.Table; + /** + * Gets a table by name or ID. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param key Name or ID of the table to be retrieved. + */ + getItem(key: string): Excel.Table; + /** + * Gets a table by name or ID. + If the table object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TableScopedCollectionData): void; + } + /** + * Represents an Excel table. + To learn more about the table object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables | Work with tables using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 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; + /** + * Represents the `AutoFilter` object of the table. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly autoFilter: Excel.AutoFilter; + /** + * Represents a collection of all the columns in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly columns: Excel.TableColumnCollection; + /** + * Represents a collection of all the rows in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly rows: Excel.TableRowCollection; + /** + * Represents the sorting for the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly sort: Excel.TableSort; + /** + * The style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly tableStyle: Excel.TableStyle; + /** + * The worksheet containing the current table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly worksheet: Excel.Worksheet; + /** + * Specifies if the first column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn: boolean; + /** + * Specifies if the last column contains special formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly id: string; + /** + * Returns a numeric ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly legacyId: string; + /** + * Name of the table. + + The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedColumns: boolean; + /** + * Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedRows: boolean; + /** + * Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showFilterButton: boolean; + /** + * Specifies if the header row is visible. This value can be set to show or remove the header row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showHeaders: boolean; + /** + * Specifies if the total row is visible. This value can be set to show or remove the total row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showTotals: boolean; + /** + * Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + clearFilters(): void; + /** + * Changes the table to use the default table style. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + clearStyle(): void; + /** + * Converts the table into a normal range of cells. All data is preserved. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + convertToRange(): Excel.Range; + /** + * Deletes the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * Gets the range object associated with the data body of the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getDataBodyRange(): Excel.Range; + /** + * Gets the range object associated with the header row of the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getHeaderRowRange(): Excel.Range; + /** + * Gets the range object associated with the entire table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * Gets the range object associated with the totals row of the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getTotalRowRange(): Excel.Range; + /** + * Reapplies all the filters currently on the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + reapplyFilters(): void; + /** + * Resize the table to the new range. The new range must overlap with the original table range and the headers (or the top of the table) must be in the same row. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param newRange The range object or range address that will be used to determine the new size of the table. + */ + resize(newRange: Range | string): void; + /** + * Sets the style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param style The style to apply to the table. An `InvalidArgumentException` is thrown if a string is provided that does not match the name of any style. + */ + setStyle(style: string | TableStyle | BuiltInTableStyle): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableLoadOptions): Excel.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Table; + /** + * Occurs when data in cells changes on a specific table. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * Occurs when a filter is applied on a specific table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFiltered: OfficeExtension.EventHandlers; + /** + * Occurs when the selection changes on a specific table. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TableData): void; + } + /** + * Represents a collection of all the columns that are part of the table. + * + * @remarks + * [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[]; + /** + * Returns the number of columns in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Adds a new column to the table. + * + * @remarks + * [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 2D 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; + /** + * Adds a new column to the table. + Unlike `add()`, `addAsJson()` takes any type of cell value, such as image or entity data types. + * + * @remarks + * [Api set: ExcelApi 1.16] + * + * @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 2D array of cell values of the table column. + * @param name Optional. Specifies the name of the new column. If `null`, the default name will be used. + */ + addAsJson(index?: number, values?: CellValue[][], name?: string): Excel.TableColumn; + /** + * Gets the number of columns in the table. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a column object by name or ID. + * + * @remarks + * [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. + * + * @remarks + * [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 doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableColumnCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableColumnCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableColumnCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TableColumnCollectionData): void; + } + /** + * Represents a column in a table. + * + * @remarks + * [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; + /** + * Retrieves the filter applied to the column. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly filter: Excel.Filter; + /** + * Returns a unique key that identifies the column within the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly id: number; + /** + * Returns the index number of the column within the columns collection of the table. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly index: number; + /** + * Specifies the name of the table column. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values: any[][]; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson: CellValue[][]; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal: 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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * Gets the range object associated with the data body of the column. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getDataBodyRange(): Excel.Range; + /** + * Gets the range object associated with the header row of the column. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getHeaderRowRange(): Excel.Range; + /** + * Gets the range object associated with the entire column. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * Gets the range object associated with the totals row of the column. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableColumnLoadOptions): Excel.TableColumn; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableColumn; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TableColumnData): void; + } + /** + * 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 or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [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[]; + /** + * Returns the number of rows in the table. + * + * @remarks + * [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 or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [Api set: ExcelApi 1.1 for adding a single row; 1.4 allows adding of multiple rows; 1.15 for adding `alwaysInsert` parameter.] + * + * @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 2D array of unformatted values of the table row. + * @param alwaysInsert Optional. Specifies whether the new rows will be inserted into the table when new rows are added. If `true`, the new rows will be inserted into the table. If `false`, the new rows will be added below the table. Default is `true`. + */ + add(index?: number, values?: Array> | boolean | string | number, alwaysInsert?: boolean): Excel.TableRow; + /** + * Adds one or more rows to the table. The returned object will be the top row of the newly added row or rows. + Unlike `add()`, `addAsJson()` takes any type of cell value, such as image or entity data types. + + Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [Api set: ExcelApi 1.16] + * + * @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 2D array of cell values of the table row. + * @param alwaysInsert Optional. Specifies whether the new rows will be inserted into the table when new rows are added. If `true`, the new rows will be inserted into the table. If `false`, the new rows will be added below the table. Default is `true`. + */ + addAsJson(index?: number, values?: CellValue[][], alwaysInsert?: boolean): Excel.TableRow; + /** + * Delete multiple rows from a table. + These rows don't need to be sequential. This method will throw the `InvalidArgument` error if a chosen row has already been deleted or doesn't exist. + This method will throw the `InsertDeleteConflict` error if the table on which the method is called has a filter applied. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param rows An array of row index numbers or row objects to delete from the table. + */ + deleteRows(rows: number[] | TableRow[]): void; + /** + * Delete a specified number of rows from a table, starting at a given index. + This method will throw the `InsertDeleteConflict` error if the table on which the method is called has a filter applied. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param index The index value of the row to be deleted. Note: Row indexes update each time that a preceding row in the table is deleted, after each delete operation. Ensure that the index of the row that you want to delete hasn't changed between the time that you determined the value and the time that you run the operation. + * @param count Number of rows to delete. By default, a single row will be deleted. + */ + deleteRowsAt(index: number, count?: number): void; + /** + * Gets the number of rows in the table. + * + * @remarks + * [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 or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableRowCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TableRowCollectionData): void; + } + /** + * Represents a row in a table. + + Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly index: number; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values: any[][]; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson: CellValue[][]; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal: 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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * Returns the range object associated with the entire row. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableRowLoadOptions): Excel.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TableRowData): void; + } + /** + * Represents the data validation applied to the current range. + To learn more about the data validation object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-data-validation | Add data validation to Excel ranges}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + errorAlert: Excel.DataValidationErrorAlert; + /** + * Specifies if data validation will be performed on blank cells. Default is `true`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + ignoreBlanks: boolean; + /** + * Prompt when users select a cell. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + prompt: Excel.DataValidationPrompt; + /** + * Data validation rule that contains different type of data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + rule: Excel.DataValidationRule; + /** + * Type of the data validation, see `Excel.DataValidationType` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + clear(): void; + /** + * Returns a `RangeAreas` object, comprising one or more rectangular ranges, with invalid cell values. If all cell values are valid, this function will throw an `ItemNotFound` error. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getInvalidCells(): Excel.RangeAreas; + /** + * Returns a `RangeAreas` object, comprising one or more rectangular ranges, with invalid cell values. If all cell values are valid, this function will return `null`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getInvalidCellsOrNullObject(): Excel.RangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DataValidationLoadOptions): Excel.DataValidation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DataValidation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.DataValidationData): void; + } + /** + * A data validation rule contains different types of data validation. You can only use one of them at a time according the `Excel.DataValidationType`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DataValidationRule { + /** + * Custom data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + custom?: Excel.CustomDataValidation; + /** + * Date data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + date?: Excel.DateTimeDataValidation; + /** + * Decimal data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + decimal?: Excel.BasicDataValidation; + /** + * List data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + list?: Excel.ListDataValidation; + /** + * Text length data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textLength?: Excel.BasicDataValidation; + /** + * Time data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + time?: Excel.DateTimeDataValidation; + /** + * Whole number data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + wholeNumber?: Excel.BasicDataValidation; + } + /** + * Represents the results from `Range.removeDuplicates`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly removed: number; + /** + * Number of remaining unique rows present in the resulting range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly uniqueRemaining: number; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RemoveDuplicatesResultLoadOptions): Excel.RemoveDuplicatesResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RemoveDuplicatesResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RemoveDuplicatesResultData): void; + } + /** + * Represents the basic type data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface BasicDataValidation { + /** + * Specifies the right-hand operand when the operator property is set to a binary operator such as GreaterThan (the left-hand operand is the value the user tries to enter in the cell). With the ternary operators Between and NotBetween, specifies the lower bound operand. + For example, setting formula1 to 10 and operator to GreaterThan means that valid data for the range must be greater than 10. + 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula1: string | number | Range; + /** + * With the ternary operators Between and NotBetween, specifies the upper bound operand. Is not used with the binary operators, such as GreaterThan. + 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula2?: string | number | Range; + /** + * The operator to use for validating the data. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + operator: Excel.DataValidationOperator | "Between" | "NotBetween" | "EqualTo" | "NotEqualTo" | "GreaterThan" | "LessThan" | "GreaterThanOrEqualTo" | "LessThanOrEqualTo"; + } + /** + * Represents the date data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DateTimeDataValidation { + /** + * Specifies the right-hand operand when the operator property is set to a binary operator such as GreaterThan (the left-hand operand is the value the user tries to enter in the cell). With the ternary operators Between and NotBetween, specifies the lower bound operand. + 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula1: string | Date | Range; + /** + * With the ternary operators Between and NotBetween, specifies the upper bound operand. Is not used with the binary operators, such as GreaterThan. + 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula2?: string | Date | Range; + /** + * The operator to use for validating the data. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + operator: Excel.DataValidationOperator | "Between" | "NotBetween" | "EqualTo" | "NotEqualTo" | "GreaterThan" | "LessThan" | "GreaterThanOrEqualTo" | "LessThanOrEqualTo"; + } + /** + * Represents the List data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ListDataValidation { + /** + * Specifies whether to display the list in a cell drop-down. The default is `true`. + * + * @remarks + * [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 `Range` object, or a string that contains a comma-separated number, boolean, or date. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + source: string | Range; + } + /** + * Represents the custom data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface CustomDataValidation { + /** + * A custom data validation formula. This creates special input rules, such as preventing duplicates, or limiting the total in a range of cells. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula: string; + } + /** + * Represents the error alert properties for the data validation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DataValidationErrorAlert { + /** + * Represents the error alert message. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + message: string; + /** + * Specifies whether to show an error alert dialog when a user enters invalid data. The default is `true`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAlert: boolean; + /** + * The data validation alert type, please see `Excel.DataValidationAlertStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + style: Excel.DataValidationAlertStyle | "Stop" | "Warning" | "Information"; + /** + * Represents the error alert dialog title. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + title: string; + } + /** + * Represents the user prompt properties for the data validation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DataValidationPrompt { + /** + * Specifies the message of the prompt. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + message: string; + /** + * Specifies if a prompt is shown when a user selects a cell with data validation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showPrompt: boolean; + /** + * Specifies the title for the prompt. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + title: string; + } + /** + * A format object encapsulating the range's font, fill, borders, alignment, and other properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly borders: Excel.RangeBorderCollection; + /** + * Returns the fill object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.RangeFill; + /** + * Returns the font object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.RangeFont; + /** + * Returns the format protection object for a range. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly protection: Excel.FormatProtection; + /** + * Specifies if text is automatically indented when text alignment is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoIndent: boolean; + /** + * Specifies the width of all colums within the range. If the column widths are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnWidth: number; + /** + * Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + indentLevel: number; + /** + * The reading order for the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * The height of all rows in the range. If the row heights are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHeight: number; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shrinkToFit: boolean; + /** + * 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. + * + * @remarks + * [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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardHeight: boolean; + /** + * Specifies if 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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardWidth: boolean; + /** + * Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + verticalAlignment: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting + * + * @remarks + * [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. + * @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; + /** + * Adjusts the indentation of the range formatting. The indent value ranges from 0 to 250 and is measured in characters. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param amount The number of character spaces by which the current indent is adjusted. This value should be between -250 and 250. + * **Note**: If the amount would raise the indent level above 250, the indent level stays with 250. + * Similarly, if the amount would lower the indent level below 0, the indent level stays 0. + */ + adjustIndent(amount: number): void; + /** + * Changes the width of the columns of the current range to achieve the best fit, based on the current data in the columns. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeFormatLoadOptions): Excel.RangeFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeFormatData): void; + } + /** + * Represents the format protection of a range object. + * + * @remarks + * [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; + /** + * Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + formulaHidden: boolean; + /** + * Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.FormatProtectionLoadOptions): Excel.FormatProtection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.FormatProtection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.FormatProtectionData): void; + } + /** + * Represents the background of a range object. + * + * @remarks + * [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 background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * 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 a uniform pattern setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + /** + * The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternColor: string; + /** + * Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternTintAndShade: number; + /** + * Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeFillLoadOptions): Excel.RangeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeFillData): void; + } + /** + * Represents the border of an object. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * Constant value that indicates the specific side of the border. See `Excel.BorderIndex` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade: number; + /** + * Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeBorderLoadOptions): Excel.RangeBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeBorderData): void; + } + /** + * Represents the border objects that make up the range border. + * + * @remarks + * [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[]; + /** + * Number of border objects in the collection. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Specifies 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 collection doesn't have a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade: number; + /** + * Gets a border object using its name. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeBorderCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeBorderCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeBorderCollectionData): void; + } + /** + * This object represents the font attributes (font name, font size, color, etc.) for an object. + * + * @remarks + * [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 the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * Specifies the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic: boolean; + /** + * Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * Font size. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size: number; + /** + * Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + strikethrough: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subscript: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + superscript: boolean; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform font `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade: number; + /** + * Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeFontLoadOptions): Excel.RangeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeFontData): void; + } + /** + * A collection of all the chart objects on a worksheet. + * + * @remarks + * [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[]; + /** + * Returns the number of charts in the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Creates a new chart. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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 doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.ChartCollection; + /** + * Occurs when a chart is activated. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * Occurs when a new chart is added to the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onAdded: OfficeExtension.EventHandlers; + /** + * Occurs when a chart is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * Occurs when a chart is deleted. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartCollectionData): void; + } + class ChartCollectionCustom { + } + interface ChartCollection extends OfficeExtension.ClientObject, ChartCollectionCustom { + } + /** + * Represents a chart object in a workbook. + To learn more about the chart object model, see {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-charts | Work with charts using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly axes: Excel.ChartAxes; + /** + * Represents the data labels on the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly dataLabels: Excel.ChartDataLabels; + /** + * Encapsulates the format properties for the chart area. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartAreaFormat; + /** + * Represents the legend for the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly legend: Excel.ChartLegend; + /** + * Encapsulates the options for a pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly pivotOptions: Excel.ChartPivotOptions; + /** + * Represents the plot area for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly plotArea: Excel.ChartPlotArea; + /** + * Represents either a single series or collection of series in the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly series: Excel.ChartSeriesCollection; + /** + * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly title: Excel.ChartTitle; + /** + * The worksheet containing the current chart. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly worksheet: Excel.Worksheet; + /** + * Specifies a chart category label level enumeration constant, referring to the level of the source category labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel: number; + /** + * Specifies the type of the chart. See `Excel.ChartType` for details. + * + * @remarks + * [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"; + /** + * Specifies the way that blank cells are plotted on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs: Excel.ChartDisplayBlanksAs | "NotPlotted" | "Zero" | "Interplotted"; + /** + * Specifies the height, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + height: number; + /** + * The unique ID of chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly id: string; + /** + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + left: number; + /** + * Specifies the name of a chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * Specifies the way columns or rows are used as data series on the chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly: boolean; + /** + * Specifies a chart series name level enumeration constant, referring to the level of the source series names. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel: number; + /** + * Specifies whether to display all field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons: boolean; + /** + * Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. + If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum: boolean; + /** + * Specifies the chart style for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + style: number; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + top: number; + /** + * Specifies the width, in points, of the chart object. + * + * @remarks + * [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. + * @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; + /** + * Activates the chart in the Excel UI. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + activate(): void; + /** + * Deletes the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * Gets the data source of the whole chart. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getDataRange(): OfficeExtension.ClientResult; + /** + * Gets the data source of the whole chart. If the data range is empty, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getDataRangeOrNullObject(): OfficeExtension.ClientResult; + /** + * Gets the data table on the chart. If the chart doesn't allow a data table, it will throw an exception. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + getDataTable(): Excel.ChartDataTable; + /** + * Gets the data table on the chart. If the chart doesn't allow a data table, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + getDataTableOrNullObject(): Excel.ChartDataTable; + /** + * 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. + * + * @remarks + * [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 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. + * + * @remarks + * [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 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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartLoadOptions): Excel.Chart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Chart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Chart; + /** + * Occurs when the chart is activated. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * Occurs when the chart is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartData): void; + } + /** + * Encapsulates the options for the pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Specifies whether to display the 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showAxisFieldButtons: boolean; + /** + * Specifies whether to display the legend field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLegendFieldButtons: boolean; + /** + * Specifies whether to display the report filter field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showReportFilterFieldButtons: boolean; + /** + * Specifies whether to display the show value field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartPivotOptionsLoadOptions): Excel.ChartPivotOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartPivotOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartPivotOptionsData): void; + } + /** + * Encapsulates the format properties for the overall chart area. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly border: Excel.ChartBorder; + /** + * Represents the fill format of an object, which includes background formatting information. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.ChartFont; + /** + * Specifies the color scheme of the chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + colorScheme: Excel.ChartColorScheme | "ColorfulPalette1" | "ColorfulPalette2" | "ColorfulPalette3" | "ColorfulPalette4" | "MonochromaticPalette1" | "MonochromaticPalette2" | "MonochromaticPalette3" | "MonochromaticPalette4" | "MonochromaticPalette5" | "MonochromaticPalette6" | "MonochromaticPalette7" | "MonochromaticPalette8" | "MonochromaticPalette9" | "MonochromaticPalette10" | "MonochromaticPalette11" | "MonochromaticPalette12" | "MonochromaticPalette13"; + /** + * Specifies if the chart area of the chart has rounded corners. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartAreaFormatLoadOptions): Excel.ChartAreaFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartAreaFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartAreaFormatData): void; + } + /** + * Represents a collection of chart series. + * + * @remarks + * [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[]; + /** + * Returns the number of series in the collection. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Add a new series to the collection. The new added series is not visible until values, x-axis values, or bubble sizes for it are set (depending on chart type). + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Retrieves a series based on its position in the collection. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartSeriesCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartSeriesCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartSeriesCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartSeriesCollectionData): void; + } + /** + * Represents a series in a chart. + * + * @remarks + * [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 for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly binOptions: Excel.ChartBinOptions; + /** + * Encapsulates the options for the box and whisker charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly boxwhiskerOptions: Excel.ChartBoxwhiskerOptions; + /** + * Represents a collection of all data labels in the series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly dataLabels: Excel.ChartDataLabels; + /** + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartSeriesFormat; + /** + * Encapsulates the options for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly mapOptions: Excel.ChartMapOptions; + /** + * Returns a collection of all points in the series. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly points: Excel.ChartPointsCollection; + /** + * The collection of trendlines in the series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly trendlines: Excel.ChartTrendlineCollection; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly xErrorBars: Excel.ChartErrorBars; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly yErrorBars: Excel.ChartErrorBars; + /** + * Specifies the group for the specified series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + axisGroup: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bubbleScale: number; + /** + * Represents the chart type of a series. See `Excel.ChartType` for details. + * + * @remarks + * [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 doughnut exploded charts. + Throws an `InvalidArgument` error on invalid charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize: number; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + explosion: number; + /** + * Specifies if the series is filtered. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + filtered: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + gapWidth: number; + /** + * Specifies the color for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumColor: string; + /** + * Specifies the type for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumType: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumValue: number; + /** + * Specifies the color for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointColor: string; + /** + * Specifies the type for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointType: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointValue: number; + /** + * Specifies the color for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumColor: string; + /** + * Specifies the type for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumType: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumValue: number; + /** + * Specifies the series gradient style of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientStyle: Excel.ChartGradientStyle | "TwoPhaseColor" | "ThreePhaseColor"; + /** + * Specifies if the series has data labels. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabels: boolean; + /** + * Specifies the fill color for negative data points in a series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + invertColor: string; + /** + * True if Excel inverts the pattern in the item when it corresponds to a negative number. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + invertIfNegative: boolean; + /** + * Specifies the marker background color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor: string; + /** + * Specifies the marker foreground color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor: string; + /** + * Specifies the marker size of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize: number; + /** + * Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + /** + * Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + overlap: number; + /** + * Specifies the series parent label strategy area for a treemap chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentLabelStrategy: Excel.ChartParentLabelStrategy | "None" | "Banner" | "Overlapping"; + /** + * Specifies the plot order of a chart series within the chart group. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + plotOrder: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + secondPlotSize: number; + /** + * Specifies whether connector lines are shown in waterfall charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showConnectorLines: boolean; + /** + * Specifies whether leader lines are displayed for each data label in the series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLeaderLines: boolean; + /** + * Specifies if the series has a shadow. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow: boolean; + /** + * Specifies if the series is smooth. Only applicable to line and scatter charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + smooth: boolean; + /** + * Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitType: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + /** + * Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + splitValue: number; + /** + * True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + delete(): void; + /** + * Gets the string representation of the data source of the chart series.The string representation could be information such as a cell address. + * + * @remarks + * [Api set: ExcelApi 1.15] + * + * @param dimension The dimension of the axis where the data is from. + */ + getDimensionDataSourceString(dimension: Excel.ChartSeriesDimension): OfficeExtension.ClientResult; + /** + * Gets the string representation of the data source of the chart series.The string representation could be information such as a cell address. + * + * @remarks + * [Api set: ExcelApi 1.15] + * + * @param dimension The dimension of the axis where the data is from. + */ + getDimensionDataSourceString(dimension: "Categories" | "Values" | "XValues" | "YValues" | "BubbleSizes"): OfficeExtension.ClientResult; + /** + * Gets the data source type of the chart series. + * + * @remarks + * [Api set: ExcelApi 1.15] + * + * @param dimension The dimension of the axis where the data is from. + */ + getDimensionDataSourceType(dimension: Excel.ChartSeriesDimension): OfficeExtension.ClientResult; + /** + * Gets the data source type of the chart series. + * + * @remarks + * [Api set: ExcelApi 1.15] + * + * @param dimension The dimension of the axis where the data is from. + */ + getDimensionDataSourceType(dimension: "Categories" | "Values" | "XValues" | "YValues" | "BubbleSizes"): OfficeExtension.ClientResult; + /** + * Gets the values from a single dimension of the chart series. These could be either category values or data values, depending on the dimension specified and how the data is mapped for the chart series. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param dimension The dimension of the axis where the data is from. + */ + getDimensionValues(dimension: Excel.ChartSeriesDimension): OfficeExtension.ClientResult; + /** + * Gets the values from a single dimension of the chart series. These could be either category values or data values, depending on the dimension specified and how the data is mapped for the chart series. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param dimension The dimension of the axis where the data is from. + */ + getDimensionValues(dimension: "Categories" | "Values" | "XValues" | "YValues" | "BubbleSizes"): OfficeExtension.ClientResult; + /** + * Sets the bubble sizes for a chart series. Only works for bubble charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param sourceData The `Range` object corresponding to the source data. + */ + setBubbleSizes(sourceData: Range): void; + /** + * Sets the values for a chart series. For scatter charts, it refers to y-axis values. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param sourceData The `Range` object corresponding to the source data. + */ + setValues(sourceData: Range): void; + /** + * Sets the values of the x-axis for a chart series. Only works for scatter charts. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartSeriesLoadOptions): Excel.ChartSeries; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartSeries; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartSeriesData): void; + } + /** + * Encapsulates the format properties for the chart series + * + * @remarks + * [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 formatting information. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * Represents line formatting. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartSeriesFormatLoadOptions): Excel.ChartSeriesFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartSeriesFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartSeriesFormatData): void; + } + /** + * A collection of all the chart points within a series inside a chart. + * + * @remarks + * [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[]; + /** + * Returns the number of chart points in the series. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Returns the number of chart points in the series. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Retrieve a point based on its position within the series. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartPointsCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartPointsCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartPointsCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartPointsCollectionData): void; + } + /** + * Represents a point of a series in a chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly dataLabel: Excel.ChartDataLabel; + /** + * Encapsulates the format properties chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartPointFormat; + /** + * Represents whether a data point has a data label. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabel: boolean; + /** + * HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor: string; + /** + * HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor: string; + /** + * Represents marker size of a data point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize: number; + /** + * Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartPointLoadOptions): Excel.ChartPoint; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartPoint; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartPointData): void; + } + /** + * Represents the formatting object for chart points. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly border: Excel.ChartBorder; + /** + * Represents the fill format of a chart, which includes background formatting information. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartPointFormatLoadOptions): Excel.ChartPointFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartPointFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartPointFormatData): void; + } + /** + * Represents the chart axes. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly categoryAxis: Excel.ChartAxis; + /** + * Represents the series axis of a 3-D chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly seriesAxis: Excel.ChartAxis; + /** + * Represents the value axis in an axis. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartAxesLoadOptions): Excel.ChartAxes; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartAxes; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartAxesData): void; + } + /** + * Represents a single axis in a chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartAxisFormat; + /** + * Returns an object that represents the major gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly majorGridlines: Excel.ChartGridlines; + /** + * Returns an object that represents the minor gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly minorGridlines: Excel.ChartGridlines; + /** + * Represents the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly title: Excel.ChartAxisTitle; + /** + * Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + alignment: Excel.ChartTickLabelAlignment | "Center" | "Left" | "Right"; + /** + * Specifies the group for the specified axis. See `Excel.ChartAxisGroup` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly axisGroup: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * Specifies the base unit for the specified category axis. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * Specifies the category axis type. + * + * @remarks + * [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. + * Specifies the specified axis where the other axis crosses. See `Excel.ChartAxisPosition` for details. + * + * @remarks + * [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. + * Specifies the specified axis where the other axis crosses at. Set to this property should use `SetCrossesAt(double)` method. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly crossesAt: number; + /** + * Specifies the custom axis display unit value. To set this property, please use the `SetCustomDisplayUnit(double)` method. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly customDisplayUnit: number; + /** + * Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + displayUnit: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; + /** + * Specifies the height, in points, of the chart axis. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly height: number; + /** + * Specifies if the value axis crosses the category axis between categories. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isBetweenCategories: boolean; + /** + * Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly left: number; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat: boolean; + /** + * Specifies the base of the logarithm when using logarithmic scales. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + logBase: number; + /** + * Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + majorTickMark: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minimum: any; + /** + * Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + minorTickMark: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorUnit: any; + /** + * Specifies if an axis is multilevel. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + multiLevel: boolean; + /** + * Specifies the format code for the axis tick label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + offset: number; + /** + * Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * Specifies the axis position where the other axis crosses. You should use the `SetPositionAt(double)` method to set this property. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly positionAt: number; + /** + * Specifies if Excel plots data points from last to first. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder: boolean; + /** + * Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + scaleType: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; + /** + * Specifies if the axis display unit label is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel: boolean; + /** + * Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation: any; + /** + * Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing: any; + /** + * Specifies the number of categories or series between tick marks. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing: number; + /** + * Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly top: number; + /** + * Specifies the axis type. See `Excel.ChartAxisType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly type: Excel.ChartAxisType | "Invalid" | "Category" | "Value" | "Series"; + /** + * Specifies if the axis is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible: boolean; + /** + * Specifies the width, in points, of the chart axis. Returns `null` if the axis is not visible. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param sourceData The `Range` object corresponding to the source data. + */ + setCategoryNames(sourceData: Range): void; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `SetPositionAt` instead. + * Sets the specified axis where the other axis crosses at. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param value Custom value of the crossing point. + */ + setCrossesAt(value: number): void; + /** + * Sets the axis display unit to a custom value. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param value Custom value of the display unit. + */ + setCustomDisplayUnit(value: number): void; + /** + * Sets the specified axis position where the other axis crosses. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param value Custom value of the crossing point. + */ + 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartAxisLoadOptions): Excel.ChartAxis; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartAxis; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartAxisData): void; + } + /** + * Encapsulates the format properties for the chart axis. + * + * @remarks + * [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; + /** + * Specifies chart fill formatting. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly fill: Excel.ChartFill; + /** + * Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.ChartFont; + /** + * Specifies chart line formatting. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartAxisFormatLoadOptions): Excel.ChartAxisFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartAxisFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartAxisFormatData): void; + } + /** + * Represents the title of a chart axis. + * + * @remarks + * [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; + /** + * Specifies the formatting of the chart axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartAxisTitleFormat; + /** + * Specifies the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text: string; + /** + * Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + textOrientation: number; + /** + * Specifies if the axis title is visibile. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartAxisTitleLoadOptions): Excel.ChartAxisTitle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartAxisTitle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartAxisTitleData): void; + } + /** + * Represents the chart axis title formatting. + * + * @remarks + * [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; + /** + * Specifies the chart axis title's border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * Specifies the chart axis title's fill formatting. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly fill: Excel.ChartFill; + /** + * Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartAxisTitleFormatLoadOptions): Excel.ChartAxisTitleFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartAxisTitleFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartAxisTitleFormatData): void; + } + /** + * Represents a collection of all the data labels on a chart point. + * + * @remarks + * [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; + /** + * Specifies the format of chart data labels, which includes fill and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartDataLabelFormat; + /** + * Specifies if data labels automatically generate appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText: boolean; + /** + * TODO: + * + * @remarks + * [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"; + /** + * Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when the `TextOrientation` of data label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat: boolean; + /** + * Specifies the format code for data labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + separator: string; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly showAsDataCallout: boolean; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showBubbleSize: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showCategoryName: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showLegendKey: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showPercentage: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showSeriesName: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showValue: boolean; + /** + * Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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 the data label is -90, 90, or 180. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartDataLabelsLoadOptions): Excel.ChartDataLabels; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartDataLabels; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartDataLabelsData): void; + } + /** + * Represents the data label of a chart point. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly format: Excel.ChartDataLabelFormat; + /** + * Specifies if the data label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText: boolean; + /** + * String value that represents the formula of chart data label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula: string; + /** + * TODO: + * + * @remarks + * [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"; + /** + * Returns the height, in points, of the chart data label. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left: number; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat: boolean; + /** + * String value that represents the format code for data label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + separator: string; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly showAsDataCallout: boolean; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showBubbleSize: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showCategoryName: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showLegendKey: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showPercentage: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showSeriesName: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showValue: boolean; + /** + * String representing the text of the data label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text: string; + /** + * Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Returns the width, in points, of the chart data label. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * @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; + /** + * Get the substring of a chart data label. Line break '\n' counts one character. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param start The zero-based index of the first character to get from the text range. + * @param length Optional. The number of characters to be returned in the new text range. If length is omitted, all the characters from start to the end of the text range's last paragraph will be returned. + */ + getSubstring(start: number, length?: number): Excel.ChartFormatString; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartDataLabelLoadOptions): Excel.ChartDataLabel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartDataLabel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartDataLabelData): void; + } + /** + * Encapsulates the format properties for the chart data labels. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * Represents the fill format of the current chart data label. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * Represents the font attributes (such as font name, font size, and color) for a chart data label. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartDataLabelFormatLoadOptions): Excel.ChartDataLabelFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartDataLabelFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartDataLabelFormatData): void; + } + /** + * Represents the data table object of a chart. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + class ChartDataTable 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 a chart data table, which includes fill, font, and border format. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly format: Excel.ChartDataTableFormat; + /** + * Specifies whether to display the horizontal border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showHorizontalBorder: boolean; + /** + * Specifies whether to show the legend key of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showLegendKey: boolean; + /** + * Specifies whether to display the outline border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showOutlineBorder: boolean; + /** + * Specifies whether to display the vertical border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showVerticalBorder: boolean; + /** + * Specifies whether to show the data table of the chart. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + 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. + * @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.ChartDataTableUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartDataTable): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartDataTableLoadOptions): Excel.ChartDataTable; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartDataTable; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.ChartDataTable; + /** + * 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.ChartDataTable object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartDataTableData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ChartDataTableData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartDataTableData): void; + } + /** + * Represents the format of a chart data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + class ChartDataTableFormat 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 data table, which includes color, line style, and weight. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly border: Excel.ChartBorder; + /** + * Represents the fill format of an object, which includes background formatting information. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly fill: Excel.ChartFill; + /** + * Represents the font attributes (such as font name, font size, and color) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + 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. + * @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.ChartDataTableFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartDataTableFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartDataTableFormatLoadOptions): Excel.ChartDataTableFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartDataTableFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.ChartDataTableFormat; + /** + * 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.ChartDataTableFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartDataTableFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ChartDataTableFormatData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartDataTableFormatData): void; + } + /** + * This object represents the attributes for a chart's error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Specifies the formatting type of the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly format: Excel.ChartErrorBarsFormat; + /** + * Specifies if error bars have an end style cap. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endStyleCap: boolean; + /** + * Specifies which parts of the error bars to include. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + include: Excel.ChartErrorBarsInclude | "Both" | "MinusValues" | "PlusValues"; + /** + * The type of range marked by the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: Excel.ChartErrorBarsType | "FixedValue" | "Percent" | "StDev" | "StError" | "Custom"; + /** + * Specifies whether the error bars are displayed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartErrorBarsLoadOptions): Excel.ChartErrorBars; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartErrorBars; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartErrorBarsData): void; + } + /** + * Encapsulates the format properties for chart error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 the chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartErrorBarsFormatLoadOptions): Excel.ChartErrorBarsFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartErrorBarsFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartErrorBarsFormatData): void; + } + /** + * Represents major or minor gridlines on a chart axis. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartGridlinesFormat; + /** + * Specifies if the axis gridlines are visible. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartGridlinesLoadOptions): Excel.ChartGridlines; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartGridlines; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartGridlinesData): void; + } + /** + * Encapsulates the format properties for chart gridlines. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartGridlinesFormatLoadOptions): Excel.ChartGridlinesFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartGridlinesFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartGridlinesFormatData): void; + } + /** + * Represents the legend in a chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartLegendFormat; + /** + * Represents a collection of legendEntries in the legend. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly legendEntries: Excel.ChartLegendEntryCollection; + /** + * Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height: number; + /** + * Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left: number; + /** + * Specifies if the chart legend should overlap with the main body of the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay: boolean; + /** + * Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; + /** + * Specifies if the legend has a shadow on the chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow: boolean; + /** + * Specifies the top of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top: number; + /** + * Specifies if the chart legend is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible: boolean; + /** + * Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartLegendLoadOptions): Excel.ChartLegend; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartLegend; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartLegendData): void; + } + /** + * Represents the legend entry in `legendEntryCollection`. + * + * @remarks + * [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; + /** + * Specifies the height of the legend entry on the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly height: number; + /** + * Specifies the index of the legend entry in the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly index: number; + /** + * Specifies the left value of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly left: number; + /** + * Specifies the top of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly top: number; + /** + * Represents the visibility of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible: boolean; + /** + * Represents the width of the legend entry on the chart Legend. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartLegendEntryLoadOptions): Excel.ChartLegendEntry; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartLegendEntry; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartLegendEntryData): void; + } + /** + * Represents a collection of legend entries. + * + * @remarks + * [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[]; + /** + * Returns the number of legend entries in the collection. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Returns a legend entry at the given index. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param index Index of the legend entry 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartLegendEntryCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartLegendEntryCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartLegendEntryCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartLegendEntryCollectionData): void; + } + /** + * Encapsulates the format properties of a chart legend. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * Represents the fill format of an object, which includes background formatting information. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * Represents the font attributes such as font name, font size, and color of a chart legend. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartLegendFormatLoadOptions): Excel.ChartLegendFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartLegendFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartLegendFormatData): void; + } + /** + * Encapsulates the properties for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Specifies the series map labels strategy of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + labelStrategy: Excel.ChartMapLabelStrategy | "None" | "BestFit" | "ShowAll"; + /** + * Specifies the series mapping level of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level: Excel.ChartMapAreaLevel | "Automatic" | "DataOnly" | "City" | "County" | "State" | "Country" | "Continent" | "World"; + /** + * Specifies the series projection type of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartMapOptionsLoadOptions): Excel.ChartMapOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartMapOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartMapOptionsData): void; + } + /** + * Represents a chart title object of a chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartTitleFormat; + /** + * Returns the height, in points, of the chart title. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly height: number; + /** + * Specifies the horizontal alignment for chart title. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left: number; + /** + * Specifies if the chart title will overlay the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay: boolean; + /** + * Represents the position of chart title. See `Excel.ChartTitlePosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow: boolean; + /** + * Specifies the chart's title text. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text: string; + /** + * Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + textOrientation: number; + /** + * Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top: number; + /** + * Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Specifies if the chart title is visibile. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible: boolean; + /** + * Specifies the width, in points, of the chart title. Value is `null` if the chart title is not visible. + * + * @remarks + * [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. + * @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' counts one character. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param start Start position of substring to be retrieved. Zero-indexed. + * @param length Length of the 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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTitleLoadOptions): Excel.ChartTitle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTitle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartTitleData): void; + } + /** + * Represents the substring in chart related objects that contain text, like a `ChartTitle` object or `ChartAxisTitle` object. + * + * @remarks + * [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, and color of a chart characters object. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartFormatStringLoadOptions): Excel.ChartFormatString; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartFormatString; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartFormatStringData): void; + } + /** + * Provides access to the formatting options for a chart title. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly border: Excel.ChartBorder; + /** + * Represents the fill format of an object, which includes background formatting information. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * Represents the font attributes (such as font name, font size, and color) for an object. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTitleFormatLoadOptions): Excel.ChartTitleFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTitleFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartTitleFormatData): void; + } + /** + * Represents the fill formatting for a chart element. + * + * @remarks + * [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; + /** + * Clears the fill color of a chart element. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + clear(): void; + /** + * Gets the uniform color fill formatting of a chart element. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + getSolidColor(): OfficeExtension.ClientResult; + /** + * Sets the fill formatting of a chart element to a uniform color. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param color HTML color code representing the color of the background, in 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; + }; + } + class ChartFillCustom { + /** + * 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; + } + interface ChartFill extends OfficeExtension.ClientObject, ChartFillCustom { + } + /** + * Represents the border formatting of a chart element. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + color: string; + /** + * Represents the line style of the border. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartBorderLoadOptions): Excel.ChartBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartBorderData): void; + } + /** + * Encapsulates the bin options for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Specifies if bin overflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowOverflow: boolean; + /** + * Specifies if bin underflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowUnderflow: boolean; + /** + * Specifies the bin count of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + count: number; + /** + * Specifies the bin overflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + overflowValue: number; + /** + * Specifies the bin's type for a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: Excel.ChartBinType | "Category" | "Auto" | "BinWidth" | "BinCount"; + /** + * Specifies the bin underflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underflowValue: number; + /** + * Specifies the bin width value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartBinOptionsLoadOptions): Excel.ChartBinOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartBinOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartBinOptionsData): void; + } + /** + * Represents the properties of a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Specifies if the quartile calculation type of a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + quartileCalculation: Excel.ChartBoxQuartileCalculation | "Inclusive" | "Exclusive"; + /** + * Specifies if inner points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showInnerPoints: boolean; + /** + * Specifies if the mean line is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanLine: boolean; + /** + * Specifies if the mean marker is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanMarker: boolean; + /** + * Specifies if outlier points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartBoxwhiskerOptionsLoadOptions): Excel.ChartBoxwhiskerOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartBoxwhiskerOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartBoxwhiskerOptionsData): void; + } + /** + * Encapsulates the formatting options for line elements. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * Represents the line style. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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; + /** + * Clears the line format of a chart element. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartLineFormatLoadOptions): Excel.ChartLineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartLineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartLineFormatData): void; + } + /** + * This object represents the font attributes (such as font name, font size, and color) for a chart object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * Represents the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic: boolean; + /** + * Font name (e.g., "Calibri") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * Size of the font (e.g., 11) + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size: number; + /** + * Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartFontLoadOptions): Excel.ChartFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartFontData): void; + } + /** + * This object represents the attributes for a chart trendline object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly format: Excel.ChartTrendlineFormat; + /** + * Represents the label of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly label: Excel.ChartTrendlineLabel; + /** + * Represents the number of periods that the trendline extends backward. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + backwardPeriod: number; + /** + * Represents the number of periods that the trendline extends forward. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + intercept: any; + /** + * Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod: number; + /** + * Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name: string; + /** + * Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + polynomialOrder: number; + /** + * True if the equation for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showEquation: boolean; + /** + * True if the r-squared value for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showRSquared: boolean; + /** + * Represents the type of a chart trendline. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTrendlineLoadOptions): Excel.ChartTrendline; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTrendline; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartTrendlineData): void; + } + /** + * Represents a collection of chart trendlines. + * + * @remarks + * [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[]; + /** + * Adds a new trendline to trendline collection. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a trendline object by index, which is the insertion order in the items array. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param index Represents the insertion order in the 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTrendlineCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartTrendlineCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTrendlineCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartTrendlineCollectionData): void; + } + /** + * Represents the format properties for the chart trendline. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTrendlineFormatLoadOptions): Excel.ChartTrendlineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTrendlineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartTrendlineFormatData): void; + } + /** + * This object represents the attributes for a chart trendline label object. + * + * @remarks + * [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; + /** + * The format of the chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly format: Excel.ChartTrendlineLabelFormat; + /** + * Specifies if the trendline label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText: boolean; + /** + * String value that represents the formula of the chart trendline label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula: string; + /** + * Returns the height, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly height: number; + /** + * Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left: number; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat: boolean; + /** + * String value that represents the format code for the trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * String representing the text of the trendline label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text: string; + /** + * Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation: number; + /** + * Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top: number; + /** + * Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Returns the width, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTrendlineLabelLoadOptions): Excel.ChartTrendlineLabel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTrendlineLabel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartTrendlineLabelData): void; + } + /** + * Encapsulates the format properties for the chart trendline label. + * + * @remarks + * [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; + /** + * Specifies the border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * Specifies the fill format of the current chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly fill: Excel.ChartFill; + /** + * Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTrendlineLabelFormatLoadOptions): Excel.ChartTrendlineLabelFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTrendlineLabelFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartTrendlineLabelFormatData): void; + } + /** + * This object represents the attributes for a chart plot area. + * + * @remarks + * [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; + /** + * Specifies the formatting of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly format: Excel.ChartPlotAreaFormat; + /** + * Specifies the height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height: number; + /** + * Specifies the inside height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideHeight: number; + /** + * Specifies the inside left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideLeft: number; + /** + * Specifies the inside top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideTop: number; + /** + * Specifies the inside width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideWidth: number; + /** + * Specifies the left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left: number; + /** + * Specifies the position of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position: Excel.ChartPlotAreaPosition | "Automatic" | "Custom"; + /** + * Specifies the top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top: number; + /** + * Specifies the width value of a plot area. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartPlotAreaLoadOptions): Excel.ChartPlotArea; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartPlotArea; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartPlotAreaData): void; + } + /** + * Represents the format properties for a chart plot area. + * + * @remarks + * [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; + /** + * Specifies the border attributes of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * Specifies the fill format of an object, which includes background formatting information. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartPlotAreaFormatLoadOptions): Excel.ChartPlotAreaFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartPlotAreaFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ChartPlotAreaFormatData): void; + } + /** + * A collection of all the visuals on a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class VisualCollection 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.Visual[]; + /** + * Creates a new visual. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param visualDefinitionGuid The GUID of a visual definition, not the ID for an instance of a visual. + * @param dataSourceType The data source type of the visual (e.g., "xlFormula"). + * @param dataSourceContent The data source content. + */ + add(visualDefinitionGuid: string, dataSourceType?: string, dataSourceContent?: string): Excel.Visual; + /** + * Returns the number of visuals in the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets all visual definitions. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getDefinitions(): OfficeExtension.ClientResult; + /** + * Get the preview of a visual. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param visualDefinitionGuid The GUID of a visual definition, not the ID for an instance of a visual. + * @param width The width of the preview. + * @param height The height of the preview. + * @param dpi The DPI setting. + */ + getPreview(visualDefinitionGuid: string, width: number, height: number, dpi: number): OfficeExtension.ClientResult; + /** + * Gets the selected visual, if and only if one visual is selected. + If no visual is selected, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getSelectedOrNullObject(): Excel.Visual; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.VisualCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.VisualCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.VisualCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.VisualCollection; + /** + * Data and properties updates for agave visuals. + AgaveVisuals will be registered to this event on bootstrap, other types of visuals do not use this. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onAgaveVisualUpdate: OfficeExtension.EventHandlers; + /** + * Occurs when a selection is changed. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @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.VisualCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.VisualCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.VisualCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.VisualCollectionData): void; + } + class VisualCollectionCustom { + } + interface VisualCollection extends OfficeExtension.ClientObject, VisualCollectionCustom { + } + /** + * Represents a visual object in a workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class Visual 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 all properties of the visual. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly properties: Excel.VisualPropertyCollection; + /** + * The unique ID of this visual instance. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly id: string; + /** + * Represents if the visual is supported in the new Excel on the web chart format task pane. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly isSupportedInVisualTaskpane: boolean; + /** + * Adds a new property to a parent collection. + Only valid for properties of the type `VisualPropertyType.Collection`. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param parentCollectionName Name of the parent property. + * @param attributes Set up attributes for the new property. + * Attributes vary depending on the type of the property and are required for some properties. + * @returns The zero-index value at which the property was added in the parent collection. + */ + addChildProperty(parentCollectionName: string, attributes?: any): OfficeExtension.ClientResult; + /** + * Change the data source of the visual. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param dataSourceType The data source type of the visual (e.g., "xlFormula"). + * @param dataSourceContent The data source content (e.g., "Sheet1!$C$5:$D$7"). + */ + changeDataSource(dataSourceType: string, dataSourceContent: string): void; + /** + * Deletes the visual. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Recursively modify UO properties. + * + * @remarks + * [Api set: ExcelApi 1.10] + * Only specified properties are modifiedProperties with any of the metaproperties ReadOnly or Untransferable will be silently ignored.If a matching property is not found, it will be silently ignored.Items are removed or added from collections to match the specified size. This can be used to add or remove elements from the visual.Each parameter is an object that contains type and value parameters. Type is one of Object, Collection, String, Double, Int, Bool, Enum, or Color. + * Color properties can be one of a few formats: + * + * { + * "RRGGBBColor" : { + * "type" : "Color", + * "value" : "#00ffAA" + * }, + * "RRGGBBAAColor" : { + * "type" : "Color", + * "value" : "#99ffaabb" + * }, + * "ThemeColor" : { + * "type" : "Color", + * "value" : { + * "themeIndex" : 4, + * "tint" : 1.000000, + * "shade" : 0.100000 + * } + * } + * } + * + * @param json JSON representation of the UO property tree to transfer onto the visual + */ + deserializeProperties(json: string): void; + /** + * Gets the child properties of the specific parent property ID. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param parentPropId Parent property ID. Omitting this parameter will return the root-level properties. + * @param levelsToTraverse Indicates how many levels it shall retrieve. Omitting this parameter will return only 1 level properties + */ + getChildProperties(parentPropId?: string, levelsToTraverse?: number): Excel.VisualPropertyCollection; + /** + * Gets the data controller client for the visual. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getDataControllerClient(): Excel.DataControllerClient; + /** + * Gets a string representing the visual's current data source (e.g., "Sheet1!$C$5:$D$7"). + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getDataSource(): OfficeExtension.ClientResult; + /** + * Gets the child properties of the specific parent linked to cookie. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param elementId ID of the chart element. + * @param index Index of the chart element (if present). Parameter is omitted whenever element is not a series, legend or trendline point. + * @param levelsToTraverse Indicates how many levels it shall retrieve. Omitting this parameter will return only 1 level properties + * @returns + */ + getElementChildProperties(elementId: number, index: number, levelsToTraverse?: number): Excel.VisualPropertyCollection; + /** + * GetProperty + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getProperty(propName: string): OfficeExtension.ClientResult; + /** + * Removes a property from the parent collection. + Only valid for properties of type `VisualPropertyType.Collection`. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param parentCollectionName Name of the parent property. + * @param index The zero-index value at which the property is present in the parent collection. + */ + removeChildProperty(parentCollectionName: string, index: number): void; + /** + * Recursively serialize UO properties. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns JSON representation of UO property tree. The structure mirrors property IDs, and may vary depending on visual type and other parameters. + */ + serializeProperties(): OfficeExtension.ClientResult; + /** + * SetProperty + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + setProperty(propName: string, value: any): void; + /** + * Returns `true` when the property's value is currently the default. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + setPropertyToDefault(propName: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.VisualLoadOptions): Excel.Visual; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Visual; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Visual; + /** + * Occurs when there is a visual change event. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onChangeNotification: 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.Visual object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.VisualData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.VisualData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.VisualData): void; + } + /** + * This object represents the attributes for a property. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class VisualProperty 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 `true` if the property should be expandable in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly expandableUI: boolean; + /** + * Returns true when a default value for this property exists + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly hasDefault: boolean; + /** + * Returns `true` if the property should be hidden in the UI. Its children will still be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly hideMeButShowChildrenUI: boolean; + /** + * Returns the property ID. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly id: string; + /** + * The zero-index value at which the property is present in the parent collection. + Only valid for properties that are children of `VisualPropertyType.Collection`. + Returns `null` otherwise. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly index: number; + /** + * Returns true when the property's value is currently the default + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly isDefault: boolean; + /** + * Returns the property localized name. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly localizedName: string; + /** + * Returns the localized property options for `IEnumProperty` only. If property type isn't an enum, it returns `null`. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly localizedOptions: string[]; + /** + * Returns the maximum value of the property. Only valid for `INumericProperty` properties. Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly max: number; + /** + * Maximum size of the property. + Only valid for `VisualPropertyType.Collection`. + Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly maxSize: number; + /** + * Returns the minimum value of the property. Only valid for `INumericProperty` properties. Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly min: number; + /** + * Minimum size of the property. + Only valid for `VisualPropertyType.Collection`. + Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly minSize: number; + /** + * Returns `true` if the next property should be on the same line in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly nextPropOnSameLine: boolean; + /** + * Returns the property options for `IEnumProperty` only. If the property type isn't an enum, it returns `null`. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly options: string[]; + /** + * Name of the parent property. + Only valid for properties that are children of `VisualPropertyType.Collection`. + Returns `null` otherwise. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly parentName: string; + /** + * Returns `true` if a reset button for the property should be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly showResetUI: boolean; + /** + * Size of the property. + Only valid for `VisualPropertyType.Collection`. + Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly size: number; + /** + * Returns the step size of the property. Only valid for `INumericProperty` properties. Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly stepSize: number; + /** + * Returns the property type. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly type: Excel.VisualPropertyType | "Object" | "Collection" | "String" | "Double" | "Int" | "Bool" | "Enum" | "Color"; + /** + * Returns the property value. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly value: any; + /** + * Returns `true` if the visual property's boolean meta-property is set. + The type of meta property + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getBoolMetaProperty(metaProp: Excel.BoolMetaPropertyType): OfficeExtension.ClientResult; + /** + * Returns `true` if the visual property's boolean meta-property is set. + The type of meta property + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getBoolMetaProperty(metaProp: "WriteOnly" | "ReadOnly" | "HideEntireSubtreeUI" | "HideMeButShowChildrenUI" | "ExpandableUI" | "NextPropOnSameLine" | "HideLabel" | "ShowResetUI" | "HasOwnExpandableSection" | "NextPropOnSameLineFOTP" | "ShowResetUIFOTP" | "Untransferable" | "IgnoreDuringChangeChartType" | "NotTriviallyUndoable" | "VolatileEnum" | "ExceptionCollection" | "MetaOnly" | "ShowHideCollection" | "ErrorMessage" | "InfoMessage"): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.VisualPropertyLoadOptions): Excel.VisualProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.VisualProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.VisualProperty; + /** + * 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.VisualProperty object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.VisualPropertyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.VisualPropertyData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.VisualPropertyData): void; + } + /** + * Represents a collection of visual object properties. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class VisualPropertyCollection 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.VisualProperty[]; + /** + * Returns the number of properties in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Returns a property at the given index. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param index Represents the index in the property array. + */ + getItem(index: number): Excel.VisualProperty; + /** + * Returns a property at the given index. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param index Represents the index in the property array. + */ + getItemAt(index: number): Excel.VisualProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.VisualPropertyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.VisualPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.VisualPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.VisualPropertyCollection; + /** + * 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.VisualPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.VisualPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.VisualPropertyCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.VisualPropertyCollectionData): void; + } + /** + * Represents a visual definition. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface VisualDefinition { + /** + * Specifies the category of a visual definition. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + category: Excel.VisualCategory | "Column" | "Bar" | "Line" | "Area" | "Pie" | "Donut" | "Scatter" | "Bubble" | "Statistical" | "Stock" | "Combo" | "Hierarchy" | "Surface" | "Map" | "Funnel" | "Radar" | "Waterfall" | "ThreeD" | "Other"; + /** + * Specifies the category rank of a visual definition. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + categoryRank: number; + /** + * Specifies the decription of a visual definition. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + description: string; + /** + * Specifies the ID of a visual definition. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id: string; + /** + * Specifies the title of a visual definition. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + title: string; + } + /** + * Represents how the visual is set up to use the data source. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class DataControllerClient 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; + /** + * Add a field to a well. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param wellId The ID of the well that the field will be added to. + * @param fieldId The ID of the field to add to the well. + * @param position The position in the well where the field should be added. + */ + addField(wellId: number, fieldId: number, position: number): void; + /** + * Gets an array of JSON objects representing the fields associated with the specified well ID. + The objects in the array have an ID (number) and name (string). + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param wellId The ID of the well to get the associated fields for. + */ + getAssociatedFields(wellId: number): OfficeExtension.ClientResult; + /** + * Gets an array of JSON objects representing the fields that may be associated with the well ID. + The objects in the array have an ID (number) and name (string). + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param wellId The ID of the well to get the available fields for. + */ + getAvailableFields(wellId: number): OfficeExtension.ClientResult; + /** + * Gets an array of JSON objects representing this visual's wells. + The objects in the array have an ID (number) and name (string). + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getWells(): OfficeExtension.ClientResult; + /** + * Move a field from one position to another in a well. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param wellId The ID of the well to be moved. + * @param fromPosition The position in the well of the field to be moved. + * @param toPosition The new position for the field. + */ + moveField(wellId: number, fromPosition: number, toPosition: number): void; + /** + * Remove a field from a well. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param wellId The ID of the well that will have a field removed. + * @param position The position in the well of the field that should be removed. + */ + removeField(wellId: number, position: number): 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.DataControllerClient object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DataControllerClientData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * Manages sorting operations on `Range` objects. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * 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; + }; + } + /** + * Manages sorting operations on `Table` objects. + * + * @remarks + * [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; + /** + * Specifies the current conditions used to last sort the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly fields: Excel.SortField[]; + /** + * Specifies if the casing impacts the last sort of the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly matchCase: boolean; + /** + * Represents the Chinese character ordering method last used to sort the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly method: Excel.SortMethod | "PinYin" | "StrokeCount"; + /** + * Perform a sort operation. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + clear(): void; + /** + * Reapplies the current sorting parameters to the table. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableSortLoadOptions): Excel.TableSort; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableSort; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TableSortData): void; + } + /** + * Represents a condition in a sorting operation. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface SortField { + /** + * Specifies if the sorting is done in an ascending fashion. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + ascending?: boolean; + /** + * Specifies the color that is the target of the condition if the sorting is on font or cell color. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + color?: string; + /** + * Represents additional sorting options for this field. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + dataOption?: Excel.SortDataOption | "Normal" | "TextAsNumber"; + /** + * Specifies the icon that is the target of the condition, if the sorting is on the cell's icon. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + icon?: Excel.Icon; + /** + * Specifies the column (or row, depending on the sort orientation) that the condition is on. Represented as an offset from the first column (or row). + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + key: number; + /** + * Specifies the type of sorting of this condition. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + sortOn?: Excel.SortOn | "Value" | "CellColor" | "FontColor" | "Icon"; + /** + * Specifies the subfield that is the target property name of a rich value to sort on. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subField?: string; + } + /** + * Manages the filtering of a table's column. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly criteria: Excel.FilterCriteria; + /** + * Apply the given filter criteria on the given column. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + * + * @param criteria The dynamic criteria to apply. + */ + applyDynamicFilter(criteria: Excel.DynamicFilterCriteria): void; + /** + * Apply a "Dynamic" filter to the column. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.FilterLoadOptions): Excel.Filter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Filter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.FilterData): void; + } + /** + * Represents the filtering criteria applied to a column. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface FilterCriteria { + /** + * The HTML color string used to filter cells. Used with `cellColor` and `fontColor` filtering. + * + * @remarks + * [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 numbers 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`). + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + criterion2?: string; + /** + * The dynamic criteria from the `Excel.DynamicFilterCriteria` set to apply on this column. Used with `dynamic` filtering. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + icon?: Excel.Icon; + /** + * The operator used to combine criterion 1 and 2 when using `custom` filtering. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + operator?: Excel.FilterOperator | "And" | "Or"; + /** + * The property used by the filter to do a rich filter on rich values. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subField?: string; + /** + * The set of values to be used as part of `values` filtering. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + values?: Array; + } + /** + * Represents how to filter a date when filtering on values. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface FilterDatetime { + /** + * The date in ISO8601 format used to filter data. + * + * @remarks + * [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 specificity is set to "month", the filter operation will keep all rows with a date in the month of April 2005. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + specificity: Excel.FilterDatetimeSpecificity | "Year" | "Month" | "Day" | "Hour" | "Minute" | "Second"; + } + /** + * Represents the `AutoFilter` object. + AutoFilter turns the values in Excel column into specific filters based on the cell contents. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * An array that holds all the filter criteria in the autofiltered range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly criteria: Excel.FilterCriteria[]; + /** + * Specifies if the AutoFilter is enabled. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly enabled: boolean; + /** + * Specifies if the AutoFilter has filter criteria. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly isDataFiltered: boolean; + /** + * Applies the AutoFilter to a range. This filters the column if column index and filter criteria are specified. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param range The range on which the AutoFilter will apply. + * @param columnIndex The zero-based column index to which the AutoFilter is applied. + * @param criteria The filter criteria. + */ + apply(range: Range | string, columnIndex?: number, criteria?: Excel.FilterCriteria): void; + /** + * Clears the column filter criteria of the AutoFilter. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param columnIndex The zero-based column index, which represents which column filter needs to be cleared. + * If the index value is not supported (for example, if the value is a negative number, or if the value is greater than the number of available columns in the range), + * then an `InvalidArgument` error will be thrown. + */ + clearColumnCriteria(columnIndex: number): void; + /** + * Clears the filter criteria and sort state of the AutoFilter. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + clearCriteria(): void; + /** + * Returns the `Range` object that represents the range to which the AutoFilter applies. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getRange(): Excel.Range; + /** + * Returns the `Range` object that represents the range to which the AutoFilter applies. + If there is no `Range` object associated with the AutoFilter, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getRangeOrNullObject(): Excel.Range; + /** + * Applies the specified AutoFilter object currently on the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + reapply(): void; + /** + * Removes the AutoFilter for the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + remove(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.AutoFilterLoadOptions): Excel.AutoFilter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.AutoFilter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.AutoFilterData): void; + } + /** + * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + class CultureInfo 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; + /** + * Defines the culturally appropriate format of displaying date and time. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly datetimeFormat: Excel.DatetimeFormatInfo; + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly numberFormat: Excel.NumberFormatInfo; + /** + * Gets the culture name in the format languagecode2-country/regioncode2 (e.g., "zh-cn" or "en-us"). This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly name: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CultureInfoLoadOptions): Excel.CultureInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CultureInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.CultureInfo; + /** + * 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.CultureInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CultureInfoData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.CultureInfoData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.CultureInfoData): void; + } + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + class NumberFormatInfo 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 currency symbol for currency values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + readonly currencySymbol: string; + /** + * Gets the string used as the decimal separator for numeric values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly numberDecimalSeparator: string; + /** + * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly numberGroupSeparator: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NumberFormatInfoLoadOptions): Excel.NumberFormatInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NumberFormatInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.NumberFormatInfo; + /** + * 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.NumberFormatInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NumberFormatInfoData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.NumberFormatInfoData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.NumberFormatInfoData): void; + } + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + class DatetimeFormatInfo 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 string used as the date separator. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly dateSeparator: string; + /** + * Gets the format string for a long date value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly longDatePattern: string; + /** + * Gets the format string for a long time value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly longTimePattern: string; + /** + * Gets the format string for a short date value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly shortDatePattern: string; + /** + * Gets the string used as the time separator. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly timeSeparator: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DatetimeFormatInfoLoadOptions): Excel.DatetimeFormatInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DatetimeFormatInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.DatetimeFormatInfo; + /** + * 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.DatetimeFormatInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DatetimeFormatInfoData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.DatetimeFormatInfoData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.DatetimeFormatInfoData): void; + } + /** + * Represents a cell icon. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface Icon { + /** + * Specifies the index of the icon in the given set. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + index: number; + /** + * Specifies the set that the icon is part of. + * + * @remarks + * [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. + * + * @remarks + * [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[]; + /** + * Gets the number of CustomXML parts in this collection. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom XML part based on its ID. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + getOnlyItem(): Excel.CustomXmlPart; + /** + * If the collection contains exactly one item, this method returns it. + Otherwise, this method returns `null`. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomXmlPartScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.CustomXmlPartScopedCollectionData): void; + } + /** + * A collection of custom XML parts. + * + * @remarks + * [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[]; + /** + * Adds a new custom XML part to the workbook. + * + * @remarks + * [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. + * + * @remarks + * [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 custom XML parts in the collection. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom XML part based on its ID. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CustomXmlPartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomXmlPartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.CustomXmlPartCollectionData): void; + } + /** + * Represents a custom XML part object in a workbook. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + readonly id: string; + /** + * The custom XML part's namespace URI. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + readonly namespaceUri: string; + /** + * Deletes the custom XML part. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + delete(): void; + /** + * Gets the custom XML part's full XML content. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + getXml(): OfficeExtension.ClientResult; + /** + * Sets the custom XML part's full XML content. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CustomXmlPartLoadOptions): Excel.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.CustomXmlPartData): void; + } + /** + * Represents a scoped collection of PivotTables. The PivotTables are sorted based on the location of the PivotTable's top-left corner. They are ordered top-to-bottom and then left-to-right. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + class PivotTableScopedCollection 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[]; + /** + * Gets the number of PivotTables in the collection. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the first PivotTable in the collection. The PivotTables in the collection are sorted top-to-bottom and left-to-right, such that top-left table is the first PivotTable in the collection. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getFirst(): Excel.PivotTable; + /** + * Gets the first PivotTable in the collection. The PivotTables in the collection are sorted top-to-bottom and left-to-right, such that the top-left table is the first PivotTable in the collection. + If the collection is empty, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + getFirstOrNullObject(): Excel.PivotTable; + /** + * Gets a PivotTable by name. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param key Name of the PivotTable to be retrieved. + */ + getItem(key: string): Excel.PivotTable; + /** + * Gets a PivotTable by name. If the PivotTable does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param name Name of the PivotTable to be retrieved. + */ + getItemOrNullObject(name: string): Excel.PivotTable; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotTableScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotTableScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.PivotTableScopedCollection; + /** + * 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.PivotTableScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.PivotTableScopedCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PivotTableScopedCollectionData): void; + } + /** + * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * + * @remarks + * [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[]; + /** + * Add a PivotTable based on the specified source data and insert it at the top-left cell of the destination range. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a PivotTable by name. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotTableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotTableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PivotTableCollectionData): void; + } + class PivotTableCollectionCustom { + } + interface PivotTableCollection extends OfficeExtension.ClientObject, PivotTableCollectionCustom { + } + /** + * Represents the DateTime Grouping condition. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum PivotTableDateGroupBy { + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + bySeconds = "BySeconds", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + byMinutes = "ByMinutes", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + byHours = "ByHours", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + byDays = "ByDays", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + byMonths = "ByMonths", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + byQuarters = "ByQuarters", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + byYears = "ByYears" + } + /** + * Represents an Excel PivotTable. + To learn more about the PivotTable object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-pivottables | Work with PivotTables using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly columnHierarchies: Excel.RowColumnPivotHierarchyCollection; + /** + * The Data Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly dataHierarchies: Excel.DataPivotHierarchyCollection; + /** + * The Filter Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly filterHierarchies: Excel.FilterPivotHierarchyCollection; + /** + * The Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly hierarchies: Excel.PivotHierarchyCollection; + /** + * The PivotLayout describing the layout and visual structure of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly layout: Excel.PivotLayout; + /** + * The Row Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly rowHierarchies: Excel.RowColumnPivotHierarchyCollection; + /** + * The worksheet containing the current PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly worksheet: Excel.Worksheet; + /** + * Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + allowMultipleFiltersPerField: boolean; + /** + * Specifies if the PivotTable allows values in the data body to be edited by the user. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableDataValueEditing: boolean; + /** + * ID of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + readonly id: string; + /** + * Name of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + name: string; + /** + * Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + refreshOnOpen: boolean; + /** + * Specifies if the PivotTable uses custom lists when sorting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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; + /** + * Add grouping based on a DateTime Pivot Field. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + addDateGroup(pivotField: Excel.PivotField, groupBy: Excel.PivotTableDateGroupBy): Excel.PivotHierarchy; + /** + * Add grouping based on a DateTime Pivot Field. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + addDateGroup(pivotField: Excel.PivotField, groupBy: "Invalid" | "BySeconds" | "ByMinutes" | "ByHours" | "ByDays" | "ByMonths" | "ByQuarters" | "ByYears"): Excel.PivotHierarchy; + /** + * Deletes the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + delete(): void; + /** + * Returns the string representation of the data source for the PivotTable. This method currently supports string representations for table and range objects. + Otherwise, it returns an empty string. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + getDataSourceString(): OfficeExtension.ClientResult; + /** + * Gets the type of the data source for the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + getDataSourceType(): OfficeExtension.ClientResult; + /** + * Refreshes the PivotTable. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotTableLoadOptions): Excel.PivotTable; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotTable; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PivotTableData): void; + } + /** + * Represents the visual layout of the PivotTable. + * + * @remarks + * [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; + /** + * The style applied to the PivotTable. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly pivotStyle: Excel.PivotTableStyle; + /** + * The alt text description of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextDescription: string; + /** + * The alt text title of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextTitle: string; + /** + * Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFormat: boolean; + /** + * The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. + Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. + By default, this is an empty string. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + emptyCellText: string; + /** + * Specifies if the field list can be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + enableFieldList: boolean; + /** + * Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. + Note that the value of `emptyCellText` persists when this property is set to `false`. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + fillEmptyCells: boolean; + /** + * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layoutType: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; + /** + * Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + preserveFormatting: boolean; + /** + * Specifies if the PivotTable report shows grand totals for columns. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showColumnGrandTotals: boolean; + /** + * Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + showFieldHeaders: boolean; + /** + * Specifies if the PivotTable report shows grand totals for rows. + * + * @remarks + * [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`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + subtotalLocation: Excel.SubtotalLocationType | "AtTop" | "AtBottom" | "Off"; + /** + * Returns a 2D array that contains pivot table's cell number format strings in tabular layout and no sub/grand totals. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly tabularNumberFormat: any[][]; + /** + * Returns a 2D array that contains pivot table's cell local number format strings in tabular layout and no sub/grand totals. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly tabularNumberFormatLocal: any[][]; + /** + * Returns a 2D array that contains pivot table's cell display texts in tabular layout and no sub/grand totals. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly tabularText: any[][]; + /** + * Returns a 2D array that contains pivot table's cell values in tabular layout and no sub/grand totals. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly tabularValues: 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. + * @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; + /** + * Sets whether or not to display a blank line after each item. This is set at the global level for the PivotTable and applied to individual PivotFields. + This function overwrites the setting for all fields in the PivotTable to the value of `display` parameter. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param display True turns on the blank-line display setting. False turns it off. + */ + displayBlankLineAfterEachItem(display: boolean): void; + /** + * Gets a unique cell in the PivotTable based on a data hierarchy and the row and column items of their respective hierarchies. The returned cell is the intersection of the given row and column that contains the data from the given hierarchy. This method is the inverse of calling `getPivotItems` and `getDataHierarchy` on a particular cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getColumnLabelRange(): Excel.Range; + /** + * Returns the range where the PivotTable's data values reside. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param cell A single cell within the PivotTable data body. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param axis The axis from which to get the PivotItems. Must be either "row" or "column." + * @param cell A single cell within the PivotTable's data body. + * @returns A PivotItemCollection of the PivotItems that are used to calculate the values in the specified row. + */ + getPivotItems(axis: Excel.PivotAxis, cell: Range | string): Excel.PivotItemCollection; + /** + * Gets the PivotItems from an axis that make up the value in a specified range within the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param axis The axis from which to get the PivotItems. Must be either "row" or "column." + * @param cell A single cell within the PivotTable's data body. + * @returns A PivotItemCollection of the PivotItems that are used to calculate the values in the specified row. + */ + getPivotItems(axis: "Unknown" | "Row" | "Column" | "Data" | "Filter", cell: Range | string): Excel.PivotItemCollection; + /** + * Returns the range the PivotTable exists on, excluding the filter area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getRange(): Excel.Range; + /** + * Returns the range where the PivotTable's row labels reside. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getRowLabelRange(): Excel.Range; + /** + * Sets the "repeat all item labels" setting across all fields in the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param repeatLabels True turns on the label-repetition display setting. False turns it off. + */ + repeatAllItemLabels(repeatLabels: boolean): void; + /** + * Sets the PivotTable to automatically sort using the specified cell to automatically select all necessary criteria and context. This behaves identically to applying an autosort from the UI. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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 the PivotTable to automatically sort using the specified cell to automatically select all necessary criteria and context. This behaves identically to applying an autosort from the UI. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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; + /** + * Sets the style applied to the PivotTable. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param style The style to apply to the PivotTable. An `InvalidArgumentException` is thrown if a string is provided that does not match the name of any style. + */ + setStyle(style: string | PivotTableStyle | BuiltInPivotTableStyle): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotLayoutLoadOptions): Excel.PivotLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PivotLayoutData): void; + } + /** + * Represents a collection of all the PivotHierarchies that are part of the PivotTable. + * + * @remarks + * [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[]; + /** + * Gets the number of pivot hierarchies in the collection. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a PivotHierarchy by its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotHierarchy to be retrieved. + */ + getItem(name: string): Excel.PivotHierarchy; + /** + * Gets a PivotHierarchy by name. If the PivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PivotHierarchyCollectionData): void; + } + /** + * Represents the Excel PivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly fields: Excel.PivotFieldCollection; + /** + * ID of the PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * Name of the PivotHierarchy. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotHierarchyLoadOptions): Excel.PivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PivotHierarchyData): void; + } + /** + * Represents a collection of RowColumnPivotHierarchy items associated with the PivotTable. + * + * @remarks + * [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[]; + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + add(pivotHierarchy: Excel.PivotHierarchy): Excel.RowColumnPivotHierarchy; + /** + * Gets the number of pivot hierarchies in the collection. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a RowColumnPivotHierarchy by its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the RowColumnPivotHierarchy to be retrieved. + */ + getItem(name: string): Excel.RowColumnPivotHierarchy; + /** + * Gets a RowColumnPivotHierarchy by name. If the RowColumnPivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RowColumnPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RowColumnPivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RowColumnPivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RowColumnPivotHierarchyCollectionData): void; + } + /** + * Represents the Excel RowColumnPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly fields: Excel.PivotFieldCollection; + /** + * ID of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * Name of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * Position of the RowColumnPivotHierarchy. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RowColumnPivotHierarchyLoadOptions): Excel.RowColumnPivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RowColumnPivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RowColumnPivotHierarchyData): void; + } + /** + * Represents a collection of FilterPivotHierarchy items associated with the PivotTable. + * + * @remarks + * [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[]; + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + add(pivotHierarchy: Excel.PivotHierarchy): Excel.FilterPivotHierarchy; + /** + * Gets the number of pivot hierarchies in the collection. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a FilterPivotHierarchy by its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the FilterPivotHierarchy to be retrieved. + */ + getItem(name: string): Excel.FilterPivotHierarchy; + /** + * Gets a FilterPivotHierarchy by name. If the FilterPivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.FilterPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.FilterPivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.FilterPivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.FilterPivotHierarchyCollectionData): void; + } + /** + * Represents the Excel FilterPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly fields: Excel.PivotFieldCollection; + /** + * Determines whether to allow multiple filter items. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems: boolean; + /** + * ID of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * Name of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * Position of the FilterPivotHierarchy. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.FilterPivotHierarchyLoadOptions): Excel.FilterPivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.FilterPivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.FilterPivotHierarchyData): void; + } + /** + * Represents a collection of DataPivotHierarchy items associated with the PivotTable. + * + * @remarks + * [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[]; + /** + * Adds the PivotHierarchy to the current axis. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + add(pivotHierarchy: Excel.PivotHierarchy): Excel.DataPivotHierarchy; + /** + * Gets the number of pivot hierarchies in the collection. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a DataPivotHierarchy by its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the DataPivotHierarchy to be retrieved. + */ + getItem(name: string): Excel.DataPivotHierarchy; + /** + * Gets a DataPivotHierarchy by name. If the DataPivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DataPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.DataPivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DataPivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.DataPivotHierarchyCollectionData): void; + } + /** + * Represents the Excel DataPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly field: Excel.PivotField; + /** + * ID of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * Name of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * Number format of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * Position of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position: number; + /** + * Specifies if the data should be shown as a specific summary calculation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAs: Excel.ShowAsRule; + /** + * Specifies if all items of the DataPivotHierarchy are shown. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DataPivotHierarchyLoadOptions): Excel.DataPivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DataPivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.DataPivotHierarchyData): void; + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ShowAsRule { + /** + * The PivotField to base the `ShowAs` calculation on, if applicable according to the `ShowAsCalculation` type, else `null`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + baseField?: Excel.PivotField; + /** + * The item to base the `ShowAs` calculation on, if applicable according to the `ShowAsCalculation` type, else `null`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + baseItem?: Excel.PivotItem; + /** + * The `ShowAs` calculation to use for the PivotField. See `Excel.ShowAsCalculation` for details. + * + * @remarks + * [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 PivotFields that are part of a PivotTable's hierarchy. + * + * @remarks + * [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[]; + /** + * Gets the number of pivot fields in the collection. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a PivotField by its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotField to be retrieved. + */ + getItem(name: string): Excel.PivotField; + /** + * Gets a PivotField by name. If the PivotField does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotField 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotFieldCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotFieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotFieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PivotFieldCollectionData): void; + } + /** + * Represents the Excel PivotField. + * + * @remarks + * [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 PivotItems associated with the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly items: Excel.PivotItemCollection; + /** + * ID of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * Name of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * Determines whether to show all items of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAllItems: boolean; + /** + * Subtotals of the PivotField. + * + * @remarks + * [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. + * @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; + /** + * Sets one or more of the field's current PivotFilters and applies them to the field. + If the provided filters are invalid or cannot be applied, an exception is thrown. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param filter A configured specific PivotFilter, or a PivotFilters interface containing multiple configured filters. + */ + applyFilter(filter: Excel.PivotFilters): void; + /** + * Clears all criteria from all of the field's filters. This removes any active filtering on the field. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + clearAllFilters(): void; + /** + * Clears all existing criteria from the field's filter of the given type (if one is currently applied). + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param filterType The type of filter on the field of which to clear all criteria. + */ + clearFilter(filterType: Excel.PivotFilterType): void; + /** + * Clears all existing criteria from the field's filter of the given type (if one is currently applied). + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param filterType The type of filter on the field of which to clear all criteria. + */ + clearFilter(filterType: "Unknown" | "Value" | "Manual" | "Label" | "Date"): void; + /** + * Gets all filters currently applied on the field. + * + * @remarks + * [Api set: ExcelApi 1.12] + * @returns A PivotFilters interface with all active filters. + */ + getFilters(): OfficeExtension.ClientResult; + /** + * Checks if there are any applied filters on the field. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param filterType The filter type to check. If no type is provided, this method will check if any filter is applied. + * @returns True if the field has a filter of type `filterType` applied. If `filterType` is not specified, `true` is returned if the field has any applied filters. + */ + isFiltered(filterType?: Excel.PivotFilterType): OfficeExtension.ClientResult; + /** + * Checks if there are any applied filters on the field. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param filterType The filter type to check. If no type is provided, this method will check if any filter is applied. + * @returns True if the field has a filter of type `filterType` applied. If `filterType` is not specified, `true` is returned if the field has any applied filters. + */ + isFiltered(filterType?: "Unknown" | "Value" | "Manual" | "Label" | "Date"): OfficeExtension.ClientResult; + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param sortBy Specifies if the sorting is done in ascending or descending order. + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param sortBy Specifies if the sorting is done in ascending or descending order. + * @param valuesHierarchy Specifies the values hierarchy on the data axis 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param sortBy Specifies if the sorting is done in ascending or descending order. + * @param valuesHierarchy Specifies the values hierarchy on the data axis 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotFieldLoadOptions): Excel.PivotField; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotField; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PivotFieldData): void; + } + /** + * Represents a collection of all the PivotItems related to their parent PivotField. + * + * @remarks + * [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[]; + /** + * Gets the number of PivotItems in the collection. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a PivotItem by its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotItem to be retrieved. + */ + getItem(name: string): Excel.PivotItem; + /** + * Gets a PivotItem by name. If the PivotItem does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotItem 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PivotItemCollectionData): void; + } + /** + * Represents the Excel PivotItem. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isExpanded: boolean; + /** + * Name of the PivotItem. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * Specifies if the PivotItem is visible. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotItemLoadOptions): Excel.PivotItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PivotItemData): void; + } + /** + * Subtotals for the Pivot Field. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface Subtotals { + /** + * If `Automatic` is set to `true`, then all other values will be ignored when setting the `Subtotals`. + * + * @remarks + * [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 criteria for the top/bottom values filter. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PivotFilterTopBottomCriterion { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + topItems = "TopItems", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + topPercent = "TopPercent", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + topSum = "TopSum", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomItems = "BottomItems", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomPercent = "BottomPercent", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomSum = "BottomSum" + } + /** + * Represents the sort direction. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum SortBy { + /** + * Ascending sort. Smallest to largest or A to Z. + * @remarks + * [Api set: ExcelApi 1.8] + */ + ascending = "Ascending", + /** + * Descending sort. Largest to smallest or Z to A. + * @remarks + * [Api set: ExcelApi 1.8] + */ + descending = "Descending" + } + /** + * Aggregation function for the `DataPivotHierarchy`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum AggregationFunction { + /** + * Aggregation function is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.8] + */ + unknown = "Unknown", + /** + * Excel will automatically select the aggregation based on the data items. + * @remarks + * [Api set: ExcelApi 1.8] + */ + automatic = "Automatic", + /** + * Aggregate using the sum of the data, equivalent to the SUM function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + sum = "Sum", + /** + * Aggregate using the count of items in the data, equivalent to the COUNTA function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + count = "Count", + /** + * Aggregate using the average of the data, equivalent to the AVERAGE function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + average = "Average", + /** + * Aggregate using the maximum value of the data, equivalent to the MAX function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + max = "Max", + /** + * Aggregate using the minimum value of the data, equivalent to the MIN function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + min = "Min", + /** + * Aggregate using the product of the data, equivalent to the PRODUCT function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + product = "Product", + /** + * Aggregate using the count of numbers in the data, equivalent to the COUNT function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + countNumbers = "CountNumbers", + /** + * Aggregate using the standard deviation of the data, equivalent to the STDEV function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + standardDeviation = "StandardDeviation", + /** + * Aggregate using the standard deviation of the data, equivalent to the STDEVP function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + standardDeviationP = "StandardDeviationP", + /** + * Aggregate using the variance of the data, equivalent to the VAR function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + variance = "Variance", + /** + * Aggregate using the variance of the data, equivalent to the VARP function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + varianceP = "VarianceP" + } + /** + * The ShowAs calculation function for the DataPivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ShowAsCalculation { + /** + * Calculation is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.8] + */ + unknown = "Unknown", + /** + * No calculation is applied. + * @remarks + * [Api set: ExcelApi 1.8] + */ + none = "None", + /** + * Percent of the grand total. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOfGrandTotal = "PercentOfGrandTotal", + /** + * Percent of the row total. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOfRowTotal = "PercentOfRowTotal", + /** + * Percent of the column total. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOfColumnTotal = "PercentOfColumnTotal", + /** + * Percent of the row total for the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOfParentRowTotal = "PercentOfParentRowTotal", + /** + * Percent of the column total for the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOfParentColumnTotal = "PercentOfParentColumnTotal", + /** + * Percent of the grand total for the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOfParentTotal = "PercentOfParentTotal", + /** + * Percent of the specified Base field and Base item. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOf = "PercentOf", + /** + * Running total of the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + runningTotal = "RunningTotal", + /** + * Percent running total of the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentRunningTotal = "PercentRunningTotal", + /** + * Difference from the specified Base field and Base item. + * @remarks + * [Api set: ExcelApi 1.8] + */ + differenceFrom = "DifferenceFrom", + /** + * Difference from the specified Base field and Base item. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentDifferenceFrom = "PercentDifferenceFrom", + /** + * Ascending rank of the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + rankAscending = "RankAscending", + /** + * Descending rank of the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + rankDecending = "RankDecending", + /** + * Calculates the values as follows: + ((value in cell) x (Grand Total of Grand Totals)) / ((Grand Row Total) x (Grand Column Total)) + * @remarks + * [Api set: ExcelApi 1.8] + */ + index = "Index" + } + /** + * Represents the axis from which to get the PivotItems. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PivotAxis { + /** + * The axis or region is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.9] + */ + unknown = "Unknown", + /** + * The row axis. + * @remarks + * [Api set: ExcelApi 1.9] + */ + row = "Row", + /** + * The column axis. + * @remarks + * [Api set: ExcelApi 1.9] + */ + column = "Column", + /** + * The data axis. + * @remarks + * [Api set: ExcelApi 1.9] + */ + data = "Data", + /** + * The filter axis. + * @remarks + * [Api set: ExcelApi 1.9] + */ + filter = "Filter" + } + /** + * Represents a worksheet-level custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + class WorksheetCustomProperty 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. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly key: string; + /** + * Gets or sets the value of the custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + value: 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. + * @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.WorksheetCustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.WorksheetCustomProperty): void; + /** + * Deletes the custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorksheetCustomPropertyLoadOptions): Excel.WorksheetCustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorksheetCustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.WorksheetCustomProperty; + /** + * 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.WorksheetCustomProperty object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetCustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.WorksheetCustomPropertyData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.WorksheetCustomPropertyData): void; + } + /** + * Contains the collection of worksheet-level custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + class WorksheetCustomPropertyCollection 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.WorksheetCustomProperty[]; + /** + * Adds a new custom property that maps to the provided key. This overwrites existing custom properties with that key. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param key The key that identifies the custom property object. It is case-insensitive.The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) + * @param value The value of this custom property. + */ + add(key: string, value: string): Excel.WorksheetCustomProperty; + /** + * Gets the number of custom properties on this worksheet. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom property object by its key, which is case-insensitive. Throws an error if the custom property does not exist. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param key The key that identifies the custom property object. It is case-insensitive. + */ + getItem(key: string): Excel.WorksheetCustomProperty; + /** + * Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param key The key that identifies the custom property object. It is case-insensitive. + */ + getItemOrNullObject(key: string): Excel.WorksheetCustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorksheetCustomPropertyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.WorksheetCustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorksheetCustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.WorksheetCustomPropertyCollection; + /** + * 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.WorksheetCustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetCustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.WorksheetCustomPropertyCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.WorksheetCustomPropertyCollectionData): void; + } + /** + * Represents workbook properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly custom: Excel.CustomPropertyCollection; + /** + * The author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + author: string; + /** + * The category of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + category: string; + /** + * The comments of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + comments: string; + /** + * The company of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + company: string; + /** + * Gets the creation date of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly creationDate: Date; + /** + * The keywords of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + keywords: string; + /** + * Gets the last author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly lastAuthor: string; + /** + * The manager of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + manager: string; + /** + * Gets the revision number of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + revisionNumber: number; + /** + * The subject of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + subject: string; + /** + * The title of the workbook. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DocumentPropertiesLoadOptions): Excel.DocumentProperties; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DocumentProperties; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.DocumentPropertiesData): void; + } + /** + * Represents a custom property. + * + * @remarks + * [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; + /** + * The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly key: string; + /** + * The type of the value used for the custom property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly type: Excel.DocumentPropertyType | "Number" | "Boolean" | "Date" | "String" | "Float"; + /** + * The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CustomPropertyLoadOptions): Excel.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.CustomPropertyData): void; + } + /** + * Contains the collection of custom properties. + * + * @remarks + * [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[]; + /** + * Creates a new or sets an existing custom property. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param key Required. The custom property's key, which is case-insensitive. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). + * @param value Required. The custom property's value. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + */ + add(key: string, value: any): Excel.CustomProperty; + /** + * Deletes all custom properties in this collection. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + deleteAll(): void; + /** + * Gets the count of custom properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom property object by its key, which is case-insensitive. Throws an error if the custom property does not exist. + * + * @remarks + * [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. If the custom property doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CustomPropertyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.CustomPropertyCollectionData): void; + } + /** + * Represents a collection of all the conditional formats that are overlap the range. + * + * @remarks + * [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[]; + /** + * Adds a new conditional format to the collection at the first/top priority. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + clearAll(): void; + /** + * Returns the number of conditional formats in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Returns a conditional format for the given ID. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + * + * @param index Index of the conditional formats to be retrieved. + */ + getItemAt(index: number): Excel.ConditionalFormat; + /** + * Returns a conditional format identified by its ID. + If the conditional format object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param id The ID of the conditional format. + */ + getItemOrNullObject(id: string): Excel.ConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalFormatCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalFormatCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalFormatCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ConditionalFormatCollectionData): void; + } + /** + * An object encapsulating a conditional format's range, format, rule, and other properties. + To learn more about the conditional formatting object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-conditional-formatting | Apply conditional formatting to Excel ranges}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly cellValueOrNullObject: Excel.CellValueConditionalFormat; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly colorScale: Excel.ColorScaleConditionalFormat; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly colorScaleOrNullObject: Excel.ColorScaleConditionalFormat; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly custom: Excel.CustomConditionalFormat; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly customOrNullObject: Excel.CustomConditionalFormat; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly dataBar: Excel.DataBarConditionalFormat; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly dataBarOrNullObject: Excel.DataBarConditionalFormat; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly iconSet: Excel.IconSetConditionalFormat; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly iconSetOrNullObject: Excel.IconSetConditionalFormat; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly preset: Excel.PresetCriteriaConditionalFormat; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly textComparisonOrNullObject: Excel.TextConditionalFormat; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly topBottom: Excel.TopBottomConditionalFormat; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly topBottomOrNullObject: Excel.TopBottomConditionalFormat; + /** + * The priority of the conditional format in the current `ConditionalFormatCollection`. + * + * @remarks + * [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 the 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. + * + * @remarks + * [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. + Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + stopIfTrue: boolean; + /** + * A type of conditional format. Only one can be set at a time. + * + * @remarks + * [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. + * @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; + /** + * Change the conditional format rule type to cell value. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @param properties The properties to set for the cell value conditional format rule. + */ + changeRuleToCellValue(properties: Excel.ConditionalCellValueRule): void; + /** + * Change the conditional format rule type to color scale. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + changeRuleToColorScale(): void; + /** + * Change the conditional format rule type to text comparison. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @param properties The properties to set for the text comparison conditional format rule. + */ + changeRuleToContainsText(properties: Excel.ConditionalTextComparisonRule): void; + /** + * Change the conditional format rule type to custom. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @param formula The formula to set for the custom conditional format rule. + */ + changeRuleToCustom(formula: string): void; + /** + * Change the conditional format rule type to data bar. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + changeRuleToDataBar(): void; + /** + * Change the conditional format rule type to icon set. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + changeRuleToIconSet(): void; + /** + * Change the conditional format rule type to preset criteria. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @param properties The properties to set for the preset criteria conditional format rule. + */ + changeRuleToPresetCriteria(properties: Excel.ConditionalPresetCriteriaRule): void; + /** + * Change the conditional format rule type to top/bottom. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @param properties The properties to set for the top/bottom conditional format rule. + */ + changeRuleToTopBottom(properties: Excel.ConditionalTopBottomRule): void; + /** + * Deletes this conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + getRange(): Excel.Range; + /** + * Returns the range to which the conditonal format is applied. If the conditional format is applied to multiple ranges, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + getRangeOrNullObject(): Excel.Range; + /** + * Returns the `RangeAreas`, comprising one or more rectangular ranges, to which the conditonal format is applied. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getRanges(): Excel.RangeAreas; + /** + * Set the ranges that the conditonal format rule is applied to. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @param ranges Collection of one or more ranges for this rule to be applied to. + */ + setRanges(ranges: Range | RangeAreas | string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalFormatLoadOptions): Excel.ConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ConditionalFormatData): void; + } + /** + * Represents an Excel conditional data bar type. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly negativeFormat: Excel.ConditionalDataBarNegativeFormat; + /** + * Representation of all values to the right of the axis in an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly positiveFormat: Excel.ConditionalDataBarPositiveFormat; + /** + * HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no axis is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisColor: string; + /** + * Representation of how the axis is determined for an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisFormat: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; + /** + * Specifies the direction that the data bar graphic should be based on. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule: Excel.ConditionalDataBarRule; + /** + * If `true`, hides the values from the cells where the data bar is applied. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DataBarConditionalFormatLoadOptions): Excel.DataBarConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DataBarConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.DataBarConditionalFormatData): void; + } + /** + * Represents a conditional format for the positive side of the data bar. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor: string; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor: string; + /** + * Specifies if the data bar has a gradient. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalDataBarPositiveFormatLoadOptions): Excel.ConditionalDataBarPositiveFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalDataBarPositiveFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ConditionalDataBarPositiveFormatData): void; + } + /** + * Represents a conditional format for the negative side of the data bar. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor: string; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor: string; + /** + * Specifies if the negative data bar has the same border color as the positive data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor: boolean; + /** + * Specifies if the negative data bar has the same fill color as the positive data bar. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalDataBarNegativeFormatLoadOptions): Excel.ConditionalDataBarNegativeFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalDataBarNegativeFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ConditionalDataBarNegativeFormatData): void; + } + /** + * Represents a rule-type for a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarRule { + /** + * The formula, if required, on which to evaluate the data bar rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * The type of rule for the data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + type: Excel.ConditionalFormatRuleType | "Invalid" | "Automatic" | "LowestValue" | "HighestValue" | "Number" | "Percent" | "Formula" | "Percentile"; + } + /** + * Represents a custom conditional format type. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * Specifies the `Rule` object on this conditional format. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CustomConditionalFormatLoadOptions): Excel.CustomConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.CustomConditionalFormatData): void; + } + /** + * Represents a rule, for all traditional rule/format pairings. + * + * @remarks + * [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, on which to evaluate the conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula: string; + /** + * The formula, if required, on which to evaluate the conditional format rule in the user's language. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formulaLocal: string; + /** + * The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalFormatRuleLoadOptions): Excel.ConditionalFormatRule; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalFormatRule; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ConditionalFormatRuleData): void; + } + /** + * Represents an icon set criteria for conditional formatting. + * + * @remarks + * [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 icon sets 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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + criteria: Excel.ConditionalIconCriterion[]; + /** + * If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder: boolean; + /** + * If `true`, hides the values and only shows icons. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + showIconOnly: boolean; + /** + * If set, displays the icon set option for the conditional format. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.IconSetConditionalFormatLoadOptions): Excel.IconSetConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.IconSetConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.IconSetConditionalFormatData): void; + } + /** + * Represents an icon criterion which contains a type, value, an operator, and an optional custom icon, if not using an icon set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalIconCriterion { + /** + * The custom icon for the current criterion, if different from the default icon set, else `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + customIcon?: Excel.Icon; + /** + * A number or a formula depending on the type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula: string; + /** + * `greaterThan` or `greaterThanOrEqual` for each of the rule types for the icon conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + operator: Excel.ConditionalIconCriterionOperator | "Invalid" | "GreaterThan" | "GreaterThanOrEqual"; + /** + * What the icon conditional formula should be based on. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + type: Excel.ConditionalFormatIconRuleType | "Invalid" | "Number" | "Percent" | "Formula" | "Percentile"; + } + /** + * Represents the color scale criteria for conditional formatting. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions): Excel.ColorScaleConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ColorScaleConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ColorScaleConditionalFormatData): void; + } + /** + * Represents the criteria of the color scale. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalColorScaleCriteria { + /** + * The maximum point of the color scale criterion. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + maximum: Excel.ConditionalColorScaleCriterion; + /** + * The midpoint of the color scale criterion, if the color scale is a 3-color scale. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + midpoint?: Excel.ConditionalColorScaleCriterion; + /** + * The minimum point of the color scale criterion. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + minimum: Excel.ConditionalColorScaleCriterion; + } + /** + * Represents a color scale criterion which contains a type, value, and a color. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalColorScaleCriterion { + /** + * HTML color code representation of the color scale color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * A number, a formula, or `null` (if `type` is `lowestValue`). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * What the criterion conditional formula should be based on. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + type: Excel.ConditionalFormatColorCriterionType | "Invalid" | "LowestValue" | "HighestValue" | "Number" | "Percent" | "Formula" | "Percentile"; + } + /** + * Represents a top/bottom conditional format. + * + * @remarks + * [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 format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * The criteria of the top/bottom conditional format. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions): Excel.TopBottomConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TopBottomConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TopBottomConditionalFormatData): void; + } + /** + * Represents the rule of the top/bottom conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalTopBottomRule { + /** + * The rank between 1 and 1000 for numeric ranks or 1 and 100 for percent ranks. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + rank: number; + /** + * Format values based on the top or bottom rank. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + type: Excel.ConditionalTopBottomCriterionType | "Invalid" | "TopItems" | "TopPercent" | "BottomItems" | "BottomPercent"; + } + /** + * Represents the preset criteria conditional format such as above average, below average, unique values, contains blank, nonblank, error, and noerror. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * The rule of the conditional format. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions): Excel.PresetCriteriaConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PresetCriteriaConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PresetCriteriaConditionalFormatData): void; + } + /** + * Represents the preset criteria conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalPresetCriteriaRule { + /** + * The criterion of the conditional format. + * + * @remarks + * [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. + * + * @remarks + * [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 format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * The rule of the conditional format. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TextConditionalFormatLoadOptions): Excel.TextConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TextConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TextConditionalFormatData): void; + } + /** + * Represents a cell value conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalTextComparisonRule { + /** + * The operator of the text conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + operator: Excel.ConditionalTextOperator | "Invalid" | "Contains" | "NotContains" | "BeginsWith" | "EndsWith"; + /** + * The text value of the conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + text: string; + } + /** + * Represents a cell value conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * Specifies the rule object on this conditional format. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CellValueConditionalFormatLoadOptions): Excel.CellValueConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CellValueConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.CellValueConditionalFormatData): void; + } + /** + * Represents a cell value conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalCellValueRule { + /** + * The formula, if required, on which to evaluate the conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula1: string; + /** + * The formula, if required, on which to evaluate the conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula2?: string; + /** + * The operator of the cell value conditional format. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly borders: Excel.ConditionalRangeBorderCollection; + /** + * Returns the fill object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly fill: Excel.ConditionalRangeFill; + /** + * Returns the font object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly font: Excel.ConditionalRangeFont; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + Cleared if `null` is passed in. + * + * @remarks + * [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. + * @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; + /** + * Remove the format properties from a conditional format rule. This creates a rule with no format settings. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + clearFormat(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalRangeFormatLoadOptions): Excel.ConditionalRangeFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalRangeFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ConditionalRangeFormatData): void; + } + /** + * This object represents the font attributes (font style, color, etc.) for an object. + * + * @remarks + * [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; + /** + * Specifies if the font is bold. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + bold: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color: string; + /** + * Specifies if the font is italic. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + italic: boolean; + /** + * Specifies the strikethrough status of the font. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + strikethrough: boolean; + /** + * The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalRangeFontLoadOptions): Excel.ConditionalRangeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalRangeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ConditionalRangeFontData): void; + } + /** + * Represents the background of a conditional range object. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalRangeFillLoadOptions): Excel.ConditionalRangeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalRangeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ConditionalRangeFillData): void; + } + /** + * Represents the border of an object. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color: string; + /** + * Constant value that indicates the specific side of the border. See `Excel.ConditionalRangeBorderIndex` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalRangeBorderLoadOptions): Excel.ConditionalRangeBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalRangeBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ConditionalRangeBorderData): void; + } + /** + * Represents the border objects that make up range border. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly bottom: Excel.ConditionalRangeBorder; + /** + * Gets the left border. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly left: Excel.ConditionalRangeBorder; + /** + * Gets the right border. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly right: Excel.ConditionalRangeBorder; + /** + * Gets the top border. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly count: number; + /** + * Gets a border object using its name. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalRangeBorderCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalRangeBorderCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ConditionalRangeBorderCollectionData): void; + } + /** + * Provides access to functionality for formatting numbers. + * + * @remarks + * [Api set: NumberFormatting 1.1] + * @beta + */ + class NumberFormattingService 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; + getFormatter(format: string): Excel.NumberFormatter; + /** + * Create a new instance of Excel.NumberFormattingService object + */ + static newObject(context: OfficeExtension.ClientRequestContext): Excel.NumberFormattingService; + /** + * 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.NumberFormattingService object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NumberFormattingServiceData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * @remarks + * [Api set: NumberFormatting 1.1] + * @beta + */ + class NumberFormatter 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 hasDayOfWeek: boolean; + readonly hasMonth: boolean; + readonly hasYear: boolean; + readonly isCurrency: boolean; + readonly isDateTime: boolean; + readonly isNumeric: boolean; + readonly isPercent: boolean; + readonly isText: boolean; + format(value: number): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NumberFormatterLoadOptions): Excel.NumberFormatter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NumberFormatter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.NumberFormatter; + /** + * 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.NumberFormatter object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NumberFormatterData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.NumberFormatterData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.NumberFormatterData): void; + } + /** + * A Custom Functions mamanger, to allow registering new functions and checking the engine status + * + * @remarks + * [Api set: CustomFunctions 1.3] + */ + class CustomFunctionManager 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. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomFunctionManager; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.CustomFunctionManager; + /** + * 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.CustomFunctionManager object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomFunctionManagerData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.CustomFunctionManagerData; + } + class CustomFunctionManagerCustom { + /** + * + * Registers custom functions based on a stringified JSON metadata and a javascript code bundle. + * + * [Api set: CustomFunctions 1.3] + * + * @param metadata + * @param javascript + */ + static register(metadata: string, javascript: string): Promise; + /** + * + * Registers custom functions based on a stringified JSON metadata and a javascript code bundle. + * + * [Api set: CustomFunctions 1.3] + * + * @param metadata + * @param javascript + */ + static getStatus(): Promise; + } + interface CustomFunctionManager extends OfficeExtension.ClientObject, CustomFunctionManagerCustom { + } + /** + * Provides information about CustomFunction engine status + * + * @remarks + * [Api set: CustomFunctions 1.3] + */ + interface CustomFunctionEngineStatus { + /** + * Custom Functions are enabled + * + * @remarks + * [Api set: CustomFunctions 1.3] + */ + enabled: boolean; + /** + * The custom functions are using the native runtime (as opposed to the web runtime) + * + * @remarks + * [Api set: CustomFunctions 1.3] + */ + nativeRuntime: boolean; + /** + * Streaming is enabled + * + * @remarks + * [Api set: CustomFunctions 1.3] + */ + streamingEnabled: boolean; + } + /** + * An object encapsulating a style's format and other properties. + * + * @remarks + * [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 collection of four border objects that represent the style of the four borders. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly borders: Excel.RangeBorderCollection; + /** + * The fill of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly fill: Excel.RangeFill; + /** + * A `Font` object that represents the font of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly font: Excel.RangeFont; + /** + * Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoIndent: boolean; + /** + * Specifies if the style is a built-in style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly builtIn: boolean; + /** + * Specifies if the formula will be hidden when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formulaHidden: boolean; + /** + * Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeAlignment: boolean; + /** + * Specifies if the style includes the color, color index, line style, and weight border properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeBorder: boolean; + /** + * Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeFont: boolean; + /** + * Specifies if the style includes the number format property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeNumber: boolean; + /** + * Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includePatterns: boolean; + /** + * Specifies if the style includes the formula hidden and locked protection properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeProtection: boolean; + /** + * An integer from 0 to 250 that indicates the indent level for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + indentLevel: number; + /** + * Specifies if the object is locked when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + locked: boolean; + /** + * The name of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly name: string; + /** + * The format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormat: string; + /** + * The localized format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal: string; + /** + * The reading order for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readingOrder: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + shrinkToFit: boolean; + /** + * The text orientation for the style. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation: number; + /** + * Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * Specifies if Excel wraps the text in the object. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.StyleLoadOptions): Excel.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.StyleData): void; + } + /** + * Represents a collection of all the styles. + * + * @remarks + * [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[]; + /** + * Adds a new style to the collection. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param name Name of the style to be added. + */ + add(name: string): void; + /** + * Gets the number of styles in the collection. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a `Style` by name. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param name Name of the style to be retrieved. + */ + getItem(name: string): Excel.Style; + /** + * Gets a style based on its position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param index Index value of the style object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Style; + /** + * Gets a style by name. + If the style object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param name Name of the style to be retrieved. + */ + getItemOrNullObject(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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.StyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.StyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.StyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.StyleCollectionData): void; + } + /** + * Represents a collection of table styles. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class TableStyleCollection 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.TableStyle[]; + /** + * Creates a blank `TableStyle` with the specified name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name The unique name for the new table style. Will throw an `InvalidArgument` error if the name is already in use. + * @param makeUniqueName Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. + * @returns The newly created `TableStyle`. + */ + add(name: string, makeUniqueName?: boolean): Excel.TableStyle; + /** + * Gets the number of table styles in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the default table style for the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The `TableStyle` object that is the current default table style. + */ + getDefault(): Excel.TableStyle; + /** + * Gets a `TableStyle` by name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the table style to be retrieved. + * @returns The `TableStyle` object whose name matches the input. + */ + getItem(name: string): Excel.TableStyle; + /** + * Gets a `TableStyle` by name. If the table style does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the table style to be retrieved. + * @returns The `TableStyle` object whose name matches the input. + */ + getItemOrNullObject(name: string): Excel.TableStyle; + /** + * Sets the default table style for use in the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param newDefaultStyle The `TableStyle` object, or name of the `TableStyle` object, that should be the new default. + */ + setDefault(newDefaultStyle: TableStyle | string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableStyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.TableStyleCollection; + /** + * 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.TableStyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableStyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.TableStyleCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TableStyleCollectionData): void; + } + /** + * Represents a table style, which defines the style elements by region of the table. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class TableStyle 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; + /** + * Specifies the name of the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name: string; + /** + * Specifies if this `TableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * @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.TableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.TableStyle): void; + /** + * Deletes the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Creates a duplicate of this table style with copies of all the style elements. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The new `TableStyle` object that has been duplicated from this table style. + */ + duplicate(): Excel.TableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableStyleLoadOptions): Excel.TableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.TableStyle; + /** + * 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.TableStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableStyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.TableStyleData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TableStyleData): void; + } + /** + * Represents a collection of PivotTable styles. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class PivotTableStyleCollection 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.PivotTableStyle[]; + /** + * Creates a blank `PivotTableStyle` with the specified name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name The unique name for the new PivotTable style. Will throw an `InvalidArgument` error if the name is already in use. + * @param makeUniqueName Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. + * @returns The newly created `PivotTableStyle`. + */ + add(name: string, makeUniqueName?: boolean): Excel.PivotTableStyle; + /** + * Gets the number of PivotTable styles in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the default PivotTable style for the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The `PivotTableStyle` object that is the current default PivotTable style. + */ + getDefault(): Excel.PivotTableStyle; + /** + * Gets a `PivotTableStyle` by name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the PivotTable style to be retrieved. + * @returns The `PivotTableStyle` object whose name matches the input. + */ + getItem(name: string): Excel.PivotTableStyle; + /** + * Gets a `PivotTableStyle` by name. If the `PivotTableStyle` does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the PivotTable style to be retrieved. + * @returns The `PivotTableStyle` object whose name matches the input. + */ + getItemOrNullObject(name: string): Excel.PivotTableStyle; + /** + * Sets the default PivotTable style for use in the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param newDefaultStyle The `PivotTableStyle` object, or name of the `PivotTableStyle` object, that should be the new default. + */ + setDefault(newDefaultStyle: PivotTableStyle | string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotTableStyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotTableStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.PivotTableStyleCollection; + /** + * 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.PivotTableStyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableStyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.PivotTableStyleCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PivotTableStyleCollectionData): void; + } + /** + * Represents a PivotTable style, which defines style elements by PivotTable region. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class PivotTableStyle 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; + /** + * Specifies the name of the PivotTable style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name: string; + /** + * Specifies if this `PivotTableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * @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.PivotTableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.PivotTableStyle): void; + /** + * Deletes the PivotTable style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Creates a duplicate of this PivotTable style with copies of all the style elements. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The new `PivotTableStyle` object that has been duplicated from this PivotTable style. + */ + duplicate(): Excel.PivotTableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotTableStyleLoadOptions): Excel.PivotTableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotTableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.PivotTableStyle; + /** + * 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.PivotTableStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableStyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.PivotTableStyleData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PivotTableStyleData): void; + } + /** + * Represents a collection of `SlicerStyle` objects. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class SlicerStyleCollection 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.SlicerStyle[]; + /** + * Creates a blank slicer style with the specified name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name The unique name for the new slicer style. Will throw an `InvalidArgument` exception if the name is already in use. + * @param makeUniqueName Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. + * @returns The newly created `SlicerStyle`. + */ + add(name: string, makeUniqueName?: boolean): Excel.SlicerStyle; + /** + * Gets the number of slicer styles in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the default `SlicerStyle` for the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The `SlicerStyle` object that is the current default slicer style. + */ + getDefault(): Excel.SlicerStyle; + /** + * Gets a `SlicerStyle` by name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the slicer style to be retrieved. + * @returns The `SlicerStyle` object whose name matches the input. + */ + getItem(name: string): Excel.SlicerStyle; + /** + * Gets a `SlicerStyle` by name. If the slicer style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the slicer style to be retrieved. + * @returns The `SlicerStyle` object whose name matches the input. + */ + getItemOrNullObject(name: string): Excel.SlicerStyle; + /** + * Sets the default slicer style for use in the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param newDefaultStyle The `SlicerStyle` object, or name of the `SlicerStyle` object, that should be the new default. + */ + setDefault(newDefaultStyle: SlicerStyle | string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SlicerStyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SlicerStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.SlicerStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.SlicerStyleCollection; + /** + * 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.SlicerStyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerStyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.SlicerStyleCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.SlicerStyleCollectionData): void; + } + /** + * Represents a slicer style, which defines style elements by region of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class SlicerStyle 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; + /** + * Specifies the name of the slicer style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name: string; + /** + * Specifies if this `SlicerStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * @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.SlicerStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.SlicerStyle): void; + /** + * Deletes the slicer style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Creates a duplicate of this slicer style with copies of all the style elements. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The new `SlicerStyle` object that has been duplicated from this slicer style. + */ + duplicate(): Excel.SlicerStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SlicerStyleLoadOptions): Excel.SlicerStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.SlicerStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.SlicerStyle; + /** + * 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.SlicerStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerStyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.SlicerStyleData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.SlicerStyleData): void; + } + /** + * Represents a collection of timeline styles. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class TimelineStyleCollection 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.TimelineStyle[]; + /** + * Creates a blank `TimelineStyle` with the specified name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name The unique name for the new timeline style. Will throw an `InvalidArgument` error if the name is already in use. + * @param makeUniqueName Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. + * @returns The newly created `TimelineStyle`. + */ + add(name: string, makeUniqueName?: boolean): Excel.TimelineStyle; + /** + * Gets the number of timeline styles in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the default timeline style for the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The `TimelineStyle` object that is the current default timeline style. + */ + getDefault(): Excel.TimelineStyle; + /** + * Gets a `TimelineStyle` by name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the timeline style to be retrieved. + * @returns The `TimelineStyle` object whose name matches the input. + */ + getItem(name: string): Excel.TimelineStyle; + /** + * Gets a `TimelineStyle` by name. If the timeline style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the timeline style to be retrieved. + * @returns The `TimelineStyle` object whose name matches the input. + */ + getItemOrNullObject(name: string): Excel.TimelineStyle; + /** + * Sets the default timeline style for use in the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param newDefaultStyle The `TimelineStyle` object, or name of the `TimelineStyle` object, that should be the new default. + */ + setDefault(newDefaultStyle: TimelineStyle | string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TimelineStyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TimelineStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TimelineStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.TimelineStyleCollection; + /** + * 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.TimelineStyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TimelineStyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.TimelineStyleCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TimelineStyleCollectionData): void; + } + /** + * Represents a `TimelineStyle`, which defines style elements by region in the timeline. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class TimelineStyle 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; + /** + * Specifies the name of the timeline style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name: string; + /** + * Specifies if this `TimelineStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * @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.TimelineStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.TimelineStyle): void; + /** + * Deletes the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Creates a duplicate of this timeline style with copies of all the style elements. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The new `TimelineStyle` object that has been duplicated from this timeline style. + */ + duplicate(): Excel.TimelineStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TimelineStyleLoadOptions): Excel.TimelineStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TimelineStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.TimelineStyle; + /** + * 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.TimelineStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TimelineStyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.TimelineStyleData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TimelineStyleData): void; + } + /** + * Represents layout and print settings that are not dependent on any printer-specific implementation. These settings include margins, orientation, page numbering, title rows, and print area. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly headersFooters: Excel.HeaderFooterGroup; + /** + * The worksheet's black and white print option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + blackAndWhite: boolean; + /** + * The worksheet's bottom page margin to use for printing in points. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin: number; + /** + * The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHorizontally: boolean; + /** + * The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerVertically: boolean; + /** + * The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + draftMode: boolean; + /** + * The worksheet's first page number to print. A `null` value represents "auto" page numbering. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPageNumber: number | ""; + /** + * The worksheet's footer margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + footerMargin: number; + /** + * The worksheet's header margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headerMargin: number; + /** + * The worksheet's left margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin: number; + /** + * The worksheet's orientation of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation: Excel.PageOrientation | "Portrait" | "Landscape"; + /** + * The worksheet's paper size of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"; + /** + * Specifies if the worksheet's comments should be displayed when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printComments: Excel.PrintComments | "NoComments" | "EndSheet" | "InPlace"; + /** + * The worksheet's print errors option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printErrors: Excel.PrintErrorType | "AsDisplayed" | "Blank" | "Dash" | "NotAvailable"; + /** + * Specifies if the worksheet's gridlines will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printGridlines: boolean; + /** + * Specifies if the worksheet's headings will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printHeadings: boolean; + /** + * The worksheet's page print order option. This specifies the order to use for processing the page number printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printOrder: Excel.PrintOrder | "DownThenOver" | "OverThenDown"; + /** + * The worksheet's right margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin: number; + /** + * The worksheet's top margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin: number; + /** + * The worksheet's print zoom options. + The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getPrintAreaOrNullObject(): Excel.RangeAreas; + /** + * Gets the range object representing the title columns. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getPrintTitleColumns(): Excel.Range; + /** + * Gets the range object representing the title columns. If not set, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getPrintTitleColumnsOrNullObject(): Excel.Range; + /** + * Gets the range object representing the title rows. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getPrintTitleRows(): Excel.Range; + /** + * Gets the range object representing the title rows. If not set, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getPrintTitleRowsOrNullObject(): Excel.Range; + /** + * Sets the worksheet's print area. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param printArea The range or ranges of the content to print. + */ + setPrintArea(printArea: Range | RangeAreas | string): void; + /** + * Sets the worksheet's page margins with units. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param unit Measurement unit for the margins provided. + * @param marginOptions Margin values to set. Margins not provided remain unchanged. + */ + setPrintMargins(unit: Excel.PrintMarginUnit, marginOptions: Excel.PageLayoutMarginOptions): void; + /** + * Sets the worksheet's page margins with units. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param unit Measurement unit for the margins provided. + * @param marginOptions Margin values to set. Margins not provided 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param printTitleColumns The columns to be repeated to the left of each page. The 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param printTitleRows The rows to be repeated at the top of each page. The 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PageLayoutLoadOptions): Excel.PageLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PageLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PageLayoutData): void; + } + /** + * Represents page zoom properties. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface PageLayoutZoomOptions { + /** + * Number of pages to fit horizontally. This value can be `null` if percentage scale is used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + scale?: number; + /** + * Number of pages to fit vertically. This value can be `null` if percentage scale is used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalFitToPages?: number; + } + /** + * Represents the options in page layout margins. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface PageLayoutMarginOptions { + /** + * Specifies the page layout bottom margin in the unit specified to use for printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottom?: number; + /** + * Specifies the page layout footer margin in the unit specified to use for printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + footer?: number; + /** + * Specifies the page layout header margin in the unit specified to use for printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + header?: number; + /** + * Specifies the page layout left margin in the unit specified to use for printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: number; + /** + * Specifies the page layout right margin in the unit specified to use for printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + right?: number; + /** + * Specifies the page layout top margin in the unit specified to use for printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: number; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * The center footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerFooter: string; + /** + * The center header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHeader: string; + /** + * The left footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftFooter: string; + /** + * The left header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftHeader: string; + /** + * The right footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightFooter: string; + /** + * The right header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.HeaderFooterLoadOptions): Excel.HeaderFooter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.HeaderFooter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.HeaderFooterData): void; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly defaultForAllPages: Excel.HeaderFooter; + /** + * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly evenPages: Excel.HeaderFooter; + /** + * The first page header/footer, for all other pages general or even/odd is used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly firstPage: Excel.HeaderFooter; + /** + * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly oddPages: Excel.HeaderFooter; + /** + * The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.HeaderFooterGroupLoadOptions): Excel.HeaderFooterGroup; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.HeaderFooterGroup; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.HeaderFooterGroupData): void; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Specifies the column index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly columnIndex: number; + /** + * Specifies the row index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly rowIndex: number; + /** + * Deletes a page break object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + delete(): void; + /** + * Gets the first cell after the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getCellAfterBreak(): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PageBreakLoadOptions): Excel.PageBreak; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PageBreak; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PageBreakData): void; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a page break object via the index. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param index Index of the page break. + */ + getItem(index: number): Excel.PageBreak; + /** + * Resets all manual page breaks in the collection. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + removePageBreaks(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PageBreakCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PageBreakCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PageBreakCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.PageBreakCollectionData): void; + } + /** + * Represents a collection of all the data connections that are part of the workbook. + * + * @remarks + * [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; + /** + * Creates a new connection and adds it to the workbook. If a connection with given name already exists, then a unique name will be generated for the new connection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param name The name of the connection. The new connection will have a different name if there is a name collision. + * @param connectionString The connection string that contains the information needed to establish a connection to the data source. + * For example, the connection string for connecting to an OLAP cube could be "OLEDB;Provider=MSOLAP.8;Integrated Security=SSPI;Persist Security Info=True;Data Source=Contoso;Update Isolation Level=2;Initial Catalog=Adventure Works DW" + * @param commandText The command string for the specified data source. For example, the command string for a SQL query could be "Select * from Table"." + * @param dataSourceType The data source type of the connection. + * @returns Returns the newly created `DataConnection` object. + */ + add(name: string, connectionString: string, commandText: string, dataSourceType: Excel.DataSourceType): Excel.DataConnection; + /** + * Creates a new connection and adds it to the workbook. If a connection with given name already exists, then a unique name will be generated for the new connection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param name The name of the connection. The new connection will have a different name if there is a name collision. + * @param connectionString The connection string that contains the information needed to establish a connection to the data source. + * For example, the connection string for connecting to an OLAP cube could be "OLEDB;Provider=MSOLAP.8;Integrated Security=SSPI;Persist Security Info=True;Data Source=Contoso;Update Isolation Level=2;Initial Catalog=Adventure Works DW" + * @param commandText The command string for the specified data source. For example, the command string for a SQL query could be "Select * from Table"." + * @param dataSourceType The data source type of the connection. + * @returns Returns the newly created `DataConnection` object. + */ + add(name: string, connectionString: string, commandText: string, dataSourceType: "Unknown" | "Cube" | "LocalRange" | "LocalTable" | "OledbDefault"): Excel.DataConnection; + /** + * Refreshes data connections in the collection, such as from a PivotTable to a Power BI dataset, or a Data Model to a table or range in the same workbook. + Data connections unsupported by this method are: Power Query connections, data connections outside the original workbook (except Power BI connections), and connections to data protected by a firewall. + * + * @remarks + * [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; + }; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Returns the range object based on its position in the `RangeCollection`. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeCollectionData): void; + } + /** + * Contains the collection of cross-workbook level ranges. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + class RangeAreasCollection 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.RangeAreas[]; + /** + * Gets the number of `RangeAreas` objects in this collection. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Returns the `RangeAreas` object based on position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param index Index value of the range object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.RangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeAreasCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeAreasCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeAreasCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.RangeAreasCollection; + /** + * 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.RangeAreasCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeAreasCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.RangeAreasCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RangeAreasCollectionData): void; + } + /** + * Represents the entity that is mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + interface CommentMention { + /** + * The email address of the entity that is mentioned in a comment. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + email: string; + /** + * The ID of the entity. The ID matches one of the IDs in `CommentRichContent.richContent`. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + id: number; + /** + * The name of the entity that is mentioned in a comment. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + name: string; + } + /** + * Represents the content contained within a comment or comment reply. Rich content incudes the text string and any other objects contained within the comment body, such as mentions. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + interface CommentRichContent { + /** + * An array containing all the entities (e.g., people) mentioned within the comment. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: Excel.CommentMention[]; + /** + * Specifies the rich content of the comment (e.g., comment content with mentions, the first mentioned entity has an ID attribute of 0, and the second mentioned entity has an ID attribute of 1). + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent: string; + } + /** + * Represents a collection of comment objects that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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[]; + /** + * Creates a new comment with the given content on the given cell. An `InvalidArgument` error is thrown if the provided range is larger than one cell. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param cellAddress The cell to which the comment is added. This can be a `Range` object or a string. If it's a string, it must contain the full address, including the sheet name. An `InvalidArgument` error is thrown if the provided range is larger than one cell. + * @param content The comment's content. This can be either a string or `CommentRichContent` object. Strings are used for plain text. `CommentRichContent` objects allow for other comment features, such as mentions. [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] + * @param contentType Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] + */ + add(cellAddress: Range | string, content: CommentRichContent | string, contentType?: Excel.ContentType): Excel.Comment; + /** + * Creates a new comment with the given content on the given cell. An `InvalidArgument` error is thrown if the provided range is larger than one cell. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param cellAddress The cell to which the comment is added. This can be a `Range` object or a string. If it's a string, it must contain the full address, including the sheet name. An `InvalidArgument` error is thrown if the provided range is larger than one cell. + * @param content The comment's content. This can be either a string or `CommentRichContent` object. Strings are used for plain text. `CommentRichContent` objects allow for other comment features, such as mentions. [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] + * @param contentType Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] + */ + add(cellAddress: Range | string, content: CommentRichContent | string, contentType?: "Plain" | "Mention"): Excel.Comment; + /** + * Gets the number of comments in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a comment from the collection based on its ID. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param commentId The identifier for the comment. + */ + getItem(commentId: string): Excel.Comment; + /** + * Gets a comment from the collection based on its position. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Comment; + /** + * Gets the comment from the specified cell. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param cellAddress The cell which the comment is on. This can be a `Range` object or a string. If it's a string, it must contain the full address, including the sheet name. An `InvalidArgument` error is thrown if the provided range is larger than one cell. + */ + getItemByCell(cellAddress: Range | string): Excel.Comment; + /** + * Gets the comment to which the given reply is connected. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param replyId The identifier of comment reply. + */ + getItemByReplyId(replyId: string): Excel.Comment; + /** + * Gets a comment from the collection based on its ID. + If the comment object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param commentId The identifier for the comment. + */ + getItemOrNullObject(commentId: string): Excel.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CommentCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.CommentCollection; + /** + * Occurs when the comments are added. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @eventproperty + */ + readonly onAdded: OfficeExtension.EventHandlers; + /** + * Occurs when comments or replies in a comment collection are changed, including when replies are deleted. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * Occurs when comments are deleted in the comment collection. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @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.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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.CommentCollectionData): void; + } + class CommentCollectionCustom { + } + interface CommentCollection extends OfficeExtension.ClientObject, CommentCollectionCustom { + } + /** + * Represents a comment in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly replies: Excel.CommentReplyCollection; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly authorEmail: string; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly authorName: string; + /** + * The comment's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content: string; + /** + * Gets the content type of the comment. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly contentType: Excel.ContentType | "Plain" | "Mention"; + /** + * Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly creationDate: Date; + /** + * Specifies the comment identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly id: string; + /** + * Gets the entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly mentions: Excel.CommentMention[]; + /** + * The comment thread status. A value of `true` means that the comment thread is resolved. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved: boolean; + /** + * Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly richContent: 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. + * @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: Excel.Comment): void; + /** + * Assigns the task attached to the comment to the given user as an assignee. If there is no task, one will be created. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param assignee The assignee's user identity information. + */ + assignTask(assignee: Excel.EmailIdentity): Excel.DocumentTask; + /** + * Deletes the comment and all the connected replies. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Gets the cell where this comment is located. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getLocation(): Excel.Range; + /** + * Gets the task associated with this comment. If there is no task for the comment thread, an `ItemNotFound` exception is thrown. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getTask(): Excel.DocumentTask; + /** + * Gets the task associated with this comment. If there is no task for the comment thread, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getTaskOrNullObject(): Excel.DocumentTask; + /** + * Updates the comment content with a specially formatted string and a list of mentions. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param contentWithMentions The content for the comment. This contains a specially formatted string and a list of mentions that will be parsed into the string when displayed by Excel. + */ + updateMentions(contentWithMentions: Excel.CommentRichContent): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CommentLoadOptions): Excel.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.CommentData): void; + } + /** + * Represents a collection of comment reply objects that are part of the comment. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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 a comment. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param content The comment's content. This can be either a string or a `CommentRichContent` object (e.g., for comments with mentions). [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] + * @param contentType Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] + */ + add(content: CommentRichContent | string, contentType?: Excel.ContentType): Excel.CommentReply; + /** + * Creates a comment reply for a comment. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param content The comment's content. This can be either a string or a `CommentRichContent` object (e.g., for comments with mentions). [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] + * @param contentType Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] + */ + add(content: CommentRichContent | string, contentType?: "Plain" | "Mention"): Excel.CommentReply; + /** + * Gets the number of comment replies in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Returns a comment reply identified by its ID. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param commentReplyId The identifier for the comment reply. + */ + getItem(commentReplyId: string): Excel.CommentReply; + /** + * Gets a comment reply based on its position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param index The index value of the comment reply to be retrieved. The collection uses zero-based indexing. + */ + getItemAt(index: number): Excel.CommentReply; + /** + * Returns a comment reply identified by its ID. + If the comment reply object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param commentReplyId The identifier for the comment reply. + */ + getItemOrNullObject(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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CommentReplyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CommentReplyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CommentReplyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.CommentReplyCollectionData): void; + } + /** + * Represents a comment reply in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly authorEmail: string; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly authorName: string; + /** + * The comment reply's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content: string; + /** + * The content type of the reply. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly contentType: Excel.ContentType | "Plain" | "Mention"; + /** + * Gets the creation time of the comment reply. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly creationDate: Date; + /** + * Specifies the comment reply identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly id: string; + /** + * The entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly mentions: Excel.CommentMention[]; + /** + * The comment reply status. A value of `true` means the reply is in the resolved state. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly resolved: boolean; + /** + * The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly richContent: 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. + * @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.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.CommentReply): void; + /** + * Assigns the task attached to the comment to the given user as the sole assignee. If there is no task, one will be created. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param assignee The assignee's user identity information. + */ + assignTask(assignee: Excel.EmailIdentity): Excel.DocumentTask; + /** + * Deletes the comment reply. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Gets the cell where this comment reply is located. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getLocation(): Excel.Range; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getParentComment(): Excel.Comment; + /** + * Gets the task associated with this comment reply's thread. If there is no task for the comment thread, an `ItemNotFound` exception is thrown. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getTask(): Excel.DocumentTask; + /** + * Gets the task associated with this comment reply's thread. If there is no task for the comment thread, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getTaskOrNullObject(): Excel.DocumentTask; + /** + * Updates the comment content with a specially formatted string and a list of mentions. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param contentWithMentions The content for the comment. This contains a specially formatted string and a list of mentions that will be parsed into the string when displayed by Excel. + */ + updateMentions(contentWithMentions: Excel.CommentRichContent): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CommentReplyLoadOptions): Excel.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.CommentReplyData): void; + } + /** + * Represents a collection of all the shapes in the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 the worksheet. Returns a `Shape` object that represents the new shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param geometricShapeType Represents the type of the geometric shape. See `Excel.GeometricShapeType` for details. + */ + addGeometricShape(geometricShapeType: Excel.GeometricShapeType): Excel.Shape; + /** + * Adds a geometric shape to the worksheet. Returns a `Shape` object that represents the new shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param geometricShapeType Represents the type of the geometric shape. See `Excel.GeometricShapeType` for details. + */ + 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"): Excel.Shape; + /** + * Groups a subset of shapes in this collection's worksheet. Returns a `Shape` object that represents the new group of shapes. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param values An array of shape IDs or shape objects. + */ + addGroup(values: Array): Excel.Shape; + /** + * Creates an image from a base64-encoded string and adds it to the worksheet. Returns the `Shape` object that represents the new image. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param base64ImageString A base64-encoded string representing an image in either JPEG or PNG format. + */ + addImage(base64ImageString: string): Excel.Shape; + /** + * Adds a line to worksheet. Returns a `Shape` object that represents the new line. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param startLeft The distance, in points, from the start of the line to the left side of the worksheet. + * @param startTop The distance, in points, from the start of the line to the top of the worksheet. + * @param endLeft The distance, in points, from the end of the line to the left of the worksheet. + * @param endTop The distance, in points, from the end of the line to the top of the worksheet. + * @param connectorType Represents the connector type. See `Excel.ConnectorType` for details. + */ + addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: Excel.ConnectorType): Excel.Shape; + /** + * Adds a line to worksheet. Returns a `Shape` object that represents the new line. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param startLeft The distance, in points, from the start of the line to the left side of the worksheet. + * @param startTop The distance, in points, from the start of the line to the top of the worksheet. + * @param endLeft The distance, in points, from the end of the line to the left of the worksheet. + * @param endTop The distance, in points, from the end of the line to the top of the worksheet. + * @param connectorType Represents the connector type. See `Excel.ConnectorType` for details. + */ + addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: "Straight" | "Elbow" | "Curve"): Excel.Shape; + /** + * Creates a scalable vector graphic (SVG) from an XML string and adds it to the worksheet. Returns a `Shape` object that represents the new image. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param xml An XML string that represents the SVG. + */ + addSvg(xml: string): Excel.Shape; + /** + * Adds a text box to the worksheet with the provided text as the content. Returns a `Shape` object that represents the new text box. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a shape using its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param key The name or ID of the shape to be retrieved. + */ + getItem(key: string): Excel.Shape; + /** + * Gets a shape using its position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param index The zero-based index of the shape to be retrieved. + */ + getItemAt(index: number): Excel.Shape; + /** + * Gets a shape using its name or ID. + If the shape object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param key The name or ID of the shape to be retrieved. + */ + getItemOrNullObject(key: string): Excel.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ShapeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ShapeCollectionData): void; + } + class ShapeCollectionCustom { + } + interface ShapeCollection extends OfficeExtension.ClientObject, ShapeCollectionCustom { + } + /** + * Represents a generic shape object in the worksheet. A shape could be a geometric shape, a line, a group of shapes, etc. + To learn more about the shape object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-shapes | Work with shapes using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly fill: Excel.ShapeFill; + /** + * Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly geometricShape: Excel.GeometricShape; + /** + * Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly group: Excel.ShapeGroup; + /** + * Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly image: Excel.Image; + /** + * Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly line: Excel.Line; + /** + * Returns the line formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly lineFormat: Excel.ShapeLineFormat; + /** + * Specifies the parent group of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly parentGroup: Excel.Shape; + /** + * Returns the text frame object of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly textFrame: Excel.TextFrame; + /** + * Specifies the alternative description text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextDescription: string; + /** + * Specifies the alternative title text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextTitle: string; + /** + * Returns the number of connection sites on this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly connectionSiteCount: number; + /** + * Gets the display name of the shape. A newly created shape has a generated name + that is localized and may not match its `name`. In this scenario, you can use + this API to get the name that is displayed in the UI. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + readonly displayName: string; + /** + * Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"; + /** + * Specifies the height, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + height: number; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly id: string; + /** + * The distance, in points, from the left side of the shape to the left side of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left: number; + /** + * Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly level: number; + /** + * Specifies if the aspect ratio of this shape is locked. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lockAspectRatio: boolean; + /** + * Specifies the name of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name: string; + /** + * Represents how the object is attached to the cells below it. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + placement: Excel.Placement | "TwoCell" | "OneCell" | "Absolute"; + /** + * Specifies the rotation, in degrees, of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rotation: number; + /** + * Specifies the share link to an Office Script file on OneDrive that will be associated with this shape. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + scriptLink: string; + /** + * The distance, in points, from the top edge of the shape to the top edge of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top: number; + /** + * Returns the type of this shape. See `Excel.ShapeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly type: Excel.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line"; + /** + * Specifies if the shape is visible. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible: boolean; + /** + * Specifies the width, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width: number; + /** + * Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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; + /** + * Copies and pastes a `Shape` object. + The pasted shape is copied to the same pixel location as this shape. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param destinationSheet The sheet to which the shape object will be pasted. The default value is the copied shape's worksheet. + */ + copyTo(destinationSheet?: Worksheet | string): Excel.Shape; + /** + * Removes the shape from the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + delete(): void; + /** + * Converts the shape to an image and returns the image as a base64-encoded string. The DPI is 96. The only supported formats are `Excel.PictureFormat.BMP`, `Excel.PictureFormat.PNG`, `Excel.PictureFormat.JPEG`, and `Excel.PictureFormat.GIF`. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param format Specifies the format of the image. + */ + getAsImage(format: Excel.PictureFormat): OfficeExtension.ClientResult; + /** + * Converts the shape to an image and returns the image as a base64-encoded string. The DPI is 96. The only supported formats are `Excel.PictureFormat.BMP`, `Excel.PictureFormat.PNG`, `Excel.PictureFormat.JPEG`, and `Excel.PictureFormat.GIF`. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param format Specifies the format of the image. + */ + getAsImage(format: "UNKNOWN" | "BMP" | "JPEG" | "GIF" | "PNG" | "SVG"): OfficeExtension.ClientResult; + /** + * Moves the shape horizontally by the specified number of points. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param increment The increment, in points, the shape will be horizontally moved. A positive value moves the shape to the right and a negative value moves it to the left. If the sheet is right-to-left oriented, this is reversed: positive values will move the shape to the left and negative values will move it to the right. + */ + incrementLeft(increment: number): void; + /** + * Rotates the shape clockwise around the z-axis by the specified number of degrees. + Use the `rotation` property to set the absolute rotation of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param increment How many degrees the shape will be rotated. A positive value rotates the shape clockwise and a negative value rotates it counterclockwise. + */ + incrementRotation(increment: number): void; + /** + * Moves the shape vertically by the specified number of points. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param increment The increment, in points, the shape will be vertically moved. A positive value moves the shape down and a negative value moves it up. + */ + incrementTop(increment: number): void; + /** + * Scales the height of the shape by a specified factor. For images, 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param scaleFactor Specifies the ratio between the height of the shape after you resize it and the current or original height. + * @param scaleType Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. + * @param scaleFrom Optional. 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 images, 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param scaleFactor Specifies the ratio between the height of the shape after you resize it and the current or original height. + * @param scaleType Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. + * @param scaleFrom Optional. 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 images, 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param scaleFactor Specifies the ratio between the width of the shape after you resize it and the current or original width. + * @param scaleType Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. + * @param scaleFrom Optional. 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 images, 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param scaleFactor Specifies the ratio between the width of the shape after you resize it and the current or original width. + * @param scaleType Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. + * @param scaleFrom Optional. 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 up or down the collection's z-order, which shifts it in front of or behind other shapes. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param position Where to move the shape in the z-order stack relative to the other shapes. See `Excel.ShapeZOrder` for details. + */ + setZOrder(position: Excel.ShapeZOrder): void; + /** + * Moves the specified shape up or down the collection's z-order, which shifts it in front of or behind other shapes. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param position Where to move the shape in the z-order stack relative to the other shapes. See `Excel.ShapeZOrder` for details. + */ + setZOrder(position: "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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ShapeLoadOptions): Excel.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Shape; + /** + * Occurs when the shape is activated. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * Occurs when the shape is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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.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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ShapeData): void; + } + /** + * Represents a geometric shape inside a worksheet. A geometric shape can be a rectangle, block arrow, equation symbol, flowchart item, star, banner, callout, or any other basic shape in Excel. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly shape: Excel.Shape; + /** + * Returns the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly id: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.GeometricShapeLoadOptions): Excel.GeometricShape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.GeometricShape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.GeometricShapeData): void; + } + /** + * Represents an image in the worksheet. To get the corresponding `Shape` object, use `Image.shape`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 associated with the image. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly shape: Excel.Shape; + /** + * Specifies the shape identifier for the image object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly id: string; + /** + * Returns the format of the image. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ImageLoadOptions): Excel.Image; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Image; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ImageData): void; + } + /** + * Represents a shape group inside a worksheet. To get the corresponding `Shape` object, use `ShapeGroup.shape`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 associated with the group. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly shape: Excel.Shape; + /** + * Returns the collection of `Shape` objects. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly shapes: Excel.GroupShapeCollection; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly id: string; + /** + * Ungroups any grouped shapes in the specified shape group. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + ungroup(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ShapeGroupLoadOptions): Excel.ShapeGroup; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ShapeGroup; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ShapeGroupData): void; + } + /** + * Represents the shape collection inside a shape group. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 shape group. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a shape using its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param key The name or ID of the shape to be retrieved. + */ + getItem(key: string): Excel.Shape; + /** + * Gets a shape based on its position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param index The zero-based index value of the object to be retrieved. + */ + getItemAt(index: number): Excel.Shape; + /** + * Gets a shape using its name or ID. + If the shape object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param key The name or ID of the shape to be retrieved. + */ + getItemOrNullObject(key: string): Excel.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.GroupShapeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.GroupShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.GroupShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.GroupShapeCollectionData): void; + } + /** + * Represents a line inside a worksheet. To get the corresponding `Shape` object, use `Line.shape`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + class Line 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 to which the beginning of the specified line is attached. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly beginConnectedShape: Excel.Shape; + /** + * Represents the shape to which the end of the specified line is attached. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly endConnectedShape: Excel.Shape; + /** + * Returns the `Shape` object associated with the line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly shape: Excel.Shape; + /** + * Represents the length of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadLength: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; + /** + * Represents the style of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadStyle: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; + /** + * Represents the width of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadWidth: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; + /** + * Represents the connection site to which the beginning of a connector is connected. Returns `null` when the beginning of the line is not attached to any shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly beginConnectedSite: number; + /** + * Represents the length of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadLength: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; + /** + * Represents the style of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadStyle: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; + /** + * Represents the width of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadWidth: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; + /** + * Represents the connection site to which the end of a connector is connected. Returns `null` when the end of the line is not attached to any shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly endConnectedSite: number; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly id: string; + /** + * Specifies if the beginning of the specified line is connected to a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly isBeginConnected: boolean; + /** + * Specifies if the end of the specified line is connected to a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly isEndConnected: boolean; + /** + * Represents the connector type for the line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectorType: Excel.ConnectorType | "Straight" | "Elbow" | "Curve"; + /** + * 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. + * @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.LineUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Line): void; + /** + * Attaches the beginning of the specified connector to a specified shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param shape The shape to connect. + * @param connectionSite The connection site on the shape to which the beginning of the connector is attached. Must be an integer between 0 (inclusive) and the connection-site count of the specified shape (exclusive). + */ + connectBeginShape(shape: Excel.Shape, connectionSite: number): void; + /** + * Attaches the end of the specified connector to a specified shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param shape The shape to connect. + * @param connectionSite The connection site on the shape to which the end of the connector is attached. Must be an integer between 0 (inclusive) and the connection-site count of the specified shape (exclusive). + */ + connectEndShape(shape: Excel.Shape, connectionSite: number): void; + /** + * Detaches the beginning of the specified connector from a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + disconnectBeginShape(): void; + /** + * Detaches the end of the specified connector from a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + disconnectEndShape(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.LineLoadOptions): Excel.Line; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Line; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Line; + /** + * 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.Line object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LineData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.LineData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.LineData): void; + } + /** + * Represents the fill formatting of a shape object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + foregroundColor: string; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency: number; + /** + * Returns the fill type of the shape. See `Excel.ShapeFillType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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 this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + clear(): void; + /** + * Sets the fill formatting of the shape to a uniform color. This changes the fill type to "Solid". + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param color A string that represents the fill color in HTML color format, in 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ShapeFillLoadOptions): Excel.ShapeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ShapeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ShapeFillData): void; + } + /** + * Represents the line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + class ShapeLineFormat 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 line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color: string; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashStyle: Excel.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style: Excel.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency: number; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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.ShapeLineFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ShapeLineFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ShapeLineFormatLoadOptions): Excel.ShapeLineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ShapeLineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.ShapeLineFormat; + /** + * 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.ShapeLineFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeLineFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ShapeLineFormatData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ShapeLineFormatData): void; + } + /** + * Represents the text frame of a shape object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See `Excel.TextRange` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly textRange: Excel.TextRange; + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeSetting: Excel.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin: number; + /** + * Specifies if the text frame contains text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly hasText: boolean; + /** + * Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalAlignment: Excel.ShapeTextHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; + /** + * Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalOverflow: Excel.ShapeTextHorizontalOverflow | "Overflow" | "Clip"; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin: number; + /** + * Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation: Excel.ShapeTextOrientation | "Horizontal" | "Vertical" | "Vertical270" | "WordArtVertical" | "EastAsianVertical" | "MongolianVertical" | "WordArtVerticalRTL"; + /** + * Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder: Excel.ShapeTextReadingOrder | "LeftToRight" | "RightToLeft"; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin: number; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin: number; + /** + * Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalAlignment: Excel.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom" | "Justified" | "Distributed"; + /** + * Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalOverflow: Excel.ShapeTextVerticalOverflow | "Overflow" | "Ellipsis" | "Clip"; + /** + * 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. + * @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 text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + deleteText(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TextFrameLoadOptions): Excel.TextFrame; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TextFrame; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TextFrameData): void; + } + /** + * Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly font: Excel.ShapeFont; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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 the substring in the given range. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param start The zero-based index of the first character to get from the text range. + * @param length Optional. The number of characters to be returned in the new text range. If length is omitted, all the characters from start to the end of the text range's last paragraph will be returned. + */ + getSubstring(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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TextRangeLoadOptions): Excel.TextRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TextRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.TextRangeData): void; + } + /** + * Represents the font attributes, such as font name, font size, and color, for a shape's `TextRange` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color: string; + /** + * Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + italic: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name: string; + /** + * Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + size: number; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ShapeFontLoadOptions): Excel.ShapeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ShapeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.ShapeFontData): void; + } + /** + * Represents a `Slicer` object in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class Slicer 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 collection of slicer items that are part of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly slicerItems: Excel.SlicerItemCollection; + /** + * The style applied to the slicer. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly slicerStyle: Excel.SlicerStyle; + /** + * Represents the worksheet containing the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly worksheet: Excel.Worksheet; + /** + * Represents the caption of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + caption: string; + /** + * Represents the height, in points, of the slicer. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height: number; + /** + * Represents the unique ID of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly id: string; + /** + * Value is `true` if all filters currently applied on the slicer are cleared. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly isFilterCleared: boolean; + /** + * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left: number; + /** + * Represents the name of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name: string; + /** + * Represents the slicer name used in the formula. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula: string; + /** + * Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + sortBy: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"; + /** + * Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + style: string; + /** + * Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top: number; + /** + * Represents the width, in points, of the slicer. + Throws an `InvalidArgument` error when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * @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.SlicerUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Slicer): void; + /** + * Clears all the filters currently applied on the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + clearFilters(): void; + /** + * Deletes the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Returns an array of selected items' keys. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getSelectedItems(): OfficeExtension.ClientResult; + /** + * Selects slicer items based on their keys. The previous selections are cleared. + All items will be selected by default if the array is empty. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param items Optional. The specified slicer item names to be selected. + */ + selectItems(items?: string[]): void; + /** + * Sets the style applied to the slicer. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param style The style to apply to the slicer. An `InvalidArgument` error is thrown if a string is provided that does not match the name of any style. + */ + setStyle(style: string | SlicerStyle | BuiltInSlicerStyle): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SlicerLoadOptions): Excel.Slicer; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Slicer; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Slicer; + /** + * 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.Slicer object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.SlicerData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.SlicerData): void; + } + /** + * Represents a collection of all the slicer objects in the workbook or a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class SlicerCollection 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.Slicer[]; + /** + * Adds a new slicer to the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param slicerSource The data source that the new slicer will be based on. It can be a `PivotTable` object, a `Table` object, or a string. When a PivotTable object is passed, the data source is the source of the `PivotTable` object. When a `Table` object is passed, the data source is the `Table` object. When a string is passed, it is interpreted as the name or ID of a PivotTable or table. + * @param sourceField The field in the data source to filter by. It can be a `PivotField` object, a `TableColumn` object, the ID of a `PivotField` or the name or ID of a `TableColumn`. + * @param slicerDestination Optional. The worksheet in which the new slicer will be created. It can be a `Worksheet` object or the name or ID of a worksheet. This parameter can be omitted if the slicer collection is retrieved from a worksheet. + * @returns The new slicer. + */ + add(slicerSource: string | PivotTable | Table, sourceField: string | PivotField | number | TableColumn, slicerDestination?: string | Worksheet): Excel.Slicer; + /** + * Returns the number of slicers in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a slicer object using its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param key The name or ID of the slicer. + */ + getItem(key: string): Excel.Slicer; + /** + * Gets a slicer based on its position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Slicer; + /** + * Gets a slicer using its name or ID. If the slicer doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param key Name or ID of the slicer to be retrieved. + */ + getItemOrNullObject(key: string): Excel.Slicer; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SlicerCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SlicerCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.SlicerCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.SlicerCollection; + /** + * 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.SlicerCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.SlicerCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.SlicerCollectionData): void; + } + /** + * Represents a slicer item in a slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class SlicerItem 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; + /** + * Value is `true` if the slicer item has data. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly hasData: boolean; + /** + * Value is `true` if the slicer item is selected. + Setting this value will not clear the selected state of other slicer items. + By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSelected: boolean; + /** + * Represents the unique value representing the slicer item. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly key: string; + /** + * Represents the title displayed in the Excel UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly 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. + * @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.SlicerItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.SlicerItem): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SlicerItemLoadOptions): Excel.SlicerItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.SlicerItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.SlicerItem; + /** + * 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.SlicerItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.SlicerItemData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.SlicerItemData): void; + } + /** + * Represents a collection of all the slicer item objects in the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class SlicerItemCollection 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.SlicerItem[]; + /** + * Returns the number of slicer items in the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a slicer item object using its key or name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param key The key or name of the slicer item. + */ + getItem(key: string): Excel.SlicerItem; + /** + * Gets a slicer item based on its position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.SlicerItem; + /** + * Gets a slicer item using its key or name. If the slicer item doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param key Key or name of the slicer to be retrieved. + */ + getItemOrNullObject(key: string): Excel.SlicerItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SlicerItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SlicerItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.SlicerItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.SlicerItemCollection; + /** + * 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.SlicerItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.SlicerItemCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.SlicerItemCollectionData): void; + } + /** + * Represents a workbook ribbon. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + class Ribbon 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 active ribbon tab. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + activeTab: Excel.RibbonTab | "Others" | "Home" | "Insert" | "Draw" | "PageLayout" | "Formulas" | "Data" | "Review" | "View" | "Developer" | "AddIns" | "Help"; + /** + * 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. + * @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.RibbonUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Ribbon): void; + /** + * Executes a command button in the ribbon by its TCID. + TCID of the button in the ribbon.If `true`, Excel will treat this API call as a normal mouse click. The default value is `false`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + executeCommand(tcid: number, mouseClick?: boolean): void; + /** + * Show Chart Dialog. + If `true`, Excel will treat this API call as a normal mouse click. The default value is `false`. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showChartDialog(mouseClick?: boolean): void; + /** + * Shows a teaching callout next to a button in the ribbon by its TCID. + TCID of the button in the ribbon.Title of the teaching callout.Body message of the teaching callout. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showTeachingCallout(tcid: number, title: string, message: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RibbonLoadOptions): Excel.Ribbon; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Ribbon; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Ribbon; + /** + * Occurs when the ribbon is clicked. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onCommandExecuted: 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.Ribbon object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RibbonData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.RibbonData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.RibbonData): void; + } + /** + * Represents a linked data type. + A linked data type is a data type connected to an online data source. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class LinkedDataType 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 name of the data provider for the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly dataProvider: string; + /** + * The local time-zone date and time since the workbook was opened when the linked data type was last refreshed. + Returns `undefined` if the linked data type has not been refreshed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly lastRefreshed: Date; + /** + * The name of the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly name: string; + /** + * The frequency, in seconds, at which the linked data type is refreshed if `refreshMode` is set to "Periodic". + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly periodicRefreshInterval: number; + /** + * Returns any warnings encountered after an attempt to load refresh data for this linked data type from the workbook. + 1st-party only. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly refreshDataLoadWarnings: string[]; + /** + * Returns any errors that occurred during a refresh operation for this linked data type from the workbook. + 1st-party only. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly refreshErrors: string[]; + /** + * The mechanism by which the data for the linked data type is retrieved. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly refreshMode: Excel.LinkedDataTypeRefreshMode | "Unknown" | "Manual" | "OnLoad" | "Periodic"; + /** + * The unique ID of the linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly serviceId: number; + /** + * Returns an array with all the refresh modes supported by the linked data type. The contents of the array may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly supportedRefreshModes: Excel.LinkedDataTypeRefreshMode[]; + /** + * Makes a request to refresh the linked data type. If the service is busy or otherwise temporarily inaccessible, the request will not be fulfilled. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + requestRefresh(): void; + /** + * Makes a request to change the refresh mode for this linked data type. + If the given refresh mode is not supported by this linked data type the mode is left unchanged. + If set to "Periodic", the refresh interval is set to a predetermined value based on the particular linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param refreshMode The intended mode to which this linked data type is requested to change. + */ + requestSetRefreshMode(refreshMode: Excel.LinkedDataTypeRefreshMode): void; + /** + * Makes a request to change the refresh mode for this linked data type. + If the given refresh mode is not supported by this linked data type the mode is left unchanged. + If set to "Periodic", the refresh interval is set to a predetermined value based on the particular linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param refreshMode The intended mode to which this linked data type is requested to change. + */ + requestSetRefreshMode(refreshMode: "Unknown" | "Manual" | "OnLoad" | "Periodic"): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.LinkedDataTypeLoadOptions): Excel.LinkedDataType; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.LinkedDataType; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.LinkedDataType; + /** + * 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.LinkedDataType object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LinkedDataTypeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.LinkedDataTypeData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.LinkedDataTypeData): void; + } + /** + * Represents a collection of linked data types. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class LinkedDataTypeCollection 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.LinkedDataType[]; + /** + * Gets the number of linked data types in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a linked data type by service ID. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The ID of the linked data type. + */ + getItem(key: number): Excel.LinkedDataType; + /** + * Gets a linked data type by its index in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index The index of the linked data type object in the collection. + * @returns The linked data type at the given index. + */ + getItemAt(index: number): Excel.LinkedDataType; + /** + * Gets a linked data type by ID. If the linked data type doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The service ID of the linked data type. + */ + getItemOrNullObject(key: number): Excel.LinkedDataType; + /** + * Makes a request to refresh all the linked data types in the collection. + If the service is busy or otherwise temporarily inaccessible, the request will not be fulfilled. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + requestRefreshAll(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.LinkedDataTypeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.LinkedDataTypeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.LinkedDataTypeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.LinkedDataTypeCollection; + /** + * Occurs after a new linked data type is added to the workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onLinkedDataTypeAdded: OfficeExtension.EventHandlers; + /** + * Occurs after a request to change the refresh mode of a linked data type is complete. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onRefreshModeChanged: OfficeExtension.EventHandlers; + /** + * Occurs after a request to refresh a linked data type is complete. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onRefreshRequestCompleted: 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.LinkedDataTypeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LinkedDataTypeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.LinkedDataTypeCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.LinkedDataTypeCollectionData): void; + } + /** + * Representation of a refresh mode. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum LinkedDataTypeRefreshMode { + /** + * Refresh mode is unknown or unsupported. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + unknown = "Unknown", + /** + * Manual refresh. Refresh does not get triggered automatically. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + manual = "Manual", + /** + * Refresh on workbook load only. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + onLoad = "OnLoad", + /** + * Refresh periodically based on an interval. It will also trigger a refresh on workbook load. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + periodic = "Periodic" + } + /** + * The argument that is passed to the event handler upon completion of refresh request to an external service or link. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RefreshRequestCompletedEventArgs { + /** + * Indicates if the request to refresh was successful. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshed: boolean; + /** + * The unique ID of the object whose refresh request was completed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceId: number; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "LinkedDataTypeRefreshRequestCompleted"; + /** + * An array that contains any warnings generated from the refresh request. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + warnings?: string[]; + } + /** + * Represents information about a newly added linked data type, such as source and ID. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RefreshModeChangedEventArgs { + /** + * The linked data type refresh mode. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshMode: Excel.LinkedDataTypeRefreshMode | "Unknown" | "Manual" | "OnLoad" | "Periodic"; + /** + * The unique ID of the object whose refresh mode was changed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceId: number; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "LinkedDataTypeRefreshModeChanged"; + } + /** + * The argument that is passed to the event handler after a new linked data type is added to the workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface LinkedDataTypeAddedEventArgs { + /** + * The unique ID of the new linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceId: number; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "LinkedDataTypeLinkedDataTypeAdded"; + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum AxisType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + invalid = "Invalid", + /** + * Axis displays categories. + * @remarks + * [Api set: ExcelApi 1.7] + */ + category = "Category", + /** + * Axis displays values. + * @remarks + * [Api set: ExcelApi 1.7] + */ + value = "Value", + /** + * Axis displays data series. + * @remarks + * [Api set: ExcelApi 1.7] + */ + series = "Series" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum AxisGroup { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + primary = "Primary", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + secondary = "Secondary" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum AxisScaleType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + linear = "Linear", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + logarithmic = "Logarithmic" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum AxisCrosses { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + maximum = "Maximum", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + minimum = "Minimum", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + custom = "Custom" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum AxisTickMark { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + cross = "Cross", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + inside = "Inside", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + outside = "Outside" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum AxisTickLabelPosition { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + nextToAxis = "NextToAxis", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + high = "High", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + low = "Low", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum TrendlineType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + linear = "Linear", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + exponential = "Exponential", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + logarithmic = "Logarithmic", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + movingAverage = "MovingAverage", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + polynomial = "Polynomial", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + power = "Power" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + invalid = "Invalid", + /** + * Axis displays categories. + * @remarks + * [Api set: ExcelApi 1.7] + */ + category = "Category", + /** + * Axis displays values. + * @remarks + * [Api set: ExcelApi 1.7] + */ + value = "Value", + /** + * Axis displays data series. + * @remarks + * [Api set: ExcelApi 1.7] + */ + series = "Series" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisGroup { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + primary = "Primary", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + secondary = "Secondary" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisScaleType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + linear = "Linear", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + logarithmic = "Logarithmic" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisPosition { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + maximum = "Maximum", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + minimum = "Minimum", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + custom = "Custom" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisTickMark { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + cross = "Cross", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + inside = "Inside", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + outside = "Outside" + } + /** + * Represents the state of calculation across the entire Excel application. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum CalculationState { + /** + * Calculations complete. + * @remarks + * [Api set: ExcelApi 1.9] + */ + done = "Done", + /** + * Calculations in progress. + * @remarks + * [Api set: ExcelApi 1.9] + */ + calculating = "Calculating", + /** + * Changes that trigger calculation have been made, but a recalculation has not yet been performed. + * @remarks + * [Api set: ExcelApi 1.9] + */ + pending = "Pending" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisTickLabelPosition { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + nextToAxis = "NextToAxis", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + high = "High", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + low = "Low", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisDisplayUnit { + /** + * Default option. This will reset display unit to the axis, and set unit label invisible. + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None", + /** + * This will set the axis in units of hundreds. + * @remarks + * [Api set: ExcelApi 1.7] + */ + hundreds = "Hundreds", + /** + * This will set the axis in units of thousands. + * @remarks + * [Api set: ExcelApi 1.7] + */ + thousands = "Thousands", + /** + * This will set the axis in units of tens of thousands. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tenThousands = "TenThousands", + /** + * This will set the axis in units of hundreds of thousands. + * @remarks + * [Api set: ExcelApi 1.7] + */ + hundredThousands = "HundredThousands", + /** + * This will set the axis in units of millions. + * @remarks + * [Api set: ExcelApi 1.7] + */ + millions = "Millions", + /** + * This will set the axis in units of tens of millions. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tenMillions = "TenMillions", + /** + * This will set the axis in units of hundreds of millions. + * @remarks + * [Api set: ExcelApi 1.7] + */ + hundredMillions = "HundredMillions", + /** + * This will set the axis in units of billions. + * @remarks + * [Api set: ExcelApi 1.7] + */ + billions = "Billions", + /** + * This will set the axis in units of trillions. + * @remarks + * [Api set: ExcelApi 1.7] + */ + trillions = "Trillions", + /** + * This will set the axis in units of custom value. + * @remarks + * [Api set: ExcelApi 1.7] + */ + custom = "Custom" + } + /** + * Specifies the unit of time for chart axes and data series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisTimeUnit { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + days = "Days", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + months = "Months", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + years = "Years" + } + /** + * Represents the quartile calculation type of chart series layout. Only applies to a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartBoxQuartileCalculation { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + inclusive = "Inclusive", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + exclusive = "Exclusive" + } + /** + * Specifies the type of the category axis. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisCategoryType { + /** + * Excel controls the axis type. + * @remarks + * [Api set: ExcelApi 1.7] + */ + automatic = "Automatic", + /** + * Axis groups data by an arbitrary set of categories. + * @remarks + * [Api set: ExcelApi 1.7] + */ + textAxis = "TextAxis", + /** + * Axis groups data on a time scale. + * @remarks + * [Api set: ExcelApi 1.7] + */ + dateAxis = "DateAxis" + } + /** + * Specifies the bin type of a histogram chart or pareto chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartBinType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + category = "Category", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + auto = "Auto", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + binWidth = "BinWidth", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + binCount = "BinCount" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartLineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + continuous = "Continuous", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + dashDot = "DashDot", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + dashDotDot = "DashDotDot", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + dot = "Dot", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + grey25 = "Grey25", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + grey50 = "Grey50", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + grey75 = "Grey75", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + roundDot = "RoundDot" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum ChartDataLabelPosition { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + insideEnd = "InsideEnd", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + insideBase = "InsideBase", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + outsideEnd = "OutsideEnd", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + right = "Right", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + bestFit = "BestFit", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + callout = "Callout" + } + /** + * Represents which parts of the error bar to include. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartErrorBarsInclude { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + both = "Both", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + minusValues = "MinusValues", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + plusValues = "PlusValues" + } + /** + * Represents the range type for error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartErrorBarsType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + fixedValue = "FixedValue", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + percent = "Percent", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + stDev = "StDev", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + stError = "StError", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + custom = "Custom" + } + /** + * Represents the mapping level of a chart series. This only applies to region map charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartMapAreaLevel { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dataOnly = "DataOnly", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + city = "City", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + county = "County", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + state = "State", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + country = "Country", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + continent = "Continent", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + world = "World" + } + /** + * Represents the gradient style of a chart series. This is only applicable for region map charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartGradientStyle { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + twoPhaseColor = "TwoPhaseColor", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + threePhaseColor = "ThreePhaseColor" + } + /** + * Represents the gradient style type of a chart series. This is only applicable for region map charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartGradientStyleType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + extremeValue = "ExtremeValue", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + number = "Number", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + percent = "Percent" + } + /** + * Represents the position of the chart title. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartTitlePosition { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + right = "Right" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum ChartLegendPosition { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + right = "Right", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + corner = "Corner", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + custom = "Custom" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartMarkerStyle { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + square = "Square", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + diamond = "Diamond", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + triangle = "Triangle", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + x = "X", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + star = "Star", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + dot = "Dot", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + circle = "Circle", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + plus = "Plus", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + picture = "Picture" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ChartPlotAreaPosition { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + custom = "Custom" + } + /** + * Represents the region level of a chart series layout. This only applies to region map charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartMapLabelStrategy { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bestFit = "BestFit", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + showAll = "ShowAll" + } + /** + * Represents the region projection type of a chart series layout. This only applies to region map charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartMapProjectionType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mercator = "Mercator", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + miller = "Miller", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + robinson = "Robinson", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + albers = "Albers" + } + /** + * Represents the parent label strategy of the chart series layout. This only applies to treemap charts + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartParentLabelStrategy { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + banner = "Banner", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + overlapping = "Overlapping" + } + /** + * Specifies whether the series are by rows or by columns. In Excel on desktop, the "auto" option will inspect the source data shape to automatically guess whether the data is by rows or columns. In Excel on the web, "auto" will simply default to "columns". + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum ChartSeriesBy { + /** + * In Excel on desktop, the "auto" option will inspect the source data shape to automatically guess whether the data is by rows or columns. In Excel on the web, "auto" will simply default to "columns". + * @remarks + * [Api set: ExcelApi 1.1] + */ + auto = "Auto", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + columns = "Columns", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + rows = "Rows" + } + /** + * Specifies whether the series data range is local range, external range, list or unknown. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + enum ChartDataSourceType { + /** + * @remarks + * [Api set: ExcelApi 1.15] + */ + localRange = "LocalRange", + /** + * @remarks + * [Api set: ExcelApi 1.15] + */ + externalRange = "ExternalRange", + /** + * @remarks + * [Api set: ExcelApi 1.15] + */ + list = "List", + /** + * @remarks + * [Api set: ExcelApi 1.15] + */ + unknown = "Unknown" + } + /** + * Represents the horizontal alignment for the specified object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartTextHorizontalAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + right = "Right", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + justify = "Justify", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + distributed = "Distributed" + } + /** + * Represents the vertical alignment for the specified object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartTextVerticalAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + justify = "Justify", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + distributed = "Distributed" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ChartTickLabelAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + right = "Right" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum ChartType { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnClustered = "ColumnClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnStacked = "ColumnStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnStacked100 = "ColumnStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DColumnClustered = "3DColumnClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DColumnStacked = "3DColumnStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DColumnStacked100 = "3DColumnStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + barClustered = "BarClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + barStacked = "BarStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + barStacked100 = "BarStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DBarClustered = "3DBarClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DBarStacked = "3DBarStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DBarStacked100 = "3DBarStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + lineStacked = "LineStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + lineStacked100 = "LineStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + lineMarkers = "LineMarkers", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + lineMarkersStacked = "LineMarkersStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + lineMarkersStacked100 = "LineMarkersStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pieOfPie = "PieOfPie", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pieExploded = "PieExploded", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DPieExploded = "3DPieExploded", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + barOfPie = "BarOfPie", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + xyscatterSmooth = "XYScatterSmooth", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + xyscatterSmoothNoMarkers = "XYScatterSmoothNoMarkers", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + xyscatterLines = "XYScatterLines", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + xyscatterLinesNoMarkers = "XYScatterLinesNoMarkers", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + areaStacked = "AreaStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + areaStacked100 = "AreaStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DAreaStacked = "3DAreaStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DAreaStacked100 = "3DAreaStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + doughnutExploded = "DoughnutExploded", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + radarMarkers = "RadarMarkers", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + radarFilled = "RadarFilled", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + surface = "Surface", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + surfaceWireframe = "SurfaceWireframe", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + surfaceTopView = "SurfaceTopView", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + surfaceTopViewWireframe = "SurfaceTopViewWireframe", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + bubble = "Bubble", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + bubble3DEffect = "Bubble3DEffect", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + stockHLC = "StockHLC", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + stockOHLC = "StockOHLC", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + stockVHLC = "StockVHLC", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + stockVOHLC = "StockVOHLC", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderColClustered = "CylinderColClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderColStacked = "CylinderColStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderColStacked100 = "CylinderColStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderBarClustered = "CylinderBarClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderBarStacked = "CylinderBarStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderBarStacked100 = "CylinderBarStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderCol = "CylinderCol", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneColClustered = "ConeColClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneColStacked = "ConeColStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneColStacked100 = "ConeColStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneBarClustered = "ConeBarClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneBarStacked = "ConeBarStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneBarStacked100 = "ConeBarStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneCol = "ConeCol", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidColClustered = "PyramidColClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidColStacked = "PyramidColStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidColStacked100 = "PyramidColStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidBarClustered = "PyramidBarClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidBarStacked = "PyramidBarStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidBarStacked100 = "PyramidBarStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidCol = "PyramidCol", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DColumn = "3DColumn", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + line = "Line", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DLine = "3DLine", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DPie = "3DPie", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pie = "Pie", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + xyscatter = "XYScatter", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DArea = "3DArea", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + area = "Area", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + doughnut = "Doughnut", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + radar = "Radar", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + histogram = "Histogram", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + boxwhisker = "Boxwhisker", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + pareto = "Pareto", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + regionMap = "RegionMap", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + treemap = "Treemap", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + waterfall = "Waterfall", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + sunburst = "Sunburst", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + funnel = "Funnel" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum ChartUnderlineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + single = "Single" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ChartDisplayBlanksAs { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + notPlotted = "NotPlotted", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + zero = "Zero", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + interplotted = "Interplotted" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ChartPlotBy { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + rows = "Rows", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + columns = "Columns" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ChartSplitType { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitByPosition = "SplitByPosition", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitByValue = "SplitByValue", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitByPercentValue = "SplitByPercentValue", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitByCustomSplit = "SplitByCustomSplit" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ChartColorScheme { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + colorfulPalette1 = "ColorfulPalette1", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + colorfulPalette2 = "ColorfulPalette2", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + colorfulPalette3 = "ColorfulPalette3", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + colorfulPalette4 = "ColorfulPalette4", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette1 = "MonochromaticPalette1", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette2 = "MonochromaticPalette2", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette3 = "MonochromaticPalette3", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette4 = "MonochromaticPalette4", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette5 = "MonochromaticPalette5", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette6 = "MonochromaticPalette6", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette7 = "MonochromaticPalette7", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette8 = "MonochromaticPalette8", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette9 = "MonochromaticPalette9", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette10 = "MonochromaticPalette10", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette11 = "MonochromaticPalette11", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette12 = "MonochromaticPalette12", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette13 = "MonochromaticPalette13" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartTrendlineType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + linear = "Linear", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + exponential = "Exponential", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + logarithmic = "Logarithmic", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + movingAverage = "MovingAverage", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + polynomial = "Polynomial", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + power = "Power" + } + /** + * Specifies where in the z-order a shape should be moved relative to other shapes. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeZOrder { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bringToFront = "BringToFront", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bringForward = "BringForward", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + sendToBack = "SendToBack", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + sendBackward = "SendBackward" + } + /** + * Specifies the type of a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + unsupported = "Unsupported", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + image = "Image", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShape = "GeometricShape", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + group = "Group", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + line = "Line" + } + /** + * Specifies whether the shape is scaled relative to its original or current size. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeScaleType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + currentSize = "CurrentSize", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + originalSize = "OriginalSize" + } + /** + * Specifies which part of the shape retains its position when the shape is scaled. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeScaleFrom { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + scaleFromTopLeft = "ScaleFromTopLeft", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + scaleFromMiddle = "ScaleFromMiddle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + scaleFromBottomRight = "ScaleFromBottomRight" + } + /** + * Specifies a shape's fill type. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeFillType { + /** + * No fill. + * @remarks + * [Api set: ExcelApi 1.9] + */ + noFill = "NoFill", + /** + * Solid fill. + * @remarks + * [Api set: ExcelApi 1.9] + */ + solid = "Solid", + /** + * Gradient fill. + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradient = "Gradient", + /** + * Pattern fill. + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern = "Pattern", + /** + * Picture and texture fill. + * @remarks + * [Api set: ExcelApi 1.9] + */ + pictureAndTexture = "PictureAndTexture", + /** + * Mixed fill. + * @remarks + * [Api set: ExcelApi 1.9] + */ + mixed = "Mixed" + } + /** + * The type of underline applied to a font. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeFontUnderlineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + single = "Single", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + double = "Double", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + heavy = "Heavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dotted = "Dotted", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dottedHeavy = "DottedHeavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashHeavy = "DashHeavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashLong = "DashLong", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashLongHeavy = "DashLongHeavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dotDash = "DotDash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dotDashHeavy = "DotDashHeavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dotDotDash = "DotDotDash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dotDotDashHeavy = "DotDotDashHeavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wavy = "Wavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wavyHeavy = "WavyHeavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wavyDouble = "WavyDouble" + } + /** + * The format of the image. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PictureFormat { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + unknown = "UNKNOWN", + /** + * Bitmap image. + * @remarks + * [Api set: ExcelApi 1.9] + */ + bmp = "BMP", + /** + * Joint Photographic Experts Group. + * @remarks + * [Api set: ExcelApi 1.9] + */ + jpeg = "JPEG", + /** + * Graphics Interchange Format. + * @remarks + * [Api set: ExcelApi 1.9] + */ + gif = "GIF", + /** + * Portable Network Graphics. + * @remarks + * [Api set: ExcelApi 1.9] + */ + png = "PNG", + /** + * Scalable Vector Graphic. + * @remarks + * [Api set: ExcelApi 1.9] + */ + svg = "SVG" + } + /** + * The style for a line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeLineStyle { + /** + * Single line. + * @remarks + * [Api set: ExcelApi 1.9] + */ + single = "Single", + /** + * Thick line with a thin line on each side. + * @remarks + * [Api set: ExcelApi 1.9] + */ + thickBetweenThin = "ThickBetweenThin", + /** + * Thick line next to thin line. For horizontal lines, the thick line is above the thin line. For vertical lines, the thick line is to the left of the thin line. + * @remarks + * [Api set: ExcelApi 1.9] + */ + thickThin = "ThickThin", + /** + * Thick line next to thin line. For horizontal lines, the thick line is below the thin line. For vertical lines, the thick line is to the right of the thin line. + * @remarks + * [Api set: ExcelApi 1.9] + */ + thinThick = "ThinThick", + /** + * Two thin lines. + * @remarks + * [Api set: ExcelApi 1.9] + */ + thinThin = "ThinThin" + } + /** + * The dash style for a line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeLineDashStyle { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashDot = "DashDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashDotDot = "DashDotDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + longDash = "LongDash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + longDashDot = "LongDashDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + roundDot = "RoundDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + solid = "Solid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + squareDot = "SquareDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + longDashDotDot = "LongDashDotDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + systemDash = "SystemDash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + systemDot = "SystemDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + systemDashDot = "SystemDashDot" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ArrowheadLength { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + short = "Short", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + medium = "Medium", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + long = "Long" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ArrowheadStyle { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + triangle = "Triangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + stealth = "Stealth", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + diamond = "Diamond", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + oval = "Oval", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + open = "Open" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ArrowheadWidth { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + narrow = "Narrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + medium = "Medium", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wide = "Wide" + } + /** + * Available premium license types. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum PremiumLicenseName { + /** + * Use this for retrieving information about the Python premium license. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + python = "Python" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum BindingType { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + range = "Range", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + table = "Table", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + text = "Text" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum BorderIndex { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + edgeTop = "EdgeTop", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + edgeBottom = "EdgeBottom", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + edgeLeft = "EdgeLeft", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + edgeRight = "EdgeRight", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + insideVertical = "InsideVertical", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + insideHorizontal = "InsideHorizontal", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + diagonalDown = "DiagonalDown", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + diagonalUp = "DiagonalUp" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum BorderLineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + continuous = "Continuous", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + dashDot = "DashDot", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + dashDotDot = "DashDotDot", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + dot = "Dot", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + double = "Double", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + slantDashDot = "SlantDashDot" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum BorderWeight { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + hairline = "Hairline", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + thin = "Thin", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + medium = "Medium", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + thick = "Thick" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum CalculationMode { + /** + * The default recalculation behavior where Excel calculates new formula results every time the relevant data is changed. + * @remarks + * [Api set: ExcelApi 1.1] + */ + automatic = "Automatic", + /** + * Calculates new formula results every time the relevant data is changed, unless the formula is in a data table. + * @remarks + * [Api set: ExcelApi 1.1] + */ + automaticExceptTables = "AutomaticExceptTables", + /** + * Calculations only occur when the user or add-in requests them. + * @remarks + * [Api set: ExcelApi 1.1] + */ + manual = "Manual" + } + /** + * @remarks + * [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. + * @remarks + * [Api set: ExcelApi 1.1] + */ + recalculate = "Recalculate", + /** + * This will mark all cells as dirty and then recalculate them. + * @remarks + * [Api set: ExcelApi 1.1] + */ + full = "Full", + /** + * This will rebuild the full dependency chain, mark all cells as dirty and then recalculate them. + * @remarks + * [Api set: ExcelApi 1.1] + */ + fullRebuild = "FullRebuild" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum ClearApplyTo { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + all = "All", + /** + * Clears all formatting for the range. + * @remarks + * [Api set: ExcelApi 1.1] + */ + formats = "Formats", + /** + * Clears the contents of the range. + * @remarks + * [Api set: ExcelApi 1.1] + */ + contents = "Contents", + /** + * Clears all hyperlinks, but leaves all content and formatting intact. + * @remarks + * [Api set: ExcelApi 1.7] + */ + hyperlinks = "Hyperlinks", + /** + * Removes hyperlinks and formatting for the cell but leaves content, conditional formats, and data validation intact. + * @remarks + * [Api set: ExcelApi 1.7] + */ + removeHyperlinks = "RemoveHyperlinks" + } + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + enum VisualCategory { + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + column = "Column", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + bar = "Bar", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + line = "Line", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + area = "Area", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + pie = "Pie", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + donut = "Donut", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + scatter = "Scatter", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + bubble = "Bubble", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + statistical = "Statistical", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + stock = "Stock", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + combo = "Combo", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + hierarchy = "Hierarchy", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + surface = "Surface", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + map = "Map", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + funnel = "Funnel", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + radar = "Radar", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + waterfall = "Waterfall", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + threeD = "ThreeD", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + other = "Other" + } + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + enum VisualPropertyType { + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + object = "Object", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + collection = "Collection", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + string = "String", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + double = "Double", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + int = "Int", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + bool = "Bool", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + enum = "Enum", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + color = "Color" + } + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + enum VisualChangeType { + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + dataChange = "DataChange", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + propertyChange = "PropertyChange", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + genericChange = "GenericChange", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + selectionChange = "SelectionChange" + } + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + enum BoolMetaPropertyType { + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + writeOnly = "WriteOnly", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly = "ReadOnly", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + hideEntireSubtreeUI = "HideEntireSubtreeUI", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + hideMeButShowChildrenUI = "HideMeButShowChildrenUI", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + expandableUI = "ExpandableUI", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + nextPropOnSameLine = "NextPropOnSameLine", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + hideLabel = "HideLabel", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + showResetUI = "ShowResetUI", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + hasOwnExpandableSection = "HasOwnExpandableSection", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + nextPropOnSameLineFOTP = "NextPropOnSameLineFOTP", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + showResetUIFOTP = "ShowResetUIFOTP", + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + untransferable = "Untransferable", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + ignoreDuringChangeChartType = "IgnoreDuringChangeChartType", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + notTriviallyUndoable = "NotTriviallyUndoable", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + volatileEnum = "VolatileEnum", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + exceptionCollection = "ExceptionCollection", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + metaOnly = "MetaOnly", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + showHideCollection = "ShowHideCollection", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + errorMessage = "ErrorMessage", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + infoMessage = "InfoMessage" + } + /** + * Represents the format options for a data bar axis. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalDataBarAxisFormat { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + cellMidPoint = "CellMidPoint" + } + /** + * Represents the data bar direction within a cell. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalDataBarDirection { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + context = "Context", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + leftToRight = "LeftToRight", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + rightToLeft = "RightToLeft" + } + /** + * Represents the direction for a selection. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatDirection { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + bottom = "Bottom" + } + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatType { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + custom = "Custom", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBar = "DataBar", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScale = "ColorScale", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSet = "IconSet", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottom = "TopBottom", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + presetCriteria = "PresetCriteria", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + containsText = "ContainsText", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + cellValue = "CellValue" + } + /** + * Represents the types of conditional format values. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatRuleType { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lowestValue = "LowestValue", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + highestValue = "HighestValue", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + number = "Number", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + percent = "Percent", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula = "Formula", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + percentile = "Percentile" + } + /** + * Represents the types of icon conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatIconRuleType { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + number = "Number", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + percent = "Percent", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula = "Formula", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + percentile = "Percentile" + } + /** + * Represents the types of color criterion for conditional formatting. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatColorCriterionType { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lowestValue = "LowestValue", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + highestValue = "HighestValue", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + number = "Number", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + percent = "Percent", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula = "Formula", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + percentile = "Percentile" + } + /** + * Represents the criteria for the above/below average conditional format type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalTopBottomCriterionType { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + topItems = "TopItems", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + topPercent = "TopPercent", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + bottomItems = "BottomItems", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + bottomPercent = "BottomPercent" + } + /** + * Represents the criteria of the preset criteria conditional format type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatPresetCriterion { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + blanks = "Blanks", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + nonBlanks = "NonBlanks", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + errors = "Errors", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + nonErrors = "NonErrors", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + yesterday = "Yesterday", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + today = "Today", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + tomorrow = "Tomorrow", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lastSevenDays = "LastSevenDays", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lastWeek = "LastWeek", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + thisWeek = "ThisWeek", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + nextWeek = "NextWeek", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lastMonth = "LastMonth", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + thisMonth = "ThisMonth", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + nextMonth = "NextMonth", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + aboveAverage = "AboveAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + belowAverage = "BelowAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + equalOrAboveAverage = "EqualOrAboveAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + equalOrBelowAverage = "EqualOrBelowAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + oneStdDevAboveAverage = "OneStdDevAboveAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + oneStdDevBelowAverage = "OneStdDevBelowAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + twoStdDevAboveAverage = "TwoStdDevAboveAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + twoStdDevBelowAverage = "TwoStdDevBelowAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + threeStdDevAboveAverage = "ThreeStdDevAboveAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + threeStdDevBelowAverage = "ThreeStdDevBelowAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + uniqueValues = "UniqueValues", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + duplicateValues = "DuplicateValues" + } + /** + * Represents the operator of the text conditional format type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalTextOperator { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + contains = "Contains", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + notContains = "NotContains", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + beginsWith = "BeginsWith", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + endsWith = "EndsWith" + } + /** + * Represents the operator of the text conditional format type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalCellValueOperator { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + between = "Between", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + notBetween = "NotBetween", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + equalTo = "EqualTo", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + notEqualTo = "NotEqualTo", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + greaterThan = "GreaterThan", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lessThan = "LessThan", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + greaterThanOrEqual = "GreaterThanOrEqual", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lessThanOrEqual = "LessThanOrEqual" + } + /** + * Represents the operator for each icon criteria. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalIconCriterionOperator { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + greaterThan = "GreaterThan", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + greaterThanOrEqual = "GreaterThanOrEqual" + } + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalRangeBorderIndex { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + edgeTop = "EdgeTop", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + edgeBottom = "EdgeBottom", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + edgeLeft = "EdgeLeft", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + edgeRight = "EdgeRight" + } + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalRangeBorderLineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + continuous = "Continuous", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + dashDot = "DashDot", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + dashDotDot = "DashDotDot", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + dot = "Dot" + } + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalRangeFontUnderlineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + single = "Single", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + double = "Double" + } + /** + * Represents the data validation type enum. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum DataValidationType { + /** + * None means allow any value, indicating that there is no data validation in the range. + * @remarks + * [Api set: ExcelApi 1.8] + */ + none = "None", + /** + * The whole number data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + wholeNumber = "WholeNumber", + /** + * The decimal data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + decimal = "Decimal", + /** + * The list data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + list = "List", + /** + * The date data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + date = "Date", + /** + * The time data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + time = "Time", + /** + * The text length data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + textLength = "TextLength", + /** + * The custom data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + custom = "Custom", + /** + * Inconsistent means that the range has inconsistent data validation, indicating that there are different rules on different cells. + * @remarks + * [Api set: ExcelApi 1.8] + */ + inconsistent = "Inconsistent", + /** + * Mixed criteria means that the range has data validation present on some but not all cells. + * @remarks + * [Api set: ExcelApi 1.8] + */ + mixedCriteria = "MixedCriteria" + } + /** + * Represents the data validation operator enum. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum DataValidationOperator { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + between = "Between", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + notBetween = "NotBetween", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + equalTo = "EqualTo", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + notEqualTo = "NotEqualTo", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + greaterThan = "GreaterThan", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + lessThan = "LessThan", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + greaterThanOrEqualTo = "GreaterThanOrEqualTo", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + lessThanOrEqualTo = "LessThanOrEqualTo" + } + /** + * Represents the data validation error alert style. The default is `Stop`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum DataValidationAlertStyle { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + stop = "Stop", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + warning = "Warning", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + information = "Information" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum DeleteShiftDirection { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + up = "Up", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + left = "Left" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum DynamicFilterCriteria { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + aboveAverage = "AboveAverage", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodApril = "AllDatesInPeriodApril", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodAugust = "AllDatesInPeriodAugust", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodDecember = "AllDatesInPeriodDecember", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodFebruray = "AllDatesInPeriodFebruray", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodJanuary = "AllDatesInPeriodJanuary", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodJuly = "AllDatesInPeriodJuly", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodJune = "AllDatesInPeriodJune", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodMarch = "AllDatesInPeriodMarch", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodMay = "AllDatesInPeriodMay", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodNovember = "AllDatesInPeriodNovember", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodOctober = "AllDatesInPeriodOctober", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodQuarter1 = "AllDatesInPeriodQuarter1", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodQuarter2 = "AllDatesInPeriodQuarter2", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodQuarter3 = "AllDatesInPeriodQuarter3", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodQuarter4 = "AllDatesInPeriodQuarter4", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodSeptember = "AllDatesInPeriodSeptember", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + belowAverage = "BelowAverage", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + lastMonth = "LastMonth", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + lastQuarter = "LastQuarter", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + lastWeek = "LastWeek", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + lastYear = "LastYear", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + nextMonth = "NextMonth", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + nextQuarter = "NextQuarter", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + nextWeek = "NextWeek", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + nextYear = "NextYear", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + thisMonth = "ThisMonth", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + thisQuarter = "ThisQuarter", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + thisWeek = "ThisWeek", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + thisYear = "ThisYear", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + today = "Today", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + tomorrow = "Tomorrow", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + yearToDate = "YearToDate", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + yesterday = "Yesterday" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum FilterDatetimeSpecificity { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + year = "Year", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + month = "Month", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + day = "Day", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + hour = "Hour", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + minute = "Minute", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + second = "Second" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum FilterOn { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + bottomItems = "BottomItems", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + bottomPercent = "BottomPercent", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + cellColor = "CellColor", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + dynamic = "Dynamic", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fontColor = "FontColor", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + values = "Values", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + topItems = "TopItems", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + topPercent = "TopPercent", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + icon = "Icon", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + custom = "Custom" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum FilterOperator { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + and = "And", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + or = "Or" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum HorizontalAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + general = "General", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + right = "Right", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + fill = "Fill", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + justify = "Justify", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + centerAcrossSelection = "CenterAcrossSelection", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + distributed = "Distributed" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum IconSet { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeArrows = "ThreeArrows", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeArrowsGray = "ThreeArrowsGray", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeFlags = "ThreeFlags", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeTrafficLights1 = "ThreeTrafficLights1", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeTrafficLights2 = "ThreeTrafficLights2", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeSigns = "ThreeSigns", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeSymbols = "ThreeSymbols", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeSymbols2 = "ThreeSymbols2", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fourArrows = "FourArrows", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fourArrowsGray = "FourArrowsGray", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fourRedToBlack = "FourRedToBlack", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fourRating = "FourRating", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fourTrafficLights = "FourTrafficLights", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fiveArrows = "FiveArrows", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fiveArrowsGray = "FiveArrowsGray", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fiveRating = "FiveRating", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fiveQuarters = "FiveQuarters", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeStars = "ThreeStars", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeTriangles = "ThreeTriangles", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fiveBoxes = "FiveBoxes" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum ImageFittingMode { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fit = "Fit", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fitAndCenter = "FitAndCenter", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fill = "Fill" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum InsertShiftDirection { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + down = "Down", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + right = "Right" + } + /** + * @remarks + * [Api set: ExcelApi 1.4] + */ + enum NamedItemScope { + /** + * @remarks + * [Api set: ExcelApi 1.4] + */ + worksheet = "Worksheet", + /** + * @remarks + * [Api set: ExcelApi 1.4] + */ + workbook = "Workbook" + } + /** + * @remarks + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + */ + enum NamedItemType { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + string = "String", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + integer = "Integer", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + double = "Double", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + boolean = "Boolean", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + range = "Range", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + error = "Error", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + array = "Array" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum RangeUnderlineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + single = "Single", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + double = "Double", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + singleAccountant = "SingleAccountant", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + doubleAccountant = "DoubleAccountant" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum SheetVisibility { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible = "Visible", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + hidden = "Hidden", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + veryHidden = "VeryHidden" + } + /** + * @remarks + * [Api set: ExcelApi 1.14] + */ + enum EventTriggerSource { + /** + * The event trigger source is unknown or currently unsupported. + * @remarks + * [Api set: ExcelApi 1.14] + */ + unknown = "Unknown", + /** + * The event is triggered by the Office JS API of the current add-in. + * @remarks + * [Api set: ExcelApi 1.14] + */ + thisLocalAddin = "ThisLocalAddin" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum RangeValueType { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + empty = "Empty", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + string = "String", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + integer = "Integer", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + double = "Double", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + boolean = "Boolean", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + error = "Error", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + richValue = "RichValue" + } + /** + * @remarks + * [Api set: ExcelApi 1.13] + */ + enum KeyboardDirection { + /** + * @remarks + * [Api set: ExcelApi 1.13] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.13] + */ + right = "Right", + /** + * @remarks + * [Api set: ExcelApi 1.13] + */ + up = "Up", + /** + * @remarks + * [Api set: ExcelApi 1.13] + */ + down = "Down" + } + /** + * Specifies the search direction. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum SearchDirection { + /** + * Search in forward order. + * @remarks + * [Api set: ExcelApi 1.9] + */ + forward = "Forward", + /** + * Search in reverse order. + * @remarks + * [Api set: ExcelApi 1.9] + */ + backwards = "Backwards" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum SortOrientation { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + rows = "Rows", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + columns = "Columns" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum SortOn { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + value = "Value", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + cellColor = "CellColor", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fontColor = "FontColor", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + icon = "Icon" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum SortDataOption { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + normal = "Normal", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + textAsNumber = "TextAsNumber" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum SortMethod { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + pinYin = "PinYin", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + strokeCount = "StrokeCount" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum VerticalAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + justify = "Justify", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + distributed = "Distributed" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum DocumentPropertyType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + number = "Number", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + boolean = "Boolean", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + date = "Date", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + string = "String", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + float = "Float" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum EventSource { + /** + * Local means the event comes from a local user session. + * @remarks + * [Api set: ExcelApi 1.7] + */ + local = "Local", + /** + * Remote means the event comes from a remote user session. + * @remarks + * [Api set: ExcelApi 1.7] + */ + remote = "Remote" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum DataChangeType { + /** + * `Unknown` indicates that the type of data change is not one of the listed types. + * @remarks + * [Api set: ExcelApi 1.8. The name of this value was 'Others' in ExcelApi 1.7] + */ + unknown = "Unknown", + /** + * `RangeEdited` indicates that the data change event is triggered by a range being edited. + * @remarks + * [Api set: ExcelApi 1.7] + */ + rangeEdited = "RangeEdited", + /** + * `RowInserted` indicates that the data change event is triggered by inserting new rows. + * @remarks + * [Api set: ExcelApi 1.7] + */ + rowInserted = "RowInserted", + /** + * `RowDeleted` indicates that the data change event is triggered by deleting rows. + * @remarks + * [Api set: ExcelApi 1.7] + */ + rowDeleted = "RowDeleted", + /** + * `ColumnInserted` indicates that the data change event is triggered by inserting new columns. + * @remarks + * [Api set: ExcelApi 1.7] + */ + columnInserted = "ColumnInserted", + /** + * `ColumnDeleted` indicates that the data change event is triggered by deleting columns. + * @remarks + * [Api set: ExcelApi 1.7] + */ + columnDeleted = "ColumnDeleted", + /** + * `CellInserted` indicates that the data change event is triggered by inserting new cells. + * @remarks + * [Api set: ExcelApi 1.7] + */ + cellInserted = "CellInserted", + /** + * `CellDeleted` indicates that the data change event is triggered by deleting cells. + * @remarks + * [Api set: ExcelApi 1.7] + */ + cellDeleted = "CellDeleted" + } + /** + * @remarks + * [Api set: ExcelApi 1.11] + */ + enum RowHiddenChangeType { + /** + * `Unhidden` indicates that the row is not hidden. + * @remarks + * [Api set: ExcelApi 1.11] + */ + unhidden = "Unhidden", + /** + * `Hidden` indicates that the row is hidden. + * @remarks + * [Api set: ExcelApi 1.11] + */ + hidden = "Hidden" + } + /** + * Represents how the comments in the event were changed. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum CommentChangeType { + /** + * Comments were edited. + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentEdited = "CommentEdited", + /** + * Comments were resolved. + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentResolved = "CommentResolved", + /** + * Comments were reopened. + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentReopened = "CommentReopened", + /** + * Replies were added. + * @remarks + * [Api set: ExcelApi 1.12] + */ + replyAdded = "ReplyAdded", + /** + * Replies were deleted. + * @remarks + * [Api set: ExcelApi 1.12] + */ + replyDeleted = "ReplyDeleted", + /** + * Replies were edited. + * @remarks + * [Api set: ExcelApi 1.12] + */ + replyEdited = "ReplyEdited" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum EventType { + /** + * `WorksheetChanged` represents the type of event registered on a `Worksheet` or `WorksheetCollection` and occurs when data changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetChanged = "WorksheetChanged", + /** + * `WorksheetSelectionChanged` represents the type of event registered on a `Worksheet` and occurs when the selection changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetSelectionChanged = "WorksheetSelectionChanged", + /** + * `WorksheetAdded` represents the type of event registered on a `WorksheetCollection` and occurs when a new worksheet is added to the workbook. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetAdded = "WorksheetAdded", + /** + * `WorksheetActivated` represents the type of event registered on a `Worksheet` or `WorksheetCollection` and occurs when a worksheet activates. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetActivated = "WorksheetActivated", + /** + * `WorksheetDeactivated` represents the type of event registered on a `Worksheet` or `WorksheetCollection` and occurs when a worksheet deactivates. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetDeactivated = "WorksheetDeactivated", + /** + * `TableChanged` represents the type of event registered on a `Table` and occurs when data changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableChanged = "TableChanged", + /** + * `TableSelectionChanged` represents the type of event registered on a `Table` and occurs when the selection changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableSelectionChanged = "TableSelectionChanged", + /** + * `WorksheetDeleted` represents the type of event registered on a `WorksheetCollection` and occurs when a worksheet is deleted from the workbook. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetDeleted = "WorksheetDeleted", + /** + * `ChartAdded` represents the type of event registered on a `ChartCollection` and occurs when a new chart is added to the worksheet. + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartAdded = "ChartAdded", + /** + * `ChartActivated` represents the type of event registered on a `Chart` or `ChartCollection` and occurs when a chart activates. + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartActivated = "ChartActivated", + /** + * `ChartDeactivated` represents the type of event registered on a `Chart` or `ChartCollection` and occurs when a chart deactivates. + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartDeactivated = "ChartDeactivated", + /** + * `ChartDeleted` represents the type of event registered on a `ChartCollection` and occurs when a chart is deleted from the worksheet. + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartDeleted = "ChartDeleted", + /** + * `WorksheetCalculated` represents the type of event registered on a `Worksheet` or `WorksheetCollection` and occurs when a worksheet is calculated. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetCalculated = "WorksheetCalculated", + /** + * `VisualSelectionChanged` represents the type of event registered on a `VisualCollection` and occurs when the visual selection changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + 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. + * @remarks + * [Api set: ExcelApi 1.7] + */ + agaveVisualUpdate = "AgaveVisualUpdate", + /** + * `TableAdded` represents the type of event registered on a `TableCollection` and occurs when a table is added. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableAdded = "TableAdded", + /** + * `TableDeleted` represents the type of event that is registered on a `TableCollection` and occurs when a table is deleted. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableDeleted = "TableDeleted", + /** + * `TableFiltered` represents the type of event registered on a table or `TableCollection` and occurs when the data of a table is filtered. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableFiltered = "TableFiltered", + /** + * `WorksheetFiltered` represents the type of event registered on a worksheet or `WorksheetCollection` and occurs when the data of an AutoFilter in the worksheet is filtered. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetFiltered = "WorksheetFiltered", + /** + * `ShapeActivated` represents the type of event that is registered on a `Shape` and occurs when the shape activates. + * @remarks + * [Api set: ExcelApi 1.7] + */ + shapeActivated = "ShapeActivated", + /** + * `ShapeDeactivated` represents the type of event that is registered on a `Shape` and occurs when the shape deactivates. + * @remarks + * [Api set: ExcelApi 1.7] + */ + shapeDeactivated = "ShapeDeactivated", + /** + * `VisualChange` represents the type of event registered on a `Visual` and occurs when there is a visual change. + * @remarks + * [Api set: ExcelApi 1.7] + */ + visualChange = "VisualChange", + /** + * `WorkbookAutoSaveSettingChanged` represents the type of event registered on a workbook and occurs when there is an auto save setting change. + * @remarks + * [Api set: ExcelApi 1.7] + */ + workbookAutoSaveSettingChanged = "WorkbookAutoSaveSettingChanged", + /** + * `WorksheetFormatChanged` represents the type of event registered on a worksheet and occurs when a format is changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetFormatChanged = "WorksheetFormatChanged", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + wacoperationEvent = "WACOperationEvent", + /** + * `RibbonCommandExecuted` represents the type of event registered on the ribbon and occurs when a user clicks on the ribbon + * @remarks + * [Api set: ExcelApi 1.7] + */ + ribbonCommandExecuted = "RibbonCommandExecuted", + /** + * `WorksheetRowSorted` represents the type of event registered on a worksheet and occurs when rows are sorted. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetRowSorted = "WorksheetRowSorted", + /** + * `WorksheetColumnSorted` represents the type of event registered on a worksheet and occurs columns are sorted. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetColumnSorted = "WorksheetColumnSorted", + /** + * `WorksheetSingleClicked` represents the type of event registered on a worksheet and occurs when a cell is left-clicked or tapped. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetSingleClicked = "WorksheetSingleClicked", + /** + * `WorksheetRowHiddenChanged` represents the type of event registered on a worksheet and occurs when a row's hidden state is changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetRowHiddenChanged = "WorksheetRowHiddenChanged", + /** + * `RecordingStateChangedEvent` represents the event fired when macro recording starts or stops. + * @remarks + * [Api set: ExcelApi 1.7] + */ + recordingStateChangedEvent = "RecordingStateChangedEvent", + /** + * `CommentAdded` represents the type of event that is registered on a comment collection and occurs when comments are added. + * @remarks + * [Api set: ExcelApi 1.7] + */ + commentAdded = "CommentAdded", + /** + * `CommentDeleted` represents the type of event that is registered on a comment collection and occurs when comments are deleted. + * @remarks + * [Api set: ExcelApi 1.7] + */ + commentDeleted = "CommentDeleted", + /** + * `CommentChanged` represents the type of event that is registered on a comment collection and occurs when comments are changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + commentChanged = "CommentChanged", + /** + * `RefreshRequestCompleted` represents the type of event registered on a `LinkedDataType` and occurs when a request to refresh a data source is completed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + linkedDataTypeRefreshRequestCompleted = "LinkedDataTypeRefreshRequestCompleted", + /** + * `RefreshModeChanged` represents the type of event registered on a `LinkedDataType` and occurs when the linked data type refresh mode is changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + linkedDataTypeRefreshModeChanged = "LinkedDataTypeRefreshModeChanged", + /** + * `LinkedDataTypeAdded` represents the type of event registered on a `LinkedDataType` and occurs when a new linked data type is added to the workbook. + * @remarks + * [Api set: ExcelApi 1.7] + */ + linkedDataTypeLinkedDataTypeAdded = "LinkedDataTypeLinkedDataTypeAdded", + /** + * `WorksheetFormulaChanged` represents the type of event registered on a worksheet and occurs when a formula is changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetFormulaChanged = "WorksheetFormulaChanged", + /** + * `WorkbookActivated` represents the type of event which is fired when a workbook is activated. + * @remarks + * [Api set: ExcelApi 1.7] + */ + workbookActivated = "WorkbookActivated", + /** + * `WorkbookLinksChanged` represents the type of event which is fired when a workbook link is changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + linkedWorkbookWorkbookLinksChanged = "LinkedWorkbookWorkbookLinksChanged", + /** + * `WorkbookLinksRefreshCompleted` represents the type of event registered on a linked Workbook and occurs when a linked workbook completes a refresh. + * @remarks + * [Api set: ExcelApi 1.7] + */ + linkedWorkbookRefreshCompleted = "LinkedWorkbookRefreshCompleted", + /** + * WorksheetProtectionChanged represents the type of event registered on worksheet, and occurs when protection status is changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetProtectionChanged = "WorksheetProtectionChanged", + /** + * WorksheetNameChanged represents the type of event registered on a worksheet that occurs when its name changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetNameChanged = "WorksheetNameChanged", + /** + * WorksheetVisibilityChanged represents the type of event registered on a worksheet that occurs when its visibility changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetVisibilityChanged = "WorksheetVisibilityChanged", + /** + * WorksheetMoved represents the type of event registered on a worksheet that occurs when it is moved within a workbook. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetMoved = "WorksheetMoved", + /** + * LineageActivityUpdateAvailable represents the type of event registered when new revision updates lineage model. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + lineageActivityUpdateAvailable = "LineageActivityUpdateAvailable", + /** + * LineageActivityFilterUpdated represents the type of event registered when lineage filter is updated. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + lineageActivityFilterUpdated = "LineageActivityFilterUpdated", + /** + * LineageActivityLoadCompleted represents the type of event registered UserActivities are loaded by lineage mode. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + lineageActivityLoadCompleted = "LineageActivityLoadCompleted", + /** + * ShapeAdded represents the type of event registered when a shape has been added to a ShapeCollection. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + shapeAdded = "ShapeAdded", + /** + * ShapeDeleted represents the type of event registered when a shape has been deleted from a ShapeCollection. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + shapeDeleted = "ShapeDeleted", + /** + * PivotTableAdded represents the type of event registered when a PivotTable has been added to a PivotTableCollection. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + pivotTableAdded = "PivotTableAdded", + /** + * PivotTableDeleted represents the type of event registered when a PivotTable has been deleted from a PivotTableCollection. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + pivotTableDeleted = "PivotTableDeleted", + /** + * NamedItemAdded represents the type of event registered when a NamedItem has been added to a NamedItemCollection. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + namedItemAdded = "NamedItemAdded", + /** + * NamedItemDeleted represents the type of event registered when a NamedItem has been deleted from a NamedItemCollection. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + namedItemDeleted = "NamedItemDeleted", + /** + * WorksheetNavigationObjectChanged represents the type of event registered when a navigation object has changed on a worksheet. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + worksheetNavigationObjectChanged = "WorksheetNavigationObjectChanged", + /** + * WorkbookNavigationObjectChanged represents the type of event registered when a navigation object has changed on a workbook. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + workbookNavigationObjectChanged = "WorkbookNavigationObjectChanged", + /** + * WorksheetRowHeightChanged represents the type of event registered when the height of a worksheet row is changed. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetRowHeightChanged = "WorksheetRowHeightChanged", + /** + * WorkbookFormulaReferenceStyleChanged represents the type of event registered when the formula refence style has changed on a workbook. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + workbookFormulaReferenceStyleChanged = "WorkbookFormulaReferenceStyleChanged", + /** + * GuidedReapplyManagerUpdateAvailable represents the type of event registered when a new revision is created on the workbook after a coauthoring error. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + guidedReapplyManagerUpdateAvailable = "GuidedReapplyManagerUpdateAvailable", + /** + * Deprecated + VbaRecorderRecordingChanged represents the type of event registered when the VBA recording output changes. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + vbaRecorderRecordingChanged = "VbaRecorderRecordingChanged", + /** + * RangeValuesPreviewDismissed represents the type of event registered when a RangeValuePreview is dismissed. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rangeValuesPreviewDismissed = "RangeValuesPreviewDismissed", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + annotationAdded = "AnnotationAdded", + /** + * Workbook Action Recorded represents the type of event registered when the workbook records an action. + * @remarks + * [Api set: Recorder 1.1] + */ + workbookActionRecorded = "WorkbookActionRecorded", + /** + * UndoChanged represents the type of event registered when the undo or redo stack is modified + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + applicationUndoChanged = "ApplicationUndoChanged", + /** + * VbaRecorderRecordingChanged represents the type of event registered when the VBA recording output changes. + * @remarks + * [Api set: Recorder 1.1] + */ + vbaRecorderRecordingChanged2 = "VbaRecorderRecordingChanged2" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum DocumentPropertyItem { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + title = "Title", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + subject = "Subject", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + author = "Author", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + keywords = "Keywords", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + comments = "Comments", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + template = "Template", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + lastAuth = "LastAuth", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + revision = "Revision", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + appName = "AppName", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + lastPrint = "LastPrint", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + creation = "Creation", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + lastSave = "LastSave", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + category = "Category", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + format = "Format", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + manager = "Manager", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + company = "Company" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum SubtotalLocationType { + /** + * Subtotals are at the top. + * @remarks + * [Api set: ExcelApi 1.8] + */ + atTop = "AtTop", + /** + * Subtotals are at the bottom. + * @remarks + * [Api set: ExcelApi 1.8] + */ + atBottom = "AtBottom", + /** + * Subtotals are off. + * @remarks + * [Api set: ExcelApi 1.8] + */ + off = "Off" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum PivotLayoutType { + /** + * A horizontally compressed form with labels from the next field in the same column. + * @remarks + * [Api set: ExcelApi 1.8] + */ + compact = "Compact", + /** + * Inner fields' items are always on a new line relative to the outer fields' items. + * @remarks + * [Api set: ExcelApi 1.8] + */ + tabular = "Tabular", + /** + * Inner fields' items are on same row as outer fields' items and subtotals are always on the bottom. + * @remarks + * [Api set: ExcelApi 1.8] + */ + outline = "Outline" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ProtectionSelectionMode { + /** + * Selection is allowed for all cells. + * @remarks + * [Api set: ExcelApi 1.7] + */ + normal = "Normal", + /** + * Selection is allowed only for cells that are not locked. + * @remarks + * [Api set: ExcelApi 1.7] + */ + unlocked = "Unlocked", + /** + * Selection is not allowed for any cells. + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum PageOrientation { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + portrait = "Portrait", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + landscape = "Landscape" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PaperType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + letter = "Letter", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + letterSmall = "LetterSmall", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + tabloid = "Tabloid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + ledger = "Ledger", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + legal = "Legal", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + statement = "Statement", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + executive = "Executive", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + a3 = "A3", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + a4 = "A4", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + a4Small = "A4Small", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + a5 = "A5", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + b4 = "B4", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + b5 = "B5", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + folio = "Folio", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + quatro = "Quatro", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + paper10x14 = "Paper10x14", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + paper11x17 = "Paper11x17", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + note = "Note", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelope9 = "Envelope9", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelope10 = "Envelope10", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelope11 = "Envelope11", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelope12 = "Envelope12", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelope14 = "Envelope14", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + csheet = "Csheet", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dsheet = "Dsheet", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + esheet = "Esheet", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeDL = "EnvelopeDL", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeC5 = "EnvelopeC5", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeC3 = "EnvelopeC3", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeC4 = "EnvelopeC4", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeC6 = "EnvelopeC6", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeC65 = "EnvelopeC65", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeB4 = "EnvelopeB4", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeB5 = "EnvelopeB5", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeB6 = "EnvelopeB6", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeItaly = "EnvelopeItaly", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeMonarch = "EnvelopeMonarch", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopePersonal = "EnvelopePersonal", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + fanfoldUS = "FanfoldUS", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + fanfoldStdGerman = "FanfoldStdGerman", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + fanfoldLegalGerman = "FanfoldLegalGerman" + } + /** + * @remarks + * [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. + * @remarks + * [Api set: ExcelApi 1.7] + */ + context = "Context", + /** + * Left to right reading order + * @remarks + * [Api set: ExcelApi 1.7] + */ + leftToRight = "LeftToRight", + /** + * Right to left reading order + * @remarks + * [Api set: ExcelApi 1.7] + */ + rightToLeft = "RightToLeft" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum BuiltInStyle { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + normal = "Normal", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + comma = "Comma", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + currency = "Currency", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + percent = "Percent", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + wholeComma = "WholeComma", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + wholeDollar = "WholeDollar", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + hlink = "Hlink", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + hlinkTrav = "HlinkTrav", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + note = "Note", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + warningText = "WarningText", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + emphasis1 = "Emphasis1", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + emphasis2 = "Emphasis2", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + emphasis3 = "Emphasis3", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + sheetTitle = "SheetTitle", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + heading1 = "Heading1", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + heading2 = "Heading2", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + heading3 = "Heading3", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + heading4 = "Heading4", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + input = "Input", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + output = "Output", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + calculation = "Calculation", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + checkCell = "CheckCell", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + linkedCell = "LinkedCell", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + total = "Total", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + good = "Good", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + bad = "Bad", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + neutral = "Neutral", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent1 = "Accent1", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent1_20 = "Accent1_20", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent1_40 = "Accent1_40", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent1_60 = "Accent1_60", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent2 = "Accent2", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent2_20 = "Accent2_20", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent2_40 = "Accent2_40", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent2_60 = "Accent2_60", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent3 = "Accent3", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent3_20 = "Accent3_20", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent3_40 = "Accent3_40", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent3_60 = "Accent3_60", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent4 = "Accent4", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent4_20 = "Accent4_20", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent4_40 = "Accent4_40", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent4_60 = "Accent4_60", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent5 = "Accent5", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent5_20 = "Accent5_20", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent5_40 = "Accent5_40", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent5_60 = "Accent5_60", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent6 = "Accent6", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent6_20 = "Accent6_20", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent6_40 = "Accent6_40", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent6_60 = "Accent6_60", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + explanatoryText = "ExplanatoryText" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PrintErrorType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + asDisplayed = "AsDisplayed", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + blank = "Blank", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + notAvailable = "NotAvailable" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum WorksheetPositionType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + before = "Before", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + after = "After", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + beginning = "Beginning", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + end = "End" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PrintComments { + /** + * Comments will not be printed. + * @remarks + * [Api set: ExcelApi 1.9] + */ + noComments = "NoComments", + /** + * Comments will be printed as end notes at the end of the worksheet. + * @remarks + * [Api set: ExcelApi 1.9] + */ + endSheet = "EndSheet", + /** + * Comments will be printed where they were inserted in the worksheet. + * @remarks + * [Api set: ExcelApi 1.9] + */ + inPlace = "InPlace" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PrintOrder { + /** + * Process down the rows before processing across pages or page fields to the right. + * @remarks + * [Api set: ExcelApi 1.9] + */ + downThenOver = "DownThenOver", + /** + * Process across pages or page fields to the right before moving down the rows. + * @remarks + * [Api set: ExcelApi 1.9] + */ + overThenDown = "OverThenDown" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PrintMarginUnit { + /** + * Assign the page margins in points. A point is 1/72 of an inch. + * @remarks + * [Api set: ExcelApi 1.9] + */ + points = "Points", + /** + * Assign the page margins in inches. + * @remarks + * [Api set: ExcelApi 1.9] + */ + inches = "Inches", + /** + * Assign the page margins in centimeters. + * @remarks + * [Api set: ExcelApi 1.9] + */ + centimeters = "Centimeters" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum HeaderFooterState { + /** + * Only one general header/footer is used for all pages printed. + * @remarks + * [Api set: ExcelApi 1.9] + */ + default = "Default", + /** + * There is a separate first page header/footer, and a general header/footer used for all other pages. + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstAndDefault = "FirstAndDefault", + /** + * There is a different header/footer for odd and even pages. + * @remarks + * [Api set: ExcelApi 1.9] + */ + oddAndEven = "OddAndEven", + /** + * There is a separate first page header/footer, then there is a separate header/footer for odd and even pages. + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstOddAndEven = "FirstOddAndEven" + } + /** + * The behavior types when AutoFill is used on a range in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum AutoFillType { + /** + * Populates the adjacent cells based on the surrounding data (the standard AutoFill behavior). + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillDefault = "FillDefault", + /** + * Populates the adjacent cells with data based on the selected data. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillCopy = "FillCopy", + /** + * Populates the adjacent cells with data that follows a pattern in the copied cells. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillSeries = "FillSeries", + /** + * Populates the adjacent cells with the selected formulas. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillFormats = "FillFormats", + /** + * Populates the adjacent cells with the selected values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillValues = "FillValues", + /** + * A version of "FillSeries" for dates that bases the pattern on either the day of the month or the day of the week, depending on the context. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillDays = "FillDays", + /** + * A version of "FillSeries" for dates that bases the pattern on the day of the week and only includes weekdays. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillWeekdays = "FillWeekdays", + /** + * A version of "FillSeries" for dates that bases the pattern on the month. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillMonths = "FillMonths", + /** + * A version of "FillSeries" for dates that bases the pattern on the year. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillYears = "FillYears", + /** + * A version of "FillSeries" for numbers that fills out the values in the adjacent cells according to a linear trend model. + * @remarks + * [Api set: ExcelApi 1.9] + */ + linearTrend = "LinearTrend", + /** + * A version of "FillSeries" for numbers that fills out the values in the adjacent cells according to a growth trend model. + * @remarks + * [Api set: ExcelApi 1.9] + */ + growthTrend = "GrowthTrend", + /** + * Populates the adjacent cells by using Excel's Flash Fill feature. + * @remarks + * [Api set: ExcelApi 1.9] + */ + flashFill = "FlashFill" + } + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + enum GroupOption { + /** + * Group by rows. + * @remarks + * [Api set: ExcelApi 1.10] + */ + byRows = "ByRows", + /** + * Group by columns. + * @remarks + * [Api set: ExcelApi 1.10] + */ + byColumns = "ByColumns" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum RangeCopyType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + all = "All", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + formulas = "Formulas", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + values = "Values", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + formats = "Formats", + /** + * @remarks + * [Api set: ExcelApiOnline 99.9] + */ + link = "Link" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum LinkedDataTypeState { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + validLinkedData = "ValidLinkedData", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + disambiguationNeeded = "DisambiguationNeeded", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + brokenLinkedData = "BrokenLinkedData", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + fetchingData = "FetchingData" + } + /** + * Specifies the shape type for a `GeometricShape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum GeometricShapeType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + lineInverse = "LineInverse", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + triangle = "Triangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightTriangle = "RightTriangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rectangle = "Rectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + diamond = "Diamond", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + parallelogram = "Parallelogram", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + trapezoid = "Trapezoid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + nonIsoscelesTrapezoid = "NonIsoscelesTrapezoid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + pentagon = "Pentagon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + hexagon = "Hexagon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + heptagon = "Heptagon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + octagon = "Octagon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + decagon = "Decagon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dodecagon = "Dodecagon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star4 = "Star4", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star5 = "Star5", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star6 = "Star6", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star7 = "Star7", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star8 = "Star8", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star10 = "Star10", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star12 = "Star12", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star16 = "Star16", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star24 = "Star24", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star32 = "Star32", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + roundRectangle = "RoundRectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + round1Rectangle = "Round1Rectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + round2SameRectangle = "Round2SameRectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + round2DiagonalRectangle = "Round2DiagonalRectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + snipRoundRectangle = "SnipRoundRectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + snip1Rectangle = "Snip1Rectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + snip2SameRectangle = "Snip2SameRectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + snip2DiagonalRectangle = "Snip2DiagonalRectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + plaque = "Plaque", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + ellipse = "Ellipse", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + teardrop = "Teardrop", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + homePlate = "HomePlate", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + chevron = "Chevron", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + pieWedge = "PieWedge", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + pie = "Pie", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + blockArc = "BlockArc", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + donut = "Donut", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + noSmoking = "NoSmoking", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightArrow = "RightArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftArrow = "LeftArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + upArrow = "UpArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + downArrow = "DownArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + stripedRightArrow = "StripedRightArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + notchedRightArrow = "NotchedRightArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bentUpArrow = "BentUpArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftRightArrow = "LeftRightArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + upDownArrow = "UpDownArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftUpArrow = "LeftUpArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftRightUpArrow = "LeftRightUpArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + quadArrow = "QuadArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftArrowCallout = "LeftArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightArrowCallout = "RightArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + upArrowCallout = "UpArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + downArrowCallout = "DownArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftRightArrowCallout = "LeftRightArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + upDownArrowCallout = "UpDownArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + quadArrowCallout = "QuadArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bentArrow = "BentArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + uturnArrow = "UturnArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + circularArrow = "CircularArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftCircularArrow = "LeftCircularArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftRightCircularArrow = "LeftRightCircularArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + curvedRightArrow = "CurvedRightArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + curvedLeftArrow = "CurvedLeftArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + curvedUpArrow = "CurvedUpArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + curvedDownArrow = "CurvedDownArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + swooshArrow = "SwooshArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + cube = "Cube", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + can = "Can", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + lightningBolt = "LightningBolt", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + heart = "Heart", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + sun = "Sun", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + moon = "Moon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + smileyFace = "SmileyFace", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + irregularSeal1 = "IrregularSeal1", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + irregularSeal2 = "IrregularSeal2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + foldedCorner = "FoldedCorner", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bevel = "Bevel", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + frame = "Frame", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + halfFrame = "HalfFrame", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + corner = "Corner", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + diagonalStripe = "DiagonalStripe", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + chord = "Chord", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + arc = "Arc", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftBracket = "LeftBracket", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightBracket = "RightBracket", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftBrace = "LeftBrace", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightBrace = "RightBrace", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bracketPair = "BracketPair", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bracePair = "BracePair", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + callout1 = "Callout1", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + callout2 = "Callout2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + callout3 = "Callout3", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + accentCallout1 = "AccentCallout1", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + accentCallout2 = "AccentCallout2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + accentCallout3 = "AccentCallout3", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + borderCallout1 = "BorderCallout1", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + borderCallout2 = "BorderCallout2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + borderCallout3 = "BorderCallout3", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + accentBorderCallout1 = "AccentBorderCallout1", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + accentBorderCallout2 = "AccentBorderCallout2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + accentBorderCallout3 = "AccentBorderCallout3", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wedgeRectCallout = "WedgeRectCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wedgeRRectCallout = "WedgeRRectCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wedgeEllipseCallout = "WedgeEllipseCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + cloudCallout = "CloudCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + cloud = "Cloud", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + ribbon = "Ribbon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + ribbon2 = "Ribbon2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + ellipseRibbon = "EllipseRibbon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + ellipseRibbon2 = "EllipseRibbon2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftRightRibbon = "LeftRightRibbon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalScroll = "VerticalScroll", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalScroll = "HorizontalScroll", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wave = "Wave", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + doubleWave = "DoubleWave", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + plus = "Plus", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartProcess = "FlowChartProcess", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartDecision = "FlowChartDecision", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartInputOutput = "FlowChartInputOutput", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartPredefinedProcess = "FlowChartPredefinedProcess", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartInternalStorage = "FlowChartInternalStorage", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartDocument = "FlowChartDocument", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartMultidocument = "FlowChartMultidocument", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartTerminator = "FlowChartTerminator", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartPreparation = "FlowChartPreparation", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartManualInput = "FlowChartManualInput", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartManualOperation = "FlowChartManualOperation", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartConnector = "FlowChartConnector", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartPunchedCard = "FlowChartPunchedCard", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartPunchedTape = "FlowChartPunchedTape", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartSummingJunction = "FlowChartSummingJunction", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartOr = "FlowChartOr", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartCollate = "FlowChartCollate", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartSort = "FlowChartSort", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartExtract = "FlowChartExtract", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartMerge = "FlowChartMerge", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartOfflineStorage = "FlowChartOfflineStorage", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartOnlineStorage = "FlowChartOnlineStorage", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartMagneticTape = "FlowChartMagneticTape", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartMagneticDisk = "FlowChartMagneticDisk", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartMagneticDrum = "FlowChartMagneticDrum", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartDisplay = "FlowChartDisplay", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartDelay = "FlowChartDelay", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartAlternateProcess = "FlowChartAlternateProcess", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartOffpageConnector = "FlowChartOffpageConnector", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonBlank = "ActionButtonBlank", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonHome = "ActionButtonHome", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonHelp = "ActionButtonHelp", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonInformation = "ActionButtonInformation", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonForwardNext = "ActionButtonForwardNext", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonBackPrevious = "ActionButtonBackPrevious", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonEnd = "ActionButtonEnd", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonBeginning = "ActionButtonBeginning", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonReturn = "ActionButtonReturn", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonDocument = "ActionButtonDocument", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonSound = "ActionButtonSound", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonMovie = "ActionButtonMovie", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gear6 = "Gear6", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gear9 = "Gear9", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + funnel = "Funnel", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mathPlus = "MathPlus", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mathMinus = "MathMinus", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mathMultiply = "MathMultiply", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mathDivide = "MathDivide", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mathEqual = "MathEqual", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mathNotEqual = "MathNotEqual", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + cornerTabs = "CornerTabs", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + squareTabs = "SquareTabs", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + plaqueTabs = "PlaqueTabs", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartX = "ChartX", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartStar = "ChartStar", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartPlus = "ChartPlus" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ConnectorType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + straight = "Straight", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + elbow = "Elbow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + curve = "Curve" + } + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + enum ContentType { + /** + * Indicates a plain format type for the comment content. + * @remarks + * [Api set: ExcelApi 1.10] + */ + plain = "Plain", + /** + * Comment content containing mentions. + * @remarks + * [Api set: ExcelApi 1.10] + */ + mention = "Mention" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum SpecialCellType { + /** + * All cells with conditional formats. + * @remarks + * [Api set: ExcelApi 1.9] + */ + conditionalFormats = "ConditionalFormats", + /** + * Cells with validation criteria. + * @remarks + * [Api set: ExcelApi 1.9] + */ + dataValidations = "DataValidations", + /** + * Cells with no content. + * @remarks + * [Api set: ExcelApi 1.9] + */ + blanks = "Blanks", + /** + * Cells containing constants. + * @remarks + * [Api set: ExcelApi 1.9] + */ + constants = "Constants", + /** + * Cells containing formulas. + * @remarks + * [Api set: ExcelApi 1.9] + */ + formulas = "Formulas", + /** + * Cells with the same conditional format as the first cell in the range. + * @remarks + * [Api set: ExcelApi 1.9] + */ + sameConditionalFormat = "SameConditionalFormat", + /** + * Cells with the same data validation criteria as the first cell in the range. + * @remarks + * [Api set: ExcelApi 1.9] + */ + sameDataValidation = "SameDataValidation", + /** + * Cells that are visible. + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible = "Visible" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum SpecialCellValueType { + /** + * Cells that have errors, boolean, numeric, or string values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + all = "All", + /** + * Cells that have errors. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errors = "Errors", + /** + * Cells that have errors or boolean values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errorsLogical = "ErrorsLogical", + /** + * Cells that have errors or numeric values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errorsNumbers = "ErrorsNumbers", + /** + * Cells that have errors or string values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errorsText = "ErrorsText", + /** + * Cells that have errors, boolean, or numeric values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errorsLogicalNumber = "ErrorsLogicalNumber", + /** + * Cells that have errors, boolean, or string values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errorsLogicalText = "ErrorsLogicalText", + /** + * Cells that have errors, numeric, or string values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errorsNumberText = "ErrorsNumberText", + /** + * Cells that have a boolean value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + logical = "Logical", + /** + * Cells that have a boolean or numeric value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + logicalNumbers = "LogicalNumbers", + /** + * Cells that have a boolean or string value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + logicalText = "LogicalText", + /** + * Cells that have a boolean, numeric, or string value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + logicalNumbersText = "LogicalNumbersText", + /** + * Cells that have a numeric value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + numbers = "Numbers", + /** + * Cells that have a numeric or string value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + numbersText = "NumbersText", + /** + * Cells that have a string value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + text = "Text" + } + /** + * Specifies the way that an object is attached to its underlying cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum Placement { + /** + * The object is moved and sized with the cells. + * @remarks + * [Api set: ExcelApi 1.9] + */ + twoCell = "TwoCell", + /** + * The object is moved with the cells. + * @remarks + * [Api set: ExcelApi 1.9] + */ + oneCell = "OneCell", + /** + * The object is free floating. + * @remarks + * [Api set: ExcelApi 1.9] + */ + absolute = "Absolute" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum FillPattern { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + solid = "Solid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gray50 = "Gray50", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gray75 = "Gray75", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gray25 = "Gray25", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontal = "Horizontal", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + vertical = "Vertical", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + down = "Down", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + up = "Up", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + checker = "Checker", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + semiGray75 = "SemiGray75", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + lightHorizontal = "LightHorizontal", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + lightVertical = "LightVertical", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + lightDown = "LightDown", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + lightUp = "LightUp", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + grid = "Grid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + crissCross = "CrissCross", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gray16 = "Gray16", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gray8 = "Gray8", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + linearGradient = "LinearGradient", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rectangularGradient = "RectangularGradient" + } + /** + * Specifies the horizontal alignment for the text frame in a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeTextHorizontalAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + right = "Right", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + justify = "Justify", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + justifyLow = "JustifyLow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + distributed = "Distributed", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + thaiDistributed = "ThaiDistributed" + } + /** + * Specifies the vertical alignment for the text frame in a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeTextVerticalAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + middle = "Middle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + justified = "Justified", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + distributed = "Distributed" + } + /** + * Specifies the vertical overflow for the text frame in a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeTextVerticalOverflow { + /** + * Allow text to overflow the text frame vertically (can be from the top, bottom, or both depending on the text alignment). + * @remarks + * [Api set: ExcelApi 1.9] + */ + overflow = "Overflow", + /** + * Hide text that does not fit vertically within the text frame, and add an ellipsis (...) at the end of the visible text. + * @remarks + * [Api set: ExcelApi 1.9] + */ + ellipsis = "Ellipsis", + /** + * Hide text that does not fit vertically within the text frame. + * @remarks + * [Api set: ExcelApi 1.9] + */ + clip = "Clip" + } + /** + * Specifies the horizontal overflow for the text frame in a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeTextHorizontalOverflow { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + overflow = "Overflow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + clip = "Clip" + } + /** + * Specifies the reading order for the text frame in a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeTextReadingOrder { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftToRight = "LeftToRight", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightToLeft = "RightToLeft" + } + /** + * Specifies the orientation for the text frame in a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeTextOrientation { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontal = "Horizontal", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + vertical = "Vertical", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + vertical270 = "Vertical270", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wordArtVertical = "WordArtVertical", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + eastAsianVertical = "EastAsianVertical", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mongolianVertical = "MongolianVertical", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wordArtVerticalRTL = "WordArtVerticalRTL" + } + /** + * Determines the type of automatic sizing allowed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeAutoSize { + /** + * No autosizing. + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeNone = "AutoSizeNone", + /** + * The text is adjusted to fit the shape. + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeTextToFitShape = "AutoSizeTextToFitShape", + /** + * The shape is adjusted to fit the text. + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeShapeToFitText = "AutoSizeShapeToFitText", + /** + * A combination of automatic sizing schemes are used. + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeMixed = "AutoSizeMixed" + } + /** + * Specifies the close behavior for `Workbook.close`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum CloseBehavior { + /** + * Save the possible changes before closing the workbook. + * @remarks + * [Api set: ExcelApi 1.9] + */ + save = "Save", + /** + * Discard the possible changes when closing the workbook. + * @remarks + * [Api set: ExcelApi 1.9] + */ + skipSave = "SkipSave" + } + /** + * Specifies the save behavior for `Workbook.save`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum SaveBehavior { + /** + * Save the workbook without prompting the user. If file is not saved, + it will save it with default name in the default location. + * @remarks + * [Api set: ExcelApi 1.9] + */ + save = "Save", + /** + * Prompts the "Save As" experience to the user if the workbook has not been saved, + Ignored if the workbook was previously saved. + * @remarks + * [Api set: ExcelApi 1.9] + */ + prompt = "Prompt" + } + /** + * Specifies the slicer sort behavior for `Slicer.sortBy`. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + enum SlicerSortType { + /** + * Sort slicer items in the order provided by the data source. + * @remarks + * [Api set: ExcelApi 1.10] + */ + dataSourceOrder = "DataSourceOrder", + /** + * Sort slicer items in ascending order by item captions. + * @remarks + * [Api set: ExcelApi 1.10] + */ + ascending = "Ascending", + /** + * Sort slicer items in descending order by item captions. + * @remarks + * [Api set: ExcelApi 1.10] + */ + descending = "Descending" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum RibbonTab { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + others = "Others", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + home = "Home", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + insert = "Insert", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + draw = "Draw", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + pageLayout = "PageLayout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + formulas = "Formulas", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + data = "Data", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + review = "Review", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + view = "View", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + developer = "Developer", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + addIns = "AddIns", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + help = "Help" + } + /** + * Represents a category of number formats. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum NumberFormatCategory { + /** + * General format cells have no specific number format. + * @remarks + * [Api set: ExcelApi 1.12] + */ + general = "General", + /** + * Number is used for general display of numbers. Currency and Accounting offer specialized formatting for monetary value. + * @remarks + * [Api set: ExcelApi 1.12] + */ + number = "Number", + /** + * Currency formats are used for general monetary values. Use Accounting formats to align decimal points in a column. + * @remarks + * [Api set: ExcelApi 1.12] + */ + currency = "Currency", + /** + * Accounting formats line up the currency symbols and decimal points in a column. + * @remarks + * [Api set: ExcelApi 1.12] + */ + accounting = "Accounting", + /** + * Date formats display date and time serial numbers as date values. Date formats that begin with an asterisk (*) respond to changes in regional date and time settings that are specified for the operating system. Formats without an asterisk are not affected by operating system settings. + * @remarks + * [Api set: ExcelApi 1.12] + */ + date = "Date", + /** + * Time formats display date and time serial numbers as date values. Time formats that begin with an asterisk (*) respond to changes in regional date and time settings that are specified for the operating system. Formats without an asterisk are not affected by operating system settings. + * @remarks + * [Api set: ExcelApi 1.12] + */ + time = "Time", + /** + * Percentage formats multiply the cell value by 100 and displays the result with a percent symbol. + * @remarks + * [Api set: ExcelApi 1.12] + */ + percentage = "Percentage", + /** + * Fraction formats display the cell value as a whole number with the remainder rounded to the nearest fraction value. + * @remarks + * [Api set: ExcelApi 1.12] + */ + fraction = "Fraction", + /** + * Scientific formats display the cell value as a number between 1 and 10 multiplied by a power of 10. + * @remarks + * [Api set: ExcelApi 1.12] + */ + scientific = "Scientific", + /** + * Text format cells are treated as text even when a number is in the cell. The cell is displayed exactly as entered. + * @remarks + * [Api set: ExcelApi 1.12] + */ + text = "Text", + /** + * Special formats are useful for tracking list and database values. + * @remarks + * [Api set: ExcelApi 1.12] + */ + special = "Special", + /** + * A custom format that is not a part of any category. + * @remarks + * [Api set: ExcelApi 1.12] + */ + custom = "Custom" + } + /** + * Represents a named sheet view of a worksheet. A sheet view stores the sort and filter rules for a particular worksheet. + Every sheet view (even a temporary sheet view) has a unique, worksheet-scoped name that is used to access the view. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + class NamedSheetView 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 name of the sheet view. + The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + name: string; + /** + * Activates this sheet view. This is equivalent to using "Switch To" in the Excel UI. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + activate(): void; + /** + * Removes the sheet view from the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + delete(): void; + /** + * Creates a copy of this sheet view. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param name The name of the duplicated sheet view. If no name is provided, one will be generated. + * @returns The new, duplicated sheet view. + */ + duplicate(name?: string): Excel.NamedSheetView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NamedSheetViewLoadOptions): Excel.NamedSheetView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NamedSheetView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.NamedSheetView; + /** + * 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.NamedSheetView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NamedSheetViewData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.NamedSheetViewData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.NamedSheetViewData): void; + } + /** + * Represents the collection of sheet views in the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + class NamedSheetViewCollection 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.NamedSheetView[]; + /** + * Creates a new sheet view with the given name. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param name The name of the sheet view to be created. + * Throws an error when the provided name already exists, is empty, or is a name reserved by the worksheet. + * @returns The newly created sheet view object. + */ + add(name: string): Excel.NamedSheetView; + /** + * Creates and activates a new temporary sheet view. + Temporary views are removed when closing the application, exiting the temporary view with the exit method, or switching to another sheet view. + The temporary sheet view can also be acccessed with the empty string (""), if the temporary view exists. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * @returns The newly created sheet view object. + */ + enterTemporary(): Excel.NamedSheetView; + /** + * Exits the currently active sheet view. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + exit(): void; + /** + * Gets the worksheet's currently active sheet view. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * @returns The currently active sheet view for this worksheet. + */ + getActive(): Excel.NamedSheetView; + /** + * Gets the number of sheet views in this worksheet. + Includes the temporary sheet view if it exists. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a sheet view using its name. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param key The case-sensitive name of the sheet view. Use the empty string ("") to get the temporary sheet view, if the temporary view exists. + * @returns The sheet view with the given name, or the temporary view if an empty string was provided. If there is no current temporary view and an empty string was provided, then an `ItemNotFound` error is thrown. + */ + getItem(key: string): Excel.NamedSheetView; + /** + * Gets a sheet view by its index in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param index The index of the sheet view object in the collection. + * @returns The sheet view at the given index. + */ + getItemAt(index: number): Excel.NamedSheetView; + /** + * Gets a sheet view using its name. + If the sheet view object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The case-sensitive name of the sheet view. + * Use the empty string ("") to get the temporary sheet view, if the temporary view exists. + * @returns The sheet view with the given name, or the temporary view if an empty string was provided. + */ + getItemOrNullObject(key: string): Excel.NamedSheetView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NamedSheetViewCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.NamedSheetViewCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NamedSheetViewCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.NamedSheetViewCollection; + /** + * 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.NamedSheetViewCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NamedSheetViewCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.NamedSheetViewCollectionData; + /** + * Set mock data + */ + setMockData(data: Excel.Interfaces.NamedSheetViewCollectionData): void; + } + /** + * An object containing the result of a function-evaluation operation + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.FunctionResultLoadOptions): FunctionResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): FunctionResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + /** + * Set mock data + */ + setMockData(data: Interfaces.FunctionResultData): void; + } + /** + * An object for evaluating Excel functions. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + false(): FunctionResult; + /** + * Returns the starting position of one text string within another text string. FIND is case-sensitive. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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.). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + pi(): FunctionResult; + /** + * Calculates the payment for a loan based on constant payments and a constant interest rate. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rand(): FunctionResult; + /** + * Returns a random number between the numbers you specify. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + today(): FunctionResult; + /** + * Removes all spaces from a text string except for single spaces between words. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + true(): FunctionResult; + /** + * Truncates a number to an integer by removing the decimal, or fractional, part of the number. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * 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; + }; + } + enum ErrorCodes { + accessDenied = "AccessDenied", + apiNotFound = "ApiNotFound", + conflict = "Conflict", + emptyChartSeries = "EmptyChartSeries", + filteredRangeConflict = "FilteredRangeConflict", + formulaLengthExceedsLimit = "FormulaLengthExceedsLimit", + generalException = "GeneralException", + inactiveWorkbook = "InactiveWorkbook", + insertDeleteConflict = "InsertDeleteConflict", + invalidArgument = "InvalidArgument", + invalidBinding = "InvalidBinding", + invalidOperation = "InvalidOperation", + invalidReference = "InvalidReference", + invalidSelection = "InvalidSelection", + itemAlreadyExists = "ItemAlreadyExists", + itemNotFound = "ItemNotFound", + mergedRangeConflict = "MergedRangeConflict", + nonBlankCellOffSheet = "NonBlankCellOffSheet", + notImplemented = "NotImplemented", + openWorkbookLinksBlocked = "OpenWorkbookLinksBlocked", + operationCellsExceedLimit = "OperationCellsExceedLimit", + pivotTableRangeConflict = "PivotTableRangeConflict", + powerQueryRefreshResourceChallenge = "PowerQueryRefreshResourceChallenge", + rangeExceedsLimit = "RangeExceedsLimit", + refreshWorkbookLinksBlocked = "RefreshWorkbookLinksBlocked", + requestAborted = "RequestAborted", + responsePayloadSizeLimitExceeded = "ResponsePayloadSizeLimitExceeded", + unsupportedFeature = "UnsupportedFeature", + unsupportedFillType = "UnsupportedFillType", + unsupportedOperation = "UnsupportedOperation", + unsupportedSheet = "UnsupportedSheet", + 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 AllowEditRange object, for use in `allowEditRange.set({ ... })`. */ + interface AllowEditRangeUpdateData { + /** + * Specifies the range associated with the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + address?: string; + /** + * Specifies the title of the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. + If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + title?: string; + } + /** An interface for updating data on the AllowEditRangeCollection object, for use in `allowEditRangeCollection.set({ ... })`. */ + interface AllowEditRangeCollectionUpdateData { + items?: Excel.Interfaces.AllowEditRangeData[]; + } + /** An interface for updating data on the QueryCollection object, for use in `queryCollection.set({ ... })`. */ + interface QueryCollectionUpdateData { + items?: Excel.Interfaces.QueryData[]; + } + /** An interface for updating data on the NumberFormatPropertyCollection object, for use in `numberFormatPropertyCollection.set({ ... })`. */ + interface NumberFormatPropertyCollectionUpdateData { + items?: Excel.Interfaces.NumberFormatPropertyData[]; + } + /** An interface for updating data on the RangeOptimizationCollection object, for use in `rangeOptimizationCollection.set({ ... })`. */ + interface RangeOptimizationCollectionUpdateData { + items?: Excel.Interfaces.RangeOptimizationData[]; + } + /** An interface for updating data on the LinkedWorkbookCollection object, for use in `linkedWorkbookCollection.set({ ... })`. */ + interface LinkedWorkbookCollectionUpdateData { + /** + * Represents the update mode of the workbook links. The mode is same for all of the workbook links present in the workbook. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + workbookLinksRefreshMode?: Excel.WorkbookLinksRefreshMode | "Manual" | "Automatic"; + items?: Excel.Interfaces.LinkedWorkbookData[]; + } + /** An interface for updating data on the DocumentTaskChangeCollection object, for use in `documentTaskChangeCollection.set({ ... })`. */ + interface DocumentTaskChangeCollectionUpdateData { + items?: Excel.Interfaces.DocumentTaskChangeData[]; + } + /** An interface for updating data on the DocumentTask object, for use in `documentTask.set({ ... })`. */ + interface DocumentTaskUpdateData { + /** + * Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: number; + /** + * Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: number; + /** + * Gets or sets the date and time the task should start and is due. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startAndDueDateTime?: Excel.DocumentTaskSchedule; + /** + * Specifies title of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: string; + } + /** An interface for updating data on the DocumentTaskCollection object, for use in `documentTaskCollection.set({ ... })`. */ + interface DocumentTaskCollectionUpdateData { + items?: Excel.Interfaces.DocumentTaskData[]; + } + /** An interface for updating data on the Runtime object, for use in `runtime.set({ ... })`. */ + interface RuntimeUpdateData { + /** + * Toggle JavaScript events in the current task pane or content add-in. + * + * @remarks + * [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 iterative calculation settings. + In Excel on Windows and Mac, the settings will apply to the Excel Application. + In Excel on the web and other platforms, the settings will apply to the active workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + iterativeCalculation?: Excel.Interfaces.IterativeCalculationUpdateData; + /** + * Gets the ribbon of the application. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + ribbon?: Excel.Interfaces.RibbonUpdateData; + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode?: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + /** + * Specifies whether the "Format Stale values" button under Calculation Options is turned on or off. + The stale formulas are rendered with stale formatting if the button is turned on. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + formatStaleValues?: boolean; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enabled?: boolean; + /** + * Specifies the maximum amount of change between each iteration as Excel resolves circular references. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxChange?: number; + /** + * Specifies the maximum number of iterations that Excel can use to resolve a circular reference. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxIteration?: number; + } + /** An interface for updating data on the Workbook object, for use in `workbook.set({ ... })`. */ + interface WorkbookUpdateData { + /** + * Gets the workbook properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartDataPointTrack?: boolean; + /** + * Specifies if changes have been made since the workbook 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isDirty?: boolean; + /** + * Specifies whether the PivotTable's field list pane is shown at the workbook level. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showPivotFieldList?: boolean; + /** + * True if the workbook uses the 1904 date system. + * + * @remarks + * [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`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pageLayout?: Excel.Interfaces.PageLayoutUpdateData; + /** + * Determines if Excel should recalculate the worksheet when necessary. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableCalculation?: boolean; + /** + * The display name of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * The zero-based position of the worksheet within the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: number; + /** + * Specifies if gridlines are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showGridlines?: boolean; + /** + * Specifies if headings are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showHeadings?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardWidth?: number; + /** + * The tab color of the worksheet. + 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 #RRGGBB (e.g., "FFA500"). + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tabColor?: string; + /** + * The visibility of the worksheet. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataValidation?: Excel.Interfaces.DataValidationUpdateData; + /** + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatUpdateData; + /** + * Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: any[][]; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + formulasR1C1?: any[][]; + /** + * Represents the hyperlink for the current range. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hyperlink?: Excel.RangeHyperlink; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + numberFormat?: any[][]; + /** + * Represents Excel's number format code for the given range, based on the language settings of the user. + Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. + Any returned text uses the locally-formatted strings based on the language specified in the system settings. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: any[][]; + /** + * Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + style?: string; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** An interface for updating data on the RangeAreas object, for use in `rangeAreas.set({ ... })`. */ + interface RangeAreasUpdateData { + /** + * Returns a data validation object for all ranges in the `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dataValidation?: Excel.Interfaces.DataValidationUpdateData; + /** + * Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: string; + } + /** An interface for updating data on the RangeView object, for use in `rangeView.set({ ... })`. */ + interface RangeViewUpdateData { + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: any[][]; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: any[][]; + /** + * Represents Excel's number format code for the given cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** 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. + * + * @remarks + * [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 { + /** + * Specifies the comment associated with this name. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + comment?: string; + /** + * The formula of the named item. Formulas always start with an equal sign ("="). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formula?: any; + /** + * Specifies if the object is visible. + * + * @remarks + * [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 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 { + /** + * The style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableStyle?: Excel.Interfaces.TableStyleUpdateData; + /** + * Specifies if the first column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * Specifies if the last column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightLastColumn?: boolean; + /** + * Name of the table. + + The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * Specifies if the header row is visible. This value can be set to show or remove the header row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * Specifies if the total row is visible. This value can be set to show or remove the total row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [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 { + /** + * Specifies the name of the table column. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** 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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** An interface for updating data on the DataValidation object, for use in `dataValidation.set({ ... })`. */ + interface DataValidationUpdateData { + /** + * Error alert when user enters invalid data. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + errorAlert?: Excel.DataValidationErrorAlert; + /** + * Specifies if data validation will be performed on blank cells. Default is `true`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + ignoreBlanks?: boolean; + /** + * Prompt when users select a cell. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + prompt?: Excel.DataValidationPrompt; + /** + * Data validation rule that contains different type of data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + rule?: Excel.DataValidationRule; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderCollectionUpdateData; + /** + * Returns the fill object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillUpdateData; + /** + * Returns the font object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontUpdateData; + /** + * Returns the format protection object for a range. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionUpdateData; + /** + * Specifies if text is automatically indented when text alignment is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoIndent?: boolean; + /** + * Specifies the width of all colums within the range. If the column widths are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnWidth?: number; + /** + * Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + indentLevel?: number; + /** + * The reading order for the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * The height of all rows in the range. If the row heights are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHeight?: number; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shrinkToFit?: boolean; + /** + * 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. + * + * @remarks + * [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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardHeight?: boolean; + /** + * Specifies if 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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardWidth?: boolean; + /** + * Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** An interface for updating data on the FormatProtection object, for use in `formatProtection.set({ ... })`. */ + interface FormatProtectionUpdateData { + /** + * Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. + * + * @remarks + * [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 background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * 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 a uniform pattern setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + /** + * The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternColor?: string; + /** + * Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternTintAndShade?: number; + /** + * Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + } + /** 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, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + /** + * Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. + * + * @remarks + * [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 { + /** + * Specifies 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 collection doesn't have a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + 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 the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Specifies the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Font size. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + strikethrough?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subscript?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + superscript?: boolean; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform font `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + /** + * Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesUpdateData; + /** + * Represents the data labels on the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsUpdateData; + /** + * Encapsulates the format properties for the chart area. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatUpdateData; + /** + * Represents the legend for the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendUpdateData; + /** + * Encapsulates the options for a pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pivotOptions?: Excel.Interfaces.ChartPivotOptionsUpdateData; + /** + * Represents the plot area for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotArea?: Excel.Interfaces.ChartPlotAreaUpdateData; + /** + * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleUpdateData; + /** + * Specifies a chart category label level enumeration constant, referring to the level of the source category labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel?: number; + /** + * Specifies the type of the chart. See `Excel.ChartType` for details. + * + * @remarks + * [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"; + /** + * Specifies the way that blank cells are plotted on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs?: Excel.ChartDisplayBlanksAs | "NotPlotted" | "Zero" | "Interplotted"; + /** + * Specifies the height, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + height?: number; + /** + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + left?: number; + /** + * Specifies the name of a chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Specifies the way columns or rows are used as data series on the chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly?: boolean; + /** + * Specifies a chart series name level enumeration constant, referring to the level of the source series names. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel?: number; + /** + * Specifies whether to display all field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. + If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum?: boolean; + /** + * Specifies the chart style for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + style?: number; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + top?: number; + /** + * Specifies the width, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + width?: number; + } + /** An interface for updating data on the ChartPivotOptions object, for use in `chartPivotOptions.set({ ... })`. */ + interface ChartPivotOptionsUpdateData { + /** + * Specifies whether to display the 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showAxisFieldButtons?: boolean; + /** + * Specifies whether to display the legend field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLegendFieldButtons?: boolean; + /** + * Specifies whether to display the report filter field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showReportFilterFieldButtons?: boolean; + /** + * Specifies whether to display the show value field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showValueFieldButtons?: boolean; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + /** + * Specifies the color scheme of the chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + colorScheme?: Excel.ChartColorScheme | "ColorfulPalette1" | "ColorfulPalette2" | "ColorfulPalette3" | "ColorfulPalette4" | "MonochromaticPalette1" | "MonochromaticPalette2" | "MonochromaticPalette3" | "MonochromaticPalette4" | "MonochromaticPalette5" | "MonochromaticPalette6" | "MonochromaticPalette7" | "MonochromaticPalette8" | "MonochromaticPalette9" | "MonochromaticPalette10" | "MonochromaticPalette11" | "MonochromaticPalette12" | "MonochromaticPalette13"; + /** + * Specifies if the chart area of the chart has rounded corners. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + roundedCorners?: boolean; + } + /** 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 { + /** + * Encapsulates the bin options for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + binOptions?: Excel.Interfaces.ChartBinOptionsUpdateData; + /** + * Encapsulates the options for the box and whisker charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsUpdateData; + /** + * Represents a collection of all data labels in the series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsUpdateData; + /** + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatUpdateData; + /** + * Encapsulates the options for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + mapOptions?: Excel.Interfaces.ChartMapOptionsUpdateData; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + xErrorBars?: Excel.Interfaces.ChartErrorBarsUpdateData; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + yErrorBars?: Excel.Interfaces.ChartErrorBarsUpdateData; + /** + * Specifies the group for the specified series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bubbleScale?: number; + /** + * Represents the chart type of a series. See `Excel.ChartType` for details. + * + * @remarks + * [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 doughnut exploded charts. + Throws an `InvalidArgument` error on invalid charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: number; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + explosion?: number; + /** + * Specifies if the series is filtered. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + filtered?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + gapWidth?: number; + /** + * Specifies the color for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumColor?: string; + /** + * Specifies the type for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumValue?: number; + /** + * Specifies the color for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointColor?: string; + /** + * Specifies the type for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointValue?: number; + /** + * Specifies the color for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumColor?: string; + /** + * Specifies the type for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumValue?: number; + /** + * Specifies the series gradient style of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientStyle?: Excel.ChartGradientStyle | "TwoPhaseColor" | "ThreePhaseColor"; + /** + * Specifies if the series has data labels. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * Specifies the fill color for negative data points in a series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + invertColor?: string; + /** + * True if Excel inverts the pattern in the item when it corresponds to a negative number. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + invertIfNegative?: boolean; + /** + * Specifies the marker background color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * Specifies the marker foreground color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * Specifies the marker size of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + /** + * Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + overlap?: number; + /** + * Specifies the series parent label strategy area for a treemap chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentLabelStrategy?: Excel.ChartParentLabelStrategy | "None" | "Banner" | "Overlapping"; + /** + * Specifies the plot order of a chart series within the chart group. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + plotOrder?: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + secondPlotSize?: number; + /** + * Specifies whether connector lines are shown in waterfall charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showConnectorLines?: boolean; + /** + * Specifies whether leader lines are displayed for each data label in the series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLeaderLines?: boolean; + /** + * Specifies if the series has a shadow. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies if the series is smooth. Only applicable to line and scatter charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + /** + * Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitType?: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + /** + * Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + splitValue?: number; + /** + * True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelUpdateData; + /** + * Encapsulates the format properties chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatUpdateData; + /** + * Represents whether a data point has a data label. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * Represents marker size of a data point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisUpdateData; + /** + * Represents the series axis of a 3-D chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisUpdateData; + /** + * Represents the value axis in an axis. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatUpdateData; + /** + * Returns an object that represents the major gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesUpdateData; + /** + * Returns an object that represents the minor gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesUpdateData; + /** + * Represents the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleUpdateData; + /** + * Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + alignment?: Excel.ChartTickLabelAlignment | "Center" | "Left" | "Right"; + /** + * Specifies the base unit for the specified category axis. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * Specifies the category axis type. + * + * @remarks + * [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. + * Specifies the specified axis where the other axis crosses. See `Excel.ChartAxisPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + crosses?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + displayUnit?: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; + /** + * Specifies if the value axis crosses the category axis between categories. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isBetweenCategories?: boolean; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * Specifies the base of the logarithm when using logarithmic scales. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + logBase?: number; + /** + * Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + majorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minimum?: any; + /** + * Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + minorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorUnit?: any; + /** + * Specifies if an axis is multilevel. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + multiLevel?: boolean; + /** + * Specifies the format code for the axis tick label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + offset?: number; + /** + * Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * Specifies if Excel plots data points from last to first. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder?: boolean; + /** + * Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + scaleType?: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; + /** + * Specifies if the axis display unit label is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel?: boolean; + /** + * Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: any; + /** + * Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition?: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing?: any; + /** + * Specifies the number of categories or series between tick marks. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing?: number; + /** + * Specifies if the axis is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartAxisFormat object, for use in `chartAxisFormat.set({ ... })`. */ + interface ChartAxisFormatUpdateData { + /** + * Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + /** + * Specifies chart line formatting. + * + * @remarks + * [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 { + /** + * Specifies the formatting of the chart axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatUpdateData; + /** + * Specifies the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + textOrientation?: number; + /** + * Specifies if the axis title is visibile. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartAxisTitleFormat object, for use in `chartAxisTitleFormat.set({ ... })`. */ + interface ChartAxisTitleFormatUpdateData { + /** + * Specifies the chart axis title's border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. + * + * @remarks + * [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 { + /** + * Specifies the format of chart data labels, which includes fill and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatUpdateData; + /** + * Specifies if data labels automatically generate appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * TODO: + * + * @remarks + * [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"; + /** + * Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when the `TextOrientation` of data label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * Specifies the format code for data labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + separator?: string; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + /** + * Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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 the data label is -90, 90, or 180. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartDataLabelFormatUpdateData; + /** + * Specifies if the data label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * String value that represents the formula of chart data label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula?: string; + /** + * TODO: + * + * @remarks + * [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 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. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * String value that represents the format code for data label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + separator?: string; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showBubbleSize?: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showCategoryName?: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showLegendKey?: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showPercentage?: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showSeriesName?: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showValue?: boolean; + /** + * String representing the text of the data label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text?: string; + /** + * Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Represents the font attributes (such as font name, font size, and color) for a chart data label. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartDataTable object, for use in `chartDataTable.set({ ... })`. */ + interface ChartDataTableUpdateData { + /** + * Represents the format of a chart data table, which includes fill, font, and border format. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + format?: Excel.Interfaces.ChartDataTableFormatUpdateData; + /** + * Specifies whether to display the horizontal border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showHorizontalBorder?: boolean; + /** + * Specifies whether to show the legend key of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showLegendKey?: boolean; + /** + * Specifies whether to display the outline border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showOutlineBorder?: boolean; + /** + * Specifies whether to display the vertical border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showVerticalBorder?: boolean; + /** + * Specifies whether to show the data table of the chart. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartDataTableFormat object, for use in `chartDataTableFormat.set({ ... })`. */ + interface ChartDataTableFormatUpdateData { + /** + * Represents the border format of chart data table, which includes color, line style, and weight. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Represents the font attributes (such as font name, font size, and color) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartErrorBars object, for use in `chartErrorBars.set({ ... })`. */ + interface ChartErrorBarsUpdateData { + /** + * Specifies the formatting type of the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.Interfaces.ChartErrorBarsFormatUpdateData; + /** + * Specifies if error bars have an end style cap. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endStyleCap?: boolean; + /** + * Specifies which parts of the error bars to include. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + include?: Excel.ChartErrorBarsInclude | "Both" | "MinusValues" | "PlusValues"; + /** + * The type of range marked by the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: Excel.ChartErrorBarsType | "FixedValue" | "Percent" | "StDev" | "StError" | "Custom"; + /** + * Specifies whether the error bars are displayed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartErrorBarsFormat object, for use in `chartErrorBarsFormat.set({ ... })`. */ + interface ChartErrorBarsFormatUpdateData { + /** + * Represents the chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + line?: Excel.Interfaces.ChartLineFormatUpdateData; + } + /** An interface for updating data on the ChartGridlines object, for use in `chartGridlines.set({ ... })`. */ + interface ChartGridlinesUpdateData { + /** + * Represents the formatting of chart gridlines. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatUpdateData; + /** + * Specifies if the axis gridlines are visible. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatUpdateData; + /** + * Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * Specifies if the chart legend should overlap with the main body of the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; + /** + * Specifies if the legend has a shadow on the chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies the top of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * Specifies if the chart legend is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [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 visibility of a chart legend entry. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Represents the font attributes such as font name, font size, and color of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartMapOptions object, for use in `chartMapOptions.set({ ... })`. */ + interface ChartMapOptionsUpdateData { + /** + * Specifies the series map labels strategy of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + labelStrategy?: Excel.ChartMapLabelStrategy | "None" | "BestFit" | "ShowAll"; + /** + * Specifies the series mapping level of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: Excel.ChartMapAreaLevel | "Automatic" | "DataOnly" | "City" | "County" | "State" | "Country" | "Continent" | "World"; + /** + * Specifies the series projection type of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + projectionType?: Excel.ChartMapProjectionType | "Automatic" | "Mercator" | "Miller" | "Robinson" | "Albers"; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatUpdateData; + /** + * Specifies the horizontal alignment for chart title. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * Specifies if the chart title will overlay the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * Represents the position of chart title. See `Excel.ChartTitlePosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies the chart's title text. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + textOrientation?: number; + /** + * Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Specifies if the chart title is visibile. + * + * @remarks + * [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, and color of a chart characters object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Represents the font attributes (such as font name, font size, and color) for an object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + color?: string; + /** + * Represents the line style of the border. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + weight?: number; + } + /** An interface for updating data on the ChartBinOptions object, for use in `chartBinOptions.set({ ... })`. */ + interface ChartBinOptionsUpdateData { + /** + * Specifies if bin overflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowOverflow?: boolean; + /** + * Specifies if bin underflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowUnderflow?: boolean; + /** + * Specifies the bin count of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + count?: number; + /** + * Specifies the bin overflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + overflowValue?: number; + /** + * Specifies the bin's type for a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: Excel.ChartBinType | "Category" | "Auto" | "BinWidth" | "BinCount"; + /** + * Specifies the bin underflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underflowValue?: number; + /** + * Specifies the bin width value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: number; + } + /** An interface for updating data on the ChartBoxwhiskerOptions object, for use in `chartBoxwhiskerOptions.set({ ... })`. */ + interface ChartBoxwhiskerOptionsUpdateData { + /** + * Specifies if the quartile calculation type of a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + quartileCalculation?: Excel.ChartBoxQuartileCalculation | "Inclusive" | "Exclusive"; + /** + * Specifies if inner points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showInnerPoints?: boolean; + /** + * Specifies if the mean line is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanLine?: boolean; + /** + * Specifies if the mean marker is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanMarker?: boolean; + /** + * Specifies if outlier points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showOutlierPoints?: boolean; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Represents the line style. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Represents the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * Font name (e.g., "Calibri") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Size of the font (e.g., 11) + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatUpdateData; + /** + * Represents the label of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + label?: Excel.Interfaces.ChartTrendlineLabelUpdateData; + /** + * Represents the number of periods that the trendline extends backward. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + backwardPeriod?: number; + /** + * Represents the number of periods that the trendline extends forward. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + intercept?: any; + /** + * Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: number; + /** + * Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: number; + /** + * True if the equation for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showEquation?: boolean; + /** + * True if the r-squared value for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showRSquared?: boolean; + /** + * Represents the type of a chart trendline. + * + * @remarks + * [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. + * + * @remarks + * [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 { + /** + * The format of the chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartTrendlineLabelFormatUpdateData; + /** + * Specifies if the trendline label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * String value that represents the formula of the chart trendline label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula?: string; + /** + * Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * String value that represents the format code for the trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * String representing the text of the trendline label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text?: string; + /** + * Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is 0. + * + * @remarks + * [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 { + /** + * Specifies the border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. + * + * @remarks + * [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 { + /** + * Specifies the formatting of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartPlotAreaFormatUpdateData; + /** + * Specifies the height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * Specifies the inside height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideHeight?: number; + /** + * Specifies the inside left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideLeft?: number; + /** + * Specifies the inside top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideTop?: number; + /** + * Specifies the inside width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideWidth?: number; + /** + * Specifies the left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies the position of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: Excel.ChartPlotAreaPosition | "Automatic" | "Custom"; + /** + * Specifies the top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * Specifies the width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: number; + } + /** An interface for updating data on the ChartPlotAreaFormat object, for use in `chartPlotAreaFormat.set({ ... })`. */ + interface ChartPlotAreaFormatUpdateData { + /** + * Specifies the border attributes of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + } + /** An interface for updating data on the VisualCollection object, for use in `visualCollection.set({ ... })`. */ + interface VisualCollectionUpdateData { + items?: Excel.Interfaces.VisualData[]; + } + /** An interface for updating data on the VisualPropertyCollection object, for use in `visualPropertyCollection.set({ ... })`. */ + interface VisualPropertyCollectionUpdateData { + items?: Excel.Interfaces.VisualPropertyData[]; + } + /** 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 PivotTableScopedCollection object, for use in `pivotTableScopedCollection.set({ ... })`. */ + interface PivotTableScopedCollectionUpdateData { + items?: Excel.Interfaces.PivotTableData[]; + } + /** 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 { + /** + * Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + allowMultipleFiltersPerField?: boolean; + /** + * Specifies if the PivotTable allows values in the data body to be edited by the user. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableDataValueEditing?: boolean; + /** + * Name of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + name?: string; + /** + * Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + refreshOnOpen?: boolean; + /** + * Specifies if the PivotTable uses custom lists when sorting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useCustomSortLists?: boolean; + } + /** An interface for updating data on the PivotLayout object, for use in `pivotLayout.set({ ... })`. */ + interface PivotLayoutUpdateData { + /** + * The style applied to the PivotTable. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pivotStyle?: Excel.Interfaces.PivotTableStyleUpdateData; + /** + * The alt text description of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextDescription?: string; + /** + * The alt text title of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextTitle?: string; + /** + * Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFormat?: boolean; + /** + * The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. + Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. + By default, this is an empty string. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + emptyCellText?: string; + /** + * Specifies if the field list can be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + enableFieldList?: boolean; + /** + * Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. + Note that the value of `emptyCellText` persists when this property is set to `false`. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + fillEmptyCells?: boolean; + /** + * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layoutType?: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; + /** + * Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + preserveFormatting?: boolean; + /** + * Specifies if the PivotTable report shows grand totals for columns. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showColumnGrandTotals?: boolean; + /** + * Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + showFieldHeaders?: boolean; + /** + * Specifies if the PivotTable report shows grand totals for rows. + * + * @remarks + * [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`. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Position of the RowColumnPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems?: boolean; + /** + * Name of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Position of the FilterPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + field?: Excel.Interfaces.PivotFieldUpdateData; + /** + * Name of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Number format of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Position of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: number; + /** + * Specifies if the data should be shown as a specific summary calculation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAs?: Excel.ShowAsRule; + /** + * Specifies if all items of the DataPivotHierarchy are shown. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Determines whether to show all items of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAllItems?: boolean; + /** + * Subtotals of the PivotField. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isExpanded?: boolean; + /** + * Name of the PivotItem. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Specifies if the PivotItem is visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + visible?: boolean; + } + /** An interface for updating data on the WorksheetCustomProperty object, for use in `worksheetCustomProperty.set({ ... })`. */ + interface WorksheetCustomPropertyUpdateData { + /** + * Gets or sets the value of the custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + value?: string; + } + /** An interface for updating data on the WorksheetCustomPropertyCollection object, for use in `worksheetCustomPropertyCollection.set({ ... })`. */ + interface WorksheetCustomPropertyCollectionUpdateData { + items?: Excel.Interfaces.WorksheetCustomPropertyData[]; + } + /** An interface for updating data on the DocumentProperties object, for use in `documentProperties.set({ ... })`. */ + interface DocumentPropertiesUpdateData { + /** + * The author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + author?: string; + /** + * The category of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + category?: string; + /** + * The comments of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + comments?: string; + /** + * The company of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + company?: string; + /** + * The keywords of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + keywords?: string; + /** + * The manager of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + manager?: string; + /** + * Gets the revision number of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + revisionNumber?: number; + /** + * The subject of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + subject?: string; + /** + * The title of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + title?: string; + } + /** An interface for updating data on the CustomProperty object, for use in `customProperty.set({ ... })`. */ + interface CustomPropertyUpdateData { + /** + * The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatUpdateData; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatUpdateData; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatUpdateData; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatUpdateData; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatUpdateData; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatUpdateData; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatUpdateData; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatUpdateData; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatUpdateData; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatUpdateData; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatUpdateData; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatUpdateData; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [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 the 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. + * + * @remarks + * [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. + Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatUpdateData; + /** + * Representation of all values to the right of the axis in an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatUpdateData; + /** + * HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no axis is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisColor?: string; + /** + * Representation of how the axis is determined for an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisFormat?: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; + /** + * Specifies the direction that the data bar graphic should be based on. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: Excel.ConditionalDataBarRule; + /** + * If `true`, hides the values from the cells where the data bar is applied. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * Specifies if the data bar has a gradient. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * Specifies if the negative data bar has the same border color as the positive data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * Specifies if the negative data bar has the same fill color as the positive data bar. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * Specifies the `Rule` object on this conditional format. + * + * @remarks + * [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, on which to evaluate the conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * The formula, if required, on which to evaluate the conditional format rule in the user's language. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: string; + /** + * The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. + * + * @remarks + * [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 icon sets 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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + criteria?: Excel.ConditionalIconCriterion[]; + /** + * If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * If `true`, hides the values and only shows icons. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * If set, displays the icon set option for the conditional format. + * + * @remarks + * [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. + * + * @remarks + * [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 format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * The criteria of the top/bottom conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * The rule of the conditional format. + * + * @remarks + * [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 format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * The rule of the conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * Specifies the rule object on this conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderCollectionUpdateData; + /** + * Returns the fill object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillUpdateData; + /** + * Returns the font object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontUpdateData; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + Cleared if `null` is passed in. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + numberFormat?: any; + } + /** An interface for updating data on the ConditionalRangeFont object, for use in `conditionalRangeFont.set({ ... })`. */ + interface ConditionalRangeFontUpdateData { + /** + * Specifies if the font is bold. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * Specifies if the font is italic. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * Specifies the strikethrough status of the font. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + bottom?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * Gets the left border. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + left?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * Gets the right border. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + right?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * Gets the top border. + * + * @remarks + * [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 { + /** + * A collection of four border objects that represent the style of the four borders. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderCollectionUpdateData; + /** + * The fill of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillUpdateData; + /** + * A `Font` object that represents the font of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontUpdateData; + /** + * Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoIndent?: boolean; + /** + * Specifies if the formula will be hidden when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * Specifies if the style includes the color, color index, line style, and weight border properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * Specifies if the style includes the number format property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * Specifies if the style includes the formula hidden and locked protection properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * An integer from 0 to 250 that indicates the indent level for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + indentLevel?: number; + /** + * Specifies if the object is locked when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * The format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormat?: string; + /** + * The localized format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: string; + /** + * The reading order for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * The text orientation for the style. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * Specifies if Excel wraps the text in the object. + * + * @remarks + * [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 for updating data on the TableStyleCollection object, for use in `tableStyleCollection.set({ ... })`. */ + interface TableStyleCollectionUpdateData { + items?: Excel.Interfaces.TableStyleData[]; + } + /** An interface for updating data on the TableStyle object, for use in `tableStyle.set({ ... })`. */ + interface TableStyleUpdateData { + /** + * Specifies the name of the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + } + /** An interface for updating data on the PivotTableStyleCollection object, for use in `pivotTableStyleCollection.set({ ... })`. */ + interface PivotTableStyleCollectionUpdateData { + items?: Excel.Interfaces.PivotTableStyleData[]; + } + /** An interface for updating data on the PivotTableStyle object, for use in `pivotTableStyle.set({ ... })`. */ + interface PivotTableStyleUpdateData { + /** + * Specifies the name of the PivotTable style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + } + /** An interface for updating data on the SlicerStyleCollection object, for use in `slicerStyleCollection.set({ ... })`. */ + interface SlicerStyleCollectionUpdateData { + items?: Excel.Interfaces.SlicerStyleData[]; + } + /** An interface for updating data on the SlicerStyle object, for use in `slicerStyle.set({ ... })`. */ + interface SlicerStyleUpdateData { + /** + * Specifies the name of the slicer style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + } + /** An interface for updating data on the TimelineStyleCollection object, for use in `timelineStyleCollection.set({ ... })`. */ + interface TimelineStyleCollectionUpdateData { + items?: Excel.Interfaces.TimelineStyleData[]; + } + /** An interface for updating data on the TimelineStyle object, for use in `timelineStyle.set({ ... })`. */ + interface TimelineStyleUpdateData { + /** + * Specifies the name of the timeline style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + } + /** An interface for updating data on the PageLayout object, for use in `pageLayout.set({ ... })`. */ + interface PageLayoutUpdateData { + /** + * Header and footer configuration for the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headersFooters?: Excel.Interfaces.HeaderFooterGroupUpdateData; + /** + * The worksheet's black and white print option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + blackAndWhite?: boolean; + /** + * The worksheet's bottom page margin to use for printing in points. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin?: number; + /** + * The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHorizontally?: boolean; + /** + * The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerVertically?: boolean; + /** + * The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + draftMode?: boolean; + /** + * The worksheet's first page number to print. A `null` value represents "auto" page numbering. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPageNumber?: number | ""; + /** + * The worksheet's footer margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + footerMargin?: number; + /** + * The worksheet's header margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headerMargin?: number; + /** + * The worksheet's left margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin?: number; + /** + * The worksheet's orientation of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation?: Excel.PageOrientation | "Portrait" | "Landscape"; + /** + * The worksheet's paper size of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"; + /** + * Specifies if the worksheet's comments should be displayed when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printComments?: Excel.PrintComments | "NoComments" | "EndSheet" | "InPlace"; + /** + * The worksheet's print errors option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printErrors?: Excel.PrintErrorType | "AsDisplayed" | "Blank" | "Dash" | "NotAvailable"; + /** + * Specifies if the worksheet's gridlines will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printGridlines?: boolean; + /** + * Specifies if the worksheet's headings will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printHeadings?: boolean; + /** + * The worksheet's page print order option. This specifies the order to use for processing the page number printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printOrder?: Excel.PrintOrder | "DownThenOver" | "OverThenDown"; + /** + * The worksheet's right margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin?: number; + /** + * The worksheet's top margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin?: number; + /** + * The worksheet's print zoom options. + The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zoom?: Excel.PageLayoutZoomOptions; + } + /** An interface for updating data on the HeaderFooter object, for use in `headerFooter.set({ ... })`. */ + interface HeaderFooterUpdateData { + /** + * The center footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerFooter?: string; + /** + * The center header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHeader?: string; + /** + * The left footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftFooter?: string; + /** + * The left header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftHeader?: string; + /** + * The right footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightFooter?: string; + /** + * The right header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + defaultForAllPages?: Excel.Interfaces.HeaderFooterUpdateData; + /** + * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + evenPages?: Excel.Interfaces.HeaderFooterUpdateData; + /** + * The first page header/footer, for all other pages general or even/odd is used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPage?: Excel.Interfaces.HeaderFooterUpdateData; + /** + * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + oddPages?: Excel.Interfaces.HeaderFooterUpdateData; + /** + * The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 RangeAreasCollection object, for use in `rangeAreasCollection.set({ ... })`. */ + interface RangeAreasCollectionUpdateData { + items?: Excel.Interfaces.RangeAreasData[]; + } + /** 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 Comment object, for use in `comment.set({ ... })`. */ + interface CommentUpdateData { + /** + * The comment's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: string; + /** + * The comment thread status. A value of `true` means that the comment thread is resolved. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + } + /** 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 CommentReply object, for use in `commentReply.set({ ... })`. */ + interface CommentReplyUpdateData { + /** + * The comment reply's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: string; + } + /** 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 this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.Interfaces.ShapeFillUpdateData; + /** + * Returns the line formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatUpdateData; + /** + * Specifies the alternative description text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextDescription?: string; + /** + * Specifies the alternative title text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextTitle?: string; + /** + * Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"; + /** + * Specifies the height, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + height?: number; + /** + * The distance, in points, from the left side of the shape to the left side of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: number; + /** + * Specifies if the aspect ratio of this shape is locked. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lockAspectRatio?: boolean; + /** + * Specifies the name of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: string; + /** + * Represents how the object is attached to the cells below it. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + placement?: Excel.Placement | "TwoCell" | "OneCell" | "Absolute"; + /** + * Specifies the rotation, in degrees, of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rotation?: number; + /** + * Specifies the share link to an Office Script file on OneDrive that will be associated with this shape. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + scriptLink?: string; + /** + * The distance, in points, from the top edge of the shape to the top edge of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: number; + /** + * Specifies if the shape is visible. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 Line object, for use in `line.set({ ... })`. */ + interface LineUpdateData { + /** + * Represents the length of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadLength?: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; + /** + * Represents the style of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadStyle?: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; + /** + * Represents the width of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadWidth?: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; + /** + * Represents the length of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadLength?: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; + /** + * Represents the style of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadStyle?: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; + /** + * Represents the width of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadWidth?: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; + /** + * Represents the connector type for the line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectorType?: Excel.ConnectorType | "Straight" | "Elbow" | "Curve"; + } + /** An interface for updating data on the ShapeFill object, for use in `shapeFill.set({ ... })`. */ + interface ShapeFillUpdateData { + /** + * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + foregroundColor?: string; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency?: number; + } + /** An interface for updating data on the ShapeLineFormat object, for use in `shapeLineFormat.set({ ... })`. */ + interface ShapeLineFormatUpdateData { + /** + * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashStyle?: Excel.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: Excel.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency?: number; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + weight?: number; + } + /** An interface for updating data on the TextFrame object, for use in `textFrame.set({ ... })`. */ + interface TextFrameUpdateData { + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeSetting?: Excel.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin?: number; + /** + * Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalAlignment?: Excel.ShapeTextHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; + /** + * Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalOverflow?: Excel.ShapeTextHorizontalOverflow | "Overflow" | "Clip"; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin?: number; + /** + * Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation?: Excel.ShapeTextOrientation | "Horizontal" | "Vertical" | "Vertical270" | "WordArtVertical" | "EastAsianVertical" | "MongolianVertical" | "WordArtVerticalRTL"; + /** + * Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder?: Excel.ShapeTextReadingOrder | "LeftToRight" | "RightToLeft"; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin?: number; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin?: number; + /** + * Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalAlignment?: Excel.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom" | "Justified" | "Distributed"; + /** + * Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalOverflow?: Excel.ShapeTextVerticalOverflow | "Overflow" | "Ellipsis" | "Clip"; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + font?: Excel.Interfaces.ShapeFontUpdateData; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + italic?: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: string; + /** + * Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + size?: number; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underline?: Excel.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + } + /** An interface for updating data on the Slicer object, for use in `slicer.set({ ... })`. */ + interface SlicerUpdateData { + /** + * The style applied to the slicer. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + slicerStyle?: Excel.Interfaces.SlicerStyleUpdateData; + /** + * Represents the worksheet containing the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheet?: Excel.Interfaces.WorksheetUpdateData; + /** + * Represents the caption of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + caption?: string; + /** + * Represents the height, in points, of the slicer. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: number; + /** + * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: number; + /** + * Represents the name of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + /** + * Represents the slicer name used in the formula. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula?: string; + /** + * Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + sortBy?: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"; + /** + * Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + style?: string; + /** + * Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: number; + /** + * Represents the width, in points, of the slicer. + Throws an `InvalidArgument` error when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: number; + } + /** An interface for updating data on the SlicerCollection object, for use in `slicerCollection.set({ ... })`. */ + interface SlicerCollectionUpdateData { + items?: Excel.Interfaces.SlicerData[]; + } + /** An interface for updating data on the SlicerItem object, for use in `slicerItem.set({ ... })`. */ + interface SlicerItemUpdateData { + /** + * Value is `true` if the slicer item is selected. + Setting this value will not clear the selected state of other slicer items. + By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSelected?: boolean; + } + /** An interface for updating data on the SlicerItemCollection object, for use in `slicerItemCollection.set({ ... })`. */ + interface SlicerItemCollectionUpdateData { + items?: Excel.Interfaces.SlicerItemData[]; + } + /** An interface for updating data on the Ribbon object, for use in `ribbon.set({ ... })`. */ + interface RibbonUpdateData { + /** + * The active ribbon tab. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + activeTab?: Excel.RibbonTab | "Others" | "Home" | "Insert" | "Draw" | "PageLayout" | "Formulas" | "Data" | "Review" | "View" | "Developer" | "AddIns" | "Help"; + } + /** An interface for updating data on the LinkedDataTypeCollection object, for use in `linkedDataTypeCollection.set({ ... })`. */ + interface LinkedDataTypeCollectionUpdateData { + items?: Excel.Interfaces.LinkedDataTypeData[]; + } + /** An interface for updating data on the NamedSheetView object, for use in `namedSheetView.set({ ... })`. */ + interface NamedSheetViewUpdateData { + /** + * Gets or sets the name of the sheet view. + The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + name?: string; + } + /** An interface for updating data on the NamedSheetViewCollection object, for use in `namedSheetViewCollection.set({ ... })`. */ + interface NamedSheetViewCollectionUpdateData { + items?: Excel.Interfaces.NamedSheetViewData[]; + } + /** An interface describing the data returned by calling `externalCodeService.toJSON()`. */ + interface ExternalCodeServiceData { + } + /** An interface describing the data returned by calling `externalCodeServiceDiagnostics.toJSON()`. */ + interface ExternalCodeServiceDiagnosticsData { + /** + * The ID is a special property needed for events. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + } + /** An interface describing the data returned by calling `vbaRecorder.toJSON()`. */ + interface VbaRecorderData { + /** + * ID for the VBA Recorder. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + } + /** An interface describing the data returned by calling `worksheetOptimizationScanResult.toJSON()`. */ + interface WorksheetOptimizationScanResultData { + /** + * The number of cells that are allocated in the worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allocatedCells?: number; + /** + * The number of cells in the worksheet that can be optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + optimizableCells?: number; + } + /** An interface describing the data returned by calling `allowEditRange.toJSON()`. */ + interface AllowEditRangeData { + /** + * Specifies the range associated with the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + address?: string; + /** + * Specifies if the object is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPasswordProtected?: boolean; + /** + * Specifies the title of the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. + If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + title?: string; + } + /** An interface describing the data returned by calling `allowEditRangeCollection.toJSON()`. */ + interface AllowEditRangeCollectionData { + items?: Excel.Interfaces.AllowEditRangeData[]; + } + /** An interface describing the data returned by calling `query.toJSON()`. */ + interface QueryData { + /** + * Gets the query error message from when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + error?: Excel.QueryError | "Unknown" | "None" | "FailedLoadToWorksheet" | "FailedLoadToDataModel" | "FailedDownload" | "FailedToCompleteDownload"; + /** + * Gets the query loaded to object type. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + loadedTo?: Excel.LoadToType | "ConnectionOnly" | "Table" | "PivotTable" | "PivotChart"; + /** + * Specifies if the query loaded to the data model. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + loadedToDataModel?: boolean; + /** + * Gets the name of the query. + Query names cannot contain periods or quotation marks. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + name?: string; + /** + * Gets the date and time when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + refreshDate?: Date; + /** + * Gets the number of rows that were loaded when the query was last refreshed. + If last refresh has errors the value will be -1. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + rowsLoadedCount?: number; + } + /** An interface describing the data returned by calling `queryCollection.toJSON()`. */ + interface QueryCollectionData { + items?: Excel.Interfaces.QueryData[]; + } + /** An interface describing the data returned by calling `visualTracker.toJSON()`. */ + interface VisualTrackerData { + /** + * ID for the visual tracker. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + } + /** An interface describing the data returned by calling `numberFormatProperty.toJSON()`. */ + interface NumberFormatPropertyData { + /** + * Indicates if the number format is of type currency. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + currency?: boolean; + /** + * Indicates if the number format is of type date-time. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dateTime?: boolean; + /** + * Indicates if the date-time format has day-of-week. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dateTimeHasDayOfWeek?: boolean; + /** + * Indicates if the date-time format has month. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dateTimeHasMonth?: boolean; + /** + * Indicates if the date-time format has year. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dateTimeHasYear?: boolean; + /** + * A key that corresponds to a number format. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + key?: string; + /** + * Indicates if the number format is of type numeric. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + numeric?: boolean; + /** + * Indicates if the number format is of type percentage. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percent?: boolean; + /** + * Indicates if the number format is of type text. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + text?: boolean; + } + /** An interface describing the data returned by calling `numberFormatPropertyCollection.toJSON()`. */ + interface NumberFormatPropertyCollectionData { + items?: Excel.Interfaces.NumberFormatPropertyData[]; + } + /** An interface describing the data returned by calling `rangeOptimization.toJSON()`. */ + interface RangeOptimizationData { + /** + * The list of optimizations that can be applied to this range. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + optimizationTypes?: Excel.RangeOptimizationType[]; + /** + * The address of a range that can be optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + range?: string; + } + /** An interface describing the data returned by calling `rangeOptimizationCollection.toJSON()`. */ + interface RangeOptimizationCollectionData { + items?: Excel.Interfaces.RangeOptimizationData[]; + } + /** An interface describing the data returned by calling `worksheetOptimizationResult.toJSON()`. */ + interface WorksheetOptimizationResultData { + /** + * The number of cells that were allocated in the worksheet + before the optimization took place. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allocatedCells?: number; + /** + * The number of cells that were optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + optimizedCells?: number; + } + /** An interface describing the data returned by calling `linkedWorkbook.toJSON()`. */ + interface LinkedWorkbookData { + /** + * The original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + id?: string; + } + /** An interface describing the data returned by calling `linkedWorkbookCollection.toJSON()`. */ + interface LinkedWorkbookCollectionData { + items?: Excel.Interfaces.LinkedWorkbookData[]; + } + /** An interface describing the data returned by calling `documentTaskChange.toJSON()`. */ + interface DocumentTaskChangeData { + /** + * Represents the user assigned to the task for an `assign` change action, or the user unassigned from the task for an `unassign` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignee?: Excel.EmailIdentity; + /** + * Represents the identity of the user who made the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + changedBy?: Excel.EmailIdentity; + /** + * Represents the ID of the comment or commentReply to which the task change is anchored. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + commentId?: string; + /** + * Represents creation date and time of the task change record. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: Date; + /** + * Represents the task's due date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the due date and time. It should be set together with `startDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dueDateTime?: Date; + /** + * The unique GUID of the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + /** + * Represents the task's completion percentage. It is used for the `setPercentComplete` change action. + This is a value betwen 0 and 100, where 100 represents a completed task.Changing this value to 100 also completes the associated comment.Changing the completion from 100 to a lower value reactivates the associated comment. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: number; + /** + * Represents the task's priority. It is used for the `setPriority` change action. + This is a value between 0 and 10, with 5 being the default priority if not set, and where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: number; + /** + * Represents the task's start date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the start date and time. It should be set together with `dueDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startDateTime?: Date; + /** + * Represents the task's title. It is used for `setTitle` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: string; + /** + * Represents the action type of the task change record. Some examples of action types are assign, undo, and setPriority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: Excel.DocumentTaskChangeAction | "unknown" | "create" | "assign" | "unassign" | "unassignAll" | "setSchedule" | "setPercentComplete" | "setPriority" | "remove" | "restore" | "setTitle" | "undo"; + /** + * Represents the `DocumentTaskChange.id` property that was undone for the `undo` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + undoChangeId?: string; + } + /** An interface describing the data returned by calling `documentTaskChangeCollection.toJSON()`. */ + interface DocumentTaskChangeCollectionData { + items?: Excel.Interfaces.DocumentTaskChangeData[]; + } + /** An interface describing the data returned by calling `documentTask.toJSON()`. */ + interface DocumentTaskData { + /** + * Returns a collection of assignees of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignees?: Excel.EmailIdentity[]; + /** + * Gets the most recent user to have completed the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completedBy?: Excel.EmailIdentity; + /** + * Gets the date and time that the task was completed. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completedDateTime?: Date; + /** + * Gets the user who created the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdBy?: Excel.EmailIdentity; + /** + * Gets the date and time that the task was created. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: Date; + /** + * Gets the ID of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + /** + * Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: number; + /** + * Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: number; + /** + * Gets or sets the date and time the task should start and is due. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startAndDueDateTime?: Excel.DocumentTaskSchedule; + /** + * Specifies title of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: string; + } + /** An interface describing the data returned by calling `documentTaskCollection.toJSON()`. */ + interface DocumentTaskCollectionData { + items?: Excel.Interfaces.DocumentTaskData[]; + } + /** An interface describing the data returned by calling `dataConnection.toJSON()`. */ + interface DataConnectionData { + /** + * Specifies the data returned based on the command type. + If data source type is SQL, this is a SQL query used to retrieve the data. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + commandText?: string; + /** + * The connection string containing the information needed to establish a connection to the data source. + Refer to the documentation for the specific data source type for more information on what information this string should contain and how it should be formatted. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + connectionString?: string; + /** + * The data source type of the connection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dataSourceType?: Excel.DataSourceType | "Unknown" | "Cube" | "LocalRange" | "LocalTable" | "OledbDefault"; + /** + * The name of the connection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: string; + } + /** An interface describing the data returned by calling `runtime.toJSON()`. */ + interface RuntimeData { + /** + * Toggle JavaScript events in the current task pane or content add-in. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableEvents?: boolean; + } + /** An interface describing the data returned by calling `application.toJSON()`. */ + interface ApplicationData { + /** + * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + cultureInfo?: Excel.Interfaces.CultureInfoData; + /** + * Returns the iterative calculation settings. + In Excel on Windows and Mac, the settings will apply to the Excel Application. + In Excel on the web and other platforms, the settings will apply to the active workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + iterativeCalculation?: Excel.Interfaces.IterativeCalculationData; + /** + * Gets the ribbon of the application. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + ribbon?: Excel.Interfaces.RibbonData; + /** + * Returns the Excel calculation engine version used for the last full recalculation. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode?: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + /** + * Returns the calculation state of the application. See `Excel.CalculationState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + calculationState?: Excel.CalculationState | "Done" | "Calculating" | "Pending"; + /** + * Gets the string used as the decimal separator for numeric values. This is based on the local Excel settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + decimalSeparator?: string; + /** + * Specifies whether the "Format Stale values" button under Calculation Options is turned on or off. + The stale formulas are rendered with stale formatting if the button is turned on. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + formatStaleValues?: boolean; + /** + * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on the local Excel settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + thousandsSeparator?: string; + /** + * Specifies if the system separators of Excel are enabled. + System separators include the decimal separator and thousands separator. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + useSystemSeparators?: boolean; + } + /** An interface describing the data returned by calling `iterativeCalculation.toJSON()`. */ + interface IterativeCalculationData { + /** + * True if Excel will use iteration to resolve circular references. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enabled?: boolean; + /** + * Specifies the maximum amount of change between each iteration as Excel resolves circular references. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxChange?: number; + /** + * Specifies the maximum number of iterations that Excel can use to resolve a circular reference. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxIteration?: number; + } + /** An interface describing the data returned by calling `workbook.toJSON()`. */ + interface WorkbookData { + /** + * Represents a collection of bindings that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bindings?: Excel.Interfaces.BindingData[]; + /** + * Represents a collection of comments associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + comments?: Excel.Interfaces.CommentData[]; + /** + * Represents the collection of custom XML parts contained by this workbook. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + customXmlParts?: Excel.Interfaces.CustomXmlPartData[]; + /** + * Represents a collection of workbook-scoped named items (named ranges and constants). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + names?: Excel.Interfaces.NamedItemData[]; + /** + * Represents a collection of PivotTableStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + pivotTableStyles?: Excel.Interfaces.PivotTableStyleData[]; + /** + * Represents a collection of PivotTables associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + pivotTables?: Excel.Interfaces.PivotTableData[]; + /** + * Gets the workbook properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + properties?: Excel.Interfaces.DocumentPropertiesData; + /** + * Returns the protection object for a workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + protection?: Excel.Interfaces.WorkbookProtectionData; + /** + * Represents a collection of settings associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + settings?: Excel.Interfaces.SettingData[]; + /** + * Represents a collection of SlicerStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + slicerStyles?: Excel.Interfaces.SlicerStyleData[]; + /** + * Represents a collection of slicers associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + slicers?: Excel.Interfaces.SlicerData[]; + /** + * Represents a collection of styles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + styles?: Excel.Interfaces.StyleData[]; + /** + * Represents a collection of TableStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + tableStyles?: Excel.Interfaces.TableStyleData[]; + /** + * Represents a collection of tables associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableData[]; + /** + * Represents a collection of TimelineStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + timelineStyles?: Excel.Interfaces.TimelineStyleData[]; + /** + * Represents a collection of worksheets associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + worksheets?: Excel.Interfaces.WorksheetData[]; + /** + * Specifies if the workbook is in AutoSave mode. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSave?: boolean; + /** + * Returns a number about the version of Excel Calculation Engine. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartDataPointTrack?: boolean; + /** + * Specifies if changes have been made since the workbook 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isDirty?: boolean; + /** + * Gets the workbook name. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * Specifies if the workbook has ever been saved locally or online. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + previouslySaved?: boolean; + /** + * Returns `true` if the workbook is open in read-only mode. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readOnly?: boolean; + /** + * Specifies whether the PivotTable's field list pane is shown at the workbook level. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showPivotFieldList?: boolean; + /** + * True if the workbook uses the 1904 date system. + * + * @remarks + * [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`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + usePrecisionAsDisplayed?: boolean; + } + /** An interface describing the data returned by calling `workbookProtection.toJSON()`. */ + interface WorkbookProtectionData { + /** + * Specifies if the workbook is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + protected?: boolean; + } + /** An interface describing the data returned by calling `workbookCreated.toJSON()`. */ + interface WorkbookCreatedData { + } + /** An interface describing the data returned by calling `worksheet.toJSON()`. */ + interface WorksheetData { + /** + * Represents the `AutoFilter` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterData; + /** + * Returns a collection of charts that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartData[]; + /** + * Returns a collection of all the Comments objects on the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + comments?: Excel.Interfaces.CommentData[]; + /** + * Gets a collection of worksheet-level custom properties. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + customProperties?: Excel.Interfaces.WorksheetCustomPropertyData[]; + /** + * Gets the horizontal page break collection for the worksheet. This collection only contains manual page breaks. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalPageBreaks?: Excel.Interfaces.PageBreakData[]; + /** + * Collection of names scoped to the current worksheet. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + names?: Excel.Interfaces.NamedItemData[]; + /** + * Gets the `PageLayout` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pageLayout?: Excel.Interfaces.PageLayoutData; + /** + * Collection of PivotTables that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + pivotTables?: Excel.Interfaces.PivotTableData[]; + /** + * Returns the sheet protection object for a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionData; + /** + * Returns the collection of all the Shape objects on the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shapes?: Excel.Interfaces.ShapeData[]; + /** + * Returns a collection of slicers that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + slicers?: Excel.Interfaces.SlicerData[]; + /** + * Collection of tables that are part of the worksheet. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalPageBreaks?: Excel.Interfaces.PageBreakData[]; + /** + * Returns a collection of visuals that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + visuals?: Excel.Interfaces.VisualData[]; + /** + * Determines if Excel should recalculate the worksheet when necessary. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * The display name of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * The zero-based position of the worksheet within the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: number; + /** + * Specifies if gridlines are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showGridlines?: boolean; + /** + * Specifies if headings are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showHeadings?: boolean; + /** + * Returns the standard (default) height of all the rows in the worksheet, in points. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardHeight?: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardWidth?: number; + /** + * The tab color of the worksheet. + 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 #RRGGBB (e.g., "FFA500"). + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tabColor?: string; + /** + * Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + tabId?: number; + /** + * The visibility of the worksheet. + * + * @remarks + * [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 { + /** + * Specifies the `AllowEditRangeCollection` object found in this worksheet. This is a collection of `AllowEditRange` objects, which work with worksheet protection properties. + When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + allowEditRanges?: Excel.Interfaces.AllowEditRangeData[]; + /** + * Specifies if protection can be paused for this worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + canPauseProtection?: boolean; + /** + * Specifies if the sheet is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPasswordProtected?: boolean; + /** + * Specifies if worksheet protection is paused. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPaused?: boolean; + /** + * Specifies the protection options for the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + options?: Excel.WorksheetProtectionOptions; + /** + * Specifies if the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protected?: boolean; + /** + * Specifies the protection options saved in the worksheet. + This will return the same `WorksheetProtectionOptions` object regardless of the worksheet protection state. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + savedOptions?: Excel.WorksheetProtectionOptions; + } + /** An interface describing the data returned by calling `range.toJSON()`. */ + interface RangeData { + /** + * The collection of `ConditionalFormats` that intersect the range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + conditionalFormats?: Excel.Interfaces.ConditionalFormatData[]; + /** + * Returns a data validation object. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataValidation?: Excel.Interfaces.DataValidationData; + /** + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatData; + /** + * Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + address?: string; + /** + * Represents the range reference for the specified range in the language of the user. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + addressLocal?: string; + /** + * Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + cellCount?: number; + /** + * Specifies the total number of columns in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnCount?: number; + /** + * Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * Specifies the column number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnIndex?: number; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: any[][]; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + hasSpill?: boolean; + /** + * Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: number; + /** + * Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * Represents the hyperlink for the current range. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hyperlink?: Excel.RangeHyperlink; + /** + * Represents if the current range is an entire column. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isEntireColumn?: boolean; + /** + * Represents if the current range is an entire row. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isEntireRow?: boolean; + /** + * Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: number; + /** + * Represents the data type state of each cell. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkedDataTypeState?: Excel.LinkedDataTypeState[][]; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + numberFormat?: any[][]; + /** + * Represents the category of number format of each cell. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + numberFormatCategories?: Excel.NumberFormatCategory[][]; + /** + * Represents Excel's number format code for the given range, based on the language settings of the user. + Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. + Any returned text uses the locally-formatted strings based on the language specified in the system settings. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: any[][]; + /** + * Returns the total number of rows in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rowCount?: number; + /** + * Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHidden?: boolean; + /** + * Returns the row number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rowIndex?: number; + /** + * Represents if all the cells would be saved as an array formula. + Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. + Returns `null` if some cells would be saved as an array formula and some would not be. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + savedAsArray?: 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + style?: string; + /** + * Text values of the specified range. The text value will not depend on the cell width. The number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: string[][]; + /** + * Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: number; + /** + * Specifies the type of data in each cell. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + valueTypes?: Excel.RangeValueType[][]; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + /** + * Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: number; + } + /** An interface describing the data returned by calling `rangeAreas.toJSON()`. */ + interface RangeAreasData { + /** + * Returns a collection of rectangular ranges that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + areas?: Excel.Interfaces.RangeData[]; + /** + * Returns a collection of conditional formats that intersect with any cells in this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + conditionalFormats?: Excel.Interfaces.ConditionalFormatData[]; + /** + * Returns a data validation object for all ranges in the `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dataValidation?: Excel.Interfaces.DataValidationData; + /** + * Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.Interfaces.RangeFormatData; + /** + * Returns the `RangeAreas` 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"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + address?: string; + /** + * Returns the `RangeAreas` reference in the user locale. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + addressLocal?: string; + /** + * Returns the number of rectangular ranges that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + cellCount?: number; + /** + * Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isEntireColumn?: boolean; + /** + * Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: string; + } + /** An interface describing the data returned by calling `workbookRangeAreas.toJSON()`. */ + interface WorkbookRangeAreasData { + /** + * Returns the `RangeAreasCollection` object. Each `RangeAreas` in the collection represent one or more rectangle ranges in one worksheet. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + areas?: Excel.Interfaces.RangeAreasData[]; + /** + * Returns ranges that comprise this object in a `RangeCollection` object. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + ranges?: Excel.Interfaces.RangeData[]; + /** + * Returns an array of addresses in A1-style. Address values contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + addresses?: string[]; + } + /** An interface describing the data returned by calling `rangeView.toJSON()`. */ + interface RangeViewData { + /** + * Represents a collection of range views associated with the range. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + rows?: Excel.Interfaces.RangeViewData[]; + /** + * Represents the cell addresses of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: any[][]; + /** + * The number of visible columns. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + columnCount?: number; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: any[][]; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: any[][]; + /** + * Returns a value that represents the index of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + index?: number; + /** + * Represents Excel's number format code for the given cell. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + numberFormat?: any[][]; + /** + * The number of visible rows. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + text?: string[][]; + /** + * Represents the type of data of each cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** 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 { + /** + * The key that represents the ID of the setting. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + key?: string; + /** + * Represents the value stored for this setting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + arrayValues?: Excel.Interfaces.NamedItemArrayValuesData; + /** + * Specifies the comment associated with this name. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + comment?: string; + /** + * The formula of the named item. Formulas always start with an equal sign ("="). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formula?: any; + /** + * The name of the object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + scope?: Excel.NamedItemScope | "Worksheet" | "Workbook"; + /** + * Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + value?: any; + /** + * A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJson?: CellValue | string; + /** + * A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJsonLocal?: CellValue | string; + /** + * Specifies if the object is visible. + * + * @remarks + * [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 + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + types?: Excel.RangeValueType[][]; + /** + * Represents the values of each item in the named item array. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + values?: any[][]; + /** + * A JSON representation of the values in this named item array. + Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItemArrayValues.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in this named item array. + Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItemArrayValues.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** An interface describing the data returned by calling `binding.toJSON()`. */ + interface BindingData { + /** + * Represents the binding identifier. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * Returns the type of the binding. See `Excel.BindingType` for details. + * + * @remarks + * [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 `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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterData; + /** + * Represents a collection of all the columns in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnData[]; + /** + * Represents a collection of all the rows in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowData[]; + /** + * Represents the sorting for the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortData; + /** + * The style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableStyle?: Excel.Interfaces.TableStyleData; + /** + * Specifies if the first column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * Specifies if the last column contains special formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * Returns a numeric ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + legacyId?: string; + /** + * Name of the table. + + The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * Specifies if the header row is visible. This value can be set to show or remove the header row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * Specifies if the total row is visible. This value can be set to show or remove the total row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [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 { + /** + * Retrieves the filter applied to the column. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + filter?: Excel.Interfaces.FilterData; + /** + * Returns a unique key that identifies the column within the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: number; + /** + * Returns the index number of the column within the columns collection of the table. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + index?: number; + /** + * Specifies the name of the table column. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + index?: number; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** An interface describing the data returned by calling `dataValidation.toJSON()`. */ + interface DataValidationData { + /** + * Error alert when user enters invalid data. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + errorAlert?: Excel.DataValidationErrorAlert; + /** + * Specifies if data validation will be performed on blank cells. Default is `true`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + ignoreBlanks?: boolean; + /** + * Prompt when users select a cell. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + prompt?: Excel.DataValidationPrompt; + /** + * Data validation rule that contains different type of data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + rule?: Excel.DataValidationRule; + /** + * Type of the data validation, see `Excel.DataValidationType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + valid?: boolean; + } + /** An interface describing the data returned by calling `removeDuplicatesResult.toJSON()`. */ + interface RemoveDuplicatesResultData { + /** + * Number of duplicated rows removed by the operation. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + removed?: number; + /** + * Number of remaining unique rows present in the resulting range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + uniqueRemaining?: number; + } + /** An interface describing the data returned by calling `rangeFormat.toJSON()`. */ + interface RangeFormatData { + /** + * Collection of border objects that apply to the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderData[]; + /** + * Returns the fill object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillData; + /** + * Returns the font object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontData; + /** + * Returns the format protection object for a range. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionData; + /** + * Specifies if text is automatically indented when text alignment is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoIndent?: boolean; + /** + * Specifies the width of all colums within the range. If the column widths are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnWidth?: number; + /** + * Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + indentLevel?: number; + /** + * The reading order for the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * The height of all rows in the range. If the row heights are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHeight?: number; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shrinkToFit?: boolean; + /** + * 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. + * + * @remarks + * [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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardHeight?: boolean; + /** + * Specifies if 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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardWidth?: boolean; + /** + * Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** An interface describing the data returned by calling `formatProtection.toJSON()`. */ + interface FormatProtectionData { + /** + * Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. + * + * @remarks + * [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 background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * 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 a uniform pattern setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + /** + * The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternColor?: string; + /** + * Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternTintAndShade?: number; + /** + * Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + } + /** An interface describing the data returned by calling `rangeBorder.toJSON()`. */ + interface RangeBorderData { + /** + * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Constant value that indicates the specific side of the border. See `Excel.BorderIndex` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + /** + * Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. + * + * @remarks + * [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 the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Specifies the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Font size. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + strikethrough?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subscript?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + superscript?: boolean; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform font `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + /** + * Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesData; + /** + * Represents the data labels on the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsData; + /** + * Encapsulates the format properties for the chart area. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatData; + /** + * Represents the legend for the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendData; + /** + * Encapsulates the options for a pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pivotOptions?: Excel.Interfaces.ChartPivotOptionsData; + /** + * Represents the plot area for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotArea?: Excel.Interfaces.ChartPlotAreaData; + /** + * Represents either a single series or collection of series in the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + series?: Excel.Interfaces.ChartSeriesData[]; + /** + * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleData; + /** + * Specifies a chart category label level enumeration constant, referring to the level of the source category labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel?: number; + /** + * Specifies the type of the chart. See `Excel.ChartType` for details. + * + * @remarks + * [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"; + /** + * Specifies the way that blank cells are plotted on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs?: Excel.ChartDisplayBlanksAs | "NotPlotted" | "Zero" | "Interplotted"; + /** + * Specifies the height, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + height?: number; + /** + * The unique ID of chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + id?: string; + /** + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + left?: number; + /** + * Specifies the name of a chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Specifies the way columns or rows are used as data series on the chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly?: boolean; + /** + * Specifies a chart series name level enumeration constant, referring to the level of the source series names. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel?: number; + /** + * Specifies whether to display all field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. + If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum?: boolean; + /** + * Specifies the chart style for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + style?: number; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + top?: number; + /** + * Specifies the width, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling `chartPivotOptions.toJSON()`. */ + interface ChartPivotOptionsData { + /** + * Specifies whether to display the 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showAxisFieldButtons?: boolean; + /** + * Specifies whether to display the legend field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLegendFieldButtons?: boolean; + /** + * Specifies whether to display the report filter field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showReportFilterFieldButtons?: boolean; + /** + * Specifies whether to display the show value field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showValueFieldButtons?: boolean; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + /** + * Specifies the color scheme of the chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + colorScheme?: Excel.ChartColorScheme | "ColorfulPalette1" | "ColorfulPalette2" | "ColorfulPalette3" | "ColorfulPalette4" | "MonochromaticPalette1" | "MonochromaticPalette2" | "MonochromaticPalette3" | "MonochromaticPalette4" | "MonochromaticPalette5" | "MonochromaticPalette6" | "MonochromaticPalette7" | "MonochromaticPalette8" | "MonochromaticPalette9" | "MonochromaticPalette10" | "MonochromaticPalette11" | "MonochromaticPalette12" | "MonochromaticPalette13"; + /** + * Specifies if the chart area of the chart has rounded corners. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + roundedCorners?: boolean; + } + /** 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 { + /** + * Encapsulates the bin options for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + binOptions?: Excel.Interfaces.ChartBinOptionsData; + /** + * Encapsulates the options for the box and whisker charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsData; + /** + * Represents a collection of all data labels in the series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsData; + /** + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatData; + /** + * Encapsulates the options for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + mapOptions?: Excel.Interfaces.ChartMapOptionsData; + /** + * Returns a collection of all points in the series. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointData[]; + /** + * The collection of trendlines in the series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + trendlines?: Excel.Interfaces.ChartTrendlineData[]; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + xErrorBars?: Excel.Interfaces.ChartErrorBarsData; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + yErrorBars?: Excel.Interfaces.ChartErrorBarsData; + /** + * Specifies the group for the specified series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bubbleScale?: number; + /** + * Represents the chart type of a series. See `Excel.ChartType` for details. + * + * @remarks + * [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 doughnut exploded charts. + Throws an `InvalidArgument` error on invalid charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: number; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + explosion?: number; + /** + * Specifies if the series is filtered. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + filtered?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + gapWidth?: number; + /** + * Specifies the color for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumColor?: string; + /** + * Specifies the type for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumValue?: number; + /** + * Specifies the color for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointColor?: string; + /** + * Specifies the type for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointValue?: number; + /** + * Specifies the color for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumColor?: string; + /** + * Specifies the type for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumValue?: number; + /** + * Specifies the series gradient style of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientStyle?: Excel.ChartGradientStyle | "TwoPhaseColor" | "ThreePhaseColor"; + /** + * Specifies if the series has data labels. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * Specifies the fill color for negative data points in a series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + invertColor?: string; + /** + * True if Excel inverts the pattern in the item when it corresponds to a negative number. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + invertIfNegative?: boolean; + /** + * Specifies the marker background color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * Specifies the marker foreground color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * Specifies the marker size of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + /** + * Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + overlap?: number; + /** + * Specifies the series parent label strategy area for a treemap chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentLabelStrategy?: Excel.ChartParentLabelStrategy | "None" | "Banner" | "Overlapping"; + /** + * Specifies the plot order of a chart series within the chart group. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + plotOrder?: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + secondPlotSize?: number; + /** + * Specifies whether connector lines are shown in waterfall charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showConnectorLines?: boolean; + /** + * Specifies whether leader lines are displayed for each data label in the series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLeaderLines?: boolean; + /** + * Specifies if the series has a shadow. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies if the series is smooth. Only applicable to line and scatter charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + /** + * Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitType?: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + /** + * Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + splitValue?: number; + /** + * True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + varyByCategories?: boolean; + } + /** An interface describing the data returned by calling `chartSeriesFormat.toJSON()`. */ + interface ChartSeriesFormatData { + /** + * Represents line formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelData; + /** + * Encapsulates the format properties chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatData; + /** + * Represents whether a data point has a data label. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * Represents marker size of a data point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisData; + /** + * Represents the series axis of a 3-D chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisData; + /** + * Represents the value axis in an axis. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatData; + /** + * Returns an object that represents the major gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesData; + /** + * Returns an object that represents the minor gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesData; + /** + * Represents the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleData; + /** + * Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + alignment?: Excel.ChartTickLabelAlignment | "Center" | "Left" | "Right"; + /** + * Specifies the group for the specified axis. See `Excel.ChartAxisGroup` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * Specifies the base unit for the specified category axis. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * Specifies the category axis type. + * + * @remarks + * [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. + * Specifies the specified axis where the other axis crosses. See `Excel.ChartAxisPosition` for details. + * + * @remarks + * [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. + * Specifies the specified axis where the other axis crosses at. Set to this property should use `SetCrossesAt(double)` method. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + crossesAt?: number; + /** + * Specifies the custom axis display unit value. To set this property, please use the `SetCustomDisplayUnit(double)` method. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + customDisplayUnit?: number; + /** + * Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + displayUnit?: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; + /** + * Specifies the height, in points, of the chart axis. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * Specifies if the value axis crosses the category axis between categories. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isBetweenCategories?: boolean; + /** + * Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * Specifies the base of the logarithm when using logarithmic scales. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + logBase?: number; + /** + * Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + majorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minimum?: any; + /** + * Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + minorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorUnit?: any; + /** + * Specifies if an axis is multilevel. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + multiLevel?: boolean; + /** + * Specifies the format code for the axis tick label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + offset?: number; + /** + * Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * Specifies the axis position where the other axis crosses. You should use the `SetPositionAt(double)` method to set this property. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + positionAt?: number; + /** + * Specifies if Excel plots data points from last to first. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder?: boolean; + /** + * Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + scaleType?: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; + /** + * Specifies if the axis display unit label is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel?: boolean; + /** + * Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: any; + /** + * Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition?: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing?: any; + /** + * Specifies the number of categories or series between tick marks. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing?: number; + /** + * Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * Specifies the axis type. See `Excel.ChartAxisType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: Excel.ChartAxisType | "Invalid" | "Category" | "Value" | "Series"; + /** + * Specifies if the axis is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the chart axis. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + width?: number; + } + /** An interface describing the data returned by calling `chartAxisFormat.toJSON()`. */ + interface ChartAxisFormatData { + /** + * Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + /** + * Specifies chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling `chartAxisTitle.toJSON()`. */ + interface ChartAxisTitleData { + /** + * Specifies the formatting of the chart axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatData; + /** + * Specifies the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + textOrientation?: number; + /** + * Specifies if the axis title is visibile. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling `chartAxisTitleFormat.toJSON()`. */ + interface ChartAxisTitleFormatData { + /** + * Specifies the chart axis title's border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling `chartDataLabels.toJSON()`. */ + interface ChartDataLabelsData { + /** + * Specifies the format of chart data labels, which includes fill and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatData; + /** + * Specifies if data labels automatically generate appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * TODO: + * + * @remarks + * [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"; + /** + * Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when the `TextOrientation` of data label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * Specifies the format code for data labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + separator?: string; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showAsDataCallout?: boolean; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + /** + * Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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 the data label is -90, 90, or 180. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartDataLabelFormatData; + /** + * Specifies if the data label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * String value that represents the formula of chart data label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula?: string; + /** + * TODO: + * + * @remarks + * [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"; + /** + * Returns the height, in points, of the chart data label. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * String value that represents the format code for data label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + separator?: string; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showAsDataCallout?: boolean; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showBubbleSize?: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showCategoryName?: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showLegendKey?: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showPercentage?: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showSeriesName?: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showValue?: boolean; + /** + * String representing the text of the data label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text?: string; + /** + * Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Returns the width, in points, of the chart data label. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Represents the font attributes (such as font name, font size, and color) for a chart data label. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling `chartDataTable.toJSON()`. */ + interface ChartDataTableData { + /** + * Represents the format of a chart data table, which includes fill, font, and border format. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + format?: Excel.Interfaces.ChartDataTableFormatData; + /** + * Specifies whether to display the horizontal border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showHorizontalBorder?: boolean; + /** + * Specifies whether to show the legend key of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showLegendKey?: boolean; + /** + * Specifies whether to display the outline border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showOutlineBorder?: boolean; + /** + * Specifies whether to display the vertical border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showVerticalBorder?: boolean; + /** + * Specifies whether to show the data table of the chart. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling `chartDataTableFormat.toJSON()`. */ + interface ChartDataTableFormatData { + /** + * Represents the border format of chart data table, which includes color, line style, and weight. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Represents the font attributes (such as font name, font size, and color) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling `chartErrorBars.toJSON()`. */ + interface ChartErrorBarsData { + /** + * Specifies the formatting type of the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.Interfaces.ChartErrorBarsFormatData; + /** + * Specifies if error bars have an end style cap. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endStyleCap?: boolean; + /** + * Specifies which parts of the error bars to include. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + include?: Excel.ChartErrorBarsInclude | "Both" | "MinusValues" | "PlusValues"; + /** + * The type of range marked by the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: Excel.ChartErrorBarsType | "FixedValue" | "Percent" | "StDev" | "StError" | "Custom"; + /** + * Specifies whether the error bars are displayed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling `chartErrorBarsFormat.toJSON()`. */ + interface ChartErrorBarsFormatData { + /** + * Represents the chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling `chartGridlines.toJSON()`. */ + interface ChartGridlinesData { + /** + * Represents the formatting of chart gridlines. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatData; + /** + * Specifies if the axis gridlines are visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling `chartGridlinesFormat.toJSON()`. */ + interface ChartGridlinesFormatData { + /** + * Represents chart line formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatData; + /** + * Represents a collection of legendEntries in the legend. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + legendEntries?: Excel.Interfaces.ChartLegendEntryData[]; + /** + * Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * Specifies if the chart legend should overlap with the main body of the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; + /** + * Specifies if the legend has a shadow on the chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies the top of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * Specifies if the chart legend is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + width?: number; + } + /** An interface describing the data returned by calling `chartLegendEntry.toJSON()`. */ + interface ChartLegendEntryData { + /** + * Specifies the height of the legend entry on the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * Specifies the index of the legend entry in the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + index?: number; + /** + * Specifies the left value of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies the top of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * Represents the visibility of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * Represents the width of the legend entry on the chart Legend. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Represents the font attributes such as font name, font size, and color of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling `chartMapOptions.toJSON()`. */ + interface ChartMapOptionsData { + /** + * Specifies the series map labels strategy of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + labelStrategy?: Excel.ChartMapLabelStrategy | "None" | "BestFit" | "ShowAll"; + /** + * Specifies the series mapping level of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: Excel.ChartMapAreaLevel | "Automatic" | "DataOnly" | "City" | "County" | "State" | "Country" | "Continent" | "World"; + /** + * Specifies the series projection type of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + projectionType?: Excel.ChartMapProjectionType | "Automatic" | "Mercator" | "Miller" | "Robinson" | "Albers"; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatData; + /** + * Returns the height, in points, of the chart title. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * Specifies the horizontal alignment for chart title. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * Specifies if the chart title will overlay the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * Represents the position of chart title. See `Excel.ChartTitlePosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies the chart's title text. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + textOrientation?: number; + /** + * Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Specifies if the chart title is visibile. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the chart title. Value is `null` if the chart title is not visible. + * + * @remarks + * [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, and color of a chart characters object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Represents the font attributes (such as font name, font size, and color) for an object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + color?: string; + /** + * Represents the line style of the border. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + weight?: number; + } + /** An interface describing the data returned by calling `chartBinOptions.toJSON()`. */ + interface ChartBinOptionsData { + /** + * Specifies if bin overflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowOverflow?: boolean; + /** + * Specifies if bin underflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowUnderflow?: boolean; + /** + * Specifies the bin count of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + count?: number; + /** + * Specifies the bin overflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + overflowValue?: number; + /** + * Specifies the bin's type for a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: Excel.ChartBinType | "Category" | "Auto" | "BinWidth" | "BinCount"; + /** + * Specifies the bin underflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underflowValue?: number; + /** + * Specifies the bin width value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: number; + } + /** An interface describing the data returned by calling `chartBoxwhiskerOptions.toJSON()`. */ + interface ChartBoxwhiskerOptionsData { + /** + * Specifies if the quartile calculation type of a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + quartileCalculation?: Excel.ChartBoxQuartileCalculation | "Inclusive" | "Exclusive"; + /** + * Specifies if inner points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showInnerPoints?: boolean; + /** + * Specifies if the mean line is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanLine?: boolean; + /** + * Specifies if the mean marker is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanMarker?: boolean; + /** + * Specifies if outlier points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showOutlierPoints?: boolean; + } + /** An interface describing the data returned by calling `chartLineFormat.toJSON()`. */ + interface ChartLineFormatData { + /** + * HTML color code representing the color of lines in the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Represents the line style. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Represents the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * Font name (e.g., "Calibri") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Size of the font (e.g., 11) + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatData; + /** + * Represents the label of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + label?: Excel.Interfaces.ChartTrendlineLabelData; + /** + * Represents the number of periods that the trendline extends backward. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + backwardPeriod?: number; + /** + * Represents the number of periods that the trendline extends forward. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + intercept?: any; + /** + * Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: number; + /** + * Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: number; + /** + * True if the equation for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showEquation?: boolean; + /** + * True if the r-squared value for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showRSquared?: boolean; + /** + * Represents the type of a chart trendline. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling `chartTrendlineLabel.toJSON()`. */ + interface ChartTrendlineLabelData { + /** + * The format of the chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartTrendlineLabelFormatData; + /** + * Specifies if the trendline label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * String value that represents the formula of the chart trendline label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula?: string; + /** + * Returns the height, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * String value that represents the format code for the trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * String representing the text of the trendline label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text?: string; + /** + * Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Returns the width, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: number; + } + /** An interface describing the data returned by calling `chartTrendlineLabelFormat.toJSON()`. */ + interface ChartTrendlineLabelFormatData { + /** + * Specifies the border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling `chartPlotArea.toJSON()`. */ + interface ChartPlotAreaData { + /** + * Specifies the formatting of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartPlotAreaFormatData; + /** + * Specifies the height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * Specifies the inside height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideHeight?: number; + /** + * Specifies the inside left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideLeft?: number; + /** + * Specifies the inside top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideTop?: number; + /** + * Specifies the inside width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideWidth?: number; + /** + * Specifies the left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies the position of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: Excel.ChartPlotAreaPosition | "Automatic" | "Custom"; + /** + * Specifies the top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * Specifies the width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: number; + } + /** An interface describing the data returned by calling `chartPlotAreaFormat.toJSON()`. */ + interface ChartPlotAreaFormatData { + /** + * Specifies the border attributes of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + } + /** An interface describing the data returned by calling `visualCollection.toJSON()`. */ + interface VisualCollectionData { + items?: Excel.Interfaces.VisualData[]; + } + /** An interface describing the data returned by calling `visual.toJSON()`. */ + interface VisualData { + /** + * The unique ID of this visual instance. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: string; + /** + * Represents if the visual is supported in the new Excel on the web chart format task pane. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSupportedInVisualTaskpane?: boolean; + } + /** An interface describing the data returned by calling `visualProperty.toJSON()`. */ + interface VisualPropertyData { + /** + * Returns `true` if the property should be expandable in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + expandableUI?: boolean; + /** + * Returns true when a default value for this property exists + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + hasDefault?: boolean; + /** + * Returns `true` if the property should be hidden in the UI. Its children will still be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + hideMeButShowChildrenUI?: boolean; + /** + * Returns the property ID. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: string; + /** + * The zero-index value at which the property is present in the parent collection. + Only valid for properties that are children of `VisualPropertyType.Collection`. + Returns `null` otherwise. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + index?: number; + /** + * Returns true when the property's value is currently the default + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isDefault?: boolean; + /** + * Returns the property localized name. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + localizedName?: string; + /** + * Returns the localized property options for `IEnumProperty` only. If property type isn't an enum, it returns `null`. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + localizedOptions?: string[]; + /** + * Returns the maximum value of the property. Only valid for `INumericProperty` properties. Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + max?: number; + /** + * Maximum size of the property. + Only valid for `VisualPropertyType.Collection`. + Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + maxSize?: number; + /** + * Returns the minimum value of the property. Only valid for `INumericProperty` properties. Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + min?: number; + /** + * Minimum size of the property. + Only valid for `VisualPropertyType.Collection`. + Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + minSize?: number; + /** + * Returns `true` if the next property should be on the same line in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + nextPropOnSameLine?: boolean; + /** + * Returns the property options for `IEnumProperty` only. If the property type isn't an enum, it returns `null`. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + options?: string[]; + /** + * Name of the parent property. + Only valid for properties that are children of `VisualPropertyType.Collection`. + Returns `null` otherwise. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + parentName?: string; + /** + * Returns `true` if a reset button for the property should be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + showResetUI?: boolean; + /** + * Size of the property. + Only valid for `VisualPropertyType.Collection`. + Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + size?: number; + /** + * Returns the step size of the property. Only valid for `INumericProperty` properties. Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + stepSize?: number; + /** + * Returns the property type. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + type?: Excel.VisualPropertyType | "Object" | "Collection" | "String" | "Double" | "Int" | "Bool" | "Enum" | "Color"; + /** + * Returns the property value. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + value?: any; + } + /** An interface describing the data returned by calling `visualPropertyCollection.toJSON()`. */ + interface VisualPropertyCollectionData { + items?: Excel.Interfaces.VisualPropertyData[]; + } + /** An interface describing the data returned by calling `tableSort.toJSON()`. */ + interface TableSortData { + /** + * Specifies the current conditions used to last sort the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + fields?: Excel.SortField[]; + /** + * Specifies if the casing impacts the last sort of the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + matchCase?: boolean; + /** + * Represents the Chinese character ordering method last used to sort the table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + criteria?: Excel.FilterCriteria; + } + /** An interface describing the data returned by calling `autoFilter.toJSON()`. */ + interface AutoFilterData { + /** + * An array that holds all the filter criteria in the autofiltered range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + criteria?: Excel.FilterCriteria[]; + /** + * Specifies if the AutoFilter is enabled. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enabled?: boolean; + /** + * Specifies if the AutoFilter has filter criteria. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isDataFiltered?: boolean; + } + /** An interface describing the data returned by calling `cultureInfo.toJSON()`. */ + interface CultureInfoData { + /** + * Defines the culturally appropriate format of displaying date and time. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + datetimeFormat?: Excel.Interfaces.DatetimeFormatInfoData; + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + numberFormat?: Excel.Interfaces.NumberFormatInfoData; + /** + * Gets the culture name in the format languagecode2-country/regioncode2 (e.g., "zh-cn" or "en-us"). This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + name?: string; + } + /** An interface describing the data returned by calling `numberFormatInfo.toJSON()`. */ + interface NumberFormatInfoData { + /** + * Gets the currency symbol for currency values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + currencySymbol?: string; + /** + * Gets the string used as the decimal separator for numeric values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + numberDecimalSeparator?: string; + /** + * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + numberGroupSeparator?: string; + } + /** An interface describing the data returned by calling `datetimeFormatInfo.toJSON()`. */ + interface DatetimeFormatInfoData { + /** + * Gets the string used as the date separator. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + dateSeparator?: string; + /** + * Gets the format string for a long date value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + longDatePattern?: string; + /** + * Gets the format string for a long time value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + longTimePattern?: string; + /** + * Gets the format string for a short date value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + shortDatePattern?: string; + /** + * Gets the string used as the time separator. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + timeSeparator?: string; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: string; + /** + * The custom XML part's namespace URI. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: string; + } + /** An interface describing the data returned by calling `pivotTableScopedCollection.toJSON()`. */ + interface PivotTableScopedCollectionData { + items?: Excel.Interfaces.PivotTableData[]; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + columnHierarchies?: Excel.Interfaces.RowColumnPivotHierarchyData[]; + /** + * The Data Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataHierarchies?: Excel.Interfaces.DataPivotHierarchyData[]; + /** + * The Filter Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + filterHierarchies?: Excel.Interfaces.FilterPivotHierarchyData[]; + /** + * The Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + hierarchies?: Excel.Interfaces.PivotHierarchyData[]; + /** + * The Row Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + rowHierarchies?: Excel.Interfaces.RowColumnPivotHierarchyData[]; + /** + * Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + allowMultipleFiltersPerField?: boolean; + /** + * Specifies if the PivotTable allows values in the data body to be edited by the user. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableDataValueEditing?: boolean; + /** + * ID of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: string; + /** + * Name of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + name?: string; + /** + * Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + refreshOnOpen?: boolean; + /** + * Specifies if the PivotTable uses custom lists when sorting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useCustomSortLists?: boolean; + } + /** An interface describing the data returned by calling `pivotLayout.toJSON()`. */ + interface PivotLayoutData { + /** + * The style applied to the PivotTable. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pivotStyle?: Excel.Interfaces.PivotTableStyleData; + /** + * The alt text description of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextDescription?: string; + /** + * The alt text title of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextTitle?: string; + /** + * Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFormat?: boolean; + /** + * The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. + Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. + By default, this is an empty string. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + emptyCellText?: string; + /** + * Specifies if the field list can be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + enableFieldList?: boolean; + /** + * Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. + Note that the value of `emptyCellText` persists when this property is set to `false`. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + fillEmptyCells?: boolean; + /** + * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layoutType?: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; + /** + * Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + preserveFormatting?: boolean; + /** + * Specifies if the PivotTable report shows grand totals for columns. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showColumnGrandTotals?: boolean; + /** + * Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + showFieldHeaders?: boolean; + /** + * Specifies if the PivotTable report shows grand totals for rows. + * + * @remarks + * [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`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + subtotalLocation?: Excel.SubtotalLocationType | "AtTop" | "AtBottom" | "Off"; + /** + * Returns a 2D array that contains pivot table's cell number format strings in tabular layout and no sub/grand totals. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tabularNumberFormat?: any[][]; + /** + * Returns a 2D array that contains pivot table's cell local number format strings in tabular layout and no sub/grand totals. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tabularNumberFormatLocal?: any[][]; + /** + * Returns a 2D array that contains pivot table's cell display texts in tabular layout and no sub/grand totals. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tabularText?: any[][]; + /** + * Returns a 2D array that contains pivot table's cell values in tabular layout and no sub/grand totals. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tabularValues?: any[][]; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + fields?: Excel.Interfaces.PivotFieldData[]; + /** + * ID of the PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * Name of the PivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + fields?: Excel.Interfaces.PivotFieldData[]; + /** + * ID of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * Name of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Position of the RowColumnPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + fields?: Excel.Interfaces.PivotFieldData[]; + /** + * Determines whether to allow multiple filter items. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems?: boolean; + /** + * ID of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * Name of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Position of the FilterPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + field?: Excel.Interfaces.PivotFieldData; + /** + * ID of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * Name of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Number format of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Position of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: number; + /** + * Specifies if the data should be shown as a specific summary calculation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAs?: Excel.ShowAsRule; + /** + * Specifies if all items of the DataPivotHierarchy are shown. + * + * @remarks + * [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 PivotItems associated with the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + items?: Excel.Interfaces.PivotItemData[]; + /** + * ID of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * Name of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Determines whether to show all items of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAllItems?: boolean; + /** + * Subtotals of the PivotField. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isExpanded?: boolean; + /** + * Name of the PivotItem. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Specifies if the PivotItem is visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling `worksheetCustomProperty.toJSON()`. */ + interface WorksheetCustomPropertyData { + /** + * Gets the key of the custom property. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + key?: string; + /** + * Gets or sets the value of the custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + value?: string; + } + /** An interface describing the data returned by calling `worksheetCustomPropertyCollection.toJSON()`. */ + interface WorksheetCustomPropertyCollectionData { + items?: Excel.Interfaces.WorksheetCustomPropertyData[]; + } + /** An interface describing the data returned by calling `documentProperties.toJSON()`. */ + interface DocumentPropertiesData { + /** + * Gets the collection of custom properties of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + custom?: Excel.Interfaces.CustomPropertyData[]; + /** + * The author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + author?: string; + /** + * The category of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + category?: string; + /** + * The comments of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + comments?: string; + /** + * The company of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + company?: string; + /** + * Gets the creation date of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + creationDate?: Date; + /** + * The keywords of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + keywords?: string; + /** + * Gets the last author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + lastAuthor?: string; + /** + * The manager of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + manager?: string; + /** + * Gets the revision number of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + revisionNumber?: number; + /** + * The subject of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + subject?: string; + /** + * The title of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + title?: string; + } + /** An interface describing the data returned by calling `customProperty.toJSON()`. */ + interface CustomPropertyData { + /** + * The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + key?: string; + /** + * The type of the value used for the custom property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: Excel.DocumentPropertyType | "Number" | "Boolean" | "Date" | "String" | "Float"; + /** + * The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatData; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatData; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatData; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatData; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatData; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatData; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatData; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatData; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatData; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatData; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatData; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatData; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatData; + /** + * The priority of the conditional format in the current `ConditionalFormatCollection`. + * + * @remarks + * [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 the 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. + * + * @remarks + * [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. + Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + /** + * A type of conditional format. Only one can be set at a time. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatData; + /** + * Representation of all values to the right of the axis in an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatData; + /** + * HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no axis is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisColor?: string; + /** + * Representation of how the axis is determined for an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisFormat?: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; + /** + * Specifies the direction that the data bar graphic should be based on. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: Excel.ConditionalDataBarRule; + /** + * If `true`, hides the values from the cells where the data bar is applied. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * Specifies if the data bar has a gradient. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * Specifies if the negative data bar has the same border color as the positive data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * Specifies if the negative data bar has the same fill color as the positive data bar. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * Specifies the `Rule` object on this conditional format. + * + * @remarks + * [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, on which to evaluate the conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * The formula, if required, on which to evaluate the conditional format rule in the user's language. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: string; + /** + * The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formulaR1C1?: string; + } + /** An interface describing the data returned by calling `iconSetConditionalFormat.toJSON()`. */ + interface IconSetConditionalFormatData { + /** + * An array of criteria and icon sets 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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + criteria?: Excel.ConditionalIconCriterion[]; + /** + * If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * If `true`, hides the values and only shows icons. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * If set, displays the icon set option for the conditional format. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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 format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * The criteria of the top/bottom conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * The rule of the conditional format. + * + * @remarks + * [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 format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * The rule of the conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * Specifies the rule object on this conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderData[]; + /** + * Returns the fill object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillData; + /** + * Returns the font object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontData; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + Cleared if `null` is passed in. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + numberFormat?: any; + } + /** An interface describing the data returned by calling `conditionalRangeFont.toJSON()`. */ + interface ConditionalRangeFontData { + /** + * Specifies if the font is bold. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * Specifies if the font is italic. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * Specifies the strikethrough status of the font. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * Constant value that indicates the specific side of the border. See `Excel.ConditionalRangeBorderIndex` for details. + * + * @remarks + * [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. + * + * @remarks + * [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 `numberFormatter.toJSON()`. */ + interface NumberFormatterData { + hasDayOfWeek?: boolean; + hasMonth?: boolean; + hasYear?: boolean; + isCurrency?: boolean; + isDateTime?: boolean; + isNumeric?: boolean; + isPercent?: boolean; + isText?: boolean; + } + /** An interface describing the data returned by calling `customFunctionManager.toJSON()`. */ + interface CustomFunctionManagerData { + } + /** An interface describing the data returned by calling `style.toJSON()`. */ + interface StyleData { + /** + * A collection of four border objects that represent the style of the four borders. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderData[]; + /** + * The fill of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillData; + /** + * A `Font` object that represents the font of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontData; + /** + * Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoIndent?: boolean; + /** + * Specifies if the style is a built-in style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + builtIn?: boolean; + /** + * Specifies if the formula will be hidden when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * Specifies if the style includes the color, color index, line style, and weight border properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * Specifies if the style includes the number format property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * Specifies if the style includes the formula hidden and locked protection properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * An integer from 0 to 250 that indicates the indent level for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + indentLevel?: number; + /** + * Specifies if the object is locked when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * The name of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * The format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormat?: string; + /** + * The localized format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: string; + /** + * The reading order for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * The text orientation for the style. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * Specifies if Excel wraps the text in the object. + * + * @remarks + * [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 `tableStyleCollection.toJSON()`. */ + interface TableStyleCollectionData { + items?: Excel.Interfaces.TableStyleData[]; + } + /** An interface describing the data returned by calling `tableStyle.toJSON()`. */ + interface TableStyleData { + /** + * Specifies the name of the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + /** + * Specifies if this `TableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** An interface describing the data returned by calling `pivotTableStyleCollection.toJSON()`. */ + interface PivotTableStyleCollectionData { + items?: Excel.Interfaces.PivotTableStyleData[]; + } + /** An interface describing the data returned by calling `pivotTableStyle.toJSON()`. */ + interface PivotTableStyleData { + /** + * Specifies the name of the PivotTable style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + /** + * Specifies if this `PivotTableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** An interface describing the data returned by calling `slicerStyleCollection.toJSON()`. */ + interface SlicerStyleCollectionData { + items?: Excel.Interfaces.SlicerStyleData[]; + } + /** An interface describing the data returned by calling `slicerStyle.toJSON()`. */ + interface SlicerStyleData { + /** + * Specifies the name of the slicer style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + /** + * Specifies if this `SlicerStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** An interface describing the data returned by calling `timelineStyleCollection.toJSON()`. */ + interface TimelineStyleCollectionData { + items?: Excel.Interfaces.TimelineStyleData[]; + } + /** An interface describing the data returned by calling `timelineStyle.toJSON()`. */ + interface TimelineStyleData { + /** + * Specifies the name of the timeline style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + /** + * Specifies if this `TimelineStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** An interface describing the data returned by calling `pageLayout.toJSON()`. */ + interface PageLayoutData { + /** + * Header and footer configuration for the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headersFooters?: Excel.Interfaces.HeaderFooterGroupData; + /** + * The worksheet's black and white print option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + blackAndWhite?: boolean; + /** + * The worksheet's bottom page margin to use for printing in points. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin?: number; + /** + * The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHorizontally?: boolean; + /** + * The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerVertically?: boolean; + /** + * The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + draftMode?: boolean; + /** + * The worksheet's first page number to print. A `null` value represents "auto" page numbering. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPageNumber?: number | ""; + /** + * The worksheet's footer margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + footerMargin?: number; + /** + * The worksheet's header margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headerMargin?: number; + /** + * The worksheet's left margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin?: number; + /** + * The worksheet's orientation of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation?: Excel.PageOrientation | "Portrait" | "Landscape"; + /** + * The worksheet's paper size of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"; + /** + * Specifies if the worksheet's comments should be displayed when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printComments?: Excel.PrintComments | "NoComments" | "EndSheet" | "InPlace"; + /** + * The worksheet's print errors option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printErrors?: Excel.PrintErrorType | "AsDisplayed" | "Blank" | "Dash" | "NotAvailable"; + /** + * Specifies if the worksheet's gridlines will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printGridlines?: boolean; + /** + * Specifies if the worksheet's headings will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printHeadings?: boolean; + /** + * The worksheet's page print order option. This specifies the order to use for processing the page number printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printOrder?: Excel.PrintOrder | "DownThenOver" | "OverThenDown"; + /** + * The worksheet's right margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin?: number; + /** + * The worksheet's top margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin?: number; + /** + * The worksheet's print zoom options. + The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zoom?: Excel.PageLayoutZoomOptions; + } + /** An interface describing the data returned by calling `headerFooter.toJSON()`. */ + interface HeaderFooterData { + /** + * The center footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerFooter?: string; + /** + * The center header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHeader?: string; + /** + * The left footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftFooter?: string; + /** + * The left header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftHeader?: string; + /** + * The right footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightFooter?: string; + /** + * The right header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + defaultForAllPages?: Excel.Interfaces.HeaderFooterData; + /** + * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + evenPages?: Excel.Interfaces.HeaderFooterData; + /** + * The first page header/footer, for all other pages general or even/odd is used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPage?: Excel.Interfaces.HeaderFooterData; + /** + * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + oddPages?: Excel.Interfaces.HeaderFooterData; + /** + * The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useSheetScale?: boolean; + } + /** An interface describing the data returned by calling `pageBreak.toJSON()`. */ + interface PageBreakData { + /** + * Specifies the column index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + columnIndex?: number; + /** + * Specifies the row index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 `rangeAreasCollection.toJSON()`. */ + interface RangeAreasCollectionData { + items?: Excel.Interfaces.RangeAreasData[]; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + replies?: Excel.Interfaces.CommentReplyData[]; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorEmail?: string; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorName?: string; + /** + * The comment's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: string; + /** + * Gets the content type of the comment. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + contentType?: Excel.ContentType | "Plain" | "Mention"; + /** + * Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + creationDate?: Date; + /** + * Specifies the comment identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: string; + /** + * Gets the entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: Excel.CommentMention[]; + /** + * The comment thread status. A value of `true` means that the comment thread is resolved. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + /** + * Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent?: string; + } + /** 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 { + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorEmail?: string; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorName?: string; + /** + * The comment reply's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: string; + /** + * The content type of the reply. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + contentType?: Excel.ContentType | "Plain" | "Mention"; + /** + * Gets the creation time of the comment reply. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + creationDate?: Date; + /** + * Specifies the comment reply identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: string; + /** + * The entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: Excel.CommentMention[]; + /** + * The comment reply status. A value of `true` means the reply is in the resolved state. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + /** + * The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent?: string; + } + /** 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 this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.Interfaces.ShapeFillData; + /** + * Returns the line formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatData; + /** + * Specifies the alternative description text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextDescription?: string; + /** + * Specifies the alternative title text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextTitle?: string; + /** + * Returns the number of connection sites on this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectionSiteCount?: number; + /** + * Gets the display name of the shape. A newly created shape has a generated name + that is localized and may not match its `name`. In this scenario, you can use + this API to get the name that is displayed in the UI. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + displayName?: string; + /** + * Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"; + /** + * Specifies the height, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + height?: number; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: string; + /** + * The distance, in points, from the left side of the shape to the left side of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: number; + /** + * Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: number; + /** + * Specifies if the aspect ratio of this shape is locked. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lockAspectRatio?: boolean; + /** + * Specifies the name of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: string; + /** + * Represents how the object is attached to the cells below it. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + placement?: Excel.Placement | "TwoCell" | "OneCell" | "Absolute"; + /** + * Specifies the rotation, in degrees, of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rotation?: number; + /** + * Specifies the share link to an Office Script file on OneDrive that will be associated with this shape. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + scriptLink?: string; + /** + * The distance, in points, from the top edge of the shape to the top edge of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: number; + /** + * Returns the type of this shape. See `Excel.ShapeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: Excel.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line"; + /** + * Specifies if the shape is visible. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: number; + /** + * Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zOrderPosition?: number; + } + /** An interface describing the data returned by calling `geometricShape.toJSON()`. */ + interface GeometricShapeData { + /** + * Returns the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: string; + } + /** An interface describing the data returned by calling `image.toJSON()`. */ + interface ImageData { + /** + * Specifies the shape identifier for the image object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: string; + /** + * Returns the format of the image. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.PictureFormat | "UNKNOWN" | "BMP" | "JPEG" | "GIF" | "PNG" | "SVG"; + } + /** An interface describing the data returned by calling `shapeGroup.toJSON()`. */ + interface ShapeGroupData { + /** + * Returns the collection of `Shape` objects. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shapes?: Excel.Interfaces.ShapeData[]; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 `line.toJSON()`. */ + interface LineData { + /** + * Represents the length of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadLength?: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; + /** + * Represents the style of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadStyle?: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; + /** + * Represents the width of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadWidth?: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; + /** + * Represents the connection site to which the beginning of a connector is connected. Returns `null` when the beginning of the line is not attached to any shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginConnectedSite?: number; + /** + * Represents the length of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadLength?: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; + /** + * Represents the style of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadStyle?: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; + /** + * Represents the width of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadWidth?: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; + /** + * Represents the connection site to which the end of a connector is connected. Returns `null` when the end of the line is not attached to any shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endConnectedSite?: number; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: string; + /** + * Specifies if the beginning of the specified line is connected to a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isBeginConnected?: boolean; + /** + * Specifies if the end of the specified line is connected to a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isEndConnected?: boolean; + /** + * Represents the connector type for the line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectorType?: Excel.ConnectorType | "Straight" | "Elbow" | "Curve"; + } + /** An interface describing the data returned by calling `shapeFill.toJSON()`. */ + interface ShapeFillData { + /** + * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + foregroundColor?: string; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency?: number; + /** + * Returns the fill type of the shape. See `Excel.ShapeFillType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: Excel.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "Mixed"; + } + /** An interface describing the data returned by calling `shapeLineFormat.toJSON()`. */ + interface ShapeLineFormatData { + /** + * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashStyle?: Excel.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: Excel.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency?: number; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + weight?: number; + } + /** An interface describing the data returned by calling `textFrame.toJSON()`. */ + interface TextFrameData { + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeSetting?: Excel.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin?: number; + /** + * Specifies if the text frame contains text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + hasText?: boolean; + /** + * Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalAlignment?: Excel.ShapeTextHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; + /** + * Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalOverflow?: Excel.ShapeTextHorizontalOverflow | "Overflow" | "Clip"; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin?: number; + /** + * Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation?: Excel.ShapeTextOrientation | "Horizontal" | "Vertical" | "Vertical270" | "WordArtVertical" | "EastAsianVertical" | "MongolianVertical" | "WordArtVerticalRTL"; + /** + * Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder?: Excel.ShapeTextReadingOrder | "LeftToRight" | "RightToLeft"; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin?: number; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin?: number; + /** + * Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalAlignment?: Excel.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom" | "Justified" | "Distributed"; + /** + * Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalOverflow?: Excel.ShapeTextVerticalOverflow | "Overflow" | "Ellipsis" | "Clip"; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + font?: Excel.Interfaces.ShapeFontData; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + text?: string; + } + /** An interface describing the data returned by calling `shapeFont.toJSON()`. */ + interface ShapeFontData { + /** + * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + italic?: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: string; + /** + * Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + size?: number; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 `slicer.toJSON()`. */ + interface SlicerData { + /** + * Represents the collection of slicer items that are part of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + slicerItems?: Excel.Interfaces.SlicerItemData[]; + /** + * The style applied to the slicer. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + slicerStyle?: Excel.Interfaces.SlicerStyleData; + /** + * Represents the worksheet containing the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * Represents the caption of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + caption?: string; + /** + * Represents the height, in points, of the slicer. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: number; + /** + * Represents the unique ID of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: string; + /** + * Value is `true` if all filters currently applied on the slicer are cleared. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isFilterCleared?: boolean; + /** + * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: number; + /** + * Represents the name of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + /** + * Represents the slicer name used in the formula. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula?: string; + /** + * Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + sortBy?: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"; + /** + * Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + style?: string; + /** + * Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: number; + /** + * Represents the width, in points, of the slicer. + Throws an `InvalidArgument` error when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: number; + } + /** An interface describing the data returned by calling `slicerCollection.toJSON()`. */ + interface SlicerCollectionData { + items?: Excel.Interfaces.SlicerData[]; + } + /** An interface describing the data returned by calling `slicerItem.toJSON()`. */ + interface SlicerItemData { + /** + * Value is `true` if the slicer item has data. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + hasData?: boolean; + /** + * Value is `true` if the slicer item is selected. + Setting this value will not clear the selected state of other slicer items. + By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSelected?: boolean; + /** + * Represents the unique value representing the slicer item. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + key?: string; + /** + * Represents the title displayed in the Excel UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + } + /** An interface describing the data returned by calling `slicerItemCollection.toJSON()`. */ + interface SlicerItemCollectionData { + items?: Excel.Interfaces.SlicerItemData[]; + } + /** An interface describing the data returned by calling `ribbon.toJSON()`. */ + interface RibbonData { + /** + * The active ribbon tab. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + activeTab?: Excel.RibbonTab | "Others" | "Home" | "Insert" | "Draw" | "PageLayout" | "Formulas" | "Data" | "Review" | "View" | "Developer" | "AddIns" | "Help"; + } + /** An interface describing the data returned by calling `linkedDataType.toJSON()`. */ + interface LinkedDataTypeData { + /** + * The name of the data provider for the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dataProvider?: string; + /** + * The local time-zone date and time since the workbook was opened when the linked data type was last refreshed. + Returns `undefined` if the linked data type has not been refreshed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lastRefreshed?: Date; + /** + * The name of the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: string; + /** + * The frequency, in seconds, at which the linked data type is refreshed if `refreshMode` is set to "Periodic". + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + periodicRefreshInterval?: number; + /** + * Returns any warnings encountered after an attempt to load refresh data for this linked data type from the workbook. + 1st-party only. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshDataLoadWarnings?: string[]; + /** + * Returns any errors that occurred during a refresh operation for this linked data type from the workbook. + 1st-party only. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshErrors?: string[]; + /** + * The mechanism by which the data for the linked data type is retrieved. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshMode?: Excel.LinkedDataTypeRefreshMode | "Unknown" | "Manual" | "OnLoad" | "Periodic"; + /** + * The unique ID of the linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceId?: number; + /** + * Returns an array with all the refresh modes supported by the linked data type. The contents of the array may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + supportedRefreshModes?: Excel.LinkedDataTypeRefreshMode[]; + } + /** An interface describing the data returned by calling `linkedDataTypeCollection.toJSON()`. */ + interface LinkedDataTypeCollectionData { + items?: Excel.Interfaces.LinkedDataTypeData[]; + } + /** An interface describing the data returned by calling `namedSheetView.toJSON()`. */ + interface NamedSheetViewData { + /** + * Gets or sets the name of the sheet view. + The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + name?: string; + } + /** An interface describing the data returned by calling `namedSheetViewCollection.toJSON()`. */ + interface NamedSheetViewCollectionData { + items?: Excel.Interfaces.NamedSheetViewData[]; + } + /** 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. + * + * @remarks + * [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). + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + value?: T; + } + /** + * Represents the APIs for external code service integrations in Excel. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ExternalCodeServiceLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Provides APIs that identify, obtain, and delete the diagnostic entries published + by the `ExternalCodeService` integration. + Note: This API is designed for exclusive usage by the diagnostics task pane. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + diagnostics?: Excel.Interfaces.ExternalCodeServiceDiagnosticsLoadOptions; + } + /** + * Provides APIs that identify, obtain, and delete the diagnostic entries published + by the `ExternalCodeService` integration. + Note: This API is designed for exclusive usage by the diagnostics task pane. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ExternalCodeServiceDiagnosticsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The ID is a special property needed for events. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + } + /** + * The VBA Recorder. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface VbaRecorderLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * ID for the VBA Recorder. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + } + /** + * Represents the result of a worksheet optimization. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface WorksheetOptimizationScanResultLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The collection of ranges that can be optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + ranges?: Excel.Interfaces.RangeOptimizationCollectionLoadOptions; + /** + * The number of cells that are allocated in the worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allocatedCells?: boolean; + /** + * The number of cells in the worksheet that can be optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + optimizableCells?: boolean; + } + /** + * Represents an `AllowEditRange` object found in a worksheet. This object works with worksheet protection properties. + When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface AllowEditRangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the range associated with the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + address?: boolean; + /** + * Specifies if the object is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPasswordProtected?: boolean; + /** + * Specifies the title of the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. + If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + title?: boolean; + } + /** + * Represents the set of `AllowEditRange` objects found in a worksheet. `AllowEditRange` objects work with worksheet protection properties. + When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface AllowEditRangeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the range associated with the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + address?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the object is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPasswordProtected?: boolean; + /** + * For EACH ITEM in the collection: Specifies the title of the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. + If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + title?: boolean; + } + /** + * Represents a Power Query query. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + interface QueryLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the query error message from when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + error?: boolean; + /** + * Gets the query loaded to object type. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + loadedTo?: boolean; + /** + * Specifies if the query loaded to the data model. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + loadedToDataModel?: boolean; + /** + * Gets the name of the query. + Query names cannot contain periods or quotation marks. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + name?: boolean; + /** + * Gets the date and time when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + refreshDate?: boolean; + /** + * Gets the number of rows that were loaded when the query was last refreshed. + If last refresh has errors the value will be -1. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + rowsLoadedCount?: boolean; + } + /** + * Represents the collection of queries in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + interface QueryCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the query error message from when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + error?: boolean; + /** + * For EACH ITEM in the collection: Gets the query loaded to object type. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + loadedTo?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the query loaded to the data model. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + loadedToDataModel?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the query. + Query names cannot contain periods or quotation marks. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Gets the date and time when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + refreshDate?: boolean; + /** + * For EACH ITEM in the collection: Gets the number of rows that were loaded when the query was last refreshed. + If last refresh has errors the value will be -1. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + rowsLoadedCount?: boolean; + } + /** + * Visual Tracker allows clients to request visual properties and receive updated properties when + changes occur. This is intended for use internally along with the library here: + https://office.visualstudio.com/OC/_git/biplat.uniformobjects + + Excel.VisualCollection and its related APIs are better suited for external use in getting visual + property state. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface VisualTrackerLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * ID for the visual tracker. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + } + /** + * A key-value pair to describe a properties of a range's number format. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface NumberFormatPropertyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Indicates if the number format is of type currency. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + currency?: boolean; + /** + * Indicates if the number format is of type date-time. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dateTime?: boolean; + /** + * Indicates if the date-time format has day-of-week. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dateTimeHasDayOfWeek?: boolean; + /** + * Indicates if the date-time format has month. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dateTimeHasMonth?: boolean; + /** + * Indicates if the date-time format has year. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dateTimeHasYear?: boolean; + /** + * A key that corresponds to a number format. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + key?: boolean; + /** + * Indicates if the number format is of type numeric. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + numeric?: boolean; + /** + * Indicates if the number format is of type percentage. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percent?: boolean; + /** + * Indicates if the number format is of type text. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + text?: boolean; + } + /** + * Represents a collection of `NumberFormatProperty` objects. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface NumberFormatPropertyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Indicates if the number format is of type currency. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + currency?: boolean; + /** + * For EACH ITEM in the collection: Indicates if the number format is of type date-time. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dateTime?: boolean; + /** + * For EACH ITEM in the collection: Indicates if the date-time format has day-of-week. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dateTimeHasDayOfWeek?: boolean; + /** + * For EACH ITEM in the collection: Indicates if the date-time format has month. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dateTimeHasMonth?: boolean; + /** + * For EACH ITEM in the collection: Indicates if the date-time format has year. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dateTimeHasYear?: boolean; + /** + * For EACH ITEM in the collection: A key that corresponds to a number format. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Indicates if the number format is of type numeric. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + numeric?: boolean; + /** + * For EACH ITEM in the collection: Indicates if the number format is of type percentage. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percent?: boolean; + /** + * For EACH ITEM in the collection: Indicates if the number format is of type text. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + text?: boolean; + } + /** + * Represents an optimization that can be performed on a single range. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RangeOptimizationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The list of optimizations that can be applied to this range. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + optimizationTypes?: boolean; + /** + * The address of a range that can be optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + range?: boolean; + } + /** + * Represents the set of optimizations that can be performed in a worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RangeOptimizationCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The list of optimizations that can be applied to this range. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + optimizationTypes?: boolean; + /** + * For EACH ITEM in the collection: The address of a range that can be optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + range?: boolean; + } + /** + * Represents the result of a worksheet optimization. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface WorksheetOptimizationResultLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The number of cells that were allocated in the worksheet + before the optimization took place. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allocatedCells?: boolean; + /** + * The number of cells that were optimized. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + optimizedCells?: boolean; + } + /** + * Contains information about a linked workbook. + If a workbook has links pointing to data in another workbook, the second workbook is linked to the first workbook. + In this scenario, the second workbook is called the "linked workbook". + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface LinkedWorkbookLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + id?: boolean; + } + /** + * Represents a collection of linked workbook objects. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface LinkedWorkbookCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + id?: boolean; + } + /** + * Represents a recorded change to the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DocumentTaskChangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the user assigned to the task for an `assign` change action, or the user unassigned from the task for an `unassign` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignee?: boolean; + /** + * Represents the identity of the user who made the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + changedBy?: boolean; + /** + * Represents the ID of the comment or commentReply to which the task change is anchored. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + commentId?: boolean; + /** + * Represents creation date and time of the task change record. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: boolean; + /** + * Represents the task's due date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the due date and time. It should be set together with `startDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dueDateTime?: boolean; + /** + * The unique GUID of the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * Represents the task's completion percentage. It is used for the `setPercentComplete` change action. + This is a value betwen 0 and 100, where 100 represents a completed task.Changing this value to 100 also completes the associated comment.Changing the completion from 100 to a lower value reactivates the associated comment. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: boolean; + /** + * Represents the task's priority. It is used for the `setPriority` change action. + This is a value between 0 and 10, with 5 being the default priority if not set, and where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: boolean; + /** + * Represents the task's start date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the start date and time. It should be set together with `dueDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startDateTime?: boolean; + /** + * Represents the task's title. It is used for `setTitle` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: boolean; + /** + * Represents the action type of the task change record. Some examples of action types are assign, undo, and setPriority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: boolean; + /** + * Represents the `DocumentTaskChange.id` property that was undone for the `undo` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + undoChangeId?: boolean; + } + /** + * Represents a collection of change records for a task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DocumentTaskChangeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the user assigned to the task for an `assign` change action, or the user unassigned from the task for an `unassign` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignee?: boolean; + /** + * For EACH ITEM in the collection: Represents the identity of the user who made the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + changedBy?: boolean; + /** + * For EACH ITEM in the collection: Represents the ID of the comment or commentReply to which the task change is anchored. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + commentId?: boolean; + /** + * For EACH ITEM in the collection: Represents creation date and time of the task change record. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: boolean; + /** + * For EACH ITEM in the collection: Represents the task's due date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the due date and time. It should be set together with `startDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dueDateTime?: boolean; + /** + * For EACH ITEM in the collection: The unique GUID of the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Represents the task's completion percentage. It is used for the `setPercentComplete` change action. + This is a value betwen 0 and 100, where 100 represents a completed task.Changing this value to 100 also completes the associated comment.Changing the completion from 100 to a lower value reactivates the associated comment. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: boolean; + /** + * For EACH ITEM in the collection: Represents the task's priority. It is used for the `setPriority` change action. + This is a value between 0 and 10, with 5 being the default priority if not set, and where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: boolean; + /** + * For EACH ITEM in the collection: Represents the task's start date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the start date and time. It should be set together with `dueDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startDateTime?: boolean; + /** + * For EACH ITEM in the collection: Represents the task's title. It is used for `setTitle` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: boolean; + /** + * For EACH ITEM in the collection: Represents the action type of the task change record. Some examples of action types are assign, undo, and setPriority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Represents the `DocumentTaskChange.id` property that was undone for the `undo` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + undoChangeId?: boolean; + } + /** + * Represents a task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DocumentTaskLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the comment associated with the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + comment?: Excel.Interfaces.CommentLoadOptions; + /** + * Returns a collection of assignees of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignees?: boolean; + /** + * Gets the most recent user to have completed the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completedBy?: boolean; + /** + * Gets the date and time that the task was completed. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completedDateTime?: boolean; + /** + * Gets the user who created the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdBy?: boolean; + /** + * Gets the date and time that the task was created. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: boolean; + /** + * Gets the ID of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: boolean; + /** + * Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: boolean; + /** + * Gets or sets the date and time the task should start and is due. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startAndDueDateTime?: boolean; + /** + * Specifies title of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: boolean; + } + /** + * Represents a collection of tasks. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DocumentTaskCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the comment associated with the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + comment?: Excel.Interfaces.CommentLoadOptions; + /** + * For EACH ITEM in the collection: Returns a collection of assignees of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignees?: boolean; + /** + * For EACH ITEM in the collection: Gets the most recent user to have completed the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completedBy?: boolean; + /** + * For EACH ITEM in the collection: Gets the date and time that the task was completed. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completedDateTime?: boolean; + /** + * For EACH ITEM in the collection: Gets the user who created the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdBy?: boolean; + /** + * For EACH ITEM in the collection: Gets the date and time that the task was created. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: boolean; + /** + * For EACH ITEM in the collection: Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: boolean; + /** + * For EACH ITEM in the collection: Gets or sets the date and time the task should start and is due. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startAndDueDateTime?: boolean; + /** + * For EACH ITEM in the collection: Specifies title of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: boolean; + } + /** + * Represents a connection to a data source. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DataConnectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the data returned based on the command type. + If data source type is SQL, this is a SQL query used to retrieve the data. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + commandText?: boolean; + /** + * The connection string containing the information needed to establish a connection to the data source. + Refer to the documentation for the specific data source type for more information on what information this string should contain and how it should be formatted. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + connectionString?: boolean; + /** + * The data source type of the connection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dataSourceType?: boolean; + /** + * The name of the connection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + } + /** + * Represents the Excel Runtime class. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + interface RuntimeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Toggle JavaScript events in the current task pane or content add-in. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableEvents?: boolean; + } + /** + * Represents the Excel application that manages the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ApplicationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + cultureInfo?: Excel.Interfaces.CultureInfoLoadOptions; + /** + * Returns the iterative calculation settings. + In Excel on Windows and Mac, the settings will apply to the Excel Application. + In Excel on the web and other platforms, the settings will apply to the active workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + iterativeCalculation?: Excel.Interfaces.IterativeCalculationLoadOptions; + /** + * Gets the ribbon of the application. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + ribbon?: Excel.Interfaces.RibbonLoadOptions; + /** + * Returns the Excel calculation engine version used for the last full recalculation. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode?: boolean; + /** + * Returns the calculation state of the application. See `Excel.CalculationState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + calculationState?: boolean; + /** + * Gets the string used as the decimal separator for numeric values. This is based on the local Excel settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + decimalSeparator?: boolean; + /** + * Specifies whether the "Format Stale values" button under Calculation Options is turned on or off. + The stale formulas are rendered with stale formatting if the button is turned on. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + formatStaleValues?: boolean; + /** + * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on the local Excel settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + thousandsSeparator?: boolean; + /** + * Specifies if the system separators of Excel are enabled. + System separators include the decimal separator and thousands separator. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + useSystemSeparators?: boolean; + } + /** + * Represents the iterative calculation settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface IterativeCalculationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * True if Excel will use iteration to resolve circular references. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enabled?: boolean; + /** + * Specifies the maximum amount of change between each iteration as Excel resolves circular references. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxChange?: boolean; + /** + * Specifies the maximum number of iterations that Excel can use to resolve a circular reference. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxIteration?: boolean; + } + /** + * Workbook is the top level object which contains related workbook objects such as worksheets, tables, and ranges. + To learn more about the workbook object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-workbooks | Work with workbooks using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface WorkbookLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the Excel application instance that contains this workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + application?: Excel.Interfaces.ApplicationLoadOptions; + /** + * Represents a collection of bindings that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bindings?: Excel.Interfaces.BindingCollectionLoadOptions; + /** + * Represents the API related to ExternalCodeService integration in the workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + externalCodeService?: Excel.Interfaces.ExternalCodeServiceLoadOptions; + /** + * Returns a collection of linked workbooks. In formulas, the workbook links can be used to reference data (cell values and names) outside of the current workbook. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + linkedWorkbooks?: Excel.Interfaces.LinkedWorkbookCollectionLoadOptions; + /** + * Gets the workbook properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + properties?: Excel.Interfaces.DocumentPropertiesLoadOptions; + /** + * Returns the protection object for a workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + protection?: Excel.Interfaces.WorkbookProtectionLoadOptions; + /** + * Represents a collection of tables associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * The VBA Recorder. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + vbaRecorder?: Excel.Interfaces.VbaRecorderLoadOptions; + /** + * Specifies if the workbook is in AutoSave mode. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSave?: boolean; + /** + * Returns a number about the version of Excel Calculation Engine. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartDataPointTrack?: boolean; + /** + * Specifies if changes have been made since the workbook 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isDirty?: boolean; + /** + * Gets the workbook name. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * Specifies if the workbook has ever been saved locally or online. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + previouslySaved?: boolean; + /** + * Returns `true` if the workbook is open in read-only mode. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readOnly?: boolean; + /** + * Specifies whether the PivotTable's field list pane is shown at the workbook level. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showPivotFieldList?: boolean; + /** + * True if the workbook uses the 1904 date system. + * + * @remarks + * [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`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + usePrecisionAsDisplayed?: boolean; + } + /** + * Represents the protection of a workbook object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorkbookProtectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if the workbook is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + protected?: boolean; + } + /** + * An Excel worksheet is a grid of cells. It can contain data, tables, charts, etc. + To learn more about the worksheet object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-worksheets | Work with worksheets using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface WorksheetLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the `AutoFilter` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * Returns a collection of charts that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartCollectionLoadOptions; + /** + * Gets the `PageLayout` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pageLayout?: Excel.Interfaces.PageLayoutLoadOptions; + /** + * Returns the sheet protection object for a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionLoadOptions; + /** + * Collection of tables that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * Returns the visual tracker associated with the worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visualTracker?: Excel.Interfaces.VisualTrackerLoadOptions; + /** + * Determines if Excel should recalculate the worksheet when necessary. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * The display name of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * The zero-based position of the worksheet within the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * Specifies if gridlines are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showGridlines?: boolean; + /** + * Specifies if headings are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showHeadings?: boolean; + /** + * Returns the standard (default) height of all the rows in the worksheet, in points. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardHeight?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardWidth?: boolean; + /** + * The tab color of the worksheet. + 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 #RRGGBB (e.g., "FFA500"). + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tabColor?: boolean; + /** + * Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + tabId?: boolean; + /** + * The visibility of the worksheet. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface WorksheetCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the `AutoFilter` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * For EACH ITEM in the collection: Returns a collection of charts that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the `PageLayout` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pageLayout?: Excel.Interfaces.PageLayoutLoadOptions; + /** + * For EACH ITEM in the collection: Returns the sheet protection object for a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionLoadOptions; + /** + * For EACH ITEM in the collection: Collection of tables that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Returns the visual tracker associated with the worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visualTracker?: Excel.Interfaces.VisualTrackerLoadOptions; + /** + * For EACH ITEM in the collection: Determines if Excel should recalculate the worksheet when necessary. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The display name of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: The zero-based position of the worksheet within the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * For EACH ITEM in the collection: Specifies if gridlines are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showGridlines?: boolean; + /** + * For EACH ITEM in the collection: Specifies if headings are visible to the user. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardHeight?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardWidth?: boolean; + /** + * For EACH ITEM in the collection: The tab color of the worksheet. + 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 #RRGGBB (e.g., "FFA500"). + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tabColor?: boolean; + /** + * For EACH ITEM in the collection: Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + tabId?: boolean; + /** + * For EACH ITEM in the collection: The visibility of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] + */ + visibility?: boolean; + } + /** + * Represents the protection of a worksheet object. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface WorksheetProtectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if protection can be paused for this worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + canPauseProtection?: boolean; + /** + * Specifies if the sheet is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPasswordProtected?: boolean; + /** + * Specifies if worksheet protection is paused. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPaused?: boolean; + /** + * Specifies the protection options for the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + options?: boolean; + /** + * Specifies if the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protected?: boolean; + /** + * Specifies the protection options saved in the worksheet. + This will return the same `WorksheetProtectionOptions` object regardless of the worksheet protection state. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + savedOptions?: boolean; + } + /** + * Range represents a set of one or more contiguous cells such as a cell, a row, a column, or a block of cells. + To learn more about how ranges are used throughout the API, start with {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-core-concepts#ranges | Ranges in the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface RangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a data validation object. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataValidation?: Excel.Interfaces.DataValidationLoadOptions; + /** + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * The worksheet containing the current range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + address?: boolean; + /** + * Represents the range reference for the specified range in the language of the user. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + addressLocal?: boolean; + /** + * Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + cellCount?: boolean; + /** + * Specifies the total number of columns in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnCount?: boolean; + /** + * Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * Specifies the column number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnIndex?: boolean; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: boolean; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + hasSpill?: boolean; + /** + * Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: boolean; + /** + * Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * Represents the hyperlink for the current range. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hyperlink?: boolean; + /** + * Represents if the current range is an entire column. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isEntireColumn?: boolean; + /** + * Represents if the current range is an entire row. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isEntireRow?: boolean; + /** + * Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: boolean; + /** + * Represents the data type state of each cell. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkedDataTypeState?: boolean; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + numberFormat?: boolean; + /** + * Represents the category of number format of each cell. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + numberFormatCategories?: boolean; + /** + * Represents Excel's number format code for the given range, based on the language settings of the user. + Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. + Any returned text uses the locally-formatted strings based on the language specified in the system settings. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * Returns the total number of rows in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rowCount?: boolean; + /** + * Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHidden?: boolean; + /** + * Returns the row number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rowIndex?: boolean; + /** + * Represents if all the cells would be saved as an array formula. + Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. + Returns `null` if some cells would be saved as an array formula and some would not be. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + savedAsArray?: 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + style?: boolean; + /** + * Text values of the specified range. The text value will not depend on the cell width. The number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: boolean; + /** + * Specifies the type of data in each cell. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + valueTypes?: boolean; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + /** + * Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: boolean; + } + /** + * `RangeAreas` represents a collection of one or more rectangular ranges in the same worksheet. + To learn how to use discontiguous ranges, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-multiple-ranges | Work with multiple ranges simultaneously in Excel add-ins}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface RangeAreasLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a data validation object for all ranges in the `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dataValidation?: Excel.Interfaces.DataValidationLoadOptions; + /** + * Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * Returns the worksheet for the current `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Returns the `RangeAreas` 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"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + address?: boolean; + /** + * Returns the `RangeAreas` reference in the user locale. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + addressLocal?: boolean; + /** + * Returns the number of rectangular ranges that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + cellCount?: boolean; + /** + * Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isEntireColumn?: boolean; + /** + * Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: boolean; + } + /** + * Represents a collection of one or more rectangular ranges in multiple worksheets. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface WorkbookRangeAreasLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns an array of addresses in A1-style. Address values contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + addresses?: boolean; + } + /** + * RangeView represents a set of visible cells of the parent range. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + interface RangeViewLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the cell addresses of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: boolean; + /** + * The number of visible columns. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + columnCount?: boolean; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: boolean; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: boolean; + /** + * Returns a value that represents the index of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + index?: boolean; + /** + * Represents Excel's number format code for the given cell. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + numberFormat?: boolean; + /** + * The number of visible rows. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + text?: boolean; + /** + * Represents the type of data of each cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + values?: boolean; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + } + /** + * Represents a collection of `RangeView` objects. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + interface RangeViewCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the cell addresses of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: boolean; + /** + * For EACH ITEM in the collection: The number of visible columns. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + columnCount?: boolean; + /** + * For EACH ITEM in the collection: Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: boolean; + /** + * For EACH ITEM in the collection: Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: boolean; + /** + * For EACH ITEM in the collection: Returns a value that represents the index of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Represents Excel's number format code for the given cell. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + numberFormat?: boolean; + /** + * For EACH ITEM in the collection: The number of visible rows. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + text?: boolean; + /** + * For EACH ITEM in the collection: Represents the type of data of each cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: 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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + interface SettingCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The key that represents the ID of the setting. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Represents the value stored for this setting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + interface SettingLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The key that represents the ID of the setting. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + key?: boolean; + /** + * Represents the value stored for this setting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface NamedItemCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns an object containing values and types of the named item. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Returns the worksheet to which the named item is scoped. If the item is scoped to the workbook instead, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the comment associated with this name. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + comment?: boolean; + /** + * For EACH ITEM in the collection: The formula of the named item. Formulas always start with an equal sign ("="). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formula?: boolean; + /** + * For EACH ITEM in the collection: The name of the object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + scope?: boolean; + /** + * For EACH ITEM in the collection: Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJson?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJsonLocal?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the object is visible. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface NamedItemLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns an object containing values and types of the named item. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Returns the worksheet to which the named item is scoped. If the item is scoped to the workbook instead, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Specifies the comment associated with this name. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + comment?: boolean; + /** + * The formula of the named item. Formulas always start with an equal sign ("="). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formula?: boolean; + /** + * The name of the object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + scope?: boolean; + /** + * Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + /** + * A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJson?: boolean; + /** + * A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJsonLocal?: boolean; + /** + * Specifies if the object is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * Represents an object containing values and types of a named item. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface NamedItemArrayValuesLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the types for each item in the named item array + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + types?: boolean; + /** + * Represents the values of each item in the named item array. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + values?: boolean; + /** + * A JSON representation of the values in this named item array. + Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItemArrayValues.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * A JSON representation of the values in this named item array. + Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItemArrayValues.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + } + /** + * Represents an Office.js binding that is defined in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface BindingLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the binding identifier. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * Returns the type of the binding. See `Excel.BindingType` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + type?: boolean; + } + /** + * Represents the collection of all the binding objects that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface BindingCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the binding identifier. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Returns the type of the binding. See `Excel.BindingType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface TableCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the `AutoFilter` object of the table. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * For EACH ITEM in the collection: Represents a collection of all the columns in the table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Represents the sorting for the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * For EACH ITEM in the collection: The style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableStyle?: Excel.Interfaces.TableStyleLoadOptions; + /** + * For EACH ITEM in the collection: The worksheet containing the current table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies if the first column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the last column contains special formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Returns a numeric ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + legacyId?: boolean; + /** + * For EACH ITEM in the collection: Name of the table. + + The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the header row is visible. This value can be set to show or remove the header row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the total row is visible. This value can be set to show or remove the total row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * For EACH ITEM in the collection: Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface TableScopedCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the `AutoFilter` object of the table. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * For EACH ITEM in the collection: Represents a collection of all the columns in the table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Represents the sorting for the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * For EACH ITEM in the collection: The style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableStyle?: Excel.Interfaces.TableStyleLoadOptions; + /** + * For EACH ITEM in the collection: The worksheet containing the current table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies if the first column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the last column contains special formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Returns a numeric ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + legacyId?: boolean; + /** + * For EACH ITEM in the collection: Name of the table. + + The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the header row is visible. This value can be set to show or remove the header row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the total row is visible. This value can be set to show or remove the total row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * For EACH ITEM in the collection: Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + } + /** + * Represents an Excel table. + To learn more about the table object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables | Work with tables using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface TableLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the `AutoFilter` object of the table. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * Represents a collection of all the columns in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnCollectionLoadOptions; + /** + * Represents a collection of all the rows in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * Represents the sorting for the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * The style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableStyle?: Excel.Interfaces.TableStyleLoadOptions; + /** + * The worksheet containing the current table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Specifies if the first column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * Specifies if the last column contains special formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * Returns a numeric ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + legacyId?: boolean; + /** + * Name of the table. + + The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * Specifies if the header row is visible. This value can be set to show or remove the header row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * Specifies if the total row is visible. This value can be set to show or remove the total row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + } + /** + * Represents a collection of all the columns that are part of the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface TableColumnCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Retrieves the filter applied to the column. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the table column. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + } + /** + * Represents a column in a table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface TableColumnLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Retrieves the filter applied to the column. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + filter?: Excel.Interfaces.FilterLoadOptions; + /** + * Returns a unique key that identifies the column within the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * Returns the index number of the column within the columns collection of the table. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * Specifies the name of the table column. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: 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 or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface TableRowCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the index number of the row within the rows collection of the table. Zero-indexed. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + } + /** + * Represents a row in a table. + + Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface TableRowLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the index number of the row within the rows collection of the table. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + } + /** + * Represents the data validation applied to the current range. + To learn more about the data validation object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-data-validation | Add data validation to Excel ranges}. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DataValidationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Error alert when user enters invalid data. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + errorAlert?: boolean; + /** + * Specifies if data validation will be performed on blank cells. Default is `true`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + ignoreBlanks?: boolean; + /** + * Prompt when users select a cell. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + prompt?: boolean; + /** + * Data validation rule that contains different type of data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + rule?: boolean; + /** + * Type of the data validation, see `Excel.DataValidationType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + valid?: boolean; + } + /** + * Represents the results from `Range.removeDuplicates`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface RemoveDuplicatesResultLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Number of duplicated rows removed by the operation. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + removed?: boolean; + /** + * Number of remaining unique rows present in the resulting range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + uniqueRemaining?: boolean; + } + /** + * A format object encapsulating the range's font, fill, borders, alignment, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface RangeFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Collection of border objects that apply to the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * Returns the fill object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillLoadOptions; + /** + * Returns the font object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * Returns the format protection object for a range. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionLoadOptions; + /** + * Specifies if text is automatically indented when text alignment is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoIndent?: boolean; + /** + * Specifies the width of all colums within the range. If the column widths are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnWidth?: boolean; + /** + * Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + horizontalAlignment?: boolean; + /** + * An integer from 0 to 250 that indicates the indent level. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + indentLevel?: boolean; + /** + * The reading order for the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder?: boolean; + /** + * The height of all rows in the range. If the row heights are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHeight?: boolean; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shrinkToFit?: boolean; + /** + * 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. + * + * @remarks + * [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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardHeight?: boolean; + /** + * Specifies if 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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardWidth?: boolean; + /** + * Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: boolean; + /** + * Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** + * Represents the format protection of a range object. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface FormatProtectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + locked?: boolean; + } + /** + * Represents the background of a range object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface RangeFillLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of the background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * 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 a uniform pattern setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern?: boolean; + /** + * The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternColor?: boolean; + /** + * Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternTintAndShade?: boolean; + /** + * Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + } + /** + * Represents the border of an object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface RangeBorderLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * Constant value that indicates the specific side of the border. See `Excel.BorderIndex` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + /** + * Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + weight?: boolean; + } + /** + * Represents the border objects that make up the range border. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface RangeBorderCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies a double that lightens or darkens a color for the 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 a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + /** + * For EACH ITEM in the collection: Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + weight?: boolean; + } + /** + * This object represents the font attributes (font name, font size, color, etc.) for an object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface RangeFontLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the bold status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * Specifies the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * Font size. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size?: boolean; + /** + * Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + strikethrough?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subscript?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + superscript?: boolean; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform font `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + /** + * Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + underline?: boolean; + } + /** + * A collection of all the chart objects on a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents chart axes. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesLoadOptions; + /** + * For EACH ITEM in the collection: Represents the data labels on the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * For EACH ITEM in the collection: Encapsulates the format properties for the chart area. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatLoadOptions; + /** + * For EACH ITEM in the collection: Represents the legend for the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendLoadOptions; + /** + * For EACH ITEM in the collection: Encapsulates the options for a pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pivotOptions?: Excel.Interfaces.ChartPivotOptionsLoadOptions; + /** + * For EACH ITEM in the collection: Represents the plot area for the chart. + * + * @remarks + * [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. + * + * @remarks + * [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 formatting of the title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleLoadOptions; + /** + * For EACH ITEM in the collection: The worksheet containing the current chart. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies a chart category label level enumeration constant, referring to the level of the source category labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel?: boolean; + /** + * For EACH ITEM in the collection: Specifies the type of the chart. See `Excel.ChartType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the way that blank cells are plotted on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs?: boolean; + /** + * For EACH ITEM in the collection: Specifies the height, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: The unique ID of chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of a chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies the way columns or rows are used as data series on the chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly?: boolean; + /** + * For EACH ITEM in the collection: Specifies a chart series name level enumeration constant, referring to the level of the source series names. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether to display all field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. + If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum?: boolean; + /** + * For EACH ITEM in the collection: Specifies the chart style for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + width?: boolean; + } + /** + * Represents a chart object in a workbook. + To learn more about the chart object model, see {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-charts | Work with charts using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents chart axes. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesLoadOptions; + /** + * Represents the data labels on the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * Encapsulates the format properties for the chart area. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatLoadOptions; + /** + * Represents the legend for the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendLoadOptions; + /** + * Encapsulates the options for a pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pivotOptions?: Excel.Interfaces.ChartPivotOptionsLoadOptions; + /** + * Represents the plot area for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotArea?: Excel.Interfaces.ChartPlotAreaLoadOptions; + /** + * Represents either a single series or collection of series in the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + series?: Excel.Interfaces.ChartSeriesCollectionLoadOptions; + /** + * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleLoadOptions; + /** + * The worksheet containing the current chart. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Specifies a chart category label level enumeration constant, referring to the level of the source category labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel?: boolean; + /** + * Specifies the type of the chart. See `Excel.ChartType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * Specifies the way that blank cells are plotted on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs?: boolean; + /** + * Specifies the height, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + height?: boolean; + /** + * The unique ID of chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + id?: boolean; + /** + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + left?: boolean; + /** + * Specifies the name of a chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * Specifies the way columns or rows are used as data series on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotBy?: boolean; + /** + * True if only visible cells are plotted. False if both visible and hidden cells are plotted. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly?: boolean; + /** + * Specifies a chart series name level enumeration constant, referring to the level of the source series names. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel?: boolean; + /** + * Specifies whether to display all field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. + If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum?: boolean; + /** + * Specifies the chart style for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + style?: boolean; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + top?: boolean; + /** + * Specifies the width, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + width?: boolean; + } + /** + * Encapsulates the options for the pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChartPivotOptionsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies whether to display the 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showAxisFieldButtons?: boolean; + /** + * Specifies whether to display the legend field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLegendFieldButtons?: boolean; + /** + * Specifies whether to display the report filter field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showReportFilterFieldButtons?: boolean; + /** + * Specifies whether to display the show value field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showValueFieldButtons?: boolean; + } + /** + * Encapsulates the format properties for the overall chart area. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartAreaFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the border format of chart area, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + /** + * Specifies the color scheme of the chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + colorScheme?: boolean; + /** + * Specifies if the chart area of the chart has rounded corners. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + roundedCorners?: boolean; + } + /** + * Represents a collection of chart series. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Encapsulates the bin options for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + binOptions?: Excel.Interfaces.ChartBinOptionsLoadOptions; + /** + * For EACH ITEM in the collection: Encapsulates the options for the box and whisker charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsLoadOptions; + /** + * For EACH ITEM in the collection: Represents a collection of all data labels in the series. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; + /** + * For EACH ITEM in the collection: Encapsulates the options for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + mapOptions?: Excel.Interfaces.ChartMapOptionsLoadOptions; + /** + * For EACH ITEM in the collection: Returns a collection of all points in the series. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + xErrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; + /** + * For EACH ITEM in the collection: Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + yErrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the group for the specified series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + axisGroup?: boolean; + /** + * For EACH ITEM in the collection: This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bubbleScale?: boolean; + /** + * For EACH ITEM in the collection: Represents the chart type of a series. See `Excel.ChartType` for details. + * + * @remarks + * [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 doughnut exploded charts. + Throws an `InvalidArgument` error on invalid charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + explosion?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the series is filtered. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + filtered?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + gapWidth?: boolean; + /** + * For EACH ITEM in the collection: Specifies the color for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the type for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumValue?: boolean; + /** + * For EACH ITEM in the collection: Specifies the color for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the type for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointValue?: boolean; + /** + * For EACH ITEM in the collection: Specifies the color for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the type for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumValue?: boolean; + /** + * For EACH ITEM in the collection: Specifies the series gradient style of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the series has data labels. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * For EACH ITEM in the collection: Specifies the fill color for negative data points in a series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + invertColor?: boolean; + /** + * For EACH ITEM in the collection: True if Excel inverts the pattern in the item when it corresponds to a negative number. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + invertIfNegative?: boolean; + /** + * For EACH ITEM in the collection: Specifies the marker background color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the marker foreground color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the marker size of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * For EACH ITEM in the collection: Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + overlap?: boolean; + /** + * For EACH ITEM in the collection: Specifies the series parent label strategy area for a treemap chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentLabelStrategy?: boolean; + /** + * For EACH ITEM in the collection: Specifies the plot order of a chart series within the chart group. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + plotOrder?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + secondPlotSize?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether connector lines are shown in waterfall charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showConnectorLines?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether leader lines are displayed for each data label in the series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLeaderLines?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the series has a shadow. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the series is smooth. Only applicable to line and scatter charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + /** + * For EACH ITEM in the collection: Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + splitValue?: boolean; + /** + * For EACH ITEM in the collection: True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + varyByCategories?: boolean; + } + /** + * Represents a series in a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Encapsulates the bin options for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + binOptions?: Excel.Interfaces.ChartBinOptionsLoadOptions; + /** + * Encapsulates the options for the box and whisker charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsLoadOptions; + /** + * Represents a collection of all data labels in the series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; + /** + * Encapsulates the options for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + mapOptions?: Excel.Interfaces.ChartMapOptionsLoadOptions; + /** + * Returns a collection of all points in the series. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + xErrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + yErrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; + /** + * Specifies the group for the specified series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + axisGroup?: boolean; + /** + * This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bubbleScale?: boolean; + /** + * Represents the chart type of a series. See `Excel.ChartType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnut exploded charts. + Throws an `InvalidArgument` error on invalid charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: boolean; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + explosion?: boolean; + /** + * Specifies if the series is filtered. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + filtered?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + gapWidth?: boolean; + /** + * Specifies the color for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumColor?: boolean; + /** + * Specifies the type for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumType?: boolean; + /** + * Specifies the maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumValue?: boolean; + /** + * Specifies the color for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointColor?: boolean; + /** + * Specifies the type for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointType?: boolean; + /** + * Specifies the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointValue?: boolean; + /** + * Specifies the color for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumColor?: boolean; + /** + * Specifies the type for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumType?: boolean; + /** + * Specifies the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumValue?: boolean; + /** + * Specifies the series gradient style of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientStyle?: boolean; + /** + * Specifies if the series has data labels. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * Specifies the fill color for negative data points in a series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + invertColor?: boolean; + /** + * True if Excel inverts the pattern in the item when it corresponds to a negative number. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + invertIfNegative?: boolean; + /** + * Specifies the marker background color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * Specifies the marker foreground color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * Specifies the marker size of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + overlap?: boolean; + /** + * Specifies the series parent label strategy area for a treemap chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentLabelStrategy?: boolean; + /** + * Specifies the plot order of a chart series within the chart group. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + plotOrder?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + secondPlotSize?: boolean; + /** + * Specifies whether connector lines are shown in waterfall charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showConnectorLines?: boolean; + /** + * Specifies whether leader lines are displayed for each data label in the series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLeaderLines?: boolean; + /** + * Specifies if the series has a shadow. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies if the series is smooth. Only applicable to line and scatter charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + /** + * Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitType?: boolean; + /** + * Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + splitValue?: boolean; + /** + * True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + varyByCategories?: boolean; + } + /** + * Encapsulates the format properties for the chart series + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * A collection of all the chart points within a series inside a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartPointsCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the data label of a chart point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelLoadOptions; + /** + * For EACH ITEM in the collection: Encapsulates the format properties chart point. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * For EACH ITEM in the collection: HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * For EACH ITEM in the collection: HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * For EACH ITEM in the collection: Represents marker size of a data point. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * For EACH ITEM in the collection: Returns the value of a chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + } + /** + * Represents a point of a series in a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartPointLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the data label of a chart point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelLoadOptions; + /** + * Encapsulates the format properties chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatLoadOptions; + /** + * Represents whether a data point has a data label. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * Represents marker size of a data point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * Returns the value of a chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + } + /** + * Represents the formatting object for chart points. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartPointFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the border format of a chart data point, which includes color, style, and weight information. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + } + /** + * Represents the chart axes. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartAxesLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the category axis in a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisLoadOptions; + /** + * Represents the series axis of a 3-D chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisLoadOptions; + /** + * Represents the value axis in an axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + valueAxis?: Excel.Interfaces.ChartAxisLoadOptions; + } + /** + * Represents a single axis in a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the formatting of a chart object, which includes line and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatLoadOptions; + /** + * Returns an object that represents the major gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesLoadOptions; + /** + * Returns an object that represents the minor gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesLoadOptions; + /** + * Represents the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleLoadOptions; + /** + * Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + alignment?: boolean; + /** + * Specifies the group for the specified axis. See `Excel.ChartAxisGroup` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + axisGroup?: boolean; + /** + * Specifies the base unit for the specified category axis. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit?: boolean; + /** + * Specifies the category axis type. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + categoryType?: boolean; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `Position` instead. + * Specifies the specified axis where the other axis crosses. See `Excel.ChartAxisPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + crosses?: boolean; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `PositionAt` instead. + * Specifies the specified axis where the other axis crosses at. Set to this property should use `SetCrossesAt(double)` method. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + crossesAt?: boolean; + /** + * Specifies the custom axis display unit value. To set this property, please use the `SetCustomDisplayUnit(double)` method. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + customDisplayUnit?: boolean; + /** + * Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + displayUnit?: boolean; + /** + * Specifies the height, in points, of the chart axis. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: boolean; + /** + * Specifies if the value axis crosses the category axis between categories. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isBetweenCategories?: boolean; + /** + * Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: boolean; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * Specifies the base of the logarithm when using logarithmic scales. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + logBase?: boolean; + /** + * Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + majorTickMark?: boolean; + /** + * Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minimum?: boolean; + /** + * Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + minorTickMark?: boolean; + /** + * Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorUnit?: boolean; + /** + * Specifies if an axis is multilevel. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + multiLevel?: boolean; + /** + * Specifies the format code for the axis tick label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + offset?: boolean; + /** + * Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + /** + * Specifies the axis position where the other axis crosses. You should use the `SetPositionAt(double)` method to set this property. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + positionAt?: boolean; + /** + * Specifies if Excel plots data points from last to first. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder?: boolean; + /** + * Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + scaleType?: boolean; + /** + * Specifies if the axis display unit label is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel?: boolean; + /** + * Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing?: boolean; + /** + * Specifies the number of categories or series between tick marks. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing?: boolean; + /** + * Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: boolean; + /** + * Specifies the axis type. See `Excel.ChartAxisType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + /** + * Specifies if the axis is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the chart axis. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + width?: boolean; + } + /** + * Encapsulates the format properties for the chart axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + /** + * Specifies chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * Represents the title of a chart axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisTitleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the formatting of the chart axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatLoadOptions; + /** + * Specifies the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + textOrientation?: boolean; + /** + * Specifies if the axis title is visibile. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * Represents the chart axis title formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisTitleFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the chart axis title's border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * Represents a collection of all the data labels on a chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartDataLabelsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the format of chart data labels, which includes fill and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatLoadOptions; + /** + * Specifies if data labels automatically generate appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShapeType?: boolean; + /** + * Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when the `TextOrientation` of data label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: boolean; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * Specifies the format code for data labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * String representing the separator used for the data labels on a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + separator?: boolean; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showAsDataCallout?: boolean; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + /** + * Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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 the data label is -90, 90, or 180. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: boolean; + } + /** + * Represents the data label of a chart point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartDataLabelLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the format of chart data label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartDataLabelFormatLoadOptions; + /** + * Specifies if the data label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * String value that represents the formula of chart data label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula?: boolean; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShapeType?: boolean; + /** + * Returns the height, in points, of the chart data label. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * String value that represents the format code for data label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + position?: boolean; + /** + * String representing the separator used for the data label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + separator?: boolean; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showAsDataCallout?: boolean; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showBubbleSize?: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showCategoryName?: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showLegendKey?: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showPercentage?: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showSeriesName?: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showValue?: boolean; + /** + * String representing the text of the data label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text?: boolean; + /** + * Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: boolean; + /** + * Returns the width, in points, of the chart data label. Value is `null` if the chart data label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * Encapsulates the format properties for the chart data labels. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartDataLabelFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Represents the font attributes (such as font name, font size, and color) for a chart data label. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * Represents the data table object of a chart. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + interface ChartDataTableLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the format of a chart data table, which includes fill, font, and border format. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + format?: Excel.Interfaces.ChartDataTableFormatLoadOptions; + /** + * Specifies whether to display the horizontal border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showHorizontalBorder?: boolean; + /** + * Specifies whether to show the legend key of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showLegendKey?: boolean; + /** + * Specifies whether to display the outline border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showOutlineBorder?: boolean; + /** + * Specifies whether to display the vertical border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showVerticalBorder?: boolean; + /** + * Specifies whether to show the data table of the chart. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + visible?: boolean; + } + /** + * Represents the format of a chart data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + interface ChartDataTableFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the border format of chart data table, which includes color, line style, and weight. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Represents the font attributes (such as font name, font size, and color) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * This object represents the attributes for a chart's error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChartErrorBarsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the formatting type of the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.Interfaces.ChartErrorBarsFormatLoadOptions; + /** + * Specifies if error bars have an end style cap. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endStyleCap?: boolean; + /** + * Specifies which parts of the error bars to include. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + include?: boolean; + /** + * The type of range marked by the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: boolean; + /** + * Specifies whether the error bars are displayed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + } + /** + * Encapsulates the format properties for chart error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChartErrorBarsFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * Represents major or minor gridlines on a chart axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartGridlinesLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the formatting of chart gridlines. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatLoadOptions; + /** + * Specifies if the axis gridlines are visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * Encapsulates the format properties for chart gridlines. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartGridlinesFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * Represents the legend in a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartLegendLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the formatting of a chart legend, which includes fill and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatLoadOptions; + /** + * Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: boolean; + /** + * Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: boolean; + /** + * Specifies if the chart legend should overlap with the main body of the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * Specifies if the legend has a shadow on the chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies the top of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: boolean; + /** + * Specifies if the chart legend is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + width?: boolean; + } + /** + * Represents the legend entry in `legendEntryCollection`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartLegendEntryLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the height of the legend entry on the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * Specifies the index of the legend entry in the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + index?: boolean; + /** + * Specifies the left value of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * Specifies the top of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * Represents the visibility of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * Represents the width of the legend entry on the chart Legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * Represents a collection of legend entries. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartLegendEntryCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the height of the legend entry on the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Specifies the index of the legend entry in the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Specifies the left value of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Specifies the top of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Represents the visibility of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * For EACH ITEM in the collection: Represents the width of the legend entry on the chart Legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * Encapsulates the format properties of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartLegendFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Represents the font attributes such as font name, font size, and color of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * Encapsulates the properties for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChartMapOptionsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the series map labels strategy of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + labelStrategy?: boolean; + /** + * Specifies the series mapping level of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: boolean; + /** + * Specifies the series projection type of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + projectionType?: boolean; + } + /** + * Represents a chart title object of a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartTitleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the formatting of a chart title, which includes fill and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatLoadOptions; + /** + * Returns the height, in points, of the chart title. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: boolean; + /** + * Specifies the horizontal alignment for chart title. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: boolean; + /** + * Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: boolean; + /** + * Specifies if the chart title will overlay the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * Represents the position of chart title. See `Excel.ChartTitlePosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + position?: boolean; + /** + * Represents a boolean value that determines if the chart title has a shadow. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies the chart's title text. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + textOrientation?: boolean; + /** + * Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: boolean; + /** + * Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: boolean; + /** + * Specifies if the chart title is visibile. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the chart title. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + width?: boolean; + } + /** + * Represents the substring in chart related objects that contain text, like a `ChartTitle` object or `ChartAxisTitle` object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartFormatStringLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the font attributes, such as font name, font size, and color of a chart characters object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * Provides access to the formatting options for a chart title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartTitleFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the border format of chart title, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Represents the font attributes (such as font name, font size, and color) for an object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * Represents the border formatting of a chart element. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartBorderLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of borders in the chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + color?: boolean; + /** + * Represents the line style of the border. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + lineStyle?: boolean; + /** + * Represents weight of the border, in points. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + weight?: boolean; + } + /** + * Encapsulates the bin options for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChartBinOptionsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if bin overflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowOverflow?: boolean; + /** + * Specifies if bin underflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowUnderflow?: boolean; + /** + * Specifies the bin count of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + count?: boolean; + /** + * Specifies the bin overflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + overflowValue?: boolean; + /** + * Specifies the bin's type for a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: boolean; + /** + * Specifies the bin underflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underflowValue?: boolean; + /** + * Specifies the bin width value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: boolean; + } + /** + * Represents the properties of a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChartBoxwhiskerOptionsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if the quartile calculation type of a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + quartileCalculation?: boolean; + /** + * Specifies if inner points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showInnerPoints?: boolean; + /** + * Specifies if the mean line is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanLine?: boolean; + /** + * Specifies if the mean marker is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanMarker?: boolean; + /** + * Specifies if outlier points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showOutlierPoints?: boolean; + } + /** + * Encapsulates the formatting options for line elements. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartLineFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of lines in the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * Represents the line style. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + lineStyle?: boolean; + /** + * Represents weight of the line, in points. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + weight?: boolean; + } + /** + * This object represents the font attributes (such as font name, font size, and color) for a chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartFontLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the bold status of font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * Represents the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * Font name (e.g., "Calibri") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * Size of the font (e.g., 11) + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size?: boolean; + /** + * Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + underline?: boolean; + } + /** + * This object represents the attributes for a chart trendline object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartTrendlineLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the formatting of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatLoadOptions; + /** + * Represents the label of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + label?: Excel.Interfaces.ChartTrendlineLabelLoadOptions; + /** + * Represents the number of periods that the trendline extends backward. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + backwardPeriod?: boolean; + /** + * Represents the number of periods that the trendline extends forward. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + intercept?: boolean; + /** + * Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: boolean; + /** + * Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: boolean; + /** + * True if the equation for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showEquation?: boolean; + /** + * True if the r-squared value for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showRSquared?: boolean; + /** + * Represents the type of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + } + /** + * Represents a collection of chart trendlines. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartTrendlineCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the formatting of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatLoadOptions; + /** + * For EACH ITEM in the collection: Represents the label of a chart trendline. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + backwardPeriod?: boolean; + /** + * For EACH ITEM in the collection: Represents the number of periods that the trendline extends forward. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + intercept?: boolean; + /** + * For EACH ITEM in the collection: Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. + * + * @remarks + * [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, a `null` value represents automatic values. The returned value is always a string + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showEquation?: boolean; + /** + * For EACH ITEM in the collection: True if the r-squared value for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showRSquared?: boolean; + /** + * For EACH ITEM in the collection: Represents the type of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + } + /** + * Represents the format properties for the chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartTrendlineFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * This object represents the attributes for a chart trendline label object. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartTrendlineLabelLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The format of the chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartTrendlineLabelFormatLoadOptions; + /** + * Specifies if the trendline label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * String value that represents the formula of the chart trendline label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula?: boolean; + /** + * Returns the height, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: boolean; + /** + * Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * String value that represents the format code for the trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * String representing the text of the trendline label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text?: boolean; + /** + * Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: boolean; + /** + * Returns the width, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * Encapsulates the format properties for the chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartTrendlineLabelFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * This object represents the attributes for a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartPlotAreaLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the formatting of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartPlotAreaFormatLoadOptions; + /** + * Specifies the height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * Specifies the inside height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideHeight?: boolean; + /** + * Specifies the inside left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideLeft?: boolean; + /** + * Specifies the inside top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideTop?: boolean; + /** + * Specifies the inside width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideWidth?: boolean; + /** + * Specifies the left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * Specifies the position of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + /** + * Specifies the top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * Specifies the width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * Represents the format properties for a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartPlotAreaFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the border attributes of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + } + /** + * A collection of all the visuals on a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface VisualCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The unique ID of this visual instance. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Represents if the visual is supported in the new Excel on the web chart format task pane. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSupportedInVisualTaskpane?: boolean; + } + /** + * Represents a visual object in a workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface VisualLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The unique ID of this visual instance. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * Represents if the visual is supported in the new Excel on the web chart format task pane. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSupportedInVisualTaskpane?: boolean; + } + /** + * This object represents the attributes for a property. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface VisualPropertyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns `true` if the property should be expandable in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + expandableUI?: boolean; + /** + * Returns true when a default value for this property exists + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + hasDefault?: boolean; + /** + * Returns `true` if the property should be hidden in the UI. Its children will still be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + hideMeButShowChildrenUI?: boolean; + /** + * Returns the property ID. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * The zero-index value at which the property is present in the parent collection. + Only valid for properties that are children of `VisualPropertyType.Collection`. + Returns `null` otherwise. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + index?: boolean; + /** + * Returns true when the property's value is currently the default + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isDefault?: boolean; + /** + * Returns the property localized name. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + localizedName?: boolean; + /** + * Returns the localized property options for `IEnumProperty` only. If property type isn't an enum, it returns `null`. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + localizedOptions?: boolean; + /** + * Returns the maximum value of the property. Only valid for `INumericProperty` properties. Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + max?: boolean; + /** + * Maximum size of the property. + Only valid for `VisualPropertyType.Collection`. + Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + maxSize?: boolean; + /** + * Returns the minimum value of the property. Only valid for `INumericProperty` properties. Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + min?: boolean; + /** + * Minimum size of the property. + Only valid for `VisualPropertyType.Collection`. + Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + minSize?: boolean; + /** + * Returns `true` if the next property should be on the same line in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + nextPropOnSameLine?: boolean; + /** + * Returns the property options for `IEnumProperty` only. If the property type isn't an enum, it returns `null`. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + options?: boolean; + /** + * Name of the parent property. + Only valid for properties that are children of `VisualPropertyType.Collection`. + Returns `null` otherwise. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + parentName?: boolean; + /** + * Returns `true` if a reset button for the property should be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + showResetUI?: boolean; + /** + * Size of the property. + Only valid for `VisualPropertyType.Collection`. + Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + size?: boolean; + /** + * Returns the step size of the property. Only valid for `INumericProperty` properties. Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + stepSize?: boolean; + /** + * Returns the property type. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + type?: boolean; + /** + * Returns the property value. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + value?: boolean; + } + /** + * Represents a collection of visual object properties. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface VisualPropertyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns `true` if the property should be expandable in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + expandableUI?: boolean; + /** + * For EACH ITEM in the collection: Returns true when a default value for this property exists + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + hasDefault?: boolean; + /** + * For EACH ITEM in the collection: Returns `true` if the property should be hidden in the UI. Its children will still be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + hideMeButShowChildrenUI?: boolean; + /** + * For EACH ITEM in the collection: Returns the property ID. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The zero-index value at which the property is present in the parent collection. + Only valid for properties that are children of `VisualPropertyType.Collection`. + Returns `null` otherwise. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Returns true when the property's value is currently the default + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isDefault?: boolean; + /** + * For EACH ITEM in the collection: Returns the property localized name. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + localizedName?: boolean; + /** + * For EACH ITEM in the collection: Returns the localized property options for `IEnumProperty` only. If property type isn't an enum, it returns `null`. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + localizedOptions?: boolean; + /** + * For EACH ITEM in the collection: Returns the maximum value of the property. Only valid for `INumericProperty` properties. Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + max?: boolean; + /** + * For EACH ITEM in the collection: Maximum size of the property. + Only valid for `VisualPropertyType.Collection`. + Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + maxSize?: boolean; + /** + * For EACH ITEM in the collection: Returns the minimum value of the property. Only valid for `INumericProperty` properties. Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + min?: boolean; + /** + * For EACH ITEM in the collection: Minimum size of the property. + Only valid for `VisualPropertyType.Collection`. + Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + minSize?: boolean; + /** + * For EACH ITEM in the collection: Returns `true` if the next property should be on the same line in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + nextPropOnSameLine?: boolean; + /** + * For EACH ITEM in the collection: Returns the property options for `IEnumProperty` only. If the property type isn't an enum, it returns `null`. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + options?: boolean; + /** + * For EACH ITEM in the collection: Name of the parent property. + Only valid for properties that are children of `VisualPropertyType.Collection`. + Returns `null` otherwise. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + parentName?: boolean; + /** + * For EACH ITEM in the collection: Returns `true` if a reset button for the property should be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + showResetUI?: boolean; + /** + * For EACH ITEM in the collection: Size of the property. + Only valid for `VisualPropertyType.Collection`. + Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + size?: boolean; + /** + * For EACH ITEM in the collection: Returns the step size of the property. Only valid for `INumericProperty` properties. Returns `null` if it's invalid. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + stepSize?: boolean; + /** + * For EACH ITEM in the collection: Returns the property type. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Returns the property value. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + value?: boolean; + } + /** + * Manages sorting operations on `Table` objects. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface TableSortLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the current conditions used to last sort the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + fields?: boolean; + /** + * Specifies if the casing impacts the last sort of the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + matchCase?: boolean; + /** + * Represents the Chinese character ordering method last used to sort the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + method?: boolean; + } + /** + * Manages the filtering of a table's column. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface FilterLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The currently applied filter on the given column. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + criteria?: boolean; + } + /** + * Represents the `AutoFilter` object. + AutoFilter turns the values in Excel column into specific filters based on the cell contents. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface AutoFilterLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * An array that holds all the filter criteria in the autofiltered range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + criteria?: boolean; + /** + * Specifies if the AutoFilter is enabled. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enabled?: boolean; + /** + * Specifies if the AutoFilter has filter criteria. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isDataFiltered?: boolean; + } + /** + * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + interface CultureInfoLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Defines the culturally appropriate format of displaying date and time. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + datetimeFormat?: Excel.Interfaces.DatetimeFormatInfoLoadOptions; + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + numberFormat?: Excel.Interfaces.NumberFormatInfoLoadOptions; + /** + * Gets the culture name in the format languagecode2-country/regioncode2 (e.g., "zh-cn" or "en-us"). This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + name?: boolean; + } + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + interface NumberFormatInfoLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the currency symbol for currency values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + currencySymbol?: boolean; + /** + * Gets the string used as the decimal separator for numeric values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + numberDecimalSeparator?: boolean; + /** + * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + numberGroupSeparator?: boolean; + } + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface DatetimeFormatInfoLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the string used as the date separator. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + dateSeparator?: boolean; + /** + * Gets the format string for a long date value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + longDatePattern?: boolean; + /** + * Gets the format string for a long time value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + longTimePattern?: boolean; + /** + * Gets the format string for a short date value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + shortDatePattern?: boolean; + /** + * Gets the string used as the time separator. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + timeSeparator?: 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. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartScopedCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The custom XML part's ID. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The custom XML part's namespace URI. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * A collection of custom XML parts. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The custom XML part's ID. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The custom XML part's namespace URI. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * Represents a custom XML part object in a workbook. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The custom XML part's ID. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * The custom XML part's namespace URI. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * Represents a scoped collection of PivotTables. The PivotTables are sorted based on the location of the PivotTable's top-left corner. They are ordered top-to-bottom and then left-to-right. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface PivotTableScopedCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The PivotLayout describing the layout and visual structure of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layout?: Excel.Interfaces.PivotLayoutLoadOptions; + /** + * For EACH ITEM in the collection: The worksheet containing the current PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + allowMultipleFiltersPerField?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the PivotTable allows values in the data body to be edited by the user. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableDataValueEditing?: boolean; + /** + * For EACH ITEM in the collection: ID of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + refreshOnOpen?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the PivotTable uses custom lists when sorting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useCustomSortLists?: boolean; + } + /** + * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + interface PivotTableCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The PivotLayout describing the layout and visual structure of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layout?: Excel.Interfaces.PivotLayoutLoadOptions; + /** + * For EACH ITEM in the collection: The worksheet containing the current PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + allowMultipleFiltersPerField?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the PivotTable allows values in the data body to be edited by the user. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableDataValueEditing?: boolean; + /** + * For EACH ITEM in the collection: ID of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + refreshOnOpen?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the PivotTable uses custom lists when sorting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useCustomSortLists?: boolean; + } + /** + * Represents an Excel PivotTable. + To learn more about the PivotTable object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-pivottables | Work with PivotTables using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + interface PivotTableLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The PivotLayout describing the layout and visual structure of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layout?: Excel.Interfaces.PivotLayoutLoadOptions; + /** + * The worksheet containing the current PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + allowMultipleFiltersPerField?: boolean; + /** + * Specifies if the PivotTable allows values in the data body to be edited by the user. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableDataValueEditing?: boolean; + /** + * ID of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * Name of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + name?: boolean; + /** + * Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + refreshOnOpen?: boolean; + /** + * Specifies if the PivotTable uses custom lists when sorting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useCustomSortLists?: boolean; + } + /** + * Represents the visual layout of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotLayoutLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The style applied to the PivotTable. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pivotStyle?: Excel.Interfaces.PivotTableStyleLoadOptions; + /** + * The alt text description of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextDescription?: boolean; + /** + * The alt text title of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextTitle?: boolean; + /** + * Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFormat?: boolean; + /** + * The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. + Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. + By default, this is an empty string. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + emptyCellText?: boolean; + /** + * Specifies if the field list can be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + enableFieldList?: boolean; + /** + * Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. + Note that the value of `emptyCellText` persists when this property is set to `false`. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + fillEmptyCells?: boolean; + /** + * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layoutType?: boolean; + /** + * Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + preserveFormatting?: boolean; + /** + * Specifies if the PivotTable report shows grand totals for columns. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showColumnGrandTotals?: boolean; + /** + * Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + showFieldHeaders?: boolean; + /** + * Specifies if the PivotTable report shows grand totals for rows. + * + * @remarks + * [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`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + subtotalLocation?: boolean; + /** + * Returns a 2D array that contains pivot table's cell number format strings in tabular layout and no sub/grand totals. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tabularNumberFormat?: boolean; + /** + * Returns a 2D array that contains pivot table's cell local number format strings in tabular layout and no sub/grand totals. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tabularNumberFormatLocal?: boolean; + /** + * Returns a 2D array that contains pivot table's cell display texts in tabular layout and no sub/grand totals. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tabularText?: boolean; + /** + * Returns a 2D array that contains pivot table's cell values in tabular layout and no sub/grand totals. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tabularValues?: boolean; + } + /** + * Represents a collection of all the PivotHierarchies that are part of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotHierarchyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: ID of the PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + } + /** + * Represents the Excel PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotHierarchyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * ID of the PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * Name of the PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + } + /** + * Represents a collection of RowColumnPivotHierarchy items associated with the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface RowColumnPivotHierarchyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: ID of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Position of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + } + /** + * Represents the Excel RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface RowColumnPivotHierarchyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * ID of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * Name of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * Position of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + } + /** + * Represents a collection of FilterPivotHierarchy items associated with the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface FilterPivotHierarchyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Determines whether to allow multiple filter items. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems?: boolean; + /** + * For EACH ITEM in the collection: ID of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Position of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + } + /** + * Represents the Excel FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface FilterPivotHierarchyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Determines whether to allow multiple filter items. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems?: boolean; + /** + * ID of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * Name of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * Position of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + } + /** + * Represents a collection of DataPivotHierarchy items associated with the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DataPivotHierarchyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the PivotFields associated with the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + field?: Excel.Interfaces.PivotFieldLoadOptions; + /** + * For EACH ITEM in the collection: ID of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Number format of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * For EACH ITEM in the collection: Position of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the data should be shown as a specific summary calculation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAs?: boolean; + /** + * For EACH ITEM in the collection: Specifies if all items of the DataPivotHierarchy are shown. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + summarizeBy?: boolean; + } + /** + * Represents the Excel DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DataPivotHierarchyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the PivotFields associated with the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + field?: Excel.Interfaces.PivotFieldLoadOptions; + /** + * ID of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * Name of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * Number format of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * Position of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + /** + * Specifies if the data should be shown as a specific summary calculation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAs?: boolean; + /** + * Specifies if all items of the DataPivotHierarchy are shown. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + summarizeBy?: boolean; + } + /** + * Represents a collection of all the PivotFields that are part of a PivotTable's hierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotFieldCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: ID of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Determines whether to show all items of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAllItems?: boolean; + /** + * For EACH ITEM in the collection: Subtotals of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + subtotals?: boolean; + } + /** + * Represents the Excel PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotFieldLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * ID of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * Name of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * Determines whether to show all items of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAllItems?: boolean; + /** + * Subtotals of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + subtotals?: boolean; + } + /** + * Represents a collection of all the PivotItems related to their parent PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotItemCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: ID of the PivotItem. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isExpanded?: boolean; + /** + * For EACH ITEM in the collection: Name of the PivotItem. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the PivotItem is visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + visible?: boolean; + } + /** + * Represents the Excel PivotItem. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotItemLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * ID of the PivotItem. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isExpanded?: boolean; + /** + * Name of the PivotItem. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * Specifies if the PivotItem is visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + visible?: boolean; + } + /** + * Represents a worksheet-level custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface WorksheetCustomPropertyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the key of the custom property. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + key?: boolean; + /** + * Gets or sets the value of the custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + value?: boolean; + } + /** + * Contains the collection of worksheet-level custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface WorksheetCustomPropertyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the key of the custom property. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Gets or sets the value of the custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + value?: boolean; + } + /** + * Represents workbook properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface DocumentPropertiesLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + author?: boolean; + /** + * The category of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + category?: boolean; + /** + * The comments of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + comments?: boolean; + /** + * The company of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + company?: boolean; + /** + * Gets the creation date of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + creationDate?: boolean; + /** + * The keywords of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + keywords?: boolean; + /** + * Gets the last author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + lastAuthor?: boolean; + /** + * The manager of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + manager?: boolean; + /** + * Gets the revision number of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + revisionNumber?: boolean; + /** + * The subject of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + subject?: boolean; + /** + * The title of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + title?: boolean; + } + /** + * Represents a custom property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface CustomPropertyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + key?: boolean; + /** + * The type of the value used for the custom property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + /** + * The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + value?: boolean; + } + /** + * Contains the collection of custom properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface CustomPropertyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: The type of the value used for the custom property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + value?: boolean; + } + /** + * Represents a collection of all the conditional formats that are overlap the range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [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 a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [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 a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * For EACH ITEM in the collection: The priority of the conditional format in the current `ConditionalFormatCollection`. + * + * @remarks + * [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 the 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. + * + * @remarks + * [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. + Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + type?: boolean; + } + /** + * An object encapsulating a conditional format's range, format, rule, and other properties. + To learn more about the conditional formatting object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-conditional-formatting | Apply conditional formatting to Excel ranges}. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatLoadOptions; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * The priority of the conditional format in the current `ConditionalFormatCollection`. + * + * @remarks + * [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 the 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. + * + * @remarks + * [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. + Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + /** + * A type of conditional format. Only one can be set at a time. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + type?: boolean; + } + /** + * Represents an Excel conditional data bar type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface DataBarConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Representation of all values to the left of the axis in an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatLoadOptions; + /** + * Representation of all values to the right of the axis in an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatLoadOptions; + /** + * HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no axis is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisColor?: boolean; + /** + * Representation of how the axis is determined for an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisFormat?: boolean; + /** + * Specifies the direction that the data bar graphic should be based on. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: boolean; + /** + * If `true`, hides the values from the cells where the data bar is applied. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + upperBoundRule?: boolean; + } + /** + * Represents a conditional format for the positive side of the data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarPositiveFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor?: boolean; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor?: boolean; + /** + * Specifies if the data bar has a gradient. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + gradientFill?: boolean; + } + /** + * Represents a conditional format for the negative side of the data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarNegativeFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor?: boolean; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor?: boolean; + /** + * Specifies if the negative data bar has the same border color as the positive data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * Specifies if the negative data bar has the same fill color as the positive data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + matchPositiveFillColor?: boolean; + } + /** + * Represents a custom conditional format type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface CustomConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * Specifies the `Rule` object on this conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.Interfaces.ConditionalFormatRuleLoadOptions; + } + /** + * Represents a rule, for all traditional rule/format pairings. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatRuleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The formula, if required, on which to evaluate the conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula?: boolean; + /** + * The formula, if required, on which to evaluate the conditional format rule in the user's language. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: boolean; + /** + * The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formulaR1C1?: boolean; + } + /** + * Represents an icon set criteria for conditional formatting. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface IconSetConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * An array of criteria and icon sets 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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + criteria?: boolean; + /** + * If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * If `true`, hides the values and only shows icons. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * If set, displays the icon set option for the conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * Represents the color scale criteria for conditional formatting. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ColorScaleConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The criteria of the color scale. Midpoint is optional when using a two point color scale. + * + * @remarks + * [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). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + threeColorScale?: boolean; + } + /** + * Represents a top/bottom conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface TopBottomConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * The criteria of the top/bottom conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * Represents the preset criteria conditional format such as above average, below average, unique values, contains blank, nonblank, error, and noerror. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface PresetCriteriaConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * The rule of the conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * Represents a specific text conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface TextConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * The rule of the conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * Represents a cell value conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface CellValueConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * Specifies the rule object on this conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * A format object encapsulating the conditional formats range's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Collection of border objects that apply to the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions; + /** + * Returns the fill object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillLoadOptions; + /** + * Returns the font object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontLoadOptions; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + Cleared if `null` is passed in. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + numberFormat?: boolean; + } + /** + * This object represents the font attributes (font style, color, etc.) for an object. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFontLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if the font is bold. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + /** + * Specifies if the font is italic. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * Specifies the strikethrough status of the font. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + underline?: boolean; + } + /** + * Represents the background of a conditional range object. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFillLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of the fill, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + } + /** + * Represents the border of an object. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeBorderLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + /** + * Constant value that indicates the specific side of the border. See `Excel.ConditionalRangeBorderIndex` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * Represents the border objects that make up range border. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeBorderCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * @remarks + * [Api set: NumberFormatting 1.1] + * @beta + */ + interface NumberFormatterLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + hasDayOfWeek?: boolean; + hasMonth?: boolean; + hasYear?: boolean; + isCurrency?: boolean; + isDateTime?: boolean; + isNumeric?: boolean; + isPercent?: boolean; + isText?: boolean; + } + /** + * An object encapsulating a style's format and other properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface StyleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * A collection of four border objects that represent the style of the four borders. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * The fill of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillLoadOptions; + /** + * A `Font` object that represents the font of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoIndent?: boolean; + /** + * Specifies if the style is a built-in style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + builtIn?: boolean; + /** + * Specifies if the formula will be hidden when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: boolean; + /** + * Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * Specifies if the style includes the color, color index, line style, and weight border properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * Specifies if the style includes the number format property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * Specifies if the style includes the formula hidden and locked protection properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * An integer from 0 to 250 that indicates the indent level for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + indentLevel?: boolean; + /** + * Specifies if the object is locked when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * The name of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * The format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormat?: boolean; + /** + * The localized format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * The reading order for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readingOrder?: boolean; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * The text orientation for the style. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: boolean; + /** + * Specifies if Excel wraps the text in the object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + wrapText?: boolean; + } + /** + * Represents a collection of all the styles. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface StyleCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: A collection of four border objects that represent the style of the four borders. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * For EACH ITEM in the collection: The fill of the style. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * For EACH ITEM in the collection: Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoIndent?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style is a built-in style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + builtIn?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the formula will be hidden when the worksheet is protected. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style includes the color, color index, line style, and weight border properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style includes the number format property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style includes the formula hidden and locked protection properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + indentLevel?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the object is locked when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * For EACH ITEM in the collection: The name of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: The format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormat?: boolean; + /** + * For EACH ITEM in the collection: The localized format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * For EACH ITEM in the collection: The reading order for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readingOrder?: boolean; + /** + * For EACH ITEM in the collection: Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * For EACH ITEM in the collection: The text orientation for the style. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies if Excel wraps the text in the object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + wrapText?: boolean; + } + /** + * Represents a collection of table styles. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface TableStyleCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if this `TableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a table style, which defines the style elements by region of the table. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface TableStyleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the name of the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * Specifies if this `TableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a collection of PivotTable styles. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface PivotTableStyleCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the PivotTable style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if this `PivotTableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a PivotTable style, which defines style elements by PivotTable region. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface PivotTableStyleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the name of the PivotTable style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * Specifies if this `PivotTableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a collection of `SlicerStyle` objects. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface SlicerStyleCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the slicer style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if this `SlicerStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a slicer style, which defines style elements by region of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface SlicerStyleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the name of the slicer style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * Specifies if this `SlicerStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a collection of timeline styles. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface TimelineStyleCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the timeline style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if this `TimelineStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a `TimelineStyle`, which defines style elements by region in the timeline. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface TimelineStyleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the name of the timeline style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * Specifies if this `TimelineStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents layout and print settings that are not dependent on any printer-specific implementation. These settings include margins, orientation, page numbering, title rows, and print area. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface PageLayoutLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Header and footer configuration for the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headersFooters?: Excel.Interfaces.HeaderFooterGroupLoadOptions; + /** + * The worksheet's black and white print option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + blackAndWhite?: boolean; + /** + * The worksheet's bottom page margin to use for printing in points. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin?: boolean; + /** + * The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHorizontally?: boolean; + /** + * The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerVertically?: boolean; + /** + * The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + draftMode?: boolean; + /** + * The worksheet's first page number to print. A `null` value represents "auto" page numbering. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPageNumber?: boolean; + /** + * The worksheet's footer margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + footerMargin?: boolean; + /** + * The worksheet's header margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headerMargin?: boolean; + /** + * The worksheet's left margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin?: boolean; + /** + * The worksheet's orientation of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation?: boolean; + /** + * The worksheet's paper size of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + paperSize?: boolean; + /** + * Specifies if the worksheet's comments should be displayed when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printComments?: boolean; + /** + * The worksheet's print errors option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printErrors?: boolean; + /** + * Specifies if the worksheet's gridlines will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printGridlines?: boolean; + /** + * Specifies if the worksheet's headings will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printHeadings?: boolean; + /** + * The worksheet's page print order option. This specifies the order to use for processing the page number printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printOrder?: boolean; + /** + * The worksheet's right margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin?: boolean; + /** + * The worksheet's top margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin?: boolean; + /** + * The worksheet's print zoom options. + The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zoom?: boolean; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface HeaderFooterLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The center footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerFooter?: boolean; + /** + * The center header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHeader?: boolean; + /** + * The left footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftFooter?: boolean; + /** + * The left header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftHeader?: boolean; + /** + * The right footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightFooter?: boolean; + /** + * The right header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightHeader?: boolean; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface HeaderFooterGroupLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The general header/footer, used for all pages unless even/odd or first page is specified. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + defaultForAllPages?: Excel.Interfaces.HeaderFooterLoadOptions; + /** + * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + evenPages?: Excel.Interfaces.HeaderFooterLoadOptions; + /** + * The first page header/footer, for all other pages general or even/odd is used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPage?: Excel.Interfaces.HeaderFooterLoadOptions; + /** + * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + oddPages?: Excel.Interfaces.HeaderFooterLoadOptions; + /** + * The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useSheetScale?: boolean; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface PageBreakLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the column index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + columnIndex?: boolean; + /** + * Specifies the row index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rowIndex?: boolean; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface PageBreakCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the column index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + columnIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the row index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rowIndex?: boolean; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface RangeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns a data validation object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * For EACH ITEM in the collection: The worksheet containing the current range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + address?: boolean; + /** + * For EACH ITEM in the collection: Represents the range reference for the specified range in the language of the user. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + addressLocal?: boolean; + /** + * For EACH ITEM in the collection: Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + cellCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the total number of columns in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnCount?: boolean; + /** + * For EACH ITEM in the collection: Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * For EACH ITEM in the collection: Specifies the column number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnIndex?: boolean; + /** + * For EACH ITEM in the collection: Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: boolean; + /** + * For EACH ITEM in the collection: Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + hasSpill?: boolean; + /** + * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * For EACH ITEM in the collection: Represents the hyperlink for the current range. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hyperlink?: boolean; + /** + * For EACH ITEM in the collection: Represents if the current range is an entire column. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isEntireColumn?: boolean; + /** + * For EACH ITEM in the collection: Represents if the current range is an entire row. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isEntireRow?: boolean; + /** + * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Represents the data type state of each cell. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkedDataTypeState?: boolean; + /** + * For EACH ITEM in the collection: Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + numberFormat?: boolean; + /** + * For EACH ITEM in the collection: Represents the category of number format of each cell. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + numberFormatCategories?: boolean; + /** + * For EACH ITEM in the collection: Represents Excel's number format code for the given range, based on the language settings of the user. + Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. + Any returned text uses the locally-formatted strings based on the language specified in the system settings. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * For EACH ITEM in the collection: Returns the total number of rows in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rowCount?: boolean; + /** + * For EACH ITEM in the collection: Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rowIndex?: boolean; + /** + * For EACH ITEM in the collection: Represents if all the cells would be saved as an array formula. + Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. + Returns `null` if some cells would be saved as an array formula and some would not be. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + savedAsArray?: 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. + * + * @remarks + * [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 number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Specifies the type of data in each cell. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + /** + * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: boolean; + } + /** + * Contains the collection of cross-workbook level ranges. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface RangeAreasCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns a data validation object for all ranges in the `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dataValidation?: Excel.Interfaces.DataValidationLoadOptions; + /** + * For EACH ITEM in the collection: Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the worksheet for the current `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Returns the `RangeAreas` 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"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + address?: boolean; + /** + * For EACH ITEM in the collection: Returns the `RangeAreas` reference in the user locale. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + addressLocal?: boolean; + /** + * For EACH ITEM in the collection: Returns the number of rectangular ranges that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + areaCount?: boolean; + /** + * For EACH ITEM in the collection: 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). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + cellCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isEntireColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isEntireRow?: boolean; + /** + * For EACH ITEM in the collection: 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: boolean; + } + /** + * Represents a collection of comment objects that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface CommentCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the email of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorEmail?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorName?: boolean; + /** + * For EACH ITEM in the collection: The comment's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: Gets the content type of the comment. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + contentType?: boolean; + /** + * For EACH ITEM in the collection: Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + creationDate?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: boolean; + /** + * For EACH ITEM in the collection: The comment thread status. A value of `true` means that the comment thread is resolved. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + /** + * For EACH ITEM in the collection: Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent?: boolean; + } + /** + * Represents a comment in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface CommentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorEmail?: boolean; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorName?: boolean; + /** + * The comment's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: boolean; + /** + * Gets the content type of the comment. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + contentType?: boolean; + /** + * Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + creationDate?: boolean; + /** + * Specifies the comment identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * Gets the entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: boolean; + /** + * The comment thread status. A value of `true` means that the comment thread is resolved. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + /** + * Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent?: boolean; + } + /** + * Represents a collection of comment reply objects that are part of the comment. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface CommentReplyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the email of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorEmail?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorName?: boolean; + /** + * For EACH ITEM in the collection: The comment reply's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: The content type of the reply. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + contentType?: boolean; + /** + * For EACH ITEM in the collection: Gets the creation time of the comment reply. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + creationDate?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment reply identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: boolean; + /** + * For EACH ITEM in the collection: The comment reply status. A value of `true` means the reply is in the resolved state. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + /** + * For EACH ITEM in the collection: The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent?: boolean; + } + /** + * Represents a comment reply in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface CommentReplyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorEmail?: boolean; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorName?: boolean; + /** + * The comment reply's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: boolean; + /** + * The content type of the reply. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + contentType?: boolean; + /** + * Gets the creation time of the comment reply. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + creationDate?: boolean; + /** + * Specifies the comment reply identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * The entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: boolean; + /** + * The comment reply status. A value of `true` means the reply is in the resolved state. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + /** + * The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent?: boolean; + } + /** + * Represents a collection of all the shapes in the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the fill formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.Interfaces.ShapeFillLoadOptions; + /** + * For EACH ITEM in the collection: Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions; + /** + * For EACH ITEM in the collection: Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + group?: Excel.Interfaces.ShapeGroupLoadOptions; + /** + * For EACH ITEM in the collection: Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + image?: Excel.Interfaces.ImageLoadOptions; + /** + * For EACH ITEM in the collection: Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + line?: Excel.Interfaces.LineLoadOptions; + /** + * For EACH ITEM in the collection: Returns the line formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the parent group of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentGroup?: Excel.Interfaces.ShapeLoadOptions; + /** + * For EACH ITEM in the collection: Returns the text frame object of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + textFrame?: Excel.Interfaces.TextFrameLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the alternative description text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextDescription?: boolean; + /** + * For EACH ITEM in the collection: Specifies the alternative title text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextTitle?: boolean; + /** + * For EACH ITEM in the collection: Returns the number of connection sites on this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectionSiteCount?: boolean; + /** + * For EACH ITEM in the collection: Gets the display name of the shape. A newly created shape has a generated name + that is localized and may not match its `name`. In this scenario, you can use + this API to get the name that is displayed in the UI. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + displayName?: boolean; + /** + * For EACH ITEM in the collection: Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShapeType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the height, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the aspect ratio of this shape is locked. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lockAspectRatio?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Represents how the object is attached to the cells below it. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + placement?: boolean; + /** + * For EACH ITEM in the collection: Specifies the rotation, in degrees, of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rotation?: boolean; + /** + * For EACH ITEM in the collection: Specifies the share link to an Office Script file on OneDrive that will be associated with this shape. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + scriptLink?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Returns the type of this shape. See `Excel.ShapeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the shape is visible. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: boolean; + /** + * For EACH ITEM in the collection: Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zOrderPosition?: boolean; + } + /** + * Represents a generic shape object in the worksheet. A shape could be a geometric shape, a line, a group of shapes, etc. + To learn more about the shape object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-shapes | Work with shapes using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the fill formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.Interfaces.ShapeFillLoadOptions; + /** + * Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions; + /** + * Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + group?: Excel.Interfaces.ShapeGroupLoadOptions; + /** + * Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + image?: Excel.Interfaces.ImageLoadOptions; + /** + * Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + line?: Excel.Interfaces.LineLoadOptions; + /** + * Returns the line formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions; + /** + * Specifies the parent group of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentGroup?: Excel.Interfaces.ShapeLoadOptions; + /** + * Returns the text frame object of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + textFrame?: Excel.Interfaces.TextFrameLoadOptions; + /** + * Specifies the alternative description text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextDescription?: boolean; + /** + * Specifies the alternative title text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextTitle?: boolean; + /** + * Returns the number of connection sites on this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectionSiteCount?: boolean; + /** + * Gets the display name of the shape. A newly created shape has a generated name + that is localized and may not match its `name`. In this scenario, you can use + this API to get the name that is displayed in the UI. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + displayName?: boolean; + /** + * Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShapeType?: boolean; + /** + * Specifies the height, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + height?: boolean; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + /** + * The distance, in points, from the left side of the shape to the left side of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: boolean; + /** + * Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: boolean; + /** + * Specifies if the aspect ratio of this shape is locked. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lockAspectRatio?: boolean; + /** + * Specifies the name of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: boolean; + /** + * Represents how the object is attached to the cells below it. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + placement?: boolean; + /** + * Specifies the rotation, in degrees, of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rotation?: boolean; + /** + * Specifies the share link to an Office Script file on OneDrive that will be associated with this shape. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + scriptLink?: boolean; + /** + * The distance, in points, from the top edge of the shape to the top edge of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: boolean; + /** + * Returns the type of this shape. See `Excel.ShapeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: boolean; + /** + * Specifies if the shape is visible. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: boolean; + /** + * Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zOrderPosition?: boolean; + } + /** + * Represents a geometric shape inside a worksheet. A geometric shape can be a rectangle, block arrow, equation symbol, flowchart item, star, banner, callout, or any other basic shape in Excel. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface GeometricShapeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the `Shape` object for the geometric shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shape?: Excel.Interfaces.ShapeLoadOptions; + /** + * Returns the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + } + /** + * Represents an image in the worksheet. To get the corresponding `Shape` object, use `Image.shape`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ImageLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the `Shape` object associated with the image. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shape?: Excel.Interfaces.ShapeLoadOptions; + /** + * Specifies the shape identifier for the image object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + /** + * Returns the format of the image. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: boolean; + } + /** + * Represents a shape group inside a worksheet. To get the corresponding `Shape` object, use `ShapeGroup.shape`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeGroupLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the `Shape` object associated with the group. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shape?: Excel.Interfaces.ShapeLoadOptions; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + } + /** + * Represents the shape collection inside a shape group. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface GroupShapeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the fill formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.Interfaces.ShapeFillLoadOptions; + /** + * For EACH ITEM in the collection: Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions; + /** + * For EACH ITEM in the collection: Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + group?: Excel.Interfaces.ShapeGroupLoadOptions; + /** + * For EACH ITEM in the collection: Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + image?: Excel.Interfaces.ImageLoadOptions; + /** + * For EACH ITEM in the collection: Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + line?: Excel.Interfaces.LineLoadOptions; + /** + * For EACH ITEM in the collection: Returns the line formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the parent group of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentGroup?: Excel.Interfaces.ShapeLoadOptions; + /** + * For EACH ITEM in the collection: Returns the text frame object of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + textFrame?: Excel.Interfaces.TextFrameLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the alternative description text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextDescription?: boolean; + /** + * For EACH ITEM in the collection: Specifies the alternative title text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextTitle?: boolean; + /** + * For EACH ITEM in the collection: Returns the number of connection sites on this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectionSiteCount?: boolean; + /** + * For EACH ITEM in the collection: Gets the display name of the shape. A newly created shape has a generated name + that is localized and may not match its `name`. In this scenario, you can use + this API to get the name that is displayed in the UI. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + displayName?: boolean; + /** + * For EACH ITEM in the collection: Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShapeType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the height, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the aspect ratio of this shape is locked. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lockAspectRatio?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Represents how the object is attached to the cells below it. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + placement?: boolean; + /** + * For EACH ITEM in the collection: Specifies the rotation, in degrees, of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rotation?: boolean; + /** + * For EACH ITEM in the collection: Specifies the share link to an Office Script file on OneDrive that will be associated with this shape. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + scriptLink?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Returns the type of this shape. See `Excel.ShapeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the shape is visible. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: boolean; + /** + * For EACH ITEM in the collection: Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zOrderPosition?: boolean; + } + /** + * Represents a line inside a worksheet. To get the corresponding `Shape` object, use `Line.shape`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface LineLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the shape to which the beginning of the specified line is attached. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginConnectedShape?: Excel.Interfaces.ShapeLoadOptions; + /** + * Represents the shape to which the end of the specified line is attached. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endConnectedShape?: Excel.Interfaces.ShapeLoadOptions; + /** + * Returns the `Shape` object associated with the line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shape?: Excel.Interfaces.ShapeLoadOptions; + /** + * Represents the length of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadLength?: boolean; + /** + * Represents the style of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadStyle?: boolean; + /** + * Represents the width of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadWidth?: boolean; + /** + * Represents the connection site to which the beginning of a connector is connected. Returns `null` when the beginning of the line is not attached to any shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginConnectedSite?: boolean; + /** + * Represents the length of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadLength?: boolean; + /** + * Represents the style of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadStyle?: boolean; + /** + * Represents the width of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadWidth?: boolean; + /** + * Represents the connection site to which the end of a connector is connected. Returns `null` when the end of the line is not attached to any shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endConnectedSite?: boolean; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + /** + * Specifies if the beginning of the specified line is connected to a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isBeginConnected?: boolean; + /** + * Specifies if the end of the specified line is connected to a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isEndConnected?: boolean; + /** + * Represents the connector type for the line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectorType?: boolean; + } + /** + * Represents the fill formatting of a shape object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeFillLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + foregroundColor?: boolean; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency?: boolean; + /** + * Returns the fill type of the shape. See `Excel.ShapeFillType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: boolean; + } + /** + * Represents the line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeLineFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: boolean; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashStyle?: boolean; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: boolean; + /** + * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency?: boolean; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + weight?: boolean; + } + /** + * Represents the text frame of a shape object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface TextFrameLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See `Excel.TextRange` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + textRange?: Excel.Interfaces.TextRangeLoadOptions; + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeSetting?: boolean; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin?: boolean; + /** + * Specifies if the text frame contains text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + hasText?: boolean; + /** + * Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalAlignment?: boolean; + /** + * Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalOverflow?: boolean; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin?: boolean; + /** + * Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation?: boolean; + /** + * Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder?: boolean; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin?: boolean; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin?: boolean; + /** + * Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalAlignment?: boolean; + /** + * Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalOverflow?: boolean; + } + /** + * Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface TextRangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a `ShapeFont` object that represents the font attributes for the text range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + font?: Excel.Interfaces.ShapeFontLoadOptions; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + text?: boolean; + } + /** + * Represents the font attributes, such as font name, font size, and color, for a shape's `TextRange` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeFontLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: boolean; + /** + * Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + italic?: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: boolean; + /** + * Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + size?: boolean; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underline?: boolean; + } + /** + * Represents a `Slicer` object in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface SlicerLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The style applied to the slicer. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + slicerStyle?: Excel.Interfaces.SlicerStyleLoadOptions; + /** + * Represents the worksheet containing the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Represents the caption of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + caption?: boolean; + /** + * Represents the height, in points, of the slicer. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: boolean; + /** + * Represents the unique ID of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * Value is `true` if all filters currently applied on the slicer are cleared. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isFilterCleared?: boolean; + /** + * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: boolean; + /** + * Represents the name of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * Represents the slicer name used in the formula. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula?: boolean; + /** + * Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + sortBy?: boolean; + /** + * Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + style?: boolean; + /** + * Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: boolean; + /** + * Represents the width, in points, of the slicer. + Throws an `InvalidArgument` error when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: boolean; + } + /** + * Represents a collection of all the slicer objects in the workbook or a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface SlicerCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The style applied to the slicer. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + slicerStyle?: Excel.Interfaces.SlicerStyleLoadOptions; + /** + * For EACH ITEM in the collection: Represents the worksheet containing the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Represents the caption of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + caption?: boolean; + /** + * For EACH ITEM in the collection: Represents the height, in points, of the slicer. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Represents the unique ID of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Value is `true` if all filters currently applied on the slicer are cleared. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isFilterCleared?: boolean; + /** + * For EACH ITEM in the collection: Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Represents the name of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Represents the slicer name used in the formula. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula?: boolean; + /** + * For EACH ITEM in the collection: Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + sortBy?: boolean; + /** + * For EACH ITEM in the collection: Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Represents the width, in points, of the slicer. + Throws an `InvalidArgument` error when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: boolean; + } + /** + * Represents a slicer item in a slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface SlicerItemLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Value is `true` if the slicer item has data. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + hasData?: boolean; + /** + * Value is `true` if the slicer item is selected. + Setting this value will not clear the selected state of other slicer items. + By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSelected?: boolean; + /** + * Represents the unique value representing the slicer item. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + key?: boolean; + /** + * Represents the title displayed in the Excel UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + } + /** + * Represents a collection of all the slicer item objects in the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface SlicerItemCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Value is `true` if the slicer item has data. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + hasData?: boolean; + /** + * For EACH ITEM in the collection: Value is `true` if the slicer item is selected. + Setting this value will not clear the selected state of other slicer items. + By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSelected?: boolean; + /** + * For EACH ITEM in the collection: Represents the unique value representing the slicer item. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Represents the title displayed in the Excel UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + } + /** + * Represents a workbook ribbon. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface RibbonLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The active ribbon tab. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + activeTab?: boolean; + } + /** + * Represents a linked data type. + A linked data type is a data type connected to an online data source. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface LinkedDataTypeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The name of the data provider for the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dataProvider?: boolean; + /** + * The local time-zone date and time since the workbook was opened when the linked data type was last refreshed. + Returns `undefined` if the linked data type has not been refreshed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lastRefreshed?: boolean; + /** + * The name of the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + /** + * The frequency, in seconds, at which the linked data type is refreshed if `refreshMode` is set to "Periodic". + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + periodicRefreshInterval?: boolean; + /** + * Returns any warnings encountered after an attempt to load refresh data for this linked data type from the workbook. + 1st-party only. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshDataLoadWarnings?: boolean; + /** + * Returns any errors that occurred during a refresh operation for this linked data type from the workbook. + 1st-party only. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshErrors?: boolean; + /** + * The mechanism by which the data for the linked data type is retrieved. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshMode?: boolean; + /** + * The unique ID of the linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceId?: boolean; + /** + * Returns an array with all the refresh modes supported by the linked data type. The contents of the array may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + supportedRefreshModes?: boolean; + } + /** + * Represents a collection of linked data types. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface LinkedDataTypeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The name of the data provider for the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dataProvider?: boolean; + /** + * For EACH ITEM in the collection: The local time-zone date and time since the workbook was opened when the linked data type was last refreshed. + Returns `undefined` if the linked data type has not been refreshed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lastRefreshed?: boolean; + /** + * For EACH ITEM in the collection: The name of the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + /** + * For EACH ITEM in the collection: The frequency, in seconds, at which the linked data type is refreshed if `refreshMode` is set to "Periodic". + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + periodicRefreshInterval?: boolean; + /** + * For EACH ITEM in the collection: Returns any warnings encountered after an attempt to load refresh data for this linked data type from the workbook. + 1st-party only. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshDataLoadWarnings?: boolean; + /** + * For EACH ITEM in the collection: Returns any errors that occurred during a refresh operation for this linked data type from the workbook. + 1st-party only. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshErrors?: boolean; + /** + * For EACH ITEM in the collection: The mechanism by which the data for the linked data type is retrieved. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshMode?: boolean; + /** + * For EACH ITEM in the collection: The unique ID of the linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceId?: boolean; + /** + * For EACH ITEM in the collection: Returns an array with all the refresh modes supported by the linked data type. The contents of the array may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + supportedRefreshModes?: boolean; + } + /** + * Represents a named sheet view of a worksheet. A sheet view stores the sort and filter rules for a particular worksheet. + Every sheet view (even a temporary sheet view) has a unique, worksheet-scoped name that is used to access the view. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface NamedSheetViewLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets or sets the name of the sheet view. + The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + name?: boolean; + } + /** + * Represents the collection of sheet views in the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface NamedSheetViewCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets or sets the name of the sheet view. + The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + name?: boolean; + } + /** + * An object containing the result of a function-evaluation operation + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface FunctionResultLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [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). + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + value?: boolean; + } + } +} +declare var _EndExcel: string; + + +//////////////////////////////////////////////////////////////// +//////////////////////// End Excel APIs //////////////////////// +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// +/////////////////////// Begin Word APIs //////////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace Word { + /** + * Represents a single annotation container. This contains the actual annotation as well as the parent object. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + class Annotation 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 annotation object. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + readonly content: any; + /** + * Gets the ID of the annotation. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + readonly id: string; + /** + * Deletes the annotation from its parent and updates the canvas. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + delete(): void; + /** + * Returns the parent object of this annotation as an annotation. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + getParentAsAnnotation(): Word.Annotation; + /** + * Returns the parent object of this annotation as a paragraph. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + getParentAsParagraph(): Word.Paragraph; + /** + * Returns the parent object type of this annotation. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + getParentType(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.AnnotationLoadOptions): Word.Annotation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Annotation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Annotation; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Annotation; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.Annotation; + /** + * 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 Word.Annotation object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.AnnotationData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.AnnotationData): void; + } + /** + * Provides access to annotations on the current document or paragraph object. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + class AnnotationCollection 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.Annotation[]; + /** + * Gets the first annotation in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + getFirst(): Word.Annotation; + /** + * Gets the first annotation in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + getFirstOrNullObject(): Word.Annotation; + /** + * Gets an annotation object by its index in the collection. + * + * @remarks + * [Api set: WordApiOnline 1.1] + * + * @param index A number that identifies the index location of an annotation object. + */ + getItem(index: number): Word.Annotation; + /** + * This method requeries the annotation storage and refreshes the collection. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + refresh(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.AnnotationCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.AnnotationCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.AnnotationCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.AnnotationCollection; + /** + * Occurs when an annotation is added. + * + * @remarks + * [Api set: WordApiOnline 1.1] + * + * @eventproperty + */ + readonly onAnnotationAdded: OfficeExtension.EventHandlers; + /** + * Occurs when an annotation is updated. + * + * @remarks + * [Api set: WordApiOnline 1.1] + * + * @eventproperty + */ + readonly onAnnotationChanged: OfficeExtension.EventHandlers; + /** + * Occurs when an annotation is deleted. + * + * @remarks + * [Api set: WordApiOnline 1.1] + * + * @eventproperty + */ + readonly onAnnotationDeleted: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.AnnotationCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.AnnotationCollection; + /** + * 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 `Word.AnnotationCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.AnnotationCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.AnnotationCollectionData): void; + } + class AnnotationCollectionCustom { + private getDocument(); + private getReferenceId(); + } + interface AnnotationCollection extends OfficeExtension.ClientObject, AnnotationCollectionCustom { + } + /** + * Represents the application object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param base64File Optional. The Base64-encoded .docx file. The default value is null. + */ + createDocument(base64File?: string): Word.DocumentCreated; + /** + * Get the enterprise user info - including whether Tap feature is enabled, tenant root, and "Go Local" information. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + getEnterpriseUserInfo(): OfficeExtension.ClientResult; + /** + * Get friendly path for submitted MRU URL. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + * + * @param documentUrl Required. Document URL. + */ + getMruFriendlyPath(documentUrl: string): OfficeExtension.ClientResult; + /** + * Get the SharePoint tenant URL for the currently-active user. The URL will be null if no user is signed in. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + getSharePointTenantRoot(): OfficeExtension.ClientResult; + /** + * Check whether Tap (Insert Document Item) feature is enabled. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + isTapEnabled(): OfficeExtension.ClientResult; + /** + * Launch file URL in office application. Win32 Only. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + * + * @param documentUrl Required. Document URL. + * @param useUniversalAsBackUp Optional. Whether to launch in universal app if win32 app is not available. The default value is false. + */ + launchFileUrlInOfficeApp(documentUrl: string, useUniversalAsBackUp?: boolean): OfficeExtension.ClientResult; + /** + * Parse styles from template Base64 file and return JSON format of retrieved styles as a string. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param base64File Required. The template file. + */ + retrieveStylesFromBase64(base64File: string): OfficeExtension.ClientResult; + /** + * Create a new instance of Word.Application object + */ + static newObject(context: OfficeExtension.ClientRequestContext): Word.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 Word.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * Represents the body of a document or a section. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the body. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the body. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the body. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the body. The collection does not include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the collection of list objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * Gets the collection of paragraph objects in the body. **Important**: Paragraphs in tables are not returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. + * + * @remarks + * [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 an `ItemNotFound` error if there isn't a parent body. + * + * @remarks + * [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. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBodyOrNullObject: Word.Body; + /** + * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentSection: Word.Section; + /** + * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentSectionOrNullObject: Word.Section; + /** + * Gets the collection of table objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly type: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; + /** + * 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. + * @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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Gets comments associated with the body. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported content controls in the body. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + Make sure that your add-in respects it and is ready to handle new content control types. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param options Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * 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 on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Body.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets the OOXML (Office Open XML) representation of the body object. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * Gets the whole body, or the starting or ending point of the body, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Inserts a break at the specified location in the main document. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add to the body. + * @param insertLocation Required. The value must be 'Start' or 'End'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): void; + /** + * Wraps the Body object with a content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param contentControlType Optional. The content control type. The default is 'RichText'. + */ + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | "RichText" | "PlainText"): Word.ContentControl; + /** + * Inserts a document into the body at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts HTML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in the document. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a picture into the body at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The Base64-encoded image to be inserted in the body. + * @param insertLocation Required. The value must be 'Start' or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.InlinePicture; + /** + * Inserts OOXML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must be 'Start' or 'End'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [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 must 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.start | Word.InsertLocation.end | "Start" | "End", values?: string[][]): Word.Table; + /** + * Inserts text into the body at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the body and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.BodyLoadOptions): Word.Body; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Body; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Body; + /** + * Occurs when new comments are added. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentAdded: OfficeExtension.EventHandlers; + /** + * Occurs when a comment or its reply is changed. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentChanged: OfficeExtension.EventHandlers; + /** + * Occurs when comments are deleted. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentDeleted: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is deselected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentDeselected: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is selected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentSelected: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Body; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Body object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BodyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.BodyData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.BodyData): void; + } + class BodyCustom { + private getDocument(); + private getReferenceId(); + } + interface Body extends OfficeExtension.ClientObject, BodyCustom { + } + /** + * Represents a comment in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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; + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange: Word.CommentContentRange; + /** + * Gets the collection of reply objects associated with the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly replies: Word.CommentReplyCollection; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorEmail: string; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorName: string; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content: string; + /** + * Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly creationDate: Date; + /** + * Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly id: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved: 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. + * @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: Word.Comment): void; + /** + * Deletes the comment and its replies. + * + * @remarks + * [Api set: WordApi 1.4] + */ + delete(): void; + /** + * Gets the range in the main document where the comment is on. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getRange(): Word.Range; + /** + * Adds a new reply to the end of the comment thread. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param replyText Required. Reply text. + */ + reply(replyText: string): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentLoadOptions): Word.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Comment; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Comment; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.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 Word.Comment object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CommentData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.CommentData): void; + } + /** + * Contains a collection of {@link Word.Comment} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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: Word.Comment[]; + /** + * Gets the first comment in the collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirst(): Word.Comment; + /** + * Gets the first comment in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirstOrNullObject(): Word.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.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 `Word.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CommentCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.CommentCollectionData): void; + } + /** + * @remarks + * [Api set: WordApi 1.4] + */ + class CommentContentRange 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; + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold: boolean; + /** + * 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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly isEmpty: boolean; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough: boolean; + /** + * Gets the text of the comment range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly text: string; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text is not underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * @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.CommentContentRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CommentContentRange): void; + /** + * Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param text Required. The text to be inserted in to the CommentContentRange. + * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.CommentContentRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentContentRangeLoadOptions): Word.CommentContentRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentContentRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CommentContentRange; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentContentRange; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.CommentContentRange; + /** + * 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 Word.CommentContentRange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentContentRangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CommentContentRangeData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.CommentContentRangeData): void; + } + /** + * Represents a comment reply in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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; + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange: Word.CommentContentRange; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentComment: Word.Comment; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorEmail: string; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorName: string; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content: string; + /** + * Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly creationDate: Date; + /** + * Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * @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.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CommentReply): void; + /** + * Deletes the comment reply. + * + * @remarks + * [Api set: WordApi 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentReplyLoadOptions): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CommentReply; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentReply; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.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 Word.CommentReply object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CommentReplyData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.CommentReplyData): void; + } + /** + * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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: Word.CommentReply[]; + /** + * Gets the first comment reply in the collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirst(): Word.CommentReply; + /** + * Gets the first comment reply in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirstOrNullObject(): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentReplyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentReplyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentReplyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentReplyCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentReplyCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.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 `Word.CommentReplyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CommentReplyCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.CommentReplyCollectionData): void; + } + /** + * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text and plain text content controls are supported. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the content control. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the content control. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the content control. The collection does not include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the collection of list objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * Gets the collection of paragraph objects in the content control. **Important**: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control are not returned. From requirement set 1.3, paragraphs in such tables are also returned. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the parent body of the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the content control. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the content control. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the content control. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets the collection of table objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color: string; + /** + * Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly id: number; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. **Note**: The set operation for this property is not supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText: string; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "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, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls. + * + * @remarks + * [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"; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag: string; + /** + * Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title: string; + /** + * Gets the content control type. Only rich text and plain text content controls are supported currently. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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 comments associated with the content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported child content controls in this content control. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + Make sure that your add-in respects it and is ready to handle new content control types. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param options Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * 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 on the web, etc.). If you need exact fidelity, or consistency across platforms, use `ContentControl.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets the Office Open XML (OOXML) representation of the content control object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', 'Before', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation | "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets the text ranges in the content control by using punctuation marks and/or other ending marks. + * + * @remarks + * [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. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType Required. Type of break. + * @param insertLocation Required. The value must be 'Start', 'End', 'Before', or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): void; + /** + * Inserts a document into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts HTML into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in to the content control. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts an inline picture into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The Base64-encoded image to be inserted in the content control. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; + /** + * Inserts OOXML into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted in to the content control. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must 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.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns into, or next to, a content control. + * + * @remarks + * [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 must 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.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After", values?: string[][]): Word.Table; + /** + * Inserts text into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text Required. The text to be inserted in to the content control. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must 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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must 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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControl; + /** + * Occurs when new comments are added. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentAdded: OfficeExtension.EventHandlers; + /** + * Occurs when a comment or its reply is changed. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentChanged: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is deselected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentDeselected: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is selected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentSelected: OfficeExtension.EventHandlers; + /** + * 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. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @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. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onDeleted: OfficeExtension.EventHandlers; + /** + * Occurs when the content control is entered. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onEntered: OfficeExtension.EventHandlers; + /** + * Occurs when the content control is exited, for example, when the cursor leaves the content control. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onExited: OfficeExtension.EventHandlers; + /** + * Occurs when selection within the content control is changed. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.ContentControl object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ContentControlData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.ContentControlData): void; + } + class ContentControlCustom { + private getDocument(); + private getReferenceId(); + } + interface ContentControl extends OfficeExtension.ClientObject, ContentControlCustom { + } + /** + * 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 and plain text content controls are supported. + * + * @remarks + * [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[]; + /** + * Gets the content controls that have the specified tracking state. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param changeTrackingStates Required. An array of content control change tracking states. + */ + getByChangeTrackingStates(changeTrackingStates: Word.ChangeTrackingState[]): Word.ContentControlCollection; + /** + * Gets a content control by its identifier. Throws an `ItemNotFound` error if there isn't a content control with the identifier in this collection. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param id Required. A content control identifier. + */ + getById(id: number): Word.ContentControl; + /** + * Gets a content control by its identifier. If there isn't a content control with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param types Required. An array of content control types. + */ + getByTypes(types: Word.ContentControlType[]): Word.ContentControlCollection; + /** + * Gets the first content control in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.ContentControl; + /** + * Gets the first content control in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.ContentControl; + /** + * Gets a content control by its ID. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param id The content control's ID. + */ + getItem(id: number): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.ContentControlCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ContentControlCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.ContentControlCollectionData): void; + } + /** + * Specifies the options that define which content controls are returned. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlOptions { + /** + * An array of content control types, item must be 'RichText' or 'PlainText'. + * + * @remarks + * [Api set: WordApi 1.5] + */ + types: Word.ContentControlType[]; + } + /** + * Represents a custom property. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly key: string; + /** + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly type: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; + /** + * Specifies the value of the custom property. Note that even though Word on the web 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). + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomProperty; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.CustomProperty object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CustomPropertyData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.CustomPropertyData): void; + } + /** + * Contains the collection of {@link Word.CustomProperty} objects. + * + * @remarks + * [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[]; + /** + * Creates a new or sets an existing custom property. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + deleteAll(): void; + /** + * Gets the count of custom properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom property object by its key, which is case-insensitive. Throws an `ItemNotFound` error if the custom property does not exist. + * + * @remarks + * [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. If the custom property does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomPropertyCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomPropertyCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CustomPropertyCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.CustomPropertyCollectionData): void; + } + /** + * Represents a custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly id: string; + /** + * Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly namespaceUri: string; + /** + * Deletes the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + delete(): void; + /** + * Deletes an attribute with the given name from the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + * @param name Required. Name of the attribute. + */ + deleteAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string): void; + /** + * Deletes the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + */ + deleteElement(xpath: string, namespaceMappings: { + [key: string]: string; + }): void; + /** + * Gets the full XML content of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getXml(): OfficeExtension.ClientResult; + /** + * Inserts an attribute with the given name and value to the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + * @param name Required. Name of the attribute. + * @param value Required. Value of the attribute. + */ + insertAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string, value: string): void; + /** + * Inserts the given XML under the parent element identified by xpath at child position index. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @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 property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + * @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: { + [key: string]: string; + }, index?: number): void; + /** + * Queries the XML content of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath Required. An XPath query. + * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + * @returns An array where each item represents an entry matched by the XPath query. + */ + query(xpath: string, namespaceMappings: { + [key: string]: string; + }): OfficeExtension.ClientResult; + /** + * Sets the full XML content of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + * @param name Required. Name of the attribute. + * @param value Required. New value of the attribute. + */ + updateAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string, value: string): void; + /** + * Updates the XML of the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @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 property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + */ + updateElement(xpath: string, xml: string, namespaceMappings: { + [key: string]: string; + }): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomXmlPartLoadOptions): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomXmlPart; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.CustomXmlPart object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CustomXmlPartData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.CustomXmlPartData): void; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param namespaceUri Required. The namespace URI. + */ + getByNamespace(namespaceUri: string): Word.CustomXmlPartScopedCollection; + /** + * Gets the number of items in the collection. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom XML part based on its ID. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. If the CustomXmlPart does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomXmlPartCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomXmlPartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomXmlPartCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.CustomXmlPartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CustomXmlPartCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.CustomXmlPartCollectionData): void; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom XML part based on its ID. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. If the CustomXmlPart does not exist in the collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getOnlyItem(): Word.CustomXmlPart; + /** + * If the collection contains exactly one item, this method returns it. Otherwise, this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getOnlyItemOrNullObject(): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomXmlPartScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartScopedCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomXmlPartScopedCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.CustomXmlPartScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CustomXmlPartScopedCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.CustomXmlPartScopedCollectionData): void; + } + /** + * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. + * + * @remarks + * [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 main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly customXmlParts: Word.CustomXmlPartCollection; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly properties: Word.DocumentProperties; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly sections: Word.SectionCollection; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly settings: Word.SettingCollection; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + allowCloseOnUntitled: boolean; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; + /** + * 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. + * + * @remarks + * [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. + * @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; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name Required. A string representing the style name. + * @param type Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, type: Word.StyleType): Word.Style; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name Required. A string representing the style name. + * @param type Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, type: "Character" | "List" | "Paragraph" | "Table"): Word.Style; + /** + * Close current document. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param closeBehavior Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. + */ + close(closeBehavior?: Word.CloseBehavior): void; + /** + * Close current document. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param closeBehavior Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. + */ + close(closeBehavior?: "Save" | "SkipSave"): void; + /** + * Deletes a bookmark, if it exists, from the document. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + deleteBookmark(name: string): void; + /** + * Gets the annotation collection object on the current document filtered by the specified annotation type. + This object can be used to query all annotations of the specificed type or subscribe to change events for + these annotations. + * + * @remarks + * [Api set: WordApiOnline 1.1] + * + * @param annotationType A string representing the type of annotation to query. + */ + getAnnotationsByType(annotationType: string): Word.AnnotationCollection; + /** + * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark does not exist. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + getBookmarkRange(name: string): Word.Range; + /** + * Gets a bookmark's range. If the bookmark does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + getBookmarkRangeOrNullObject(name: string): Word.Range; + /** + * Gets the currently supported content controls in the document. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + Make sure that your add-in respects it and is ready to handle new content control types. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param options Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets the document's endnotes in a single body. + Not implemented in Word on the web. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getEndnoteBody(): Word.Body; + /** + * Gets the document's footnotes in a single body. + Not implemented in Word on the web. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFootnoteBody(): Word.Body; + /** + * Gets the neighborhood text around selection. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + * + * @param maxLength Optional. Max length for neighborhood text. The default value is 2000. + */ + getNeighborhoodTextAroundSelection(maxLength?: number): OfficeExtension.ClientResult; + /** + * Gets the current selection of the document. Multiple selections are not supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getSelection(): Word.Range; + /** + * Gets a StyleCollection object that represents the whole style set of the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getStyles(): Word.StyleCollection; + /** + * Inserts a document into the target document at a specific location with additional properties. + Headers, footers, watermarks, and other section properties are copied by default. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + * @param insertFileOptions Optional. The additional properties that should be imported to the destination document. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; + /** + * Launch Tap (Insert Document Item) feature native pane. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + * + * @param documentUrl Optional. The URL of document to show objects after initial launch. The default value is null. + */ + launchTapPane(documentUrl?: string): void; + /** + * Save the document. + * + * @remarks + * [Api set: WordApi 1.1] + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. + * + * @param saveBehavior Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. + * @param fileName Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; + /** + * Save the document. + * + * @remarks + * [Api set: WordApi 1.1] + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. + * + * @param saveBehavior Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. + * @param fileName Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; + /** + * Performs a search with the specified search options on the scope of the whole document. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Sets the navigation pane visibility (true to show, false to close) + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + setNavigationPaneVisibility(visible: boolean): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.DocumentLoadOptions): Word.Document; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Document; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onContentControlAdded: OfficeExtension.EventHandlers; + /** + * Occurs when count of words in the document changes. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + * + * @eventproperty + */ + readonly onWordCountChanged: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Document; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Document object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DocumentData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.DocumentData): void; + } + class DocumentCustom { + } + interface Document extends OfficeExtension.ClientObject, DocumentCustom { + } + /** + * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + */ + readonly customXmlParts: Word.CustomXmlPartCollection; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly properties: Word.DocumentProperties; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly sections: Word.SectionCollection; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + * + * @param name Required. A string representing the style name. + * @param type Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, type: Word.StyleType): Word.Style; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + * + * @param name Required. A string representing the style name. + * @param type Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, type: "Character" | "List" | "Paragraph" | "Table"): Word.Style; + /** + * Deletes a bookmark, if it exists, from the document. + * + * @remarks + * [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 an `ItemNotFound` error if the bookmark does not exist. + * + * @remarks + * [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. If the bookmark does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + getBookmarkRangeOrNullObject(name: string): Word.Range; + /** + * Gets the currently supported content controls in the document. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + Make sure that your add-in respects it and is ready to handle new content control types. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + * + * @param options Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets a StyleCollection object that represents the whole style set of the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + */ + getStyles(): Word.StyleCollection; + /** + * Inserts a document into the target document at a specific location with additional properties. + Headers, footers, watermarks, and other section properties are copied by default. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + * @param insertFileOptions Optional. The additional properties that should be imported to the destination document. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; + /** + * Opens the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + open(): void; + /** + * Save the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. + * + * @param saveBehavior Optional. DocumentCreated only supports 'Save'. + * @param fileName Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; + /** + * Save the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. + * + * @param saveBehavior Optional. DocumentCreated only supports 'Save'. + * @param fileName Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DocumentCreated; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DocumentCreated; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.DocumentCreated object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentCreatedData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DocumentCreatedData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.DocumentCreatedData): void; + } + /** + * Represents document properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly customProperties: Word.CustomPropertyCollection; + /** + * Gets the application name of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly applicationName: string; + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author: string; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category: string; + /** + * Specifies the comments of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments: string; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company: string; + /** + * Gets the creation date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly creationDate: Date; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format: string; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords: string; + /** + * Gets the last author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lastAuthor: string; + /** + * Gets the last print date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lastPrintDate: Date; + /** + * Gets the last save time of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lastSaveTime: Date; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager: string; + /** + * Gets the revision number of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly revisionNumber: string; + /** + * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly security: number; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject: string; + /** + * Gets the template of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly template: string; + /** + * Specifies the title of the document. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DocumentProperties; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DocumentProperties; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.DocumentProperties object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DocumentPropertiesData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.DocumentPropertiesData): void; + } + /** + * Represents a field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + class Field 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 body of the field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the field. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the field. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the field. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly result: Word.Range; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + */ + code: string; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data: string; + /** + * Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly kind: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked: boolean; + /** + * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + showCodes: boolean; + /** + * Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; + /** + * 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. + * @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.FieldUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Field): void; + /** + * Deletes the field. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Gets the next field. Throws an `ItemNotFound` error if this field is the last one. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getNext(): Word.Field; + /** + * Gets the next field. If this field is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getNextOrNullObject(): Word.Field; + /** + * Selects the field. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the field. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * Updates the field. + * + * @remarks + * [Api set: WordApi 1.5] + */ + updateResult(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.FieldLoadOptions): Word.Field; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Field; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Field; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Field; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.Field; + /** + * 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 Word.Field object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.FieldData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.FieldData): void; + } + /** + * Contains a collection of {@link Word.Field} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + class FieldCollection 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.Field[]; + /** + * Gets the first field in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirst(): Word.Field; + /** + * Gets the first field in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirstOrNullObject(): Word.Field; + /** + * Gets the Field object collection including the specified types of fields. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param types Required. An array of field types. + */ + getByTypes(types: Word.FieldType[]): Word.FieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.FieldCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.FieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.FieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.FieldCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.FieldCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.FieldCollection; + /** + * 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 `Word.FieldCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.FieldCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.FieldCollectionData): void; + } + /** + * Represents a font. + * + * @remarks + * [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; + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color: string; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough: boolean; + /** + * Specifies 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. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor: string; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name: string; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size: number; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.FontLoadOptions): Word.Font; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Font; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Font; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Font object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FontData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.FontData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.FontData): void; + } + /** + * Represents an inline picture. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.2] + */ + readonly paragraph: Word.Paragraph; + /** + * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the inline image. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the inline image. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription: string; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle: string; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height: number; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink: string; + /** + * Gets the format of the inline image. + * + * @remarks + * [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"; + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: WordApi 1.2] + */ + delete(): void; + /** + * Gets the Base64-encoded string representation of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getBase64ImageSrc(): OfficeExtension.ClientResult; + /** + * Gets the next inline image. Throws an `ItemNotFound` error if this inline image is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.InlinePicture; + /** + * Gets the next inline image. If this inline image is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.InlinePicture; + /** + * Gets the picture, or the starting or ending point of the picture, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location must be 'Whole', 'Start', or 'End'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; + /** + * Inserts a break at the specified location in the main document. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param breakType Required. The break type to add. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; + /** + * Wraps the inline picture with a rich text content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + insertContentControl(): Word.ContentControl; + /** + * Inserts a document at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Inserts HTML at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param html Required. The HTML to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Inserts an inline picture at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The Base64-encoded image to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Before', or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.before | Word.InsertLocation.after | "Replace" | "Before" | "After"): Word.InlinePicture; + /** + * Inserts OOXML at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts text at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Selects the inline picture. This causes Word to scroll to the selection. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param selectionMode Optional. The selection mode must 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. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param selectionMode Optional. The selection mode must 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.InlinePicture; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.InlinePicture; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.InlinePicture object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.InlinePictureData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.InlinePictureData): void; + } + /** + * Contains a collection of {@link Word.InlinePicture} objects. + * + * @remarks + * [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[]; + /** + * Gets the first inline image in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.InlinePicture; + /** + * Gets the first inline image in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.InlinePictureCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.InlinePictureCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.InlinePictureCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.InlinePictureCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.InlinePictureCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.InlinePictureCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.InlinePictureCollectionData): void; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the list's id. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly levelExistences: boolean[]; + /** + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must be 'Start', 'End', 'Before', or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; + /** + * Resets the font of the bullet, number, or picture at the specified level in the list. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param alignment Required. The level alignment that must 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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param alignment Required. The level alignment that must 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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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?: Array): void; + /** + * Sets the numbering format at the specified level in the list. + * + * @remarks + * [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?: Array): void; + /** + * Sets the picture at the specified level in the list. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListLoadOptions): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.List; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.List object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ListData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.ListData): void; + } + /** + * Contains a collection of {@link Word.List} objects. + * + * @remarks + * [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[]; + /** + * Gets a list by its identifier. Throws an `ItemNotFound` error if there isn't a list with the identifier in this collection. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id Required. A list identifier. + */ + getById(id: number): Word.List; + /** + * Gets a list by its identifier. If there isn't a list with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id Required. A list identifier. + */ + getByIdOrNullObject(id: number): Word.List; + /** + * Gets the first list in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.List; + /** + * Gets the first list in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.List; + /** + * Gets a list object by its ID. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id The list's ID. + */ + getItem(id: number): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.ListCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ListCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.ListCollectionData): void; + } + /** + * Represents the paragraph list item format. + * + * @remarks + * [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; + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level: number; + /** + * Gets the list item bullet, number, or picture as a string. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listString: string; + /** + * Gets the list item order number in relation to its siblings. + * + * @remarks + * [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. + * @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 an `ItemNotFound` error if the list item has no ancestor. + * + * @remarks + * [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. If the list item has no ancestor, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListItemLoadOptions): Word.ListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.ListItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ListItemData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.ListItemData): void; + } + /** + * Represents a list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class ListLevel 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 a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly font: Word.Font; + /** + * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedStyle: string; + /** + * Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberFormat: string; + /** + * Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberPosition: number; + /** + * Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberStyle: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; + /** + * Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + resetOnHigher: number; + /** + * Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + startAt: number; + /** + * Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + tabPosition: number; + /** + * Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textPosition: number; + /** + * Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingCharacter: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; + /** + * 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. + * @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.ListLevelUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ListLevel): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListLevelLoadOptions): Word.ListLevel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListLevel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ListLevel; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListLevel; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.ListLevel; + /** + * 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 Word.ListLevel object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ListLevelData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.ListLevelData): void; + } + /** + * Contains a collection of {@link Word.ListLevel} objects. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class ListLevelCollection 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.ListLevel[]; + /** + * Gets the first list level in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + getFirst(): Word.ListLevel; + /** + * Gets the first list level in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + getFirstOrNullObject(): Word.ListLevel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListLevelCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListLevelCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListLevelCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListLevelCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListLevelCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.ListLevelCollection; + /** + * 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 `Word.ListLevelCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ListLevelCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.ListLevelCollectionData): void; + } + /** + * Represents a ListTemplate. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class ListTemplate 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 a ListLevels collection that represents all the levels for the specified ListTemplate. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly listLevels: Word.ListLevelCollection; + /** + * Specifies whether the specified ListTemplate object is outline numbered. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + outlineNumbered: 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. + * @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.ListTemplateUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ListTemplate): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListTemplateLoadOptions): Word.ListTemplate; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListTemplate; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ListTemplate; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListTemplate; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.ListTemplate; + /** + * 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 Word.ListTemplate object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListTemplateData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ListTemplateData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.ListTemplateData): void; + } + /** + * Represents a footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + class NoteItem 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 body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly body: Word.Body; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly reference: Word.Range; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.NoteItemType | "Footnote" | "Endnote"; + /** + * 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. + * @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.NoteItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.NoteItem): void; + /** + * Deletes the note item. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getNext(): Word.NoteItem; + /** + * Gets the next note item of the same type. If this note item is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getNextOrNullObject(): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.NoteItemLoadOptions): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.NoteItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.NoteItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.NoteItem; + /** + * 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 Word.NoteItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.NoteItemData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.NoteItemData): void; + } + /** + * Contains a collection of {@link Word.NoteItem} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + class NoteItemCollection 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.NoteItem[]; + /** + * Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFirst(): Word.NoteItem; + /** + * Gets the first note item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFirstOrNullObject(): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.NoteItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.NoteItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.NoteItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.NoteItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.NoteItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.NoteItemCollection; + /** + * 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 `Word.NoteItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.NoteItemCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.NoteItemCollectionData): void; + } + /** + * Represents a single paragraph in a selection, range, content control, or document body. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the paragraph. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of fields in the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the paragraph. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the paragraph. The collection does not include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph is not in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly list: Word.List; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph is not part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listItem: Word.ListItem; + /** + * Gets the ListItem for the paragraph. If the paragraph is not part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listItemOrNullObject: Word.ListItem; + /** + * Gets the List to which this paragraph belongs. If the paragraph is not in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listOrNullObject: Word.List; + /** + * Gets the parent body of the paragraph. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the paragraph. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the paragraph. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent: number; + /** + * Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isLastParagraph: boolean; + /** + * Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isListItem: boolean; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent: number; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing: number; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter: number; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore: number; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel: number; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent: number; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter: number; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tableNestingLevel: number; + /** + * Gets the text of the paragraph. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Deletes the paragraph and its content from the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + delete(): void; + /** + * Moves this paragraph out of its list, if the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + detachFromList(): void; + /** + * Gets comments associated with the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported content controls in the paragraph. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param options Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * 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 on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Paragraph.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets the next paragraph. Throws an `ItemNotFound` error if the paragraph is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.Paragraph; + /** + * Gets the next paragraph. If the paragraph is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Paragraph; + /** + * Gets the Office Open XML (OOXML) representation of the paragraph object. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * Gets the previous paragraph. Throws an `ItemNotFound` error if the paragraph is the first one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getPrevious(): Word.Paragraph; + /** + * Gets the previous paragraph. If the paragraph is the first one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getPreviousOrNullObject(): Word.Paragraph; + /** + * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets a sub range on a paragraph given the start and length of this subrange on the paragraph + Throws an error if start or length are out of bounds + For internal use only. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param start Required. The start index of the subrange with respect to the paragraph. + * @param length Required. The length of the subrange. + */ + getSubrange(start: number, length: number): Word.Range; + /** + * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add to the document. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; + /** + * Wraps the Paragraph object with a content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param contentControlType Optional. The content control type. The default is 'RichText'. + */ + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | "RichText" | "PlainText"): Word.ContentControl; + /** + * Inserts a document into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts HTML into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in the paragraph. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a picture into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param base64EncodedImage Required. The Base64-encoded image to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; + /** + * Inserts OOXML into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted in the paragraph. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [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 must 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.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + /** + * Inserts text into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects and navigates the Word UI to the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * Splits the paragraph into child ranges by using delimiters. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Paragraph; + /** + * Occurs when new comments are added. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentAdded: OfficeExtension.EventHandlers; + /** + * Occurs when a comment or its reply is changed. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentChanged: OfficeExtension.EventHandlers; + /** + * Occurs when comments are deleted. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentDeleted: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is deselected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentDeselected: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is selected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentSelected: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Paragraph; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Paragraph object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ParagraphData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.ParagraphData): void; + } + class ParagraphCustom { + private getDocument(); + private getReferenceId(); + } + interface Paragraph extends OfficeExtension.ClientObject, ParagraphCustom { + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [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[]; + /** + * Gets the paragraph by its id in the collection. Throws an `ItemNotFound` error if the collection is empty. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + * + * @param id Required. Paragraph Id. + */ + getById(id: string): Word.Paragraph; + /** + * Gets the paragraph by its id in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + * + * @param id Required. Paragraph Id. + */ + getByIdOrNullObject(id: string): Word.Paragraph; + /** + * Gets the first paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Paragraph; + /** + * Gets the first paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Paragraph; + /** + * Gets the last paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getLast(): Word.Paragraph; + /** + * Gets the last paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ParagraphCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ParagraphCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ParagraphCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.ParagraphCollectionData): void; + } + /** + * Represents a style of paragraph in a document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + class ParagraphFormat 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; + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent: number; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent: number; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing: number; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter: number; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore: number; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent: number; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter: number; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore: number; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl: 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. + * @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.ParagraphFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ParagraphFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ParagraphFormatLoadOptions): Word.ParagraphFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ParagraphFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ParagraphFormat; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ParagraphFormat; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.ParagraphFormat; + /** + * 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 Word.ParagraphFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ParagraphFormatData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.ParagraphFormatData): void; + } + /** + * Represents a contiguous area in a document. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the range. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the range. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of inline picture objects in the range. + * + * @remarks + * [Api set: WordApi 1.2] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the collection of list objects in the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * Gets the collection of paragraph objects in the range. **Important**: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this range are not returned. From requirement set 1.3, paragraphs in such tables are also returned. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the parent body of the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the range. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the range. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the range. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets the collection of table objects in the range. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isEmpty: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "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. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Compares this range's location with another range's location. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + delete(): void; + /** + * Ends the preview activated by the PreviewTextReplacement function. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + endPreview(): void; + /** + * Returns a new range that extends from this range in either direction to cover another range. This range is not changed. Throws an `ItemNotFound` error if the two ranges do not have a union. + * + * @remarks + * [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. If the two ranges do not have a union, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range Required. Another range. + */ + expandToOrNullObject(range: Word.Range): Word.Range; + /** + * Gets the names all bookmarks in or overlapping the range. A bookmark is hidden if its name starts with the underscore character. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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 comments associated with the range. + * + * @remarks + * [Api set: WordApi 1.4] + * @returns + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported content controls in the range. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + Make sure that your add-in respects it and is ready to handle new content control types. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param options Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * 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 on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Range.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets hyperlink child ranges within the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getHyperlinkRanges(): Word.RangeCollection; + /** + * Gets the next text range by using punctuation marks and/or other ending marks. Throws an `ItemNotFound` error if this text range is the last one. + * + * @remarks + * [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. If this text range is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets the text child ranges in the range by using punctuation marks and/or other ending marks. + * + * @remarks + * [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; + /** + * Highlights the range with the given color temporarily without changing document content. + To highlight the text permanently, set the range's Font.HighlightColor. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + * + * @param color The color of the highlight. You can use a value either in the '#RRGGBB' format or the color name. + */ + highlight(color: string): void; + /** + * Inserts a bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; + /** + * Insert a comment on the range. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param commentText Required. The comment text to be inserted. + * @returns comment object + */ + insertComment(commentText: string): Word.Comment; + /** + * Wraps the Range object with a content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param contentControlType Optional. The content control type. The default is 'RichText'. + */ + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | "RichText" | "PlainText"): Word.ContentControl; + /** + * Inserts an endnote. The endnote reference is placed after the range. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param insertText Optional. Text to be inserted into the endnote body. The default is "". + */ + insertEndnote(insertText?: string): Word.NoteItem; + /** + * Inserts a field at the specified location. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param insertLocation Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + * @param fieldType Optional. Can be any FieldType constant. The default value is Empty. + * @param text Optional. Additional properties or options if needed for specified field type. + * @param removeFormatting Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. + */ + insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: Word.FieldType, text?: string, removeFormatting?: boolean): Word.Field; + /** + * Inserts a field at the specified location. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param insertLocation Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + * @param fieldType Optional. Can be any FieldType constant. The default value is Empty. + * @param text Optional. Additional properties or options if needed for specified field type. + * @param removeFormatting Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. + */ + insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined", text?: string, removeFormatting?: boolean): Word.Field; + /** + * Inserts a document at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Inserts a footnote. The footnote reference is placed after the range. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param insertText Optional. Text to be inserted into the footnote body. The default is "". + */ + insertFootnote(insertText?: string): Word.NoteItem; + /** + * Inserts HTML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Inserts a picture at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The Base64-encoded image to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.InlinePicture; + /** + * Inserts OOXML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [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 must 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.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + /** + * Insert object from file content (Base64, HTML, or XML) for Tap (Insert Document Item) feature. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + * + * @param fileContent Required. The file content in Base64, Open XML, or HTML format. + * @param objectType Required. Object type used by Tap feature. + * @param contentFormat Required. File content format. + */ + insertTapObjectFromFileContent(fileContent: string, objectType: Word.TapObjectType, contentFormat: Word.FileContentFormat): Word.Range; + /** + * Insert object from file content (Base64, HTML, or XML) for Tap (Insert Document Item) feature. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + * + * @param fileContent Required. The file content in Base64, Open XML, or HTML format. + * @param objectType Required. Object type used by Tap feature. + * @param contentFormat Required. File content format. + */ + insertTapObjectFromFileContent(fileContent: string, objectType: "Chart" | "SmartArt" | "Table" | "Image" | "Slide" | "OLE" | "Text", contentFormat: "Base64" | "Html" | "Ooxml"): Word.Range; + /** + * Inserts text at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Returns a new range as the intersection of this range with another range. This range is not changed. Throws an `ItemNotFound` error if the two ranges are not overlapped or adjacent. + * + * @remarks + * [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. If the two ranges are not overlapped or adjacent, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range Required. Another range. + */ + intersectWithOrNullObject(range: Word.Range): Word.Range; + /** + * Previews a potential text replacement for the range without changing document content. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + * + * @param replacement The text to preview as a replacement. + */ + previewTextReplacement(replacement: string): void; + /** + * Removes the highlight added by the Highlight function if any. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + removeHighlight(): void; + /** + * Performs a search with the specified SearchOptions on the scope of the range object. The search results are a collection of range objects. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects and navigates the Word UI to the range. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * Splits the range into child ranges by using delimiters. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.RangeLoadOptions): Word.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Range; + /** + * Occurs when new comments are added. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentAdded: OfficeExtension.EventHandlers; + /** + * Occurs when a comment or its reply is changed. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentChanged: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is deselected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentDeselected: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is selected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentSelected: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Range; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Range object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.RangeData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.RangeData): void; + } + class RangeCustom { + private getDocument(); + private getReferenceId(); + } + interface Range extends OfficeExtension.ClientObject, RangeCustom { + } + /** + * Contains a collection of {@link Word.Range} objects. + * + * @remarks + * [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[]; + /** + * Gets the first range in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Range; + /** + * Gets the first range in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.RangeCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.RangeCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.RangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.RangeCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.RangeCollectionData): void; + } + /** + * Specifies the options to determine what to copy when inserting a file. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface InsertFileOptions { + /** + * Represents whether the change tracking mode status from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importChangeTrackingMode?: boolean; + /** + * Represents whether the custom properties from the source document should be imported. Overwrites existing properties with the same name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + importCustomProperties?: boolean; + /** + * Represents whether the custom XML parts from the source document should be imported. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + importCustomXmlParts?: boolean; + /** + * Represents whether the page color and other background information from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importPageColor?: boolean; + /** + * Represents whether the paragraph spacing from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importParagraphSpacing?: boolean; + /** + * Represents whether the styles from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importStyles?: boolean; + /** + * Represents whether the theme from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importTheme?: boolean; + } + /** + * Specifies the options to be included in a search operation. + To learn more about how to use search options in the Word JavaScript APIs, read {@link https://docs.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. + * + * @remarks + * [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; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.SearchOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.SearchOptions; + /** + * Create a new instance of Word.SearchOptions object + */ + static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; + /** + * 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 Word.SearchOptions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SearchOptionsData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.SearchOptionsData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.SearchOptionsData): void; + } + class SearchOptionsCustom { + matchWildCards: boolean; + } + interface SearchOptions extends OfficeExtension.ClientObject, SearchOptionsCustom { + } + /** + * Represents a section in a Word document. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param type Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getFooter(type: Word.HeaderFooterType): Word.Body; + /** + * Gets one of the section's footers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param type Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getFooter(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; + /** + * Gets one of the section's headers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param type Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getHeader(type: Word.HeaderFooterType): Word.Body; + /** + * Gets one of the section's headers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param type Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getHeader(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; + /** + * Gets the next section. Throws an `ItemNotFound` error if this section is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.Section; + /** + * Gets the next section. If this section is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SectionLoadOptions): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Section; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Section object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.SectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.SectionData): void; + } + /** + * Contains the collection of the document's {@link Word.Section} objects. + * + * @remarks + * [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[]; + /** + * Gets the first section in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Section; + /** + * Gets the first section in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SectionCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.SectionCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SectionCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.SectionCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.SectionCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.SectionCollectionData): void; + } + /** + * Represents a setting of the add-in. + * + * @remarks + * [Api set: WordApi 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; + /** + * Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly key: string; + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 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. + * @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. + * + * @remarks + * [Api set: WordApi 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SettingLoadOptions): Word.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Setting; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Setting object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.SettingData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.SettingData): void; + } + class SettingCustom { + private static DateJSONPrefix; + private static DateJSONSuffix; + static replaceStringDateWithDate(value: any): any; + static replaceDateWithStringDate(value: any): any; + } + interface Setting extends OfficeExtension.ClientObject, SettingCustom { + } + /** + * Contains the collection of {@link Word.Setting} objects. + * + * @remarks + * [Api set: WordApi 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: Word.Setting[]; + /** + * Creates a new setting or sets an existing setting. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + deleteAll(): void; + /** + * Gets the count of settings. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a setting object by its key, which is case-sensitive. Throws an `ItemNotFound` error if the setting does not exist. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. If the setting does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SettingCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SettingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.SettingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SettingCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.SettingCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.SettingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.SettingCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.SettingCollectionData): void; + } + /** + * Contains a collection of {@link Word.Style} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + 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: Word.Style[]; + /** + * Get the style object by its name. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name Required. The style name. + */ + getByName(name: string): Word.Style; + /** + * If the corresponding style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name Required. The style name. + */ + getByNameOrNullObject(name: string): Word.Style; + /** + * Gets the number of the styles in the collection. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a style object by its index in the collection. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param index A number that identifies the index location of a style object. + */ + getItem(index: number): Word.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.StyleCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.StyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.StyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.StyleCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.StyleCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.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 `Word.StyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.StyleCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.StyleCollectionData): void; + } + /** + * Represents a style in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + 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; + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly font: Word.Font; + /** + * Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly listTemplate: Word.ListTemplate; + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly paragraphFormat: Word.ParagraphFormat; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly shading: Word.Shading; + /** + * Gets the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly baseStyle: string; + /** + * Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly builtIn: boolean; + /** + * Gets the description of the specified style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly description: string; + /** + * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly inUse: boolean; + /** + * Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly linked: boolean; + /** + * Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly nameLocal: string; + /** + * Gets the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly nextParagraphStyle: string; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority: number; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle: boolean; + /** + * Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility: 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. + * @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: Word.Style): void; + /** + * Deletes the style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.StyleLoadOptions): Word.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Style; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Style; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.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 Word.Style object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.StyleData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.StyleData): void; + } + /** + * Represents the shading object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class Shading 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; + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + backgroundPatternColor: string; + /** + * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + foregroundPatternColor: string; + /** + * Specifies the shading texture of the object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture: Word.ShadingTextureType | "Texture10Percent" | "Texture12Pt5Percent" | "Texture15Percent" | "Texture20Percent" | "Texture25Percent" | "Texture30Percent" | "Texture35Percent" | "Texture37Pt5Percent" | "Texture40Percent" | "Texture45Percent" | "Texture50Percent" | "Texture55Percent" | "Texture5Percent" | "Texture60Percent" | "Texture62Pt5Percent" | "Texture65Percent" | "Texture70Percent" | "Texture75Percent" | "Texture80Percent" | "Texture85Percent" | "Texture87Pt5Percent" | "Texture90Percent" | "Texture95Percent" | "TextureDarkDiagonalDown" | "TextureDarkDiagonalUp" | "TextureDarkGrid" | "TextureDarkHorizontal" | "TextureDarkTrellis" | "TextureDarkVertical" | "TextureLightDiagonalDown" | "TextureLightDiagonalUp" | "TextureLightGrid" | "TextureLightHorizontal" | "TextureLightTrellis" | "TextureLightVertical" | "TextureNone" | "TextureSolid"; + /** + * 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. + * @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.ShadingUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Shading): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ShadingLoadOptions): Word.Shading; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Shading; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Shading; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Shading; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.Shading; + /** + * 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 Word.Shading object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShadingData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ShadingData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.ShadingData): void; + } + /** + * Represents a table in a Word document. + * + * @remarks + * [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 collection of endnotes in the table. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the table. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the parent body of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains this table. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains this table. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains this table. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets all of the table rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rows: Word.TableRowCollection; + /** + * Gets the child tables nested one level deeper. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount: number; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isUniform: boolean; + /** + * Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly nestingLevel: number; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rowCount: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style: string; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "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"; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values: string[][]; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Specifies the width of the table in points. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It must 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.start | Word.InsertLocation.end | "Start" | "End", 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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It must 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.start | Word.InsertLocation.end | "Start" | "End", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * Autofits the table columns to the width of the window. + * + * @remarks + * [Api set: WordApi 1.3] + */ + autoFitWindow(): void; + /** + * Clears the contents of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + clear(): void; + /** + * Deletes the entire table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * Deletes specific columns. This is applicable to uniform tables. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + distributeColumns(): void; + /** + * Gets the border style for the specified border. + * + * @remarks + * [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. + * + * @remarks + * [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 an `ItemNotFound` error if the specified table cell does not exist. + * + * @remarks + * [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. If the specified table cell does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * Gets the next table. Throws an `ItemNotFound` error if this table is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.Table; + /** + * Gets the next table. If this table is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Table; + /** + * Gets the paragraph after the table. Throws an `ItemNotFound` error if there isn't a paragraph after the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphAfter(): Word.Paragraph; + /** + * Gets the paragraph after the table. If there isn't a paragraph after the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphAfterOrNullObject(): Word.Paragraph; + /** + * Gets the paragraph before the table. Throws an `ItemNotFound` error if there isn't a paragraph before the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphBefore(): Word.Paragraph; + /** + * Gets the paragraph before the table. If there isn't a paragraph before the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', or 'After'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | "Whole" | "Start" | "End" | "After"): Word.Range; + /** + * Inserts a content control on the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + insertContentControl(): Word.ContentControl; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [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 must 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.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + /** + * Merges the cells bounded inclusively by a first and last cell. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode must 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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableLoadOptions): Word.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Table; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Table object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.TableData): void; + } + /** + * Contains the collection of the document's Table objects. + * + * @remarks + * [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[]; + /** + * Gets the first table in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Table; + /** + * Gets the first table in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.TableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TableCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.TableCollectionData): void; + } + /** + * Represents a row in a Word document. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly cells: Word.TableCellCollection; + /** + * Gets the collection of endnotes in the table row. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the table row. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the table row. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly cellCount: number; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isHeader: boolean; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight: number; + /** + * Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rowIndex: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values: string[][]; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + clear(): void; + /** + * Deletes the entire row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * Gets the border style of the cells in the row. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * Gets the next row. Throws an `ItemNotFound` error if this row is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.TableRow; + /** + * Gets the next row. If this row is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.TableRow; + /** + * Inserts a content control on the row. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. Where the new rows should be inserted, relative to the current row. It must 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.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * Merges the row into one cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the row and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableRowLoadOptions): Word.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableRow; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.TableRow object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableRowData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.TableRowData): void; + } + /** + * Contains the collection of the document's TableRow objects. + * + * @remarks + * [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[]; + /** + * Gets the first row in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.TableRow; + /** + * Gets the first row in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableRowCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableRowCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TableRowCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.TableRowCollectionData): void; + } + /** + * Represents a table cell in a Word document. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly body: Word.Body; + /** + * Gets the parent row of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentRow: Word.TableRow; + /** + * Gets the parent table of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly cellIndex: number; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth: number; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rowIndex: number; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value: string; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Gets the width of the cell in points. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + deleteColumn(): void; + /** + * Deletes the row containing this cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + deleteRow(): void; + /** + * Gets the border style for the specified border. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * Gets the next cell. Throws an `ItemNotFound` error if this cell is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.TableCell; + /** + * Gets the next cell. If this cell is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It must 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.before | Word.InsertLocation.after | "Before" | "After", 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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It must 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.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @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. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableCellLoadOptions): Word.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableCell; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.TableCell object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableCellData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.TableCellData): void; + } + /** + * Contains the collection of the document's TableCell objects. + * + * @remarks + * [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[]; + /** + * Gets the first table cell in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.TableCell; + /** + * Gets the first table cell in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCellCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableCellCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCellCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableCellCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TableCellCollectionData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.TableCellCollectionData): void; + } + /** + * Specifies the border style. + * + * @remarks + * [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; + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color: string; + /** + * Specifies the type of the table border. + * + * @remarks + * [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"; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableBorder; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.TableBorder object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableBorderData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableBorderData; + /** + * Set mock data + */ + setMockData(data: Word.Interfaces.TableBorderData): void; + } + /** + * ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + enum ChangeTrackingMode { + /** + * ChangeTracking is turned off. + * @remarks + * [Api set: WordApi 1.4] + */ + off = "Off", + /** + * ChangeTracking is turned on for everyone. + * @remarks + * [Api set: WordApi 1.4] + */ + trackAll = "TrackAll", + /** + * Tracking is turned on for my changes only. + * @remarks + * [Api set: WordApi 1.4] + */ + trackMineOnly = "TrackMineOnly", + } + /** + * Specify the current version or the original version of the text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + enum ChangeTrackingVersion { + /** + * @remarks + * [Api set: WordApi 1.4] + */ + original = "Original", + /** + * @remarks + * [Api set: WordApi 1.4] + */ + current = "Current", + } + /** + * Specify the track state when ChangeTracking is on. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum ChangeTrackingState { + /** + * @remarks + * [Api set: WordApi 1.5] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + normal = "Normal", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + added = "Added", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + deleted = "Deleted", + } + /** + * Note item type + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum NoteItemType { + /** + * @remarks + * [Api set: WordApi 1.5] + */ + footnote = "Footnote", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + endnote = "Endnote", + } + /** + * Provides information about the type of a raised event. + * + * @remarks + * [Api set: WordApi 1.3] + */ + enum EventType { + /** + * ContentControlDeleted represents the event that the content control has been deleted. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlDeleted = "ContentControlDeleted", + /** + * ContentControlSelectionChanged represents the event that the selection in the content control has been changed. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlSelectionChanged = "ContentControlSelectionChanged", + /** + * ContentControlDataChanged represents the event that the data in the content control have been changed. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlDataChanged = "ContentControlDataChanged", + /** + * ContentControlAdded represents the event a content control has been added to the document. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlAdded = "ContentControlAdded", + /** + * AnnotationAdded represents the event an annotation has been added to the document. + * @remarks + * [Api set: WordApiOnline 1.1] + */ + annotationAdded = "AnnotationAdded", + /** + * AnnotationChanged represents the event an annotation has been updated in the document. + * @remarks + * [Api set: WordApiOnline 1.1] + */ + annotationChanged = "AnnotationChanged", + /** + * AnnotationDeleted represents the event an annotation has been deleted from the document. + * @remarks + * [Api set: WordApiOnline 1.1] + */ + annotationDeleted = "AnnotationDeleted", + /** + * Represents that one or more comments were deleted. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + commentDeleted = "CommentDeleted", + /** + * Represents that a comment was selected. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + commentSelected = "CommentSelected", + /** + * Represents that a comment was deselected. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + commentDeselected = "CommentDeselected", + /** + * Represents that a comment or its reply was changed. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + commentChanged = "CommentChanged", + /** + * Represents that one or more new comments were added. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + commentAdded = "CommentAdded", + /** + * Represents that a content control has been entered. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlEntered = "ContentControlEntered", + /** + * Represents that a content control has been exited. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlExited = "ContentControlExited", + /** + * Represents that a word count has been changed. + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + documentWordCountChanged = "DocumentWordCountChanged", + } + /** + * An enum that specifies an event's source. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum EventSource { + /** + * @remarks + * [Api set: WordApi 1.5] + */ + local = "Local", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + remote = "Remote", + } + /** + * Holds annotation information that is passed back on annotation events. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + interface AnnotationEventArgs { + /** + * The annotation object. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + annotation: Word.Annotation; + /** + * The event type. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + } + /** + * Provides information about the content control that raised an event. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ContentControlEventArgs { + /** + * The object that raised the event. Load this object to get its properties. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + contentControl: Word.ContentControl; + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlAdded event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlAddedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlDataChanged event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlDataChangedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlDeleted event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlDeletedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlEntered event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlEnteredEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlExited event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlExitedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about word count change. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + interface DocumentWordCountChangedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + source: Word.EventSource | "Local" | "Remote"; + /** + * Current word count in the document. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + wordCount: number; + } + /** + * Provides information about the content control that raised contentControlSelectionChanged event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlSelectionChangedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the comments that raised the comment event. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CommentEventArgs { + /** + * Represents how the comment changed event is triggered. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + changeType: Word.CommentChangeType | "none" | "edited" | "resolved" | "reopened" | "replyAdded" | "replyDeleted" | "replyEdited"; + /** + * Gets the CommentDetail array which contains the IDs and reply IDs of the involved comments. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + commentDetails: Word.CommentDetail[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Word.EventSource | "Local" | "Remote"; + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + } + /** + * A structure for the ID and reply IDs of this comment. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CommentDetail { + /** + * Represents the ID of this comment. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + id: string; + /** + * Represents the IDs of the replies to this comment. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + replyIds: string[]; + } + /** + * Represents how the comments in the event were changed. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + enum CommentChangeType { + /** + * No comment changed event is triggered. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + none = "none", + /** + * A comment was edited. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + edited = "edited", + /** + * A comment was resolved. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + resolved = "resolved", + /** + * A comment was reopened. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + reopened = "reopened", + /** + * A reply was added. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + replyAdded = "replyAdded", + /** + * A reply was deleted. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + replyDeleted = "replyDeleted", + /** + * A reply was edited. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + replyEdited = "replyEdited", + } + /** + * Specifies supported content control types and subtypes. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum ContentControlType { + /** + * @remarks + * [Api set: WordApi 1.1] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + richTextInline = "RichTextInline", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + richTextParagraphs = "RichTextParagraphs", + /** + * Contains a whole cell. + * @remarks + * [Api set: WordApi 1.1] + */ + richTextTableCell = "RichTextTableCell", + /** + * Contains a whole row. + * @remarks + * [Api set: WordApi 1.1] + */ + richTextTableRow = "RichTextTableRow", + /** + * Contains a whole table. + * @remarks + * [Api set: WordApi 1.1] + */ + richTextTable = "RichTextTable", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + plainTextInline = "PlainTextInline", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + plainTextParagraph = "PlainTextParagraph", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + picture = "Picture", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + buildingBlockGallery = "BuildingBlockGallery", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + checkBox = "CheckBox", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + comboBox = "ComboBox", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dropDownList = "DropDownList", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + datePicker = "DatePicker", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + repeatingSection = "RepeatingSection", + /** + * Identifies a rich text content control. + * @remarks + * [Api set: WordApi 1.1] + */ + richText = "RichText", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + plainText = "PlainText", + } + /** + * ContentControl appearance. + * + * @remarks + * [Api set: WordApi 1.1] + * Content control appearance options are BoundingBox, Tags, or Hidden. + */ + enum ContentControlAppearance { + /** + * Represents a content control shown as a shaded rectangle or bounding box (with optional title). + * @remarks + * [Api set: WordApi 1.1] + */ + boundingBox = "BoundingBox", + /** + * Represents a content control shown as start and end markers. + * @remarks + * [Api set: WordApi 1.1] + */ + tags = "Tags", + /** + * Represents a content control that is not shown. + * @remarks + * [Api set: WordApi 1.1] + */ + hidden = "Hidden", + } + /** + * The supported styles for underline format. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum UnderlineType { + /** + * @remarks + * [Api set: WordApi 1.1] + */ + mixed = "Mixed", + /** + * No underline. + * @remarks + * [Api set: WordApi 1.1] + */ + none = "None", + /** + * @deprecated Hidden is no longer supported. + * Warning: hidden has been deprecated. + * @remarks + * [Api set: WordApi 1.1] + */ + hidden = "Hidden", + /** + * @deprecated DotLine is no longer supported. + * Warning: dotLine has been deprecated. + * @remarks + * [Api set: WordApi 1.1] + */ + dotLine = "DotLine", + /** + * A single underline. This is the default value. + * @remarks + * [Api set: WordApi 1.1] + */ + single = "Single", + /** + * Only underline individual words. + * @remarks + * [Api set: WordApi 1.1] + */ + word = "Word", + /** + * A double underline. + * @remarks + * [Api set: WordApi 1.1] + */ + double = "Double", + /** + * A single thick underline. + * @remarks + * [Api set: WordApi 1.1] + */ + thick = "Thick", + /** + * A dotted underline. + * @remarks + * [Api set: WordApi 1.1] + */ + dotted = "Dotted", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dottedHeavy = "DottedHeavy", + /** + * A single dash underline. + * @remarks + * [Api set: WordApi 1.1] + */ + dashLine = "DashLine", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dashLineHeavy = "DashLineHeavy", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dashLineLong = "DashLineLong", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dashLineLongHeavy = "DashLineLongHeavy", + /** + * An alternating dot-dash underline. + * @remarks + * [Api set: WordApi 1.1] + */ + dotDashLine = "DotDashLine", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dotDashLineHeavy = "DotDashLineHeavy", + /** + * An alternating dot-dot-dash underline. + * @remarks + * [Api set: WordApi 1.1] + */ + twoDotDashLine = "TwoDotDashLine", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + twoDotDashLineHeavy = "TwoDotDashLineHeavy", + /** + * A single wavy underline. + * @remarks + * [Api set: WordApi 1.1] + */ + wave = "Wave", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + waveHeavy = "WaveHeavy", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + waveDouble = "WaveDouble", + } + /** + * Specifies the form of a break. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum BreakType { + /** + * Page break at the insertion point. + * @remarks + * [Api set: WordApi 1.1] + */ + page = "Page", + /** + * @deprecated Use sectionNext instead. + * Warning: next has been deprecated. Use sectionNext instead. + * @remarks + * [Api set: WordApi 1.1] + */ + next = "Next", + /** + * Section break on next page. + * @remarks + * [Api set: WordApi 1.1] + */ + sectionNext = "SectionNext", + /** + * New section without a corresponding page break. + * @remarks + * [Api set: WordApi 1.1] + */ + 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. + * @remarks + * [Api set: WordApi 1.1] + */ + 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. + * @remarks + * [Api set: WordApi 1.1] + */ + sectionOdd = "SectionOdd", + /** + * Line break. + * @remarks + * [Api set: WordApi 1.1] + */ + line = "Line", + } + /** + * The insertion location types. + * + * @remarks + * [Api set: WordApi 1.1] + * To be used with an API call, such as `obj.insertSomething(newStuff, location);`. + * If the location is "Before" or "After", the new content will be outside of the modified object. + * If the location is "Start" or "End", the new content will be included as part of the modified object. + */ + enum InsertLocation { + /** + * Add content before the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + before = "Before", + /** + * Add content after the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + after = "After", + /** + * Prepend content to the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + start = "Start", + /** + * Append content to the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + end = "End", + /** + * Replace the contents of the current object. + * @remarks + * [Api set: WordApi 1.1] + */ + replace = "Replace", + } + /** + * @remarks + * [Api set: WordApi 1.1] + */ + enum Alignment { + /** + * @remarks + * [Api set: WordApi 1.1] + */ + mixed = "Mixed", + /** + * Unknown alignment. + * @remarks + * [Api set: WordApi 1.1] + */ + unknown = "Unknown", + /** + * Alignment to the left. + * @remarks + * [Api set: WordApi 1.1] + */ + left = "Left", + /** + * Alignment to the center. + * @remarks + * [Api set: WordApi 1.1] + */ + centered = "Centered", + /** + * Alignment to the right. + * @remarks + * [Api set: WordApi 1.1] + */ + right = "Right", + /** + * Fully justified alignment. + * @remarks + * [Api set: WordApi 1.1] + */ + justified = "Justified", + } + /** + * @remarks + * [Api set: WordApi 1.1] + */ + enum HeaderFooterType { + /** + * Returns the header or footer on all pages of a section, but excludes the first page or even pages if they are different. + * @remarks + * [Api set: WordApi 1.1] + */ + primary = "Primary", + /** + * Returns the header or footer on the first page of a section. + * @remarks + * [Api set: WordApi 1.1] + */ + firstPage = "FirstPage", + /** + * Returns all headers or footers on even-numbered pages of a section. + * @remarks + * [Api set: WordApi 1.1] + */ + evenPages = "EvenPages", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BodyType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + mainDoc = "MainDoc", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + section = "Section", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + header = "Header", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footer = "Footer", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + tableCell = "TableCell", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + footnote = "Footnote", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + endnote = "Endnote", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + noteItem = "NoteItem", + } + /** + * This enum sets where the cursor (insertion point) in the document is after a selection. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum SelectionMode { + /** + * The entire range is selected. + * @remarks + * [Api set: WordApi 1.1] + */ + select = "Select", + /** + * The cursor is at the beginning of the selection (just before the start of the selected range). + * @remarks + * [Api set: WordApi 1.1] + */ + start = "Start", + /** + * The cursor is at the end of the selection (just after the end of the selected range). + * @remarks + * [Api set: WordApi 1.1] + */ + end = "End", + } + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ImageFormat { + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + unsupported = "Unsupported", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + undefined = "Undefined", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + bmp = "Bmp", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + jpeg = "Jpeg", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + gif = "Gif", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + tiff = "Tiff", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + png = "Png", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + icon = "Icon", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + exif = "Exif", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + wmf = "Wmf", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + emf = "Emf", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + pict = "Pict", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + pdf = "Pdf", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + svg = "Svg", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + whole = "Whole", + /** + * The starting point of the object. For content control, it is the point after the opening tag. + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + end = "End", + /** + * For content control only. It is the point before the opening tag. + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + after = "After", + /** + * The range between 'Start' and 'End'. + * @remarks + * [Api set: WordApi 1.3] + */ + content = "Content", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum LocationRelation { + /** + * Indicates that this instance and the range are in different sub-documents. + * @remarks + * [Api set: WordApi 1.3] + */ + unrelated = "Unrelated", + /** + * Indicates that this instance and the range represent the same range. + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + containsEnd = "ContainsEnd", + /** + * Indicates that this instance contains the range, with the exception of the start and end character of this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + insideEnd = "InsideEnd", + /** + * Indicates that this instance is inside the range. The range does not share the same start and end characters as this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + inside = "Inside", + /** + * Indicates that this instance occurs before, and is adjacent to, the range. + * @remarks + * [Api set: WordApi 1.3] + */ + adjacentBefore = "AdjacentBefore", + /** + * Indicates that this instance starts before the range and overlaps the range’s first character. + * @remarks + * [Api set: WordApi 1.3] + */ + overlapsBefore = "OverlapsBefore", + /** + * Indicates that this instance occurs before the range. + * @remarks + * [Api set: WordApi 1.3] + */ + before = "Before", + /** + * Indicates that this instance occurs after, and is adjacent to, the range. + * @remarks + * [Api set: WordApi 1.3] + */ + adjacentAfter = "AdjacentAfter", + /** + * Indicates that this instance starts inside the range and overlaps the range’s last character. + * @remarks + * [Api set: WordApi 1.3] + */ + overlapsAfter = "OverlapsAfter", + /** + * Indicates that this instance occurs after the range. + * @remarks + * [Api set: WordApi 1.3] + */ + after = "After", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BorderLocation { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + top = "Top", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + left = "Left", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + right = "Right", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + insideHorizontal = "InsideHorizontal", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + insideVertical = "InsideVertical", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + inside = "Inside", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + outside = "Outside", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + all = "All", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum CellPaddingLocation { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + top = "Top", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + left = "Left", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + right = "Right", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BorderType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + mixed = "Mixed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + none = "None", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + single = "Single", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + double = "Double", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dotted = "Dotted", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dashed = "Dashed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dotDashed = "DotDashed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dot2Dashed = "Dot2Dashed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + triple = "Triple", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickSmall = "ThinThickSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thickThinSmall = "ThickThinSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickThinSmall = "ThinThickThinSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickMed = "ThinThickMed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thickThinMed = "ThickThinMed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickThinMed = "ThinThickThinMed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickLarge = "ThinThickLarge", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thickThinLarge = "ThickThinLarge", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickThinLarge = "ThinThickThinLarge", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + wave = "Wave", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + doubleWave = "DoubleWave", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dashedSmall = "DashedSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dashDotStroked = "DashDotStroked", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + threeDEmboss = "ThreeDEmboss", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + threeDEngrave = "ThreeDEngrave", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum VerticalAlignment { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + mixed = "Mixed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + top = "Top", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + center = "Center", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bottom = "Bottom", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum ListLevelType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bullet = "Bullet", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + number = "Number", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + picture = "Picture", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum ListBullet { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + custom = "Custom", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + solid = "Solid", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + hollow = "Hollow", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + square = "Square", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + diamonds = "Diamonds", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + arrow = "Arrow", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + checkmark = "Checkmark", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum ListNumbering { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + none = "None", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + arabic = "Arabic", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + upperRoman = "UpperRoman", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + lowerRoman = "LowerRoman", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + upperLetter = "UpperLetter", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + lowerLetter = "LowerLetter", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BuiltInStyleName { + /** + * Mixed styles or other style not in this list. + * @remarks + * [Api set: WordApi 1.3] + */ + other = "Other", + /** + * Reset character and paragraph style to default. + * @remarks + * [Api set: WordApi 1.3] + */ + normal = "Normal", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading1 = "Heading1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading2 = "Heading2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading3 = "Heading3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading4 = "Heading4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading5 = "Heading5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading6 = "Heading6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading7 = "Heading7", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading8 = "Heading8", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading9 = "Heading9", + /** + * Table-of-content level 1. + * @remarks + * [Api set: WordApi 1.3] + */ + toc1 = "Toc1", + /** + * Table-of-content level 2. + * @remarks + * [Api set: WordApi 1.3] + */ + toc2 = "Toc2", + /** + * Table-of-content level 3. + * @remarks + * [Api set: WordApi 1.3] + */ + toc3 = "Toc3", + /** + * Table-of-content level 4. + * @remarks + * [Api set: WordApi 1.3] + */ + toc4 = "Toc4", + /** + * Table-of-content level 5. + * @remarks + * [Api set: WordApi 1.3] + */ + toc5 = "Toc5", + /** + * Table-of-content level 6. + * @remarks + * [Api set: WordApi 1.3] + */ + toc6 = "Toc6", + /** + * Table-of-content level 7. + * @remarks + * [Api set: WordApi 1.3] + */ + toc7 = "Toc7", + /** + * Table-of-content level 8. + * @remarks + * [Api set: WordApi 1.3] + */ + toc8 = "Toc8", + /** + * Table-of-content level 9. + * @remarks + * [Api set: WordApi 1.3] + */ + toc9 = "Toc9", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footnoteText = "FootnoteText", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + header = "Header", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footer = "Footer", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + caption = "Caption", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footnoteReference = "FootnoteReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + endnoteReference = "EndnoteReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + endnoteText = "EndnoteText", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + title = "Title", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + subtitle = "Subtitle", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink = "Hyperlink", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + strong = "Strong", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + emphasis = "Emphasis", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + noSpacing = "NoSpacing", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listParagraph = "ListParagraph", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + quote = "Quote", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + intenseQuote = "IntenseQuote", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + subtleEmphasis = "SubtleEmphasis", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + intenseEmphasis = "IntenseEmphasis", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + subtleReference = "SubtleReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + intenseReference = "IntenseReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bookTitle = "BookTitle", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bibliography = "Bibliography", + /** + * Table-of-content heading. + * @remarks + * [Api set: WordApi 1.3] + */ + tocHeading = "TocHeading", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + tableGrid = "TableGrid", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable1 = "PlainTable1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable2 = "PlainTable2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable3 = "PlainTable3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable4 = "PlainTable4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable5 = "PlainTable5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + tableGridLight = "TableGridLight", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light = "GridTable1Light", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent1 = "GridTable1Light_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent2 = "GridTable1Light_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent3 = "GridTable1Light_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent4 = "GridTable1Light_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent5 = "GridTable1Light_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent6 = "GridTable1Light_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2 = "GridTable2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent1 = "GridTable2_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent2 = "GridTable2_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent3 = "GridTable2_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent4 = "GridTable2_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent5 = "GridTable2_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent6 = "GridTable2_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3 = "GridTable3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent1 = "GridTable3_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent2 = "GridTable3_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent3 = "GridTable3_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent4 = "GridTable3_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent5 = "GridTable3_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent6 = "GridTable3_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4 = "GridTable4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent1 = "GridTable4_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent2 = "GridTable4_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent3 = "GridTable4_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent4 = "GridTable4_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent5 = "GridTable4_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent6 = "GridTable4_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark = "GridTable5Dark", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent1 = "GridTable5Dark_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent2 = "GridTable5Dark_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent3 = "GridTable5Dark_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent4 = "GridTable5Dark_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent5 = "GridTable5Dark_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent6 = "GridTable5Dark_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful = "GridTable6Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent1 = "GridTable6Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent2 = "GridTable6Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent3 = "GridTable6Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent4 = "GridTable6Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent5 = "GridTable6Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent6 = "GridTable6Colorful_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful = "GridTable7Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent1 = "GridTable7Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent2 = "GridTable7Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent3 = "GridTable7Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent4 = "GridTable7Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent5 = "GridTable7Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent6 = "GridTable7Colorful_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light = "ListTable1Light", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent1 = "ListTable1Light_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent2 = "ListTable1Light_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent3 = "ListTable1Light_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent4 = "ListTable1Light_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent5 = "ListTable1Light_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent6 = "ListTable1Light_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2 = "ListTable2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent1 = "ListTable2_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent2 = "ListTable2_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent3 = "ListTable2_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent4 = "ListTable2_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent5 = "ListTable2_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent6 = "ListTable2_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3 = "ListTable3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent1 = "ListTable3_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent2 = "ListTable3_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent3 = "ListTable3_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent4 = "ListTable3_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent5 = "ListTable3_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent6 = "ListTable3_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4 = "ListTable4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent1 = "ListTable4_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent2 = "ListTable4_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent3 = "ListTable4_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent4 = "ListTable4_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent5 = "ListTable4_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent6 = "ListTable4_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark = "ListTable5Dark", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent1 = "ListTable5Dark_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent2 = "ListTable5Dark_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent3 = "ListTable5Dark_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent4 = "ListTable5Dark_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent5 = "ListTable5Dark_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent6 = "ListTable5Dark_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful = "ListTable6Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent1 = "ListTable6Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent2 = "ListTable6Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent3 = "ListTable6Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent4 = "ListTable6Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent5 = "ListTable6Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent6 = "ListTable6Colorful_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful = "ListTable7Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent1 = "ListTable7Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent2 = "ListTable7Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent3 = "ListTable7Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent4 = "ListTable7Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent5 = "ListTable7Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent6 = "ListTable7Colorful_Accent6", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum DocumentPropertyType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + string = "String", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + number = "Number", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + date = "Date", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + boolean = "Boolean", + } + /** + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + enum TapObjectType { + /** + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + chart = "Chart", + /** + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + smartArt = "SmartArt", + /** + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + table = "Table", + /** + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + image = "Image", + /** + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + slide = "Slide", + /** + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + ole = "OLE", + /** + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + text = "Text", + } + /** + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + enum FileContentFormat { + /** + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + base64 = "Base64", + /** + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + html = "Html", + /** + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + ooxml = "Ooxml", + } + /** + * The type of the object an annotation is attached to. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + enum AnnotationParentType { + /** + * The annotation is not attached to a supported Office JS type. + * @remarks + * [Api set: WordApiOnline 1.1] + */ + none = "None", + /** + * The annotation is attached to the Document object. + * @remarks + * [Api set: WordApiOnline 1.1] + */ + document = "Document", + /** + * The annotation is attached to a paragraph. + * @remarks + * [Api set: WordApiOnline 1.1] + */ + paragraph = "Paragraph", + /** + * The annotation is attached to another annotation. + * @remarks + * [Api set: WordApiOnline 1.1] + */ + annotation = "Annotation", + } + /** + * Level of interaction user has had with the annotation + NOTE: 0-2 reserved for internal states + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + enum AnnotationState { + /** + * State has not been defined (there's a problem if this shows up) + * @remarks + * [Api set: WordApiOnline 1.1] + */ + undefined = "Undefined", + /** + * Annotation has been created + * @remarks + * [Api set: WordApiOnline 1.1] + */ + created = "Created", + /** + * Annotation has been activated and sent to client + * @remarks + * [Api set: WordApiOnline 1.1] + */ + sent = "Sent", + /** + * Identical annotation created + * @remarks + * [Api set: WordApiOnline 1.1] + */ + duplicated = "Duplicated", + /** + * Annotation has been shown to user + * @remarks + * [Api set: WordApiOnline 1.1] + */ + seen = "Seen", + /** + * User has done a 'deep dive' into the annotation options + * @remarks + * [Api set: WordApiOnline 1.1] + */ + tried = "Tried", + /** + * User has applied the annotation + * @remarks + * [Api set: WordApiOnline 1.1] + */ + kept = "Kept", + /** + * User has chosen to 'ignore' or 'reject' the annotation + * @remarks + * [Api set: WordApiOnline 1.1] + */ + rejected = "Rejected", + } + /** + * Represents the type of style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum StyleType { + /** + * Represents that the style is a character style. + * @remarks + * [Api set: WordApi 1.5] + */ + character = "Character", + /** + * Represents that the style is a list style. Currently supported on desktop. + * @remarks + * [Api set: WordApi 1.5] + */ + list = "List", + /** + * Represents that the style is a paragraph style. + * @remarks + * [Api set: WordApi 1.5] + */ + paragraph = "Paragraph", + /** + * Represents that the style is a table style. + * @remarks + * [Api set: WordApi 1.5] + */ + table = "Table", + } + /** + * Represents the outline levels. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum OutlineLevel { + /** + * Represents outline level 1. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel1 = "OutlineLevel1", + /** + * Represents outline level 2. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel2 = "OutlineLevel2", + /** + * Represents outline level 3. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel3 = "OutlineLevel3", + /** + * Represents outline level 4. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel4 = "OutlineLevel4", + /** + * Represents outline level 5. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel5 = "OutlineLevel5", + /** + * Represents outline level 6. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel6 = "OutlineLevel6", + /** + * Represents outline level 7. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel7 = "OutlineLevel7", + /** + * Represents outline level 8. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel8 = "OutlineLevel8", + /** + * Represents outline level 9. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel9 = "OutlineLevel9", + /** + * Represents outline level body text, not an outline level. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevelBodyText = "OutlineLevelBodyText", + } + /** + * Specifies the close behavior for `Document.close`. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum CloseBehavior { + /** + * Save the changes before closing the document. + * @remarks + * [Api set: WordApi 1.5] + */ + save = "Save", + /** + * Discard the possible changes when closing the document. + * @remarks + * [Api set: WordApi 1.5] + */ + skipSave = "SkipSave", + } + /** + * Specifies the save behavior for `Document.save`. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum SaveBehavior { + /** + * Saves the document without prompting the user. If it's a new document, + it will be saved with the default name or specified name in the default location. + * @remarks + * [Api set: WordApi 1.1] + */ + save = "Save", + /** + * Displays the "Save As" dialog to the user if the document hasn't been saved. + Won't take effect if the document was previously saved. + * @remarks + * [Api set: WordApi 1.1] + */ + prompt = "Prompt", + } + /** + * Represents the type of Field. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum FieldType { + /** + * Represents that the field type is Add-in. + * @remarks + * [Api set: WordApi 1.5] + */ + addin = "Addin", + /** + * Represents that the field type is AddressBlock. + * @remarks + * [Api set: WordApi 1.5] + */ + addressBlock = "AddressBlock", + /** + * Represents that the field type is Advance. + * @remarks + * [Api set: WordApi 1.5] + */ + advance = "Advance", + /** + * Represents that the field type is Ask. + * @remarks + * [Api set: WordApi 1.5] + */ + ask = "Ask", + /** + * Represents that the field type is Author. + * @remarks + * [Api set: WordApi 1.5] + */ + author = "Author", + /** + * Represents that the field type is AutoText. + * @remarks + * [Api set: WordApi 1.5] + */ + autoText = "AutoText", + /** + * Represents that the field type is AutoTextList. + * @remarks + * [Api set: WordApi 1.5] + */ + autoTextList = "AutoTextList", + /** + * Represents that the field type is Barcode. + * @remarks + * [Api set: WordApi 1.5] + */ + barCode = "BarCode", + /** + * Represents that the field type is Bibliography. + * @remarks + * [Api set: WordApi 1.5] + */ + bibliography = "Bibliography", + /** + * Represents that the field type is BidiOutline. + * @remarks + * [Api set: WordApi 1.5] + */ + bidiOutline = "BidiOutline", + /** + * Represents that the field type is Citation. + * @remarks + * [Api set: WordApi 1.5] + */ + citation = "Citation", + /** + * Represents that the field type is Comments. + * @remarks + * [Api set: WordApi 1.5] + */ + comments = "Comments", + /** + * Represents that the field type is Compare. + * @remarks + * [Api set: WordApi 1.5] + */ + compare = "Compare", + /** + * Represents that the field type is CreateDate. + * @remarks + * [Api set: WordApi 1.5] + */ + createDate = "CreateDate", + /** + * Represents that the field type is Data. + * @remarks + * [Api set: WordApi 1.5] + */ + data = "Data", + /** + * Represents that the field type is Database. + * @remarks + * [Api set: WordApi 1.5] + */ + database = "Database", + /** + * Represents that the field type is Date. + * @remarks + * [Api set: WordApi 1.5] + */ + date = "Date", + /** + * Represents that the field type is DisplayBarcode. + * @remarks + * [Api set: WordApi 1.5] + */ + displayBarcode = "DisplayBarcode", + /** + * Represents that the field type is DocumentProperty + * @remarks + * [Api set: WordApi 1.5] + */ + docProperty = "DocProperty", + /** + * Represents that the field type is DocumentVariable. + * @remarks + * [Api set: WordApi 1.5] + */ + docVariable = "DocVariable", + /** + * Represents that the field type is EditTime. + * @remarks + * [Api set: WordApi 1.5] + */ + editTime = "EditTime", + /** + * Represents that the field type is Embedded. + * @remarks + * [Api set: WordApi 1.5] + */ + embedded = "Embedded", + /** + * Represents that the field type is Equation. + * @remarks + * [Api set: WordApi 1.5] + */ + eq = "EQ", + /** + * Represents that the field type is Expression. + * @remarks + * [Api set: WordApi 1.5] + */ + expression = "Expression", + /** + * Represents that the field type is FileName. + * @remarks + * [Api set: WordApi 1.5] + */ + fileName = "FileName", + /** + * Represents that the field type is FileSize. + * @remarks + * [Api set: WordApi 1.5] + */ + fileSize = "FileSize", + /** + * Represents that the field type is FillIn. + * @remarks + * [Api set: WordApi 1.5] + */ + fillIn = "FillIn", + /** + * Represents that the field type is FormCheckbox. + * @remarks + * [Api set: WordApi 1.5] + */ + formCheckbox = "FormCheckbox", + /** + * Represents that the field type is FormDropdown. + * @remarks + * [Api set: WordApi 1.5] + */ + formDropdown = "FormDropdown", + /** + * Represents that the field type is FormText. + * @remarks + * [Api set: WordApi 1.5] + */ + formText = "FormText", + /** + * Represents that the field type is GotoButton. + * @remarks + * [Api set: WordApi 1.5] + */ + gotoButton = "GotoButton", + /** + * Represents that the field type is GreetingLine. + * @remarks + * [Api set: WordApi 1.5] + */ + greetingLine = "GreetingLine", + /** + * Represents that the field type is Hyperlink. + * @remarks + * [Api set: WordApi 1.5] + */ + hyperlink = "Hyperlink", + /** + * Represents that the field type is If. + * @remarks + * [Api set: WordApi 1.5] + */ + if = "If", + /** + * Represents that the field type is Import. + * @remarks + * [Api set: WordApi 1.5] + */ + import = "Import", + /** + * Represents that the field type is Include. + * @remarks + * [Api set: WordApi 1.5] + */ + include = "Include", + /** + * Represents that the field type is IncludePicture. + * @remarks + * [Api set: WordApi 1.5] + */ + includePicture = "IncludePicture", + /** + * Represents that the field type is IncludeText. + * @remarks + * [Api set: WordApi 1.5] + */ + includeText = "IncludeText", + /** + * Represents that the field type is Index. + * @remarks + * [Api set: WordApi 1.5] + */ + index = "Index", + /** + * Represents that the field type is Information. + * @remarks + * [Api set: WordApi 1.5] + */ + info = "Info", + /** + * Represents that the field type is Keywords. + * @remarks + * [Api set: WordApi 1.5] + */ + keywords = "Keywords", + /** + * Represents that the field type is LastSavedBy. + * @remarks + * [Api set: WordApi 1.5] + */ + lastSavedBy = "LastSavedBy", + /** + * Represents that the field type is Link. + * @remarks + * [Api set: WordApi 1.5] + */ + link = "Link", + /** + * Represents that the field type is ListNumber. + * @remarks + * [Api set: WordApi 1.5] + */ + listNum = "ListNum", + /** + * Represents that the field type is MacroButton. + * @remarks + * [Api set: WordApi 1.5] + */ + macroButton = "MacroButton", + /** + * Represents that the field type is MergeBarcode. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeBarcode = "MergeBarcode", + /** + * Represents that the field type is MergeField. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeField = "MergeField", + /** + * Represents that the field type is MergeRecord. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeRec = "MergeRec", + /** + * Represents that the field type is MergeSequence. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeSeq = "MergeSeq", + /** + * Represents that the field type is Next. + * @remarks + * [Api set: WordApi 1.5] + */ + next = "Next", + /** + * Represents that the field type is NextIf. + * @remarks + * [Api set: WordApi 1.5] + */ + nextIf = "NextIf", + /** + * Represents that the field type is NoteReference. + * @remarks + * [Api set: WordApi 1.5] + */ + noteRef = "NoteRef", + /** + * Represents that the field type is NumberOfCharacters. + * @remarks + * [Api set: WordApi 1.5] + */ + numChars = "NumChars", + /** + * Represents that the field type is NumberOfPages. + * @remarks + * [Api set: WordApi 1.5] + */ + numPages = "NumPages", + /** + * Represents that the field type is NumberOfWords. + * @remarks + * [Api set: WordApi 1.5] + */ + numWords = "NumWords", + /** + * Represents that the field type is ActiveXControl. + * @remarks + * [Api set: WordApi 1.5] + */ + ocx = "OCX", + /** + * Represents that the field type is Page. + * @remarks + * [Api set: WordApi 1.5] + */ + page = "Page", + /** + * Represents that the field type is PageReference. + * @remarks + * [Api set: WordApi 1.5] + */ + pageRef = "PageRef", + /** + * Represents that the field type is Print. + * @remarks + * [Api set: WordApi 1.5] + */ + print = "Print", + /** + * Represents that the field type is PrintDate. + * @remarks + * [Api set: WordApi 1.5] + */ + printDate = "PrintDate", + /** + * Represents that the field type is Private. + * @remarks + * [Api set: WordApi 1.5] + */ + private = "Private", + /** + * Represents that the field type is Quote. + * @remarks + * [Api set: WordApi 1.5] + */ + quote = "Quote", + /** + * Represents that the field type is ReferencedDocument. + * @remarks + * [Api set: WordApi 1.5] + */ + rd = "RD", + /** + * Represents that the field type is Reference. + * @remarks + * [Api set: WordApi 1.5] + */ + ref = "Ref", + /** + * Represents that the field type is RevisionNumber. + * @remarks + * [Api set: WordApi 1.5] + */ + revNum = "RevNum", + /** + * Represents that the field type is SaveDate. + * @remarks + * [Api set: WordApi 1.5] + */ + saveDate = "SaveDate", + /** + * Represents that the field type is Section. + * @remarks + * [Api set: WordApi 1.5] + */ + section = "Section", + /** + * Represents that the field type is SectionPages. + * @remarks + * [Api set: WordApi 1.5] + */ + sectionPages = "SectionPages", + /** + * Represents that the field type is Sequence. + * @remarks + * [Api set: WordApi 1.5] + */ + seq = "Seq", + /** + * Represents that the field type is Set. + * @remarks + * [Api set: WordApi 1.5] + */ + set = "Set", + /** + * Represents that the field type is Shape. + * @remarks + * [Api set: WordApi 1.5] + */ + shape = "Shape", + /** + * Represents that the field type is SkipIf. + * @remarks + * [Api set: WordApi 1.5] + */ + skipIf = "SkipIf", + /** + * Represents that the field type is StyleReference. + * @remarks + * [Api set: WordApi 1.5] + */ + styleRef = "StyleRef", + /** + * Represents that the field type is Subject. + * @remarks + * [Api set: WordApi 1.5] + */ + subject = "Subject", + /** + * Represents that the field type is Subscriber. + * @remarks + * [Api set: WordApi 1.5] + */ + subscriber = "Subscriber", + /** + * Represents that the field type is Symbol. + * @remarks + * [Api set: WordApi 1.5] + */ + symbol = "Symbol", + /** + * Represents that the field type is TableOfAuthoritiesEntry. + * @remarks + * [Api set: WordApi 1.5] + */ + ta = "TA", + /** + * Represents that the field type is TableOfContentsEntry. + * @remarks + * [Api set: WordApi 1.5] + */ + tc = "TC", + /** + * Represents that the field type is Template. + * @remarks + * [Api set: WordApi 1.5] + */ + template = "Template", + /** + * Represents that the field type is Time. + * @remarks + * [Api set: WordApi 1.5] + */ + time = "Time", + /** + * Represents that the field type is Title. + * @remarks + * [Api set: WordApi 1.5] + */ + title = "Title", + /** + * Represents that the field type is TableOfAuthorities. + * @remarks + * [Api set: WordApi 1.5] + */ + toa = "TOA", + /** + * Represents that the field type is TableOfContents. + * @remarks + * [Api set: WordApi 1.5] + */ + toc = "TOC", + /** + * Represents that the field type is UserAddress. + * @remarks + * [Api set: WordApi 1.5] + */ + userAddress = "UserAddress", + /** + * Represents that the field type is UserInitials. + * @remarks + * [Api set: WordApi 1.5] + */ + userInitials = "UserInitials", + /** + * Represents that the field type is UserName. + * @remarks + * [Api set: WordApi 1.5] + */ + userName = "UserName", + /** + * Represents that the field type is IndexEntry. + * @remarks + * [Api set: WordApi 1.5] + */ + xe = "XE", + /** + * Represents that the field type is Empty. + * @remarks + * [Api set: WordApi 1.5] + */ + empty = "Empty", + /** + * Represents the field types not supported by the Office JavaScript API. + * @remarks + * [Api set: WordApi 1.5] + */ + others = "Others", + /** + * Represents that the field type is Undefined. + * @remarks + * [Api set: WordApi 1.5] + */ + undefined = "Undefined", + } + /** + * Represents the kind of field. Indicates how the field works in relation to updating. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum FieldKind { + /** + * Represents that the field is invalid. For example, a pair of field characters with nothing inside. + * @remarks + * [Api set: WordApi 1.5] + */ + none = "None", + /** + * Represents that the field is automatically updated each time it's displayed or each time the page is reformatted, but which can also be manually updated. + * @remarks + * [Api set: WordApi 1.5] + */ + hot = "Hot", + /** + * Represents that the field is automatically updated when the source changes or the field can be manually updated. + * @remarks + * [Api set: WordApi 1.5] + */ + warm = "Warm", + /** + * Represents that the field doesn't have a result. + * @remarks + * [Api set: WordApi 1.5] + */ + cold = "Cold", + } + /** + * Represents the character inserted after the list item mark. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + enum TrailingCharacter { + /** + * A tab is inserted. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingTab = "TrailingTab", + /** + * A space is inserted. Default. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingSpace = "TrailingSpace", + /** + * No character is inserted. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingNone = "TrailingNone", + } + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ListBuiltInNumberStyle { + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + none = "None", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabic = "Arabic", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + upperRoman = "UpperRoman", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + lowerRoman = "LowerRoman", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + upperLetter = "UpperLetter", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + lowerLetter = "LowerLetter", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + ordinal = "Ordinal", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + cardinalText = "CardinalText", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + ordinalText = "OrdinalText", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + kanji = "Kanji", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + kanjiDigit = "KanjiDigit", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + aiueoHalfWidth = "AiueoHalfWidth", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + irohaHalfWidth = "IrohaHalfWidth", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabicFullWidth = "ArabicFullWidth", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + kanjiTraditional = "KanjiTraditional", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + kanjiTraditional2 = "KanjiTraditional2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + numberInCircle = "NumberInCircle", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + aiueo = "Aiueo", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + iroha = "Iroha", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabicLZ = "ArabicLZ", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + bullet = "Bullet", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + ganada = "Ganada", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + chosung = "Chosung", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + gbnum1 = "GBNum1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + gbnum2 = "GBNum2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + gbnum3 = "GBNum3", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + gbnum4 = "GBNum4", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + zodiac1 = "Zodiac1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + zodiac2 = "Zodiac2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + zodiac3 = "Zodiac3", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + tradChinNum1 = "TradChinNum1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + tradChinNum2 = "TradChinNum2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + tradChinNum3 = "TradChinNum3", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + tradChinNum4 = "TradChinNum4", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + simpChinNum1 = "SimpChinNum1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + simpChinNum2 = "SimpChinNum2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + simpChinNum3 = "SimpChinNum3", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + simpChinNum4 = "SimpChinNum4", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hanjaRead = "HanjaRead", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hanjaReadDigit = "HanjaReadDigit", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hangul = "Hangul", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hanja = "Hanja", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hebrew1 = "Hebrew1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabic1 = "Arabic1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hebrew2 = "Hebrew2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabic2 = "Arabic2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hindiLetter1 = "HindiLetter1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hindiLetter2 = "HindiLetter2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hindiArabic = "HindiArabic", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hindiCardinalText = "HindiCardinalText", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + thaiLetter = "ThaiLetter", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + thaiArabic = "ThaiArabic", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + thaiCardinalText = "ThaiCardinalText", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + vietCardinalText = "VietCardinalText", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + lowercaseRussian = "LowercaseRussian", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + uppercaseRussian = "UppercaseRussian", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + lowercaseGreek = "LowercaseGreek", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + uppercaseGreek = "UppercaseGreek", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabicLZ2 = "ArabicLZ2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabicLZ3 = "ArabicLZ3", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabicLZ4 = "ArabicLZ4", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + lowercaseTurkish = "LowercaseTurkish", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + uppercaseTurkish = "UppercaseTurkish", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + lowercaseBulgarian = "LowercaseBulgarian", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + uppercaseBulgarian = "UppercaseBulgarian", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + pictureBullet = "PictureBullet", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + legal = "Legal", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + legalLZ = "LegalLZ", + } + /** + * Represents the shading texture. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShadingTextureType { + /** + * Represents 10 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture10Percent = "Texture10Percent", + /** + * Represents 12.5 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture12Pt5Percent = "Texture12Pt5Percent", + /** + * Represents 15 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture15Percent = "Texture15Percent", + /** + * Represents 20 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture20Percent = "Texture20Percent", + /** + * Represents 25 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture25Percent = "Texture25Percent", + /** + * Represents 30 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture30Percent = "Texture30Percent", + /** + * Represents 35 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture35Percent = "Texture35Percent", + /** + * Represents 37.5 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture37Pt5Percent = "Texture37Pt5Percent", + /** + * Represents 40 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture40Percent = "Texture40Percent", + /** + * Represents 45 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture45Percent = "Texture45Percent", + /** + * Represents 50 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture50Percent = "Texture50Percent", + /** + * Represents 55 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture55Percent = "Texture55Percent", + /** + * Represents 5 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture5Percent = "Texture5Percent", + /** + * Represents 60 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture60Percent = "Texture60Percent", + /** + * Represents 62.5 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture62Pt5Percent = "Texture62Pt5Percent", + /** + * Represents 65 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture65Percent = "Texture65Percent", + /** + * Represents 70 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture70Percent = "Texture70Percent", + /** + * Represents 75 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture75Percent = "Texture75Percent", + /** + * Represents 80 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture80Percent = "Texture80Percent", + /** + * Represents 85 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture85Percent = "Texture85Percent", + /** + * Represents 87.5 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture87Pt5Percent = "Texture87Pt5Percent", + /** + * Represents 90 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture90Percent = "Texture90Percent", + /** + * Represents 95 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture95Percent = "Texture95Percent", + /** + * Represents dark diagonal-down texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureDarkDiagonalDown = "TextureDarkDiagonalDown", + /** + * Represents dark diagonal-up texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureDarkDiagonalUp = "TextureDarkDiagonalUp", + /** + * Represents dark horizontal-cross texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureDarkGrid = "TextureDarkGrid", + /** + * Represents dark horizontal texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureDarkHorizontal = "TextureDarkHorizontal", + /** + * Represents dark diagonal-cross texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureDarkTrellis = "TextureDarkTrellis", + /** + * Represents dark vertical texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureDarkVertical = "TextureDarkVertical", + /** + * Represents light diagonal-down texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureLightDiagonalDown = "TextureLightDiagonalDown", + /** + * Represents light diagonal-up texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureLightDiagonalUp = "TextureLightDiagonalUp", + /** + * Represents light horizontal-cross texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureLightGrid = "TextureLightGrid", + /** + * Represents light horizontal texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureLightHorizontal = "TextureLightHorizontal", + /** + * Represents light diagonal-cross texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureLightTrellis = "TextureLightTrellis", + /** + * Represents light vertical texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureLightVertical = "TextureLightVertical", + /** + * Represents that there's no texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureNone = "TextureNone", + /** + * Represents solid texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureSolid = "TextureSolid", + } + enum ErrorCodes { + accessDenied = "AccessDenied", + generalException = "GeneralException", + invalidArgument = "InvalidArgument", + itemNotFound = "ItemNotFound", + notImplemented = "NotImplemented", + searchDialogIsOpen = "SearchDialogIsOpen", + searchStringInvalidOrTooLong = "SearchStringInvalidOrTooLong", + } + 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 AnnotationCollection object, for use in `annotationCollection.set({ ... })`. */ + interface AnnotationCollectionUpdateData { + items?: Word.Interfaces.AnnotationData[]; + } + /** 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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 Comment object, for use in `comment.set({ ... })`. */ + interface CommentUpdateData { + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeUpdateData; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** An interface for updating data on the CommentCollection object, for use in `commentCollection.set({ ... })`. */ + interface CommentCollectionUpdateData { + items?: Word.Interfaces.CommentData[]; + } + /** An interface for updating data on the CommentContentRange object, for use in `commentContentRange.set({ ... })`. */ + interface CommentContentRangeUpdateData { + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * 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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: string; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text is not underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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 CommentReply object, for use in `commentReply.set({ ... })`. */ + interface CommentReplyUpdateData { + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeUpdateData; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentUpdateData; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + } + /** An interface for updating data on the CommentReplyCollection object, for use in `commentReplyCollection.set({ ... })`. */ + interface CommentReplyCollectionUpdateData { + items?: Word.Interfaces.CommentReplyData[]; + } + /** 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. **Note**: The set operation for this property is not supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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"; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * Specifies the title for a content control. + * + * @remarks + * [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 { + /** + * Specifies the value of the custom property. Note that even though Word on the web 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). + * + * @remarks + * [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 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 { + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesUpdateData; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + allowCloseOnUntitled?: boolean; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; + } + /** 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. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Gets the properties of the document. + * + * @remarks + * [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 { + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * Specifies the comments of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface for updating data on the Field object, for use in `field.set({ ... })`. */ + interface FieldUpdateData { + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeUpdateData; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + */ + code?: string; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: string; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + /** + * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + showCodes?: boolean; + } + /** An interface for updating data on the FieldCollection object, for use in `fieldCollection.set({ ... })`. */ + interface FieldCollectionUpdateData { + items?: Word.Interfaces.FieldData[]; + } + /** An interface for updating data on the Font object, for use in `font.set({ ... })`. */ + interface FontUpdateData { + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * Specifies 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. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * @remarks + * [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 { + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [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 { + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: number; + } + /** An interface for updating data on the ListLevel object, for use in `listLevel.set({ ... })`. */ + interface ListLevelUpdateData { + /** + * Gets a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedStyle?: string; + /** + * Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberFormat?: string; + /** + * Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberPosition?: number; + /** + * Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; + /** + * Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + resetOnHigher?: number; + /** + * Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + startAt?: number; + /** + * Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + tabPosition?: number; + /** + * Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textPosition?: number; + /** + * Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; + } + /** An interface for updating data on the ListLevelCollection object, for use in `listLevelCollection.set({ ... })`. */ + interface ListLevelCollectionUpdateData { + items?: Word.Interfaces.ListLevelData[]; + } + /** An interface for updating data on the ListTemplate object, for use in `listTemplate.set({ ... })`. */ + interface ListTemplateUpdateData { + /** + * Specifies whether the specified ListTemplate object is outline numbered. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + outlineNumbered?: boolean; + } + /** An interface for updating data on the NoteItem object, for use in `noteItem.set({ ... })`. */ + interface NoteItemUpdateData { + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeUpdateData; + } + /** An interface for updating data on the NoteItemCollection object, for use in `noteItemCollection.set({ ... })`. */ + interface NoteItemCollectionUpdateData { + items?: Word.Interfaces.NoteItemData[]; + } + /** 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph is not part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemUpdateData; + /** + * Gets the ListItem for the paragraph. If the paragraph is not part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemUpdateData; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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 ParagraphFormat object, for use in `paragraphFormat.set({ ... })`. */ + interface ParagraphFormatUpdateData { + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent?: number; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether?: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext?: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent?: number; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore?: number; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents?: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent?: number; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter?: number; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore?: number; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl?: boolean; + } + /** 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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 { + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [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 Setting object, for use in `setting.set({ ... })`. */ + interface SettingUpdateData { + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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 StyleCollection object, for use in `styleCollection.set({ ... })`. */ + interface StyleCollectionUpdateData { + items?: Word.Interfaces.StyleData[]; + } + /** An interface for updating data on the Style object, for use in `style.set({ ... })`. */ + interface StyleUpdateData { + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + listTemplate?: Word.Interfaces.ListTemplateUpdateData; + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatUpdateData; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + shading?: Word.Interfaces.ShadingUpdateData; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: number; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** An interface for updating data on the Shading object, for use in `shading.set({ ... })`. */ + interface ShadingUpdateData { + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + backgroundPatternColor?: string; + /** + * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + foregroundPatternColor?: string; + /** + * Specifies the shading texture of the object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture?: Word.ShadingTextureType | "Texture10Percent" | "Texture12Pt5Percent" | "Texture15Percent" | "Texture20Percent" | "Texture25Percent" | "Texture30Percent" | "Texture35Percent" | "Texture37Pt5Percent" | "Texture40Percent" | "Texture45Percent" | "Texture50Percent" | "Texture55Percent" | "Texture5Percent" | "Texture60Percent" | "Texture62Pt5Percent" | "Texture65Percent" | "Texture70Percent" | "Texture75Percent" | "Texture80Percent" | "Texture85Percent" | "Texture87Pt5Percent" | "Texture90Percent" | "Texture95Percent" | "TextureDarkDiagonalDown" | "TextureDarkDiagonalUp" | "TextureDarkGrid" | "TextureDarkHorizontal" | "TextureDarkTrellis" | "TextureDarkVertical" | "TextureLightDiagonalDown" | "TextureLightDiagonalUp" | "TextureLightGrid" | "TextureLightHorizontal" | "TextureLightTrellis" | "TextureLightVertical" | "TextureNone" | "TextureSolid"; + } + /** 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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"; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Specifies the width of the table in points. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [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 { + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * Specifies the type of the table border. + * + * @remarks + * [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"; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling `annotation.toJSON()`. */ + interface AnnotationData { + /** + * The annotation object. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + content?: any; + /** + * Gets the ID of the annotation. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + id?: string; + } + /** An interface describing the data returned by calling `annotationCollection.toJSON()`. */ + interface AnnotationCollectionData { + items?: Word.Interfaces.AnnotationData[]; + } + /** An interface describing the data returned by calling `body.toJSON()`. */ + interface BodyData { + /** + * Gets the collection of rich text content control objects in the body. + * + * @remarks + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the collection of field objects in the body. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the collection of list objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * Gets the collection of paragraph objects in the body. **Important**: Paragraphs in tables are not returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. + * + * @remarks + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * Gets the collection of table objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; + } + /** An interface describing the data returned by calling `comment.toJSON()`. */ + interface CommentData { + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeData; + /** + * Gets the collection of reply objects associated with the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + replies?: Word.Interfaces.CommentReplyData[]; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: string; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: string; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: Date; + /** + * Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** An interface describing the data returned by calling `commentCollection.toJSON()`. */ + interface CommentCollectionData { + items?: Word.Interfaces.CommentData[]; + } + /** An interface describing the data returned by calling `commentContentRange.toJSON()`. */ + interface CommentContentRangeData { + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * 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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.4] + */ + isEmpty?: boolean; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Gets the text of the comment range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + text?: string; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text is not underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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 `commentReply.toJSON()`. */ + interface CommentReplyData { + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeData; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentData; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: string; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: string; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: Date; + /** + * Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: string; + } + /** An interface describing the data returned by calling `commentReplyCollection.toJSON()`. */ + interface CommentReplyCollectionData { + items?: Word.Interfaces.CommentReplyData[]; + } + /** An interface describing the data returned by calling `contentControl.toJSON()`. */ + interface ContentControlData { + /** + * Gets the collection of content control objects in the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the collection of field objects in the content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the collection of list objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * Gets the collection of paragraph objects in the content control. **Important**: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control are not returned. From requirement set 1.3, paragraphs in such tables are also returned. + * + * @remarks + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * Gets the collection of table objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + id?: number; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. **Note**: The set operation for this property is not supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls. + * + * @remarks + * [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"; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: string; + /** + * Gets the content control type. Only rich text and plain text content controls are supported currently. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + key?: string; + /** + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; + /** + * Specifies the value of the custom property. Note that even though Word on the web 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). + * + * @remarks + * [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 `customXmlPart.toJSON()`. */ + interface CustomXmlPartData { + /** + * Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: string; + /** + * Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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 { + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + customXmlParts?: Word.Interfaces.CustomXmlPartData[]; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + sections?: Word.Interfaces.SectionData[]; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + settings?: Word.Interfaces.SettingData[]; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + allowCloseOnUntitled?: boolean; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; + /** + * 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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + */ + customXmlParts?: Word.Interfaces.CustomXmlPartData[]; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + sections?: Word.Interfaces.SectionData[]; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + customProperties?: Word.Interfaces.CustomPropertyData[]; + /** + * Gets the application name of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + applicationName?: string; + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * Specifies the comments of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * Gets the creation date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + creationDate?: Date; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * Gets the last author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastAuthor?: string; + /** + * Gets the last print date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastPrintDate?: Date; + /** + * Gets the last save time of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastSaveTime?: Date; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * Gets the revision number of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + revisionNumber?: string; + /** + * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. + * + * @remarks + * [Api set: WordApi 1.3] + */ + security?: number; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * Gets the template of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + template?: string; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface describing the data returned by calling `field.toJSON()`. */ + interface FieldData { + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeData; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + */ + code?: string; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: string; + /** + * Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + kind?: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + /** + * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + showCodes?: boolean; + /** + * Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; + } + /** An interface describing the data returned by calling `fieldCollection.toJSON()`. */ + interface FieldCollectionData { + items?: Word.Interfaces.FieldData[]; + } + /** An interface describing the data returned by calling `font.toJSON()`. */ + interface FontData { + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * Specifies 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. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * @remarks + * [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 { + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + /** + * Gets the format of the inline image. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + imageFormat?: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * Gets the list's id. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean[]; + /** + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [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 { + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: number; + /** + * Gets the list item bullet, number, or picture as a string. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listString?: string; + /** + * Gets the list item order number in relation to its siblings. + * + * @remarks + * [Api set: WordApi 1.3] + */ + siblingIndex?: number; + } + /** An interface describing the data returned by calling `listLevel.toJSON()`. */ + interface ListLevelData { + /** + * Gets a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + font?: Word.Interfaces.FontData; + /** + * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedStyle?: string; + /** + * Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberFormat?: string; + /** + * Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberPosition?: number; + /** + * Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; + /** + * Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + resetOnHigher?: number; + /** + * Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + startAt?: number; + /** + * Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + tabPosition?: number; + /** + * Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textPosition?: number; + /** + * Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; + } + /** An interface describing the data returned by calling `listLevelCollection.toJSON()`. */ + interface ListLevelCollectionData { + items?: Word.Interfaces.ListLevelData[]; + } + /** An interface describing the data returned by calling `listTemplate.toJSON()`. */ + interface ListTemplateData { + /** + * Gets a ListLevels collection that represents all the levels for the specified ListTemplate. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + listLevels?: Word.Interfaces.ListLevelData[]; + /** + * Specifies whether the specified ListTemplate object is outline numbered. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + outlineNumbered?: boolean; + } + /** An interface describing the data returned by calling `noteItem.toJSON()`. */ + interface NoteItemData { + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyData; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeData; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: Word.NoteItemType | "Footnote" | "Endnote"; + } + /** An interface describing the data returned by calling `noteItemCollection.toJSON()`. */ + interface NoteItemCollectionData { + items?: Word.Interfaces.NoteItemData[]; + } + /** An interface describing the data returned by calling `paragraph.toJSON()`. */ + interface ParagraphData { + /** + * Gets the collection of fields in the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph is not part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemData; + /** + * Gets the ListItem for the paragraph. If the paragraph is not part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemData; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: number; + /** + * Gets the text of the paragraph. + * + * @remarks + * [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 `paragraphFormat.toJSON()`. */ + interface ParagraphFormatData { + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent?: number; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether?: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext?: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent?: number; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore?: number; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents?: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent?: number; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter?: number; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore?: number; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl?: boolean; + } + /** An interface describing the data returned by calling `range.toJSON()`. */ + interface RangeData { + /** + * Gets the collection of field objects in the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the collection of inline picture objects in the range. + * + * @remarks + * [Api set: WordApi 1.2] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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. + * + * @remarks + * [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 { + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [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 `setting.toJSON()`. */ + interface SettingData { + /** + * Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + key?: string; + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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 `styleCollection.toJSON()`. */ + interface StyleCollectionData { + items?: Word.Interfaces.StyleData[]; + } + /** An interface describing the data returned by calling `style.toJSON()`. */ + interface StyleData { + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontData; + /** + * Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + listTemplate?: Word.Interfaces.ListTemplateData; + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatData; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + shading?: Word.Interfaces.ShadingData; + /** + * Gets the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + baseStyle?: string; + /** + * Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + builtIn?: boolean; + /** + * Gets the description of the specified style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + description?: string; + /** + * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + inUse?: boolean; + /** + * Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + linked?: boolean; + /** + * Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nameLocal?: string; + /** + * Gets the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nextParagraphStyle?: string; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: number; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** An interface describing the data returned by calling `shading.toJSON()`. */ + interface ShadingData { + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + backgroundPatternColor?: string; + /** + * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + foregroundPatternColor?: string; + /** + * Specifies the shading texture of the object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture?: Word.ShadingTextureType | "Texture10Percent" | "Texture12Pt5Percent" | "Texture15Percent" | "Texture20Percent" | "Texture25Percent" | "Texture30Percent" | "Texture35Percent" | "Texture37Pt5Percent" | "Texture40Percent" | "Texture45Percent" | "Texture50Percent" | "Texture55Percent" | "Texture5Percent" | "Texture60Percent" | "Texture62Pt5Percent" | "Texture65Percent" | "Texture70Percent" | "Texture75Percent" | "Texture80Percent" | "Texture85Percent" | "Texture87Pt5Percent" | "Texture90Percent" | "Texture95Percent" | "TextureDarkDiagonalDown" | "TextureDarkDiagonalUp" | "TextureDarkGrid" | "TextureDarkHorizontal" | "TextureDarkTrellis" | "TextureDarkVertical" | "TextureLightDiagonalDown" | "TextureLightDiagonalUp" | "TextureLightGrid" | "TextureLightHorizontal" | "TextureLightTrellis" | "TextureLightVertical" | "TextureNone" | "TextureSolid"; + } + /** An interface describing the data returned by calling `table.toJSON()`. */ + interface TableData { + /** + * Gets the collection of field objects in the table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * Gets all of the table rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rows?: Word.Interfaces.TableRowData[]; + /** + * Gets the child tables nested one level deeper. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + nestingLevel?: number; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowCount?: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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"; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Specifies the width of the table in points. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cells?: Word.Interfaces.TableCellData[]; + /** + * Gets the collection of field objects in the table row. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellCount?: number; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyData; + /** + * Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellIndex?: number; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Gets the width of the cell in points. + * + * @remarks + * [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 { + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * Specifies the type of the table border. + * + * @remarks + * [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"; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** + * Represents a single annotation container. This contains the actual annotation as well as the parent object. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + interface AnnotationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The annotation object. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + content?: boolean; + /** + * Gets the ID of the annotation. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + id?: boolean; + } + /** + * Provides access to annotations on the current document or paragraph object. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + interface AnnotationCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The annotation object. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the annotation. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + id?: boolean; + } + /** + * Represents the body of a document or a section. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface BodyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [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 an `ItemNotFound` error if there isn't a parent body. + * + * @remarks + * [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. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentSection?: Word.Interfaces.SectionLoadOptions; + /** + * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the text of the body. Use the insertText method to insert text. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + } + /** + * Represents a comment in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CommentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** + * Contains a collection of {@link Word.Comment} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CommentCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * For EACH ITEM in the collection: Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** + * @remarks + * [Api set: WordApi 1.4] + */ + interface CommentContentRangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * 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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: boolean; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.4] + */ + isEmpty?: boolean; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Gets the text of the comment range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + text?: boolean; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text is not underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + underline?: boolean; + } + /** + * Represents a comment reply in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CommentReplyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentLoadOptions; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + } + /** + * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CommentReplyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentLoadOptions; + /** + * For EACH ITEM in the collection: Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: 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 and plain text content controls are supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface ContentControlLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the content control. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the content control. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the content control. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. **Note**: The set operation for this property is not supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * Gets the content control type. Only rich text and plain text content controls are supported currently. + * + * @remarks + * [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 and plain text content controls are supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface ContentControlCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the content control. + * + * @remarks + * [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 an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the content control. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [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 an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the content control. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the content control. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * For EACH ITEM in the collection: Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * For EACH ITEM in the collection: Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. **Note**: The set operation for this property is not supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [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, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * For EACH ITEM in the collection: Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * For EACH ITEM in the collection: Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * For EACH ITEM in the collection: Gets the content control type. Only rich text and plain text content controls are supported currently. + * + * @remarks + * [Api set: WordApi 1.1] + */ + type?: boolean; + } + /** + * Represents a custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface CustomPropertyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the key of the custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + key?: boolean; + /** + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * Specifies the value of the custom property. Note that even though Word on the web 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). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + } + /** + * Contains the collection of {@link Word.CustomProperty} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface CustomPropertyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the key of the custom property. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies the value of the custom property. Note that even though Word on the web 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). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + } + /** + * Represents a custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CustomXmlPartLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + namespaceUri?: boolean; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CustomXmlPartCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + namespaceUri?: boolean; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CustomXmlPartScopedCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface DocumentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesLoadOptions; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + allowCloseOnUntitled?: boolean; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode?: 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface DocumentCreatedLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the properties of the document. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + saved?: boolean; + } + /** + * Represents document properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface DocumentPropertiesLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the application name of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + applicationName?: boolean; + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author?: boolean; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category?: boolean; + /** + * Specifies the comments of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments?: boolean; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company?: boolean; + /** + * Gets the creation date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + creationDate?: boolean; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format?: boolean; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords?: boolean; + /** + * Gets the last author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastAuthor?: boolean; + /** + * Gets the last print date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastPrintDate?: boolean; + /** + * Gets the last save time of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastSaveTime?: boolean; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager?: boolean; + /** + * Gets the revision number of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + revisionNumber?: boolean; + /** + * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. + * + * @remarks + * [Api set: WordApi 1.3] + */ + security?: boolean; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject?: boolean; + /** + * Gets the template of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + template?: boolean; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title?: boolean; + } + /** + * Represents a field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface FieldLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the parent body of the field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the field. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the field. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the field. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeLoadOptions; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + */ + code?: boolean; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: boolean; + /** + * Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + kind?: boolean; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + /** + * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + showCodes?: boolean; + /** + * Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Contains a collection of {@link Word.Field} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface FieldCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the parent body of the field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the field. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the field. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the field. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the field. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + */ + code?: boolean; + /** + * For EACH ITEM in the collection: Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: boolean; + /** + * For EACH ITEM in the collection: Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + kind?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + showCodes?: boolean; + /** + * For EACH ITEM in the collection: Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Represents a font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface FontLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * Specifies 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. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor?: boolean; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name?: boolean; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size?: boolean; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * @remarks + * [Api set: WordApi 1.1] + */ + underline?: boolean; + } + /** + * Represents an inline picture. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface InlinePictureLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the parent paragraph that contains the inline image. + * + * @remarks + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphLoadOptions; + /** + * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the inline image. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the inline image. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + /** + * Gets the format of the inline image. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + imageFormat?: boolean; + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width?: boolean; + } + /** + * Contains a collection of {@link Word.InlinePicture} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface InlinePictureCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image. + * + * @remarks + * [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 an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the inline image. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [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 an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the inline image. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the inline image. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * For EACH ITEM in the collection: Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * For EACH ITEM in the collection: Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + /** + * For EACH ITEM in the collection: Gets the format of the inline image. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + imageFormat?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * For EACH ITEM in the collection: Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width?: boolean; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface ListLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the list's id. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean; + /** + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } + /** + * Contains a collection of {@link Word.List} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface ListCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the list's id. + * + * @remarks + * [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. + * + * @remarks + * [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'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } + /** + * Represents the paragraph list item format. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface ListItemLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: boolean; + /** + * Gets the list item bullet, number, or picture as a string. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listString?: boolean; + /** + * Gets the list item order number in relation to its siblings. + * + * @remarks + * [Api set: WordApi 1.3] + */ + siblingIndex?: boolean; + } + /** + * Represents a list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ListLevelLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + alignment?: boolean; + /** + * Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedStyle?: boolean; + /** + * Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberFormat?: boolean; + /** + * Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberPosition?: boolean; + /** + * Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberStyle?: boolean; + /** + * Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + resetOnHigher?: boolean; + /** + * Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + startAt?: boolean; + /** + * Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + tabPosition?: boolean; + /** + * Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textPosition?: boolean; + /** + * Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingCharacter?: boolean; + } + /** + * Contains a collection of {@link Word.ListLevel} objects. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ListLevelCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + alignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberFormat?: boolean; + /** + * For EACH ITEM in the collection: Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberPosition?: boolean; + /** + * For EACH ITEM in the collection: Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + resetOnHigher?: boolean; + /** + * For EACH ITEM in the collection: Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + startAt?: boolean; + /** + * For EACH ITEM in the collection: Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + tabPosition?: boolean; + /** + * For EACH ITEM in the collection: Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textPosition?: boolean; + /** + * For EACH ITEM in the collection: Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingCharacter?: boolean; + } + /** + * Represents a ListTemplate. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ListTemplateLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies whether the specified ListTemplate object is outline numbered. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + outlineNumbered?: boolean; + } + /** + * Represents a footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface NoteItemLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeLoadOptions; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Contains a collection of {@link Word.NoteItem} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface NoteItemCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeLoadOptions; + /** + * For EACH ITEM in the collection: Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Represents a single paragraph in a selection, range, content control, or document body. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface ParagraphLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph is not in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph is not part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * Gets the ListItem for the paragraph. If the paragraph is not part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * Gets the List to which this paragraph belongs. If the paragraph is not in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * Gets the parent body of the paragraph. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the paragraph. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the paragraph. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * Gets the text of the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface ParagraphCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph is not in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph is not part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. If the paragraph is not part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. If the paragraph is not in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the paragraph. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the paragraph. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * For EACH ITEM in the collection: Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * For EACH ITEM in the collection: Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * For EACH ITEM in the collection: Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * For EACH ITEM in the collection: Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * For EACH ITEM in the collection: Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * For EACH ITEM in the collection: Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * For EACH ITEM in the collection: Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * Represents a style of paragraph in a document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ParagraphFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent?: boolean; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether?: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext?: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent?: boolean; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing?: boolean; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter?: boolean; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore?: boolean; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents?: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel?: boolean; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent?: boolean; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter?: boolean; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore?: boolean; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl?: boolean; + } + /** + * Represents a contiguous area in a document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface RangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the range. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the range. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the range. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the text of the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * Contains a collection of {@link Word.Range} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface RangeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the range. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the range. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the range. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the range. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * For EACH ITEM in the collection: Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * Specifies the options to be included in a search operation. + To learn more about how to use search options in the Word JavaScript APIs, read {@link https://docs.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface SearchOptionsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** + * Represents a section in a Word document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface SectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the section. This does not include the header/footer and other section metadata. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * Contains the collection of the document's {@link Word.Section} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface SectionCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * Represents a setting of the add-in. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface SettingLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + key?: boolean; + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value?: boolean; + } + /** + * Contains the collection of {@link Word.Setting} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface SettingCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value?: boolean; + } + /** + * Contains a collection of {@link Word.Style} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface StyleCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + listTemplate?: Word.Interfaces.ListTemplateLoadOptions; + /** + * For EACH ITEM in the collection: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; + /** + * For EACH ITEM in the collection: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + shading?: Word.Interfaces.ShadingLoadOptions; + /** + * For EACH ITEM in the collection: Gets the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + baseStyle?: boolean; + /** + * For EACH ITEM in the collection: Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + builtIn?: boolean; + /** + * For EACH ITEM in the collection: Gets the description of the specified style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + description?: boolean; + /** + * For EACH ITEM in the collection: Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + inUse?: boolean; + /** + * For EACH ITEM in the collection: Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + linked?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nameLocal?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nextParagraphStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * For EACH ITEM in the collection: Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** + * Represents a style in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface StyleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + listTemplate?: Word.Interfaces.ListTemplateLoadOptions; + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + shading?: Word.Interfaces.ShadingLoadOptions; + /** + * Gets the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + baseStyle?: boolean; + /** + * Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + builtIn?: boolean; + /** + * Gets the description of the specified style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + description?: boolean; + /** + * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + inUse?: boolean; + /** + * Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + linked?: boolean; + /** + * Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nameLocal?: boolean; + /** + * Gets the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nextParagraphStyle?: boolean; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: boolean; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** + * Represents the shading object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ShadingLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + backgroundPatternColor?: boolean; + /** + * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + foregroundPatternColor?: boolean; + /** + * Specifies the shading texture of the object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture?: boolean; + } + /** + * Represents a table in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains this table. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains this table. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains this table. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: boolean; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: boolean; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + nestingLevel?: boolean; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowCount?: boolean; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: boolean; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Contains the collection of the document's Table objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains this table. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains this table. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains this table. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains this table. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Indicates whether all of the table rows are uniform. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + nestingLevel?: boolean; + /** + * For EACH ITEM in the collection: Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * For EACH ITEM in the collection: Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Represents a row in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableRowLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellCount?: boolean; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: boolean; + /** + * Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + } + /** + * Contains the collection of the document's TableRow objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableRowCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * For EACH ITEM in the collection: Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: boolean; + /** + * For EACH ITEM in the collection: Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + } + /** + * Represents a table cell in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableCellLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the parent row of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * Gets the parent table of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellIndex?: boolean; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: boolean; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * Gets the index of the cell's row in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * Gets the width of the cell in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Contains the collection of the document's TableCell objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableCellCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent row of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent table of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: boolean; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Gets the index of the cell's row in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Gets the width of the cell in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Specifies the border style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableBorderLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color?: boolean; + /** + * Specifies the type of the table border. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [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 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; + /** + * 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 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(batch: (context: Word.RequestContext) => Promise): Promise; +} + + +//////////////////////////////////////////////////////////////// +//////////////////////// End Word APIs ///////////////////////// +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// +////////////////////// Begin OneNote APIs ////////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace OneNote { + /** + * Provides information about the binding that raised the DataChanged event + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + interface AlterationSelectedEventArgs { + /** + * Alternated first level index + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + firstLevelIndex: number; + /** + * Alternated mathml + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + mathML: string; + /** + * Alternated first level index + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + secondLevelIndex: number; + /** + * Selected stroke ids + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + strokeIds: number[]; + } + /** + * Provides information about the binding that raised the DataChanged event + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + interface InkSelectedForCorrectionEventArgs { + /** + * Is MathAssistant in Select and Correct mode + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + isInSnCMode: boolean; + } + /** + * Provides information about the Math Assistant restrictions + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + interface RestrictionsCalculatedEventArgs { + /** + * Is graphing feature enabled in MathAssistant + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + isGraphingEnabled: boolean; + /** + * Are key graph features enabled in MathAssistant + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + isKeyGraphFeaturesEnabled: boolean; + /** + * Is solver feature enabled in MathAssistant + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + isSolvingEnabled: boolean; + /** + * Is step by step feature enabled in MathAssistant + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + isStepByStepEnabled: boolean; + } + /** + * Provides information about the binding that raised the DataChanged event + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + interface ResetEventArgs { + } + /** + * Represents the top-level object that contains all globally addressable OneNote objects such as notebooks, the active notebook, and the active section. + * + * @remarks + * [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; + readonly mathAssistantManager: OneNote.MathAssistantManager; + /** + * Gets the note tag manager. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + readonly noteTagManager: OneNote.NoteTagManager; + /** + * 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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly notebooks: OneNote.NotebookCollection; + /** + * 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. + * @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: OneNote.Application): void; + /** + * Gets the active notebook if one exists. If no notebook is active, throws ItemNotFound. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveNotebook(): OneNote.Notebook; + /** + * Gets the active notebook if one exists. If no notebook is active, returns null. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveNotebookOrNull(): OneNote.Notebook; + /** + * Gets the active outline if one exists, If no outline is active, throws ItemNotFound. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveOutline(): OneNote.Outline; + /** + * Gets the active outline if one exists, otherwise returns null. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveOutlineOrNull(): OneNote.Outline; + /** + * Gets the active page if one exists. If no page is active, throws ItemNotFound. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActivePage(): OneNote.Page; + /** + * Gets the active page if one exists. If no page is active, returns null. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActivePageOrNull(): OneNote.Page; + /** + * Gets the active Paragraph if one exists, If no Paragraph is active, throws ItemNotFound. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveParagraph(): OneNote.Paragraph; + /** + * Gets the active Paragraph if one exists, otherwise returns null. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveParagraphOrNull(): OneNote.Paragraph; + /** + * Gets the active section if one exists. If no section is active, throws ItemNotFound. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveSection(): OneNote.Section; + /** + * Gets the active section if one exists. If no section is active, returns null. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveSectionOrNull(): OneNote.Section; + getDecimalSeparator(): OfficeExtension.ClientResult; + /** + * Gets math quiz context. + * + * @remarks + * [Api set: OneNoteApi 1.6] + */ + getMathQuizContext(): OfficeExtension.ClientResult; + /** + * Gets the currently selected ink strokes. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + getSelectedInkStrokes(): OneNote.InkStrokeCollection; + /** + * The collection of pages in the section. Read only + Note that the collection will have the pages in the reverse order + in which they were selected. So if you are in a section that has + the following pages A, B, C, D and ctrl-click pages in this order + A then C then D then C then B, this API would return a collection + with items in this order [B, D, A] + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getSelectedPages(): OneNote.PageCollection; + getWindowSize(): OfficeExtension.ClientResult; + insertAndEmbedLinkAtCurrentPosition(url: string): void; + insertHtmlAtCurrentPosition(html: string): void; + /** + * Gets if the high contrast mode is enabled. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + isHighContrast(): OfficeExtension.ClientResult; + isViewingDeletedNotes(): OfficeExtension.ClientResult; + /** + * Opens the specified page in the application instance. + * + * @remarks + * [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. + Navigation may still not be carried out when no fails. Caller should validate the returned page if so desired. + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param url The client url of the page to open. + */ + navigateToPageWithClientUrl(url: string): OneNote.Page; + _ClientLog(level: OneNote.LogLevel, eventName: string, flag: OneNote.EventFlag, data: OneNote.LogData[]): void; + _ClientLog(level: "Trace" | "Data" | "Exception" | "Warning", eventName: string, flag: "DefaultFlag" | "CriticalFlag" | "MeasureFlag", data: OneNote.LogData[]): void; + /** + * Creates a new notebook using the given account. + * + * @remarks + * [Api set: OneNoteApi 1.5] + * + * @param name The new notebook's name + * @param account The account or identity to use to create the notebook + * @returns true when the notebook is successfully created + */ + _CreateNotebook(name: string, account: OneNote.AccountInfo): OfficeExtension.ClientResult; + _EnableControl(controlId: OneNote.ControlId, enable: boolean): void; + _EnableControl(controlId: "PreinstallClassNotebook" | "DistributePageId" | "DistributeSection" | "ReviewStudentWork" | "OpenTabForCreateClassNotebook" | "OpenTabForManageStudent" | "OpenTabForManageTeacher" | "OpenTabForGetNotebookLink" | "OpenTabForTeacherTraining" | "OpenTabForAddinGuide" | "OpenTabForEducationBlog" | "OpenTabForEducatorCommunity" | "OpenTabToSendFeedback" | "OpenTabForViewKnowledgeBase" | "OpenTabForSuggestingFeature" | "ManageClasses" | "DistributePageMenu" | "DistributeSectionMenu" | "ReviewStudentWorkMenu", enable: boolean): void; + _EnterFullScreen(): void; + _ExitFullScreen(): void; + _FocusCanvas(): void; + _GetAccountInfo(): OfficeExtension.ClientResult; + _GetAccountInfoByType(filter: OneNote.IdentityFilter): OfficeExtension.ClientResult; + _GetAccountInfoByType(filter: "Selection" | "ActiveProfile" | "LiveId" | "OrgId" | "ADAL" | "Notebook"): OfficeExtension.ClientResult; + /** + * Gets a list of all accounts. + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + _GetAccountInfoCollection(): OfficeExtension.ClientResult; + _GetControlVisibility(controlId: OneNote.ControlId): OfficeExtension.ClientResult; + _GetControlVisibility(controlId: "PreinstallClassNotebook" | "DistributePageId" | "DistributeSection" | "ReviewStudentWork" | "OpenTabForCreateClassNotebook" | "OpenTabForManageStudent" | "OpenTabForManageTeacher" | "OpenTabForGetNotebookLink" | "OpenTabForTeacherTraining" | "OpenTabForAddinGuide" | "OpenTabForEducationBlog" | "OpenTabForEducatorCommunity" | "OpenTabToSendFeedback" | "OpenTabForViewKnowledgeBase" | "OpenTabForSuggestingFeature" | "ManageClasses" | "DistributePageMenu" | "DistributeSectionMenu" | "ReviewStudentWorkMenu"): OfficeExtension.ClientResult; + _GetLoggingInfo(): OfficeExtension.ClientResult; + _GetMathPaneContent(): OfficeExtension.ClientResult; + _GetNodeInternalProperties(id: string): OfficeExtension.ClientResult; + _GetObjectByReferenceId(referenceId: string): OfficeExtension.ClientResult; + _GetObjectTypeNameByReferenceId(referenceId: string): OfficeExtension.ClientResult; + _GetRoamingSetting(roamingAction: string, roamingQuery: string): OfficeExtension.ClientResult; + _GetServiceTokenByUrl(url: string): OfficeExtension.ClientResult; + /** + * Gets the service token for a user e-mail. + * + * @remarks + * [Api set: OneNoteApi 1.3] + * + * @param email User e-mail for which to get the token + * @param serviceUrl Service URL + * @param policy Service policy + */ + _GetServiceTokenByUserEmail(email: string, serviceUrl: string, policy: string): OfficeExtension.ClientResult; + _GetServiceTokens(id: OneNote.ServiceId): OfficeExtension.ClientResult; + _GetServiceTokens(id: "Form" | "Entity" | "Graph" | "OneService" | "ClassNotebooks" | "MathSolver" | "MathRecognizer" | "RoamingSettings"): OfficeExtension.ClientResult; + _GetServiceTokensExt(id: OneNote.ServiceId, filter: OneNote.IdentityFilter): OfficeExtension.ClientResult; + _GetServiceTokensExt(id: "Form" | "Entity" | "Graph" | "OneService" | "ClassNotebooks" | "MathSolver" | "MathRecognizer" | "RoamingSettings", filter: "Selection" | "ActiveProfile" | "LiveId" | "OrgId" | "ADAL" | "Notebook"): OfficeExtension.ClientResult; + _GetServiceUrl(id: OneNote.ServiceId): OfficeExtension.ClientResult; + _GetServiceUrl(id: "Form" | "Entity" | "Graph" | "OneService" | "ClassNotebooks" | "MathSolver" | "MathRecognizer" | "RoamingSettings"): OfficeExtension.ClientResult; + /** + * Returns whether a given email is managed by Enterprise or not. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.3] + * + * @param upn An account's upn (User Principal Name) like someone@consoto.com + */ + _IsAccountEdpManaged(upn: string): OfficeExtension.ClientResult; + _IsControlEnabled(controlId: OneNote.ControlId): OfficeExtension.ClientResult; + _IsControlEnabled(controlId: "PreinstallClassNotebook" | "DistributePageId" | "DistributeSection" | "ReviewStudentWork" | "OpenTabForCreateClassNotebook" | "OpenTabForManageStudent" | "OpenTabForManageTeacher" | "OpenTabForGetNotebookLink" | "OpenTabForTeacherTraining" | "OpenTabForAddinGuide" | "OpenTabForEducationBlog" | "OpenTabForEducatorCommunity" | "OpenTabToSendFeedback" | "OpenTabForViewKnowledgeBase" | "OpenTabForSuggestingFeature" | "ManageClasses" | "DistributePageMenu" | "DistributeSectionMenu" | "ReviewStudentWorkMenu"): OfficeExtension.ClientResult; + _IsImmersiveReaderUwpInstalled(): OfficeExtension.ClientResult; + _LaunchImmersiveReaderUwp(dataAsJson: string): OfficeExtension.ClientResult; + _RemoveAllReferences(): void; + _RemoveReference(referenceId: string): void; + _SaveRoamingSetting(roamingAction: string, roamingPayload: string): OfficeExtension.ClientResult; + _SendDataToLearningTools(data: string, sessionId: string): OfficeExtension.ClientResult; + _SendDataToLearningToolsV2(data: string, sessionId: string): OfficeExtension.ClientResult; + _SetControlVisibility(controlId: OneNote.ControlId, visible: boolean): void; + _SetControlVisibility(controlId: "PreinstallClassNotebook" | "DistributePageId" | "DistributeSection" | "ReviewStudentWork" | "OpenTabForCreateClassNotebook" | "OpenTabForManageStudent" | "OpenTabForManageTeacher" | "OpenTabForGetNotebookLink" | "OpenTabForTeacherTraining" | "OpenTabForAddinGuide" | "OpenTabForEducationBlog" | "OpenTabForEducatorCommunity" | "OpenTabToSendFeedback" | "OpenTabForViewKnowledgeBase" | "OpenTabForSuggestingFeature" | "ManageClasses" | "DistributePageMenu" | "DistributeSectionMenu" | "ReviewStudentWorkMenu", visible: boolean): void; + _UploadToUserInfoService(strKey: string, stdValue: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.ApplicationLoadOptions): OneNote.Application; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Application; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OneNote.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 OneNote.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.ApplicationData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.ApplicationData): void; + } + /** + * Represents ink analysis data for a given set of ink strokes. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly page: OneNote.Page; + /** + * Gets the ink analysis paragraphs in this page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraphs: OneNote.InkAnalysisParagraphCollection; + /** + * Gets the ID of the InkAnalysis object. Read-only. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisLoadOptions): OneNote.InkAnalysis; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysis; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.InkAnalysis object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.InkAnalysisData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.InkAnalysisData): void; + } + /** + * Represents ink analysis data for an identified paragraph formed by ink strokes. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly inkAnalysis: OneNote.InkAnalysis; + /** + * Gets the ink analysis lines in this ink analysis paragraph. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly lines: OneNote.InkAnalysisLineCollection; + /** + * Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisParagraphLoadOptions): OneNote.InkAnalysisParagraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysisParagraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.InkAnalysisParagraph object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisParagraphData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.InkAnalysisParagraphData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.InkAnalysisParagraphData): void; + } + /** + * Represents a collection of InkAnalysisParagraph objects. + * + * @remarks + * [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[]; + /** + * Returns the number of InkAnalysisParagraphs in the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a InkAnalysisParagraph object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisParagraphCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysisParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkAnalysisParagraphCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.InkAnalysisParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.InkAnalysisParagraphCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.InkAnalysisParagraphCollectionData): void; + } + /** + * Represents ink analysis data for an identified text line formed by ink strokes. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.InkAnalysisParagraph; + /** + * Gets the ink analysis words in this ink analysis line. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly words: OneNote.InkAnalysisWordCollection; + /** + * Gets the ID of the InkAnalysisLine object. Read-only. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisLineLoadOptions): OneNote.InkAnalysisLine; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysisLine; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.InkAnalysisLine object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisLineData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.InkAnalysisLineData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.InkAnalysisLineData): void; + } + /** + * Represents a collection of InkAnalysisLine objects. + * + * @remarks + * [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[]; + /** + * Returns the number of InkAnalysisLines in the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a InkAnalysisLine object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisLineCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysisLineCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkAnalysisLineCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.InkAnalysisLineCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisLineCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.InkAnalysisLineCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.InkAnalysisLineCollectionData): void; + } + /** + * Represents ink analysis data for an identified word formed by ink strokes. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly line: OneNote.InkAnalysisLine; + /** + * Gets the ID of the InkAnalysisWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * The id of the recognized language in this inkAnalysisWord. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly strokePointers: OneNote.InkStrokePointer[]; + /** + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisWordLoadOptions): OneNote.InkAnalysisWord; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysisWord; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.InkAnalysisWord object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisWordData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.InkAnalysisWordData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.InkAnalysisWordData): void; + } + /** + * Represents a collection of InkAnalysisWord objects. + * + * @remarks + * [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[]; + /** + * Returns the number of InkAnalysisWords in the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a InkAnalysisWord object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisWordCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysisWordCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkAnalysisWordCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.InkAnalysisWordCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisWordCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.InkAnalysisWordCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.InkAnalysisWordCollectionData): void; + } + /** + * Represents a group of ink strokes. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly inkStrokes: OneNote.InkStrokeCollection; + /** + * Gets the PageContent parent of the FloatingInk object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly pageContent: OneNote.PageContent; + /** + * Gets the ID of the FloatingInk object. Read-only. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.FloatingInkLoadOptions): OneNote.FloatingInk; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.FloatingInk; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.FloatingInk object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.FloatingInkData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.FloatingInkData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.FloatingInkData): void; + } + /** + * Represents a single stroke of ink. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly floatingInk: OneNote.FloatingInk; + /** + * Gets the points of the InkStroke object, relative to the page root. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + readonly points: OneNote.PointCollection; + /** + * Gets the ID of the InkStroke object. Read-only. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkStrokeLoadOptions): OneNote.InkStroke; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkStroke; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.InkStroke object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkStrokeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.InkStrokeData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.InkStrokeData): void; + } + /** + * Represents a collection of InkStroke objects. + * + * @remarks + * [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[]; + /** + * Returns the number of InkStrokes in the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a InkStroke object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkStrokeCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkStrokeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkStrokeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkStrokeCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.InkStrokeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkStrokeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.InkStrokeCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.InkStrokeCollectionData): void; + } + /** + * Represents a single point of ink stroke + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + class Point 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 Point object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + readonly id: string; + readonly x: number; + readonly y: number; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.PointLoadOptions): OneNote.Point; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Point; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OneNote.Point; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.Point; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.Point; + /** + * 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 OneNote.Point object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PointData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.PointData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.PointData): void; + } + /** + * Represents a collection of Point objects. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + class PointCollection 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.Point[]; + /** + * Returns the number of Point in the stroke. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + readonly count: number; + /** + * Gets a Point object by ID or by its index in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + * + * @param index The ID of the Point object, or the index location of the Point object in the collection. + */ + getItem(index: number | string): OneNote.Point; + /** + * Gets a Point on its position in the collection. + * + * @remarks + * [Api set: OneNoteApi 1.9] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.Point; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.PointCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PointCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.PointCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.PointCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.PointCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.PointCollection; + /** + * 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 `OneNote.PointCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PointCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.PointCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.PointCollectionData): void; + } + /** + * A container for the ink in a word in a paragraph. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.Paragraph; + /** + * Gets the ID of the InkWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * The id of the recognized language in this ink word. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly languageId: string; + /** + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkWordLoadOptions): OneNote.InkWord; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkWord; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.InkWord object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkWordData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.InkWordData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.InkWordData): void; + } + /** + * Represents a collection of InkWord objects. + * + * @remarks + * [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[]; + /** + * Returns the number of InkWords in the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a InkWord object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkWordCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkWordCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkWordCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkWordCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.InkWordCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkWordCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.InkWordCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.InkWordCollectionData): void; + } + /** + * Represents a OneNote notebook. Notebooks contain section groups and sections. + * + * @remarks + * [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 accessibility violations in the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly accessibilityViolations: OneNote.AccessibilityViolationsByEntityCollection; + /** + * The section groups in the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly sectionGroups: OneNote.SectionGroupCollection; + /** + * The the sections of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly sections: OneNote.SectionCollection; + /** + * The url of the site that this notebook is located. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly baseUrl: string; + /** + * The client url of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly clientUrl: string; + /** + * Gets the ID of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * True if the Notebook is a special education notebook with read-only spaces inside the notebook (class notebook). Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + readonly isForEducation: boolean; + /** + * True if the Notebook folder is read-only. Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + readonly isReadOnly: boolean; + /** + * True if the Notebook is not created by the user (i.e. 'Misplaced Sections'). Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly isVirtual: boolean; + /** + * Gets the name of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly name: string; + /** + * Adds a new section to the end of the notebook. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param name The name of the new section. + */ + addSectionGroup(name: string): OneNote.SectionGroup; + /** + * Returns whether data from a given upn can be copied into this notebook or not. + The data operation can be disallowed on a certain enterprise managed notebook. + * + * @remarks + * [Api set: OneNoteApi 1.3] + * + * @param upn A source upn (User Principal Name) like someone@consoto.com + */ + canCopyDataFromAccount(upn: string): OfficeExtension.ClientResult; + /** + * Returns whether data from this notebook can be copied to a given upn or not. + The data operation can be disallowed on a certain enterprise managed notebook. + * + * @remarks + * [Api set: OneNoteApi 1.3] + * + * @param upn A destination upn (User Principal Name) like someone@consoto.com + */ + canCopyDataToAccount(upn: string): OfficeExtension.ClientResult; + /** + * Gets the REST API ID. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.NotebookLoadOptions): OneNote.Notebook; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Notebook; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Notebook object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.NotebookData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.NotebookData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.NotebookData): void; + } + /** + * Represents a collection of notebooks. + * + * @remarks + * [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[]; + /** + * Returns the number of notebooks in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets the collection of notebooks with the specified name that are open in the application instance. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.NotebookCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.NotebookCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.NotebookCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.NotebookCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.NotebookCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.NotebookCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.NotebookCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.NotebookCollectionData): void; + } + /** + * Represents a OneNote section group. Section groups can contain sections and other section groups. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly parentSectionGroupOrNull: OneNote.SectionGroup; + /** + * The collection of section groups in the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly sectionGroups: OneNote.SectionGroupCollection; + /** + * The collection of sections in the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly sections: OneNote.SectionCollection; + /** + * The client url of the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly clientUrl: string; + /** + * Gets the ID of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets the name of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly name: string; + /** + * Adds a new section to the end of the section group. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param name The name of the new section. + */ + addSectionGroup(name: string): OneNote.SectionGroup; + /** + * Gets the REST API ID. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.SectionGroupLoadOptions): OneNote.SectionGroup; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.SectionGroup; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.SectionGroup object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.SectionGroupData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.SectionGroupData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.SectionGroupData): void; + } + /** + * Represents a collection of section groups. + * + * @remarks + * [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[]; + /** + * Returns the number of section groups in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets the collection of section groups with the specified name. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.SectionGroupCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.SectionGroupCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.SectionGroupCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.SectionGroupCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.SectionGroupCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.SectionGroupCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.SectionGroupCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.SectionGroupCollectionData): void; + } + /** + * Represents a OneNote section. Sections can contain pages. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly notebook: OneNote.Notebook; + /** + * The collection of pages in the section. Read only + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly parentSectionGroupOrNull: OneNote.SectionGroup; + /** + * The client url of the section. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly clientUrl: string; + /** + * Gets the ID of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * True if this section is encrypted with a password. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly isEncrypted: boolean; + /** + * True if this section is Quick Notes. Read only + * + * @remarks + * [Api set: OneNoteApi 1.20] + */ + readonly isForQuickNotes: boolean; + /** + * True if this section is locked. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly isLocked: boolean; + /** + * Gets the name of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly name: string; + /** + * The web url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly webUrl: string; + /** + * Adds a new page to the end of the section. + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param title The title of the new page. + */ + addPage(title: string): OneNote.Page; + /** + * Adds a new page with given template to the section. + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param pageTemplate The template of the new page. + */ + applyPageTemplate(pageTemplate: string): OneNote.Page; + /** + * Copies this section to specified notebook. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param destinationSectionGroup The section group to copy this section to. + */ + copyToSectionGroup(destinationSectionGroup: OneNote.SectionGroup): OneNote.Section; + /** + * Deletes a section + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + delete(): void; + /** + * Gets the name of the default template for the section + * + * @remarks + * [Api set: OneNoteApi 1.7] + * @returns The name of the default template for the section + */ + getDefaultTemplateName(): OfficeExtension.ClientResult; + /** + * Gets the REST API ID. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getRestApiId(): OfficeExtension.ClientResult; + /** + * Inserts a new section before or after the current section. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Removes the default template for the section + * + * @remarks + * [Api set: OneNoteApi 1.7] + */ + removeDefaultTemplate(): void; + /** + * Sets the provided template as the default template for the section + * + * @remarks + * [Api set: OneNoteApi 1.7] + * + * @param strTemplate A serialized representation of the template to be set as default + * @returns A boolean representing success or failure + */ + setDefaultTemplate(strTemplate: string): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.SectionLoadOptions): OneNote.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Section object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.SectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.SectionData): void; + } + /** + * Represents a collection of sections. + * + * @remarks + * [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[]; + /** + * Returns the number of sections in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets the collection of sections with the specified name. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.SectionCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.SectionCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.SectionCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.SectionCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.SectionCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.SectionCollectionData): void; + } + /** + * Represents a OneNote page. + * + * @remarks + * [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 accessibility violations in the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly accessibilityViolations: OneNote.AccessibilityViolationCollection; + /** + * The collection of PageContent objects on the page. Read only + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly inkAnalysisOrNull: OneNote.InkAnalysis; + /** + * Gets the section that contains the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly parentSection: OneNote.Section; + /** + * Transcription object for the page + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly transcription: OneNote.Transcription; + /** + * Gets the ClassNotebookPageSource to the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly classNotebookPageSource: string; + /** + * The client url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly clientUrl: string; + /** + * Gets the ID of the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets or sets the indentation level of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageLevel: number; + /** + * Gets or sets the title of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + title: string; + /** + * The web url of the page. Read only + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + analyzePage(): OfficeExtension.ClientResult; + /** + * Inserts a new page with translated content. + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param translatedContent Translated content of the page + */ + applyTranslation(translatedContent: string): void; + /** + * Copies this page to specified section. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + copyToSectionAndSetClassNotebookPageSource(destinationSection: OneNote.Section): OneNote.Page; + /** + * Deletes the Page + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + delete(): void; + /** + * Gets the REST API ID. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getRestApiId(): OfficeExtension.ClientResult; + /** + * Does the page has content title. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hasTitleContent(): OfficeExtension.ClientResult; + /** + * Inserts a new page before or after the current page. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.PageLoadOptions): OneNote.Page; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Page; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Page object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PageData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.PageData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.PageData): void; + } + /** + * Represents a collection of pages. + * + * @remarks + * [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[]; + /** + * Returns the number of pages in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets the collection of pages with the specified title. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.PageCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PageCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.PageCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.PageCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.PageCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PageCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.PageCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.PageCollectionData): void; + } + /** + * 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly image: OneNote.Image; + /** + * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly ink: OneNote.FloatingInk; + /** + * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly outline: OneNote.Outline; + /** + * Gets the page that contains the PageContent object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly parentPage: OneNote.Page; + /** + * Gets the ID of the PageContent object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets or sets the left (X-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + left: number; + /** + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + top: number; + /** + * Gets the type of the PageContent object. Read-only. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.PageContentLoadOptions): OneNote.PageContent; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.PageContent; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.PageContent object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PageContentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.PageContentData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.PageContentData): void; + } + /** + * Represents the contents of a page, as a collection of PageContent objects. + * + * @remarks + * [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[]; + /** + * Returns the number of page contents in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a PageContent object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.PageContentCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PageContentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.PageContentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.PageContentCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.PageContentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PageContentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.PageContentCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.PageContentCollectionData): void; + } + /** + * Represents a container for Paragraph objects. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly pageContent: OneNote.PageContent; + /** + * Gets the collection of Paragraph objects in the Outline. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraphs: OneNote.ParagraphCollection; + /** + * Gets the ID of the Outline object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Adds the specified HTML to the bottom of the Outline. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Deletes the Outline + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + delete(): void; + /** + * Check if the outline is title outline. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + isTitle(): OfficeExtension.ClientResult; + /** + * Selects the Outline + The type of change that is made to the current selection. + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + select(changeType: OneNote.SelectionChangeType): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.OutlineLoadOptions): OneNote.Outline; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Outline; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Outline object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.OutlineData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.OutlineData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.OutlineData): void; + } + /** + * A container for the visible content on a page. A Paragraph can contain any one ParagraphType type of content. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly inkWords: OneNote.InkWordCollection; + /** + * Gets the Outline object that contains the Paragraph. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly outline: OneNote.Outline; + /** + * The collection of paragraphs under this paragraph. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraphs: OneNote.ParagraphCollection; + /** + * Gets the parent paragraph object. Throws if a parent paragraph does not exist. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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 + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly table: OneNote.Table; + /** + * Gets the ID of the Paragraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets the type of the Paragraph object. Read-only. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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 + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + delete(): void; + /** + * Get list information of paragraph + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getParagraphInfo(): OfficeExtension.ClientResult; + /** + * Inserts the specified HTML content + * + * @remarks + * [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 + * + * @remarks + * [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.. + * + * @remarks + * [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.. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Selects the Paragraph + The type of change that is made to the current selection. + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + select(changeType: OneNote.SelectionChangeType): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.ParagraphLoadOptions): OneNote.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Paragraph object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.ParagraphData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.ParagraphData): void; + } + /** + * Represents a collection of Paragraph objects. + * + * @remarks + * [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[]; + /** + * Returns the number of paragraphs in the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a Paragraph object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.ParagraphCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.ParagraphCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.ParagraphCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.ParagraphCollectionData): void; + } + /** + * A container for the NoteTag in a paragraph. + * + * @remarks + * [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 TagIcon property of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + readonly tagIcon: OneNote.TagIcon; + /** + * Gets the Id of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets the status of the NoteTag object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.NoteTagLoadOptions): OneNote.NoteTag; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.NoteTag; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.NoteTag object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.NoteTagData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.NoteTagData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.NoteTagData): void; + } + /** + * Represents the collection of NoteTags + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + class NoteTagCollection 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.NoteTag[]; + /** + * Returns the number of NoteTags in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + readonly count: number; + /** + * Gets a NoteTag by ID or by its index in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.3] + * + * @param index The ID of the NoteTag, or the index location of the NoteTag in the collection. + */ + getItem(index: number | string): OneNote.NoteTag; + /** + * Gets a NoteTag based on its position in the collection. + * + * @remarks + * [Api set: OneNoteApi 1.3] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.NoteTag; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.NoteTagCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.NoteTagCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.NoteTagCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.NoteTagCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.NoteTagCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.NoteTagCollection; + /** + * 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 `OneNote.NoteTagCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.NoteTagCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.NoteTagCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.NoteTagCollectionData): void; + } + /** + * Represents a RichText object in a Paragraph. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.Paragraph; + /** + * Gets the ID of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * The language id of the text. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly languageId: string; + /** + * Gets the text style of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.8] + */ + readonly style: OneNote.ParagraphStyle; + /** + * Gets the text content of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly text: string; + /** + * Get the HTML of the rich text + * + * @remarks + * [Api set: OneNoteApi 1.1] + * @returns The html of the rich text + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Selects the RichText + The type of change that is made to the current selection. + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + select(changeType: OneNote.SelectionChangeType): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.RichTextLoadOptions): OneNote.RichText; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.RichText; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.RichText object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.RichTextData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.RichTextData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.RichTextData): void; + } + /** + * Represents an Image. An Image can be a direct child of a PageContent object or a Paragraph object. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.Paragraph; + /** + * Gets or sets the description of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + description: string; + /** + * Gets or sets the height of the Image layout. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + height: number; + /** + * Gets or sets the hyperlink of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hyperlink: string; + /** + * Gets the ID of the Image object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly ocrData: OneNote.ImageOcrData; + /** + * Gets or sets the width of the Image layout. + * + * @remarks + * [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. + * @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; + /** + * Deletes the Image. + * + * @remarks + * [Api set: OneNoteApi 1.18] + */ + delete(): void; + /** + * Gets the base64-encoded binary representation of the Image. + Example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA... + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getBase64Image(): OfficeExtension.ClientResult; + /** + * Selects the Image + The type of change that is made to the current selection. + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + select(changeType: OneNote.SelectionChangeType): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.ImageLoadOptions): OneNote.Image; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Image; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Image object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ImageData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.ImageData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.ImageData): void; + } + /** + * Represents a table in a OneNote page. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.Paragraph; + /** + * Gets all of the table rows. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + borderVisible: boolean; + /** + * Gets the number of columns in the table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly columnCount: number; + /** + * Gets the ID of the table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets the number of rows in the table. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clear(): void; + /** + * Deletes the Table + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + delete(): void; + /** + * Gets the table cell at a specified row and column. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Selects the Table + The type of change that is made to the current selection. + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + select(changeType: OneNote.SelectionChangeType): void; + /** + * Sets the shading color of all cells in the table. + The color code to set the cells to. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.TableLoadOptions): OneNote.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Table object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.TableData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.TableData): void; + } + /** + * Represents a row in a table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly cells: OneNote.TableCellCollection; + /** + * Gets the parent table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly parentTable: OneNote.Table; + /** + * Gets the number of cells in the row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly cellCount: number; + /** + * Gets the ID of the row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets the index of the row in its parent table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly rowIndex: number; + /** + * Clears the contents of the row. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clear(): void; + /** + * Inserts a row before or after the current row. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.TableRowLoadOptions): OneNote.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.TableRow object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.TableRowData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.TableRowData): void; + } + /** + * Contains a collection of TableRow objects. + * + * @remarks + * [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[]; + /** + * Returns the number of table rows in this collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a table row object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.TableRowCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.TableRowCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.TableRowCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.TableRowCollectionData): void; + } + /** + * Represents a cell in a OneNote table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraphs: OneNote.ParagraphCollection; + /** + * Gets the parent row of the cell. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly parentRow: OneNote.TableRow; + /** + * Gets the index of the cell in its row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly cellIndex: number; + /** + * Gets the ID of the cell. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets the index of the cell's row in the table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly rowIndex: number; + /** + * Gets and sets the shading color of the cell + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.TableCellLoadOptions): OneNote.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.TableCell object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.TableCellData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.TableCellData): void; + } + /** + * Contains a collection of TableCell objects. + * + * @remarks + * [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[]; + /** + * Returns the number of tablecells in this collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a table cell object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.TableCellCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.TableCellCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.TableCellCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.TableCellCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.TableCellCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.TableCellCollectionData): void; + } + /** + * Represents data obtained by OCR (optical character recognition) of an image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ImageOcrData { + /** + * Represents the OCR language, with values such as EN-US + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ocrLanguageId: string; + /** + * Represents the text obtained by OCR of the image + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ocrText: string; + } + /** + * Weak reference to an ink stroke object and its content parent. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkStrokePointer { + /** + * Represents the id of the page content object corresponding to this stroke + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + contentId: string; + /** + * Represents the id of the ink stroke + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkStrokeId: string; + } + /** + * Service token for Application::_GetServiceToken. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ServiceToken { + /** + * Account type + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + accountType: OneNote.AccountType | "Other" | "LiveId" | "OrgId" | "ADAL"; + /** + * // + Header name of the service token + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + headerName: string; + /** + * Header value of the service token + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + headerValue: string; + } + /** + * Account information. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface AccountInfo { + /** + * Account type + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + accountType: OneNote.AccountType | "Other" | "LiveId" | "OrgId" | "ADAL"; + /** + * Account email + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + email: string; + /** + * // + Account user name + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + userName: string; + } + /** + * List information for paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ParagraphInfo { + /** + * // + Bullet list type of paragraph + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + bulletType: string; + /** + * // + Level of indentation of the paragraph + * + * @remarks + * [Api set: OneNoteApi 1.8] + */ + indentationLevel: number; + /** + * // + Index of paragraph in a list + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + index: number; + /** + * // + Type of list in paragraph + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + listType: OneNote.ListType | "None" | "Number" | "Bullet"; + /** + * // + Numbered list type of paragraph + * + * @remarks + * [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"; + } + /** + * Account information. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface LoggingInfo { + /** + * // + Correlation Id + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + correlationId: string; + /** + * // + UI Language + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + market: string; + /** + * // + Session Id + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sessionId: string; + /** + * // + UI Language + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + uiLanguage: string; + /** + * // + User Id + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + userId: string; + } + /** + * Account information. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface LogData { + /** + * // + None PII + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + isNonPII: boolean; + /** + * // + data tag + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + tag: string; + /** + * // + data value + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + value: string; + } + /** + * Represents a OneNote accessibility violation. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + class AccessibilityViolation 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 accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly id: string; + /** + * Gets the location of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly location: OneNote.AccessibilityViolationLocation | "None" | "OnHighlight" | "OnMultipleParagraphs" | "OnOutline" | "OnPage" | "OnParagraph" | "OnParagraphBegin" | "OnParagraphEnd" | "OnTable" | "WithinParagraph"; + /** + * Gets the name of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly name: string; + /** + * Gets the type of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly type: OneNote.AccessibilityViolationType | "None" | "MissingAltText" | "TableWithNoHeaderRow" | "UntitledPage" | "UnnamedSection" | "UnnamedSectionGroup" | "NonDescriptiveAltText" | "NestedTable" | "HeadingOutOfOrder" | "ExtraOutline" | "ExtraWhitespace" | "NoHeadingsInALongDocument" | "InsufficientTextContrast"; + /** + * Shows the entities affected by this accessibility violation + * + * @remarks + * [Api set: OneNoteApi 1.2] + * + * @param moveFocusToCanvas When set to true, will also move focus to the canvas. Default: false + */ + show(moveFocusToCanvas?: boolean): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.AccessibilityViolationLoadOptions): OneNote.AccessibilityViolation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.AccessibilityViolation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OneNote.AccessibilityViolation; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.AccessibilityViolation; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.AccessibilityViolation; + /** + * 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 OneNote.AccessibilityViolation object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.AccessibilityViolationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.AccessibilityViolationData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.AccessibilityViolationData): void; + } + /** + * Represents the collection of AccessibilityViolations. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + class AccessibilityViolationCollection 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.AccessibilityViolation[]; + /** + * Returns the number of accessibility violations in the collection. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets an accessibility violation by ID or by its index in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + * + * @param index The ID of the accessibility violation, or the index location of the violation in the collection. + */ + getItem(index: number | string): OneNote.AccessibilityViolation; + /** + * Gets an accessibility violation based on its position in the collection. + * + * @remarks + * [Api set: OneNoteApi 1.2] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.AccessibilityViolation; + /** + * Returns true when the accessibility checker has finished scanning the latest revision of the root entity + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isScanCompleted(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.AccessibilityViolationCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.AccessibilityViolationCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.AccessibilityViolationCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.AccessibilityViolationCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.AccessibilityViolationCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.AccessibilityViolationCollection; + /** + * 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 `OneNote.AccessibilityViolationCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.AccessibilityViolationCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.AccessibilityViolationCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.AccessibilityViolationCollectionData): void; + } + /** + * A OneNote structure that stores metadata about accessibility violations for an entity. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + class AccessibilityViolationsByEntity 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 section section group (if any) of the entity. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly parentSectionGroupOrNull: OneNote.SectionGroup; + /** + * Gets the parent section (if any) of the entity. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly parentSectionOrNull: OneNote.Section; + /** + * Gets the name of the entity for which this structure holds metadata. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly entityName: string; + /** + * Gets the type of the entity for which this structure holds metadata. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly entityType: OneNote.EntityType | "Notebook" | "SectionGroup" | "Section" | "Page"; + /** + * Gets the ID of the AccessibilityViolationsByEntity. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly id: string; + /** + * Gets the count of accessibility violations for the entity. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly violationsCount: number; + /** + * Navigates to the corresponding entity. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + navigate(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.AccessibilityViolationsByEntityLoadOptions): OneNote.AccessibilityViolationsByEntity; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.AccessibilityViolationsByEntity; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OneNote.AccessibilityViolationsByEntity; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.AccessibilityViolationsByEntity; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.AccessibilityViolationsByEntity; + /** + * 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 OneNote.AccessibilityViolationsByEntity object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.AccessibilityViolationsByEntityData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.AccessibilityViolationsByEntityData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.AccessibilityViolationsByEntityData): void; + } + /** + * Represents the collection of AccessibilityViolationsByEntity. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + class AccessibilityViolationsByEntityCollection 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.AccessibilityViolationsByEntity[]; + /** + * Returns the number of AccessibilityViolationsByEntity in the collection. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the AccessibilityViolationsByEntity entry by ID or by its index in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + * + * @param index The ID of the AccessibilityViolationsByEntity, or the index location of the AccessibilityViolationsByEntity in the collection. + */ + getItem(index: number | string): OneNote.AccessibilityViolationsByEntity; + /** + * Gets an AccessibilityViolationsByEntity based on its position in the collection. + * + * @remarks + * [Api set: OneNoteApi 1.2] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.AccessibilityViolationsByEntity; + /** + * Returns true when the accessibility checker has finished scanning the latest revision of the root entity + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isScanCompleted(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.AccessibilityViolationsByEntityCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.AccessibilityViolationsByEntityCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.AccessibilityViolationsByEntityCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.AccessibilityViolationsByEntityCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.AccessibilityViolationsByEntityCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.AccessibilityViolationsByEntityCollection; + /** + * 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 `OneNote.AccessibilityViolationsByEntityCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.AccessibilityViolationsByEntityCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.AccessibilityViolationsByEntityCollectionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.AccessibilityViolationsByEntityCollectionData): void; + } + /** + * Represents a note tag icon + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + class TagIcon 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 bitmaps of all the states of the tag icon. Read-only + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + readonly bitmaps: string[]; + /** + * Gets the name of the tag icon. Read-only + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + readonly name: string; + /** + * Gets the note tag shape of the tag icon. Read-only + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + readonly noteTagShape: number; + /** + * Gets the type of the tag icon. Read-only + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + readonly type: OneNote.TagIconType | "Static" | "Interactive"; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.TagIconLoadOptions): OneNote.TagIcon; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.TagIcon; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OneNote.TagIcon; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.TagIcon; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.TagIcon; + /** + * 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 OneNote.TagIcon object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TagIconData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.TagIconData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.TagIconData): void; + } + /** + * Represents the note tag manager + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + class NoteTagManager 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 all built-in custom NoteTags. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.4] + */ + readonly allNoteTags: OneNote.NoteTagCollection; + /** + * Gets the collection of featured built-in custom NoteTags. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.4] + */ + readonly featuredNoteTags: OneNote.NoteTagCollection; + /** + * Gets a previous modification result based on the prev modification ID. + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + getModificationResult(prevModificationID: string): OfficeExtension.ClientResult; + /** + * Creates a custom tag if id is empty. Modifies an existing tag if a tag id is provided. + Returns the action id, which can be used to track the result of this action by + calling GetModificationResult. + * + * @remarks + * [Api set: OneNoteApi 1.3] + * + * @param id The id of the tag, empty string will create a new custom tag. + * @param tagName The name of the tag. + * @param noteTagShape The tag shape id of the tag. + */ + setCustomTag(id: string, tagName: string, noteTagShape: number): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.NoteTagManagerLoadOptions): OneNote.NoteTagManager; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.NoteTagManager; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OneNote.NoteTagManager; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.NoteTagManager; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.NoteTagManager; + /** + * 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 OneNote.NoteTagManager object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.NoteTagManagerData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.NoteTagManagerData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.NoteTagManagerData): void; + } + /** + * Represents the math assistant manager + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + class MathAssistantManager 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 and Sets select and correct mode in MathAssistantManager. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + selectAndCorrectMode: boolean; + /** + * Sets Math Assistant session id. + * + * @remarks + * [Api set: OneNoteApi 1.16] + */ + sessionId: string; + /** + * Gets and Sets number field mode in MathAssistantManager. + * + * @remarks + * [Api set: OneNoteApi 1.10] + */ + settingsNumberField: number; + /** + * Gets and Sets trigonometry unit mode in MathAssistantManager. + * + * @remarks + * [Api set: OneNoteApi 1.10] + */ + settingsTrigUnitMode: number; + /** + * Sets Math Assistant version. + * + * @remarks + * [Api set: OneNoteApi 1.16] + */ + version: 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. + * @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.MathAssistantManagerUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OneNote.MathAssistantManager): void; + /** + * Convert active ink strokes to typeset math. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + convertInkStrokesToTypesetMath(mathml: string): void; + /** + * Get active ink strokes from math assistant + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + getActiveInkStrokes(): OneNote.InkStrokeCollection; + /** + * Gets list of MathMLs from selected typeset. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + getActiveMathMLs(): OfficeExtension.ClientResult; + /** + * Get alternate ink strokes from math assistant + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + getAlternateInkStrokes(): OneNote.InkStrokeCollection; + getFeatureStates(): OfficeExtension.ClientResult; + /** + * Initialize math assistant for agave. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + initialize(): void; + /** + * Do what needs to be done on closing math assistant pane + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + onClosing(): void; + /** + * Register AlterationSelected event + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + registerAlterationSelectedEvent(): void; + /** + * Register InkSelectedForCorrection event + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + registerInkSelectedForCorrectionEvent(): void; + /** + * Register Reset event + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + registerResetEvent(): void; + /** + * Register RestrictionsCalculated event + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + registerRestrictionsCalculatedEvent(): void; + /** + * Run MathImmersiveReader + * + * @remarks + * [Api set: OneNoteApi 1.15] + */ + runMathImmersiveReader(html: string): void; + /** + * Show alternates menu for math assistant pane. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + showAlternatesMenu(strokeIdsJson: string, alternatesJson: string): void; + /** + * Unregister AlterationSelected event + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + unregisterAlterationSelectedEvent(): void; + /** + * Unregister InkSelectedForCorrection event + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + unregisterInkSelectedForCorrectionEvent(): void; + /** + * Unregister Reset event + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + unregisterResetEvent(): void; + /** + * Unregister RestrictionsCalculated event + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + unregisterRestrictionsCalculatedEvent(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.MathAssistantManagerLoadOptions): OneNote.MathAssistantManager; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.MathAssistantManager; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OneNote.MathAssistantManager; + /** + * Occurs when the alteration is changed. + * + * @remarks + * [Api set: OneNoteApi 1.9] + * + * @eventproperty + */ + readonly onAlterationSelected: OfficeExtension.EventHandlers; + /** + * Occurs when mode and ink is selected for correction (in select and correct) + * + * @remarks + * [Api set: OneNoteApi 1.9] + * + * @eventproperty + */ + readonly onInkSelectedForCorrection: OfficeExtension.EventHandlers; + /** + * Occurs when user select some ink and click on math button on ribbon + * + * @remarks + * [Api set: OneNoteApi 1.9] + * + * @eventproperty + */ + readonly onReset: OfficeExtension.EventHandlers; + /** + * Occurs when mode and ink is selected for correction (in select and correct) + * + * @remarks + * [Api set: OneNoteApi 1.9] + * + * @eventproperty + */ + readonly onRestrictionsCalculated: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.MathAssistantManager; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.MathAssistantManager; + /** + * 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 OneNote.MathAssistantManager object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.MathAssistantManagerData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.MathAssistantManagerData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.MathAssistantManagerData): void; + } + /** + * Transcription object + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + class Transcription 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; + /** + * Get and Set data in Transcription. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + data: 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. + * @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.TranscriptionUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OneNote.Transcription): void; + /** + * Return true when there is an existing transcription + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + exists(): OfficeExtension.ClientResult; + /** + * Noyify host OneNote from the SDX app (private) + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param eventId Event id + * @param param Event parameter + */ + notify(eventId: number, param: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.TranscriptionLoadOptions): OneNote.Transcription; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Transcription; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OneNote.Transcription; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.Transcription; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.Transcription; + /** + * 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 OneNote.Transcription object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TranscriptionData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.TranscriptionData; + /** + * Set mock data + */ + setMockData(data: OneNote.Interfaces.TranscriptionData): void; + } + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + enum EntityType { + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + notebook = "Notebook", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + sectionGroup = "SectionGroup", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + section = "Section", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + page = "Page", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum InsertLocation { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + before = "Before", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + after = "After", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum Platform { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + other = "Other", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + web = "Web", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + uwp = "UWP", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + win32 = "Win32", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + mac = "Mac", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ios = "IOS", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum PageContentType { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outline = "Outline", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image = "Image", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ink = "Ink", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + other = "Other", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum ParagraphType { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + richText = "RichText", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image = "Image", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + table = "Table", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ink = "Ink", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + other = "Other", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum NoteTagType { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + toDo = "ToDo", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + important = "Important", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + question = "Question", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + contact = "Contact", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + address = "Address", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + phoneNumber = "PhoneNumber", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + website = "Website", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + idea = "Idea", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + critical = "Critical", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + toDoPriority1 = "ToDoPriority1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + toDoPriority2 = "ToDoPriority2", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum NoteTagStatus { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + normal = "Normal", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + completed = "Completed", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + disabled = "Disabled", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outlookTask = "OutlookTask", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + taskNotSyncedYet = "TaskNotSyncedYet", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + taskRemoved = "TaskRemoved", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum ServiceId { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + form = "Form", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + entity = "Entity", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + graph = "Graph", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + oneService = "OneService", + /** + * @remarks + * [Api set: OneNoteApi 1.12] + */ + classNotebooks = "ClassNotebooks", + /** + * @remarks + * [Api set: OneNoteApi 1.12] + */ + mathSolver = "MathSolver", + /** + * @remarks + * [Api set: OneNoteApi 1.12] + */ + mathRecognizer = "MathRecognizer", + /** + * @remarks + * [Api set: OneNoteApi 1.17] + */ + roamingSettings = "RoamingSettings", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum IdentityFilter { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + selection = "Selection", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + activeProfile = "ActiveProfile", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + liveId = "LiveId", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + orgId = "OrgId", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + adal = "ADAL", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + notebook = "Notebook", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum ListType { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + none = "None", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + number = "Number", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + bullet = "Bullet", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum AccountType { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + other = "Other", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + liveId = "LiveId", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + orgId = "OrgId", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + adal = "ADAL", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum LogLevel { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + trace = "Trace", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + data = "Data", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + exception = "Exception", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + warning = "Warning", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum EventFlag { + /** + * DefaultEventFlags + * @remarks + * [Api set: OneNoteApi 1.1] + */ + defaultFlag = "DefaultFlag", + /** + * CriticalDataEventFlags + * @remarks + * [Api set: OneNoteApi 1.1] + */ + criticalFlag = "CriticalFlag", + /** + * MeasureDataEventFlags + * @remarks + * [Api set: OneNoteApi 1.1] + */ + measureFlag = "MeasureFlag", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum NumberType { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + none = "None", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + arabic = "Arabic", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ucroman = "UCRoman", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lcroman = "LCRoman", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ucletter = "UCLetter", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lcletter = "LCLetter", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ordinal = "Ordinal", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cardtext = "Cardtext", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ordtext = "Ordtext", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hex = "Hex", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + chiManSty = "ChiManSty", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + dbNum1 = "DbNum1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + dbNum2 = "DbNum2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + aiueo = "Aiueo", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + iroha = "Iroha", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + dbChar = "DbChar", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sbChar = "SbChar", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + dbNum3 = "DbNum3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + dbNum4 = "DbNum4", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + circlenum = "Circlenum", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + darabic = "DArabic", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + daiueo = "DAiueo", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + diroha = "DIroha", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + arabicLZ = "ArabicLZ", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + bullet = "Bullet", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ganada = "Ganada", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + chosung = "Chosung", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + gb1 = "GB1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + gb2 = "GB2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + gb3 = "GB3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + gb4 = "GB4", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + zodiac1 = "Zodiac1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + zodiac2 = "Zodiac2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + zodiac3 = "Zodiac3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + tpeDbNum1 = "TpeDbNum1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + tpeDbNum2 = "TpeDbNum2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + tpeDbNum3 = "TpeDbNum3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + tpeDbNum4 = "TpeDbNum4", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + chnDbNum1 = "ChnDbNum1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + chnDbNum2 = "ChnDbNum2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + chnDbNum3 = "ChnDbNum3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + chnDbNum4 = "ChnDbNum4", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + korDbNum1 = "KorDbNum1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + korDbNum2 = "KorDbNum2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + korDbNum3 = "KorDbNum3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + korDbNum4 = "KorDbNum4", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hebrew1 = "Hebrew1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + arabic1 = "Arabic1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hebrew2 = "Hebrew2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + arabic2 = "Arabic2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hindi1 = "Hindi1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hindi2 = "Hindi2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hindi3 = "Hindi3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + thai1 = "Thai1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + thai2 = "Thai2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + numInDash = "NumInDash", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lcrus = "LCRus", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ucrus = "UCRus", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lcgreek = "LCGreek", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ucgreek = "UCGreek", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lim = "Lim", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + custom = "Custom", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum ControlId { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + preinstallClassNotebook = "PreinstallClassNotebook", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + distributePageId = "DistributePageId", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + distributeSection = "DistributeSection", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + reviewStudentWork = "ReviewStudentWork", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + openTabForCreateClassNotebook = "OpenTabForCreateClassNotebook", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + openTabForManageStudent = "OpenTabForManageStudent", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + openTabForManageTeacher = "OpenTabForManageTeacher", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + openTabForGetNotebookLink = "OpenTabForGetNotebookLink", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + openTabForTeacherTraining = "OpenTabForTeacherTraining", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + openTabForAddinGuide = "OpenTabForAddinGuide", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + openTabForEducationBlog = "OpenTabForEducationBlog", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + openTabForEducatorCommunity = "OpenTabForEducatorCommunity", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + openTabToSendFeedback = "OpenTabToSendFeedback", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + openTabForViewKnowledgeBase = "OpenTabForViewKnowledgeBase", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + openTabForSuggestingFeature = "OpenTabForSuggestingFeature", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + manageClasses = "ManageClasses", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + distributePageMenu = "DistributePageMenu", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + distributeSectionMenu = "DistributeSectionMenu", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + reviewStudentWorkMenu = "ReviewStudentWorkMenu", + } + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + enum AccessibilityViolationType { + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + none = "None", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + missingAltText = "MissingAltText", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + tableWithNoHeaderRow = "TableWithNoHeaderRow", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + untitledPage = "UntitledPage", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + unnamedSection = "UnnamedSection", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + unnamedSectionGroup = "UnnamedSectionGroup", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + nonDescriptiveAltText = "NonDescriptiveAltText", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + nestedTable = "NestedTable", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + headingOutOfOrder = "HeadingOutOfOrder", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + extraOutline = "ExtraOutline", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + extraWhitespace = "ExtraWhitespace", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + noHeadingsInALongDocument = "NoHeadingsInALongDocument", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + insufficientTextContrast = "InsufficientTextContrast", + } + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + enum AccessibilityViolationLocation { + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + none = "None", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + onHighlight = "OnHighlight", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + onMultipleParagraphs = "OnMultipleParagraphs", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + onOutline = "OnOutline", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + onPage = "OnPage", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + onParagraph = "OnParagraph", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + onParagraphBegin = "OnParagraphBegin", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + onParagraphEnd = "OnParagraphEnd", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + onTable = "OnTable", + /** + * @remarks + * [Api set: OneNoteApi 1.2] + */ + withinParagraph = "WithinParagraph", + } + /** + * @remarks + * [Api set: OneNoteApi 1.3] + */ + enum TagIconType { + /** + * @remarks + * [Api set: OneNoteApi 1.3] + */ + static = "Static", + /** + * @remarks + * [Api set: OneNoteApi 1.3] + */ + interactive = "Interactive", + } + /** + * @remarks + * [Api set: OneNoteApi 1.3] + */ + enum TagModificationResult { + /** + * @remarks + * [Api set: OneNoteApi 1.3] + */ + success = "Success", + /** + * @remarks + * [Api set: OneNoteApi 1.3] + */ + pending = "Pending", + /** + * @remarks + * [Api set: OneNoteApi 1.3] + */ + invalidIdentity = "InvalidIdentity", + /** + * @remarks + * [Api set: OneNoteApi 1.3] + */ + previousStorageError = "PreviousStorageError", + /** + * @remarks + * [Api set: OneNoteApi 1.3] + */ + storageError = "StorageError", + /** + * @remarks + * [Api set: OneNoteApi 1.3] + */ + alreadyExists = "AlreadyExists", + /** + * @remarks + * [Api set: OneNoteApi 1.3] + */ + invalidGUID = "InvalidGUID", + /** + * @remarks + * [Api set: OneNoteApi 1.3] + */ + invalidLabel = "InvalidLabel", + } + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + const enum ParagraphStyle { + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + noStyle = 0, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + normal = 1, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + title = 2, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + dateTime = 3, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + heading1 = 4, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + heading2 = 5, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + heading3 = 6, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + heading4 = 7, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + heading5 = 8, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + heading6 = 9, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + quote = 10, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + citation = 11, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + code = 12, + } + /** + * @remarks + * [Api set: OneNoteApi 1.19] + */ + const enum SelectionChangeType { + /** + * @remarks + * [Api set: OneNoteApi 1.19] + */ + add = 0, + /** + * @remarks + * [Api set: OneNoteApi 1.19] + */ + remove = 1, + /** + * @remarks + * [Api set: OneNoteApi 1.19] + */ + set = 2, + /** + * @remarks + * [Api set: OneNoteApi 1.19] + */ + toggle = 3, + } + enum ErrorCodes { + accessDenied = "AccessDenied", + generalException = "GeneralException", + invalidArgument = "InvalidArgument", + invalidOperation = "InvalidOperation", + invalidState = "InvalidState", + itemNotFound = "ItemNotFound", + notImplemented = "NotImplemented", + notSupported = "NotSupported", + operationAborted = "OperationAborted", + } + 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 { + mathAssistantManager?: OneNote.Interfaces.MathAssistantManagerUpdateData; + } + /** An interface for updating data on the InkAnalysis object, for use in `inkAnalysis.set({ ... })`. */ + interface InkAnalysisUpdateData { + /** + * Gets the parent page object. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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 PointCollection object, for use in `pointCollection.set({ ... })`. */ + interface PointCollectionUpdateData { + items?: OneNote.Interfaces.PointData[]; + } + /** 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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisUpdateData; + /** + * Gets or sets the indentation level of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: number; + /** + * Gets or sets the title of the page. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageUpdateData; + /** + * Gets or sets the left (X-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + left?: number; + /** + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageUpdateData; + /** + * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. + * + * @remarks + * [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 NoteTagCollection object, for use in `noteTagCollection.set({ ... })`. */ + interface NoteTagCollectionUpdateData { + items?: OneNote.Interfaces.NoteTagData[]; + } + /** An interface for updating data on the Image object, for use in `image.set({ ... })`. */ + interface ImageUpdateData { + /** + * Gets or sets the description of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + description?: string; + /** + * Gets or sets the height of the Image layout. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + height?: number; + /** + * Gets or sets the hyperlink of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hyperlink?: string; + /** + * Gets or sets the width of the Image layout. + * + * @remarks + * [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. + * + * @remarks + * [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 + * + * @remarks + * [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 for updating data on the AccessibilityViolationCollection object, for use in `accessibilityViolationCollection.set({ ... })`. */ + interface AccessibilityViolationCollectionUpdateData { + items?: OneNote.Interfaces.AccessibilityViolationData[]; + } + /** An interface for updating data on the AccessibilityViolationsByEntityCollection object, for use in `accessibilityViolationsByEntityCollection.set({ ... })`. */ + interface AccessibilityViolationsByEntityCollectionUpdateData { + items?: OneNote.Interfaces.AccessibilityViolationsByEntityData[]; + } + /** An interface for updating data on the MathAssistantManager object, for use in `mathAssistantManager.set({ ... })`. */ + interface MathAssistantManagerUpdateData { + /** + * Gets and Sets select and correct mode in MathAssistantManager. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + selectAndCorrectMode?: boolean; + /** + * Sets Math Assistant session id. + * + * @remarks + * [Api set: OneNoteApi 1.16] + */ + sessionId?: string; + /** + * Gets and Sets number field mode in MathAssistantManager. + * + * @remarks + * [Api set: OneNoteApi 1.10] + */ + settingsNumberField?: number; + /** + * Gets and Sets trigonometry unit mode in MathAssistantManager. + * + * @remarks + * [Api set: OneNoteApi 1.10] + */ + settingsTrigUnitMode?: number; + /** + * Sets Math Assistant version. + * + * @remarks + * [Api set: OneNoteApi 1.16] + */ + version?: string; + } + /** An interface for updating data on the Transcription object, for use in `transcription.set({ ... })`. */ + interface TranscriptionUpdateData { + /** + * Get and Set data in Transcription. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + data?: string; + } + /** An interface describing the data returned by calling `application.toJSON()`. */ + interface ApplicationData { + mathAssistantManager?: OneNote.Interfaces.MathAssistantManagerData; + /** + * Gets the note tag manager. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + noteTagManager?: OneNote.Interfaces.NoteTagManagerData; + /** + * 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + page?: OneNote.Interfaces.PageData; + /** + * Gets the ink analysis paragraphs in this page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.InkAnalysisParagraphData[]; + /** + * Gets the ID of the InkAnalysis object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkAnalysis?: OneNote.Interfaces.InkAnalysisData; + /** + * Gets the ink analysis lines in this ink analysis paragraph. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lines?: OneNote.Interfaces.InkAnalysisLineData[]; + /** + * Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.InkAnalysisParagraphData; + /** + * Gets the ink analysis words in this ink analysis line. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + words?: OneNote.Interfaces.InkAnalysisWordData[]; + /** + * Gets the ID of the InkAnalysisLine object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineData; + /** + * Gets the ID of the InkAnalysisWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * The id of the recognized language in this inkAnalysisWord. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + strokePointers?: OneNote.InkStrokePointer[]; + /** + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkStrokes?: OneNote.Interfaces.InkStrokeData[]; + /** + * Gets the ID of the FloatingInk object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + floatingInk?: OneNote.Interfaces.FloatingInkData; + /** + * Gets the points of the InkStroke object, relative to the page root. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + points?: OneNote.Interfaces.PointData[]; + /** + * Gets the ID of the InkStroke object. Read-only. + * + * @remarks + * [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 `point.toJSON()`. */ + interface PointData { + /** + * Gets the ID of the Point object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + id?: string; + x?: number; + y?: number; + } + /** An interface describing the data returned by calling `pointCollection.toJSON()`. */ + interface PointCollectionData { + items?: OneNote.Interfaces.PointData[]; + } + /** An interface describing the data returned by calling `inkWord.toJSON()`. */ + interface InkWordData { + /** + * Gets the ID of the InkWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * The id of the recognized language in this ink word. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + languageId?: string; + /** + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * @remarks + * [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 accessibility violations in the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + accessibilityViolations?: OneNote.Interfaces.AccessibilityViolationsByEntityData[]; + /** + * The section groups in the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupData[]; + /** + * The the sections of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionData[]; + /** + * The url of the site that this notebook is located. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + baseUrl?: string; + /** + * The client url of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * Gets the ID of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * True if the Notebook is a special education notebook with read-only spaces inside the notebook (class notebook). Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + isForEducation?: boolean; + /** + * True if the Notebook folder is read-only. Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + isReadOnly?: boolean; + /** + * True if the Notebook is not created by the user (i.e. 'Misplaced Sections'). Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isVirtual?: boolean; + /** + * Gets the name of the notebook. Read-only. + * + * @remarks + * [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 { + /** + * The collection of section groups in the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupData[]; + /** + * The collection of sections in the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionData[]; + /** + * The client url of the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * Gets the ID of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets the name of the section group. Read-only. + * + * @remarks + * [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 { + /** + * The collection of pages in the section. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pages?: OneNote.Interfaces.PageData[]; + /** + * The client url of the section. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * Gets the ID of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * True if this section is encrypted with a password. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isEncrypted?: boolean; + /** + * True if this section is Quick Notes. Read only + * + * @remarks + * [Api set: OneNoteApi 1.20] + */ + isForQuickNotes?: boolean; + /** + * True if this section is locked. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isLocked?: boolean; + /** + * Gets the name of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: string; + /** + * The web url of the page. Read only + * + * @remarks + * [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 accessibility violations in the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + accessibilityViolations?: OneNote.Interfaces.AccessibilityViolationData[]; + /** + * The collection of PageContent objects on the page. Read only + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisData; + /** + * Gets the ClassNotebookPageSource to the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + classNotebookPageSource?: string; + /** + * The client url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * Gets the ID of the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets or sets the indentation level of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: number; + /** + * Gets or sets the title of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + title?: string; + /** + * The web url of the page. Read only + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageData; + /** + * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ink?: OneNote.Interfaces.FloatingInkData; + /** + * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineData; + /** + * Gets the ID of the PageContent object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets or sets the left (X-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + left?: number; + /** + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + top?: number; + /** + * Gets the type of the PageContent object. Read-only. + * + * @remarks + * [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 collection of Paragraph objects in the Outline. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphData[]; + /** + * Gets the ID of the Outline object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkWords?: OneNote.Interfaces.InkWordData[]; + /** + * The collection of paragraphs under this paragraph. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphData[]; + /** + * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. Read-only + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableData; + /** + * Gets the ID of the Paragraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets the type of the Paragraph object. Read-only. + * + * @remarks + * [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 TagIcon property of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + tagIcon?: OneNote.Interfaces.TagIconData; + /** + * Gets the Id of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets the status of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + status?: OneNote.NoteTagStatus | "Unknown" | "Normal" | "Completed" | "Disabled" | "OutlookTask" | "TaskNotSyncedYet" | "TaskRemoved"; + /** + * Gets the type of the NoteTag object. Read-only. + * + * @remarks + * [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 `noteTagCollection.toJSON()`. */ + interface NoteTagCollectionData { + items?: OneNote.Interfaces.NoteTagData[]; + } + /** An interface describing the data returned by calling `richText.toJSON()`. */ + interface RichTextData { + /** + * Gets the ID of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * The language id of the text. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + languageId?: string; + /** + * Gets the text style of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.8] + */ + style?: OneNote.ParagraphStyle; + /** + * Gets the text content of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling `image.toJSON()`. */ + interface ImageData { + /** + * Gets or sets the description of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + description?: string; + /** + * Gets or sets the height of the Image layout. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + height?: number; + /** + * Gets or sets the hyperlink of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hyperlink?: string; + /** + * Gets the ID of the Image object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ocrData?: OneNote.ImageOcrData; + /** + * Gets or sets the width of the Image layout. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling `table.toJSON()`. */ + interface TableData { + /** + * Gets all of the table rows. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + borderVisible?: boolean; + /** + * Gets the number of columns in the table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + columnCount?: number; + /** + * Gets the ID of the table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets the number of rows in the table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cells?: OneNote.Interfaces.TableCellData[]; + /** + * Gets the number of cells in the row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cellCount?: number; + /** + * Gets the ID of the row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets the index of the row in its parent table. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphData[]; + /** + * Gets the index of the cell in its row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cellIndex?: number; + /** + * Gets the ID of the cell. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets the index of the cell's row in the table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: number; + /** + * Gets and sets the shading color of the cell + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + shadingColor?: string; + } + /** An interface describing the data returned by calling `tableCellCollection.toJSON()`. */ + interface TableCellCollectionData { + items?: OneNote.Interfaces.TableCellData[]; + } + /** An interface describing the data returned by calling `accessibilityViolation.toJSON()`. */ + interface AccessibilityViolationData { + /** + * Gets the ID of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + id?: string; + /** + * Gets the location of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + location?: OneNote.AccessibilityViolationLocation | "None" | "OnHighlight" | "OnMultipleParagraphs" | "OnOutline" | "OnPage" | "OnParagraph" | "OnParagraphBegin" | "OnParagraphEnd" | "OnTable" | "WithinParagraph"; + /** + * Gets the name of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + name?: string; + /** + * Gets the type of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + type?: OneNote.AccessibilityViolationType | "None" | "MissingAltText" | "TableWithNoHeaderRow" | "UntitledPage" | "UnnamedSection" | "UnnamedSectionGroup" | "NonDescriptiveAltText" | "NestedTable" | "HeadingOutOfOrder" | "ExtraOutline" | "ExtraWhitespace" | "NoHeadingsInALongDocument" | "InsufficientTextContrast"; + } + /** An interface describing the data returned by calling `accessibilityViolationCollection.toJSON()`. */ + interface AccessibilityViolationCollectionData { + items?: OneNote.Interfaces.AccessibilityViolationData[]; + } + /** An interface describing the data returned by calling `accessibilityViolationsByEntity.toJSON()`. */ + interface AccessibilityViolationsByEntityData { + /** + * Gets the parent section section group (if any) of the entity. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupData; + /** + * Gets the parent section (if any) of the entity. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + parentSectionOrNull?: OneNote.Interfaces.SectionData; + /** + * Gets the name of the entity for which this structure holds metadata. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + entityName?: string; + /** + * Gets the type of the entity for which this structure holds metadata. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + entityType?: OneNote.EntityType | "Notebook" | "SectionGroup" | "Section" | "Page"; + /** + * Gets the ID of the AccessibilityViolationsByEntity. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + id?: string; + /** + * Gets the count of accessibility violations for the entity. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + violationsCount?: number; + } + /** An interface describing the data returned by calling `accessibilityViolationsByEntityCollection.toJSON()`. */ + interface AccessibilityViolationsByEntityCollectionData { + items?: OneNote.Interfaces.AccessibilityViolationsByEntityData[]; + } + /** An interface describing the data returned by calling `tagIcon.toJSON()`. */ + interface TagIconData { + /** + * Gets the bitmaps of all the states of the tag icon. Read-only + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + bitmaps?: string[]; + /** + * Gets the name of the tag icon. Read-only + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + name?: string; + /** + * Gets the note tag shape of the tag icon. Read-only + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + noteTagShape?: number; + /** + * Gets the type of the tag icon. Read-only + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + type?: OneNote.TagIconType | "Static" | "Interactive"; + } + /** An interface describing the data returned by calling `noteTagManager.toJSON()`. */ + interface NoteTagManagerData { + /** + * Gets the collection of all built-in custom NoteTags. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.4] + */ + allNoteTags?: OneNote.Interfaces.NoteTagData[]; + /** + * Gets the collection of featured built-in custom NoteTags. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.4] + */ + featuredNoteTags?: OneNote.Interfaces.NoteTagData[]; + } + /** An interface describing the data returned by calling `mathAssistantManager.toJSON()`. */ + interface MathAssistantManagerData { + /** + * Gets and Sets select and correct mode in MathAssistantManager. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + selectAndCorrectMode?: boolean; + /** + * Sets Math Assistant session id. + * + * @remarks + * [Api set: OneNoteApi 1.16] + */ + sessionId?: string; + /** + * Gets and Sets number field mode in MathAssistantManager. + * + * @remarks + * [Api set: OneNoteApi 1.10] + */ + settingsNumberField?: number; + /** + * Gets and Sets trigonometry unit mode in MathAssistantManager. + * + * @remarks + * [Api set: OneNoteApi 1.10] + */ + settingsTrigUnitMode?: number; + /** + * Sets Math Assistant version. + * + * @remarks + * [Api set: OneNoteApi 1.16] + */ + version?: string; + } + /** An interface describing the data returned by calling `transcription.toJSON()`. */ + interface TranscriptionData { + /** + * Get and Set data in Transcription. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + data?: string; + } + /** + * Represents the top-level object that contains all globally addressable OneNote objects such as notebooks, the active notebook, and the active section. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ApplicationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + mathAssistantManager?: OneNote.Interfaces.MathAssistantManagerLoadOptions; + /** + * Gets the note tag manager. + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + noteTagManager?: OneNote.Interfaces.NoteTagManagerLoadOptions; + /** + * 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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + notebooks?: OneNote.Interfaces.NotebookCollectionLoadOptions; + } + /** + * Represents ink analysis data for a given set of ink strokes. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the parent page object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + page?: OneNote.Interfaces.PageLoadOptions; + /** + * Gets the ink analysis paragraphs in this page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.InkAnalysisParagraphCollectionLoadOptions; + /** + * Gets the ID of the InkAnalysis object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents ink analysis data for an identified paragraph formed by ink strokes. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisParagraphLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Reference to the parent InkAnalysisPage. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkAnalysis?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * Gets the ink analysis lines in this ink analysis paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lines?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions; + /** + * Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents a collection of InkAnalysisParagraph objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisParagraphCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Reference to the parent InkAnalysisPage. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lines?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents ink analysis data for an identified text line formed by ink strokes. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisLineLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Reference to the parent InkAnalysisParagraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.InkAnalysisParagraphLoadOptions; + /** + * Gets the ink analysis words in this ink analysis line. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + words?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions; + /** + * Gets the ID of the InkAnalysisLine object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents a collection of InkAnalysisLine objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisLineCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Reference to the parent InkAnalysisParagraph. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + words?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the InkAnalysisLine object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents ink analysis data for an identified word formed by ink strokes. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisWordLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Reference to the parent InkAnalysisLine. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineLoadOptions; + /** + * Gets the ID of the InkAnalysisWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * The id of the recognized language in this inkAnalysisWord. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + strokePointers?: boolean; + /** + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * Represents a collection of InkAnalysisWord objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisWordCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Reference to the parent InkAnalysisLine. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the InkAnalysisWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The id of the recognized language in this inkAnalysisWord. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * Represents a group of ink strokes. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface FloatingInkLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the strokes of the FloatingInk object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkStrokes?: OneNote.Interfaces.InkStrokeCollectionLoadOptions; + /** + * Gets the PageContent parent of the FloatingInk object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentLoadOptions; + /** + * Gets the ID of the FloatingInk object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents a single stroke of ink. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkStrokeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the ID of the InkStroke object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + floatingInk?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * Gets the points of the InkStroke object, relative to the page root. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + points?: OneNote.Interfaces.PointCollectionLoadOptions; + /** + * Gets the ID of the InkStroke object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents a collection of InkStroke objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkStrokeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the InkStroke object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + floatingInk?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * For EACH ITEM in the collection: Gets the points of the InkStroke object, relative to the page root. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + points?: OneNote.Interfaces.PointCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the InkStroke object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents a single point of ink stroke + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + interface PointLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the ID of the Point object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + id?: boolean; + x?: boolean; + y?: boolean; + } + /** + * Represents a collection of Point objects. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + interface PointCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the Point object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: X + */ + x?: boolean; + /** + * For EACH ITEM in the collection: Y + */ + y?: boolean; + } + /** + * A container for the ink in a word in a paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkWordLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The parent paragraph containing the ink word. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * Gets the ID of the InkWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * The id of the recognized language in this ink word. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + languageId?: boolean; + /** + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * Represents a collection of InkWord objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkWordCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The parent paragraph containing the ink word. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the InkWord object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * Represents a OneNote notebook. Notebooks contain section groups and sections. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface NotebookLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The section groups in the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * The the sections of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * The url of the site that this notebook is located. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + baseUrl?: boolean; + /** + * The client url of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * Gets the ID of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * True if the Notebook is a special education notebook with read-only spaces inside the notebook (class notebook). Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + isForEducation?: boolean; + /** + * True if the Notebook folder is read-only. Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + isReadOnly?: boolean; + /** + * True if the Notebook is not created by the user (i.e. 'Misplaced Sections'). Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isVirtual?: boolean; + /** + * Gets the name of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * Represents a collection of notebooks. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface NotebookCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The section groups in the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * For EACH ITEM in the collection: The the sections of the notebook. Read only + * + * @remarks + * [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 + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + baseUrl?: boolean; + /** + * For EACH ITEM in the collection: The client url of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: True if the Notebook is a special education notebook with read-only spaces inside the notebook (class notebook). Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + isForEducation?: boolean; + /** + * For EACH ITEM in the collection: True if the Notebook folder is read-only. Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + isReadOnly?: boolean; + /** + * For EACH ITEM in the collection: True if the Notebook is not created by the user (i.e. 'Misplaced Sections'). Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isVirtual?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * Represents a OneNote section group. Section groups can contain sections and other section groups. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface SectionGroupLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the notebook that contains the section group. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * The collection of section groups in the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * The collection of sections in the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * The client url of the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * Gets the ID of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets the name of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * Represents a collection of section groups. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface SectionGroupCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the notebook that contains the section group. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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 + * + * @remarks + * [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 + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * For EACH ITEM in the collection: The client url of the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * Represents a OneNote section. Sections can contain pages. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface SectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the notebook that contains the section. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookLoadOptions; + /** + * The collection of pages in the section. Read only + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * The client url of the section. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * Gets the ID of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * True if this section is encrypted with a password. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isEncrypted?: boolean; + /** + * True if this section is Quick Notes. Read only + * + * @remarks + * [Api set: OneNoteApi 1.20] + */ + isForQuickNotes?: boolean; + /** + * True if this section is locked. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isLocked?: boolean; + /** + * Gets the name of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + /** + * The web url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * Represents a collection of sections. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface SectionCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the notebook that contains the section. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookLoadOptions; + /** + * For EACH ITEM in the collection: The collection of pages in the section. Read only + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * For EACH ITEM in the collection: The client url of the section. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: True if this section is encrypted with a password. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isEncrypted?: boolean; + /** + * For EACH ITEM in the collection: True if this section is Quick Notes. Read only + * + * @remarks + * [Api set: OneNoteApi 1.20] + */ + isForQuickNotes?: boolean; + /** + * For EACH ITEM in the collection: True if this section is locked. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isLocked?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: The web url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * Represents a OneNote page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface PageLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The collection of PageContent objects on the page. Read only + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * Gets the section that contains the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentSection?: OneNote.Interfaces.SectionLoadOptions; + /** + * Transcription object for the page + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + transcription?: OneNote.Interfaces.TranscriptionLoadOptions; + /** + * Gets the ClassNotebookPageSource to the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + classNotebookPageSource?: boolean; + /** + * The client url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * Gets the ID of the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets or sets the indentation level of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: boolean; + /** + * Gets or sets the title of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + title?: boolean; + /** + * The web url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * Represents a collection of pages. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface PageCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The collection of PageContent objects on the page. Read only + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * For EACH ITEM in the collection: Gets the section that contains the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentSection?: OneNote.Interfaces.SectionLoadOptions; + /** + * For EACH ITEM in the collection: Transcription object for the page + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + transcription?: OneNote.Interfaces.TranscriptionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ClassNotebookPageSource to the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + classNotebookPageSource?: boolean; + /** + * For EACH ITEM in the collection: The client url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets or sets the indentation level of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: boolean; + /** + * For EACH ITEM in the collection: Gets or sets the title of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + title?: boolean; + /** + * For EACH ITEM in the collection: The web url of the page. Read only + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface PageContentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageLoadOptions; + /** + * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ink?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * Gets the page that contains the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentPage?: OneNote.Interfaces.PageLoadOptions; + /** + * Gets the ID of the PageContent object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets or sets the left (X-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + left?: boolean; + /** + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + top?: boolean; + /** + * Gets the type of the PageContent object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * Represents the contents of a page, as a collection of PageContent objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface PageContentCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * For EACH ITEM in the collection: Gets the page that contains the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentPage?: OneNote.Interfaces.PageLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the PageContent object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Gets the type of the PageContent object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * Represents a container for Paragraph objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface OutlineLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the PageContent object that contains the Outline. This object defines the position of the Outline on the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentLoadOptions; + /** + * Gets the collection of Paragraph objects in the Outline. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * Gets the ID of the Outline object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ParagraphLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageLoadOptions; + /** + * Gets the Ink collection in the Paragraph. Throws an exception if ParagraphType is not Ink. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkWords?: OneNote.Interfaces.InkWordCollectionLoadOptions; + /** + * Gets the Outline object that contains the Paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * The collection of paragraphs under this paragraph. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * Gets the parent paragraph object. Throws if a parent paragraph does not exist. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentParagraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * Gets the parent paragraph object. Returns null if a parent paragraph does not exist. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentTableCellOrNull?: OneNote.Interfaces.TableCellLoadOptions; + /** + * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + richText?: OneNote.Interfaces.RichTextLoadOptions; + /** + * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableLoadOptions; + /** + * Gets the ID of the Paragraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets the type of the Paragraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * Represents a collection of Paragraph objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ParagraphCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkWords?: OneNote.Interfaces.InkWordCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the Outline object that contains the Paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * For EACH ITEM in the collection: The collection of paragraphs under this paragraph. Read only + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the Paragraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the type of the Paragraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * A container for the NoteTag in a paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface NoteTagLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the TagIcon property of the NoteTag object. + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + tagIcon?: OneNote.Interfaces.TagIconLoadOptions; + /** + * Gets the Id of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets the status of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + status?: boolean; + /** + * Gets the type of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * Represents the collection of NoteTags + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + interface NoteTagCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the TagIcon property of the NoteTag object. + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + tagIcon?: OneNote.Interfaces.TagIconLoadOptions; + /** + * For EACH ITEM in the collection: Gets the Id of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the status of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + status?: boolean; + /** + * For EACH ITEM in the collection: Gets the type of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * Represents a RichText object in a Paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface RichTextLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the Paragraph object that contains the RichText object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * Gets the ID of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * The language id of the text. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + languageId?: boolean; + /** + * Gets the text style of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.8] + */ + style?: boolean; + /** + * Gets the text content of the RichText object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ImageLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * Gets or sets the description of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + description?: boolean; + /** + * Gets or sets the height of the Image layout. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + height?: boolean; + /** + * Gets or sets the hyperlink of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hyperlink?: boolean; + /** + * Gets the ID of the Image object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ocrData?: boolean; + /** + * Gets or sets the width of the Image layout. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + width?: boolean; + } + /** + * Represents a table in a OneNote page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface TableLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the Paragraph object that contains the Table object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * Gets all of the table rows. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + borderVisible?: boolean; + /** + * Gets the number of columns in the table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + columnCount?: boolean; + /** + * Gets the ID of the table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + rowCount?: boolean; + } + /** + * Represents a row in a table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface TableRowLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the cells in the row. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cells?: OneNote.Interfaces.TableCellCollectionLoadOptions; + /** + * Gets the parent table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentTable?: OneNote.Interfaces.TableLoadOptions; + /** + * Gets the number of cells in the row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cellCount?: boolean; + /** + * Gets the ID of the row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets the index of the row in its parent table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + } + /** + * Contains a collection of TableRow objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface TableRowCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the cells in the row. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cells?: OneNote.Interfaces.TableCellCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cellCount?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the row. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + } + /** + * Represents a cell in a OneNote table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface TableCellLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the collection of Paragraph objects in the TableCell. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * Gets the parent row of the cell. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentRow?: OneNote.Interfaces.TableRowLoadOptions; + /** + * Gets the index of the cell in its row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cellIndex?: boolean; + /** + * Gets the ID of the cell. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets the index of the cell's row in the table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + /** + * Gets and sets the shading color of the cell + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + shadingColor?: boolean; + } + /** + * Contains a collection of TableCell objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface TableCellCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the collection of Paragraph objects in the TableCell. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent row of the cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cellIndex?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the cell. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + /** + * For EACH ITEM in the collection: Gets and sets the shading color of the cell + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + shadingColor?: boolean; + } + /** + * Represents a OneNote accessibility violation. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + interface AccessibilityViolationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the ID of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + id?: boolean; + /** + * Gets the location of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + location?: boolean; + /** + * Gets the name of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + name?: boolean; + /** + * Gets the type of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + type?: boolean; + } + /** + * Represents the collection of AccessibilityViolations. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + interface AccessibilityViolationCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the location of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + location?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Gets the type of the accessibility violation. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + type?: boolean; + } + /** + * A OneNote structure that stores metadata about accessibility violations for an entity. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + interface AccessibilityViolationsByEntityLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the parent section section group (if any) of the entity. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * Gets the parent section (if any) of the entity. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + parentSectionOrNull?: OneNote.Interfaces.SectionLoadOptions; + /** + * Gets the name of the entity for which this structure holds metadata. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + entityName?: boolean; + /** + * Gets the type of the entity for which this structure holds metadata. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + entityType?: boolean; + /** + * Gets the ID of the AccessibilityViolationsByEntity. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + id?: boolean; + /** + * Gets the count of accessibility violations for the entity. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + violationsCount?: boolean; + } + /** + * Represents the collection of AccessibilityViolationsByEntity. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + interface AccessibilityViolationsByEntityCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the parent section section group (if any) of the entity. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent section (if any) of the entity. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + parentSectionOrNull?: OneNote.Interfaces.SectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the name of the entity for which this structure holds metadata. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + entityName?: boolean; + /** + * For EACH ITEM in the collection: Gets the type of the entity for which this structure holds metadata. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + entityType?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the AccessibilityViolationsByEntity. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the count of accessibility violations for the entity. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + violationsCount?: boolean; + } + /** + * Represents a note tag icon + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + interface TagIconLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the bitmaps of all the states of the tag icon. Read-only + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + bitmaps?: boolean; + /** + * Gets the name of the tag icon. Read-only + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + name?: boolean; + /** + * Gets the note tag shape of the tag icon. Read-only + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + noteTagShape?: boolean; + /** + * Gets the type of the tag icon. Read-only + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + type?: boolean; + } + /** + * Represents the note tag manager + * + * @remarks + * [Api set: OneNoteApi 1.3] + */ + interface NoteTagManagerLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the collection of all built-in custom NoteTags. + * + * @remarks + * [Api set: OneNoteApi 1.4] + */ + allNoteTags?: OneNote.Interfaces.NoteTagCollectionLoadOptions; + /** + * Gets the collection of featured built-in custom NoteTags. + * + * @remarks + * [Api set: OneNoteApi 1.4] + */ + featuredNoteTags?: OneNote.Interfaces.NoteTagCollectionLoadOptions; + } + /** + * Represents the math assistant manager + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + interface MathAssistantManagerLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets and Sets select and correct mode in MathAssistantManager. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + selectAndCorrectMode?: boolean; + /** + * Sets Math Assistant session id. + * + * @remarks + * [Api set: OneNoteApi 1.16] + */ + sessionId?: boolean; + /** + * Gets and Sets number field mode in MathAssistantManager. + * + * @remarks + * [Api set: OneNoteApi 1.10] + */ + settingsNumberField?: boolean; + /** + * Gets and Sets trigonometry unit mode in MathAssistantManager. + * + * @remarks + * [Api set: OneNoteApi 1.10] + */ + settingsTrigUnitMode?: boolean; + /** + * Sets Math Assistant version. + * + * @remarks + * [Api set: OneNoteApi 1.16] + */ + version?: boolean; + } + /** + * Transcription object + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface TranscriptionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Get and Set data in Transcription. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + data?: 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 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; +} + + +//////////////////////////////////////////////////////////////// +/////////////////////// End OneNote APIs /////////////////////// +//////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// +///////////////////////// Begin Visio ////////////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace Visio { + /** + * Provides information about the shape that raised the ShapeMouseEnter event. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeMouseEnterEventArgs { + /** + * Gets the name of the page which has the shape object that raised the ShapeMouseEnter event. + * + * @remarks + * [Api set: 1.1] + */ + pageName: string; + /** + * Gets the name of the shape object that raised the ShapeMouseEnter event. + * + * @remarks + * [Api set: 1.1] + */ + shapeName: string; + } + /** + * Provides information about the shape that raised the ShapeMouseLeave event. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeMouseLeaveEventArgs { + /** + * Gets the name of the page which has the shape object that raised the ShapeMouseLeave event. + * + * @remarks + * [Api set: 1.1] + */ + pageName: string; + /** + * Gets the name of the shape object that raised the ShapeMouseLeave event. + * + * @remarks + * [Api set: 1.1] + */ + shapeName: string; + } + /** + * Provides information about the page that raised the PageLoadComplete event. + * + * @remarks + * [Api set: 1.1] + */ + interface PageLoadCompleteEventArgs { + /** + * Gets the name of the page that raised the PageLoad event. + * + * @remarks + * [Api set: 1.1] + */ + pageName: string; + /** + * Gets the success or failure of the PageLoadComplete event. + * + * @remarks + * [Api set: 1.1] + */ + success: boolean; + } + /** + * Provides information about the document that raised the DataRefreshComplete event. + * + * @remarks + * [Api set: 1.1] + */ + interface DataRefreshCompleteEventArgs { + /** + * Gets the document object that raised the DataRefreshComplete event. + * + * @remarks + * [Api set: 1.1] + */ + document: Visio.Document; + /** + * Gets the success or failure of the DataRefreshComplete event. + * + * @remarks + * [Api set: 1.1] + */ + success: boolean; + } + /** + * Provides information about the shape collection that raised the SelectionChanged event. + * + * @remarks + * [Api set: 1.1] + */ + interface SelectionChangedEventArgs { + /** + * Gets the name of the page which has the ShapeCollection object that raised the SelectionChanged event. + * + * @remarks + * [Api set: 1.1] + */ + pageName: string; + /** + * Gets the array of shape names that raised the SelectionChanged event. + * + * @remarks + * [Api set: 1.1] + */ + shapeNames: string[]; + } + /** + * Provides information about the success or failure of the DocumentLoadComplete event. + * + * @remarks + * [Api set: 1.1] + */ + interface DocumentLoadCompleteEventArgs { + /** + * Gets the success or failure of the DocumentLoadComplete event. + * + * @remarks + * [Api set: 1.1] + */ + success: boolean; + } + /** + * Provides information about the page that raised the PageRenderComplete event. + * + * @remarks + * [Api set: 1.1] + */ + interface PageRenderCompleteEventArgs { + /** + * Gets the name of the page that raised the PageLoad event. + * + * @remarks + * [Api set: 1.1] + */ + pageName: string; + /** + * Gets the success/failure of the PageRender event. + * + * @remarks + * [Api set: 1.1] + */ + success: boolean; + } + /** + * Provides information about DocumentError event + * + * @remarks + * [Api set: 1.1] + */ + interface DocumentErrorEventArgs { + /** + * Visio Error code + * + * @remarks + * [Api set: 1.1] + */ + errorCode: number; + /** + * Message about error that occured + * + * @remarks + * [Api set: 1.1] + */ + errorMessage: string; + /** + * Tells if the error is critical or not. If critical the session cannot continue. + * + * @remarks + * [Api set: 1.1] + */ + isCritical: boolean; + } + /** + * Provides the Diagram associated with the event and its operation's result. + * + * @remarks + * [Api set: 1.1] + */ + interface DataVisualizerDiagramOperationCompleteEventArgs { + /** + * List of errors found in data during validation. + * + * @remarks + * [Api set: 1.1] + */ + dataValidationErrors: Visio.DataValidationError[]; + /** + * Data visualizer diagram ID. + * + * @remarks + * [Api set: 1.1] + */ + diagramID: number; + /** + * Operation to which this event corresponds to. + * + * @remarks + * [Api set: 1.1] + */ + operationType: Visio.DataVisualizerDiagramOperationType | "Unknown" | "Create" | "UpdateMappings" | "UpdateData" | "Update" | "Delete"; + /** + * Id of the page where diagram exists. + * + * @remarks + * [Api set: 1.1] + */ + pageID: number; + /** + * Result message. + * + * @remarks + * [Api set: 1.1] + */ + resultMessage: string; + /** + * Result title. + * + * @remarks + * [Api set: 1.1] + */ + resultTitle: string; + /** + * Diagram's operation result type. + * + * @remarks + * [Api set: 1.1] + */ + resultType: Visio.DataVisualizerDiagramResultType | "Success" | "Unexpected" | "ValidationError" | "ConflictError"; + /** + * Tabular Data on which the operation was done + * + * @remarks + * [Api set: 1.1] + */ + tabularData: Visio.TabularData; + } + /** + * Provides information about the TaskPaneStateChanged event. + * + * @remarks + * [Api set: 1.1] + */ + interface TaskPaneStateChangedEventArgs { + /** + * Current state of the taskpane + * + * @remarks + * [Api set: 1.1] + */ + isVisible: boolean; + /** + * Type of the TaskPane. + * + * @remarks + * [Api set: 1.1] + */ + paneType: Visio.TaskPaneType | "None" | "DataVisualizerProcessMappings" | "DataVisualizerOrgChartMappings"; + } + /** + * Represents the Application. + * + * @remarks + * [Api set: 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; + /** + * Show or hide the iFrame application borders. + * + * @remarks + * [Api set: 1.1] + */ + showBorders: boolean; + /** + * Show or hide the standard toolbars. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.ApplicationLoadOptions): Visio.Application; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Application; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.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 Visio.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.ApplicationData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.ApplicationData): void; + } + /** + * Represents the Document class. + * + * @remarks + * [Api set: 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; + /** + * Represents a Visio application instance that contains this document. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly application: Visio.Application; + /** + * Represents a collection of pages associated with the document. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly pages: Visio.PageCollection; + /** + * Returns the DocumentView object. Read-only. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: 1.1] + */ + getActivePage(): Visio.Page; + /** + * Set the Active Page of the document. + * + * @remarks + * [Api set: 1.1] + * + * @param PageName Name of the page + */ + setActivePage(PageName: string): void; + /** + * Show or Hide a TaskPane. + This will be consumed by the DV Excel Add-In/Other third-party apps who embed the visio drawing to show/hide the task pane. + * + * @remarks + * [Api set: 1.1] + * + * @param taskPaneType Type of the 1st Party TaskPane. It can take values from enum TaskPaneType + * @param initialProps Optional Parameter. This is a generic data structure which would be filled with initial data required to initialize the content of the Taskpane + * @param show Optional Parameter. If it is set to false, it will hide the specified taskpane + */ + showTaskPane(taskPaneType: Visio.TaskPaneType, initialProps?: any, show?: boolean): void; + /** + * Show or Hide a TaskPane. + This will be consumed by the DV Excel Add-In/Other third-party apps who embed the visio drawing to show/hide the task pane. + * + * @remarks + * [Api set: 1.1] + * + * @param taskPaneType Type of the 1st Party TaskPane. It can take values from enum TaskPaneType + * @param initialProps Optional Parameter. This is a generic data structure which would be filled with initial data required to initialize the content of the Taskpane + * @param show Optional Parameter. If it is set to false, it will hide the specified taskpane + */ + showTaskPane(taskPaneType: "None" | "DataVisualizerProcessMappings" | "DataVisualizerOrgChartMappings", initialProps?: any, show?: boolean): void; + /** + * Triggers the refresh of the data in the Diagram, for all pages. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.DocumentLoadOptions): Visio.Document; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Document; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.Document; + /** + * Occurs when the data is refreshed in the diagram. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onDataRefreshComplete: OfficeExtension.EventHandlers; + /** + * Event raised when a data visualizer diagram is created or updated with new mappings and/or data. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onDataVisualizerDiagramOperationCompleted: OfficeExtension.EventHandlers; + /** + * Occurs when there is an expected or unexpected error occured in the session. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onDocumentError: OfficeExtension.EventHandlers; + /** + * Occurs when the Document is loaded, refreshed, or changed. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onDocumentLoadComplete: OfficeExtension.EventHandlers; + /** + * Occurs when the page is finished loading. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onPageLoadComplete: OfficeExtension.EventHandlers; + /** + * Occurs when the current selection of shapes changes. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the user moves the mouse pointer into the bounding box of a shape. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onShapeMouseEnter: OfficeExtension.EventHandlers; + /** + * Occurs when the user moves the mouse out of the bounding box of a shape. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onShapeMouseLeave: OfficeExtension.EventHandlers; + /** + * Occurs whenever a task pane state is changed + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onTaskPaneStateChanged: 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 Visio.Document object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.DocumentData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.DocumentData): void; + } + /** + * Represents the DocumentView class. + * + * @remarks + * [Api set: 1.1] + */ + class DocumentView 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; + /** + * Disable Hyperlinks. + * + * @remarks + * [Api set: 1.1] + */ + disableHyperlinks: boolean; + /** + * Disable Pan. + * + * @remarks + * [Api set: 1.1] + */ + disablePan: boolean; + /** + * Disable PanZoomWindow. + * + * @remarks + * [Api set: 1.1] + */ + disablePanZoomWindow: boolean; + /** + * Disable Zoom. + * + * @remarks + * [Api set: 1.1] + */ + disableZoom: boolean; + /** + * Hide Diagram Boundary. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.DocumentViewLoadOptions): Visio.DocumentView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.DocumentView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.DocumentView; + /** + * 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 Visio.DocumentView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.DocumentViewData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.DocumentViewData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.DocumentViewData): void; + } + /** + * Represents the Page class. + * + * @remarks + * [Api set: 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; + /** + * All shapes in the Page, including subshapes. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly allShapes: Visio.ShapeCollection; + /** + * Returns the Comments Collection. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly comments: Visio.CommentCollection; + /** + * All Data Visualizer Diagrams on the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly dataVisualizerDiagrams: Visio.DataVisualizerDiagramCollection; + /** + * All top-level shapes in the Page.Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly shapes: Visio.ShapeCollection; + /** + * Returns the view of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly view: Visio.PageView; + /** + * Returns the height of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly height: number; + /** + * Index of the Page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly index: number; + /** + * Whether the page is a background page or not. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly isBackground: boolean; + /** + * Page name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly name: string; + /** + * Returns the width of the page. Read-only. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.PageLoadOptions): Visio.Page; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Page; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.Page; + /** + * 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 Visio.Page object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.PageData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.PageData): void; + } + /** + * Represents the PageView class. + * + * @remarks + * [Api set: 1.1] + */ + class PageView 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; + /** + * Get and set Page's Zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: 1.1] + * + * @param ShapeId ShapeId to be seen in the center. + */ + centerViewportOnShape(ShapeId: number): void; + /** + * Fit Page to current window. + * + * @remarks + * [Api set: 1.1] + */ + fitToWindow(): void; + /** + * Returns the position object that specifies the position of the page in the view. + * + * @remarks + * [Api set: 1.1] + */ + getPosition(): OfficeExtension.ClientResult; + /** + * Represents the Selection in the page. + * + * @remarks + * [Api set: 1.1] + */ + getSelection(): Visio.Selection; + /** + * To check if the shape is in view of the page or not. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.PageViewLoadOptions): Visio.PageView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.PageView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.PageView; + /** + * 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 Visio.PageView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageViewData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.PageViewData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.PageViewData): void; + } + /** + * Represents a collection of Page objects that are part of the document. + * + * @remarks + * [Api set: 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: Visio.Page[]; + /** + * Gets the number of pages in the collection. + * + * @remarks + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a page using its key (name or Id). + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.PageCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.PageCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.PageCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.PageCollection; + /** + * 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 `Visio.PageCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Visio.Interfaces.PageCollectionData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.PageCollectionData): void; + } + /** + * Represents the Shape Collection. + * + * @remarks + * [Api set: 1.1] + */ + 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: Visio.Shape[]; + /** + * Gets the number of Shapes in the collection. + * + * @remarks + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a Shape using its key (name or Index). + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.ShapeCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.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 `Visio.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Visio.Interfaces.ShapeCollectionData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.ShapeCollectionData): void; + } + /** + * Represents the Shape class. + * + * @remarks + * [Api set: 1.1] + */ + 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 Comments Collection. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly comments: Visio.CommentCollection; + /** + * Returns the Hyperlinks collection for a Shape object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly hyperlinks: Visio.HyperlinkCollection; + /** + * Returns the Shape's Data Section. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly shapeDataItems: Visio.ShapeDataItemCollection; + /** + * Gets SubShape Collection. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly subShapes: Visio.ShapeCollection; + /** + * Returns the view of the shape. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly view: Visio.ShapeView; + /** + * Shape's identifier. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly id: number; + /** + * Returns true if the shape is bound to data and is part of Data Visualizer diagram. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly isBoundToData: boolean; + /** + * Shape's name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly name: string; + /** + * Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * @remarks + * [Api set: 1.1] + */ + select: boolean; + /** + * Shape's text. Read-only. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.ShapeLoadOptions): Visio.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.Shape; + /** + * 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 Visio.Shape object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.ShapeData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.ShapeData): void; + } + /** + * Represents the ShapeView class. + * + * @remarks + * [Api set: 1.1] + */ + class ShapeView 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 highlight around the shape. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: 1.1] + * + * @param OverlayType An Overlay Type. Can be 'Text', 'Image' or 'Html'. + * @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. + * + * @remarks + * [Api set: 1.1] + * + * @param OverlayType An Overlay Type. Can be 'Text', 'Image' or 'Html'. + * @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" | "Html", 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. + * + * @remarks + * [Api set: 1.1] + * + * @param OverlayId An Overlay Id. Removes the specific overlay id from the shape. + */ + removeOverlay(OverlayId: number): void; + /** + * The purpose of SetText API is to update the text inside a visio Shape in run time. The updated text retains the existing formatting properties of the shape's text. + * + * @remarks + * [Api set: 1.1] + * + * @param Text Text parameter is the 'Updated text to display on the shape' + */ + setText(Text: string): void; + /** + * Shows particular overlay on the Shape. + * + * @remarks + * [Api set: 1.1] + * + * @param overlayId overlay id in context + * @param show to show or hide + */ + showOverlay(overlayId: number, show: boolean): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.ShapeViewLoadOptions): Visio.ShapeView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.ShapeView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.ShapeView; + /** + * 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 Visio.ShapeView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeViewData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.ShapeViewData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.ShapeViewData): void; + } + /** + * Represents the Position of the object in the view. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + y: number; + } + /** + * Represents the BoundingBox of the shape. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + width: number; + /** + * An integer that specifies the x-coordinate of the bounding box. + * + * @remarks + * [Api set: 1.1] + */ + x: number; + /** + * An integer that specifies the y-coordinate of the bounding box. + * + * @remarks + * [Api set: 1.1] + */ + y: number; + } + /** + * Represents the highlight data added to the shape. + * + * @remarks + * [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). + * + * @remarks + * [Api set: 1.1] + */ + color: string; + /** + * A positive integer that specifies the width of the highlight's stroke in pixels. + * + * @remarks + * [Api set: 1.1] + */ + width: number; + } + /** + * Represents the ShapeDataItemCollection for a given Shape. + * + * @remarks + * [Api set: 1.1] + */ + class ShapeDataItemCollection 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: Visio.ShapeDataItem[]; + /** + * Gets the number of Shape Data Items. + * + * @remarks + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the ShapeDataItem using its name. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.ShapeDataItemCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.ShapeDataItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.ShapeDataItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.ShapeDataItemCollection; + /** + * 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 `Visio.ShapeDataItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeDataItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Visio.Interfaces.ShapeDataItemCollectionData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.ShapeDataItemCollectionData): void; + } + /** + * Represents the ShapeDataItem. + * + * @remarks + * [Api set: 1.1] + */ + class ShapeDataItem 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 string that specifies the format of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly format: string; + /** + * A string that specifies the formatted value of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly formattedValue: string; + /** + * A string that specifies the label of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly label: string; + /** + * A string that specifies the value of the shape data item. Read-only. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.ShapeDataItemLoadOptions): Visio.ShapeDataItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.ShapeDataItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.ShapeDataItem; + /** + * 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 Visio.ShapeDataItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeDataItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.ShapeDataItemData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.ShapeDataItemData): void; + } + /** + * Represents the Hyperlink Collection. + * + * @remarks + * [Api set: 1.1] + */ + class HyperlinkCollection 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: Visio.Hyperlink[]; + /** + * Gets the number of hyperlinks. + * + * @remarks + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a Hyperlink using its key (name or Id). + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.HyperlinkCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.HyperlinkCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.HyperlinkCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.HyperlinkCollection; + /** + * 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 `Visio.HyperlinkCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.HyperlinkCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Visio.Interfaces.HyperlinkCollectionData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.HyperlinkCollectionData): void; + } + /** + * Represents the Hyperlink. + * + * @remarks + * [Api set: 1.1] + */ + class Hyperlink 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 address of the Hyperlink object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly address: string; + /** + * Gets the description of a hyperlink. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly description: string; + /** + * Gets the extra URL request information used to resolve the hyperlink's URL. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly extraInfo: string; + /** + * Gets the sub-address of the Hyperlink object. Read-only. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.HyperlinkLoadOptions): Visio.Hyperlink; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Hyperlink; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.Hyperlink; + /** + * 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 Visio.Hyperlink object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.HyperlinkData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.HyperlinkData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.HyperlinkData): void; + } + /** + * Represents the CommentCollection for a given Shape. + * + * @remarks + * [Api set: 1.1] + */ + 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: Visio.Comment[]; + /** + * Gets the number of Comments. + * + * @remarks + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the Comment using its name. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.CommentCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.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 `Visio.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Visio.Interfaces.CommentCollectionData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.CommentCollectionData): void; + } + /** + * Represents the Comment. + * + * @remarks + * [Api set: 1.1] + */ + 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; + /** + * A string that specifies the name of the author of the comment. + * + * @remarks + * [Api set: 1.1] + */ + author: string; + /** + * A string that specifies the date when the comment was created. + * + * @remarks + * [Api set: 1.1] + */ + date: string; + /** + * A string that contains the comment text. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.CommentLoadOptions): Visio.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.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 Visio.Comment object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.CommentData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.CommentData): void; + } + /** + * Represents the Selection in the page. + * + * @remarks + * [Api set: 1.1] + */ + class Selection 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 Shapes of the Selection. Read-only. + * + * @remarks + * [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. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Selection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.Selection; + /** + * 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 Visio.Selection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.SelectionData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.SelectionData; + } + /** + * Represents the Collection of Data Visualizer Diagrams. + * + * @remarks + * [Api set: 1.1] + */ + class DataVisualizerDiagramCollection 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: Visio.DataVisualizerDiagram[]; + /** + * Creates new DataVisualizerDiagram object by using the data and settings and add it to the Data Visualizer Diagram collection at the end. + * + * @remarks + * [Api set: 1.1] + * + * @param data Data from which diagram need to be created + * @param settings Custom mappings for creating the diagram + * @returns DataVisualizerDiagram object + */ + add(data: Visio.TabularData, settings: Visio.DataVisualizerSettings): Visio.DataVisualizerDiagram; + /** + * Creates Data Visualizer Diagram from the data and mappings inferred from heuristics. + Data from which diagram need to be createdType of diagram needs to be created + * + * @remarks + * [Api set: 1.1] + * @returns DataVisualizerDiagram object + */ + addPreferred(data: Visio.TabularData, diagramType: Visio.DataVisualizerDiagramType): Visio.DataVisualizerDiagram; + /** + * Creates Data Visualizer Diagram from the data and mappings inferred from heuristics. + Data from which diagram need to be createdType of diagram needs to be created + * + * @remarks + * [Api set: 1.1] + * @returns DataVisualizerDiagram object + */ + addPreferred(data: Visio.TabularData, diagramType: "Unknown" | "BasicFlowchart" | "CrossFunctionalFlowchart_Horizontal" | "CrossFunctionalFlowchart_Vertical" | "Audit" | "OrgChart" | "Network"): Visio.DataVisualizerDiagram; + /** + * Gets the count of Diagrams in the collection. + * + * @remarks + * [Api set: 1.1] + * @returns count of diagram in the collection + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a Diagram using its key (Index). + * + * @remarks + * [Api set: 1.1] + * + * @param key Key is the containerId or Index of the DataVisulaizerDiagram in the collection to be retrieved. + */ + getItem(key: number | string): Visio.DataVisualizerDiagram; + /** + * Returns an item from a collection with the given index. + * + * @remarks + * [Api set: 1.1] + * + * @param index index + * @returns return an object of DataVisualizerDiagram + */ + getItemAt(index: number): Visio.DataVisualizerDiagram; + /** + * Returns an item from a collection with the given key. + * + * @remarks + * [Api set: 1.1] + * + * @param key Can be index (number) or containerID(string) + * @returns return an object of Data Visualizer Diagram or null if the object is not found + */ + getItemOrNullObject(key: number | string): Visio.DataVisualizerDiagram; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.DataVisualizerDiagramCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.DataVisualizerDiagramCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.DataVisualizerDiagramCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.DataVisualizerDiagramCollection; + /** + * 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 `Visio.DataVisualizerDiagramCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.DataVisualizerDiagramCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Visio.Interfaces.DataVisualizerDiagramCollectionData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.DataVisualizerDiagramCollectionData): void; + } + /** + * Represents the Data Visualizer Diagram class. + * + * @remarks + * [Api set: 1.1] + */ + class DataVisualizerDiagram 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 page object that is associated with this diagram object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly page: Visio.Page; + /** + * Return the Header information of the data associated with the diagram. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly dataHeaders: Visio.DataHeader[]; + /** + * Get the Data Visualizer Diagram's Container ID. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly id: number; + /** + * Get the mappings used for creation of the diagram. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly mappings: Visio.DataVisualizerMappings; + /** + * Return the type of diagram. + * + * @remarks + * [Api set: 1.1] + */ + readonly type: Visio.DataVisualizerDiagramType | "Unknown" | "BasicFlowchart" | "CrossFunctionalFlowchart_Horizontal" | "CrossFunctionalFlowchart_Vertical" | "Audit" | "OrgChart" | "Network"; + /** + * 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. + * @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.DataVisualizerDiagramUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Visio.DataVisualizerDiagram): void; + /** + * Delete all the shapes associated to the diagram and the mappings. + * + * @remarks + * [Api set: 1.1] + */ + delete(): void; + /** + * Returns the values in the particular column with the provided header name. + * + * @remarks + * [Api set: 1.1] + * + * @param columnName Represents the column from which values need to be extracted + */ + getDataColumnValuesAsString(columnName: string): OfficeExtension.ClientResult; + /** + * Set the connection to the diagram for refresh and update. + * + * @remarks + * [Api set: 1.1] + * + * @param connectionInfo connection info to link the diagram with data source + */ + setConnection(connectionInfo: Visio.ConnectionInfo): void; + /** + * Updates the data and/or the mappings associated with the diagram. + * + * @remarks + * [Api set: 1.1] + * + * @param data new data with which diagram needs to be updated + * @param mappings new mappings by which diagram needs to be updated + * @param ignoreConflicts if true, ignores any conflict in diagram during update + /** + * Updates the mapping of the diagram. + * + * @remarks + * [Api set: 1.1] + * + * @param mappings new mappings by which diagram needs to be updated + */ + updateMappings(mappings: Visio.DataVisualizerMappings): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.DataVisualizerDiagramLoadOptions): Visio.DataVisualizerDiagram; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.DataVisualizerDiagram; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.DataVisualizerDiagram; + /** + * 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 Visio.DataVisualizerDiagram object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.DataVisualizerDiagramData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.DataVisualizerDiagramData; + /** + * Set mock data + */ + setMockData(data: Visio.Interfaces.DataVisualizerDiagramData): void; + } + /** + * Represents the 2D data from which Data Visualizer Diagram is to be created. + * + * @remarks + * [Api set: 1.1] + */ + interface TabularData { + /** + * List of the headers for the data. + * + * @remarks + * [Api set: 1.1] + */ + headers: Visio.DataHeader[]; + /** + * Name/Title of the data. + * + * @remarks + * [Api set: 1.1] + */ + name: string; + /** + * Range of the data if any, Like for Excel data can be "A5:K10" + * + * @remarks + * [Api set: 1.1] + */ + range: string; + /** + * All Rows data for all the columns. + * + * @remarks + * [Api set: 1.1] + */ + rowValuesAsString: string[][]; + } + /** + * Represents the header of the TabularData . + * + * @remarks + * [Api set: 1.1] + */ + interface DataHeader { + /** + * Gets/sets the type of the column. + * + * @remarks + * [Api set: 1.1] + */ + columnType: Visio.ColumnType | "Unknown" | "String" | "Number" | "Date" | "Currency"; + /** + * Gets/sets the value of the column's header. + * + * @remarks + * [Api set: 1.1] + */ + name: string; + } + /** + * Represents the Connection to associate the data visualizer diagram with source data. + * + * @remarks + * [Api set: 1.1] + */ + interface ConnectionInfo { + /** + * true if data is in table format. + * + * @remarks + * [Api set: 1.1] + */ + isTabularData: boolean; + /** + * Name of the data source. + In case of Excel it is table or range name. + * + * @remarks + * [Api set: 1.1] + */ + sourceName: string; + /** + * File path to the data source. + * + * @remarks + * [Api set: 1.1] + */ + sourcePath: string; + /** + * Data Source type from which the connection need to be created. + * + * @remarks + * [Api set: 1.1] + */ + sourceType: Visio.DataSourceType | "Unknown" | "Excel"; + } + /** + * Represents the Settings for creating the data visualizer diagram. + * + * @remarks + * [Api set: 1.1] + */ + interface DataVisualizerSettings { + /** + * Type of the diagram that is to be created. + * + * @remarks + * [Api set: 1.1] + */ + diagramType: Visio.DataVisualizerDiagramType | "Unknown" | "BasicFlowchart" | "CrossFunctionalFlowchart_Horizontal" | "CrossFunctionalFlowchart_Vertical" | "Audit" | "OrgChart" | "Network"; + /** + * Mappings to be used for DataVisualizer diagram. + * + * @remarks + * [Api set: 1.1] + */ + mappings: Visio.DataVisualizerMappings; + /** + * Universal name of the Master to be used for creating the data visualizer Container. + * + * @remarks + * [Api set: 1.1] + */ + masterNameU: string; + /** + * Name of the Stencil to be used for creating data visualizer diagram. + * + * @remarks + * [Api set: 1.1] + */ + stencilName: string; + } + /** + * Represents the mappings for creating/updating the data visualizer diagram. + * + * @remarks + * [Api set: 1.1] + */ + interface DataVisualizerMappings { + /** + * Cross-Functional Flowchart mappings to draw Data Visualizer Diagram of type Cross Functional Flowchart. + * + * @remarks + * [Api set: 1.1] + */ + cffbinding: Visio.CrossFunctionalFlowchartBinding; + /** + * Connector binding need to be used for drawing the connectors in the diagram. + * + * @remarks + * [Api set: 1.1] + */ + connectorBinding: Visio.ConnectorBinding; + /** + * Layout style to be used for shapes in the diagram + * + * @remarks + * [Api set: 1.1] + */ + layout: Visio.LayoutVariant | "Unknown" | "PageDefault" | "Flowchart_TopToBottom" | "Flowchart_BottomToTop" | "Flowchart_LeftToRight" | "Flowchart_RightToLeft" | "WideTree_DownThenRight" | "WideTree_DownThenLeft" | "WideTree_RightThenDown" | "WideTree_LeftThenDown"; + /** + * Shape binding for creating shapes in the Data Visualizer diagram. + * + * @remarks + * [Api set: 1.1] + */ + shapeBinding: Visio.ShapeBinding; + } + /** + * Shape binding informations required for data visualizer diagram + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeBinding { + /** + * Column for alternative text for shape. + * + * @remarks + * [Api set: 1.1] + */ + alternativeTextColumnName: string; + /** + * Column for Shape label. + * + * @remarks + * [Api set: 1.1] + */ + labelColumnName: string; + /** + * Master mapping for the shapes based on Column for shape type. + * + * @remarks + * [Api set: 1.1] + */ + masterMap: Visio.MasterMap; + /** + * Unique Id column. + * + * @remarks + * [Api set: 1.1] + */ + uniqueIDColumnName: string; + } + /** + * Connector bindings for data visualizer diagram. + * + * @remarks + * [Api set: 1.1] + */ + interface ConnectorBinding { + /** + * If true then connectors are added in sequence according to the uniqueId column. + * + * @remarks + * [Api set: 1.1] + */ + connectSequentially: boolean; + /** + * Delimiter for TargetColumn. It should not have more then one character. + * + * @remarks + * [Api set: 1.1] + */ + delimiter: string; + /** + * Direction of connector to use in diagram. + * + * @remarks + * [Api set: 1.1] + */ + direction: Visio.ConnectorDirection | "FromTarget" | "ToTarget"; + /** + * Column for ConnectorLabel (shape text of connector). + * + * @remarks + * [Api set: 1.1] + */ + labelColumnName: string; + /** + * Master binding for connector. + * + * @remarks + * [Api set: 1.1] + */ + masterMap: Visio.MasterMap; + /** + * Column for proving connected target shape. + * + * @remarks + * [Api set: 1.1] + */ + targetColumnName: string; + } + /** + * Master mapping information for dropping shape in data visualizer diagram. + * + * @remarks + * [Api set: 1.1] + */ + interface MasterMap { + /** + * Default master (universal name) to be used if there is no master specified. + * + * @remarks + * [Api set: 1.1] + */ + defaultMasterNameU: string; + /** + * Default stencil (File name) to be used if there is no master specified. + * + * @remarks + * [Api set: 1.1] + */ + defaultMasterStencilName: string; + /** + * Represents the mapping of master column values with the stencil and master. + * + * @remarks + * [Api set: 1.1] + */ + mappings: Visio.MasterValueMap[]; + /** + * Column name that defines the shape's master. + * + * @remarks + * [Api set: 1.1] + */ + masterColumnName: string; + } + /** + * Represents the mapping of a string value to master of a stencil. + * + * @remarks + * [Api set: 1.1] + */ + interface MasterValueMap { + /** + * Universal name of the master to be mapped. + * + * @remarks + * [Api set: 1.1] + */ + masterNameU: string; + /** + * Name of the stencil + * + * @remarks + * [Api set: 1.1] + */ + stencilName: string; + /** + * Value of the column in the row to be mapped to the master. + * + * @remarks + * [Api set: 1.1] + */ + value: string; + } + /** + * Represents the Cross Functional Flowchart binding for the Cross Functional Flowchart Data Visualizer Diagram. + * + * @remarks + * [Api set: 1.1] + */ + interface CrossFunctionalFlowchartBinding { + /** + * Orientation of the Created Cross Functional Flowchart diagram. + * + * @remarks + * [Api set: 1.1] + */ + orientation: Visio.CrossFunctionalFlowchartOrientation | "Horizontal" | "Vertical"; + /** + * Column for Phases. + * + * @remarks + * [Api set: 1.1] + */ + phaseColumnName: string; + /** + * Order phases as in the data. + * + * @remarks + * [Api set: 1.1] + */ + preservePhaseOrder: boolean; + /** + * Order swimlanes as in the data. + * + * @remarks + * [Api set: 1.1] + */ + preserveSwimlaneOrder: boolean; + /** + * Column for Swimlane. + * + * @remarks + * [Api set: 1.1] + */ + swimlaneColumnName: string; + } + /** + * Represents the error in data for creating/updating the data visualizer diagram. + * + * @remarks + * [Api set: 1.1] + */ + interface DataValidationError { + /** + * Error description string. + * + * @remarks + * [Api set: 1.1] + */ + description: string; + /** + * Name of the column that has error. + If connector column have a value that is not present in the uniqueID column then connector column is the primary error column. + * + * @remarks + * [Api set: 1.1] + */ + primaryColumnName: string; + /** + * List of DataErrorRecords containing information of Rows with in primary column. + * + * @remarks + * [Api set: 1.1] + */ + recordList: Visio.DataErrorRecord[]; + /** + * Column in relation to which primary column is facing validation error + If connector column have a value that is not present in the uniqueID column then uniqueID column is the secondary error column. + * + * @remarks + * [Api set: 1.1] + */ + secondaryColumnName: string; + /** + * Type of validation error. + * + * @remarks + * [Api set: 1.1] + */ + type: Visio.DataValidationErrorType | "None" | "ColumnNotMapped" | "UniqueIdColumnError" | "SwimlaneColumnError" | "DelimiterError" | "ConnectorColumnError" | "ConnectorColumnMappedElsewhere" | "ConnectorLabelColumnMappedElsewhere" | "ConnectorColumnAndConnectorLabelMappedElsewhere"; + } + /** + * Represents the data values that cause the error during data validation. + * + * @remarks + * [Api set: 1.1] + */ + interface DataErrorRecord { + /** + * Value of the column in the row with the validation error. + * + * @remarks + * [Api set: 1.1] + */ + columnValue: string; + /** + * Number of the row causing the validation error. + * + * @remarks + * [Api set: 1.1] + */ + rowNumber: number; + } + /** + * Represents the Horizontal Alignment of the Overlay relative to the shape. + * + * @remarks + * [Api set: 1.1] + */ + enum OverlayHorizontalAlignment { + /** + * left + * @remarks + * [Api set: 1.1] + */ + left = "Left", + /** + * center + * @remarks + * [Api set: 1.1] + */ + center = "Center", + /** + * right + * @remarks + * [Api set: 1.1] + */ + right = "Right", + } + /** + * Represents the Vertical Alignment of the Overlay relative to the shape. + * + * @remarks + * [Api set: 1.1] + */ + enum OverlayVerticalAlignment { + /** + * top + * @remarks + * [Api set: 1.1] + */ + top = "Top", + /** + * middle + * @remarks + * [Api set: 1.1] + */ + middle = "Middle", + /** + * bottom + * @remarks + * [Api set: 1.1] + */ + bottom = "Bottom", + } + /** + * Represents the type of the overlay. + * + * @remarks + * [Api set: 1.1] + */ + enum OverlayType { + /** + * text + * @remarks + * [Api set: 1.1] + */ + text = "Text", + /** + * image + * @remarks + * [Api set: 1.1] + */ + image = "Image", + /** + * html + * @remarks + * [Api set: 1.1] + */ + html = "Html", + } + /** + * Toolbar IDs of the app + * + * @remarks + * [Api set: 1.1] + */ + enum ToolBarType { + /** + * CommandBar + * @remarks + * [Api set: 1.1] + */ + commandBar = "CommandBar", + /** + * PageNavigationBar + * @remarks + * [Api set: 1.1] + */ + pageNavigationBar = "PageNavigationBar", + /** + * StatusBar + * @remarks + * [Api set: 1.1] + */ + statusBar = "StatusBar", + } + /** + * Result of Data Visualizer Diagram operations. + * + * @remarks + * [Api set: 1.1] + */ + enum DataVisualizerDiagramResultType { + /** + * Operation is success. + * @remarks + * [Api set: 1.1] + */ + success = "Success", + /** + * Unexpected error during operation. + * @remarks + * [Api set: 1.1] + */ + unexpected = "Unexpected", + /** + * Validation error in operation. + * @remarks + * [Api set: 1.1] + */ + validationError = "ValidationError", + /** + * Conflict error in operation. + * @remarks + * [Api set: 1.1] + */ + conflictError = "ConflictError", + } + /** + * Type of the Data Visualizer Diagram operation + * + * @remarks + * [Api set: 1.1] + */ + enum DataVisualizerDiagramOperationType { + /** + * unknown operation type. + * @remarks + * [Api set: 1.1] + */ + unknown = "Unknown", + /** + * Creation operation. + * @remarks + * [Api set: 1.1] + */ + create = "Create", + /** + * Update Mappings operation. + * @remarks + * [Api set: 1.1] + */ + updateMappings = "UpdateMappings", + /** + * Update data associated with diagram. + * @remarks + * [Api set: 1.1] + */ + updateData = "UpdateData", + /** + * Update both data and mappings. + * @remarks + * [Api set: 1.1] + */ + update = "Update", + /** + * Delete the diagram content. + * @remarks + * [Api set: 1.1] + */ + delete = "Delete", + } + /** + * DiagramType for Data Visualizer diagrams + * + * @remarks + * [Api set: 1.1] + */ + enum DataVisualizerDiagramType { + /** + * Unknown + * @remarks + * [Api set: 1.1] + */ + unknown = "Unknown", + /** + * Basic Flowchart + * @remarks + * [Api set: 1.1] + */ + basicFlowchart = "BasicFlowchart", + /** + * Horizontal Cross-Functional Flowchart + * @remarks + * [Api set: 1.1] + */ + crossFunctionalFlowchart_Horizontal = "CrossFunctionalFlowchart_Horizontal", + /** + * Vertical Cross-Functional Flowchart + * @remarks + * [Api set: 1.1] + */ + crossFunctionalFlowchart_Vertical = "CrossFunctionalFlowchart_Vertical", + /** + * Audit + * @remarks + * [Api set: 1.1] + */ + audit = "Audit", + /** + * OrgChart + * @remarks + * [Api set: 1.1] + */ + orgChart = "OrgChart", + /** + * Network + * @remarks + * [Api set: 1.1] + */ + network = "Network", + } + /** + * Represents the type of column values. + * + * @remarks + * [Api set: 1.1] + */ + enum ColumnType { + /** + * Other + * @remarks + * [Api set: 1.1] + */ + unknown = "Unknown", + /** + * String values + * @remarks + * [Api set: 1.1] + */ + string = "String", + /** + * Numerical values + * @remarks + * [Api set: 1.1] + */ + number = "Number", + /** + * Date + * @remarks + * [Api set: 1.1] + */ + date = "Date", + /** + * Currency + * @remarks + * [Api set: 1.1] + */ + currency = "Currency", + } + /** + * Represents the type of source for the data connection. + * + * @remarks + * [Api set: 1.1] + */ + enum DataSourceType { + /** + * Unknown Data Source + * @remarks + * [Api set: 1.1] + */ + unknown = "Unknown", + /** + * Microsoft Excel workbook + * @remarks + * [Api set: 1.1] + */ + excel = "Excel", + } + /** + * Represents the orientation of the Cross Functional Flowchart diagram. + * + * @remarks + * [Api set: 1.1] + */ + enum CrossFunctionalFlowchartOrientation { + /** + * Horizontal Cross Functional Flowchart. + * @remarks + * [Api set: 1.1] + */ + horizontal = "Horizontal", + /** + * Vertical Cross Functional Flowchart. + * @remarks + * [Api set: 1.1] + */ + vertical = "Vertical", + } + /** + * Represents the type of layout. + * + * @remarks + * [Api set: 1.1] + */ + enum LayoutVariant { + /** + * Invalid layout + * @remarks + * [Api set: 1.1] + */ + unknown = "Unknown", + /** + * Use the Page default layout + * @remarks + * [Api set: 1.1] + */ + pageDefault = "PageDefault", + /** + * Use Flowchart with TopToBottom orientation + * @remarks + * [Api set: 1.1] + */ + flowchart_TopToBottom = "Flowchart_TopToBottom", + /** + * Use Flowchart with BottomToTop orientation + * @remarks + * [Api set: 1.1] + */ + flowchart_BottomToTop = "Flowchart_BottomToTop", + /** + * Use Flowchart with LeftToRight orientation + * @remarks + * [Api set: 1.1] + */ + flowchart_LeftToRight = "Flowchart_LeftToRight", + /** + * Use Flowchart with RightToLeft orientation + * @remarks + * [Api set: 1.1] + */ + flowchart_RightToLeft = "Flowchart_RightToLeft", + /** + * Use WideTree with DownThenRight orientation + * @remarks + * [Api set: 1.1] + */ + wideTree_DownThenRight = "WideTree_DownThenRight", + /** + * Use WideTree with DownThenLeft orientation + * @remarks + * [Api set: 1.1] + */ + wideTree_DownThenLeft = "WideTree_DownThenLeft", + /** + * Use WideTree with RightThenDown orientation + * @remarks + * [Api set: 1.1] + */ + wideTree_RightThenDown = "WideTree_RightThenDown", + /** + * Use WideTree with LeftThenDown orientation + * @remarks + * [Api set: 1.1] + */ + wideTree_LeftThenDown = "WideTree_LeftThenDown", + } + /** + * Represents the types of data validation error. + * + * @remarks + * [Api set: 1.1] + */ + enum DataValidationErrorType { + /** + * No error + * @remarks + * [Api set: 1.1] + */ + none = "None", + /** + * Data does not have one of the mapped column. + * @remarks + * [Api set: 1.1] + */ + columnNotMapped = "ColumnNotMapped", + /** + * UniqueId column has error. + * @remarks + * [Api set: 1.1] + */ + uniqueIdColumnError = "UniqueIdColumnError", + /** + * Swim-lane column is empty. + * @remarks + * [Api set: 1.1] + */ + swimlaneColumnError = "SwimlaneColumnError", + /** + * Delimiter can not have more then one character. + * @remarks + * [Api set: 1.1] + */ + delimiterError = "DelimiterError", + /** + * Connector column has error + * @remarks + * [Api set: 1.1] + */ + connectorColumnError = "ConnectorColumnError", + /** + * Connector column is already mapped + to another setting + * @remarks + * [Api set: 1.1] + */ + connectorColumnMappedElsewhere = "ConnectorColumnMappedElsewhere", + /** + * Connector label column already mapped + to other setting + * @remarks + * [Api set: 1.1] + */ + connectorLabelColumnMappedElsewhere = "ConnectorLabelColumnMappedElsewhere", + /** + * Connector column and connector label column are + already mapped to other setting. + * @remarks + * [Api set: 1.1] + */ + connectorColumnAndConnectorLabelMappedElsewhere = "ConnectorColumnAndConnectorLabelMappedElsewhere", + } + /** + * Direction of connector in DataVisualizer diagram. + * + * @remarks + * [Api set: 1.1] + */ + enum ConnectorDirection { + /** + * Direction will be from target to source shape. + * @remarks + * [Api set: 1.1] + */ + fromTarget = "FromTarget", + /** + * Direction will be from source to target shape. + * @remarks + * [Api set: 1.1] + */ + toTarget = "ToTarget", + } + /** + * TaskPaneType represents the types of the First Party TaskPanes that are supported by Host through APIs. Used in case of Show TaskPane API/ TaskPane State Changed Event etc + * + * @remarks + * [Api set: 1.1] + */ + enum TaskPaneType { + /** + * None Type + * @remarks + * [Api set: 1.1] + */ + none = "None", + /** + * Data Visualizer Process Mapping Pane + * @remarks + * [Api set: 1.1] + */ + dataVisualizerProcessMappings = "DataVisualizerProcessMappings", + /** + * Data Visualizer Organisation Mapping Pane + * @remarks + * [Api set: 1.1] + */ + dataVisualizerOrgChartMappings = "DataVisualizerOrgChartMappings", + } + /** + * MessageType represents the type of message when event is fired from Host + * + * @remarks + * [Api set: 1.1] + */ + const enum MessageType { + /** + * None Type + * @remarks + * [Api set: 1.1] + */ + none = 0, + /** + * DataVisualizer diagram operation complete Event Message + * @remarks + * [Api set: 1.1] + */ + dataVisualizerDiagramOperationCompletedEvent = 1, + } + /** + * EventType represents the type of the events Host supports + * + * @remarks + * [Api set: 1.1] + */ + enum EventType { + /** + * DataVisualizer diagram operation complete Event + * @remarks + * [Api set: 1.1] + */ + dataVisualizerDiagramOperationCompleted = "DataVisualizerDiagramOperationCompleted", + } + 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. + * + * @remarks + * [Api set: 1.1] + */ + showBorders?: boolean; + /** + * Show or hide the standard toolbars. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + application?: Visio.Interfaces.ApplicationUpdateData; + /** + * Returns the DocumentView object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + disableHyperlinks?: boolean; + /** + * Disable Pan. + * + * @remarks + * [Api set: 1.1] + */ + disablePan?: boolean; + /** + * Disable PanZoomWindow. + * + * @remarks + * [Api set: 1.1] + */ + disablePanZoomWindow?: boolean; + /** + * Disable Zoom. + * + * @remarks + * [Api set: 1.1] + */ + disableZoom?: boolean; + /** + * Hide Diagram Boundary. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.ShapeViewUpdateData; + /** + * Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + author?: string; + /** + * A string that specifies the date when the comment was created. + * + * @remarks + * [Api set: 1.1] + */ + date?: string; + /** + * A string that contains the comment text. + * + * @remarks + * [Api set: 1.1] + */ + text?: string; + } + /** An interface for updating data on the DataVisualizerDiagramCollection object, for use in `dataVisualizerDiagramCollection.set({ ... })`. */ + interface DataVisualizerDiagramCollectionUpdateData { + items?: Visio.Interfaces.DataVisualizerDiagramData[]; + } + /** An interface for updating data on the DataVisualizerDiagram object, for use in `dataVisualizerDiagram.set({ ... })`. */ + interface DataVisualizerDiagramUpdateData { + /** + * Returns the page object that is associated with this diagram object. + * + * @remarks + * [Api set: 1.1] + */ + page?: Visio.Interfaces.PageUpdateData; + } + /** An interface describing the data returned by calling `application.toJSON()`. */ + interface ApplicationData { + /** + * Show or hide the iFrame application borders. + * + * @remarks + * [Api set: 1.1] + */ + showBorders?: boolean; + /** + * Show or hide the standard toolbars. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + application?: Visio.Interfaces.ApplicationData; + /** + * Represents a collection of pages associated with the document. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + pages?: Visio.Interfaces.PageData[]; + /** + * Returns the DocumentView object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.DocumentViewData; + } + /** An interface describing the data returned by calling `documentView.toJSON()`. */ + interface DocumentViewData { + /** + * Disable Hyperlinks. + * + * @remarks + * [Api set: 1.1] + */ + disableHyperlinks?: boolean; + /** + * Disable Pan. + * + * @remarks + * [Api set: 1.1] + */ + disablePan?: boolean; + /** + * Disable PanZoomWindow. + * + * @remarks + * [Api set: 1.1] + */ + disablePanZoomWindow?: boolean; + /** + * Disable Zoom. + * + * @remarks + * [Api set: 1.1] + */ + disableZoom?: boolean; + /** + * Hide Diagram Boundary. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + allShapes?: Visio.Interfaces.ShapeData[]; + /** + * Returns the Comments Collection. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + comments?: Visio.Interfaces.CommentData[]; + /** + * All Data Visualizer Diagrams on the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + dataVisualizerDiagrams?: Visio.Interfaces.DataVisualizerDiagramData[]; + /** + * All top-level shapes in the Page.Read-only. + * + * @remarks + * [Api set: 1.1] + */ + shapes?: Visio.Interfaces.ShapeData[]; + /** + * Returns the view of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.PageViewData; + /** + * Returns the height of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + height?: number; + /** + * Index of the Page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + index?: number; + /** + * Whether the page is a background page or not. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + isBackground?: boolean; + /** + * Page name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + name?: string; + /** + * Returns the width of the page. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + comments?: Visio.Interfaces.CommentData[]; + /** + * Returns the Hyperlinks collection for a Shape object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + hyperlinks?: Visio.Interfaces.HyperlinkData[]; + /** + * Returns the Shape's Data Section. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + shapeDataItems?: Visio.Interfaces.ShapeDataItemData[]; + /** + * Gets SubShape Collection. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + subShapes?: Visio.Interfaces.ShapeData[]; + /** + * Returns the view of the shape. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.ShapeViewData; + /** + * Shape's identifier. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + id?: number; + /** + * Returns true if the shape is bound to data and is part of Data Visualizer diagram. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + isBoundToData?: boolean; + /** + * Shape's name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + name?: string; + /** + * Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * @remarks + * [Api set: 1.1] + */ + select?: boolean; + /** + * Shape's text. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling `shapeView.toJSON()`. */ + interface ShapeViewData { + /** + * Represents the highlight around the shape. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + format?: string; + /** + * A string that specifies the formatted value of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + formattedValue?: string; + /** + * A string that specifies the label of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + label?: string; + /** + * A string that specifies the value of the shape data item. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + address?: string; + /** + * Gets the description of a hyperlink. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + description?: string; + /** + * Gets the extra URL request information used to resolve the hyperlink's URL. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + extraInfo?: string; + /** + * Gets the sub-address of the Hyperlink object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + author?: string; + /** + * A string that specifies the date when the comment was created. + * + * @remarks + * [Api set: 1.1] + */ + date?: string; + /** + * A string that contains the comment text. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + shapes?: Visio.Interfaces.ShapeData[]; + } + /** An interface describing the data returned by calling `dataVisualizerDiagramCollection.toJSON()`. */ + interface DataVisualizerDiagramCollectionData { + items?: Visio.Interfaces.DataVisualizerDiagramData[]; + } + /** An interface describing the data returned by calling `dataVisualizerDiagram.toJSON()`. */ + interface DataVisualizerDiagramData { + /** + * Returns the page object that is associated with this diagram object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + page?: Visio.Interfaces.PageData; + /** + * Return the Header information of the data associated with the diagram. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + dataHeaders?: Visio.DataHeader[]; + /** + * Get the Data Visualizer Diagram's Container ID. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + id?: number; + /** + * Get the mappings used for creation of the diagram. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + mappings?: Visio.DataVisualizerMappings; + /** + * Return the type of diagram. + * + * @remarks + * [Api set: 1.1] + */ + type?: Visio.DataVisualizerDiagramType | "Unknown" | "BasicFlowchart" | "CrossFunctionalFlowchart_Horizontal" | "CrossFunctionalFlowchart_Vertical" | "Audit" | "OrgChart" | "Network"; + } + /** + * Represents the Application. + * + * @remarks + * [Api set: 1.1] + */ + interface ApplicationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Show or hide the iFrame application borders. + * + * @remarks + * [Api set: 1.1] + */ + showBorders?: boolean; + /** + * Show or hide the standard toolbars. + * + * @remarks + * [Api set: 1.1] + */ + showToolbars?: boolean; + } + /** + * Represents the Document class. + * + * @remarks + * [Api set: 1.1] + */ + interface DocumentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents a Visio application instance that contains this document. + * + * @remarks + * [Api set: 1.1] + */ + application?: Visio.Interfaces.ApplicationLoadOptions; + /** + * Returns the DocumentView object. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.DocumentViewLoadOptions; + } + /** + * Represents the DocumentView class. + * + * @remarks + * [Api set: 1.1] + */ + interface DocumentViewLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Disable Hyperlinks. + * + * @remarks + * [Api set: 1.1] + */ + disableHyperlinks?: boolean; + /** + * Disable Pan. + * + * @remarks + * [Api set: 1.1] + */ + disablePan?: boolean; + /** + * Disable PanZoomWindow. + * + * @remarks + * [Api set: 1.1] + */ + disablePanZoomWindow?: boolean; + /** + * Disable Zoom. + * + * @remarks + * [Api set: 1.1] + */ + disableZoom?: boolean; + /** + * Hide Diagram Boundary. + * + * @remarks + * [Api set: 1.1] + */ + hideDiagramBoundary?: boolean; + } + /** + * Represents the Page class. + * + * @remarks + * [Api set: 1.1] + */ + interface PageLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the view of the page. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.PageViewLoadOptions; + /** + * Returns the height of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + height?: boolean; + /** + * Index of the Page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + index?: boolean; + /** + * Whether the page is a background page or not. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + isBackground?: boolean; + /** + * Page name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + name?: boolean; + /** + * Returns the width of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + width?: boolean; + } + /** + * Represents the PageView class. + * + * @remarks + * [Api set: 1.1] + */ + interface PageViewLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Get and set Page's Zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. + * + * @remarks + * [Api set: 1.1] + */ + zoom?: boolean; + } + /** + * Represents a collection of Page objects that are part of the document. + * + * @remarks + * [Api set: 1.1] + */ + interface PageCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the view of the page. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.PageViewLoadOptions; + /** + * For EACH ITEM in the collection: Returns the height of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Index of the Page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Whether the page is a background page or not. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + isBackground?: boolean; + /** + * For EACH ITEM in the collection: Page name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Returns the width of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + width?: boolean; + } + /** + * Represents the Shape Collection. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the view of the shape. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.ShapeViewLoadOptions; + /** + * For EACH ITEM in the collection: Shape's identifier. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Returns true if the shape is bound to data and is part of Data Visualizer diagram. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + isBoundToData?: boolean; + /** + * For EACH ITEM in the collection: Shape's name. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + select?: boolean; + /** + * For EACH ITEM in the collection: Shape's text. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + text?: boolean; + } + /** + * Represents the Shape class. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the view of the shape. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.ShapeViewLoadOptions; + /** + * Shape's identifier. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + id?: boolean; + /** + * Returns true if the shape is bound to data and is part of Data Visualizer diagram. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + isBoundToData?: boolean; + /** + * Shape's name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + name?: boolean; + /** + * Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * @remarks + * [Api set: 1.1] + */ + select?: boolean; + /** + * Shape's text. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + text?: boolean; + } + /** + * Represents the ShapeView class. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeViewLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the highlight around the shape. + * + * @remarks + * [Api set: 1.1] + */ + highlight?: boolean; + } + /** + * Represents the ShapeDataItemCollection for a given Shape. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeDataItemCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: A string that specifies the format of the shape data item. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + value?: boolean; + } + /** + * Represents the ShapeDataItem. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeDataItemLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * A string that specifies the format of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + format?: boolean; + /** + * A string that specifies the formatted value of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + formattedValue?: boolean; + /** + * A string that specifies the label of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + label?: boolean; + /** + * A string that specifies the value of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + value?: boolean; + } + /** + * Represents the Hyperlink Collection. + * + * @remarks + * [Api set: 1.1] + */ + interface HyperlinkCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the address of the Hyperlink object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + address?: boolean; + /** + * For EACH ITEM in the collection: Gets the description of a hyperlink. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + extraInfo?: boolean; + /** + * For EACH ITEM in the collection: Gets the sub-address of the Hyperlink object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + subAddress?: boolean; + } + /** + * Represents the Hyperlink. + * + * @remarks + * [Api set: 1.1] + */ + interface HyperlinkLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the address of the Hyperlink object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + address?: boolean; + /** + * Gets the description of a hyperlink. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + description?: boolean; + /** + * Gets the extra URL request information used to resolve the hyperlink's URL. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + extraInfo?: boolean; + /** + * Gets the sub-address of the Hyperlink object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + subAddress?: boolean; + } + /** + * Represents the CommentCollection for a given Shape. + * + * @remarks + * [Api set: 1.1] + */ + interface CommentCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: A string that specifies the name of the author of the comment. + * + * @remarks + * [Api set: 1.1] + */ + author?: boolean; + /** + * For EACH ITEM in the collection: A string that specifies the date when the comment was created. + * + * @remarks + * [Api set: 1.1] + */ + date?: boolean; + /** + * For EACH ITEM in the collection: A string that contains the comment text. + * + * @remarks + * [Api set: 1.1] + */ + text?: boolean; + } + /** + * Represents the Comment. + * + * @remarks + * [Api set: 1.1] + */ + interface CommentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * A string that specifies the name of the author of the comment. + * + * @remarks + * [Api set: 1.1] + */ + author?: boolean; + /** + * A string that specifies the date when the comment was created. + * + * @remarks + * [Api set: 1.1] + */ + date?: boolean; + /** + * A string that contains the comment text. + * + * @remarks + * [Api set: 1.1] + */ + text?: boolean; + } + /** + * Represents the Collection of Data Visualizer Diagrams. + * + * @remarks + * [Api set: 1.1] + */ + interface DataVisualizerDiagramCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the page object that is associated with this diagram object. + * + * @remarks + * [Api set: 1.1] + */ + page?: Visio.Interfaces.PageLoadOptions; + /** + * For EACH ITEM in the collection: Return the Header information of the data associated with the diagram. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + dataHeaders?: boolean; + /** + * For EACH ITEM in the collection: Get the Data Visualizer Diagram's Container ID. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Get the mappings used for creation of the diagram. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + mappings?: boolean; + /** + * For EACH ITEM in the collection: Return the type of diagram. + * + * @remarks + * [Api set: 1.1] + */ + type?: boolean; + } + /** + * Represents the Data Visualizer Diagram class. + * + * @remarks + * [Api set: 1.1] + */ + interface DataVisualizerDiagramLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the page object that is associated with this diagram object. + * + * @remarks + * [Api set: 1.1] + */ + page?: Visio.Interfaces.PageLoadOptions; + /** + * Return the Header information of the data associated with the diagram. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + dataHeaders?: boolean; + /** + * Get the Data Visualizer Diagram's Container ID. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + id?: boolean; + /** + * Get the mappings used for creation of the diagram. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + mappings?: boolean; + /** + * Return the type of diagram. + * + * @remarks + * [Api set: 1.1] + */ + type?: 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 OfficeCore.RequestContext { + 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 /////////////////////////// +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// +//////////////////// Begin PowerPoint APIs ///////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace PowerPoint { + /** + * @remarks + * [Api set: PowerPointApi 1.0] + */ + 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; + insertHyperLink(address: string, displayName: string): void; + /** + * Insert slide from the content. + * + * @remarks + * [Api set: PowerPointApi 1.1] + * + * @param slideContent Required. Slide(Open Office XML format) content to be inserted. + * @returns The success/failure code from the insert slide activity + */ + insertSlideFromContent(slideContent: string): OfficeExtension.ClientResult; + /** + * Create a new instance of PowerPoint.Application object + */ + static newObject(context: OfficeExtension.ClientRequestContext): PowerPoint.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 PowerPoint.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * @remarks + * [Api set: PowerPointApi 1.0] + */ + class Presentation 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 collection of `SlideMaster` objects that are in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly slideMasters: PowerPoint.SlideMasterCollection; + /** + * Returns an ordered collection of slides in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + readonly slides: PowerPoint.SlideCollection; + /** + * Returns a collection of tags attached to the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly tags: PowerPoint.TagCollection; + readonly title: string; + /** + * Returns the selected shapes in the current slide of the presentation. + If no shapes are selected, an empty collection is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getSelectedShapes(): PowerPoint.ShapeScopedCollection; + /** + * Returns the selected slides in the current view of the presentation. + The first item in the collection is the active slide that is visible in the editing area. + If no slides are selected, an empty collection is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getSelectedSlides(): PowerPoint.SlideScopedCollection; + /** + * Returns the selected {@link PowerPoint.TextRange} in the current view of the presentation. + Throws an exception if no text is selected. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getSelectedTextRange(): PowerPoint.TextRange; + /** + * Returns the selected {@link PowerPoint.TextRange} in the current view of the presentation. + If no text is selected, an object with an `isNullObject` property set to `true` is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getSelectedTextRangeOrNullObject(): PowerPoint.TextRange; + /** + * Inserts the specified slides from a presentation into the current presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + * + * @param base64File The base64-encoded string representing the source presentation file. + * @param options The options that define which slides will be inserted, where the new slides will go, and which presentation's formatting will be used. + */ + insertSlidesFromBase64(base64File: string, options?: PowerPoint.InsertSlideOptions): void; + /** + * Selects the slides in the current view of the presentation. Existing slide selection is replaced with the new selection. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param slideIds List of slide IDs to select in the presentation. If the list is empty, selection is cleared. + */ + setSelectedSlides(slideIds: string[]): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.PresentationLoadOptions): PowerPoint.Presentation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.Presentation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.Presentation; + /** + * 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 PowerPoint.Presentation object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.PresentationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.PresentationData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.PresentationData): void; + } + /** + * @remarks + * [Api set: PowerPointApi 1.1] + */ + const enum InsertSlideReturnCode { + /** + * @remarks + * [Api set: PowerPointApi 1.1] + */ + ok = 0, + /** + * @remarks + * [Api set: PowerPointApi 1.1] + */ + error_Exception = 10000, + /** + * @remarks + * [Api set: PowerPointApi 1.1] + */ + error_InvalidArgument = 10001, + /** + * @remarks + * [Api set: PowerPointApi 1.1] + */ + error_InsertContent = 10002, + /** + * @remarks + * [Api set: PowerPointApi 1.1] + */ + error_NotImplemented = 10003, + /** + * @remarks + * [Api set: PowerPointApi 1.1] + */ + error_CantGetUIContext = 10004, + /** + * @remarks + * [Api set: PowerPointApi 1.1] + */ + error_Max = 20000, + } + /** + * Represents the available options when adding a new slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface AddSlideOptions { + /** + * Specifies the ID of a Slide Layout to be used for the new slide. + If no `layoutId` is provided, but a `slideMasterId` is provided, then the ID of the first layout from the specified Slide Master will be used. + If no `slideMasterId` is provided, but a `layoutId` is provided, then the specified layout needs to be available for the default Slide Master (as specified + in the `slideMasterId` description). Otherwise, an error will be thrown. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + layoutId?: string; + /** + * Specifies the ID of a Slide Master to be used for the new slide. + If no `slideMasterId` is provided, then the previous slide's Slide Master will be used. + If there is no previous slide, then the presentation's first Slide Master will be used. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + slideMasterId?: string; + } + /** + * Represents the bullet formatting properties of a text that is attached to the {@link PowerPoint.ParagraphFormat}. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + class BulletFormat 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; + /** + * Specifies if the bullets in the paragraph are visible. Returns 'null' if the 'TextRange' includes text fragments with different bullet visibility values. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible: boolean; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.BulletFormatLoadOptions): PowerPoint.BulletFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.BulletFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.BulletFormat; + /** + * 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 PowerPoint.BulletFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.BulletFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.BulletFormatData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.BulletFormatData): void; + } + /** + * Specifies the connector type for line shapes. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ConnectorType { + /** + * Straight connector type + * @remarks + * [Api set: PowerPointApi 1.4] + */ + straight = "Straight", + /** + * Elbow connector type + * @remarks + * [Api set: PowerPointApi 1.4] + */ + elbow = "Elbow", + /** + * Curve connector type + * @remarks + * [Api set: PowerPointApi 1.4] + */ + curve = "Curve", + } + /** + * Specifies the shape type for a `GeometricShape` object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum GeometricShapeType { + /** + * Straight Line from Top-Right Corner to Bottom-Left Corner of the Shape + * @remarks + * [Api set: PowerPointApi 1.4] + */ + lineInverse = "LineInverse", + /** + * Isosceles Triangle + * @remarks + * [Api set: PowerPointApi 1.4] + */ + triangle = "Triangle", + /** + * Right Triangle + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightTriangle = "RightTriangle", + /** + * Rectangle + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rectangle = "Rectangle", + /** + * Diamond + * @remarks + * [Api set: PowerPointApi 1.4] + */ + diamond = "Diamond", + /** + * Parallelogram + * @remarks + * [Api set: PowerPointApi 1.4] + */ + parallelogram = "Parallelogram", + /** + * Trapezoid + * @remarks + * [Api set: PowerPointApi 1.4] + */ + trapezoid = "Trapezoid", + /** + * Trapezoid which may have Non-Equal Sides + * @remarks + * [Api set: PowerPointApi 1.4] + */ + nonIsoscelesTrapezoid = "NonIsoscelesTrapezoid", + /** + * Pentagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + pentagon = "Pentagon", + /** + * Hexagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + hexagon = "Hexagon", + /** + * Heptagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + heptagon = "Heptagon", + /** + * Octagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + octagon = "Octagon", + /** + * Decagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + decagon = "Decagon", + /** + * Dodecagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dodecagon = "Dodecagon", + /** + * Star: 4 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star4 = "Star4", + /** + * Star: 5 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star5 = "Star5", + /** + * Star: 6 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star6 = "Star6", + /** + * Star: 7 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star7 = "Star7", + /** + * Star: 8 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star8 = "Star8", + /** + * Star: 10 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star10 = "Star10", + /** + * Star: 12 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star12 = "Star12", + /** + * Star: 16 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star16 = "Star16", + /** + * Star: 24 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star24 = "Star24", + /** + * Star: 32 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star32 = "Star32", + /** + * Rectangle: Rounded Corners + * @remarks + * [Api set: PowerPointApi 1.4] + */ + roundRectangle = "RoundRectangle", + /** + * Rectangle: Single Corner Rounded + * @remarks + * [Api set: PowerPointApi 1.4] + */ + round1Rectangle = "Round1Rectangle", + /** + * Rectangle: Top Corners Rounded + * @remarks + * [Api set: PowerPointApi 1.4] + */ + round2SameRectangle = "Round2SameRectangle", + /** + * Rectangle: Diagonal Corners Rounded + * @remarks + * [Api set: PowerPointApi 1.4] + */ + round2DiagonalRectangle = "Round2DiagonalRectangle", + /** + * Rectangle: Top Corners One Rounded and One Snipped + * @remarks + * [Api set: PowerPointApi 1.4] + */ + snipRoundRectangle = "SnipRoundRectangle", + /** + * Rectangle: Single Corner Snipped + * @remarks + * [Api set: PowerPointApi 1.4] + */ + snip1Rectangle = "Snip1Rectangle", + /** + * Rectangle: Top Corners Snipped + * @remarks + * [Api set: PowerPointApi 1.4] + */ + snip2SameRectangle = "Snip2SameRectangle", + /** + * Rectangle: Diagonal Corners Snipped + * @remarks + * [Api set: PowerPointApi 1.4] + */ + snip2DiagonalRectangle = "Snip2DiagonalRectangle", + /** + * Plaque + * @remarks + * [Api set: PowerPointApi 1.4] + */ + plaque = "Plaque", + /** + * Oval + * @remarks + * [Api set: PowerPointApi 1.4] + */ + ellipse = "Ellipse", + /** + * Teardrop + * @remarks + * [Api set: PowerPointApi 1.4] + */ + teardrop = "Teardrop", + /** + * Arrow: Pentagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + homePlate = "HomePlate", + /** + * Arrow: Chevron + * @remarks + * [Api set: PowerPointApi 1.4] + */ + chevron = "Chevron", + /** + * Partial Circle + * @remarks + * [Api set: PowerPointApi 1.4] + */ + pieWedge = "PieWedge", + /** + * Partial Circle with Adjustable Spanning Area + * @remarks + * [Api set: PowerPointApi 1.4] + */ + pie = "Pie", + /** + * Block Arc + * @remarks + * [Api set: PowerPointApi 1.4] + */ + blockArc = "BlockArc", + /** + * Circle: Hollow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + donut = "Donut", + /** + * "Not Allowed" Symbol + * @remarks + * [Api set: PowerPointApi 1.4] + */ + noSmoking = "NoSmoking", + /** + * Arrow: Right + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightArrow = "RightArrow", + /** + * Arrow: Left + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftArrow = "LeftArrow", + /** + * Arrow: Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + upArrow = "UpArrow", + /** + * Arrow: Down + * @remarks + * [Api set: PowerPointApi 1.4] + */ + downArrow = "DownArrow", + /** + * Arrow: Striped Right + * @remarks + * [Api set: PowerPointApi 1.4] + */ + stripedRightArrow = "StripedRightArrow", + /** + * Arrow: Notched Right + * @remarks + * [Api set: PowerPointApi 1.4] + */ + notchedRightArrow = "NotchedRightArrow", + /** + * Arrow: Bent-Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bentUpArrow = "BentUpArrow", + /** + * Arrow: Left-Right + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftRightArrow = "LeftRightArrow", + /** + * Arrow: Up-Down + * @remarks + * [Api set: PowerPointApi 1.4] + */ + upDownArrow = "UpDownArrow", + /** + * Arrow: Left-Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftUpArrow = "LeftUpArrow", + /** + * Arrow: Left-Right-Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftRightUpArrow = "LeftRightUpArrow", + /** + * Arrow: Quad + * @remarks + * [Api set: PowerPointApi 1.4] + */ + quadArrow = "QuadArrow", + /** + * Callout: Left Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftArrowCallout = "LeftArrowCallout", + /** + * Callout: Right Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightArrowCallout = "RightArrowCallout", + /** + * Callout: Up Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + upArrowCallout = "UpArrowCallout", + /** + * Callout: Down Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + downArrowCallout = "DownArrowCallout", + /** + * Callout: Left-Right Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftRightArrowCallout = "LeftRightArrowCallout", + /** + * Callout: Up-Down Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + upDownArrowCallout = "UpDownArrowCallout", + /** + * Callout: Quad Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + quadArrowCallout = "QuadArrowCallout", + /** + * Arrow: Bent + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bentArrow = "BentArrow", + /** + * Arrow: U-Turn + * @remarks + * [Api set: PowerPointApi 1.4] + */ + uturnArrow = "UturnArrow", + /** + * Arrow: Circular + * @remarks + * [Api set: PowerPointApi 1.4] + */ + circularArrow = "CircularArrow", + /** + * Arrow: Circular with Opposite Arrow Direction + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftCircularArrow = "LeftCircularArrow", + /** + * Arrow: Circular with Two Arrows in Both Directions + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftRightCircularArrow = "LeftRightCircularArrow", + /** + * Arrow: Curved Right + * @remarks + * [Api set: PowerPointApi 1.4] + */ + curvedRightArrow = "CurvedRightArrow", + /** + * Arrow: Curved Left + * @remarks + * [Api set: PowerPointApi 1.4] + */ + curvedLeftArrow = "CurvedLeftArrow", + /** + * Arrow: Curved Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + curvedUpArrow = "CurvedUpArrow", + /** + * Arrow: Curved Down + * @remarks + * [Api set: PowerPointApi 1.4] + */ + curvedDownArrow = "CurvedDownArrow", + /** + * Arrow: Curved Right Arrow with Varying Width + * @remarks + * [Api set: PowerPointApi 1.4] + */ + swooshArrow = "SwooshArrow", + /** + * Cube + * @remarks + * [Api set: PowerPointApi 1.4] + */ + cube = "Cube", + /** + * Cylinder + * @remarks + * [Api set: PowerPointApi 1.4] + */ + can = "Can", + /** + * Lightning Bolt + * @remarks + * [Api set: PowerPointApi 1.4] + */ + lightningBolt = "LightningBolt", + /** + * Heart + * @remarks + * [Api set: PowerPointApi 1.4] + */ + heart = "Heart", + /** + * Sun + * @remarks + * [Api set: PowerPointApi 1.4] + */ + sun = "Sun", + /** + * Moon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + moon = "Moon", + /** + * Smiley Face + * @remarks + * [Api set: PowerPointApi 1.4] + */ + smileyFace = "SmileyFace", + /** + * Explosion: 8 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + irregularSeal1 = "IrregularSeal1", + /** + * Explosion: 14 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + irregularSeal2 = "IrregularSeal2", + /** + * Rectangle: Folded Corner + * @remarks + * [Api set: PowerPointApi 1.4] + */ + foldedCorner = "FoldedCorner", + /** + * Rectangle: Beveled + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bevel = "Bevel", + /** + * Frame + * @remarks + * [Api set: PowerPointApi 1.4] + */ + frame = "Frame", + /** + * Half Frame + * @remarks + * [Api set: PowerPointApi 1.4] + */ + halfFrame = "HalfFrame", + /** + * L-Shape + * @remarks + * [Api set: PowerPointApi 1.4] + */ + corner = "Corner", + /** + * Diagonal Stripe + * @remarks + * [Api set: PowerPointApi 1.4] + */ + diagonalStripe = "DiagonalStripe", + /** + * Chord + * @remarks + * [Api set: PowerPointApi 1.4] + */ + chord = "Chord", + /** + * Arc + * @remarks + * [Api set: PowerPointApi 1.4] + */ + arc = "Arc", + /** + * Left Bracket + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftBracket = "LeftBracket", + /** + * Right Bracket + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightBracket = "RightBracket", + /** + * Left Brace + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftBrace = "LeftBrace", + /** + * Right Brace + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightBrace = "RightBrace", + /** + * Double Bracket + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bracketPair = "BracketPair", + /** + * Double Brace + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bracePair = "BracePair", + /** + * Callout: Line with No Border + * @remarks + * [Api set: PowerPointApi 1.4] + */ + callout1 = "Callout1", + /** + * Callout: Bent Line with No Border + * @remarks + * [Api set: PowerPointApi 1.4] + */ + callout2 = "Callout2", + /** + * Callout: Double Bent Line with No Border + * @remarks + * [Api set: PowerPointApi 1.4] + */ + callout3 = "Callout3", + /** + * Callout: Line with Accent Bar + * @remarks + * [Api set: PowerPointApi 1.4] + */ + accentCallout1 = "AccentCallout1", + /** + * Callout: Bent Line with Accent Bar + * @remarks + * [Api set: PowerPointApi 1.4] + */ + accentCallout2 = "AccentCallout2", + /** + * Callout: Double Bent Line with Accent Bar + * @remarks + * [Api set: PowerPointApi 1.4] + */ + accentCallout3 = "AccentCallout3", + /** + * Callout: Line + * @remarks + * [Api set: PowerPointApi 1.4] + */ + borderCallout1 = "BorderCallout1", + /** + * Callout: Bent Line + * @remarks + * [Api set: PowerPointApi 1.4] + */ + borderCallout2 = "BorderCallout2", + /** + * Callout: Double Bent Line + * @remarks + * [Api set: PowerPointApi 1.4] + */ + borderCallout3 = "BorderCallout3", + /** + * Callout: Line with Border and Accent Bar + * @remarks + * [Api set: PowerPointApi 1.4] + */ + accentBorderCallout1 = "AccentBorderCallout1", + /** + * Callout: Bent Line with Border and Accent Bar + * @remarks + * [Api set: PowerPointApi 1.4] + */ + accentBorderCallout2 = "AccentBorderCallout2", + /** + * Callout: Double Bent Line with Border and Accent Bar + * @remarks + * [Api set: PowerPointApi 1.4] + */ + accentBorderCallout3 = "AccentBorderCallout3", + /** + * Speech Bubble: Rectangle + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wedgeRectCallout = "WedgeRectCallout", + /** + * Speech Bubble: Rectangle with Corners Rounded + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wedgeRRectCallout = "WedgeRRectCallout", + /** + * Speech Bubble: Oval + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wedgeEllipseCallout = "WedgeEllipseCallout", + /** + * Thought Bubble: Cloud + * @remarks + * [Api set: PowerPointApi 1.4] + */ + cloudCallout = "CloudCallout", + /** + * Cloud + * @remarks + * [Api set: PowerPointApi 1.4] + */ + cloud = "Cloud", + /** + * Ribbon: Tilted Down + * @remarks + * [Api set: PowerPointApi 1.4] + */ + ribbon = "Ribbon", + /** + * Ribbon: Tilted Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + ribbon2 = "Ribbon2", + /** + * Ribbon: Curved and Tilted Down + * @remarks + * [Api set: PowerPointApi 1.4] + */ + ellipseRibbon = "EllipseRibbon", + /** + * Ribbon: Curved and Tilted Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + ellipseRibbon2 = "EllipseRibbon2", + /** + * Ribbon: Straight with Both Left and Right Arrows + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftRightRibbon = "LeftRightRibbon", + /** + * Scroll: Vertical + * @remarks + * [Api set: PowerPointApi 1.4] + */ + verticalScroll = "VerticalScroll", + /** + * Scroll: Horizontal + * @remarks + * [Api set: PowerPointApi 1.4] + */ + horizontalScroll = "HorizontalScroll", + /** + * Wave + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wave = "Wave", + /** + * Double Wave + * @remarks + * [Api set: PowerPointApi 1.4] + */ + doubleWave = "DoubleWave", + /** + * Cross + * @remarks + * [Api set: PowerPointApi 1.4] + */ + plus = "Plus", + /** + * Flowchart: Process + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartProcess = "FlowChartProcess", + /** + * Flowchart: Decision + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartDecision = "FlowChartDecision", + /** + * Flowchart: Data + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartInputOutput = "FlowChartInputOutput", + /** + * Flowchart: Predefined Process + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartPredefinedProcess = "FlowChartPredefinedProcess", + /** + * Flowchart: Internal Storage + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartInternalStorage = "FlowChartInternalStorage", + /** + * Flowchart: Document + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartDocument = "FlowChartDocument", + /** + * Flowchart: Multidocument + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartMultidocument = "FlowChartMultidocument", + /** + * Flowchart: Terminator + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartTerminator = "FlowChartTerminator", + /** + * Flowchart: Preparation + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartPreparation = "FlowChartPreparation", + /** + * Flowchart: Manual Input + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartManualInput = "FlowChartManualInput", + /** + * Flowchart: Manual Operation + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartManualOperation = "FlowChartManualOperation", + /** + * Flowchart: Connector + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartConnector = "FlowChartConnector", + /** + * Flowchart: Card + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartPunchedCard = "FlowChartPunchedCard", + /** + * Flowchart: Punched Tape + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartPunchedTape = "FlowChartPunchedTape", + /** + * Flowchart: Summing Junction + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartSummingJunction = "FlowChartSummingJunction", + /** + * Flowchart: Or + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartOr = "FlowChartOr", + /** + * Flowchart: Collate + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartCollate = "FlowChartCollate", + /** + * Flowchart: Sort + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartSort = "FlowChartSort", + /** + * Flowchart: Extract + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartExtract = "FlowChartExtract", + /** + * Flowchart: Merge + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartMerge = "FlowChartMerge", + /** + * FlowChart: Offline Storage + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartOfflineStorage = "FlowChartOfflineStorage", + /** + * Flowchart: Stored Data + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartOnlineStorage = "FlowChartOnlineStorage", + /** + * Flowchart: Sequential Access Storage + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartMagneticTape = "FlowChartMagneticTape", + /** + * Flowchart: Magnetic Disk + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartMagneticDisk = "FlowChartMagneticDisk", + /** + * Flowchart: Direct Access Storage + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartMagneticDrum = "FlowChartMagneticDrum", + /** + * Flowchart: Display + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartDisplay = "FlowChartDisplay", + /** + * Flowchart: Delay + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartDelay = "FlowChartDelay", + /** + * Flowchart: Alternate Process + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartAlternateProcess = "FlowChartAlternateProcess", + /** + * Flowchart: Off-page Connector + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartOffpageConnector = "FlowChartOffpageConnector", + /** + * Action Button: Blank + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonBlank = "ActionButtonBlank", + /** + * Action Button: Go Home + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonHome = "ActionButtonHome", + /** + * Action Button: Help + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonHelp = "ActionButtonHelp", + /** + * Action Button: Get Information + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonInformation = "ActionButtonInformation", + /** + * Action Button: Go Forward or Next + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonForwardNext = "ActionButtonForwardNext", + /** + * Action Button: Go Back or Previous + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonBackPrevious = "ActionButtonBackPrevious", + /** + * Action Button: Go to End + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonEnd = "ActionButtonEnd", + /** + * Action Button: Go to Beginning + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonBeginning = "ActionButtonBeginning", + /** + * Action Button: Return + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonReturn = "ActionButtonReturn", + /** + * Action Button: Document + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonDocument = "ActionButtonDocument", + /** + * Action Button: Sound + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonSound = "ActionButtonSound", + /** + * Action Button: Video + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonMovie = "ActionButtonMovie", + /** + * Gear: A Gear with Six Teeth + * @remarks + * [Api set: PowerPointApi 1.4] + */ + gear6 = "Gear6", + /** + * Gear: A Gear with Nine Teeth + * @remarks + * [Api set: PowerPointApi 1.4] + */ + gear9 = "Gear9", + /** + * Funnel + * @remarks + * [Api set: PowerPointApi 1.4] + */ + funnel = "Funnel", + /** + * Plus Sign + * @remarks + * [Api set: PowerPointApi 1.4] + */ + mathPlus = "MathPlus", + /** + * Minus Sign + * @remarks + * [Api set: PowerPointApi 1.4] + */ + mathMinus = "MathMinus", + /** + * Multiplication Sign + * @remarks + * [Api set: PowerPointApi 1.4] + */ + mathMultiply = "MathMultiply", + /** + * Division Sign + * @remarks + * [Api set: PowerPointApi 1.4] + */ + mathDivide = "MathDivide", + /** + * Equals + * @remarks + * [Api set: PowerPointApi 1.4] + */ + mathEqual = "MathEqual", + /** + * Not Equal + * @remarks + * [Api set: PowerPointApi 1.4] + */ + mathNotEqual = "MathNotEqual", + /** + * Four Right Triangles that Define a Rectangular Shape + * @remarks + * [Api set: PowerPointApi 1.4] + */ + cornerTabs = "CornerTabs", + /** + * Four Small Squares that Define a Rectangular Shape. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + squareTabs = "SquareTabs", + /** + * Four Quarter Circles that Define a Rectangular Shape. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + plaqueTabs = "PlaqueTabs", + /** + * A Rectangle Divided into Four Parts Along Diagonal Lines. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + chartX = "ChartX", + /** + * A Rectangle Divided into Six Parts Along a Vertical Line and Diagonal Lines. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + chartStar = "ChartStar", + /** + * A Rectangle Divided Vertically and Horizontally into Four Quarters. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + chartPlus = "ChartPlus", + } + /** + * Specifies the formatting options for when slides are inserted. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + enum InsertSlideFormatting { + /** + * Copy the source theme into the target presentation and use that theme. + * @remarks + * [Api set: PowerPointApi 1.2] + */ + keepSourceFormatting = "KeepSourceFormatting", + /** + * Use the existing theme in the target presentation. + * @remarks + * [Api set: PowerPointApi 1.2] + */ + useDestinationTheme = "UseDestinationTheme", + } + /** + * Represents the available options when inserting slides. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + interface InsertSlideOptions { + /** + * Specifies which formatting to use during slide insertion. + The default option is to use "KeepSourceFormatting". + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + formatting?: PowerPoint.InsertSlideFormatting | "KeepSourceFormatting" | "UseDestinationTheme"; + /** + * Specifies the slides from the source presentation that will be inserted into the current presentation. These slides are represented by their IDs which can be retrieved from a `Slide` object. + The order of these slides is preserved during the insertion. + If any of the source slides are not found, or if the IDs are invalid, the operation throws a `SlideNotFound` exception and no slides will be inserted. + All of the source slides will be inserted when `sourceSlideIds` is not provided (this is the default behavior). + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + sourceSlideIds?: string[]; + /** + * Specifies where in the presentation the new slides will be inserted. The new slides will be inserted after the slide with the given slide ID. + If `targetSlideId` is not provided, the slides will be inserted at the beginning of the presentation. + If `targetSlideId` is invalid or if it is pointing to a non-existing slide, the operation throws a `SlideNotFound` exception and no slides will be inserted. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + targetSlideId?: string; + } + /** + * Represents the horizontal alignment of the {@link PowerPoint.TextFrame} in a {@link PowerPoint.Shape}. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ParagraphHorizontalAlignment { + /** + * Align text to the left margin. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left = "Left", + /** + * Align text in the center. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + center = "Center", + /** + * Align text to the right margin. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + right = "Right", + /** + * Align text so that it is justified across the whole line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + justify = "Justify", + /** + * Specifies the alignment or adjustment of kashida length in Arabic text. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + justifyLow = "JustifyLow", + /** + * Distributes the text words across an entire text line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + distributed = "Distributed", + /** + * Distributes Thai text specially, because each character is treated as a word. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + thaiDistributed = "ThaiDistributed", + } + /** + * Represents the paragraph formatting properties of a text that is attached to the {@link PowerPoint.TextRange}. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + class ParagraphFormat 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 bullet format of the paragraph. See {@link PowerPoint.BulletFormat} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly bulletFormat: PowerPoint.BulletFormat; + /** + * Represents the horizontal alignment of the paragraph. Returns 'null' if the 'TextRange' includes text fragments with different horizontal alignment values. See {@link PowerPoint.ParagraphHorizontalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + horizontalAlignment: PowerPoint.ParagraphHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ParagraphFormatLoadOptions): PowerPoint.ParagraphFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.ParagraphFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.ParagraphFormat; + /** + * 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 PowerPoint.ParagraphFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ParagraphFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.ParagraphFormatData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.ParagraphFormatData): void; + } + /** + * Represents the available options when adding shapes. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface ShapeAddOptions { + /** + * Specifies the height, in points, of the shape. + When not provided, a default value will be used. + Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height?: number; + /** + * Specifies the distance, in points, from the left side of the shape to the left side of the slide. + When not provided, a default value will be used. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left?: number; + /** + * Specifies the distance, in points, from the top edge of the shape to the top edge of the slide. + When not provided, a default value will be used. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top?: number; + /** + * Specifies the width, in points, of the shape. + When not provided, a default value will be used. + Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width?: number; + } + /** + * Represents the collection of shapes. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + 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: PowerPoint.Shape[]; + /** + * Adds a geometric shape to the slide. Returns a `Shape` object that represents the new shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param geometricShapeType Specifies the type of the geometric shape. See {@link PowerPoint.GeometricShapeType} for details. + * @param options An optional parameter to specify the additional options such as the position of the shape. + * @returns The newly inserted shape. + */ + addGeometricShape(geometricShapeType: PowerPoint.GeometricShapeType, options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; + /** + * Adds a geometric shape to the slide. Returns a `Shape` object that represents the new shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param geometricShapeType Specifies the type of the geometric shape. See {@link PowerPoint.GeometricShapeType} for details. + * @param options An optional parameter to specify the additional options such as the position of the shape. + * @returns The newly inserted 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", options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; + /** + * Adds a line to the slide. Returns a `Shape` object that represents the new line. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param connectorType Specifies the connector type of the line. If not provided, `straight` connector type will be used. See {@link PowerPoint.ConnectorType} for details. + * @param options An optional parameter to specify the additional options such as the position of the shape object that contains the line. + * @returns The newly inserted shape. + */ + addLine(connectorType?: PowerPoint.ConnectorType, options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; + /** + * Adds a line to the slide. Returns a `Shape` object that represents the new line. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param connectorType Specifies the connector type of the line. If not provided, `straight` connector type will be used. See {@link PowerPoint.ConnectorType} for details. + * @param options An optional parameter to specify the additional options such as the position of the shape object that contains the line. + * @returns The newly inserted shape. + */ + addLine(connectorType?: "Straight" | "Elbow" | "Curve", options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; + /** + * Adds a text box to the slide with the provided text as the content. Returns a `Shape` object that represents the new text box. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param text Specifies the text that will be shown in the created text box. + * @param options An optional parameter to specify the additional options such as the position of the text box. + * @returns The newly inserted shape. + */ + addTextBox(text: string, options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; + /** + * Gets the number of shapes in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * @returns The number of shapes in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a shape using its unique ID. An error is thrown if the shape does not exist. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The ID of the shape. + * @returns The shape with the unique ID. If such a shape does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.Shape; + /** + * Gets a shape using its zero-based index in the collection. An error is thrown if the index is out of range. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param index The index of the shape in the collection. + * @returns The shape at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.Shape; + /** + * Gets a shape using its unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param id The ID of the shape. + * @returns The shape with the unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned. + */ + getItemOrNullObject(id: string): PowerPoint.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ShapeCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.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 `PowerPoint.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.ShapeCollectionData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.ShapeCollectionData): void; + } + /** + * Represents the layout of a slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + class SlideLayout 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 shapes in the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly shapes: PowerPoint.ShapeCollection; + /** + * Gets the unique ID of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly id: string; + /** + * Gets the name of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly name: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideLayoutLoadOptions): PowerPoint.SlideLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.SlideLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.SlideLayout; + /** + * 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 PowerPoint.SlideLayout object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideLayoutData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.SlideLayoutData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.SlideLayoutData): void; + } + /** + * Represents the collection of layouts provided by the Slide Master for slides. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + class SlideLayoutCollection 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: PowerPoint.SlideLayout[]; + /** + * Gets the number of layouts in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * @returns The number of layouts in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a layout using its unique ID. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The ID of the layout. + * @returns The layout with the unique ID. If such a layout does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.SlideLayout; + /** + * Gets a layout using its zero-based index in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param index The index of the layout in the collection. + * @returns The layout at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.SlideLayout; + /** + * Gets a layout using its unique ID. If such a layout does not exist, an object with an `isNullObject` property set to true is returned. For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param id The ID of the layout. + * @returns The layout with the unique ID. + */ + getItemOrNullObject(id: string): PowerPoint.SlideLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideLayoutCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideLayoutCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.SlideLayoutCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideLayoutCollection; + /** + * 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 `PowerPoint.SlideLayoutCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideLayoutCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.SlideLayoutCollectionData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.SlideLayoutCollectionData): void; + } + /** + * Represents the Slide Master of a slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + class SlideMaster 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 layouts provided by the Slide Master for slides. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly layouts: PowerPoint.SlideLayoutCollection; + /** + * Returns a collection of shapes in the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly shapes: PowerPoint.ShapeCollection; + /** + * Gets the unique ID of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly id: string; + /** + * Gets the unique name of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly name: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideMasterLoadOptions): PowerPoint.SlideMaster; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.SlideMaster; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.SlideMaster; + /** + * 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 PowerPoint.SlideMaster object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideMasterData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.SlideMasterData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.SlideMasterData): void; + } + /** + * Represents a single tag in the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + class Tag 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 unique ID of the tag. The `key` is unique within the owning `TagCollection` and always stored as uppercase letters within the document. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly key: string; + /** + * Gets the value of the tag. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + value: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.TagLoadOptions): PowerPoint.Tag; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.Tag; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.Tag; + /** + * 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 PowerPoint.Tag object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TagData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.TagData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.TagData): void; + } + /** + * Represents the collection of tags. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + class TagCollection 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: PowerPoint.Tag[]; + /** + * Adds a new tag at the end of the collection. If the `key` already exists in the collection, the value of the existing tag will be replaced with the given `value`. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The unique ID of a tag, which is unique within this `TagCollection`. 'key' parameter is case-insensitive, but it is always capitalized when saved in the document. + * @param value The value of the tag. + */ + add(key: string, value: string): void; + /** + * Deletes the tag with the given `key` in this collection. Does nothing if the `key` does not exist. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The unique ID of a tag, which is unique within this `TagCollection`. `key` parameter is case-insensitive. + */ + delete(key: string): void; + /** + * Gets the number of tags in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * @returns The number of tags in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a tag using its unique ID. An error is thrown if the tag does not exist. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The ID of the tag. + * @returns The tag with the unique ID. If such a tag does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.Tag; + /** + * Gets a tag using its zero-based index in the collection. An error is thrown if the index is out of range. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param index The index of the tag in the collection. + * @returns The tag at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.Tag; + /** + * Gets a tag using its unique ID. If such a tag does not exist, an object with an `isNullObject` property set to true is returned. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The ID of the tag. + * @returns The tag with the unique ID. If such a tag does not exist, an object with an `isNullObject` property set to true is returned. + */ + getItemOrNullObject(key: string): PowerPoint.Tag; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.TagCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.TagCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.TagCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.TagCollection; + /** + * 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 `PowerPoint.TagCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TagCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.TagCollectionData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.TagCollectionData): void; + } + /** + * Represents a single slide of a presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + class Slide 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 layout of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly layout: PowerPoint.SlideLayout; + /** + * Returns a collection of shapes in the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly shapes: PowerPoint.ShapeCollection; + /** + * Gets the `SlideMaster` object that represents the slide's default content. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly slideMaster: PowerPoint.SlideMaster; + /** + * Returns a collection of tags in the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly tags: PowerPoint.TagCollection; + /** + * Gets the unique ID of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + readonly id: string; + /** + * Deletes the slide from the presentation. Does nothing if the slide does not exist. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + delete(): void; + /** + * Selects the specified shapes. Existing shape selection is replaced with the new selection. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param shapeIds List of shape IDs to select in the slide. If the list is empty, the selection is cleared. + */ + setSelectedShapes(shapeIds: string[]): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideLoadOptions): PowerPoint.Slide; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.Slide; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.Slide; + /** + * 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 PowerPoint.Slide object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.SlideData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.SlideData): void; + } + /** + * Specifies a shape's fill type. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ShapeFillType { + /** + * Specifies that the shape should have no fill. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + noFill = "NoFill", + /** + * Specifies that the shape should have regular solid fill. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + solid = "Solid", + /** + * Specifies that the shape should have gradient fill. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + gradient = "Gradient", + /** + * Specifies that the shape should have pattern fill. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + pattern = "Pattern", + /** + * Specifies that the shape should have picture or texture fill. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + pictureAndTexture = "PictureAndTexture", + /** + * Specifies that the shape should have slide background fill. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + slideBackground = "SlideBackground", + } + /** + * Represents the fill formatting of a shape object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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 foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + foregroundColor: string; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency: number; + /** + * Returns the fill type of the shape. See {@link PowerPoint.ShapeFillType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly type: PowerPoint.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "SlideBackground"; + /** + * Clears the fill formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + clear(): void; + /** + * Sets the fill formatting of the shape to a uniform color. This changes the fill type to `Solid`. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param color A string that specifies the fill color in HTML color format, in 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ShapeFillLoadOptions): PowerPoint.ShapeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.ShapeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.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 PowerPoint.ShapeFill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeFillData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.ShapeFillData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.ShapeFillData): void; + } + /** + * Specifies the style for a line. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ShapeLineStyle { + /** + * Single line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + single = "Single", + /** + * Thick line with a thin line on each side. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + thickBetweenThin = "ThickBetweenThin", + /** + * Thick line next to thin line. For horizontal lines, the thick line is above the thin line. For vertical lines, the thick line is to the left of the thin line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + thickThin = "ThickThin", + /** + * Thick line next to thin line. For horizontal lines, the thick line is below the thin line. For vertical lines, the thick line is to the right of the thin line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + thinThick = "ThinThick", + /** + * Two thin lines. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + thinThin = "ThinThin", + } + /** + * Specifies the dash style for a line. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ShapeLineDashStyle { + /** + * The dash line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dash = "Dash", + /** + * The dash-dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashDot = "DashDot", + /** + * The dash-dot-dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashDotDot = "DashDotDot", + /** + * The long dash line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + longDash = "LongDash", + /** + * The long dash-dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + longDashDot = "LongDashDot", + /** + * The round dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + roundDot = "RoundDot", + /** + * The solid line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + solid = "Solid", + /** + * The square dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + squareDot = "SquareDot", + /** + * The long dash-dot-dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + longDashDotDot = "LongDashDotDot", + /** + * The system dash line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + systemDash = "SystemDash", + /** + * The system dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + systemDot = "SystemDot", + /** + * The system dash-dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + systemDashDot = "SystemDashDot", + } + /** + * Represents the line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + class ShapeLineFormat 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 line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color: string; + /** + * Represents the dash style of the line. Returns null when the line is not visible or there are inconsistent dash styles. See PowerPoint.ShapeLineDashStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashStyle: PowerPoint.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See PowerPoint.ShapeLineStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + style: PowerPoint.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency: number; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + weight: number; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions): PowerPoint.ShapeLineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.ShapeLineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.ShapeLineFormat; + /** + * 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 PowerPoint.ShapeLineFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeLineFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.ShapeLineFormatData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.ShapeLineFormatData): void; + } + /** + * Specifies the type of a shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ShapeType { + /** + * The given shape's type is unsupported. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + unsupported = "Unsupported", + /** + * The shape is an image + * @remarks + * [Api set: PowerPointApi 1.4] + */ + image = "Image", + /** + * The shape is a geometric shape such as rectangle + * @remarks + * [Api set: PowerPointApi 1.4] + */ + geometricShape = "GeometricShape", + /** + * The shape is a group shape which contains sub-shapes + * @remarks + * [Api set: PowerPointApi 1.4] + */ + group = "Group", + /** + * The shape is a line + * @remarks + * [Api set: PowerPointApi 1.4] + */ + line = "Line", + } + /** + * Determines the type of automatic sizing allowed. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ShapeAutoSize { + /** + * No autosizing. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeNone = "AutoSizeNone", + /** + * The text is adjusted to fit the shape. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeTextToFitShape = "AutoSizeTextToFitShape", + /** + * The shape is adjusted to fit the text. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeShapeToFitText = "AutoSizeShapeToFitText", + /** + * A combination of automatic sizing schemes are used. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeMixed = "AutoSizeMixed", + } + /** + * Represents the vertical alignment of a {@link PowerPoint.TextFrame} in a {@link PowerPoint.Shape}. + If one the centered options are selected, the contents of the `TextFrame` will be centered horizontally within the `Shape` as a group. + To change the horizontal alignment of a text, see {@link PowerPoint.ParagraphFormat} and {@link PowerPoint.ParagraphHorizontalAlignment }. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum TextVerticalAlignment { + /** + * Specifies that the `TextFrame` should be top aligned to the `Shape`. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top = "Top", + /** + * Specifies that the `TextFrame` should be center aligned to the `Shape`. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + middle = "Middle", + /** + * Specifies that the `TextFrame` should be bottom aligned to the `Shape`. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bottom = "Bottom", + /** + * Specifies that the `TextFrame` should be top aligned vertically to the `Shape`. Contents of the `TextFrame` will be centered horizontally within the `Shape`. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + topCentered = "TopCentered", + /** + * Specifies that the `TextFrame` should be center aligned vertically to the `Shape`. Contents of the `TextFrame` will be centered horizontally within the `Shape`. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + middleCentered = "MiddleCentered", + /** + * Specifies that the `TextFrame` should be bottom aligned vertically to the `Shape`. Contents of the `TextFrame` will be centered horizontally within the `Shape`. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bottomCentered = "BottomCentered", + } + /** + * The type of underline applied to a font. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ShapeFontUnderlineStyle { + /** + * No underlining. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + none = "None", + /** + * Regular single line underlining. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + single = "Single", + /** + * Underlining of text with double lines. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + double = "Double", + /** + * Underlining of text with a thick line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + heavy = "Heavy", + /** + * Underlining of text with a dotted line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dotted = "Dotted", + /** + * Underlining of text with a thick, dotted line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dottedHeavy = "DottedHeavy", + /** + * Underlining of text with a line containing dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dash = "Dash", + /** + * Underlining of text with a thick line containing dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashHeavy = "DashHeavy", + /** + * Underlining of text with a line containing long dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashLong = "DashLong", + /** + * Underlining of text with a thick line containing long dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashLongHeavy = "DashLongHeavy", + /** + * Underlining of text with a line containing dots and dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dotDash = "DotDash", + /** + * Underlining of text with a thick line containing dots and dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dotDashHeavy = "DotDashHeavy", + /** + * Underlining of text with a line containing double dots and dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dotDotDash = "DotDotDash", + /** + * Underlining of text with a thick line containing double dots and dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dotDotDashHeavy = "DotDotDashHeavy", + /** + * Underlining of text with a wavy line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wavy = "Wavy", + /** + * Underlining of text with a thick, wavy line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wavyHeavy = "WavyHeavy", + /** + * Underlining of text with double wavy lines. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wavyDouble = "WavyDouble", + } + /** + * Represents the font attributes, such as font name, font size, and color, for a shape's TextRange object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color: string; + /** + * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + italic: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name: string; + /** + * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + size: number; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + underline: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ShapeFontLoadOptions): PowerPoint.ShapeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.ShapeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.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 PowerPoint.ShapeFont object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeFontData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.ShapeFontData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.ShapeFontData): void; + } + /** + * Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly font: PowerPoint.ShapeFont; + /** + * Represents the paragraph format of the text range. See {@link PowerPoint.ParagraphFormat} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly paragraphFormat: PowerPoint.ParagraphFormat; + /** + * Gets or sets the length of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + length: number; + /** + * Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + start: number; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + text: string; + /** + * Returns the parent {@link PowerPoint.TextFrame} object that holds this `TextRange`. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentTextFrame(): PowerPoint.TextFrame; + /** + * Returns a `TextRange` object for the substring in the given range. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param start The zero-based index of the first character to get from the text range. + * @param length Optional. The number of characters to be returned in the new text range. If length is omitted, all the characters from start to the end of the text range's last paragraph will be returned. + */ + getSubstring(start: number, length?: number): PowerPoint.TextRange; + /** + * Selects this `TextRange` in the current view. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + setSelected(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.TextRangeLoadOptions): PowerPoint.TextRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.TextRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.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 PowerPoint.TextRange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TextRangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.TextRangeData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.TextRangeData): void; + } + /** + * Represents the text frame of a shape object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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; + /** + * Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See {@link PowerPoint.TextRange} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly textRange: PowerPoint.TextRange; + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeSetting: PowerPoint.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bottomMargin: number; + /** + * Specifies if the text frame contains text. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly hasText: boolean; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftMargin: number; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightMargin: number; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + topMargin: number; + /** + * Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + verticalAlignment: PowerPoint.TextVerticalAlignment | "Top" | "Middle" | "Bottom" | "TopCentered" | "MiddleCentered" | "BottomCentered"; + /** + * Determines whether lines break automatically to fit text inside the shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wordWrap: boolean; + /** + * Deletes all the text in the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + deleteText(): void; + /** + * Returns the parent {@link PowerPoint.Shape} object that holds this `TextFrame`. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentShape(): PowerPoint.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.TextFrameLoadOptions): PowerPoint.TextFrame; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.TextFrame; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.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 PowerPoint.TextFrame object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TextFrameData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.TextFrameData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.TextFrameData): void; + } + /** + * Represents a single shape in the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + 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 this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly fill: PowerPoint.ShapeFill; + /** + * Returns the line formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly lineFormat: PowerPoint.ShapeLineFormat; + /** + * Returns a collection of tags in the shape. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly tags: PowerPoint.TagCollection; + /** + * Returns the text frame object of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly textFrame: PowerPoint.TextFrame; + /** + * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height: number; + /** + * Gets the unique ID of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly id: string; + /** + * The distance, in points, from the left side of the shape to the left side of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left: number; + /** + * Specifies the name of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name: string; + /** + * The distance, in points, from the top edge of the shape to the top edge of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top: number; + /** + * Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly type: PowerPoint.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line"; + /** + * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width: number; + /** + * Deletes the shape from the shape collection. Does nothing if the shape does not exist. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + delete(): void; + /** + * Returns the parent {@link PowerPoint.Slide} object that holds this `Shape`. Throws an exception if this shape does not belong to a `Slide`. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentSlide(): PowerPoint.Slide; + /** + * Returns the parent {@link PowerPoint.SlideLayout} object that holds this `Shape`. Throws an exception if this shape does not belong to a `SlideLayout`. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentSlideLayout(): PowerPoint.SlideLayout; + /** + * Returns the parent {@link PowerPoint.SlideLayout} object that holds this `Shape`. If this shape does not belong to a `SlideLayout`, an object with an `isNullObject` property set to `true` is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentSlideLayoutOrNullObject(): PowerPoint.SlideLayout; + /** + * Returns the parent {@link PowerPoint.SlideMaster} object that holds this `Shape`. Throws an exception if this shape does not belong to a `SlideMaster`. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentSlideMaster(): PowerPoint.SlideMaster; + /** + * Returns the parent {@link PowerPoint.SlideMaster} object that holds this `Shape`. If this shape does not belong to a `SlideMaster`, an object with an `isNullObject` property set to `true` is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentSlideMasterOrNullObject(): PowerPoint.SlideMaster; + /** + * Returns the parent {@link PowerPoint.Slide} object that holds this `Shape`. If this shape does not belong to a `Slide`, an object with an `isNullObject` property set to `true` is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentSlideOrNullObject(): PowerPoint.Slide; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ShapeLoadOptions): PowerPoint.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.Shape; + /** + * 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 PowerPoint.Shape object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.ShapeData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.ShapeData): void; + } + /** + * Represents a collection of shapes. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + class ShapeScopedCollection 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: PowerPoint.Shape[]; + /** + * Gets the number of shapes in the collection. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @returns The number of shapes in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a shape using its unique ID. An error is thrown if the shape does not exist. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param key The ID of the shape. + * @returns The shape with the unique ID. If such a shape does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.Shape; + /** + * Gets a shape using its zero-based index in the collection. An error is thrown if the index is out of range. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param index The index of the shape in the collection. + * @returns The shape at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.Shape; + /** + * Gets a shape using its unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param id The ID of the shape. + * @returns The shape with the unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned. + */ + getItemOrNullObject(id: string): PowerPoint.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ShapeScopedCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.ShapeScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.ShapeScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.ShapeScopedCollection; + /** + * 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 `PowerPoint.ShapeScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.ShapeScopedCollectionData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.ShapeScopedCollectionData): void; + } + /** + * Represents the collection of slides in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + class SlideCollection 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: PowerPoint.Slide[]; + /** + * Adds a new slide at the end of the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param options The options that define the theme of the new slide. + */ + add(options?: PowerPoint.AddSlideOptions): void; + /** + * Gets the number of slides in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.2] + * @returns The number of slides in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a slide using its unique ID. + * + * @remarks + * [Api set: PowerPointApi 1.2] + * + * @param key The ID of the slide. + * @returns The slide with the unique ID. If such a slide does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.Slide; + /** + * Gets a slide using its zero-based index in the collection. Slides are stored in the same order as they + are shown in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + * + * @param index The index of the slide in the collection. + * @returns The slide at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.Slide; + /** + * Gets a slide using its unique ID. If such a slide does not exist, an object with an `isNullObject` property set to true is returned. For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods + and properties}. + * + * @remarks + * [Api set: PowerPointApi 1.2] + * + * @param id The ID of the slide. + * @returns The slide with the unique ID. + */ + getItemOrNullObject(id: string): PowerPoint.Slide; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.SlideCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideCollection; + /** + * 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 `PowerPoint.SlideCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.SlideCollectionData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.SlideCollectionData): void; + } + /** + * Represents a collection of slides in the presentation. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + class SlideScopedCollection 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: PowerPoint.Slide[]; + /** + * Gets the number of slides in the collection. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @returns The number of slides in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a slide using its unique ID. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param key The ID of the slide. + * @returns The slide with the unique ID. If such a slide does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.Slide; + /** + * Gets a slide using its zero-based index in the collection. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param index The index of the slide in the collection. + * @returns The slide at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.Slide; + /** + * Gets a slide using its unique ID. If such a slide does not exist, an object with an `isNullObject` property set to true is returned. For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods + and properties}. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param id The ID of the slide. + * @returns The slide with the unique ID. + */ + getItemOrNullObject(id: string): PowerPoint.Slide; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideScopedCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.SlideScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideScopedCollection; + /** + * 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 `PowerPoint.SlideScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.SlideScopedCollectionData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.SlideScopedCollectionData): void; + } + /** + * Represents the collection of Slide Masters in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + class SlideMasterCollection 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: PowerPoint.SlideMaster[]; + /** + * Gets the number of Slide Masters in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * @returns The number of Slide Masters in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a Slide Master using its unique ID. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The ID of the Slide Master. + * @returns The Slide Master with the unique ID. If such a Slide Master does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.SlideMaster; + /** + * Gets a Slide Master using its zero-based index in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param index The index of the Slide Master in the collection. + * @returns The Slide Master at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.SlideMaster; + /** + * Gets a Slide Master using its unique ID. If such a Slide Master does not exist, an object with an `isNullObject` property set to true is returned. + For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}." + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param id The ID of the Slide Master. + * @returns The Slide Master with the unique ID. + */ + getItemOrNullObject(id: string): PowerPoint.SlideMaster; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideMasterCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideMasterCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.SlideMasterCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideMasterCollection; + /** + * 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 `PowerPoint.SlideMasterCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideMasterCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.SlideMasterCollectionData; + /** + * Set mock data + */ + setMockData(data: PowerPoint.Interfaces.SlideMasterCollectionData): void; + } + 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 BulletFormat object, for use in `bulletFormat.set({ ... })`. */ + interface BulletFormatUpdateData { + /** + * Specifies if the bullets in the paragraph are visible. Returns 'null' if the 'TextRange' includes text fragments with different bullet visibility values. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible?: boolean; + } + /** An interface for updating data on the ParagraphFormat object, for use in `paragraphFormat.set({ ... })`. */ + interface ParagraphFormatUpdateData { + /** + * Represents the horizontal alignment of the paragraph. Returns 'null' if the 'TextRange' includes text fragments with different horizontal alignment values. See {@link PowerPoint.ParagraphHorizontalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + horizontalAlignment?: PowerPoint.ParagraphHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; + } + /** An interface for updating data on the ShapeCollection object, for use in `shapeCollection.set({ ... })`. */ + interface ShapeCollectionUpdateData { + items?: PowerPoint.Interfaces.ShapeData[]; + } + /** An interface for updating data on the SlideLayoutCollection object, for use in `slideLayoutCollection.set({ ... })`. */ + interface SlideLayoutCollectionUpdateData { + items?: PowerPoint.Interfaces.SlideLayoutData[]; + } + /** An interface for updating data on the Tag object, for use in `tag.set({ ... })`. */ + interface TagUpdateData { + /** + * Gets the value of the tag. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + value?: string; + } + /** An interface for updating data on the TagCollection object, for use in `tagCollection.set({ ... })`. */ + interface TagCollectionUpdateData { + items?: PowerPoint.Interfaces.TagData[]; + } + /** An interface for updating data on the ShapeFill object, for use in `shapeFill.set({ ... })`. */ + interface ShapeFillUpdateData { + /** + * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + foregroundColor?: string; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency?: number; + } + /** An interface for updating data on the ShapeLineFormat object, for use in `shapeLineFormat.set({ ... })`. */ + interface ShapeLineFormatUpdateData { + /** + * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color?: string; + /** + * Represents the dash style of the line. Returns null when the line is not visible or there are inconsistent dash styles. See PowerPoint.ShapeLineDashStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashStyle?: PowerPoint.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See PowerPoint.ShapeLineStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + style?: PowerPoint.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency?: number; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible?: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + weight?: number; + } + /** An interface for updating data on the ShapeFont object, for use in `shapeFont.set({ ... })`. */ + interface ShapeFontUpdateData { + /** + * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color?: string; + /** + * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + italic?: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: string; + /** + * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + size?: number; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + underline?: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + } + /** An interface for updating data on the TextRange object, for use in `textRange.set({ ... })`. */ + interface TextRangeUpdateData { + /** + * Gets or sets the length of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + length?: number; + /** + * Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + start?: number; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + text?: string; + } + /** An interface for updating data on the TextFrame object, for use in `textFrame.set({ ... })`. */ + interface TextFrameUpdateData { + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeSetting?: PowerPoint.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bottomMargin?: number; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftMargin?: number; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightMargin?: number; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + topMargin?: number; + /** + * Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + verticalAlignment?: PowerPoint.TextVerticalAlignment | "Top" | "Middle" | "Bottom" | "TopCentered" | "MiddleCentered" | "BottomCentered"; + /** + * Determines whether lines break automatically to fit text inside the shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wordWrap?: boolean; + } + /** An interface for updating data on the Shape object, for use in `shape.set({ ... })`. */ + interface ShapeUpdateData { + /** + * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height?: number; + /** + * The distance, in points, from the left side of the shape to the left side of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left?: number; + /** + * Specifies the name of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: string; + /** + * The distance, in points, from the top edge of the shape to the top edge of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top?: number; + /** + * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width?: number; + } + /** An interface for updating data on the ShapeScopedCollection object, for use in `shapeScopedCollection.set({ ... })`. */ + interface ShapeScopedCollectionUpdateData { + items?: PowerPoint.Interfaces.ShapeData[]; + } + /** An interface for updating data on the SlideCollection object, for use in `slideCollection.set({ ... })`. */ + interface SlideCollectionUpdateData { + items?: PowerPoint.Interfaces.SlideData[]; + } + /** An interface for updating data on the SlideScopedCollection object, for use in `slideScopedCollection.set({ ... })`. */ + interface SlideScopedCollectionUpdateData { + items?: PowerPoint.Interfaces.SlideData[]; + } + /** An interface for updating data on the SlideMasterCollection object, for use in `slideMasterCollection.set({ ... })`. */ + interface SlideMasterCollectionUpdateData { + items?: PowerPoint.Interfaces.SlideMasterData[]; + } + /** An interface describing the data returned by calling `presentation.toJSON()`. */ + interface PresentationData { + title?: string; + } + /** An interface describing the data returned by calling `bulletFormat.toJSON()`. */ + interface BulletFormatData { + /** + * Specifies if the bullets in the paragraph are visible. Returns 'null' if the 'TextRange' includes text fragments with different bullet visibility values. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling `paragraphFormat.toJSON()`. */ + interface ParagraphFormatData { + /** + * Represents the horizontal alignment of the paragraph. Returns 'null' if the 'TextRange' includes text fragments with different horizontal alignment values. See {@link PowerPoint.ParagraphHorizontalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + horizontalAlignment?: PowerPoint.ParagraphHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; + } + /** An interface describing the data returned by calling `shapeCollection.toJSON()`. */ + interface ShapeCollectionData { + items?: PowerPoint.Interfaces.ShapeData[]; + } + /** An interface describing the data returned by calling `slideLayout.toJSON()`. */ + interface SlideLayoutData { + /** + * Gets the unique ID of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: string; + /** + * Gets the name of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + name?: string; + } + /** An interface describing the data returned by calling `slideLayoutCollection.toJSON()`. */ + interface SlideLayoutCollectionData { + items?: PowerPoint.Interfaces.SlideLayoutData[]; + } + /** An interface describing the data returned by calling `slideMaster.toJSON()`. */ + interface SlideMasterData { + /** + * Gets the unique ID of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: string; + /** + * Gets the unique name of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + name?: string; + } + /** An interface describing the data returned by calling `tag.toJSON()`. */ + interface TagData { + /** + * Gets the unique ID of the tag. The `key` is unique within the owning `TagCollection` and always stored as uppercase letters within the document. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + key?: string; + /** + * Gets the value of the tag. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + value?: string; + } + /** An interface describing the data returned by calling `tagCollection.toJSON()`. */ + interface TagCollectionData { + items?: PowerPoint.Interfaces.TagData[]; + } + /** An interface describing the data returned by calling `slide.toJSON()`. */ + interface SlideData { + /** + * Gets the unique ID of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + id?: string; + } + /** An interface describing the data returned by calling `shapeFill.toJSON()`. */ + interface ShapeFillData { + /** + * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + foregroundColor?: string; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency?: number; + /** + * Returns the fill type of the shape. See {@link PowerPoint.ShapeFillType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + type?: PowerPoint.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "SlideBackground"; + } + /** An interface describing the data returned by calling `shapeLineFormat.toJSON()`. */ + interface ShapeLineFormatData { + /** + * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color?: string; + /** + * Represents the dash style of the line. Returns null when the line is not visible or there are inconsistent dash styles. See PowerPoint.ShapeLineDashStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashStyle?: PowerPoint.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See PowerPoint.ShapeLineStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + style?: PowerPoint.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency?: number; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible?: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + weight?: number; + } + /** An interface describing the data returned by calling `shapeFont.toJSON()`. */ + interface ShapeFontData { + /** + * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color?: string; + /** + * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + italic?: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: string; + /** + * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + size?: number; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + underline?: PowerPoint.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 `textRange.toJSON()`. */ + interface TextRangeData { + /** + * Gets or sets the length of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + length?: number; + /** + * Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + start?: number; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + text?: string; + } + /** An interface describing the data returned by calling `textFrame.toJSON()`. */ + interface TextFrameData { + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeSetting?: PowerPoint.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bottomMargin?: number; + /** + * Specifies if the text frame contains text. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + hasText?: boolean; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftMargin?: number; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightMargin?: number; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + topMargin?: number; + /** + * Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + verticalAlignment?: PowerPoint.TextVerticalAlignment | "Top" | "Middle" | "Bottom" | "TopCentered" | "MiddleCentered" | "BottomCentered"; + /** + * Determines whether lines break automatically to fit text inside the shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wordWrap?: boolean; + } + /** An interface describing the data returned by calling `shape.toJSON()`. */ + interface ShapeData { + /** + * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height?: number; + /** + * Gets the unique ID of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: string; + /** + * The distance, in points, from the left side of the shape to the left side of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left?: number; + /** + * Specifies the name of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: string; + /** + * The distance, in points, from the top edge of the shape to the top edge of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top?: number; + /** + * Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + type?: PowerPoint.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line"; + /** + * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width?: number; + } + /** An interface describing the data returned by calling `shapeScopedCollection.toJSON()`. */ + interface ShapeScopedCollectionData { + items?: PowerPoint.Interfaces.ShapeData[]; + } + /** An interface describing the data returned by calling `slideCollection.toJSON()`. */ + interface SlideCollectionData { + items?: PowerPoint.Interfaces.SlideData[]; + } + /** An interface describing the data returned by calling `slideScopedCollection.toJSON()`. */ + interface SlideScopedCollectionData { + items?: PowerPoint.Interfaces.SlideData[]; + } + /** An interface describing the data returned by calling `slideMasterCollection.toJSON()`. */ + interface SlideMasterCollectionData { + items?: PowerPoint.Interfaces.SlideMasterData[]; + } + /** + * @remarks + * [Api set: PowerPointApi 1.0] + */ + interface PresentationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + title?: boolean; + } + /** + * Represents the bullet formatting properties of a text that is attached to the {@link PowerPoint.ParagraphFormat}. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface BulletFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if the bullets in the paragraph are visible. Returns 'null' if the 'TextRange' includes text fragments with different bullet visibility values. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible?: boolean; + } + /** + * Represents the paragraph formatting properties of a text that is attached to the {@link PowerPoint.TextRange}. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface ParagraphFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the bullet format of the paragraph. See {@link PowerPoint.BulletFormat} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bulletFormat?: PowerPoint.Interfaces.BulletFormatLoadOptions; + /** + * Represents the horizontal alignment of the paragraph. Returns 'null' if the 'TextRange' includes text fragments with different horizontal alignment values. See {@link PowerPoint.ParagraphHorizontalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + horizontalAlignment?: boolean; + } + /** + * Represents the collection of shapes. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface ShapeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the fill formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + fill?: PowerPoint.Interfaces.ShapeFillLoadOptions; + /** + * For EACH ITEM in the collection: Returns the line formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + lineFormat?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the text frame object of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Gets the unique ID of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width?: boolean; + } + /** + * Represents the layout of a slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface SlideLayoutLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the unique ID of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * Gets the name of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + name?: boolean; + } + /** + * Represents the collection of layouts provided by the Slide Master for slides. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface SlideLayoutCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the unique ID of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + name?: boolean; + } + /** + * Represents the Slide Master of a slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface SlideMasterLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the unique ID of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * Gets the unique name of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + name?: boolean; + } + /** + * Represents a single tag in the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface TagLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the unique ID of the tag. The `key` is unique within the owning `TagCollection` and always stored as uppercase letters within the document. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + key?: boolean; + /** + * Gets the value of the tag. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + value?: boolean; + } + /** + * Represents the collection of tags. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface TagCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the unique ID of the tag. The `key` is unique within the owning `TagCollection` and always stored as uppercase letters within the document. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Gets the value of the tag. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + value?: boolean; + } + /** + * Represents a single slide of a presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + interface SlideLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the layout of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + layout?: PowerPoint.Interfaces.SlideLayoutLoadOptions; + /** + * Gets the `SlideMaster` object that represents the slide's default content. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + slideMaster?: PowerPoint.Interfaces.SlideMasterLoadOptions; + /** + * Gets the unique ID of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + id?: boolean; + } + /** + * Represents the fill formatting of a shape object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface ShapeFillLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + foregroundColor?: boolean; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency?: boolean; + /** + * Returns the fill type of the shape. See {@link PowerPoint.ShapeFillType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + type?: boolean; + } + /** + * Represents the line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface ShapeLineFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color?: boolean; + /** + * Represents the dash style of the line. Returns null when the line is not visible or there are inconsistent dash styles. See PowerPoint.ShapeLineDashStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashStyle?: boolean; + /** + * Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See PowerPoint.ShapeLineStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + style?: boolean; + /** + * Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency?: boolean; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible?: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + weight?: boolean; + } + /** + * Represents the font attributes, such as font name, font size, and color, for a shape's TextRange object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface ShapeFontLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color?: boolean; + /** + * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + italic?: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: boolean; + /** + * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + size?: boolean; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + underline?: boolean; + } + /** + * Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface TextRangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a `ShapeFont` object that represents the font attributes for the text range. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + font?: PowerPoint.Interfaces.ShapeFontLoadOptions; + /** + * Represents the paragraph format of the text range. See {@link PowerPoint.ParagraphFormat} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + paragraphFormat?: PowerPoint.Interfaces.ParagraphFormatLoadOptions; + /** + * Gets or sets the length of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + length?: boolean; + /** + * Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + start?: boolean; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + text?: boolean; + } + /** + * Represents the text frame of a shape object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface TextFrameLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See {@link PowerPoint.TextRange} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + textRange?: PowerPoint.Interfaces.TextRangeLoadOptions; + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeSetting?: boolean; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bottomMargin?: boolean; + /** + * Specifies if the text frame contains text. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + hasText?: boolean; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftMargin?: boolean; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightMargin?: boolean; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + topMargin?: boolean; + /** + * Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + verticalAlignment?: boolean; + /** + * Determines whether lines break automatically to fit text inside the shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wordWrap?: boolean; + } + /** + * Represents a single shape in the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface ShapeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the fill formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + fill?: PowerPoint.Interfaces.ShapeFillLoadOptions; + /** + * Returns the line formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + lineFormat?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions; + /** + * Returns the text frame object of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions; + /** + * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height?: boolean; + /** + * Gets the unique ID of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * The distance, in points, from the left side of the shape to the left side of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left?: boolean; + /** + * Specifies the name of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: boolean; + /** + * The distance, in points, from the top edge of the shape to the top edge of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top?: boolean; + /** + * Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + type?: boolean; + /** + * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width?: boolean; + } + /** + * Represents a collection of shapes. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + interface ShapeScopedCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the fill formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + fill?: PowerPoint.Interfaces.ShapeFillLoadOptions; + /** + * For EACH ITEM in the collection: Returns the line formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + lineFormat?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the text frame object of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Gets the unique ID of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width?: boolean; + } + /** + * Represents the collection of slides in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + interface SlideCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the layout of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + layout?: PowerPoint.Interfaces.SlideLayoutLoadOptions; + /** + * For EACH ITEM in the collection: Gets the `SlideMaster` object that represents the slide's default content. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + slideMaster?: PowerPoint.Interfaces.SlideMasterLoadOptions; + /** + * For EACH ITEM in the collection: Gets the unique ID of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + id?: boolean; + } + /** + * Represents a collection of slides in the presentation. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + interface SlideScopedCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the layout of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + layout?: PowerPoint.Interfaces.SlideLayoutLoadOptions; + /** + * For EACH ITEM in the collection: Gets the `SlideMaster` object that represents the slide's default content. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + slideMaster?: PowerPoint.Interfaces.SlideMasterLoadOptions; + /** + * For EACH ITEM in the collection: Gets the unique ID of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + id?: boolean; + } + /** + * Represents the collection of Slide Masters in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface SlideMasterCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the unique ID of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the unique name of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + name?: boolean; + } + } +} +declare namespace PowerPoint { + /** + * The RequestContext object facilitates requests to the PowerPoint application. Since the Office add-in and the PowerPoint application run in two different processes, the request context is required to get access to the PowerPoint object model from the add-in. + */ + class RequestContext extends OfficeCore.RequestContext { + constructor(url?: string); + readonly presentation: Presentation; + readonly application: Application; + } + /** + * Executes a batch script that performs actions on the PowerPoint 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 PowerPoint application. Since the Office add-in and the PowerPoint application run in two different processes, the RequestContext is required to get access to the PowerPoint object model from the add-in. + */ + function run(batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; + /** + * Executes a batch script that performs actions on the PowerPoint 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 PowerPoint application. Since the Office add-in and the PowerPoint application run in two different processes, the RequestContext is required to get access to the PowerPoint object model from the add-in. + */ + function run(object: OfficeExtension.ClientObject, batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; + /** + * Executes a batch script that performs actions on the PowerPoint 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 PowerPoint application. Since the Office add-in and the PowerPoint application run in two different processes, the RequestContext is required to get access to the PowerPoint object model from the add-in. + */ + function run(objects: OfficeExtension.ClientObject[], batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; +} +declare namespace PowerPoint { + /** + * Creates and opens a new presentation. Optionally, the presentation can be pre-populated with a base64-encoded .pptx file. + * + * [Api set: PowerPointApi 1.1] + * + * @param base64File Optional. The base64-encoded .pptx file. The default value is null. + */ + function createPresentation(base64File?: string): Promise; +} + + +//////////////////////////////////////////////////////////////// +///////////////////// End PowerPoint APIs ////////////////////// +//////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/dist/office.d.ts b/dist/office.d.ts new file mode 100644 index 000000000..798984a7f --- /dev/null +++ b/dist/office.d.ts @@ -0,0 +1,123005 @@ +// Type definitions for Office.js 1.0 +// Project: https://github.com/OfficeDev/office-js +// Definitions by: OfficeDev , +// Ricky Kirkham , +// Alex Jerabek , +// Elizabeth Samuel , +// Alison McKay , +// Sam Ramon +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/* +office-js +Copyright (c) Microsoft Corporation +*/ + + +//////////////////////////////////////////////////////////////// +//////////////////// Begin Office namespace //////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace Office { + /** 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** + * + * For more information about Office application and server requirements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported applications, by platform* + * + * + * + * + * + * + * + *
Office on Windows Office in web browser Office on iPad Outlook on mobile devices Office on Mac
Excel Supported Supported Supported Supported
Outlook Supported Supported Supported Supported
PowerPoint Supported Supported Supported Supported
Project Supported Supported
Word Supported Supported Supported Supported
+ */ + 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 + * 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** + * + * For more information about Office application and server requirements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported applications, by platform* + * + * + * + * + * + * + * + *
Office on Windows Office in web browser Office on iPad Outlook on mobile devices Office on Mac
Excel Supported Supported Supported Supported
Outlook Supported Supported Supported Supported
PowerPoint Supported Supported Supported Supported
Project Supported Supported
Word Supported Supported Supported Supported
+ * + * @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 application 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 application, it will call + * the callback and resolve the promise with "null" for both the application and platform. + * + * @param callback - An optional callback function, that will receive the application 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 application 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** + * + * For more information about Office application and server requirements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported applications, by platform* + * + * + * + * + * + * + * + *
Office on Windows Office in web browser Office on iPad Outlook on mobile devices Office on Mac
Excel Supported Supported Supported
Outlook Supported Supported Supported Supported
PowerPoint Supported Supported Supported
Project Supported
Word Supported Supported Supported
+ * + * @param useShortNamespace True to use the shortcut alias; otherwise false to disable it. The default is true. + */ + function useShortNamespace(useShortNamespace: boolean): void; + /** + * Provides a method for associating action names with functions that carry out an action. + */ + const actions: Actions; + /** + * Represents the add-in. + */ + const addin: Addin; + /** + * Represents the Auth interface. + */ + const auth: Auth; + /** + * Represents the ribbon associated with the Office application. + */ + const ribbon: Ribbon; + /** + * Checks if the specified requirement set is supported by the Office application. + * @param name - Set name; e.g., "MatrixBindings". + * @param minVersion - The minimum required version; e.g., "1.4". + */ + function isSetSupported(name: string, minVersion?: string): boolean; + // Enumerations + /** + * Provides options to determine the startup behavior of the add-in upon next start-up. + */ + enum StartupBehavior { + /** + * The add-in does not load until opened by the user. + */ + none = 'None', + /** + * Load the add-in but do not show UI. + */ + load = 'Load', + } + /** + * Visibility mode of the add-in. + */ + enum VisibilityMode { + /** + * UI is Hidden + */ + hidden = 'Hidden', + /** + * Displayed as taskpane + */ + taskpane = 'Taskpane', + } + /** + * Specifies the result of an asynchronous call. + * + * @remarks + * + * Returned by the `status` property of the {@link Office.AsyncResult | AsyncResult} object. + */ + 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. + */ + 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 Office application in which the add-in is running. + * + * @remarks + * **Important**: In Outlook, this enum is available from Mailbox requirement set 1.5. + */ + enum HostType { + /** + * The Office application is Microsoft Word. + */ + Word, + /** + * The Office application is Microsoft Excel. + */ + Excel, + /** + * The Office application is Microsoft PowerPoint. + */ + PowerPoint, + /** + * The Office application is Microsoft Outlook. + */ + Outlook, + /** + * The Office application is Microsoft OneNote. + */ + OneNote, + /** + * The Office application is Microsoft Project. + */ + Project, + /** + * The Office application is Microsoft Access. + * + * **Important**: We no longer recommend that you create and use Access web apps and databases in SharePoint. + * As an alternative, we recommend that you use {@link https://powerapps.microsoft.com/ | Microsoft PowerApps} + * to build no-code business solutions for web and mobile devices. + */ + Access + } + /** + * Specifies the OS or other platform on which the Office application is running. + * + * @remarks + * **Important**: In Outlook, this enum is available from Mailbox requirement set 1.5. + */ + enum PlatformType { + /** + * The platform is PC (Windows). + */ + PC, + /** + * The platform is Office on the web (in a browser). + */ + OfficeOnline, + /** + * The platform is Mac. + */ + Mac, + /** + * The platform is 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. + * + * 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. + */ + asyncContext: any; + /** + * Gets an object that may provide additional information if an {@link Office.Error | error} occurred. + * + * @remarks + * + * This property returns additional information if the following errors occur with these supported APIs. + * + * *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. + */ + error: Office.Error; + /** + * Gets the {@link Office.AsyncResultStatus} of the asynchronous operation. + */ + 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. + */ + value: T; + } + /** + * Manages actions and keyboard shortcuts. + */ + interface Actions { + /** + * Associates the ID or name of an action with a function. + * + * @param actionId The ID of an action that is defined in an extended manifest or the name of the function as specified in a **FunctionName** element in the manifest. + * @param actionFunction The function that is run when the action is invoked. + */ + associate: (actionId: string, actionFunction: (arg?: any) => void) => void; + /** + * Replaces existing add-in shortcuts with custom shortcuts for the user. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/keyboard-shortcuts-requirement-sets | KeyboardShortcuts 1.1} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + * + * @param shortcuts An object of custom shortcuts with keys being the IDs of the actions (as defined in an extended manifest) and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2"}`. + * To learn how to specify a valid action ID and a key combination, see {@link https://learn.microsoft.com/office/dev/add-ins/design/keyboard-shortcuts | Add custom keyboard shortcuts to your Office Add-ins}. (Note that a key combination can be `null`, in which case, the action keeps the key combination specified in the JSON file.) + * @returns A promise that resolves when every custom shortcut assignment in `shortcuts` has been registered. Even if there is a conflict with existing shortcuts, the customized shortcut will be registered. + * Otherwise, the promise will be rejected with error code and error message. An "InvalidOperation" error code is returned if any action ID in `shortcuts` does not exist, or if shortcut combination is invalid. + */ + replaceShortcuts(shortcuts: {[actionId: string]: string}): Promise; + /** + * Gets the existing shortcuts for the add-in. The set always includes (1) the shortcuts defined in the add-in's extended manifest for keyboard shortcuts and (2) the current user's custom shortcuts if those exist. + * The shortcut can be `null` if it conflicts with the shortcut of another add-in or with the Office application. Specifically, it would be `null` if, when prompted to choose which shortcut to use, the user didn't choose the action of the current add-in. For more information about conflicts with shortcuts, see {@link https://learn.microsoft.com/office/dev/add-ins/design/keyboard-shortcuts#avoid-key-combinations-in-use-by-other-add-ins | Avoid key combinations in use by other add-ins}. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/keyboard-shortcuts-requirement-sets | KeyboardShortcuts 1.1} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + * + * @returns A promise that resolves to an object of shortcuts, with keys being the IDs of the actions (as defined in an extended manifest) and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2", "SetUnderline": null}`. + */ + getShortcuts(): Promise<{[actionId: string]: string|null}>; + /** + * Checks if a set of shortcut combinations are currently in use for the user, as defined by another add-in or by the Office application. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/keyboard-shortcuts-requirement-sets | KeyboardShortcuts 1.1} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + * + * @param shortcuts An array of shortcut combinations. For example, `["Ctrl+1", "Ctrl+2"]`. + * @returns A promise that resolves to an array of objects. Each object consists of a shortcut combination and Boolean value. The value is `true` if the shortcut combination conflicts with a shortcut of another add-in or with a shortcut of the Office application; otherwise, `false`. For example, `[{shortcut:"Ctrl+1", inUse:true},{shortcut:"Ctrl+2", inUse:false}]`. + */ + areShortcutsInUse(shortcuts: string[]): Promise<{shortcut: string, inUse: boolean}[]>; + } + /** + * Message used in the `onVisibilityModeChanged` invocation. + */ + interface VisibilityModeChangedMessage { + /** + * Visibility changed state. + */ + visibilityMode: Office.VisibilityMode; + } + /** + * Represents add-in level functionality for operating or configuring various aspects of the add-in. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + */ + interface Addin { + /** + * Sets the startup behavior for the add-in for when the document is opened next time. + * @param behavior - Specifies startup behavior of the add-in. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + */ + setStartupBehavior(behavior: Office.StartupBehavior): Promise; + /** + * Gets the current startup behavior for the add-in. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + */ + getStartupBehavior(): Promise; + /** + * Shows the task pane associated with the add-in. + * @returns A promise that is resolved when the UI is shown. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + */ + showAsTaskpane(): Promise; + /** + * Hides the task pane. + * @returns A promise that is resolved when the UI is hidden. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + */ + hide(): Promise; + /** + * Adds a handler for the `onVisibilityModeChanged` event. + * @param handler - The handler function that is called when the event is emitted. This function takes in a message for the receiving component. + * @returns A promise that resolves to a function when the handler is added. Calling it removes the handler. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1} + */ + onVisibilityModeChanged( + handler: (message: VisibilityModeChangedMessage) => void, + ): Promise<() => Promise>; + /** + * Represents a modal notification dialog that can appear when the user attempts to close a document. The document won't close until the user responds. + * This API is only supported in Excel. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} + */ + beforeDocumentCloseNotification: BeforeDocumentCloseNotification; + } + /** + * Represents a modal notification dialog that can appear when the user attempts to close a document. The document won't close until the user responds. + * The notification dialog will allow the user to confirm the request to close the document or cancel the request to close the document. + * This API is only supported in Excel. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} + */ + interface BeforeDocumentCloseNotification { + /** + * Enable a modal notification dialog that appears when the user attempts to close a document. The document won't close until the user responds. + * This notification dialog asks the user to confirm the request to close the document, or allows the user to cancel the request to close the document. + * The `BeforeDocumentCloseNotification` API is only supported in Excel. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} + */ + enable(): Promise; + + /** + * Prevents the notification dialog from appearing when the user attempts to close a document. + * The `BeforeDocumentCloseNotification` API is only supported in Excel. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} + */ + disable(): Promise; + + /** + * Adds an event handler that detects when the `BeforeDocumentCloseNotification` close operation is cancelled. + * This event handler will be triggered if both of the following conditions are met. + * + * 1. The add-in calls the `enable` method on the `BeforeDocumentCloseNotification` object. + * + * 2. When the notification dialog is open, the end user clicks the **Don't close** button within the dialog, clicks the Close button in the upper right corner of the dialog, or presses the Esc key. + * + * The `BeforeDocumentCloseNotification` API is only supported in Excel. + * @param handler The event handler that is called when the dialog is cancelled. + * @returns A promise that resolves when the event handler is added. + * + * @remarks + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.2} + */ + onCloseActionCancelled( + handler: () => void + ): Promise<() => Promise>; + } + /** + * An interface that contains all the functionality provided to manage the state of the Office ribbon. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + */ + interface Ribbon { + /** + * Registers a custom contextual tab with Office and defines the tab's controls. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.2} + * + * This method only requests that the tab be registered. The actual registration is controlled by the Office application and may not be complete when the returned `Promise` object is resolved. + * For more information and code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}. + * + * @param tabDefinition - Specifies the tab's properties and child controls and their properties. This parameter isn't strongly typed because its shape is defined by a JSON schema that can be versioned. To create the parameter object, pass a JSON string that conforms to the Office {@link https://developer.microsoft.com/json-schemas/office-js/dynamic-ribbon.schema.json | dynamic-ribbon JSON schema} to `JSON.parse`, and then pass the returned object to this method. To get IntelliSense for the JSON in Visual Studio Code, see {@link https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings | Editing JSON with Visual Studio Code - JSON schemas and settings }. + */ + requestCreateControls(tabDefinition: Object): Promise; + /** + * Sends a request to Office to update the ribbon. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + * + * Note that this API is only to request an update. The actual UI update to the ribbon is controlled by the Office application and hence the exact timing of the ribbon update (or refresh) cannot be determined by the completion of this API. + * + * For code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Enable and Disable Add-in Commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}. + * + * @param input - Represents the updates to be made to the ribbon. Note that only the changes specified in the input parameter are made. + */ + requestUpdate(input: RibbonUpdaterData): Promise; + } + /** + * Specifies changes to the ribbon, such as the enabled or disabled status of a button. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + */ + interface RibbonUpdaterData { + /** + * Collection of tabs whose state is set with the call of `requestUpdate`. + */ + tabs: Tab[]; + } + /** + * Represents an individual tab and the state it should have. For code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Enable and Disable Add-in Commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + */ + interface Tab { + /** + * Identifier of the tab as specified in the manifest. + */ + id: string; + /** + * Specifies one or more of the controls in the tab, such as menu items, buttons, etc. + * + * @remarks + * + * When the `Tab` object is part of an {@link Office.RibbonUpdaterData} object passed to the `requestUpdate` method of {@link Office.Ribbon}, this property specifies the IDs of the controls whose enabled status is to be changed. However, if there is a `groups` property on the tab, then this property is ignored and the `controls` properties of the specified groups must be used to change enabled status. + */ + controls?: Control[]; + /** + * Specifies whether the tab is visible on the ribbon. Used only with contextual tabs. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.2} + */ + visible?: boolean; + /** + * Specifies one or more of the control groups on the tab. + * + * @remarks + * + * When the `Tab` object is part of an {@link Office.RibbonUpdaterData} object passed to the `requestUpdate` method of {@link Office.Ribbon}, the `controls` properties of the various {@link Office.Group} objects specify which controls have their enabled status changed; the `controls` property of the `Tab` object is ignored. + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + */ + groups?: Group[]; + } + /** + * Represents a group of controls on a ribbon tab. + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + */ + interface Group { + /** + * Identifier of the group as specified in the manifest. + * + */ + id: string; + /** + * Specifies one or more of the controls in the group, such as menu items, buttons, etc. + * + * @remarks + * + * When the `Group` object is part of an {@link Office.RibbonUpdaterData} object passed to the `requestUpdate` method of {@link Office.Ribbon}, the `controls` properties of the various {@link Office.Group} objects specify which controls have their enabled status changed; the `controls` property of the `Group` object's parent `Tab` object is ignored. + */ + controls?: Control[]; + } + /** + * Represents an individual control or command and the state it should have. + * + * @remarks + * + * For code samples showing how to use a `Control` object and its properties, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Enable and Disable Add-in Commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}. + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1} + */ + interface Control { + /** + * Identifier of the control as specified in the manifest. + */ + id: string; + /** + * Indicates whether the control should be enabled or disabled. The default is true. + */ + enabled?: boolean; + } + /** + * 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 + * + * **Applications**: Excel, Outlook, PowerPoint, Project, Word + */ + interface Context { + /** + * Provides information and access to the signed-in user. + * + * @beta + */ + auth: Auth; + /** + * True, if the current platform allows the add-in to display a UI for selling or upgrading; otherwise returns False. + * + * @remarks + * + * **Applications**: Excel, Word + * + * `commerceAllowed` is only supported in Office on iPad. + * + * The iOS App Store doesn't support apps with add-ins that provide links to additional payment systems. However, Office Add-ins running in + * Office on the Windows desktop or 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. + */ + 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 + * application. + * + * **Support details** + * + * For more information about Office application and server requirements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported applications, by platform* + * + * + * + * + * + * + * + *
Office on Windows Office in web browser Office on iPad Outlook on mobile devices Office on Mac
Excel Supported Supported Supported
Outlook Supported Supported Supported Supported
PowerPoint Supported Supported Supported
Project Supported
Word Supported Supported Supported
+ */ + contentLanguage: string; + /** + * Gets information about the environment in which the add-in is running. + * + * @remarks + * **Important**: In Outlook, this property is available from Mailbox requirement set 1.5. + * For all Mailbox requirement sets, you can use the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-diagnostics-member | Office.context.mailbox.diagnostics} + * property to get similar information. + */ + diagnostics: ContextInformation; + /** + * Gets the locale (language) specified by the user for the UI of the Office 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 + * application. + * + * When using in Outlook, the applicable modes are Compose or Read. + * + * **Support details** + * + * For more information about Office application and server requirements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported applications, by platform* + * + * + * + * + * + * + * + *
Office on Windows Office in web browser Office on iPad Outlook on mobile devices Office on Mac
Excel Supported Supported Supported Supported
Outlook Supported Supported Supported Supported
PowerPoint Supported Supported Supported Supported
Project Supported Supported
Word Supported Supported Supported
+ */ + displayLanguage: string; + /** + * Gets an object that represents the document the content or task pane add-in is interacting with. + */ + document: Office.Document; + /** + * Contains the Office application in which the add-in is running. + * + * @remarks + * **Important**: In Outlook, this property is available from Mailbox requirement set 1.5. You can also use the + * `Office.context.diagnostics` property to get the application starting with requirement set 1.5. For all + * Mailbox requirement sets, you can use the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-diagnostics-member | Office.context.mailbox.diagnostics} + * property to get similar information. + */ + host: HostType; + /** + * Gets the license information for the user's Office installation. + */ + license: string; + /** + * Provides access to the Microsoft Outlook add-in object model. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Key properties**: + * + * - `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. + */ + mailbox: Office.Mailbox; + /** + * Provides access to the properties for Office theme colors. + */ + officeTheme: OfficeTheme; + /** + * Provides the platform on which the add-in is running. + * + * @remarks + * **Important**: In Outlook, this property is available from Mailbox requirement set 1.5. You can also use the + * `Office.context.diagnostics` property to get the platform starting with requirement set 1.5. For all + * Mailbox requirement sets, you can use the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-diagnostics-member | Office.context.mailbox.diagnostics} + * property to get similar information. + */ + platform: PlatformType; + /** + * Provides a method for determining what requirement sets are supported on the current Office application 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 it's available to + * that add-in when it is running from any client application used to access that mailbox. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + roamingSettings: Office.RoamingSettings; + /** + * Gets the object to check the status of the catalog of sensitivity labels in Outlook and retrieve all available + * sensitivity labels if the catalog is enabled. + * + * @remarks + * + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + sensitivityLabelsCatalog: Office.SensitivityLabelsCatalog; + /** + * 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 + * + * **Applications**: Excel, PowerPoint, Word + * + * `touchEnabled` is only supported in Office on iPad. + * + * 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. + */ + 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. + */ + interface Error { + /** + * Gets the numeric code of the error. For a list of error codes, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/javascript-api-for-office-error-codes | JavaScript API for Office error codes}. + */ + code: number; + /** + * Gets a detailed description of the error. + */ + message: string; + /** + * Gets the name of the error. + */ + name: string; + } + namespace AddinCommands { + /** + * The `Event` object is passed as a parameter to add-in functions invoked by function command buttons. The object allows the add-in to identify + * which button was clicked and to signal the Office application that it has completed its processing. + * + * @remarks + * + * See {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/add-in-commands-requirement-sets | Add-in commands requirement sets} for more support information. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface Event { + /** + * Information about the control that triggered calling this function. + * + * @remarks + * + * This property is supported in Outlook only in {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | requirement set} Mailbox 1.3 and later. + */ + source:Source; + /** + * Indicates that the add-in has completed processing and will automatically be closed. + * + * This method must be called at the end of a function which was invoked by the following: + * + * - A function command button (that is, an add-in command defined with an `Action` element, where the `xsi:type` attribute is set to `ExecuteFunction`). + * + * - An event defined in the {@link https://learn.microsoft.com/javascript/api/manifest/extensionpoint#launchevent | LaunchEvent extension point}. + * For example, an `OnMessageSend` event. + * + * - An {@link https://learn.microsoft.com/javascript/api/manifest/event | event} defined in the + * {@link https://learn.microsoft.com/javascript/api/manifest/extensionpoint#events | Events extension point}. For example, an `ItemSend` event. + * + * - An event defined in the + * {@link https://learn.microsoft.com/javascript/api/manifest/extensionpoint?view=outlook-js-preview&preserve-view=true#reportphishingcommandsurface-preview | ReportPhishingCommandSurface extension point (preview)}. + * + * @remarks + * + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Note**: The `options` parameter was introduced in Mailbox 1.8. + * + * @param options Optional. An object that specifies behavior options for when the event is completed. + */ + completed(options?: EventCompletedOptions): void; + } + /** + * Specifies the behavior for when the event is completed. + */ + interface EventCompletedOptions { + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method} + * to signal completion of an event handler, this property indicates if the handled event should continue execution or be canceled. + * For example, an add-in that handles the `OnMessageSend` or `OnAppointmentSend` event can set `allowEvent` to `false` to cancel the + * sending of an item. For a complete sample, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}. + * + * **Important**: Only applicable to add-ins that implement {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}. + * + * @remarks + * + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + allowEvent?: boolean; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method} + * to signal completion of an event handler and set its `allowEvent` property to `false`, this property sets the error message + * that will be displayed to the user. For an example, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}. + * + * **Important**: Only applicable to add-ins that implement {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}. + * + * @remarks + * + * [Api set: Mailbox 1.12] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + errorMessage?: string; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method} + * to signal that a reported message has finished processing, this property specifies the Outlook mailbox folder to which the message will be moved. + * + * **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam reporting feature}. + * + * @remarks + * + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - If the specified folder doesn't exist yet, it will be created before the message is moved. + * + * - If the `postProcessingAction` property is set to `moveToCustomFolder`, the `folderName` property must be specified. + * Otherwise, the reported message is moved to the Junk Email folder of the mailbox. If `postProcessingAction` is set to another action other than `moveToCustomFolder`, + * the `folderName` property is ignored. + * + * @beta + */ + folderName?: string; + /** + * When set to `true`, deletes a reported message if an error occurs while the message is processed. + * If this property is set to `false` or isn't specified in the + * {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method}, + * the reported message remains in its current mailbox folder. + * + * **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam reporting feature}. + * + * @remarks + * + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + onErrorDeleteItem?: boolean; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method} + * to signal that a reported message has finished processing, this property specifies the next action to be performed on the message. The following post-processing actions are available: + * + * - `delete` - Deletes the reported message. + * + * - `moveToCustomFolder` - Moves the reported message to a specified folder. You must specify the name of the folder in the `folderName` property. + * + * - `moveToSpamFolder` - Moves the reported message to the Junk Email folder of the mailbox. + * + * - `noMove` - Leaves the reported message in its current folder. + * + * **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam reporting feature}. + * + * @remarks + * + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: If the property is set to `moveToCustomFolder`, you must specify the name of the folder to which the message will be moved in the `folderName` + * property of the `event.completed` call. Otherwise, the `postProcessingAction` property will default to `moveToSpamFolder` and move the reported message to the + * Junk Email folder. + * + * @beta + */ + postProcessingAction?: string; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method} + * to signal that a reported message has finished processing, this property indicates if a post-processing dialog is shown to the user. The JSON object assigned to this property + * must contain a title and a description. If this property isn't specified, a dialog isn't shown to the user once their reported message is processed. + * + * **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam reporting feature}. + * + * @remarks + * + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + showPostProcessingDialog?: object; + } + /** + * 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. + */ + 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://learn.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 { + /** + * Adds an event handler to the object using the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi 1.2} + * + * You can add multiple event handlers for the specified event type as long as the name of each event handler function is unique. + * + * @param eventType Specifies the type of event to add. This must be `Office.EventType.DialogParentMessageReceived`. + * @param handler The event handler function to add, whose only parameter is of type {@link Office.DialogParentMessageReceivedEventArgs}. + * @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 handler registration returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addHandlerAsync(eventType: Office.EventType, handler: (result: DialogParentMessageReceivedEventArgs) => void, options: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds an event handler to the object using the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi 1.2} + * + * You can add multiple event handlers for the specified event type as long as the name of each event handler function is unique. + * + * @param eventType Specifies the type of event to add. This must be `Office.EventType.DialogParentMessageReceived`. + * @param handler The event handler function to add, whose only parameter is of type {@link Office.DialogParentMessageReceivedEventArgs}. + * @param callback Optional. A function that is invoked when the handler registration returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addHandlerAsync(eventType: Office.EventType, handler: (result: DialogParentMessageReceivedEventArgs) => void, callback?: (result: AsyncResult) => void): void; + /** + * Displays a dialog to show or collect information from the user or to facilitate Web navigation. + * + * @remarks + * + * **Applications**: Excel, Outlook, PowerPoint, Word + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | Mailbox 1.4} + * + * This method is available in the DialogApi requirement set for Excel, PowerPoint, or Word 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://learn.microsoft.com/office/dev/add-ins/develop/specify-office-hosts-and-api-requirements | Specify Office applications and API requirements}, if you're using the XML manifest. If you're using the Teams manifest (preview), see {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * 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 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. + * + * **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 AppDomains 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.
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 + * following information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse
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 full HTTPS URL that opens in the dialog. Relative URLs must not be used. + * @param options - Optional. Accepts an {@link Office.DialogOptions} object to define dialog display. + * @param callback - Optional. Accepts a callback function 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; + /** + * Displays a dialog to show or collect information from the user or to facilitate Web navigation. + * + * @remarks + * + * **Applications**: Excel, Outlook, PowerPoint, Word + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | Mailbox 1.4} + * + * This method is available in the DialogApi requirement set for Excel, PowerPoint, or Word 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://learn.microsoft.com/office/dev/add-ins/develop/specify-office-hosts-and-api-requirements | Specify Office applications and API requirements}, if you're using the XML manifest. If you're using the Teams manifest (preview), see {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * 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 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. + * + * **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 AppDomains 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.
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 + * following information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse
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 full HTTPS URL that opens in the dialog. Relative URLs must not be used. + * @param callback - Optional. Accepts a callback function to handle the dialog creation attempt. If successful, the AsyncResult.value is a Dialog object. + */ + displayDialogAsync(startAddress: string, callback?: (result: AsyncResult) => void): void; + /** + * Delivers a message from the dialog box to its parent/opener page. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} + * + * - If the `messageOptions` parameter is used, {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1} is also required. + * + * @param message Accepts a message from the dialog to deliver to the add-in. Anything that can serialized to a string including JSON and XML can be sent. + * @param messageOptions Optional. Provides options for how to send the message. + */ + messageParent(message: string, messageOptions?: DialogMessageOptions): void; + /** + * Closes the UI container where the JavaScript is executing. + * + * @remarks + * + * **Applications**: Excel, Outlook (Minimum requirement set: Mailbox 1.5), PowerPoint, Word + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | 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 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. + */ + closeContainer(): void; + /** + * Opens a browser window and loads the specified URL. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/open-browser-window-api-requirement-sets | OpenBrowserWindowApi 1.1} + * + * @param url The full URL to be opened including protocol (e.g., https), and port number, if any. + */ + openBrowserWindow(url: string): void; + } + /** + * Provides information about which Requirement Sets are supported in the current environment. + */ + interface RequirementSetSupport { + /** + * Check if the specified requirement set is supported by the Office application. + * @param name - The requirement set name (e.g., "ExcelApi"). + * @param minVersion - The minimum required version (e.g., "1.4"). + */ + isSetSupported(name: string, minVersion?: string): boolean; + + /** + * Check if the specified requirement set is supported by the Office application. + * + * **Warning**: This overload of `isSetSupported` (where `minVersionNumber` is a number) has been deprecated. Use the string overload of `isSetSupported` instead. + * + * @deprecated Use the string overload of `isSetSupported` instead. + * @param name - The requirement set name (e.g., "ExcelApi"). + * @param minVersionNumber - The minimum required version (e.g., 1.4). + */ + isSetSupported(name: string, minVersionNumber?: number): boolean; + } + /** + * Provides options for how a dialog is displayed. + */ + interface DialogOptions { + /** + * Defines the height of the dialog as a percentage of the current display. Defaults to 80%. 250px minimum. + */ + height?: number, + /** + * Defines the width 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 on the web, 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 + /** + * Determines if the pop-up blocker dialog will be shown to the user. Defaults to true. + * + * `true` - The framework displays a pop-up to trigger the navigation and avoid the browser's pop-up blocker. + * `false` - The dialog will not be shown and the developer must handle pop-ups (by providing a user interface artifact to trigger the navigation). + */ + promptBeforeOpen?: 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 + } + /** + * The Office Auth namespace, `Office.auth`, provides a method that allows the Office client application to obtain an access token to the add-in's web application. + * Indirectly, this also enables the add-in to access the signed-in user's Microsoft Graph data without requiring the user to sign in a second time. + */ + interface Auth { + /** + * Calls the Azure Active Directory V 2.0 endpoint to get an access token to your add-in's web application. Enables add-ins to identify users. + * Server-side code can use this token to access Microsoft Graph for the add-in's web application by using the + * {@link https://learn.microsoft.com/azure/active-directory/develop/active-directory-v2-protocols-oauth-on-behalf-of | "on behalf of" OAuth flow}. + * + * **Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail mailbox. + * + * **Warning**: `getAccessTokenAsync` has been deprecated. Use `Office.auth.getAccessToken` instead. + * + * @deprecated Use `Office.auth.getAccessToken` instead. + * + * @remarks + * + * **Applications**: Excel, OneNote, Outlook, PowerPoint, Word + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3} + * + * This API requires a single sign-on configuration that bridges the add-in to an Azure application. Office users sign in with Organizational + * Accounts and Microsoft Accounts. Microsoft Azure returns tokens intended for both user account types to access resources in the Microsoft Graph. + * + * @param options - Optional. Accepts an `AuthOptions` object to define sign-on behaviors. + * @param callback - Optional. Accepts a callback function that can parse the token for the user's ID or use the token in the "on behalf of" flow to get access to Microsoft Graph. + * If `AsyncResult.status` is "succeeded", then `AsyncResult.value` is the raw AAD v. 2.0-formatted access token. + */ + getAccessTokenAsync(options?: AuthOptions, callback?: (result: AsyncResult) => void): void; + /** + * Calls the Azure Active Directory V 2.0 endpoint to get an access token to your add-in's web application. Enables add-ins to identify users. + * Server-side code can use this token to access Microsoft Graph for the add-in's web application by using the + * {@link https://learn.microsoft.com/azure/active-directory/develop/active-directory-v2-protocols-oauth-on-behalf-of | "on behalf of" OAuth flow}. + * + * **Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail mailbox. + * + * **Warning**: `getAccessTokenAsync` has been deprecated. Use `Office.auth.getAccessToken` instead. + * + * @deprecated Use `Office.auth.getAccessToken` instead. + * + * @remarks + * + * **Applications**: Excel, OneNote, Outlook, PowerPoint, Word + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3} + * + * This API requires a single sign-on configuration that bridges the add-in to an Azure application. Office users sign in with Organizational + * Accounts and Microsoft Accounts. Microsoft Azure returns tokens intended for both user account types to access resources in the Microsoft Graph. + * + * @param callback - Optional. Accepts a callback function that can parse the token for the user's ID or use the token in the "on behalf of" flow to get access to Microsoft Graph. + * If `AsyncResult.status` is "succeeded", then `AsyncResult.value` is the raw AAD v. 2.0-formatted access token. + */ + getAccessTokenAsync(callback?: (result: AsyncResult) => void): void; + /** + * Calls the Azure Active Directory V 2.0 endpoint to get an access token to your add-in's web application. Enables add-ins to identify users. + * Server-side code can use this token to access Microsoft Graph for the add-in's web application by using the + * {@link https://learn.microsoft.com/azure/active-directory/develop/active-directory-v2-protocols-oauth-on-behalf-of | "on behalf of" OAuth flow}. + * This API requires a single sign-on configuration that bridges the add-in to an Azure application. Office users sign in with Organizational + * Accounts and Microsoft Accounts. Microsoft Azure returns tokens intended for both user account types to access resources in the Microsoft Graph. + * + * @remarks + * + * **Applications**: Excel, OneNote, Outlook, PowerPoint, Word + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3} + * + * **Important**: + * + * - In Outlook, this API isn't supported if you load an add-in in an Outlook.com or Gmail mailbox. + * + * - In Outlook on the web, this API isn't supported if you use the Safari browser. This results in error 13001 ("The user is not signed into Office"). + * + * - In Outlook on the web, if you use the + * {@link https://learn.microsoft.com/javascript/api/office/office.ui#office-office-ui-displaydialogasync-member(1) | displayDialogAsync} + * method to open a dialog, you must close the dialog before you can call `getAccessToken`. + * + * - In an Outlook event-based activation add-in, this API is supported in Outlook on Windows starting from Version 2111 (Build 14701.20000). + * To retrieve an access token in older builds, use + * {@link https://learn.microsoft.com/javascript/api/office-runtime/officeruntime.auth?view=common-js-preview#office-runtime-officeruntime-auth-getaccesstoken-member(1) | + * OfficeRuntime.auth.getAccessToken} instead. For more information, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-sso-in-event-based-activation | Enable single sign-on (SSO) in Outlook add-ins that use event-based activation}. + * + * @param options - Optional. Accepts an `AuthOptions` object to define sign-on behaviors. + * @returns Promise to the access token. + */ + getAccessToken(options?: AuthOptions): Promise; + } + /** + * Provides options for the user experience when Office obtains an access token to the add-in from AAD v. 2.0 with the `getAccessToken` method. + */ + interface AuthOptions { + /** + * Allows Office to get an access token silently or through interactive consent, if one is required. Default value is `false`. + * If set to `false`, Office will silently try to get an access token. If it fails to do so, Office will return a descriptive error. + * If set to `true`, Office will show an interactive consent UI after it fails to silently get an access token. + * The prompt will only allow consent to the AAD profile scope, not to any Microsoft Graph scopes. + */ + allowConsentPrompt?: boolean; + /** + * Allows Office to get an access token silently provided consent is present or show interactive UI to sign in the user. Default value is `false`. + * If set to `false`, Office will silently try to get an access token. If it fails to do so, Office will return a descriptive error. + * If set to `true`, Office will show an interactive sign-in UI after it fails to silently get an access token. + */ + allowSignInPrompt?: boolean; + /** + * Prompts the user to add their Office account (or to switch to it, if it is already added). Default value is `false`. + * + * **Warning**: `forceAddAccount` has been deprecated. Use `allowSignInPrompt` instead. + * + * @deprecated Use `allowSignInPrompt` instead. + */ + forceAddAccount?: boolean; + /** + * Causes Office to display the add-in consent experience. Useful if the add-in's Azure permissions have changed or if the user's consent has + * been revoked. Default value is `false`. + * + * **Warning**: `forceConsent` has been deprecated. Use `allowConsentPrompt` instead. + * + * @deprecated Use `allowConsentPrompt` instead. + */ + forceConsent?: boolean; + /** + * Causes Office to prompt the user to provide the additional factor when the tenancy being targeted by Microsoft Graph requires multifactor + * authentication. The string value identifies the type of additional factor that is required. In most cases, you won't know at development + * time whether the user's tenant requires an additional factor or what the string should be. So this option would be used in a "second try" + * call of `getAccessToken` after Microsoft Graph has sent an error requesting the additional factor and containing the string that should + * be used with the `authChallenge` option. + */ + authChallenge?: 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; + /** + * Causes Office to return a descriptive error when the add-in wants to access Microsoft Graph and the user/admin has not granted consent to Graph scopes. Default value is `false`. + * Office only supports consent to Graph scopes when the add-in has been deployed by a tenant admin. + * Setting this option to `true` will cause Office to inform your add-in beforehand (by returning a descriptive error) if Graph access will fail. + * + * @remarks + * + * **Note**: If you're developing an Outlook add-in that uses single sign-on (SSO), comment out the `forMSGraphAccess` option before sideloading the add-in for testing. + * Otherwise, you'll receive {@link https://learn.microsoft.com/office/dev/add-ins/develop/troubleshoot-sso-in-office-add-ins#13012 | error 13012}. For additional guidance, see + * {@link https://learn.microsoft.com/office/dev/add-ins/develop/authorize-to-microsoft-graph#details-on-sso-with-an-outlook-add-in | Details on SSO with an Outlook add-in}. + */ + forMSGraphAccess?: boolean; + } + /** + * 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. + * + * @remarks + * **Important**: In Outlook, this object is available from Mailbox requirement set 1.5. + * For all Mailbox requirement sets, you can use the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-diagnostics-member | Office.context.mailbox.diagnostics} + * property to get similar information. + */ + interface ContextInformation { + /** + * Gets the Office application 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. + * + * **Important**: We no longer recommend that you create and use Access web apps and databases in SharePoint. + * As an alternative, we recommend that you use {@link https://powerapps.microsoft.com/ | Microsoft PowerApps} + * to build no-code business solutions for web and mobile devices. + */ + 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?: RangeFormatConfiguration[] + /** + * 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. + * + * **Important**: We no longer recommend that you create and use Access web apps and databases in SharePoint. + * As an alternative, we recommend that you use {@link https://powerapps.microsoft.com/ | Microsoft PowerApps} + * to build no-code business solutions for web and mobile devices. + */ + 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. + * + * **Important**: We no longer recommend that you create and use Access web apps and databases in SharePoint. + * As an alternative, we recommend that you use {@link https://powerapps.microsoft.com/ | Microsoft PowerApps} + * to build no-code business solutions for web and mobile devices. + */ + 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 a particular handler is not specified, then all handlers for the specified event type are removed. + */ + handler?: (eventArgs?: Office.BindingDataChangedEventArgs | Office.BindingSelectionChangedEventArgs) => any + /** + * 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. + * + * **Important**: We no longer recommend that you create and use Access web apps and databases in SharePoint. + * As an alternative, we recommend that you use {@link https://powerapps.microsoft.com/ | Microsoft PowerApps} + * to build no-code business solutions for web and mobile devices. + */ + 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 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?: 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 setting the size of slices that the document will be divided into. + */ + interface GetFileOptions { + /** + * 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 Office application: + * + * 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?: RangeFormatConfiguration[] + /** + * 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 { + /** + * **Warning**: This setting has been deprecated and should not be used. It has no effect on most platforms and will cause errors if set to `false` in Excel on the web. + * + * @deprecated `overwriteIfStale` is no longer supported. + */ + 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 applications. Using Office theme colors is appropriate for mail and + * task pane add-ins. + * + * @remarks + * + * *Supported applications, by platform* + * + * + * + * + * + * + *
Office on Windows Office on the web
Excel Supported
Outlook Preview
PowerPoint Supported
Word Supported Supported
+ */ + 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 control foreground 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. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi} + */ + interface Dialog { + /** + * Called from a parent page to close the corresponding dialog box. + * + * This method is asynchronous. It does not take a callback parameter and it does not return a Promise object, so it cannot be awaited with either the `await` keyword or the `then` function. See this best practice for more information: {@link https://learn.microsoft.com/office/dev/add-ins/develop/dialog-best-practices#opening-another-dialog-immediately-after-closing-one | Opening another dialog immediately after closing one} + */ + 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. + * + * @param eventType Must be either DialogMessageReceived or DialogEventReceived. + * @param handler A function which accepts either an object with a `message` and `origin` property, if `eventType` is `DialogMessageReceived`, or an object with an `error` property, if `eventType` is `DialogEventReceived`. Note that the `origin` property is `undefined` on clients that don’t support {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1}. + */ + addEventHandler(eventType: Office.EventType, handler: (args: {message: string, origin: string | undefined} | {error: number}) => void): void; + /** + * Delivers a message from the host page, such as a task pane or a UI-less function file, to a dialog that was opened from the page. + * + * @remarks + * + * **Applications**: Excel, Outlook (Minimum requirement set: Mailbox 1.9), PowerPoint, Word + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi 1.2} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | Mailbox 1.9} + * + * - If the `messageOptions` parameter is used, {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1} is also required. + * + * @param message Accepts a message from the host page to deliver to the dialog. Anything that can be serialized to a string, including JSON and XML, can be sent. + * @param messageOptions Optional. Provides options for how to send the message. + */ + messageChild(message: string, messageOptions?: DialogMessageOptions): void; + /** + * FOR INTERNAL USE ONLY. DO NOT CALL IN YOUR CODE. + */ + sendMessage(name: string): void; + } + /** + * Returns a promise of an object described in the expression. Callback is invoked only if the function 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** + * + * For more information about Office application and server requirements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported applications, by platform* + * + * + * + * + *
Office on Windows Office in web browser Office on iPad
Excel Supported Supported Supported
Word Supported Supported
+ */ + 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. + */ + enum ActiveView { + /** + * The active view of the Office application only lets the user read the content in the document. + */ + Read, + /** + * The active view of the Office application lets the user edit the content in the document. + */ + Edit + } + /** + * Specifies the type of the binding object that should be returned. + */ + 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 + * + * Application and platform support for each `CoercionType` is specified in the following requirement set descriptions. + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion}, (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets | ImageCoercion 1.1} (when using `Office.CoercionType.Image`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets#imagecoercion-12 | ImageCoercion 1.2} (when using `Office.CoercionType.XmlSvg`) + * + */ + 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 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, + /** + * Data is returned or set as XML data containing an SVG image. + * **Note**: Only applies to data in Excel, Word, and PowerPoint. + */ + XmlSvg + } + /** + * 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. + */ + enum DocumentMode { + /** + * The document is read-only. + */ + ReadOnly, + /** + * The document can be read and written to. + */ + ReadWrite + } + /** + * Specifies the type of the XML node. + */ + 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. + * + * Only task pane add-ins for Outlook support Mailbox API set event types. + * + * @remarks + * + * **`BindingDataChanged` and `BindingSelectionChanged` applications**: Excel, Word. + * + */ + enum EventType { + /** + * A Document.ActiveViewChanged event was raised in PowerPoint. + * + * @remarks + * + * **Applications**: PowerPoint + */ + ActiveViewChanged, + /** + * Occurs when any date or time of the selected appointment or series is changed in Outlook. + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `AppointmentTimeChanged` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.appointmenttimechangedeventargs?view=outlook-js-1.7 | Office.AppointmentTimeChangedEventArgs}. + * + * [Api set: Mailbox 1.7] + */ + AppointmentTimeChanged, + /** + * Occurs when an attachment is added to or removed from an item. **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `AttachmentsChanged` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.attachmentschangedeventargs?view=outlook-js-1.8 | Office.AttachmentsChangedEventArgs}. + * + * [Api set: Mailbox 1.8] + */ + 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. + * The event handler receives an argument of type {@link Office.BindingDataChangedEventArgs}. + * + * @remarks + * + * **Applications**: Excel, Word + */ + 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 + * + * **Applications**: Excel, Word + */ + BindingSelectionChanged, + /** + * Triggers when Dialog has an event, such as dialog closed or dialog navigation failed. + */ + DialogEventReceived, + /** + * Triggers when a dialog sends a message via `messageParent`. + */ + DialogMessageReceived, + /** + * Triggers when a host page sends a message to a child dialog box with `messageChild`. + */ + DialogParentMessageReceived, + /** + * Triggers when a document-level selection happens. + * + * @remarks + * + * **Applications**: Excel, Word + */ + DocumentSelectionChanged, + /** + * Occurs when the appointment location is changed in Outlook. **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `EnhancedLocationsChanged` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.enhancedlocationschangedeventargs?view=outlook-js-1.8 | Office.EnhancedLocationsChangedEventArgs}. + * + * [Api set: Mailbox 1.8] + */ + EnhancedLocationsChanged, + /** + * Occurs in Outlook when an action is selected on a notification message with a defined + * {@link https://learn.microsoft.com/javascript/api/outlook/office.notificationmessagedetails#actions | custom action}. + * Currently, "Dismiss" is the only supported action that fires this event. + * + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `InfobarClicked` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.infobarclickedeventargs?view=outlook-js-1.10 | Office.InfobarClickedEventArgs}. + * + * [Api set: Mailbox 1.10] + */ + InfobarClicked, + /** + * Occurs when a different Outlook item is selected for viewing while the task pane is pinned. + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `ItemChanged` event, use the `addHandlerAsync` method of the `Mailbox` object. + * + * [Api set: Mailbox 1.5] + */ + 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, + /** + * Occurs when the OfficeTheme is changed in Outlook. **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `OfficeThemeChanged` event, use the `addHandlerAsync` method of the `Mailbox` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.officethemechangedeventargs?view=outlook-js-preview | Office.OfficeThemeChangedEventArgs}. + * + * [Api set: Mailbox preview] + * + * @beta + */ + OfficeThemeChanged, + /** + * Occurs when the recipient list of the selected item or the appointment location is changed in Outlook. + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `RecipientsChanged` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.recipientschangedeventargs?view=outlook-js-1.7 | Office.RecipientsChangedEventArgs}. + * + * [Api set: Mailbox 1.7] + */ + RecipientsChanged, + /** + * Occurs when the recurrence pattern of the selected series is changed in Outlook. + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `RecurrenceChanged` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.recurrencechangedeventargs?view=outlook-js-1.7 | Office.RecurrenceChangedEventArgs}. + * + * [Api set: Mailbox 1.7] + */ + RecurrenceChanged, + /** + * Triggers when a Resource selection happens in Project. + */ + ResourceSelectionChanged, + /** + * Occurs in Outlook when one or more messages are selected or deselected. + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `SelectedItemsChanged` event, use the `addHandlerAsync` method of the `Mailbox` object. + * + * [Api set: Mailbox 1.13] + */ + SelectedItemsChanged, + /** + * Occurs in Outlook when the sensitivity label of a message or appointment changes. + * **Important**: This event can only be handled in a task pane. It isn't supported by function commands. + * + * To add an event handler for the `SensitivityLabelChanged` event, use the `addHandlerAsync` method of the `Item` object. + * The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.sensitivitylabelchangedeventargs | Office.SensitivityLabelChangedEventArgs}. + * + * [Api set: Mailbox 1.13] + */ + SensitivityLabelChanged, + /** + * A Settings.settingsChanged event was raised. + * + * @remarks + * + * **Applications**: Excel, PowerPoint, Word + */ + SettingsChanged, + /** + * Occurs in Outlook when an unsolicited message is reported. The event handler receives an argument of type + * {@link https://learn.microsoft.com/javascript/api/outlook/office.spamreportingeventargs?view=outlook-js-preview&preserve-view=true | Office.SpamReportingEventArgs}. + * + * [Api set: Mailbox preview] + * + * @beta + */ + SpamReporting, + /** + * 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. + */ + enum FileType { + /** + * Returns only the text of the document as a string. + */ + Text, + /** + * Returns the entire document (.pptx, .docx, .xlsx, or .xlsm) in Office Open XML (OOXML) format as a byte array. + * + * Note: The .xslm file type is supported in Excel on Windows and Mac. It's not supported in Excel on the web. + * In Excel on Windows, the file slices from the `getFileAsync` method include the VBA signature files for .xslm file types. The VBA signature files are vbaProjectSignature.bin, vbaProbjectSignatureAgile.bin, and vbaProjectSignatureV3.bin. + * In Excel on Mac, the file slices from the `getFileAsync` method don't include the VBA signature files, because this platform doesn't support the VBA signature feature. + */ + Compressed, + /** + * Returns the entire document in PDF format as a byte array. + */ + Pdf + } + /** + * Specifies whether filtering from the Office application is applied when the data is retrieved. + */ + enum FilterType { + /** + * Return all data (not filtered by the Office application). + */ + All, + /** + * Return only the visible data (as filtered by the Office application). + */ + OnlyVisible + } + /** + * Specifies the type of place or object to navigate to. + */ + enum GoToType { + /** + * Goes to a binding object using the specified binding ID. + * + * Supported applications: 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 applications: Excel + */ + NamedItem, + /** + * Goes to a slide using the specified ID. + * + * Supported applications: PowerPoint + */ + Slide, + /** + * Goes to the specified index by slide number or {@link Office.Index}. + * + * Supported applications: PowerPoint + */ + Index + } + /** + * Specifies the relative PowerPoint slide. + */ + 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). + */ + 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 + * Office 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. + */ + enum ValueFormat { + /** + * Return unformatted data. + */ + Unformatted, + /** + * Return formatted data. + */ + Formatted + } + // Objects + /** + * Represents a binding to a section of the document. + * + * 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. + * + * @remarks + * + * **Applications**: Word, Excel (deprecated, use {@link https://learn.microsoft.com/javascript/api/excel/excel.binding?view=excel-js-preview | Excel.Binding} instead) + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + */ + 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 + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#bindingevents | BindingEvents} + * + * 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; + /** + * Adds an event handler to the object for the specified {@link Office.EventType}. Supported EventTypes are + * `Office.EventType.BindingDataChanged` and `Office.EventType.BindingSelectionChanged`. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#bindingevents | BindingEvents} + * + * 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 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, callback?: (result: Office.AsyncResult) => void): void; + /** + * Returns the data contained within the binding. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * 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; + /** + * Returns the data contained within the binding. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * 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 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(callback?: (result: AsyncResult) => void): void; + /** + * Removes the specified handler from the binding for the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#bindingevents | BindingEvents} + * + * @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; + /** + * Removes the specified handler from the binding for the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#bindingevents | BindingEvents} + * + * @param eventType The event type. For bindings, it can be `Office.EventType.BindingDataChanged` or `Office.EventType.BindingSelectionChanged`. + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Writes data to the bound section of the document represented by the specified binding object. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * 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"]].
A 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 a 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.
A TableData object, and the shape of the table matches the bound tableThe 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 on the web: + * + * - 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
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.asyncContextDefine an 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 Office application: + * + * string: Excel on the web and Windows, and Word on the web and Windows only + * + * array of arrays: Excel and Word only + * + * {@link Office.TableData}: Excel and Word only + * + * HTML: Word on the web and Windows 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; + /** + * Writes data to the bound section of the document represented by the specified binding object. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * 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"]].
A 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 a 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.
A TableData object, and the shape of the table matches the bound tableThe 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 on the web: + * + * - 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
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.asyncContextDefine an 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 Office application: + * + * string: Excel on the web and Windows, and Word on the web and Windows only + * + * array of arrays: Excel and Word only + * + * `TableData`: Excel and Word only + * + * HTML: Word on the web and Windows only + * + * Office Open XML: Word only + * + * @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, callback?: (result: AsyncResult) => void): void; + } + /** + * Provides information about the binding that raised the DataChanged event. + */ + 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. + */ + 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. + */ + document: Document; + /** + * Creates a binding against a named object in the document. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | 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. + * + * @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; + /** + * Creates a binding against a named object in the document. + * + * @remarks + * + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings}, + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings}, + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | 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. + * + * @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 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, callback?: (result: AsyncResult) => void): void; + /** + * Create a binding by prompting the user to make a selection on the document. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not 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. + * + * @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 by prompting the user to make a selection on the document. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not 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. + * + * @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 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, callback?: (result: AsyncResult) => void): void; + /** + * Create a binding based on the user's current selection. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | 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. + * + * @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 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; + /** + * Create a binding based on the user's current selection. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | 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. + * + * @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 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, callback?: (result: AsyncResult) => void): void; + /** + * Gets all bindings that were previously created. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * @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; + /** + * Gets all bindings that were previously created. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * @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(callback?: (result: AsyncResult) => void): void; + /** + * Retrieves a binding based on its Name + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * Fails if the specified ID does not exist. + * + * @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; + /** + * Retrieves a binding based on its Name + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * Fails if the specified ID does not exist. + * + * @param id Specifies the unique name of the binding object. 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 Binding object specified by the ID in the call. + */ + getByIdAsync(id: string, callback?: (result: AsyncResult) => void): void; + /** + * Removes the binding from the document + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * Fails if the specified ID does not exist. + * + * @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; + /** + * Removes the binding from the document + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixbindings | MatrixBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablebindings | TableBindings} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textbindings | TextBindings} + * + * Fails if the specified ID does not exist. + * + * @param id Specifies the unique name to be used to identify the binding object. Required. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + releaseByIdAsync(id: string, callback?: (result: AsyncResult) => void): void; + } + /** + * Represents an XML node in a tree in a document. + * + * @remarks + * + * **Applications**: Word + */ + interface CustomXmlNode { + /** + * Gets the base name of the node without the namespace prefix, if one exists. + */ + baseName: string; + /** + * Retrieves the string GUID of the CustomXMLPart. + */ + namespaceUri: string; + /** + * Gets the type of the CustomXMLNode. + */ + nodeType: string; + /** + * Gets the nodes associated with the XPath expression. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 nodes associated with the XPath expression. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param xPath The XPath expression that specifies the nodes to get. 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 an array of CustomXmlNode objects that represent the nodes specified by the XPath expression passed to the `xPath` parameter. + */ + getNodesAsync(xPath: string, callback?: (result: AsyncResult) => void): void; + /** + * Gets the node value. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 node value. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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(callback?: (result: AsyncResult) => void): void; + /** + * Gets the text of an XML node in a custom XML part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 text of an XML node in a custom XML part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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(callback?: (result: AsyncResult) => void): void; + /** + * Gets the node's XML. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Gets the node's XML. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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(callback?: (result: AsyncResult) => void): void; + /** + * Sets the node value. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Sets the node value. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param value The value to be set on the node + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setNodeValueAsync(value: string, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously sets the text of an XML node in a custom XML part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Asynchronously sets the text of an XML node in a custom XML part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param text Required. The text value of the XML node. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setTextAsync(text: string, callback?: (result: AsyncResult) => void): void; + /** + * Sets the node XML. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Sets the node XML. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param xml The XML to be set on the node + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setXmlAsync(xml: string, callback?: (result: AsyncResult) => void): void; + } + /** + * Represents a single CustomXMLPart in an {@link Office.CustomXmlParts} collection. + * + * @remarks + * + * **Applications**: Word + */ + 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 + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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; + /** + * Adds an event handler to the object using the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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 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, callback?: (result: AsyncResult) => void): void; + /** + * Deletes the Custom XML Part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Deletes the Custom XML Part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + deleteAsync(callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets any CustomXmlNodes in this custom XML part which match the specified XPath. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 any CustomXmlNodes in this custom XML part which match the specified XPath. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param xPath An XPath expression that specifies the nodes you want returned. 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 an array of CustomXmlNode objects that represent the nodes specified by the XPath expression passed to the xPath parameter. + */ + getNodesAsync(xPath: string, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the XML inside this custom XML part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Asynchronously gets the XML inside this custom XML part. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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(callback?: (result: AsyncResult) => void): void; + /** + * Removes an event handler for the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Removes an event handler for the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 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, callback?: (result: AsyncResult) => void): void; + } + /** + * Provides information about the deleted node that raised the nodeDeleted event. + */ + 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. + */ + 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. + */ + 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 + * + * **Applications**: Word + */ + interface CustomXmlParts { + /** + * Asynchronously adds a new custom XML part to a file. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 adds a new custom XML part to a file. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param xml The XML to add to the newly created custom XML part. + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the specified custom XML part by its ID. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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 by its ID. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param id The GUID of the custom XML part, including opening and closing braces. + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the specified custom XML parts by its namespace. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @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; + /** + * Asynchronously gets the specified custom XML parts by its namespace. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * @param ns The namespace URI. + * @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, callback?: (result: AsyncResult) => void): void; + } + /** + * Represents a collection of CustomXmlPart objects. + * + * @remarks + * + * **Applications**: Word + */ + interface CustomXmlPrefixMappings { + /** + * Asynchronously adds a prefix to namespace mapping to use when querying an item. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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 adds a prefix to namespace mapping to use when querying an item. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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 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, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the namespace mapped to the specified prefix. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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 namespace mapped to the specified prefix. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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 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, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the prefix for the specified namespace. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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; + /** + * Asynchronously gets the prefix for the specified namespace. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#customxmlparts | CustomXmlParts} + * + * 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 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, callback?: (result: AsyncResult) => void): void; + } + /** + * An abstract class that represents the document the add-in is interacting with. + * + * @remarks + * + * **Applications**: 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. + */ + bindings: Bindings; + /** + * Gets an object that represents the custom XML parts in the document. + */ + customXmlParts: CustomXmlParts; + /** + * Gets the mode the document is in. + */ + mode: DocumentMode; + /** + * Gets an object that represents the saved custom settings of the content or task pane add-in for the current document. + */ + settings: Settings; + /** + * Gets the URL of the document that the Office application currently has open. Returns null if the URL is unavailable. + */ + url: string; + /** + * Adds an event handler for a Document object event. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#documentevents | DocumentEvents} + * + * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. + * + * @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; + /** + * Adds an event handler for a Document object event. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#documentevents | DocumentEvents} + * + * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. + * + * @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 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, callback?: (result: AsyncResult) => void): void; + /** + * Returns the state of the current view of the presentation (edit or read). + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#activeview | ActiveView} + * + * Can trigger an event when the view changes. + * + * @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: + * Normal, Slide Sorter, 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 state of the current view of the presentation (edit or read). + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#activeview | ActiveView} + * + * Can trigger an event when the view changes. + * + * @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: + * Normal, Slide Sorter, or Outline View. "read" corresponds to either Slide Show or Reading View. + */ + getActiveViewAsync(callback?: (result: AsyncResult<"edit" | "read">) => void): void; + /** + * Returns the entire document file in slices of up to 4194304 bytes (4 MB). For add-ins on iPad, 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 sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#compressedfile | CompressedFile} (when using `Office.FileType.Compressed`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#file | File} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textfile | TextFile} (when using `Office.FileType.Text`) + * + * For add-ins running in Office applications other than Office on iPad, the `getFileAsync` method supports getting files in slices of up + * to 4194304 bytes (4 MB). For add-ins running in Office apps on iPad, 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 application. + * + * *Supported FileTypes, by platform* + * + * + * + * + * + *
Office on Windows Office on the web Office on iPad Office on Mac
Excel Compressed, Pdf, TextCompressed, Pdf Compressed, Pdf, Text
PowerPoint Compressed, Pdf Compressed, Pdf Compressed, PdfCompressed, Pdf
Word Compressed, Pdf, TextCompressed, Pdf, TextCompressed, PdfCompressed, Pdf, Text
+ * + * @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; + /** + * Returns the entire document file in slices of up to 4194304 bytes (4 MB). For add-ins on iPad, 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 sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#compressedfile | CompressedFile} (when using `Office.FileType.Compressed`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#file | File} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textfile | TextFile} (when using `Office.FileType.Text`) + * + * For add-ins running in Office applications other than Office on iPad, the `getFileAsync` method supports getting files in slices of up + * to 4194304 bytes (4 MB). For add-ins running in Office on iPad 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 application. + * + * *Supported FileTypes, by platform* + * + * + * + * + * + *
Office on Windows Office on the web Office on iPad Office on Mac
Excel Compressed, Pdf, TextCompressed, Pdf Compressed, Pdf, Text
PowerPoint Compressed, Pdf Compressed, Pdf Compressed, PdfCompressed, Pdf
Word Compressed, Pdf, TextCompressed, Pdf, TextCompressed, PdfCompressed, Pdf, Text
+ * + * @param fileType The format in which the file will be returned + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Gets file properties of the current document. + * + * @remarks + * + * **Requirement sets**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * You get the file's URL with the url property `asyncResult.value.url`. + * + * @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; + /** + * Gets file properties of the current document. + * + * @remarks + * + * **Requirement sets**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * You get the file's URL with the url property `asyncResult.value.url`. + * + * @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(callback?: (result: AsyncResult) => void): void; + /** + * Reads the data contained in the current selection in the document. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * 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
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.asyncContextDefine an 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 Office application. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
CoercionTypeSupported applications
Office.CoercionType.Html- Word
Office.CoercionType.Matrix (array of arrays)- Excel
- Word
Office.CoercionType.Ooxml (Office Open XML)- Word
Office.CoercionType.SlideRange- PowerPoint
Office.CoercionType.Table (TableData object)- Excel
- Word
Office.CoercionType.Text (string)- Excel
- PowerPoint
- Project
- Word
Office.CoercionType.XmlSvg- Excel on Windows and on Mac
- PowerPoint on Windows, on Mac, and on the web
- Word on Windows and on Mac
+ * + * @param coercionType The type of data structure to return. See the Remarks section for each application'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; + /** + * Reads the data contained in the current selection in the document. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * 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
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.asyncContextDefine an 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 Office application. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
CoercionTypeSupported applications
Office.CoercionType.Html- Word
Office.CoercionType.Matrix (array of arrays)- Excel
- Word
Office.CoercionType.Ooxml (Office Open XML)- Word
Office.CoercionType.SlideRange- PowerPoint
Office.CoercionType.Table (TableData object)- Excel
- Word
Office.CoercionType.Text (string)- Excel
- PowerPoint
- Project
- Word
Office.CoercionType.XmlSvg- Excel on Windows and on Mac
- PowerPoint on Windows, on Mac, and on the web
- Word on Windows and on Mac
+ * + * @param coercionType The type of data structure to return. See the Remarks section for each application's supported coercion types. + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Goes to the specified object or location in the document. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * PowerPoint doesn't support the goToByIdAsync method in Master Views. + * + * The behavior caused by the selectionMode option varies by Office application: + * + * 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). + * + * @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; + /** + * Goes to the specified object or location in the document. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * PowerPoint doesn't support the goToByIdAsync method in Master Views. + * + * The behavior caused by the selectionMode option varies by Office application: + * + * 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). + * + * @param id The identifier of the object or location to go to. + * @param goToType The type of the location to go 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, callback?: (result: AsyncResult) => void): void; + /** + * Removes an event handler for the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#documentevents | DocumentEvents} + * + * @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; + /** + * Removes an event handler for the specified event type. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#documentevents | DocumentEvents} + * + * @param eventType The event type. For document can be 'Document.SelectionChanged' or 'Document.ActiveViewChanged'. + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Writes the specified data into the current selection. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion}, (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets | ImageCoercion 1.1} (when using `Office.CoercionType.Image`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets#imagecoercion-12 | ImageCoercion 1.2} (when using `Office.CoercionType.XmlSvg`) + * + * **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 cells. 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 on the webIn addition to the behaviors described for Excel above, these limits apply when writing data in Excel on the webThe 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.
+ * + * **Applications** + * + * The possible values for the {@link Office.CoercionType} parameter vary by the Office application. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
CoercionTypeSupported applications
Office.CoercionType.Html- Word
Office.CoercionType.Matrix (array of arrays)- Excel
- Word
Office.CoercionType.Ooxml (Office Open XML)- Word
Office.CoercionType.SlideRange- PowerPoint on the web and on Windows
Office.CoercionType.Table (TableData object)- Excel
- Word
Office.CoercionType.Text (string)- Excel
- PowerPoint
- Project
- Word
Office.CoercionType.XmlSvg- Excel on Windows and on Mac
- PowerPoint on Windows, on Mac, and on the web
- Word on Windows and on Mac
+ * + * @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". However, this technique will block the "calculated columns" feature only + * when one of the following conditions is met: (1) you are writing to all the cells of the column, or (2) there are already at least two + * different formulas in the column. + * + * @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; + /** + * Writes the specified data into the current selection. + * + * @remarks + * + * **Requirement sets**: + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion}, (when using `Office.CoercionType.Html`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets | ImageCoercion} (when using `Office.CoercionType.Image`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection} + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`) + * + * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets#imagecoercion-12 | ImageCoercion 1.2} (when using `Office.CoercionType.XmlSvg`) + * + * **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 cells. 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 on the webIn addition to the behaviors described for Excel above, these limits apply when writing data in Excel on the webThe 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.
+ * + * **Applications** + * + * The possible values for the {@link Office.CoercionType} parameter vary by the Office application. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
CoercionTypeSupported applications
Office.CoercionType.Html- Word
Office.CoercionType.Matrix (array of arrays)- Excel
- Word
Office.CoercionType.Ooxml (Office Open XML)- Word
Office.CoercionType.SlideRange- PowerPoint on the web and on Windows
Office.CoercionType.Table (TableData object)- Excel
- Word
Office.CoercionType.Text (string)- Excel
- PowerPoint
- Project
- Word
Office.CoercionType.XmlSvg- Excel on Windows and on Mac
- PowerPoint on Windows, on Mac, and on the web
- Word on Windows and on Mac
+ * + * @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". However, this technique will block the "calculated columns" feature only + * when one of the following conditions is met: (1) you are writing to all the cells of the column, or (2) there are already at least two + * different formulas in the column. + * + * @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[][], 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. + */ + getProjectFieldAsync(fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get Project field (Ex. ProjectWebAccessURL). + * @param fieldId Project level fields. + * @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. + * + */ + getProjectFieldAsync(fieldId: number, 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. + * + */ + getResourceFieldAsync(resourceId: string, 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 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. + * + */ + getResourceFieldAsync(resourceId: string, fieldId: number, 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. + * + */ + getSelectedResourceAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the current selected Resource's Id. + * @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. + * + */ + getSelectedResourceAsync(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. + * + */ + getSelectedTaskAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the current selected Task's Id. + * @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. + * + */ + getSelectedTaskAsync(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. + * + */ + getSelectedViewAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the current selected View Type (Ex. Gantt) and View Name. + * @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. + * + */ + getSelectedViewAsync(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. + * + */ + getTaskAsync(taskId: string, 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 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. + * + */ + getTaskAsync(taskId: string, 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. + * + */ + getTaskFieldAsync(taskId: string, fieldId: number, 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 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. + * + */ + getTaskFieldAsync(taskId: string, fieldId: number, 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. + * + */ + getWSSUrlAsync(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 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. + * + */ + getWSSUrlAsync(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. + * + */ + getMaxResourceIndexAsync(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 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. + * + */ + getMaxResourceIndexAsync(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. + * + */ + getMaxTaskIndexAsync(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 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. + * + */ + getMaxTaskIndexAsync(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. + * + */ + getResourceByIndexAsync(resourceIndex: number, 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 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. + * + */ + getResourceByIndexAsync(resourceIndex: number, 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. + * + */ + getTaskByIndexAsync(taskIndex: 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 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. + * + */ + getTaskByIndexAsync(taskIndex: number, 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}. + * + */ + setResourceFieldAsync(resourceId: string, fieldId: number, fieldValue: string | number | boolean | object, 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 callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + */ + setResourceFieldAsync(resourceId: string, fieldId: number, fieldValue: string | number | boolean | object, 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}. + * + */ + setTaskFieldAsync(taskId: 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 callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + */ + setTaskFieldAsync(taskId: string, fieldId: number, fieldValue: string | number | boolean | object, 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. + * + */ + interface File { + /** + * Gets the document file size in bytes. + */ + size: number; + /** + * Gets the number of slices into which the file is divided. + */ + sliceCount: number; + /** + * Closes the document file. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#file | File} + * + * 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
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.asyncContextDefine an 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 set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#file | File} + * + * In the callback function passed to the getSliceAsync method, you can use the properties of the AsyncResult object to return the following + * information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse
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.asyncContextDefine an 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 + * + * The MatrixBinding object inherits the `id` property, type property, getDataAsync method, and setDataAsync method from the Binding object. + */ + interface MatrixBinding extends Binding { + /** + * Gets the number of columns in the matrix data structure, as an integer value. + */ + columnCount: number; + /** + * Gets the number of rows in the matrix data structure, as an integer value. + */ + 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 + * + * **Applications**: Excel, PowerPoint, Word + * + * 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 on the web, and more than one user is editing the + * spreadsheet (coauthoring). Therefore, effectively the settingsChanged event is supported only in Excel on the web in coauthoring scenarios. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * 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
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ */ + addHandlerAsync(eventType: Office.EventType, handler: any, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * 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 on the web, and more than one user is editing the + * spreadsheet (coauthoring). Therefore, effectively the settingsChanged event is supported only in Excel on the web in coauthoring scenarios. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * 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 callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ */ + addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void; + /** + * Retrieves the specified setting. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | Settings} + * + * @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 set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * 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
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.asyncContextDefine an 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}. + * 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 set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | Settings} + * + * null is a valid value for a setting. Therefore, assigning null to the setting will not remove it from the settings property bag. + * + * @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 set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * 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. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ * + * @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; + /** + * Removes an event handler for the settingsChanged event. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not in a set} + * + * 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. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ * + * @param eventType Specifies the type of event to remove. Required. + * @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, callback?: (result: AsyncResult) => void): void; + /** + * Persists the in-memory copy of the settings property bag in the document. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | 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. + * + * **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
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ * + * @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; + /** + * Persists the in-memory copy of the settings property bag in the document. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | 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. + * + * **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
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.asyncContextDefine an 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}. + */ + saveAsync(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 set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#settings | Settings} + * + * 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. + * + * @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. + * + * 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 (coauthored) 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 on the web, and more than one user is editing the spreadsheet (coauthoring). + * Therefore, effectively the settingsChanged event is supported only in Excel on the web in coauthoring scenarios. + */ + 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; + } + /** + * Provides options for how to send messages, in either direction, between a dialog and its parent. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1} + */ + interface DialogMessageOptions { + /** + * Specifies the intended recipient domain for a message sent, in either direction, between a dialog and its parent. For example, `https://resources.contoso.com`. + */ + targetOrigin: string; + } + /** + * Provides information about the message from the parent page that raised the `DialogParentMessageReceived` event. + * + * To add an event handler for the `DialogParentMessageReceived` event, use the `addHandlerAsync` method of the + * {@link Office.UI} object. + * + */ + interface DialogParentMessageReceivedEventArgs { + /** + * Gets the content of the message sent from the parent page, which can be any string or stringified data. + */ + message: string; + /** + * Gets the domain of the parent page that called `Dialog.messageChild`. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1}. + * The property is `undefined` on clients that do not support this requirement set. + */ + origin: string | undefined; + /** + * Gets an {@link Office.EventType} enumeration value that identifies the kind of event that was raised. + */ + type: EventType; + } + /** + * Represents a slice of a document file. The Slice object is accessed with the `File.getSliceAsync` method. + */ + interface Slice { + /** + * Gets the raw data of the file slice in `Office.FileType.Text` or `Office.FileType.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 + * + * 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. + */ + columnCount: number; + /** + * True, if the table has headers; otherwise false. + */ + 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 on the web (using Table on the Insert tab), both Office + * 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 on the web. + * + * - In Excel on the desktop, rowCount will return 0 (the blank row following the headers is not counted). + * + * - In Excel on the web, 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. + */ + 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 columns. 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 on the web: 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. + * + * @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 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 columns. 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 on the web: 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. + * + * @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 callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addColumnsAsync(tableData: TableData | any[][], 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. 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 on the web: 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. + * + * @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; + /** + * 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. 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 on the web: 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. + * + * @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 callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addRowsAsync(rows: TableData | any[][], callback?: (result: AsyncResult) => void): void; + /** + * Deletes all non-header rows and their values in the table, shifting appropriately for the Office application. + * + * @remarks + * + * In Excel, if the table has no header row, this method will delete the table itself. + * + * @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; + /** + * Deletes all non-header rows and their values in the table, shifting appropriately for the Office application. + * + * @remarks + * + * In Excel, if the table has no header row, this method will delete the table itself. + * + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + deleteAllDataValuesAsync(callback?: (result: AsyncResult) => void): void; + /** + * Clears formatting on the bound table. + * + * @remarks + * + * See {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | Format tables in add-ins for Excel} for more information. + * + * @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; + /** + * Clears formatting on the bound table. + * + * @remarks + * + * See {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | Format tables in add-ins for Excel} for more information. + * + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + clearFormatsAsync(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 then select **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; + /** + * 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 then select **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 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[], 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 then select **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.microsoft.com/office/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://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | How to format tables in add-ins for Excel}. + * + * @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; + /** + * 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 then select **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.microsoft.com/office/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://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | How to format tables in add-ins for Excel}. + * + * @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 callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setFormatsAsync(cellFormat: any[], callback?: (result: AsyncResult) => void): void; + /** + * Updates table formatting options on the bound table. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not 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
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ * + * @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; + /** + * Updates table formatting options on the bound table. + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#methods-that-arent-part-of-a-requirement-set | Not 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
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.asyncContextDefine an item of any type that is returned in the AsyncResult object without being altered
+ * + * @param tableOptions An object literal containing a list of property name-value pairs that define the table options to apply. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + */ + setTableOptionsAsync(tableOptions: any, callback?: (result: AsyncResult) => void): void; + } + /** + * Represents the data in a table or an {@link Office.TableBinding}. + */ + class TableData { + constructor(rows: any[][], headers: any[]); + constructor(); + /** + * Gets or sets the headers of the table. + * + * @remarks + * + * 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 + * + * 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://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | table formatting methods}. + */ + 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. + * + * 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. + */ + 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. + */ + 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.microsoft.com/office/615a4563-1cc3-40f4-b66f-1b17e793a460 | Available fields} reference. In + * Project Help, search for Available fields. + */ + 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.microsoft.com/office/615a4563-1cc3-40f4-b66f-1b17e793a460 | Available fields} reference. + * In Project Help, search for Available fields. + */ + 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. + */ + Baseline3Start, + /** + * 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. + */ + 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 the type of custom action in a notification message. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + enum ActionType { + /** + * The `showTaskPane` action. + */ + ShowTaskPane = "showTaskPane" + } + /** + * Specifies the {@link Office.Sensitivity | sensitivity level} of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @beta + */ + enum AppointmentSensitivityType { + /** + * The item needs no special treatment. + * + * @remarks + * [Api set: Mailbox preview] + */ + Normal = "normal", + /** + * Treat the item as personal. + * + * @remarks + * [Api set: Mailbox preview] + */ + Personal = "personal", + /** + * Treat the item as private. + * + * @remarks + * [Api set: Mailbox preview] + */ + Private = "private", + /** + * Treat the item as confidential. + * + * @remarks + * [Api set: Mailbox preview] + */ + Confidential = "confidential" + } + /** + * Specifies the formatting that applies to an attachment's content. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + 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", + /** + * 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * **Important**: In Read mode, the `id` property of the attachment's {@link Office.AttachmentDetails | details} object + * contains a URL to the file. + * From requirement set 1.8, the `url` property included in the attachment's {@link Office.AttachmentDetailsCompose | details} object + * contains a URL to the file in Compose mode. + */ + Cloud = "cloud" + } + /** + * Specifies the category color. + * + * **Note**: The actual color depends on how the Outlook client renders it. + * In this case, the colors noted on each preset are for the Outlook desktop client. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum CategoryColor { + /** + * Default color or no color mapped. + */ + None, + /** + * Red + */ + Preset0, + /** + * Orange + */ + Preset1, + /** + * Brown + */ + Preset2, + /** + * Yellow + */ + Preset3, + /** + * Green + */ + Preset4, + /** + * Teal + */ + Preset5, + /** + * Olive + */ + Preset6, + /** + * Blue + */ + Preset7, + /** + * Purple + */ + Preset8, + /** + * Cranberry + */ + Preset9, + /** + * Steel + */ + Preset10, + /** + * DarkSteel + */ + Preset11, + /** + * Gray + */ + Preset12, + /** + * DarkGray + */ + Preset13, + /** + * Black + */ + Preset14, + /** + * DarkRed + */ + Preset15, + /** + * DarkOrange + */ + Preset16, + /** + * DarkBrown + */ + Preset17, + /** + * DarkYellow + */ + Preset18, + /** + * DarkGreen + */ + Preset19, + /** + * DarkTeal + */ + Preset20, + /** + * DarkOlive + */ + Preset21, + /** + * DarkBlue + */ + Preset22, + /** + * DarkPurple + */ + Preset23, + /** + * DarkCranberry + */ + Preset24 + } + /** + * Specifies a message's compose type. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + enum ComposeType { + /** + * Reply. + */ + Reply = "reply", + /** + * New mail. + */ + NewMail = "newMail", + /** + * Forward. + */ + Forward = "forward" + } + /** + * Specifies the day of week or type of day. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 bitmask represents a delegate's permissions on a shared folder, or a user's permissions on a shared mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum DelegatePermissions { + /** + * Delegate or user has permission to read items. + */ + Read = 1, + /** + * Delegate or user has permission to create and write items. + */ + Write = 2, + /** + * Delegate or user has permission to delete only the items they created. + */ + DeleteOwn = 4, + /** + * Delegate or user has permission to delete any items. + */ + DeleteAll = 8, + /** + * Delegate or user has permission to edit only they items they created. + */ + EditOwn = 16, + /** + * Delegate or user has permission to edit any items. + */ + EditAll = 32 + } + /** + * Specifies an entity's type. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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" + } + /** + * Action types supported by {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType.InfobarClicked}. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + enum InfobarActionType { + /** + * Dismiss action was selected. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + Dismiss = 1 + } + /** + * Type of notification allowed by {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType.InfobarClicked}. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + enum InfobarType { + /** + * Notification displays an informational message. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + Informational = 0, + /** + * Notification displays a progress indicator. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + ProgressIndicator = 1, + /** + * Notification displays an error message. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + Error = 2, + /** + * Notification displays an informational message with actions. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + Insight = 3 + } + /** + * Specifies the notification message type for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum ItemNotificationMessageType { + /** + * The notification message is a progress indicator. + */ + ProgressIndicator = "progressIndicator", + /** + * The notification message is an informational message. + */ + InformationalMessage = "informationalMessage", + /** + * The notification message is an error message. + * + * **Important**: Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + */ + ErrorMessage = "errorMessage", + /** + * The notification message is an informational message with actions. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + InsightMessage = "insightMessage" + } + /** + * Specifies an item's type. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 an appointment location's type. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum LocationType { + /** + * A custom location. Custom locations don't have an SMTP address. + * + * **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups} + * added as appointment locations aren't returned by the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.enhancedlocation#outlook-office-enhancedlocation-getasync-member(1) | EnhancedLocation.getAsync} method. + */ + Custom = "custom", + /** + * A conference room or similar resource that has an SMTP address. + */ + Room = "room" + } + /** + * Specifies the month. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 on the web. + */ + enum OWAView { + /** + * Narrow one-column view. Displayed when the screen width is less than 436 pixels. + * For example, Outlook on the web uses this view on the entire screen of older smartphones. + */ + OneColumnNarrow = "OneColumnNarrow", + /** + * One-column view. Displayed when the screen width is greater than or equal to 436 pixels, + * but less than 536 pixels. For example, Outlook on the web uses this view on the entire screen of newer smartphones. + */ + OneColumn = "OneColumn", + /** + * Two-column view. Displayed when the screen width is greater than or equal to 536 pixels, + * but less than 780 pixels. For example, Outlook on the web uses this view on most tablets. + */ + TwoColumns = "TwoColumns", + /** + * Three-column view. Displayed when the screen width is greater than or equal to 780 pixels. + * For example, Outlook on the web uses this view in a full screen window on a desktop computer. + */ + ThreeColumns = "ThreeColumns" + } + /** + * Specifies the type of recipient of a message or appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: A `recipientType` property value isn't returned by the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.from?view=outlook-js-preview#outlook-office-from-getasync-member(1) | Office.context.mailbox.item.from.getAsync} + * and {@link https://learn.microsoft.com/javascript/api/outlook/office.organizer?view=outlook-js-preview#outlook-office-organizer-getasync-member(1) | Office.context.mailbox.item.organizer.getAsync} methods. + * The email sender or appointment organizer is always a user whose email address is on the Exchange server. + */ + enum RecipientType { + /** + * Specifies the recipient is a distribution list containing a list of email addresses. + */ + DistributionList = "distributionList", + /** + * Specifies the recipient is an SMTP email address on the Exchange server. + */ + User = "user", + /** + * Specifies the recipient is an SMTP email address that isn't on the Exchange server. It also refers to a recipient added from a personal Outlook address book. + * + * **Important**: In Outlook on Windows (starting with Version 2210 (Build 15813.20002)), on Mac, and on the web, Global Address Book (GAL) recipients saved to a personal address book return + * the `ExternalUser` value, even if their SMTP email address appears on the Exchange server. Recipients return a `User` value only if they're directly + * added or resolved against the GAL. + */ + ExternalUser = "externalUser", + /** + * Specifies the recipient isn't one of the other recipient types. It also refers to a recipient that isn't resolved against the Exchange address book, + * and is therefore treated as an external SMTP address. + * + * **Important**: In Outlook on Android and on iOS, Global Address Book (GAL) recipients saved to a personal address book return + * the `Other` value, even if their SMTP email address appears on the Exchange server. Recipients return a `User` value only if they're directly + * added or resolved against the GAL. + */ + Other = "other" + } + /** + * Specifies the time zone applied to the recurrence. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 source of the selected data in an item (see `Office.mailbox.item.getSelectedDataAsync` for details). + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + enum SourceProperty { + /** + * The source of the data is from the body of the item. + */ + Body = "body", + /** + * The source of the data is from the subject of the item. + */ + Subject = "subject" + } + /** + * Specifies the week of the month. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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" + } + } + /** + * Provides an option for the data format. + */ + interface CoercionTypeOptions { + /** + * The desired data format. + */ + coercionType?: Office.CoercionType | string; + } + /** + * The subclass of {@link Office.Item | 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Child interfaces: + * + * - {@link Office.AppointmentCompose | AppointmentCompose} + * + * - {@link Office.AppointmentRead | AppointmentRead} + */ + 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Parent interfaces: + * + * - {@link Office.ItemCompose | ItemCompose} + * + * - {@link Office.Appointment | Appointment} + */ + interface AppointmentCompose extends Appointment, ItemCompose { + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + body: Body; + /** + * Gets an object that provides methods for managing the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + categories: Categories; + /** + * Gets or sets the date and time that the appointment is to end. + * + * The `end` property is a {@link Office.Time | 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. + * + * **Important**: In the Windows client, you can't use this property to update the end of a recurrence. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + end: Time; + /** + * Gets or sets the locations of the appointment. The `enhancedLocation` property returns an {@link Office.EnhancedLocation | EnhancedLocation} + * object that provides methods to get, remove, or add locations on an item. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + enhancedLocation: EnhancedLocation; + /** + * Gets or sets the {@link Office.IsAllDayEvent} property of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @beta + */ + isAllDayEvent: IsAllDayEvent; + /** + * 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets or sets the location of an appointment. The `location` property returns a {@link Office.Location | Location} object that provides methods that are + * used to get and set the location of the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + location: Location; + /** + * Gets the notification messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + notificationMessages: NotificationMessages; + /** + * Provides access to the optional attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * The `optionalAttendees` property returns a `Recipients` object that provides methods to get or update the + * optional attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many + * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + organizer: 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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 depend on the mode of the current item. + * + * The `requiredAttendees` property returns a `Recipients` object that provides methods to get or update the + * required attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many + * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + requiredAttendees: Recipients; + /** + * Gets or sets the {@link Office.Sensitivity | sensitivity level} of an appointment. + * For information about sensitivity levels, see + * {@link https://support.microsoft.com/office/4a76d05b-6c29-4a0d-9096-71784a6b12c1 | Mark your email as Normal, Personal, Private, or Confidential}. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @beta + */ + sensitivity: Sensitivity; + /** + * Gets the object to get or set the {@link Office.SensitivityLabel | sensitivity label} of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode (preview)}. + * + * @beta + */ + sensitivityLabel: SensitivityLabel; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web and desktop clients, the `seriesId` property returns the Exchange Web Services (EWS) ID of the parent (series) item + * that this item belongs to. However, on 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://learn.microsoft.com/office/dev/add-ins/outlook/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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + seriesId: string; + /** + * Manages the {@link Office.SessionData | SessionData} of an item in Compose mode. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + sessionData: SessionData; + /** + * Gets or sets the date and time that the appointment is to begin. + * + * The `start` property is a {@link Office.Time | 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. + * + * **Important**: In the Windows client, you can't use this property to update the start of a recurrence. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * **Important**: In recent builds of Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to + * this action (whether using this API or the Outlook UI). To work around this issue, you can try using the `addFileAttachmentFromBase64` API + * introduced with requirement set 1.8. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: 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 - 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 function. + * `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 - 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 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 & { isInline: boolean }, callback?: (asyncResult: Office.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. + * + * **Important**: In recent builds of Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to + * this action (whether using this API or the Outlook UI). To work around this issue, you can try using the `addFileAttachmentFromBase64` API + * introduced with requirement set 1.8. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: 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 - 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 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?: (asyncResult: Office.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. + * + * **Note**: If you're using a data URL API (e.g., `readAsDataURL`), you need to strip out the data URL prefix then send the rest of the string to this API. + * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * **Note**: If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} + * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. + * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. + * + * @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). + * @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 function. + * `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 - 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 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. + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options: Office.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: Office.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. + * + * **Note**: If you're using a data URL API (e.g., `readAsDataURL`), you need to strip out the data URL prefix then send the rest of the string to this API. + * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * **Note**: If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} + * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. + * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. + * + * @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 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`. + * 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. + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 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 function. + * @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 | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: Office.EventType | string, handler: any, callback?: (asyncResult: Office.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 function, 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 function, 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 on the web, 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `NumberOfAttachmentsExceeded`: 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 function. + * @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 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?: (asyncResult: Office.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 function, 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 function, 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 on the web, 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `NumberOfAttachmentsExceeded`: 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 - 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 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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Closes the current item that is being composed. + * + * The behavior 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, the `close` method has no effect on a reply in the Reading Pane. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: 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. + */ + close(): void; + /** + * Disables the Outlook client signature. + * + * For Windows and Mac rich clients, this API sets the signature under the "New Message" and "Replies/Forwards" sections + * for the sending account to "(none)", effectively disabling the signature. + * For Outlook on the web, the API should disable the signature option for new mails, replies, and forwards. + * If the signature is selected, this API call should disable it. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @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 function. + * @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. + */ + disableClientSignatureAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Disables the Outlook client signature. + * + * For Windows and Mac rich clients, this API sets the signature under the "New Message" and "Replies/Forwards" sections + * for the sending account to "(none)", effectively disabling the signature. + * For Outlook on the web, the API should disable the signature option for new mails, replies, and forwards. + * If the signature is selected, this API call should disable it. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @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. + */ + disableClientSignatureAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 function. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @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 function. + * @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 an error code with the reason for + * the failure. + */ + getAttachmentsAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @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 an error code with the reason for + * the failure. + */ + getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @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 function. + * @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 initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously gets the ID of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., 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 synced to the server. + * Until the item is synced, the `itemId` is not recognized and using it returns an error. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously gets the ID of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., 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 synced to the server. + * Until the item is synced, the `itemId` is not recognized and using it returns an error. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + getItemIdAsync(callback: (asyncResult: Office.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 an empty string 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 function, 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`. + * + * @returns + * The selected data as a string with format determined by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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 | string, options: Office.AsyncContextOptions, callback: (asyncResult: Office.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 an empty string 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 function, 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`. + * + * @returns + * The selected data as a string with format determined by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 | string, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * *Note**: This method is not supported in Outlook on iOS or Android. + * + * @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 function. + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + */ + isClientSignatureEnabledAsync(callback: (asyncResult: Office.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 {@link Office.CustomProperties | 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 aren't encrypted on the item, so this shouldn't 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, save, and remove custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: (asyncResult: Office.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 on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` + * is 200 characters in Outlook on the web and on Windows. + * @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 function. + * @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(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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 on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` + * is 200 characters in Outlook on the web and on Windows. + * @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(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param eventType - The event that should revoke the handler. + * @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 function. + * @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 | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param eventType - The event that should revoke the handler. + * @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 | string, callback?: (asyncResult: Office.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 function. + * In Outlook on the web 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. + * + * When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * **Note**: If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID 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 item ID will return an error. + * + * **Note**: In Outlook on Mac, only build 16.35.308 or later supports saving a meeting. + * Otherwise, the `saveAsync` method fails when called from a meeting in compose mode. + * For a workaround, see {@link https://learn.microsoft.com/outlook/troubleshoot/calendars/cannot-save-meeting-as-draft-in-outlook-for-mac | Cannot save a meeting as a draft in Outlook for Mac by using Office JS API}. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @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 function. + * @param callback - 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: (asyncResult: Office.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 function. + * In Outlook on the web 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. + * + * When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * **Note**: If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID 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 item ID will return an error. + * + * **Note**: In Outlook on Mac, only build 16.35.308 or later supports saving a meeting. + * Otherwise, the `saveAsync` method fails when called from a meeting in compose mode. + * For a workaround, see {@link https://learn.microsoft.com/outlook/troubleshoot/calendars/cannot-save-meeting-as-draft-in-outlook-for-mac | Cannot save a meeting as a draft in Outlook for Mac by using Office JS API}. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + saveAsync(callback: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: 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 - 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 function. + * `coercionType`: If text, the current style is applied in Outlook on the web and Windows. + * 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 on the web and the + * default style is applied in Outlook on desktop clients. + * 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?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: 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?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * The `AppointmentForm` object is used to access the currently selected appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface AppointmentForm { + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + body: 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + end: Time | 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + location: Location | string; + /** + * Provides access to the optional attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * *Read mode* + * + * The `optionalAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each optional attendee to the meeting. Collection size limits: + * + * - Windows: 500 members + * + * - Classic Mac UI: 100 members + * + * - New Mac UI, web browser, Android: No limit + * + * *Compose mode* + * + * The `optionalAttendees` property returns a `Recipients` object that provides methods to get or update the + * optional attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many + * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + optionalAttendees: Recipients[] | EmailAddressDetails[]; + /** + * Provides access to the resources of an event. Returns an array of strings containing the resources required for the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + resources: string[]; + /** + * Provides access to the required attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * *Read mode* + * + * The `requiredAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each required attendee to the meeting. Collection size limits: + * + * - Windows: 500 members + * + * - Classic Mac UI: 100 members + * + * - New Mac UI, web browser, Android: No limit + * + * *Compose mode* + * + * The `requiredAttendees` property returns a `Recipients` object that provides methods to get or update the + * required attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many + * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + requiredAttendees: Recipients[] | 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + start: Time | 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + subject: Subject | string; + } + /** + * 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Parent interfaces: + * + * - {@link Office.ItemRead | ItemRead} + * + * - {@link Office.Appointment | Appointment} + */ + interface AppointmentRead extends Appointment, ItemRead { + /** + * Gets the item's attachments as an array. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519 | Blocked attachments in Outlook}. + * + */ + attachments: AttachmentDetails[]; + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + body: Body; + /** + * Gets an object that provides methods for managing the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + categories: Categories; + /** + * Gets the date and time that an item was created. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + dateTimeModified: 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + end: Date; + /** + * Gets the locations of an appointment. + * + * The `enhancedLocation` property returns an {@link Office.EnhancedLocation | EnhancedLocation} object that allows you to get the set of locations + * (each represented by a {@link Office.LocationDetails | LocationDetails} object) associated with the appointment. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + enhancedLocation: EnhancedLocation; + /** + * Returns a boolean value indicating whether the event is all day. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @beta + */ + isAllDayEvent: boolean; + /** + * 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`. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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.Occurrence.IPM.Appointment, IPM.Appointment.Occurrence
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 {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | 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 + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | 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://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api#get-the-item-id | Use the Outlook REST APIs from an Outlook add-in}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the location of an appointment. + * + * The `location` property returns a string that contains the location of the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + normalizedSubject: string; + /** + * Gets the notification messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + notificationMessages: NotificationMessages; + /** + * Provides access to the optional attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * The `optionalAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each optional attendee to the meeting. The maximum number of attendees returned varies per Outlook client. + * + * - Windows: 500 attendees + * + * - Android, classic Mac UI, iOS: 100 attendees + * + * - New Mac UI, web browser: No limit + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + optionalAttendees: EmailAddressDetails[]; + /** + * Gets the meeting organizer's email properties. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 {@link Office.Recurrence | 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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 depend on the mode of the current item. + * + * The `requiredAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each required attendee to the meeting. The maximum number of attendees returned varies per Outlook client. + * + * - Windows: 500 attendees + * + * - Android, classic Mac UI, iOS: 100 attendees + * + * - New Mac UI, web browser: No limit + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + start: Date; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web and desktop clients, the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item + * that this item belongs to. However, on 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://learn.microsoft.com/office/dev/add-ins/outlook/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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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:. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + subject: string; + /** + * Provides the sensitivity value of the appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @beta + */ + sensitivity: MailboxEnums.AppointmentSensitivityType; + + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 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 function. + * @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 | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: Office.EventType | string, handler: any, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column 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 attempts 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. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyAllForm(formData: string | ReplyFormData): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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 function. + * @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. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column 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 attempts 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. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyForm(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 on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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 function. + * @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. + */ + displayReplyFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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. + */ + displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.AppointmentRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 function. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.AppointmentRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the entities found in the selected item's body. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + getEntities(): Entities; + /** + * Gets an array of all the entities of the specified entity type found in the selected item's body. + * + * @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 + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param entityType - One of the `EntityType` enumeration values. + * + * While the minimum permission level to use this method is **restricted**, some entity types require **read item** to access, as specified in the following table. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Value of entityTypeType of objects in returned arrayRequired Permission Level
AddressStringRestricted
ContactContactReadItem
EmailAddressStringReadItem
MeetingSuggestionMeetingSuggestionReadItem
PhoneNumberPhoneNumberRestricted
TaskSuggestionTaskSuggestionReadItem
URLStringRestricted
+ */ + getEntitiesByType(entityType: MailboxEnums.EntityType | string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Returns well-known entities in the selected item that pass the named filter defined in an XML manifest file. + * + * @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. If there's no `ItemHasKnownEntity` element in the manifest with a + * `FilterName` element value that matches the `name` parameter, the method returns `null`. If the `name` parameter matches an + * `ItemHasKnownEntity` element in the manifest, but there are no entities in the current item that match, the method returns an empty array. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param name - The name of the `ItemHasKnownEntity` rule element that defines the filter to match. + */ + getFilteredEntitiesByName(name: string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @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 function. + * @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 initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns string values in the selected item that match the regular expressions defined in an XML manifest file. + * + * @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. For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property + * of the item that's specified by that rule. The `PropertyName` simple type defines the supported properties. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + getRegExMatches(): any; + /** + * Returns string values in the selected item that match the named regular expression defined in an XML manifest file. + * + * @returns + * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the manifest XML file, + * with the specified `RegExName` element value. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 an XML manifest file. + * Highlighted matches apply to contextual add-ins. + * + * **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * 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 on iOS or Android. + * + * @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 + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + getSelectedRegExMatches(): any; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @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 function. + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: Office.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 {@link Office.CustomProperties | 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 aren't encrypted on the item, so this shouldn't 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, save, and remove custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param eventType - The event that should revoke the handler. + * @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 function. + * @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 | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param eventType - The event that should revoke the handler. + * @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 | string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides the current dates and times of the appointment that raised the `Office.EventType.AppointmentTimeChanged` event. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + export interface AppointmentTimeChangedEventArgs { + /** + * Gets the appointment end date and time. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + end: Date; + /** + * Gets the appointment start date and time. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + start: Date; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + type: "olkAppointmentTimeChanged"; + } + /** + * Represents the content of an attachment on a message or appointment item. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + 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 and were attached by drag-and-drop or "Attach Item", + * the formatting is a string representing an .eml formatted file. + * **Important**: If a message item was attached by drag-and-drop in Outlook on the web, then `getAttachmentContentAsync` throws an error. + * + * For item attachments that represent calendar items and were attached by drag-and-drop or "Attach Item", + * the formatting is a string representing an .icalendar file. + * **Important**: If a calendar item was attached by drag-and-drop in Outlook on the web, then `getAttachmentContentAsync` throws an error. + * + * For cloud attachments, the formatting is a URL string. + */ + format: MailboxEnums.AttachmentContentFormat | string; + } + /** + * Represents an attachment on an item. Compose mode only. + * + * An array of `AttachmentDetailsCompose` objects is returned as the attachments property of an appointment or message item. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + interface AttachmentDetailsCompose { + /** + * Gets a value that indicates the type of an attachment. + */ + attachmentType: MailboxEnums.AttachmentType | string; + /** + * Gets the index 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. + * + * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", + * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or Windows. + */ + name: string; + /** + * Gets the size of the attachment in bytes. + */ + size: number; + /** + * Gets the url of the attachment if its type is `MailboxEnums.AttachmentType.Cloud`. + */ + url?: string; + } + /** + * Represents an attachment on an item from the server. Read mode only. + * + * An array of `AttachmentDetails` objects is returned as the attachments property of an appointment or message item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + */ + interface AttachmentDetails { + /** + * Gets a value that indicates the type of an attachment. + */ + attachmentType: MailboxEnums.AttachmentType | string; + /** + * Gets the MIME content type of the attachment. + * + * **Warning**: While the `contentType` value is a direct lookup of the attachment's extension, the internal mapping isn't actively maintained + * so this property has been deprecated. If you require specific types, grab the attachment's extension and process accordingly. For details, + * refer to the {@link https://devblogs.microsoft.com/microsoft365dev/outlook-javascript-api-deprecation-for-attachmentdetails-contenttype-property/ | related blog post }. + * + * @deprecated If you require specific content types, grab the attachment's extension and process accordingly. + */ + contentType: string; + /** + * Gets the Exchange attachment ID of the attachment. + * However, if the attachment type is `MailboxEnums.AttachmentType.Cloud`, then a URL for the file is returned. + */ + 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. + * + * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", + * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or Windows. + */ + name: string; + /** + * Gets the size of the attachment in bytes. + */ + size: number; + } + /** + * Provides information about the attachments that raised the `Office.EventType.AttachmentsChanged` event. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + export interface AttachmentsChangedEventArgs { + /** + * Represents the set of attachments that were added or removed. + * For each such attachment, gets `id`, `name`, `size`, and `attachmentType` properties. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + attachmentDetails: object[]; + /** + * Gets whether the attachments were added or removed. For details, refer to {@link Office.MailboxEnums.AttachmentStatus | MailboxEnums.AttachmentStatus}. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + attachmentStatus: MailboxEnums.AttachmentStatus | string; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + type: "olkAttachmentsChanged"; + } + /** + * 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **Known issue with HTML table border colors** + * + * Outlook on Windows: If you're setting various cell borders to different colors in an HTML table in Compose mode, a cell's borders may not reflect + * the expected color. For the known behavior, visit {@link https://github.com/OfficeDev/office-js/issues/1818 | OfficeDev/office-js issue #1818}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface Body { + /** + * Appends on send the specified content to the end of the item body, after any signature. + * + * To use `appendOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. See {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. To learn more + * about append-on-send and its configuration, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/append-on-send | Implement append-on-send in your Outlook add-in}. + * + * **Important**: If the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins?tabs=windows | on-send feature} + * is implemented with append-on-send, the following apply. + * + * - If the user is running add-ins that implement the on-send feature using `ItemSend` in the manifest, append-on-send runs before on-send functionality. + * + * - If your add-in implements the on-send feature and calls `appendOnSendAsync` in the `ItemSend` handler, + * the `appendOnSendAsync` call returns an error as this scenario isn't supported. + * + * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. + * + * **Note**: To clear data from a previous `appendOnSendAsync` call, you can call it again with the `data` parameter set to `null`. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 5,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` but the message body is in plain text. + * + * @param data - The string to be added to the end of the body. The string is limited to 5,000 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 function. + * `coercionType`: The desired format for the data to be appended. 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. + */ + appendOnSendAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Appends on send the specified content to the end of the item body, after any signature. + * + * To use `appendOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. See {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. To learn more + * about append-on-send and its configuration, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/append-on-send | Implement append-on-send in your Outlook add-in}. + * + * **Important**: If the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins?tabs=windows | on-send feature} + * is implemented with append-on-send, the following apply. + * + * - If the user is running add-ins that implement the on-send feature using `ItemSend` in the manifest, append-on-send runs before on-send functionality. + * + * - If your add-in implements the on-send feature and calls `appendOnSendAsync` in the `ItemSend` handler, + * the `appendOnSendAsync` call returns an error as this scenario isn't supported. + * + * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. + * + * **Note**: To clear data from a previous `appendOnSendAsync` call, you can call it again with the `data` parameter set to `null`. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 5,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` but the message body is in plain text. + * + * @param data - The string to be added to the end of the body. The string is limited to 5,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. + */ + appendOnSendAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns the current body in a specified format. + * + * This method returns the entire current body in the format specified by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily + * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it + * render efficiently with its rendering engine. + * + * @param coercionType - The format for the returned body. + * @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 function. + * @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 | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns the current body in a specified format. + * + * This method returns the entire current body in the format specified by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily + * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it + * render efficiently with its rendering engine. + * + * @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 | string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets a value that indicates whether the content is in HTML or text format. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 function. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets a value that indicates whether the content is in HTML or text format. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: In Outlook on Android and on iOS, this` method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds the specified content to the beginning of the item body. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - After the content is prepended, the position of the cursor depends on which client the add-in is running. In Outlook on Windows and on the web, the cursor + * position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning of the body prior to the + * `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call. In Outlook on Mac, the cursor + * position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the body of the mail item. + * + * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to + * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method + * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call. + * + * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" + * (see the **Examples** section for a sample). + * + * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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 - 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 function. + * `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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds the specified content to the beginning of the item body. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - After the content is prepended, the position of the cursor depends on which client the add-in is running. In Outlook on Windows and on the web, the cursor + * position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning of the body prior to the + * `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call. In Outlook on Mac, the cursor + * position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the body of the mail item. + * + * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to + * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method + * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call. + * + * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" + * (see the **Examples** section for a sample). + * + * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Prepends HTML or plain text to the beginning of a message or appointment body when the mail item is sent. + * + * To use `prependOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. For guidance, + * see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` parameter. + * + * **Important**: When implementing `prependOnSendAsync`, keep the following in mind. + * + * - In a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts add-in}, + * the prepend-on-send feature runs first. + * + * - A new line is added after the prepended content. + * + * - If multiple active add-ins call `prependOnSendAsync`, the order of the inserted content depends on the order in which the add-in runs. + * The content of the last run add-in appears above previously prepended content. + * + * - If the add-in attempts to insert HTML into a plain text body, the content won't be prepended. Conversely, plain text will be inserted into an HTML body. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter exceeds 5,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html`, but the item body is in plain text format. + * + * @param data - The string to be prepended to the beginning of the message or appointment body. The string is limited to 5,000 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Any object that can be accessed in the callback function. + * `coercionType`: The desired format for the body. The string in the `data` parameter is 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. + */ + prependOnSendAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Prepends HTML or plain text to the beginning of a message or appointment body when the mail item is sent. + * + * To use `prependOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. For guidance, + * see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` parameter. + * + * **Important**: When implementing `prependOnSendAsync`, keep the following in mind. + * + * - In a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts add-in}, + * the prepend-on-send feature runs first. + * + * - A new line is added after the prepended content. + * + * - If multiple active add-ins call `prependOnSendAsync`, the order of the inserted content depends on the order in which the add-in runs. + * The content of the last run add-in appears above previously prepended content. + * + * - If the add-in attempts to insert HTML into a plain text body, the content won't be prepended. Conversely, plain text will be inserted into an HTML body. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter exceeds 5,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html`, but the item body is in plain text format. + * + * @param data - The string to be prepended to the beginning of the message or appointment body. The string is limited to 5,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. + */ + prependOnSendAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Replaces the entire body with the specified text. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running. In Outlook on Windows, + * the cursor appears at the beginning of the body of the mail item, while in Outlook on the web, the cursor appears at the end of the body of the mail item. + * In Outlook on Mac, the cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects + * something in the body of the mail item. + * + * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily + * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` 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" + * (see the **Examples** section for a sample). + * + * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command. + * + * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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 - 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 function. + * `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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Replaces the entire body with the specified text. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running. In Outlook on Windows, + * the cursor appears at the beginning of the body of the mail item, while in Outlook on the web, the cursor appears at the end of the body of the mail item. + * In Outlook on Mac, the cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects + * something in the body of the mail item. + * + * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily + * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` 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" + * (see the **Examples** section for a sample). + * + * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command. + * + * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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?: (asyncResult: Office.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" + * (see the **Examples** section for a sample). + * + * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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 - 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 function. + * `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?: (asyncResult: Office.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" + * (see the **Examples** section for a sample). + * + * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds or replaces the signature of the item body. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - In Outlook on the web, `setSignatureAsync` only works on messages. + * + * - This method is supported in Message Compose on Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + * To learn more about APIs supported in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - The behavior of `setSignatureAsync` differs if you call it in the event handler of an add-in that implements the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation feature using `LaunchEvent` in the manifest}. + * When the user composes a new item (including reply or forward), the signature is set but doesn't modify the form. This means + * if the user closes the form without making other edits, they won't be prompted to save changes. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 30,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 represents the signature to be set in the body of the mail. This string is limited to 30,000 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 function. + * `coercionType`: The format the signature should be set to. If Text, the method sets the signature to plain text, + * removing any HTML tags present. If Html, the method sets the signature to HTML. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + setSignatureAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds or replaces the signature of the item body. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - In Outlook on the web, `setSignatureAsync` only works on messages. + * + * - This method is supported in Message Compose on Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + * To learn more about APIs supported in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - The behavior of `setSignatureAsync` differs if you call it in the event handler of an add-in that implements the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation feature using `LaunchEvent` in the manifest}. + * When the user composes a new item (including reply or forward), the signature is set but doesn't modify the form. This means + * if the user closes the form without making other edits, they won't be prompted to save changes. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 30,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 represents the signature to be set in the body of the mail. This string is limited to 30,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`. + */ + setSignatureAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Represents the categories on an item. + * + * In Outlook, a user can tag messages and appointments by using a category to color-code them. + * The user defines {@link Office.MasterCategories | categories in a master list} on their mailbox. + * They can then apply one or more categories to an item. + * + * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface Categories { + /** + * Adds categories to an item. Each category must be in the categories master list on that mailbox and so must have a unique name + * but multiple categories can use the same color. + * + * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message or appointment item in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `InvalidCategory`: Invalid categories were provided. + * + * @param categories - The categories to be added to the item. + * @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 function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addAsync(categories: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds categories to an item. Each category must be in the categories master list on that mailbox and so must have a unique name + * but multiple categories can use the same color. + * + * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message or appointment item in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `InvalidCategory`: Invalid categories were provided. + * + * @param categories - The categories to be added to the item. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addAsync(categories: string[], callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an item's categories. + * + * **Important**: + * + * - If there are no categories on the item, `null` or an empty array will be returned depending on the Outlook version + * so make sure to handle both cases. + * + * - In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If getting categories fails, the `asyncResult.error` property will contain an error code. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an item's categories. + * + * **Important**: + * + * - If there are no categories on the item, `null` or an empty array will be returned depending on the Outlook version + * so make sure to handle both cases. + * + * - In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. If getting categories fails, the `asyncResult.error` property will contain an error code. + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes categories from an item. + * + * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param categories - The categories to be removed from the item. + * @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 function. + * @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 categories fails, the `asyncResult.error` property will contain an error code. + */ + removeAsync(categories: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes categories from an item. + * + * **Important**: In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param categories - The categories to be removed from the item. + * @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 categories fails, the `asyncResult.error` property will contain an error code. + */ + removeAsync(categories: string[], callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Represents a category's details like name and associated color. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface CategoryDetails { + /** + * The name of the category. Maximum length is 255 characters. + */ + displayName: string; + /** + * The color of the category. + */ + color: MailboxEnums.CategoryColor | string; + } + /** + * Represents the details about a contact (similar to what's on a physical contact or business card) extracted from the item's body. Read mode only. + * + * The list of contacts extracted from the body of an email message or appointment is returned in the `contacts` property of the + * {@link Office.Entities | Entities} object returned by the `getEntities` or `getEntitiesByType` method of the current item. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + */ + interface Contact { + /** + * An array of strings containing the mailing and street addresses associated with the contact. Nullable. + */ + addresses: string[]; + /** + * 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: string[]; + /** + * 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: PhoneNumber[]; + /** + * An array of strings containing the Internet URLs associated with the contact. Nullable. + */ + urls: string[]; + } + /** + * The `CustomProperties` object represents custom properties that are specific to a particular mail item and specific to an Outlook add-in. + * For example, there might be a need for an add-in to save some data that's specific to the current message that activated the add-in. + * If the user revisits the same message in the future and activates the add-in again, the add-in will be able to retrieve the data that had + * been saved as custom properties. + * + * To learn more about `CustomProperties`, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * When using custom properties in your add-in, keep in mind that: + * + * - Custom properties saved while in compose mode aren't transmitted to recipients of the mail item. When a message or appointment with custom + * properties is sent, its properties can be accessed from the item in the Sent Items folder. + * If you want to make custom data accessible to recipients, consider using {@link Office.InternetHeaders | InternetHeaders} instead. + * + * - The maximum length of a `CustomProperties` JSON object is 2500 characters. + * + * - Outlook on Mac doesn't cache custom properties. If the user's network goes down, mail add-ins can't access their custom properties. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface CustomProperties { + /** + * Returns the value of the specified custom property. + * + * @returns The value of the specified custom property. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param name - The name of the custom property to be returned. + */ + get(name: string): any; + /** + * Returns an object with all custom properties in a collection of name/value pairs. The following are equivalent. + * + * `customProps.get("name")` + * + * `var dictionary = customProps.getAll(); dictionary["name"]` + * + * You can iterate through the dictionary object to discover all `names` and `values`. + * + * @returns An object with all custom properties in a collection of name/value pairs. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + getAll(): any; + /** + * 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param name - The `name` of the property to be removed. + */ + remove(name: string): void; + /** + * Saves custom properties to a message or appointment. + * + * 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 function should handle this error accordingly. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **Important**: In Outlook on Windows, custom properties saved while in compose mode only persist after the item being composed is closed or + * after `Office.context.mailbox.item.saveAsync` is called. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 asyncContext - Optional. Any state data that is passed to the callback function. + */ + saveAsync(callback: (asyncResult: Office.AsyncResult) => void, asyncContext?: any): void; + /** + * Saves custom properties to a message or appointment. + * + * 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 function should handle this error accordingly. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param asyncContext - Optional. Any state data that is passed to the callback function. + */ + saveAsync(asyncContext?: any): void; + /** + * Sets the specified property to the specified value. + * + * The `set` method sets the specified property to the specified value. To ensure that the set property and value persist on the mail item, + * you must call the `saveAsync` method. + * + * 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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; + } + /** + * The `DelayDeliveryTime` object enables you to manage the delayed delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + interface DelayDeliveryTime { + /** + * Gets the delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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 delivery date and time of a message is returned in the + * `asyncResult.value` property. If a delivery date hasn't been set on a message yet, `0` is returned instead. + */ + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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 delivery date and time of a message is returned in the + * `asyncResult.value` property. If a delivery date hasn't been set on a message yet, `0` is returned instead. + */ + getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidFormatError` - The format of the specified data object is not valid. + * + * @param datetime - The future date and time when the message should be sent. + * @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 function. + * @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. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setAsync(datetime: Date, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidFormatError` - The format of the specified data object is not valid. + * + * @param datetime - The future date and time when the message should be sent. + * @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. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setAsync(datetime: Date, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides diagnostic information to an Outlook add-in. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * Starting with Mailbox requirement set 1.5, you can also use the + * {@link https://learn.microsoft.com/javascript/api/office/office.context?view=outlook-js-preview&preserve-view=true#office-office-context-diagnostics-member | Office.context.diagnostics} + * property to get similar information. + */ + interface Diagnostics { + /** + * Gets a string that represents the name of the Office application. + * + * A string that can be one of the following values: `Outlook`, `OutlookWebApp`, `OutlookIOS`, or `OutlookAndroid`. + * + * **Note**: The `Outlook` value is returned for Outlook on desktop clients (i.e., Windows and Mac). + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + hostName: string; + /** + * Gets a string that represents the version of either the Office application or the Exchange Server (e.g., "15.0.468.0"). + * + * If the mail add-in is running in Outlook on a desktop or mobile client, the `hostVersion` property returns the version of the + * application, Outlook. In Outlook on the web, the property returns the version of the Exchange Server. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + hostVersion: string; + /** + * Gets a string that represents the current view of Outlook on the web. + * + * The returned string can be one of the following values: `OneColumn`, `TwoColumns`, or `ThreeColumns`. + * + * If the application is not Outlook on the web, then accessing this property results in undefined. + * + * Outlook on the web 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 on the web uses this single-column layout on the entire screen of a + * smartphone. + * + * - `TwoColumns`, which is displayed when the screen is wider. Outlook on the web uses this view on most tablets. + * + * - `ThreeColumns`, which is displayed when the screen is wide. For example, Outlook on the web uses this view in a full screen window on a + * desktop computer. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + OWAView: MailboxEnums.OWAView | "OneColumn" | "TwoColumns" | "ThreeColumns"; + } + /** + * Provides properties to temporarily set the content displayed in the body or subject of a message in read mode. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + interface Display { + /** + * Gets an object to temporarily set the content displayed in the body of a message in read mode. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + body: DisplayedBody; + /** + * Gets an object to temporarily set the content displayed in the subject of a message in read mode. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + subject: DisplayedSubject; + } + /** + * Provides a method to temporarily set the content displayed in the body of a message in read mode. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + interface DisplayedBody { + /** + * Temporarily sets the content displayed in the body of a message in read mode. The set content will remain visible until the user switches to a different messsage or + * closes the window of the current message. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Recommended**: Call + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-gettypeasync-member(1) | Office.context.mailbox.item.body.getTypeAsync}, + * then pass the returned value to the `options.coercionType` parameter. + * + * @param data - The string to be temporarily displayed in the body of a message. The string is limited to 1,000,000 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 function. + * `coercionType`: The format of the data to be temporarily displayed. 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, `asyncResult`, + * which is an `Office.AsyncResult` object. Any errors encountered will be provided in the `asyncResult.error` property. + * + * @beta + */ + setAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Temporarily sets the content displayed in the body of a message in read mode. The set content will remain visible until the user switches to a different messsage or + * closes the window of the current message. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param data - The string to be temporarily displayed in the body of a message. 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, `asyncResult`, + * which is an `Office.AsyncResult` object. Any errors encountered will be provided in the `asyncResult.error` property. + * + * @beta + */ + setAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides a method to temporarily set the content displayed in the subject of a message in read mode. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + interface DisplayedSubject { + /** + * Temporarily sets the content displayed in the subject of a message in read mode. The set content will remain visible until the user switches to a different messsage or + * closes the window of the current message. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param data - The string to be temporarily displayed in the subject of a 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 function. + * @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. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setAsync(data: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Temporarily sets the content displayed in the subject of a message in read mode. The set content will remain visible until the user switches to a different messsage or + * closes the window of the current message. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param data - The string to be temporarily displayed in the subject of a message. 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, `asyncResult`, + * which is an `Office.AsyncResult` object. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides the email properties of the sender or specified recipients of an email message or appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: MailboxEnums.ResponseType | string; + /** + * Gets the email address type of a recipient. + * + * @remarks + * **Important**: A `recipientType` property value isn't returned by the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.from?view=outlook-js-preview#outlook-office-from-getasync-member(1) | Office.context.mailbox.item.from.getAsync} + * and {@link https://learn.microsoft.com/javascript/api/outlook/office.organizer?view=outlook-js-preview#outlook-office-organizer-getasync-member(1) | Office.context.mailbox.item.organizer.getAsync} methods. + * The email sender or appointment organizer is always a user whose email address is on the Exchange server. + */ + recipientType: MailboxEnums.RecipientType | string; + } + /** + * Represents an email account on an Exchange Server. + * + * `EmailUser` objects are primarily received in {@link Office.MeetingSuggestion | MeetingSuggestion} and + * {@link Office.TaskSuggestion | TaskSuggestion} entities extracted from an Outlook item. To learn more about this scenario, refer to + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/extract-entity-strings-from-an-item | Extract entity strings from an Outlook item}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 the set of locations on an appointment. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface EnhancedLocation { + /** + * Adds to the set of locations associated with the appointment. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidFormatError`: The format of the specified data object is not valid. + * + * @param locationIdentifiers The locations to be added to the current list of locations. + * @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 function. + * @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. Check the `status` property of `asyncResult` to determine if the call succeeded. + */ + addAsync(locationIdentifiers: LocationIdentifier[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds to the set of locations associated with the appointment. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidFormatError`: The format of the specified data object is not valid. + * + * @param locationIdentifiers The locations to be added to the current list of locations. + * @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. Check the `status` property of `asyncResult` to determine if the call succeeded. + */ + addAsync(locationIdentifiers: LocationIdentifier[], callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the set of locations associated with the appointment. + * + * **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups} + * added as appointment locations aren't returned by this method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @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 function. + * @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. + */ + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the set of locations associated with the appointment. + * + * **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups} + * added as appointment locations aren't returned by this method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + */ + getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the set of locations associated with the appointment. + * + * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in `locationIdentifiers`. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param locationIdentifiers The locations to be removed from the current list of locations. + * @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 function. + * @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. Check the `status` property of `asyncResult` to determine if the call succeeded. + */ + removeAsync(locationIdentifiers: LocationIdentifier[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the set of locations associated with the appointment. + * + * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in `locationIdentifiers`. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param locationIdentifiers The locations to be removed from the current list of locations. + * @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. Check the `status` property of `asyncResult` to determine if the call succeeded. + */ + removeAsync(locationIdentifiers: LocationIdentifier[], callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides the current enhanced locations when the `Office.EventType.EnhancedLocationsChanged` event is raised. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + export interface EnhancedLocationsChangedEventArgs { + /** + * Gets the set of enhanced locations. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + enhancedLocations: LocationDetails[]; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + type: "olkEnhancedLocationsChanged"; + } + /** + * 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: This interface is supported in Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + */ + 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 | EmailAddressDetails} in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - This method is supported in Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + * To learn more about APIs supported in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - A `recipientType` property value isn't returned by the `getAsync` method. + * The email sender is always a user whose email address is on the Exchange server. + * + * @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 function. + * @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 the item's from value, as an `EmailAddressDetails` object. + */ + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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 | EmailAddressDetails} in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - This method is supported in Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + * To learn more about APIs supported in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - A `recipientType` property value isn't returned by the `getAsync` method. + * The email sender is always a user whose email address is on the Exchange server. + * + * @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 the item's from value, as an `EmailAddressDetails` object. + */ + getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides basic details about the notification message that raised the `Office.EventType.InfobarClicked` event. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + interface InfobarClickedEventArgs { + /** + * Gets additional details about the notification message. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + infobarDetails: InfobarDetails; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + type: "olkInfobarClicked"; + } + /** + * Provides additional details about the notification message that raised the `Office.EventType.InfobarClicked` event. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + interface InfobarDetails { + /** + * The action type. Currently, "Dismiss" is the only supported action. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + actionType: MailboxEnums.InfobarActionType; + /** + * The notification type. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + infobarType: MailboxEnums.InfobarType; + } + /** + * The `InternetHeaders` object represents custom internet headers that are preserved after the message item leaves Exchange + * and is converted to a MIME message. + * + * Internet headers are stored as string key-value pairs on a per-item basis. + * + * **Note**: This object is intended for you to set and get your custom headers on a message item. To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **Recommended practices** + * + * Currently, internet headers are a finite resource on a user's mailbox. When the quota is exhausted, you can't create any more internet headers + * on that mailbox, which can result in unexpected behavior from clients that rely on this to function. + * + * Apply the following guidelines when you create internet headers in your add-in. + * + * - Create the minimum number of headers required. The header quota is based on the total size of headers applied to a message. In Exchange Online, + * the header limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your organization's administrator. + * For further information on header limits, see + * {@link https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits | Exchange Online message limits} + * and {@link https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits | Exchange Server message limits}. + * + * - Name headers so that you can reuse and update their values later. As such, avoid naming headers in a variable manner + * (for example, based on user input, timestamp, etc.). + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + interface InternetHeaders { + /** + * Given an array of internet header names, this method returns a record containing those internet headers and their values. + * If the add-in requests a header that isn't available, that header won't be returned in the results. + * + * **Note**: This method is intended to return the values of the custom headers you set using the `setAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param names - The names of the internet headers to be returned. + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. The string key-value pairs of internet headers are returned in the + * `asyncResult.value` property. Any errors encountered are provided in the `asyncResult.error` property. + */ + getAsync(names: string[], options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult>) => void): void; + /** + * Given an array of internet header names, this method returns a record containing those internet headers and their values. + * If the add-in requests a header that isn't available, that header won't be returned in the results. + * + * **Note**: This method is intended to return the values of the custom headers you set using the `setAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param names - The names of the internet headers to be returned. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. The string key-value pairs of internet headers are returned in the + * `asyncResult.value` property. Any errors encountered are provided in the `asyncResult.error` property. + */ + getAsync(names: string[], callback: (asyncResult: Office.AsyncResult>) => void): void; + /** + * Given an array of internet header names, this method removes the specified headers from the internet header collection. + * + * **Note**: This method is intended to remove the custom headers you set using the `setAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param names - The names of the internet headers to be removed. + * @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 function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. + */ + removeAsync(names: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Given an array of internet header names, this method removes the specified headers from the internet header collection. + * + * **Note**: This method is intended to remove the custom headers you set using the `setAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. + */ + removeAsync(names: string[], callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the specified internet headers to the specified values. + * + * The `setAsync` method creates a new header if the specified header doesn't already exist; otherwise, the existing value is replaced with + * the new value. + * + * **Note**: This method is intended to set the values of your custom headers. + * + * **Important**: The header quota is based on the total size of headers applied to a message. In Exchange Online, + * the header limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your organization's administrator. + * For further information on header limits, see + * {@link https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits | Exchange Online message limits} + * and {@link https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits | Exchange Server message limits}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param headers - The names and corresponding values of the headers to be set. This should be a record object with its keys being internet header names + * and values being the corresponding header value strings. + * @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 function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. + */ + setAsync(headers: Record, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the specified internet headers to the specified values. + * + * The `setAsync` method creates a new header if the specified header doesn't already exist; otherwise, the existing value is replaced with + * the new value. + * + * **Note**: This method is intended to set the values of your custom headers. + * + * **Important**: The header quota is based on the total size of headers applied to a message. In Exchange Online, + * the header limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your organization's administrator. + * For further information on header limits, see + * {@link https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits | Exchange Online message limits} + * and {@link https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits | Exchange Server message limits}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param headers - The names and corresponding values of the headers to be set. This should be a record object with its keys being internet header names + * and values being the corresponding header value strings. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. + */ + setAsync(headers: Record, callback?: (asyncResult: Office.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. + * + * To see the full member list, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * If you want to see IntelliSense for only a specific type or mode, cast this item to one of the following: + * + * - {@link Office.AppointmentCompose | AppointmentCompose} + * + * - {@link Office.AppointmentRead | AppointmentRead} + * + * - {@link Office.MessageCompose | MessageCompose} + * + * - {@link Office.MessageRead | MessageRead} + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer, Appointment Attendee, Message Compose, Message Read + */ + interface Item { + } + /** + * 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Child interfaces: + * + * - {@link Office.AppointmentCompose | AppointmentCompose} + * + * - {@link Office.MessageCompose | MessageCompose} + */ + interface ItemCompose extends Item { + } + /** + * 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Child interfaces: + * + * - {@link Office.AppointmentRead | AppointmentRead} + * + * - {@link Office.MessageRead | MessageRead} + */ + interface ItemRead extends Item { + } + /** + * Represents a date and time in the local client's time zone. Read mode only. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 representing 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + */ + getAsync(callback: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - DataExceedsMaximumSize: The location parameter is longer than 255 characters. + * + * @param location - The location of the appointment. 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 function. + * @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. + */ + setAsync(location: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - DataExceedsMaximumSize: The location parameter is longer than 255 characters. + * + * @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. + */ + setAsync(location: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Represents a location. Read-only. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface LocationDetails { + /** + * The `LocationIdentifier` of the location. + */ + locationIdentifier: LocationIdentifier; + /** + * The location's display name. + */ + displayName: string; + /** + * The email address associated with the location. Only locations of type `Room` have an email address. + */ + emailAddress: string; + } + /** + * Represents the ID of a location. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface LocationIdentifier { + /** + * The location's unique ID. + * + * For `Room` type, it's the room's email address. + * + * For `Custom` type, it's the `displayName`. + */ + id: string; + /** + * The location's type. + */ + type: MailboxEnums.LocationType | string; + } + /** + * Provides access to the Microsoft Outlook add-in object model. + * + * Key properties: + * + * - `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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 Office application. + * It should be one of the following values: `Outlook`, `OutlookWebApp`, `OutlookIOS`, or `OutlookAndroid`. + * **Note**: The "Outlook" value is returned for Outlook on desktop clients (i.e., Windows and Mac). + * + * - `hostVersion` (string): A string that represents the version of either the Office application or the Exchange Server (e.g., "15.0.468.0"). + * If the mail add-in is running in Outlook on desktop or mobile clients, the `hostVersion` property returns the version of the + * application, Outlook. In Outlook on the web, the property returns the version of the Exchange Server. + * + * - `OWAView` (`MailboxEnums.OWAView` or string): An enum (or string literal) that represents the current view of Outlook on the web. + * If the application is not Outlook on the web, then accessing this property results in undefined. + * Outlook on the web 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}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * Starting with Mailbox requirement set 1.5, you can also use the + * {@link https://learn.microsoft.com/javascript/api/office/office.context?view=outlook-js-preview&preserve-view=true#office-office-context-diagnostics-member | Office.context.diagnostics} + * property to get similar information. + */ + diagnostics: Diagnostics; + /** + * Gets the URL of the Exchange Web Services (EWS) endpoint for this email account. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - Your app must have the **read item** 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 **read/write item** permissions to call the `saveAsync` method. + * + * - This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - 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://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item | get attachments from the selected item}. + */ + ewsUrl: string; + /** + * The mailbox item. Depending on the context in which the add-in opened, the item type may vary. + * If you want to see IntelliSense for only a specific type or mode, cast this item to one of the following: + * + * {@link Office.MessageCompose | MessageCompose}, {@link Office.MessageRead | MessageRead}, + * {@link Office.AppointmentCompose | AppointmentCompose}, {@link Office.AppointmentRead | AppointmentRead} + * + * **Important**: `item` can be null if your add-in supports pinning the task pane. For details on how to handle, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/pinnable-taskpane#implement-the-event-handler | Implement a pinnable task pane in Outlook}. + */ + item?: Item & ItemCompose & ItemRead & Message & MessageCompose & MessageRead & Appointment & AppointmentCompose & AppointmentRead; + /** + * Gets an object that provides methods to manage the categories master list associated with a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + masterCategories: MasterCategories; + /** + * Gets the URL of the REST endpoint for this email account. + * + * Your app must have the **read item** 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 **read/write item** permissions to call the `saveAsync` method. + * + * However, in delegate or shared scenarios, you should instead use the `targetRestUrl` property of the + * {@link Office.SharedProperties | SharedProperties} object (introduced in requirement set 1.8). For more information, + * see the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | shared folders and shared mailbox} article. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * The `restUrl` value can be used to make {@link https://learn.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 address, and time zone. + * + * More information is under {@link Office.UserProfile} + */ + userProfile: UserProfile; + + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Mailbox object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 - 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 | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Mailbox object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 of + * type `Office.AsyncResult`. + */ + addHandlerAsync(eventType: Office.EventType | string, handler: any, callback?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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: MailboxEnums.RestVersion | string): string; + /** + * Gets a dictionary containing time information in local client time. + * + * The dates and times used by a mail app for Outlook on the web or desktop clients can use different time zones. + * Outlook uses the client computer time zone; Outlook on the web 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 on desktop clients, 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 on the web, the `convertToLocalClientTime` method will return a dictionary object + * with the values set to the time zone specified in the EAC. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - 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://learn.microsoft.com/previous-versions/office/office-365-api/api/version-2.0/mail-rest-operations | Outlook Mail API} + * or the {@link https://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: MailboxEnums.RestVersion | string): 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. + * + * @returns A Date object with the time expressed in UTC. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param input - The local time value to convert. + */ + convertToUtcClientTime(input: LocalClientTime): Date; + /** + * Displays an existing calendar appointment. + * + * The `displayAppointmentForm` method opens an existing calendar appointment in a new window on the desktop. + * + * In Outlook on Mac, you can use this method to display a single appointment that isn't part of a recurring series, or the master appointment + * of a recurring series. However, you can't display an instance of the series because you can't access the properties + * (including the item ID) of instances of a recurring series. + * + * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K 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 is returned. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing calendar appointment. + */ + displayAppointmentForm(itemId: string): void; + /** + * Displays an existing calendar appointment. + * + * The `displayAppointmentFormAsync` method opens an existing calendar appointment in a new window on the desktop or in a dialog box on + * mobile devices. + * + * In Outlook on 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. However, you can't display an instance of the series because you can't access the properties + * (including the item ID) of instances of a recurring series. + * + * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K 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 is returned. + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing calendar appointment. + * @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 function. + * @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. + */ + displayAppointmentFormAsync(itemId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays an existing calendar appointment. + * + * The `displayAppointmentFormAsync` method opens an existing calendar appointment in a new window on the desktop or in a dialog box on + * mobile devices. + * + * In Outlook on 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. However, you can't display an instance of the series because you can't access the properties + * (including the item ID) of instances of a recurring series. + * + * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K 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 is returned. + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing calendar appointment. + * @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. + */ + displayAppointmentFormAsync(itemId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays an existing message. + * + * The `displayMessageForm` method opens an existing message in a new window on the desktop. + * + * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K characters. + * + * If the specified item identifier doesn't identify an existing message, no message will be displayed on the client computer, and + * no error message is returned. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - Don't 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. + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing message. + */ + displayMessageForm(itemId: string): void; + /** + * Displays an existing message. + * + * The `displayMessageFormAsync` method opens an existing message in a new window on the desktop or in a dialog box on mobile devices. + * + * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K 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 is returned. + * + * Do not use the `displayMessageForm` or `displayMessageFormAsync` method with an itemId that represents an appointment. + * Use the `displayAppointmentForm` or `displayAppointmentFormAsync` method to display an existing appointment, + * and `displayNewAppointmentForm` or `displayNewAppointmentFormAsync` to display a form to create a new appointment. + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing message. + * @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 function. + * @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. + */ + displayMessageFormAsync(itemId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays an existing message. + * + * The `displayMessageFormAsync` method opens an existing message in a new window on the desktop or in a dialog box on mobile devices. + * + * In Outlook on the web, this method opens the specified form only if the body of the form is less than or equal to 32K 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 is returned. + * + * Do not use the `displayMessageForm` or `displayMessageFormAsync` method with an itemId that represents an appointment. + * Use the `displayAppointmentForm` or `displayAppointmentFormAsync` method to display an existing appointment, + * and `displayNewAppointmentForm` or `displayNewAppointmentFormAsync` to display a form to create a new appointment. + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing message. + * @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. + */ + displayMessageFormAsync(itemId: string, callback?: (asyncResult: Office.AsyncResult) => void): 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 on the web, this method always displays a form with an attendees field. + * If you don't 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param parameters - An `AppointmentForm` describing the new appointment. All properties are optional. + */ + displayNewAppointmentForm(parameters: AppointmentForm): void; + /** + * Displays a form for creating a new calendar appointment. + * + * The `displayNewAppointmentFormAsync` 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 on the web, 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * @param parameters - An `AppointmentForm` describing the new appointment. All properties are optional. + * @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 function. + * @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. + */ + displayNewAppointmentFormAsync(parameters: AppointmentForm, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a form for creating a new calendar appointment. + * + * The `displayNewAppointmentFormAsync` 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 on the web, 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * @param parameters - An `AppointmentForm` describing the new appointment. All properties are optional. + * @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. + */ + displayNewAppointmentFormAsync(parameters: AppointmentForm, callback?: (asyncResult: Office.AsyncResult) => void): 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. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 | 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 | 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 | 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. **Important**: This link must be + * publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can + * be accessible on a private network as long as it doesn't need further authentication. + * + * `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; + /** + * Displays a form for creating a new message. + * + * The `displayNewMessageFormAsync` 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. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 | 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 | 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 | 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. **Important**: This link must be + * publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can + * be accessible on a private network as long as it doesn't need further authentication. + * + * `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. + * @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 function. + * @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. + */ + displayNewMessageFormAsync(parameters: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a form for creating a new message. + * + * The `displayNewMessageFormAsync` 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. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 | 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 | 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 | 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. **Important**: This link must be + * publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can + * be accessible on a private network as long as it doesn't need further authentication. + * + * `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. + * @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. + */ + displayNewMessageFormAsync(parameters: any, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets a string that contains a token used to call REST APIs or Exchange Web Services (EWS). + * + * 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. + * + * The token is returned as a string in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * *REST Tokens* + * + * When a REST token is requested (`options.isRest` = `true`), the resulting token won't work to authenticate EWS 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 + * **read/write mailbox** permission in its manifest. + * If the **read/write mailbox** 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. + * + * This API works for the following scopes. + * + * - `Mail.ReadWrite` + * + * - `Mail.Send` + * + * - `Calendars.ReadWrite` + * + * - `Contacts.ReadWrite` + * + * *EWS Tokens* + * + * When an EWS token is requested (`options.isRest` = `false`), the resulting token won't 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. + * + * You can pass both the token and either an attachment identifier or item identifier to an external system. That system uses + * the token as a bearer authorization token to call the Exchange Web Services (EWS) + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getattachment-operation | GetAttachment} operation or + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getitem-operation | GetItem} operation to return an + * attachment or item. For example, you can create a remote service to + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item | get attachments from the selected item}. + * + * **Important**: + * + * - This method is only supported in read mode in Outlook on Android and on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - EWS operations aren't supported in add-ins running in Outlook on iOS and on Android. A REST token is always returned in Outlook + * mobile clients even if `options.isRest` is set to `false`. + * + *- Calling the `getCallbackTokenAsync` method in read mode requires a minimum permission level of **read item**. + * + * - Calling the `getCallbackTokenAsync` method in compose mode requires you to have saved the item. + * The `saveAsync` method requires a minimum permission level of **read/write item**. + * + * - For guidance on delegate or shared scenarios, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | shared folders and shared mailbox} article. + * + * **Errors**: + * + * - `HTTPRequestFailure`: The request has failed. Please look at the diagnostics object for the HTTP error code. + * + * - `InternalServerError`: The Exchange server returned an error. Please look at the diagnostics object for more information. + * + * - `NetworkError`: The user is no longer connected to the network. Please check your network connection and try again. + * + * @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 returned as a string in the `asyncResult.value` property. + * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. + */ + getCallbackTokenAsync(options: Office.AsyncContextOptions & { isRest?: boolean }, callback: (asyncResult: Office.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. + * + * The token is returned as a string in the `asyncResult.value` property. + * + * @remarks + * [Api set: All support Read mode; Mailbox 1.3 introduced Compose mode support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - You can pass both the token and either an attachment identifier or item identifier to an external system. That system uses + * the token as a bearer authorization token to call the Exchange Web Services (EWS) + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getattachment-operation | GetAttachment} or + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getitem-operation | GetItem} operation to return an + * attachment or item. For example, you can create a remote service to + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item | get attachments from the selected item}. + * + * - Calling the `getCallbackTokenAsync` method in read mode requires a minimum permission level of **read item**. + * + * - Calling the `getCallbackTokenAsync` method in compose mode requires you to have saved the item. + * The `saveAsync` method requires a minimum permission level of **read/write item**. + * + * - This method isn't supported in Outlook on Android or on iOS. EWS operations aren't supported in add-ins running on Outlook mobile clients. + * For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - For guidance on delegate or shared scenarios, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | shared folders and shared mailbox} article. + * + * **Errors**: + * + * - `HTTPRequestFailure`: The request has failed. Please look at the diagnostics object for the HTTP error code. + * + * - `InternalServerError`: The Exchange server returned an error. Please look at the diagnostics object for more information. + * + * - `NetworkError`: The user is no longer connected to the network. Please check your network connection and try again. + * + * @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 returned as a string in the `asyncResult.value` property. + * If there was an error, 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: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; + /** + * Gets currently selected messages on which an add-in can activate and perform operations. An add-in can activate on a maximum of 100 messages at a time. + * To learn more about item multi-select, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: This method only applies to messages. + * + * @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 function. + * @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 properties of the selected messages, such as the item ID and subject, are returned as an array of + * {@link Office.SelectedItemDetails | SelectedItemDetails} objects in the `asyncResult.value` property. The objects in the array follow the order in which + * messages were selected. + */ + getSelectedItemsAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets currently selected messages on which an add-in can activate and perform operations. An add-in can activate on a maximum of 100 messages at a time. + * To learn more about item multi-select, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: This method only applies to messages. + * + * @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 function. + * @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 properties of the selected messages, such as the item ID and subject, are returned as an array of + * {@link Office.SelectedItemDetails | SelectedItemDetails} objects in the `asyncResult.value` property. The objects in the array follow the order in which + * messages were selected. + */ + getSelectedItemsAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets a token identifying the user and the Office Add-in. + * + * The token is returned as a string in the `asyncResult.value` property. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * The `getUserIdentityTokenAsync` method returns a token that you can use to identify and + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication | authenticate the add-in and user with an external system}. + * + * **Errors**: + * + * - `HTTPRequestFailure`: The request has failed. Please look at the diagnostics object for the HTTP error code. + * + * - `InternalServerError`: The Exchange server returned an error. Please look at the diagnostics object for more information. + * + * - `NetworkError`: The user is no longer connected to the network. Please check your network connection and try again. + * + * @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 returned as a string in the `asyncResult.value` property. + * If there was an error, 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: (asyncResult: Office.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. + * + * The `makeEwsRequestAsync` method sends an EWS request on behalf of the add-in to Exchange. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - To enable the `makeEwsRequestAsync` method to make EWS requests, the server administrator must set `OAuthAuthentication` to `true` on the + * Client Access Server EWS directory . + * + * - Your add-in must have the **read/write mailbox** permission to use the `makeEwsRequestAsync` method. + * For information about using the **read/write mailbox** permission and the EWS operations that you can call with the `makeEwsRequestAsync` method, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Specify permissions for mail add-in access to the user's mailbox}. + * + * - If your add-in needs to access Folder Associated Items or its XML request must specify UTF-8 encoding (`\`), + * it must use Microsoft Graph or REST APIs to access the user's mailbox instead. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - This method isn't supported when the add-in is loaded in a Gmail mailbox. + * + * - When you use the `makeEwsRequestAsync` method in add-ins that run in Outlook versions earlier than Version 15.0.4535.1004, you must set + * the encoding value to ISO-8859-1 (``). To determine the version of an Outlook client, use the + * `mailbox.diagnostics.hostVersion` property. You don't need to set the encoding value when your add-in is running in Outlook on the web. + * To determine the Outlook client in which your add-in is running, use the `mailbox.diagnostics.hostName` property. + * + * @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 in the `error` property. + * @param userContext - Optional. Any state data that is passed to the asynchronous method. + */ + makeEwsRequestAsync(data: any, callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Mailbox object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param eventType - The event that should revoke the handler. + * @param options - 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 | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Mailbox object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param eventType - The event that should revoke the handler. + * @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 | string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Represents the categories master list on the mailbox. + * + * In Outlook, a user can tag messages and appointments by using a category to color-code them. + * The user defines categories in a master list on their mailbox. They can then apply one or more categories to an item. + * + * **Important**: In delegate or shared scenarios, the delegate can get the categories in the master list but can't add or remove categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface MasterCategories { + /** + * Adds categories to the master list on a mailbox. Each category must have a unique name but multiple categories can use the same color. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `DuplicateCategory`: One of the categories provided is already in the master category list. + * + * - `PermissionDenied`: The user does not have permission to perform this action. + * + * @param categories - The categories to be added to the master list on the mailbox. + * @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 function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addAsync(categories: CategoryDetails[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds categories to the master list on a mailbox. Each category must have a unique name but multiple categories can use the same color. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `DuplicateCategory`: One of the categories provided is already in the master category list. + * + * - `PermissionDenied`: The user does not have permission to perform this action. + * + * @param categories - The categories to be added to the master list on the mailbox. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addAsync(categories: CategoryDetails[], callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the master list of categories on a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If adding categories fails, the `asyncResult.error` property will contain an error code. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the master list of categories on a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes categories from the master list on a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `PermissionDenied`: The user does not have permission to perform this action. + * + * @param categories - The categories to be removed from the master list on the mailbox. + * @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 function. + * @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 categories fails, the `asyncResult.error` property will contain an error code. + */ + removeAsync(categories: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes categories from the master list on a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `PermissionDenied`: The user does not have permission to perform this action. + * + * @param categories - The categories to be removed from the master list on the mailbox. + * @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 categories fails, the `asyncResult.error` property will contain an error code. + */ + removeAsync(categories: string[], callback?: (asyncResult: Office.AsyncResult) => void): 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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; + } + /** + * A subclass of {@link Office.Item | 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Child interfaces: + * + * - {@link Office.MessageCompose | MessageCompose} + * + * - {@link Office.MessageRead | MessageRead} + */ + interface Message extends Item { + } + /** + * 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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Parent interfaces: + * + * - {@link Office.ItemCompose | ItemCompose} + * + * - {@link Office.Message | Message} + */ + 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. + * + * Depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients you can get or update. + * See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + bcc: Recipients; + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + body: Body; + /** + * Gets an object that provides methods for managing the item's categories. + * + * **Important**: In Outlook on the web, you can't use the API to manage categories on a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + categories: Categories; + /** + * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depend on the mode of the + * current item. + * + * The `cc` property returns a `Recipients` object that provides methods to get or update the recipients on the + * **Cc** line of the message. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients + * you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + conversationId: string; + /** + * Gets or sets the delayed delivery date and time of a message. + * + * The `delayDeliveryTime` property returns a `DelayDeliveryTime` object that provides methods to manage the delivery date and time of the message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + delayDeliveryTime: DelayDeliveryTime; + /** + * Gets the email address of the sender of a message. + * + * The `from` property returns a `From` object that provides a method to get the from value. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This property is supported in Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + */ + from: From; + /** + * Gets or sets the custom internet headers of a message. + * + * The `internetHeaders` property returns an `InternetHeaders` object that provides methods to manage the internet headers on the message. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + internetHeaders: InternetHeaders; + /** + * 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the notification messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + notificationMessages: NotificationMessages; + /** + * Gets the object to get or set the {@link Office.SensitivityLabel | sensitivity label} of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + sensitivityLabel: SensitivityLabel; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web and desktop clients, the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item + * that this item belongs to. However, on 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://learn.microsoft.com/office/dev/add-ins/outlook/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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + seriesId: string; + /** + * Manages the {@link Office.SessionData | SessionData} of an item in Compose mode. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + sessionData: SessionData; + /** + * 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 depend 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. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients + * you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * **Important**: In recent builds of Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to + * this action (whether using this API or the Outlook UI). To work around this issue, you can try using the `addFileAttachmentFromBase64` API + * introduced with requirement set 1.8. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: 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 - 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 function. + * `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 - 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 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 & { isInline: boolean }, callback?: (asyncResult: Office.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. + * + * **Important**: In recent builds of Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to + * this action (whether using this API or the Outlook UI). To work around this issue, you can try using the `addFileAttachmentFromBase64` API + * introduced with requirement set 1.8. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: 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 - 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 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?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - Adding an inline Base64 file to a messsage in compose mode is supported in Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - If you're using a data URL API (for example, `readAsDataURL`), you need to strip out the data URL prefix, then send the rest of the string to this API. + * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + * + * - If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} + * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. + * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that isn't 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. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). + * @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 function. + * `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 - 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 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. + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options: Office.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - Adding an inline Base64 file to a messsage in compose mode is supported in Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - If you're using a data URL API (for example, `readAsDataURL`), you need to strip out the data URL prefix, then send the rest of the string to this API. + * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + * + * - If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} + * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. + * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that isn't 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. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 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. 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. + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 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 function. + * @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 | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: Office.EventType | string, handler: any, callback?: (asyncResult: Office.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 function, 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 function, 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 on the web, 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `NumberOfAttachmentsExceeded`: 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 function. + * @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 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?: (asyncResult: Office.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 function, 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 function, 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 on the web, 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `NumberOfAttachmentsExceeded`: 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 - 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 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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Closes the current item that is being composed. + * + * The behavior 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, the `close` method has no effect on a reply in the Reading Pane. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: 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. + * + * **Tip**: Use the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.messagecompose?view=outlook-js-preview&preserve-view=true#outlook-office-messagecompose-closeasync-member(1) | closeAsync} + * method instead of the `close` method if you want your add-in to: + * + * - Automatically discard a message being composed without prompting the user with the save dialog. + * + * - Determine when a user cancels the save item dialog on a message being composed. + * + * - Close a reply in the Reading Pane or an existing draft from an Outlook desktop client. + * + */ + close(): void; + /** + * Closes the current message being composed with the option to discard unsaved changes. + * The message being composed can be a new message, reply, or an existing draft. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: The `closeAsync` method is in preview. It's only supported in Outlook on Windows at this time. + * + * **Errors**: + * + * - `The operation was cancelled by the user`: The user selects **Cancel** from the save dialog and the `discardItem` property isn't defined or is set to `false`. + * + * - `The operation is not supported`: The `closeAsync` method attempts to close a reply in the Reading Pane or an existing draft and the `discardItem` property isn't defined or + * is set to `false`. + * + * @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 function. + * `discardItem`: If `true`, the current message being composed is closed and unsaved changes are discarded. When the parameter isn't declared or is + * set to `false`, a save dialog appears prompting the user to save a draft, discard changes, or cancel the operation. This behavior occurs for new messages and replies + * popped out from the Reading Pane. If you want to close a reply in the Reading Pane or an existing draft, you must set `discardItem` to `true`. Otherwise, the call will + * return an error. For more information on the error, see the Remarks section. + * + * @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 + */ + closeAsync(options: Office.AsyncContextOptions & { discardItem: boolean }, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Closes the current new message being composed. + * + * The behavior on a new message being composed depends on whether the message contains any unsaved changes. If no changes have been made, the message is + * closed without a save dialog. On the other hand, if the message contains unsaved changes, a save dialog appears prompting the user to save a draft, + * discard changes, or cancel the operation. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: The `closeAsync` method is in preview. It's only supported in Outlook on Windows at this time. + * + * **Errors**: + * + * - `The operation was cancelled by the user`: The user selects **Cancel** from the save dialog. + * + * - `The operation is not supported`: The `closeAsync` method attempts to close a reply in the Reading Pane or an existing draft. + * + * @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 + */ + closeAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Disables the Outlook client signature. + * + * The behavior of this method depends on which client the add-in is running. + * + * - In Outlook on Windows and on Mac, the signature under the **New messages** and **Replies/forwards** sections + * of the sending account is set to **(none)**. + * + * - In Outlook on the web, the signature option for new mails, replies, and forwards is disabled. + * A signature that's selected is also disabled by the method. + * + * - In Outlook on Android and on iOS, the signature saved on the mobile device is cleared. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This method is supported in Message Compose on Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 function. + * @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. + */ + disableClientSignatureAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Disables the Outlook client signature. + * + * The behavior of this method depends on which client the add-in is running. + * + * - In Outlook on Windows and on Mac, the signature under the **New messages** and **Replies/forwards** sections + * of the sending account is set to **(none)**. + * + * - In Outlook on the web, the signature option for new mails, replies, and forwards is disabled. + * A signature that's selected is also disabled by the method. + * + * - In Outlook on Android and on iOS, the signature saved on the mobile device is cleared. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This method is supported in Message Compose in Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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. + */ + disableClientSignatureAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 function. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message 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 function. + * @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 an error code with the reason for + * the failure. + */ + getAttachmentsAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @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 an error code with the reason for + * the failure. + */ + getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. + * The coercion type can be HTML or plain text. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This method is supported in Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 function. + * @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 `asyncResult.value` property contains an object with the item's compose type + * and coercion type. + * + * @returns + * An object with `ComposeType` and `CoercionType` enum values for the message item. + */ + getComposeTypeAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. + * The coercion type can be HTML or plain text. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This method is supported in Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 `asyncResult.value` property contains an object with the item's compose type + * and coercion type. + * + * @returns + * An object with `ComposeType` and `CoercionType` enum values for the message item. + */ + getComposeTypeAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message 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 function. + * @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 initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property.. + */ + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously gets the ID of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., 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 synced to the server. + * Until the item is synced, the `itemId` is not recognized and using it returns an error. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously gets the ID of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., 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 synced to the server. + * Until the item is synced, the `itemId` is not recognized and using it returns an error. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + getItemIdAsync(callback: (asyncResult: Office.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 an empty string 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 function, 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`. + * + * @returns + * The selected data as a string with format determined by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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 | string, options: Office.AsyncContextOptions, callback: (asyncResult: Office.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 an empty string 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 function, 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`. + * + * @returns + * The selected data as a string with format determined by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 | string, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * **Important**: In Message Compose mode, this API is not supported in Outlook on the web or on Windows unless the following conditions are met. + * + * a. **Delegate access/Shared folders** + * + * 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + * + * 3. The delegate opens the draft from the shared folder then continues composing. + * + * b. **Shared mailbox (applies to Outlook on Windows only)** + * + * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + * + * 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + * + * The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. + * After the message has been sent, it's usually found in the sender's **Sent Items** folder. + * + * @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 function. + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * **Important**: In Message Compose mode, this API is not supported in Outlook on the web or on Windows unless the following conditions are met. + * + * a. **Delegate access/Shared folders** + * + * 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + * + * 3. The delegate opens the draft from the shared folder then continues composing. + * + * b. **Shared mailbox (applies to Outlook on Windows only)** + * + * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + * + * 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + * + * The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. + * After the message has been sent, it's usually found in the sender's **Sent Items** folder. + * + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message 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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + */ + isClientSignatureEnabledAsync(callback: (asyncResult: Office.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 {@link Office.CustomProperties | 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 aren't encrypted on the item, so this shouldn't 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, save, and remove custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: (asyncResult: Office.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 on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` + * is 200 characters in Outlook on the web and on Windows. + * @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 function. + * @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(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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 on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` + * is 200 characters in Outlook on the web and on Windows. + * @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(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param eventType - The event that should revoke the handler. + * @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 function. + * @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 | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param eventType - The event that should revoke the handler. + * @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 | string, callback?: (asyncResult: Office.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 function. + * In Outlook on the web 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. + * + * When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * **Note**: If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID 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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @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 function. + * @param callback - 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: (asyncResult: Office.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 function. + * In Outlook on the web 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. + * + * When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * **Note**: If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID 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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + saveAsync(callback: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: 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 - 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 function. + * `coercionType`: If text, the current style is applied in Outlook on the web and desktop clients. + * 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 on the web and the default style is + * applied in Outlook on desktop clients. 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?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: 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?: (asyncResult: Office.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`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item | Object Model} page. + * + * Parent interfaces: + * + * - {@link Office.ItemRead | ItemRead} + * + * - {@link Office.Message | Message} + */ + interface MessageRead extends Message, ItemRead { + /** + * Gets the item's attachments as an array. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519 | Blocked attachments in Outlook}. + * + */ + attachments: AttachmentDetails[]; + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + body: Body; + /** + * Gets an object that provides methods for managing the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + categories: Categories; + /** + * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depend on the mode of the + * current item. + * + * The `cc` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each recipient listed on the **Cc** line of the message. The maximum number of recipients returned varies per Outlook client. + * + * - Windows: 500 recipients + * + * - Android, classic Mac UI, iOS: 100 recipients + * + * - Web browser: 20 recipients + * + * - New Mac UI: No limit + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + conversationId: string; + /** + * Gets the date and time that an item was created. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + dateTimeModified: Date; + /** + * Gets an object to temporarily set the content displayed in the body or subject of a message in read mode. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @beta + */ + display: Display; + /** + * 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + end: 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + from: EmailAddressDetails; + /** + * Gets the internet message identifier for an email message. + * + * **Important**: In the **Sent Items** folder, the `internetMessageId` may not be available yet on recently sent items. In that case, + * consider using {@link https://learn.microsoft.com/office/dev/add-ins/outlook/web-services | Exchange Web Services} to get this + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/internetmessageid | property from the server}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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.Occurrence.IPM.Appointment, IPM.Appointment.Occurrence
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 {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | 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 + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | 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://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api#get-the-item-id | Use the Outlook REST APIs from an Outlook add-in}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the location of a meeting request. + * + * The `location` property returns a string that contains the location of the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + normalizedSubject: string; + /** + * Gets the notification messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + notificationMessages: 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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + recurrence: Recurrence; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web and desktop clients, the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item + * that this item belongs to. However, on 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://learn.microsoft.com/office/dev/add-ins/outlook/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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + sender: 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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + start: Date; + /** + * 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:. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 depend on the mode of the + * current item. + * + * The `to` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each recipient listed on the **To** line of the message. The maximum number of recipients returned varies per Outlook client. + * + * - Windows: 500 recipients + * + * - Android, classic Mac UI, iOS: 100 recipients + * + * - Web browser: 20 recipients + * + * - New Mac UI: No limit + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + to: EmailAddressDetails[]; + + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 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 function. + * @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 | string, handler: any, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: Office.EventType | string, handler: any, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column 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 attempts 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. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyAllForm(formData: string | ReplyFormData): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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 function. + * @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. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column 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 attempts 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. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyForm(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 on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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 function. + * @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. + */ + displayReplyFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts 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 on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @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. + */ + displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets all the internet headers for the message as a string. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @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 function. + * @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 internet headers data is provided in the `asyncResult.value` property as a string. + * Refer to {@link https://tools.ietf.org/html/rfc2183 | RFC 2183} for the formatting information of the returned string value. + * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + */ + getAllInternetHeadersAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets all the internet headers for the message as a string. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 internet headers data is provided in the `asyncResult.value` property as a string. + * Refer to {@link https://tools.ietf.org/html/rfc2183 | RFC 2183} for the formatting information of the returned string value. + * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + */ + getAllInternetHeadersAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the current message in EML format encoded in Base64. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @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 function. + * @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 Base64-encoded EML format of the message is returned in the `asyncResult.value` property. Any errors encountered are + * returned in the `asyncResult.error` property. + * + * @beta + */ + getAsFileAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the current message in EML format encoded in Base64. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded EML format of the message is returned in the `asyncResult.value` property. Any errors encountered are + * returned in the `asyncResult.error` property. + * + * @beta + */ + getAsFileAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.MessageRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 function. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.MessageRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web and mobile 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. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @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 + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the entities found in the selected item's body. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + getEntities(): Entities; + /** + * Gets an array of all the entities of the specified entity type found in the selected item's body. + * + * @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 + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param entityType - One of the `EntityType` enumeration values. + * + * While the minimum permission level to use this method is **restricted**, some entity types require **read item** to access, as specified in the + * following table. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Value of entityTypeType of objects in returned arrayRequired Permission Level
AddressStringRestricted
ContactContactReadItem
EmailAddressStringReadItem
MeetingSuggestionMeetingSuggestionReadItem
PhoneNumberPhoneNumberRestricted
TaskSuggestionTaskSuggestionReadItem
URLStringRestricted
+ */ + getEntitiesByType(entityType: MailboxEnums.EntityType | string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Returns well-known entities in the selected item that pass the named filter defined in an XML manifest file. + * + * @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. If there's no `ItemHasKnownEntity` element in the manifest with a + * `FilterName` element value that matches the `name` parameter, the method returns `null`. If the `name` parameter matches an + * `ItemHasKnownEntity` element in the manifest, but there are no entities in the current item that match, the method returns an empty array. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param name - The name of the `ItemHasKnownEntity` rule element that defines the filter to match. + */ + getFilteredEntitiesByName(name: string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @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 function. + * @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 initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns string values in the selected item that match the regular expressions defined in an XML manifest file. + * + * @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. 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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + getRegExMatches(): any; + /** + * Returns string values in the selected item that match the named regular expression defined in an XML manifest file. + * + * @returns + * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the manifest XML file, + * with the specified `RegExName` element value. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @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 used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 an XML manifest file. + * Highlighted matches apply to contextual add-ins. + * + * **Note**: This method is used with the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/activation-rules | activation rules feature for Outlook add-ins}, which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | Teams manifest for Office Add-ins (preview)}. + * + * 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 on iOS or Android. + * + * @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 + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + getSelectedRegExMatches(): any; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @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 function. + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox (now in preview). + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Note**: This method is not supported in Outlook on iOS or Android. + * + * @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 `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: Office.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 {@link Office.CustomProperties | 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 aren't encrypted on the item, so this shouldn't 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, save, and remove custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param eventType - The event that should revoke the handler. + * @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 function. + * @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 | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param eventType - The event that should revoke the handler. + * @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 | string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides methods to get and set the all-day event status of a meeting in an Outlook add-in. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @beta + */ + interface IsAllDayEvent { + /** + * Gets the boolean value indicating whether the event is all day or not. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * + * @beta + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the boolean value indicating whether the event is all day or not. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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`. + * + * @beta + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the all-day event status of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * If an appointment is marked as an all-day event: + * - Start and end time will be marked as 12:00 AM (just like in the Outlook UI). Start time will return 12:00 AM and end time will be 12:00 AM the next day. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param isAllDayEvent - boolean value to set the all day event status. + * @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 function. + * @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 + */ + setAsync(isAllDayEvent: boolean, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the all-day event status of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * If an appointment is marked as an all-day event: + * - Start and end time will be marked as 12:00 AM (just like in the Outlook UI). Start time will return 12:00 AM and end time will be 12:00 AM the next day. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param isAllDayEvent - boolean value to set the all day event status. + * @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 + */ + setAsync(isAllDayEvent: boolean, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * The definition of the action for a notification message. + * + * **Important**: In modern Outlook on the web, the `NotificationMessageAction` object is available in Compose mode only. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface NotificationMessageAction { + /** + * The type of action to be performed. + * `ActionType.ShowTaskPane` is the only supported action. + */ + actionType: string | MailboxEnums.ActionType; + /** + * The text of the action link. + */ + actionText: string; + /** + * The button defined in the manifest. + */ + commandId: string; + /** + * Any JSON data the action button needs to pass on. + * This data can be retrieved by calling `item.getInitializationContextAsync`. + */ + contextData: any; + } + /** + * An array of `NotificationMessageDetails` objects are returned by the `NotificationMessages.getAllAsync` method. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * **Important**: Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + */ + type: MailboxEnums.ItemNotificationMessageType | string; + /** + * A reference to an icon that is defined in the manifest. It appears in the infobar area. + * It is applicable if the type is `InformationalMessage`, and is required if the type is `InsightMessage`. + * Specifying this parameter for an unsupported type results in an exception. + * + * **Note**: At present, the custom icon is displayed in Outlook on Windows only and not on other clients (e.g., Mac, web browser). + */ + 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; + /** + * Specifies if the message should be persistent. 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; + /** + * Specifies actions for the message. Limit: 1 action. This limit doesn't count the "Dismiss" action which is included by default. + * Only applicable when the type is `InsightMessage`. + * Specifying this property for an unsupported type or including too many actions throws an error. + * + * **Important**: In modern Outlook on the web, the `actions` property is available in Compose mode only. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + actions?: NotificationMessageAction[]; + } + /** + * The `NotificationMessages` object is returned as the `notificationMessages` property of an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - Only one notification of type {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} + * is allowed per add-in. Attempting to add more will throw an error. + * + * - In modern Outlook on the web, you can add an `InsightMessage` notification only in Compose mode. + * + * - Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + * + * @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 - 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 function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + addAsync(key: string, JSONmessage: NotificationMessageDetails, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - Only one notification of type {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} + * is allowed per add-in. Attempting to add more will throw an error. + * + * - In modern Outlook on the web, you can add an `InsightMessage` notification only in Compose mode. + * + * - Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + * + * @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`. + */ + addAsync(key: string, JSONmessage: NotificationMessageDetails, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns all keys and messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @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 function. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns all keys and messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes a notification message for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param key - The key for the notification message to remove. + * @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 function. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes a notification message for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 - 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 function. + * @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?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides the updated Office theme that raised the `Office.EventType.OfficeThemeChanged` event. + * + * @remarks + * [Api set: Mailbox preview] + * + * @beta + */ + export interface OfficeThemeChangedEventArgs { + /** + * Gets the updated Office theme. + * + * @remarks + * [Api set: Mailbox preview] + * + * @beta + */ + officeTheme: Office.OfficeTheme; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox preview] + * + * @beta + */ + type: "officeThemeChanged"; + } + /** + * 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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + interface Organizer { + /** + * Gets the organizer value of an appointment as an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: A `recipientType` property value isn't returned by the getAsync method. + * The appointment organizer is always a user whose email address is on the Exchange server. + * + * @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 function. + * @param callback - Optional. 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 the appointment's organizer value, + * as an `EmailAddressDetails` object. + */ + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the organizer value of an appointment as an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: A `recipientType` property value isn't returned by the getAsync method. + * The appointment organizer is always a user whose email address is on the Exchange server. + * + * @param callback - Optional. 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 the appointment's organizer value, + * as an `EmailAddressDetails` object. + */ + getAsync(callback?: (asyncResult: Office.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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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; + } + /** + * Represents recipients of an item. Compose mode only. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + interface Recipients { + /** + * Adds a recipient list to the existing recipients for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: With the `addAsync` method, you can add a maximum of 100 recipients to a mail item in Outlook on Windows, on Mac (classic UI), + * on the web, on Android, and on iOS. However, take note of the following: + * + * - In Outlook on Windows, on Mac (classic UI), and on the web, you can have a maximum of 500 recipients in a target field. + * If you need to add more than 100 recipients to a mail item, you can call `addAsync` repeatedly, but be mindful of the recipient limit of the field. + * + * - In Outlook on Android and on iOS, the `addAsync` method isn't supported in Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * There's no recipient limit if you call `addAsync` in Outlook on Mac (new UI). + * + * **Errors**: + * + * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + * + * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, + * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + * @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 function. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Adds a recipient list to the existing recipients for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: With the `addAsync` method, you can add a maximum of 100 recipients to a mail item in Outlook on Windows, on Mac (classic UI), + * on the web, on Android, and on iOS. However, take note of the following: + * + * - In Outlook on Windows, on Mac (classic UI), and on the web, you can have a maximum of 500 recipients in a target field. + * If you need to add more than 100 recipients to a mail item, you can call `addAsync` repeatedly, but be mindful of the recipient limit of the field. + * + * - In Outlook on Android and on iOS, the `addAsync` method isn't supported in Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * There's no recipient limit if you call `addAsync` in Outlook on Mac (new UI). + * + * **Errors**: + * + * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + * + * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, + * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets a recipient list for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * The maximum number of recipients returned by this method varies per Outlook client. + * + * - Windows, web browser, Mac (classic UI): 500 recipients + * + * - Android, iOS: 100 recipients + * + * - Mac (new UI): No limit + * + * The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the following characteristics. + * + * - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the recipient's saved display name. + * + * - A Teams meeting status icon appears before the recipient's name or email address. + * + * - A semicolon appears after the recipient's name or email address. + * + * - The recipient's name or email address is underlined or enclosed in a box. + * + * To resolve an email address once it's added to a mail item, the sender must use the **Tab** key or select a suggested contact or email address from + * the auto-complete list. + * + * In Outlook on the web and on Windows, if a user creates a new message by activating a contact's email address link from their contact + * or profile card, your add-in's `Recipients.getAsync` call returns the contact's email address in the `displayName` property of the associated + * {@link Office.EmailAddressDetails | EmailAddressDetails} object instead of the contact's saved name. For more details, see + * {@link https://github.com/OfficeDev/office-js/issues/2201 | related GitHub issue}. + * + * @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 function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * of type `Office.AsyncResult`. The `asyncResult.value` property of the result is an array of + * {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets a recipient list for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * The maximum number of recipients returned by this method varies per Outlook client. + * + * - Windows, web browser, Mac (classic UI): 500 recipients + * + * - Android, iOS: 100 recipients + * + * - Mac (new UI): No limit + * + * The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the following characteristics. + * + * - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the recipient's saved display name. + * + * - A Teams meeting status icon appears before the recipient's name or email address. + * + * - A semicolon appears after the recipient's name or email address. + * + * - The recipient's name or email address is underlined or enclosed in a box. + * + * To resolve an email address once it's added to a mail item, the sender must use the **Tab** key or select a suggested contact or email address from + * the auto-complete list. + * + * In Outlook on the web and on Windows, if a user creates a new message by activating a contact's email address link from their contact + * or profile card, your add-in's `Recipients.getAsync` call returns the contact's email address in the `displayName` property of the associated + * {@link Office.EmailAddressDetails | EmailAddressDetails} object instead of the contact's saved name. For more details, see + * {@link https://github.com/OfficeDev/office-js/issues/2201 | related GitHub issue}. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * of type `Office.AsyncResult`. The `asyncResult.value` property of the result is an array of + * {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets a recipient list for an appointment or message. + * + * The `setAsync` method overwrites the current recipient list. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: With the `setAsync` method, you can set a maximum of 100 recipients in Outlook on Windows, on Mac (classic UI), + * on the web, on Android, and on iOS. However, take note of the following: + * + * - In Outlook on Windows, on Mac (classic UI), and on the web, you can have a maximum of 500 recipients in a target field. + * If you need to set more than 100 recipients, you can call `setAsync` repeatedly, but be mindful of the recipient limit of the field. + * + * - In Outlook on Android and on iOS, the `setAsync` method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * There's no recipient limit if you call `setAsync` in Outlook on Mac (new UI). + * + * **Errors**: + * + * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + * + * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, + * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + * @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 function. + * @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 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: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets a recipient list for an appointment or message. + * + * The `setAsync` method overwrites the current recipient list. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: With the `setAsync` method, you can set a maximum of 100 recipients in Outlook on Windows, on Mac (classic UI), + * on the web, on Android, and on iOS. However, take note of the following: + * + * - In Outlook on Windows, on Mac (classic UI), and on the web, you can have a maximum of 500 recipients in a target field. + * If you need to set more than 100 recipients, you can call `setAsync` repeatedly, but be mindful of the recipient limit of the field. + * + * - In Outlook on Android and on iOS, the `setAsync` method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * There's no recipient limit if you call `setAsync` in Outlook on Mac (new UI). + * + * **Errors**: + * + * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + * + * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, + * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + * @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 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: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides change status of recipients fields when the `Office.EventType.RecipientsChanged` event is raised. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + export interface RecipientsChangedEventArgs { + /** + * Gets an object that indicates change state of recipients fields. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + changedRecipientFields: RecipientsChangedFields; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + type: "olkRecipientsChanged"; + } + /** + * Represents `RecipientsChangedEventArgs.changedRecipientFields` object. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + interface RecipientsChangedFields { + /** + * Gets if recipients in the **bcc** field were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + bcc: boolean + /** + * Gets if recipients in the **cc** field were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + cc: boolean; + /** + * Gets if optional attendees were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + optionalAttendees: boolean; + /** + * Gets if required attendees were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + requiredAttendees: boolean; + /** + * Gets if resources were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + resources: boolean; + /** + * Gets if recipients in the **to** field were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + to: boolean; + } + /** + * 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). + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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)
+ */ + interface Recurrence { + /** + * Gets or sets the properties of the recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + recurrenceProperties?: RecurrenceProperties; + /** + * Gets or sets the properties of the recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + recurrenceTimeZone?: RecurrenceTimeZone; + /** + * Gets or sets the type of the recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + recurrenceType: MailboxEnums.RecurrenceType | string; + /** + * The {@link Office.SeriesTime | 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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + seriesTime: SeriesTime; + + /** + * Returns the current recurrence object of an appointment series. + * + * This method returns the entire `Recurrence` object for the appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @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 function. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns the current recurrence object of an appointment series. + * + * This method returns the entire `Recurrence` object for the appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the recurrence pattern of an appointment series. + * + * **Note**: `setAsync` should only be available for series items and not instance items. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidEndTime`: The appointment end time is before its start time. + * + * @param recurrencePattern - A recurrence object. + * @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 function. + * @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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the recurrence pattern of an appointment series. + * + * **Note**: `setAsync` should only be available for series items and not instance items. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidEndTime`: 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?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides updated recurrence object that raised the `Office.EventType.RecurrenceChanged` event. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + export interface RecurrenceChangedEventArgs { + /** + * Gets the updated recurrence object. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + recurrence: Recurrence; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + type: "olkRecurrenceChanged"; + } + /** + * Represents the properties of the recurrence. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + 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?: MailboxEnums.Days | string; + /** + * Represents the set of days for this recurrence. Valid values are: 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', and 'Sun'. + */ + days?: MailboxEnums.Days[] | string[]; + /** + * Represents the number of the week in the selected month e.g., 'first' for first week of the month. + */ + weekNumber?: MailboxEnums.WeekNumber | string; + /** + * Represents the month. + */ + month?: MailboxEnums.Month | string; + /** + * 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?: MailboxEnums.Days | string; + } + /** + * Represents the time zone of the recurrence. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface RecurrenceTimeZone { + /** + * Represents the name of the recurrence time zone. + */ + name: MailboxEnums.RecurrenceTimeZone | string; + + /** + * 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. + */ + 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. + * + * **Important**: This link must be publicly accessible, without need for authentication by Exchange Online servers. However, with + * on-premises Exchange, the link can be accessible on a private network as long as it doesn't need further authentication. + */ + 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 | 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?: (asyncResult: Office.AsyncResult) => void; + /** + * An object literal that contains the following property:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + */ + options?: Office.AsyncContextOptions; + } + /** + * 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 mailbox 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 shouldn't be considered + * secure storage. They can be accessed by Exchange Web Services or Extended MAPI. + * They shouldn't 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. + * + * To learn more about `RoamingSettings`, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **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's 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 (or item in the case of UI-less add-ins) is closed and reopened. + * + * - When set and saved through Outlook on Windows or Mac, these settings are reflected in Outlook on the web only after a browser refresh. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface RoamingSettings { + /** + * Retrieves the specified setting. + * + * @returns Type: String | Number | Boolean | Object | Array + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param name - The case-sensitive name of the setting to retrieve. + */ + get(name: string): any; + /** + * Removes the specified setting. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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's 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're available the next time the add-in is used, use the `saveAsync` method. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets or creates the specified setting. + * + * The `set` method creates a new setting of the specified name if it doesn't 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. An error with code 9057 is thrown when that size limit is exceeded. + * + * Any changes made to settings using the `set` method will not be saved to the server until the `saveAsync` method is called. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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; + } + /** + * Represents the properties of a message that's currently selected in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose, Message Read + */ + interface SelectedItemDetails { + /** + * The identifier of the message conversation that contains the message that's currently selected. + * + * @beta + */ + conversationId: string; + /** + * Returns `true` if the message that's currently selected contains an attachment. + * + * @beta + */ + hasAttachment: boolean; + /** + * The internet message identifier of the message that's currently selected. + * + * @beta + */ + internetMessageId: string; + /** + * The Exchange Web Services (EWS) item identifier of the message that's currently selected. + */ + itemId: string; + /** + * The Outlook mode (`Read` or `Compose`) of the message that's currently selected. + */ + itemMode: string; + /** + * The type of the item that's currently selected. `Message` is the only supported type at this time. + */ + itemType: MailboxEnums.ItemType | string; + /** + * The description that appears in the subject field of the message that's currently selected. + */ + subject: string; + } + /** + * Provides methods to get and set the sensitivity level of an appointment. To learn more about sensitivity levels, see + * {@link https://support.microsoft.com/office/4a76d05b-6c29-4a0d-9096-71784a6b12c1 | Mark your email as Normal, Personal, Private, or Confidential}. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @beta + */ + interface Sensitivity { + /** + * Gets the sensitivity level of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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 sensitivity level of the appointment is returned in the `asyncResult.value` property. + * + * @beta + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the sensitivity level of an appointment. + * + * @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 sensitivity level of the appointment is returned in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @beta + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the sensitivity level of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param sensitivity - The sensitivity level as an enum or string. + * @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 function. + * @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 + */ + setAsync(sensitivity: MailboxEnums.AppointmentSensitivityType | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets the sensitivity level of an appointment. + * + * @remarks + * [Api set: Mailbox preview] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param sensitivity - The sensitivity level as an enum or string. + * @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 + */ + setAsync(sensitivity: MailboxEnums.AppointmentSensitivityType | string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides methods to get or set the sensitivity label of a message or appointment. For more information on sensitivity labels, see + * {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels | Learn about sensitivity labels}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + interface SensitivityLabel { + /** + * Gets the unique identifier (GUID) of the sensitivity label applied to a message or appointment being composed. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @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 function. + * @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 sensitivity label's GUID is returned in the + * `asyncResult.value` property. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the unique identifier (GUID) of the sensitivity label applied to a message or appointment being composed. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @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 sensitivity label's GUID is returned in the + * `asyncResult.value` property. + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Applies the specified sensitivity label to the message or appointment being composed. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * **Tip**: To determine the sensitivity labels available for use, call the `Office.context.sensitivityLabelsCatalog.getAsync` method. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @param sensitivityLabel - The sensitivity label to be applied to the message or appointment being composed. The parameter value can be a sensitivity label's + * unique identifier (GUID) or a {@link Office.SensitivityLabelDetails | SensitivityLabelDetails} object. + * @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 function. + * @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(sensitivityLabel: string | SensitivityLabelDetails, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Applies the specified sensitivity label to the message or appointment being composed. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * **Tip**: To determine the sensitivity labels available for use, call the `Office.context.sensitivityLabelsCatalog.getAsync` method. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @param sensitivityLabel - The sensitivity label to be applied to the message or appointment being composed. The parameter value can be a sensitivity label's + * unique identifier (GUID) or a {@link Office.SensitivityLabelDetails | SensitivityLabelDetails} 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(sensitivityLabel: string | SensitivityLabelDetails, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Provides the change status of the sensitivity label applied to a message or appointment in compose mode. This information is provided when the + * `Office.EventType.SensitivityLabelChanged` event is raised. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + export interface SensitivityLabelChangedEventArgs { + /** + * The type of event that was raised. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.13] + */ + type: "olkSensitivityLabelChanged"; + } + /** + * Represents the properties of available sensitivity labels in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + interface SensitivityLabelDetails { + /** + * The color of the sensitivity label. + */ + color: string; + /** + * The {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels#sublabels-grouping-labels | sublabels} of the sensitivity label. + * Returns `null` if a label doesn't have any sublabels. + */ + children: SensitivityLabelDetails[]; + /** + * The unique identifier (GUID) of the sensitivity label. + */ + id: string; + /** + * The name of the sensitivity label. + */ + name: string; + /** + * The description of the sensitivity label. + */ + tooltip: string; + } + /** + * Provides methods to check the status of the catalog of {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels | sensitivity labels} + * in Outlook and retrieve all available sensitivity labels if the catalog is enabled. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + export interface SensitivityLabelsCatalog { + /** + * Gets all the sensitivity labels that are enabled in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * **Recommended**: To determine whether the catalog of sensitivity labels is enabled in Outlook, call `getIsEnabledAsync` before using `getAsync`. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @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 function. + * @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 available sensitivity labels and their properties are returned in the + * `asyncResult.value` property. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets all the sensitivity labels that are enabled in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * **Recommended**: To determine whether the catalog of sensitivity labels is enabled in Outlook, call `getIsEnabledAsync` before using `getAsync`. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @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 available sensitivity labels and their properties are returned in the + * `asyncResult.value` property. + */ + getAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Checks whether the catalog of sensitivity labels is enabled in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: The catalog of sensitivity labels is configured by an organization's administrator. For more information, see + * {@link https://learn.microsoft.com/microsoft-365/compliance/get-started-with-sensitivity-labels | Get started with sensitivity labels}. + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @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 function. + * @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 status of the catalog of sensitivity labels is returned in the `asyncResult.value` property. + */ + getIsEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Checks whether the catalog of sensitivity labels is enabled in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: The catalog of sensitivity labels is configured by an organization's administrator. For more information, see + * {@link https://learn.microsoft.com/microsoft-365/compliance/get-started-with-sensitivity-labels | Get started with sensitivity labels}. + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @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 status of the catalog of sensitivity labels is returned in the `asyncResult.value` property. + */ + getIsEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): 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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface SeriesTime { + /** + * Gets the duration in minutes of a usual instance in a recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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". + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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". + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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". + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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". + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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). + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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). + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param time - Start time of all instances represented by standard datetime string format: "THH:mm:ss:mmm". + */ + setStartTime(time: string): void; + } + /** + * Provides methods to manage an item's session data. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + interface SessionData { + /** + * Clears all session data key-value pairs. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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. + */ + clearAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Clears all session data key-value pairs. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @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. + */ + clearAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets all session data key-value pairs. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + */ + getAllAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the session data value of the specified key. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param name - The session data key. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + getAsync(name: string, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes a session data key-value pair. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param name - The session data key. + * @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 function. + * @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. + */ + removeAsync(name: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Removes a session data key-value pair. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param name - The session data key. + * @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. + */ + removeAsync(name: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets a session data key-value pair. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + + * @param name - The session data key. + * @param value - The session data value as a string. + * @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 function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + setAsync(name: string, value: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Sets a session data key-value pair. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + + * @param name - The session data key. + * @param value - The session data value as a string. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + setAsync(name: string, value: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Represents the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information on how this object is used, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + interface SharedProperties { + /** + * The email address of the owner of a shared item. + */ + owner: string; + /** + * The REST API's base URL (currently https://outlook.office.com/api). + * + * Use with `targetMailbox` to construct the REST operation's URL. + * + * Example usage: `targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"` + */ + targetRestUrl: string; + /** + * The location of the owner's mailbox for the delegate's access. This location may differ based on the Outlook client. + * + * Use with `targetRestUrl` to construct the REST operation's URL. + * + * Example usage: `targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"` + */ + targetMailbox: string; + /** + * The permissions that the delegate has on a shared folder, or the user has on a shared mailbox. + */ + delegatePermissions: MailboxEnums.DelegatePermissions; + } + /** + * Provides information about the `Office.EventType.SpamReporting` event that occurs when an unsolicited message is reported. + * + * @remarks + * [Api set: Mailbox preview] + * + * @beta + */ + export interface SpamReportingEventArgs { + /** + * The type of event that was raised. For details, see {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox preview] + * + * @beta + */ + type: "SpamReporting"; + } + /** + * Provides methods to get and set the subject of an appointment or message in an Outlook add-in. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 the subject of the item. + */ + getAsync(callback: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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 function. + * @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 subject fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(subject: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: 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 - 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 subject fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(subject: string, callback?: (asyncResult: Office.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. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 function. + * @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 a `Date` object. + */ + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.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. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a `Date` object. + */ + getAsync(callback: (asyncResult: Office.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. + * + * **Important**: In the Windows client, you can't use this method to update the start or end of a recurrence. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidEndTime`: 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 function. + * @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 date and time fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(dateTime: Date, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.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. + * + * **Important**: In the Windows client, you can't use this method to update the start or end of a recurrence. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidEndTime`: The appointment end time is before the appointment start time. + * + * @param dateTime - A date-time object in Coordinated Universal Time (UTC). + * @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 date and time fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(dateTime: Date, callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Information about the user associated with the mailbox. This includes their account type, display name, email address, and time zone. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 or later on Mac, build 16.9.1212 and greater. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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 a Microsoft 365 work or school account.
outlookComThe mailbox is associated with a personal Outlook.com account.
+ * + * **Note**: For hybrid Exchange environments, the returned account type value depends on where the mailbox is hosted. + * If the mailbox is on an on-premises server, the account type value is **enterprise**. However, if it's hosted on + * Exchange Online, the account type value is **office365**. + */ + accountType: string; + /** + * Gets the user's display name. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + displayName: string; + /** + * Gets the user's SMTP email address. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + emailAddress: string; + /** + * Gets the user's time zone in Windows format. + * + * The system time zone is usually returned. However, in Outlook on the web, the default time zone in the calendar preferences is returned instead. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#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; + } + + /** + * 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 Office application. + * + * 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 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; + } + + /** + * Specifies options for a session of a Visio diagram embedded in a SharePoint page. Called by constructor of `EmbeddedSession`. + * For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}. + */ + interface EmbeddedOptions { + sessionKey?: string, + /* + * The iframe element that hosts the Visio diagram. + */ + container?: HTMLElement, + id?: string; + timeoutInMilliseconds?: number; + height?: string; + width?: string; + } + + /** + * Represents a session of a Visio diagram embedded in a SharePoint page. + * For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}. + */ + class EmbeddedSession { + constructor(url: string, options?: EmbeddedOptions); + /** + * Initializes the session. + */ + public init(): Promise; + } + + /** 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; + } + + /** 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 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. + */ + statement?: 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 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: string[]; + /** Debug info (useful for detailed logging of the error, i.e., via `JSON.stringify(...)`). */ + debugInfo: DebugInfo; + /** Inner error, if applicable. */ + innerError: Error; + } + + /** + * Represents the error code that can be returned by {@link OfficeExtension.Error | OfficeExtension.Error.code}. + * + * To learn more about the error codes, see + * {@link https://learn.microsoft.com/office/dev/add-ins/reference/javascript-api-for-office-error-codes | Office Common API error codes}. + */ + 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; + } + + /** + * A Promise object that represents a deferred interaction with the Office application. + * The publicly-consumable 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; + + /** + * Collection of tracked objects, contained within a request context. + * See {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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. If this object is part of a collection in Word, you should also track + * the parent collection. + */ + 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. If this object is part of a collection in Word, you should also track + * the parent collection. + */ + 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 Office 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(object: ClientObject): void; + /** + * Release the memory associated with an object that was previously added to this collection. + * Having many tracked objects slows down the Office 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; + } + + class EventHandlers { + constructor(context: ClientRequestContext, parentObject: ClientObject, name: string, eventInfo: EventInfo); + /** + * Adds a function to be called when the event is triggered. + * @param handler A promise-based function that takes in any relevant event arguments. + */ + add(handler: (args: T) => Promise): EventHandlerResult; + /** + * Removes the specified function from the event handler list so that it will not be called on subsequent events. + * + * **Note**: The same {@link OfficeExtension.ClientRequestContext | RequestContext} object that the handler was added in must be used when removing the handler. + * More information can be found in {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-events#remove-an-event-handler | Remove an event handler}. + * + * @param handler A reference to a function previously provided to the `add` method as an event handler. + */ + remove(handler: (args: T) => Promise): void; + } + + /** + * Enables the removal of an event handler. Returned by the `EventHandlers.add` method. + * + * **Note**: The same {@link OfficeExtension.ClientRequestContext | RequestContext} object that the handler was added in must be used when removing the handler. + * More information can be found in {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-events#remove-an-event-handler | Remove an event handler}. + */ + class EventHandlerResult { + constructor(context: ClientRequestContext, handlers: EventHandlers, handler: (args: T) => Promise); + /** The request context associated with the object */ + context: ClientRequestContext; + /** + * Removes the handler from the event. + */ + remove(): void; + } + + /** + * Used by Office to construct event handlers. Do not call in your code. + */ + interface EventInfo { + registerFunc: (callback: (args: any) => void) => Promise; + unregisterFunc: (callback: (args: any) => void) => Promise; + eventArgsTransformFunc: (args: any) => Promise; + } + + /** + * 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) + } +} + +interface Session {} + + + +//////////////////////////////////////////////////////////////// +//////////////////////// End OfficeCore //////////////////////// +//////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// +/////////////////////// Begin Excel APIs /////////////////////// +//////////////////////////////////////////////////////////////// + +declare var _BeginExcel: string; +declare namespace Excel { + /** + * Represents a 2D array of cell values. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface ArrayCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.array | ReferenceValueType.array | "Array"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#VALUE!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the elements of the array. May not directly contain an `ArrayCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + elements: CellValue[][]; + /** + * Represents the cell values which are referenced within `ArrayCellValue.elements`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + referencedValues?: ReferencedValue[]; + } + /** + * The base64 encoding type and data of an image. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface Base64EncodedImage { + /** + * The file type of the encoded image. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: Base64EncodingType | "JPG" | "PNG"; + /** + * The base64 string encoding. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + data: string; + } + /** + * The file type represented by the base64 encoding. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum Base64EncodingType { + /** + * The JPG file type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + JPG = "JPG", + /** + * The PNG file type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + PNG = "PNG" + } + /** + * Represents a card layout that is best used for an array. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface EntityArrayCardLayout { + /** + * Represents the type of this layout. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + layout: EntityCardLayoutType.array | "Array"; + /** + * Represents name of the property that contains the array shown in the card. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + arrayProperty: string; + /** + * Represents name of the property that contains the array shown in the card. Default value is "Array". + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + displayName?: string; + /** + * Represents the count of rows which the card claims are in the array. A card may report a different number of rows than it actually has to display smaller amounts of preview data. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rowsToReport?: number; + /** + * Represents the count of columns which the card claims are in the array. A card may report a different number of columns than it actually has to display smaller amounts of preview data. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + columnsToReport?: number; + /** + * Represents whether the first row of the array is treated as a header. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + firstRowIsHeader?: boolean; + } + /** + * Represents types of #BLOCKED! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum BlockedErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by a service not supporting a linked data type. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTypeRestrictedDomain = "DataTypeRestrictedDomain", + /** + * An error caused by privacy settings. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTypePrivacySetting = "DataTypePrivacySetting", + /** + * An error caused by an unsupported data type. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTypeUnsupportedApp = "DataTypeUnsupportedApp", + /** + * An error caused by external links. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksGeneric = "ExternalLinksGeneric", + /** + * An error caused by disabled rich data links. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + richDataLinkDisabled = "RichDataLinkDisabled", + /** + * An error caused by sign in failure. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + signInError = "SignInError", + /** + * An error caused by a license verification failure. Displays as error type #BLOCKED! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + noLicense = "NoLicense" + } + /** + * Represents the value of a cell containing a #BLOCKED! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface BlockedErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#BLOCKED!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.blocked | "Blocked"; + /** + * Represents the type of `BlockedErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: BlockedErrorCellValueSubType | "Unknown" | "DataTypeRestrictedDomain" | "DataTypePrivacySetting" | "DataTypeUnsupportedApp" | "ExternalLinksGeneric" | "RichDataLinkDisabled" | "SignInError" | "NoLicense"; + } + /** + * Represents the value of a cell containing a boolean. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface BooleanCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.boolean | "Boolean"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue: boolean; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.boolean | "Boolean"; + } + /** + * Represents types of #BUSY! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum BusyErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #BUSY! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by external links. Displays as error type #BUSY! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksGeneric = "ExternalLinksGeneric", + /** + * An error that displays while an image is loading. Displays as error type #BUSY! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + loadingImage = "LoadingImage" + } + /** + * Represents the value of a cell containing a #BUSY! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface BusyErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#BUSY!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.busy | "Busy"; + /** + * Represents the type of `BusyErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: BusyErrorCellValueSubType | "Unknown" | "ExternalLinksGeneric" | "LoadingImage"; + } + /** + * Represents types of #CALC! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum CalcErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by including an array in an array. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + arrayOfArrays = "ArrayOfArrays", + /** + * An error caused by including a range in an array. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + arrayOfRanges = "ArrayOfRanges", + /** + * An error caused by an empty array. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emptyArray = "EmptyArray", + /** + * An error caused by attempting to lift an unsupported formula (such as a Dynamic UDF) over an array. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unsupportedLifting = "UnsupportedLifting", + /** + * An error caused by a data table referencing a pending formula. The pending formula is likely asynchronous. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTableReferencedPendingFormula = "DataTableReferencedPendingFormula", + /** + * An error caused by a function referencing too many cells. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tooManyCells = "TooManyCells", + /** + * An error caused by a cell's formula evaluating to a lambda value. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lambdaInCell = "LambdaInCell", + /** + * An error caused by a `CellValue` object that is too deeply nested within another `CellValue`. Displays as error type #CALC! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tooDeeplyNested = "TooDeeplyNested", + /** + * An error caused by a cell's formula returning a string that exceeds the maximum of 32767 characters. Displays as error type #CALC! in Excel. + * Some characters, like emoji, may appear to be one character in the Excel UI but are actually processed as surrogate characters. A surrogate character counts as multiple characters toward the maximum character limit. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + textOverflow = "TextOverflow" + } + /** + * Represents the value of a cell containing a #CALC! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CalcErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#CALC!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.calc | "Calc"; + /** + * Represents the type of `CalcErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: CalcErrorCellValueSubType | "Unknown" | "ArrayOfArrays" | "ArrayOfRanges" | "EmptyArray" | "UnsupportedLifting" | "DataTableReferencedPendingFormula" | "TooManyCells" | "LambdaInCell" | "TooDeeplyNested" | "TextOverflow"; + /** + * Represents the name of the function causing the error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + functionName?: string; + } + /** + * Represents a reference to a property used by the card layout. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CardLayoutPropertyReference { + /** + * Represents the name of the property referenced by the card layout. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + property: string; + } + /** + * Properties of a card layout relevant to most card layouts. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CardLayoutSectionStandardProperties { + /** + * Represents the title of this section of the card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + title?: string; + /** + * Represents whether this section of the card is collapsible. + * If the card section has a title, the default value is `true`. + * If the card section doesn't have a title, the default value is `false`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + collapsible?: boolean; + /** + * Represents whether this section of the card is initially collapsed. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + collapsed?: boolean; + /** + * Represents the names of the properties in this section. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + properties: string[]; + } + /** + * Represents a section of a card that is arranged as a list in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CardLayoutListSection extends CardLayoutSectionStandardProperties { + /** + * Represents the type of layout for this section. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + layout: "List"; + } + /** + * Represents a section of a card that is arranged as a table in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CardLayoutTableSection extends CardLayoutSectionStandardProperties { + /** + * Represents the type of layout for this section. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + layout: "Table"; + } + /** + * Represents the layout of a section of a card in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type CardLayoutSection = CardLayoutListSection | CardLayoutTableSection; + /** + * Properties of a card layout relevant to most card layouts. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CardLayoutStandardProperties { + /** + * Specifies a property which will be used as the main image of the card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mainImage?: CardLayoutPropertyReference; + /** + * Represents the title of the card or the specification of which property contains the title of the card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + title?: string | CardLayoutPropertyReference; + /** + * Represents a specification of which property contains the subtitle of the card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + subTitle?: CardLayoutPropertyReference; + /** + * Represents the sections of the card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sections?: CardLayoutSection[]; + } + /** + * Represents the layout of a card in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type CardLayout = EntityCardLayout | EntityArrayCardLayout; + /** + * Types of entity card layouts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum EntityCardLayoutType { + /** + * Entity layout of the entity card. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + entity = "Entity", + /** + * Array layout of the entity card. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + array = "Array" + } + /** + * The compact layout properties for an entity. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface EntityCompactLayout { + /** + * Specifies the name of the icon which is used to open the card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + icon?: string | EntityCompactLayoutIcons; + } + /** + * Represents the layout used when there is limited space to represent the entity. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type CompactLayout = EntityCompactLayout; + /** + * The list of icons available for `EntityCompactLayout`. An icon displays in the Excel UI, either to the left of the title in a cell that contains an entity card, or to the left of the title of a referenced entity inside an entity card. Selecting the icon opens the entity card. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum EntityCompactLayoutIcons { + /** + * The default icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + generic = "Generic", + /** + * Accessibility icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + accessibility = "Accessibility", + /** + * Airplane icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + airplane = "Airplane", + /** + * Airplane taking off icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + airplaneTakeOff = "AirplaneTakeOff", + /** + * Album icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + album = "Album", + /** + * Alert icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + alert = "Alert", + /** + * Alert urgent icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + alertUrgent = "AlertUrgent", + /** + * Animal icon. Displays as a pawprint. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + animal = "Animal", + /** + * Animal cat icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + animalCat = "AnimalCat", + /** + * Animal dog icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + animalDog = "AnimalDog", + /** + * Animal rabbit icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + animalRabbit = "AnimalRabbit", + /** + * Animal turtle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + animalTurtle = "AnimalTurtle", + /** + * App folder icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + appFolder = "AppFolder", + /** + * App generic icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + appGeneric = "AppGeneric", + /** + * Apple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + apple = "Apple", + /** + * Approvals app icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + approvalsApp = "ApprovalsApp", + /** + * Archive icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + archive = "Archive", + /** + * Archive multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + archiveMultiple = "ArchiveMultiple", + /** + * Arrow trending lines icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + arrowTrendingLines = "ArrowTrendingLines", + /** + * Art icon. Displays as a paint palette. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + art = "Art", + /** + * Atom icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + atom = "Atom", + /** + * Attach icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + attach = "Attach", + /** + * Automobile icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + automobile = "Automobile", + /** + * Autosum icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + autosum = "Autosum", + /** + * Backpack icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + backpack = "Backpack", + /** + * Badge icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + badge = "Badge", + /** + * Balloon icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + balloon = "Balloon", + /** + * Bank icon. Displays as a building with pillars and a triangular roof. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bank = "Bank", + /** + * Barcode scanner icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + barcodeScanner = "BarcodeScanner", + /** + * Basketball icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basketball = "Basketball", + /** + * Battery empty icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + battery0 = "Battery0", + /** + * Battery full icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + battery10 = "Battery10", + /** + * Beach icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + beach = "Beach", + /** + * Beaker icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + beaker = "Beaker", + /** + * Bed icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bed = "Bed", + /** + * Bin full icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + binFull = "BinFull", + /** + * Bird icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bird = "Bird", + /** + * Bluetooth icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bluetooth = "Bluetooth", + /** + * Board icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + board = "Board", + /** + * Board games icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + boardGames = "BoardGames", + /** + * Book icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + book = "Book", + /** + * Bookmark icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bookmark = "Bookmark", + /** + * Bookmark multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bookmarkMultiple = "BookmarkMultiple", + /** + * Bot icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bot = "Bot", + /** + * Bowl chopsticks icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bowlChopsticks = "BowlChopsticks", + /** + * Box icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + box = "Box", + /** + * Box multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + boxMultiple = "BoxMultiple", + /** + * Brain circuit icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + brainCircuit = "BrainCircuit", + /** + * Branch icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + branch = "Branch", + /** + * Branch fork icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + branchFork = "BranchFork", + /** + * Branch request icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + branchRequest = "BranchRequest", + /** + * Bridge icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bridge = "Bridge", + /** + * Briefcase icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + briefcase = "Briefcase", + /** + * Briefcase medical icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + briefcaseMedical = "BriefcaseMedical", + /** + * Broad activity feed icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + broadActivityFeed = "BroadActivityFeed", + /** + * Broom icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + broom = "Broom", + /** + * Bug icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + bug = "Bug", + /** + * Building icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + building = "Building", + /** + * Building bank icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingBank = "BuildingBank", + /** + * Building factory icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingFactory = "BuildingFactory", + /** + * Building government icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingGovernment = "BuildingGovernment", + /** + * Building home icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingHome = "BuildingHome", + /** + * Building lighthouse icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingLighthouse = "BuildingLighthouse", + /** + * Building multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingMultiple = "BuildingMultiple", + /** + * Building retail icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingRetail = "BuildingRetail", + /** + * Building retail more icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingRetailMore = "BuildingRetailMore", + /** + * Building retail toolbox icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingRetailToolbox = "BuildingRetailToolbox", + /** + * Building shop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingShop = "BuildingShop", + /** + * Building skyscraper icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + buildingSkyscraper = "BuildingSkyscraper", + /** + * Calculator icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + calculator = "Calculator", + /** + * Calendar left to right icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + calendarLtr = "CalendarLtr", + /** + * Calendar right to left icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + calendarRtl = "CalendarRtl", + /** + * Call icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + call = "Call", + /** + * Calligraphy pen icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + calligraphyPen = "CalligraphyPen", + /** + * Camera icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + camera = "Camera", + /** + * Camera dome icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cameraDome = "CameraDome", + /** + * Car icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + car = "Car", + /** + * Cart icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cart = "Cart", + /** + * Cat icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cat = "Cat", + /** + * Certificate icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + certificate = "Certificate", + /** + * Chart multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + chartMultiple = "ChartMultiple", + /** + * Chat icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + chat = "Chat", + /** + * Chat multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + chatMultiple = "ChatMultiple", + /** + * Chat video icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + chatVideo = "ChatVideo", + /** + * Check icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + check = "Check", + /** + * Checkbox checked icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + checkboxChecked = "CheckboxChecked", + /** + * Checkbox unchecked icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + checkboxUnchecked = "CheckboxUnchecked", + /** + * Checkmark icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + checkmark = "Checkmark", + /** + * Chess icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + chess = "Chess", + /** + * City icon. Displays as multiple tall buildings. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + city = "City", + /** + * Class icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + class = "Class", + /** + * Classification icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + classification = "Classification", + /** + * Clipboard icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + clipboard = "Clipboard", + /** + * Clipboard data bar icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + clipboardDataBar = "ClipboardDataBar", + /** + * Clipboard pulse icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + clipboardPulse = "ClipboardPulse", + /** + * Clipboard task icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + clipboardTask = "ClipboardTask", + /** + * Clock icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + clock = "Clock", + /** + * Clock alarm icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + clockAlarm = "ClockAlarm", + /** + * Cloud icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cloud = "Cloud", + /** + * Cloud words icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cloudWords = "CloudWords", + /** + * Code icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + code = "Code", + /** + * Collections icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + collections = "Collections", + /** + * Comment icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + comment = "Comment", + /** + * Comment multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + commentMultiple = "CommentMultiple", + /** + * Communication icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + communication = "Communication", + /** + * Compass northwest icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + compassNorthwest = "CompassNorthwest", + /** + * Conference room icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + conferenceRoom = "ConferenceRoom", + /** + * Connector icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + connector = "Connector", + /** + * Constellation icon. Displays dots in the shape of the Big Dipper, with a bowl and a handle. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + constellation = "Constellation", + /** + * Contact card icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + contactCard = "ContactCard", + /** + * Cookies icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cookies = "Cookies", + /** + * Couch icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + couch = "Couch", + /** + * Credit card person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + creditCardPerson = "CreditCardPerson", + /** + * Credit card toolbox icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + creditCardToolbox = "CreditCardToolbox", + /** + * Cube icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cube = "Cube", + /** + * Cube multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cubeMultiple = "CubeMultiple", + /** + * Cube tree icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cubeTree = "CubeTree", + /** + * Currency dollar euro icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + currencyDollarEuro = "CurrencyDollarEuro", + /** + * Currency dollar rupee icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + currencyDollarRupee = "CurrencyDollarRupee", + /** + * Data area icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataArea = "DataArea", + /** + * Database icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + database = "Database", + /** + * Database multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + databaseMultiple = "DatabaseMultiple", + /** + * Data funnel icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataFunnel = "DataFunnel", + /** + * Data histogram icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataHistogram = "DataHistogram", + /** + * Data line icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataLine = "DataLine", + /** + * Data pie icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataPie = "DataPie", + /** + * Data scatter icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataScatter = "DataScatter", + /** + * Data sunburst icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataSunburst = "DataSunburst", + /** + * Data treemap icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTreemap = "DataTreemap", + /** + * Data waterfall icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataWaterfall = "DataWaterfall", + /** + * Data whisker icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataWhisker = "DataWhisker", + /** + * Dentist icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dentist = "Dentist", + /** + * Design ideas icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + designIdeas = "DesignIdeas", + /** + * Desktop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + desktop = "Desktop", + /** + * Desktop Mac icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + desktopMac = "DesktopMac", + /** + * Developer board icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + developerBoard = "DeveloperBoard", + /** + * Device meeting room icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + deviceMeetingRoom = "DeviceMeetingRoom", + /** + * Diagram icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + diagram = "Diagram", + /** + * Dialpad icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dialpad = "Dialpad", + /** + * Diamond icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + diamond = "Diamond", + /** + * Dinosaur icon. Displays as a long-necked dinosaur, similar to a Brachiosaurus. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dinosaur = "Dinosaur", + /** + * Directions icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + directions = "Directions", + /** + * Disaster icon. Displays as a house sinking in a flood. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + disaster = "Disaster", + /** + * Diversity icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + diversity = "Diversity", + /** + * DNA icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dNA = "DNA", + /** + * Doctor icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + doctor = "Doctor", + /** + * Document icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + document = "Document", + /** + * Document data icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + documentData = "DocumentData", + /** + * Document landscape icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + documentLandscape = "DocumentLandscape", + /** + * Document multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + documentMultiple = "DocumentMultiple", + /** + * Document PDF icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + documentPdf = "DocumentPdf", + /** + * Document queue icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + documentQueue = "DocumentQueue", + /** + * Document text icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + documentText = "DocumentText", + /** + * Dog icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dog = "Dog", + /** + * Door icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + door = "Door", + /** + * Door tag icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + doorTag = "DoorTag", + /** + * Drafts icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drafts = "Drafts", + /** + * Drama icon. Displays as a pair of theatre masks. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drama = "Drama", + /** + * Drink beer icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drinkBeer = "DrinkBeer", + /** + * Drink coffee icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drinkCoffee = "DrinkCoffee", + /** + * Drink margarita icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drinkMargarita = "DrinkMargarita", + /** + * Drink to go icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drinkToGo = "DrinkToGo", + /** + * Drink wine icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drinkWine = "DrinkWine", + /** + * Drive train icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + driveTrain = "DriveTrain", + /** + * Drop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + drop = "Drop", + /** + * Dual screen icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dualScreen = "DualScreen", + /** + * Dumbbell icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dumbbell = "Dumbbell", + /** + * Earth icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + earth = "Earth", + /** + * Emoji icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emoji = "Emoji", + /** + * Emoji angry icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiAngry = "EmojiAngry", + /** + * Emoji hand icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiHand = "EmojiHand", + /** + * Emoji laugh icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiLaugh = "EmojiLaugh", + /** + * Emoji meh icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiMeh = "EmojiMeh", + /** + * Emoji multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiMultiple = "EmojiMultiple", + /** + * Emoji sad icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiSad = "EmojiSad", + /** + * Emoji sad slight icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiSadSlight = "EmojiSadSlight", + /** + * Emoji smile slight icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiSmileSlight = "EmojiSmileSlight", + /** + * Emoji sparkle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiSparkle = "EmojiSparkle", + /** + * Emoji surprise icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + emojiSurprise = "EmojiSurprise", + /** + * Engine icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + engine = "Engine", + /** + * Eraser icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + eraser = "Eraser", + /** + * Eye icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + eye = "Eye", + /** + * Eyedropper icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + eyedropper = "Eyedropper", + /** + * Fax icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + fax = "Fax", + /** + * Fingerprint icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + fingerprint = "Fingerprint", + /** + * First aid icon. Displays as a briefcase with a medical cross symbol. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + firstAid = "FirstAid", + /** + * Flag icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + flag = "Flag", + /** + * Flash icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + flash = "Flash", + /** + * Flashlight icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + flashlight = "Flashlight", + /** + * Flow icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + flow = "Flow", + /** + * Flowchart icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + flowchart = "Flowchart", + /** + * Folder icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + folder = "Folder", + /** + * Folder open icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + folderOpen = "FolderOpen", + /** + * Folder open vertical icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + folderOpenVertical = "FolderOpenVertical", + /** + * Folder person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + folderPerson = "FolderPerson", + /** + * Folder zip icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + folderZip = "FolderZip", + /** + * Food icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + food = "Food", + /** + * Food apple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + foodApple = "FoodApple", + /** + * Food cake icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + foodCake = "FoodCake", + /** + * Food egg icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + foodEgg = "FoodEgg", + /** + * Food grains icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + foodGrains = "FoodGrains", + /** + * Food pizza icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + foodPizza = "FoodPizza", + /** + * Food toast icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + foodToast = "FoodToast", + /** + * Galaxy icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + galaxy = "Galaxy", + /** + * Games icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + games = "Games", + /** + * Gantt chart icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ganttChart = "GanttChart", + /** + * Gas icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gas = "Gas", + /** + * Gas pump icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gasPump = "GasPump", + /** + * Gauge icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gauge = "Gauge", + /** + * Gavel icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gavel = "Gavel", + /** + * Gift icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gift = "Gift", + /** + * Gift card icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + giftCard = "GiftCard", + /** + * Glasses icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + glasses = "Glasses", + /** + * Globe icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + globe = "Globe", + /** + * Globe surface icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + globeSurface = "GlobeSurface", + /** + * Grid icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + grid = "Grid", + /** + * Grid dots icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gridDots = "GridDots", + /** + * Grid Kanban icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gridKanban = "GridKanban", + /** + * Guardian icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + guardian = "Guardian", + /** + * Guest icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + guest = "Guest", + /** + * Guitar icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + guitar = "Guitar", + /** + * Hand left icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + handLeft = "HandLeft", + /** + * Hand right icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + handRight = "HandRight", + /** + * Handshake icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + handshake = "Handshake", + /** + * Hard drive icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + hardDrive = "HardDrive", + /** + * Graduation hat icon. Displays as a hat with a tassel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + hatGraduation = "HatGraduation", + /** + * Headphones icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + headphones = "Headphones", + /** + * Headphones sound wave icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + headphonesSoundWave = "HeadphonesSoundWave", + /** + * Headset icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + headset = "Headset", + /** + * Headset VR icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + headsetVr = "HeadsetVr", + /** + * Heart icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + heart = "Heart", + /** + * Heart broken icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + heartBroken = "HeartBroken", + /** + * Heart circle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + heartCircle = "HeartCircle", + /** + * Human heart icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + heartHuman = "HeartHuman", + /** + * Heart pulse icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + heartPulse = "HeartPulse", + /** + * History icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + history = "History", + /** + * Home icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + home = "Home", + /** + * Home more icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + homeMore = "HomeMore", + /** + * Home person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + homePerson = "HomePerson", + /** + * Icons icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + icons = "Icons", + /** + * Image icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + image = "Image", + /** + * Image globe icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + imageGlobe = "ImageGlobe", + /** + * Image multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + imageMultiple = "ImageMultiple", + /** + * IoT icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + iot = "Iot", + /** + * Joystick icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + joystick = "Joystick", + /** + * Justice icon. Displays as the scales of justice. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + justice = "Justice", + /** + * Key icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + key = "Key", + /** + * Keyboard icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + keyboard = "Keyboard", + /** + * Keyboard layout split icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + keyboardLayoutSplit = "KeyboardLayoutSplit", + /** + * Key multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + keyMultiple = "KeyMultiple", + /** + * Languages icon. Displays as a document and a globe. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + languages = "Languages", + /** + * Laptop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + laptop = "Laptop", + /** + * Lasso icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lasso = "Lasso", + /** + * Launcher settings icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + launcherSettings = "LauncherSettings", + /** + * Layer icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + layer = "Layer", + /** + * Leaf icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + leaf = "Leaf", + /** + * Leaf one icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + leafOne = "LeafOne", + /** + * Leaf three icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + leafThree = "LeafThree", + /** + * Leaf two icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + leafTwo = "LeafTwo", + /** + * Library icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + library = "Library", + /** + * Lightbulb icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lightbulb = "Lightbulb", + /** + * Lightbulb filament icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lightbulbFilament = "LightbulbFilament", + /** + * Likert icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + likert = "Likert", + /** + * Link icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + link = "Link", + /** + * Local language icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + localLanguage = "LocalLanguage", + /** + * Location icon. Displays as a map marker. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + location = "Location", + /** + * Lock closed icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lockClosed = "LockClosed", + /** + * Lock multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lockMultiple = "LockMultiple", + /** + * Lock open icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lockOpen = "LockOpen", + /** + * Lottery icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lottery = "Lottery", + /** + * Luggage icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + luggage = "Luggage", + /** + * Mail icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mail = "Mail", + /** + * Mail inbox icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mailInbox = "MailInbox", + /** + * Mail multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mailMultiple = "MailMultiple", + /** + * Map icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + map = "Map", + /** + * Map pin icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mapPin = "MapPin", + /** + * Markdown icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + markdown = "Markdown", + /** + * Math formula icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mathFormula = "MathFormula", + /** + * Math symbols icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mathSymbols = "MathSymbols", + /** + * Max icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + max = "Max", + /** + * Megaphone icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + megaphone = "Megaphone", + /** + * Megaphone loud icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + megaphoneLoud = "MegaphoneLoud", + /** + * Mention icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mention = "Mention", + /** + * Mic icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mic = "Mic", + /** + * Microscope icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + microscope = "Microscope", + /** + * Midi icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + midi = "Midi", + /** + * Molecule icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + molecule = "Molecule", + /** + * Money icon. Displays as paper money and coins. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + money = "Money", + /** + * Money hand icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + moneyHand = "MoneyHand", + /** + * Mountain icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mountain = "Mountain", + /** + * Movie camera icon. Displays as a video camera. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + movieCamera = "MovieCamera", + /** + * Movies and TV icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + moviesAndTv = "MoviesAndTv", + /** + * Music note icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + musicNote = "MusicNote", + /** + * Music note icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + musicNote1 = "MusicNote1", + /** + * Music double note icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + musicNote2 = "MusicNote2", + /** + * My location icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + myLocation = "MyLocation", + /** + * N by N icon. Displays as a three by three grid. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + nByN = "NByN", + /** + * N by one icon. Displays as a three by one grid. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + nByOne = "NByOne", + /** + * News icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + news = "News", + /** + * Notable people icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + notablePeople = "NotablePeople", + /** + * Note icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + note = "Note", + /** + * Notebook icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + notebook = "Notebook", + /** + * Notepad icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + notepad = "Notepad", + /** + * Notepad person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + notepadPerson = "NotepadPerson", + /** + * One by N icon. Displays as a one by three grid. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + oneByN = "OneByN", + /** + * One by one icon. Displays as a one by one grid. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + oneByOne = "OneByOne", + /** + * Options icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + options = "Options", + /** + * Organization icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + organization = "Organization", + /** + * Organization horizontal icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + organizationHorizontal = "OrganizationHorizontal", + /** + * Oval icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + oval = "Oval", + /** + * Paint brush icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + paintBrush = "PaintBrush", + /** + * Paint bucket icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + paintBucket = "PaintBucket", + /** + * Partly sunny weather icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + partlySunnyWeather = "PartlySunnyWeather", + /** + * Password icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + password = "Password", + /** + * Patch icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + patch = "Patch", + /** + * Patient icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + patient = "Patient", + /** + * Payment icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + payment = "Payment", + /** + * Pen icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pen = "Pen", + /** + * Pentagon icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pentagon = "Pentagon", + /** + * People icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + people = "People", + /** + * People audience icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleAudience = "PeopleAudience", + /** + * People call icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleCall = "PeopleCall", + /** + * People community icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleCommunity = "PeopleCommunity", + /** + * People money icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleMoney = "PeopleMoney", + /** + * People queue icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleQueue = "PeopleQueue", + /** + * People team icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleTeam = "PeopleTeam", + /** + * People toolbox icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + peopleToolbox = "PeopleToolbox", + /** + * Person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + person = "Person", + /** + * Person board icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + personBoard = "PersonBoard", + /** + * Person call icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + personCall = "PersonCall", + /** + * Person chat icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + personChat = "PersonChat", + /** + * Person feedback icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + personFeedback = "PersonFeedback", + /** + * Person support icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + personSupport = "PersonSupport", + /** + * Person voice icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + personVoice = "PersonVoice", + /** + * Phone icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + phone = "Phone", + /** + * Phone desktop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + phoneDesktop = "PhoneDesktop", + /** + * Phone laptop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + phoneLaptop = "PhoneLaptop", + /** + * Phone shake icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + phoneShake = "PhoneShake", + /** + * Phone tablet icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + phoneTablet = "PhoneTablet", + /** + * Phone vibrate icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + phoneVibrate = "PhoneVibrate", + /** + * Photo filter icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + photoFilter = "PhotoFilter", + /** + * Pi icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pi = "Pi", + /** + * Picture in picture icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pictureInPicture = "PictureInPicture", + /** + * Pilates icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pilates = "Pilates", + /** + * Pill icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pill = "Pill", + /** + * Pin icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pin = "Pin", + /** + * Pipeline icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pipeline = "Pipeline", + /** + * Planet icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + planet = "Planet", + /** + * Playing cards icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + playingCards = "PlayingCards", + /** + * Plug connected icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + plugConnected = "PlugConnected", + /** + * Plug disconnected icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + plugDisconnected = "PlugDisconnected", + /** + * Point scan icon. Displays as a target focus symbol. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pointScan = "PointScan", + /** + * Poll icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + poll = "Poll", + /** + * Power icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + power = "Power", + /** + * Predictions icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + predictions = "Predictions", + /** + * Premium icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + premium = "Premium", + /** + * Presenter icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + presenter = "Presenter", + /** + * Preview link icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + previewLink = "PreviewLink", + /** + * Print icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + print = "Print", + /** + * Production icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + production = "Production", + /** + * Prohibited icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + prohibited = "Prohibited", + /** + * Projection screen icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + projectionScreen = "ProjectionScreen", + /** + * Protocol handler icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + protocolHandler = "ProtocolHandler", + /** + * Pulse icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pulse = "Pulse", + /** + * Pulse square icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + pulseSquare = "PulseSquare", + /** + * Puzzle piece icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + puzzlePiece = "PuzzlePiece", + /** + * QR code icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + qrCode = "QrCode", + /** + * Radar icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + radar = "Radar", + /** + * Ram icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ram = "Ram", + /** + * Reading list icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + readingList = "ReadingList", + /** + * Real estate icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + realEstate = "RealEstate", + /** + * Receipt icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + receipt = "Receipt", + /** + * Reward icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + reward = "Reward", + /** + * Rhombus icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + rhombus = "Rhombus", + /** + * Ribbon icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ribbon = "Ribbon", + /** + * Ribbon star icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ribbonStar = "RibbonStar", + /** + * Road cone icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + roadCone = "RoadCone", + /** + * Rocket icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + rocket = "Rocket", + /** + * Router icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + router = "Router", + /** + * RSS icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + rss = "Rss", + /** + * Ruler icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ruler = "Ruler", + /** + * Run icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + run = "Run", + /** + * Running icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + running = "Running", + /** + * Satellite icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + satellite = "Satellite", + /** + * Save icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + save = "Save", + /** + * Savings icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + savings = "Savings", + /** + * Scales icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + scales = "Scales", + /** + * Scan icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + scan = "Scan", + /** + * Scratchpad icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + scratchpad = "Scratchpad", + /** + * Screen person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + screenPerson = "ScreenPerson", + /** + * Screenshot icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + screenshot = "Screenshot", + /** + * Search icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + search = "Search", + /** + * Serial port icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + serialPort = "SerialPort", + /** + * Server icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + server = "Server", + /** + * Server multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + serverMultiple = "ServerMultiple", + /** + * Service bell icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + serviceBell = "ServiceBell", + /** + * Settings icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + settings = "Settings", + /** + * Shapes icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + shapes = "Shapes", + /** + * Shield icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + shield = "Shield", + /** + * Shield task icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + shieldTask = "ShieldTask", + /** + * Shopping bag icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + shoppingBag = "ShoppingBag", + /** + * Signature icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + signature = "Signature", + /** + * Sim icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sim = "Sim", + /** + * Sleep icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sleep = "Sleep", + /** + * Smartwatch icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + smartwatch = "Smartwatch", + /** + * Sound source icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + soundSource = "SoundSource", + /** + * Sound wave circle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + soundWaveCircle = "SoundWaveCircle", + /** + * Sparkle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sparkle = "Sparkle", + /** + * Speaker icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + speaker0 = "Speaker0", + /** + * Speaker with sound wave icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + speaker2 = "Speaker2", + /** + * Sport icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sport = "Sport", + /** + * Sport american football icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sportAmericanFootball = "SportAmericanFootball", + /** + * Sport baseball icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sportBaseball = "SportBaseball", + /** + * Sport basketball icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sportBasketball = "SportBasketball", + /** + * Sport hockey icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sportHockey = "SportHockey", + /** + * Sport soccer icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sportSoccer = "SportSoccer", + /** + * Square multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + squareMultiple = "SquareMultiple", + /** + * Square shadow icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + squareShadow = "SquareShadow", + /** + * Squares nested icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + squaresNested = "SquaresNested", + /** + * Stack icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stack = "Stack", + /** + * Stack star icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stackStar = "StackStar", + /** + * Star icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + star = "Star", + /** + * Star filled icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + starFilled = "StarFilled", + /** + * Star half icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + starHalf = "StarHalf", + /** + * Star with 3 horizontal lines icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + starLineHorizontal3 = "StarLineHorizontal3", + /** + * Star one quarter icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + starOneQuarter = "StarOneQuarter", + /** + * Star three quarter icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + starThreeQuarter = "StarThreeQuarter", + /** + * Status icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + status = "Status", + /** + * Steps icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + steps = "Steps", + /** + * Stethoscope icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stethoscope = "Stethoscope", + /** + * Sticker icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sticker = "Sticker", + /** + * Storage icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + storage = "Storage", + /** + * Stream icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stream = "Stream", + /** + * Stream input icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + streamInput = "StreamInput", + /** + * Stream input output icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + streamInputOutput = "StreamInputOutput", + /** + * Stream output icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + streamOutput = "StreamOutput", + /** + * Style guide icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + styleGuide = "StyleGuide", + /** + * Sub grid icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + subGrid = "SubGrid", + /** + * Subtitles icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + subtitles = "Subtitles", + /** + * Surface earbuds icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + surfaceEarbuds = "SurfaceEarbuds", + /** + * Surface hub icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + surfaceHub = "SurfaceHub", + /** + * Symbols icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + symbols = "Symbols", + /** + * Syringe icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + syringe = "Syringe", + /** + * System icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + system = "System", + /** + * Tab desktop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tabDesktop = "TabDesktop", + /** + * Tab InPrivate account icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tabInprivateAccount = "TabInprivateAccount", + /** + * Table icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + table = "Table", + /** + * Table image icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tableImage = "TableImage", + /** + * Table multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tableMultiple = "TableMultiple", + /** + * Tablet icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tablet = "Tablet", + /** + * Tabs icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tabs = "Tabs", + /** + * Tag icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tag = "Tag", + /** + * Tag circle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tagCircle = "TagCircle", + /** + * Tag multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tagMultiple = "TagMultiple", + /** + * Target icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + target = "Target", + /** + * Target arrow icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + targetArrow = "TargetArrow", + /** + * Teddy icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + teddy = "Teddy", + /** + * Temperature icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + temperature = "Temperature", + /** + * Tent icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tent = "Tent", + /** + * Tetris app icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tetrisApp = "TetrisApp", + /** + * Textbox icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + textbox = "Textbox", + /** + * Text quote icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + textQuote = "TextQuote", + /** + * Thinking icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + thinking = "Thinking", + /** + * Thumb dislike icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + thumbDislike = "ThumbDislike", + /** + * Thumb like icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + thumbLike = "ThumbLike", + /** + * Ticket diagonal icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ticketDiagonal = "TicketDiagonal", + /** + * Ticket horizontal icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ticketHorizontal = "TicketHorizontal", + /** + * Time and weather icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + timeAndWeather = "TimeAndWeather", + /** + * Timeline icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + timeline = "Timeline", + /** + * Timer icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + timer = "Timer", + /** + * Toolbox icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + toolbox = "Toolbox", + /** + * Top speed icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + topSpeed = "TopSpeed", + /** + * Translate icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + translate = "Translate", + /** + * Transmission icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + transmission = "Transmission", + /** + * Tree deciduous icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + treeDeciduous = "TreeDeciduous", + /** + * Tree evergreen icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + treeEvergreen = "TreeEvergreen", + /** + * Trophy icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + trophy = "Trophy", + /** + * TV icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tv = "Tv", + /** + * TV USB icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + tvUsb = "TvUsb", + /** + * Umbrella icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + umbrella = "Umbrella", + /** + * USB plug icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + usbPlug = "UsbPlug", + /** + * USB stick icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + usbStick = "UsbStick", + /** + * Vault icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vault = "Vault", + /** + * Vehicle bicycle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleBicycle = "VehicleBicycle", + /** + * Vehicle bus icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleBus = "VehicleBus", + /** + * Vehicle cab icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleCab = "VehicleCab", + /** + * Vehicle car icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleCar = "VehicleCar", + /** + * Vehicle car collision icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleCarCollision = "VehicleCarCollision", + /** + * Vehicle car profile left-to-right icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleCarProfileLtr = "VehicleCarProfileLtr", + /** + * Vehicle car profile right-to-left icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleCarProfileRtl = "VehicleCarProfileRtl", + /** + * Vehicle ship icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleShip = "VehicleShip", + /** + * Vehicle subway icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleSubway = "VehicleSubway", + /** + * Vehicle truck icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleTruck = "VehicleTruck", + /** + * Vehicle truck bag icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleTruckBag = "VehicleTruckBag", + /** + * Vehicle truck cube icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleTruckCube = "VehicleTruckCube", + /** + * Vehicle truck profile icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vehicleTruckProfile = "VehicleTruckProfile", + /** + * Video icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + video = "Video", + /** + * Video 360 icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + video360 = "Video360", + /** + * Video chat icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + videoChat = "VideoChat", + /** + * Video clip icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + videoClip = "VideoClip", + /** + * Video clip multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + videoClipMultiple = "VideoClipMultiple", + /** + * Video person icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + videoPerson = "VideoPerson", + /** + * Video recording icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + videoRecording = "VideoRecording", + /** + * Video security icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + videoSecurity = "VideoSecurity", + /** + * View desktop icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + viewDesktop = "ViewDesktop", + /** + * View desktop mobile icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + viewDesktopMobile = "ViewDesktopMobile", + /** + * Violin icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + violin = "Violin", + /** + * Virtual network icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + virtualNetwork = "VirtualNetwork", + /** + * Voicemail icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + voicemail = "Voicemail", + /** + * Vote icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vote = "Vote", + /** + * Walkie talkie icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + walkieTalkie = "WalkieTalkie", + /** + * Wallet icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wallet = "Wallet", + /** + * Wallet credit card icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + walletCreditCard = "WalletCreditCard", + /** + * Wallpaper icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wallpaper = "Wallpaper", + /** + * Wand icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wand = "Wand", + /** + * Warning icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + warning = "Warning", + /** + * Weather blowing snow icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherBlowingSnow = "WeatherBlowingSnow", + /** + * Weather cloudy icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherCloudy = "WeatherCloudy", + /** + * Weather drizzle icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherDrizzle = "WeatherDrizzle", + /** + * Weather duststorm icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherDuststorm = "WeatherDuststorm", + /** + * Weather fog icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherFog = "WeatherFog", + /** + * Weather hail day icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherHailDay = "WeatherHailDay", + /** + * Weather hail night icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherHailNight = "WeatherHailNight", + /** + * Weather haze icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherHaze = "WeatherHaze", + /** + * Weather moon icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherMoon = "WeatherMoon", + /** + * Weather partly cloudy day icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherPartlyCloudyDay = "WeatherPartlyCloudyDay", + /** + * Weather partly cloudy night icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherPartlyCloudyNight = "WeatherPartlyCloudyNight", + /** + * Weather rain icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherRain = "WeatherRain", + /** + * Weather rain showers day icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherRainShowersDay = "WeatherRainShowersDay", + /** + * Weather rain showers night icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherRainShowersNight = "WeatherRainShowersNight", + /** + * Weather rain snow icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherRainSnow = "WeatherRainSnow", + /** + * Weather snow icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSnow = "WeatherSnow", + /** + * Weather snowflake icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSnowflake = "WeatherSnowflake", + /** + * Weather snow shower day icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSnowShowerDay = "WeatherSnowShowerDay", + /** + * Weather snow shower night icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSnowShowerNight = "WeatherSnowShowerNight", + /** + * Weather squalls icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSqualls = "WeatherSqualls", + /** + * Weather sunny high icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSunnyHigh = "WeatherSunnyHigh", + /** + * Weather sunny low icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherSunnyLow = "WeatherSunnyLow", + /** + * Weather thunderstorm icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + weatherThunderstorm = "WeatherThunderstorm", + /** + * Web asset icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + webAsset = "WebAsset", + /** + * Whiteboard icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + whiteboard = "Whiteboard", + /** + * Wifi signal with 3 bars icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wifi1 = "Wifi1", + /** + * Wifi signal with 2 bars icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wifi2 = "Wifi2", + /** + * Window icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + window = "Window", + /** + * Window multiple icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + windowMultiple = "WindowMultiple", + /** + * Window wrench icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + windowWrench = "WindowWrench", + /** + * Wrench icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wrench = "Wrench", + /** + * Wrench screwdriver icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + wrenchScrewdriver = "WrenchScrewdriver", + /** + * X-ray icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + xray = "Xray", + /** + * Yoga icon. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + yoga = "Yoga" + } + /** + * Represents a reference into `referencedValues`. One scenario for using this reference is to avoid duplicating cell value objects (such as an `EntityCellValue`). Define a cell value object once in `referencedValues`, and then refer to that cell value from many places by using a `ReferenceCellValue` where the duplicated value would have appeared. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface ReferenceCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.reference | "Reference"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: boolean | number | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType | "Boolean" | "Double" | "Error" | "Empty" | "String"; + /** + * Represents the index into the `referencedValues` properties of cell values such as `EntityCellValue` and `ArrayCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + reference: number; + } + /** + * Represents a reference to the value which contains `referencedValues`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface RootReferenceCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: ReferenceValueType.root | "Root"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: boolean | number | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType | "Boolean" | "Double" | "Error" | "Empty" | "String"; + } + /** + * Represents the types of the `ReferenceValue` object. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum ReferenceValueType { + /** + * Represents an `ArrayCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + array = "Array", + /** + * Represents an `EntityCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + entity = "Entity", + /** + * Represents a `RootReferenceCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + root = "Root" + } + /** + * Represents the value in a cell. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type ReferencedValue = ArrayCellValue | EntityCellValue | RootReferenceCellValue; + /** + * Represents the types of the `CellValue` object. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum CellValueType { + /** + * Represents an `ArrayCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + array = "Array", + /** + * Represents a `BooleanCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + boolean = "Boolean", + /** + * Represents a `DoubleCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + double = "Double", + /** + * Represents an `EntityCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + entity = "Entity", + /** + * Represents an `EmptyCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + empty = "Empty", + /** + * Represents an `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + error = "Error", + /** + * Represents a `FormattedNumberCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + formattedNumber = "FormattedNumber", + /** + * Represents a `LinkedEntityCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + linkedEntity = "LinkedEntity", + /** + * Represents a `LocalImageCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + localImage = "LocalImage", + /** + * Represents a `ReferenceCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + reference = "Reference", + /** + * Represents a `StringCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + string = "String", + /** + * Represents a `ValueTypeNotAvailableCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + notAvailable = "NotAvailable", + /** + * Represents a `WebImageCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + webImage = "WebImage" + } + /** + * Represents the value in a cell. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type CellValue = (ArrayCellValue | BooleanCellValue | DoubleCellValue | EntityCellValue | EmptyCellValue | ErrorCellValue | FormattedNumberCellValue | LinkedEntityCellValue | LocalImageCellValue | ReferenceCellValue | StringCellValue | ValueTypeNotAvailableCellValue | WebImageCellValue) & CellValueExtraProperties; + /** + * These extra properties may appear on a `CellValue` and provide information about that `CellValue`, but the extra properties are not part of the value in the cell. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CellValueExtraProperties { + /** + * Represents whether this `CellValue` will be used to overwrite a cell. + * When false, APIs which would use this `CellValue` to overwrite a cell will instead ignore this value without throwing an error. + * The default value is true. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + writable?: boolean; + /** + * Represents an explanation about why `CellValue.writable` is specified as false. + * Note: This string is only available if `writable` is specified as false. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + writableNote?: string; + } + /** + * Represents the value and metadata of a property. The metadata applies to the property (and not the value), but it is combined with the value in this type. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type CellValueAndPropertyMetadata = (CellValue) & EntityPropertyExtraProperties; + /** + * The attribution attributes object represents the set of details that can be used to describe where information came from, if the information comes from a public source. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CellValueAttributionAttributes { + /** + * Represents a URL to the source of the `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sourceAddress?: string; + /** + * Represents a name for the source of the `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sourceText?: string; + /** + * Represents a URL to a license or source that describes how this property can be used. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + licenseAddress?: string; + /** + * Represents a name for the license that governs this property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + licenseText?: string; + } + /** + * Represents the value of a cell containing a #BUSY! error. + * This type of error is used as a placeholder while the value of a cell is downloaded. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface PlaceholderErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#BUSY!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.placeholder | "Placeholder"; + /** + * `PlaceholderErrorCellValue` is used during processing, while data is downloaded. The `target` property represents the data that is downloading, the data for which the `PlaceholderErrorCellValue` object is a placeholder. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + target: LinkedEntityCellValue | WebImageCellValue; + } + /** + * The provider attributes object represents the set of details used in card view to provide specified branding information for a `CellValue` type that supports provider attributes. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CellValueProviderAttributes { + /** + * Represents the provider description property that is used in card view if no logo is specified. + * If a logo is specified, this will be used as tooltip text. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + description?: string; + /** + * Represents a URL used to download an image that will be used as a logo in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + logoSourceAddress?: string; + /** + * Represents a URL that is the navigation target if the user clicks on the logo element in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + logoTargetAddress?: string; + } + /** + * Metadata about a property in `EntityCellValue.properties`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CellValuePropertyMetadata { + /** + * Represents which features this property is excluded from. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + excludeFrom?: CellValuePropertyMetadataExclusions; + /** + * Represents the sublabel for this property shown in card view. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + sublabel?: string; + /** + * Represents attribution information to describe the source and license requirements for using this property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + attribution?: CellValueAttributionAttributes[]; + } + /** + * Represents the exclusion of a property in `EntityCellValue.properties` from features of Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface CellValuePropertyMetadataExclusions { + /** + * True represents that the property is excluded from the properties shown by card view. False and undefined represent the default behavior of including the property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cardView?: boolean; + /** + * True represents that the property is excluded from the properties shown by auto complete. False and undefined represent the default behavior of including the property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + autoComplete?: boolean; + /** + * True represents that the property is excluded from the properties used to compare cell values during recalc. False and undefined represent the default behavior of including the property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + calcCompare?: boolean; + /** + * True represents that the property is excluded from the properties which can be accessed via the FIELDVALUE function. False and undefined represent the default behavior of including the property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dotNotation?: boolean; + } + /** + * Represents types of #CONNECT! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum ConnectErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by a problem with the service. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + serviceError = "ServiceError", + /** + * An error caused by an issue with the external links. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinks = "ExternalLinks", + /** + * An error caused by an external link to a non-cloud location, such as a link to an Excel file that is saved to a local computer instead of to a cloud location. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksNonCloudLocation = "ExternalLinksNonCloudLocation", + /** + * An error caused by no service connection for linked data types. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTypeNoConnection = "DataTypeNoConnection", + /** + * An error caused by an issue in the service for linked data types. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataTypeServiceError = "DataTypeServiceError", + /** + * An error caused by missing content. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + missingContent = "MissingContent", + /** + * An error caused by request throttling. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + requestThrottle = "RequestThrottle", + /** + * An error caused by external links failing to refresh. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksFailedToRefresh = "ExternalLinksFailedToRefresh", + /** + * An error caused by a failure to access external links. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksAccessFailed = "ExternalLinksAccessFailed", + /** + * An error caused by a server error while resolving an external link. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksServerError = "ExternalLinksServerError", + /** + * An error caused by an invalid request while resolving an external link. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksInvalidRequest = "ExternalLinksInvalidRequest", + /** + * An error caused by a lack of authentication for external links. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksUnAuthenticated = "ExternalLinksUnAuthenticated", + /** + * An error caused by throttling from an external link host. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksThrottledByHost = "ExternalLinksThrottledByHost", + /** + * An error caused by an external link to a file which exceeds file size capacity. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksFileTooLarge = "ExternalLinksFileTooLarge", + /** + * An error caused by an outdated linked entity. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + outdatedLinkedEntity = "OutdatedLinkedEntity", + /** + * An error caused by an error returned from the server. Displays as error type #CONNECT! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + genericServerError = "GenericServerError" + } + /** + * Represents the value of a cell containing a #CONNECT! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface ConnectErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#CONNECT!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.connect | "Connect"; + /** + * Represents the type of `ConnectErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: ConnectErrorCellValueSubType | "Unknown" | "ServiceError" | "ExternalLinks" | "ExternalLinksNonCloudLocation" | "DataTypeNoConnection" | "DataTypeServiceError" | "MissingContent" | "RequestThrottle" | "ExternalLinksFailedToRefresh" | "ExternalLinksAccessFailed" | "ExternalLinksServerError" | "ExternalLinksInvalidRequest" | "ExternalLinksUnAuthenticated" | "ExternalLinksThrottledByHost" | "ExternalLinksFileTooLarge" | "OutdatedLinkedEntity" | "GenericServerError"; + } + /** + * Represents the value of a cell containing a #DIV/0! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface Div0ErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#DIV/0!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.div0 | "Div0"; + } + /** + * Represents the value of a cell containing a double. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface DoubleCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.double | "Double"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue: number; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.double | "Double"; + } + /** + * Represents the value of a cell that's empty and has no formulas or data. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface EmptyCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.empty | "Empty"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: ""; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.empty | "Empty"; + } + /** + * Represents the value of a property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type EntityPropertyType = CellValueAndPropertyMetadata | CellValue; + /** + * Properties used by `CellValueAndPropertyMetadata`. These properties refer to the metadata and not to a `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface EntityPropertyExtraProperties { + /** + * Represents metadata about the property. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + propertyMetadata?: CellValuePropertyMetadata; + } + /** + * Represents a set of properties without a schema or defined structure. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface EntityCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.entity | ReferenceValueType.entity | "Entity"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#VALUE!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the text shown when a cell with this value is rendered. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + text?: string; + /** + * Represents the properties of this entity and their metadata. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + properties?: { + [key: string]: EntityPropertyType; + }; + /** + * Represents layout information for views of this entity. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + layouts?: EntityViewLayouts; + /** + * Represents information that describes the service that provided the data in this `EntityCellValue`. + * This information can be used for branding in entity cards. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + provider?: CellValueProviderAttributes; + /** + * Represents the cell values which are referenced within `EntityCellValue.properties`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + referencedValues?: ReferencedValue[]; + } + /** + * Represents layout information for various views of the entity. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface EntityViewLayouts { + /** + * Represents the layout of this entity in card view. + * If the `CardLayout` object does not have a layout property, it is assumed to be "Entity". + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + card?: CardLayout; + /** + * Represents the layout used when there is limited space to represent the entity. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + compact?: CompactLayout; + } + /** + * Represents a card layout that is best used for an array. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface EntityCardLayout extends CardLayoutStandardProperties { + /** + * Represents the type of this layout. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + layout?: EntityCardLayoutType.entity | "Entity"; + } + /** + * Represents the types of the `ErrorCellValue` object. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum ErrorCellValueType { + /** + * Represents a `BlockedErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + blocked = "Blocked", + /** + * Represents a `BusyErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + busy = "Busy", + /** + * Represents a `CalcErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + calc = "Calc", + /** + * Represents a `ConnectErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + connect = "Connect", + /** + * Represents a `Div0ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + div0 = "Div0", + /** + * Represents an `ExternalErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + external = "External", + /** + * Represents a `FieldErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + field = "Field", + /** + * Represents a `GettingDataErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + gettingData = "GettingData", + /** + * Represents a `NotAvailableErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + notAvailable = "NotAvailable", + /** + * Represents a `NameErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + name = "Name", + /** + * Represents a `NullErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + null = "Null", + /** + * Represents a `NumErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + num = "Num", + /** + * Represents a `PlaceholderErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + placeholder = "Placeholder", + /** + * Represents a `RefErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + ref = "Ref", + /** + * Represents a `SpillErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + spill = "Spill", + /** + * Represents a `ValueErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + value = "Value" + } + /** + * Represents a cell value which contains an error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type ErrorCellValue = BlockedErrorCellValue | BusyErrorCellValue | CalcErrorCellValue | ConnectErrorCellValue | Div0ErrorCellValue | ExternalErrorCellValue | FieldErrorCellValue | GettingDataErrorCellValue | NotAvailableErrorCellValue | NameErrorCellValue | NullErrorCellValue | NumErrorCellValue | PlaceholderErrorCellValue | RefErrorCellValue | SpillErrorCellValue | ValueErrorCellValue; + /** + * Represents types of #EXTERNAL! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum ExternalErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #EXTERNAL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown" + } + /** + * Represents the value of a cell containing an #EXTERNAL! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface ExternalErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#EXTERNAL!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.external | "External"; + /** + * Represents the type of `ExternalErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: ExternalErrorCellValueSubType | "Unknown"; + } + /** + * Represents types of #FIELD! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum FieldErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #FIELD! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by a missing file. In this case, the RichValueWebImageValue.xml file is missing from the metro package. Displays as error type #FIELD! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + webImageMissingFilePart = "WebImageMissingFilePart", + /** + * An error caused by an error from a data provider. Displays as error type #FIELD! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + dataProviderError = "DataProviderError", + /** + * An error caused by a missing file. In this case, the RichValueRel.xml file is missing from the metro package. Displays as error type #FIELD! in Excel. + * + * @remarks + * [Api set: 1.16] + */ + richValueRelMissingFilePart = "RichValueRelMissingFilePart" + } + /** + * Represents the value of a cell containing a #FIELD! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface FieldErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#FIELD!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.field | "Field"; + /** + * Represents the type of `FieldErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: FieldErrorCellValueSubType | "Unknown" | "WebImageMissingFilePart" | "DataProviderError" | "RichValueRelMissingFilePart"; + /** + * Represents the field which was not found by FIELDVALUE. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + fieldName?: string; + } + /** + * Represents the value of a cell containing a number with a format string. Number format strings must conform to Excel guidelines. To learn more, see {@link https://support.microsoft.com/office/review-guidelines-for-customizing-a-number-format-c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}. + * In this scenario, the format is applied to the value and not to the cell, so the value retains its format string throughout calculation. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface FormattedNumberCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.formattedNumber | "FormattedNumber"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue: number; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.double | "Double"; + /** + * Returns the number format string that is used to display this value. + * When accessed through a `valuesAsJson` property, this number format string is in the en-US locale. When accessed through a `valuesAsJsonLocal` property, this number format is in the user's display locale. + * Number format strings must conform to Excel guidelines. + * To learn more, see {@link https://support.microsoft.com/office/review-guidelines-for-customizing-a-number-format-c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + numberFormat: string; + } + /** + * Represents the value of a cell containing a #GETTING_DATA error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface GettingDataErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#GETTING_DATA" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.gettingData | "GettingData"; + } + /** + * The linked entity ID object represents a set of properties that describes a service and culture for locating this service defined value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface LinkedEntityId { + /** + * Represents which service was used to create the `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + serviceId: number; + /** + * Represents a domain specific to a service used to create the `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + domainId?: string; + /** + * Represents an identifier specific to a service used to create the `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + entityId: string; + /** + * Represents which language culture was used to create this `CellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + culture: string; + } + /** + * Represents a value whose properties derive from a service. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface LinkedEntityCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.linkedEntity | "LinkedEntity"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#VALUE!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the service source that provided the information in this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + id: LinkedEntityId; + /** + * Represents the text shown when a cell with this value is rendered. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + text?: string; + /** + * Represents the properties of this linked entity and their metadata. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + properties?: { + [key: string]: CellValue & { + propertyMetadata?: CellValuePropertyMetadata; + }; + }; + /** + * Represents the layout of this linked entity in card view. + * If the `CardLayout` object doesn't have a layout property, it default value is "Entity". + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + cardLayout?: CardLayout; + /** + * Represents information that describes the service that provided data in this `LinkedEntityCellValue`. + * This information can be used for branding in entity cards. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + provider?: CellValueProviderAttributes; + } + /** + * Represents the value of a cell containing a locally stored or generated image. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface LocalImageCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.localImage | "LocalImage"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#VALUE!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the image itself, either cached or encoded. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + image: LocalImageCellValueCacheId | Base64EncodedImage; + /** + * Represents the alternate text used in accessibility scenarios to describe what the image represents. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altText?: string; + /** + * Represents attribution information to describe the source and license requirements for this image. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + attribution?: CellValueAttributionAttributes[]; + /** + * Represents information that describes the entity or individual who provided the image. + * This information is used for branding purposes in image cards. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + provider?: CellValueProviderAttributes; + } + /** + * The UID of a previously cached image. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface LocalImageCellValueCacheId { + /** + * Represents the image's UID as it appears in the cache. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + cacheUid: string; + } + /** + * Represents the value of a cell containing a #N/A! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface NotAvailableErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#N/A!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.notAvailable | "NotAvailable"; + } + /** + * Represents the value of a cell containing a #NAME? error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface NameErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#NAME?" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.name | "Name"; + } + /** + * Represents the value of a cell containing a #NULL! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface NullErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#NULL!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.null | "Null"; + } + /** + * Represents types of #NUM! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum NumErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #NUM! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by a cell's formula having an array parameter with too many rows or columns. The maximum number of rows and columns in an array parameter is 1048576. Displays as error type #NUM! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + arrayTooLarge = "ArrayTooLarge" + } + /** + * Represents the value of a cell containing a #NUM! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface NumErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#NUM!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.num | "Num"; + /** + * Represents the type of `NumErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: NumErrorCellValueSubType | "Unknown" | "ArrayTooLarge"; + /** + * Represents the name of the function causing the error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + functionName?: string; + } + /** + * Represents types of #REF! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum RefErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #REF! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by structured references from the linked workbook. Displays as error type #REF! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksStructuredRef = "ExternalLinksStructuredRef", + /** + * An error caused by dynamic array references from the linked workbook. Displays as error type #REF! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + externalLinksCalculatedRef = "ExternalLinksCalculatedRef" + } + /** + * Represents the value of a cell containing a #REF! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface RefErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#REF!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.ref | "Ref"; + /** + * Represents the type of `RefErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: RefErrorCellValueSubType | "Unknown" | "ExternalLinksStructuredRef" | "ExternalLinksCalculatedRef"; + } + /** + * Represents types of #SPILL! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum SpillErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by a dynamic array attempting to spill data into a cell that isn't empty. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + collision = "Collision", + /** + * An error caused by a dynamic array formula that can't be evaluated in a single calculation. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + indeterminateSize = "IndeterminateSize", + /** + * An error caused by a dynamic array attempting to spill over the edge of the worksheet. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + worksheetEdge = "WorksheetEdge", + /** + * An error caused by insufficient memory when attempting to calculate a dynamic array formula. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + outOfMemoryWhileCalc = "OutOfMemoryWhileCalc", + /** + * An error caused by entering a dynamic array formula in a table. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + table = "Table", + /** + * An error caused by a merged cell blocking a dynamic array. Displays as error type #SPILL! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + mergedCell = "MergedCell" + } + /** + * Represents the value of a cell containing a #SPILL! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface SpillErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#SPILL!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.spill | "Spill"; + /** + * Represents the type of `SpillErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: SpillErrorCellValueSubType | "Unknown" | "Collision" | "IndeterminateSize" | "WorksheetEdge" | "OutOfMemoryWhileCalc" | "Table" | "MergedCell"; + /** + * Represents the number of rows that would spill if there were no #SPILL! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + rowCount?: number; + /** + * Represents the number of columns that would spill if there were no #SPILL! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + columnCount?: number; + } + /** + * Represents the value of a cell containing a string. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface StringCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.string | "String"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue: string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.string | "String"; + } + /** + * Represents types of #VALUE! errors. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + enum ValueErrorCellValueSubType { + /** + * An unknown type of error. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + unknown = "Unknown", + /** + * An error caused by a column_index_num parameter of VLOOKUP of less than 1. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vlookupColumnIndexLessThanOne = "VlookupColumnIndexLessThanOne", + /** + * An error caused by VLOOKUP not finding its lookup_value parameter. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + vlookupResultNotFound = "VlookupResultNotFound", + /** + * An error caused by a row_index_num parameter of HLOOKUP of less than 1. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + hlookupRowIndexLessThanOne = "HlookupRowIndexLessThanOne", + /** + * An error caused by HLOOKUP not finding its lookup_value parameter. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + hlookupResultNotFound = "HlookupResultNotFound", + /** + * An error caused by encountering a string where a number was expected, and that string not being coercible to a number. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + coerceStringToNumberInvalid = "CoerceStringToNumberInvalid", + /** + * An error caused by encountering a string where a boolean was expected, and that string not being coercible to a boolean. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + coerceStringToBoolInvalid = "CoerceStringToBoolInvalid", + /** + * An error caused by conversion of a string to a type other than a boolean or number. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + coerceStringToInvalidType = "CoerceStringToInvalidType", + /** + * An error caused by SUBARRAY missing a start row. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + subArrayStartRowMissingEndRowNot = "SubArrayStartRowMissingEndRowNot", + /** + * An error caused by SUBARRAY missing a start column. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + subArrayStartColumnMissingEndColumnNot = "SubArrayStartColumnMissingEndColumnNot", + /** + * An error caused by a `WebImageValue` with an invalid URL. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + invalidImageUrl = "InvalidImageUrl", + /** + * An error caused by STOCKHISTORY having a date range which only contains days that don't have stock trading. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryNonTradingDays = "StockHistoryNonTradingDays", + /** + * An error caused by passing a stock parameter which is not a stock to STOCKHISTORY. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryNotAStock = "StockHistoryNotAStock", + /** + * An error caused by passing an invalid date to STOCKHISTORY. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryInvalidDate = "StockHistoryInvalidDate", + /** + * An error caused by passing an end_date parameter that precedes the start_date parameter to STOCKHISTORY. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryEndBeforeStart = "StockHistoryEndBeforeStart", + /** + * An error caused by passing a future start_date parameter to STOCKHISTORY. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryStartInFuture = "StockHistoryStartInFuture", + /** + * An error caused by invalid interval or header parameters for STOCKHISTORY. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryInvalidEnum = "StockHistoryInvalidEnum", + /** + * An error caused by STOCKHISTORY parameters that request only the date and no other fields. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryOnlyDateRequested = "StockHistoryOnlyDateRequested", + /** + * An error caused by STOCKHISTORY not finding the history of the specified stock. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + stockHistoryNotFound = "StockHistoryNotFound", + /** + * An error caused by passing the incorrect number of parameters to a lambda value. Displays as error type #VALUE! in Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + lambdaWrongParamCount = "LambdaWrongParamCount" + } + /** + * Represents the value of a cell containing a #VALUE! error. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface ValueErrorCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.error | "Error"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#VALUE!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the type of `ErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorType?: ErrorCellValueType.value | "Value"; + /** + * Represents the type of `ValueErrorCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + errorSubType?: ValueErrorCellValueSubType | "Unknown" | "VlookupColumnIndexLessThanOne" | "VlookupResultNotFound" | "HlookupRowIndexLessThanOne" | "HlookupResultNotFound" | "CoerceStringToNumberInvalid" | "CoerceStringToBoolInvalid" | "CoerceStringToInvalidType" | "SubArrayStartRowMissingEndRowNot" | "SubArrayStartColumnMissingEndColumnNot" | "InvalidImageUrl" | "StockHistoryNonTradingDays" | "StockHistoryNotAStock" | "StockHistoryInvalidDate" | "StockHistoryEndBeforeStart" | "StockHistoryStartInFuture" | "StockHistoryInvalidEnum" | "StockHistoryOnlyDateRequested" | "StockHistoryNotFound" | "LambdaWrongParamCount"; + } + /** + * Represents the value of a cell containing a type of value which cannot be serialized. + * For example, an #UNKNOWN! error which represents a type of rich value not known to this version of Excel. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface ValueTypeNotAvailableCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.notAvailable | "NotAvailable"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue: boolean | number | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType: RangeValueType | "Boolean" | "Double" | "Error" | "Empty" | "String"; + } + /** + * Represents the value of a cell containing an image downloaded from the internet. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + interface WebImageCellValue { + /** + * Represents the type of this cell value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + type: CellValueType.webImage | "WebImage"; + /** + * Represents the value that would be returned by `Range.values` for a cell with this value. + * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale. + * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicValue?: "#VALUE!" | string; + /** + * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + basicType?: RangeValueType.error | "Error"; + /** + * Represents the URL from which the image will be downloaded. + * This image must be hosted on a server that supports HTTPS. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + address: string; + /** + * Represents the alternate text that can be used in accessibility scenarios to describe what the image represents. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + altText?: string; + /** + * Represents the URL of a webpage with images that are considered related to this `WebImageCellValue`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + relatedImagesAddress?: string; + /** + * Represents attribution information to describe the source and license requirements for using this image. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + attribution?: CellValueAttributionAttributes[]; + /** + * Represents information that describes the entity or individual who provided the image. + * This information can be used for branding in image cards. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + provider?: CellValueProviderAttributes; + } + /** + * + * Represents which cell properties to load, when used as part of a "range.getCellProperties" method. + * + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesLoadOptions { + /** + * + * Specifies whether to load on the `address` property. + * + * [Api set: ExcelApi 1.9] + */ + address?: boolean; + /** + * + * Specifies whether to load on the `addressLocal` property. + * + * [Api set: ExcelApi 1.9] + */ + addressLocal?: boolean; + /** + * + * Specifies whether to load on the `format` property. + * + * [Api set: ExcelApi 1.9] + */ + format?: Excel.CellPropertiesFormatLoadOptions; + /** + * + * Specifies whether to load on the `hidden` property. + * + * [Api set: ExcelApi 1.9] + */ + hidden?: boolean; + /** + * + * Specifies whether to load on the `hyperlink` property. + * + * [Api set: ExcelApi 1.9] + */ + hyperlink?: boolean; + /** + * + * Specifies whether to load on the `style` property. + * + * [Api set: ExcelApi 1.9] + */ + style?: boolean; + } + /** + * + * Represents which row properties to load, when used as part of a "range.getRowProperties" method. + * + * [Api set: ExcelApi 1.9] + */ + interface RowPropertiesLoadOptions extends CellPropertiesLoadOptions { + /** + * + * Specifies whether to load on the `rowHidden` property. + * + * [Api set: ExcelApi 1.9] + */ + rowHidden?: boolean; + /** + * + * Specifies whether to load on the `rowIndex` property. + * + * [Api set: ExcelApi 1.9] + */ + rowIndex?: boolean; + /** + * + * Specifies whether to load on the `format` property. + * + * [Api set: ExcelApi 1.9] + */ + format?: Excel.CellPropertiesFormatLoadOptions & { + rowHeight?: boolean; + }; + } + /** + * + * Represents which column properties to load, when used as part of a "range.getColumnProperties" method. + * + * [Api set: ExcelApi 1.9] + */ + interface ColumnPropertiesLoadOptions extends CellPropertiesLoadOptions { + /** + * + * Specifies whether to load on the `columnIndex` property. + * + * [Api set: ExcelApi 1.9] + */ + columnIndex?: boolean; + /** + * + * Specifies whether to load on the `columnHidden` property. + * + * [Api set: ExcelApi 1.9] + */ + columnHidden?: boolean; + /** + * + * Specifies whether to load on the `format` property. + * + * [Api set: ExcelApi 1.9] + */ + format?: Excel.CellPropertiesFormatLoadOptions & { + columnWidth?: boolean; + }; + } + /** + * + * Represents which properties to load on the format object. + * + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesFormatLoadOptions { + /** + * + * Specifies whether to load on the `autoIndent` property. + * + * [Api set: ExcelApi 1.9] + */ + autoIndent?: boolean; + /** + * + * Specifies whether to load on the `borders` property. + * + * [Api set: ExcelApi 1.9] + */ + borders?: Excel.CellPropertiesBorderLoadOptions; + /** + * + * Specifies whether to load on the `fill` property. + * + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.CellPropertiesFillLoadOptions; + /** + * + * Specifies whether to load on the `font` property. + * + * [Api set: ExcelApi 1.9] + */ + font?: Excel.CellPropertiesFontLoadOptions; + /** + * + * Specifies whether to load on the `horizontalAlignment` property. + * + * [Api set: ExcelApi 1.9] + */ + horizontalAlignment?: boolean; + /** + * + * Specifies whether to load on the `indentLevel` property. + * + * [Api set: ExcelApi 1.9] + */ + indentLevel?: boolean; + /** + * + * Specifies whether to load on the `protection` property. + * + * [Api set: ExcelApi 1.9] + */ + protection?: boolean; + /** + * + * Specifies whether to load on the `readingOrder` property. + * + * [Api set: ExcelApi 1.9] + */ + readingOrder?: boolean; + /** + * + * Specifies whether to load on the `shrinkToFit` property. + * + * [Api set: ExcelApi 1.9] + */ + shrinkToFit?: boolean; + /** + * + * Specifies whether to load on the `textOrientation` property. + * + * [Api set: ExcelApi 1.9] + */ + textOrientation?: boolean; + /** + * + * Specifies whether to load on the `useStandardHeight` property. + * + * [Api set: ExcelApi 1.9] + */ + useStandardHeight?: boolean; + /** + * + * Specifies whether to load on the `useStandardWidth` property. + * + * [Api set: ExcelApi 1.9] + */ + useStandardWidth?: boolean; + /** + * + * Specifies whether to load on the `verticalAlignment` property. + * + * [Api set: ExcelApi 1.9] + */ + verticalAlignment?: boolean; + /** + * + * Specifies whether to load on the `wrapText` property. + * + * [Api set: ExcelApi 1.9] + */ + wrapText?: boolean; + } + /** + * + * Represents the input parameter of setCellProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface SettableCellProperties { + /** + * + * Represents the `format` property. + * + * [Api set: ExcelApi 1.9] + */ + format?: Excel.CellPropertiesFormat; + /** + * + * Represents the `hyperlink` property. + * + * [Api set: ExcelApi 1.9] + */ + hyperlink?: Excel.RangeHyperlink; + /** + * + * Represents the `style` property. + * + * [Api set: ExcelApi 1.9] + */ + style?: string; + } + /** + * + * Represents the returned properties of getCellProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface CellProperties extends SettableCellProperties { + /** + * + * Represents the `address` property. + * + * [Api set: ExcelApi 1.9] + */ + address?: string; + /** + * + * Represents the `addressLocal` property. + * + * [Api set: ExcelApi 1.9] + */ + addressLocal?: string; + /** + * + * Represents the `hidden` property. + * + * [Api set: ExcelApi 1.9] + */ + hidden?: boolean; + } + /** + * + * Represents the input parameter of setRowProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface SettableRowProperties extends SettableCellProperties { + /** + * + * Represents the `rowHidden` property. + * + * [Api set: ExcelApi 1.9] + */ + rowHidden?: boolean; + /** + * + * Represents the `format` property. + * + * [Api set: ExcelApi 1.9] + */ + format?: Excel.CellPropertiesFormat & { + rowHeight?: number; + }; + } + /** + * + * Represents the returned properties of getRowProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface RowProperties extends SettableRowProperties { + /** + * + * Represents the `rowIndex` property. + * + * [Api set: ExcelApi 1.9] + */ + rowIndex?: number; + /** + * + * Represents the `address` property. + * + * [Api set: ExcelApi 1.9] + */ + address?: string; + /** + * + * Represents the `addressLocal` property. + * + * [Api set: ExcelApi 1.9] + */ + addressLocal?: string; + } + /** + * + * Represents the input parameter of setColumnProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface SettableColumnProperties extends SettableCellProperties { + /** + * + * Represents the `columnHidden` property. + * + * [Api set: ExcelApi 1.9] + */ + columnHidden?: boolean; + /** + * + * Represents the `format` property. + * + * [Api set: ExcelApi 1.9] + */ + format?: Excel.CellPropertiesFormat & { + columnWidth?: number; + }; + } + /** + * + * Represents the returned properties of getColumnProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface ColumnProperties extends SettableColumnProperties { + /** + * + * Represents the `columnIndex` property. + * + * [Api set: ExcelApi 1.9] + */ + columnIndex?: number; + /** + * + * Represents the `address` property. + * + * [Api set: ExcelApi 1.9] + */ + address?: string; + /** + * + * Represents the `addressLocal` property. + * + * [Api set: ExcelApi 1.9] + */ + addressLocal?: string; + } + /** + * + * Represents the returned format properties of getCellProperties or format input parameter of setCellProperties. + * + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesFormat { + /** + * + * Represents the `autoIndent` property. + * + * [Api set: ExcelApi 1.9] + */ + autoIndent?: boolean; + /** + * + * Represents the `borders` property. + * + * [Api set: ExcelApi 1.9] + */ + borders?: Excel.CellBorderCollection; + /** + * + * Represents the `fill` property. + * + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.CellPropertiesFill; + /** + * + * Represents the `font` property. + * + * [Api set: ExcelApi 1.9] + */ + font?: Excel.CellPropertiesFont; + /** + * + * Represents the `horizontalAlignment` property. + * + * [Api set: ExcelApi 1.9] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Represents the `indentLevel` property. + * + * [Api set: ExcelApi 1.9] + */ + indentLevel?: number; + /** + * + * Represents the `protection` property. + * + * [Api set: ExcelApi 1.9] + */ + protection?: Excel.CellPropertiesProtection; + /** + * + * Represents the `readingOrder` property. + * + * [Api set: ExcelApi 1.9] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * Represents the `shrinkToFit` property. + * + * [Api set: ExcelApi 1.9] + */ + shrinkToFit?: boolean; + /** + * + * Represents the `textOrientation` property. + * + * [Api set: ExcelApi 1.9] + */ + textOrientation?: number; + /** + * + * Represents the `useStandardHeight` property. + * + * [Api set: ExcelApi 1.9] + */ + useStandardHeight?: boolean; + /** + * + * Represents the `useStandardWidth` property. + * + * [Api set: ExcelApi 1.9] + */ + useStandardWidth?: boolean; + /** + * + * Represents the `verticalAlignment` property. + * + * [Api set: ExcelApi 1.9] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Represents the `wrapText` property. + * + * [Api set: ExcelApi 1.9] + */ + wrapText?: boolean; + } + /** + * + * 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; + interface Session { + } + /** + * 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; + /** + * [Api set: ExcelApi 1.5] + */ + 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. + * + * @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; + function postprocessBindingDescriptor(response: any): any; + function getDataCommonPostprocess(response: any, callArgs: any): any; + /** + * Represents an `AllowEditRange` object found in a worksheet. This object works with worksheet protection properties. + When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + class AllowEditRange 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; + /** + * Specifies the range associated with the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + address: string; + /** + * Specifies if the object is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly isPasswordProtected: boolean; + /** + * Specifies the title of the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. + If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + 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. + * @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.AllowEditRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.AllowEditRange): void; + /** + * Deletes the object from the `AllowEditRangeCollection`. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails the delete operation. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + delete(): void; + /** + * Pauses worksheet protection for the object for the user in the current session. + This method does nothing if worksheet protection isn't enabled or is already paused. + If worksheet protection cannot be paused, this method throws an `UnsupportedOperation` error and fails to pause protection for the object. + If the password is incorrect, then this method throws a `BadPassword` error and fails to pause protection for the object. + If a password is supplied but the object does not require a password, the inputted password will be ignored and the operation will succeed. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param password The password associated with the `AllowEditRange` object. + */ + pauseProtection(password?: string): void; + /** + * Changes the password associated with the object. + Setting the password string as empty ("") or `null` will remove password protection from the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, then this method throws an `AccessDenied` error and the set operation fails. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param password The password associated with the `AllowEditRange` object. + */ + setPassword(password?: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.AllowEditRangeLoadOptions): Excel.AllowEditRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.AllowEditRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.AllowEditRange; + /** + * 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.AllowEditRange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.AllowEditRangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.AllowEditRangeData; + } + /** + * Represents the set of `AllowEditRange` objects found in a worksheet. `AllowEditRange` objects work with worksheet protection properties. + When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + class AllowEditRangeCollection 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.AllowEditRange[]; + /** + * Adds an `AllowEditRange` object to the worksheet. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, then this method throws an `AccessDenied` error and the add operation fails. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param title The title string of the `AllowEditRange` object to be added. + * @param rangeAddress The range address of the `AllowEditRange` object to be added. + * @param options Additional options to be added to the `AllowEditRange` object, such as the password. + */ + add(title: string, rangeAddress: string, options?: Excel.AllowEditRangeOptions): void; + /** + * Returns the number of `AllowEditRange` objects in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the `AllowEditRange` object by its title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param key The title of the `AllowEditRange`. + * @returns The `AllowEditRange` with the title. If there is no `AllowEditRange` with the given title, then an `ItemNotFound` error is thrown. + */ + getItem(key: string): Excel.AllowEditRange; + /** + * Returns an `AllowEditRange` object by its index in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param index The index of the `AllowEditRange` object in the collection. + * @returns The `AllowEditRange` at the given index. + */ + getItemAt(index: number): Excel.AllowEditRange; + /** + * Gets the `AllowEditRange` object by its title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param key The title of the `AllowEditRange`. + * @returns The `AllowEditRange` with the title. If there is no `AllowEditRange` with the given title, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + */ + getItemOrNullObject(key: string): Excel.AllowEditRange; + /** + * Pauses worksheet protection for all `AllowEditRange` objects found in this worksheet that have the given password for the user in the current session. + This method does nothing if worksheet protection isn't enabled or is paused. + If worksheet protection cannot be paused, this method throws an `UnsupportedOperation` error and fails to pause protection for the range. + If the password does not match any `AllowEditRange` objects in the collection, then this method throws a `BadPassword` error and fails to pause protection for any range in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param password The password to pause protection on the `AllowEditRange` objects. + */ + pauseProtection(password: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.AllowEditRangeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.AllowEditRangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.AllowEditRangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.AllowEditRangeCollection; + /** + * 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.AllowEditRangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.AllowEditRangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.AllowEditRangeCollectionData; + } + /** + * The interface used to construct optional fields of the `AllowEditRange` object. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface AllowEditRangeOptions { + /** + * The password associated with the `AllowEditRange`. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + password?: string; + } + /** + * Notifies when a worksheet is moved within a workbook. + + If a worksheet is moved from one position within the workbook to another + via the Excel UI, then this API will trigger an event. Note that if + the position of a worksheet changes as a result of moving a different worksheet, + then this event won't trigger for both position changes. This event only triggers + for the primary worksheet move, and not any worksheet position changes that occur + as a result of that primary move. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + interface WorksheetMovedEventArgs { + /** + * Gets the new position of the worksheet, after the move. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + positionAfter: number; + /** + * Gets the previous position of the worksheet, prior to the move. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + positionBefore: number; + /** + * The source of the event. It can be local or remote (through co-authoring). + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + type: string; + /** + * Gets the ID of the worksheet that was moved. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet whose name has changed. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + interface WorksheetNameChangedEventArgs { + /** + * Gets the new name of the worksheet, after the name change. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + nameAfter: string; + /** + * Gets the previous name of the worksheet, before the name changed. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + nameBefore: string; + /** + * The source of the event. It can be local or remote (through co-authoring). + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + type: string; + /** + * Gets the ID of the worksheet with the new name. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet whose visibility has changed. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + interface WorksheetVisibilityChangedEventArgs { + /** + * The source of the event. It can be local or remote (through co-authoring). + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + type: string; + /** + * Gets the new visibility setting of the worksheet, after the visibility change. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + visibilityAfter: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; + /** + * Gets the previous visibility setting of the worksheet, before the visibility change. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + visibilityBefore: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; + /** + * Gets the ID of the worksheet whose visibility has changed. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + worksheetId: string; + } + /** + * An enum that specifies the query load to destination. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + enum LoadToType { + /** + * Load to connection only. + * @remarks + * [Api set: ExcelApi 1.14] + */ + connectionOnly = "ConnectionOnly", + /** + * Load to a table. + * @remarks + * [Api set: ExcelApi 1.14] + */ + table = "Table", + /** + * Load to PivotTable. + * @remarks + * [Api set: ExcelApi 1.14] + */ + pivotTable = "PivotTable", + /** + * Load to PivotChart. + * @remarks + * [Api set: ExcelApi 1.14] + */ + pivotChart = "PivotChart" + } + /** + * Represents a Power Query query. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + class Query 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 query error message from when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly error: Excel.QueryError | "Unknown" | "None" | "FailedLoadToWorksheet" | "FailedLoadToDataModel" | "FailedDownload" | "FailedToCompleteDownload"; + /** + * Gets the query loaded to object type. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly loadedTo: Excel.LoadToType | "ConnectionOnly" | "Table" | "PivotTable" | "PivotChart"; + /** + * Specifies if the query loaded to the data model. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly loadedToDataModel: boolean; + /** + * Gets the name of the query. + Query names cannot contain periods or quotation marks. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly name: string; + /** + * Gets the date and time when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly refreshDate: Date; + /** + * Gets the number of rows that were loaded when the query was last refreshed. + If last refresh has errors the value will be -1. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly rowsLoadedCount: number; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.QueryLoadOptions): Excel.Query; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Query; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Query; + /** + * 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.Query object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.QueryData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.QueryData; + } + /** + * Represents the collection of queries in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + class QueryCollection 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.Query[]; + /** + * Gets the number of queries in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a query from the collection based on its name. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param key The name of the query case-insensitive. + * @returns The query with the given name. If there is no query by that name, then an error is thrown. + */ + getItem(key: string): Excel.Query; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.QueryCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.QueryCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.QueryCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.QueryCollection; + /** + * 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.QueryCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.QueryCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.QueryCollectionData; + } + /** + * An enum that specifies the query load error message. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + enum QueryError { + /** + * Unknown error. + * @remarks + * [Api set: ExcelApi 1.14] + */ + unknown = "Unknown", + /** + * No error. + * @remarks + * [Api set: ExcelApi 1.14] + */ + none = "None", + /** + * Load to the worksheet failed. + * @remarks + * [Api set: ExcelApi 1.14] + */ + failedLoadToWorksheet = "FailedLoadToWorksheet", + /** + * Load to the data model failed. + * @remarks + * [Api set: ExcelApi 1.14] + */ + failedLoadToDataModel = "FailedLoadToDataModel", + /** + * Download failed. + * @remarks + * [Api set: ExcelApi 1.14] + */ + failedDownload = "FailedDownload", + /** + * Download did not complete. + * @remarks + * [Api set: ExcelApi 1.14] + */ + failedToCompleteDownload = "FailedToCompleteDownload" + } + /** + * Contains information about a linked workbook. + If a workbook has links pointing to data in another workbook, the second workbook is linked to the first workbook. + In this scenario, the second workbook is called the "linked workbook". + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + class LinkedWorkbook 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 original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly id: string; + /** + * Makes a request to break the links pointing to the linked workbook. + Links in formulas are replaced with the latest fetched data. + The current `LinkedWorkbook` object is invalidated and removed from `LinkedWorkbookCollection`. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + breakLinks(): void; + /** + * Makes a request to refresh the data retrieved from the linked workbook. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + refresh(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.LinkedWorkbookLoadOptions): Excel.LinkedWorkbook; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.LinkedWorkbook; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.LinkedWorkbook; + /** + * 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.LinkedWorkbook object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LinkedWorkbookData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.LinkedWorkbookData; + } + /** + * Represents a collection of linked workbook objects. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + class LinkedWorkbookCollection 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.LinkedWorkbook[]; + /** + * Represents the update mode of the workbook links. The mode is same for all of the workbook links present in the workbook. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + workbookLinksRefreshMode: Excel.WorkbookLinksRefreshMode | "Manual" | "Automatic"; + /** + * Breaks all the links to the linked workbooks. Once the links are broken, any formulas referencing workbook links are removed entirely and replaced with the most recently retrieved values. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + breakAllLinks(): void; + /** + * Gets information about a linked workbook by its URL. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param key The URL of the linked workbook. + * @returns The linked workbook with the given URL. + */ + getItem(key: string): Excel.LinkedWorkbook; + /** + * Gets information about a linked workbook by its URL. If the workbook does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param key The URL of the linked workbook. + * @returns The linked workbook with given URL. + */ + getItemOrNullObject(key: string): Excel.LinkedWorkbook; + /** + * Makes a request to refresh all the workbook links. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + refreshAll(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.LinkedWorkbookCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.LinkedWorkbookCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.LinkedWorkbookCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.LinkedWorkbookCollection; + /** + * 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.LinkedWorkbookCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LinkedWorkbookCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.LinkedWorkbookCollectionData; + } + /** + * Represents the refresh mode of the workbook links. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + enum WorkbookLinksRefreshMode { + /** + * The workbook links are updated manually. + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + manual = "Manual", + /** + * The workbook links are updated at a set interval determined by the Excel application. + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + automatic = "Automatic" + } + /** + * Represents the type of change recorded in the task change record. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum DocumentTaskChangeAction { + /** + * Represents an unknown change type. This value will be returned when the version of Excel running doesn't understand the type of the change record that is in the loaded file. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + unknown = "unknown", + /** + * Represents the creation of a new task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + create = "create", + /** + * Represents a user being assigned to a task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assign = "assign", + /** + * Represents a user being unassigned from a task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + unassign = "unassign", + /** + * Represents all users being unassigned from a task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + unassignAll = "unassignAll", + /** + * Represents an update to a task's `startDateTime` or `dueDateTime`. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setSchedule = "setSchedule", + /** + * Represents an update to a task's percentage complete. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setPercentComplete = "setPercentComplete", + /** + * Represents an update to a task's priority. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setPriority = "setPriority", + /** + * Represents the deletion of a task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + remove = "remove", + /** + * Represents the restoration of a task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + restore = "restore", + /** + * Represents a change in the title of a task. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setTitle = "setTitle", + /** + * Represents a previous task action being undone. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + undo = "undo" + } + /** + * Represents a recorded change to the task, to be used as an input parameter. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DocumentTaskChangeProperties { + /** + * Represents the user assigned to the task for an `assign` change action, or the user unassigned from the task for an `unassign` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignee?: Excel.EmailIdentity; + /** + * Represents the identity of the user who made the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + changedBy: Excel.EmailIdentity; + /** + * Represents the ID of the `comment` or `commentReply` to which the task change is anchored. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + commentId?: string; + /** + * Represents the creation date and time of the task change record. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: Date; + /** + * Represents the task's due date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the due date and time. It should be set together with `startDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dueDateTime?: Date; + /** + * The unique GUID of the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id: string; + /** + * Represents the task's completion percentage. It is used for the `setPercentComplete` change action. + This is a value betwen 0 and 100, where 100 represents a completed task.Changing this value to 100 also completes the associated comment.Changing the completion from 100 to a lower value reactivates the associated comment. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: number; + /** + * Represents the task's priority. It is used for the `setPriority` change action. + This is a value between 0 and 10, with 5 being the default priority if not set, and where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: number; + /** + * Represents the task's start date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the start date and time. It should be set together with `dueDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startDateTime?: Date; + /** + * Represents the task's title. It is used for the `setTitle` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: string; + /** + * Represents the action type of the task change record. Some examples of action types are assign, undo, and setPriority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: Excel.DocumentTaskChangeAction | "unknown" | "create" | "assign" | "unassign" | "unassignAll" | "setSchedule" | "setPercentComplete" | "setPriority" | "remove" | "restore" | "setTitle" | "undo"; + /** + * Represents the `DocumentTaskChange.id` property that was undone for the `undo` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + undoChangeId?: string; + } + /** + * Represents a recorded change to the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class DocumentTaskChange 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 user assigned to the task for an `assign` change action, or the user unassigned from the task for an `unassign` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly assignee: Excel.EmailIdentity; + /** + * Represents the identity of the user who made the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly changedBy: Excel.EmailIdentity; + /** + * Represents the ID of the comment or commentReply to which the task change is anchored. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly commentId: string; + /** + * Represents creation date and time of the task change record. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly createdDateTime: Date; + /** + * Represents the task's due date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the due date and time. It should be set together with `startDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly dueDateTime: Date; + /** + * The unique GUID of the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * Represents the task's completion percentage. It is used for the `setPercentComplete` change action. + This is a value betwen 0 and 100, where 100 represents a completed task.Changing this value to 100 also completes the associated comment.Changing the completion from 100 to a lower value reactivates the associated comment. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly percentComplete: number; + /** + * Represents the task's priority. It is used for the `setPriority` change action. + This is a value between 0 and 10, with 5 being the default priority if not set, and where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly priority: number; + /** + * Represents the task's start date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the start date and time. It should be set together with `dueDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly startDateTime: Date; + /** + * Represents the task's title. It is used for `setTitle` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly title: string; + /** + * Represents the action type of the task change record. Some examples of action types are assign, undo, and setPriority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly type: Excel.DocumentTaskChangeAction | "unknown" | "create" | "assign" | "unassign" | "unassignAll" | "setSchedule" | "setPercentComplete" | "setPriority" | "remove" | "restore" | "setTitle" | "undo"; + /** + * Represents the `DocumentTaskChange.id` property that was undone for the `undo` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly undoChangeId: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DocumentTaskChangeLoadOptions): Excel.DocumentTaskChange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DocumentTaskChange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.DocumentTaskChange; + /** + * Create a new instance of Excel.DocumentTaskChange object + */ + static newObject(context: OfficeExtension.ClientRequestContext): Excel.DocumentTaskChange; + /** + * 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.DocumentTaskChange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DocumentTaskChangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.DocumentTaskChangeData; + } + /** + * Represents a collection of change records for a task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class DocumentTaskChangeCollection 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.DocumentTaskChange[]; + /** + * Gets the number of change records in the collection for the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a task change record by using its index in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index The records are stored in chronological order from when the changes were recorded by Excel and are not necessarily ordered by `CreatedDateTime`. The `create` record is always at index 0. + * @returns The change record with the given index. + */ + getItemAt(index: number): Excel.DocumentTaskChange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DocumentTaskChangeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.DocumentTaskChangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DocumentTaskChangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.DocumentTaskChangeCollection; + /** + * 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.DocumentTaskChangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DocumentTaskChangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.DocumentTaskChangeCollectionData; + } + /** + * Represents information about a user's identity. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface Identity { + /** + * Represents the user's display name. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + displayName?: string; + /** + * Represents the user's unique ID. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id: string; + } + /** + * Represents information about a user's identity. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface EmailIdentity { + /** + * Represents the user's display name. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + displayName?: string; + /** + * Represents the user's email. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + email?: string; + /** + * Represents the user's unique ID. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id: string; + } + /** + * Represents information about a task's schedule. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DocumentTaskSchedule { + /** + * Gets the date and time that the task is due. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dueDateTime: Date; + /** + * Gets the date and time that the task should start. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startDateTime: Date; + } + /** + * Represents a task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class DocumentTask 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 change records of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly changes: Excel.DocumentTaskChangeCollection; + /** + * Gets the comment associated with the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly comment: Excel.Comment; + /** + * Returns a collection of assignees of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly assignees: Excel.EmailIdentity[]; + /** + * Gets the most recent user to have completed the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly completedBy: Excel.EmailIdentity; + /** + * Gets the date and time that the task was completed. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly completedDateTime: Date; + /** + * Gets the user who created the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly createdBy: Excel.EmailIdentity; + /** + * Gets the date and time that the task was created. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly createdDateTime: Date; + /** + * Gets the ID of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete: number; + /** + * Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority: number; + /** + * Gets or sets the date and time the task should start and is due. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startAndDueDateTime: Excel.DocumentTaskSchedule; + /** + * Specifies title of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title: string; + /** + * Adds the given user to the list of assignees attached to the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param assignee The identity of the user to add to the assignee list. + */ + assign(assignee: Excel.EmailIdentity): void; + /** + * Removes the given user from the list of assignees attached to the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param assignee The identity of the user to remove from the assignee list. + */ + unassign(assignee: Excel.EmailIdentity): void; + /** + * Removes all users from the list of assignees attached to the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + unassignAll(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DocumentTaskLoadOptions): Excel.DocumentTask; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DocumentTask; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.DocumentTask; + /** + * 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.DocumentTask object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DocumentTaskData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.DocumentTaskData; + } + /** + * Represents a collection of tasks. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class DocumentTaskCollection 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.DocumentTask[]; + /** + * Gets the number of tasks in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a task using its ID. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The ID of the task. + * @returns The task with the given ID. If there is no task with the given ID, then an `ItemNotFound` exception is thrown. + */ + getItem(key: string): Excel.DocumentTask; + /** + * Gets a task by its index in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index The index of the task in the collection. + * @returns The task with the given index. + */ + getItemAt(index: number): Excel.DocumentTask; + /** + * Gets a task using its ID. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The ID of the task. + * @returns The task with the given ID. If there is no task with the given ID, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + */ + getItemOrNullObject(key: string): Excel.DocumentTask; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DocumentTaskCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.DocumentTaskCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DocumentTaskCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.DocumentTaskCollection; + /** + * 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.DocumentTaskCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DocumentTaskCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.DocumentTaskCollectionData; + } + /** + * Represents a command type of `DataConnection`. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + enum DataSourceType { + /** + * The data source type is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.15] + */ + unknown = "Unknown", + /** + * Contains a cube name for an OLAP data source. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + cube = "Cube", + /** + * The data source type is a range in the current workbook. + * @remarks + * [Api set: ExcelApi 1.15] + */ + localRange = "LocalRange", + /** + * The data source type is a table in the current workbook. + * @remarks + * [Api set: ExcelApi 1.15] + */ + localTable = "LocalTable", + /** + * Contains command text that the OLE DB provider (such as Power BI) understands. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + oledbDefault = "OledbDefault" + } + /** + * Enum representing all accepted conditions by which a date filter can be applied. + Used to configure the type of PivotFilter that is applied to the field. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum DateFilterCondition { + /** + * `DateFilterCondition` is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.12] + */ + unknown = "Unknown", + /** + * Equals comparator criterion. + + Required Criteria: {`comparator`}. + Optional Criteria: {`wholeDays`, `exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + equals = "Equals", + /** + * Date is before comparator date. + + Required Criteria: {`comparator`}. + Optional Criteria: {`wholeDays`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + before = "Before", + /** + * Date is before or equal to comparator date. + + Required Criteria: {`comparator`}. + Optional Criteria: {`wholeDays`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + beforeOrEqualTo = "BeforeOrEqualTo", + /** + * Date is after comparator date. + + Required Criteria: {`comparator`}. + Optional Criteria: {`wholeDays`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + after = "After", + /** + * Date is after or equal to comparator date. + + Required Criteria: {`comparator`}. + Optional Criteria: {`wholeDays`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + afterOrEqualTo = "AfterOrEqualTo", + /** + * Between `lowerBound` and `upperBound` dates. + + Required Criteria: {`lowerBound`, `upperBound`}. + Optional Criteria: {`wholeDays`, `exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + between = "Between", + /** + * Date is tomorrow. + * @remarks + * [Api set: ExcelApi 1.12] + */ + tomorrow = "Tomorrow", + /** + * Date is today. + * @remarks + * [Api set: ExcelApi 1.12] + */ + today = "Today", + /** + * Date is yesterday. + * @remarks + * [Api set: ExcelApi 1.12] + */ + yesterday = "Yesterday", + /** + * Date is next week. + * @remarks + * [Api set: ExcelApi 1.12] + */ + nextWeek = "NextWeek", + /** + * Date is this week. + * @remarks + * [Api set: ExcelApi 1.12] + */ + thisWeek = "ThisWeek", + /** + * Date is last week. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lastWeek = "LastWeek", + /** + * Date is next month. + * @remarks + * [Api set: ExcelApi 1.12] + */ + nextMonth = "NextMonth", + /** + * Date is this month. + * @remarks + * [Api set: ExcelApi 1.12] + */ + thisMonth = "ThisMonth", + /** + * Date is last month. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lastMonth = "LastMonth", + /** + * Date is next quarter. + * @remarks + * [Api set: ExcelApi 1.12] + */ + nextQuarter = "NextQuarter", + /** + * Date is this quarter. + * @remarks + * [Api set: ExcelApi 1.12] + */ + thisQuarter = "ThisQuarter", + /** + * Date is last quarter. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lastQuarter = "LastQuarter", + /** + * Date is next year. + * @remarks + * [Api set: ExcelApi 1.12] + */ + nextYear = "NextYear", + /** + * Date is this year. + * @remarks + * [Api set: ExcelApi 1.12] + */ + thisYear = "ThisYear", + /** + * Date is last year. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lastYear = "LastYear", + /** + * Date is in the same year to date. + * @remarks + * [Api set: ExcelApi 1.12] + */ + yearToDate = "YearToDate", + /** + * Date is in Quarter 1. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodQuarter1 = "AllDatesInPeriodQuarter1", + /** + * Date is in Quarter 2. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodQuarter2 = "AllDatesInPeriodQuarter2", + /** + * Date is in Quarter 3. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodQuarter3 = "AllDatesInPeriodQuarter3", + /** + * Date is in Quarter 4. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodQuarter4 = "AllDatesInPeriodQuarter4", + /** + * Date is in January. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodJanuary = "AllDatesInPeriodJanuary", + /** + * Date is in February. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodFebruary = "AllDatesInPeriodFebruary", + /** + * Date is in March. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodMarch = "AllDatesInPeriodMarch", + /** + * Date is in April. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodApril = "AllDatesInPeriodApril", + /** + * Date is in May. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodMay = "AllDatesInPeriodMay", + /** + * Date is in June. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodJune = "AllDatesInPeriodJune", + /** + * Date is in July. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodJuly = "AllDatesInPeriodJuly", + /** + * Date is in August. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodAugust = "AllDatesInPeriodAugust", + /** + * Date is in September. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodSeptember = "AllDatesInPeriodSeptember", + /** + * Date is in October. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodOctober = "AllDatesInPeriodOctober", + /** + * Date is in November. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodNovember = "AllDatesInPeriodNovember", + /** + * Date is in December. + * @remarks + * [Api set: ExcelApi 1.12] + */ + allDatesInPeriodDecember = "AllDatesInPeriodDecember" + } + /** + * Enum representing all accepted conditions by which a label filter can be applied. + Used to configure the type of PivotFilter that is applied to the field. + `PivotFilter.criteria.exclusive` can be set to `true` to invert many of these conditions. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum LabelFilterCondition { + /** + * `LabelFilterCondition` is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.12] + */ + unknown = "Unknown", + /** + * Equals comparator criterion. + + Required Criteria: {`comparator`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + equals = "Equals", + /** + * Label begins with substring criterion. + + Required Criteria: {`substring`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + beginsWith = "BeginsWith", + /** + * Label ends with substring criterion. + + Required Criteria: {`substring`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + endsWith = "EndsWith", + /** + * Label contains substring criterion. + + Required Criteria: {`substring`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + contains = "Contains", + /** + * Greater than comparator criterion. + + Required Criteria: {`comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + greaterThan = "GreaterThan", + /** + * Greater than or equal to comparator criterion. + + Required Criteria: {`comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + greaterThanOrEqualTo = "GreaterThanOrEqualTo", + /** + * Less than comparator criterion. + + Required Criteria: {`comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lessThan = "LessThan", + /** + * Less than or equal to comparator criterion. + + Required Criteria: {`comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lessThanOrEqualTo = "LessThanOrEqualTo", + /** + * Between `lowerBound` and `upperBound` criteria. + + Required Criteria: {`lowerBound`, `upperBound`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + between = "Between" + } + /** + * Configurable template for a date filter to apply to a PivotField. + The `condition` defines what criteria need to be set in order for the filter to operate. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface PivotDateFilter { + /** + * The comparator is the static value to which other values are compared. The type of comparison is defined by the condition. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + comparator?: Excel.FilterDatetime; + /** + * Specifies the condition for the filter, which defines the necessary filtering criteria. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + condition: Excel.DateFilterCondition | "Unknown" | "Equals" | "Before" | "BeforeOrEqualTo" | "After" | "AfterOrEqualTo" | "Between" | "Tomorrow" | "Today" | "Yesterday" | "NextWeek" | "ThisWeek" | "LastWeek" | "NextMonth" | "ThisMonth" | "LastMonth" | "NextQuarter" | "ThisQuarter" | "LastQuarter" | "NextYear" | "ThisYear" | "LastYear" | "YearToDate" | "AllDatesInPeriodQuarter1" | "AllDatesInPeriodQuarter2" | "AllDatesInPeriodQuarter3" | "AllDatesInPeriodQuarter4" | "AllDatesInPeriodJanuary" | "AllDatesInPeriodFebruary" | "AllDatesInPeriodMarch" | "AllDatesInPeriodApril" | "AllDatesInPeriodMay" | "AllDatesInPeriodJune" | "AllDatesInPeriodJuly" | "AllDatesInPeriodAugust" | "AllDatesInPeriodSeptember" | "AllDatesInPeriodOctober" | "AllDatesInPeriodNovember" | "AllDatesInPeriodDecember"; + /** + * If `true`, filter *excludes* items that meet criteria. The default is `false` (filter to include items that meet criteria). + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + exclusive?: boolean; + /** + * The lower-bound of the range for the `between` filter condition. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + lowerBound?: Excel.FilterDatetime; + /** + * The upper-bound of the range for the `between` filter condition. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + upperBound?: Excel.FilterDatetime; + /** + * For `equals`, `before`, `after`, and `between` filter conditions, indicates if comparisons should be made as whole days. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + wholeDays?: boolean; + } + /** + * A simple enum that represents a type of filter for a PivotField. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum PivotFilterType { + /** + * `PivotFilterType` is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.12] + */ + unknown = "Unknown", + /** + * Filters based on the value of a PivotItem with respect to a `DataPivotHierarchy`. + * @remarks + * [Api set: ExcelApi 1.12] + */ + value = "Value", + /** + * Filters specific manually selected PivotItems from the PivotTable. + * @remarks + * [Api set: ExcelApi 1.12] + */ + manual = "Manual", + /** + * Filters PivotItems based on their labels. + Note: A PivotField cannot simultaneously have a label filter and a date filter applied. + * @remarks + * [Api set: ExcelApi 1.12] + */ + label = "Label", + /** + * Filters PivotItems with a date in place of a label. + Note: A PivotField cannot simultaneously have a label filter and a date filter applied. + * @remarks + * [Api set: ExcelApi 1.12] + */ + date = "Date" + } + /** + * An interface representing all PivotFilters currently applied to a given PivotField. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface PivotFilters { + /** + * The PivotField's currently applied date filter. This property is `null` if no value filter is applied. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + dateFilter?: Excel.PivotDateFilter; + /** + * The PivotField's currently applied label filter. This property is `null` if no value filter is applied. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + labelFilter?: Excel.PivotLabelFilter; + /** + * The PivotField's currently applied manual filter. This property is `null` if no value filter is applied. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + manualFilter?: Excel.PivotManualFilter; + /** + * The PivotField's currently applied value filter. This property is `null` if no value filter is applied. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + valueFilter?: Excel.PivotValueFilter; + } + /** + * Configurable template for a label filter to apply to a PivotField. + The `condition` defines what criteria need to be set in order for the filter to operate. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface PivotLabelFilter { + /** + * The comparator is the static value to which other values are compared. The type of comparison is defined by the condition. + Note: A numeric string is treated as a number when being compared against other numeric strings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + comparator?: string; + /** + * Specifies the condition for the filter, which defines the necessary filtering criteria. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + condition: Excel.LabelFilterCondition | "Unknown" | "Equals" | "BeginsWith" | "EndsWith" | "Contains" | "GreaterThan" | "GreaterThanOrEqualTo" | "LessThan" | "LessThanOrEqualTo" | "Between"; + /** + * If `true`, filter *excludes* items that meet criteria. The default is `false` (filter to include items that meet criteria). + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + exclusive?: boolean; + /** + * The lower-bound of the range for the `between` filter condition. + Note: A numeric string is treated as a number when being compared against other numeric strings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + lowerBound?: string; + /** + * The substring used for `beginsWith`, `endsWith`, and `contains` filter conditions. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + substring?: string; + /** + * The upper-bound of the range for the `between` filter condition. + Note: A numeric string is treated as a number when being compared against other numeric strings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + upperBound?: string; + } + /** + * Configurable template for a manual filter to apply to a PivotField. + The `condition` defines what criteria need to be set in order for the filter to operate. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface PivotManualFilter { + /** + * A list of selected items to manually filter. These must be existing and valid items from the chosen field. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + selectedItems?: (string | PivotItem)[]; + } + /** + * Configurable template for a value filter to apply to a PivotField. + The `condition` defines what criteria need to be set in order for the filter to operate. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface PivotValueFilter { + /** + * The comparator is the static value to which other values are compared. The type of comparison is defined by the condition. + For example, if comparator is "50" and condition is "greaterThan", all item values that are not greater than 50 will be removed by the filter. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + comparator?: number; + /** + * Specifies the condition for the filter, which defines the necessary filtering criteria. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + condition: Excel.ValueFilterCondition | "Unknown" | "Equals" | "GreaterThan" | "GreaterThanOrEqualTo" | "LessThan" | "LessThanOrEqualTo" | "Between" | "TopN" | "BottomN"; + /** + * If `true`, filter *excludes* items that meet criteria. The default is `false` (filter to include items that meet criteria). + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + exclusive?: boolean; + /** + * The lower-bound of the range for the `between` filter condition. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + lowerBound?: number; + /** + * Specifies if the filter is for the top/bottom N items, top/bottom N percent, or top/bottom N sum. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + selectionType?: Excel.TopBottomSelectionType | "Items" | "Percent" | "Sum"; + /** + * The "N" threshold number of items, percent, or sum to be filtered for a top/bottom filter condition. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + threshold?: number; + /** + * The upper-bound of the range for the `between` filter condition. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + upperBound?: number; + /** + * Name of the chosen "value" in the field by which to filter. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + value: string; + } + /** + * A simple enum for top/bottom filters to select whether to filter by the top N or bottom N percent, number, or sum of values. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum TopBottomSelectionType { + /** + * Filter the top/bottom N number of items as measured by the chosen value. + * @remarks + * [Api set: ExcelApi 1.12] + */ + items = "Items", + /** + * Filter the top/bottom N percent of items as measured by the chosen value. + * @remarks + * [Api set: ExcelApi 1.12] + */ + percent = "Percent", + /** + * Filter the top/bottom N sum as measured by the chosen value. + * @remarks + * [Api set: ExcelApi 1.12] + */ + sum = "Sum" + } + /** + * Enum representing all accepted conditions by which a value filter can be applied. + Used to configure the type of PivotFilter that is applied to the field. + `PivotFilter.exclusive` can be set to `true` to invert many of these conditions. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum ValueFilterCondition { + /** + * `ValueFilterCondition` is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.12] + */ + unknown = "Unknown", + /** + * Equals comparator criterion. + + Required Criteria: {`value`, `comparator`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + equals = "Equals", + /** + * Greater than comparator criterion. + + Required Criteria: {`value`, `comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + greaterThan = "GreaterThan", + /** + * Greater than or equal to comparator criterion. + + Required Criteria: {`value`, `comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + greaterThanOrEqualTo = "GreaterThanOrEqualTo", + /** + * Less than comparator criterion. + + Required Criteria: {`value`, `comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lessThan = "LessThan", + /** + * Less than or equal to comparator criterion. + + Required Criteria: {`value`, `comparator`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + lessThanOrEqualTo = "LessThanOrEqualTo", + /** + * Between `lowerBound` and `upperBound` criteria. + + Required Criteria: {`value`, `lowerBound`, `upperBound`}. + Optional Criteria: {`exclusive`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + between = "Between", + /** + * In top N (`threshold`) [items, percent, sum] of value category. + + Required Criteria: {`value`, `threshold`, `selectionType`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + topN = "TopN", + /** + * In bottom N (`threshold`) [items, percent, sum] of value category. + + Required Criteria: {`value`, `threshold`, `selectionType`}. + * @remarks + * [Api set: ExcelApi 1.12] + */ + bottomN = "BottomN" + } + /** + * Represents a built-in PivotTable style + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum BuiltInPivotTableStyle { + /** + * None + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + none = "None", + /** + * "Dark 1" (black in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light1 = "Light1", + /** + * "Accent 1" (blue in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light2 = "Light2", + /** + * "Accent 2" (orange in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light3 = "Light3", + /** + * "Accent 3" (gray in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light4 = "Light4", + /** + * "Accent 4" (yellow in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light5 = "Light5", + /** + * "Accent 5" (light blue in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light6 = "Light6", + /** + * "Accent 6" (green in the default "Office" theme) with header borders and footer borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light7 = "Light7", + /** + * "Dark 1" (black in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light8 = "Light8", + /** + * "Accent 1" (blue in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light9 = "Light9", + /** + * "Accent 2" (orange in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light10 = "Light10", + /** + * "Accent 3" (gray in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light11 = "Light11", + /** + * "Accent 4" (yellow in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light12 = "Light12", + /** + * "Accent 5" (light blue in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light13 = "Light13", + /** + * "Accent 6" (green in the default "Office" theme) with header borders, footer borders, first column border, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light14 = "Light14", + /** + * "Dark 1" (black in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light15 = "Light15", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light16 = "Light16", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light17 = "Light17", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light18 = "Light18", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light19 = "Light19", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light20 = "Light20", + /** + * "Accent 6" (green in the default "Office" theme) with filled header and striped bordered rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light21 = "Light21", + /** + * "Dark 1" (black in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light22 = "Light22", + /** + * "Accent 1" (blue in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light23 = "Light23", + /** + * "Accent 2" (orange in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light24 = "Light24", + /** + * "Accent 3" (gray in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light25 = "Light25", + /** + * "Accent 4" (yellow in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light26 = "Light26", + /** + * "Accent 5" (light blue in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light27 = "Light27", + /** + * "Accent 6" (green in the default "Office" theme) with header borders, footer borders, and bordered columns. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light28 = "Light28", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium1 = "Medium1", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium2 = "Medium2", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium3 = "Medium3", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium4 = "Medium4", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium5 = "Medium5", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium6 = "Medium6", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, and footer border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium7 = "Medium7", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium8 = "Medium8", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium9 = "Medium9", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium10 = "Medium10", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium11 = "Medium11", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium12 = "Medium12", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium13 = "Medium13", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, and total row border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium14 = "Medium14", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium15 = "Medium15", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium16 = "Medium16", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium17 = "Medium17", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium18 = "Medium18", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium19 = "Medium19", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium20 = "Medium20", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, filled footer, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium21 = "Medium21", + /** + * "Dark 1" (black in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium22 = "Medium22", + /** + * "Accent 1" (blue in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium23 = "Medium23", + /** + * "Accent 2" (orange in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium24 = "Medium24", + /** + * "Accent 3" (gray in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium25 = "Medium25", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium26 = "Medium26", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium27 = "Medium27", + /** + * "Accent 6" (green in the default "Office" theme) with filled first column, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium28 = "Medium28", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark1 = "Dark1", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark2 = "Dark2", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark3 = "Dark3", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark4 = "Dark4", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark5 = "Dark5", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark6 = "Dark6", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, and shaded body. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark7 = "Dark7", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark8 = "Dark8", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark9 = "Dark9", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark10 = "Dark10", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark11 = "Dark11", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark12 = "Dark12", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark13 = "Dark13", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, and outside border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark14 = "Dark14", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark15 = "Dark15", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark16 = "Dark16", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark17 = "Dark17", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark18 = "Dark18", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark19 = "Dark19", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark20 = "Dark20", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, filled footer, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark21 = "Dark21", + /** + * "Dark 1" (black in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark22 = "Dark22", + /** + * "Accent 1" (blue in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark23 = "Dark23", + /** + * "Accent 2" (orange in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark24 = "Dark24", + /** + * "Accent 3" (gray in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark25 = "Dark25", + /** + * "Accent 4" (yellow in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark26 = "Dark26", + /** + * "Accent 5" (light blue in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark27 = "Dark27", + /** + * "Accent 6" (green in the default "Office" theme) with shaded body, and white borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark28 = "Dark28" + } + /** + * Represents a built-in slicer style. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum BuiltInSlicerStyle { + /** + * "Accent 1" (blue in the default "Office" theme) with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light1 = "Light1", + /** + * "Accent 2" (orange in the default "Office" theme) with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light2 = "Light2", + /** + * "Accent 3" (gray in the default "Office" theme) with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light3 = "Light3", + /** + * "Accent 4" (yellow in the default "Office" theme) with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light4 = "Light4", + /** + * "Accent 5" (light blue in the default "Office" theme) with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light5 = "Light5", + /** + * "Accent 6" (green in the default "Office" theme) with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light6 = "Light6", + /** + * Dark gray with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + other1 = "Other1", + /** + * Medium blue with light shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + other2 = "Other2", + /** + * "Accent 1" (blue in the default "Office" theme) with dark shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark1 = "Dark1", + /** + * "Accent 2" (orange in the default "Office" theme) with dark shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark2 = "Dark2", + /** + * "Accent 3" (gray in the default "Office" theme) with dark shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark3 = "Dark3", + /** + * "Accent 4" (yellow in the default "Office" theme) with dark shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark4 = "Dark4", + /** + * "Accent 5" (light blue in the default "Office" theme) with dark shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark5 = "Dark5", + /** + * "Accent 6" (green in the default "Office" theme) with dark shading. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark6 = "Dark6" + } + /** + * Represents a built-in table style. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum BuiltInTableStyle { + /** + * "Dark 1" (black in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light1 = "Light1", + /** + * "Accent 1" (blue in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light2 = "Light2", + /** + * "Accent 2" (orange in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light3 = "Light3", + /** + * "Accent 3" (gray in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light4 = "Light4", + /** + * "Accent 4" (yellow in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light5 = "Light5", + /** + * "Accent 5" (light blue in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light6 = "Light6", + /** + * "Accent 6" (green in the default "Office" theme) with header borders and bottom border. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light7 = "Light7", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light8 = "Light8", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light9 = "Light9", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light10 = "Light10", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light11 = "Light11", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light12 = "Light12", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light13 = "Light13", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light14 = "Light14", + /** + * "Dark 1" (black in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light15 = "Light15", + /** + * "Accent 1" (blue in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light16 = "Light16", + /** + * "Accent 2" (orange in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light17 = "Light17", + /** + * "Accent 3" (gray in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light18 = "Light18", + /** + * "Accent 4" (yellow in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light19 = "Light19", + /** + * "Accent 5" (light blue in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light20 = "Light20", + /** + * "Accent 6" (green in the default "Office" theme) with cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + light21 = "Light21", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium1 = "Medium1", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium2 = "Medium2", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium3 = "Medium3", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium4 = "Medium4", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium5 = "Medium5", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium6 = "Medium6", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, outside border, and row borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium7 = "Medium7", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium8 = "Medium8", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium9 = "Medium9", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium10 = "Medium10", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium11 = "Medium11", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium12 = "Medium12", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium13 = "Medium13", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, and striped rows. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium14 = "Medium14", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium15 = "Medium15", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium16 = "Medium16", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium17 = "Medium17", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium18 = "Medium18", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium19 = "Medium19", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium20 = "Medium20", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium21 = "Medium21", + /** + * "Dark 1" (black in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium22 = "Medium22", + /** + * "Accent 1" (blue in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium23 = "Medium23", + /** + * "Accent 2" (orange in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium24 = "Medium24", + /** + * "Accent 3" (gray in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium25 = "Medium25", + /** + * "Accent 4" (yellow in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium26 = "Medium26", + /** + * "Accent 5" (light blue in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium27 = "Medium27", + /** + * "Accent 6" (green in the default "Office" theme) with striped rows, and cell borders. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + medium28 = "Medium28", + /** + * "Dark 1" (black in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark1 = "Dark1", + /** + * "Accent 1" (blue in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark2 = "Dark2", + /** + * "Accent 2" (orange in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark3 = "Dark3", + /** + * "Accent 3" (gray in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark4 = "Dark4", + /** + * "Accent 4" (yellow in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark5 = "Dark5", + /** + * "Accent 5" (light blue in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark6 = "Dark6", + /** + * "Accent 6" (green in the default "Office" theme) with filled header, striped rows, and dark. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark7 = "Dark7", + /** + * Black with filled header, striped rows, light + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark8 = "Dark8", + /** + * Orange with filled header, striped rows, light + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark9 = "Dark9", + /** + * Yellow with filled header, striped rows, light + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark10 = "Dark10", + /** + * Green with filled header, striped rows, light + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dark11 = "Dark11" + } + /** + * Represents the dimensions when getting values from chart series. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum ChartSeriesDimension { + /** + * The chart series axis for the categories. + * @remarks + * [Api set: ExcelApi 1.12] + */ + categories = "Categories", + /** + * The chart series axis for the values. + * @remarks + * [Api set: ExcelApi 1.12] + */ + values = "Values", + /** + * The chart series axis for the x-axis values in scatter and bubble charts. + * @remarks + * [Api set: ExcelApi 1.12] + */ + xvalues = "XValues", + /** + * The chart series axis for the y-axis values in scatter and bubble charts. + * @remarks + * [Api set: ExcelApi 1.12] + */ + yvalues = "YValues", + /** + * The chart series axis for the bubble sizes in bubble charts. + * @remarks + * [Api set: ExcelApi 1.12] + */ + bubbleSizes = "BubbleSizes" + } + /** + * Provides information about the selection that raised the selection changed event. + + **Note**: If multiple, discontiguous cells are selected, `Binding.onSelectionChanged` only reports row and column information for one selection. Use `Worksheet.onSelectionChanged` for multiple selected ranges. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface BindingSelectionChangedEventArgs { + /** + * Gets a temporary `Binding` object that contains the ID of the `Binding` object that raised the event. Use that ID with `BindingCollection.getItem(id)` to get the binding. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + binding: Excel.Binding; + /** + * Gets the number of columns selected. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnCount: number; + /** + * Gets the number of rows selected. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowCount: number; + /** + * Gets the index of the first column of the selection (zero-based). + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + startColumn: number; + /** + * Gets the index of the first row of the selection (zero-based). + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + startRow: number; + } + /** + * Provides information about the binding that raised the data changed event. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface BindingDataChangedEventArgs { + /** + * Gets a temporary `Binding` object that contains the ID of the `Binding` object that raised the event. Use that ID with `BindingCollection.getItem(id)` to get the binding. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + binding: Excel.Binding; + } + /** + * Provides information about the document that raised the selection changed event. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface SelectionChangedEventArgs { + /** + * Gets the workbook object that raised the selection changed event. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + workbook: Excel.Workbook; + } + /** + * Provides information about the setting that raised the settings changed event + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + interface SettingsChangedEventArgs { + /** + * Gets the `Setting` object that represents the binding that raised the settings changed event + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + settings: Excel.SettingCollection; + } + /** + * Provides information about the workbook that raised the activated event. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + interface WorkbookActivatedEventArgs { + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + type: "WorkbookActivated"; + } + /** + * Provides information about the workbook's `onAutoSaveSettingChanged` event. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface WorkbookAutoSaveSettingChangedEventArgs { + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "WorkbookAutoSaveSettingChanged"; + } + /** + * Represents the direction that existing or remaining cells in a worksheet will shift when cells are inserted into or deleted from a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + interface ChangeDirectionState { + /** + * Represents the direction (such as up or to the left) that the remaining cells will shift when a cell or cells are deleted. + Note:`insertShiftDirection` and `deleteShiftDirection` are exclusive and both enums can't have a value at the same time. If one has a value, then the other will return `undefined`. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + deleteShiftDirection: Excel.DeleteShiftDirection | "Up" | "Left"; + /** + * Represents the direction (such as down or to the right) that the existing cells will shift when a new cell or cells are inserted. + Note:`insertShiftDirection` and `deleteShiftDirection` are exclusive and both enums can't have a value at the same time. If one has a value, then the other will return `undefined`. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + insertShiftDirection: Excel.InsertShiftDirection | "Down" | "Right"; + } + /** + * Provides information about the details of a `WorksheetChangedEvent` or `TableChangedEvent`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChangedEventDetail { + /** + * Represents the value after the change. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + valueAfter: any; + /** + * Represents the type of value after the change. + Unlike `valueAfter`, `valueAsJsonAfter` can represent all cell values, such as formatted number, web image, and entity data types. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJsonAfter: CellValue; + /** + * Represents the type of value before the change. + Unlike `valueBefore`, `valueAsJsonBefore` can represent all cell values, such as formatted number, web image, and entity data types. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJsonBefore: CellValue; + /** + * Represents the value before the change. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + valueBefore: any; + /** + * Represents the type of value after the change. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + valueTypeAfter: Excel.RangeValueType | "Unknown" | "Empty" | "String" | "Integer" | "Double" | "Boolean" | "Error" | "RichValue"; + /** + * Represents the type of value before the change. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + valueTypeBefore: Excel.RangeValueType | "Unknown" | "Empty" | "String" | "Integer" | "Double" | "Boolean" | "Error" | "RichValue"; + } + /** + * Provides information about the worksheet that raised the changed event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorksheetChangedEventArgs { + /** + * Gets the range address that represents the changed area of a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * Gets the change type that represents how the changed event is triggered. See `Excel.DataChangeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + changeType: Excel.DataChangeType | "Unknown" | "RangeEdited" | "RowInserted" | "RowDeleted" | "ColumnInserted" | "ColumnDeleted" | "CellInserted" | "CellDeleted"; + /** + * Represents the information about the change detail. This property can be retrieved when the changed event is triggered on a single cell. If the changed event is triggered on multiple cells, this property cannot be retrieved. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + details: Excel.ChangedEventDetail; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetChanged"; + /** + * Gets the ID of the worksheet in which the data changed. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + /** + * Represents a change to the direction that the cells in a worksheet will shift when a cell or cells are deleted or inserted. This includes the following two scenarios. + 1. The direction (such as down or to the right) that existing cells will shift when a new cell or cells are inserted into a worksheet. + 2. The direction (such as up or to the left) that the remaining cells will shift when a cell or cells are deleted from a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + changeDirectionState: Excel.ChangeDirectionState; + /** + * Represents the trigger source of the event. For example, identifies whether this local add-in triggers the event. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + triggerSource: Excel.EventTriggerSource | "Unknown" | "ThisLocalAddin"; + /** + * + * 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 worksheet format change event. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface WorksheetFormatChangedEventArgs { + /** + * Gets the range address that represents the changed area of a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + address: string; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "WorksheetFormatChanged"; + /** + * Gets the ID of the worksheet in which the data changed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheetId: string; + /** + * + * Gets the range that represents the changed area of a specific worksheet. + * + * [Api set: ExcelApi 1.9] + */ + 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.9] + */ + getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range; + } + /** + * Provides information about the worksheet's row hidden change event. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + interface WorksheetRowHiddenChangedEventArgs { + /** + * Gets the range address that represents the changed area of a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + address: string; + /** + * Gets the type of change that represents how the event was triggered. See `Excel.RowHiddenChangeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + changeType: Excel.RowHiddenChangeType | "Unhidden" | "Hidden"; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + type: "WorksheetRowHiddenChanged"; + /** + * Gets the ID of the worksheet in which the data changed. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + worksheetId: string; + } + /** + * Provides information about the table that raised the changed event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface TableChangedEventArgs { + /** + * Gets the address that represents the changed area of a table on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * Gets the change type that represents how the changed event is triggered. See `Excel.DataChangeType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the ID of the table in which the data changed. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "TableChanged"; + /** + * Gets the ID of the worksheet in which the data changed. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + /** + * Gets the information about the change detail. This property can be retrieved when the changed event is triggered on a single cell. If the changed event is triggered on multiple cells, this property cannot be retrieved. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + details: Excel.ChangedEventDetail; + /** + * + * 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 and formulas that raised the formula changed event. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + interface WorksheetFormulaChangedEventArgs { + /** + * Gets an array of `FormulaChangedEventDetail` objects, which contain the details about the all of the changed formulas. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + formulaDetails: Excel.FormulaChangedEventDetail[]; + /** + * The source of the event. It can be local or remote (through co-authoring). + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + type: "WorksheetFormulaChanged"; + /** + * Gets the ID of the worksheet in which the formula changed. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + worksheetId: string; + } + /** + * Provides information about a changed formula during a formula changed event. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + interface FormulaChangedEventDetail { + /** + * The address of the cell that contains the changed formula. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + cellAddress: string; + /** + * Represents the previous formula, before it was changed. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + previousFormula: string; + } + /** + * Provides information about the worksheet that raised the protection status changed event, which fires when the protection status is updated in a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + interface WorksheetProtectionChangedEventArgs { + /** + * Specifies if any of the `AllowEditRange` objects have changed. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + allowEditRangesChanged: boolean; + /** + * Gets the current protection status of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + isProtected: boolean; + /** + * Specifies if the `WorksheetProtectionOptions` have changed. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + protectionOptionsChanged: boolean; + /** + * Specifies if the worksheet password has changed. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + sheetPasswordChanged: boolean; + /** + * The source of the event. It can be local or remote (through co-authoring). + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + type: "WorksheetProtectionChanged"; + /** + * Gets the ID of the worksheet in which the protection status is changed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + worksheetId: string; + } + /** + * Provides information about the table that raised the filter applied event. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface TableFilteredEventArgs { + /** + * Gets the ID of the table in which the filter is applied. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "TableFiltered"; + /** + * Gets the ID of the worksheet which contains the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the filter applied event. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface WorksheetFilteredEventArgs { + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "WorksheetFiltered"; + /** + * Gets the ID of the worksheet in which the filter is applied. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the activated event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorksheetActivatedEventArgs { + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetActivated"; + /** + * Gets the ID of the worksheet that is activated. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the deactivated event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorksheetDeactivatedEventArgs { + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetDeactivated"; + /** + * Gets the ID of the worksheet that is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * Provides information about the row-sorted event and its related worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface WorksheetRowSortedEventArgs { + /** + * Gets the range address that represents the sorted areas of a specific worksheet. Only rows changed as a result of the sort operation are returned. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + address: string; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + type: "WorksheetRowSorted"; + /** + * Gets the ID of the worksheet where the sorting happened. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheetId: string; + } + /** + * Provides information about the column-sorted event and its related worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface WorksheetColumnSortedEventArgs { + /** + * Gets the range address that represents the sorted areas of a specific worksheet. Only columns changed as a result of the sort operation are returned. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + address: string; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + type: "WorksheetColumnSorted"; + /** + * Gets the ID of the worksheet where the sorting happened. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the selection changed event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorksheetSelectionChangedEventArgs { + /** + * Gets the range address that represents the selected area of a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetSelectionChanged"; + /** + * Gets the ID of the worksheet in which the selection changed. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * Provides information about the left-clicked/tapped event and its related worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface WorksheetSingleClickedEventArgs { + /** + * Gets the address that represents the cell which was left-clicked/tapped for a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + address: string; + /** + * The distance, in points, from the left-clicked/tapped point to the left (or right for right-to-left languages) gridline edge of the left-clicked/tapped cell. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + offsetX: number; + /** + * The distance, in points, from the left-clicked/tapped point to the top gridline edge of the left-clicked/tapped cell. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + offsetY: number; + /** + * Gets the type of the event. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + type: "WorksheetSingleClicked"; + /** + * Gets the ID of the worksheet in which the cell was left-clicked/tapped. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheetId: string; + } + /** + * Provides information about the table that raised the selection changed event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface TableSelectionChangedEventArgs { + /** + * Gets the range address that represents the selected area of the table on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * Specifies if the selection is inside a table. `IsInsideTable` must be set to `true` for the address to be useful. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isInsideTable: boolean; + /** + * Gets the ID of the table in which the selection changed. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "TableSelectionChanged"; + /** + * Gets the ID of the worksheet in which the selection changed. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the added event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorksheetAddedEventArgs { + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetAdded"; + /** + * Gets the ID of the worksheet that is added to the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the deleted event. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorksheetDeletedEventArgs { + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetDeleted"; + /** + * Gets the ID of the worksheet that is deleted from the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * Provides information about the chart that raised the added event. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartAddedEventArgs { + /** + * Gets the ID of the chart that is added to the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + chartId: string; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + type: "ChartAdded"; + /** + * Gets the ID of the worksheet in which the chart is added. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * Provides information about the chart that raised the activated event. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartActivatedEventArgs { + /** + * Gets the ID of the chart that is activated. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + chartId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + type: "ChartActivated"; + /** + * Gets the ID of the worksheet in which the chart is activated. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * Provides information about the chart that raised the deactivated event. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartDeactivatedEventArgs { + /** + * Gets the ID of the chart that is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + chartId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + type: "ChartDeactivated"; + /** + * Gets the ID of the worksheet in which the chart is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * Provides information about the chart that raised the deleted event. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartDeletedEventArgs { + /** + * Gets the ID of the chart that is deleted from the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + chartId: string; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + type: "ChartDeleted"; + /** + * Gets the ID of the worksheet in which the chart is deleted. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * Provides information about the worksheet that raised the calculated event. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface WorksheetCalculatedEventArgs { + /** + * The address of the range that completed calculation. + If multiple ranges completed calculation, the string is a comma-separated list of those range addresses. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + address: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + type: "WorksheetCalculated"; + /** + * Gets the ID of the worksheet in which the calculation occurred. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * Provides information about the table that raised the added event. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface TableAddedEventArgs { + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the ID of the table that is added. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tableId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "TableAdded"; + /** + * Gets the ID of the worksheet in which the table is added. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheetId: string; + } + /** + * Provides information about the table that raised the deleted event. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface TableDeletedEventArgs { + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the ID of the table that is deleted. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tableId: string; + /** + * Gets the name of the table that is deleted. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tableName: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "TableDeleted"; + /** + * Gets the ID of the worksheet in which the table is deleted. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheetId: string; + } + /** + * Provides information about the comments that raised the comment added event. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface CommentAddedEventArgs { + /** + * Gets the `CommentDetail` array that contains the comment ID and IDs of its related replies. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentDetails: Excel.CommentDetail[]; + /** + * Specifies the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + type: "CommentAdded"; + /** + * Gets the ID of the worksheet in which the event happened. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + worksheetId: string; + } + /** + * Provides information about the comments that raised the comment deleted event. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface CommentDeletedEventArgs { + /** + * Gets the `CommentDetail` array that contains the comment ID and IDs of its related replies. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentDetails: Excel.CommentDetail[]; + /** + * Specifies the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + type: "CommentDeleted"; + /** + * Gets the ID of the worksheet in which the event happened. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + worksheetId: string; + } + /** + * Occurs when existing comments are changed. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface CommentChangedEventArgs { + /** + * Gets the change type that represents how the changed event is triggered. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + changeType: Excel.CommentChangeType | "CommentEdited" | "CommentResolved" | "CommentReopened" | "ReplyAdded" | "ReplyDeleted" | "ReplyEdited"; + /** + * Get the `CommentDetail` array which contains the comment ID and IDs of its related replies. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentDetails: Excel.CommentDetail[]; + /** + * Specifies the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + type: "CommentChanged"; + /** + * Gets the ID of the worksheet in which the event happened. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + worksheetId: string; + } + /** + * A structure for the comment ID and IDs of its related replies. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface CommentDetail { + /** + * Represents the IDs of the related replies that belong to the comment. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + replyIds: string[]; + /** + * Represents the ID of the comment. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentId: string; + } + /** + * Provides information about the shape that raised the activated event. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeActivatedEventArgs { + /** + * Gets the ID of the activated shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shapeId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "ShapeActivated"; + /** + * Gets the ID of the worksheet in which the shape is activated. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheetId: string; + } + /** + * Provides information about the shape that raised the deactivated event. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeDeactivatedEventArgs { + /** + * Gets the ID of the shape deactivated shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shapeId: string; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: "ShapeDeactivated"; + /** + * Gets the ID of the worksheet in which the shape is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheetId: string; + } + /** + * Represents the Excel Runtime class. + * + * @remarks + * [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; + /** + * Toggle JavaScript events in the current task pane or content add-in. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RuntimeLoadOptions): Excel.Runtime; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Runtime; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the Excel application that manages the workbook. + * + * @remarks + * [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; + /** + * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly cultureInfo: Excel.CultureInfo; + /** + * Returns the iterative calculation settings. + In Excel on Windows and Mac, the settings will apply to the Excel Application. + In Excel on the web and other platforms, the settings will apply to the active workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly iterativeCalculation: Excel.IterativeCalculation; + /** + * Returns the Excel calculation engine version used for the last full recalculation. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + /** + * Returns the calculation state of the application. See `Excel.CalculationState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly calculationState: Excel.CalculationState | "Done" | "Calculating" | "Pending"; + /** + * Gets the string used as the decimal separator for numeric values. This is based on the local Excel settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly decimalSeparator: string; + /** + * Specifies whether the "Format Stale values" button under Calculation Options is turned on or off. + The stale formulas are rendered with stale formatting if the button is turned on. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + formatStaleValues: boolean; + /** + * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on the local Excel settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly thousandsSeparator: string; + /** + * Specifies if the system separators of Excel are enabled. + System separators include the decimal separator and thousands separator. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly useSystemSeparators: 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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + suspendApiCalculationUntilNextSync(): void; + /** + * Suspends screen updating until the next `context.sync()` is called. + + **Note**: Don't call `suspendScreenUpdatingUntilNextSync` repeatedly (such as in a loop). Repeated calls will cause the Excel window to flicker. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + suspendScreenUpdatingUntilNextSync(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ApplicationLoadOptions): Excel.Application; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Application; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enabled: boolean; + /** + * Specifies the maximum amount of change between each iteration as Excel resolves circular references. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxChange: number; + /** + * Specifies the maximum number of iterations that Excel can use to resolve a circular reference. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.IterativeCalculationLoadOptions): Excel.IterativeCalculation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.IterativeCalculation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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, and ranges. + To learn more about the workbook object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-workbooks | Work with workbooks using the Excel JavaScript API}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly application: Excel.Application; + /** + * Represents a collection of bindings that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly bindings: Excel.BindingCollection; + /** + * Represents a collection of comments associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly comments: Excel.CommentCollection; + /** + * Represents the collection of custom XML parts contained by this workbook. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + readonly customXmlParts: Excel.CustomXmlPartCollection; + /** + * Represents all data connections in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly dataConnections: Excel.DataConnectionCollection; + /** + * Represents a collection of worksheet functions that can be used for computation. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly functions: Excel.Functions; + /** + * Returns a collection of linked data types that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly linkedDataTypes: Excel.LinkedDataTypeCollection; + /** + * Returns a collection of linked workbooks. In formulas, the workbook links can be used to reference data (cell values and names) outside of the current workbook. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly linkedWorkbooks: Excel.LinkedWorkbookCollection; + /** + * Represents a collection of workbook-scoped named items (named ranges and constants). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly names: Excel.NamedItemCollection; + /** + * Represents a collection of PivotTableStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly pivotTableStyles: Excel.PivotTableStyleCollection; + /** + * Represents a collection of PivotTables associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly pivotTables: Excel.PivotTableCollection; + /** + * Gets the workbook properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly properties: Excel.DocumentProperties; + /** + * Returns the protection object for a workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly protection: Excel.WorkbookProtection; + /** + * Returns a collection of Power Query queries that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly queries: Excel.QueryCollection; + /** + * Represents a collection of settings associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + readonly settings: Excel.SettingCollection; + /** + * Represents a collection of SlicerStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly slicerStyles: Excel.SlicerStyleCollection; + /** + * Represents a collection of slicers associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly slicers: Excel.SlicerCollection; + /** + * Represents a collection of styles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly styles: Excel.StyleCollection; + /** + * Represents a collection of TableStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly tableStyles: Excel.TableStyleCollection; + /** + * Represents a collection of tables associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly tables: Excel.TableCollection; + /** + * Returns a collection of tasks that are present in the workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly tasks: Excel.DocumentTaskCollection; + /** + * Represents a collection of TimelineStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly timelineStyles: Excel.TimelineStyleCollection; + /** + * Represents a collection of worksheets associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly worksheets: Excel.WorksheetCollection; + /** + * Specifies if the workbook is in AutoSave mode. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly autoSave: boolean; + /** + * Returns a number about the version of Excel Calculation Engine. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartDataPointTrack: boolean; + /** + * Specifies if changes have been made since the workbook 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isDirty: boolean; + /** + * Gets the workbook name. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly name: string; + /** + * Specifies if the workbook has ever been saved locally or online. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly previouslySaved: boolean; + /** + * Returns `true` if the workbook is open in read-only mode. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly readOnly: boolean; + /** + * Specifies whether the PivotTable's field list pane is shown at the workbook level. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showPivotFieldList: boolean; + /** + * True if the workbook uses the 1904 date system. + * + * @remarks + * [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`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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; + /** + * Close current workbook. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param closeBehavior workbook close behavior. + */ + close(closeBehavior?: Excel.CloseBehavior): void; + /** + * Close current workbook. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param closeBehavior workbook close behavior. + */ + close(closeBehavior?: "Save" | "SkipSave"): void; + /** + * Gets the currently active cell from the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getActiveCell(): Excel.Range; + /** + * Gets the currently active chart in the workbook. If there is no active chart, an `ItemNotFound` exception is thrown. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getActiveChart(): Excel.Chart; + /** + * Gets the currently active chart in the workbook. If there is no active chart, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getActiveChartOrNullObject(): Excel.Chart; + /** + * Gets the currently active slicer in the workbook. If there is no active slicer, an `ItemNotFound` exception is thrown. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getActiveSlicer(): Excel.Slicer; + /** + * Gets the currently active slicer in the workbook. If there is no active slicer, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getActiveSlicerOrNullObject(): Excel.Slicer; + /** + * Returns `true` if the workbook is being edited by multiple users (through 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getIsActiveCollabSession(): OfficeExtension.ClientResult; + /** + * Returns a `LinkedEntityCellValue` based on the provided `LinkedEntityId`. + * + * @remarks + * [Api set: ExcelApi 1.16] + * + * @param linkedEntityCellValueId An identifier that specifies a specific LinkedEntityCellValue. + */ + getLinkedEntityCellValue(linkedEntityCellValueId: LinkedEntityId): OfficeExtension.ClientResult; + /** + * Gets the currently selected single range from the workbook. If there are multiple ranges selected, this method will throw an error. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getSelectedRanges(): Excel.RangeAreas; + /** + * Inserts the specified worksheets from a source workbook into the current workbook. + + **Note**: This API is currently only supported for Office on Windows, Mac, and the web. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param base64File Required. The base64-encoded string representing the source workbook file. + * @param options Optional. The options that define which worksheets to insert and where in the workbook the new worksheets will be inserted. By default, all the worksheets from the source workbook are inserted at the end of the current workbook. + * @returns An array of IDs corresponding to each newly inserted worksheet. + */ + insertWorksheetsFromBase64(base64File: string, options?: Excel.InsertWorksheetOptions): OfficeExtension.ClientResult; + /** + * Save current workbook. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param saveBehavior Workbook save behavior. + */ + save(saveBehavior?: Excel.SaveBehavior): void; + /** + * Save current workbook. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorkbookLoadOptions): Excel.Workbook; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Workbook; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Workbook; + /** + * Occurs when the workbook is activated. Note: This event will not fire when the workbook is opened. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * Occurs when the AutoSave setting is changed on the workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onAutoSaveSettingChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the selection in the document is changed. + * + * @remarks + * [Api set: ExcelApi 1.2] + * + * @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; + } + /** + * Represents the protection of a workbook object. + * + * @remarks + * [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; + /** + * Specifies if the workbook is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly protected: boolean; + /** + * Protects a workbook. Fails if the workbook has been protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param password Workbook protection password. + */ + protect(password?: string): void; + /** + * Unprotects a workbook. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorkbookProtectionLoadOptions): Excel.WorkbookProtection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorkbookProtection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * The `WorkbookCreated` object is the top level object created by `Application.CreateWorkbook`. A `WorkbookCreated` object is a special Workbook object. + * + * @remarks + * [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. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorkbookCreated; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * An Excel worksheet is a grid of cells. It can contain data, tables, charts, etc. + To learn more about the worksheet object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-worksheets | Work with worksheets using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly autoFilter: Excel.AutoFilter; + /** + * Returns a collection of charts that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly charts: Excel.ChartCollection; + /** + * Returns a collection of all the Comments objects on the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly comments: Excel.CommentCollection; + /** + * Gets a collection of worksheet-level custom properties. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly customProperties: Excel.WorksheetCustomPropertyCollection; + /** + * Gets an object that can be used to manipulate frozen panes on the worksheet. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly horizontalPageBreaks: Excel.PageBreakCollection; + /** + * Returns a collection of sheet views that are present in the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly namedSheetViews: Excel.NamedSheetViewCollection; + /** + * Collection of names scoped to the current worksheet. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + readonly names: Excel.NamedItemCollection; + /** + * Gets the `PageLayout` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly pageLayout: Excel.PageLayout; + /** + * Collection of PivotTables that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly pivotTables: Excel.PivotTableCollection; + /** + * Returns the sheet protection object for a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly protection: Excel.WorksheetProtection; + /** + * Returns the collection of all the Shape objects on the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly shapes: Excel.ShapeCollection; + /** + * Returns a collection of slicers that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly slicers: Excel.SlicerCollection; + /** + * Collection of tables that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly tables: Excel.TableCollection; + /** + * Returns a collection of tasks that are present in the worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly tasks: Excel.DocumentTaskCollection; + /** + * Gets the vertical page break collection for the worksheet. This collection only contains manual page breaks. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly verticalPageBreaks: Excel.PageBreakCollection; + /** + * Determines if Excel should recalculate the worksheet when necessary. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly id: string; + /** + * The display name of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * The zero-based position of the worksheet within the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position: number; + /** + * Specifies if gridlines are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showGridlines: boolean; + /** + * Specifies if headings are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showHeadings: boolean; + /** + * Returns the standard (default) height of all the rows in the worksheet, in points. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly standardHeight: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardWidth: number; + /** + * The tab color of the worksheet. + 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 #RRGGBB (e.g., "FFA500"). + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tabColor: string; + /** + * Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly tabId: number; + /** + * The visibility of the worksheet. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + activate(): void; + /** + * Calculates all cells on a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.6] + * + * @param markAllDirty True, to mark all as dirty. + */ + calculate(markAllDirty: boolean): void; + /** + * Copies a worksheet and places it at the specified position. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param positionType The location in the workbook to place the newly created worksheet. The default value is "None", which inserts the worksheet at the beginning of the worksheet. + * @param relativeTo The existing worksheet which determines the newly created worksheet's position. This is only needed if `positionType` is "Before" or "After". + * @returns The newly created worksheet. + */ + copy(positionType?: Excel.WorksheetPositionType, relativeTo?: Excel.Worksheet): Excel.Worksheet; + /** + * Copies a worksheet and places it at the specified position. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param positionType The location in the workbook to place the newly created worksheet. The default value is "None", which inserts the worksheet at the beginning of the worksheet. + * @param relativeTo The existing worksheet which determines the newly created worksheet's position. This is only needed if `positionType` is "Before" or "After". + * @returns The newly created worksheet. + */ + copy(positionType?: "None" | "Before" | "After" | "Beginning" | "End", relativeTo?: Excel.Worksheet): Excel.Worksheet; + /** + * Deletes the worksheet from the workbook. Note that if the worksheet's visibility is set to "VeryHidden", the delete operation will fail with an `InvalidOperation` exception. You should first change its visibility to hidden or visible before deleting it. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param text The string to find. + * @param criteria Additional search criteria, including whether the search needs to match the entire cell or be case-sensitive. + * @returns A `RangeAreas` 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param text The string to find. + * @param criteria Additional search criteria, including whether the search needs to match the entire cell or be case-sensitive. + * @returns A `RangeAreas` object, comprising one or more rectangular ranges, that matches the search criteria. If there are no matches, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + */ + 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. + * + * @remarks + * [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. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Gets the `RangeAreas` object, representing one or more blocks of rectangular ranges, specified by the address or name. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param address Optional. A string containing the comma-separated or semicolon-separated addresses or names of the individual ranges. For example, "A1:B2, A5:B5" or "A1:B2; A5:B5". If not specified, a `RangeAreas` 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). + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.4] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param text String to find. + * @param replacement The string that replaces the original string. + * @param criteria Additional replacement criteria. + * @returns The number of replacements performed. + */ + replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria): OfficeExtension.ClientResult; + /** + * Shows row or column groups by their outline levels. + Outlines groups and summarizes a list of data in the worksheet. + The `rowLevels` and `columnLevels` parameters specify how many levels of the outline will be displayed. + The acceptable argument range is between 0 and 8. + A value of 0 does not change the current display. A value greater than the current number of levels displays all the levels. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param rowLevels The number of row levels of an outline to display. + * @param columnLevels The number of column levels of an outline to display. + */ + showOutlineLevels(rowLevels: number, columnLevels: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorksheetLoadOptions): Excel.Worksheet; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Worksheet; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Worksheet; + /** + * Occurs when the worksheet is activated. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet is calculated. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onCalculated: OfficeExtension.EventHandlers; + /** + * Occurs when data changes in a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * Occurs when one or more columns have been sorted. This happens as the result of a left to right sort operation. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onColumnSorted: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * Occurs when a filter is applied on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFiltered: OfficeExtension.EventHandlers; + /** + * Occurs when format changed on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onFormatChanged: OfficeExtension.EventHandlers; + /** + * Occurs when one or more formulas are changed in this worksheet. This event is for when the formula itself changes, not the data value resulting from the formula's calculation. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @eventproperty + */ + readonly onFormulaChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet name is changed. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @eventproperty + */ + readonly onNameChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet protection state is changed. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @eventproperty + */ + readonly onProtectionChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the hidden state of one or more rows has changed on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @eventproperty + */ + readonly onRowHiddenChanged: OfficeExtension.EventHandlers; + /** + * Occurs when one or more rows have been sorted. This happens as the result of a top-to-bottom sort operation. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onRowSorted: OfficeExtension.EventHandlers; + /** + * Occurs when the selection changes on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Occurs when a left-clicked/tapped action happens in the worksheet. This event will not be fired when clicking in the following cases: + + - The user drags the mouse for multi-selection. + + - The user selects a cell in the mode when cell arguments are selected for formula references. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onSingleClicked: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet visibility is changed. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @eventproperty + */ + readonly onVisibilityChanged: 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; + } + /** + * Represents a collection of worksheet objects that are part of the workbook. + * + * @remarks + * [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[]; + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param name Optional. The name of the worksheet to be added. If specified, the name should be unique. 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. + + **Note**: This API is currently only supported for Office on Windows and Mac. And it has been deprecated, please use `Workbook.insertWorksheetFromBase64` instead. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param base64File Required. The base64-encoded string representing the source workbook file. + * @param sheetNamesToInsert Optional. The names of individual worksheets to insert. By default, all the worksheets from the source workbook are inserted. + * @param positionType Optional. Where in the current workbook the new worksheets will be inserted. See `Excel.WorksheetPositionType` for details. Default is "Start". + * @param relativeTo Optional. The worksheet in the current workbook that is referenced for the `positionType` parameter. Default is `null` and, based on `positionType`, it will insert worksheets at the start or end of the current workbook. + * @returns An array of IDs corresponding to each newly 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. + + **Note**: This API is currently only supported for Office on Windows and Mac. And it has been deprecated, please use `Workbook.insertWorksheetFromBase64` instead. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param base64File Required. The base64-encoded string representing the source workbook file. + * @param sheetNamesToInsert Optional. The names of individual worksheets to insert. By default, all the worksheets from the source workbook are inserted. + * @param positionType Optional. Where in the current workbook the new worksheets will be inserted. See `Excel.WorksheetPositionType` for details. Default is "Start". + * @param relativeTo Optional. The worksheet in the current workbook that is referenced for the `positionType` parameter. Default is `null` and, based on `positionType`, it will insert worksheets at the start or end of the current workbook. + * @returns An array of IDs corresponding to each newly 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getActiveWorksheet(): Excel.Worksheet; + /** + * Gets the number of worksheets in the collection. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorksheetCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.WorksheetCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorksheetCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.WorksheetCollection; + /** + * Occurs when any worksheet in the workbook is activated. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * Occurs when a new worksheet is added to the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onAdded: OfficeExtension.EventHandlers; + /** + * Occurs when any worksheet in the workbook is calculated. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onCalculated: OfficeExtension.EventHandlers; + /** + * Occurs when any worksheet in the workbook is changed. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * Occurs when one or more columns have been sorted. This happens as the result of a left-to-right sort operation. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onColumnSorted: OfficeExtension.EventHandlers; + /** + * Occurs when any worksheet in the workbook is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * Occurs when a worksheet is deleted from the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onDeleted: OfficeExtension.EventHandlers; + /** + * Occurs when any worksheet's filter is applied in the workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFiltered: OfficeExtension.EventHandlers; + /** + * Occurs when any worksheet in the workbook has a format changed. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onFormatChanged: OfficeExtension.EventHandlers; + /** + * Occurs when one or more formulas are changed in any worksheet of this collection. This event is for when the formula itself changes, not the data value resulting from the formula's calculation. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @eventproperty + */ + readonly onFormulaChanged: OfficeExtension.EventHandlers; + /** + * Occurs when a worksheet is moved within a workbook. This event only triggers when a worksheet is directly moved within a workbook. This event doesn't trigger when the position of a worksheet is indirectly changed, such as when a new worksheet is inserted and causes existing worksheets to change positions. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @eventproperty + */ + readonly onMoved: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet name is changed in the worksheet collection. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @eventproperty + */ + readonly onNameChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet protection state is changed. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @eventproperty + */ + readonly onProtectionChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the hidden state of one or more rows has changed on a specific worksheet. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @eventproperty + */ + readonly onRowHiddenChanged: OfficeExtension.EventHandlers; + /** + * Occurs when one or more rows have been sorted. This happens as the result of a top-to-bottom sort operation. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onRowSorted: OfficeExtension.EventHandlers; + /** + * Occurs when the selection changes on any worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Occurs when left-clicked/tapped operation happens in the worksheet collection. This event will not be fired when clicking in the following cases: + - The user drags the mouse for multi-selection. + - The user selects a cell in the mode when cell arguments are selected for formula references. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @eventproperty + */ + readonly onSingleClicked: OfficeExtension.EventHandlers; + /** + * Occurs when the worksheet visibility is changed in the worksheet collection. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @eventproperty + */ + readonly onVisibilityChanged: 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; + } + /** + * Represents the protection of a worksheet object. + * + * @remarks + * [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; + /** + * Specifies the `AllowEditRangeCollection` object found in this worksheet. This is a collection of `AllowEditRange` objects, which work with worksheet protection properties. + When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly allowEditRanges: Excel.AllowEditRangeCollection; + /** + * Specifies if protection can be paused for this worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly canPauseProtection: boolean; + /** + * Specifies if the sheet is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly isPasswordProtected: boolean; + /** + * Specifies if worksheet protection is paused. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly isPaused: boolean; + /** + * Specifies the protection options for the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly options: Excel.WorksheetProtectionOptions; + /** + * Specifies if the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly protected: boolean; + /** + * Specifies the protection options saved in the worksheet. + This will return the same `WorksheetProtectionOptions` object regardless of the worksheet protection state. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + readonly savedOptions: Excel.WorksheetProtectionOptions; + /** + * Specifies if the password can be used to unlock worksheet protection. + This method doesn't change the worksheet protection state. + If a password is input but no password is required to unlock worksheet protection, this method will return false. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param password The password to check against the protected worksheet. + * @returns Returns `true` if the password can be used to unlock worksheet protection. Otherwise, returns `false`. + */ + checkPassword(password?: string): OfficeExtension.ClientResult; + /** + * Pauses worksheet protection for the given worksheet object for the user in the current session. + This method does nothing if worksheet protection isn't enabled or is already paused. + If the password is incorrect, then this method throws an `InvalidArgument` error and fails to pause protection. + This method does not change the protection state if worksheet protection is not enabled or already paused. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param password The password associated with the protected worksheet. + */ + pauseProtection(password?: string): void; + /** + * Protects a worksheet. Fails if the worksheet has already been protected. + * + * @remarks + * [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; + /** + * Resumes worksheet protection for the given worksheet object for the user in a given session. + Worksheet protection must be paused for this method to work. If worksheet protection is not paused, then this method will not change the protection state of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + resumeProtection(): void; + /** + * Changes the password associated with the `WorksheetProtection` object. + Setting the password as an empty string ("") or as `null` will remove password protection from the `WorksheetProtection` object. + Worksheet protection must be enabled and paused for this method to work properly. + If worksheet protection is disabled, this method throws an `InvalidOperation` error and fails to change the password. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to change the password. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param password The password associated with the `WorksheetProtection` object. + */ + setPassword(password?: string): void; + /** + * Unprotects a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7 for password] + * + * @param password Sheet protection password. + */ + unprotect(password?: string): void; + /** + * Change the worksheet protection options associated with the `WorksheetProtection` object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to change the worksheet protection options. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param options The options interface associated with the `WorksheetProtection` object. + */ + updateOptions(options: Excel.WorksheetProtectionOptions): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorksheetProtectionLoadOptions): Excel.WorksheetProtection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorksheetProtection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the options in sheet protection. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface WorksheetProtectionOptions { + /** + * Represents the worksheet protection option allowing use of the AutoFilter feature. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowAutoFilter?: boolean; + /** + * Represents the worksheet protection option allowing deleting of columns. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowDeleteColumns?: boolean; + /** + * Represents the worksheet protection option allowing deleting of rows. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowDeleteRows?: boolean; + /** + * Represents the worksheet protection option allowing editing of objects. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + allowEditObjects?: boolean; + /** + * Represents the worksheet protection option allowing editing of scenarios. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + allowEditScenarios?: boolean; + /** + * Represents the worksheet protection option allowing formatting of cells. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowFormatCells?: boolean; + /** + * Represents the worksheet protection option allowing formatting of columns. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowFormatColumns?: boolean; + /** + * Represents the worksheet protection option allowing formatting of rows. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowFormatRows?: boolean; + /** + * Represents the worksheet protection option allowing inserting of columns. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowInsertColumns?: boolean; + /** + * Represents the worksheet protection option allowing inserting of hyperlinks. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowInsertHyperlinks?: boolean; + /** + * Represents the worksheet protection option allowing inserting of rows. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowInsertRows?: boolean; + /** + * Represents the worksheet protection option allowing use of the PivotTable feature. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowPivotTables?: boolean; + /** + * Represents the worksheet protection option allowing use of the sort feature. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + allowSort?: boolean; + /** + * Represents the worksheet protection option of selection mode. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + selectionMode?: Excel.ProtectionSelectionMode | "Normal" | "Unlocked" | "None"; + } + /** + * @remarks + * [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. + The range provided corresponds to cells that will be frozen in the top- and left-most pane. + * + * @remarks + * [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 or columns of the worksheet in place. + * + * @remarks + * [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 or rows of the worksheet in place. + * + * @remarks + * [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 corresponds to cells that are frozen in the top- and left-most pane. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getLocation(): Excel.Range; + /** + * Gets a range that describes the frozen cells in the active worksheet view. + The frozen range corresponds to cells that are frozen in the top- and left-most pane. + If there is no frozen pane, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getLocationOrNullObject(): Excel.Range; + /** + * Removes all frozen panes in the worksheet. + * + * @remarks + * [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; + }; + } + /** + * The options that define which worksheets to insert and where in the workbook the new worksheets will be inserted. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + interface InsertWorksheetOptions { + /** + * The insert position, in the current workbook, of the new worksheets. See `Excel.WorksheetPositionType` for details. The default position is "End". + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + positionType?: Excel.WorksheetPositionType | "None" | "Before" | "After" | "Beginning" | "End"; + /** + * The worksheet in the current workbook that is referenced for the `WorksheetPositionType` parameter. The default is `null`. If the `relativeTo` parameter is not set, worksheets will be inserted based on `positionType`, at the start or end of the current workbook. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + relativeTo?: Worksheet | string; + /** + * The names of individual worksheets to insert. By default, all the worksheets from the source workbook are inserted. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + sheetNamesToInsert?: string[]; + } + /** + * Range represents a set of one or more contiguous cells such as a cell, a row, a column, or a block of cells. + To learn more about how ranges are used throughout the API, start with {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-core-concepts#ranges | Ranges in the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 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; + /** + * The collection of `ConditionalFormats` that intersect the range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly conditionalFormats: Excel.ConditionalFormatCollection; + /** + * Returns a data validation object. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly dataValidation: Excel.DataValidation; + /** + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.RangeFormat; + /** + * Represents the range sort of the current range. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly sort: Excel.RangeSort; + /** + * The worksheet containing the current range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly worksheet: Excel.Worksheet; + /** + * Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly address: string; + /** + * Represents the range reference for the specified range in the language of the user. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly addressLocal: string; + /** + * Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly cellCount: number; + /** + * Specifies the total number of columns in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly columnCount: number; + /** + * Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnHidden: boolean; + /** + * Specifies the column number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly columnIndex: number; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + formulasLocal: any[][]; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly hasSpill: boolean; + /** + * Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly height: number; + /** + * Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly hidden: boolean; + /** + * Represents the hyperlink for the current range. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hyperlink: Excel.RangeHyperlink; + /** + * Represents if the current range is an entire column. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly isEntireColumn: boolean; + /** + * Represents if the current range is an entire row. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly isEntireRow: boolean; + /** + * Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly left: number; + /** + * Represents the data type state of each cell. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly linkedDataTypeState: Excel.LinkedDataTypeState[][]; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + numberFormat: any[][]; + /** + * Represents the category of number format of each cell. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly numberFormatCategories: Excel.NumberFormatCategory[][]; + /** + * Represents Excel's number format code for the given range, based on the language settings of the user. + Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. + Any returned text uses the locally-formatted strings based on the language specified in the system settings. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal: any[][]; + /** + * Returns the total number of rows in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly rowCount: number; + /** + * Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHidden: boolean; + /** + * Returns the row number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly rowIndex: number; + /** + * Represents if all the cells would be saved as an array formula. + Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. + Returns `null` if some cells would be saved as an array formula and some would not be. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly savedAsArray: 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + style: string; + /** + * Text values of the specified range. The text value will not depend on the cell width. The number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly text: string[][]; + /** + * Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly top: number; + /** + * Specifies the type of data in each cell. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly valueTypes: Excel.RangeValueType[][]; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values: any[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson: CellValue[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal: CellValue[][]; + /** + * Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * @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; + /** + * Fills a range from the current range to the destination range using the specified AutoFill logic. + The destination range can be `null` or can extend the source range either horizontally or vertically. + Discontiguous ranges are not supported. + + For more information, see {@link https://support.microsoft.com/office/2e79a709-c814-4b27-8bc2-c4dc84d49464 | Use AutoFill and Flash Fill}. + * + * @remarks + * [Api set: ExcelApi 1.9, ExcelApi Preview for null `destinationRange`] + * + * @param destinationRange The destination range to AutoFill. If the destination range is `null`, data is filled out based on the surrounding cells (which is the behavior when double-clicking the UI’s range fill handle). + * @param autoFillType The type of AutoFill. Specifies how the destination range is to be filled, based on the contents of the current range. Default is "FillDefault". + */ + autoFill(destinationRange?: Range | string, autoFillType?: Excel.AutoFillType): void; + /** + * Fills a range from the current range to the destination range using the specified AutoFill logic. + The destination range can be `null` or can extend the source range either horizontally or vertically. + Discontiguous ranges are not supported. + + For more information, see {@link https://support.microsoft.com/office/2e79a709-c814-4b27-8bc2-c4dc84d49464 | Use AutoFill and Flash Fill}. + * + * @remarks + * [Api set: ExcelApi 1.9, ExcelApi Preview for null `destinationRange`] + * + * @param destinationRange The destination range to AutoFill. If the destination range is `null`, data is filled out based on the surrounding cells (which is the behavior when double-clicking the UI’s range fill handle). + * @param autoFillType The type of AutoFill. Specifies how the destination range is to be filled, based on the contents of the current range. Default is "FillDefault". + */ + autoFill(destinationRange?: Range | string, autoFillType?: "FillDefault" | "FillCopy" | "FillSeries" | "FillFormats" | "FillValues" | "FillDays" | "FillWeekdays" | "FillMonths" | "FillYears" | "LinearTrend" | "GrowthTrend" | "FlashFill"): void; + /** + * Calculates a range of cells on a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + calculate(): void; + /** + * Clear range values, format, fill, border, etc. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Converts the range cells with data types into text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + convertDataTypeToText(): void; + /** + * Converts the range cells into linked data types in the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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 a different size than the source range or `RangeAreas`. The destination is expanded automatically if it's smaller than the source. + Note: Like the copy functionality in the Excel UI, if the destination range is an exact multiple greater than the source range in either rows or columns, then the source content is replicated multiple times. For example, a 2x2 range copy into a 2x6 range will result in 3 copies of the original 2x2 range. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param sourceRange The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must be able to 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 a different size than the source range or `RangeAreas`. The destination is expanded automatically if it's smaller than the source. + Note: Like the copy functionality in the Excel UI, if the destination range is an exact multiple greater than the source range in either rows or columns, then the source content is replicated multiple times. For example, a 2x2 range copy into a 2x6 range will result in 3 copies of the original 2x2 range. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param sourceRange The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must be able to 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" | "Link", skipBlanks?: boolean, transpose?: boolean): void; + /** + * Deletes the cells associated with the range. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param text The string to find. + * @param criteria Additional search criteria, including the search direction and whether the search needs to match the entire cell or be case-sensitive. + * @returns The `Range` object representing the first cell that contains a value matching the search text and 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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param text The string to find. + * @param criteria Additional search criteria, including the search direction and whether the search needs to match the entire cell or be case-sensitive. + * @returns The `Range` which matched the search criteria. + */ + findOrNullObject(text: string, criteria: Excel.SearchCriteria): Excel.Range; + /** + * Does a Flash Fill to the current range. Flash Fill automatically fills data when it senses a pattern, so the range must be a single column range and have data around it in order to find a pattern. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + flashFill(): 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. + * + * @remarks + * [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". + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param anotherRange The range object, 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. + * + * @remarks + * [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; + /** + * Returns a 2D array, encapsulating the data for each cell's font, fill, borders, alignment, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param cellPropertiesLoadOptions An object that represents which cell properties to load. + * @returns A 2D array where each item represents the requested properties of the corresponding cell. + */ + getCellProperties(cellPropertiesLoadOptions: CellPropertiesLoadOptions): OfficeExtension.ClientResult; + /** + * Gets a column contained in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param column Column number of the range to be retrieved. Zero-indexed. + */ + getColumn(column: number): Excel.Range; + /** + * Returns a single-dimensional array, encapsulating the data for each column's font, fill, borders, alignment, and other properties. For properties that are not consistent across each cell within a given column, null will be returned. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param columnPropertiesLoadOptions An object that represents which column properties to load. + * @returns An array where each item represents the requested properties of the corresponding column. + */ + getColumnProperties(columnPropertiesLoadOptions: ColumnPropertiesLoadOptions): OfficeExtension.ClientResult; + /** + * Gets a certain number of columns to the right of the current `Range` object. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Returns a `WorkbookRangeAreas` object that represents the range containing all the dependents of a cell in the same worksheet or in multiple worksheets. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + getDependents(): Excel.WorkbookRangeAreas; + /** + * Returns a `WorkbookRangeAreas` object that represents the range containing all the direct dependent cells of a specified range in the same worksheet or across multiple worksheets. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + getDirectDependents(): Excel.WorkbookRangeAreas; + /** + * Returns a `WorkbookRangeAreas` object that represents the range containing all the direct precedent cells of a specified range in the same worksheet or across multiple worksheets. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getDirectPrecedents(): Excel.WorkbookRangeAreas; + /** + * 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"). + * + * @remarks + * [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"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getEntireRow(): Excel.Range; + /** + * Returns a range object that includes the current range and up to the edge of the range, based on the provided direction. This matches the Ctrl+Shift+Arrow key behavior in the Excel on Windows UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param direction The direction from the active cell. + * @param activeCell The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. + */ + getExtendedRange(direction: Excel.KeyboardDirection, activeCell?: Range | string): Excel.Range; + /** + * Returns a range object that includes the current range and up to the edge of the range, based on the provided direction. This matches the Ctrl+Shift+Arrow key behavior in the Excel on Windows UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param direction The direction from the active cell. + * @param activeCell The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. + */ + getExtendedRange(direction: "Left" | "Right" | "Up" | "Down", activeCell?: Range | string): Excel.Range; + /** + * Renders the range as a base64-encoded png image. + **Important**: This API is currently unsupported in Excel for Mac. Visit {@link https://github.com/OfficeDev/office-js/issues/235 | OfficeDev/office-js Issue #235} for the current status. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getImage(): OfficeExtension.ClientResult; + /** + * Gets the range object that represents the rectangular intersection of the given ranges. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getLastRow(): Excel.Range; + /** + * Returns a `RangeAreas` object that represents the merged areas in this range. Note that if the merged areas count in this range is more than 512, then this method will fail to return the result. If the `RangeAreas` object doesn't exist, then this function will return an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + getMergedAreasOrNullObject(): Excel.RangeAreas; + /** + * 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. + * + * @remarks + * [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 scoped collection of PivotTables that overlap with the range. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param fullyContained If `true`, returns only PivotTables that are fully contained within the range bounds. The default value is `false`. + * @returns + */ + getPivotTables(fullyContained?: boolean): Excel.PivotTableScopedCollection; + /** + * Returns a `WorkbookRangeAreas` object that represents the range containing all the precedent cells of a specified range in the same worksheet or across multiple worksheets. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + getPrecedents(): Excel.WorkbookRangeAreas; + /** + * Returns a range object that is the edge cell of the data region that corresponds to the provided direction. This matches the Ctrl+Arrow key behavior in the Excel on Windows UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param direction The direction from the active cell. + * @param activeCell The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. + */ + getRangeEdge(direction: Excel.KeyboardDirection, activeCell?: Range | string): Excel.Range; + /** + * Returns a range object that is the edge cell of the data region that corresponds to the provided direction. This matches the Ctrl+Arrow key behavior in the Excel on Windows UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param direction The direction from the active cell. + * @param activeCell The active cell in this range. By default, the active cell is the top-left cell of the range. An error is thrown if the active cell is not in this range. + */ + getRangeEdge(direction: "Left" | "Right" | "Up" | "Down", activeCell?: Range | string): 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param row Row number of the range to be retrieved. Zero-indexed. + */ + getRow(row: number): Excel.Range; + /** + * Returns a single-dimensional array, encapsulating the data for each row's font, fill, borders, alignment, and other properties. For properties that are not consistent across each cell within a given row, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param rowPropertiesLoadOptions An object that represents which row properties to load. + * @returns An array where each item represents the requested properties of the corresponding row. + */ + getRowProperties(rowPropertiesLoadOptions: RowPropertiesLoadOptions): OfficeExtension.ClientResult; + /** + * Gets a certain number of rows above the current `Range` object. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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" | "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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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" | "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. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getSpillParent(): Excel.Range; + /** + * Gets the range object containing the anchor cell for the cell getting spilled into. + If it's not a spilled cell, or more than one cell is given, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getSpillParentOrNullObject(): 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. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getSpillingToRange(): Excel.Range; + /** + * Gets the range object containing the spill range when called on an anchor cell. + If the range isn't an anchor cell or the spill range can't be found, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getSpillingToRangeOrNullObject(): 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getSurroundingRegion(): Excel.Range; + /** + * Gets a scoped collection of tables that overlap with the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + getVisibleView(): Excel.RangeView; + /** + * Groups columns and rows for an outline. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies how the range can be grouped by rows or columns. + * An `InvalidArgument` error is thrown when the group option differs from the range's + * `isEntireRow` or `isEntireColumn` property (i.e., `range.isEntireRow` is true and `groupOption` is "ByColumns" + * or `range.isEntireColumn` is true and `groupOption` is "ByRows"). + */ + group(groupOption: Excel.GroupOption): void; + /** + * Groups columns and rows for an outline. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies how the range can be grouped by rows or columns. + * An `InvalidArgument` error is thrown when the group option differs from the range's + * `isEntireRow` or `isEntireColumn` property (i.e., `range.isEntireRow` is true and `groupOption` is "ByColumns" + * or `range.isEntireColumn` is true and `groupOption` is "ByRows"). + */ + group(groupOption: "ByRows" | "ByColumns"): void; + /** + * Hides the details of the row or column group. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies whether to hide the details of grouped rows or grouped columns. + */ + hideGroupDetails(groupOption: Excel.GroupOption): void; + /** + * Hides the details of the row or column group. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies whether to hide the details of grouped rows or grouped columns. + */ + hideGroupDetails(groupOption: "ByRows" | "ByColumns"): void; + /** + * 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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Moves cell values, formatting, and formulas from current range to the destination range, replacing the old information in those cells. + The destination range will be expanded automatically if it is smaller than the current range. Any cells in the destination range that are outside of the original range's area are not changed. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param destinationRange destinationRange Specifies the range to where the information in this range will be moved. + */ + moveTo(destinationRange: Range | string): void; + /** + * Removes duplicate values from the range specified by the columns. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param text String to find. + * @param replacement The string that replaces the original string. + * @param criteria Additional replacement 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + select(): void; + /** + * Updates the range based on a 2D array of cell properties, encapsulating things like font, fill, borders, and alignment. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param cellPropertiesData A 2D array that represents which properties to set in each cell. + */ + setCellProperties(cellPropertiesData: SettableCellProperties[][]): void; + /** + * Updates the range based on a single-dimensional array of column properties, encapsulating things like font, fill, borders, and alignment. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param columnPropertiesData An array that represents which properties to set in each column. + */ + setColumnProperties(columnPropertiesData: SettableColumnProperties[]): void; + /** + * Set a range to be recalculated when the next recalculation occurs. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + setDirty(): void; + /** + * Updates the range based on a single-dimensional array of row properties, encapsulating things like font, fill, borders, and alignment. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param rowPropertiesData An array that represents which properties to set in each row. + */ + setRowProperties(rowPropertiesData: SettableRowProperties[]): void; + /** + * Displays the card for an active cell if it has rich value content. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showCard(): void; + /** + * Shows the details of the row or column group. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies whether to show the details of grouped rows or grouped columns. + */ + showGroupDetails(groupOption: Excel.GroupOption): void; + /** + * Shows the details of the row or column group. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies whether to show the details of grouped rows or grouped columns. + */ + showGroupDetails(groupOption: "ByRows" | "ByColumns"): void; + /** + * Ungroups columns and rows for an outline. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies how the range can be ungrouped by rows or columns. + */ + ungroup(groupOption: Excel.GroupOption): void; + /** + * Ungroups columns and rows for an outline. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param groupOption Specifies how the range can be ungrouped by rows or columns. + */ + ungroup(groupOption: "ByRows" | "ByColumns"): void; + /** + * Unmerge the range cells into separate cells. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeLoadOptions): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + } + class RangeCustom { + } + interface Range extends OfficeExtension.ClientObject, RangeCustom { + } + /** + * Represents a string reference of the form "SheetName!A1:B5", or a global or local named range. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface RangeReference { + /** + * The address of the range, for example "SheetName!A1:B5". + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + address: string; + } + /** + * Represents the necessary strings to get/set a hyperlink (XHL) object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface RangeHyperlink { + /** + * Represents the URL target for the hyperlink. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + address?: string; + /** + * Represents the document reference target for the hyperlink. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + documentReference?: string; + /** + * Represents the string displayed when hovering over the hyperlink. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + screenTip?: string; + /** + * Represents the string that is displayed in the top left most cell in the range. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + textToDisplay?: string; + } + /** + * `RangeAreas` represents a collection of one or more rectangular ranges in the same worksheet. + To learn how to use discontiguous ranges, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-multiple-ranges | Work with multiple ranges simultaneously in Excel add-ins}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly areas: Excel.RangeCollection; + /** + * Returns a collection of conditional formats that intersect with any cells in this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly conditionalFormats: Excel.ConditionalFormatCollection; + /** + * Returns a data validation object for all ranges in the `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly dataValidation: Excel.DataValidation; + /** + * Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly format: Excel.RangeFormat; + /** + * Returns the worksheet for the current `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly worksheet: Excel.Worksheet; + /** + * Returns the `RangeAreas` 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"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly address: string; + /** + * Returns the `RangeAreas` reference in the user locale. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly addressLocal: string; + /** + * Returns the number of rectangular ranges that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly cellCount: number; + /** + * Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly isEntireColumn: boolean; + /** + * Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + calculate(): void; + /** + * Clears values, format, fill, border, and other properties on each of the areas that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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, and other properties on each of the areas that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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 data types into text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + convertDataTypeToText(): void; + /** + * Converts all cells in the `RangeAreas` into linked data types. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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 a different size than the source range or `RangeAreas`. The destination will be expanded automatically if it is smaller than the source. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param sourceRange The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must able to 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 a different size than the source range or `RangeAreas`. The destination will be expanded automatically if it is smaller than the source. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param sourceRange The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form must able to 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" | "Link", 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"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param anotherRange The range, `RangeAreas` object, or address that will be used to determine the intersection. + */ + getIntersectionOrNullObject(anotherRange: Range | RangeAreas | string): Excel.RangeAreas; + /** + * Returns a `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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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" | "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. If no special cells are found that match the criteria, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. If no special cells are found that match the criteria, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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" | "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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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`, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + setDirty(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeAreasLoadOptions): Excel.RangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 a collection of one or more rectangular ranges in multiple worksheets. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + class WorkbookRangeAreas 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 `RangeAreasCollection` object. Each `RangeAreas` in the collection represent one or more rectangle ranges in one worksheet. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly areas: Excel.RangeAreasCollection; + /** + * Returns ranges that comprise this object in a `RangeCollection` object. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly ranges: Excel.RangeCollection; + /** + * Returns an array of addresses in A1-style. Address values contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly addresses: string[]; + /** + * Returns the `RangeAreas` object based on worksheet ID or name in the collection. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param key The name or ID of the worksheet. + */ + getRangeAreasBySheet(key: string): Excel.RangeAreas; + /** + * Returns the `RangeAreas` object based on worksheet name or ID in the collection. If the worksheet does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param key The name or ID of the worksheet. + */ + getRangeAreasOrNullObjectBySheet(key: string): Excel.RangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorkbookRangeAreasLoadOptions): Excel.WorkbookRangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorkbookRangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.WorkbookRangeAreas; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): Excel.WorkbookRangeAreas; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.WorkbookRangeAreas; + /** + * 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.WorkbookRangeAreas object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorkbookRangeAreasData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.WorkbookRangeAreasData; + } + /** + * Represents the search criteria to be used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface SearchCriteria { + /** + * Specifies if the match needs to be complete or partial. + A complete match matches the entire contents of the cell. A partial match matches a substring within the content of the cell (e.g., `cat` partially matches `caterpillar` and `scatter`). + Default is `false` (partial). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + completeMatch?: boolean; + /** + * Specifies if the match is case-sensitive. Default is `false` (case-insensitive). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + matchCase?: boolean; + /** + * Specifies the search direction. Default is forward. See `Excel.SearchDirection`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + searchDirection?: Excel.SearchDirection | "Forward" | "Backwards"; + } + /** + * Represents the worksheet search criteria to be used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface WorksheetSearchCriteria { + /** + * Specifies if the match needs to be complete or partial. + A complete match matches the entire contents of the cell. A partial match matches a substring within the content of the cell (e.g., `cat` partially matches `caterpillar` and `scatter`). + Default is `false` (partial). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + completeMatch?: boolean; + /** + * Specifies if the match is case-sensitive. Default is `false` (case-insensitive). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + matchCase?: boolean; + } + /** + * Represents the replace criteria to be used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ReplaceCriteria { + /** + * Specifies if the match needs to be complete or partial. + A complete match matches the entire contents of the cell. A partial match matches a substring within the content of the cell (e.g., `cat` partially matches `caterpillar` and `scatter`). + Default is `false` (partial). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + completeMatch?: boolean; + /** + * Specifies if the match is case-sensitive. Default is `false` (case-insensitive). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + matchCase?: boolean; + } + /** + * Specifies which properties to load on the `format.fill` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesFillLoadOptions { + /** + * Specifies whether to load the `color` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: boolean; + /** + * Specifies whether to load the `pattern` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern?: boolean; + /** + * Specifies whether to load the `patternColor` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternColor?: boolean; + /** + * Specifies whether to load the `patternTintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternTintAndShade?: boolean; + /** + * Specifies whether to load the `tintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + } + /** + * Specifies which properties to load on the `format.font` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesFontLoadOptions { + /** + * Specifies whether to load the `bold` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bold?: boolean; + /** + * Specifies whether to load the `color` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: boolean; + /** + * Specifies whether to load the `italic` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + italic?: boolean; + /** + * Specifies whether to load the `name` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: boolean; + /** + * Specifies whether to load the `size` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + size?: boolean; + /** + * Specifies whether to load the `strikethrough` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + strikethrough?: boolean; + /** + * Specifies whether to load the `subscript` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subscript?: boolean; + /** + * Specifies whether to load the `superscript` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + superscript?: boolean; + /** + * Specifies whether to load the `tintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + /** + * Specifies whether to load the `underline` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underline?: boolean; + } + /** + * Specifies which properties to load on the `format.borders` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesBorderLoadOptions { + /** + * Specifies whether to load the `color` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: boolean; + /** + * Specifies whether to load the `style` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: boolean; + /** + * Specifies whether to load the `tintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + /** + * Specifies whether to load the `weight` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + weight?: boolean; + } + /** + * Represents the `format.protection` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the `format.protection` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesProtection { + /** + * Represents the `format.protection.formulaHidden` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + formulaHidden?: boolean; + /** + * Represents the `format.protection.locked` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + locked?: boolean; + } + /** + * Represents the `format.fill` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties` or the `format.fill` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesFill { + /** + * Represents the `format.fill.color` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the `format.fill.pattern` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + /** + * Represents the `format.fill.patternColor` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternColor?: string; + /** + * Represents the `format.fill.patternTintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternTintAndShade?: number; + /** + * Represents the `format.fill.tintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + } + /** + * Represents the `format.font` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the `format.font` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellPropertiesFont { + /** + * Represents the `format.font.bold` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bold?: boolean; + /** + * Represents the `format.font.color` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the `format.font.italic` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + italic?: boolean; + /** + * Represents the `format.font.name` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: string; + /** + * Represents the `format.font.size` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + size?: number; + /** + * Represents the `format.font.strikethrough` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + strikethrough?: boolean; + /** + * Represents the `format.font.subscript` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subscript?: boolean; + /** + * Represents the `format.font.superscript` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + superscript?: boolean; + /** + * Represents the `format.font.tintAndShade` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + /** + * Represents the `format.font.underline` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underline?: Excel.RangeUnderlineStyle | "None" | "Single" | "Double" | "SingleAccountant" | "DoubleAccountant"; + } + /** + * Represents the `format.borders` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the `format.borders` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellBorderCollection { + /** + * Represents the `format.borders.bottom` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottom?: Excel.CellBorder; + /** + * Represents the `format.borders.diagonalDown` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + diagonalDown?: Excel.CellBorder; + /** + * Represents the `format.borders.diagonalUp` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + diagonalUp?: Excel.CellBorder; + /** + * Represents the `format.borders.horizontal` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontal?: Excel.CellBorder; + /** + * Represents the `format.borders.left` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: Excel.CellBorder; + /** + * Represents the `format.borders.right` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + right?: Excel.CellBorder; + /** + * Represents the `format.borders.top` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: Excel.CellBorder; + /** + * Represents the `format.borders.vertical` property. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + vertical?: Excel.CellBorder; + } + /** + * Represents the properties of a single border returned by `getCellProperties`, `getRowProperties`, and `getColumnProperties`, or the border property input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface CellBorder { + /** + * Represents the `color` property of a single border. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the `style` property of a single border. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * Represents the `tintAndShade` property of a single border. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + /** + * Represents the `weight` property of a single border. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + weight?: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; + } + /** + * RangeView represents a set of visible cells of the parent range. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly rows: Excel.RangeViewCollection; + /** + * Represents the cell addresses of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly cellAddresses: any[][]; + /** + * The number of visible columns. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly columnCount: number; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasLocal: any[][]; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasR1C1: any[][]; + /** + * Returns a value that represents the index of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly index: number; + /** + * Represents Excel's number format code for the given cell. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + numberFormat: any[][]; + /** + * The number of visible rows. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly text: string[][]; + /** + * Represents the type of data of each cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + values: any[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson: CellValue[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal: 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. + * @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`. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeViewLoadOptions): Excel.RangeView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a collection of `RangeView` objects. + * + * @remarks + * [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[]; + /** + * Gets the number of `RangeView` objects in the collection. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a `RangeView` row via its index. Zero-indexed. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeViewCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeViewCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeViewCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * 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. + * + * @remarks + * [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[]; + /** + * Sets or adds the specified setting to the workbook. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a setting entry via the key. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SettingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SettingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.SettingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.SettingCollection; + /** + * Occurs when the settings in the document are changed. + * + * @remarks + * [Api set: ExcelApi 1.4] + * + * @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; + } + /** + * 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. + * + * @remarks + * [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; + /** + * The key that represents the ID of the setting. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + readonly key: string; + /** + * Represents the value stored for this setting. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SettingLoadOptions): Excel.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * A collection of all the `NamedItem` objects that are part of the workbook or worksheet, depending on how it was reached. + * + * @remarks + * [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[]; + /** + * Adds a new name to the collection of the given scope. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a `NamedItem` object using its name. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param name Nameditem name. + */ + getItem(name: string): Excel.NamedItem; + /** + * Gets a `NamedItem` object using its name. If the object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NamedItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.NamedItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NamedItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + class NamedItemCollectionCustom { + } + interface NamedItemCollection extends OfficeExtension.ClientObject, NamedItemCollectionCustom { + } + /** + * 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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + readonly worksheet: Excel.Worksheet; + /** + * Returns the worksheet to which the named item is scoped. If the item is scoped to the workbook instead, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + readonly worksheetOrNullObject: Excel.Worksheet; + /** + * Specifies the comment associated with this name. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + comment: string; + /** + * The formula of the named item. Formulas always start with an equal sign ("="). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formula: any; + /** + * The name of the object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly name: string; + /** + * Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + readonly scope: Excel.NamedItemScope | "Worksheet" | "Workbook"; + /** + * Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly value: any; + /** + * A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + readonly valueAsJson: CellValue | string; + /** + * A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + readonly valueAsJsonLocal: CellValue | string; + /** + * Specifies if the object is visible. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * Returns the range object that is associated with the name. If the named item's type is not a range, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NamedItemLoadOptions): Excel.NamedItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NamedItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents an object containing values and types of a named item. + * + * @remarks + * [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 + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly types: Excel.RangeValueType[][]; + /** + * Represents the values of each item in the named item array. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly values: any[][]; + /** + * A JSON representation of the values in this named item array. + Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItemArrayValues.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + readonly valuesAsJson: CellValue[][]; + /** + * A JSON representation of the values in this named item array. + Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItemArrayValues.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + readonly valuesAsJsonLocal: CellValue[][]; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NamedItemArrayValuesLoadOptions): Excel.NamedItemArrayValues; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NamedItemArrayValues; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents an Office.js binding that is defined in the workbook. + * + * @remarks + * [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 the binding identifier. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly id: string; + /** + * Returns the type of the binding. See `Excel.BindingType` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly type: Excel.BindingType | "Range" | "Table" | "Text"; + /** + * Deletes the binding. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + delete(): void; + /** + * Returns the range represented by the binding. Will throw an error if the binding is not of the correct type. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * Returns the table represented by the binding. Will throw an error if the binding is not of the correct type. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getTable(): Excel.Table; + /** + * Returns the text represented by the binding. Will throw an error if the binding is not of the correct type. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.BindingLoadOptions): Excel.Binding; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Binding; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Binding; + /** + * Occurs when data or formatting within the binding is changed. + * + * @remarks + * [Api set: ExcelApi 1.2] + * + * @eventproperty + */ + readonly onDataChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the selected content in the binding is changed. + + **Note**: If multiple, discontiguous cells are selected, `Binding.onSelectionChanged` only reports row and column information for one selection. Use `Worksheet.onSelectionChanged` for multiple selected ranges. + * + * @remarks + * [Api set: ExcelApi 1.2] + * + * @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; + } + /** + * Represents the collection of all the binding objects that are part of the workbook. + * + * @remarks + * [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[]; + /** + * Returns the number of bindings in the collection. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Add a new binding to a particular Range. + * + * @remarks + * [Api set: ExcelApi 1.3] + * + * @param range Range to bind the binding to. May be a `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 the binding. + */ + add(range: Range | string, bindingType: Excel.BindingType, id: string): Excel.Binding; + /** + * Add a new binding to a particular Range. + * + * @remarks + * [Api set: ExcelApi 1.3] + * + * @param range Range to bind the binding to. May be a `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 the 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. + * + * @remarks + * [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 the 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. + * + * @remarks + * [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 the 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. + * + * @remarks + * [Api set: ExcelApi 1.3] + * + * @param bindingType Type of binding. See `Excel.BindingType`. + * @param id Name of the 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. + * + * @remarks + * [Api set: ExcelApi 1.3] + * + * @param bindingType Type of binding. See `Excel.BindingType`. + * @param id Name of the binding. + */ + addFromSelection(bindingType: "Range" | "Table" | "Text", id: string): Excel.Binding; + /** + * Gets the number of bindings in the collection. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a binding object by ID. + * + * @remarks + * [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. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.BindingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.BindingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.BindingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached. + * + * @remarks + * [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[]; + /** + * Returns the number of tables in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Creates 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. + * + * @remarks + * [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 A 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 a header and shift the data down by one row. + */ + add(address: Range | string, hasHeaders: boolean): Excel.Table; + /** + * Gets the number of tables in the collection. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a table by name or ID. + * + * @remarks + * [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. + * + * @remarks + * [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 doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.TableCollection; + /** + * Occurs when a new table is added in a workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onAdded: OfficeExtension.EventHandlers; + /** + * Occurs when data changes on any table in a workbook, or a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the specified table is deleted in a workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onDeleted: OfficeExtension.EventHandlers; + /** + * Occurs when a filter is applied on any table in a workbook, or a worksheet. + * + * @remarks + * [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; + } + class TableCollectionCustom { + } + interface TableCollection extends OfficeExtension.ClientObject, TableCollectionCustom { + } + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getFirst(): Excel.Table; + /** + * Gets a table by name or ID. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param key Name or ID of the table to be retrieved. + */ + getItem(key: string): Excel.Table; + /** + * Gets a table by name or ID. + If the table object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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. + To learn more about the table object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables | Work with tables using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 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; + /** + * Represents the `AutoFilter` object of the table. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly autoFilter: Excel.AutoFilter; + /** + * Represents a collection of all the columns in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly columns: Excel.TableColumnCollection; + /** + * Represents a collection of all the rows in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly rows: Excel.TableRowCollection; + /** + * Represents the sorting for the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly sort: Excel.TableSort; + /** + * The style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly tableStyle: Excel.TableStyle; + /** + * The worksheet containing the current table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly worksheet: Excel.Worksheet; + /** + * Specifies if the first column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn: boolean; + /** + * Specifies if the last column contains special formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly id: string; + /** + * Returns a numeric ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly legacyId: string; + /** + * Name of the table. + + The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedColumns: boolean; + /** + * Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedRows: boolean; + /** + * Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showFilterButton: boolean; + /** + * Specifies if the header row is visible. This value can be set to show or remove the header row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showHeaders: boolean; + /** + * Specifies if the total row is visible. This value can be set to show or remove the total row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showTotals: boolean; + /** + * Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + clearFilters(): void; + /** + * Changes the table to use the default table style. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + clearStyle(): void; + /** + * Converts the table into a normal range of cells. All data is preserved. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + convertToRange(): Excel.Range; + /** + * Deletes the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * Gets the range object associated with the data body of the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getDataBodyRange(): Excel.Range; + /** + * Gets the range object associated with the header row of the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getHeaderRowRange(): Excel.Range; + /** + * Gets the range object associated with the entire table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * Gets the range object associated with the totals row of the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getTotalRowRange(): Excel.Range; + /** + * Reapplies all the filters currently on the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + reapplyFilters(): void; + /** + * Resize the table to the new range. The new range must overlap with the original table range and the headers (or the top of the table) must be in the same row. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param newRange The range object or range address that will be used to determine the new size of the table. + */ + resize(newRange: Range | string): void; + /** + * Sets the style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param style The style to apply to the table. An `InvalidArgumentException` is thrown if a string is provided that does not match the name of any style. + */ + setStyle(style: string | TableStyle | BuiltInTableStyle): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableLoadOptions): Excel.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Table; + /** + * Occurs when data in cells changes on a specific table. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * Occurs when a filter is applied on a specific table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFiltered: OfficeExtension.EventHandlers; + /** + * Occurs when the selection changes on a specific table. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @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; + } + /** + * Represents a collection of all the columns that are part of the table. + * + * @remarks + * [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[]; + /** + * Returns the number of columns in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Adds a new column to the table. + * + * @remarks + * [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 2D 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; + /** + * Adds a new column to the table. + Unlike `add()`, `addAsJson()` takes any type of cell value, such as image or entity data types. + * + * @remarks + * [Api set: ExcelApi 1.16] + * + * @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 2D array of cell values of the table column. + * @param name Optional. Specifies the name of the new column. If `null`, the default name will be used. + */ + addAsJson(index?: number, values?: CellValue[][], name?: string): Excel.TableColumn; + /** + * Gets the number of columns in the table. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a column object by name or ID. + * + * @remarks + * [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. + * + * @remarks + * [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 doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableColumnCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableColumnCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableColumnCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents a column in a table. + * + * @remarks + * [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; + /** + * Retrieves the filter applied to the column. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly filter: Excel.Filter; + /** + * Returns a unique key that identifies the column within the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly id: number; + /** + * Returns the index number of the column within the columns collection of the table. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly index: number; + /** + * Specifies the name of the table column. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values: any[][]; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson: CellValue[][]; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal: 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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * Gets the range object associated with the data body of the column. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getDataBodyRange(): Excel.Range; + /** + * Gets the range object associated with the header row of the column. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getHeaderRowRange(): Excel.Range; + /** + * Gets the range object associated with the entire column. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * Gets the range object associated with the totals row of the column. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableColumnLoadOptions): Excel.TableColumn; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableColumn; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * 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 or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [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[]; + /** + * Returns the number of rows in the table. + * + * @remarks + * [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 or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [Api set: ExcelApi 1.1 for adding a single row; 1.4 allows adding of multiple rows; 1.15 for adding `alwaysInsert` parameter.] + * + * @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 2D array of unformatted values of the table row. + * @param alwaysInsert Optional. Specifies whether the new rows will be inserted into the table when new rows are added. If `true`, the new rows will be inserted into the table. If `false`, the new rows will be added below the table. Default is `true`. + */ + add(index?: number, values?: Array> | boolean | string | number, alwaysInsert?: boolean): Excel.TableRow; + /** + * Adds one or more rows to the table. The returned object will be the top row of the newly added row or rows. + Unlike `add()`, `addAsJson()` takes any type of cell value, such as image or entity data types. + + Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [Api set: ExcelApi 1.16] + * + * @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 2D array of cell values of the table row. + * @param alwaysInsert Optional. Specifies whether the new rows will be inserted into the table when new rows are added. If `true`, the new rows will be inserted into the table. If `false`, the new rows will be added below the table. Default is `true`. + */ + addAsJson(index?: number, values?: CellValue[][], alwaysInsert?: boolean): Excel.TableRow; + /** + * Delete multiple rows from a table. + These rows don't need to be sequential. This method will throw the `InvalidArgument` error if a chosen row has already been deleted or doesn't exist. + This method will throw the `InsertDeleteConflict` error if the table on which the method is called has a filter applied. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param rows An array of row index numbers or row objects to delete from the table. + */ + deleteRows(rows: number[] | TableRow[]): void; + /** + * Delete a specified number of rows from a table, starting at a given index. + This method will throw the `InsertDeleteConflict` error if the table on which the method is called has a filter applied. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param index The index value of the row to be deleted. Note: Row indexes update each time that a preceding row in the table is deleted, after each delete operation. Ensure that the index of the row that you want to delete hasn't changed between the time that you determined the value and the time that you run the operation. + * @param count Number of rows to delete. By default, a single row will be deleted. + */ + deleteRowsAt(index: number, count?: number): void; + /** + * Gets the number of rows in the table. + * + * @remarks + * [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 or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableRowCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents a row in a table. + + Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly index: number; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values: any[][]; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson: CellValue[][]; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal: 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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * Returns the range object associated with the entire row. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableRowLoadOptions): Excel.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the data validation applied to the current range. + To learn more about the data validation object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-data-validation | Add data validation to Excel ranges}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + errorAlert: Excel.DataValidationErrorAlert; + /** + * Specifies if data validation will be performed on blank cells. Default is `true`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + ignoreBlanks: boolean; + /** + * Prompt when users select a cell. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + prompt: Excel.DataValidationPrompt; + /** + * Data validation rule that contains different type of data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + rule: Excel.DataValidationRule; + /** + * Type of the data validation, see `Excel.DataValidationType` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + clear(): void; + /** + * Returns a `RangeAreas` object, comprising one or more rectangular ranges, with invalid cell values. If all cell values are valid, this function will throw an `ItemNotFound` error. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getInvalidCells(): Excel.RangeAreas; + /** + * Returns a `RangeAreas` object, comprising one or more rectangular ranges, with invalid cell values. If all cell values are valid, this function will return `null`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getInvalidCellsOrNullObject(): Excel.RangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DataValidationLoadOptions): Excel.DataValidation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DataValidation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * A data validation rule contains different types of data validation. You can only use one of them at a time according the `Excel.DataValidationType`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DataValidationRule { + /** + * Custom data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + custom?: Excel.CustomDataValidation; + /** + * Date data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + date?: Excel.DateTimeDataValidation; + /** + * Decimal data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + decimal?: Excel.BasicDataValidation; + /** + * List data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + list?: Excel.ListDataValidation; + /** + * Text length data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textLength?: Excel.BasicDataValidation; + /** + * Time data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + time?: Excel.DateTimeDataValidation; + /** + * Whole number data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + wholeNumber?: Excel.BasicDataValidation; + } + /** + * Represents the results from `Range.removeDuplicates`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly removed: number; + /** + * Number of remaining unique rows present in the resulting range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly uniqueRemaining: number; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RemoveDuplicatesResultLoadOptions): Excel.RemoveDuplicatesResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RemoveDuplicatesResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface BasicDataValidation { + /** + * Specifies the right-hand operand when the operator property is set to a binary operator such as GreaterThan (the left-hand operand is the value the user tries to enter in the cell). With the ternary operators Between and NotBetween, specifies the lower bound operand. + For example, setting formula1 to 10 and operator to GreaterThan means that valid data for the range must be greater than 10. + 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula1: string | number | Range; + /** + * With the ternary operators Between and NotBetween, specifies the upper bound operand. Is not used with the binary operators, such as GreaterThan. + 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula2?: string | number | Range; + /** + * The operator to use for validating the data. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + operator: Excel.DataValidationOperator | "Between" | "NotBetween" | "EqualTo" | "NotEqualTo" | "GreaterThan" | "LessThan" | "GreaterThanOrEqualTo" | "LessThanOrEqualTo"; + } + /** + * Represents the date data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DateTimeDataValidation { + /** + * Specifies the right-hand operand when the operator property is set to a binary operator such as GreaterThan (the left-hand operand is the value the user tries to enter in the cell). With the ternary operators Between and NotBetween, specifies the lower bound operand. + 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula1: string | Date | Range; + /** + * With the ternary operators Between and NotBetween, specifies the upper bound operand. Is not used with the binary operators, such as GreaterThan. + 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula2?: string | Date | Range; + /** + * The operator to use for validating the data. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + operator: Excel.DataValidationOperator | "Between" | "NotBetween" | "EqualTo" | "NotEqualTo" | "GreaterThan" | "LessThan" | "GreaterThanOrEqualTo" | "LessThanOrEqualTo"; + } + /** + * Represents the List data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ListDataValidation { + /** + * Specifies whether to display the list in a cell drop-down. The default is `true`. + * + * @remarks + * [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 `Range` object, or a string that contains a comma-separated number, boolean, or date. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + source: string | Range; + } + /** + * Represents the custom data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface CustomDataValidation { + /** + * A custom data validation formula. This creates special input rules, such as preventing duplicates, or limiting the total in a range of cells. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula: string; + } + /** + * Represents the error alert properties for the data validation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DataValidationErrorAlert { + /** + * Represents the error alert message. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + message: string; + /** + * Specifies whether to show an error alert dialog when a user enters invalid data. The default is `true`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAlert: boolean; + /** + * The data validation alert type, please see `Excel.DataValidationAlertStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + style: Excel.DataValidationAlertStyle | "Stop" | "Warning" | "Information"; + /** + * Represents the error alert dialog title. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + title: string; + } + /** + * Represents the user prompt properties for the data validation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DataValidationPrompt { + /** + * Specifies the message of the prompt. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + message: string; + /** + * Specifies if a prompt is shown when a user selects a cell with data validation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showPrompt: boolean; + /** + * Specifies the title for the prompt. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + title: string; + } + /** + * A format object encapsulating the range's font, fill, borders, alignment, and other properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly borders: Excel.RangeBorderCollection; + /** + * Returns the fill object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.RangeFill; + /** + * Returns the font object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.RangeFont; + /** + * Returns the format protection object for a range. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly protection: Excel.FormatProtection; + /** + * Specifies if text is automatically indented when text alignment is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoIndent: boolean; + /** + * Specifies the width of all colums within the range. If the column widths are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnWidth: number; + /** + * Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + indentLevel: number; + /** + * The reading order for the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * The height of all rows in the range. If the row heights are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHeight: number; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shrinkToFit: boolean; + /** + * 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. + * + * @remarks + * [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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardHeight: boolean; + /** + * Specifies if 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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardWidth: boolean; + /** + * Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + verticalAlignment: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting + * + * @remarks + * [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. + * @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; + /** + * Adjusts the indentation of the range formatting. The indent value ranges from 0 to 250 and is measured in characters. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param amount The number of character spaces by which the current indent is adjusted. This value should be between -250 and 250. + * **Note**: If the amount would raise the indent level above 250, the indent level stays with 250. + * Similarly, if the amount would lower the indent level below 0, the indent level stays 0. + */ + adjustIndent(amount: number): void; + /** + * Changes the width of the columns of the current range to achieve the best fit, based on the current data in the columns. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeFormatLoadOptions): Excel.RangeFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the format protection of a range object. + * + * @remarks + * [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; + /** + * Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + formulaHidden: boolean; + /** + * Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.FormatProtectionLoadOptions): Excel.FormatProtection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.FormatProtection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the background of a range object. + * + * @remarks + * [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 background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * 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 a uniform pattern setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + /** + * The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternColor: string; + /** + * Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternTintAndShade: number; + /** + * Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeFillLoadOptions): Excel.RangeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the border of an object. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * Constant value that indicates the specific side of the border. See `Excel.BorderIndex` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade: number; + /** + * Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeBorderLoadOptions): Excel.RangeBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the border objects that make up the range border. + * + * @remarks + * [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[]; + /** + * Number of border objects in the collection. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Specifies 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 collection doesn't have a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade: number; + /** + * Gets a border object using its name. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeBorderCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeBorderCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * This object represents the font attributes (font name, font size, color, etc.) for an object. + * + * @remarks + * [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 the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * Specifies the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic: boolean; + /** + * Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * Font size. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size: number; + /** + * Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + strikethrough: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subscript: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + superscript: boolean; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform font `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade: number; + /** + * Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeFontLoadOptions): Excel.RangeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * A collection of all the chart objects on a worksheet. + * + * @remarks + * [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[]; + /** + * Returns the number of charts in the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Creates a new chart. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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 doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.ChartCollection; + /** + * Occurs when a chart is activated. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * Occurs when a new chart is added to the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onAdded: OfficeExtension.EventHandlers; + /** + * Occurs when a chart is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * Occurs when a chart is deleted. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @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; + } + class ChartCollectionCustom { + } + interface ChartCollection extends OfficeExtension.ClientObject, ChartCollectionCustom { + } + /** + * Represents a chart object in a workbook. + To learn more about the chart object model, see {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-charts | Work with charts using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly axes: Excel.ChartAxes; + /** + * Represents the data labels on the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly dataLabels: Excel.ChartDataLabels; + /** + * Encapsulates the format properties for the chart area. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartAreaFormat; + /** + * Represents the legend for the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly legend: Excel.ChartLegend; + /** + * Encapsulates the options for a pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly pivotOptions: Excel.ChartPivotOptions; + /** + * Represents the plot area for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly plotArea: Excel.ChartPlotArea; + /** + * Represents either a single series or collection of series in the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly series: Excel.ChartSeriesCollection; + /** + * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly title: Excel.ChartTitle; + /** + * The worksheet containing the current chart. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly worksheet: Excel.Worksheet; + /** + * Specifies a chart category label level enumeration constant, referring to the level of the source category labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel: number; + /** + * Specifies the type of the chart. See `Excel.ChartType` for details. + * + * @remarks + * [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"; + /** + * Specifies the way that blank cells are plotted on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs: Excel.ChartDisplayBlanksAs | "NotPlotted" | "Zero" | "Interplotted"; + /** + * Specifies the height, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + height: number; + /** + * The unique ID of chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly id: string; + /** + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + left: number; + /** + * Specifies the name of a chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * Specifies the way columns or rows are used as data series on the chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly: boolean; + /** + * Specifies a chart series name level enumeration constant, referring to the level of the source series names. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel: number; + /** + * Specifies whether to display all field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons: boolean; + /** + * Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. + If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum: boolean; + /** + * Specifies the chart style for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + style: number; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + top: number; + /** + * Specifies the width, in points, of the chart object. + * + * @remarks + * [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. + * @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; + /** + * Activates the chart in the Excel UI. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + activate(): void; + /** + * Deletes the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * Gets the data source of the whole chart. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getDataRange(): OfficeExtension.ClientResult; + /** + * Gets the data source of the whole chart. If the data range is empty, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getDataRangeOrNullObject(): OfficeExtension.ClientResult; + /** + * Gets the data table on the chart. If the chart doesn't allow a data table, it will throw an exception. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + getDataTable(): Excel.ChartDataTable; + /** + * Gets the data table on the chart. If the chart doesn't allow a data table, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + getDataTableOrNullObject(): Excel.ChartDataTable; + /** + * 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. + * + * @remarks + * [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 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. + * + * @remarks + * [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 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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartLoadOptions): Excel.Chart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Chart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Chart; + /** + * Occurs when the chart is activated. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * Occurs when the chart is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Specifies whether to display the 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showAxisFieldButtons: boolean; + /** + * Specifies whether to display the legend field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLegendFieldButtons: boolean; + /** + * Specifies whether to display the report filter field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showReportFilterFieldButtons: boolean; + /** + * Specifies whether to display the show value field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartPivotOptionsLoadOptions): Excel.ChartPivotOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartPivotOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly border: Excel.ChartBorder; + /** + * Represents the fill format of an object, which includes background formatting information. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.ChartFont; + /** + * Specifies the color scheme of the chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + colorScheme: Excel.ChartColorScheme | "ColorfulPalette1" | "ColorfulPalette2" | "ColorfulPalette3" | "ColorfulPalette4" | "MonochromaticPalette1" | "MonochromaticPalette2" | "MonochromaticPalette3" | "MonochromaticPalette4" | "MonochromaticPalette5" | "MonochromaticPalette6" | "MonochromaticPalette7" | "MonochromaticPalette8" | "MonochromaticPalette9" | "MonochromaticPalette10" | "MonochromaticPalette11" | "MonochromaticPalette12" | "MonochromaticPalette13"; + /** + * Specifies if the chart area of the chart has rounded corners. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartAreaFormatLoadOptions): Excel.ChartAreaFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartAreaFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a collection of chart series. + * + * @remarks + * [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[]; + /** + * Returns the number of series in the collection. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Add a new series to the collection. The new added series is not visible until values, x-axis values, or bubble sizes for it are set (depending on chart type). + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Retrieves a series based on its position in the collection. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartSeriesCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartSeriesCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartSeriesCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents a series in a chart. + * + * @remarks + * [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 for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly binOptions: Excel.ChartBinOptions; + /** + * Encapsulates the options for the box and whisker charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly boxwhiskerOptions: Excel.ChartBoxwhiskerOptions; + /** + * Represents a collection of all data labels in the series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly dataLabels: Excel.ChartDataLabels; + /** + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartSeriesFormat; + /** + * Encapsulates the options for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly mapOptions: Excel.ChartMapOptions; + /** + * Returns a collection of all points in the series. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly points: Excel.ChartPointsCollection; + /** + * The collection of trendlines in the series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly trendlines: Excel.ChartTrendlineCollection; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly xErrorBars: Excel.ChartErrorBars; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly yErrorBars: Excel.ChartErrorBars; + /** + * Specifies the group for the specified series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + axisGroup: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bubbleScale: number; + /** + * Represents the chart type of a series. See `Excel.ChartType` for details. + * + * @remarks + * [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 doughnut exploded charts. + Throws an `InvalidArgument` error on invalid charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize: number; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + explosion: number; + /** + * Specifies if the series is filtered. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + filtered: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + gapWidth: number; + /** + * Specifies the color for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumColor: string; + /** + * Specifies the type for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumType: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumValue: number; + /** + * Specifies the color for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointColor: string; + /** + * Specifies the type for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointType: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointValue: number; + /** + * Specifies the color for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumColor: string; + /** + * Specifies the type for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumType: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumValue: number; + /** + * Specifies the series gradient style of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientStyle: Excel.ChartGradientStyle | "TwoPhaseColor" | "ThreePhaseColor"; + /** + * Specifies if the series has data labels. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabels: boolean; + /** + * Specifies the fill color for negative data points in a series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + invertColor: string; + /** + * True if Excel inverts the pattern in the item when it corresponds to a negative number. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + invertIfNegative: boolean; + /** + * Specifies the marker background color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor: string; + /** + * Specifies the marker foreground color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor: string; + /** + * Specifies the marker size of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize: number; + /** + * Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + /** + * Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + overlap: number; + /** + * Specifies the series parent label strategy area for a treemap chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentLabelStrategy: Excel.ChartParentLabelStrategy | "None" | "Banner" | "Overlapping"; + /** + * Specifies the plot order of a chart series within the chart group. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + plotOrder: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + secondPlotSize: number; + /** + * Specifies whether connector lines are shown in waterfall charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showConnectorLines: boolean; + /** + * Specifies whether leader lines are displayed for each data label in the series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLeaderLines: boolean; + /** + * Specifies if the series has a shadow. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow: boolean; + /** + * Specifies if the series is smooth. Only applicable to line and scatter charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + smooth: boolean; + /** + * Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitType: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + /** + * Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + splitValue: number; + /** + * True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + delete(): void; + /** + * Gets the string representation of the data source of the chart series.The string representation could be information such as a cell address. + * + * @remarks + * [Api set: ExcelApi 1.15] + * + * @param dimension The dimension of the axis where the data is from. + */ + getDimensionDataSourceString(dimension: Excel.ChartSeriesDimension): OfficeExtension.ClientResult; + /** + * Gets the string representation of the data source of the chart series.The string representation could be information such as a cell address. + * + * @remarks + * [Api set: ExcelApi 1.15] + * + * @param dimension The dimension of the axis where the data is from. + */ + getDimensionDataSourceString(dimension: "Categories" | "Values" | "XValues" | "YValues" | "BubbleSizes"): OfficeExtension.ClientResult; + /** + * Gets the data source type of the chart series. + * + * @remarks + * [Api set: ExcelApi 1.15] + * + * @param dimension The dimension of the axis where the data is from. + */ + getDimensionDataSourceType(dimension: Excel.ChartSeriesDimension): OfficeExtension.ClientResult; + /** + * Gets the data source type of the chart series. + * + * @remarks + * [Api set: ExcelApi 1.15] + * + * @param dimension The dimension of the axis where the data is from. + */ + getDimensionDataSourceType(dimension: "Categories" | "Values" | "XValues" | "YValues" | "BubbleSizes"): OfficeExtension.ClientResult; + /** + * Gets the values from a single dimension of the chart series. These could be either category values or data values, depending on the dimension specified and how the data is mapped for the chart series. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param dimension The dimension of the axis where the data is from. + */ + getDimensionValues(dimension: Excel.ChartSeriesDimension): OfficeExtension.ClientResult; + /** + * Gets the values from a single dimension of the chart series. These could be either category values or data values, depending on the dimension specified and how the data is mapped for the chart series. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param dimension The dimension of the axis where the data is from. + */ + getDimensionValues(dimension: "Categories" | "Values" | "XValues" | "YValues" | "BubbleSizes"): OfficeExtension.ClientResult; + /** + * Sets the bubble sizes for a chart series. Only works for bubble charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param sourceData The `Range` object corresponding to the source data. + */ + setBubbleSizes(sourceData: Range): void; + /** + * Sets the values for a chart series. For scatter charts, it refers to y-axis values. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param sourceData The `Range` object corresponding to the source data. + */ + setValues(sourceData: Range): void; + /** + * Sets the values of the x-axis for a chart series. Only works for scatter charts. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartSeriesLoadOptions): Excel.ChartSeries; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartSeries; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Encapsulates the format properties for the chart series + * + * @remarks + * [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 formatting information. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * Represents line formatting. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartSeriesFormatLoadOptions): Excel.ChartSeriesFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartSeriesFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * A collection of all the chart points within a series inside a chart. + * + * @remarks + * [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[]; + /** + * Returns the number of chart points in the series. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * Returns the number of chart points in the series. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Retrieve a point based on its position within the series. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartPointsCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartPointsCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartPointsCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents a point of a series in a chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly dataLabel: Excel.ChartDataLabel; + /** + * Encapsulates the format properties chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartPointFormat; + /** + * Represents whether a data point has a data label. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabel: boolean; + /** + * HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor: string; + /** + * HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor: string; + /** + * Represents marker size of a data point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize: number; + /** + * Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartPointLoadOptions): Excel.ChartPoint; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartPoint; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the formatting object for chart points. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly border: Excel.ChartBorder; + /** + * Represents the fill format of a chart, which includes background formatting information. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartPointFormatLoadOptions): Excel.ChartPointFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartPointFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the chart axes. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly categoryAxis: Excel.ChartAxis; + /** + * Represents the series axis of a 3-D chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly seriesAxis: Excel.ChartAxis; + /** + * Represents the value axis in an axis. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartAxesLoadOptions): Excel.ChartAxes; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartAxes; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a single axis in a chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartAxisFormat; + /** + * Returns an object that represents the major gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly majorGridlines: Excel.ChartGridlines; + /** + * Returns an object that represents the minor gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly minorGridlines: Excel.ChartGridlines; + /** + * Represents the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly title: Excel.ChartAxisTitle; + /** + * Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + alignment: Excel.ChartTickLabelAlignment | "Center" | "Left" | "Right"; + /** + * Specifies the group for the specified axis. See `Excel.ChartAxisGroup` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly axisGroup: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * Specifies the base unit for the specified category axis. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * Specifies the category axis type. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + categoryType: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; + /** + * Specifies the custom axis display unit value. To set this property, please use the `SetCustomDisplayUnit(double)` method. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly customDisplayUnit: number; + /** + * Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + displayUnit: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; + /** + * Specifies the height, in points, of the chart axis. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly height: number; + /** + * Specifies if the value axis crosses the category axis between categories. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isBetweenCategories: boolean; + /** + * Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly left: number; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat: boolean; + /** + * Specifies the base of the logarithm when using logarithmic scales. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + logBase: number; + /** + * Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + majorTickMark: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minimum: any; + /** + * Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + minorTickMark: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorUnit: any; + /** + * Specifies if an axis is multilevel. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + multiLevel: boolean; + /** + * Specifies the format code for the axis tick label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + offset: number; + /** + * Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * Specifies the axis position where the other axis crosses. You should use the `SetPositionAt(double)` method to set this property. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly positionAt: number; + /** + * Specifies if Excel plots data points from last to first. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder: boolean; + /** + * Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + scaleType: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; + /** + * Specifies if the axis display unit label is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel: boolean; + /** + * Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation: any; + /** + * Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing: any; + /** + * Specifies the number of categories or series between tick marks. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing: number; + /** + * Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly top: number; + /** + * Specifies the axis type. See `Excel.ChartAxisType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly type: Excel.ChartAxisType | "Invalid" | "Category" | "Value" | "Series"; + /** + * Specifies if the axis is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible: boolean; + /** + * Specifies the width, in points, of the chart axis. Returns `null` if the axis is not visible. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param value Custom value of the display unit. + */ + setCustomDisplayUnit(value: number): void; + /** + * Sets the specified axis position where the other axis crosses. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param value Custom value of the crossing point. + */ + 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartAxisLoadOptions): Excel.ChartAxis; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartAxis; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Encapsulates the format properties for the chart axis. + * + * @remarks + * [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; + /** + * Specifies chart fill formatting. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly fill: Excel.ChartFill; + /** + * Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.ChartFont; + /** + * Specifies chart line formatting. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartAxisFormatLoadOptions): Excel.ChartAxisFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartAxisFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the title of a chart axis. + * + * @remarks + * [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; + /** + * Specifies the formatting of the chart axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartAxisTitleFormat; + /** + * Specifies the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text: string; + /** + * Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + textOrientation: number; + /** + * Specifies if the axis title is visibile. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartAxisTitleLoadOptions): Excel.ChartAxisTitle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartAxisTitle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the chart axis title formatting. + * + * @remarks + * [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; + /** + * Specifies the chart axis title's border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * Specifies the chart axis title's fill formatting. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly fill: Excel.ChartFill; + /** + * Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartAxisTitleFormatLoadOptions): Excel.ChartAxisTitleFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartAxisTitleFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a collection of all the data labels on a chart point. + * + * @remarks + * [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; + /** + * Specifies the format of chart data labels, which includes fill and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartDataLabelFormat; + /** + * Specifies if data labels automatically generate appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText: boolean; + /** + * TODO: + * + * @remarks + * [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"; + /** + * Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when the `TextOrientation` of data label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat: boolean; + /** + * Specifies the format code for data labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + separator: string; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly showAsDataCallout: boolean; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showBubbleSize: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showCategoryName: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showLegendKey: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showPercentage: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showSeriesName: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showValue: boolean; + /** + * Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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 the data label is -90, 90, or 180. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartDataLabelsLoadOptions): Excel.ChartDataLabels; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartDataLabels; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the data label of a chart point. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly format: Excel.ChartDataLabelFormat; + /** + * Specifies if the data label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText: boolean; + /** + * String value that represents the formula of chart data label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula: string; + /** + * TODO: + * + * @remarks + * [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"; + /** + * Returns the height, in points, of the chart data label. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left: number; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat: boolean; + /** + * String value that represents the format code for data label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + separator: string; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly showAsDataCallout: boolean; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showBubbleSize: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showCategoryName: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showLegendKey: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showPercentage: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showSeriesName: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showValue: boolean; + /** + * String representing the text of the data label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text: string; + /** + * Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Returns the width, in points, of the chart data label. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * @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; + /** + * Get the substring of a chart data label. Line break '\n' counts one character. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param start The zero-based index of the first character to get from the text range. + * @param length Optional. The number of characters to be returned in the new text range. If length is omitted, all the characters from start to the end of the text range's last paragraph will be returned. + */ + getSubstring(start: number, length?: number): Excel.ChartFormatString; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartDataLabelLoadOptions): Excel.ChartDataLabel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartDataLabel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Encapsulates the format properties for the chart data labels. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * Represents the fill format of the current chart data label. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * Represents the font attributes (such as font name, font size, and color) for a chart data label. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartDataLabelFormatLoadOptions): Excel.ChartDataLabelFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartDataLabelFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the data table object of a chart. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + class ChartDataTable 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 a chart data table, which includes fill, font, and border format. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly format: Excel.ChartDataTableFormat; + /** + * Specifies whether to display the horizontal border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showHorizontalBorder: boolean; + /** + * Specifies whether to show the legend key of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showLegendKey: boolean; + /** + * Specifies whether to display the outline border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showOutlineBorder: boolean; + /** + * Specifies whether to display the vertical border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showVerticalBorder: boolean; + /** + * Specifies whether to show the data table of the chart. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + 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. + * @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.ChartDataTableUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartDataTable): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartDataTableLoadOptions): Excel.ChartDataTable; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartDataTable; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.ChartDataTable; + /** + * 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.ChartDataTable object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartDataTableData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ChartDataTableData; + } + /** + * Represents the format of a chart data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + class ChartDataTableFormat 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 data table, which includes color, line style, and weight. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly border: Excel.ChartBorder; + /** + * Represents the fill format of an object, which includes background formatting information. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + readonly fill: Excel.ChartFill; + /** + * Represents the font attributes (such as font name, font size, and color) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + 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. + * @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.ChartDataTableFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartDataTableFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartDataTableFormatLoadOptions): Excel.ChartDataTableFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartDataTableFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.ChartDataTableFormat; + /** + * 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.ChartDataTableFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartDataTableFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ChartDataTableFormatData; + } + /** + * This object represents the attributes for a chart's error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Specifies the formatting type of the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly format: Excel.ChartErrorBarsFormat; + /** + * Specifies if error bars have an end style cap. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endStyleCap: boolean; + /** + * Specifies which parts of the error bars to include. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + include: Excel.ChartErrorBarsInclude | "Both" | "MinusValues" | "PlusValues"; + /** + * The type of range marked by the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: Excel.ChartErrorBarsType | "FixedValue" | "Percent" | "StDev" | "StError" | "Custom"; + /** + * Specifies whether the error bars are displayed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartErrorBarsLoadOptions): Excel.ChartErrorBars; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartErrorBars; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 the chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartErrorBarsFormatLoadOptions): Excel.ChartErrorBarsFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartErrorBarsFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartGridlinesFormat; + /** + * Specifies if the axis gridlines are visible. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartGridlinesLoadOptions): Excel.ChartGridlines; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartGridlines; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Encapsulates the format properties for chart gridlines. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartGridlinesFormatLoadOptions): Excel.ChartGridlinesFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartGridlinesFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the legend in a chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartLegendFormat; + /** + * Represents a collection of legendEntries in the legend. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly legendEntries: Excel.ChartLegendEntryCollection; + /** + * Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height: number; + /** + * Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left: number; + /** + * Specifies if the chart legend should overlap with the main body of the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay: boolean; + /** + * Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; + /** + * Specifies if the legend has a shadow on the chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow: boolean; + /** + * Specifies the top of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top: number; + /** + * Specifies if the chart legend is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible: boolean; + /** + * Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartLegendLoadOptions): Excel.ChartLegend; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartLegend; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the legend entry in `legendEntryCollection`. + * + * @remarks + * [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; + /** + * Specifies the height of the legend entry on the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly height: number; + /** + * Specifies the index of the legend entry in the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly index: number; + /** + * Specifies the left value of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly left: number; + /** + * Specifies the top of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly top: number; + /** + * Represents the visibility of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible: boolean; + /** + * Represents the width of the legend entry on the chart Legend. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartLegendEntryLoadOptions): Excel.ChartLegendEntry; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartLegendEntry; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a collection of legend entries. + * + * @remarks + * [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[]; + /** + * Returns the number of legend entries in the collection. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Returns a legend entry at the given index. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param index Index of the legend entry 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartLegendEntryCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartLegendEntryCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartLegendEntryCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Encapsulates the format properties of a chart legend. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * Represents the fill format of an object, which includes background formatting information. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * Represents the font attributes such as font name, font size, and color of a chart legend. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartLegendFormatLoadOptions): Excel.ChartLegendFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartLegendFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Specifies the series map labels strategy of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + labelStrategy: Excel.ChartMapLabelStrategy | "None" | "BestFit" | "ShowAll"; + /** + * Specifies the series mapping level of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level: Excel.ChartMapAreaLevel | "Automatic" | "DataOnly" | "City" | "County" | "State" | "Country" | "Continent" | "World"; + /** + * Specifies the series projection type of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartMapOptionsLoadOptions): Excel.ChartMapOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartMapOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartTitleFormat; + /** + * Returns the height, in points, of the chart title. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly height: number; + /** + * Specifies the horizontal alignment for chart title. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left: number; + /** + * Specifies if the chart title will overlay the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay: boolean; + /** + * Represents the position of chart title. See `Excel.ChartTitlePosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow: boolean; + /** + * Specifies the chart's title text. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text: string; + /** + * Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + textOrientation: number; + /** + * Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top: number; + /** + * Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Specifies if the chart title is visibile. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible: boolean; + /** + * Specifies the width, in points, of the chart title. Value is `null` if the chart title is not visible. + * + * @remarks + * [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. + * @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' counts one character. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param start Start position of substring to be retrieved. Zero-indexed. + * @param length Length of the 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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTitleLoadOptions): Excel.ChartTitle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTitle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the substring in chart related objects that contain text, like a `ChartTitle` object or `ChartAxisTitle` object. + * + * @remarks + * [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, and color of a chart characters object. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartFormatStringLoadOptions): Excel.ChartFormatString; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartFormatString; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Provides access to the formatting options for a chart title. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly border: Excel.ChartBorder; + /** + * Represents the fill format of an object, which includes background formatting information. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * Represents the font attributes (such as font name, font size, and color) for an object. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTitleFormatLoadOptions): Excel.ChartTitleFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTitleFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the fill formatting for a chart element. + * + * @remarks + * [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; + /** + * Clears the fill color of a chart element. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + clear(): void; + /** + * Gets the uniform color fill formatting of a chart element. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + getSolidColor(): OfficeExtension.ClientResult; + /** + * Sets the fill formatting of a chart element to a uniform color. + * + * @remarks + * [Api set: ExcelApi 1.1] + * + * @param color HTML color code representing the color of the background, in 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; + }; + } + class ChartFillCustom { + /** + * 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; + } + interface ChartFill extends OfficeExtension.ClientObject, ChartFillCustom { + } + /** + * Represents the border formatting of a chart element. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + color: string; + /** + * Represents the line style of the border. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartBorderLoadOptions): Excel.ChartBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 bin options for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Specifies if bin overflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowOverflow: boolean; + /** + * Specifies if bin underflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowUnderflow: boolean; + /** + * Specifies the bin count of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + count: number; + /** + * Specifies the bin overflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + overflowValue: number; + /** + * Specifies the bin's type for a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type: Excel.ChartBinType | "Category" | "Auto" | "BinWidth" | "BinCount"; + /** + * Specifies the bin underflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underflowValue: number; + /** + * Specifies the bin width value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartBinOptionsLoadOptions): Excel.ChartBinOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartBinOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 of a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Specifies if the quartile calculation type of a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + quartileCalculation: Excel.ChartBoxQuartileCalculation | "Inclusive" | "Exclusive"; + /** + * Specifies if inner points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showInnerPoints: boolean; + /** + * Specifies if the mean line is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanLine: boolean; + /** + * Specifies if the mean marker is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanMarker: boolean; + /** + * Specifies if outlier points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartBoxwhiskerOptionsLoadOptions): Excel.ChartBoxwhiskerOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartBoxwhiskerOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * Represents the line style. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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; + /** + * Clears the line format of a chart element. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartLineFormatLoadOptions): Excel.ChartLineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartLineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * This object represents the font attributes (such as font name, font size, and color) for a chart object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * Represents the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic: boolean; + /** + * Font name (e.g., "Calibri") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * Size of the font (e.g., 11) + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size: number; + /** + * Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartFontLoadOptions): Excel.ChartFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * This object represents the attributes for a chart trendline object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly format: Excel.ChartTrendlineFormat; + /** + * Represents the label of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly label: Excel.ChartTrendlineLabel; + /** + * Represents the number of periods that the trendline extends backward. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + backwardPeriod: number; + /** + * Represents the number of periods that the trendline extends forward. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + intercept: any; + /** + * Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod: number; + /** + * Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name: string; + /** + * Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + polynomialOrder: number; + /** + * True if the equation for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showEquation: boolean; + /** + * True if the r-squared value for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showRSquared: boolean; + /** + * Represents the type of a chart trendline. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTrendlineLoadOptions): Excel.ChartTrendline; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTrendline; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a collection of chart trendlines. + * + * @remarks + * [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[]; + /** + * Adds a new trendline to trendline collection. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a trendline object by index, which is the insertion order in the items array. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param index Represents the insertion order in the 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTrendlineCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartTrendlineCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTrendlineCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents the format properties for the chart trendline. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTrendlineFormatLoadOptions): Excel.ChartTrendlineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTrendlineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * This object represents the attributes for a chart trendline label object. + * + * @remarks + * [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; + /** + * The format of the chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly format: Excel.ChartTrendlineLabelFormat; + /** + * Specifies if the trendline label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText: boolean; + /** + * String value that represents the formula of the chart trendline label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula: string; + /** + * Returns the height, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly height: number; + /** + * Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left: number; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat: boolean; + /** + * String value that represents the format code for the trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * String representing the text of the trendline label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text: string; + /** + * Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation: number; + /** + * Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top: number; + /** + * Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Returns the width, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTrendlineLabelLoadOptions): Excel.ChartTrendlineLabel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTrendlineLabel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Encapsulates the format properties for the chart trendline label. + * + * @remarks + * [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; + /** + * Specifies the border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * Specifies the fill format of the current chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly fill: Excel.ChartFill; + /** + * Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartTrendlineLabelFormatLoadOptions): Excel.ChartTrendlineLabelFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartTrendlineLabelFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * This object represents the attributes for a chart plot area. + * + * @remarks + * [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; + /** + * Specifies the formatting of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly format: Excel.ChartPlotAreaFormat; + /** + * Specifies the height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height: number; + /** + * Specifies the inside height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideHeight: number; + /** + * Specifies the inside left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideLeft: number; + /** + * Specifies the inside top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideTop: number; + /** + * Specifies the inside width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideWidth: number; + /** + * Specifies the left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left: number; + /** + * Specifies the position of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position: Excel.ChartPlotAreaPosition | "Automatic" | "Custom"; + /** + * Specifies the top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top: number; + /** + * Specifies the width value of a plot area. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartPlotAreaLoadOptions): Excel.ChartPlotArea; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartPlotArea; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the format properties for a chart plot area. + * + * @remarks + * [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; + /** + * Specifies the border attributes of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * Specifies the fill format of an object, which includes background formatting information. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ChartPlotAreaFormatLoadOptions): Excel.ChartPlotAreaFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ChartPlotAreaFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Manages sorting operations on `Range` objects. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * 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; + }; + } + /** + * Manages sorting operations on `Table` objects. + * + * @remarks + * [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; + /** + * Specifies the current conditions used to last sort the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly fields: Excel.SortField[]; + /** + * Specifies if the casing impacts the last sort of the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly matchCase: boolean; + /** + * Represents the Chinese character ordering method last used to sort the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly method: Excel.SortMethod | "PinYin" | "StrokeCount"; + /** + * Perform a sort operation. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + clear(): void; + /** + * Reapplies the current sorting parameters to the table. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableSortLoadOptions): Excel.TableSort; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableSort; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a condition in a sorting operation. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface SortField { + /** + * Specifies if the sorting is done in an ascending fashion. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + ascending?: boolean; + /** + * Specifies the color that is the target of the condition if the sorting is on font or cell color. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + color?: string; + /** + * Represents additional sorting options for this field. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + dataOption?: Excel.SortDataOption | "Normal" | "TextAsNumber"; + /** + * Specifies the icon that is the target of the condition, if the sorting is on the cell's icon. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + icon?: Excel.Icon; + /** + * Specifies the column (or row, depending on the sort orientation) that the condition is on. Represented as an offset from the first column (or row). + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + key: number; + /** + * Specifies the type of sorting of this condition. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + sortOn?: Excel.SortOn | "Value" | "CellColor" | "FontColor" | "Icon"; + /** + * Specifies the subfield that is the target property name of a rich value to sort on. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subField?: string; + } + /** + * Manages the filtering of a table's column. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + readonly criteria: Excel.FilterCriteria; + /** + * Apply the given filter criteria on the given column. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + * + * @param criteria The dynamic criteria to apply. + */ + applyDynamicFilter(criteria: Excel.DynamicFilterCriteria): void; + /** + * Apply a "Dynamic" filter to the column. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.FilterLoadOptions): Excel.Filter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Filter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the filtering criteria applied to a column. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface FilterCriteria { + /** + * The HTML color string used to filter cells. Used with `cellColor` and `fontColor` filtering. + * + * @remarks + * [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 numbers 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`). + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + criterion2?: string; + /** + * The dynamic criteria from the `Excel.DynamicFilterCriteria` set to apply on this column. Used with `dynamic` filtering. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + icon?: Excel.Icon; + /** + * The operator used to combine criterion 1 and 2 when using `custom` filtering. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + operator?: Excel.FilterOperator | "And" | "Or"; + /** + * The property used by the filter to do a rich filter on rich values. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subField?: string; + /** + * The set of values to be used as part of `values` filtering. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + values?: Array; + } + /** + * Represents how to filter a date when filtering on values. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface FilterDatetime { + /** + * The date in ISO8601 format used to filter data. + * + * @remarks + * [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 specificity is set to "month", the filter operation will keep all rows with a date in the month of April 2005. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + specificity: Excel.FilterDatetimeSpecificity | "Year" | "Month" | "Day" | "Hour" | "Minute" | "Second"; + } + /** + * Represents the `AutoFilter` object. + AutoFilter turns the values in Excel column into specific filters based on the cell contents. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * An array that holds all the filter criteria in the autofiltered range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly criteria: Excel.FilterCriteria[]; + /** + * Specifies if the AutoFilter is enabled. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly enabled: boolean; + /** + * Specifies if the AutoFilter has filter criteria. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly isDataFiltered: boolean; + /** + * Applies the AutoFilter to a range. This filters the column if column index and filter criteria are specified. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param range The range on which the AutoFilter will apply. + * @param columnIndex The zero-based column index to which the AutoFilter is applied. + * @param criteria The filter criteria. + */ + apply(range: Range | string, columnIndex?: number, criteria?: Excel.FilterCriteria): void; + /** + * Clears the column filter criteria of the AutoFilter. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param columnIndex The zero-based column index, which represents which column filter needs to be cleared. + * If the index value is not supported (for example, if the value is a negative number, or if the value is greater than the number of available columns in the range), + * then an `InvalidArgument` error will be thrown. + */ + clearColumnCriteria(columnIndex: number): void; + /** + * Clears the filter criteria and sort state of the AutoFilter. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + clearCriteria(): void; + /** + * Returns the `Range` object that represents the range to which the AutoFilter applies. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getRange(): Excel.Range; + /** + * Returns the `Range` object that represents the range to which the AutoFilter applies. + If there is no `Range` object associated with the AutoFilter, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getRangeOrNullObject(): Excel.Range; + /** + * Applies the specified AutoFilter object currently on the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + reapply(): void; + /** + * Removes the AutoFilter for the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + remove(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.AutoFilterLoadOptions): Excel.AutoFilter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.AutoFilter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + class CultureInfo 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; + /** + * Defines the culturally appropriate format of displaying date and time. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly datetimeFormat: Excel.DatetimeFormatInfo; + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly numberFormat: Excel.NumberFormatInfo; + /** + * Gets the culture name in the format languagecode2-country/regioncode2 (e.g., "zh-cn" or "en-us"). This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly name: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CultureInfoLoadOptions): Excel.CultureInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CultureInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.CultureInfo; + /** + * 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.CultureInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CultureInfoData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.CultureInfoData; + } + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + class NumberFormatInfo 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 currency symbol for currency values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + readonly currencySymbol: string; + /** + * Gets the string used as the decimal separator for numeric values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly numberDecimalSeparator: string; + /** + * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly numberGroupSeparator: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NumberFormatInfoLoadOptions): Excel.NumberFormatInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NumberFormatInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.NumberFormatInfo; + /** + * 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.NumberFormatInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NumberFormatInfoData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.NumberFormatInfoData; + } + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + class DatetimeFormatInfo 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 string used as the date separator. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly dateSeparator: string; + /** + * Gets the format string for a long date value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly longDatePattern: string; + /** + * Gets the format string for a long time value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly longTimePattern: string; + /** + * Gets the format string for a short date value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly shortDatePattern: string; + /** + * Gets the string used as the time separator. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly timeSeparator: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DatetimeFormatInfoLoadOptions): Excel.DatetimeFormatInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DatetimeFormatInfo; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.DatetimeFormatInfo; + /** + * 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.DatetimeFormatInfo object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DatetimeFormatInfoData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.DatetimeFormatInfoData; + } + /** + * Represents a cell icon. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface Icon { + /** + * Specifies the index of the icon in the given set. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + index: number; + /** + * Specifies the set that the icon is part of. + * + * @remarks + * [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. + * + * @remarks + * [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[]; + /** + * Gets the number of CustomXML parts in this collection. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom XML part based on its ID. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + getOnlyItem(): Excel.CustomXmlPart; + /** + * If the collection contains exactly one item, this method returns it. + Otherwise, this method returns `null`. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomXmlPartScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * A collection of custom XML parts. + * + * @remarks + * [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[]; + /** + * Adds a new custom XML part to the workbook. + * + * @remarks + * [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. + * + * @remarks + * [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 custom XML parts in the collection. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom XML part based on its ID. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CustomXmlPartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomXmlPartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents a custom XML part object in a workbook. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + readonly id: string; + /** + * The custom XML part's namespace URI. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + readonly namespaceUri: string; + /** + * Deletes the custom XML part. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + delete(): void; + /** + * Gets the custom XML part's full XML content. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + getXml(): OfficeExtension.ClientResult; + /** + * Sets the custom XML part's full XML content. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CustomXmlPartLoadOptions): Excel.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a scoped collection of PivotTables. The PivotTables are sorted based on the location of the PivotTable's top-left corner. They are ordered top-to-bottom and then left-to-right. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + class PivotTableScopedCollection 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[]; + /** + * Gets the number of PivotTables in the collection. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the first PivotTable in the collection. The PivotTables in the collection are sorted top-to-bottom and left-to-right, such that top-left table is the first PivotTable in the collection. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getFirst(): Excel.PivotTable; + /** + * Gets the first PivotTable in the collection. The PivotTables in the collection are sorted top-to-bottom and left-to-right, such that the top-left table is the first PivotTable in the collection. + If the collection is empty, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + getFirstOrNullObject(): Excel.PivotTable; + /** + * Gets a PivotTable by name. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param key Name of the PivotTable to be retrieved. + */ + getItem(key: string): Excel.PivotTable; + /** + * Gets a PivotTable by name. If the PivotTable does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param name Name of the PivotTable to be retrieved. + */ + getItemOrNullObject(name: string): Excel.PivotTable; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotTableScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotTableScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.PivotTableScopedCollection; + /** + * 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.PivotTableScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.PivotTableScopedCollectionData; + } + /** + * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * + * @remarks + * [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[]; + /** + * Add a PivotTable based on the specified source data and insert it at the top-left cell of the destination range. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a PivotTable by name. + * + * @remarks + * [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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotTableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotTableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + class PivotTableCollectionCustom { + } + interface PivotTableCollection extends OfficeExtension.ClientObject, PivotTableCollectionCustom { + } + /** + * Represents the DateTime Grouping condition. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum PivotTableDateGroupBy { + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + bySeconds = "BySeconds", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + byMinutes = "ByMinutes", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + byHours = "ByHours", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + byDays = "ByDays", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + byMonths = "ByMonths", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + byQuarters = "ByQuarters", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + byYears = "ByYears" + } + /** + * Represents an Excel PivotTable. + To learn more about the PivotTable object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-pivottables | Work with PivotTables using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly columnHierarchies: Excel.RowColumnPivotHierarchyCollection; + /** + * The Data Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly dataHierarchies: Excel.DataPivotHierarchyCollection; + /** + * The Filter Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly filterHierarchies: Excel.FilterPivotHierarchyCollection; + /** + * The Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly hierarchies: Excel.PivotHierarchyCollection; + /** + * The PivotLayout describing the layout and visual structure of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly layout: Excel.PivotLayout; + /** + * The Row Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly rowHierarchies: Excel.RowColumnPivotHierarchyCollection; + /** + * The worksheet containing the current PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + readonly worksheet: Excel.Worksheet; + /** + * Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + allowMultipleFiltersPerField: boolean; + /** + * Specifies if the PivotTable allows values in the data body to be edited by the user. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableDataValueEditing: boolean; + /** + * ID of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + readonly id: string; + /** + * Name of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + name: string; + /** + * Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + refreshOnOpen: boolean; + /** + * Specifies if the PivotTable uses custom lists when sorting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + delete(): void; + /** + * Returns the string representation of the data source for the PivotTable. This method currently supports string representations for table and range objects. + Otherwise, it returns an empty string. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + getDataSourceString(): OfficeExtension.ClientResult; + /** + * Gets the type of the data source for the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + getDataSourceType(): OfficeExtension.ClientResult; + /** + * Refreshes the PivotTable. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotTableLoadOptions): Excel.PivotTable; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotTable; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the visual layout of the PivotTable. + * + * @remarks + * [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; + /** + * The style applied to the PivotTable. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly pivotStyle: Excel.PivotTableStyle; + /** + * The alt text description of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextDescription: string; + /** + * The alt text title of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextTitle: string; + /** + * Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFormat: boolean; + /** + * The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. + Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. + By default, this is an empty string. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + emptyCellText: string; + /** + * Specifies if the field list can be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + enableFieldList: boolean; + /** + * Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. + Note that the value of `emptyCellText` persists when this property is set to `false`. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + fillEmptyCells: boolean; + /** + * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layoutType: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; + /** + * Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + preserveFormatting: boolean; + /** + * Specifies if the PivotTable report shows grand totals for columns. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showColumnGrandTotals: boolean; + /** + * Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + showFieldHeaders: boolean; + /** + * Specifies if the PivotTable report shows grand totals for rows. + * + * @remarks + * [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`. + * + * @remarks + * [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. + * @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; + /** + * Sets whether or not to display a blank line after each item. This is set at the global level for the PivotTable and applied to individual PivotFields. + This function overwrites the setting for all fields in the PivotTable to the value of `display` parameter. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param display True turns on the blank-line display setting. False turns it off. + */ + displayBlankLineAfterEachItem(display: boolean): void; + /** + * Gets a unique cell in the PivotTable based on a data hierarchy and the row and column items of their respective hierarchies. The returned cell is the intersection of the given row and column that contains the data from the given hierarchy. This method is the inverse of calling `getPivotItems` and `getDataHierarchy` on a particular cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getColumnLabelRange(): Excel.Range; + /** + * Returns the range where the PivotTable's data values reside. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param cell A single cell within the PivotTable data body. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param axis The axis from which to get the PivotItems. Must be either "row" or "column." + * @param cell A single cell within the PivotTable's data body. + * @returns A PivotItemCollection of the PivotItems that are used to calculate the values in the specified row. + */ + getPivotItems(axis: Excel.PivotAxis, cell: Range | string): Excel.PivotItemCollection; + /** + * Gets the PivotItems from an axis that make up the value in a specified range within the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param axis The axis from which to get the PivotItems. Must be either "row" or "column." + * @param cell A single cell within the PivotTable's data body. + * @returns A PivotItemCollection of the PivotItems that are used to calculate the values in the specified row. + */ + getPivotItems(axis: "Unknown" | "Row" | "Column" | "Data" | "Filter", cell: Range | string): Excel.PivotItemCollection; + /** + * Returns the range the PivotTable exists on, excluding the filter area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getRange(): Excel.Range; + /** + * Returns the range where the PivotTable's row labels reside. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getRowLabelRange(): Excel.Range; + /** + * Sets the "repeat all item labels" setting across all fields in the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.13] + * + * @param repeatLabels True turns on the label-repetition display setting. False turns it off. + */ + repeatAllItemLabels(repeatLabels: boolean): void; + /** + * Sets the PivotTable to automatically sort using the specified cell to automatically select all necessary criteria and context. This behaves identically to applying an autosort from the UI. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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 the PivotTable to automatically sort using the specified cell to automatically select all necessary criteria and context. This behaves identically to applying an autosort from the UI. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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; + /** + * Sets the style applied to the PivotTable. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param style The style to apply to the PivotTable. An `InvalidArgumentException` is thrown if a string is provided that does not match the name of any style. + */ + setStyle(style: string | PivotTableStyle | BuiltInPivotTableStyle): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotLayoutLoadOptions): Excel.PivotLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a collection of all the PivotHierarchies that are part of the PivotTable. + * + * @remarks + * [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[]; + /** + * Gets the number of pivot hierarchies in the collection. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a PivotHierarchy by its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotHierarchy to be retrieved. + */ + getItem(name: string): Excel.PivotHierarchy; + /** + * Gets a PivotHierarchy by name. If the PivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents the Excel PivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly fields: Excel.PivotFieldCollection; + /** + * ID of the PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * Name of the PivotHierarchy. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotHierarchyLoadOptions): Excel.PivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a collection of RowColumnPivotHierarchy items associated with the PivotTable. + * + * @remarks + * [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[]; + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + add(pivotHierarchy: Excel.PivotHierarchy): Excel.RowColumnPivotHierarchy; + /** + * Gets the number of pivot hierarchies in the collection. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a RowColumnPivotHierarchy by its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the RowColumnPivotHierarchy to be retrieved. + */ + getItem(name: string): Excel.RowColumnPivotHierarchy; + /** + * Gets a RowColumnPivotHierarchy by name. If the RowColumnPivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RowColumnPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RowColumnPivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RowColumnPivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents the Excel RowColumnPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly fields: Excel.PivotFieldCollection; + /** + * ID of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * Name of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * Position of the RowColumnPivotHierarchy. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RowColumnPivotHierarchyLoadOptions): Excel.RowColumnPivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RowColumnPivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a collection of FilterPivotHierarchy items associated with the PivotTable. + * + * @remarks + * [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[]; + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + add(pivotHierarchy: Excel.PivotHierarchy): Excel.FilterPivotHierarchy; + /** + * Gets the number of pivot hierarchies in the collection. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a FilterPivotHierarchy by its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the FilterPivotHierarchy to be retrieved. + */ + getItem(name: string): Excel.FilterPivotHierarchy; + /** + * Gets a FilterPivotHierarchy by name. If the FilterPivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.FilterPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.FilterPivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.FilterPivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents the Excel FilterPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly fields: Excel.PivotFieldCollection; + /** + * Determines whether to allow multiple filter items. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems: boolean; + /** + * ID of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * Name of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * Position of the FilterPivotHierarchy. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.FilterPivotHierarchyLoadOptions): Excel.FilterPivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.FilterPivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a collection of DataPivotHierarchy items associated with the PivotTable. + * + * @remarks + * [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[]; + /** + * Adds the PivotHierarchy to the current axis. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + add(pivotHierarchy: Excel.PivotHierarchy): Excel.DataPivotHierarchy; + /** + * Gets the number of pivot hierarchies in the collection. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a DataPivotHierarchy by its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the DataPivotHierarchy to be retrieved. + */ + getItem(name: string): Excel.DataPivotHierarchy; + /** + * Gets a DataPivotHierarchy by name. If the DataPivotHierarchy does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DataPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.DataPivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DataPivotHierarchyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents the Excel DataPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly field: Excel.PivotField; + /** + * ID of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * Name of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * Number format of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * Position of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position: number; + /** + * Specifies if the data should be shown as a specific summary calculation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAs: Excel.ShowAsRule; + /** + * Specifies if all items of the DataPivotHierarchy are shown. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DataPivotHierarchyLoadOptions): Excel.DataPivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DataPivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ShowAsRule { + /** + * The PivotField to base the `ShowAs` calculation on, if applicable according to the `ShowAsCalculation` type, else `null`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + baseField?: Excel.PivotField; + /** + * The item to base the `ShowAs` calculation on, if applicable according to the `ShowAsCalculation` type, else `null`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + baseItem?: Excel.PivotItem; + /** + * The `ShowAs` calculation to use for the PivotField. See `Excel.ShowAsCalculation` for details. + * + * @remarks + * [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 PivotFields that are part of a PivotTable's hierarchy. + * + * @remarks + * [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[]; + /** + * Gets the number of pivot fields in the collection. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a PivotField by its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotField to be retrieved. + */ + getItem(name: string): Excel.PivotField; + /** + * Gets a PivotField by name. If the PivotField does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotField 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotFieldCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotFieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotFieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents the Excel PivotField. + * + * @remarks + * [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 PivotItems associated with the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly items: Excel.PivotItemCollection; + /** + * ID of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * Name of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * Determines whether to show all items of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAllItems: boolean; + /** + * Subtotals of the PivotField. + * + * @remarks + * [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. + * @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; + /** + * Sets one or more of the field's current PivotFilters and applies them to the field. + If the provided filters are invalid or cannot be applied, an exception is thrown. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param filter A configured specific PivotFilter, or a PivotFilters interface containing multiple configured filters. + */ + applyFilter(filter: Excel.PivotFilters): void; + /** + * Clears all criteria from all of the field's filters. This removes any active filtering on the field. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + clearAllFilters(): void; + /** + * Clears all existing criteria from the field's filter of the given type (if one is currently applied). + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param filterType The type of filter on the field of which to clear all criteria. + */ + clearFilter(filterType: Excel.PivotFilterType): void; + /** + * Clears all existing criteria from the field's filter of the given type (if one is currently applied). + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param filterType The type of filter on the field of which to clear all criteria. + */ + clearFilter(filterType: "Unknown" | "Value" | "Manual" | "Label" | "Date"): void; + /** + * Gets all filters currently applied on the field. + * + * @remarks + * [Api set: ExcelApi 1.12] + * @returns A PivotFilters interface with all active filters. + */ + getFilters(): OfficeExtension.ClientResult; + /** + * Checks if there are any applied filters on the field. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param filterType The filter type to check. If no type is provided, this method will check if any filter is applied. + * @returns True if the field has a filter of type `filterType` applied. If `filterType` is not specified, `true` is returned if the field has any applied filters. + */ + isFiltered(filterType?: Excel.PivotFilterType): OfficeExtension.ClientResult; + /** + * Checks if there are any applied filters on the field. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param filterType The filter type to check. If no type is provided, this method will check if any filter is applied. + * @returns True if the field has a filter of type `filterType` applied. If `filterType` is not specified, `true` is returned if the field has any applied filters. + */ + isFiltered(filterType?: "Unknown" | "Value" | "Manual" | "Label" | "Date"): OfficeExtension.ClientResult; + /** + * 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param sortBy Specifies if the sorting is done in ascending or descending order. + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param sortBy Specifies if the sorting is done in ascending or descending order. + * @param valuesHierarchy Specifies the values hierarchy on the data axis 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param sortBy Specifies if the sorting is done in ascending or descending order. + * @param valuesHierarchy Specifies the values hierarchy on the data axis 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotFieldLoadOptions): Excel.PivotField; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotField; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a collection of all the PivotItems related to their parent PivotField. + * + * @remarks + * [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[]; + /** + * Gets the number of PivotItems in the collection. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a PivotItem by its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotItem to be retrieved. + */ + getItem(name: string): Excel.PivotItem; + /** + * Gets a PivotItem by name. If the PivotItem does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotItem 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents the Excel PivotItem. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isExpanded: boolean; + /** + * Name of the PivotItem. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * Specifies if the PivotItem is visible. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotItemLoadOptions): Excel.PivotItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Subtotals for the Pivot Field. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface Subtotals { + /** + * If `Automatic` is set to `true`, then all other values will be ignored when setting the `Subtotals`. + * + * @remarks + * [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 criteria for the top/bottom values filter. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PivotFilterTopBottomCriterion { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + topItems = "TopItems", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + topPercent = "TopPercent", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + topSum = "TopSum", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomItems = "BottomItems", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomPercent = "BottomPercent", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomSum = "BottomSum" + } + /** + * Represents the sort direction. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum SortBy { + /** + * Ascending sort. Smallest to largest or A to Z. + * @remarks + * [Api set: ExcelApi 1.8] + */ + ascending = "Ascending", + /** + * Descending sort. Largest to smallest or Z to A. + * @remarks + * [Api set: ExcelApi 1.8] + */ + descending = "Descending" + } + /** + * Aggregation function for the `DataPivotHierarchy`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum AggregationFunction { + /** + * Aggregation function is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.8] + */ + unknown = "Unknown", + /** + * Excel will automatically select the aggregation based on the data items. + * @remarks + * [Api set: ExcelApi 1.8] + */ + automatic = "Automatic", + /** + * Aggregate using the sum of the data, equivalent to the SUM function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + sum = "Sum", + /** + * Aggregate using the count of items in the data, equivalent to the COUNTA function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + count = "Count", + /** + * Aggregate using the average of the data, equivalent to the AVERAGE function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + average = "Average", + /** + * Aggregate using the maximum value of the data, equivalent to the MAX function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + max = "Max", + /** + * Aggregate using the minimum value of the data, equivalent to the MIN function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + min = "Min", + /** + * Aggregate using the product of the data, equivalent to the PRODUCT function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + product = "Product", + /** + * Aggregate using the count of numbers in the data, equivalent to the COUNT function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + countNumbers = "CountNumbers", + /** + * Aggregate using the standard deviation of the data, equivalent to the STDEV function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + standardDeviation = "StandardDeviation", + /** + * Aggregate using the standard deviation of the data, equivalent to the STDEVP function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + standardDeviationP = "StandardDeviationP", + /** + * Aggregate using the variance of the data, equivalent to the VAR function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + variance = "Variance", + /** + * Aggregate using the variance of the data, equivalent to the VARP function. + * @remarks + * [Api set: ExcelApi 1.8] + */ + varianceP = "VarianceP" + } + /** + * The ShowAs calculation function for the DataPivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ShowAsCalculation { + /** + * Calculation is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.8] + */ + unknown = "Unknown", + /** + * No calculation is applied. + * @remarks + * [Api set: ExcelApi 1.8] + */ + none = "None", + /** + * Percent of the grand total. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOfGrandTotal = "PercentOfGrandTotal", + /** + * Percent of the row total. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOfRowTotal = "PercentOfRowTotal", + /** + * Percent of the column total. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOfColumnTotal = "PercentOfColumnTotal", + /** + * Percent of the row total for the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOfParentRowTotal = "PercentOfParentRowTotal", + /** + * Percent of the column total for the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOfParentColumnTotal = "PercentOfParentColumnTotal", + /** + * Percent of the grand total for the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOfParentTotal = "PercentOfParentTotal", + /** + * Percent of the specified Base field and Base item. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentOf = "PercentOf", + /** + * Running total of the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + runningTotal = "RunningTotal", + /** + * Percent running total of the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentRunningTotal = "PercentRunningTotal", + /** + * Difference from the specified Base field and Base item. + * @remarks + * [Api set: ExcelApi 1.8] + */ + differenceFrom = "DifferenceFrom", + /** + * Difference from the specified Base field and Base item. + * @remarks + * [Api set: ExcelApi 1.8] + */ + percentDifferenceFrom = "PercentDifferenceFrom", + /** + * Ascending rank of the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + rankAscending = "RankAscending", + /** + * Descending rank of the specified Base field. + * @remarks + * [Api set: ExcelApi 1.8] + */ + rankDecending = "RankDecending", + /** + * Calculates the values as follows: + ((value in cell) x (Grand Total of Grand Totals)) / ((Grand Row Total) x (Grand Column Total)) + * @remarks + * [Api set: ExcelApi 1.8] + */ + index = "Index" + } + /** + * Represents the axis from which to get the PivotItems. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PivotAxis { + /** + * The axis or region is unknown or unsupported. + * @remarks + * [Api set: ExcelApi 1.9] + */ + unknown = "Unknown", + /** + * The row axis. + * @remarks + * [Api set: ExcelApi 1.9] + */ + row = "Row", + /** + * The column axis. + * @remarks + * [Api set: ExcelApi 1.9] + */ + column = "Column", + /** + * The data axis. + * @remarks + * [Api set: ExcelApi 1.9] + */ + data = "Data", + /** + * The filter axis. + * @remarks + * [Api set: ExcelApi 1.9] + */ + filter = "Filter" + } + /** + * Represents a worksheet-level custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + class WorksheetCustomProperty 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. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly key: string; + /** + * Gets or sets the value of the custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + value: 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. + * @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.WorksheetCustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.WorksheetCustomProperty): void; + /** + * Deletes the custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorksheetCustomPropertyLoadOptions): Excel.WorksheetCustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorksheetCustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.WorksheetCustomProperty; + /** + * 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.WorksheetCustomProperty object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetCustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.WorksheetCustomPropertyData; + } + /** + * Contains the collection of worksheet-level custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + class WorksheetCustomPropertyCollection 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.WorksheetCustomProperty[]; + /** + * Adds a new custom property that maps to the provided key. This overwrites existing custom properties with that key. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param key The key that identifies the custom property object. It is case-insensitive.The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) + * @param value The value of this custom property. + */ + add(key: string, value: string): Excel.WorksheetCustomProperty; + /** + * Gets the number of custom properties on this worksheet. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom property object by its key, which is case-insensitive. Throws an error if the custom property does not exist. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param key The key that identifies the custom property object. It is case-insensitive. + */ + getItem(key: string): Excel.WorksheetCustomProperty; + /** + * Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param key The key that identifies the custom property object. It is case-insensitive. + */ + getItemOrNullObject(key: string): Excel.WorksheetCustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.WorksheetCustomPropertyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.WorksheetCustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.WorksheetCustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.WorksheetCustomPropertyCollection; + /** + * 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.WorksheetCustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetCustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.WorksheetCustomPropertyCollectionData; + } + /** + * Represents workbook properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly custom: Excel.CustomPropertyCollection; + /** + * The author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + author: string; + /** + * The category of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + category: string; + /** + * The comments of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + comments: string; + /** + * The company of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + company: string; + /** + * Gets the creation date of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly creationDate: Date; + /** + * The keywords of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + keywords: string; + /** + * Gets the last author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly lastAuthor: string; + /** + * The manager of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + manager: string; + /** + * Gets the revision number of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + revisionNumber: number; + /** + * The subject of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + subject: string; + /** + * The title of the workbook. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DocumentPropertiesLoadOptions): Excel.DocumentProperties; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DocumentProperties; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a custom property. + * + * @remarks + * [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; + /** + * The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly key: string; + /** + * The type of the value used for the custom property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly type: Excel.DocumentPropertyType | "Number" | "Boolean" | "Date" | "String" | "Float"; + /** + * The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CustomPropertyLoadOptions): Excel.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Contains the collection of custom properties. + * + * @remarks + * [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[]; + /** + * Creates a new or sets an existing custom property. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param key Required. The custom property's key, which is case-insensitive. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). + * @param value Required. The custom property's value. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + */ + add(key: string, value: any): Excel.CustomProperty; + /** + * Deletes all custom properties in this collection. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + deleteAll(): void; + /** + * Gets the count of custom properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom property object by its key, which is case-insensitive. Throws an error if the custom property does not exist. + * + * @remarks + * [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. If the custom property doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CustomPropertyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents a collection of all the conditional formats that are overlap the range. + * + * @remarks + * [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[]; + /** + * Adds a new conditional format to the collection at the first/top priority. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + clearAll(): void; + /** + * Returns the number of conditional formats in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Returns a conditional format for the given ID. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + * + * @param index Index of the conditional formats to be retrieved. + */ + getItemAt(index: number): Excel.ConditionalFormat; + /** + * Returns a conditional format identified by its ID. + If the conditional format object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param id The ID of the conditional format. + */ + getItemOrNullObject(id: string): Excel.ConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalFormatCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalFormatCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalFormatCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * An object encapsulating a conditional format's range, format, rule, and other properties. + To learn more about the conditional formatting object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-conditional-formatting | Apply conditional formatting to Excel ranges}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly cellValueOrNullObject: Excel.CellValueConditionalFormat; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly colorScale: Excel.ColorScaleConditionalFormat; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly colorScaleOrNullObject: Excel.ColorScaleConditionalFormat; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly custom: Excel.CustomConditionalFormat; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly customOrNullObject: Excel.CustomConditionalFormat; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly dataBar: Excel.DataBarConditionalFormat; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly dataBarOrNullObject: Excel.DataBarConditionalFormat; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly iconSet: Excel.IconSetConditionalFormat; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly iconSetOrNullObject: Excel.IconSetConditionalFormat; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly preset: Excel.PresetCriteriaConditionalFormat; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly textComparisonOrNullObject: Excel.TextConditionalFormat; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly topBottom: Excel.TopBottomConditionalFormat; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly topBottomOrNullObject: Excel.TopBottomConditionalFormat; + /** + * The priority of the conditional format in the current `ConditionalFormatCollection`. + * + * @remarks + * [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 the 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. + * + * @remarks + * [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. + Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + stopIfTrue: boolean; + /** + * A type of conditional format. Only one can be set at a time. + * + * @remarks + * [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. + * @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; + /** + * Change the conditional format rule type to cell value. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @param properties The properties to set for the cell value conditional format rule. + */ + changeRuleToCellValue(properties: Excel.ConditionalCellValueRule): void; + /** + * Change the conditional format rule type to color scale. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + changeRuleToColorScale(): void; + /** + * Change the conditional format rule type to text comparison. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @param properties The properties to set for the text comparison conditional format rule. + */ + changeRuleToContainsText(properties: Excel.ConditionalTextComparisonRule): void; + /** + * Change the conditional format rule type to custom. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @param formula The formula to set for the custom conditional format rule. + */ + changeRuleToCustom(formula: string): void; + /** + * Change the conditional format rule type to data bar. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + changeRuleToDataBar(): void; + /** + * Change the conditional format rule type to icon set. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + changeRuleToIconSet(): void; + /** + * Change the conditional format rule type to preset criteria. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @param properties The properties to set for the preset criteria conditional format rule. + */ + changeRuleToPresetCriteria(properties: Excel.ConditionalPresetCriteriaRule): void; + /** + * Change the conditional format rule type to top/bottom. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @param properties The properties to set for the top/bottom conditional format rule. + */ + changeRuleToTopBottom(properties: Excel.ConditionalTopBottomRule): void; + /** + * Deletes this conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + getRange(): Excel.Range; + /** + * Returns the range to which the conditonal format is applied. If the conditional format is applied to multiple ranges, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + getRangeOrNullObject(): Excel.Range; + /** + * Returns the `RangeAreas`, comprising one or more rectangular ranges, to which the conditonal format is applied. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getRanges(): Excel.RangeAreas; + /** + * Set the ranges that the conditonal format rule is applied to. + * + * @remarks + * [Api set: ExcelApi 1.17] + * + * @param ranges Collection of one or more ranges for this rule to be applied to. + */ + setRanges(ranges: Range | RangeAreas | string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalFormatLoadOptions): Excel.ConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents an Excel conditional data bar type. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly negativeFormat: Excel.ConditionalDataBarNegativeFormat; + /** + * Representation of all values to the right of the axis in an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly positiveFormat: Excel.ConditionalDataBarPositiveFormat; + /** + * HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no axis is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisColor: string; + /** + * Representation of how the axis is determined for an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisFormat: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; + /** + * Specifies the direction that the data bar graphic should be based on. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule: Excel.ConditionalDataBarRule; + /** + * If `true`, hides the values from the cells where the data bar is applied. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.DataBarConditionalFormatLoadOptions): Excel.DataBarConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.DataBarConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a conditional format for the positive side of the data bar. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor: string; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor: string; + /** + * Specifies if the data bar has a gradient. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalDataBarPositiveFormatLoadOptions): Excel.ConditionalDataBarPositiveFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalDataBarPositiveFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a conditional format for the negative side of the data bar. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor: string; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor: string; + /** + * Specifies if the negative data bar has the same border color as the positive data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor: boolean; + /** + * Specifies if the negative data bar has the same fill color as the positive data bar. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalDataBarNegativeFormatLoadOptions): Excel.ConditionalDataBarNegativeFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalDataBarNegativeFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a rule-type for a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarRule { + /** + * The formula, if required, on which to evaluate the data bar rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * The type of rule for the data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + type: Excel.ConditionalFormatRuleType | "Invalid" | "Automatic" | "LowestValue" | "HighestValue" | "Number" | "Percent" | "Formula" | "Percentile"; + } + /** + * Represents a custom conditional format type. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * Specifies the `Rule` object on this conditional format. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CustomConditionalFormatLoadOptions): Excel.CustomConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CustomConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a rule, for all traditional rule/format pairings. + * + * @remarks + * [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, on which to evaluate the conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula: string; + /** + * The formula, if required, on which to evaluate the conditional format rule in the user's language. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formulaLocal: string; + /** + * The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalFormatRuleLoadOptions): Excel.ConditionalFormatRule; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalFormatRule; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents an icon set criteria for conditional formatting. + * + * @remarks + * [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 icon sets 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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + criteria: Excel.ConditionalIconCriterion[]; + /** + * If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder: boolean; + /** + * If `true`, hides the values and only shows icons. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + showIconOnly: boolean; + /** + * If set, displays the icon set option for the conditional format. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.IconSetConditionalFormatLoadOptions): Excel.IconSetConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.IconSetConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents an icon criterion which contains a type, value, an operator, and an optional custom icon, if not using an icon set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalIconCriterion { + /** + * The custom icon for the current criterion, if different from the default icon set, else `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + customIcon?: Excel.Icon; + /** + * A number or a formula depending on the type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula: string; + /** + * `greaterThan` or `greaterThanOrEqual` for each of the rule types for the icon conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + operator: Excel.ConditionalIconCriterionOperator | "Invalid" | "GreaterThan" | "GreaterThanOrEqual"; + /** + * What the icon conditional formula should be based on. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + type: Excel.ConditionalFormatIconRuleType | "Invalid" | "Number" | "Percent" | "Formula" | "Percentile"; + } + /** + * Represents the color scale criteria for conditional formatting. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions): Excel.ColorScaleConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ColorScaleConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the criteria of the color scale. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalColorScaleCriteria { + /** + * The maximum point of the color scale criterion. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + maximum: Excel.ConditionalColorScaleCriterion; + /** + * The midpoint of the color scale criterion, if the color scale is a 3-color scale. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + midpoint?: Excel.ConditionalColorScaleCriterion; + /** + * The minimum point of the color scale criterion. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + minimum: Excel.ConditionalColorScaleCriterion; + } + /** + * Represents a color scale criterion which contains a type, value, and a color. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalColorScaleCriterion { + /** + * HTML color code representation of the color scale color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * A number, a formula, or `null` (if `type` is `lowestValue`). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * What the criterion conditional formula should be based on. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + type: Excel.ConditionalFormatColorCriterionType | "Invalid" | "LowestValue" | "HighestValue" | "Number" | "Percent" | "Formula" | "Percentile"; + } + /** + * Represents a top/bottom conditional format. + * + * @remarks + * [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 format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * The criteria of the top/bottom conditional format. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions): Excel.TopBottomConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TopBottomConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the rule of the top/bottom conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalTopBottomRule { + /** + * The rank between 1 and 1000 for numeric ranks or 1 and 100 for percent ranks. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + rank: number; + /** + * Format values based on the top or bottom rank. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + type: Excel.ConditionalTopBottomCriterionType | "Invalid" | "TopItems" | "TopPercent" | "BottomItems" | "BottomPercent"; + } + /** + * Represents the preset criteria conditional format such as above average, below average, unique values, contains blank, nonblank, error, and noerror. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * The rule of the conditional format. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions): Excel.PresetCriteriaConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PresetCriteriaConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the preset criteria conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalPresetCriteriaRule { + /** + * The criterion of the conditional format. + * + * @remarks + * [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. + * + * @remarks + * [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 format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * The rule of the conditional format. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TextConditionalFormatLoadOptions): Excel.TextConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TextConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a cell value conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalTextComparisonRule { + /** + * The operator of the text conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + operator: Excel.ConditionalTextOperator | "Invalid" | "Contains" | "NotContains" | "BeginsWith" | "EndsWith"; + /** + * The text value of the conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + text: string; + } + /** + * Represents a cell value conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * Specifies the rule object on this conditional format. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CellValueConditionalFormatLoadOptions): Excel.CellValueConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CellValueConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a cell value conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalCellValueRule { + /** + * The formula, if required, on which to evaluate the conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula1: string; + /** + * The formula, if required, on which to evaluate the conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula2?: string; + /** + * The operator of the cell value conditional format. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly borders: Excel.ConditionalRangeBorderCollection; + /** + * Returns the fill object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly fill: Excel.ConditionalRangeFill; + /** + * Returns the font object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly font: Excel.ConditionalRangeFont; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + Cleared if `null` is passed in. + * + * @remarks + * [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. + * @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; + /** + * Remove the format properties from a conditional format rule. This creates a rule with no format settings. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + clearFormat(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalRangeFormatLoadOptions): Excel.ConditionalRangeFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalRangeFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * This object represents the font attributes (font style, color, etc.) for an object. + * + * @remarks + * [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; + /** + * Specifies if the font is bold. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + bold: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color: string; + /** + * Specifies if the font is italic. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + italic: boolean; + /** + * Specifies the strikethrough status of the font. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + strikethrough: boolean; + /** + * The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalRangeFontLoadOptions): Excel.ConditionalRangeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalRangeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the background of a conditional range object. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalRangeFillLoadOptions): Excel.ConditionalRangeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalRangeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the border of an object. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color: string; + /** + * Constant value that indicates the specific side of the border. See `Excel.ConditionalRangeBorderIndex` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalRangeBorderLoadOptions): Excel.ConditionalRangeBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalRangeBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the border objects that make up range border. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly bottom: Excel.ConditionalRangeBorder; + /** + * Gets the left border. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly left: Excel.ConditionalRangeBorder; + /** + * Gets the right border. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly right: Excel.ConditionalRangeBorder; + /** + * Gets the top border. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + readonly count: number; + /** + * Gets a border object using its name. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalRangeBorderCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ConditionalRangeBorderCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * An object encapsulating a style's format and other properties. + * + * @remarks + * [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 collection of four border objects that represent the style of the four borders. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly borders: Excel.RangeBorderCollection; + /** + * The fill of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly fill: Excel.RangeFill; + /** + * A `Font` object that represents the font of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly font: Excel.RangeFont; + /** + * Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoIndent: boolean; + /** + * Specifies if the style is a built-in style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly builtIn: boolean; + /** + * Specifies if the formula will be hidden when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formulaHidden: boolean; + /** + * Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeAlignment: boolean; + /** + * Specifies if the style includes the color, color index, line style, and weight border properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeBorder: boolean; + /** + * Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeFont: boolean; + /** + * Specifies if the style includes the number format property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeNumber: boolean; + /** + * Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includePatterns: boolean; + /** + * Specifies if the style includes the formula hidden and locked protection properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeProtection: boolean; + /** + * An integer from 0 to 250 that indicates the indent level for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + indentLevel: number; + /** + * Specifies if the object is locked when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + locked: boolean; + /** + * The name of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readonly name: string; + /** + * The format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormat: string; + /** + * The localized format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal: string; + /** + * The reading order for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readingOrder: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + shrinkToFit: boolean; + /** + * The text orientation for the style. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation: number; + /** + * Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * Specifies if Excel wraps the text in the object. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.StyleLoadOptions): Excel.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a collection of all the styles. + * + * @remarks + * [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[]; + /** + * Adds a new style to the collection. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param name Name of the style to be added. + */ + add(name: string): void; + /** + * Gets the number of styles in the collection. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a `Style` by name. + * + * @remarks + * [Api set: ExcelApi 1.7] + * + * @param name Name of the style to be retrieved. + */ + getItem(name: string): Excel.Style; + /** + * Gets a style based on its position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param index Index value of the style object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Style; + /** + * Gets a style by name. + If the style object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param name Name of the style to be retrieved. + */ + getItemOrNullObject(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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.StyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.StyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.StyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Represents a collection of table styles. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class TableStyleCollection 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.TableStyle[]; + /** + * Creates a blank `TableStyle` with the specified name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name The unique name for the new table style. Will throw an `InvalidArgument` error if the name is already in use. + * @param makeUniqueName Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. + * @returns The newly created `TableStyle`. + */ + add(name: string, makeUniqueName?: boolean): Excel.TableStyle; + /** + * Gets the number of table styles in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the default table style for the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The `TableStyle` object that is the current default table style. + */ + getDefault(): Excel.TableStyle; + /** + * Gets a `TableStyle` by name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the table style to be retrieved. + * @returns The `TableStyle` object whose name matches the input. + */ + getItem(name: string): Excel.TableStyle; + /** + * Gets a `TableStyle` by name. If the table style does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the table style to be retrieved. + * @returns The `TableStyle` object whose name matches the input. + */ + getItemOrNullObject(name: string): Excel.TableStyle; + /** + * Sets the default table style for use in the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param newDefaultStyle The `TableStyle` object, or name of the `TableStyle` object, that should be the new default. + */ + setDefault(newDefaultStyle: TableStyle | string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableStyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.TableStyleCollection; + /** + * 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.TableStyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableStyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.TableStyleCollectionData; + } + /** + * Represents a table style, which defines the style elements by region of the table. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class TableStyle 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; + /** + * Specifies the name of the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name: string; + /** + * Specifies if this `TableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * @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.TableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.TableStyle): void; + /** + * Deletes the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Creates a duplicate of this table style with copies of all the style elements. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The new `TableStyle` object that has been duplicated from this table style. + */ + duplicate(): Excel.TableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TableStyleLoadOptions): Excel.TableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.TableStyle; + /** + * 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.TableStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableStyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.TableStyleData; + } + /** + * Represents a collection of PivotTable styles. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class PivotTableStyleCollection 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.PivotTableStyle[]; + /** + * Creates a blank `PivotTableStyle` with the specified name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name The unique name for the new PivotTable style. Will throw an `InvalidArgument` error if the name is already in use. + * @param makeUniqueName Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. + * @returns The newly created `PivotTableStyle`. + */ + add(name: string, makeUniqueName?: boolean): Excel.PivotTableStyle; + /** + * Gets the number of PivotTable styles in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the default PivotTable style for the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The `PivotTableStyle` object that is the current default PivotTable style. + */ + getDefault(): Excel.PivotTableStyle; + /** + * Gets a `PivotTableStyle` by name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the PivotTable style to be retrieved. + * @returns The `PivotTableStyle` object whose name matches the input. + */ + getItem(name: string): Excel.PivotTableStyle; + /** + * Gets a `PivotTableStyle` by name. If the `PivotTableStyle` does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the PivotTable style to be retrieved. + * @returns The `PivotTableStyle` object whose name matches the input. + */ + getItemOrNullObject(name: string): Excel.PivotTableStyle; + /** + * Sets the default PivotTable style for use in the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param newDefaultStyle The `PivotTableStyle` object, or name of the `PivotTableStyle` object, that should be the new default. + */ + setDefault(newDefaultStyle: PivotTableStyle | string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotTableStyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotTableStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.PivotTableStyleCollection; + /** + * 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.PivotTableStyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableStyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.PivotTableStyleCollectionData; + } + /** + * Represents a PivotTable style, which defines style elements by PivotTable region. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class PivotTableStyle 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; + /** + * Specifies the name of the PivotTable style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name: string; + /** + * Specifies if this `PivotTableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * @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.PivotTableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.PivotTableStyle): void; + /** + * Deletes the PivotTable style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Creates a duplicate of this PivotTable style with copies of all the style elements. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The new `PivotTableStyle` object that has been duplicated from this PivotTable style. + */ + duplicate(): Excel.PivotTableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PivotTableStyleLoadOptions): Excel.PivotTableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PivotTableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.PivotTableStyle; + /** + * 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.PivotTableStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableStyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.PivotTableStyleData; + } + /** + * Represents a collection of `SlicerStyle` objects. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class SlicerStyleCollection 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.SlicerStyle[]; + /** + * Creates a blank slicer style with the specified name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name The unique name for the new slicer style. Will throw an `InvalidArgument` exception if the name is already in use. + * @param makeUniqueName Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. + * @returns The newly created `SlicerStyle`. + */ + add(name: string, makeUniqueName?: boolean): Excel.SlicerStyle; + /** + * Gets the number of slicer styles in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the default `SlicerStyle` for the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The `SlicerStyle` object that is the current default slicer style. + */ + getDefault(): Excel.SlicerStyle; + /** + * Gets a `SlicerStyle` by name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the slicer style to be retrieved. + * @returns The `SlicerStyle` object whose name matches the input. + */ + getItem(name: string): Excel.SlicerStyle; + /** + * Gets a `SlicerStyle` by name. If the slicer style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the slicer style to be retrieved. + * @returns The `SlicerStyle` object whose name matches the input. + */ + getItemOrNullObject(name: string): Excel.SlicerStyle; + /** + * Sets the default slicer style for use in the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param newDefaultStyle The `SlicerStyle` object, or name of the `SlicerStyle` object, that should be the new default. + */ + setDefault(newDefaultStyle: SlicerStyle | string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SlicerStyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SlicerStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.SlicerStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.SlicerStyleCollection; + /** + * 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.SlicerStyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerStyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.SlicerStyleCollectionData; + } + /** + * Represents a slicer style, which defines style elements by region of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class SlicerStyle 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; + /** + * Specifies the name of the slicer style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name: string; + /** + * Specifies if this `SlicerStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * @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.SlicerStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.SlicerStyle): void; + /** + * Deletes the slicer style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Creates a duplicate of this slicer style with copies of all the style elements. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The new `SlicerStyle` object that has been duplicated from this slicer style. + */ + duplicate(): Excel.SlicerStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SlicerStyleLoadOptions): Excel.SlicerStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.SlicerStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.SlicerStyle; + /** + * 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.SlicerStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerStyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.SlicerStyleData; + } + /** + * Represents a collection of timeline styles. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class TimelineStyleCollection 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.TimelineStyle[]; + /** + * Creates a blank `TimelineStyle` with the specified name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name The unique name for the new timeline style. Will throw an `InvalidArgument` error if the name is already in use. + * @param makeUniqueName Optional. Defaults to `false`. If `true`, will append numbers to the name in order to make it unique, if needed. + * @returns The newly created `TimelineStyle`. + */ + add(name: string, makeUniqueName?: boolean): Excel.TimelineStyle; + /** + * Gets the number of timeline styles in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the default timeline style for the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The `TimelineStyle` object that is the current default timeline style. + */ + getDefault(): Excel.TimelineStyle; + /** + * Gets a `TimelineStyle` by name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the timeline style to be retrieved. + * @returns The `TimelineStyle` object whose name matches the input. + */ + getItem(name: string): Excel.TimelineStyle; + /** + * Gets a `TimelineStyle` by name. If the timeline style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param name Name of the timeline style to be retrieved. + * @returns The `TimelineStyle` object whose name matches the input. + */ + getItemOrNullObject(name: string): Excel.TimelineStyle; + /** + * Sets the default timeline style for use in the parent object's scope. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param newDefaultStyle The `TimelineStyle` object, or name of the `TimelineStyle` object, that should be the new default. + */ + setDefault(newDefaultStyle: TimelineStyle | string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TimelineStyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TimelineStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TimelineStyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.TimelineStyleCollection; + /** + * 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.TimelineStyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TimelineStyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.TimelineStyleCollectionData; + } + /** + * Represents a `TimelineStyle`, which defines style elements by region in the timeline. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class TimelineStyle 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; + /** + * Specifies the name of the timeline style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name: string; + /** + * Specifies if this `TimelineStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * @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.TimelineStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.TimelineStyle): void; + /** + * Deletes the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Creates a duplicate of this timeline style with copies of all the style elements. + * + * @remarks + * [Api set: ExcelApi 1.10] + * @returns The new `TimelineStyle` object that has been duplicated from this timeline style. + */ + duplicate(): Excel.TimelineStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TimelineStyleLoadOptions): Excel.TimelineStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TimelineStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.TimelineStyle; + /** + * 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.TimelineStyle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TimelineStyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.TimelineStyleData; + } + /** + * Represents layout and print settings that are not dependent on any printer-specific implementation. These settings include margins, orientation, page numbering, title rows, and print area. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly headersFooters: Excel.HeaderFooterGroup; + /** + * The worksheet's black and white print option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + blackAndWhite: boolean; + /** + * The worksheet's bottom page margin to use for printing in points. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin: number; + /** + * The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHorizontally: boolean; + /** + * The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerVertically: boolean; + /** + * The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + draftMode: boolean; + /** + * The worksheet's first page number to print. A `null` value represents "auto" page numbering. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPageNumber: number | ""; + /** + * The worksheet's footer margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + footerMargin: number; + /** + * The worksheet's header margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headerMargin: number; + /** + * The worksheet's left margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin: number; + /** + * The worksheet's orientation of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation: Excel.PageOrientation | "Portrait" | "Landscape"; + /** + * The worksheet's paper size of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"; + /** + * Specifies if the worksheet's comments should be displayed when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printComments: Excel.PrintComments | "NoComments" | "EndSheet" | "InPlace"; + /** + * The worksheet's print errors option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printErrors: Excel.PrintErrorType | "AsDisplayed" | "Blank" | "Dash" | "NotAvailable"; + /** + * Specifies if the worksheet's gridlines will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printGridlines: boolean; + /** + * Specifies if the worksheet's headings will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printHeadings: boolean; + /** + * The worksheet's page print order option. This specifies the order to use for processing the page number printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printOrder: Excel.PrintOrder | "DownThenOver" | "OverThenDown"; + /** + * The worksheet's right margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin: number; + /** + * The worksheet's top margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin: number; + /** + * The worksheet's print zoom options. + The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getPrintAreaOrNullObject(): Excel.RangeAreas; + /** + * Gets the range object representing the title columns. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getPrintTitleColumns(): Excel.Range; + /** + * Gets the range object representing the title columns. If not set, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getPrintTitleColumnsOrNullObject(): Excel.Range; + /** + * Gets the range object representing the title rows. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getPrintTitleRows(): Excel.Range; + /** + * Gets the range object representing the title rows. If not set, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getPrintTitleRowsOrNullObject(): Excel.Range; + /** + * Sets the worksheet's print area. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param printArea The range or ranges of the content to print. + */ + setPrintArea(printArea: Range | RangeAreas | string): void; + /** + * Sets the worksheet's page margins with units. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param unit Measurement unit for the margins provided. + * @param marginOptions Margin values to set. Margins not provided remain unchanged. + */ + setPrintMargins(unit: Excel.PrintMarginUnit, marginOptions: Excel.PageLayoutMarginOptions): void; + /** + * Sets the worksheet's page margins with units. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param unit Measurement unit for the margins provided. + * @param marginOptions Margin values to set. Margins not provided 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param printTitleColumns The columns to be repeated to the left of each page. The 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param printTitleRows The rows to be repeated at the top of each page. The 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PageLayoutLoadOptions): Excel.PageLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PageLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface PageLayoutZoomOptions { + /** + * Number of pages to fit horizontally. This value can be `null` if percentage scale is used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + scale?: number; + /** + * Number of pages to fit vertically. This value can be `null` if percentage scale is used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalFitToPages?: number; + } + /** + * Represents the options in page layout margins. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface PageLayoutMarginOptions { + /** + * Specifies the page layout bottom margin in the unit specified to use for printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottom?: number; + /** + * Specifies the page layout footer margin in the unit specified to use for printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + footer?: number; + /** + * Specifies the page layout header margin in the unit specified to use for printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + header?: number; + /** + * Specifies the page layout left margin in the unit specified to use for printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: number; + /** + * Specifies the page layout right margin in the unit specified to use for printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + right?: number; + /** + * Specifies the page layout top margin in the unit specified to use for printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: number; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * The center footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerFooter: string; + /** + * The center header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHeader: string; + /** + * The left footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftFooter: string; + /** + * The left header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftHeader: string; + /** + * The right footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightFooter: string; + /** + * The right header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.HeaderFooterLoadOptions): Excel.HeaderFooter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.HeaderFooter; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly defaultForAllPages: Excel.HeaderFooter; + /** + * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly evenPages: Excel.HeaderFooter; + /** + * The first page header/footer, for all other pages general or even/odd is used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly firstPage: Excel.HeaderFooter; + /** + * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly oddPages: Excel.HeaderFooter; + /** + * The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.HeaderFooterGroupLoadOptions): Excel.HeaderFooterGroup; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.HeaderFooterGroup; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Specifies the column index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly columnIndex: number; + /** + * Specifies the row index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly rowIndex: number; + /** + * Deletes a page break object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + delete(): void; + /** + * Gets the first cell after the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getCellAfterBreak(): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PageBreakLoadOptions): Excel.PageBreak; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PageBreak; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a page break object via the index. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param index Index of the page break. + */ + getItem(index: number): Excel.PageBreak; + /** + * Resets all manual page breaks in the collection. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + removePageBreaks(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.PageBreakCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PageBreakCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.PageBreakCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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. + * + * @remarks + * [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 data connections in the collection, such as from a PivotTable to a Power BI dataset, or a Data Model to a table or range in the same workbook. + Data connections unsupported by this method are: Power Query connections, data connections outside the original workbook (except Power BI connections), and connections to data protected by a firewall. + * + * @remarks + * [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; + }; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Returns the range object based on its position in the `RangeCollection`. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + /** + * Contains the collection of cross-workbook level ranges. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + class RangeAreasCollection 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.RangeAreas[]; + /** + * Gets the number of `RangeAreas` objects in this collection. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Returns the `RangeAreas` object based on position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @param index Index value of the range object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.RangeAreas; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.RangeAreasCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeAreasCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.RangeAreasCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.RangeAreasCollection; + /** + * 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.RangeAreasCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeAreasCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.RangeAreasCollectionData; + } + /** + * Represents the entity that is mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + interface CommentMention { + /** + * The email address of the entity that is mentioned in a comment. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + email: string; + /** + * The ID of the entity. The ID matches one of the IDs in `CommentRichContent.richContent`. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + id: number; + /** + * The name of the entity that is mentioned in a comment. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + name: string; + } + /** + * Represents the content contained within a comment or comment reply. Rich content incudes the text string and any other objects contained within the comment body, such as mentions. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + interface CommentRichContent { + /** + * An array containing all the entities (e.g., people) mentioned within the comment. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: Excel.CommentMention[]; + /** + * Specifies the rich content of the comment (e.g., comment content with mentions, the first mentioned entity has an ID attribute of 0, and the second mentioned entity has an ID attribute of 1). + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent: string; + } + /** + * Represents a collection of comment objects that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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[]; + /** + * Creates a new comment with the given content on the given cell. An `InvalidArgument` error is thrown if the provided range is larger than one cell. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param cellAddress The cell to which the comment is added. This can be a `Range` object or a string. If it's a string, it must contain the full address, including the sheet name. An `InvalidArgument` error is thrown if the provided range is larger than one cell. + * @param content The comment's content. This can be either a string or `CommentRichContent` object. Strings are used for plain text. `CommentRichContent` objects allow for other comment features, such as mentions. [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] + * @param contentType Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] + */ + add(cellAddress: Range | string, content: CommentRichContent | string, contentType?: Excel.ContentType): Excel.Comment; + /** + * Creates a new comment with the given content on the given cell. An `InvalidArgument` error is thrown if the provided range is larger than one cell. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param cellAddress The cell to which the comment is added. This can be a `Range` object or a string. If it's a string, it must contain the full address, including the sheet name. An `InvalidArgument` error is thrown if the provided range is larger than one cell. + * @param content The comment's content. This can be either a string or `CommentRichContent` object. Strings are used for plain text. `CommentRichContent` objects allow for other comment features, such as mentions. [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] + * @param contentType Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] + */ + add(cellAddress: Range | string, content: CommentRichContent | string, contentType?: "Plain" | "Mention"): Excel.Comment; + /** + * Gets the number of comments in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a comment from the collection based on its ID. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param commentId The identifier for the comment. + */ + getItem(commentId: string): Excel.Comment; + /** + * Gets a comment from the collection based on its position. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Comment; + /** + * Gets the comment from the specified cell. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param cellAddress The cell which the comment is on. This can be a `Range` object or a string. If it's a string, it must contain the full address, including the sheet name. An `InvalidArgument` error is thrown if the provided range is larger than one cell. + */ + getItemByCell(cellAddress: Range | string): Excel.Comment; + /** + * Gets the comment to which the given reply is connected. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param replyId The identifier of comment reply. + */ + getItemByReplyId(replyId: string): Excel.Comment; + /** + * Gets a comment from the collection based on its ID. + If the comment object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param commentId The identifier for the comment. + */ + getItemOrNullObject(commentId: string): Excel.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CommentCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.CommentCollection; + /** + * Occurs when the comments are added. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @eventproperty + */ + readonly onAdded: OfficeExtension.EventHandlers; + /** + * Occurs when comments or replies in a comment collection are changed, including when replies are deleted. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * Occurs when comments are deleted in the comment collection. + * + * @remarks + * [Api set: ExcelApi 1.12] + * + * @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.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; + } + class CommentCollectionCustom { + } + interface CommentCollection extends OfficeExtension.ClientObject, CommentCollectionCustom { + } + /** + * Represents a comment in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly replies: Excel.CommentReplyCollection; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly authorEmail: string; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly authorName: string; + /** + * The comment's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content: string; + /** + * Gets the content type of the comment. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly contentType: Excel.ContentType | "Plain" | "Mention"; + /** + * Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly creationDate: Date; + /** + * Specifies the comment identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly id: string; + /** + * Gets the entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly mentions: Excel.CommentMention[]; + /** + * The comment thread status. A value of `true` means that the comment thread is resolved. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved: boolean; + /** + * Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly richContent: 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. + * @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: Excel.Comment): void; + /** + * Assigns the task attached to the comment to the given user as an assignee. If there is no task, one will be created. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param assignee The assignee's user identity information. + */ + assignTask(assignee: Excel.EmailIdentity): Excel.DocumentTask; + /** + * Deletes the comment and all the connected replies. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Gets the cell where this comment is located. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getLocation(): Excel.Range; + /** + * Gets the task associated with this comment. If there is no task for the comment thread, an `ItemNotFound` exception is thrown. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getTask(): Excel.DocumentTask; + /** + * Gets the task associated with this comment. If there is no task for the comment thread, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getTaskOrNullObject(): Excel.DocumentTask; + /** + * Updates the comment content with a specially formatted string and a list of mentions. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param contentWithMentions The content for the comment. This contains a specially formatted string and a list of mentions that will be parsed into the string when displayed by Excel. + */ + updateMentions(contentWithMentions: Excel.CommentRichContent): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CommentLoadOptions): Excel.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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 a comment. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param content The comment's content. This can be either a string or a `CommentRichContent` object (e.g., for comments with mentions). [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] + * @param contentType Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] + */ + add(content: CommentRichContent | string, contentType?: Excel.ContentType): Excel.CommentReply; + /** + * Creates a comment reply for a comment. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param content The comment's content. This can be either a string or a `CommentRichContent` object (e.g., for comments with mentions). [Api set: ExcelApi 1.10 for string, 1.11 for CommentRichContent object] + * @param contentType Optional. The type of content contained within the comment. The default value is enum `ContentType.Plain`. [Api set: ExcelApi 1.10 for Enum ContentType.Plain, 1.11 for Enum ContentType.Mention] + */ + add(content: CommentRichContent | string, contentType?: "Plain" | "Mention"): Excel.CommentReply; + /** + * Gets the number of comment replies in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Returns a comment reply identified by its ID. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param commentReplyId The identifier for the comment reply. + */ + getItem(commentReplyId: string): Excel.CommentReply; + /** + * Gets a comment reply based on its position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param index The index value of the comment reply to be retrieved. The collection uses zero-based indexing. + */ + getItemAt(index: number): Excel.CommentReply; + /** + * Returns a comment reply identified by its ID. + If the comment reply object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param commentReplyId The identifier for the comment reply. + */ + getItemOrNullObject(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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CommentReplyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CommentReplyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CommentReplyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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 comment reply in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly authorEmail: string; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly authorName: string; + /** + * The comment reply's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content: string; + /** + * The content type of the reply. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + readonly contentType: Excel.ContentType | "Plain" | "Mention"; + /** + * Gets the creation time of the comment reply. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly creationDate: Date; + /** + * Specifies the comment reply identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly id: string; + /** + * The entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly mentions: Excel.CommentMention[]; + /** + * The comment reply status. A value of `true` means the reply is in the resolved state. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly resolved: boolean; + /** + * The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + readonly richContent: 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. + * @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.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.CommentReply): void; + /** + * Assigns the task attached to the comment to the given user as the sole assignee. If there is no task, one will be created. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param assignee The assignee's user identity information. + */ + assignTask(assignee: Excel.EmailIdentity): Excel.DocumentTask; + /** + * Deletes the comment reply. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Gets the cell where this comment reply is located. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getLocation(): Excel.Range; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getParentComment(): Excel.Comment; + /** + * Gets the task associated with this comment reply's thread. If there is no task for the comment thread, an `ItemNotFound` exception is thrown. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getTask(): Excel.DocumentTask; + /** + * Gets the task associated with this comment reply's thread. If there is no task for the comment thread, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getTaskOrNullObject(): Excel.DocumentTask; + /** + * Updates the comment content with a specially formatted string and a list of mentions. + * + * @remarks + * [Api set: ExcelApi 1.11] + * + * @param contentWithMentions The content for the comment. This contains a specially formatted string and a list of mentions that will be parsed into the string when displayed by Excel. + */ + updateMentions(contentWithMentions: Excel.CommentRichContent): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.CommentReplyLoadOptions): Excel.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 a collection of all the shapes in the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 the worksheet. Returns a `Shape` object that represents the new shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param geometricShapeType Represents the type of the geometric shape. See `Excel.GeometricShapeType` for details. + */ + addGeometricShape(geometricShapeType: Excel.GeometricShapeType): Excel.Shape; + /** + * Adds a geometric shape to the worksheet. Returns a `Shape` object that represents the new shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param geometricShapeType Represents the type of the geometric shape. See `Excel.GeometricShapeType` for details. + */ + 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"): Excel.Shape; + /** + * Groups a subset of shapes in this collection's worksheet. Returns a `Shape` object that represents the new group of shapes. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param values An array of shape IDs or shape objects. + */ + addGroup(values: Array): Excel.Shape; + /** + * Creates an image from a base64-encoded string and adds it to the worksheet. Returns the `Shape` object that represents the new image. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param base64ImageString A base64-encoded string representing an image in either JPEG or PNG format. + */ + addImage(base64ImageString: string): Excel.Shape; + /** + * Adds a line to worksheet. Returns a `Shape` object that represents the new line. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param startLeft The distance, in points, from the start of the line to the left side of the worksheet. + * @param startTop The distance, in points, from the start of the line to the top of the worksheet. + * @param endLeft The distance, in points, from the end of the line to the left of the worksheet. + * @param endTop The distance, in points, from the end of the line to the top of the worksheet. + * @param connectorType Represents the connector type. See `Excel.ConnectorType` for details. + */ + addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: Excel.ConnectorType): Excel.Shape; + /** + * Adds a line to worksheet. Returns a `Shape` object that represents the new line. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param startLeft The distance, in points, from the start of the line to the left side of the worksheet. + * @param startTop The distance, in points, from the start of the line to the top of the worksheet. + * @param endLeft The distance, in points, from the end of the line to the left of the worksheet. + * @param endTop The distance, in points, from the end of the line to the top of the worksheet. + * @param connectorType Represents the connector type. See `Excel.ConnectorType` for details. + */ + addLine(startLeft: number, startTop: number, endLeft: number, endTop: number, connectorType?: "Straight" | "Elbow" | "Curve"): Excel.Shape; + /** + * Creates a scalable vector graphic (SVG) from an XML string and adds it to the worksheet. Returns a `Shape` object that represents the new image. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param xml An XML string that represents the SVG. + */ + addSvg(xml: string): Excel.Shape; + /** + * Adds a text box to the worksheet with the provided text as the content. Returns a `Shape` object that represents the new text box. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a shape using its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param key The name or ID of the shape to be retrieved. + */ + getItem(key: string): Excel.Shape; + /** + * Gets a shape using its position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param index The zero-based index of the shape to be retrieved. + */ + getItemAt(index: number): Excel.Shape; + /** + * Gets a shape using its name or ID. + If the shape object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param key The name or ID of the shape to be retrieved. + */ + getItemOrNullObject(key: string): Excel.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ShapeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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; + } + class ShapeCollectionCustom { + } + interface ShapeCollection extends OfficeExtension.ClientObject, ShapeCollectionCustom { + } + /** + * Represents a generic shape object in the worksheet. A shape could be a geometric shape, a line, a group of shapes, etc. + To learn more about the shape object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-shapes | Work with shapes using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly fill: Excel.ShapeFill; + /** + * Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly geometricShape: Excel.GeometricShape; + /** + * Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly group: Excel.ShapeGroup; + /** + * Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly image: Excel.Image; + /** + * Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly line: Excel.Line; + /** + * Returns the line formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly lineFormat: Excel.ShapeLineFormat; + /** + * Specifies the parent group of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly parentGroup: Excel.Shape; + /** + * Returns the text frame object of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly textFrame: Excel.TextFrame; + /** + * Specifies the alternative description text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextDescription: string; + /** + * Specifies the alternative title text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextTitle: string; + /** + * Returns the number of connection sites on this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly connectionSiteCount: number; + /** + * Gets the display name of the shape. A newly created shape has a generated name + that is localized and may not match its `name`. In this scenario, you can use + this API to get the name that is displayed in the UI. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + readonly displayName: string; + /** + * Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"; + /** + * Specifies the height, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + height: number; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly id: string; + /** + * The distance, in points, from the left side of the shape to the left side of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left: number; + /** + * Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly level: number; + /** + * Specifies if the aspect ratio of this shape is locked. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lockAspectRatio: boolean; + /** + * Specifies the name of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name: string; + /** + * Represents how the object is attached to the cells below it. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + placement: Excel.Placement | "TwoCell" | "OneCell" | "Absolute"; + /** + * Specifies the rotation, in degrees, of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rotation: number; + /** + * The distance, in points, from the top edge of the shape to the top edge of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top: number; + /** + * Returns the type of this shape. See `Excel.ShapeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly type: Excel.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line"; + /** + * Specifies if the shape is visible. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible: boolean; + /** + * Specifies the width, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width: number; + /** + * Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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; + /** + * Copies and pastes a `Shape` object. + The pasted shape is copied to the same pixel location as this shape. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param destinationSheet The sheet to which the shape object will be pasted. The default value is the copied shape's worksheet. + */ + copyTo(destinationSheet?: Worksheet | string): Excel.Shape; + /** + * Removes the shape from the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + delete(): void; + /** + * Converts the shape to an image and returns the image as a base64-encoded string. The DPI is 96. The only supported formats are `Excel.PictureFormat.BMP`, `Excel.PictureFormat.PNG`, `Excel.PictureFormat.JPEG`, and `Excel.PictureFormat.GIF`. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param format Specifies the format of the image. + */ + getAsImage(format: Excel.PictureFormat): OfficeExtension.ClientResult; + /** + * Converts the shape to an image and returns the image as a base64-encoded string. The DPI is 96. The only supported formats are `Excel.PictureFormat.BMP`, `Excel.PictureFormat.PNG`, `Excel.PictureFormat.JPEG`, and `Excel.PictureFormat.GIF`. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param format Specifies the format of the image. + */ + getAsImage(format: "UNKNOWN" | "BMP" | "JPEG" | "GIF" | "PNG" | "SVG"): OfficeExtension.ClientResult; + /** + * Moves the shape horizontally by the specified number of points. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param increment The increment, in points, the shape will be horizontally moved. A positive value moves the shape to the right and a negative value moves it to the left. If the sheet is right-to-left oriented, this is reversed: positive values will move the shape to the left and negative values will move it to the right. + */ + incrementLeft(increment: number): void; + /** + * Rotates the shape clockwise around the z-axis by the specified number of degrees. + Use the `rotation` property to set the absolute rotation of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param increment How many degrees the shape will be rotated. A positive value rotates the shape clockwise and a negative value rotates it counterclockwise. + */ + incrementRotation(increment: number): void; + /** + * Moves the shape vertically by the specified number of points. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param increment The increment, in points, the shape will be vertically moved. A positive value moves the shape down and a negative value moves it up. + */ + incrementTop(increment: number): void; + /** + * Scales the height of the shape by a specified factor. For images, 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param scaleFactor Specifies the ratio between the height of the shape after you resize it and the current or original height. + * @param scaleType Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. + * @param scaleFrom Optional. 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 images, 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param scaleFactor Specifies the ratio between the height of the shape after you resize it and the current or original height. + * @param scaleType Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. + * @param scaleFrom Optional. 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 images, 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param scaleFactor Specifies the ratio between the width of the shape after you resize it and the current or original width. + * @param scaleType Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. + * @param scaleFrom Optional. 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 images, 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param scaleFactor Specifies the ratio between the width of the shape after you resize it and the current or original width. + * @param scaleType Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. + * @param scaleFrom Optional. 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 up or down the collection's z-order, which shifts it in front of or behind other shapes. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param position Where to move the shape in the z-order stack relative to the other shapes. See `Excel.ShapeZOrder` for details. + */ + setZOrder(position: Excel.ShapeZOrder): void; + /** + * Moves the specified shape up or down the collection's z-order, which shifts it in front of or behind other shapes. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param position Where to move the shape in the z-order stack relative to the other shapes. See `Excel.ShapeZOrder` for details. + */ + setZOrder(position: "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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ShapeLoadOptions): Excel.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Shape; + /** + * Occurs when the shape is activated. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * Occurs when the shape is deactivated. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @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.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 inside a worksheet. A geometric shape can be a rectangle, block arrow, equation symbol, flowchart item, star, banner, callout, or any other basic shape in Excel. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly shape: Excel.Shape; + /** + * Returns the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly id: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.GeometricShapeLoadOptions): Excel.GeometricShape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.GeometricShape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 in the worksheet. To get the corresponding `Shape` object, use `Image.shape`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 associated with the image. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly shape: Excel.Shape; + /** + * Specifies the shape identifier for the image object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly id: string; + /** + * Returns the format of the image. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ImageLoadOptions): Excel.Image; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Image; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 inside a worksheet. To get the corresponding `Shape` object, use `ShapeGroup.shape`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 associated with the group. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly shape: Excel.Shape; + /** + * Returns the collection of `Shape` objects. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly shapes: Excel.GroupShapeCollection; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly id: string; + /** + * Ungroups any grouped shapes in the specified shape group. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + ungroup(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ShapeGroupLoadOptions): Excel.ShapeGroup; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ShapeGroup; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 the shape collection inside a shape group. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 shape group. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a shape using its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param key The name or ID of the shape to be retrieved. + */ + getItem(key: string): Excel.Shape; + /** + * Gets a shape based on its position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param index The zero-based index value of the object to be retrieved. + */ + getItemAt(index: number): Excel.Shape; + /** + * Gets a shape using its name or ID. + If the shape object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.14] + * + * @param key The name or ID of the shape to be retrieved. + */ + getItemOrNullObject(key: string): Excel.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.GroupShapeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.GroupShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.GroupShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: 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 a line inside a worksheet. To get the corresponding `Shape` object, use `Line.shape`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + class Line 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 to which the beginning of the specified line is attached. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly beginConnectedShape: Excel.Shape; + /** + * Represents the shape to which the end of the specified line is attached. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly endConnectedShape: Excel.Shape; + /** + * Returns the `Shape` object associated with the line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly shape: Excel.Shape; + /** + * Represents the length of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadLength: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; + /** + * Represents the style of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadStyle: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; + /** + * Represents the width of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadWidth: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; + /** + * Represents the connection site to which the beginning of a connector is connected. Returns `null` when the beginning of the line is not attached to any shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly beginConnectedSite: number; + /** + * Represents the length of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadLength: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; + /** + * Represents the style of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadStyle: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; + /** + * Represents the width of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadWidth: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; + /** + * Represents the connection site to which the end of a connector is connected. Returns `null` when the end of the line is not attached to any shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly endConnectedSite: number; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly id: string; + /** + * Specifies if the beginning of the specified line is connected to a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly isBeginConnected: boolean; + /** + * Specifies if the end of the specified line is connected to a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly isEndConnected: boolean; + /** + * Represents the connector type for the line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectorType: Excel.ConnectorType | "Straight" | "Elbow" | "Curve"; + /** + * 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. + * @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.LineUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Line): void; + /** + * Attaches the beginning of the specified connector to a specified shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param shape The shape to connect. + * @param connectionSite The connection site on the shape to which the beginning of the connector is attached. Must be an integer between 0 (inclusive) and the connection-site count of the specified shape (exclusive). + */ + connectBeginShape(shape: Excel.Shape, connectionSite: number): void; + /** + * Attaches the end of the specified connector to a specified shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param shape The shape to connect. + * @param connectionSite The connection site on the shape to which the end of the connector is attached. Must be an integer between 0 (inclusive) and the connection-site count of the specified shape (exclusive). + */ + connectEndShape(shape: Excel.Shape, connectionSite: number): void; + /** + * Detaches the beginning of the specified connector from a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + disconnectBeginShape(): void; + /** + * Detaches the end of the specified connector from a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + disconnectEndShape(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.LineLoadOptions): Excel.Line; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Line; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Line; + /** + * 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.Line object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LineData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.LineData; + } + /** + * Represents the fill formatting of a shape object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + foregroundColor: string; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency: number; + /** + * Returns the fill type of the shape. See `Excel.ShapeFillType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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 this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + clear(): void; + /** + * Sets the fill formatting of the shape to a uniform color. This changes the fill type to "Solid". + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param color A string that represents the fill color in HTML color format, in 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ShapeFillLoadOptions): Excel.ShapeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ShapeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + class ShapeLineFormat 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 line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color: string; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashStyle: Excel.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style: Excel.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency: number; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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.ShapeLineFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ShapeLineFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ShapeLineFormatLoadOptions): Excel.ShapeLineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ShapeLineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.ShapeLineFormat; + /** + * 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.ShapeLineFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeLineFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ShapeLineFormatData; + } + /** + * Represents the text frame of a shape object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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; + /** + * Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See `Excel.TextRange` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly textRange: Excel.TextRange; + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeSetting: Excel.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin: number; + /** + * Specifies if the text frame contains text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly hasText: boolean; + /** + * Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalAlignment: Excel.ShapeTextHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; + /** + * Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalOverflow: Excel.ShapeTextHorizontalOverflow | "Overflow" | "Clip"; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin: number; + /** + * Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation: Excel.ShapeTextOrientation | "Horizontal" | "Vertical" | "Vertical270" | "WordArtVertical" | "EastAsianVertical" | "MongolianVertical" | "WordArtVerticalRTL"; + /** + * Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder: Excel.ShapeTextReadingOrder | "LeftToRight" | "RightToLeft"; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin: number; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin: number; + /** + * Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalAlignment: Excel.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom" | "Justified" | "Distributed"; + /** + * Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalOverflow: Excel.ShapeTextVerticalOverflow | "Overflow" | "Ellipsis" | "Clip"; + /** + * 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. + * @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 text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + deleteText(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TextFrameLoadOptions): Excel.TextFrame; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TextFrame; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readonly font: Excel.ShapeFont; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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 the substring in the given range. + * + * @remarks + * [Api set: ExcelApi 1.9] + * + * @param start The zero-based index of the first character to get from the text range. + * @param length Optional. The number of characters to be returned in the new text range. If length is omitted, all the characters from start to the end of the text range's last paragraph will be returned. + */ + getSubstring(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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.TextRangeLoadOptions): Excel.TextRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.TextRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents the font attributes, such as font name, font size, and color, for a shape's `TextRange` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color: string; + /** + * Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + italic: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name: string; + /** + * Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + size: number; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.ShapeFontLoadOptions): Excel.ShapeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.ShapeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * Represents a `Slicer` object in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class Slicer 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 collection of slicer items that are part of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly slicerItems: Excel.SlicerItemCollection; + /** + * The style applied to the slicer. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly slicerStyle: Excel.SlicerStyle; + /** + * Represents the worksheet containing the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly worksheet: Excel.Worksheet; + /** + * Represents the caption of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + caption: string; + /** + * Represents the height, in points, of the slicer. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height: number; + /** + * Represents the unique ID of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly id: string; + /** + * Value is `true` if all filters currently applied on the slicer are cleared. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly isFilterCleared: boolean; + /** + * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left: number; + /** + * Represents the name of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name: string; + /** + * Represents the slicer name used in the formula. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula: string; + /** + * Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + sortBy: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"; + /** + * Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + style: string; + /** + * Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top: number; + /** + * Represents the width, in points, of the slicer. + Throws an `InvalidArgument` error when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + 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. + * @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.SlicerUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Slicer): void; + /** + * Clears all the filters currently applied on the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + clearFilters(): void; + /** + * Deletes the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + delete(): void; + /** + * Returns an array of selected items' keys. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getSelectedItems(): OfficeExtension.ClientResult; + /** + * Selects slicer items based on their keys. The previous selections are cleared. + All items will be selected by default if the array is empty. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param items Optional. The specified slicer item names to be selected. + */ + selectItems(items?: string[]): void; + /** + * Sets the style applied to the slicer. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param style The style to apply to the slicer. An `InvalidArgument` error is thrown if a string is provided that does not match the name of any style. + */ + setStyle(style: string | SlicerStyle | BuiltInSlicerStyle): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SlicerLoadOptions): Excel.Slicer; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.Slicer; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.Slicer; + /** + * 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.Slicer object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.SlicerData; + } + /** + * Represents a collection of all the slicer objects in the workbook or a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class SlicerCollection 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.Slicer[]; + /** + * Adds a new slicer to the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param slicerSource The data source that the new slicer will be based on. It can be a `PivotTable` object, a `Table` object, or a string. When a PivotTable object is passed, the data source is the source of the `PivotTable` object. When a `Table` object is passed, the data source is the `Table` object. When a string is passed, it is interpreted as the name or ID of a PivotTable or table. + * @param sourceField The field in the data source to filter by. It can be a `PivotField` object, a `TableColumn` object, the ID of a `PivotField` or the name or ID of a `TableColumn`. + * @param slicerDestination Optional. The worksheet in which the new slicer will be created. It can be a `Worksheet` object or the name or ID of a worksheet. This parameter can be omitted if the slicer collection is retrieved from a worksheet. + * @returns The new slicer. + */ + add(slicerSource: string | PivotTable | Table, sourceField: string | PivotField | number | TableColumn, slicerDestination?: string | Worksheet): Excel.Slicer; + /** + * Returns the number of slicers in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a slicer object using its name or ID. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param key The name or ID of the slicer. + */ + getItem(key: string): Excel.Slicer; + /** + * Gets a slicer based on its position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Slicer; + /** + * Gets a slicer using its name or ID. If the slicer doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param key Name or ID of the slicer to be retrieved. + */ + getItemOrNullObject(key: string): Excel.Slicer; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SlicerCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SlicerCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.SlicerCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.SlicerCollection; + /** + * 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.SlicerCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.SlicerCollectionData; + } + /** + * Represents a slicer item in a slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class SlicerItem 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; + /** + * Value is `true` if the slicer item has data. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly hasData: boolean; + /** + * Value is `true` if the slicer item is selected. + Setting this value will not clear the selected state of other slicer items. + By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSelected: boolean; + /** + * Represents the unique value representing the slicer item. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly key: string; + /** + * Represents the title displayed in the Excel UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readonly 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. + * @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.SlicerItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.SlicerItem): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SlicerItemLoadOptions): Excel.SlicerItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.SlicerItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.SlicerItem; + /** + * 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.SlicerItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.SlicerItemData; + } + /** + * Represents a collection of all the slicer item objects in the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + class SlicerItemCollection 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.SlicerItem[]; + /** + * Returns the number of slicer items in the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a slicer item object using its key or name. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param key The key or name of the slicer item. + */ + getItem(key: string): Excel.SlicerItem; + /** + * Gets a slicer item based on its position in the collection. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.SlicerItem; + /** + * Gets a slicer item using its key or name. If the slicer item doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.10] + * + * @param key Key or name of the slicer to be retrieved. + */ + getItemOrNullObject(key: string): Excel.SlicerItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.SlicerItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SlicerItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.SlicerItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.SlicerItemCollection; + /** + * 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.SlicerItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SlicerItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.SlicerItemCollectionData; + } + /** + * Represents a linked data type. + A linked data type is a data type connected to an online data source. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class LinkedDataType 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 name of the data provider for the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly dataProvider: string; + /** + * The local time-zone date and time since the workbook was opened when the linked data type was last refreshed. + Returns `undefined` if the linked data type has not been refreshed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly lastRefreshed: Date; + /** + * The name of the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly name: string; + /** + * The frequency, in seconds, at which the linked data type is refreshed if `refreshMode` is set to "Periodic". + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly periodicRefreshInterval: number; + /** + * The mechanism by which the data for the linked data type is retrieved. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly refreshMode: Excel.LinkedDataTypeRefreshMode | "Unknown" | "Manual" | "OnLoad" | "Periodic"; + /** + * The unique ID of the linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly serviceId: number; + /** + * Returns an array with all the refresh modes supported by the linked data type. The contents of the array may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly supportedRefreshModes: Excel.LinkedDataTypeRefreshMode[]; + /** + * Makes a request to refresh the linked data type. If the service is busy or otherwise temporarily inaccessible, the request will not be fulfilled. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + requestRefresh(): void; + /** + * Makes a request to change the refresh mode for this linked data type. + If the given refresh mode is not supported by this linked data type the mode is left unchanged. + If set to "Periodic", the refresh interval is set to a predetermined value based on the particular linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param refreshMode The intended mode to which this linked data type is requested to change. + */ + requestSetRefreshMode(refreshMode: Excel.LinkedDataTypeRefreshMode): void; + /** + * Makes a request to change the refresh mode for this linked data type. + If the given refresh mode is not supported by this linked data type the mode is left unchanged. + If set to "Periodic", the refresh interval is set to a predetermined value based on the particular linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param refreshMode The intended mode to which this linked data type is requested to change. + */ + requestSetRefreshMode(refreshMode: "Unknown" | "Manual" | "OnLoad" | "Periodic"): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.LinkedDataTypeLoadOptions): Excel.LinkedDataType; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.LinkedDataType; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.LinkedDataType; + /** + * 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.LinkedDataType object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LinkedDataTypeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.LinkedDataTypeData; + } + /** + * Represents a collection of linked data types. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class LinkedDataTypeCollection 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.LinkedDataType[]; + /** + * Gets the number of linked data types in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a linked data type by service ID. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The ID of the linked data type. + */ + getItem(key: number): Excel.LinkedDataType; + /** + * Gets a linked data type by its index in the collection. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index The index of the linked data type object in the collection. + * @returns The linked data type at the given index. + */ + getItemAt(index: number): Excel.LinkedDataType; + /** + * Gets a linked data type by ID. If the linked data type doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The service ID of the linked data type. + */ + getItemOrNullObject(key: number): Excel.LinkedDataType; + /** + * Makes a request to refresh all the linked data types in the collection. + If the service is busy or otherwise temporarily inaccessible, the request will not be fulfilled. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + requestRefreshAll(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.LinkedDataTypeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.LinkedDataTypeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.LinkedDataTypeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.LinkedDataTypeCollection; + /** + * 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.LinkedDataTypeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.LinkedDataTypeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.LinkedDataTypeCollectionData; + } + /** + * Representation of a refresh mode. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum LinkedDataTypeRefreshMode { + /** + * Refresh mode is unknown or unsupported. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + unknown = "Unknown", + /** + * Manual refresh. Refresh does not get triggered automatically. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + manual = "Manual", + /** + * Refresh on workbook load only. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + onLoad = "OnLoad", + /** + * Refresh periodically based on an interval. It will also trigger a refresh on workbook load. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + periodic = "Periodic" + } + /** + * The argument that is passed to the event handler upon completion of refresh request to an external service or link. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RefreshRequestCompletedEventArgs { + /** + * Indicates if the request to refresh was successful. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshed: boolean; + /** + * The unique ID of the object whose refresh request was completed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceId: number; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "LinkedDataTypeRefreshRequestCompleted"; + /** + * An array that contains any warnings generated from the refresh request. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + warnings?: string[]; + } + /** + * Represents information about a newly added linked data type, such as source and ID. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RefreshModeChangedEventArgs { + /** + * The linked data type refresh mode. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshMode: Excel.LinkedDataTypeRefreshMode | "Unknown" | "Manual" | "OnLoad" | "Periodic"; + /** + * The unique ID of the object whose refresh mode was changed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceId: number; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "LinkedDataTypeRefreshModeChanged"; + } + /** + * The argument that is passed to the event handler after a new linked data type is added to the workbook. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface LinkedDataTypeAddedEventArgs { + /** + * The unique ID of the new linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceId: number; + /** + * Gets the source of the event. See `Excel.EventSource` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * Gets the type of the event. See `Excel.EventType` for details. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "LinkedDataTypeLinkedDataTypeAdded"; + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + invalid = "Invalid", + /** + * Axis displays categories. + * @remarks + * [Api set: ExcelApi 1.7] + */ + category = "Category", + /** + * Axis displays values. + * @remarks + * [Api set: ExcelApi 1.7] + */ + value = "Value", + /** + * Axis displays data series. + * @remarks + * [Api set: ExcelApi 1.7] + */ + series = "Series" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisGroup { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + primary = "Primary", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + secondary = "Secondary" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisScaleType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + linear = "Linear", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + logarithmic = "Logarithmic" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisPosition { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + maximum = "Maximum", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + minimum = "Minimum", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + custom = "Custom" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisTickMark { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + cross = "Cross", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + inside = "Inside", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + outside = "Outside" + } + /** + * Represents the state of calculation across the entire Excel application. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum CalculationState { + /** + * Calculations complete. + * @remarks + * [Api set: ExcelApi 1.9] + */ + done = "Done", + /** + * Calculations in progress. + * @remarks + * [Api set: ExcelApi 1.9] + */ + calculating = "Calculating", + /** + * Changes that trigger calculation have been made, but a recalculation has not yet been performed. + * @remarks + * [Api set: ExcelApi 1.9] + */ + pending = "Pending" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisTickLabelPosition { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + nextToAxis = "NextToAxis", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + high = "High", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + low = "Low", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisDisplayUnit { + /** + * Default option. This will reset display unit to the axis, and set unit label invisible. + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None", + /** + * This will set the axis in units of hundreds. + * @remarks + * [Api set: ExcelApi 1.7] + */ + hundreds = "Hundreds", + /** + * This will set the axis in units of thousands. + * @remarks + * [Api set: ExcelApi 1.7] + */ + thousands = "Thousands", + /** + * This will set the axis in units of tens of thousands. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tenThousands = "TenThousands", + /** + * This will set the axis in units of hundreds of thousands. + * @remarks + * [Api set: ExcelApi 1.7] + */ + hundredThousands = "HundredThousands", + /** + * This will set the axis in units of millions. + * @remarks + * [Api set: ExcelApi 1.7] + */ + millions = "Millions", + /** + * This will set the axis in units of tens of millions. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tenMillions = "TenMillions", + /** + * This will set the axis in units of hundreds of millions. + * @remarks + * [Api set: ExcelApi 1.7] + */ + hundredMillions = "HundredMillions", + /** + * This will set the axis in units of billions. + * @remarks + * [Api set: ExcelApi 1.7] + */ + billions = "Billions", + /** + * This will set the axis in units of trillions. + * @remarks + * [Api set: ExcelApi 1.7] + */ + trillions = "Trillions", + /** + * This will set the axis in units of custom value. + * @remarks + * [Api set: ExcelApi 1.7] + */ + custom = "Custom" + } + /** + * Specifies the unit of time for chart axes and data series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisTimeUnit { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + days = "Days", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + months = "Months", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + years = "Years" + } + /** + * Represents the quartile calculation type of chart series layout. Only applies to a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartBoxQuartileCalculation { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + inclusive = "Inclusive", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + exclusive = "Exclusive" + } + /** + * Specifies the type of the category axis. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisCategoryType { + /** + * Excel controls the axis type. + * @remarks + * [Api set: ExcelApi 1.7] + */ + automatic = "Automatic", + /** + * Axis groups data by an arbitrary set of categories. + * @remarks + * [Api set: ExcelApi 1.7] + */ + textAxis = "TextAxis", + /** + * Axis groups data on a time scale. + * @remarks + * [Api set: ExcelApi 1.7] + */ + dateAxis = "DateAxis" + } + /** + * Specifies the bin type of a histogram chart or pareto chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartBinType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + category = "Category", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + auto = "Auto", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + binWidth = "BinWidth", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + binCount = "BinCount" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartLineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + continuous = "Continuous", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + dashDot = "DashDot", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + dashDotDot = "DashDotDot", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + dot = "Dot", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + grey25 = "Grey25", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + grey50 = "Grey50", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + grey75 = "Grey75", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + roundDot = "RoundDot" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum ChartDataLabelPosition { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + insideEnd = "InsideEnd", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + insideBase = "InsideBase", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + outsideEnd = "OutsideEnd", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + right = "Right", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + bestFit = "BestFit", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + callout = "Callout" + } + /** + * Represents which parts of the error bar to include. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartErrorBarsInclude { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + both = "Both", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + minusValues = "MinusValues", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + plusValues = "PlusValues" + } + /** + * Represents the range type for error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartErrorBarsType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + fixedValue = "FixedValue", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + percent = "Percent", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + stDev = "StDev", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + stError = "StError", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + custom = "Custom" + } + /** + * Represents the mapping level of a chart series. This only applies to region map charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartMapAreaLevel { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dataOnly = "DataOnly", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + city = "City", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + county = "County", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + state = "State", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + country = "Country", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + continent = "Continent", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + world = "World" + } + /** + * Represents the gradient style of a chart series. This is only applicable for region map charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartGradientStyle { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + twoPhaseColor = "TwoPhaseColor", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + threePhaseColor = "ThreePhaseColor" + } + /** + * Represents the gradient style type of a chart series. This is only applicable for region map charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartGradientStyleType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + extremeValue = "ExtremeValue", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + number = "Number", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + percent = "Percent" + } + /** + * Represents the position of the chart title. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartTitlePosition { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + right = "Right" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum ChartLegendPosition { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + right = "Right", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + corner = "Corner", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + custom = "Custom" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartMarkerStyle { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + square = "Square", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + diamond = "Diamond", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + triangle = "Triangle", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + x = "X", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + star = "Star", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + dot = "Dot", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + circle = "Circle", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + plus = "Plus", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + picture = "Picture" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ChartPlotAreaPosition { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + custom = "Custom" + } + /** + * Represents the region level of a chart series layout. This only applies to region map charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartMapLabelStrategy { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bestFit = "BestFit", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + showAll = "ShowAll" + } + /** + * Represents the region projection type of a chart series layout. This only applies to region map charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartMapProjectionType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mercator = "Mercator", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + miller = "Miller", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + robinson = "Robinson", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + albers = "Albers" + } + /** + * Represents the parent label strategy of the chart series layout. This only applies to treemap charts + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ChartParentLabelStrategy { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + banner = "Banner", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + overlapping = "Overlapping" + } + /** + * Specifies whether the series are by rows or by columns. In Excel on desktop, the "auto" option will inspect the source data shape to automatically guess whether the data is by rows or columns. In Excel on the web, "auto" will simply default to "columns". + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum ChartSeriesBy { + /** + * In Excel on desktop, the "auto" option will inspect the source data shape to automatically guess whether the data is by rows or columns. In Excel on the web, "auto" will simply default to "columns". + * @remarks + * [Api set: ExcelApi 1.1] + */ + auto = "Auto", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + columns = "Columns", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + rows = "Rows" + } + /** + * Specifies whether the series data range is local range, external range, list or unknown. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + enum ChartDataSourceType { + /** + * @remarks + * [Api set: ExcelApi 1.15] + */ + localRange = "LocalRange", + /** + * @remarks + * [Api set: ExcelApi 1.15] + */ + externalRange = "ExternalRange", + /** + * @remarks + * [Api set: ExcelApi 1.15] + */ + list = "List", + /** + * @remarks + * [Api set: ExcelApi 1.15] + */ + unknown = "Unknown" + } + /** + * Represents the horizontal alignment for the specified object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartTextHorizontalAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + right = "Right", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + justify = "Justify", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + distributed = "Distributed" + } + /** + * Represents the vertical alignment for the specified object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartTextVerticalAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + justify = "Justify", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + distributed = "Distributed" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ChartTickLabelAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + right = "Right" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum ChartType { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnClustered = "ColumnClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnStacked = "ColumnStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnStacked100 = "ColumnStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DColumnClustered = "3DColumnClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DColumnStacked = "3DColumnStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DColumnStacked100 = "3DColumnStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + barClustered = "BarClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + barStacked = "BarStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + barStacked100 = "BarStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DBarClustered = "3DBarClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DBarStacked = "3DBarStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DBarStacked100 = "3DBarStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + lineStacked = "LineStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + lineStacked100 = "LineStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + lineMarkers = "LineMarkers", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + lineMarkersStacked = "LineMarkersStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + lineMarkersStacked100 = "LineMarkersStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pieOfPie = "PieOfPie", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pieExploded = "PieExploded", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DPieExploded = "3DPieExploded", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + barOfPie = "BarOfPie", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + xyscatterSmooth = "XYScatterSmooth", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + xyscatterSmoothNoMarkers = "XYScatterSmoothNoMarkers", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + xyscatterLines = "XYScatterLines", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + xyscatterLinesNoMarkers = "XYScatterLinesNoMarkers", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + areaStacked = "AreaStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + areaStacked100 = "AreaStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DAreaStacked = "3DAreaStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DAreaStacked100 = "3DAreaStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + doughnutExploded = "DoughnutExploded", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + radarMarkers = "RadarMarkers", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + radarFilled = "RadarFilled", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + surface = "Surface", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + surfaceWireframe = "SurfaceWireframe", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + surfaceTopView = "SurfaceTopView", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + surfaceTopViewWireframe = "SurfaceTopViewWireframe", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + bubble = "Bubble", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + bubble3DEffect = "Bubble3DEffect", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + stockHLC = "StockHLC", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + stockOHLC = "StockOHLC", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + stockVHLC = "StockVHLC", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + stockVOHLC = "StockVOHLC", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderColClustered = "CylinderColClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderColStacked = "CylinderColStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderColStacked100 = "CylinderColStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderBarClustered = "CylinderBarClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderBarStacked = "CylinderBarStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderBarStacked100 = "CylinderBarStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + cylinderCol = "CylinderCol", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneColClustered = "ConeColClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneColStacked = "ConeColStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneColStacked100 = "ConeColStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneBarClustered = "ConeBarClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneBarStacked = "ConeBarStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneBarStacked100 = "ConeBarStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + coneCol = "ConeCol", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidColClustered = "PyramidColClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidColStacked = "PyramidColStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidColStacked100 = "PyramidColStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidBarClustered = "PyramidBarClustered", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidBarStacked = "PyramidBarStacked", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidBarStacked100 = "PyramidBarStacked100", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pyramidCol = "PyramidCol", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DColumn = "3DColumn", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + line = "Line", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DLine = "3DLine", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DPie = "3DPie", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + pie = "Pie", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + xyscatter = "XYScatter", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + _3DArea = "3DArea", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + area = "Area", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + doughnut = "Doughnut", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + radar = "Radar", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + histogram = "Histogram", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + boxwhisker = "Boxwhisker", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + pareto = "Pareto", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + regionMap = "RegionMap", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + treemap = "Treemap", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + waterfall = "Waterfall", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + sunburst = "Sunburst", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + funnel = "Funnel" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum ChartUnderlineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + single = "Single" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ChartDisplayBlanksAs { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + notPlotted = "NotPlotted", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + zero = "Zero", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + interplotted = "Interplotted" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ChartPlotBy { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + rows = "Rows", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + columns = "Columns" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ChartSplitType { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitByPosition = "SplitByPosition", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitByValue = "SplitByValue", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitByPercentValue = "SplitByPercentValue", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitByCustomSplit = "SplitByCustomSplit" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum ChartColorScheme { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + colorfulPalette1 = "ColorfulPalette1", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + colorfulPalette2 = "ColorfulPalette2", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + colorfulPalette3 = "ColorfulPalette3", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + colorfulPalette4 = "ColorfulPalette4", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette1 = "MonochromaticPalette1", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette2 = "MonochromaticPalette2", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette3 = "MonochromaticPalette3", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette4 = "MonochromaticPalette4", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette5 = "MonochromaticPalette5", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette6 = "MonochromaticPalette6", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette7 = "MonochromaticPalette7", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette8 = "MonochromaticPalette8", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette9 = "MonochromaticPalette9", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette10 = "MonochromaticPalette10", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette11 = "MonochromaticPalette11", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette12 = "MonochromaticPalette12", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + monochromaticPalette13 = "MonochromaticPalette13" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ChartTrendlineType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + linear = "Linear", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + exponential = "Exponential", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + logarithmic = "Logarithmic", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + movingAverage = "MovingAverage", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + polynomial = "Polynomial", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + power = "Power" + } + /** + * Specifies where in the z-order a shape should be moved relative to other shapes. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeZOrder { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bringToFront = "BringToFront", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bringForward = "BringForward", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + sendToBack = "SendToBack", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + sendBackward = "SendBackward" + } + /** + * Specifies the type of a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + unsupported = "Unsupported", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + image = "Image", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShape = "GeometricShape", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + group = "Group", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + line = "Line" + } + /** + * Specifies whether the shape is scaled relative to its original or current size. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeScaleType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + currentSize = "CurrentSize", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + originalSize = "OriginalSize" + } + /** + * Specifies which part of the shape retains its position when the shape is scaled. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeScaleFrom { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + scaleFromTopLeft = "ScaleFromTopLeft", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + scaleFromMiddle = "ScaleFromMiddle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + scaleFromBottomRight = "ScaleFromBottomRight" + } + /** + * Specifies a shape's fill type. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeFillType { + /** + * No fill. + * @remarks + * [Api set: ExcelApi 1.9] + */ + noFill = "NoFill", + /** + * Solid fill. + * @remarks + * [Api set: ExcelApi 1.9] + */ + solid = "Solid", + /** + * Gradient fill. + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradient = "Gradient", + /** + * Pattern fill. + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern = "Pattern", + /** + * Picture and texture fill. + * @remarks + * [Api set: ExcelApi 1.9] + */ + pictureAndTexture = "PictureAndTexture", + /** + * Mixed fill. + * @remarks + * [Api set: ExcelApi 1.9] + */ + mixed = "Mixed" + } + /** + * The type of underline applied to a font. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeFontUnderlineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + single = "Single", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + double = "Double", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + heavy = "Heavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dotted = "Dotted", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dottedHeavy = "DottedHeavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashHeavy = "DashHeavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashLong = "DashLong", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashLongHeavy = "DashLongHeavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dotDash = "DotDash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dotDashHeavy = "DotDashHeavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dotDotDash = "DotDotDash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dotDotDashHeavy = "DotDotDashHeavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wavy = "Wavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wavyHeavy = "WavyHeavy", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wavyDouble = "WavyDouble" + } + /** + * The format of the image. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PictureFormat { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + unknown = "UNKNOWN", + /** + * Bitmap image. + * @remarks + * [Api set: ExcelApi 1.9] + */ + bmp = "BMP", + /** + * Joint Photographic Experts Group. + * @remarks + * [Api set: ExcelApi 1.9] + */ + jpeg = "JPEG", + /** + * Graphics Interchange Format. + * @remarks + * [Api set: ExcelApi 1.9] + */ + gif = "GIF", + /** + * Portable Network Graphics. + * @remarks + * [Api set: ExcelApi 1.9] + */ + png = "PNG", + /** + * Scalable Vector Graphic. + * @remarks + * [Api set: ExcelApi 1.9] + */ + svg = "SVG" + } + /** + * The style for a line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeLineStyle { + /** + * Single line. + * @remarks + * [Api set: ExcelApi 1.9] + */ + single = "Single", + /** + * Thick line with a thin line on each side. + * @remarks + * [Api set: ExcelApi 1.9] + */ + thickBetweenThin = "ThickBetweenThin", + /** + * Thick line next to thin line. For horizontal lines, the thick line is above the thin line. For vertical lines, the thick line is to the left of the thin line. + * @remarks + * [Api set: ExcelApi 1.9] + */ + thickThin = "ThickThin", + /** + * Thick line next to thin line. For horizontal lines, the thick line is below the thin line. For vertical lines, the thick line is to the right of the thin line. + * @remarks + * [Api set: ExcelApi 1.9] + */ + thinThick = "ThinThick", + /** + * Two thin lines. + * @remarks + * [Api set: ExcelApi 1.9] + */ + thinThin = "ThinThin" + } + /** + * The dash style for a line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeLineDashStyle { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashDot = "DashDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashDotDot = "DashDotDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + longDash = "LongDash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + longDashDot = "LongDashDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + roundDot = "RoundDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + solid = "Solid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + squareDot = "SquareDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + longDashDotDot = "LongDashDotDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + systemDash = "SystemDash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + systemDot = "SystemDot", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + systemDashDot = "SystemDashDot" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ArrowheadLength { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + short = "Short", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + medium = "Medium", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + long = "Long" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ArrowheadStyle { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + triangle = "Triangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + stealth = "Stealth", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + diamond = "Diamond", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + oval = "Oval", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + open = "Open" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ArrowheadWidth { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + narrow = "Narrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + medium = "Medium", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wide = "Wide" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum BindingType { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + range = "Range", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + table = "Table", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + text = "Text" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum BorderIndex { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + edgeTop = "EdgeTop", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + edgeBottom = "EdgeBottom", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + edgeLeft = "EdgeLeft", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + edgeRight = "EdgeRight", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + insideVertical = "InsideVertical", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + insideHorizontal = "InsideHorizontal", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + diagonalDown = "DiagonalDown", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + diagonalUp = "DiagonalUp" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum BorderLineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + continuous = "Continuous", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + dashDot = "DashDot", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + dashDotDot = "DashDotDot", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + dot = "Dot", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + double = "Double", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + slantDashDot = "SlantDashDot" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum BorderWeight { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + hairline = "Hairline", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + thin = "Thin", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + medium = "Medium", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + thick = "Thick" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum CalculationMode { + /** + * The default recalculation behavior where Excel calculates new formula results every time the relevant data is changed. + * @remarks + * [Api set: ExcelApi 1.1] + */ + automatic = "Automatic", + /** + * Calculates new formula results every time the relevant data is changed, unless the formula is in a data table. + * @remarks + * [Api set: ExcelApi 1.1] + */ + automaticExceptTables = "AutomaticExceptTables", + /** + * Calculations only occur when the user or add-in requests them. + * @remarks + * [Api set: ExcelApi 1.1] + */ + manual = "Manual" + } + /** + * @remarks + * [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. + * @remarks + * [Api set: ExcelApi 1.1] + */ + recalculate = "Recalculate", + /** + * This will mark all cells as dirty and then recalculate them. + * @remarks + * [Api set: ExcelApi 1.1] + */ + full = "Full", + /** + * This will rebuild the full dependency chain, mark all cells as dirty and then recalculate them. + * @remarks + * [Api set: ExcelApi 1.1] + */ + fullRebuild = "FullRebuild" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum ClearApplyTo { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + all = "All", + /** + * Clears all formatting for the range. + * @remarks + * [Api set: ExcelApi 1.1] + */ + formats = "Formats", + /** + * Clears the contents of the range. + * @remarks + * [Api set: ExcelApi 1.1] + */ + contents = "Contents", + /** + * Clears all hyperlinks, but leaves all content and formatting intact. + * @remarks + * [Api set: ExcelApi 1.7] + */ + hyperlinks = "Hyperlinks", + /** + * Removes hyperlinks and formatting for the cell but leaves content, conditional formats, and data validation intact. + * @remarks + * [Api set: ExcelApi 1.7] + */ + removeHyperlinks = "RemoveHyperlinks" + } + /** + * Represents the format options for a data bar axis. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalDataBarAxisFormat { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + cellMidPoint = "CellMidPoint" + } + /** + * Represents the data bar direction within a cell. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalDataBarDirection { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + context = "Context", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + leftToRight = "LeftToRight", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + rightToLeft = "RightToLeft" + } + /** + * Represents the direction for a selection. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatDirection { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + bottom = "Bottom" + } + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatType { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + custom = "Custom", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBar = "DataBar", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScale = "ColorScale", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSet = "IconSet", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottom = "TopBottom", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + presetCriteria = "PresetCriteria", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + containsText = "ContainsText", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + cellValue = "CellValue" + } + /** + * Represents the types of conditional format values. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatRuleType { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + automatic = "Automatic", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lowestValue = "LowestValue", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + highestValue = "HighestValue", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + number = "Number", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + percent = "Percent", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula = "Formula", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + percentile = "Percentile" + } + /** + * Represents the types of icon conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatIconRuleType { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + number = "Number", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + percent = "Percent", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula = "Formula", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + percentile = "Percentile" + } + /** + * Represents the types of color criterion for conditional formatting. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatColorCriterionType { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lowestValue = "LowestValue", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + highestValue = "HighestValue", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + number = "Number", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + percent = "Percent", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula = "Formula", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + percentile = "Percentile" + } + /** + * Represents the criteria for the above/below average conditional format type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalTopBottomCriterionType { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + topItems = "TopItems", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + topPercent = "TopPercent", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + bottomItems = "BottomItems", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + bottomPercent = "BottomPercent" + } + /** + * Represents the criteria of the preset criteria conditional format type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatPresetCriterion { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + blanks = "Blanks", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + nonBlanks = "NonBlanks", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + errors = "Errors", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + nonErrors = "NonErrors", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + yesterday = "Yesterday", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + today = "Today", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + tomorrow = "Tomorrow", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lastSevenDays = "LastSevenDays", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lastWeek = "LastWeek", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + thisWeek = "ThisWeek", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + nextWeek = "NextWeek", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lastMonth = "LastMonth", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + thisMonth = "ThisMonth", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + nextMonth = "NextMonth", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + aboveAverage = "AboveAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + belowAverage = "BelowAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + equalOrAboveAverage = "EqualOrAboveAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + equalOrBelowAverage = "EqualOrBelowAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + oneStdDevAboveAverage = "OneStdDevAboveAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + oneStdDevBelowAverage = "OneStdDevBelowAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + twoStdDevAboveAverage = "TwoStdDevAboveAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + twoStdDevBelowAverage = "TwoStdDevBelowAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + threeStdDevAboveAverage = "ThreeStdDevAboveAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + threeStdDevBelowAverage = "ThreeStdDevBelowAverage", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + uniqueValues = "UniqueValues", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + duplicateValues = "DuplicateValues" + } + /** + * Represents the operator of the text conditional format type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalTextOperator { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + contains = "Contains", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + notContains = "NotContains", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + beginsWith = "BeginsWith", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + endsWith = "EndsWith" + } + /** + * Represents the operator of the text conditional format type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalCellValueOperator { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + between = "Between", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + notBetween = "NotBetween", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + equalTo = "EqualTo", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + notEqualTo = "NotEqualTo", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + greaterThan = "GreaterThan", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lessThan = "LessThan", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + greaterThanOrEqual = "GreaterThanOrEqual", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + lessThanOrEqual = "LessThanOrEqual" + } + /** + * Represents the operator for each icon criteria. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalIconCriterionOperator { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + greaterThan = "GreaterThan", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + greaterThanOrEqual = "GreaterThanOrEqual" + } + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalRangeBorderIndex { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + edgeTop = "EdgeTop", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + edgeBottom = "EdgeBottom", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + edgeLeft = "EdgeLeft", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + edgeRight = "EdgeRight" + } + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalRangeBorderLineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + continuous = "Continuous", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + dashDot = "DashDot", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + dashDotDot = "DashDotDot", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + dot = "Dot" + } + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + enum ConditionalRangeFontUnderlineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + single = "Single", + /** + * @remarks + * [Api set: ExcelApi 1.6] + */ + double = "Double" + } + /** + * Represents the data validation type enum. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum DataValidationType { + /** + * None means allow any value, indicating that there is no data validation in the range. + * @remarks + * [Api set: ExcelApi 1.8] + */ + none = "None", + /** + * The whole number data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + wholeNumber = "WholeNumber", + /** + * The decimal data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + decimal = "Decimal", + /** + * The list data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + list = "List", + /** + * The date data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + date = "Date", + /** + * The time data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + time = "Time", + /** + * The text length data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + textLength = "TextLength", + /** + * The custom data validation type. + * @remarks + * [Api set: ExcelApi 1.8] + */ + custom = "Custom", + /** + * Inconsistent means that the range has inconsistent data validation, indicating that there are different rules on different cells. + * @remarks + * [Api set: ExcelApi 1.8] + */ + inconsistent = "Inconsistent", + /** + * Mixed criteria means that the range has data validation present on some but not all cells. + * @remarks + * [Api set: ExcelApi 1.8] + */ + mixedCriteria = "MixedCriteria" + } + /** + * Represents the data validation operator enum. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum DataValidationOperator { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + between = "Between", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + notBetween = "NotBetween", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + equalTo = "EqualTo", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + notEqualTo = "NotEqualTo", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + greaterThan = "GreaterThan", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + lessThan = "LessThan", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + greaterThanOrEqualTo = "GreaterThanOrEqualTo", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + lessThanOrEqualTo = "LessThanOrEqualTo" + } + /** + * Represents the data validation error alert style. The default is `Stop`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum DataValidationAlertStyle { + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + stop = "Stop", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + warning = "Warning", + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + information = "Information" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum DeleteShiftDirection { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + up = "Up", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + left = "Left" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum DynamicFilterCriteria { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + aboveAverage = "AboveAverage", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodApril = "AllDatesInPeriodApril", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodAugust = "AllDatesInPeriodAugust", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodDecember = "AllDatesInPeriodDecember", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodFebruray = "AllDatesInPeriodFebruray", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodJanuary = "AllDatesInPeriodJanuary", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodJuly = "AllDatesInPeriodJuly", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodJune = "AllDatesInPeriodJune", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodMarch = "AllDatesInPeriodMarch", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodMay = "AllDatesInPeriodMay", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodNovember = "AllDatesInPeriodNovember", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodOctober = "AllDatesInPeriodOctober", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodQuarter1 = "AllDatesInPeriodQuarter1", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodQuarter2 = "AllDatesInPeriodQuarter2", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodQuarter3 = "AllDatesInPeriodQuarter3", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodQuarter4 = "AllDatesInPeriodQuarter4", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + allDatesInPeriodSeptember = "AllDatesInPeriodSeptember", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + belowAverage = "BelowAverage", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + lastMonth = "LastMonth", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + lastQuarter = "LastQuarter", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + lastWeek = "LastWeek", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + lastYear = "LastYear", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + nextMonth = "NextMonth", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + nextQuarter = "NextQuarter", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + nextWeek = "NextWeek", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + nextYear = "NextYear", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + thisMonth = "ThisMonth", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + thisQuarter = "ThisQuarter", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + thisWeek = "ThisWeek", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + thisYear = "ThisYear", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + today = "Today", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + tomorrow = "Tomorrow", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + yearToDate = "YearToDate", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + yesterday = "Yesterday" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum FilterDatetimeSpecificity { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + year = "Year", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + month = "Month", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + day = "Day", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + hour = "Hour", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + minute = "Minute", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + second = "Second" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum FilterOn { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + bottomItems = "BottomItems", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + bottomPercent = "BottomPercent", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + cellColor = "CellColor", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + dynamic = "Dynamic", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fontColor = "FontColor", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + values = "Values", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + topItems = "TopItems", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + topPercent = "TopPercent", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + icon = "Icon", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + custom = "Custom" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum FilterOperator { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + and = "And", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + or = "Or" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum HorizontalAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + general = "General", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + right = "Right", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + fill = "Fill", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + justify = "Justify", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + centerAcrossSelection = "CenterAcrossSelection", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + distributed = "Distributed" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum IconSet { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + invalid = "Invalid", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeArrows = "ThreeArrows", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeArrowsGray = "ThreeArrowsGray", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeFlags = "ThreeFlags", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeTrafficLights1 = "ThreeTrafficLights1", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeTrafficLights2 = "ThreeTrafficLights2", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeSigns = "ThreeSigns", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeSymbols = "ThreeSymbols", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeSymbols2 = "ThreeSymbols2", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fourArrows = "FourArrows", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fourArrowsGray = "FourArrowsGray", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fourRedToBlack = "FourRedToBlack", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fourRating = "FourRating", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fourTrafficLights = "FourTrafficLights", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fiveArrows = "FiveArrows", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fiveArrowsGray = "FiveArrowsGray", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fiveRating = "FiveRating", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fiveQuarters = "FiveQuarters", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeStars = "ThreeStars", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + threeTriangles = "ThreeTriangles", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fiveBoxes = "FiveBoxes" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum ImageFittingMode { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fit = "Fit", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fitAndCenter = "FitAndCenter", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fill = "Fill" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum InsertShiftDirection { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + down = "Down", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + right = "Right" + } + /** + * @remarks + * [Api set: ExcelApi 1.4] + */ + enum NamedItemScope { + /** + * @remarks + * [Api set: ExcelApi 1.4] + */ + worksheet = "Worksheet", + /** + * @remarks + * [Api set: ExcelApi 1.4] + */ + workbook = "Workbook" + } + /** + * @remarks + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + */ + enum NamedItemType { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + string = "String", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + integer = "Integer", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + double = "Double", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + boolean = "Boolean", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + range = "Range", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + error = "Error", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + array = "Array" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum RangeUnderlineStyle { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + single = "Single", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + double = "Double", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + singleAccountant = "SingleAccountant", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + doubleAccountant = "DoubleAccountant" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum SheetVisibility { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible = "Visible", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + hidden = "Hidden", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + veryHidden = "VeryHidden" + } + /** + * @remarks + * [Api set: ExcelApi 1.14] + */ + enum EventTriggerSource { + /** + * The event trigger source is unknown or currently unsupported. + * @remarks + * [Api set: ExcelApi 1.14] + */ + unknown = "Unknown", + /** + * The event is triggered by the Office JS API of the current add-in. + * @remarks + * [Api set: ExcelApi 1.14] + */ + thisLocalAddin = "ThisLocalAddin" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum RangeValueType { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + empty = "Empty", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + string = "String", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + integer = "Integer", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + double = "Double", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + boolean = "Boolean", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + error = "Error", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + richValue = "RichValue" + } + /** + * @remarks + * [Api set: ExcelApi 1.13] + */ + enum KeyboardDirection { + /** + * @remarks + * [Api set: ExcelApi 1.13] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.13] + */ + right = "Right", + /** + * @remarks + * [Api set: ExcelApi 1.13] + */ + up = "Up", + /** + * @remarks + * [Api set: ExcelApi 1.13] + */ + down = "Down" + } + /** + * Specifies the search direction. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum SearchDirection { + /** + * Search in forward order. + * @remarks + * [Api set: ExcelApi 1.9] + */ + forward = "Forward", + /** + * Search in reverse order. + * @remarks + * [Api set: ExcelApi 1.9] + */ + backwards = "Backwards" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum SortOrientation { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + rows = "Rows", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + columns = "Columns" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum SortOn { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + value = "Value", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + cellColor = "CellColor", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + fontColor = "FontColor", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + icon = "Icon" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum SortDataOption { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + normal = "Normal", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + textAsNumber = "TextAsNumber" + } + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + enum SortMethod { + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + pinYin = "PinYin", + /** + * @remarks + * [Api set: ExcelApi 1.2] + */ + strokeCount = "StrokeCount" + } + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + enum VerticalAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + justify = "Justify", + /** + * @remarks + * [Api set: ExcelApi 1.1] + */ + distributed = "Distributed" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum DocumentPropertyType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + number = "Number", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + boolean = "Boolean", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + date = "Date", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + string = "String", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + float = "Float" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum EventSource { + /** + * Local means the event comes from a local user session. + * @remarks + * [Api set: ExcelApi 1.7] + */ + local = "Local", + /** + * Remote means the event comes from a remote user session. + * @remarks + * [Api set: ExcelApi 1.7] + */ + remote = "Remote" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum DataChangeType { + /** + * `Unknown` indicates that the type of data change is not one of the listed types. + * @remarks + * [Api set: ExcelApi 1.8. The name of this value was 'Others' in ExcelApi 1.7] + */ + unknown = "Unknown", + /** + * `RangeEdited` indicates that the data change event is triggered by a range being edited. + * @remarks + * [Api set: ExcelApi 1.7] + */ + rangeEdited = "RangeEdited", + /** + * `RowInserted` indicates that the data change event is triggered by inserting new rows. + * @remarks + * [Api set: ExcelApi 1.7] + */ + rowInserted = "RowInserted", + /** + * `RowDeleted` indicates that the data change event is triggered by deleting rows. + * @remarks + * [Api set: ExcelApi 1.7] + */ + rowDeleted = "RowDeleted", + /** + * `ColumnInserted` indicates that the data change event is triggered by inserting new columns. + * @remarks + * [Api set: ExcelApi 1.7] + */ + columnInserted = "ColumnInserted", + /** + * `ColumnDeleted` indicates that the data change event is triggered by deleting columns. + * @remarks + * [Api set: ExcelApi 1.7] + */ + columnDeleted = "ColumnDeleted", + /** + * `CellInserted` indicates that the data change event is triggered by inserting new cells. + * @remarks + * [Api set: ExcelApi 1.7] + */ + cellInserted = "CellInserted", + /** + * `CellDeleted` indicates that the data change event is triggered by deleting cells. + * @remarks + * [Api set: ExcelApi 1.7] + */ + cellDeleted = "CellDeleted" + } + /** + * @remarks + * [Api set: ExcelApi 1.11] + */ + enum RowHiddenChangeType { + /** + * `Unhidden` indicates that the row is not hidden. + * @remarks + * [Api set: ExcelApi 1.11] + */ + unhidden = "Unhidden", + /** + * `Hidden` indicates that the row is hidden. + * @remarks + * [Api set: ExcelApi 1.11] + */ + hidden = "Hidden" + } + /** + * Represents how the comments in the event were changed. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum CommentChangeType { + /** + * Comments were edited. + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentEdited = "CommentEdited", + /** + * Comments were resolved. + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentResolved = "CommentResolved", + /** + * Comments were reopened. + * @remarks + * [Api set: ExcelApi 1.12] + */ + commentReopened = "CommentReopened", + /** + * Replies were added. + * @remarks + * [Api set: ExcelApi 1.12] + */ + replyAdded = "ReplyAdded", + /** + * Replies were deleted. + * @remarks + * [Api set: ExcelApi 1.12] + */ + replyDeleted = "ReplyDeleted", + /** + * Replies were edited. + * @remarks + * [Api set: ExcelApi 1.12] + */ + replyEdited = "ReplyEdited" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum EventType { + /** + * `WorksheetChanged` represents the type of event registered on a `Worksheet` or `WorksheetCollection` and occurs when data changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetChanged = "WorksheetChanged", + /** + * `WorksheetSelectionChanged` represents the type of event registered on a `Worksheet` and occurs when the selection changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetSelectionChanged = "WorksheetSelectionChanged", + /** + * `WorksheetAdded` represents the type of event registered on a `WorksheetCollection` and occurs when a new worksheet is added to the workbook. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetAdded = "WorksheetAdded", + /** + * `WorksheetActivated` represents the type of event registered on a `Worksheet` or `WorksheetCollection` and occurs when a worksheet activates. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetActivated = "WorksheetActivated", + /** + * `WorksheetDeactivated` represents the type of event registered on a `Worksheet` or `WorksheetCollection` and occurs when a worksheet deactivates. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetDeactivated = "WorksheetDeactivated", + /** + * `TableChanged` represents the type of event registered on a `Table` and occurs when data changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableChanged = "TableChanged", + /** + * `TableSelectionChanged` represents the type of event registered on a `Table` and occurs when the selection changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableSelectionChanged = "TableSelectionChanged", + /** + * `WorksheetDeleted` represents the type of event registered on a `WorksheetCollection` and occurs when a worksheet is deleted from the workbook. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetDeleted = "WorksheetDeleted", + /** + * `ChartAdded` represents the type of event registered on a `ChartCollection` and occurs when a new chart is added to the worksheet. + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartAdded = "ChartAdded", + /** + * `ChartActivated` represents the type of event registered on a `Chart` or `ChartCollection` and occurs when a chart activates. + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartActivated = "ChartActivated", + /** + * `ChartDeactivated` represents the type of event registered on a `Chart` or `ChartCollection` and occurs when a chart deactivates. + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartDeactivated = "ChartDeactivated", + /** + * `ChartDeleted` represents the type of event registered on a `ChartCollection` and occurs when a chart is deleted from the worksheet. + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartDeleted = "ChartDeleted", + /** + * `WorksheetCalculated` represents the type of event registered on a `Worksheet` or `WorksheetCollection` and occurs when a worksheet is calculated. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetCalculated = "WorksheetCalculated", + /** + * `VisualSelectionChanged` represents the type of event registered on a `VisualCollection` and occurs when the visual selection changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + 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. + * @remarks + * [Api set: ExcelApi 1.7] + */ + agaveVisualUpdate = "AgaveVisualUpdate", + /** + * `TableAdded` represents the type of event registered on a `TableCollection` and occurs when a table is added. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableAdded = "TableAdded", + /** + * `TableDeleted` represents the type of event that is registered on a `TableCollection` and occurs when a table is deleted. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableDeleted = "TableDeleted", + /** + * `TableFiltered` represents the type of event registered on a table or `TableCollection` and occurs when the data of a table is filtered. + * @remarks + * [Api set: ExcelApi 1.7] + */ + tableFiltered = "TableFiltered", + /** + * `WorksheetFiltered` represents the type of event registered on a worksheet or `WorksheetCollection` and occurs when the data of an AutoFilter in the worksheet is filtered. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetFiltered = "WorksheetFiltered", + /** + * `ShapeActivated` represents the type of event that is registered on a `Shape` and occurs when the shape activates. + * @remarks + * [Api set: ExcelApi 1.7] + */ + shapeActivated = "ShapeActivated", + /** + * `ShapeDeactivated` represents the type of event that is registered on a `Shape` and occurs when the shape deactivates. + * @remarks + * [Api set: ExcelApi 1.7] + */ + shapeDeactivated = "ShapeDeactivated", + /** + * `VisualChange` represents the type of event registered on a `Visual` and occurs when there is a visual change. + * @remarks + * [Api set: ExcelApi 1.7] + */ + visualChange = "VisualChange", + /** + * `WorkbookAutoSaveSettingChanged` represents the type of event registered on a workbook and occurs when there is an auto save setting change. + * @remarks + * [Api set: ExcelApi 1.7] + */ + workbookAutoSaveSettingChanged = "WorkbookAutoSaveSettingChanged", + /** + * `WorksheetFormatChanged` represents the type of event registered on a worksheet and occurs when a format is changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetFormatChanged = "WorksheetFormatChanged", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + wacoperationEvent = "WACOperationEvent", + /** + * `RibbonCommandExecuted` represents the type of event registered on the ribbon and occurs when a user clicks on the ribbon + * @remarks + * [Api set: ExcelApi 1.7] + */ + ribbonCommandExecuted = "RibbonCommandExecuted", + /** + * `WorksheetRowSorted` represents the type of event registered on a worksheet and occurs when rows are sorted. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetRowSorted = "WorksheetRowSorted", + /** + * `WorksheetColumnSorted` represents the type of event registered on a worksheet and occurs columns are sorted. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetColumnSorted = "WorksheetColumnSorted", + /** + * `WorksheetSingleClicked` represents the type of event registered on a worksheet and occurs when a cell is left-clicked or tapped. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetSingleClicked = "WorksheetSingleClicked", + /** + * `WorksheetRowHiddenChanged` represents the type of event registered on a worksheet and occurs when a row's hidden state is changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetRowHiddenChanged = "WorksheetRowHiddenChanged", + /** + * `RecordingStateChangedEvent` represents the event fired when macro recording starts or stops. + * @remarks + * [Api set: ExcelApi 1.7] + */ + recordingStateChangedEvent = "RecordingStateChangedEvent", + /** + * `CommentAdded` represents the type of event that is registered on a comment collection and occurs when comments are added. + * @remarks + * [Api set: ExcelApi 1.7] + */ + commentAdded = "CommentAdded", + /** + * `CommentDeleted` represents the type of event that is registered on a comment collection and occurs when comments are deleted. + * @remarks + * [Api set: ExcelApi 1.7] + */ + commentDeleted = "CommentDeleted", + /** + * `CommentChanged` represents the type of event that is registered on a comment collection and occurs when comments are changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + commentChanged = "CommentChanged", + /** + * `RefreshRequestCompleted` represents the type of event registered on a `LinkedDataType` and occurs when a request to refresh a data source is completed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + linkedDataTypeRefreshRequestCompleted = "LinkedDataTypeRefreshRequestCompleted", + /** + * `RefreshModeChanged` represents the type of event registered on a `LinkedDataType` and occurs when the linked data type refresh mode is changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + linkedDataTypeRefreshModeChanged = "LinkedDataTypeRefreshModeChanged", + /** + * `LinkedDataTypeAdded` represents the type of event registered on a `LinkedDataType` and occurs when a new linked data type is added to the workbook. + * @remarks + * [Api set: ExcelApi 1.7] + */ + linkedDataTypeLinkedDataTypeAdded = "LinkedDataTypeLinkedDataTypeAdded", + /** + * `WorksheetFormulaChanged` represents the type of event registered on a worksheet and occurs when a formula is changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetFormulaChanged = "WorksheetFormulaChanged", + /** + * `WorkbookActivated` represents the type of event which is fired when a workbook is activated. + * @remarks + * [Api set: ExcelApi 1.7] + */ + workbookActivated = "WorkbookActivated", + /** + * `WorkbookLinksChanged` represents the type of event which is fired when a workbook link is changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + linkedWorkbookWorkbookLinksChanged = "LinkedWorkbookWorkbookLinksChanged", + /** + * `WorkbookLinksRefreshCompleted` represents the type of event registered on a linked Workbook and occurs when a linked workbook completes a refresh. + * @remarks + * [Api set: ExcelApi 1.7] + */ + linkedWorkbookRefreshCompleted = "LinkedWorkbookRefreshCompleted", + /** + * WorksheetProtectionChanged represents the type of event registered on worksheet, and occurs when protection status is changed. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetProtectionChanged = "WorksheetProtectionChanged", + /** + * WorksheetNameChanged represents the type of event registered on a worksheet that occurs when its name changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetNameChanged = "WorksheetNameChanged", + /** + * WorksheetVisibilityChanged represents the type of event registered on a worksheet that occurs when its visibility changes. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetVisibilityChanged = "WorksheetVisibilityChanged", + /** + * WorksheetMoved represents the type of event registered on a worksheet that occurs when it is moved within a workbook. + * @remarks + * [Api set: ExcelApi 1.7] + */ + worksheetMoved = "WorksheetMoved", + /** + * LineageActivityUpdateAvailable represents the type of event registered when new revision updates lineage model. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + lineageActivityUpdateAvailable = "LineageActivityUpdateAvailable", + /** + * LineageActivityFilterUpdated represents the type of event registered when lineage filter is updated. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + lineageActivityFilterUpdated = "LineageActivityFilterUpdated", + /** + * LineageActivityLoadCompleted represents the type of event registered UserActivities are loaded by lineage mode. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + lineageActivityLoadCompleted = "LineageActivityLoadCompleted", + /** + * ShapeAdded represents the type of event registered when a shape has been added to a ShapeCollection. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + shapeAdded = "ShapeAdded", + /** + * ShapeDeleted represents the type of event registered when a shape has been deleted from a ShapeCollection. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + shapeDeleted = "ShapeDeleted", + /** + * PivotTableAdded represents the type of event registered when a PivotTable has been added to a PivotTableCollection. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + pivotTableAdded = "PivotTableAdded", + /** + * PivotTableDeleted represents the type of event registered when a PivotTable has been deleted from a PivotTableCollection. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + pivotTableDeleted = "PivotTableDeleted", + /** + * NamedItemAdded represents the type of event registered when a NamedItem has been added to a NamedItemCollection. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + namedItemAdded = "NamedItemAdded", + /** + * NamedItemDeleted represents the type of event registered when a NamedItem has been deleted from a NamedItemCollection. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + namedItemDeleted = "NamedItemDeleted", + /** + * WorksheetNavigationObjectChanged represents the type of event registered when a navigation object has changed on a worksheet. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + worksheetNavigationObjectChanged = "WorksheetNavigationObjectChanged", + /** + * WorkbookNavigationObjectChanged represents the type of event registered when a navigation object has changed on a workbook. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + workbookNavigationObjectChanged = "WorkbookNavigationObjectChanged", + /** + * WorksheetRowHeightChanged represents the type of event registered when the height of a worksheet row is changed. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetRowHeightChanged = "WorksheetRowHeightChanged", + /** + * WorkbookFormulaReferenceStyleChanged represents the type of event registered when the formula refence style has changed on a workbook. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + workbookFormulaReferenceStyleChanged = "WorkbookFormulaReferenceStyleChanged", + /** + * GuidedReapplyManagerUpdateAvailable represents the type of event registered when a new revision is created on the workbook after a coauthoring error. + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + guidedReapplyManagerUpdateAvailable = "GuidedReapplyManagerUpdateAvailable", + /** + * Deprecated + VbaRecorderRecordingChanged represents the type of event registered when the VBA recording output changes. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + vbaRecorderRecordingChanged = "VbaRecorderRecordingChanged", + /** + * RangeValuesPreviewDismissed represents the type of event registered when a RangeValuePreview is dismissed. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rangeValuesPreviewDismissed = "RangeValuesPreviewDismissed", + /** + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + annotationAdded = "AnnotationAdded", + /** + * Workbook Action Recorded represents the type of event registered when the workbook records an action. + * @remarks + * [Api set: Recorder 1.1] + */ + workbookActionRecorded = "WorkbookActionRecorded", + /** + * UndoChanged represents the type of event registered when the undo or redo stack is modified + * @remarks + * [Api set: ExcelApi 99.9] + * @beta + */ + applicationUndoChanged = "ApplicationUndoChanged", + /** + * VbaRecorderRecordingChanged represents the type of event registered when the VBA recording output changes. + * @remarks + * [Api set: Recorder 1.1] + */ + vbaRecorderRecordingChanged2 = "VbaRecorderRecordingChanged2" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum DocumentPropertyItem { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + title = "Title", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + subject = "Subject", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + author = "Author", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + keywords = "Keywords", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + comments = "Comments", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + template = "Template", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + lastAuth = "LastAuth", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + revision = "Revision", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + appName = "AppName", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + lastPrint = "LastPrint", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + creation = "Creation", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + lastSave = "LastSave", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + category = "Category", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + format = "Format", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + manager = "Manager", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + company = "Company" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum SubtotalLocationType { + /** + * Subtotals are at the top. + * @remarks + * [Api set: ExcelApi 1.8] + */ + atTop = "AtTop", + /** + * Subtotals are at the bottom. + * @remarks + * [Api set: ExcelApi 1.8] + */ + atBottom = "AtBottom", + /** + * Subtotals are off. + * @remarks + * [Api set: ExcelApi 1.8] + */ + off = "Off" + } + /** + * @remarks + * [Api set: ExcelApi 1.8] + */ + enum PivotLayoutType { + /** + * A horizontally compressed form with labels from the next field in the same column. + * @remarks + * [Api set: ExcelApi 1.8] + */ + compact = "Compact", + /** + * Inner fields' items are always on a new line relative to the outer fields' items. + * @remarks + * [Api set: ExcelApi 1.8] + */ + tabular = "Tabular", + /** + * Inner fields' items are on same row as outer fields' items and subtotals are always on the bottom. + * @remarks + * [Api set: ExcelApi 1.8] + */ + outline = "Outline" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum ProtectionSelectionMode { + /** + * Selection is allowed for all cells. + * @remarks + * [Api set: ExcelApi 1.7] + */ + normal = "Normal", + /** + * Selection is allowed only for cells that are not locked. + * @remarks + * [Api set: ExcelApi 1.7] + */ + unlocked = "Unlocked", + /** + * Selection is not allowed for any cells. + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum PageOrientation { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + portrait = "Portrait", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + landscape = "Landscape" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PaperType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + letter = "Letter", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + letterSmall = "LetterSmall", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + tabloid = "Tabloid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + ledger = "Ledger", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + legal = "Legal", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + statement = "Statement", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + executive = "Executive", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + a3 = "A3", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + a4 = "A4", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + a4Small = "A4Small", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + a5 = "A5", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + b4 = "B4", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + b5 = "B5", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + folio = "Folio", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + quatro = "Quatro", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + paper10x14 = "Paper10x14", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + paper11x17 = "Paper11x17", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + note = "Note", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelope9 = "Envelope9", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelope10 = "Envelope10", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelope11 = "Envelope11", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelope12 = "Envelope12", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelope14 = "Envelope14", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + csheet = "Csheet", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dsheet = "Dsheet", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + esheet = "Esheet", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeDL = "EnvelopeDL", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeC5 = "EnvelopeC5", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeC3 = "EnvelopeC3", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeC4 = "EnvelopeC4", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeC6 = "EnvelopeC6", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeC65 = "EnvelopeC65", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeB4 = "EnvelopeB4", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeB5 = "EnvelopeB5", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeB6 = "EnvelopeB6", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeItaly = "EnvelopeItaly", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopeMonarch = "EnvelopeMonarch", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + envelopePersonal = "EnvelopePersonal", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + fanfoldUS = "FanfoldUS", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + fanfoldStdGerman = "FanfoldStdGerman", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + fanfoldLegalGerman = "FanfoldLegalGerman" + } + /** + * @remarks + * [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. + * @remarks + * [Api set: ExcelApi 1.7] + */ + context = "Context", + /** + * Left to right reading order + * @remarks + * [Api set: ExcelApi 1.7] + */ + leftToRight = "LeftToRight", + /** + * Right to left reading order + * @remarks + * [Api set: ExcelApi 1.7] + */ + rightToLeft = "RightToLeft" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum BuiltInStyle { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + normal = "Normal", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + comma = "Comma", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + currency = "Currency", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + percent = "Percent", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + wholeComma = "WholeComma", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + wholeDollar = "WholeDollar", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + hlink = "Hlink", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + hlinkTrav = "HlinkTrav", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + note = "Note", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + warningText = "WarningText", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + emphasis1 = "Emphasis1", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + emphasis2 = "Emphasis2", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + emphasis3 = "Emphasis3", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + sheetTitle = "SheetTitle", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + heading1 = "Heading1", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + heading2 = "Heading2", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + heading3 = "Heading3", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + heading4 = "Heading4", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + input = "Input", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + output = "Output", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + calculation = "Calculation", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + checkCell = "CheckCell", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + linkedCell = "LinkedCell", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + total = "Total", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + good = "Good", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + bad = "Bad", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + neutral = "Neutral", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent1 = "Accent1", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent1_20 = "Accent1_20", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent1_40 = "Accent1_40", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent1_60 = "Accent1_60", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent2 = "Accent2", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent2_20 = "Accent2_20", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent2_40 = "Accent2_40", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent2_60 = "Accent2_60", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent3 = "Accent3", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent3_20 = "Accent3_20", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent3_40 = "Accent3_40", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent3_60 = "Accent3_60", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent4 = "Accent4", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent4_20 = "Accent4_20", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent4_40 = "Accent4_40", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent4_60 = "Accent4_60", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent5 = "Accent5", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent5_20 = "Accent5_20", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent5_40 = "Accent5_40", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent5_60 = "Accent5_60", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent6 = "Accent6", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent6_20 = "Accent6_20", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent6_40 = "Accent6_40", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + accent6_60 = "Accent6_60", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + explanatoryText = "ExplanatoryText" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PrintErrorType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + asDisplayed = "AsDisplayed", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + blank = "Blank", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dash = "Dash", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + notAvailable = "NotAvailable" + } + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + enum WorksheetPositionType { + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + before = "Before", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + after = "After", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + beginning = "Beginning", + /** + * @remarks + * [Api set: ExcelApi 1.7] + */ + end = "End" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PrintComments { + /** + * Comments will not be printed. + * @remarks + * [Api set: ExcelApi 1.9] + */ + noComments = "NoComments", + /** + * Comments will be printed as end notes at the end of the worksheet. + * @remarks + * [Api set: ExcelApi 1.9] + */ + endSheet = "EndSheet", + /** + * Comments will be printed where they were inserted in the worksheet. + * @remarks + * [Api set: ExcelApi 1.9] + */ + inPlace = "InPlace" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PrintOrder { + /** + * Process down the rows before processing across pages or page fields to the right. + * @remarks + * [Api set: ExcelApi 1.9] + */ + downThenOver = "DownThenOver", + /** + * Process across pages or page fields to the right before moving down the rows. + * @remarks + * [Api set: ExcelApi 1.9] + */ + overThenDown = "OverThenDown" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum PrintMarginUnit { + /** + * Assign the page margins in points. A point is 1/72 of an inch. + * @remarks + * [Api set: ExcelApi 1.9] + */ + points = "Points", + /** + * Assign the page margins in inches. + * @remarks + * [Api set: ExcelApi 1.9] + */ + inches = "Inches", + /** + * Assign the page margins in centimeters. + * @remarks + * [Api set: ExcelApi 1.9] + */ + centimeters = "Centimeters" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum HeaderFooterState { + /** + * Only one general header/footer is used for all pages printed. + * @remarks + * [Api set: ExcelApi 1.9] + */ + default = "Default", + /** + * There is a separate first page header/footer, and a general header/footer used for all other pages. + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstAndDefault = "FirstAndDefault", + /** + * There is a different header/footer for odd and even pages. + * @remarks + * [Api set: ExcelApi 1.9] + */ + oddAndEven = "OddAndEven", + /** + * There is a separate first page header/footer, then there is a separate header/footer for odd and even pages. + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstOddAndEven = "FirstOddAndEven" + } + /** + * The behavior types when AutoFill is used on a range in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum AutoFillType { + /** + * Populates the adjacent cells based on the surrounding data (the standard AutoFill behavior). + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillDefault = "FillDefault", + /** + * Populates the adjacent cells with data based on the selected data. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillCopy = "FillCopy", + /** + * Populates the adjacent cells with data that follows a pattern in the copied cells. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillSeries = "FillSeries", + /** + * Populates the adjacent cells with the selected formulas. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillFormats = "FillFormats", + /** + * Populates the adjacent cells with the selected values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillValues = "FillValues", + /** + * A version of "FillSeries" for dates that bases the pattern on either the day of the month or the day of the week, depending on the context. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillDays = "FillDays", + /** + * A version of "FillSeries" for dates that bases the pattern on the day of the week and only includes weekdays. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillWeekdays = "FillWeekdays", + /** + * A version of "FillSeries" for dates that bases the pattern on the month. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillMonths = "FillMonths", + /** + * A version of "FillSeries" for dates that bases the pattern on the year. + * @remarks + * [Api set: ExcelApi 1.9] + */ + fillYears = "FillYears", + /** + * A version of "FillSeries" for numbers that fills out the values in the adjacent cells according to a linear trend model. + * @remarks + * [Api set: ExcelApi 1.9] + */ + linearTrend = "LinearTrend", + /** + * A version of "FillSeries" for numbers that fills out the values in the adjacent cells according to a growth trend model. + * @remarks + * [Api set: ExcelApi 1.9] + */ + growthTrend = "GrowthTrend", + /** + * Populates the adjacent cells by using Excel's Flash Fill feature. + * @remarks + * [Api set: ExcelApi 1.9] + */ + flashFill = "FlashFill" + } + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + enum GroupOption { + /** + * Group by rows. + * @remarks + * [Api set: ExcelApi 1.10] + */ + byRows = "ByRows", + /** + * Group by columns. + * @remarks + * [Api set: ExcelApi 1.10] + */ + byColumns = "ByColumns" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum RangeCopyType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + all = "All", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + formulas = "Formulas", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + values = "Values", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + formats = "Formats", + /** + * @remarks + * [Api set: ExcelApiOnline 99.9] + */ + link = "Link" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum LinkedDataTypeState { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + validLinkedData = "ValidLinkedData", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + disambiguationNeeded = "DisambiguationNeeded", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + brokenLinkedData = "BrokenLinkedData", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + fetchingData = "FetchingData" + } + /** + * Specifies the shape type for a `GeometricShape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum GeometricShapeType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + lineInverse = "LineInverse", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + triangle = "Triangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightTriangle = "RightTriangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rectangle = "Rectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + diamond = "Diamond", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + parallelogram = "Parallelogram", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + trapezoid = "Trapezoid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + nonIsoscelesTrapezoid = "NonIsoscelesTrapezoid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + pentagon = "Pentagon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + hexagon = "Hexagon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + heptagon = "Heptagon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + octagon = "Octagon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + decagon = "Decagon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + dodecagon = "Dodecagon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star4 = "Star4", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star5 = "Star5", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star6 = "Star6", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star7 = "Star7", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star8 = "Star8", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star10 = "Star10", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star12 = "Star12", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star16 = "Star16", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star24 = "Star24", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + star32 = "Star32", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + roundRectangle = "RoundRectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + round1Rectangle = "Round1Rectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + round2SameRectangle = "Round2SameRectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + round2DiagonalRectangle = "Round2DiagonalRectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + snipRoundRectangle = "SnipRoundRectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + snip1Rectangle = "Snip1Rectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + snip2SameRectangle = "Snip2SameRectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + snip2DiagonalRectangle = "Snip2DiagonalRectangle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + plaque = "Plaque", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + ellipse = "Ellipse", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + teardrop = "Teardrop", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + homePlate = "HomePlate", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + chevron = "Chevron", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + pieWedge = "PieWedge", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + pie = "Pie", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + blockArc = "BlockArc", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + donut = "Donut", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + noSmoking = "NoSmoking", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightArrow = "RightArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftArrow = "LeftArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + upArrow = "UpArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + downArrow = "DownArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + stripedRightArrow = "StripedRightArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + notchedRightArrow = "NotchedRightArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bentUpArrow = "BentUpArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftRightArrow = "LeftRightArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + upDownArrow = "UpDownArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftUpArrow = "LeftUpArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftRightUpArrow = "LeftRightUpArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + quadArrow = "QuadArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftArrowCallout = "LeftArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightArrowCallout = "RightArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + upArrowCallout = "UpArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + downArrowCallout = "DownArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftRightArrowCallout = "LeftRightArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + upDownArrowCallout = "UpDownArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + quadArrowCallout = "QuadArrowCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bentArrow = "BentArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + uturnArrow = "UturnArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + circularArrow = "CircularArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftCircularArrow = "LeftCircularArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftRightCircularArrow = "LeftRightCircularArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + curvedRightArrow = "CurvedRightArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + curvedLeftArrow = "CurvedLeftArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + curvedUpArrow = "CurvedUpArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + curvedDownArrow = "CurvedDownArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + swooshArrow = "SwooshArrow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + cube = "Cube", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + can = "Can", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + lightningBolt = "LightningBolt", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + heart = "Heart", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + sun = "Sun", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + moon = "Moon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + smileyFace = "SmileyFace", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + irregularSeal1 = "IrregularSeal1", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + irregularSeal2 = "IrregularSeal2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + foldedCorner = "FoldedCorner", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bevel = "Bevel", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + frame = "Frame", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + halfFrame = "HalfFrame", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + corner = "Corner", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + diagonalStripe = "DiagonalStripe", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + chord = "Chord", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + arc = "Arc", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftBracket = "LeftBracket", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightBracket = "RightBracket", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftBrace = "LeftBrace", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightBrace = "RightBrace", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bracketPair = "BracketPair", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bracePair = "BracePair", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + callout1 = "Callout1", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + callout2 = "Callout2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + callout3 = "Callout3", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + accentCallout1 = "AccentCallout1", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + accentCallout2 = "AccentCallout2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + accentCallout3 = "AccentCallout3", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + borderCallout1 = "BorderCallout1", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + borderCallout2 = "BorderCallout2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + borderCallout3 = "BorderCallout3", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + accentBorderCallout1 = "AccentBorderCallout1", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + accentBorderCallout2 = "AccentBorderCallout2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + accentBorderCallout3 = "AccentBorderCallout3", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wedgeRectCallout = "WedgeRectCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wedgeRRectCallout = "WedgeRRectCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wedgeEllipseCallout = "WedgeEllipseCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + cloudCallout = "CloudCallout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + cloud = "Cloud", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + ribbon = "Ribbon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + ribbon2 = "Ribbon2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + ellipseRibbon = "EllipseRibbon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + ellipseRibbon2 = "EllipseRibbon2", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftRightRibbon = "LeftRightRibbon", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalScroll = "VerticalScroll", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalScroll = "HorizontalScroll", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wave = "Wave", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + doubleWave = "DoubleWave", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + plus = "Plus", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartProcess = "FlowChartProcess", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartDecision = "FlowChartDecision", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartInputOutput = "FlowChartInputOutput", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartPredefinedProcess = "FlowChartPredefinedProcess", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartInternalStorage = "FlowChartInternalStorage", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartDocument = "FlowChartDocument", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartMultidocument = "FlowChartMultidocument", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartTerminator = "FlowChartTerminator", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartPreparation = "FlowChartPreparation", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartManualInput = "FlowChartManualInput", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartManualOperation = "FlowChartManualOperation", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartConnector = "FlowChartConnector", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartPunchedCard = "FlowChartPunchedCard", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartPunchedTape = "FlowChartPunchedTape", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartSummingJunction = "FlowChartSummingJunction", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartOr = "FlowChartOr", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartCollate = "FlowChartCollate", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartSort = "FlowChartSort", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartExtract = "FlowChartExtract", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartMerge = "FlowChartMerge", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartOfflineStorage = "FlowChartOfflineStorage", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartOnlineStorage = "FlowChartOnlineStorage", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartMagneticTape = "FlowChartMagneticTape", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartMagneticDisk = "FlowChartMagneticDisk", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartMagneticDrum = "FlowChartMagneticDrum", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartDisplay = "FlowChartDisplay", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartDelay = "FlowChartDelay", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartAlternateProcess = "FlowChartAlternateProcess", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + flowChartOffpageConnector = "FlowChartOffpageConnector", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonBlank = "ActionButtonBlank", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonHome = "ActionButtonHome", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonHelp = "ActionButtonHelp", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonInformation = "ActionButtonInformation", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonForwardNext = "ActionButtonForwardNext", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonBackPrevious = "ActionButtonBackPrevious", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonEnd = "ActionButtonEnd", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonBeginning = "ActionButtonBeginning", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonReturn = "ActionButtonReturn", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonDocument = "ActionButtonDocument", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonSound = "ActionButtonSound", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + actionButtonMovie = "ActionButtonMovie", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gear6 = "Gear6", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gear9 = "Gear9", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + funnel = "Funnel", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mathPlus = "MathPlus", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mathMinus = "MathMinus", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mathMultiply = "MathMultiply", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mathDivide = "MathDivide", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mathEqual = "MathEqual", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mathNotEqual = "MathNotEqual", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + cornerTabs = "CornerTabs", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + squareTabs = "SquareTabs", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + plaqueTabs = "PlaqueTabs", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartX = "ChartX", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartStar = "ChartStar", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartPlus = "ChartPlus" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ConnectorType { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + straight = "Straight", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + elbow = "Elbow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + curve = "Curve" + } + /** + * @remarks + * [Api set: ExcelApi 1.10] + */ + enum ContentType { + /** + * Indicates a plain format type for the comment content. + * @remarks + * [Api set: ExcelApi 1.10] + */ + plain = "Plain", + /** + * Comment content containing mentions. + * @remarks + * [Api set: ExcelApi 1.10] + */ + mention = "Mention" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum SpecialCellType { + /** + * All cells with conditional formats. + * @remarks + * [Api set: ExcelApi 1.9] + */ + conditionalFormats = "ConditionalFormats", + /** + * Cells with validation criteria. + * @remarks + * [Api set: ExcelApi 1.9] + */ + dataValidations = "DataValidations", + /** + * Cells with no content. + * @remarks + * [Api set: ExcelApi 1.9] + */ + blanks = "Blanks", + /** + * Cells containing constants. + * @remarks + * [Api set: ExcelApi 1.9] + */ + constants = "Constants", + /** + * Cells containing formulas. + * @remarks + * [Api set: ExcelApi 1.9] + */ + formulas = "Formulas", + /** + * Cells with the same conditional format as the first cell in the range. + * @remarks + * [Api set: ExcelApi 1.9] + */ + sameConditionalFormat = "SameConditionalFormat", + /** + * Cells with the same data validation criteria as the first cell in the range. + * @remarks + * [Api set: ExcelApi 1.9] + */ + sameDataValidation = "SameDataValidation", + /** + * Cells that are visible. + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible = "Visible" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum SpecialCellValueType { + /** + * Cells that have errors, boolean, numeric, or string values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + all = "All", + /** + * Cells that have errors. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errors = "Errors", + /** + * Cells that have errors or boolean values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errorsLogical = "ErrorsLogical", + /** + * Cells that have errors or numeric values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errorsNumbers = "ErrorsNumbers", + /** + * Cells that have errors or string values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errorsText = "ErrorsText", + /** + * Cells that have errors, boolean, or numeric values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errorsLogicalNumber = "ErrorsLogicalNumber", + /** + * Cells that have errors, boolean, or string values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errorsLogicalText = "ErrorsLogicalText", + /** + * Cells that have errors, numeric, or string values. + * @remarks + * [Api set: ExcelApi 1.9] + */ + errorsNumberText = "ErrorsNumberText", + /** + * Cells that have a boolean value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + logical = "Logical", + /** + * Cells that have a boolean or numeric value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + logicalNumbers = "LogicalNumbers", + /** + * Cells that have a boolean or string value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + logicalText = "LogicalText", + /** + * Cells that have a boolean, numeric, or string value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + logicalNumbersText = "LogicalNumbersText", + /** + * Cells that have a numeric value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + numbers = "Numbers", + /** + * Cells that have a numeric or string value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + numbersText = "NumbersText", + /** + * Cells that have a string value. + * @remarks + * [Api set: ExcelApi 1.9] + */ + text = "Text" + } + /** + * Specifies the way that an object is attached to its underlying cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum Placement { + /** + * The object is moved and sized with the cells. + * @remarks + * [Api set: ExcelApi 1.9] + */ + twoCell = "TwoCell", + /** + * The object is moved with the cells. + * @remarks + * [Api set: ExcelApi 1.9] + */ + oneCell = "OneCell", + /** + * The object is free floating. + * @remarks + * [Api set: ExcelApi 1.9] + */ + absolute = "Absolute" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum FillPattern { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + none = "None", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + solid = "Solid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gray50 = "Gray50", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gray75 = "Gray75", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gray25 = "Gray25", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontal = "Horizontal", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + vertical = "Vertical", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + down = "Down", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + up = "Up", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + checker = "Checker", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + semiGray75 = "SemiGray75", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + lightHorizontal = "LightHorizontal", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + lightVertical = "LightVertical", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + lightDown = "LightDown", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + lightUp = "LightUp", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + grid = "Grid", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + crissCross = "CrissCross", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gray16 = "Gray16", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + gray8 = "Gray8", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + linearGradient = "LinearGradient", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rectangularGradient = "RectangularGradient" + } + /** + * Specifies the horizontal alignment for the text frame in a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeTextHorizontalAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + left = "Left", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + center = "Center", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + right = "Right", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + justify = "Justify", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + justifyLow = "JustifyLow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + distributed = "Distributed", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + thaiDistributed = "ThaiDistributed" + } + /** + * Specifies the vertical alignment for the text frame in a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeTextVerticalAlignment { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + top = "Top", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + middle = "Middle", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + justified = "Justified", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + distributed = "Distributed" + } + /** + * Specifies the vertical overflow for the text frame in a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeTextVerticalOverflow { + /** + * Allow text to overflow the text frame vertically (can be from the top, bottom, or both depending on the text alignment). + * @remarks + * [Api set: ExcelApi 1.9] + */ + overflow = "Overflow", + /** + * Hide text that does not fit vertically within the text frame, and add an ellipsis (...) at the end of the visible text. + * @remarks + * [Api set: ExcelApi 1.9] + */ + ellipsis = "Ellipsis", + /** + * Hide text that does not fit vertically within the text frame. + * @remarks + * [Api set: ExcelApi 1.9] + */ + clip = "Clip" + } + /** + * Specifies the horizontal overflow for the text frame in a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeTextHorizontalOverflow { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + overflow = "Overflow", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + clip = "Clip" + } + /** + * Specifies the reading order for the text frame in a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeTextReadingOrder { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftToRight = "LeftToRight", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightToLeft = "RightToLeft" + } + /** + * Specifies the orientation for the text frame in a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeTextOrientation { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontal = "Horizontal", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + vertical = "Vertical", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + vertical270 = "Vertical270", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wordArtVertical = "WordArtVertical", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + eastAsianVertical = "EastAsianVertical", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + mongolianVertical = "MongolianVertical", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + wordArtVerticalRTL = "WordArtVerticalRTL" + } + /** + * Determines the type of automatic sizing allowed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum ShapeAutoSize { + /** + * No autosizing. + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeNone = "AutoSizeNone", + /** + * The text is adjusted to fit the shape. + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeTextToFitShape = "AutoSizeTextToFitShape", + /** + * The shape is adjusted to fit the text. + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeShapeToFitText = "AutoSizeShapeToFitText", + /** + * A combination of automatic sizing schemes are used. + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeMixed = "AutoSizeMixed" + } + /** + * Specifies the close behavior for `Workbook.close`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum CloseBehavior { + /** + * Save the possible changes before closing the workbook. + * @remarks + * [Api set: ExcelApi 1.9] + */ + save = "Save", + /** + * Discard the possible changes when closing the workbook. + * @remarks + * [Api set: ExcelApi 1.9] + */ + skipSave = "SkipSave" + } + /** + * Specifies the save behavior for `Workbook.save`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum SaveBehavior { + /** + * Save the workbook without prompting the user. If file is not saved, + it will save it with default name in the default location. + * @remarks + * [Api set: ExcelApi 1.9] + */ + save = "Save", + /** + * Prompts the "Save As" experience to the user if the workbook has not been saved, + Ignored if the workbook was previously saved. + * @remarks + * [Api set: ExcelApi 1.9] + */ + prompt = "Prompt" + } + /** + * Specifies the slicer sort behavior for `Slicer.sortBy`. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + enum SlicerSortType { + /** + * Sort slicer items in the order provided by the data source. + * @remarks + * [Api set: ExcelApi 1.10] + */ + dataSourceOrder = "DataSourceOrder", + /** + * Sort slicer items in ascending order by item captions. + * @remarks + * [Api set: ExcelApi 1.10] + */ + ascending = "Ascending", + /** + * Sort slicer items in descending order by item captions. + * @remarks + * [Api set: ExcelApi 1.10] + */ + descending = "Descending" + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + enum RibbonTab { + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + others = "Others", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + home = "Home", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + insert = "Insert", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + draw = "Draw", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + pageLayout = "PageLayout", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + formulas = "Formulas", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + data = "Data", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + review = "Review", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + view = "View", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + developer = "Developer", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + addIns = "AddIns", + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + help = "Help" + } + /** + * Represents a category of number formats. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + enum NumberFormatCategory { + /** + * General format cells have no specific number format. + * @remarks + * [Api set: ExcelApi 1.12] + */ + general = "General", + /** + * Number is used for general display of numbers. Currency and Accounting offer specialized formatting for monetary value. + * @remarks + * [Api set: ExcelApi 1.12] + */ + number = "Number", + /** + * Currency formats are used for general monetary values. Use Accounting formats to align decimal points in a column. + * @remarks + * [Api set: ExcelApi 1.12] + */ + currency = "Currency", + /** + * Accounting formats line up the currency symbols and decimal points in a column. + * @remarks + * [Api set: ExcelApi 1.12] + */ + accounting = "Accounting", + /** + * Date formats display date and time serial numbers as date values. Date formats that begin with an asterisk (*) respond to changes in regional date and time settings that are specified for the operating system. Formats without an asterisk are not affected by operating system settings. + * @remarks + * [Api set: ExcelApi 1.12] + */ + date = "Date", + /** + * Time formats display date and time serial numbers as date values. Time formats that begin with an asterisk (*) respond to changes in regional date and time settings that are specified for the operating system. Formats without an asterisk are not affected by operating system settings. + * @remarks + * [Api set: ExcelApi 1.12] + */ + time = "Time", + /** + * Percentage formats multiply the cell value by 100 and displays the result with a percent symbol. + * @remarks + * [Api set: ExcelApi 1.12] + */ + percentage = "Percentage", + /** + * Fraction formats display the cell value as a whole number with the remainder rounded to the nearest fraction value. + * @remarks + * [Api set: ExcelApi 1.12] + */ + fraction = "Fraction", + /** + * Scientific formats display the cell value as a number between 1 and 10 multiplied by a power of 10. + * @remarks + * [Api set: ExcelApi 1.12] + */ + scientific = "Scientific", + /** + * Text format cells are treated as text even when a number is in the cell. The cell is displayed exactly as entered. + * @remarks + * [Api set: ExcelApi 1.12] + */ + text = "Text", + /** + * Special formats are useful for tracking list and database values. + * @remarks + * [Api set: ExcelApi 1.12] + */ + special = "Special", + /** + * A custom format that is not a part of any category. + * @remarks + * [Api set: ExcelApi 1.12] + */ + custom = "Custom" + } + /** + * Represents a named sheet view of a worksheet. A sheet view stores the sort and filter rules for a particular worksheet. + Every sheet view (even a temporary sheet view) has a unique, worksheet-scoped name that is used to access the view. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + class NamedSheetView 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 name of the sheet view. + The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + name: string; + /** + * Activates this sheet view. This is equivalent to using "Switch To" in the Excel UI. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + activate(): void; + /** + * Removes the sheet view from the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + delete(): void; + /** + * Creates a copy of this sheet view. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param name The name of the duplicated sheet view. If no name is provided, one will be generated. + * @returns The new, duplicated sheet view. + */ + duplicate(name?: string): Excel.NamedSheetView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NamedSheetViewLoadOptions): Excel.NamedSheetView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NamedSheetView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Excel.NamedSheetView; + /** + * 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.NamedSheetView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NamedSheetViewData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.NamedSheetViewData; + } + /** + * Represents the collection of sheet views in the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + class NamedSheetViewCollection 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.NamedSheetView[]; + /** + * Creates a new sheet view with the given name. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param name The name of the sheet view to be created. + * Throws an error when the provided name already exists, is empty, or is a name reserved by the worksheet. + * @returns The newly created sheet view object. + */ + add(name: string): Excel.NamedSheetView; + /** + * Creates and activates a new temporary sheet view. + Temporary views are removed when closing the application, exiting the temporary view with the exit method, or switching to another sheet view. + The temporary sheet view can also be acccessed with the empty string (""), if the temporary view exists. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * @returns The newly created sheet view object. + */ + enterTemporary(): Excel.NamedSheetView; + /** + * Exits the currently active sheet view. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + exit(): void; + /** + * Gets the worksheet's currently active sheet view. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * @returns The currently active sheet view for this worksheet. + */ + getActive(): Excel.NamedSheetView; + /** + * Gets the number of sheet views in this worksheet. + Includes the temporary sheet view if it exists. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a sheet view using its name. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param key The case-sensitive name of the sheet view. Use the empty string ("") to get the temporary sheet view, if the temporary view exists. + * @returns The sheet view with the given name, or the temporary view if an empty string was provided. If there is no current temporary view and an empty string was provided, then an `ItemNotFound` error is thrown. + */ + getItem(key: string): Excel.NamedSheetView; + /** + * Gets a sheet view by its index in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + * + * @param index The index of the sheet view object in the collection. + * @returns The sheet view at the given index. + */ + getItemAt(index: number): Excel.NamedSheetView; + /** + * Gets a sheet view using its name. + If the sheet view object does not exist, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The case-sensitive name of the sheet view. + * Use the empty string ("") to get the temporary sheet view, if the temporary view exists. + * @returns The sheet view with the given name, or the temporary view if an empty string was provided. + */ + getItemOrNullObject(key: string): Excel.NamedSheetView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.NamedSheetViewCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.NamedSheetViewCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Excel.NamedSheetViewCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.NamedSheetViewCollection; + /** + * 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.NamedSheetViewCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NamedSheetViewCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.NamedSheetViewCollectionData; + } + /** + * An object containing the result of a function-evaluation operation + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Excel.Interfaces.FunctionResultLoadOptions): FunctionResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): FunctionResult; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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; + } + /** + * An object for evaluating Excel functions. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + false(): FunctionResult; + /** + * Returns the starting position of one text string within another text string. FIND is case-sensitive. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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.). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + pi(): FunctionResult; + /** + * Calculates the payment for a loan based on constant payments and a constant interest rate. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rand(): FunctionResult; + /** + * Returns a random number between the numbers you specify. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + today(): FunctionResult; + /** + * Removes all spaces from a text string except for single spaces between words. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + true(): FunctionResult; + /** + * Truncates a number to an integer by removing the decimal, or fractional, part of the number. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * 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; + }; + } + enum ErrorCodes { + accessDenied = "AccessDenied", + apiNotFound = "ApiNotFound", + conflict = "Conflict", + emptyChartSeries = "EmptyChartSeries", + filteredRangeConflict = "FilteredRangeConflict", + formulaLengthExceedsLimit = "FormulaLengthExceedsLimit", + generalException = "GeneralException", + inactiveWorkbook = "InactiveWorkbook", + insertDeleteConflict = "InsertDeleteConflict", + invalidArgument = "InvalidArgument", + invalidBinding = "InvalidBinding", + invalidOperation = "InvalidOperation", + invalidReference = "InvalidReference", + invalidSelection = "InvalidSelection", + itemAlreadyExists = "ItemAlreadyExists", + itemNotFound = "ItemNotFound", + mergedRangeConflict = "MergedRangeConflict", + nonBlankCellOffSheet = "NonBlankCellOffSheet", + notImplemented = "NotImplemented", + openWorkbookLinksBlocked = "OpenWorkbookLinksBlocked", + operationCellsExceedLimit = "OperationCellsExceedLimit", + pivotTableRangeConflict = "PivotTableRangeConflict", + powerQueryRefreshResourceChallenge = "PowerQueryRefreshResourceChallenge", + rangeExceedsLimit = "RangeExceedsLimit", + refreshWorkbookLinksBlocked = "RefreshWorkbookLinksBlocked", + requestAborted = "RequestAborted", + responsePayloadSizeLimitExceeded = "ResponsePayloadSizeLimitExceeded", + unsupportedFeature = "UnsupportedFeature", + unsupportedFillType = "UnsupportedFillType", + unsupportedOperation = "UnsupportedOperation", + unsupportedSheet = "UnsupportedSheet", + 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 AllowEditRange object, for use in `allowEditRange.set({ ... })`. */ + interface AllowEditRangeUpdateData { + /** + * Specifies the range associated with the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + address?: string; + /** + * Specifies the title of the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. + If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + title?: string; + } + /** An interface for updating data on the AllowEditRangeCollection object, for use in `allowEditRangeCollection.set({ ... })`. */ + interface AllowEditRangeCollectionUpdateData { + items?: Excel.Interfaces.AllowEditRangeData[]; + } + /** An interface for updating data on the QueryCollection object, for use in `queryCollection.set({ ... })`. */ + interface QueryCollectionUpdateData { + items?: Excel.Interfaces.QueryData[]; + } + /** An interface for updating data on the LinkedWorkbookCollection object, for use in `linkedWorkbookCollection.set({ ... })`. */ + interface LinkedWorkbookCollectionUpdateData { + /** + * Represents the update mode of the workbook links. The mode is same for all of the workbook links present in the workbook. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + workbookLinksRefreshMode?: Excel.WorkbookLinksRefreshMode | "Manual" | "Automatic"; + items?: Excel.Interfaces.LinkedWorkbookData[]; + } + /** An interface for updating data on the DocumentTaskChangeCollection object, for use in `documentTaskChangeCollection.set({ ... })`. */ + interface DocumentTaskChangeCollectionUpdateData { + items?: Excel.Interfaces.DocumentTaskChangeData[]; + } + /** An interface for updating data on the DocumentTask object, for use in `documentTask.set({ ... })`. */ + interface DocumentTaskUpdateData { + /** + * Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: number; + /** + * Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: number; + /** + * Gets or sets the date and time the task should start and is due. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startAndDueDateTime?: Excel.DocumentTaskSchedule; + /** + * Specifies title of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: string; + } + /** An interface for updating data on the DocumentTaskCollection object, for use in `documentTaskCollection.set({ ... })`. */ + interface DocumentTaskCollectionUpdateData { + items?: Excel.Interfaces.DocumentTaskData[]; + } + /** An interface for updating data on the Runtime object, for use in `runtime.set({ ... })`. */ + interface RuntimeUpdateData { + /** + * Toggle JavaScript events in the current task pane or content add-in. + * + * @remarks + * [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 iterative calculation settings. + In Excel on Windows and Mac, the settings will apply to the Excel Application. + In Excel on the web and other platforms, the settings will apply to the active workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode?: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + /** + * Specifies whether the "Format Stale values" button under Calculation Options is turned on or off. + The stale formulas are rendered with stale formatting if the button is turned on. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + formatStaleValues?: boolean; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enabled?: boolean; + /** + * Specifies the maximum amount of change between each iteration as Excel resolves circular references. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxChange?: number; + /** + * Specifies the maximum number of iterations that Excel can use to resolve a circular reference. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxIteration?: number; + } + /** An interface for updating data on the Workbook object, for use in `workbook.set({ ... })`. */ + interface WorkbookUpdateData { + /** + * Gets the workbook properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartDataPointTrack?: boolean; + /** + * Specifies if changes have been made since the workbook 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isDirty?: boolean; + /** + * Specifies whether the PivotTable's field list pane is shown at the workbook level. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showPivotFieldList?: boolean; + /** + * True if the workbook uses the 1904 date system. + * + * @remarks + * [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`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pageLayout?: Excel.Interfaces.PageLayoutUpdateData; + /** + * Determines if Excel should recalculate the worksheet when necessary. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableCalculation?: boolean; + /** + * The display name of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * The zero-based position of the worksheet within the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: number; + /** + * Specifies if gridlines are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showGridlines?: boolean; + /** + * Specifies if headings are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showHeadings?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardWidth?: number; + /** + * The tab color of the worksheet. + 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 #RRGGBB (e.g., "FFA500"). + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tabColor?: string; + /** + * The visibility of the worksheet. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataValidation?: Excel.Interfaces.DataValidationUpdateData; + /** + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatUpdateData; + /** + * Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: any[][]; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + formulasR1C1?: any[][]; + /** + * Represents the hyperlink for the current range. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hyperlink?: Excel.RangeHyperlink; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + numberFormat?: any[][]; + /** + * Represents Excel's number format code for the given range, based on the language settings of the user. + Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. + Any returned text uses the locally-formatted strings based on the language specified in the system settings. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: any[][]; + /** + * Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + style?: string; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** An interface for updating data on the RangeAreas object, for use in `rangeAreas.set({ ... })`. */ + interface RangeAreasUpdateData { + /** + * Returns a data validation object for all ranges in the `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dataValidation?: Excel.Interfaces.DataValidationUpdateData; + /** + * Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: string; + } + /** An interface for updating data on the RangeView object, for use in `rangeView.set({ ... })`. */ + interface RangeViewUpdateData { + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: any[][]; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: any[][]; + /** + * Represents Excel's number format code for the given cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** 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. + * + * @remarks + * [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 { + /** + * Specifies the comment associated with this name. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + comment?: string; + /** + * The formula of the named item. Formulas always start with an equal sign ("="). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formula?: any; + /** + * Specifies if the object is visible. + * + * @remarks + * [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 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 { + /** + * The style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableStyle?: Excel.Interfaces.TableStyleUpdateData; + /** + * Specifies if the first column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * Specifies if the last column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightLastColumn?: boolean; + /** + * Name of the table. + + The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * Specifies if the header row is visible. This value can be set to show or remove the header row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * Specifies if the total row is visible. This value can be set to show or remove the total row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [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 { + /** + * Specifies the name of the table column. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** 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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** An interface for updating data on the DataValidation object, for use in `dataValidation.set({ ... })`. */ + interface DataValidationUpdateData { + /** + * Error alert when user enters invalid data. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + errorAlert?: Excel.DataValidationErrorAlert; + /** + * Specifies if data validation will be performed on blank cells. Default is `true`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + ignoreBlanks?: boolean; + /** + * Prompt when users select a cell. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + prompt?: Excel.DataValidationPrompt; + /** + * Data validation rule that contains different type of data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + rule?: Excel.DataValidationRule; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderCollectionUpdateData; + /** + * Returns the fill object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillUpdateData; + /** + * Returns the font object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontUpdateData; + /** + * Returns the format protection object for a range. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionUpdateData; + /** + * Specifies if text is automatically indented when text alignment is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoIndent?: boolean; + /** + * Specifies the width of all colums within the range. If the column widths are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnWidth?: number; + /** + * Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + indentLevel?: number; + /** + * The reading order for the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * The height of all rows in the range. If the row heights are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHeight?: number; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shrinkToFit?: boolean; + /** + * 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. + * + * @remarks + * [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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardHeight?: boolean; + /** + * Specifies if 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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardWidth?: boolean; + /** + * Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** An interface for updating data on the FormatProtection object, for use in `formatProtection.set({ ... })`. */ + interface FormatProtectionUpdateData { + /** + * Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. + * + * @remarks + * [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 background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * 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 a uniform pattern setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + /** + * The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternColor?: string; + /** + * Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternTintAndShade?: number; + /** + * Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + } + /** 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, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + /** + * Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. + * + * @remarks + * [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 { + /** + * Specifies 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 collection doesn't have a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + 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 the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Specifies the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Font size. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + strikethrough?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subscript?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + superscript?: boolean; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform font `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + /** + * Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesUpdateData; + /** + * Represents the data labels on the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsUpdateData; + /** + * Encapsulates the format properties for the chart area. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatUpdateData; + /** + * Represents the legend for the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendUpdateData; + /** + * Encapsulates the options for a pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pivotOptions?: Excel.Interfaces.ChartPivotOptionsUpdateData; + /** + * Represents the plot area for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotArea?: Excel.Interfaces.ChartPlotAreaUpdateData; + /** + * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleUpdateData; + /** + * Specifies a chart category label level enumeration constant, referring to the level of the source category labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel?: number; + /** + * Specifies the type of the chart. See `Excel.ChartType` for details. + * + * @remarks + * [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"; + /** + * Specifies the way that blank cells are plotted on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs?: Excel.ChartDisplayBlanksAs | "NotPlotted" | "Zero" | "Interplotted"; + /** + * Specifies the height, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + height?: number; + /** + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + left?: number; + /** + * Specifies the name of a chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Specifies the way columns or rows are used as data series on the chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly?: boolean; + /** + * Specifies a chart series name level enumeration constant, referring to the level of the source series names. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel?: number; + /** + * Specifies whether to display all field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. + If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum?: boolean; + /** + * Specifies the chart style for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + style?: number; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + top?: number; + /** + * Specifies the width, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + width?: number; + } + /** An interface for updating data on the ChartPivotOptions object, for use in `chartPivotOptions.set({ ... })`. */ + interface ChartPivotOptionsUpdateData { + /** + * Specifies whether to display the 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showAxisFieldButtons?: boolean; + /** + * Specifies whether to display the legend field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLegendFieldButtons?: boolean; + /** + * Specifies whether to display the report filter field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showReportFilterFieldButtons?: boolean; + /** + * Specifies whether to display the show value field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showValueFieldButtons?: boolean; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + /** + * Specifies the color scheme of the chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + colorScheme?: Excel.ChartColorScheme | "ColorfulPalette1" | "ColorfulPalette2" | "ColorfulPalette3" | "ColorfulPalette4" | "MonochromaticPalette1" | "MonochromaticPalette2" | "MonochromaticPalette3" | "MonochromaticPalette4" | "MonochromaticPalette5" | "MonochromaticPalette6" | "MonochromaticPalette7" | "MonochromaticPalette8" | "MonochromaticPalette9" | "MonochromaticPalette10" | "MonochromaticPalette11" | "MonochromaticPalette12" | "MonochromaticPalette13"; + /** + * Specifies if the chart area of the chart has rounded corners. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + roundedCorners?: boolean; + } + /** 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 { + /** + * Encapsulates the bin options for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + binOptions?: Excel.Interfaces.ChartBinOptionsUpdateData; + /** + * Encapsulates the options for the box and whisker charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsUpdateData; + /** + * Represents a collection of all data labels in the series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsUpdateData; + /** + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatUpdateData; + /** + * Encapsulates the options for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + mapOptions?: Excel.Interfaces.ChartMapOptionsUpdateData; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + xErrorBars?: Excel.Interfaces.ChartErrorBarsUpdateData; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + yErrorBars?: Excel.Interfaces.ChartErrorBarsUpdateData; + /** + * Specifies the group for the specified series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bubbleScale?: number; + /** + * Represents the chart type of a series. See `Excel.ChartType` for details. + * + * @remarks + * [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 doughnut exploded charts. + Throws an `InvalidArgument` error on invalid charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: number; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + explosion?: number; + /** + * Specifies if the series is filtered. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + filtered?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + gapWidth?: number; + /** + * Specifies the color for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumColor?: string; + /** + * Specifies the type for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumValue?: number; + /** + * Specifies the color for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointColor?: string; + /** + * Specifies the type for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointValue?: number; + /** + * Specifies the color for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumColor?: string; + /** + * Specifies the type for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumValue?: number; + /** + * Specifies the series gradient style of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientStyle?: Excel.ChartGradientStyle | "TwoPhaseColor" | "ThreePhaseColor"; + /** + * Specifies if the series has data labels. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * Specifies the fill color for negative data points in a series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + invertColor?: string; + /** + * True if Excel inverts the pattern in the item when it corresponds to a negative number. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + invertIfNegative?: boolean; + /** + * Specifies the marker background color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * Specifies the marker foreground color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * Specifies the marker size of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + /** + * Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + overlap?: number; + /** + * Specifies the series parent label strategy area for a treemap chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentLabelStrategy?: Excel.ChartParentLabelStrategy | "None" | "Banner" | "Overlapping"; + /** + * Specifies the plot order of a chart series within the chart group. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + plotOrder?: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + secondPlotSize?: number; + /** + * Specifies whether connector lines are shown in waterfall charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showConnectorLines?: boolean; + /** + * Specifies whether leader lines are displayed for each data label in the series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLeaderLines?: boolean; + /** + * Specifies if the series has a shadow. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies if the series is smooth. Only applicable to line and scatter charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + /** + * Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitType?: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + /** + * Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + splitValue?: number; + /** + * True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelUpdateData; + /** + * Encapsulates the format properties chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatUpdateData; + /** + * Represents whether a data point has a data label. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * Represents marker size of a data point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisUpdateData; + /** + * Represents the series axis of a 3-D chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisUpdateData; + /** + * Represents the value axis in an axis. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatUpdateData; + /** + * Returns an object that represents the major gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesUpdateData; + /** + * Returns an object that represents the minor gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesUpdateData; + /** + * Represents the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleUpdateData; + /** + * Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + alignment?: Excel.ChartTickLabelAlignment | "Center" | "Left" | "Right"; + /** + * Specifies the base unit for the specified category axis. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * Specifies the category axis type. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + categoryType?: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; + /** + * Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + displayUnit?: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; + /** + * Specifies if the value axis crosses the category axis between categories. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isBetweenCategories?: boolean; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * Specifies the base of the logarithm when using logarithmic scales. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + logBase?: number; + /** + * Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + majorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minimum?: any; + /** + * Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + minorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorUnit?: any; + /** + * Specifies if an axis is multilevel. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + multiLevel?: boolean; + /** + * Specifies the format code for the axis tick label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + offset?: number; + /** + * Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * Specifies if Excel plots data points from last to first. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder?: boolean; + /** + * Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + scaleType?: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; + /** + * Specifies if the axis display unit label is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel?: boolean; + /** + * Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: any; + /** + * Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition?: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing?: any; + /** + * Specifies the number of categories or series between tick marks. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing?: number; + /** + * Specifies if the axis is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartAxisFormat object, for use in `chartAxisFormat.set({ ... })`. */ + interface ChartAxisFormatUpdateData { + /** + * Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + /** + * Specifies chart line formatting. + * + * @remarks + * [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 { + /** + * Specifies the formatting of the chart axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatUpdateData; + /** + * Specifies the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + textOrientation?: number; + /** + * Specifies if the axis title is visibile. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartAxisTitleFormat object, for use in `chartAxisTitleFormat.set({ ... })`. */ + interface ChartAxisTitleFormatUpdateData { + /** + * Specifies the chart axis title's border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. + * + * @remarks + * [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 { + /** + * Specifies the format of chart data labels, which includes fill and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatUpdateData; + /** + * Specifies if data labels automatically generate appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * TODO: + * + * @remarks + * [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"; + /** + * Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when the `TextOrientation` of data label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * Specifies the format code for data labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + separator?: string; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + /** + * Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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 the data label is -90, 90, or 180. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartDataLabelFormatUpdateData; + /** + * Specifies if the data label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * String value that represents the formula of chart data label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula?: string; + /** + * TODO: + * + * @remarks + * [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 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. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * String value that represents the format code for data label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + separator?: string; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showBubbleSize?: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showCategoryName?: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showLegendKey?: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showPercentage?: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showSeriesName?: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showValue?: boolean; + /** + * String representing the text of the data label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text?: string; + /** + * Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Represents the font attributes (such as font name, font size, and color) for a chart data label. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartDataTable object, for use in `chartDataTable.set({ ... })`. */ + interface ChartDataTableUpdateData { + /** + * Represents the format of a chart data table, which includes fill, font, and border format. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + format?: Excel.Interfaces.ChartDataTableFormatUpdateData; + /** + * Specifies whether to display the horizontal border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showHorizontalBorder?: boolean; + /** + * Specifies whether to show the legend key of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showLegendKey?: boolean; + /** + * Specifies whether to display the outline border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showOutlineBorder?: boolean; + /** + * Specifies whether to display the vertical border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showVerticalBorder?: boolean; + /** + * Specifies whether to show the data table of the chart. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartDataTableFormat object, for use in `chartDataTableFormat.set({ ... })`. */ + interface ChartDataTableFormatUpdateData { + /** + * Represents the border format of chart data table, which includes color, line style, and weight. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Represents the font attributes (such as font name, font size, and color) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartErrorBars object, for use in `chartErrorBars.set({ ... })`. */ + interface ChartErrorBarsUpdateData { + /** + * Specifies the formatting type of the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.Interfaces.ChartErrorBarsFormatUpdateData; + /** + * Specifies if error bars have an end style cap. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endStyleCap?: boolean; + /** + * Specifies which parts of the error bars to include. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + include?: Excel.ChartErrorBarsInclude | "Both" | "MinusValues" | "PlusValues"; + /** + * The type of range marked by the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: Excel.ChartErrorBarsType | "FixedValue" | "Percent" | "StDev" | "StError" | "Custom"; + /** + * Specifies whether the error bars are displayed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartErrorBarsFormat object, for use in `chartErrorBarsFormat.set({ ... })`. */ + interface ChartErrorBarsFormatUpdateData { + /** + * Represents the chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + line?: Excel.Interfaces.ChartLineFormatUpdateData; + } + /** An interface for updating data on the ChartGridlines object, for use in `chartGridlines.set({ ... })`. */ + interface ChartGridlinesUpdateData { + /** + * Represents the formatting of chart gridlines. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatUpdateData; + /** + * Specifies if the axis gridlines are visible. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatUpdateData; + /** + * Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * Specifies if the chart legend should overlap with the main body of the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; + /** + * Specifies if the legend has a shadow on the chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies the top of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * Specifies if the chart legend is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [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 visibility of a chart legend entry. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Represents the font attributes such as font name, font size, and color of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartMapOptions object, for use in `chartMapOptions.set({ ... })`. */ + interface ChartMapOptionsUpdateData { + /** + * Specifies the series map labels strategy of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + labelStrategy?: Excel.ChartMapLabelStrategy | "None" | "BestFit" | "ShowAll"; + /** + * Specifies the series mapping level of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: Excel.ChartMapAreaLevel | "Automatic" | "DataOnly" | "City" | "County" | "State" | "Country" | "Continent" | "World"; + /** + * Specifies the series projection type of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + projectionType?: Excel.ChartMapProjectionType | "Automatic" | "Mercator" | "Miller" | "Robinson" | "Albers"; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatUpdateData; + /** + * Specifies the horizontal alignment for chart title. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * Specifies if the chart title will overlay the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * Represents the position of chart title. See `Excel.ChartTitlePosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies the chart's title text. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + textOrientation?: number; + /** + * Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Specifies if the chart title is visibile. + * + * @remarks + * [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, and color of a chart characters object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Represents the font attributes (such as font name, font size, and color) for an object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + color?: string; + /** + * Represents the line style of the border. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + weight?: number; + } + /** An interface for updating data on the ChartBinOptions object, for use in `chartBinOptions.set({ ... })`. */ + interface ChartBinOptionsUpdateData { + /** + * Specifies if bin overflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowOverflow?: boolean; + /** + * Specifies if bin underflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowUnderflow?: boolean; + /** + * Specifies the bin count of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + count?: number; + /** + * Specifies the bin overflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + overflowValue?: number; + /** + * Specifies the bin's type for a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: Excel.ChartBinType | "Category" | "Auto" | "BinWidth" | "BinCount"; + /** + * Specifies the bin underflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underflowValue?: number; + /** + * Specifies the bin width value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: number; + } + /** An interface for updating data on the ChartBoxwhiskerOptions object, for use in `chartBoxwhiskerOptions.set({ ... })`. */ + interface ChartBoxwhiskerOptionsUpdateData { + /** + * Specifies if the quartile calculation type of a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + quartileCalculation?: Excel.ChartBoxQuartileCalculation | "Inclusive" | "Exclusive"; + /** + * Specifies if inner points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showInnerPoints?: boolean; + /** + * Specifies if the mean line is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanLine?: boolean; + /** + * Specifies if the mean marker is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanMarker?: boolean; + /** + * Specifies if outlier points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showOutlierPoints?: boolean; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Represents the line style. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Represents the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * Font name (e.g., "Calibri") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Size of the font (e.g., 11) + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatUpdateData; + /** + * Represents the label of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + label?: Excel.Interfaces.ChartTrendlineLabelUpdateData; + /** + * Represents the number of periods that the trendline extends backward. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + backwardPeriod?: number; + /** + * Represents the number of periods that the trendline extends forward. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + intercept?: any; + /** + * Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: number; + /** + * Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: number; + /** + * True if the equation for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showEquation?: boolean; + /** + * True if the r-squared value for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showRSquared?: boolean; + /** + * Represents the type of a chart trendline. + * + * @remarks + * [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. + * + * @remarks + * [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 { + /** + * The format of the chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartTrendlineLabelFormatUpdateData; + /** + * Specifies if the trendline label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * String value that represents the formula of the chart trendline label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula?: string; + /** + * Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * String value that represents the format code for the trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * String representing the text of the trendline label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text?: string; + /** + * Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is 0. + * + * @remarks + * [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 { + /** + * Specifies the border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. + * + * @remarks + * [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 { + /** + * Specifies the formatting of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartPlotAreaFormatUpdateData; + /** + * Specifies the height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * Specifies the inside height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideHeight?: number; + /** + * Specifies the inside left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideLeft?: number; + /** + * Specifies the inside top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideTop?: number; + /** + * Specifies the inside width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideWidth?: number; + /** + * Specifies the left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies the position of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: Excel.ChartPlotAreaPosition | "Automatic" | "Custom"; + /** + * Specifies the top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * Specifies the width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: number; + } + /** An interface for updating data on the ChartPlotAreaFormat object, for use in `chartPlotAreaFormat.set({ ... })`. */ + interface ChartPlotAreaFormatUpdateData { + /** + * Specifies the border attributes of a chart plot area. + * + * @remarks + * [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 PivotTableScopedCollection object, for use in `pivotTableScopedCollection.set({ ... })`. */ + interface PivotTableScopedCollectionUpdateData { + items?: Excel.Interfaces.PivotTableData[]; + } + /** 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 { + /** + * Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + allowMultipleFiltersPerField?: boolean; + /** + * Specifies if the PivotTable allows values in the data body to be edited by the user. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableDataValueEditing?: boolean; + /** + * Name of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + name?: string; + /** + * Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + refreshOnOpen?: boolean; + /** + * Specifies if the PivotTable uses custom lists when sorting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useCustomSortLists?: boolean; + } + /** An interface for updating data on the PivotLayout object, for use in `pivotLayout.set({ ... })`. */ + interface PivotLayoutUpdateData { + /** + * The style applied to the PivotTable. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pivotStyle?: Excel.Interfaces.PivotTableStyleUpdateData; + /** + * The alt text description of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextDescription?: string; + /** + * The alt text title of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextTitle?: string; + /** + * Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFormat?: boolean; + /** + * The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. + Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. + By default, this is an empty string. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + emptyCellText?: string; + /** + * Specifies if the field list can be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + enableFieldList?: boolean; + /** + * Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. + Note that the value of `emptyCellText` persists when this property is set to `false`. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + fillEmptyCells?: boolean; + /** + * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layoutType?: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; + /** + * Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + preserveFormatting?: boolean; + /** + * Specifies if the PivotTable report shows grand totals for columns. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showColumnGrandTotals?: boolean; + /** + * Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + showFieldHeaders?: boolean; + /** + * Specifies if the PivotTable report shows grand totals for rows. + * + * @remarks + * [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`. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Position of the RowColumnPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems?: boolean; + /** + * Name of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Position of the FilterPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + field?: Excel.Interfaces.PivotFieldUpdateData; + /** + * Name of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Number format of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Position of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: number; + /** + * Specifies if the data should be shown as a specific summary calculation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAs?: Excel.ShowAsRule; + /** + * Specifies if all items of the DataPivotHierarchy are shown. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Determines whether to show all items of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAllItems?: boolean; + /** + * Subtotals of the PivotField. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isExpanded?: boolean; + /** + * Name of the PivotItem. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Specifies if the PivotItem is visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + visible?: boolean; + } + /** An interface for updating data on the WorksheetCustomProperty object, for use in `worksheetCustomProperty.set({ ... })`. */ + interface WorksheetCustomPropertyUpdateData { + /** + * Gets or sets the value of the custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + value?: string; + } + /** An interface for updating data on the WorksheetCustomPropertyCollection object, for use in `worksheetCustomPropertyCollection.set({ ... })`. */ + interface WorksheetCustomPropertyCollectionUpdateData { + items?: Excel.Interfaces.WorksheetCustomPropertyData[]; + } + /** An interface for updating data on the DocumentProperties object, for use in `documentProperties.set({ ... })`. */ + interface DocumentPropertiesUpdateData { + /** + * The author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + author?: string; + /** + * The category of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + category?: string; + /** + * The comments of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + comments?: string; + /** + * The company of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + company?: string; + /** + * The keywords of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + keywords?: string; + /** + * The manager of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + manager?: string; + /** + * Gets the revision number of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + revisionNumber?: number; + /** + * The subject of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + subject?: string; + /** + * The title of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + title?: string; + } + /** An interface for updating data on the CustomProperty object, for use in `customProperty.set({ ... })`. */ + interface CustomPropertyUpdateData { + /** + * The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatUpdateData; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatUpdateData; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatUpdateData; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatUpdateData; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatUpdateData; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatUpdateData; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatUpdateData; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatUpdateData; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatUpdateData; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatUpdateData; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatUpdateData; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatUpdateData; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [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 the 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. + * + * @remarks + * [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. + Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatUpdateData; + /** + * Representation of all values to the right of the axis in an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatUpdateData; + /** + * HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no axis is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisColor?: string; + /** + * Representation of how the axis is determined for an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisFormat?: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; + /** + * Specifies the direction that the data bar graphic should be based on. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: Excel.ConditionalDataBarRule; + /** + * If `true`, hides the values from the cells where the data bar is applied. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * Specifies if the data bar has a gradient. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * Specifies if the negative data bar has the same border color as the positive data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * Specifies if the negative data bar has the same fill color as the positive data bar. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * Specifies the `Rule` object on this conditional format. + * + * @remarks + * [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, on which to evaluate the conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * The formula, if required, on which to evaluate the conditional format rule in the user's language. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: string; + /** + * The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. + * + * @remarks + * [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 icon sets 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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + criteria?: Excel.ConditionalIconCriterion[]; + /** + * If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * If `true`, hides the values and only shows icons. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * If set, displays the icon set option for the conditional format. + * + * @remarks + * [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. + * + * @remarks + * [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 format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * The criteria of the top/bottom conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * The rule of the conditional format. + * + * @remarks + * [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 format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * The rule of the conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * Specifies the rule object on this conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderCollectionUpdateData; + /** + * Returns the fill object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillUpdateData; + /** + * Returns the font object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontUpdateData; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + Cleared if `null` is passed in. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + numberFormat?: any; + } + /** An interface for updating data on the ConditionalRangeFont object, for use in `conditionalRangeFont.set({ ... })`. */ + interface ConditionalRangeFontUpdateData { + /** + * Specifies if the font is bold. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * Specifies if the font is italic. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * Specifies the strikethrough status of the font. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + bottom?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * Gets the left border. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + left?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * Gets the right border. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + right?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * Gets the top border. + * + * @remarks + * [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 { + /** + * A collection of four border objects that represent the style of the four borders. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderCollectionUpdateData; + /** + * The fill of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillUpdateData; + /** + * A `Font` object that represents the font of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontUpdateData; + /** + * Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoIndent?: boolean; + /** + * Specifies if the formula will be hidden when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * Specifies if the style includes the color, color index, line style, and weight border properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * Specifies if the style includes the number format property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * Specifies if the style includes the formula hidden and locked protection properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * An integer from 0 to 250 that indicates the indent level for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + indentLevel?: number; + /** + * Specifies if the object is locked when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * The format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormat?: string; + /** + * The localized format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: string; + /** + * The reading order for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * The text orientation for the style. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * Specifies if Excel wraps the text in the object. + * + * @remarks + * [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 for updating data on the TableStyleCollection object, for use in `tableStyleCollection.set({ ... })`. */ + interface TableStyleCollectionUpdateData { + items?: Excel.Interfaces.TableStyleData[]; + } + /** An interface for updating data on the TableStyle object, for use in `tableStyle.set({ ... })`. */ + interface TableStyleUpdateData { + /** + * Specifies the name of the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + } + /** An interface for updating data on the PivotTableStyleCollection object, for use in `pivotTableStyleCollection.set({ ... })`. */ + interface PivotTableStyleCollectionUpdateData { + items?: Excel.Interfaces.PivotTableStyleData[]; + } + /** An interface for updating data on the PivotTableStyle object, for use in `pivotTableStyle.set({ ... })`. */ + interface PivotTableStyleUpdateData { + /** + * Specifies the name of the PivotTable style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + } + /** An interface for updating data on the SlicerStyleCollection object, for use in `slicerStyleCollection.set({ ... })`. */ + interface SlicerStyleCollectionUpdateData { + items?: Excel.Interfaces.SlicerStyleData[]; + } + /** An interface for updating data on the SlicerStyle object, for use in `slicerStyle.set({ ... })`. */ + interface SlicerStyleUpdateData { + /** + * Specifies the name of the slicer style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + } + /** An interface for updating data on the TimelineStyleCollection object, for use in `timelineStyleCollection.set({ ... })`. */ + interface TimelineStyleCollectionUpdateData { + items?: Excel.Interfaces.TimelineStyleData[]; + } + /** An interface for updating data on the TimelineStyle object, for use in `timelineStyle.set({ ... })`. */ + interface TimelineStyleUpdateData { + /** + * Specifies the name of the timeline style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + } + /** An interface for updating data on the PageLayout object, for use in `pageLayout.set({ ... })`. */ + interface PageLayoutUpdateData { + /** + * Header and footer configuration for the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headersFooters?: Excel.Interfaces.HeaderFooterGroupUpdateData; + /** + * The worksheet's black and white print option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + blackAndWhite?: boolean; + /** + * The worksheet's bottom page margin to use for printing in points. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin?: number; + /** + * The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHorizontally?: boolean; + /** + * The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerVertically?: boolean; + /** + * The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + draftMode?: boolean; + /** + * The worksheet's first page number to print. A `null` value represents "auto" page numbering. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPageNumber?: number | ""; + /** + * The worksheet's footer margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + footerMargin?: number; + /** + * The worksheet's header margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headerMargin?: number; + /** + * The worksheet's left margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin?: number; + /** + * The worksheet's orientation of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation?: Excel.PageOrientation | "Portrait" | "Landscape"; + /** + * The worksheet's paper size of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"; + /** + * Specifies if the worksheet's comments should be displayed when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printComments?: Excel.PrintComments | "NoComments" | "EndSheet" | "InPlace"; + /** + * The worksheet's print errors option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printErrors?: Excel.PrintErrorType | "AsDisplayed" | "Blank" | "Dash" | "NotAvailable"; + /** + * Specifies if the worksheet's gridlines will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printGridlines?: boolean; + /** + * Specifies if the worksheet's headings will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printHeadings?: boolean; + /** + * The worksheet's page print order option. This specifies the order to use for processing the page number printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printOrder?: Excel.PrintOrder | "DownThenOver" | "OverThenDown"; + /** + * The worksheet's right margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin?: number; + /** + * The worksheet's top margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin?: number; + /** + * The worksheet's print zoom options. + The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zoom?: Excel.PageLayoutZoomOptions; + } + /** An interface for updating data on the HeaderFooter object, for use in `headerFooter.set({ ... })`. */ + interface HeaderFooterUpdateData { + /** + * The center footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerFooter?: string; + /** + * The center header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHeader?: string; + /** + * The left footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftFooter?: string; + /** + * The left header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftHeader?: string; + /** + * The right footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightFooter?: string; + /** + * The right header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + defaultForAllPages?: Excel.Interfaces.HeaderFooterUpdateData; + /** + * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + evenPages?: Excel.Interfaces.HeaderFooterUpdateData; + /** + * The first page header/footer, for all other pages general or even/odd is used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPage?: Excel.Interfaces.HeaderFooterUpdateData; + /** + * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + oddPages?: Excel.Interfaces.HeaderFooterUpdateData; + /** + * The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 RangeAreasCollection object, for use in `rangeAreasCollection.set({ ... })`. */ + interface RangeAreasCollectionUpdateData { + items?: Excel.Interfaces.RangeAreasData[]; + } + /** 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 Comment object, for use in `comment.set({ ... })`. */ + interface CommentUpdateData { + /** + * The comment's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: string; + /** + * The comment thread status. A value of `true` means that the comment thread is resolved. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + } + /** 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 CommentReply object, for use in `commentReply.set({ ... })`. */ + interface CommentReplyUpdateData { + /** + * The comment reply's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: string; + } + /** 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 this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.Interfaces.ShapeFillUpdateData; + /** + * Returns the line formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatUpdateData; + /** + * Specifies the alternative description text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextDescription?: string; + /** + * Specifies the alternative title text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextTitle?: string; + /** + * Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"; + /** + * Specifies the height, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + height?: number; + /** + * The distance, in points, from the left side of the shape to the left side of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: number; + /** + * Specifies if the aspect ratio of this shape is locked. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lockAspectRatio?: boolean; + /** + * Specifies the name of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: string; + /** + * Represents how the object is attached to the cells below it. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + placement?: Excel.Placement | "TwoCell" | "OneCell" | "Absolute"; + /** + * Specifies the rotation, in degrees, of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rotation?: number; + /** + * The distance, in points, from the top edge of the shape to the top edge of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: number; + /** + * Specifies if the shape is visible. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 Line object, for use in `line.set({ ... })`. */ + interface LineUpdateData { + /** + * Represents the length of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadLength?: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; + /** + * Represents the style of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadStyle?: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; + /** + * Represents the width of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadWidth?: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; + /** + * Represents the length of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadLength?: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; + /** + * Represents the style of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadStyle?: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; + /** + * Represents the width of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadWidth?: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; + /** + * Represents the connector type for the line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectorType?: Excel.ConnectorType | "Straight" | "Elbow" | "Curve"; + } + /** An interface for updating data on the ShapeFill object, for use in `shapeFill.set({ ... })`. */ + interface ShapeFillUpdateData { + /** + * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + foregroundColor?: string; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency?: number; + } + /** An interface for updating data on the ShapeLineFormat object, for use in `shapeLineFormat.set({ ... })`. */ + interface ShapeLineFormatUpdateData { + /** + * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashStyle?: Excel.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: Excel.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency?: number; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + weight?: number; + } + /** An interface for updating data on the TextFrame object, for use in `textFrame.set({ ... })`. */ + interface TextFrameUpdateData { + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeSetting?: Excel.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin?: number; + /** + * Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalAlignment?: Excel.ShapeTextHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; + /** + * Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalOverflow?: Excel.ShapeTextHorizontalOverflow | "Overflow" | "Clip"; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin?: number; + /** + * Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation?: Excel.ShapeTextOrientation | "Horizontal" | "Vertical" | "Vertical270" | "WordArtVertical" | "EastAsianVertical" | "MongolianVertical" | "WordArtVerticalRTL"; + /** + * Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder?: Excel.ShapeTextReadingOrder | "LeftToRight" | "RightToLeft"; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin?: number; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin?: number; + /** + * Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalAlignment?: Excel.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom" | "Justified" | "Distributed"; + /** + * Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalOverflow?: Excel.ShapeTextVerticalOverflow | "Overflow" | "Ellipsis" | "Clip"; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + font?: Excel.Interfaces.ShapeFontUpdateData; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + italic?: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: string; + /** + * Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + size?: number; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underline?: Excel.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + } + /** An interface for updating data on the Slicer object, for use in `slicer.set({ ... })`. */ + interface SlicerUpdateData { + /** + * The style applied to the slicer. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + slicerStyle?: Excel.Interfaces.SlicerStyleUpdateData; + /** + * Represents the worksheet containing the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheet?: Excel.Interfaces.WorksheetUpdateData; + /** + * Represents the caption of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + caption?: string; + /** + * Represents the height, in points, of the slicer. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: number; + /** + * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: number; + /** + * Represents the name of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + /** + * Represents the slicer name used in the formula. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula?: string; + /** + * Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + sortBy?: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"; + /** + * Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + style?: string; + /** + * Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: number; + /** + * Represents the width, in points, of the slicer. + Throws an `InvalidArgument` error when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: number; + } + /** An interface for updating data on the SlicerCollection object, for use in `slicerCollection.set({ ... })`. */ + interface SlicerCollectionUpdateData { + items?: Excel.Interfaces.SlicerData[]; + } + /** An interface for updating data on the SlicerItem object, for use in `slicerItem.set({ ... })`. */ + interface SlicerItemUpdateData { + /** + * Value is `true` if the slicer item is selected. + Setting this value will not clear the selected state of other slicer items. + By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSelected?: boolean; + } + /** An interface for updating data on the SlicerItemCollection object, for use in `slicerItemCollection.set({ ... })`. */ + interface SlicerItemCollectionUpdateData { + items?: Excel.Interfaces.SlicerItemData[]; + } + /** An interface for updating data on the LinkedDataTypeCollection object, for use in `linkedDataTypeCollection.set({ ... })`. */ + interface LinkedDataTypeCollectionUpdateData { + items?: Excel.Interfaces.LinkedDataTypeData[]; + } + /** An interface for updating data on the NamedSheetView object, for use in `namedSheetView.set({ ... })`. */ + interface NamedSheetViewUpdateData { + /** + * Gets or sets the name of the sheet view. + The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + name?: string; + } + /** An interface for updating data on the NamedSheetViewCollection object, for use in `namedSheetViewCollection.set({ ... })`. */ + interface NamedSheetViewCollectionUpdateData { + items?: Excel.Interfaces.NamedSheetViewData[]; + } + /** An interface describing the data returned by calling `allowEditRange.toJSON()`. */ + interface AllowEditRangeData { + /** + * Specifies the range associated with the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + address?: string; + /** + * Specifies if the object is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPasswordProtected?: boolean; + /** + * Specifies the title of the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. + If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + title?: string; + } + /** An interface describing the data returned by calling `allowEditRangeCollection.toJSON()`. */ + interface AllowEditRangeCollectionData { + items?: Excel.Interfaces.AllowEditRangeData[]; + } + /** An interface describing the data returned by calling `query.toJSON()`. */ + interface QueryData { + /** + * Gets the query error message from when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + error?: Excel.QueryError | "Unknown" | "None" | "FailedLoadToWorksheet" | "FailedLoadToDataModel" | "FailedDownload" | "FailedToCompleteDownload"; + /** + * Gets the query loaded to object type. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + loadedTo?: Excel.LoadToType | "ConnectionOnly" | "Table" | "PivotTable" | "PivotChart"; + /** + * Specifies if the query loaded to the data model. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + loadedToDataModel?: boolean; + /** + * Gets the name of the query. + Query names cannot contain periods or quotation marks. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + name?: string; + /** + * Gets the date and time when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + refreshDate?: Date; + /** + * Gets the number of rows that were loaded when the query was last refreshed. + If last refresh has errors the value will be -1. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + rowsLoadedCount?: number; + } + /** An interface describing the data returned by calling `queryCollection.toJSON()`. */ + interface QueryCollectionData { + items?: Excel.Interfaces.QueryData[]; + } + /** An interface describing the data returned by calling `linkedWorkbook.toJSON()`. */ + interface LinkedWorkbookData { + /** + * The original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + id?: string; + } + /** An interface describing the data returned by calling `linkedWorkbookCollection.toJSON()`. */ + interface LinkedWorkbookCollectionData { + items?: Excel.Interfaces.LinkedWorkbookData[]; + } + /** An interface describing the data returned by calling `documentTaskChange.toJSON()`. */ + interface DocumentTaskChangeData { + /** + * Represents the user assigned to the task for an `assign` change action, or the user unassigned from the task for an `unassign` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignee?: Excel.EmailIdentity; + /** + * Represents the identity of the user who made the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + changedBy?: Excel.EmailIdentity; + /** + * Represents the ID of the comment or commentReply to which the task change is anchored. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + commentId?: string; + /** + * Represents creation date and time of the task change record. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: Date; + /** + * Represents the task's due date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the due date and time. It should be set together with `startDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dueDateTime?: Date; + /** + * The unique GUID of the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + /** + * Represents the task's completion percentage. It is used for the `setPercentComplete` change action. + This is a value betwen 0 and 100, where 100 represents a completed task.Changing this value to 100 also completes the associated comment.Changing the completion from 100 to a lower value reactivates the associated comment. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: number; + /** + * Represents the task's priority. It is used for the `setPriority` change action. + This is a value between 0 and 10, with 5 being the default priority if not set, and where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: number; + /** + * Represents the task's start date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the start date and time. It should be set together with `dueDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startDateTime?: Date; + /** + * Represents the task's title. It is used for `setTitle` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: string; + /** + * Represents the action type of the task change record. Some examples of action types are assign, undo, and setPriority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: Excel.DocumentTaskChangeAction | "unknown" | "create" | "assign" | "unassign" | "unassignAll" | "setSchedule" | "setPercentComplete" | "setPriority" | "remove" | "restore" | "setTitle" | "undo"; + /** + * Represents the `DocumentTaskChange.id` property that was undone for the `undo` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + undoChangeId?: string; + } + /** An interface describing the data returned by calling `documentTaskChangeCollection.toJSON()`. */ + interface DocumentTaskChangeCollectionData { + items?: Excel.Interfaces.DocumentTaskChangeData[]; + } + /** An interface describing the data returned by calling `documentTask.toJSON()`. */ + interface DocumentTaskData { + /** + * Returns a collection of assignees of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignees?: Excel.EmailIdentity[]; + /** + * Gets the most recent user to have completed the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completedBy?: Excel.EmailIdentity; + /** + * Gets the date and time that the task was completed. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completedDateTime?: Date; + /** + * Gets the user who created the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdBy?: Excel.EmailIdentity; + /** + * Gets the date and time that the task was created. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: Date; + /** + * Gets the ID of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + /** + * Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: number; + /** + * Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: number; + /** + * Gets or sets the date and time the task should start and is due. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startAndDueDateTime?: Excel.DocumentTaskSchedule; + /** + * Specifies title of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: string; + } + /** An interface describing the data returned by calling `documentTaskCollection.toJSON()`. */ + interface DocumentTaskCollectionData { + items?: Excel.Interfaces.DocumentTaskData[]; + } + /** An interface describing the data returned by calling `runtime.toJSON()`. */ + interface RuntimeData { + /** + * Toggle JavaScript events in the current task pane or content add-in. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableEvents?: boolean; + } + /** An interface describing the data returned by calling `application.toJSON()`. */ + interface ApplicationData { + /** + * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + cultureInfo?: Excel.Interfaces.CultureInfoData; + /** + * Returns the iterative calculation settings. + In Excel on Windows and Mac, the settings will apply to the Excel Application. + In Excel on the web and other platforms, the settings will apply to the active workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + iterativeCalculation?: Excel.Interfaces.IterativeCalculationData; + /** + * Returns the Excel calculation engine version used for the last full recalculation. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode?: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + /** + * Returns the calculation state of the application. See `Excel.CalculationState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + calculationState?: Excel.CalculationState | "Done" | "Calculating" | "Pending"; + /** + * Gets the string used as the decimal separator for numeric values. This is based on the local Excel settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + decimalSeparator?: string; + /** + * Specifies whether the "Format Stale values" button under Calculation Options is turned on or off. + The stale formulas are rendered with stale formatting if the button is turned on. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + formatStaleValues?: boolean; + /** + * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on the local Excel settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + thousandsSeparator?: string; + /** + * Specifies if the system separators of Excel are enabled. + System separators include the decimal separator and thousands separator. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + useSystemSeparators?: boolean; + } + /** An interface describing the data returned by calling `iterativeCalculation.toJSON()`. */ + interface IterativeCalculationData { + /** + * True if Excel will use iteration to resolve circular references. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enabled?: boolean; + /** + * Specifies the maximum amount of change between each iteration as Excel resolves circular references. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxChange?: number; + /** + * Specifies the maximum number of iterations that Excel can use to resolve a circular reference. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxIteration?: number; + } + /** An interface describing the data returned by calling `workbook.toJSON()`. */ + interface WorkbookData { + /** + * Represents a collection of bindings that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bindings?: Excel.Interfaces.BindingData[]; + /** + * Represents a collection of comments associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + comments?: Excel.Interfaces.CommentData[]; + /** + * Represents the collection of custom XML parts contained by this workbook. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + customXmlParts?: Excel.Interfaces.CustomXmlPartData[]; + /** + * Represents a collection of workbook-scoped named items (named ranges and constants). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + names?: Excel.Interfaces.NamedItemData[]; + /** + * Represents a collection of PivotTableStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + pivotTableStyles?: Excel.Interfaces.PivotTableStyleData[]; + /** + * Represents a collection of PivotTables associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + pivotTables?: Excel.Interfaces.PivotTableData[]; + /** + * Gets the workbook properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + properties?: Excel.Interfaces.DocumentPropertiesData; + /** + * Returns the protection object for a workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + protection?: Excel.Interfaces.WorkbookProtectionData; + /** + * Represents a collection of settings associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + settings?: Excel.Interfaces.SettingData[]; + /** + * Represents a collection of SlicerStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + slicerStyles?: Excel.Interfaces.SlicerStyleData[]; + /** + * Represents a collection of slicers associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + slicers?: Excel.Interfaces.SlicerData[]; + /** + * Represents a collection of styles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + styles?: Excel.Interfaces.StyleData[]; + /** + * Represents a collection of TableStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + tableStyles?: Excel.Interfaces.TableStyleData[]; + /** + * Represents a collection of tables associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableData[]; + /** + * Represents a collection of TimelineStyles associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + timelineStyles?: Excel.Interfaces.TimelineStyleData[]; + /** + * Represents a collection of worksheets associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + worksheets?: Excel.Interfaces.WorksheetData[]; + /** + * Specifies if the workbook is in AutoSave mode. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSave?: boolean; + /** + * Returns a number about the version of Excel Calculation Engine. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartDataPointTrack?: boolean; + /** + * Specifies if changes have been made since the workbook 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isDirty?: boolean; + /** + * Gets the workbook name. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * Specifies if the workbook has ever been saved locally or online. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + previouslySaved?: boolean; + /** + * Returns `true` if the workbook is open in read-only mode. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readOnly?: boolean; + /** + * Specifies whether the PivotTable's field list pane is shown at the workbook level. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showPivotFieldList?: boolean; + /** + * True if the workbook uses the 1904 date system. + * + * @remarks + * [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`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + usePrecisionAsDisplayed?: boolean; + } + /** An interface describing the data returned by calling `workbookProtection.toJSON()`. */ + interface WorkbookProtectionData { + /** + * Specifies if the workbook is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + protected?: boolean; + } + /** An interface describing the data returned by calling `workbookCreated.toJSON()`. */ + interface WorkbookCreatedData { + } + /** An interface describing the data returned by calling `worksheet.toJSON()`. */ + interface WorksheetData { + /** + * Represents the `AutoFilter` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterData; + /** + * Returns a collection of charts that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartData[]; + /** + * Returns a collection of all the Comments objects on the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + comments?: Excel.Interfaces.CommentData[]; + /** + * Gets a collection of worksheet-level custom properties. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + customProperties?: Excel.Interfaces.WorksheetCustomPropertyData[]; + /** + * Gets the horizontal page break collection for the worksheet. This collection only contains manual page breaks. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalPageBreaks?: Excel.Interfaces.PageBreakData[]; + /** + * Collection of names scoped to the current worksheet. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + names?: Excel.Interfaces.NamedItemData[]; + /** + * Gets the `PageLayout` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pageLayout?: Excel.Interfaces.PageLayoutData; + /** + * Collection of PivotTables that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + pivotTables?: Excel.Interfaces.PivotTableData[]; + /** + * Returns the sheet protection object for a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionData; + /** + * Returns the collection of all the Shape objects on the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shapes?: Excel.Interfaces.ShapeData[]; + /** + * Returns a collection of slicers that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + slicers?: Excel.Interfaces.SlicerData[]; + /** + * Collection of tables that are part of the worksheet. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalPageBreaks?: Excel.Interfaces.PageBreakData[]; + /** + * Determines if Excel should recalculate the worksheet when necessary. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * The display name of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * The zero-based position of the worksheet within the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: number; + /** + * Specifies if gridlines are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showGridlines?: boolean; + /** + * Specifies if headings are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showHeadings?: boolean; + /** + * Returns the standard (default) height of all the rows in the worksheet, in points. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardHeight?: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardWidth?: number; + /** + * The tab color of the worksheet. + 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 #RRGGBB (e.g., "FFA500"). + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tabColor?: string; + /** + * Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + tabId?: number; + /** + * The visibility of the worksheet. + * + * @remarks + * [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 { + /** + * Specifies the `AllowEditRangeCollection` object found in this worksheet. This is a collection of `AllowEditRange` objects, which work with worksheet protection properties. + When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + allowEditRanges?: Excel.Interfaces.AllowEditRangeData[]; + /** + * Specifies if protection can be paused for this worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + canPauseProtection?: boolean; + /** + * Specifies if the sheet is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPasswordProtected?: boolean; + /** + * Specifies if worksheet protection is paused. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPaused?: boolean; + /** + * Specifies the protection options for the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + options?: Excel.WorksheetProtectionOptions; + /** + * Specifies if the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protected?: boolean; + /** + * Specifies the protection options saved in the worksheet. + This will return the same `WorksheetProtectionOptions` object regardless of the worksheet protection state. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + savedOptions?: Excel.WorksheetProtectionOptions; + } + /** An interface describing the data returned by calling `range.toJSON()`. */ + interface RangeData { + /** + * The collection of `ConditionalFormats` that intersect the range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + conditionalFormats?: Excel.Interfaces.ConditionalFormatData[]; + /** + * Returns a data validation object. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataValidation?: Excel.Interfaces.DataValidationData; + /** + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatData; + /** + * Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + address?: string; + /** + * Represents the range reference for the specified range in the language of the user. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + addressLocal?: string; + /** + * Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + cellCount?: number; + /** + * Specifies the total number of columns in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnCount?: number; + /** + * Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * Specifies the column number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnIndex?: number; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: any[][]; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + hasSpill?: boolean; + /** + * Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: number; + /** + * Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * Represents the hyperlink for the current range. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hyperlink?: Excel.RangeHyperlink; + /** + * Represents if the current range is an entire column. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isEntireColumn?: boolean; + /** + * Represents if the current range is an entire row. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isEntireRow?: boolean; + /** + * Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: number; + /** + * Represents the data type state of each cell. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkedDataTypeState?: Excel.LinkedDataTypeState[][]; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + numberFormat?: any[][]; + /** + * Represents the category of number format of each cell. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + numberFormatCategories?: Excel.NumberFormatCategory[][]; + /** + * Represents Excel's number format code for the given range, based on the language settings of the user. + Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. + Any returned text uses the locally-formatted strings based on the language specified in the system settings. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: any[][]; + /** + * Returns the total number of rows in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rowCount?: number; + /** + * Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHidden?: boolean; + /** + * Returns the row number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rowIndex?: number; + /** + * Represents if all the cells would be saved as an array formula. + Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. + Returns `null` if some cells would be saved as an array formula and some would not be. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + savedAsArray?: 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + style?: string; + /** + * Text values of the specified range. The text value will not depend on the cell width. The number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: string[][]; + /** + * Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: number; + /** + * Specifies the type of data in each cell. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + valueTypes?: Excel.RangeValueType[][]; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + /** + * Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: number; + } + /** An interface describing the data returned by calling `rangeAreas.toJSON()`. */ + interface RangeAreasData { + /** + * Returns a collection of rectangular ranges that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + areas?: Excel.Interfaces.RangeData[]; + /** + * Returns a collection of conditional formats that intersect with any cells in this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + conditionalFormats?: Excel.Interfaces.ConditionalFormatData[]; + /** + * Returns a data validation object for all ranges in the `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dataValidation?: Excel.Interfaces.DataValidationData; + /** + * Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.Interfaces.RangeFormatData; + /** + * Returns the `RangeAreas` 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"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + address?: string; + /** + * Returns the `RangeAreas` reference in the user locale. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + addressLocal?: string; + /** + * Returns the number of rectangular ranges that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + cellCount?: number; + /** + * Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isEntireColumn?: boolean; + /** + * Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: string; + } + /** An interface describing the data returned by calling `workbookRangeAreas.toJSON()`. */ + interface WorkbookRangeAreasData { + /** + * Returns the `RangeAreasCollection` object. Each `RangeAreas` in the collection represent one or more rectangle ranges in one worksheet. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + areas?: Excel.Interfaces.RangeAreasData[]; + /** + * Returns ranges that comprise this object in a `RangeCollection` object. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + ranges?: Excel.Interfaces.RangeData[]; + /** + * Returns an array of addresses in A1-style. Address values contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + addresses?: string[]; + } + /** An interface describing the data returned by calling `rangeView.toJSON()`. */ + interface RangeViewData { + /** + * Represents a collection of range views associated with the range. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + rows?: Excel.Interfaces.RangeViewData[]; + /** + * Represents the cell addresses of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: any[][]; + /** + * The number of visible columns. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + columnCount?: number; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: any[][]; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: any[][]; + /** + * Returns a value that represents the index of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + index?: number; + /** + * Represents Excel's number format code for the given cell. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + numberFormat?: any[][]; + /** + * The number of visible rows. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + text?: string[][]; + /** + * Represents the type of data of each cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** 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 { + /** + * The key that represents the ID of the setting. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + key?: string; + /** + * Represents the value stored for this setting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + arrayValues?: Excel.Interfaces.NamedItemArrayValuesData; + /** + * Specifies the comment associated with this name. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + comment?: string; + /** + * The formula of the named item. Formulas always start with an equal sign ("="). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formula?: any; + /** + * The name of the object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + scope?: Excel.NamedItemScope | "Worksheet" | "Workbook"; + /** + * Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + value?: any; + /** + * A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJson?: CellValue | string; + /** + * A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJsonLocal?: CellValue | string; + /** + * Specifies if the object is visible. + * + * @remarks + * [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 + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + types?: Excel.RangeValueType[][]; + /** + * Represents the values of each item in the named item array. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + values?: any[][]; + /** + * A JSON representation of the values in this named item array. + Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItemArrayValues.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in this named item array. + Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItemArrayValues.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** An interface describing the data returned by calling `binding.toJSON()`. */ + interface BindingData { + /** + * Represents the binding identifier. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * Returns the type of the binding. See `Excel.BindingType` for details. + * + * @remarks + * [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 `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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterData; + /** + * Represents a collection of all the columns in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnData[]; + /** + * Represents a collection of all the rows in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowData[]; + /** + * Represents the sorting for the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortData; + /** + * The style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableStyle?: Excel.Interfaces.TableStyleData; + /** + * Specifies if the first column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * Specifies if the last column contains special formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * Returns a numeric ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + legacyId?: string; + /** + * Name of the table. + + The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * Specifies if the header row is visible. This value can be set to show or remove the header row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * Specifies if the total row is visible. This value can be set to show or remove the total row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [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 { + /** + * Retrieves the filter applied to the column. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + filter?: Excel.Interfaces.FilterData; + /** + * Returns a unique key that identifies the column within the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: number; + /** + * Returns the index number of the column within the columns collection of the table. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + index?: number; + /** + * Specifies the name of the table column. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + index?: number; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: CellValue[][]; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: CellValue[][]; + } + /** An interface describing the data returned by calling `dataValidation.toJSON()`. */ + interface DataValidationData { + /** + * Error alert when user enters invalid data. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + errorAlert?: Excel.DataValidationErrorAlert; + /** + * Specifies if data validation will be performed on blank cells. Default is `true`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + ignoreBlanks?: boolean; + /** + * Prompt when users select a cell. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + prompt?: Excel.DataValidationPrompt; + /** + * Data validation rule that contains different type of data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + rule?: Excel.DataValidationRule; + /** + * Type of the data validation, see `Excel.DataValidationType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + valid?: boolean; + } + /** An interface describing the data returned by calling `removeDuplicatesResult.toJSON()`. */ + interface RemoveDuplicatesResultData { + /** + * Number of duplicated rows removed by the operation. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + removed?: number; + /** + * Number of remaining unique rows present in the resulting range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + uniqueRemaining?: number; + } + /** An interface describing the data returned by calling `rangeFormat.toJSON()`. */ + interface RangeFormatData { + /** + * Collection of border objects that apply to the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderData[]; + /** + * Returns the fill object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillData; + /** + * Returns the font object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontData; + /** + * Returns the format protection object for a range. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionData; + /** + * Specifies if text is automatically indented when text alignment is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoIndent?: boolean; + /** + * Specifies the width of all colums within the range. If the column widths are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnWidth?: number; + /** + * Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + indentLevel?: number; + /** + * The reading order for the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * The height of all rows in the range. If the row heights are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHeight?: number; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shrinkToFit?: boolean; + /** + * 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. + * + * @remarks + * [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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardHeight?: boolean; + /** + * Specifies if 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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardWidth?: boolean; + /** + * Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** An interface describing the data returned by calling `formatProtection.toJSON()`. */ + interface FormatProtectionData { + /** + * Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. + * + * @remarks + * [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 background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * 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 a uniform pattern setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + /** + * The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternColor?: string; + /** + * Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternTintAndShade?: number; + /** + * Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + } + /** An interface describing the data returned by calling `rangeBorder.toJSON()`. */ + interface RangeBorderData { + /** + * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Constant value that indicates the specific side of the border. See `Excel.BorderIndex` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + /** + * Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. + * + * @remarks + * [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 the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Specifies the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Font size. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + strikethrough?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subscript?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + superscript?: boolean; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform font `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: number; + /** + * Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesData; + /** + * Represents the data labels on the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsData; + /** + * Encapsulates the format properties for the chart area. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatData; + /** + * Represents the legend for the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendData; + /** + * Encapsulates the options for a pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pivotOptions?: Excel.Interfaces.ChartPivotOptionsData; + /** + * Represents the plot area for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotArea?: Excel.Interfaces.ChartPlotAreaData; + /** + * Represents either a single series or collection of series in the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + series?: Excel.Interfaces.ChartSeriesData[]; + /** + * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleData; + /** + * Specifies a chart category label level enumeration constant, referring to the level of the source category labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel?: number; + /** + * Specifies the type of the chart. See `Excel.ChartType` for details. + * + * @remarks + * [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"; + /** + * Specifies the way that blank cells are plotted on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs?: Excel.ChartDisplayBlanksAs | "NotPlotted" | "Zero" | "Interplotted"; + /** + * Specifies the height, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + height?: number; + /** + * The unique ID of chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + id?: string; + /** + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + left?: number; + /** + * Specifies the name of a chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Specifies the way columns or rows are used as data series on the chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly?: boolean; + /** + * Specifies a chart series name level enumeration constant, referring to the level of the source series names. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel?: number; + /** + * Specifies whether to display all field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. + If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum?: boolean; + /** + * Specifies the chart style for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + style?: number; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + top?: number; + /** + * Specifies the width, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling `chartPivotOptions.toJSON()`. */ + interface ChartPivotOptionsData { + /** + * Specifies whether to display the 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showAxisFieldButtons?: boolean; + /** + * Specifies whether to display the legend field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLegendFieldButtons?: boolean; + /** + * Specifies whether to display the report filter field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showReportFilterFieldButtons?: boolean; + /** + * Specifies whether to display the show value field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showValueFieldButtons?: boolean; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + /** + * Specifies the color scheme of the chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + colorScheme?: Excel.ChartColorScheme | "ColorfulPalette1" | "ColorfulPalette2" | "ColorfulPalette3" | "ColorfulPalette4" | "MonochromaticPalette1" | "MonochromaticPalette2" | "MonochromaticPalette3" | "MonochromaticPalette4" | "MonochromaticPalette5" | "MonochromaticPalette6" | "MonochromaticPalette7" | "MonochromaticPalette8" | "MonochromaticPalette9" | "MonochromaticPalette10" | "MonochromaticPalette11" | "MonochromaticPalette12" | "MonochromaticPalette13"; + /** + * Specifies if the chart area of the chart has rounded corners. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + roundedCorners?: boolean; + } + /** 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 { + /** + * Encapsulates the bin options for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + binOptions?: Excel.Interfaces.ChartBinOptionsData; + /** + * Encapsulates the options for the box and whisker charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsData; + /** + * Represents a collection of all data labels in the series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsData; + /** + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatData; + /** + * Encapsulates the options for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + mapOptions?: Excel.Interfaces.ChartMapOptionsData; + /** + * Returns a collection of all points in the series. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointData[]; + /** + * The collection of trendlines in the series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + trendlines?: Excel.Interfaces.ChartTrendlineData[]; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + xErrorBars?: Excel.Interfaces.ChartErrorBarsData; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + yErrorBars?: Excel.Interfaces.ChartErrorBarsData; + /** + * Specifies the group for the specified series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bubbleScale?: number; + /** + * Represents the chart type of a series. See `Excel.ChartType` for details. + * + * @remarks + * [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 doughnut exploded charts. + Throws an `InvalidArgument` error on invalid charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: number; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + explosion?: number; + /** + * Specifies if the series is filtered. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + filtered?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + gapWidth?: number; + /** + * Specifies the color for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumColor?: string; + /** + * Specifies the type for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumValue?: number; + /** + * Specifies the color for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointColor?: string; + /** + * Specifies the type for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointValue?: number; + /** + * Specifies the color for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumColor?: string; + /** + * Specifies the type for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * Specifies the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumValue?: number; + /** + * Specifies the series gradient style of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientStyle?: Excel.ChartGradientStyle | "TwoPhaseColor" | "ThreePhaseColor"; + /** + * Specifies if the series has data labels. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * Specifies the fill color for negative data points in a series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + invertColor?: string; + /** + * True if Excel inverts the pattern in the item when it corresponds to a negative number. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + invertIfNegative?: boolean; + /** + * Specifies the marker background color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * Specifies the marker foreground color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * Specifies the marker size of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + /** + * Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + overlap?: number; + /** + * Specifies the series parent label strategy area for a treemap chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentLabelStrategy?: Excel.ChartParentLabelStrategy | "None" | "Banner" | "Overlapping"; + /** + * Specifies the plot order of a chart series within the chart group. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + plotOrder?: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + secondPlotSize?: number; + /** + * Specifies whether connector lines are shown in waterfall charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showConnectorLines?: boolean; + /** + * Specifies whether leader lines are displayed for each data label in the series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLeaderLines?: boolean; + /** + * Specifies if the series has a shadow. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies if the series is smooth. Only applicable to line and scatter charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + /** + * Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitType?: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + /** + * Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + splitValue?: number; + /** + * True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + varyByCategories?: boolean; + } + /** An interface describing the data returned by calling `chartSeriesFormat.toJSON()`. */ + interface ChartSeriesFormatData { + /** + * Represents line formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelData; + /** + * Encapsulates the format properties chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatData; + /** + * Represents whether a data point has a data label. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * Represents marker size of a data point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisData; + /** + * Represents the series axis of a 3-D chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisData; + /** + * Represents the value axis in an axis. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatData; + /** + * Returns an object that represents the major gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesData; + /** + * Returns an object that represents the minor gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesData; + /** + * Represents the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleData; + /** + * Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + alignment?: Excel.ChartTickLabelAlignment | "Center" | "Left" | "Right"; + /** + * Specifies the group for the specified axis. See `Excel.ChartAxisGroup` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * Specifies the base unit for the specified category axis. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * Specifies the category axis type. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + categoryType?: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; + /** + * Specifies the custom axis display unit value. To set this property, please use the `SetCustomDisplayUnit(double)` method. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + customDisplayUnit?: number; + /** + * Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + displayUnit?: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; + /** + * Specifies the height, in points, of the chart axis. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * Specifies if the value axis crosses the category axis between categories. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isBetweenCategories?: boolean; + /** + * Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * Specifies the base of the logarithm when using logarithmic scales. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + logBase?: number; + /** + * Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + majorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minimum?: any; + /** + * Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + minorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorUnit?: any; + /** + * Specifies if an axis is multilevel. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + multiLevel?: boolean; + /** + * Specifies the format code for the axis tick label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + offset?: number; + /** + * Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * Specifies the axis position where the other axis crosses. You should use the `SetPositionAt(double)` method to set this property. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + positionAt?: number; + /** + * Specifies if Excel plots data points from last to first. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder?: boolean; + /** + * Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + scaleType?: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; + /** + * Specifies if the axis display unit label is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel?: boolean; + /** + * Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: any; + /** + * Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition?: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing?: any; + /** + * Specifies the number of categories or series between tick marks. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing?: number; + /** + * Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * Specifies the axis type. See `Excel.ChartAxisType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: Excel.ChartAxisType | "Invalid" | "Category" | "Value" | "Series"; + /** + * Specifies if the axis is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the chart axis. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + width?: number; + } + /** An interface describing the data returned by calling `chartAxisFormat.toJSON()`. */ + interface ChartAxisFormatData { + /** + * Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + /** + * Specifies chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling `chartAxisTitle.toJSON()`. */ + interface ChartAxisTitleData { + /** + * Specifies the formatting of the chart axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatData; + /** + * Specifies the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + textOrientation?: number; + /** + * Specifies if the axis title is visibile. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling `chartAxisTitleFormat.toJSON()`. */ + interface ChartAxisTitleFormatData { + /** + * Specifies the chart axis title's border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling `chartDataLabels.toJSON()`. */ + interface ChartDataLabelsData { + /** + * Specifies the format of chart data labels, which includes fill and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatData; + /** + * Specifies if data labels automatically generate appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * TODO: + * + * @remarks + * [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"; + /** + * Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when the `TextOrientation` of data label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * Specifies the format code for data labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + separator?: string; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showAsDataCallout?: boolean; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + /** + * Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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 the data label is -90, 90, or 180. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartDataLabelFormatData; + /** + * Specifies if the data label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * String value that represents the formula of chart data label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula?: string; + /** + * TODO: + * + * @remarks + * [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"; + /** + * Returns the height, in points, of the chart data label. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * String value that represents the format code for data label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + separator?: string; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showAsDataCallout?: boolean; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showBubbleSize?: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showCategoryName?: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showLegendKey?: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showPercentage?: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showSeriesName?: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showValue?: boolean; + /** + * String representing the text of the data label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text?: string; + /** + * Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Returns the width, in points, of the chart data label. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Represents the font attributes (such as font name, font size, and color) for a chart data label. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling `chartDataTable.toJSON()`. */ + interface ChartDataTableData { + /** + * Represents the format of a chart data table, which includes fill, font, and border format. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + format?: Excel.Interfaces.ChartDataTableFormatData; + /** + * Specifies whether to display the horizontal border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showHorizontalBorder?: boolean; + /** + * Specifies whether to show the legend key of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showLegendKey?: boolean; + /** + * Specifies whether to display the outline border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showOutlineBorder?: boolean; + /** + * Specifies whether to display the vertical border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showVerticalBorder?: boolean; + /** + * Specifies whether to show the data table of the chart. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling `chartDataTableFormat.toJSON()`. */ + interface ChartDataTableFormatData { + /** + * Represents the border format of chart data table, which includes color, line style, and weight. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Represents the font attributes (such as font name, font size, and color) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling `chartErrorBars.toJSON()`. */ + interface ChartErrorBarsData { + /** + * Specifies the formatting type of the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.Interfaces.ChartErrorBarsFormatData; + /** + * Specifies if error bars have an end style cap. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endStyleCap?: boolean; + /** + * Specifies which parts of the error bars to include. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + include?: Excel.ChartErrorBarsInclude | "Both" | "MinusValues" | "PlusValues"; + /** + * The type of range marked by the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: Excel.ChartErrorBarsType | "FixedValue" | "Percent" | "StDev" | "StError" | "Custom"; + /** + * Specifies whether the error bars are displayed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling `chartErrorBarsFormat.toJSON()`. */ + interface ChartErrorBarsFormatData { + /** + * Represents the chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling `chartGridlines.toJSON()`. */ + interface ChartGridlinesData { + /** + * Represents the formatting of chart gridlines. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatData; + /** + * Specifies if the axis gridlines are visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling `chartGridlinesFormat.toJSON()`. */ + interface ChartGridlinesFormatData { + /** + * Represents chart line formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatData; + /** + * Represents a collection of legendEntries in the legend. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + legendEntries?: Excel.Interfaces.ChartLegendEntryData[]; + /** + * Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * Specifies if the chart legend should overlap with the main body of the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; + /** + * Specifies if the legend has a shadow on the chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies the top of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * Specifies if the chart legend is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + width?: number; + } + /** An interface describing the data returned by calling `chartLegendEntry.toJSON()`. */ + interface ChartLegendEntryData { + /** + * Specifies the height of the legend entry on the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * Specifies the index of the legend entry in the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + index?: number; + /** + * Specifies the left value of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies the top of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * Represents the visibility of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * Represents the width of the legend entry on the chart Legend. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Represents the font attributes such as font name, font size, and color of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling `chartMapOptions.toJSON()`. */ + interface ChartMapOptionsData { + /** + * Specifies the series map labels strategy of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + labelStrategy?: Excel.ChartMapLabelStrategy | "None" | "BestFit" | "ShowAll"; + /** + * Specifies the series mapping level of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: Excel.ChartMapAreaLevel | "Automatic" | "DataOnly" | "City" | "County" | "State" | "Country" | "Continent" | "World"; + /** + * Specifies the series projection type of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + projectionType?: Excel.ChartMapProjectionType | "Automatic" | "Mercator" | "Miller" | "Robinson" | "Albers"; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatData; + /** + * Returns the height, in points, of the chart title. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * Specifies the horizontal alignment for chart title. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * Specifies if the chart title will overlay the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * Represents the position of chart title. See `Excel.ChartTitlePosition` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies the chart's title text. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + textOrientation?: number; + /** + * Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Specifies if the chart title is visibile. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the chart title. Value is `null` if the chart title is not visible. + * + * @remarks + * [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, and color of a chart characters object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Represents the font attributes (such as font name, font size, and color) for an object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + color?: string; + /** + * Represents the line style of the border. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + weight?: number; + } + /** An interface describing the data returned by calling `chartBinOptions.toJSON()`. */ + interface ChartBinOptionsData { + /** + * Specifies if bin overflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowOverflow?: boolean; + /** + * Specifies if bin underflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowUnderflow?: boolean; + /** + * Specifies the bin count of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + count?: number; + /** + * Specifies the bin overflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + overflowValue?: number; + /** + * Specifies the bin's type for a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: Excel.ChartBinType | "Category" | "Auto" | "BinWidth" | "BinCount"; + /** + * Specifies the bin underflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underflowValue?: number; + /** + * Specifies the bin width value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: number; + } + /** An interface describing the data returned by calling `chartBoxwhiskerOptions.toJSON()`. */ + interface ChartBoxwhiskerOptionsData { + /** + * Specifies if the quartile calculation type of a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + quartileCalculation?: Excel.ChartBoxQuartileCalculation | "Inclusive" | "Exclusive"; + /** + * Specifies if inner points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showInnerPoints?: boolean; + /** + * Specifies if the mean line is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanLine?: boolean; + /** + * Specifies if the mean marker is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanMarker?: boolean; + /** + * Specifies if outlier points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showOutlierPoints?: boolean; + } + /** An interface describing the data returned by calling `chartLineFormat.toJSON()`. */ + interface ChartLineFormatData { + /** + * HTML color code representing the color of lines in the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Represents the line style. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * Represents the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * Font name (e.g., "Calibri") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * Size of the font (e.g., 11) + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatData; + /** + * Represents the label of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + label?: Excel.Interfaces.ChartTrendlineLabelData; + /** + * Represents the number of periods that the trendline extends backward. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + backwardPeriod?: number; + /** + * Represents the number of periods that the trendline extends forward. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + intercept?: any; + /** + * Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: number; + /** + * Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: number; + /** + * True if the equation for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showEquation?: boolean; + /** + * True if the r-squared value for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showRSquared?: boolean; + /** + * Represents the type of a chart trendline. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling `chartTrendlineLabel.toJSON()`. */ + interface ChartTrendlineLabelData { + /** + * The format of the chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartTrendlineLabelFormatData; + /** + * Specifies if the trendline label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * String value that represents the formula of the chart trendline label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula?: string; + /** + * Returns the height, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * String value that represents the format code for the trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * String representing the text of the trendline label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text?: string; + /** + * Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * Returns the width, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: number; + } + /** An interface describing the data returned by calling `chartTrendlineLabelFormat.toJSON()`. */ + interface ChartTrendlineLabelFormatData { + /** + * Specifies the border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling `chartPlotArea.toJSON()`. */ + interface ChartPlotAreaData { + /** + * Specifies the formatting of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartPlotAreaFormatData; + /** + * Specifies the height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * Specifies the inside height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideHeight?: number; + /** + * Specifies the inside left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideLeft?: number; + /** + * Specifies the inside top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideTop?: number; + /** + * Specifies the inside width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideWidth?: number; + /** + * Specifies the left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * Specifies the position of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: Excel.ChartPlotAreaPosition | "Automatic" | "Custom"; + /** + * Specifies the top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * Specifies the width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: number; + } + /** An interface describing the data returned by calling `chartPlotAreaFormat.toJSON()`. */ + interface ChartPlotAreaFormatData { + /** + * Specifies the border attributes of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + } + /** An interface describing the data returned by calling `tableSort.toJSON()`. */ + interface TableSortData { + /** + * Specifies the current conditions used to last sort the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + fields?: Excel.SortField[]; + /** + * Specifies if the casing impacts the last sort of the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + matchCase?: boolean; + /** + * Represents the Chinese character ordering method last used to sort the table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + criteria?: Excel.FilterCriteria; + } + /** An interface describing the data returned by calling `autoFilter.toJSON()`. */ + interface AutoFilterData { + /** + * An array that holds all the filter criteria in the autofiltered range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + criteria?: Excel.FilterCriteria[]; + /** + * Specifies if the AutoFilter is enabled. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enabled?: boolean; + /** + * Specifies if the AutoFilter has filter criteria. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isDataFiltered?: boolean; + } + /** An interface describing the data returned by calling `cultureInfo.toJSON()`. */ + interface CultureInfoData { + /** + * Defines the culturally appropriate format of displaying date and time. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + datetimeFormat?: Excel.Interfaces.DatetimeFormatInfoData; + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + numberFormat?: Excel.Interfaces.NumberFormatInfoData; + /** + * Gets the culture name in the format languagecode2-country/regioncode2 (e.g., "zh-cn" or "en-us"). This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + name?: string; + } + /** An interface describing the data returned by calling `numberFormatInfo.toJSON()`. */ + interface NumberFormatInfoData { + /** + * Gets the currency symbol for currency values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + currencySymbol?: string; + /** + * Gets the string used as the decimal separator for numeric values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + numberDecimalSeparator?: string; + /** + * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + numberGroupSeparator?: string; + } + /** An interface describing the data returned by calling `datetimeFormatInfo.toJSON()`. */ + interface DatetimeFormatInfoData { + /** + * Gets the string used as the date separator. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + dateSeparator?: string; + /** + * Gets the format string for a long date value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + longDatePattern?: string; + /** + * Gets the format string for a long time value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + longTimePattern?: string; + /** + * Gets the format string for a short date value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + shortDatePattern?: string; + /** + * Gets the string used as the time separator. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + timeSeparator?: string; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: string; + /** + * The custom XML part's namespace URI. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: string; + } + /** An interface describing the data returned by calling `pivotTableScopedCollection.toJSON()`. */ + interface PivotTableScopedCollectionData { + items?: Excel.Interfaces.PivotTableData[]; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + columnHierarchies?: Excel.Interfaces.RowColumnPivotHierarchyData[]; + /** + * The Data Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataHierarchies?: Excel.Interfaces.DataPivotHierarchyData[]; + /** + * The Filter Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + filterHierarchies?: Excel.Interfaces.FilterPivotHierarchyData[]; + /** + * The Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + hierarchies?: Excel.Interfaces.PivotHierarchyData[]; + /** + * The Row Pivot Hierarchies of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + rowHierarchies?: Excel.Interfaces.RowColumnPivotHierarchyData[]; + /** + * Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + allowMultipleFiltersPerField?: boolean; + /** + * Specifies if the PivotTable allows values in the data body to be edited by the user. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableDataValueEditing?: boolean; + /** + * ID of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: string; + /** + * Name of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + name?: string; + /** + * Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + refreshOnOpen?: boolean; + /** + * Specifies if the PivotTable uses custom lists when sorting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useCustomSortLists?: boolean; + } + /** An interface describing the data returned by calling `pivotLayout.toJSON()`. */ + interface PivotLayoutData { + /** + * The style applied to the PivotTable. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pivotStyle?: Excel.Interfaces.PivotTableStyleData; + /** + * The alt text description of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextDescription?: string; + /** + * The alt text title of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextTitle?: string; + /** + * Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFormat?: boolean; + /** + * The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. + Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. + By default, this is an empty string. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + emptyCellText?: string; + /** + * Specifies if the field list can be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + enableFieldList?: boolean; + /** + * Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. + Note that the value of `emptyCellText` persists when this property is set to `false`. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + fillEmptyCells?: boolean; + /** + * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layoutType?: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; + /** + * Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + preserveFormatting?: boolean; + /** + * Specifies if the PivotTable report shows grand totals for columns. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showColumnGrandTotals?: boolean; + /** + * Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + showFieldHeaders?: boolean; + /** + * Specifies if the PivotTable report shows grand totals for rows. + * + * @remarks + * [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`. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + fields?: Excel.Interfaces.PivotFieldData[]; + /** + * ID of the PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * Name of the PivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + fields?: Excel.Interfaces.PivotFieldData[]; + /** + * ID of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * Name of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Position of the RowColumnPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + fields?: Excel.Interfaces.PivotFieldData[]; + /** + * Determines whether to allow multiple filter items. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems?: boolean; + /** + * ID of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * Name of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Position of the FilterPivotHierarchy. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + field?: Excel.Interfaces.PivotFieldData; + /** + * ID of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * Name of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Number format of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * Position of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: number; + /** + * Specifies if the data should be shown as a specific summary calculation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAs?: Excel.ShowAsRule; + /** + * Specifies if all items of the DataPivotHierarchy are shown. + * + * @remarks + * [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 PivotItems associated with the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + items?: Excel.Interfaces.PivotItemData[]; + /** + * ID of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * Name of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Determines whether to show all items of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAllItems?: boolean; + /** + * Subtotals of the PivotField. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isExpanded?: boolean; + /** + * Name of the PivotItem. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * Specifies if the PivotItem is visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling `worksheetCustomProperty.toJSON()`. */ + interface WorksheetCustomPropertyData { + /** + * Gets the key of the custom property. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + key?: string; + /** + * Gets or sets the value of the custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + value?: string; + } + /** An interface describing the data returned by calling `worksheetCustomPropertyCollection.toJSON()`. */ + interface WorksheetCustomPropertyCollectionData { + items?: Excel.Interfaces.WorksheetCustomPropertyData[]; + } + /** An interface describing the data returned by calling `documentProperties.toJSON()`. */ + interface DocumentPropertiesData { + /** + * Gets the collection of custom properties of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + custom?: Excel.Interfaces.CustomPropertyData[]; + /** + * The author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + author?: string; + /** + * The category of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + category?: string; + /** + * The comments of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + comments?: string; + /** + * The company of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + company?: string; + /** + * Gets the creation date of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + creationDate?: Date; + /** + * The keywords of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + keywords?: string; + /** + * Gets the last author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + lastAuthor?: string; + /** + * The manager of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + manager?: string; + /** + * Gets the revision number of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + revisionNumber?: number; + /** + * The subject of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + subject?: string; + /** + * The title of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + title?: string; + } + /** An interface describing the data returned by calling `customProperty.toJSON()`. */ + interface CustomPropertyData { + /** + * The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + key?: string; + /** + * The type of the value used for the custom property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: Excel.DocumentPropertyType | "Number" | "Boolean" | "Date" | "String" | "Float"; + /** + * The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatData; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatData; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatData; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatData; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatData; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatData; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatData; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatData; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatData; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatData; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatData; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatData; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatData; + /** + * The priority of the conditional format in the current `ConditionalFormatCollection`. + * + * @remarks + * [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 the 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. + * + * @remarks + * [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. + Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + /** + * A type of conditional format. Only one can be set at a time. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatData; + /** + * Representation of all values to the right of the axis in an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatData; + /** + * HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no axis is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisColor?: string; + /** + * Representation of how the axis is determined for an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisFormat?: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; + /** + * Specifies the direction that the data bar graphic should be based on. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: Excel.ConditionalDataBarRule; + /** + * If `true`, hides the values from the cells where the data bar is applied. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * Specifies if the data bar has a gradient. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * Specifies if the negative data bar has the same border color as the positive data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * Specifies if the negative data bar has the same fill color as the positive data bar. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * Specifies the `Rule` object on this conditional format. + * + * @remarks + * [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, on which to evaluate the conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * The formula, if required, on which to evaluate the conditional format rule in the user's language. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: string; + /** + * The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formulaR1C1?: string; + } + /** An interface describing the data returned by calling `iconSetConditionalFormat.toJSON()`. */ + interface IconSetConditionalFormatData { + /** + * An array of criteria and icon sets 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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + criteria?: Excel.ConditionalIconCriterion[]; + /** + * If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * If `true`, hides the values and only shows icons. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * If set, displays the icon set option for the conditional format. + * + * @remarks + * [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. + * + * @remarks + * [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). + * + * @remarks + * [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 format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * The criteria of the top/bottom conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * The rule of the conditional format. + * + * @remarks + * [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 format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * The rule of the conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * Specifies the rule object on this conditional format. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderData[]; + /** + * Returns the fill object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillData; + /** + * Returns the font object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontData; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + Cleared if `null` is passed in. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + numberFormat?: any; + } + /** An interface describing the data returned by calling `conditionalRangeFont.toJSON()`. */ + interface ConditionalRangeFontData { + /** + * Specifies if the font is bold. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * Specifies if the font is italic. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * Specifies the strikethrough status of the font. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * Constant value that indicates the specific side of the border. See `Excel.ConditionalRangeBorderIndex` for details. + * + * @remarks + * [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. + * + * @remarks + * [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 collection of four border objects that represent the style of the four borders. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderData[]; + /** + * The fill of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillData; + /** + * A `Font` object that represents the font of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontData; + /** + * Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoIndent?: boolean; + /** + * Specifies if the style is a built-in style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + builtIn?: boolean; + /** + * Specifies if the formula will be hidden when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * Specifies if the style includes the color, color index, line style, and weight border properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * Specifies if the style includes the number format property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * Specifies if the style includes the formula hidden and locked protection properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * An integer from 0 to 250 that indicates the indent level for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + indentLevel?: number; + /** + * Specifies if the object is locked when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * The name of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * The format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormat?: string; + /** + * The localized format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: string; + /** + * The reading order for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * The text orientation for the style. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * Specifies if Excel wraps the text in the object. + * + * @remarks + * [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 `tableStyleCollection.toJSON()`. */ + interface TableStyleCollectionData { + items?: Excel.Interfaces.TableStyleData[]; + } + /** An interface describing the data returned by calling `tableStyle.toJSON()`. */ + interface TableStyleData { + /** + * Specifies the name of the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + /** + * Specifies if this `TableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** An interface describing the data returned by calling `pivotTableStyleCollection.toJSON()`. */ + interface PivotTableStyleCollectionData { + items?: Excel.Interfaces.PivotTableStyleData[]; + } + /** An interface describing the data returned by calling `pivotTableStyle.toJSON()`. */ + interface PivotTableStyleData { + /** + * Specifies the name of the PivotTable style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + /** + * Specifies if this `PivotTableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** An interface describing the data returned by calling `slicerStyleCollection.toJSON()`. */ + interface SlicerStyleCollectionData { + items?: Excel.Interfaces.SlicerStyleData[]; + } + /** An interface describing the data returned by calling `slicerStyle.toJSON()`. */ + interface SlicerStyleData { + /** + * Specifies the name of the slicer style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + /** + * Specifies if this `SlicerStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** An interface describing the data returned by calling `timelineStyleCollection.toJSON()`. */ + interface TimelineStyleCollectionData { + items?: Excel.Interfaces.TimelineStyleData[]; + } + /** An interface describing the data returned by calling `timelineStyle.toJSON()`. */ + interface TimelineStyleData { + /** + * Specifies the name of the timeline style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + /** + * Specifies if this `TimelineStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** An interface describing the data returned by calling `pageLayout.toJSON()`. */ + interface PageLayoutData { + /** + * Header and footer configuration for the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headersFooters?: Excel.Interfaces.HeaderFooterGroupData; + /** + * The worksheet's black and white print option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + blackAndWhite?: boolean; + /** + * The worksheet's bottom page margin to use for printing in points. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin?: number; + /** + * The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHorizontally?: boolean; + /** + * The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerVertically?: boolean; + /** + * The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + draftMode?: boolean; + /** + * The worksheet's first page number to print. A `null` value represents "auto" page numbering. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPageNumber?: number | ""; + /** + * The worksheet's footer margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + footerMargin?: number; + /** + * The worksheet's header margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headerMargin?: number; + /** + * The worksheet's left margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin?: number; + /** + * The worksheet's orientation of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation?: Excel.PageOrientation | "Portrait" | "Landscape"; + /** + * The worksheet's paper size of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"; + /** + * Specifies if the worksheet's comments should be displayed when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printComments?: Excel.PrintComments | "NoComments" | "EndSheet" | "InPlace"; + /** + * The worksheet's print errors option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printErrors?: Excel.PrintErrorType | "AsDisplayed" | "Blank" | "Dash" | "NotAvailable"; + /** + * Specifies if the worksheet's gridlines will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printGridlines?: boolean; + /** + * Specifies if the worksheet's headings will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printHeadings?: boolean; + /** + * The worksheet's page print order option. This specifies the order to use for processing the page number printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printOrder?: Excel.PrintOrder | "DownThenOver" | "OverThenDown"; + /** + * The worksheet's right margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin?: number; + /** + * The worksheet's top margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin?: number; + /** + * The worksheet's print zoom options. + The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zoom?: Excel.PageLayoutZoomOptions; + } + /** An interface describing the data returned by calling `headerFooter.toJSON()`. */ + interface HeaderFooterData { + /** + * The center footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerFooter?: string; + /** + * The center header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHeader?: string; + /** + * The left footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftFooter?: string; + /** + * The left header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftHeader?: string; + /** + * The right footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightFooter?: string; + /** + * The right header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + defaultForAllPages?: Excel.Interfaces.HeaderFooterData; + /** + * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + evenPages?: Excel.Interfaces.HeaderFooterData; + /** + * The first page header/footer, for all other pages general or even/odd is used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPage?: Excel.Interfaces.HeaderFooterData; + /** + * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + oddPages?: Excel.Interfaces.HeaderFooterData; + /** + * The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useSheetScale?: boolean; + } + /** An interface describing the data returned by calling `pageBreak.toJSON()`. */ + interface PageBreakData { + /** + * Specifies the column index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + columnIndex?: number; + /** + * Specifies the row index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 `rangeAreasCollection.toJSON()`. */ + interface RangeAreasCollectionData { + items?: Excel.Interfaces.RangeAreasData[]; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + replies?: Excel.Interfaces.CommentReplyData[]; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorEmail?: string; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorName?: string; + /** + * The comment's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: string; + /** + * Gets the content type of the comment. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + contentType?: Excel.ContentType | "Plain" | "Mention"; + /** + * Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + creationDate?: Date; + /** + * Specifies the comment identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: string; + /** + * Gets the entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: Excel.CommentMention[]; + /** + * The comment thread status. A value of `true` means that the comment thread is resolved. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + /** + * Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent?: string; + } + /** 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 { + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorEmail?: string; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorName?: string; + /** + * The comment reply's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: string; + /** + * The content type of the reply. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + contentType?: Excel.ContentType | "Plain" | "Mention"; + /** + * Gets the creation time of the comment reply. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + creationDate?: Date; + /** + * Specifies the comment reply identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: string; + /** + * The entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: Excel.CommentMention[]; + /** + * The comment reply status. A value of `true` means the reply is in the resolved state. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + /** + * The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent?: string; + } + /** 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 this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.Interfaces.ShapeFillData; + /** + * Returns the line formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatData; + /** + * Specifies the alternative description text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextDescription?: string; + /** + * Specifies the alternative title text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextTitle?: string; + /** + * Returns the number of connection sites on this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectionSiteCount?: number; + /** + * Gets the display name of the shape. A newly created shape has a generated name + that is localized and may not match its `name`. In this scenario, you can use + this API to get the name that is displayed in the UI. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + displayName?: string; + /** + * Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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"; + /** + * Specifies the height, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + height?: number; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: string; + /** + * The distance, in points, from the left side of the shape to the left side of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: number; + /** + * Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: number; + /** + * Specifies if the aspect ratio of this shape is locked. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lockAspectRatio?: boolean; + /** + * Specifies the name of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: string; + /** + * Represents how the object is attached to the cells below it. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + placement?: Excel.Placement | "TwoCell" | "OneCell" | "Absolute"; + /** + * Specifies the rotation, in degrees, of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rotation?: number; + /** + * The distance, in points, from the top edge of the shape to the top edge of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: number; + /** + * Returns the type of this shape. See `Excel.ShapeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: Excel.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line"; + /** + * Specifies if the shape is visible. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: number; + /** + * Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zOrderPosition?: number; + } + /** An interface describing the data returned by calling `geometricShape.toJSON()`. */ + interface GeometricShapeData { + /** + * Returns the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: string; + } + /** An interface describing the data returned by calling `image.toJSON()`. */ + interface ImageData { + /** + * Specifies the shape identifier for the image object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: string; + /** + * Returns the format of the image. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.PictureFormat | "UNKNOWN" | "BMP" | "JPEG" | "GIF" | "PNG" | "SVG"; + } + /** An interface describing the data returned by calling `shapeGroup.toJSON()`. */ + interface ShapeGroupData { + /** + * Returns the collection of `Shape` objects. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shapes?: Excel.Interfaces.ShapeData[]; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 `line.toJSON()`. */ + interface LineData { + /** + * Represents the length of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadLength?: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; + /** + * Represents the style of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadStyle?: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; + /** + * Represents the width of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadWidth?: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; + /** + * Represents the connection site to which the beginning of a connector is connected. Returns `null` when the beginning of the line is not attached to any shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginConnectedSite?: number; + /** + * Represents the length of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadLength?: Excel.ArrowheadLength | "Short" | "Medium" | "Long"; + /** + * Represents the style of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadStyle?: Excel.ArrowheadStyle | "None" | "Triangle" | "Stealth" | "Diamond" | "Oval" | "Open"; + /** + * Represents the width of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadWidth?: Excel.ArrowheadWidth | "Narrow" | "Medium" | "Wide"; + /** + * Represents the connection site to which the end of a connector is connected. Returns `null` when the end of the line is not attached to any shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endConnectedSite?: number; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: string; + /** + * Specifies if the beginning of the specified line is connected to a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isBeginConnected?: boolean; + /** + * Specifies if the end of the specified line is connected to a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isEndConnected?: boolean; + /** + * Represents the connector type for the line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectorType?: Excel.ConnectorType | "Straight" | "Elbow" | "Curve"; + } + /** An interface describing the data returned by calling `shapeFill.toJSON()`. */ + interface ShapeFillData { + /** + * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + foregroundColor?: string; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency?: number; + /** + * Returns the fill type of the shape. See `Excel.ShapeFillType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: Excel.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "Mixed"; + } + /** An interface describing the data returned by calling `shapeLineFormat.toJSON()`. */ + interface ShapeLineFormatData { + /** + * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashStyle?: Excel.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: Excel.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency?: number; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + weight?: number; + } + /** An interface describing the data returned by calling `textFrame.toJSON()`. */ + interface TextFrameData { + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeSetting?: Excel.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin?: number; + /** + * Specifies if the text frame contains text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + hasText?: boolean; + /** + * Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalAlignment?: Excel.ShapeTextHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; + /** + * Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalOverflow?: Excel.ShapeTextHorizontalOverflow | "Overflow" | "Clip"; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin?: number; + /** + * Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation?: Excel.ShapeTextOrientation | "Horizontal" | "Vertical" | "Vertical270" | "WordArtVertical" | "EastAsianVertical" | "MongolianVertical" | "WordArtVerticalRTL"; + /** + * Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder?: Excel.ShapeTextReadingOrder | "LeftToRight" | "RightToLeft"; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin?: number; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin?: number; + /** + * Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalAlignment?: Excel.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom" | "Justified" | "Distributed"; + /** + * Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalOverflow?: Excel.ShapeTextVerticalOverflow | "Overflow" | "Ellipsis" | "Clip"; + } + /** 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + font?: Excel.Interfaces.ShapeFontData; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + text?: string; + } + /** An interface describing the data returned by calling `shapeFont.toJSON()`. */ + interface ShapeFontData { + /** + * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: string; + /** + * Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + italic?: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: string; + /** + * Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + size?: number; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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 `slicer.toJSON()`. */ + interface SlicerData { + /** + * Represents the collection of slicer items that are part of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + slicerItems?: Excel.Interfaces.SlicerItemData[]; + /** + * The style applied to the slicer. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + slicerStyle?: Excel.Interfaces.SlicerStyleData; + /** + * Represents the worksheet containing the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * Represents the caption of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + caption?: string; + /** + * Represents the height, in points, of the slicer. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: number; + /** + * Represents the unique ID of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: string; + /** + * Value is `true` if all filters currently applied on the slicer are cleared. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isFilterCleared?: boolean; + /** + * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: number; + /** + * Represents the name of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + /** + * Represents the slicer name used in the formula. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula?: string; + /** + * Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + sortBy?: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"; + /** + * Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + style?: string; + /** + * Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: number; + /** + * Represents the width, in points, of the slicer. + Throws an `InvalidArgument` error when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: number; + } + /** An interface describing the data returned by calling `slicerCollection.toJSON()`. */ + interface SlicerCollectionData { + items?: Excel.Interfaces.SlicerData[]; + } + /** An interface describing the data returned by calling `slicerItem.toJSON()`. */ + interface SlicerItemData { + /** + * Value is `true` if the slicer item has data. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + hasData?: boolean; + /** + * Value is `true` if the slicer item is selected. + Setting this value will not clear the selected state of other slicer items. + By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSelected?: boolean; + /** + * Represents the unique value representing the slicer item. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + key?: string; + /** + * Represents the title displayed in the Excel UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: string; + } + /** An interface describing the data returned by calling `slicerItemCollection.toJSON()`. */ + interface SlicerItemCollectionData { + items?: Excel.Interfaces.SlicerItemData[]; + } + /** An interface describing the data returned by calling `linkedDataType.toJSON()`. */ + interface LinkedDataTypeData { + /** + * The name of the data provider for the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dataProvider?: string; + /** + * The local time-zone date and time since the workbook was opened when the linked data type was last refreshed. + Returns `undefined` if the linked data type has not been refreshed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lastRefreshed?: Date; + /** + * The name of the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: string; + /** + * The frequency, in seconds, at which the linked data type is refreshed if `refreshMode` is set to "Periodic". + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + periodicRefreshInterval?: number; + /** + * The mechanism by which the data for the linked data type is retrieved. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshMode?: Excel.LinkedDataTypeRefreshMode | "Unknown" | "Manual" | "OnLoad" | "Periodic"; + /** + * The unique ID of the linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceId?: number; + /** + * Returns an array with all the refresh modes supported by the linked data type. The contents of the array may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + supportedRefreshModes?: Excel.LinkedDataTypeRefreshMode[]; + } + /** An interface describing the data returned by calling `linkedDataTypeCollection.toJSON()`. */ + interface LinkedDataTypeCollectionData { + items?: Excel.Interfaces.LinkedDataTypeData[]; + } + /** An interface describing the data returned by calling `namedSheetView.toJSON()`. */ + interface NamedSheetViewData { + /** + * Gets or sets the name of the sheet view. + The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + name?: string; + } + /** An interface describing the data returned by calling `namedSheetViewCollection.toJSON()`. */ + interface NamedSheetViewCollectionData { + items?: Excel.Interfaces.NamedSheetViewData[]; + } + /** 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. + * + * @remarks + * [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). + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + value?: T; + } + /** + * Represents an `AllowEditRange` object found in a worksheet. This object works with worksheet protection properties. + When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface AllowEditRangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the range associated with the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + address?: boolean; + /** + * Specifies if the object is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPasswordProtected?: boolean; + /** + * Specifies the title of the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. + If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + title?: boolean; + } + /** + * Represents the set of `AllowEditRange` objects found in a worksheet. `AllowEditRange` objects work with worksheet protection properties. + When worksheet protection is enabled, an `AllowEditRange` object can be used to allow editing of a specific range, while maintaining protection on the rest of the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface AllowEditRangeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the range associated with the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the range. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + address?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the object is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPasswordProtected?: boolean; + /** + * For EACH ITEM in the collection: Specifies the title of the object. + Worksheet protection must be disabled or paused for this method to work properly. + If worksheet protection is enabled and not paused, this method throws an `AccessDenied` error and fails to set the title. + If there is already an existing `AllowEditRange` with the same string, or if the string is `null` or empty (""), then this method throws an `InvalidArgument` error and fails to set the title. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + title?: boolean; + } + /** + * Represents a Power Query query. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + interface QueryLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the query error message from when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + error?: boolean; + /** + * Gets the query loaded to object type. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + loadedTo?: boolean; + /** + * Specifies if the query loaded to the data model. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + loadedToDataModel?: boolean; + /** + * Gets the name of the query. + Query names cannot contain periods or quotation marks. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + name?: boolean; + /** + * Gets the date and time when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + refreshDate?: boolean; + /** + * Gets the number of rows that were loaded when the query was last refreshed. + If last refresh has errors the value will be -1. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + rowsLoadedCount?: boolean; + } + /** + * Represents the collection of queries in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + interface QueryCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the query error message from when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + error?: boolean; + /** + * For EACH ITEM in the collection: Gets the query loaded to object type. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + loadedTo?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the query loaded to the data model. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + loadedToDataModel?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the query. + Query names cannot contain periods or quotation marks. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Gets the date and time when the query was last refreshed. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + refreshDate?: boolean; + /** + * For EACH ITEM in the collection: Gets the number of rows that were loaded when the query was last refreshed. + If last refresh has errors the value will be -1. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + rowsLoadedCount?: boolean; + } + /** + * Contains information about a linked workbook. + If a workbook has links pointing to data in another workbook, the second workbook is linked to the first workbook. + In this scenario, the second workbook is called the "linked workbook". + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface LinkedWorkbookLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + id?: boolean; + } + /** + * Represents a collection of linked workbook objects. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface LinkedWorkbookCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The original URL pointing to the linked workbook. It is unique across all linked workbooks in the collection. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + id?: boolean; + } + /** + * Represents a recorded change to the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DocumentTaskChangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the user assigned to the task for an `assign` change action, or the user unassigned from the task for an `unassign` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignee?: boolean; + /** + * Represents the identity of the user who made the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + changedBy?: boolean; + /** + * Represents the ID of the comment or commentReply to which the task change is anchored. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + commentId?: boolean; + /** + * Represents creation date and time of the task change record. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: boolean; + /** + * Represents the task's due date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the due date and time. It should be set together with `startDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dueDateTime?: boolean; + /** + * The unique GUID of the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * Represents the task's completion percentage. It is used for the `setPercentComplete` change action. + This is a value betwen 0 and 100, where 100 represents a completed task.Changing this value to 100 also completes the associated comment.Changing the completion from 100 to a lower value reactivates the associated comment. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: boolean; + /** + * Represents the task's priority. It is used for the `setPriority` change action. + This is a value between 0 and 10, with 5 being the default priority if not set, and where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: boolean; + /** + * Represents the task's start date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the start date and time. It should be set together with `dueDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startDateTime?: boolean; + /** + * Represents the task's title. It is used for `setTitle` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: boolean; + /** + * Represents the action type of the task change record. Some examples of action types are assign, undo, and setPriority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: boolean; + /** + * Represents the `DocumentTaskChange.id` property that was undone for the `undo` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + undoChangeId?: boolean; + } + /** + * Represents a collection of change records for a task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DocumentTaskChangeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the user assigned to the task for an `assign` change action, or the user unassigned from the task for an `unassign` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignee?: boolean; + /** + * For EACH ITEM in the collection: Represents the identity of the user who made the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + changedBy?: boolean; + /** + * For EACH ITEM in the collection: Represents the ID of the comment or commentReply to which the task change is anchored. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + commentId?: boolean; + /** + * For EACH ITEM in the collection: Represents creation date and time of the task change record. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: boolean; + /** + * For EACH ITEM in the collection: Represents the task's due date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the due date and time. It should be set together with `startDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dueDateTime?: boolean; + /** + * For EACH ITEM in the collection: The unique GUID of the task change. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Represents the task's completion percentage. It is used for the `setPercentComplete` change action. + This is a value betwen 0 and 100, where 100 represents a completed task.Changing this value to 100 also completes the associated comment.Changing the completion from 100 to a lower value reactivates the associated comment. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: boolean; + /** + * For EACH ITEM in the collection: Represents the task's priority. It is used for the `setPriority` change action. + This is a value between 0 and 10, with 5 being the default priority if not set, and where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: boolean; + /** + * For EACH ITEM in the collection: Represents the task's start date and time. It is used for the `setSchedule` change action. + It is in UTC time zone.It can be set to `null` to remove the start date and time. It should be set together with `dueDateTime` to avoid conflicts. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startDateTime?: boolean; + /** + * For EACH ITEM in the collection: Represents the task's title. It is used for `setTitle` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: boolean; + /** + * For EACH ITEM in the collection: Represents the action type of the task change record. Some examples of action types are assign, undo, and setPriority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Represents the `DocumentTaskChange.id` property that was undone for the `undo` change action. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + undoChangeId?: boolean; + } + /** + * Represents a task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DocumentTaskLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the comment associated with the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + comment?: Excel.Interfaces.CommentLoadOptions; + /** + * Returns a collection of assignees of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignees?: boolean; + /** + * Gets the most recent user to have completed the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completedBy?: boolean; + /** + * Gets the date and time that the task was completed. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completedDateTime?: boolean; + /** + * Gets the user who created the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdBy?: boolean; + /** + * Gets the date and time that the task was created. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: boolean; + /** + * Gets the ID of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: boolean; + /** + * Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: boolean; + /** + * Gets or sets the date and time the task should start and is due. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startAndDueDateTime?: boolean; + /** + * Specifies title of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: boolean; + } + /** + * Represents a collection of tasks. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface DocumentTaskCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the comment associated with the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + comment?: Excel.Interfaces.CommentLoadOptions; + /** + * For EACH ITEM in the collection: Returns a collection of assignees of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + assignees?: boolean; + /** + * For EACH ITEM in the collection: Gets the most recent user to have completed the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completedBy?: boolean; + /** + * For EACH ITEM in the collection: Gets the date and time that the task was completed. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completedDateTime?: boolean; + /** + * For EACH ITEM in the collection: Gets the user who created the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdBy?: boolean; + /** + * For EACH ITEM in the collection: Gets the date and time that the task was created. All dates are in UTC. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + createdDateTime?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Specifies the completion percentage of the task. This is a value between 0 and 100, where 100 represents a completed task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + percentComplete?: boolean; + /** + * For EACH ITEM in the collection: Specifies the priority of the task. This is a value between 0 and 10, where 0 represents the highest priority. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + priority?: boolean; + /** + * For EACH ITEM in the collection: Gets or sets the date and time the task should start and is due. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + startAndDueDateTime?: boolean; + /** + * For EACH ITEM in the collection: Specifies title of the task. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + title?: boolean; + } + /** + * Represents the Excel Runtime class. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + interface RuntimeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Toggle JavaScript events in the current task pane or content add-in. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableEvents?: boolean; + } + /** + * Represents the Excel application that manages the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ApplicationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + cultureInfo?: Excel.Interfaces.CultureInfoLoadOptions; + /** + * Returns the iterative calculation settings. + In Excel on Windows and Mac, the settings will apply to the Excel Application. + In Excel on the web and other platforms, the settings will apply to the active workbook. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + iterativeCalculation?: Excel.Interfaces.IterativeCalculationLoadOptions; + /** + * Returns the Excel calculation engine version used for the last full recalculation. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode?: boolean; + /** + * Returns the calculation state of the application. See `Excel.CalculationState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + calculationState?: boolean; + /** + * Gets the string used as the decimal separator for numeric values. This is based on the local Excel settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + decimalSeparator?: boolean; + /** + * Specifies whether the "Format Stale values" button under Calculation Options is turned on or off. + The stale formulas are rendered with stale formatting if the button is turned on. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + formatStaleValues?: boolean; + /** + * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on the local Excel settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + thousandsSeparator?: boolean; + /** + * Specifies if the system separators of Excel are enabled. + System separators include the decimal separator and thousands separator. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + useSystemSeparators?: boolean; + } + /** + * Represents the iterative calculation settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface IterativeCalculationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * True if Excel will use iteration to resolve circular references. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enabled?: boolean; + /** + * Specifies the maximum amount of change between each iteration as Excel resolves circular references. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxChange?: boolean; + /** + * Specifies the maximum number of iterations that Excel can use to resolve a circular reference. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + maxIteration?: boolean; + } + /** + * Workbook is the top level object which contains related workbook objects such as worksheets, tables, and ranges. + To learn more about the workbook object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-workbooks | Work with workbooks using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface WorkbookLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the Excel application instance that contains this workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + application?: Excel.Interfaces.ApplicationLoadOptions; + /** + * Represents a collection of bindings that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bindings?: Excel.Interfaces.BindingCollectionLoadOptions; + /** + * Returns a collection of linked workbooks. In formulas, the workbook links can be used to reference data (cell values and names) outside of the current workbook. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + linkedWorkbooks?: Excel.Interfaces.LinkedWorkbookCollectionLoadOptions; + /** + * Gets the workbook properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + properties?: Excel.Interfaces.DocumentPropertiesLoadOptions; + /** + * Returns the protection object for a workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + protection?: Excel.Interfaces.WorkbookProtectionLoadOptions; + /** + * Represents a collection of tables associated with the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * Specifies if the workbook is in AutoSave mode. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSave?: boolean; + /** + * Returns a number about the version of Excel Calculation Engine. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + chartDataPointTrack?: boolean; + /** + * Specifies if changes have been made since the workbook 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isDirty?: boolean; + /** + * Gets the workbook name. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * Specifies if the workbook has ever been saved locally or online. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + previouslySaved?: boolean; + /** + * Returns `true` if the workbook is open in read-only mode. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + readOnly?: boolean; + /** + * Specifies whether the PivotTable's field list pane is shown at the workbook level. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showPivotFieldList?: boolean; + /** + * True if the workbook uses the 1904 date system. + * + * @remarks + * [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`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + usePrecisionAsDisplayed?: boolean; + } + /** + * Represents the protection of a workbook object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface WorkbookProtectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if the workbook is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + protected?: boolean; + } + /** + * An Excel worksheet is a grid of cells. It can contain data, tables, charts, etc. + To learn more about the worksheet object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-worksheets | Work with worksheets using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface WorksheetLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the `AutoFilter` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * Returns a collection of charts that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartCollectionLoadOptions; + /** + * Gets the `PageLayout` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pageLayout?: Excel.Interfaces.PageLayoutLoadOptions; + /** + * Returns the sheet protection object for a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionLoadOptions; + /** + * Collection of tables that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * Determines if Excel should recalculate the worksheet when necessary. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * The display name of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * The zero-based position of the worksheet within the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * Specifies if gridlines are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showGridlines?: boolean; + /** + * Specifies if headings are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showHeadings?: boolean; + /** + * Returns the standard (default) height of all the rows in the worksheet, in points. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardHeight?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardWidth?: boolean; + /** + * The tab color of the worksheet. + 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 #RRGGBB (e.g., "FFA500"). + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tabColor?: boolean; + /** + * Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + tabId?: boolean; + /** + * The visibility of the worksheet. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface WorksheetCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the `AutoFilter` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * For EACH ITEM in the collection: Returns a collection of charts that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the `PageLayout` object of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pageLayout?: Excel.Interfaces.PageLayoutLoadOptions; + /** + * For EACH ITEM in the collection: Returns the sheet protection object for a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionLoadOptions; + /** + * For EACH ITEM in the collection: Collection of tables that are part of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Determines if Excel should recalculate the worksheet when necessary. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The display name of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: The zero-based position of the worksheet within the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * For EACH ITEM in the collection: Specifies if gridlines are visible to the user. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showGridlines?: boolean; + /** + * For EACH ITEM in the collection: Specifies if headings are visible to the user. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardHeight?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + standardWidth?: boolean; + /** + * For EACH ITEM in the collection: The tab color of the worksheet. + 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 #RRGGBB (e.g., "FFA500"). + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tabColor?: boolean; + /** + * For EACH ITEM in the collection: Returns a value representing this worksheet that can be read by Open Office XML. This is an integer value, which is different from `worksheet.id` (which returns a globally unique identifier) and `worksheet.name` (which returns a value such as "Sheet1"). + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + tabId?: boolean; + /** + * For EACH ITEM in the collection: The visibility of the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] + */ + visibility?: boolean; + } + /** + * Represents the protection of a worksheet object. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface WorksheetProtectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if protection can be paused for this worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + canPauseProtection?: boolean; + /** + * Specifies if the sheet is password protected. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPasswordProtected?: boolean; + /** + * Specifies if worksheet protection is paused. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + isPaused?: boolean; + /** + * Specifies the protection options for the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + options?: boolean; + /** + * Specifies if the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protected?: boolean; + /** + * Specifies the protection options saved in the worksheet. + This will return the same `WorksheetProtectionOptions` object regardless of the worksheet protection state. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + savedOptions?: boolean; + } + /** + * Range represents a set of one or more contiguous cells such as a cell, a row, a column, or a block of cells. + To learn more about how ranges are used throughout the API, start with {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-core-concepts#ranges | Ranges in the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface RangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a data validation object. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataValidation?: Excel.Interfaces.DataValidationLoadOptions; + /** + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * The worksheet containing the current range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + address?: boolean; + /** + * Represents the range reference for the specified range in the language of the user. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + addressLocal?: boolean; + /** + * Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + cellCount?: boolean; + /** + * Specifies the total number of columns in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnCount?: boolean; + /** + * Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * Specifies the column number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnIndex?: boolean; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: boolean; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + hasSpill?: boolean; + /** + * Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: boolean; + /** + * Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * Represents the hyperlink for the current range. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hyperlink?: boolean; + /** + * Represents if the current range is an entire column. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isEntireColumn?: boolean; + /** + * Represents if the current range is an entire row. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isEntireRow?: boolean; + /** + * Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: boolean; + /** + * Represents the data type state of each cell. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkedDataTypeState?: boolean; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + numberFormat?: boolean; + /** + * Represents the category of number format of each cell. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + numberFormatCategories?: boolean; + /** + * Represents Excel's number format code for the given range, based on the language settings of the user. + Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. + Any returned text uses the locally-formatted strings based on the language specified in the system settings. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * Returns the total number of rows in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rowCount?: boolean; + /** + * Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHidden?: boolean; + /** + * Returns the row number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rowIndex?: boolean; + /** + * Represents if all the cells would be saved as an array formula. + Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. + Returns `null` if some cells would be saved as an array formula and some would not be. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + savedAsArray?: 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + style?: boolean; + /** + * Text values of the specified range. The text value will not depend on the cell width. The number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: boolean; + /** + * Specifies the type of data in each cell. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + valueTypes?: boolean; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + /** + * Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: boolean; + } + /** + * `RangeAreas` represents a collection of one or more rectangular ranges in the same worksheet. + To learn how to use discontiguous ranges, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-multiple-ranges | Work with multiple ranges simultaneously in Excel add-ins}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface RangeAreasLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a data validation object for all ranges in the `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dataValidation?: Excel.Interfaces.DataValidationLoadOptions; + /** + * Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * Returns the worksheet for the current `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Returns the `RangeAreas` 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"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + address?: boolean; + /** + * Returns the `RangeAreas` reference in the user locale. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + addressLocal?: boolean; + /** + * Returns the number of rectangular ranges that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + cellCount?: boolean; + /** + * Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isEntireColumn?: boolean; + /** + * Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: boolean; + } + /** + * Represents a collection of one or more rectangular ranges in multiple worksheets. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface WorkbookRangeAreasLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns an array of addresses in A1-style. Address values contain the worksheet name for each rectangular block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + addresses?: boolean; + } + /** + * RangeView represents a set of visible cells of the parent range. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + interface RangeViewLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the cell addresses of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: boolean; + /** + * The number of visible columns. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + columnCount?: boolean; + /** + * Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: boolean; + /** + * Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: boolean; + /** + * Returns a value that represents the index of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + index?: boolean; + /** + * Represents Excel's number format code for the given cell. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + numberFormat?: boolean; + /** + * The number of visible rows. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + text?: boolean; + /** + * Represents the type of data of each cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + values?: boolean; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + } + /** + * Represents a collection of `RangeView` objects. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + interface RangeViewCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the cell addresses of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: boolean; + /** + * For EACH ITEM in the collection: The number of visible columns. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + columnCount?: boolean; + /** + * For EACH ITEM in the collection: Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: boolean; + /** + * For EACH ITEM in the collection: Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: boolean; + /** + * For EACH ITEM in the collection: Returns a value that represents the index of the `RangeView`. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Represents Excel's number format code for the given cell. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + numberFormat?: boolean; + /** + * For EACH ITEM in the collection: The number of visible rows. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + text?: boolean; + /** + * For EACH ITEM in the collection: Represents the type of data of each cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `RangeView.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this range. + Unlike `RangeView.values`, `RangeView.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `RangeView.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: 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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + interface SettingCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The key that represents the ID of the setting. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Represents the value stored for this setting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + interface SettingLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The key that represents the ID of the setting. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + key?: boolean; + /** + * Represents the value stored for this setting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface NamedItemCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns an object containing values and types of the named item. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Returns the worksheet to which the named item is scoped. If the item is scoped to the workbook instead, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the comment associated with this name. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + comment?: boolean; + /** + * For EACH ITEM in the collection: The formula of the named item. Formulas always start with an equal sign ("="). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formula?: boolean; + /** + * For EACH ITEM in the collection: The name of the object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + scope?: boolean; + /** + * For EACH ITEM in the collection: Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJson?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJsonLocal?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the object is visible. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface NamedItemLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns an object containing values and types of the named item. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Returns the worksheet to which the named item is scoped. If the item is scoped to the workbook instead, then this method returns an object with its `isNullObject` property set to `true`. + For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Specifies the comment associated with this name. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + comment?: boolean; + /** + * The formula of the named item. Formulas always start with an equal sign ("="). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formula?: boolean; + /** + * The name of the object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * Specifies if the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. + * + * @remarks + * [Api set: ExcelApi 1.4] + */ + scope?: boolean; + /** + * Specifies the type of the value returned by the name's formula. See `Excel.NamedItemType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + /** + * A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItem.valueAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJson?: boolean; + /** + * A JSON representation of the values in this named item. + Unlike `NamedItem.value`, `NamedItem.valueAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItem.valueAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valueAsJsonLocal?: boolean; + /** + * Specifies if the object is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * Represents an object containing values and types of a named item. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface NamedItemArrayValuesLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the types for each item in the named item array + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + types?: boolean; + /** + * Represents the values of each item in the named item array. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + values?: boolean; + /** + * A JSON representation of the values in this named item array. + Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `NamedItemArrayValues.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * A JSON representation of the values in this named item array. + Unlike `NamedItemArrayValues.values`, `NamedItemArrayValues.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `NamedItemArrayValues.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + } + /** + * Represents an Office.js binding that is defined in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface BindingLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the binding identifier. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * Returns the type of the binding. See `Excel.BindingType` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + type?: boolean; + } + /** + * Represents the collection of all the binding objects that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface BindingCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the binding identifier. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Returns the type of the binding. See `Excel.BindingType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface TableCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the `AutoFilter` object of the table. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * For EACH ITEM in the collection: Represents a collection of all the columns in the table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Represents the sorting for the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * For EACH ITEM in the collection: The style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableStyle?: Excel.Interfaces.TableStyleLoadOptions; + /** + * For EACH ITEM in the collection: The worksheet containing the current table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies if the first column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the last column contains special formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Returns a numeric ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + legacyId?: boolean; + /** + * For EACH ITEM in the collection: Name of the table. + + The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the header row is visible. This value can be set to show or remove the header row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the total row is visible. This value can be set to show or remove the total row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * For EACH ITEM in the collection: Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface TableScopedCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the `AutoFilter` object of the table. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * For EACH ITEM in the collection: Represents a collection of all the columns in the table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Represents the sorting for the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * For EACH ITEM in the collection: The style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableStyle?: Excel.Interfaces.TableStyleLoadOptions; + /** + * For EACH ITEM in the collection: The worksheet containing the current table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies if the first column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the last column contains special formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Returns a numeric ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + legacyId?: boolean; + /** + * For EACH ITEM in the collection: Name of the table. + + The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the header row is visible. This value can be set to show or remove the header row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the total row is visible. This value can be set to show or remove the total row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * For EACH ITEM in the collection: Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + } + /** + * Represents an Excel table. + To learn more about the table object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables | Work with tables using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface TableLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the `AutoFilter` object of the table. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * Represents a collection of all the columns in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnCollectionLoadOptions; + /** + * Represents a collection of all the rows in the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * Represents the sorting for the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * The style applied to the table. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableStyle?: Excel.Interfaces.TableStyleLoadOptions; + /** + * The worksheet containing the current table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Specifies if the first column contains special formatting. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * Specifies if the last column contains special formatting. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * Returns a numeric ID. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + legacyId?: boolean; + /** + * Name of the table. + + The set name of the table must follow the guidelines specified in the {@link https://support.microsoft.com/office/fbf49a4f-82a3-43eb-8ba2-44d21233b114 | Rename an Excel table} article. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * Specifies if the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * Specifies if the header row is visible. This value can be set to show or remove the header row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * Specifies if the total row is visible. This value can be set to show or remove the total row. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * Constant value that represents the table style. Possible values are: "TableStyleLight1" through "TableStyleLight21", "TableStyleMedium1" through "TableStyleMedium28", "TableStyleDark1" through "TableStyleDark11". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + } + /** + * Represents a collection of all the columns that are part of the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface TableColumnCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Retrieves the filter applied to the column. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the table column. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + } + /** + * Represents a column in a table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface TableColumnLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Retrieves the filter applied to the column. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + filter?: Excel.Interfaces.FilterLoadOptions; + /** + * Returns a unique key that identifies the column within the table. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * Returns the index number of the column within the columns collection of the table. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * Specifies the name of the table column. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableColumn.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * A JSON representation of the values in the cells in this table column. + Unlike `TableColumn.values`, `TableColumn.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableColumn.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: 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 or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface TableRowCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the index number of the row within the rows collection of the table. Zero-indexed. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + } + /** + * Represents a row in a table. + + Note that unlike ranges or columns, which will adjust if new rows or columns are added before them, + a `TableRow` object represents 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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface TableRowLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the index number of the row within the rows collection of the table. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * Represents the raw values of the specified range. The data returned could be a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `TableRow.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * A JSON representation of the values in the cells in this table row. + Unlike `TableRow.values`, `TableRow.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `TableRow.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + } + /** + * Represents the data validation applied to the current range. + To learn more about the data validation object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-data-validation | Add data validation to Excel ranges}. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DataValidationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Error alert when user enters invalid data. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + errorAlert?: boolean; + /** + * Specifies if data validation will be performed on blank cells. Default is `true`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + ignoreBlanks?: boolean; + /** + * Prompt when users select a cell. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + prompt?: boolean; + /** + * Data validation rule that contains different type of data validation criteria. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + rule?: boolean; + /** + * Type of the data validation, see `Excel.DataValidationType` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + valid?: boolean; + } + /** + * Represents the results from `Range.removeDuplicates`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface RemoveDuplicatesResultLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Number of duplicated rows removed by the operation. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + removed?: boolean; + /** + * Number of remaining unique rows present in the resulting range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + uniqueRemaining?: boolean; + } + /** + * A format object encapsulating the range's font, fill, borders, alignment, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface RangeFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Collection of border objects that apply to the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * Returns the fill object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillLoadOptions; + /** + * Returns the font object defined on the overall range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * Returns the format protection object for a range. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionLoadOptions; + /** + * Specifies if text is automatically indented when text alignment is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoIndent?: boolean; + /** + * Specifies the width of all colums within the range. If the column widths are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnWidth?: boolean; + /** + * Represents the horizontal alignment for the specified object. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + horizontalAlignment?: boolean; + /** + * An integer from 0 to 250 that indicates the indent level. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + indentLevel?: boolean; + /** + * The reading order for the range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder?: boolean; + /** + * The height of all rows in the range. If the row heights are not uniform, `null` will be returned. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + rowHeight?: boolean; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shrinkToFit?: boolean; + /** + * 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. + * + * @remarks + * [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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardHeight?: boolean; + /** + * Specifies if 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. + Note: This property is only intended to be set to `true`. Setting it to `false` has no effect. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + useStandardWidth?: boolean; + /** + * Represents the vertical alignment for the specified object. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: boolean; + /** + * Specifies if Excel wraps the text in the object. A `null` value indicates that the entire range doesn't have a uniform wrap setting + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** + * Represents the format protection of a range object. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface FormatProtectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if Excel hides the formula for the cells in the range. A `null` value indicates that the entire range doesn't have a uniform formula hidden setting. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * Specifies if Excel locks the cells in the object. A `null` value indicates that the entire range doesn't have a uniform lock setting. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + locked?: boolean; + } + /** + * Represents the background of a range object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface RangeFillLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of the background, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * 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 a uniform pattern setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pattern?: boolean; + /** + * The HTML color code representing the color of the range pattern, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternColor?: boolean; + /** + * Specifies a double that lightens or darkens a pattern color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `patternTintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + patternTintAndShade?: boolean; + /** + * Specifies a double that lightens or darkens a color for the range fill. The value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A `null` value indicates that the range doesn't have uniform `tintAndShade` settings. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + } + /** + * Represents the border of an object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface RangeBorderLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * Constant value that indicates the specific side of the border. See `Excel.BorderIndex` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + /** + * Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + weight?: boolean; + } + /** + * Represents the border objects that make up the range border. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface RangeBorderCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500"), or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies a double that lightens or darkens a color for the 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 a uniform `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + /** + * For EACH ITEM in the collection: Specifies the weight of the border around a range. See `Excel.BorderWeight` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + weight?: boolean; + } + /** + * This object represents the font attributes (font name, font size, color, etc.) for an object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface RangeFontLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the bold status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * Specifies the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * Font name (e.g., "Calibri"). The name's length should not be greater than 31 characters. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * Font size. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size?: boolean; + /** + * Specifies the strikethrough status of font. A `null` value indicates that the entire range doesn't have a uniform strikethrough setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + strikethrough?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + subscript?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + superscript?: boolean; + /** + * Specifies a double that lightens or darkens a color for the 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 a uniform font `tintAndShade` setting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + tintAndShade?: boolean; + /** + * Type of underline applied to the font. See `Excel.RangeUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + underline?: boolean; + } + /** + * A collection of all the chart objects on a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents chart axes. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesLoadOptions; + /** + * For EACH ITEM in the collection: Represents the data labels on the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * For EACH ITEM in the collection: Encapsulates the format properties for the chart area. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatLoadOptions; + /** + * For EACH ITEM in the collection: Represents the legend for the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendLoadOptions; + /** + * For EACH ITEM in the collection: Encapsulates the options for a pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pivotOptions?: Excel.Interfaces.ChartPivotOptionsLoadOptions; + /** + * For EACH ITEM in the collection: Represents the plot area for the chart. + * + * @remarks + * [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. + * + * @remarks + * [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 formatting of the title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleLoadOptions; + /** + * For EACH ITEM in the collection: The worksheet containing the current chart. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies a chart category label level enumeration constant, referring to the level of the source category labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel?: boolean; + /** + * For EACH ITEM in the collection: Specifies the type of the chart. See `Excel.ChartType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the way that blank cells are plotted on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs?: boolean; + /** + * For EACH ITEM in the collection: Specifies the height, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: The unique ID of chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of a chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies the way columns or rows are used as data series on the chart. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly?: boolean; + /** + * For EACH ITEM in the collection: Specifies a chart series name level enumeration constant, referring to the level of the source series names. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether to display all field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. + If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum?: boolean; + /** + * For EACH ITEM in the collection: Specifies the chart style for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + width?: boolean; + } + /** + * Represents a chart object in a workbook. + To learn more about the chart object model, see {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-charts | Work with charts using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents chart axes. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesLoadOptions; + /** + * Represents the data labels on the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * Encapsulates the format properties for the chart area. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatLoadOptions; + /** + * Represents the legend for the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendLoadOptions; + /** + * Encapsulates the options for a pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + pivotOptions?: Excel.Interfaces.ChartPivotOptionsLoadOptions; + /** + * Represents the plot area for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotArea?: Excel.Interfaces.ChartPlotAreaLoadOptions; + /** + * Represents either a single series or collection of series in the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + series?: Excel.Interfaces.ChartSeriesCollectionLoadOptions; + /** + * Represents the title of the specified chart, including the text, visibility, position, and formatting of the title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleLoadOptions; + /** + * The worksheet containing the current chart. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Specifies a chart category label level enumeration constant, referring to the level of the source category labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel?: boolean; + /** + * Specifies the type of the chart. See `Excel.ChartType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * Specifies the way that blank cells are plotted on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs?: boolean; + /** + * Specifies the height, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + height?: boolean; + /** + * The unique ID of chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + id?: boolean; + /** + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + left?: boolean; + /** + * Specifies the name of a chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * Specifies the way columns or rows are used as data series on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotBy?: boolean; + /** + * True if only visible cells are plotted. False if both visible and hidden cells are plotted. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly?: boolean; + /** + * Specifies a chart series name level enumeration constant, referring to the level of the source series names. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel?: boolean; + /** + * Specifies whether to display all field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * Specifies whether to show the data labels when the value is greater than the maximum value on the value axis. + If the value axis becomes smaller than the size of the data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum?: boolean; + /** + * Specifies the chart style for the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + style?: boolean; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + top?: boolean; + /** + * Specifies the width, in points, of the chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + width?: boolean; + } + /** + * Encapsulates the options for the pivot chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChartPivotOptionsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies whether to display the 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showAxisFieldButtons?: boolean; + /** + * Specifies whether to display the legend field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLegendFieldButtons?: boolean; + /** + * Specifies whether to display the report filter field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showReportFilterFieldButtons?: boolean; + /** + * Specifies whether to display the show value field buttons on a PivotChart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showValueFieldButtons?: boolean; + } + /** + * Encapsulates the format properties for the overall chart area. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartAreaFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the border format of chart area, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + /** + * Specifies the color scheme of the chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + colorScheme?: boolean; + /** + * Specifies if the chart area of the chart has rounded corners. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + roundedCorners?: boolean; + } + /** + * Represents a collection of chart series. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Encapsulates the bin options for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + binOptions?: Excel.Interfaces.ChartBinOptionsLoadOptions; + /** + * For EACH ITEM in the collection: Encapsulates the options for the box and whisker charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsLoadOptions; + /** + * For EACH ITEM in the collection: Represents a collection of all data labels in the series. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; + /** + * For EACH ITEM in the collection: Encapsulates the options for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + mapOptions?: Excel.Interfaces.ChartMapOptionsLoadOptions; + /** + * For EACH ITEM in the collection: Returns a collection of all points in the series. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + xErrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; + /** + * For EACH ITEM in the collection: Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + yErrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the group for the specified series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + axisGroup?: boolean; + /** + * For EACH ITEM in the collection: This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bubbleScale?: boolean; + /** + * For EACH ITEM in the collection: Represents the chart type of a series. See `Excel.ChartType` for details. + * + * @remarks + * [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 doughnut exploded charts. + Throws an `InvalidArgument` error on invalid charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + explosion?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the series is filtered. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + filtered?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + gapWidth?: boolean; + /** + * For EACH ITEM in the collection: Specifies the color for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the type for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumValue?: boolean; + /** + * For EACH ITEM in the collection: Specifies the color for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the type for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointValue?: boolean; + /** + * For EACH ITEM in the collection: Specifies the color for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the type for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumValue?: boolean; + /** + * For EACH ITEM in the collection: Specifies the series gradient style of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the series has data labels. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * For EACH ITEM in the collection: Specifies the fill color for negative data points in a series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + invertColor?: boolean; + /** + * For EACH ITEM in the collection: True if Excel inverts the pattern in the item when it corresponds to a negative number. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + invertIfNegative?: boolean; + /** + * For EACH ITEM in the collection: Specifies the marker background color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the marker foreground color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the marker size of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * For EACH ITEM in the collection: Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + overlap?: boolean; + /** + * For EACH ITEM in the collection: Specifies the series parent label strategy area for a treemap chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentLabelStrategy?: boolean; + /** + * For EACH ITEM in the collection: Specifies the plot order of a chart series within the chart group. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + plotOrder?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + secondPlotSize?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether connector lines are shown in waterfall charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showConnectorLines?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether leader lines are displayed for each data label in the series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLeaderLines?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the series has a shadow. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the series is smooth. Only applicable to line and scatter charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + /** + * For EACH ITEM in the collection: Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + splitValue?: boolean; + /** + * For EACH ITEM in the collection: True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + varyByCategories?: boolean; + } + /** + * Represents a series in a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Encapsulates the bin options for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + binOptions?: Excel.Interfaces.ChartBinOptionsLoadOptions; + /** + * Encapsulates the options for the box and whisker charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsLoadOptions; + /** + * Represents a collection of all data labels in the series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; + /** + * Encapsulates the options for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + mapOptions?: Excel.Interfaces.ChartMapOptionsLoadOptions; + /** + * Returns a collection of all points in the series. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + xErrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; + /** + * Represents the error bar object of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + yErrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; + /** + * Specifies the group for the specified series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + axisGroup?: boolean; + /** + * This can be an integer value from 0 (zero) to 300, representing the percentage of the default size. This property only applies to bubble charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bubbleScale?: boolean; + /** + * Represents the chart type of a series. See `Excel.ChartType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnut exploded charts. + Throws an `InvalidArgument` error on invalid charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: boolean; + /** + * Specifies 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). + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + explosion?: boolean; + /** + * Specifies if the series is filtered. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + filtered?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + gapWidth?: boolean; + /** + * Specifies the color for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumColor?: boolean; + /** + * Specifies the type for maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumType?: boolean; + /** + * Specifies the maximum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMaximumValue?: boolean; + /** + * Specifies the color for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointColor?: boolean; + /** + * Specifies the type for the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointType?: boolean; + /** + * Specifies the midpoint value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMidpointValue?: boolean; + /** + * Specifies the color for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumColor?: boolean; + /** + * Specifies the type for the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumType?: boolean; + /** + * Specifies the minimum value of a region map chart series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientMinimumValue?: boolean; + /** + * Specifies the series gradient style of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + gradientStyle?: boolean; + /** + * Specifies if the series has data labels. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * Specifies the fill color for negative data points in a series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + invertColor?: boolean; + /** + * True if Excel inverts the pattern in the item when it corresponds to a negative number. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + invertIfNegative?: boolean; + /** + * Specifies the marker background color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * Specifies the marker foreground color of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * Specifies the marker size of a chart series. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * Specifies the name of a series in a chart. The name's length should not be greater than 255 characters. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + overlap?: boolean; + /** + * Specifies the series parent label strategy area for a treemap chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentLabelStrategy?: boolean; + /** + * Specifies the plot order of a chart series within the chart group. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + plotOrder?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + secondPlotSize?: boolean; + /** + * Specifies whether connector lines are shown in waterfall charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showConnectorLines?: boolean; + /** + * Specifies whether leader lines are displayed for each data label in the series. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showLeaderLines?: boolean; + /** + * Specifies if the series has a shadow. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies if the series is smooth. Only applicable to line and scatter charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + /** + * Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + splitType?: boolean; + /** + * Specifies the threshold value that separates two sections of either a pie-of-pie chart or a bar-of-pie chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + splitValue?: boolean; + /** + * True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + varyByCategories?: boolean; + } + /** + * Encapsulates the format properties for the chart series + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * A collection of all the chart points within a series inside a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartPointsCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the data label of a chart point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelLoadOptions; + /** + * For EACH ITEM in the collection: Encapsulates the format properties chart point. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * For EACH ITEM in the collection: HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * For EACH ITEM in the collection: HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * For EACH ITEM in the collection: Represents marker size of a data point. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * For EACH ITEM in the collection: Returns the value of a chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + } + /** + * Represents a point of a series in a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartPointLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the data label of a chart point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelLoadOptions; + /** + * Encapsulates the format properties chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatLoadOptions; + /** + * Represents whether a data point has a data label. Not applicable for surface charts. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * HTML color code representation of the marker background color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * HTML color code representation of the marker foreground color of a data point (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * Represents marker size of a data point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * Represents marker style of a chart data point. See `Excel.ChartMarkerStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * Returns the value of a chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + } + /** + * Represents the formatting object for chart points. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartPointFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the border format of a chart data point, which includes color, style, and weight information. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + } + /** + * Represents the chart axes. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartAxesLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the category axis in a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisLoadOptions; + /** + * Represents the series axis of a 3-D chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisLoadOptions; + /** + * Represents the value axis in an axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + valueAxis?: Excel.Interfaces.ChartAxisLoadOptions; + } + /** + * Represents a single axis in a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the formatting of a chart object, which includes line and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatLoadOptions; + /** + * Returns an object that represents the major gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesLoadOptions; + /** + * Returns an object that represents the minor gridlines for the specified axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesLoadOptions; + /** + * Represents the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleLoadOptions; + /** + * Specifies the alignment for the specified axis tick label. See `Excel.ChartTextHorizontalAlignment` for detail. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + alignment?: boolean; + /** + * Specifies the group for the specified axis. See `Excel.ChartAxisGroup` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + axisGroup?: boolean; + /** + * Specifies the base unit for the specified category axis. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit?: boolean; + /** + * Specifies the category axis type. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + categoryType?: boolean; + /** + * Specifies the custom axis display unit value. To set this property, please use the `SetCustomDisplayUnit(double)` method. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + customDisplayUnit?: boolean; + /** + * Represents the axis display unit. See `Excel.ChartAxisDisplayUnit` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + displayUnit?: boolean; + /** + * Specifies the height, in points, of the chart axis. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: boolean; + /** + * Specifies if the value axis crosses the category axis between categories. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isBetweenCategories?: boolean; + /** + * Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: boolean; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * Specifies the base of the logarithm when using logarithmic scales. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + logBase?: boolean; + /** + * Specifies the type of major tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + majorTickMark?: boolean; + /** + * Specifies the major unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minimum?: boolean; + /** + * Specifies the type of minor tick mark for the specified axis. See `Excel.ChartAxisTickMark` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + minorTickMark?: boolean; + /** + * Specifies the minor unit scale value for the category axis when the `categoryType` property is set to `dateAxis`. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + minorUnit?: boolean; + /** + * Specifies if an axis is multilevel. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + multiLevel?: boolean; + /** + * Specifies the format code for the axis tick label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + offset?: boolean; + /** + * Specifies the specified axis position where the other axis crosses. See `Excel.ChartAxisPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + /** + * Specifies the axis position where the other axis crosses. You should use the `SetPositionAt(double)` method to set this property. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + positionAt?: boolean; + /** + * Specifies if Excel plots data points from last to first. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder?: boolean; + /** + * Specifies the value axis scale type. See `Excel.ChartAxisScaleType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + scaleType?: boolean; + /** + * Specifies if the axis display unit label is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel?: boolean; + /** + * Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * Specifies the position of tick-mark labels on the specified axis. See `Excel.ChartAxisTickLabelPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing?: boolean; + /** + * Specifies the number of categories or series between tick marks. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing?: boolean; + /** + * Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: boolean; + /** + * Specifies the axis type. See `Excel.ChartAxisType` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + /** + * Specifies if the axis is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the chart axis. Returns `null` if the axis is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + width?: boolean; + } + /** + * Encapsulates the format properties for the chart axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + /** + * Specifies chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * Represents the title of a chart axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisTitleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the formatting of the chart axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatLoadOptions; + /** + * Specifies the axis title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * Specifies the angle to which the text is oriented for the chart axis title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + textOrientation?: boolean; + /** + * Specifies if the axis title is visibile. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * Represents the chart axis title formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisTitleFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the chart axis title's border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Specifies the chart axis title's font attributes, such as font name, font size, or color, of the chart axis title object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * Represents a collection of all the data labels on a chart point. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartDataLabelsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the format of chart data labels, which includes fill and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatLoadOptions; + /** + * Specifies if data labels automatically generate appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShapeType?: boolean; + /** + * Specifies the horizontal alignment for chart data label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when the `TextOrientation` of data label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: boolean; + /** + * Specifies if the number format is linked to the cells. If `true`, the number format will change in the labels when it changes in the cells. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * Specifies the format code for data labels. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * String representing the separator used for the data labels on a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + separator?: boolean; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showAsDataCallout?: boolean; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + /** + * Represents the angle to which the text is oriented for data labels. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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 the data label is -90, 90, or 180. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: boolean; + } + /** + * Represents the data label of a chart point. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartDataLabelLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the format of chart data label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartDataLabelFormatLoadOptions; + /** + * Specifies if the data label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * String value that represents the formula of chart data label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula?: boolean; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShapeType?: boolean; + /** + * Returns the height, in points, of the chart data label. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * String value that represents the format code for data label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * Value that represents the position of the data label. See `Excel.ChartDataLabelPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + position?: boolean; + /** + * String representing the separator used for the data label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + separator?: boolean; + /** + * TODO: + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showAsDataCallout?: boolean; + /** + * Specifies if the data label bubble size is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showBubbleSize?: boolean; + /** + * Specifies if the data label category name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showCategoryName?: boolean; + /** + * Specifies if the data label legend key is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showLegendKey?: boolean; + /** + * Specifies if the data label percentage is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showPercentage?: boolean; + /** + * Specifies if the data label series name is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showSeriesName?: boolean; + /** + * Specifies if the data label value is visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showValue?: boolean; + /** + * String representing the text of the data label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text?: boolean; + /** + * Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [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. Value is `null` if the chart data label is not visible. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: boolean; + /** + * Returns the width, in points, of the chart data label. Value is `null` if the chart data label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * Encapsulates the format properties for the chart data labels. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartDataLabelFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Represents the font attributes (such as font name, font size, and color) for a chart data label. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * Represents the data table object of a chart. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + interface ChartDataTableLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the format of a chart data table, which includes fill, font, and border format. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + format?: Excel.Interfaces.ChartDataTableFormatLoadOptions; + /** + * Specifies whether to display the horizontal border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showHorizontalBorder?: boolean; + /** + * Specifies whether to show the legend key of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showLegendKey?: boolean; + /** + * Specifies whether to display the outline border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showOutlineBorder?: boolean; + /** + * Specifies whether to display the vertical border of the data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + showVerticalBorder?: boolean; + /** + * Specifies whether to show the data table of the chart. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + visible?: boolean; + } + /** + * Represents the format of a chart data table. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + interface ChartDataTableFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the border format of chart data table, which includes color, line style, and weight. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Represents the font attributes (such as font name, font size, and color) for the current object. + * + * @remarks + * [Api set: ExcelApi 1.14] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * This object represents the attributes for a chart's error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChartErrorBarsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the formatting type of the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.Interfaces.ChartErrorBarsFormatLoadOptions; + /** + * Specifies if error bars have an end style cap. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endStyleCap?: boolean; + /** + * Specifies which parts of the error bars to include. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + include?: boolean; + /** + * The type of range marked by the error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: boolean; + /** + * Specifies whether the error bars are displayed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + } + /** + * Encapsulates the format properties for chart error bars. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChartErrorBarsFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * Represents major or minor gridlines on a chart axis. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartGridlinesLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the formatting of chart gridlines. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatLoadOptions; + /** + * Specifies if the axis gridlines are visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * Encapsulates the format properties for chart gridlines. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartGridlinesFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * Represents the legend in a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartLegendLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the formatting of a chart legend, which includes fill and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatLoadOptions; + /** + * Specifies the height, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: boolean; + /** + * Specifies the left value, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: boolean; + /** + * Specifies if the chart legend should overlap with the main body of the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * Specifies the position of the legend on the chart. See `Excel.ChartLegendPosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * Specifies if the legend has a shadow on the chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies the top of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: boolean; + /** + * Specifies if the chart legend is visible. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the legend on the chart. Value is `null` if the legend is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + width?: boolean; + } + /** + * Represents the legend entry in `legendEntryCollection`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartLegendEntryLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the height of the legend entry on the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * Specifies the index of the legend entry in the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + index?: boolean; + /** + * Specifies the left value of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * Specifies the top of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * Represents the visibility of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * Represents the width of the legend entry on the chart Legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * Represents a collection of legend entries. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartLegendEntryCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the height of the legend entry on the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Specifies the index of the legend entry in the chart legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Specifies the left value of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Specifies the top of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Represents the visibility of a chart legend entry. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * For EACH ITEM in the collection: Represents the width of the legend entry on the chart Legend. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * Encapsulates the format properties of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartLegendFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Represents the font attributes such as font name, font size, and color of a chart legend. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * Encapsulates the properties for a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChartMapOptionsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the series map labels strategy of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + labelStrategy?: boolean; + /** + * Specifies the series mapping level of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: boolean; + /** + * Specifies the series projection type of a region map chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + projectionType?: boolean; + } + /** + * Represents a chart title object of a chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartTitleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the formatting of a chart title, which includes fill and font formatting. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatLoadOptions; + /** + * Returns the height, in points, of the chart title. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + height?: boolean; + /** + * Specifies the horizontal alignment for chart title. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: boolean; + /** + * Specifies the distance, in points, from the left edge of chart title to the left edge of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + left?: boolean; + /** + * Specifies if the chart title will overlay the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * Represents the position of chart title. See `Excel.ChartTitlePosition` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + position?: boolean; + /** + * Represents a boolean value that determines if the chart title has a shadow. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * Specifies the chart's title text. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * Specifies the angle to which the text is oriented for the chart title. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + textOrientation?: boolean; + /** + * Specifies the distance, in points, from the top edge of chart title to the top of chart area. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + top?: boolean; + /** + * Specifies the vertical alignment of chart title. See `Excel.ChartTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: boolean; + /** + * Specifies if the chart title is visibile. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the chart title. Value is `null` if the chart title is not visible. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + width?: boolean; + } + /** + * Represents the substring in chart related objects that contain text, like a `ChartTitle` object or `ChartAxisTitle` object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartFormatStringLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the font attributes, such as font name, font size, and color of a chart characters object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * Provides access to the formatting options for a chart title. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartTitleFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the border format of chart title, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Represents the font attributes (such as font name, font size, and color) for an object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * Represents the border formatting of a chart element. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartBorderLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of borders in the chart. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + color?: boolean; + /** + * Represents the line style of the border. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + lineStyle?: boolean; + /** + * Represents weight of the border, in points. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + weight?: boolean; + } + /** + * Encapsulates the bin options for histogram charts and pareto charts. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChartBinOptionsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if bin overflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowOverflow?: boolean; + /** + * Specifies if bin underflow is enabled in a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + allowUnderflow?: boolean; + /** + * Specifies the bin count of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + count?: boolean; + /** + * Specifies the bin overflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + overflowValue?: boolean; + /** + * Specifies the bin's type for a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: boolean; + /** + * Specifies the bin underflow value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underflowValue?: boolean; + /** + * Specifies the bin width value of a histogram chart or pareto chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: boolean; + } + /** + * Represents the properties of a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ChartBoxwhiskerOptionsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if the quartile calculation type of a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + quartileCalculation?: boolean; + /** + * Specifies if inner points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showInnerPoints?: boolean; + /** + * Specifies if the mean line is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanLine?: boolean; + /** + * Specifies if the mean marker is shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showMeanMarker?: boolean; + /** + * Specifies if outlier points are shown in a box and whisker chart. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + showOutlierPoints?: boolean; + } + /** + * Encapsulates the formatting options for line elements. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartLineFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of lines in the chart. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * Represents the line style. See `Excel.ChartLineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + lineStyle?: boolean; + /** + * Represents weight of the line, in points. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + weight?: boolean; + } + /** + * This object represents the font attributes (such as font name, font size, and color) for a chart object. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + interface ChartFontLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the bold status of font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * Represents the italic status of the font. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * Font name (e.g., "Calibri") + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * Size of the font (e.g., 11) + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + size?: boolean; + /** + * Type of underline applied to the font. See `Excel.ChartUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + underline?: boolean; + } + /** + * This object represents the attributes for a chart trendline object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartTrendlineLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the formatting of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatLoadOptions; + /** + * Represents the label of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + label?: Excel.Interfaces.ChartTrendlineLabelLoadOptions; + /** + * Represents the number of periods that the trendline extends backward. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + backwardPeriod?: boolean; + /** + * Represents the number of periods that the trendline extends forward. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + intercept?: boolean; + /** + * Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: boolean; + /** + * Represents the name of the trendline. Can be set to a string value, a `null` value represents automatic values. The returned value is always a string + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: boolean; + /** + * True if the equation for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showEquation?: boolean; + /** + * True if the r-squared value for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showRSquared?: boolean; + /** + * Represents the type of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + } + /** + * Represents a collection of chart trendlines. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartTrendlineCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the formatting of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatLoadOptions; + /** + * For EACH ITEM in the collection: Represents the label of a chart trendline. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + backwardPeriod?: boolean; + /** + * For EACH ITEM in the collection: Represents the number of periods that the trendline extends forward. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + intercept?: boolean; + /** + * For EACH ITEM in the collection: Represents the period of a chart trendline. Only applicable to trendlines with the type `MovingAverage`. + * + * @remarks + * [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, a `null` value represents automatic values. The returned value is always a string + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Represents the order of a chart trendline. Only applicable to trendlines with the type `Polynomial`. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showEquation?: boolean; + /** + * For EACH ITEM in the collection: True if the r-squared value for the trendline is displayed on the chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showRSquared?: boolean; + /** + * For EACH ITEM in the collection: Represents the type of a chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + } + /** + * Represents the format properties for the chart trendline. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface ChartTrendlineFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents chart line formatting. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * This object represents the attributes for a chart trendline label object. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartTrendlineLabelLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The format of the chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartTrendlineLabelFormatLoadOptions; + /** + * Specifies if the trendline label automatically generates appropriate text based on context. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * String value that represents the formula of the chart trendline label using A1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + formula?: boolean; + /** + * Returns the height, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * Represents the horizontal alignment of the chart trendline label. See `Excel.ChartTextHorizontalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is -90, 90, or 180. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: boolean; + /** + * Represents the distance, in points, from the left edge of the chart trendline label to the left edge of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkNumberFormat?: boolean; + /** + * String value that represents the format code for the trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * String representing the text of the trendline label on a chart. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + text?: boolean; + /** + * Represents the angle to which the text is oriented for the chart trendline label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * Represents the distance, in points, from the top edge of the chart trendline label to the top of the chart area. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * Represents the vertical alignment of the chart trendline label. See `Excel.ChartTextVerticalAlignment` for details. + This property is valid only when `TextOrientation` of a trendline label is 0. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: boolean; + /** + * Returns the width, in points, of the chart trendline label. Value is `null` if the chart trendline label is not visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * Encapsulates the format properties for the chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartTrendlineLabelFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the border format, which includes color, linestyle, and weight. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * Specifies the font attributes (such as font name, font size, and color) for a chart trendline label. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * This object represents the attributes for a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartPlotAreaLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the formatting of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartPlotAreaFormatLoadOptions; + /** + * Specifies the height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * Specifies the inside height value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideHeight?: boolean; + /** + * Specifies the inside left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideLeft?: boolean; + /** + * Specifies the inside top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideTop?: boolean; + /** + * Specifies the inside width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + insideWidth?: boolean; + /** + * Specifies the left value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * Specifies the position of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + /** + * Specifies the top value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * Specifies the width value of a plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * Represents the format properties for a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface ChartPlotAreaFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the border attributes of a chart plot area. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + } + /** + * Manages sorting operations on `Table` objects. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface TableSortLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the current conditions used to last sort the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + fields?: boolean; + /** + * Specifies if the casing impacts the last sort of the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + matchCase?: boolean; + /** + * Represents the Chinese character ordering method last used to sort the table. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + method?: boolean; + } + /** + * Manages the filtering of a table's column. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface FilterLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The currently applied filter on the given column. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + criteria?: boolean; + } + /** + * Represents the `AutoFilter` object. + AutoFilter turns the values in Excel column into specific filters based on the cell contents. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface AutoFilterLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * An array that holds all the filter criteria in the autofiltered range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + criteria?: boolean; + /** + * Specifies if the AutoFilter is enabled. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enabled?: boolean; + /** + * Specifies if the AutoFilter has filter criteria. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isDataFiltered?: boolean; + } + /** + * Provides information based on current system culture settings. This includes the culture names, number formatting, and other culturally dependent settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + interface CultureInfoLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Defines the culturally appropriate format of displaying date and time. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + datetimeFormat?: Excel.Interfaces.DatetimeFormatInfoLoadOptions; + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + numberFormat?: Excel.Interfaces.NumberFormatInfoLoadOptions; + /** + * Gets the culture name in the format languagecode2-country/regioncode2 (e.g., "zh-cn" or "en-us"). This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + name?: boolean; + } + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + interface NumberFormatInfoLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the currency symbol for currency values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.17] + */ + currencySymbol?: boolean; + /** + * Gets the string used as the decimal separator for numeric values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + numberDecimalSeparator?: boolean; + /** + * Gets the string used to separate groups of digits to the left of the decimal for numeric values. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + numberGroupSeparator?: boolean; + } + /** + * Defines the culturally appropriate format of displaying numbers. This is based on current system culture settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface DatetimeFormatInfoLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the string used as the date separator. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + dateSeparator?: boolean; + /** + * Gets the format string for a long date value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + longDatePattern?: boolean; + /** + * Gets the format string for a long time value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + longTimePattern?: boolean; + /** + * Gets the format string for a short date value. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + shortDatePattern?: boolean; + /** + * Gets the string used as the time separator. This is based on current system settings. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + timeSeparator?: 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. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartScopedCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The custom XML part's ID. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The custom XML part's namespace URI. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * A collection of custom XML parts. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The custom XML part's ID. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The custom XML part's namespace URI. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * Represents a custom XML part object in a workbook. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The custom XML part's ID. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * The custom XML part's namespace URI. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * Represents a scoped collection of PivotTables. The PivotTables are sorted based on the location of the PivotTable's top-left corner. They are ordered top-to-bottom and then left-to-right. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface PivotTableScopedCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The PivotLayout describing the layout and visual structure of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layout?: Excel.Interfaces.PivotLayoutLoadOptions; + /** + * For EACH ITEM in the collection: The worksheet containing the current PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + allowMultipleFiltersPerField?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the PivotTable allows values in the data body to be edited by the user. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableDataValueEditing?: boolean; + /** + * For EACH ITEM in the collection: ID of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + refreshOnOpen?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the PivotTable uses custom lists when sorting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useCustomSortLists?: boolean; + } + /** + * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + interface PivotTableCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The PivotLayout describing the layout and visual structure of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layout?: Excel.Interfaces.PivotLayoutLoadOptions; + /** + * For EACH ITEM in the collection: The worksheet containing the current PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + allowMultipleFiltersPerField?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the PivotTable allows values in the data body to be edited by the user. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableDataValueEditing?: boolean; + /** + * For EACH ITEM in the collection: ID of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + refreshOnOpen?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the PivotTable uses custom lists when sorting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useCustomSortLists?: boolean; + } + /** + * Represents an Excel PivotTable. + To learn more about the PivotTable object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-pivottables | Work with PivotTables using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + interface PivotTableLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The PivotLayout describing the layout and visual structure of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layout?: Excel.Interfaces.PivotLayoutLoadOptions; + /** + * The worksheet containing the current PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Specifies if the PivotTable allows the application of multiple PivotFilters on a given PivotField in the table. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + allowMultipleFiltersPerField?: boolean; + /** + * Specifies if the PivotTable allows values in the data body to be edited by the user. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + enableDataValueEditing?: boolean; + /** + * ID of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * Name of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.3] + */ + name?: boolean; + /** + * Specifies whether the PivotTable refreshes when the workbook opens. Corresponds to "Refresh on load" setting in the UI. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + refreshOnOpen?: boolean; + /** + * Specifies if the PivotTable uses custom lists when sorting. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useCustomSortLists?: boolean; + } + /** + * Represents the visual layout of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotLayoutLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The style applied to the PivotTable. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pivotStyle?: Excel.Interfaces.PivotTableStyleLoadOptions; + /** + * The alt text description of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextDescription?: boolean; + /** + * The alt text title of the PivotTable. + + Alt text provides alternative, text-based representations of the information contained in the PivotTable. + This information is useful for people with vision or cognitive impairments who may not be able to see or understand the table. + A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + altTextTitle?: boolean; + /** + * Specifies if formatting will be automatically formatted when it's refreshed or when fields are moved. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoFormat?: boolean; + /** + * The text that is automatically filled into any empty cell in the PivotTable if `fillEmptyCells == true`. + Note that this value persists if `fillEmptyCells` is set to `false`, and that setting this value does not set that property to `true`. + By default, this is an empty string. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + emptyCellText?: boolean; + /** + * Specifies if the field list can be shown in the UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + enableFieldList?: boolean; + /** + * Specifies whether empty cells in the PivotTable should be populated with the `emptyCellText`. Default is `false`. + Note that the value of `emptyCellText` persists when this property is set to `false`. + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + fillEmptyCells?: boolean; + /** + * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + layoutType?: boolean; + /** + * Specifies if formatting is preserved when the report is refreshed or recalculated by operations such as pivoting, sorting, or changing page field items. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + preserveFormatting?: boolean; + /** + * Specifies if the PivotTable report shows grand totals for columns. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showColumnGrandTotals?: boolean; + /** + * Specifies whether the PivotTable displays field headers (field captions and filter drop-downs). + * + * @remarks + * [Api set: ExcelApi 1.13] + */ + showFieldHeaders?: boolean; + /** + * Specifies if the PivotTable report shows grand totals for rows. + * + * @remarks + * [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`. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + subtotalLocation?: boolean; + } + /** + * Represents a collection of all the PivotHierarchies that are part of the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotHierarchyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: ID of the PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + } + /** + * Represents the Excel PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotHierarchyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * ID of the PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * Name of the PivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + } + /** + * Represents a collection of RowColumnPivotHierarchy items associated with the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface RowColumnPivotHierarchyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: ID of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Position of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + } + /** + * Represents the Excel RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface RowColumnPivotHierarchyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * ID of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * Name of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * Position of the RowColumnPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + } + /** + * Represents a collection of FilterPivotHierarchy items associated with the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface FilterPivotHierarchyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Determines whether to allow multiple filter items. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems?: boolean; + /** + * For EACH ITEM in the collection: ID of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Position of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + } + /** + * Represents the Excel FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface FilterPivotHierarchyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Determines whether to allow multiple filter items. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems?: boolean; + /** + * ID of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * Name of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * Position of the FilterPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + } + /** + * Represents a collection of DataPivotHierarchy items associated with the PivotTable. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DataPivotHierarchyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the PivotFields associated with the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + field?: Excel.Interfaces.PivotFieldLoadOptions; + /** + * For EACH ITEM in the collection: ID of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Number format of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * For EACH ITEM in the collection: Position of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the data should be shown as a specific summary calculation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAs?: boolean; + /** + * For EACH ITEM in the collection: Specifies if all items of the DataPivotHierarchy are shown. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + summarizeBy?: boolean; + } + /** + * Represents the Excel DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface DataPivotHierarchyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the PivotFields associated with the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + field?: Excel.Interfaces.PivotFieldLoadOptions; + /** + * ID of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * Name of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * Number format of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * Position of the DataPivotHierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + /** + * Specifies if the data should be shown as a specific summary calculation. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAs?: boolean; + /** + * Specifies if all items of the DataPivotHierarchy are shown. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + summarizeBy?: boolean; + } + /** + * Represents a collection of all the PivotFields that are part of a PivotTable's hierarchy. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotFieldCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: ID of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Name of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Determines whether to show all items of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAllItems?: boolean; + /** + * For EACH ITEM in the collection: Subtotals of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + subtotals?: boolean; + } + /** + * Represents the Excel PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotFieldLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * ID of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * Name of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * Determines whether to show all items of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + showAllItems?: boolean; + /** + * Subtotals of the PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + subtotals?: boolean; + } + /** + * Represents a collection of all the PivotItems related to their parent PivotField. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotItemCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: ID of the PivotItem. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isExpanded?: boolean; + /** + * For EACH ITEM in the collection: Name of the PivotItem. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the PivotItem is visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + visible?: boolean; + } + /** + * Represents the Excel PivotItem. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + interface PivotItemLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * ID of the PivotItem. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + isExpanded?: boolean; + /** + * Name of the PivotItem. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * Specifies if the PivotItem is visible. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + visible?: boolean; + } + /** + * Represents a worksheet-level custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface WorksheetCustomPropertyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the key of the custom property. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + key?: boolean; + /** + * Gets or sets the value of the custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + value?: boolean; + } + /** + * Contains the collection of worksheet-level custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface WorksheetCustomPropertyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the key of the custom property. Custom property keys are case-insensitive. The key is limited to 255 characters (larger values will cause an `InvalidArgument` error to be thrown.) + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Gets or sets the value of the custom property. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + value?: boolean; + } + /** + * Represents workbook properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface DocumentPropertiesLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + author?: boolean; + /** + * The category of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + category?: boolean; + /** + * The comments of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + comments?: boolean; + /** + * The company of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + company?: boolean; + /** + * Gets the creation date of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + creationDate?: boolean; + /** + * The keywords of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + keywords?: boolean; + /** + * Gets the last author of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + lastAuthor?: boolean; + /** + * The manager of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + manager?: boolean; + /** + * Gets the revision number of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + revisionNumber?: boolean; + /** + * The subject of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + subject?: boolean; + /** + * The title of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + title?: boolean; + } + /** + * Represents a custom property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface CustomPropertyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + key?: boolean; + /** + * The type of the value used for the custom property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + /** + * The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + value?: boolean; + } + /** + * Contains the collection of custom properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface CustomPropertyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The key of the custom property. The key is limited to 255 characters outside of Excel on the web (larger keys are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: The type of the value used for the custom property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: The value of the custom property. The value is limited to 255 characters outside of Excel on the web (larger values are automatically trimmed to 255 characters on other platforms). + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + value?: boolean; + } + /** + * Represents a collection of all the conditional formats that are overlap the range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [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 a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [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 a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * For EACH ITEM in the collection: The priority of the conditional format in the current `ConditionalFormatCollection`. + * + * @remarks + * [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 the 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. + * + * @remarks + * [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. + Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + type?: boolean; + } + /** + * An object encapsulating a conditional format's range, format, rule, and other properties. + To learn more about the conditional formatting object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-conditional-formatting | Apply conditional formatting to Excel ranges}. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the cell value conditional format properties if the current conditional format is a `CellValue` type. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * Returns the color scale conditional format properties if the current conditional format is a `ColorScale` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * Returns the data bar properties if the current conditional format is a data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * Returns the icon set conditional format properties if the current conditional format is an `IconSet` type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; + /** + * Returns the preset criteria conditional format. See `Excel.PresetCriteriaConditionalFormat` for more details. + * + * @remarks + * [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". + * + * @remarks + * [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". + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatLoadOptions; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * Returns the top/bottom conditional format properties if the current conditional format is a `TopBottom` type. + For example, to format the top 10% or bottom 10 items. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * The priority of the conditional format in the current `ConditionalFormatCollection`. + * + * @remarks + * [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 the 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. + * + * @remarks + * [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. + Value is `null` on data bars, icon sets, and color scales as there's no concept of `StopIfTrue` for these. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + /** + * A type of conditional format. Only one can be set at a time. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + type?: boolean; + } + /** + * Represents an Excel conditional data bar type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface DataBarConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Representation of all values to the left of the axis in an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatLoadOptions; + /** + * Representation of all values to the right of the axis in an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatLoadOptions; + /** + * HTML color code representing the color of the Axis line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no axis is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisColor?: boolean; + /** + * Representation of how the axis is determined for an Excel data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + axisFormat?: boolean; + /** + * Specifies the direction that the data bar graphic should be based on. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.lowerBoundRule = {...}` instead of `x.lowerBoundRule.formula = ...`). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: boolean; + /** + * If `true`, hides the values from the cells where the data bar is applied. + * + * @remarks + * [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. + The `ConditionalDataBarRule` object must be set as a JSON object (use `x.upperBoundRule = {...}` instead of `x.upperBoundRule.formula = ...`). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + upperBoundRule?: boolean; + } + /** + * Represents a conditional format for the positive side of the data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarPositiveFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor?: boolean; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor?: boolean; + /** + * Specifies if the data bar has a gradient. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + gradientFill?: boolean; + } + /** + * Represents a conditional format for the negative side of the data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarNegativeFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + Value is "" (an empty string) if no border is present or set. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borderColor?: boolean; + /** + * HTML color code representing the fill color, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fillColor?: boolean; + /** + * Specifies if the negative data bar has the same border color as the positive data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * Specifies if the negative data bar has the same fill color as the positive data bar. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + matchPositiveFillColor?: boolean; + } + /** + * Represents a custom conditional format type. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface CustomConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * Specifies the `Rule` object on this conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.Interfaces.ConditionalFormatRuleLoadOptions; + } + /** + * Represents a rule, for all traditional rule/format pairings. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatRuleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The formula, if required, on which to evaluate the conditional format rule. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formula?: boolean; + /** + * The formula, if required, on which to evaluate the conditional format rule in the user's language. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: boolean; + /** + * The formula, if required, on which to evaluate the conditional format rule in R1C1-style notation. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + formulaR1C1?: boolean; + } + /** + * Represents an icon set criteria for conditional formatting. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface IconSetConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * An array of criteria and icon sets 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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + criteria?: boolean; + /** + * If `true`, reverses the icon orders for the icon set. Note that this cannot be set if custom icons are used. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * If `true`, hides the values and only shows icons. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * If set, displays the icon set option for the conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * Represents the color scale criteria for conditional formatting. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ColorScaleConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The criteria of the color scale. Midpoint is optional when using a two point color scale. + * + * @remarks + * [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). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + threeColorScale?: boolean; + } + /** + * Represents a top/bottom conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface TopBottomConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * The criteria of the top/bottom conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * Represents the preset criteria conditional format such as above average, below average, unique values, contains blank, nonblank, error, and noerror. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface PresetCriteriaConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * The rule of the conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * Represents a specific text conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface TextConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a format object, encapsulating the conditional format's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * The rule of the conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * Represents a cell value conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface CellValueConditionalFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * Specifies the rule object on this conditional format. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * A format object encapsulating the conditional formats range's font, fill, borders, and other properties. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Collection of border objects that apply to the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions; + /** + * Returns the fill object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillLoadOptions; + /** + * Returns the font object defined on the overall conditional format range. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontLoadOptions; + /** + * Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + Cleared if `null` is passed in. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + numberFormat?: boolean; + } + /** + * This object represents the font attributes (font style, color, etc.) for an object. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFontLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if the font is bold. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * HTML color code representation of the text color (e.g., #FF0000 represents Red). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + /** + * Specifies if the font is italic. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * Specifies the strikethrough status of the font. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * The type of underline applied to the font. See `Excel.ConditionalRangeFontUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + underline?: boolean; + } + /** + * Represents the background of a conditional range object. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFillLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of the fill, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + } + /** + * Represents the border of an object. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeBorderLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + /** + * Constant value that indicates the specific side of the border. See `Excel.ConditionalRangeBorderIndex` for details. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * Represents the border objects that make up range border. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeBorderCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: HTML color code representing the color of the border line, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * An object encapsulating a style's format and other properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface StyleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * A collection of four border objects that represent the style of the four borders. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * The fill of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillLoadOptions; + /** + * A `Font` object that represents the font of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoIndent?: boolean; + /** + * Specifies if the style is a built-in style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + builtIn?: boolean; + /** + * Specifies if the formula will be hidden when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * Represents the horizontal alignment for the style. See `Excel.HorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: boolean; + /** + * Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * Specifies if the style includes the color, color index, line style, and weight border properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * Specifies if the style includes the number format property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * Specifies if the style includes the formula hidden and locked protection properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * An integer from 0 to 250 that indicates the indent level for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + indentLevel?: boolean; + /** + * Specifies if the object is locked when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * The name of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * The format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormat?: boolean; + /** + * The localized format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * The reading order for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readingOrder?: boolean; + /** + * Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * The text orientation for the style. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: boolean; + /** + * Specifies if Excel wraps the text in the object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + wrapText?: boolean; + } + /** + * Represents a collection of all the styles. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + interface StyleCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: A collection of four border objects that represent the style of the four borders. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * For EACH ITEM in the collection: The fill of the style. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * For EACH ITEM in the collection: Specifies if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + autoIndent?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style is a built-in style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + builtIn?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the formula will be hidden when the worksheet is protected. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style includes the auto indent, horizontal alignment, vertical alignment, wrap text, indent level, and text orientation properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style includes the color, color index, line style, and weight border properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style includes the background, bold, color, color index, font style, italic, name, size, strikethrough, subscript, superscript, and underline font properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style includes the number format property. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style includes the color, color index, invert if negative, pattern, pattern color, and pattern color index interior properties. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the style includes the formula hidden and locked protection properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + indentLevel?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the object is locked when the worksheet is protected. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * For EACH ITEM in the collection: The name of the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: The format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormat?: boolean; + /** + * For EACH ITEM in the collection: The localized format code of the number format for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * For EACH ITEM in the collection: The reading order for the style. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + readingOrder?: boolean; + /** + * For EACH ITEM in the collection: Specifies if text automatically shrinks to fit in the available column width. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * For EACH ITEM in the collection: The text orientation for the style. + * + * @remarks + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment for the style. See `Excel.VerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies if Excel wraps the text in the object. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + wrapText?: boolean; + } + /** + * Represents a collection of table styles. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface TableStyleCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if this `TableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a table style, which defines the style elements by region of the table. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface TableStyleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the name of the table style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * Specifies if this `TableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a collection of PivotTable styles. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface PivotTableStyleCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the PivotTable style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if this `PivotTableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a PivotTable style, which defines style elements by PivotTable region. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface PivotTableStyleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the name of the PivotTable style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * Specifies if this `PivotTableStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a collection of `SlicerStyle` objects. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface SlicerStyleCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the slicer style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if this `SlicerStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a slicer style, which defines style elements by region of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface SlicerStyleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the name of the slicer style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * Specifies if this `SlicerStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a collection of timeline styles. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface TimelineStyleCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the timeline style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Specifies if this `TimelineStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents a `TimelineStyle`, which defines style elements by region in the timeline. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface TimelineStyleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the name of the timeline style. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * Specifies if this `TimelineStyle` object is read-only. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + readOnly?: boolean; + } + /** + * Represents layout and print settings that are not dependent on any printer-specific implementation. These settings include margins, orientation, page numbering, title rows, and print area. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface PageLayoutLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Header and footer configuration for the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headersFooters?: Excel.Interfaces.HeaderFooterGroupLoadOptions; + /** + * The worksheet's black and white print option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + blackAndWhite?: boolean; + /** + * The worksheet's bottom page margin to use for printing in points. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin?: boolean; + /** + * The worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHorizontally?: boolean; + /** + * The worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerVertically?: boolean; + /** + * The worksheet's draft mode option. If `true`, the sheet will be printed without graphics. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + draftMode?: boolean; + /** + * The worksheet's first page number to print. A `null` value represents "auto" page numbering. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPageNumber?: boolean; + /** + * The worksheet's footer margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + footerMargin?: boolean; + /** + * The worksheet's header margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + headerMargin?: boolean; + /** + * The worksheet's left margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin?: boolean; + /** + * The worksheet's orientation of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation?: boolean; + /** + * The worksheet's paper size of the page. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + paperSize?: boolean; + /** + * Specifies if the worksheet's comments should be displayed when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printComments?: boolean; + /** + * The worksheet's print errors option. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printErrors?: boolean; + /** + * Specifies if the worksheet's gridlines will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printGridlines?: boolean; + /** + * Specifies if the worksheet's headings will be printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printHeadings?: boolean; + /** + * The worksheet's page print order option. This specifies the order to use for processing the page number printed. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + printOrder?: boolean; + /** + * The worksheet's right margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin?: boolean; + /** + * The worksheet's top margin, in points, for use when printing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin?: boolean; + /** + * The worksheet's print zoom options. + The `PageLayoutZoomOptions` object must be set as a JSON object (use `x.zoom = {...}` instead of `x.zoom.scale = ...`). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zoom?: boolean; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface HeaderFooterLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The center footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerFooter?: boolean; + /** + * The center header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + centerHeader?: boolean; + /** + * The left footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftFooter?: boolean; + /** + * The left header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftHeader?: boolean; + /** + * The right footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightFooter?: boolean; + /** + * The right header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/library/bb225426.aspx. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightHeader?: boolean; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface HeaderFooterGroupLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The general header/footer, used for all pages unless even/odd or first page is specified. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + defaultForAllPages?: Excel.Interfaces.HeaderFooterLoadOptions; + /** + * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + evenPages?: Excel.Interfaces.HeaderFooterLoadOptions; + /** + * The first page header/footer, for all other pages general or even/odd is used. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + firstPage?: Excel.Interfaces.HeaderFooterLoadOptions; + /** + * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + oddPages?: Excel.Interfaces.HeaderFooterLoadOptions; + /** + * The state by which headers/footers are set. See `Excel.HeaderFooterState` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + useSheetScale?: boolean; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface PageBreakLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the column index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + columnIndex?: boolean; + /** + * Specifies the row index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rowIndex?: boolean; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface PageBreakCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the column index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + columnIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the row index for the page break. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rowIndex?: boolean; + } + /** + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface RangeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns a data validation object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * For EACH ITEM in the collection: The worksheet containing the current range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the range reference in A1-style. Address value contains the sheet reference (e.g., "Sheet1!A1:B4"). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + address?: boolean; + /** + * For EACH ITEM in the collection: Represents the range reference for the specified range in the language of the user. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + addressLocal?: boolean; + /** + * For EACH ITEM in the collection: Specifies the number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + cellCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the total number of columns in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnCount?: boolean; + /** + * For EACH ITEM in the collection: Represents if all columns in the current range are hidden. Value is `true` when all columns in a range are hidden. Value is `false` when no columns in the range are hidden. Value is `null` when some columns in a range are hidden and other columns in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * For EACH ITEM in the collection: Specifies the column number of the first cell in the range. Zero-indexed. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + columnIndex?: boolean; + /** + * For EACH ITEM in the collection: Represents the formula in A1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. If a cell has no formula, its value is returned instead. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: boolean; + /** + * For EACH ITEM in the collection: Represents the formula in R1C1-style notation. If a cell has no formula, its value is returned instead. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + hasSpill?: boolean; + /** + * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from the top edge of the range to the bottom edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Represents if all cells in the current range are hidden. Value is `true` when all cells in a range are hidden. Value is `false` when no cells in the range are hidden. Value is `null` when some cells in a range are hidden and other cells in the same range are not hidden. + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * For EACH ITEM in the collection: Represents the hyperlink for the current range. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + hyperlink?: boolean; + /** + * For EACH ITEM in the collection: Represents if the current range is an entire column. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isEntireColumn?: boolean; + /** + * For EACH ITEM in the collection: Represents if the current range is an entire row. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + isEntireRow?: boolean; + /** + * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from the left edge of the worksheet to the left edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Represents the data type state of each cell. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + linkedDataTypeState?: boolean; + /** + * For EACH ITEM in the collection: Represents Excel's number format code for the given range. For more information about Excel number formatting, see {@link https://support.microsoft.com/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 | Number format codes}. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + numberFormat?: boolean; + /** + * For EACH ITEM in the collection: Represents the category of number format of each cell. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + numberFormatCategories?: boolean; + /** + * For EACH ITEM in the collection: Represents Excel's number format code for the given range, based on the language settings of the user. + Excel does not perform any language or format coercion when getting or setting the `numberFormatLocal` property. + Any returned text uses the locally-formatted strings based on the language specified in the system settings. + * + * @remarks + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * For EACH ITEM in the collection: Returns the total number of rows in the range. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rowCount?: boolean; + /** + * For EACH ITEM in the collection: Represents if all rows in the current range are hidden. Value is `true` when all rows in a range are hidden. Value is `false` when no rows in the range are hidden. Value is `null` when some rows in a range are hidden and other rows in the same range are not hidden. + * + * @remarks + * [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. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + rowIndex?: boolean; + /** + * For EACH ITEM in the collection: Represents if all the cells would be saved as an array formula. + Returns `true` if all cells would be saved as an array formula, or `false` if all cells would not be saved as an array formula. + Returns `null` if some cells would be saved as an array formula and some would not be. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + savedAsArray?: 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. + * + * @remarks + * [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 number sign (#) substitution that happens in the Excel UI will not affect the text value returned by the API. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from the top edge of the worksheet to the top edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Specifies the type of data in each cell. + * + * @remarks + * [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 a string, number, or boolean. Cells that contain an error will return the error string. + If the returned value starts with a plus ("+"), minus ("-"), or equal sign ("="), Excel interprets this value as a formula. + * + * @remarks + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJson` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the en-US locale. To retrieve data in the user's display locale, use `Range.valuesAsJsonLocal`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJson?: boolean; + /** + * For EACH ITEM in the collection: A JSON representation of the values in the cells in this range. + Unlike `Range.values`, `Range.valuesAsJsonLocal` supports all data types which can be in a cell. Examples include formatted number values and web images, in addition to the standard boolean, number, and string values. + Data returned from this API always aligns with the user's display locale. To retrieve data independent of locale, use `Range.valuesAsJson`. + * + * @remarks + * [Api set: ExcelApi 1.16] + */ + valuesAsJsonLocal?: boolean; + /** + * For EACH ITEM in the collection: Returns the distance in points, for 100% zoom, from the left edge of the range to the right edge of the range. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: boolean; + } + /** + * Contains the collection of cross-workbook level ranges. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + interface RangeAreasCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns a data validation object for all ranges in the `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dataValidation?: Excel.Interfaces.DataValidationLoadOptions; + /** + * For EACH ITEM in the collection: Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all ranges in the `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the worksheet for the current `RangeAreas`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Returns the `RangeAreas` 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"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + address?: boolean; + /** + * For EACH ITEM in the collection: Returns the `RangeAreas` reference in the user locale. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + addressLocal?: boolean; + /** + * For EACH ITEM in the collection: Returns the number of rectangular ranges that comprise this `RangeAreas` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + areaCount?: boolean; + /** + * For EACH ITEM in the collection: 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). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + cellCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isEntireColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isEntireRow?: boolean; + /** + * For EACH ITEM in the collection: 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: boolean; + } + /** + * Represents a collection of comment objects that are part of the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface CommentCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the email of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorEmail?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorName?: boolean; + /** + * For EACH ITEM in the collection: The comment's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: Gets the content type of the comment. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + contentType?: boolean; + /** + * For EACH ITEM in the collection: Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + creationDate?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: boolean; + /** + * For EACH ITEM in the collection: The comment thread status. A value of `true` means that the comment thread is resolved. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + /** + * For EACH ITEM in the collection: Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent?: boolean; + } + /** + * Represents a comment in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface CommentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorEmail?: boolean; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorName?: boolean; + /** + * The comment's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: boolean; + /** + * Gets the content type of the comment. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + contentType?: boolean; + /** + * Gets the creation time of the comment. Returns `null` if the comment was converted from a note, since the comment does not have a creation date. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + creationDate?: boolean; + /** + * Specifies the comment identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * Gets the entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: boolean; + /** + * The comment thread status. A value of `true` means that the comment thread is resolved. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + /** + * Gets the rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent?: boolean; + } + /** + * Represents a collection of comment reply objects that are part of the comment. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface CommentReplyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the email of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorEmail?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorName?: boolean; + /** + * For EACH ITEM in the collection: The comment reply's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: The content type of the reply. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + contentType?: boolean; + /** + * For EACH ITEM in the collection: Gets the creation time of the comment reply. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + creationDate?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment reply identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: boolean; + /** + * For EACH ITEM in the collection: The comment reply status. A value of `true` means the reply is in the resolved state. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + /** + * For EACH ITEM in the collection: The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent?: boolean; + } + /** + * Represents a comment reply in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface CommentReplyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorEmail?: boolean; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + authorName?: boolean; + /** + * The comment reply's content. The string is plain text. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + content?: boolean; + /** + * The content type of the reply. + * + * @remarks + * [Api set: ExcelApi 1.12] + */ + contentType?: boolean; + /** + * Gets the creation time of the comment reply. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + creationDate?: boolean; + /** + * Specifies the comment reply identifier. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * The entities (e.g., people) that are mentioned in comments. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + mentions?: boolean; + /** + * The comment reply status. A value of `true` means the reply is in the resolved state. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + resolved?: boolean; + /** + * The rich comment content (e.g., mentions in comments). This string is not meant to be displayed to end-users. Your add-in should only use this to parse rich comment content. + * + * @remarks + * [Api set: ExcelApi 1.11] + */ + richContent?: boolean; + } + /** + * Represents a collection of all the shapes in the worksheet. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the fill formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.Interfaces.ShapeFillLoadOptions; + /** + * For EACH ITEM in the collection: Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions; + /** + * For EACH ITEM in the collection: Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + group?: Excel.Interfaces.ShapeGroupLoadOptions; + /** + * For EACH ITEM in the collection: Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + image?: Excel.Interfaces.ImageLoadOptions; + /** + * For EACH ITEM in the collection: Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + line?: Excel.Interfaces.LineLoadOptions; + /** + * For EACH ITEM in the collection: Returns the line formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the parent group of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentGroup?: Excel.Interfaces.ShapeLoadOptions; + /** + * For EACH ITEM in the collection: Returns the text frame object of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + textFrame?: Excel.Interfaces.TextFrameLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the alternative description text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextDescription?: boolean; + /** + * For EACH ITEM in the collection: Specifies the alternative title text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextTitle?: boolean; + /** + * For EACH ITEM in the collection: Returns the number of connection sites on this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectionSiteCount?: boolean; + /** + * For EACH ITEM in the collection: Gets the display name of the shape. A newly created shape has a generated name + that is localized and may not match its `name`. In this scenario, you can use + this API to get the name that is displayed in the UI. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + displayName?: boolean; + /** + * For EACH ITEM in the collection: Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShapeType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the height, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the aspect ratio of this shape is locked. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lockAspectRatio?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Represents how the object is attached to the cells below it. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + placement?: boolean; + /** + * For EACH ITEM in the collection: Specifies the rotation, in degrees, of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rotation?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Returns the type of this shape. See `Excel.ShapeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the shape is visible. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: boolean; + /** + * For EACH ITEM in the collection: Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zOrderPosition?: boolean; + } + /** + * Represents a generic shape object in the worksheet. A shape could be a geometric shape, a line, a group of shapes, etc. + To learn more about the shape object model, read {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-shapes | Work with shapes using the Excel JavaScript API}. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the fill formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.Interfaces.ShapeFillLoadOptions; + /** + * Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions; + /** + * Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + group?: Excel.Interfaces.ShapeGroupLoadOptions; + /** + * Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + image?: Excel.Interfaces.ImageLoadOptions; + /** + * Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + line?: Excel.Interfaces.LineLoadOptions; + /** + * Returns the line formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions; + /** + * Specifies the parent group of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentGroup?: Excel.Interfaces.ShapeLoadOptions; + /** + * Returns the text frame object of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + textFrame?: Excel.Interfaces.TextFrameLoadOptions; + /** + * Specifies the alternative description text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextDescription?: boolean; + /** + * Specifies the alternative title text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextTitle?: boolean; + /** + * Returns the number of connection sites on this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectionSiteCount?: boolean; + /** + * Gets the display name of the shape. A newly created shape has a generated name + that is localized and may not match its `name`. In this scenario, you can use + this API to get the name that is displayed in the UI. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + displayName?: boolean; + /** + * Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShapeType?: boolean; + /** + * Specifies the height, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + height?: boolean; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + /** + * The distance, in points, from the left side of the shape to the left side of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: boolean; + /** + * Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: boolean; + /** + * Specifies if the aspect ratio of this shape is locked. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lockAspectRatio?: boolean; + /** + * Specifies the name of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: boolean; + /** + * Represents how the object is attached to the cells below it. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + placement?: boolean; + /** + * Specifies the rotation, in degrees, of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rotation?: boolean; + /** + * The distance, in points, from the top edge of the shape to the top edge of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: boolean; + /** + * Returns the type of this shape. See `Excel.ShapeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: boolean; + /** + * Specifies if the shape is visible. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * Specifies the width, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: boolean; + /** + * Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zOrderPosition?: boolean; + } + /** + * Represents a geometric shape inside a worksheet. A geometric shape can be a rectangle, block arrow, equation symbol, flowchart item, star, banner, callout, or any other basic shape in Excel. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface GeometricShapeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the `Shape` object for the geometric shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shape?: Excel.Interfaces.ShapeLoadOptions; + /** + * Returns the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + } + /** + * Represents an image in the worksheet. To get the corresponding `Shape` object, use `Image.shape`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ImageLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the `Shape` object associated with the image. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shape?: Excel.Interfaces.ShapeLoadOptions; + /** + * Specifies the shape identifier for the image object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + /** + * Returns the format of the image. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + format?: boolean; + } + /** + * Represents a shape group inside a worksheet. To get the corresponding `Shape` object, use `ShapeGroup.shape`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeGroupLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the `Shape` object associated with the group. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shape?: Excel.Interfaces.ShapeLoadOptions; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + } + /** + * Represents the shape collection inside a shape group. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface GroupShapeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the fill formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + fill?: Excel.Interfaces.ShapeFillLoadOptions; + /** + * For EACH ITEM in the collection: Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions; + /** + * For EACH ITEM in the collection: Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + group?: Excel.Interfaces.ShapeGroupLoadOptions; + /** + * For EACH ITEM in the collection: Returns the image associated with the shape. An error will be thrown if the shape type is not "Image". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + image?: Excel.Interfaces.ImageLoadOptions; + /** + * For EACH ITEM in the collection: Returns the line associated with the shape. An error will be thrown if the shape type is not "Line". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + line?: Excel.Interfaces.LineLoadOptions; + /** + * For EACH ITEM in the collection: Returns the line formatting of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the parent group of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + parentGroup?: Excel.Interfaces.ShapeLoadOptions; + /** + * For EACH ITEM in the collection: Returns the text frame object of this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + textFrame?: Excel.Interfaces.TextFrameLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the alternative description text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextDescription?: boolean; + /** + * For EACH ITEM in the collection: Specifies the alternative title text for a `Shape` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + altTextTitle?: boolean; + /** + * For EACH ITEM in the collection: Returns the number of connection sites on this shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectionSiteCount?: boolean; + /** + * For EACH ITEM in the collection: Gets the display name of the shape. A newly created shape has a generated name + that is localized and may not match its `name`. In this scenario, you can use + this API to get the name that is displayed in the UI. + * + * @remarks + * [Api set: ExcelApi 1.15] + */ + displayName?: boolean; + /** + * For EACH ITEM in the collection: Specifies the geometric shape type of this geometric shape. See `Excel.GeometricShapeType` for details. Returns `null` if the shape type is not "GeometricShape". + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + geometricShapeType?: boolean; + /** + * For EACH ITEM in the collection: Specifies the height, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Specifies the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + level?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the aspect ratio of this shape is locked. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + lockAspectRatio?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Represents how the object is attached to the cells below it. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + placement?: boolean; + /** + * For EACH ITEM in the collection: Specifies the rotation, in degrees, of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rotation?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the worksheet. + Throws an `InvalidArgument` exception when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Returns the type of this shape. See `Excel.ShapeType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies if the shape is visible. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width, in points, of the shape. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + width?: boolean; + /** + * For EACH ITEM in the collection: Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + zOrderPosition?: boolean; + } + /** + * Represents a line inside a worksheet. To get the corresponding `Shape` object, use `Line.shape`. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface LineLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the shape to which the beginning of the specified line is attached. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginConnectedShape?: Excel.Interfaces.ShapeLoadOptions; + /** + * Represents the shape to which the end of the specified line is attached. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endConnectedShape?: Excel.Interfaces.ShapeLoadOptions; + /** + * Returns the `Shape` object associated with the line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + shape?: Excel.Interfaces.ShapeLoadOptions; + /** + * Represents the length of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadLength?: boolean; + /** + * Represents the style of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadStyle?: boolean; + /** + * Represents the width of the arrowhead at the beginning of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginArrowheadWidth?: boolean; + /** + * Represents the connection site to which the beginning of a connector is connected. Returns `null` when the beginning of the line is not attached to any shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + beginConnectedSite?: boolean; + /** + * Represents the length of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadLength?: boolean; + /** + * Represents the style of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadStyle?: boolean; + /** + * Represents the width of the arrowhead at the end of the specified line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endArrowheadWidth?: boolean; + /** + * Represents the connection site to which the end of a connector is connected. Returns `null` when the end of the line is not attached to any shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + endConnectedSite?: boolean; + /** + * Specifies the shape identifier. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + id?: boolean; + /** + * Specifies if the beginning of the specified line is connected to a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isBeginConnected?: boolean; + /** + * Specifies if the end of the specified line is connected to a shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + isEndConnected?: boolean; + /** + * Represents the connector type for the line. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + connectorType?: boolean; + } + /** + * Represents the fill formatting of a shape object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeFillLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange") + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + foregroundColor?: boolean; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency?: boolean; + /** + * Returns the fill type of the shape. See `Excel.ShapeFillType` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + type?: boolean; + } + /** + * Represents the line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeLineFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: boolean; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent dash styles. See `Excel.ShapeLineDashStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + dashStyle?: boolean; + /** + * Represents the line style of the shape. Returns `null` when the line is not visible or there are inconsistent styles. See `Excel.ShapeLineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + style?: boolean; + /** + * Represents the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + transparency?: boolean; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + visible?: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + weight?: boolean; + } + /** + * Represents the text frame of a shape object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface TextFrameLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See `Excel.TextRange` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + textRange?: Excel.Interfaces.TextRangeLoadOptions; + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + autoSizeSetting?: boolean; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + bottomMargin?: boolean; + /** + * Specifies if the text frame contains text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + hasText?: boolean; + /** + * Represents the horizontal alignment of the text frame. See `Excel.ShapeTextHorizontalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalAlignment?: boolean; + /** + * Represents the horizontal overflow behavior of the text frame. See `Excel.ShapeTextHorizontalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + horizontalOverflow?: boolean; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + leftMargin?: boolean; + /** + * Represents the angle to which the text is oriented for the text frame. See `Excel.ShapeTextOrientation` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + orientation?: boolean; + /** + * Represents the reading order of the text frame, either left-to-right or right-to-left. See `Excel.ShapeTextReadingOrder` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + readingOrder?: boolean; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + rightMargin?: boolean; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + topMargin?: boolean; + /** + * Represents the vertical alignment of the text frame. See `Excel.ShapeTextVerticalAlignment` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalAlignment?: boolean; + /** + * Represents the vertical overflow behavior of the text frame. See `Excel.ShapeTextVerticalOverflow` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + verticalOverflow?: boolean; + } + /** + * Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface TextRangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a `ShapeFont` object that represents the font attributes for the text range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + font?: Excel.Interfaces.ShapeFontLoadOptions; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + text?: boolean; + } + /** + * Represents the font attributes, such as font name, font size, and color, for a shape's `TextRange` object. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + interface ShapeFontLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + 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. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + color?: boolean; + /** + * Represents the italic status of font. Returns `null` if the `TextRange` includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + italic?: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + name?: boolean; + /** + * Represents font size in points (e.g., 11). Returns `null` if the `TextRange` includes text fragments with different font sizes. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + size?: boolean; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See `Excel.ShapeFontUnderlineStyle` for details. + * + * @remarks + * [Api set: ExcelApi 1.9] + */ + underline?: boolean; + } + /** + * Represents a `Slicer` object in the workbook. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface SlicerLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The style applied to the slicer. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + slicerStyle?: Excel.Interfaces.SlicerStyleLoadOptions; + /** + * Represents the worksheet containing the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * Represents the caption of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + caption?: boolean; + /** + * Represents the height, in points, of the slicer. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: boolean; + /** + * Represents the unique ID of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * Value is `true` if all filters currently applied on the slicer are cleared. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isFilterCleared?: boolean; + /** + * Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: boolean; + /** + * Represents the name of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * Represents the slicer name used in the formula. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula?: boolean; + /** + * Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + sortBy?: boolean; + /** + * Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + style?: boolean; + /** + * Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: boolean; + /** + * Represents the width, in points, of the slicer. + Throws an `InvalidArgument` error when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: boolean; + } + /** + * Represents a collection of all the slicer objects in the workbook or a worksheet. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface SlicerCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The style applied to the slicer. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + slicerStyle?: Excel.Interfaces.SlicerStyleLoadOptions; + /** + * For EACH ITEM in the collection: Represents the worksheet containing the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * For EACH ITEM in the collection: Represents the caption of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + caption?: boolean; + /** + * For EACH ITEM in the collection: Represents the height, in points, of the slicer. + Throws an `InvalidArgument` exception when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Represents the unique ID of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Value is `true` if all filters currently applied on the slicer are cleared. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isFilterCleared?: boolean; + /** + * For EACH ITEM in the collection: Represents the distance, in points, from the left side of the slicer to the left of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Represents the name of the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Represents the slicer name used in the formula. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + nameInFormula?: boolean; + /** + * For EACH ITEM in the collection: Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending". + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + sortBy?: boolean; + /** + * For EACH ITEM in the collection: Constant value that represents the slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. + Throws an `InvalidArgument` error when set with a negative value as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Represents the width, in points, of the slicer. + Throws an `InvalidArgument` error when set with a negative value or zero as an input. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + width?: boolean; + } + /** + * Represents a slicer item in a slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface SlicerItemLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Value is `true` if the slicer item has data. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + hasData?: boolean; + /** + * Value is `true` if the slicer item is selected. + Setting this value will not clear the selected state of other slicer items. + By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSelected?: boolean; + /** + * Represents the unique value representing the slicer item. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + key?: boolean; + /** + * Represents the title displayed in the Excel UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + } + /** + * Represents a collection of all the slicer item objects in the slicer. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + interface SlicerItemCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Value is `true` if the slicer item has data. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + hasData?: boolean; + /** + * For EACH ITEM in the collection: Value is `true` if the slicer item is selected. + Setting this value will not clear the selected state of other slicer items. + By default, if the slicer item is the only one selected, when it is deselected, all items will be selected. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + isSelected?: boolean; + /** + * For EACH ITEM in the collection: Represents the unique value representing the slicer item. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Represents the title displayed in the Excel UI. + * + * @remarks + * [Api set: ExcelApi 1.10] + */ + name?: boolean; + } + /** + * Represents a linked data type. + A linked data type is a data type connected to an online data source. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface LinkedDataTypeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The name of the data provider for the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dataProvider?: boolean; + /** + * The local time-zone date and time since the workbook was opened when the linked data type was last refreshed. + Returns `undefined` if the linked data type has not been refreshed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lastRefreshed?: boolean; + /** + * The name of the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + /** + * The frequency, in seconds, at which the linked data type is refreshed if `refreshMode` is set to "Periodic". + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + periodicRefreshInterval?: boolean; + /** + * The mechanism by which the data for the linked data type is retrieved. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshMode?: boolean; + /** + * The unique ID of the linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceId?: boolean; + /** + * Returns an array with all the refresh modes supported by the linked data type. The contents of the array may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + supportedRefreshModes?: boolean; + } + /** + * Represents a collection of linked data types. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface LinkedDataTypeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The name of the data provider for the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dataProvider?: boolean; + /** + * For EACH ITEM in the collection: The local time-zone date and time since the workbook was opened when the linked data type was last refreshed. + Returns `undefined` if the linked data type has not been refreshed. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lastRefreshed?: boolean; + /** + * For EACH ITEM in the collection: The name of the linked data type. This may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + /** + * For EACH ITEM in the collection: The frequency, in seconds, at which the linked data type is refreshed if `refreshMode` is set to "Periodic". + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + periodicRefreshInterval?: boolean; + /** + * For EACH ITEM in the collection: The mechanism by which the data for the linked data type is retrieved. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + refreshMode?: boolean; + /** + * For EACH ITEM in the collection: The unique ID of the linked data type. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + serviceId?: boolean; + /** + * For EACH ITEM in the collection: Returns an array with all the refresh modes supported by the linked data type. The contents of the array may change when information is retrieved from the service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + supportedRefreshModes?: boolean; + } + /** + * Represents a named sheet view of a worksheet. A sheet view stores the sort and filter rules for a particular worksheet. + Every sheet view (even a temporary sheet view) has a unique, worksheet-scoped name that is used to access the view. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface NamedSheetViewLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets or sets the name of the sheet view. + The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + name?: boolean; + } + /** + * Represents the collection of sheet views in the worksheet. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + interface NamedSheetViewCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets or sets the name of the sheet view. + The temporary sheet view name is the empty string (""). Naming the view by using the name property causes the sheet view to be saved. + * + * @remarks + * [Api set: ExcelApiOnline 1.1] + */ + name?: boolean; + } + /** + * An object containing the result of a function-evaluation operation + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + interface FunctionResultLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [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). + * + * @remarks + * [Api set: ExcelApi 1.2] + */ + value?: boolean; + } + } +} +declare var _EndExcel: string; + + +//////////////////////////////////////////////////////////////// +//////////////////////// End Excel APIs //////////////////////// +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// +/////////////////////// Begin Word APIs //////////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace Word { + /** + * Represents the application object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param base64File Optional. The Base64-encoded .docx file. The default value is null. + */ + createDocument(base64File?: string): Word.DocumentCreated; + /** + * Parse styles from template Base64 file and return JSON format of retrieved styles as a string. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param base64File Required. The template file. + */ + retrieveStylesFromBase64(base64File: string): OfficeExtension.ClientResult; + /** + * Create a new instance of Word.Application object + */ + static newObject(context: OfficeExtension.ClientRequestContext): Word.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 Word.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * Represents the body of a document or a section. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the body. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the body. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the body. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the body. The collection does not include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the collection of list objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * Gets the collection of paragraph objects in the body. **Important**: Paragraphs in tables are not returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. + * + * @remarks + * [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 an `ItemNotFound` error if there isn't a parent body. + * + * @remarks + * [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. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBodyOrNullObject: Word.Body; + /** + * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentSection: Word.Section; + /** + * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentSectionOrNullObject: Word.Section; + /** + * Gets the collection of table objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly type: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; + /** + * 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. + * @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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Gets comments associated with the body. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported content controls in the body. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + Make sure that your add-in respects it and is ready to handle new content control types. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param options Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * 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 on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Body.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets the OOXML (Office Open XML) representation of the body object. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * Gets the whole body, or the starting or ending point of the body, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Inserts a break at the specified location in the main document. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add to the body. + * @param insertLocation Required. The value must be 'Start' or 'End'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): void; + /** + * Wraps the Body object with a content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param contentControlType Optional. The content control type. The default is 'RichText'. + */ + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | "RichText" | "PlainText"): Word.ContentControl; + /** + * Inserts a document into the body at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts HTML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in the document. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a picture into the body at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The Base64-encoded image to be inserted in the body. + * @param insertLocation Required. The value must be 'Start' or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.InlinePicture; + /** + * Inserts OOXML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must be 'Start' or 'End'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [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 must 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.start | Word.InsertLocation.end | "Start" | "End", values?: string[][]): Word.Table; + /** + * Inserts text into the body at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the body and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.BodyLoadOptions): Word.Body; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Body; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Body; + /** + * Occurs when new comments are added. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentAdded: OfficeExtension.EventHandlers; + /** + * Occurs when a comment or its reply is changed. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentChanged: OfficeExtension.EventHandlers; + /** + * Occurs when comments are deleted. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentDeleted: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is deselected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentDeselected: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is selected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentSelected: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Body; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Body object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BodyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.BodyData; + } + class BodyCustom { + private getDocument(); + private getReferenceId(); + } + interface Body extends OfficeExtension.ClientObject, BodyCustom { + } + /** + * Represents a comment in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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; + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange: Word.CommentContentRange; + /** + * Gets the collection of reply objects associated with the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly replies: Word.CommentReplyCollection; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorEmail: string; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorName: string; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content: string; + /** + * Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly creationDate: Date; + /** + * Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly id: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved: 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. + * @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: Word.Comment): void; + /** + * Deletes the comment and its replies. + * + * @remarks + * [Api set: WordApi 1.4] + */ + delete(): void; + /** + * Gets the range in the main document where the comment is on. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getRange(): Word.Range; + /** + * Adds a new reply to the end of the comment thread. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param replyText Required. Reply text. + */ + reply(replyText: string): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentLoadOptions): Word.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Comment; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Comment; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.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 Word.Comment object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CommentData; + } + /** + * Contains a collection of {@link Word.Comment} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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: Word.Comment[]; + /** + * Gets the first comment in the collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirst(): Word.Comment; + /** + * Gets the first comment in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirstOrNullObject(): Word.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.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 `Word.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CommentCollectionData; + } + /** + * @remarks + * [Api set: WordApi 1.4] + */ + class CommentContentRange 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; + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold: boolean; + /** + * 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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly isEmpty: boolean; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough: boolean; + /** + * Gets the text of the comment range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly text: string; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text is not underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * @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.CommentContentRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CommentContentRange): void; + /** + * Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param text Required. The text to be inserted in to the CommentContentRange. + * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.CommentContentRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentContentRangeLoadOptions): Word.CommentContentRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentContentRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CommentContentRange; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentContentRange; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.CommentContentRange; + /** + * 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 Word.CommentContentRange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentContentRangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CommentContentRangeData; + } + /** + * Represents a comment reply in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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; + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange: Word.CommentContentRange; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentComment: Word.Comment; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorEmail: string; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorName: string; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content: string; + /** + * Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly creationDate: Date; + /** + * Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * @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.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CommentReply): void; + /** + * Deletes the comment reply. + * + * @remarks + * [Api set: WordApi 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentReplyLoadOptions): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CommentReply; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentReply; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.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 Word.CommentReply object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CommentReplyData; + } + /** + * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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: Word.CommentReply[]; + /** + * Gets the first comment reply in the collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirst(): Word.CommentReply; + /** + * Gets the first comment reply in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirstOrNullObject(): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentReplyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentReplyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentReplyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentReplyCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentReplyCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.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 `Word.CommentReplyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CommentReplyCollectionData; + } + /** + * 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 and plain text content controls are supported. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the content control. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the content control. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the content control. The collection does not include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the collection of list objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * Gets the collection of paragraph objects in the content control. **Important**: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control are not returned. From requirement set 1.3, paragraphs in such tables are also returned. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the parent body of the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the content control. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the content control. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the content control. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets the collection of table objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color: string; + /** + * Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly id: number; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. **Note**: The set operation for this property is not supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText: string; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "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, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls. + * + * @remarks + * [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"; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag: string; + /** + * Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title: string; + /** + * Gets the content control type. Only rich text and plain text content controls are supported currently. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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 comments associated with the content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported child content controls in this content control. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + Make sure that your add-in respects it and is ready to handle new content control types. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param options Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * 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 on the web, etc.). If you need exact fidelity, or consistency across platforms, use `ContentControl.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets the Office Open XML (OOXML) representation of the content control object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', 'Before', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation | "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets the text ranges in the content control by using punctuation marks and/or other ending marks. + * + * @remarks + * [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. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType Required. Type of break. + * @param insertLocation Required. The value must be 'Start', 'End', 'Before', or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): void; + /** + * Inserts a document into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts HTML into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in to the content control. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts an inline picture into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The Base64-encoded image to be inserted in the content control. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; + /** + * Inserts OOXML into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted in to the content control. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must 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.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns into, or next to, a content control. + * + * @remarks + * [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 must 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.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After", values?: string[][]): Word.Table; + /** + * Inserts text into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text Required. The text to be inserted in to the content control. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must 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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must 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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControl; + /** + * Occurs when new comments are added. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentAdded: OfficeExtension.EventHandlers; + /** + * Occurs when a comment or its reply is changed. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentChanged: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is deselected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentDeselected: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is selected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentSelected: OfficeExtension.EventHandlers; + /** + * 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. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @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. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onDeleted: OfficeExtension.EventHandlers; + /** + * Occurs when the content control is entered. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onEntered: OfficeExtension.EventHandlers; + /** + * Occurs when the content control is exited, for example, when the cursor leaves the content control. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onExited: OfficeExtension.EventHandlers; + /** + * Occurs when selection within the content control is changed. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.ContentControl object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ContentControlData; + } + class ContentControlCustom { + private getDocument(); + private getReferenceId(); + } + interface ContentControl extends OfficeExtension.ClientObject, ContentControlCustom { + } + /** + * 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 and plain text content controls are supported. + * + * @remarks + * [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[]; + /** + * Gets the content controls that have the specified tracking state. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param changeTrackingStates Required. An array of content control change tracking states. + */ + getByChangeTrackingStates(changeTrackingStates: Word.ChangeTrackingState[]): Word.ContentControlCollection; + /** + * Gets a content control by its identifier. Throws an `ItemNotFound` error if there isn't a content control with the identifier in this collection. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param id Required. A content control identifier. + */ + getById(id: number): Word.ContentControl; + /** + * Gets a content control by its identifier. If there isn't a content control with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param types Required. An array of content control types. + */ + getByTypes(types: Word.ContentControlType[]): Word.ContentControlCollection; + /** + * Gets the first content control in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.ContentControl; + /** + * Gets the first content control in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.ContentControl; + /** + * Gets a content control by its ID. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param id The content control's ID. + */ + getItem(id: number): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.ContentControlCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ContentControlCollectionData; + } + /** + * Specifies the options that define which content controls are returned. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlOptions { + /** + * An array of content control types, item must be 'RichText' or 'PlainText'. + * + * @remarks + * [Api set: WordApi 1.5] + */ + types: Word.ContentControlType[]; + } + /** + * Represents a custom property. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly key: string; + /** + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly type: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; + /** + * Specifies the value of the custom property. Note that even though Word on the web 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). + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomProperty; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.CustomProperty object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CustomPropertyData; + } + /** + * Contains the collection of {@link Word.CustomProperty} objects. + * + * @remarks + * [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[]; + /** + * Creates a new or sets an existing custom property. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + deleteAll(): void; + /** + * Gets the count of custom properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom property object by its key, which is case-insensitive. Throws an `ItemNotFound` error if the custom property does not exist. + * + * @remarks + * [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. If the custom property does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomPropertyCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomPropertyCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CustomPropertyCollectionData; + } + /** + * Represents a custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly id: string; + /** + * Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly namespaceUri: string; + /** + * Deletes the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + delete(): void; + /** + * Deletes an attribute with the given name from the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + * @param name Required. Name of the attribute. + */ + deleteAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string): void; + /** + * Deletes the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + */ + deleteElement(xpath: string, namespaceMappings: { + [key: string]: string; + }): void; + /** + * Gets the full XML content of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getXml(): OfficeExtension.ClientResult; + /** + * Inserts an attribute with the given name and value to the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + * @param name Required. Name of the attribute. + * @param value Required. Value of the attribute. + */ + insertAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string, value: string): void; + /** + * Inserts the given XML under the parent element identified by xpath at child position index. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @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 property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + * @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: { + [key: string]: string; + }, index?: number): void; + /** + * Queries the XML content of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath Required. An XPath query. + * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + * @returns An array where each item represents an entry matched by the XPath query. + */ + query(xpath: string, namespaceMappings: { + [key: string]: string; + }): OfficeExtension.ClientResult; + /** + * Sets the full XML content of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + * @param name Required. Name of the attribute. + * @param value Required. New value of the attribute. + */ + updateAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string, value: string): void; + /** + * Updates the XML of the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @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 property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that does not used reserved XPath characters, such as the forward slash "/". + */ + updateElement(xpath: string, xml: string, namespaceMappings: { + [key: string]: string; + }): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomXmlPartLoadOptions): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomXmlPart; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.CustomXmlPart object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CustomXmlPartData; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param namespaceUri Required. The namespace URI. + */ + getByNamespace(namespaceUri: string): Word.CustomXmlPartScopedCollection; + /** + * Gets the number of items in the collection. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom XML part based on its ID. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. If the CustomXmlPart does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomXmlPartCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomXmlPartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomXmlPartCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.CustomXmlPartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CustomXmlPartCollectionData; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom XML part based on its ID. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. If the CustomXmlPart does not exist in the collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getOnlyItem(): Word.CustomXmlPart; + /** + * If the collection contains exactly one item, this method returns it. Otherwise, this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getOnlyItemOrNullObject(): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomXmlPartScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartScopedCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomXmlPartScopedCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.CustomXmlPartScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + 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. + * + * @remarks + * [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 main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly customXmlParts: Word.CustomXmlPartCollection; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly properties: Word.DocumentProperties; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly sections: Word.SectionCollection; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly settings: Word.SettingCollection; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; + /** + * 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. + * + * @remarks + * [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. + * @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; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name Required. A string representing the style name. + * @param type Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, type: Word.StyleType): Word.Style; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name Required. A string representing the style name. + * @param type Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, type: "Character" | "List" | "Paragraph" | "Table"): Word.Style; + /** + * Close current document. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param closeBehavior Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. + */ + close(closeBehavior?: Word.CloseBehavior): void; + /** + * Close current document. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param closeBehavior Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. + */ + close(closeBehavior?: "Save" | "SkipSave"): void; + /** + * Deletes a bookmark, if it exists, from the document. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + deleteBookmark(name: string): void; + /** + * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark does not exist. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + getBookmarkRange(name: string): Word.Range; + /** + * Gets a bookmark's range. If the bookmark does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + getBookmarkRangeOrNullObject(name: string): Word.Range; + /** + * Gets the currently supported content controls in the document. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + Make sure that your add-in respects it and is ready to handle new content control types. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param options Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets the document's endnotes in a single body. + Not implemented in Word on the web. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getEndnoteBody(): Word.Body; + /** + * Gets the document's footnotes in a single body. + Not implemented in Word on the web. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFootnoteBody(): Word.Body; + /** + * Gets the current selection of the document. Multiple selections are not supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getSelection(): Word.Range; + /** + * Gets a StyleCollection object that represents the whole style set of the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getStyles(): Word.StyleCollection; + /** + * Inserts a document into the target document at a specific location with additional properties. + Headers, footers, watermarks, and other section properties are copied by default. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + * @param insertFileOptions Optional. The additional properties that should be imported to the destination document. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; + /** + * Save the document. + * + * @remarks + * [Api set: WordApi 1.1] + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. + * + * @param saveBehavior Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. + * @param fileName Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; + /** + * Save the document. + * + * @remarks + * [Api set: WordApi 1.1] + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. + * + * @param saveBehavior Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. + * @param fileName Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; + /** + * Performs a search with the specified search options on the scope of the whole document. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApiOnline 1.1] + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.DocumentLoadOptions): Word.Document; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Document; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onContentControlAdded: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Document; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Document object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DocumentData; + } + class DocumentCustom { + } + interface Document extends OfficeExtension.ClientObject, DocumentCustom { + } + /** + * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + */ + readonly customXmlParts: Word.CustomXmlPartCollection; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly properties: Word.DocumentProperties; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly sections: Word.SectionCollection; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + * + * @param name Required. A string representing the style name. + * @param type Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, type: Word.StyleType): Word.Style; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + * + * @param name Required. A string representing the style name. + * @param type Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, type: "Character" | "List" | "Paragraph" | "Table"): Word.Style; + /** + * Deletes a bookmark, if it exists, from the document. + * + * @remarks + * [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 an `ItemNotFound` error if the bookmark does not exist. + * + * @remarks + * [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. If the bookmark does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + getBookmarkRangeOrNullObject(name: string): Word.Range; + /** + * Gets the currently supported content controls in the document. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + Make sure that your add-in respects it and is ready to handle new content control types. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + * + * @param options Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets a StyleCollection object that represents the whole style set of the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + */ + getStyles(): Word.StyleCollection; + /** + * Inserts a document into the target document at a specific location with additional properties. + Headers, footers, watermarks, and other section properties are copied by default. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + * @param insertFileOptions Optional. The additional properties that should be imported to the destination document. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; + /** + * Opens the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + open(): void; + /** + * Save the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. + * + * @param saveBehavior Optional. DocumentCreated only supports 'Save'. + * @param fileName Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; + /** + * Save the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. + * + * @param saveBehavior Optional. DocumentCreated only supports 'Save'. + * @param fileName Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DocumentCreated; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DocumentCreated; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.DocumentCreated object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentCreatedData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DocumentCreatedData; + } + /** + * Represents document properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly customProperties: Word.CustomPropertyCollection; + /** + * Gets the application name of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly applicationName: string; + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author: string; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category: string; + /** + * Specifies the comments of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments: string; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company: string; + /** + * Gets the creation date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly creationDate: Date; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format: string; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords: string; + /** + * Gets the last author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lastAuthor: string; + /** + * Gets the last print date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lastPrintDate: Date; + /** + * Gets the last save time of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lastSaveTime: Date; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager: string; + /** + * Gets the revision number of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly revisionNumber: string; + /** + * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly security: number; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject: string; + /** + * Gets the template of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly template: string; + /** + * Specifies the title of the document. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DocumentProperties; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DocumentProperties; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.DocumentProperties object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DocumentPropertiesData; + } + /** + * Represents a field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + class Field 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 body of the field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the field. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the field. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the field. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly result: Word.Range; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + */ + code: string; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data: string; + /** + * Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly kind: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked: boolean; + /** + * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + showCodes: boolean; + /** + * Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; + /** + * 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. + * @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.FieldUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Field): void; + /** + * Deletes the field. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Gets the next field. Throws an `ItemNotFound` error if this field is the last one. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getNext(): Word.Field; + /** + * Gets the next field. If this field is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getNextOrNullObject(): Word.Field; + /** + * Selects the field. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the field. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * Updates the field. + * + * @remarks + * [Api set: WordApi 1.5] + */ + updateResult(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.FieldLoadOptions): Word.Field; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Field; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Field; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Field; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.Field; + /** + * 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 Word.Field object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.FieldData; + } + /** + * Contains a collection of {@link Word.Field} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + class FieldCollection 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.Field[]; + /** + * Gets the first field in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirst(): Word.Field; + /** + * Gets the first field in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirstOrNullObject(): Word.Field; + /** + * Gets the Field object collection including the specified types of fields. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param types Required. An array of field types. + */ + getByTypes(types: Word.FieldType[]): Word.FieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.FieldCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.FieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.FieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.FieldCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.FieldCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.FieldCollection; + /** + * 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 `Word.FieldCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.FieldCollectionData; + } + /** + * Represents a font. + * + * @remarks + * [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; + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color: string; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough: boolean; + /** + * Specifies 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. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor: string; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name: string; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size: number; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.FontLoadOptions): Word.Font; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Font; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Font; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Font object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FontData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.FontData; + } + /** + * Represents an inline picture. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.2] + */ + readonly paragraph: Word.Paragraph; + /** + * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the inline image. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the inline image. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription: string; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle: string; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height: number; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink: string; + /** + * Gets the format of the inline image. + * + * @remarks + * [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"; + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: WordApi 1.2] + */ + delete(): void; + /** + * Gets the Base64-encoded string representation of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getBase64ImageSrc(): OfficeExtension.ClientResult; + /** + * Gets the next inline image. Throws an `ItemNotFound` error if this inline image is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.InlinePicture; + /** + * Gets the next inline image. If this inline image is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.InlinePicture; + /** + * Gets the picture, or the starting or ending point of the picture, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location must be 'Whole', 'Start', or 'End'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; + /** + * Inserts a break at the specified location in the main document. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param breakType Required. The break type to add. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; + /** + * Wraps the inline picture with a rich text content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + insertContentControl(): Word.ContentControl; + /** + * Inserts a document at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Inserts HTML at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param html Required. The HTML to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Inserts an inline picture at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The Base64-encoded image to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Before', or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.before | Word.InsertLocation.after | "Replace" | "Before" | "After"): Word.InlinePicture; + /** + * Inserts OOXML at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts text at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Selects the inline picture. This causes Word to scroll to the selection. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param selectionMode Optional. The selection mode must 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. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param selectionMode Optional. The selection mode must 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.InlinePicture; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.InlinePicture; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.InlinePicture object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.InlinePictureData; + } + /** + * Contains a collection of {@link Word.InlinePicture} objects. + * + * @remarks + * [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[]; + /** + * Gets the first inline image in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.InlinePicture; + /** + * Gets the first inline image in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.InlinePictureCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.InlinePictureCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.InlinePictureCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.InlinePictureCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.InlinePictureCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.InlinePictureCollectionData; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the list's id. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly levelExistences: boolean[]; + /** + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must be 'Start', 'End', 'Before', or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; + /** + * Resets the font of the bullet, number, or picture at the specified level in the list. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param alignment Required. The level alignment that must 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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param alignment Required. The level alignment that must 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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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?: Array): void; + /** + * Sets the numbering format at the specified level in the list. + * + * @remarks + * [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?: Array): void; + /** + * Sets the picture at the specified level in the list. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListLoadOptions): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.List; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.List object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ListData; + } + /** + * Contains a collection of {@link Word.List} objects. + * + * @remarks + * [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[]; + /** + * Gets a list by its identifier. Throws an `ItemNotFound` error if there isn't a list with the identifier in this collection. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id Required. A list identifier. + */ + getById(id: number): Word.List; + /** + * Gets a list by its identifier. If there isn't a list with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id Required. A list identifier. + */ + getByIdOrNullObject(id: number): Word.List; + /** + * Gets the first list in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.List; + /** + * Gets the first list in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.List; + /** + * Gets a list object by its ID. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id The list's ID. + */ + getItem(id: number): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.ListCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ListCollectionData; + } + /** + * Represents the paragraph list item format. + * + * @remarks + * [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; + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level: number; + /** + * Gets the list item bullet, number, or picture as a string. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listString: string; + /** + * Gets the list item order number in relation to its siblings. + * + * @remarks + * [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. + * @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 an `ItemNotFound` error if the list item has no ancestor. + * + * @remarks + * [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. If the list item has no ancestor, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListItemLoadOptions): Word.ListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.ListItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ListItemData; + } + /** + * Represents a list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class ListLevel 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 a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly font: Word.Font; + /** + * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedStyle: string; + /** + * Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberFormat: string; + /** + * Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberPosition: number; + /** + * Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberStyle: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; + /** + * Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + resetOnHigher: number; + /** + * Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + startAt: number; + /** + * Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + tabPosition: number; + /** + * Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textPosition: number; + /** + * Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingCharacter: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; + /** + * 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. + * @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.ListLevelUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ListLevel): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListLevelLoadOptions): Word.ListLevel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListLevel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ListLevel; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListLevel; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.ListLevel; + /** + * 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 Word.ListLevel object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ListLevelData; + } + /** + * Contains a collection of {@link Word.ListLevel} objects. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class ListLevelCollection 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.ListLevel[]; + /** + * Gets the first list level in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + getFirst(): Word.ListLevel; + /** + * Gets the first list level in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + getFirstOrNullObject(): Word.ListLevel; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListLevelCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListLevelCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListLevelCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListLevelCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListLevelCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.ListLevelCollection; + /** + * 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 `Word.ListLevelCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ListLevelCollectionData; + } + /** + * Represents a ListTemplate. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class ListTemplate 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 a ListLevels collection that represents all the levels for the specified ListTemplate. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly listLevels: Word.ListLevelCollection; + /** + * Specifies whether the specified ListTemplate object is outline numbered. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + outlineNumbered: 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. + * @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.ListTemplateUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ListTemplate): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListTemplateLoadOptions): Word.ListTemplate; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListTemplate; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ListTemplate; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListTemplate; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.ListTemplate; + /** + * 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 Word.ListTemplate object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListTemplateData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ListTemplateData; + } + /** + * Represents a footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + class NoteItem 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 body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly body: Word.Body; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly reference: Word.Range; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.NoteItemType | "Footnote" | "Endnote"; + /** + * 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. + * @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.NoteItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.NoteItem): void; + /** + * Deletes the note item. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getNext(): Word.NoteItem; + /** + * Gets the next note item of the same type. If this note item is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getNextOrNullObject(): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.NoteItemLoadOptions): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.NoteItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.NoteItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.NoteItem; + /** + * 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 Word.NoteItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.NoteItemData; + } + /** + * Contains a collection of {@link Word.NoteItem} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + class NoteItemCollection 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.NoteItem[]; + /** + * Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFirst(): Word.NoteItem; + /** + * Gets the first note item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFirstOrNullObject(): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.NoteItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.NoteItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.NoteItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.NoteItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.NoteItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.NoteItemCollection; + /** + * 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 `Word.NoteItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.NoteItemCollectionData; + } + /** + * Represents a single paragraph in a selection, range, content control, or document body. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the paragraph. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of fields in the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the paragraph. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the paragraph. The collection does not include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph is not in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly list: Word.List; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph is not part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listItem: Word.ListItem; + /** + * Gets the ListItem for the paragraph. If the paragraph is not part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listItemOrNullObject: Word.ListItem; + /** + * Gets the List to which this paragraph belongs. If the paragraph is not in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listOrNullObject: Word.List; + /** + * Gets the parent body of the paragraph. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the paragraph. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the paragraph. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent: number; + /** + * Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isLastParagraph: boolean; + /** + * Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isListItem: boolean; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent: number; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing: number; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter: number; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore: number; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel: number; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent: number; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter: number; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tableNestingLevel: number; + /** + * Gets the text of the paragraph. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Deletes the paragraph and its content from the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + delete(): void; + /** + * Moves this paragraph out of its list, if the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + detachFromList(): void; + /** + * Gets comments associated with the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported content controls in the paragraph. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param options Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * 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 on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Paragraph.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets the next paragraph. Throws an `ItemNotFound` error if the paragraph is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.Paragraph; + /** + * Gets the next paragraph. If the paragraph is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Paragraph; + /** + * Gets the Office Open XML (OOXML) representation of the paragraph object. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * Gets the previous paragraph. Throws an `ItemNotFound` error if the paragraph is the first one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getPrevious(): Word.Paragraph; + /** + * Gets the previous paragraph. If the paragraph is the first one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getPreviousOrNullObject(): Word.Paragraph; + /** + * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add to the document. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; + /** + * Wraps the Paragraph object with a content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param contentControlType Optional. The content control type. The default is 'RichText'. + */ + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | "RichText" | "PlainText"): Word.ContentControl; + /** + * Inserts a document into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts HTML into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in the paragraph. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a picture into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param base64EncodedImage Required. The Base64-encoded image to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; + /** + * Inserts OOXML into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted in the paragraph. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [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 must 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.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + /** + * Inserts text into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects and navigates the Word UI to the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * Splits the paragraph into child ranges by using delimiters. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Paragraph; + /** + * Occurs when new comments are added. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentAdded: OfficeExtension.EventHandlers; + /** + * Occurs when a comment or its reply is changed. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentChanged: OfficeExtension.EventHandlers; + /** + * Occurs when comments are deleted. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentDeleted: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is deselected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentDeselected: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is selected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentSelected: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Paragraph; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Paragraph object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ParagraphData; + } + class ParagraphCustom { + private getDocument(); + private getReferenceId(); + } + interface Paragraph extends OfficeExtension.ClientObject, ParagraphCustom { + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [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[]; + /** + * Gets the first paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Paragraph; + /** + * Gets the first paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Paragraph; + /** + * Gets the last paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getLast(): Word.Paragraph; + /** + * Gets the last paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ParagraphCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ParagraphCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ParagraphCollectionData; + } + /** + * Represents a style of paragraph in a document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + class ParagraphFormat 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; + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent: number; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent: number; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing: number; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter: number; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore: number; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent: number; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter: number; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore: number; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl: 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. + * @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.ParagraphFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ParagraphFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ParagraphFormatLoadOptions): Word.ParagraphFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ParagraphFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ParagraphFormat; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ParagraphFormat; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.ParagraphFormat; + /** + * 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 Word.ParagraphFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ParagraphFormatData; + } + /** + * Represents a contiguous area in a document. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the range. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the range. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of inline picture objects in the range. + * + * @remarks + * [Api set: WordApi 1.2] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the collection of list objects in the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * Gets the collection of paragraph objects in the range. **Important**: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this range are not returned. From requirement set 1.3, paragraphs in such tables are also returned. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the parent body of the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the range. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the range. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the range. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets the collection of table objects in the range. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isEmpty: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "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. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Compares this range's location with another range's location. + * + * @remarks + * [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. + * + * @remarks + * [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 an `ItemNotFound` error if the two ranges do not have a union. + * + * @remarks + * [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. If the two ranges do not have a union, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range Required. Another range. + */ + expandToOrNullObject(range: Word.Range): Word.Range; + /** + * Gets the names all bookmarks in or overlapping the range. A bookmark is hidden if its name starts with the underscore character. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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 comments associated with the range. + * + * @remarks + * [Api set: WordApi 1.4] + * @returns + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported content controls in the range. **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + Make sure that your add-in respects it and is ready to handle new content control types. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param options Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * 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 on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Range.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets hyperlink child ranges within the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getHyperlinkRanges(): Word.RangeCollection; + /** + * Gets the next text range by using punctuation marks and/or other ending marks. Throws an `ItemNotFound` error if this text range is the last one. + * + * @remarks + * [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. If this text range is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets the text child ranges in the range by using punctuation marks and/or other ending marks. + * + * @remarks + * [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 bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; + /** + * Insert a comment on the range. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param commentText Required. The comment text to be inserted. + * @returns comment object + */ + insertComment(commentText: string): Word.Comment; + /** + * Wraps the Range object with a content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param contentControlType Optional. The content control type. The default is 'RichText'. + */ + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | "RichText" | "PlainText"): Word.ContentControl; + /** + * Inserts an endnote. The endnote reference is placed after the range. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param insertText Optional. Text to be inserted into the endnote body. The default is "". + */ + insertEndnote(insertText?: string): Word.NoteItem; + /** + * Inserts a field at the specified location. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param insertLocation Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + * @param fieldType Optional. Can be any FieldType constant. The default value is Empty. + * @param text Optional. Additional properties or options if needed for specified field type. + * @param removeFormatting Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. + */ + insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: Word.FieldType, text?: string, removeFormatting?: boolean): Word.Field; + /** + * Inserts a field at the specified location. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param insertLocation Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + * @param fieldType Optional. Can be any FieldType constant. The default value is Empty. + * @param text Optional. Additional properties or options if needed for specified field type. + * @param removeFormatting Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. + */ + insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined", text?: string, removeFormatting?: boolean): Word.Field; + /** + * Inserts a document at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param base64File Required. The Base64-encoded content of a .docx file. + * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Inserts a footnote. The footnote reference is placed after the range. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param insertText Optional. Text to be inserted into the footnote body. The default is "". + */ + insertFootnote(insertText?: string): Word.NoteItem; + /** + * Inserts HTML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Inserts a picture at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The Base64-encoded image to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.InlinePicture; + /** + * Inserts OOXML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [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 must 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.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + /** + * Inserts text at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Returns a new range as the intersection of this range with another range. This range is not changed. Throws an `ItemNotFound` error if the two ranges are not overlapped or adjacent. + * + * @remarks + * [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. If the two ranges are not overlapped or adjacent, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects and navigates the Word UI to the range. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * Splits the range into child ranges by using delimiters. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.RangeLoadOptions): Word.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Range; + /** + * Occurs when new comments are added. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentAdded: OfficeExtension.EventHandlers; + /** + * Occurs when a comment or its reply is changed. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentChanged: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is deselected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentDeselected: OfficeExtension.EventHandlers; + /** + * Occurs when a comment is selected. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onCommentSelected: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Range; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Range object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.RangeData; + } + class RangeCustom { + private getDocument(); + private getReferenceId(); + } + interface Range extends OfficeExtension.ClientObject, RangeCustom { + } + /** + * Contains a collection of {@link Word.Range} objects. + * + * @remarks + * [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[]; + /** + * Gets the first range in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Range; + /** + * Gets the first range in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.RangeCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.RangeCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.RangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.RangeCollectionData; + } + /** + * Specifies the options to determine what to copy when inserting a file. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface InsertFileOptions { + /** + * Represents whether the change tracking mode status from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importChangeTrackingMode?: boolean; + /** + * Represents whether the custom properties from the source document should be imported. Overwrites existing properties with the same name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + importCustomProperties?: boolean; + /** + * Represents whether the custom XML parts from the source document should be imported. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + importCustomXmlParts?: boolean; + /** + * Represents whether the page color and other background information from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importPageColor?: boolean; + /** + * Represents whether the paragraph spacing from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importParagraphSpacing?: boolean; + /** + * Represents whether the styles from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importStyles?: boolean; + /** + * Represents whether the theme from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importTheme?: boolean; + } + /** + * Specifies the options to be included in a search operation. + To learn more about how to use search options in the Word JavaScript APIs, read {@link https://docs.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. + * + * @remarks + * [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; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.SearchOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.SearchOptions; + /** + * Create a new instance of Word.SearchOptions object + */ + static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; + /** + * 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 Word.SearchOptions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SearchOptionsData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.SearchOptionsData; + } + class SearchOptionsCustom { + matchWildCards: boolean; + } + interface SearchOptions extends OfficeExtension.ClientObject, SearchOptionsCustom { + } + /** + * Represents a section in a Word document. + * + * @remarks + * [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. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param type Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getFooter(type: Word.HeaderFooterType): Word.Body; + /** + * Gets one of the section's footers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param type Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getFooter(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; + /** + * Gets one of the section's headers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param type Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getHeader(type: Word.HeaderFooterType): Word.Body; + /** + * Gets one of the section's headers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param type Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getHeader(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; + /** + * Gets the next section. Throws an `ItemNotFound` error if this section is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.Section; + /** + * Gets the next section. If this section is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SectionLoadOptions): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Section; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Section object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.SectionData; + } + /** + * Contains the collection of the document's {@link Word.Section} objects. + * + * @remarks + * [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[]; + /** + * Gets the first section in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Section; + /** + * Gets the first section in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SectionCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.SectionCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SectionCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.SectionCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.SectionCollectionData; + } + /** + * Represents a setting of the add-in. + * + * @remarks + * [Api set: WordApi 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; + /** + * Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly key: string; + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 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. + * @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. + * + * @remarks + * [Api set: WordApi 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SettingLoadOptions): Word.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Setting; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Setting object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.SettingData; + } + class SettingCustom { + private static DateJSONPrefix; + private static DateJSONSuffix; + static replaceStringDateWithDate(value: any): any; + static replaceDateWithStringDate(value: any): any; + } + interface Setting extends OfficeExtension.ClientObject, SettingCustom { + } + /** + * Contains the collection of {@link Word.Setting} objects. + * + * @remarks + * [Api set: WordApi 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: Word.Setting[]; + /** + * Creates a new setting or sets an existing setting. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + deleteAll(): void; + /** + * Gets the count of settings. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a setting object by its key, which is case-sensitive. Throws an `ItemNotFound` error if the setting does not exist. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. If the setting does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SettingCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SettingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.SettingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SettingCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.SettingCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.SettingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.SettingCollectionData; + } + /** + * Contains a collection of {@link Word.Style} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + 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: Word.Style[]; + /** + * Get the style object by its name. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name Required. The style name. + */ + getByName(name: string): Word.Style; + /** + * If the corresponding style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name Required. The style name. + */ + getByNameOrNullObject(name: string): Word.Style; + /** + * Gets the number of the styles in the collection. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a style object by its index in the collection. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param index A number that identifies the index location of a style object. + */ + getItem(index: number): Word.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.StyleCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.StyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.StyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.StyleCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.StyleCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.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 `Word.StyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.StyleCollectionData; + } + /** + * Represents a style in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + 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; + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly font: Word.Font; + /** + * Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly listTemplate: Word.ListTemplate; + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly paragraphFormat: Word.ParagraphFormat; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly shading: Word.Shading; + /** + * Gets the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly baseStyle: string; + /** + * Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly builtIn: boolean; + /** + * Gets the description of the specified style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly description: string; + /** + * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly inUse: boolean; + /** + * Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly linked: boolean; + /** + * Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly nameLocal: string; + /** + * Gets the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly nextParagraphStyle: string; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority: number; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle: boolean; + /** + * Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility: 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. + * @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: Word.Style): void; + /** + * Deletes the style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.StyleLoadOptions): Word.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Style; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Style; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.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 Word.Style object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.StyleData; + } + /** + * Represents the shading object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class Shading 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; + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + backgroundPatternColor: string; + /** + * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + foregroundPatternColor: string; + /** + * Specifies the shading texture of the object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture: Word.ShadingTextureType | "Texture10Percent" | "Texture12Pt5Percent" | "Texture15Percent" | "Texture20Percent" | "Texture25Percent" | "Texture30Percent" | "Texture35Percent" | "Texture37Pt5Percent" | "Texture40Percent" | "Texture45Percent" | "Texture50Percent" | "Texture55Percent" | "Texture5Percent" | "Texture60Percent" | "Texture62Pt5Percent" | "Texture65Percent" | "Texture70Percent" | "Texture75Percent" | "Texture80Percent" | "Texture85Percent" | "Texture87Pt5Percent" | "Texture90Percent" | "Texture95Percent" | "TextureDarkDiagonalDown" | "TextureDarkDiagonalUp" | "TextureDarkGrid" | "TextureDarkHorizontal" | "TextureDarkTrellis" | "TextureDarkVertical" | "TextureLightDiagonalDown" | "TextureLightDiagonalUp" | "TextureLightGrid" | "TextureLightHorizontal" | "TextureLightTrellis" | "TextureLightVertical" | "TextureNone" | "TextureSolid"; + /** + * 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. + * @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.ShadingUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Shading): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ShadingLoadOptions): Word.Shading; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Shading; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Shading; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Shading; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.Shading; + /** + * 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 Word.Shading object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShadingData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ShadingData; + } + /** + * Represents a table in a Word document. + * + * @remarks + * [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 collection of endnotes in the table. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the table. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the parent body of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains this table. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains this table. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains this table. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets all of the table rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rows: Word.TableRowCollection; + /** + * Gets the child tables nested one level deeper. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount: number; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isUniform: boolean; + /** + * Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly nestingLevel: number; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rowCount: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style: string; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "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"; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values: string[][]; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Specifies the width of the table in points. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It must 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.start | Word.InsertLocation.end | "Start" | "End", 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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It must 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.start | Word.InsertLocation.end | "Start" | "End", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * Autofits the table columns to the width of the window. + * + * @remarks + * [Api set: WordApi 1.3] + */ + autoFitWindow(): void; + /** + * Clears the contents of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + clear(): void; + /** + * Deletes the entire table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * Deletes specific columns. This is applicable to uniform tables. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + distributeColumns(): void; + /** + * Gets the border style for the specified border. + * + * @remarks + * [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. + * + * @remarks + * [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 an `ItemNotFound` error if the specified table cell does not exist. + * + * @remarks + * [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. If the specified table cell does not exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * Gets the next table. Throws an `ItemNotFound` error if this table is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.Table; + /** + * Gets the next table. If this table is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Table; + /** + * Gets the paragraph after the table. Throws an `ItemNotFound` error if there isn't a paragraph after the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphAfter(): Word.Paragraph; + /** + * Gets the paragraph after the table. If there isn't a paragraph after the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphAfterOrNullObject(): Word.Paragraph; + /** + * Gets the paragraph before the table. Throws an `ItemNotFound` error if there isn't a paragraph before the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphBefore(): Word.Paragraph; + /** + * Gets the paragraph before the table. If there isn't a paragraph before the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location must be 'Whole', 'Start', 'End', or 'After'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | "Whole" | "Start" | "End" | "After"): Word.Range; + /** + * Inserts a content control on the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + insertContentControl(): Word.ContentControl; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [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 must 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.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + /** + * Merges the cells bounded inclusively by a first and last cell. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode must 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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableLoadOptions): Word.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Table; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.Table object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableData; + } + /** + * Contains the collection of the document's Table objects. + * + * @remarks + * [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[]; + /** + * Gets the first table in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Table; + /** + * Gets the first table in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.TableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TableCollectionData; + } + /** + * Represents a row in a Word document. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly cells: Word.TableCellCollection; + /** + * Gets the collection of endnotes in the table row. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the table row. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the table row. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly cellCount: number; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isHeader: boolean; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight: number; + /** + * Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rowIndex: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values: string[][]; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + clear(): void; + /** + * Deletes the entire row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * Gets the border style of the cells in the row. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * Gets the next row. Throws an `ItemNotFound` error if this row is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.TableRow; + /** + * Gets the next row. If this row is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.TableRow; + /** + * Inserts a content control on the row. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. Where the new rows should be inserted, relative to the current row. It must 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.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * Merges the row into one cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the row and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableRowLoadOptions): Word.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableRow; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.TableRow object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableRowData; + } + /** + * Contains the collection of the document's TableRow objects. + * + * @remarks + * [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[]; + /** + * Gets the first row in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.TableRow; + /** + * Gets the first row in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableRowCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableRowCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TableRowCollectionData; + } + /** + * Represents a table cell in a Word document. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly body: Word.Body; + /** + * Gets the parent row of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentRow: Word.TableRow; + /** + * Gets the parent table of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly cellIndex: number; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth: number; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rowIndex: number; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value: string; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Gets the width of the cell in points. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + deleteColumn(): void; + /** + * Deletes the row containing this cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + deleteRow(): void; + /** + * Gets the border style for the specified border. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * Gets the next cell. Throws an `ItemNotFound` error if this cell is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.TableCell; + /** + * Gets the next cell. If this cell is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It must 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.before | Word.InsertLocation.after | "Before" | "After", 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. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It must 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.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @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. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableCellLoadOptions): Word.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableCell; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.TableCell object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableCellData; + } + /** + * Contains the collection of the document's TableCell objects. + * + * @remarks + * [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[]; + /** + * Gets the first table cell in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.TableCell; + /** + * Gets the first table cell in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCellCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableCellCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCellCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableCellCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `Word.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TableCellCollectionData; + } + /** + * Specifies the border style. + * + * @remarks + * [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; + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color: string; + /** + * Specifies the type of the table border. + * + * @remarks + * [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"; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableBorder; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 Word.TableBorder object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableBorderData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableBorderData; + } + /** + * ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + enum ChangeTrackingMode { + /** + * ChangeTracking is turned off. + * @remarks + * [Api set: WordApi 1.4] + */ + off = "Off", + /** + * ChangeTracking is turned on for everyone. + * @remarks + * [Api set: WordApi 1.4] + */ + trackAll = "TrackAll", + /** + * Tracking is turned on for my changes only. + * @remarks + * [Api set: WordApi 1.4] + */ + trackMineOnly = "TrackMineOnly", + } + /** + * Specify the current version or the original version of the text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + enum ChangeTrackingVersion { + /** + * @remarks + * [Api set: WordApi 1.4] + */ + original = "Original", + /** + * @remarks + * [Api set: WordApi 1.4] + */ + current = "Current", + } + /** + * Specify the track state when ChangeTracking is on. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum ChangeTrackingState { + /** + * @remarks + * [Api set: WordApi 1.5] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + normal = "Normal", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + added = "Added", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + deleted = "Deleted", + } + /** + * Note item type + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum NoteItemType { + /** + * @remarks + * [Api set: WordApi 1.5] + */ + footnote = "Footnote", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + endnote = "Endnote", + } + /** + * Provides information about the type of a raised event. + * + * @remarks + * [Api set: WordApi 1.3] + */ + enum EventType { + /** + * ContentControlDeleted represents the event that the content control has been deleted. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlDeleted = "ContentControlDeleted", + /** + * ContentControlSelectionChanged represents the event that the selection in the content control has been changed. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlSelectionChanged = "ContentControlSelectionChanged", + /** + * ContentControlDataChanged represents the event that the data in the content control have been changed. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlDataChanged = "ContentControlDataChanged", + /** + * ContentControlAdded represents the event a content control has been added to the document. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlAdded = "ContentControlAdded", + /** + * AnnotationAdded represents the event an annotation has been added to the document. + * @remarks + * [Api set: WordApiOnline 1.1] + */ + annotationAdded = "AnnotationAdded", + /** + * AnnotationChanged represents the event an annotation has been updated in the document. + * @remarks + * [Api set: WordApiOnline 1.1] + */ + annotationChanged = "AnnotationChanged", + /** + * AnnotationDeleted represents the event an annotation has been deleted from the document. + * @remarks + * [Api set: WordApiOnline 1.1] + */ + annotationDeleted = "AnnotationDeleted", + /** + * Represents that one or more comments were deleted. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + commentDeleted = "CommentDeleted", + /** + * Represents that a comment was selected. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + commentSelected = "CommentSelected", + /** + * Represents that a comment was deselected. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + commentDeselected = "CommentDeselected", + /** + * Represents that a comment or its reply was changed. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + commentChanged = "CommentChanged", + /** + * Represents that one or more new comments were added. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + commentAdded = "CommentAdded", + /** + * Represents that a content control has been entered. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlEntered = "ContentControlEntered", + /** + * Represents that a content control has been exited. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlExited = "ContentControlExited", + /** + * Represents that a word count has been changed. + * @remarks + * [Api set: WordApi Unknown Version, this API may or may not work on a client. This API may not be released to 3rd parties.] + */ + documentWordCountChanged = "DocumentWordCountChanged", + } + /** + * An enum that specifies an event's source. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum EventSource { + /** + * @remarks + * [Api set: WordApi 1.5] + */ + local = "Local", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + remote = "Remote", + } + /** + * Provides information about the content control that raised an event. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ContentControlEventArgs { + /** + * The object that raised the event. Load this object to get its properties. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + contentControl: Word.ContentControl; + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlAdded event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlAddedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlDataChanged event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlDataChangedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlDeleted event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlDeletedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlEntered event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlEnteredEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlExited event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlExitedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlSelectionChanged event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ContentControlSelectionChangedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the comments that raised the comment event. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CommentEventArgs { + /** + * Represents how the comment changed event is triggered. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + changeType: Word.CommentChangeType | "none" | "edited" | "resolved" | "reopened" | "replyAdded" | "replyDeleted" | "replyEdited"; + /** + * Gets the CommentDetail array which contains the IDs and reply IDs of the involved comments. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + commentDetails: Word.CommentDetail[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Word.EventSource | "Local" | "Remote"; + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "DocumentWordCountChanged"; + } + /** + * A structure for the ID and reply IDs of this comment. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CommentDetail { + /** + * Represents the ID of this comment. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + id: string; + /** + * Represents the IDs of the replies to this comment. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + replyIds: string[]; + } + /** + * Represents how the comments in the event were changed. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + enum CommentChangeType { + /** + * No comment changed event is triggered. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + none = "none", + /** + * A comment was edited. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + edited = "edited", + /** + * A comment was resolved. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + resolved = "resolved", + /** + * A comment was reopened. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + reopened = "reopened", + /** + * A reply was added. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + replyAdded = "replyAdded", + /** + * A reply was deleted. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + replyDeleted = "replyDeleted", + /** + * A reply was edited. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + replyEdited = "replyEdited", + } + /** + * Specifies supported content control types and subtypes. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum ContentControlType { + /** + * @remarks + * [Api set: WordApi 1.1] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + richTextInline = "RichTextInline", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + richTextParagraphs = "RichTextParagraphs", + /** + * Contains a whole cell. + * @remarks + * [Api set: WordApi 1.1] + */ + richTextTableCell = "RichTextTableCell", + /** + * Contains a whole row. + * @remarks + * [Api set: WordApi 1.1] + */ + richTextTableRow = "RichTextTableRow", + /** + * Contains a whole table. + * @remarks + * [Api set: WordApi 1.1] + */ + richTextTable = "RichTextTable", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + plainTextInline = "PlainTextInline", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + plainTextParagraph = "PlainTextParagraph", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + picture = "Picture", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + buildingBlockGallery = "BuildingBlockGallery", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + checkBox = "CheckBox", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + comboBox = "ComboBox", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dropDownList = "DropDownList", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + datePicker = "DatePicker", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + repeatingSection = "RepeatingSection", + /** + * Identifies a rich text content control. + * @remarks + * [Api set: WordApi 1.1] + */ + richText = "RichText", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + plainText = "PlainText", + } + /** + * ContentControl appearance. + * + * @remarks + * [Api set: WordApi 1.1] + * Content control appearance options are BoundingBox, Tags, or Hidden. + */ + enum ContentControlAppearance { + /** + * Represents a content control shown as a shaded rectangle or bounding box (with optional title). + * @remarks + * [Api set: WordApi 1.1] + */ + boundingBox = "BoundingBox", + /** + * Represents a content control shown as start and end markers. + * @remarks + * [Api set: WordApi 1.1] + */ + tags = "Tags", + /** + * Represents a content control that is not shown. + * @remarks + * [Api set: WordApi 1.1] + */ + hidden = "Hidden", + } + /** + * The supported styles for underline format. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum UnderlineType { + /** + * @remarks + * [Api set: WordApi 1.1] + */ + mixed = "Mixed", + /** + * No underline. + * @remarks + * [Api set: WordApi 1.1] + */ + none = "None", + /** + * @deprecated Hidden is no longer supported. + * Warning: hidden has been deprecated. + * @remarks + * [Api set: WordApi 1.1] + */ + hidden = "Hidden", + /** + * @deprecated DotLine is no longer supported. + * Warning: dotLine has been deprecated. + * @remarks + * [Api set: WordApi 1.1] + */ + dotLine = "DotLine", + /** + * A single underline. This is the default value. + * @remarks + * [Api set: WordApi 1.1] + */ + single = "Single", + /** + * Only underline individual words. + * @remarks + * [Api set: WordApi 1.1] + */ + word = "Word", + /** + * A double underline. + * @remarks + * [Api set: WordApi 1.1] + */ + double = "Double", + /** + * A single thick underline. + * @remarks + * [Api set: WordApi 1.1] + */ + thick = "Thick", + /** + * A dotted underline. + * @remarks + * [Api set: WordApi 1.1] + */ + dotted = "Dotted", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dottedHeavy = "DottedHeavy", + /** + * A single dash underline. + * @remarks + * [Api set: WordApi 1.1] + */ + dashLine = "DashLine", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dashLineHeavy = "DashLineHeavy", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dashLineLong = "DashLineLong", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dashLineLongHeavy = "DashLineLongHeavy", + /** + * An alternating dot-dash underline. + * @remarks + * [Api set: WordApi 1.1] + */ + dotDashLine = "DotDashLine", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dotDashLineHeavy = "DotDashLineHeavy", + /** + * An alternating dot-dot-dash underline. + * @remarks + * [Api set: WordApi 1.1] + */ + twoDotDashLine = "TwoDotDashLine", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + twoDotDashLineHeavy = "TwoDotDashLineHeavy", + /** + * A single wavy underline. + * @remarks + * [Api set: WordApi 1.1] + */ + wave = "Wave", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + waveHeavy = "WaveHeavy", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + waveDouble = "WaveDouble", + } + /** + * Specifies the form of a break. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum BreakType { + /** + * Page break at the insertion point. + * @remarks + * [Api set: WordApi 1.1] + */ + page = "Page", + /** + * @deprecated Use sectionNext instead. + * Warning: next has been deprecated. Use sectionNext instead. + * @remarks + * [Api set: WordApi 1.1] + */ + next = "Next", + /** + * Section break on next page. + * @remarks + * [Api set: WordApi 1.1] + */ + sectionNext = "SectionNext", + /** + * New section without a corresponding page break. + * @remarks + * [Api set: WordApi 1.1] + */ + 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. + * @remarks + * [Api set: WordApi 1.1] + */ + 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. + * @remarks + * [Api set: WordApi 1.1] + */ + sectionOdd = "SectionOdd", + /** + * Line break. + * @remarks + * [Api set: WordApi 1.1] + */ + line = "Line", + } + /** + * The insertion location types. + * + * @remarks + * [Api set: WordApi 1.1] + * To be used with an API call, such as `obj.insertSomething(newStuff, location);`. + * If the location is "Before" or "After", the new content will be outside of the modified object. + * If the location is "Start" or "End", the new content will be included as part of the modified object. + */ + enum InsertLocation { + /** + * Add content before the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + before = "Before", + /** + * Add content after the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + after = "After", + /** + * Prepend content to the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + start = "Start", + /** + * Append content to the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + end = "End", + /** + * Replace the contents of the current object. + * @remarks + * [Api set: WordApi 1.1] + */ + replace = "Replace", + } + /** + * @remarks + * [Api set: WordApi 1.1] + */ + enum Alignment { + /** + * @remarks + * [Api set: WordApi 1.1] + */ + mixed = "Mixed", + /** + * Unknown alignment. + * @remarks + * [Api set: WordApi 1.1] + */ + unknown = "Unknown", + /** + * Alignment to the left. + * @remarks + * [Api set: WordApi 1.1] + */ + left = "Left", + /** + * Alignment to the center. + * @remarks + * [Api set: WordApi 1.1] + */ + centered = "Centered", + /** + * Alignment to the right. + * @remarks + * [Api set: WordApi 1.1] + */ + right = "Right", + /** + * Fully justified alignment. + * @remarks + * [Api set: WordApi 1.1] + */ + justified = "Justified", + } + /** + * @remarks + * [Api set: WordApi 1.1] + */ + enum HeaderFooterType { + /** + * Returns the header or footer on all pages of a section, but excludes the first page or even pages if they are different. + * @remarks + * [Api set: WordApi 1.1] + */ + primary = "Primary", + /** + * Returns the header or footer on the first page of a section. + * @remarks + * [Api set: WordApi 1.1] + */ + firstPage = "FirstPage", + /** + * Returns all headers or footers on even-numbered pages of a section. + * @remarks + * [Api set: WordApi 1.1] + */ + evenPages = "EvenPages", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BodyType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + mainDoc = "MainDoc", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + section = "Section", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + header = "Header", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footer = "Footer", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + tableCell = "TableCell", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + footnote = "Footnote", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + endnote = "Endnote", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + noteItem = "NoteItem", + } + /** + * This enum sets where the cursor (insertion point) in the document is after a selection. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum SelectionMode { + /** + * The entire range is selected. + * @remarks + * [Api set: WordApi 1.1] + */ + select = "Select", + /** + * The cursor is at the beginning of the selection (just before the start of the selected range). + * @remarks + * [Api set: WordApi 1.1] + */ + start = "Start", + /** + * The cursor is at the end of the selection (just after the end of the selected range). + * @remarks + * [Api set: WordApi 1.1] + */ + end = "End", + } + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ImageFormat { + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + unsupported = "Unsupported", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + undefined = "Undefined", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + bmp = "Bmp", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + jpeg = "Jpeg", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + gif = "Gif", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + tiff = "Tiff", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + png = "Png", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + icon = "Icon", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + exif = "Exif", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + wmf = "Wmf", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + emf = "Emf", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + pict = "Pict", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + pdf = "Pdf", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + svg = "Svg", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + whole = "Whole", + /** + * The starting point of the object. For content control, it is the point after the opening tag. + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + end = "End", + /** + * For content control only. It is the point before the opening tag. + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + after = "After", + /** + * The range between 'Start' and 'End'. + * @remarks + * [Api set: WordApi 1.3] + */ + content = "Content", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum LocationRelation { + /** + * Indicates that this instance and the range are in different sub-documents. + * @remarks + * [Api set: WordApi 1.3] + */ + unrelated = "Unrelated", + /** + * Indicates that this instance and the range represent the same range. + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + containsEnd = "ContainsEnd", + /** + * Indicates that this instance contains the range, with the exception of the start and end character of this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + 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. + * @remarks + * [Api set: WordApi 1.3] + */ + insideEnd = "InsideEnd", + /** + * Indicates that this instance is inside the range. The range does not share the same start and end characters as this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + inside = "Inside", + /** + * Indicates that this instance occurs before, and is adjacent to, the range. + * @remarks + * [Api set: WordApi 1.3] + */ + adjacentBefore = "AdjacentBefore", + /** + * Indicates that this instance starts before the range and overlaps the range’s first character. + * @remarks + * [Api set: WordApi 1.3] + */ + overlapsBefore = "OverlapsBefore", + /** + * Indicates that this instance occurs before the range. + * @remarks + * [Api set: WordApi 1.3] + */ + before = "Before", + /** + * Indicates that this instance occurs after, and is adjacent to, the range. + * @remarks + * [Api set: WordApi 1.3] + */ + adjacentAfter = "AdjacentAfter", + /** + * Indicates that this instance starts inside the range and overlaps the range’s last character. + * @remarks + * [Api set: WordApi 1.3] + */ + overlapsAfter = "OverlapsAfter", + /** + * Indicates that this instance occurs after the range. + * @remarks + * [Api set: WordApi 1.3] + */ + after = "After", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BorderLocation { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + top = "Top", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + left = "Left", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + right = "Right", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + insideHorizontal = "InsideHorizontal", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + insideVertical = "InsideVertical", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + inside = "Inside", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + outside = "Outside", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + all = "All", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum CellPaddingLocation { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + top = "Top", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + left = "Left", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + right = "Right", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BorderType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + mixed = "Mixed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + none = "None", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + single = "Single", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + double = "Double", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dotted = "Dotted", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dashed = "Dashed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dotDashed = "DotDashed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dot2Dashed = "Dot2Dashed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + triple = "Triple", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickSmall = "ThinThickSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thickThinSmall = "ThickThinSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickThinSmall = "ThinThickThinSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickMed = "ThinThickMed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thickThinMed = "ThickThinMed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickThinMed = "ThinThickThinMed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickLarge = "ThinThickLarge", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thickThinLarge = "ThickThinLarge", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickThinLarge = "ThinThickThinLarge", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + wave = "Wave", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + doubleWave = "DoubleWave", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dashedSmall = "DashedSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dashDotStroked = "DashDotStroked", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + threeDEmboss = "ThreeDEmboss", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + threeDEngrave = "ThreeDEngrave", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum VerticalAlignment { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + mixed = "Mixed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + top = "Top", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + center = "Center", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bottom = "Bottom", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum ListLevelType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bullet = "Bullet", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + number = "Number", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + picture = "Picture", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum ListBullet { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + custom = "Custom", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + solid = "Solid", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + hollow = "Hollow", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + square = "Square", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + diamonds = "Diamonds", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + arrow = "Arrow", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + checkmark = "Checkmark", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum ListNumbering { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + none = "None", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + arabic = "Arabic", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + upperRoman = "UpperRoman", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + lowerRoman = "LowerRoman", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + upperLetter = "UpperLetter", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + lowerLetter = "LowerLetter", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BuiltInStyleName { + /** + * Mixed styles or other style not in this list. + * @remarks + * [Api set: WordApi 1.3] + */ + other = "Other", + /** + * Reset character and paragraph style to default. + * @remarks + * [Api set: WordApi 1.3] + */ + normal = "Normal", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading1 = "Heading1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading2 = "Heading2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading3 = "Heading3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading4 = "Heading4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading5 = "Heading5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading6 = "Heading6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading7 = "Heading7", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading8 = "Heading8", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading9 = "Heading9", + /** + * Table-of-content level 1. + * @remarks + * [Api set: WordApi 1.3] + */ + toc1 = "Toc1", + /** + * Table-of-content level 2. + * @remarks + * [Api set: WordApi 1.3] + */ + toc2 = "Toc2", + /** + * Table-of-content level 3. + * @remarks + * [Api set: WordApi 1.3] + */ + toc3 = "Toc3", + /** + * Table-of-content level 4. + * @remarks + * [Api set: WordApi 1.3] + */ + toc4 = "Toc4", + /** + * Table-of-content level 5. + * @remarks + * [Api set: WordApi 1.3] + */ + toc5 = "Toc5", + /** + * Table-of-content level 6. + * @remarks + * [Api set: WordApi 1.3] + */ + toc6 = "Toc6", + /** + * Table-of-content level 7. + * @remarks + * [Api set: WordApi 1.3] + */ + toc7 = "Toc7", + /** + * Table-of-content level 8. + * @remarks + * [Api set: WordApi 1.3] + */ + toc8 = "Toc8", + /** + * Table-of-content level 9. + * @remarks + * [Api set: WordApi 1.3] + */ + toc9 = "Toc9", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footnoteText = "FootnoteText", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + header = "Header", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footer = "Footer", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + caption = "Caption", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footnoteReference = "FootnoteReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + endnoteReference = "EndnoteReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + endnoteText = "EndnoteText", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + title = "Title", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + subtitle = "Subtitle", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink = "Hyperlink", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + strong = "Strong", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + emphasis = "Emphasis", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + noSpacing = "NoSpacing", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listParagraph = "ListParagraph", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + quote = "Quote", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + intenseQuote = "IntenseQuote", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + subtleEmphasis = "SubtleEmphasis", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + intenseEmphasis = "IntenseEmphasis", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + subtleReference = "SubtleReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + intenseReference = "IntenseReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bookTitle = "BookTitle", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bibliography = "Bibliography", + /** + * Table-of-content heading. + * @remarks + * [Api set: WordApi 1.3] + */ + tocHeading = "TocHeading", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + tableGrid = "TableGrid", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable1 = "PlainTable1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable2 = "PlainTable2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable3 = "PlainTable3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable4 = "PlainTable4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable5 = "PlainTable5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + tableGridLight = "TableGridLight", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light = "GridTable1Light", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent1 = "GridTable1Light_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent2 = "GridTable1Light_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent3 = "GridTable1Light_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent4 = "GridTable1Light_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent5 = "GridTable1Light_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent6 = "GridTable1Light_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2 = "GridTable2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent1 = "GridTable2_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent2 = "GridTable2_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent3 = "GridTable2_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent4 = "GridTable2_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent5 = "GridTable2_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent6 = "GridTable2_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3 = "GridTable3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent1 = "GridTable3_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent2 = "GridTable3_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent3 = "GridTable3_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent4 = "GridTable3_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent5 = "GridTable3_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent6 = "GridTable3_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4 = "GridTable4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent1 = "GridTable4_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent2 = "GridTable4_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent3 = "GridTable4_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent4 = "GridTable4_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent5 = "GridTable4_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent6 = "GridTable4_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark = "GridTable5Dark", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent1 = "GridTable5Dark_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent2 = "GridTable5Dark_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent3 = "GridTable5Dark_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent4 = "GridTable5Dark_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent5 = "GridTable5Dark_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent6 = "GridTable5Dark_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful = "GridTable6Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent1 = "GridTable6Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent2 = "GridTable6Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent3 = "GridTable6Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent4 = "GridTable6Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent5 = "GridTable6Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent6 = "GridTable6Colorful_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful = "GridTable7Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent1 = "GridTable7Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent2 = "GridTable7Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent3 = "GridTable7Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent4 = "GridTable7Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent5 = "GridTable7Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent6 = "GridTable7Colorful_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light = "ListTable1Light", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent1 = "ListTable1Light_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent2 = "ListTable1Light_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent3 = "ListTable1Light_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent4 = "ListTable1Light_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent5 = "ListTable1Light_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent6 = "ListTable1Light_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2 = "ListTable2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent1 = "ListTable2_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent2 = "ListTable2_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent3 = "ListTable2_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent4 = "ListTable2_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent5 = "ListTable2_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent6 = "ListTable2_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3 = "ListTable3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent1 = "ListTable3_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent2 = "ListTable3_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent3 = "ListTable3_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent4 = "ListTable3_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent5 = "ListTable3_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent6 = "ListTable3_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4 = "ListTable4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent1 = "ListTable4_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent2 = "ListTable4_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent3 = "ListTable4_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent4 = "ListTable4_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent5 = "ListTable4_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent6 = "ListTable4_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark = "ListTable5Dark", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent1 = "ListTable5Dark_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent2 = "ListTable5Dark_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent3 = "ListTable5Dark_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent4 = "ListTable5Dark_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent5 = "ListTable5Dark_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent6 = "ListTable5Dark_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful = "ListTable6Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent1 = "ListTable6Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent2 = "ListTable6Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent3 = "ListTable6Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent4 = "ListTable6Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent5 = "ListTable6Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent6 = "ListTable6Colorful_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful = "ListTable7Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent1 = "ListTable7Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent2 = "ListTable7Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent3 = "ListTable7Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent4 = "ListTable7Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent5 = "ListTable7Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent6 = "ListTable7Colorful_Accent6", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum DocumentPropertyType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + string = "String", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + number = "Number", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + date = "Date", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + boolean = "Boolean", + } + /** + * Represents the type of style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum StyleType { + /** + * Represents that the style is a character style. + * @remarks + * [Api set: WordApi 1.5] + */ + character = "Character", + /** + * Represents that the style is a list style. Currently supported on desktop. + * @remarks + * [Api set: WordApi 1.5] + */ + list = "List", + /** + * Represents that the style is a paragraph style. + * @remarks + * [Api set: WordApi 1.5] + */ + paragraph = "Paragraph", + /** + * Represents that the style is a table style. + * @remarks + * [Api set: WordApi 1.5] + */ + table = "Table", + } + /** + * Represents the outline levels. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum OutlineLevel { + /** + * Represents outline level 1. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel1 = "OutlineLevel1", + /** + * Represents outline level 2. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel2 = "OutlineLevel2", + /** + * Represents outline level 3. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel3 = "OutlineLevel3", + /** + * Represents outline level 4. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel4 = "OutlineLevel4", + /** + * Represents outline level 5. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel5 = "OutlineLevel5", + /** + * Represents outline level 6. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel6 = "OutlineLevel6", + /** + * Represents outline level 7. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel7 = "OutlineLevel7", + /** + * Represents outline level 8. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel8 = "OutlineLevel8", + /** + * Represents outline level 9. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel9 = "OutlineLevel9", + /** + * Represents outline level body text, not an outline level. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevelBodyText = "OutlineLevelBodyText", + } + /** + * Specifies the close behavior for `Document.close`. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum CloseBehavior { + /** + * Save the changes before closing the document. + * @remarks + * [Api set: WordApi 1.5] + */ + save = "Save", + /** + * Discard the possible changes when closing the document. + * @remarks + * [Api set: WordApi 1.5] + */ + skipSave = "SkipSave", + } + /** + * Specifies the save behavior for `Document.save`. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum SaveBehavior { + /** + * Saves the document without prompting the user. If it's a new document, + it will be saved with the default name or specified name in the default location. + * @remarks + * [Api set: WordApi 1.1] + */ + save = "Save", + /** + * Displays the "Save As" dialog to the user if the document hasn't been saved. + Won't take effect if the document was previously saved. + * @remarks + * [Api set: WordApi 1.1] + */ + prompt = "Prompt", + } + /** + * Represents the type of Field. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum FieldType { + /** + * Represents that the field type is Add-in. + * @remarks + * [Api set: WordApi 1.5] + */ + addin = "Addin", + /** + * Represents that the field type is AddressBlock. + * @remarks + * [Api set: WordApi 1.5] + */ + addressBlock = "AddressBlock", + /** + * Represents that the field type is Advance. + * @remarks + * [Api set: WordApi 1.5] + */ + advance = "Advance", + /** + * Represents that the field type is Ask. + * @remarks + * [Api set: WordApi 1.5] + */ + ask = "Ask", + /** + * Represents that the field type is Author. + * @remarks + * [Api set: WordApi 1.5] + */ + author = "Author", + /** + * Represents that the field type is AutoText. + * @remarks + * [Api set: WordApi 1.5] + */ + autoText = "AutoText", + /** + * Represents that the field type is AutoTextList. + * @remarks + * [Api set: WordApi 1.5] + */ + autoTextList = "AutoTextList", + /** + * Represents that the field type is Barcode. + * @remarks + * [Api set: WordApi 1.5] + */ + barCode = "BarCode", + /** + * Represents that the field type is Bibliography. + * @remarks + * [Api set: WordApi 1.5] + */ + bibliography = "Bibliography", + /** + * Represents that the field type is BidiOutline. + * @remarks + * [Api set: WordApi 1.5] + */ + bidiOutline = "BidiOutline", + /** + * Represents that the field type is Citation. + * @remarks + * [Api set: WordApi 1.5] + */ + citation = "Citation", + /** + * Represents that the field type is Comments. + * @remarks + * [Api set: WordApi 1.5] + */ + comments = "Comments", + /** + * Represents that the field type is Compare. + * @remarks + * [Api set: WordApi 1.5] + */ + compare = "Compare", + /** + * Represents that the field type is CreateDate. + * @remarks + * [Api set: WordApi 1.5] + */ + createDate = "CreateDate", + /** + * Represents that the field type is Data. + * @remarks + * [Api set: WordApi 1.5] + */ + data = "Data", + /** + * Represents that the field type is Database. + * @remarks + * [Api set: WordApi 1.5] + */ + database = "Database", + /** + * Represents that the field type is Date. + * @remarks + * [Api set: WordApi 1.5] + */ + date = "Date", + /** + * Represents that the field type is DisplayBarcode. + * @remarks + * [Api set: WordApi 1.5] + */ + displayBarcode = "DisplayBarcode", + /** + * Represents that the field type is DocumentProperty + * @remarks + * [Api set: WordApi 1.5] + */ + docProperty = "DocProperty", + /** + * Represents that the field type is DocumentVariable. + * @remarks + * [Api set: WordApi 1.5] + */ + docVariable = "DocVariable", + /** + * Represents that the field type is EditTime. + * @remarks + * [Api set: WordApi 1.5] + */ + editTime = "EditTime", + /** + * Represents that the field type is Embedded. + * @remarks + * [Api set: WordApi 1.5] + */ + embedded = "Embedded", + /** + * Represents that the field type is Equation. + * @remarks + * [Api set: WordApi 1.5] + */ + eq = "EQ", + /** + * Represents that the field type is Expression. + * @remarks + * [Api set: WordApi 1.5] + */ + expression = "Expression", + /** + * Represents that the field type is FileName. + * @remarks + * [Api set: WordApi 1.5] + */ + fileName = "FileName", + /** + * Represents that the field type is FileSize. + * @remarks + * [Api set: WordApi 1.5] + */ + fileSize = "FileSize", + /** + * Represents that the field type is FillIn. + * @remarks + * [Api set: WordApi 1.5] + */ + fillIn = "FillIn", + /** + * Represents that the field type is FormCheckbox. + * @remarks + * [Api set: WordApi 1.5] + */ + formCheckbox = "FormCheckbox", + /** + * Represents that the field type is FormDropdown. + * @remarks + * [Api set: WordApi 1.5] + */ + formDropdown = "FormDropdown", + /** + * Represents that the field type is FormText. + * @remarks + * [Api set: WordApi 1.5] + */ + formText = "FormText", + /** + * Represents that the field type is GotoButton. + * @remarks + * [Api set: WordApi 1.5] + */ + gotoButton = "GotoButton", + /** + * Represents that the field type is GreetingLine. + * @remarks + * [Api set: WordApi 1.5] + */ + greetingLine = "GreetingLine", + /** + * Represents that the field type is Hyperlink. + * @remarks + * [Api set: WordApi 1.5] + */ + hyperlink = "Hyperlink", + /** + * Represents that the field type is If. + * @remarks + * [Api set: WordApi 1.5] + */ + if = "If", + /** + * Represents that the field type is Import. + * @remarks + * [Api set: WordApi 1.5] + */ + import = "Import", + /** + * Represents that the field type is Include. + * @remarks + * [Api set: WordApi 1.5] + */ + include = "Include", + /** + * Represents that the field type is IncludePicture. + * @remarks + * [Api set: WordApi 1.5] + */ + includePicture = "IncludePicture", + /** + * Represents that the field type is IncludeText. + * @remarks + * [Api set: WordApi 1.5] + */ + includeText = "IncludeText", + /** + * Represents that the field type is Index. + * @remarks + * [Api set: WordApi 1.5] + */ + index = "Index", + /** + * Represents that the field type is Information. + * @remarks + * [Api set: WordApi 1.5] + */ + info = "Info", + /** + * Represents that the field type is Keywords. + * @remarks + * [Api set: WordApi 1.5] + */ + keywords = "Keywords", + /** + * Represents that the field type is LastSavedBy. + * @remarks + * [Api set: WordApi 1.5] + */ + lastSavedBy = "LastSavedBy", + /** + * Represents that the field type is Link. + * @remarks + * [Api set: WordApi 1.5] + */ + link = "Link", + /** + * Represents that the field type is ListNumber. + * @remarks + * [Api set: WordApi 1.5] + */ + listNum = "ListNum", + /** + * Represents that the field type is MacroButton. + * @remarks + * [Api set: WordApi 1.5] + */ + macroButton = "MacroButton", + /** + * Represents that the field type is MergeBarcode. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeBarcode = "MergeBarcode", + /** + * Represents that the field type is MergeField. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeField = "MergeField", + /** + * Represents that the field type is MergeRecord. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeRec = "MergeRec", + /** + * Represents that the field type is MergeSequence. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeSeq = "MergeSeq", + /** + * Represents that the field type is Next. + * @remarks + * [Api set: WordApi 1.5] + */ + next = "Next", + /** + * Represents that the field type is NextIf. + * @remarks + * [Api set: WordApi 1.5] + */ + nextIf = "NextIf", + /** + * Represents that the field type is NoteReference. + * @remarks + * [Api set: WordApi 1.5] + */ + noteRef = "NoteRef", + /** + * Represents that the field type is NumberOfCharacters. + * @remarks + * [Api set: WordApi 1.5] + */ + numChars = "NumChars", + /** + * Represents that the field type is NumberOfPages. + * @remarks + * [Api set: WordApi 1.5] + */ + numPages = "NumPages", + /** + * Represents that the field type is NumberOfWords. + * @remarks + * [Api set: WordApi 1.5] + */ + numWords = "NumWords", + /** + * Represents that the field type is ActiveXControl. + * @remarks + * [Api set: WordApi 1.5] + */ + ocx = "OCX", + /** + * Represents that the field type is Page. + * @remarks + * [Api set: WordApi 1.5] + */ + page = "Page", + /** + * Represents that the field type is PageReference. + * @remarks + * [Api set: WordApi 1.5] + */ + pageRef = "PageRef", + /** + * Represents that the field type is Print. + * @remarks + * [Api set: WordApi 1.5] + */ + print = "Print", + /** + * Represents that the field type is PrintDate. + * @remarks + * [Api set: WordApi 1.5] + */ + printDate = "PrintDate", + /** + * Represents that the field type is Private. + * @remarks + * [Api set: WordApi 1.5] + */ + private = "Private", + /** + * Represents that the field type is Quote. + * @remarks + * [Api set: WordApi 1.5] + */ + quote = "Quote", + /** + * Represents that the field type is ReferencedDocument. + * @remarks + * [Api set: WordApi 1.5] + */ + rd = "RD", + /** + * Represents that the field type is Reference. + * @remarks + * [Api set: WordApi 1.5] + */ + ref = "Ref", + /** + * Represents that the field type is RevisionNumber. + * @remarks + * [Api set: WordApi 1.5] + */ + revNum = "RevNum", + /** + * Represents that the field type is SaveDate. + * @remarks + * [Api set: WordApi 1.5] + */ + saveDate = "SaveDate", + /** + * Represents that the field type is Section. + * @remarks + * [Api set: WordApi 1.5] + */ + section = "Section", + /** + * Represents that the field type is SectionPages. + * @remarks + * [Api set: WordApi 1.5] + */ + sectionPages = "SectionPages", + /** + * Represents that the field type is Sequence. + * @remarks + * [Api set: WordApi 1.5] + */ + seq = "Seq", + /** + * Represents that the field type is Set. + * @remarks + * [Api set: WordApi 1.5] + */ + set = "Set", + /** + * Represents that the field type is Shape. + * @remarks + * [Api set: WordApi 1.5] + */ + shape = "Shape", + /** + * Represents that the field type is SkipIf. + * @remarks + * [Api set: WordApi 1.5] + */ + skipIf = "SkipIf", + /** + * Represents that the field type is StyleReference. + * @remarks + * [Api set: WordApi 1.5] + */ + styleRef = "StyleRef", + /** + * Represents that the field type is Subject. + * @remarks + * [Api set: WordApi 1.5] + */ + subject = "Subject", + /** + * Represents that the field type is Subscriber. + * @remarks + * [Api set: WordApi 1.5] + */ + subscriber = "Subscriber", + /** + * Represents that the field type is Symbol. + * @remarks + * [Api set: WordApi 1.5] + */ + symbol = "Symbol", + /** + * Represents that the field type is TableOfAuthoritiesEntry. + * @remarks + * [Api set: WordApi 1.5] + */ + ta = "TA", + /** + * Represents that the field type is TableOfContentsEntry. + * @remarks + * [Api set: WordApi 1.5] + */ + tc = "TC", + /** + * Represents that the field type is Template. + * @remarks + * [Api set: WordApi 1.5] + */ + template = "Template", + /** + * Represents that the field type is Time. + * @remarks + * [Api set: WordApi 1.5] + */ + time = "Time", + /** + * Represents that the field type is Title. + * @remarks + * [Api set: WordApi 1.5] + */ + title = "Title", + /** + * Represents that the field type is TableOfAuthorities. + * @remarks + * [Api set: WordApi 1.5] + */ + toa = "TOA", + /** + * Represents that the field type is TableOfContents. + * @remarks + * [Api set: WordApi 1.5] + */ + toc = "TOC", + /** + * Represents that the field type is UserAddress. + * @remarks + * [Api set: WordApi 1.5] + */ + userAddress = "UserAddress", + /** + * Represents that the field type is UserInitials. + * @remarks + * [Api set: WordApi 1.5] + */ + userInitials = "UserInitials", + /** + * Represents that the field type is UserName. + * @remarks + * [Api set: WordApi 1.5] + */ + userName = "UserName", + /** + * Represents that the field type is IndexEntry. + * @remarks + * [Api set: WordApi 1.5] + */ + xe = "XE", + /** + * Represents that the field type is Empty. + * @remarks + * [Api set: WordApi 1.5] + */ + empty = "Empty", + /** + * Represents the field types not supported by the Office JavaScript API. + * @remarks + * [Api set: WordApi 1.5] + */ + others = "Others", + /** + * Represents that the field type is Undefined. + * @remarks + * [Api set: WordApi 1.5] + */ + undefined = "Undefined", + } + /** + * Represents the kind of field. Indicates how the field works in relation to updating. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum FieldKind { + /** + * Represents that the field is invalid. For example, a pair of field characters with nothing inside. + * @remarks + * [Api set: WordApi 1.5] + */ + none = "None", + /** + * Represents that the field is automatically updated each time it's displayed or each time the page is reformatted, but which can also be manually updated. + * @remarks + * [Api set: WordApi 1.5] + */ + hot = "Hot", + /** + * Represents that the field is automatically updated when the source changes or the field can be manually updated. + * @remarks + * [Api set: WordApi 1.5] + */ + warm = "Warm", + /** + * Represents that the field doesn't have a result. + * @remarks + * [Api set: WordApi 1.5] + */ + cold = "Cold", + } + /** + * Represents the character inserted after the list item mark. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + enum TrailingCharacter { + /** + * A tab is inserted. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingTab = "TrailingTab", + /** + * A space is inserted. Default. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingSpace = "TrailingSpace", + /** + * No character is inserted. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingNone = "TrailingNone", + } + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ListBuiltInNumberStyle { + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + none = "None", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabic = "Arabic", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + upperRoman = "UpperRoman", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + lowerRoman = "LowerRoman", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + upperLetter = "UpperLetter", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + lowerLetter = "LowerLetter", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + ordinal = "Ordinal", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + cardinalText = "CardinalText", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + ordinalText = "OrdinalText", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + kanji = "Kanji", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + kanjiDigit = "KanjiDigit", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + aiueoHalfWidth = "AiueoHalfWidth", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + irohaHalfWidth = "IrohaHalfWidth", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabicFullWidth = "ArabicFullWidth", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + kanjiTraditional = "KanjiTraditional", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + kanjiTraditional2 = "KanjiTraditional2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + numberInCircle = "NumberInCircle", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + aiueo = "Aiueo", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + iroha = "Iroha", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabicLZ = "ArabicLZ", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + bullet = "Bullet", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + ganada = "Ganada", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + chosung = "Chosung", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + gbnum1 = "GBNum1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + gbnum2 = "GBNum2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + gbnum3 = "GBNum3", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + gbnum4 = "GBNum4", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + zodiac1 = "Zodiac1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + zodiac2 = "Zodiac2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + zodiac3 = "Zodiac3", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + tradChinNum1 = "TradChinNum1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + tradChinNum2 = "TradChinNum2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + tradChinNum3 = "TradChinNum3", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + tradChinNum4 = "TradChinNum4", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + simpChinNum1 = "SimpChinNum1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + simpChinNum2 = "SimpChinNum2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + simpChinNum3 = "SimpChinNum3", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + simpChinNum4 = "SimpChinNum4", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hanjaRead = "HanjaRead", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hanjaReadDigit = "HanjaReadDigit", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hangul = "Hangul", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hanja = "Hanja", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hebrew1 = "Hebrew1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabic1 = "Arabic1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hebrew2 = "Hebrew2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabic2 = "Arabic2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hindiLetter1 = "HindiLetter1", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hindiLetter2 = "HindiLetter2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hindiArabic = "HindiArabic", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + hindiCardinalText = "HindiCardinalText", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + thaiLetter = "ThaiLetter", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + thaiArabic = "ThaiArabic", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + thaiCardinalText = "ThaiCardinalText", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + vietCardinalText = "VietCardinalText", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + lowercaseRussian = "LowercaseRussian", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + uppercaseRussian = "UppercaseRussian", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + lowercaseGreek = "LowercaseGreek", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + uppercaseGreek = "UppercaseGreek", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabicLZ2 = "ArabicLZ2", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabicLZ3 = "ArabicLZ3", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + arabicLZ4 = "ArabicLZ4", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + lowercaseTurkish = "LowercaseTurkish", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + uppercaseTurkish = "UppercaseTurkish", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + lowercaseBulgarian = "LowercaseBulgarian", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + uppercaseBulgarian = "UppercaseBulgarian", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + pictureBullet = "PictureBullet", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + legal = "Legal", + /** + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + */ + legalLZ = "LegalLZ", + } + /** + * Represents the shading texture. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShadingTextureType { + /** + * Represents 10 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture10Percent = "Texture10Percent", + /** + * Represents 12.5 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture12Pt5Percent = "Texture12Pt5Percent", + /** + * Represents 15 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture15Percent = "Texture15Percent", + /** + * Represents 20 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture20Percent = "Texture20Percent", + /** + * Represents 25 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture25Percent = "Texture25Percent", + /** + * Represents 30 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture30Percent = "Texture30Percent", + /** + * Represents 35 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture35Percent = "Texture35Percent", + /** + * Represents 37.5 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture37Pt5Percent = "Texture37Pt5Percent", + /** + * Represents 40 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture40Percent = "Texture40Percent", + /** + * Represents 45 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture45Percent = "Texture45Percent", + /** + * Represents 50 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture50Percent = "Texture50Percent", + /** + * Represents 55 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture55Percent = "Texture55Percent", + /** + * Represents 5 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture5Percent = "Texture5Percent", + /** + * Represents 60 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture60Percent = "Texture60Percent", + /** + * Represents 62.5 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture62Pt5Percent = "Texture62Pt5Percent", + /** + * Represents 65 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture65Percent = "Texture65Percent", + /** + * Represents 70 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture70Percent = "Texture70Percent", + /** + * Represents 75 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture75Percent = "Texture75Percent", + /** + * Represents 80 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture80Percent = "Texture80Percent", + /** + * Represents 85 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture85Percent = "Texture85Percent", + /** + * Represents 87.5 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture87Pt5Percent = "Texture87Pt5Percent", + /** + * Represents 90 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture90Percent = "Texture90Percent", + /** + * Represents 95 percent texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture95Percent = "Texture95Percent", + /** + * Represents dark diagonal-down texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureDarkDiagonalDown = "TextureDarkDiagonalDown", + /** + * Represents dark diagonal-up texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureDarkDiagonalUp = "TextureDarkDiagonalUp", + /** + * Represents dark horizontal-cross texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureDarkGrid = "TextureDarkGrid", + /** + * Represents dark horizontal texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureDarkHorizontal = "TextureDarkHorizontal", + /** + * Represents dark diagonal-cross texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureDarkTrellis = "TextureDarkTrellis", + /** + * Represents dark vertical texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureDarkVertical = "TextureDarkVertical", + /** + * Represents light diagonal-down texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureLightDiagonalDown = "TextureLightDiagonalDown", + /** + * Represents light diagonal-up texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureLightDiagonalUp = "TextureLightDiagonalUp", + /** + * Represents light horizontal-cross texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureLightGrid = "TextureLightGrid", + /** + * Represents light horizontal texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureLightHorizontal = "TextureLightHorizontal", + /** + * Represents light diagonal-cross texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureLightTrellis = "TextureLightTrellis", + /** + * Represents light vertical texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureLightVertical = "TextureLightVertical", + /** + * Represents that there's no texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureNone = "TextureNone", + /** + * Represents solid texture. + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textureSolid = "TextureSolid", + } + enum ErrorCodes { + accessDenied = "AccessDenied", + generalException = "GeneralException", + invalidArgument = "InvalidArgument", + itemNotFound = "ItemNotFound", + notImplemented = "NotImplemented", + searchDialogIsOpen = "SearchDialogIsOpen", + searchStringInvalidOrTooLong = "SearchStringInvalidOrTooLong", + } + 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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 Comment object, for use in `comment.set({ ... })`. */ + interface CommentUpdateData { + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeUpdateData; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** An interface for updating data on the CommentCollection object, for use in `commentCollection.set({ ... })`. */ + interface CommentCollectionUpdateData { + items?: Word.Interfaces.CommentData[]; + } + /** An interface for updating data on the CommentContentRange object, for use in `commentContentRange.set({ ... })`. */ + interface CommentContentRangeUpdateData { + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * 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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: string; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text is not underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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 CommentReply object, for use in `commentReply.set({ ... })`. */ + interface CommentReplyUpdateData { + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeUpdateData; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentUpdateData; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + } + /** An interface for updating data on the CommentReplyCollection object, for use in `commentReplyCollection.set({ ... })`. */ + interface CommentReplyCollectionUpdateData { + items?: Word.Interfaces.CommentReplyData[]; + } + /** 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. **Note**: The set operation for this property is not supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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"; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * Specifies the title for a content control. + * + * @remarks + * [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 { + /** + * Specifies the value of the custom property. Note that even though Word on the web 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). + * + * @remarks + * [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 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 { + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesUpdateData; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; + } + /** 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. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Gets the properties of the document. + * + * @remarks + * [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 { + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * Specifies the comments of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface for updating data on the Field object, for use in `field.set({ ... })`. */ + interface FieldUpdateData { + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeUpdateData; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + */ + code?: string; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: string; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + /** + * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + showCodes?: boolean; + } + /** An interface for updating data on the FieldCollection object, for use in `fieldCollection.set({ ... })`. */ + interface FieldCollectionUpdateData { + items?: Word.Interfaces.FieldData[]; + } + /** An interface for updating data on the Font object, for use in `font.set({ ... })`. */ + interface FontUpdateData { + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * Specifies 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. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * @remarks + * [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 { + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [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 { + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: number; + } + /** An interface for updating data on the ListLevel object, for use in `listLevel.set({ ... })`. */ + interface ListLevelUpdateData { + /** + * Gets a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedStyle?: string; + /** + * Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberFormat?: string; + /** + * Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberPosition?: number; + /** + * Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; + /** + * Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + resetOnHigher?: number; + /** + * Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + startAt?: number; + /** + * Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + tabPosition?: number; + /** + * Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textPosition?: number; + /** + * Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; + } + /** An interface for updating data on the ListLevelCollection object, for use in `listLevelCollection.set({ ... })`. */ + interface ListLevelCollectionUpdateData { + items?: Word.Interfaces.ListLevelData[]; + } + /** An interface for updating data on the ListTemplate object, for use in `listTemplate.set({ ... })`. */ + interface ListTemplateUpdateData { + /** + * Specifies whether the specified ListTemplate object is outline numbered. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + outlineNumbered?: boolean; + } + /** An interface for updating data on the NoteItem object, for use in `noteItem.set({ ... })`. */ + interface NoteItemUpdateData { + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeUpdateData; + } + /** An interface for updating data on the NoteItemCollection object, for use in `noteItemCollection.set({ ... })`. */ + interface NoteItemCollectionUpdateData { + items?: Word.Interfaces.NoteItemData[]; + } + /** 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph is not part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemUpdateData; + /** + * Gets the ListItem for the paragraph. If the paragraph is not part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemUpdateData; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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 ParagraphFormat object, for use in `paragraphFormat.set({ ... })`. */ + interface ParagraphFormatUpdateData { + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent?: number; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether?: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext?: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent?: number; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore?: number; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents?: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent?: number; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter?: number; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore?: number; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl?: boolean; + } + /** 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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 { + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [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 Setting object, for use in `setting.set({ ... })`. */ + interface SettingUpdateData { + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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 StyleCollection object, for use in `styleCollection.set({ ... })`. */ + interface StyleCollectionUpdateData { + items?: Word.Interfaces.StyleData[]; + } + /** An interface for updating data on the Style object, for use in `style.set({ ... })`. */ + interface StyleUpdateData { + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + listTemplate?: Word.Interfaces.ListTemplateUpdateData; + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatUpdateData; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + shading?: Word.Interfaces.ShadingUpdateData; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: number; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** An interface for updating data on the Shading object, for use in `shading.set({ ... })`. */ + interface ShadingUpdateData { + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + backgroundPatternColor?: string; + /** + * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + foregroundPatternColor?: string; + /** + * Specifies the shading texture of the object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture?: Word.ShadingTextureType | "Texture10Percent" | "Texture12Pt5Percent" | "Texture15Percent" | "Texture20Percent" | "Texture25Percent" | "Texture30Percent" | "Texture35Percent" | "Texture37Pt5Percent" | "Texture40Percent" | "Texture45Percent" | "Texture50Percent" | "Texture55Percent" | "Texture5Percent" | "Texture60Percent" | "Texture62Pt5Percent" | "Texture65Percent" | "Texture70Percent" | "Texture75Percent" | "Texture80Percent" | "Texture85Percent" | "Texture87Pt5Percent" | "Texture90Percent" | "Texture95Percent" | "TextureDarkDiagonalDown" | "TextureDarkDiagonalUp" | "TextureDarkGrid" | "TextureDarkHorizontal" | "TextureDarkTrellis" | "TextureDarkVertical" | "TextureLightDiagonalDown" | "TextureLightDiagonalUp" | "TextureLightGrid" | "TextureLightHorizontal" | "TextureLightTrellis" | "TextureLightVertical" | "TextureNone" | "TextureSolid"; + } + /** 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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"; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Specifies the width of the table in points. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [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 { + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * Specifies the type of the table border. + * + * @remarks + * [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"; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the collection of field objects in the body. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the collection of list objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * Gets the collection of paragraph objects in the body. **Important**: Paragraphs in tables are not returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. + * + * @remarks + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * Gets the collection of table objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; + } + /** An interface describing the data returned by calling `comment.toJSON()`. */ + interface CommentData { + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeData; + /** + * Gets the collection of reply objects associated with the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + replies?: Word.Interfaces.CommentReplyData[]; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: string; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: string; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: Date; + /** + * Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** An interface describing the data returned by calling `commentCollection.toJSON()`. */ + interface CommentCollectionData { + items?: Word.Interfaces.CommentData[]; + } + /** An interface describing the data returned by calling `commentContentRange.toJSON()`. */ + interface CommentContentRangeData { + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * 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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.4] + */ + isEmpty?: boolean; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Gets the text of the comment range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + text?: string; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text is not underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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 `commentReply.toJSON()`. */ + interface CommentReplyData { + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeData; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentData; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: string; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: string; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: Date; + /** + * Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: string; + } + /** An interface describing the data returned by calling `commentReplyCollection.toJSON()`. */ + interface CommentReplyCollectionData { + items?: Word.Interfaces.CommentReplyData[]; + } + /** An interface describing the data returned by calling `contentControl.toJSON()`. */ + interface ContentControlData { + /** + * Gets the collection of content control objects in the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the collection of field objects in the content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the collection of list objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * Gets the collection of paragraph objects in the content control. **Important**: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control are not returned. From requirement set 1.3, paragraphs in such tables are also returned. + * + * @remarks + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * Gets the collection of table objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + id?: number; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. **Note**: The set operation for this property is not supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls. + * + * @remarks + * [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"; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: string; + /** + * Gets the content control type. Only rich text and plain text content controls are supported currently. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + key?: string; + /** + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; + /** + * Specifies the value of the custom property. Note that even though Word on the web 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). + * + * @remarks + * [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 `customXmlPart.toJSON()`. */ + interface CustomXmlPartData { + /** + * Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: string; + /** + * Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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 { + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + customXmlParts?: Word.Interfaces.CustomXmlPartData[]; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + sections?: Word.Interfaces.SectionData[]; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + settings?: Word.Interfaces.SettingData[]; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; + /** + * 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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + */ + customXmlParts?: Word.Interfaces.CustomXmlPartData[]; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + sections?: Word.Interfaces.SectionData[]; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + customProperties?: Word.Interfaces.CustomPropertyData[]; + /** + * Gets the application name of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + applicationName?: string; + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * Specifies the comments of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * Gets the creation date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + creationDate?: Date; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * Gets the last author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastAuthor?: string; + /** + * Gets the last print date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastPrintDate?: Date; + /** + * Gets the last save time of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastSaveTime?: Date; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * Gets the revision number of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + revisionNumber?: string; + /** + * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. + * + * @remarks + * [Api set: WordApi 1.3] + */ + security?: number; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * Gets the template of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + template?: string; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface describing the data returned by calling `field.toJSON()`. */ + interface FieldData { + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeData; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + */ + code?: string; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: string; + /** + * Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + kind?: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + /** + * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + showCodes?: boolean; + /** + * Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; + } + /** An interface describing the data returned by calling `fieldCollection.toJSON()`. */ + interface FieldCollectionData { + items?: Word.Interfaces.FieldData[]; + } + /** An interface describing the data returned by calling `font.toJSON()`. */ + interface FontData { + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * Specifies 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. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * @remarks + * [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 { + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + /** + * Gets the format of the inline image. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + imageFormat?: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * Gets the list's id. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean[]; + /** + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [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 { + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: number; + /** + * Gets the list item bullet, number, or picture as a string. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listString?: string; + /** + * Gets the list item order number in relation to its siblings. + * + * @remarks + * [Api set: WordApi 1.3] + */ + siblingIndex?: number; + } + /** An interface describing the data returned by calling `listLevel.toJSON()`. */ + interface ListLevelData { + /** + * Gets a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + font?: Word.Interfaces.FontData; + /** + * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedStyle?: string; + /** + * Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberFormat?: string; + /** + * Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberPosition?: number; + /** + * Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; + /** + * Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + resetOnHigher?: number; + /** + * Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + startAt?: number; + /** + * Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + tabPosition?: number; + /** + * Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textPosition?: number; + /** + * Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; + } + /** An interface describing the data returned by calling `listLevelCollection.toJSON()`. */ + interface ListLevelCollectionData { + items?: Word.Interfaces.ListLevelData[]; + } + /** An interface describing the data returned by calling `listTemplate.toJSON()`. */ + interface ListTemplateData { + /** + * Gets a ListLevels collection that represents all the levels for the specified ListTemplate. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + listLevels?: Word.Interfaces.ListLevelData[]; + /** + * Specifies whether the specified ListTemplate object is outline numbered. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + outlineNumbered?: boolean; + } + /** An interface describing the data returned by calling `noteItem.toJSON()`. */ + interface NoteItemData { + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyData; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeData; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: Word.NoteItemType | "Footnote" | "Endnote"; + } + /** An interface describing the data returned by calling `noteItemCollection.toJSON()`. */ + interface NoteItemCollectionData { + items?: Word.Interfaces.NoteItemData[]; + } + /** An interface describing the data returned by calling `paragraph.toJSON()`. */ + interface ParagraphData { + /** + * Gets the collection of fields in the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph is not part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemData; + /** + * Gets the ListItem for the paragraph. If the paragraph is not part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemData; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: number; + /** + * Gets the text of the paragraph. + * + * @remarks + * [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 `paragraphFormat.toJSON()`. */ + interface ParagraphFormatData { + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent?: number; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether?: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext?: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent?: number; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore?: number; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents?: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent?: number; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter?: number; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore?: number; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl?: boolean; + } + /** An interface describing the data returned by calling `range.toJSON()`. */ + interface RangeData { + /** + * Gets the collection of field objects in the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the collection of inline picture objects in the range. + * + * @remarks + * [Api set: WordApi 1.2] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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. + * + * @remarks + * [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 { + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [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 `setting.toJSON()`. */ + interface SettingData { + /** + * Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + key?: string; + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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 `styleCollection.toJSON()`. */ + interface StyleCollectionData { + items?: Word.Interfaces.StyleData[]; + } + /** An interface describing the data returned by calling `style.toJSON()`. */ + interface StyleData { + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontData; + /** + * Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + listTemplate?: Word.Interfaces.ListTemplateData; + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatData; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + shading?: Word.Interfaces.ShadingData; + /** + * Gets the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + baseStyle?: string; + /** + * Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + builtIn?: boolean; + /** + * Gets the description of the specified style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + description?: string; + /** + * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + inUse?: boolean; + /** + * Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + linked?: boolean; + /** + * Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nameLocal?: string; + /** + * Gets the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nextParagraphStyle?: string; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: number; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** An interface describing the data returned by calling `shading.toJSON()`. */ + interface ShadingData { + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + backgroundPatternColor?: string; + /** + * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + foregroundPatternColor?: string; + /** + * Specifies the shading texture of the object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture?: Word.ShadingTextureType | "Texture10Percent" | "Texture12Pt5Percent" | "Texture15Percent" | "Texture20Percent" | "Texture25Percent" | "Texture30Percent" | "Texture35Percent" | "Texture37Pt5Percent" | "Texture40Percent" | "Texture45Percent" | "Texture50Percent" | "Texture55Percent" | "Texture5Percent" | "Texture60Percent" | "Texture62Pt5Percent" | "Texture65Percent" | "Texture70Percent" | "Texture75Percent" | "Texture80Percent" | "Texture85Percent" | "Texture87Pt5Percent" | "Texture90Percent" | "Texture95Percent" | "TextureDarkDiagonalDown" | "TextureDarkDiagonalUp" | "TextureDarkGrid" | "TextureDarkHorizontal" | "TextureDarkTrellis" | "TextureDarkVertical" | "TextureLightDiagonalDown" | "TextureLightDiagonalUp" | "TextureLightGrid" | "TextureLightHorizontal" | "TextureLightTrellis" | "TextureLightVertical" | "TextureNone" | "TextureSolid"; + } + /** An interface describing the data returned by calling `table.toJSON()`. */ + interface TableData { + /** + * Gets the collection of field objects in the table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * Gets all of the table rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rows?: Word.Interfaces.TableRowData[]; + /** + * Gets the child tables nested one level deeper. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + nestingLevel?: number; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowCount?: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "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"; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Specifies the width of the table in points. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cells?: Word.Interfaces.TableCellData[]; + /** + * Gets the collection of field objects in the table row. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellCount?: number; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyData; + /** + * Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellIndex?: number; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Gets the width of the cell in points. + * + * @remarks + * [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 { + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * Specifies the type of the table border. + * + * @remarks + * [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"; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** + * Represents the body of a document or a section. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface BodyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [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 an `ItemNotFound` error if there isn't a parent body. + * + * @remarks + * [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. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentSection?: Word.Interfaces.SectionLoadOptions; + /** + * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the text of the body. Use the insertText method to insert text. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + } + /** + * Represents a comment in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CommentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** + * Contains a collection of {@link Word.Comment} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CommentCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * For EACH ITEM in the collection: Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** + * @remarks + * [Api set: WordApi 1.4] + */ + interface CommentContentRangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * 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. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: boolean; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.4] + */ + isEmpty?: boolean; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Gets the text of the comment range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + text?: boolean; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text is not underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + underline?: boolean; + } + /** + * Represents a comment reply in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CommentReplyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentLoadOptions; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + } + /** + * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CommentReplyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentLoadOptions; + /** + * For EACH ITEM in the collection: Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: 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 and plain text content controls are supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface ContentControlLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the content control. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the content control. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the content control. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. **Note**: The set operation for this property is not supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * Gets the content control type. Only rich text and plain text content controls are supported currently. + * + * @remarks + * [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 and plain text content controls are supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface ContentControlCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the content control. + * + * @remarks + * [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 an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the content control. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [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 an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the content control. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the content control. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * For EACH ITEM in the collection: Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * For EACH ITEM in the collection: Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. **Note**: The set operation for this property is not supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [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, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * For EACH ITEM in the collection: Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * For EACH ITEM in the collection: Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * For EACH ITEM in the collection: Gets the content control type. Only rich text and plain text content controls are supported currently. + * + * @remarks + * [Api set: WordApi 1.1] + */ + type?: boolean; + } + /** + * Represents a custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface CustomPropertyLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the key of the custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + key?: boolean; + /** + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * Specifies the value of the custom property. Note that even though Word on the web 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). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + } + /** + * Contains the collection of {@link Word.CustomProperty} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface CustomPropertyCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the key of the custom property. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies the value of the custom property. Note that even though Word on the web 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). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + } + /** + * Represents a custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CustomXmlPartLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + namespaceUri?: boolean; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CustomXmlPartCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + namespaceUri?: boolean; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface CustomXmlPartScopedCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface DocumentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesLoadOptions; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode?: 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface DocumentCreatedLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the properties of the document. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + saved?: boolean; + } + /** + * Represents document properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface DocumentPropertiesLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the application name of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + applicationName?: boolean; + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author?: boolean; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category?: boolean; + /** + * Specifies the comments of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments?: boolean; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company?: boolean; + /** + * Gets the creation date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + creationDate?: boolean; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format?: boolean; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords?: boolean; + /** + * Gets the last author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastAuthor?: boolean; + /** + * Gets the last print date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastPrintDate?: boolean; + /** + * Gets the last save time of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastSaveTime?: boolean; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager?: boolean; + /** + * Gets the revision number of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + revisionNumber?: boolean; + /** + * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. + * + * @remarks + * [Api set: WordApi 1.3] + */ + security?: boolean; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject?: boolean; + /** + * Gets the template of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + template?: boolean; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title?: boolean; + } + /** + * Represents a field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface FieldLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the parent body of the field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the field. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the field. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the field. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeLoadOptions; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + */ + code?: boolean; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: boolean; + /** + * Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + kind?: boolean; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + /** + * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + showCodes?: boolean; + /** + * Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Contains a collection of {@link Word.Field} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface FieldCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the parent body of the field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the field. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the field. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the field. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the field. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + */ + code?: boolean; + /** + * For EACH ITEM in the collection: Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: boolean; + /** + * For EACH ITEM in the collection: Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + kind?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + showCodes?: boolean; + /** + * For EACH ITEM in the collection: Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Represents a font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface FontLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * Specifies 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. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor?: boolean; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name?: boolean; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size?: boolean; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * @remarks + * [Api set: WordApi 1.1] + */ + underline?: boolean; + } + /** + * Represents an inline picture. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface InlinePictureLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the parent paragraph that contains the inline image. + * + * @remarks + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphLoadOptions; + /** + * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the inline image. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the inline image. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + /** + * Gets the format of the inline image. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + imageFormat?: boolean; + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width?: boolean; + } + /** + * Contains a collection of {@link Word.InlinePicture} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface InlinePictureCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image. + * + * @remarks + * [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 an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the inline image. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [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 an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the inline image. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the inline image. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * For EACH ITEM in the collection: Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * For EACH ITEM in the collection: Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + /** + * For EACH ITEM in the collection: Gets the format of the inline image. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + imageFormat?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * For EACH ITEM in the collection: Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width?: boolean; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface ListLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the list's id. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean; + /** + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } + /** + * Contains a collection of {@link Word.List} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface ListCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the list's id. + * + * @remarks + * [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. + * + * @remarks + * [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'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } + /** + * Represents the paragraph list item format. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface ListItemLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: boolean; + /** + * Gets the list item bullet, number, or picture as a string. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listString?: boolean; + /** + * Gets the list item order number in relation to its siblings. + * + * @remarks + * [Api set: WordApi 1.3] + */ + siblingIndex?: boolean; + } + /** + * Represents a list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ListLevelLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + alignment?: boolean; + /** + * Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedStyle?: boolean; + /** + * Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberFormat?: boolean; + /** + * Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberPosition?: boolean; + /** + * Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberStyle?: boolean; + /** + * Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + resetOnHigher?: boolean; + /** + * Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + startAt?: boolean; + /** + * Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + tabPosition?: boolean; + /** + * Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textPosition?: boolean; + /** + * Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingCharacter?: boolean; + } + /** + * Contains a collection of {@link Word.ListLevel} objects. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ListLevelCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + alignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberFormat?: boolean; + /** + * For EACH ITEM in the collection: Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberPosition?: boolean; + /** + * For EACH ITEM in the collection: Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + numberStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + resetOnHigher?: boolean; + /** + * For EACH ITEM in the collection: Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + startAt?: boolean; + /** + * For EACH ITEM in the collection: Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + tabPosition?: boolean; + /** + * For EACH ITEM in the collection: Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + textPosition?: boolean; + /** + * For EACH ITEM in the collection: Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + trailingCharacter?: boolean; + } + /** + * Represents a ListTemplate. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ListTemplateLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies whether the specified ListTemplate object is outline numbered. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + outlineNumbered?: boolean; + } + /** + * Represents a footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface NoteItemLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeLoadOptions; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Contains a collection of {@link Word.NoteItem} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface NoteItemCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeLoadOptions; + /** + * For EACH ITEM in the collection: Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Represents a single paragraph in a selection, range, content control, or document body. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface ParagraphLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph is not in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph is not part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * Gets the ListItem for the paragraph. If the paragraph is not part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * Gets the List to which this paragraph belongs. If the paragraph is not in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * Gets the parent body of the paragraph. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the paragraph. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the paragraph. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * Gets the text of the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface ParagraphCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph is not in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph is not part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. If the paragraph is not part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. If the paragraph is not in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the paragraph. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the paragraph. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * For EACH ITEM in the collection: Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * For EACH ITEM in the collection: Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * For EACH ITEM in the collection: Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * For EACH ITEM in the collection: Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * For EACH ITEM in the collection: Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * For EACH ITEM in the collection: Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * For EACH ITEM in the collection: Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * Represents a style of paragraph in a document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface ParagraphFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent?: boolean; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether?: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext?: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent?: boolean; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing?: boolean; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter?: boolean; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore?: boolean; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents?: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel?: boolean; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent?: boolean; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter?: boolean; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore?: boolean; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl?: boolean; + } + /** + * Represents a contiguous area in a document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface RangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the range. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the range. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the range. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the text of the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * Contains a collection of {@link Word.Range} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface RangeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the range. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the range. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the range. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the range. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * For EACH ITEM in the collection: Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * Specifies the options to be included in a search operation. + To learn more about how to use search options in the Word JavaScript APIs, read {@link https://docs.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface SearchOptionsLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** + * Represents a section in a Word document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface SectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the section. This does not include the header/footer and other section metadata. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * Contains the collection of the document's {@link Word.Section} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + interface SectionCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * Represents a setting of the add-in. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface SettingLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + key?: boolean; + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value?: boolean; + } + /** + * Contains the collection of {@link Word.Setting} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + interface SettingCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value?: boolean; + } + /** + * Contains a collection of {@link Word.Style} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + interface StyleCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + listTemplate?: Word.Interfaces.ListTemplateLoadOptions; + /** + * For EACH ITEM in the collection: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; + /** + * For EACH ITEM in the collection: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + shading?: Word.Interfaces.ShadingLoadOptions; + /** + * For EACH ITEM in the collection: Gets the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + baseStyle?: boolean; + /** + * For EACH ITEM in the collection: Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + builtIn?: boolean; + /** + * For EACH ITEM in the collection: Gets the description of the specified style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + description?: boolean; + /** + * For EACH ITEM in the collection: Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + inUse?: boolean; + /** + * For EACH ITEM in the collection: Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + linked?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nameLocal?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nextParagraphStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * For EACH ITEM in the collection: Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** + * Represents a style in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface StyleLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + listTemplate?: Word.Interfaces.ListTemplateLoadOptions; + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + shading?: Word.Interfaces.ShadingLoadOptions; + /** + * Gets the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + baseStyle?: boolean; + /** + * Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + builtIn?: boolean; + /** + * Gets the description of the specified style. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + description?: boolean; + /** + * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + inUse?: boolean; + /** + * Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + linked?: boolean; + /** + * Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nameLocal?: boolean; + /** + * Gets the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nextParagraphStyle?: boolean; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: boolean; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** + * Represents the shading object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ShadingLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + backgroundPatternColor?: boolean; + /** + * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + foregroundPatternColor?: boolean; + /** + * Specifies the shading texture of the object. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + texture?: boolean; + } + /** + * Represents a table in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains this table. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains this table. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains this table. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: boolean; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: boolean; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + nestingLevel?: boolean; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowCount?: boolean; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: boolean; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Contains the collection of the document's Table objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains this table. Throws an `ItemNotFound` error if it is not contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains this table. Throws an `ItemNotFound` error if it is not contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains this table. If it is not contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains this table. If it is not contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Indicates whether all of the table rows are uniform. + * + * @remarks + * [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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + nestingLevel?: boolean; + /** + * For EACH ITEM in the collection: Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * For EACH ITEM in the collection: Specifies 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. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * For EACH ITEM in the collection: Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Represents a row in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableRowLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellCount?: boolean; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: boolean; + /** + * Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + } + /** + * Contains the collection of the document's TableRow objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableRowCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * For EACH ITEM in the collection: Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: boolean; + /** + * For EACH ITEM in the collection: Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + } + /** + * Represents a table cell in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableCellLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the parent row of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * Gets the parent table of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellIndex?: boolean; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: boolean; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * Gets the index of the cell's row in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * Gets the width of the cell in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Contains the collection of the document's TableCell objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableCellCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent row of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent table of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: boolean; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Gets the index of the cell's row in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Gets the width of the cell in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Specifies the border style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + interface TableBorderLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color?: boolean; + /** + * Specifies the type of the table border. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [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 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; + /** + * 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 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(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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly notebooks: OneNote.NotebookCollection; + /** + * 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. + * @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: OneNote.Application): void; + /** + * Gets the active notebook if one exists. If no notebook is active, throws ItemNotFound. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveNotebook(): OneNote.Notebook; + /** + * Gets the active notebook if one exists. If no notebook is active, returns null. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveNotebookOrNull(): OneNote.Notebook; + /** + * Gets the active outline if one exists, If no outline is active, throws ItemNotFound. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveOutline(): OneNote.Outline; + /** + * Gets the active outline if one exists, otherwise returns null. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveOutlineOrNull(): OneNote.Outline; + /** + * Gets the active page if one exists. If no page is active, throws ItemNotFound. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActivePage(): OneNote.Page; + /** + * Gets the active page if one exists. If no page is active, returns null. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActivePageOrNull(): OneNote.Page; + /** + * Gets the active Paragraph if one exists, If no Paragraph is active, throws ItemNotFound. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveParagraph(): OneNote.Paragraph; + /** + * Gets the active Paragraph if one exists, otherwise returns null. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveParagraphOrNull(): OneNote.Paragraph; + /** + * Gets the active section if one exists. If no section is active, throws ItemNotFound. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveSection(): OneNote.Section; + /** + * Gets the active section if one exists. If no section is active, returns null. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getActiveSectionOrNull(): OneNote.Section; + getDecimalSeparator(): OfficeExtension.ClientResult; + /** + * Gets the currently selected ink strokes. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + getSelectedInkStrokes(): OneNote.InkStrokeCollection; + getWindowSize(): OfficeExtension.ClientResult; + insertAndEmbedLinkAtCurrentPosition(url: string): void; + insertHtmlAtCurrentPosition(html: string): void; + isViewingDeletedNotes(): OfficeExtension.ClientResult; + /** + * Opens the specified page in the application instance. + * + * @remarks + * [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. + Navigation may still not be carried out when no fails. Caller should validate the returned page if so desired. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.ApplicationLoadOptions): OneNote.Application; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Application; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OneNote.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 OneNote.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.ApplicationData; + } + /** + * Represents ink analysis data for a given set of ink strokes. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly page: OneNote.Page; + /** + * Gets the ID of the InkAnalysis object. Read-only. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisLoadOptions): OneNote.InkAnalysis; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysis; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.InkAnalysis object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.InkAnalysisData; + } + /** + * Represents ink analysis data for an identified paragraph formed by ink strokes. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly inkAnalysis: OneNote.InkAnalysis; + /** + * Gets the ink analysis lines in this ink analysis paragraph. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly lines: OneNote.InkAnalysisLineCollection; + /** + * Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisParagraphLoadOptions): OneNote.InkAnalysisParagraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysisParagraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.InkAnalysisParagraph object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisParagraphData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.InkAnalysisParagraphData; + } + /** + * Represents a collection of InkAnalysisParagraph objects. + * + * @remarks + * [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[]; + /** + * Returns the number of InkAnalysisParagraphs in the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a InkAnalysisParagraph object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisParagraphCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysisParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkAnalysisParagraphCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.InkAnalysisParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.InkAnalysisParagraphCollectionData; + } + /** + * Represents ink analysis data for an identified text line formed by ink strokes. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.InkAnalysisParagraph; + /** + * Gets the ink analysis words in this ink analysis line. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly words: OneNote.InkAnalysisWordCollection; + /** + * Gets the ID of the InkAnalysisLine object. Read-only. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisLineLoadOptions): OneNote.InkAnalysisLine; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysisLine; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.InkAnalysisLine object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisLineData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.InkAnalysisLineData; + } + /** + * Represents a collection of InkAnalysisLine objects. + * + * @remarks + * [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[]; + /** + * Returns the number of InkAnalysisLines in the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a InkAnalysisLine object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisLineCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysisLineCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkAnalysisLineCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.InkAnalysisLineCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisLineCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.InkAnalysisLineCollectionData; + } + /** + * Represents ink analysis data for an identified word formed by ink strokes. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly line: OneNote.InkAnalysisLine; + /** + * Gets the ID of the InkAnalysisWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * The id of the recognized language in this inkAnalysisWord. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly strokePointers: OneNote.InkStrokePointer[]; + /** + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisWordLoadOptions): OneNote.InkAnalysisWord; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysisWord; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.InkAnalysisWord object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisWordData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.InkAnalysisWordData; + } + /** + * Represents a collection of InkAnalysisWord objects. + * + * @remarks + * [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[]; + /** + * Returns the number of InkAnalysisWords in the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a InkAnalysisWord object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisWordCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkAnalysisWordCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkAnalysisWordCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.InkAnalysisWordCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkAnalysisWordCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.InkAnalysisWordCollectionData; + } + /** + * Represents a group of ink strokes. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly inkStrokes: OneNote.InkStrokeCollection; + /** + * Gets the PageContent parent of the FloatingInk object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly pageContent: OneNote.PageContent; + /** + * Gets the ID of the FloatingInk object. Read-only. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.FloatingInkLoadOptions): OneNote.FloatingInk; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.FloatingInk; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.FloatingInk object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.FloatingInkData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.FloatingInkData; + } + /** + * Represents a single stroke of ink. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly floatingInk: OneNote.FloatingInk; + /** + * Gets the ID of the InkStroke object. Read-only. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkStrokeLoadOptions): OneNote.InkStroke; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkStroke; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.InkStroke object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkStrokeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.InkStrokeData; + } + /** + * Represents a collection of InkStroke objects. + * + * @remarks + * [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[]; + /** + * Returns the number of InkStrokes in the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a InkStroke object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkStrokeCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkStrokeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkStrokeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkStrokeCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.InkStrokeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkStrokeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.InkStrokeCollectionData; + } + /** + * Represents a single point of ink stroke + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + class Point 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 Point object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + readonly id: string; + readonly x: number; + readonly y: number; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.PointLoadOptions): OneNote.Point; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Point; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): OneNote.Point; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.Point; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.Point; + /** + * 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 OneNote.Point object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PointData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.PointData; + } + /** + * Represents a collection of Point objects. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + class PointCollection 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.Point[]; + /** + * Returns the number of Point in the stroke. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + readonly count: number; + /** + * Gets a Point object by ID or by its index in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + * + * @param index The ID of the Point object, or the index location of the Point object in the collection. + */ + getItem(index: number | string): OneNote.Point; + /** + * Gets a Point on its position in the collection. + * + * @remarks + * [Api set: OneNoteApi 1.9] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.Point; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.PointCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PointCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.PointCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.PointCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add the object to the tracked object collection when the object was first created. + */ + track(): OneNote.PointCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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.PointCollection; + /** + * 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 `OneNote.PointCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PointCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.PointCollectionData; + } + /** + * A container for the ink in a word in a paragraph. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.Paragraph; + /** + * Gets the ID of the InkWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * The id of the recognized language in this ink word. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly languageId: string; + /** + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkWordLoadOptions): OneNote.InkWord; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkWord; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.InkWord object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkWordData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.InkWordData; + } + /** + * Represents a collection of InkWord objects. + * + * @remarks + * [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[]; + /** + * Returns the number of InkWords in the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a InkWord object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.InkWordCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkWordCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.InkWordCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.InkWordCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.InkWordCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.InkWordCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.InkWordCollectionData; + } + /** + * Represents a OneNote notebook. Notebooks contain section groups and sections. + * + * @remarks + * [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 + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly sectionGroups: OneNote.SectionGroupCollection; + /** + * The the sections of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly sections: OneNote.SectionCollection; + /** + * The url of the site that this notebook is located. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly baseUrl: string; + /** + * The client url of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly clientUrl: string; + /** + * Gets the ID of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * True if the Notebook is a special education notebook with read-only spaces inside the notebook (class notebook). Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + readonly isForEducation: boolean; + /** + * True if the Notebook folder is read-only. Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + readonly isReadOnly: boolean; + /** + * True if the Notebook is not created by the user (i.e. 'Misplaced Sections'). Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly isVirtual: boolean; + /** + * Gets the name of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly name: string; + /** + * Adds a new section to the end of the notebook. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param name The name of the new section. + */ + addSectionGroup(name: string): OneNote.SectionGroup; + /** + * Gets the REST API ID. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.NotebookLoadOptions): OneNote.Notebook; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Notebook; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Notebook object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.NotebookData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.NotebookData; + } + /** + * Represents a collection of notebooks. + * + * @remarks + * [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[]; + /** + * Returns the number of notebooks in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets the collection of notebooks with the specified name that are open in the application instance. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.NotebookCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.NotebookCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.NotebookCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.NotebookCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.NotebookCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.NotebookCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.NotebookCollectionData; + } + /** + * Represents a OneNote section group. Section groups can contain sections and other section groups. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly parentSectionGroupOrNull: OneNote.SectionGroup; + /** + * The collection of section groups in the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly sectionGroups: OneNote.SectionGroupCollection; + /** + * The collection of sections in the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly sections: OneNote.SectionCollection; + /** + * The client url of the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly clientUrl: string; + /** + * Gets the ID of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets the name of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly name: string; + /** + * Adds a new section to the end of the section group. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param name The name of the new section. + */ + addSectionGroup(name: string): OneNote.SectionGroup; + /** + * Gets the REST API ID. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.SectionGroupLoadOptions): OneNote.SectionGroup; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.SectionGroup; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.SectionGroup object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.SectionGroupData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.SectionGroupData; + } + /** + * Represents a collection of section groups. + * + * @remarks + * [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[]; + /** + * Returns the number of section groups in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets the collection of section groups with the specified name. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.SectionGroupCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.SectionGroupCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.SectionGroupCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.SectionGroupCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.SectionGroupCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.SectionGroupCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.SectionGroupCollectionData; + } + /** + * Represents a OneNote section. Sections can contain pages. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly notebook: OneNote.Notebook; + /** + * The collection of pages in the section. Read only + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly parentSectionGroupOrNull: OneNote.SectionGroup; + /** + * The client url of the section. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly clientUrl: string; + /** + * Gets the ID of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * True if this section is encrypted with a password. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly isEncrypted: boolean; + /** + * True if this section is Quick Notes. Read only + * + * @remarks + * [Api set: OneNoteApi 1.20] + */ + readonly isForQuickNotes: boolean; + /** + * True if this section is locked. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + readonly isLocked: boolean; + /** + * Gets the name of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly name: string; + /** + * The web url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly webUrl: string; + /** + * Adds a new page to the end of the section. + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param title The title of the new page. + */ + addPage(title: string): OneNote.Page; + /** + * Copies this section to specified notebook. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param destinationSectionGroup The section group to copy this section to. + */ + copyToSectionGroup(destinationSectionGroup: OneNote.SectionGroup): OneNote.Section; + /** + * Deletes a section + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + delete(): void; + /** + * Gets the REST API ID. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getRestApiId(): OfficeExtension.ClientResult; + /** + * Inserts a new section before or after the current section. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.SectionLoadOptions): OneNote.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Section object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.SectionData; + } + /** + * Represents a collection of sections. + * + * @remarks + * [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[]; + /** + * Returns the number of sections in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets the collection of sections with the specified name. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.SectionCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.SectionCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.SectionCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.SectionCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.SectionCollectionData; + } + /** + * Represents a OneNote page. + * + * @remarks + * [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 + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly inkAnalysisOrNull: OneNote.InkAnalysis; + /** + * Gets the section that contains the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly parentSection: OneNote.Section; + /** + * Gets the ClassNotebookPageSource to the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly classNotebookPageSource: string; + /** + * The client url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly clientUrl: string; + /** + * Gets the ID of the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets or sets the indentation level of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageLevel: number; + /** + * Gets or sets the title of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + title: string; + /** + * The web url of the page. Read only + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + analyzePage(): OfficeExtension.ClientResult; + /** + * Inserts a new page with translated content. + * + * @remarks + * [Api set: OneNoteApi 1.1] + * + * @param translatedContent Translated content of the page + */ + applyTranslation(translatedContent: string): void; + /** + * Copies this page to specified section. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + copyToSectionAndSetClassNotebookPageSource(destinationSection: OneNote.Section): OneNote.Page; + /** + * Deletes the Page + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + delete(): void; + /** + * Gets the REST API ID. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getRestApiId(): OfficeExtension.ClientResult; + /** + * Does the page has content title. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hasTitleContent(): OfficeExtension.ClientResult; + /** + * Inserts a new page before or after the current page. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.PageLoadOptions): OneNote.Page; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Page; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Page object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PageData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.PageData; + } + /** + * Represents a collection of pages. + * + * @remarks + * [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[]; + /** + * Returns the number of pages in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets the collection of pages with the specified title. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.PageCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PageCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.PageCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.PageCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.PageCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PageCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + 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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly image: OneNote.Image; + /** + * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly ink: OneNote.FloatingInk; + /** + * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly outline: OneNote.Outline; + /** + * Gets the page that contains the PageContent object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly parentPage: OneNote.Page; + /** + * Gets the ID of the PageContent object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets or sets the left (X-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + left: number; + /** + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + top: number; + /** + * Gets the type of the PageContent object. Read-only. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.PageContentLoadOptions): OneNote.PageContent; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.PageContent; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.PageContent object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PageContentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.PageContentData; + } + /** + * Represents the contents of a page, as a collection of PageContent objects. + * + * @remarks + * [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[]; + /** + * Returns the number of page contents in the collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a PageContent object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.PageContentCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PageContentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.PageContentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.PageContentCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.PageContentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.PageContentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.PageContentCollectionData; + } + /** + * Represents a container for Paragraph objects. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly pageContent: OneNote.PageContent; + /** + * Gets the collection of Paragraph objects in the Outline. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraphs: OneNote.ParagraphCollection; + /** + * Gets the ID of the Outline object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Adds the specified HTML to the bottom of the Outline. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Deletes the Outline + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + delete(): void; + /** + * Check if the outline is title outline. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + isTitle(): OfficeExtension.ClientResult; + /** + * Selects the Outline + The type of change that is made to the current selection. + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + select(changeType: OneNote.SelectionChangeType): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.OutlineLoadOptions): OneNote.Outline; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Outline; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Outline object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.OutlineData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.OutlineData; + } + /** + * A container for the visible content on a page. A Paragraph can contain any one ParagraphType type of content. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly inkWords: OneNote.InkWordCollection; + /** + * Gets the Outline object that contains the Paragraph. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly outline: OneNote.Outline; + /** + * The collection of paragraphs under this paragraph. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraphs: OneNote.ParagraphCollection; + /** + * Gets the parent paragraph object. Throws if a parent paragraph does not exist. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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 + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly table: OneNote.Table; + /** + * Gets the ID of the Paragraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets the type of the Paragraph object. Read-only. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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 + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + delete(): void; + /** + * Get list information of paragraph + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getParagraphInfo(): OfficeExtension.ClientResult; + /** + * Inserts the specified HTML content + * + * @remarks + * [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 + * + * @remarks + * [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.. + * + * @remarks + * [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.. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Selects the Paragraph + The type of change that is made to the current selection. + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + select(changeType: OneNote.SelectionChangeType): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.ParagraphLoadOptions): OneNote.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Paragraph object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.ParagraphData; + } + /** + * Represents a collection of Paragraph objects. + * + * @remarks + * [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[]; + /** + * Returns the number of paragraphs in the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a Paragraph object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.ParagraphCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.ParagraphCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.ParagraphCollectionData; + } + /** + * A container for the NoteTag in a paragraph. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets the status of the NoteTag object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.NoteTagLoadOptions): OneNote.NoteTag; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.NoteTag; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.NoteTag object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.NoteTagData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.NoteTagData; + } + /** + * Represents a RichText object in a Paragraph. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.Paragraph; + /** + * Gets the ID of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * The language id of the text. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly languageId: string; + /** + * Gets the text style of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.8] + */ + readonly style: OneNote.ParagraphStyle; + /** + * Gets the text content of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly text: string; + /** + * Get the HTML of the rich text + * + * @remarks + * [Api set: OneNoteApi 1.1] + * @returns The html of the rich text + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Selects the RichText + The type of change that is made to the current selection. + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + select(changeType: OneNote.SelectionChangeType): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.RichTextLoadOptions): OneNote.RichText; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.RichText; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.RichText object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.RichTextData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.RichTextData; + } + /** + * Represents an Image. An Image can be a direct child of a PageContent object or a Paragraph object. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.Paragraph; + /** + * Gets or sets the description of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + description: string; + /** + * Gets or sets the height of the Image layout. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + height: number; + /** + * Gets or sets the hyperlink of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hyperlink: string; + /** + * Gets the ID of the Image object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly ocrData: OneNote.ImageOcrData; + /** + * Gets or sets the width of the Image layout. + * + * @remarks + * [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. + * @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; + /** + * Deletes the Image. + * + * @remarks + * [Api set: OneNoteApi 1.18] + */ + delete(): void; + /** + * Gets the base64-encoded binary representation of the Image. + Example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA... + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + getBase64Image(): OfficeExtension.ClientResult; + /** + * Selects the Image + The type of change that is made to the current selection. + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + select(changeType: OneNote.SelectionChangeType): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.ImageLoadOptions): OneNote.Image; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Image; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Image object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ImageData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.ImageData; + } + /** + * Represents a table in a OneNote page. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.Paragraph; + /** + * Gets all of the table rows. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + borderVisible: boolean; + /** + * Gets the number of columns in the table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly columnCount: number; + /** + * Gets the ID of the table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets the number of rows in the table. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clear(): void; + /** + * Deletes the Table + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + delete(): void; + /** + * Gets the table cell at a specified row and column. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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; + /** + * Selects the Table + The type of change that is made to the current selection. + * + * @remarks + * [Api set: OneNoteApi 1.19] + */ + select(changeType: OneNote.SelectionChangeType): void; + /** + * Sets the shading color of all cells in the table. + The color code to set the cells to. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.TableLoadOptions): OneNote.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.Table object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.TableData; + } + /** + * Represents a row in a table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly cells: OneNote.TableCellCollection; + /** + * Gets the parent table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly parentTable: OneNote.Table; + /** + * Gets the number of cells in the row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly cellCount: number; + /** + * Gets the ID of the row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets the index of the row in its parent table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly rowIndex: number; + /** + * Clears the contents of the row. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clear(): void; + /** + * Inserts a row before or after the current row. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.TableRowLoadOptions): OneNote.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.TableRow object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.TableRowData; + } + /** + * Contains a collection of TableRow objects. + * + * @remarks + * [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[]; + /** + * Returns the number of table rows in this collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a table row object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.TableRowCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.TableRowCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.TableRowCollectionData; + } + /** + * Represents a cell in a OneNote table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly paragraphs: OneNote.ParagraphCollection; + /** + * Gets the parent row of the cell. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly parentRow: OneNote.TableRow; + /** + * Gets the index of the cell in its row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly cellIndex: number; + /** + * Gets the ID of the cell. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Gets the index of the cell's row in the table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly rowIndex: number; + /** + * Gets and sets the shading color of the cell + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.TableCellLoadOptions): OneNote.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 OneNote.TableCell object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): OneNote.Interfaces.TableCellData; + } + /** + * Contains a collection of TableCell objects. + * + * @remarks + * [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[]; + /** + * Returns the number of tablecells in this collection. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * Gets a table cell object by ID or by its index in the collection. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: OneNote.Interfaces.TableCellCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.TableCellCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): OneNote.TableCellCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): OneNote.TableCellCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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 need to add 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 {@link https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | 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; + /** + * 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 `OneNote.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): OneNote.Interfaces.TableCellCollectionData; + } + /** + * Represents data obtained by OCR (optical character recognition) of an image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ImageOcrData { + /** + * Represents the OCR language, with values such as EN-US + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ocrLanguageId: string; + /** + * Represents the text obtained by OCR of the image + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ocrText: string; + } + /** + * Weak reference to an ink stroke object and its content parent. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkStrokePointer { + /** + * Represents the id of the page content object corresponding to this stroke + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + contentId: string; + /** + * Represents the id of the ink stroke + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkStrokeId: string; + } + /** + * List information for paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ParagraphInfo { + /** + * // + Bullet list type of paragraph + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + bulletType: string; + /** + * // + Level of indentation of the paragraph + * + * @remarks + * [Api set: OneNoteApi 1.8] + */ + indentationLevel: number; + /** + * // + Index of paragraph in a list + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + index: number; + /** + * // + Type of list in paragraph + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + listType: OneNote.ListType | "None" | "Number" | "Bullet"; + /** + * // + Numbered list type of paragraph + * + * @remarks + * [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"; + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum InsertLocation { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + before = "Before", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + after = "After", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum PageContentType { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outline = "Outline", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image = "Image", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ink = "Ink", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + other = "Other", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum ParagraphType { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + richText = "RichText", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image = "Image", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + table = "Table", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ink = "Ink", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + other = "Other", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum NoteTagType { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + toDo = "ToDo", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + important = "Important", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + question = "Question", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + contact = "Contact", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + address = "Address", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + phoneNumber = "PhoneNumber", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + website = "Website", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + idea = "Idea", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + critical = "Critical", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + toDoPriority1 = "ToDoPriority1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + toDoPriority2 = "ToDoPriority2", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum NoteTagStatus { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + normal = "Normal", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + completed = "Completed", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + disabled = "Disabled", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outlookTask = "OutlookTask", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + taskNotSyncedYet = "TaskNotSyncedYet", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + taskRemoved = "TaskRemoved", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum ListType { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + none = "None", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + number = "Number", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + bullet = "Bullet", + } + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + enum NumberType { + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + none = "None", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + arabic = "Arabic", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ucroman = "UCRoman", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lcroman = "LCRoman", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ucletter = "UCLetter", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lcletter = "LCLetter", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ordinal = "Ordinal", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cardtext = "Cardtext", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ordtext = "Ordtext", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hex = "Hex", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + chiManSty = "ChiManSty", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + dbNum1 = "DbNum1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + dbNum2 = "DbNum2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + aiueo = "Aiueo", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + iroha = "Iroha", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + dbChar = "DbChar", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sbChar = "SbChar", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + dbNum3 = "DbNum3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + dbNum4 = "DbNum4", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + circlenum = "Circlenum", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + darabic = "DArabic", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + daiueo = "DAiueo", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + diroha = "DIroha", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + arabicLZ = "ArabicLZ", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + bullet = "Bullet", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ganada = "Ganada", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + chosung = "Chosung", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + gb1 = "GB1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + gb2 = "GB2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + gb3 = "GB3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + gb4 = "GB4", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + zodiac1 = "Zodiac1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + zodiac2 = "Zodiac2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + zodiac3 = "Zodiac3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + tpeDbNum1 = "TpeDbNum1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + tpeDbNum2 = "TpeDbNum2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + tpeDbNum3 = "TpeDbNum3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + tpeDbNum4 = "TpeDbNum4", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + chnDbNum1 = "ChnDbNum1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + chnDbNum2 = "ChnDbNum2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + chnDbNum3 = "ChnDbNum3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + chnDbNum4 = "ChnDbNum4", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + korDbNum1 = "KorDbNum1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + korDbNum2 = "KorDbNum2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + korDbNum3 = "KorDbNum3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + korDbNum4 = "KorDbNum4", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hebrew1 = "Hebrew1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + arabic1 = "Arabic1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hebrew2 = "Hebrew2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + arabic2 = "Arabic2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hindi1 = "Hindi1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hindi2 = "Hindi2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hindi3 = "Hindi3", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + thai1 = "Thai1", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + thai2 = "Thai2", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + numInDash = "NumInDash", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lcrus = "LCRus", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ucrus = "UCRus", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lcgreek = "LCGreek", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ucgreek = "UCGreek", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lim = "Lim", + /** + * @remarks + * [Api set: OneNoteApi 1.1] + */ + custom = "Custom", + } + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + const enum ParagraphStyle { + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + noStyle = 0, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + normal = 1, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + title = 2, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + dateTime = 3, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + heading1 = 4, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + heading2 = 5, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + heading3 = 6, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + heading4 = 7, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + heading5 = 8, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + heading6 = 9, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + quote = 10, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + citation = 11, + /** + * @remarks + * [Api set: OneNoteApi 1.8] + */ + code = 12, + } + /** + * @remarks + * [Api set: OneNoteApi 1.19] + */ + const enum SelectionChangeType { + /** + * @remarks + * [Api set: OneNoteApi 1.19] + */ + add = 0, + /** + * @remarks + * [Api set: OneNoteApi 1.19] + */ + remove = 1, + /** + * @remarks + * [Api set: OneNoteApi 1.19] + */ + set = 2, + /** + * @remarks + * [Api set: OneNoteApi 1.19] + */ + toggle = 3, + } + enum ErrorCodes { + accessDenied = "AccessDenied", + generalException = "GeneralException", + invalidArgument = "InvalidArgument", + invalidOperation = "InvalidOperation", + invalidState = "InvalidState", + itemNotFound = "ItemNotFound", + notImplemented = "NotImplemented", + notSupported = "NotSupported", + operationAborted = "OperationAborted", + } + 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 { + } + /** An interface for updating data on the InkAnalysis object, for use in `inkAnalysis.set({ ... })`. */ + interface InkAnalysisUpdateData { + /** + * Gets the parent page object. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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 PointCollection object, for use in `pointCollection.set({ ... })`. */ + interface PointCollectionUpdateData { + items?: OneNote.Interfaces.PointData[]; + } + /** 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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisUpdateData; + /** + * Gets or sets the indentation level of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: number; + /** + * Gets or sets the title of the page. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageUpdateData; + /** + * Gets or sets the left (X-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + left?: number; + /** + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageUpdateData; + /** + * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + description?: string; + /** + * Gets or sets the height of the Image layout. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + height?: number; + /** + * Gets or sets the hyperlink of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hyperlink?: string; + /** + * Gets or sets the width of the Image layout. + * + * @remarks + * [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. + * + * @remarks + * [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 + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + page?: OneNote.Interfaces.PageData; + /** + * Gets the ID of the InkAnalysis object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkAnalysis?: OneNote.Interfaces.InkAnalysisData; + /** + * Gets the ink analysis lines in this ink analysis paragraph. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lines?: OneNote.Interfaces.InkAnalysisLineData[]; + /** + * Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.InkAnalysisParagraphData; + /** + * Gets the ink analysis words in this ink analysis line. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + words?: OneNote.Interfaces.InkAnalysisWordData[]; + /** + * Gets the ID of the InkAnalysisLine object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineData; + /** + * Gets the ID of the InkAnalysisWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * The id of the recognized language in this inkAnalysisWord. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + strokePointers?: OneNote.InkStrokePointer[]; + /** + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkStrokes?: OneNote.Interfaces.InkStrokeData[]; + /** + * Gets the ID of the FloatingInk object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + floatingInk?: OneNote.Interfaces.FloatingInkData; + /** + * Gets the ID of the InkStroke object. Read-only. + * + * @remarks + * [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 `point.toJSON()`. */ + interface PointData { + /** + * Gets the ID of the Point object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + id?: string; + x?: number; + y?: number; + } + /** An interface describing the data returned by calling `pointCollection.toJSON()`. */ + interface PointCollectionData { + items?: OneNote.Interfaces.PointData[]; + } + /** An interface describing the data returned by calling `inkWord.toJSON()`. */ + interface InkWordData { + /** + * Gets the ID of the InkWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * The id of the recognized language in this ink word. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + languageId?: string; + /** + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * @remarks + * [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 + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupData[]; + /** + * The the sections of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionData[]; + /** + * The url of the site that this notebook is located. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + baseUrl?: string; + /** + * The client url of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * Gets the ID of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * True if the Notebook is a special education notebook with read-only spaces inside the notebook (class notebook). Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + isForEducation?: boolean; + /** + * True if the Notebook folder is read-only. Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + isReadOnly?: boolean; + /** + * True if the Notebook is not created by the user (i.e. 'Misplaced Sections'). Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isVirtual?: boolean; + /** + * Gets the name of the notebook. Read-only. + * + * @remarks + * [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 { + /** + * The collection of section groups in the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupData[]; + /** + * The collection of sections in the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionData[]; + /** + * The client url of the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * Gets the ID of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets the name of the section group. Read-only. + * + * @remarks + * [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 { + /** + * The collection of pages in the section. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pages?: OneNote.Interfaces.PageData[]; + /** + * The client url of the section. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * Gets the ID of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * True if this section is encrypted with a password. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isEncrypted?: boolean; + /** + * True if this section is Quick Notes. Read only + * + * @remarks + * [Api set: OneNoteApi 1.20] + */ + isForQuickNotes?: boolean; + /** + * True if this section is locked. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isLocked?: boolean; + /** + * Gets the name of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: string; + /** + * The web url of the page. Read only + * + * @remarks + * [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 + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisData; + /** + * Gets the ClassNotebookPageSource to the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + classNotebookPageSource?: string; + /** + * The client url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * Gets the ID of the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets or sets the indentation level of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: number; + /** + * Gets or sets the title of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + title?: string; + /** + * The web url of the page. Read only + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageData; + /** + * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ink?: OneNote.Interfaces.FloatingInkData; + /** + * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineData; + /** + * Gets the ID of the PageContent object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets or sets the left (X-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + left?: number; + /** + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + top?: number; + /** + * Gets the type of the PageContent object. Read-only. + * + * @remarks + * [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 collection of Paragraph objects in the Outline. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphData[]; + /** + * Gets the ID of the Outline object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkWords?: OneNote.Interfaces.InkWordData[]; + /** + * The collection of paragraphs under this paragraph. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphData[]; + /** + * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. Read-only + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableData; + /** + * Gets the ID of the Paragraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets the type of the Paragraph object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets the status of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + status?: OneNote.NoteTagStatus | "Unknown" | "Normal" | "Completed" | "Disabled" | "OutlookTask" | "TaskNotSyncedYet" | "TaskRemoved"; + /** + * Gets the type of the NoteTag object. Read-only. + * + * @remarks + * [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 ID of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * The language id of the text. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + languageId?: string; + /** + * Gets the text style of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.8] + */ + style?: OneNote.ParagraphStyle; + /** + * Gets the text content of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling `image.toJSON()`. */ + interface ImageData { + /** + * Gets or sets the description of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + description?: string; + /** + * Gets or sets the height of the Image layout. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + height?: number; + /** + * Gets or sets the hyperlink of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hyperlink?: string; + /** + * Gets the ID of the Image object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ocrData?: OneNote.ImageOcrData; + /** + * Gets or sets the width of the Image layout. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling `table.toJSON()`. */ + interface TableData { + /** + * Gets all of the table rows. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + borderVisible?: boolean; + /** + * Gets the number of columns in the table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + columnCount?: number; + /** + * Gets the ID of the table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets the number of rows in the table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cells?: OneNote.Interfaces.TableCellData[]; + /** + * Gets the number of cells in the row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cellCount?: number; + /** + * Gets the ID of the row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets the index of the row in its parent table. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphData[]; + /** + * Gets the index of the cell in its row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cellIndex?: number; + /** + * Gets the ID of the cell. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * Gets the index of the cell's row in the table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: number; + /** + * Gets and sets the shading color of the cell + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ApplicationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + notebooks?: OneNote.Interfaces.NotebookCollectionLoadOptions; + } + /** + * Represents ink analysis data for a given set of ink strokes. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the parent page object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + page?: OneNote.Interfaces.PageLoadOptions; + /** + * Gets the ID of the InkAnalysis object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents ink analysis data for an identified paragraph formed by ink strokes. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisParagraphLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Reference to the parent InkAnalysisPage. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkAnalysis?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * Gets the ink analysis lines in this ink analysis paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lines?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions; + /** + * Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents a collection of InkAnalysisParagraph objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisParagraphCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Reference to the parent InkAnalysisPage. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + lines?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents ink analysis data for an identified text line formed by ink strokes. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisLineLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Reference to the parent InkAnalysisParagraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.InkAnalysisParagraphLoadOptions; + /** + * Gets the ink analysis words in this ink analysis line. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + words?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions; + /** + * Gets the ID of the InkAnalysisLine object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents a collection of InkAnalysisLine objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisLineCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Reference to the parent InkAnalysisParagraph. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + words?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the InkAnalysisLine object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents ink analysis data for an identified word formed by ink strokes. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisWordLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Reference to the parent InkAnalysisLine. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineLoadOptions; + /** + * Gets the ID of the InkAnalysisWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * The id of the recognized language in this inkAnalysisWord. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + strokePointers?: boolean; + /** + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * Represents a collection of InkAnalysisWord objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisWordCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Reference to the parent InkAnalysisLine. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the InkAnalysisWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The id of the recognized language in this inkAnalysisWord. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * Represents a group of ink strokes. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface FloatingInkLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the strokes of the FloatingInk object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkStrokes?: OneNote.Interfaces.InkStrokeCollectionLoadOptions; + /** + * Gets the PageContent parent of the FloatingInk object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentLoadOptions; + /** + * Gets the ID of the FloatingInk object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents a single stroke of ink. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkStrokeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the ID of the InkStroke object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + floatingInk?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * Gets the ID of the InkStroke object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents a collection of InkStroke objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkStrokeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the InkStroke object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + floatingInk?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the InkStroke object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * Represents a single point of ink stroke + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + interface PointLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the ID of the Point object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + id?: boolean; + x?: boolean; + y?: boolean; + } + /** + * Represents a collection of Point objects. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + interface PointCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the Point object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.9] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: X + */ + x?: boolean; + /** + * For EACH ITEM in the collection: Y + */ + y?: boolean; + } + /** + * A container for the ink in a word in a paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkWordLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The parent paragraph containing the ink word. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * Gets the ID of the InkWord object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * The id of the recognized language in this ink word. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + languageId?: boolean; + /** + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * Represents a collection of InkWord objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface InkWordCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The parent paragraph containing the ink word. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the InkWord object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * Represents a OneNote notebook. Notebooks contain section groups and sections. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface NotebookLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The section groups in the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * The the sections of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * The url of the site that this notebook is located. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + baseUrl?: boolean; + /** + * The client url of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * Gets the ID of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * True if the Notebook is a special education notebook with read-only spaces inside the notebook (class notebook). Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + isForEducation?: boolean; + /** + * True if the Notebook folder is read-only. Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + isReadOnly?: boolean; + /** + * True if the Notebook is not created by the user (i.e. 'Misplaced Sections'). Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isVirtual?: boolean; + /** + * Gets the name of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * Represents a collection of notebooks. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface NotebookCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The section groups in the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * For EACH ITEM in the collection: The the sections of the notebook. Read only + * + * @remarks + * [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 + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + baseUrl?: boolean; + /** + * For EACH ITEM in the collection: The client url of the notebook. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: True if the Notebook is a special education notebook with read-only spaces inside the notebook (class notebook). Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + isForEducation?: boolean; + /** + * For EACH ITEM in the collection: True if the Notebook folder is read-only. Read only + * + * @remarks + * [Api set: OneNoteApi 1.11] + */ + isReadOnly?: boolean; + /** + * For EACH ITEM in the collection: True if the Notebook is not created by the user (i.e. 'Misplaced Sections'). Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isVirtual?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the notebook. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * Represents a OneNote section group. Section groups can contain sections and other section groups. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface SectionGroupLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the notebook that contains the section group. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * The collection of section groups in the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * The collection of sections in the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * The client url of the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * Gets the ID of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets the name of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * Represents a collection of section groups. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface SectionGroupCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the notebook that contains the section group. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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 + * + * @remarks + * [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 + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * For EACH ITEM in the collection: The client url of the section group. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the section group. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * Represents a OneNote section. Sections can contain pages. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface SectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the notebook that contains the section. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookLoadOptions; + /** + * The collection of pages in the section. Read only + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * The client url of the section. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * Gets the ID of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * True if this section is encrypted with a password. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isEncrypted?: boolean; + /** + * True if this section is Quick Notes. Read only + * + * @remarks + * [Api set: OneNoteApi 1.20] + */ + isForQuickNotes?: boolean; + /** + * True if this section is locked. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isLocked?: boolean; + /** + * Gets the name of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + /** + * The web url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * Represents a collection of sections. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface SectionCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the notebook that contains the section. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookLoadOptions; + /** + * For EACH ITEM in the collection: The collection of pages in the section. Read only + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * For EACH ITEM in the collection: The client url of the section. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: True if this section is encrypted with a password. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isEncrypted?: boolean; + /** + * For EACH ITEM in the collection: True if this section is Quick Notes. Read only + * + * @remarks + * [Api set: OneNoteApi 1.20] + */ + isForQuickNotes?: boolean; + /** + * For EACH ITEM in the collection: True if this section is locked. Read only + * + * @remarks + * [Api set: OneNoteApi 1.2] + */ + isLocked?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the section. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: The web url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * Represents a OneNote page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface PageLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * The collection of PageContent objects on the page. Read only + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * Gets the section that contains the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentSection?: OneNote.Interfaces.SectionLoadOptions; + /** + * Gets the ClassNotebookPageSource to the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + classNotebookPageSource?: boolean; + /** + * The client url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * Gets the ID of the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets or sets the indentation level of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: boolean; + /** + * Gets or sets the title of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + title?: boolean; + /** + * The web url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * Represents a collection of pages. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface PageCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: The collection of PageContent objects on the page. Read only + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * For EACH ITEM in the collection: Gets the section that contains the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentSection?: OneNote.Interfaces.SectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ClassNotebookPageSource to the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + classNotebookPageSource?: boolean; + /** + * For EACH ITEM in the collection: The client url of the page. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the page. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets or sets the indentation level of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: boolean; + /** + * For EACH ITEM in the collection: Gets or sets the title of the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + title?: boolean; + /** + * For EACH ITEM in the collection: The web url of the page. Read only + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface PageContentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageLoadOptions; + /** + * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ink?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * Gets the page that contains the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentPage?: OneNote.Interfaces.PageLoadOptions; + /** + * Gets the ID of the PageContent object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets or sets the left (X-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + left?: boolean; + /** + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + top?: boolean; + /** + * Gets the type of the PageContent object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * Represents the contents of a page, as a collection of PageContent objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface PageContentCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * For EACH ITEM in the collection: Gets the page that contains the PageContent object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentPage?: OneNote.Interfaces.PageLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the PageContent object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Gets the type of the PageContent object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * Represents a container for Paragraph objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface OutlineLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the PageContent object that contains the Outline. This object defines the position of the Outline on the page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentLoadOptions; + /** + * Gets the collection of Paragraph objects in the Outline. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * Gets the ID of the Outline object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ParagraphLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageLoadOptions; + /** + * Gets the Ink collection in the Paragraph. Throws an exception if ParagraphType is not Ink. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkWords?: OneNote.Interfaces.InkWordCollectionLoadOptions; + /** + * Gets the Outline object that contains the Paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * The collection of paragraphs under this paragraph. Read only + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * Gets the parent paragraph object. Throws if a parent paragraph does not exist. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentParagraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * Gets the parent paragraph object. Returns null if a parent paragraph does not exist. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentTableCellOrNull?: OneNote.Interfaces.TableCellLoadOptions; + /** + * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + richText?: OneNote.Interfaces.RichTextLoadOptions; + /** + * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableLoadOptions; + /** + * Gets the ID of the Paragraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets the type of the Paragraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * Represents a collection of Paragraph objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ParagraphCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + inkWords?: OneNote.Interfaces.InkWordCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the Outline object that contains the Paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * For EACH ITEM in the collection: The collection of paragraphs under this paragraph. Read only + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ID of the Paragraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the type of the Paragraph object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * A container for the NoteTag in a paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface NoteTagLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the Id of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets the status of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + status?: boolean; + /** + * Gets the type of the NoteTag object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * Represents a RichText object in a Paragraph. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface RichTextLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the Paragraph object that contains the RichText object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * Gets the ID of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * The language id of the text. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + languageId?: boolean; + /** + * Gets the text style of the RichText object. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.8] + */ + style?: boolean; + /** + * Gets the text content of the RichText object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface ImageLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * Gets or sets the description of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + description?: boolean; + /** + * Gets or sets the height of the Image layout. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + height?: boolean; + /** + * Gets or sets the hyperlink of the Image. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + hyperlink?: boolean; + /** + * Gets the ID of the Image object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + ocrData?: boolean; + /** + * Gets or sets the width of the Image layout. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + width?: boolean; + } + /** + * Represents a table in a OneNote page. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface TableLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the Paragraph object that contains the Table object. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * Gets all of the table rows. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + borderVisible?: boolean; + /** + * Gets the number of columns in the table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + columnCount?: boolean; + /** + * Gets the ID of the table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + rowCount?: boolean; + } + /** + * Represents a row in a table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface TableRowLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the cells in the row. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cells?: OneNote.Interfaces.TableCellCollectionLoadOptions; + /** + * Gets the parent table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentTable?: OneNote.Interfaces.TableLoadOptions; + /** + * Gets the number of cells in the row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cellCount?: boolean; + /** + * Gets the ID of the row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets the index of the row in its parent table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + } + /** + * Contains a collection of TableRow objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface TableRowCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the cells in the row. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cells?: OneNote.Interfaces.TableCellCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent table. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cellCount?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the row. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + } + /** + * Represents a cell in a OneNote table. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface TableCellLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the collection of Paragraph objects in the TableCell. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * Gets the parent row of the cell. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + parentRow?: OneNote.Interfaces.TableRowLoadOptions; + /** + * Gets the index of the cell in its row. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cellIndex?: boolean; + /** + * Gets the ID of the cell. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * Gets the index of the cell's row in the table. Read-only. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + /** + * Gets and sets the shading color of the cell + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + shadingColor?: boolean; + } + /** + * Contains a collection of TableCell objects. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + interface TableCellCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the collection of Paragraph objects in the TableCell. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent row of the cell. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + cellIndex?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the cell. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + /** + * For EACH ITEM in the collection: Gets and sets the shading color of the cell + * + * @remarks + * [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 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; +} + + +//////////////////////////////////////////////////////////////// +/////////////////////// End OneNote APIs /////////////////////// +//////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// +///////////////////////// Begin Visio ////////////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace Visio { + /** + * Provides information about the shape that raised the ShapeMouseEnter event. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeMouseEnterEventArgs { + /** + * Gets the name of the page which has the shape object that raised the ShapeMouseEnter event. + * + * @remarks + * [Api set: 1.1] + */ + pageName: string; + /** + * Gets the name of the shape object that raised the ShapeMouseEnter event. + * + * @remarks + * [Api set: 1.1] + */ + shapeName: string; + } + /** + * Provides information about the shape that raised the ShapeMouseLeave event. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeMouseLeaveEventArgs { + /** + * Gets the name of the page which has the shape object that raised the ShapeMouseLeave event. + * + * @remarks + * [Api set: 1.1] + */ + pageName: string; + /** + * Gets the name of the shape object that raised the ShapeMouseLeave event. + * + * @remarks + * [Api set: 1.1] + */ + shapeName: string; + } + /** + * Provides information about the page that raised the PageLoadComplete event. + * + * @remarks + * [Api set: 1.1] + */ + interface PageLoadCompleteEventArgs { + /** + * Gets the name of the page that raised the PageLoad event. + * + * @remarks + * [Api set: 1.1] + */ + pageName: string; + /** + * Gets the success or failure of the PageLoadComplete event. + * + * @remarks + * [Api set: 1.1] + */ + success: boolean; + } + /** + * Provides information about the document that raised the DataRefreshComplete event. + * + * @remarks + * [Api set: 1.1] + */ + interface DataRefreshCompleteEventArgs { + /** + * Gets the document object that raised the DataRefreshComplete event. + * + * @remarks + * [Api set: 1.1] + */ + document: Visio.Document; + /** + * Gets the success or failure of the DataRefreshComplete event. + * + * @remarks + * [Api set: 1.1] + */ + success: boolean; + } + /** + * Provides information about the shape collection that raised the SelectionChanged event. + * + * @remarks + * [Api set: 1.1] + */ + interface SelectionChangedEventArgs { + /** + * Gets the name of the page which has the ShapeCollection object that raised the SelectionChanged event. + * + * @remarks + * [Api set: 1.1] + */ + pageName: string; + /** + * Gets the array of shape names that raised the SelectionChanged event. + * + * @remarks + * [Api set: 1.1] + */ + shapeNames: string[]; + } + /** + * Provides information about the success or failure of the DocumentLoadComplete event. + * + * @remarks + * [Api set: 1.1] + */ + interface DocumentLoadCompleteEventArgs { + /** + * Gets the success or failure of the DocumentLoadComplete event. + * + * @remarks + * [Api set: 1.1] + */ + success: boolean; + } + /** + * Provides information about the page that raised the PageRenderComplete event. + * + * @remarks + * [Api set: 1.1] + */ + interface PageRenderCompleteEventArgs { + /** + * Gets the name of the page that raised the PageLoad event. + * + * @remarks + * [Api set: 1.1] + */ + pageName: string; + /** + * Gets the success/failure of the PageRender event. + * + * @remarks + * [Api set: 1.1] + */ + success: boolean; + } + /** + * Provides information about DocumentError event + * + * @remarks + * [Api set: 1.1] + */ + interface DocumentErrorEventArgs { + /** + * Visio Error code + * + * @remarks + * [Api set: 1.1] + */ + errorCode: number; + /** + * Message about error that occured + * + * @remarks + * [Api set: 1.1] + */ + errorMessage: string; + /** + * Tells if the error is critical or not. If critical the session cannot continue. + * + * @remarks + * [Api set: 1.1] + */ + isCritical: boolean; + } + /** + * Provides information about the TaskPaneStateChanged event. + * + * @remarks + * [Api set: 1.1] + */ + interface TaskPaneStateChangedEventArgs { + /** + * Current state of the taskpane + * + * @remarks + * [Api set: 1.1] + */ + isVisible: boolean; + /** + * Type of the TaskPane. + * + * @remarks + * [Api set: 1.1] + */ + paneType: Visio.TaskPaneType | "None" | "DataVisualizerProcessMappings" | "DataVisualizerOrgChartMappings"; + } + /** + * Represents the Application. + * + * @remarks + * [Api set: 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; + /** + * Show or hide the iFrame application borders. + * + * @remarks + * [Api set: 1.1] + */ + showBorders: boolean; + /** + * Show or hide the standard toolbars. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.ApplicationLoadOptions): Visio.Application; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Application; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.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 Visio.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.ApplicationData; + } + /** + * Represents the Document class. + * + * @remarks + * [Api set: 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; + /** + * Represents a Visio application instance that contains this document. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly application: Visio.Application; + /** + * Represents a collection of pages associated with the document. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly pages: Visio.PageCollection; + /** + * Returns the DocumentView object. Read-only. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: 1.1] + */ + getActivePage(): Visio.Page; + /** + * Set the Active Page of the document. + * + * @remarks + * [Api set: 1.1] + * + * @param PageName Name of the page + */ + setActivePage(PageName: string): void; + /** + * Show or Hide a TaskPane. + This will be consumed by the DV Excel Add-In/Other third-party apps who embed the visio drawing to show/hide the task pane. + * + * @remarks + * [Api set: 1.1] + * + * @param taskPaneType Type of the 1st Party TaskPane. It can take values from enum TaskPaneType + * @param initialProps Optional Parameter. This is a generic data structure which would be filled with initial data required to initialize the content of the Taskpane + * @param show Optional Parameter. If it is set to false, it will hide the specified taskpane + */ + showTaskPane(taskPaneType: Visio.TaskPaneType, initialProps?: any, show?: boolean): void; + /** + * Show or Hide a TaskPane. + This will be consumed by the DV Excel Add-In/Other third-party apps who embed the visio drawing to show/hide the task pane. + * + * @remarks + * [Api set: 1.1] + * + * @param taskPaneType Type of the 1st Party TaskPane. It can take values from enum TaskPaneType + * @param initialProps Optional Parameter. This is a generic data structure which would be filled with initial data required to initialize the content of the Taskpane + * @param show Optional Parameter. If it is set to false, it will hide the specified taskpane + */ + showTaskPane(taskPaneType: "None" | "DataVisualizerProcessMappings" | "DataVisualizerOrgChartMappings", initialProps?: any, show?: boolean): void; + /** + * Triggers the refresh of the data in the Diagram, for all pages. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.DocumentLoadOptions): Visio.Document; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Document; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.Document; + /** + * Occurs when the data is refreshed in the diagram. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onDataRefreshComplete: OfficeExtension.EventHandlers; + /** + * Event raised when a data visualizer diagram is created or updated with new mappings and/or data. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + /** + * Occurs when there is an expected or unexpected error occured in the session. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onDocumentError: OfficeExtension.EventHandlers; + /** + * Occurs when the Document is loaded, refreshed, or changed. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onDocumentLoadComplete: OfficeExtension.EventHandlers; + /** + * Occurs when the page is finished loading. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onPageLoadComplete: OfficeExtension.EventHandlers; + /** + * Occurs when the current selection of shapes changes. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the user moves the mouse pointer into the bounding box of a shape. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onShapeMouseEnter: OfficeExtension.EventHandlers; + /** + * Occurs when the user moves the mouse out of the bounding box of a shape. + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onShapeMouseLeave: OfficeExtension.EventHandlers; + /** + * Occurs whenever a task pane state is changed + * + * @remarks + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onTaskPaneStateChanged: 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 Visio.Document object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.DocumentData; + } + /** + * Represents the DocumentView class. + * + * @remarks + * [Api set: 1.1] + */ + class DocumentView 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; + /** + * Disable Hyperlinks. + * + * @remarks + * [Api set: 1.1] + */ + disableHyperlinks: boolean; + /** + * Disable Pan. + * + * @remarks + * [Api set: 1.1] + */ + disablePan: boolean; + /** + * Disable PanZoomWindow. + * + * @remarks + * [Api set: 1.1] + */ + disablePanZoomWindow: boolean; + /** + * Disable Zoom. + * + * @remarks + * [Api set: 1.1] + */ + disableZoom: boolean; + /** + * Hide Diagram Boundary. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.DocumentViewLoadOptions): Visio.DocumentView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.DocumentView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.DocumentView; + /** + * 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 Visio.DocumentView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.DocumentViewData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.DocumentViewData; + } + /** + * Represents the Page class. + * + * @remarks + * [Api set: 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; + /** + * All shapes in the Page, including subshapes. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly allShapes: Visio.ShapeCollection; + /** + * Returns the Comments Collection. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly comments: Visio.CommentCollection; + /** + * All top-level shapes in the Page.Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly shapes: Visio.ShapeCollection; + /** + * Returns the view of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly view: Visio.PageView; + /** + * Returns the height of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly height: number; + /** + * Index of the Page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly index: number; + /** + * Whether the page is a background page or not. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly isBackground: boolean; + /** + * Page name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly name: string; + /** + * Returns the width of the page. Read-only. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.PageLoadOptions): Visio.Page; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Page; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.Page; + /** + * 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 Visio.Page object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.PageData; + } + /** + * Represents the PageView class. + * + * @remarks + * [Api set: 1.1] + */ + class PageView 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; + /** + * Get and set Page's Zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: 1.1] + * + * @param ShapeId ShapeId to be seen in the center. + */ + centerViewportOnShape(ShapeId: number): void; + /** + * Fit Page to current window. + * + * @remarks + * [Api set: 1.1] + */ + fitToWindow(): void; + /** + * Returns the position object that specifies the position of the page in the view. + * + * @remarks + * [Api set: 1.1] + */ + getPosition(): OfficeExtension.ClientResult; + /** + * Represents the Selection in the page. + * + * @remarks + * [Api set: 1.1] + */ + getSelection(): Visio.Selection; + /** + * To check if the shape is in view of the page or not. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.PageViewLoadOptions): Visio.PageView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.PageView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.PageView; + /** + * 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 Visio.PageView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageViewData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.PageViewData; + } + /** + * Represents a collection of Page objects that are part of the document. + * + * @remarks + * [Api set: 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: Visio.Page[]; + /** + * Gets the number of pages in the collection. + * + * @remarks + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a page using its key (name or Id). + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.PageCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.PageCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.PageCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.PageCollection; + /** + * 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 `Visio.PageCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Visio.Interfaces.PageCollectionData; + } + /** + * Represents the Shape Collection. + * + * @remarks + * [Api set: 1.1] + */ + 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: Visio.Shape[]; + /** + * Gets the number of Shapes in the collection. + * + * @remarks + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a Shape using its key (name or Index). + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.ShapeCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.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 `Visio.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Visio.Interfaces.ShapeCollectionData; + } + /** + * Represents the Shape class. + * + * @remarks + * [Api set: 1.1] + */ + 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 Comments Collection. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly comments: Visio.CommentCollection; + /** + * Returns the Hyperlinks collection for a Shape object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly hyperlinks: Visio.HyperlinkCollection; + /** + * Returns the Shape's Data Section. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly shapeDataItems: Visio.ShapeDataItemCollection; + /** + * Gets SubShape Collection. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly subShapes: Visio.ShapeCollection; + /** + * Returns the view of the shape. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly view: Visio.ShapeView; + /** + * Shape's identifier. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly id: number; + /** + * Shape's name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly name: string; + /** + * Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * @remarks + * [Api set: 1.1] + */ + select: boolean; + /** + * Shape's text. Read-only. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.ShapeLoadOptions): Visio.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.Shape; + /** + * 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 Visio.Shape object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.ShapeData; + } + /** + * Represents the ShapeView class. + * + * @remarks + * [Api set: 1.1] + */ + class ShapeView 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 highlight around the shape. + * + * @remarks + * [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. + * @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. + * + * @remarks + * [Api set: 1.1] + * + * @param OverlayType An Overlay Type. Can be 'Text', 'Image' or 'Html'. + * @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. + * + * @remarks + * [Api set: 1.1] + * + * @param OverlayType An Overlay Type. Can be 'Text', 'Image' or 'Html'. + * @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" | "Html", 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. + * + * @remarks + * [Api set: 1.1] + * + * @param OverlayId An Overlay Id. Removes the specific overlay id from the shape. + */ + removeOverlay(OverlayId: number): void; + /** + * The purpose of SetText API is to update the text inside a visio Shape in run time. The updated text retains the existing formatting properties of the shape's text. + * + * @remarks + * [Api set: 1.1] + * + * @param Text Text parameter is the 'Updated text to display on the shape' + */ + setText(Text: string): void; + /** + * Shows particular overlay on the Shape. + * + * @remarks + * [Api set: 1.1] + * + * @param overlayId overlay id in context + * @param show to show or hide + */ + showOverlay(overlayId: number, show: boolean): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.ShapeViewLoadOptions): Visio.ShapeView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.ShapeView; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.ShapeView; + /** + * 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 Visio.ShapeView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeViewData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.ShapeViewData; + } + /** + * Represents the Position of the object in the view. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + y: number; + } + /** + * Represents the BoundingBox of the shape. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + width: number; + /** + * An integer that specifies the x-coordinate of the bounding box. + * + * @remarks + * [Api set: 1.1] + */ + x: number; + /** + * An integer that specifies the y-coordinate of the bounding box. + * + * @remarks + * [Api set: 1.1] + */ + y: number; + } + /** + * Represents the highlight data added to the shape. + * + * @remarks + * [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). + * + * @remarks + * [Api set: 1.1] + */ + color: string; + /** + * A positive integer that specifies the width of the highlight's stroke in pixels. + * + * @remarks + * [Api set: 1.1] + */ + width: number; + } + /** + * Represents the ShapeDataItemCollection for a given Shape. + * + * @remarks + * [Api set: 1.1] + */ + class ShapeDataItemCollection 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: Visio.ShapeDataItem[]; + /** + * Gets the number of Shape Data Items. + * + * @remarks + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the ShapeDataItem using its name. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.ShapeDataItemCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.ShapeDataItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.ShapeDataItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.ShapeDataItemCollection; + /** + * 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 `Visio.ShapeDataItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeDataItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Visio.Interfaces.ShapeDataItemCollectionData; + } + /** + * Represents the ShapeDataItem. + * + * @remarks + * [Api set: 1.1] + */ + class ShapeDataItem 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 string that specifies the format of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly format: string; + /** + * A string that specifies the formatted value of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly formattedValue: string; + /** + * A string that specifies the label of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly label: string; + /** + * A string that specifies the value of the shape data item. Read-only. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.ShapeDataItemLoadOptions): Visio.ShapeDataItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.ShapeDataItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.ShapeDataItem; + /** + * 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 Visio.ShapeDataItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeDataItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.ShapeDataItemData; + } + /** + * Represents the Hyperlink Collection. + * + * @remarks + * [Api set: 1.1] + */ + class HyperlinkCollection 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: Visio.Hyperlink[]; + /** + * Gets the number of hyperlinks. + * + * @remarks + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a Hyperlink using its key (name or Id). + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.HyperlinkCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.HyperlinkCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.HyperlinkCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.HyperlinkCollection; + /** + * 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 `Visio.HyperlinkCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.HyperlinkCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Visio.Interfaces.HyperlinkCollectionData; + } + /** + * Represents the Hyperlink. + * + * @remarks + * [Api set: 1.1] + */ + class Hyperlink 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 address of the Hyperlink object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly address: string; + /** + * Gets the description of a hyperlink. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly description: string; + /** + * Gets the extra URL request information used to resolve the hyperlink's URL. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + readonly extraInfo: string; + /** + * Gets the sub-address of the Hyperlink object. Read-only. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.HyperlinkLoadOptions): Visio.Hyperlink; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Hyperlink; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.Hyperlink; + /** + * 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 Visio.Hyperlink object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.HyperlinkData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.HyperlinkData; + } + /** + * Represents the CommentCollection for a given Shape. + * + * @remarks + * [Api set: 1.1] + */ + 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: Visio.Comment[]; + /** + * Gets the number of Comments. + * + * @remarks + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets the Comment using its name. + * + * @remarks + * [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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.CommentCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Visio.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 `Visio.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Visio.Interfaces.CommentCollectionData; + } + /** + * Represents the Comment. + * + * @remarks + * [Api set: 1.1] + */ + 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; + /** + * A string that specifies the name of the author of the comment. + * + * @remarks + * [Api set: 1.1] + */ + author: string; + /** + * A string that specifies the date when the comment was created. + * + * @remarks + * [Api set: 1.1] + */ + date: string; + /** + * A string that contains the comment text. + * + * @remarks + * [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. + * @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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Visio.Interfaces.CommentLoadOptions): Visio.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.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 Visio.Comment object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.CommentData; + } + /** + * Represents the Selection in the page. + * + * @remarks + * [Api set: 1.1] + */ + class Selection 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 Shapes of the Selection. Read-only. + * + * @remarks + * [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. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Visio.Selection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Visio.Selection; + /** + * 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 Visio.Selection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.SelectionData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Visio.Interfaces.SelectionData; + } + /** + * Represents the Horizontal Alignment of the Overlay relative to the shape. + * + * @remarks + * [Api set: 1.1] + */ + enum OverlayHorizontalAlignment { + /** + * left + * @remarks + * [Api set: 1.1] + */ + left = "Left", + /** + * center + * @remarks + * [Api set: 1.1] + */ + center = "Center", + /** + * right + * @remarks + * [Api set: 1.1] + */ + right = "Right", + } + /** + * Represents the Vertical Alignment of the Overlay relative to the shape. + * + * @remarks + * [Api set: 1.1] + */ + enum OverlayVerticalAlignment { + /** + * top + * @remarks + * [Api set: 1.1] + */ + top = "Top", + /** + * middle + * @remarks + * [Api set: 1.1] + */ + middle = "Middle", + /** + * bottom + * @remarks + * [Api set: 1.1] + */ + bottom = "Bottom", + } + /** + * Represents the type of the overlay. + * + * @remarks + * [Api set: 1.1] + */ + enum OverlayType { + /** + * text + * @remarks + * [Api set: 1.1] + */ + text = "Text", + /** + * image + * @remarks + * [Api set: 1.1] + */ + image = "Image", + /** + * html + * @remarks + * [Api set: 1.1] + */ + html = "Html", + } + /** + * Toolbar IDs of the app + * + * @remarks + * [Api set: 1.1] + */ + enum ToolBarType { + /** + * CommandBar + * @remarks + * [Api set: 1.1] + */ + commandBar = "CommandBar", + /** + * PageNavigationBar + * @remarks + * [Api set: 1.1] + */ + pageNavigationBar = "PageNavigationBar", + /** + * StatusBar + * @remarks + * [Api set: 1.1] + */ + statusBar = "StatusBar", + } + /** + * Result of Data Visualizer Diagram operations. + * + * @remarks + * [Api set: 1.1] + */ + enum DataVisualizerDiagramResultType { + /** + * Operation is success. + * @remarks + * [Api set: 1.1] + */ + success = "Success", + /** + * Unexpected error during operation. + * @remarks + * [Api set: 1.1] + */ + unexpected = "Unexpected", + /** + * Validation error in operation. + * @remarks + * [Api set: 1.1] + */ + validationError = "ValidationError", + /** + * Conflict error in operation. + * @remarks + * [Api set: 1.1] + */ + conflictError = "ConflictError", + } + /** + * Type of the Data Visualizer Diagram operation + * + * @remarks + * [Api set: 1.1] + */ + enum DataVisualizerDiagramOperationType { + /** + * unknown operation type. + * @remarks + * [Api set: 1.1] + */ + unknown = "Unknown", + /** + * Creation operation. + * @remarks + * [Api set: 1.1] + */ + create = "Create", + /** + * Update Mappings operation. + * @remarks + * [Api set: 1.1] + */ + updateMappings = "UpdateMappings", + /** + * Update data associated with diagram. + * @remarks + * [Api set: 1.1] + */ + updateData = "UpdateData", + /** + * Update both data and mappings. + * @remarks + * [Api set: 1.1] + */ + update = "Update", + /** + * Delete the diagram content. + * @remarks + * [Api set: 1.1] + */ + delete = "Delete", + } + /** + * DiagramType for Data Visualizer diagrams + * + * @remarks + * [Api set: 1.1] + */ + enum DataVisualizerDiagramType { + /** + * Unknown + * @remarks + * [Api set: 1.1] + */ + unknown = "Unknown", + /** + * Basic Flowchart + * @remarks + * [Api set: 1.1] + */ + basicFlowchart = "BasicFlowchart", + /** + * Horizontal Cross-Functional Flowchart + * @remarks + * [Api set: 1.1] + */ + crossFunctionalFlowchart_Horizontal = "CrossFunctionalFlowchart_Horizontal", + /** + * Vertical Cross-Functional Flowchart + * @remarks + * [Api set: 1.1] + */ + crossFunctionalFlowchart_Vertical = "CrossFunctionalFlowchart_Vertical", + /** + * Audit + * @remarks + * [Api set: 1.1] + */ + audit = "Audit", + /** + * OrgChart + * @remarks + * [Api set: 1.1] + */ + orgChart = "OrgChart", + /** + * Network + * @remarks + * [Api set: 1.1] + */ + network = "Network", + } + /** + * Represents the type of column values. + * + * @remarks + * [Api set: 1.1] + */ + enum ColumnType { + /** + * Other + * @remarks + * [Api set: 1.1] + */ + unknown = "Unknown", + /** + * String values + * @remarks + * [Api set: 1.1] + */ + string = "String", + /** + * Numerical values + * @remarks + * [Api set: 1.1] + */ + number = "Number", + /** + * Date + * @remarks + * [Api set: 1.1] + */ + date = "Date", + /** + * Currency + * @remarks + * [Api set: 1.1] + */ + currency = "Currency", + } + /** + * Represents the type of source for the data connection. + * + * @remarks + * [Api set: 1.1] + */ + enum DataSourceType { + /** + * Unknown Data Source + * @remarks + * [Api set: 1.1] + */ + unknown = "Unknown", + /** + * Microsoft Excel workbook + * @remarks + * [Api set: 1.1] + */ + excel = "Excel", + } + /** + * Represents the orientation of the Cross Functional Flowchart diagram. + * + * @remarks + * [Api set: 1.1] + */ + enum CrossFunctionalFlowchartOrientation { + /** + * Horizontal Cross Functional Flowchart. + * @remarks + * [Api set: 1.1] + */ + horizontal = "Horizontal", + /** + * Vertical Cross Functional Flowchart. + * @remarks + * [Api set: 1.1] + */ + vertical = "Vertical", + } + /** + * Represents the type of layout. + * + * @remarks + * [Api set: 1.1] + */ + enum LayoutVariant { + /** + * Invalid layout + * @remarks + * [Api set: 1.1] + */ + unknown = "Unknown", + /** + * Use the Page default layout + * @remarks + * [Api set: 1.1] + */ + pageDefault = "PageDefault", + /** + * Use Flowchart with TopToBottom orientation + * @remarks + * [Api set: 1.1] + */ + flowchart_TopToBottom = "Flowchart_TopToBottom", + /** + * Use Flowchart with BottomToTop orientation + * @remarks + * [Api set: 1.1] + */ + flowchart_BottomToTop = "Flowchart_BottomToTop", + /** + * Use Flowchart with LeftToRight orientation + * @remarks + * [Api set: 1.1] + */ + flowchart_LeftToRight = "Flowchart_LeftToRight", + /** + * Use Flowchart with RightToLeft orientation + * @remarks + * [Api set: 1.1] + */ + flowchart_RightToLeft = "Flowchart_RightToLeft", + /** + * Use WideTree with DownThenRight orientation + * @remarks + * [Api set: 1.1] + */ + wideTree_DownThenRight = "WideTree_DownThenRight", + /** + * Use WideTree with DownThenLeft orientation + * @remarks + * [Api set: 1.1] + */ + wideTree_DownThenLeft = "WideTree_DownThenLeft", + /** + * Use WideTree with RightThenDown orientation + * @remarks + * [Api set: 1.1] + */ + wideTree_RightThenDown = "WideTree_RightThenDown", + /** + * Use WideTree with LeftThenDown orientation + * @remarks + * [Api set: 1.1] + */ + wideTree_LeftThenDown = "WideTree_LeftThenDown", + } + /** + * Represents the types of data validation error. + * + * @remarks + * [Api set: 1.1] + */ + enum DataValidationErrorType { + /** + * No error + * @remarks + * [Api set: 1.1] + */ + none = "None", + /** + * Data does not have one of the mapped column. + * @remarks + * [Api set: 1.1] + */ + columnNotMapped = "ColumnNotMapped", + /** + * UniqueId column has error. + * @remarks + * [Api set: 1.1] + */ + uniqueIdColumnError = "UniqueIdColumnError", + /** + * Swim-lane column is empty. + * @remarks + * [Api set: 1.1] + */ + swimlaneColumnError = "SwimlaneColumnError", + /** + * Delimiter can not have more then one character. + * @remarks + * [Api set: 1.1] + */ + delimiterError = "DelimiterError", + /** + * Connector column has error + * @remarks + * [Api set: 1.1] + */ + connectorColumnError = "ConnectorColumnError", + /** + * Connector column is already mapped + to another setting + * @remarks + * [Api set: 1.1] + */ + connectorColumnMappedElsewhere = "ConnectorColumnMappedElsewhere", + /** + * Connector label column already mapped + to other setting + * @remarks + * [Api set: 1.1] + */ + connectorLabelColumnMappedElsewhere = "ConnectorLabelColumnMappedElsewhere", + /** + * Connector column and connector label column are + already mapped to other setting. + * @remarks + * [Api set: 1.1] + */ + connectorColumnAndConnectorLabelMappedElsewhere = "ConnectorColumnAndConnectorLabelMappedElsewhere", + } + /** + * Direction of connector in DataVisualizer diagram. + * + * @remarks + * [Api set: 1.1] + */ + enum ConnectorDirection { + /** + * Direction will be from target to source shape. + * @remarks + * [Api set: 1.1] + */ + fromTarget = "FromTarget", + /** + * Direction will be from source to target shape. + * @remarks + * [Api set: 1.1] + */ + toTarget = "ToTarget", + } + /** + * TaskPaneType represents the types of the First Party TaskPanes that are supported by Host through APIs. Used in case of Show TaskPane API/ TaskPane State Changed Event etc + * + * @remarks + * [Api set: 1.1] + */ + enum TaskPaneType { + /** + * None Type + * @remarks + * [Api set: 1.1] + */ + none = "None", + /** + * Data Visualizer Process Mapping Pane + * @remarks + * [Api set: 1.1] + */ + dataVisualizerProcessMappings = "DataVisualizerProcessMappings", + /** + * Data Visualizer Organisation Mapping Pane + * @remarks + * [Api set: 1.1] + */ + dataVisualizerOrgChartMappings = "DataVisualizerOrgChartMappings", + } + /** + * MessageType represents the type of message when event is fired from Host + * + * @remarks + * [Api set: 1.1] + */ + const enum MessageType { + /** + * None Type + * @remarks + * [Api set: 1.1] + */ + none = 0, + /** + * DataVisualizer diagram operation complete Event Message + * @remarks + * [Api set: 1.1] + */ + dataVisualizerDiagramOperationCompletedEvent = 1, + } + /** + * EventType represents the type of the events Host supports + * + * @remarks + * [Api set: 1.1] + */ + enum EventType { + /** + * DataVisualizer diagram operation complete Event + * @remarks + * [Api set: 1.1] + */ + dataVisualizerDiagramOperationCompleted = "DataVisualizerDiagramOperationCompleted", + } + 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. + * + * @remarks + * [Api set: 1.1] + */ + showBorders?: boolean; + /** + * Show or hide the standard toolbars. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + application?: Visio.Interfaces.ApplicationUpdateData; + /** + * Returns the DocumentView object. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + disableHyperlinks?: boolean; + /** + * Disable Pan. + * + * @remarks + * [Api set: 1.1] + */ + disablePan?: boolean; + /** + * Disable PanZoomWindow. + * + * @remarks + * [Api set: 1.1] + */ + disablePanZoomWindow?: boolean; + /** + * Disable Zoom. + * + * @remarks + * [Api set: 1.1] + */ + disableZoom?: boolean; + /** + * Hide Diagram Boundary. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.ShapeViewUpdateData; + /** + * Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + author?: string; + /** + * A string that specifies the date when the comment was created. + * + * @remarks + * [Api set: 1.1] + */ + date?: string; + /** + * A string that contains the comment text. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + showBorders?: boolean; + /** + * Show or hide the standard toolbars. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + application?: Visio.Interfaces.ApplicationData; + /** + * Represents a collection of pages associated with the document. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + pages?: Visio.Interfaces.PageData[]; + /** + * Returns the DocumentView object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.DocumentViewData; + } + /** An interface describing the data returned by calling `documentView.toJSON()`. */ + interface DocumentViewData { + /** + * Disable Hyperlinks. + * + * @remarks + * [Api set: 1.1] + */ + disableHyperlinks?: boolean; + /** + * Disable Pan. + * + * @remarks + * [Api set: 1.1] + */ + disablePan?: boolean; + /** + * Disable PanZoomWindow. + * + * @remarks + * [Api set: 1.1] + */ + disablePanZoomWindow?: boolean; + /** + * Disable Zoom. + * + * @remarks + * [Api set: 1.1] + */ + disableZoom?: boolean; + /** + * Hide Diagram Boundary. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + allShapes?: Visio.Interfaces.ShapeData[]; + /** + * Returns the Comments Collection. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + comments?: Visio.Interfaces.CommentData[]; + /** + * All top-level shapes in the Page.Read-only. + * + * @remarks + * [Api set: 1.1] + */ + shapes?: Visio.Interfaces.ShapeData[]; + /** + * Returns the view of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.PageViewData; + /** + * Returns the height of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + height?: number; + /** + * Index of the Page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + index?: number; + /** + * Whether the page is a background page or not. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + isBackground?: boolean; + /** + * Page name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + name?: string; + /** + * Returns the width of the page. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + comments?: Visio.Interfaces.CommentData[]; + /** + * Returns the Hyperlinks collection for a Shape object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + hyperlinks?: Visio.Interfaces.HyperlinkData[]; + /** + * Returns the Shape's Data Section. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + shapeDataItems?: Visio.Interfaces.ShapeDataItemData[]; + /** + * Gets SubShape Collection. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + subShapes?: Visio.Interfaces.ShapeData[]; + /** + * Returns the view of the shape. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.ShapeViewData; + /** + * Shape's identifier. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + id?: number; + /** + * Shape's name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + name?: string; + /** + * Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * @remarks + * [Api set: 1.1] + */ + select?: boolean; + /** + * Shape's text. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling `shapeView.toJSON()`. */ + interface ShapeViewData { + /** + * Represents the highlight around the shape. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + format?: string; + /** + * A string that specifies the formatted value of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + formattedValue?: string; + /** + * A string that specifies the label of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + label?: string; + /** + * A string that specifies the value of the shape data item. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + address?: string; + /** + * Gets the description of a hyperlink. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + description?: string; + /** + * Gets the extra URL request information used to resolve the hyperlink's URL. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + extraInfo?: string; + /** + * Gets the sub-address of the Hyperlink object. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + author?: string; + /** + * A string that specifies the date when the comment was created. + * + * @remarks + * [Api set: 1.1] + */ + date?: string; + /** + * A string that contains the comment text. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + shapes?: Visio.Interfaces.ShapeData[]; + } + /** + * Represents the Application. + * + * @remarks + * [Api set: 1.1] + */ + interface ApplicationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Show or hide the iFrame application borders. + * + * @remarks + * [Api set: 1.1] + */ + showBorders?: boolean; + /** + * Show or hide the standard toolbars. + * + * @remarks + * [Api set: 1.1] + */ + showToolbars?: boolean; + } + /** + * Represents the Document class. + * + * @remarks + * [Api set: 1.1] + */ + interface DocumentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents a Visio application instance that contains this document. + * + * @remarks + * [Api set: 1.1] + */ + application?: Visio.Interfaces.ApplicationLoadOptions; + /** + * Returns the DocumentView object. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.DocumentViewLoadOptions; + } + /** + * Represents the DocumentView class. + * + * @remarks + * [Api set: 1.1] + */ + interface DocumentViewLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Disable Hyperlinks. + * + * @remarks + * [Api set: 1.1] + */ + disableHyperlinks?: boolean; + /** + * Disable Pan. + * + * @remarks + * [Api set: 1.1] + */ + disablePan?: boolean; + /** + * Disable PanZoomWindow. + * + * @remarks + * [Api set: 1.1] + */ + disablePanZoomWindow?: boolean; + /** + * Disable Zoom. + * + * @remarks + * [Api set: 1.1] + */ + disableZoom?: boolean; + /** + * Hide Diagram Boundary. + * + * @remarks + * [Api set: 1.1] + */ + hideDiagramBoundary?: boolean; + } + /** + * Represents the Page class. + * + * @remarks + * [Api set: 1.1] + */ + interface PageLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the view of the page. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.PageViewLoadOptions; + /** + * Returns the height of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + height?: boolean; + /** + * Index of the Page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + index?: boolean; + /** + * Whether the page is a background page or not. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + isBackground?: boolean; + /** + * Page name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + name?: boolean; + /** + * Returns the width of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + width?: boolean; + } + /** + * Represents the PageView class. + * + * @remarks + * [Api set: 1.1] + */ + interface PageViewLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Get and set Page's Zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. + * + * @remarks + * [Api set: 1.1] + */ + zoom?: boolean; + } + /** + * Represents a collection of Page objects that are part of the document. + * + * @remarks + * [Api set: 1.1] + */ + interface PageCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the view of the page. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.PageViewLoadOptions; + /** + * For EACH ITEM in the collection: Returns the height of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Index of the Page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Whether the page is a background page or not. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + isBackground?: boolean; + /** + * For EACH ITEM in the collection: Page name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: Returns the width of the page. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + width?: boolean; + } + /** + * Represents the Shape Collection. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the view of the shape. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.ShapeViewLoadOptions; + /** + * For EACH ITEM in the collection: Shape's identifier. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Shape's name. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + select?: boolean; + /** + * For EACH ITEM in the collection: Shape's text. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + text?: boolean; + } + /** + * Represents the Shape class. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the view of the shape. + * + * @remarks + * [Api set: 1.1] + */ + view?: Visio.Interfaces.ShapeViewLoadOptions; + /** + * Shape's identifier. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + id?: boolean; + /** + * Shape's name. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + name?: boolean; + /** + * Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * @remarks + * [Api set: 1.1] + */ + select?: boolean; + /** + * Shape's text. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + text?: boolean; + } + /** + * Represents the ShapeView class. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeViewLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the highlight around the shape. + * + * @remarks + * [Api set: 1.1] + */ + highlight?: boolean; + } + /** + * Represents the ShapeDataItemCollection for a given Shape. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeDataItemCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: A string that specifies the format of the shape data item. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + value?: boolean; + } + /** + * Represents the ShapeDataItem. + * + * @remarks + * [Api set: 1.1] + */ + interface ShapeDataItemLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * A string that specifies the format of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + format?: boolean; + /** + * A string that specifies the formatted value of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + formattedValue?: boolean; + /** + * A string that specifies the label of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + label?: boolean; + /** + * A string that specifies the value of the shape data item. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + value?: boolean; + } + /** + * Represents the Hyperlink Collection. + * + * @remarks + * [Api set: 1.1] + */ + interface HyperlinkCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the address of the Hyperlink object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + address?: boolean; + /** + * For EACH ITEM in the collection: Gets the description of a hyperlink. Read-only. + * + * @remarks + * [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. + * + * @remarks + * [Api set: 1.1] + */ + extraInfo?: boolean; + /** + * For EACH ITEM in the collection: Gets the sub-address of the Hyperlink object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + subAddress?: boolean; + } + /** + * Represents the Hyperlink. + * + * @remarks + * [Api set: 1.1] + */ + interface HyperlinkLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the address of the Hyperlink object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + address?: boolean; + /** + * Gets the description of a hyperlink. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + description?: boolean; + /** + * Gets the extra URL request information used to resolve the hyperlink's URL. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + extraInfo?: boolean; + /** + * Gets the sub-address of the Hyperlink object. Read-only. + * + * @remarks + * [Api set: 1.1] + */ + subAddress?: boolean; + } + /** + * Represents the CommentCollection for a given Shape. + * + * @remarks + * [Api set: 1.1] + */ + interface CommentCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: A string that specifies the name of the author of the comment. + * + * @remarks + * [Api set: 1.1] + */ + author?: boolean; + /** + * For EACH ITEM in the collection: A string that specifies the date when the comment was created. + * + * @remarks + * [Api set: 1.1] + */ + date?: boolean; + /** + * For EACH ITEM in the collection: A string that contains the comment text. + * + * @remarks + * [Api set: 1.1] + */ + text?: boolean; + } + /** + * Represents the Comment. + * + * @remarks + * [Api set: 1.1] + */ + interface CommentLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * A string that specifies the name of the author of the comment. + * + * @remarks + * [Api set: 1.1] + */ + author?: boolean; + /** + * A string that specifies the date when the comment was created. + * + * @remarks + * [Api set: 1.1] + */ + date?: boolean; + /** + * A string that contains the comment text. + * + * @remarks + * [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 OfficeCore.RequestContext { + 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 /////////////////////////// +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// +//////////////////// Begin PowerPoint APIs ///////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace PowerPoint { + /** + * @remarks + * [Api set: PowerPointApi 1.0] + */ + 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; + /** + * Create a new instance of PowerPoint.Application object + */ + static newObject(context: OfficeExtension.ClientRequestContext): PowerPoint.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 PowerPoint.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * @remarks + * [Api set: PowerPointApi 1.0] + */ + class Presentation 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 collection of `SlideMaster` objects that are in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly slideMasters: PowerPoint.SlideMasterCollection; + /** + * Returns an ordered collection of slides in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + readonly slides: PowerPoint.SlideCollection; + /** + * Returns a collection of tags attached to the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly tags: PowerPoint.TagCollection; + readonly title: string; + /** + * Returns the selected shapes in the current slide of the presentation. + If no shapes are selected, an empty collection is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getSelectedShapes(): PowerPoint.ShapeScopedCollection; + /** + * Returns the selected slides in the current view of the presentation. + The first item in the collection is the active slide that is visible in the editing area. + If no slides are selected, an empty collection is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getSelectedSlides(): PowerPoint.SlideScopedCollection; + /** + * Returns the selected {@link PowerPoint.TextRange} in the current view of the presentation. + Throws an exception if no text is selected. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getSelectedTextRange(): PowerPoint.TextRange; + /** + * Returns the selected {@link PowerPoint.TextRange} in the current view of the presentation. + If no text is selected, an object with an `isNullObject` property set to `true` is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getSelectedTextRangeOrNullObject(): PowerPoint.TextRange; + /** + * Inserts the specified slides from a presentation into the current presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + * + * @param base64File The base64-encoded string representing the source presentation file. + * @param options The options that define which slides will be inserted, where the new slides will go, and which presentation's formatting will be used. + */ + insertSlidesFromBase64(base64File: string, options?: PowerPoint.InsertSlideOptions): void; + /** + * Selects the slides in the current view of the presentation. Existing slide selection is replaced with the new selection. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param slideIds List of slide IDs to select in the presentation. If the list is empty, selection is cleared. + */ + setSelectedSlides(slideIds: string[]): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.PresentationLoadOptions): PowerPoint.Presentation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.Presentation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.Presentation; + /** + * 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 PowerPoint.Presentation object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.PresentationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.PresentationData; + } + /** + * Represents the available options when adding a new slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface AddSlideOptions { + /** + * Specifies the ID of a Slide Layout to be used for the new slide. + If no `layoutId` is provided, but a `slideMasterId` is provided, then the ID of the first layout from the specified Slide Master will be used. + If no `slideMasterId` is provided, but a `layoutId` is provided, then the specified layout needs to be available for the default Slide Master (as specified + in the `slideMasterId` description). Otherwise, an error will be thrown. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + layoutId?: string; + /** + * Specifies the ID of a Slide Master to be used for the new slide. + If no `slideMasterId` is provided, then the previous slide's Slide Master will be used. + If there is no previous slide, then the presentation's first Slide Master will be used. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + slideMasterId?: string; + } + /** + * Represents the bullet formatting properties of a text that is attached to the {@link PowerPoint.ParagraphFormat}. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + class BulletFormat 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; + /** + * Specifies if the bullets in the paragraph are visible. Returns 'null' if the 'TextRange' includes text fragments with different bullet visibility values. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible: boolean; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.BulletFormatLoadOptions): PowerPoint.BulletFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.BulletFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.BulletFormat; + /** + * 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 PowerPoint.BulletFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.BulletFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.BulletFormatData; + } + /** + * Specifies the connector type for line shapes. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ConnectorType { + /** + * Straight connector type + * @remarks + * [Api set: PowerPointApi 1.4] + */ + straight = "Straight", + /** + * Elbow connector type + * @remarks + * [Api set: PowerPointApi 1.4] + */ + elbow = "Elbow", + /** + * Curve connector type + * @remarks + * [Api set: PowerPointApi 1.4] + */ + curve = "Curve", + } + /** + * Specifies the shape type for a `GeometricShape` object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum GeometricShapeType { + /** + * Straight Line from Top-Right Corner to Bottom-Left Corner of the Shape + * @remarks + * [Api set: PowerPointApi 1.4] + */ + lineInverse = "LineInverse", + /** + * Isosceles Triangle + * @remarks + * [Api set: PowerPointApi 1.4] + */ + triangle = "Triangle", + /** + * Right Triangle + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightTriangle = "RightTriangle", + /** + * Rectangle + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rectangle = "Rectangle", + /** + * Diamond + * @remarks + * [Api set: PowerPointApi 1.4] + */ + diamond = "Diamond", + /** + * Parallelogram + * @remarks + * [Api set: PowerPointApi 1.4] + */ + parallelogram = "Parallelogram", + /** + * Trapezoid + * @remarks + * [Api set: PowerPointApi 1.4] + */ + trapezoid = "Trapezoid", + /** + * Trapezoid which may have Non-Equal Sides + * @remarks + * [Api set: PowerPointApi 1.4] + */ + nonIsoscelesTrapezoid = "NonIsoscelesTrapezoid", + /** + * Pentagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + pentagon = "Pentagon", + /** + * Hexagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + hexagon = "Hexagon", + /** + * Heptagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + heptagon = "Heptagon", + /** + * Octagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + octagon = "Octagon", + /** + * Decagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + decagon = "Decagon", + /** + * Dodecagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dodecagon = "Dodecagon", + /** + * Star: 4 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star4 = "Star4", + /** + * Star: 5 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star5 = "Star5", + /** + * Star: 6 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star6 = "Star6", + /** + * Star: 7 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star7 = "Star7", + /** + * Star: 8 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star8 = "Star8", + /** + * Star: 10 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star10 = "Star10", + /** + * Star: 12 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star12 = "Star12", + /** + * Star: 16 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star16 = "Star16", + /** + * Star: 24 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star24 = "Star24", + /** + * Star: 32 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + star32 = "Star32", + /** + * Rectangle: Rounded Corners + * @remarks + * [Api set: PowerPointApi 1.4] + */ + roundRectangle = "RoundRectangle", + /** + * Rectangle: Single Corner Rounded + * @remarks + * [Api set: PowerPointApi 1.4] + */ + round1Rectangle = "Round1Rectangle", + /** + * Rectangle: Top Corners Rounded + * @remarks + * [Api set: PowerPointApi 1.4] + */ + round2SameRectangle = "Round2SameRectangle", + /** + * Rectangle: Diagonal Corners Rounded + * @remarks + * [Api set: PowerPointApi 1.4] + */ + round2DiagonalRectangle = "Round2DiagonalRectangle", + /** + * Rectangle: Top Corners One Rounded and One Snipped + * @remarks + * [Api set: PowerPointApi 1.4] + */ + snipRoundRectangle = "SnipRoundRectangle", + /** + * Rectangle: Single Corner Snipped + * @remarks + * [Api set: PowerPointApi 1.4] + */ + snip1Rectangle = "Snip1Rectangle", + /** + * Rectangle: Top Corners Snipped + * @remarks + * [Api set: PowerPointApi 1.4] + */ + snip2SameRectangle = "Snip2SameRectangle", + /** + * Rectangle: Diagonal Corners Snipped + * @remarks + * [Api set: PowerPointApi 1.4] + */ + snip2DiagonalRectangle = "Snip2DiagonalRectangle", + /** + * Plaque + * @remarks + * [Api set: PowerPointApi 1.4] + */ + plaque = "Plaque", + /** + * Oval + * @remarks + * [Api set: PowerPointApi 1.4] + */ + ellipse = "Ellipse", + /** + * Teardrop + * @remarks + * [Api set: PowerPointApi 1.4] + */ + teardrop = "Teardrop", + /** + * Arrow: Pentagon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + homePlate = "HomePlate", + /** + * Arrow: Chevron + * @remarks + * [Api set: PowerPointApi 1.4] + */ + chevron = "Chevron", + /** + * Partial Circle + * @remarks + * [Api set: PowerPointApi 1.4] + */ + pieWedge = "PieWedge", + /** + * Partial Circle with Adjustable Spanning Area + * @remarks + * [Api set: PowerPointApi 1.4] + */ + pie = "Pie", + /** + * Block Arc + * @remarks + * [Api set: PowerPointApi 1.4] + */ + blockArc = "BlockArc", + /** + * Circle: Hollow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + donut = "Donut", + /** + * "Not Allowed" Symbol + * @remarks + * [Api set: PowerPointApi 1.4] + */ + noSmoking = "NoSmoking", + /** + * Arrow: Right + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightArrow = "RightArrow", + /** + * Arrow: Left + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftArrow = "LeftArrow", + /** + * Arrow: Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + upArrow = "UpArrow", + /** + * Arrow: Down + * @remarks + * [Api set: PowerPointApi 1.4] + */ + downArrow = "DownArrow", + /** + * Arrow: Striped Right + * @remarks + * [Api set: PowerPointApi 1.4] + */ + stripedRightArrow = "StripedRightArrow", + /** + * Arrow: Notched Right + * @remarks + * [Api set: PowerPointApi 1.4] + */ + notchedRightArrow = "NotchedRightArrow", + /** + * Arrow: Bent-Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bentUpArrow = "BentUpArrow", + /** + * Arrow: Left-Right + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftRightArrow = "LeftRightArrow", + /** + * Arrow: Up-Down + * @remarks + * [Api set: PowerPointApi 1.4] + */ + upDownArrow = "UpDownArrow", + /** + * Arrow: Left-Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftUpArrow = "LeftUpArrow", + /** + * Arrow: Left-Right-Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftRightUpArrow = "LeftRightUpArrow", + /** + * Arrow: Quad + * @remarks + * [Api set: PowerPointApi 1.4] + */ + quadArrow = "QuadArrow", + /** + * Callout: Left Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftArrowCallout = "LeftArrowCallout", + /** + * Callout: Right Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightArrowCallout = "RightArrowCallout", + /** + * Callout: Up Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + upArrowCallout = "UpArrowCallout", + /** + * Callout: Down Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + downArrowCallout = "DownArrowCallout", + /** + * Callout: Left-Right Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftRightArrowCallout = "LeftRightArrowCallout", + /** + * Callout: Up-Down Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + upDownArrowCallout = "UpDownArrowCallout", + /** + * Callout: Quad Arrow + * @remarks + * [Api set: PowerPointApi 1.4] + */ + quadArrowCallout = "QuadArrowCallout", + /** + * Arrow: Bent + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bentArrow = "BentArrow", + /** + * Arrow: U-Turn + * @remarks + * [Api set: PowerPointApi 1.4] + */ + uturnArrow = "UturnArrow", + /** + * Arrow: Circular + * @remarks + * [Api set: PowerPointApi 1.4] + */ + circularArrow = "CircularArrow", + /** + * Arrow: Circular with Opposite Arrow Direction + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftCircularArrow = "LeftCircularArrow", + /** + * Arrow: Circular with Two Arrows in Both Directions + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftRightCircularArrow = "LeftRightCircularArrow", + /** + * Arrow: Curved Right + * @remarks + * [Api set: PowerPointApi 1.4] + */ + curvedRightArrow = "CurvedRightArrow", + /** + * Arrow: Curved Left + * @remarks + * [Api set: PowerPointApi 1.4] + */ + curvedLeftArrow = "CurvedLeftArrow", + /** + * Arrow: Curved Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + curvedUpArrow = "CurvedUpArrow", + /** + * Arrow: Curved Down + * @remarks + * [Api set: PowerPointApi 1.4] + */ + curvedDownArrow = "CurvedDownArrow", + /** + * Arrow: Curved Right Arrow with Varying Width + * @remarks + * [Api set: PowerPointApi 1.4] + */ + swooshArrow = "SwooshArrow", + /** + * Cube + * @remarks + * [Api set: PowerPointApi 1.4] + */ + cube = "Cube", + /** + * Cylinder + * @remarks + * [Api set: PowerPointApi 1.4] + */ + can = "Can", + /** + * Lightning Bolt + * @remarks + * [Api set: PowerPointApi 1.4] + */ + lightningBolt = "LightningBolt", + /** + * Heart + * @remarks + * [Api set: PowerPointApi 1.4] + */ + heart = "Heart", + /** + * Sun + * @remarks + * [Api set: PowerPointApi 1.4] + */ + sun = "Sun", + /** + * Moon + * @remarks + * [Api set: PowerPointApi 1.4] + */ + moon = "Moon", + /** + * Smiley Face + * @remarks + * [Api set: PowerPointApi 1.4] + */ + smileyFace = "SmileyFace", + /** + * Explosion: 8 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + irregularSeal1 = "IrregularSeal1", + /** + * Explosion: 14 Points + * @remarks + * [Api set: PowerPointApi 1.4] + */ + irregularSeal2 = "IrregularSeal2", + /** + * Rectangle: Folded Corner + * @remarks + * [Api set: PowerPointApi 1.4] + */ + foldedCorner = "FoldedCorner", + /** + * Rectangle: Beveled + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bevel = "Bevel", + /** + * Frame + * @remarks + * [Api set: PowerPointApi 1.4] + */ + frame = "Frame", + /** + * Half Frame + * @remarks + * [Api set: PowerPointApi 1.4] + */ + halfFrame = "HalfFrame", + /** + * L-Shape + * @remarks + * [Api set: PowerPointApi 1.4] + */ + corner = "Corner", + /** + * Diagonal Stripe + * @remarks + * [Api set: PowerPointApi 1.4] + */ + diagonalStripe = "DiagonalStripe", + /** + * Chord + * @remarks + * [Api set: PowerPointApi 1.4] + */ + chord = "Chord", + /** + * Arc + * @remarks + * [Api set: PowerPointApi 1.4] + */ + arc = "Arc", + /** + * Left Bracket + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftBracket = "LeftBracket", + /** + * Right Bracket + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightBracket = "RightBracket", + /** + * Left Brace + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftBrace = "LeftBrace", + /** + * Right Brace + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightBrace = "RightBrace", + /** + * Double Bracket + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bracketPair = "BracketPair", + /** + * Double Brace + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bracePair = "BracePair", + /** + * Callout: Line with No Border + * @remarks + * [Api set: PowerPointApi 1.4] + */ + callout1 = "Callout1", + /** + * Callout: Bent Line with No Border + * @remarks + * [Api set: PowerPointApi 1.4] + */ + callout2 = "Callout2", + /** + * Callout: Double Bent Line with No Border + * @remarks + * [Api set: PowerPointApi 1.4] + */ + callout3 = "Callout3", + /** + * Callout: Line with Accent Bar + * @remarks + * [Api set: PowerPointApi 1.4] + */ + accentCallout1 = "AccentCallout1", + /** + * Callout: Bent Line with Accent Bar + * @remarks + * [Api set: PowerPointApi 1.4] + */ + accentCallout2 = "AccentCallout2", + /** + * Callout: Double Bent Line with Accent Bar + * @remarks + * [Api set: PowerPointApi 1.4] + */ + accentCallout3 = "AccentCallout3", + /** + * Callout: Line + * @remarks + * [Api set: PowerPointApi 1.4] + */ + borderCallout1 = "BorderCallout1", + /** + * Callout: Bent Line + * @remarks + * [Api set: PowerPointApi 1.4] + */ + borderCallout2 = "BorderCallout2", + /** + * Callout: Double Bent Line + * @remarks + * [Api set: PowerPointApi 1.4] + */ + borderCallout3 = "BorderCallout3", + /** + * Callout: Line with Border and Accent Bar + * @remarks + * [Api set: PowerPointApi 1.4] + */ + accentBorderCallout1 = "AccentBorderCallout1", + /** + * Callout: Bent Line with Border and Accent Bar + * @remarks + * [Api set: PowerPointApi 1.4] + */ + accentBorderCallout2 = "AccentBorderCallout2", + /** + * Callout: Double Bent Line with Border and Accent Bar + * @remarks + * [Api set: PowerPointApi 1.4] + */ + accentBorderCallout3 = "AccentBorderCallout3", + /** + * Speech Bubble: Rectangle + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wedgeRectCallout = "WedgeRectCallout", + /** + * Speech Bubble: Rectangle with Corners Rounded + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wedgeRRectCallout = "WedgeRRectCallout", + /** + * Speech Bubble: Oval + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wedgeEllipseCallout = "WedgeEllipseCallout", + /** + * Thought Bubble: Cloud + * @remarks + * [Api set: PowerPointApi 1.4] + */ + cloudCallout = "CloudCallout", + /** + * Cloud + * @remarks + * [Api set: PowerPointApi 1.4] + */ + cloud = "Cloud", + /** + * Ribbon: Tilted Down + * @remarks + * [Api set: PowerPointApi 1.4] + */ + ribbon = "Ribbon", + /** + * Ribbon: Tilted Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + ribbon2 = "Ribbon2", + /** + * Ribbon: Curved and Tilted Down + * @remarks + * [Api set: PowerPointApi 1.4] + */ + ellipseRibbon = "EllipseRibbon", + /** + * Ribbon: Curved and Tilted Up + * @remarks + * [Api set: PowerPointApi 1.4] + */ + ellipseRibbon2 = "EllipseRibbon2", + /** + * Ribbon: Straight with Both Left and Right Arrows + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftRightRibbon = "LeftRightRibbon", + /** + * Scroll: Vertical + * @remarks + * [Api set: PowerPointApi 1.4] + */ + verticalScroll = "VerticalScroll", + /** + * Scroll: Horizontal + * @remarks + * [Api set: PowerPointApi 1.4] + */ + horizontalScroll = "HorizontalScroll", + /** + * Wave + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wave = "Wave", + /** + * Double Wave + * @remarks + * [Api set: PowerPointApi 1.4] + */ + doubleWave = "DoubleWave", + /** + * Cross + * @remarks + * [Api set: PowerPointApi 1.4] + */ + plus = "Plus", + /** + * Flowchart: Process + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartProcess = "FlowChartProcess", + /** + * Flowchart: Decision + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartDecision = "FlowChartDecision", + /** + * Flowchart: Data + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartInputOutput = "FlowChartInputOutput", + /** + * Flowchart: Predefined Process + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartPredefinedProcess = "FlowChartPredefinedProcess", + /** + * Flowchart: Internal Storage + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartInternalStorage = "FlowChartInternalStorage", + /** + * Flowchart: Document + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartDocument = "FlowChartDocument", + /** + * Flowchart: Multidocument + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartMultidocument = "FlowChartMultidocument", + /** + * Flowchart: Terminator + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartTerminator = "FlowChartTerminator", + /** + * Flowchart: Preparation + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartPreparation = "FlowChartPreparation", + /** + * Flowchart: Manual Input + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartManualInput = "FlowChartManualInput", + /** + * Flowchart: Manual Operation + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartManualOperation = "FlowChartManualOperation", + /** + * Flowchart: Connector + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartConnector = "FlowChartConnector", + /** + * Flowchart: Card + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartPunchedCard = "FlowChartPunchedCard", + /** + * Flowchart: Punched Tape + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartPunchedTape = "FlowChartPunchedTape", + /** + * Flowchart: Summing Junction + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartSummingJunction = "FlowChartSummingJunction", + /** + * Flowchart: Or + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartOr = "FlowChartOr", + /** + * Flowchart: Collate + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartCollate = "FlowChartCollate", + /** + * Flowchart: Sort + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartSort = "FlowChartSort", + /** + * Flowchart: Extract + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartExtract = "FlowChartExtract", + /** + * Flowchart: Merge + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartMerge = "FlowChartMerge", + /** + * FlowChart: Offline Storage + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartOfflineStorage = "FlowChartOfflineStorage", + /** + * Flowchart: Stored Data + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartOnlineStorage = "FlowChartOnlineStorage", + /** + * Flowchart: Sequential Access Storage + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartMagneticTape = "FlowChartMagneticTape", + /** + * Flowchart: Magnetic Disk + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartMagneticDisk = "FlowChartMagneticDisk", + /** + * Flowchart: Direct Access Storage + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartMagneticDrum = "FlowChartMagneticDrum", + /** + * Flowchart: Display + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartDisplay = "FlowChartDisplay", + /** + * Flowchart: Delay + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartDelay = "FlowChartDelay", + /** + * Flowchart: Alternate Process + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartAlternateProcess = "FlowChartAlternateProcess", + /** + * Flowchart: Off-page Connector + * @remarks + * [Api set: PowerPointApi 1.4] + */ + flowChartOffpageConnector = "FlowChartOffpageConnector", + /** + * Action Button: Blank + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonBlank = "ActionButtonBlank", + /** + * Action Button: Go Home + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonHome = "ActionButtonHome", + /** + * Action Button: Help + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonHelp = "ActionButtonHelp", + /** + * Action Button: Get Information + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonInformation = "ActionButtonInformation", + /** + * Action Button: Go Forward or Next + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonForwardNext = "ActionButtonForwardNext", + /** + * Action Button: Go Back or Previous + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonBackPrevious = "ActionButtonBackPrevious", + /** + * Action Button: Go to End + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonEnd = "ActionButtonEnd", + /** + * Action Button: Go to Beginning + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonBeginning = "ActionButtonBeginning", + /** + * Action Button: Return + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonReturn = "ActionButtonReturn", + /** + * Action Button: Document + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonDocument = "ActionButtonDocument", + /** + * Action Button: Sound + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonSound = "ActionButtonSound", + /** + * Action Button: Video + * @remarks + * [Api set: PowerPointApi 1.4] + */ + actionButtonMovie = "ActionButtonMovie", + /** + * Gear: A Gear with Six Teeth + * @remarks + * [Api set: PowerPointApi 1.4] + */ + gear6 = "Gear6", + /** + * Gear: A Gear with Nine Teeth + * @remarks + * [Api set: PowerPointApi 1.4] + */ + gear9 = "Gear9", + /** + * Funnel + * @remarks + * [Api set: PowerPointApi 1.4] + */ + funnel = "Funnel", + /** + * Plus Sign + * @remarks + * [Api set: PowerPointApi 1.4] + */ + mathPlus = "MathPlus", + /** + * Minus Sign + * @remarks + * [Api set: PowerPointApi 1.4] + */ + mathMinus = "MathMinus", + /** + * Multiplication Sign + * @remarks + * [Api set: PowerPointApi 1.4] + */ + mathMultiply = "MathMultiply", + /** + * Division Sign + * @remarks + * [Api set: PowerPointApi 1.4] + */ + mathDivide = "MathDivide", + /** + * Equals + * @remarks + * [Api set: PowerPointApi 1.4] + */ + mathEqual = "MathEqual", + /** + * Not Equal + * @remarks + * [Api set: PowerPointApi 1.4] + */ + mathNotEqual = "MathNotEqual", + /** + * Four Right Triangles that Define a Rectangular Shape + * @remarks + * [Api set: PowerPointApi 1.4] + */ + cornerTabs = "CornerTabs", + /** + * Four Small Squares that Define a Rectangular Shape. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + squareTabs = "SquareTabs", + /** + * Four Quarter Circles that Define a Rectangular Shape. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + plaqueTabs = "PlaqueTabs", + /** + * A Rectangle Divided into Four Parts Along Diagonal Lines. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + chartX = "ChartX", + /** + * A Rectangle Divided into Six Parts Along a Vertical Line and Diagonal Lines. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + chartStar = "ChartStar", + /** + * A Rectangle Divided Vertically and Horizontally into Four Quarters. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + chartPlus = "ChartPlus", + } + /** + * Specifies the formatting options for when slides are inserted. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + enum InsertSlideFormatting { + /** + * Copy the source theme into the target presentation and use that theme. + * @remarks + * [Api set: PowerPointApi 1.2] + */ + keepSourceFormatting = "KeepSourceFormatting", + /** + * Use the existing theme in the target presentation. + * @remarks + * [Api set: PowerPointApi 1.2] + */ + useDestinationTheme = "UseDestinationTheme", + } + /** + * Represents the available options when inserting slides. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + interface InsertSlideOptions { + /** + * Specifies which formatting to use during slide insertion. + The default option is to use "KeepSourceFormatting". + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + formatting?: PowerPoint.InsertSlideFormatting | "KeepSourceFormatting" | "UseDestinationTheme"; + /** + * Specifies the slides from the source presentation that will be inserted into the current presentation. These slides are represented by their IDs which can be retrieved from a `Slide` object. + The order of these slides is preserved during the insertion. + If any of the source slides are not found, or if the IDs are invalid, the operation throws a `SlideNotFound` exception and no slides will be inserted. + All of the source slides will be inserted when `sourceSlideIds` is not provided (this is the default behavior). + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + sourceSlideIds?: string[]; + /** + * Specifies where in the presentation the new slides will be inserted. The new slides will be inserted after the slide with the given slide ID. + If `targetSlideId` is not provided, the slides will be inserted at the beginning of the presentation. + If `targetSlideId` is invalid or if it is pointing to a non-existing slide, the operation throws a `SlideNotFound` exception and no slides will be inserted. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + targetSlideId?: string; + } + /** + * Represents the horizontal alignment of the {@link PowerPoint.TextFrame} in a {@link PowerPoint.Shape}. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ParagraphHorizontalAlignment { + /** + * Align text to the left margin. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left = "Left", + /** + * Align text in the center. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + center = "Center", + /** + * Align text to the right margin. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + right = "Right", + /** + * Align text so that it is justified across the whole line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + justify = "Justify", + /** + * Specifies the alignment or adjustment of kashida length in Arabic text. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + justifyLow = "JustifyLow", + /** + * Distributes the text words across an entire text line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + distributed = "Distributed", + /** + * Distributes Thai text specially, because each character is treated as a word. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + thaiDistributed = "ThaiDistributed", + } + /** + * Represents the paragraph formatting properties of a text that is attached to the {@link PowerPoint.TextRange}. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + class ParagraphFormat 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 bullet format of the paragraph. See {@link PowerPoint.BulletFormat} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly bulletFormat: PowerPoint.BulletFormat; + /** + * Represents the horizontal alignment of the paragraph. Returns 'null' if the 'TextRange' includes text fragments with different horizontal alignment values. See {@link PowerPoint.ParagraphHorizontalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + horizontalAlignment: PowerPoint.ParagraphHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ParagraphFormatLoadOptions): PowerPoint.ParagraphFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.ParagraphFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.ParagraphFormat; + /** + * 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 PowerPoint.ParagraphFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ParagraphFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.ParagraphFormatData; + } + /** + * Represents the available options when adding shapes. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface ShapeAddOptions { + /** + * Specifies the height, in points, of the shape. + When not provided, a default value will be used. + Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height?: number; + /** + * Specifies the distance, in points, from the left side of the shape to the left side of the slide. + When not provided, a default value will be used. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left?: number; + /** + * Specifies the distance, in points, from the top edge of the shape to the top edge of the slide. + When not provided, a default value will be used. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top?: number; + /** + * Specifies the width, in points, of the shape. + When not provided, a default value will be used. + Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width?: number; + } + /** + * Represents the collection of shapes. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + 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: PowerPoint.Shape[]; + /** + * Adds a geometric shape to the slide. Returns a `Shape` object that represents the new shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param geometricShapeType Specifies the type of the geometric shape. See {@link PowerPoint.GeometricShapeType} for details. + * @param options An optional parameter to specify the additional options such as the position of the shape. + * @returns The newly inserted shape. + */ + addGeometricShape(geometricShapeType: PowerPoint.GeometricShapeType, options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; + /** + * Adds a geometric shape to the slide. Returns a `Shape` object that represents the new shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param geometricShapeType Specifies the type of the geometric shape. See {@link PowerPoint.GeometricShapeType} for details. + * @param options An optional parameter to specify the additional options such as the position of the shape. + * @returns The newly inserted 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", options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; + /** + * Adds a line to the slide. Returns a `Shape` object that represents the new line. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param connectorType Specifies the connector type of the line. If not provided, `straight` connector type will be used. See {@link PowerPoint.ConnectorType} for details. + * @param options An optional parameter to specify the additional options such as the position of the shape object that contains the line. + * @returns The newly inserted shape. + */ + addLine(connectorType?: PowerPoint.ConnectorType, options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; + /** + * Adds a line to the slide. Returns a `Shape` object that represents the new line. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param connectorType Specifies the connector type of the line. If not provided, `straight` connector type will be used. See {@link PowerPoint.ConnectorType} for details. + * @param options An optional parameter to specify the additional options such as the position of the shape object that contains the line. + * @returns The newly inserted shape. + */ + addLine(connectorType?: "Straight" | "Elbow" | "Curve", options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; + /** + * Adds a text box to the slide with the provided text as the content. Returns a `Shape` object that represents the new text box. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param text Specifies the text that will be shown in the created text box. + * @param options An optional parameter to specify the additional options such as the position of the text box. + * @returns The newly inserted shape. + */ + addTextBox(text: string, options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape; + /** + * Gets the number of shapes in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * @returns The number of shapes in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a shape using its unique ID. An error is thrown if the shape does not exist. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The ID of the shape. + * @returns The shape with the unique ID. If such a shape does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.Shape; + /** + * Gets a shape using its zero-based index in the collection. An error is thrown if the index is out of range. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param index The index of the shape in the collection. + * @returns The shape at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.Shape; + /** + * Gets a shape using its unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param id The ID of the shape. + * @returns The shape with the unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned. + */ + getItemOrNullObject(id: string): PowerPoint.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ShapeCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.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 `PowerPoint.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.ShapeCollectionData; + } + /** + * Represents the layout of a slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + class SlideLayout 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 shapes in the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly shapes: PowerPoint.ShapeCollection; + /** + * Gets the unique ID of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly id: string; + /** + * Gets the name of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly name: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideLayoutLoadOptions): PowerPoint.SlideLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.SlideLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.SlideLayout; + /** + * 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 PowerPoint.SlideLayout object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideLayoutData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.SlideLayoutData; + } + /** + * Represents the collection of layouts provided by the Slide Master for slides. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + class SlideLayoutCollection 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: PowerPoint.SlideLayout[]; + /** + * Gets the number of layouts in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * @returns The number of layouts in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a layout using its unique ID. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The ID of the layout. + * @returns The layout with the unique ID. If such a layout does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.SlideLayout; + /** + * Gets a layout using its zero-based index in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param index The index of the layout in the collection. + * @returns The layout at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.SlideLayout; + /** + * Gets a layout using its unique ID. If such a layout does not exist, an object with an `isNullObject` property set to true is returned. For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param id The ID of the layout. + * @returns The layout with the unique ID. + */ + getItemOrNullObject(id: string): PowerPoint.SlideLayout; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideLayoutCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideLayoutCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.SlideLayoutCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideLayoutCollection; + /** + * 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 `PowerPoint.SlideLayoutCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideLayoutCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.SlideLayoutCollectionData; + } + /** + * Represents the Slide Master of a slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + class SlideMaster 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 layouts provided by the Slide Master for slides. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly layouts: PowerPoint.SlideLayoutCollection; + /** + * Returns a collection of shapes in the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly shapes: PowerPoint.ShapeCollection; + /** + * Gets the unique ID of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly id: string; + /** + * Gets the unique name of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly name: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideMasterLoadOptions): PowerPoint.SlideMaster; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.SlideMaster; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.SlideMaster; + /** + * 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 PowerPoint.SlideMaster object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideMasterData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.SlideMasterData; + } + /** + * Represents a single tag in the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + class Tag 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 unique ID of the tag. The `key` is unique within the owning `TagCollection` and always stored as uppercase letters within the document. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly key: string; + /** + * Gets the value of the tag. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + value: string; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.TagLoadOptions): PowerPoint.Tag; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.Tag; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.Tag; + /** + * 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 PowerPoint.Tag object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TagData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.TagData; + } + /** + * Represents the collection of tags. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + class TagCollection 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: PowerPoint.Tag[]; + /** + * Adds a new tag at the end of the collection. If the `key` already exists in the collection, the value of the existing tag will be replaced with the given `value`. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The unique ID of a tag, which is unique within this `TagCollection`. 'key' parameter is case-insensitive, but it is always capitalized when saved in the document. + * @param value The value of the tag. + */ + add(key: string, value: string): void; + /** + * Deletes the tag with the given `key` in this collection. Does nothing if the `key` does not exist. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The unique ID of a tag, which is unique within this `TagCollection`. `key` parameter is case-insensitive. + */ + delete(key: string): void; + /** + * Gets the number of tags in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * @returns The number of tags in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a tag using its unique ID. An error is thrown if the tag does not exist. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The ID of the tag. + * @returns The tag with the unique ID. If such a tag does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.Tag; + /** + * Gets a tag using its zero-based index in the collection. An error is thrown if the index is out of range. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param index The index of the tag in the collection. + * @returns The tag at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.Tag; + /** + * Gets a tag using its unique ID. If such a tag does not exist, an object with an `isNullObject` property set to true is returned. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The ID of the tag. + * @returns The tag with the unique ID. If such a tag does not exist, an object with an `isNullObject` property set to true is returned. + */ + getItemOrNullObject(key: string): PowerPoint.Tag; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.TagCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.TagCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.TagCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.TagCollection; + /** + * 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 `PowerPoint.TagCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TagCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.TagCollectionData; + } + /** + * Represents a single slide of a presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + class Slide 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 layout of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly layout: PowerPoint.SlideLayout; + /** + * Returns a collection of shapes in the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly shapes: PowerPoint.ShapeCollection; + /** + * Gets the `SlideMaster` object that represents the slide's default content. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly slideMaster: PowerPoint.SlideMaster; + /** + * Returns a collection of tags in the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly tags: PowerPoint.TagCollection; + /** + * Gets the unique ID of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + readonly id: string; + /** + * Deletes the slide from the presentation. Does nothing if the slide does not exist. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + delete(): void; + /** + * Selects the specified shapes. Existing shape selection is replaced with the new selection. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param shapeIds List of shape IDs to select in the slide. If the list is empty, the selection is cleared. + */ + setSelectedShapes(shapeIds: string[]): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideLoadOptions): PowerPoint.Slide; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.Slide; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.Slide; + /** + * 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 PowerPoint.Slide object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.SlideData; + } + /** + * Specifies a shape's fill type. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ShapeFillType { + /** + * Specifies that the shape should have no fill. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + noFill = "NoFill", + /** + * Specifies that the shape should have regular solid fill. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + solid = "Solid", + /** + * Specifies that the shape should have gradient fill. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + gradient = "Gradient", + /** + * Specifies that the shape should have pattern fill. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + pattern = "Pattern", + /** + * Specifies that the shape should have picture or texture fill. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + pictureAndTexture = "PictureAndTexture", + /** + * Specifies that the shape should have slide background fill. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + slideBackground = "SlideBackground", + } + /** + * Represents the fill formatting of a shape object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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 foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + foregroundColor: string; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency: number; + /** + * Returns the fill type of the shape. See {@link PowerPoint.ShapeFillType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly type: PowerPoint.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "SlideBackground"; + /** + * Clears the fill formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + clear(): void; + /** + * Sets the fill formatting of the shape to a uniform color. This changes the fill type to `Solid`. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param color A string that specifies the fill color in HTML color format, in 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. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ShapeFillLoadOptions): PowerPoint.ShapeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.ShapeFill; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.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 PowerPoint.ShapeFill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeFillData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.ShapeFillData; + } + /** + * Specifies the style for a line. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ShapeLineStyle { + /** + * Single line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + single = "Single", + /** + * Thick line with a thin line on each side. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + thickBetweenThin = "ThickBetweenThin", + /** + * Thick line next to thin line. For horizontal lines, the thick line is above the thin line. For vertical lines, the thick line is to the left of the thin line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + thickThin = "ThickThin", + /** + * Thick line next to thin line. For horizontal lines, the thick line is below the thin line. For vertical lines, the thick line is to the right of the thin line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + thinThick = "ThinThick", + /** + * Two thin lines. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + thinThin = "ThinThin", + } + /** + * Specifies the dash style for a line. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ShapeLineDashStyle { + /** + * The dash line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dash = "Dash", + /** + * The dash-dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashDot = "DashDot", + /** + * The dash-dot-dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashDotDot = "DashDotDot", + /** + * The long dash line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + longDash = "LongDash", + /** + * The long dash-dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + longDashDot = "LongDashDot", + /** + * The round dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + roundDot = "RoundDot", + /** + * The solid line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + solid = "Solid", + /** + * The square dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + squareDot = "SquareDot", + /** + * The long dash-dot-dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + longDashDotDot = "LongDashDotDot", + /** + * The system dash line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + systemDash = "SystemDash", + /** + * The system dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + systemDot = "SystemDot", + /** + * The system dash-dot line pattern + * @remarks + * [Api set: PowerPointApi 1.4] + */ + systemDashDot = "SystemDashDot", + } + /** + * Represents the line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + class ShapeLineFormat 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 line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color: string; + /** + * Represents the dash style of the line. Returns null when the line is not visible or there are inconsistent dash styles. See PowerPoint.ShapeLineDashStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashStyle: PowerPoint.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See PowerPoint.ShapeLineStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + style: PowerPoint.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency: number; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + weight: number; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions): PowerPoint.ShapeLineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.ShapeLineFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.ShapeLineFormat; + /** + * 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 PowerPoint.ShapeLineFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeLineFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.ShapeLineFormatData; + } + /** + * Specifies the type of a shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ShapeType { + /** + * The given shape's type is unsupported. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + unsupported = "Unsupported", + /** + * The shape is an image + * @remarks + * [Api set: PowerPointApi 1.4] + */ + image = "Image", + /** + * The shape is a geometric shape such as rectangle + * @remarks + * [Api set: PowerPointApi 1.4] + */ + geometricShape = "GeometricShape", + /** + * The shape is a group shape which contains sub-shapes + * @remarks + * [Api set: PowerPointApi 1.4] + */ + group = "Group", + /** + * The shape is a line + * @remarks + * [Api set: PowerPointApi 1.4] + */ + line = "Line", + } + /** + * Determines the type of automatic sizing allowed. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ShapeAutoSize { + /** + * No autosizing. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeNone = "AutoSizeNone", + /** + * The text is adjusted to fit the shape. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeTextToFitShape = "AutoSizeTextToFitShape", + /** + * The shape is adjusted to fit the text. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeShapeToFitText = "AutoSizeShapeToFitText", + /** + * A combination of automatic sizing schemes are used. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeMixed = "AutoSizeMixed", + } + /** + * Represents the vertical alignment of a {@link PowerPoint.TextFrame} in a {@link PowerPoint.Shape}. + If one the centered options are selected, the contents of the `TextFrame` will be centered horizontally within the `Shape` as a group. + To change the horizontal alignment of a text, see {@link PowerPoint.ParagraphFormat} and {@link PowerPoint.ParagraphHorizontalAlignment }. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum TextVerticalAlignment { + /** + * Specifies that the `TextFrame` should be top aligned to the `Shape`. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top = "Top", + /** + * Specifies that the `TextFrame` should be center aligned to the `Shape`. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + middle = "Middle", + /** + * Specifies that the `TextFrame` should be bottom aligned to the `Shape`. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bottom = "Bottom", + /** + * Specifies that the `TextFrame` should be top aligned vertically to the `Shape`. Contents of the `TextFrame` will be centered horizontally within the `Shape`. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + topCentered = "TopCentered", + /** + * Specifies that the `TextFrame` should be center aligned vertically to the `Shape`. Contents of the `TextFrame` will be centered horizontally within the `Shape`. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + middleCentered = "MiddleCentered", + /** + * Specifies that the `TextFrame` should be bottom aligned vertically to the `Shape`. Contents of the `TextFrame` will be centered horizontally within the `Shape`. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bottomCentered = "BottomCentered", + } + /** + * The type of underline applied to a font. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + enum ShapeFontUnderlineStyle { + /** + * No underlining. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + none = "None", + /** + * Regular single line underlining. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + single = "Single", + /** + * Underlining of text with double lines. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + double = "Double", + /** + * Underlining of text with a thick line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + heavy = "Heavy", + /** + * Underlining of text with a dotted line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dotted = "Dotted", + /** + * Underlining of text with a thick, dotted line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dottedHeavy = "DottedHeavy", + /** + * Underlining of text with a line containing dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dash = "Dash", + /** + * Underlining of text with a thick line containing dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashHeavy = "DashHeavy", + /** + * Underlining of text with a line containing long dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashLong = "DashLong", + /** + * Underlining of text with a thick line containing long dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashLongHeavy = "DashLongHeavy", + /** + * Underlining of text with a line containing dots and dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dotDash = "DotDash", + /** + * Underlining of text with a thick line containing dots and dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dotDashHeavy = "DotDashHeavy", + /** + * Underlining of text with a line containing double dots and dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dotDotDash = "DotDotDash", + /** + * Underlining of text with a thick line containing double dots and dashes. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dotDotDashHeavy = "DotDotDashHeavy", + /** + * Underlining of text with a wavy line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wavy = "Wavy", + /** + * Underlining of text with a thick, wavy line. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wavyHeavy = "WavyHeavy", + /** + * Underlining of text with double wavy lines. + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wavyDouble = "WavyDouble", + } + /** + * Represents the font attributes, such as font name, font size, and color, for a shape's TextRange object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color: string; + /** + * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + italic: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name: string; + /** + * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + size: number; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + underline: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ShapeFontLoadOptions): PowerPoint.ShapeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.ShapeFont; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.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 PowerPoint.ShapeFont object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeFontData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.ShapeFontData; + } + /** + * Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly font: PowerPoint.ShapeFont; + /** + * Represents the paragraph format of the text range. See {@link PowerPoint.ParagraphFormat} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly paragraphFormat: PowerPoint.ParagraphFormat; + /** + * Gets or sets the length of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + length: number; + /** + * Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + start: number; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + text: string; + /** + * Returns the parent {@link PowerPoint.TextFrame} object that holds this `TextRange`. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentTextFrame(): PowerPoint.TextFrame; + /** + * Returns a `TextRange` object for the substring in the given range. + * + * @remarks + * [Api set: PowerPointApi 1.4] + * + * @param start The zero-based index of the first character to get from the text range. + * @param length Optional. The number of characters to be returned in the new text range. If length is omitted, all the characters from start to the end of the text range's last paragraph will be returned. + */ + getSubstring(start: number, length?: number): PowerPoint.TextRange; + /** + * Selects this `TextRange` in the current view. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + setSelected(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.TextRangeLoadOptions): PowerPoint.TextRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.TextRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.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 PowerPoint.TextRange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TextRangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.TextRangeData; + } + /** + * Represents the text frame of a shape object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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; + /** + * Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See {@link PowerPoint.TextRange} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly textRange: PowerPoint.TextRange; + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeSetting: PowerPoint.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bottomMargin: number; + /** + * Specifies if the text frame contains text. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly hasText: boolean; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftMargin: number; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightMargin: number; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + topMargin: number; + /** + * Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + verticalAlignment: PowerPoint.TextVerticalAlignment | "Top" | "Middle" | "Bottom" | "TopCentered" | "MiddleCentered" | "BottomCentered"; + /** + * Determines whether lines break automatically to fit text inside the shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wordWrap: boolean; + /** + * Deletes all the text in the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + deleteText(): void; + /** + * Returns the parent {@link PowerPoint.Shape} object that holds this `TextFrame`. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentShape(): PowerPoint.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.TextFrameLoadOptions): PowerPoint.TextFrame; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.TextFrame; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.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 PowerPoint.TextFrame object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TextFrameData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.TextFrameData; + } + /** + * Represents a single shape in the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + 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 this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly fill: PowerPoint.ShapeFill; + /** + * Returns the line formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly lineFormat: PowerPoint.ShapeLineFormat; + /** + * Returns a collection of tags in the shape. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly tags: PowerPoint.TagCollection; + /** + * Returns the text frame object of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly textFrame: PowerPoint.TextFrame; + /** + * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height: number; + /** + * Gets the unique ID of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + readonly id: string; + /** + * The distance, in points, from the left side of the shape to the left side of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left: number; + /** + * Specifies the name of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name: string; + /** + * The distance, in points, from the top edge of the shape to the top edge of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top: number; + /** + * Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + readonly type: PowerPoint.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line"; + /** + * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width: number; + /** + * Deletes the shape from the shape collection. Does nothing if the shape does not exist. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + delete(): void; + /** + * Returns the parent {@link PowerPoint.Slide} object that holds this `Shape`. Throws an exception if this shape does not belong to a `Slide`. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentSlide(): PowerPoint.Slide; + /** + * Returns the parent {@link PowerPoint.SlideLayout} object that holds this `Shape`. Throws an exception if this shape does not belong to a `SlideLayout`. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentSlideLayout(): PowerPoint.SlideLayout; + /** + * Returns the parent {@link PowerPoint.SlideLayout} object that holds this `Shape`. If this shape does not belong to a `SlideLayout`, an object with an `isNullObject` property set to `true` is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentSlideLayoutOrNullObject(): PowerPoint.SlideLayout; + /** + * Returns the parent {@link PowerPoint.SlideMaster} object that holds this `Shape`. Throws an exception if this shape does not belong to a `SlideMaster`. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentSlideMaster(): PowerPoint.SlideMaster; + /** + * Returns the parent {@link PowerPoint.SlideMaster} object that holds this `Shape`. If this shape does not belong to a `SlideMaster`, an object with an `isNullObject` property set to `true` is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentSlideMasterOrNullObject(): PowerPoint.SlideMaster; + /** + * Returns the parent {@link PowerPoint.Slide} object that holds this `Shape`. If this shape does not belong to a `Slide`, an object with an `isNullObject` property set to `true` is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + getParentSlideOrNullObject(): PowerPoint.Slide; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ShapeLoadOptions): PowerPoint.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): PowerPoint.Shape; + /** + * 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 PowerPoint.Shape object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): PowerPoint.Interfaces.ShapeData; + } + /** + * Represents a collection of shapes. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + class ShapeScopedCollection 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: PowerPoint.Shape[]; + /** + * Gets the number of shapes in the collection. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @returns The number of shapes in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a shape using its unique ID. An error is thrown if the shape does not exist. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param key The ID of the shape. + * @returns The shape with the unique ID. If such a shape does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.Shape; + /** + * Gets a shape using its zero-based index in the collection. An error is thrown if the index is out of range. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param index The index of the shape in the collection. + * @returns The shape at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.Shape; + /** + * Gets a shape using its unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param id The ID of the shape. + * @returns The shape with the unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned. + */ + getItemOrNullObject(id: string): PowerPoint.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.ShapeScopedCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.ShapeScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.ShapeScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.ShapeScopedCollection; + /** + * 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 `PowerPoint.ShapeScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.ShapeScopedCollectionData; + } + /** + * Represents the collection of slides in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + class SlideCollection 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: PowerPoint.Slide[]; + /** + * Adds a new slide at the end of the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param options The options that define the theme of the new slide. + */ + add(options?: PowerPoint.AddSlideOptions): void; + /** + * Gets the number of slides in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.2] + * @returns The number of slides in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a slide using its unique ID. + * + * @remarks + * [Api set: PowerPointApi 1.2] + * + * @param key The ID of the slide. + * @returns The slide with the unique ID. If such a slide does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.Slide; + /** + * Gets a slide using its zero-based index in the collection. Slides are stored in the same order as they + are shown in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + * + * @param index The index of the slide in the collection. + * @returns The slide at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.Slide; + /** + * Gets a slide using its unique ID. If such a slide does not exist, an object with an `isNullObject` property set to true is returned. For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods + and properties}. + * + * @remarks + * [Api set: PowerPointApi 1.2] + * + * @param id The ID of the slide. + * @returns The slide with the unique ID. + */ + getItemOrNullObject(id: string): PowerPoint.Slide; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.SlideCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideCollection; + /** + * 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 `PowerPoint.SlideCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.SlideCollectionData; + } + /** + * Represents a collection of slides in the presentation. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + class SlideScopedCollection 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: PowerPoint.Slide[]; + /** + * Gets the number of slides in the collection. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * @returns The number of slides in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a slide using its unique ID. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param key The ID of the slide. + * @returns The slide with the unique ID. If such a slide does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.Slide; + /** + * Gets a slide using its zero-based index in the collection. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param index The index of the slide in the collection. + * @returns The slide at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.Slide; + /** + * Gets a slide using its unique ID. If such a slide does not exist, an object with an `isNullObject` property set to true is returned. For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods + and properties}. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + * + * @param id The ID of the slide. + * @returns The slide with the unique ID. + */ + getItemOrNullObject(id: string): PowerPoint.Slide; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideScopedCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.SlideScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideScopedCollection; + /** + * 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 `PowerPoint.SlideScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.SlideScopedCollectionData; + } + /** + * Represents the collection of Slide Masters in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + class SlideMasterCollection 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: PowerPoint.SlideMaster[]; + /** + * Gets the number of Slide Masters in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * @returns The number of Slide Masters in the collection. + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a Slide Master using its unique ID. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param key The ID of the Slide Master. + * @returns The Slide Master with the unique ID. If such a Slide Master does not exist, an error is thrown. + */ + getItem(key: string): PowerPoint.SlideMaster; + /** + * Gets a Slide Master using its zero-based index in the collection. + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param index The index of the Slide Master in the collection. + * @returns The Slide Master at the given index. An error is thrown if index is out of range. + */ + getItemAt(index: number): PowerPoint.SlideMaster; + /** + * Gets a Slide Master using its unique ID. If such a Slide Master does not exist, an object with an `isNullObject` property set to true is returned. + For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}." + * + * @remarks + * [Api set: PowerPointApi 1.3] + * + * @param id The ID of the Slide Master. + * @returns The Slide Master with the unique ID. + */ + getItemOrNullObject(id: string): PowerPoint.SlideMaster; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: PowerPoint.Interfaces.SlideMasterCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideMasterCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): PowerPoint.SlideMasterCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideMasterCollection; + /** + * 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 `PowerPoint.SlideMasterCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideMasterCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): PowerPoint.Interfaces.SlideMasterCollectionData; + } + 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 BulletFormat object, for use in `bulletFormat.set({ ... })`. */ + interface BulletFormatUpdateData { + /** + * Specifies if the bullets in the paragraph are visible. Returns 'null' if the 'TextRange' includes text fragments with different bullet visibility values. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible?: boolean; + } + /** An interface for updating data on the ParagraphFormat object, for use in `paragraphFormat.set({ ... })`. */ + interface ParagraphFormatUpdateData { + /** + * Represents the horizontal alignment of the paragraph. Returns 'null' if the 'TextRange' includes text fragments with different horizontal alignment values. See {@link PowerPoint.ParagraphHorizontalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + horizontalAlignment?: PowerPoint.ParagraphHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; + } + /** An interface for updating data on the ShapeCollection object, for use in `shapeCollection.set({ ... })`. */ + interface ShapeCollectionUpdateData { + items?: PowerPoint.Interfaces.ShapeData[]; + } + /** An interface for updating data on the SlideLayoutCollection object, for use in `slideLayoutCollection.set({ ... })`. */ + interface SlideLayoutCollectionUpdateData { + items?: PowerPoint.Interfaces.SlideLayoutData[]; + } + /** An interface for updating data on the Tag object, for use in `tag.set({ ... })`. */ + interface TagUpdateData { + /** + * Gets the value of the tag. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + value?: string; + } + /** An interface for updating data on the TagCollection object, for use in `tagCollection.set({ ... })`. */ + interface TagCollectionUpdateData { + items?: PowerPoint.Interfaces.TagData[]; + } + /** An interface for updating data on the ShapeFill object, for use in `shapeFill.set({ ... })`. */ + interface ShapeFillUpdateData { + /** + * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + foregroundColor?: string; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency?: number; + } + /** An interface for updating data on the ShapeLineFormat object, for use in `shapeLineFormat.set({ ... })`. */ + interface ShapeLineFormatUpdateData { + /** + * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color?: string; + /** + * Represents the dash style of the line. Returns null when the line is not visible or there are inconsistent dash styles. See PowerPoint.ShapeLineDashStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashStyle?: PowerPoint.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See PowerPoint.ShapeLineStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + style?: PowerPoint.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency?: number; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible?: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + weight?: number; + } + /** An interface for updating data on the ShapeFont object, for use in `shapeFont.set({ ... })`. */ + interface ShapeFontUpdateData { + /** + * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color?: string; + /** + * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + italic?: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: string; + /** + * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + size?: number; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + underline?: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + } + /** An interface for updating data on the TextRange object, for use in `textRange.set({ ... })`. */ + interface TextRangeUpdateData { + /** + * Gets or sets the length of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + length?: number; + /** + * Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + start?: number; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + text?: string; + } + /** An interface for updating data on the TextFrame object, for use in `textFrame.set({ ... })`. */ + interface TextFrameUpdateData { + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeSetting?: PowerPoint.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bottomMargin?: number; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftMargin?: number; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightMargin?: number; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + topMargin?: number; + /** + * Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + verticalAlignment?: PowerPoint.TextVerticalAlignment | "Top" | "Middle" | "Bottom" | "TopCentered" | "MiddleCentered" | "BottomCentered"; + /** + * Determines whether lines break automatically to fit text inside the shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wordWrap?: boolean; + } + /** An interface for updating data on the Shape object, for use in `shape.set({ ... })`. */ + interface ShapeUpdateData { + /** + * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height?: number; + /** + * The distance, in points, from the left side of the shape to the left side of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left?: number; + /** + * Specifies the name of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: string; + /** + * The distance, in points, from the top edge of the shape to the top edge of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top?: number; + /** + * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width?: number; + } + /** An interface for updating data on the ShapeScopedCollection object, for use in `shapeScopedCollection.set({ ... })`. */ + interface ShapeScopedCollectionUpdateData { + items?: PowerPoint.Interfaces.ShapeData[]; + } + /** An interface for updating data on the SlideCollection object, for use in `slideCollection.set({ ... })`. */ + interface SlideCollectionUpdateData { + items?: PowerPoint.Interfaces.SlideData[]; + } + /** An interface for updating data on the SlideScopedCollection object, for use in `slideScopedCollection.set({ ... })`. */ + interface SlideScopedCollectionUpdateData { + items?: PowerPoint.Interfaces.SlideData[]; + } + /** An interface for updating data on the SlideMasterCollection object, for use in `slideMasterCollection.set({ ... })`. */ + interface SlideMasterCollectionUpdateData { + items?: PowerPoint.Interfaces.SlideMasterData[]; + } + /** An interface describing the data returned by calling `presentation.toJSON()`. */ + interface PresentationData { + title?: string; + } + /** An interface describing the data returned by calling `bulletFormat.toJSON()`. */ + interface BulletFormatData { + /** + * Specifies if the bullets in the paragraph are visible. Returns 'null' if the 'TextRange' includes text fragments with different bullet visibility values. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling `paragraphFormat.toJSON()`. */ + interface ParagraphFormatData { + /** + * Represents the horizontal alignment of the paragraph. Returns 'null' if the 'TextRange' includes text fragments with different horizontal alignment values. See {@link PowerPoint.ParagraphHorizontalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + horizontalAlignment?: PowerPoint.ParagraphHorizontalAlignment | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed"; + } + /** An interface describing the data returned by calling `shapeCollection.toJSON()`. */ + interface ShapeCollectionData { + items?: PowerPoint.Interfaces.ShapeData[]; + } + /** An interface describing the data returned by calling `slideLayout.toJSON()`. */ + interface SlideLayoutData { + /** + * Gets the unique ID of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: string; + /** + * Gets the name of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + name?: string; + } + /** An interface describing the data returned by calling `slideLayoutCollection.toJSON()`. */ + interface SlideLayoutCollectionData { + items?: PowerPoint.Interfaces.SlideLayoutData[]; + } + /** An interface describing the data returned by calling `slideMaster.toJSON()`. */ + interface SlideMasterData { + /** + * Gets the unique ID of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: string; + /** + * Gets the unique name of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + name?: string; + } + /** An interface describing the data returned by calling `tag.toJSON()`. */ + interface TagData { + /** + * Gets the unique ID of the tag. The `key` is unique within the owning `TagCollection` and always stored as uppercase letters within the document. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + key?: string; + /** + * Gets the value of the tag. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + value?: string; + } + /** An interface describing the data returned by calling `tagCollection.toJSON()`. */ + interface TagCollectionData { + items?: PowerPoint.Interfaces.TagData[]; + } + /** An interface describing the data returned by calling `slide.toJSON()`. */ + interface SlideData { + /** + * Gets the unique ID of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + id?: string; + } + /** An interface describing the data returned by calling `shapeFill.toJSON()`. */ + interface ShapeFillData { + /** + * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + foregroundColor?: string; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency?: number; + /** + * Returns the fill type of the shape. See {@link PowerPoint.ShapeFillType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + type?: PowerPoint.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "SlideBackground"; + } + /** An interface describing the data returned by calling `shapeLineFormat.toJSON()`. */ + interface ShapeLineFormatData { + /** + * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color?: string; + /** + * Represents the dash style of the line. Returns null when the line is not visible or there are inconsistent dash styles. See PowerPoint.ShapeLineDashStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashStyle?: PowerPoint.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot"; + /** + * Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See PowerPoint.ShapeLineStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + style?: PowerPoint.ShapeLineStyle | "Single" | "ThickBetweenThin" | "ThickThin" | "ThinThick" | "ThinThin"; + /** + * Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency?: number; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible?: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + weight?: number; + } + /** An interface describing the data returned by calling `shapeFont.toJSON()`. */ + interface ShapeFontData { + /** + * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color?: string; + /** + * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + italic?: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: string; + /** + * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + size?: number; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + underline?: PowerPoint.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 `textRange.toJSON()`. */ + interface TextRangeData { + /** + * Gets or sets the length of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + length?: number; + /** + * Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + start?: number; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + text?: string; + } + /** An interface describing the data returned by calling `textFrame.toJSON()`. */ + interface TextFrameData { + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeSetting?: PowerPoint.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bottomMargin?: number; + /** + * Specifies if the text frame contains text. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + hasText?: boolean; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftMargin?: number; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightMargin?: number; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + topMargin?: number; + /** + * Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + verticalAlignment?: PowerPoint.TextVerticalAlignment | "Top" | "Middle" | "Bottom" | "TopCentered" | "MiddleCentered" | "BottomCentered"; + /** + * Determines whether lines break automatically to fit text inside the shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wordWrap?: boolean; + } + /** An interface describing the data returned by calling `shape.toJSON()`. */ + interface ShapeData { + /** + * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height?: number; + /** + * Gets the unique ID of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: string; + /** + * The distance, in points, from the left side of the shape to the left side of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left?: number; + /** + * Specifies the name of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: string; + /** + * The distance, in points, from the top edge of the shape to the top edge of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top?: number; + /** + * Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + type?: PowerPoint.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line"; + /** + * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width?: number; + } + /** An interface describing the data returned by calling `shapeScopedCollection.toJSON()`. */ + interface ShapeScopedCollectionData { + items?: PowerPoint.Interfaces.ShapeData[]; + } + /** An interface describing the data returned by calling `slideCollection.toJSON()`. */ + interface SlideCollectionData { + items?: PowerPoint.Interfaces.SlideData[]; + } + /** An interface describing the data returned by calling `slideScopedCollection.toJSON()`. */ + interface SlideScopedCollectionData { + items?: PowerPoint.Interfaces.SlideData[]; + } + /** An interface describing the data returned by calling `slideMasterCollection.toJSON()`. */ + interface SlideMasterCollectionData { + items?: PowerPoint.Interfaces.SlideMasterData[]; + } + /** + * @remarks + * [Api set: PowerPointApi 1.0] + */ + interface PresentationLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + title?: boolean; + } + /** + * Represents the bullet formatting properties of a text that is attached to the {@link PowerPoint.ParagraphFormat}. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface BulletFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies if the bullets in the paragraph are visible. Returns 'null' if the 'TextRange' includes text fragments with different bullet visibility values. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible?: boolean; + } + /** + * Represents the paragraph formatting properties of a text that is attached to the {@link PowerPoint.TextRange}. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface ParagraphFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the bullet format of the paragraph. See {@link PowerPoint.BulletFormat} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bulletFormat?: PowerPoint.Interfaces.BulletFormatLoadOptions; + /** + * Represents the horizontal alignment of the paragraph. Returns 'null' if the 'TextRange' includes text fragments with different horizontal alignment values. See {@link PowerPoint.ParagraphHorizontalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + horizontalAlignment?: boolean; + } + /** + * Represents the collection of shapes. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface ShapeCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the fill formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + fill?: PowerPoint.Interfaces.ShapeFillLoadOptions; + /** + * For EACH ITEM in the collection: Returns the line formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + lineFormat?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the text frame object of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Gets the unique ID of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width?: boolean; + } + /** + * Represents the layout of a slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface SlideLayoutLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the unique ID of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * Gets the name of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + name?: boolean; + } + /** + * Represents the collection of layouts provided by the Slide Master for slides. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface SlideLayoutCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the unique ID of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the slide layout. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + name?: boolean; + } + /** + * Represents the Slide Master of a slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface SlideMasterLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the unique ID of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * Gets the unique name of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + name?: boolean; + } + /** + * Represents a single tag in the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface TagLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the unique ID of the tag. The `key` is unique within the owning `TagCollection` and always stored as uppercase letters within the document. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + key?: boolean; + /** + * Gets the value of the tag. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + value?: boolean; + } + /** + * Represents the collection of tags. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface TagCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the unique ID of the tag. The `key` is unique within the owning `TagCollection` and always stored as uppercase letters within the document. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Gets the value of the tag. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + value?: boolean; + } + /** + * Represents a single slide of a presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + interface SlideLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the layout of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + layout?: PowerPoint.Interfaces.SlideLayoutLoadOptions; + /** + * Gets the `SlideMaster` object that represents the slide's default content. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + slideMaster?: PowerPoint.Interfaces.SlideMasterLoadOptions; + /** + * Gets the unique ID of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + id?: boolean; + } + /** + * Represents the fill formatting of a shape object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface ShapeFillLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the shape fill foreground color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + foregroundColor?: boolean; + /** + * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency?: boolean; + /** + * Returns the fill type of the shape. See {@link PowerPoint.ShapeFillType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + type?: boolean; + } + /** + * Represents the line formatting for the shape object. For images and geometric shapes, line formatting represents the border of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface ShapeLineFormatLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the line color in HTML color format, in the form #RRGGBB (e.g., "FFA500") or as a named HTML color (e.g., "orange"). + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color?: boolean; + /** + * Represents the dash style of the line. Returns null when the line is not visible or there are inconsistent dash styles. See PowerPoint.ShapeLineDashStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + dashStyle?: boolean; + /** + * Represents the line style of the shape. Returns null when the line is not visible or there are inconsistent styles. See PowerPoint.ShapeLineStyle for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + style?: boolean; + /** + * Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear). Returns null when the shape has inconsistent transparencies. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + transparency?: boolean; + /** + * Specifies if the line formatting of a shape element is visible. Returns `null` when the shape has inconsistent visibilities. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + visible?: boolean; + /** + * Represents the weight of the line, in points. Returns `null` when the line is not visible or there are inconsistent line weights. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + weight?: boolean; + } + /** + * Represents the font attributes, such as font name, font size, and color, for a shape's TextRange object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface ShapeFontLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + 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. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + color?: boolean; + /** + * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + italic?: boolean; + /** + * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: boolean; + /** + * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + size?: boolean; + /** + * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + underline?: boolean; + } + /** + * Contains the text that is attached to a shape, in addition to properties and methods for manipulating the text. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface TextRangeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns a `ShapeFont` object that represents the font attributes for the text range. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + font?: PowerPoint.Interfaces.ShapeFontLoadOptions; + /** + * Represents the paragraph format of the text range. See {@link PowerPoint.ParagraphFormat} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + paragraphFormat?: PowerPoint.Interfaces.ParagraphFormatLoadOptions; + /** + * Gets or sets the length of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + length?: boolean; + /** + * Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents. + Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + start?: boolean; + /** + * Represents the plain text content of the text range. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + text?: boolean; + } + /** + * Represents the text frame of a shape object. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + interface TextFrameLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the text. See {@link PowerPoint.TextRange} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + textRange?: PowerPoint.Interfaces.TextRangeLoadOptions; + /** + * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + autoSizeSetting?: boolean; + /** + * Represents the bottom margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + bottomMargin?: boolean; + /** + * Specifies if the text frame contains text. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + hasText?: boolean; + /** + * Represents the left margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + leftMargin?: boolean; + /** + * Represents the right margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + rightMargin?: boolean; + /** + * Represents the top margin, in points, of the text frame. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + topMargin?: boolean; + /** + * Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + verticalAlignment?: boolean; + /** + * Determines whether lines break automatically to fit text inside the shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + wordWrap?: boolean; + } + /** + * Represents a single shape in the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface ShapeLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Returns the fill formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + fill?: PowerPoint.Interfaces.ShapeFillLoadOptions; + /** + * Returns the line formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + lineFormat?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions; + /** + * Returns the text frame object of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions; + /** + * Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height?: boolean; + /** + * Gets the unique ID of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * The distance, in points, from the left side of the shape to the left side of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left?: boolean; + /** + * Specifies the name of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: boolean; + /** + * The distance, in points, from the top edge of the shape to the top edge of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top?: boolean; + /** + * Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + type?: boolean; + /** + * Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width?: boolean; + } + /** + * Represents a collection of shapes. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + interface ShapeScopedCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Returns the fill formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + fill?: PowerPoint.Interfaces.ShapeFillLoadOptions; + /** + * For EACH ITEM in the collection: Returns the line formatting of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + lineFormat?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions; + /** + * For EACH ITEM in the collection: Returns the text frame object of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Gets the unique ID of the shape. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + left?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of this shape. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + name?: boolean; + /** + * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + top?: boolean; + /** + * For EACH ITEM in the collection: Returns the type of this shape. See {@link PowerPoint.ShapeType} for details. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value. + * + * @remarks + * [Api set: PowerPointApi 1.4] + */ + width?: boolean; + } + /** + * Represents the collection of slides in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + interface SlideCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the layout of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + layout?: PowerPoint.Interfaces.SlideLayoutLoadOptions; + /** + * For EACH ITEM in the collection: Gets the `SlideMaster` object that represents the slide's default content. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + slideMaster?: PowerPoint.Interfaces.SlideMasterLoadOptions; + /** + * For EACH ITEM in the collection: Gets the unique ID of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + id?: boolean; + } + /** + * Represents a collection of slides in the presentation. + * + * @remarks + * [Api set: PowerPointApi BETA (PREVIEW ONLY)] + */ + interface SlideScopedCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the layout of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + layout?: PowerPoint.Interfaces.SlideLayoutLoadOptions; + /** + * For EACH ITEM in the collection: Gets the `SlideMaster` object that represents the slide's default content. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + slideMaster?: PowerPoint.Interfaces.SlideMasterLoadOptions; + /** + * For EACH ITEM in the collection: Gets the unique ID of the slide. + * + * @remarks + * [Api set: PowerPointApi 1.2] + */ + id?: boolean; + } + /** + * Represents the collection of Slide Masters in the presentation. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + interface SlideMasterCollectionLoadOptions { + /** + Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the unique ID of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the unique name of the Slide Master. + * + * @remarks + * [Api set: PowerPointApi 1.3] + */ + name?: boolean; + } + } +} +declare namespace PowerPoint { + /** + * The RequestContext object facilitates requests to the PowerPoint application. Since the Office add-in and the PowerPoint application run in two different processes, the request context is required to get access to the PowerPoint object model from the add-in. + */ + class RequestContext extends OfficeCore.RequestContext { + constructor(url?: string); + readonly presentation: Presentation; + readonly application: Application; + } + /** + * Executes a batch script that performs actions on the PowerPoint 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 PowerPoint application. Since the Office add-in and the PowerPoint application run in two different processes, the RequestContext is required to get access to the PowerPoint object model from the add-in. + */ + function run(batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; + /** + * Executes a batch script that performs actions on the PowerPoint 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 PowerPoint application. Since the Office add-in and the PowerPoint application run in two different processes, the RequestContext is required to get access to the PowerPoint object model from the add-in. + */ + function run(object: OfficeExtension.ClientObject, batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; + /** + * Executes a batch script that performs actions on the PowerPoint 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 PowerPoint application. Since the Office add-in and the PowerPoint application run in two different processes, the RequestContext is required to get access to the PowerPoint object model from the add-in. + */ + function run(objects: OfficeExtension.ClientObject[], batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; +} +declare namespace PowerPoint { + /** + * Creates and opens a new presentation. Optionally, the presentation can be pre-populated with a base64-encoded .pptx file. + * + * [Api set: PowerPointApi 1.1] + * + * @param base64File Optional. The base64-encoded .pptx file. The default value is null. + */ + function createPresentation(base64File?: string): Promise; +} + + +//////////////////////////////////////////////////////////////// +///////////////////// End PowerPoint APIs ////////////////////// +//////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/dist/office.debug.js b/dist/office.debug.js new file mode 100644 index 000000000..352048f34 --- /dev/null +++ b/dist/office.debug.js @@ -0,0 +1,3038 @@ +var OSFPerformance; +(function (OSFPerformance) { + OSFPerformance.officeExecuteStartDate = 0; + OSFPerformance.officeExecuteStart = 0; + OSFPerformance.officeExecuteEnd = 0; + OSFPerformance.hostInitializationStart = 0; + OSFPerformance.hostInitializationEnd = 0; + OSFPerformance.totalJSHeapSize = 0; + OSFPerformance.usedJSHeapSize = 0; + OSFPerformance.jsHeapSizeLimit = 0; + OSFPerformance.getAppContextStart = 0; + OSFPerformance.getAppContextEnd = 0; + OSFPerformance.createOMEnd = 0; + OSFPerformance.officeOnReady = 0; + OSFPerformance.hostSpecificFileName = ""; + function now() { + if (performance && performance.now) { + return performance.now(); + } + else { + return 0; + } + } + OSFPerformance.now = now; + function getTotalJSHeapSize() { + if (typeof (performance) !== 'undefined' && performance.memory) { + return performance.memory.totalJSHeapSize; + } + else { + return 0; + } + } + OSFPerformance.getTotalJSHeapSize = getTotalJSHeapSize; + function getUsedJSHeapSize() { + if (typeof (performance) !== 'undefined' && performance.memory) { + return performance.memory.usedJSHeapSize; + } + else { + return 0; + } + } + OSFPerformance.getUsedJSHeapSize = getUsedJSHeapSize; + function getJSHeapSizeLimit() { + if (typeof (performance) !== 'undefined' && performance.memory) { + return performance.memory.jsHeapSizeLimit; + } + else { + return 0; + } + } + OSFPerformance.getJSHeapSizeLimit = getJSHeapSizeLimit; +})(OSFPerformance || (OSFPerformance = {})); +; +OSFPerformance.officeExecuteStartDate = Date.now(); +OSFPerformance.officeExecuteStart = OSFPerformance.now(); + + + +/* Office JavaScript API library */ + +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + + This file also contains the following Promise implementation (with a few small modifications): + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 2.3.0 +*/ +var OSF = OSF || {}; +OSF.HostSpecificFileVersionDefault = "16.00"; +OSF.HostSpecificFileVersionMap = { + "access": { + "web": "16.00" + }, + "agavito": { + "winrt": "16.00" + }, + "excel": { + "android": "16.00", + "ios": "16.00", + "mac": "16.00", + "web": "16.00", + "win32": "16.01", + "winrt": "16.00" + }, + "onenote": { + "android": "16.00", + "ios": "16.00", + "mac": "16.00", + "web": "16.00", + "win32": "16.00", + "winrt": "16.00" + }, + "outlook": { + "android": "16.00", + "ios": "16.00", + "mac": "16.00", + "web": "16.01", + "win32": "16.02" + }, + "powerpoint": { + "ios": "16.00", + "mac": "16.00", + "web": "16.00", + "win32": "16.01", + "winrt": "16.00" + }, + "project": { + "win32": "16.00" + }, + "sway": { + "web": "16.00" + }, + "word": { + "ios": "16.00", + "mac": "16.00", + "web": "16.00", + "win32": "16.01", + "winrt": "16.00" + }, + "visio": { + "web": "16.00", + "win32": "16.00" + } +}; +OSF.SupportedLocales = { + "ar-sa": true, + "bg-bg": true, + "bn-in": true, + "ca-es": true, + "cs-cz": true, + "da-dk": true, + "de-de": true, + "el-gr": true, + "en-us": true, + "es-es": true, + "et-ee": true, + "eu-es": true, + "fa-ir": true, + "fi-fi": true, + "fr-fr": true, + "gl-es": true, + "he-il": true, + "hi-in": true, + "hr-hr": true, + "hu-hu": true, + "id-id": true, + "it-it": true, + "ja-jp": true, + "kk-kz": true, + "ko-kr": true, + "lo-la": true, + "lt-lt": true, + "lv-lv": true, + "ms-my": true, + "nb-no": true, + "nl-nl": true, + "nn-no": true, + "pl-pl": true, + "pt-br": true, + "pt-pt": true, + "ro-ro": true, + "ru-ru": true, + "sk-sk": true, + "sl-si": true, + "sr-cyrl-cs": true, + "sr-cyrl-rs": true, + "sr-latn-cs": true, + "sr-latn-rs": true, + "sv-se": true, + "th-th": true, + "tr-tr": true, + "uk-ua": true, + "ur-pk": true, + "vi-vn": true, + "zh-cn": true, + "zh-tw": true +}; +OSF.AssociatedLocales = { + ar: "ar-sa", + bg: "bg-bg", + bn: "bn-in", + ca: "ca-es", + cs: "cs-cz", + da: "da-dk", + de: "de-de", + el: "el-gr", + en: "en-us", + es: "es-es", + et: "et-ee", + eu: "eu-es", + fa: "fa-ir", + fi: "fi-fi", + fr: "fr-fr", + gl: "gl-es", + he: "he-il", + hi: "hi-in", + hr: "hr-hr", + hu: "hu-hu", + id: "id-id", + it: "it-it", + ja: "ja-jp", + kk: "kk-kz", + ko: "ko-kr", + lo: "lo-la", + lt: "lt-lt", + lv: "lv-lv", + ms: "ms-my", + nb: "nb-no", + nl: "nl-nl", + nn: "nn-no", + pl: "pl-pl", + pt: "pt-br", + ro: "ro-ro", + ru: "ru-ru", + sk: "sk-sk", + sl: "sl-si", + sr: "sr-cyrl-cs", + sv: "sv-se", + th: "th-th", + tr: "tr-tr", + uk: "uk-ua", + ur: "ur-pk", + vi: "vi-vn", + zh: "zh-cn" +}; +OSF.SupportedRTLLocales = { + "ar-sa": true, + "he-il": true, + "fa-ir": true, + "ur-pk": true +}; +OSF.getSupportedLocale = function OSF$getSupportedLocale(locale, defaultLocale) { + if (defaultLocale === void 0) { defaultLocale = "en-us"; } + if (!locale) { + return defaultLocale; + } + var supportedLocale; + locale = locale.toLowerCase(); + if (locale in OSF.SupportedLocales) { + supportedLocale = locale; + } + else { + var localeParts = locale.split('-', 1); + if (localeParts && localeParts.length > 0) { + supportedLocale = OSF.AssociatedLocales[localeParts[0]]; + } + } + if (!supportedLocale) { + supportedLocale = defaultLocale; + } + return supportedLocale; +}; +OSF.isRTLLocale = function OSF$isRTLLocale(locale) { + if (!locale) { + return false; + } + return OSF.SupportedRTLLocales[locale.toLowerCase()] || false; +}; +var ScriptLoading; +(function (ScriptLoading) { + var ScriptInfo = (function () { + function ScriptInfo(url, isReady, hasStarted, timer, pendingCallback) { + this.url = url; + this.isReady = isReady; + this.hasStarted = hasStarted; + this.timer = timer; + this.hasError = false; + this.pendingCallbacks = []; + this.pendingCallbacks.push(pendingCallback); + } + return ScriptInfo; + }()); + var ScriptTelemetry = (function () { + function ScriptTelemetry(scriptId, startTime, msResponseTime) { + this.scriptId = scriptId; + this.startTime = startTime; + this.msResponseTime = msResponseTime; + } + return ScriptTelemetry; + }()); + var LoadScriptHelper = (function () { + function LoadScriptHelper(constantNames) { + if (constantNames === void 0) { constantNames = { + OfficeJS: "office.js", + OfficeDebugJS: "office.debug.js" + }; } + this.constantNames = constantNames; + this.defaultScriptLoadingTimeout = 10000; + this.loadedScriptByIds = {}; + this.scriptTelemetryBuffer = []; + this.osfControlAppCorrelationId = ""; + this.basePath = null; + this.getUseAssociatedActionsOnly = null; + } + LoadScriptHelper.prototype.isScriptLoading = function (id) { + return !!(this.loadedScriptByIds[id] && this.loadedScriptByIds[id].hasStarted); + }; + LoadScriptHelper.prototype.getOfficeJsBasePath = function () { + if (this.basePath) { + return this.basePath; + } + else { + var getScriptBase = function (scriptSrc, scriptNameToCheck) { + var scriptBase, indexOfJS, scriptSrcLowerCase; + scriptSrcLowerCase = scriptSrc.toLowerCase(); + indexOfJS = scriptSrcLowerCase.indexOf(scriptNameToCheck); + if (indexOfJS >= 0 && indexOfJS === (scriptSrc.length - scriptNameToCheck.length) && (indexOfJS === 0 || scriptSrc.charAt(indexOfJS - 1) === '/' || scriptSrc.charAt(indexOfJS - 1) === '\\')) { + scriptBase = scriptSrc.substring(0, indexOfJS); + } + else if (indexOfJS >= 0 + && indexOfJS < (scriptSrc.length - scriptNameToCheck.length) + && scriptSrc.charAt(indexOfJS + scriptNameToCheck.length) === '?' + && (indexOfJS === 0 || scriptSrc.charAt(indexOfJS - 1) === '/' || scriptSrc.charAt(indexOfJS - 1) === '\\')) { + scriptBase = scriptSrc.substring(0, indexOfJS); + } + return scriptBase; + }; + var scripts = document.getElementsByTagName("script"); + var scriptsCount = scripts.length; + var officeScripts = [this.constantNames.OfficeJS, this.constantNames.OfficeDebugJS]; + var officeScriptsCount = officeScripts.length; + this.getUseAssociatedActionsOnly = false; + var i, j; + for (i = 0; !this.basePath && i < scriptsCount; i++) { + if (scripts[i].src) { + for (j = 0; !this.basePath && j < officeScriptsCount; j++) { + this.basePath = getScriptBase(scripts[i].src, officeScripts[j]); + if (this.basePath) { + try { + var attr = scripts[i].getAttribute("data-use-associated-actions-only"); + this.getUseAssociatedActionsOnly = attr === "1"; + } + catch (ex) { + } + } + } + } + } + return this.basePath; + } + }; + LoadScriptHelper.prototype.getUseAssociatedActionsOnlyDefined = function () { + this.getOfficeJsBasePath(); + return this.getUseAssociatedActionsOnly; + }; + LoadScriptHelper.prototype.loadScript = function (url, scriptId, callback, highPriority, timeoutInMs) { + this.loadScriptInternal(url, scriptId, callback, highPriority, timeoutInMs); + }; + LoadScriptHelper.prototype.loadScriptParallel = function (url, scriptId, timeoutInMs) { + this.loadScriptInternal(url, scriptId, null, false, timeoutInMs); + }; + LoadScriptHelper.prototype.waitForFunction = function (scriptLoadTest, callback, numberOfTries, delay) { + var attemptsRemaining = numberOfTries; + var timerId; + var validateFunction = function () { + attemptsRemaining--; + if (scriptLoadTest()) { + callback(true); + return; + } + else if (attemptsRemaining > 0) { + timerId = window.setTimeout(validateFunction, delay); + attemptsRemaining--; + } + else { + window.clearTimeout(timerId); + callback(false); + } + }; + validateFunction(); + }; + LoadScriptHelper.prototype.waitForScripts = function (ids, callback) { + var _this = this; + if (this.invokeCallbackIfScriptsReady(ids, callback) == false) { + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var loadedScriptEntry = this.loadedScriptByIds[id]; + if (loadedScriptEntry) { + loadedScriptEntry.pendingCallbacks.push(function () { + _this.invokeCallbackIfScriptsReady(ids, callback); + }); + } + } + } + }; + LoadScriptHelper.prototype.logScriptLoading = function (scriptId, startTime, msResponseTime) { + startTime = Math.floor(startTime); + if (OSF.AppTelemetry && OSF.AppTelemetry.onScriptDone) { + if (OSF.AppTelemetry.onScriptDone.length == 3) { + OSF.AppTelemetry.onScriptDone(scriptId, startTime, msResponseTime); + } + else { + OSF.AppTelemetry.onScriptDone(scriptId, startTime, msResponseTime, this.osfControlAppCorrelationId); + } + } + else { + var scriptTelemetry = new ScriptTelemetry(scriptId, startTime, msResponseTime); + this.scriptTelemetryBuffer.push(scriptTelemetry); + } + }; + LoadScriptHelper.prototype.setAppCorrelationId = function (appCorrelationId) { + this.osfControlAppCorrelationId = appCorrelationId; + }; + LoadScriptHelper.prototype.invokeCallbackIfScriptsReady = function (ids, callback) { + var hasError = false; + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var loadedScriptEntry = this.loadedScriptByIds[id]; + if (!loadedScriptEntry) { + loadedScriptEntry = new ScriptInfo("", false, false, null, null); + this.loadedScriptByIds[id] = loadedScriptEntry; + } + if (loadedScriptEntry.isReady == false) { + return false; + } + else if (loadedScriptEntry.hasError) { + hasError = true; + } + } + callback(!hasError); + return true; + }; + LoadScriptHelper.prototype.getScriptEntryByUrl = function (url) { + for (var key in this.loadedScriptByIds) { + var scriptEntry = this.loadedScriptByIds[key]; + if (this.loadedScriptByIds.hasOwnProperty(key) && scriptEntry.url === url) { + return scriptEntry; + } + } + return null; + }; + LoadScriptHelper.prototype.loadScriptInternal = function (url, scriptId, callback, highPriority, timeoutInMs) { + if (url) { + var self = this; + var doc = window.document; + var loadedScriptEntry = (scriptId && this.loadedScriptByIds[scriptId]) ? this.loadedScriptByIds[scriptId] : this.getScriptEntryByUrl(url); + if (!loadedScriptEntry || loadedScriptEntry.hasError || loadedScriptEntry.url.toLowerCase() != url.toLowerCase()) { + var script = doc.createElement("script"); + script.type = "text/javascript"; + if (scriptId) { + script.id = scriptId; + } + if (!loadedScriptEntry) { + loadedScriptEntry = new ScriptInfo(url, false, false, null, null); + this.loadedScriptByIds[(scriptId ? scriptId : url)] = loadedScriptEntry; + } + else { + loadedScriptEntry.url = url; + loadedScriptEntry.hasError = false; + loadedScriptEntry.isReady = false; + } + if (callback) { + if (highPriority) { + loadedScriptEntry.pendingCallbacks.unshift(callback); + } + else { + loadedScriptEntry.pendingCallbacks.push(callback); + } + } + var timeFromPageInit = -1; + if (window.performance && window.performance.now) { + timeFromPageInit = window.performance.now(); + } + var startTime = (new Date()).getTime(); + var logTelemetry = function (succeeded) { + if (scriptId) { + var totalTime = (new Date()).getTime() - startTime; + if (!succeeded) { + totalTime = -totalTime; + } + self.logScriptLoading(scriptId, timeFromPageInit, totalTime); + } + self.flushTelemetryBuffer(); + }; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (!OSF._OfficeAppFactory.getLoggingAllowed() && (typeof OSF.AppTelemetry !== 'undefined')) { + OSF.AppTelemetry.enableTelemetry = false; + } + logTelemetry(true); + loadedScriptEntry.isReady = true; + if (loadedScriptEntry.timer != null) { + clearTimeout(loadedScriptEntry.timer); + delete loadedScriptEntry.timer; + } + var pendingCallbackCount = loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = loadedScriptEntry.pendingCallbacks.shift(); + if (currentCallback) { + var result = currentCallback(true); + if (result === false) { + break; + } + } + } + }; + var onLoadError = function () { + logTelemetry(false); + loadedScriptEntry.hasError = true; + loadedScriptEntry.isReady = true; + if (loadedScriptEntry.timer != null) { + clearTimeout(loadedScriptEntry.timer); + delete loadedScriptEntry.timer; + } + var pendingCallbackCount = loadedScriptEntry.pendingCallbacks.length; + for (var i = 0; i < pendingCallbackCount; i++) { + var currentCallback = loadedScriptEntry.pendingCallbacks.shift(); + if (currentCallback) { + var result = currentCallback(false); + if (result === false) { + break; + } + } + } + }; + if (script.readyState) { + script.onreadystatechange = function () { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + onLoadCallback(); + } + }; + } + else { + script.onload = onLoadCallback; + } + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || this.defaultScriptLoadingTimeout; + loadedScriptEntry.timer = setTimeout(onLoadError, timeoutInMs); + loadedScriptEntry.hasStarted = true; + script.setAttribute("crossOrigin", "anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (loadedScriptEntry.isReady) { + callback(true); + } + else { + if (highPriority) { + loadedScriptEntry.pendingCallbacks.unshift(callback); + } + else { + loadedScriptEntry.pendingCallbacks.push(callback); + } + } + } + }; + LoadScriptHelper.prototype.flushTelemetryBuffer = function () { + if (OSF.AppTelemetry && OSF.AppTelemetry.onScriptDone) { + for (var i = 0; i < this.scriptTelemetryBuffer.length; i++) { + var scriptTelemetry = this.scriptTelemetryBuffer[i]; + if (OSF.AppTelemetry.onScriptDone.length == 3) { + OSF.AppTelemetry.onScriptDone(scriptTelemetry.scriptId, scriptTelemetry.startTime, scriptTelemetry.msResponseTime); + } + else { + OSF.AppTelemetry.onScriptDone(scriptTelemetry.scriptId, scriptTelemetry.startTime, scriptTelemetry.msResponseTime, this.osfControlAppCorrelationId); + } + } + this.scriptTelemetryBuffer = []; + } + }; + return LoadScriptHelper; + }()); + ScriptLoading.LoadScriptHelper = LoadScriptHelper; +})(ScriptLoading || (ScriptLoading = {})); +var OfficeExt; +(function (OfficeExt) { + var HostName; + (function (HostName) { + var Host = (function () { + function Host() { + this.getDiagnostics = function _getDiagnostics(version) { + var diagnostics = { + host: this.getHost(), + version: (version || this.getDefaultVersion()), + platform: this.getPlatform() + }; + return diagnostics; + }; + this.platformRemappings = { + web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, + winrt: Microsoft.Office.WebExtension.PlatformType.Universal, + win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, + ios: Microsoft.Office.WebExtension.PlatformType.iOS, + android: Microsoft.Office.WebExtension.PlatformType.Android + }; + this.camelCaseMappings = { + powerpoint: Microsoft.Office.WebExtension.HostType.PowerPoint, + onenote: Microsoft.Office.WebExtension.HostType.OneNote + }; + this.hostInfo = OSF._OfficeAppFactory.getHostInfo(); + this.getHost = this.getHost.bind(this); + this.getPlatform = this.getPlatform.bind(this); + this.getDiagnostics = this.getDiagnostics.bind(this); + } + Host.prototype.capitalizeFirstLetter = function (input) { + if (input) { + return (input[0].toUpperCase() + input.slice(1).toLowerCase()); + } + return input; + }; + Host.getInstance = function () { + if (Host.hostObj === undefined) { + Host.hostObj = new Host(); + } + return Host.hostObj; + }; + Host.prototype.getPlatform = function (appNumber) { + if (this.hostInfo.hostPlatform) { + var hostPlatform = this.hostInfo.hostPlatform.toLowerCase(); + if (this.platformRemappings[hostPlatform]) { + return this.platformRemappings[hostPlatform]; + } + } + return null; + }; + Host.prototype.getHost = function (appNumber) { + if (this.hostInfo.hostType) { + var hostType = this.hostInfo.hostType.toLowerCase(); + if (this.camelCaseMappings[hostType]) { + return this.camelCaseMappings[hostType]; + } + hostType = this.capitalizeFirstLetter(this.hostInfo.hostType); + if (Microsoft.Office.WebExtension.HostType[hostType]) { + return Microsoft.Office.WebExtension.HostType[hostType]; + } + } + return null; + }; + Host.prototype.getDefaultVersion = function () { + if (this.getHost()) { + return "16.0.0000.0000"; + } + return null; + }; + return Host; + }()); + HostName.Host = Host; + })(HostName = OfficeExt.HostName || (OfficeExt.HostName = {})); +})(OfficeExt || (OfficeExt = {})); +var Office; +(function (Office) { + var _Internal; + (function (_Internal) { + var PromiseImpl; + (function (PromiseImpl) { + function Init() { + return (function () { + "use strict"; + function lib$es6$promise$utils$$objectOrFunction(x) { + return typeof x === 'function' || (typeof x === 'object' && x !== null); + } + function lib$es6$promise$utils$$isFunction(x) { + return typeof x === 'function'; + } + function lib$es6$promise$utils$$isMaybeThenable(x) { + return typeof x === 'object' && x !== null; + } + var lib$es6$promise$utils$$_isArray; + if (!Array.isArray) { + lib$es6$promise$utils$$_isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; + } + else { + lib$es6$promise$utils$$_isArray = Array.isArray; + } + var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray; + var lib$es6$promise$asap$$len = 0; + var lib$es6$promise$asap$$toString = {}.toString; + var lib$es6$promise$asap$$vertxNext; + var lib$es6$promise$asap$$customSchedulerFn; + var lib$es6$promise$asap$$asap = function asap(callback, arg) { + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback; + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg; + lib$es6$promise$asap$$len += 2; + if (lib$es6$promise$asap$$len === 2) { + if (lib$es6$promise$asap$$customSchedulerFn) { + lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush); + } + else { + lib$es6$promise$asap$$scheduleFlush(); + } + } + }; + function lib$es6$promise$asap$$setScheduler(scheduleFn) { + lib$es6$promise$asap$$customSchedulerFn = scheduleFn; + } + function lib$es6$promise$asap$$setAsap(asapFn) { + lib$es6$promise$asap$$asap = asapFn; + } + var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined; + var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {}; + var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver; + var lib$es6$promise$asap$$isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && + typeof importScripts !== 'undefined' && + typeof MessageChannel !== 'undefined'; + function lib$es6$promise$asap$$useNextTick() { + var nextTick = process.nextTick; + var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); + if (Array.isArray(version) && version[1] === '0' && version[2] === '10') { + nextTick = setImmediate; + } + return function () { + nextTick(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useVertxTimer() { + return function () { + lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useMutationObserver() { + var iterations = 0; + var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + return function () { + node.data = (iterations = ++iterations % 2); + }; + } + function lib$es6$promise$asap$$useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = lib$es6$promise$asap$$flush; + return function () { + channel.port2.postMessage(0); + }; + } + function lib$es6$promise$asap$$useSetTimeout() { + return function () { + setTimeout(lib$es6$promise$asap$$flush, 1); + }; + } + var lib$es6$promise$asap$$queue = new Array(1000); + function lib$es6$promise$asap$$flush() { + for (var i = 0; i < lib$es6$promise$asap$$len; i += 2) { + var callback = lib$es6$promise$asap$$queue[i]; + var arg = lib$es6$promise$asap$$queue[i + 1]; + callback(arg); + lib$es6$promise$asap$$queue[i] = undefined; + lib$es6$promise$asap$$queue[i + 1] = undefined; + } + lib$es6$promise$asap$$len = 0; + } + var lib$es6$promise$asap$$scheduleFlush; + if (lib$es6$promise$asap$$isNode) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick(); + } + else if (lib$es6$promise$asap$$isWorker) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel(); + } + else { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout(); + } + function lib$es6$promise$$internal$$noop() { } + var lib$es6$promise$$internal$$PENDING = void 0; + var lib$es6$promise$$internal$$FULFILLED = 1; + var lib$es6$promise$$internal$$REJECTED = 2; + var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$selfFullfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function lib$es6$promise$$internal$$cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); + } + function lib$es6$promise$$internal$$getThen(promise) { + try { + return promise.then; + } + catch (error) { + lib$es6$promise$$internal$$GET_THEN_ERROR.error = error; + return lib$es6$promise$$internal$$GET_THEN_ERROR; + } + } + function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } + catch (e) { + return e; + } + } + function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) { + lib$es6$promise$asap$$asap(function (promise) { + var sealed = false; + var error = lib$es6$promise$$internal$$tryThen(then, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + lib$es6$promise$$internal$$reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + if (!sealed && error) { + sealed = true; + lib$es6$promise$$internal$$reject(promise, error); + } + }, promise); + } + function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) { + if (thenable._state === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, thenable._result); + } + else if (thenable._state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, thenable._result); + } + else { + lib$es6$promise$$internal$$subscribe(thenable, undefined, function (value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function (reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + } + function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable) { + if (maybeThenable.constructor === promise.constructor) { + lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable); + } + else { + var then = lib$es6$promise$$internal$$getThen(maybeThenable); + if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error); + } + else if (then === undefined) { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + else if (lib$es6$promise$utils$$isFunction(then)) { + lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then); + } + else { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + } + } + function lib$es6$promise$$internal$$resolve(promise, value) { + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFullfillment()); + } + else if (lib$es6$promise$utils$$objectOrFunction(value)) { + lib$es6$promise$$internal$$handleMaybeThenable(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + } + function lib$es6$promise$$internal$$publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + lib$es6$promise$$internal$$publish(promise); + } + function lib$es6$promise$$internal$$fulfill(promise, value) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._result = value; + promise._state = lib$es6$promise$$internal$$FULFILLED; + if (promise._subscribers.length !== 0) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise); + } + } + function lib$es6$promise$$internal$$reject(promise, reason) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._state = lib$es6$promise$$internal$$REJECTED; + promise._result = reason; + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise); + } + function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) { + var subscribers = parent._subscribers; + var length = subscribers.length; + parent._onerror = null; + subscribers[length] = child; + subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment; + subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection; + if (length === 0 && parent._state) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent); + } + } + function lib$es6$promise$$internal$$publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + if (subscribers.length === 0) { + return; + } + var child, callback, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + if (child) { + lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail); + } + else { + callback(detail); + } + } + promise._subscribers.length = 0; + } + function lib$es6$promise$$internal$$ErrorObject() { + this.error = null; + } + var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$tryCatch(callback, detail) { + try { + return callback(detail); + } + catch (e) { + lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e; + return lib$es6$promise$$internal$$TRY_CATCH_ERROR; + } + } + function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) { + var hasCallback = lib$es6$promise$utils$$isFunction(callback), value, error, succeeded, failed; + if (hasCallback) { + value = lib$es6$promise$$internal$$tryCatch(callback, detail); + if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value = null; + } + else { + succeeded = true; + } + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn()); + return; + } + } + else { + value = detail; + succeeded = true; + } + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + } + else if (hasCallback && succeeded) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else if (failed) { + lib$es6$promise$$internal$$reject(promise, error); + } + else if (settled === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, value); + } + else if (settled === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + } + function lib$es6$promise$$internal$$initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function rejectPromise(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + catch (e) { + lib$es6$promise$$internal$$reject(promise, e); + } + } + function lib$es6$promise$enumerator$$Enumerator(Constructor, input) { + var enumerator = this; + enumerator._instanceConstructor = Constructor; + enumerator.promise = new Constructor(lib$es6$promise$$internal$$noop); + if (enumerator._validateInput(input)) { + enumerator._input = input; + enumerator.length = input.length; + enumerator._remaining = input.length; + enumerator._init(); + if (enumerator.length === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + else { + enumerator.length = enumerator.length || 0; + enumerator._enumerate(); + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + } + } + else { + lib$es6$promise$$internal$$reject(enumerator.promise, enumerator._validationError()); + } + } + lib$es6$promise$enumerator$$Enumerator.prototype._validateInput = function (input) { + return lib$es6$promise$utils$$isArray(input); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._validationError = function () { + return new Error('Array Methods must be provided an Array'); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._init = function () { + this._result = new Array(this.length); + }; + var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator; + lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function () { + var enumerator = this; + var length = enumerator.length; + var promise = enumerator.promise; + var input = enumerator._input; + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + enumerator._eachEntry(input[i], i); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function (entry, i) { + var enumerator = this; + var c = enumerator._instanceConstructor; + if (lib$es6$promise$utils$$isMaybeThenable(entry)) { + if (entry.constructor === c && entry._state !== lib$es6$promise$$internal$$PENDING) { + entry._onerror = null; + enumerator._settledAt(entry._state, i, entry._result); + } + else { + enumerator._willSettleAt(c.resolve(entry), i); + } + } + else { + enumerator._remaining--; + enumerator._result[i] = entry; + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function (state, i, value) { + var enumerator = this; + var promise = enumerator.promise; + if (promise._state === lib$es6$promise$$internal$$PENDING) { + enumerator._remaining--; + if (state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + else { + enumerator._result[i] = value; + } + } + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(promise, enumerator._result); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function (promise, i) { + var enumerator = this; + lib$es6$promise$$internal$$subscribe(promise, undefined, function (value) { + enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value); + }, function (reason) { + enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason); + }); + }; + function lib$es6$promise$promise$all$$all(entries) { + return new lib$es6$promise$enumerator$$default(this, entries).promise; + } + var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all; + function lib$es6$promise$promise$race$$race(entries) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + if (!lib$es6$promise$utils$$isArray(entries)) { + lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.')); + return promise; + } + var length = entries.length; + function onFulfillment(value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + function onRejection(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + } + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); + } + return promise; + } + var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race; + function lib$es6$promise$promise$resolve$$resolve(object) { + var Constructor = this; + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$resolve(promise, object); + return promise; + } + var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve; + function lib$es6$promise$promise$reject$$reject(reason) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$reject(promise, reason); + return promise; + } + var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject; + var lib$es6$promise$promise$$counter = 0; + function lib$es6$promise$promise$$needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); + } + function lib$es6$promise$promise$$needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise; + function lib$es6$promise$promise$$Promise(resolver) { + this._id = lib$es6$promise$promise$$counter++; + this._state = undefined; + this._result = undefined; + this._subscribers = []; + if (lib$es6$promise$$internal$$noop !== resolver) { + if (!lib$es6$promise$utils$$isFunction(resolver)) { + lib$es6$promise$promise$$needsResolver(); + } + if (!(this instanceof lib$es6$promise$promise$$Promise)) { + lib$es6$promise$promise$$needsNew(); + } + lib$es6$promise$$internal$$initializePromise(this, resolver); + } + } + lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default; + lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default; + lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default; + lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default; + lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler; + lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap; + lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap; + lib$es6$promise$promise$$Promise.prototype = { + constructor: lib$es6$promise$promise$$Promise, + then: function (onFulfillment, onRejection) { + var parent = this; + var state = parent._state; + if (state === lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state === lib$es6$promise$$internal$$REJECTED && !onRejection) { + return this; + } + var child = new this.constructor(lib$es6$promise$$internal$$noop); + var result = parent._result; + if (state) { + var callback = arguments[state - 1]; + lib$es6$promise$asap$$asap(function () { + lib$es6$promise$$internal$$invokeCallback(state, child, callback, result); + }); + } + else { + lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection); + } + return child; + }, + 'catch': function (onRejection) { + return this.then(null, onRejection); + } + }; + return lib$es6$promise$promise$$default; + }).call(this); + } + PromiseImpl.Init = Init; + })(PromiseImpl = _Internal.PromiseImpl || (_Internal.PromiseImpl = {})); + })(_Internal = Office._Internal || (Office._Internal = {})); + (function (_Internal) { + function isEdgeLessThan14() { + var userAgent = window.navigator.userAgent; + var versionIdx = userAgent.indexOf("Edge/"); + if (versionIdx >= 0) { + userAgent = userAgent.substring(versionIdx + 5, userAgent.length); + if (userAgent < "14.14393") + return true; + else + return false; + } + return false; + } + function determinePromise() { + if (typeof (window) === "undefined" && typeof (Promise) === "function") { + return Promise; + } + if (typeof (window) !== "undefined" && window.Promise) { + if (isEdgeLessThan14()) { + return _Internal.PromiseImpl.Init(); + } + else { + return window.Promise; + } + } + else { + return _Internal.PromiseImpl.Init(); + } + } + _Internal.OfficePromise = determinePromise(); + })(_Internal = Office._Internal || (Office._Internal = {})); + var OfficePromise = _Internal.OfficePromise; + Office.Promise = OfficePromise; +})(Office || (Office = {})); +var OTel; +(function (OTel) { + var CDN_PATH_OTELJS_AGAVE = 'telemetry/oteljs_agave.js'; + var OTelLogger = (function () { + function OTelLogger() { + } + OTelLogger.loaded = function () { + return !(OTelLogger.logger === undefined || OTelLogger.sink === undefined); + }; + OTelLogger.getOtelSinkCDNLocation = function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + CDN_PATH_OTELJS_AGAVE); + }; + OTelLogger.getMapName = function (map, name) { + if (name !== undefined && map.hasOwnProperty(name)) { + return map[name]; + } + return name; + }; + OTelLogger.getHost = function () { + var host = OSF._OfficeAppFactory.getHostInfo()["hostType"]; + var map = { + "excel": "Excel", + "onenote": "OneNote", + "outlook": "Outlook", + "powerpoint": "PowerPoint", + "project": "Project", + "visio": "Visio", + "word": "Word" + }; + var mappedName = OTelLogger.getMapName(map, host); + return mappedName; + }; + OTelLogger.getFlavor = function () { + var flavor = OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]; + var map = { + "android": "Android", + "ios": "iOS", + "mac": "Mac", + "universal": "Universal", + "web": "Web", + "win32": "Win32" + }; + var mappedName = OTelLogger.getMapName(map, flavor); + return mappedName; + }; + OTelLogger.ensureValue = function (value, alternative) { + if (!value) { + return alternative; + } + return value; + }; + OTelLogger.create = function (info) { + var contract = { + id: info.appId, + marketplaceType: info.marketplaceType, + assetId: info.assetId, + officeJsVersion: info.officeJSVersion, + hostJsVersion: info.hostJSVersion, + browserToken: info.clientId, + instanceId: info.appInstanceId, + sessionId: info.sessionId + }; + var fields = oteljs.Contracts.Office.System.SDX.getFields("SDX", contract); + var host = OTelLogger.getHost(); + var flavor = OTelLogger.getFlavor(); + var version = (flavor === "Web" && info.hostVersion.slice(0, 2) === "0.") ? "16.0.0.0" : info.hostVersion; + var context = { + 'App.Name': host, + 'App.Platform': flavor, + 'App.Version': version, + 'Session.Id': OTelLogger.ensureValue(info.correlationId, "00000000-0000-0000-0000-000000000000") + }; + var namespace = "Office.Extensibility.OfficeJs"; + var ariaTenantToken = 'db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439'; + var nexusTenantToken = 1755; + var logger = new oteljs.SimpleTelemetryLogger(undefined, fields); + logger.setTenantToken(namespace, ariaTenantToken, nexusTenantToken); + if (oteljs.AgaveSink) { + OTelLogger.sink = oteljs.AgaveSink.createInstance(context); + } + if (OTelLogger.sink === undefined) { + OTelLogger.attachLegacyAgaveSink(context); + } + else { + logger.addSink(OTelLogger.sink); + } + return logger; + }; + OTelLogger.attachLegacyAgaveSink = function (context) { + var afterLoadOtelSink = function () { + if (typeof oteljs_agave !== "undefined") { + OTelLogger.sink = oteljs_agave.AgaveSink.createInstance(context); + } + if (OTelLogger.sink === undefined || OTelLogger.logger === undefined) { + OTelLogger.Enabled = false; + OTelLogger.promises = []; + OTelLogger.logger = undefined; + OTelLogger.sink = undefined; + return; + } + OTelLogger.logger.addSink(OTelLogger.sink); + OTelLogger.promises.forEach(function (resolve) { + resolve(); + }); + }; + var timeoutAfterFiveSeconds = 5000; + OSF.OUtil.loadScript(OTelLogger.getOtelSinkCDNLocation(), afterLoadOtelSink, timeoutAfterFiveSeconds); + }; + OTelLogger.initialize = function (info) { + if (!OTelLogger.Enabled) { + OTelLogger.promises = []; + return; + } + var afterOnReady = function () { + if ((typeof oteljs === "undefined")) { + return; + } + if (!OTelLogger.loaded()) { + OTelLogger.logger = OTelLogger.create(info); + } + if (OTelLogger.loaded()) { + OTelLogger.promises.forEach(function (resolve) { + resolve(); + }); + } + }; + Microsoft.Office.WebExtension.onReadyInternal().then(function () { return afterOnReady(); }); + }; + OTelLogger.sendTelemetryEvent = function (telemetryEvent) { + OTelLogger.onTelemetryLoaded(function () { + try { + OTelLogger.logger.sendTelemetryEvent(telemetryEvent); + } + catch (e) { + } + }); + }; + OTelLogger.sendCustomerContent = function (customerContentEvent) { + OTelLogger.onTelemetryLoaded(function () { + try { + OTelLogger.logger.sendCustomerContent(customerContentEvent); + } + catch (e) { + } + }); + }; + OTelLogger.onTelemetryLoaded = function (resolve) { + if (!OTelLogger.Enabled) { + return; + } + if (OTelLogger.loaded()) { + resolve(); + } + else { + OTelLogger.promises.push(resolve); + } + }; + OTelLogger.promises = []; + OTelLogger.Enabled = true; + return OTelLogger; + }()); + OTel.OTelLogger = OTelLogger; +})(OTel || (OTel = {})); +(function (OfficeExt) { + var Association = (function () { + function Association() { + this.m_mappings = {}; + this.m_onchangeHandlers = []; + } + Association.prototype.associate = function (arg1, arg2) { + function consoleWarn(message) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + } + if (arguments.length == 1 && typeof arguments[0] === 'object' && arguments[0]) { + var mappings = arguments[0]; + for (var key in mappings) { + this.associate(key, mappings[key]); + } + } + else if (arguments.length == 2) { + var name_1 = arguments[0]; + var func = arguments[1]; + if (typeof name_1 !== 'string') { + consoleWarn('[InvalidArg] Function=associate'); + return; + } + if (typeof func !== 'function') { + consoleWarn('[InvalidArg] Function=associate'); + return; + } + var nameUpperCase = name_1.toUpperCase(); + if (this.m_mappings[nameUpperCase]) { + consoleWarn('[DuplicatedName] Function=' + name_1); + } + this.m_mappings[nameUpperCase] = func; + for (var i = 0; i < this.m_onchangeHandlers.length; i++) { + this.m_onchangeHandlers[i](); + } + } + else { + consoleWarn('[InvalidArg] Function=associate'); + } + }; + Association.prototype.onchange = function (handler) { + if (handler) { + this.m_onchangeHandlers.push(handler); + } + }; + Object.defineProperty(Association.prototype, "mappings", { + get: function () { + return this.m_mappings; + }, + enumerable: true, + configurable: true + }); + return Association; + }()); + OfficeExt.Association = Association; +})(OfficeExt || (OfficeExt = {})); +var CustomFunctionMappings = window.CustomFunctionMappings || {}; +var CustomFunctions; +(function (CustomFunctions) { + function delayInitialization() { + CustomFunctionMappings['__delay__'] = true; + } + CustomFunctions.delayInitialization = delayInitialization; + ; + CustomFunctions._association = new OfficeExt.Association(); + function associate() { + CustomFunctions._association.associate.apply(CustomFunctions._association, arguments); + delete CustomFunctionMappings['__delay__']; + } + CustomFunctions.associate = associate; + ; +})(CustomFunctions || (CustomFunctions = {})); +(function (Office) { + var actions; + (function (actions) { + actions._association = new OfficeExt.Association(); + function associate() { + actions._association.associate.apply(actions._association, arguments); + } + actions.associate = associate; + ; + })(actions = Office.actions || (Office.actions = {})); +})(Office || (Office = {})); +var g_isExpEnabled = g_isExpEnabled || false; +var g_isOfflineLibrary = g_isOfflineLibrary || false; +(function () { + var previousConstantNames = OSF.ConstantNames || {}; + OSF.ConstantNames = { + FileVersion: "16.0.16801.10000", + OfficeJS: "office.js", + OfficeDebugJS: "office.debug.js", + DefaultLocale: "en-us", + LocaleStringLoadingTimeout: 5000, + MicrosoftAjaxId: "MSAJAX", + OfficeStringsId: "OFFICESTRINGS", + OfficeJsId: "OFFICEJS", + HostFileId: "HOST", + O15MappingId: "O15Mapping", + OfficeStringJS: "office_strings.debug.js", + O15InitHelper: "o15apptofilemappingtable.debug.js", + SupportedLocales: OSF.SupportedLocales, + AssociatedLocales: OSF.AssociatedLocales, + ExperimentScriptSuffix: "experiment" + }; + for (var key in previousConstantNames) { + OSF.ConstantNames[key] = previousConstantNames[key]; + } +})(); +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { +}; +OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication() { +}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { +}; +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { +}; +OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() { +}; +OSF.HostInfoFlags = { + SharedApp: 1, + CustomFunction: 2, + ProtectedDocDisable: 4, + ExperimentJsEnabled: 8, + PublicAddin: 0x10, + IsMos: 0x40, + IsMonarch: 0x80 +}; +OSF._OfficeAppFactory = (function OSF__OfficeAppFactory() { + var _setNamespace = function OSF_OUtil$_setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name] = {}; + } + }; + _setNamespace("Office", window); + _setNamespace("Microsoft", window); + _setNamespace("Office", Microsoft); + _setNamespace("WebExtension", Microsoft.Office); + if (typeof (window.Office) === 'object') { + for (var p in window.Office) { + if (window.Office.hasOwnProperty(p)) { + Microsoft.Office.WebExtension[p] = window.Office[p]; + } + } + } + window.Office = Microsoft.Office.WebExtension; + var initialDisplayModeMappings = { + 0: "Unknown", + 1: "Hidden", + 2: "Taskpane", + 3: "Dialog" + }; + Microsoft.Office.WebExtension.PlatformType = { + PC: "PC", + OfficeOnline: "OfficeOnline", + Mac: "Mac", + iOS: "iOS", + Android: "Android", + Universal: "Universal" + }; + Microsoft.Office.WebExtension.HostType = { + Word: "Word", + Excel: "Excel", + PowerPoint: "PowerPoint", + Outlook: "Outlook", + OneNote: "OneNote", + Project: "Project", + Access: "Access", + Visio: "Visio" + }; + var _context = {}; + var _settings = {}; + var _hostFacade = {}; + var _WebAppState = { id: null, webAppUrl: null, conversationID: null, clientEndPoint: null, wnd: window.parent, focused: false }; + var _hostInfo = { isO15: true, isRichClient: true, hostType: "", hostPlatform: "", hostSpecificFileVersion: "", hostLocale: "", osfControlAppCorrelationId: "", isDialog: false, disableLogging: false, flags: 0 }; + var _isLoggingAllowed = true; + var _initializationHelper = {}; + var _appInstanceId = null; + var _isOfficeJsLoaded = false; + var _officeOnReadyPendingResolves = []; + var _isOfficeOnReadyCalled = false; + var _officeOnReadyHostAndPlatformInfo = { host: null, platform: null, addin: null }; + var _loadScriptHelper = new ScriptLoading.LoadScriptHelper({ + OfficeJS: OSF.ConstantNames.OfficeJS, + OfficeDebugJS: OSF.ConstantNames.OfficeDebugJS + }); + if (window.performance && window.performance.now) { + _loadScriptHelper.logScriptLoading(OSF.ConstantNames.OfficeJsId, -1, window.performance.now()); + } + var _windowLocationHash = window.location.hash; + var _windowLocationSearch = window.location.search; + var _windowName = window.name; + var setOfficeJsAsLoadedAndDispatchPendingOnReadyCallbacks = function (_a) { + var host = _a.host, platform = _a.platform, addin = _a.addin; + _isOfficeJsLoaded = true; + if (typeof OSFPerformance !== "undefined") { + OSFPerformance.officeOnReady = OSFPerformance.now(); + } + _officeOnReadyHostAndPlatformInfo = { host: host, platform: platform, addin: addin }; + while (_officeOnReadyPendingResolves.length > 0) { + _officeOnReadyPendingResolves.shift()(_officeOnReadyHostAndPlatformInfo); + } + }; + Microsoft.Office.WebExtension.FeatureGates = {}; + Microsoft.Office.WebExtension.sendTelemetryEvent = function Microsoft_Office_WebExtension_sendTelemetryEvent(telemetryEvent) { + OTel.OTelLogger.sendTelemetryEvent(telemetryEvent); + }; + Microsoft.Office.WebExtension.telemetrySink = OTel.OTelLogger; + Microsoft.Office.WebExtension.onReadyInternal = function Microsoft_Office_WebExtension_onReadyInternal(callback) { + if (_isOfficeJsLoaded) { + var host_1 = _officeOnReadyHostAndPlatformInfo.host, platform_1 = _officeOnReadyHostAndPlatformInfo.platform, addin_1 = _officeOnReadyHostAndPlatformInfo.addin; + if (callback) { + var result = callback({ host: host_1, platform: platform_1, addin: addin_1 }); + if (result && result.then && typeof result.then === "function") { + return result.then(function () { return Office.Promise.resolve({ host: host_1, platform: platform_1, addin: addin_1 }); }); + } + } + return Office.Promise.resolve({ host: host_1, platform: platform_1, addin: addin_1 }); + } + if (callback) { + return new Office.Promise(function (resolve) { + _officeOnReadyPendingResolves.push(function (receivedHostAndPlatform) { + var result = callback(receivedHostAndPlatform); + if (result && result.then && typeof result.then === "function") { + return result.then(function () { return resolve(receivedHostAndPlatform); }); + } + resolve(receivedHostAndPlatform); + }); + }); + } + return new Office.Promise(function (resolve) { + _officeOnReadyPendingResolves.push(resolve); + }); + }; + Microsoft.Office.WebExtension.onReady = function Microsoft_Office_WebExtension_onReady(callback) { + _isOfficeOnReadyCalled = true; + return Microsoft.Office.WebExtension.onReadyInternal(callback); + }; + var getQueryStringValue = function OSF__OfficeAppFactory$getQueryStringValue(paramName) { + var hostInfoValue; + var searchString = window.location.search; + if (searchString) { + var hostInfoParts = searchString.split(paramName + "="); + if (hostInfoParts.length > 1) { + var hostInfoValueRestString = hostInfoParts[1]; + var separatorRegex = new RegExp("[&#]", "g"); + var hostInfoValueParts = hostInfoValueRestString.split(separatorRegex); + if (hostInfoValueParts.length > 0) { + hostInfoValue = hostInfoValueParts[0]; + } + } + } + return hostInfoValue; + }; + var compareVersions = function _compareVersions(version1, version2) { + var splitVersion1 = version1.split("."); + var splitVersion2 = version2.split("."); + var iter; + for (iter in splitVersion1) { + if (parseInt(splitVersion1[iter]) < parseInt(splitVersion2[iter])) { + return false; + } + else if (parseInt(splitVersion1[iter]) > parseInt(splitVersion2[iter])) { + return true; + } + } + return false; + }; + var shouldLoadOldOutlookMacJs = function _shouldLoadOldOutlookMacJs() { + try { + var versionToUseNewJS = "15.30.1128.0"; + var currentHostVersion = window.external.GetContext().GetHostFullVersion(); + } + catch (ex) { + return false; + } + return !!compareVersions(versionToUseNewJS, currentHostVersion); + }; + var _retrieveLoggingAllowed = function OSF__OfficeAppFactory$_retrieveLoggingAllowed() { + _isLoggingAllowed = true; + try { + if (_hostInfo.disableLogging) { + _isLoggingAllowed = false; + return; + } + window.external = window.external || {}; + if (typeof window.external.GetLoggingAllowed === 'undefined') { + _isLoggingAllowed = true; + } + else { + _isLoggingAllowed = window.external.GetLoggingAllowed(); + } + } + catch (Exception) { + } + }; + var _retrieveHostInfo = function OSF__OfficeAppFactory$_retrieveHostInfo() { + var hostInfoParaName = "_host_Info"; + var hostInfoValue = null; + try { + window.external = window.external || {}; + if (typeof agaveHost !== "undefined" && agaveHost.GetHostInfo) { + window.external.GetHostInfo = function () { + return agaveHost.GetHostInfo(); + }; + } + var sandboxHostInfo = window.external.GetHostInfo(); + if (sandboxHostInfo == "isDialog") { + _hostInfo.isO15 = true; + _hostInfo.isDialog = true; + } + else if (sandboxHostInfo.toLowerCase().indexOf("mac") !== -1 && sandboxHostInfo.toLowerCase().indexOf("outlook") !== -1 && shouldLoadOldOutlookMacJs()) { + _hostInfo.isO15 = true; + } + else { + var hostInfoParts = sandboxHostInfo.split(hostInfoParaName + "="); + if (hostInfoParts.length > 1) { + hostInfoValue = hostInfoParts[1]; + } + else { + hostInfoValue = sandboxHostInfo; + } + } + } + catch (Exception) { + } + if (!hostInfoValue) { + hostInfoValue = getQueryStringValue(hostInfoParaName); + if (!hostInfoValue) { + try { + var windowNameObj = JSON.parse(_windowName); + hostInfoValue = windowNameObj ? windowNameObj["hostInfo"] : null; + } + catch (Exception) { + } + } + } + var getSessionStorage = function OSF__OfficeAppFactory$_retrieveHostInfo$getSessionStorage() { + var osfSessionStorage = null; + try { + if (window.sessionStorage) { + osfSessionStorage = window.sessionStorage; + } + } + catch (ex) { + } + return osfSessionStorage; + }; + var osfSessionStorage = getSessionStorage(); + if (!hostInfoValue && osfSessionStorage && osfSessionStorage.getItem("hostInfoValue")) { + hostInfoValue = osfSessionStorage.getItem("hostInfoValue"); + } + if (hostInfoValue) { + hostInfoValue = decodeURIComponent(hostInfoValue); + _hostInfo.isO15 = false; + var items = hostInfoValue.split("$"); + if (typeof items[2] == "undefined") { + items = hostInfoValue.split("|"); + } + _hostInfo.hostType = (typeof items[0] == "undefined") ? "" : items[0].toLowerCase(); + _hostInfo.hostPlatform = (typeof items[1] == "undefined") ? "" : items[1].toLowerCase(); + ; + _hostInfo.hostSpecificFileVersion = (typeof items[2] == "undefined") ? "" : items[2].toLowerCase(); + _hostInfo.hostLocale = (typeof items[3] == "undefined") ? "" : items[3].toLowerCase(); + _hostInfo.osfControlAppCorrelationId = (typeof items[4] == "undefined") ? "" : items[4]; + if (_hostInfo.osfControlAppCorrelationId == "telemetry") { + _hostInfo.osfControlAppCorrelationId = ""; + } + _hostInfo.isDialog = (((typeof items[5]) != "undefined") && items[5] == "isDialog") ? true : false; + _hostInfo.disableLogging = (((typeof items[6]) != "undefined") && items[6] == "disableLogging") ? true : false; + _hostInfo.flags = (((typeof items[7]) === "string") && items[7].length > 0) ? parseInt(items[7]) : 0; + if (g_isOfflineLibrary) { + g_isExpEnabled = false; + } + else { + g_isExpEnabled = g_isExpEnabled || !!(_hostInfo.flags & OSF.HostInfoFlags.ExperimentJsEnabled); + } + var hostSpecificFileVersionValue = parseFloat(_hostInfo.hostSpecificFileVersion); + var fallbackVersion = OSF.HostSpecificFileVersionDefault; + if (OSF.HostSpecificFileVersionMap[_hostInfo.hostType] && OSF.HostSpecificFileVersionMap[_hostInfo.hostType][_hostInfo.hostPlatform]) { + fallbackVersion = OSF.HostSpecificFileVersionMap[_hostInfo.hostType][_hostInfo.hostPlatform]; + } + if (hostSpecificFileVersionValue > parseFloat(fallbackVersion)) { + _hostInfo.hostSpecificFileVersion = fallbackVersion; + } + if (osfSessionStorage) { + try { + osfSessionStorage.setItem("hostInfoValue", hostInfoValue); + } + catch (e) { + } + } + } + else { + _hostInfo.isO15 = true; + _hostInfo.hostLocale = getQueryStringValue("locale"); + } + }; + var getAppContextAsync = function OSF__OfficeAppFactory$getAppContextAsync(wnd, gotAppContext) { + if (OSF.AppTelemetry && OSF.AppTelemetry.logAppCommonMessage) { + OSF.AppTelemetry.logAppCommonMessage("getAppContextAsync starts"); + } + _initializationHelper.getAppContext(wnd, gotAppContext); + }; + var initialize = function OSF__OfficeAppFactory$initialize() { + _retrieveHostInfo(); + _retrieveLoggingAllowed(); + if (_hostInfo.hostPlatform == "web" && _hostInfo.isDialog && window == window.top && window.opener == null) { + window.open('', '_self', ''); + window.close(); + } + if ((_hostInfo.flags & (OSF.HostInfoFlags.SharedApp | OSF.HostInfoFlags.CustomFunction)) !== 0) { + if (typeof (window.Promise) === 'undefined') { + window.Promise = window.Office.Promise; + } + } + _loadScriptHelper.setAppCorrelationId(_hostInfo.osfControlAppCorrelationId); + var basePath = _loadScriptHelper.getOfficeJsBasePath(); + var requiresMsAjax = false; + if (!basePath) + throw "Office Web Extension script library file name should be " + OSF.ConstantNames.OfficeJS + " or " + OSF.ConstantNames.OfficeDebugJS + "."; + var isMicrosftAjaxLoaded = function OSF$isMicrosftAjaxLoaded() { + if ((typeof (Sys) !== 'undefined' && typeof (Type) !== 'undefined' && + Sys.StringBuilder && typeof (Sys.StringBuilder) === "function" && + Type.registerNamespace && typeof (Type.registerNamespace) === "function" && + Type.registerClass && typeof (Type.registerClass) === "function") || + (typeof (OfficeExt) !== "undefined" && OfficeExt.MsAjaxError)) { + return true; + } + else { + return false; + } + }; + var officeStrings = null; + var loadLocaleStrings = function OSF__OfficeAppFactory_initialize$loadLocaleStrings(appLocale) { + var fallbackLocaleTried = false; + var loadLocaleStringCallback = function OSF__OfficeAppFactory_initialize$loadLocaleStringCallback() { + if (typeof Strings == 'undefined' || typeof Strings.OfficeOM == 'undefined') { + if (!fallbackLocaleTried) { + fallbackLocaleTried = true; + var fallbackLocaleStringFile = basePath + OSF.ConstantNames.DefaultLocale + "/" + OSF.ConstantNames.OfficeStringJS; + _loadScriptHelper.loadScript(fallbackLocaleStringFile, OSF.ConstantNames.OfficeStringsId, loadLocaleStringCallback, true, OSF.ConstantNames.LocaleStringLoadingTimeout); + return false; + } + else { + throw "Neither the locale, " + appLocale.toLowerCase() + ", provided by the host app nor the fallback locale " + OSF.ConstantNames.DefaultLocale + " are supported."; + } + } + else { + fallbackLocaleTried = false; + officeStrings = Strings.OfficeOM; + } + }; + if (!isMicrosftAjaxLoaded()) { + window.Type = Function; + Type.registerNamespace = function (ns) { + window[ns] = window[ns] || {}; + }; + Type.prototype.registerClass = function (cls) { + cls = {}; + }; + } + var localeStringFile = basePath + OSF.getSupportedLocale(appLocale, OSF.ConstantNames.DefaultLocale) + "/" + OSF.ConstantNames.OfficeStringJS; + _loadScriptHelper.loadScript(localeStringFile, OSF.ConstantNames.OfficeStringsId, loadLocaleStringCallback, true, OSF.ConstantNames.LocaleStringLoadingTimeout); + }; + var onAppCodeAndMSAjaxReady = function OSF__OfficeAppFactory_initialize$onAppCodeAndMSAjaxReady(loadSuccess) { + if (loadSuccess) { + _initializationHelper = new OSF.InitializationHelper(_hostInfo, _WebAppState, _context, _settings, _hostFacade); + if (_hostInfo.hostPlatform == "web" && _initializationHelper.saveAndSetDialogInfo) { + _initializationHelper.saveAndSetDialogInfo(getQueryStringValue("_host_Info")); + } + _initializationHelper.setAgaveHostCommunication(); + if (typeof OSFPerformance !== "undefined") { + OSFPerformance.getAppContextStart = OSFPerformance.now(); + } + getAppContextAsync(_WebAppState.wnd, function (appContext) { + if (typeof OSFPerformance !== "undefined") { + OSFPerformance.getAppContextEnd = OSFPerformance.now(); + } + if (OSF.AppTelemetry && OSF.AppTelemetry.logAppCommonMessage) { + OSF.AppTelemetry.logAppCommonMessage("getAppContextAsync callback start"); + } + _appInstanceId = appContext._appInstanceId; + if (appContext.get_featureGates) { + var featureGates = appContext.get_featureGates(); + if (featureGates) { + Microsoft.Office.WebExtension.FeatureGates = featureGates; + } + } + var updateVersionInfo = function updateVersionInfo() { + var hostVersionItems = _hostInfo.hostSpecificFileVersion.split("."); + if (appContext.get_appMinorVersion) { + var isIOS = _hostInfo.hostPlatform == "ios"; + if (!isIOS) { + if (isNaN(appContext.get_appMinorVersion())) { + appContext._appMinorVersion = parseInt(hostVersionItems[1]); + } + else if (hostVersionItems.length > 1 && !isNaN(Number(hostVersionItems[1]))) { + appContext._appMinorVersion = parseInt(hostVersionItems[1]); + } + } + } + if (_hostInfo.isDialog) { + appContext._isDialog = _hostInfo.isDialog; + } + }; + updateVersionInfo(); + var appReady = function appReady() { + _initializationHelper.prepareApiSurface && _initializationHelper.prepareApiSurface(appContext); + _loadScriptHelper.waitForFunction(function () { return (Microsoft.Office.WebExtension.initialize != undefined || _isOfficeOnReadyCalled); }, function (initializedDeclaredOrOfficeOnReadyCalled) { + if (initializedDeclaredOrOfficeOnReadyCalled) { + if (_initializationHelper.prepareApiSurface) { + if (Microsoft.Office.WebExtension.initialize) { + Microsoft.Office.WebExtension.initialize(_initializationHelper.getInitializationReason(appContext)); + } + } + else { + if (!Microsoft.Office.WebExtension.initialize) { + Microsoft.Office.WebExtension.initialize = function () { }; + } + _initializationHelper.prepareRightBeforeWebExtensionInitialize(appContext); + } + _initializationHelper.prepareRightAfterWebExtensionInitialize && _initializationHelper.prepareRightAfterWebExtensionInitialize(appContext); + var appNumber = appContext.get_appName(); + var addinInfo = null; + if ((_hostInfo.flags & OSF.HostInfoFlags.SharedApp) !== 0) { + addinInfo = { + visibilityMode: initialDisplayModeMappings[(appContext.get_initialDisplayMode && typeof appContext.get_initialDisplayMode === 'function') ? appContext.get_initialDisplayMode() : 0] + }; + } + setOfficeJsAsLoadedAndDispatchPendingOnReadyCallbacks({ + host: OfficeExt.HostName.Host.getInstance().getHost(appNumber), + platform: OfficeExt.HostName.Host.getInstance().getPlatform(appNumber), + addin: addinInfo + }); + } + else { + throw new Error("Office.js has not fully loaded. Your app must call \"Office.onReady()\" as part of it's loading sequence (or set the \"Office.initialize\" function). If your app has this functionality, try reloading this page."); + } + }, 400, 50); + }; + if (!_loadScriptHelper.isScriptLoading(OSF.ConstantNames.OfficeStringsId)) { + loadLocaleStrings(appContext.get_appUILocale()); + } + _loadScriptHelper.waitForScripts([OSF.ConstantNames.OfficeStringsId], function () { + if (officeStrings && !Strings.OfficeOM) { + Strings.OfficeOM = officeStrings; + } + _initializationHelper.loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath); + if (typeof OSFPerformance !== "undefined") { + OSFPerformance.createOMEnd = OSFPerformance.now(); + } + }); + }); + if (_hostInfo.isO15) { + var wacXdmInfoIsMissing = (OSF.OUtil.parseXdmInfo() == null); + if (wacXdmInfoIsMissing) { + var isPlainBrowser = true; + if (window.external && typeof window.external.GetContext !== 'undefined') { + try { + window.external.GetContext(); + isPlainBrowser = false; + } + catch (e) { + } + } + if (typeof OsfOptOut === "undefined" && isPlainBrowser && window.top !== window.self) { + if (window.console && window.console.log) { + window.console.log("The add-in is not hosted in plain browser top window."); + } + window.location.href = "about:blank"; + } + if (isPlainBrowser) { + setOfficeJsAsLoadedAndDispatchPendingOnReadyCallbacks({ + host: null, + platform: null, + addin: null + }); + } + } + } + } + else { + var errorMsg = "MicrosoftAjax.js is not loaded successfully."; + if (OSF.AppTelemetry && OSF.AppTelemetry.logAppException) { + OSF.AppTelemetry.logAppException(errorMsg); + } + throw errorMsg; + } + }; + var onAppCodeReady = function OSF__OfficeAppFactory_initialize$onAppCodeReady() { + if (OSF.AppTelemetry && OSF.AppTelemetry.setOsfControlAppCorrelationId) { + OSF.AppTelemetry.setOsfControlAppCorrelationId(_hostInfo.osfControlAppCorrelationId); + } + if (_loadScriptHelper.isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId)) { + _loadScriptHelper.waitForScripts([OSF.ConstantNames.MicrosoftAjaxId], onAppCodeAndMSAjaxReady); + } + else { + _loadScriptHelper.waitForFunction(isMicrosftAjaxLoaded, onAppCodeAndMSAjaxReady, 500, 100); + } + }; + if (_hostInfo.isO15) { + _loadScriptHelper.loadScript(basePath + OSF.ConstantNames.O15InitHelper, OSF.ConstantNames.O15MappingId, onAppCodeReady); + } + else { + var hostTypeLowerCase = _hostInfo.hostType.toLowerCase(); + var hostPlatformLowerCase = _hostInfo.hostPlatform.toLowerCase(); + var versionRegExp = new RegExp("^\\d\\d\[.\]\\d\\d$"); + if ((OSF.HostSpecificFileVersionMap[hostTypeLowerCase]) == null || + (OSF.HostSpecificFileVersionMap[hostTypeLowerCase][hostPlatformLowerCase]) == null || + (!versionRegExp.test(_hostInfo.hostSpecificFileVersion))) { + throw "hostInfo validation failed"; + } + var hostSpecificFileName; + hostSpecificFileName = ([ + _hostInfo.hostType, + _hostInfo.hostPlatform, + _hostInfo.hostSpecificFileVersion, + OSF.ConstantNames.HostFileScriptSuffix || null, + ] + .filter(function (part) { return part != null; }) + .join("-")) + + + ".debug.js"; + _loadScriptHelper.loadScript(basePath + hostSpecificFileName.toLowerCase(), OSF.ConstantNames.HostFileId, onAppCodeReady); + if (typeof OSFPerformance !== "undefined") { + OSFPerformance.hostSpecificFileName = hostSpecificFileName.toLowerCase(); + } + } + if (_hostInfo.hostLocale) { + loadLocaleStrings(_hostInfo.hostLocale); + } + if (requiresMsAjax && !isMicrosftAjaxLoaded()) { + var msAjaxCDNPath = (window.location.protocol.toLowerCase() === 'https:' ? 'https:' : 'http:') + '//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js'; + _loadScriptHelper.loadScriptParallel(msAjaxCDNPath, OSF.ConstantNames.MicrosoftAjaxId); + } + window.confirm = function OSF__OfficeAppFactory_initialize$confirm(message) { + throw new Error('Function window.confirm is not supported.'); + }; + window.alert = function OSF__OfficeAppFactory_initialize$alert(message) { + throw new Error('Function window.alert is not supported.'); + }; + window.prompt = function OSF__OfficeAppFactory_initialize$prompt(message, defaultvalue) { + throw new Error('Function window.prompt is not supported.'); + }; + var isOutlookAndroid = _hostInfo.hostType == "outlook" && _hostInfo.hostPlatform == "android"; + if (!isOutlookAndroid) { + window.history.replaceState = null; + window.history.pushState = null; + } + }; + initialize(); + if (window.addEventListener) { + window.addEventListener('DOMContentLoaded', function (event) { + Microsoft.Office.WebExtension.onReadyInternal(function () { + if (typeof OSFPerfUtil !== 'undefined') { + OSFPerfUtil.sendPerformanceTelemetry(); + } + }); + }); + } + return { + getId: function OSF__OfficeAppFactory$getId() { return _WebAppState.id; }, + getClientEndPoint: function OSF__OfficeAppFactory$getClientEndPoint() { return _WebAppState.clientEndPoint; }, + getContext: function OSF__OfficeAppFactory$getContext() { return _context; }, + setContext: function OSF__OfficeAppFactory$setContext(context) { _context = context; }, + getHostInfo: function OSF_OfficeAppFactory$getHostInfo() { return _hostInfo; }, + getLoggingAllowed: function OSF_OfficeAppFactory$getLoggingAllowed() { return _isLoggingAllowed; }, + getHostFacade: function OSF__OfficeAppFactory$getHostFacade() { return _hostFacade; }, + setHostFacade: function setHostFacade(hostFacade) { _hostFacade = hostFacade; }, + getInitializationHelper: function OSF__OfficeAppFactory$getInitializationHelper() { return _initializationHelper; }, + getCachedSessionSettingsKey: function OSF__OfficeAppFactory$getCachedSessionSettingsKey() { + return (_WebAppState.conversationID != null ? _WebAppState.conversationID : _appInstanceId) + "CachedSessionSettings"; + }, + getWebAppState: function OSF__OfficeAppFactory$getWebAppState() { return _WebAppState; }, + getWindowLocationHash: function OSF__OfficeAppFactory$getHash() { return _windowLocationHash; }, + getWindowLocationSearch: function OSF__OfficeAppFactory$getSearch() { return _windowLocationSearch; }, + getLoadScriptHelper: function OSF__OfficeAppFactory$getLoadScriptHelper() { return _loadScriptHelper; }, + getWindowName: function OSF__OfficeAppFactory$getWindowName() { return _windowName; } + }; +})(); + + + +var oteljs = function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + i: moduleId, + l: !1, + exports: {} + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.l = !0, module.exports; + } + return __webpack_require__.m = modules, __webpack_require__.c = installedModules, + __webpack_require__.d = function(exports, name, getter) { + __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { + enumerable: !0, + get: getter + }); + }, __webpack_require__.r = function(exports) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(exports, "__esModule", { + value: !0 + }); + }, __webpack_require__.t = function(value, mode) { + if (1 & mode && (value = __webpack_require__(value)), 8 & mode) return value; + if (4 & mode && "object" == typeof value && value && value.__esModule) return value; + var ns = Object.create(null); + if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { + enumerable: !0, + value: value + }), 2 & mode && "string" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }, __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function() { + return module.default; + } : function() { + return module; + }; + return __webpack_require__.d(getter, "a", getter), getter; + }, __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 19); +}([ function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return makeBooleanDataField; + })), __webpack_require__.d(__webpack_exports__, "d", (function() { + return makeInt64DataField; + })), __webpack_require__.d(__webpack_exports__, "b", (function() { + return makeDoubleDataField; + })), __webpack_require__.d(__webpack_exports__, "e", (function() { + return makeStringDataField; + })), __webpack_require__.d(__webpack_exports__, "c", (function() { + return makeGuidDataField; + })); + var _DataFieldType__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3), _DataClassification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); + function makeBooleanDataField(name, value) { + return { + name: name, + dataType: _DataFieldType__WEBPACK_IMPORTED_MODULE_0__.a.Boolean, + value: value, + classification: _DataClassification__WEBPACK_IMPORTED_MODULE_1__.a.SystemMetadata + }; + } + function makeInt64DataField(name, value) { + return { + name: name, + dataType: _DataFieldType__WEBPACK_IMPORTED_MODULE_0__.a.Int64, + value: value, + classification: _DataClassification__WEBPACK_IMPORTED_MODULE_1__.a.SystemMetadata + }; + } + function makeDoubleDataField(name, value) { + return { + name: name, + dataType: _DataFieldType__WEBPACK_IMPORTED_MODULE_0__.a.Double, + value: value, + classification: _DataClassification__WEBPACK_IMPORTED_MODULE_1__.a.SystemMetadata + }; + } + function makeStringDataField(name, value) { + return { + name: name, + dataType: _DataFieldType__WEBPACK_IMPORTED_MODULE_0__.a.String, + value: value, + classification: _DataClassification__WEBPACK_IMPORTED_MODULE_1__.a.SystemMetadata + }; + } + function makeGuidDataField(name, value) { + return { + name: name, + dataType: _DataFieldType__WEBPACK_IMPORTED_MODULE_0__.a.Guid, + value: value, + classification: _DataClassification__WEBPACK_IMPORTED_MODULE_1__.a.SystemMetadata + }; + } +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "b", (function() { + return LogLevel; + })), __webpack_require__.d(__webpack_exports__, "a", (function() { + return Category; + })), __webpack_require__.d(__webpack_exports__, "e", (function() { + return onNotification; + })), __webpack_require__.d(__webpack_exports__, "d", (function() { + return logNotification; + })), __webpack_require__.d(__webpack_exports__, "c", (function() { + return logError; + })); + var LogLevel, Category, onNotificationEvent = new (__webpack_require__(10).a); + function onNotification() { + return onNotificationEvent; + } + function logNotification(level, category, message) { + onNotificationEvent.fireEvent({ + level: level, + category: category, + message: message + }); + } + function logError(category, message, error) { + logNotification(LogLevel.Error, category, (function() { + var errorMessage = error instanceof Error ? error.message : ""; + return message + ": " + errorMessage; + })); + } + !function(LogLevel) { + LogLevel[LogLevel.Error = 0] = "Error", LogLevel[LogLevel.Warning = 1] = "Warning", + LogLevel[LogLevel.Info = 2] = "Info", LogLevel[LogLevel.Verbose = 3] = "Verbose"; + }(LogLevel || (LogLevel = {})), function(Category) { + Category[Category.Core = 0] = "Core", Category[Category.Sink = 1] = "Sink", Category[Category.Transport = 2] = "Transport"; + }(Category || (Category = {})); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return addContractField; + })); + var _DataFieldHelper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); + function addContractField(dataFields, instanceName, contractName) { + dataFields.push(Object(_DataFieldHelper__WEBPACK_IMPORTED_MODULE_0__.e)("zC." + instanceName, contractName)); + } +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + var DataFieldType; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return DataFieldType; + })), function(DataFieldType) { + DataFieldType[DataFieldType.String = 0] = "String", DataFieldType[DataFieldType.Boolean = 1] = "Boolean", + DataFieldType[DataFieldType.Int64 = 2] = "Int64", DataFieldType[DataFieldType.Double = 3] = "Double", + DataFieldType[DataFieldType.Guid = 4] = "Guid"; + }(DataFieldType || (DataFieldType = {})); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + var DataClassification; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return DataClassification; + })), function(DataClassification) { + DataClassification[DataClassification.EssentialServiceMetadata = 1] = "EssentialServiceMetadata", + DataClassification[DataClassification.AccountData = 2] = "AccountData", DataClassification[DataClassification.SystemMetadata = 4] = "SystemMetadata", + DataClassification[DataClassification.OrganizationIdentifiableInformation = 8] = "OrganizationIdentifiableInformation", + DataClassification[DataClassification.EndUserIdentifiableInformation = 16] = "EndUserIdentifiableInformation", + DataClassification[DataClassification.CustomerContent = 32] = "CustomerContent", + DataClassification[DataClassification.AccessControl = 64] = "AccessControl"; + }(DataClassification || (DataClassification = {})); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + var SamplingPolicy, PersistencePriority, CostPriority, DataCategories, DiagnosticLevel; + __webpack_require__.d(__webpack_exports__, "e", (function() { + return SamplingPolicy; + })), __webpack_require__.d(__webpack_exports__, "d", (function() { + return PersistencePriority; + })), __webpack_require__.d(__webpack_exports__, "a", (function() { + return CostPriority; + })), __webpack_require__.d(__webpack_exports__, "b", (function() { + return DataCategories; + })), __webpack_require__.d(__webpack_exports__, "c", (function() { + return DiagnosticLevel; + })), function(SamplingPolicy) { + SamplingPolicy[SamplingPolicy.NotSet = 0] = "NotSet", SamplingPolicy[SamplingPolicy.Measure = 1] = "Measure", + SamplingPolicy[SamplingPolicy.Diagnostics = 2] = "Diagnostics", SamplingPolicy[SamplingPolicy.CriticalBusinessImpact = 191] = "CriticalBusinessImpact", + SamplingPolicy[SamplingPolicy.CriticalCensus = 192] = "CriticalCensus", SamplingPolicy[SamplingPolicy.CriticalExperimentation = 193] = "CriticalExperimentation", + SamplingPolicy[SamplingPolicy.CriticalUsage = 194] = "CriticalUsage"; + }(SamplingPolicy || (SamplingPolicy = {})), function(PersistencePriority) { + PersistencePriority[PersistencePriority.NotSet = 0] = "NotSet", PersistencePriority[PersistencePriority.Normal = 1] = "Normal", + PersistencePriority[PersistencePriority.High = 2] = "High"; + }(PersistencePriority || (PersistencePriority = {})), function(CostPriority) { + CostPriority[CostPriority.NotSet = 0] = "NotSet", CostPriority[CostPriority.Normal = 1] = "Normal", + CostPriority[CostPriority.High = 2] = "High"; + }(CostPriority || (CostPriority = {})), function(DataCategories) { + DataCategories[DataCategories.NotSet = 0] = "NotSet", DataCategories[DataCategories.SoftwareSetup = 1] = "SoftwareSetup", + DataCategories[DataCategories.ProductServiceUsage = 2] = "ProductServiceUsage", + DataCategories[DataCategories.ProductServicePerformance = 4] = "ProductServicePerformance", + DataCategories[DataCategories.DeviceConfiguration = 8] = "DeviceConfiguration", + DataCategories[DataCategories.InkingTypingSpeech = 16] = "InkingTypingSpeech"; + }(DataCategories || (DataCategories = {})), function(DiagnosticLevel) { + DiagnosticLevel[DiagnosticLevel.ReservedDoNotUse = 0] = "ReservedDoNotUse", DiagnosticLevel[DiagnosticLevel.BasicEvent = 10] = "BasicEvent", + DiagnosticLevel[DiagnosticLevel.FullEvent = 100] = "FullEvent", DiagnosticLevel[DiagnosticLevel.NecessaryServiceDataEvent = 110] = "NecessaryServiceDataEvent", + DiagnosticLevel[DiagnosticLevel.AlwaysOnNecessaryServiceDataEvent = 120] = "AlwaysOnNecessaryServiceDataEvent"; + }(DiagnosticLevel || (DiagnosticLevel = {})); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return Contracts; + })); + var officeeventschema_tml_Result, officeeventschema_tml_Activity, Activity, officeeventschema_tml_Host, officeeventschema_tml_User, officeeventschema_tml_SDX, officeeventschema_tml_Funnel, officeeventschema_tml_UserAction, Office_System_Error_Error, DataFieldHelper = __webpack_require__(0), Contract = __webpack_require__(2); + (officeeventschema_tml_Result || (officeeventschema_tml_Result = {})).getFields = function(instanceName, contract) { + var dataFields = []; + return dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Code", contract.code)), + void 0 !== contract.type && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Type", contract.type)), + void 0 !== contract.tag && dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Tag", contract.tag)), + void 0 !== contract.isExpected && dataFields.push(Object(DataFieldHelper.a)(instanceName + ".IsExpected", contract.isExpected)), + Object(Contract.a)(dataFields, instanceName, "Office.System.Result"), dataFields; + }, (Activity = officeeventschema_tml_Activity || (officeeventschema_tml_Activity = {})).contractName = "Office.System.Activity", + Activity.getFields = function(contract) { + var dataFields = []; + return void 0 !== contract.cV && dataFields.push(Object(DataFieldHelper.e)("Activity.CV", contract.cV)), + dataFields.push(Object(DataFieldHelper.d)("Activity.Duration", contract.duration)), + dataFields.push(Object(DataFieldHelper.d)("Activity.Count", contract.count)), dataFields.push(Object(DataFieldHelper.d)("Activity.AggMode", contract.aggMode)), + void 0 !== contract.success && dataFields.push(Object(DataFieldHelper.a)("Activity.Success", contract.success)), + void 0 !== contract.result && dataFields.push.apply(dataFields, officeeventschema_tml_Result.getFields("Activity.Result", contract.result)), + Object(Contract.a)(dataFields, "Activity", Activity.contractName), dataFields; + }, (officeeventschema_tml_Host || (officeeventschema_tml_Host = {})).getFields = function(instanceName, contract) { + var dataFields = []; + return void 0 !== contract.id && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Id", contract.id)), + void 0 !== contract.version && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Version", contract.version)), + void 0 !== contract.sessionId && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".SessionId", contract.sessionId)), + Object(Contract.a)(dataFields, instanceName, "Office.System.Host"), dataFields; + }, (officeeventschema_tml_User || (officeeventschema_tml_User = {})).getFields = function(instanceName, contract) { + var dataFields = []; + return void 0 !== contract.alias && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Alias", contract.alias)), + void 0 !== contract.primaryIdentityHash && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".PrimaryIdentityHash", contract.primaryIdentityHash)), + void 0 !== contract.primaryIdentitySpace && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".PrimaryIdentitySpace", contract.primaryIdentitySpace)), + void 0 !== contract.tenantId && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".TenantId", contract.tenantId)), + void 0 !== contract.tenantGroup && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".TenantGroup", contract.tenantGroup)), + void 0 !== contract.isAnonymous && dataFields.push(Object(DataFieldHelper.a)(instanceName + ".IsAnonymous", contract.isAnonymous)), + Object(Contract.a)(dataFields, instanceName, "Office.System.User"), dataFields; + }, (officeeventschema_tml_SDX || (officeeventschema_tml_SDX = {})).getFields = function(instanceName, contract) { + var dataFields = []; + return void 0 !== contract.id && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Id", contract.id)), + void 0 !== contract.version && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Version", contract.version)), + void 0 !== contract.instanceId && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".InstanceId", contract.instanceId)), + void 0 !== contract.name && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Name", contract.name)), + void 0 !== contract.marketplaceType && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".MarketplaceType", contract.marketplaceType)), + void 0 !== contract.sessionId && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".SessionId", contract.sessionId)), + void 0 !== contract.browserToken && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".BrowserToken", contract.browserToken)), + void 0 !== contract.osfRuntimeVersion && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".OsfRuntimeVersion", contract.osfRuntimeVersion)), + void 0 !== contract.officeJsVersion && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".OfficeJsVersion", contract.officeJsVersion)), + void 0 !== contract.hostJsVersion && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".HostJsVersion", contract.hostJsVersion)), + void 0 !== contract.assetId && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".AssetId", contract.assetId)), + void 0 !== contract.providerName && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".ProviderName", contract.providerName)), + void 0 !== contract.type && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Type", contract.type)), + Object(Contract.a)(dataFields, instanceName, "Office.System.SDX"), dataFields; + }, (officeeventschema_tml_Funnel || (officeeventschema_tml_Funnel = {})).getFields = function(instanceName, contract) { + var dataFields = []; + return void 0 !== contract.name && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Name", contract.name)), + void 0 !== contract.state && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".State", contract.state)), + Object(Contract.a)(dataFields, instanceName, "Office.System.Funnel"), dataFields; + }, (officeeventschema_tml_UserAction || (officeeventschema_tml_UserAction = {})).getFields = function(instanceName, contract) { + var dataFields = []; + return void 0 !== contract.id && dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Id", contract.id)), + void 0 !== contract.name && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".Name", contract.name)), + void 0 !== contract.commandSurface && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".CommandSurface", contract.commandSurface)), + void 0 !== contract.parentName && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".ParentName", contract.parentName)), + void 0 !== contract.triggerMethod && dataFields.push(Object(DataFieldHelper.e)(instanceName + ".TriggerMethod", contract.triggerMethod)), + void 0 !== contract.timeOffsetMs && dataFields.push(Object(DataFieldHelper.d)(instanceName + ".TimeOffsetMs", contract.timeOffsetMs)), + Object(Contract.a)(dataFields, instanceName, "Office.System.UserAction"), dataFields; + }, function(Error) { + Error.getFields = function(instanceName, contract) { + var dataFields = []; + return dataFields.push(Object(DataFieldHelper.e)(instanceName + ".ErrorGroup", contract.errorGroup)), + dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Tag", contract.tag)), + void 0 !== contract.code && dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Code", contract.code)), + void 0 !== contract.id && dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Id", contract.id)), + void 0 !== contract.count && dataFields.push(Object(DataFieldHelper.d)(instanceName + ".Count", contract.count)), + Object(Contract.a)(dataFields, instanceName, "Office.System.Error"), dataFields; + }; + }(Office_System_Error_Error || (Office_System_Error_Error = {})); + var Contracts, _Activity = officeeventschema_tml_Activity, _Result = officeeventschema_tml_Result, _Error = Office_System_Error_Error, _Funnel = officeeventschema_tml_Funnel, _Host = officeeventschema_tml_Host, _SDX = officeeventschema_tml_SDX, _UserAction = officeeventschema_tml_UserAction, _User = officeeventschema_tml_User; + !function(Contracts) { + !function(Office) { + !function(System) { + System.Activity = _Activity, System.Result = _Result, System.Error = _Error, System.Funnel = _Funnel, + System.Host = _Host, System.SDX = _SDX, System.User = _User, System.UserAction = _UserAction; + }(Office.System || (Office.System = {})); + }(Contracts.Office || (Contracts.Office = {})); + }(Contracts || (Contracts = {})); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + function cloneEvent(event) { + var localEvent = { + eventName: event.eventName, + eventFlags: event.eventFlags + }; + return event.telemetryProperties && (localEvent.telemetryProperties = { + ariaTenantToken: event.telemetryProperties.ariaTenantToken, + nexusTenantToken: event.telemetryProperties.nexusTenantToken + }), event.eventContract && (localEvent.eventContract = { + name: event.eventContract.name, + dataFields: event.eventContract.dataFields.slice() + }), localEvent.dataFields = event.dataFields ? event.dataFields.slice() : [], localEvent; + } + __webpack_require__.d(__webpack_exports__, "a", (function() { + return cloneEvent; + })); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "b", (function() { + return SuppressNexus; + })), __webpack_require__.d(__webpack_exports__, "a", (function() { + return SimpleTelemetryLogger_SimpleTelemetryLogger; + })); + var TokenType, TenantTokenManager_TenantTokenManager, TelemetryEvent = __webpack_require__(7), OTelNotifications = __webpack_require__(1); + !function(TokenType) { + TokenType[TokenType.Aria = 0] = "Aria", TokenType[TokenType.Nexus = 1] = "Nexus"; + }(TokenType || (TokenType = {})), function(TenantTokenManager) { + var ariaTokenMap = {}, nexusTokenMap = {}, tenantTokens = {}; + function setTenantTokens(tokenTree) { + if ("object" != typeof tokenTree) throw new Error("tokenTree must be an object"); + tenantTokens = function mergeTenantTokens(existingTokenTree, newTokenTree) { + if ("object" != typeof newTokenTree) return newTokenTree; + for (var _i = 0, _a = Object.keys(newTokenTree); _i < _a.length; _i++) { + var key = _a[_i]; + key in existingTokenTree && (existingTokenTree[key], 1) ? existingTokenTree[key] = mergeTenantTokens(existingTokenTree[key], newTokenTree[key]) : existingTokenTree[key] = newTokenTree[key]; + } + return existingTokenTree; + }(tenantTokens, tokenTree); + } + function getAriaTenantToken(eventName) { + if (ariaTokenMap[eventName]) return ariaTokenMap[eventName]; + var ariaToken = getTenantToken(eventName, TokenType.Aria); + return "string" == typeof ariaToken ? (ariaTokenMap[eventName] = ariaToken, ariaToken) : void 0; + } + function getNexusTenantToken(eventName) { + if (nexusTokenMap[eventName]) return nexusTokenMap[eventName]; + var nexusToken = getTenantToken(eventName, TokenType.Nexus); + return "number" == typeof nexusToken ? (nexusTokenMap[eventName] = nexusToken, nexusToken) : void 0; + } + function getTenantToken(eventName, tokenType) { + var pieces = eventName.split("."), node = tenantTokens, token = void 0; + if (node) { + for (var i = 0; i < pieces.length - 1; i++) node[pieces[i]] && (node = node[pieces[i]], + tokenType === TokenType.Aria && "string" == typeof node.ariaTenantToken ? token = node.ariaTenantToken : tokenType === TokenType.Nexus && "number" == typeof node.nexusTenantToken && (token = node.nexusTenantToken)); + return token; + } + } + TenantTokenManager.setTenantToken = function(namespace, ariaTenantToken, nexusTenantToken) { + var parts = namespace.split("."); + if (parts.length < 2 || "Office" !== parts[0]) Object(OTelNotifications.d)(OTelNotifications.b.Error, OTelNotifications.a.Core, (function() { + return "Invalid namespace: " + namespace; + })); else { + var leaf = Object.create(Object.prototype); + ariaTenantToken && (leaf.ariaTenantToken = ariaTenantToken), nexusTenantToken && (leaf.nexusTenantToken = nexusTenantToken); + var index, node = leaf; + for (index = parts.length - 1; index >= 0; --index) { + var parentNode = Object.create(Object.prototype); + parentNode[parts[index]] = node, node = parentNode; + } + setTenantTokens(node); + } + }, TenantTokenManager.setTenantTokens = setTenantTokens, TenantTokenManager.getTenantTokens = function(eventName) { + var ariaTenantToken = getAriaTenantToken(eventName), nexusTenantToken = getNexusTenantToken(eventName); + if (!nexusTenantToken || !ariaTenantToken) throw new Error("Could not find tenant token for " + eventName); + return { + ariaTenantToken: ariaTenantToken, + nexusTenantToken: nexusTenantToken + }; + }, TenantTokenManager.getAriaTenantToken = getAriaTenantToken, TenantTokenManager.getNexusTenantToken = getNexusTenantToken, + TenantTokenManager.clear = function() { + ariaTokenMap = {}, nexusTokenMap = {}, tenantTokens = {}; + }; + }(TenantTokenManager_TenantTokenManager || (TenantTokenManager_TenantTokenManager = {})); + var TelemetryEventValidator_TelemetryEventValidator, DataFieldType = __webpack_require__(3); + !function(TelemetryEventValidator) { + var StartsWithCapitalRegex = /^[A-Z][a-zA-Z0-9]*$/, AlphanumericRegex = /^[a-zA-Z0-9_\.]*$/; + function isNameValid(name) { + return void 0 !== name && AlphanumericRegex.test(name); + } + function validateDataField(dataField) { + if (!((dataFieldName = dataField.name) && isNameValid(dataFieldName) && dataFieldName.length + 5 < 100)) throw new Error("Invalid dataField name"); + var dataFieldName; + dataField.dataType === DataFieldType.a.Int64 && validateInt(dataField.value); + } + function validateInt(value) { + if ("number" != typeof value || !isFinite(value) || Math.floor(value) !== value || value < -9007199254740991 || value > 9007199254740991) throw new Error("Invalid integer " + JSON.stringify(value)); + } + TelemetryEventValidator.validateTelemetryEvent = function(event) { + if (!function(eventName) { + if (!eventName || eventName.length > 98) return !1; + var eventNamePieces = eventName.split("."), eventNodeName = eventNamePieces[eventNamePieces.length - 1]; + return function(eventNamePieces) { + return !!eventNamePieces && eventNamePieces.length >= 3 && "Office" === eventNamePieces[0]; + }(eventNamePieces) && (eventNode = eventNodeName, void 0 !== eventNode && StartsWithCapitalRegex.test(eventNode)); + var eventNode; + }(event.eventName)) throw new Error("Invalid eventName"); + if (event.eventContract && !isNameValid(event.eventContract.name)) throw new Error("Invalid eventContract"); + if (null != event.dataFields) for (var i = 0; i < event.dataFields.length; i++) validateDataField(event.dataFields[i]); + }, TelemetryEventValidator.validateInt = validateInt; + }(TelemetryEventValidator_TelemetryEventValidator || (TelemetryEventValidator_TelemetryEventValidator = {})); + var Event = __webpack_require__(10), DataFieldHelper = __webpack_require__(0), __assign = function() { + return (__assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) for (var p in s = arguments[i]) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]); + return t; + }).apply(this, arguments); + }, SuppressNexus = -1, SimpleTelemetryLogger_SimpleTelemetryLogger = function() { + function SimpleTelemetryLogger(parent, persistentDataFields, config) { + var _a, _b; + this.onSendEvent = new Event.a, this.persistentDataFields = [], this.config = config || {}, + parent && (this.onSendEvent = parent.onSendEvent, (_a = this.persistentDataFields).push.apply(_a, parent.persistentDataFields), + this.config = __assign(__assign({}, parent.getConfig()), this.config)), persistentDataFields && (_b = this.persistentDataFields).push.apply(_b, persistentDataFields); + } + return SimpleTelemetryLogger.prototype.sendTelemetryEvent = function(event) { + var localEvent; + try { + if (0 === this.onSendEvent.getListenerCount()) return void Object(OTelNotifications.d)(OTelNotifications.b.Warning, OTelNotifications.a.Core, (function() { + return "No telemetry sinks are attached."; + })); + localEvent = this.cloneEvent(event), this.processTelemetryEvent(localEvent); + } catch (error) { + return void Object(OTelNotifications.c)(OTelNotifications.a.Core, "SendTelemetryEvent", error); + } + try { + this.onSendEvent.fireEvent(localEvent); + } catch (_e) {} + }, SimpleTelemetryLogger.prototype.processTelemetryEvent = function(event) { + var _a; + event.telemetryProperties || (event.telemetryProperties = TenantTokenManager_TenantTokenManager.getTenantTokens(event.eventName)), + event.dataFields && (event.dataFields.unshift(Object(DataFieldHelper.e)("OTelJS.Version", "3.1.74")), + this.persistentDataFields && (_a = event.dataFields).unshift.apply(_a, this.persistentDataFields)), + this.config.disableValidation || TelemetryEventValidator_TelemetryEventValidator.validateTelemetryEvent(event); + }, SimpleTelemetryLogger.prototype.addSink = function(sink) { + this.onSendEvent.addListener((function(event) { + return sink.sendTelemetryEvent(event); + })); + }, SimpleTelemetryLogger.prototype.setTenantToken = function(namespace, ariaTenantToken, nexusTenantToken) { + TenantTokenManager_TenantTokenManager.setTenantToken(namespace, ariaTenantToken, nexusTenantToken); + }, SimpleTelemetryLogger.prototype.setTenantTokens = function(tokenTree) { + TenantTokenManager_TenantTokenManager.setTenantTokens(tokenTree); + }, SimpleTelemetryLogger.prototype.cloneEvent = function(event) { + return Object(TelemetryEvent.a)(event); + }, SimpleTelemetryLogger.prototype.getConfig = function() { + return this.config; + }, SimpleTelemetryLogger; + }(); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + var CorrelationVector; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return Activity_ActivityScope; + })), function(CorrelationVector) { + var baseHash, baseId = 0; + CorrelationVector.getNext = function() { + return void 0 === baseHash && (baseHash = function() { + for (var characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", result = [], i = 0; i < 22; i++) result.push(characters.charAt(Math.floor(Math.random() * characters.length))); + return result.join(""); + }()), new CV(baseHash, ++baseId); + }, CorrelationVector.getNextChild = function(parent) { + return new CV(parent.getString(), ++parent.nextChild); + }; + var CV = function() { + function CV(base, id) { + this.base = base, this.id = id, this.nextChild = 0; + } + return CV.prototype.getString = function() { + return this.base + "." + this.id; + }, CV; + }(); + CorrelationVector.CV = CV; + }(CorrelationVector || (CorrelationVector = {})); + var OTelNotifications = __webpack_require__(1), __awaiter = function(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))((function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + } + function step(result) { + var value; + result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P((function(resolve) { + resolve(value); + }))).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + })); + }, __generator = function(thisArg, body) { + var f, y, t, g, _ = { + label: 0, + sent: function() { + if (1 & t[0]) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }; + return g = { + next: verb(0), + throw: verb(1), + return: verb(2) + }, "function" == typeof Symbol && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return function(op) { + if (f) throw new TypeError("Generator is already executing."); + for (;_; ) try { + if (f = 1, y && (t = 2 & op[0] ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), + 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + switch (y = 0, t && (op = [ 2 & op[0], t.value ]), op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + return _.label++, { + value: op[1], + done: !1 + }; + + case 5: + _.label++, y = op[1], op = [ 0 ]; + continue; + + case 7: + op = _.ops.pop(), _.trys.pop(); + continue; + + default: + if (!(t = _.trys, (t = t.length > 0 && t[t.length - 1]) || 6 !== op[0] && 2 !== op[0])) { + _ = 0; + continue; + } + if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (6 === op[0] && _.label < t[1]) { + _.label = t[1], t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2], _.ops.push(op); + break; + } + t[2] && _.ops.pop(), _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [ 6, e ], y = 0; + } finally { + f = t = 0; + } + if (5 & op[0]) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: !0 + }; + }([ n, v ]); + }; + } + }, getCurrentMicroseconds = function() { + return 1e3 * Date.now(); + }; + "object" == typeof window && "object" == typeof window.performance && "now" in window.performance && (getCurrentMicroseconds = function() { + return 1e3 * Math.floor(window.performance.now()); + }); + var Activity_ActivityScope = function() { + function ActivityScope(telemetryLogger, activityName, parent) { + this._optionalEventFlags = {}, this._ended = !1, this._telemetryLogger = telemetryLogger, + this._activityName = activityName, this._cv = parent ? CorrelationVector.getNextChild(parent._cv) : CorrelationVector.getNext(), + this._dataFields = [], this._success = void 0, this._startTime = getCurrentMicroseconds(); + } + return ActivityScope.createNew = function(telemetryLogger, activityName) { + return new ActivityScope(telemetryLogger, activityName); + }, ActivityScope.prototype.createChildActivity = function(activityName) { + return new ActivityScope(this._telemetryLogger, activityName, this); + }, ActivityScope.prototype.setEventFlags = function(eventFlags) { + this._optionalEventFlags = eventFlags; + }, ActivityScope.prototype.addDataField = function(dataField) { + this._dataFields.push(dataField); + }, ActivityScope.prototype.addDataFields = function(dataFields) { + var _a; + (_a = this._dataFields).push.apply(_a, dataFields); + }, ActivityScope.prototype.setSuccess = function(success) { + this._success = success; + }, ActivityScope.prototype.setResult = function(code, type, tag) { + this._result = { + code: code, + type: type, + tag: tag + }; + }, ActivityScope.prototype.endNow = function() { + if (!this._ended) { + void 0 === this._success && void 0 === this._result && Object(OTelNotifications.d)(OTelNotifications.b.Warning, OTelNotifications.a.Core, (function() { + return "Activity does not have success or result set"; + })); + var duration = getCurrentMicroseconds() - this._startTime; + this._ended = !0; + var activity = { + duration: duration, + count: 1, + aggMode: 0, + cV: this._cv.getString(), + success: this._success, + result: this._result + }; + return this._telemetryLogger.sendActivity(this._activityName, activity, this._dataFields, this._optionalEventFlags); + } + Object(OTelNotifications.d)(OTelNotifications.b.Error, OTelNotifications.a.Core, (function() { + return "Activity has already ended"; + })); + }, ActivityScope.prototype.executeAsync = function(activityBody) { + return __awaiter(this, void 0, void 0, (function() { + var _this = this; + return __generator(this, (function(_a) { + return [ 2, activityBody(this).then((function(result) { + return _this.endNow(), result; + })).catch((function(e) { + throw _this.endNow(), e; + })) ]; + })); + })); + }, ActivityScope.prototype.executeSync = function(activityBody) { + try { + var ret = activityBody(this); + return this.endNow(), ret; + } catch (e) { + throw this.endNow(), e; + } + }, ActivityScope.prototype.executeChildActivityAsync = function(activityName, activityBody) { + return __awaiter(this, void 0, void 0, (function() { + return __generator(this, (function(_a) { + return [ 2, this.createChildActivity(activityName).executeAsync(activityBody) ]; + })); + })); + }, ActivityScope.prototype.executeChildActivitySync = function(activityName, activityBody) { + return this.createChildActivity(activityName).executeSync(activityBody); + }, ActivityScope; + }(); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return Event; + })); + var Event = function() { + function Event() { + this._listeners = []; + } + return Event.prototype.fireEvent = function(args) { + this._listeners.forEach((function(listener) { + return listener(args); + })); + }, Event.prototype.addListener = function(listener) { + listener && this._listeners.push(listener); + }, Event.prototype.removeListener = function(listener) { + this._listeners = this._listeners.filter((function(h) { + return h !== listener; + })); + }, Event.prototype.getListenerCount = function() { + return this._listeners.length; + }, Event; + }(); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.r(__webpack_exports__); + var _contracts_Contracts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6); + __webpack_require__.d(__webpack_exports__, "Contracts", (function() { + return _contracts_Contracts__WEBPACK_IMPORTED_MODULE_0__.a; + })); + var _Activity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); + __webpack_require__.d(__webpack_exports__, "ActivityScope", (function() { + return _Activity__WEBPACK_IMPORTED_MODULE_1__.a; + })); + var _Contract__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2); + __webpack_require__.d(__webpack_exports__, "addContractField", (function() { + return _Contract__WEBPACK_IMPORTED_MODULE_2__.a; + })); + var _CustomContract__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12); + __webpack_require__.d(__webpack_exports__, "getFieldsForContract", (function() { + return _CustomContract__WEBPACK_IMPORTED_MODULE_3__.a; + })); + var _DataClassification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4); + __webpack_require__.d(__webpack_exports__, "DataClassification", (function() { + return _DataClassification__WEBPACK_IMPORTED_MODULE_4__.a; + })); + var _DataField__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(13); + for (var __WEBPACK_IMPORT_KEY__ in _DataField__WEBPACK_IMPORTED_MODULE_5__) [ "default", "Contracts", "ActivityScope", "addContractField", "getFieldsForContract", "DataClassification" ].indexOf(__WEBPACK_IMPORT_KEY__) < 0 && function(key) { + __webpack_require__.d(__webpack_exports__, key, (function() { + return _DataField__WEBPACK_IMPORTED_MODULE_5__[key]; + })); + }(__WEBPACK_IMPORT_KEY__); + var _DataFieldHelper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(0); + __webpack_require__.d(__webpack_exports__, "makeBooleanDataField", (function() { + return _DataFieldHelper__WEBPACK_IMPORTED_MODULE_6__.a; + })), __webpack_require__.d(__webpack_exports__, "makeInt64DataField", (function() { + return _DataFieldHelper__WEBPACK_IMPORTED_MODULE_6__.d; + })), __webpack_require__.d(__webpack_exports__, "makeDoubleDataField", (function() { + return _DataFieldHelper__WEBPACK_IMPORTED_MODULE_6__.b; + })), __webpack_require__.d(__webpack_exports__, "makeStringDataField", (function() { + return _DataFieldHelper__WEBPACK_IMPORTED_MODULE_6__.e; + })), __webpack_require__.d(__webpack_exports__, "makeGuidDataField", (function() { + return _DataFieldHelper__WEBPACK_IMPORTED_MODULE_6__.c; + })); + var _DataFieldType__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3); + __webpack_require__.d(__webpack_exports__, "DataFieldType", (function() { + return _DataFieldType__WEBPACK_IMPORTED_MODULE_7__.a; + })); + var _EventFlagFiller__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14); + __webpack_require__.d(__webpack_exports__, "getEffectiveEventFlags", (function() { + return _EventFlagFiller__WEBPACK_IMPORTED_MODULE_8__.a; + })); + var _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(5); + __webpack_require__.d(__webpack_exports__, "SamplingPolicy", (function() { + return _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_9__.e; + })), __webpack_require__.d(__webpack_exports__, "PersistencePriority", (function() { + return _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_9__.d; + })), __webpack_require__.d(__webpack_exports__, "CostPriority", (function() { + return _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_9__.a; + })), __webpack_require__.d(__webpack_exports__, "DataCategories", (function() { + return _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_9__.b; + })), __webpack_require__.d(__webpack_exports__, "DiagnosticLevel", (function() { + return _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_9__.c; + })); + var _OptionalEventFlags__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(15); + for (var __WEBPACK_IMPORT_KEY__ in _OptionalEventFlags__WEBPACK_IMPORTED_MODULE_10__) [ "default", "Contracts", "ActivityScope", "addContractField", "getFieldsForContract", "DataClassification", "makeBooleanDataField", "makeInt64DataField", "makeDoubleDataField", "makeStringDataField", "makeGuidDataField", "DataFieldType", "getEffectiveEventFlags", "SamplingPolicy", "PersistencePriority", "CostPriority", "DataCategories", "DiagnosticLevel" ].indexOf(__WEBPACK_IMPORT_KEY__) < 0 && function(key) { + __webpack_require__.d(__webpack_exports__, key, (function() { + return _OptionalEventFlags__WEBPACK_IMPORTED_MODULE_10__[key]; + })); + }(__WEBPACK_IMPORT_KEY__); + var _OTelNotifications__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(1); + __webpack_require__.d(__webpack_exports__, "LogLevel", (function() { + return _OTelNotifications__WEBPACK_IMPORTED_MODULE_11__.b; + })), __webpack_require__.d(__webpack_exports__, "Category", (function() { + return _OTelNotifications__WEBPACK_IMPORTED_MODULE_11__.a; + })), __webpack_require__.d(__webpack_exports__, "onNotification", (function() { + return _OTelNotifications__WEBPACK_IMPORTED_MODULE_11__.e; + })), __webpack_require__.d(__webpack_exports__, "logNotification", (function() { + return _OTelNotifications__WEBPACK_IMPORTED_MODULE_11__.d; + })), __webpack_require__.d(__webpack_exports__, "logError", (function() { + return _OTelNotifications__WEBPACK_IMPORTED_MODULE_11__.c; + })); + var _SimpleTelemetryLogger__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(8); + __webpack_require__.d(__webpack_exports__, "SuppressNexus", (function() { + return _SimpleTelemetryLogger__WEBPACK_IMPORTED_MODULE_12__.b; + })), __webpack_require__.d(__webpack_exports__, "SimpleTelemetryLogger", (function() { + return _SimpleTelemetryLogger__WEBPACK_IMPORTED_MODULE_12__.a; + })); + var _TelemetryLogger__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(16); + __webpack_require__.d(__webpack_exports__, "TelemetryLogger", (function() { + return _TelemetryLogger__WEBPACK_IMPORTED_MODULE_13__.a; + })); + var _TelemetryEvent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(7); + __webpack_require__.d(__webpack_exports__, "cloneEvent", (function() { + return _TelemetryEvent__WEBPACK_IMPORTED_MODULE_14__.a; + })); + var _TelemetryProperties__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(17); + for (var __WEBPACK_IMPORT_KEY__ in _TelemetryProperties__WEBPACK_IMPORTED_MODULE_15__) [ "default", "Contracts", "ActivityScope", "addContractField", "getFieldsForContract", "DataClassification", "makeBooleanDataField", "makeInt64DataField", "makeDoubleDataField", "makeStringDataField", "makeGuidDataField", "DataFieldType", "getEffectiveEventFlags", "SamplingPolicy", "PersistencePriority", "CostPriority", "DataCategories", "DiagnosticLevel", "LogLevel", "Category", "onNotification", "logNotification", "logError", "SuppressNexus", "SimpleTelemetryLogger", "TelemetryLogger", "cloneEvent" ].indexOf(__WEBPACK_IMPORT_KEY__) < 0 && function(key) { + __webpack_require__.d(__webpack_exports__, key, (function() { + return _TelemetryProperties__WEBPACK_IMPORTED_MODULE_15__[key]; + })); + }(__WEBPACK_IMPORT_KEY__); + var _TelemetrySink__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(18); + for (var __WEBPACK_IMPORT_KEY__ in _TelemetrySink__WEBPACK_IMPORTED_MODULE_16__) [ "default", "Contracts", "ActivityScope", "addContractField", "getFieldsForContract", "DataClassification", "makeBooleanDataField", "makeInt64DataField", "makeDoubleDataField", "makeStringDataField", "makeGuidDataField", "DataFieldType", "getEffectiveEventFlags", "SamplingPolicy", "PersistencePriority", "CostPriority", "DataCategories", "DiagnosticLevel", "LogLevel", "Category", "onNotification", "logNotification", "logError", "SuppressNexus", "SimpleTelemetryLogger", "TelemetryLogger", "cloneEvent" ].indexOf(__WEBPACK_IMPORT_KEY__) < 0 && function(key) { + __webpack_require__.d(__webpack_exports__, key, (function() { + return _TelemetrySink__WEBPACK_IMPORTED_MODULE_16__[key]; + })); + }(__WEBPACK_IMPORT_KEY__); +}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return getFieldsForContract; + })); + var _Contract__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); + function getFieldsForContract(instanceName, contractName, contractFields) { + var dataFields = contractFields.map((function(contractField) { + return { + name: instanceName + "." + contractField.name, + value: contractField.value, + dataType: contractField.dataType + }; + })); + return Object(_Contract__WEBPACK_IMPORTED_MODULE_0__.a)(dataFields, instanceName, contractName), + dataFields; + } +}, function(module, exports) {}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return getEffectiveEventFlags; + })); + var _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5), ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); + function getEffectiveEventFlags(telemetryEvent) { + var eventFlags = { + costPriority: _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_0__.a.Normal, + samplingPolicy: _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_0__.e.Measure, + persistencePriority: _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_0__.d.Normal, + dataCategories: _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_0__.b.NotSet, + diagnosticLevel: _EventFlagsProperties__WEBPACK_IMPORTED_MODULE_0__.c.FullEvent + }; + return telemetryEvent.eventFlags && telemetryEvent.eventFlags.dataCategories || Object(___WEBPACK_IMPORTED_MODULE_1__.d)(___WEBPACK_IMPORTED_MODULE_1__.b.Error, ___WEBPACK_IMPORTED_MODULE_1__.a.Core, (function() { + return "Event is missing DataCategories event flag"; + })), telemetryEvent.eventFlags ? (telemetryEvent.eventFlags.costPriority && (eventFlags.costPriority = telemetryEvent.eventFlags.costPriority), + telemetryEvent.eventFlags.samplingPolicy && (eventFlags.samplingPolicy = telemetryEvent.eventFlags.samplingPolicy), + telemetryEvent.eventFlags.persistencePriority && (eventFlags.persistencePriority = telemetryEvent.eventFlags.persistencePriority), + telemetryEvent.eventFlags.dataCategories && (eventFlags.dataCategories = telemetryEvent.eventFlags.dataCategories), + telemetryEvent.eventFlags.diagnosticLevel && (eventFlags.diagnosticLevel = telemetryEvent.eventFlags.diagnosticLevel), + eventFlags) : eventFlags; + } +}, function(module, exports) {}, function(module, __webpack_exports__, __webpack_require__) { + "use strict"; + __webpack_require__.d(__webpack_exports__, "a", (function() { + return TelemetryLogger; + })); + var extendStatics, _SimpleTelemetryLogger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8), _Activity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9), _contracts_Contracts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6), __extends = (extendStatics = function(d, b) { + return (extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]); + })(d, b); + }, function(d, b) { + function __() { + this.constructor = d; + } + extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, + new __); + }), __awaiter = function(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))((function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + } + function step(result) { + var value; + result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P((function(resolve) { + resolve(value); + }))).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + })); + }, __generator = function(thisArg, body) { + var f, y, t, g, _ = { + label: 0, + sent: function() { + if (1 & t[0]) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }; + return g = { + next: verb(0), + throw: verb(1), + return: verb(2) + }, "function" == typeof Symbol && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return function(op) { + if (f) throw new TypeError("Generator is already executing."); + for (;_; ) try { + if (f = 1, y && (t = 2 & op[0] ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), + 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + switch (y = 0, t && (op = [ 2 & op[0], t.value ]), op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + return _.label++, { + value: op[1], + done: !1 + }; + + case 5: + _.label++, y = op[1], op = [ 0 ]; + continue; + + case 7: + op = _.ops.pop(), _.trys.pop(); + continue; + + default: + if (!(t = _.trys, (t = t.length > 0 && t[t.length - 1]) || 6 !== op[0] && 2 !== op[0])) { + _ = 0; + continue; + } + if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (6 === op[0] && _.label < t[1]) { + _.label = t[1], t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2], _.ops.push(op); + break; + } + t[2] && _.ops.pop(), _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [ 6, e ], y = 0; + } finally { + f = t = 0; + } + if (5 & op[0]) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: !0 + }; + }([ n, v ]); + }; + } + }, TelemetryLogger = function(_super) { + function TelemetryLogger() { + return null !== _super && _super.apply(this, arguments) || this; + } + return __extends(TelemetryLogger, _super), TelemetryLogger.prototype.executeActivityAsync = function(activityName, activityBody) { + return __awaiter(this, void 0, void 0, (function() { + return __generator(this, (function(_a) { + return [ 2, this.createNewActivity(activityName).executeAsync(activityBody) ]; + })); + })); + }, TelemetryLogger.prototype.executeActivitySync = function(activityName, activityBody) { + return this.createNewActivity(activityName).executeSync(activityBody); + }, TelemetryLogger.prototype.createNewActivity = function(activityName) { + return _Activity__WEBPACK_IMPORTED_MODULE_1__.a.createNew(this, activityName); + }, TelemetryLogger.prototype.sendActivity = function(activityName, activity, dataFields, optionalEventFlags) { + return this.sendTelemetryEvent({ + eventName: activityName, + eventContract: { + name: _contracts_Contracts__WEBPACK_IMPORTED_MODULE_2__.a.Office.System.Activity.contractName, + dataFields: _contracts_Contracts__WEBPACK_IMPORTED_MODULE_2__.a.Office.System.Activity.getFields(activity) + }, + dataFields: dataFields, + eventFlags: optionalEventFlags + }); + }, TelemetryLogger.prototype.sendError = function(error) { + var dataFields = _contracts_Contracts__WEBPACK_IMPORTED_MODULE_2__.a.Office.System.Error.getFields("Error", error.error); + return null != error.dataFields && dataFields.push.apply(dataFields, error.dataFields), + this.sendTelemetryEvent({ + eventName: error.eventName, + dataFields: dataFields, + eventFlags: error.eventFlags + }); + }, TelemetryLogger; + }(_SimpleTelemetryLogger__WEBPACK_IMPORTED_MODULE_0__.a); +}, function(module, exports) {}, function(module, exports) {}, function(module, exports, __webpack_require__) { + module.exports = __webpack_require__(11); +} ]); + + + +OSFPerformance.officeExecuteEnd = OSFPerformance.now(); \ No newline at end of file diff --git a/dist/office.js b/dist/office.js new file mode 100644 index 000000000..6fdc8960e --- /dev/null +++ b/dist/office.js @@ -0,0 +1,84 @@ +var OSFPerformance; +(function (OSFPerformance) { + OSFPerformance.officeExecuteStartDate = 0; + OSFPerformance.officeExecuteStart = 0; + OSFPerformance.officeExecuteEnd = 0; + OSFPerformance.hostInitializationStart = 0; + OSFPerformance.hostInitializationEnd = 0; + OSFPerformance.totalJSHeapSize = 0; + OSFPerformance.usedJSHeapSize = 0; + OSFPerformance.jsHeapSizeLimit = 0; + OSFPerformance.getAppContextStart = 0; + OSFPerformance.getAppContextEnd = 0; + OSFPerformance.createOMEnd = 0; + OSFPerformance.officeOnReady = 0; + OSFPerformance.hostSpecificFileName = ""; + function now() { + if (performance && performance.now) { + return performance.now(); + } + else { + return 0; + } + } + OSFPerformance.now = now; + function getTotalJSHeapSize() { + if (typeof (performance) !== 'undefined' && performance.memory) { + return performance.memory.totalJSHeapSize; + } + else { + return 0; + } + } + OSFPerformance.getTotalJSHeapSize = getTotalJSHeapSize; + function getUsedJSHeapSize() { + if (typeof (performance) !== 'undefined' && performance.memory) { + return performance.memory.usedJSHeapSize; + } + else { + return 0; + } + } + OSFPerformance.getUsedJSHeapSize = getUsedJSHeapSize; + function getJSHeapSizeLimit() { + if (typeof (performance) !== 'undefined' && performance.memory) { + return performance.memory.jsHeapSizeLimit; + } + else { + return 0; + } + } + OSFPerformance.getJSHeapSizeLimit = getJSHeapSizeLimit; +})(OSFPerformance || (OSFPerformance = {})); +; +OSFPerformance.officeExecuteStartDate = Date.now(); +OSFPerformance.officeExecuteStart = OSFPerformance.now(); + + + +/* Office JavaScript API library */ + +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + + +/* + Your use of this file is governed by the license terms for the Microsoft Office JavaScript (Office.js) API library: https://github.com/OfficeDev/office-js/blob/release/LICENSE.md + + This file also contains the following Promise implementation (with a few small modifications): + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 2.3.0 +*/ +var OSF=OSF||{};OSF.HostSpecificFileVersionDefault="16.00";OSF.HostSpecificFileVersionMap={access:{web:"16.00"},agavito:{winrt:"16.00"},excel:{android:"16.00",ios:"16.00",mac:"16.00",web:"16.00",win32:"16.01",winrt:"16.00"},onenote:{android:"16.00",ios:"16.00",mac:"16.00",web:"16.00",win32:"16.00",winrt:"16.00"},outlook:{android:"16.00",ios:"16.00",mac:"16.00",web:"16.01",win32:"16.02"},powerpoint:{ios:"16.00",mac:"16.00",web:"16.00",win32:"16.01",winrt:"16.00"},project:{win32:"16.00"},sway:{web:"16.00"},word:{ios:"16.00",mac:"16.00",web:"16.00",win32:"16.01",winrt:"16.00"},visio:{web:"16.00",win32:"16.00"}};OSF.SupportedLocales={"ar-sa":true,"bg-bg":true,"bn-in":true,"ca-es":true,"cs-cz":true,"da-dk":true,"de-de":true,"el-gr":true,"en-us":true,"es-es":true,"et-ee":true,"eu-es":true,"fa-ir":true,"fi-fi":true,"fr-fr":true,"gl-es":true,"he-il":true,"hi-in":true,"hr-hr":true,"hu-hu":true,"id-id":true,"it-it":true,"ja-jp":true,"kk-kz":true,"ko-kr":true,"lo-la":true,"lt-lt":true,"lv-lv":true,"ms-my":true,"nb-no":true,"nl-nl":true,"nn-no":true,"pl-pl":true,"pt-br":true,"pt-pt":true,"ro-ro":true,"ru-ru":true,"sk-sk":true,"sl-si":true,"sr-cyrl-cs":true,"sr-cyrl-rs":true,"sr-latn-cs":true,"sr-latn-rs":true,"sv-se":true,"th-th":true,"tr-tr":true,"uk-ua":true,"ur-pk":true,"vi-vn":true,"zh-cn":true,"zh-tw":true};OSF.AssociatedLocales={ar:"ar-sa",bg:"bg-bg",bn:"bn-in",ca:"ca-es",cs:"cs-cz",da:"da-dk",de:"de-de",el:"el-gr",en:"en-us",es:"es-es",et:"et-ee",eu:"eu-es",fa:"fa-ir",fi:"fi-fi",fr:"fr-fr",gl:"gl-es",he:"he-il",hi:"hi-in",hr:"hr-hr",hu:"hu-hu",id:"id-id",it:"it-it",ja:"ja-jp",kk:"kk-kz",ko:"ko-kr",lo:"lo-la",lt:"lt-lt",lv:"lv-lv",ms:"ms-my",nb:"nb-no",nl:"nl-nl",nn:"nn-no",pl:"pl-pl",pt:"pt-br",ro:"ro-ro",ru:"ru-ru",sk:"sk-sk",sl:"sl-si",sr:"sr-cyrl-cs",sv:"sv-se",th:"th-th",tr:"tr-tr",uk:"uk-ua",ur:"ur-pk",vi:"vi-vn",zh:"zh-cn"};OSF.SupportedRTLLocales={"ar-sa":true,"he-il":true,"fa-ir":true,"ur-pk":true};OSF.getSupportedLocale=function(a,c){if(c===void 0)c="en-us";if(!a)return c;var b;a=a.toLowerCase();if(a in OSF.SupportedLocales)b=a;else{var d=a.split("-",1);if(d&&d.length>0)b=OSF.AssociatedLocales[d[0]]}if(!b)b=c;return b};OSF.isRTLLocale=function(a){if(!a)return false;return OSF.SupportedRTLLocales[a.toLowerCase()]||false};var ScriptLoading;(function(e){var a=false,b=function(){function b(g,e,d,f,c){var b=this;b.url=g;b.isReady=e;b.hasStarted=d;b.timer=f;b.hasError=a;b.pendingCallbacks=[];b.pendingCallbacks.push(c)}return b}(),d=function(){function a(c,b,a){this.scriptId=c;this.startTime=b;this.msResponseTime=a}return a}(),c=function(){var e=true,c=null;function f(b){var a=this;if(b===void 0)b={OfficeJS:"office.js",OfficeDebugJS:"office.debug.js"};a.constantNames=b;a.defaultScriptLoadingTimeout=1e4;a.loadedScriptByIds={};a.scriptTelemetryBuffer=[];a.osfControlAppCorrelationId="";a.basePath=c;a.getUseAssociatedActionsOnly=c}f.prototype.isScriptLoading=function(a){return !!(this.loadedScriptByIds[a]&&this.loadedScriptByIds[a].hasStarted)};f.prototype.getOfficeJsBasePath=function(){var b=this;if(b.basePath)return b.basePath;else{var h=function(b,c){var d,a,e;e=b.toLowerCase();a=e.indexOf(c);if(a>=0&&a===b.length-c.length&&(a===0||b.charAt(a-1)==="/"||b.charAt(a-1)==="\\"))d=b.substring(0,a);else if(a>=0&&a0){f=window.setTimeout(c,i);b--}else{window.clearTimeout(f);d(a)}};c()};f.prototype.waitForScripts=function(b,e){var f=this;if(this.invokeCallbackIfScriptsReady(b,e)==a)for(var c=0;c=0){b=b.substring(c+5,b.length);if(b<"14.14393")return a;else return false}return false}function e(){if(typeof window===b&&typeof Promise===c)return Promise;if(typeof window!==b&&window.Promise)if(f())return d.PromiseImpl.Init();else return window.Promise;else return d.PromiseImpl.Init()}d.OfficePromise=e()})(e=d._Internal||(d._Internal={}));var f=e.OfficePromise;d.Promise=f})(Office||(Office={}));var OTel;(function(c){var a="telemetry/oteljs_agave.js",b=function(){var c="undefined";function b(){}b.loaded=function(){return !(b.logger===undefined||b.sink===undefined)};b.getOtelSinkCDNLocation=function(){return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+a};b.getMapName=function(b,a){if(a!==undefined&&b.hasOwnProperty(a))return b[a];return a};b.getHost=function(){var c=OSF._OfficeAppFactory.getHostInfo()["hostType"],d={excel:"Excel",onenote:"OneNote",outlook:"Outlook",powerpoint:"PowerPoint",project:"Project",visio:"Visio",word:"Word"},a=b.getMapName(d,c);return a};b.getFlavor=function(){var c=OSF._OfficeAppFactory.getHostInfo()["hostPlatform"],d={android:"Android",ios:"iOS",mac:"Mac",universal:"Universal",web:"Web",win32:"Win32"},a=b.getMapName(d,c);return a};b.ensureValue=function(a,b){if(!a)return b;return a};b.create=function(a){var i={id:a.appId,marketplaceType:a.marketplaceType,assetId:a.assetId,officeJsVersion:a.officeJSVersion,hostJsVersion:a.hostJSVersion,browserToken:a.clientId,instanceId:a.appInstanceId,sessionId:a.sessionId},k=oteljs.Contracts.Office.System.SDX.getFields("SDX",i),l=b.getHost(),e=b.getFlavor(),j=e==="Web"&&a.hostVersion.slice(0,2)==="0."?"16.0.0.0":a.hostVersion,d={"App.Name":l,"App.Platform":e,"App.Version":j,"Session.Id":b.ensureValue(a.correlationId,"00000000-0000-0000-0000-000000000000")},h="Office.Extensibility.OfficeJs",g="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439",f=1755,c=new oteljs.SimpleTelemetryLogger(undefined,k);c.setTenantToken(h,g,f);if(oteljs.AgaveSink)b.sink=oteljs.AgaveSink.createInstance(d);if(b.sink===undefined)b.attachLegacyAgaveSink(d);else c.addSink(b.sink);return c};b.attachLegacyAgaveSink=function(e){var d=function(){if(typeof oteljs_agave!==c)b.sink=oteljs_agave.AgaveSink.createInstance(e);if(b.sink===undefined||b.logger===undefined){b.Enabled=false;b.promises=[];b.logger=undefined;b.sink=undefined;return}b.logger.addSink(b.sink);b.promises.forEach(function(a){a()})},a=5e3;OSF.OUtil.loadScript(b.getOtelSinkCDNLocation(),d,a)};b.initialize=function(d){if(!b.Enabled){b.promises=[];return}var a=function(){if(typeof oteljs===c)return;if(!b.loaded())b.logger=b.create(d);b.loaded()&&b.promises.forEach(function(a){a()})};Microsoft.Office.WebExtension.onReadyInternal().then(function(){return a()})};b.sendTelemetryEvent=function(a){b.onTelemetryLoaded(function(){try{b.logger.sendTelemetryEvent(a)}catch(c){}})};b.sendCustomerContent=function(a){b.onTelemetryLoaded(function(){try{b.logger.sendCustomerContent(a)}catch(c){}})};b.onTelemetryLoaded=function(a){if(!b.Enabled)return;if(b.loaded())a();else b.promises.push(a)};b.promises=[];b.Enabled=true;return b}();c.OTelLogger=b})(OTel||(OTel={}));(function(b){var a=function(){function a(){this.m_mappings={};this.m_onchangeHandlers=[]}a.prototype.associate=function(){var a="[InvalidArg] Function=associate",b=this;function c(a){typeof console!=="undefined"&&console.warn&&console.warn(a)}if(arguments.length==1&&typeof arguments[0]==="object"&&arguments[0]){var g=arguments[0];for(var i in g)b.associate(i,g[i])}else if(arguments.length==2){var d=arguments[0],h=arguments[1];if(typeof d!=="string"){c(a);return}if(typeof h!=="function"){c(a);return}var f=d.toUpperCase();b.m_mappings[f]&&c("[DuplicatedName] Function="+d);b.m_mappings[f]=h;for(var e=0;e0)n.shift()(k)};Microsoft.Office.WebExtension.FeatureGates={};Microsoft.Office.WebExtension.sendTelemetryEvent=function(a){OTel.OTelLogger.sendTelemetryEvent(a)};Microsoft.Office.WebExtension.telemetrySink=OTel.OTelLogger;Microsoft.Office.WebExtension.onReadyInternal=function(a){if(v){var e=k.host,c=k.platform,d=k.addin;if(a){var b=a({host:e,platform:c,addin:d});if(b&&b.then&&typeof b.then===g)return b.then(function(){return Office.Promise.resolve({host:e,platform:c,addin:d})})}return Office.Promise.resolve({host:e,platform:c,addin:d})}if(a)return new Office.Promise(function(b){n.push(function(d){var c=a(d);if(c&&c.then&&typeof c.then===g)return c.then(function(){return b(d)});b(d)})});return new Office.Promise(function(a){n.push(a)})};Microsoft.Office.WebExtension.onReady=function(a){u=d;return Microsoft.Office.WebExtension.onReadyInternal(a)};var p=function(g){var c,d=window.location.search;if(d){var b=d.split(g+"=");if(b.length>1){var e=b[1],f=new RegExp("[&#]","g"),a=e.split(f);if(a.length>0)c=a[0]}}return c},F=function(f,g){var b=f.split("."),c=g.split("."),a;for(a in b)if(parseInt(b[a])parseInt(c[a]))return d;return e},z=function(){try{var b="15.30.1128.0",a=window.external.GetContext().GetHostFullVersion()}catch(c){return e}return !!F(b,a)},A=function(){l=d;try{if(c.disableLogging){l=e;return}window.external=window.external||{};if(typeof window.external.GetLoggingAllowed===a)l=d;else l=window.external.GetLoggingAllowed()}catch(b){}},E=function(){var i="hostInfoValue",l="isDialog",o=m,h=b;try{window.external=window.external||{};if(typeof agaveHost!==a&&agaveHost.GetHostInfo)window.external.GetHostInfo=function(){return agaveHost.GetHostInfo()};var k=window.external.GetHostInfo();if(k==l){c.isO15=d;c.isDialog=d}else if(k.toLowerCase().indexOf("mac")!==-1&&k.toLowerCase().indexOf("outlook")!==-1&&z())c.isO15=d;else{var q=k.split(o+"=");if(q.length>1)h=q[1];else h=k}}catch(s){}if(!h){h=p(o);if(!h)try{var r=JSON.parse(x);h=r?r["hostInfo"]:b}catch(s){}}var u=function(){var a=b;try{if(window.sessionStorage)a=window.sessionStorage}catch(c){}return a},j=u();if(!h&&j&&j.getItem(i))h=j.getItem(i);if(h){h=decodeURIComponent(h);c.isO15=e;var g=h.split("$");if(typeof g[2]==a)g=h.split("|");c.hostType=typeof g[0]==a?f:g[0].toLowerCase();c.hostPlatform=typeof g[1]==a?f:g[1].toLowerCase();c.hostSpecificFileVersion=typeof g[2]==a?f:g[2].toLowerCase();c.hostLocale=typeof g[3]==a?f:g[3].toLowerCase();c.osfControlAppCorrelationId=typeof g[4]==a?f:g[4];if(c.osfControlAppCorrelationId=="telemetry")c.osfControlAppCorrelationId=f;c.isDialog=typeof g[5]!=a&&g[5]==l?d:e;c.disableLogging=typeof g[6]!=a&&g[6]=="disableLogging"?d:e;c.flags=typeof g[7]==="string"&&g[7].length>0?parseInt(g[7]):0;if(g_isOfflineLibrary)g_isExpEnabled=e;else g_isExpEnabled=g_isExpEnabled||!!(c.flags&OSF.HostInfoFlags.ExperimentJsEnabled);var t=parseFloat(c.hostSpecificFileVersion),n=OSF.HostSpecificFileVersionDefault;if(OSF.HostSpecificFileVersionMap[c.hostType]&&OSF.HostSpecificFileVersionMap[c.hostType][c.hostPlatform])n=OSF.HostSpecificFileVersionMap[c.hostType][c.hostPlatform];if(t>parseFloat(n))c.hostSpecificFileVersion=n;if(j)try{j.setItem(i,h)}catch(v){}}else{c.isO15=d;c.hostLocale=p("locale")}},D=function(b,a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage&&OSF.AppTelemetry.logAppCommonMessage("getAppContextAsync starts");i.getAppContext(b,a)},G=function(){E();A();if(c.hostPlatform=="web"&&c.isDialog&&window==window.top&&window.opener==b){window.open(f,"_self",f);window.close()}if((c.flags&(OSF.HostInfoFlags.SharedApp|OSF.HostInfoFlags.CustomFunction))!==0)if(typeof window.Promise===a)window.Promise=window.Office.Promise;h.setAppCorrelationId(c.osfControlAppCorrelationId);var k=h.getOfficeJsBasePath(),F=e;if(!k)throw"Office Web Extension script library file name should be "+OSF.ConstantNames.OfficeJS+" or "+OSF.ConstantNames.OfficeDebugJS+".";var n=function(){if(typeof Sys!==a&&typeof Type!==a&&Sys.StringBuilder&&typeof Sys.StringBuilder===g&&Type.registerNamespace&&typeof Type.registerNamespace===g&&Type.registerClass&&typeof Type.registerClass===g||typeof OfficeExt!==a&&OfficeExt.MsAjaxError)return d;else return e},o=b,x=function(f){var b=e,c=function(){if(typeof Strings==a||typeof Strings.OfficeOM==a)if(!b){b=d;var g=k+OSF.ConstantNames.DefaultLocale+"/"+OSF.ConstantNames.OfficeStringJS;h.loadScript(g,OSF.ConstantNames.OfficeStringsId,c,d,OSF.ConstantNames.LocaleStringLoadingTimeout);return e}else throw"Neither the locale, "+f.toLowerCase()+", provided by the host app nor the fallback locale "+OSF.ConstantNames.DefaultLocale+" are supported.";else{b=e;o=Strings.OfficeOM}};if(!n()){window.Type=Function;Type.registerNamespace=function(a){window[a]=window[a]||{}};Type.prototype.registerClass=function(a){a={}}}var g=k+OSF.getSupportedLocale(f,OSF.ConstantNames.DefaultLocale)+"/"+OSF.ConstantNames.OfficeStringJS;h.loadScript(g,OSF.ConstantNames.OfficeStringsId,c,d,OSF.ConstantNames.LocaleStringLoadingTimeout)},s=function(s){if(s){i=new OSF.InitializationHelper(c,j,r,H,q);c.hostPlatform=="web"&&i.saveAndSetDialogInfo&&i.saveAndSetDialogInfo(p(m));i.setAgaveHostCommunication();if(typeof OSFPerformance!==a)OSFPerformance.getAppContextStart=OSFPerformance.now();D(j.wnd,function(d){if(typeof OSFPerformance!==a)OSFPerformance.getAppContextEnd=OSFPerformance.now();OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage&&OSF.AppTelemetry.logAppCommonMessage("getAppContextAsync callback start");w=d._appInstanceId;if(d.get_featureGates){var e=d.get_featureGates();if(e)Microsoft.Office.WebExtension.FeatureGates=e}var f=function(){var a=c.hostSpecificFileVersion.split(".");if(d.get_appMinorVersion){var b=c.hostPlatform=="ios";if(!b)if(isNaN(d.get_appMinorVersion()))d._appMinorVersion=parseInt(a[1]);else if(a.length>1&&!isNaN(Number(a[1])))d._appMinorVersion=parseInt(a[1])}if(c.isDialog)d._isDialog=c.isDialog};f();var j=function(){i.prepareApiSurface&&i.prepareApiSurface(d);h.waitForFunction(function(){return Microsoft.Office.WebExtension.initialize!=undefined||u},function(f){if(f){if(i.prepareApiSurface)Microsoft.Office.WebExtension.initialize&&Microsoft.Office.WebExtension.initialize(i.getInitializationReason(d));else{if(!Microsoft.Office.WebExtension.initialize)Microsoft.Office.WebExtension.initialize=function(){};i.prepareRightBeforeWebExtensionInitialize(d)}i.prepareRightAfterWebExtensionInitialize&&i.prepareRightAfterWebExtensionInitialize(d);var e=d.get_appName(),a=b;if((c.flags&OSF.HostInfoFlags.SharedApp)!==0)a={visibilityMode:y[d.get_initialDisplayMode&&typeof d.get_initialDisplayMode===g?d.get_initialDisplayMode():0]};t({host:OfficeExt.HostName.Host.getInstance().getHost(e),platform:OfficeExt.HostName.Host.getInstance().getPlatform(e),addin:a})}else throw new Error('Office.js has not fully loaded. Your app must call "Office.onReady()" as part of it\'s loading sequence (or set the "Office.initialize" function). If your app has this functionality, try reloading this page.')},400,50)};!h.isScriptLoading(OSF.ConstantNames.OfficeStringsId)&&x(d.get_appUILocale());h.waitForScripts([OSF.ConstantNames.OfficeStringsId],function(){if(o&&!Strings.OfficeOM)Strings.OfficeOM=o;i.loadAppSpecificScriptAndCreateOM(d,j,k);if(typeof OSFPerformance!==a)OSFPerformance.createOMEnd=OSFPerformance.now()})});if(c.isO15){var n=OSF.OUtil.parseXdmInfo()==b;if(n){var f=d;if(window.external&&typeof window.external.GetContext!==a)try{window.external.GetContext();f=e}catch(v){}if(typeof OsfOptOut===a&&f&&window.top!==window.self){window.console&&window.console.log&&window.console.log("The add-in is not hosted in plain browser top window.");window.location.href="about:blank"}f&&t({host:b,platform:b,addin:b})}}}else{var l="MicrosoftAjax.js is not loaded successfully.";OSF.AppTelemetry&&OSF.AppTelemetry.logAppException&&OSF.AppTelemetry.logAppException(l);throw l}},z=function(){OSF.AppTelemetry&&OSF.AppTelemetry.setOsfControlAppCorrelationId&&OSF.AppTelemetry.setOsfControlAppCorrelationId(c.osfControlAppCorrelationId);if(h.isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId))h.waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],s);else h.waitForFunction(n,s,500,100)};if(c.isO15)h.loadScript(k+OSF.ConstantNames.O15InitHelper,OSF.ConstantNames.O15MappingId,z);else{var v=c.hostType.toLowerCase(),B=c.hostPlatform.toLowerCase(),I=new RegExp("^\\d\\d[.]\\d\\d$");if(OSF.HostSpecificFileVersionMap[v]==b||OSF.HostSpecificFileVersionMap[v][B]==b||!I.test(c.hostSpecificFileVersion))throw"hostInfo validation failed";var l;l=[c.hostType,c.hostPlatform,c.hostSpecificFileVersion,OSF.ConstantNames.HostFileScriptSuffix||b].filter(function(a){return a!=b}).join("-")+".js";h.loadScript(k+l.toLowerCase(),OSF.ConstantNames.HostFileId,z);if(typeof OSFPerformance!==a)OSFPerformance.hostSpecificFileName=l.toLowerCase()}c.hostLocale&&x(c.hostLocale);if(F&&!n()){var G=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";h.loadScriptParallel(G,OSF.ConstantNames.MicrosoftAjaxId)}window.confirm=function(){throw new Error("Function window.confirm is not supported.")};window.alert=function(){throw new Error("Function window.alert is not supported.")};window.prompt=function(){throw new Error("Function window.prompt is not supported.")};var C=c.hostType=="outlook"&&c.hostPlatform=="android";if(!C){window.history.replaceState=b;window.history.pushState=b}};G();window.addEventListener&&window.addEventListener("DOMContentLoaded",function(){Microsoft.Office.WebExtension.onReadyInternal(function(){typeof OSFPerfUtil!==a&&OSFPerfUtil.sendPerformanceTelemetry()})});return {getId:function(){return j.id},getClientEndPoint:function(){return j.clientEndPoint},getContext:function(){return r},setContext:function(a){r=a},getHostInfo:function(){return c},getLoggingAllowed:function(){return l},getHostFacade:function(){return q},setHostFacade:function(a){q=a},getInitializationHelper:function(){return i},getCachedSessionSettingsKey:function(){return (j.conversationID!=b?j.conversationID:w)+"CachedSessionSettings"},getWebAppState:function(){return j},getWindowLocationHash:function(){return C},getWindowLocationSearch:function(){return B},getLoadScriptHelper:function(){return h},getWindowName:function(){return x}}}() + + + +var oteljs=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=19)}([function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"b",(function(){return c})),n.d(e,"e",(function(){return s})),n.d(e,"c",(function(){return u}));var r=n(3),i=n(4);function o(t,e){return{name:t,dataType:r.a.Boolean,value:e,classification:i.a.SystemMetadata}}function a(t,e){return{name:t,dataType:r.a.Int64,value:e,classification:i.a.SystemMetadata}}function c(t,e){return{name:t,dataType:r.a.Double,value:e,classification:i.a.SystemMetadata}}function s(t,e){return{name:t,dataType:r.a.String,value:e,classification:i.a.SystemMetadata}}function u(t,e){return{name:t,dataType:r.a.Guid,value:e,classification:i.a.SystemMetadata}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"d",(function(){return c})),n.d(e,"c",(function(){return s}));var r,i,o=new(n(10).a);function a(){return o}function c(t,e,n){o.fireEvent({level:t,category:e,message:n})}function s(t,e,n){c(r.Error,t,(function(){var t=n instanceof Error?n.message:"";return e+": "+t}))}!function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Info=2]="Info",t[t.Verbose=3]="Verbose"}(r||(r={})),function(t){t[t.Core=0]="Core",t[t.Sink=1]="Sink",t[t.Transport=2]="Transport"}(i||(i={}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0);function i(t,e,n){t.push(Object(r.e)("zC."+e,n))}},function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t[t.String=0]="String",t[t.Boolean=1]="Boolean",t[t.Int64=2]="Int64",t[t.Double=3]="Double",t[t.Guid=4]="Guid"}(r||(r={}))},function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t[t.EssentialServiceMetadata=1]="EssentialServiceMetadata",t[t.AccountData=2]="AccountData",t[t.SystemMetadata=4]="SystemMetadata",t[t.OrganizationIdentifiableInformation=8]="OrganizationIdentifiableInformation",t[t.EndUserIdentifiableInformation=16]="EndUserIdentifiableInformation",t[t.CustomerContent=32]="CustomerContent",t[t.AccessControl=64]="AccessControl"}(r||(r={}))},function(t,e,n){"use strict";var r,i,o,a,c;n.d(e,"e",(function(){return r})),n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return c})),function(t){t[t.NotSet=0]="NotSet",t[t.Measure=1]="Measure",t[t.Diagnostics=2]="Diagnostics",t[t.CriticalBusinessImpact=191]="CriticalBusinessImpact",t[t.CriticalCensus=192]="CriticalCensus",t[t.CriticalExperimentation=193]="CriticalExperimentation",t[t.CriticalUsage=194]="CriticalUsage"}(r||(r={})),function(t){t[t.NotSet=0]="NotSet",t[t.Normal=1]="Normal",t[t.High=2]="High"}(i||(i={})),function(t){t[t.NotSet=0]="NotSet",t[t.Normal=1]="Normal",t[t.High=2]="High"}(o||(o={})),function(t){t[t.NotSet=0]="NotSet",t[t.SoftwareSetup=1]="SoftwareSetup",t[t.ProductServiceUsage=2]="ProductServiceUsage",t[t.ProductServicePerformance=4]="ProductServicePerformance",t[t.DeviceConfiguration=8]="DeviceConfiguration",t[t.InkingTypingSpeech=16]="InkingTypingSpeech"}(a||(a={})),function(t){t[t.ReservedDoNotUse=0]="ReservedDoNotUse",t[t.BasicEvent=10]="BasicEvent",t[t.FullEvent=100]="FullEvent",t[t.NecessaryServiceDataEvent=110]="NecessaryServiceDataEvent",t[t.AlwaysOnNecessaryServiceDataEvent=120]="AlwaysOnNecessaryServiceDataEvent"}(c||(c={}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var r,i,o,a,c,s,u,d,f,l=n(0),v=n(2);(r||(r={})).getFields=function(t,e){var n=[];return n.push(Object(l.d)(t+".Code",e.code)),void 0!==e.type&&n.push(Object(l.e)(t+".Type",e.type)),void 0!==e.tag&&n.push(Object(l.d)(t+".Tag",e.tag)),void 0!==e.isExpected&&n.push(Object(l.a)(t+".IsExpected",e.isExpected)),Object(v.a)(n,t,"Office.System.Result"),n},(o=i||(i={})).contractName="Office.System.Activity",o.getFields=function(t){var e=[];return void 0!==t.cV&&e.push(Object(l.e)("Activity.CV",t.cV)),e.push(Object(l.d)("Activity.Duration",t.duration)),e.push(Object(l.d)("Activity.Count",t.count)),e.push(Object(l.d)("Activity.AggMode",t.aggMode)),void 0!==t.success&&e.push(Object(l.a)("Activity.Success",t.success)),void 0!==t.result&&e.push.apply(e,r.getFields("Activity.Result",t.result)),Object(v.a)(e,"Activity",o.contractName),e},(a||(a={})).getFields=function(t,e){var n=[];return void 0!==e.id&&n.push(Object(l.e)(t+".Id",e.id)),void 0!==e.version&&n.push(Object(l.e)(t+".Version",e.version)),void 0!==e.sessionId&&n.push(Object(l.e)(t+".SessionId",e.sessionId)),Object(v.a)(n,t,"Office.System.Host"),n},(c||(c={})).getFields=function(t,e){var n=[];return void 0!==e.alias&&n.push(Object(l.e)(t+".Alias",e.alias)),void 0!==e.primaryIdentityHash&&n.push(Object(l.e)(t+".PrimaryIdentityHash",e.primaryIdentityHash)),void 0!==e.primaryIdentitySpace&&n.push(Object(l.e)(t+".PrimaryIdentitySpace",e.primaryIdentitySpace)),void 0!==e.tenantId&&n.push(Object(l.e)(t+".TenantId",e.tenantId)),void 0!==e.tenantGroup&&n.push(Object(l.e)(t+".TenantGroup",e.tenantGroup)),void 0!==e.isAnonymous&&n.push(Object(l.a)(t+".IsAnonymous",e.isAnonymous)),Object(v.a)(n,t,"Office.System.User"),n},(s||(s={})).getFields=function(t,e){var n=[];return void 0!==e.id&&n.push(Object(l.e)(t+".Id",e.id)),void 0!==e.version&&n.push(Object(l.e)(t+".Version",e.version)),void 0!==e.instanceId&&n.push(Object(l.e)(t+".InstanceId",e.instanceId)),void 0!==e.name&&n.push(Object(l.e)(t+".Name",e.name)),void 0!==e.marketplaceType&&n.push(Object(l.e)(t+".MarketplaceType",e.marketplaceType)),void 0!==e.sessionId&&n.push(Object(l.e)(t+".SessionId",e.sessionId)),void 0!==e.browserToken&&n.push(Object(l.e)(t+".BrowserToken",e.browserToken)),void 0!==e.osfRuntimeVersion&&n.push(Object(l.e)(t+".OsfRuntimeVersion",e.osfRuntimeVersion)),void 0!==e.officeJsVersion&&n.push(Object(l.e)(t+".OfficeJsVersion",e.officeJsVersion)),void 0!==e.hostJsVersion&&n.push(Object(l.e)(t+".HostJsVersion",e.hostJsVersion)),void 0!==e.assetId&&n.push(Object(l.e)(t+".AssetId",e.assetId)),void 0!==e.providerName&&n.push(Object(l.e)(t+".ProviderName",e.providerName)),void 0!==e.type&&n.push(Object(l.e)(t+".Type",e.type)),Object(v.a)(n,t,"Office.System.SDX"),n},(u||(u={})).getFields=function(t,e){var n=[];return void 0!==e.name&&n.push(Object(l.e)(t+".Name",e.name)),void 0!==e.state&&n.push(Object(l.e)(t+".State",e.state)),Object(v.a)(n,t,"Office.System.Funnel"),n},(d||(d={})).getFields=function(t,e){var n=[];return void 0!==e.id&&n.push(Object(l.d)(t+".Id",e.id)),void 0!==e.name&&n.push(Object(l.e)(t+".Name",e.name)),void 0!==e.commandSurface&&n.push(Object(l.e)(t+".CommandSurface",e.commandSurface)),void 0!==e.parentName&&n.push(Object(l.e)(t+".ParentName",e.parentName)),void 0!==e.triggerMethod&&n.push(Object(l.e)(t+".TriggerMethod",e.triggerMethod)),void 0!==e.timeOffsetMs&&n.push(Object(l.d)(t+".TimeOffsetMs",e.timeOffsetMs)),Object(v.a)(n,t,"Office.System.UserAction"),n},function(t){t.getFields=function(t,e){var n=[];return n.push(Object(l.e)(t+".ErrorGroup",e.errorGroup)),n.push(Object(l.d)(t+".Tag",e.tag)),void 0!==e.code&&n.push(Object(l.d)(t+".Code",e.code)),void 0!==e.id&&n.push(Object(l.d)(t+".Id",e.id)),void 0!==e.count&&n.push(Object(l.d)(t+".Count",e.count)),Object(v.a)(n,t,"Office.System.Error"),n}}(f||(f={}));var p,y=i,h=r,g=f,m=u,b=a,F=s,O=d,S=c;!function(t){!function(t){!function(t){t.Activity=y,t.Result=h,t.Error=g,t.Funnel=m,t.Host=b,t.SDX=F,t.User=S,t.UserAction=O}(t.System||(t.System={}))}(t.Office||(t.Office={}))}(p||(p={}))},function(t,e,n){"use strict";function r(t){var e={eventName:t.eventName,eventFlags:t.eventFlags};return t.telemetryProperties&&(e.telemetryProperties={ariaTenantToken:t.telemetryProperties.ariaTenantToken,nexusTenantToken:t.telemetryProperties.nexusTenantToken}),t.eventContract&&(e.eventContract={name:t.eventContract.name,dataFields:t.eventContract.dataFields.slice()}),e.dataFields=t.dataFields?t.dataFields.slice():[],e}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return v}));var r,i,o=n(7),a=n(1);!function(t){t[t.Aria=0]="Aria",t[t.Nexus=1]="Nexus"}(r||(r={})),function(t){var e={},n={},i={};function o(t){if("object"!=typeof t)throw new Error("tokenTree must be an object");i=function t(e,n){if("object"!=typeof n)return n;for(var r=0,i=Object.keys(n);r=0;--c){var u=Object.create(Object.prototype);u[r[c]]=s,s=u}o(s)}},t.setTenantTokens=o,t.getTenantTokens=function(t){var e=c(t),n=s(t);if(!n||!e)throw new Error("Could not find tenant token for "+t);return{ariaTenantToken:e,nexusTenantToken:n}},t.getAriaTenantToken=c,t.getNexusTenantToken=s,t.clear=function(){e={},n={},i={}}}(i||(i={}));var c,s=n(3);!function(t){var e=/^[A-Z][a-zA-Z0-9]*$/,n=/^[a-zA-Z0-9_\.]*$/;function r(t){return void 0!==t&&n.test(t)}function i(t){if(!((e=t.name)&&r(e)&&e.length+5<100))throw new Error("Invalid dataField name");var e;t.dataType===s.a.Int64&&o(t.value)}function o(t){if("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t<-9007199254740991||t>9007199254740991)throw new Error("Invalid integer "+JSON.stringify(t))}t.validateTelemetryEvent=function(t){if(!function(t){if(!t||t.length>98)return!1;var n=t.split("."),r=n[n.length-1];return function(t){return!!t&&t.length>=3&&"Office"===t[0]}(n)&&(i=r,void 0!==i&&e.test(i));var i}(t.eventName))throw new Error("Invalid eventName");if(t.eventContract&&!r(t.eventContract.name))throw new Error("Invalid eventContract");if(null!=t.dataFields)for(var n=0;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]Gets a list of attachments to the item.
+ attachments: undefined + }, + contents: function () { + return new Array(new Office._context_mailbox_item_attachmentDetails()) + } + }, + attachments_read_compose: { + conditions: { + hosts: ["outlook; outlookcompose"] + }, + name: "attachments", + annotate: { + ///Gets a list of attachments to the item. In compose mode the attachments property is undefined. In read mode it returns a list of attachments to the item. + attachments: undefined + }, + contents: function () { + return new Array(new Office._context_mailbox_item_attachmentDetails()) + } + } + } + + bodyDoc = { + body_compose: { + conditions: { + hosts: ["not outlook, outlookcompose"] + }, + name: "body", + annotate: { + /// Provides methods to get and set the body of the item. + body: undefined + }, + contents: function () { + return new Office._context_mailbox_item_body() + } + }, + body_read_compose: { + conditions: { + hosts: ["outlook, outlookcompose"] + }, + name: "body", + annotate: { + /// Gets the content of an item. In read mode, the body property is undefined. In compose mode it returns a Body object. + body: undefined + }, + contents: function () { + return new Office._context_mailbox_item_body() + } + } + } + + // dateTimeCreated property. + dateTimeCreatedDoc = { + dateTimeCreated_read: { + conditions: { + hosts: ["outlook, not outlookcompose"] + }, + name: "dateTimeCreated", + annotate: { + ///Gets the date and time that the item was created. + dateTimeCreated: undefined + }, + contents: function () { + return new Date() + } + }, + dateTimeCreated_read_compose: { + conditions: { + hosts: ["outlook, outlookcompose"] + }, + name: "dateTimeCreated", + annotate: { + ///Gets the date and time that the item was created. In compose mode the dateTimeCreated property is undefined. + dateTimeCreated: undefined + }, + contents: function () { + return new Date() + } + } + } + + // dateTimeModified property. + dateTimeModifiedDoc = { + dateTimeModified_read: { + conditions: { + hosts: ["outlook, not outlookcompose"] + }, + name: "dateTimeModified", + annotate: { + ///Gets the date and time that the item was last modified. + dateTimeModified: undefined + }, + contents: function () { + return new Date() + } + }, + dateTimeModified_read_compose: { + conditions: { + hosts: ["outlook, outlookcompose"] + }, + name: "dateTimeModified", + annotate: { + ///Gets the date and time that the item was last modified. In compose mode the dateTimeModified property is undefined.
+ dateTimeModified: undefined + }, + contents: function () { + return new Date() + } + } + } + + // itemClass property. + itemClassDoc = { + itemClass_read: { + conditions: { + hosts: ["outlook, not outlookcompose"] + }, + name: "itemClass", + annotate: { + ///Gets the item class of the item. + itemClass: undefined + } + }, + itemClass_read_compose: { + conditions: { + hosts: ["outlook, outlookcompose"] + }, + name: "itemClass", + annotate: { + ///Gets the item class of the item. In compose mode the itemClass property is undefined. + itemClass: undefined + } + } + } + + // itemId property + // This property is in all modes, so it gets processed in place rather than + // after the extra documentation is removed. + Office._processContents(obj, { + itemIdDoc: { + conditions: { + hosts: ["outlook", "outlookcompose"] + }, + name: "itemId", + annotate: { + ///Gets the Exchange Web Services (EWS) item identifier of an item. + itemId: undefined + } + } + }) + + // itemType property. + Office._processContents(obj, { + itemTypeDoc: { + conditions: { + hosts: ["outlook", "outlookcompose"] + }, + name: "itemType", + annotate: { + ///Gets the type of an item that an instance represents. + itemType: undefined + } + } + }) + + //obj.normalizedSubject = {}; + normalizedSubjectDoc = { + normalizedSubject_read: { + conditions: { + hosts: ["outlook, not outlookcompose"] + }, + name: "normalizedSubject", + annotate: { + ///Gets the subject of the item, with standard prefixes removed. + normalizedSubject: undefined + } + }, + normalizedSubject_read_compose: { + conditions: { + hosts: ["outlook, outlookcompose"] + }, + name: "normalizedSubject", + annotate: { + ///Gets the subject of the item, with standard prefixes removed. In compose mode, the normalizedSubject property is undefined. + normalizedSubject: undefined + } + } + } + + subjectDoc = { + subject_compose: { + conditions: { + hosts: ["not outlook, outlookcompose"] + }, + name: "subject", + annotate: { + /// Provides methods to get and set the item subject. + subject: undefined + }, + contents: function () { + return new Office._context_mailbox_item_subject() + } + }, + subject_read: { + conditions: { + hosts: ["outlook, not outlookcompose"] + }, + name: "subject", + annotate: { + /// Gets the subject of the item. + subject: undefined + } + }, + subject_read_compose: { + conditions: { + hosts: ["outlook, outlookcompose"] + }, + name: "subject", + annotate: { + /// Gets the subject of an item. In compose mode the Subject property returns a Subject object. In read mode, it returns a string. + subject: undefined + } + } + } + + if (appMode == Office._appMode.Compose) { + delete attachmentsDoc["attachments_read"]; + delete attachmentsDoc["attachments_read_compose"]; + delete bodyDoc.body_compose["conditions"]; + delete bodyDoc["body_read_compose"]; + delete dateTimeCreatedDoc["dateTimeCreated_read"]; + delete dateTimeCreatedDoc["dateTimeCreated_read_compose"]; + delete dateTimeModifiedDoc["dateTimeModified_read"]; + delete dateTimeModifiedDoc["dateTimeModified_read_compose"]; + delete itemClassDoc["itemClass_read"]; + delete itemClassDoc["itemClass_read_compose"]; + delete normalizedSubjectDoc["normalizedSubject_read"]; + delete normalizedSubjectDoc["normalizedSubject_read_compose"]; + delete subjectDoc.subject_compose["conditions"]; + delete subjectDoc["subject_read"]; + delete subjectDoc["subject_read_compose"]; + } + else if (appMode == Office._appMode.Read) { + delete attachmentsDoc.attachments_read["conditions"]; + delete attachmentsDoc["attachments_read_compose"]; + delete bodyDoc["body_compose"]; + delete bodyDoc["body_read_compose"]; + delete dateTimeCreatedDoc.dateTimeCreated_read["conditions"]; + delete dateTimeCreatedDoc["dateTimeCreated_read_compose"]; + delete dateTimeModifiedDoc.dateTimeModified_read["conditions"]; + delete dateTimeModifiedDoc["dateTimeModified_read_compose"]; + delete itemClassDoc.itemClass_read["conditions"]; + delete itemClassDoc["itemClass_read_compose"]; + delete normalizedSubjectDoc.normalizedSubject_read["conditions"]; + delete normalizedSubjectDoc["normalizedSubject_read_compose"]; + delete subjectDoc.subject_read["conditions"]; + delete subjectDoc["subject_compose"]; + delete subjectDoc["subject_read_compose"]; + } + else if (appMode == Office._appMode.ReadCompose) { + delete attachmentsDoc["attachments_read"]; + delete attachmentsDoc.attachments_read_compose["conditions"]; + delete bodyDoc["body_compose"]; + delete bodyDoc.body_read_compose["conditions"]; + delete dateTimeCreatedDoc["dateTimeCreated_read"]; + delete dateTimeCreatedDoc.dateTimeCreated_read_compose["conditions"]; + delete dateTimeModifiedDoc["dateTimeModified_read"]; + delete dateTimeModifiedDoc.dateTimeModified_read_compose["conditions"]; + delete itemClassDoc["itemClass_read"]; + delete itemClassDoc.itemClass_read_compose["conditions"]; + delete normalizedSubjectDoc["normalizedSubject_read"]; + delete normalizedSubjectDoc.normalizedSubject_read_compose["conditions"]; + delete subjectDoc["subject_compose"]; + delete subjectDoc["subject_read"]; + delete subjectDoc.subject_read_compose["conditions"]; + } + + Office._processContents(obj, attachmentsDoc); + Office._processContents(obj, bodyDoc); + Office._processContents(obj, dateTimeCreatedDoc); + Office._processContents(obj, dateTimeModifiedDoc); + Office._processContents(obj, itemClassDoc); + Office._processContents(obj, normalizedSubjectDoc); + Office._processContents(obj, subjectDoc); + + if (appMode == Office._appMode.Compose || appMode == Office._appMode.ReadCompose) { + obj.addFileAttachmentAsync = function (uri, attachmentName, options, callback) { + ///Attach a file to an item. + ///A URI that provides the location of the file. Required. + ///The name to display while the attachment is loading. The name is limited to 256 characters. Required. + ///An optional parameters or state data passed to the callback method. Optional. + ///The method to invoke when the attachment finishes uploading. Optional. + + var result = new Office._Mailbox_AsyncResult("attachmentAsync"); + if (arguments.length == 3) { callback = options; } + callback(result); + }; + + obj.addItemAttachmentAsync = function (itemId, attachmentName, options, callback) { + ///Attach an email item to an item. + ///The Exchange identifier of the item to attach. The maximum length is 100 characters. + ///The name to display while the attachment is loading. The name is limited to 256 characters. + ///An optional parameters or state data passed to the callback method. + ///The method to invoke when the attachment finishes uploading. + + var result = new Office._Mailbox_AsyncResult("attachmentAsync"); + if (arguments.length == 3) { callback = options; } + callback(result); + }; + + obj.removeAttachmentAsync = function (attachmentIndex, options, callback) { + ///Removes a file or item that was previously attached to an item. + ///The index of the attachment to remove. + ///An optional parameters or state data passed to the callback method. + ///The method to invoke when the attachment is removed. + + var result = new Office._Mailbox_AsyncResult("removeAttachmentAsync"); + if (arguments.length == 2) { callback = options; } + callback(result); + }; + + Office._processItem(obj, { + conditions: { + reqs: ["set Mailbox GE 1.2"] + }, + metaOnly: true, + contents: { + getSelectedDataAsync: { + value: function (coercionType, options, callback) { + ///Gets the selected data in the subject or body of the current item; or null if not data is selected. + ///One of the CoercionType enumeration values indicating whether the selected content is HTML or plain text. + ///Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous method is complete. + var result = new Office._Mailbox_AsyncResult("getSelectedDataAsync"); + if (arguments.length == 2) { callback = options; } + callback(result); + } + }, + setSelectedDataAsync: { + value: function (data, options, callback) { + ///Sets the specified data in the subject or body of the current item. + ///The text to insert into the subject or body of the item. + ///Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous method is complete. + var result = new Office._Mailbox_AsyncResult(); + if (arguments.length == 2) { callback = options; } + callback(result); + } + } + } + }); + } + + if (appMode == Office._appMode.Read || appMode == Office._appMode.ReadCompose) { + obj.displayReplyAllForm = function (htmlBody) { + ///Display a form for creating an email reply to all recipients. + ///The HTML contents of the email reply. 32 KB limit. + }; + obj.displayReplyForm = function (htmlBody) { + ///Display a form for creating an email reply to the sender. + ///The HTML contents of the email reply. 32 KB limit + }; + Office._processItem(obj, { + conditions: { + reqs: ["set Mailbox GE 1.2"] + }, + metaOnly: true, + contents: { + displayReplyAllForm: { + value: function (replyForm) { + ///Display a form for creating an email reply to all recipients. + ///Syntax example: { + /// "body": "..." , + /// "attachments": [ + /// { + /// "type":"item", + /// "id":"...", + /// }, + /// { + /// "type":"file", + /// "name":"...", + /// "url":"...", + /// } + /// ]} + /// body: HTML contents of the email reply. Optional, 32 KB limit. + /// attachments: An array of JSON objects that are either file or item attachments. Optional. + /// attachments:type: "item" to indicate that the attachment is an Exchange item, or "file" to indicate that the attachment is a file. + /// attachments:id: The EWS identifier of the item to attach. 100 character limit. + /// attachments:file: The file name of the file to attach. 255 character limit. + /// attachments:url: The URL of the location where the file bytes are located. 2048 character limit. + /// -or- + /// The HTML contents of the email reply. 32 KB limit. + } + }, + displayReplyForm: { + value: function (replyForm) { + ///Display a form for creating an email reply to the sender. + ///Syntax example: { + /// "body": "..." , + /// "attachments": [ + /// { + /// "type":"item", + /// "id":"...", + /// }, + /// { + /// "type":"file", + /// "name":"...", + /// "url":"...", + /// } + /// ]} + /// body: HTML contents of the email reply. Optional, 32 KB limit. + /// attachments: An array of JSON objects that are either file or item attachments. Optional. + /// attachments:type: "item" to indicate that the attachment is an Exchange item, or "file" to indicate that the attachment is a file. + /// attachments:id: The EWS identifier of the item to attach. 100 character limit. + /// attachments:file: The file name of the file to attach. 255 character limit. + /// attachments:url: The URL of the location where the file bytes are located. 2048 character limit. + /// -or- + /// The HTML contents of the email reply. 32 KB limit. + } + } + } + }); + obj.getEntities = function () { + ///Gets an array of entities found in an item. + return (new Office._context_mailbox_item_entities()); + }; + obj.getEntitiesByType = function (entityType) { + ///Gets an array of entities of the specified entity type found in an item. + ///One of the EntityType enumeration values. + if (entityType == Office.MailboxEnums.EntityType.Address) { + return (new Array("")); + } + + if (entityType == Office.MailboxEnums.EntityType.Contact) { + return (new Array(new Office._context_mailbox_item_contact())); + } + + if (entityType == Office.MailboxEnums.EntityType.EmailAddress) { + return (new Array("")); + } + + if (entityType == Office.MailboxEnums.EntityType.MeetingSuggestion) { + return (new Array(new Office._context_mailbox_item_meetingSuggestion())); + } + + if (entityType == Office.MailboxEnums.EntityType.PhoneNumber) { + return (new Array(new Office._context_mailbox_item_phoneNumber())); + } + + if (entityType == Office.MailboxEnums.EntityType.TaskSuggestion) { + return (new Array(new Office._context_mailbox_item_taskSuggestion())); + } + + if (entityType == Office.MailboxEnums.EntityType.Url) { + return (new Array("")); + } + }; + obj.getFilteredEntitiesByName = function (name) { + ///Returns well-known enitities that pass the named filter defined in the manifest XML file. + ///The name of the filter defined in the manifest XML file. + return (new Array(Office._context_mailbox_item_entities())); + }; + obj.getRegExMatches = function () { + ///Returns string values that match the regular expressions defined in the manifest XML file. + return (new Array("")); + }; + obj.getRegExMatchesByName = function (name) { + ///Returns string values that match the named regular expression defined in the manifest XML file. + ///The name of the regular expression defined in the manifest XML file. + return (new Array("")); + }; + } + + obj.loadCustomPropertiesAsync = function (callback, userContext) { + ///Asynchronously loads custom properties that are specific to the item and a mail app for Outlook. + ///The method to call when the asynchronous load is complete. + ///Any state data that is passed to the asynchronous method. + + var result = new Office._Mailbox_AsyncResult("loadCustomPropertiesAsync"); + callback(result); + }; +}; + +Office._$MailboxAppointment_helper = function (obj, appMode) { + // End property. + endDoc = { + end_compose: { + conditions: { + hosts: ["not outlook; outlookcompose"] + }, + name: "end", + annotate: { + /// Provides methods to get and set the end time of an appointment. + end: undefined + }, + contents: function () { + return new Office._context_mailbox_item_time(); + } + }, + end_read: { + conditions: { + hosts: ["outlook; not outlookcompose"] + }, + name: "end", + annotate: { + ///Gets the date and time that the appointment is to end. + end: undefined + }, + contents: function () { + return new Date(); + } + }, + end_read_compose: { + conditions: { + hosts: ["outlook; outlookcompose"] + }, + name: "end", + annotate: { + /// Gets the date and time that the appointment is to end. In read mode, returns Date object. In compose mode, returns a Time object. + end: undefined + } + } + } + + // Location property. + locationDoc = { + location_compose: { + conditions: { + hosts: ["not outlook, outlookcompose"] + }, + name: "location", + annotate: { + /// Provides methods to get and set the location of an appointment. + location: undefined + }, + contents: function () { + return new Office._context_mailbox_item_location() + } + }, + location_read: { + conditions: { + hosts: ["not outlook, outlookcompose"] + }, + name: "location", + annotate: { + ///Gets the location of an appointment. + location: undefined + } + }, + location_read_compose: { + conditions: { + hosts: ["outlook, outlookcompose"] + }, + name: "location", + annotate: { + /// Gets the location of an appointment. In read mode, returns a string. In compose mode returns a Location object. + location: undefined + } + } + } + + // Optional attendees property. + optionalAttendeesDoc = { + optionalAttendees_compose: { + conditions: { + hosts: ["not outlook; outlookcompose"] + }, + name: "optionalAttendees", + annotate: { + /// Provides methods to get and set the optional attendees of an appointment. + optionalAttendees: undefined + }, + contents: function () { + return new Office._context_mailbox_item_recipients(); + } + }, + optionalAttendees_read: { + conditions: { + hosts: ["outlook; not outlookcompose"] + }, + name: "optionalAttendees", + annotate: { + ///Gets a list of email addresses for optional attendees of an appointment. + optionalAttendees: undefined + }, + contents: function () { + return new Array(new Office._context_mailbox_item_emailAddressDetails()) + } + }, + optionalAttendees_read_compose: { + conditions: { + hosts: ["outlook; outlookcompose"] + }, + name: "optionalAttendees", + annotate: { + /// Gets a list of email addresses for optional attendees of an appointment. In read mode, returns an array of EmailAddressDetails objects. In compose mode, returns a Recipients object. + optionalAttendees: undefined + } + } + } + + // Organizer property. + organizerDoc = { + organizer_read: { + conditions: { + hosts: ["outlook, not outlookcompose"] + }, + name: "organizer", + annotate: { + ///Gets the email address of the meeting organizer for the specified meeting. + organizer: undefined + }, + contents: function () { + return new Office._context_mailbox_item_emailAddressDetails() + } + }, + organizer_read_compose: { + conditions: { + hosts: ["outlook, outlookcompose"] + }, + name: "organizer", + annotate: { + ///Gets the email address of the meeting organizer for the specified meeting. In compose mode, the organizer property is undefined. + organizer: undefined + }, + contents: function () { + return new Office._context_mailbox_item_emailAddressDetails() + } + } + } + + // Required attendees + requiredAttendeesDoc = { + requiredAttendees_compose: { + conditions: { + hosts: ["not outlook, outlookcompose"] + }, + name: "requiredAttendees", + annotate: { + /// Provides methods to get and set the required attendees of an appointment. + requiredAttendees: undefined + }, + contents: function () { + return new Office._context_mailbox_item_recipients(); + } + }, + requiredAttendees_read: { + conditions: { + hosts: ["outlook; not outlookcompose"] + }, + name: "requiredAttendees", + annotate: { + /// Gets a list of email addresses for required attendees of an appointment. + requiredAttendees: undefined + }, + contents: function () { + return new Array(new Office._context_mailbox_item_emailAddressDetails()) + } + }, + requiredAttendees_read_compose: { + conditions: { + hosts: ["outlook; outlookcompose"] + }, + name: "requiredAttendees", + annotate: { + /// Gets a list of email addresses for required attendees of an appointment. In read mode, returns an array of EmailAddressDetails objects. In compose mode, returns a Recipients object. + requiredAttendees: undefined + } + } + } + + // Resources property. + resourcesDoc = { + resources_read: { + conditions: { + hosts: ["outlook; not outlookcompose"] + }, + name: "resources", + annotate: { + /// Gets the resources required for an appointment. + resources: undefined + }, + contents: function () { + return new Array(new Office._context_mailbox_item_emailAddressDetails()) + } + }, + resources_read_compose: { + conditions: { + hosts: ["outlook; outlookcompose"] + }, + name: "resources", + annotate: { + /// Gets the resources required for an appointment. In read mode, returns an array of EmailAddressDetails objects. In compose mode, the resources property is undefined. + resources: undefined + } + } + } + + // Start property + startDoc = { + start_compose: { + conditions: { + hosts: ["not outlook; outlookcompose"] + }, + name: "start", + annotate: { + /// Provides methods to get and set the start time for the appointment. + start: undefined + }, + contents: function () { + return new Office._context_mailbox_item_time(); + } + }, + start_read: { + conditions: { + hosts: ["outlook; not outlookcompose"] + }, + name: "start", + annotate: { + ///Gets the date and time that the appointment is to begin. + start: undefined + }, + contents: function () { + return new Date(); + } + }, + start_read_compose: { + conditions: { + hosts: ["outlook; outlookcompose"] + }, + name: "start", + annotate: { + /// Gets the date and time that the appointment is to begin. In read mode, returns Date object. In compose mode, returns a Time object. + start: undefined + } + } + } + + if (appMode == Office._appMode.Compose) { + delete endDoc.end_compose["conditions"]; + delete endDoc["end_read"]; + delete endDoc["end_read_compose"]; + delete locationDoc.location_compose["conditions"]; + delete locationDoc["location_read"]; + delete locationDoc["location_read_compose"]; + delete optionalAttendeesDoc.optionalAttendees_compose["conditions"]; + delete optionalAttendeesDoc["optionalAttendees_read"]; + delete optionalAttendeesDoc["optionalAttendees_read_compose"]; + delete organizerDoc["organizer_read"]; + delete organizerDoc["organizer_read_compose"]; + delete requiredAttendeesDoc.requiredAttendees_compose["conditions"]; + delete requiredAttendeesDoc["requiredAttendees_read"]; + delete requiredAttendeesDoc["requiredAttendees_read_compose"]; + delete resourcesDoc["resources_read"]; + delete resourcesDoc["resources_read_compose"]; + delete startDoc.start_compose["conditions"]; + delete startDoc["start_read"]; + delete startDoc["start_read_compose"]; + } + else if (appMode == Office._appMode.Read) { + delete endDoc["end_compose"]; + delete endDoc.end_read["conditions"]; + delete endDoc["end_read_compose"]; + delete locationDoc["location_compose"]; + delete locationDoc.location_read["conditions"]; + delete locationDoc["location_read_compose"]; + delete optionalAttendeesDoc["optionalAttendees_compose"]; + delete optionalAttendeesDoc.optionalAttendees_read["conditions"]; + delete optionalAttendeesDoc["optionalAttendees_read_compose"]; + delete organizerDoc.organizer_read["conditions"]; + delete organizerDoc["organizer_read_compose"]; + delete requiredAttendeesDoc["requiredAttendees_compose"]; + delete requiredAttendeesDoc.requiredAttendees_read["conditions"]; + delete requiredAttendeesDoc["requiredAttendees_read_compose"]; + delete resourcesDoc.resources_read["conditions"]; + delete resourcesDoc["resources_read_compose"]; + delete startDoc["start_compose"]; + delete startDoc.start_read["conditions"]; + delete startDoc["start_read_compose"]; + } + else if (appMode == Office._appMode.ReadCompose) { + delete endDoc["end_compose"]; + delete endDoc["end_read"]; + delete endDoc.end_read_compose["condtions"]; + delete locationDoc["location_compose"]; + delete locationDoc["location_read"]; + delete optionalAttendeesDoc["optionalAttendees_compose"]; + delete optionalAttendeesDoc["optionalAttendees_read"]; + delete optionalAttendeesDoc.optionalAttendees_read_compose["conditions"]; + delete locationDoc.location_read_compose["conditions"]; + delete organizerDoc["organizer_read"]; + delete organizerDoc.organizer_read_compose["conditions"]; + delete requiredAttendeesDoc["requiredAttendees_compose"]; + delete requiredAttendeesDoc["requiredAttendees_read"]; + delete requiredAttendeesDoc.requiredAttendees_read_compose["conditions"]; + delete resourcesDoc["resources_read"]; + delete resourcesDoc.resources_read_compose["conditions"]; + delete startDoc["start_compose"]; + delete startDoc["start_read"]; + delete startDoc.start_read_compose["conditions"]; + } + + Office._processContents(obj, endDoc); + Office._processContents(obj, locationDoc); + Office._processContents(obj, optionalAttendeesDoc); + Office._processContents(obj, organizerDoc); + Office._processContents(obj, requiredAttendeesDoc); + Office._processContents(obj, resourcesDoc); + Office._processContents(obj, startDoc); +}; + +Office._$MailboxMessage_helper = function (obj, appMode) { + // BCC property. + bccDoc = { + bcc_compose: { + conditions: { + hosts: ["not outlook; outlookcompose"] + }, + name: "bcc", + annotate: { + /// Provides methods to get and set the Bcc recipients of a message. + bcc: undefined + }, + contents: function () { + return new Office._context_mailbox_item_recipients(); + } + }, + bcc_read_compose: { + conditions: { + hosts: ["outlook; outlookcompose"] + }, + name: "bcc", + annotate: { + /// Gets the Bcc recipients of a message. In read mode, the bcc property is undefined. In compose mode it returns a Recipients object. + bcc: undefined + } + } + } + + // CC property. + ccDoc = { + cc_compose: { + conditions: { + hosts: ["not outlook; outlookcompose"] + }, + name: "cc", + annotate: { + /// Provides methods to get and set the carbon-copy (Cc) recipients of a message. + cc: undefined + }, + contents: function () { + return new Office._context_mailbox_item_recipients(); + } + }, + cc_read: { + conditions: { + hosts: ["outlook; not outlookcompose"] + }, + name: "cc", + annotate: { + /// Gets the carbon-copy (Cc) recipients of a message. + cc: undefined + }, + contents: function () { + return new Array(new Office._context_mailbox_item_emailAddressDetails()) + } + }, + cc_read_compose: { + conditions: { + hosts: ["outlook; outlookcompose"] + }, + name: "cc", + annotate: { + /// Gets the carbon-copy (Cc) recipients of a message. In read mode, the cc property returns an array of EmailAddressDetails objects. In compose mode it returns a Recipients object. + cc: undefined + } + } + } + + // conversationId property + Office._processContents(obj, { + conversationIdDoc: { + conditions: { + hosts: ["outlook", "outlookcompose"] + }, + name: "conversationId", + annotate: { + ///Gets an identifier for the email conversation that contains a particular message. + conversationId: undefined + } + } + }); + + // From property. + fromDoc = { + from_read: { + conditions: { + hosts: ["outlook, not outlookcompose"] + }, + name: "from", + annotate: { + /// Gets the email address of the message's sender. + from: undefined + }, + contents: function () { + return new Office._context_mailbox_item_emailAddressDetails(); + } + }, + from_read_compose: { + conditions: { + hosts: ["outlook, outlookcompose"] + }, + name: "from", + annotate: { + /// Gets the email address of the message's sender. In compose mode, the from property is undefined. + from: undefined + }, + contents: function () { + return new Office._context_mailbox_item_emailAddressDetails(); + } + } + } + + // InternetMessageId property. + internetMessageIdDoc = { + internetMessageId_read: { + conditions: { + hosts: ["outlook, not outlookcompose"] + }, + name: "internetMessageId", + annotate: { + /// Gets the internet message identifier of the message. + internetMessageId: undefined + } + }, + internetMessageId_read_compose: { + conditions: { + hosts: ["outlook, outlookcompose"] + }, + name: "internetMessageId", + annotate: { + /// Gets the internet message identifier of the message. In compose mode, the internetMessageId property is undefined. + internetMessageId: undefined + } + } + } + + // Sender property. + senderDoc = { + sender_read: { + conditions: { + hosts: ["outlook, not outlookcompose"] + }, + name: "sender", + annotate: { + /// Gets the email address of the message sender. + sender: undefined + }, + contents: function () { + return new Office._context_mailbox_item_emailAddressDetails(); + } + }, + sender_read_compose: { + conditions: { + hosts: ["outlook, outlookcompose"] + }, + name: "sender", + annotate: { + /// Gets the email address of the message sender. In compose mode, the sender property is undefined. + sender: undefined + }, + contents: function () { + return new Office._context_mailbox_item_emailAddressDetails(); + } + } + } + + // To property + toDoc = { + to_compose: { + conditions: { + hosts: ["not outlook; outlookcompose"] + }, + name: "to", + annotate: { + /// Provides methods to get and set the list of recipients of a message. + to: undefined + }, + contents: function () { + return new Office._context_mailbox_item_recipients(); + } + }, + to_read: { + conditions: { + hosts: ["outlook; not outlookcompose"] + }, + name: "to", + annotate: { + /// Gets the list of recipients of a message. + to: undefined + }, + contents: function () { + return new Array(new Office._context_mailbox_item_emailAddressDetails()) + } + }, + to_read_compose: { + conditions: { + hosts: ["outlook; outlookcompose"] + }, + name: "to", + annotate: { + /// Gets the list of recipients of a message. In read mode, the to property returns an array of EmailAddressDetails objects. In compose mode, it returns a Recipients object. + to: undefined + } + } + } + + if (appMode == Office._appMode.Compose) { + delete bccDoc.bcc_compose["conditions"]; + delete bccDoc["bcc_read_compose"]; + delete ccDoc.cc_compose["conditions"]; + delete ccDoc["cc_read"]; + delete ccDoc["cc_read_compose"]; + delete fromDoc["from_read"]; + delete fromDoc["from_read_compose"]; + delete internetMessageIdDoc["internetMessageId_read"]; + delete internetMessageIdDoc["internetMessageId_read_compose"]; + delete senderDoc["sender_read"]; + delete senderDoc["sender_read_compose"]; + delete toDoc.to_compose["conditions"]; + delete toDoc["to_read"]; + delete toDoc["to_read_compose"]; + } + else if (appMode == Office._appMode.Read) { + delete bccDoc["bcc_compose"]; + delete bccDoc["bcc_read_compose"]; + delete ccDoc["cc_compose"]; + delete ccDoc.cc_read["conditions"]; + delete ccDoc["cc_read_compose"]; + delete fromDoc.from_read["conditions"]; + delete fromDoc["from_read_compose"]; + delete internetMessageIdDoc.internetMessageId_read["conditions"]; + delete internetMessageIdDoc["internetMessageId_read_compose"]; + delete senderDoc.sender_read["conditions"]; + delete senderDoc["sender_read_compose"]; + delete toDoc["to_compose"]; + delete toDoc.to_read["conditions"]; + delete toDoc["to_read_compose"]; + } + else if (appMode == Office._appMode.ReadCompose) { + delete bccDoc["bcc_compose"]; + delete bccDoc.bcc_read_compose["conditions"]; + delete ccDoc["cc_compose"]; + delete ccDoc["cc_read"]; + delete ccDoc.cc_read_compose["conditions"]; + delete fromDoc["from_read"]; + delete fromDoc.from_read_compose["conditions"]; + delete internetMessageIdDoc["internetMessageId_read"]; + delete internetMessageIdDoc.internetMessageId_read_compose["conditions"]; + delete senderDoc["sender_read"]; + delete senderDoc.sender_read_compose["conditions"]; + delete toDoc["to_compose"]; + delete toDoc["to_read"]; + delete toDoc.to_read_compose["conditions"]; + } + + Office._processContents(obj, bccDoc); + Office._processContents(obj, ccDoc); + Office._processContents(obj, fromDoc); + Office._processContents(obj, internetMessageIdDoc); + Office._processContents(obj, senderDoc); + Office._processContents(obj, toDoc); +} + +Office._context_mailbox = function () { + ///Gets the URL of the Exchange Web Services (EWS) endpoint for this email account. + ///Represents the current item (message or appointment). + ///Represents the host application's user profile information. + ///Provides troubleshooting capabilities for a mail app. + var instance = new Office._context_mailbox_item(); + + this.ewsUrl = {}; + this.item = intellisense.nullWithCompletionsOf(instance); + this.userProfile = new Office._context_mailbox_userProfile(); + this.diagnostics = new Office._context_mailbox_diagnostics(); + + this.displayAppointmentForm = function (itemId) { + ///Displays an existing calendar appointment. + ///The Exchange Web Services (EWS) identifier for an existing calendar appointment. + }; + this.displayMessageForm = function (itemId) { + ///Displays an existing message. + ///The Exchange Web Services (EWS) identifier for an existing message. + }; + this.displayNewAppointmentForm = function (meetingRequest) { + ///Display a form for creating a new calendar appointment. + /// + /// Syntax example: {requiredAttendees:, optionalAttendees:, start:, end:, location:, resources:, subject:, body:} + /// requiredAttendees: An array of strings containing the SMTP email addresses of the required attendees for the meeting. The array is limited to 100 entries. + /// optionalAttendees: An array of strings containing the SMTP email addresses of the optional attendees for the meeting. The array is limited to 100 entries. + /// start: The start date and time of the appointment. + /// end: The end date and time of the appointment. + /// location: A string containing the location of the appointment. Limited to 255 characters. + /// resources: An array of strings containing the resources required for the appointment. The array is limited to 100 entries. + /// subject: A string containing the subject of the appointment. Limited to 255 characters. + /// body: The body of the appointment message. Limited to 32 Kb. + /// + }; + + this.convertToLocalClientTime = function (timeValue) { + ///Gets a dictionary containing time information in local client time. + ///The date and time to convert. + } + + this.convertToUtcClientTime = function (input) { + ///Get s Date object from a dictionary containing time information. + ///A dictionary containing a date. The dictionary should contain the following fields: year, month, date, hours, minutes, seconds, time zone, time zone offset. + } + + this.getCallbackTokenAsync = function (callback, userContext) { + ///Gets a token that can be used to retrieve attachments for the current item. This method is only available in read mode. + ///The method to call when the asynchronous method is complete. + ///Any state data that is passed to the asynchronous method. + var result = new Office._Mailbox_AsyncResult("getCallbackTokenAsync"); + callback(result); + } + this.getUserIdentityTokenAsync = function (callback, userContext) { + ///Gets a token identifying the user and the mail app for Outlook. + ///The method to call when the asynchronous load method is complete. + ///Any state data that is passed to the asynchronous method. + + var result = new Office._Mailbox_AsyncResult("getUserIdentityTokenAsync"); + callback(result); + }; + this.makeEwsRequestAsync = function (data, callback, userContext) { + ///Gets a token identifying the user and the mail app for Outlook. + ///Makes an asynchronous request to an Exchange Web Services (EWS) service on the Microsoft Exchange Server 2013 Preview that hosts the mail app for Outlook. + ///The method to call when the asynchronous load method is complete. + ///Any state data that is passed to the asynchronous method. + + var result = new Office._Mailbox_AsyncResult("makeEwsRequestAsync"); + callback(result); + }; +} + +Office._context_mailbox_diagnostics = function () { + ///Gets a string containing the name of the host application for the mail app. + ///Gets a string containing the version of either the host application or the Exchange server. + ///Gets a string containing the current view of the Outlook Web App. + this.hostName = {}; + this.hostVersion = {}; + this.OWAView = {}; +} + +Office._context_mailbox_item_attachmentDetails = function () { + /// Indicates whether the attachment is an Exchange item or file. + /// The MIME content type of the attachment. + /// The Exchange Web Services (EWS) attachment identifer for the attachment. + /// true if the attachment is inline, otherwise, false. + /// The name of the attachment. + /// Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous request is complete. + + var result = new Office._Mailbox_AsyncResult("bodyGetTypeAsync"); + if (arguments.length == 1) { callback = options; } + callback(result); + }; + this.prependAsync = function (data, options, callback) { + ///Sets the body of a message or meeting. + ///The text to insert at the beginning of the item body. The string is limited to 1,000,000 characters. + ///Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous request is complete. + + var result = new Office._Mailbox_AsyncResult(); + if (arguments.length == 2) { callback = options; } + callback(result); + }; + this.setSelectedDataAsync = function (data, options, callback) { + ///Replaces the selection in the body with the specified text. + ///The text to insert in the item body. The string is limited to 1,000,000 characters. + ///Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous request is complete. + + var result = new Office._Mailbox_AsyncResult(); + if (arguments.length == 2) { callback = options; } + callback(result); + }; +} +Office._context_mailbox_item_contact = function () { + ///Gets the mailing and street addresses associated with a contact. + ///Gets the name of the business associated with a contact. + ///Gets the SMTP email addresses associated with a contact. + ///Gets the name of the person associated with a contact. + ///Gets the phone numbers associated with a contact. + ///Get the list of Internet URLs associated with a contact. + this.addresses = new Array(""); + this.businessName = {}; + this.emailAddresses = new Array(""); + this.personName = {}; + this.phoneNumbers = new Array(new Office._context_mailbox_item_phoneNumber()); + this.urls = new Array(""); +} +Office._context_mailbox_item_customProperties = function () { + this.get = function (name) { + ///Gets the value of the specicifed custom property. + ///The name of the custom property to be returned. + } + + this.remove = function (name) { + ///Removes the specicifed custom property. + ///The name of the custom property to be removed. + } + + this.saveAsync = function (callback, userContext) { + ///Saves item-specific custom properties to the Exchange server. + ///The method to call when an asynchronous call is complete. + ///Any state data that is passed to the callback method. + } + + this.set = function (name, value) { + ///Sets the value of the specicifed custom property. + ///The name of the custom property to be set. + ///The value of the custom property to be set. + } +} +Office._context_mailbox_item_emailAddressDetails = function () { + ///One of the ResponseType enumeration values. + ///Gets the display name associated with the email address. + ///Gets the SMTP email address. + ///One of the RecipientType enumeration values. + this.appointmentResponse = {}; + this.displayName = {}; + this.emailAddress = {}; + this.recipientType = {}; +} +Office._context_mailbox_item_emailUser = function () { + ///Gets the name associated with an email account. + this.name = {}; + ///Gets the SMTP email address of the email account. + this.userId = {}; +} +Office._context_mailbox_item_entities = function () { + ///Gets the physical addresses (street or mailing address) found in an email message or appointment. + ///Gets the contacts found in an email message or appointment. + ///Gets the email addresses found in an email message or appointment. + ///Gets the meeting suggestions found in an email message or appointment. + ///Gets the phone numbers found in an email message or appointment. + ///Gets the task suggestions found in an email message or appointment. + ///Gets the Internet URLs found in an email message or appointment. + this.addresses = new Array(""); + this.contacts = new Array(new Office._context_mailbox_item_contact()); + this.emailAddresses = new Array(""); + this.meetingSuggestions = new Array(new Office._context_mailbox_item_meetingSuggestion()); + this.phoneNumbers = new Array(new Office._context_mailbox_item_phoneNumber()); + this.taskSuggestions = new Array(new Office._context_mailbox_item_taskSuggestion()); + this.urls = new Array(""); +} +Office._context_mailbox_item_location = function () { + this.getAsync = function (options, callback) { + ///Gets the location of an appointment. + ///Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous request is complete. + + var result = new Office._Mailbox_AsyncResult("locationGetAsync"); + if (arguments.length == 1) { callback = options; } + callback(result); + }; + + this.setAsync = function (location, options, callback) { + ///Sets the subject of an item. + ///The location of the appointment. The string is limited to 255 characters. + ///Any optional parameters or state data passed to the method. Optional. + ///The method to call when the asynchronous request is complete. + + var result = new Office._Mailbox_AsyncResult(); + if (arguments.length == 2) { callback = options; } + callback(result); + } +} +Office._context_mailbox_item_meetingRequest = function () { + ///Gets the date and time that a meeting is to end. + ///Gets the location of the proposed meeting. + ///Gets a list of the optional attendees for the meeting. + ///Gets the required attendees for the meeting. + ///Gets a list of the resources required for the meeting. + ///Gets the date and time that the meeting is to begin. + this.end = new Date; + this.location = {}; + this.optionalAttendees = new Array(new Office._context_mailbox_item_emailAddressDetails()); + this.requiredAttendees = new Array(new Office._context_mailbox_item_emailAddressDetails()); + this.resources = new Array(""); + this.start = new Date(); +} +Office._context_mailbox_item_meetingSuggestion = function () { + ///Gets the attendees for a suggested meeting. + ///Gets the date and time that a suggested meeting is to end. + ///Gets the location of a suggested meeting. + ///Gets a string that was identified as a meeting suggestion. + ///Gets the date and time that a suggested meeting is to begin. + ///Gets the subject of a suggested meeting. + this.attendees = new Array(new Office._Context_mailbox_item_emailAddressDetails()); + this.end = new Date(); + this.location = {}; + this.meetingString = {}; + this.start = new Date(); + this.subject = {}; +} +Office._context_mailbox_item_recipients = function () { + this.addAsync = function (recipients, options, callback) { + ///Adds recipients to an item. + /// + /// An array containing the recipients of the item. It can be: + /// An array of strings containing the SMTP email addresses of the recipients. + /// An array of {"diplayName":, "emailAddress":} dictionaries. + /// An array of EmailAddressDetail objects. + /// + ///Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous request is complete. + + var result = new Office._Mailbox_AsyncResult(); + if (arguments.length == 2) { callback = options; } + callback(result); + }; + this.getAsync = function (options, callback) { + ///Gets the list of recipients for the item. + ///Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous request is complete. + + var result = new Office._Mailbox_AsyncResult("recipientGetAsync"); + if (arguments.length == 1) { callback = options; } + callback(result); + }; + this.setAsync = function (recipients, options, callback) { + ///Sets the recipients of an item. + /// + /// An array containing the recipients of the item. The array is limited to 100 entries. It can be: + /// An array of strings containing the SMTP email addresses of the recipients. + /// An array of {"diplayName":, "emailAddress":} dictionaries. + /// An array of EmailAddressDetail objects. + /// + ///Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous request is complete. + + var result = new Office._Mailbox_AsyncResult(); + if (arguments.length == 2) { callback = options; } + callback(result); + } +} +Office._context_mailbox_item_phoneNumber = function () { + ///Gets the text that was identified in an item as a phone number. + ///Gets a text string identified as a phone number. + ///Gets the type of a phone number. + this.originalPhoneString = {}; + this.phoneString = {}; + this.type = {}; +} +Office._context_mailbox_item_subject = function () { + this.getAsync = function (options, callback) { + ///Gets the subject of an item. + ///Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous request is complete. + + var result = new Office._Mailbox_AsyncResult("subjectGetAsync"); + if (arguments.length = 1) { callback = options; } + callback(result); + }; + + this.setAsync = function (data, options, callback) { + ///Sets the subject of an item. + ///The subject of the item. The string is limited to 255 characters. + ///Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous request is complete. + + var result = new Office._Mailbox_AsyncResult(); + if (arguments.length == 2) { callback = options; } + callback(result); + } +} +Office._context_mailbox_item_taskSuggestion = function () { + ///Gets the users that should be assigned a suggested task. + ///Gets the text of an item that was identified as a task suggestion. + this.assignees = new Array(new Office._context_mailbox_item_emailAddressDetails()); + this.taskString = {}; +} +Office._context_mailbox_item_time = function () { + this.getAsync = function (options, callback) { + ///Gets the UTC value of a time. + ///Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous request is complete. + + var result = new Office._Mailbox_AsyncResult("subjectGetAsync"); + if (arguments.length == 1) { callback = options; } + callback(result); + }; + + this.setAsync = function (dateTime, options, callback) { + ///Sets the subject of an item. + ///The date and time to set in UTC. + ///Any optional parameters or state data passed to the method. + ///The method to call when the asynchronous request is complete. + + var result = new Office._Mailbox_AsyncResult(); + if (arguments.length == 2) { callback = options; } + callback(result); + } +} +Office._context_mailbox_userProfile = function () { + ///Gets the user's display name. + ///Gets the user's SMTP email address. + ///Gets the user's local time zone. + this.displayName = {}; + this.emailAddress = {}; + this.timeZone = {}; +} + +Office._context_mailbox_selectedDataResult = function () { + ///The selected text. + ///Indicates whether the data is from the item's subject line or body. + this.data = {}; + this.sourceProperty = {}; +} + +Office._Mailbox_AsyncResult = function (method) { + ///The userContext parameter passed to the callback function. + ///Any error that occured while processing the asynchronous request. + ///The status of the asynchronous request. + this.asyncContext = {}; + this.error = {}; + this.status = {}; + + if (method == "attachmentAsync") { + this.value = {} + intellisense.annotate(this, { + ///The identifier of the attachment. + value: null + }); + } + + if (method == "getCallbackTokenAsync") { + this.value = {}; + intellisense.annotate(this, { + ///The EWS callback token. + value: null + }); + } + + if (method == "getUserIdentityTokenAsync") { + this.value = {} + intellisense.annotate(this, { + ///A JSON Web token that identifies the current user. + value: null + }); + } + + if (method == "makeEwsRequestAsync") { + this.value = {}; + intellisense.annotate(this, { + ///The XML response from the EWS operation. + value: null + }); + } + + if (method == "loadCustomPropertiesAsync") { + this.value = new Office._context_mailbox_item_customProperties(); + intellisense.annotate(this, { + ///The custom properties + value: null + }); + } + + if (method == "bodyGetTypeAsync") { + this.value = {}; + annotate(this, { + ///A value that indicates whether the body is text or HTML. + value: undefined + }); + } + + if (method == "locationGetAsync") { + this.value = {}; + intellisense.annotate(this, { + ///The location of the appointment. + value: undefined + }); + } + + if (method == "recipientGetAsync") { + this.value = {}; + intellisense.annotate(this, { + ///An array of EmailAddressDetails objects containt the recipients of the item. + value: undefined + }); + } + + if (method == "subjectGetAsync") { + this.value = {}; + intellisense.annotate(this, { + ///The subject of the item. + value: undefined + }); + } + + if (method == "getSelectedDataAsync") { + this.value = new Office._context_mailbox_selectedDataResult(); + intellisense.annotate(this, { + ///The selected data. + value:undefined + }); + } +} + +Office._MailboxEnums = function () { + this.AttachmentType = { + ///Specifies that the attachment is a file. + File: "file", + ///Specifies that the attachment is an email message, appointment, or task. + Item: "item" + }; + this.BodyType = { + ///Specifies that the item body is in HTML format. + HTML: "HTML", + ///Specifies that the item body is text format. + Text: "text" + }; + this.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 SMTP email address. + EmailAddress: "emailAddress", + ///Specifies that the entity is an Internet URL. + Url: "url", + ///Specifies that the entity is US phone number. + PhoneNumber: "phoneNumber", + ///Specifies that the entity is a contact. + Contact: "contact" + }; + this.ItemType = { + ///Specifies a message item. This is an IPM.Note type. + Message: "message", + ///Specifies an appointment item. This is an IPM.Appointment type. + Appointment: "appointment" + }; + this.SourceProperty = { + ///Specifies that the source of the text is the body of an appointment or message. + MailBody: "mailBody", + ///Specifies that the source of the text is the subject of an appointment or message. + MailSubject: "mailSubject" + }; + this.RecipientType = { + ///Specifies that the recipient is not one of the other recipient types. + Other: "other", + ///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" + }; + this.ResponseType = { + ///Specifies that no response has been received. + None: "none", + ///Specifies that you are the meeting organizer. + Organizer: "organizer", + ///Specifies that the attendee is tentatively attending. + Tentative: "tentative", + ///Specifies that the attendee is attending. + Accepted: "accepted", + ///Specifies that the attendee is not attending. + Declined: "declined" + }; +}; \ No newline at end of file diff --git a/dist/telemetry b/dist/telemetry new file mode 100644 index 000000000..e799e5eb5 --- /dev/null +++ b/dist/telemetry @@ -0,0 +1 @@ +var oteljs_agave=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=31)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Unspecified=0]="Unspecified",e[e.String=1]="String",e[e.Int64=2]="Int64",e[e.Double=3]="Double",e[e.Boolean=4]="Boolean",e[e.Date=5]="Date"}(t.AWTPropertyType||(t.AWTPropertyType={})),function(e){e[e.NotSet=0]="NotSet",e[e.DistinguishedName=1]="DistinguishedName",e[e.GenericData=2]="GenericData",e[e.IPV4Address=3]="IPV4Address",e[e.IPv6Address=4]="IPv6Address",e[e.MailSubject=5]="MailSubject",e[e.PhoneNumber=6]="PhoneNumber",e[e.QueryString=7]="QueryString",e[e.SipAddress=8]="SipAddress",e[e.SmtpAddress=9]="SmtpAddress",e[e.Identity=10]="Identity",e[e.Uri=11]="Uri",e[e.Fqdn=12]="Fqdn",e[e.IPV4AddressLegacy=13]="IPV4AddressLegacy"}(t.AWTPiiKind||(t.AWTPiiKind={})),function(e){e[e.NotSet=0]="NotSet",e[e.GenericContent=1]="GenericContent"}(t.AWTCustomerContentKind||(t.AWTCustomerContentKind={})),function(e){e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Immediate_sync=5]="Immediate_sync"}(t.AWTEventPriority||(t.AWTEventPriority={})),function(e){e[e.NonRetryableStatus=1]="NonRetryableStatus",e[e.QueueFull=3]="QueueFull",e[e.MaxRetryLimit=4]="MaxRetryLimit"}(t.AWTEventsDroppedReason||(t.AWTEventsDroppedReason={})),function(e){e[e.InvalidEvent=1]="InvalidEvent",e[e.SizeLimitExceeded=2]="SizeLimitExceeded",e[e.KillSwitch=3]="KillSwitch"}(t.AWTEventsRejectedReason||(t.AWTEventsRejectedReason={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);t.AWTPropertyType=i.AWTPropertyType,t.AWTPiiKind=i.AWTPiiKind,t.AWTEventPriority=i.AWTEventPriority,t.AWTEventsDroppedReason=i.AWTEventsDroppedReason,t.AWTEventsRejectedReason=i.AWTEventsRejectedReason,t.AWTCustomerContentKind=i.AWTCustomerContentKind;var r=n(6);t.AWTUserIdType=r.AWTUserIdType,t.AWTSessionState=r.AWTSessionState;var o=n(12);t.AWT_BEST_EFFORT=o.AWT_BEST_EFFORT,t.AWT_NEAR_REAL_TIME=o.AWT_NEAR_REAL_TIME,t.AWT_REAL_TIME=o.AWT_REAL_TIME;var s=n(7);t.AWTEventProperties=s.default;var a=n(13);t.AWTLogger=a.default;var u=n(17);t.AWTLogManager=u.default;var c=n(30);t.AWTTransmissionManager=c.default;var l=n(15);t.AWTSerializer=l.default;var d=n(9);t.AWTSemanticContext=d.default,t.AWT_COLLECTOR_URL_UNITED_STATES="https://us.pipe.aria.microsoft.com/Collector/3.0/",t.AWT_COLLECTOR_URL_GERMANY="https://de.pipe.aria.microsoft.com/Collector/3.0/",t.AWT_COLLECTOR_URL_JAPAN="https://jp.pipe.aria.microsoft.com/Collector/3.0/",t.AWT_COLLECTOR_URL_AUSTRALIA="https://au.pipe.aria.microsoft.com/Collector/3.0/",t.AWT_COLLECTOR_URL_EUROPE="https://eu.pipe.aria.microsoft.com/Collector/3.0/",t.AWT_COLLECTOR_URL_USGOV_DOD="https://pf.pipe.aria.microsoft.com/Collector/3.0",t.AWT_COLLECTOR_URL_USGOV_DOJ="https://tb.pipe.aria.microsoft.com/Collector/3.0"},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),r=n(0),o=/[xy]/g;t.EventNameAndTypeRegex=/^[a-zA-Z]([a-zA-Z0-9]|_){2,98}[a-zA-Z0-9]$/,t.EventNameDotRegex=/\./g,t.PropertyNameRegex=/^[a-zA-Z](([a-zA-Z0-9|_|\.]){0,98}[a-zA-Z0-9])?$/,t.StatsApiKey="a387cfcf60114a43a7699f9fbb49289e-9bceb9fe-1c06-460f-96c5-6a0b247358bc-7238";var s=null,a=null,u=null;function c(e){return"string"==typeof e}function l(e){return"number"==typeof e}function d(e){return"boolean"==typeof e}function p(e){return e instanceof Date}function f(e){return 1e4*(e+621355968e5)}function _(){return!("undefined"==typeof navigator||!navigator.product)&&"ReactNative"===navigator.product}function h(){return"object"==typeof self&&"ServiceWorkerGlobalScope"===self.constructor.name}function v(e){return e<10?"0"+e:e.toString()}function y(e){return null==e||""===e}t.numberToBondInt64=function(e){var t=new i.Int64("0");return t.low=4294967295&e,t.high=Math.floor(e/4294967296),t},t.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(o,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},t.isString=c,t.isNumber=l,t.isBoolean=d,t.isDate=p,t.msToTicks=f,t.getTenantId=function(e){var t=e.indexOf("-");return t>-1?e.substring(0,t):""},t.isBeaconsSupported=function(){return null===s&&(s="undefined"!=typeof navigator&&Boolean(navigator.sendBeacon)),s},t.isUint8ArrayAvailable=function(){return null===a&&(a="undefined"!=typeof Uint8Array&&!function(){if("undefined"!=typeof navigator&&navigator.userAgent){var e=navigator.userAgent.toLowerCase();if((e.indexOf("safari")>=0||e.indexOf("firefox")>=0)&&e.indexOf("chrome")<0)return!0}return!1}()&&!_()),a},t.isPriority=function(e){return!(!l(e)||!(e>=1&&e<=3||5===e))},t.sanitizeProperty=function(e,n){return!t.PropertyNameRegex.test(e)||y(n)?null:(y(n.value)&&(n={value:n,type:r.AWTPropertyType.Unspecified}),n.type=function(e,t){switch(t=function(e){if(l(e)&&e>=0&&e<=4)return!0;return!1}(t)?t:r.AWTPropertyType.Unspecified){case r.AWTPropertyType.Unspecified:return function(e){switch(typeof e){case"string":return r.AWTPropertyType.String;case"boolean":return r.AWTPropertyType.Boolean;case"number":return r.AWTPropertyType.Double;case"object":return p(e)?r.AWTPropertyType.Date:null}return null}(e);case r.AWTPropertyType.String:return c(e)?t:null;case r.AWTPropertyType.Boolean:return d(e)?t:null;case r.AWTPropertyType.Date:return p(e)&&NaN!==e.getTime()?t:null;case r.AWTPropertyType.Int64:return l(e)&&e%1==0?t:null;case r.AWTPropertyType.Double:return l(e)?t:null}return null}(n.value,n.type),n.type?(p(n.value)&&(n.value=f(n.value.getTime())),n.pii>0&&n.cc>0?null:n.pii?function(e){if(l(e)&&e>=0&&e<=13)return!0;return!1}(n.pii)?n:null:n.cc?function(e){if(l(e)&&e>=0&&e<=1)return!0;return!1}(n.cc)?n:null:n):null)},t.getISOString=function(e){return e.getUTCFullYear()+"-"+v(e.getUTCMonth()+1)+"-"+v(e.getUTCDate())+"T"+v(e.getUTCHours())+":"+v(e.getUTCMinutes())+":"+v(e.getUTCSeconds())+"."+function(e){if(e<10)return"00"+e;if(e<100)return"0"+e;return e.toString()}(e.getUTCMilliseconds())+"Z"},t.useXDomainRequest=function(){if(null===u){var e=new XMLHttpRequest;u=void 0===e.withCredentials&&"undefined"!=typeof XDomainRequest}return u},t.useFetchRequest=function(){return _()||h()},t.isReactNative=_,t.isServiceWorkerGlobalScope=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),r=n(0),o=n(11),s=n(14),a=n(7),u=n(17),c=n(3),l=function(){function e(){}return e.setEventsHandler=function(e){this._eventHandler=e},e.getEventsHandler=function(){return this._eventHandler},e.scheduleTimer=function(){var e=this,t=this._profiles[this._currentProfile][2];this._timeout<0&&t>=0&&!this._paused&&(this._eventHandler.hasEvents()?(0===t&&this._currentBackoffCount>0&&(t=1),this._timeout=setTimeout((function(){return e._batchAndSendEvents()}),t*(1<=0;--n)if(e[t][n]<0){for(var i=n;i>=0;--i)e[t][i]=-1;break}for(n=2;n>0;--n)if(e[t][n]>0&&e[t][n-1]>0){var r=e[t][n-1]/e[t][n];e[t][n-1]=Math.ceil(r)*e[t][n]}this._profiles[t]=e[t]}},e.sendEvent=function(e){this._newEventsAllowed&&(this._currentBackoffCount>0&&e.priority===r.AWTEventPriority.Immediate_sync&&(e.priority=r.AWTEventPriority.High),this._eventHandler.addEvent(e),this.scheduleTimer())},e.flush=function(e){var t=(new Date).getTime();!this._paused&&this._lastUploadNowCall+3e4-1&&(clearTimeout(this._timeout),this._timeout=-1),this._eventHandler.uploadNow(e))},e.pauseTransmission=function(){this._paused||(this.clearTimeout(),this._eventHandler.pauseTransmission(),this._paused=!0)},e.resumeTransmision=function(){this._paused&&(this._paused=!1,this._eventHandler.resumeTransmission(),this.scheduleTimer())},e.flushAndTeardown=function(){s.default.teardown(),this._newEventsAllowed=!1,this.clearTimeout(),this._eventHandler.teardown()},e.backOffTransmission=function(){this._currentBackoffCount<4&&(this._currentBackoffCount++,this.clearTimeout(),this.scheduleTimer())},e.clearBackOff=function(){this._currentBackoffCount>0&&(this._currentBackoffCount=0,this.clearTimeout(),this.scheduleTimer())},e._resetTransmitProfiles=function(){this.clearTimeout(),this._initializeProfiles(),this._currentProfile=i.AWT_REAL_TIME,this.scheduleTimer()},e.clearTimeout=function(){this._timeout>0&&(clearTimeout(this._timeout),this._timeout=-1,this._timerCount=0)},e._batchAndSendEvents=function(){var e=r.AWTEventPriority.High;this._timerCount++,this._timerCount*this._profiles[this._currentProfile][2]===this._profiles[this._currentProfile][0]?(e=r.AWTEventPriority.Low,this._timerCount=0):this._timerCount*this._profiles[this._currentProfile][2]===this._profiles[this._currentProfile][1]&&(e=r.AWTEventPriority.Normal),this._eventHandler.sendEventsForPriorityAndAbove(e),this._timeout=-1,this.scheduleTimer()},e._initializeProfiles=function(){this._profiles={},this._profiles[i.AWT_REAL_TIME]=[4,2,1],this._profiles[i.AWT_NEAR_REAL_TIME]=[12,6,3],this._profiles[i.AWT_BEST_EFFORT]=[36,18,9]},e._newEventsAllowed=!1,e._currentProfile=i.AWT_REAL_TIME,e._timeout=-1,e._currentBackoffCount=0,e._paused=!1,e._timerCount=0,e._lastUploadNowCall=0,e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.addNotificationListener=function(e){this.listeners.push(e)},e.removeNotificationListener=function(e){for(var t=this.listeners.indexOf(e);t>-1;)this.listeners.splice(t,1),t=this.listeners.indexOf(e)},e.eventsSent=function(e){for(var t=this,n=function(n){i.listeners[n].eventsSent&&setTimeout((function(){return t.listeners[n].eventsSent(e)}),0)},i=this,r=0;r=0&&n<=12)this._addContext("UserInfo.IdType",n.toString());else{var i=void 0;switch(t){case r.AWTPiiKind.SipAddress:i=o.AWTUserIdType.SipAddress;break;case r.AWTPiiKind.PhoneNumber:i=o.AWTUserIdType.PhoneNumber;break;case r.AWTPiiKind.SmtpAddress:i=o.AWTUserIdType.EmailAddress;break;default:i=o.AWTUserIdType.Unknown}this._addContext("UserInfo.IdType",i.toString())}if(isNaN(t)||null===t||t===r.AWTPiiKind.NotSet||t>13)switch(n){case o.AWTUserIdType.Skype:t=r.AWTPiiKind.Identity;break;case o.AWTUserIdType.EmailAddress:t=r.AWTPiiKind.SmtpAddress;break;case o.AWTUserIdType.PhoneNumber:t=r.AWTPiiKind.PhoneNumber;break;case o.AWTUserIdType.SipAddress:t=r.AWTPiiKind.SipAddress;break;default:t=r.AWTPiiKind.NotSet}this._addContextWithPii("UserInfo.Id",e,t)},e.prototype.setUserAdvertisingId=function(e){this._addContext("UserInfo.AdvertisingId",e)},e.prototype.setUserTimeZone=function(e){this._addContext("UserInfo.TimeZone",e)},e.prototype.setUserLanguage=function(e){this._addContext("UserInfo.Language",e)},e.prototype._addContext=function(e,t){"string"==typeof t&&this._properties.setProperty(e,t)},e.prototype._addContextWithPii=function(e,t,n){"string"==typeof t&&this._properties.setPropertyWithPii(e,t,n)},e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r="MicrosoftApplicationsTelemetryDeviceId",o="MicrosoftApplicationsTelemetryFirstLaunchTime",s="MSIE",a="Chrome",u="Firefox",c="Safari",l="Edge",d="Electron",p="SkypeShell",f="PhantomJS",_="Opera",h="Windows",v="Mac OS X",y="Windows Phone",g="Windows RT",T="iOS",m="Android",S="Linux",A="Chrome OS",E=/(windows|win32)/i,P=/ arm;/i,I=/windows\sphone\s\d+\.\d+/i,W=/(macintosh|mac os x)/i,b=/(iPad|iPhone|iPod)(?=.*like Mac OS X)/i,w=/(linux|joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)/i,C=/android/i,B=/CrOS/i,O={5.1:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1","10.0":"10"},k=function(){function e(){}return e.addPropertyStorageOverride=function(e){return!!e&&(this._propertyStorage=e,!0)},e.autoCollect=function(e,t,n){if(this._semanticContext=e,this._disableCookies=t,this._autoCollect(),n||"undefined"==typeof navigator||(n=navigator.userAgent||""),this._autoCollectFromUserAgent(n),this._disableCookies&&!this._propertyStorage)return this._deleteCookie(r),void this._deleteCookie(o);(this._propertyStorage||this._areCookiesAvailable&&!this._disableCookies)&&this._autoCollectDeviceId()},e.checkAndSaveDeviceId=function(e){if(e){var t=this._getData(r),n=this._getData(o);t!==e&&(n=i.getISOString(new Date)),this._saveData(r,e),this._saveData(o,n),this._setFirstLaunchTime(n)}},e._autoCollectDeviceId=function(){var e=this._getData(r);e||(e=i.newGuid()),this._semanticContext.setDeviceId(e)},e._autoCollect=function(){"undefined"!=typeof document&&document.documentElement&&this._semanticContext.setAppLanguage(document.documentElement.lang),"undefined"!=typeof navigator&&this._semanticContext.setUserLanguage(navigator.userLanguage||navigator.language);var e=(new Date).getTimezoneOffset(),t=e%60,n=(e-t)/60,i="+";n>0&&(i="-"),n=Math.abs(n),t=Math.abs(t),this._semanticContext.setUserTimeZone(i+(n<10?"0"+n:n.toString())+":"+(t<10?"0"+t:t.toString()))},e._autoCollectFromUserAgent=function(e){if(e){var t=this._getBrowserName(e);this._semanticContext.setDeviceBrowserName(t),this._semanticContext.setDeviceBrowserVersion(this._getBrowserVersion(e,t));var n=this._getOsName(e);this._semanticContext.setDeviceOsName(n),this._semanticContext.setDeviceOsVersion(this._getOsVersion(e,n))}},e._getBrowserName=function(e){return this._userAgentContainsString("OPR/",e)?_:this._userAgentContainsString(f,e)?f:this._userAgentContainsString(l,e)||this._userAgentContainsString("Edg",e)?l:this._userAgentContainsString(d,e)?d:this._userAgentContainsString(a,e)?a:this._userAgentContainsString("Trident",e)?s:this._userAgentContainsString(u,e)?u:this._userAgentContainsString(c,e)?c:this._userAgentContainsString(p,e)?p:"Unknown"},e._setFirstLaunchTime=function(e){if(!isNaN(e)){var t=new Date;t.setTime(parseInt(e,10)),e=i.getISOString(t)}this.firstLaunchTime=e},e._userAgentContainsString=function(e,t){return t.indexOf(e)>-1},e._getBrowserVersion=function(e,t){if(t===s)return this._getIeVersion(e);if(t===l){var n=this._getOtherVersion(t,e);return"Unknown"===n?this._getOtherVersion("Edg",e):n}return this._getOtherVersion(t,e)},e._getIeVersion=function(e){var t=e.match(new RegExp(s+" ([\\d,.]+)"));if(t)return t[1];var n=e.match(new RegExp("rv:([\\d,.]+)"));return n?n[1]:void 0},e._getOtherVersion=function(e,t){e===c&&(e="Version");var n=t.match(new RegExp(e+"/([\\d,.]+)"));return n?n[1]:"Unknown"},e._getOsName=function(e){return e.match(I)?y:e.match(P)?g:e.match(b)?T:e.match(C)?m:e.match(w)?S:e.match(W)?v:e.match(E)?h:e.match(B)?A:"Unknown"},e._getOsVersion=function(e,t){return t===h?this._getGenericOsVersion(e,"Windows NT"):t===m?this._getGenericOsVersion(e,t):t===v?this._getMacOsxVersion(e):"Unknown"},e._getGenericOsVersion=function(e,t){var n=e.match(new RegExp(t+" ([\\d,.]+)"));return n?O[n[1]]?O[n[1]]:n[1]:"Unknown"},e._getMacOsxVersion=function(e){var t=e.match(new RegExp(v+" ([\\d,_,.]+)"));if(t){var n=t[1].replace(/_/g,".");if(n){var i=this._getDelimiter(n);return i?n.split(i)[0]:n}}return"Unknown"},e._getDelimiter=function(e){return e.indexOf(".")>-1?".":e.indexOf("_")>-1?"_":null},e._saveData=function(e,t){if(this._propertyStorage)this._propertyStorage.setProperty(e,t);else if(this._areCookiesAvailable){var n=new Date;n.setTime(n.getTime()+31536e6);var i="expires="+n.toUTCString();document.cookie=e+"="+t+"; "+i}},e._getData=function(e){if(this._propertyStorage)return this._propertyStorage.getProperty(e)||"";if(this._areCookiesAvailable){e+="=";for(var t=document.cookie.split(";"),n=0;n0||this._inboundQueues[i.AWTEventPriority.Normal][0].length>0||this._inboundQueues[i.AWTEventPriority.Low][0].length>0||this._batcher.hasBatch())&&this._httpManager.hasIdleConnection()},e.prototype.addBackRequest=function(e){if(!this._paused||!this._shouldDropEventsOnPause){for(var t in e)if(e.hasOwnProperty(t))for(var n=0;n0)return a.default.eventsDropped([this._inboundQueues[t][this._inboundQueues[t].length-1].shift()],i.AWTEventsDroppedReason.QueueFull),!0;t++}return!1},e.prototype._batchEvents=function(e){for(var t=i.AWTEventPriority.High;t>=e;){for(;this._inboundQueues[t][0].length>0;){var n=this._inboundQueues[t][0].pop();this._queueSize--,this._batcher.addEventToBatch(n)}t--}this._batcher.flushBatch()},e.prototype._uploadNow=function(e){var t=this;this.hasEvents()&&this.sendEventsForPriorityAndAbove(i.AWTEventPriority.Low),this._checkOutboundQueueEmptyAndSent((function(){t._removeFirstQueues(),null!=e&&e(),t._uploadNowQueue.length>0?setTimeout((function(){return t._uploadNow(t._uploadNowQueue.shift())}),0):(t._isCurrentlyUploadingNow=!1,t.hasEvents()&&o.default.scheduleTimer())}))},e.prototype._checkOutboundQueueEmptyAndSent=function(e){var t=this;this._httpManager.isCompletelyIdle()?e():setTimeout((function(){return t._checkOutboundQueueEmptyAndSent(e)}),250)},e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AWT_REAL_TIME="REAL_TIME",t.AWT_NEAR_REAL_TIME="NEAR_REAL_TIME",t.AWT_BEST_EFFORT="BEST_EFFORT"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n(6),o=n(7),s=n(3),a=n(14),u=n(5),c=n(4),l=n(18),d=n(16),p=n(9),f=n(10),_=function(){function e(e){this._apiKey=e,this._contextProperties=new o.default,this._semanticContext=new p.default(!1,this._contextProperties),this._sessionStartTime=0,this._createInitId()}return e.prototype.setContext=function(e,t,n){void 0===n&&(n=i.AWTPropertyType.Unspecified),this._contextProperties.setProperty(e,t,n)},e.prototype.setContextWithPii=function(e,t,n,r){void 0===r&&(r=i.AWTPropertyType.Unspecified),this._contextProperties.setPropertyWithPii(e,t,n,r)},e.prototype.setContextWithCustomerContent=function(e,t,n,r){void 0===r&&(r=i.AWTPropertyType.Unspecified),this._contextProperties.setPropertyWithCustomerContent(e,t,n,r)},e.prototype.getSemanticContext=function(){return this._semanticContext},e.prototype.logEvent=function(t){if(l.default.loggingEnabled){this._apiKey||(this._apiKey=l.default.defaultTenantToken,this._createInitId());var n=!0;s.isString(t)?t={name:t}:t instanceof o.default&&(t=t.getEvent(),n=!1),a.default.eventReceived(this._apiKey),e._logEvent(e._getInternalEvent(t,this._apiKey,n),this._contextProperties)}},e.prototype.logSession=function(t,n){if(l.default.sessionEnabled){var o={name:"session",type:"session",properties:{}};if(e._addPropertiesToEvent(o,n),o.priority=i.AWTEventPriority.High,t===r.AWTSessionState.Started){if(this._sessionStartTime>0)return;this._sessionStartTime=(new Date).getTime(),this._sessionId=s.newGuid(),this.setContext("Session.Id",this._sessionId),o.properties["Session.State"]="Started"}else{if(t!==r.AWTSessionState.Ended)return;if(0===this._sessionStartTime)return;var a=Math.floor(((new Date).getTime()-this._sessionStartTime)/1e3);o.properties["Session.Id"]=this._sessionId,o.properties["Session.State"]="Ended",o.properties["Session.Duration"]=a.toString(),o.properties["Session.DurationBucket"]=e._getSessionDurationFromTime(a),this._sessionStartTime=0,this.setContext("Session.Id",null),this._sessionId=void 0}o.properties["Session.FirstLaunchTime"]=f.default.firstLaunchTime,this.logEvent(o)}},e.prototype.getSessionId=function(){return this._sessionId},e.prototype.logFailure=function(t,n,r,o,s){if(t&&n){var a={name:"failure",type:"failure",properties:{}};e._addPropertiesToEvent(a,s),a.properties["Failure.Signature"]=t,a.properties["Failure.Detail"]=n,r&&(a.properties["Failure.Category"]=r),o&&(a.properties["Failure.Id"]=o),a.priority=i.AWTEventPriority.High,this.logEvent(a)}},e.prototype.logPageView=function(t,n,i,r,o,s){if(t&&n){var a={name:"pageview",type:"pageview",properties:{}};e._addPropertiesToEvent(a,s),a.properties["PageView.Id"]=t,a.properties["PageView.Name"]=n,i&&(a.properties["PageView.Category"]=i),r&&(a.properties["PageView.Uri"]=r),o&&(a.properties["PageView.ReferrerUri"]=o),this.logEvent(a)}},e.prototype._createInitId=function(){!e._initIdMap[this._apiKey]&&this._apiKey&&(e._initIdMap[this._apiKey]=s.newGuid())},e._addPropertiesToEvent=function(e,t){if(t)for(var n in t instanceof o.default&&(t=t.getEvent()),t.name&&(e.name=t.name),t.priority&&(e.priority=t.priority),t.properties)t.properties.hasOwnProperty(n)&&(e.properties[n]=t.properties[n])},e._getSessionDurationFromTime=function(e){return e<0?"Undefined":e<=3?"UpTo3Sec":e<=10?"UpTo10Sec":e<=30?"UpTo30Sec":e<=60?"UpTo60Sec":e<=180?"UpTo3Min":e<=600?"UpTo10Min":e<=1800?"UpTo30Min":"Above30Min"},e._logEvent=function(e,t){e.name&&s.isString(e.name)?(e.name=e.name.toLowerCase(),e.name=e.name.replace(s.EventNameDotRegex,"_"),e.type&&s.isString(e.type)?e.type=e.type.toLowerCase():e.type="custom",s.EventNameAndTypeRegex.test(e.name)&&s.EventNameAndTypeRegex.test(e.type)?((!s.isNumber(e.timestamp)||e.timestamp<0)&&(e.timestamp=(new Date).getTime()),e.properties||(e.properties={}),this._addContextIfAbsent(e,t.getPropertyMap()),this._addContextIfAbsent(e,l.default.logManagerContext.getPropertyMap()),this._setDefaultProperty(e,"EventInfo.InitId",this._getInitId(e.apiKey)),this._setDefaultProperty(e,"EventInfo.Sequence",this._getSequenceId(e.apiKey)),this._setDefaultProperty(e,"EventInfo.SdkVersion",d.FullVersionString),this._setDefaultProperty(e,"EventInfo.Name",e.name),this._setDefaultProperty(e,"EventInfo.Time",new Date(e.timestamp).toISOString()),s.isPriority(e.priority)||(e.priority=i.AWTEventPriority.Normal),this._sendEvent(e)):u.default.eventsRejected([e],i.AWTEventsRejectedReason.InvalidEvent)):u.default.eventsRejected([e],i.AWTEventsRejectedReason.InvalidEvent)},e._addContextIfAbsent=function(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e.properties[n]||(e.properties[n]=t[n]))},e._setDefaultProperty=function(e,t,n){e.properties[t]={value:n,pii:i.AWTPiiKind.NotSet,type:i.AWTPropertyType.String}},e._sendEvent=function(e){c.default.sendEvent(e)},e._getInternalEvent=function(e,t,n){if(e.properties=e.properties||{},n)for(var i in e.properties)e.properties.hasOwnProperty(i)&&(e.properties[i]=s.sanitizeProperty(i,e.properties[i]),null===e.properties[i]&&delete e.properties[i]);var r=e;return r.id=s.newGuid(),r.apiKey=t,r},e._getInitId=function(t){return e._initIdMap[t]},e._getSequenceId=function(t){return void 0===e._sequenceIdMap[t]&&(e._sequenceIdMap[t]=0),(++e._sequenceIdMap[t]).toString()},e._sequenceIdMap={},e._initIdMap={},e}();t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(5),o=n(0),s=function(){function e(){}return e.initialize=function(e){var t=this;this._sendStats=e,this._isInitalized=!0,r.default.addNotificationListener({eventsSent:function(e){t._addStat("records_sent_count",e.length,e[0].apiKey)},eventsDropped:function(e,n){switch(n){case o.AWTEventsDroppedReason.NonRetryableStatus:t._addStat("d_send_fail",e.length,e[0].apiKey),t._addStat("records_dropped_count",e.length,e[0].apiKey);break;case o.AWTEventsDroppedReason.MaxRetryLimit:t._addStat("d_retry_limit",e.length,e[0].apiKey),t._addStat("records_dropped_count",e.length,e[0].apiKey);break;case o.AWTEventsDroppedReason.QueueFull:t._addStat("d_queue_full",e.length,e[0].apiKey)}},eventsRejected:function(e,n){switch(n){case o.AWTEventsRejectedReason.InvalidEvent:t._addStat("r_inv",e.length,e[0].apiKey);break;case o.AWTEventsRejectedReason.KillSwitch:t._addStat("r_kl",e.length,e[0].apiKey);break;case o.AWTEventsRejectedReason.SizeLimitExceeded:t._addStat("r_size",e.length,e[0].apiKey)}t._addStat("r_count",e.length,e[0].apiKey)},eventsRetrying:null}),setTimeout((function(){return t.flush()}),6e4)},e.teardown=function(){this._isInitalized&&(this.flush(),this._isInitalized=!1)},e.eventReceived=function(t){e._addStat("records_received_count",1,t)},e.flush=function(){var e=this;if(this._isInitalized){for(var t in this._stats)this._stats.hasOwnProperty(t)&&this._sendStats(this._stats[t],t);this._stats={},setTimeout((function(){return e.flush()}),6e4)}},e._addStat=function(e,t,n){if(this._isInitalized&&n!==i.StatsApiKey){var r=i.getTenantId(n);this._stats[r]||(this._stats[r]={}),this._stats[r][e]?this._stats[r][e]=this._stats[r][e]+t:this._stats[r][e]=t}},e._isInitalized=!1,e._stats={},e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(20),r=n(0),o=n(5),s=n(3),a=function(){function e(){}return e.getPayloadBlob=function(e,t){var n,a=!1,u=new i.IO.MemoryStream,c=new i.CompactBinaryProtocolWriter(u);for(var l in c._WriteFieldBegin(i._BondDataType._BT_MAP,3,null),c._WriteMapContainerBegin(t,i._BondDataType._BT_STRING,i._BondDataType._BT_LIST),e)if(a)n||(n={}),n[l]=e[l],delete e[l];else if(e.hasOwnProperty(l)){c._WriteString(l);var d=e[l];c._WriteContainerBegin(1,i._BondDataType._BT_STRUCT),c._WriteFieldBegin(i._BondDataType._BT_STRING,2,null),c._WriteString("act_default_source"),c._WriteFieldBegin(i._BondDataType._BT_STRING,5,null),c._WriteString(s.newGuid()),c._WriteFieldBegin(i._BondDataType._BT_INT64,6,null),c._WriteInt64(s.numberToBondInt64(Date.now())),c._WriteFieldBegin(i._BondDataType._BT_LIST,8,null);var p=u._GetBuffer().length+1;c._WriteContainerBegin(e[l].length,i._BondDataType._BT_STRUCT);for(var f=u._GetBuffer().length-p,_=0;_2936012)o.default.eventsRejected([d[_]],r.AWTEventsRejectedReason.SizeLimitExceeded),d.splice(_--,1),u._GetBuffer().splice(h),this._addNewDataPackageSize(d.length,u,f,p);else if(u._GetBuffer().length>2936012){u._GetBuffer().splice(h),n||(n={}),e[l]=d.splice(0,_),n[l]=d,this._addNewDataPackageSize(e[l].length,u,f,p),a=!0;break}}c._WriteStructEnd(!1)}return c._WriteStructEnd(!1),{payloadBlob:u._GetBuffer(),remainingRequest:n}},e._addNewDataPackageSize=function(e,t,n,r){for(var o=i._Encoding._Varint_GetBytes(i.Number._ToUInt32(e)),s=0;s0)y[T]=S,g++;else if(S.pii>0)h[T]=S,v++;else switch(S.type){case r.AWTPropertyType.String:n[T]=S.value,o++;break;case r.AWTPropertyType.Int64:a[T]=S.value,u++;break;case r.AWTPropertyType.Double:c[T]=S.value,l++;break;case r.AWTPropertyType.Boolean:d[T]=S.value,p++;break;case r.AWTPropertyType.Date:f[T]=S.value,_++}}if(o)for(var T in t._WriteFieldBegin(i._BondDataType._BT_MAP,13,null),t._WriteMapContainerBegin(o,i._BondDataType._BT_STRING,i._BondDataType._BT_STRING),n)if(n.hasOwnProperty(T)){var m=n[T];t._WriteString(T),t._WriteString(m.toString())}if(v)for(var T in t._WriteFieldBegin(i._BondDataType._BT_MAP,30,null),t._WriteMapContainerBegin(v,i._BondDataType._BT_STRING,i._BondDataType._BT_STRUCT),h)if(h.hasOwnProperty(T)){var S=h[T];t._WriteString(T),t._WriteFieldBegin(i._BondDataType._BT_INT32,1,null),t._WriteInt32(1),t._WriteFieldBegin(i._BondDataType._BT_INT32,2,null),t._WriteInt32(S.pii),t._WriteFieldBegin(i._BondDataType._BT_STRING,3,null),t._WriteString(S.value.toString()),t._WriteStructEnd(!1)}if(p)for(var T in t._WriteFieldBegin(i._BondDataType._BT_MAP,31,null),t._WriteMapContainerBegin(p,i._BondDataType._BT_STRING,i._BondDataType._BT_BOOL),d)if(d.hasOwnProperty(T)){m=d[T];t._WriteString(T),t._WriteBool(m)}if(_)for(var T in t._WriteFieldBegin(i._BondDataType._BT_MAP,32,null),t._WriteMapContainerBegin(_,i._BondDataType._BT_STRING,i._BondDataType._BT_INT64),f)if(f.hasOwnProperty(T)){m=f[T];t._WriteString(T),t._WriteInt64(s.numberToBondInt64(m))}if(u)for(var T in t._WriteFieldBegin(i._BondDataType._BT_MAP,33,null),t._WriteMapContainerBegin(u,i._BondDataType._BT_STRING,i._BondDataType._BT_INT64),a)if(a.hasOwnProperty(T)){m=a[T];t._WriteString(T),t._WriteInt64(s.numberToBondInt64(m))}if(l)for(var T in t._WriteFieldBegin(i._BondDataType._BT_MAP,34,null),t._WriteMapContainerBegin(l,i._BondDataType._BT_STRING,i._BondDataType._BT_DOUBLE),c)if(c.hasOwnProperty(T)){m=c[T];t._WriteString(T),t._WriteDouble(m)}if(g)for(var T in t._WriteFieldBegin(i._BondDataType._BT_MAP,36,null),t._WriteMapContainerBegin(g,i._BondDataType._BT_STRING,i._BondDataType._BT_STRUCT),y)if(y.hasOwnProperty(T)){S=y[T];t._WriteString(T),t._WriteFieldBegin(i._BondDataType._BT_INT32,1,null),t._WriteInt32(S.cc),t._WriteFieldBegin(i._BondDataType._BT_STRING,2,null),t._WriteString(S.value.toString()),t._WriteStructEnd(!1)}t._WriteStructEnd(!1)},e.base64Encode=function(e){return i._Encoding._Base64_GetString(e)},e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Version="1.8.7",t.FullVersionString="AWT-Web-JS-"+t.Version},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n(6),o=n(18),s=n(13),a=n(4),u=n(5),c=n(10),l=function(){function e(){}return e.initialize=function(e,t){if(void 0===t&&(t={}),!this._isInitialized)return this._isInitialized=!0,o.default.defaultTenantToken=e,this._overrideValuesFromConfig(t),this._config.disableCookiesUsage&&!this._config.propertyStorageOverride&&(o.default.sessionEnabled=!1),c.default.addPropertyStorageOverride(this._config.propertyStorageOverride),c.default.autoCollect(o.default.semanticContext,this._config.disableCookiesUsage,this._config.userAgent),a.default.initialize(this._config),o.default.loggingEnabled=!0,this._config.enableAutoUserSession&&(this.getLogger().logSession(r.AWTSessionState.Started),window.addEventListener("beforeunload",this.flushAndTeardown)),this.getLogger()},e.getSemanticContext=function(){return o.default.semanticContext},e.flush=function(e){this._isInitialized&&!this._isDestroyed&&a.default.flush(e)},e.flushAndTeardown=function(){this._isInitialized&&!this._isDestroyed&&(this._config.enableAutoUserSession&&this.getLogger().logSession(r.AWTSessionState.Ended),a.default.flushAndTeardown(),o.default.loggingEnabled=!1,this._isDestroyed=!0)},e.pauseTransmission=function(){this._isInitialized&&!this._isDestroyed&&a.default.pauseTransmission()},e.resumeTransmision=function(){this._isInitialized&&!this._isDestroyed&&a.default.resumeTransmision()},e.setTransmitProfile=function(e){this._isInitialized&&!this._isDestroyed&&a.default.setTransmitProfile(e)},e.loadTransmitProfiles=function(e){this._isInitialized&&!this._isDestroyed&&a.default.loadTransmitProfiles(e)},e.setContext=function(e,t,n){void 0===n&&(n=i.AWTPropertyType.Unspecified),o.default.logManagerContext.setProperty(e,t,n)},e.setContextWithPii=function(e,t,n,r){void 0===r&&(r=i.AWTPropertyType.Unspecified),o.default.logManagerContext.setPropertyWithPii(e,t,n,r)},e.setContextWithCustomerContent=function(e,t,n,r){void 0===r&&(r=i.AWTPropertyType.Unspecified),o.default.logManagerContext.setPropertyWithCustomerContent(e,t,n,r)},e.getLogger=function(e){var t=e;return t&&t!==o.default.defaultTenantToken||(t=""),this._loggers[t]||(this._loggers[t]=new s.default(t)),this._loggers[t]},e.addNotificationListener=function(e){u.default.addNotificationListener(e)},e.removeNotificationListener=function(e){u.default.removeNotificationListener(e)},e._overrideValuesFromConfig=function(e){e.collectorUri&&(this._config.collectorUri=e.collectorUri),e.cacheMemorySizeLimitInNumberOfEvents>0&&(this._config.cacheMemorySizeLimitInNumberOfEvents=e.cacheMemorySizeLimitInNumberOfEvents),e.httpXHROverride&&e.httpXHROverride.sendPOST&&(this._config.httpXHROverride=e.httpXHROverride),e.propertyStorageOverride&&e.propertyStorageOverride.getProperty&&e.propertyStorageOverride.setProperty&&(this._config.propertyStorageOverride=e.propertyStorageOverride),e.userAgent&&(this._config.userAgent=e.userAgent),e.disableCookiesUsage&&(this._config.disableCookiesUsage=e.disableCookiesUsage),e.canSendStatEvent&&(this._config.canSendStatEvent=e.canSendStatEvent),e.enableAutoUserSession&&"undefined"!=typeof window&&window.addEventListener&&(this._config.enableAutoUserSession=e.enableAutoUserSession),e.clockSkewRefreshDurationInMins>0&&(this._config.clockSkewRefreshDurationInMins=e.clockSkewRefreshDurationInMins)},e._loggers={},e._isInitialized=!1,e._isDestroyed=!1,e._config={collectorUri:"https://browser.pipe.aria.microsoft.com/Collector/3.0/",cacheMemorySizeLimitInNumberOfEvents:1e4,disableCookiesUsage:!1,canSendStatEvent:function(e){return!0},clockSkewRefreshDurationInMins:0},e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),r=n(9),o=function(){function e(){}return e.logManagerContext=new i.default,e.sessionEnabled=!0,e.loggingEnabled=!1,e.defaultTenantToken="",e.semanticContext=new r.default(!0,e.logManagerContext),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n(15),o=n(26),s=n(27),a=n(28),u=n(16),c=n(3),l=n(5),d=n(4),p=function(){function e(e,t,n,i,r){var o=this;this._requestQueue=e,this._queueManager=n,this._httpInterface=i,this._urlString="?qsp=true&content-type=application%2Fbond-compact-binary&client-id=NO_AUTH&sdk-version="+u.FullVersionString,this._killSwitch=new s.default,this._paused=!1,this._useBeacons=!1,this._activeConnections=0,this._clockSkewManager=new a.default(r),c.isUint8ArrayAvailable()||(this._urlString+="&content-encoding=base64"),this._urlString=t+this._urlString,this._httpInterface||(this._useBeacons=!c.isReactNative(),this._httpInterface={sendPOST:function(e,t,n,i,r,s){try{if(c.useFetchRequest())fetch(e,{body:t,method:"POST"}).then((function(e){var t={};e.headers&&e.headers.forEach((function(e,n){t[n]=e})),r(e.status,t)})).catch((function(e){i(0,{})}));else if(c.useXDomainRequest()){var a=new XDomainRequest;a.open("POST",e),a.onload=function(){r(200,null)},a.onerror=function(){i(400,null)},a.ontimeout=function(){n(500,null)},a.send(t)}else{var u=new XMLHttpRequest;u.open("POST",e,!s),u.onload=function(){r(u.status,o._convertAllHeadersToMap(u.getAllResponseHeaders()))},u.onerror=function(){i(u.status,o._convertAllHeadersToMap(u.getAllResponseHeaders()))},u.ontimeout=function(){n(u.status,o._convertAllHeadersToMap(u.getAllResponseHeaders()))},u.send(t)}}catch(e){i(400,null)}}})}return e.prototype.hasIdleConnection=function(){return this._activeConnections<2},e.prototype.sendQueuedRequests=function(){for(;this.hasIdleConnection()&&!this._paused&&this._requestQueue.length>0&&this._clockSkewManager.allowRequestSending();)this._activeConnections++,this._sendRequest(this._requestQueue.shift(),0,!1);this.hasIdleConnection()&&d.default.scheduleTimer()},e.prototype.isCompletelyIdle=function(){return 0===this._activeConnections},e.prototype.teardown=function(){for(;this._requestQueue.length>0;)this._sendRequest(this._requestQueue.shift(),0,!0)},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1,this.sendQueuedRequests()},e.prototype.removeQueuedRequests=function(){this._requestQueue.length=0},e.prototype.sendSynchronousRequest=function(e,t){this._paused&&(e[t][0].priority=i.AWTEventPriority.High),this._activeConnections++,this._sendRequest(e,0,!1,!0)},e.prototype._sendRequest=function(e,t,n,o){var s=this;void 0===o&&(o=!1);try{if(this._paused)return this._activeConnections--,void this._queueManager.addBackRequest(e);var a=0,u="";for(var d in e)e.hasOwnProperty(d)&&(this._killSwitch.isTenantKilled(d)?(l.default.eventsRejected(e[d],i.AWTEventsRejectedReason.KillSwitch),delete e[d]):(u.length>0&&(u+=","),u+=d,a++));if(a>0){var p=r.default.getPayloadBlob(e,a);p.remainingRequest&&this._requestQueue.push(p.remainingRequest);var f=this._urlString+"&x-apikey="+u+"&client-time-epoch-millis="+Date.now().toString();this._clockSkewManager.shouldAddClockSkewHeaders()&&(f=f+"&time-delta-to-apply-millis="+this._clockSkewManager.getClockSkewHeaderValue());var _=void 0;for(var d in _=c.isUint8ArrayAvailable()?new Uint8Array(p.payloadBlob):r.default.base64Encode(p.payloadBlob),e)if(e.hasOwnProperty(d))for(var h=0;h0?e[d][h].sendAttempt++:e[d][h].sendAttempt=1;if(this._useBeacons&&n&&c.isBeaconsSupported()&&navigator.sendBeacon(f,_))return;this._httpInterface.sendPOST(f,_,(function(i,r){s._retryRequestIfNeeded(i,r,e,a,u,t,n,o)}),(function(i,r){s._retryRequestIfNeeded(i,r,e,a,u,t,n,o)}),(function(i,r){s._retryRequestIfNeeded(i,r,e,a,u,t,n,o)}),n||o)}else n||this._handleRequestFinished(!1,{},n,o)}catch(e){this._handleRequestFinished(!1,{},n,o)}},e.prototype._retryRequestIfNeeded=function(e,t,n,r,s,a,u,c){var p=this,f=!0;if(void 0!==e){if(t){var _=this._killSwitch.setKillSwitchTenants(t["kill-tokens"],t["kill-duration-seconds"]);this._clockSkewManager.setClockSkew(t["time-delta-millis"]);for(var h=0;h<_.length;++h)l.default.eventsRejected(n[_[h]],i.AWTEventsRejectedReason.KillSwitch),delete n[_[h]],r--}else this._clockSkewManager.setClockSkew(null);if(200===e)return void this._handleRequestFinished(!0,n,u,c);(!o.default.shouldRetryForStatus(e)||r<=0)&&(f=!1)}if(f)if(c)this._activeConnections--,n[s][0].priority=i.AWTEventPriority.High,this._queueManager.addBackRequest(n);else if(a<1){for(var v in n)n.hasOwnProperty(v)&&l.default.eventsRetrying(n[v]);setTimeout((function(){return p._sendRequest(n,a+1,!1)}),o.default.getMillisToBackoffForRetry(a))}else this._activeConnections--,d.default.backOffTransmission(),this._queueManager.addBackRequest(n);else this._handleRequestFinished(!1,n,u,c)},e.prototype._handleRequestFinished=function(e,t,n,r){for(var o in e&&d.default.clearBackOff(),t)t.hasOwnProperty(o)&&(e?l.default.eventsSent(t[o]):l.default.eventsDropped(t[o],i.AWTEventsDroppedReason.NonRetryableStatus));this._activeConnections--,r||n||this.sendQueuedRequests()},e.prototype._convertAllHeadersToMap=function(e){var t={};if(e)for(var n=e.split("\n"),i=0;i>8))},e.prototype._WriteInt32=function(e){e=r._Zigzag_EncodeZigzag32(e),this._WriteUInt32(e)},e.prototype._WriteInt64=function(e){this._WriteUInt64(r._Zigzag_EncodeZigzag64(e))},e.prototype._WriteString=function(e){if(""===e)this._WriteUInt32(0);else{var t=r._Utf8_GetBytes(e);this._WriteUInt32(t.length),this._stream._Write(t,0,t.length)}},e.prototype._WriteStructEnd=function(e){this._WriteUInt8(e?i._BondDataType._BT_STOP_BASE:i._BondDataType._BT_STOP)},e.prototype._WriteUInt32=function(e){var t=r._Varint_GetBytes(s.Number._ToUInt32(e));this._stream._Write(t,0,t.length)},e.prototype._WriteUInt64=function(e){var t=r._Varint64_GetBytes(e);this._stream._Write(t,0,t.length)},e.prototype._WriteUInt8=function(e){this._stream._WriteByte(s.Number._ToUInt8(e))},e}();t.CompactBinaryProtocolWriter=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e._BT_STOP=0]="_BT_STOP",e[e._BT_STOP_BASE=1]="_BT_STOP_BASE",e[e._BT_BOOL=2]="_BT_BOOL",e[e._BT_DOUBLE=8]="_BT_DOUBLE",e[e._BT_STRING=9]="_BT_STRING",e[e._BT_STRUCT=10]="_BT_STRUCT",e[e._BT_LIST=11]="_BT_LIST",e[e._BT_MAP=13]="_BT_MAP",e[e._BT_INT32=16]="_BT_INT32",e[e._BT_INT64=17]="_BT_INT64"}(t._BondDataType||(t._BondDataType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),r=n(23),o=n(24);t._Utf8_GetBytes=function(e){for(var t=[],n=0;n>6,128|63&i):i<55296||i>=57344?t.push(224|i>>12,128|i>>6&63,128|63&i):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++n)),t.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i))}return t},t._Base64_GetString=function(e){for(var t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=[],r=e.length%3,o=0,s=e.length-r;o>18&63),n.charAt(t>>12&63),n.charAt(t>>6&63),n.charAt(63&t)].join(""))}switch(r){case 1:a=e[e.length-1];i.push(n.charAt(a>>2)),i.push(n.charAt(a<<4&63)),i.push("==");break;case 2:var u=(e[e.length-2]<<8)+e[e.length-1];i.push(n.charAt(u>>10)),i.push(n.charAt(u>>4&63)),i.push(n.charAt(u<<2&63)),i.push("=")}return i.join("")},t._Varint_GetBytes=function(e){for(var t=[];4294967168&e;)t.push(127&e|128),e>>>=7;return t.push(127&e),t},t._Varint64_GetBytes=function(e){for(var t=e.low,n=e.high,i=[];n||4294967168&t;)i.push(127&t|128),t=(127&n)<<25|t>>>7,n>>>=7;return i.push(127&t),i},t._Double_GetBytes=function(e){if(o.BrowserChecker._IsDataViewSupport()){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e,!0);for(var n=[],i=0;i<8;++i)n.push(t.getUint8(i));return n}return r.FloatUtils._ConvertNumberToArray(e,!0)},t._Zigzag_EncodeZigzag32=function(e){return(e=i.Number._ToInt32(e))<<1^e>>31},t._Zigzag_EncodeZigzag64=function(e){var t=e.low,n=e.high,r=n<<1|t>>>31,o=t<<1;2147483648&n&&(r=~r,o=~o);var s=new i.UInt64("0");return s.low=o,s.high=r,s}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e._ConvertNumberToArray=function(e,t){if(!e)return t?this._doubleZero:this._floatZero;var n=t?52:23,i=(1<<(t?11:8)-1)-1,r=1-i,o=i,s=e<0?1:0;e=Math.abs(e);for(var a=Math.floor(e),u=e-a,c=2*(i+2)+n,l=new Array(c),d=0;d0;)(u*=2)>=1?(l[++d]=1,--u):l[++d]=0;for(var p=0;pp&&(l[d]=1-l[d],!l);--d);d===p&&++f}if(f>o||a)return s?t?this._doubleNegInifinity:this._floatNegInifinity:t?this._doubleInifinity:this._floatInifinity;if(f>8&255,v>>16&255,v>>>24,255&(h=s<<31|2147483647&(h|=f+i<<20)),h>>8&255,h>>16&255,h>>>24]}var y=0;for(d=0;d<23;++d)y=y<<1|l[++p];return[255&(y=s<<31|2147483647&(y|=f+i<<23)),y>>8&255,y>>16&255,y>>>24]},e._floatZero=[0,0,0,0],e._doubleZero=[0,0,0,0,0,0,0,0],e._floatInifinity=[0,0,128,127],e._floatNegInifinity=[0,0,128,255],e._doubleInifinity=[0,0,0,0,0,0,240,127],e._doubleNegInifinity=[0,0,0,0,0,0,240,255],e}();t.FloatUtils=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e._IsDataViewSupport=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},e}();t.BrowserChecker=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),r=function(){function e(){this._buffer=[]}return e.prototype._WriteByte=function(e){this._buffer.push(i.Number._ToByte(e))},e.prototype._Write=function(e,t,n){for(;n--;)this._WriteByte(e[t++])},e.prototype._GetBuffer=function(){return this._buffer},e}();t.MemoryStream=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.shouldRetryForStatus=function(e){return!(e>=300&&e<500&&408!==e||501===e||505===e)},e.getMillisToBackoffForRetry=function(e){var t,n=Math.floor(1200*Math.random())+2400;return t=Math.pow(4,e)*n,Math.min(t,12e4)},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._killedTokenDictionary={}}return e.prototype.setKillSwitchTenants=function(e,t){if(e&&t)try{var n=e.split(",");if("this-request-only"===t)return n;for(var i=1e3*parseInt(t,10),r=0;rDate.now()||(delete this._killedTokenDictionary[e],!1)},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.clockSkewRefreshDurationInMins=e,this._reset()}return e.prototype.allowRequestSending=function(){return this._isFirstRequest&&!this._clockSkewSet?(this._isFirstRequest=!1,this._allowRequestSending=!1,!0):this._allowRequestSending},e.prototype.shouldAddClockSkewHeaders=function(){return this._shouldAddClockSkewHeaders},e.prototype.getClockSkewHeaderValue=function(){return this._clockSkewHeaderValue},e.prototype.setClockSkew=function(e){this._clockSkewSet||(e?this._clockSkewHeaderValue=e:this._shouldAddClockSkewHeaders=!1,this._clockSkewSet=!0,this._allowRequestSending=!0)},e.prototype._reset=function(){var e=this;this._isFirstRequest=!0,this._clockSkewSet=!1,this._allowRequestSending=!0,this._shouldAddClockSkewHeaders=!0,this._clockSkewHeaderValue="use-collector-delta",this.clockSkewRefreshDurationInMins>0&&setTimeout((function(){return e._reset()}),6e4*this.clockSkewRefreshDurationInMins)},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=function(){function e(e,t){this._outboundQueue=e,this._maxNumberOfEvents=t,this._currentBatch={},this._currentNumEventsInBatch=0}return e.prototype.addEventToBatch=function(e){if(e.priority===i.AWTEventPriority.Immediate_sync){var t={};return t[e.apiKey]=[e],t}return this._currentNumEventsInBatch>=this._maxNumberOfEvents&&this.flushBatch(),void 0===this._currentBatch[e.apiKey]&&(this._currentBatch[e.apiKey]=[]),this._currentBatch[e.apiKey].push(e),this._currentNumEventsInBatch++,null},e.prototype.flushBatch=function(){this._currentNumEventsInBatch>0&&(this._outboundQueue.push(this._currentBatch),this._currentBatch={},this._currentNumEventsInBatch=0)},e.prototype.hasBatch=function(){return this._currentNumEventsInBatch>0},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),r=function(){function e(){}return e.setEventsHandler=function(e){i.default.setEventsHandler(e)},e.getEventsHandler=function(){return i.default.getEventsHandler()},e.scheduleTimer=function(){i.default.scheduleTimer()},e}();t.default=r},function(e,t,n){"use strict";n.r(t),n.d(t,"AgaveSink",(function(){return J})),n.d(t,"TelemetryContext",(function(){return h}));var i,r,o,s,a,u,c,l,d,p=new(function(){function e(){this._listeners=[]}return e.prototype.fireEvent=function(e){this._listeners.forEach((function(t){return t(e)}))},e.prototype.addListener=function(e){e&&this._listeners.push(e)},e.prototype.removeListener=function(e){this._listeners=this._listeners.filter((function(t){return t!==e}))},e.prototype.getListenerCount=function(){return this._listeners.length},e}());function f(e,t,n){p.fireEvent({level:e,category:t,message:n})}function _(e,t,n){f(i.Error,e,(function(){var e=n instanceof Error?n.message:"";return t+": "+e}))}!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Verbose=3]="Verbose"}(i||(i={})),function(e){e[e.Core=0]="Core",e[e.Sink=1]="Sink",e[e.Transport=2]="Transport"}(r||(r={})),function(e){e[e.NotSet=0]="NotSet",e[e.Measure=1]="Measure",e[e.Diagnostics=2]="Diagnostics",e[e.CriticalBusinessImpact=191]="CriticalBusinessImpact",e[e.CriticalCensus=192]="CriticalCensus",e[e.CriticalExperimentation=193]="CriticalExperimentation",e[e.CriticalUsage=194]="CriticalUsage"}(o||(o={})),function(e){e[e.NotSet=0]="NotSet",e[e.Normal=1]="Normal",e[e.High=2]="High"}(s||(s={})),function(e){e[e.NotSet=0]="NotSet",e[e.Normal=1]="Normal",e[e.High=2]="High"}(a||(a={})),function(e){e[e.NotSet=0]="NotSet",e[e.SoftwareSetup=1]="SoftwareSetup",e[e.ProductServiceUsage=2]="ProductServiceUsage",e[e.ProductServicePerformance=4]="ProductServicePerformance",e[e.DeviceConfiguration=8]="DeviceConfiguration",e[e.InkingTypingSpeech=16]="InkingTypingSpeech"}(u||(u={})),function(e){e[e.ReservedDoNotUse=0]="ReservedDoNotUse",e[e.BasicEvent=10]="BasicEvent",e[e.FullEvent=100]="FullEvent",e[e.NecessaryServiceDataEvent=110]="NecessaryServiceDataEvent",e[e.AlwaysOnNecessaryServiceDataEvent=120]="AlwaysOnNecessaryServiceDataEvent"}(c||(c={})),function(e){e[e.EssentialServiceMetadata=1]="EssentialServiceMetadata",e[e.AccountData=2]="AccountData",e[e.SystemMetadata=4]="SystemMetadata",e[e.OrganizationIdentifiableInformation=8]="OrganizationIdentifiableInformation",e[e.EndUserIdentifiableInformation=16]="EndUserIdentifiableInformation",e[e.CustomerContent=32]="CustomerContent",e[e.AccessControl=64]="AccessControl"}(l||(l={})),function(e){e[e.String=0]="String",e[e.Boolean=1]="Boolean",e[e.Int64=2]="Int64",e[e.Double=3]="Double",e[e.Guid=4]="Guid"}(d||(d={}));var h=function(){function e(){}return e.setTelemetryContext=function(e){this._steContext=e},e.getDataFieldsFromContext=function(){var e=this,t=[];return Object.keys(this._steContext).forEach((function(n){t.push({name:n,value:e._steContext[n],dataType:d.String})})),t},e.getAppName=function(){return this._steContext["App.Name"]},e.getAppPlatform=function(){return this._steContext["App.Platform"]},e.getAppVersion=function(){return this._steContext["App.Version"]},e.isWacAgave=function(){return"Web"===this._steContext["App.Platform"]},e._steContext={},e}(),v=function(){function e(){this._requestIsPending=!1,this._telemetryQueue=[],this._sentFirstEvent=!1}return e.prototype.isSupportedByDeclaration=function(){return Office.context.requirements.isSetSupported("Telemetry","1.2")},e.prototype.isUnsupported=function(){return h.isWacAgave()||"undefined"==typeof OfficeCore},e.prototype.isSupportedAsync=function(e){(this._sentFirstEvent||void 0!==this._onSentFirstEvent)&&(f(i.Error,r.Sink,(function(){return"isSupportedAsync may only be called once"})),e(!1)),this._onSentFirstEvent=e,this.sendTestEvent()},e.prototype.sendTelemetryEvent=function(e){this._telemetryQueue.push(e),this._requestIsPending||this.processWorkBacklog()},e.prototype.sendTestEvent=function(){var e={telemetryProperties:{nexusTenantToken:1723,ariaTenantToken:"f998cc5ba4d448d6a1e8e913ff18be94-dd122e0a-fcf8-4dc5-9dbb-6afac5325183-7405"},eventName:"Office.Telemetry.RichApi.TestForSupport",eventFlags:{dataCategories:u.ProductServiceUsage,diagnosticLevel:c.FullEvent}};this.sendTelemetryEvent(e)},e.prototype.processWorkBacklog=function(){var e=this;this._requestIsPending=!0;var t=this._telemetryQueue;this._telemetryQueue=[],this.pauseIfNecessary().then((function(){e.processTelemetryEvents(t),e.waitAndProcessMore()})).catch((function(t){_(r.Sink,"RichApiSink Error",t),e.waitAndProcessMore()}))},e.prototype.waitAndProcessMore=function(){var e=this;y(1e3).then((function(){e._telemetryQueue.length>0&&setTimeout((function(){return e.processWorkBacklog()}),0),e._requestIsPending=!1})).catch((function(){}))},e.prototype.processTelemetryEvents=function(e){var t=this,n=new OfficeCore.RequestContext;e.forEach((function(e){if(e.telemetryProperties){var l=[];t.addDataFields(l,e.dataFields);var d=e.eventContract?e.eventContract.name:"";e.eventContract&&t.addDataFields(l,e.eventContract.dataFields),n.telemetry.sendTelemetryEvent(e.telemetryProperties,e.eventName,d,function(e){var t={costPriority:a.Normal,samplingPolicy:o.Measure,persistencePriority:s.Normal,dataCategories:u.NotSet,diagnosticLevel:c.FullEvent};return e.eventFlags&&e.eventFlags.dataCategories||f(i.Error,r.Core,(function(){return"Event is missing DataCategories event flag"})),e.eventFlags?(e.eventFlags.costPriority&&(t.costPriority=e.eventFlags.costPriority),e.eventFlags.samplingPolicy&&(t.samplingPolicy=e.eventFlags.samplingPolicy),e.eventFlags.persistencePriority&&(t.persistencePriority=e.eventFlags.persistencePriority),e.eventFlags.dataCategories&&(t.dataCategories=e.eventFlags.dataCategories),e.eventFlags.diagnosticLevel&&(t.diagnosticLevel=e.eventFlags.diagnosticLevel),t):t}(e),l)}})),this._sentFirstEvent?n.sync().catch((function(e){_(r.Sink,"RichApiError",e)})):(this._sentFirstEvent=!0,n.sync().then((function(){t._onSentFirstEvent&&t._onSentFirstEvent(!0)})).catch((function(){f(i.Info,r.Sink,(function(){return"RichApiTelemetry not supported on the host."})),t._onSentFirstEvent&&t._onSentFirstEvent(!1)})))},e.prototype.addDataFields=function(e,t){t&&t.forEach((function(t){e.push({name:t.name,value:t.value,classification:t.classification?t.classification:l.SystemMetadata,type:t.dataType})}))},e.prototype.pauseIfNecessary=function(){return this._sentFirstEvent?Office.Promise.resolve(void 0):y(1e3)},e}();function y(e){return new Office.Promise((function(t){return setTimeout(t,e)}))}var g=function(){function e(){}return e.prototype.sendTelemetryEvent=function(t){e._richApiHelper.sendTelemetryEvent(t)},e.isSupportedByDeclaration=function(){return this._richApiHelper.isSupportedByDeclaration()},e.isUnsupported=function(){return this._richApiHelper.isUnsupported()},e.isSupportedAsync=function(e){return this._richApiHelper.isSupportedAsync(e)},e._richApiHelper=new v,e}();var T=function(){function e(){}return e.isSupported=function(){return("undefined"!=typeof Office&&void 0!==Office.context&&void 0!==Office.context.platform?Office.context.platform===Office.PlatformType.OfficeOnline:"undefined"!=typeof OfficeExt&&void 0!==OfficeExt.HostName&&void 0!==OfficeExt.HostName.Host&&"function"==typeof OfficeExt.HostName.Host.getInstance&&"function"==typeof OfficeExt.HostName.Host.getInstance().getPlatform&&OfficeExt.HostName.Host.getInstance().getPlatform()===Office.PlatformType.OfficeOnline)&&"object"==typeof OSF&&"function"==typeof OSF.getClientEndPoint&&"object"==typeof OSF._OfficeAppFactory&&"function"==typeof OSF._OfficeAppFactory.getId&&"object"==typeof OSF.AgaveHostAction&&"number"==typeof OSF.AgaveHostAction.SendTelemetryEvent},e.prototype.sendTelemetryEvent=function(e,t){try{if(e.dataFields&&e.dataFields.filter((function(e){return e.classification&&e.classification!==l.SystemMetadata})).length>0)return;var n=OSF._OfficeAppFactory.getId(),i=OSF.AgaveHostAction.SendTelemetryEvent;OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[n,i,e])}catch(e){_(r.Sink,"AgaveWacSink",e)}},e}(),m=function(){function e(){this._supportsAllEvents=!1,this._contextDataFields=[],this._supportsAllEvents=Office.context.requirements.isSetSupported("OutlookTelemetry","1.1");var e=h.getAppPlatform();"iOS"!==e&&"Android"!==e||(this._contextDataFields=h.getDataFieldsFromContext())}return e.isSupported=function(){try{return Office.context.requirements.isSetSupported("OutlookTelemetry")}catch(e){return!1}},e.prototype.sendTelemetryEvent=function(e){this._supportsAllEvents||e.eventName.match(/^Office\.Extensibility\.OfficeJs\.[a-zA-Z]*$/)?(this.addAdditionalDataFields(e),Office.context.mailbox.logTelemetry(JSON.stringify(e))):f(i.Info,r.Sink,(function(){return"This version of Outlook only accepts OfficeJS telemetry events"}))},e.prototype.addAdditionalDataFields=function(e){var t;e.dataFields=e.dataFields||[],(t=e.dataFields).push.apply(t,this._contextDataFields)},e}(),S=[16,0,11599],A=[16,0,4266],E=[16,26],P=[2,29],I=[16,0,99999],W=["Excel","Outlook","PowerPoint","Project","Word"],b=!1;function w(){if(!b)return!1;var e=h.getAppPlatform();return function(e,t,n){if(!e)return!0;if(!n||W.indexOf(n)<0)return!1;var i,r=[];if("Win32"===t)i=S,r=A;else if("Mac"===t)i=E;else if("iOS"===t){if("Outlook"===n)return!0;i=P}else{if("Web"!==t||"Outlook"!==n)return!1;i=I}var o=String(e).split(".").map((function(e){return parseInt(e,10)}));return C(r,o)&&C(o,i)}(h.getAppVersion(),e,h.getAppName())}function C(e,t){for(var n=0;nt[n])return!1}return!0}var B=n(1),O=n(0),k=/\./g,D=0;function R(e,t,n){t&&t.forEach((function(t){if(!t.classification||t.classification===l.SystemMetadata||t.classification===l.EssentialServiceMetadata){var i=["","",t.name],r=i[0],o=i[1],s=i[2],a=t.name.indexOf(".");a>0&&"zC"===t.name.substr(0,a)&&(r=t.name.substring(0,a+1),s=t.name.substring(a+1)),n&&(o="Data.");var u=r+o+s;e.properties[u]={value:t.value,type:N(t.dataType)}}}))}function N(e){switch(e){case d.String:case d.Guid:return O.AWTPropertyType.String;case d.Boolean:return O.AWTPropertyType.Boolean;case d.Int64:return O.AWTPropertyType.Int64;case d.Double:return O.AWTPropertyType.Double;default:throw new Error(e)}}var M,x,U,F,L=n(4),q=n.n(L),z=n(11),H=n.n(z);var j={sendRequestWrapper:function(e,t,n,i){void 0===i&&(i=!1);var r=0;for(var o in e)e.hasOwnProperty(o)&&(r+=e[o].length);var s=performance.now();M(e,t,n,i),U(performance.now()-s,r)},sendPostWrapper:function(e,t,n,i,r,o){x(e,t,n,i,r,o),F(t.length)}};var Q=!1;function V(e,t,n){var i;if(G(),!e.telemetryProperties||!e.telemetryProperties.ariaTenantToken)throw new Error("Missing Aria Tenant Token");i=function(e,t,n){var i,r,o={name:(i=e.eventName,i.toLowerCase().replace(k,"_")),properties:{}};return o.properties["Event.Sequence"]={value:++D,type:O.AWTPropertyType.Int64},o.properties["Event.Name"]=e.eventName,o.properties["Event.Source"]="OTelJS",r=n?new Date(n):new Date,o.properties["Event.Time"]={value:r,type:O.AWTPropertyType.Date},e.eventContract&&(o.properties["Event.Contract"]=e.eventContract.name,R(o,e.eventContract.dataFields,!1)),R(o,t,!1),R(o,e.dataFields,!0),o}(e,t,n),B.AWTLogManager.getLogger(e.telemetryProperties.ariaTenantToken).logEvent(i)}function G(e,t){var n;Q||(B.AWTLogManager.initialize("cd836626611c4caaa8fc5b2e728ee81d-3b6d6c45-6377-4bf5-9792-dbf8e1881088-7521",e),t&&(!function(e){if(!e)return;var t=e/1e3,n=t/2,i=2*t,r={};r.OTelCustomTransmissionProfile=[i,t,n],B.AWTLogManager.loadTransmitProfiles(r),B.AWTLogManager.setTransmitProfile("OTelCustomTransmissionProfile")}(t.uploadFrequency),(n=t.notificationListener)&&B.AWTLogManager.addNotificationListener(n),function(e){if(!e)return;(function(e,t){var n=q.a.getEventsHandler();if(!(n instanceof H.a))return!1;var i=n._httpManager;if(!(i&&i._sendRequest&&i._httpInterface))return!1;M=i._sendRequest.bind(i),i._sendRequest=j.sendRequestWrapper;var r=i._httpInterface;return x=r.sendPOST.bind(i),r.sendPOST=j.sendPostWrapper,U=e,F=t,!0})(e.requestProcessingStats,e.networkStats)||f(i.Error,r.Sink,(function(){return"Failed to instrument Aria delivery task"}))}(t.stats),t.disableStatsTracking||B.AWTLogManager.addNotificationListener({eventsSent:function(e){f(i.Info,r.Transport,(function(){return"Successfully sent "+e.length+" event(s)"})),f(i.Verbose,r.Transport,(function(){return"Sent event(s) details : "+JSON.stringify(e,null,2)})),e.length},eventsDropped:function(e,t){f(i.Error,r.Transport,(function(){return"Dropped "+e.length+" event(s) because "+t})),f(i.Verbose,r.Transport,(function(){return"Dropped event(s) details : "+JSON.stringify(e,null,2)})),e.length},eventsRejected:function(e,t){f(i.Error,r.Transport,(function(){return"Rejected "+e.length+" event(s) because "+t})),f(i.Verbose,r.Transport,(function(){return"Rejected event(s) details : "+JSON.stringify(e,null,2)})),e.length},eventsRetrying:function(e){f(i.Warning,r.Transport,(function(){return"Retrying "+e.length+" event(s)"})),f(i.Verbose,r.Transport,(function(){return"Retrying event(s) details : "+JSON.stringify(e,null,2)})),e.length}})),Q=!0)}var K,Z=function(){function e(){this._fullEventsEnabled=!1}return e.prototype.processEvent=function(e){return this._fullEventsEnabled||!!e.eventFlags&&(e.eventFlags.diagnosticLevel===c.BasicEvent||e.eventFlags.diagnosticLevel===c.NecessaryServiceDataEvent||e.eventFlags.diagnosticLevel===c.AlwaysOnNecessaryServiceDataEvent)},e.prototype.setFullEventsEnabled=function(e){this._fullEventsEnabled=e},e}();!function(e){e[e.Aria=0]="Aria",e[e.AriaSE=1]="AriaSE"}(K||(K={}));var X=function(){function e(t,n){if(void 0===t&&(t=[]),this._preprocessors=[],this.additionalDataFields=t,this._fullEventProcessor=new Z,this.addPreprocessor(this._fullEventProcessor),void 0===e.ariaSinkType)e.ariaSinkType=this.getSinkType();else if(e.ariaSinkType!==this.getSinkType())throw new Error("Multiple Aria Configurations are not allowed");G(this.getAWTLogConfiguration(n),n)}return e.prototype.getSinkType=function(){return K.Aria},e.prototype.getAWTLogConfiguration=function(e){var t={disableCookiesUsage:!0,canSendStatEvent:function(){return!1}};return e&&(t.cacheMemorySizeLimitInNumberOfEvents=e.eventsLimitInMem,t.collectorUri=e.endpointUrl),t},e.prototype.sendTelemetryEvent=function(e,t){try{for(var n=0;n Represents the Application. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Show or hide the iFrame application borders. [Api set: 1.1] + /// Show or hide the standard toolbars. [Api set: 1.1] + } + + Application.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Application.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Visio.Interfaces.ApplicationUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Application object, with properties that have already been loaded and synced. + /// + } + Application.prototype.showToolbar = function(id, show) { + /// + /// Sets the visibility of a specific toolbar in the application. [Api set: 1.1] + /// + /// The type of the Toolbar + /// Whether the toolbar is visibile or not. + /// + } + + return Application; + })(OfficeExtension.ClientObject); + Visio.Application = Application; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var BoundingBox = (function() { + function BoundingBox() { + /// Represents the BoundingBox of the shape. [Api set: 1.1] + /// 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] + /// 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] + /// An integer that specifies the x-coordinate of the bounding box. [Api set: 1.1] + /// An integer that specifies the y-coordinate of the bounding box. [Api set: 1.1] + } + return BoundingBox; + })(); + Interfaces.BoundingBox.__proto__ = null; + Interfaces.BoundingBox = BoundingBox; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// Represents the type of column values. [Api set: 1.1] + var ColumnType = { + __proto__: null, + "unknown": "unknown", + "string": "string", + "number": "number", + "date": "date", + "currency": "currency", + } + Visio.ColumnType = ColumnType; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Comment = (function(_super) { + __extends(Comment, _super); + function Comment() { + /// Represents the Comment. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// A string that specifies the name of the author of the comment. [Api set: 1.1] + /// A string that specifies the date when the comment was created. [Api set: 1.1] + /// A string that contains the comment text. [Api set: 1.1] + } + + Comment.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Comment.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Visio.Interfaces.CommentUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Comment object, with properties that have already been loaded and synced. + /// + } + + return Comment; + })(OfficeExtension.ClientObject); + Visio.Comment = Comment; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var CommentCollection = (function(_super) { + __extends(CommentCollection, _super); + function CommentCollection() { + /// Represents the CommentCollection for a given Shape. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + CommentCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + CommentCollection.prototype.getCount = function() { + /// + /// Gets the number of Comments. [Api set: 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + CommentCollection.prototype.getItem = function(key) { + /// + /// Gets the Comment using its name. [Api set: 1.1] + /// + /// Key is the name of the Comment to be retrieved. + /// + } + + return CommentCollection; + })(OfficeExtension.ClientObject); + Visio.CommentCollection = CommentCollection; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var ConnectorBinding = (function() { + function ConnectorBinding() { + /// Connector bindings for data visualizer diagram. [Api set: 1.1] + /// Delimiter for TargetColumn. It should not have more then one character. [Api set: 1.1] + } + return ConnectorBinding; + })(); + Interfaces.ConnectorBinding.__proto__ = null; + Interfaces.ConnectorBinding = ConnectorBinding; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// Direction of connector in DataVisualizer diagram. [Api set: 1.1] + var ConnectorDirection = { + __proto__: null, + "fromTarget": "fromTarget", + "toTarget": "toTarget", + } + Visio.ConnectorDirection = ConnectorDirection; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// Represents the orientation of the Cross Functional Flowchart diagram. [Api set: 1.1] + var CrossFunctionalFlowchartOrientation = { + __proto__: null, + "horizontal": "horizontal", + "vertical": "vertical", + } + Visio.CrossFunctionalFlowchartOrientation = CrossFunctionalFlowchartOrientation; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var DataRefreshCompleteEventArgs = (function() { + function DataRefreshCompleteEventArgs() { + /// Provides information about the document that raised the DataRefreshComplete event. [Api set: 1.1] + /// Gets the document object that raised the DataRefreshComplete event. [Api set: 1.1] + /// Gets the success or failure of the DataRefreshComplete event. [Api set: 1.1] + } + return DataRefreshCompleteEventArgs; + })(); + Interfaces.DataRefreshCompleteEventArgs.__proto__ = null; + Interfaces.DataRefreshCompleteEventArgs = DataRefreshCompleteEventArgs; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// Represents the type of source for the data connection. [Api set: 1.1] + var DataSourceType = { + __proto__: null, + "unknown": "unknown", + "excel": "excel", + } + Visio.DataSourceType = DataSourceType; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// Represents the types of data validation error. [Api set: 1.1] + var DataValidationErrorType = { + __proto__: null, + "none": "none", + "columnNotMapped": "columnNotMapped", + "uniqueIdColumnError": "uniqueIdColumnError", + "swimlaneColumnError": "swimlaneColumnError", + "delimiterError": "delimiterError", + "connectorColumnError": "connectorColumnError", + "connectorColumnMappedElsewhere": "connectorColumnMappedElsewhere", + "connectorLabelColumnMappedElsewhere": "connectorLabelColumnMappedElsewhere", + "connectorColumnAndConnectorLabelMappedElsewhere": "connectorColumnAndConnectorLabelMappedElsewhere", + } + Visio.DataValidationErrorType = DataValidationErrorType; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// Type of the Data Visualizer Diagram operation [Api set: 1.1] + var DataVisualizerDiagramOperationType = { + __proto__: null, + "unknown": "unknown", + "create": "create", + "updateMappings": "updateMappings", + "updateData": "updateData", + "update": "update", + "delete": "delete", + } + Visio.DataVisualizerDiagramOperationType = DataVisualizerDiagramOperationType; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// Result of Data Visualizer Diagram operations. [Api set: 1.1] + var DataVisualizerDiagramResultType = { + __proto__: null, + "success": "success", + "unexpected": "unexpected", + "validationError": "validationError", + "conflictError": "conflictError", + } + Visio.DataVisualizerDiagramResultType = DataVisualizerDiagramResultType; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// DiagramType for Data Visualizer diagrams [Api set: 1.1] + var DataVisualizerDiagramType = { + __proto__: null, + "unknown": "unknown", + "basicFlowchart": "basicFlowchart", + "crossFunctionalFlowchart_Horizontal": "crossFunctionalFlowchart_Horizontal", + "crossFunctionalFlowchart_Vertical": "crossFunctionalFlowchart_Vertical", + "audit": "audit", + "orgChart": "orgChart", + "network": "network", + } + Visio.DataVisualizerDiagramType = DataVisualizerDiagramType; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Document = (function(_super) { + __extends(Document, _super); + function Document() { + /// Represents the Document class. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents a Visio application instance that contains this document. Read-only. [Api set: 1.1] + /// Represents a collection of pages associated with the document. Read-only. [Api set: 1.1] + /// Returns the DocumentView object. Read-only. [Api set: 1.1] + /// Occurs when the data is refreshed in the diagram. [Api set: 1.1] + /// Occurs when there is an expected or unexpected error occured in the session. [Api set: 1.1] + /// Occurs when the Document is loaded, refreshed, or changed. [Api set: 1.1] + /// Occurs when the page is finished loading. [Api set: 1.1] + /// Occurs when the current selection of shapes changes. [Api set: 1.1] + /// Occurs when the user moves the mouse pointer into the bounding box of a shape. [Api set: 1.1] + /// Occurs when the user moves the mouse out of the bounding box of a shape. [Api set: 1.1] + /// Occurs whenever a task pane state is changed [Api set: 1.1] + } + + Document.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Document.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Visio.Interfaces.DocumentUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Document object, with properties that have already been loaded and synced. + /// + } + Document.prototype.getActivePage = function() { + /// + /// Returns the Active Page of the document. [Api set: 1.1] + /// + /// + } + Document.prototype.setActivePage = function(PageName) { + /// + /// Set the Active Page of the document. [Api set: 1.1] + /// + /// Name of the page + /// + } + Document.prototype.showTaskPane = function(taskPaneType, initialProps, show) { + /// + /// Show or Hide a TaskPane. This will be consumed by the DV Excel Add-In/Other third-party apps who embed the visio drawing to show/hide the task pane. [Api set: 1.1] + /// + /// Type of the 1st Party TaskPane. It can take values from enum TaskPaneType + /// Optional Parameter. This is a generic data structure which would be filled with initial data required to initialize the content of the Taskpane + /// Optional Parameter. If it is set to false, it will hide the specified taskpane + /// + } + Document.prototype.startDataRefresh = function() { + /// + /// Triggers the refresh of the data in the Diagram, for all pages. [Api set: 1.1] + /// + /// + } + Document.prototype.onDataRefreshComplete = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the document that raised the DataRefreshComplete event. + /// + var eventInfo = new Visio.Interfaces.DataRefreshCompleteEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onDocumentError = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about DocumentError event + /// + var eventInfo = new Visio.Interfaces.DocumentErrorEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onDocumentLoadComplete = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the success or failure of the DocumentLoadComplete event. + /// + var eventInfo = new Visio.Interfaces.DocumentLoadCompleteEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onPageLoadComplete = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the page that raised the PageLoadComplete event. + /// + var eventInfo = new Visio.Interfaces.PageLoadCompleteEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onSelectionChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the shape collection that raised the SelectionChanged event. + /// + var eventInfo = new Visio.Interfaces.SelectionChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onShapeMouseEnter = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the shape that raised the ShapeMouseEnter event. + /// + var eventInfo = new Visio.Interfaces.ShapeMouseEnterEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onShapeMouseLeave = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the shape that raised the ShapeMouseLeave event. + /// + var eventInfo = new Visio.Interfaces.ShapeMouseLeaveEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + Document.prototype.onTaskPaneStateChanged = { + __proto__: null, + add: function (handler) { + /// Handler for the event. EventArgs: Provides information about the TaskPaneStateChanged event. + /// + var eventInfo = new Visio.Interfaces.TaskPaneStateChangedEventArgs(); + eventInfo.__proto__ = null; + handler(eventInfo); + }, + remove: function (handler) { + /// Handler for the event. + return; + } + }; + + return Document; + })(OfficeExtension.ClientObject); + Visio.Document = Document; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var DocumentErrorEventArgs = (function() { + function DocumentErrorEventArgs() { + /// Provides information about DocumentError event [Api set: 1.1] + /// Visio Error code [Api set: 1.1] + /// Message about error that occured [Api set: 1.1] + /// Tells if the error is critical or not. If critical the session cannot continue. [Api set: 1.1] + } + return DocumentErrorEventArgs; + })(); + Interfaces.DocumentErrorEventArgs.__proto__ = null; + Interfaces.DocumentErrorEventArgs = DocumentErrorEventArgs; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var DocumentLoadCompleteEventArgs = (function() { + function DocumentLoadCompleteEventArgs() { + /// Provides information about the success or failure of the DocumentLoadComplete event. [Api set: 1.1] + /// Gets the success or failure of the DocumentLoadComplete event. [Api set: 1.1] + } + return DocumentLoadCompleteEventArgs; + })(); + Interfaces.DocumentLoadCompleteEventArgs.__proto__ = null; + Interfaces.DocumentLoadCompleteEventArgs = DocumentLoadCompleteEventArgs; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var DocumentView = (function(_super) { + __extends(DocumentView, _super); + function DocumentView() { + /// Represents the DocumentView class. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Disable Hyperlinks. [Api set: 1.1] + /// Disable Pan. [Api set: 1.1] + /// Disable PanZoomWindow. [Api set: 1.1] + /// Disable Zoom. [Api set: 1.1] + /// Hide Diagram Boundary. [Api set: 1.1] + } + + DocumentView.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + DocumentView.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Visio.Interfaces.DocumentViewUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing DocumentView object, with properties that have already been loaded and synced. + /// + } + + return DocumentView; + })(OfficeExtension.ClientObject); + Visio.DocumentView = DocumentView; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// EventType represents the type of the events Host supports [Api set: 1.1] + var EventType = { + __proto__: null, + "dataVisualizerDiagramOperationCompleted": "dataVisualizerDiagramOperationCompleted", + } + Visio.EventType = EventType; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var Highlight = (function() { + function Highlight() { + /// Represents the highlight data added to the shape. [Api set: 1.1] + /// 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] + /// A positive integer that specifies the width of the highlight's stroke in pixels. [Api set: 1.1] + } + return Highlight; + })(); + Interfaces.Highlight.__proto__ = null; + Interfaces.Highlight = Highlight; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Hyperlink = (function(_super) { + __extends(Hyperlink, _super); + function Hyperlink() { + /// Represents the Hyperlink. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the address of the Hyperlink object. Read-only. [Api set: 1.1] + /// Gets the description of a hyperlink. Read-only. [Api set: 1.1] + /// Gets the extra URL request information used to resolve the hyperlink's URL. Read-only. [Api set: 1.1] + /// Gets the sub-address of the Hyperlink object. Read-only. [Api set: 1.1] + } + + Hyperlink.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return Hyperlink; + })(OfficeExtension.ClientObject); + Visio.Hyperlink = Hyperlink; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var HyperlinkCollection = (function(_super) { + __extends(HyperlinkCollection, _super); + function HyperlinkCollection() { + /// Represents the Hyperlink Collection. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + HyperlinkCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + HyperlinkCollection.prototype.getCount = function() { + /// + /// Gets the number of hyperlinks. [Api set: 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + HyperlinkCollection.prototype.getItem = function(Key) { + /// + /// Gets a Hyperlink using its key (name or Id). [Api set: 1.1] + /// + /// Key is the name or index of the Hyperlink to be retrieved. + /// + } + + return HyperlinkCollection; + })(OfficeExtension.ClientObject); + Visio.HyperlinkCollection = HyperlinkCollection; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// Represents the type of layout. [Api set: 1.1] + var LayoutVariant = { + __proto__: null, + "unknown": "unknown", + "pageDefault": "pageDefault", + "flowchart_TopToBottom": "flowchart_TopToBottom", + "flowchart_BottomToTop": "flowchart_BottomToTop", + "flowchart_LeftToRight": "flowchart_LeftToRight", + "flowchart_RightToLeft": "flowchart_RightToLeft", + "wideTree_DownThenRight": "wideTree_DownThenRight", + "wideTree_DownThenLeft": "wideTree_DownThenLeft", + "wideTree_RightThenDown": "wideTree_RightThenDown", + "wideTree_LeftThenDown": "wideTree_LeftThenDown", + } + Visio.LayoutVariant = LayoutVariant; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// MessageType represents the type of message when event is fired from Host [Api set: 1.1] + var MessageType = { + __proto__: null, + "none": 0, + "dataVisualizerDiagramOperationCompletedEvent": 1, + } + Visio.MessageType = MessageType; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// Represents the Horizontal Alignment of the Overlay relative to the shape. [Api set: 1.1] + var OverlayHorizontalAlignment = { + __proto__: null, + "left": "left", + "center": "center", + "right": "right", + } + Visio.OverlayHorizontalAlignment = OverlayHorizontalAlignment; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// Represents the type of the overlay. [Api set: 1.1] + var OverlayType = { + __proto__: null, + "text": "text", + "image": "image", + "html": "html", + } + Visio.OverlayType = OverlayType; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// Represents the Vertical Alignment of the Overlay relative to the shape. [Api set: 1.1] + var OverlayVerticalAlignment = { + __proto__: null, + "top": "top", + "middle": "middle", + "bottom": "bottom", + } + Visio.OverlayVerticalAlignment = OverlayVerticalAlignment; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Page = (function(_super) { + __extends(Page, _super); + function Page() { + /// Represents the Page class. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// All shapes in the Page, including subshapes. Read-only. [Api set: 1.1] + /// Returns the Comments Collection. Read-only. [Api set: 1.1] + /// Returns the height of the page. Read-only. [Api set: 1.1] + /// Index of the Page. Read-only. [Api set: 1.1] + /// Whether the page is a background page or not. Read-only. [Api set: 1.1] + /// Page name. Read-only. [Api set: 1.1] + /// All top-level shapes in the Page.Read-only. [Api set: 1.1] + /// Returns the view of the page. Read-only. [Api set: 1.1] + /// Returns the width of the page. Read-only. [Api set: 1.1] + } + + Page.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Page.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Visio.Interfaces.PageUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Page object, with properties that have already been loaded and synced. + /// + } + Page.prototype.activate = function() { + /// + /// Set the page as Active Page of the document. [Api set: 1.1] + /// + /// + } + + return Page; + })(OfficeExtension.ClientObject); + Visio.Page = Page; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var PageCollection = (function(_super) { + __extends(PageCollection, _super); + function PageCollection() { + /// Represents a collection of Page objects that are part of the document. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + PageCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + PageCollection.prototype.getCount = function() { + /// + /// Gets the number of pages in the collection. [Api set: 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + PageCollection.prototype.getItem = function(key) { + /// + /// Gets a page using its key (name or Id). [Api set: 1.1] + /// + /// Key is the name or Id of the page to be retrieved. + /// + } + + return PageCollection; + })(OfficeExtension.ClientObject); + Visio.PageCollection = PageCollection; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var PageLoadCompleteEventArgs = (function() { + function PageLoadCompleteEventArgs() { + /// Provides information about the page that raised the PageLoadComplete event. [Api set: 1.1] + /// Gets the name of the page that raised the PageLoad event. [Api set: 1.1] + /// Gets the success or failure of the PageLoadComplete event. [Api set: 1.1] + } + return PageLoadCompleteEventArgs; + })(); + Interfaces.PageLoadCompleteEventArgs.__proto__ = null; + Interfaces.PageLoadCompleteEventArgs = PageLoadCompleteEventArgs; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var PageRenderCompleteEventArgs = (function() { + function PageRenderCompleteEventArgs() { + /// Provides information about the page that raised the PageRenderComplete event. [Api set: 1.1] + /// Gets the name of the page that raised the PageLoad event. [Api set: 1.1] + /// Gets the success/failure of the PageRender event. [Api set: 1.1] + } + return PageRenderCompleteEventArgs; + })(); + Interfaces.PageRenderCompleteEventArgs.__proto__ = null; + Interfaces.PageRenderCompleteEventArgs = PageRenderCompleteEventArgs; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var PageView = (function(_super) { + __extends(PageView, _super); + function PageView() { + /// Represents the PageView class. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// 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] + } + + PageView.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + PageView.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Visio.Interfaces.PageViewUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing PageView object, with properties that have already been loaded and synced. + /// + } + PageView.prototype.centerViewportOnShape = function(ShapeId) { + /// + /// Pans the Visio drawing to place the specified shape in the center of the view. [Api set: 1.1] + /// + /// ShapeId to be seen in the center. + /// + } + PageView.prototype.fitToWindow = function() { + /// + /// Fit Page to current window. [Api set: 1.1] + /// + /// + } + PageView.prototype.getPosition = function() { + /// + /// Returns the position object that specifies the position of the page in the view. [Api set: 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = {}; + return result; + } + PageView.prototype.getSelection = function() { + /// + /// Represents the Selection in the page. [Api set: 1.1] + /// + /// + } + PageView.prototype.isShapeInViewport = function(Shape) { + /// + /// To check if the shape is in view of the page or not. [Api set: 1.1] + /// + /// Shape to be checked. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = false; + return result; + } + PageView.prototype.setPosition = function(Position) { + /// + /// Sets the position of the page in the view. [Api set: 1.1] + /// + /// Position object that specifies the new position of the page in the view. + /// + } + + return PageView; + })(OfficeExtension.ClientObject); + Visio.PageView = PageView; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var Position = (function() { + function Position() { + /// Represents the Position of the object in the view. [Api set: 1.1] + /// 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] + /// 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] + } + return Position; + })(); + Interfaces.Position.__proto__ = null; + Interfaces.Position = Position; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Selection = (function(_super) { + __extends(Selection, _super); + function Selection() { + /// Represents the Selection in the page. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the Shapes of the Selection. Read-only. [Api set: 1.1] + } + + Selection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return Selection; + })(OfficeExtension.ClientObject); + Visio.Selection = Selection; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var SelectionChangedEventArgs = (function() { + function SelectionChangedEventArgs() { + /// Provides information about the shape collection that raised the SelectionChanged event. [Api set: 1.1] + /// Gets the name of the page which has the ShapeCollection object that raised the SelectionChanged event. [Api set: 1.1] + /// Gets the array of shape names that raised the SelectionChanged event. [Api set: 1.1] + } + return SelectionChangedEventArgs; + })(); + Interfaces.SelectionChangedEventArgs.__proto__ = null; + Interfaces.SelectionChangedEventArgs = SelectionChangedEventArgs; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Shape = (function(_super) { + __extends(Shape, _super); + function Shape() { + /// Represents the Shape class. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Returns the Comments Collection. Read-only. [Api set: 1.1] + /// Returns the Hyperlinks collection for a Shape object. Read-only. [Api set: 1.1] + /// Shape's identifier. Read-only. [Api set: 1.1] + /// Shape's name. Read-only. [Api set: 1.1] + /// Returns true, if shape is selected. User can set true to select the shape explicitly. [Api set: 1.1] + /// Returns the Shape's Data Section. Read-only. [Api set: 1.1] + /// Gets SubShape Collection. Read-only. [Api set: 1.1] + /// Shape's text. Read-only. [Api set: 1.1] + /// Returns the view of the shape. Read-only. [Api set: 1.1] + } + + Shape.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + Shape.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Visio.Interfaces.ShapeUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing Shape object, with properties that have already been loaded and synced. + /// + } + Shape.prototype.getBounds = function() { + /// + /// Returns the BoundingBox object that specifies bounding box of the shape. [Api set: 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = {}; + return result; + } + + return Shape; + })(OfficeExtension.ClientObject); + Visio.Shape = Shape; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var ShapeBinding = (function() { + function ShapeBinding() { + /// Shape binding informations required for data visualizer diagram [Api set: 1.1] + } + return ShapeBinding; + })(); + Interfaces.ShapeBinding.__proto__ = null; + Interfaces.ShapeBinding = ShapeBinding; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var ShapeCollection = (function(_super) { + __extends(ShapeCollection, _super); + function ShapeCollection() { + /// Represents the Shape Collection. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + ShapeCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ShapeCollection.prototype.getCount = function() { + /// + /// Gets the number of Shapes in the collection. [Api set: 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + ShapeCollection.prototype.getItem = function(key) { + /// + /// Gets a Shape using its key (name or Index). [Api set: 1.1] + /// + /// Key is the Name or Index of the shape to be retrieved. + /// + } + + return ShapeCollection; + })(OfficeExtension.ClientObject); + Visio.ShapeCollection = ShapeCollection; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var ShapeDataItem = (function(_super) { + __extends(ShapeDataItem, _super); + function ShapeDataItem() { + /// Represents the ShapeDataItem. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// A string that specifies the format of the shape data item. Read-only. [Api set: 1.1] + /// A string that specifies the formatted value of the shape data item. Read-only. [Api set: 1.1] + /// A string that specifies the label of the shape data item. Read-only. [Api set: 1.1] + /// A string that specifies the value of the shape data item. Read-only. [Api set: 1.1] + } + + ShapeDataItem.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + return ShapeDataItem; + })(OfficeExtension.ClientObject); + Visio.ShapeDataItem = ShapeDataItem; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var ShapeDataItemCollection = (function(_super) { + __extends(ShapeDataItemCollection, _super); + function ShapeDataItemCollection() { + /// Represents the ShapeDataItemCollection for a given Shape. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the loaded child items in this collection. + } + + ShapeDataItemCollection.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + ShapeDataItemCollection.prototype.getCount = function() { + /// + /// Gets the number of Shape Data Items. [Api set: 1.1] + /// + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + ShapeDataItemCollection.prototype.getItem = function(key) { + /// + /// Gets the ShapeDataItem using its name. [Api set: 1.1] + /// + /// Key is the name of the ShapeDataItem to be retrieved. + /// + } + + return ShapeDataItemCollection; + })(OfficeExtension.ClientObject); + Visio.ShapeDataItemCollection = ShapeDataItemCollection; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var ShapeMouseEnterEventArgs = (function() { + function ShapeMouseEnterEventArgs() { + /// Provides information about the shape that raised the ShapeMouseEnter event. [Api set: 1.1] + /// Gets the name of the page which has the shape object that raised the ShapeMouseEnter event. [Api set: 1.1] + /// Gets the name of the shape object that raised the ShapeMouseEnter event. [Api set: 1.1] + } + return ShapeMouseEnterEventArgs; + })(); + Interfaces.ShapeMouseEnterEventArgs.__proto__ = null; + Interfaces.ShapeMouseEnterEventArgs = ShapeMouseEnterEventArgs; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var ShapeMouseLeaveEventArgs = (function() { + function ShapeMouseLeaveEventArgs() { + /// Provides information about the shape that raised the ShapeMouseLeave event. [Api set: 1.1] + /// Gets the name of the page which has the shape object that raised the ShapeMouseLeave event. [Api set: 1.1] + /// Gets the name of the shape object that raised the ShapeMouseLeave event. [Api set: 1.1] + } + return ShapeMouseLeaveEventArgs; + })(); + Interfaces.ShapeMouseLeaveEventArgs.__proto__ = null; + Interfaces.ShapeMouseLeaveEventArgs = ShapeMouseLeaveEventArgs; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var ShapeView = (function(_super) { + __extends(ShapeView, _super); + function ShapeView() { + /// Represents the ShapeView class. [Api set: 1.1] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Represents the highlight around the shape. [Api set: 1.1] + } + + ShapeView.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + ShapeView.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Visio.Interfaces.ShapeViewUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ShapeView object, with properties that have already been loaded and synced. + /// + } + ShapeView.prototype.addOverlay = function(OverlayType, Content, OverlayHorizontalAlignment, OverlayVerticalAlignment, Width, Height) { + /// + /// Adds an overlay on top of the shape. [Api set: 1.1] + /// + /// An Overlay Type. Can be 'Text', 'Image' or 'Html'. + /// Content of Overlay. + /// Horizontal Alignment of Overlay. Can be 'Left', 'Center', or 'Right'. + /// Vertical Alignment of Overlay. Can be 'Top', 'Middle', 'Bottom'. + /// Overlay Width. + /// Overlay Height. + /// + var result = new OfficeExtension.ClientResult(); + result.__proto__ = null; + result.value = 0; + return result; + } + ShapeView.prototype.removeOverlay = function(OverlayId) { + /// + /// Removes particular overlay or all overlays on the Shape. [Api set: 1.1] + /// + /// An Overlay Id. Removes the specific overlay id from the shape. + /// + } + ShapeView.prototype.setText = function(Text) { + /// + /// The purpose of SetText API is to update the text inside a visio Shape in run time. The updated text retains the existing formatting properties of the shape's text. [Api set: 1.1] + /// + /// Text parameter is the 'Updated the text to display on the shape' + /// + } + ShapeView.prototype.showOverlay = function(overlayId, show) { + /// + /// Shows particular overlay on the Shape. [Api set: 1.1] + /// + /// overlay id in context + /// to show or hide + /// + } + + return ShapeView; + })(OfficeExtension.ClientObject); + Visio.ShapeView = ShapeView; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var TaskPaneStateChangedEventArgs = (function() { + function TaskPaneStateChangedEventArgs() { + /// Provides information about the TaskPaneStateChanged event. [Api set: 1.1] + /// Current state of the taskpane [Api set: 1.1] + /// Type of the TaskPane. [Api set: 1.1] + } + return TaskPaneStateChangedEventArgs; + })(); + Interfaces.TaskPaneStateChangedEventArgs.__proto__ = null; + Interfaces.TaskPaneStateChangedEventArgs = TaskPaneStateChangedEventArgs; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// TaskPaneType represents the types of the First Party TaskPanes that are supported by Host through APIs. Used in case of Show TaskPane API/ TaskPane State Changed Event etc [Api set: 1.1] + var TaskPaneType = { + __proto__: null, + "none": "none", + "dataVisualizerProcessMappings": "dataVisualizerProcessMappings", + "dataVisualizerOrgChartMappings": "dataVisualizerOrgChartMappings", + } + Visio.TaskPaneType = TaskPaneType; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + /// Toolbar IDs of the app [Api set: 1.1] + var ToolBarType = { + __proto__: null, + "commandBar": "commandBar", + "pageNavigationBar": "pageNavigationBar", + "statusBar": "statusBar", + } + Visio.ToolBarType = ToolBarType; +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var ApplicationUpdateData = (function() { + function ApplicationUpdateData() { + /// An interface for updating data on the Application object, for use in "application.set({ ... })". + /// Show or hide the iFrame application borders. [Api set: 1.1]; + /// Show or hide the standard toolbars. [Api set: 1.1]; + } + return ApplicationUpdateData; + })(); + Interfaces.ApplicationUpdateData.__proto__ = null; + Interfaces.ApplicationUpdateData = ApplicationUpdateData; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var DocumentUpdateData = (function() { + function DocumentUpdateData() { + /// An interface for updating data on the Document object, for use in "document.set({ ... })". + /// Represents a Visio application instance that contains this document. [Api set: 1.1] + /// Returns the DocumentView object. [Api set: 1.1] + } + return DocumentUpdateData; + })(); + Interfaces.DocumentUpdateData.__proto__ = null; + Interfaces.DocumentUpdateData = DocumentUpdateData; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var DocumentViewUpdateData = (function() { + function DocumentViewUpdateData() { + /// An interface for updating data on the DocumentView object, for use in "documentView.set({ ... })". + /// Disable Hyperlinks. [Api set: 1.1]; + /// Disable Pan. [Api set: 1.1]; + /// Disable PanZoomWindow. [Api set: 1.1]; + /// Disable Zoom. [Api set: 1.1]; + /// Hide Diagram Boundary. [Api set: 1.1]; + } + return DocumentViewUpdateData; + })(); + Interfaces.DocumentViewUpdateData.__proto__ = null; + Interfaces.DocumentViewUpdateData = DocumentViewUpdateData; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var PageUpdateData = (function() { + function PageUpdateData() { + /// An interface for updating data on the Page object, for use in "page.set({ ... })". + /// Returns the view of the page. [Api set: 1.1] + } + return PageUpdateData; + })(); + Interfaces.PageUpdateData.__proto__ = null; + Interfaces.PageUpdateData = PageUpdateData; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var PageViewUpdateData = (function() { + function PageViewUpdateData() { + /// An interface for updating data on the PageView object, for use in "pageView.set({ ... })". + /// 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]; + } + return PageViewUpdateData; + })(); + Interfaces.PageViewUpdateData.__proto__ = null; + Interfaces.PageViewUpdateData = PageViewUpdateData; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var ShapeUpdateData = (function() { + function ShapeUpdateData() { + /// An interface for updating data on the Shape object, for use in "shape.set({ ... })". + /// Returns the view of the shape. [Api set: 1.1] + /// Returns true, if shape is selected. User can set true to select the shape explicitly. [Api set: 1.1]; + } + return ShapeUpdateData; + })(); + Interfaces.ShapeUpdateData.__proto__ = null; + Interfaces.ShapeUpdateData = ShapeUpdateData; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var ShapeViewUpdateData = (function() { + function ShapeViewUpdateData() { + /// An interface for updating data on the ShapeView object, for use in "shapeView.set({ ... })". + /// Represents the highlight around the shape. [Api set: 1.1]; + } + return ShapeViewUpdateData; + })(); + Interfaces.ShapeViewUpdateData.__proto__ = null; + Interfaces.ShapeViewUpdateData = ShapeViewUpdateData; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var CommentUpdateData = (function() { + function CommentUpdateData() { + /// An interface for updating data on the Comment object, for use in "comment.set({ ... })". + /// A string that specifies the name of the author of the comment. [Api set: 1.1]; + /// A string that specifies the date when the comment was created. [Api set: 1.1]; + /// A string that contains the comment text. [Api set: 1.1]; + } + return CommentUpdateData; + })(); + Interfaces.CommentUpdateData.__proto__ = null; + Interfaces.CommentUpdateData = CommentUpdateData; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); + +var Visio; +(function (Visio) { + var Interfaces; + (function (Interfaces) { + var DataVisualizerDiagramUpdateData = (function() { + function DataVisualizerDiagramUpdateData() { + /// An interface for updating data on the DataVisualizerDiagram object, for use in "dataVisualizerDiagram.set({ ... })". + /// Returns the page object that is associated with this diagram object. [Api set: 1.1] + } + return DataVisualizerDiagramUpdateData; + })(); + Interfaces.DataVisualizerDiagramUpdateData.__proto__ = null; + Interfaces.DataVisualizerDiagramUpdateData = DataVisualizerDiagramUpdateData; + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = { __proto__: null})); +})(Visio || (Visio = {__proto__: null})); +var Visio; +(function (Visio) { + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext() { + /// + /// 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. + /// + /// Root object for interacting with the document + _super.call(this, null); + } + return RequestContext; + })(OfficeExtension.ClientRequestContext); + Visio.RequestContext = RequestContext; + + Visio.run = function (batch) { + /// + /// + /// Executes a batch script that performs actions on the Visio object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + /// + /// + /// 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. + /// + ///
+ /// + /// + /// Executes a batch script that performs actions on the Visio 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. + /// + /// + /// 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()". + /// + /// + /// 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. + /// + ///
+ /// + /// + /// Executes a batch script that performs actions on the Visio 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. + /// + /// + /// 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()". + /// + /// + /// 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. + /// + ///
+ arguments[arguments.length - 1](new Visio.RequestContext()); + return new OfficeExtension.Promise(); + } +})(Visio || (Visio = {__proto__: null})); +Visio.__proto__ = null; + diff --git a/embedded/visio-web-embedded.debug.js b/embedded/visio-web-embedded.debug.js new file mode 100644 index 000000000..1455c2a37 --- /dev/null +++ b/embedded/visio-web-embedded.debug.js @@ -0,0 +1,16369 @@ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. +*/ + +/* +* @overview es6-promise - a tiny implementation of Promises/A+. +* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +* @license Licensed under MIT license +* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE +* @version 2.3.0 +*/ + + +// Sources: +// osfweb: none +// runtime: 16.0\15303.10000 +// core: 16.0\15303.10000 +// host: 16.0.15302.34957 + + + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var OfficeExtension; +(function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire = function () { + return null; + }(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + var PromiseImpl; + (function (PromiseImpl) { + function Init() { + return (function () { + "use strict"; + function lib$es6$promise$utils$$objectOrFunction(x) { + return typeof x === 'function' || (typeof x === 'object' && x !== null); + } + function lib$es6$promise$utils$$isFunction(x) { + return typeof x === 'function'; + } + function lib$es6$promise$utils$$isMaybeThenable(x) { + return typeof x === 'object' && x !== null; + } + var lib$es6$promise$utils$$_isArray; + if (!Array.isArray) { + lib$es6$promise$utils$$_isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; + } + else { + lib$es6$promise$utils$$_isArray = Array.isArray; + } + var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray; + var lib$es6$promise$asap$$len = 0; + var lib$es6$promise$asap$$toString = {}.toString; + var lib$es6$promise$asap$$vertxNext; + var lib$es6$promise$asap$$customSchedulerFn; + var lib$es6$promise$asap$$asap = function asap(callback, arg) { + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback; + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg; + lib$es6$promise$asap$$len += 2; + if (lib$es6$promise$asap$$len === 2) { + if (lib$es6$promise$asap$$customSchedulerFn) { + lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush); + } + else { + lib$es6$promise$asap$$scheduleFlush(); + } + } + }; + function lib$es6$promise$asap$$setScheduler(scheduleFn) { + lib$es6$promise$asap$$customSchedulerFn = scheduleFn; + } + function lib$es6$promise$asap$$setAsap(asapFn) { + lib$es6$promise$asap$$asap = asapFn; + } + var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined; + var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {}; + var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver; + var lib$es6$promise$asap$$isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && + typeof importScripts !== 'undefined' && + typeof MessageChannel !== 'undefined'; + function lib$es6$promise$asap$$useNextTick() { + var nextTick = process.nextTick; + var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); + if (Array.isArray(version) && version[1] === '0' && version[2] === '10') { + nextTick = window.setImmediate; + } + return function () { + nextTick(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useVertxTimer() { + return function () { + lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useMutationObserver() { + var iterations = 0; + var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + return function () { + node.data = (iterations = ++iterations % 2); + }; + } + function lib$es6$promise$asap$$useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = lib$es6$promise$asap$$flush; + return function () { + channel.port2.postMessage(0); + }; + } + function lib$es6$promise$asap$$useSetTimeout() { + return function () { + setTimeout(lib$es6$promise$asap$$flush, 1); + }; + } + var lib$es6$promise$asap$$queue = new Array(1000); + function lib$es6$promise$asap$$flush() { + for (var i = 0; i < lib$es6$promise$asap$$len; i += 2) { + var callback = lib$es6$promise$asap$$queue[i]; + var arg = lib$es6$promise$asap$$queue[i + 1]; + callback(arg); + lib$es6$promise$asap$$queue[i] = undefined; + lib$es6$promise$asap$$queue[i + 1] = undefined; + } + lib$es6$promise$asap$$len = 0; + } + var lib$es6$promise$asap$$scheduleFlush; + if (lib$es6$promise$asap$$isNode) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick(); + } + else if (lib$es6$promise$asap$$isWorker) { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel(); + } + else { + lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout(); + } + function lib$es6$promise$$internal$$noop() { } + var lib$es6$promise$$internal$$PENDING = void 0; + var lib$es6$promise$$internal$$FULFILLED = 1; + var lib$es6$promise$$internal$$REJECTED = 2; + var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$selfFullfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function lib$es6$promise$$internal$$cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); + } + function lib$es6$promise$$internal$$getThen(promise) { + try { + return promise.then; + } + catch (error) { + lib$es6$promise$$internal$$GET_THEN_ERROR.error = error; + return lib$es6$promise$$internal$$GET_THEN_ERROR; + } + } + function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } + catch (e) { + return e; + } + } + function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) { + lib$es6$promise$asap$$asap(function (promise) { + var sealed = false; + var error = lib$es6$promise$$internal$$tryThen(then, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + lib$es6$promise$$internal$$reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + if (!sealed && error) { + sealed = true; + lib$es6$promise$$internal$$reject(promise, error); + } + }, promise); + } + function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) { + if (thenable._state === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, thenable._result); + } + else if (thenable._state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, thenable._result); + } + else { + lib$es6$promise$$internal$$subscribe(thenable, undefined, function (value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function (reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + } + function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable) { + if (maybeThenable.constructor === promise.constructor) { + lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable); + } + else { + var then = lib$es6$promise$$internal$$getThen(maybeThenable); + if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error); + } + else if (then === undefined) { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + else if (lib$es6$promise$utils$$isFunction(then)) { + lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then); + } + else { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + } + } + function lib$es6$promise$$internal$$resolve(promise, value) { + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFullfillment()); + } + else if (lib$es6$promise$utils$$objectOrFunction(value)) { + lib$es6$promise$$internal$$handleMaybeThenable(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + } + function lib$es6$promise$$internal$$publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + lib$es6$promise$$internal$$publish(promise); + } + function lib$es6$promise$$internal$$fulfill(promise, value) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._result = value; + promise._state = lib$es6$promise$$internal$$FULFILLED; + if (promise._subscribers.length !== 0) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise); + } + } + function lib$es6$promise$$internal$$reject(promise, reason) { + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + return; + } + promise._state = lib$es6$promise$$internal$$REJECTED; + promise._result = reason; + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise); + } + function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) { + var subscribers = parent._subscribers; + var length = subscribers.length; + parent._onerror = null; + subscribers[length] = child; + subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment; + subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection; + if (length === 0 && parent._state) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent); + } + } + function lib$es6$promise$$internal$$publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + if (subscribers.length === 0) { + return; + } + var child, callback, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + if (child) { + lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail); + } + else { + callback(detail); + } + } + promise._subscribers.length = 0; + } + function lib$es6$promise$$internal$$ErrorObject() { + this.error = null; + } + var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$tryCatch(callback, detail) { + try { + return callback(detail); + } + catch (e) { + lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e; + return lib$es6$promise$$internal$$TRY_CATCH_ERROR; + } + } + function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) { + var hasCallback = lib$es6$promise$utils$$isFunction(callback), value, error, succeeded, failed; + if (hasCallback) { + value = lib$es6$promise$$internal$$tryCatch(callback, detail); + if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value = null; + } + else { + succeeded = true; + } + if (promise === value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn()); + return; + } + } + else { + value = detail; + succeeded = true; + } + if (promise._state !== lib$es6$promise$$internal$$PENDING) { + } + else if (hasCallback && succeeded) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else if (failed) { + lib$es6$promise$$internal$$reject(promise, error); + } + else if (settled === lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, value); + } + else if (settled === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + } + function lib$es6$promise$$internal$$initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function rejectPromise(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + catch (e) { + lib$es6$promise$$internal$$reject(promise, e); + } + } + function lib$es6$promise$enumerator$$Enumerator(Constructor, input) { + var enumerator = this; + enumerator._instanceConstructor = Constructor; + enumerator.promise = new Constructor(lib$es6$promise$$internal$$noop); + if (enumerator._validateInput(input)) { + enumerator._input = input; + enumerator.length = input.length; + enumerator._remaining = input.length; + enumerator._init(); + if (enumerator.length === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + else { + enumerator.length = enumerator.length || 0; + enumerator._enumerate(); + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + } + } + else { + lib$es6$promise$$internal$$reject(enumerator.promise, enumerator._validationError()); + } + } + lib$es6$promise$enumerator$$Enumerator.prototype._validateInput = function (input) { + return lib$es6$promise$utils$$isArray(input); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._validationError = function () { + return new _Internal.Error('Array Methods must be provided an Array'); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._init = function () { + this._result = new Array(this.length); + }; + var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator; + lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function () { + var enumerator = this; + var length = enumerator.length; + var promise = enumerator.promise; + var input = enumerator._input; + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + enumerator._eachEntry(input[i], i); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function (entry, i) { + var enumerator = this; + var c = enumerator._instanceConstructor; + if (lib$es6$promise$utils$$isMaybeThenable(entry)) { + if (entry.constructor === c && entry._state !== lib$es6$promise$$internal$$PENDING) { + entry._onerror = null; + enumerator._settledAt(entry._state, i, entry._result); + } + else { + enumerator._willSettleAt(c.resolve(entry), i); + } + } + else { + enumerator._remaining--; + enumerator._result[i] = entry; + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function (state, i, value) { + var enumerator = this; + var promise = enumerator.promise; + if (promise._state === lib$es6$promise$$internal$$PENDING) { + enumerator._remaining--; + if (state === lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + else { + enumerator._result[i] = value; + } + } + if (enumerator._remaining === 0) { + lib$es6$promise$$internal$$fulfill(promise, enumerator._result); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function (promise, i) { + var enumerator = this; + lib$es6$promise$$internal$$subscribe(promise, undefined, function (value) { + enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value); + }, function (reason) { + enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason); + }); + }; + function lib$es6$promise$promise$all$$all(entries) { + return new lib$es6$promise$enumerator$$default(this, entries).promise; + } + var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all; + function lib$es6$promise$promise$race$$race(entries) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + if (!lib$es6$promise$utils$$isArray(entries)) { + lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.')); + return promise; + } + var length = entries.length; + function onFulfillment(value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + function onRejection(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + } + for (var i = 0; promise._state === lib$es6$promise$$internal$$PENDING && i < length; i++) { + lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); + } + return promise; + } + var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race; + function lib$es6$promise$promise$resolve$$resolve(object) { + var Constructor = this; + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$resolve(promise, object); + return promise; + } + var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve; + function lib$es6$promise$promise$reject$$reject(reason) { + var Constructor = this; + var promise = new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$reject(promise, reason); + return promise; + } + var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject; + var lib$es6$promise$promise$$counter = 0; + function lib$es6$promise$promise$$needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); + } + function lib$es6$promise$promise$$needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise; + function lib$es6$promise$promise$$Promise(resolver) { + this._id = lib$es6$promise$promise$$counter++; + this._state = undefined; + this._result = undefined; + this._subscribers = []; + if (lib$es6$promise$$internal$$noop !== resolver) { + if (!lib$es6$promise$utils$$isFunction(resolver)) { + lib$es6$promise$promise$$needsResolver(); + } + if (!(this instanceof lib$es6$promise$promise$$Promise)) { + lib$es6$promise$promise$$needsNew(); + } + lib$es6$promise$$internal$$initializePromise(this, resolver); + } + } + lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default; + lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default; + lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default; + lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default; + lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler; + lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap; + lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap; + lib$es6$promise$promise$$Promise.prototype = { + constructor: lib$es6$promise$promise$$Promise, + then: function (onFulfillment, onRejection) { + var parent = this; + var state = parent._state; + if (state === lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state === lib$es6$promise$$internal$$REJECTED && !onRejection) { + return this; + } + var child = new this.constructor(lib$es6$promise$$internal$$noop); + var result = parent._result; + if (state) { + var callback = arguments[state - 1]; + lib$es6$promise$asap$$asap(function () { + lib$es6$promise$$internal$$invokeCallback(state, child, callback, result); + }); + } + else { + lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection); + } + return child; + }, + 'catch': function (onRejection) { + return this.then(null, onRejection); + } + }; + return lib$es6$promise$promise$$default; + }).call(this); + } + PromiseImpl.Init = Init; + })(PromiseImpl = _Internal.PromiseImpl || (_Internal.PromiseImpl = {})); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + (function (_Internal) { + function isEdgeLessThan14() { + var userAgent = window.navigator.userAgent; + var versionIdx = userAgent.indexOf("Edge/"); + if (versionIdx >= 0) { + userAgent = userAgent.substring(versionIdx + 5, userAgent.length); + if (userAgent < "14.14393") + return true; + else + return false; + } + return false; + } + function determinePromise() { + if (typeof (window) === "undefined" && typeof (Promise) === "function") { + return Promise; + } + if (typeof (window) !== "undefined" && window.Promise) { + if (isEdgeLessThan14()) { + return _Internal.PromiseImpl.Init(); + } + else { + return window.Promise; + } + } + else { + return _Internal.PromiseImpl.Init(); + } + } + _Internal.OfficePromise = determinePromise(); + })(_Internal = OfficeExtension._Internal || (OfficeExtension._Internal = {})); + var OfficePromise = _Internal.OfficePromise; + OfficeExtension.Promise = OfficePromise; +})(OfficeExtension || (OfficeExtension = {})); +var OfficeExtension; +(function (OfficeExtension_1) { + var SessionBase = (function () { + function SessionBase() { + } + SessionBase.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + SessionBase.prototype._createRequestExecutorOrNull = function () { + return null; + }; + SessionBase.prototype.getEventRegistration = function (controlId) { + return null; + }; + return SessionBase; + }()); + OfficeExtension_1.SessionBase = SessionBase; + var HttpUtility = (function () { + function HttpUtility() { + } + HttpUtility.setCustomSendRequestFunc = function (func) { + HttpUtility.s_customSendRequestFunc = func; + }; + HttpUtility.xhrSendRequestFunc = function (request) { + return CoreUtility.createPromise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open(request.method, request.url); + xhr.onload = function () { + var resp = { + statusCode: xhr.status, + headers: CoreUtility._parseHttpResponseHeaders(xhr.getAllResponseHeaders()), + body: xhr.responseText + }; + resolve(resp); + }; + xhr.onerror = function () { + reject(new _Internal.RuntimeError({ + code: CoreErrorCodes.connectionFailure, + httpStatusCode: xhr.status, + message: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, xhr.statusText) + })); + }; + if (request.headers) { + for (var key in request.headers) { + xhr.setRequestHeader(key, request.headers[key]); + } + } + xhr.send(CoreUtility._getRequestBodyText(request)); + }); + }; + HttpUtility.fetchSendRequestFunc = function (request) { + var requestBodyText = CoreUtility._getRequestBodyText(request); + if (requestBodyText === '') { + requestBodyText = undefined; + } + return fetch(request.url, { + method: request.method, + headers: request.headers, + body: requestBodyText + }) + .then(function (resp) { + return resp.text() + .then(function (body) { + var statusCode = resp.status; + var headers = {}; + resp.headers.forEach(function (value, name) { + headers[name] = value; + }); + var ret = { statusCode: statusCode, headers: headers, body: body }; + return ret; + }); + }); + }; + HttpUtility.sendRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func = HttpUtility.s_customSendRequestFunc; + if (!func) { + if (typeof (fetch) !== 'undefined') { + func = HttpUtility.fetchSendRequestFunc; + } + else { + func = HttpUtility.xhrSendRequestFunc; + } + } + return func(request); + }; + HttpUtility.setCustomSendLocalDocumentRequestFunc = function (func) { + HttpUtility.s_customSendLocalDocumentRequestFunc = func; + }; + HttpUtility.sendLocalDocumentRequest = function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func; + func = HttpUtility.s_customSendLocalDocumentRequestFunc || HttpUtility.officeJsSendLocalDocumentRequestFunc; + return func(request); + }; + HttpUtility.officeJsSendLocalDocumentRequestFunc = function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestSafeArray = CoreUtility._buildRequestMessageSafeArray(request); + return CoreUtility.createPromise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { + var response; + if (asyncResult.status == 'succeeded') { + response = { + statusCode: RichApiMessageUtility.getResponseStatusCode(asyncResult), + headers: RichApiMessageUtility.getResponseHeaders(asyncResult), + body: RichApiMessageUtility.getResponseBody(asyncResult) + }; + } + else { + response = RichApiMessageUtility.buildHttpResponseFromOfficeJsError(asyncResult.error.code, asyncResult.error.message); + } + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(response)); + resolve(response); + }); + }); + }; + HttpUtility.validateAndNormalizeRequest = function (request) { + if (CoreUtility.isNullOrUndefined(request)) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + if (CoreUtility.isNullOrEmptyString(request.method)) { + request.method = 'GET'; + } + request.method = request.method.toUpperCase(); + var alreadyHasTestName = false; + if (typeof (request.headers) === 'object' && request.headers[CoreConstants.testRequestNameHeader]) { + alreadyHasTestName = true; + } + if (!alreadyHasTestName) { + var currentTestName = TestUtility._getCurrentTestNameWithSequenceId(); + if (currentTestName) { + if (!request.headers) { + request.headers = {}; + } + request.headers[CoreConstants.testRequestNameHeader] = currentTestName; + } + } + }; + HttpUtility.logRequest = function (request) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Request---'); + CoreUtility.log(request.method + ' ' + request.url); + if (request.headers) { + for (var key in request.headers) { + CoreUtility.log(key + ': ' + request.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(CoreUtility._getRequestBodyText(request)); + } + } + }; + HttpUtility.logResponse = function (response) { + if (CoreUtility._logEnabled) { + CoreUtility.log('---HTTP Response---'); + CoreUtility.log('' + response.statusCode); + if (response.headers) { + for (var key in response.headers) { + CoreUtility.log(key + ': ' + response.headers[key]); + } + } + if (HttpUtility._logBodyEnabled) { + CoreUtility.log(response.body); + } + } + }; + HttpUtility._logBodyEnabled = false; + return HttpUtility; + }()); + OfficeExtension_1.HttpUtility = HttpUtility; + var HostBridge = (function () { + function HostBridge(m_bridge) { + var _this = this; + this.m_bridge = m_bridge; + this.m_promiseResolver = {}; + this.m_handlers = []; + this.m_bridge.onMessageFromHost = function (messageText) { + var message = JSON.parse(messageText); + if (message.type == 3) { + var genericMessageBody = message.message; + if (genericMessageBody && genericMessageBody.entries) { + for (var i = 0; i < genericMessageBody.entries.length; i++) { + var entryObjectOrArray = genericMessageBody.entries[i]; + if (Array.isArray(entryObjectOrArray)) { + var entry = { + messageCategory: entryObjectOrArray[0], + messageType: entryObjectOrArray[1], + targetId: entryObjectOrArray[2], + message: entryObjectOrArray[3], + id: entryObjectOrArray[4] + }; + genericMessageBody.entries[i] = entry; + } + } + } + } + _this.dispatchMessage(message); + }; + } + HostBridge.init = function (bridge) { + if (typeof bridge !== 'object' || !bridge) { + return; + } + var instance = new HostBridge(bridge); + HostBridge.s_instance = instance; + HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + request = CoreUtility._validateLocalDocumentRequest(request); + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var index = request.url.indexOf('?'); + if (index >= 0) { + var query = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(query); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + } + if (typeof (request.body) === "string") { + request.body = JSON.parse(request.body); + } + var bridgeMessage = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + message: request + }; + return instance.sendMessageToHostAndExpectResponse(bridgeMessage).then(function (bridgeResponse) { + var responseInfo = bridgeResponse.message; + return responseInfo; + }); + }); + for (var i = 0; i < HostBridge.s_onInitedHandlers.length; i++) { + HostBridge.s_onInitedHandlers[i](instance); + } + }; + Object.defineProperty(HostBridge, "instance", { + get: function () { + return HostBridge.s_instance; + }, + enumerable: true, + configurable: true + }); + HostBridge.prototype.sendMessageToHost = function (message) { + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + }; + HostBridge.prototype.sendMessageToHostAndExpectResponse = function (message) { + var _this = this; + var ret = CoreUtility.createPromise(function (resolve, reject) { + _this.m_promiseResolver[message.id] = resolve; + }); + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + return ret; + }; + HostBridge.prototype.addHostMessageHandler = function (handler) { + this.m_handlers.push(handler); + }; + HostBridge.prototype.removeHostMessageHandler = function (handler) { + var index = this.m_handlers.indexOf(handler); + if (index >= 0) { + this.m_handlers.splice(index, 1); + } + }; + HostBridge.onInited = function (handler) { + HostBridge.s_onInitedHandlers.push(handler); + if (HostBridge.s_instance) { + handler(HostBridge.s_instance); + } + }; + HostBridge.prototype.dispatchMessage = function (message) { + if (typeof message.id === 'number') { + var resolve = this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + delete this.m_promiseResolver[message.id]; + return; + } + } + for (var i = 0; i < this.m_handlers.length; i++) { + this.m_handlers[i](message); + } + }; + HostBridge.nextId = function () { + return HostBridge.s_nextId++; + }; + HostBridge.s_onInitedHandlers = []; + HostBridge.s_nextId = 1; + return HostBridge; + }()); + OfficeExtension_1.HostBridge = HostBridge; + if (typeof _richApiNativeBridge === 'object' && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var _Internal; + (function (_Internal) { + var RuntimeError = (function (_super) { + __extends(RuntimeError, _super); + function RuntimeError(error) { + var _this = _super.call(this, typeof error === 'string' ? error : error.message) || this; + Object.setPrototypeOf(_this, RuntimeError.prototype); + _this.name = 'RichApi.Error'; + if (typeof error === 'string') { + _this.message = error; + } + else { + _this.code = error.code; + _this.message = error.message; + _this.traceMessages = error.traceMessages || []; + _this.innerError = error.innerError || null; + _this.debugInfo = _this._createDebugInfo(error.debugInfo || {}); + _this.httpStatusCode = error.httpStatusCode; + _this.data = error.data; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode) || _this.httpStatusCode === 200) { + var mapping = {}; + mapping[CoreErrorCodes.accessDenied] = 401; + mapping[CoreErrorCodes.connectionFailure] = 500; + mapping[CoreErrorCodes.generalException] = 500; + mapping[CoreErrorCodes.invalidArgument] = 400; + mapping[CoreErrorCodes.invalidObjectPath] = 400; + mapping[CoreErrorCodes.invalidOrTimedOutSession] = 408; + mapping[CoreErrorCodes.invalidRequestContext] = 400; + mapping[CoreErrorCodes.timeout] = 408; + mapping[CoreErrorCodes.valueNotLoaded] = 400; + _this.httpStatusCode = mapping[_this.code]; + } + if (CoreUtility.isNullOrUndefined(_this.httpStatusCode)) { + _this.httpStatusCode = 500; + } + return _this; + } + RuntimeError.prototype.toString = function () { + return this.code + ': ' + this.message; + }; + RuntimeError.prototype._createDebugInfo = function (partialDebugInfo) { + var debugInfo = { + code: this.code, + message: this.message + }; + debugInfo.toString = function () { + return JSON.stringify(this); + }; + for (var key in partialDebugInfo) { + debugInfo[key] = partialDebugInfo[key]; + } + if (this.innerError) { + if (this.innerError instanceof _Internal.RuntimeError) { + debugInfo.innerError = this.innerError.debugInfo; + } + else { + debugInfo.innerError = this.innerError; + } + } + return debugInfo; + }; + RuntimeError._createInvalidArgError = function (error) { + return new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility.isNullOrEmptyString(error.argumentName) + ? CoreUtility._getResourceString(CoreResourceStrings.invalidArgumentGeneric) + : CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, error.argumentName), + debugInfo: error.errorLocation ? { errorLocation: error.errorLocation } : {}, + innerError: error.innerError + }); + }; + return RuntimeError; + }(Error)); + _Internal.RuntimeError = RuntimeError; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + OfficeExtension_1.Error = _Internal.RuntimeError; + var CoreErrorCodes = (function () { + function CoreErrorCodes() { + } + CoreErrorCodes.apiNotFound = 'ApiNotFound'; + CoreErrorCodes.accessDenied = 'AccessDenied'; + CoreErrorCodes.generalException = 'GeneralException'; + CoreErrorCodes.activityLimitReached = 'ActivityLimitReached'; + CoreErrorCodes.invalidArgument = 'InvalidArgument'; + CoreErrorCodes.connectionFailure = 'ConnectionFailure'; + CoreErrorCodes.timeout = 'Timeout'; + CoreErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + CoreErrorCodes.invalidObjectPath = 'InvalidObjectPath'; + CoreErrorCodes.invalidRequestContext = 'InvalidRequestContext'; + CoreErrorCodes.valueNotLoaded = 'ValueNotLoaded'; + CoreErrorCodes.requestPayloadSizeLimitExceeded = 'RequestPayloadSizeLimitExceeded'; + CoreErrorCodes.responsePayloadSizeLimitExceeded = 'ResponsePayloadSizeLimitExceeded'; + CoreErrorCodes.writeNotSupportedWhenModalDialogOpen = 'WriteNotSupportedWhenModalDialogOpen'; + return CoreErrorCodes; + }()); + OfficeExtension_1.CoreErrorCodes = CoreErrorCodes; + var CoreResourceStrings = (function () { + function CoreResourceStrings() { + } + CoreResourceStrings.apiNotFoundDetails = 'ApiNotFoundDetails'; + CoreResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + CoreResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + CoreResourceStrings.invalidArgument = 'InvalidArgument'; + CoreResourceStrings.invalidArgumentGeneric = 'InvalidArgumentGeneric'; + CoreResourceStrings.timeout = 'Timeout'; + CoreResourceStrings.invalidOrTimedOutSessionMessage = 'InvalidOrTimedOutSessionMessage'; + CoreResourceStrings.invalidSheetName = 'InvalidSheetName'; + CoreResourceStrings.invalidObjectPath = 'InvalidObjectPath'; + CoreResourceStrings.invalidRequestContext = 'InvalidRequestContext'; + CoreResourceStrings.valueNotLoaded = 'ValueNotLoaded'; + return CoreResourceStrings; + }()); + OfficeExtension_1.CoreResourceStrings = CoreResourceStrings; + var CoreConstants = (function () { + function CoreConstants() { + } + CoreConstants.flags = 'flags'; + CoreConstants.sourceLibHeader = 'SdkVersion'; + CoreConstants.processQuery = 'ProcessQuery'; + CoreConstants.localDocument = 'http://document.localhost/'; + CoreConstants.localDocumentApiPrefix = 'http://document.localhost/_api/'; + CoreConstants.customData = 'customdata'; + CoreConstants.testRequestNameHeader = 'x-test-request-name'; + return CoreConstants; + }()); + OfficeExtension_1.CoreConstants = CoreConstants; + var RichApiMessageUtility = (function () { + function RichApiMessageUtility() { + } + RichApiMessageUtility.buildMessageArrayForIRequestExecutor = function (customData, requestFlags, requestMessage, sourceLibHeaderValue) { + var requestMessageText = JSON.stringify(requestMessage.Body); + CoreUtility.log('Request:'); + CoreUtility.log(requestMessageText); + var headers = {}; + CoreUtility._copyHeaders(requestMessage.Headers, headers); + headers[CoreConstants.sourceLibHeader] = sourceLibHeaderValue; + var messageSafearray = RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, 'POST', CoreConstants.processQuery, headers, requestMessageText); + return messageSafearray; + }; + RichApiMessageUtility.buildResponseOnSuccess = function (responseBody, responseHeaders) { + var response = { HttpStatusCode: 200, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.Body = JSON.parse(responseBody); + response.Headers = responseHeaders; + return response; + }; + RichApiMessageUtility.buildResponseOnError = function (errorCode, message) { + var response = { HttpStatusCode: 500, ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.ErrorCode = CoreErrorCodes.generalException; + response.ErrorMessage = message; + if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + response.ErrorCode = CoreErrorCodes.accessDenied; + response.HttpStatusCode = 401; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + response.ErrorCode = CoreErrorCodes.activityLimitReached; + response.HttpStatusCode = 429; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession) { + response.ErrorCode = CoreErrorCodes.invalidOrTimedOutSession; + response.HttpStatusCode = 408; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidOrTimedOutSessionMessage); + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.requestPayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded) { + response.ErrorCode = CoreErrorCodes.responsePayloadSizeLimitExceeded; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen) { + response.ErrorCode = CoreErrorCodes.writeNotSupportedWhenModalDialogOpen; + response.HttpStatusCode = 400; + } + else if (errorCode == RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName) { + response.ErrorCode = CoreErrorCodes.invalidRequestContext; + response.HttpStatusCode = 400; + response.ErrorMessage = CoreUtility._getResourceString(CoreResourceStrings.invalidSheetName); + } + return response; + }; + RichApiMessageUtility.buildHttpResponseFromOfficeJsError = function (errorCode, message) { + var statusCode = 500; + var errorBody = {}; + errorBody['error'] = {}; + errorBody['error']['code'] = CoreErrorCodes.generalException; + errorBody['error']['message'] = message; + if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + statusCode = 403; + errorBody['error']['code'] = CoreErrorCodes.accessDenied; + } + else if (errorCode === RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + statusCode = 429; + errorBody['error']['code'] = CoreErrorCodes.activityLimitReached; + } + return { statusCode: statusCode, headers: {}, body: JSON.stringify(errorBody) }; + }; + RichApiMessageUtility.buildRequestMessageSafeArray = function (customData, requestFlags, method, path, headers, body) { + var headerArray = []; + if (headers) { + for (var headerName in headers) { + headerArray.push(headerName); + headerArray.push(headers[headerName]); + } + } + var appPermission = 0; + var solutionId = ''; + var instanceId = ''; + var marketplaceType = ''; + var solutionVersion = ''; + var storeLocation = ''; + var compliantSolutionId = ''; + return [ + customData, + method, + path, + headerArray, + body, + appPermission, + requestFlags, + solutionId, + instanceId, + marketplaceType, + solutionVersion, + storeLocation, + compliantSolutionId + ]; + }; + RichApiMessageUtility.getResponseBody = function (result) { + return RichApiMessageUtility.getResponseBodyFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseHeaders = function (result) { + return RichApiMessageUtility.getResponseHeadersFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseBodyFromSafeArray = function (data) { + var ret = data[2]; + if (typeof ret === 'string') { + return ret; + } + var arr = ret; + return arr.join(''); + }; + RichApiMessageUtility.getResponseHeadersFromSafeArray = function (data) { + var arrayHeader = data[1]; + if (!arrayHeader) { + return null; + } + var headers = {}; + for (var i = 0; i < arrayHeader.length - 1; i += 2) { + headers[arrayHeader[i]] = arrayHeader[i + 1]; + } + return headers; + }; + RichApiMessageUtility.getResponseStatusCode = function (result) { + return RichApiMessageUtility.getResponseStatusCodeFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseStatusCodeFromSafeArray = function (data) { + return data[0]; + }; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession = 5012; + RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached = 5102; + RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability = 7000; + RichApiMessageUtility.OfficeJsErrorCode_ooeRequestPayloadSizeLimitExceeded = 5103; + RichApiMessageUtility.OfficeJsErrorCode_ooeResponsePayloadSizeLimitExceeded = 5104; + RichApiMessageUtility.OfficeJsErrorCode_ooeWriteNotSupportedWhenModalDialogOpen = 5016; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidSheetName = 1014; + return RichApiMessageUtility; + }()); + OfficeExtension_1.RichApiMessageUtility = RichApiMessageUtility; + (function (_Internal) { + function getPromiseType() { + if (typeof Promise !== 'undefined') { + return Promise; + } + if (typeof Office !== 'undefined') { + if (Office.Promise) { + return Office.Promise; + } + } + if (typeof OfficeExtension !== 'undefined') { + if (OfficeExtension.Promise) { + return OfficeExtension.Promise; + } + } + throw new _Internal.Error('No Promise implementation found'); + } + _Internal.getPromiseType = getPromiseType; + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var CoreUtility = (function () { + function CoreUtility() { + } + CoreUtility.log = function (message) { + if (CoreUtility._logEnabled && typeof console !== 'undefined' && console.log) { + console.log(message); + } + }; + CoreUtility.checkArgumentNull = function (value, name) { + if (CoreUtility.isNullOrUndefined(value)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: name }); + } + }; + CoreUtility.isNullOrUndefined = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isUndefined = function (value) { + if (typeof value === 'undefined') { + return true; + } + return false; + }; + CoreUtility.isNullOrEmptyString = function (value) { + if (value === null) { + return true; + } + if (typeof value === 'undefined') { + return true; + } + if (value.length == 0) { + return true; + } + return false; + }; + CoreUtility.isPlainJsonObject = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return false; + } + if (typeof value !== 'object') { + return false; + } + if (Object.prototype.toString.apply(value) !== '[object Object]') { + return false; + } + if (value.constructor && + !Object.prototype.hasOwnProperty.call(value, 'constructor') && + !Object.prototype.hasOwnProperty.call(value.constructor.prototype, 'hasOwnProperty')) { + return false; + } + for (var key in value) { + if (!Object.prototype.hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + }; + CoreUtility.trim = function (str) { + return str.replace(new RegExp('^\\s+|\\s+$', 'g'), ''); + }; + CoreUtility.caseInsensitiveCompareString = function (str1, str2) { + if (CoreUtility.isNullOrUndefined(str1)) { + return CoreUtility.isNullOrUndefined(str2); + } + else { + if (CoreUtility.isNullOrUndefined(str2)) { + return false; + } + else { + return str1.toUpperCase() == str2.toUpperCase(); + } + } + }; + CoreUtility.isReadonlyRestRequest = function (method) { + return CoreUtility.caseInsensitiveCompareString(method, 'GET'); + }; + CoreUtility._getResourceString = function (resourceId, arg) { + var ret; + if (typeof window !== 'undefined' && window.Strings && window.Strings.OfficeOM) { + var stringName = 'L_' + resourceId; + var stringValue = window.Strings.OfficeOM[stringName]; + if (stringValue) { + ret = stringValue; + } + } + if (!ret) { + ret = CoreUtility.s_resourceStringValues[resourceId]; + } + if (!ret) { + ret = resourceId; + } + if (!CoreUtility.isNullOrUndefined(arg)) { + if (Array.isArray(arg)) { + var arrArg = arg; + ret = CoreUtility._formatString(ret, arrArg); + } + else { + ret = ret.replace('{0}', arg); + } + } + return ret; + }; + CoreUtility._formatString = function (format, arrArg) { + return format.replace(/\{\d\}/g, function (v) { + var position = parseInt(v.substr(1, v.length - 2)); + if (position < arrArg.length) { + return arrArg[position]; + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'format' }); + } + }); + }; + Object.defineProperty(CoreUtility, "Promise", { + get: function () { + return _Internal.getPromiseType(); + }, + enumerable: true, + configurable: true + }); + CoreUtility.createPromise = function (executor) { + var ret = new CoreUtility.Promise(executor); + return ret; + }; + CoreUtility._createPromiseFromResult = function (value) { + return CoreUtility.createPromise(function (resolve, reject) { + resolve(value); + }); + }; + CoreUtility._createPromiseFromException = function (reason) { + return CoreUtility.createPromise(function (resolve, reject) { + reject(reason); + }); + }; + CoreUtility._createTimeoutPromise = function (timeout) { + return CoreUtility.createPromise(function (resolve, reject) { + setTimeout(function () { + resolve(null); + }, timeout); + }); + }; + CoreUtility._createInvalidArgError = function (error) { + return _Internal.RuntimeError._createInvalidArgError(error); + }; + CoreUtility._isLocalDocumentUrl = function (url) { + return CoreUtility._getLocalDocumentUrlPrefixLength(url) > 0; + }; + CoreUtility._getLocalDocumentUrlPrefixLength = function (url) { + var localDocumentPrefixes = [ + 'http://document.localhost', + 'https://document.localhost', + '//document.localhost' + ]; + var urlLower = url.toLowerCase().trim(); + for (var i = 0; i < localDocumentPrefixes.length; i++) { + if (urlLower === localDocumentPrefixes[i]) { + return localDocumentPrefixes[i].length; + } + else if (urlLower.substr(0, localDocumentPrefixes[i].length + 1) === localDocumentPrefixes[i] + '/') { + return localDocumentPrefixes[i].length + 1; + } + } + return 0; + }; + CoreUtility._validateLocalDocumentRequest = function (request) { + var index = CoreUtility._getLocalDocumentUrlPrefixLength(request.url); + if (index <= 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'request' + }); + } + var path = request.url.substr(index); + var pathLower = path.toLowerCase(); + if (pathLower === '_api') { + path = ''; + } + else if (pathLower.substr(0, '_api/'.length) === '_api/') { + path = path.substr('_api/'.length); + } + return { + method: request.method, + url: path, + headers: request.headers, + body: request.body + }; + }; + CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny = function (queryString) { + var ret = { flags: -1, customData: '' }; + var parts = queryString.split('&'); + for (var i = 0; i < parts.length; i++) { + var keyvalue = parts[i].split('='); + if (keyvalue[0].toLowerCase() === CoreConstants.flags) { + var flags = parseInt(keyvalue[1]); + flags = flags & 8191; + ret.flags = flags; + } + else if (keyvalue[0].toLowerCase() === CoreConstants.customData) { + ret.customData = decodeURIComponent(keyvalue[1]); + } + } + return ret; + }; + CoreUtility._getRequestBodyText = function (request) { + var body = ''; + if (typeof request.body === 'string') { + body = request.body; + } + else if (request.body && typeof request.body === 'object') { + body = JSON.stringify(request.body); + } + return body; + }; + CoreUtility._parseResponseBody = function (response) { + if (typeof response.body === 'string') { + var bodyText = CoreUtility.trim(response.body); + return JSON.parse(bodyText); + } + else { + return response.body; + } + }; + CoreUtility._buildRequestMessageSafeArray = function (request) { + var requestFlags = 0; + if (!CoreUtility.isReadonlyRestRequest(request.method)) { + requestFlags = 1; + } + var customData = ''; + if (request.url.substr(0, CoreConstants.processQuery.length).toLowerCase() === + CoreConstants.processQuery.toLowerCase()) { + var index = request.url.indexOf('?'); + if (index > 0) { + var queryString = request.url.substr(index + 1); + var flagsAndCustomData = CoreUtility._parseRequestFlagsAndCustomDataFromQueryStringIfAny(queryString); + if (flagsAndCustomData.flags >= 0) { + requestFlags = flagsAndCustomData.flags; + } + customData = flagsAndCustomData.customData; + } + } + return RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, request.method, request.url, request.headers, CoreUtility._getRequestBodyText(request)); + }; + CoreUtility._parseHttpResponseHeaders = function (allResponseHeaders) { + var responseHeaders = {}; + if (!CoreUtility.isNullOrEmptyString(allResponseHeaders)) { + var regex = new RegExp('\r?\n'); + var entries = allResponseHeaders.split(regex); + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + if (entry != null) { + var index = entry.indexOf(':'); + if (index > 0) { + var key = entry.substr(0, index); + var value = entry.substr(index + 1); + key = CoreUtility.trim(key); + value = CoreUtility.trim(value); + responseHeaders[key.toUpperCase()] = value; + } + } + } + } + return responseHeaders; + }; + CoreUtility._parseErrorResponse = function (responseInfo) { + var errorObj = CoreUtility._parseErrorResponseBody(responseInfo); + var statusCode = responseInfo.statusCode.toString(); + if (CoreUtility.isNullOrUndefined(errorObj) || typeof errorObj !== 'object' || !errorObj.error) { + return CoreUtility._createDefaultErrorResponse(statusCode); + } + var error = errorObj.error; + var innerError = error.innerError; + if (innerError && innerError.code) { + return CoreUtility._createErrorResponse(innerError.code, statusCode, innerError.message); + } + if (error.code) { + return CoreUtility._createErrorResponse(error.code, statusCode, error.message); + } + return CoreUtility._createDefaultErrorResponse(statusCode); + }; + CoreUtility._parseErrorResponseBody = function (responseInfo) { + if (CoreUtility.isPlainJsonObject(responseInfo.body)) { + return responseInfo.body; + } + else if (!CoreUtility.isNullOrEmptyString(responseInfo.body)) { + var errorResponseBody = CoreUtility.trim(responseInfo.body); + try { + return JSON.parse(errorResponseBody); + } + catch (e) { + CoreUtility.log('Error when parse ' + errorResponseBody); + } + } + }; + CoreUtility._createDefaultErrorResponse = function (statusCode) { + return { + errorCode: CoreErrorCodes.connectionFailure, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithStatus, statusCode) + }; + }; + CoreUtility._createErrorResponse = function (code, statusCode, message) { + return { + errorCode: code, + errorMessage: CoreUtility._getResourceString(CoreResourceStrings.connectionFailureWithDetails, [ + statusCode, + code, + message + ]) + }; + }; + CoreUtility._copyHeaders = function (src, dest) { + if (src && dest) { + for (var key in src) { + dest[key] = src[key]; + } + } + }; + CoreUtility.addResourceStringValues = function (values) { + for (var key in values) { + CoreUtility.s_resourceStringValues[key] = values[key]; + } + }; + CoreUtility._logEnabled = false; + CoreUtility.s_resourceStringValues = { + ApiNotFoundDetails: 'The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.', + ConnectionFailureWithStatus: 'The request failed with status code of {0}.', + ConnectionFailureWithDetails: 'The request failed with status code of {0}, error code {1} and the following error message: {2}', + InvalidArgument: "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.", + InvalidObjectPath: 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.', + InvalidRequestContext: 'Cannot use the object across different request contexts.', + Timeout: 'The operation has timed out.', + ValueNotLoaded: 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.' + }; + return CoreUtility; + }()); + OfficeExtension_1.CoreUtility = CoreUtility; + var TestUtility = (function () { + function TestUtility() { + } + TestUtility.setMock = function (value) { + TestUtility.s_isMock = value; + }; + TestUtility.isMock = function () { + return TestUtility.s_isMock; + }; + TestUtility._setCurrentTestName = function (value) { + TestUtility.s_currentTestName = value; + TestUtility.s_currentTestSequenceId = 0; + }; + TestUtility._getCurrentTestNameWithSequenceId = function () { + if (TestUtility.s_currentTestName) { + TestUtility.s_currentTestSequenceId++; + return TestUtility.s_currentTestName + "." + TestUtility.s_currentTestSequenceId; + } + return null; + }; + return TestUtility; + }()); + OfficeExtension_1.TestUtility = TestUtility; + OfficeExtension_1._internalConfig = { + showDisposeInfoInDebugInfo: false, + showInternalApiInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectUpdateMethod: false, + alwaysPolyfillClientObjectRetrieveMethod: false, + enableConcurrentFlag: true, + enableUndoableFlag: true, + appendTypeNameToObjectPathInfo: false, + enablePreviewExecution: false + }; + OfficeExtension_1.config = { + extendedErrorLogging: false + }; + var CommonActionFactory = (function () { + function CommonActionFactory() { + } + CommonActionFactory.createSetPropertyAction = function (context, parent, propertyName, value, flags) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var args = [value]; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + CommonUtility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var action = new Action(actionInfo, 0, flags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (flags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectId: '', + ObjectType: '', + Arguments: [value] + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return parent._addAction(action); + }; + CommonActionFactory.createQueryAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 2, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createQueryAsJsonAction = function (context, parent, queryOption, resultHandler) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 7, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + QueryInfo: queryOption + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action, resultHandler); + }; + CommonActionFactory.createUpdateAction = function (context, parent, objectState) { + CommonUtility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 9, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 0, 0); + action.referencedObjectPath = parent._objectPath; + return parent._addAction(action); + }; + return CommonActionFactory; + }()); + OfficeExtension_1.CommonActionFactory = CommonActionFactory; + var ClientObjectBase = (function () { + function ClientObjectBase(contextBase, objectPath) { + this.m_contextBase = contextBase; + this.m_objectPath = objectPath; + } + Object.defineProperty(ClientObjectBase.prototype, "_objectPath", { + get: function () { + return this.m_objectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObjectBase.prototype, "_context", { + get: function () { + return this.m_contextBase; + }, + enumerable: true, + configurable: true + }); + ClientObjectBase.prototype._addAction = function (action, resultHandler) { + var _this = this; + if (resultHandler === void 0) { + resultHandler = null; + } + return CoreUtility.createPromise(function (resolve, reject) { + _this._context._addServiceApiAction(action, resultHandler, resolve, reject); + }); + }; + ClientObjectBase.prototype._addPreviewExecutionAction = function (action) { + }; + ClientObjectBase.prototype._retrieve = function (option, resultHandler) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var queryOption = ClientRequestContextBase._parseQueryOption(option); + if (shouldPolyfill) { + return CommonActionFactory.createQueryAction(this._context, this, queryOption, resultHandler); + } + return CommonActionFactory.createQueryAsJsonAction(this._context, this, queryOption, resultHandler); + }; + ClientObjectBase.prototype._recursivelyUpdate = function (properties) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectUpdateMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.2'); + } + try { + var scalarPropNames = this[CommonConstants.scalarPropertyNames]; + if (!scalarPropNames) { + scalarPropNames = []; + } + var scalarPropUpdatable = this[CommonConstants.scalarPropertyUpdateable]; + if (!scalarPropUpdatable) { + scalarPropUpdatable = []; + for (var i = 0; i < scalarPropNames.length; i++) { + scalarPropUpdatable.push(false); + } + } + var navigationPropNames = this[CommonConstants.navigationPropertyNames]; + if (!navigationPropNames) { + navigationPropNames = []; + } + var scalarProps = {}; + var navigationProps = {}; + var scalarPropCount = 0; + for (var propName in properties) { + var index = scalarPropNames.indexOf(propName); + if (index >= 0) { + if (!scalarPropUpdatable[index]) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, propName), + debugInfo: { + errorLocation: propName + } + }); + } + scalarProps[propName] = properties[propName]; + ++scalarPropCount; + } + else if (navigationPropNames.indexOf(propName) >= 0) { + navigationProps[propName] = properties[propName]; + } + else { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, propName), + debugInfo: { + errorLocation: propName + } + }); + } + } + if (scalarPropCount > 0) { + if (shouldPolyfill) { + for (var i = 0; i < scalarPropNames.length; i++) { + var propName = scalarPropNames[i]; + var propValue = scalarProps[propName]; + if (!CommonUtility.isUndefined(propValue)) { + CommonActionFactory.createSetPropertyAction(this._context, this, propName, propValue); + } + } + } + else { + CommonActionFactory.createUpdateAction(this._context, this, scalarProps); + } + } + for (var propName in navigationProps) { + var navigationPropProxy = this[propName]; + var navigationPropValue = navigationProps[propName]; + navigationPropProxy._recursivelyUpdate(navigationPropValue); + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.update' + }, + innerError: innerError + }); + } + }; + return ClientObjectBase; + }()); + OfficeExtension_1.ClientObjectBase = ClientObjectBase; + var Action = (function () { + function Action(actionInfo, operationType, flags) { + this.m_actionInfo = actionInfo; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(Action.prototype, "actionInfo", { + get: function () { + return this.m_actionInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + return Action; + }()); + OfficeExtension_1.Action = Action; + var ObjectPath = (function () { + function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest, operationType, flags) { + this.m_objectPathInfo = objectPathInfo; + this.m_parentObjectPath = parentObjectPath; + this.m_isCollection = isCollection; + this.m_isInvalidAfterRequest = isInvalidAfterRequest; + this.m_isValid = true; + this.m_operationType = operationType; + this.m_flags = flags; + } + Object.defineProperty(ObjectPath.prototype, "id", { + get: function () { + var argumentInfo = this.m_objectPathInfo.ArgumentInfo; + if (!argumentInfo) { + return undefined; + } + var argument = argumentInfo.Arguments; + if (!argument) { + return undefined; + } + return argument[0]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parent", { + get: function () { + var parent = this.m_parentObjectPath; + if (!parent) { + return undefined; + } + return parent; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentId", { + get: function () { + return this.parent ? this.parent.id : undefined; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "objectPathInfo", { + get: function () { + return this.m_objectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "operationType", { + get: function () { + return this.m_operationType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isCollection", { + get: function () { + return this.m_isCollection; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isInvalidAfterRequest", { + get: function () { + return this.m_isInvalidAfterRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentObjectPath", { + get: function () { + return this.m_parentObjectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "argumentObjectPaths", { + get: function () { + return this.m_argumentObjectPaths; + }, + set: function (value) { + this.m_argumentObjectPaths = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isValid", { + get: function () { + return this.m_isValid; + }, + set: function (value) { + this.m_isValid = value; + if (!value && + this.m_objectPathInfo.ObjectPathType === 6 && + this.m_savedObjectPathInfo) { + ObjectPath.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo, this.m_objectPathInfo); + this.m_parentObjectPath = this.m_savedObjectPathInfo.parent; + this.m_isValid = true; + this.m_savedObjectPathInfo = null; + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "originalObjectPathInfo", { + get: function () { + return this.m_originalObjectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "getByIdMethodName", { + get: function () { + return this.m_getByIdMethodName; + }, + set: function (value) { + this.m_getByIdMethodName = value; + }, + enumerable: true, + configurable: true + }); + ObjectPath.prototype._updateAsNullObject = function () { + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 7; + this.m_objectPathInfo.Name = ''; + this.m_parentObjectPath = null; + }; + ObjectPath.prototype.saveOriginalObjectPathInfo = function () { + if (OfficeExtension_1.config.extendedErrorLogging && !this.m_originalObjectPathInfo) { + this.m_originalObjectPathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, this.m_originalObjectPathInfo); + } + }; + ObjectPath.prototype.updateUsingObjectData = function (value, clientObject) { + var referenceId = value[CommonConstants.referenceId]; + if (!CoreUtility.isNullOrEmptyString(referenceId)) { + if (!this.m_savedObjectPathInfo && + !this.isInvalidAfterRequest && + ObjectPath.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)) { + var pathInfo = {}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, pathInfo); + this.m_savedObjectPathInfo = { + pathInfo: pathInfo, + parent: this.m_parentObjectPath + }; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_objectPathInfo.ObjectPathType = 6; + this.m_objectPathInfo.Name = referenceId; + delete this.m_objectPathInfo.ParentObjectPathId; + this.m_parentObjectPath = null; + return; + } + if (clientObject) { + var collectionPropertyPath = clientObject[CommonConstants.collectionPropertyPath]; + if (!CoreUtility.isNullOrEmptyString(collectionPropertyPath) && clientObject.context) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + var propNames = collectionPropertyPath.split('.'); + var parent_1 = clientObject.context[propNames[0]]; + for (var i = 1; i < propNames.length; i++) { + parent_1 = parent_1[propNames[i]]; + } + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + this.m_parentObjectPath = parent_1._objectPath; + this.m_objectPathInfo.ParentObjectPathId = this.m_parentObjectPath.objectPathInfo.Id; + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + } + var parentIsCollection = this.parentObjectPath && this.parentObjectPath.isCollection; + var getByIdMethodName = this.getByIdMethodName; + if (parentIsCollection || !CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + var id = CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult(value); + if (!CoreUtility.isNullOrUndefined(id)) { + this.saveOriginalObjectPathInfo(); + this.resetForUpdateUsingObjectData(); + if (!CoreUtility.isNullOrEmptyString(getByIdMethodName)) { + this.m_objectPathInfo.ObjectPathType = 3; + this.m_objectPathInfo.Name = getByIdMethodName; + } + else { + this.m_objectPathInfo.ObjectPathType = 5; + this.m_objectPathInfo.Name = ''; + } + this.m_objectPathInfo.ArgumentInfo.Arguments = [id]; + return; + } + } + }; + ObjectPath.prototype.resetForUpdateUsingObjectData = function () { + this.m_isInvalidAfterRequest = false; + this.m_isValid = true; + this.m_operationType = 1; + this.m_flags = 4; + this.m_objectPathInfo.ArgumentInfo = {}; + this.m_argumentObjectPaths = null; + this.m_getByIdMethodName = null; + }; + ObjectPath.isRestorableObjectPath = function (objectPathType) { + return (objectPathType === 1 || + objectPathType === 5 || + objectPathType === 3 || + objectPathType === 4); + }; + ObjectPath.copyObjectPathInfo = function (src, dest) { + dest.Id = src.Id; + dest.ArgumentInfo = src.ArgumentInfo; + dest.Name = src.Name; + dest.ObjectPathType = src.ObjectPathType; + dest.ParentObjectPathId = src.ParentObjectPathId; + }; + return ObjectPath; + }()); + OfficeExtension_1.ObjectPath = ObjectPath; + var ClientRequestContextBase = (function () { + function ClientRequestContextBase() { + this.m_nextId = 0; + } + ClientRequestContextBase.prototype._nextId = function () { + return ++this.m_nextId; + }; + ClientRequestContextBase.prototype._addServiceApiAction = function (action, resultHandler, resolve, reject) { + if (!this.m_serviceApiQueue) { + this.m_serviceApiQueue = new ServiceApiQueue(this); + } + this.m_serviceApiQueue.add(action, resultHandler, resolve, reject); + }; + ClientRequestContextBase._parseQueryOption = function (option) { + var queryOption = {}; + if (typeof option === 'string') { + var select = option; + queryOption.Select = CommonUtility._parseSelectExpand(select); + } + else if (Array.isArray(option)) { + queryOption.Select = option; + } + else if (typeof option === 'object') { + var loadOption = option; + if (ClientRequestContextBase.isLoadOption(loadOption)) { + if (typeof loadOption.select === 'string') { + queryOption.Select = CommonUtility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select = loadOption.select; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.select)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.select' }); + } + if (typeof loadOption.expand === 'string') { + queryOption.Expand = CommonUtility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand = loadOption.expand; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.expand)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.expand' }); + } + if (typeof loadOption.top === 'number') { + queryOption.Top = loadOption.top; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.top)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.top' }); + } + if (typeof loadOption.skip === 'number') { + queryOption.Skip = loadOption.skip; + } + else if (!CommonUtility.isNullOrUndefined(loadOption.skip)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option.skip' }); + } + } + else { + queryOption = ClientRequestContextBase.parseStrictLoadOption(option); + } + } + else if (!CommonUtility.isNullOrUndefined(option)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'option' }); + } + return queryOption; + }; + ClientRequestContextBase.isLoadOption = function (loadOption) { + if (!CommonUtility.isUndefined(loadOption.select) && + (typeof loadOption.select === 'string' || Array.isArray(loadOption.select))) + return true; + if (!CommonUtility.isUndefined(loadOption.expand) && + (typeof loadOption.expand === 'string' || Array.isArray(loadOption.expand))) + return true; + if (!CommonUtility.isUndefined(loadOption.top) && typeof loadOption.top === 'number') + return true; + if (!CommonUtility.isUndefined(loadOption.skip) && typeof loadOption.skip === 'number') + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContextBase.parseStrictLoadOption = function (option) { + var ret = { Select: [] }; + ClientRequestContextBase.parseStrictLoadOptionHelper(ret, '', 'option', option); + return ret; + }; + ClientRequestContextBase.combineQueryPath = function (pathPrefix, key, separator) { + if (pathPrefix.length === 0) { + return key; + } + else { + return pathPrefix + separator + key; + } + }; + ClientRequestContextBase.parseStrictLoadOptionHelper = function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value = option[key]; + if (key === '$all') { + if (typeof value !== 'boolean') { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, '*', '/')); + } + } + else if (key === '$top') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Top = value; + } + else if (key === '$skip') { + if (typeof value !== 'number' || pathPrefix.length > 0) { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + queryInfo.Skip = value; + } + else { + if (typeof value === 'boolean') { + if (value) { + queryInfo.Select.push(ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/')); + } + } + else if (typeof value === 'object') { + ClientRequestContextBase.parseStrictLoadOptionHelper(queryInfo, ClientRequestContextBase.combineQueryPath(pathPrefix, key, '/'), ClientRequestContextBase.combineQueryPath(argPrefix, key, '.'), value); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: ClientRequestContextBase.combineQueryPath(argPrefix, key, '.') + }); + } + } + } + }; + return ClientRequestContextBase; + }()); + OfficeExtension_1.ClientRequestContextBase = ClientRequestContextBase; + var InstantiateActionUpdateObjectPathHandler = (function () { + function InstantiateActionUpdateObjectPathHandler(m_objectPath) { + this.m_objectPath = m_objectPath; + } + InstantiateActionUpdateObjectPathHandler.prototype._handleResult = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + this.m_objectPath._updateAsNullObject(); + } + else { + this.m_objectPath.updateUsingObjectData(value, null); + } + }; + return InstantiateActionUpdateObjectPathHandler; + }()); + var ClientRequestBase = (function () { + function ClientRequestBase(context) { + this.m_contextBase = context; + this.m_actions = []; + this.m_actionResultHandler = {}; + this.m_referencedObjectPaths = {}; + this.m_instantiatedObjectPaths = {}; + this.m_preSyncPromises = []; + this.m_previewExecutionActions = []; + } + ClientRequestBase.prototype.addAction = function (action) { + this.m_actions.push(action); + if (action.actionInfo.ActionType == 1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId] = action; + } + }; + ClientRequestBase.prototype.addPreviewExecutionAction = function (action) { + this.m_previewExecutionActions.push(action); + }; + Object.defineProperty(ClientRequestBase.prototype, "hasActions", { + get: function () { + return this.m_actions.length > 0; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._getLastAction = function () { + return this.m_actions[this.m_actions.length - 1]; + }; + ClientRequestBase.prototype.ensureInstantiateObjectPath = function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo = { + Id: this.m_contextBase._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction = new Action(actionInfo, 1, 4); + instantiateAction.referencedObjectPath = objectPath; + this.addReferencedObjectPath(objectPath); + this.addAction(instantiateAction); + var resultHandler = new InstantiateActionUpdateObjectPathHandler(objectPath); + this.addActionResultHandler(instantiateAction, resultHandler); + } + } + }; + ClientRequestBase.prototype.ensureInstantiateObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addReferencedObjectPath = function (objectPath) { + if (!objectPath || this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + while (objectPath) { + this.m_referencedObjectPaths[objectPath.objectPathInfo.Id] = objectPath; + if (objectPath.objectPathInfo.ObjectPathType == 3) { + this.addReferencedObjectPaths(objectPath.argumentObjectPaths); + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase.prototype.addReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + this.addReferencedObjectPath(objectPaths[i]); + } + } + }; + ClientRequestBase.prototype.addActionResultHandler = function (action, resultHandler) { + this.m_actionResultHandler[action.actionInfo.Id] = resultHandler; + }; + ClientRequestBase.prototype.aggregrateRequestFlags = function (requestFlags, operationType, flags) { + if (operationType === 0) { + requestFlags = requestFlags | 1; + if ((flags & 2) === 0) { + requestFlags = requestFlags & ~16; + } + if ((flags & 8) === 0) { + requestFlags = requestFlags & ~256; + } + requestFlags = requestFlags & ~4; + } + if (flags & 1) { + requestFlags = requestFlags | 2; + } + if ((flags & 4) === 0) { + requestFlags = requestFlags & ~4; + } + return requestFlags; + }; + ClientRequestBase.prototype.finallyNormalizeFlags = function (requestFlags) { + if ((requestFlags & 1) === 0) { + requestFlags = requestFlags & ~16; + requestFlags = requestFlags & ~256; + } + if (!OfficeExtension_1._internalConfig.enableConcurrentFlag) { + requestFlags = requestFlags & ~4; + } + if (!OfficeExtension_1._internalConfig.enableUndoableFlag) { + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.1')) { + requestFlags = requestFlags & ~4; + requestFlags = requestFlags & ~16; + } + if (!CommonUtility.isSetSupported('RichApiRuntimeFlag', '1.2')) { + requestFlags = requestFlags & ~256; + } + if (typeof this.m_flagsForTesting === 'number') { + requestFlags = this.m_flagsForTesting; + } + return requestFlags; + }; + ClientRequestBase.prototype.buildRequestMessageBodyAndRequestFlags = function () { + if (OfficeExtension_1._internalConfig.enableEarlyDispose) { + ClientRequestBase._calculateLastUsedObjectPathIds(this.m_actions); + } + var requestFlags = 4 | + 16 | + 256; + var objectPaths = {}; + for (var i in this.m_referencedObjectPaths) { + requestFlags = this.aggregrateRequestFlags(requestFlags, this.m_referencedObjectPaths[i].operationType, this.m_referencedObjectPaths[i].flags); + objectPaths[i] = this.m_referencedObjectPaths[i].objectPathInfo; + } + var actions = []; + var hasKeepReference = false; + for (var index = 0; index < this.m_actions.length; index++) { + var action = this.m_actions[index]; + if (action.actionInfo.ActionType === 3 && + action.actionInfo.Name === CommonConstants.keepReference) { + hasKeepReference = true; + } + requestFlags = this.aggregrateRequestFlags(requestFlags, action.operationType, action.flags); + actions.push(action.actionInfo); + } + requestFlags = this.finallyNormalizeFlags(requestFlags); + var body = { + AutoKeepReference: this.m_contextBase._autoCleanup && hasKeepReference, + Actions: actions, + ObjectPaths: objectPaths + }; + if (this.m_previewExecutionActions.length > 0) { + body.PreviewExecutionActions = this.m_previewExecutionActions; + requestFlags = requestFlags | 4096; + } + return { + body: body, + flags: requestFlags + }; + }; + ClientRequestBase.prototype.processResponse = function (actionResults) { + if (actionResults) { + for (var i = 0; i < actionResults.length; i++) { + var actionResult = actionResults[i]; + var handler = this.m_actionResultHandler[actionResult.ActionId]; + if (handler) { + handler._handleResult(actionResult.Value); + } + } + } + }; + ClientRequestBase.prototype.invalidatePendingInvalidObjectPaths = function () { + for (var i in this.m_referencedObjectPaths) { + if (this.m_referencedObjectPaths[i].isInvalidAfterRequest) { + this.m_referencedObjectPaths[i].isValid = false; + } + } + }; + ClientRequestBase.prototype._addPreSyncPromise = function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequestBase.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestBase.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequestBase.prototype._removeKeepReferenceAction = function (objectPathId) { + for (var i = this.m_actions.length - 1; i >= 0; i--) { + var actionInfo = this.m_actions[i].actionInfo; + if (actionInfo.ObjectPathId === objectPathId && + actionInfo.ActionType === 3 && + actionInfo.Name === CommonConstants.keepReference) { + this.m_actions.splice(i, 1); + break; + } + } + }; + ClientRequestBase._updateLastUsedActionIdOfObjectPathId = function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id] = actionId; + var argumentObjectPaths = objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength = argumentObjectPaths.length; + for (var i = 0; i < argumentObjectPathsLength; i++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath = objectPath.parentObjectPath; + } + }; + ClientRequestBase._calculateLastUsedObjectPathIds = function (actions) { + var lastUsedActionIdOfObjectPathId = {}; + var actionsLength = actions.length; + for (var index = actionsLength - 1; index >= 0; --index) { + var action = actions[index]; + var actionId = action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths = action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength = referencedObjectPaths.length; + for (var refIndex = 0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequestBase._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction = {}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId = lastUsedActionIdOfObjectPathId[key]; + var objectPathIds = lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds = []; + lastUsedObjectPathIdsOfAction[actionId] = objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index = 0; index < actionsLength; index++) { + var action = actions[index]; + var lastUsedObjectPathIds = lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L = lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; + return ClientRequestBase; + }()); + OfficeExtension_1.ClientRequestBase = ClientRequestBase; + var ClientResult = (function () { + function ClientResult(m_type) { + this.m_type = m_type; + } + Object.defineProperty(ClientResult.prototype, "value", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'clientResult.value' + } + }); + } + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ClientResult.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (typeof value === 'object' && value && value._IsNull) { + return; + } + if (this.m_type === 1) { + this.m_value = CommonUtility.adjustToDateTime(value); + } + else { + this.m_value = value; + } + }; + return ClientResult; + }()); + OfficeExtension_1.ClientResult = ClientResult; + var ServiceApiQueue = (function () { + function ServiceApiQueue(m_context) { + this.m_context = m_context; + this.m_actions = []; + } + ServiceApiQueue.prototype.add = function (action, resultHandler, resolve, reject) { + var _this = this; + this.m_actions.push({ action: action, resultHandler: resultHandler, resolve: resolve, reject: reject }); + if (this.m_actions.length === 1) { + setTimeout(function () { return _this.processActions(); }, 0); + } + }; + ServiceApiQueue.prototype.processActions = function () { + var _this = this; + if (this.m_actions.length === 0) { + return; + } + var actions = this.m_actions; + this.m_actions = []; + var request = new ClientRequestBase(this.m_context); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + request.ensureInstantiateObjectPath(action.action.referencedObjectPath); + request.ensureInstantiateObjectPaths(action.action.referencedArgumentObjectPaths); + request.addAction(action.action); + request.addReferencedObjectPath(action.action.referencedObjectPath); + request.addReferencedObjectPaths(action.action.referencedArgumentObjectPaths); + } + var _a = request.buildRequestMessageBodyAndRequestFlags(), body = _a.body, flags = _a.flags; + var requestMessage = { + Url: CoreConstants.localDocumentApiPrefix, + Headers: null, + Body: body + }; + CoreUtility.log('Request:'); + CoreUtility.log(JSON.stringify(body)); + var executor = new HttpRequestExecutor(); + executor + .executeAsync(this.m_context._customData, flags, requestMessage) + .then(function (response) { + _this.processResponse(request, actions, response); + })["catch"](function (ex) { + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + action.reject(ex); + } + }); + }; + ServiceApiQueue.prototype.processResponse = function (request, actions, response) { + var error = this.getErrorFromResponse(response); + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (!actionResults) { + actionResults = []; + } + this.processActionResults(request, actions, actionResults, error); + }; + ServiceApiQueue.prototype.getErrorFromResponse = function (response) { + if (!CoreUtility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage + }); + } + if (response.Body && response.Body.Error) { + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message + }); + } + return null; + }; + ServiceApiQueue.prototype.processActionResults = function (request, actions, actionResults, err) { + request.processResponse(actionResults); + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + var actionId = action.action.actionInfo.Id; + var hasResult = false; + for (var j = 0; j < actionResults.length; j++) { + if (actionId == actionResults[j].ActionId) { + var resultValue = actionResults[j].Value; + if (action.resultHandler) { + action.resultHandler._handleResult(resultValue); + resultValue = action.resultHandler.value; + } + if (action.resolve) { + action.resolve(resultValue); + } + hasResult = true; + break; + } + } + if (!hasResult && action.reject) { + if (err) { + action.reject(err); + } + else { + action.reject('No response for the action.'); + } + } + } + }; + return ServiceApiQueue; + }()); + var HttpRequestExecutor = (function () { + function HttpRequestExecutor() { + } + HttpRequestExecutor.prototype.getRequestUrl = function (baseUrl, requestFlags) { + if (baseUrl.charAt(baseUrl.length - 1) != '/') { + baseUrl = baseUrl + '/'; + } + baseUrl = baseUrl + CoreConstants.processQuery; + baseUrl = baseUrl + '?' + CoreConstants.flags + '=' + requestFlags.toString(); + return baseUrl; + }; + HttpRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var url = this.getRequestUrl(requestMessage.Url, requestFlags); + var requestInfo = { + method: 'POST', + url: url, + headers: {}, + body: requestMessage.Body + }; + requestInfo.headers[CoreConstants.sourceLibHeader] = HttpRequestExecutor.SourceLibHeaderValue; + requestInfo.headers['CONTENT-TYPE'] = 'application/json'; + if (requestMessage.Headers) { + for (var key in requestMessage.Headers) { + requestInfo.headers[key] = requestMessage.Headers[key]; + } + } + var sendRequestFunc = CoreUtility._isLocalDocumentUrl(requestInfo.url) + ? HttpUtility.sendLocalDocumentRequest + : HttpUtility.sendRequest; + return sendRequestFunc(requestInfo).then(function (responseInfo) { + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null, + RawErrorResponseBody: CoreUtility._parseErrorResponseBody(responseInfo) + }; + } + return response; + }); + }; + HttpRequestExecutor.SourceLibHeaderValue = 'officejs-rest'; + return HttpRequestExecutor; + }()); + OfficeExtension_1.HttpRequestExecutor = HttpRequestExecutor; + var CommonConstants = (function (_super) { + __extends(CommonConstants, _super); + function CommonConstants() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonConstants.collectionPropertyPath = '_collectionPropertyPath'; + CommonConstants.id = 'Id'; + CommonConstants.idLowerCase = 'id'; + CommonConstants.idPrivate = '_Id'; + CommonConstants.keepReference = '_KeepReference'; + CommonConstants.objectPathIdPrivate = '_ObjectPathId'; + CommonConstants.referenceId = '_ReferenceId'; + CommonConstants.items = '_Items'; + CommonConstants.itemsLowerCase = 'items'; + CommonConstants.scalarPropertyNames = '_scalarPropertyNames'; + CommonConstants.scalarPropertyOriginalNames = '_scalarPropertyOriginalNames'; + CommonConstants.navigationPropertyNames = '_navigationPropertyNames'; + CommonConstants.scalarPropertyUpdateable = '_scalarPropertyUpdateable'; + CommonConstants.previewExecutionObjectId = '_previewExecutionObjectId'; + return CommonConstants; + }(CoreConstants)); + OfficeExtension_1.CommonConstants = CommonConstants; + var CommonUtility = (function (_super) { + __extends(CommonUtility, _super); + function CommonUtility() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonUtility.validateObjectPath = function (clientObject) { + var objectPath = clientObject._objectPath; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: CommonUtility.getObjectPathExpression(objectPath) + } + }); + } + objectPath = objectPath.parentObjectPath; + } + }; + CommonUtility.validateReferencedObjectPaths = function (objectPaths) { + if (objectPaths) { + for (var i = 0; i < objectPaths.length; i++) { + var objectPath = objectPaths[i]; + while (objectPath) { + if (!objectPath.isValid) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidObjectPath, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidObjectPath, CommonUtility.getObjectPathExpression(objectPath)) + }); + } + objectPath = objectPath.parentObjectPath; + } + } + } + }; + CommonUtility._toCamelLowerCase = function (name) { + if (CoreUtility.isNullOrEmptyString(name)) { + return name; + } + var index = 0; + while (index < name.length && name.charCodeAt(index) >= 65 && name.charCodeAt(index) <= 90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase() + name.substr(index); + } + else { + return name.toLowerCase(); + } + }; + CommonUtility.adjustToDateTime = function (value) { + if (CoreUtility.isNullOrUndefined(value)) { + return null; + } + if (typeof value === 'string') { + return new Date(value); + } + if (Array.isArray(value)) { + var arr = value; + for (var i = 0; i < arr.length; i++) { + arr[i] = CommonUtility.adjustToDateTime(arr[i]); + } + return arr; + } + throw CoreUtility._createInvalidArgError({ argumentName: 'date' }); + }; + CommonUtility.tryGetObjectIdFromLoadOrRetrieveResult = function (value) { + var id = value[CommonConstants.id]; + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idLowerCase]; + } + if (CoreUtility.isNullOrUndefined(id)) { + id = value[CommonConstants.idPrivate]; + } + return id; + }; + CommonUtility.getObjectPathExpression = function (objectPath) { + var ret = ''; + while (objectPath) { + switch (objectPath.objectPathInfo.ObjectPathType) { + case 1: + ret = ret; + break; + case 2: + ret = 'new()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 3: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + '()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 4: + ret = CommonUtility.normalizeName(objectPath.objectPathInfo.Name) + (ret.length > 0 ? '.' : '') + ret; + break; + case 5: + ret = 'getItem()' + (ret.length > 0 ? '.' : '') + ret; + break; + case 6: + ret = '_reference()' + (ret.length > 0 ? '.' : '') + ret; + break; + } + objectPath = objectPath.parentObjectPath; + } + return ret; + }; + CommonUtility.setMethodArguments = function (context, argumentInfo, args) { + if (CoreUtility.isNullOrUndefined(args)) { + return null; + } + var referencedObjectPaths = new Array(); + var referencedObjectPathIds = new Array(); + var hasOne = CommonUtility.collectObjectPathInfos(context, args, referencedObjectPaths, referencedObjectPathIds); + argumentInfo.Arguments = args; + if (hasOne) { + argumentInfo.ReferencedObjectPathIds = referencedObjectPathIds; + } + return referencedObjectPaths; + }; + CommonUtility.validateContext = function (context, obj) { + if (context && obj && obj._context !== context) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidRequestContext, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidRequestContext) + }); + } + }; + CommonUtility.isSetSupported = function (apiSetName, apiSetVersion) { + if (typeof window !== 'undefined' && + window.Office && + window.Office.context && + window.Office.context.requirements) { + return window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion); + } + return true; + }; + CommonUtility.throwIfApiNotSupported = function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!CommonUtility._doApiNotSupportedCheck) { + return; + } + if (!CommonUtility.isSetSupported(apiSetName, apiSetVersion)) { + var message = CoreUtility._getResourceString(CoreResourceStrings.apiNotFoundDetails, [ + apiFullName, + apiSetName + ' ' + apiSetVersion, + hostName + ]); + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.apiNotFound, + httpStatusCode: 404, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + }; + CommonUtility.calculateApiFlags = function (apiFlags, undoableApiSetName, undoableApiSetVersion) { + if (!CommonUtility.isSetSupported(undoableApiSetName, undoableApiSetVersion)) { + apiFlags = apiFlags & (~2); + } + return apiFlags; + }; + CommonUtility._parseSelectExpand = function (select) { + var args = []; + if (!CoreUtility.isNullOrEmptyString(select)) { + var propertyNames = select.split(','); + for (var i = 0; i < propertyNames.length; i++) { + var propertyName = propertyNames[i]; + propertyName = sanitizeForAnyItemsSlash(propertyName.trim()); + if (propertyName.length > 0) { + args.push(propertyName); + } + } + } + return args; + function sanitizeForAnyItemsSlash(propertyName) { + var propertyNameLower = propertyName.toLowerCase(); + if (propertyNameLower === 'items' || propertyNameLower === 'items/') { + return '*'; + } + var itemsSlashLength = 6; + var isItemsSlashOrItemsDot = propertyNameLower.substr(0, itemsSlashLength) === 'items/' || + propertyNameLower.substr(0, itemsSlashLength) === 'items.'; + if (isItemsSlashOrItemsDot) { + propertyName = propertyName.substr(itemsSlashLength); + } + return propertyName.replace(new RegExp('[/.]items[/.]', 'gi'), '/'); + } + }; + CommonUtility.changePropertyNameToCamelLowerCase = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + var propValue = value[key]; + if (key === CommonConstants.items) { + ret = {}; + ret[CommonConstants.itemsLowerCase] = this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else { + var propName = CommonUtility._toCamelLowerCase(key); + ret[propName] = this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.purifyJson = function (value) { + var charCodeUnderscore = 95; + if (Array.isArray(value)) { + var ret = []; + for (var i = 0; i < value.length; i++) { + ret.push(this.purifyJson(value[i])); + } + return ret; + } + else if (typeof value === 'object' && value !== null) { + var ret = {}; + for (var key in value) { + if (key.charCodeAt(0) !== charCodeUnderscore) { + var propValue = value[key]; + if (typeof propValue === 'object' && propValue !== null && Array.isArray(propValue['items'])) { + propValue = propValue['items']; + } + ret[key] = this.purifyJson(propValue); + } + } + return ret; + } + else { + return value; + } + }; + CommonUtility.collectObjectPathInfos = function (context, args, referencedObjectPaths, referencedObjectPathIds) { + var hasOne = false; + for (var i = 0; i < args.length; i++) { + if (args[i] instanceof ClientObjectBase) { + var clientObject = args[i]; + CommonUtility.validateContext(context, clientObject); + args[i] = clientObject._objectPath.objectPathInfo.Id; + referencedObjectPathIds.push(clientObject._objectPath.objectPathInfo.Id); + referencedObjectPaths.push(clientObject._objectPath); + hasOne = true; + } + else if (Array.isArray(args[i])) { + var childArrayObjectPathIds = new Array(); + var childArrayHasOne = CommonUtility.collectObjectPathInfos(context, args[i], referencedObjectPaths, childArrayObjectPathIds); + if (childArrayHasOne) { + referencedObjectPathIds.push(childArrayObjectPathIds); + hasOne = true; + } + else { + referencedObjectPathIds.push(0); + } + } + else if (CoreUtility.isPlainJsonObject(args[i])) { + referencedObjectPathIds.push(0); + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(args[i], referencedObjectPaths); + } + else { + referencedObjectPathIds.push(0); + } + } + return hasOne; + }; + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds = function (value, referencedObjectPaths) { + var _a, _b; + for (var key in value) { + var propValue = value[key]; + if (propValue instanceof ClientObjectBase) { + referencedObjectPaths.push(propValue._objectPath); + value[key] = (_a = {}, _a[CommonConstants.objectPathIdPrivate] = propValue._objectPath.objectPathInfo.Id, _a); + } + else if (Array.isArray(propValue)) { + for (var i = 0; i < propValue.length; i++) { + if (propValue[i] instanceof ClientObjectBase) { + var elem = propValue[i]; + referencedObjectPaths.push(elem._objectPath); + propValue[i] = (_b = {}, _b[CommonConstants.objectPathIdPrivate] = elem._objectPath.objectPathInfo.Id, _b); + } + else if (CoreUtility.isPlainJsonObject(propValue[i])) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue[i], referencedObjectPaths); + } + } + } + else if (CoreUtility.isPlainJsonObject(propValue)) { + CommonUtility.replaceClientObjectPropertiesWithObjectPathIds(propValue, referencedObjectPaths); + } + else { + } + } + }; + CommonUtility.normalizeName = function (name) { + return name.substr(0, 1).toLowerCase() + name.substr(1); + }; + CommonUtility._doApiNotSupportedCheck = false; + return CommonUtility; + }(CoreUtility)); + OfficeExtension_1.CommonUtility = CommonUtility; + var CommonResourceStrings = (function (_super) { + __extends(CommonResourceStrings, _super); + function CommonResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + CommonResourceStrings.propertyDoesNotExist = 'PropertyDoesNotExist'; + CommonResourceStrings.attemptingToSetReadOnlyProperty = 'AttemptingToSetReadOnlyProperty'; + return CommonResourceStrings; + }(CoreResourceStrings)); + OfficeExtension_1.CommonResourceStrings = CommonResourceStrings; + var ClientRetrieveResult = (function (_super) { + __extends(ClientRetrieveResult, _super); + function ClientRetrieveResult(m_shouldPolyfill) { + var _this = _super.call(this) || this; + _this.m_shouldPolyfill = m_shouldPolyfill; + return _this; + } + ClientRetrieveResult.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (this.m_shouldPolyfill) { + this.m_value = CommonUtility.changePropertyNameToCamelLowerCase(this.m_value); + } + this.m_value = this.removeItemNodes(this.m_value); + }; + ClientRetrieveResult.prototype.removeItemNodes = function (value) { + if (typeof value === 'object' && value !== null && value[CommonConstants.itemsLowerCase]) { + value = value[CommonConstants.itemsLowerCase]; + } + return CommonUtility.purifyJson(value); + }; + return ClientRetrieveResult; + }(ClientResult)); + OfficeExtension_1.ClientRetrieveResult = ClientRetrieveResult; + var TraceActionResultHandler = (function () { + function TraceActionResultHandler(callback) { + this.callback = callback; + } + TraceActionResultHandler.prototype._handleResult = function (value) { + if (this.callback) { + this.callback(); + } + }; + return TraceActionResultHandler; + }()); + var ClientResultCallback = (function (_super) { + __extends(ClientResultCallback, _super); + function ClientResultCallback(callback) { + var _this = _super.call(this) || this; + _this.callback = callback; + return _this; + } + ClientResultCallback.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + this.callback(); + }; + return ClientResultCallback; + }(ClientResult)); + OfficeExtension_1.ClientResultCallback = ClientResultCallback; + var OperationalApiHelper = (function () { + function OperationalApiHelper() { + } + OperationalApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + if (operationType === void 0) { + operationType = 0; + } + if (args === void 0) { + args = []; + } + if (flags === void 0) { + flags = 0; + } + if (resultProcessType === void 0) { + resultProcessType = 0; + } + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResult(); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeMethodWithClientResultCallback = function (callback, obj, methodName) { + var operationType = 0; + var args = []; + var flags = 0; + return CoreUtility.createPromise(function (resolve, reject) { + var result = new ClientResultCallback(callback); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: obj._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = CommonUtility.setMethodArguments(obj._context, actionInfo.ArgumentInfo, args); + var action = new Action(actionInfo, operationType, flags); + action.referencedObjectPath = obj._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + obj._context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.invokeRetrieve = function (obj, select) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !CommonUtility.isSetSupported('RichApiRuntime', '1.1'); + } + var option; + if (typeof select[0] === 'object' && select[0].hasOwnProperty('$all')) { + if (!select[0]['$all']) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + option = select[0]; + } + else { + option = OperationalApiHelper._parseSelectOption(select); + } + return obj._retrieve(option, new ClientRetrieveResult(shouldPolyfill)); + }; + OperationalApiHelper._parseSelectOption = function (select) { + if (!select || !select[0]) { + throw OfficeExtension_1.Error._createInvalidArgError({}); + } + var parsedSelect = select[0] && typeof select[0] !== 'string' ? select[0] : select; + return Array.isArray(parsedSelect) ? parsedSelect : OperationalApiHelper.parseRecursiveSelect(parsedSelect); + }; + OperationalApiHelper.parseRecursiveSelect = function (select) { + var deconstruct = function (selectObj) { + return Object.keys(selectObj).reduce(function (scalars, name) { + var value = selectObj[name]; + if (typeof value === 'object') { + return scalars.concat(deconstruct(value).map(function (postfix) { return name + "/" + postfix; })); + } + if (value) { + return scalars.concat(name); + } + return scalars; + }, []); + }; + return deconstruct(select); + }; + OperationalApiHelper.invokeRecursiveUpdate = function (obj, properties) { + return CoreUtility.createPromise(function (resolve, reject) { + obj._recursivelyUpdate(properties); + var actionInfo = { + Id: obj._context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + obj._context._addServiceApiAction(action, null, resolve, reject); + }); + }; + OperationalApiHelper.createRootServiceObject = function (type, context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + var objectPath = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var objectPath = new ObjectPath(objectPathInfo, null, isCollection, false, 1, flags | 4); + return new type(context, objectPath); + }; + OperationalApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, false, 1, flags | 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createIndexerObject = function (type, parent, args) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + return new type(parent._context, objectPath); + }; + OperationalApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var id = parent._context._nextId(); + var objectPathInfo = { + Id: id, + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var o = new type(parent._context, objectPath); + return o; + }; + OperationalApiHelper.createAndInstantiateMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + return CoreUtility.createPromise(function (resolve, reject) { + var objectPathInfo = { + Id: parent._context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = CommonUtility.setMethodArguments(parent._context, objectPathInfo.ArgumentInfo, args); + var objectPath = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, flags); + objectPath.argumentObjectPaths = argumentObjectPaths; + objectPath.getByIdMethodName = getByIdMethodName; + var result = new ClientResult(); + var actionInfo = { + Id: parent._context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: objectPath.objectPathInfo.Id, + QueryInfo: {} + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = objectPath; + parent._context._addServiceApiAction(action, result, function () { return resolve(new type(parent._context, objectPath)); }, reject); + }); + }; + OperationalApiHelper.createTraceAction = function (context, callback) { + return CoreUtility.createPromise(function (resolve, reject) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var action = new Action(actionInfo, 1, 4); + var result = new TraceActionResultHandler(callback); + context._addServiceApiAction(action, result, resolve, reject); + }); + }; + OperationalApiHelper.localDocumentContext = new ClientRequestContextBase(); + return OperationalApiHelper; + }()); + OfficeExtension_1.OperationalApiHelper = OperationalApiHelper; + var GenericEventRegistryOperational = (function () { + function GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform) { + this.eventId = eventId; + this.targetId = targetId; + this.eventArgumentTransform = eventArgumentTransform; + this.registeredCallbacks = []; + } + GenericEventRegistryOperational.prototype.add = function (callback) { + if (this.hasZero()) { + GenericEventRegistration.getGenericEventRegistration('').register(this.eventId, this.targetId, this.registerCallback); + } + this.registeredCallbacks.push(callback); + }; + GenericEventRegistryOperational.prototype.remove = function (callback) { + var index = this.registeredCallbacks.lastIndexOf(callback); + if (index !== -1) { + this.registeredCallbacks.splice(index, 1); + } + }; + GenericEventRegistryOperational.prototype.removeAll = function () { + this.registeredCallbacks = []; + GenericEventRegistration.getGenericEventRegistration('').unregister(this.eventId, this.targetId, this.registerCallback); + }; + GenericEventRegistryOperational.prototype.hasZero = function () { + return this.registeredCallbacks.length === 0; + }; + Object.defineProperty(GenericEventRegistryOperational.prototype, "registerCallback", { + get: function () { + var i = this; + if (!this.outsideCallback) { + this.outsideCallback = function (argument) { + i.call(argument); + }; + } + return this.outsideCallback; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistryOperational.prototype.call = function (rawEventArguments) { + var _this = this; + this.eventArgumentTransform(rawEventArguments).then(function (eventArguments) { + var promises = _this.registeredCallbacks.map(function (callback) { return GenericEventRegistryOperational.callCallback(callback, eventArguments); }); + CoreUtility.Promise.all(promises); + }); + }; + GenericEventRegistryOperational.callCallback = function (callback, eventArguments) { + return CoreUtility._createPromiseFromResult(null) + .then(GenericEventRegistryOperational.wrapCallbackInFunction(callback, eventArguments))["catch"](function (e) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(e)); + }); + }; + GenericEventRegistryOperational.wrapCallbackInFunction = function (callback, args) { + return function () { return callback(args); }; + }; + return GenericEventRegistryOperational; + }()); + OfficeExtension_1.GenericEventRegistryOperational = GenericEventRegistryOperational; + var GlobalEventRegistryOperational = (function () { + function GlobalEventRegistryOperational() { + this.eventToTargetToHandlerMap = {}; + } + Object.defineProperty(GlobalEventRegistryOperational, "globalEventRegistry", { + get: function () { + if (!GlobalEventRegistryOperational.singleton) { + GlobalEventRegistryOperational.singleton = new GlobalEventRegistryOperational(); + } + return GlobalEventRegistryOperational.singleton; + }, + enumerable: true, + configurable: true + }); + GlobalEventRegistryOperational.getGlobalEventRegistry = function (eventId, targetId, eventArgumentTransform) { + var global = GlobalEventRegistryOperational.globalEventRegistry; + var mapGlobal = global.eventToTargetToHandlerMap; + if (!mapGlobal.hasOwnProperty(eventId)) { + mapGlobal[eventId] = {}; + } + var mapEvent = mapGlobal[eventId]; + if (!mapEvent.hasOwnProperty(targetId)) { + mapEvent[targetId] = new GenericEventRegistryOperational(eventId, targetId, eventArgumentTransform); + } + var target = mapEvent[targetId]; + return target; + }; + GlobalEventRegistryOperational.singleton = undefined; + return GlobalEventRegistryOperational; + }()); + OfficeExtension_1.GlobalEventRegistryOperational = GlobalEventRegistryOperational; + var GenericEventHandlerOperational = (function () { + function GenericEventHandlerOperational(genericEventInfo) { + this.genericEventInfo = genericEventInfo; + } + GenericEventHandlerOperational.prototype.add = function (callback) { + var _this = this; + var eventRegistered = undefined; + var promise = CoreUtility.createPromise(function (resolve) { + eventRegistered = resolve; + }); + var addCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.add(callback); + eventRegistered(); + }; + this.register(); + this.createTrace(addCallback); + return promise; + }; + GenericEventHandlerOperational.prototype.remove = function (callback) { + var _this = this; + var removeCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.remove(callback); + }; + this.register(); + this.createTrace(removeCallback); + }; + GenericEventHandlerOperational.prototype.removeAll = function () { + var _this = this; + var removeAllCallback = function () { + var eventId = _this.genericEventInfo.eventType; + var targetId = _this.genericEventInfo.getTargetIdFunc(); + var event = GlobalEventRegistryOperational.getGlobalEventRegistry(eventId, targetId, _this.genericEventInfo.eventArgsTransformFunc); + event.removeAll(); + }; + this.unregister(); + this.createTrace(removeAllCallback); + }; + GenericEventHandlerOperational.prototype.createTrace = function (callback) { + OperationalApiHelper.createTraceAction(this.genericEventInfo.object._context, callback); + }; + GenericEventHandlerOperational.prototype.register = function () { + var operationType = 0; + var args = []; + var flags = 0; + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.register, operationType, args, flags); + if (!GenericEventRegistration.getGenericEventRegistration('').isReady) { + GenericEventRegistration.getGenericEventRegistration('').ready(); + } + }; + GenericEventHandlerOperational.prototype.unregister = function () { + OperationalApiHelper.invokeMethod(this.genericEventInfo.object, this.genericEventInfo.unregister); + }; + return GenericEventHandlerOperational; + }()); + OfficeExtension_1.GenericEventHandlerOperational = GenericEventHandlerOperational; + var EventHelper = (function () { + function EventHelper() { + } + EventHelper.invokeOn = function (eventHandler, callback, options) { + var promiseResolve = undefined; + var promise = CoreUtility.createPromise(function (resolve, reject) { + promiseResolve = resolve; + }); + eventHandler.add(callback).then(function () { + promiseResolve({}); + }); + return promise; + }; + EventHelper.invokeOff = function (genericEventHandlersOpObj, eventHandler, eventName, callback) { + if (!eventName && !callback) { + var allGenericEventHandlersOp = Object.keys(genericEventHandlersOpObj).map(function (eventName) { return genericEventHandlersOpObj[eventName]; }); + return EventHelper.invokeAllOff(allGenericEventHandlersOp); + } + if (!eventName) { + return CoreUtility._createPromiseFromException(eventName + " must be supplied if handler is supplied."); + } + if (callback) { + eventHandler.remove(callback); + } + else { + eventHandler.removeAll(); + } + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + EventHelper.invokeAllOff = function (allGenericEventHandlersOperational) { + allGenericEventHandlersOperational.forEach(function (genericEventHandlerOperational) { + genericEventHandlerOperational.removeAll(); + }); + return CoreUtility.createPromise(function (resolve, reject) { return resolve(); }); + }; + return EventHelper; + }()); + OfficeExtension_1.EventHelper = EventHelper; + var ErrorCodes = (function (_super) { + __extends(ErrorCodes, _super); + function ErrorCodes() { + return _super !== null && _super.apply(this, arguments) || this; + } + ErrorCodes.propertyNotLoaded = 'PropertyNotLoaded'; + ErrorCodes.runMustReturnPromise = 'RunMustReturnPromise'; + ErrorCodes.cannotRegisterEvent = 'CannotRegisterEvent'; + ErrorCodes.invalidOrTimedOutSession = 'InvalidOrTimedOutSession'; + ErrorCodes.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ErrorCodes; + }(CoreErrorCodes)); + OfficeExtension_1.ErrorCodes = ErrorCodes; + var TraceMarkerActionResultHandler = (function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback = callback; + } + TraceMarkerActionResultHandler.prototype._handleResult = function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); + var ActionFactory = (function (_super) { + __extends(ActionFactory, _super); + function ActionFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + ActionFactory.createMethodAction = function (context, parent, methodName, operationType, args, flags) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths = Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + var fixedFlags = Utility._fixupApiFlags(flags); + var action = new Action(actionInfo, operationType, fixedFlags); + action.referencedObjectPath = parent._objectPath; + action.referencedArgumentObjectPaths = referencedArgumentObjectPaths; + parent._addAction(action); + if (OfficeExtension_1._internalConfig.enablePreviewExecution && (fixedFlags & 16) !== 0) { + var previewExecutionAction = { + Id: context._nextId(), + ActionType: 3, + Name: methodName, + Arguments: args, + ObjectId: '', + ObjectType: '' + }; + parent._addPreviewExecutionAction(previewExecutionAction); + } + return action; + }; + ActionFactory.createRecursiveQueryAction = function (context, parent, query) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 6, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + RecursiveQueryInfo: query + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createEnsureUnchangedAction = function (context, parent, objectState) { + Utility.validateObjectPath(parent); + var actionInfo = { + Id: context._nextId(), + ActionType: 8, + Name: '', + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = parent._objectPath; + parent._addAction(action); + return action; + }; + ActionFactory.createInstantiateAction = function (context, obj) { + Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); + var actionInfo = { + Id: context._nextId(), + ActionType: 1, + Name: '', + ObjectPathId: obj._objectPath.objectPathInfo.Id + }; + var action = new Action(actionInfo, 1, 4); + action.referencedObjectPath = obj._objectPath; + obj._addAction(action, new InstantiateActionResultHandler(obj), true); + return action; + }; + ActionFactory.createTraceAction = function (context, message, addTraceMessage) { + var actionInfo = { + Id: context._nextId(), + ActionType: 5, + Name: 'Trace', + ObjectPathId: 0 + }; + var ret = new Action(actionInfo, 1, 4); + context._pendingRequest.addAction(ret); + if (addTraceMessage) { + context._pendingRequest.addTrace(actionInfo.Id, message); + } + return ret; + }; + ActionFactory.createTraceMarkerForCallback = function (context, callback) { + var action = ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; + return ActionFactory; + }(CommonActionFactory)); + OfficeExtension_1.ActionFactory = ActionFactory; + var ClientObject = (function (_super) { + __extends(ClientObject, _super); + function ClientObject(context, objectPath) { + var _this = _super.call(this, context, objectPath) || this; + Utility.checkArgumentNull(context, 'context'); + _this.m_context = context; + if (_this._objectPath) { + if (!context._processingResult && context._pendingRequest) { + ActionFactory.createInstantiateAction(context, _this); + if (context._autoCleanup && _this._KeepReference) { + context.trackedObjects._autoAdd(_this); + } + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo && _this._objectPath.objectPathInfo && _this._className) { + _this._objectPath.objectPathInfo.T = _this._className; + } + } + return _this; + } + Object.defineProperty(ClientObject.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNull", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNull', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNullObject", { + get: function () { + if (typeof (this.m_isNull) === 'undefined' && TestUtility.isMock()) { + return false; + } + Utility.throwIfNotLoaded('isNullObject', this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "_isNull", { + get: function () { + return this.m_isNull; + }, + set: function (value) { + this.m_isNull = value; + if (value && this._objectPath) { + this._objectPath._updateAsNullObject(); + } + }, + enumerable: true, + configurable: true + }); + ClientObject.prototype._addAction = function (action, resultHandler, isInstantiationEnsured) { + if (resultHandler === void 0) { + resultHandler = null; + } + if (!isInstantiationEnsured) { + this.context._pendingRequest.ensureInstantiateObjectPath(this._objectPath); + this.context._pendingRequest.ensureInstantiateObjectPaths(action.referencedArgumentObjectPaths); + } + this.context._pendingRequest.addAction(action); + this.context._pendingRequest.addReferencedObjectPath(this._objectPath); + this.context._pendingRequest.addReferencedObjectPaths(action.referencedArgumentObjectPaths); + this.context._pendingRequest.addActionResultHandler(action, resultHandler); + return CoreUtility._createPromiseFromResult(null); + }; + ClientObject.prototype._addPreviewExecutionAction = function (action) { + if (!Utility.isUndefined(this._className)) { + action.ObjectType = this._className; + var objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idLowerCase); + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.idPrivate); + } + if (Utility.isUndefined(objectId)) { + objectId = Utility._getPropertyValueWithoutCheckLoaded(this, Constants.previewExecutionObjectId); + } + action.ObjectId = objectId; + this.context._pendingRequest.addPreviewExecutionAction(action); + } + }; + ClientObject.prototype._handleResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleIdResult = function (value) { + this._isNull = Utility.isNullOrUndefined(value); + Utility.fixObjectPathIfNecessary(this, value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleRetrieveResult = function (value, result) { + this._handleIdResult(value); + }; + ClientObject.prototype._recursivelySet = function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { + var isClientObject = input instanceof ClientObject; + var originalInput = input; + if (isClientObject) { + if (Object.getPrototypeOf(this) === Object.getPrototypeOf(input)) { + input = JSON.parse(JSON.stringify(input)); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ + argumentName: 'properties', + errorLocation: this._className + '.set' + }); + } + } + try { + var prop; + for (var i = 0; i < scalarWriteablePropertyNames.length; i++) { + prop = scalarWriteablePropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + this[prop] = input[prop]; + } + } + } + for (var i = 0; i < objectPropertyNames.length; i++) { + prop = objectPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined') { + var dataToPassToSet = isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } + } + } + var throwOnReadOnly = !isClientObject; + if (options && !Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly = options.throwOnReadOnly; + } + for (var i = 0; i < notAllowedToBeSetPropertyNames.length; i++) { + prop = notAllowedToBeSetPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !== 'undefined' && throwOnReadOnly) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + for (prop in input) { + if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); + if (!propertyDescriptor) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.propertyDoesNotExist, prop), + debugInfo: { + errorLocation: prop + } + }); + } + if (throwOnReadOnly && !propertyDescriptor.set) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CommonResourceStrings.attemptingToSetReadOnlyProperty, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + } + catch (innerError) { + throw new _Internal.RuntimeError({ + code: CoreErrorCodes.invalidArgument, + httpStatusCode: 400, + message: CoreUtility._getResourceString(CoreResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className + '.set' + }, + innerError: innerError + }); + } + }; + return ClientObject; + }(ClientObjectBase)); + OfficeExtension_1.ClientObject = ClientObject; + var HostBridgeRequestExecutor = (function () { + function HostBridgeRequestExecutor(session) { + this.m_session = session; + } + HostBridgeRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var httpRequestInfo = { + url: CoreConstants.processQuery, + method: 'POST', + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var controlId = ''; + if (requestMessage.Headers) { + controlId = requestMessage.Headers[Constants.officeControlId]; + } + var message = { + id: HostBridge.nextId(), + type: 1, + flags: requestFlags, + controlId: controlId, + message: httpRequestInfo + }; + CoreUtility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message).then(function (nativeBridgeResponse) { + CoreUtility.log('Received response: ' + JSON.stringify(nativeBridgeResponse)); + var responseInfo = nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode === 200) { + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: null, + ErrorMessage: null, + Headers: responseInfo.headers, + Body: CoreUtility._parseResponseBody(responseInfo) + }; + } + else { + CoreUtility.log('Error Response:' + responseInfo.body); + var error = CoreUtility._parseErrorResponse(responseInfo); + response = { + HttpStatusCode: responseInfo.statusCode, + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession = (function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(m_bridge) { + var _this = _super.call(this) || this; + _this.m_bridge = m_bridge; + _this.m_bridge.addHostMessageHandler(function (message) { + if (message.type === 3) { + var controlId = message.controlId; + if (CoreUtility.isNullOrEmptyString(controlId)) { + GenericEventRegistration.getGenericEventRegistration(controlId)._handleRichApiMessage(message.message); + } + else { + var eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(controlId); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + eventRegistration = GenericEventRegistration.peekGenericEventRegistrationOrNull(''); + if (eventRegistration) { + eventRegistration._handleRichApiMessage(message.message); + } + } + } + }); + return _this; + } + HostBridgeSession.getInstanceIfHostBridgeInited = function () { + if (HostBridge.instance) { + if (CoreUtility.isNullOrUndefined(HostBridgeSession.s_instance) || + HostBridgeSession.s_instance.m_bridge !== HostBridge.instance) { + HostBridgeSession.s_instance = new HostBridgeSession(HostBridge.instance); + } + return HostBridgeSession.s_instance; + } + return null; + }; + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull = function () { + CoreUtility.log('NativeBridgeSession::CreateRequestExecutor'); + return new HostBridgeRequestExecutor(this); + }; + HostBridgeSession.prototype.getEventRegistration = function (controlId) { + return GenericEventRegistration.getGenericEventRegistration(controlId); + }; + HostBridgeSession.prototype.sendMessageToHost = function (message) { + return this.m_bridge.sendMessageToHostAndExpectResponse(message); + }; + return HostBridgeSession; + }(SessionBase)); + OfficeExtension_1.HostBridgeSession = HostBridgeSession; + var ClientRequestContext = (function (_super) { + __extends(ClientRequestContext, _super); + function ClientRequestContext(url) { + var _this = _super.call(this) || this; + _this.m_customRequestHeaders = {}; + _this.m_batchMode = 0; + _this._onRunFinishedNotifiers = []; + if (SessionBase._overrideSession) { + _this.m_requestUrlAndHeaderInfoResolver = SessionBase._overrideSession; + } + else { + if (Utility.isNullOrUndefined(url) || (typeof url === 'string' && url.length === 0)) { + url = ClientRequestContext.defaultRequestUrlAndHeaders; + if (!url) { + url = { url: CoreConstants.localDocument, headers: {} }; + } + } + if (typeof url === 'string') { + _this.m_requestUrlAndHeaderInfo = { url: url, headers: {} }; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfoResolver(url)) { + _this.m_requestUrlAndHeaderInfoResolver = url; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfo(url)) { + var requestInfo = url; + _this.m_requestUrlAndHeaderInfo = { url: requestInfo.url, headers: {} }; + CoreUtility._copyHeaders(requestInfo.headers, _this.m_requestUrlAndHeaderInfo.headers); + } + else { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'url' }); + } + } + if (!_this.m_requestUrlAndHeaderInfoResolver && + _this.m_requestUrlAndHeaderInfo && + CoreUtility._isLocalDocumentUrl(_this.m_requestUrlAndHeaderInfo.url) && + HostBridgeSession.getInstanceIfHostBridgeInited()) { + _this.m_requestUrlAndHeaderInfo = null; + _this.m_requestUrlAndHeaderInfoResolver = HostBridgeSession.getInstanceIfHostBridgeInited(); + } + if (_this.m_requestUrlAndHeaderInfoResolver instanceof SessionBase) { + _this.m_session = _this.m_requestUrlAndHeaderInfoResolver; + } + _this._processingResult = false; + _this._customData = Constants.iterativeExecutor; + _this.sync = _this.sync.bind(_this); + return _this; + } + Object.defineProperty(ClientRequestContext.prototype, "session", { + get: function () { + return this.m_session; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "eventRegistration", { + get: function () { + if (this.m_session) { + return this.m_session.getEventRegistration(this._controlId); + } + return _Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_url", { + get: function () { + if (this.m_requestUrlAndHeaderInfo) { + return this.m_requestUrlAndHeaderInfo.url; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_pendingRequest", { + get: function () { + if (this.m_pendingRequest == null) { + this.m_pendingRequest = new ClientRequest(this); + } + return this.m_pendingRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_controlId", { + get: function () { + var ret = this.m_customRequestHeaders[Constants.officeControlId]; + if (CoreUtility.isNullOrUndefined(ret)) { + ret = ''; + } + return ret; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension_1._internalConfig.showDisposeInfoInDebugInfo); + var statements = prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { + get: function () { + if (!this.m_trackedObjects) { + this.m_trackedObjects = new TrackedObjects(this); + } + return this.m_trackedObjects; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "requestHeaders", { + get: function () { + return this.m_customRequestHeaders; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "batchMode", { + get: function () { + return this.m_batchMode; + }, + enumerable: true, + configurable: true + }); + ClientRequestContext.prototype.ensureInProgressBatchIfBatchMode = function () { + if (this.m_batchMode === 1 && !this.m_explicitBatchInProgress) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.notInsideBatch), null); + } + }; + ClientRequestContext.prototype.load = function (clientObj, option) { + Utility.validateContext(this, clientObj); + var queryOption = ClientRequestContext._parseQueryOption(option); + CommonActionFactory.createQueryAction(this, clientObj, queryOption, clientObj); + }; + ClientRequestContext.prototype.loadRecursive = function (clientObj, options, maxDepth) { + if (!Utility.isPlainJsonObject(options)) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'options' }); + } + var quries = {}; + for (var key in options) { + quries[key] = ClientRequestContext._parseQueryOption(options[key]); + } + var action = ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); + this._pendingRequest.addActionResultHandler(action, clientObj); + }; + ClientRequestContext.prototype.trace = function (message) { + ActionFactory.createTraceAction(this, message, true); + }; + ClientRequestContext.prototype._processOfficeJsErrorResponse = function (officeJsErrorCode, response) { }; + ClientRequestContext.prototype.ensureRequestUrlAndHeaderInfo = function () { + var _this = this; + return Utility._createPromiseFromResult(null).then(function () { + if (!_this.m_requestUrlAndHeaderInfo) { + return _this.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function (value) { + _this.m_requestUrlAndHeaderInfo = value; + if (!_this.m_requestUrlAndHeaderInfo) { + _this.m_requestUrlAndHeaderInfo = { url: CoreConstants.localDocument, headers: {} }; + } + if (Utility.isNullOrEmptyString(_this.m_requestUrlAndHeaderInfo.url)) { + _this.m_requestUrlAndHeaderInfo.url = CoreConstants.localDocument; + } + if (!_this.m_requestUrlAndHeaderInfo.headers) { + _this.m_requestUrlAndHeaderInfo.headers = {}; + } + if (typeof _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull === 'function') { + var executor = _this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull(); + if (executor) { + _this._requestExecutor = executor; + } + } + }); + } + }); + }; + ClientRequestContext.prototype.syncPrivateMain = function () { + var _this = this; + return this.ensureRequestUrlAndHeaderInfo().then(function () { + var req = _this._pendingRequest; + _this.m_pendingRequest = null; + return _this.processPreSyncPromises(req).then(function () { return _this.syncPrivate(req); }); + }); + }; + ClientRequestContext.prototype.syncPrivate = function (req) { + var _this = this; + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(null); + } + if (!req.hasActions) { + return this.processPendingEventHandlers(req); + } + var _a = req.buildRequestMessageBodyAndRequestFlags(), msgBody = _a.body, requestFlags = _a.flags; + if (this._requestFlagModifier) { + requestFlags |= this._requestFlagModifier; + } + if (!this._requestExecutor) { + if (CoreUtility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + this._requestExecutor = new OfficeJsRequestExecutor(this); + } + else { + this._requestExecutor = new HttpRequestExecutor(); + } + } + var requestExecutor = this._requestExecutor; + var headers = {}; + CoreUtility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + CoreUtility._copyHeaders(this.m_customRequestHeaders, headers); + delete this.m_customRequestHeaders[Constants.officeScriptEventId]; + var testNameWithSequenceId = TestUtility._getCurrentTestNameWithSequenceId(); + if (testNameWithSequenceId) { + headers[CoreConstants.testRequestNameHeader] = testNameWithSequenceId; + } + var requestExecutorRequestMessage = { + Url: this.m_requestUrlAndHeaderInfo.url, + Headers: headers, + Body: msgBody + }; + req.invalidatePendingInvalidObjectPaths(); + var errorFromResponse = null; + var errorFromProcessEventHandlers = null; + this._lastSyncStart = typeof performance === 'undefined' ? Date.now() : performance.now(); + this._lastRequestFlags = requestFlags; + return requestExecutor + .executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) + .then(function (response) { + _this._lastSyncEnd = typeof performance === 'undefined' ? Date.now() : performance.now(); + if (OfficeExtension_1.config.executePerfLogFunc) { + OfficeExtension_1.config.executePerfLogFunc({ syncStart: _this._lastSyncStart, + syncEnd: _this._lastSyncEnd + }); + } + errorFromResponse = _this.processRequestExecutorResponseMessage(req, response); + return _this.processPendingEventHandlers(req)["catch"](function (ex) { + CoreUtility.log('Error in processPendingEventHandlers'); + CoreUtility.log(JSON.stringify(ex)); + errorFromProcessEventHandlers = ex; + }); + }) + .then(function () { + if (errorFromResponse) { + CoreUtility.log('Throw error from response: ' + JSON.stringify(errorFromResponse)); + throw errorFromResponse; + } + if (errorFromProcessEventHandlers) { + CoreUtility.log('Throw error from ProcessEventHandler: ' + JSON.stringify(errorFromProcessEventHandlers)); + var transformedError = null; + if (errorFromProcessEventHandlers instanceof _Internal.RuntimeError) { + transformedError = errorFromProcessEventHandlers; + transformedError.traceMessages = req._responseTraceMessages; + } + else { + var message = null; + if (typeof errorFromProcessEventHandlers === 'string') { + message = errorFromProcessEventHandlers; + } + else { + message = errorFromProcessEventHandlers.message; + } + if (Utility.isNullOrEmptyString(message)) { + message = CoreUtility._getResourceString(ResourceStrings.cannotRegisterEvent); + } + transformedError = new _Internal.RuntimeError({ + code: ErrorCodes.cannotRegisterEvent, + httpStatusCode: 400, + message: message, + traceMessages: req._responseTraceMessages + }); + } + throw transformedError; + } + }); + }; + ClientRequestContext.prototype.processRequestExecutorResponseMessage = function (req, response) { + if (response.Body && response.Body.TraceIds) { + req._setResponseTraceIds(response.Body.TraceIds); + } + var traceMessages = req._responseTraceMessages; + var errorStatementInfo = null; + if (response.Body) { + if (response.Body.Error && response.Body.Error.ActionIndex >= 0) { + var prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, true); + var debugInfoStatementInfo = prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + errorStatementInfo = { + statement: debugInfoStatementInfo.statement, + surroundingStatements: debugInfoStatementInfo.surroundingStatements, + fullStatements: ['Please enable config.extendedErrorLogging to see full statements.'] + }; + if (OfficeExtension_1.config.extendedErrorLogging) { + prettyPrinter = new RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions, false, false); + errorStatementInfo.fullStatements = prettyPrinter.process(); + } + } + var actionResults = null; + if (response.Body.Results) { + actionResults = response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults = response.Body.ProcessedResults.Results; + } + if (actionResults) { + this._processingResult = true; + try { + req.processResponse(actionResults); + } + finally { + this._processingResult = false; + } + } + } + if (!Utility.isNullOrEmptyString(response.ErrorCode)) { + return new _Internal.RuntimeError({ + code: response.ErrorCode, + httpStatusCode: response.HttpStatusCode, + message: response.ErrorMessage, + traceMessages: traceMessages, + data: { responseBody: response.RawErrorResponseBody } + }); + } + else if (response.Body && response.Body.Error) { + var debugInfo = { + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement = errorStatementInfo.statement; + debugInfo.surroundingStatements = errorStatementInfo.surroundingStatements; + debugInfo.fullStatements = errorStatementInfo.fullStatements; + } + return new _Internal.RuntimeError({ + code: response.Body.Error.Code, + httpStatusCode: response.Body.Error.HttpStatusCode, + message: response.Body.Error.Message, + traceMessages: traceMessages, + debugInfo: debugInfo + }); + } + return null; + }; + ClientRequestContext.prototype.processPendingEventHandlers = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._pendingProcessEventHandlers.length; i++) { + var eventHandlers = req._pendingProcessEventHandlers[i]; + ret = ret.then(this.createProcessOneEventHandlersFunc(eventHandlers, req)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneEventHandlersFunc = function (eventHandlers, req) { + return function () { return eventHandlers._processRegistration(req); }; + }; + ClientRequestContext.prototype.processPreSyncPromises = function (req) { + var ret = Utility._createPromiseFromResult(null); + for (var i = 0; i < req._preSyncPromises.length; i++) { + var p = req._preSyncPromises[i]; + ret = ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc = function (p) { + return function () { return p; }; + }; + ClientRequestContext.prototype.sync = function (passThroughValue) { + if (TestUtility.isMock()) { + return CoreUtility._createPromiseFromResult(passThroughValue); + } + return this.syncPrivateMain().then(function () { return passThroughValue; }); + }; + ClientRequestContext.prototype.batch = function (batchBody) { + var _this = this; + if (this.m_batchMode !== 1) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, null, null)); + } + if (this.m_explicitBatchInProgress) { + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.pendingBatchInProgress), null)); + } + if (Utility.isNullOrUndefined(batchBody)) { + return Utility._createPromiseFromResult(null); + } + this.m_explicitBatchInProgress = true; + var previousRequest = this.m_pendingRequest; + this.m_pendingRequest = new ClientRequest(this); + var batchBodyResult; + try { + batchBodyResult = batchBody(this._rootObject, this); + } + catch (ex) { + this.m_explicitBatchInProgress = false; + this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + } + var request; + var batchBodyResultPromise; + if (typeof batchBodyResult === 'object' && batchBodyResult && typeof batchBodyResult.then === 'function') { + batchBodyResultPromise = Utility._createPromiseFromResult(null) + .then(function () { + return batchBodyResult; + }) + .then(function (result) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return result; + })["catch"](function (ex) { + _this.m_explicitBatchInProgress = false; + request = _this.m_pendingRequest; + _this.m_pendingRequest = previousRequest; + return CoreUtility._createPromiseFromException(ex); + }); + } + else { + this.m_explicitBatchInProgress = false; + request = this.m_pendingRequest; + this.m_pendingRequest = previousRequest; + batchBodyResultPromise = Utility._createPromiseFromResult(batchBodyResult); + } + return batchBodyResultPromise.then(function (result) { + return _this.ensureRequestUrlAndHeaderInfo() + .then(function () { + return _this.syncPrivate(request); + }) + .then(function () { + return result; + }); + }); + }; + ClientRequestContext._run = function (ctxInitializer, runBody, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runCommon('run', null, ctxInitializer, 0, runBody, numCleanupAttempts, retryDelay, null, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.isValidRequestInfo = function (value) { + return (typeof value === 'string' || + ClientRequestContext.isRequestUrlAndHeaderInfo(value) || + ClientRequestContext.isRequestUrlAndHeaderInfoResolver(value)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfo = function (value) { + return (typeof value === 'object' && + value !== null && + Object.getPrototypeOf(value) === Object.getPrototypeOf({}) && + !Utility.isNullOrUndefined(value.url)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfoResolver = function (value) { + return typeof value === 'object' && value !== null && typeof value._resolveRequestUrlAndHeaderInfo === 'function'; + }; + ClientRequestContext._runBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(0, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runExplicitBatch = function (functionName, receivedRunArgs, ctxInitializer, onBeforeRun, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + return ClientRequestContext._runBatchCommon(1, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext._runBatchCommon = function (batchMode, functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts === void 0) { + numCleanupAttempts = 3; + } + if (retryDelay === void 0) { + retryDelay = 5000; + } + var ctxRetriever; + var batch; + var requestInfo = null; + var previousObjects = null; + var argOffset = 0; + var options = null; + if (receivedRunArgs.length > 0) { + if (ClientRequestContext.isValidRequestInfo(receivedRunArgs[0])) { + requestInfo = receivedRunArgs[0]; + argOffset = 1; + } + else if (Utility.isPlainJsonObject(receivedRunArgs[0])) { + options = receivedRunArgs[0]; + requestInfo = options.session; + if (requestInfo != null && !ClientRequestContext.isValidRequestInfo(requestInfo)) { + return ClientRequestContext.createErrorPromise(functionName); + } + previousObjects = options.previousObjects; + argOffset = 1; + } + } + if (receivedRunArgs.length == argOffset + 1) { + batch = receivedRunArgs[argOffset + 0]; + } + else if (options == null && receivedRunArgs.length == argOffset + 2) { + previousObjects = receivedRunArgs[argOffset + 0]; + batch = receivedRunArgs[argOffset + 1]; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + if (previousObjects != null) { + if (previousObjects instanceof ClientObject) { + ctxRetriever = function () { return previousObjects.context; }; + } + else if (previousObjects instanceof ClientRequestContext) { + ctxRetriever = function () { return previousObjects; }; + } + else if (Array.isArray(previousObjects)) { + var array = previousObjects; + if (array.length == 0) { + return ClientRequestContext.createErrorPromise(functionName); + } + for (var i = 0; i < array.length; i++) { + if (!(array[i] instanceof ClientObject)) { + return ClientRequestContext.createErrorPromise(functionName); + } + if (array[i].context != array[0].context) { + return ClientRequestContext.createErrorPromise(functionName, ResourceStrings.invalidRequestContext); + } + } + ctxRetriever = function () { return array[0].context; }; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + } + else { + ctxRetriever = ctxInitializer; + } + var onBeforeRunWithOptions = null; + if (onBeforeRun) { + onBeforeRunWithOptions = function (context) { return onBeforeRun(options || {}, context); }; + } + return ClientRequestContext._runCommon(functionName, requestInfo, ctxRetriever, batchMode, batch, numCleanupAttempts, retryDelay, onBeforeRunWithOptions, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.createErrorPromise = function (functionName, code) { + if (code === void 0) { + code = CoreResourceStrings.invalidArgument; + } + return CoreUtility._createPromiseFromException(Utility.createRuntimeError(code, CoreUtility._getResourceString(code), functionName)); + }; + ClientRequestContext._runCommon = function (functionName, requestInfo, ctxRetriever, batchMode, runBody, numCleanupAttempts, retryDelay, onBeforeRun, onCleanupSuccess, onCleanupFailure) { + if (SessionBase._overrideSession) { + requestInfo = SessionBase._overrideSession; + } + var starterPromise = CoreUtility.createPromise(function (resolve, reject) { + resolve(); + }); + var ctx; + var succeeded = false; + var resultOrError; + var previousBatchMode; + return starterPromise + .then(function () { + ctx = ctxRetriever(requestInfo); + if (ctx._autoCleanup) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + ctx._onRunFinishedNotifiers.push(function () { + ctx._autoCleanup = true; + resolve(); + }); + }); + } + else { + ctx._autoCleanup = true; + } + }) + .then(function () { + if (typeof runBody !== 'function') { + return ClientRequestContext.createErrorPromise(functionName); + } + previousBatchMode = ctx.m_batchMode; + ctx.m_batchMode = batchMode; + if (onBeforeRun) { + onBeforeRun(ctx); + } + var runBodyResult; + if (batchMode == 1) { + runBodyResult = runBody(ctx.batch.bind(ctx)); + } + else { + runBodyResult = runBody(ctx); + } + if (Utility.isNullOrUndefined(runBodyResult) || typeof runBodyResult.then !== 'function') { + Utility.throwError(ResourceStrings.runMustReturnPromise); + } + return runBodyResult; + }) + .then(function (runBodyResult) { + if (batchMode === 1) { + return runBodyResult; + } + else { + return ctx.sync(runBodyResult); + } + }) + .then(function (result) { + succeeded = true; + resultOrError = result; + })["catch"](function (error) { + resultOrError = error; + }) + .then(function () { + var itemsToRemove = ctx.trackedObjects._retrieveAndClearAutoCleanupList(); + ctx._autoCleanup = false; + ctx.m_batchMode = previousBatchMode; + for (var key in itemsToRemove) { + itemsToRemove[key]._objectPath.isValid = false; + } + var cleanupCounter = 0; + if (Utility._synchronousCleanup || ClientRequestContext.isRequestUrlAndHeaderInfoResolver(requestInfo)) { + return attemptCleanup(); + } + else { + attemptCleanup(); + } + function attemptCleanup() { + cleanupCounter++; + var savedPendingRequest = ctx.m_pendingRequest; + var savedBatchMode = ctx.m_batchMode; + var request = new ClientRequest(ctx); + ctx.m_pendingRequest = request; + ctx.m_batchMode = 0; + try { + for (var key in itemsToRemove) { + ctx.trackedObjects.remove(itemsToRemove[key]); + } + } + finally { + ctx.m_batchMode = savedBatchMode; + ctx.m_pendingRequest = savedPendingRequest; + } + return ctx + .syncPrivate(request) + .then(function () { + if (onCleanupSuccess) { + onCleanupSuccess(cleanupCounter); + } + })["catch"](function () { + if (onCleanupFailure) { + onCleanupFailure(cleanupCounter); + } + if (cleanupCounter < numCleanupAttempts) { + setTimeout(function () { + attemptCleanup(); + }, retryDelay); + } + }); + } + }) + .then(function () { + if (ctx._onRunFinishedNotifiers && ctx._onRunFinishedNotifiers.length > 0) { + var func = ctx._onRunFinishedNotifiers.shift(); + func(); + } + if (succeeded) { + return resultOrError; + } + else { + throw resultOrError; + } + }); + }; + return ClientRequestContext; + }(ClientRequestContextBase)); + OfficeExtension_1.ClientRequestContext = ClientRequestContext; + var RetrieveResultImpl = (function () { + function RetrieveResultImpl(m_proxy, m_shouldPolyfill) { + this.m_proxy = m_proxy; + this.m_shouldPolyfill = m_shouldPolyfill; + var scalarPropertyNames = m_proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = m_proxy[Constants.navigationPropertyNames]; + var typeName = m_proxy[Constants.className]; + var isCollection = m_proxy[Constants.isCollection]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, scalarPropertyNames[i]); + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + Utility.definePropertyThrowUnloadedException(this, typeName, navigationPropertyNames[i]); + } + } + if (isCollection) { + Utility.definePropertyThrowUnloadedException(this, typeName, Constants.itemsLowerCase); + } + } + Object.defineProperty(RetrieveResultImpl.prototype, "$proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResultImpl.prototype, "$isNullObject", { + get: function () { + if (!this.m_isLoaded) { + throw new _Internal.RuntimeError({ + code: ErrorCodes.valueNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: 'retrieveResult.$isNullObject' + } + }); + } + return this.m_isNullObject; + }, + enumerable: true, + configurable: true + }); + RetrieveResultImpl.prototype.toJSON = function () { + if (!this.m_isLoaded) { + return undefined; + } + if (this.m_isNullObject) { + return null; + } + if (Utility.isUndefined(this.m_json)) { + this.m_json = Utility.purifyJson(this.m_value); + } + return this.m_json; + }; + RetrieveResultImpl.prototype.toString = function () { + return JSON.stringify(this.toJSON()); + }; + RetrieveResultImpl.prototype._handleResult = function (value) { + this.m_isLoaded = true; + if (value === null || (typeof value === 'object' && value && value._IsNull)) { + this.m_isNullObject = true; + value = null; + } + else { + this.m_isNullObject = false; + } + if (this.m_shouldPolyfill) { + value = Utility.changePropertyNameToCamelLowerCase(value); + } + this.m_value = value; + this.m_proxy._handleRetrieveResult(value, this); + }; + return RetrieveResultImpl; + }()); + var Constants = (function (_super) { + __extends(Constants, _super); + function Constants() { + return _super !== null && _super.apply(this, arguments) || this; + } + Constants.getItemAt = 'GetItemAt'; + Constants.index = '_Index'; + Constants.iterativeExecutor = 'IterativeExecutor'; + Constants.isTracked = '_IsTracked'; + Constants.eventMessageCategory = 65536; + Constants.eventWorkbookId = 'Workbook'; + Constants.eventSourceRemote = 'Remote'; + Constants.proxy = '$proxy'; + Constants.className = '_className'; + Constants.isCollection = '_isCollection'; + Constants.collectionPropertyPath = '_collectionPropertyPath'; + Constants.objectPathInfoDoNotKeepReferenceFieldName = 'D'; + Constants.officeScriptEventId = 'X-OfficeScriptEventId'; + Constants.officeScriptFireRecordingEvent = 'X-OfficeScriptFireRecordingEvent'; + Constants.officeControlId = 'X-OfficeControlId'; + return Constants; + }(CommonConstants)); + OfficeExtension_1.Constants = Constants; + var ClientRequest = (function (_super) { + __extends(ClientRequest, _super); + function ClientRequest(context) { + var _this = _super.call(this, context) || this; + _this.m_context = context; + _this.m_pendingProcessEventHandlers = []; + _this.m_pendingEventHandlerActions = {}; + _this.m_traceInfos = {}; + _this.m_responseTraceIds = {}; + _this.m_responseTraceMessages = []; + return _this; + } + Object.defineProperty(ClientRequest.prototype, "traceInfos", { + get: function () { + return this.m_traceInfos; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceMessages", { + get: function () { + return this.m_responseTraceMessages; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceIds", { + get: function () { + return this.m_responseTraceIds; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._setResponseTraceIds = function (value) { + if (value) { + for (var i = 0; i < value.length; i++) { + var traceId = value[i]; + this.m_responseTraceIds[traceId] = traceId; + var message = this.m_traceInfos[traceId]; + if (!CoreUtility.isNullOrUndefined(message)) { + this.m_responseTraceMessages.push(message); + } + } + } + }; + ClientRequest.prototype.addTrace = function (actionId, message) { + this.m_traceInfos[actionId] = message; + }; + ClientRequest.prototype._addPendingEventHandlerAction = function (eventHandlers, action) { + if (!this.m_pendingEventHandlerActions[eventHandlers._id]) { + this.m_pendingEventHandlerActions[eventHandlers._id] = []; + this.m_pendingProcessEventHandlers.push(eventHandlers); + } + this.m_pendingEventHandlerActions[eventHandlers._id].push(action); + }; + Object.defineProperty(ClientRequest.prototype, "_pendingProcessEventHandlers", { + get: function () { + return this.m_pendingProcessEventHandlers; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._getPendingEventHandlerActions = function (eventHandlers) { + return this.m_pendingEventHandlerActions[eventHandlers._id]; + }; + return ClientRequest; + }(ClientRequestBase)); + OfficeExtension_1.ClientRequest = ClientRequest; + var EventHandlers = (function () { + function EventHandlers(context, parentObject, name, eventInfo) { + var _this = this; + this.m_id = context._nextId(); + this.m_context = context; + this.m_name = name; + this.m_handlers = []; + this.m_registered = false; + this.m_eventInfo = eventInfo; + this.m_callback = function (args) { + _this.m_eventInfo.eventArgsTransformFunc(args).then(function (newArgs) { return _this.fireEvent(newArgs); }); + }; + } + Object.defineProperty(EventHandlers.prototype, "_registered", { + get: function () { + return this.m_registered; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_id", { + get: function () { + return this.m_id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_handlers", { + get: function () { + return this.m_handlers; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); + EventHandlers.prototype.add = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 0 + }); + return new EventHandlerResult(this.m_context, this, handler); + }; + EventHandlers.prototype.remove = function (handler) { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: handler, + operation: 1 + }); + }; + EventHandlers.prototype.removeAll = function () { + var action = ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { + id: action.actionInfo.Id, + handler: null, + operation: 2 + }); + }; + EventHandlers.prototype._processRegistration = function (req) { + var _this = this; + var ret = CoreUtility._createPromiseFromResult(null); + var actions = req._getPendingEventHandlerActions(this); + if (!actions) { + return ret; + } + var handlersResult = []; + for (var i = 0; i < this.m_handlers.length; i++) { + handlersResult.push(this.m_handlers[i]); + } + var hasChange = false; + for (var i = 0; i < actions.length; i++) { + if (req._responseTraceIds[actions[i].id]) { + hasChange = true; + switch (actions[i].operation) { + case 0: + handlersResult.push(actions[i].handler); + break; + case 1: + for (var index = handlersResult.length - 1; index >= 0; index--) { + if (handlersResult[index] === actions[i].handler) { + handlersResult.splice(index, 1); + break; + } + } + break; + case 2: + handlersResult = []; + break; + } + } + } + if (hasChange) { + if (!this.m_registered && handlersResult.length > 0) { + ret = ret.then(function () { return _this.m_eventInfo.registerFunc(_this.m_callback); }).then(function () { return (_this.m_registered = true); }); + } + else if (this.m_registered && handlersResult.length == 0) { + ret = ret + .then(function () { return _this.m_eventInfo.unregisterFunc(_this.m_callback); })["catch"](function (ex) { + CoreUtility.log('Error when unregister event: ' + JSON.stringify(ex)); + }) + .then(function () { return (_this.m_registered = false); }); + } + ret = ret.then(function () { return (_this.m_handlers = handlersResult); }); + } + return ret; + }; + EventHandlers.prototype.fireEvent = function (args) { + var promises = []; + for (var i = 0; i < this.m_handlers.length; i++) { + var handler = this.m_handlers[i]; + var p = CoreUtility._createPromiseFromResult(null) + .then(this.createFireOneEventHandlerFunc(handler, args))["catch"](function (ex) { + CoreUtility.log('Error when invoke handler: ' + JSON.stringify(ex)); + }); + promises.push(p); + } + CoreUtility.Promise.all(promises); + }; + EventHandlers.prototype.createFireOneEventHandlerFunc = function (handler, args) { + return function () { return handler(args); }; + }; + return EventHandlers; + }()); + OfficeExtension_1.EventHandlers = EventHandlers; + var EventHandlerResult = (function () { + function EventHandlerResult(context, handlers, handler) { + this.m_context = context; + this.m_allHandlers = handlers; + this.m_handler = handler; + } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + EventHandlerResult.prototype.remove = function () { + if (this.m_allHandlers && this.m_handler) { + this.m_allHandlers.remove(this.m_handler); + this.m_allHandlers = null; + this.m_handler = null; + } + }; + return EventHandlerResult; + }()); + OfficeExtension_1.EventHandlerResult = EventHandlerResult; + (function (_Internal) { + var OfficeJsEventRegistration = (function () { + function OfficeJsEventRegistration() { + } + OfficeJsEventRegistration.prototype.register = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingDataChanged, handler, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.addHandlerAsync(Office.EventType.BindingSelectionChanged, handler, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); + }); + case 5: + return OSF.DDA.RichApi.richApiMessageManager.register(handler); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { id: targetId }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { id: targetId }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { id: targetId }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + OfficeJsEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingDataChanged, { handler: handler }, callback); + }); + }); + case 3: + return Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }).then(function (officeBinding) { + return Utility.promisify(function (callback) { + return officeBinding.removeHandlerAsync(Office.EventType.BindingSelectionChanged, { handler: handler }, callback); + }); + }); + case 2: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); + }); + case 1: + return Utility.promisify(function (callback) { + return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); + }); + case 5: + return Utility.promisify(function (callback) { + return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync('richApiMessage', { handler: handler }, callback); + }); + case 13: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); + }); + case 14: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { id: targetId, handler: handler }, callback); + }); + case 15: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { id: targetId, handler: handler }, callback); + }); + case 16: + return Utility.promisify(function (callback) { + return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { id: targetId, handler: handler }, callback); + }); + default: + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'eventId' }); + } + }; + return OfficeJsEventRegistration; + }()); + _Internal.officeJsEventRegistration = new OfficeJsEventRegistration(); + })(_Internal = OfficeExtension_1._Internal || (OfficeExtension_1._Internal = {})); + var EventRegistration = (function () { + function EventRegistration(registerEventImpl, unregisterEventImpl) { + this.m_handlersByEventByTarget = {}; + this.m_registerEventImpl = registerEventImpl; + this.m_unregisterEventImpl = unregisterEventImpl; + } + EventRegistration.getTargetIdOrDefault = function (targetId) { + if (Utility.isNullOrUndefined(targetId)) { + return ''; + } + return targetId; + }; + EventRegistration.prototype.getHandlers = function (eventId, targetId) { + targetId = EventRegistration.getTargetIdOrDefault(targetId); + var handlersById = this.m_handlersByEventByTarget[eventId]; + if (!handlersById) { + handlersById = {}; + this.m_handlersByEventByTarget[eventId] = handlersById; + } + var handlers = handlersById[targetId]; + if (!handlers) { + handlers = []; + handlersById[targetId] = handlers; + } + return handlers; + }; + EventRegistration.prototype.callHandlers = function (eventId, targetId, argument) { + var funcs = this.getHandlers(eventId, targetId); + for (var i = 0; i < funcs.length; i++) { + funcs[i](argument); + } + }; + EventRegistration.prototype.hasHandlers = function (eventId, targetId) { + return this.getHandlers(eventId, targetId).length > 0; + }; + EventRegistration.prototype.register = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + handlers.push(handler); + if (handlers.length === 1) { + return this.m_registerEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + EventRegistration.prototype.unregister = function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError({ argumentName: 'handler' }); + } + var handlers = this.getHandlers(eventId, targetId); + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length === 0) { + return this.m_unregisterEventImpl(eventId, targetId); + } + return Utility._createPromiseFromResult(null); + }; + return EventRegistration; + }()); + OfficeExtension_1.EventRegistration = EventRegistration; + var GenericEventRegistration = (function () { + function GenericEventRegistration() { + this.m_eventRegistration = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler = this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready = function () { + var _this = this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready = GenericEventRegistration._testReadyImpl().then(function () { + _this.m_isReady = true; + }); + } + else if (HostBridge.instance) { + this.m_ready = Utility._createPromiseFromResult(null).then(function () { + _this.m_isReady = true; + }); + } + else { + this.m_ready = _Internal.officeJsEventRegistration + .register(5, '', this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady = true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister = function (eventId, targetId, handler) { + var _this = this; + return this.ready().then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl = function (eventId, targetId) { + return Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage = function (msg) { + if (msg && msg.entries) { + for (var entryIndex = 0; entryIndex < msg.entries.length; entryIndex++) { + var entry = msg.entries[entryIndex]; + if (entry.messageCategory == Constants.eventMessageCategory) { + if (CoreUtility._logEnabled) { + CoreUtility.log(JSON.stringify(entry)); + } + var eventId = entry.messageType; + var targetId = entry.targetId; + var hasHandlers = this.m_eventRegistration.hasHandlers(eventId, targetId); + if (hasHandlers) { + var arg = JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source = Constants.eventSourceRemote; + } + this.m_eventRegistration.callHandlers(eventId, targetId, arg); + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + if (!ret) { + ret = new GenericEventRegistration(); + GenericEventRegistration.s_genericEventRegistrations[controlId] = ret; + } + return ret; + }; + GenericEventRegistration.peekGenericEventRegistrationOrNull = function (controlId) { + if (CoreUtility.isNullOrUndefined(controlId)) { + controlId = ''; + } + var ret = GenericEventRegistration.s_genericEventRegistrations[controlId]; + return ret; + }; + GenericEventRegistration.richApiMessageEventCategory = 65536; + GenericEventRegistration.s_genericEventRegistrations = {}; + return GenericEventRegistration; + }()); + OfficeExtension_1.GenericEventRegistration = GenericEventRegistration; + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl = impl; + } + OfficeExtension_1._testSetRichApiMessageReadyImpl = _testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration('')._handleRichApiMessage(msg); + } + OfficeExtension_1._testTriggerRichApiMessageEvent = _testTriggerRichApiMessageEvent; + var GenericEventHandlers = (function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + var _this = _super.call(this, context, parentObject, name, eventInfo) || this; + _this.m_genericEventInfo = eventInfo; + return _this; + } + GenericEventHandlers.prototype.add = function (handler) { + var _this = this; + if (this._handlers.length == 0 && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + var controlId = this._context._controlId; + if (!GenericEventRegistration.getGenericEventRegistration(controlId).isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration(controlId).ready()); + } + ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length == 1) { + GenericEventRegistration.getGenericEventRegistration(controlId).register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove = function (handler) { + var _this = this; + if (this._handlers.length == 1 && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + var controlId = this._context._controlId; + ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers = _this._handlers; + for (var index = handlers.length - 1; index >= 0; index--) { + if (handlers[index] === handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length == 0) { + GenericEventRegistration.getGenericEventRegistration(controlId).unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll = function () { }; + return GenericEventHandlers; + }(EventHandlers)); + OfficeExtension_1.GenericEventHandlers = GenericEventHandlers; + var InstantiateActionResultHandler = (function () { + function InstantiateActionResultHandler(clientObject) { + this.m_clientObject = clientObject; + } + InstantiateActionResultHandler.prototype._handleResult = function (value) { + this.m_clientObject._handleIdResult(value); + }; + return InstantiateActionResultHandler; + }()); + var ObjectPathFactory = (function () { + function ObjectPathFactory() { + } + ObjectPathFactory.createGlobalObjectObjectPath = function (context) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 1, + Name: '' + }; + return new ObjectPath(objectPathInfo, null, false, false, 1, 4); + }; + ObjectPathFactory.createNewObjectObjectPath = function (context, typeName, isCollection, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 2, + Name: typeName + }; + var ret = new ObjectPath(objectPathInfo, null, isCollection, false, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createPropertyObjectPath = function (context, parent, propertyName, isCollection, isInvalidAfterRequest, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id + }; + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, 1, Utility._fixupApiFlags(flags)); + return ret; + }; + ObjectPathFactory.createIndexerObjectPath = function (context, parent, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createIndexerObjectPathUsingParentPath = function (context, parentObjectPath, args) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parentObjectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = args; + return new ObjectPath(objectPathInfo, parentObjectPath, false, false, 1, 4); + }; + ObjectPathFactory.createMethodObjectPath = function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths = Utility.setMethodArguments(context, objectPathInfo.ArgumentInfo, args); + var ret = new ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest, operationType, Utility._fixupApiFlags(flags)); + ret.argumentObjectPaths = argumentObjectPaths; + ret.getByIdMethodName = getByIdMethodName; + return ret; + }; + ObjectPathFactory.createReferenceIdObjectPath = function (context, referenceId) { + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + var ret = new ObjectPath(objectPathInfo, null, false, false, 1, 4); + return ret; + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt = function (hasIndexerMethod, context, parent, childItem, index) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + if (hasIndexerMethod && !Utility.isNullOrUndefined(id)) { + return ObjectPathFactory.createChildItemObjectPathUsingIndexer(context, parent, childItem); + } + else { + return ObjectPathFactory.createChildItemObjectPathUsingGetItemAt(context, parent, childItem, index); + } + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexer = function (context, parent, childItem) { + var id = Utility.tryGetObjectIdFromLoadOrRetrieveResult(childItem); + var objectPathInfo = (objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 5, + Name: '', + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }); + objectPathInfo.ArgumentInfo.Arguments = [id]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + ObjectPathFactory.createChildItemObjectPathUsingGetItemAt = function (context, parent, childItem, index) { + var indexFromServer = childItem[Constants.index]; + if (indexFromServer) { + index = indexFromServer; + } + var objectPathInfo = { + Id: context._nextId(), + ObjectPathType: 3, + Name: Constants.getItemAt, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments = [index]; + return new ObjectPath(objectPathInfo, parent._objectPath, false, false, 1, 4); + }; + return ObjectPathFactory; + }()); + OfficeExtension_1.ObjectPathFactory = ObjectPathFactory; + var OfficeJsRequestExecutor = (function () { + function OfficeJsRequestExecutor(context) { + this.m_context = context; + } + OfficeJsRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); + return new OfficeExtension_1.Promise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (result.status == 'succeeded') { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBody(result), RichApiMessageUtility.getResponseHeaders(result)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); + } + resolve(response); + }); + }); + }; + OfficeJsRequestExecutor.SourceLibHeaderValue = 'officejs'; + return OfficeJsRequestExecutor; + }()); + var TrackedObjects = (function () { + function TrackedObjects(context) { + this._autoCleanupList = {}; + this.m_context = context; + } + TrackedObjects.prototype.add = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._addCommon(item, true); }); + } + else { + this._addCommon(param, true); + } + }; + TrackedObjects.prototype._autoAdd = function (object) { + this._addCommon(object, false); + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + }; + TrackedObjects.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue = function (object, resultValue) { + var shouldAutoTrack = this.m_context._autoCleanup && + !object[Constants.isTracked] && + object !== this.m_context._rootObject && + resultValue && + !Utility.isNullOrEmptyString(resultValue[Constants.referenceId]); + if (shouldAutoTrack) { + this._autoCleanupList[object._objectPath.objectPathInfo.Id] = object; + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype._addCommon = function (object, isExplicitlyAdded) { + if (object[Constants.isTracked]) { + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + return; + } + var referenceId = object[Constants.referenceId]; + var donotKeepReference = object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName]; + if (donotKeepReference) { + throw Utility.createRuntimeError(CoreErrorCodes.generalException, CoreUtility._getResourceString(ResourceStrings.objectIsUntracked), null); + } + if (Utility.isNullOrEmptyString(referenceId) && object._KeepReference) { + object._KeepReference(); + ActionFactory.createInstantiateAction(this.m_context, object); + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + object[Constants.isTracked] = true; + } + }; + TrackedObjects.prototype.remove = function (param) { + var _this = this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._removeCommon(item); }); + } + else { + this._removeCommon(param); + } + }; + TrackedObjects.prototype._removeCommon = function (object) { + object._objectPath.objectPathInfo[Constants.objectPathInfoDoNotKeepReferenceFieldName] = true; + object.context._pendingRequest._removeKeepReferenceAction(object._objectPath.objectPathInfo.Id); + var referenceId = object[Constants.referenceId]; + if (!Utility.isNullOrEmptyString(referenceId)) { + var rootObject = this.m_context._rootObject; + if (rootObject._RemoveReference) { + rootObject._RemoveReference(referenceId); + } + } + delete object[Constants.isTracked]; + }; + TrackedObjects.prototype._retrieveAndClearAutoCleanupList = function () { + var list = this._autoCleanupList; + this._autoCleanupList = {}; + return list; + }; + return TrackedObjects; + }()); + OfficeExtension_1.TrackedObjects = TrackedObjects; + var RequestPrettyPrinter = (function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose, removePII) { + if (!globalObjName) { + globalObjName = 'root'; + } + this.m_globalObjName = globalObjName; + this.m_referencedObjectPaths = referencedObjectPaths; + this.m_actions = actions; + this.m_statements = []; + this.m_variableNameForObjectPathMap = {}; + this.m_variableNameToObjectPathMap = {}; + this.m_declaredObjectPathMap = {}; + this.m_showDispose = showDispose; + this.m_removePII = removePII; + } + RequestPrettyPrinter.prototype.process = function () { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo = function (actionIndex) { + if (this.m_showDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount = 5; + this.m_statements = []; + var oneStatement = ''; + var statementIndex = -1; + for (var i = 0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex == i) { + statementIndex = this.m_statements.length - 1; + } + if (statementIndex >= 0 && this.m_statements.length > statementIndex + surroundingCount + 1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex = statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex = 0; + } + var endIndex = statementIndex + 1 + surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex = this.m_statements.length; + } + var surroundingStatements = []; + if (startIndex != 0) { + surroundingStatements.push('...'); + } + for (var i_1 = startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push('// >>>>>'); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push('// <<<<<'); + for (var i_2 = statementIndex + 1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push('...'); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction = function (action) { + var actionInfo = action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + case 9: + this.processUpdateAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction = function (action) { + var objId = action.actionInfo.ObjectPathId; + var objPath = this.m_referencedObjectPaths[objId]; + var varName = this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement = 'var ' + varName + ' = ' + this.buildObjectPathExpressionWithParent(objPath) + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId] = varName; + } + else { + var statement = '// Instantiate {' + varName + '}'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction = function (action) { + var methodName = action.actionInfo.Name; + if (methodName === '_KeepReference') { + if (!OfficeExtension_1._internalConfig.showInternalApiInDebugInfo) { + return; + } + methodName = 'track'; + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(methodName) + + '(' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.load(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction = function (action) { + var queryExp = this.buildQueryExpression(action); + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.retrieve(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction = function (action) { + var queryExp = ''; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp = JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + '.loadRecursive(' + queryExp + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.' + + Utility._toCamelLowerCase(action.actionInfo.Name) + + ' = ' + + this.buildArgumentsExpression(action.actionInfo.ArgumentInfo) + + ';'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction = function (action) { + var statement = 'context.trace();'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.ensureUnchanged(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processUpdateAction = function (action) { + var statement = this.getObjVarName(action.actionInfo.ObjectPathId) + + '.update(' + + JSON.stringify(action.actionInfo.ObjectState) + + ');'; + statement = this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant = function (statement, action) { + var _this = this; + if (this.m_showDispose) { + var lastUsedObjectPathIds = action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose = lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(', '); + return statement + ' // And then dispose {' + objectNamesToDispose + '}'; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression = function (action) { + if (action.actionInfo.QueryInfo) { + var option = {}; + option.select = action.actionInfo.QueryInfo.Select; + option.expand = action.actionInfo.QueryInfo.Expand; + option.skip = action.actionInfo.QueryInfo.Skip; + option.top = action.actionInfo.QueryInfo.Top; + if (typeof option.top === 'undefined' && + typeof option.skip === 'undefined' && + typeof option.expand === 'undefined') { + if (typeof option.select === 'undefined') { + return ''; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ''; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent = function (objPath) { + var hasParent = objPath.objectPathInfo.ObjectPathType == 5 || + objPath.objectPathInfo.ObjectPathType == 3 || + objPath.objectPathInfo.ObjectPathType == 4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return (this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId) + '.' + this.buildObjectPathExpression(objPath)); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression = function (objPath) { + var expr = this.buildObjectPathInfoExpression(objPath.objectPathInfo); + var originalObjectPathInfo = objPath.originalObjectPathInfo; + if (originalObjectPathInfo) { + expr = expr + ' /* originally ' + this.buildObjectPathInfoExpression(originalObjectPathInfo) + ' */'; + } + return expr; + }; + RequestPrettyPrinter.prototype.buildObjectPathInfoExpression = function (objectPathInfo) { + switch (objectPathInfo.ObjectPathType) { + case 1: + return 'context.' + this.m_globalObjName; + case 5: + return 'getItem(' + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + ')'; + case 3: + return (Utility._toCamelLowerCase(objectPathInfo.Name) + + '(' + + this.buildArgumentsExpression(objectPathInfo.ArgumentInfo) + + ')'); + case 2: + return objectPathInfo.Name + '.newObject()'; + case 7: + return 'null'; + case 4: + return Utility._toCamelLowerCase(objectPathInfo.Name); + case 6: + return ('context.' + this.m_globalObjName + '._getObjectByReferenceId(' + JSON.stringify(objectPathInfo.Name) + ')'); + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression = function (args) { + var ret = ''; + if (!args.Arguments || args.Arguments.length === 0) { + return ret; + } + if (this.m_removePII) { + if (typeof args.Arguments[0] === 'undefined') { + return ret; + } + return '...'; + } + for (var i = 0; i < args.Arguments.length; i++) { + if (i > 0) { + ret = ret + ', '; + } + ret = + ret + + this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret === 'undefined') { + ret = ''; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral = function (value, objectPathId) { + if (typeof value == 'number' && value === objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase = function (objectPathId) { + var ret = 'v'; + var objPath = this.m_referencedObjectPaths[objectPathId]; + if (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret = this.m_globalObjName; + break; + case 4: + ret = Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName = objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3) === 'Get') { + methodName = methodName.substr(3); + } + ret = Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName = this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1) === 's') { + ret = parentName.substr(0, parentName.length - 1); + } + else { + ret = parentName + 'Item'; + } + break; + } + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName = function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret = this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + } + var i = 1; + while (this.m_variableNameToObjectPathMap[ret + i.toString()]) { + i++; + } + ret = ret + i.toString(); + this.m_variableNameForObjectPathMap[objectPathId] = ret; + this.m_variableNameToObjectPathMap[ret] = objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + var ResourceStrings = (function (_super) { + __extends(ResourceStrings, _super); + function ResourceStrings() { + return _super !== null && _super.apply(this, arguments) || this; + } + ResourceStrings.cannotRegisterEvent = 'CannotRegisterEvent'; + ResourceStrings.connectionFailureWithStatus = 'ConnectionFailureWithStatus'; + ResourceStrings.connectionFailureWithDetails = 'ConnectionFailureWithDetails'; + ResourceStrings.propertyNotLoaded = 'PropertyNotLoaded'; + ResourceStrings.runMustReturnPromise = 'RunMustReturnPromise'; + ResourceStrings.moreInfoInnerError = 'MoreInfoInnerError'; + ResourceStrings.cannotApplyPropertyThroughSetMethod = 'CannotApplyPropertyThroughSetMethod'; + ResourceStrings.invalidOperationInCellEditMode = 'InvalidOperationInCellEditMode'; + ResourceStrings.objectIsUntracked = 'ObjectIsUntracked'; + ResourceStrings.customFunctionDefintionMissing = 'CustomFunctionDefintionMissing'; + ResourceStrings.customFunctionImplementationMissing = 'CustomFunctionImplementationMissing'; + ResourceStrings.customFunctionNameContainsBadChars = 'CustomFunctionNameContainsBadChars'; + ResourceStrings.customFunctionNameCannotSplit = 'CustomFunctionNameCannotSplit'; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch = 'CustomFunctionUnexpectedNumberOfEntriesInResultBatch'; + ResourceStrings.customFunctionCancellationHandlerMissing = 'CustomFunctionCancellationHandlerMissing'; + ResourceStrings.customFunctionInvalidFunction = 'CustomFunctionInvalidFunction'; + ResourceStrings.customFunctionInvalidFunctionMapping = 'CustomFunctionInvalidFunctionMapping'; + ResourceStrings.customFunctionWindowMissing = 'CustomFunctionWindowMissing'; + ResourceStrings.customFunctionDefintionMissingOnWindow = 'CustomFunctionDefintionMissingOnWindow'; + ResourceStrings.pendingBatchInProgress = 'PendingBatchInProgress'; + ResourceStrings.notInsideBatch = 'NotInsideBatch'; + ResourceStrings.cannotUpdateReadOnlyProperty = 'CannotUpdateReadOnlyProperty'; + return ResourceStrings; + }(CommonResourceStrings)); + OfficeExtension_1.ResourceStrings = ResourceStrings; + CoreUtility.addResourceStringValues({ + CannotRegisterEvent: 'The event handler cannot be registered.', + PropertyNotLoaded: "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.", + RunMustReturnPromise: 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".', + InvalidOrTimedOutSessionMessage: 'Your Office Online session has expired or is invalid. To continue, refresh the page.', + InvalidOperationInCellEditMode: 'Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.', + InvalidSheetName: 'The request cannot be processed because the specified worksheet cannot be found. Please try again.', + CustomFunctionDefintionMissing: "A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.", + CustomFunctionDefintionMissingOnWindow: "A property with the name '{0}' that represents the function's definition must exist on the window object.", + CustomFunctionImplementationMissing: "The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.", + CustomFunctionNameContainsBadChars: 'The function name may only contain letters, digits, underscores, and periods.', + CustomFunctionNameCannotSplit: 'The function name must contain a non-empty namespace and a non-empty short name.', + CustomFunctionUnexpectedNumberOfEntriesInResultBatch: "The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.", + CustomFunctionCancellationHandlerMissing: 'The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.', + CustomFunctionInvalidFunction: "The property with the name '{0}' that represents the function's definition is not a valid function.", + CustomFunctionInvalidFunctionMapping: "The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.", + CustomFunctionWindowMissing: 'The window object was not found.', + PendingBatchInProgress: 'There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.', + NotInsideBatch: 'Operations may not be invoked outside of a batch method.', + CannotUpdateReadOnlyProperty: "The property '{0}' is read-only and it cannot be updated.", + ObjectIsUntracked: 'The object is untracked.' + }); + var Utility = (function (_super) { + __extends(Utility, _super); + function Utility() { + return _super !== null && _super.apply(this, arguments) || this; + } + Utility.fixObjectPathIfNecessary = function (clientObject, value) { + if (clientObject && clientObject._objectPath && value) { + clientObject._objectPath.updateUsingObjectData(value, clientObject); + } + }; + Utility.load = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync = function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve = function (clientObj, option) { + var shouldPolyfill = OfficeExtension_1._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + shouldPolyfill = !Utility.isSetSupported('RichApiRuntime', '1.1'); + } + var result = new RetrieveResultImpl(clientObj, shouldPolyfill); + clientObj._retrieve(option, result); + return result; + }; + Utility.retrieveAndSync = function (clientObj, option) { + var result = Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); + }; + Utility.toJson = function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result = {}; + for (var prop in scalarProperties) { + var value = scalarProperties[prop]; + if (typeof value !== 'undefined') { + result[prop] = value; + } + } + for (var prop in navigationProperties) { + var value = navigationProperties[prop]; + if (typeof value !== 'undefined') { + if (value[Utility.fieldName_isCollection] && typeof value[Utility.fieldName_m__items] !== 'undefined') { + result[prop] = value.toJSON()['items']; + } + else { + result[prop] = value.toJSON(); + } + } + } + if (collectionItemsIfAny) { + result['items'] = collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; + }; + Utility.throwError = function (resourceId, arg, errorLocation) { + throw new _Internal.RuntimeError({ + code: resourceId, + httpStatusCode: 400, + message: CoreUtility._getResourceString(resourceId, arg), + debugInfo: errorLocation ? { errorLocation: errorLocation } : undefined + }); + }; + Utility.createRuntimeError = function (code, message, location, httpStatusCode, data) { + return new _Internal.RuntimeError({ + code: code, + httpStatusCode: httpStatusCode, + message: message, + debugInfo: { errorLocation: location }, + data: data + }); + }; + Utility.throwIfNotLoaded = function (propertyName, fieldValue, entityName, isNull) { + if (!isNull && + CoreUtility.isUndefined(fieldValue) && + propertyName.charCodeAt(0) != Utility.s_underscoreCharCode && + !Utility.s_suppressPropertyNotLoadedException) { + throw Utility.createPropertyNotLoadedException(entityName, propertyName); + } + }; + Utility._getPropertyValueWithoutCheckLoaded = function (object, propertyName) { + Utility.s_suppressPropertyNotLoadedException = true; + try { + return object[propertyName]; + } + finally { + Utility.s_suppressPropertyNotLoadedException = false; + } + }; + Utility.createPropertyNotLoadedException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.propertyNotLoaded, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.propertyNotLoaded, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.createCannotUpdateReadOnlyPropertyException = function (entityName, propertyName) { + return new _Internal.RuntimeError({ + code: ErrorCodes.cannotUpdateReadOnlyProperty, + httpStatusCode: 400, + message: CoreUtility._getResourceString(ResourceStrings.cannotUpdateReadOnlyProperty, propertyName), + debugInfo: entityName ? { errorLocation: entityName + '.' + propertyName } : undefined + }); + }; + Utility.promisify = function (action) { + return new OfficeExtension_1.Promise(function (resolve, reject) { + var callback = function (result) { + if (result.status == 'failed') { + reject(result.error); + } + else { + resolve(result.value); + } + }; + action(callback); + }); + }; + Utility._addActionResultHandler = function (clientObj, action, resultHandler) { + clientObj.context._pendingRequest.addActionResultHandler(action, resultHandler); + }; + Utility._handleNavigationPropertyResults = function (clientObj, objectValue, propertyNames) { + for (var i = 0; i < propertyNames.length - 1; i += 2) { + if (!CoreUtility.isUndefined(objectValue[propertyNames[i + 1]])) { + clientObj[propertyNames[i]]._handleResult(objectValue[propertyNames[i + 1]]); + } + } + }; + Utility._fixupApiFlags = function (flags) { + if (typeof flags === 'boolean') { + if (flags) { + flags = 1; + } + else { + flags = 0; + } + } + return flags; + }; + Utility.definePropertyThrowUnloadedException = function (obj, typeName, propertyName) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + throw Utility.createPropertyNotLoadedException(typeName, propertyName); + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(typeName, propertyName); + } + }); + }; + Utility.defineReadOnlyPropertyWithValue = function (obj, propertyName, value) { + Object.defineProperty(obj, propertyName, { + configurable: true, + enumerable: true, + get: function () { + return value; + }, + set: function () { + throw Utility.createCannotUpdateReadOnlyPropertyException(null, propertyName); + } + }); + }; + Utility.processRetrieveResult = function (proxy, value, result, childItemCreateFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + return; + } + if (childItemCreateFunc) { + var data = value[Constants.itemsLowerCase]; + if (Array.isArray(data)) { + var itemsResult = []; + for (var i = 0; i < data.length; i++) { + var itemProxy = childItemCreateFunc(data[i], i); + var itemResult = {}; + itemResult[Constants.proxy] = itemProxy; + itemProxy._handleRetrieveResult(data[i], itemResult); + itemsResult.push(itemResult); + } + Utility.defineReadOnlyPropertyWithValue(result, Constants.itemsLowerCase, itemsResult); + } + } + else { + var scalarPropertyNames = proxy[Constants.scalarPropertyNames]; + var navigationPropertyNames = proxy[Constants.navigationPropertyNames]; + var typeName = proxy[Constants.className]; + if (scalarPropertyNames) { + for (var i = 0; i < scalarPropertyNames.length; i++) { + var propName = scalarPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + Utility.defineReadOnlyPropertyWithValue(result, propName, propValue); + } + } + } + if (navigationPropertyNames) { + for (var i = 0; i < navigationPropertyNames.length; i++) { + var propName = navigationPropertyNames[i]; + var propValue = value[propName]; + if (CoreUtility.isUndefined(propValue)) { + Utility.definePropertyThrowUnloadedException(result, typeName, propName); + } + else { + var propProxy = proxy[propName]; + var propResult = {}; + propProxy._handleRetrieveResult(propValue, propResult); + propResult[Constants.proxy] = propProxy; + if (Array.isArray(propResult[Constants.itemsLowerCase])) { + propResult = propResult[Constants.itemsLowerCase]; + } + Utility.defineReadOnlyPropertyWithValue(result, propName, propResult); + } + } + } + } + }; + Utility.setMockData = function (clientObj, value, childItemCreateFunc, setItemsFunc) { + if (CoreUtility.isNullOrUndefined(value)) { + clientObj._handleResult(value); + return; + } + if (clientObj[Constants.scalarPropertyOriginalNames]) { + var result = {}; + var scalarPropertyOriginalNames = clientObj[Constants.scalarPropertyOriginalNames]; + var scalarPropertyNames = clientObj[Constants.scalarPropertyNames]; + for (var i = 0; i < scalarPropertyNames.length; i++) { + if (typeof (value[scalarPropertyNames[i]]) !== 'undefined') { + result[scalarPropertyOriginalNames[i]] = value[scalarPropertyNames[i]]; + } + } + clientObj._handleResult(result); + } + if (clientObj[Constants.navigationPropertyNames]) { + var navigationPropertyNames = clientObj[Constants.navigationPropertyNames]; + for (var i = 0; i < navigationPropertyNames.length; i++) { + if (typeof (value[navigationPropertyNames[i]]) !== 'undefined') { + var navigationPropValue = clientObj[navigationPropertyNames[i]]; + if (navigationPropValue.setMockData) { + navigationPropValue.setMockData(value[navigationPropertyNames[i]]); + } + } + } + } + if (clientObj[Constants.isCollection] && childItemCreateFunc) { + var itemsData = Array.isArray(value) ? value : value[Constants.itemsLowerCase]; + if (Array.isArray(itemsData)) { + var items = []; + for (var i = 0; i < itemsData.length; i++) { + var item = childItemCreateFunc(itemsData, i); + Utility.setMockData(item, itemsData[i]); + items.push(item); + } + setItemsFunc(items); + } + } + }; + Utility.applyMixin = function (derived, base) { + Object.getOwnPropertyNames(base.prototype).forEach(function (name) { + if (name !== 'constructor') { + Object.defineProperty(derived.prototype, name, Object.getOwnPropertyDescriptor(base.prototype, name)); + } + }); + }; + Utility.ensureTypeInitialized = function (type) { + var context = new ClientRequestContext(); + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, "Temp", false, 0); + new type(context, objectPath); + }; + Utility.fieldName_m__items = 'm__items'; + Utility.fieldName_isCollection = '_isCollection'; + Utility._synchronousCleanup = false; + Utility.s_underscoreCharCode = '_'.charCodeAt(0); + Utility.s_suppressPropertyNotLoadedException = false; + return Utility; + }(CommonUtility)); + OfficeExtension_1.Utility = Utility; + var BatchApiHelper = (function () { + function BatchApiHelper() { + } + BatchApiHelper.invokeMethod = function (obj, methodName, operationType, args, flags, resultProcessType) { + var action = ActionFactory.createMethodAction(obj.context, obj, methodName, operationType, args, flags); + var result = new ClientResult(resultProcessType); + Utility._addActionResultHandler(obj, action, result); + return result; + }; + BatchApiHelper.invokeEnsureUnchanged = function (obj, objectState) { + ActionFactory.createEnsureUnchangedAction(obj.context, obj, objectState); + }; + BatchApiHelper.invokeSetProperty = function (obj, propName, propValue, flags) { + ActionFactory.createSetPropertyAction(obj.context, obj, propName, propValue, flags); + }; + BatchApiHelper.createRootServiceObject = function (type, context) { + var objectPath = ObjectPathFactory.createGlobalObjectObjectPath(context); + return new type(context, objectPath); + }; + BatchApiHelper.createObjectFromReferenceId = function (type, context, referenceId) { + var objectPath = ObjectPathFactory.createReferenceIdObjectPath(context, referenceId); + return new type(context, objectPath); + }; + BatchApiHelper.createTopLevelServiceObject = function (type, context, typeName, isCollection, flags) { + var objectPath = ObjectPathFactory.createNewObjectObjectPath(context, typeName, isCollection, flags); + return new type(context, objectPath); + }; + BatchApiHelper.createPropertyObject = function (type, parent, propertyName, isCollection, flags) { + var objectPath = ObjectPathFactory.createPropertyObjectPath(parent.context, parent, propertyName, isCollection, false, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createIndexerObject = function (type, parent, args) { + var objectPath = ObjectPathFactory.createIndexerObjectPath(parent.context, parent, args); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createMethodObject = function (type, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags) { + var objectPath = ObjectPathFactory.createMethodObjectPath(parent.context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, flags); + return new type(parent.context, objectPath); + }; + BatchApiHelper.createChildItemObject = function (type, hasIndexerMethod, parent, chileItem, index) { + var objectPath = ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt(hasIndexerMethod, parent.context, parent, chileItem, index); + return new type(parent.context, objectPath); + }; + return BatchApiHelper; + }()); + OfficeExtension_1.BatchApiHelper = BatchApiHelper; + var LibraryBuilder = (function () { + function LibraryBuilder(options) { + this.m_namespaceMap = {}; + this.m_namespace = options.metadata.name; + this.m_targetNamespaceObject = options.targetNamespaceObject; + this.m_namespaceMap[this.m_namespace] = options.targetNamespaceObject; + if (options.namespaceMap) { + for (var ns in options.namespaceMap) { + this.m_namespaceMap[ns] = options.namespaceMap[ns]; + } + } + this.m_defaultApiSetName = options.metadata.defaultApiSetName; + this.m_hostName = options.metadata.hostName; + var metadata = options.metadata; + if (metadata.enumTypes) { + for (var i = 0; i < metadata.enumTypes.length; i++) { + this.buildEnumType(metadata.enumTypes[i]); + } + } + if (metadata.apiSets) { + for (var i = 0; i < metadata.apiSets.length; i++) { + var elem = metadata.apiSets[i]; + if (Array.isArray(elem)) { + metadata.apiSets[i] = { + version: elem[0], + name: elem[1] || this.m_defaultApiSetName + }; + } + } + this.m_apiSets = metadata.apiSets; + } + this.m_strings = metadata.strings; + if (metadata.clientObjectTypes) { + for (var i = 0; i < metadata.clientObjectTypes.length; i++) { + var elem = metadata.clientObjectTypes[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 11); + metadata.clientObjectTypes[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + collectionPropertyPath: this.getString(elem[6]), + newObjectServerTypeFullName: this.getString(elem[9]), + newObjectApiFlags: elem[10], + childItemTypeFullName: this.getString(elem[7]), + scalarProperties: elem[2], + navigationProperties: elem[3], + scalarMethods: elem[4], + navigationMethods: elem[5], + events: elem[8] + }; + } + this.buildClientObjectType(metadata.clientObjectTypes[i], options.fullyInitialize); + } + } + } + LibraryBuilder.prototype.ensureArraySize = function (value, size) { + var count = size - value.length; + while (count > 0) { + value.push(0); + count--; + } + }; + LibraryBuilder.prototype.getString = function (ordinalOrValue) { + if (typeof (ordinalOrValue) === "number") { + if (ordinalOrValue > 0) { + return this.m_strings[ordinalOrValue - 1]; + } + return null; + } + return ordinalOrValue; + }; + LibraryBuilder.prototype.buildEnumType = function (elem) { + var enumType; + if (Array.isArray(elem)) { + enumType = { + name: elem[0], + fields: elem[2] + }; + if (!enumType.fields) { + enumType.fields = {}; + } + var fieldsWithCamelUpperCaseValue = elem[1]; + if (Array.isArray(fieldsWithCamelUpperCaseValue)) { + for (var index = 0; index < fieldsWithCamelUpperCaseValue.length; index++) { + enumType.fields[fieldsWithCamelUpperCaseValue[index]] = this.toSimpleCamelUpperCase(fieldsWithCamelUpperCaseValue[index]); + } + } + } + else { + enumType = elem; + } + this.m_targetNamespaceObject[enumType.name] = enumType.fields; + }; + LibraryBuilder.prototype.buildClientObjectType = function (typeInfo, fullyInitialize) { + var thisBuilder = this; + var type = function (context, objectPath) { + ClientObject.apply(this, arguments); + if (!thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited) { + thisBuilder.buildPrototype(thisBuilder.m_targetNamespaceObject[typeInfo.name], typeInfo); + thisBuilder.m_targetNamespaceObject[typeInfo.name]._typeInited = true; + } + if (OfficeExtension_1._internalConfig.appendTypeNameToObjectPathInfo) { + if (this._objectPath && this._objectPath.objectPathInfo && this._className) { + this._objectPath.objectPathInfo.T = this._className; + } + } + }; + this.m_targetNamespaceObject[typeInfo.name] = type; + this.extendsType(type, ClientObject); + this.buildNewObject(type, typeInfo); + if ((typeInfo.behaviorFlags & 2) !== 0) { + type.prototype._KeepReference = function () { + BatchApiHelper.invokeMethod(this, "_KeepReference", 1, [], 0, 0); + }; + } + if ((typeInfo.behaviorFlags & 32) !== 0) { + var func = this.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_StaticCustomize"); + func.call(null, type); + } + if (fullyInitialize) { + this.buildPrototype(type, typeInfo); + type._typeInited = true; + } + }; + LibraryBuilder.prototype.extendsType = function (d, b) { + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + LibraryBuilder.prototype.findObjectUnderPath = function (top, paths, pathStartIndex) { + var obj = top; + for (var i = pathStartIndex; i < paths.length; i++) { + if (typeof (obj) !== 'object') { + throw new OfficeExtension_1.Error("Cannot find " + paths.join(".")); + } + obj = obj[paths[i]]; + } + return obj; + }; + LibraryBuilder.prototype.getFunction = function (fullName) { + var ret = this.resolveObjectByFullName(fullName); + if (typeof (ret) !== 'function') { + throw new OfficeExtension_1.Error("Cannot find function or type: " + fullName); + } + return ret; + }; + LibraryBuilder.prototype.resolveObjectByFullName = function (fullName) { + var parts = fullName.split('.'); + if (parts.length === 1) { + return this.m_targetNamespaceObject[parts[0]]; + } + var rootName = parts[0]; + if (rootName === this.m_namespace) { + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 1); + } + if (this.m_namespaceMap[rootName]) { + return this.findObjectUnderPath(this.m_namespaceMap[rootName], parts, 1); + } + return this.findObjectUnderPath(this.m_targetNamespaceObject, parts, 0); + }; + LibraryBuilder.prototype.evaluateSimpleExpression = function (expression, thisObj) { + if (Utility.isNullOrUndefined(expression)) { + return null; + } + var paths = expression.split('.'); + if (paths.length === 3 && paths[0] === 'OfficeExtension' && paths[1] === 'Constants') { + return Constants[paths[2]]; + } + if (paths[0] === 'this') { + var obj = thisObj; + for (var i = 1; i < paths.length; i++) { + if (paths[i] == 'toString()') { + obj = obj.toString(); + } + else if (paths[i].substr(paths[i].length - 2) === "()") { + obj = obj[paths[i].substr(0, paths[i].length - 2)](); + } + else { + obj = obj[paths[i]]; + } + } + return obj; + } + throw new OfficeExtension_1.Error("Cannot evaluate: " + expression); + }; + LibraryBuilder.prototype.evaluateEventTargetId = function (targetIdExpression, thisObj) { + if (Utility.isNullOrEmptyString(targetIdExpression)) { + return ''; + } + return this.evaluateSimpleExpression(targetIdExpression, thisObj); + }; + LibraryBuilder.prototype.isAllDigits = function (expression) { + var charZero = '0'.charCodeAt(0); + var charNine = '9'.charCodeAt(0); + for (var i = 0; i < expression.length; i++) { + if (expression.charCodeAt(i) < charZero || + expression.charCodeAt(i) > charNine) { + return false; + } + } + return true; + }; + LibraryBuilder.prototype.evaluateEventType = function (eventTypeExpression) { + if (Utility.isNullOrEmptyString(eventTypeExpression)) { + return 0; + } + if (this.isAllDigits(eventTypeExpression)) { + return parseInt(eventTypeExpression); + } + var ret = this.resolveObjectByFullName(eventTypeExpression); + if (typeof (ret) !== 'number') { + throw new OfficeExtension_1.Error("Invalid event type: " + eventTypeExpression); + } + return ret; + }; + LibraryBuilder.prototype.buildPrototype = function (type, typeInfo) { + this.buildScalarProperties(type, typeInfo); + this.buildNavigationProperties(type, typeInfo); + this.buildScalarMethods(type, typeInfo); + this.buildNavigationMethods(type, typeInfo); + this.buildEvents(type, typeInfo); + this.buildHandleResult(type, typeInfo); + this.buildHandleIdResult(type, typeInfo); + this.buildHandleRetrieveResult(type, typeInfo); + this.buildLoad(type, typeInfo); + this.buildRetrieve(type, typeInfo); + this.buildSetMockData(type, typeInfo); + this.buildEnsureUnchanged(type, typeInfo); + this.buildUpdate(type, typeInfo); + this.buildSet(type, typeInfo); + this.buildToJSON(type, typeInfo); + this.buildItems(type, typeInfo); + this.buildTypeMetadataInfo(type, typeInfo); + this.buildTrackUntrack(type, typeInfo); + this.buildMixin(type, typeInfo); + }; + LibraryBuilder.prototype.toSimpleCamelUpperCase = function (name) { + return name.substr(0, 1).toUpperCase() + name.substr(1); + }; + LibraryBuilder.prototype.ensureOriginalName = function (member) { + if (member.originalName === null) { + member.originalName = this.toSimpleCamelUpperCase(member.name); + } + }; + LibraryBuilder.prototype.getFieldName = function (member) { + return "m_" + member.name; + }; + LibraryBuilder.prototype.throwIfApiNotSupported = function (typeInfo, member) { + if (this.m_apiSets && member.apiSetInfoOrdinal > 0) { + var apiSetInfo = this.m_apiSets[member.apiSetInfoOrdinal - 1]; + if (apiSetInfo) { + Utility.throwIfApiNotSupported(typeInfo.name + "." + member.name, apiSetInfo.name, apiSetInfo.version, this.m_hostName); + } + } + }; + LibraryBuilder.prototype.buildScalarProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarProperties)) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var elem = typeInfo.scalarProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 6); + typeInfo.scalarProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + originalName: this.getString(elem[3]), + setMethodApiFlags: elem[4], + undoableApiSetInfoOrdinal: elem[5] + }; + } + this.buildScalarProperty(type, typeInfo, typeInfo.scalarProperties[i]); + } + } + }; + LibraryBuilder.prototype.calculateApiFlags = function (apiFlags, undoableApiSetInfoOrdinal) { + if (undoableApiSetInfoOrdinal > 0) { + var undoableApiSetInfo = this.m_apiSets[undoableApiSetInfoOrdinal - 1]; + if (undoableApiSetInfo) { + apiFlags = CommonUtility.calculateApiFlags(apiFlags, undoableApiSetInfo.name, undoableApiSetInfo.version); + } + } + return apiFlags; + }; + LibraryBuilder.prototype.buildScalarProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + Utility.throwIfNotLoaded(propInfo.name, this[fieldName], typeInfo.name, this._isNull); + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildNavigationProperties = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationProperties)) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + var elem = typeInfo.navigationProperties[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 8); + typeInfo.navigationProperties[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[4]), + getMethodApiFlags: elem[5], + setMethodApiFlags: elem[6], + propertyTypeFullName: this.getString(elem[1]), + undoableApiSetInfoOrdinal: elem[7] + }; + } + this.buildNavigationProperty(type, typeInfo, typeInfo.navigationProperties[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationProperty = function (type, typeInfo, propInfo) { + this.ensureOriginalName(propInfo); + var thisBuilder = this; + var fieldName = this.getFieldName(propInfo); + var descriptor = { + get: function () { + if (!this[thisBuilder.getFieldName(propInfo)]) { + thisBuilder.throwIfApiNotSupported(typeInfo, propInfo); + this[fieldName] = BatchApiHelper.createPropertyObject(thisBuilder.getFunction(propInfo.propertyTypeFullName), this, propInfo.originalName, (propInfo.behaviorFlags & 16) !== 0, propInfo.getMethodApiFlags); + } + if (propInfo.behaviorFlags & 64) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Get"); + customizationFunc.call(this, this, this[fieldName]); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }; + if ((propInfo.behaviorFlags & 2) === 0) { + descriptor.set = function (value) { + if (propInfo.behaviorFlags & 4) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + propInfo.originalName + "_Set"); + var handled = customizationFunc.call(this, this, value).handled; + if (handled) { + return; + } + } + this[fieldName] = value; + var apiFlags = thisBuilder.calculateApiFlags(propInfo.setMethodApiFlags, propInfo.undoableApiSetInfoOrdinal); + BatchApiHelper.invokeSetProperty(this, propInfo.originalName, value, apiFlags); + }; + } + Object.defineProperty(type.prototype, propInfo.name, descriptor); + }; + LibraryBuilder.prototype.buildScalarMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.scalarMethods)) { + for (var i = 0; i < typeInfo.scalarMethods.length; i++) { + var elem = typeInfo.scalarMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.scalarMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[2], + apiSetInfoOrdinal: elem[3], + originalName: this.getString(elem[5]), + apiFlags: elem[4], + parameterCount: elem[1], + undoableApiSetInfoOrdinal: elem[6] + }; + } + this.buildScalarMethod(type, typeInfo, typeInfo.scalarMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildScalarMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + var resultProcessType = 0; + if (methodInfo.behaviorFlags & 32) { + resultProcessType = 1; + } + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.invokeMethod(this, methodInfo.originalName, operationType, args, apiFlags, resultProcessType); + }; + }; + LibraryBuilder.prototype.buildNavigationMethods = function (type, typeInfo) { + if (Array.isArray(typeInfo.navigationMethods)) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + var elem = typeInfo.navigationMethods[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 9); + typeInfo.navigationMethods[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[3], + apiSetInfoOrdinal: elem[4], + originalName: this.getString(elem[6]), + apiFlags: elem[5], + parameterCount: elem[2], + returnTypeFullName: this.getString(elem[1]), + returnObjectGetByIdMethodName: this.getString(elem[7]), + undoableApiSetInfoOrdinal: elem[8] + }; + } + this.buildNavigationMethod(type, typeInfo, typeInfo.navigationMethods[i]); + } + } + }; + LibraryBuilder.prototype.buildNavigationMethod = function (type, typeInfo, methodInfo) { + this.ensureOriginalName(methodInfo); + var thisBuilder = this; + type.prototype[methodInfo.name] = function () { + var args = []; + if ((methodInfo.behaviorFlags & 64) && methodInfo.parameterCount > 0) { + for (var i = 0; i < methodInfo.parameterCount - 1; i++) { + args.push(arguments[i]); + } + var rest = []; + for (var i = methodInfo.parameterCount - 1; i < arguments.length; i++) { + rest.push(arguments[i]); + } + args.push(rest); + } + else { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + } + if (methodInfo.behaviorFlags & 1) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + methodInfo.originalName); + var applyArgs = [this]; + for (var i = 0; i < args.length; i++) { + applyArgs.push(args[i]); + } + var _a = customizationFunc.apply(this, applyArgs), handled = _a.handled, result = _a.result; + if (handled) { + return result; + } + } + thisBuilder.throwIfApiNotSupported(typeInfo, methodInfo); + if ((methodInfo.behaviorFlags & 16) !== 0) { + return BatchApiHelper.createIndexerObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, args); + } + else { + var operationType = 0; + if (methodInfo.behaviorFlags & 2) { + operationType = 1; + } + var apiFlags = thisBuilder.calculateApiFlags(methodInfo.apiFlags, methodInfo.undoableApiSetInfoOrdinal); + return BatchApiHelper.createMethodObject(thisBuilder.getFunction(methodInfo.returnTypeFullName), this, methodInfo.originalName, operationType, args, (methodInfo.behaviorFlags & 4) !== 0, (methodInfo.behaviorFlags & 8) !== 0, methodInfo.returnObjectGetByIdMethodName, apiFlags); + } + }; + }; + LibraryBuilder.prototype.buildHandleResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleResult = function (value) { + ClientObject.prototype._handleResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + Utility.fixObjectPathIfNecessary(this, value); + if (typeInfo.behaviorFlags & 8) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i_3 = 0; i_3 < typeInfo.scalarProperties.length; i_3++) { + if (!Utility.isUndefined(value[typeInfo.scalarProperties[i_3].originalName])) { + if ((typeInfo.scalarProperties[i_3].behaviorFlags & 8) !== 0) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i_3].originalName]); + } + else { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i_3])] = value[typeInfo.scalarProperties[i_3].originalName]; + } + } + } + } + if (typeInfo.navigationProperties) { + var propNames = []; + for (var i_4 = 0; i_4 < typeInfo.navigationProperties.length; i_4++) { + propNames.push(typeInfo.navigationProperties[i_4].name); + propNames.push(typeInfo.navigationProperties[i_4].originalName); + } + Utility._handleNavigationPropertyResults(this, value, propNames); + } + if ((typeInfo.behaviorFlags & 1) !== 0) { + var hasIndexerMethod = thisBuilder.hasIndexMethod(typeInfo); + if (!Utility.isNullOrUndefined(value[Constants.items])) { + this.m__items = []; + var _data = value[Constants.items]; + var childItemType = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + for (var i = 0; i < _data.length; i++) { + var _item = BatchApiHelper.createChildItemObject(childItemType, hasIndexerMethod, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + } + }; + }; + LibraryBuilder.prototype.buildHandleRetrieveResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleRetrieveResult = function (value, result) { + ClientObject.prototype._handleRetrieveResult.call(this, value, result); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if (typeInfo.scalarProperties[i].behaviorFlags & 8) { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].name])) { + value[typeInfo.scalarProperties[i].name] = Utility.adjustToDateTime(value[typeInfo.scalarProperties[i].name]); + } + } + } + } + if (typeInfo.behaviorFlags & 1) { + var hasIndexerMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + var childItemType_1 = thisBuilder.getFunction(typeInfo.childItemTypeFullName); + var thisObj_1 = this; + Utility.processRetrieveResult(thisObj_1, value, result, function (childItemData, index) { return BatchApiHelper.createChildItemObject(childItemType_1, hasIndexerMethod_1, thisObj_1, childItemData, index); }); + } + else { + Utility.processRetrieveResult(this, value, result); + } + }; + }; + LibraryBuilder.prototype.buildHandleIdResult = function (type, typeInfo) { + var thisBuilder = this; + type.prototype._handleIdResult = function (value) { + ClientObject.prototype._handleIdResult.call(this, value); + if (Utility.isNullOrUndefined(value)) { + return; + } + if (typeInfo.behaviorFlags & 16) { + var customizationFunc = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_HandleIdResult"); + customizationFunc.call(this, this, value); + } + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + var propName = typeInfo.scalarProperties[i].originalName; + if (propName === "Id" || propName === "_Id" || propName === "_ReferenceId") { + if (!Utility.isNullOrUndefined(value[typeInfo.scalarProperties[i].originalName])) { + this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])] = value[typeInfo.scalarProperties[i].originalName]; + } + } + } + } + }; + }; + LibraryBuilder.prototype.buildLoad = function (type, typeInfo) { + type.prototype.load = function (options) { + return Utility.load(this, options); + }; + }; + LibraryBuilder.prototype.buildRetrieve = function (type, typeInfo) { + type.prototype.retrieve = function (options) { + return Utility.retrieve(this, options); + }; + }; + LibraryBuilder.prototype.buildNewObject = function (type, typeInfo) { + if (!Utility.isNullOrEmptyString(typeInfo.newObjectServerTypeFullName)) { + type.newObject = function (context) { + return BatchApiHelper.createTopLevelServiceObject(type, context, typeInfo.newObjectServerTypeFullName, (typeInfo.behaviorFlags & 1) !== 0, typeInfo.newObjectApiFlags); + }; + } + }; + LibraryBuilder.prototype.buildSetMockData = function (type, typeInfo) { + var thisBuilder = this; + if (typeInfo.behaviorFlags & 1) { + var hasIndexMethod_1 = thisBuilder.hasIndexMethod(typeInfo); + type.prototype.setMockData = function (data) { + var thisObj = this; + Utility.setMockData(thisObj, data, function (childItemData, index) { + return BatchApiHelper.createChildItemObject(thisBuilder.getFunction(typeInfo.childItemTypeFullName), hasIndexMethod_1, thisObj, childItemData, index); + }, function (items) { + thisObj.m__items = items; + }); + }; + } + else { + type.prototype.setMockData = function (data) { + Utility.setMockData(this, data); + }; + } + }; + LibraryBuilder.prototype.buildEnsureUnchanged = function (type, typeInfo) { + type.prototype.ensureUnchanged = function (data) { + BatchApiHelper.invokeEnsureUnchanged(this, data); + }; + }; + LibraryBuilder.prototype.buildUpdate = function (type, typeInfo) { + type.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + }; + LibraryBuilder.prototype.buildSet = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) !== 0) { + return; + } + var notAllowedToBeSetPropertyNames = []; + var allowedScalarPropertyNames = []; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 2) === 0 && + (typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + allowedScalarPropertyNames.push(typeInfo.scalarProperties[i].name); + } + else { + notAllowedToBeSetPropertyNames.push(typeInfo.scalarProperties[i].name); + } + } + } + var allowedNavigationPropertyNames = []; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 16) !== 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 1) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else if ((typeInfo.navigationProperties[i].behaviorFlags & 32) === 0) { + notAllowedToBeSetPropertyNames.push(typeInfo.navigationProperties[i].name); + } + else { + allowedNavigationPropertyNames.push(typeInfo.navigationProperties[i].name); + } + } + } + if (allowedNavigationPropertyNames.length === 0 && allowedScalarPropertyNames.length === 0) { + return; + } + type.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, allowedScalarPropertyNames, allowedNavigationPropertyNames, notAllowedToBeSetPropertyNames); + }; + }; + LibraryBuilder.prototype.buildItems = function (type, typeInfo) { + if ((typeInfo.behaviorFlags & 1) === 0) { + return; + } + Object.defineProperty(type.prototype, "items", { + get: function () { + Utility.throwIfNotLoaded("items", this.m__items, typeInfo.name, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildToJSON = function (type, typeInfo) { + var thisBuilder = this; + if ((typeInfo.behaviorFlags & 1) !== 0) { + type.prototype.toJSON = function () { + return Utility.toJson(this, {}, {}, this.m__items); + }; + return; + } + else { + type.prototype.toJSON = function () { + var scalarProperties = {}; + if (typeInfo.scalarProperties) { + for (var i = 0; i < typeInfo.scalarProperties.length; i++) { + if ((typeInfo.scalarProperties[i].behaviorFlags & 1) !== 0) { + scalarProperties[typeInfo.scalarProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.scalarProperties[i])]; + } + } + } + var navProperties = {}; + if (typeInfo.navigationProperties) { + for (var i = 0; i < typeInfo.navigationProperties.length; i++) { + if ((typeInfo.navigationProperties[i].behaviorFlags & 1) !== 0) { + navProperties[typeInfo.navigationProperties[i].name] = this[thisBuilder.getFieldName(typeInfo.navigationProperties[i])]; + } + } + } + return Utility.toJson(this, scalarProperties, navProperties); + }; + } + }; + LibraryBuilder.prototype.buildTypeMetadataInfo = function (type, typeInfo) { + Object.defineProperty(type.prototype, "_className", { + get: function () { + return typeInfo.name; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_isCollection", { + get: function () { + return (typeInfo.behaviorFlags & 1) !== 0; + }, + enumerable: true, + configurable: true + }); + if (!Utility.isNullOrEmptyString(typeInfo.collectionPropertyPath)) { + Object.defineProperty(type.prototype, "_collectionPropertyPath", { + get: function () { + return typeInfo.collectionPropertyPath; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.scalarProperties && typeInfo.scalarProperties.length > 0) { + Object.defineProperty(type.prototype, "_scalarPropertyNames", { + get: function () { + if (!this.m__scalarPropertyNames) { + this.m__scalarPropertyNames = typeInfo.scalarProperties.map(function (p) { return p.name; }); + } + return this.m__scalarPropertyNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyOriginalNames", { + get: function () { + if (!this.m__scalarPropertyOriginalNames) { + this.m__scalarPropertyOriginalNames = typeInfo.scalarProperties.map(function (p) { return p.originalName; }); + } + return this.m__scalarPropertyOriginalNames; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(type.prototype, "_scalarPropertyUpdateable", { + get: function () { + if (!this.m__scalarPropertyUpdateable) { + this.m__scalarPropertyUpdateable = typeInfo.scalarProperties.map(function (p) { return (p.behaviorFlags & 2) === 0; }); + } + return this.m__scalarPropertyUpdateable; + }, + enumerable: true, + configurable: true + }); + } + if (typeInfo.navigationProperties && typeInfo.navigationProperties.length > 0) { + Object.defineProperty(type.prototype, "_navigationPropertyNames", { + get: function () { + if (!this.m__navigationPropertyNames) { + this.m__navigationPropertyNames = typeInfo.navigationProperties.map(function (p) { return p.name; }); + } + return this.m__navigationPropertyNames; + }, + enumerable: true, + configurable: true + }); + } + }; + LibraryBuilder.prototype.buildTrackUntrack = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 2) { + type.prototype.track = function () { + this.context.trackedObjects.add(this); + return this; + }; + type.prototype.untrack = function () { + this.context.trackedObjects.remove(this); + return this; + }; + } + }; + LibraryBuilder.prototype.buildMixin = function (type, typeInfo) { + if (typeInfo.behaviorFlags & 4) { + var mixinType = this.getFunction(typeInfo.name + 'Custom'); + Utility.applyMixin(type, mixinType); + } + }; + LibraryBuilder.prototype.getOnEventName = function (name) { + if (name[0] === '_') { + return '_on' + name.substr(1); + } + return 'on' + name; + }; + LibraryBuilder.prototype.buildEvents = function (type, typeInfo) { + if (typeInfo.events) { + for (var i = 0; i < typeInfo.events.length; i++) { + var elem = typeInfo.events[i]; + if (Array.isArray(elem)) { + this.ensureArraySize(elem, 7); + typeInfo.events[i] = { + name: this.getString(elem[0]), + behaviorFlags: elem[1], + apiSetInfoOrdinal: elem[2], + typeExpression: this.getString(elem[3]), + targetIdExpression: this.getString(elem[4]), + register: this.getString(elem[5]), + unregister: this.getString(elem[6]) + }; + } + this.buildEvent(type, typeInfo, typeInfo.events[i]); + } + } + }; + LibraryBuilder.prototype.buildEvent = function (type, typeInfo, evt) { + if (evt.behaviorFlags & 1) { + this.buildV0Event(type, typeInfo, evt); + } + else { + this.buildV2Event(type, typeInfo, evt); + } + }; + LibraryBuilder.prototype.buildV2Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (evt.register !== 'null') { + registerFunc = this[evt.register].bind(this); + } + var unregisterFunc = null; + if (evt.unregister !== 'null') { + unregisterFunc = this[evt.unregister].bind(this); + } + var getTargetIdFunc = function () { + return thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + }; + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + var eventType = thisBuilder.evaluateEventType(evt.typeExpression); + this[fieldName] = new GenericEventHandlers(this.context, this, evt.name, { + eventType: eventType, + getTargetIdFunc: getTargetIdFunc, + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.buildV0Event = function (type, typeInfo, evt) { + var thisBuilder = this; + var eventName = this.getOnEventName(evt.name); + var fieldName = this.getFieldName(evt); + Object.defineProperty(type.prototype, eventName, { + get: function () { + if (!this[fieldName]) { + thisBuilder.throwIfApiNotSupported(typeInfo, evt); + var thisObj = this; + var registerFunc = null; + if (Utility.isNullOrEmptyString(evt.register)) { + var eventType_1 = thisBuilder.evaluateEventType(evt.typeExpression); + registerFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.register(eventType_1, targetId, handlerCallback); + }; + } + else if (evt.register !== 'null') { + var func_1 = thisBuilder.getFunction(evt.register); + registerFunc = + function (handlerCallback) { + return func_1.call(thisObj, thisObj, handlerCallback); + }; + } + var unregisterFunc = null; + if (Utility.isNullOrEmptyString(evt.unregister)) { + var eventType_2 = thisBuilder.evaluateEventType(evt.typeExpression); + unregisterFunc = + function (handlerCallback) { + var targetId = thisBuilder.evaluateEventTargetId(evt.targetIdExpression, thisObj); + return thisObj.context.eventRegistration.unregister(eventType_2, targetId, handlerCallback); + }; + } + else if (evt.unregister !== 'null') { + var func_2 = thisBuilder.getFunction(evt.unregister); + unregisterFunc = + function (handlerCallback) { + return func_2.call(thisObj, thisObj, handlerCallback); + }; + } + var func = null; + if (evt.behaviorFlags & 2) { + func = thisBuilder.getFunction(LibraryBuilder.CustomizationCodeNamespace + "." + typeInfo.name + "_" + evt.name + "_EventArgsTransform"); + } + var eventArgsTransformFunc = function (value) { + if (func) { + value = func.call(thisObj, thisObj, value); + } + return Utility._createPromiseFromResult(value); + }; + this[fieldName] = new EventHandlers(this.context, this, evt.name, { + registerFunc: registerFunc, + unregisterFunc: unregisterFunc, + eventArgsTransformFunc: eventArgsTransformFunc + }); + } + return this[fieldName]; + }, + enumerable: true, + configurable: true + }); + }; + LibraryBuilder.prototype.hasIndexMethod = function (typeInfo) { + var ret = false; + if (typeInfo.navigationMethods) { + for (var i = 0; i < typeInfo.navigationMethods.length; i++) { + if ((typeInfo.navigationMethods[i].behaviorFlags & 16) !== 0) { + ret = true; + break; + } + } + } + return ret; + }; + LibraryBuilder.CustomizationCodeNamespace = "_CC"; + return LibraryBuilder; + }()); + OfficeExtension_1.LibraryBuilder = LibraryBuilder; + var versionToken = 1; + var internalConfiguration = { + invokeRequestModifier: function (request) { + request.DdaMethod.Version = versionToken; + return request; + }, + invokeResponseModifier: function (args) { + versionToken = args.Version; + if (args.Error) { + args.error = {}; + args.error.Code = args.Error; + } + return args; + } + }; + var CommunicationConstants; + (function (CommunicationConstants) { + CommunicationConstants["SendingId"] = "sId"; + CommunicationConstants["RespondingId"] = "rId"; + CommunicationConstants["CommandKey"] = "command"; + CommunicationConstants["SessionInfoKey"] = "sessionInfo"; + CommunicationConstants["ParamsKey"] = "params"; + CommunicationConstants["ApiReadyCommand"] = "apiready"; + CommunicationConstants["ExecuteMethodCommand"] = "executeMethod"; + CommunicationConstants["GetAppContextCommand"] = "getAppContext"; + CommunicationConstants["RegisterEventCommand"] = "registerEvent"; + CommunicationConstants["UnregisterEventCommand"] = "unregisterEvent"; + CommunicationConstants["FireEventCommand"] = "fireEvent"; + })(CommunicationConstants || (CommunicationConstants = {})); + var EmbeddedConstants = (function () { + function EmbeddedConstants() { + } + EmbeddedConstants.sessionContext = 'sc'; + EmbeddedConstants.embeddingPageOrigin = 'EmbeddingPageOrigin'; + EmbeddedConstants.embeddingPageSessionInfo = 'EmbeddingPageSessionInfo'; + return EmbeddedConstants; + }()); + OfficeExtension_1.EmbeddedConstants = EmbeddedConstants; + var EmbeddedSession = (function (_super) { + __extends(EmbeddedSession, _super); + function EmbeddedSession(url, options) { + var _this = _super.call(this) || this; + _this.m_chosenWindow = null; + _this.m_chosenOrigin = null; + _this.m_enabled = true; + _this.m_onMessageHandler = _this._onMessage.bind(_this); + _this.m_callbackList = {}; + _this.m_id = 0; + _this.m_timeoutId = -1; + _this.m_appContext = null; + _this.m_url = url; + _this.m_options = options; + if (!_this.m_options) { + _this.m_options = { sessionKey: Math.random().toString() }; + } + if (!_this.m_options.sessionKey) { + _this.m_options.sessionKey = Math.random().toString(); + } + if (!_this.m_options.container) { + _this.m_options.container = document.body; + } + if (!_this.m_options.timeoutInMilliseconds) { + _this.m_options.timeoutInMilliseconds = 60000; + } + if (!_this.m_options.height) { + _this.m_options.height = '400px'; + } + if (!_this.m_options.width) { + _this.m_options.width = '100%'; + } + if (!(_this.m_options.webApplication && + _this.m_options.webApplication.accessToken && + _this.m_options.webApplication.accessTokenTtl)) { + _this.m_options.webApplication = null; + } + return _this; + } + EmbeddedSession.prototype._getIFrameSrc = function () { + var origin = window.location.protocol + '//' + window.location.host; + var toAppend = EmbeddedConstants.embeddingPageOrigin + + '=' + + encodeURIComponent(origin) + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + encodeURIComponent(this.m_options.sessionKey); + var useHash = false; + if (this.m_url.toLowerCase().indexOf('/_layouts/preauth.aspx') > 0 || + this.m_url.toLowerCase().indexOf('/_layouts/15/preauth.aspx') > 0) { + useHash = true; + } + var a = document.createElement('a'); + a.href = this.m_url; + if (this.m_options.webApplication) { + var toAppendWAC = EmbeddedConstants.embeddingPageOrigin + + '=' + + origin + + '&' + + EmbeddedConstants.embeddingPageSessionInfo + + '=' + + this.m_options.sessionKey; + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + else { + a.search = a.search + '&' + EmbeddedConstants.sessionContext + '=' + encodeURIComponent(toAppendWAC); + } + } + else if (useHash) { + if (a.hash.length === 0 || a.hash === '#') { + a.hash = '#' + toAppend; + } + else { + a.hash = a.hash + '&' + toAppend; + } + } + else { + if (a.search.length === 0 || a.search === '?') { + a.search = '?' + toAppend; + } + else { + a.search = a.search + '&' + toAppend; + } + } + var iframeSrc = a.href; + return iframeSrc; + }; + EmbeddedSession.prototype.init = function () { + var _this = this; + window.addEventListener('message', this.m_onMessageHandler); + var iframeSrc = this._getIFrameSrc(); + return CoreUtility.createPromise(function (resolve, reject) { + var iframeElement = document.createElement('iframe'); + if (_this.m_options.id) { + iframeElement.id = _this.m_options.id; + iframeElement.name = _this.m_options.id; + } + iframeElement.style.height = _this.m_options.height; + iframeElement.style.width = _this.m_options.width; + if (!_this.m_options.webApplication) { + iframeElement.src = iframeSrc; + _this.m_options.container.appendChild(iframeElement); + } + else { + var webApplicationForm = document.createElement('form'); + webApplicationForm.setAttribute('action', iframeSrc); + webApplicationForm.setAttribute('method', 'post'); + webApplicationForm.setAttribute('target', iframeElement.name); + _this.m_options.container.appendChild(webApplicationForm); + var token_input = document.createElement('input'); + token_input.setAttribute('type', 'hidden'); + token_input.setAttribute('name', 'access_token'); + token_input.setAttribute('value', _this.m_options.webApplication.accessToken); + webApplicationForm.appendChild(token_input); + var token_ttl_input = document.createElement('input'); + token_ttl_input.setAttribute('type', 'hidden'); + token_ttl_input.setAttribute('name', 'access_token_ttl'); + token_ttl_input.setAttribute('value', _this.m_options.webApplication.accessTokenTtl); + webApplicationForm.appendChild(token_ttl_input); + _this.m_options.container.appendChild(iframeElement); + webApplicationForm.submit(); + } + _this.m_timeoutId = window.setTimeout(function () { + _this.close(); + var err = Utility.createRuntimeError(CoreErrorCodes.timeout, CoreUtility._getResourceString(CoreResourceStrings.timeout), 'EmbeddedSession.init'); + reject(err); + }, _this.m_options.timeoutInMilliseconds); + _this.m_promiseResolver = resolve; + }); + }; + EmbeddedSession.prototype._invoke = function (method, callback, params) { + if (!this.m_enabled) { + callback(5001, null); + return; + } + if (internalConfiguration.invokeRequestModifier) { + params = internalConfiguration.invokeRequestModifier(params); + } + this._sendMessageWithCallback(this.m_id++, method, params, function (args) { + if (internalConfiguration.invokeResponseModifier) { + args = internalConfiguration.invokeResponseModifier(args); + } + var errorCode = args['Error']; + delete args['Error']; + callback(errorCode || 0, args); + }); + }; + EmbeddedSession.prototype.close = function () { + window.removeEventListener('message', this.m_onMessageHandler); + window.clearTimeout(this.m_timeoutId); + this.m_enabled = false; + }; + EmbeddedSession.prototype.getEventRegistration = function (controlId) { + if (!this.m_sessionEventManager) { + this.m_sessionEventManager = new EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + } + return this.m_sessionEventManager; + }; + EmbeddedSession.prototype._createRequestExecutorOrNull = function () { + return new EmbeddedRequestExecutor(this); + }; + EmbeddedSession.prototype._resolveRequestUrlAndHeaderInfo = function () { + return CoreUtility._createPromiseFromResult(null); + }; + EmbeddedSession.prototype._registerEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.RegisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(null); + }); + }); + }; + EmbeddedSession.prototype._unregisterEventImpl = function (eventId, targetId) { + var _this = this; + return CoreUtility.createPromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.UnregisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(); + }); + }); + }; + EmbeddedSession.prototype._onMessage = function (event) { + var _this = this; + if (!this.m_enabled) { + return; + } + if (this.m_chosenWindow && (this.m_chosenWindow !== event.source || this.m_chosenOrigin !== event.origin)) { + return; + } + var eventData = event.data; + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.ApiReadyCommand) { + if (!this.m_chosenWindow && + this._isValidDescendant(event.source) && + eventData[CommunicationConstants.SessionInfoKey] === this.m_options.sessionKey) { + this.m_chosenWindow = event.source; + this.m_chosenOrigin = event.origin; + this._sendMessageWithCallback(this.m_id++, CommunicationConstants.GetAppContextCommand, null, function (appContext) { + _this._setupContext(appContext); + window.clearTimeout(_this.m_timeoutId); + _this.m_promiseResolver(); + }); + } + return; + } + if (eventData && eventData[CommunicationConstants.CommandKey] === CommunicationConstants.FireEventCommand) { + var msg = eventData[CommunicationConstants.ParamsKey]; + var eventId = msg['EventId']; + var targetId = msg['TargetId']; + var data = msg['Data']; + if (this.m_sessionEventManager) { + var handlers = this.m_sessionEventManager.getHandlers(eventId, targetId); + for (var i = 0; i < handlers.length; i++) { + handlers[i](data); + } + } + return; + } + if (eventData && eventData.hasOwnProperty(CommunicationConstants.RespondingId)) { + var rId = eventData[CommunicationConstants.RespondingId]; + var callback = this.m_callbackList[rId]; + if (typeof callback === 'function') { + callback(eventData[CommunicationConstants.ParamsKey]); + } + delete this.m_callbackList[rId]; + } + }; + EmbeddedSession.prototype._sendMessageWithCallback = function (id, command, data, callback) { + this.m_callbackList[id] = callback; + var message = {}; + message[CommunicationConstants.SendingId] = id; + message[CommunicationConstants.CommandKey] = command; + message[CommunicationConstants.ParamsKey] = data; + this.m_chosenWindow.postMessage(JSON.stringify(message), this.m_chosenOrigin); + }; + EmbeddedSession.prototype._isValidDescendant = function (wnd) { + var container = this.m_options.container || document.body; + function doesFrameWindow(containerWindow) { + if (containerWindow === wnd) { + return true; + } + for (var i = 0, len = containerWindow.frames.length; i < len; i++) { + if (doesFrameWindow(containerWindow.frames[i])) { + return true; + } + } + return false; + } + var iframes = container.getElementsByTagName('iframe'); + for (var i = 0, len = iframes.length; i < len; i++) { + if (doesFrameWindow(iframes[i].contentWindow)) { + return true; + } + } + return false; + }; + EmbeddedSession.prototype._setupContext = function (appContext) { + if (!(this.m_appContext = appContext)) { + return; + } + }; + return EmbeddedSession; + }(SessionBase)); + OfficeExtension_1.EmbeddedSession = EmbeddedSession; + var EmbeddedRequestExecutor = (function () { + function EmbeddedRequestExecutor(session) { + this.m_session = session; + } + EmbeddedRequestExecutor.prototype.executeAsync = function (customData, requestFlags, requestMessage) { + var _this = this; + var messageSafearray = RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, EmbeddedRequestExecutor.SourceLibHeaderValue); + return CoreUtility.createPromise(function (resolve, reject) { + _this.m_session._invoke(CommunicationConstants.ExecuteMethodCommand, function (status, result) { + CoreUtility.log('Response:'); + CoreUtility.log(JSON.stringify(result)); + var response; + if (status == 0) { + response = RichApiMessageUtility.buildResponseOnSuccess(RichApiMessageUtility.getResponseBodyFromSafeArray(result.Data), RichApiMessageUtility.getResponseHeadersFromSafeArray(result.Data)); + } + else { + response = RichApiMessageUtility.buildResponseOnError(result.error.Code, result.error.Message); + } + resolve(response); + }, EmbeddedRequestExecutor._transformMessageArrayIntoParams(messageSafearray)); + }); + }; + EmbeddedRequestExecutor._transformMessageArrayIntoParams = function (msgArray) { + return { + ArrayData: msgArray, + DdaMethod: { + DispatchId: EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod + } + }; + }; + EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod = 93; + EmbeddedRequestExecutor.SourceLibHeaderValue = 'Embedded'; + return EmbeddedRequestExecutor; + }()); +})(OfficeExtension || (OfficeExtension = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { + step(generator.next(value)); + } + catch (e) { + reject(e); + } } + function rejected(value) { try { + step(generator["throw"](value)); + } + catch (e) { + reject(e); + } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function () { if (t[0] & 1) + throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } + catch (e) { + op = [6, e]; + y = 0; + } + finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "AgaveVisualApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeBiShim = "BiShim"; + var BiShim = (function (_super) { + __extends(BiShim, _super); + function BiShim() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BiShim.prototype, "_className", { + get: function () { + return "BiShim"; + }, + enumerable: true, + configurable: true + }); + BiShim.prototype.initialize = function (capabilities) { + _invokeMethod(this, "Initialize", 0, [capabilities], 0, 0); + }; + BiShim.prototype.getData = function () { + return _invokeMethod(this, "getData", 1, [], 4, 0); + }; + BiShim.prototype.setVisualObjects = function (visualObjects) { + _invokeMethod(this, "setVisualObjects", 0, [visualObjects], 2, 0); + }; + BiShim.prototype.setVisualObjectsToPersist = function (visualObjectsToPersist) { + _invokeMethod(this, "setVisualObjectsToPersist", 0, [visualObjectsToPersist], 2, 0); + }; + BiShim.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BiShim.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BiShim.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BiShim, context, "Microsoft.AgaveVisual.BiShim", false, 4); + }; + BiShim.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BiShim; + }(OfficeExtension.ClientObject)); + OfficeCore.BiShim = BiShim; + var AgaveVisualErrorCodes; + (function (AgaveVisualErrorCodes) { + AgaveVisualErrorCodes["generalException1"] = "GeneralException"; + })(AgaveVisualErrorCodes = OfficeCore.AgaveVisualErrorCodes || (OfficeCore.AgaveVisualErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "ExperimentApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _typeFlightingService = "FlightingService"; + var FlightingService = (function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId = function () { + return _invokeMethod(this, "GetClientSessionId", 1, [], 4, 0); + }; + FlightingService.prototype.getDeferredFlights = function () { + return _invokeMethod(this, "GetDeferredFlights", 1, [], 4, 0); + }; + FlightingService.prototype.getFeature = function (featureName, type, defaultValue, possibleValues) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null, 4); + }; + FlightingService.prototype.getFeatureGate = function (featureName, scope) { + return _createMethodObject(OfficeCore.ABType, this, "GetFeatureGate", 1, [featureName, scope], false, false, null, 4); + }; + FlightingService.prototype.resetOverride = function (featureName) { + _invokeMethod(this, "ResetOverride", 0, [featureName], 0, 0); + }; + FlightingService.prototype.setOverride = function (featureName, type, value) { + _invokeMethod(this, "SetOverride", 0, [featureName, type, value], 0, 0); + }; + FlightingService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FlightingService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FlightingService, context, "Microsoft.Experiment.FlightingService", false, 4); + }; + FlightingService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService = FlightingService; + var _typeABType = "ABType"; + var ABType = (function (_super) { + __extends(ABType, _super); + function ABType() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeABType, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + ABType.prototype.load = function (option) { + return _load(this, option); + }; + ABType.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + ABType.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ABType.prototype.toJSON = function () { + return _toJson(this, { + "value": this._V + }, {}); + }; + ABType.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType = ABType; + var FeatureType; + (function (FeatureType) { + FeatureType["boolean"] = "Boolean"; + FeatureType["integer"] = "Integer"; + FeatureType["string"] = "String"; + })(FeatureType = OfficeCore.FeatureType || (OfficeCore.FeatureType = {})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes["generalException"] = "GeneralException"; + })(ExperimentErrorCodes = OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyDialog; +(function (OfficeFirstPartyDialog) { + var Dialog = (function () { + function Dialog(_dialogService) { + this._dialogService = _dialogService; + } + Dialog.prototype.close = function () { + this._dialogService.close(); + return this._dialogService.context.sync(); + }; + Dialog.prototype.messageChild = function (message, options) { + if (DialogApiManager && DialogApiManager.messageChildRichApiBridge) { + DialogApiManager.messageChildRichApiBridge(message, options); + } + }; + return Dialog; + }()); + OfficeFirstPartyDialog.Dialog = Dialog; + function lookupErrorCodeAndMessage(internalCode) { + var _a; + var table = (_a = {}, + _a[12002] = { code: "InvalidUrl", message: "Cannot load URL, no such page or bad URL syntax." }, + _a[12003] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12004] = { code: "Untrusted", message: "Domain is not trusted." }, + _a[12005] = { code: "InvalidUrl", message: "HTTPS is required." }, + _a[12007] = { code: "FailedToOpen", message: "Another dialog is already opened." }, + _a); + if (table[internalCode]) { + return table[internalCode]; + } + else { + return { code: "Unknown", message: "An unknown error has occured with code: " + internalCode }; + } + } + function displayWebDialog(url, options) { + if (options === void 0) { + options = {}; + } + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (options.width && options.height && (!isInt(options.width) || !isInt(options.height))) { + throw new OfficeExtension.Error({ code: "InvalidArgument", message: 'Dimensions must be "number%" or number.' }); + } + var ctx = new OfficeExtension.ClientRequestContext(); + var dialogService = OfficeCore.FirstPartyDialogService.newObject(ctx); + var dialog = new OfficeFirstPartyDialog.Dialog(dialogService); + var eventResult = dialogService.onDialogMessage.add(function (args) { + OfficeExtension.Utility.log("dialogMessageHandler:" + JSON.stringify(args)); + var parsedMessage = JSON.parse(args.message); + var eventError = parsedMessage.errorCode + ? new OfficeExtension.Error(lookupErrorCodeAndMessage(parsedMessage.errorCode)) + : null; + var messageType = parsedMessage.type; + var origin = parsedMessage.origin; + var messageContent = parsedMessage.message; + switch (messageType) { + case 17: + if (eventError) { + reject(eventError); + } + else { + resolve(dialog); + } + break; + case 12: + if (options.onMessage) { + options.onMessage(messageContent, dialog, origin); + } + break; + case 10: + default: + if (parsedMessage.errorCode === 12006) { + if (eventResult) { + eventResult.remove(); + ctx.sync(); + } + if (options.onClose) { + options.onClose(); + } + } + else { + if (options.onRuntimeError) { + options.onRuntimeError(eventError, dialog); + reject(eventError); + } + } + } + return OfficeExtension.CoreUtility.Promise.resolve(); + }); + return ctx.sync() + .then(function () { + var dialogOptions = { + width: options.width ? parseInt(options.width) : 50, + height: options.height ? parseInt(options.height) : 50, + displayInIFrame: options.displayInIFrame, + dialogTitle: options.dialogTitle + }; + dialogService.displayDialog(url, dialogOptions); + return ctx.sync(); + })["catch"](function (e) { + reject(e); + }); + }); + function isInt(value) { + return (/^(\-|\+)?([0-9]+)%?$/.test(value)); + } + } + OfficeFirstPartyDialog.displayWebDialog = displayWebDialog; + var DialogEventType; + (function (DialogEventType) { + DialogEventType[DialogEventType["dialogMessageReceived"] = 0] = "dialogMessageReceived"; + DialogEventType[DialogEventType["dialogEventReceived"] = 1] = "dialogEventReceived"; + })(DialogEventType || (DialogEventType = {})); +})(OfficeFirstPartyDialog || (OfficeFirstPartyDialog = {})); +var OfficeCore; +(function (OfficeCore) { + OfficeCore.OfficeOnlineDomainList = [ + "*.dod.online.office365.us", + "*.gov.online.office365.us", + "*.officeapps-df.live.com", + "*.officeapps.live.com", + "*.online.office.de", + "*.partner.officewebapps.cn" + ]; + function isHostOriginTrusted() { + if (typeof window.external === 'undefined' || + typeof window.external.GetContext === 'undefined') { + var hostUrl = OSF.getClientEndPoint()._targetUrl; + var hostname_1 = getHostNameFromUrl(hostUrl); + if (hostUrl.indexOf("https:") != 0) { + return false; + } + OfficeCore.OfficeOnlineDomainList.forEach(function (domain) { + if (domain.indexOf("*.") == 0) { + domain = domain.substring(2); + } + if (hostname_1.indexOf(domain) == hostname_1.length - domain.length) { + return true; + } + }); + return false; + } + return true; + } + OfficeCore.isHostOriginTrusted = isHostOriginTrusted; + function getHostNameFromUrl(url) { + var hostName = ""; + hostName = url.split("/")[2]; + hostName = hostName.split(":")[0]; + hostName = hostName.split("?")[0]; + return hostName; + } +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var FirstPartyApis = (function () { + function FirstPartyApis(context) { + this.context = context; + } + Object.defineProperty(FirstPartyApis.prototype, "roamingSettings", { + get: function () { + if (!this.m_roamingSettings) { + this.m_roamingSettings = OfficeCore.AuthenticationService.newObject(this.context).roamingSettings; + } + return this.m_roamingSettings; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "tap", { + get: function () { + if (!this.m_tap) { + this.m_tap = OfficeCore.Tap.newObject(this.context); + } + return this.m_tap; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FirstPartyApis.prototype, "skill", { + get: function () { + if (!this.m_skill) { + this.m_skill = OfficeCore.Skill.newObject(this.context); + } + return this.m_skill; + }, + enumerable: true, + configurable: true + }); + return FirstPartyApis; + }()); + OfficeCore.FirstPartyApis = FirstPartyApis; + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + return _super.call(this, url) || this; + } + Object.defineProperty(RequestContext.prototype, "firstParty", { + get: function () { + if (!this.m_firstPartyApis) { + this.m_firstPartyApis = new FirstPartyApis(this); + } + return this.m_firstPartyApis; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry = OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "ribbon", { + get: function () { + if (!this.m_ribbon) { + this.m_ribbon = OfficeCore.DynamicRibbon.newObject(this); + } + return this.m_ribbon; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "bi", { + get: function () { + if (!this.m_biShim) { + this.m_biShim = OfficeCore.BiShim.newObject(this); + } + return this.m_biShim; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService = OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext = RequestContext; + function run(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runBatch("OfficeCore.run", arguments, function (requestInfo) { return new OfficeCore.RequestContext(requestInfo); }); + } + OfficeCore.run = run; +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var license; + (function (license_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function isFeatureEnabled(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, isEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isEnabled = license.isFeatureEnabled(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isEnabled.value]; + } + }); + }); + } + license_1.isFeatureEnabled = isFeatureEnabled; + function getFeatureTier(feature, fallbackValue) { + return __awaiter(this, void 0, void 0, function () { + var context, license, tier; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + tier = license.getFeatureTier(feature, fallbackValue); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, tier.value]; + } + }); + }); + } + license_1.getFeatureTier = getFeatureTier; + function isFreemiumUpsellEnabled() { + return __awaiter(this, void 0, void 0, function () { + var context, license, isFreemiumUpsellEnabled; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + isFreemiumUpsellEnabled = license.isFreemiumUpsellEnabled(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, isFreemiumUpsellEnabled.value]; + } + }); + }); + } + license_1.isFreemiumUpsellEnabled = isFreemiumUpsellEnabled; + function launchUpsellExperience(experienceId) { + return __awaiter(this, void 0, void 0, function () { + var context, license; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + license.launchUpsellExperience(experienceId); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + license_1.launchUpsellExperience = launchUpsellExperience; + function onFeatureStateChanged(feature, listener) { + return __awaiter(this, void 0, void 0, function () { + var context, license, licenseFeature, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + licenseFeature = license.getLicenseFeature(feature); + licenseFeature.onStateChanged.add(listener); + removeListener = function () { + licenseFeature.onStateChanged.remove(listener); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + license_1.onFeatureStateChanged = onFeatureStateChanged; + function getMsaDeviceTicket(resource, policy, options) { + return __awaiter(this, void 0, void 0, function () { + var context, license, msaDeviceTicket; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + license = OfficeCore.License.newObject(context); + msaDeviceTicket = license.getMsaDeviceTicket(resource, policy, options); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, msaDeviceTicket.value]; + } + }); + }); + } + license_1.getMsaDeviceTicket = getMsaDeviceTicket; + })(license = Office.license || (Office.license = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeSkill = "Skill"; + var Skill = (function (_super) { + __extends(Skill, _super); + function Skill() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Skill.prototype, "_className", { + get: function () { + return "Skill"; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.executeAction = function (paneId, actionId, actionDescriptor) { + return _invokeMethod(this, "ExecuteAction", 1, [paneId, actionId, actionDescriptor], 4 | 1, 0); + }; + Skill.prototype.notifyPaneEvent = function (paneId, eventDescriptor) { + _invokeMethod(this, "NotifyPaneEvent", 1, [paneId, eventDescriptor], 4 | 1, 0); + }; + Skill.prototype.registerHostSkillEvent = function () { + _invokeMethod(this, "RegisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype.testFireEvent = function () { + _invokeMethod(this, "TestFireEvent", 0, [], 1, 0); + }; + Skill.prototype.unregisterHostSkillEvent = function () { + _invokeMethod(this, "UnregisterHostSkillEvent", 0, [], 1, 0); + }; + Skill.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Skill.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Skill.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Skill, context, "Microsoft.SkillApi.Skill", false, 4); + }; + Object.defineProperty(Skill.prototype, "onHostSkillEvent", { + get: function () { + var _this = this; + if (!this.m_hostSkillEvent) { + this.m_hostSkillEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "HostSkillEvent", { + eventType: 65538, + registerFunc: function () { return _this.registerHostSkillEvent(); }, + unregisterFunc: function () { return _this.unregisterHostSkillEvent(); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.Skill_HostSkillEvent_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_hostSkillEvent; + }, + enumerable: true, + configurable: true + }); + Skill.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Skill; + }(OfficeExtension.ClientObject)); + OfficeCore.Skill = Skill; + var _CC; + (function (_CC) { + function Skill_HostSkillEvent_EventArgsTransform(thisObj, args) { + var transformedArgs = { + type: args.type, + data: args.data + }; + return transformedArgs; + } + _CC.Skill_HostSkillEvent_EventArgsTransform = Skill_HostSkillEvent_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var SkillErrorCodes; + (function (SkillErrorCodes) { + SkillErrorCodes["generalException"] = "GeneralException"; + })(SkillErrorCodes = OfficeCore.SkillErrorCodes || (OfficeCore.SkillErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "OfficeCore"; + var _defaultApiSetName = "TelemetryApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeTelemetryService = "TelemetryService"; + var TelemetryService = (function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendCustomerContent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _throwIfApiNotSupported("TelemetryService.sendCustomerContent", "Telemetry", "1.3", _hostName); + _invokeMethod(this, "SendCustomerContent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype.sendTelemetryEvent = function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _invokeMethod(this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], 4, 0); + }; + TelemetryService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + TelemetryService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.TelemetryService, context, "Microsoft.Telemetry.TelemetryService", false, 4); + }; + TelemetryService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService = TelemetryService; + var DataFieldType; + (function (DataFieldType) { + DataFieldType["unset"] = "Unset"; + DataFieldType["string"] = "String"; + DataFieldType["boolean"] = "Boolean"; + DataFieldType["int64"] = "Int64"; + DataFieldType["double"] = "Double"; + })(DataFieldType = OfficeCore.DataFieldType || (OfficeCore.DataFieldType = {})); + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes["generalException"] = "GeneralException"; + })(TelemetryErrorCodes = OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes = {})); +})(OfficeCore || (OfficeCore = {})); +var OfficeFirstPartyAuth; +(function (OfficeFirstPartyAuth) { + var WebAuthReplyUrlsStorageKey = "officeWebAuthReplyUrls"; + var loaded = false; + OfficeFirstPartyAuth.authFlow = "implicit"; + OfficeFirstPartyAuth.autoPopup = false; + OfficeFirstPartyAuth.msal = "https://alcdn.msauth.net/browser/2.21.0/js/msal-browser.min.js"; + OfficeFirstPartyAuth.debugging = false; + OfficeFirstPartyAuth.delay = 0; + OfficeFirstPartyAuth.delayMsal = 0; + function load(replyUrl) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF.WebAuth && OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + var retrievedAuthContext = false; + var errorMessage; + try { + if (!Office || !Office.context || !Office.context.webAuth) { + reject({ + code: "GetAuthContextAsyncMissing", + message: (typeof (Strings) !== 'undefined' && Strings.OfficeOM.L_ImplicitGetAuthContextMissing) ? Strings.OfficeOM.L_ImplicitGetAuthContextMissing : "" + }); + return; + } + Office.context.webAuth.getAuthContextAsync(function (result) { + if (result.status === "succeeded") { + retrievedAuthContext = true; + var authContext = result.value; + if (!authContext || authContext.isAnonymous) { + reject({ + code: "CannotGetAuthContext", + message: (typeof (Strings) !== 'undefined' && Strings.OfficeOM.L_ImplicitGetAuthContextMissing) ? Strings.OfficeOM.L_ImplicitGetAuthContextMissing : "" + }); + return; + } + var isMsa = authContext.authorityType.toLowerCase() === 'msa'; + OSF.WebAuth.config = { + authFlow: OfficeFirstPartyAuth.authFlow, + authVersion: (OfficeFirstPartyAuth.authVersion) ? OfficeFirstPartyAuth.authVersion : null, + msal: (OfficeFirstPartyAuth.authVersion === "flight") ? OfficeFirstPartyAuth.msal : null, + delayWebAuth: OfficeFirstPartyAuth.delay, + delayMsal: OfficeFirstPartyAuth.delayMsal, + debugging: OfficeFirstPartyAuth.debugging, + authority: (OfficeFirstPartyAuth.authorityOverride) ? OfficeFirstPartyAuth.authorityOverride : authContext.authority, + idp: authContext.authorityType.toLowerCase(), + appIds: [isMsa ? (authContext.msaAppId) ? authContext.msaAppId : authContext.appId : authContext.appId], + redirectUri: (replyUrl) ? replyUrl : null, + upn: authContext.upn, + telemetryInstance: 'otel', + autoPopup: OfficeFirstPartyAuth.autoPopup, + enableConsoleLogging: OfficeFirstPartyAuth.debugging + }; + OSF.WebAuth.load().then(function (loadResult) { + loaded = true; + logLoadEvent(loadResult, true); + resolve(); + })["catch"](function (loadError) { + logLoadEvent(loadError, false); + reject({ + code: "PackageNotLoaded", + message: loadError ? loadError : (typeof (Strings) !== 'undefined' && Strings.OfficeOM.L_ImplicitNotLoaded) ? Strings.OfficeOM.L_ImplicitNotLoaded : "" + }); + }); + var finalReplyUrl = (replyUrl) ? replyUrl : window.location.href.split("?")[0]; + var replyUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (replyUrls || replyUrls === "") { + replyUrls = finalReplyUrl; + } + else { + replyUrls += ", " + finalReplyUrl; + } + if (replyUrls) + sessionStorage.setItem(WebAuthReplyUrlsStorageKey, replyUrls); + } + else { + OSF.WebAuth.config = null; + errorMessage = JSON.stringify(result); + reject({ + code: "CannotGetAuthContext", + message: errorMessage + }); + } + }); + } + catch (e) { + errorMessage = e; + OSF.WebAuth.config = null; + OSF.WebAuth.load().then(function () { + resolve(); + })["catch"](function () { + reject({ + code: retrievedAuthContext ? "CannotGetAuthContext" : "FailedToLoad", + message: errorMessage + }); + }); + } + } + else { + resolve(); + } + }); + } + OfficeFirstPartyAuth.load = load; + function getAccessToken(options, behaviorOption) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == "web") { + Office.context.webAuth.getAuthContextAsync(function (result) { + var supportsAuthToken = false; + if (result.status === "succeeded") { + var authContext = result.value; + if (authContext.supportsAuthToken) { + supportsAuthToken = true; + } + } + if (!supportsAuthToken) { + if (OSF.WebAuth && loaded) { + if (OSF.WebAuth.config.appIds[0]) { + OSF.WebAuth.getToken(options.resource, OSF.WebAuth.config.appIds[0], OSF._OfficeAppFactory.getHostInfo().osfControlAppCorrelationId, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : null).then(function (result) { + logAcquireEvent(result, true, options.resource, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : null); + resolve({ + accessToken: result.Token, + tokenIdenityType: (OSF.WebAuth.config.idp.toLowerCase() == "msa") + ? OfficeCore.IdentityType.microsoftAccount + : OfficeCore.IdentityType.organizationAccount + }); + })["catch"](function (result) { + logAcquireEvent(result, false, options.resource, (behaviorOption && behaviorOption.popup) ? behaviorOption.popup : null, result.ErrorCode); + reject({ code: result.ErrorCode, message: result.ErrorMessage }); + }); + } + } + else { + logUnexpectedAcquireEvent(loaded, OSF.WebAuth.loadAttempts); + } + } + else { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result_1 = auth.getAccessToken(options, null); + context.sync().then(function () { + resolve(result_1.value); + }); + } + }); + } + else { + var context_1 = new OfficeCore.RequestContext(); + var auth_1 = OfficeCore.AuthenticationService.newObject(context_1); + var handler_1 = auth_1.onTokenReceived.add(function (arg) { + if (!OfficeExtension.CoreUtility.isNullOrUndefined(arg)) { + handler_1.remove(); + context_1.sync()["catch"](function () { + }); + if (arg.code == 0) { + resolve(arg.tokenValue); + } + else { + if (OfficeExtension.CoreUtility.isNullOrUndefined(arg.errorInfo)) { + reject({ code: arg.code }); + } + else { + try { + reject(JSON.parse(arg.errorInfo)); + } + catch (e) { + reject({ code: arg.code, message: arg.errorInfo }); + } + } + } + } + return null; + }); + context_1.sync() + .then(function () { + var apiResult = auth_1.getAccessToken(options, auth_1._targetId); + return context_1.sync() + .then(function () { + if (OfficeExtension.CoreUtility.isNullOrUndefined(apiResult.value)) { + return null; + } + var tokenValue = apiResult.value.accessToken; + if (!OfficeExtension.CoreUtility.isNullOrUndefined(tokenValue)) { + resolve(apiResult.value); + } + }); + })["catch"](function (e) { + reject(e); + }); + } + }); + } + OfficeFirstPartyAuth.getAccessToken = getAccessToken; + function getPrimaryIdentityInfo() { + var context = new OfficeCore.RequestContext(); + var auth = OfficeCore.AuthenticationService.newObject(context); + context._customData = "WacPartition"; + var result = auth.getPrimaryIdentityInfo(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getPrimaryIdentityInfo = getPrimaryIdentityInfo; + function getIdentities() { + var context = new OfficeCore.RequestContext(); + var auth_service = OfficeCore.AuthenticationService.newObject(context); + var result = auth_service.getIdentities(); + return context.sync().then(function () { return result.value; }); + } + OfficeFirstPartyAuth.getIdentities = getIdentities; + function logLoadEvent(result, succeeded) { + if (OfficeFirstPartyAuth.debugging) { + console.log("Logging WebAuthJs load event:" + succeeded); + } + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeBooleanDataField('Js', (typeof Implicit !== "undefined" || typeof BrowserAuth !== "undefined") ? true : false), + oteljs.makeBooleanDataField('Result', succeeded) + ]; + if (OSF.WebAuth.config.telemetry) { + for (var key in OSF.WebAuth.config.telemetry) { + telemetryData.push(oteljs.makeStringDataField(key, OSF.WebAuth.config.telemetry[key])); + } + } + if (result && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'loadedApplicationCount': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + case 'timeToLoad': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.Load", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logAcquireEvent(result, succeeded, target, popup, message) { + if (OfficeFirstPartyAuth.debugging) { + console.log("Logging WebAuthJs acquire event"); + } + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeStringDataField('IdentityProvider', OSF.WebAuth.config.idp), + oteljs.makeStringDataField('AppId', OSF.WebAuth.config.appIds[0]), + oteljs.makeStringDataField('Target', target), + oteljs.makeBooleanDataField('Popup', (typeof popup === "boolean") ? popup : false), + oteljs.makeBooleanDataField('Result', succeeded), + oteljs.makeStringDataField('Error', message) + ]; + if (OSF.WebAuth.config.telemetry) { + for (var key in OSF.WebAuth.config.telemetry) { + telemetryData.push(oteljs.makeStringDataField(key, OSF.WebAuth.config.telemetry[key])); + } + } + if (result && result.Telemetry) { + for (var key in result.Telemetry) { + if (!result.Telemetry[key]) { + continue; + } + switch (key) { + case 'succeeded': + telemetryData.push(oteljs.makeBooleanDataField(key, result.Telemetry[key])); + break; + case 'timeToGetToken': + telemetryData.push(oteljs.makeInt64DataField(key, result.Telemetry[key])); + break; + default: + telemetryData.push(oteljs.makeStringDataField(key, result.Telemetry[key])); + } + } + } + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.GetAccessToken", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function logUnexpectedAcquireEvent(loadResult, loadAttempts) { + if (OfficeFirstPartyAuth.debugging) { + console.log("Logging WebAuthJs unexpected acquire event"); + } + if (typeof OTel !== "undefined") { + OTel.OTelLogger.onTelemetryLoaded(function () { + var telemetryData = [ + oteljs.makeBooleanDataField('Loaded', loadResult), + oteljs.makeInt64DataField('LoadAttempts', loadAttempts) + ]; + OTel.OTelLogger.sendTelemetryEvent({ + eventName: "Office.Extensibility.OfficeJs.OfficeFirstPartyAuth.UnexpectedAcquire", + dataFields: telemetryData, + eventFlags: { + dataCategories: oteljs.DataCategories.ProductServiceUsage + } + }); + }); + } + } + function loadWebAuthForReplyPage() { + try { + if (typeof (window) === "undefined" || !window.sessionStorage) { + return; + } + var webAuthRedirectUrls = sessionStorage.getItem(WebAuthReplyUrlsStorageKey); + if (webAuthRedirectUrls !== null && webAuthRedirectUrls.indexOf(window.location.origin + window.location.pathname) !== -1) { + load(); + } + } + catch (ex) { + console.error(ex); + } + } + if (typeof (window) !== "undefined" && window.OSF) { + loadWebAuthForReplyPage(); + } +})(OfficeFirstPartyAuth || (OfficeFirstPartyAuth = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var IdentityType; + (function (IdentityType) { + IdentityType["organizationAccount"] = "OrganizationAccount"; + IdentityType["microsoftAccount"] = "MicrosoftAccount"; + IdentityType["unsupported"] = "Unsupported"; + })(IdentityType = OfficeCore.IdentityType || (OfficeCore.IdentityType = {})); + var _typeAuthenticationService = "AuthenticationService"; + var AuthenticationService = (function (_super) { + __extends(AuthenticationService, _super); + function AuthenticationService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AuthenticationService.prototype, "_className", { + get: function () { + return "AuthenticationService"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "_navigationPropertyNames", { + get: function () { + return ["roamingSettings"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AuthenticationService.prototype, "roamingSettings", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.RoamingSettingCollection, this, "RoamingSettings", false, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.getAccessToken = function (tokenParameters, targetId) { + return _invokeMethod(this, "GetAccessToken", 1, [tokenParameters, targetId], 4 | 1, 0); + }; + AuthenticationService.prototype.getIdentities = function () { + _throwIfApiNotSupported("AuthenticationService.getIdentities", "FirstPartyAuthentication", "1.3", _hostName); + return _invokeMethod(this, "GetIdentities", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype.getPrimaryIdentityInfo = function () { + _throwIfApiNotSupported("AuthenticationService.getPrimaryIdentityInfo", "FirstPartyAuthentication", "1.2", _hostName); + return _invokeMethod(this, "GetPrimaryIdentityInfo", 1, [], 4 | 1, 0); + }; + AuthenticationService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["roamingSettings", "RoamingSettings"]); + }; + AuthenticationService.prototype.load = function (options) { + return _load(this, options); + }; + AuthenticationService.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + AuthenticationService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AuthenticationService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AuthenticationService, context, "Microsoft.Authentication.AuthenticationService", false, 4); + }; + Object.defineProperty(AuthenticationService.prototype, "onTokenReceived", { + get: function () { + var _this = this; + _throwIfApiNotSupported("AuthenticationService.onTokenReceived", "FirstPartyAuthentication", "1.2", _hostName); + if (!this.m_tokenReceived) { + this.m_tokenReceived = new OfficeExtension.GenericEventHandlers(this.context, this, "TokenReceived", { + eventType: 3001, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return _this._targetId; }, + eventArgsTransformFunc: function (value) { + var event = _CC.AuthenticationService_TokenReceived_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_tokenReceived; + }, + enumerable: true, + configurable: true + }); + AuthenticationService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AuthenticationService; + }(OfficeExtension.ClientObject)); + OfficeCore.AuthenticationService = AuthenticationService; + var AuthenticationServiceCustom = (function () { + function AuthenticationServiceCustom() { + } + Object.defineProperty(AuthenticationServiceCustom.prototype, "_targetId", { + get: function () { + if (this.m_targetId == undefined) { + if (typeof (OSF) !== 'undefined' && OSF.OUtil) { + this.m_targetId = OSF.OUtil.Guid.generateNewGuid(); + } + else { + this.m_targetId = "" + this.context._nextId(); + } + } + return this.m_targetId; + }, + enumerable: true, + configurable: true + }); + return AuthenticationServiceCustom; + }()); + OfficeCore.AuthenticationServiceCustom = AuthenticationServiceCustom; + OfficeExtension.Utility.applyMixin(AuthenticationService, AuthenticationServiceCustom); + var _CC; + (function (_CC) { + function AuthenticationService_TokenReceived_EventArgsTransform(thisObj, args) { + var value = args; + var newArgs = { + tokenValue: value.tokenValue, + code: value.code, + errorInfo: value.errorInfo + }; + return newArgs; + } + _CC.AuthenticationService_TokenReceived_EventArgsTransform = AuthenticationService_TokenReceived_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeRoamingSetting = "RoamingSetting"; + var RoamingSetting = (function (_super) { + __extends(RoamingSetting, _super); + function RoamingSetting() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSetting.prototype, "_className", { + get: function () { + return "RoamingSetting"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRoamingSetting, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoamingSetting.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeRoamingSetting, this._isNull); + return this._V; + }, + set: function (value) { + this._V = value; + _invokeSetProperty(this, "Value", value, 0); + }, + enumerable: true, + configurable: true + }); + RoamingSetting.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["value"], [], []); + }; + RoamingSetting.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RoamingSetting.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + RoamingSetting.prototype.load = function (options) { + return _load(this, options); + }; + RoamingSetting.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RoamingSetting.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RoamingSetting.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSetting.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I, + "value": this._V + }, {}); + }; + RoamingSetting.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RoamingSetting.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RoamingSetting; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSetting = RoamingSetting; + var _typeRoamingSettingCollection = "RoamingSettingCollection"; + var RoamingSettingCollection = (function (_super) { + __extends(RoamingSettingCollection, _super); + function RoamingSettingCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoamingSettingCollection.prototype, "_className", { + get: function () { + return "RoamingSettingCollection"; + }, + enumerable: true, + configurable: true + }); + RoamingSettingCollection.prototype.getItem = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItem", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype.getItemOrNullObject = function (id) { + return _createMethodObject(OfficeCore.RoamingSetting, this, "GetItemOrNullObject", 1, [id], false, false, null, 4); + }; + RoamingSettingCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RoamingSettingCollection.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RoamingSettingCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RoamingSettingCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RoamingSettingCollection = RoamingSettingCollection; + var _typeBeforeDocumentCloseNotification = "BeforeDocumentCloseNotification"; + var BeforeDocumentCloseNotification = (function (_super) { + __extends(BeforeDocumentCloseNotification, _super); + function BeforeDocumentCloseNotification() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "_className", { + get: function () { + return "BeforeDocumentCloseNotification"; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.disable = function () { + _invokeMethod(this, "Disable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype.enable = function () { + _invokeMethod(this, "Enable", 1, [], 4, 0); + }; + BeforeDocumentCloseNotification.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + BeforeDocumentCloseNotification.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + BeforeDocumentCloseNotification.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.BeforeDocumentCloseNotification, context, "Microsoft.BeforeDocumentCloseNotification.BeforeDocumentCloseNotification", false, 4); + }; + Object.defineProperty(BeforeDocumentCloseNotification.prototype, "onBeforeCloseNotificationCancelled", { + get: function () { + if (!this.m_beforeCloseNotificationCancelled) { + this.m_beforeCloseNotificationCancelled = new OfficeExtension.GenericEventHandlers(this.context, this, "BeforeCloseNotificationCancelled", { + eventType: 65540, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_beforeCloseNotificationCancelled; + }, + enumerable: true, + configurable: true + }); + BeforeDocumentCloseNotification.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return BeforeDocumentCloseNotification; + }(OfficeExtension.ClientObject)); + OfficeCore.BeforeDocumentCloseNotification = BeforeDocumentCloseNotification; + var ServiceProvider; + (function (ServiceProvider) { + ServiceProvider["ariaBrowserPipeUrl"] = "AriaBrowserPipeUrl"; + ServiceProvider["ariaUploadUrl"] = "AriaUploadUrl"; + ServiceProvider["ariaVNextUploadUrl"] = "AriaVNextUploadUrl"; + ServiceProvider["lokiAutoDiscoverUrl"] = "LokiAutoDiscoverUrl"; + })(ServiceProvider = OfficeCore.ServiceProvider || (OfficeCore.ServiceProvider = {})); + var _typeServiceUrlProvider = "ServiceUrlProvider"; + var ServiceUrlProvider = (function (_super) { + __extends(ServiceUrlProvider, _super); + function ServiceUrlProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceUrlProvider.prototype, "_className", { + get: function () { + return "ServiceUrlProvider"; + }, + enumerable: true, + configurable: true + }); + ServiceUrlProvider.prototype.getServiceUrl = function (emailAddress, provider) { + return _invokeMethod(this, "GetServiceUrl", 1, [emailAddress, provider], 4, 0); + }; + ServiceUrlProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceUrlProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceUrlProvider.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceUrlProvider, context, "Microsoft.DesktopCompliance.ServiceUrlProvider", false, 4); + }; + ServiceUrlProvider.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceUrlProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceUrlProvider = ServiceUrlProvider; + var _typeLinkedIn = "LinkedIn"; + var LinkedIn = (function (_super) { + __extends(LinkedIn, _super); + function LinkedIn() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LinkedIn.prototype, "_className", { + get: function () { + return "LinkedIn"; + }, + enumerable: true, + configurable: true + }); + LinkedIn.prototype.isEnabledForOffice = function () { + return _invokeMethod(this, "IsEnabledForOffice", 1, [], 4, 0); + }; + LinkedIn.prototype.recordLinkedInSettingsCompliance = function (featureName, isEnabled) { + _invokeMethod(this, "RecordLinkedInSettingsCompliance", 0, [featureName, isEnabled], 0, 0); + }; + LinkedIn.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LinkedIn.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LinkedIn.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LinkedIn, context, "Microsoft.DesktopCompliance.LinkedIn", false, 4); + }; + LinkedIn.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LinkedIn; + }(OfficeExtension.ClientObject)); + OfficeCore.LinkedIn = LinkedIn; + var _typeNetworkUsage = "NetworkUsage"; + var NetworkUsage = (function (_super) { + __extends(NetworkUsage, _super); + function NetworkUsage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(NetworkUsage.prototype, "_className", { + get: function () { + return "NetworkUsage"; + }, + enumerable: true, + configurable: true + }); + NetworkUsage.prototype.isInDisconnectedMode = function () { + return _invokeMethod(this, "IsInDisconnectedMode", 1, [], 4, 0); + }; + NetworkUsage.prototype.isInOnlineMode = function () { + return _invokeMethod(this, "IsInOnlineMode", 1, [], 4, 0); + }; + NetworkUsage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + NetworkUsage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + NetworkUsage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.NetworkUsage, context, "Microsoft.DesktopCompliance.NetworkUsage", false, 4); + }; + NetworkUsage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return NetworkUsage; + }(OfficeExtension.ClientObject)); + OfficeCore.NetworkUsage = NetworkUsage; + var _typeDynamicRibbon = "DynamicRibbon"; + var DynamicRibbon = (function (_super) { + __extends(DynamicRibbon, _super); + function DynamicRibbon() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DynamicRibbon.prototype, "_className", { + get: function () { + return "DynamicRibbon"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "_navigationPropertyNames", { + get: function () { + return ["buttons"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DynamicRibbon.prototype, "buttons", { + get: function () { + if (!this._B) { + this._B = _createPropertyObject(OfficeCore.RibbonButtonCollection, this, "Buttons", true, 4); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + DynamicRibbon.prototype.executeRequestCreate = function (jsonCreate) { + _throwIfApiNotSupported("DynamicRibbon.executeRequestCreate", "DynamicRibbon", "1.2", _hostName); + _invokeMethod(this, "ExecuteRequestCreate", 1, [jsonCreate], 4, 0); + }; + DynamicRibbon.prototype.executeRequestUpdate = function (jsonUpdate) { + _invokeMethod(this, "ExecuteRequestUpdate", 1, [jsonUpdate], 4, 0); + }; + DynamicRibbon.prototype.getButton = function (id) { + return _createMethodObject(OfficeCore.RibbonButton, this, "GetButton", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype.getTab = function (id) { + return _createMethodObject(OfficeCore.RibbonTab, this, "GetTab", 1, [id], false, false, null, 4); + }; + DynamicRibbon.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["buttons", "Buttons"]); + }; + DynamicRibbon.prototype.load = function (options) { + return _load(this, options); + }; + DynamicRibbon.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + DynamicRibbon.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DynamicRibbon.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DynamicRibbon, context, "Microsoft.DynamicRibbon.DynamicRibbon", false, 4); + }; + DynamicRibbon.prototype.toJSON = function () { + return _toJson(this, {}, { + "buttons": this._B + }); + }; + return DynamicRibbon; + }(OfficeExtension.ClientObject)); + OfficeCore.DynamicRibbon = DynamicRibbon; + var _typeRibbonTab = "RibbonTab"; + var RibbonTab = (function (_super) { + __extends(RibbonTab, _super); + function RibbonTab() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonTab.prototype, "_className", { + get: function () { + return "RibbonTab"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonTab.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonTab, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + RibbonTab.prototype.setVisibility = function (visibility) { + _invokeMethod(this, "SetVisibility", 0, [visibility], 0, 0); + }; + RibbonTab.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + RibbonTab.prototype.load = function (options) { + return _load(this, options); + }; + RibbonTab.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonTab.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonTab.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonTab.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + RibbonTab.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonTab.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonTab; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonTab = RibbonTab; + var _typeRibbonButton = "RibbonButton"; + var RibbonButton = (function (_super) { + __extends(RibbonButton, _super); + function RibbonButton() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButton.prototype, "_className", { + get: function () { + return "RibbonButton"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "enabled", "label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Enabled", "Label"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "enabled", { + get: function () { + _throwIfNotLoaded("enabled", this._E, _typeRibbonButton, this._isNull); + return this._E; + }, + set: function (value) { + this._E = value; + _invokeSetProperty(this, "Enabled", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeRibbonButton, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButton.prototype, "label", { + get: function () { + _throwIfNotLoaded("label", this._L, _typeRibbonButton, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + RibbonButton.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["enabled"], [], []); + }; + RibbonButton.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + RibbonButton.prototype.setEnabled = function (enabled) { + _invokeMethod(this, "SetEnabled", 0, [enabled], 0, 0); + }; + RibbonButton.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Enabled"])) { + this._E = obj["Enabled"]; + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Label"])) { + this._L = obj["Label"]; + } + }; + RibbonButton.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButton.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButton.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + RibbonButton.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RibbonButton.prototype.toJSON = function () { + return _toJson(this, { + "enabled": this._E, + "id": this._I, + "label": this._L + }, {}); + }; + RibbonButton.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + RibbonButton.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return RibbonButton; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButton = RibbonButton; + var _typeRibbonButtonCollection = "RibbonButtonCollection"; + var RibbonButtonCollection = (function (_super) { + __extends(RibbonButtonCollection, _super); + function RibbonButtonCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RibbonButtonCollection.prototype, "_className", { + get: function () { + return "RibbonButtonCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RibbonButtonCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeRibbonButtonCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + RibbonButtonCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + RibbonButtonCollection.prototype.getItem = function (key) { + return _createIndexerObject(OfficeCore.RibbonButton, this, [key]); + }; + RibbonButtonCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.RibbonButton, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + RibbonButtonCollection.prototype.load = function (options) { + return _load(this, options); + }; + RibbonButtonCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + RibbonButtonCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }); + }; + RibbonButtonCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + RibbonButtonCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.RibbonButton, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return RibbonButtonCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.RibbonButtonCollection = RibbonButtonCollection; + var _typeFirstPartyDialogService = "FirstPartyDialogService"; + var FirstPartyDialogService = (function (_super) { + __extends(FirstPartyDialogService, _super); + function FirstPartyDialogService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FirstPartyDialogService.prototype, "_className", { + get: function () { + return "FirstPartyDialogService"; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4 | 1, 0); + }; + FirstPartyDialogService.prototype.displayDialog = function (url, options) { + _invokeMethod(this, "DisplayDialog", 1, [url, options], 4 | 1, 0); + }; + FirstPartyDialogService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + FirstPartyDialogService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + FirstPartyDialogService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.FirstPartyDialogService, context, "Microsoft.FirstPartyDialog.FirstPartyDialogService", false, 4); + }; + Object.defineProperty(FirstPartyDialogService.prototype, "onDialogMessage", { + get: function () { + var _this = this; + if (!this.m_dialogMessage) { + this.m_dialogMessage = new OfficeExtension.GenericEventHandlers(this.context, this, "DialogMessage", { + eventType: 65536, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_dialogMessage; + }, + enumerable: true, + configurable: true + }); + FirstPartyDialogService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return FirstPartyDialogService; + }(OfficeExtension.ClientObject)); + OfficeCore.FirstPartyDialogService = FirstPartyDialogService; + (function (_CC) { + function FirstPartyDialogService_DialogMessage_EventArgsTransform(thisObj, args) { + return { + message: args.message + }; + } + _CC.FirstPartyDialogService_DialogMessage_EventArgsTransform = FirstPartyDialogService_DialogMessage_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var TimeStringFormat; + (function (TimeStringFormat) { + TimeStringFormat["shortTime"] = "ShortTime"; + TimeStringFormat["longTime"] = "LongTime"; + TimeStringFormat["shortDate"] = "ShortDate"; + TimeStringFormat["longDate"] = "LongDate"; + })(TimeStringFormat = OfficeCore.TimeStringFormat || (OfficeCore.TimeStringFormat = {})); + var _typeLocaleApi = "LocaleApi"; + var LocaleApi = (function (_super) { + __extends(LocaleApi, _super); + function LocaleApi() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LocaleApi.prototype, "_className", { + get: function () { + return "LocaleApi"; + }, + enumerable: true, + configurable: true + }); + LocaleApi.prototype.formatDateTimeString = function (localeName, value, format) { + return _invokeMethod(this, "FormatDateTimeString", 1, [localeName, value, format], 4, 0); + }; + LocaleApi.prototype.getLocaleDateTimeFormattingInfo = function (localeName) { + return _invokeMethod(this, "GetLocaleDateTimeFormattingInfo", 1, [localeName], 4, 0); + }; + LocaleApi.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LocaleApi.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LocaleApi.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LocaleApi, context, "Microsoft.LocaleApi.LocaleApi", false, 4); + }; + LocaleApi.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LocaleApi; + }(OfficeExtension.ClientObject)); + OfficeCore.LocaleApi = LocaleApi; + var _typeComment = "Comment"; + var Comment = (function (_super) { + __extends(Comment, _super); + function Comment() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Comment.prototype, "_className", { + get: function () { + return "Comment"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "text", "created", "level", "resolved", "author", "mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id", "Text", "Created", "Level", "Resolved", "Author", "Mentions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, false, false, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_navigationPropertyNames", { + get: function () { + return ["parent", "parentOrNullObject", "replies"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parent", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.Comment, this, "Parent", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "parentOrNullObject", { + get: function () { + if (!this._Pa) { + this._Pa = _createPropertyObject(OfficeCore.Comment, this, "ParentOrNullObject", false, 4); + } + return this._Pa; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "replies", { + get: function () { + if (!this._R) { + this._R = _createPropertyObject(OfficeCore.CommentCollection, this, "Replies", true, 4); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "author", { + get: function () { + _throwIfNotLoaded("author", this._A, _typeComment, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "created", { + get: function () { + _throwIfNotLoaded("created", this._C, _typeComment, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeComment, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "level", { + get: function () { + _throwIfNotLoaded("level", this._L, _typeComment, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "mentions", { + get: function () { + _throwIfNotLoaded("mentions", this._M, _typeComment, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "resolved", { + get: function () { + _throwIfNotLoaded("resolved", this._Re, _typeComment, this._isNull); + return this._Re; + }, + set: function (value) { + this._Re = value; + _invokeSetProperty(this, "Resolved", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeComment, this._isNull); + return this._T; + }, + set: function (value) { + this._T = value; + _invokeSetProperty(this, "Text", value, 0); + }, + enumerable: true, + configurable: true + }); + Comment.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["text", "resolved"], [], [ + "parent", + "parentOrNullObject", + "replies" + ]); + }; + Comment.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Comment.prototype["delete"] = function () { + _invokeMethod(this, "Delete", 0, [], 0, 0); + }; + Comment.prototype.getParentOrSelf = function () { + return _createMethodObject(OfficeCore.Comment, this, "GetParentOrSelf", 1, [], false, false, null, 4); + }; + Comment.prototype.getRichText = function (format) { + return _invokeMethod(this, "GetRichText", 1, [format], 4, 0); + }; + Comment.prototype.reply = function (text, format) { + return _createMethodObject(OfficeCore.Comment, this, "Reply", 0, [text, format], false, false, null, 0); + }; + Comment.prototype.setRichText = function (text, format) { + return _invokeMethod(this, "SetRichText", 0, [text, format], 0, 0); + }; + Comment.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Author"])) { + this._A = obj["Author"]; + } + if (!_isUndefined(obj["Created"])) { + this._C = _adjustToDateTime(obj["Created"]); + } + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["Level"])) { + this._L = obj["Level"]; + } + if (!_isUndefined(obj["Mentions"])) { + this._M = obj["Mentions"]; + } + if (!_isUndefined(obj["Resolved"])) { + this._Re = obj["Resolved"]; + } + if (!_isUndefined(obj["Text"])) { + this._T = obj["Text"]; + } + _handleNavigationPropertyResults(this, obj, ["parent", "Parent", "parentOrNullObject", "ParentOrNullObject", "replies", "Replies"]); + }; + Comment.prototype.load = function (options) { + return _load(this, options); + }; + Comment.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Comment.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + Comment.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Created"])) { + obj["created"] = _adjustToDateTime(obj["created"]); + } + _processRetrieveResult(this, value, result); + }; + Comment.prototype.toJSON = function () { + return _toJson(this, { + "author": this._A, + "created": this._C, + "id": this._I, + "level": this._L, + "mentions": this._M, + "resolved": this._Re, + "text": this._T + }, { + "replies": this._R + }); + }; + Comment.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Comment.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Comment; + }(OfficeExtension.ClientObject)); + OfficeCore.Comment = Comment; + var _typeCommentCollection = "CommentCollection"; + var CommentCollection = (function (_super) { + __extends(CommentCollection, _super); + function CommentCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CommentCollection.prototype, "_className", { + get: function () { + return "CommentCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeCommentCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + CommentCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + CommentCollection.prototype.getItem = function (id) { + return _createIndexerObject(OfficeCore.Comment, this, [id]); + }; + CommentCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Comment, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + CommentCollection.prototype.load = function (options) { + return _load(this, options); + }; + CommentCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + CommentCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }); + }; + CommentCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + CommentCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Comment, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return CommentCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.CommentCollection = CommentCollection; + var _typeExtensionLifeCycle = "ExtensionLifeCycle"; + var ExtensionLifeCycle = (function (_super) { + __extends(ExtensionLifeCycle, _super); + function ExtensionLifeCycle() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ExtensionLifeCycle.prototype, "_className", { + get: function () { + return "ExtensionLifeCycle"; + }, + enumerable: true, + configurable: true + }); + ExtensionLifeCycle.prototype.launchExtensionComponent = function (componentId, componentType, launchProperties) { + _invokeMethod(this, "LaunchExtensionComponent", 1, [componentId, componentType, launchProperties], 4 | 1, 0); + }; + ExtensionLifeCycle.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ExtensionLifeCycle.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ExtensionLifeCycle.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ExtensionLifeCycle, context, "Microsoft.OfficeSharedApi.ExtensionLifeCycle", false, 4); + }; + ExtensionLifeCycle.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ExtensionLifeCycle; + }(OfficeExtension.ClientObject)); + OfficeCore.ExtensionLifeCycle = ExtensionLifeCycle; + var CommentTextFormat; + (function (CommentTextFormat) { + CommentTextFormat["plain"] = "Plain"; + CommentTextFormat["markdown"] = "Markdown"; + CommentTextFormat["delta"] = "Delta"; + })(CommentTextFormat = OfficeCore.CommentTextFormat || (OfficeCore.CommentTextFormat = {})); + var PersonaCardPerfPoint; + (function (PersonaCardPerfPoint) { + PersonaCardPerfPoint["placeHolderRendered"] = "PlaceHolderRendered"; + PersonaCardPerfPoint["initialCardRendered"] = "InitialCardRendered"; + })(PersonaCardPerfPoint = OfficeCore.PersonaCardPerfPoint || (OfficeCore.PersonaCardPerfPoint = {})); + var UnifiedCommunicationAvailability; + (function (UnifiedCommunicationAvailability) { + UnifiedCommunicationAvailability["notSet"] = "NotSet"; + UnifiedCommunicationAvailability["free"] = "Free"; + UnifiedCommunicationAvailability["idle"] = "Idle"; + UnifiedCommunicationAvailability["busy"] = "Busy"; + UnifiedCommunicationAvailability["idleBusy"] = "IdleBusy"; + UnifiedCommunicationAvailability["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationAvailability["unalertable"] = "Unalertable"; + UnifiedCommunicationAvailability["unavailable"] = "Unavailable"; + })(UnifiedCommunicationAvailability = OfficeCore.UnifiedCommunicationAvailability || (OfficeCore.UnifiedCommunicationAvailability = {})); + var UnifiedCommunicationStatus; + (function (UnifiedCommunicationStatus) { + UnifiedCommunicationStatus["online"] = "Online"; + UnifiedCommunicationStatus["notOnline"] = "NotOnline"; + UnifiedCommunicationStatus["away"] = "Away"; + UnifiedCommunicationStatus["busy"] = "Busy"; + UnifiedCommunicationStatus["beRightBack"] = "BeRightBack"; + UnifiedCommunicationStatus["onThePhone"] = "OnThePhone"; + UnifiedCommunicationStatus["outToLunch"] = "OutToLunch"; + UnifiedCommunicationStatus["inAMeeting"] = "InAMeeting"; + UnifiedCommunicationStatus["outOfOffice"] = "OutOfOffice"; + UnifiedCommunicationStatus["doNotDisturb"] = "DoNotDisturb"; + UnifiedCommunicationStatus["inAConference"] = "InAConference"; + UnifiedCommunicationStatus["getting"] = "Getting"; + UnifiedCommunicationStatus["notABuddy"] = "NotABuddy"; + UnifiedCommunicationStatus["disconnected"] = "Disconnected"; + UnifiedCommunicationStatus["notInstalled"] = "NotInstalled"; + UnifiedCommunicationStatus["urgentInterruptionsOnly"] = "UrgentInterruptionsOnly"; + UnifiedCommunicationStatus["mayBeAvailable"] = "MayBeAvailable"; + UnifiedCommunicationStatus["idle"] = "Idle"; + UnifiedCommunicationStatus["inPresentation"] = "InPresentation"; + })(UnifiedCommunicationStatus = OfficeCore.UnifiedCommunicationStatus || (OfficeCore.UnifiedCommunicationStatus = {})); + var UnifiedCommunicationPresence; + (function (UnifiedCommunicationPresence) { + UnifiedCommunicationPresence["free"] = "Free"; + UnifiedCommunicationPresence["busy"] = "Busy"; + UnifiedCommunicationPresence["idle"] = "Idle"; + UnifiedCommunicationPresence["doNotDistrub"] = "DoNotDistrub"; + UnifiedCommunicationPresence["blocked"] = "Blocked"; + UnifiedCommunicationPresence["notSet"] = "NotSet"; + UnifiedCommunicationPresence["outOfOffice"] = "OutOfOffice"; + })(UnifiedCommunicationPresence = OfficeCore.UnifiedCommunicationPresence || (OfficeCore.UnifiedCommunicationPresence = {})); + var FreeBusyCalendarState; + (function (FreeBusyCalendarState) { + FreeBusyCalendarState["unknown"] = "Unknown"; + FreeBusyCalendarState["free"] = "Free"; + FreeBusyCalendarState["busy"] = "Busy"; + FreeBusyCalendarState["elsewhere"] = "Elsewhere"; + FreeBusyCalendarState["tentative"] = "Tentative"; + FreeBusyCalendarState["outOfOffice"] = "OutOfOffice"; + })(FreeBusyCalendarState = OfficeCore.FreeBusyCalendarState || (OfficeCore.FreeBusyCalendarState = {})); + var PersonaType; + (function (PersonaType) { + PersonaType["unknown"] = "Unknown"; + PersonaType["enterprise"] = "Enterprise"; + PersonaType["contact"] = "Contact"; + PersonaType["bot"] = "Bot"; + PersonaType["phoneOnly"] = "PhoneOnly"; + PersonaType["oneOff"] = "OneOff"; + PersonaType["distributionList"] = "DistributionList"; + PersonaType["personalDistributionList"] = "PersonalDistributionList"; + PersonaType["anonymous"] = "Anonymous"; + PersonaType["unifiedGroup"] = "UnifiedGroup"; + })(PersonaType = OfficeCore.PersonaType || (OfficeCore.PersonaType = {})); + var PhoneType; + (function (PhoneType) { + PhoneType["workPhone"] = "WorkPhone"; + PhoneType["homePhone"] = "HomePhone"; + PhoneType["mobilePhone"] = "MobilePhone"; + PhoneType["businessFax"] = "BusinessFax"; + PhoneType["otherPhone"] = "OtherPhone"; + })(PhoneType = OfficeCore.PhoneType || (OfficeCore.PhoneType = {})); + var AddressType; + (function (AddressType) { + AddressType["workAddress"] = "WorkAddress"; + AddressType["homeAddress"] = "HomeAddress"; + AddressType["otherAddress"] = "OtherAddress"; + })(AddressType = OfficeCore.AddressType || (OfficeCore.AddressType = {})); + var MemberType; + (function (MemberType) { + MemberType["unknown"] = "Unknown"; + MemberType["individual"] = "Individual"; + MemberType["group"] = "Group"; + })(MemberType = OfficeCore.MemberType || (OfficeCore.MemberType = {})); + var _typeMemberInfoList = "MemberInfoList"; + var MemberInfoList = (function (_super) { + __extends(MemberInfoList, _super); + function MemberInfoList() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MemberInfoList.prototype, "_className", { + get: function () { + return "MemberInfoList"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typeMemberInfoList, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MemberInfoList.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typeMemberInfoList, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + MemberInfoList.prototype.getPersonaForMember = function (memberCookie) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForMember", 1, [memberCookie], false, false, null, 4); + }; + MemberInfoList.prototype.items = function () { + return _invokeMethod(this, "Items", 1, [], 4, 0); + }; + MemberInfoList.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + }; + MemberInfoList.prototype.load = function (options) { + return _load(this, options); + }; + MemberInfoList.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MemberInfoList.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MemberInfoList.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + MemberInfoList.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MemberInfoList.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MemberInfoList; + }(OfficeExtension.ClientObject)); + OfficeCore.MemberInfoList = MemberInfoList; + var PersonaDataUpdated; + (function (PersonaDataUpdated) { + PersonaDataUpdated["hostId"] = "HostId"; + PersonaDataUpdated["type"] = "Type"; + PersonaDataUpdated["photo"] = "Photo"; + PersonaDataUpdated["personaInfo"] = "PersonaInfo"; + PersonaDataUpdated["unifiedCommunicationInfo"] = "UnifiedCommunicationInfo"; + PersonaDataUpdated["organization"] = "Organization"; + PersonaDataUpdated["unifiedGroupInfo"] = "UnifiedGroupInfo"; + PersonaDataUpdated["members"] = "Members"; + PersonaDataUpdated["membership"] = "Membership"; + PersonaDataUpdated["capabilities"] = "Capabilities"; + PersonaDataUpdated["customizations"] = "Customizations"; + PersonaDataUpdated["viewableSources"] = "ViewableSources"; + PersonaDataUpdated["placeholder"] = "Placeholder"; + })(PersonaDataUpdated = OfficeCore.PersonaDataUpdated || (OfficeCore.PersonaDataUpdated = {})); + var _typePersonaActions = "PersonaActions"; + var PersonaActions = (function (_super) { + __extends(PersonaActions, _super); + function PersonaActions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaActions.prototype, "_className", { + get: function () { + return "PersonaActions"; + }, + enumerable: true, + configurable: true + }); + PersonaActions.prototype.addContact = function () { + _invokeMethod(this, "AddContact", 0, [], 0, 0); + }; + PersonaActions.prototype.callPhoneNumber = function (contactNumber) { + _invokeMethod(this, "CallPhoneNumber", 0, [contactNumber], 0, 0); + }; + PersonaActions.prototype.composeEmail = function (emailAddress) { + _invokeMethod(this, "ComposeEmail", 0, [emailAddress], 0, 0); + }; + PersonaActions.prototype.composeInstantMessage = function (sipAddress) { + _invokeMethod(this, "ComposeInstantMessage", 0, [sipAddress], 0, 0); + }; + PersonaActions.prototype.editContact = function () { + _invokeMethod(this, "EditContact", 0, [], 0, 0); + }; + PersonaActions.prototype.editContactByIdentifier = function (identifier) { + _invokeMethod(this, "EditContactByIdentifier", 0, [identifier], 0, 0); + }; + PersonaActions.prototype.editUnifiedGroup = function () { + _invokeMethod(this, "EditUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.getChangePhotoUrlAndOpenInBrowser = function () { + _invokeMethod(this, "GetChangePhotoUrlAndOpenInBrowser", 0, [], 0, 0); + }; + PersonaActions.prototype.hideHoverCardForPersona = function () { + _invokeMethod(this, "HideHoverCardForPersona", 0, [], 0, 0); + }; + PersonaActions.prototype.joinUnifiedGroup = function () { + _invokeMethod(this, "JoinUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.leaveUnifiedGroup = function () { + _invokeMethod(this, "LeaveUnifiedGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.openGroupCalendar = function () { + _invokeMethod(this, "OpenGroupCalendar", 0, [], 0, 0); + }; + PersonaActions.prototype.openLinkContactUx = function () { + _invokeMethod(this, "OpenLinkContactUx", 0, [], 0, 0); + }; + PersonaActions.prototype.openOutlookProperties = function () { + _invokeMethod(this, "OpenOutlookProperties", 0, [], 0, 0); + }; + PersonaActions.prototype.pinPersonaToQuickContacts = function () { + _invokeMethod(this, "PinPersonaToQuickContacts", 0, [], 0, 0); + }; + PersonaActions.prototype.scheduleMeeting = function () { + _invokeMethod(this, "ScheduleMeeting", 0, [], 0, 0); + }; + PersonaActions.prototype.showContactCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContactCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showContextMenu = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowContextMenu", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showExpandedCard = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowExpandedCard", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.showHoverCardForPersona = function (pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight) { + _invokeMethod(this, "ShowHoverCardForPersona", 0, [pointToShowX, pointToShowY, personaRectTop, personaRectLeft, personaRectWidth, personaRectHeight], 0, 0); + }; + PersonaActions.prototype.startAudioCall = function () { + _invokeMethod(this, "StartAudioCall", 0, [], 0, 0); + }; + PersonaActions.prototype.startVideoCall = function () { + _invokeMethod(this, "StartVideoCall", 0, [], 0, 0); + }; + PersonaActions.prototype.subscribeToGroup = function () { + _invokeMethod(this, "SubscribeToGroup", 0, [], 0, 0); + }; + PersonaActions.prototype.toggleTagForAlerts = function () { + _invokeMethod(this, "ToggleTagForAlerts", 0, [], 0, 0); + }; + PersonaActions.prototype.unsubscribeFromGroup = function () { + _invokeMethod(this, "UnsubscribeFromGroup", 0, [], 0, 0); + }; + PersonaActions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaActions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaActions.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaActions; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaActions = PersonaActions; + var _typePersonaInfoSource = "PersonaInfoSource"; + var PersonaInfoSource = (function (_super) { + __extends(PersonaInfoSource, _super); + function PersonaInfoSource() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfoSource.prototype, "_className", { + get: function () { + return "PersonaInfoSource"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "phones", "addresses", "webSites", "notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "Phones", "Addresses", "WebSites", "Notes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "addresses", { + get: function () { + _throwIfNotLoaded("addresses", this._A, _typePersonaInfoSource, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfoSource, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfoSource, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfoSource, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfoSource, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfoSource, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfoSource, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfoSource, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfoSource, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfoSource, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfoSource, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfoSource, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfoSource, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfoSource, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "phones", { + get: function () { + _throwIfNotLoaded("phones", this._P, _typePersonaInfoSource, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfoSource, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfoSource, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfoSource.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfoSource, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfoSource.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Addresses"])) { + this._A = obj["Addresses"]; + } + if (!_isUndefined(obj["Birthday"])) { + this._B = obj["Birthday"]; + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = obj["Birthdays"]; + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["Phones"])) { + this._P = obj["Phones"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + }; + PersonaInfoSource.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfoSource.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfoSource.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaInfoSource.prototype.toJSON = function () { + return _toJson(this, { + "addresses": this._A, + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "phones": this._P, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, {}); + }; + PersonaInfoSource.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfoSource.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfoSource; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfoSource = PersonaInfoSource; + var _typePersonaInfo = "PersonaInfo"; + var PersonaInfo = (function (_super) { + __extends(PersonaInfo, _super); + function PersonaInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaInfo.prototype, "_className", { + get: function () { + return "PersonaInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["displayName", "email", "emailAddresses", "sipAddresses", "birthday", "birthdays", "title", "jobInfoDepartment", "companyName", "office", "linkedTitles", "linkedDepartments", "linkedCompanyNames", "linkedOffices", "webSites", "notes", "isPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisplayName", "Email", "EmailAddresses", "SipAddresses", "Birthday", "Birthdays", "Title", "JobInfoDepartment", "CompanyName", "Office", "LinkedTitles", "LinkedDepartments", "LinkedCompanyNames", "LinkedOffices", "WebSites", "Notes", "IsPersonResolved"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["sources"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sources", { + get: function () { + if (!this._So) { + this._So = _createPropertyObject(OfficeCore.PersonaInfoSource, this, "Sources", false, 4); + } + return this._So; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthday", { + get: function () { + _throwIfNotLoaded("birthday", this._B, _typePersonaInfo, this._isNull); + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "birthdays", { + get: function () { + _throwIfNotLoaded("birthdays", this._Bi, _typePersonaInfo, this._isNull); + return this._Bi; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "companyName", { + get: function () { + _throwIfNotLoaded("companyName", this._C, _typePersonaInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "displayName", { + get: function () { + _throwIfNotLoaded("displayName", this._D, _typePersonaInfo, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "email", { + get: function () { + _throwIfNotLoaded("email", this._E, _typePersonaInfo, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "emailAddresses", { + get: function () { + _throwIfNotLoaded("emailAddresses", this._Em, _typePersonaInfo, this._isNull); + return this._Em; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "isPersonResolved", { + get: function () { + _throwIfNotLoaded("isPersonResolved", this._I, _typePersonaInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "jobInfoDepartment", { + get: function () { + _throwIfNotLoaded("jobInfoDepartment", this._J, _typePersonaInfo, this._isNull); + return this._J; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedCompanyNames", { + get: function () { + _throwIfNotLoaded("linkedCompanyNames", this._L, _typePersonaInfo, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedDepartments", { + get: function () { + _throwIfNotLoaded("linkedDepartments", this._Li, _typePersonaInfo, this._isNull); + return this._Li; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedOffices", { + get: function () { + _throwIfNotLoaded("linkedOffices", this._Lin, _typePersonaInfo, this._isNull); + return this._Lin; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "linkedTitles", { + get: function () { + _throwIfNotLoaded("linkedTitles", this._Link, _typePersonaInfo, this._isNull); + return this._Link; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "notes", { + get: function () { + _throwIfNotLoaded("notes", this._N, _typePersonaInfo, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "office", { + get: function () { + _throwIfNotLoaded("office", this._O, _typePersonaInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "sipAddresses", { + get: function () { + _throwIfNotLoaded("sipAddresses", this._S, _typePersonaInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "title", { + get: function () { + _throwIfNotLoaded("title", this._T, _typePersonaInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaInfo.prototype, "webSites", { + get: function () { + _throwIfNotLoaded("webSites", this._W, _typePersonaInfo, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + PersonaInfo.prototype.getAddresses = function () { + return _invokeMethod(this, "GetAddresses", 1, [], 4, 0); + }; + PersonaInfo.prototype.getPhones = function () { + return _invokeMethod(this, "GetPhones", 1, [], 4, 0); + }; + PersonaInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Birthday"])) { + this._B = _adjustToDateTime(obj["Birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + this._Bi = _adjustToDateTime(obj["Birthdays"]); + } + if (!_isUndefined(obj["CompanyName"])) { + this._C = obj["CompanyName"]; + } + if (!_isUndefined(obj["DisplayName"])) { + this._D = obj["DisplayName"]; + } + if (!_isUndefined(obj["Email"])) { + this._E = obj["Email"]; + } + if (!_isUndefined(obj["EmailAddresses"])) { + this._Em = obj["EmailAddresses"]; + } + if (!_isUndefined(obj["IsPersonResolved"])) { + this._I = obj["IsPersonResolved"]; + } + if (!_isUndefined(obj["JobInfoDepartment"])) { + this._J = obj["JobInfoDepartment"]; + } + if (!_isUndefined(obj["LinkedCompanyNames"])) { + this._L = obj["LinkedCompanyNames"]; + } + if (!_isUndefined(obj["LinkedDepartments"])) { + this._Li = obj["LinkedDepartments"]; + } + if (!_isUndefined(obj["LinkedOffices"])) { + this._Lin = obj["LinkedOffices"]; + } + if (!_isUndefined(obj["LinkedTitles"])) { + this._Link = obj["LinkedTitles"]; + } + if (!_isUndefined(obj["Notes"])) { + this._N = obj["Notes"]; + } + if (!_isUndefined(obj["Office"])) { + this._O = obj["Office"]; + } + if (!_isUndefined(obj["SipAddresses"])) { + this._S = obj["SipAddresses"]; + } + if (!_isUndefined(obj["Title"])) { + this._T = obj["Title"]; + } + if (!_isUndefined(obj["WebSites"])) { + this._W = obj["WebSites"]; + } + _handleNavigationPropertyResults(this, obj, ["sources", "Sources"]); + }; + PersonaInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["Birthday"])) { + obj["birthday"] = _adjustToDateTime(obj["birthday"]); + } + if (!_isUndefined(obj["Birthdays"])) { + obj["birthdays"] = _adjustToDateTime(obj["birthdays"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaInfo.prototype.toJSON = function () { + return _toJson(this, { + "birthday": this._B, + "birthdays": this._Bi, + "companyName": this._C, + "displayName": this._D, + "email": this._E, + "emailAddresses": this._Em, + "isPersonResolved": this._I, + "jobInfoDepartment": this._J, + "linkedCompanyNames": this._L, + "linkedDepartments": this._Li, + "linkedOffices": this._Lin, + "linkedTitles": this._Link, + "notes": this._N, + "office": this._O, + "sipAddresses": this._S, + "title": this._T, + "webSites": this._W + }, { + "sources": this._So + }); + }; + PersonaInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaInfo = PersonaInfo; + var _typePersonaUnifiedCommunicationInfo = "PersonaUnifiedCommunicationInfo"; + var PersonaUnifiedCommunicationInfo = (function (_super) { + __extends(PersonaUnifiedCommunicationInfo, _super); + function PersonaUnifiedCommunicationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_className", { + get: function () { + return "PersonaUnifiedCommunicationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["availability", "status", "isSelf", "isTagged", "customStatusString", "isBlocked", "presenceTooltip", "isOutOfOffice", "outOfOfficeNote", "timezone", "meetingLocation", "meetingSubject", "timezoneBias", "idleStartTime", "overallCapability", "isOnBuddyList", "presenceNote", "voiceMailUri", "availabilityText", "availabilityTooltip", "isDurationInAvailabilityText", "freeBusyStatus", "calendarState", "presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Availability", "Status", "IsSelf", "IsTagged", "CustomStatusString", "IsBlocked", "PresenceTooltip", "IsOutOfOffice", "OutOfOfficeNote", "Timezone", "MeetingLocation", "MeetingSubject", "TimezoneBias", "IdleStartTime", "OverallCapability", "IsOnBuddyList", "PresenceNote", "VoiceMailUri", "AvailabilityText", "AvailabilityTooltip", "IsDurationInAvailabilityText", "FreeBusyStatus", "CalendarState", "Presence"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availability", { + get: function () { + _throwIfNotLoaded("availability", this._A, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityText", { + get: function () { + _throwIfNotLoaded("availabilityText", this._Av, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Av; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "availabilityTooltip", { + get: function () { + _throwIfNotLoaded("availabilityTooltip", this._Ava, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ava; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "calendarState", { + get: function () { + _throwIfNotLoaded("calendarState", this._C, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "customStatusString", { + get: function () { + _throwIfNotLoaded("customStatusString", this._Cu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Cu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "freeBusyStatus", { + get: function () { + _throwIfNotLoaded("freeBusyStatus", this._F, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "idleStartTime", { + get: function () { + _throwIfNotLoaded("idleStartTime", this._I, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isBlocked", { + get: function () { + _throwIfNotLoaded("isBlocked", this._Is, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isDurationInAvailabilityText", { + get: function () { + _throwIfNotLoaded("isDurationInAvailabilityText", this._IsD, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsD; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOnBuddyList", { + get: function () { + _throwIfNotLoaded("isOnBuddyList", this._IsO, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsO; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isOutOfOffice", { + get: function () { + _throwIfNotLoaded("isOutOfOffice", this._IsOu, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsOu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isSelf", { + get: function () { + _throwIfNotLoaded("isSelf", this._IsS, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsS; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "isTagged", { + get: function () { + _throwIfNotLoaded("isTagged", this._IsT, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._IsT; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingLocation", { + get: function () { + _throwIfNotLoaded("meetingLocation", this._M, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "meetingSubject", { + get: function () { + _throwIfNotLoaded("meetingSubject", this._Me, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Me; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "outOfOfficeNote", { + get: function () { + _throwIfNotLoaded("outOfOfficeNote", this._O, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "overallCapability", { + get: function () { + _throwIfNotLoaded("overallCapability", this._Ov, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ov; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presence", { + get: function () { + _throwIfNotLoaded("presence", this._P, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceNote", { + get: function () { + _throwIfNotLoaded("presenceNote", this._Pr, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pr; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "presenceTooltip", { + get: function () { + _throwIfNotLoaded("presenceTooltip", this._Pre, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Pre; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "status", { + get: function () { + _throwIfNotLoaded("status", this._S, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezone", { + get: function () { + _throwIfNotLoaded("timezone", this._T, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "timezoneBias", { + get: function () { + _throwIfNotLoaded("timezoneBias", this._Ti, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._Ti; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaUnifiedCommunicationInfo.prototype, "voiceMailUri", { + get: function () { + _throwIfNotLoaded("voiceMailUri", this._V, _typePersonaUnifiedCommunicationInfo, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + PersonaUnifiedCommunicationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Availability"])) { + this._A = obj["Availability"]; + } + if (!_isUndefined(obj["AvailabilityText"])) { + this._Av = obj["AvailabilityText"]; + } + if (!_isUndefined(obj["AvailabilityTooltip"])) { + this._Ava = obj["AvailabilityTooltip"]; + } + if (!_isUndefined(obj["CalendarState"])) { + this._C = obj["CalendarState"]; + } + if (!_isUndefined(obj["CustomStatusString"])) { + this._Cu = obj["CustomStatusString"]; + } + if (!_isUndefined(obj["FreeBusyStatus"])) { + this._F = obj["FreeBusyStatus"]; + } + if (!_isUndefined(obj["IdleStartTime"])) { + this._I = _adjustToDateTime(obj["IdleStartTime"]); + } + if (!_isUndefined(obj["IsBlocked"])) { + this._Is = obj["IsBlocked"]; + } + if (!_isUndefined(obj["IsDurationInAvailabilityText"])) { + this._IsD = obj["IsDurationInAvailabilityText"]; + } + if (!_isUndefined(obj["IsOnBuddyList"])) { + this._IsO = obj["IsOnBuddyList"]; + } + if (!_isUndefined(obj["IsOutOfOffice"])) { + this._IsOu = obj["IsOutOfOffice"]; + } + if (!_isUndefined(obj["IsSelf"])) { + this._IsS = obj["IsSelf"]; + } + if (!_isUndefined(obj["IsTagged"])) { + this._IsT = obj["IsTagged"]; + } + if (!_isUndefined(obj["MeetingLocation"])) { + this._M = obj["MeetingLocation"]; + } + if (!_isUndefined(obj["MeetingSubject"])) { + this._Me = obj["MeetingSubject"]; + } + if (!_isUndefined(obj["OutOfOfficeNote"])) { + this._O = obj["OutOfOfficeNote"]; + } + if (!_isUndefined(obj["OverallCapability"])) { + this._Ov = obj["OverallCapability"]; + } + if (!_isUndefined(obj["Presence"])) { + this._P = obj["Presence"]; + } + if (!_isUndefined(obj["PresenceNote"])) { + this._Pr = obj["PresenceNote"]; + } + if (!_isUndefined(obj["PresenceTooltip"])) { + this._Pre = obj["PresenceTooltip"]; + } + if (!_isUndefined(obj["Status"])) { + this._S = obj["Status"]; + } + if (!_isUndefined(obj["Timezone"])) { + this._T = obj["Timezone"]; + } + if (!_isUndefined(obj["TimezoneBias"])) { + this._Ti = obj["TimezoneBias"]; + } + if (!_isUndefined(obj["VoiceMailUri"])) { + this._V = obj["VoiceMailUri"]; + } + }; + PersonaUnifiedCommunicationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaUnifiedCommunicationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaUnifiedCommunicationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + if (_isNullOrUndefined(value)) + return; + var obj = value; + if (!_isUndefined(obj["IdleStartTime"])) { + obj["idleStartTime"] = _adjustToDateTime(obj["idleStartTime"]); + } + _processRetrieveResult(this, value, result); + }; + PersonaUnifiedCommunicationInfo.prototype.toJSON = function () { + return _toJson(this, { + "availability": this._A, + "availabilityText": this._Av, + "availabilityTooltip": this._Ava, + "calendarState": this._C, + "customStatusString": this._Cu, + "freeBusyStatus": this._F, + "idleStartTime": this._I, + "isBlocked": this._Is, + "isDurationInAvailabilityText": this._IsD, + "isOnBuddyList": this._IsO, + "isOutOfOffice": this._IsOu, + "isSelf": this._IsS, + "isTagged": this._IsT, + "meetingLocation": this._M, + "meetingSubject": this._Me, + "outOfOfficeNote": this._O, + "overallCapability": this._Ov, + "presence": this._P, + "presenceNote": this._Pr, + "presenceTooltip": this._Pre, + "status": this._S, + "timezone": this._T, + "timezoneBias": this._Ti, + "voiceMailUri": this._V + }, {}); + }; + PersonaUnifiedCommunicationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaUnifiedCommunicationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaUnifiedCommunicationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaUnifiedCommunicationInfo = PersonaUnifiedCommunicationInfo; + var _typePersonaPhotoInfo = "PersonaPhotoInfo"; + var PersonaPhotoInfo = (function (_super) { + __extends(PersonaPhotoInfo, _super); + function PersonaPhotoInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaPhotoInfo.prototype, "_className", { + get: function () { + return "PersonaPhotoInfo"; + }, + enumerable: true, + configurable: true + }); + PersonaPhotoInfo.prototype.getImageUri = function (uriScheme) { + return _invokeMethod(this, "getImageUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getImageUriWithMetadata = function (uriScheme) { + return _invokeMethod(this, "getImageUriWithMetadata", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.getPlaceholderUri = function (uriScheme) { + return _invokeMethod(this, "getPlaceholderUri", 1, [uriScheme], 4, 0); + }; + PersonaPhotoInfo.prototype.setPlaceholderColor = function (color) { + _invokeMethod(this, "setPlaceholderColor", 0, [color], 0, 0); + }; + PersonaPhotoInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + PersonaPhotoInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaPhotoInfo.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return PersonaPhotoInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaPhotoInfo = PersonaPhotoInfo; + var _typePersonaCollection = "PersonaCollection"; + var PersonaCollection = (function (_super) { + __extends(PersonaCollection, _super); + function PersonaCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaCollection.prototype, "_className", { + get: function () { + return "PersonaCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typePersonaCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + PersonaCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + PersonaCollection.prototype.getItem = function (index) { + return _createIndexerObject(OfficeCore.Persona, this, [index]); + }; + PersonaCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(OfficeCore.Persona, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + PersonaCollection.prototype.load = function (options) { + return _load(this, options); + }; + PersonaCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }); + }; + PersonaCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + PersonaCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(OfficeCore.Persona, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return PersonaCollection; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaCollection = PersonaCollection; + var _typePersonaOrganizationInfo = "PersonaOrganizationInfo"; + var PersonaOrganizationInfo = (function (_super) { + __extends(PersonaOrganizationInfo, _super); + function PersonaOrganizationInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaOrganizationInfo.prototype, "_className", { + get: function () { + return "PersonaOrganizationInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["isWarmedUp", "isWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["IsWarmedUp", "IsWarmingUp"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "_navigationPropertyNames", { + get: function () { + return ["hierarchy", "manager", "directReports"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "directReports", { + get: function () { + if (!this._D) { + this._D = _createPropertyObject(OfficeCore.PersonaCollection, this, "DirectReports", true, 4); + } + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "hierarchy", { + get: function () { + if (!this._H) { + this._H = _createPropertyObject(OfficeCore.PersonaCollection, this, "Hierarchy", true, 4); + } + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "manager", { + get: function () { + if (!this._M) { + this._M = _createPropertyObject(OfficeCore.Persona, this, "Manager", false, 4); + } + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmedUp", { + get: function () { + _throwIfNotLoaded("isWarmedUp", this._I, _typePersonaOrganizationInfo, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaOrganizationInfo.prototype, "isWarmingUp", { + get: function () { + _throwIfNotLoaded("isWarmingUp", this._Is, _typePersonaOrganizationInfo, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + PersonaOrganizationInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["IsWarmedUp"])) { + this._I = obj["IsWarmedUp"]; + } + if (!_isUndefined(obj["IsWarmingUp"])) { + this._Is = obj["IsWarmingUp"]; + } + _handleNavigationPropertyResults(this, obj, ["directReports", "DirectReports", "hierarchy", "Hierarchy", "manager", "Manager"]); + }; + PersonaOrganizationInfo.prototype.load = function (options) { + return _load(this, options); + }; + PersonaOrganizationInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaOrganizationInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PersonaOrganizationInfo.prototype.toJSON = function () { + return _toJson(this, { + "isWarmedUp": this._I, + "isWarmingUp": this._Is + }, {}); + }; + PersonaOrganizationInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaOrganizationInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaOrganizationInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaOrganizationInfo = PersonaOrganizationInfo; + var CustomizedData; + (function (CustomizedData) { + CustomizedData["email"] = "Email"; + CustomizedData["workPhone"] = "WorkPhone"; + CustomizedData["workPhone2"] = "WorkPhone2"; + CustomizedData["workFax"] = "WorkFax"; + CustomizedData["mobilePhone"] = "MobilePhone"; + CustomizedData["homePhone"] = "HomePhone"; + CustomizedData["homePhone2"] = "HomePhone2"; + CustomizedData["otherPhone"] = "OtherPhone"; + CustomizedData["sipAddress"] = "SipAddress"; + CustomizedData["profile"] = "Profile"; + CustomizedData["office"] = "Office"; + CustomizedData["company"] = "Company"; + CustomizedData["workAddress"] = "WorkAddress"; + CustomizedData["homeAddress"] = "HomeAddress"; + CustomizedData["otherAddress"] = "OtherAddress"; + CustomizedData["birthday"] = "Birthday"; + })(CustomizedData = OfficeCore.CustomizedData || (OfficeCore.CustomizedData = {})); + var _typeUnifiedGroupInfo = "UnifiedGroupInfo"; + var UnifiedGroupInfo = (function (_super) { + __extends(UnifiedGroupInfo, _super); + function UnifiedGroupInfo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(UnifiedGroupInfo.prototype, "_className", { + get: function () { + return "UnifiedGroupInfo"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyNames", { + get: function () { + return ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Description", "OneDrive", "OneNote", "IsPublic", "AmIOwner", "AmIMember", "AmISubscribed", "MemberCount", "OwnerCount", "HasGuests", "Site", "Planner", "Classification", "SubscriptionEnabled"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIMember", { + get: function () { + _throwIfNotLoaded("amIMember", this._A, _typeUnifiedGroupInfo, this._isNull); + return this._A; + }, + set: function (value) { + this._A = value; + _invokeSetProperty(this, "AmIMember", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amIOwner", { + get: function () { + _throwIfNotLoaded("amIOwner", this._Am, _typeUnifiedGroupInfo, this._isNull); + return this._Am; + }, + set: function (value) { + this._Am = value; + _invokeSetProperty(this, "AmIOwner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "amISubscribed", { + get: function () { + _throwIfNotLoaded("amISubscribed", this._AmI, _typeUnifiedGroupInfo, this._isNull); + return this._AmI; + }, + set: function (value) { + this._AmI = value; + _invokeSetProperty(this, "AmISubscribed", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "classification", { + get: function () { + _throwIfNotLoaded("classification", this._C, _typeUnifiedGroupInfo, this._isNull); + return this._C; + }, + set: function (value) { + this._C = value; + _invokeSetProperty(this, "Classification", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "description", { + get: function () { + _throwIfNotLoaded("description", this._D, _typeUnifiedGroupInfo, this._isNull); + return this._D; + }, + set: function (value) { + this._D = value; + _invokeSetProperty(this, "Description", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "hasGuests", { + get: function () { + _throwIfNotLoaded("hasGuests", this._H, _typeUnifiedGroupInfo, this._isNull); + return this._H; + }, + set: function (value) { + this._H = value; + _invokeSetProperty(this, "HasGuests", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "isPublic", { + get: function () { + _throwIfNotLoaded("isPublic", this._I, _typeUnifiedGroupInfo, this._isNull); + return this._I; + }, + set: function (value) { + this._I = value; + _invokeSetProperty(this, "IsPublic", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "memberCount", { + get: function () { + _throwIfNotLoaded("memberCount", this._M, _typeUnifiedGroupInfo, this._isNull); + return this._M; + }, + set: function (value) { + this._M = value; + _invokeSetProperty(this, "MemberCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneDrive", { + get: function () { + _throwIfNotLoaded("oneDrive", this._O, _typeUnifiedGroupInfo, this._isNull); + return this._O; + }, + set: function (value) { + this._O = value; + _invokeSetProperty(this, "OneDrive", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "oneNote", { + get: function () { + _throwIfNotLoaded("oneNote", this._On, _typeUnifiedGroupInfo, this._isNull); + return this._On; + }, + set: function (value) { + this._On = value; + _invokeSetProperty(this, "OneNote", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "ownerCount", { + get: function () { + _throwIfNotLoaded("ownerCount", this._Ow, _typeUnifiedGroupInfo, this._isNull); + return this._Ow; + }, + set: function (value) { + this._Ow = value; + _invokeSetProperty(this, "OwnerCount", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "planner", { + get: function () { + _throwIfNotLoaded("planner", this._P, _typeUnifiedGroupInfo, this._isNull); + return this._P; + }, + set: function (value) { + this._P = value; + _invokeSetProperty(this, "Planner", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "site", { + get: function () { + _throwIfNotLoaded("site", this._S, _typeUnifiedGroupInfo, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Site", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UnifiedGroupInfo.prototype, "subscriptionEnabled", { + get: function () { + _throwIfNotLoaded("subscriptionEnabled", this._Su, _typeUnifiedGroupInfo, this._isNull); + return this._Su; + }, + set: function (value) { + this._Su = value; + _invokeSetProperty(this, "SubscriptionEnabled", value, 0); + }, + enumerable: true, + configurable: true + }); + UnifiedGroupInfo.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["description", "oneDrive", "oneNote", "isPublic", "amIOwner", "amIMember", "amISubscribed", "memberCount", "ownerCount", "hasGuests", "site", "planner", "classification", "subscriptionEnabled"], [], []); + }; + UnifiedGroupInfo.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + UnifiedGroupInfo.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["AmIMember"])) { + this._A = obj["AmIMember"]; + } + if (!_isUndefined(obj["AmIOwner"])) { + this._Am = obj["AmIOwner"]; + } + if (!_isUndefined(obj["AmISubscribed"])) { + this._AmI = obj["AmISubscribed"]; + } + if (!_isUndefined(obj["Classification"])) { + this._C = obj["Classification"]; + } + if (!_isUndefined(obj["Description"])) { + this._D = obj["Description"]; + } + if (!_isUndefined(obj["HasGuests"])) { + this._H = obj["HasGuests"]; + } + if (!_isUndefined(obj["IsPublic"])) { + this._I = obj["IsPublic"]; + } + if (!_isUndefined(obj["MemberCount"])) { + this._M = obj["MemberCount"]; + } + if (!_isUndefined(obj["OneDrive"])) { + this._O = obj["OneDrive"]; + } + if (!_isUndefined(obj["OneNote"])) { + this._On = obj["OneNote"]; + } + if (!_isUndefined(obj["OwnerCount"])) { + this._Ow = obj["OwnerCount"]; + } + if (!_isUndefined(obj["Planner"])) { + this._P = obj["Planner"]; + } + if (!_isUndefined(obj["Site"])) { + this._S = obj["Site"]; + } + if (!_isUndefined(obj["SubscriptionEnabled"])) { + this._Su = obj["SubscriptionEnabled"]; + } + }; + UnifiedGroupInfo.prototype.load = function (options) { + return _load(this, options); + }; + UnifiedGroupInfo.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + UnifiedGroupInfo.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + UnifiedGroupInfo.prototype.toJSON = function () { + return _toJson(this, { + "amIMember": this._A, + "amIOwner": this._Am, + "amISubscribed": this._AmI, + "classification": this._C, + "description": this._D, + "hasGuests": this._H, + "isPublic": this._I, + "memberCount": this._M, + "oneDrive": this._O, + "oneNote": this._On, + "ownerCount": this._Ow, + "planner": this._P, + "site": this._S, + "subscriptionEnabled": this._Su + }, {}); + }; + UnifiedGroupInfo.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + UnifiedGroupInfo.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return UnifiedGroupInfo; + }(OfficeExtension.ClientObject)); + OfficeCore.UnifiedGroupInfo = UnifiedGroupInfo; + var _typePersona = "Persona"; + var PersonaPromiseType; + (function (PersonaPromiseType) { + PersonaPromiseType[PersonaPromiseType["immediate"] = 0] = "immediate"; + PersonaPromiseType[PersonaPromiseType["load"] = 3] = "load"; + })(PersonaPromiseType = OfficeCore.PersonaPromiseType || (OfficeCore.PersonaPromiseType = {})); + var PersonaInfoAndSource = (function () { + function PersonaInfoAndSource() { + } + return PersonaInfoAndSource; + }()); + OfficeCore.PersonaInfoAndSource = PersonaInfoAndSource; + ; + var Persona = (function (_super) { + __extends(Persona, _super); + function Persona() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Persona.prototype, "_className", { + get: function () { + return "Persona"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyNames", { + get: function () { + return ["hostId", "type", "capabilities", "diagnosticId", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["HostId", "Type", "Capabilities", "DiagnosticId", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "_navigationPropertyNames", { + get: function () { + return ["photo", "personaInfo", "unifiedCommunicationInfo", "organization", "unifiedGroupInfo", "actions"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "actions", { + get: function () { + if (!this._A) { + this._A = _createPropertyObject(OfficeCore.PersonaActions, this, "Actions", false, 4); + } + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "organization", { + get: function () { + if (!this._O) { + this._O = _createPropertyObject(OfficeCore.PersonaOrganizationInfo, this, "Organization", false, 4); + } + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "personaInfo", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(OfficeCore.PersonaInfo, this, "PersonaInfo", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "photo", { + get: function () { + if (!this._Ph) { + this._Ph = _createPropertyObject(OfficeCore.PersonaPhotoInfo, this, "Photo", false, 4); + } + return this._Ph; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedCommunicationInfo", { + get: function () { + if (!this._U) { + this._U = _createPropertyObject(OfficeCore.PersonaUnifiedCommunicationInfo, this, "UnifiedCommunicationInfo", false, 4); + } + return this._U; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "unifiedGroupInfo", { + get: function () { + if (!this._Un) { + this._Un = _createPropertyObject(OfficeCore.UnifiedGroupInfo, this, "UnifiedGroupInfo", false, 4); + } + return this._Un; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "capabilities", { + get: function () { + _throwIfNotLoaded("capabilities", this._C, _typePersona, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "diagnosticId", { + get: function () { + _throwIfNotLoaded("diagnosticId", this._D, _typePersona, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "hostId", { + get: function () { + _throwIfNotLoaded("hostId", this._H, _typePersona, this._isNull); + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersona, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Persona.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typePersona, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Persona.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, [], ["unifiedGroupInfo"], [ + "actions", + "organization", + "personaInfo", + "photo", + "unifiedCommunicationInfo" + ]); + }; + Persona.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Persona.prototype.dispose = function () { + _invokeMethod(this, "Dispose", 0, [], 0, 0); + }; + Persona.prototype.getCustomizations = function () { + return _invokeMethod(this, "GetCustomizations", 1, [], 4, 0); + }; + Persona.prototype.getMembers = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembers", 1, [], false, false, null, 4); + }; + Persona.prototype.getMembership = function () { + return _createMethodObject(OfficeCore.MemberInfoList, this, "GetMembership", 1, [], false, false, null, 4); + }; + Persona.prototype.getViewableSources = function () { + return _invokeMethod(this, "GetViewableSources", 1, [], 4, 0); + }; + Persona.prototype.reportTimeForRender = function (perfpoint, millisecUTC) { + _invokeMethod(this, "ReportTimeForRender", 0, [perfpoint, millisecUTC], 0, 0); + }; + Persona.prototype.warmup = function (dataToWarmUp) { + _invokeMethod(this, "Warmup", 0, [dataToWarmUp], 0, 0); + }; + Persona.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Capabilities"])) { + this._C = obj["Capabilities"]; + } + if (!_isUndefined(obj["DiagnosticId"])) { + this._D = obj["DiagnosticId"]; + } + if (!_isUndefined(obj["HostId"])) { + this._H = obj["HostId"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + if (!_isUndefined(obj["Type"])) { + this._T = obj["Type"]; + } + _handleNavigationPropertyResults(this, obj, ["actions", "Actions", "organization", "Organization", "personaInfo", "PersonaInfo", "photo", "Photo", "unifiedCommunicationInfo", "UnifiedCommunicationInfo", "unifiedGroupInfo", "UnifiedGroupInfo"]); + }; + Persona.prototype.load = function (options) { + return _load(this, options); + }; + Persona.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Persona.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Persona.prototype.toJSON = function () { + return _toJson(this, { + "capabilities": this._C, + "diagnosticId": this._D, + "hostId": this._H, + "instanceId": this._I, + "type": this._T + }, { + "organization": this._O, + "personaInfo": this._P, + "unifiedCommunicationInfo": this._U, + "unifiedGroupInfo": this._Un + }); + }; + Persona.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Persona.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Persona; + }(OfficeExtension.ClientObject)); + OfficeCore.Persona = Persona; + var PersonaCustom = (function () { + function PersonaCustom() { + } + PersonaCustom.prototype.performAsyncOperation = function (type, waitFor, action, check) { + var _this = this; + if (type == PersonaPromiseType.immediate) { + action(); + return; + } + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + } + else { + var persona = _this; + persona.load("hostId"); + persona.context.sync().then(function () { + var hostId = persona.hostId; + _this.getPersonaLifetime().then(function (personaLifetime) { + var eventHandler = function (args) { + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + if (args.sendingPersonaHostId == hostId) { + for (var index = 0; index < args.dataUpdated.length; ++index) { + var updated = args.dataUpdated[index]; + if (waitFor == updated) { + check().then(function (isWarmedUp) { + if (isWarmedUp) { + action(); + personaLifetime.onPersonaUpdated.remove(eventHandler); + persona.context.sync(); + } + resolve(isWarmedUp); + }); + return; + } + } + } + resolve(false); + }); + }; + personaLifetime.onPersonaUpdated.add(eventHandler); + persona.context.sync(); + }); + }); + } + }); + }; + PersonaCustom.prototype.getOrganizationAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var organization = persona.organization; + organization.load("*"); + persona.context.sync().then(function () { + resolve(organization); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var organization = persona.organization; + organization.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(organization.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.organization, action, check); + }); + }; + PersonaCustom.prototype.getIsPersonaInfoResolvedCheck = function () { + var persona = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var info = persona.personaInfo; + info.load("isPersonResolved"); + persona.context.sync().then(function () { + resolve(info.isPersonResolved); + }); + }); + }; + PersonaCustom.prototype.getPersonaInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var info = persona.personaInfo; + info.load(); + persona.context.sync().then(function () { + resolve(info); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getPersonaInfoWithSourceAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var result = new PersonaInfoAndSource(); + result.info = persona.personaInfo; + result.info.load(); + result.source = persona.personaInfo.sources; + result.source.load(); + persona.context.sync().then(function () { + resolve(result); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedCommunicationInfo = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var ucInfo = persona.unifiedCommunicationInfo; + ucInfo.load("*"); + persona.context.sync().then(function () { + resolve(ucInfo); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getUnifiedGroupInfoAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var group = persona.unifiedGroupInfo; + group.load("*"); + persona.context.sync().then(function () { + resolve(group); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getTypeAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + persona.load("type"); + persona.context.sync().then(function () { + resolve(OfficeCore.PersonaType[persona.type.valueOf()]); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getCustomizationsAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var customizations = persona.getCustomizations(); + persona.context.sync().then(function () { + resolve(customizations.value); + }); + }; + var check = function () { + return _this.getIsPersonaInfoResolvedCheck(); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.personaInfo, action, check); + }); + }; + PersonaCustom.prototype.getMembersAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, rejcet) { + var persona = _this; + var action = function () { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + resolve(members); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve, isWarmedUpReject) { + var members = persona.getMembers(); + members.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(members.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.members, action, check); + }); + }; + PersonaCustom.prototype.getMembershipAsync = function (type) { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + var action = function () { + var membership = persona.getMembership(); + membership.load("*"); + persona.context.sync().then(function () { + resolve(membership); + }); + }; + var check = function () { + return new OfficeExtension.CoreUtility.Promise(function (isWarmedUpResolve) { + var membership = persona.getMembership(); + membership.load("isWarmedUp"); + persona.context.sync().then(function () { + isWarmedUpResolve(membership.isWarmedUp); + }); + }); + }; + _this.performAsyncOperation(type, PersonaDataUpdated.membership, action, check); + }); + }; + PersonaCustom.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this; + persona.load("instanceId"); + persona.context.sync().then(function () { + var peopleApi = new PeopleApiContext(persona.context, persona.instanceId); + peopleApi.getPersonaLifetime().then(function (lifetime) { + resolve(lifetime); + }); + }); + }); + }; + return PersonaCustom; + }()); + OfficeCore.PersonaCustom = PersonaCustom; + OfficeExtension.Utility.applyMixin(Persona, PersonaCustom); + var _typePersonaLifetime = "PersonaLifetime"; + var PersonaLifetime = (function (_super) { + __extends(PersonaLifetime, _super); + function PersonaLifetime() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PersonaLifetime.prototype, "_className", { + get: function () { + return "PersonaLifetime"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyNames", { + get: function () { + return ["instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PersonaLifetime.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typePersonaLifetime, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.getPersona = function (hostId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersona", 1, [hostId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgByEntryId = function (entryId, name, sip, smtp) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgByEntryId", 1, [entryId, name, sip, smtp], false, false, null, 4); + }; + PersonaLifetime.prototype.getPersonaForOrgEntry = function (name, sip, smtp, entryId) { + return _createMethodObject(OfficeCore.Persona, this, "GetPersonaForOrgEntry", 1, [name, sip, smtp, entryId], false, false, null, 4); + }; + PersonaLifetime.prototype.getPolicies = function () { + return _invokeMethod(this, "GetPolicies", 1, [], 4, 0); + }; + PersonaLifetime.prototype.getTextScaleFactor = function () { + return _invokeMethod(this, "GetTextScaleFactor", 1, [], 4, 0); + }; + PersonaLifetime.prototype._RegisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_RegisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._UnregisterPersonaUpdatedEvent = function () { + _invokeMethod(this, "_UnregisterPersonaUpdatedEvent", 0, [], 0, 0); + }; + PersonaLifetime.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + PersonaLifetime.prototype.load = function (options) { + return _load(this, options); + }; + PersonaLifetime.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PersonaLifetime.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(PersonaLifetime.prototype, "onPersonaUpdated", { + get: function () { + var _this = this; + if (!this.m_personaUpdated) { + this.m_personaUpdated = new OfficeExtension.GenericEventHandlers(this.context, this, "PersonaUpdated", { + eventType: 3502, + registerFunc: function () { return _this._RegisterPersonaUpdatedEvent(); }, + unregisterFunc: function () { return _this._UnregisterPersonaUpdatedEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + dataUpdated: value.dataUpdated, + sendingPersonaHostId: value.sendingPersonaHostId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_personaUpdated; + }, + enumerable: true, + configurable: true + }); + PersonaLifetime.prototype.toJSON = function () { + return _toJson(this, { + "instanceId": this._I + }, {}); + }; + PersonaLifetime.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PersonaLifetime.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PersonaLifetime; + }(OfficeExtension.ClientObject)); + OfficeCore.PersonaLifetime = PersonaLifetime; + var _typeLokiTokenProvider = "LokiTokenProvider"; + var LokiTokenProvider = (function (_super) { + __extends(LokiTokenProvider, _super); + function LokiTokenProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProvider.prototype, "_className", { + get: function () { + return "LokiTokenProvider"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyNames", { + get: function () { + return ["emailOrUpn", "instanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["EmailOrUpn", "InstanceId"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "emailOrUpn", { + get: function () { + _throwIfNotLoaded("emailOrUpn", this._E, _typeLokiTokenProvider, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "instanceId", { + get: function () { + _throwIfNotLoaded("instanceId", this._I, _typeLokiTokenProvider, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.requestClientAccessToken = function () { + _invokeMethod(this, "RequestClientAccessToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestIdentityUniqueId = function () { + _invokeMethod(this, "RequestIdentityUniqueId", 0, [], 0, 0); + }; + LokiTokenProvider.prototype.requestToken = function () { + _invokeMethod(this, "RequestToken", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_RegisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._RegisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_RegisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterClientAccessTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterClientAccessTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterIdentityUniqueIdAvailableEvent = function () { + _invokeMethod(this, "_UnregisterIdentityUniqueIdAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._UnregisterLokiTokenAvailableEvent = function () { + _invokeMethod(this, "_UnregisterLokiTokenAvailableEvent", 0, [], 0, 0); + }; + LokiTokenProvider.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["EmailOrUpn"])) { + this._E = obj["EmailOrUpn"]; + } + if (!_isUndefined(obj["InstanceId"])) { + this._I = obj["InstanceId"]; + } + }; + LokiTokenProvider.prototype.load = function (options) { + return _load(this, options); + }; + LokiTokenProvider.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LokiTokenProvider.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LokiTokenProvider.prototype, "onClientAccessTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_clientAccessTokenAvailable) { + this.m_clientAccessTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "ClientAccessTokenAvailable", { + eventType: 3505, + registerFunc: function () { return _this._RegisterClientAccessTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterClientAccessTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + clientAccessToken: value.clientAccessToken, + isAvailable: value.isAvailable, + tokenTTLInSeconds: value.tokenTTLInSeconds + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_clientAccessTokenAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onIdentityUniqueIdAvailable", { + get: function () { + var _this = this; + if (!this.m_identityUniqueIdAvailable) { + this.m_identityUniqueIdAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "IdentityUniqueIdAvailable", { + eventType: 3504, + registerFunc: function () { return _this._RegisterIdentityUniqueIdAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterIdentityUniqueIdAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + uniqueId: value.uniqueId + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_identityUniqueIdAvailable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LokiTokenProvider.prototype, "onLokiTokenAvailable", { + get: function () { + var _this = this; + if (!this.m_lokiTokenAvailable) { + this.m_lokiTokenAvailable = new OfficeExtension.GenericEventHandlers(this.context, this, "LokiTokenAvailable", { + eventType: 3503, + registerFunc: function () { return _this._RegisterLokiTokenAvailableEvent(); }, + unregisterFunc: function () { return _this._UnregisterLokiTokenAvailableEvent(); }, + getTargetIdFunc: function () { return _this.instanceId; }, + eventArgsTransformFunc: function (value) { + var event = { + isAvailable: value.isAvailable, + lokiAutoDiscoverUrl: value.lokiAutoDiscoverUrl, + lokiToken: value.lokiToken + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_lokiTokenAvailable; + }, + enumerable: true, + configurable: true + }); + LokiTokenProvider.prototype.toJSON = function () { + return _toJson(this, { + "emailOrUpn": this._E, + "instanceId": this._I + }, {}); + }; + LokiTokenProvider.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LokiTokenProvider.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LokiTokenProvider; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProvider = LokiTokenProvider; + var _typeLokiTokenProviderFactory = "LokiTokenProviderFactory"; + var LokiTokenProviderFactory = (function (_super) { + __extends(LokiTokenProviderFactory, _super); + function LokiTokenProviderFactory() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LokiTokenProviderFactory.prototype, "_className", { + get: function () { + return "LokiTokenProviderFactory"; + }, + enumerable: true, + configurable: true + }); + LokiTokenProviderFactory.prototype.getLokiTokenProvider = function (accountName) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [accountName], false, false, null, 4); + }; + LokiTokenProviderFactory.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + LokiTokenProviderFactory.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + LokiTokenProviderFactory.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.LokiTokenProviderFactory, context, "Microsoft.People.LokiTokenProviderFactory", false, 4); + }; + LokiTokenProviderFactory.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return LokiTokenProviderFactory; + }(OfficeExtension.ClientObject)); + OfficeCore.LokiTokenProviderFactory = LokiTokenProviderFactory; + var _typeServiceContext = "ServiceContext"; + var PeopleApiContext = (function () { + function PeopleApiContext(context, instanceId) { + this.context = context; + this.instanceId = instanceId; + } + Object.defineProperty(PeopleApiContext.prototype, "serviceContext", { + get: function () { + if (!this.m_serviceConext) { + this.m_serviceConext = OfficeCore.ServiceContext.newObject(this.context); + } + return this.m_serviceConext; + }, + enumerable: true, + configurable: true + }); + PeopleApiContext.prototype.getPersonaLifetime = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var lifetime = _this.serviceContext.getPersonaLifetime(_this.instanceId); + _this.context.sync().then(function () { + lifetime.load("instanceId"); + _this.context.sync().then(function () { + resolve(lifetime); + }); + }); + }); + }; + PeopleApiContext.prototype.getInitialPersona = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var persona = _this.serviceContext.getInitialPersona(_this.instanceId); + _this.context.sync().then(function () { + resolve(persona); + }); + }); + }; + PeopleApiContext.prototype.getLokiTokenProvider = function () { + var _this = this; + return new OfficeExtension.CoreUtility.Promise(function (resolve, reject) { + var provider = _this.serviceContext.getLokiTokenProvider(_this.instanceId); + _this.context.sync().then(function () { + provider.load("instanceId"); + _this.context.sync().then(function () { + resolve(provider); + }); + }); + }); + }; + return PeopleApiContext; + }()); + OfficeCore.PeopleApiContext = PeopleApiContext; + var ServiceContext = (function (_super) { + __extends(ServiceContext, _super); + function ServiceContext() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ServiceContext.prototype, "_className", { + get: function () { + return "ServiceContext"; + }, + enumerable: true, + configurable: true + }); + ServiceContext.prototype.accountEmailOrUpn = function (instanceId) { + return _invokeMethod(this, "AccountEmailOrUpn", 1, [instanceId], 4, 0); + }; + ServiceContext.prototype.dispose = function (instance) { + _invokeMethod(this, "Dispose", 0, [instance], 0, 0); + }; + ServiceContext.prototype.getInitialPersona = function (instanceId) { + return _createMethodObject(OfficeCore.Persona, this, "GetInitialPersona", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getLokiTokenProvider = function (instanceId) { + return _createMethodObject(OfficeCore.LokiTokenProvider, this, "GetLokiTokenProvider", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaLifetime = function (instanceId) { + return _createMethodObject(OfficeCore.PersonaLifetime, this, "GetPersonaLifetime", 1, [instanceId], false, false, null, 4); + }; + ServiceContext.prototype.getPersonaPolicies = function () { + return _invokeMethod(this, "GetPersonaPolicies", 1, [], 4, 0); + }; + ServiceContext.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ServiceContext.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ServiceContext.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ServiceContext, context, "Microsoft.People.ServiceContext", false, 4); + }; + ServiceContext.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ServiceContext; + }(OfficeExtension.ClientObject)); + OfficeCore.ServiceContext = ServiceContext; + var _typeRichapiPcxFeatureChecks = "RichapiPcxFeatureChecks"; + var RichapiPcxFeatureChecks = (function (_super) { + __extends(RichapiPcxFeatureChecks, _super); + function RichapiPcxFeatureChecks() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RichapiPcxFeatureChecks.prototype, "_className", { + get: function () { + return "RichapiPcxFeatureChecks"; + }, + enumerable: true, + configurable: true + }); + RichapiPcxFeatureChecks.prototype.isAddChangePhotoLinkOnLpcPersonaImageFlightEnabled = function () { + return _invokeMethod(this, "IsAddChangePhotoLinkOnLpcPersonaImageFlightEnabled", 1, [], 4, 0); + }; + RichapiPcxFeatureChecks.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + RichapiPcxFeatureChecks.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + RichapiPcxFeatureChecks.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.RichapiPcxFeatureChecks, context, "Microsoft.People.RichapiPcxFeatureChecks", false, 4); + }; + RichapiPcxFeatureChecks.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return RichapiPcxFeatureChecks; + }(OfficeExtension.ClientObject)); + OfficeCore.RichapiPcxFeatureChecks = RichapiPcxFeatureChecks; + var _typeTap = "Tap"; + var Tap = (function (_super) { + __extends(Tap, _super); + function Tap() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Tap.prototype, "_className", { + get: function () { + return "Tap"; + }, + enumerable: true, + configurable: true + }); + Tap.prototype.getEnterpriseUserInfo = function () { + return _invokeMethod(this, "GetEnterpriseUserInfo", 1, [], 4 | 1, 0); + }; + Tap.prototype.getMruFriendlyPath = function (documentUrl) { + return _invokeMethod(this, "GetMruFriendlyPath", 1, [documentUrl], 4 | 1, 0); + }; + Tap.prototype.launchFileUrlInOfficeApp = function (documentUrl, useUniversalAsBackup) { + return _invokeMethod(this, "LaunchFileUrlInOfficeApp", 1, [documentUrl, useUniversalAsBackup], 4 | 1, 0); + }; + Tap.prototype.performLocalSearch = function (query, numResultsRequested, supportedFileExtensions, documentUrlToExclude) { + return _invokeMethod(this, "PerformLocalSearch", 1, [query, numResultsRequested, supportedFileExtensions, documentUrlToExclude], 4 | 1, 0); + }; + Tap.prototype.readSearchCache = function (keyword, expiredHours, filterObjectType) { + return _invokeMethod(this, "ReadSearchCache", 1, [keyword, expiredHours, filterObjectType], 4 | 1, 0); + }; + Tap.prototype.writeSearchCache = function (fileContent, keyword, filterObjectType) { + return _invokeMethod(this, "WriteSearchCache", 1, [fileContent, keyword, filterObjectType], 4 | 1, 0); + }; + Tap.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + Tap.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Tap.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.Tap, context, "Microsoft.TapRichApi.Tap", false, 4); + }; + Tap.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return Tap; + }(OfficeExtension.ClientObject)); + OfficeCore.Tap = Tap; + var ObjectType; + (function (ObjectType) { + ObjectType["unknown"] = "Unknown"; + ObjectType["chart"] = "Chart"; + ObjectType["smartArt"] = "SmartArt"; + ObjectType["table"] = "Table"; + ObjectType["image"] = "Image"; + ObjectType["slide"] = "Slide"; + ObjectType["ole"] = "OLE"; + ObjectType["text"] = "Text"; + })(ObjectType = OfficeCore.ObjectType || (OfficeCore.ObjectType = {})); + var _typeAppRuntimePersistenceService = "AppRuntimePersistenceService"; + var AppRuntimePersistenceService = (function (_super) { + __extends(AppRuntimePersistenceService, _super); + function AppRuntimePersistenceService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimePersistenceService.prototype, "_className", { + get: function () { + return "AppRuntimePersistenceService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimePersistenceService.prototype.getAppRuntimeStartState = function () { + return _invokeMethod(this, "GetAppRuntimeStartState", 1, [], 4, 0); + }; + AppRuntimePersistenceService.prototype.setAppRuntimeStartState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeStartState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimePersistenceService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimePersistenceService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimePersistenceService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimePersistenceService, context, "Microsoft.AppRuntime.AppRuntimePersistenceService", false, 4); + }; + AppRuntimePersistenceService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimePersistenceService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimePersistenceService = AppRuntimePersistenceService; + var _typeAppRuntimeService = "AppRuntimeService"; + var AppRuntimeService = (function (_super) { + __extends(AppRuntimeService, _super); + function AppRuntimeService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(AppRuntimeService.prototype, "_className", { + get: function () { + return "AppRuntimeService"; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.getAppRuntimeState = function () { + return _invokeMethod(this, "GetAppRuntimeState", 1, [], 4, 0); + }; + AppRuntimeService.prototype.setAppRuntimeState = function (appRuntimeState) { + _invokeMethod(this, "SetAppRuntimeState", 0, [appRuntimeState], _calculateApiFlags(2, "SharedRuntimeInternal", "1.2"), 0); + }; + AppRuntimeService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + AppRuntimeService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + AppRuntimeService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.AppRuntimeService, context, "Microsoft.AppRuntime.AppRuntimeService", false, 4); + }; + Object.defineProperty(AppRuntimeService.prototype, "onVisibilityChanged", { + get: function () { + if (!this.m_visibilityChanged) { + this.m_visibilityChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "VisibilityChanged", { + eventType: 65539, + registerFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + unregisterFunc: function () { return OfficeExtension.Utility._createPromiseFromResult(null); }, + getTargetIdFunc: function () { return ""; }, + eventArgsTransformFunc: function (value) { + var event = { + visibility: value.visibility + }; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_visibilityChanged; + }, + enumerable: true, + configurable: true + }); + AppRuntimeService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return AppRuntimeService; + }(OfficeExtension.ClientObject)); + OfficeCore.AppRuntimeService = AppRuntimeService; + var AppRuntimeState; + (function (AppRuntimeState) { + AppRuntimeState["inactive"] = "Inactive"; + AppRuntimeState["background"] = "Background"; + AppRuntimeState["visible"] = "Visible"; + })(AppRuntimeState = OfficeCore.AppRuntimeState || (OfficeCore.AppRuntimeState = {})); + var Visibility; + (function (Visibility) { + Visibility["hidden"] = "Hidden"; + Visibility["visible"] = "Visible"; + })(Visibility = OfficeCore.Visibility || (OfficeCore.Visibility = {})); + var LicenseFeatureTier; + (function (LicenseFeatureTier) { + LicenseFeatureTier["unknown"] = "Unknown"; + LicenseFeatureTier["basic"] = "Basic"; + LicenseFeatureTier["premium"] = "Premium"; + })(LicenseFeatureTier = OfficeCore.LicenseFeatureTier || (OfficeCore.LicenseFeatureTier = {})); + var _typeLicense = "License"; + var License = (function (_super) { + __extends(License, _super); + function License() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(License.prototype, "_className", { + get: function () { + return "License"; + }, + enumerable: true, + configurable: true + }); + License.prototype.getFeatureTier = function (feature, fallbackValue) { + return _invokeMethod(this, "GetFeatureTier", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.getLicenseFeature = function (feature) { + return _createMethodObject(OfficeCore.LicenseFeature, this, "GetLicenseFeature", 1, [feature], false, false, null, 4); + }; + License.prototype.getMsaDeviceTicket = function (resource, policy, options) { + return _invokeMethod(this, "GetMsaDeviceTicket", 1, [resource, policy, options], 4 | 1, 0); + }; + License.prototype.isFeatureEnabled = function (feature, fallbackValue) { + return _invokeMethod(this, "IsFeatureEnabled", 1, [feature, fallbackValue], 4, 0); + }; + License.prototype.isFreemiumUpsellEnabled = function () { + return _invokeMethod(this, "IsFreemiumUpsellEnabled", 1, [], 4, 0); + }; + License.prototype.launchUpsellExperience = function (experienceId) { + _invokeMethod(this, "LaunchUpsellExperience", 1, [experienceId], 4, 0); + }; + License.prototype._TestFireStateChangedEvent = function (feature) { + _invokeMethod(this, "_TestFireStateChangedEvent", 0, [feature], 1, 0); + }; + License.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + License.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + License.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.License, context, "Microsoft.Office.Licensing.License", false, 4); + }; + License.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return License; + }(OfficeExtension.ClientObject)); + OfficeCore.License = License; + var _typeLicenseFeature = "LicenseFeature"; + var LicenseFeature = (function (_super) { + __extends(LicenseFeature, _super); + function LicenseFeature() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LicenseFeature.prototype, "_className", { + get: function () { + return "LicenseFeature"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyNames", { + get: function () { + return ["id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(LicenseFeature.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeLicenseFeature, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype._RegisterStateChange = function () { + _invokeMethod(this, "_RegisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._UnregisterStateChange = function () { + _invokeMethod(this, "_UnregisterStateChange", 1, [], 4, 0); + }; + LicenseFeature.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + }; + LicenseFeature.prototype.load = function (options) { + return _load(this, options); + }; + LicenseFeature.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + LicenseFeature.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + LicenseFeature.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(LicenseFeature.prototype, "onStateChanged", { + get: function () { + var _this = this; + if (!this.m_stateChanged) { + this.m_stateChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "StateChanged", { + eventType: 1, + registerFunc: function () { return _this._RegisterStateChange(); }, + unregisterFunc: function () { return _this._UnregisterStateChange(); }, + getTargetIdFunc: function () { return _this.id; }, + eventArgsTransformFunc: function (value) { + var event = _CC.LicenseFeature_StateChanged_EventArgsTransform(_this, value); + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_stateChanged; + }, + enumerable: true, + configurable: true + }); + LicenseFeature.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I + }, {}); + }; + LicenseFeature.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + LicenseFeature.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return LicenseFeature; + }(OfficeExtension.ClientObject)); + OfficeCore.LicenseFeature = LicenseFeature; + (function (_CC) { + function LicenseFeature_StateChanged_EventArgsTransform(thisObj, args) { + var newArgs = { + feature: args.featureName, + isEnabled: args.isEnabled, + tier: args.tierName + }; + if (args.tierName) { + newArgs.tier = args.tierName == 0 ? LicenseFeatureTier.unknown : + args.tierName == 1 ? LicenseFeatureTier.basic : + args.tierName == 2 ? LicenseFeatureTier.premium : + args.tierName; + } + return newArgs; + } + _CC.LicenseFeature_StateChanged_EventArgsTransform = LicenseFeature_StateChanged_EventArgsTransform; + })(_CC = OfficeCore._CC || (OfficeCore._CC = {})); + var _typeMsaDeviceTicketOptions = "MsaDeviceTicketOptions"; + var MsaDeviceTicketOptions = (function (_super) { + __extends(MsaDeviceTicketOptions, _super); + function MsaDeviceTicketOptions() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_className", { + get: function () { + return "MsaDeviceTicketOptions"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyNames", { + get: function () { + return ["scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Scopes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MsaDeviceTicketOptions.prototype, "scopes", { + get: function () { + _throwIfNotLoaded("scopes", this._S, _typeMsaDeviceTicketOptions, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Scopes", value, 0); + }, + enumerable: true, + configurable: true + }); + MsaDeviceTicketOptions.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["scopes"], [], []); + }; + MsaDeviceTicketOptions.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + MsaDeviceTicketOptions.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Scopes"])) { + this._S = obj["Scopes"]; + } + }; + MsaDeviceTicketOptions.prototype.load = function (options) { + return _load(this, options); + }; + MsaDeviceTicketOptions.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + MsaDeviceTicketOptions.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + MsaDeviceTicketOptions.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.MsaDeviceTicketOptions, context, "Microsoft.Office.Licensing.MsaDeviceTicketOptions", false, 4); + }; + MsaDeviceTicketOptions.prototype.toJSON = function () { + return _toJson(this, { + "scopes": this._S + }, {}); + }; + MsaDeviceTicketOptions.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + MsaDeviceTicketOptions.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return MsaDeviceTicketOptions; + }(OfficeExtension.ClientObject)); + OfficeCore.MsaDeviceTicketOptions = MsaDeviceTicketOptions; + var _typeDialogPage = "DialogPage"; + var DialogPage = (function (_super) { + __extends(DialogPage, _super); + function DialogPage() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DialogPage.prototype, "_className", { + get: function () { + return "DialogPage"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["_Id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DialogPage.prototype, "_Id", { + get: function () { + _throwIfNotLoaded("_Id", this.__I, _typeDialogPage, this._isNull); + return this.__I; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.close = function () { + _invokeMethod(this, "Close", 1, [], 4, 0); + }; + DialogPage.prototype.readyToShow = function () { + _invokeMethod(this, "ReadyToShow", 1, [], 4, 0); + }; + DialogPage.prototype.registerOnShow = function () { + _invokeMethod(this, "RegisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype.sendMessageToHost = function (message) { + _invokeMethod(this, "SendMessageToHost", 1, [message], 4, 0); + }; + DialogPage.prototype.unregisterOnShow = function () { + _invokeMethod(this, "UnregisterOnShow", 1, [], 4, 0); + }; + DialogPage.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["_Id"])) { + this.__I = obj["_Id"]; + } + }; + DialogPage.prototype.load = function (options) { + return _load(this, options); + }; + DialogPage.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_Id"])) { + this.__I = value["_Id"]; + } + }; + DialogPage.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DialogPage.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.DialogPage, context, "Microsoft.Office.DialogPage.DialogPage", false, 4); + }; + Object.defineProperty(DialogPage.prototype, "onOnShowEvent", { + get: function () { + var _this = this; + if (!this.m_onShowEvent) { + this.m_onShowEvent = new OfficeExtension.GenericEventHandlers(this.context, this, "OnShowEvent", { + eventType: 1, + registerFunc: function () { return _this.registerOnShow(); }, + unregisterFunc: function () { return _this.unregisterOnShow(); }, + getTargetIdFunc: function () { return _this._Id; }, + eventArgsTransformFunc: function (value) { + var event = {}; + return OfficeExtension.Utility._createPromiseFromResult(event); + } + }); + } + return this.m_onShowEvent; + }, + enumerable: true, + configurable: true + }); + DialogPage.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return DialogPage; + }(OfficeExtension.ClientObject)); + OfficeCore.DialogPage = DialogPage; + var _typeActionService = "ActionService"; + var ActionService = (function (_super) { + __extends(ActionService, _super); + function ActionService() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ActionService.prototype, "_className", { + get: function () { + return "ActionService"; + }, + enumerable: true, + configurable: true + }); + ActionService.prototype.areShortcutsInUse = function (shortcuts) { + return _invokeMethod(this, "AreShortcutsInUse", 0, [shortcuts], 0, 0); + }; + ActionService.prototype.getShortcuts = function () { + return _invokeMethod(this, "GetShortcuts", 1, [], 4, 0); + }; + ActionService.prototype.replaceShortcuts = function (shortcuts) { + _invokeMethod(this, "ReplaceShortcuts", 0, [shortcuts], 0, 0); + }; + ActionService.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + }; + ActionService.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ActionService.newObject = function (context) { + return _createTopLevelServiceObject(OfficeCore.ActionService, context, "Microsoft.Office.ActionService", false, 4); + }; + ActionService.prototype.toJSON = function () { + return _toJson(this, {}, {}); + }; + return ActionService; + }(OfficeExtension.ClientObject)); + OfficeCore.ActionService = ActionService; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["apiNotAvailable"] = "ApiNotAvailable"; + ErrorCodes["clientError"] = "ClientError"; + ErrorCodes["controlIdNotFound"] = "ControlIdNotFound"; + ErrorCodes["entryIdRequired"] = "EntryIdRequired"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["hostRestartNeeded"] = "HostRestartNeeded"; + ErrorCodes["instanceNotFound"] = "InstanceNotFound"; + ErrorCodes["interactiveFlowAborted"] = "InteractiveFlowAborted"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["invalidGrant"] = "InvalidGrant"; + ErrorCodes["invalidResourceUrl"] = "InvalidResourceUrl"; + ErrorCodes["invalidRibbonDefinition"] = "InvalidRibbonDefinition"; + ErrorCodes["objectNotFound"] = "ObjectNotFound"; + ErrorCodes["resourceNotSupported"] = "ResourceNotSupported"; + ErrorCodes["serverError"] = "ServerError"; + ErrorCodes["serviceUrlNotFound"] = "ServiceUrlNotFound"; + ErrorCodes["sharedRuntimeNotAvailable"] = "SharedRuntimeNotAvailable"; + ErrorCodes["ticketInvalidParams"] = "TicketInvalidParams"; + ErrorCodes["ticketNetworkError"] = "TicketNetworkError"; + ErrorCodes["ticketUnauthorized"] = "TicketUnauthorized"; + ErrorCodes["ticketUninitialized"] = "TicketUninitialized"; + ErrorCodes["ticketUnknownError"] = "TicketUnknownError"; + ErrorCodes["unexpectedError"] = "UnexpectedError"; + ErrorCodes["unsupportedUserIdentity"] = "UnsupportedUserIdentity"; + ErrorCodes["userNotSignedIn"] = "UserNotSignedIn"; + })(ErrorCodes = OfficeCore.ErrorCodes || (OfficeCore.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = OfficeCore.Interfaces || (OfficeCore.Interfaces = {})); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var VisibilityMode; + (function (VisibilityMode) { + VisibilityMode["hidden"] = "Hidden"; + VisibilityMode["taskpane"] = "Taskpane"; + })(VisibilityMode = Office.VisibilityMode || (Office.VisibilityMode = {})); + var StartupBehavior; + (function (StartupBehavior) { + StartupBehavior["none"] = "None"; + StartupBehavior["load"] = "Load"; + })(StartupBehavior = Office.StartupBehavior || (Office.StartupBehavior = {})); + var addin; + (function (addin) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function setStartupBehavior(behavior) { + return __awaiter(this, void 0, void 0, function () { + var state, context, appRuntimePersistenceService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (behavior !== StartupBehavior.load && behavior !== StartupBehavior.none) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.invalidArgument, null, null); + } + state = (behavior == StartupBehavior.load ? OfficeCore.AppRuntimeState.background : OfficeCore.AppRuntimeState.inactive); + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + appRuntimePersistenceService.setAppRuntimeStartState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + addin.setStartupBehavior = setStartupBehavior; + function getStartupBehavior() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimePersistenceService, stateResult, state, ret; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + appRuntimePersistenceService = OfficeCore.AppRuntimePersistenceService.newObject(context); + stateResult = appRuntimePersistenceService.getAppRuntimeStartState(); + return [4, context.sync()]; + case 1: + _a.sent(); + state = stateResult.value; + ret = (state == OfficeCore.AppRuntimeState.inactive ? StartupBehavior.none : StartupBehavior.load); + return [2, ret]; + } + }); + }); + } + addin.getStartupBehavior = getStartupBehavior; + function _setState(state) { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + appRuntimeService.setAppRuntimeState(state); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + function _getState() { + return __awaiter(this, void 0, void 0, function () { + var context, appRuntimeService, stateResult; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(true); + appRuntimeService = OfficeCore.AppRuntimeService.newObject(context); + stateResult = appRuntimeService.getAppRuntimeState(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, stateResult.value]; + } + }); + }); + } + addin._getState = _getState; + function showAsTaskpane() { + return _setState(OfficeCore.AppRuntimeState.visible); + } + addin.showAsTaskpane = showAsTaskpane; + function hide() { + return _setState(OfficeCore.AppRuntimeState.background); + } + addin.hide = hide; + var _appRuntimeEvent; + function _getAppRuntimeEventService() { + if (!_appRuntimeEvent) { + var context = _createRequestContext(true); + _appRuntimeEvent = OfficeCore.AppRuntimeService.newObject(context); + } + return _appRuntimeEvent; + } + function _convertVisibilityToVisibilityMode(visibility) { + if (visibility === OfficeCore.Visibility.visible) { + return VisibilityMode.taskpane; + } + return VisibilityMode.hidden; + } + function onVisibilityModeChanged(listener) { + return __awaiter(this, void 0, void 0, function () { + var eventService, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + eventService = _getAppRuntimeEventService(); + registrationToken = eventService.onVisibilityChanged.add(function (args) { + if (listener) { + var msg = { + visibilityMode: _convertVisibilityToVisibilityMode(args.visibility) + }; + listener(msg); + } + return null; + }); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, eventService.context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + addin.onVisibilityModeChanged = onVisibilityModeChanged; + var beforeDocumentCloseNotification; + (function (beforeDocumentCloseNotification) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + context._requestFlagModifier |= 64; + if (wacPartition) { + context._customData = 'WacPartition'; + } + return context; + } + function enable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.enable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.enable = enable; + function disable() { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + beforeCloseNotification.disable(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + beforeDocumentCloseNotification.disable = disable; + function onCloseActionCancelled(listener) { + return __awaiter(this, void 0, void 0, function () { + var isWac, context, beforeCloseNotification, registrationToken, ret; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + isWac = false; + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + isWac = true; + } + context = _createRequestContext(isWac); + beforeCloseNotification = OfficeCore.BeforeDocumentCloseNotification.newObject(context); + registrationToken = beforeCloseNotification.onBeforeCloseNotificationCancelled.add(function (args) { + if (listener) { + listener(); + } + return null; + }); + return [4, context.sync()]; + case 1: + _a.sent(); + ret = function () { + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + registrationToken.remove(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + }; + return [2, ret]; + } + }); + }); + } + beforeDocumentCloseNotification.onCloseActionCancelled = onCloseActionCancelled; + })(beforeDocumentCloseNotification = addin.beforeDocumentCloseNotification || (addin.beforeDocumentCloseNotification = {})); + })(addin = Office.addin || (Office.addin = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ExtensionComponentType; + (function (ExtensionComponentType) { + ExtensionComponentType["taskpane"] = "Taskpane"; + })(ExtensionComponentType || (ExtensionComponentType = {})); + var extensionLifeCycle; + (function (extensionLifeCycle) { + function _createRequestContext(wacPartition) { + var context = new OfficeCore.RequestContext(); + return context; + } + function launchTaskpane(launchOptions) { + return __awaiter(this, void 0, void 0, function () { + var context, extensionLifecycle, settings; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(false); + extensionLifecycle = OfficeCore.ExtensionLifeCycle.newObject(context); + settings = launchOptions.settings; + if (settings != undefined) { + launchOptions.settings = OSF.OUtil.serializeSettings(settings); + } + extensionLifecycle.launchExtensionComponent("", ExtensionComponentType.taskpane, launchOptions); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + extensionLifeCycle.launchTaskpane = launchTaskpane; + })(extensionLifeCycle = Office.extensionLifeCycle || (Office.extensionLifeCycle = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var ribbon; + (function (ribbon_1) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function requestUpdate(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + function processControls(parent) { + if (parent.controls !== undefined + && parent.controls.length !== undefined + && !!parent.controls.length) { + parent.controls + .filter(function (control) { return !(!control.id); }) + .forEach(function (control) { + var ribbonControl = ribbon.getButton(control.id); + if (control.enabled !== undefined && control.enabled !== null) { + ribbonControl.enabled = control.enabled; + } + }); + } + } + input.tabs + .filter(function (tab) { return !(!tab.id); }) + .forEach(function (tab) { + var ribbonTab = ribbon.getTab(tab.id); + if (tab.visible !== undefined && tab.visible !== null) { + ribbonTab.setVisibility(tab.visible); + } + if (!!tab.groups && !!tab.groups.length) { + tab.groups + .filter(function (group) { return !(!group.id); }) + .forEach(function (group) { + processControls(group); + }); + } + else { + processControls(tab); + } + }); + return requestContext.sync(); + } + ribbon_1.requestUpdate = requestUpdate; + function requestCreateControls(input) { + var requestContext = _createRequestContext(); + var ribbon = requestContext.ribbon; + var delay = function (milliseconds) { + return new Promise(function (resolve, _) { return setTimeout(function () { return resolve(); }, milliseconds); }); + }; + ribbon.executeRequestCreate(JSON.stringify(input)); + return delay(250) + .then(function () { return requestContext.sync(); }); + } + ribbon_1.requestCreateControls = requestCreateControls; + })(ribbon = Office.ribbon || (Office.ribbon = {})); +})(Office || (Office = {})); +var OfficeCore; +(function (OfficeCore) { + var _hostName = "Office"; + var _defaultApiSetName = "OfficeSharedApi"; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var AddinInternalServiceErrorCodes; + (function (AddinInternalServiceErrorCodes) { + AddinInternalServiceErrorCodes["generalException"] = "GeneralException"; + })(AddinInternalServiceErrorCodes || (AddinInternalServiceErrorCodes = {})); + var _libraryMetadataInternalServiceApi = { "version": "1.0.0", + "name": "OfficeCore", + "defaultApiSetName": "OfficeSharedApi", + "hostName": "Office", + "apiSets": [], + "strings": ["AddinInternalService"], + "enumTypes": [], + "clientObjectTypes": [[1, + 0, + 0, + 0, + [["notifyActionHandlerReady", + 0, + 2, + 0, + 4]], + 0, + 0, + 0, + 0, + "Microsoft.InternalService.AddinInternalService", + 4]] }; + var _builder = new OfficeExtension.LibraryBuilder({ metadata: _libraryMetadataInternalServiceApi, targetNamespaceObject: OfficeCore }); +})(OfficeCore || (OfficeCore = {})); +var Office; +(function (Office) { + var actionProxy; + (function (actionProxy) { + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _association; + var ActionMessageCategory = 2; + var ActionDispatchMessageType = 1000; + function init() { + if (typeof (OSF) !== "undefined" && OSF.DDA && OSF.DDA.RichApi && OSF.DDA.RichApi.richApiMessageManager) { + var context = new OfficeExtension.ClientRequestContext(); + return context.eventRegistration.register(5, "", _handleMessage); + } + } + function setActionAssociation(association) { + _association = association; + } + function _getFunction(functionName) { + if (functionName) { + var nameUpperCase = functionName.toUpperCase(); + var call = _association.mappings[nameUpperCase]; + if (!_isNullOrUndefined(call) && typeof (call) === "function") { + return call; + } + } + throw OfficeExtension.Utility.createRuntimeError("invalidOperation", "sourceData", "ActionProxy._getFunction"); + } + function _handleMessage(args) { + try { + OfficeExtension.Utility.log('ActionProxy._handleMessage'); + OfficeExtension.Utility.checkArgumentNull(args, "args"); + var entryArray = args.entries; + var invocationArray = []; + for (var i = 0; i < entryArray.length; i++) { + if (entryArray[i].messageCategory !== ActionMessageCategory) { + continue; + } + if (typeof (entryArray[i].message) === 'string') { + entryArray[i].message = JSON.parse(entryArray[i].message); + } + if (entryArray[i].messageType === ActionDispatchMessageType) { + var actionsArgs = null; + var actionName = entryArray[i].message[0]; + var call = _getFunction(actionName); + if (entryArray[i].message.length >= 2) { + var actionArgsJson = entryArray[i].message[1]; + if (actionArgsJson) { + if (_isJsonObjectString(actionArgsJson)) { + actionsArgs = JSON.parse(actionArgsJson); + } + else { + actionsArgs = actionArgsJson; + } + } + } + if (typeof (OSF) !== 'undefined' && + OSF.AppTelemetry && + OSF.AppTelemetry.CallOnAppActivatedIfPending) { + OSF.AppTelemetry.CallOnAppActivatedIfPending(); + } + call.apply(null, [actionsArgs]); + } + else { + OfficeExtension.Utility.log('ActionProxy._handleMessage unknown message type ' + entryArray[i].messageType); + } + } + } + catch (ex) { + _tryLog(ex); + throw ex; + } + return OfficeExtension.Utility._createPromiseFromResult(null); + } + function _isJsonObjectString(value) { + if (typeof value === 'string' && value[0] === '{') { + return true; + } + return false; + } + function toLogMessage(ex) { + var ret = 'Unknown Error'; + if (ex) { + try { + if (ex.toString) { + ret = ex.toString(); + } + ret = ret + ' ' + JSON.stringify(ex); + } + catch (otherEx) { + ret = 'Unexpected Error'; + } + } + return ret; + } + function _tryLog(ex) { + var message = toLogMessage(ex); + OfficeExtension.Utility.log(message); + } + function notifyActionHandlerReady() { + var context = new OfficeExtension.ClientRequestContext(); + var addinInternalService = OfficeCore.AddinInternalService.newObject(context); + context._customData = 'WacPartition'; + addinInternalService.notifyActionHandlerReady(); + return context.sync(); + } + function handlerOnReadyInternal() { + try { + Microsoft.Office.WebExtension.onReadyInternal() + .then(function () { + return init(); + }) + .then(function () { + var hostInfo = OSF._OfficeAppFactory.getHostInfo(); + if (hostInfo.isDialog === true || (hostInfo.hostPlatform === "web" && hostInfo.hostType !== "word" && hostInfo.hostType !== "excel")) { + return; + } + else { + return notifyActionHandlerReady(); + } + }); + } + catch (ex) { + } + } + function initFromHostBridge(hostBridge) { + hostBridge.addHostMessageHandler(function (bridgeMessage) { + if (bridgeMessage.type === 3) { + _handleMessage(bridgeMessage.message); + } + }); + } + function initOnce() { + OfficeExtension.Utility.log('ActionProxy.initOnce'); + if (typeof (Office.actions) != 'undefined') { + setActionAssociation(Office.actions._association); + } + if (typeof (document) !== 'undefined') { + if (document.readyState && document.readyState !== 'loading') { + OfficeExtension.Utility.log('ActionProxy.initOnce: document.readyState is not loading state'); + handlerOnReadyInternal(); + } + else if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", function () { + OfficeExtension.Utility.log('ActionProxy.initOnce: DOMContentLoaded event triggered'); + handlerOnReadyInternal(); + }); + } + } + OfficeExtension.HostBridge.onInited(function (hostBridge) { + initFromHostBridge(hostBridge); + }); + } + initOnce(); + })(actionProxy || (actionProxy = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var actions; + (function (actions) { + function _createRequestContext() { + var context = new OfficeCore.RequestContext(); + if (OSF._OfficeAppFactory.getHostInfo().hostPlatform == 'web') { + context._customData = 'WacPartition'; + } + return context; + } + function areShortcutsInUse(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, inUseArray, inUseInfoArray, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + inUseArray = actionService.areShortcutsInUse(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + inUseInfoArray = []; + for (i = 0; i < shortcuts.length; i++) { + inUseInfoArray.push({ + shortcut: shortcuts[i], + inUse: inUseArray.value[i] + }); + } + return [2, inUseInfoArray]; + } + }); + }); + } + actions.areShortcutsInUse = areShortcutsInUse; + function replaceShortcuts(shortcuts) { + return __awaiter(this, void 0, void 0, function () { + var context, actionService; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + actionService.replaceShortcuts(shortcuts); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + actions.replaceShortcuts = replaceShortcuts; + function getShortcuts() { + return __awaiter(this, void 0, void 0, function () { + var context, actionService, shortcuts; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = _createRequestContext(); + actionService = OfficeCore.ActionService.newObject(context); + shortcuts = actionService.getShortcuts(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, shortcuts.value]; + } + }); + }); + } + actions.getShortcuts = getShortcuts; + })(actions = Office.actions || (Office.actions = {})); +})(Office || (Office = {})); +var Office; +(function (Office) { + var dialogPage; + (function (dialogPage_1) { + function close() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.close(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.close = close; + function readyToShow() { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.readyToShow(); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.readyToShow = readyToShow; + function onShow(callback) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage, removeListener; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.onOnShowEvent.add(callback); + removeListener = function () { + dialogPage.onOnShowEvent.remove(callback); + return null; + }; + return [4, context.sync()]; + case 1: + _a.sent(); + return [2, removeListener]; + } + }); + }); + } + dialogPage_1.onShow = onShow; + function sendMessageToHost(message) { + return __awaiter(this, void 0, void 0, function () { + var context, dialogPage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + context = new OfficeCore.RequestContext(); + dialogPage = OfficeCore.DialogPage.newObject(context); + dialogPage.sendMessageToHost(message); + return [4, context.sync()]; + case 1: + _a.sent(); + return [2]; + } + }); + }); + } + dialogPage_1.sendMessageToHost = sendMessageToHost; + })(dialogPage = Office.dialogPage || (Office.dialogPage = {})); +})(Office || (Office = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var Visio; +(function (Visio) { + var _hostName = "Visio"; + var _defaultApiSetName = ""; + var _createPropertyObject = OfficeExtension.BatchApiHelper.createPropertyObject; + var _createMethodObject = OfficeExtension.BatchApiHelper.createMethodObject; + var _createIndexerObject = OfficeExtension.BatchApiHelper.createIndexerObject; + var _createRootServiceObject = OfficeExtension.BatchApiHelper.createRootServiceObject; + var _createTopLevelServiceObject = OfficeExtension.BatchApiHelper.createTopLevelServiceObject; + var _createChildItemObject = OfficeExtension.BatchApiHelper.createChildItemObject; + var _invokeMethod = OfficeExtension.BatchApiHelper.invokeMethod; + var _invokeEnsureUnchanged = OfficeExtension.BatchApiHelper.invokeEnsureUnchanged; + var _invokeSetProperty = OfficeExtension.BatchApiHelper.invokeSetProperty; + var _isNullOrUndefined = OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined = OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded = OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported = OfficeExtension.Utility.throwIfApiNotSupported; + var _load = OfficeExtension.Utility.load; + var _retrieve = OfficeExtension.Utility.retrieve; + var _toJson = OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary = OfficeExtension.Utility.fixObjectPathIfNecessary; + var _handleNavigationPropertyResults = OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime = OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult = OfficeExtension.Utility.processRetrieveResult; + var _setMockData = OfficeExtension.Utility.setMockData; + var _calculateApiFlags = OfficeExtension.CommonUtility.calculateApiFlags; + var _typeApplication = "Application"; + var Application = (function (_super) { + __extends(Application, _super); + function Application() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Application.prototype, "_className", { + get: function () { + return "Application"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Application.prototype, "_scalarPropertyNames", { + get: function () { + return ["showBorders", "showToolbars"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Application.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["ShowBorders", "ShowToolbars"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Application.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Application.prototype, "showBorders", { + get: function () { + _throwIfNotLoaded("showBorders", this._S, _typeApplication, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "ShowBorders", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Application.prototype, "showToolbars", { + get: function () { + _throwIfNotLoaded("showToolbars", this._Sh, _typeApplication, this._isNull); + return this._Sh; + }, + set: function (value) { + this._Sh = value; + _invokeSetProperty(this, "ShowToolbars", value, 0); + }, + enumerable: true, + configurable: true + }); + Application.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["showBorders", "showToolbars"], [], []); + }; + Application.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Application.prototype.showToolbar = function (id, show) { + _invokeMethod(this, "ShowToolbar", 0, [id, show], 0, 0); + }; + Application.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["ShowBorders"])) { + this._S = obj["ShowBorders"]; + } + if (!_isUndefined(obj["ShowToolbars"])) { + this._Sh = obj["ShowToolbars"]; + } + }; + Application.prototype.load = function (options) { + return _load(this, options); + }; + Application.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Application.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Application.prototype.toJSON = function () { + return _toJson(this, { + "showBorders": this._S, + "showToolbars": this._Sh + }, {}); + }; + Application.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Application.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Application; + }(OfficeExtension.ClientObject)); + Visio.Application = Application; + var _typeDocument = "Document"; + var Document = (function (_super) { + __extends(Document, _super); + function Document() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Document.prototype, "_className", { + get: function () { + return "Document"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Document.prototype, "_navigationPropertyNames", { + get: function () { + return ["view", "application", "pages"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Document.prototype, "application", { + get: function () { + if (!this._A) { + this._A = _createPropertyObject(Visio.Application, this, "Application", false, 4); + } + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Document.prototype, "pages", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(Visio.PageCollection, this, "Pages", true, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Document.prototype, "view", { + get: function () { + if (!this._V) { + this._V = _createPropertyObject(Visio.DocumentView, this, "View", false, 4); + } + return this._V; + }, + enumerable: true, + configurable: true + }); + Document.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, [], ["view", "application"], [ + "pages" + ]); + }; + Document.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Document.prototype.getActivePage = function () { + return _createMethodObject(Visio.Page, this, "GetActivePage", 1, [], false, false, null, 4); + }; + Document.prototype.setActivePage = function (PageName) { + _invokeMethod(this, "SetActivePage", 1, [PageName], 4, 0); + }; + Document.prototype.showTaskPane = function (taskPaneType, initialProps, show) { + _invokeMethod(this, "ShowTaskPane", 1, [taskPaneType, initialProps, show], 4, 0); + }; + Document.prototype.startDataRefresh = function () { + _invokeMethod(this, "StartDataRefresh", 1, [], 4, 0); + }; + Document.prototype._RegisterDataVisualizerDiagramOperationCompletedEvent = function () { + _invokeMethod(this, "_RegisterDataVisualizerDiagramOperationCompletedEvent", 0, [], 0, 0); + }; + Document.prototype._UnregisterDataVisualizerDiagramOperationCompletedEvent = function () { + _invokeMethod(this, "_UnregisterDataVisualizerDiagramOperationCompletedEvent", 0, [], 0, 0); + }; + Document.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["application", "Application", "pages", "Pages", "view", "View"]); + }; + Document.prototype.load = function (options) { + return _load(this, options); + }; + Document.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Document.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Object.defineProperty(Document.prototype, "onDataRefreshComplete", { + get: function () { + var _this = this; + if (!this.m_dataRefreshComplete) { + this.m_dataRefreshComplete = new OfficeExtension.EventHandlers(this.context, this, "DataRefreshComplete", { + registerFunc: function (handlerCallback) { + return _this.context.eventRegistration.register(3, "", handlerCallback); + }, + unregisterFunc: function (handlerCallback) { + return _this.context.eventRegistration.unregister(3, "", handlerCallback); + }, + eventArgsTransformFunc: function (args) { + var evt = { + document: this, + success: args.ddaBinding.Object.success + }; + return OfficeExtension.Utility._createPromiseFromResult(evt); + } + }); + } + return this.m_dataRefreshComplete; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Document.prototype, "onDataVisualizerDiagramOperationCompleted", { + get: function () { + if (!this.m_dataVisualizerDiagramOperationCompleted) { + this.m_dataVisualizerDiagramOperationCompleted = new OfficeExtension.EventHandlers(this.context, this, "DataVisualizerDiagramOperationCompleted", null); + } + return this.m_dataVisualizerDiagramOperationCompleted; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Document.prototype, "onDocumentError", { + get: function () { + var _this = this; + if (!this.m_documentError) { + this.m_documentError = new OfficeExtension.EventHandlers(this.context, this, "DocumentError", { + registerFunc: function (handlerCallback) { + return _this.context.eventRegistration.register(15, "", handlerCallback); + }, + unregisterFunc: function (handlerCallback) { + return _this.context.eventRegistration.unregister(15, "", handlerCallback); + }, + eventArgsTransformFunc: function (args) { + return OfficeExtension.Utility._createPromiseFromResult(args.ddaBinding.Object); + } + }); + } + return this.m_documentError; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Document.prototype, "onDocumentLoadComplete", { + get: function () { + var _this = this; + if (!this.m_documentLoadComplete) { + this.m_documentLoadComplete = new OfficeExtension.EventHandlers(this.context, this, "DocumentLoadComplete", { + registerFunc: function (handlerCallback) { + return _this.context.eventRegistration.register(7, "", handlerCallback); + }, + unregisterFunc: function (handlerCallback) { + return _this.context.eventRegistration.unregister(7, "", handlerCallback); + }, + eventArgsTransformFunc: function (args) { + var evt = { + success: args.ddaBinding.Object.success + }; + return OfficeExtension.Utility._createPromiseFromResult(evt); + } + }); + } + return this.m_documentLoadComplete; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Document.prototype, "onPageLoadComplete", { + get: function () { + var _this = this; + if (!this.m_pageLoadComplete) { + this.m_pageLoadComplete = new OfficeExtension.EventHandlers(this.context, this, "PageLoadComplete", { + registerFunc: function (handlerCallback) { + return _this.context.eventRegistration.register(1, "", handlerCallback); + }, + unregisterFunc: function (handlerCallback) { + return _this.context.eventRegistration.unregister(1, "", handlerCallback); + }, + eventArgsTransformFunc: function (args) { + return OfficeExtension.Utility._createPromiseFromResult(args.ddaBinding.Object); + } + }); + } + return this.m_pageLoadComplete; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Document.prototype, "onSelectionChanged", { + get: function () { + var _this = this; + if (!this.m_selectionChanged) { + this.m_selectionChanged = new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { + registerFunc: function (handlerCallback) { + return _this.context.eventRegistration.register(2, "", handlerCallback); + }, + unregisterFunc: function (handlerCallback) { + return _this.context.eventRegistration.unregister(2, "", handlerCallback); + }, + eventArgsTransformFunc: function (args) { + return OfficeExtension.Utility._createPromiseFromResult(args.ddaBinding.Object); + } + }); + } + return this.m_selectionChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Document.prototype, "onShapeMouseEnter", { + get: function () { + var _this = this; + if (!this.m_shapeMouseEnter) { + this.m_shapeMouseEnter = new OfficeExtension.EventHandlers(this.context, this, "ShapeMouseEnter", { + registerFunc: function (handlerCallback) { + return _this.context.eventRegistration.register(4, "", handlerCallback); + }, + unregisterFunc: function (handlerCallback) { + return _this.context.eventRegistration.unregister(4, "", handlerCallback); + }, + eventArgsTransformFunc: function (args) { + return OfficeExtension.Utility._createPromiseFromResult(args.ddaBinding.Object); + } + }); + } + return this.m_shapeMouseEnter; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Document.prototype, "onShapeMouseLeave", { + get: function () { + var _this = this; + if (!this.m_shapeMouseLeave) { + this.m_shapeMouseLeave = new OfficeExtension.EventHandlers(this.context, this, "ShapeMouseLeave", { + registerFunc: function (handlerCallback) { + return _this.context.eventRegistration.register(5, "", handlerCallback); + }, + unregisterFunc: function (handlerCallback) { + return _this.context.eventRegistration.unregister(5, "", handlerCallback); + }, + eventArgsTransformFunc: function (args) { + return OfficeExtension.Utility._createPromiseFromResult(args.ddaBinding.Object); + } + }); + } + return this.m_shapeMouseLeave; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Document.prototype, "onTaskPaneStateChanged", { + get: function () { + var _this = this; + if (!this.m_taskPaneStateChanged) { + this.m_taskPaneStateChanged = new OfficeExtension.EventHandlers(this.context, this, "TaskPaneStateChanged", { + registerFunc: function (handlerCallback) { + return _this.context.eventRegistration.register(18, "", handlerCallback); + }, + unregisterFunc: function (handlerCallback) { + return _this.context.eventRegistration.unregister(18, "", handlerCallback); + }, + eventArgsTransformFunc: function (args) { + return OfficeExtension.Utility._createPromiseFromResult(args.ddaBinding.Object); + } + }); + } + return this.m_taskPaneStateChanged; + }, + enumerable: true, + configurable: true + }); + Document.prototype.toJSON = function () { + return _toJson(this, {}, { + "application": this._A, + "pages": this._P, + "view": this._V + }); + }; + Document.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Document.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Document; + }(OfficeExtension.ClientObject)); + Visio.Document = Document; + var _typeDocumentView = "DocumentView"; + var DocumentView = (function (_super) { + __extends(DocumentView, _super); + function DocumentView() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DocumentView.prototype, "_className", { + get: function () { + return "DocumentView"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentView.prototype, "_scalarPropertyNames", { + get: function () { + return ["disableHyperlinks", "disableZoom", "disablePan", "hideDiagramBoundary", "disablePanZoomWindow"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentView.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["DisableHyperlinks", "DisableZoom", "DisablePan", "HideDiagramBoundary", "DisablePanZoomWindow"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentView.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentView.prototype, "disableHyperlinks", { + get: function () { + _throwIfNotLoaded("disableHyperlinks", this._D, _typeDocumentView, this._isNull); + return this._D; + }, + set: function (value) { + this._D = value; + _invokeSetProperty(this, "DisableHyperlinks", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentView.prototype, "disablePan", { + get: function () { + _throwIfNotLoaded("disablePan", this._Di, _typeDocumentView, this._isNull); + return this._Di; + }, + set: function (value) { + this._Di = value; + _invokeSetProperty(this, "DisablePan", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentView.prototype, "disablePanZoomWindow", { + get: function () { + _throwIfNotLoaded("disablePanZoomWindow", this._Dis, _typeDocumentView, this._isNull); + return this._Dis; + }, + set: function (value) { + this._Dis = value; + _invokeSetProperty(this, "DisablePanZoomWindow", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentView.prototype, "disableZoom", { + get: function () { + _throwIfNotLoaded("disableZoom", this._Disa, _typeDocumentView, this._isNull); + return this._Disa; + }, + set: function (value) { + this._Disa = value; + _invokeSetProperty(this, "DisableZoom", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentView.prototype, "hideDiagramBoundary", { + get: function () { + _throwIfNotLoaded("hideDiagramBoundary", this._H, _typeDocumentView, this._isNull); + return this._H; + }, + set: function (value) { + this._H = value; + _invokeSetProperty(this, "HideDiagramBoundary", value, 0); + }, + enumerable: true, + configurable: true + }); + DocumentView.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["disableHyperlinks", "disableZoom", "disablePan", "hideDiagramBoundary", "disablePanZoomWindow"], [], []); + }; + DocumentView.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + DocumentView.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["DisableHyperlinks"])) { + this._D = obj["DisableHyperlinks"]; + } + if (!_isUndefined(obj["DisablePan"])) { + this._Di = obj["DisablePan"]; + } + if (!_isUndefined(obj["DisablePanZoomWindow"])) { + this._Dis = obj["DisablePanZoomWindow"]; + } + if (!_isUndefined(obj["DisableZoom"])) { + this._Disa = obj["DisableZoom"]; + } + if (!_isUndefined(obj["HideDiagramBoundary"])) { + this._H = obj["HideDiagramBoundary"]; + } + }; + DocumentView.prototype.load = function (options) { + return _load(this, options); + }; + DocumentView.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + DocumentView.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DocumentView.prototype.toJSON = function () { + return _toJson(this, { + "disableHyperlinks": this._D, + "disablePan": this._Di, + "disablePanZoomWindow": this._Dis, + "disableZoom": this._Disa, + "hideDiagramBoundary": this._H + }, {}); + }; + DocumentView.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + DocumentView.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return DocumentView; + }(OfficeExtension.ClientObject)); + Visio.DocumentView = DocumentView; + var _typePage = "Page"; + var Page = (function (_super) { + __extends(Page, _super); + function Page() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Page.prototype, "_className", { + get: function () { + return "Page"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "_scalarPropertyNames", { + get: function () { + return ["index", "name", "isBackground", "width", "height"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Index", "Name", "IsBackground", "Width", "Height"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "_navigationPropertyNames", { + get: function () { + return ["shapes", "view", "comments", "allShapes", "dataVisualizerDiagrams"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "allShapes", { + get: function () { + if (!this._A) { + this._A = _createPropertyObject(Visio.ShapeCollection, this, "AllShapes", true, 4); + } + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "comments", { + get: function () { + if (!this._C) { + this._C = _createPropertyObject(Visio.CommentCollection, this, "Comments", true, 4); + } + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "dataVisualizerDiagrams", { + get: function () { + if (!this._D) { + this._D = _createPropertyObject(Visio.DataVisualizerDiagramCollection, this, "DataVisualizerDiagrams", true, 4); + } + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "shapes", { + get: function () { + if (!this._S) { + this._S = _createPropertyObject(Visio.ShapeCollection, this, "Shapes", true, 4); + } + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "view", { + get: function () { + if (!this._V) { + this._V = _createPropertyObject(Visio.PageView, this, "View", false, 4); + } + return this._V; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "height", { + get: function () { + _throwIfNotLoaded("height", this._H, _typePage, this._isNull); + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "index", { + get: function () { + _throwIfNotLoaded("index", this._I, _typePage, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "isBackground", { + get: function () { + _throwIfNotLoaded("isBackground", this._Is, _typePage, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "name", { + get: function () { + _throwIfNotLoaded("name", this._N, _typePage, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Page.prototype, "width", { + get: function () { + _throwIfNotLoaded("width", this._W, _typePage, this._isNull); + return this._W; + }, + enumerable: true, + configurable: true + }); + Page.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, [], ["view"], [ + "allShapes", + "comments", + "dataVisualizerDiagrams", + "shapes" + ]); + }; + Page.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Page.prototype.activate = function () { + _invokeMethod(this, "Activate", 1, [], 4, 0); + }; + Page.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Height"])) { + this._H = obj["Height"]; + } + if (!_isUndefined(obj["Index"])) { + this._I = obj["Index"]; + } + if (!_isUndefined(obj["IsBackground"])) { + this._Is = obj["IsBackground"]; + } + if (!_isUndefined(obj["Name"])) { + this._N = obj["Name"]; + } + if (!_isUndefined(obj["Width"])) { + this._W = obj["Width"]; + } + _handleNavigationPropertyResults(this, obj, ["allShapes", "AllShapes", "comments", "Comments", "dataVisualizerDiagrams", "DataVisualizerDiagrams", "shapes", "Shapes", "view", "View"]); + }; + Page.prototype.load = function (options) { + return _load(this, options); + }; + Page.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Page.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Page.prototype.toJSON = function () { + return _toJson(this, { + "height": this._H, + "index": this._I, + "isBackground": this._Is, + "name": this._N, + "width": this._W + }, { + "allShapes": this._A, + "comments": this._C, + "dataVisualizerDiagrams": this._D, + "shapes": this._S, + "view": this._V + }); + }; + Page.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Page.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Page; + }(OfficeExtension.ClientObject)); + Visio.Page = Page; + var _typePageView = "PageView"; + var PageView = (function (_super) { + __extends(PageView, _super); + function PageView() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PageView.prototype, "_className", { + get: function () { + return "PageView"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PageView.prototype, "_scalarPropertyNames", { + get: function () { + return ["zoom"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PageView.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Zoom"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PageView.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PageView.prototype, "zoom", { + get: function () { + _throwIfNotLoaded("zoom", this._Z, _typePageView, this._isNull); + return this._Z; + }, + set: function (value) { + this._Z = value; + _invokeSetProperty(this, "Zoom", value, 0); + }, + enumerable: true, + configurable: true + }); + PageView.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["zoom"], [], []); + }; + PageView.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + PageView.prototype.centerViewportOnShape = function (ShapeId) { + _invokeMethod(this, "CenterViewportOnShape", 1, [ShapeId], 4, 0); + }; + PageView.prototype.fitToWindow = function () { + _invokeMethod(this, "FitToWindow", 1, [], 4, 0); + }; + PageView.prototype.getPosition = function () { + return _invokeMethod(this, "GetPosition", 1, [], 4, 0); + }; + PageView.prototype.getSelection = function () { + return _createMethodObject(Visio.Selection, this, "GetSelection", 1, [], false, false, null, 4); + }; + PageView.prototype.isShapeInViewport = function (Shape) { + return _invokeMethod(this, "IsShapeInViewport", 1, [Shape], 4, 0); + }; + PageView.prototype.setPosition = function (Position) { + _invokeMethod(this, "SetPosition", 1, [Position], 4, 0); + }; + PageView.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Zoom"])) { + this._Z = obj["Zoom"]; + } + }; + PageView.prototype.load = function (options) { + return _load(this, options); + }; + PageView.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PageView.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + PageView.prototype.toJSON = function () { + return _toJson(this, { + "zoom": this._Z + }, {}); + }; + PageView.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + PageView.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return PageView; + }(OfficeExtension.ClientObject)); + Visio.PageView = PageView; + var _typePageCollection = "PageCollection"; + var PageCollection = (function (_super) { + __extends(PageCollection, _super); + function PageCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PageCollection.prototype, "_className", { + get: function () { + return "PageCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PageCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PageCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typePageCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + PageCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + PageCollection.prototype.getItem = function (key) { + return _createIndexerObject(Visio.Page, this, [key]); + }; + PageCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(Visio.Page, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + PageCollection.prototype.load = function (options) { + return _load(this, options); + }; + PageCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + PageCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(Visio.Page, true, _this, childItemData, index); }); + }; + PageCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + PageCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(Visio.Page, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return PageCollection; + }(OfficeExtension.ClientObject)); + Visio.PageCollection = PageCollection; + var _typeShapeCollection = "ShapeCollection"; + var ShapeCollection = (function (_super) { + __extends(ShapeCollection, _super); + function ShapeCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ShapeCollection.prototype, "_className", { + get: function () { + return "ShapeCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeShapeCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + ShapeCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + ShapeCollection.prototype.getItem = function (key) { + return _createIndexerObject(Visio.Shape, this, [key]); + }; + ShapeCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(Visio.Shape, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + ShapeCollection.prototype.load = function (options) { + return _load(this, options); + }; + ShapeCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + ShapeCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(Visio.Shape, true, _this, childItemData, index); }); + }; + ShapeCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + ShapeCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(Visio.Shape, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return ShapeCollection; + }(OfficeExtension.ClientObject)); + Visio.ShapeCollection = ShapeCollection; + var _typeShape = "Shape"; + var Shape = (function (_super) { + __extends(Shape, _super); + function Shape() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Shape.prototype, "_className", { + get: function () { + return "Shape"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "id", "text", "select", "isBoundToData"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Name", "Id", "Text", "Select", "IsBoundToData"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, false, false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "_navigationPropertyNames", { + get: function () { + return ["hyperlinks", "shapeDataItems", "view", "subShapes", "comments"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "comments", { + get: function () { + if (!this._C) { + this._C = _createPropertyObject(Visio.CommentCollection, this, "Comments", true, 4); + } + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "hyperlinks", { + get: function () { + if (!this._H) { + this._H = _createPropertyObject(Visio.HyperlinkCollection, this, "Hyperlinks", true, 4); + } + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "shapeDataItems", { + get: function () { + if (!this._Sh) { + this._Sh = _createPropertyObject(Visio.ShapeDataItemCollection, this, "ShapeDataItems", true, 4); + } + return this._Sh; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "subShapes", { + get: function () { + if (!this._Su) { + this._Su = _createPropertyObject(Visio.ShapeCollection, this, "SubShapes", true, 4); + } + return this._Su; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "view", { + get: function () { + if (!this._V) { + this._V = _createPropertyObject(Visio.ShapeView, this, "View", false, 4); + } + return this._V; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeShape, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "isBoundToData", { + get: function () { + _throwIfNotLoaded("isBoundToData", this._Is, _typeShape, this._isNull); + return this._Is; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "name", { + get: function () { + _throwIfNotLoaded("name", this._N, _typeShape, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "select", { + get: function () { + _throwIfNotLoaded("select", this._S, _typeShape, this._isNull); + return this._S; + }, + set: function (value) { + this._S = value; + _invokeSetProperty(this, "Select", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Shape.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeShape, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Shape.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["select"], ["view"], [ + "comments", + "hyperlinks", + "shapeDataItems", + "subShapes" + ]); + }; + Shape.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Shape.prototype.getBounds = function () { + return _invokeMethod(this, "GetBounds", 1, [], 4, 0); + }; + Shape.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I = obj["Id"]; + } + if (!_isUndefined(obj["IsBoundToData"])) { + this._Is = obj["IsBoundToData"]; + } + if (!_isUndefined(obj["Name"])) { + this._N = obj["Name"]; + } + if (!_isUndefined(obj["Select"])) { + this._S = obj["Select"]; + } + if (!_isUndefined(obj["Text"])) { + this._T = obj["Text"]; + } + _handleNavigationPropertyResults(this, obj, ["comments", "Comments", "hyperlinks", "Hyperlinks", "shapeDataItems", "ShapeDataItems", "subShapes", "SubShapes", "view", "View"]); + }; + Shape.prototype.load = function (options) { + return _load(this, options); + }; + Shape.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Shape.prototype._handleIdResult = function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I = value["Id"]; + } + }; + Shape.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Shape.prototype.toJSON = function () { + return _toJson(this, { + "id": this._I, + "isBoundToData": this._Is, + "name": this._N, + "select": this._S, + "text": this._T + }, { + "comments": this._C, + "hyperlinks": this._H, + "shapeDataItems": this._Sh, + "subShapes": this._Su, + "view": this._V + }); + }; + Shape.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Shape.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Shape; + }(OfficeExtension.ClientObject)); + Visio.Shape = Shape; + var _typeShapeView = "ShapeView"; + var ShapeView = (function (_super) { + __extends(ShapeView, _super); + function ShapeView() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ShapeView.prototype, "_className", { + get: function () { + return "ShapeView"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeView.prototype, "_scalarPropertyNames", { + get: function () { + return ["highlight"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeView.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Highlight"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeView.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeView.prototype, "highlight", { + get: function () { + _throwIfNotLoaded("highlight", this._H, _typeShapeView, this._isNull); + return this._H; + }, + set: function (value) { + this._H = value; + _invokeSetProperty(this, "Highlight", value, 0); + }, + enumerable: true, + configurable: true + }); + ShapeView.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["highlight"], [], []); + }; + ShapeView.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + ShapeView.prototype.addOverlay = function (OverlayType, Content, OverlayHorizontalAlignment, OverlayVerticalAlignment, Width, Height) { + return _invokeMethod(this, "AddOverlay", 1, [OverlayType, Content, OverlayHorizontalAlignment, OverlayVerticalAlignment, Width, Height], 4, 0); + }; + ShapeView.prototype.removeOverlay = function (OverlayId) { + _invokeMethod(this, "RemoveOverlay", 1, [OverlayId], 4, 0); + }; + ShapeView.prototype.setText = function (Text) { + _invokeMethod(this, "SetText", 0, [Text], 0, 0); + }; + ShapeView.prototype.showOverlay = function (overlayId, show) { + _invokeMethod(this, "ShowOverlay", 1, [overlayId, show], 4, 0); + }; + ShapeView.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Highlight"])) { + this._H = obj["Highlight"]; + } + }; + ShapeView.prototype.load = function (options) { + return _load(this, options); + }; + ShapeView.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + ShapeView.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ShapeView.prototype.toJSON = function () { + return _toJson(this, { + "highlight": this._H + }, {}); + }; + ShapeView.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + ShapeView.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return ShapeView; + }(OfficeExtension.ClientObject)); + Visio.ShapeView = ShapeView; + var _typeShapeDataItemCollection = "ShapeDataItemCollection"; + var ShapeDataItemCollection = (function (_super) { + __extends(ShapeDataItemCollection, _super); + function ShapeDataItemCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ShapeDataItemCollection.prototype, "_className", { + get: function () { + return "ShapeDataItemCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeDataItemCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeDataItemCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeShapeDataItemCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + ShapeDataItemCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + ShapeDataItemCollection.prototype.getItem = function (key) { + return _createIndexerObject(Visio.ShapeDataItem, this, [key]); + }; + ShapeDataItemCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(Visio.ShapeDataItem, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + ShapeDataItemCollection.prototype.load = function (options) { + return _load(this, options); + }; + ShapeDataItemCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + ShapeDataItemCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(Visio.ShapeDataItem, true, _this, childItemData, index); }); + }; + ShapeDataItemCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + ShapeDataItemCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(Visio.ShapeDataItem, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return ShapeDataItemCollection; + }(OfficeExtension.ClientObject)); + Visio.ShapeDataItemCollection = ShapeDataItemCollection; + var _typeShapeDataItem = "ShapeDataItem"; + var ShapeDataItem = (function (_super) { + __extends(ShapeDataItem, _super); + function ShapeDataItem() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ShapeDataItem.prototype, "_className", { + get: function () { + return "ShapeDataItem"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeDataItem.prototype, "_scalarPropertyNames", { + get: function () { + return ["label", "value", "format", "formattedValue"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeDataItem.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Label", "Value", "Format", "FormattedValue"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeDataItem.prototype, "format", { + get: function () { + _throwIfNotLoaded("format", this._F, _typeShapeDataItem, this._isNull); + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeDataItem.prototype, "formattedValue", { + get: function () { + _throwIfNotLoaded("formattedValue", this._Fo, _typeShapeDataItem, this._isNull); + return this._Fo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeDataItem.prototype, "label", { + get: function () { + _throwIfNotLoaded("label", this._L, _typeShapeDataItem, this._isNull); + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShapeDataItem.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeShapeDataItem, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + ShapeDataItem.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Format"])) { + this._F = obj["Format"]; + } + if (!_isUndefined(obj["FormattedValue"])) { + this._Fo = obj["FormattedValue"]; + } + if (!_isUndefined(obj["Label"])) { + this._L = obj["Label"]; + } + if (!_isUndefined(obj["Value"])) { + this._V = obj["Value"]; + } + }; + ShapeDataItem.prototype.load = function (options) { + return _load(this, options); + }; + ShapeDataItem.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + ShapeDataItem.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + ShapeDataItem.prototype.toJSON = function () { + return _toJson(this, { + "format": this._F, + "formattedValue": this._Fo, + "label": this._L, + "value": this._V + }, {}); + }; + ShapeDataItem.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + ShapeDataItem.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return ShapeDataItem; + }(OfficeExtension.ClientObject)); + Visio.ShapeDataItem = ShapeDataItem; + var _typeHyperlinkCollection = "HyperlinkCollection"; + var HyperlinkCollection = (function (_super) { + __extends(HyperlinkCollection, _super); + function HyperlinkCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(HyperlinkCollection.prototype, "_className", { + get: function () { + return "HyperlinkCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(HyperlinkCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(HyperlinkCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeHyperlinkCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + HyperlinkCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + HyperlinkCollection.prototype.getItem = function (Key) { + return _createIndexerObject(Visio.Hyperlink, this, [Key]); + }; + HyperlinkCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(Visio.Hyperlink, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + HyperlinkCollection.prototype.load = function (options) { + return _load(this, options); + }; + HyperlinkCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + HyperlinkCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(Visio.Hyperlink, true, _this, childItemData, index); }); + }; + HyperlinkCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + HyperlinkCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(Visio.Hyperlink, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return HyperlinkCollection; + }(OfficeExtension.ClientObject)); + Visio.HyperlinkCollection = HyperlinkCollection; + var _typeHyperlink = "Hyperlink"; + var Hyperlink = (function (_super) { + __extends(Hyperlink, _super); + function Hyperlink() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Hyperlink.prototype, "_className", { + get: function () { + return "Hyperlink"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Hyperlink.prototype, "_scalarPropertyNames", { + get: function () { + return ["address", "subAddress", "description", "extraInfo"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Hyperlink.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Address", "SubAddress", "Description", "ExtraInfo"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Hyperlink.prototype, "address", { + get: function () { + _throwIfNotLoaded("address", this._A, _typeHyperlink, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Hyperlink.prototype, "description", { + get: function () { + _throwIfNotLoaded("description", this._D, _typeHyperlink, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Hyperlink.prototype, "extraInfo", { + get: function () { + _throwIfNotLoaded("extraInfo", this._E, _typeHyperlink, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Hyperlink.prototype, "subAddress", { + get: function () { + _throwIfNotLoaded("subAddress", this._S, _typeHyperlink, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Hyperlink.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Address"])) { + this._A = obj["Address"]; + } + if (!_isUndefined(obj["Description"])) { + this._D = obj["Description"]; + } + if (!_isUndefined(obj["ExtraInfo"])) { + this._E = obj["ExtraInfo"]; + } + if (!_isUndefined(obj["SubAddress"])) { + this._S = obj["SubAddress"]; + } + }; + Hyperlink.prototype.load = function (options) { + return _load(this, options); + }; + Hyperlink.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Hyperlink.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Hyperlink.prototype.toJSON = function () { + return _toJson(this, { + "address": this._A, + "description": this._D, + "extraInfo": this._E, + "subAddress": this._S + }, {}); + }; + Hyperlink.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Hyperlink.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Hyperlink; + }(OfficeExtension.ClientObject)); + Visio.Hyperlink = Hyperlink; + var _typeCommentCollection = "CommentCollection"; + var CommentCollection = (function (_super) { + __extends(CommentCollection, _super); + function CommentCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CommentCollection.prototype, "_className", { + get: function () { + return "CommentCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CommentCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeCommentCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + CommentCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + CommentCollection.prototype.getItem = function (key) { + return _createIndexerObject(Visio.Comment, this, [key]); + }; + CommentCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(Visio.Comment, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + CommentCollection.prototype.load = function (options) { + return _load(this, options); + }; + CommentCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + CommentCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(Visio.Comment, true, _this, childItemData, index); }); + }; + CommentCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + CommentCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(Visio.Comment, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return CommentCollection; + }(OfficeExtension.ClientObject)); + Visio.CommentCollection = CommentCollection; + var _typeComment = "Comment"; + var Comment = (function (_super) { + __extends(Comment, _super); + function Comment() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Comment.prototype, "_className", { + get: function () { + return "Comment"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyNames", { + get: function () { + return ["author", "text", "date"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["Author", "Text", "Date"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "author", { + get: function () { + _throwIfNotLoaded("author", this._A, _typeComment, this._isNull); + return this._A; + }, + set: function (value) { + this._A = value; + _invokeSetProperty(this, "Author", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "date", { + get: function () { + _throwIfNotLoaded("date", this._D, _typeComment, this._isNull); + return this._D; + }, + set: function (value) { + this._D = value; + _invokeSetProperty(this, "Date", value, 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Comment.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeComment, this._isNull); + return this._T; + }, + set: function (value) { + this._T = value; + _invokeSetProperty(this, "Text", value, 0); + }, + enumerable: true, + configurable: true + }); + Comment.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, ["author", "text", "date"], [], []); + }; + Comment.prototype.update = function (properties) { + this._recursivelyUpdate(properties); + }; + Comment.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Author"])) { + this._A = obj["Author"]; + } + if (!_isUndefined(obj["Date"])) { + this._D = obj["Date"]; + } + if (!_isUndefined(obj["Text"])) { + this._T = obj["Text"]; + } + }; + Comment.prototype.load = function (options) { + return _load(this, options); + }; + Comment.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Comment.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Comment.prototype.toJSON = function () { + return _toJson(this, { + "author": this._A, + "date": this._D, + "text": this._T + }, {}); + }; + Comment.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + Comment.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return Comment; + }(OfficeExtension.ClientObject)); + Visio.Comment = Comment; + var _typeSelection = "Selection"; + var Selection = (function (_super) { + __extends(Selection, _super); + function Selection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Selection.prototype, "_className", { + get: function () { + return "Selection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Selection.prototype, "_navigationPropertyNames", { + get: function () { + return ["shapes"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Selection.prototype, "shapes", { + get: function () { + if (!this._S) { + this._S = _createPropertyObject(Visio.ShapeCollection, this, "Shapes", true, 4); + } + return this._S; + }, + enumerable: true, + configurable: true + }); + Selection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["shapes", "Shapes"]); + }; + Selection.prototype.load = function (options) { + return _load(this, options); + }; + Selection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + Selection.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + Selection.prototype.toJSON = function () { + return _toJson(this, {}, { + "shapes": this._S + }); + }; + return Selection; + }(OfficeExtension.ClientObject)); + Visio.Selection = Selection; + var _typeDataVisualizerDiagramCollection = "DataVisualizerDiagramCollection"; + var DataVisualizerDiagramCollection = (function (_super) { + __extends(DataVisualizerDiagramCollection, _super); + function DataVisualizerDiagramCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DataVisualizerDiagramCollection.prototype, "_className", { + get: function () { + return "DataVisualizerDiagramCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataVisualizerDiagramCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataVisualizerDiagramCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeDataVisualizerDiagramCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + DataVisualizerDiagramCollection.prototype.add = function (data, settings) { + return _createMethodObject(Visio.DataVisualizerDiagram, this, "Add", 1, [data, settings], false, true, null, 4); + }; + DataVisualizerDiagramCollection.prototype.addPreferred = function (data, diagramType) { + return _createMethodObject(Visio.DataVisualizerDiagram, this, "AddPreferred", 0, [data, diagramType], false, false, null, 0); + }; + DataVisualizerDiagramCollection.prototype.getCount = function () { + return _invokeMethod(this, "GetCount", 1, [], 4, 0); + }; + DataVisualizerDiagramCollection.prototype.getItem = function (key) { + return _createIndexerObject(Visio.DataVisualizerDiagram, this, [key]); + }; + DataVisualizerDiagramCollection.prototype.getItemAt = function (index) { + return _createMethodObject(Visio.DataVisualizerDiagram, this, "GetItemAt", 1, [index], false, false, null, 4); + }; + DataVisualizerDiagramCollection.prototype.getItemOrNullObject = function (key) { + return _createMethodObject(Visio.DataVisualizerDiagram, this, "GetItemOrNullObject", 1, [key], false, false, null, 4); + }; + DataVisualizerDiagramCollection.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items = []; + var _data = obj[OfficeExtension.Constants.items]; + for (var i = 0; i < _data.length; i++) { + var _item = _createChildItemObject(Visio.DataVisualizerDiagram, true, this, _data[i], i); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + DataVisualizerDiagramCollection.prototype.load = function (options) { + return _load(this, options); + }; + DataVisualizerDiagramCollection.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + DataVisualizerDiagramCollection.prototype._handleRetrieveResult = function (value, result) { + var _this = this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(Visio.DataVisualizerDiagram, true, _this, childItemData, index); }); + }; + DataVisualizerDiagramCollection.prototype.toJSON = function () { + return _toJson(this, {}, {}, this.m__items); + }; + DataVisualizerDiagramCollection.prototype.setMockData = function (data) { + var _this = this; + _setMockData(this, data, function (childItemData, index) { return _createChildItemObject(Visio.DataVisualizerDiagram, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; }); + }; + return DataVisualizerDiagramCollection; + }(OfficeExtension.ClientObject)); + Visio.DataVisualizerDiagramCollection = DataVisualizerDiagramCollection; + var _typeDataVisualizerDiagram = "DataVisualizerDiagram"; + var DataVisualizerDiagram = (function (_super) { + __extends(DataVisualizerDiagram, _super); + function DataVisualizerDiagram() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DataVisualizerDiagram.prototype, "_className", { + get: function () { + return "DataVisualizerDiagram"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataVisualizerDiagram.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "mappings", "type", "dataHeaders"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataVisualizerDiagram.prototype, "_scalarPropertyOriginalNames", { + get: function () { + return ["ID", "Mappings", "Type", "DataHeaders"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataVisualizerDiagram.prototype, "_navigationPropertyNames", { + get: function () { + return ["page"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataVisualizerDiagram.prototype, "page", { + get: function () { + if (!this._P) { + this._P = _createPropertyObject(Visio.Page, this, "Page", false, 4); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataVisualizerDiagram.prototype, "dataHeaders", { + get: function () { + _throwIfNotLoaded("dataHeaders", this._D, _typeDataVisualizerDiagram, this._isNull); + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataVisualizerDiagram.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeDataVisualizerDiagram, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataVisualizerDiagram.prototype, "mappings", { + get: function () { + _throwIfNotLoaded("mappings", this._M, _typeDataVisualizerDiagram, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataVisualizerDiagram.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typeDataVisualizerDiagram, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + DataVisualizerDiagram.prototype.set = function (properties, options) { + this._recursivelySet(properties, options, [], ["page"], []); + }; + DataVisualizerDiagram.prototype["delete"] = function () { + _invokeMethod(this, "Delete", 1, [], 4, 0); + }; + DataVisualizerDiagram.prototype.getDataColumnValuesAsString = function (columnName) { + return _invokeMethod(this, "GetDataColumnValuesAsString", 1, [columnName], 4, 0); + }; + DataVisualizerDiagram.prototype.setConnection = function (connectionInfo) { + _invokeMethod(this, "SetConnection", 1, [connectionInfo], 4, 0); + }; + DataVisualizerDiagram.prototype.update = function (data, mappings, ignoreConflicts) { + _invokeMethod(this, "Update", 1, [data, mappings, ignoreConflicts], 4, 0); + }; + DataVisualizerDiagram.prototype.updateMappings = function (mappings) { + _invokeMethod(this, "UpdateMappings", 1, [mappings], 4, 0); + }; + DataVisualizerDiagram.prototype._handleResult = function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj = value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["DataHeaders"])) { + this._D = obj["DataHeaders"]; + } + if (!_isUndefined(obj["ID"])) { + this._I = obj["ID"]; + } + if (!_isUndefined(obj["Mappings"])) { + this._M = obj["Mappings"]; + } + if (!_isUndefined(obj["Type"])) { + this._T = obj["Type"]; + } + _handleNavigationPropertyResults(this, obj, ["page", "Page"]); + }; + DataVisualizerDiagram.prototype.load = function (options) { + return _load(this, options); + }; + DataVisualizerDiagram.prototype.retrieve = function (option) { + return _retrieve(this, option); + }; + DataVisualizerDiagram.prototype._handleRetrieveResult = function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + DataVisualizerDiagram.prototype.toJSON = function () { + return _toJson(this, { + "dataHeaders": this._D, + "id": this._I, + "mappings": this._M, + "type": this._T + }, { + "page": this._P + }); + }; + DataVisualizerDiagram.prototype.setMockData = function (data) { + _setMockData(this, data); + }; + DataVisualizerDiagram.prototype.ensureUnchanged = function (data) { + _invokeEnsureUnchanged(this, data); + return; + }; + return DataVisualizerDiagram; + }(OfficeExtension.ClientObject)); + Visio.DataVisualizerDiagram = DataVisualizerDiagram; + var OverlayHorizontalAlignment; + (function (OverlayHorizontalAlignment) { + OverlayHorizontalAlignment["left"] = "Left"; + OverlayHorizontalAlignment["center"] = "Center"; + OverlayHorizontalAlignment["right"] = "Right"; + })(OverlayHorizontalAlignment = Visio.OverlayHorizontalAlignment || (Visio.OverlayHorizontalAlignment = {})); + var OverlayVerticalAlignment; + (function (OverlayVerticalAlignment) { + OverlayVerticalAlignment["top"] = "Top"; + OverlayVerticalAlignment["middle"] = "Middle"; + OverlayVerticalAlignment["bottom"] = "Bottom"; + })(OverlayVerticalAlignment = Visio.OverlayVerticalAlignment || (Visio.OverlayVerticalAlignment = {})); + var OverlayType; + (function (OverlayType) { + OverlayType["text"] = "Text"; + OverlayType["image"] = "Image"; + OverlayType["html"] = "Html"; + })(OverlayType = Visio.OverlayType || (Visio.OverlayType = {})); + var ToolBarType; + (function (ToolBarType) { + ToolBarType["commandBar"] = "CommandBar"; + ToolBarType["pageNavigationBar"] = "PageNavigationBar"; + ToolBarType["statusBar"] = "StatusBar"; + })(ToolBarType = Visio.ToolBarType || (Visio.ToolBarType = {})); + var DataVisualizerDiagramResultType; + (function (DataVisualizerDiagramResultType) { + DataVisualizerDiagramResultType["success"] = "Success"; + DataVisualizerDiagramResultType["unexpected"] = "Unexpected"; + DataVisualizerDiagramResultType["validationError"] = "ValidationError"; + DataVisualizerDiagramResultType["conflictError"] = "ConflictError"; + })(DataVisualizerDiagramResultType = Visio.DataVisualizerDiagramResultType || (Visio.DataVisualizerDiagramResultType = {})); + var DataVisualizerDiagramOperationType; + (function (DataVisualizerDiagramOperationType) { + DataVisualizerDiagramOperationType["unknown"] = "Unknown"; + DataVisualizerDiagramOperationType["create"] = "Create"; + DataVisualizerDiagramOperationType["updateMappings"] = "UpdateMappings"; + DataVisualizerDiagramOperationType["updateData"] = "UpdateData"; + DataVisualizerDiagramOperationType["update"] = "Update"; + DataVisualizerDiagramOperationType["delete"] = "Delete"; + })(DataVisualizerDiagramOperationType = Visio.DataVisualizerDiagramOperationType || (Visio.DataVisualizerDiagramOperationType = {})); + var DataVisualizerDiagramType; + (function (DataVisualizerDiagramType) { + DataVisualizerDiagramType["unknown"] = "Unknown"; + DataVisualizerDiagramType["basicFlowchart"] = "BasicFlowchart"; + DataVisualizerDiagramType["crossFunctionalFlowchart_Horizontal"] = "CrossFunctionalFlowchart_Horizontal"; + DataVisualizerDiagramType["crossFunctionalFlowchart_Vertical"] = "CrossFunctionalFlowchart_Vertical"; + DataVisualizerDiagramType["audit"] = "Audit"; + DataVisualizerDiagramType["orgChart"] = "OrgChart"; + DataVisualizerDiagramType["network"] = "Network"; + })(DataVisualizerDiagramType = Visio.DataVisualizerDiagramType || (Visio.DataVisualizerDiagramType = {})); + var ColumnType; + (function (ColumnType) { + ColumnType["unknown"] = "Unknown"; + ColumnType["string"] = "String"; + ColumnType["number"] = "Number"; + ColumnType["date"] = "Date"; + ColumnType["currency"] = "Currency"; + })(ColumnType = Visio.ColumnType || (Visio.ColumnType = {})); + var DataSourceType; + (function (DataSourceType) { + DataSourceType["unknown"] = "Unknown"; + DataSourceType["excel"] = "Excel"; + })(DataSourceType = Visio.DataSourceType || (Visio.DataSourceType = {})); + var CrossFunctionalFlowchartOrientation; + (function (CrossFunctionalFlowchartOrientation) { + CrossFunctionalFlowchartOrientation["horizontal"] = "Horizontal"; + CrossFunctionalFlowchartOrientation["vertical"] = "Vertical"; + })(CrossFunctionalFlowchartOrientation = Visio.CrossFunctionalFlowchartOrientation || (Visio.CrossFunctionalFlowchartOrientation = {})); + var LayoutVariant; + (function (LayoutVariant) { + LayoutVariant["unknown"] = "Unknown"; + LayoutVariant["pageDefault"] = "PageDefault"; + LayoutVariant["flowchart_TopToBottom"] = "Flowchart_TopToBottom"; + LayoutVariant["flowchart_BottomToTop"] = "Flowchart_BottomToTop"; + LayoutVariant["flowchart_LeftToRight"] = "Flowchart_LeftToRight"; + LayoutVariant["flowchart_RightToLeft"] = "Flowchart_RightToLeft"; + LayoutVariant["wideTree_DownThenRight"] = "WideTree_DownThenRight"; + LayoutVariant["wideTree_DownThenLeft"] = "WideTree_DownThenLeft"; + LayoutVariant["wideTree_RightThenDown"] = "WideTree_RightThenDown"; + LayoutVariant["wideTree_LeftThenDown"] = "WideTree_LeftThenDown"; + })(LayoutVariant = Visio.LayoutVariant || (Visio.LayoutVariant = {})); + var DataValidationErrorType; + (function (DataValidationErrorType) { + DataValidationErrorType["none"] = "None"; + DataValidationErrorType["columnNotMapped"] = "ColumnNotMapped"; + DataValidationErrorType["uniqueIdColumnError"] = "UniqueIdColumnError"; + DataValidationErrorType["swimlaneColumnError"] = "SwimlaneColumnError"; + DataValidationErrorType["delimiterError"] = "DelimiterError"; + DataValidationErrorType["connectorColumnError"] = "ConnectorColumnError"; + DataValidationErrorType["connectorColumnMappedElsewhere"] = "ConnectorColumnMappedElsewhere"; + DataValidationErrorType["connectorLabelColumnMappedElsewhere"] = "ConnectorLabelColumnMappedElsewhere"; + DataValidationErrorType["connectorColumnAndConnectorLabelMappedElsewhere"] = "ConnectorColumnAndConnectorLabelMappedElsewhere"; + })(DataValidationErrorType = Visio.DataValidationErrorType || (Visio.DataValidationErrorType = {})); + var ConnectorDirection; + (function (ConnectorDirection) { + ConnectorDirection["fromTarget"] = "FromTarget"; + ConnectorDirection["toTarget"] = "ToTarget"; + })(ConnectorDirection = Visio.ConnectorDirection || (Visio.ConnectorDirection = {})); + var TaskPaneType; + (function (TaskPaneType) { + TaskPaneType["none"] = "None"; + TaskPaneType["dataVisualizerProcessMappings"] = "DataVisualizerProcessMappings"; + TaskPaneType["dataVisualizerOrgChartMappings"] = "DataVisualizerOrgChartMappings"; + })(TaskPaneType = Visio.TaskPaneType || (Visio.TaskPaneType = {})); + var EventType; + (function (EventType) { + EventType["dataVisualizerDiagramOperationCompleted"] = "DataVisualizerDiagramOperationCompleted"; + })(EventType = Visio.EventType || (Visio.EventType = {})); + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes["accessDenied"] = "AccessDenied"; + ErrorCodes["generalException"] = "GeneralException"; + ErrorCodes["invalidArgument"] = "InvalidArgument"; + ErrorCodes["itemNotFound"] = "ItemNotFound"; + ErrorCodes["notImplemented"] = "NotImplemented"; + ErrorCodes["unsupportedOperation"] = "UnsupportedOperation"; + })(ErrorCodes = Visio.ErrorCodes || (Visio.ErrorCodes = {})); + var Interfaces; + (function (Interfaces) { + })(Interfaces = Visio.Interfaces || (Visio.Interfaces = {})); +})(Visio || (Visio = {})); +Object.defineProperty(OfficeExtension.SessionBase, "_overrideSession", { + get: function () { + if (this._overrideSessionInternal) { + return this._overrideSessionInternal; + } + if (OfficeExtension.ClientRequestContext) { + return (OfficeExtension.ClientRequestContext)._overrideSession; + } + return undefined; + }, + set: function (value) { + this._overrideSessionInternal = value; + }, + enumerable: true, + configurable: true +}); +var Visio; +(function (Visio) { + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + var _this = _super.call(this, url) || this; + _this.m_document = new Visio.Document(_this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(_this)); + _this._rootObject = _this.m_document; + return _this; + } + Object.defineProperty(RequestContext.prototype, "document", { + get: function () { + return this.m_document; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeCore.RequestContext)); + Visio.RequestContext = RequestContext; + function run(arg1, arg2, arg3) { + return OfficeExtension.ClientRequestContext._runBatch("Visio.run", arguments, function (requestInfo) { + var ret = new Visio.RequestContext(requestInfo); + return ret; + }); + } + Visio.run = run; +})(Visio || (Visio = {})); +OfficeExtension.Utility._doApiNotSupportedCheck = true; diff --git a/embedded/visio-web-embedded.js b/embedded/visio-web-embedded.js new file mode 100644 index 000000000..af23c0ca7 --- /dev/null +++ b/embedded/visio-web-embedded.js @@ -0,0 +1,26 @@ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. +*/ + +/* +* @overview es6-promise - a tiny implementation of Promises/A+. +* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +* @license Licensed under MIT license +* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE +* @version 2.3.0 +*/ + + +// Sources: +// osfweb: none +// runtime: 16.0\15303.10000 +// core: 16.0\15303.10000 +// host: 16.0.15302.34957 + + + +var OfficeExtension,__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){var t;!function(e){e.OfficeRequire=function(){return null}()}(e._Internal||(e._Internal={})),function(e){!function(t){t.Init=function(){return function(){"use strict";function t(e){return"function"===typeof e}var n,r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,o=function(e,t){l[i]=e,l[i+1]=t,2===(i+=2)&&(n?n(f):u())};var s=("undefined"!==typeof window?window:void 0)||{},a=(s.MutationObserver||s.WebKitMutationObserver,"undefined"!==typeof process&&"[object process]"==={}.toString.call(process)),c="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel;var u,l=new Array(1e3);function f(){for(var e=0;e=0&&(e=e.substring(t+5,e.length))<"14.14393"}()?e.PromiseImpl.Init():window.Promise:e.PromiseImpl.Init()}()}(t=e._Internal||(e._Internal={}));var n=t.OfficePromise;e.Promise=n}(OfficeExtension||(OfficeExtension={})),function(e){var t=function(){function e(){}return e.prototype._resolveRequestUrlAndHeaderInfo=function(){return u._createPromiseFromResult(null)},e.prototype._createRequestExecutorOrNull=function(){return null},e.prototype.getEventRegistration=function(e){return null},e}();e.SessionBase=t;var n=function(){function e(){}return e.setCustomSendRequestFunc=function(t){e.s_customSendRequestFunc=t},e.xhrSendRequestFunc=function(e){return u.createPromise((function(t,n){var i=new XMLHttpRequest;if(i.open(e.method,e.url),i.onload=function(){var e={statusCode:i.status,headers:u._parseHttpResponseHeaders(i.getAllResponseHeaders()),body:i.responseText};t(e)},i.onerror=function(){n(new r.RuntimeError({code:o.connectionFailure,httpStatusCode:i.status,message:u._getResourceString(s.connectionFailureWithStatus,i.statusText)}))},e.headers)for(var a in e.headers)i.setRequestHeader(a,e.headers[a]);i.send(u._getRequestBodyText(e))}))},e.fetchSendRequestFunc=function(e){var t=u._getRequestBodyText(e);return""===t&&(t=void 0),fetch(e.url,{method:e.method,headers:e.headers,body:t}).then((function(e){return e.text().then((function(t){var n=e.status,r={};return e.headers.forEach((function(e,t){r[t]=e})),{statusCode:n,headers:r,body:t}}))}))},e.sendRequest=function(t){e.validateAndNormalizeRequest(t);var n=e.s_customSendRequestFunc;return n||(n="undefined"!==typeof fetch?e.fetchSendRequestFunc:e.xhrSendRequestFunc),n(t)},e.setCustomSendLocalDocumentRequestFunc=function(t){e.s_customSendLocalDocumentRequestFunc=t},e.sendLocalDocumentRequest=function(t){return e.validateAndNormalizeRequest(t),(e.s_customSendLocalDocumentRequestFunc||e.officeJsSendLocalDocumentRequestFunc)(t)},e.officeJsSendLocalDocumentRequestFunc=function(e){e=u._validateLocalDocumentRequest(e);var t=u._buildRequestMessageSafeArray(e);return u.createPromise((function(e,n){OSF.DDA.RichApi.executeRichApiRequestAsync(t,(function(t){var n;n="succeeded"==t.status?{statusCode:c.getResponseStatusCode(t),headers:c.getResponseHeaders(t),body:c.getResponseBody(t)}:c.buildHttpResponseFromOfficeJsError(t.error.code,t.error.message),u.log("Response:"),u.log(JSON.stringify(n)),e(n)}))}))},e.validateAndNormalizeRequest=function(e){if(u.isNullOrUndefined(e))throw r.RuntimeError._createInvalidArgError({argumentName:"request"});u.isNullOrEmptyString(e.method)&&(e.method="GET"),e.method=e.method.toUpperCase();var t=!1;if("object"===typeof e.headers&&e.headers[a.testRequestNameHeader]&&(t=!0),!t){var n=l._getCurrentTestNameWithSequenceId();n&&(e.headers||(e.headers={}),e.headers[a.testRequestNameHeader]=n)}},e.logRequest=function(t){if(u._logEnabled){if(u.log("---HTTP Request---"),u.log(t.method+" "+t.url),t.headers)for(var n in t.headers)u.log(n+": "+t.headers[n]);e._logBodyEnabled&&u.log(u._getRequestBodyText(t))}},e.logResponse=function(t){if(u._logEnabled){if(u.log("---HTTP Response---"),u.log(""+t.statusCode),t.headers)for(var n in t.headers)u.log(n+": "+t.headers[n]);e._logBodyEnabled&&u.log(t.body)}},e._logBodyEnabled=!1,e}();e.HttpUtility=n;var r,i=function(){function e(e){var t=this;this.m_bridge=e,this.m_promiseResolver={},this.m_handlers=[],this.m_bridge.onMessageFromHost=function(e){var n=JSON.parse(e);if(3==n.type){var r=n.message;if(r&&r.entries)for(var i=0;i=0){var o=t.url.substr(i+1),s=u._parseRequestFlagsAndCustomDataFromQueryStringIfAny(o);s.flags>=0&&(n=s.flags)}"string"===typeof t.body&&(t.body=JSON.parse(t.body));var a={id:e.nextId(),type:1,flags:n,message:t};return r.sendMessageToHostAndExpectResponse(a).then((function(e){return e.message}))}));for(var i=0;i=0&&this.m_handlers.splice(t,1)},e.onInited=function(t){e.s_onInitedHandlers.push(t),e.s_instance&&t(e.s_instance)},e.prototype.dispatchMessage=function(e){if("number"===typeof e.id){var t=this.m_promiseResolver[e.id];if(t)return t(e),void delete this.m_promiseResolver[e.id]}for(var n=0;n0},e._getLocalDocumentUrlPrefixLength=function(e){for(var t=["http://document.localhost","https://document.localhost","//document.localhost"],n=e.toLowerCase().trim(),r=0;r0){var o=t.url.substr(i+1),s=e._parseRequestFlagsAndCustomDataFromQueryStringIfAny(o);s.flags>=0&&(n=s.flags),r=s.customData}}return c.buildRequestMessageSafeArray(r,n,t.method,t.url,t.headers,e._getRequestBodyText(t))},e._parseHttpResponseHeaders=function(t){var n={};if(!e.isNullOrEmptyString(t))for(var r=new RegExp("\r?\n"),i=t.split(r),o=0;o0){var c=s.substr(0,a),u=s.substr(a+1);c=e.trim(c),u=e.trim(u),n[c.toUpperCase()]=u}}}return n},e._parseErrorResponse=function(t){var n=e._parseErrorResponseBody(t),r=t.statusCode.toString();if(e.isNullOrUndefined(n)||"object"!==typeof n||!n.error)return e._createDefaultErrorResponse(r);var i=n.error,o=i.innerError;return o&&o.code?e._createErrorResponse(o.code,r,o.message):i.code?e._createErrorResponse(i.code,r,i.message):e._createDefaultErrorResponse(r)},e._parseErrorResponseBody=function(t){if(e.isPlainJsonObject(t.body))return t.body;if(!e.isNullOrEmptyString(t.body)){var n=e.trim(t.body);try{return JSON.parse(n)}catch(t){e.log("Error when parse "+n)}}},e._createDefaultErrorResponse=function(t){return{errorCode:o.connectionFailure,errorMessage:e._getResourceString(s.connectionFailureWithStatus,t)}},e._createErrorResponse=function(t,n,r){return{errorCode:t,errorMessage:e._getResourceString(s.connectionFailureWithDetails,[n,t,r])}},e._copyHeaders=function(e,t){if(e&&t)for(var n in e)t[n]=e[n]},e.addResourceStringValues=function(t){for(var n in t)e.s_resourceStringValues[n]=t[n]},e._logEnabled=!1,e.s_resourceStringValues={ApiNotFoundDetails:"The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",ConnectionFailureWithStatus:"The request failed with status code of {0}.",ConnectionFailureWithDetails:"The request failed with status code of {0}, error code {1} and the following error message: {2}",InvalidArgument:"The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",InvalidObjectPath:'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',InvalidRequestContext:"Cannot use the object across different request contexts.",Timeout:"The operation has timed out.",ValueNotLoaded:'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'},e}();e.CoreUtility=u;var l=function(){function e(){}return e.setMock=function(t){e.s_isMock=t},e.isMock=function(){return e.s_isMock},e._setCurrentTestName=function(t){e.s_currentTestName=t,e.s_currentTestSequenceId=0},e._getCurrentTestNameWithSequenceId=function(){return e.s_currentTestName?(e.s_currentTestSequenceId++,e.s_currentTestName+"."+e.s_currentTestSequenceId):null},e}();e.TestUtility=l,e._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!0,enableUndoableFlag:!0,appendTypeNameToObjectPathInfo:!1,enablePreviewExecution:!1},e.config={extendedErrorLogging:!1};var f=function(){function t(){}return t.createSetPropertyAction=function(t,n,r,i,o){P.validateObjectPath(n);var s={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:n._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=[i],c=P.setMethodArguments(t,s.ArgumentInfo,a);P.validateReferencedObjectPaths(c);var u=new h(s,0,o);if(u.referencedObjectPath=n._objectPath,u.referencedArgumentObjectPaths=c,e._internalConfig.enablePreviewExecution&&0!==(16&o)){var l={Id:t._nextId(),ActionType:4,Name:r,ObjectId:"",ObjectType:"",Arguments:[i]};n._addPreviewExecutionAction(l)}return n._addAction(u)},t.createQueryAction=function(e,t,n,r){P.validateObjectPath(t);var i={Id:e._nextId(),ActionType:2,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},o=new h(i,1,4);return o.referencedObjectPath=t._objectPath,t._addAction(o,r)},t.createQueryAsJsonAction=function(e,t,n,r){P.validateObjectPath(t);var i={Id:e._nextId(),ActionType:7,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},o=new h(i,1,4);return o.referencedObjectPath=t._objectPath,t._addAction(o,r)},t.createUpdateAction=function(e,t,n){P.validateObjectPath(t);var r={Id:e._nextId(),ActionType:9,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},i=new h(r,0,0);return i.referencedObjectPath=t._objectPath,t._addAction(i)},t}();e.CommonActionFactory=f;var p=function(){function t(e,t){this.m_contextBase=e,this.m_objectPath=t}return Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_context",{get:function(){return this.m_contextBase},enumerable:!0,configurable:!0}),t.prototype._addAction=function(e,t){var n=this;return void 0===t&&(t=null),u.createPromise((function(r,i){n._context._addServiceApiAction(e,t,r,i)}))},t.prototype._addPreviewExecutionAction=function(e){},t.prototype._retrieve=function(t,n){var r=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;r||(r=!P.isSetSupported("RichApiRuntime","1.1"));var i=m._parseQueryOption(t);return r?f.createQueryAction(this._context,this,i,n):f.createQueryAsJsonAction(this._context,this,i,n)},t.prototype._recursivelyUpdate=function(t){var n=e._internalConfig.alwaysPolyfillClientObjectUpdateMethod;n||(n=!P.isSetSupported("RichApiRuntime","1.2"));try{var i=this[O.scalarPropertyNames];i||(i=[]);var a=this[O.scalarPropertyUpdateable];if(!a){a=[];for(var c=0;c=0){if(!a[y])throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:u._getResourceString(I.attemptingToSetReadOnlyProperty,m),debugInfo:{errorLocation:m}});p[m]=t[m],++d}else{if(!(l.indexOf(m)>=0))throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:u._getResourceString(I.propertyDoesNotExist,m),debugInfo:{errorLocation:m}});h[m]=t[m]}}if(d>0)if(n)for(c=0;c0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,s,".")});t.Top=a}else if("$skip"===s){if("number"!==typeof a||n.length>0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,s,".")});t.Skip=a}else if("boolean"===typeof a)a&&t.Select.push(e.combineQueryPath(n,s,"/"));else{if("object"!==typeof a)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,s,".")});e.parseStrictLoadOptionHelper(t,e.combineQueryPath(n,s,"/"),e.combineQueryPath(i,s,"."),a)}}},e}();e.ClientRequestContextBase=m;var y=function(){function e(e){this.m_objectPath=e}return e.prototype._handleResult=function(e){u.isNullOrUndefined(e)?this.m_objectPath._updateAsNullObject():this.m_objectPath.updateUsingObjectData(e,null)},e}(),g=function(){function t(e){this.m_contextBase=e,this.m_actions=[],this.m_actionResultHandler={},this.m_referencedObjectPaths={},this.m_instantiatedObjectPaths={},this.m_preSyncPromises=[],this.m_previewExecutionActions=[]}return t.prototype.addAction=function(e){this.m_actions.push(e),1==e.actionInfo.ActionType&&(this.m_instantiatedObjectPaths[e.actionInfo.ObjectPathId]=e)},t.prototype.addPreviewExecutionAction=function(e){this.m_previewExecutionActions.push(e)},Object.defineProperty(t.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.ensureInstantiateObjectPath=function(e){if(e){if(this.m_instantiatedObjectPaths[e.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(e.parentObjectPath),this.ensureInstantiateObjectPaths(e.argumentObjectPaths),!this.m_instantiatedObjectPaths[e.objectPathInfo.Id]){var t={Id:this.m_contextBase._nextId(),ActionType:1,Name:"",ObjectPathId:e.objectPathInfo.Id},n=new h(t,1,4);n.referencedObjectPath=e,this.addReferencedObjectPath(e),this.addAction(n);var r=new y(e);this.addActionResultHandler(n,r)}}},t.prototype.ensureInstantiateObjectPaths=function(e){if(e)for(var t=0;t0&&(u.PreviewExecutionActions=this.m_previewExecutionActions,n|=4096),{body:u,flags:n}},t.prototype.processResponse=function(e){if(e)for(var t=0;t=0;t--){var n=this.m_actions[t].actionInfo;if(n.ObjectPathId===e&&3===n.ActionType&&n.Name===O.keepReference){this.m_actions.splice(t,1);break}}},t._updateLastUsedActionIdOfObjectPathId=function(e,n,r){for(;n;){if(e[n.objectPathInfo.Id])return;e[n.objectPathInfo.Id]=r;var i=n.argumentObjectPaths;if(i)for(var o=i.length,s=0;s=0;--i){var o=(p=e[i]).actionInfo.Id;p.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(n,p.referencedObjectPath,o);var s=p.referencedArgumentObjectPaths;if(s)for(var a=s.length,c=0;c0?p.actionInfo.L=h:p.actionInfo.L&&delete p.actionInfo.L}},t}();e.ClientRequestBase=g;var _=function(){function e(e){this.m_type=e}return Object.defineProperty(e.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new r.RuntimeError({code:o.valueNotLoaded,httpStatusCode:400,message:u._getResourceString(s.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),e.prototype._handleResult=function(e){this.m_isLoaded=!0,"object"===typeof e&&e&&e._IsNull||(1===this.m_type?this.m_value=P.adjustToDateTime(e):this.m_value=e)},e}();e.ClientResult=_;var b=function(){function e(e){this.m_context=e,this.m_actions=[]}return e.prototype.add=function(e,t,n,r){var i=this;this.m_actions.push({action:e,resultHandler:t,resolve:n,reject:r}),1===this.m_actions.length&&setTimeout((function(){return i.processActions()}),0)},e.prototype.processActions=function(){var e=this;if(0!==this.m_actions.length){var t=this.m_actions;this.m_actions=[];for(var n=new g(this.m_context),r=0;r=65&&e.charCodeAt(t)<=90;)t++;return t0?".":"")+n;break;case 3:n=t.normalizeName(e.objectPathInfo.Name)+"()"+(n.length>0?".":"")+n;break;case 4:n=t.normalizeName(e.objectPathInfo.Name)+(n.length>0?".":"")+n;break;case 5:n="getItem()"+(n.length>0?".":"")+n;break;case 6:n="_reference()"+(n.length>0?".":"")+n}e=e.parentObjectPath}return n},t.setMethodArguments=function(e,n,r){if(u.isNullOrUndefined(r))return null;var i=new Array,o=new Array,s=t.collectObjectPathInfos(e,r,i,o);return n.Arguments=r,s&&(n.ReferencedObjectPathIds=o),i},t.validateContext=function(e,t){if(e&&t&&t._context!==e)throw new r.RuntimeError({code:o.invalidRequestContext,httpStatusCode:400,message:u._getResourceString(s.invalidRequestContext)})},t.isSetSupported=function(e,t){return!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)||window.Office.context.requirements.isSetSupported(e,t)},t.throwIfApiNotSupported=function(e,n,i,a){if(t._doApiNotSupportedCheck&&!t.isSetSupported(n,i)){var c=u._getResourceString(s.apiNotFoundDetails,[e,n+" "+i,a]);throw new r.RuntimeError({code:o.apiNotFound,httpStatusCode:404,message:c,debugInfo:{errorLocation:e}})}},t.calculateApiFlags=function(e,n,r){return t.isSetSupported(n,r)||(e&=-3),e},t._parseSelectExpand=function(e){var t=[];if(!u.isNullOrEmptyString(e))for(var n=e.split(","),r=0;r0&&t.push(i)}return t;function o(e){var t=e.toLowerCase();if("items"===t||"items/"===t)return"*";return("items/"===t.substr(0,6)||"items."===t.substr(0,6))&&(e=e.substr(6)),e.replace(new RegExp("[/.]items[/.]","gi"),"/")}},t.changePropertyNameToCamelLowerCase=function(e){if(Array.isArray(e)){for(var n=[],r=0;r=0){var s=new $(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!0),a=s.processForDebugStatementInfo(n.Body.Error.ActionIndex);o={statement:a.statement,surroundingStatements:a.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},e.config.extendedErrorLogging&&(s=new $(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!1),o.fullStatements=s.process())}var c=null;if(n.Body.Results?c=n.Body.Results:n.Body.ProcessedResults&&n.Body.ProcessedResults.Results&&(c=n.Body.ProcessedResults.Results),c){this._processingResult=!0;try{t.processResponse(c)}finally{this._processingResult=!1}}}if(!X.isNullOrEmptyString(n.ErrorCode))return new r.RuntimeError({code:n.ErrorCode,httpStatusCode:n.HttpStatusCode,message:n.ErrorMessage,traceMessages:i,data:{responseBody:n.RawErrorResponseBody}});if(n.Body&&n.Body.Error){var u={errorLocation:n.Body.Error.Location};return o&&(u.statement=o.statement,u.surroundingStatements=o.surroundingStatements,u.fullStatements=o.fullStatements),new r.RuntimeError({code:n.Body.Error.Code,httpStatusCode:n.Body.Error.HttpStatusCode,message:n.Body.Error.Message,traceMessages:i,debugInfo:u})}return null},i.prototype.processPendingEventHandlers=function(e){for(var t=X._createPromiseFromResult(null),n=0;n0)if(i.isValidRequestInfo(n[0]))p=n[0],d=1;else if(X.isPlainJsonObject(n[0])){if(null!=(p=(m=n[0]).session)&&!i.isValidRequestInfo(p))return i.createErrorPromise(t);h=m.previousObjects,d=1}if(n.length==d+1)f=n[d+0];else{if(null!=m||n.length!=d+2)return i.createErrorPromise(t);h=n[d+0],f=n[d+1]}if(null!=h)if(h instanceof F)l=function(){return h.context};else if(h instanceof i)l=function(){return h};else{if(!Array.isArray(h))return i.createErrorPromise(t);var y=h;if(0==y.length)return i.createErrorPromise(t);for(var g=0;g0&&d._onRunFinishedNotifiers.shift()();if(_)return m;throw m}))},i}(m);e.ClientRequestContext=M;var L=function(){function e(e,t){this.m_proxy=e,this.m_shouldPolyfill=t;var n=e[H.scalarPropertyNames],r=e[H.navigationPropertyNames],i=e[H.className],o=e[H.isCollection];if(n)for(var s=0;s=0;a--)if(i[a]===r[o].handler){i.splice(a,1);break}break;case 2:i=[]}return s&&(!this.m_registered&&i.length>0?n=n.then((function(){return t.m_eventInfo.registerFunc(t.m_callback)})).then((function(){return t.m_registered=!0})):this.m_registered&&0==i.length&&(n=n.then((function(){return t.m_eventInfo.unregisterFunc(t.m_callback)})).catch((function(e){u.log("Error when unregister event: "+JSON.stringify(e))})).then((function(){return t.m_registered=!1}))),n=n.then((function(){return t.m_handlers=i}))),n},e.prototype.fireEvent=function(e){for(var t=[],n=0;n0},e.prototype.register=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});var i=this.getHandlers(e,t);return i.push(n),1===i.length?this.m_registerEventImpl(e,t):X._createPromiseFromResult(null)},e.prototype.unregister=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var i=this.getHandlers(e,t),o=i.length-1;o>=0;o--)if(i[o]===n){i.splice(o,1);break}return 0===i.length?this.m_unregisterEventImpl(e,t):X._createPromiseFromResult(null)},e}();e.EventRegistration=G;var J=function(){function e(){this.m_eventRegistration=new G(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this)),this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return e.prototype.ready=function(){var t=this;return this.m_ready||(e._testReadyImpl?this.m_ready=e._testReadyImpl().then((function(){t.m_isReady=!0})):i.instance?this.m_ready=X._createPromiseFromResult(null).then((function(){t.m_isReady=!0})):this.m_ready=r.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then((function(){t.m_isReady=!0}))),this.m_ready},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.register(e,t,n)}))},e.prototype.unregister=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.unregister(e,t,n)}))},e.prototype._registerEventImpl=function(e,t){return X._createPromiseFromResult(null)},e.prototype._unregisterEventImpl=function(e,t){return X._createPromiseFromResult(null)},e.prototype._handleRichApiMessage=function(e){if(e&&e.entries)for(var t=0;t=0;i--)if(r[i]===e){r.splice(i,1);break}0==r.length&&J.getGenericEventRegistration(n).unregister(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)}))},t.prototype.removeAll=function(){},t}(q);e.GenericEventHandlers=W;var z=function(){function e(e){this.m_clientObject=e}return e.prototype._handleResult=function(e){this.m_clientObject._handleIdResult(e)},e}(),Q=function(){function e(){}return e.createGlobalObjectObjectPath=function(e){var t={Id:e._nextId(),ObjectPathType:1,Name:""};return new d(t,null,!1,!1,1,4)},e.createNewObjectObjectPath=function(e,t,n,r){var i={Id:e._nextId(),ObjectPathType:2,Name:t};return new d(i,null,n,!1,1,X._fixupApiFlags(r))},e.createPropertyObjectPath=function(e,t,n,r,i,o){var s={Id:e._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id};return new d(s,t._objectPath,r,i,1,X._fixupApiFlags(o))},e.createIndexerObjectPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new d(r,t._objectPath,!1,!1,1,4)},e.createIndexerObjectPathUsingParentPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new d(r,t,!1,!1,1,4)},e.createMethodObjectPath=function(e,t,n,r,i,o,s,a,c){var u={Id:e._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=X.setMethodArguments(e,u.ArgumentInfo,i),f=new d(u,t._objectPath,o,s,r,X._fixupApiFlags(c));return f.argumentObjectPaths=l,f.getByIdMethodName=a,f},e.createReferenceIdObjectPath=function(e,t){var n={Id:e._nextId(),ObjectPathType:6,Name:t,ArgumentInfo:{}};return new d(n,null,!1,!1,1,4)},e.createChildItemObjectPathUsingIndexerOrGetItemAt=function(t,n,r,i,o){var s=X.tryGetObjectIdFromLoadOrRetrieveResult(i);return t&&!X.isNullOrUndefined(s)?e.createChildItemObjectPathUsingIndexer(n,r,i):e.createChildItemObjectPathUsingGetItemAt(n,r,i,o)},e.createChildItemObjectPathUsingIndexer=function(e,t,n){var r=X.tryGetObjectIdFromLoadOrRetrieveResult(n),i=i={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return i.ArgumentInfo.Arguments=[r],new d(i,t._objectPath,!1,!1,1,4)},e.createChildItemObjectPathUsingGetItemAt=function(e,t,n,r){var i=n[H.index];i&&(r=i);var o={Id:e._nextId(),ObjectPathType:3,Name:H.getItemAt,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=[r],new d(o,t._objectPath,!1,!1,1,4)},e}();e.ObjectPathFactory=Q;var K=function(){function t(e){this.m_context=e}return t.prototype.executeAsync=function(n,r,i){var o=this,s=c.buildMessageArrayForIRequestExecutor(n,r,i,t.SourceLibHeaderValue);return new e.Promise((function(e,t){OSF.DDA.RichApi.executeRichApiRequestAsync(s,(function(t){var n;u.log("Response:"),u.log(JSON.stringify(t)),"succeeded"==t.status?n=c.buildResponseOnSuccess(c.getResponseBody(t),c.getResponseHeaders(t)):(n=c.buildResponseOnError(t.error.code,t.error.message),o.m_context._processOfficeJsErrorResponse(t.error.code,n)),e(n)}))}))},t.SourceLibHeaderValue="officejs",t}(),Z=function(){function e(e){this._autoCleanupList={},this.m_context=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._addCommon(e,!0)})):this._addCommon(e,!0)},e.prototype._autoAdd=function(e){this._addCommon(e,!1),this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e},e.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(e,t){this.m_context._autoCleanup&&!e[H.isTracked]&&e!==this.m_context._rootObject&&t&&!X.isNullOrEmptyString(t[H.referenceId])&&(this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e,e[H.isTracked]=!0)},e.prototype._addCommon=function(e,t){if(e[H.isTracked])t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id];else{var n=e[H.referenceId];if(e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName])throw X.createRuntimeError(o.generalException,u._getResourceString(Y.objectIsUntracked),null);X.isNullOrEmptyString(n)&&e._KeepReference&&(e._KeepReference(),U.createInstantiateAction(this.m_context,e),t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id],e[H.isTracked]=!0)}},e.prototype.remove=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._removeCommon(e)})):this._removeCommon(e)},e.prototype._removeCommon=function(e){e._objectPath.objectPathInfo[H.objectPathInfoDoNotKeepReferenceFieldName]=!0,e.context._pendingRequest._removeKeepReferenceAction(e._objectPath.objectPathInfo.Id);var t=e[H.referenceId];if(!X.isNullOrEmptyString(t)){var n=this.m_context._rootObject;n._RemoveReference&&n._RemoveReference(t)}delete e[H.isTracked]},e.prototype._retrieveAndClearAutoCleanupList=function(){var e=this._autoCleanupList;return this._autoCleanupList={},e},e}();e.TrackedObjects=Z;var $=function(){function t(e,t,n,r,i){e||(e="root"),this.m_globalObjName=e,this.m_referencedObjectPaths=t,this.m_actions=n,this.m_statements=[],this.m_variableNameForObjectPathMap={},this.m_variableNameToObjectPathMap={},this.m_declaredObjectPathMap={},this.m_showDispose=r,this.m_removePII=i}return t.prototype.process=function(){this.m_showDispose&&B._calculateLastUsedObjectPathIds(this.m_actions);for(var e=0;e=0&&this.m_statements.length>t+5+1));n++);if(t<0)return null;var r=t-5;r<0&&(r=0);var i=t+1+5;i>this.m_statements.length&&(i=this.m_statements.length);var o=[];0!=r&&o.push("...");for(var s=r;s>>>>"),o.push(this.m_statements[t]),o.push("// <<<<<");for(var a=t+1;a0)return e+" // And then dispose {"+r.map((function(e){return n.getObjVarName(e)})).join(", ")+"}"}return e},t.prototype.buildQueryExpression=function(e){if(e.actionInfo.QueryInfo){var t={};return t.select=e.actionInfo.QueryInfo.Select,t.expand=e.actionInfo.QueryInfo.Expand,t.skip=e.actionInfo.QueryInfo.Skip,t.top=e.actionInfo.QueryInfo.Top,"undefined"===typeof t.top&&"undefined"===typeof t.skip&&"undefined"===typeof t.expand?"undefined"===typeof t.select?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(e){return(5==e.objectPathInfo.ObjectPathType||3==e.objectPathInfo.ObjectPathType||4==e.objectPathInfo.ObjectPathType)&&e.objectPathInfo.ParentObjectPathId?this.getObjVarName(e.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(e):this.buildObjectPathExpression(e)},t.prototype.buildObjectPathExpression=function(e){var t=this.buildObjectPathInfoExpression(e.objectPathInfo),n=e.originalObjectPathInfo;return n&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(n)+" */"),t},t.prototype.buildObjectPathInfoExpression=function(e){switch(e.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 3:return X._toCamelLowerCase(e.Name)+"("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 2:return e.Name+".newObject()";case 7:return"null";case 4:return X._toCamelLowerCase(e.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(e.Name)+")"}},t.prototype.buildArgumentsExpression=function(e){var t="";if(!e.Arguments||0===e.Arguments.length)return t;if(this.m_removePII)return"undefined"===typeof e.Arguments[0]?t:"...";for(var n=0;n0&&(t+=", "),t+=this.buildArgumentLiteral(e.Arguments[n],e.ReferencedObjectPathIds?e.ReferencedObjectPathIds[n]:null);return"undefined"===t&&(t=""),t},t.prototype.buildArgumentLiteral=function(e,t){return"number"==typeof e&&e===t?this.getObjVarName(t):JSON.stringify(e)},t.prototype.getObjVarNameBase=function(e){var t="v",n=this.m_referencedObjectPaths[e];if(n)switch(n.objectPathInfo.ObjectPathType){case 1:t=this.m_globalObjName;break;case 4:t=X._toCamelLowerCase(n.objectPathInfo.Name);break;case 3:var r=n.objectPathInfo.Name;r.length>3&&"Get"===r.substr(0,3)&&(r=r.substr(3)),t=X._toCamelLowerCase(r);break;case 5:var i=this.getObjVarNameBase(n.objectPathInfo.ParentObjectPathId);t="s"===i.charAt(i.length-1)?i.substr(0,i.length-1):i+"Item"}return t},t.prototype.getObjVarName=function(e){if(this.m_variableNameForObjectPathMap[e])return this.m_variableNameForObjectPathMap[e];var t=this.getObjVarNameBase(e);if(!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t;for(var n=1;this.m_variableNameToObjectPathMap[t+n.toString()];)n++;return t+=n.toString(),this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t},t}(),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.cannotRegisterEvent="CannotRegisterEvent",t.connectionFailureWithStatus="ConnectionFailureWithStatus",t.connectionFailureWithDetails="ConnectionFailureWithDetails",t.propertyNotLoaded="PropertyNotLoaded",t.runMustReturnPromise="RunMustReturnPromise",t.moreInfoInnerError="MoreInfoInnerError",t.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",t.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",t.objectIsUntracked="ObjectIsUntracked",t.customFunctionDefintionMissing="CustomFunctionDefintionMissing",t.customFunctionImplementationMissing="CustomFunctionImplementationMissing",t.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",t.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",t.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",t.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",t.customFunctionInvalidFunction="CustomFunctionInvalidFunction",t.customFunctionInvalidFunctionMapping="CustomFunctionInvalidFunctionMapping",t.customFunctionWindowMissing="CustomFunctionWindowMissing",t.customFunctionDefintionMissingOnWindow="CustomFunctionDefintionMissingOnWindow",t.pendingBatchInProgress="PendingBatchInProgress",t.notInsideBatch="NotInsideBatch",t.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",t}(I);e.ResourceStrings=Y,u.addResourceStringValues({CannotRegisterEvent:"The event handler cannot be registered.",PropertyNotLoaded:"The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",RunMustReturnPromise:'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',InvalidOrTimedOutSessionMessage:"Your Office Online session has expired or is invalid. To continue, refresh the page.",InvalidOperationInCellEditMode:"Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",InvalidSheetName:"The request cannot be processed because the specified worksheet cannot be found. Please try again.",CustomFunctionDefintionMissing:"A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.",CustomFunctionDefintionMissingOnWindow:"A property with the name '{0}' that represents the function's definition must exist on the window object.",CustomFunctionImplementationMissing:"The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",CustomFunctionNameContainsBadChars:"The function name may only contain letters, digits, underscores, and periods.",CustomFunctionNameCannotSplit:"The function name must contain a non-empty namespace and a non-empty short name.",CustomFunctionUnexpectedNumberOfEntriesInResultBatch:"The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",CustomFunctionCancellationHandlerMissing:"The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",CustomFunctionInvalidFunction:"The property with the name '{0}' that represents the function's definition is not a valid function.",CustomFunctionInvalidFunctionMapping:"The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.",CustomFunctionWindowMissing:"The window object was not found.",PendingBatchInProgress:"There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",NotInsideBatch:"Operations may not be invoked outside of a batch method.",CannotUpdateReadOnlyProperty:"The property '{0}' is read-only and it cannot be updated.",ObjectIsUntracked:"The object is untracked."});var X=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.fixObjectPathIfNecessary=function(e,t){e&&e._objectPath&&t&&e._objectPath.updateUsingObjectData(t,e)},n.load=function(e,t){return e.context.load(e,t),e},n.loadAndSync=function(e,t){return e.context.load(e,t),e.context.sync().then((function(){return e}))},n.retrieve=function(t,r){var i=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;i||(i=!n.isSetSupported("RichApiRuntime","1.1"));var o=new L(t,i);return t._retrieve(r,o),o},n.retrieveAndSync=function(e,t){var r=n.retrieve(e,t);return e.context.sync().then((function(){return r}))},n.toJson=function(e,t,r,i){var o={};for(var s in t){"undefined"!==typeof(a=t[s])&&(o[s]=a)}for(var s in r){var a;"undefined"!==typeof(a=r[s])&&(a[n.fieldName_isCollection]&&"undefined"!==typeof a[n.fieldName_m__items]?o[s]=a.toJSON().items:o[s]=a.toJSON())}return i&&(o.items=i.map((function(e){return e.toJSON()}))),o},n.throwError=function(e,t,n){throw new r.RuntimeError({code:e,httpStatusCode:400,message:u._getResourceString(e,t),debugInfo:n?{errorLocation:n}:void 0})},n.createRuntimeError=function(e,t,n,i,o){return new r.RuntimeError({code:e,httpStatusCode:i,message:t,debugInfo:{errorLocation:n},data:o})},n.throwIfNotLoaded=function(e,t,r,i){if(!i&&u.isUndefined(t)&&e.charCodeAt(0)!=n.s_underscoreCharCode&&!n.s_suppressPropertyNotLoadedException)throw n.createPropertyNotLoadedException(r,e)},n._getPropertyValueWithoutCheckLoaded=function(e,t){n.s_suppressPropertyNotLoadedException=!0;try{return e[t]}finally{n.s_suppressPropertyNotLoadedException=!1}},n.createPropertyNotLoadedException=function(e,t){return new r.RuntimeError({code:w.propertyNotLoaded,httpStatusCode:400,message:u._getResourceString(Y.propertyNotLoaded,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.createCannotUpdateReadOnlyPropertyException=function(e,t){return new r.RuntimeError({code:w.cannotUpdateReadOnlyProperty,httpStatusCode:400,message:u._getResourceString(Y.cannotUpdateReadOnlyProperty,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.promisify=function(t){return new e.Promise((function(e,n){t((function(t){"failed"==t.status?n(t.error):e(t.value)}))}))},n._addActionResultHandler=function(e,t,n){e.context._pendingRequest.addActionResultHandler(t,n)},n._handleNavigationPropertyResults=function(e,t,n){for(var r=0;r0;)e.push(0),n--},t.prototype.getString=function(e){return"number"===typeof e?e>0?this.m_strings[e-1]:null:e},t.prototype.buildEnumType=function(e){var t;if(Array.isArray(e)){(t={name:e[0],fields:e[2]}).fields||(t.fields={});var n=e[1];if(Array.isArray(n))for(var r=0;rn)return!1;return!0},t.prototype.evaluateEventType=function(t){if(X.isNullOrEmptyString(t))return 0;if(this.isAllDigits(t))return parseInt(t);var n=this.resolveObjectByFullName(t);if("number"!==typeof n)throw new e.Error("Invalid event type: "+t);return n},t.prototype.buildPrototype=function(e,t){this.buildScalarProperties(e,t),this.buildNavigationProperties(e,t),this.buildScalarMethods(e,t),this.buildNavigationMethods(e,t),this.buildEvents(e,t),this.buildHandleResult(e,t),this.buildHandleIdResult(e,t),this.buildHandleRetrieveResult(e,t),this.buildLoad(e,t),this.buildRetrieve(e,t),this.buildSetMockData(e,t),this.buildEnsureUnchanged(e,t),this.buildUpdate(e,t),this.buildSet(e,t),this.buildToJSON(e,t),this.buildItems(e,t),this.buildTypeMetadataInfo(e,t),this.buildTrackUntrack(e,t),this.buildMixin(e,t)},t.prototype.toSimpleCamelUpperCase=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)},t.prototype.ensureOriginalName=function(e){null===e.originalName&&(e.originalName=this.toSimpleCamelUpperCase(e.name))},t.prototype.getFieldName=function(e){return"m_"+e.name},t.prototype.throwIfApiNotSupported=function(e,t){if(this.m_apiSets&&t.apiSetInfoOrdinal>0){var n=this.m_apiSets[t.apiSetInfoOrdinal-1];n&&X.throwIfApiNotSupported(e.name+"."+t.name,n.name,n.version,this.m_hostName)}},t.prototype.buildScalarProperties=function(e,t){if(Array.isArray(t.scalarProperties))for(var n=0;n0){var n=this.m_apiSets[t-1];n&&(e=P.calculateApiFlags(e,n.name,n.version))}return e},t.prototype.buildScalarProperty=function(e,n,r){this.ensureOriginalName(r);var i=this,o=this.getFieldName(r),s={get:function(){return X.throwIfNotLoaded(r.name,this[o],n.name,this._isNull),i.throwIfApiNotSupported(n,r),this[o]},enumerable:!0,configurable:!0};0===(2&r.behaviorFlags)&&(s.set=function(e){if(4&r.behaviorFlags&&i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName+"_Set").call(this,this,e).handled)return;this[o]=e;var s=i.calculateApiFlags(r.setMethodApiFlags,r.undoableApiSetInfoOrdinal);ee.invokeSetProperty(this,r.originalName,e,s)}),Object.defineProperty(e.prototype,r.name,s)},t.prototype.buildNavigationProperties=function(e,t){if(Array.isArray(t.navigationProperties))for(var n=0;n0){for(var o=0;o0){for(var o=0;o0&&(Object.defineProperty(e.prototype,"_scalarPropertyNames",{get:function(){return this.m__scalarPropertyNames||(this.m__scalarPropertyNames=t.scalarProperties.map((function(e){return e.name}))),this.m__scalarPropertyNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyOriginalNames",{get:function(){return this.m__scalarPropertyOriginalNames||(this.m__scalarPropertyOriginalNames=t.scalarProperties.map((function(e){return e.originalName}))),this.m__scalarPropertyOriginalNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyUpdateable",{get:function(){return this.m__scalarPropertyUpdateable||(this.m__scalarPropertyUpdateable=t.scalarProperties.map((function(e){return 0===(2&e.behaviorFlags)}))),this.m__scalarPropertyUpdateable},enumerable:!0,configurable:!0})),t.navigationProperties&&t.navigationProperties.length>0&&Object.defineProperty(e.prototype,"_navigationPropertyNames",{get:function(){return this.m__navigationPropertyNames||(this.m__navigationPropertyNames=t.navigationProperties.map((function(e){return e.name}))),this.m__navigationPropertyNames},enumerable:!0,configurable:!0})},t.prototype.buildTrackUntrack=function(e,t){2&t.behaviorFlags&&(e.prototype.track=function(){return this.context.trackedObjects.add(this),this},e.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this})},t.prototype.buildMixin=function(e,t){if(4&t.behaviorFlags){var n=this.getFunction(t.name+"Custom");X.applyMixin(e,n)}},t.prototype.getOnEventName=function(e){return"_"===e[0]?"_on"+e.substr(1):"on"+e},t.prototype.buildEvents=function(e,t){if(t.events)for(var n=0;n0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)&&(n=!0);var r=document.createElement("a");if(r.href=this.m_url,this.m_options.webApplication){var i=se.embeddingPageOrigin+"="+e+"&"+se.embeddingPageSessionInfo+"="+this.m_options.sessionKey;0===r.search.length||"?"===r.search?r.search="?"+se.sessionContext+"="+encodeURIComponent(i):r.search=r.search+"&"+se.sessionContext+"="+encodeURIComponent(i)}else n?0===r.hash.length||"#"===r.hash?r.hash="#"+t:r.hash=r.hash+"&"+t:0===r.search.length||"?"===r.search?r.search="?"+t:r.search=r.search+"&"+t;return r.href},t.prototype.init=function(){var e=this;window.addEventListener("message",this.m_onMessageHandler);var t=this._getIFrameSrc();return u.createPromise((function(n,r){var i=document.createElement("iframe");if(e.m_options.id&&(i.id=e.m_options.id,i.name=e.m_options.id),i.style.height=e.m_options.height,i.style.width=e.m_options.width,e.m_options.webApplication){var a=document.createElement("form");a.setAttribute("action",t),a.setAttribute("method","post"),a.setAttribute("target",i.name),e.m_options.container.appendChild(a);var c=document.createElement("input");c.setAttribute("type","hidden"),c.setAttribute("name","access_token"),c.setAttribute("value",e.m_options.webApplication.accessToken),a.appendChild(c);var l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name","access_token_ttl"),l.setAttribute("value",e.m_options.webApplication.accessTokenTtl),a.appendChild(l),e.m_options.container.appendChild(i),a.submit()}else i.src=t,e.m_options.container.appendChild(i);e.m_timeoutId=window.setTimeout((function(){e.close();var t=X.createRuntimeError(o.timeout,u._getResourceString(s.timeout),"EmbeddedSession.init");r(t)}),e.m_options.timeoutInMilliseconds),e.m_promiseResolver=n}))},t.prototype._invoke=function(e,t,n){this.m_enabled?(ie&&(n=ie(n)),this._sendMessageWithCallback(this.m_id++,e,n,(function(e){oe&&(e=oe(e));var n=e.Error;delete e.Error,t(n||0,e)}))):t(5001,null)},t.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler),window.clearTimeout(this.m_timeoutId),this.m_enabled=!1},t.prototype.getEventRegistration=function(e){return this.m_sessionEventManager||(this.m_sessionEventManager=new G(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},t.prototype._createRequestExecutorOrNull=function(){return new ce(this)},t.prototype._resolveRequestUrlAndHeaderInfo=function(){return u._createPromiseFromResult(null)},t.prototype._registerEventImpl=function(e,t){var n=this;return u.createPromise((function(r,i){n._sendMessageWithCallback(n.m_id++,ne.RegisterEventCommand,{EventId:e,TargetId:t},(function(){r(null)}))}))},t.prototype._unregisterEventImpl=function(e,t){var n=this;return u.createPromise((function(r,i){n._sendMessageWithCallback(n.m_id++,ne.UnregisterEventCommand,{EventId:e,TargetId:t},(function(){r()}))}))},t.prototype._onMessage=function(e){var t=this;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===e.source&&this.m_chosenOrigin===e.origin)){var n=e.data;if(n&&n[ne.CommandKey]===ne.ApiReadyCommand)!this.m_chosenWindow&&this._isValidDescendant(e.source)&&n[ne.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=e.source,this.m_chosenOrigin=e.origin,this._sendMessageWithCallback(this.m_id++,ne.GetAppContextCommand,null,(function(e){t._setupContext(e),window.clearTimeout(t.m_timeoutId),t.m_promiseResolver()})));else if(n&&n[ne.CommandKey]===ne.FireEventCommand){var r=n[ne.ParamsKey],i=r.EventId,o=r.TargetId,s=r.Data;if(this.m_sessionEventManager)for(var a=this.m_sessionEventManager.getHandlers(i,o),c=0;c0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=2){var a=t[n].message[1];a&&(r=s(a)?JSON.parse(a):a)}"undefined"!==typeof OSF&&OSF.AppTelemetry&&OSF.AppTelemetry.CallOnAppActivatedIfPending&&OSF.AppTelemetry.CallOnAppActivatedIfPending(),o.apply(null,[r])}else OfficeExtension.Utility.log("ActionProxy._handleMessage unknown message type "+t[n].messageType)}catch(e){throw function(e){var t=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t}(e);OfficeExtension.Utility.log(t)}(e),e}return OfficeExtension.Utility._createPromiseFromResult(null)}function s(e){return"string"===typeof e&&"{"===e[0]}function a(){try{Microsoft.Office.WebExtension.onReadyInternal().then((function(){return function(){if("undefined"!==typeof OSF&&OSF.DDA&&OSF.DDA.RichApi&&OSF.DDA.RichApi.richApiMessageManager)return(new OfficeExtension.ClientRequestContext).eventRegistration.register(5,"",o)}()})).then((function(){var e=OSF._OfficeAppFactory.getHostInfo();return!0===e.isDialog||"web"===e.hostPlatform&&"word"!==e.hostType&&"excel"!==e.hostType?void 0:function(){var e=new OfficeExtension.ClientRequestContext,t=OfficeCore.AddinInternalService.newObject(e);return e._customData="WacPartition",t.notifyActionHandlerReady(),e.sync()}()}))}catch(e){}}!function(){OfficeExtension.Utility.log("ActionProxy.initOnce"),"undefined"!=typeof e.actions&&function(e){n=e}(e.actions._association),"undefined"!==typeof document&&(document.readyState&&"loading"!==document.readyState?(OfficeExtension.Utility.log("ActionProxy.initOnce: document.readyState is not loading state"),a()):document.addEventListener&&document.addEventListener("DOMContentLoaded",(function(){OfficeExtension.Utility.log("ActionProxy.initOnce: DOMContentLoaded event triggered"),a()}))),OfficeExtension.HostBridge.onInited((function(e){!function(e){e.addHostMessageHandler((function(e){3===e.type&&o(e.message)}))}(e)}))}()}(t||(t={}))}(Office||(Office={})),function(e){!function(e){function t(){var e=new OfficeCore.RequestContext;return"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e._customData="WacPartition"),e}e.areShortcutsInUse=function(e){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,s;return __generator(this,(function(a){switch(a.label){case 0:return n=t(),r=OfficeCore.ActionService.newObject(n),i=r.areShortcutsInUse(e),[4,n.sync()];case 1:for(a.sent(),o=[],s=0;s